From e4c67c8ecb92053a314f2ee0bce1d55a6dd65cdb Mon Sep 17 00:00:00 2001 From: johnman Date: Thu, 14 Nov 2024 18:27:18 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20built-on?= =?UTF-8?q?-openfin/web-starter@770a8e5d0161359fd8fe2e1783459eb63798b6a2?= =?UTF-8?q?=20=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cloud-interop/js/fdc3-panel.bundle.js | 34 +++++++------- .../cloud-interop/js/fdc3-panel.bundle.js.map | 2 +- .../cloud-interop/js/fdc3-view.bundle.js | 34 +++++++------- .../cloud-interop/js/fdc3-view.bundle.js.map | 2 +- .../cloud-interop/js/iframe-broker.bundle.js | 12 ++--- .../js/iframe-broker.bundle.js.map | 2 +- .../cloud-interop/js/interop-view.bundle.js | 34 +++++++------- .../js/interop-view.bundle.js.map | 2 +- .../cloud-interop/js/provider.bundle.js | 44 +++++++++---------- .../cloud-interop/js/provider.bundle.js.map | 2 +- .../layouts/default.layout.fin.json | 4 +- .../js/shim-connect-fallback.api.bundle.js | 2 +- .../shim-connect-fallback.api.bundle.js.map | 2 +- .../web-client-api/js/shim.api.bundle.js | 2 +- .../web-client-api/js/shim.api.bundle.js.map | 2 +- .../js/web.client.api.bundle.js | 2 +- .../js/web.client.api.bundle.js.map | 2 +- .../web-interop-basic/js/fdc3-view.bundle.js | 34 +++++++------- .../js/fdc3-view.bundle.js.map | 2 +- .../js/iframe-broker.bundle.js | 12 ++--- .../js/iframe-broker.bundle.js.map | 2 +- .../js/interop-view.bundle.js | 34 +++++++------- .../js/interop-view.bundle.js.map | 2 +- .../web-interop-basic/js/provider.bundle.js | 34 +++++++------- .../js/provider.bundle.js.map | 2 +- .../common/apps-contact.json | 30 ++++++------- .../common/apps-fdc3-2-0.json | 12 ++--- .../common/apps-finance.json | 16 +++---- .../common/apps-interop.json | 12 ++--- .../common/apps-manager.json | 30 ++++++------- .../js/fdc3-intent-view.bundle.js | 34 +++++++------- .../js/fdc3-intent-view.bundle.js.map | 2 +- .../js/fdc3-view.bundle.js | 34 +++++++------- .../js/fdc3-view.bundle.js.map | 2 +- .../js/iframe-broker.bundle.js | 12 ++--- .../js/iframe-broker.bundle.js.map | 2 +- .../js/interop-intent-view.bundle.js | 34 +++++++------- .../js/interop-intent-view.bundle.js.map | 2 +- .../js/interop-view.bundle.js | 34 +++++++------- .../js/interop-view.bundle.js.map | 2 +- .../js/provider.bundle.js | 44 +++++++++---------- .../js/provider.bundle.js.map | 2 +- .../js/settings-dialog.bundle.js | 2 +- .../layouts/default.layout.fin.json | 34 +++++++------- .../platform/apps/app-picker.html | 2 +- .../platform/intents/instance-picker.html | 2 +- .../platform/settings/settings-dialog.html | 2 +- .../web-interop/js/fdc3-panel.bundle.js | 34 +++++++------- .../web-interop/js/fdc3-panel.bundle.js.map | 2 +- .../web-interop/js/fdc3-view.bundle.js | 34 +++++++------- .../web-interop/js/fdc3-view.bundle.js.map | 2 +- .../web-interop/js/iframe-broker.bundle.js | 12 ++--- .../js/iframe-broker.bundle.js.map | 2 +- .../web-interop/js/interop-view.bundle.js | 34 +++++++------- .../web-interop/js/interop-view.bundle.js.map | 2 +- web/v19.2.0/web-interop/js/provider.bundle.js | 34 +++++++------- .../web-interop/js/provider.bundle.js.map | 2 +- .../layouts/default.layout.fin.json | 4 +- .../js/iframe-broker.bundle.js | 12 ++--- .../js/iframe-broker.bundle.js.map | 2 +- .../web-layout-basic/js/provider.bundle.js | 34 +++++++------- .../js/provider.bundle.js.map | 2 +- .../web-layout/js/fdc3-panel.bundle.js | 34 +++++++------- .../web-layout/js/fdc3-panel.bundle.js.map | 2 +- web/v19.2.0/web-layout/js/fdc3-view.bundle.js | 34 +++++++------- .../web-layout/js/fdc3-view.bundle.js.map | 2 +- .../web-layout/js/iframe-broker.bundle.js | 12 ++--- .../web-layout/js/iframe-broker.bundle.js.map | 2 +- .../web-layout/js/interop-view.bundle.js | 34 +++++++------- .../web-layout/js/interop-view.bundle.js.map | 2 +- web/v19.2.0/web-layout/js/provider.bundle.js | 34 +++++++------- .../web-layout/js/provider.bundle.js.map | 2 +- .../layouts/default.layout.fin.json | 6 +-- .../layouts/secondary.layout.fin.json | 2 +- 74 files changed, 515 insertions(+), 515 deletions(-) diff --git a/web/v19.2.0/cloud-interop/js/fdc3-panel.bundle.js b/web/v19.2.0/cloud-interop/js/fdc3-panel.bundle.js index 2d02da7..a75ad42 100644 --- a/web/v19.2.0/cloud-interop/js/fdc3-panel.bundle.js +++ b/web/v19.2.0/cloud-interop/js/fdc3-panel.bundle.js @@ -1,38 +1,38 @@ /******/ (() => { // webpackBootstrap /******/ var __webpack_modules__ = ({ -/***/ "./node_modules/@openfin/core-web/out/api-client.js": -/*!**********************************************************!*\ - !*** ./node_modules/@openfin/core-web/out/api-client.js ***! - \**********************************************************/ +/***/ "../../node_modules/@openfin/core-web/out/api-client.js": +/*!**************************************************************!*\ + !*** ../../node_modules/@openfin/core-web/out/api-client.js ***! + \**************************************************************/ /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; -var e=__webpack_require__(/*! ./main-8cad4070.js */ "./node_modules/@openfin/core-web/out/main-8cad4070.js");__webpack_require__(/*! buffer/ */ "../../node_modules/buffer/index.js"),__webpack_require__(/*! uuid */ "../../node_modules/uuid/dist/esm-browser/index.js"),__webpack_require__(/*! events */ "../../node_modules/events/events.js"),__webpack_require__(/*! lodash/cloneDeep */ "../../node_modules/lodash/cloneDeep.js"),__webpack_require__(/*! lodash/isEqual */ "../../node_modules/lodash/isEqual.js"),exports.connect=e.connect; +var e=__webpack_require__(/*! ./main-8cad4070.js */ "../../node_modules/@openfin/core-web/out/main-8cad4070.js");__webpack_require__(/*! buffer/ */ "../../node_modules/buffer/index.js"),__webpack_require__(/*! uuid */ "../../node_modules/uuid/dist/esm-browser/index.js"),__webpack_require__(/*! events */ "../../node_modules/events/events.js"),__webpack_require__(/*! lodash/cloneDeep */ "../../node_modules/lodash/cloneDeep.js"),__webpack_require__(/*! lodash/isEqual */ "../../node_modules/lodash/isEqual.js"),exports.connect=e.connect; /***/ }), -/***/ "./node_modules/@openfin/core-web/out/main-8cad4070.js": -/*!*************************************************************!*\ - !*** ./node_modules/@openfin/core-web/out/main-8cad4070.js ***! - \*************************************************************/ +/***/ "../../node_modules/@openfin/core-web/out/main-8cad4070.js": +/*!*****************************************************************!*\ + !*** ../../node_modules/@openfin/core-web/out/main-8cad4070.js ***! + \*****************************************************************/ /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; -var e=__webpack_require__(/*! buffer/ */ "../../node_modules/buffer/index.js"),t=__webpack_require__(/*! events */ "../../node_modules/events/events.js"),n=__webpack_require__(/*! lodash/cloneDeep */ "../../node_modules/lodash/cloneDeep.js"),i=__webpack_require__(/*! lodash/isEqual */ "../../node_modules/lodash/isEqual.js"),r=__webpack_require__(/*! uuid */ "../../node_modules/uuid/dist/esm-browser/index.js");const o=(e,t)=>`${t}<${btoa(JSON.stringify(e))}>`;var s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof __webpack_require__.g?__webpack_require__.g:"undefined"!=typeof self?self:{},a={},c={},d={},h={};async function l(e){const t=[];for(const n of e){const e=await n();t.push(e)}return t}Object.defineProperty(h,"__esModule",{value:!0}),h.promiseMapSerial=h.serial=h.promiseMap=h.promisify=void 0,h.promisify=function(e){return(...t)=>new Promise(((n,i)=>{e(...t,((e,t)=>e?i(e):n(t)))}))},h.promiseMap=async function(e,t){return Promise.all(e.map(t))},h.serial=l,h.promiseMapSerial=async function(e,t){return l(e.map(((e,n,i)=>()=>t(e,n,i))))};var u,p=s&&s.__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},w=s&&s.__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)};Object.defineProperty(d,"__esModule",{value:!0}),d.Reply=d.EmitterBase=d.Base=void 0;const y=h;class f{constructor(e){this.isNodeEnvironment=()=>"node"===this.wire.environment.type,this.isOpenFinEnvironment=()=>"openfin"===this.wire.environment.type,this.isBrowserEnvironment=()=>"other"===this.wire.environment.type,this.wire=e}get fin(){return this.wire.getFin()}get me(){return this.wire.me}}d.Base=f;d.EmitterBase=class extends f{constructor(e,t,...n){super(e),this.topic=t,u.set(this,void 0),this.eventNames=()=>this.hasEmitter()?this.getOrCreateEmitter().eventNames():[],this.emit=(e,t,...n)=>!!this.hasEmitter()&&this.getOrCreateEmitter().emit(e,t,...n),this.hasEmitter=()=>this.wire.eventAggregator.has(w(this,u,"f")),this.getOrCreateEmitter=()=>this.wire.eventAggregator.getOrCreate(w(this,u,"f")),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[],this.listenerCount=e=>this.hasEmitter()?this.getOrCreateEmitter().listenerCount(e):0,this.registerEventListener=async(e,t={},n,i)=>{const r={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e},o=this.getOrCreateEmitter();n(o);try{await this.wire.sendAction("subscribe-to-desktop-event",r)}catch(e){throw i(o),this.deleteEmitterIfNothingRegistered(o),e}},this.deregisterEventListener=async(e,t={})=>{if(this.hasEmitter()){const n={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e};await this.wire.sendAction("unsubscribe-to-desktop-event",n).catch((()=>null));return this.getOrCreateEmitter()}return Promise.resolve()},p(this,u,[t,...n],"f"),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[]}async on(e,t,n){return await this.registerEventListener(e,n,(n=>{n.on(e,t)}),(n=>{n.removeListener(e,t)})),this}async addListener(e,t,n){return this.on(e,t,n)}async once(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.once(e,i),n.once(e,t)}),(n=>{n.removeListener(e,i),n.removeListener(e,t)})),this}async prependListener(e,t,n){return await this.registerEventListener(e,n,(n=>{n.prependListener(e,t)}),(n=>{n.removeListener(e,t)})),this}async prependOnceListener(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.prependOnceListener(e,t),n.once(e,i)}),(n=>{n.removeListener(e,t),n.removeListener(e,i)})),this}async removeListener(e,t,n){const i=await this.deregisterEventListener(e,n);return i&&(i.removeListener(e,t),this.deleteEmitterIfNothingRegistered(i)),this}async deregisterAllListeners(e){const t={...this.identity,type:e,topic:this.topic};if(this.hasEmitter()){const e=this.getOrCreateEmitter(),n=e.listenerCount(t.type),i=[];for(let e=0;enull)));return await Promise.all(i),e}}async removeAllListeners(e){const t=async e=>{const t=await this.deregisterAllListeners(e);t&&(t.removeAllListeners(e),this.deleteEmitterIfNothingRegistered(t))};if(e)await t(e);else if(this.hasEmitter()){const e=this.getOrCreateEmitter().eventNames();await(0,y.promiseMap)(e,t)}return this}deleteEmitterIfNothingRegistered(e){0===e.eventNames().length&&this.wire.eventAggregator.delete(w(this,u,"f"))}},u=new WeakMap;d.Reply=class{};var g={};Object.defineProperty(g,"__esModule",{value:!0});var m=g.RuntimeError=g.NotSupportedError=g.NotImplementedError=g.NoAckError=g.DuplicateCorrelationError=g.UnexpectedActionError=g.DisconnectedError=void 0;class v extends Error{constructor(e){super(`Expected websocket state OPEN but found ${e}`),this.readyState=e}}g.DisconnectedError=v;class C extends Error{}g.UnexpectedActionError=C;class b extends Error{}g.DuplicateCorrelationError=b;class I extends Error{}g.NoAckError=I;class E extends Error{}g.NotImplementedError=E;class x extends Error{}g.NotSupportedError=x;class A extends Error{constructor(e){const{message:t,name:n,stack:i,...r}=e;super(t),this.name=n||"Error",this.stack=i??this.toString(),Object.keys(r).forEach((e=>{this[e]=r[e]}))}}class P extends Error{static getCallSite(e=0){const t=Error.stackTraceLimit,n=e+1;Error.stackTraceLimit=t+n;const i=Error.prepareStackTrace;Error.prepareStackTrace=(e,t)=>t;const r=(new Error).stack?.slice(n)??[];return Error.prepareStackTrace=i,Error.stackTraceLimit=t,r}static prepareStackTrace(e,t){if("function"==typeof Error.prepareStackTrace)return Error.prepareStackTrace(e,t);let n="";n+=e.name||"Error",n+=`: ${e.message||""}`;for(const e of t)n+=`\n at ${e.toString()}`;return n}constructor(e,t){const{reason:n,error:i}=e;super(n),this.name="RuntimeError",i?.stack&&(this.cause=new A(i)),t&&(this.stack=P.prepareStackTrace(this,t))}}m=g.RuntimeError=P;var M={},_={},O={};Object.defineProperty(O,"__esModule",{value:!0}),O.validateIdentity=void 0,O.validateIdentity=function(e){let t;return"object"==typeof e&&"string"==typeof e.uuid||(t="Not a valid identity object"),t};var S={},R={},F={},j={},k={},L={},T={};Object.defineProperty(T,"__esModule",{value:!0}),T.handleDeprecatedWarnings=void 0;var $;T.handleDeprecatedWarnings=e=>{(e.contentNavigation?.whitelist||e.contentNavigation?.blacklist||e.contentRedirect?.whitelist||e.contentRedirect?.blacklist)&&console.warn("The properties 'whitelist' and 'blacklist' have been marked as deprecated and will be removed in a future version. Please use 'allowlist' and 'denylist'.")};var B={},G={};Object.defineProperty(G,"__esModule",{value:!0}),G.AsyncRetryableLazy=W=G.Lazy=void 0;var W=G.Lazy=class{constructor(e){this.producerFn=e}getValue(){return this.value||(this.value=this.producerFn()),this.value}};G.AsyncRetryableLazy=class{constructor(e){this.producerFn=e}async getValue(){return this.promise||(this.promise=this.producerFn().catch((e=>{throw delete this.promise,e}))),this.promise}};var H={};Object.defineProperty(H,"__esModule",{value:!0}),H.WebContents=void 0;const N=d;class D extends N.EmitterBase{constructor(e,t,n){super(e,n,t.uuid,t.name),this.identity=t,this.entityType=n}capturePage(e){return this.wire.sendAction("capture-page",{options:e,...this.identity}).then((({payload:e})=>e.data))}executeJavaScript(e){return this.wire.sendAction("execute-javascript-in-window",{...this.identity,code:e}).then((({payload:e})=>e.data))}getZoomLevel(){return this.wire.sendAction("get-zoom-level",this.identity).then((({payload:e})=>e.data))}setZoomLevel(e){return this.wire.sendAction("set-zoom-level",{...this.identity,level:e}).then((()=>{}))}navigate(e){return this.wire.sendAction("navigate-window",{...this.identity,url:e}).then((()=>{}))}navigateBack(){return this.wire.sendAction("navigate-window-back",{...this.identity}).then((()=>{}))}async navigateForward(){await this.wire.sendAction("navigate-window-forward",{...this.identity})}stopNavigation(){return this.wire.sendAction("stop-window-navigation",{...this.identity}).then((()=>{}))}reload(e=!1){return this.wire.sendAction("reload-window",{ignoreCache:e,...this.identity}).then((()=>{}))}print(e={}){return this.wire.sendAction("print",{...this.identity,options:e}).then((()=>{}))}findInPage(e,t){return this.wire.sendAction("find-in-page",{...this.identity,searchTerm:e,options:t}).then((({payload:e})=>e.data))}stopFindInPage(e){return this.wire.sendAction("stop-find-in-page",{...this.identity,action:e}).then((()=>{}))}getPrinters(){return this.wire.sendAction("get-printers",{...this.identity}).then((({payload:e})=>e.data))}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){await this.wire.sendAction("focus-window",{emitSynthFocused:e,...this.identity})}async showDeveloperTools(){await this.wire.sendAction("show-developer-tools",this.identity)}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction("get-process-info",this.identity);return e}async getSharedWorkers(){return this.wire.sendAction("get-shared-workers",this.identity).then((({payload:e})=>e.data))}async inspectSharedWorker(){await this.wire.sendAction("inspect-shared-worker",{...this.identity})}async inspectSharedWorkerById(e){await this.wire.sendAction("inspect-shared-worker-by-id",{...this.identity,workerId:e})}async inspectServiceWorker(){await this.wire.sendAction("inspect-service-worker",{...this.identity})}async showPopupWindow(e){if(this.wire.sendAction(`${this.entityType}-show-popup-window`,this.identity).catch((()=>{})),e?.onPopupReady){const t=async({popupName:t})=>{try{const n=this.fin.Window.wrapSync({uuid:this.fin.me.uuid,name:t});await e.onPopupReady(n)}catch(e){throw new Error(`Something went wrong during onPopupReady execution: ${e}`)}};await this.once("popup-ready",t)}const{payload:t}=await this.wire.sendAction("try-create-popup-window",{options:{...e,hasResultCallback:!!e?.onPopupResult,hasReadyCallback:!!e?.onPopupReady},...this.identity}),{data:{willOpen:n,options:i}}=t;n&&await this.fin.Window.create(i.initialOptions);if(e?.onPopupResult){const t=async t=>{await e.onPopupResult((e=>{const{name:t,uuid:n,result:i,data:r}=e,o={identity:{name:t,uuid:n},result:i};return r&&(o.data=r),o})(t))},n=async()=>{await this.removeListener("popup-result",t)};await this.on("popup-result",t),await this.once("popup-teardown",n)}const{payload:r}=await this.wire.sendAction("show-popup-window",{options:i,...this.identity});return r.data}}var U,V,z,K,q;function J(){return V||(V=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(function(){if($)return L;$=1,Object.defineProperty(L,"__esModule",{value:!0}),L.ViewModule=void 0;const e=d,t=O,n=J(),i=T;class r extends e.Base{async create(e){const{uuid:t}=this.wire.me;if(!e.name||"string"!=typeof e.name)throw new Error("Please provide a name property as a string in order to create a View.");return(0,i.handleDeprecatedWarnings)(e),this.wire.environment.childViews?await this.wire.environment.createChildContent({entityType:"view",options:{...e,uuid:t}}):await this.wire.sendAction("create-view",{...e,uuid:t}),this.wrapSync({uuid:t,name:e.name})}async wrap(e){this.wire.sendAction("view-wrap").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}wrapSync(e){this.wire.sendAction("view-wrap-sync").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}getCurrent(){if(this.wire.sendAction("view-get-current").catch((e=>{})),!this.wire.me.isView)throw new Error("You are not in a View context");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction("view-get-current-sync").catch((e=>{})),!this.wire.me.isView)throw new Error("You are not in a View context");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return L.ViewModule=r,L}(),e),n(function(){if(U)return B;var e;U=1,Object.defineProperty(B,"__esModule",{value:!0}),B.View=void 0;const t=g,n=G,i=H,r=ie();class o extends i.WebContents{constructor(i,o){super(i,o,"view"),this.identity=o,e.set(this,new n.Lazy((()=>this.fin.Platform.wrapSync(this.identity).getClient()))),this.attach=async e=>{await this.wire.sendAction("attach-view",{target:e,...this.identity})},this.destroy=async()=>{await this.wire.sendAction("destroy-view",{...this.identity})},this.show=async()=>{await this.wire.sendAction("show-view",{...this.identity})},this.showAt=async(e,t={})=>{await this.wire.sendAction("show-view-at",{bounds:e,...this.identity,options:t})},this.bringToFront=async()=>{await this.wire.sendAction("bring-view-to-front",{...this.identity})},this.hide=async()=>{await this.wire.sendAction("hide-view",{...this.identity})},this.setBounds=async e=>{await this.wire.sendAction("set-view-bounds",{bounds:e,...this.identity})},this.getBounds=async()=>(await this.wire.sendAction("get-view-bounds",{...this.identity})).payload.data,this.getInfo=async()=>(await this.wire.sendAction("get-view-info",{...this.identity})).payload.data,this.getParentLayout=async()=>(this.wire.sendAction("view-get-parent-layout",{...this.identity}).catch((()=>{})),this.fin.Platform.Layout.getLayoutByViewIdentity(this.identity)),this.getOptions=async()=>this.wire.sendAction("get-view-options",{...this.identity}).then((({payload:e})=>e.data)),this.updateOptions=async e=>this.wire.sendAction("update-view-options",{options:e,...this.identity}).then((()=>{})),this.getCurrentWindow=async()=>{const{payload:{data:e}}=await this.wire.sendAction("get-view-window",{...this.identity});return new r._Window(this.wire,e)},this.getCurrentStack=async()=>{this.wire.sendAction("view-get-current-stack").catch((()=>{}));try{return(await this.getParentLayout()).getStackByViewIdentity(this.identity)}catch(e){throw new t.RuntimeError({reason:"This view does not belong to a stack.",error:e})}},this.triggerBeforeUnload=async()=>(await this.wire.sendAction("trigger-before-unload",{...this.identity})).payload.data,this.bindToElement=async e=>{if(!e)throw new Error("Element not found.");return this.wire.environment.observeBounds(e,(async e=>this.setBounds(e)))}}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){const t=await this.getCurrentWindow();await t.focusedWebViewWasChanged(),await super.focus({emitSynthFocused:e})}}return B.View=o,e=new WeakMap,B}(),e)}(k)),k}function Y(){if(z)return j;z=1,Object.defineProperty(j,"__esModule",{value:!0}),j.Application=void 0;const e=d,t=ie(),n=J();class i extends e.EmitterBase{constructor(e,n){super(e,"application",n.uuid),this.identity=n,this.window=new t._Window(this.wire,{uuid:this.identity.uuid,name:this.identity.uuid})}windowListFromIdentityList(e){const n=[];return e.forEach((e=>{n.push(new t._Window(this.wire,{uuid:e.uuid,name:e.name}))})),n}isRunning(){return this.wire.sendAction("is-application-running",this.identity).then((({payload:e})=>e.data))}async quit(e=!1){try{await this._close(e),await this.wire.sendAction("destroy-application",{force:e,...this.identity})}catch(e){if(!["Remote connection has closed","Could not locate the requested application"].some((t=>e.message.includes(t))))throw e}}async _close(e=!1){try{await this.wire.sendAction("close-application",{force:e,...this.identity})}catch(e){if(!e.message.includes("Remote connection has closed"))throw e}}close(e=!1){return console.warn("Deprecation Warning: Application.close is deprecated Please use Application.quit"),this.wire.sendAction("application-close",this.identity).catch((e=>{})),this._close(e)}getChildWindows(){return this.wire.sendAction("get-child-windows",this.identity).then((({payload:e})=>{const t=[];return e.data.forEach((e=>{t.push({uuid:this.identity.uuid,name:e})})),this.windowListFromIdentityList(t)}))}getManifest(){return this.wire.sendAction("get-application-manifest",this.identity).then((({payload:e})=>e.data))}getParentUuid(){return this.wire.sendAction("get-parent-application",this.identity).then((({payload:e})=>e.data))}getShortcuts(){return this.wire.sendAction("get-shortcuts",this.identity).then((({payload:e})=>e.data))}async getViews(){const{payload:e}=await this.wire.sendAction("application-get-views",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}getZoomLevel(){return this.wire.sendAction("get-application-zoom-level",this.identity).then((({payload:e})=>e.data))}getWindow(){return this.wire.sendAction("application-get-window",this.identity).catch((e=>{})),Promise.resolve(this.window)}registerUser(e,t){return this.wire.sendAction("register-user",{userName:e,appName:t,...this.identity}).then((()=>{}))}removeTrayIcon(){return this.wire.sendAction("remove-tray-icon",this.identity).then((()=>{}))}restart(){return this.wire.sendAction("restart-application",this.identity).then((()=>{}))}run(){return console.warn("Deprecation Warning: Application.run is deprecated Please use fin.Application.start"),this.wire.sendAction("application-run",this.identity).catch((e=>{})),this._run()}_run(e={}){return this.wire.sendAction("run-application",{manifestUrl:this._manifestUrl,opts:e,...this.identity}).then((()=>{}))}scheduleRestart(){return this.wire.sendAction("relaunch-on-close",this.identity).then((()=>{}))}async sendApplicationLog(){const{payload:e}=await this.wire.sendAction("send-application-log",this.identity);return e.data}async setJumpList(e){await this.wire.sendAction("set-jump-list",{config:e,...this.identity})}setTrayIcon(e){return this.wire.sendAction("set-tray-icon",{enabledIcon:e,...this.identity}).then((()=>{}))}setShortcuts(e){return this.wire.sendAction("set-shortcuts",{data:e,...this.identity}).then((()=>{}))}async setShortcutQueryParams(e){await this.wire.sendAction("set-shortcut-query-args",{data:e,...this.identity})}setZoomLevel(e){return this.wire.sendAction("set-application-zoom-level",{level:e,...this.identity}).then((()=>{}))}async setAppLogUsername(e){await this.wire.sendAction("set-app-log-username",{data:e,...this.identity})}getTrayIconInfo(){return this.wire.sendAction("get-tray-icon-info",this.identity).then((({payload:e})=>e.data))}hasTrayIcon(){return this.wire.sendAction("has-tray-icon",this.identity).then((({payload:e})=>e.data))}terminate(){return this.wire.sendAction("terminate-application",this.identity).then((()=>{}))}wait(){return this.wire.sendAction("wait-for-hung-application",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction("get-info",this.identity).then((({payload:e})=>e.data))}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction("application-get-process-info",this.identity);return e}async setFileDownloadLocation(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t};await this.wire.sendAction("set-file-download-location",{...n,downloadLocation:e})}async getFileDownloadLocation(){const{payload:{data:e}}=await this.wire.sendAction("get-file-download-location",this.identity);return e}async showTrayIconPopupMenu(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t},{payload:i}=await this.wire.sendAction("show-tray-icon-popup-menu",{...n,options:e});return i.data}async closeTrayIconPopupMenu(){const{name:e}=this.wire.me,t={uuid:this.identity.uuid,name:e};await this.wire.sendAction("close-tray-icon-popup-menu",{...t})}}return j.Application=i,j}function Z(){return q||(q=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(function(){if(K)return F;K=1,Object.defineProperty(F,"__esModule",{value:!0}),F.ApplicationModule=void 0;const e=d,t=O,n=Y();class i extends e.Base{async wrap(e){this.wire.sendAction("wrap-application").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}wrapSync(e){this.wire.sendAction("wrap-application-sync").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}async _create(e){return void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&void 0===e.isPlatformController&&(e.autoShow=!0),await this.wire.sendAction("create-application",e),this.wrap({uuid:e.uuid})}create(e){return console.warn("Deprecation Warning: fin.Application.create is deprecated. Please use fin.Application.start"),this.wire.sendAction("application-create").catch((e=>{})),this._create(e)}async start(e){this.wire.sendAction("start-application").catch((e=>{}));const t=await this._create(e);return await this.wire.sendAction("run-application",{uuid:e.uuid}),t}async startManyManifests(e,t){return this.wire.sendAction("run-applications",{applications:e,opts:t}).then((()=>{}))}getCurrent(){return this.wire.sendAction("get-current-application").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction("get-current-application-sync").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}async startFromManifest(e,t){this.wire.sendAction("application-start-from-manifest").catch((e=>{}));const n=await this._createFromManifest(e);return await n._run(t),n}createFromManifest(e){return console.warn("Deprecation Warning: fin.Application.createFromManifest is deprecated. Please use fin.Application.startFromManifest"),this.wire.sendAction("application-create-from-manifest").catch((e=>{})),this._createFromManifest(e)}_createFromManifest(e){return this.wire.sendAction("get-application-manifest",{manifestUrl:e}).then((({payload:e})=>{const t=e.data.platform?e.data.platform.uuid:e.data.startup_app.uuid;return this.wrap({uuid:t})})).then((t=>(t._manifestUrl=e,t)))}}return F.ApplicationModule=i,F}(),e),n(Y(),e)}(R)),R}H.WebContents=D;var Q={};Object.defineProperty(Q,"__esModule",{value:!0}),Q.promisifySubscription=void 0;var X,ee,te;function ne(){if(X)return S;X=1,Object.defineProperty(S,"__esModule",{value:!0}),S._Window=void 0;const e=Z(),t=H,n=J(),i=T,r=Q;class o extends t.WebContents{constructor(e,t){super(e,t,"window")}async createWindow(e){this.wire.sendAction("window-create-window",this.identity).catch((e=>{}));const t=await(0,r.promisifySubscription)(this,"fire-constructor-callback");void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&(e.autoShow=!0),(0,i.handleDeprecatedWarnings)(e);const n=this.wire.environment.createChildContent({entityType:"window",options:e}),[o]=await Promise.all([t.getValue(),n]);let s;const{success:a}=o,c=o.data,{message:d}=c;s=a?{httpResponseCode:c.httpResponseCode,apiInjected:c.apiInjected}:{message:c.message,networkErrorCode:c.networkErrorCode,stack:c.stack};const h={message:d,cbPayload:s,success:a};try{this.getWebWindow().fin.__internal_.openerSuccessCBCalled()}catch(e){}return h.success?this:Promise.reject(h)}getAllFrames(){return this.wire.sendAction("get-all-frames",this.identity).then((({payload:e})=>e.data))}getBounds(){return this.wire.sendAction("get-window-bounds",this.identity).then((({payload:e})=>e.data))}center(){return this.wire.sendAction("center-window",this.identity).then((()=>{}))}blur(){return this.wire.sendAction("blur-window",this.identity).then((()=>{}))}bringToFront(){return this.wire.sendAction("bring-window-to-front",this.identity).then((()=>{}))}animate(e,t){return this.wire.sendAction("animate-window",{transitions:e,options:t,...this.identity}).then((()=>{}))}hide(){return this.wire.sendAction("hide-window",this.identity).then((()=>{}))}close(e=!1){return this.wire.sendAction("close-window",{force:e,...this.identity}).then((()=>{Object.setPrototypeOf(this,null)}))}focusedWebViewWasChanged(){return this.wire.sendAction("focused-webview-changed",this.identity).then((()=>{}))}getNativeId(){return this.wire.sendAction("get-window-native-id",this.identity).then((({payload:e})=>e.data))}async getCurrentViews(){const{payload:e}=await this.wire.sendAction("window-get-views",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}disableFrame(){return console.warn("Function is deprecated; use disableUserMovement instead."),this.wire.sendAction("disable-window-frame",this.identity).then((()=>{}))}disableUserMovement(){return this.wire.sendAction("disable-window-frame",this.identity).then((()=>{}))}enableFrame(){return console.warn("Function is deprecated; use enableUserMovement instead."),this.wire.sendAction("enable-window-frame",this.identity).then((()=>{}))}enableUserMovement(){return this.wire.sendAction("enable-window-frame",this.identity).then((()=>{}))}flash(){return this.wire.sendAction("flash-window",this.identity).then((()=>{}))}stopFlashing(){return this.wire.sendAction("stop-flash-window",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction("get-window-info",this.identity).then((({payload:e})=>e.data))}async getLayout(e){this.wire.sendAction("window-get-layout",this.identity).catch((e=>{}));const t=await this.getOptions();if(!t.layout&&!t.layoutSnapshot)throw new Error("Window does not have a Layout");return this.fin.Platform.Layout.wrap(e??this.identity)}getOptions(){return this.wire.sendAction("get-window-options",this.identity).then((({payload:e})=>e.data))}getParentApplication(){return this.wire.sendAction("window-get-parent-application",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity))}getParentWindow(){return this.wire.sendAction("window-get-parent-window",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity)).then((e=>e.getWindow()))}async getSnapshot(e){const t={area:e,...this.identity};console.warn("Window.getSnapshot has been deprecated, please use Window.capturePage");return(await this.wire.sendAction("get-window-snapshot",t)).payload.data}getState(){return this.wire.sendAction("get-window-state",this.identity).then((({payload:e})=>e.data))}getWebWindow(){return this.wire.sendAction("window-get-web-window",this.identity).catch((e=>{})),this.wire.environment.getWebWindow(this.identity)}isMainWindow(){return this.wire.sendAction("window-is-main-window",this.identity).catch((e=>{})),this.me.uuid===this.me.name}isShowing(){return this.wire.sendAction("is-window-showing",this.identity).then((({payload:e})=>e.data))}maximize(){return this.wire.sendAction("maximize-window",this.identity).then((()=>{}))}minimize(){return this.wire.sendAction("minimize-window",this.identity).then((()=>{}))}moveBy(e,t,n){return this.wire.sendAction("move-window-by",{deltaLeft:e,deltaTop:t,positioningOptions:n,...this.identity}).then((()=>{}))}moveTo(e,t,n){return this.wire.sendAction("move-window",{left:e,top:t,positioningOptions:n,...this.identity}).then((()=>{}))}resizeBy(e,t,n,i){return this.wire.sendAction("resize-window-by",{deltaWidth:Math.floor(e),deltaHeight:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}resizeTo(e,t,n,i){return this.wire.sendAction("resize-window",{width:Math.floor(e),height:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}restore(){return this.wire.sendAction("restore-window",this.identity).then((()=>{}))}setAsForeground(){return this.wire.sendAction("set-foreground-window",this.identity).then((()=>{}))}setBounds(e,t){return this.wire.sendAction("set-window-bounds",{...e,...this.identity,positioningOptions:t}).then((()=>{}))}show(e=!1){return this.wire.sendAction("show-window",{force:e,...this.identity}).then((()=>{}))}showAt(e,t,n=!1){return this.wire.sendAction("show-at-window",{force:n,left:Math.floor(e),top:Math.floor(t),...this.identity}).then((()=>{}))}updateOptions(e){return this.wire.sendAction("update-window-options",{options:e,...this.identity}).then((()=>{}))}authenticate(e,t){return this.wire.sendAction("window-authenticate",{userName:e,password:t,...this.identity}).then((()=>{}))}async showPopupMenu(e){const{payload:t}=await this.wire.sendAction("show-popup-menu",{options:e,...this.identity});return t.data}async closePopupMenu(){return this.wire.sendAction("close-popup-menu",{...this.identity}).then((()=>{}))}async dispatchPopupResult(e){this.wire.sendAction("window-dispatch-popup-result",this.identity).catch((e=>{})),await this.wire.sendAction("dispatch-popup-result",{data:e,...this.identity})}async print(e={content:"self"}){switch(e.content){case void 0:case"self":return super.print(e);case"screenshot":return this.wire.sendAction("print-screenshot",this.identity).then((()=>{}));case"views":return this.wire.sendAction("print-views",{...this.identity,options:e}).then((()=>{}));default:return}}}return S._Window=o,S}function ie(){return te||(te=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(function(){if(ee)return _;ee=1,Object.defineProperty(_,"__esModule",{value:!0}),_._WindowModule=void 0;const e=d,t=O,n=ne();class i extends e.Base{async wrap(e){this.wire.sendAction("window-wrap").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}wrapSync(e){this.wire.sendAction("window-wrap-sync").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}create(e){return this.wire.sendAction("create-window").catch((e=>{})),new n._Window(this.wire,{uuid:this.me.uuid,name:e.name}).createWindow(e)}getCurrent(){if(this.wire.sendAction("get-current-window").catch((e=>{})),!this.wire.me.isWindow)throw new Error("You are not in a Window context");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction("get-current-window-sync").catch((e=>{})),!this.wire.me.isWindow)throw new Error("You are not in a Window context");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return _._WindowModule=i,_}(),e),n(ne(),e)}(M)),M}Q.promisifySubscription=async(e,t,n=(()=>!0),i)=>{let r,o,s;const a=new Promise(((e,t)=>{r=e,o=t})),c=e=>{n(e)&&(clearTimeout(s),r(e))};return await e.on(t,c),i&&(s=setTimeout((()=>o(new Error("event timed out"))),i)),a.finally((()=>{e.removeListener(t,c).catch((()=>null))})),{getValue:()=>a}},Object.defineProperty(c,"__esModule",{value:!0}),c.System=void 0;const re=d,oe=g,se=ie(),ae=t;class ce extends re.EmitterBase{constructor(e){super(e,"system")}sendExternalProcessRequest(e,t){return new Promise(((n,i)=>{const r="external-process-exited";let o,s,a,c;"function"==typeof t.listener&&(a=e=>{const n=e||{};s={topic:"exited",uuid:n.processUuid||"",exitCode:n.exitCode||0},o===e.processUuid&&(t.listener(s),c.removeListener(r,a))},this.wire.me.name||(this.wire.me.name=this.wire.me.uuid),c=new se._Window(this.wire,this.wire.me),c.on(r,a)),this.wire.sendAction(e,t).then((({payload:e})=>{o=e.data.uuid,n(e.data),s&&o===s.uuid&&(t.listener(s),c.removeListener(r,a))})).catch((e=>{c&&c.removeListener(r,a),i(e)}))}))}getVersion(){return this.wire.sendAction("get-version").then((({payload:e})=>e.data))}clearCache(e){return this.wire.sendAction("clear-cache",e).then((()=>{}))}deleteCacheOnExit(){return this.wire.sendAction("delete-cache-request").then((()=>{}))}exit(){return this.wire.sendAction("exit-desktop").then((()=>{}))}async fetchManifest(e){const{payload:{data:t}}=await this.wire.sendAction("fetch-manifest",{manifestUrl:e});return t}flushCookieStore(){return this.wire.sendAction("flush-cookie-store").then((()=>{}))}getAllWindows(){return this.wire.sendAction("get-all-windows").then((({payload:e})=>e.data))}getAllApplications(){return this.wire.sendAction("get-all-applications").then((({payload:e})=>e.data))}getCommandLineArguments(){return this.wire.sendAction("get-command-line-arguments").then((({payload:e})=>e.data))}async getCrashReporterState(){const{payload:{data:{diagnosticMode:e,isRunning:t}}}=await this.wire.sendAction("get-crash-reporter-state");return console.warn("diagnosticMode property is deprecated. It will be removed in a future version"),{diagnosticMode:e,diagnosticsMode:e,isRunning:t}}async startCrashReporter(e){const t=e,n={...t,diagnosticMode:t.diagnosticsMode||t.diagnosticMode},{payload:{data:{diagnosticMode:i,isRunning:r}}}=await this.wire.sendAction("start-crash-reporter",n);return{diagnosticMode:i,diagnosticsMode:i,isRunning:r}}getUniqueUserId(){return this.wire.sendAction("get-unique-user-id").then((({payload:e})=>e.data))}getEntityInfo(e,t){return this.wire.sendAction("get-entity-info",{uuid:e,name:t}).then((({payload:e})=>e.data))}getEnvironmentVariable(e){return this.wire.sendAction("get-environment-variable",{environmentVariables:e}).then((({payload:e})=>e.data))}getFocusedWindow(){return this.wire.sendAction("get-focused-window").then((({payload:e})=>e.data))}async isAppCertified(e){const{payload:{data:{certifiedInfo:t}}}=await this.wire.sendAction("is-app-certified",{manifestUrl:e});return t}getInstalledRuntimes(){return this.wire.sendAction("get-installed-runtimes").then((({payload:e})=>e.data.runtimes))}async getInstalledApps(){const{payload:{data:{installedApps:e}}}=await this.wire.sendAction("get-installed-apps");return e}getLog(e){return this.wire.sendAction("view-log",e).then((({payload:e})=>e.data))}getMachineId(){return this.wire.sendAction("get-machine-id").then((({payload:e})=>e.data))}getMinLogLevel(){return this.wire.sendAction("get-min-log-level").then((({payload:e})=>e.data))}getLogList(){return this.wire.sendAction("list-logs").then((({payload:e})=>e.data))}getMonitorInfo(){return this.wire.sendAction("get-monitor-info").then((({payload:e})=>e.data))}getMousePosition(){return this.wire.sendAction("get-mouse-position").then((({payload:e})=>e.data))}getProcessList(){return console.warn("System.getProcessList has been deprecated. Please consider using our new process APIs: Window.getProcessInfo, View.getProcessInfo, Application.getProcessInfo, System.getAllProcessInfo"),this.wire.sendAction("process-snapshot").then((({payload:e})=>e.data))}async getAllProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction("get-all-process-info",this.identity);return e}getProxySettings(){return this.wire.sendAction("get-proxy-settings").then((({payload:e})=>e.data))}getRuntimeInfo(){return this.wire.sendAction("get-runtime-info").then((({payload:e})=>e.data))}getRvmInfo(){return this.wire.sendAction("get-rvm-info").then((({payload:e})=>e.data))}getHostSpecs(){return this.wire.sendAction("get-host-specs").then((({payload:e})=>e.data))}getOSInfo(){return this.wire.sendAction("get-os-info").then((({payload:e})=>e.data))}launchExternalProcess(e){return this.sendExternalProcessRequest("launch-external-process",e)}monitorExternalProcess(e){return this.sendExternalProcessRequest("monitor-external-process",e)}log(e,t){return this.wire.sendAction("write-to-log",{level:e,message:t}).then((()=>{}))}openUrlWithBrowser(e){return this.wire.sendAction("open-url-with-browser",{url:e}).then((()=>{}))}async registerCustomProtocol(e){if("object"!=typeof e)throw new Error("Must provide an object with a `protocolName` property having a string value.");await this.wire.sendAction("register-custom-protocol",e)}async unregisterCustomProtocol(e){await this.wire.sendAction("unregister-custom-protocol",{protocolName:e})}async getCustomProtocolState(e){return this.wire.sendAction("get-custom-protocol-state",{protocolName:e}).then((({payload:e})=>e.data))}releaseExternalProcess(e){return this.wire.sendAction("release-external-process",{uuid:e}).then((()=>{}))}showDeveloperTools(e){return this.wire.sendAction("show-developer-tools",e).then((()=>{}))}terminateExternalProcess(e){return this.wire.sendAction("terminate-external-process",e).then((()=>{}))}updateProxySettings(e){return this.wire.sendAction("update-proxy",e).then((()=>{}))}async downloadAsset(e,t){const n=()=>{};let i=n,r=n;const o=new Promise(((e,t)=>{i=e,r=t}));if("openfin"!==this.wire.environment.type)throw new oe.NotSupportedError("downloadAsset only supported in an OpenFin Render process");const s=oe.RuntimeError.getCallSite(),a=this.wire.environment.getNextMessageId().toString(),c=`asset-download-progress-${a}`,d=`asset-download-error-${a}`,h=`asset-download-complete-${a}`,l=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},u=()=>{this.removeListener(c,l)};await Promise.all([this.on(c,l),this.once(d,(e=>{u();const{reason:t,err:n}=e;r(new oe.RuntimeError({reason:t,error:n},s))})),this.once(h,(()=>{u(),i()}))]);const p=Object.assign(e,{downloadId:a});return await this.wire.sendAction("download-asset",p).catch((e=>{throw u(),e})),o}downloadRuntime(e,t){const n=oe.RuntimeError.getCallSite();return new Promise(((i,r)=>{if("openfin"!==this.wire.environment.type)return void r(new oe.NotSupportedError("downloadRuntime only supported in an OpenFin Render process"));const o=this.wire.environment.getNextMessageId().toString(),s=`runtime-download-progress-${o}`,a=`runtime-download-error-${o}`,c=`runtime-download-complete-${o}`,d=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},h=()=>{this.removeListener(s,d)};this.on(s,d),this.once(a,(e=>{h();const{reason:t,err:i}=e;r(new oe.RuntimeError({reason:t,error:i},n))})),this.once(c,(()=>{h(),i()}));const l=Object.assign(e,{downloadId:o});this.wire.sendAction("download-runtime",l).catch((e=>{h(),r(e)}))}))}downloadPreloadScripts(e){return this.wire.sendAction("download-preload-scripts",{scripts:e}).then((({payload:e})=>e.data))}getAllExternalApplications(){return this.wire.sendAction("get-all-external-applications").then((({payload:e})=>e.data))}getAppAssetInfo(e){return this.wire.sendAction("get-app-asset-info",e).then((({payload:e})=>e.data))}getCookies(e){const t=this.wire.environment.getUrl(),n=Object.assign(e,{url:t});return this.wire.sendAction("get-cookies",n).then((({payload:e})=>e.data))}setMinLogLevel(e){return this.wire.sendAction("set-min-log-level",{level:e}).then((()=>{}))}resolveUuid(e){return this.wire.sendAction("resolve-uuid",{entityKey:e}).then((({payload:e})=>e.data))}executeOnRemote(e,t){return t.requestingIdentity=e,this.wire.ferryAction(t)}readRegistryValue(e,t,n){return this.wire.sendAction("read-registry-value",{rootKey:e,subkey:t,value:n}).then((({payload:e})=>e.data))}registerExternalConnection(e){return this.wire.sendAction("register-external-connection",{uuid:e}).then((({payload:e})=>e.data))}async getServiceConfiguration(e){if("string"!=typeof e.name)throw new Error("Must provide an object with a `name` property having a string value");const{name:t}=e;return this.wire.sendAction("get-service-configuration",{name:t}).then((({payload:e})=>e.data))}async getSystemAppConfig(e){if("string"!=typeof e)throw new Error("Must provide a string value for name of system app");return this.wire.sendAction("get-system-app-configuration",{name:e}).then((({payload:e})=>e.data))}async registerShutdownHandler(e){this.wire.sendAction("system-register-shutdown-handler").catch((e=>{}));const{uuid:t,name:n}=this.wire.me;this.on("system-shutdown",(i=>{e({proceed:()=>{this.wire.environment.raiseEvent("application/system-shutdown-handled",{uuid:t,name:n,topic:"application"})}})}))}runRvmHealthCheck(){return this.wire.sendAction("run-rvm-health-check").then((({payload:e})=>e.data))}async launchManifest(e,t={}){const{subscribe:n,...i}=t,r=i;if(n){const e=new ae.EventEmitter;n(e);const t="app-version-progress",i="runtime-status",o="app-version-complete",s="app-version-error",a=this.wire.environment.getNextMessageId().toString();r.appVersionId=a;const c=[o,t,i,s],d=e=>{const{appVersionId:t,topic:n,type:i,...r}=e;return{...r,type:c.find((e=>i.includes(e)))}},h=t=>{const n=d(t);e.emit(n.type,n)},l=()=>{this.removeListener(`${t}.${a}`,h),this.removeListener(`${i}.${a}`,h),this.removeListener(`${o}.${a}`,h),this.removeListener(`${s}.${a}`,h),this.removeListener(`${o}.${a}`,l),this.removeListener(`${s}.${a}`,l)};await Promise.all([this.on(`${t}.${a}`,h),this.on(`${i}.${a}`,h),this.once(`${o}.${a}`,h),this.once(`${s}.${a}`,h),this.once(`${o}.${a}`,l),this.once(`${s}.${a}`,l)])}return(await this.wire.sendAction("launch-manifest",{manifestUrl:e,opts:r})).payload.data.manifest}async queryPermissionForCurrentContext(e){const t={uuid:this.wire.me.uuid,name:this.wire.me.name};return(await this.wire.sendAction("query-permission-for-current-context",{apiName:e,identity:t})).payload.data}async enableNativeWindowIntegrationProvider(e){const{payload:t}=await this.wire.sendAction("enable-native-window-integration-provider",{permissions:e});return t.data}async registerUsage({data:e,type:t}){await this.wire.sendAction("register-usage",{data:e,type:t})}async getPrinters(){const{payload:e}=await this.wire.sendAction("system-get-printers");return e.data}async updateProcessLoggingOptions(e){await this.wire.sendAction("system-update-process-logging-options",{options:e})}async getDomainSettings(){const{payload:{data:e}}=await this.wire.sendAction("get-domain-settings",this.identity);return e}async setDomainSettings(e){await this.wire.sendAction("set-domain-settings",{domainSettings:e,...this.identity})}async refreshExtensions(){const{payload:e}=await this.wire.sendAction("refresh-extensions");return e.data}async getInstalledExtensions(){const{payload:e}=await this.wire.sendAction("get-installed-extensions");return e.data}}c.System=ce;var de={},he={};Object.defineProperty(he,"__esModule",{value:!0}),he.RefCounter=void 0;he.RefCounter=class{constructor(){this.topicRefMap=new Map}incRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t+1;n=i,this.topicRefMap.set(e,i)}else this.topicRefMap.set(e,1),n=1;return n}decRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t-1;this.topicRefMap.set(e,i),n=i}else n=-1;return n}actOnFirst(e,t,n){return 1===this.incRefCount(e)?t():n()}actOnLast(e,t,n){return 0===this.decRefCount(e)?t():n()}};var le={},ue={},pe={};Object.defineProperty(pe,"__esModule",{value:!0}),pe.ChannelBase=pe.ProtectedItems=void 0;const we=e=>async(t,n,i)=>{const r=await e(t,n,i);return void 0===r?n:r};pe.ProtectedItems=class{constructor(e,t){this.providerIdentity=e,this.close=t}};class ye{static defaultAction(e){throw new Error(`No action registered at target for ${e}`)}constructor(){this.subscriptions=new Map}async processAction(e,t,n){try{const i=this.subscriptions.has(e)?this.subscriptions.get(e):(t,n)=>(this.defaultAction??ye.defaultAction)(e,t,n),r=this.preAction?await this.preAction(e,t,n):t,o=await i(r,n);return this.postAction?await this.postAction(e,o,n):o}catch(t){if(this.errorMiddleware)return this.errorMiddleware(e,t,n);throw t}}beforeAction(e){if(this.preAction)throw new Error("Already registered beforeAction middleware");this.preAction=we(e)}onError(e){if(this.errorMiddleware)throw new Error("Already registered error middleware");this.errorMiddleware=e}afterAction(e){if(this.postAction)throw new Error("Already registered afterAction middleware");this.postAction=we(e)}remove(e){this.subscriptions.delete(e)}setDefaultAction(e){if(this.defaultAction)throw new Error("default action can only be set once");this.defaultAction=e}register(e,t){if(this.subscriptions.has(e))throw new Error(`Subscription already registered for action: ${e}. Unsubscribe before adding new subscription`);return this.subscriptions.set(e,t),!0}}pe.ChannelBase=ye;var fe,ge,me,ve=s&&s.__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)},Ce=s&&s.__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};Object.defineProperty(ue,"__esModule",{value:!0}),ue.ChannelClient=void 0;const be=pe,Ie=new Map;class Ee extends be.ChannelBase{static closeChannelByEndpointId(e){const t=Ie.get(e);t&&ve(t,me,"f").call(t)}static handleProviderDisconnect(e){for(const t of Ie.values())t.providerIdentity.channelId===e.channelId&&(t.disconnectListener(e),ve(t,me,"f").call(t))}constructor(e,t,n){super(),fe.set(this,void 0),ge.set(this,void 0),this.processAction=(e,t,n)=>super.processAction(e,t,n),me.set(this,(()=>{Ie.delete(this.endpointId),ve(this,ge,"f").close()})),Ce(this,fe,new be.ProtectedItems(e,t),"f"),this.disconnectListener=()=>{},this.endpointId=e.endpointId,Ce(this,ge,n,"f"),Ie.set(this.endpointId,this),n.receive(this.processAction)}get providerIdentity(){return ve(this,fe,"f").providerIdentity}async dispatch(e,t){if(ve(this,ge,"f").isEndpointConnected(this.providerIdentity.channelId))return ve(this,ge,"f").send(this.providerIdentity.channelId,e,t);throw new Error("The client you are trying to dispatch from is disconnected from the target provider.")}onDisconnection(e){this.disconnectListener=t=>{try{e(t)}catch(e){throw new Error(`Error while calling the onDisconnection callback: ${e.message}`)}finally{this.disconnectListener=()=>{}}}}async disconnect(){await this.sendDisconnectAction(),ve(this,me,"f").call(this)}async sendDisconnectAction(){const e=ve(this,fe,"f");await e.close()}static async wireClose(e,t,n){const{channelName:i,uuid:r,name:o}=t;await e.sendAction("disconnect-from-channel",{channelName:i,uuid:r,name:o,endpointId:n})}}ue.ChannelClient=Ee,fe=new WeakMap,ge=new WeakMap,me=new WeakMap;var xe={},Ae={};Object.defineProperty(Ae,"__esModule",{value:!0}),Ae.exhaustiveCheck=void 0,Ae.exhaustiveCheck=function(e,t){throw new Error(`Unsupported value: ${e}${t?`\n Supported values are: ${t.join("")}`:""}`)};var Pe,Me,_e,Oe={},Se=s&&s.__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},Re=s&&s.__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)};Object.defineProperty(Oe,"__esModule",{value:!0}),Oe.ClassicInfo=Oe.ClassicStrategy=void 0;Oe.ClassicStrategy=class{constructor(e,t,n,i){this.messageReceiver=t,this.endpointId=n,this.providerIdentity=i,Pe.set(this,void 0),Me.set(this,new Map),_e.set(this,new Map),this.send=async(e,t,n)=>{const i=Re(this,Me,"f").get(e);if(!i)throw new Error(`Could not locate routing info for endpoint ${e}`);const r={...i};r.isLocalEndpointId&&delete r.endpointId,delete r.isLocalEndpointId;const o=Re(this,Pe,"f").sendAction("send-channel-message",{...r,providerIdentity:this.providerIdentity,action:t,payload:n});Re(this,_e,"f").get(e)?.add(o);return(await o.catch((e=>{throw new Error(e.message)})).finally((()=>{Re(this,_e,"f").get(e)?.delete(o)}))).payload.data.result},this.close=async()=>{this.messageReceiver.removeEndpoint(this.providerIdentity.channelId,this.endpointId),[...Re(this,Me,"f").keys()].forEach((e=>this.closeEndpoint(e))),Se(this,Me,new Map,"f")},Se(this,Pe,e,"f")}onEndpointDisconnect(e,t){}receive(e){this.messageReceiver.addEndpoint(e,this.providerIdentity.channelId,this.endpointId)}async closeEndpoint(e){const t=Re(this,Me,"f").get(e);Re(this,Me,"f").delete(e);const n=Re(this,_e,"f").get(e);n?.forEach((n=>{const i=`Channel connection with identity uuid: ${t?.uuid} / name: ${t?.name} / endpointId: ${e} no longer connected.`;n.cancel(new Error(i))}))}isEndpointConnected(e){return Re(this,Me,"f").has(e)}addEndpoint(e,t){Re(this,Me,"f").set(e,t.endpointIdentity),Re(this,_e,"f").set(e,new Set)}isValidEndpointPayload(e){return"string"==typeof e?.endpointIdentity?.endpointId||"string"==typeof e?.endpointIdentity?.channelId}},Pe=new WeakMap,Me=new WeakMap,_e=new WeakMap,Oe.ClassicInfo={version:5,minimumVersion:0,type:"classic"};var Fe={},je={},ke={};Object.defineProperty(ke,"__esModule",{value:!0}),ke.errorToPOJO=void 0,ke.errorToPOJO=function(e){return{stack:e.stack,name:e.name,message:e.message,toString:()=>e.stack||e.toString()}};var Le,Te,$e=s&&s.__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)},Be=s&&s.__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};Object.defineProperty(je,"__esModule",{value:!0}),je.RTCEndpoint=void 0;const Ge=ke;je.RTCEndpoint=class{static isValidEndpointPayload(e){const t=e=>"object"==typeof e&&null!==e;return t(e)&&t(e.endpointIdentity)&&t(e.rtc)&&"string"==typeof e.endpointIdentity.endpointId}constructor({rtc:e,endpointIdentity:t}){this.responseMap=new Map,Le.set(this,null),Te.set(this,void 0),this.connectionStateChangeHandler=e=>{"connected"!==this.rtc.rtcClient.connectionState&&(this.rtc.rtcClient.removeEventListener("connectionstatechange",this.connectionStateChangeHandler),this.close(),$e(this,Te,"f")&&$e(this,Te,"f").call(this))},this.send=async(e,t)=>{const n=`message-${Math.random()}`,i=new Promise(((e,t)=>{this.responseMap.set(n,{resolve:e,reject:t})}));return this.rtc.channels.request.send(JSON.stringify({action:e,payload:t,messageId:n})),i},this.close=()=>{this.responseMap.forEach((e=>e.reject("Connection has closed."))),this.responseMap=new Map,this.rtc.channels.request.close(),this.rtc.channels.response.close(),this.rtc.rtcClient.close()},this.rtc=e,this.endpointIdentity=t,this.rtc.channels.response.addEventListener("message",(e=>{let{data:t}=e;e.data instanceof ArrayBuffer&&(t=(new TextDecoder).decode(e.data));const{messageId:n,payload:i,success:r,error:o}=JSON.parse(t),{resolve:s,reject:a}=this.responseMap.get(n)??{};s&&a?(this.responseMap.delete(n),r?s(i):a(o)):(console.log("Could not find id in responseMap."),console.log(e))})),this.rtc.channels.request.addEventListener("message",(async e=>{let{data:n}=e;e.data instanceof ArrayBuffer&&(n=(new TextDecoder).decode(e.data));const{messageId:i,action:r,payload:o}=JSON.parse(n);if($e(this,Le,"f"))try{const e=await $e(this,Le,"f").call(this,r,o,t);this.rtc.channels.response.send(JSON.stringify({messageId:i,payload:e,success:!0}))}catch(e){"open"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,error:(0,Ge.errorToPOJO)(e),success:!1}))}else"open"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,success:!1,error:"Connection not ready."}))})),this.rtc.rtcClient.addEventListener("connectionstatechange",this.connectionStateChangeHandler),Object.values(this.rtc.channels).forEach((e=>{e.onclose=e=>{[...this.responseMap.values()].forEach((e=>e.reject(new Error("RTCDataChannel closed unexpectedly, this is most commonly caused by message size. Note: RTC Channels have a message size limit of ~255kB.")))),this.close(),$e(this,Te,"f")&&$e(this,Te,"f").call(this)}}))}onDisconnect(e){if($e(this,Te,"f"))throw new Error("RTCEndpoint disconnectListener cannot be set twice.");Be(this,Te,e,"f")}receive(e){if($e(this,Le,"f"))throw new Error("You have already set a listener for this RTC Endpoint.");Be(this,Le,e,"f")}get connected(){return"connected"===this.rtc.rtcClient.connectionState}},Le=new WeakMap,Te=new WeakMap;var We,He,Ne,De={},Ue=s&&s.__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)},Ve=s&&s.__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};Object.defineProperty(De,"__esModule",{value:!0}),De.EndpointStrategy=void 0;De.EndpointStrategy=class{constructor(e,t,n){this.EndpointType=e,this.StrategyName=n,We.set(this,null),He.set(this,new Map),Ne.set(this,!0),this.send=async(e,t,n)=>this.getEndpointById(e).send(t,n),this.close=async()=>{Ue(this,Ne,"f")&&(Ue(this,He,"f").forEach((e=>e.close())),Ve(this,He,new Map,"f")),Ve(this,Ne,!1,"f")},this.isValidEndpointPayload=t}onEndpointDisconnect(e,t){this.getEndpointById(e).onDisconnect(t)}receive(e){if(Ue(this,We,"f"))throw new Error(`You have already set a listener for this ${this.StrategyName} Strategy`);Ve(this,We,e,"f"),Ue(this,He,"f").forEach((e=>e.receive(Ue(this,We,"f"))))}getEndpointById(e){const t=Ue(this,He,"f").get(e);if(!t)throw new Error(`Client with endpoint id ${e} is not connected`);return t}get connected(){return Ue(this,Ne,"f")}isEndpointConnected(e){return Ue(this,He,"f").has(e)}addEndpoint(e,t){if(!Ue(this,Ne,"f"))return void console.warn(`Adding endpoint to disconnected ${this.StrategyName} Strategy`);const n=new this.EndpointType(t);Ue(this,We,"f")&&n.receive(Ue(this,We,"f")),Ue(this,He,"f").set(e,n)}async closeEndpoint(e){Ue(this,He,"f").delete(e)}},We=new WeakMap,He=new WeakMap,Ne=new WeakMap,Object.defineProperty(Fe,"__esModule",{value:!0}),Fe.RTCInfo=Fe.RTCStrategy=void 0;const ze=je,Ke=De;class qe extends Ke.EndpointStrategy{constructor(){super(ze.RTCEndpoint,ze.RTCEndpoint.isValidEndpointPayload,"RTC")}}Fe.RTCStrategy=qe,Fe.RTCInfo={version:2,minimumVersion:0,type:"rtc"};var Je={};Object.defineProperty(Je,"__esModule",{value:!0}),Je.RTCICEManager=void 0;const Ye=d;class Ze extends Ye.EmitterBase{constructor(e){super(e,"channel"),this.ensureChannelOpened=e=>new Promise(((t,n)=>{if("open"===e.readyState)t();else if("connecting"===e.readyState){const n=()=>{e.removeEventListener("open",n),t()};e.addEventListener("open",n)}else n(new Error("This Channel has already closed"))}))}static createDataChannelPromise(e,t){let n;const i=new Promise((e=>{n=e})),r=i=>{const o=()=>{i.channel.removeEventListener("open",o),n(i.channel)};i.channel.label===e&&(i.channel.addEventListener("open",o),t.removeEventListener("datachannel",r))};return t.addEventListener("datachannel",r),i}async listenForProviderIce(e,t){await this.on(this.createProviderEventName(e),t,{timestamp:Date.now()})}async raiseProviderIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createProviderEventName(e)),t)}async listenForClientIce(e,t){await this.on(this.createClientEventName(e),t,{timestamp:Date.now()})}async raiseClientIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createClientEventName(e)),t)}cleanupIceListeners(e){this.removeAllListeners(this.createClientEventName(e)),this.removeAllListeners(this.createProviderEventName(e))}createClientEventName(e){return`ice-client-${e}`}createProviderEventName(e){return`ice-provider-${e}`}createRouteString(e){return`channel/${e}`}createRtcPeer(){return this.wire.environment.getRtcPeer()}async startClientOffer(){const e=Math.random().toString(),t=this.createRtcPeer();t.addEventListener("icecandidate",(async t=>{t.candidate&&await this.raiseClientIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForProviderIce(e,(async e=>{await t.addIceCandidate(e.candidate)}));const n={request:t.createDataChannel("request"),response:t.createDataChannel("response")},i=await t.createOffer();await t.setLocalDescription(i);const r=Promise.all([n.request,n.response].map(this.ensureChannelOpened)).then((()=>{}));return{rtcClient:t,channels:n,offer:i,rtcConnectionId:e,channelsOpened:r}}async finishClientOffer(e,t,n){return await e.setRemoteDescription(t),await n,!0}async createProviderAnswer(e,t){const n=this.createRtcPeer(),i=Ze.createDataChannelPromise("request",n),r=Ze.createDataChannelPromise("response",n);n.addEventListener("icecandidate",(async t=>{t.candidate&&await this.raiseProviderIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForClientIce(e,(async e=>{await n.addIceCandidate(e.candidate)})),await n.setRemoteDescription(t);const o=await n.createAnswer();await n.setLocalDescription(o);const s=Promise.all([i,r]).then((([t,n])=>(this.cleanupIceListeners(e),{request:t,response:n})));return{rtcClient:n,answer:o,channels:s}}}Je.RTCICEManager=Ze;var Qe={},Xe={};function et(e){return[...e.split(".").reverse().entries()].reduce(((e,[t,n])=>e+ +n*1e4**t),0)}function tt(e,t){return et(e)>=et(t)}function nt(e){return e.split("/")[0]}Object.defineProperty(Xe,"__esModule",{value:!0}),Xe.runtimeUuidMeetsMinimumRuntimeVersion=Xe.parseRuntimeUuid=Xe.meetsMinimumRuntimeVersion=void 0,Xe.meetsMinimumRuntimeVersion=tt,Xe.parseRuntimeUuid=nt,Xe.runtimeUuidMeetsMinimumRuntimeVersion=function(e,t){return tt(nt(e),t)};var it,rt,ot,st,at,ct=s&&s.__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)},dt=s&&s.__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};Object.defineProperty(Qe,"__esModule",{value:!0}),Qe.ChannelProvider=void 0;const ht=pe,lt=Xe;class ut extends ht.ChannelBase{get connections(){return[...ct(this,it,"f")]}static handleClientDisconnection(e,t){const n=e.connections.find((e=>e.endpointId===t.endpointId));if(n)ct(e,st,"f").call(e,n);else{e.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name)).forEach(ct(e,st,"f"))}e.disconnectListener(t)}static setProviderRemoval(e,t){ut.removalMap.set(e,t)}constructor(e,t,n){super(),it.set(this,void 0),rt.set(this,void 0),ot.set(this,void 0),st.set(this,(e=>{const t=this.connections.filter((t=>t.endpointId!==e.endpointId));ct(this,ot,"f").closeEndpoint(e.endpointId),dt(this,it,t,"f")})),this.processAction=async(e,t,n)=>(ut.clientIsMultiRuntime(n)&&!(0,lt.runtimeUuidMeetsMinimumRuntimeVersion)(n.runtimeUuid,"18.87.56.0")?this.handleMultiRuntimeLegacyClient(n):this.checkForClientConnection(n),super.processAction(e,t,n)),at.set(this,(()=>{ct(this,ot,"f").close();const e=ut.removalMap.get(this);e&&e()})),dt(this,rt,new ht.ProtectedItems(e,t),"f"),this.connectListener=()=>{},this.disconnectListener=()=>{},dt(this,it,[],"f"),dt(this,ot,n,"f"),n.receive(this.processAction)}dispatch(e,t,n){const i=e.endpointId??this.getEndpointIdForOpenFinId(e,t);return i&&ct(this,ot,"f").isEndpointConnected(i)?ct(this,ot,"f").send(i,t,n):Promise.reject(new Error(`Client connection with identity uuid: ${e.uuid} / name: ${e.name} / endpointId: ${i} no longer connected.`))}async processConnection(e,t){return ct(this,it,"f").push(e),this.connectListener(e,t)}publish(e,t){return this.connections.map((n=>ct(this,ot,"f").send(n.endpointId,e,t)))}onConnection(e){this.connectListener=e}onDisconnection(e){this.disconnectListener=e}async destroy(){const e=ct(this,rt,"f");e.providerIdentity,dt(this,it,[],"f"),await e.close(),ct(this,at,"f").call(this)}async getAllClientInfo(){return this.connections.map((e=>{const{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}=e;return{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}}))}checkForClientConnection(e){if(!this.isClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider.\n Client Identity: {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}isClientConnected(e){return ut.clientIdentityIncludesEndpointId(e)?this.connections.some((t=>t.endpointId===e.endpointId&&t.uuid===e.uuid&&t.name===e.name)):this.isLegacyClientConnected(e)}isLegacyClientConnected(e){return this.connections.some((t=>t.uuid===e.uuid&&t.name===e.name))}handleMultiRuntimeLegacyClient(e){if(!this.isLegacyClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider. Client Identity:\n {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}getEndpointIdForOpenFinId(e,t){const n=this.connections.filter((t=>t.name===e.name&&t.uuid===e.uuid));if(n.length>=2){const n=ct(this,rt,"f"),{uuid:i,name:r}=e,o=n?.providerIdentity.uuid,s=n?.providerIdentity.name;console.warn(`WARNING: Dispatch call may have unintended results. The "to" argument of your dispatch call is missing the\n "endpointId" parameter. The identity you are dispatching to ({uuid: ${i}, name: ${r}})\n has multiple channelClients for this channel. Your dispatched action: (${t}) from the provider:\n ({uuid: ${o}, name: ${s}}) will only be processed by the most recently-created client.`)}return n.pop()?.endpointId}static clientIdentityIncludesEndpointId(e){return void 0!==e.endpointId}static clientIsMultiRuntime(e){return void 0!==e.runtimeUuid}static async wireClose(e,t){await e.sendAction("destroy-channel",{channelName:t})}}Qe.ChannelProvider=ut,it=new WeakMap,rt=new WeakMap,ot=new WeakMap,st=new WeakMap,at=new WeakMap,ut.removalMap=new WeakMap;var pt={};Object.defineProperty(pt,"__esModule",{value:!0}),pt.MessageReceiver=void 0;const wt=ue,yt=d;class ft extends yt.Base{constructor(e){super(e),this.onmessage=e=>"process-channel-message"===e.action&&(this.processChannelMessage(e),!0),this.endpointMap=new Map,this.latestEndpointIdByChannelId=new Map,e.registerMessageHandler(this.onmessage.bind(this))}async processChannelMessage(e){const{senderIdentity:t,providerIdentity:n,action:i,ackToSender:r,payload:o,intendedTargetIdentity:s}=e.payload,a=s.channelId??s.endpointId??this.latestEndpointIdByChannelId.get(n.channelId),c=this.endpointMap.get(a);if(!c)return r.payload.success=!1,r.payload.reason=`Client connection with identity uuid: ${this.wire.me.uuid} / name: ${this.wire.me.name} / endpointId: ${a} no longer connected.`,this.wire.sendRaw(r);try{const e=await c(i,o,t);return r.payload.payload=r.payload.payload||{},r.payload.payload.result=e,this.wire.sendRaw(r)}catch(e){return r.payload.success=!1,r.payload.reason=e.message,this.wire.sendRaw(r)}}addEndpoint(e,t,n){this.endpointMap.set(n,e),t!==n&&this.latestEndpointIdByChannelId.set(t,n)}removeEndpoint(e,t){this.endpointMap.delete(t),this.latestEndpointIdByChannelId.get(e)===t&&this.latestEndpointIdByChannelId.delete(e)}checkForPreviousClientConnection(e){const t=this.latestEndpointIdByChannelId.get(e);t&&(wt.ChannelClient.closeChannelByEndpointId(t),console.warn("You have created a second connection to an older provider. First connection has been removed from the clientMap"),console.warn("If the provider calls publish(), you may receive multiple messages."))}}pt.MessageReceiver=ft;var gt={};Object.defineProperty(gt,"__esModule",{value:!0}),gt.ProtocolManager=void 0;gt.ProtocolManager=class{constructor(e){this.ProtocolsInPreferenceOrder=e,this.DefaultClientProtocols=["classic"],this.DefaultProviderProtocols=["classic"],this.getClientProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultClientProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(", ")}.`);return t},this.getProviderProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultProviderProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(", ")}.`);return t},this.getCompatibleProtocols=(e,t)=>t.supportedProtocols.filter((t=>e.some((e=>e.type===t.type&&t.version>=e.minimumVersion&&e.version>=(t.minimumVersion??0))))).slice(0,t.maxProtocols)}};var mt={};Object.defineProperty(mt,"__esModule",{value:!0});class vt{static combine(e,t){return new vt(e,t)}constructor(e,t){this.primary=e,this.secondary=t}onEndpointDisconnect(e,t){this.primary.onEndpointDisconnect(e,(()=>{this.secondary.isEndpointConnected(e)||t()})),this.secondary.onEndpointDisconnect(e,(()=>{this.primary.isEndpointConnected(e)||t()}))}isValidEndpointPayload(e){return this.primary.isValidEndpointPayload(e)||this.secondary.isValidEndpointPayload(e)}async closeEndpoint(e){await this.primary.closeEndpoint(e),await this.secondary.closeEndpoint(e)}isEndpointConnected(e){return this.primary.isEndpointConnected(e)||this.secondary.isEndpointConnected(e)}async addEndpoint(e,t){this.primary.isValidEndpointPayload(t)&&await this.primary.addEndpoint(e,t),this.secondary.isValidEndpointPayload(t)&&await this.secondary.addEndpoint(e,t)}receive(e){this.primary.receive(e),this.secondary.receive(e)}send(e,t,n){return this.primary.isEndpointConnected(e)?this.primary.send(e,t,n):this.secondary.send(e,t,n)}async close(){await Promise.all([this.primary.close(),this.secondary.close()])}}mt.default=vt;var Ct,bt,It=s&&s.__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},Et=s&&s.__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)},xt=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(xe,"__esModule",{value:!0}),xe.ConnectionManager=void 0;const At=Ae,Pt=d,Mt=Oe,_t=Fe,Ot=Je,St=Qe,Rt=pt,Ft=gt,jt=xt(mt);class kt extends Pt.Base{static getProtocolOptionsFromStrings(e){return e.map((e=>{switch(e){case"rtc":return _t.RTCInfo;case"classic":return Mt.ClassicInfo;default:return(0,At.exhaustiveCheck)(e,["rtc","classic"])}}))}constructor(e){super(e),Ct.set(this,void 0),bt.set(this,void 0),this.removeChannelFromProviderMap=e=>{this.providerMap.delete(e)},this.onmessage=e=>"process-channel-connection"===e.action&&(this.processChannelConnection(e),!0),this.providerMap=new Map,this.protocolManager=new Ft.ProtocolManager("node"===this.wire.environment.type?["classic"]:["rtc","classic"]),It(this,Ct,new Rt.MessageReceiver(e),"f"),It(this,bt,new Ot.RTCICEManager(e),"f"),e.registerMessageHandler(this.onmessage.bind(this))}createProvider(e,t){const n=Object.assign(this.wire.environment.getDefaultChannelOptions().create,e||{}),i=this.protocolManager.getProviderProtocols(n?.protocols),r=i.map((e=>{switch(e){case"rtc":return new _t.RTCStrategy;case"classic":return new Mt.ClassicStrategy(this.wire,Et(this,Ct,"f"),t.channelId,t);default:return(0,At.exhaustiveCheck)(e,["rtc","classic"])}}));let o;if(2===r.length){const[e,t]=r;o=jt.default.combine(e,t)}else{if(1!==r.length)throw new Error("failed to combine strategies");[o]=r}const s=new St.ChannelProvider(t,(()=>St.ChannelProvider.wireClose(this.wire,t.channelName)),o),a=t.channelId;return this.providerMap.set(a,{provider:s,strategy:o,supportedProtocols:kt.getProtocolOptionsFromStrings(i)}),St.ChannelProvider.setProviderRemoval(s,this.removeChannelFromProviderMap.bind(this)),s}async createClientOffer(e){const t=this.protocolManager.getClientProtocols(e?.protocols);let n;return{offer:{supportedProtocols:await Promise.all(t.map((async e=>{switch(e){case"rtc":{const{rtcClient:e,channels:t,offer:i,rtcConnectionId:r,channelsOpened:o}=await Et(this,bt,"f").startClientOffer();return n={rtcClient:e,channels:t,channelsOpened:o},{type:"rtc",version:_t.RTCInfo.version,payload:{offer:i,rtcConnectionId:r}}}case"classic":return{type:"classic",version:Mt.ClassicInfo.version};default:return(0,At.exhaustiveCheck)(e,["rtc","classic"])}}))),maxProtocols:2},rtc:n}}async createClientStrategy(e,t){t.endpointId||(t.endpointId=this.wire.environment.getNextMessageId(),Et(this,Ct,"f").checkForPreviousClientConnection(t.channelId));const n=t.answer??{supportedProtocols:[{type:"classic",version:1}]},i=(await Promise.all(n.supportedProtocols.map((async n=>"rtc"===n.type&&e?(await Et(this,bt,"f").finishClientOffer(e.rtcClient,n.payload.answer,e.channelsOpened),new _t.RTCStrategy):"classic"===n.type?new Mt.ClassicStrategy(this.wire,Et(this,Ct,"f"),t.endpointId,t):null)))).filter((e=>null!==e));let r;if(e&&!i.some((e=>e instanceof _t.RTCStrategy))&&e&&e.rtcClient.close(),i.length>=2)r=jt.default.combine(i[0],i[1]);else{if(!i.length)throw new Error("No compatible protocols");[r]=i}const o={endpointIdentity:t,rtc:e};return r.addEndpoint(t.channelId,o),r}async processChannelConnection(e){const{clientIdentity:t,providerIdentity:n,ackToSender:i,payload:r,offer:o}=e.payload;t.endpointId?t.isLocalEndpointId=!1:(t.endpointId=this.wire.environment.getNextMessageId(),t.isLocalEndpointId=!0);const s=n.channelId,a=this.providerMap.get(s);if(!a)return i.payload.success=!1,i.payload.reason=`Channel "${n.channelName}" has been destroyed.`,this.wire.sendRaw(i);const{provider:c,strategy:d,supportedProtocols:h}=a;try{if(!(c instanceof St.ChannelProvider))throw Error("Cannot connect to a channel client");const e=o??{supportedProtocols:[{type:"classic",version:1}],maxProtocols:1},n=this.protocolManager.getCompatibleProtocols(h,e);if(!n.length)throw new Error("This provider does not support any of the offered protocols.");const s=await c.processConnection(t,r);i.payload.payload=i.payload.payload||{};let a={supportedProtocols:[],endpointPayloadPromise:Promise.resolve({endpointIdentity:t})};return a=await n.reduce((async(e,t)=>{const n=await e;if("rtc"===t.type){const{answer:e,rtcClient:i,channels:r}=await Et(this,bt,"f").createProviderAnswer(t.payload.rtcConnectionId,t.payload.offer);n.supportedProtocols.push({type:"rtc",version:_t.RTCInfo.version,payload:{answer:e}}),n.endpointPayloadPromise=n.endpointPayloadPromise.then((e=>r.then((t=>({...e,rtc:{rtcClient:i,channels:t}})))))}else n.supportedProtocols.push({type:"classic",version:Mt.ClassicInfo.version});return n}),Promise.resolve(a)),a.endpointPayloadPromise.then((e=>d.addEndpoint(t.endpointId,e))),i.payload.payload.result=s,i.payload.payload.answer=a,this.wire.sendRaw(i)}catch(e){return i.payload.success=!1,i.payload.reason=e.message,this.wire.sendRaw(i)}}}xe.ConnectionManager=kt,Ct=new WeakMap,bt=new WeakMap;var Lt,Tt,$t,Bt=s&&s.__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},Gt=s&&s.__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)};Object.defineProperty(le,"__esModule",{value:!0}),le.Channel=void 0;const Wt=t,Ht=G,Nt=d,Dt=ue,Ut=xe,Vt=Qe;function zt(e){const t=Math.floor(e/10),n=Math.min(3e4,500*2**t);return new Promise((e=>{setTimeout((()=>{e(!1)}),n)}))}class Kt extends Nt.EmitterBase{constructor(e){super(e,"channel"),Lt.set(this,void 0),Tt.set(this,new Wt.EventEmitter),$t.set(this,new Ht.AsyncRetryableLazy((async()=>{await Promise.all([this.on("disconnected",(e=>{Dt.ChannelClient.handleProviderDisconnect(e)})),this.on("connected",((...e)=>{Gt(this,Tt,"f").emit("connected",...e)}))]).catch((()=>new Error("error setting up channel connection listeners")))}))),Bt(this,Lt,new Ut.ConnectionManager(e),"f")}async getAllChannels(){return this.wire.sendAction("get-all-channels").then((({payload:e})=>e.data))}async onChannelConnect(e){await this.on("connected",e)}async onChannelDisconnect(e){await this.on("disconnected",e)}async safeConnect(e,t,n){const i={count:0};do{let r=()=>{};const o=new Promise((t=>{r=n=>{e===n.channelName&&t(!0)},Gt(this,Tt,"f").on("connected",r)}));try{if(i.count>0){i.gotConnectedEvent=await Promise.race([zt(i.count),o]);const t=await this.wire.sendAction("connect-to-channel",{...n,retryInfo:i});return console.log(`Successfully connected to channelName: ${e}`),t.payload.data}const t=this.wire.sendAction("connect-to-channel",n);i.originalMessageId=t.messageId;return(await t).payload.data}catch(n){if(!n.message.includes("internal-nack"))throw n;t&&0===i.count&&console.warn(`No channel found for channelName: ${e}. Waiting for connection...`)}finally{i.count+=1,Gt(this,Tt,"f").removeListener("connected",r)}}while(t);throw new Error(`No channel found for channelName: ${e}.`)}async connect(e,t={}){if(await Gt(this,$t,"f").getValue(),!e||"string"!=typeof e)throw new Error("Please provide a channelName string to connect to a channel.");const n={wait:!0,...this.wire.environment.getDefaultChannelOptions().connect,...t},{offer:i,rtc:r}=await Gt(this,Lt,"f").createClientOffer(n);let o;(this.fin.me.isFrame||this.fin.me.isView||this.fin.me.isWindow)&&(o=(await this.fin.me.getInfo()).url);const s={channelName:e,...n,offer:i,connectionUrl:o},a=await this.safeConnect(e,n.wait,s),c=await Gt(this,Lt,"f").createClientStrategy(r,a),d=new Dt.ChannelClient(a,(()=>Dt.ChannelClient.wireClose(this.wire,a,a.endpointId)),c);return c.onEndpointDisconnect(a.channelId,(async()=>{try{await d.sendDisconnectAction()}catch(e){console.warn(`Something went wrong during disconnect for client with uuid: ${a.uuid} / name: ${a.name} / endpointId: ${a.endpointId}.`)}finally{Dt.ChannelClient.handleProviderDisconnect(a)}})),d}async create(e,t){if(!e)throw new Error("Please provide a channelName to create a channel");const{payload:{data:n}}=await this.wire.sendAction("create-channel",{channelName:e}),i=Gt(this,Lt,"f").createProvider(t,n);return this.on("client-disconnected",(t=>{t.channelName===e&&Vt.ChannelProvider.handleClientDisconnection(i,t)})),i}}le.Channel=Kt,Lt=new WeakMap,Tt=new WeakMap,$t=new WeakMap,Object.defineProperty(de,"__esModule",{value:!0}),de.InterAppPayload=de.InterApplicationBus=void 0;const qt=t,Jt=d,Yt=he,Zt=le,Qt=O;class Xt extends Jt.Base{constructor(e){super(e),this.events={subscriberAdded:"subscriber-added",subscriberRemoved:"subscriber-removed"},this.refCounter=new Yt.RefCounter,this.Channel=new Zt.Channel(e),this.emitter=new qt.EventEmitter,e.registerMessageHandler(this.onmessage.bind(this)),this.on=this.emitter.on.bind(this.emitter),this.removeAllListeners=this.emitter.removeAllListeners.bind(this.emitter)}async publish(e,t){await this.wire.sendAction("publish-message",{topic:e,message:t,sourceWindowName:this.me.name})}async send(e,t,n){const i=(0,Qt.validateIdentity)(e);if(i)throw new Error(i);await this.wire.sendAction("send-message",{destinationUuid:e.uuid,destinationWindowName:e.name,topic:t,message:n,sourceWindowName:this.me.name})}subscribe(e,t,n){const i=this.createSubscriptionKey(e.uuid,e.name||"*",t);return this.emitter.on(i,n),this.refCounter.actOnFirst(i,(async()=>{await this.wire.sendAction("subscribe",{sourceUuid:e.uuid,sourceWindowName:e.name||"*",topic:t,destinationWindowName:this.me.name})}),(()=>Promise.resolve()))}unsubscribe(e,t,n){const i=e.name||"*",r=this.createSubscriptionKey(e.uuid,i,t);return this.emitter.removeListener(r,n),this.refCounter.actOnLast(r,(async()=>{await this.wire.sendAction("unsubscribe",{sourceUuid:e.uuid,sourceWindowName:i,topic:t,destinationWindowName:this.me.name})}),(()=>new Promise((e=>e)).then((()=>{}))))}processMessage(e){const{payload:{message:t,sourceWindowName:n,sourceUuid:i,topic:r}}=e,o=[this.createSubscriptionKey(i,n,r),this.createSubscriptionKey(i,"*",r),this.createSubscriptionKey("*","*",r)],s={uuid:i,name:n};o.forEach((e=>{this.emitter.emit(e,t,s)}))}emitSubscriverEvent(e,t){const{payload:{targetName:n,uuid:i,topic:r}}=t,o={name:n,uuid:i,topic:r};this.emitter.emit(e,o)}createSubscriptionKey(e,t,n){const i=t||"*";if(!(e&&i&&n))throw new Error("Missing uuid, name, or topic string");return function(...e){return e.map((e=>Buffer.from(`${e}`).toString("base64"))).join("/")}(e,i,n)}onmessage(e){const{action:t}=e;switch(t){case"process-message":this.processMessage(e);break;case this.events.subscriberAdded:this.emitSubscriverEvent(this.events.subscriberAdded,e);break;case this.events.subscriberRemoved:this.emitSubscriverEvent(this.events.subscriberRemoved,e)}return!0}}de.InterApplicationBus=Xt;de.InterAppPayload=class{};var en={};Object.defineProperty(en,"__esModule",{value:!0}),en.Clipboard=void 0;const tn=d;class nn extends tn.Base{async writeText(e){await this.wire.sendAction("clipboard-write-text",e)}async readText(e){const{payload:t}=await this.wire.sendAction("clipboard-read-text",{type:e});return t.data}async writeImage(e){await this.wire.sendAction("clipboard-write-image",e)}async readImage(e={format:"dataURL"}){const{payload:t}=await this.wire.sendAction("clipboard-read-image",e);return t.data}async writeHtml(e){await this.wire.sendAction("clipboard-write-html",e)}async readHtml(e){const{payload:t}=await this.wire.sendAction("clipboard-read-html",{type:e});return t.data}async writeRtf(e){await this.wire.sendAction("clipboard-write-rtf",e)}async readRtf(e){const{payload:t}=await this.wire.sendAction("clipboard-read-rtf",{type:e});return t.data}async write(e){await this.wire.sendAction("clipboard-write",e)}async getAvailableFormats(e){const{payload:t}=await this.wire.sendAction("clipboard-read-formats",{type:e});return t.data}}en.Clipboard=nn;var rn={},on={},sn={};Object.defineProperty(sn,"__esModule",{value:!0}),sn.ExternalApplication=void 0;const an=d;class cn extends an.EmitterBase{constructor(e,t){super(e,"external-application",t.uuid),this.identity=t}getInfo(){return this.wire.sendAction("get-external-application-info",this.identity).then((({payload:e})=>e.data))}}sn.ExternalApplication=cn,Object.defineProperty(on,"__esModule",{value:!0}),on.ExternalApplicationModule=void 0;const dn=d,hn=sn;class ln extends dn.Base{wrap(e){return this.wire.sendAction("external-application-wrap").catch((e=>{})),Promise.resolve(new hn.ExternalApplication(this.wire,{uuid:e}))}wrapSync(e){return this.wire.sendAction("external-application-wrap-sync").catch((e=>{})),new hn.ExternalApplication(this.wire,{uuid:e})}}on.ExternalApplicationModule=ln,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(on,e),n(sn,e)}(rn);var un={},pn={},wn={};Object.defineProperty(wn,"__esModule",{value:!0}),wn._Frame=void 0;const yn=d;class fn extends yn.EmitterBase{constructor(e,t){super(e,"frame",t.uuid,t.name),this.identity=t}getInfo(){return this.wire.sendAction("get-frame-info",this.identity).then((({payload:e})=>e.data))}getParentWindow(){return this.wire.sendAction("get-parent-window",this.identity).then((({payload:e})=>e.data))}}wn._Frame=fn,Object.defineProperty(pn,"__esModule",{value:!0}),pn._FrameModule=void 0;const gn=d,mn=O,vn=wn;class Cn extends gn.Base{async wrap(e){this.wire.sendAction("frame-wrap").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}wrapSync(e){this.wire.sendAction("frame-wrap-sync").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}getCurrent(){return this.wire.sendAction("frame-get-current").catch((e=>{})),Promise.resolve(new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity()))}getCurrentSync(){return this.wire.sendAction("frame-get-current-sync").catch((e=>{})),new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity())}}pn._FrameModule=Cn,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(pn,e),n(wn,e)}(un);var bn={};Object.defineProperty(bn,"__esModule",{value:!0}),bn.GlobalHotkey=void 0;const In=d;class En extends In.EmitterBase{constructor(e){super(e,"global-hotkey")}async register(e,t){await this.on(e,t),await this.wire.sendAction("global-hotkey-register",{hotkey:e})}async unregister(e){await this.removeAllListeners(e),await this.wire.sendAction("global-hotkey-unregister",{hotkey:e})}async unregisterAll(){await Promise.all(this.eventNames().filter((e=>!("registered"===e||"unregistered"===e))).map((e=>this.removeAllListeners(e)))),await this.wire.sendAction("global-hotkey-unregister-all",{})}async isRegistered(e){const{payload:{data:t}}=await this.wire.sendAction("global-hotkey-is-registered",{hotkey:e});return t}}bn.GlobalHotkey=En;var xn,An={},Pn={},Mn={},_n=s&&s.__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)};Object.defineProperty(Mn,"__esModule",{value:!0}),Mn.Platform=void 0;const On=d,Sn=O,Rn=new Map;class Fn extends On.EmitterBase{constructor(e,t){super(t.wire,"application",e.uuid),this.getClient=e=>{this.wire.sendAction("platform-get-client",this.identity).catch((e=>{}));const t=e||this.identity,{uuid:n}=t;if(!Rn.has(n)){const e=_n(this,xn,"f").call(this,n);Rn.set(n,e)}return Rn.get(n)},xn.set(this,(async e=>{try{const t=`custom-frame-${e}`,n=await this._channel.connect(t,{wait:!1});return n.onDisconnection((()=>{Rn.delete(e)})),n}catch(t){throw Rn.delete(e),new Error("The targeted Platform is not currently running. Listen for application-started event for the given Uuid.")}})),this.launchLegacyManifest=this.launchContentManifest;const n=(0,Sn.validateIdentity)(e);if(n)throw new Error(n);this._channel=t,this.identity={uuid:e.uuid},this.Layout=this.fin.Platform.Layout,this.Application=this.fin.Application.wrapSync(this.identity)}async createView(e,t,n){this.wire.sendAction("platform-create-view",this.identity).catch((e=>{}));const i=await this.getClient(),r=await i.dispatch("create-view",{target:t,opts:e,targetView:n});if(!r||(0,Sn.validateIdentity)(r.identity))throw new Error(`When overwriting the createView call, please return an object that has a valid 'identity' property: ${JSON.stringify(r)}`);return this.fin.View.wrapSync(r.identity)}async createWindow(e){this.wire.sendAction("platform-create-window",this.identity).catch((e=>{}));const t=await this.getClient();e.reason||(e.reason="api-call");const n=await t.dispatch("create-view-container",e);if(!n||(0,Sn.validateIdentity)(n.identity))throw new Error(`When overwriting the createWindow call, please return an object that has a valid 'identity' property: ${JSON.stringify(n)}`);const{identity:i}=n,r=this.fin.Window.wrapSync(i);return r.name=i.name,r.uuid=i.uuid,r}async quit(){this.wire.sendAction("platform-quit",this.identity).catch((e=>{}));return(await this.getClient()).dispatch("quit")}async closeView(e){this.wire.sendAction("platform-close-view",this.identity).catch((e=>{}));const t=await this.getClient();await t.dispatch("close-view",{view:e})}async reparentView(e,t){console.warn("Platform.reparentView has been deprecated, please use Platform.createView"),this.wire.sendAction("platform-reparent-view",this.identity).catch((e=>{}));const n={...e,uuid:e.uuid??this.identity.uuid},i=await this.fin.View.wrap(n),r=await i.getOptions();return this.createView(r,t)}async getSnapshot(){this.wire.sendAction("platform-get-snapshot",this.identity).catch((e=>{}));return(await this.getClient()).dispatch("get-snapshot")}async getViewSnapshot(e){return(await this.getClient()).dispatch("get-view-snapshot",{viewIdentity:e})}async applySnapshot(e,t){this.wire.sendAction("platform-apply-snapshot",this.identity).catch((e=>{}));const n="Requested snapshot must be a valid Snapshot object, or a url or filepath to such an object.";let i;if("string"==typeof e)try{i=(await this._channel.wire.sendAction("get-application-manifest",{manifestUrl:e})).payload.data}catch(e){throw new Error(`${n}: ${e}`)}else i=e;if(!i.windows)throw new Error(n);const r=await this.getClient();return await r.dispatch("apply-snapshot",{snapshot:i,options:t}),this}async fetchManifest(e){return(await this.getClient()).dispatch("platform-fetch-manifest",{manifestUrl:e})}async launchContentManifest(e){this.wire.sendAction("platform-launch-content-manifest",this.identity).catch((()=>{}));const t=await this.getClient(),n=await this.fetchManifest(e);return t.dispatch("launch-into-platform",{manifest:n,manifestUrl:e}),this}async setWindowContext(e={},t){if(this.wire.sendAction("platform-set-window-context",this.identity).catch((e=>{})),!e)throw new Error("Please provide a serializable object or string to set the context.");const n=await this.getClient(),{entityType:i}=t?await this.fin.System.getEntityInfo(t.uuid,t.name):this.fin.me;await n.dispatch("set-window-context",{context:e,entityType:i,target:t||{uuid:this.fin.me.uuid,name:this.fin.me.name}})}async getWindowContext(e){this.wire.sendAction("platform-get-window-context",this.identity).catch((e=>{}));const t=await this.getClient(),{entityType:n}=e?await this.fin.System.getEntityInfo(e.uuid,e.name):this.fin.me;return t.dispatch("get-window-context",{target:e||{uuid:this.fin.me.uuid,name:this.fin.me.name},entityType:n})}async closeWindow(e,t={skipBeforeUnload:!1}){this.wire.sendAction("platform-close-window",this.identity).catch((e=>{}));return(await this.getClient()).dispatch("close-window",{windowId:e,options:t})}}Mn.Platform=Fn,xn=new WeakMap;var jn={},kn={},Ln={},Tn={};function $n(e){switch(e){case"columns":case"grid":case"rows":case"tabs":return!0;default:return!1}}Object.defineProperty(Tn,"__esModule",{value:!0}),Tn.overrideFromComposables=Tn.isValidPresetType=void 0,Tn.isValidPresetType=$n,Tn.overrideFromComposables=function(...e){return t=>e.reduceRight(((e,t)=>n=>t(e(n))),(e=>e))(t)},Tn.default={isValidPresetType:$n};var Bn={},Gn={},Wn={};Object.defineProperty(Wn,"__esModule",{value:!0}),Wn.ApiConsumer=void 0;Wn.ApiConsumer=class{constructor(e){this.strategy=e,this.consume=async e=>(await this.strategy.getExposedFunctions(e)).reduce(((t,n)=>({...t,[n.key]:this.strategy.createFunction(n,e)})),{})}};var Hn={},Nn={};Object.defineProperty(Nn,"__esModule",{value:!0}),Nn.expose=Nn.getExposedProperties=void 0;const Dn=Symbol("exposedProperties");Nn.getExposedProperties=e=>e[Dn]||e.prototype[Dn]||[];Nn.expose=e=>(t,n,i)=>{t[Dn]=t[Dn]||[],t[Dn].push({key:n,descriptor:i,options:e})},Object.defineProperty(Hn,"__esModule",{value:!0}),Hn.ApiExposer=void 0;const Un=Nn;Hn.ApiExposer=class{constructor(e){this.strategy=e,this.exposeInstance=async(e,t)=>{const n=(0,Un.getExposedProperties)(e),i=await Promise.all(n.map((async({key:n,options:i})=>({key:n,options:await this.strategy.exposeFunction(e[n].bind(e),{key:n,options:i,meta:t})}))));await this.strategy.exposeMeta(t,i)}}};var Vn={},zn={},Kn={};Object.defineProperty(Kn,"__esModule",{value:!0}),Kn.ChannelsConsumer=void 0;Kn.ChannelsConsumer=class{constructor(e){this.channel=e,this.getExposedFunctions=async e=>{const{id:t}=e,{props:n}=await this.channel.dispatch(`api-meta:${t}`);return n},this.createFunction=e=>(...t)=>{const{action:n}=e.options;return this.channel.dispatch(n,{args:t})}}};var qn={};Object.defineProperty(qn,"__esModule",{value:!0}),qn.ChannelsExposer=void 0;qn.ChannelsExposer=class{constructor(e){this.channelProviderOrClient=e,this.exposeFunction=async(e,t)=>{const{key:n,options:i,meta:r}=t,{id:o}=r,s=`${o}.${i?.action||n}`;return await this.channelProviderOrClient.register(s,(async({args:t})=>e(...t))),{action:s}},this.exposeMeta=async({id:e},t)=>{const n=`api-meta:${e}`;await this.channelProviderOrClient.register(n,(()=>({props:t})))}}},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Kn,e),n(qn,e)}(zn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(zn,e)}(Vn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Wn,e),n(Hn,e),n(Vn,e),n(Nn,e)}(Gn);var Jn={};Object.defineProperty(Jn,"__esModule",{value:!0}),Jn.createRelayedDispatch=exports.relayChannelClientApi_1=Jn.relayChannelClientApi=void 0;const Yn=["no longer connected","RTCDataChannel closed unexpectedly","The client you are trying to dispatch from is disconnected from the target provider"];exports.relayChannelClientApi_1=Jn.relayChannelClientApi=async(e,t)=>{e.register(`relay:${t}`,(({action:t,target:n,payload:i})=>e.dispatch(n,t,i))),await Promise.resolve()};Jn.createRelayedDispatch=(e,t,n,i)=>async(r,o)=>{try{return await e.dispatch(`relay:${n}`,{action:r,payload:o,target:t})}catch(e){if(s=e.message,Yn.some((e=>s.includes(e)))&&i)throw new Error(i);throw e}var s};var Zn,Qn,Xn,ei=s&&s.__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},ti=s&&s.__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)};Object.defineProperty(Bn,"__esModule",{value:!0}),Bn.ColumnOrRow=Bn.TabStack=Bn.LayoutNode=void 0;const ni=Gn,ii=Jn;class ri{constructor(e,t){Zn.set(this,void 0),this.isRoot=()=>ti(this,Zn,"f").isRoot(this.entityId),this.exists=()=>ti(this,Zn,"f").exists(this.entityId),this.getParent=async()=>{const e=await ti(this,Zn,"f").getParent(this.entityId);if(e)return ri.getEntity(e,ti(this,Zn,"f"))},this.createAdjacentStack=async(e,t)=>{const n=await ti(this,Zn,"f").createAdjacentStack(this.entityId,e,t);return ri.getEntity({entityId:n,type:"stack"},ti(this,Zn,"f"))},this.getAdjacentStacks=async e=>(await ti(this,Zn,"f").getAdjacentStacks({targetId:this.entityId,edge:e})).map((e=>ri.getEntity({type:"stack",entityId:e.entityId},ti(this,Zn,"f")))),ei(this,Zn,e,"f"),this.entityId=t}}Bn.LayoutNode=ri,Zn=new WeakMap,ri.newLayoutEntitiesClient=async(e,t,n)=>{const i=(0,ii.createRelayedDispatch)(e,n,"layout-relay","You are trying to interact with a layout component on a window that does not exist or has been destroyed.");return new ni.ApiConsumer(new ni.ChannelsConsumer({dispatch:i})).consume({id:t})},ri.getEntity=(e,t)=>{const{entityId:n,type:i}=e;switch(i){case"column":case"row":return new si(t,n,i);case"stack":return new oi(t,n);default:throw new Error(`Unrecognised Layout Entity encountered ('${JSON.stringify(e)})`)}};class oi extends ri{constructor(e,t){super(e,t),Qn.set(this,void 0),this.type="stack",this.getViews=()=>ti(this,Qn,"f").getStackViews(this.entityId),this.addView=async(e,t={index:0})=>ti(this,Qn,"f").addViewToStack(this.entityId,e,t),this.removeView=async e=>{await ti(this,Qn,"f").removeViewFromStack(this.entityId,e)},this.setActiveView=async e=>{await ti(this,Qn,"f").setStackActiveView(this.entityId,e)},ei(this,Qn,e,"f")}}Bn.TabStack=oi,Qn=new WeakMap;class si extends ri{constructor(e,t,n){super(e,t),Xn.set(this,void 0),this.getContent=async()=>(await ti(this,Xn,"f").getContent(this.entityId)).map((e=>ri.getEntity(e,ti(this,Xn,"f")))),ei(this,Xn,e,"f"),this.type=n}}Bn.ColumnOrRow=si,Xn=new WeakMap;var ai={};Object.defineProperty(ai,"__esModule",{value:!0}),ai.DEFAULT_LAYOUT_KEY=ai.LAYOUT_CONTROLLER_ID=void 0,ai.LAYOUT_CONTROLLER_ID="layout-entities",ai.DEFAULT_LAYOUT_KEY="__default__";var ci,di,hi,li=s&&s.__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)};Object.defineProperty(Ln,"__esModule",{value:!0}),Ln.Layout=void 0;const ui=G,pi=O,wi=d,yi=Tn,fi=Bn,gi=ai;class mi extends wi.Base{static getClient(e){return li(e,di,"f").getValue()}constructor(e,t){super(t),ci.add(this),di.set(this,new ui.Lazy((async()=>fi.LayoutNode.newLayoutEntitiesClient(await this.platform.getClient(),gi.LAYOUT_CONTROLLER_ID,this.identity)))),this.replace=async e=>{this.wire.sendAction("layout-replace").catch((e=>{}));const t=await this.platform.getClient();await t.dispatch("replace-layout",{target:this.identity,opts:{layout:e}})},this.replaceView=async(e,t)=>{this.wire.sendAction("layout-replace-view").catch((e=>{}));const n=await this.platform.getClient();await n.dispatch("replace-view",{target:this.identity,opts:{viewToReplace:e,newView:t}})},this.applyPreset=async e=>{this.wire.sendAction("layout-apply-preset").catch((e=>{}));const t=await this.platform.getClient(),{presetType:n}=e;if(!n||!(0,yi.isValidPresetType)(n))throw new Error("Cannot apply preset layout, please include an applicable presetType property in the PresetLayoutOptions.");await t.dispatch("apply-preset-layout",{target:this.identity,opts:{presetType:n}})};const n=(0,pi.validateIdentity)(e);if(n)throw new Error(n);this.identity=e,this.platform=this.fin.Platform.wrapSync({uuid:e.uuid}),e.uuid===this.fin.me.uuid&&e.name===this.fin.me.name&&(this.init=this.fin.Platform.Layout.init)}async getConfig(){this.wire.sendAction("layout-get-config").catch((e=>{}));return(await this.platform.getClient()).dispatch("get-frame-snapshot",{target:this.identity})}async getCurrentViews(){this.wire.sendAction("layout-get-views").catch((e=>{}));const e=await this.platform.getClient();return(await e.dispatch("get-layout-views",{target:this.identity})).map((e=>this.fin.View.wrapSync(e)))}async getRootItem(){this.wire.sendAction("layout-get-root-item").catch((()=>{}));const e=await li(this,di,"f").getValue(),t=await e.getRoot("layoutName"in this.identity?this.identity:void 0);return fi.LayoutNode.getEntity(t,e)}async getStackByViewIdentity(e){this.wire.sendAction("layout-get-stack-by-view").catch((()=>{}));const t=await li(this,di,"f").getValue(),n=await t.getStackByView(e);if(!n)throw new Error(`No stack found for view: ${e.uuid}/${e.name}`);return fi.LayoutNode.getEntity(n,t)}async addView(e,{location:t,targetView:n}={}){this.wire.sendAction("layout-add-view").catch((e=>{}));const{identity:i}=await li(this,ci,"m",hi).call(this,"layout-add-view",{viewOptions:e,location:t,targetView:n});return{identity:i}}async closeView(e){this.wire.sendAction("layout-close-view").catch((e=>{})),await li(this,ci,"m",hi).call(this,"layout-close-view",{viewIdentity:e})}}Ln.Layout=mi,di=new WeakMap,ci=new WeakSet,hi=async function(e,t){return(await this.platform.getClient()).dispatch(e,{target:this.identity,opts:t})};var vi,Ci,bi,Ii,Ei,xi=s&&s.__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)},Ai=s&&s.__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};Object.defineProperty(kn,"__esModule",{value:!0}),kn.LayoutModule=void 0;const Pi=d,Mi=Ln,_i=ai;class Oi extends Pi.Base{constructor(){super(...arguments),vi.add(this),Ci.set(this,!1),bi.set(this,null),this.init=async(e={})=>{if(this.wire.sendAction("layout-init").catch((e=>{})),!this.wire.environment.layoutAllowedInContext(this.fin))throw new Error("Layout.init can only be called from a Window context.");if(xi(this,Ci,"f"))throw new Error("Layout.init was already called, please use Layout.create to add additional layouts.");"openfin"===this.wire.environment.type&&await this.fin.Platform.getCurrentSync().getClient(),Ai(this,Ci,!0,"f"),Ai(this,bi,await this.wire.environment.initLayoutManager(this.fin,this.wire,e),"f"),await this.wire.environment.applyLayoutSnapshot(this.fin,xi(this,bi,"f"),e);const t={name:this.fin.me.name,uuid:this.fin.me.uuid};if(!e.layoutManagerOverride){const e={layoutName:_i.DEFAULT_LAYOUT_KEY,...t};return xi(this,Ii,"f").call(this,e)}return this.wrapSync(t)},Ii.set(this,(e=>{const t="[Layout] You are using a deprecated property `layoutManager` - it will throw if you access it starting in v37.",n=new Proxy({},{get(e,n){throw console.warn(`[Layout-mgr-proxy] accessing ${n.toString()}`),new Error(t)}}),i=Object.assign(this.wrapSync(e),{layoutManager:n});return new Proxy(i,{get(e,n){if("layoutManager"===n)throw console.warn(`[Layout-proxy] accessing ${n.toString()}`),new Error(t);return e[n]}})})),this.getCurrentLayoutManagerSync=()=>xi(this,vi,"m",Ei).call(this,"fin.Platform.Layout.getCurrentLayoutManagerSync()"),this.create=async e=>this.wire.environment.createLayout(xi(this,vi,"m",Ei).call(this,"fin.Platform.Layout.create()"),e),this.destroy=async e=>this.wire.environment.destroyLayout(xi(this,vi,"m",Ei).call(this,"fin.Platform.Layout.destroy()"),e)}async wrap(e){return this.wire.sendAction("layout-wrap").catch((e=>{})),new Mi.Layout(e,this.wire)}wrapSync(e){return this.wire.sendAction("layout-wrap-sync").catch((e=>{})),new Mi.Layout(e,this.wire)}async getCurrent(){if(this.wire.sendAction("layout-get-current").catch((e=>{})),"openfin"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error("You are not in a Window context. Only Windows can have a Layout.");const{uuid:e,name:t}=this.fin.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction("layout-get-current-sync").catch((e=>{})),"openfin"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error("You are not in a Window context. Only Windows can have a Layout.");const{uuid:e,name:t}=this.fin.me;return this.wrapSync({uuid:e,name:t})}async getLayoutByViewIdentity(e){this.wire.sendAction("layout-get-by-view-identity").catch((()=>{}));let t=await this.wire.environment.getViewWindowIdentity(this.fin,e);t.identity&&(t=t.identity);try{const n=this.wrapSync(t),i=await Mi.Layout.getClient(n),r=await i.getLayoutIdentityForViewOrThrow(e);return this.wrapSync(r)}catch(n){if(!["No action registered at target for","getLayoutIdentityForViewOrThrow is not a function"].some((e=>n.message.includes(e))))throw n;if(t.uuid===t.name)throw new Error(`View identity ${JSON.stringify(e)} is not attached to any layout in provider window ${JSON.stringify(t)}.`);return this.wrapSync(t)}}}kn.LayoutModule=Oi,Ci=new WeakMap,bi=new WeakMap,Ii=new WeakMap,vi=new WeakSet,Ei=function(e){if(!xi(this,bi,"f"))throw new Error(`You must call init before using the API ${e}`);return xi(this,bi,"f")},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(kn,e),n(Ln,e)}(jn),Object.defineProperty(Pn,"__esModule",{value:!0}),Pn.PlatformModule=void 0;const Si=d,Ri=Mn,Fi=jn;class ji extends Si.Base{constructor(e,t){super(e),this._channel=t,this.Layout=new Fi.LayoutModule(this.wire)}async init(e){if(!fin.__internal_.isPlatform||fin.me.name!==fin.me.uuid)throw new Error("fin.Platform.init should only be called from a custom platform provider running in the main window of the application.");return this.wire.environment.initPlatform(this.fin,e)}async wrap(e){return this.wire.sendAction("platform-wrap").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}wrapSync(e){return this.wire.sendAction("platform-wrap-sync").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}async getCurrent(){return this.wire.sendAction("platform-get-current").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction("platform-get-current-sync").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}start(e){return this.wire.sendAction("platform-start").catch((e=>{})),new Promise((async(t,n)=>{try{const{uuid:n}=e,i=await this.fin.Application._create({...e,isPlatformController:!0});i.once("platform-api-ready",(()=>t(this.wrapSync({uuid:n})))),i._run({uuid:n})}catch(e){n(e)}}))}startFromManifest(e,t){return this.wire.sendAction("platform-start-from-manifest").catch((e=>{})),new Promise((async(n,i)=>{try{const i=await this.fin.Application._createFromManifest(e);i.once("platform-api-ready",(()=>n(this.wrapSync({uuid:i.identity.uuid})))),i._run(t)}catch(e){i(e)}}))}}Pn.PlatformModule=ji,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Pn,e),n(Mn,e)}(An);var ki={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getMe=e.getBaseMe=e.environmentUnsupportedMessage=void 0;const t=J(),n=un,i=ie(),r=rn;function o(e,t,n){return{...{isView:"view"===e,isWindow:"window"===e,isFrame:"iframe"===e,isExternal:"external connection"===e},uuid:t,name:n,entityType:e}}e.environmentUnsupportedMessage="You are not running in OpenFin.",e.getBaseMe=o,e.getMe=function(s){const{uuid:a,name:c,entityType:d}=s.me,h={setContext(){throw new Error(e.environmentUnsupportedMessage)},addContextHandler(){throw new Error(e.environmentUnsupportedMessage)},getContextGroups(){throw new Error(e.environmentUnsupportedMessage)},joinContextGroup(){throw new Error(e.environmentUnsupportedMessage)},removeFromContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getAllClientsInContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getInfoForContextGroup(){throw new Error(e.environmentUnsupportedMessage)}},l="Interop API has not been instantiated. Either connection has failed or you have not declared interop in your config.",u={setContext(){throw new Error(l)},addContextHandler(){throw new Error(l)},getContextGroups(){throw new Error(l)},joinContextGroup(){throw new Error(l)},removeFromContextGroup(){throw new Error(l)},getAllClientsInContextGroup(){throw new Error(l)},getInfoForContextGroup(){throw new Error(l)}},p={eventNames:()=>{throw new Error(e.environmentUnsupportedMessage)},emit:()=>{throw new Error(e.environmentUnsupportedMessage)},listeners:()=>{throw new Error(e.environmentUnsupportedMessage)},listenerCount:()=>{throw new Error(e.environmentUnsupportedMessage)},on:()=>{throw new Error(e.environmentUnsupportedMessage)},addListener:()=>{throw new Error(e.environmentUnsupportedMessage)},once:()=>{throw new Error(e.environmentUnsupportedMessage)},prependListener:()=>{throw new Error(e.environmentUnsupportedMessage)},prependOnceListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeAllListeners:()=>{throw new Error(e.environmentUnsupportedMessage)}};switch(d){case"view":return Object.assign(new t.View(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case"window":return Object.assign(new i._Window(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case"iframe":return Object.assign(new n._Frame(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case"external connection":return Object.assign(new r.ExternalApplication(s,{uuid:a}),o(d,a,c),{interop:u,isOpenFin:!1});default:return{...o(d,a,c),...p,interop:h,isOpenFin:!1}}}}(ki);var Li={},Ti={},$i={};Object.defineProperty($i,"__esModule",{value:!0}),$i.createWarningObject=$i.createUnusableObject=void 0,$i.createUnusableObject=function(e){const t=()=>{throw new Error(e)};return new Proxy({},{apply:t,construct:t,defineProperty:t,deleteProperty:t,get:t,getOwnPropertyDescriptor:t,getPrototypeOf:t,has:t,isExtensible:t,ownKeys:t,preventExtensions:t,set:t,setPrototypeOf:t})},$i.createWarningObject=function(e,t){return new Proxy(t,{get:(...t)=>(console.warn(e),Reflect.get(...t)),set:(...t)=>(console.warn(e),Reflect.set(...t)),getOwnPropertyDescriptor:(...t)=>(console.warn(e),Reflect.getOwnPropertyDescriptor(...t)),ownKeys:(...t)=>(console.warn(e),Reflect.ownKeys(...t))})};var Bi,Gi={},Wi={};var Hi={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.wrapIntentHandler=e.BROKER_ERRORS=e.generateOverrideWarning=e.generateOverrideError=e.wrapContextHandler=e.wrapInTryCatch=e.generateId=void 0;e.generateId=()=>`${Math.random()}${Date.now()}`;e.wrapInTryCatch=(e,t)=>(...n)=>{try{return e(...n)}catch(e){throw new Error((t||"")+e)}};e.wrapContextHandler=(e,t)=>async n=>{try{await e(n)}catch(e){throw console.error(`Error thrown by handler ${t} for context type ${n.type}: ${e}`),e}};e.generateOverrideError=(e,t)=>`You have tried to to use ${e} but ${t} has not been overridden in the Interop Broker. Please override this function. Refer to our documentation for more info.`;e.generateOverrideWarning=(e,t,n,i)=>{const{uuid:r,name:o}=n;return i?`Entity with identity: ${r}/${o} has called ${i} or ${e} but ${t} has not been overridden.`:`Entity with identity: ${r}/${o} has called ${e} but ${t} has not been overridden.`},e.BROKER_ERRORS={fireIntent:(0,e.generateOverrideError)("fireIntent","handleFiredIntent"),fireIntentForContext:(0,e.generateOverrideError)("fireIntentForContext","handleFiredIntentForContext"),getInfoForIntent:(0,e.generateOverrideError)("getInfoForIntent","handleInfoForIntent"),getInfoForIntentsByContext:(0,e.generateOverrideError)("getInfoForIntentsByContext","handleInfoForIntentsByContext"),joinSessionContextGroupWithJoinContextGroup:"The Context Group you have tried to join is a Session Context Group. Custom Context Groups can only be defined by the Interop Broker through code or manifest configuration. Please use joinSessionContextGroup.",fdc3Open:(0,e.generateOverrideError)("fdc3.open","fdc3HandleOpen"),fdc3FindInstances:(0,e.generateOverrideError)("fdc3.findInstances","fdc3HandleFindInstances"),fdc3GetAppMetadata:(0,e.generateOverrideError)("fdc3.getAppMetadata","fdc3HandleGetAppMetadata"),fdc3GetInfo:(0,e.generateOverrideError)("fdc3.getInfo","fdc3HandleGetInfo")};e.wrapIntentHandler=(e,t)=>async n=>{try{return e(n)}catch(e){throw console.error(`Error thrown by handler ${t}: ${e}`),e}}}(Hi);var Ni,Di,Ui={};function Vi(){if(Di)return Gi;Di=1;var e,t,n,r=s&&s.__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},o=s&&s.__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)},a=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Gi,"__esModule",{value:!0}),Gi.InteropBroker=void 0;const c=d,h=a(function(){if(Bi)return Wi;Bi=1,Object.defineProperty(Wi,"__esModule",{value:!0});const e=Cr();return Wi.default=class{constructor(e,t){this.provider=e,this.id=t,this.lastContext=void 0,this.contextGroupMap=new Map,this.clients=new Map,this.registerListeners()}registerListeners(){this.provider.register(`sessionContextGroup:getContext-${this.id}`,this.getCurrentContext.bind(this)),this.provider.register(`sessionContextGroup:setContext-${this.id}`,this.setContext.bind(this)),this.provider.register(`sessionContextGroup:handlerAdded-${this.id}`,this.handlerAdded.bind(this)),this.provider.register(`sessionContextGroup:handlerRemoved-${this.id}`,this.handlerRemoved.bind(this))}getCurrentContext(e){return e.type?this.contextGroupMap.get(e.type):this.lastContext}setContext(t,n){const{context:i}=t,r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name} not in Session Client State Map`);this.contextGroupMap.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{e.contextHandlers.get(i.type)?.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getClientState(e){return this.clients.get(e.endpointId)}async handlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(i){const e=r.contextHandlers.get(i)||[];r.contextHandlers.set(i,[...e,n]);const o=this.contextGroupMap.get(i);o&&await this.provider.dispatch(t,n,o)}else{r.globalHandler=n;const e=[...this.contextGroupMap.keys()].map((async e=>{const i=this.contextGroupMap.get(e);i&&await this.provider.dispatch(t,n,i)}));await Promise.all(e)}}handlerRemoved(e,t){const{handlerId:n}=e,i=this.clients.get(t.endpointId);i?(Array.from(i.contextHandlers).forEach((([,e])=>{const t=e.indexOf(n);t>-1&&e.splice(t,1)})),i.globalHandler===n&&(i.globalHandler=void 0)):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={contextHandlers:new Map,clientIdentity:e,globalHandler:void 0};this.clients.set(e.endpointId,t)}}onDisconnection(e){this.clients.delete(e.endpointId)}},Wi}()),l=Hi,u=a(i),p=function(){if(Ni)return Ui;Ni=1,Object.defineProperty(Ui,"__esModule",{value:!0}),Ui.PrivateChannelProvider=void 0;const e=Vi();return Ui.PrivateChannelProvider=class t{constructor(e,t){this.provider=e,this.id=t,this.clients=new Map,this.registerListeners(),this.contextByContextType=new Map,this.lastContext=void 0,this.provider.onConnection((e=>this.registerNewClient(e))),this.provider.onDisconnection((async e=>{const{endpointId:t}=e;this.clients.has(t)&&await this.handleClientDisconnecting(e),0===(await this.provider.getAllClientInfo()).length&&this.provider.destroy()}))}getClientState(e){return this.clients.get(e.endpointId)}registerListeners(){this.provider.register("broadcast",this.broadcast.bind(this)),this.provider.register("getCurrentContext",this.getCurrentContext.bind(this)),this.provider.register("contextHandlerAdded",this.contextHandlerAdded.bind(this)),this.provider.register("contextHandlerRemoved",this.contextHandlerRemoved.bind(this)),this.provider.register("nonStandardHandlerRemoved",this.nonStandardHandlerRemoved.bind(this)),this.provider.register("onAddContextHandlerAdded",this.onAddContextHandlerAdded.bind(this)),this.provider.register("onDisconnectHandlerAdded",this.onDisconnectHandlerAdded.bind(this)),this.provider.register("onUnsubscribeHandlerAdded",this.onUnsubscribeHandlerAdded.bind(this)),this.provider.register("clientDisconnecting",((e,t)=>{this.handleClientDisconnecting(t)}))}broadcast(t,n){const{context:i}=t;if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name}, tried to call broadcast, is not connected to this Private Channel`);const r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to broadcast - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);this.contextByContextType.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{const t=e.handlerIdsByContextTypes.get(i.type);t&&t.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getCurrentContext(e,t){const{contextType:n}=e;if(!this.getClientState(t))throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call getCurrentContext, is not connected to this Private Channel`);if(void 0!==n){return this.contextByContextType.get(n)||null}return this.lastContext?this.lastContext:null}contextHandlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call addContextListener, is not connected to this Private Channel`);if(i){const e=r.handlerIdsByContextTypes.get(i)||[];r.handlerIdsByContextTypes.set(i,[...e,n])}else r.globalHandler=n;Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&e.onAddContextListenerHandlerId&&this.provider.dispatch(e.clientIdentity,e.onAddContextListenerHandlerId,i)}))}async contextHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);if(i){let e;if(i.globalHandler===n)i.globalHandler=void 0;else for(const[t,r]of i.handlerIdsByContextTypes){const i=r.indexOf(n);i>-1&&(r.splice(i,1),e=t)}const r=(await this.getConnectedClients()).map((async n=>{const{clientIdentity:i,clientIdentity:{endpointId:r},onUnsubscribeHandlerId:o}=n;r!==t.endpointId&&o&&await this.provider.dispatch(i,o,e)}));try{await Promise.all(r)}catch(e){throw console.error(`Problem when attempting to dispatch to onUnsubscribeHandlers. Error: ${e} Removing Client: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}`),new Error(e)}}else console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}.`)}nonStandardHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);i?i.onDisconnectHandlerId===n?i.onDisconnectHandlerId=void 0:i.onAddContextListenerHandlerId===n?i.onAddContextListenerHandlerId=void 0:i.onUnsubscribeHandlerId===n&&(i.onUnsubscribeHandlerId=void 0):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}onAddContextHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onAddContextListener, is not connected to this Private Channel`);n.onAddContextListenerHandlerId=i,Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&Array.from(e.handlerIdsByContextTypes.keys()).forEach((e=>{this.provider.dispatch(t,i,e)}))}))}onDisconnectHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onDisconnect, is not connected to this Private Channel`);n.onDisconnectHandlerId=i}onUnsubscribeHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onUnsubscribe, is not connected to this Private Channel`);n.onUnsubscribeHandlerId=i}removeClient(e){const t=this.getClientState(e);if(!t)throw new Error(`Client with Identity: ${e.uuid} ${e.name}, tried to call disconnect, is not connected to this Private Channel`);t.handlerIdsByContextTypes.clear(),this.clients.delete(e.endpointId)}async fireOnDisconnectForOtherClients(e){const{endpointId:t}=e,n=(await this.getConnectedClients()).map((async e=>{const{clientIdentity:{endpointId:n},onDisconnectHandlerId:i}=e;n!==t&&i&&await this.provider.dispatch(e.clientIdentity,i)}));try{await Promise.all(n)}catch(t){throw console.error(`Problem when attempting to dispatch to onDisconnectHandlers. Error: ${t} Disconnecting Client: uuid: ${e.uuid}. name: ${e.name}. endpointId: ${e.endpointId}`),new Error(t)}}async unsubscribeAll(e){const{endpointId:t}=e,n=this.clients.get(t);if(n){const t=Array.from(n.handlerIdsByContextTypes.values()).flat(),i=n.globalHandler;if(t.length>0){const n=t.map((async t=>this.contextHandlerRemoved({handlerId:t},e)));try{await Promise.all(n)}catch(e){console.error(e.message)}}if(i)try{await this.contextHandlerRemoved({handlerId:i},e)}catch(e){console.error(e.message)}}}async handleClientDisconnecting(e){await this.unsubscribeAll(e),this.removeClient(e),await this.fireOnDisconnectForOtherClients(e)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={clientIdentity:e,handlerIdsByContextTypes:new Map,globalHandler:void 0,onAddContextListenerHandlerId:void 0,onUnsubscribeHandlerId:void 0,onDisconnectHandlerId:void 0};this.clients.set(e.endpointId,t)}}async getConnectedClients(){const e=await this.provider.getAllClientInfo();return Array.from(this.clients.values()).filter((t=>{const{uuid:n,name:i}=t.clientIdentity;return e.some((e=>i===e.name&&n===e.uuid))}))}static init(e,n){return new t(e,n)}},Ui}(),w=G,y=[{id:"green",displayMetadata:{color:"#00CC88",name:"green"}},{id:"purple",displayMetadata:{color:"#8C61FF",name:"purple"}},{id:"orange",displayMetadata:{color:"#FF8C4C",name:"orange"}},{id:"red",displayMetadata:{color:"#FF5E60",name:"red"}},{id:"pink",displayMetadata:{color:"#FF8FB8",name:"pink"}},{id:"yellow",displayMetadata:{color:"#E9FF8F",name:"yellow"}}];let f=class i extends c.Base{constructor(i,s,a){super(i),e.set(this,void 0),t.set(this,void 0),n.set(this,void 0),this.getProvider=()=>o(this,n,"f").getValue(),this.interopClients=new Map,this.contextGroupsById=new Map,r(this,t,a.contextGroups??[...y],"f"),r(this,e,a.fdc3Info,"f"),a?.logging&&(this.logging=a.logging),this.intentClientMap=new Map,this.lastContextMap=new Map,this.sessionContextGroupMap=new Map,r(this,n,new w.Lazy(s),"f"),this.setContextGroupMap(),this.setupChannelProvider()}static createClosedConstructor(...e){return class extends i{constructor(...t){if(t.length){const[n,i,r]=t;if(r&&"object"==typeof r&&!(0,u.default)(r,e[2]))return console.warn("You have modified the parameters of the InteropOverride constructor. This behavior is deprecated and will be removed in a future version. You can modify these options in your manifest. Please consult our Interop docs for guidance on migrating to the new override scheme."),void super(e[0],e[1],r);console.warn("You are attempting to pass arguments to the InteropOverride constructor. This is not necessary, and these passed arguments will be ignored. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.")}super(...e)}}}setContext({context:e},t){this.wire.sendAction("interop-broker-set-context").catch((e=>{}));const n=this.getClientState(t);if(!n||!n.contextGroupId)throw n?new Error("You must join a context group before you can set context."):new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);{const{contextGroupId:t}=n;this.setContextForGroup({context:e},t)}}setContextForGroup({context:e},t){this.wire.sendAction("interop-broker-set-context-for-group").catch((e=>{}));const n=this.contextGroupsById.get(t);if(!n)throw new Error(`Unable to set context for context group that isn't in the context group mapping: ${t}.`);const r=i.checkContextIntegrity(e);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(e)}`);const o=e.type;n.set(o,e),this.lastContextMap.set(t,o);Array.from(this.interopClients.values()).filter((e=>e.contextGroupId===t)).forEach((t=>{for(const[,n]of t.contextHandlers)i.isContextTypeCompatible(o,n.contextType)&&this.invokeContextHandler(t.clientIdentity,n.handlerId,e)}))}getCurrentContext(e,t){this.wire.sendAction("interop-broker-get-current-context").catch((e=>{}));const n=this.getClientState(t);if(!n?.contextGroupId)throw new Error("You must be a member of a context group to call getCurrentContext");const{contextGroupId:i}=n,r=this.contextGroupsById.get(i),o=this.lastContextMap.get(i),s=e?.contextType??o;return r&&s?r.get(s):void 0}async joinContextGroup({contextGroupId:e,target:t},n){if(this.wire.sendAction("interop-broker-join-context-group").catch((e=>{})),this.sessionContextGroupMap.has(e))throw new Error(l.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup);if(t){i.hasEndpointId(t)&&await this.addClientToContextGroup({contextGroupId:e},t);try{const n=this.channel.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name));if(!n.length)throw new Error(`Given Identity ${t.uuid} ${t.name} is not connected to the Interop Broker.`);n.length>1&&console.warn(`More than one connection found for identity ${t.uuid} ${t.name}`);const i=[];for(const t of n)i.push(this.addClientToContextGroup({contextGroupId:e},t));await Promise.all(i)}catch(e){throw new Error(e)}}else await this.addClientToContextGroup({contextGroupId:e},n)}async addClientToContextGroup({contextGroupId:e},t){this.wire.sendAction("interop-broker-add-client-to-context-group").catch((e=>{}));const n=this.getClientState(t);if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(!this.getContextGroups().find((t=>t.id===e)))throw new Error(`Attempting to join a context group that does not exist: ${e}. You may only join existing context groups.`);if(n.contextGroupId!==e){n.contextGroupId=e,await this.setCurrentContextGroupInClientOptions(t,e);const i=this.contextGroupsById.get(e);for(const[,e]of n.contextHandlers){const{contextType:n,handlerId:r}=e;if(void 0===n)i.forEach(((e,n)=>{this.invokeContextHandler(t,r,e)}));else if(i.has(n)){const e=i.get(n);e&&this.invokeContextHandler(t,r,e)}}}}async removeFromContextGroup({target:e},t){if(this.wire.sendAction("interop-broker-remove-from-context-group").catch((e=>{})),e){i.hasEndpointId(e)&&await this.removeClientFromContextGroup(e);try{const t=this.channel.connections.filter((t=>t.uuid===e.uuid&&t.name===e.name));if(!t.length)throw new Error(`No connection found for given Identity ${e.uuid} ${e.name}`);t.length>1&&console.warn(`More than one connection found for identity ${e.uuid} ${e.name}`);const n=[];for(const e of t)n.push(this.removeClientFromContextGroup(e));await Promise.all(n)}catch(e){throw new Error(e)}}else await this.removeClientFromContextGroup(t)}async removeClientFromContextGroup(e){this.wire.sendAction("interop-broker-remove-client-from-context-group").catch((e=>{}));const t=this.getClientState(e);t&&(t.contextGroupId=void 0),await this.setCurrentContextGroupInClientOptions(e,null)}getContextGroups(){return this.wire.sendAction("interop-broker-get-context-groups").catch((e=>{})),o(this,t,"f").map((e=>({...e})))}getInfoForContextGroup({contextGroupId:e}){return this.wire.sendAction("interop-broker-get-info-for-context-group").catch((e=>{})),this.getContextGroups().find((t=>t.id===e))}getAllClientsInContextGroup({contextGroupId:e}){this.wire.sendAction("interop-broker-get-all-clients-in-context-group").catch((e=>{}));return Array.from(this.interopClients.values()).filter((t=>t.contextGroupId===e)).map((e=>e.clientIdentity))}async handleFiredIntent(e,t){const n=(0,l.generateOverrideWarning)("fdc3.raiseIntent","InteropBroker.handleFiredIntent",t,"interopClient.fireIntent");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntent)}async setIntentTarget(e,t){this.wire.sendAction("interop-broker-set-intent-target").catch((e=>{}));const n=this.intentClientMap.get(t.name),i=`intent-handler-${e.name}`;if(n){const t=n.get(i);if(t){if(t.pendingIntents.push(e),t.clientIdentity&&t.isReady){const{clientIdentity:e,pendingIntents:n}=t;try{const r=n[n.length-1];await this.invokeIntentHandler(e,i,r),t.pendingIntents=[]}catch(n){console.error(`Error invoking intent handler for client ${e.uuid}/${e.name}/${e.endpointId}`),t.isReady=!1}}}else n.set(i,{isReady:!1,pendingIntents:[e]})}else{this.intentClientMap.set(t.name,new Map);const n=this.intentClientMap.get(t.name);n&&n.set(i,{isReady:!1,pendingIntents:[e]})}}async handleInfoForIntent(e,t){const n=(0,l.generateOverrideWarning)("fdc3.findIntent","InteropBroker.handleInfoForIntent",t,"interopClient.getInfoForIntent");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntent)}async handleInfoForIntentsByContext(e,t){const n=(0,l.generateOverrideWarning)("fdc3.findIntentsByContext","InteropBroker.handleInfoForIntentsByContext",t,"interopClient.getInfoForIntentsByContext");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntentsByContext)}async handleFiredIntentForContext(e,t){const n=(0,l.generateOverrideWarning)("fdc3.raiseIntentForContext","InteropBroker.handleFiredIntentForContext",t,"interopClient.fireIntentForContext");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntentForContext)}async clientDisconnected(e){}async fdc3HandleOpen({app:e,context:t},n){const i=(0,l.generateOverrideWarning)("fdc3.open","InteropBroker.fdc3HandleOpen",n);throw console.warn(i),new Error(l.BROKER_ERRORS.fdc3Open)}async fdc3HandleFindInstances(e,t){const n=(0,l.generateOverrideWarning)("fdc3.open","InteropBroker.fdc3HandleFindInstances",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3FindInstances)}async fdc3HandleGetAppMetadata(e,t){const n=(0,l.generateOverrideWarning)("fdc3.getAppMetadata","InteropBroker.fdc3HandleGetAppMetadata",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3GetAppMetadata)}async invokeContextHandler(e,t,n){const i=await this.getProvider();try{await i.dispatch(e,t,n)}catch(i){console.error(`Error invoking context handler ${t} for context type ${n.type} in client ${e.uuid}/${e.name}/${e.endpointId}`,i)}}async invokeIntentHandler(e,t,n){const i=await this.getProvider();await i.dispatch(e,t,n)}async fdc3HandleGetInfo(t,n){const{fdc3Version:i}=t;return{fdc3Version:i,...o(this,e,"f"),optionalFeatures:{OriginatingAppMetadata:!1,UserChannelMembershipAPIs:!0},appMetadata:{appId:"",instanceId:""}}}async getAllClientInfo(){return(await this.getProvider()).getAllClientInfo()}decorateSnapshot(e){return{...e,interopSnapshotDetails:{contextGroupStates:this.getContextGroupStates()}}}applySnapshot(e,t){const n=e?.interopSnapshotDetails?.contextGroupStates;n&&(t?.closeExistingWindows||this.updateExistingClients(n),this.rehydrateContextGroupStates(n))}updateExistingClients(e){this.interopClients.forEach((t=>{const{clientIdentity:n,contextGroupId:r,contextHandlers:o}=t;if(r){const t=e[r];for(const[,e]of Object.entries(t))o.forEach((t=>{const{handlerId:r,contextType:o}=t;i.isContextTypeCompatible(e.type,o)&&this.invokeContextHandler(n,r,e)}))}}))}getContextGroupStates(){return i.toObject(this.contextGroupsById)}rehydrateContextGroupStates(e){const t=Object.entries(e);for(const[e,n]of t){const t=Object.entries(n);for(const[n,i]of t)if(this.contextGroupsById.has(e)){this.contextGroupsById.get(e).set(n,i)}else console.warn(`Attempting to set a context group that isn't in the context group mapping. Skipping context group rehydration for: ${e}`)}}contextHandlerRegistered({contextType:e,handlerId:t},n){const i={contextType:e,handlerId:t},r=this.getClientState(n);if(r?.contextHandlers.set(t,i),r&&r.contextGroupId){const{contextGroupId:i}=r,o=this.contextGroupsById.get(i);if(void 0===e)o.forEach(((e,i)=>{this.invokeContextHandler(n,t,e)}));else if(o.has(e)){const i=o.get(e);i&&this.invokeContextHandler(n,t,i)}}}async intentHandlerRegistered(e,t){const{handlerId:n}=e,i=this.intentClientMap.get(t.name),r=i?.get(n);if(i)if(r){const{pendingIntents:e}=r;r.clientIdentity=t,r.isReady=!0;try{if(e.length>0){const i=e[e.length-1];await this.invokeIntentHandler(t,n,i),r.pendingIntents=[]}}catch(e){console.error(`Error invoking intent handler: ${n} for client ${t.uuid}/${t.name}/${t.endpointId}`)}}else i.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t});else{this.intentClientMap.set(t.name,new Map);const e=this.intentClientMap.get(t.name);e&&e.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t})}}removeContextHandler({handlerId:e},t){const n=this.getClientState(t);n&&n.contextHandlers.delete(e)}handleJoinSessionContextGroup({sessionContextGroupId:e},t){try{if(!e)throw new Error("Failed to join session context group: must specify group id.");const n=this.sessionContextGroupMap.get(e);if(n)n.registerNewClient(t);else{const n=new h.default(this.channel,e);n.registerNewClient(t),this.sessionContextGroupMap.set(e,n)}return{hasConflict:this.contextGroupsById.has(e)}}catch(e){throw new Error(e)}}getClientState(e){return this.interopClients.get(e.endpointId)}static toObject(e){const t=Object.fromEntries(e),n={};return Object.entries(t).forEach((([e,t])=>{const i=Object.fromEntries(t);n[e]=i})),n}static checkContextIntegrity(e){if(!e)return{isValid:!1,reason:"No context supplied"};if("object"!=typeof e)return{isValid:!1,reason:"Context must be an Object"};if(!e.type)return{isValid:!1,reason:"Context must have a type property"};if(e.id&&"object"!=typeof e.id)return{isValid:!1,reason:"Context id must be an Object populated with key-value identifiers (if set)"};if(e.id){const{id:t}=e,n=Object.keys(t);let i=!1;if(!n.length)return{isValid:!1,reason:"Context id must have at least one key-value identifier"};if(n.forEach((e=>{"string"==typeof e&&"string"==typeof t[e]||(i=!0)})),i)return{isValid:!1,reason:"Context id key-value identifiers must be of type string"}}return e.name&&"string"!=typeof e.name?{isValid:!1,reason:"Context name must be of string type (if set)"}:{isValid:!0}}static hasEndpointId(e){return void 0!==e.endpointId}static isContextTypeCompatible(e,t){return void 0===t||e===t}setContextGroupMap(){for(const e of this.getContextGroups())this.contextGroupsById.set(e.id,new Map)}async setCurrentContextGroupInClientOptions(e,t){try{const n=await this.fin.System.getEntityInfo(e.uuid,e.name);let i;"view"===n.entityType?i=await this.fin.View.wrap(e):"window"===n.entityType&&(i=await this.fin.Window.wrap(e)),i&&await i.updateOptions({interop:{currentContextGroup:t}})}catch(e){}}async setupChannelProvider(){try{const e=await this.getProvider();this.channel=e,this.wireChannel(e)}catch(e){throw new Error(`Error setting up Interop Broker Channel Provider: ${e}`)}}wireChannel(e){e.onConnection((async(e,t)=>{if(!await this.isConnectionAuthorized(e,t))throw new Error(`Connection not authorized for ${e.uuid}, ${e.name}`);if(!e.endpointId)throw new Error("Version too old to be compatible with Interop. Please upgrade your runtime to a more recent version.");const n={contextGroupId:void 0,contextHandlers:new Map,clientIdentity:e};t?.currentContextGroup&&this.contextGroupsById.has(t.currentContextGroup)&&(n.contextGroupId=t?.currentContextGroup),this.interopClients.set(e.endpointId,n)})),e.onDisconnection((e=>{this.interopClients.delete(e.endpointId);const t=this.intentClientMap.get(e.name);t&&e.uuid===this.fin.me.uuid&&t.forEach((e=>{e.isReady=!1})),this.sessionContextGroupMap.forEach((t=>{t.onDisconnection(e)})),this.clientDisconnected(e)})),e.beforeAction((async(e,t,n)=>{if(!await this.isActionAuthorized(e,t,n))throw new Error(`Action (${e}) not authorized for ${n.uuid}, ${n.name}`);this.logging?.beforeAction?.enabled&&console.log(e,t,n)})),e.afterAction(((e,t,n)=>{this.logging?.afterAction?.enabled&&console.log(e,t,n)})),e.register("setContext",this.setContext.bind(this)),e.register("fireIntent",this.handleFiredIntent.bind(this)),e.register("getCurrentContext",this.getCurrentContext.bind(this)),e.register("getInfoForIntent",this.handleInfoForIntent.bind(this)),e.register("getInfoForIntentsByContext",this.handleInfoForIntentsByContext.bind(this)),e.register("fireIntentForContext",this.handleFiredIntentForContext.bind(this)),e.register("getContextGroups",this.getContextGroups.bind(this)),e.register("joinContextGroup",this.joinContextGroup.bind(this)),e.register("removeFromContextGroup",this.removeFromContextGroup.bind(this)),e.register("getAllClientsInContextGroup",this.getAllClientsInContextGroup.bind(this)),e.register("getInfoForContextGroup",this.getInfoForContextGroup.bind(this)),e.register("contextHandlerRegistered",this.contextHandlerRegistered.bind(this)),e.register("intentHandlerRegistered",this.intentHandlerRegistered.bind(this)),e.register("removeContextHandler",this.removeContextHandler.bind(this)),e.register("sessionContextGroup:createIfNeeded",this.handleJoinSessionContextGroup.bind(this)),e.register("fdc3Open",this.fdc3HandleOpen.bind(this)),e.register("fdc3v2FindIntentsByContext",this.handleInfoForIntentsByContext.bind(this)),e.register("fdc3FindInstances",this.fdc3HandleFindInstances.bind(this)),e.register("fdc3GetAppMetadata",this.fdc3HandleGetAppMetadata.bind(this)),e.register("fdc3v2GetInfo",(async(e,t)=>this.fdc3HandleGetInfo.bind(this)(e,t))),e.register("createPrivateChannelProvider",(async e=>{const{channelId:t}=e,n=await this.fin.InterApplicationBus.Channel.create(t);p.PrivateChannelProvider.init(n,t)}))}isConnectionAuthorized(e,t){return this.wire.sendAction("interop-broker-is-connection-authorized").catch((e=>{})),Promise.resolve(!0)}isActionAuthorized(e,t,n){return this.wire.sendAction("interop-broker-is-action-authorized").catch((e=>{})),Promise.resolve(!0)}};return Gi.InteropBroker=f,e=new WeakMap,t=new WeakMap,n=new WeakMap,Gi}var zi,Ki={},qi={},Ji=s&&s.__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},Yi=s&&s.__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)};Object.defineProperty(qi,"__esModule",{value:!0});const Zi=d,Qi=Hi;class Xi extends Zi.Base{constructor(e,t,n){super(e),zi.set(this,void 0),this.id=n,Ji(this,zi,t,"f")}async setContext(e){this.wire.sendAction("interop-session-context-group-set-context").catch((e=>{}));return(await Yi(this,zi,"f")).dispatch(`sessionContextGroup:setContext-${this.id}`,{sessionContextGroupId:this.id,context:e})}async getCurrentContext(e){this.wire.sendAction("interop-session-context-group-get-context").catch((e=>{}));return(await Yi(this,zi,"f")).dispatch(`sessionContextGroup:getContext-${this.id}`,{sessionContextGroupId:this.id,type:e})}async addContextHandler(e,t){if(this.wire.sendAction("interop-session-context-group-add-handler").catch((e=>{})),"function"!=typeof e)throw new Error("Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");const n=await Yi(this,zi,"f");let i;return i=t?`sessionContextHandler:invoke-${this.id}-${t}-${(0,Qi.generateId)()}`:`sessionContextHandler:invoke-${this.id}`,n.register(i,(0,Qi.wrapContextHandler)(e,i)),await n.dispatch(`sessionContextGroup:handlerAdded-${this.id}`,{handlerId:i,contextType:t}),{unsubscribe:await this.createUnsubscribeCb(i)}}async createUnsubscribeCb(e){const t=await Yi(this,zi,"f");return async()=>{t.remove(e),await t.dispatch(`sessionContextGroup:handlerRemoved-${this.id}`,{handlerId:e})}}getUserInstance(){return{id:this.id,setContext:(0,Qi.wrapInTryCatch)(this.setContext.bind(this),"Failed to set context: "),getCurrentContext:(0,Qi.wrapInTryCatch)(this.getCurrentContext.bind(this),"Failed to get context: "),addContextHandler:(0,Qi.wrapInTryCatch)(this.addContextHandler.bind(this),"Failed to add context handler: ")}}}qi.default=Xi,zi=new WeakMap;var er={},tr={},nr={},ir={},rr=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),or=s&&s.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),sr=s&&s.__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)&&rr(t,e,n);return or(t,e),t};Object.defineProperty(ir,"__esModule",{value:!0}),ir.PrivateChannelClient=void 0;const ar=sr(Hi);var cr,dr;function hr(){if(cr)return tr;cr=1;var e,t=s&&s.__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)},n=s&&s.__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},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(tr,"__esModule",{value:!0}),tr.FDC3ModuleBase=void 0;const o=nr,a=Hi,c=wr(),d=r(i);return tr.FDC3ModuleBase=class{get client(){return t(this,e,"f").call(this)}get fin(){return this.wire.getFin()}constructor(t,i){this.wire=i,e.set(this,void 0),n(this,e,t,"f")}async broadcast(e){return this.wire.sendAction("fdc3-broadcast").catch((e=>{})),this.client.setContext(e)}async _open(e,t){this.wire.sendAction("fdc3-open").catch((e=>{}));try{return await c.InteropClient.ferryFdc3Call(this.client,"fdc3Open",{app:e,context:t})}catch(e){const t=e.message===a.BROKER_ERRORS.fdc3Open?"ResolverUnavailable":e.message;throw new Error(t)}}async _getChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:"system",...(0,o.getUnsupportedChannelApis)()})))}async getOrCreateChannel(e){this.wire.sendAction("fdc3-get-or-create-channel").catch((e=>{}));const t=(await this._getChannels()).find((t=>t.id===e));if(t)return{...t,type:"system",...(0,o.getUnsupportedChannelApis)()};try{const t=await this.client.joinSessionContextGroup(e);return(0,o.buildAppChannelObject)(t)}catch(e){throw console.error(e.message),new Error(o.ChannelError.CreationFailed)}}async getSystemChannels(){return this.wire.sendAction("fdc3-get-system-channels").catch((e=>{})),this._getChannels()}async joinChannel(e){this.wire.sendAction("fdc3-join-channel").catch((e=>{}));try{return await this.client.joinContextGroup(e)}catch(e){if(e.message===a.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup?console.error("The Channel you have tried to join is an App Channel. Custom Channels can only be defined by the Interop Broker through code or manifest configuration. Please use getOrCreateChannel."):console.error(e.message),e.message.startsWith("Attempting to join a context group that does not exist"))throw new Error(o.ChannelError.NoChannelFound);throw new Error(o.ChannelError.AccessDenied)}}async getCurrentChannel(){this.wire.sendAction("fdc3-get-current-channel").catch((e=>{}));const e=await this.getCurrentContextGroupInfo();return e?this.buildChannelObject(e):null}async leaveCurrentChannel(){return this.wire.sendAction("fdc3-leave-current-channel").catch((e=>{})),this.client.removeFromContextGroup()}async getCurrentContextGroupInfo(){const e=await this.client.getContextGroups(),t=e.map((async e=>this.client.getAllClientsInContextGroup(e.id))),n=(await Promise.all(t)).findIndex((e=>e.some((e=>{const{uuid:t,name:n}=e;return this.wire.me.uuid===t&&this.wire.me.name===n}))));return e[n]}async buildChannelObject(e){return{...e,type:"system",addContextListener:(...[e,t])=>{let n,i;"function"==typeof e?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),n=e):(n=t,"string"==typeof e&&(i=e));const r=(async()=>{let e=!0;const t=await this.client.getCurrentContext(i);return this.client.addContextHandler(((i,r)=>{if(!e||(e=!1,!(0,d.default)(t,i)))return n(i,r)}),i)})();return{...r,unsubscribe:()=>r.then((e=>e.unsubscribe()))}},broadcast:this.broadcast.bind(this),getCurrentContext:async e=>{const t=await this.client.getCurrentContext(e);return void 0===t?null:t}}}},e=new WeakMap,tr}ir.PrivateChannelClient=class{constructor(e,t){this.id=t,this.client=e,this.listeners=new Map}async broadcast(e){return this.client.dispatch("broadcast",{context:e})}async getCurrentContext(e){return this.client.dispatch("getCurrentContext",{contextType:e})}async addContextListener(e,t){if("function"!=typeof t)throw new Error("Non-function argument passed to the second parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");let n;n=e?`contextHandler:invoke-${this.id}-${e}-${ar.generateId()}`:`contextHandler:invoke-${this.id}-${ar.generateId()}`,this.client.register(n,ar.wrapContextHandler(t,n));const i={unsubscribe:await this.createContextUnsubscribeCb(n)};return this.listeners.set(n,i),await this.client.dispatch("contextHandlerAdded",{handlerId:n,contextType:e}),i}createNonStandardUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch("nonStandardHandlerRemoved",{handlerId:e})}}createContextUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch("contextHandlerRemoved",{handlerId:e})}}onAddContextListener(e){const t=`onContextHandlerAdded:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch("onAddContextHandlerAdded",{handlerId:t}),n}onDisconnect(e){const t=`onDisconnect:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch("onDisconnectHandlerAdded",{handlerId:t}),n}onUnsubscribe(e){const t=`onUnsubscribe:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch("onUnsubscribeHandlerAdded",{handlerId:t}),n}async cleanUpAllSubs(){Array.from(this.listeners.keys()).forEach((e=>{this.client.remove(e),this.listeners.delete(e)}))}async disconnect(){try{await this.client.dispatch("clientDisconnecting"),await this.cleanUpAllSubs(),await this.client.disconnect()}catch(e){throw new Error(e.message)}}},function(e){var t=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.getIntentResolution=e.isChannel=e.isContext=e.connectPrivateChannel=e.buildAppChannelObject=e.buildPrivateChannelObject=e.ChannelError=e.ResultError=e.UnsupportedChannelApiError=e.getUnsupportedChannelApis=void 0;const n=Hi,r=ir,o=t(i);e.getUnsupportedChannelApis=e=>({addContextListener:()=>{throw new a("Channel.addContextListener",e)},broadcast:()=>{throw new a("Channel.broadcast",e)},getCurrentContext:()=>{throw new a("Channel.getCurrentContext",e)}});class a extends Error{constructor(e,t="System"){super(e),this.message=`Calling ${e} on an instance of a ${t} Channel returned by fdc3.get${t}Channels is not supported. If you would like to use a ${t} Channel, please use fdc3.joinChannel, fdc3.addContextListener, and fdc3.broadcast instead.`}}var c,d;e.UnsupportedChannelApiError=a,function(e){e.NoResultReturned="NoResultReturned",e.IntentHandlerRejected="IntentHandlerRejected"}(c=e.ResultError||(e.ResultError={})),(d=e.ChannelError||(e.ChannelError={})).NoChannelFound="NoChannelFound",d.AccessDenied="AccessDenied",d.CreationFailed="CreationFailed";e.buildPrivateChannelObject=e=>{let t=!1;const n=()=>{if(t)throw new Error("Private Channel Client has been disconnected from the Private Channel")};return{id:e.id,type:"private",broadcast:async t=>(n(),e.broadcast(t)),getCurrentContext:async t=>(n(),e.getCurrentContext(t)),addContextListener:async(t,i)=>{n();let r=i,o=t;"function"==typeof t&&(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),r=t,o=null);return e.addContextListener(o,r)},onAddContextListener:t=>(n(),e.onAddContextListener(t)),disconnect:async()=>(n(),t=!0,e.disconnect()),onDisconnect:t=>(n(),e.onDisconnect(t)),onUnsubscribe:t=>(n(),e.onUnsubscribe(t))}};e.buildAppChannelObject=e=>({id:e.id,type:"app",broadcast:e.setContext,getCurrentContext:async t=>{const n=await e.getCurrentContext(t);return void 0===n?null:n},addContextListener:(t,n)=>{let i,r;"function"==typeof t?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),i=t):(i=n,"string"==typeof t&&(r=t));const s=(async()=>{let t=!0;const n=await e.getCurrentContext(r);return e.addContextHandler(((e,r)=>{if(!t||(t=!1,!(0,o.default)(n,e)))return i(e,r)}),r)})();return{...s,unsubscribe:()=>s.then((e=>e.unsubscribe()))}}});e.connectPrivateChannel=async t=>{try{const n=await fin.InterApplicationBus.Channel.connect(t),i=new r.PrivateChannelClient(n,t);return(0,e.buildPrivateChannelObject)(i)}catch(e){throw new Error(`Private Channel with id: ${t} doesn't exist`)}};e.isContext=e=>{if(e&&"object"==typeof e&&"type"in e){const{type:t}=e;return"string"==typeof t}return!1};e.isChannel=e=>{if(e&&"object"==typeof e&&"type"in e&&"id"in e){const{type:t,id:n}=e;return"string"==typeof t&&"string"==typeof n&&("app"===t||"private"===t)}return!1};e.getIntentResolution=async(t,i,r,o)=>{const s=(0,n.generateId)(),a=new Promise(((e,t)=>{fin.InterApplicationBus.subscribe({uuid:"*"},s,(t=>{e(t)})).catch((()=>t(new Error("getResult is not supported in this environment"))))})),d=r?{target:r,intentResolutionResultId:s}:{intentResolutionResultId:s},h=o?{name:o,context:i,metadata:d}:{...i,metadata:d},l=async()=>{let n=await a;if(!n||"object"!=typeof n)throw new Error(c.NoResultReturned);const{error:i}=n;if(i)throw new Error(c.IntentHandlerRejected);if((0,e.isChannel)(n)){const{id:i,type:r}=n;switch(r){case"private":n=await(0,e.connectPrivateChannel)(i);break;case"app":{const r=await t.joinSessionContextGroup(i);n=(0,e.buildAppChannelObject)(r);break}}}else if(!(0,e.isContext)(n))throw new Error(c.NoResultReturned);return n},u=o?await t.fireIntent(h):await t.fireIntentForContext(h);return"object"!=typeof u?{source:{appId:"",instanceId:""},intent:"",version:"2.0",getResult:l}:{...u,getResult:l}}}(nr);var lr,ur,pr={};function wr(){if(ur)return Ki;ur=1;var e,t,n=s&&s.__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},i=s&&s.__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)},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ki,"__esModule",{value:!0}),Ki.InteropClient=void 0;const o=d,a=r(qi),c=function(){if(dr)return er;dr=1,Object.defineProperty(er,"__esModule",{value:!0}),er.Fdc3Module=void 0;const e=Hi,t=hr();class n extends t.FDC3ModuleBase{async open(e,t){await super._open(e,t)}addContextListener(e,t){let n;return this.wire.sendAction("fdc3-add-context-listener").catch((e=>{})),"function"==typeof e?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),n=this.client.addContextHandler(e)):n=this.client.addContextHandler(t,null===e?void 0:e),{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}addIntentListener(e,t){this.wire.sendAction("fdc3-add-intent-listener").catch((e=>{}));const n=this.client.registerIntentHandler((e=>{const{context:n,metadata:i}=e,{metadata:r}=n,o=i?.intentResolutionResultId||r?.intentResolutionResultId;o&&this.fin.InterApplicationBus.publish(o,null).catch((()=>null)),t(e.context)}),e,{fdc3Version:"1.2"});return{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}async raiseIntent(t,n,i){this.wire.sendAction("fdc3-raise-intent").catch((e=>{}));const r=i?{name:t,context:n,metadata:{target:i}}:{name:t,context:n};try{return await this.client.fireIntent(r)}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntent?"ResolverUnavailable":t.message;throw new Error(n)}}async findIntent(t,n){this.wire.sendAction("fdc3-find-intent").catch((e=>{}));try{return await this.client.getInfoForIntent({name:t,context:n})}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntent?"ResolverUnavailable":t.message;throw new Error(n)}}async findIntentsByContext(t){this.wire.sendAction("fdc3-find-intents-by-context").catch((e=>{}));try{return await this.client.getInfoForIntentsByContext(t)}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntentsByContext?"ResolverUnavailable":t.message;throw new Error(n)}}async raiseIntentForContext(t,n){this.wire.sendAction("fdc3-raise-intent-for-context").catch((e=>{}));try{return await this.client.fireIntentForContext({...t,metadata:{target:n}})}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntentForContext?"ResolverUnavailable":t.message;throw new Error(n)}}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}getInfo(){return this.wire.sendAction("fdc3-get-info").catch((e=>{})),{providerVersion:this.wire.environment.getAdapterVersionSync(),provider:`openfin-${this.wire.me.uuid}`,fdc3Version:"1.2"}}}return er.Fdc3Module=n,er}(),h=function(){if(lr)return pr;lr=1,Object.defineProperty(pr,"__esModule",{value:!0}),pr.Fdc3Module2=void 0;const e=hr(),t=Hi,n=wr(),i=nr,r=ir;class o extends e.FDC3ModuleBase{async open(e,t){return"string"==typeof e&&console.warn("Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string })."),super._open(e,t)}async findInstances(e){this.wire.sendAction("fdc3-find-instances").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,"fdc3FindInstances",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3FindInstances?"ResolverUnavailable":e.message;throw new Error(n)}}async getAppMetadata(e){this.wire.sendAction("fdc3-get-app-metadata").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,"fdc3GetAppMetadata",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3GetAppMetadata?"ResolverUnavailable":e.message;throw new Error(n)}}async addContextListener(e,t){this.wire.sendAction("fdc3-add-context-listener").catch((e=>{}));const n=e=>t=>{const{contextMetadata:n,...i}=t,r=n?[{...i},n]:[t,null];e(...r)};let i=t,r=n(i);return"function"==typeof e?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),i=e,r=n(i),this.client.addContextHandler(r)):this.client.addContextHandler(r,null===e?void 0:e)}async findIntent(e,n,i){this.wire.sendAction("fdc3-find-intent").catch((e=>{}));try{return await this.client.getInfoForIntent({name:e,context:n,metadata:{resultType:i}})}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntent?"ResolverUnavailable":e.message;throw new Error(n)}}async findIntentsByContext(e,i){this.wire.sendAction("fdc3-find-intents-by-context").catch((e=>{}));const r=i?{context:e,metadata:{resultType:i}}:e;try{return await n.InteropClient.ferryFdc3Call(this.client,"fdc3v2FindIntentsByContext",r)}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntentsByContext?"ResolverUnavailable":e.message;throw new Error(n)}}async raiseIntent(e,n,r){this.wire.sendAction("fdc3-raise-intent").catch((e=>{}));try{return"string"==typeof r&&console.warn("Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string })."),(0,i.getIntentResolution)(this.client,n,r,e)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?"ResolverUnavailable":e.message;throw new Error(n)}}async raiseIntentForContext(e,n){this.wire.sendAction("fdc3-raise-intent-for-context").catch((e=>{}));try{return"string"==typeof n&&console.warn("Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string })."),(0,i.getIntentResolution)(this.client,e,n)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?"ResolverUnavailable":e.message;throw new Error(n)}}async addIntentListener(e,t){if(this.wire.sendAction("fdc3-add-intent-listener").catch((e=>{})),"string"!=typeof e)throw new Error("First argument must be an Intent name");return this.client.registerIntentHandler((async e=>{let n,i;const{context:r,metadata:o}=e,{contextMetadata:s,metadata:a,...c}=r,d=o?.intentResolutionResultId||a?.intentResolutionResultId;try{const e=a?{metadata:a,...c}:{...c};n=await t(e,s),i=n}catch(e){n=e,i={error:!0}}if(d&&this.fin.InterApplicationBus.publish(d,i).catch((()=>null)),n instanceof Error)throw new Error(n.message);return n}),e,{fdc3Version:"2.0"})}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}async createPrivateChannel(){const e=(0,t.generateId)();await n.InteropClient.ferryFdc3Call(this.client,"createPrivateChannelProvider",{channelId:e});const o=await this.fin.InterApplicationBus.Channel.connect(e),s=new r.PrivateChannelClient(o,e);return(0,i.buildPrivateChannelObject)(s)}async getUserChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:"user",...(0,i.getUnsupportedChannelApis)("User")})))}async getSystemChannels(){return console.warn("This API has been deprecated. Please use fdc3.getUserChannels instead."),super.getSystemChannels()}async joinUserChannel(e){return super.joinChannel(e)}async joinChannel(e){return console.warn("This API has been deprecated. Please use fdc3.joinUserChannel instead."),super.joinChannel(e)}async getCurrentChannel(){const e=await super.getCurrentChannel();return e?{...e,type:"user",broadcast:this.broadcast.bind(this)}:null}async getInfo(){return n.InteropClient.ferryFdc3Call(this.client,"fdc3v2GetInfo",{fdc3Version:"2.0"})}}return pr.Fdc3Module2=o,pr}(),l=Hi;let u=class extends o.Base{constructor(i,r){super(i),e.set(this,void 0),t.set(this,void 0),n(this,t,new Map,"f"),n(this,e,r,"f")}async setContext(t){this.wire.sendAction("interop-client-set-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("setContext",{context:t})}async addContextHandler(t,n){if(this.wire.sendAction("interop-client-add-context-handler").catch((e=>{})),"function"!=typeof t)throw new Error("Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");const r=await i(this,e,"f");let o;o=n?`invokeContextHandler-${n}-${(0,l.generateId)()}`:"invokeContextHandler";const s=(0,l.wrapContextHandler)(t,o);return r.register(o,s),await r.dispatch("contextHandlerRegistered",{handlerId:o,contextType:n}),{unsubscribe:async()=>{r.remove(o),await r.dispatch("removeContextHandler",{handlerId:o})}}}async getContextGroups(){this.wire.sendAction("interop-client-get-context-groups").catch((e=>{}));return(await i(this,e,"f")).dispatch("getContextGroups")}async joinContextGroup(t,n){this.wire.sendAction("interop-client-join-context-group").catch((e=>{}));const r=await i(this,e,"f");if(!t)throw new Error("No contextGroupId specified for joinContextGroup.");return r.dispatch("joinContextGroup",{contextGroupId:t,target:n})}async removeFromContextGroup(t){this.wire.sendAction("interop-client-remove-from-context-group").catch((e=>{}));return(await i(this,e,"f")).dispatch("removeFromContextGroup",{target:t})}async getAllClientsInContextGroup(t){this.wire.sendAction("interop-client-get-all-clients-in-context-group").catch((e=>{}));const n=await i(this,e,"f");if(!t)throw new Error("No contextGroupId specified for getAllClientsInContextGroup.");return n.dispatch("getAllClientsInContextGroup",{contextGroupId:t})}async getInfoForContextGroup(t){this.wire.sendAction("interop-client-get-info-for-context-group").catch((e=>{}));const n=await i(this,e,"f");if(!t)throw new Error("No contextGroupId specified for getInfoForContextGroup.");return n.dispatch("getInfoForContextGroup",{contextGroupId:t})}async fireIntent(t){this.wire.sendAction("interop-client-fire-intent").catch((e=>{}));return(await i(this,e,"f")).dispatch("fireIntent",t)}async registerIntentHandler(t,n,r){this.wire.sendAction("interop-client-register-intent-handler").catch((e=>{}));const o=await i(this,e,"f"),s=`intent-handler-${n}`,a=(0,l.wrapIntentHandler)(t,s);try{await o.register(s,a),await o.dispatch("intentHandlerRegistered",{handlerId:s,...r})}catch(e){throw new Error("Unable to register intent handler")}return{unsubscribe:async()=>{o.remove(s)}}}async getCurrentContext(t){this.wire.sendAction("interop-client-get-current-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("getCurrentContext",{contextType:t})}async getInfoForIntent(t){this.wire.sendAction("interop-client-get-info-for-intent").catch((e=>{}));return(await i(this,e,"f")).dispatch("getInfoForIntent",t)}async getInfoForIntentsByContext(t){this.wire.sendAction("interop-client-get-info-for-intents-by-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("getInfoForIntentsByContext",t)}async fireIntentForContext(t){this.wire.sendAction("interop-client-fire-intent-for-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("fireIntentForContext",t)}async joinSessionContextGroup(n){try{const r=i(this,t,"f").get(n);if(r)return r.getUserInstance();const o=await i(this,e,"f"),{hasConflict:s}=await o.dispatch("sessionContextGroup:createIfNeeded",{sessionContextGroupId:n});s&&console.warn(`A (non-session) context group with the name "${n}" already exists. If you are trying to join a Context Group, call joinContextGroup instead.`);const c=new a.default(this.wire,i(this,e,"f"),n);return i(this,t,"f").set(n,c),c.getUserInstance()}catch(e){throw console.error(`Error thrown trying to create Session Context Group with id "${n}": ${e}`),e}}async onDisconnection(t){this.wire.sendAction("interop-client-add-ondisconnection-listener").catch((e=>{}));return(await i(this,e,"f")).onDisconnection((e=>{const{uuid:n}=e;t({type:"interop-broker",topic:"disconnected",brokerName:n})}))}getFDC3Sync(e){switch(e){case"1.2":return new c.Fdc3Module((()=>this),this.wire);case"2.0":return new h.Fdc3Module2((()=>this),this.wire);default:throw new Error(`Invalid FDC3 version provided: ${e}. Must be '1.2' or '2.0'`)}}async getFDC3(e){return this.getFDC3Sync(e)}static async ferryFdc3Call(t,n,r){return(await i(t,e,"f")).dispatch(n,r||null)}};return Ki.InteropClient=u,e=new WeakMap,t=new WeakMap,Ki}var yr,fr,gr,mr={};function vr(){if(yr)return mr;yr=1,Object.defineProperty(mr,"__esModule",{value:!0}),mr.overrideCheck=mr.checkFDC32Overrides=mr.getDefaultViewFdc3VersionFromAppInfo=void 0;const e=Vi();function t(t){return["fdc3HandleFindInstances","handleInfoForIntent","handleInfoForIntentsByContext","fdc3HandleGetAppMetadata","fdc3HandleGetInfo","fdc3HandleOpen","handleFiredIntent","handleFiredIntentForContext"].filter((n=>t[n]===e.InteropBroker.prototype[n]))}return mr.getDefaultViewFdc3VersionFromAppInfo=function({manifest:e,initialOptions:t}){const n=e?.platform?.defaultViewOptions?.fdc3InteropApi??t.defaultViewOptions?.fdc3InteropApi;return["1.2","2.0"].includes(n??"")?n:void 0},mr.checkFDC32Overrides=t,mr.overrideCheck=function(e,n){if(n&&"2.0"===n){const n=t(e);n.length>0&&console.warn(`WARNING: FDC3 2.0 has been set as a default option for Views in this Platform, but the required InteropBroker APIs for FDC3 2.0 compliance have not all been overridden.\nThe following APIs need to be overridden:\n${n.join("\n")}`)}},mr}function Cr(){return gr||(gr=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),i=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),i(function(){if(fr)return Ti;fr=1;var e=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ti,"__esModule",{value:!0}),Ti.InteropModule=void 0;const t=e(n),i=$i,r=d,o=Vi(),a=wr(),c=vr(),h=Tn,l=e=>new e,u="You have attempted to use or modify InteropBroker parameters, which is not allowed. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.";class p extends r.Base{async init(e,n=l){this.wire.sendAction("interop-init").catch((()=>{}));const r=await this.wire.environment.getInteropInfo(this.wire.getFin()),s=(0,i.createUnusableObject)(u),a=(0,i.createWarningObject)(u,(0,t.default)(r)),d=async()=>{throw new Error(u)},p=o.InteropBroker.createClosedConstructor(this.wire,(()=>this.fin.InterApplicationBus.Channel.create(`interop-broker-${e}`)),r);let w;return w=Array.isArray(n)?new((0,h.overrideFromComposables)(...n)(p))(s,d,a):await n(p,s,d,a),(0,c.overrideCheck)(w,r.fdc3Version),w}connectSync(e,t){return this.wire.sendAction("interop-connect-sync").catch((()=>{})),new a.InteropClient(this.wire,this.wire.environment.whenReady().then((()=>this.fin.InterApplicationBus.Channel.connect(`interop-broker-${e}`,{payload:t}))))}}return Ti.InteropModule=p,Ti}(),e),i(wr(),e),i(Vi(),e)}(Li)),Li}var br={},Ir={},Er={},xr={};Object.defineProperty(xr,"__esModule",{value:!0}),xr.getSnapshotSourceChannelName=void 0;xr.getSnapshotSourceChannelName=e=>`snapshot-source-provider-${e.uuid}`;var Ar,Pr,Mr,_r,Or,Sr=s&&s.__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},Rr=s&&s.__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)};Object.defineProperty(Er,"__esModule",{value:!0}),Er.SnapshotSource=void 0;const Fr=d,jr=xr,kr=new Map;class Lr extends Fr.Base{constructor(e,t){super(e),Ar.set(this,void 0),Pr.set(this,(()=>(kr.has(this.identity.uuid)||kr.set(this.identity.uuid,{eventFired:null,clientPromise:null}),kr.get(this.identity.uuid)))),Mr.set(this,(()=>(Rr(this,Pr,"f").call(this).clientPromise||(Rr(this,Pr,"f").call(this).clientPromise=Rr(this,_r,"f").call(this)),Rr(this,Pr,"f").call(this).clientPromise))),_r.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);try{Rr(this,Pr,"f").call(this).eventFired||await Rr(this,Or,"f").call(this);const t=await this.fin.InterApplicationBus.Channel.connect(e,{wait:!1});return t.onDisconnection((()=>{Rr(this,Pr,"f").call(this).clientPromise=null,Rr(this,Pr,"f").call(this).eventFired=null})),t}catch(e){throw Rr(this,Pr,"f").call(this).clientPromise=null,new Error("The targeted SnapshotSource is not currently initialized. Await this object's ready() method.")}})),Or.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);let t,n;const i=new Promise(((e,i)=>{t=e,n=i}));Rr(this,Pr,"f").call(this).eventFired=i;const r=async i=>{try{i.channelName===e&&(t(),await this.fin.InterApplicationBus.Channel.removeListener("connected",r))}catch(e){n(e)}};await this.fin.InterApplicationBus.Channel.on("connected",r)})),Sr(this,Ar,t,"f")}get identity(){return Rr(this,Ar,"f")}async ready(){this.wire.sendAction("snapshot-source-ready").catch((e=>{}));try{await Rr(this,Mr,"f").call(this)}catch(e){await Rr(this,Pr,"f").call(this).eventFired}}async getSnapshot(){this.wire.sendAction("snapshot-source-get-snapshot").catch((e=>{}));const e=await Rr(this,Mr,"f").call(this),t=await e.dispatch("get-snapshot");return(await t).snapshot}async applySnapshot(e){this.wire.sendAction("snapshot-source-apply-snapshot").catch((e=>{}));return(await Rr(this,Mr,"f").call(this)).dispatch("apply-snapshot",{snapshot:e})}}Er.SnapshotSource=Lr,Ar=new WeakMap,Pr=new WeakMap,Mr=new WeakMap,_r=new WeakMap,Or=new WeakMap,Object.defineProperty(Ir,"__esModule",{value:!0}),Ir.SnapshotSourceModule=void 0;const Tr=d,$r=Er,Br=xr;class Gr extends Tr.Base{async init(e){if(this.wire.sendAction("snapshot-source-init").catch((e=>{})),"object"!=typeof e||"function"!=typeof e.getSnapshot||"function"!=typeof e.applySnapshot)throw new Error("you must pass in a valid SnapshotProvider");const t=await this.fin.InterApplicationBus.Channel.create((0,Br.getSnapshotSourceChannelName)(this.fin.me));t.register("get-snapshot",(async()=>({snapshot:await e.getSnapshot()}))),t.register("apply-snapshot",(({snapshot:t})=>e.applySnapshot(t)))}wrapSync(e){return this.wire.sendAction("snapshot-source-wrap-sync").catch((e=>{})),new $r.SnapshotSource(this.wire,e)}async wrap(e){return this.wire.sendAction("snapshot-source-wrap").catch((e=>{})),this.wrapSync(e)}}Ir.SnapshotSourceModule=Gr,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Ir,e),n(Er,e)}(br),Object.defineProperty(a,"__esModule",{value:!0});var Wr=a.Fin=void 0;const Hr=t,Nr=c,Dr=ie(),Ur=Z(),Vr=de,zr=en,Kr=rn,qr=un,Jr=bn,Yr=J(),Zr=An,Qr=ki,Xr=Cr(),eo=br;class to extends Hr.EventEmitter{constructor(e){super(),this.wire=e,this.System=new Nr.System(e),this.Window=new Dr._WindowModule(e),this.Application=new Ur.ApplicationModule(e),this.InterApplicationBus=new Vr.InterApplicationBus(e),this.Clipboard=new zr.Clipboard(e),this.ExternalApplication=new Kr.ExternalApplicationModule(e),this.Frame=new qr._FrameModule(e),this.GlobalHotkey=new Jr.GlobalHotkey(e),this.Platform=new Zr.PlatformModule(e,this.InterApplicationBus.Channel),this.View=new Yr.ViewModule(e),this.Interop=new Xr.InteropModule(e),this.SnapshotSource=new eo.SnapshotSourceModule(e),e.registerFin(this),this.me=(0,Qr.getMe)(e),e.on("disconnected",(()=>{this.emit("disconnected")}))}}Wr=a.Fin=to;var no={},io={};function ro(e){return"string"==typeof e.manifestUrl}function oo(e){return ao(e)&&"string"==typeof e.address}function so(e){return oo(e)&&"string"==typeof e.token}function ao(e){return"string"==typeof e.uuid}function co(e){return e.runtime&&"string"==typeof e.runtime.version}function ho(e){return ao(e)&&co(e)}Object.defineProperty(io,"__esModule",{value:!0}),io.isInternalConnectConfig=io.isPortDiscoveryConfig=io.isNewConnectConfig=io.isConfigWithReceiver=io.isRemoteConfig=io.isExistingConnectConfig=io.isExternalConfig=void 0,io.isExternalConfig=ro,io.isExistingConnectConfig=oo,io.isRemoteConfig=so,io.isConfigWithReceiver=function(e){return"object"==typeof e.receiver&&so({...e,address:""})},io.isNewConnectConfig=ho,io.isPortDiscoveryConfig=function(e){return ro(e)&&co(e)||ho(e)},io.isInternalConnectConfig=function(e){return oo(e)||ho(e)};var lo={},uo={};Object.defineProperty(uo,"__esModule",{value:!0}),uo.EmitterMap=void 0;const po=t;function wo(e){return Buffer.from(e).toString("base64")}uo.EmitterMap=class{constructor(){this.storage=new Map}hashKeys(e){return e.map(wo).join("/")}getOrCreate(e){const t=this.hashKeys(e);return this.storage.has(t)||this.storage.set(t,new po.EventEmitter),this.storage.get(t)}has(e){return this.storage.has(this.hashKeys(e))}delete(e){const t=this.hashKeys(e);return this.storage.delete(t)}},Object.defineProperty(lo,"__esModule",{value:!0});const yo=uo;class fo extends yo.EmitterMap{constructor(){super(...arguments),this.dispatchEvent=e=>{if(function(e){return"process-desktop-event"===e.action}(e)){const{payload:t}=e,n=function(e){const{topic:t}=e;if("frame"===t||"window"===t||"view"===t){const{uuid:n,name:i}=e;return[t,n,i]}if("application"===t){const{uuid:n}=e;return[t,n]}return[t]}(t);if(this.has(n))return this.getOrCreate(n).emit(t.type,t),!0}return!1}}}lo.default=fo;var go,mo,vo=s&&s.__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},Co=s&&s.__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)},bo=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(no,"__esModule",{value:!0});var Io=no.Transport=void 0;const Eo=t,xo=io,Ao=g,Po=bo(lo),Mo=ki,_o=ke;class Oo extends Eo.EventEmitter{constructor(e,t,n){super(),this.wireListeners=new Map,this.topicRefMap=new Map,this.eventAggregator=new Po.default,this.messageHandlers=[this.eventAggregator.dispatchEvent],go.set(this,void 0),mo.set(this,void 0),this.connectSync=()=>{Co(this,go,"f").connectSync()},this.getPort=()=>Co(this,go,"f").getPort(),vo(this,go,new e(this.onmessage.bind(this)),"f"),this.environment=t,this.sendRaw=Co(this,go,"f").send.bind(Co(this,go,"f")),this.registerMessageHandler(this.handleMessage.bind(this)),Co(this,go,"f").on("disconnected",(()=>{for(const[,{handleNack:e}]of this.wireListeners)e({reason:"Remote connection has closed"});this.wireListeners.clear(),this.emit("disconnected")}));const{uuid:i,name:r}=n,o=this.environment.getCurrentEntityType();this.me=(0,Mo.getBaseMe)(o,i,r)}getFin(){if(!Co(this,mo,"f"))throw new Error("No Fin object registered for this transport");return Co(this,mo,"f")}registerFin(e){if(Co(this,mo,"f"))throw new Error("Fin object has already been registered for this transport");vo(this,mo,e,"f")}shutdown(){return Co(this,go,"f").shutdown()}async connect(e){if((0,xo.isConfigWithReceiver)(e))return await Co(this,go,"f").connect(e.receiver),this.authorize(e);if((0,xo.isRemoteConfig)(e))return this.connectRemote(e);if((0,xo.isExistingConnectConfig)(e))return this.connectByPort(e);if((0,xo.isNewConnectConfig)(e)){const t=await this.environment.retrievePort(e);return this.connectByPort({...e,address:`ws://localhost:${t}`})}}async connectRemote(e){return await Co(this,go,"f").connect(new(this.environment.getWsConstructor())(e.address)),this.authorize(e)}async connectByPort(e){const{address:t,uuid:n}=e,i={...e,type:"file-token"},r=Co(this,go,"f");await r.connect(new(this.environment.getWsConstructor())(e.address));const o=await this.sendAction("request-external-authorization",{uuid:n,type:"file-token"},!0);if("external-authorization-response"!==o.action)throw new Ao.UnexpectedActionError(o.action);return await this.environment.writeToken(o.payload.file,o.payload.token),this.authorize(i)}async authorize(e){const t=await this.sendAction("request-authorization",e,!0);if("authorization-response"!==t.action)throw new Ao.UnexpectedActionError(t.action);if(!0!==t.payload.success)throw new Ao.RuntimeError(t.payload)}sendAction(e,t={},n=!1){let i=()=>{};const r=Ao.RuntimeError.getCallSite(1),o=this.environment.getNextMessageId(),s=new Promise(((s,a)=>{i=a;const c={action:e,payload:t,messageId:o},d=Co(this,go,"f");return this.addWireListener(o,s,(e=>this.nackHandler(e,a,r)),n),d.send(c).catch(a)}));return Object.assign(s,{cancel:i,messageId:o})}nackHandler(e,t,n){t("string"==typeof e?e:new Ao.RuntimeError(e,n))}ferryAction(e){return new Promise(((t,n)=>{const i=this.environment.getNextMessageId();e.messageId=i;const r=e=>{t(e.payload)};return Co(this,go,"f").send(e).then((()=>this.addWireListener(i,r,(e=>this.nackHandler(e,n)),!1))).catch(n)}))}registerMessageHandler(e){this.messageHandlers.push(e)}addWireListener(e,t,n,i){i?this.uncorrelatedListener=t:this.wireListeners.has(e)?n({reason:"Duplicate handler id",error:(0,_o.errorToPOJO)(new Ao.DuplicateCorrelationError(String(e)))}):this.wireListeners.set(e,{resolve:t,handleNack:n})}onmessage(e){for(const t of this.messageHandlers)t.call(null,e)}handleMessage(e){const t=e.correlationId||NaN;if("correlationId"in e){if(!this.wireListeners.has(t))return!1;{const{resolve:n,handleNack:i}=this.wireListeners.get(t);"ack"!==e.action?i({reason:"Did not receive ack action",error:(0,_o.errorToPOJO)(new Ao.NoAckError(e.action))}):"payload"in e?e.payload.success?n.call(null,e):i(e.payload):"string"==typeof e.reason?i(e):(console.warn("Received invalid response from core",e),i({reason:"invalid response shape"})),this.wireListeners.delete(t)}}else this.uncorrelatedListener&&this.uncorrelatedListener.call(null,e),this.uncorrelatedListener=()=>{};return!0}}Io=no.Transport=Oo,go=new WeakMap,mo=new WeakMap;const So=(...e)=>({log:(...t)=>console.debug(`[${(new Date).toISOString()}]`,...(e=>e.map((e=>`[${e}]`)))(e),...t),getLogger:(...t)=>So(...e,...t)}),Ro=So("@openfin/core-web/client");function Fo(e,t){if(!function(e){return"string"==typeof e}(e))throw new Error(`Property ${t} has invalid type. Expected string, got ${typeof e}.`)}const jo="web-broker-ports-ready",ko=Ro.getLogger("get-web-interop-ports");function Lo(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)}function To(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}"function"==typeof SuppressedError&&SuppressedError;const $o=e=>{var n,i,r;return r=class extends t.EventEmitter{constructor(t){super(),n.set(this,void 0),i.set(this,!1),this.connectSync=()=>{Lo(this,i,"f")||(e.addEventListener("message",(e=>{e.data?.topic?.startsWith("wire-message")&&e.data.message&&Lo(this,n,"f").call(this,{...JSON.parse(e.data.message),ports:e.ports})})),e.start())},this.connect=async()=>{this.connectSync()},this.send=t=>(e.postMessage({topic:"wire-message",message:JSON.stringify(t)}),Promise.resolve()),this.shutdown=async()=>{e.close()},To(this,n,t,"f")}getPort(){return e}},n=new WeakMap,i=new WeakMap,r};var Bo={},Go={};Object.defineProperty(Go,"__esModule",{value:!0}),Go.BaseEnvironment=void 0;const Wo=vr();Go.BaseEnvironment=class{async getViewWindowIdentity(e,t){const{identity:n}=await e.View.wrapSync(t).getCurrentWindow();return n}async getInteropInfo(e){const t=await e.Application.getCurrentSync().getInfo().catch((()=>null)),n=t?.initialOptions?.interopBrokerConfiguration??{};return{fdc3Version:t?(0,Wo.getDefaultViewFdc3VersionFromAppInfo)(t):void 0,...n,fdc3Info:{providerVersion:await e.System.getVersion(),provider:"OpenFin"}}}},Object.defineProperty(Bo,"__esModule",{value:!0});var Ho=Bo.BrowserEnvironment=void 0;const No=Go;class Do extends No.BaseEnvironment{constructor(){super(...arguments),this.type="other",this.getRandomId=()=>{const e=new Uint32Array(1);return window.crypto.getRandomValues(e)[0].toString(32)}}getAdapterVersionSync(){return""}observeBounds(e,t){throw new Error("Method not implemented.")}layoutAllowedInContext(e){return!1}initLayoutManager(e,t,n){throw new Error("Method not implemented.")}applyLayoutSnapshot(e,t,n){throw new Error("Method not implemented.")}createLayout(e,t){throw new Error("Method not implemented.")}destroyLayout(e,t){throw new Error("Method not implemented.")}resolveLayout(e,t){throw new Error("Method not implemented.")}initPlatform(...e){throw new Error("Method not implemented.")}writeToken(e,t){return Promise.resolve("")}retrievePort(e){throw new Error("Method not implemented.")}getNextMessageId(){return this.getRandomId()}createChildContent(e){throw new Error("Method not implemented.")}getWebWindow(e){throw new Error("Method not implemented.")}getCurrentEntityIdentity(){throw new Error("Method not implemented.")}getCurrentEntityType(){return"external connection"}raiseEvent(e,t){throw new Error("Method not implemented.")}getUrl(){return location.href}getDefaultChannelOptions(){return{create:{},connect:{}}}getRtcPeer(){return new RTCPeerConnection}getWsConstructor(){return WebSocket}whenReady(){return Promise.resolve()}}Ho=Bo.BrowserEnvironment=Do;const Uo=e=>"platform"in e&&void 0!==e.platform;var Vo,zo;class Ko extends Ho{constructor(e){super(),this.connectConfig=e,Vo.set(this,void 0),zo.set(this,new W((async()=>Promise.resolve().then((function(){return __webpack_require__(/*! ./main-b14f67c9.js */ "./node_modules/@openfin/core-web/out/main-b14f67c9.js")}))))),Uo(e)&&this.validatePlatformOptions(e)}getAdapterVersionSync(){return"0.39.21"}validatePlatformOptions({platform:e}){if(!("layoutSnapshot"in e))throw new Error("Platform options are missing layoutSnapshot. Please provide a layoutSnapshot in the platform options.");if("windows"in e||"windows"in e.layoutSnapshot)throw new Error("It appears you tried to call connect() with a snapshot object from an OpenFin desktop environment. Note that connect() expects to be called with a platform property with this structure: { platform: { layoutSnapshot } }. To get a layoutSnapshot of the expected structure, use fin.Platform.Layout.getCurrentLayoutManagerSync().getLayoutSnapshot() in v34+ in your desktop environment.");const{layouts:t}=e.layoutSnapshot;Object.entries(t).map((([e,t])=>{if("object"!=typeof t||null===t)throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must be an object.`);if(!("content"in t))throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must contain a 'content' property.`)}))}async getInteropInfo(e){return{...{contextGroups:void 0,logging:{beforeAction:{enabled:!1},afterAction:{enabled:!1}}},fdc3Version:void 0,fdc3Info:{providerVersion:"0.39.21",provider:"OpenFin Web"}}}layoutAllowedInContext(e){return!0}async initLayoutManager(e,t,n){if(Lo(this,Vo,"f"))throw new Error("Layout already initialized.");if(!Uo(this.connectConfig))throw new Error("Platform options are missing from connection config.");const{WebLayoutEntryPoint:i}=await Lo(this,zo,"f").getValue();return To(this,Vo,new i(this.connectConfig),"f"),await Lo(this,Vo,"f").initLayoutManager(e,t,n)}async applyLayoutSnapshot(e,t,n){Lo(this,Vo,"f")?.applyLayoutSnapshot(e,t,n)}async createLayout(e,t){return Lo(this,Vo,"f")?.createLayout(e,t)}async destroyLayout(e,t){return Lo(this,Vo,"f")?.destroyLayout(e,t)}async getViewWindowIdentity(e,t){return Promise.resolve({uuid:t.uuid,name:t.uuid})}}Vo=new WeakMap,zo=new WeakMap;const qo=()=>{const e=((e,t)=>{const n=new RegExp(`^${t}<(?.*)>$`).exec(e)?.groups?.meta;if(n)try{return JSON.parse(atob(n))}catch(e){throw new Error(`Failed to decode JSON from ${n}.`)}})(window.name,"of-frame");if(e)try{const{name:t,uuid:n,brokerUrl:i,providerId:r,contextGroup:o}=e;return Fo(i,"brokerUrl"),Fo(n,"uuid"),Fo(t,"name"),{identity:{name:t,uuid:n},brokerUrl:i,interopConfig:{providerId:r,currentContextGroup:o}}}catch(e){throw new Error(`Unexpected error occurred when inferring platform information: ${e.stack}`)}},Jo=()=>{const e=r.v4();return{uuid:e,name:e}},Yo=async e=>{if("enabled"===e.connectionInheritance){const t=await(async e=>{const t=qo();if(t){const{validateOptions:n=(()=>!0)}=e,{identity:i,...r}=t;if(!await n(r))throw new Error("Parent options were rejected by validateOptions.");return t}})(e);if(t)return t}if(!e.options){const t="enabled"===e.connectionInheritance?"Broker URL was not specified nor provided by a platform container.":"Connection inheritance is disabled but no options were provided.";throw new Error(t)}return{...e.options,identity:Jo()}};exports.__classPrivateFieldGet=Lo,exports.__classPrivateFieldSet=To,exports.apiExposer=Gn,exports.commonjsGlobal=s,exports.connect=async t=>{try{Ro.log("Establishing connection",t);const{brokerUrl:n,identity:i,timeout:r,interopConfig:s}=await Yo(t),{workerPort:a,iframeBrokerPort:c}=await(async(e,t,n)=>{const{origin:i}=new URL(e),r=document.createElement("IFRAME");let s;r.style.display="none";try{return await new Promise(((a,c)=>{const d=e=>{if(e.source===r.contentWindow&&e.data?.topic===`ack-${jo}`){if(e.origin!==i)c(new Error(`Broker redirected to unexpected origin ${e.origin}, expected ${i}.`));else if(e.data.success){const[t,n]=e.ports;a({iframeBrokerPort:t,workerPort:n})}else c(new m(e.data));window.removeEventListener("message",d),clearTimeout(s)}};window.addEventListener("message",d),ko.log(`Connecting to broker ${e}`),r.setAttribute("src",e),r.setAttribute("name",o(t,"of-broker")),document.body.appendChild(r),ko.log("Iframe loaded, awaiting init message from iframe"),n&&(s=setTimeout((()=>{window.removeEventListener("message",d),document.body.removeChild(r),c(new Error("Worker did not initialize in time"))}),n))}))}catch(e){throw new Error(`Failed to initialise Fin Web Client. ${e.message}`,{cause:e})}})(n,i,r);Ro.log("Successfully established connection to shared worker");const d={entityType:"external connection",...i};a.start(),c.start();const h=((t,n,i)=>{const r=$o(n),o=new Ko(t),s=new Io(r,o,i);return s.connectSync(),window.Buffer=e.Buffer,new Wr(s)})(t,a,d);return s?.providerId&&(h.me.interop=h.Interop.connectSync(s.providerId),s?.currentContextGroup&&h.me.interop.joinContextGroup(s.currentContextGroup).catch((e=>{console.warn(`Error joining specified context group: ${s?.currentContextGroup}, continuing`,e)}))),{...h,me:{...h.me,identity:{uuid:h.me.uuid,name:h.me.name}}}}catch(e){throw new Error(`An error occured during web-interop connection: ${e.message}`)}},exports.decorators=Nn,exports.encodeOptions=o,exports.layout_constants=ai,exports.lazy=G; +var e=__webpack_require__(/*! buffer/ */ "../../node_modules/buffer/index.js"),t=__webpack_require__(/*! events */ "../../node_modules/events/events.js"),n=__webpack_require__(/*! lodash/cloneDeep */ "../../node_modules/lodash/cloneDeep.js"),i=__webpack_require__(/*! lodash/isEqual */ "../../node_modules/lodash/isEqual.js"),r=__webpack_require__(/*! uuid */ "../../node_modules/uuid/dist/esm-browser/index.js");const o=(e,t)=>`${t}<${btoa(JSON.stringify(e))}>`;var s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof __webpack_require__.g?__webpack_require__.g:"undefined"!=typeof self?self:{},a={},c={},d={},h={};async function l(e){const t=[];for(const n of e){const e=await n();t.push(e)}return t}Object.defineProperty(h,"__esModule",{value:!0}),h.promiseMapSerial=h.serial=h.promiseMap=h.promisify=void 0,h.promisify=function(e){return(...t)=>new Promise(((n,i)=>{e(...t,((e,t)=>e?i(e):n(t)))}))},h.promiseMap=async function(e,t){return Promise.all(e.map(t))},h.serial=l,h.promiseMapSerial=async function(e,t){return l(e.map(((e,n,i)=>()=>t(e,n,i))))};var u,p=s&&s.__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},w=s&&s.__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)};Object.defineProperty(d,"__esModule",{value:!0}),d.Reply=d.EmitterBase=d.Base=void 0;const y=h;class f{constructor(e){this.isNodeEnvironment=()=>"node"===this.wire.environment.type,this.isOpenFinEnvironment=()=>"openfin"===this.wire.environment.type,this.isBrowserEnvironment=()=>"other"===this.wire.environment.type,this.wire=e}get fin(){return this.wire.getFin()}get me(){return this.wire.me}}d.Base=f;d.EmitterBase=class extends f{constructor(e,t,...n){super(e),this.topic=t,u.set(this,void 0),this.eventNames=()=>this.hasEmitter()?this.getOrCreateEmitter().eventNames():[],this.emit=(e,t,...n)=>!!this.hasEmitter()&&this.getOrCreateEmitter().emit(e,t,...n),this.hasEmitter=()=>this.wire.eventAggregator.has(w(this,u,"f")),this.getOrCreateEmitter=()=>this.wire.eventAggregator.getOrCreate(w(this,u,"f")),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[],this.listenerCount=e=>this.hasEmitter()?this.getOrCreateEmitter().listenerCount(e):0,this.registerEventListener=async(e,t={},n,i)=>{const r={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e},o=this.getOrCreateEmitter();n(o);try{await this.wire.sendAction("subscribe-to-desktop-event",r)}catch(e){throw i(o),this.deleteEmitterIfNothingRegistered(o),e}},this.deregisterEventListener=async(e,t={})=>{if(this.hasEmitter()){const n={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e};await this.wire.sendAction("unsubscribe-to-desktop-event",n).catch((()=>null));return this.getOrCreateEmitter()}return Promise.resolve()},p(this,u,[t,...n],"f"),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[]}async on(e,t,n){return await this.registerEventListener(e,n,(n=>{n.on(e,t)}),(n=>{n.removeListener(e,t)})),this}async addListener(e,t,n){return this.on(e,t,n)}async once(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.once(e,i),n.once(e,t)}),(n=>{n.removeListener(e,i),n.removeListener(e,t)})),this}async prependListener(e,t,n){return await this.registerEventListener(e,n,(n=>{n.prependListener(e,t)}),(n=>{n.removeListener(e,t)})),this}async prependOnceListener(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.prependOnceListener(e,t),n.once(e,i)}),(n=>{n.removeListener(e,t),n.removeListener(e,i)})),this}async removeListener(e,t,n){const i=await this.deregisterEventListener(e,n);return i&&(i.removeListener(e,t),this.deleteEmitterIfNothingRegistered(i)),this}async deregisterAllListeners(e){const t={...this.identity,type:e,topic:this.topic};if(this.hasEmitter()){const e=this.getOrCreateEmitter(),n=e.listenerCount(t.type),i=[];for(let e=0;enull)));return await Promise.all(i),e}}async removeAllListeners(e){const t=async e=>{const t=await this.deregisterAllListeners(e);t&&(t.removeAllListeners(e),this.deleteEmitterIfNothingRegistered(t))};if(e)await t(e);else if(this.hasEmitter()){const e=this.getOrCreateEmitter().eventNames();await(0,y.promiseMap)(e,t)}return this}deleteEmitterIfNothingRegistered(e){0===e.eventNames().length&&this.wire.eventAggregator.delete(w(this,u,"f"))}},u=new WeakMap;d.Reply=class{};var g={};Object.defineProperty(g,"__esModule",{value:!0});var m=g.RuntimeError=g.NotSupportedError=g.NotImplementedError=g.NoAckError=g.DuplicateCorrelationError=g.UnexpectedActionError=g.DisconnectedError=void 0;class v extends Error{constructor(e){super(`Expected websocket state OPEN but found ${e}`),this.readyState=e}}g.DisconnectedError=v;class C extends Error{}g.UnexpectedActionError=C;class b extends Error{}g.DuplicateCorrelationError=b;class I extends Error{}g.NoAckError=I;class E extends Error{}g.NotImplementedError=E;class x extends Error{}g.NotSupportedError=x;class A extends Error{constructor(e){const{message:t,name:n,stack:i,...r}=e;super(t),this.name=n||"Error",this.stack=i??this.toString(),Object.keys(r).forEach((e=>{this[e]=r[e]}))}}class P extends Error{static getCallSite(e=0){const t=Error.stackTraceLimit,n=e+1;Error.stackTraceLimit=t+n;const i=Error.prepareStackTrace;Error.prepareStackTrace=(e,t)=>t;const r=(new Error).stack?.slice(n)??[];return Error.prepareStackTrace=i,Error.stackTraceLimit=t,r}static prepareStackTrace(e,t){if("function"==typeof Error.prepareStackTrace)return Error.prepareStackTrace(e,t);let n="";n+=e.name||"Error",n+=`: ${e.message||""}`;for(const e of t)n+=`\n at ${e.toString()}`;return n}constructor(e,t){const{reason:n,error:i}=e;super(n),this.name="RuntimeError",i?.stack&&(this.cause=new A(i)),t&&(this.stack=P.prepareStackTrace(this,t))}}m=g.RuntimeError=P;var M={},_={},O={};Object.defineProperty(O,"__esModule",{value:!0}),O.validateIdentity=void 0,O.validateIdentity=function(e){let t;return"object"==typeof e&&"string"==typeof e.uuid||(t="Not a valid identity object"),t};var S={},R={},F={},j={},k={},L={},T={};Object.defineProperty(T,"__esModule",{value:!0}),T.handleDeprecatedWarnings=void 0;var $;T.handleDeprecatedWarnings=e=>{(e.contentNavigation?.whitelist||e.contentNavigation?.blacklist||e.contentRedirect?.whitelist||e.contentRedirect?.blacklist)&&console.warn("The properties 'whitelist' and 'blacklist' have been marked as deprecated and will be removed in a future version. Please use 'allowlist' and 'denylist'.")};var B={},G={};Object.defineProperty(G,"__esModule",{value:!0}),G.AsyncRetryableLazy=W=G.Lazy=void 0;var W=G.Lazy=class{constructor(e){this.producerFn=e}getValue(){return this.value||(this.value=this.producerFn()),this.value}};G.AsyncRetryableLazy=class{constructor(e){this.producerFn=e}async getValue(){return this.promise||(this.promise=this.producerFn().catch((e=>{throw delete this.promise,e}))),this.promise}};var H={};Object.defineProperty(H,"__esModule",{value:!0}),H.WebContents=void 0;const N=d;class D extends N.EmitterBase{constructor(e,t,n){super(e,n,t.uuid,t.name),this.identity=t,this.entityType=n}capturePage(e){return this.wire.sendAction("capture-page",{options:e,...this.identity}).then((({payload:e})=>e.data))}executeJavaScript(e){return this.wire.sendAction("execute-javascript-in-window",{...this.identity,code:e}).then((({payload:e})=>e.data))}getZoomLevel(){return this.wire.sendAction("get-zoom-level",this.identity).then((({payload:e})=>e.data))}setZoomLevel(e){return this.wire.sendAction("set-zoom-level",{...this.identity,level:e}).then((()=>{}))}navigate(e){return this.wire.sendAction("navigate-window",{...this.identity,url:e}).then((()=>{}))}navigateBack(){return this.wire.sendAction("navigate-window-back",{...this.identity}).then((()=>{}))}async navigateForward(){await this.wire.sendAction("navigate-window-forward",{...this.identity})}stopNavigation(){return this.wire.sendAction("stop-window-navigation",{...this.identity}).then((()=>{}))}reload(e=!1){return this.wire.sendAction("reload-window",{ignoreCache:e,...this.identity}).then((()=>{}))}print(e={}){return this.wire.sendAction("print",{...this.identity,options:e}).then((()=>{}))}findInPage(e,t){return this.wire.sendAction("find-in-page",{...this.identity,searchTerm:e,options:t}).then((({payload:e})=>e.data))}stopFindInPage(e){return this.wire.sendAction("stop-find-in-page",{...this.identity,action:e}).then((()=>{}))}getPrinters(){return this.wire.sendAction("get-printers",{...this.identity}).then((({payload:e})=>e.data))}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){await this.wire.sendAction("focus-window",{emitSynthFocused:e,...this.identity})}async showDeveloperTools(){await this.wire.sendAction("show-developer-tools",this.identity)}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction("get-process-info",this.identity);return e}async getSharedWorkers(){return this.wire.sendAction("get-shared-workers",this.identity).then((({payload:e})=>e.data))}async inspectSharedWorker(){await this.wire.sendAction("inspect-shared-worker",{...this.identity})}async inspectSharedWorkerById(e){await this.wire.sendAction("inspect-shared-worker-by-id",{...this.identity,workerId:e})}async inspectServiceWorker(){await this.wire.sendAction("inspect-service-worker",{...this.identity})}async showPopupWindow(e){if(this.wire.sendAction(`${this.entityType}-show-popup-window`,this.identity).catch((()=>{})),e?.onPopupReady){const t=async({popupName:t})=>{try{const n=this.fin.Window.wrapSync({uuid:this.fin.me.uuid,name:t});await e.onPopupReady(n)}catch(e){throw new Error(`Something went wrong during onPopupReady execution: ${e}`)}};await this.once("popup-ready",t)}const{payload:t}=await this.wire.sendAction("try-create-popup-window",{options:{...e,hasResultCallback:!!e?.onPopupResult,hasReadyCallback:!!e?.onPopupReady},...this.identity}),{data:{willOpen:n,options:i}}=t;n&&await this.fin.Window.create(i.initialOptions);if(e?.onPopupResult){const t=async t=>{await e.onPopupResult((e=>{const{name:t,uuid:n,result:i,data:r}=e,o={identity:{name:t,uuid:n},result:i};return r&&(o.data=r),o})(t))},n=async()=>{await this.removeListener("popup-result",t)};await this.on("popup-result",t),await this.once("popup-teardown",n)}const{payload:r}=await this.wire.sendAction("show-popup-window",{options:i,...this.identity});return r.data}}var U,V,z,K,q;function J(){return V||(V=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(function(){if($)return L;$=1,Object.defineProperty(L,"__esModule",{value:!0}),L.ViewModule=void 0;const e=d,t=O,n=J(),i=T;class r extends e.Base{async create(e){const{uuid:t}=this.wire.me;if(!e.name||"string"!=typeof e.name)throw new Error("Please provide a name property as a string in order to create a View.");return(0,i.handleDeprecatedWarnings)(e),this.wire.environment.childViews?await this.wire.environment.createChildContent({entityType:"view",options:{...e,uuid:t}}):await this.wire.sendAction("create-view",{...e,uuid:t}),this.wrapSync({uuid:t,name:e.name})}async wrap(e){this.wire.sendAction("view-wrap").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}wrapSync(e){this.wire.sendAction("view-wrap-sync").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}getCurrent(){if(this.wire.sendAction("view-get-current").catch((e=>{})),!this.wire.me.isView)throw new Error("You are not in a View context");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction("view-get-current-sync").catch((e=>{})),!this.wire.me.isView)throw new Error("You are not in a View context");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return L.ViewModule=r,L}(),e),n(function(){if(U)return B;var e;U=1,Object.defineProperty(B,"__esModule",{value:!0}),B.View=void 0;const t=g,n=G,i=H,r=ie();class o extends i.WebContents{constructor(i,o){super(i,o,"view"),this.identity=o,e.set(this,new n.Lazy((()=>this.fin.Platform.wrapSync(this.identity).getClient()))),this.attach=async e=>{await this.wire.sendAction("attach-view",{target:e,...this.identity})},this.destroy=async()=>{await this.wire.sendAction("destroy-view",{...this.identity})},this.show=async()=>{await this.wire.sendAction("show-view",{...this.identity})},this.showAt=async(e,t={})=>{await this.wire.sendAction("show-view-at",{bounds:e,...this.identity,options:t})},this.bringToFront=async()=>{await this.wire.sendAction("bring-view-to-front",{...this.identity})},this.hide=async()=>{await this.wire.sendAction("hide-view",{...this.identity})},this.setBounds=async e=>{await this.wire.sendAction("set-view-bounds",{bounds:e,...this.identity})},this.getBounds=async()=>(await this.wire.sendAction("get-view-bounds",{...this.identity})).payload.data,this.getInfo=async()=>(await this.wire.sendAction("get-view-info",{...this.identity})).payload.data,this.getParentLayout=async()=>(this.wire.sendAction("view-get-parent-layout",{...this.identity}).catch((()=>{})),this.fin.Platform.Layout.getLayoutByViewIdentity(this.identity)),this.getOptions=async()=>this.wire.sendAction("get-view-options",{...this.identity}).then((({payload:e})=>e.data)),this.updateOptions=async e=>this.wire.sendAction("update-view-options",{options:e,...this.identity}).then((()=>{})),this.getCurrentWindow=async()=>{const{payload:{data:e}}=await this.wire.sendAction("get-view-window",{...this.identity});return new r._Window(this.wire,e)},this.getCurrentStack=async()=>{this.wire.sendAction("view-get-current-stack").catch((()=>{}));try{return(await this.getParentLayout()).getStackByViewIdentity(this.identity)}catch(e){throw new t.RuntimeError({reason:"This view does not belong to a stack.",error:e})}},this.triggerBeforeUnload=async()=>(await this.wire.sendAction("trigger-before-unload",{...this.identity})).payload.data,this.bindToElement=async e=>{if(!e)throw new Error("Element not found.");return this.wire.environment.observeBounds(e,(async e=>this.setBounds(e)))}}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){const t=await this.getCurrentWindow();await t.focusedWebViewWasChanged(),await super.focus({emitSynthFocused:e})}}return B.View=o,e=new WeakMap,B}(),e)}(k)),k}function Y(){if(z)return j;z=1,Object.defineProperty(j,"__esModule",{value:!0}),j.Application=void 0;const e=d,t=ie(),n=J();class i extends e.EmitterBase{constructor(e,n){super(e,"application",n.uuid),this.identity=n,this.window=new t._Window(this.wire,{uuid:this.identity.uuid,name:this.identity.uuid})}windowListFromIdentityList(e){const n=[];return e.forEach((e=>{n.push(new t._Window(this.wire,{uuid:e.uuid,name:e.name}))})),n}isRunning(){return this.wire.sendAction("is-application-running",this.identity).then((({payload:e})=>e.data))}async quit(e=!1){try{await this._close(e),await this.wire.sendAction("destroy-application",{force:e,...this.identity})}catch(e){if(!["Remote connection has closed","Could not locate the requested application"].some((t=>e.message.includes(t))))throw e}}async _close(e=!1){try{await this.wire.sendAction("close-application",{force:e,...this.identity})}catch(e){if(!e.message.includes("Remote connection has closed"))throw e}}close(e=!1){return console.warn("Deprecation Warning: Application.close is deprecated Please use Application.quit"),this.wire.sendAction("application-close",this.identity).catch((e=>{})),this._close(e)}getChildWindows(){return this.wire.sendAction("get-child-windows",this.identity).then((({payload:e})=>{const t=[];return e.data.forEach((e=>{t.push({uuid:this.identity.uuid,name:e})})),this.windowListFromIdentityList(t)}))}getManifest(){return this.wire.sendAction("get-application-manifest",this.identity).then((({payload:e})=>e.data))}getParentUuid(){return this.wire.sendAction("get-parent-application",this.identity).then((({payload:e})=>e.data))}getShortcuts(){return this.wire.sendAction("get-shortcuts",this.identity).then((({payload:e})=>e.data))}async getViews(){const{payload:e}=await this.wire.sendAction("application-get-views",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}getZoomLevel(){return this.wire.sendAction("get-application-zoom-level",this.identity).then((({payload:e})=>e.data))}getWindow(){return this.wire.sendAction("application-get-window",this.identity).catch((e=>{})),Promise.resolve(this.window)}registerUser(e,t){return this.wire.sendAction("register-user",{userName:e,appName:t,...this.identity}).then((()=>{}))}removeTrayIcon(){return this.wire.sendAction("remove-tray-icon",this.identity).then((()=>{}))}restart(){return this.wire.sendAction("restart-application",this.identity).then((()=>{}))}run(){return console.warn("Deprecation Warning: Application.run is deprecated Please use fin.Application.start"),this.wire.sendAction("application-run",this.identity).catch((e=>{})),this._run()}_run(e={}){return this.wire.sendAction("run-application",{manifestUrl:this._manifestUrl,opts:e,...this.identity}).then((()=>{}))}scheduleRestart(){return this.wire.sendAction("relaunch-on-close",this.identity).then((()=>{}))}async sendApplicationLog(){const{payload:e}=await this.wire.sendAction("send-application-log",this.identity);return e.data}async setJumpList(e){await this.wire.sendAction("set-jump-list",{config:e,...this.identity})}setTrayIcon(e){return this.wire.sendAction("set-tray-icon",{enabledIcon:e,...this.identity}).then((()=>{}))}setShortcuts(e){return this.wire.sendAction("set-shortcuts",{data:e,...this.identity}).then((()=>{}))}async setShortcutQueryParams(e){await this.wire.sendAction("set-shortcut-query-args",{data:e,...this.identity})}setZoomLevel(e){return this.wire.sendAction("set-application-zoom-level",{level:e,...this.identity}).then((()=>{}))}async setAppLogUsername(e){await this.wire.sendAction("set-app-log-username",{data:e,...this.identity})}getTrayIconInfo(){return this.wire.sendAction("get-tray-icon-info",this.identity).then((({payload:e})=>e.data))}hasTrayIcon(){return this.wire.sendAction("has-tray-icon",this.identity).then((({payload:e})=>e.data))}terminate(){return this.wire.sendAction("terminate-application",this.identity).then((()=>{}))}wait(){return this.wire.sendAction("wait-for-hung-application",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction("get-info",this.identity).then((({payload:e})=>e.data))}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction("application-get-process-info",this.identity);return e}async setFileDownloadLocation(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t};await this.wire.sendAction("set-file-download-location",{...n,downloadLocation:e})}async getFileDownloadLocation(){const{payload:{data:e}}=await this.wire.sendAction("get-file-download-location",this.identity);return e}async showTrayIconPopupMenu(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t},{payload:i}=await this.wire.sendAction("show-tray-icon-popup-menu",{...n,options:e});return i.data}async closeTrayIconPopupMenu(){const{name:e}=this.wire.me,t={uuid:this.identity.uuid,name:e};await this.wire.sendAction("close-tray-icon-popup-menu",{...t})}}return j.Application=i,j}function Z(){return q||(q=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(function(){if(K)return F;K=1,Object.defineProperty(F,"__esModule",{value:!0}),F.ApplicationModule=void 0;const e=d,t=O,n=Y();class i extends e.Base{async wrap(e){this.wire.sendAction("wrap-application").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}wrapSync(e){this.wire.sendAction("wrap-application-sync").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}async _create(e){return void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&void 0===e.isPlatformController&&(e.autoShow=!0),await this.wire.sendAction("create-application",e),this.wrap({uuid:e.uuid})}create(e){return console.warn("Deprecation Warning: fin.Application.create is deprecated. Please use fin.Application.start"),this.wire.sendAction("application-create").catch((e=>{})),this._create(e)}async start(e){this.wire.sendAction("start-application").catch((e=>{}));const t=await this._create(e);return await this.wire.sendAction("run-application",{uuid:e.uuid}),t}async startManyManifests(e,t){return this.wire.sendAction("run-applications",{applications:e,opts:t}).then((()=>{}))}getCurrent(){return this.wire.sendAction("get-current-application").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction("get-current-application-sync").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}async startFromManifest(e,t){this.wire.sendAction("application-start-from-manifest").catch((e=>{}));const n=await this._createFromManifest(e);return await n._run(t),n}createFromManifest(e){return console.warn("Deprecation Warning: fin.Application.createFromManifest is deprecated. Please use fin.Application.startFromManifest"),this.wire.sendAction("application-create-from-manifest").catch((e=>{})),this._createFromManifest(e)}_createFromManifest(e){return this.wire.sendAction("get-application-manifest",{manifestUrl:e}).then((({payload:e})=>{const t=e.data.platform?e.data.platform.uuid:e.data.startup_app.uuid;return this.wrap({uuid:t})})).then((t=>(t._manifestUrl=e,t)))}}return F.ApplicationModule=i,F}(),e),n(Y(),e)}(R)),R}H.WebContents=D;var Q={};Object.defineProperty(Q,"__esModule",{value:!0}),Q.promisifySubscription=void 0;var X,ee,te;function ne(){if(X)return S;X=1,Object.defineProperty(S,"__esModule",{value:!0}),S._Window=void 0;const e=Z(),t=H,n=J(),i=T,r=Q;class o extends t.WebContents{constructor(e,t){super(e,t,"window")}async createWindow(e){this.wire.sendAction("window-create-window",this.identity).catch((e=>{}));const t=await(0,r.promisifySubscription)(this,"fire-constructor-callback");void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&(e.autoShow=!0),(0,i.handleDeprecatedWarnings)(e);const n=this.wire.environment.createChildContent({entityType:"window",options:e}),[o]=await Promise.all([t.getValue(),n]);let s;const{success:a}=o,c=o.data,{message:d}=c;s=a?{httpResponseCode:c.httpResponseCode,apiInjected:c.apiInjected}:{message:c.message,networkErrorCode:c.networkErrorCode,stack:c.stack};const h={message:d,cbPayload:s,success:a};try{this.getWebWindow().fin.__internal_.openerSuccessCBCalled()}catch(e){}return h.success?this:Promise.reject(h)}getAllFrames(){return this.wire.sendAction("get-all-frames",this.identity).then((({payload:e})=>e.data))}getBounds(){return this.wire.sendAction("get-window-bounds",this.identity).then((({payload:e})=>e.data))}center(){return this.wire.sendAction("center-window",this.identity).then((()=>{}))}blur(){return this.wire.sendAction("blur-window",this.identity).then((()=>{}))}bringToFront(){return this.wire.sendAction("bring-window-to-front",this.identity).then((()=>{}))}animate(e,t){return this.wire.sendAction("animate-window",{transitions:e,options:t,...this.identity}).then((()=>{}))}hide(){return this.wire.sendAction("hide-window",this.identity).then((()=>{}))}close(e=!1){return this.wire.sendAction("close-window",{force:e,...this.identity}).then((()=>{Object.setPrototypeOf(this,null)}))}focusedWebViewWasChanged(){return this.wire.sendAction("focused-webview-changed",this.identity).then((()=>{}))}getNativeId(){return this.wire.sendAction("get-window-native-id",this.identity).then((({payload:e})=>e.data))}async getCurrentViews(){const{payload:e}=await this.wire.sendAction("window-get-views",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}disableFrame(){return console.warn("Function is deprecated; use disableUserMovement instead."),this.wire.sendAction("disable-window-frame",this.identity).then((()=>{}))}disableUserMovement(){return this.wire.sendAction("disable-window-frame",this.identity).then((()=>{}))}enableFrame(){return console.warn("Function is deprecated; use enableUserMovement instead."),this.wire.sendAction("enable-window-frame",this.identity).then((()=>{}))}enableUserMovement(){return this.wire.sendAction("enable-window-frame",this.identity).then((()=>{}))}flash(){return this.wire.sendAction("flash-window",this.identity).then((()=>{}))}stopFlashing(){return this.wire.sendAction("stop-flash-window",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction("get-window-info",this.identity).then((({payload:e})=>e.data))}async getLayout(e){this.wire.sendAction("window-get-layout",this.identity).catch((e=>{}));const t=await this.getOptions();if(!t.layout&&!t.layoutSnapshot)throw new Error("Window does not have a Layout");return this.fin.Platform.Layout.wrap(e??this.identity)}getOptions(){return this.wire.sendAction("get-window-options",this.identity).then((({payload:e})=>e.data))}getParentApplication(){return this.wire.sendAction("window-get-parent-application",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity))}getParentWindow(){return this.wire.sendAction("window-get-parent-window",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity)).then((e=>e.getWindow()))}async getSnapshot(e){const t={area:e,...this.identity};console.warn("Window.getSnapshot has been deprecated, please use Window.capturePage");return(await this.wire.sendAction("get-window-snapshot",t)).payload.data}getState(){return this.wire.sendAction("get-window-state",this.identity).then((({payload:e})=>e.data))}getWebWindow(){return this.wire.sendAction("window-get-web-window",this.identity).catch((e=>{})),this.wire.environment.getWebWindow(this.identity)}isMainWindow(){return this.wire.sendAction("window-is-main-window",this.identity).catch((e=>{})),this.me.uuid===this.me.name}isShowing(){return this.wire.sendAction("is-window-showing",this.identity).then((({payload:e})=>e.data))}maximize(){return this.wire.sendAction("maximize-window",this.identity).then((()=>{}))}minimize(){return this.wire.sendAction("minimize-window",this.identity).then((()=>{}))}moveBy(e,t,n){return this.wire.sendAction("move-window-by",{deltaLeft:e,deltaTop:t,positioningOptions:n,...this.identity}).then((()=>{}))}moveTo(e,t,n){return this.wire.sendAction("move-window",{left:e,top:t,positioningOptions:n,...this.identity}).then((()=>{}))}resizeBy(e,t,n,i){return this.wire.sendAction("resize-window-by",{deltaWidth:Math.floor(e),deltaHeight:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}resizeTo(e,t,n,i){return this.wire.sendAction("resize-window",{width:Math.floor(e),height:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}restore(){return this.wire.sendAction("restore-window",this.identity).then((()=>{}))}setAsForeground(){return this.wire.sendAction("set-foreground-window",this.identity).then((()=>{}))}setBounds(e,t){return this.wire.sendAction("set-window-bounds",{...e,...this.identity,positioningOptions:t}).then((()=>{}))}show(e=!1){return this.wire.sendAction("show-window",{force:e,...this.identity}).then((()=>{}))}showAt(e,t,n=!1){return this.wire.sendAction("show-at-window",{force:n,left:Math.floor(e),top:Math.floor(t),...this.identity}).then((()=>{}))}updateOptions(e){return this.wire.sendAction("update-window-options",{options:e,...this.identity}).then((()=>{}))}authenticate(e,t){return this.wire.sendAction("window-authenticate",{userName:e,password:t,...this.identity}).then((()=>{}))}async showPopupMenu(e){const{payload:t}=await this.wire.sendAction("show-popup-menu",{options:e,...this.identity});return t.data}async closePopupMenu(){return this.wire.sendAction("close-popup-menu",{...this.identity}).then((()=>{}))}async dispatchPopupResult(e){this.wire.sendAction("window-dispatch-popup-result",this.identity).catch((e=>{})),await this.wire.sendAction("dispatch-popup-result",{data:e,...this.identity})}async print(e={content:"self"}){switch(e.content){case void 0:case"self":return super.print(e);case"screenshot":return this.wire.sendAction("print-screenshot",this.identity).then((()=>{}));case"views":return this.wire.sendAction("print-views",{...this.identity,options:e}).then((()=>{}));default:return}}}return S._Window=o,S}function ie(){return te||(te=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(function(){if(ee)return _;ee=1,Object.defineProperty(_,"__esModule",{value:!0}),_._WindowModule=void 0;const e=d,t=O,n=ne();class i extends e.Base{async wrap(e){this.wire.sendAction("window-wrap").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}wrapSync(e){this.wire.sendAction("window-wrap-sync").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}create(e){return this.wire.sendAction("create-window").catch((e=>{})),new n._Window(this.wire,{uuid:this.me.uuid,name:e.name}).createWindow(e)}getCurrent(){if(this.wire.sendAction("get-current-window").catch((e=>{})),!this.wire.me.isWindow)throw new Error("You are not in a Window context");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction("get-current-window-sync").catch((e=>{})),!this.wire.me.isWindow)throw new Error("You are not in a Window context");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return _._WindowModule=i,_}(),e),n(ne(),e)}(M)),M}Q.promisifySubscription=async(e,t,n=(()=>!0),i)=>{let r,o,s;const a=new Promise(((e,t)=>{r=e,o=t})),c=e=>{n(e)&&(clearTimeout(s),r(e))};return await e.on(t,c),i&&(s=setTimeout((()=>o(new Error("event timed out"))),i)),a.finally((()=>{e.removeListener(t,c).catch((()=>null))})),{getValue:()=>a}},Object.defineProperty(c,"__esModule",{value:!0}),c.System=void 0;const re=d,oe=g,se=ie(),ae=t;class ce extends re.EmitterBase{constructor(e){super(e,"system")}sendExternalProcessRequest(e,t){return new Promise(((n,i)=>{const r="external-process-exited";let o,s,a,c;"function"==typeof t.listener&&(a=e=>{const n=e||{};s={topic:"exited",uuid:n.processUuid||"",exitCode:n.exitCode||0},o===e.processUuid&&(t.listener(s),c.removeListener(r,a))},this.wire.me.name||(this.wire.me.name=this.wire.me.uuid),c=new se._Window(this.wire,this.wire.me),c.on(r,a)),this.wire.sendAction(e,t).then((({payload:e})=>{o=e.data.uuid,n(e.data),s&&o===s.uuid&&(t.listener(s),c.removeListener(r,a))})).catch((e=>{c&&c.removeListener(r,a),i(e)}))}))}getVersion(){return this.wire.sendAction("get-version").then((({payload:e})=>e.data))}clearCache(e){return this.wire.sendAction("clear-cache",e).then((()=>{}))}deleteCacheOnExit(){return this.wire.sendAction("delete-cache-request").then((()=>{}))}exit(){return this.wire.sendAction("exit-desktop").then((()=>{}))}async fetchManifest(e){const{payload:{data:t}}=await this.wire.sendAction("fetch-manifest",{manifestUrl:e});return t}flushCookieStore(){return this.wire.sendAction("flush-cookie-store").then((()=>{}))}getAllWindows(){return this.wire.sendAction("get-all-windows").then((({payload:e})=>e.data))}getAllApplications(){return this.wire.sendAction("get-all-applications").then((({payload:e})=>e.data))}getCommandLineArguments(){return this.wire.sendAction("get-command-line-arguments").then((({payload:e})=>e.data))}async getCrashReporterState(){const{payload:{data:{diagnosticMode:e,isRunning:t}}}=await this.wire.sendAction("get-crash-reporter-state");return console.warn("diagnosticMode property is deprecated. It will be removed in a future version"),{diagnosticMode:e,diagnosticsMode:e,isRunning:t}}async startCrashReporter(e){const t=e,n={...t,diagnosticMode:t.diagnosticsMode||t.diagnosticMode},{payload:{data:{diagnosticMode:i,isRunning:r}}}=await this.wire.sendAction("start-crash-reporter",n);return{diagnosticMode:i,diagnosticsMode:i,isRunning:r}}getUniqueUserId(){return this.wire.sendAction("get-unique-user-id").then((({payload:e})=>e.data))}getEntityInfo(e,t){return this.wire.sendAction("get-entity-info",{uuid:e,name:t}).then((({payload:e})=>e.data))}getEnvironmentVariable(e){return this.wire.sendAction("get-environment-variable",{environmentVariables:e}).then((({payload:e})=>e.data))}getFocusedWindow(){return this.wire.sendAction("get-focused-window").then((({payload:e})=>e.data))}async isAppCertified(e){const{payload:{data:{certifiedInfo:t}}}=await this.wire.sendAction("is-app-certified",{manifestUrl:e});return t}getInstalledRuntimes(){return this.wire.sendAction("get-installed-runtimes").then((({payload:e})=>e.data.runtimes))}async getInstalledApps(){const{payload:{data:{installedApps:e}}}=await this.wire.sendAction("get-installed-apps");return e}getLog(e){return this.wire.sendAction("view-log",e).then((({payload:e})=>e.data))}getMachineId(){return this.wire.sendAction("get-machine-id").then((({payload:e})=>e.data))}getMinLogLevel(){return this.wire.sendAction("get-min-log-level").then((({payload:e})=>e.data))}getLogList(){return this.wire.sendAction("list-logs").then((({payload:e})=>e.data))}getMonitorInfo(){return this.wire.sendAction("get-monitor-info").then((({payload:e})=>e.data))}getMousePosition(){return this.wire.sendAction("get-mouse-position").then((({payload:e})=>e.data))}getProcessList(){return console.warn("System.getProcessList has been deprecated. Please consider using our new process APIs: Window.getProcessInfo, View.getProcessInfo, Application.getProcessInfo, System.getAllProcessInfo"),this.wire.sendAction("process-snapshot").then((({payload:e})=>e.data))}async getAllProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction("get-all-process-info",this.identity);return e}getProxySettings(){return this.wire.sendAction("get-proxy-settings").then((({payload:e})=>e.data))}getRuntimeInfo(){return this.wire.sendAction("get-runtime-info").then((({payload:e})=>e.data))}getRvmInfo(){return this.wire.sendAction("get-rvm-info").then((({payload:e})=>e.data))}getHostSpecs(){return this.wire.sendAction("get-host-specs").then((({payload:e})=>e.data))}getOSInfo(){return this.wire.sendAction("get-os-info").then((({payload:e})=>e.data))}launchExternalProcess(e){return this.sendExternalProcessRequest("launch-external-process",e)}monitorExternalProcess(e){return this.sendExternalProcessRequest("monitor-external-process",e)}log(e,t){return this.wire.sendAction("write-to-log",{level:e,message:t}).then((()=>{}))}openUrlWithBrowser(e){return this.wire.sendAction("open-url-with-browser",{url:e}).then((()=>{}))}async registerCustomProtocol(e){if("object"!=typeof e)throw new Error("Must provide an object with a `protocolName` property having a string value.");await this.wire.sendAction("register-custom-protocol",e)}async unregisterCustomProtocol(e){await this.wire.sendAction("unregister-custom-protocol",{protocolName:e})}async getCustomProtocolState(e){return this.wire.sendAction("get-custom-protocol-state",{protocolName:e}).then((({payload:e})=>e.data))}releaseExternalProcess(e){return this.wire.sendAction("release-external-process",{uuid:e}).then((()=>{}))}showDeveloperTools(e){return this.wire.sendAction("show-developer-tools",e).then((()=>{}))}terminateExternalProcess(e){return this.wire.sendAction("terminate-external-process",e).then((()=>{}))}updateProxySettings(e){return this.wire.sendAction("update-proxy",e).then((()=>{}))}async downloadAsset(e,t){const n=()=>{};let i=n,r=n;const o=new Promise(((e,t)=>{i=e,r=t}));if("openfin"!==this.wire.environment.type)throw new oe.NotSupportedError("downloadAsset only supported in an OpenFin Render process");const s=oe.RuntimeError.getCallSite(),a=this.wire.environment.getNextMessageId().toString(),c=`asset-download-progress-${a}`,d=`asset-download-error-${a}`,h=`asset-download-complete-${a}`,l=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},u=()=>{this.removeListener(c,l)};await Promise.all([this.on(c,l),this.once(d,(e=>{u();const{reason:t,err:n}=e;r(new oe.RuntimeError({reason:t,error:n},s))})),this.once(h,(()=>{u(),i()}))]);const p=Object.assign(e,{downloadId:a});return await this.wire.sendAction("download-asset",p).catch((e=>{throw u(),e})),o}downloadRuntime(e,t){const n=oe.RuntimeError.getCallSite();return new Promise(((i,r)=>{if("openfin"!==this.wire.environment.type)return void r(new oe.NotSupportedError("downloadRuntime only supported in an OpenFin Render process"));const o=this.wire.environment.getNextMessageId().toString(),s=`runtime-download-progress-${o}`,a=`runtime-download-error-${o}`,c=`runtime-download-complete-${o}`,d=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},h=()=>{this.removeListener(s,d)};this.on(s,d),this.once(a,(e=>{h();const{reason:t,err:i}=e;r(new oe.RuntimeError({reason:t,error:i},n))})),this.once(c,(()=>{h(),i()}));const l=Object.assign(e,{downloadId:o});this.wire.sendAction("download-runtime",l).catch((e=>{h(),r(e)}))}))}downloadPreloadScripts(e){return this.wire.sendAction("download-preload-scripts",{scripts:e}).then((({payload:e})=>e.data))}getAllExternalApplications(){return this.wire.sendAction("get-all-external-applications").then((({payload:e})=>e.data))}getAppAssetInfo(e){return this.wire.sendAction("get-app-asset-info",e).then((({payload:e})=>e.data))}getCookies(e){const t=this.wire.environment.getUrl(),n=Object.assign(e,{url:t});return this.wire.sendAction("get-cookies",n).then((({payload:e})=>e.data))}setMinLogLevel(e){return this.wire.sendAction("set-min-log-level",{level:e}).then((()=>{}))}resolveUuid(e){return this.wire.sendAction("resolve-uuid",{entityKey:e}).then((({payload:e})=>e.data))}executeOnRemote(e,t){return t.requestingIdentity=e,this.wire.ferryAction(t)}readRegistryValue(e,t,n){return this.wire.sendAction("read-registry-value",{rootKey:e,subkey:t,value:n}).then((({payload:e})=>e.data))}registerExternalConnection(e){return this.wire.sendAction("register-external-connection",{uuid:e}).then((({payload:e})=>e.data))}async getServiceConfiguration(e){if("string"!=typeof e.name)throw new Error("Must provide an object with a `name` property having a string value");const{name:t}=e;return this.wire.sendAction("get-service-configuration",{name:t}).then((({payload:e})=>e.data))}async getSystemAppConfig(e){if("string"!=typeof e)throw new Error("Must provide a string value for name of system app");return this.wire.sendAction("get-system-app-configuration",{name:e}).then((({payload:e})=>e.data))}async registerShutdownHandler(e){this.wire.sendAction("system-register-shutdown-handler").catch((e=>{}));const{uuid:t,name:n}=this.wire.me;this.on("system-shutdown",(i=>{e({proceed:()=>{this.wire.environment.raiseEvent("application/system-shutdown-handled",{uuid:t,name:n,topic:"application"})}})}))}runRvmHealthCheck(){return this.wire.sendAction("run-rvm-health-check").then((({payload:e})=>e.data))}async launchManifest(e,t={}){const{subscribe:n,...i}=t,r=i;if(n){const e=new ae.EventEmitter;n(e);const t="app-version-progress",i="runtime-status",o="app-version-complete",s="app-version-error",a=this.wire.environment.getNextMessageId().toString();r.appVersionId=a;const c=[o,t,i,s],d=e=>{const{appVersionId:t,topic:n,type:i,...r}=e;return{...r,type:c.find((e=>i.includes(e)))}},h=t=>{const n=d(t);e.emit(n.type,n)},l=()=>{this.removeListener(`${t}.${a}`,h),this.removeListener(`${i}.${a}`,h),this.removeListener(`${o}.${a}`,h),this.removeListener(`${s}.${a}`,h),this.removeListener(`${o}.${a}`,l),this.removeListener(`${s}.${a}`,l)};await Promise.all([this.on(`${t}.${a}`,h),this.on(`${i}.${a}`,h),this.once(`${o}.${a}`,h),this.once(`${s}.${a}`,h),this.once(`${o}.${a}`,l),this.once(`${s}.${a}`,l)])}return(await this.wire.sendAction("launch-manifest",{manifestUrl:e,opts:r})).payload.data.manifest}async queryPermissionForCurrentContext(e){const t={uuid:this.wire.me.uuid,name:this.wire.me.name};return(await this.wire.sendAction("query-permission-for-current-context",{apiName:e,identity:t})).payload.data}async enableNativeWindowIntegrationProvider(e){const{payload:t}=await this.wire.sendAction("enable-native-window-integration-provider",{permissions:e});return t.data}async registerUsage({data:e,type:t}){await this.wire.sendAction("register-usage",{data:e,type:t})}async getPrinters(){const{payload:e}=await this.wire.sendAction("system-get-printers");return e.data}async updateProcessLoggingOptions(e){await this.wire.sendAction("system-update-process-logging-options",{options:e})}async getDomainSettings(){const{payload:{data:e}}=await this.wire.sendAction("get-domain-settings",this.identity);return e}async setDomainSettings(e){await this.wire.sendAction("set-domain-settings",{domainSettings:e,...this.identity})}async refreshExtensions(){const{payload:e}=await this.wire.sendAction("refresh-extensions");return e.data}async getInstalledExtensions(){const{payload:e}=await this.wire.sendAction("get-installed-extensions");return e.data}}c.System=ce;var de={},he={};Object.defineProperty(he,"__esModule",{value:!0}),he.RefCounter=void 0;he.RefCounter=class{constructor(){this.topicRefMap=new Map}incRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t+1;n=i,this.topicRefMap.set(e,i)}else this.topicRefMap.set(e,1),n=1;return n}decRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t-1;this.topicRefMap.set(e,i),n=i}else n=-1;return n}actOnFirst(e,t,n){return 1===this.incRefCount(e)?t():n()}actOnLast(e,t,n){return 0===this.decRefCount(e)?t():n()}};var le={},ue={},pe={};Object.defineProperty(pe,"__esModule",{value:!0}),pe.ChannelBase=pe.ProtectedItems=void 0;const we=e=>async(t,n,i)=>{const r=await e(t,n,i);return void 0===r?n:r};pe.ProtectedItems=class{constructor(e,t){this.providerIdentity=e,this.close=t}};class ye{static defaultAction(e){throw new Error(`No action registered at target for ${e}`)}constructor(){this.subscriptions=new Map}async processAction(e,t,n){try{const i=this.subscriptions.has(e)?this.subscriptions.get(e):(t,n)=>(this.defaultAction??ye.defaultAction)(e,t,n),r=this.preAction?await this.preAction(e,t,n):t,o=await i(r,n);return this.postAction?await this.postAction(e,o,n):o}catch(t){if(this.errorMiddleware)return this.errorMiddleware(e,t,n);throw t}}beforeAction(e){if(this.preAction)throw new Error("Already registered beforeAction middleware");this.preAction=we(e)}onError(e){if(this.errorMiddleware)throw new Error("Already registered error middleware");this.errorMiddleware=e}afterAction(e){if(this.postAction)throw new Error("Already registered afterAction middleware");this.postAction=we(e)}remove(e){this.subscriptions.delete(e)}setDefaultAction(e){if(this.defaultAction)throw new Error("default action can only be set once");this.defaultAction=e}register(e,t){if(this.subscriptions.has(e))throw new Error(`Subscription already registered for action: ${e}. Unsubscribe before adding new subscription`);return this.subscriptions.set(e,t),!0}}pe.ChannelBase=ye;var fe,ge,me,ve=s&&s.__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)},Ce=s&&s.__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};Object.defineProperty(ue,"__esModule",{value:!0}),ue.ChannelClient=void 0;const be=pe,Ie=new Map;class Ee extends be.ChannelBase{static closeChannelByEndpointId(e){const t=Ie.get(e);t&&ve(t,me,"f").call(t)}static handleProviderDisconnect(e){for(const t of Ie.values())t.providerIdentity.channelId===e.channelId&&(t.disconnectListener(e),ve(t,me,"f").call(t))}constructor(e,t,n){super(),fe.set(this,void 0),ge.set(this,void 0),this.processAction=(e,t,n)=>super.processAction(e,t,n),me.set(this,(()=>{Ie.delete(this.endpointId),ve(this,ge,"f").close()})),Ce(this,fe,new be.ProtectedItems(e,t),"f"),this.disconnectListener=()=>{},this.endpointId=e.endpointId,Ce(this,ge,n,"f"),Ie.set(this.endpointId,this),n.receive(this.processAction)}get providerIdentity(){return ve(this,fe,"f").providerIdentity}async dispatch(e,t){if(ve(this,ge,"f").isEndpointConnected(this.providerIdentity.channelId))return ve(this,ge,"f").send(this.providerIdentity.channelId,e,t);throw new Error("The client you are trying to dispatch from is disconnected from the target provider.")}onDisconnection(e){this.disconnectListener=t=>{try{e(t)}catch(e){throw new Error(`Error while calling the onDisconnection callback: ${e.message}`)}finally{this.disconnectListener=()=>{}}}}async disconnect(){await this.sendDisconnectAction(),ve(this,me,"f").call(this)}async sendDisconnectAction(){const e=ve(this,fe,"f");await e.close()}static async wireClose(e,t,n){const{channelName:i,uuid:r,name:o}=t;await e.sendAction("disconnect-from-channel",{channelName:i,uuid:r,name:o,endpointId:n})}}ue.ChannelClient=Ee,fe=new WeakMap,ge=new WeakMap,me=new WeakMap;var xe={},Ae={};Object.defineProperty(Ae,"__esModule",{value:!0}),Ae.exhaustiveCheck=void 0,Ae.exhaustiveCheck=function(e,t){throw new Error(`Unsupported value: ${e}${t?`\n Supported values are: ${t.join("")}`:""}`)};var Pe,Me,_e,Oe={},Se=s&&s.__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},Re=s&&s.__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)};Object.defineProperty(Oe,"__esModule",{value:!0}),Oe.ClassicInfo=Oe.ClassicStrategy=void 0;Oe.ClassicStrategy=class{constructor(e,t,n,i){this.messageReceiver=t,this.endpointId=n,this.providerIdentity=i,Pe.set(this,void 0),Me.set(this,new Map),_e.set(this,new Map),this.send=async(e,t,n)=>{const i=Re(this,Me,"f").get(e);if(!i)throw new Error(`Could not locate routing info for endpoint ${e}`);const r={...i};r.isLocalEndpointId&&delete r.endpointId,delete r.isLocalEndpointId;const o=Re(this,Pe,"f").sendAction("send-channel-message",{...r,providerIdentity:this.providerIdentity,action:t,payload:n});Re(this,_e,"f").get(e)?.add(o);return(await o.catch((e=>{throw new Error(e.message)})).finally((()=>{Re(this,_e,"f").get(e)?.delete(o)}))).payload.data.result},this.close=async()=>{this.messageReceiver.removeEndpoint(this.providerIdentity.channelId,this.endpointId),[...Re(this,Me,"f").keys()].forEach((e=>this.closeEndpoint(e))),Se(this,Me,new Map,"f")},Se(this,Pe,e,"f")}onEndpointDisconnect(e,t){}receive(e){this.messageReceiver.addEndpoint(e,this.providerIdentity.channelId,this.endpointId)}async closeEndpoint(e){const t=Re(this,Me,"f").get(e);Re(this,Me,"f").delete(e);const n=Re(this,_e,"f").get(e);n?.forEach((n=>{const i=`Channel connection with identity uuid: ${t?.uuid} / name: ${t?.name} / endpointId: ${e} no longer connected.`;n.cancel(new Error(i))}))}isEndpointConnected(e){return Re(this,Me,"f").has(e)}addEndpoint(e,t){Re(this,Me,"f").set(e,t.endpointIdentity),Re(this,_e,"f").set(e,new Set)}isValidEndpointPayload(e){return"string"==typeof e?.endpointIdentity?.endpointId||"string"==typeof e?.endpointIdentity?.channelId}},Pe=new WeakMap,Me=new WeakMap,_e=new WeakMap,Oe.ClassicInfo={version:5,minimumVersion:0,type:"classic"};var Fe={},je={},ke={};Object.defineProperty(ke,"__esModule",{value:!0}),ke.errorToPOJO=void 0,ke.errorToPOJO=function(e){return{stack:e.stack,name:e.name,message:e.message,toString:()=>e.stack||e.toString()}};var Le,Te,$e=s&&s.__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)},Be=s&&s.__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};Object.defineProperty(je,"__esModule",{value:!0}),je.RTCEndpoint=void 0;const Ge=ke;je.RTCEndpoint=class{static isValidEndpointPayload(e){const t=e=>"object"==typeof e&&null!==e;return t(e)&&t(e.endpointIdentity)&&t(e.rtc)&&"string"==typeof e.endpointIdentity.endpointId}constructor({rtc:e,endpointIdentity:t}){this.responseMap=new Map,Le.set(this,null),Te.set(this,void 0),this.connectionStateChangeHandler=e=>{"connected"!==this.rtc.rtcClient.connectionState&&(this.rtc.rtcClient.removeEventListener("connectionstatechange",this.connectionStateChangeHandler),this.close(),$e(this,Te,"f")&&$e(this,Te,"f").call(this))},this.send=async(e,t)=>{const n=`message-${Math.random()}`,i=new Promise(((e,t)=>{this.responseMap.set(n,{resolve:e,reject:t})}));return this.rtc.channels.request.send(JSON.stringify({action:e,payload:t,messageId:n})),i},this.close=()=>{this.responseMap.forEach((e=>e.reject("Connection has closed."))),this.responseMap=new Map,this.rtc.channels.request.close(),this.rtc.channels.response.close(),this.rtc.rtcClient.close()},this.rtc=e,this.endpointIdentity=t,this.rtc.channels.response.addEventListener("message",(e=>{let{data:t}=e;e.data instanceof ArrayBuffer&&(t=(new TextDecoder).decode(e.data));const{messageId:n,payload:i,success:r,error:o}=JSON.parse(t),{resolve:s,reject:a}=this.responseMap.get(n)??{};s&&a?(this.responseMap.delete(n),r?s(i):a(o)):(console.log("Could not find id in responseMap."),console.log(e))})),this.rtc.channels.request.addEventListener("message",(async e=>{let{data:n}=e;e.data instanceof ArrayBuffer&&(n=(new TextDecoder).decode(e.data));const{messageId:i,action:r,payload:o}=JSON.parse(n);if($e(this,Le,"f"))try{const e=await $e(this,Le,"f").call(this,r,o,t);this.rtc.channels.response.send(JSON.stringify({messageId:i,payload:e,success:!0}))}catch(e){"open"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,error:(0,Ge.errorToPOJO)(e),success:!1}))}else"open"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,success:!1,error:"Connection not ready."}))})),this.rtc.rtcClient.addEventListener("connectionstatechange",this.connectionStateChangeHandler),Object.values(this.rtc.channels).forEach((e=>{e.onclose=e=>{[...this.responseMap.values()].forEach((e=>e.reject(new Error("RTCDataChannel closed unexpectedly, this is most commonly caused by message size. Note: RTC Channels have a message size limit of ~255kB.")))),this.close(),$e(this,Te,"f")&&$e(this,Te,"f").call(this)}}))}onDisconnect(e){if($e(this,Te,"f"))throw new Error("RTCEndpoint disconnectListener cannot be set twice.");Be(this,Te,e,"f")}receive(e){if($e(this,Le,"f"))throw new Error("You have already set a listener for this RTC Endpoint.");Be(this,Le,e,"f")}get connected(){return"connected"===this.rtc.rtcClient.connectionState}},Le=new WeakMap,Te=new WeakMap;var We,He,Ne,De={},Ue=s&&s.__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)},Ve=s&&s.__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};Object.defineProperty(De,"__esModule",{value:!0}),De.EndpointStrategy=void 0;De.EndpointStrategy=class{constructor(e,t,n){this.EndpointType=e,this.StrategyName=n,We.set(this,null),He.set(this,new Map),Ne.set(this,!0),this.send=async(e,t,n)=>this.getEndpointById(e).send(t,n),this.close=async()=>{Ue(this,Ne,"f")&&(Ue(this,He,"f").forEach((e=>e.close())),Ve(this,He,new Map,"f")),Ve(this,Ne,!1,"f")},this.isValidEndpointPayload=t}onEndpointDisconnect(e,t){this.getEndpointById(e).onDisconnect(t)}receive(e){if(Ue(this,We,"f"))throw new Error(`You have already set a listener for this ${this.StrategyName} Strategy`);Ve(this,We,e,"f"),Ue(this,He,"f").forEach((e=>e.receive(Ue(this,We,"f"))))}getEndpointById(e){const t=Ue(this,He,"f").get(e);if(!t)throw new Error(`Client with endpoint id ${e} is not connected`);return t}get connected(){return Ue(this,Ne,"f")}isEndpointConnected(e){return Ue(this,He,"f").has(e)}addEndpoint(e,t){if(!Ue(this,Ne,"f"))return void console.warn(`Adding endpoint to disconnected ${this.StrategyName} Strategy`);const n=new this.EndpointType(t);Ue(this,We,"f")&&n.receive(Ue(this,We,"f")),Ue(this,He,"f").set(e,n)}async closeEndpoint(e){Ue(this,He,"f").delete(e)}},We=new WeakMap,He=new WeakMap,Ne=new WeakMap,Object.defineProperty(Fe,"__esModule",{value:!0}),Fe.RTCInfo=Fe.RTCStrategy=void 0;const ze=je,Ke=De;class qe extends Ke.EndpointStrategy{constructor(){super(ze.RTCEndpoint,ze.RTCEndpoint.isValidEndpointPayload,"RTC")}}Fe.RTCStrategy=qe,Fe.RTCInfo={version:2,minimumVersion:0,type:"rtc"};var Je={};Object.defineProperty(Je,"__esModule",{value:!0}),Je.RTCICEManager=void 0;const Ye=d;class Ze extends Ye.EmitterBase{constructor(e){super(e,"channel"),this.ensureChannelOpened=e=>new Promise(((t,n)=>{if("open"===e.readyState)t();else if("connecting"===e.readyState){const n=()=>{e.removeEventListener("open",n),t()};e.addEventListener("open",n)}else n(new Error("This Channel has already closed"))}))}static createDataChannelPromise(e,t){let n;const i=new Promise((e=>{n=e})),r=i=>{const o=()=>{i.channel.removeEventListener("open",o),n(i.channel)};i.channel.label===e&&(i.channel.addEventListener("open",o),t.removeEventListener("datachannel",r))};return t.addEventListener("datachannel",r),i}async listenForProviderIce(e,t){await this.on(this.createProviderEventName(e),t,{timestamp:Date.now()})}async raiseProviderIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createProviderEventName(e)),t)}async listenForClientIce(e,t){await this.on(this.createClientEventName(e),t,{timestamp:Date.now()})}async raiseClientIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createClientEventName(e)),t)}cleanupIceListeners(e){this.removeAllListeners(this.createClientEventName(e)),this.removeAllListeners(this.createProviderEventName(e))}createClientEventName(e){return`ice-client-${e}`}createProviderEventName(e){return`ice-provider-${e}`}createRouteString(e){return`channel/${e}`}createRtcPeer(){return this.wire.environment.getRtcPeer()}async startClientOffer(){const e=Math.random().toString(),t=this.createRtcPeer();t.addEventListener("icecandidate",(async t=>{t.candidate&&await this.raiseClientIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForProviderIce(e,(async e=>{await t.addIceCandidate(e.candidate)}));const n={request:t.createDataChannel("request"),response:t.createDataChannel("response")},i=await t.createOffer();await t.setLocalDescription(i);const r=Promise.all([n.request,n.response].map(this.ensureChannelOpened)).then((()=>{}));return{rtcClient:t,channels:n,offer:i,rtcConnectionId:e,channelsOpened:r}}async finishClientOffer(e,t,n){return await e.setRemoteDescription(t),await n,!0}async createProviderAnswer(e,t){const n=this.createRtcPeer(),i=Ze.createDataChannelPromise("request",n),r=Ze.createDataChannelPromise("response",n);n.addEventListener("icecandidate",(async t=>{t.candidate&&await this.raiseProviderIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForClientIce(e,(async e=>{await n.addIceCandidate(e.candidate)})),await n.setRemoteDescription(t);const o=await n.createAnswer();await n.setLocalDescription(o);const s=Promise.all([i,r]).then((([t,n])=>(this.cleanupIceListeners(e),{request:t,response:n})));return{rtcClient:n,answer:o,channels:s}}}Je.RTCICEManager=Ze;var Qe={},Xe={};function et(e){return[...e.split(".").reverse().entries()].reduce(((e,[t,n])=>e+ +n*1e4**t),0)}function tt(e,t){return et(e)>=et(t)}function nt(e){return e.split("/")[0]}Object.defineProperty(Xe,"__esModule",{value:!0}),Xe.runtimeUuidMeetsMinimumRuntimeVersion=Xe.parseRuntimeUuid=Xe.meetsMinimumRuntimeVersion=void 0,Xe.meetsMinimumRuntimeVersion=tt,Xe.parseRuntimeUuid=nt,Xe.runtimeUuidMeetsMinimumRuntimeVersion=function(e,t){return tt(nt(e),t)};var it,rt,ot,st,at,ct=s&&s.__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)},dt=s&&s.__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};Object.defineProperty(Qe,"__esModule",{value:!0}),Qe.ChannelProvider=void 0;const ht=pe,lt=Xe;class ut extends ht.ChannelBase{get connections(){return[...ct(this,it,"f")]}static handleClientDisconnection(e,t){const n=e.connections.find((e=>e.endpointId===t.endpointId));if(n)ct(e,st,"f").call(e,n);else{e.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name)).forEach(ct(e,st,"f"))}e.disconnectListener(t)}static setProviderRemoval(e,t){ut.removalMap.set(e,t)}constructor(e,t,n){super(),it.set(this,void 0),rt.set(this,void 0),ot.set(this,void 0),st.set(this,(e=>{const t=this.connections.filter((t=>t.endpointId!==e.endpointId));ct(this,ot,"f").closeEndpoint(e.endpointId),dt(this,it,t,"f")})),this.processAction=async(e,t,n)=>(ut.clientIsMultiRuntime(n)&&!(0,lt.runtimeUuidMeetsMinimumRuntimeVersion)(n.runtimeUuid,"18.87.56.0")?this.handleMultiRuntimeLegacyClient(n):this.checkForClientConnection(n),super.processAction(e,t,n)),at.set(this,(()=>{ct(this,ot,"f").close();const e=ut.removalMap.get(this);e&&e()})),dt(this,rt,new ht.ProtectedItems(e,t),"f"),this.connectListener=()=>{},this.disconnectListener=()=>{},dt(this,it,[],"f"),dt(this,ot,n,"f"),n.receive(this.processAction)}dispatch(e,t,n){const i=e.endpointId??this.getEndpointIdForOpenFinId(e,t);return i&&ct(this,ot,"f").isEndpointConnected(i)?ct(this,ot,"f").send(i,t,n):Promise.reject(new Error(`Client connection with identity uuid: ${e.uuid} / name: ${e.name} / endpointId: ${i} no longer connected.`))}async processConnection(e,t){return ct(this,it,"f").push(e),this.connectListener(e,t)}publish(e,t){return this.connections.map((n=>ct(this,ot,"f").send(n.endpointId,e,t)))}onConnection(e){this.connectListener=e}onDisconnection(e){this.disconnectListener=e}async destroy(){const e=ct(this,rt,"f");e.providerIdentity,dt(this,it,[],"f"),await e.close(),ct(this,at,"f").call(this)}async getAllClientInfo(){return this.connections.map((e=>{const{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}=e;return{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}}))}checkForClientConnection(e){if(!this.isClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider.\n Client Identity: {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}isClientConnected(e){return ut.clientIdentityIncludesEndpointId(e)?this.connections.some((t=>t.endpointId===e.endpointId&&t.uuid===e.uuid&&t.name===e.name)):this.isLegacyClientConnected(e)}isLegacyClientConnected(e){return this.connections.some((t=>t.uuid===e.uuid&&t.name===e.name))}handleMultiRuntimeLegacyClient(e){if(!this.isLegacyClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider. Client Identity:\n {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}getEndpointIdForOpenFinId(e,t){const n=this.connections.filter((t=>t.name===e.name&&t.uuid===e.uuid));if(n.length>=2){const n=ct(this,rt,"f"),{uuid:i,name:r}=e,o=n?.providerIdentity.uuid,s=n?.providerIdentity.name;console.warn(`WARNING: Dispatch call may have unintended results. The "to" argument of your dispatch call is missing the\n "endpointId" parameter. The identity you are dispatching to ({uuid: ${i}, name: ${r}})\n has multiple channelClients for this channel. Your dispatched action: (${t}) from the provider:\n ({uuid: ${o}, name: ${s}}) will only be processed by the most recently-created client.`)}return n.pop()?.endpointId}static clientIdentityIncludesEndpointId(e){return void 0!==e.endpointId}static clientIsMultiRuntime(e){return void 0!==e.runtimeUuid}static async wireClose(e,t){await e.sendAction("destroy-channel",{channelName:t})}}Qe.ChannelProvider=ut,it=new WeakMap,rt=new WeakMap,ot=new WeakMap,st=new WeakMap,at=new WeakMap,ut.removalMap=new WeakMap;var pt={};Object.defineProperty(pt,"__esModule",{value:!0}),pt.MessageReceiver=void 0;const wt=ue,yt=d;class ft extends yt.Base{constructor(e){super(e),this.onmessage=e=>"process-channel-message"===e.action&&(this.processChannelMessage(e),!0),this.endpointMap=new Map,this.latestEndpointIdByChannelId=new Map,e.registerMessageHandler(this.onmessage.bind(this))}async processChannelMessage(e){const{senderIdentity:t,providerIdentity:n,action:i,ackToSender:r,payload:o,intendedTargetIdentity:s}=e.payload,a=s.channelId??s.endpointId??this.latestEndpointIdByChannelId.get(n.channelId),c=this.endpointMap.get(a);if(!c)return r.payload.success=!1,r.payload.reason=`Client connection with identity uuid: ${this.wire.me.uuid} / name: ${this.wire.me.name} / endpointId: ${a} no longer connected.`,this.wire.sendRaw(r);try{const e=await c(i,o,t);return r.payload.payload=r.payload.payload||{},r.payload.payload.result=e,this.wire.sendRaw(r)}catch(e){return r.payload.success=!1,r.payload.reason=e.message,this.wire.sendRaw(r)}}addEndpoint(e,t,n){this.endpointMap.set(n,e),t!==n&&this.latestEndpointIdByChannelId.set(t,n)}removeEndpoint(e,t){this.endpointMap.delete(t),this.latestEndpointIdByChannelId.get(e)===t&&this.latestEndpointIdByChannelId.delete(e)}checkForPreviousClientConnection(e){const t=this.latestEndpointIdByChannelId.get(e);t&&(wt.ChannelClient.closeChannelByEndpointId(t),console.warn("You have created a second connection to an older provider. First connection has been removed from the clientMap"),console.warn("If the provider calls publish(), you may receive multiple messages."))}}pt.MessageReceiver=ft;var gt={};Object.defineProperty(gt,"__esModule",{value:!0}),gt.ProtocolManager=void 0;gt.ProtocolManager=class{constructor(e){this.ProtocolsInPreferenceOrder=e,this.DefaultClientProtocols=["classic"],this.DefaultProviderProtocols=["classic"],this.getClientProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultClientProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(", ")}.`);return t},this.getProviderProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultProviderProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(", ")}.`);return t},this.getCompatibleProtocols=(e,t)=>t.supportedProtocols.filter((t=>e.some((e=>e.type===t.type&&t.version>=e.minimumVersion&&e.version>=(t.minimumVersion??0))))).slice(0,t.maxProtocols)}};var mt={};Object.defineProperty(mt,"__esModule",{value:!0});class vt{static combine(e,t){return new vt(e,t)}constructor(e,t){this.primary=e,this.secondary=t}onEndpointDisconnect(e,t){this.primary.onEndpointDisconnect(e,(()=>{this.secondary.isEndpointConnected(e)||t()})),this.secondary.onEndpointDisconnect(e,(()=>{this.primary.isEndpointConnected(e)||t()}))}isValidEndpointPayload(e){return this.primary.isValidEndpointPayload(e)||this.secondary.isValidEndpointPayload(e)}async closeEndpoint(e){await this.primary.closeEndpoint(e),await this.secondary.closeEndpoint(e)}isEndpointConnected(e){return this.primary.isEndpointConnected(e)||this.secondary.isEndpointConnected(e)}async addEndpoint(e,t){this.primary.isValidEndpointPayload(t)&&await this.primary.addEndpoint(e,t),this.secondary.isValidEndpointPayload(t)&&await this.secondary.addEndpoint(e,t)}receive(e){this.primary.receive(e),this.secondary.receive(e)}send(e,t,n){return this.primary.isEndpointConnected(e)?this.primary.send(e,t,n):this.secondary.send(e,t,n)}async close(){await Promise.all([this.primary.close(),this.secondary.close()])}}mt.default=vt;var Ct,bt,It=s&&s.__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},Et=s&&s.__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)},xt=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(xe,"__esModule",{value:!0}),xe.ConnectionManager=void 0;const At=Ae,Pt=d,Mt=Oe,_t=Fe,Ot=Je,St=Qe,Rt=pt,Ft=gt,jt=xt(mt);class kt extends Pt.Base{static getProtocolOptionsFromStrings(e){return e.map((e=>{switch(e){case"rtc":return _t.RTCInfo;case"classic":return Mt.ClassicInfo;default:return(0,At.exhaustiveCheck)(e,["rtc","classic"])}}))}constructor(e){super(e),Ct.set(this,void 0),bt.set(this,void 0),this.removeChannelFromProviderMap=e=>{this.providerMap.delete(e)},this.onmessage=e=>"process-channel-connection"===e.action&&(this.processChannelConnection(e),!0),this.providerMap=new Map,this.protocolManager=new Ft.ProtocolManager("node"===this.wire.environment.type?["classic"]:["rtc","classic"]),It(this,Ct,new Rt.MessageReceiver(e),"f"),It(this,bt,new Ot.RTCICEManager(e),"f"),e.registerMessageHandler(this.onmessage.bind(this))}createProvider(e,t){const n=Object.assign(this.wire.environment.getDefaultChannelOptions().create,e||{}),i=this.protocolManager.getProviderProtocols(n?.protocols),r=i.map((e=>{switch(e){case"rtc":return new _t.RTCStrategy;case"classic":return new Mt.ClassicStrategy(this.wire,Et(this,Ct,"f"),t.channelId,t);default:return(0,At.exhaustiveCheck)(e,["rtc","classic"])}}));let o;if(2===r.length){const[e,t]=r;o=jt.default.combine(e,t)}else{if(1!==r.length)throw new Error("failed to combine strategies");[o]=r}const s=new St.ChannelProvider(t,(()=>St.ChannelProvider.wireClose(this.wire,t.channelName)),o),a=t.channelId;return this.providerMap.set(a,{provider:s,strategy:o,supportedProtocols:kt.getProtocolOptionsFromStrings(i)}),St.ChannelProvider.setProviderRemoval(s,this.removeChannelFromProviderMap.bind(this)),s}async createClientOffer(e){const t=this.protocolManager.getClientProtocols(e?.protocols);let n;return{offer:{supportedProtocols:await Promise.all(t.map((async e=>{switch(e){case"rtc":{const{rtcClient:e,channels:t,offer:i,rtcConnectionId:r,channelsOpened:o}=await Et(this,bt,"f").startClientOffer();return n={rtcClient:e,channels:t,channelsOpened:o},{type:"rtc",version:_t.RTCInfo.version,payload:{offer:i,rtcConnectionId:r}}}case"classic":return{type:"classic",version:Mt.ClassicInfo.version};default:return(0,At.exhaustiveCheck)(e,["rtc","classic"])}}))),maxProtocols:2},rtc:n}}async createClientStrategy(e,t){t.endpointId||(t.endpointId=this.wire.environment.getNextMessageId(),Et(this,Ct,"f").checkForPreviousClientConnection(t.channelId));const n=t.answer??{supportedProtocols:[{type:"classic",version:1}]},i=(await Promise.all(n.supportedProtocols.map((async n=>"rtc"===n.type&&e?(await Et(this,bt,"f").finishClientOffer(e.rtcClient,n.payload.answer,e.channelsOpened),new _t.RTCStrategy):"classic"===n.type?new Mt.ClassicStrategy(this.wire,Et(this,Ct,"f"),t.endpointId,t):null)))).filter((e=>null!==e));let r;if(e&&!i.some((e=>e instanceof _t.RTCStrategy))&&e&&e.rtcClient.close(),i.length>=2)r=jt.default.combine(i[0],i[1]);else{if(!i.length)throw new Error("No compatible protocols");[r]=i}const o={endpointIdentity:t,rtc:e};return r.addEndpoint(t.channelId,o),r}async processChannelConnection(e){const{clientIdentity:t,providerIdentity:n,ackToSender:i,payload:r,offer:o}=e.payload;t.endpointId?t.isLocalEndpointId=!1:(t.endpointId=this.wire.environment.getNextMessageId(),t.isLocalEndpointId=!0);const s=n.channelId,a=this.providerMap.get(s);if(!a)return i.payload.success=!1,i.payload.reason=`Channel "${n.channelName}" has been destroyed.`,this.wire.sendRaw(i);const{provider:c,strategy:d,supportedProtocols:h}=a;try{if(!(c instanceof St.ChannelProvider))throw Error("Cannot connect to a channel client");const e=o??{supportedProtocols:[{type:"classic",version:1}],maxProtocols:1},n=this.protocolManager.getCompatibleProtocols(h,e);if(!n.length)throw new Error("This provider does not support any of the offered protocols.");const s=await c.processConnection(t,r);i.payload.payload=i.payload.payload||{};let a={supportedProtocols:[],endpointPayloadPromise:Promise.resolve({endpointIdentity:t})};return a=await n.reduce((async(e,t)=>{const n=await e;if("rtc"===t.type){const{answer:e,rtcClient:i,channels:r}=await Et(this,bt,"f").createProviderAnswer(t.payload.rtcConnectionId,t.payload.offer);n.supportedProtocols.push({type:"rtc",version:_t.RTCInfo.version,payload:{answer:e}}),n.endpointPayloadPromise=n.endpointPayloadPromise.then((e=>r.then((t=>({...e,rtc:{rtcClient:i,channels:t}})))))}else n.supportedProtocols.push({type:"classic",version:Mt.ClassicInfo.version});return n}),Promise.resolve(a)),a.endpointPayloadPromise.then((e=>d.addEndpoint(t.endpointId,e))),i.payload.payload.result=s,i.payload.payload.answer=a,this.wire.sendRaw(i)}catch(e){return i.payload.success=!1,i.payload.reason=e.message,this.wire.sendRaw(i)}}}xe.ConnectionManager=kt,Ct=new WeakMap,bt=new WeakMap;var Lt,Tt,$t,Bt=s&&s.__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},Gt=s&&s.__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)};Object.defineProperty(le,"__esModule",{value:!0}),le.Channel=void 0;const Wt=t,Ht=G,Nt=d,Dt=ue,Ut=xe,Vt=Qe;function zt(e){const t=Math.floor(e/10),n=Math.min(3e4,500*2**t);return new Promise((e=>{setTimeout((()=>{e(!1)}),n)}))}class Kt extends Nt.EmitterBase{constructor(e){super(e,"channel"),Lt.set(this,void 0),Tt.set(this,new Wt.EventEmitter),$t.set(this,new Ht.AsyncRetryableLazy((async()=>{await Promise.all([this.on("disconnected",(e=>{Dt.ChannelClient.handleProviderDisconnect(e)})),this.on("connected",((...e)=>{Gt(this,Tt,"f").emit("connected",...e)}))]).catch((()=>new Error("error setting up channel connection listeners")))}))),Bt(this,Lt,new Ut.ConnectionManager(e),"f")}async getAllChannels(){return this.wire.sendAction("get-all-channels").then((({payload:e})=>e.data))}async onChannelConnect(e){await this.on("connected",e)}async onChannelDisconnect(e){await this.on("disconnected",e)}async safeConnect(e,t,n){const i={count:0};do{let r=()=>{};const o=new Promise((t=>{r=n=>{e===n.channelName&&t(!0)},Gt(this,Tt,"f").on("connected",r)}));try{if(i.count>0){i.gotConnectedEvent=await Promise.race([zt(i.count),o]);const t=await this.wire.sendAction("connect-to-channel",{...n,retryInfo:i});return console.log(`Successfully connected to channelName: ${e}`),t.payload.data}const t=this.wire.sendAction("connect-to-channel",n);i.originalMessageId=t.messageId;return(await t).payload.data}catch(n){if(!n.message.includes("internal-nack"))throw n;t&&0===i.count&&console.warn(`No channel found for channelName: ${e}. Waiting for connection...`)}finally{i.count+=1,Gt(this,Tt,"f").removeListener("connected",r)}}while(t);throw new Error(`No channel found for channelName: ${e}.`)}async connect(e,t={}){if(await Gt(this,$t,"f").getValue(),!e||"string"!=typeof e)throw new Error("Please provide a channelName string to connect to a channel.");const n={wait:!0,...this.wire.environment.getDefaultChannelOptions().connect,...t},{offer:i,rtc:r}=await Gt(this,Lt,"f").createClientOffer(n);let o;(this.fin.me.isFrame||this.fin.me.isView||this.fin.me.isWindow)&&(o=(await this.fin.me.getInfo()).url);const s={channelName:e,...n,offer:i,connectionUrl:o},a=await this.safeConnect(e,n.wait,s),c=await Gt(this,Lt,"f").createClientStrategy(r,a),d=new Dt.ChannelClient(a,(()=>Dt.ChannelClient.wireClose(this.wire,a,a.endpointId)),c);return c.onEndpointDisconnect(a.channelId,(async()=>{try{await d.sendDisconnectAction()}catch(e){console.warn(`Something went wrong during disconnect for client with uuid: ${a.uuid} / name: ${a.name} / endpointId: ${a.endpointId}.`)}finally{Dt.ChannelClient.handleProviderDisconnect(a)}})),d}async create(e,t){if(!e)throw new Error("Please provide a channelName to create a channel");const{payload:{data:n}}=await this.wire.sendAction("create-channel",{channelName:e}),i=Gt(this,Lt,"f").createProvider(t,n);return this.on("client-disconnected",(t=>{t.channelName===e&&Vt.ChannelProvider.handleClientDisconnection(i,t)})),i}}le.Channel=Kt,Lt=new WeakMap,Tt=new WeakMap,$t=new WeakMap,Object.defineProperty(de,"__esModule",{value:!0}),de.InterAppPayload=de.InterApplicationBus=void 0;const qt=t,Jt=d,Yt=he,Zt=le,Qt=O;class Xt extends Jt.Base{constructor(e){super(e),this.events={subscriberAdded:"subscriber-added",subscriberRemoved:"subscriber-removed"},this.refCounter=new Yt.RefCounter,this.Channel=new Zt.Channel(e),this.emitter=new qt.EventEmitter,e.registerMessageHandler(this.onmessage.bind(this)),this.on=this.emitter.on.bind(this.emitter),this.removeAllListeners=this.emitter.removeAllListeners.bind(this.emitter)}async publish(e,t){await this.wire.sendAction("publish-message",{topic:e,message:t,sourceWindowName:this.me.name})}async send(e,t,n){const i=(0,Qt.validateIdentity)(e);if(i)throw new Error(i);await this.wire.sendAction("send-message",{destinationUuid:e.uuid,destinationWindowName:e.name,topic:t,message:n,sourceWindowName:this.me.name})}subscribe(e,t,n){const i=this.createSubscriptionKey(e.uuid,e.name||"*",t);return this.emitter.on(i,n),this.refCounter.actOnFirst(i,(async()=>{await this.wire.sendAction("subscribe",{sourceUuid:e.uuid,sourceWindowName:e.name||"*",topic:t,destinationWindowName:this.me.name})}),(()=>Promise.resolve()))}unsubscribe(e,t,n){const i=e.name||"*",r=this.createSubscriptionKey(e.uuid,i,t);return this.emitter.removeListener(r,n),this.refCounter.actOnLast(r,(async()=>{await this.wire.sendAction("unsubscribe",{sourceUuid:e.uuid,sourceWindowName:i,topic:t,destinationWindowName:this.me.name})}),(()=>new Promise((e=>e)).then((()=>{}))))}processMessage(e){const{payload:{message:t,sourceWindowName:n,sourceUuid:i,topic:r}}=e,o=[this.createSubscriptionKey(i,n,r),this.createSubscriptionKey(i,"*",r),this.createSubscriptionKey("*","*",r)],s={uuid:i,name:n};o.forEach((e=>{this.emitter.emit(e,t,s)}))}emitSubscriverEvent(e,t){const{payload:{targetName:n,uuid:i,topic:r}}=t,o={name:n,uuid:i,topic:r};this.emitter.emit(e,o)}createSubscriptionKey(e,t,n){const i=t||"*";if(!(e&&i&&n))throw new Error("Missing uuid, name, or topic string");return function(...e){return e.map((e=>Buffer.from(`${e}`).toString("base64"))).join("/")}(e,i,n)}onmessage(e){const{action:t}=e;switch(t){case"process-message":this.processMessage(e);break;case this.events.subscriberAdded:this.emitSubscriverEvent(this.events.subscriberAdded,e);break;case this.events.subscriberRemoved:this.emitSubscriverEvent(this.events.subscriberRemoved,e)}return!0}}de.InterApplicationBus=Xt;de.InterAppPayload=class{};var en={};Object.defineProperty(en,"__esModule",{value:!0}),en.Clipboard=void 0;const tn=d;class nn extends tn.Base{async writeText(e){await this.wire.sendAction("clipboard-write-text",e)}async readText(e){const{payload:t}=await this.wire.sendAction("clipboard-read-text",{type:e});return t.data}async writeImage(e){await this.wire.sendAction("clipboard-write-image",e)}async readImage(e={format:"dataURL"}){const{payload:t}=await this.wire.sendAction("clipboard-read-image",e);return t.data}async writeHtml(e){await this.wire.sendAction("clipboard-write-html",e)}async readHtml(e){const{payload:t}=await this.wire.sendAction("clipboard-read-html",{type:e});return t.data}async writeRtf(e){await this.wire.sendAction("clipboard-write-rtf",e)}async readRtf(e){const{payload:t}=await this.wire.sendAction("clipboard-read-rtf",{type:e});return t.data}async write(e){await this.wire.sendAction("clipboard-write",e)}async getAvailableFormats(e){const{payload:t}=await this.wire.sendAction("clipboard-read-formats",{type:e});return t.data}}en.Clipboard=nn;var rn={},on={},sn={};Object.defineProperty(sn,"__esModule",{value:!0}),sn.ExternalApplication=void 0;const an=d;class cn extends an.EmitterBase{constructor(e,t){super(e,"external-application",t.uuid),this.identity=t}getInfo(){return this.wire.sendAction("get-external-application-info",this.identity).then((({payload:e})=>e.data))}}sn.ExternalApplication=cn,Object.defineProperty(on,"__esModule",{value:!0}),on.ExternalApplicationModule=void 0;const dn=d,hn=sn;class ln extends dn.Base{wrap(e){return this.wire.sendAction("external-application-wrap").catch((e=>{})),Promise.resolve(new hn.ExternalApplication(this.wire,{uuid:e}))}wrapSync(e){return this.wire.sendAction("external-application-wrap-sync").catch((e=>{})),new hn.ExternalApplication(this.wire,{uuid:e})}}on.ExternalApplicationModule=ln,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(on,e),n(sn,e)}(rn);var un={},pn={},wn={};Object.defineProperty(wn,"__esModule",{value:!0}),wn._Frame=void 0;const yn=d;class fn extends yn.EmitterBase{constructor(e,t){super(e,"frame",t.uuid,t.name),this.identity=t}getInfo(){return this.wire.sendAction("get-frame-info",this.identity).then((({payload:e})=>e.data))}getParentWindow(){return this.wire.sendAction("get-parent-window",this.identity).then((({payload:e})=>e.data))}}wn._Frame=fn,Object.defineProperty(pn,"__esModule",{value:!0}),pn._FrameModule=void 0;const gn=d,mn=O,vn=wn;class Cn extends gn.Base{async wrap(e){this.wire.sendAction("frame-wrap").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}wrapSync(e){this.wire.sendAction("frame-wrap-sync").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}getCurrent(){return this.wire.sendAction("frame-get-current").catch((e=>{})),Promise.resolve(new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity()))}getCurrentSync(){return this.wire.sendAction("frame-get-current-sync").catch((e=>{})),new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity())}}pn._FrameModule=Cn,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(pn,e),n(wn,e)}(un);var bn={};Object.defineProperty(bn,"__esModule",{value:!0}),bn.GlobalHotkey=void 0;const In=d;class En extends In.EmitterBase{constructor(e){super(e,"global-hotkey")}async register(e,t){await this.on(e,t),await this.wire.sendAction("global-hotkey-register",{hotkey:e})}async unregister(e){await this.removeAllListeners(e),await this.wire.sendAction("global-hotkey-unregister",{hotkey:e})}async unregisterAll(){await Promise.all(this.eventNames().filter((e=>!("registered"===e||"unregistered"===e))).map((e=>this.removeAllListeners(e)))),await this.wire.sendAction("global-hotkey-unregister-all",{})}async isRegistered(e){const{payload:{data:t}}=await this.wire.sendAction("global-hotkey-is-registered",{hotkey:e});return t}}bn.GlobalHotkey=En;var xn,An={},Pn={},Mn={},_n=s&&s.__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)};Object.defineProperty(Mn,"__esModule",{value:!0}),Mn.Platform=void 0;const On=d,Sn=O,Rn=new Map;class Fn extends On.EmitterBase{constructor(e,t){super(t.wire,"application",e.uuid),this.getClient=e=>{this.wire.sendAction("platform-get-client",this.identity).catch((e=>{}));const t=e||this.identity,{uuid:n}=t;if(!Rn.has(n)){const e=_n(this,xn,"f").call(this,n);Rn.set(n,e)}return Rn.get(n)},xn.set(this,(async e=>{try{const t=`custom-frame-${e}`,n=await this._channel.connect(t,{wait:!1});return n.onDisconnection((()=>{Rn.delete(e)})),n}catch(t){throw Rn.delete(e),new Error("The targeted Platform is not currently running. Listen for application-started event for the given Uuid.")}})),this.launchLegacyManifest=this.launchContentManifest;const n=(0,Sn.validateIdentity)(e);if(n)throw new Error(n);this._channel=t,this.identity={uuid:e.uuid},this.Layout=this.fin.Platform.Layout,this.Application=this.fin.Application.wrapSync(this.identity)}async createView(e,t,n){this.wire.sendAction("platform-create-view",this.identity).catch((e=>{}));const i=await this.getClient(),r=await i.dispatch("create-view",{target:t,opts:e,targetView:n});if(!r||(0,Sn.validateIdentity)(r.identity))throw new Error(`When overwriting the createView call, please return an object that has a valid 'identity' property: ${JSON.stringify(r)}`);return this.fin.View.wrapSync(r.identity)}async createWindow(e){this.wire.sendAction("platform-create-window",this.identity).catch((e=>{}));const t=await this.getClient();e.reason||(e.reason="api-call");const n=await t.dispatch("create-view-container",e);if(!n||(0,Sn.validateIdentity)(n.identity))throw new Error(`When overwriting the createWindow call, please return an object that has a valid 'identity' property: ${JSON.stringify(n)}`);const{identity:i}=n,r=this.fin.Window.wrapSync(i);return r.name=i.name,r.uuid=i.uuid,r}async quit(){this.wire.sendAction("platform-quit",this.identity).catch((e=>{}));return(await this.getClient()).dispatch("quit")}async closeView(e){this.wire.sendAction("platform-close-view",this.identity).catch((e=>{}));const t=await this.getClient();await t.dispatch("close-view",{view:e})}async reparentView(e,t){console.warn("Platform.reparentView has been deprecated, please use Platform.createView"),this.wire.sendAction("platform-reparent-view",this.identity).catch((e=>{}));const n={...e,uuid:e.uuid??this.identity.uuid},i=await this.fin.View.wrap(n),r=await i.getOptions();return this.createView(r,t)}async getSnapshot(){this.wire.sendAction("platform-get-snapshot",this.identity).catch((e=>{}));return(await this.getClient()).dispatch("get-snapshot")}async getViewSnapshot(e){return(await this.getClient()).dispatch("get-view-snapshot",{viewIdentity:e})}async applySnapshot(e,t){this.wire.sendAction("platform-apply-snapshot",this.identity).catch((e=>{}));const n="Requested snapshot must be a valid Snapshot object, or a url or filepath to such an object.";let i;if("string"==typeof e)try{i=(await this._channel.wire.sendAction("get-application-manifest",{manifestUrl:e})).payload.data}catch(e){throw new Error(`${n}: ${e}`)}else i=e;if(!i.windows)throw new Error(n);const r=await this.getClient();return await r.dispatch("apply-snapshot",{snapshot:i,options:t}),this}async fetchManifest(e){return(await this.getClient()).dispatch("platform-fetch-manifest",{manifestUrl:e})}async launchContentManifest(e){this.wire.sendAction("platform-launch-content-manifest",this.identity).catch((()=>{}));const t=await this.getClient(),n=await this.fetchManifest(e);return t.dispatch("launch-into-platform",{manifest:n,manifestUrl:e}),this}async setWindowContext(e={},t){if(this.wire.sendAction("platform-set-window-context",this.identity).catch((e=>{})),!e)throw new Error("Please provide a serializable object or string to set the context.");const n=await this.getClient(),{entityType:i}=t?await this.fin.System.getEntityInfo(t.uuid,t.name):this.fin.me;await n.dispatch("set-window-context",{context:e,entityType:i,target:t||{uuid:this.fin.me.uuid,name:this.fin.me.name}})}async getWindowContext(e){this.wire.sendAction("platform-get-window-context",this.identity).catch((e=>{}));const t=await this.getClient(),{entityType:n}=e?await this.fin.System.getEntityInfo(e.uuid,e.name):this.fin.me;return t.dispatch("get-window-context",{target:e||{uuid:this.fin.me.uuid,name:this.fin.me.name},entityType:n})}async closeWindow(e,t={skipBeforeUnload:!1}){this.wire.sendAction("platform-close-window",this.identity).catch((e=>{}));return(await this.getClient()).dispatch("close-window",{windowId:e,options:t})}}Mn.Platform=Fn,xn=new WeakMap;var jn={},kn={},Ln={},Tn={};function $n(e){switch(e){case"columns":case"grid":case"rows":case"tabs":return!0;default:return!1}}Object.defineProperty(Tn,"__esModule",{value:!0}),Tn.overrideFromComposables=Tn.isValidPresetType=void 0,Tn.isValidPresetType=$n,Tn.overrideFromComposables=function(...e){return t=>e.reduceRight(((e,t)=>n=>t(e(n))),(e=>e))(t)},Tn.default={isValidPresetType:$n};var Bn={},Gn={},Wn={};Object.defineProperty(Wn,"__esModule",{value:!0}),Wn.ApiConsumer=void 0;Wn.ApiConsumer=class{constructor(e){this.strategy=e,this.consume=async e=>(await this.strategy.getExposedFunctions(e)).reduce(((t,n)=>({...t,[n.key]:this.strategy.createFunction(n,e)})),{})}};var Hn={},Nn={};Object.defineProperty(Nn,"__esModule",{value:!0}),Nn.expose=Nn.getExposedProperties=void 0;const Dn=Symbol("exposedProperties");Nn.getExposedProperties=e=>e[Dn]||e.prototype[Dn]||[];Nn.expose=e=>(t,n,i)=>{t[Dn]=t[Dn]||[],t[Dn].push({key:n,descriptor:i,options:e})},Object.defineProperty(Hn,"__esModule",{value:!0}),Hn.ApiExposer=void 0;const Un=Nn;Hn.ApiExposer=class{constructor(e){this.strategy=e,this.exposeInstance=async(e,t)=>{const n=(0,Un.getExposedProperties)(e),i=await Promise.all(n.map((async({key:n,options:i})=>({key:n,options:await this.strategy.exposeFunction(e[n].bind(e),{key:n,options:i,meta:t})}))));await this.strategy.exposeMeta(t,i)}}};var Vn={},zn={},Kn={};Object.defineProperty(Kn,"__esModule",{value:!0}),Kn.ChannelsConsumer=void 0;Kn.ChannelsConsumer=class{constructor(e){this.channel=e,this.getExposedFunctions=async e=>{const{id:t}=e,{props:n}=await this.channel.dispatch(`api-meta:${t}`);return n},this.createFunction=e=>(...t)=>{const{action:n}=e.options;return this.channel.dispatch(n,{args:t})}}};var qn={};Object.defineProperty(qn,"__esModule",{value:!0}),qn.ChannelsExposer=void 0;qn.ChannelsExposer=class{constructor(e){this.channelProviderOrClient=e,this.exposeFunction=async(e,t)=>{const{key:n,options:i,meta:r}=t,{id:o}=r,s=`${o}.${i?.action||n}`;return await this.channelProviderOrClient.register(s,(async({args:t})=>e(...t))),{action:s}},this.exposeMeta=async({id:e},t)=>{const n=`api-meta:${e}`;await this.channelProviderOrClient.register(n,(()=>({props:t})))}}},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Kn,e),n(qn,e)}(zn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(zn,e)}(Vn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Wn,e),n(Hn,e),n(Vn,e),n(Nn,e)}(Gn);var Jn={};Object.defineProperty(Jn,"__esModule",{value:!0}),Jn.createRelayedDispatch=exports.relayChannelClientApi_1=Jn.relayChannelClientApi=void 0;const Yn=["no longer connected","RTCDataChannel closed unexpectedly","The client you are trying to dispatch from is disconnected from the target provider"];exports.relayChannelClientApi_1=Jn.relayChannelClientApi=async(e,t)=>{e.register(`relay:${t}`,(({action:t,target:n,payload:i})=>e.dispatch(n,t,i))),await Promise.resolve()};Jn.createRelayedDispatch=(e,t,n,i)=>async(r,o)=>{try{return await e.dispatch(`relay:${n}`,{action:r,payload:o,target:t})}catch(e){if(s=e.message,Yn.some((e=>s.includes(e)))&&i)throw new Error(i);throw e}var s};var Zn,Qn,Xn,ei=s&&s.__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},ti=s&&s.__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)};Object.defineProperty(Bn,"__esModule",{value:!0}),Bn.ColumnOrRow=Bn.TabStack=Bn.LayoutNode=void 0;const ni=Gn,ii=Jn;class ri{constructor(e,t){Zn.set(this,void 0),this.isRoot=()=>ti(this,Zn,"f").isRoot(this.entityId),this.exists=()=>ti(this,Zn,"f").exists(this.entityId),this.getParent=async()=>{const e=await ti(this,Zn,"f").getParent(this.entityId);if(e)return ri.getEntity(e,ti(this,Zn,"f"))},this.createAdjacentStack=async(e,t)=>{const n=await ti(this,Zn,"f").createAdjacentStack(this.entityId,e,t);return ri.getEntity({entityId:n,type:"stack"},ti(this,Zn,"f"))},this.getAdjacentStacks=async e=>(await ti(this,Zn,"f").getAdjacentStacks({targetId:this.entityId,edge:e})).map((e=>ri.getEntity({type:"stack",entityId:e.entityId},ti(this,Zn,"f")))),ei(this,Zn,e,"f"),this.entityId=t}}Bn.LayoutNode=ri,Zn=new WeakMap,ri.newLayoutEntitiesClient=async(e,t,n)=>{const i=(0,ii.createRelayedDispatch)(e,n,"layout-relay","You are trying to interact with a layout component on a window that does not exist or has been destroyed.");return new ni.ApiConsumer(new ni.ChannelsConsumer({dispatch:i})).consume({id:t})},ri.getEntity=(e,t)=>{const{entityId:n,type:i}=e;switch(i){case"column":case"row":return new si(t,n,i);case"stack":return new oi(t,n);default:throw new Error(`Unrecognised Layout Entity encountered ('${JSON.stringify(e)})`)}};class oi extends ri{constructor(e,t){super(e,t),Qn.set(this,void 0),this.type="stack",this.getViews=()=>ti(this,Qn,"f").getStackViews(this.entityId),this.addView=async(e,t={index:0})=>ti(this,Qn,"f").addViewToStack(this.entityId,e,t),this.removeView=async e=>{await ti(this,Qn,"f").removeViewFromStack(this.entityId,e)},this.setActiveView=async e=>{await ti(this,Qn,"f").setStackActiveView(this.entityId,e)},ei(this,Qn,e,"f")}}Bn.TabStack=oi,Qn=new WeakMap;class si extends ri{constructor(e,t,n){super(e,t),Xn.set(this,void 0),this.getContent=async()=>(await ti(this,Xn,"f").getContent(this.entityId)).map((e=>ri.getEntity(e,ti(this,Xn,"f")))),ei(this,Xn,e,"f"),this.type=n}}Bn.ColumnOrRow=si,Xn=new WeakMap;var ai={};Object.defineProperty(ai,"__esModule",{value:!0}),ai.DEFAULT_LAYOUT_KEY=ai.LAYOUT_CONTROLLER_ID=void 0,ai.LAYOUT_CONTROLLER_ID="layout-entities",ai.DEFAULT_LAYOUT_KEY="__default__";var ci,di,hi,li=s&&s.__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)};Object.defineProperty(Ln,"__esModule",{value:!0}),Ln.Layout=void 0;const ui=G,pi=O,wi=d,yi=Tn,fi=Bn,gi=ai;class mi extends wi.Base{static getClient(e){return li(e,di,"f").getValue()}constructor(e,t){super(t),ci.add(this),di.set(this,new ui.Lazy((async()=>fi.LayoutNode.newLayoutEntitiesClient(await this.platform.getClient(),gi.LAYOUT_CONTROLLER_ID,this.identity)))),this.replace=async e=>{this.wire.sendAction("layout-replace").catch((e=>{}));const t=await this.platform.getClient();await t.dispatch("replace-layout",{target:this.identity,opts:{layout:e}})},this.replaceView=async(e,t)=>{this.wire.sendAction("layout-replace-view").catch((e=>{}));const n=await this.platform.getClient();await n.dispatch("replace-view",{target:this.identity,opts:{viewToReplace:e,newView:t}})},this.applyPreset=async e=>{this.wire.sendAction("layout-apply-preset").catch((e=>{}));const t=await this.platform.getClient(),{presetType:n}=e;if(!n||!(0,yi.isValidPresetType)(n))throw new Error("Cannot apply preset layout, please include an applicable presetType property in the PresetLayoutOptions.");await t.dispatch("apply-preset-layout",{target:this.identity,opts:{presetType:n}})};const n=(0,pi.validateIdentity)(e);if(n)throw new Error(n);this.identity=e,this.platform=this.fin.Platform.wrapSync({uuid:e.uuid}),e.uuid===this.fin.me.uuid&&e.name===this.fin.me.name&&(this.init=this.fin.Platform.Layout.init)}async getConfig(){this.wire.sendAction("layout-get-config").catch((e=>{}));return(await this.platform.getClient()).dispatch("get-frame-snapshot",{target:this.identity})}async getCurrentViews(){this.wire.sendAction("layout-get-views").catch((e=>{}));const e=await this.platform.getClient();return(await e.dispatch("get-layout-views",{target:this.identity})).map((e=>this.fin.View.wrapSync(e)))}async getRootItem(){this.wire.sendAction("layout-get-root-item").catch((()=>{}));const e=await li(this,di,"f").getValue(),t=await e.getRoot("layoutName"in this.identity?this.identity:void 0);return fi.LayoutNode.getEntity(t,e)}async getStackByViewIdentity(e){this.wire.sendAction("layout-get-stack-by-view").catch((()=>{}));const t=await li(this,di,"f").getValue(),n=await t.getStackByView(e);if(!n)throw new Error(`No stack found for view: ${e.uuid}/${e.name}`);return fi.LayoutNode.getEntity(n,t)}async addView(e,{location:t,targetView:n}={}){this.wire.sendAction("layout-add-view").catch((e=>{}));const{identity:i}=await li(this,ci,"m",hi).call(this,"layout-add-view",{viewOptions:e,location:t,targetView:n});return{identity:i}}async closeView(e){this.wire.sendAction("layout-close-view").catch((e=>{})),await li(this,ci,"m",hi).call(this,"layout-close-view",{viewIdentity:e})}}Ln.Layout=mi,di=new WeakMap,ci=new WeakSet,hi=async function(e,t){return(await this.platform.getClient()).dispatch(e,{target:this.identity,opts:t})};var vi,Ci,bi,Ii,Ei,xi=s&&s.__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)},Ai=s&&s.__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};Object.defineProperty(kn,"__esModule",{value:!0}),kn.LayoutModule=void 0;const Pi=d,Mi=Ln,_i=ai;class Oi extends Pi.Base{constructor(){super(...arguments),vi.add(this),Ci.set(this,!1),bi.set(this,null),this.init=async(e={})=>{if(this.wire.sendAction("layout-init").catch((e=>{})),!this.wire.environment.layoutAllowedInContext(this.fin))throw new Error("Layout.init can only be called from a Window context.");if(xi(this,Ci,"f"))throw new Error("Layout.init was already called, please use Layout.create to add additional layouts.");"openfin"===this.wire.environment.type&&await this.fin.Platform.getCurrentSync().getClient(),Ai(this,Ci,!0,"f"),Ai(this,bi,await this.wire.environment.initLayoutManager(this.fin,this.wire,e),"f"),await this.wire.environment.applyLayoutSnapshot(this.fin,xi(this,bi,"f"),e);const t={name:this.fin.me.name,uuid:this.fin.me.uuid};if(!e.layoutManagerOverride){const e={layoutName:_i.DEFAULT_LAYOUT_KEY,...t};return xi(this,Ii,"f").call(this,e)}return this.wrapSync(t)},Ii.set(this,(e=>{const t="[Layout] You are using a deprecated property `layoutManager` - it will throw if you access it starting in v37.",n=new Proxy({},{get(e,n){throw console.warn(`[Layout-mgr-proxy] accessing ${n.toString()}`),new Error(t)}}),i=Object.assign(this.wrapSync(e),{layoutManager:n});return new Proxy(i,{get(e,n){if("layoutManager"===n)throw console.warn(`[Layout-proxy] accessing ${n.toString()}`),new Error(t);return e[n]}})})),this.getCurrentLayoutManagerSync=()=>xi(this,vi,"m",Ei).call(this,"fin.Platform.Layout.getCurrentLayoutManagerSync()"),this.create=async e=>this.wire.environment.createLayout(xi(this,vi,"m",Ei).call(this,"fin.Platform.Layout.create()"),e),this.destroy=async e=>this.wire.environment.destroyLayout(xi(this,vi,"m",Ei).call(this,"fin.Platform.Layout.destroy()"),e)}async wrap(e){return this.wire.sendAction("layout-wrap").catch((e=>{})),new Mi.Layout(e,this.wire)}wrapSync(e){return this.wire.sendAction("layout-wrap-sync").catch((e=>{})),new Mi.Layout(e,this.wire)}async getCurrent(){if(this.wire.sendAction("layout-get-current").catch((e=>{})),"openfin"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error("You are not in a Window context. Only Windows can have a Layout.");const{uuid:e,name:t}=this.fin.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction("layout-get-current-sync").catch((e=>{})),"openfin"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error("You are not in a Window context. Only Windows can have a Layout.");const{uuid:e,name:t}=this.fin.me;return this.wrapSync({uuid:e,name:t})}async getLayoutByViewIdentity(e){this.wire.sendAction("layout-get-by-view-identity").catch((()=>{}));let t=await this.wire.environment.getViewWindowIdentity(this.fin,e);t.identity&&(t=t.identity);try{const n=this.wrapSync(t),i=await Mi.Layout.getClient(n),r=await i.getLayoutIdentityForViewOrThrow(e);return this.wrapSync(r)}catch(n){if(!["No action registered at target for","getLayoutIdentityForViewOrThrow is not a function"].some((e=>n.message.includes(e))))throw n;if(t.uuid===t.name)throw new Error(`View identity ${JSON.stringify(e)} is not attached to any layout in provider window ${JSON.stringify(t)}.`);return this.wrapSync(t)}}}kn.LayoutModule=Oi,Ci=new WeakMap,bi=new WeakMap,Ii=new WeakMap,vi=new WeakSet,Ei=function(e){if(!xi(this,bi,"f"))throw new Error(`You must call init before using the API ${e}`);return xi(this,bi,"f")},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(kn,e),n(Ln,e)}(jn),Object.defineProperty(Pn,"__esModule",{value:!0}),Pn.PlatformModule=void 0;const Si=d,Ri=Mn,Fi=jn;class ji extends Si.Base{constructor(e,t){super(e),this._channel=t,this.Layout=new Fi.LayoutModule(this.wire)}async init(e){if(!fin.__internal_.isPlatform||fin.me.name!==fin.me.uuid)throw new Error("fin.Platform.init should only be called from a custom platform provider running in the main window of the application.");return this.wire.environment.initPlatform(this.fin,e)}async wrap(e){return this.wire.sendAction("platform-wrap").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}wrapSync(e){return this.wire.sendAction("platform-wrap-sync").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}async getCurrent(){return this.wire.sendAction("platform-get-current").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction("platform-get-current-sync").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}start(e){return this.wire.sendAction("platform-start").catch((e=>{})),new Promise((async(t,n)=>{try{const{uuid:n}=e,i=await this.fin.Application._create({...e,isPlatformController:!0});i.once("platform-api-ready",(()=>t(this.wrapSync({uuid:n})))),i._run({uuid:n})}catch(e){n(e)}}))}startFromManifest(e,t){return this.wire.sendAction("platform-start-from-manifest").catch((e=>{})),new Promise((async(n,i)=>{try{const i=await this.fin.Application._createFromManifest(e);i.once("platform-api-ready",(()=>n(this.wrapSync({uuid:i.identity.uuid})))),i._run(t)}catch(e){i(e)}}))}}Pn.PlatformModule=ji,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Pn,e),n(Mn,e)}(An);var ki={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getMe=e.getBaseMe=e.environmentUnsupportedMessage=void 0;const t=J(),n=un,i=ie(),r=rn;function o(e,t,n){return{...{isView:"view"===e,isWindow:"window"===e,isFrame:"iframe"===e,isExternal:"external connection"===e},uuid:t,name:n,entityType:e}}e.environmentUnsupportedMessage="You are not running in OpenFin.",e.getBaseMe=o,e.getMe=function(s){const{uuid:a,name:c,entityType:d}=s.me,h={setContext(){throw new Error(e.environmentUnsupportedMessage)},addContextHandler(){throw new Error(e.environmentUnsupportedMessage)},getContextGroups(){throw new Error(e.environmentUnsupportedMessage)},joinContextGroup(){throw new Error(e.environmentUnsupportedMessage)},removeFromContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getAllClientsInContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getInfoForContextGroup(){throw new Error(e.environmentUnsupportedMessage)}},l="Interop API has not been instantiated. Either connection has failed or you have not declared interop in your config.",u={setContext(){throw new Error(l)},addContextHandler(){throw new Error(l)},getContextGroups(){throw new Error(l)},joinContextGroup(){throw new Error(l)},removeFromContextGroup(){throw new Error(l)},getAllClientsInContextGroup(){throw new Error(l)},getInfoForContextGroup(){throw new Error(l)}},p={eventNames:()=>{throw new Error(e.environmentUnsupportedMessage)},emit:()=>{throw new Error(e.environmentUnsupportedMessage)},listeners:()=>{throw new Error(e.environmentUnsupportedMessage)},listenerCount:()=>{throw new Error(e.environmentUnsupportedMessage)},on:()=>{throw new Error(e.environmentUnsupportedMessage)},addListener:()=>{throw new Error(e.environmentUnsupportedMessage)},once:()=>{throw new Error(e.environmentUnsupportedMessage)},prependListener:()=>{throw new Error(e.environmentUnsupportedMessage)},prependOnceListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeAllListeners:()=>{throw new Error(e.environmentUnsupportedMessage)}};switch(d){case"view":return Object.assign(new t.View(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case"window":return Object.assign(new i._Window(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case"iframe":return Object.assign(new n._Frame(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case"external connection":return Object.assign(new r.ExternalApplication(s,{uuid:a}),o(d,a,c),{interop:u,isOpenFin:!1});default:return{...o(d,a,c),...p,interop:h,isOpenFin:!1}}}}(ki);var Li={},Ti={},$i={};Object.defineProperty($i,"__esModule",{value:!0}),$i.createWarningObject=$i.createUnusableObject=void 0,$i.createUnusableObject=function(e){const t=()=>{throw new Error(e)};return new Proxy({},{apply:t,construct:t,defineProperty:t,deleteProperty:t,get:t,getOwnPropertyDescriptor:t,getPrototypeOf:t,has:t,isExtensible:t,ownKeys:t,preventExtensions:t,set:t,setPrototypeOf:t})},$i.createWarningObject=function(e,t){return new Proxy(t,{get:(...t)=>(console.warn(e),Reflect.get(...t)),set:(...t)=>(console.warn(e),Reflect.set(...t)),getOwnPropertyDescriptor:(...t)=>(console.warn(e),Reflect.getOwnPropertyDescriptor(...t)),ownKeys:(...t)=>(console.warn(e),Reflect.ownKeys(...t))})};var Bi,Gi={},Wi={};var Hi={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.wrapIntentHandler=e.BROKER_ERRORS=e.generateOverrideWarning=e.generateOverrideError=e.wrapContextHandler=e.wrapInTryCatch=e.generateId=void 0;e.generateId=()=>`${Math.random()}${Date.now()}`;e.wrapInTryCatch=(e,t)=>(...n)=>{try{return e(...n)}catch(e){throw new Error((t||"")+e)}};e.wrapContextHandler=(e,t)=>async n=>{try{await e(n)}catch(e){throw console.error(`Error thrown by handler ${t} for context type ${n.type}: ${e}`),e}};e.generateOverrideError=(e,t)=>`You have tried to to use ${e} but ${t} has not been overridden in the Interop Broker. Please override this function. Refer to our documentation for more info.`;e.generateOverrideWarning=(e,t,n,i)=>{const{uuid:r,name:o}=n;return i?`Entity with identity: ${r}/${o} has called ${i} or ${e} but ${t} has not been overridden.`:`Entity with identity: ${r}/${o} has called ${e} but ${t} has not been overridden.`},e.BROKER_ERRORS={fireIntent:(0,e.generateOverrideError)("fireIntent","handleFiredIntent"),fireIntentForContext:(0,e.generateOverrideError)("fireIntentForContext","handleFiredIntentForContext"),getInfoForIntent:(0,e.generateOverrideError)("getInfoForIntent","handleInfoForIntent"),getInfoForIntentsByContext:(0,e.generateOverrideError)("getInfoForIntentsByContext","handleInfoForIntentsByContext"),joinSessionContextGroupWithJoinContextGroup:"The Context Group you have tried to join is a Session Context Group. Custom Context Groups can only be defined by the Interop Broker through code or manifest configuration. Please use joinSessionContextGroup.",fdc3Open:(0,e.generateOverrideError)("fdc3.open","fdc3HandleOpen"),fdc3FindInstances:(0,e.generateOverrideError)("fdc3.findInstances","fdc3HandleFindInstances"),fdc3GetAppMetadata:(0,e.generateOverrideError)("fdc3.getAppMetadata","fdc3HandleGetAppMetadata"),fdc3GetInfo:(0,e.generateOverrideError)("fdc3.getInfo","fdc3HandleGetInfo")};e.wrapIntentHandler=(e,t)=>async n=>{try{return e(n)}catch(e){throw console.error(`Error thrown by handler ${t}: ${e}`),e}}}(Hi);var Ni,Di,Ui={};function Vi(){if(Di)return Gi;Di=1;var e,t,n,r=s&&s.__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},o=s&&s.__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)},a=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Gi,"__esModule",{value:!0}),Gi.InteropBroker=void 0;const c=d,h=a(function(){if(Bi)return Wi;Bi=1,Object.defineProperty(Wi,"__esModule",{value:!0});const e=Cr();return Wi.default=class{constructor(e,t){this.provider=e,this.id=t,this.lastContext=void 0,this.contextGroupMap=new Map,this.clients=new Map,this.registerListeners()}registerListeners(){this.provider.register(`sessionContextGroup:getContext-${this.id}`,this.getCurrentContext.bind(this)),this.provider.register(`sessionContextGroup:setContext-${this.id}`,this.setContext.bind(this)),this.provider.register(`sessionContextGroup:handlerAdded-${this.id}`,this.handlerAdded.bind(this)),this.provider.register(`sessionContextGroup:handlerRemoved-${this.id}`,this.handlerRemoved.bind(this))}getCurrentContext(e){return e.type?this.contextGroupMap.get(e.type):this.lastContext}setContext(t,n){const{context:i}=t,r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name} not in Session Client State Map`);this.contextGroupMap.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{e.contextHandlers.get(i.type)?.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getClientState(e){return this.clients.get(e.endpointId)}async handlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(i){const e=r.contextHandlers.get(i)||[];r.contextHandlers.set(i,[...e,n]);const o=this.contextGroupMap.get(i);o&&await this.provider.dispatch(t,n,o)}else{r.globalHandler=n;const e=[...this.contextGroupMap.keys()].map((async e=>{const i=this.contextGroupMap.get(e);i&&await this.provider.dispatch(t,n,i)}));await Promise.all(e)}}handlerRemoved(e,t){const{handlerId:n}=e,i=this.clients.get(t.endpointId);i?(Array.from(i.contextHandlers).forEach((([,e])=>{const t=e.indexOf(n);t>-1&&e.splice(t,1)})),i.globalHandler===n&&(i.globalHandler=void 0)):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={contextHandlers:new Map,clientIdentity:e,globalHandler:void 0};this.clients.set(e.endpointId,t)}}onDisconnection(e){this.clients.delete(e.endpointId)}},Wi}()),l=Hi,u=a(i),p=function(){if(Ni)return Ui;Ni=1,Object.defineProperty(Ui,"__esModule",{value:!0}),Ui.PrivateChannelProvider=void 0;const e=Vi();return Ui.PrivateChannelProvider=class t{constructor(e,t){this.provider=e,this.id=t,this.clients=new Map,this.registerListeners(),this.contextByContextType=new Map,this.lastContext=void 0,this.provider.onConnection((e=>this.registerNewClient(e))),this.provider.onDisconnection((async e=>{const{endpointId:t}=e;this.clients.has(t)&&await this.handleClientDisconnecting(e),0===(await this.provider.getAllClientInfo()).length&&this.provider.destroy()}))}getClientState(e){return this.clients.get(e.endpointId)}registerListeners(){this.provider.register("broadcast",this.broadcast.bind(this)),this.provider.register("getCurrentContext",this.getCurrentContext.bind(this)),this.provider.register("contextHandlerAdded",this.contextHandlerAdded.bind(this)),this.provider.register("contextHandlerRemoved",this.contextHandlerRemoved.bind(this)),this.provider.register("nonStandardHandlerRemoved",this.nonStandardHandlerRemoved.bind(this)),this.provider.register("onAddContextHandlerAdded",this.onAddContextHandlerAdded.bind(this)),this.provider.register("onDisconnectHandlerAdded",this.onDisconnectHandlerAdded.bind(this)),this.provider.register("onUnsubscribeHandlerAdded",this.onUnsubscribeHandlerAdded.bind(this)),this.provider.register("clientDisconnecting",((e,t)=>{this.handleClientDisconnecting(t)}))}broadcast(t,n){const{context:i}=t;if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name}, tried to call broadcast, is not connected to this Private Channel`);const r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to broadcast - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);this.contextByContextType.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{const t=e.handlerIdsByContextTypes.get(i.type);t&&t.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getCurrentContext(e,t){const{contextType:n}=e;if(!this.getClientState(t))throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call getCurrentContext, is not connected to this Private Channel`);if(void 0!==n){return this.contextByContextType.get(n)||null}return this.lastContext?this.lastContext:null}contextHandlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call addContextListener, is not connected to this Private Channel`);if(i){const e=r.handlerIdsByContextTypes.get(i)||[];r.handlerIdsByContextTypes.set(i,[...e,n])}else r.globalHandler=n;Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&e.onAddContextListenerHandlerId&&this.provider.dispatch(e.clientIdentity,e.onAddContextListenerHandlerId,i)}))}async contextHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);if(i){let e;if(i.globalHandler===n)i.globalHandler=void 0;else for(const[t,r]of i.handlerIdsByContextTypes){const i=r.indexOf(n);i>-1&&(r.splice(i,1),e=t)}const r=(await this.getConnectedClients()).map((async n=>{const{clientIdentity:i,clientIdentity:{endpointId:r},onUnsubscribeHandlerId:o}=n;r!==t.endpointId&&o&&await this.provider.dispatch(i,o,e)}));try{await Promise.all(r)}catch(e){throw console.error(`Problem when attempting to dispatch to onUnsubscribeHandlers. Error: ${e} Removing Client: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}`),new Error(e)}}else console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}.`)}nonStandardHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);i?i.onDisconnectHandlerId===n?i.onDisconnectHandlerId=void 0:i.onAddContextListenerHandlerId===n?i.onAddContextListenerHandlerId=void 0:i.onUnsubscribeHandlerId===n&&(i.onUnsubscribeHandlerId=void 0):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}onAddContextHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onAddContextListener, is not connected to this Private Channel`);n.onAddContextListenerHandlerId=i,Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&Array.from(e.handlerIdsByContextTypes.keys()).forEach((e=>{this.provider.dispatch(t,i,e)}))}))}onDisconnectHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onDisconnect, is not connected to this Private Channel`);n.onDisconnectHandlerId=i}onUnsubscribeHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onUnsubscribe, is not connected to this Private Channel`);n.onUnsubscribeHandlerId=i}removeClient(e){const t=this.getClientState(e);if(!t)throw new Error(`Client with Identity: ${e.uuid} ${e.name}, tried to call disconnect, is not connected to this Private Channel`);t.handlerIdsByContextTypes.clear(),this.clients.delete(e.endpointId)}async fireOnDisconnectForOtherClients(e){const{endpointId:t}=e,n=(await this.getConnectedClients()).map((async e=>{const{clientIdentity:{endpointId:n},onDisconnectHandlerId:i}=e;n!==t&&i&&await this.provider.dispatch(e.clientIdentity,i)}));try{await Promise.all(n)}catch(t){throw console.error(`Problem when attempting to dispatch to onDisconnectHandlers. Error: ${t} Disconnecting Client: uuid: ${e.uuid}. name: ${e.name}. endpointId: ${e.endpointId}`),new Error(t)}}async unsubscribeAll(e){const{endpointId:t}=e,n=this.clients.get(t);if(n){const t=Array.from(n.handlerIdsByContextTypes.values()).flat(),i=n.globalHandler;if(t.length>0){const n=t.map((async t=>this.contextHandlerRemoved({handlerId:t},e)));try{await Promise.all(n)}catch(e){console.error(e.message)}}if(i)try{await this.contextHandlerRemoved({handlerId:i},e)}catch(e){console.error(e.message)}}}async handleClientDisconnecting(e){await this.unsubscribeAll(e),this.removeClient(e),await this.fireOnDisconnectForOtherClients(e)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={clientIdentity:e,handlerIdsByContextTypes:new Map,globalHandler:void 0,onAddContextListenerHandlerId:void 0,onUnsubscribeHandlerId:void 0,onDisconnectHandlerId:void 0};this.clients.set(e.endpointId,t)}}async getConnectedClients(){const e=await this.provider.getAllClientInfo();return Array.from(this.clients.values()).filter((t=>{const{uuid:n,name:i}=t.clientIdentity;return e.some((e=>i===e.name&&n===e.uuid))}))}static init(e,n){return new t(e,n)}},Ui}(),w=G,y=[{id:"green",displayMetadata:{color:"#00CC88",name:"green"}},{id:"purple",displayMetadata:{color:"#8C61FF",name:"purple"}},{id:"orange",displayMetadata:{color:"#FF8C4C",name:"orange"}},{id:"red",displayMetadata:{color:"#FF5E60",name:"red"}},{id:"pink",displayMetadata:{color:"#FF8FB8",name:"pink"}},{id:"yellow",displayMetadata:{color:"#E9FF8F",name:"yellow"}}];let f=class i extends c.Base{constructor(i,s,a){super(i),e.set(this,void 0),t.set(this,void 0),n.set(this,void 0),this.getProvider=()=>o(this,n,"f").getValue(),this.interopClients=new Map,this.contextGroupsById=new Map,r(this,t,a.contextGroups??[...y],"f"),r(this,e,a.fdc3Info,"f"),a?.logging&&(this.logging=a.logging),this.intentClientMap=new Map,this.lastContextMap=new Map,this.sessionContextGroupMap=new Map,r(this,n,new w.Lazy(s),"f"),this.setContextGroupMap(),this.setupChannelProvider()}static createClosedConstructor(...e){return class extends i{constructor(...t){if(t.length){const[n,i,r]=t;if(r&&"object"==typeof r&&!(0,u.default)(r,e[2]))return console.warn("You have modified the parameters of the InteropOverride constructor. This behavior is deprecated and will be removed in a future version. You can modify these options in your manifest. Please consult our Interop docs for guidance on migrating to the new override scheme."),void super(e[0],e[1],r);console.warn("You are attempting to pass arguments to the InteropOverride constructor. This is not necessary, and these passed arguments will be ignored. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.")}super(...e)}}}setContext({context:e},t){this.wire.sendAction("interop-broker-set-context").catch((e=>{}));const n=this.getClientState(t);if(!n||!n.contextGroupId)throw n?new Error("You must join a context group before you can set context."):new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);{const{contextGroupId:t}=n;this.setContextForGroup({context:e},t)}}setContextForGroup({context:e},t){this.wire.sendAction("interop-broker-set-context-for-group").catch((e=>{}));const n=this.contextGroupsById.get(t);if(!n)throw new Error(`Unable to set context for context group that isn't in the context group mapping: ${t}.`);const r=i.checkContextIntegrity(e);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(e)}`);const o=e.type;n.set(o,e),this.lastContextMap.set(t,o);Array.from(this.interopClients.values()).filter((e=>e.contextGroupId===t)).forEach((t=>{for(const[,n]of t.contextHandlers)i.isContextTypeCompatible(o,n.contextType)&&this.invokeContextHandler(t.clientIdentity,n.handlerId,e)}))}getCurrentContext(e,t){this.wire.sendAction("interop-broker-get-current-context").catch((e=>{}));const n=this.getClientState(t);if(!n?.contextGroupId)throw new Error("You must be a member of a context group to call getCurrentContext");const{contextGroupId:i}=n,r=this.contextGroupsById.get(i),o=this.lastContextMap.get(i),s=e?.contextType??o;return r&&s?r.get(s):void 0}async joinContextGroup({contextGroupId:e,target:t},n){if(this.wire.sendAction("interop-broker-join-context-group").catch((e=>{})),this.sessionContextGroupMap.has(e))throw new Error(l.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup);if(t){i.hasEndpointId(t)&&await this.addClientToContextGroup({contextGroupId:e},t);try{const n=this.channel.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name));if(!n.length)throw new Error(`Given Identity ${t.uuid} ${t.name} is not connected to the Interop Broker.`);n.length>1&&console.warn(`More than one connection found for identity ${t.uuid} ${t.name}`);const i=[];for(const t of n)i.push(this.addClientToContextGroup({contextGroupId:e},t));await Promise.all(i)}catch(e){throw new Error(e)}}else await this.addClientToContextGroup({contextGroupId:e},n)}async addClientToContextGroup({contextGroupId:e},t){this.wire.sendAction("interop-broker-add-client-to-context-group").catch((e=>{}));const n=this.getClientState(t);if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(!this.getContextGroups().find((t=>t.id===e)))throw new Error(`Attempting to join a context group that does not exist: ${e}. You may only join existing context groups.`);if(n.contextGroupId!==e){n.contextGroupId=e,await this.setCurrentContextGroupInClientOptions(t,e);const i=this.contextGroupsById.get(e);for(const[,e]of n.contextHandlers){const{contextType:n,handlerId:r}=e;if(void 0===n)i.forEach(((e,n)=>{this.invokeContextHandler(t,r,e)}));else if(i.has(n)){const e=i.get(n);e&&this.invokeContextHandler(t,r,e)}}}}async removeFromContextGroup({target:e},t){if(this.wire.sendAction("interop-broker-remove-from-context-group").catch((e=>{})),e){i.hasEndpointId(e)&&await this.removeClientFromContextGroup(e);try{const t=this.channel.connections.filter((t=>t.uuid===e.uuid&&t.name===e.name));if(!t.length)throw new Error(`No connection found for given Identity ${e.uuid} ${e.name}`);t.length>1&&console.warn(`More than one connection found for identity ${e.uuid} ${e.name}`);const n=[];for(const e of t)n.push(this.removeClientFromContextGroup(e));await Promise.all(n)}catch(e){throw new Error(e)}}else await this.removeClientFromContextGroup(t)}async removeClientFromContextGroup(e){this.wire.sendAction("interop-broker-remove-client-from-context-group").catch((e=>{}));const t=this.getClientState(e);t&&(t.contextGroupId=void 0),await this.setCurrentContextGroupInClientOptions(e,null)}getContextGroups(){return this.wire.sendAction("interop-broker-get-context-groups").catch((e=>{})),o(this,t,"f").map((e=>({...e})))}getInfoForContextGroup({contextGroupId:e}){return this.wire.sendAction("interop-broker-get-info-for-context-group").catch((e=>{})),this.getContextGroups().find((t=>t.id===e))}getAllClientsInContextGroup({contextGroupId:e}){this.wire.sendAction("interop-broker-get-all-clients-in-context-group").catch((e=>{}));return Array.from(this.interopClients.values()).filter((t=>t.contextGroupId===e)).map((e=>e.clientIdentity))}async handleFiredIntent(e,t){const n=(0,l.generateOverrideWarning)("fdc3.raiseIntent","InteropBroker.handleFiredIntent",t,"interopClient.fireIntent");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntent)}async setIntentTarget(e,t){this.wire.sendAction("interop-broker-set-intent-target").catch((e=>{}));const n=this.intentClientMap.get(t.name),i=`intent-handler-${e.name}`;if(n){const t=n.get(i);if(t){if(t.pendingIntents.push(e),t.clientIdentity&&t.isReady){const{clientIdentity:e,pendingIntents:n}=t;try{const r=n[n.length-1];await this.invokeIntentHandler(e,i,r),t.pendingIntents=[]}catch(n){console.error(`Error invoking intent handler for client ${e.uuid}/${e.name}/${e.endpointId}`),t.isReady=!1}}}else n.set(i,{isReady:!1,pendingIntents:[e]})}else{this.intentClientMap.set(t.name,new Map);const n=this.intentClientMap.get(t.name);n&&n.set(i,{isReady:!1,pendingIntents:[e]})}}async handleInfoForIntent(e,t){const n=(0,l.generateOverrideWarning)("fdc3.findIntent","InteropBroker.handleInfoForIntent",t,"interopClient.getInfoForIntent");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntent)}async handleInfoForIntentsByContext(e,t){const n=(0,l.generateOverrideWarning)("fdc3.findIntentsByContext","InteropBroker.handleInfoForIntentsByContext",t,"interopClient.getInfoForIntentsByContext");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntentsByContext)}async handleFiredIntentForContext(e,t){const n=(0,l.generateOverrideWarning)("fdc3.raiseIntentForContext","InteropBroker.handleFiredIntentForContext",t,"interopClient.fireIntentForContext");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntentForContext)}async clientDisconnected(e){}async fdc3HandleOpen({app:e,context:t},n){const i=(0,l.generateOverrideWarning)("fdc3.open","InteropBroker.fdc3HandleOpen",n);throw console.warn(i),new Error(l.BROKER_ERRORS.fdc3Open)}async fdc3HandleFindInstances(e,t){const n=(0,l.generateOverrideWarning)("fdc3.open","InteropBroker.fdc3HandleFindInstances",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3FindInstances)}async fdc3HandleGetAppMetadata(e,t){const n=(0,l.generateOverrideWarning)("fdc3.getAppMetadata","InteropBroker.fdc3HandleGetAppMetadata",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3GetAppMetadata)}async invokeContextHandler(e,t,n){const i=await this.getProvider();try{await i.dispatch(e,t,n)}catch(i){console.error(`Error invoking context handler ${t} for context type ${n.type} in client ${e.uuid}/${e.name}/${e.endpointId}`,i)}}async invokeIntentHandler(e,t,n){const i=await this.getProvider();await i.dispatch(e,t,n)}async fdc3HandleGetInfo(t,n){const{fdc3Version:i}=t;return{fdc3Version:i,...o(this,e,"f"),optionalFeatures:{OriginatingAppMetadata:!1,UserChannelMembershipAPIs:!0},appMetadata:{appId:"",instanceId:""}}}async getAllClientInfo(){return(await this.getProvider()).getAllClientInfo()}decorateSnapshot(e){return{...e,interopSnapshotDetails:{contextGroupStates:this.getContextGroupStates()}}}applySnapshot(e,t){const n=e?.interopSnapshotDetails?.contextGroupStates;n&&(t?.closeExistingWindows||this.updateExistingClients(n),this.rehydrateContextGroupStates(n))}updateExistingClients(e){this.interopClients.forEach((t=>{const{clientIdentity:n,contextGroupId:r,contextHandlers:o}=t;if(r){const t=e[r];for(const[,e]of Object.entries(t))o.forEach((t=>{const{handlerId:r,contextType:o}=t;i.isContextTypeCompatible(e.type,o)&&this.invokeContextHandler(n,r,e)}))}}))}getContextGroupStates(){return i.toObject(this.contextGroupsById)}rehydrateContextGroupStates(e){const t=Object.entries(e);for(const[e,n]of t){const t=Object.entries(n);for(const[n,i]of t)if(this.contextGroupsById.has(e)){this.contextGroupsById.get(e).set(n,i)}else console.warn(`Attempting to set a context group that isn't in the context group mapping. Skipping context group rehydration for: ${e}`)}}contextHandlerRegistered({contextType:e,handlerId:t},n){const i={contextType:e,handlerId:t},r=this.getClientState(n);if(r?.contextHandlers.set(t,i),r&&r.contextGroupId){const{contextGroupId:i}=r,o=this.contextGroupsById.get(i);if(void 0===e)o.forEach(((e,i)=>{this.invokeContextHandler(n,t,e)}));else if(o.has(e)){const i=o.get(e);i&&this.invokeContextHandler(n,t,i)}}}async intentHandlerRegistered(e,t){const{handlerId:n}=e,i=this.intentClientMap.get(t.name),r=i?.get(n);if(i)if(r){const{pendingIntents:e}=r;r.clientIdentity=t,r.isReady=!0;try{if(e.length>0){const i=e[e.length-1];await this.invokeIntentHandler(t,n,i),r.pendingIntents=[]}}catch(e){console.error(`Error invoking intent handler: ${n} for client ${t.uuid}/${t.name}/${t.endpointId}`)}}else i.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t});else{this.intentClientMap.set(t.name,new Map);const e=this.intentClientMap.get(t.name);e&&e.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t})}}removeContextHandler({handlerId:e},t){const n=this.getClientState(t);n&&n.contextHandlers.delete(e)}handleJoinSessionContextGroup({sessionContextGroupId:e},t){try{if(!e)throw new Error("Failed to join session context group: must specify group id.");const n=this.sessionContextGroupMap.get(e);if(n)n.registerNewClient(t);else{const n=new h.default(this.channel,e);n.registerNewClient(t),this.sessionContextGroupMap.set(e,n)}return{hasConflict:this.contextGroupsById.has(e)}}catch(e){throw new Error(e)}}getClientState(e){return this.interopClients.get(e.endpointId)}static toObject(e){const t=Object.fromEntries(e),n={};return Object.entries(t).forEach((([e,t])=>{const i=Object.fromEntries(t);n[e]=i})),n}static checkContextIntegrity(e){if(!e)return{isValid:!1,reason:"No context supplied"};if("object"!=typeof e)return{isValid:!1,reason:"Context must be an Object"};if(!e.type)return{isValid:!1,reason:"Context must have a type property"};if(e.id&&"object"!=typeof e.id)return{isValid:!1,reason:"Context id must be an Object populated with key-value identifiers (if set)"};if(e.id){const{id:t}=e,n=Object.keys(t);let i=!1;if(!n.length)return{isValid:!1,reason:"Context id must have at least one key-value identifier"};if(n.forEach((e=>{"string"==typeof e&&"string"==typeof t[e]||(i=!0)})),i)return{isValid:!1,reason:"Context id key-value identifiers must be of type string"}}return e.name&&"string"!=typeof e.name?{isValid:!1,reason:"Context name must be of string type (if set)"}:{isValid:!0}}static hasEndpointId(e){return void 0!==e.endpointId}static isContextTypeCompatible(e,t){return void 0===t||e===t}setContextGroupMap(){for(const e of this.getContextGroups())this.contextGroupsById.set(e.id,new Map)}async setCurrentContextGroupInClientOptions(e,t){try{const n=await this.fin.System.getEntityInfo(e.uuid,e.name);let i;"view"===n.entityType?i=await this.fin.View.wrap(e):"window"===n.entityType&&(i=await this.fin.Window.wrap(e)),i&&await i.updateOptions({interop:{currentContextGroup:t}})}catch(e){}}async setupChannelProvider(){try{const e=await this.getProvider();this.channel=e,this.wireChannel(e)}catch(e){throw new Error(`Error setting up Interop Broker Channel Provider: ${e}`)}}wireChannel(e){e.onConnection((async(e,t)=>{if(!await this.isConnectionAuthorized(e,t))throw new Error(`Connection not authorized for ${e.uuid}, ${e.name}`);if(!e.endpointId)throw new Error("Version too old to be compatible with Interop. Please upgrade your runtime to a more recent version.");const n={contextGroupId:void 0,contextHandlers:new Map,clientIdentity:e};t?.currentContextGroup&&this.contextGroupsById.has(t.currentContextGroup)&&(n.contextGroupId=t?.currentContextGroup),this.interopClients.set(e.endpointId,n)})),e.onDisconnection((e=>{this.interopClients.delete(e.endpointId);const t=this.intentClientMap.get(e.name);t&&e.uuid===this.fin.me.uuid&&t.forEach((e=>{e.isReady=!1})),this.sessionContextGroupMap.forEach((t=>{t.onDisconnection(e)})),this.clientDisconnected(e)})),e.beforeAction((async(e,t,n)=>{if(!await this.isActionAuthorized(e,t,n))throw new Error(`Action (${e}) not authorized for ${n.uuid}, ${n.name}`);this.logging?.beforeAction?.enabled&&console.log(e,t,n)})),e.afterAction(((e,t,n)=>{this.logging?.afterAction?.enabled&&console.log(e,t,n)})),e.register("setContext",this.setContext.bind(this)),e.register("fireIntent",this.handleFiredIntent.bind(this)),e.register("getCurrentContext",this.getCurrentContext.bind(this)),e.register("getInfoForIntent",this.handleInfoForIntent.bind(this)),e.register("getInfoForIntentsByContext",this.handleInfoForIntentsByContext.bind(this)),e.register("fireIntentForContext",this.handleFiredIntentForContext.bind(this)),e.register("getContextGroups",this.getContextGroups.bind(this)),e.register("joinContextGroup",this.joinContextGroup.bind(this)),e.register("removeFromContextGroup",this.removeFromContextGroup.bind(this)),e.register("getAllClientsInContextGroup",this.getAllClientsInContextGroup.bind(this)),e.register("getInfoForContextGroup",this.getInfoForContextGroup.bind(this)),e.register("contextHandlerRegistered",this.contextHandlerRegistered.bind(this)),e.register("intentHandlerRegistered",this.intentHandlerRegistered.bind(this)),e.register("removeContextHandler",this.removeContextHandler.bind(this)),e.register("sessionContextGroup:createIfNeeded",this.handleJoinSessionContextGroup.bind(this)),e.register("fdc3Open",this.fdc3HandleOpen.bind(this)),e.register("fdc3v2FindIntentsByContext",this.handleInfoForIntentsByContext.bind(this)),e.register("fdc3FindInstances",this.fdc3HandleFindInstances.bind(this)),e.register("fdc3GetAppMetadata",this.fdc3HandleGetAppMetadata.bind(this)),e.register("fdc3v2GetInfo",(async(e,t)=>this.fdc3HandleGetInfo.bind(this)(e,t))),e.register("createPrivateChannelProvider",(async e=>{const{channelId:t}=e,n=await this.fin.InterApplicationBus.Channel.create(t);p.PrivateChannelProvider.init(n,t)}))}isConnectionAuthorized(e,t){return this.wire.sendAction("interop-broker-is-connection-authorized").catch((e=>{})),Promise.resolve(!0)}isActionAuthorized(e,t,n){return this.wire.sendAction("interop-broker-is-action-authorized").catch((e=>{})),Promise.resolve(!0)}};return Gi.InteropBroker=f,e=new WeakMap,t=new WeakMap,n=new WeakMap,Gi}var zi,Ki={},qi={},Ji=s&&s.__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},Yi=s&&s.__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)};Object.defineProperty(qi,"__esModule",{value:!0});const Zi=d,Qi=Hi;class Xi extends Zi.Base{constructor(e,t,n){super(e),zi.set(this,void 0),this.id=n,Ji(this,zi,t,"f")}async setContext(e){this.wire.sendAction("interop-session-context-group-set-context").catch((e=>{}));return(await Yi(this,zi,"f")).dispatch(`sessionContextGroup:setContext-${this.id}`,{sessionContextGroupId:this.id,context:e})}async getCurrentContext(e){this.wire.sendAction("interop-session-context-group-get-context").catch((e=>{}));return(await Yi(this,zi,"f")).dispatch(`sessionContextGroup:getContext-${this.id}`,{sessionContextGroupId:this.id,type:e})}async addContextHandler(e,t){if(this.wire.sendAction("interop-session-context-group-add-handler").catch((e=>{})),"function"!=typeof e)throw new Error("Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");const n=await Yi(this,zi,"f");let i;return i=t?`sessionContextHandler:invoke-${this.id}-${t}-${(0,Qi.generateId)()}`:`sessionContextHandler:invoke-${this.id}`,n.register(i,(0,Qi.wrapContextHandler)(e,i)),await n.dispatch(`sessionContextGroup:handlerAdded-${this.id}`,{handlerId:i,contextType:t}),{unsubscribe:await this.createUnsubscribeCb(i)}}async createUnsubscribeCb(e){const t=await Yi(this,zi,"f");return async()=>{t.remove(e),await t.dispatch(`sessionContextGroup:handlerRemoved-${this.id}`,{handlerId:e})}}getUserInstance(){return{id:this.id,setContext:(0,Qi.wrapInTryCatch)(this.setContext.bind(this),"Failed to set context: "),getCurrentContext:(0,Qi.wrapInTryCatch)(this.getCurrentContext.bind(this),"Failed to get context: "),addContextHandler:(0,Qi.wrapInTryCatch)(this.addContextHandler.bind(this),"Failed to add context handler: ")}}}qi.default=Xi,zi=new WeakMap;var er={},tr={},nr={},ir={},rr=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),or=s&&s.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),sr=s&&s.__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)&&rr(t,e,n);return or(t,e),t};Object.defineProperty(ir,"__esModule",{value:!0}),ir.PrivateChannelClient=void 0;const ar=sr(Hi);var cr,dr;function hr(){if(cr)return tr;cr=1;var e,t=s&&s.__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)},n=s&&s.__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},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(tr,"__esModule",{value:!0}),tr.FDC3ModuleBase=void 0;const o=nr,a=Hi,c=wr(),d=r(i);return tr.FDC3ModuleBase=class{get client(){return t(this,e,"f").call(this)}get fin(){return this.wire.getFin()}constructor(t,i){this.wire=i,e.set(this,void 0),n(this,e,t,"f")}async broadcast(e){return this.wire.sendAction("fdc3-broadcast").catch((e=>{})),this.client.setContext(e)}async _open(e,t){this.wire.sendAction("fdc3-open").catch((e=>{}));try{return await c.InteropClient.ferryFdc3Call(this.client,"fdc3Open",{app:e,context:t})}catch(e){const t=e.message===a.BROKER_ERRORS.fdc3Open?"ResolverUnavailable":e.message;throw new Error(t)}}async _getChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:"system",...(0,o.getUnsupportedChannelApis)()})))}async getOrCreateChannel(e){this.wire.sendAction("fdc3-get-or-create-channel").catch((e=>{}));const t=(await this._getChannels()).find((t=>t.id===e));if(t)return{...t,type:"system",...(0,o.getUnsupportedChannelApis)()};try{const t=await this.client.joinSessionContextGroup(e);return(0,o.buildAppChannelObject)(t)}catch(e){throw console.error(e.message),new Error(o.ChannelError.CreationFailed)}}async getSystemChannels(){return this.wire.sendAction("fdc3-get-system-channels").catch((e=>{})),this._getChannels()}async joinChannel(e){this.wire.sendAction("fdc3-join-channel").catch((e=>{}));try{return await this.client.joinContextGroup(e)}catch(e){if(e.message===a.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup?console.error("The Channel you have tried to join is an App Channel. Custom Channels can only be defined by the Interop Broker through code or manifest configuration. Please use getOrCreateChannel."):console.error(e.message),e.message.startsWith("Attempting to join a context group that does not exist"))throw new Error(o.ChannelError.NoChannelFound);throw new Error(o.ChannelError.AccessDenied)}}async getCurrentChannel(){this.wire.sendAction("fdc3-get-current-channel").catch((e=>{}));const e=await this.getCurrentContextGroupInfo();return e?this.buildChannelObject(e):null}async leaveCurrentChannel(){return this.wire.sendAction("fdc3-leave-current-channel").catch((e=>{})),this.client.removeFromContextGroup()}async getCurrentContextGroupInfo(){const e=await this.client.getContextGroups(),t=e.map((async e=>this.client.getAllClientsInContextGroup(e.id))),n=(await Promise.all(t)).findIndex((e=>e.some((e=>{const{uuid:t,name:n}=e;return this.wire.me.uuid===t&&this.wire.me.name===n}))));return e[n]}async buildChannelObject(e){return{...e,type:"system",addContextListener:(...[e,t])=>{let n,i;"function"==typeof e?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),n=e):(n=t,"string"==typeof e&&(i=e));const r=(async()=>{let e=!0;const t=await this.client.getCurrentContext(i);return this.client.addContextHandler(((i,r)=>{if(!e||(e=!1,!(0,d.default)(t,i)))return n(i,r)}),i)})();return{...r,unsubscribe:()=>r.then((e=>e.unsubscribe()))}},broadcast:this.broadcast.bind(this),getCurrentContext:async e=>{const t=await this.client.getCurrentContext(e);return void 0===t?null:t}}}},e=new WeakMap,tr}ir.PrivateChannelClient=class{constructor(e,t){this.id=t,this.client=e,this.listeners=new Map}async broadcast(e){return this.client.dispatch("broadcast",{context:e})}async getCurrentContext(e){return this.client.dispatch("getCurrentContext",{contextType:e})}async addContextListener(e,t){if("function"!=typeof t)throw new Error("Non-function argument passed to the second parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");let n;n=e?`contextHandler:invoke-${this.id}-${e}-${ar.generateId()}`:`contextHandler:invoke-${this.id}-${ar.generateId()}`,this.client.register(n,ar.wrapContextHandler(t,n));const i={unsubscribe:await this.createContextUnsubscribeCb(n)};return this.listeners.set(n,i),await this.client.dispatch("contextHandlerAdded",{handlerId:n,contextType:e}),i}createNonStandardUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch("nonStandardHandlerRemoved",{handlerId:e})}}createContextUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch("contextHandlerRemoved",{handlerId:e})}}onAddContextListener(e){const t=`onContextHandlerAdded:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch("onAddContextHandlerAdded",{handlerId:t}),n}onDisconnect(e){const t=`onDisconnect:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch("onDisconnectHandlerAdded",{handlerId:t}),n}onUnsubscribe(e){const t=`onUnsubscribe:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch("onUnsubscribeHandlerAdded",{handlerId:t}),n}async cleanUpAllSubs(){Array.from(this.listeners.keys()).forEach((e=>{this.client.remove(e),this.listeners.delete(e)}))}async disconnect(){try{await this.client.dispatch("clientDisconnecting"),await this.cleanUpAllSubs(),await this.client.disconnect()}catch(e){throw new Error(e.message)}}},function(e){var t=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.getIntentResolution=e.isChannel=e.isContext=e.connectPrivateChannel=e.buildAppChannelObject=e.buildPrivateChannelObject=e.ChannelError=e.ResultError=e.UnsupportedChannelApiError=e.getUnsupportedChannelApis=void 0;const n=Hi,r=ir,o=t(i);e.getUnsupportedChannelApis=e=>({addContextListener:()=>{throw new a("Channel.addContextListener",e)},broadcast:()=>{throw new a("Channel.broadcast",e)},getCurrentContext:()=>{throw new a("Channel.getCurrentContext",e)}});class a extends Error{constructor(e,t="System"){super(e),this.message=`Calling ${e} on an instance of a ${t} Channel returned by fdc3.get${t}Channels is not supported. If you would like to use a ${t} Channel, please use fdc3.joinChannel, fdc3.addContextListener, and fdc3.broadcast instead.`}}var c,d;e.UnsupportedChannelApiError=a,function(e){e.NoResultReturned="NoResultReturned",e.IntentHandlerRejected="IntentHandlerRejected"}(c=e.ResultError||(e.ResultError={})),(d=e.ChannelError||(e.ChannelError={})).NoChannelFound="NoChannelFound",d.AccessDenied="AccessDenied",d.CreationFailed="CreationFailed";e.buildPrivateChannelObject=e=>{let t=!1;const n=()=>{if(t)throw new Error("Private Channel Client has been disconnected from the Private Channel")};return{id:e.id,type:"private",broadcast:async t=>(n(),e.broadcast(t)),getCurrentContext:async t=>(n(),e.getCurrentContext(t)),addContextListener:async(t,i)=>{n();let r=i,o=t;"function"==typeof t&&(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),r=t,o=null);return e.addContextListener(o,r)},onAddContextListener:t=>(n(),e.onAddContextListener(t)),disconnect:async()=>(n(),t=!0,e.disconnect()),onDisconnect:t=>(n(),e.onDisconnect(t)),onUnsubscribe:t=>(n(),e.onUnsubscribe(t))}};e.buildAppChannelObject=e=>({id:e.id,type:"app",broadcast:e.setContext,getCurrentContext:async t=>{const n=await e.getCurrentContext(t);return void 0===n?null:n},addContextListener:(t,n)=>{let i,r;"function"==typeof t?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),i=t):(i=n,"string"==typeof t&&(r=t));const s=(async()=>{let t=!0;const n=await e.getCurrentContext(r);return e.addContextHandler(((e,r)=>{if(!t||(t=!1,!(0,o.default)(n,e)))return i(e,r)}),r)})();return{...s,unsubscribe:()=>s.then((e=>e.unsubscribe()))}}});e.connectPrivateChannel=async t=>{try{const n=await fin.InterApplicationBus.Channel.connect(t),i=new r.PrivateChannelClient(n,t);return(0,e.buildPrivateChannelObject)(i)}catch(e){throw new Error(`Private Channel with id: ${t} doesn't exist`)}};e.isContext=e=>{if(e&&"object"==typeof e&&"type"in e){const{type:t}=e;return"string"==typeof t}return!1};e.isChannel=e=>{if(e&&"object"==typeof e&&"type"in e&&"id"in e){const{type:t,id:n}=e;return"string"==typeof t&&"string"==typeof n&&("app"===t||"private"===t)}return!1};e.getIntentResolution=async(t,i,r,o)=>{const s=(0,n.generateId)(),a=new Promise(((e,t)=>{fin.InterApplicationBus.subscribe({uuid:"*"},s,(t=>{e(t)})).catch((()=>t(new Error("getResult is not supported in this environment"))))})),d=r?{target:r,intentResolutionResultId:s}:{intentResolutionResultId:s},h=o?{name:o,context:i,metadata:d}:{...i,metadata:d},l=async()=>{let n=await a;if(!n||"object"!=typeof n)throw new Error(c.NoResultReturned);const{error:i}=n;if(i)throw new Error(c.IntentHandlerRejected);if((0,e.isChannel)(n)){const{id:i,type:r}=n;switch(r){case"private":n=await(0,e.connectPrivateChannel)(i);break;case"app":{const r=await t.joinSessionContextGroup(i);n=(0,e.buildAppChannelObject)(r);break}}}else if(!(0,e.isContext)(n))throw new Error(c.NoResultReturned);return n},u=o?await t.fireIntent(h):await t.fireIntentForContext(h);return"object"!=typeof u?{source:{appId:"",instanceId:""},intent:"",version:"2.0",getResult:l}:{...u,getResult:l}}}(nr);var lr,ur,pr={};function wr(){if(ur)return Ki;ur=1;var e,t,n=s&&s.__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},i=s&&s.__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)},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ki,"__esModule",{value:!0}),Ki.InteropClient=void 0;const o=d,a=r(qi),c=function(){if(dr)return er;dr=1,Object.defineProperty(er,"__esModule",{value:!0}),er.Fdc3Module=void 0;const e=Hi,t=hr();class n extends t.FDC3ModuleBase{async open(e,t){await super._open(e,t)}addContextListener(e,t){let n;return this.wire.sendAction("fdc3-add-context-listener").catch((e=>{})),"function"==typeof e?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),n=this.client.addContextHandler(e)):n=this.client.addContextHandler(t,null===e?void 0:e),{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}addIntentListener(e,t){this.wire.sendAction("fdc3-add-intent-listener").catch((e=>{}));const n=this.client.registerIntentHandler((e=>{const{context:n,metadata:i}=e,{metadata:r}=n,o=i?.intentResolutionResultId||r?.intentResolutionResultId;o&&this.fin.InterApplicationBus.publish(o,null).catch((()=>null)),t(e.context)}),e,{fdc3Version:"1.2"});return{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}async raiseIntent(t,n,i){this.wire.sendAction("fdc3-raise-intent").catch((e=>{}));const r=i?{name:t,context:n,metadata:{target:i}}:{name:t,context:n};try{return await this.client.fireIntent(r)}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntent?"ResolverUnavailable":t.message;throw new Error(n)}}async findIntent(t,n){this.wire.sendAction("fdc3-find-intent").catch((e=>{}));try{return await this.client.getInfoForIntent({name:t,context:n})}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntent?"ResolverUnavailable":t.message;throw new Error(n)}}async findIntentsByContext(t){this.wire.sendAction("fdc3-find-intents-by-context").catch((e=>{}));try{return await this.client.getInfoForIntentsByContext(t)}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntentsByContext?"ResolverUnavailable":t.message;throw new Error(n)}}async raiseIntentForContext(t,n){this.wire.sendAction("fdc3-raise-intent-for-context").catch((e=>{}));try{return await this.client.fireIntentForContext({...t,metadata:{target:n}})}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntentForContext?"ResolverUnavailable":t.message;throw new Error(n)}}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}getInfo(){return this.wire.sendAction("fdc3-get-info").catch((e=>{})),{providerVersion:this.wire.environment.getAdapterVersionSync(),provider:`openfin-${this.wire.me.uuid}`,fdc3Version:"1.2"}}}return er.Fdc3Module=n,er}(),h=function(){if(lr)return pr;lr=1,Object.defineProperty(pr,"__esModule",{value:!0}),pr.Fdc3Module2=void 0;const e=hr(),t=Hi,n=wr(),i=nr,r=ir;class o extends e.FDC3ModuleBase{async open(e,t){return"string"==typeof e&&console.warn("Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string })."),super._open(e,t)}async findInstances(e){this.wire.sendAction("fdc3-find-instances").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,"fdc3FindInstances",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3FindInstances?"ResolverUnavailable":e.message;throw new Error(n)}}async getAppMetadata(e){this.wire.sendAction("fdc3-get-app-metadata").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,"fdc3GetAppMetadata",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3GetAppMetadata?"ResolverUnavailable":e.message;throw new Error(n)}}async addContextListener(e,t){this.wire.sendAction("fdc3-add-context-listener").catch((e=>{}));const n=e=>t=>{const{contextMetadata:n,...i}=t,r=n?[{...i},n]:[t,null];e(...r)};let i=t,r=n(i);return"function"==typeof e?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),i=e,r=n(i),this.client.addContextHandler(r)):this.client.addContextHandler(r,null===e?void 0:e)}async findIntent(e,n,i){this.wire.sendAction("fdc3-find-intent").catch((e=>{}));try{return await this.client.getInfoForIntent({name:e,context:n,metadata:{resultType:i}})}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntent?"ResolverUnavailable":e.message;throw new Error(n)}}async findIntentsByContext(e,i){this.wire.sendAction("fdc3-find-intents-by-context").catch((e=>{}));const r=i?{context:e,metadata:{resultType:i}}:e;try{return await n.InteropClient.ferryFdc3Call(this.client,"fdc3v2FindIntentsByContext",r)}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntentsByContext?"ResolverUnavailable":e.message;throw new Error(n)}}async raiseIntent(e,n,r){this.wire.sendAction("fdc3-raise-intent").catch((e=>{}));try{return"string"==typeof r&&console.warn("Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string })."),(0,i.getIntentResolution)(this.client,n,r,e)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?"ResolverUnavailable":e.message;throw new Error(n)}}async raiseIntentForContext(e,n){this.wire.sendAction("fdc3-raise-intent-for-context").catch((e=>{}));try{return"string"==typeof n&&console.warn("Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string })."),(0,i.getIntentResolution)(this.client,e,n)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?"ResolverUnavailable":e.message;throw new Error(n)}}async addIntentListener(e,t){if(this.wire.sendAction("fdc3-add-intent-listener").catch((e=>{})),"string"!=typeof e)throw new Error("First argument must be an Intent name");return this.client.registerIntentHandler((async e=>{let n,i;const{context:r,metadata:o}=e,{contextMetadata:s,metadata:a,...c}=r,d=o?.intentResolutionResultId||a?.intentResolutionResultId;try{const e=a?{metadata:a,...c}:{...c};n=await t(e,s),i=n}catch(e){n=e,i={error:!0}}if(d&&this.fin.InterApplicationBus.publish(d,i).catch((()=>null)),n instanceof Error)throw new Error(n.message);return n}),e,{fdc3Version:"2.0"})}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}async createPrivateChannel(){const e=(0,t.generateId)();await n.InteropClient.ferryFdc3Call(this.client,"createPrivateChannelProvider",{channelId:e});const o=await this.fin.InterApplicationBus.Channel.connect(e),s=new r.PrivateChannelClient(o,e);return(0,i.buildPrivateChannelObject)(s)}async getUserChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:"user",...(0,i.getUnsupportedChannelApis)("User")})))}async getSystemChannels(){return console.warn("This API has been deprecated. Please use fdc3.getUserChannels instead."),super.getSystemChannels()}async joinUserChannel(e){return super.joinChannel(e)}async joinChannel(e){return console.warn("This API has been deprecated. Please use fdc3.joinUserChannel instead."),super.joinChannel(e)}async getCurrentChannel(){const e=await super.getCurrentChannel();return e?{...e,type:"user",broadcast:this.broadcast.bind(this)}:null}async getInfo(){return n.InteropClient.ferryFdc3Call(this.client,"fdc3v2GetInfo",{fdc3Version:"2.0"})}}return pr.Fdc3Module2=o,pr}(),l=Hi;let u=class extends o.Base{constructor(i,r){super(i),e.set(this,void 0),t.set(this,void 0),n(this,t,new Map,"f"),n(this,e,r,"f")}async setContext(t){this.wire.sendAction("interop-client-set-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("setContext",{context:t})}async addContextHandler(t,n){if(this.wire.sendAction("interop-client-add-context-handler").catch((e=>{})),"function"!=typeof t)throw new Error("Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");const r=await i(this,e,"f");let o;o=n?`invokeContextHandler-${n}-${(0,l.generateId)()}`:"invokeContextHandler";const s=(0,l.wrapContextHandler)(t,o);return r.register(o,s),await r.dispatch("contextHandlerRegistered",{handlerId:o,contextType:n}),{unsubscribe:async()=>{r.remove(o),await r.dispatch("removeContextHandler",{handlerId:o})}}}async getContextGroups(){this.wire.sendAction("interop-client-get-context-groups").catch((e=>{}));return(await i(this,e,"f")).dispatch("getContextGroups")}async joinContextGroup(t,n){this.wire.sendAction("interop-client-join-context-group").catch((e=>{}));const r=await i(this,e,"f");if(!t)throw new Error("No contextGroupId specified for joinContextGroup.");return r.dispatch("joinContextGroup",{contextGroupId:t,target:n})}async removeFromContextGroup(t){this.wire.sendAction("interop-client-remove-from-context-group").catch((e=>{}));return(await i(this,e,"f")).dispatch("removeFromContextGroup",{target:t})}async getAllClientsInContextGroup(t){this.wire.sendAction("interop-client-get-all-clients-in-context-group").catch((e=>{}));const n=await i(this,e,"f");if(!t)throw new Error("No contextGroupId specified for getAllClientsInContextGroup.");return n.dispatch("getAllClientsInContextGroup",{contextGroupId:t})}async getInfoForContextGroup(t){this.wire.sendAction("interop-client-get-info-for-context-group").catch((e=>{}));const n=await i(this,e,"f");if(!t)throw new Error("No contextGroupId specified for getInfoForContextGroup.");return n.dispatch("getInfoForContextGroup",{contextGroupId:t})}async fireIntent(t){this.wire.sendAction("interop-client-fire-intent").catch((e=>{}));return(await i(this,e,"f")).dispatch("fireIntent",t)}async registerIntentHandler(t,n,r){this.wire.sendAction("interop-client-register-intent-handler").catch((e=>{}));const o=await i(this,e,"f"),s=`intent-handler-${n}`,a=(0,l.wrapIntentHandler)(t,s);try{await o.register(s,a),await o.dispatch("intentHandlerRegistered",{handlerId:s,...r})}catch(e){throw new Error("Unable to register intent handler")}return{unsubscribe:async()=>{o.remove(s)}}}async getCurrentContext(t){this.wire.sendAction("interop-client-get-current-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("getCurrentContext",{contextType:t})}async getInfoForIntent(t){this.wire.sendAction("interop-client-get-info-for-intent").catch((e=>{}));return(await i(this,e,"f")).dispatch("getInfoForIntent",t)}async getInfoForIntentsByContext(t){this.wire.sendAction("interop-client-get-info-for-intents-by-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("getInfoForIntentsByContext",t)}async fireIntentForContext(t){this.wire.sendAction("interop-client-fire-intent-for-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("fireIntentForContext",t)}async joinSessionContextGroup(n){try{const r=i(this,t,"f").get(n);if(r)return r.getUserInstance();const o=await i(this,e,"f"),{hasConflict:s}=await o.dispatch("sessionContextGroup:createIfNeeded",{sessionContextGroupId:n});s&&console.warn(`A (non-session) context group with the name "${n}" already exists. If you are trying to join a Context Group, call joinContextGroup instead.`);const c=new a.default(this.wire,i(this,e,"f"),n);return i(this,t,"f").set(n,c),c.getUserInstance()}catch(e){throw console.error(`Error thrown trying to create Session Context Group with id "${n}": ${e}`),e}}async onDisconnection(t){this.wire.sendAction("interop-client-add-ondisconnection-listener").catch((e=>{}));return(await i(this,e,"f")).onDisconnection((e=>{const{uuid:n}=e;t({type:"interop-broker",topic:"disconnected",brokerName:n})}))}getFDC3Sync(e){switch(e){case"1.2":return new c.Fdc3Module((()=>this),this.wire);case"2.0":return new h.Fdc3Module2((()=>this),this.wire);default:throw new Error(`Invalid FDC3 version provided: ${e}. Must be '1.2' or '2.0'`)}}async getFDC3(e){return this.getFDC3Sync(e)}static async ferryFdc3Call(t,n,r){return(await i(t,e,"f")).dispatch(n,r||null)}};return Ki.InteropClient=u,e=new WeakMap,t=new WeakMap,Ki}var yr,fr,gr,mr={};function vr(){if(yr)return mr;yr=1,Object.defineProperty(mr,"__esModule",{value:!0}),mr.overrideCheck=mr.checkFDC32Overrides=mr.getDefaultViewFdc3VersionFromAppInfo=void 0;const e=Vi();function t(t){return["fdc3HandleFindInstances","handleInfoForIntent","handleInfoForIntentsByContext","fdc3HandleGetAppMetadata","fdc3HandleGetInfo","fdc3HandleOpen","handleFiredIntent","handleFiredIntentForContext"].filter((n=>t[n]===e.InteropBroker.prototype[n]))}return mr.getDefaultViewFdc3VersionFromAppInfo=function({manifest:e,initialOptions:t}){const n=e?.platform?.defaultViewOptions?.fdc3InteropApi??t.defaultViewOptions?.fdc3InteropApi;return["1.2","2.0"].includes(n??"")?n:void 0},mr.checkFDC32Overrides=t,mr.overrideCheck=function(e,n){if(n&&"2.0"===n){const n=t(e);n.length>0&&console.warn(`WARNING: FDC3 2.0 has been set as a default option for Views in this Platform, but the required InteropBroker APIs for FDC3 2.0 compliance have not all been overridden.\nThe following APIs need to be overridden:\n${n.join("\n")}`)}},mr}function Cr(){return gr||(gr=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),i=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),i(function(){if(fr)return Ti;fr=1;var e=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ti,"__esModule",{value:!0}),Ti.InteropModule=void 0;const t=e(n),i=$i,r=d,o=Vi(),a=wr(),c=vr(),h=Tn,l=e=>new e,u="You have attempted to use or modify InteropBroker parameters, which is not allowed. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.";class p extends r.Base{async init(e,n=l){this.wire.sendAction("interop-init").catch((()=>{}));const r=await this.wire.environment.getInteropInfo(this.wire.getFin()),s=(0,i.createUnusableObject)(u),a=(0,i.createWarningObject)(u,(0,t.default)(r)),d=async()=>{throw new Error(u)},p=o.InteropBroker.createClosedConstructor(this.wire,(()=>this.fin.InterApplicationBus.Channel.create(`interop-broker-${e}`)),r);let w;return w=Array.isArray(n)?new((0,h.overrideFromComposables)(...n)(p))(s,d,a):await n(p,s,d,a),(0,c.overrideCheck)(w,r.fdc3Version),w}connectSync(e,t){return this.wire.sendAction("interop-connect-sync").catch((()=>{})),new a.InteropClient(this.wire,this.wire.environment.whenReady().then((()=>this.fin.InterApplicationBus.Channel.connect(`interop-broker-${e}`,{payload:t}))))}}return Ti.InteropModule=p,Ti}(),e),i(wr(),e),i(Vi(),e)}(Li)),Li}var br={},Ir={},Er={},xr={};Object.defineProperty(xr,"__esModule",{value:!0}),xr.getSnapshotSourceChannelName=void 0;xr.getSnapshotSourceChannelName=e=>`snapshot-source-provider-${e.uuid}`;var Ar,Pr,Mr,_r,Or,Sr=s&&s.__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},Rr=s&&s.__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)};Object.defineProperty(Er,"__esModule",{value:!0}),Er.SnapshotSource=void 0;const Fr=d,jr=xr,kr=new Map;class Lr extends Fr.Base{constructor(e,t){super(e),Ar.set(this,void 0),Pr.set(this,(()=>(kr.has(this.identity.uuid)||kr.set(this.identity.uuid,{eventFired:null,clientPromise:null}),kr.get(this.identity.uuid)))),Mr.set(this,(()=>(Rr(this,Pr,"f").call(this).clientPromise||(Rr(this,Pr,"f").call(this).clientPromise=Rr(this,_r,"f").call(this)),Rr(this,Pr,"f").call(this).clientPromise))),_r.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);try{Rr(this,Pr,"f").call(this).eventFired||await Rr(this,Or,"f").call(this);const t=await this.fin.InterApplicationBus.Channel.connect(e,{wait:!1});return t.onDisconnection((()=>{Rr(this,Pr,"f").call(this).clientPromise=null,Rr(this,Pr,"f").call(this).eventFired=null})),t}catch(e){throw Rr(this,Pr,"f").call(this).clientPromise=null,new Error("The targeted SnapshotSource is not currently initialized. Await this object's ready() method.")}})),Or.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);let t,n;const i=new Promise(((e,i)=>{t=e,n=i}));Rr(this,Pr,"f").call(this).eventFired=i;const r=async i=>{try{i.channelName===e&&(t(),await this.fin.InterApplicationBus.Channel.removeListener("connected",r))}catch(e){n(e)}};await this.fin.InterApplicationBus.Channel.on("connected",r)})),Sr(this,Ar,t,"f")}get identity(){return Rr(this,Ar,"f")}async ready(){this.wire.sendAction("snapshot-source-ready").catch((e=>{}));try{await Rr(this,Mr,"f").call(this)}catch(e){await Rr(this,Pr,"f").call(this).eventFired}}async getSnapshot(){this.wire.sendAction("snapshot-source-get-snapshot").catch((e=>{}));const e=await Rr(this,Mr,"f").call(this),t=await e.dispatch("get-snapshot");return(await t).snapshot}async applySnapshot(e){this.wire.sendAction("snapshot-source-apply-snapshot").catch((e=>{}));return(await Rr(this,Mr,"f").call(this)).dispatch("apply-snapshot",{snapshot:e})}}Er.SnapshotSource=Lr,Ar=new WeakMap,Pr=new WeakMap,Mr=new WeakMap,_r=new WeakMap,Or=new WeakMap,Object.defineProperty(Ir,"__esModule",{value:!0}),Ir.SnapshotSourceModule=void 0;const Tr=d,$r=Er,Br=xr;class Gr extends Tr.Base{async init(e){if(this.wire.sendAction("snapshot-source-init").catch((e=>{})),"object"!=typeof e||"function"!=typeof e.getSnapshot||"function"!=typeof e.applySnapshot)throw new Error("you must pass in a valid SnapshotProvider");const t=await this.fin.InterApplicationBus.Channel.create((0,Br.getSnapshotSourceChannelName)(this.fin.me));t.register("get-snapshot",(async()=>({snapshot:await e.getSnapshot()}))),t.register("apply-snapshot",(({snapshot:t})=>e.applySnapshot(t)))}wrapSync(e){return this.wire.sendAction("snapshot-source-wrap-sync").catch((e=>{})),new $r.SnapshotSource(this.wire,e)}async wrap(e){return this.wire.sendAction("snapshot-source-wrap").catch((e=>{})),this.wrapSync(e)}}Ir.SnapshotSourceModule=Gr,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Ir,e),n(Er,e)}(br),Object.defineProperty(a,"__esModule",{value:!0});var Wr=a.Fin=void 0;const Hr=t,Nr=c,Dr=ie(),Ur=Z(),Vr=de,zr=en,Kr=rn,qr=un,Jr=bn,Yr=J(),Zr=An,Qr=ki,Xr=Cr(),eo=br;class to extends Hr.EventEmitter{constructor(e){super(),this.wire=e,this.System=new Nr.System(e),this.Window=new Dr._WindowModule(e),this.Application=new Ur.ApplicationModule(e),this.InterApplicationBus=new Vr.InterApplicationBus(e),this.Clipboard=new zr.Clipboard(e),this.ExternalApplication=new Kr.ExternalApplicationModule(e),this.Frame=new qr._FrameModule(e),this.GlobalHotkey=new Jr.GlobalHotkey(e),this.Platform=new Zr.PlatformModule(e,this.InterApplicationBus.Channel),this.View=new Yr.ViewModule(e),this.Interop=new Xr.InteropModule(e),this.SnapshotSource=new eo.SnapshotSourceModule(e),e.registerFin(this),this.me=(0,Qr.getMe)(e),e.on("disconnected",(()=>{this.emit("disconnected")}))}}Wr=a.Fin=to;var no={},io={};function ro(e){return"string"==typeof e.manifestUrl}function oo(e){return ao(e)&&"string"==typeof e.address}function so(e){return oo(e)&&"string"==typeof e.token}function ao(e){return"string"==typeof e.uuid}function co(e){return e.runtime&&"string"==typeof e.runtime.version}function ho(e){return ao(e)&&co(e)}Object.defineProperty(io,"__esModule",{value:!0}),io.isInternalConnectConfig=io.isPortDiscoveryConfig=io.isNewConnectConfig=io.isConfigWithReceiver=io.isRemoteConfig=io.isExistingConnectConfig=io.isExternalConfig=void 0,io.isExternalConfig=ro,io.isExistingConnectConfig=oo,io.isRemoteConfig=so,io.isConfigWithReceiver=function(e){return"object"==typeof e.receiver&&so({...e,address:""})},io.isNewConnectConfig=ho,io.isPortDiscoveryConfig=function(e){return ro(e)&&co(e)||ho(e)},io.isInternalConnectConfig=function(e){return oo(e)||ho(e)};var lo={},uo={};Object.defineProperty(uo,"__esModule",{value:!0}),uo.EmitterMap=void 0;const po=t;function wo(e){return Buffer.from(e).toString("base64")}uo.EmitterMap=class{constructor(){this.storage=new Map}hashKeys(e){return e.map(wo).join("/")}getOrCreate(e){const t=this.hashKeys(e);return this.storage.has(t)||this.storage.set(t,new po.EventEmitter),this.storage.get(t)}has(e){return this.storage.has(this.hashKeys(e))}delete(e){const t=this.hashKeys(e);return this.storage.delete(t)}},Object.defineProperty(lo,"__esModule",{value:!0});const yo=uo;class fo extends yo.EmitterMap{constructor(){super(...arguments),this.dispatchEvent=e=>{if(function(e){return"process-desktop-event"===e.action}(e)){const{payload:t}=e,n=function(e){const{topic:t}=e;if("frame"===t||"window"===t||"view"===t){const{uuid:n,name:i}=e;return[t,n,i]}if("application"===t){const{uuid:n}=e;return[t,n]}return[t]}(t);if(this.has(n))return this.getOrCreate(n).emit(t.type,t),!0}return!1}}}lo.default=fo;var go,mo,vo=s&&s.__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},Co=s&&s.__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)},bo=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(no,"__esModule",{value:!0});var Io=no.Transport=void 0;const Eo=t,xo=io,Ao=g,Po=bo(lo),Mo=ki,_o=ke;class Oo extends Eo.EventEmitter{constructor(e,t,n){super(),this.wireListeners=new Map,this.topicRefMap=new Map,this.eventAggregator=new Po.default,this.messageHandlers=[this.eventAggregator.dispatchEvent],go.set(this,void 0),mo.set(this,void 0),this.connectSync=()=>{Co(this,go,"f").connectSync()},this.getPort=()=>Co(this,go,"f").getPort(),vo(this,go,new e(this.onmessage.bind(this)),"f"),this.environment=t,this.sendRaw=Co(this,go,"f").send.bind(Co(this,go,"f")),this.registerMessageHandler(this.handleMessage.bind(this)),Co(this,go,"f").on("disconnected",(()=>{for(const[,{handleNack:e}]of this.wireListeners)e({reason:"Remote connection has closed"});this.wireListeners.clear(),this.emit("disconnected")}));const{uuid:i,name:r}=n,o=this.environment.getCurrentEntityType();this.me=(0,Mo.getBaseMe)(o,i,r)}getFin(){if(!Co(this,mo,"f"))throw new Error("No Fin object registered for this transport");return Co(this,mo,"f")}registerFin(e){if(Co(this,mo,"f"))throw new Error("Fin object has already been registered for this transport");vo(this,mo,e,"f")}shutdown(){return Co(this,go,"f").shutdown()}async connect(e){if((0,xo.isConfigWithReceiver)(e))return await Co(this,go,"f").connect(e.receiver),this.authorize(e);if((0,xo.isRemoteConfig)(e))return this.connectRemote(e);if((0,xo.isExistingConnectConfig)(e))return this.connectByPort(e);if((0,xo.isNewConnectConfig)(e)){const t=await this.environment.retrievePort(e);return this.connectByPort({...e,address:`ws://localhost:${t}`})}}async connectRemote(e){return await Co(this,go,"f").connect(new(this.environment.getWsConstructor())(e.address)),this.authorize(e)}async connectByPort(e){const{address:t,uuid:n}=e,i={...e,type:"file-token"},r=Co(this,go,"f");await r.connect(new(this.environment.getWsConstructor())(e.address));const o=await this.sendAction("request-external-authorization",{uuid:n,type:"file-token"},!0);if("external-authorization-response"!==o.action)throw new Ao.UnexpectedActionError(o.action);return await this.environment.writeToken(o.payload.file,o.payload.token),this.authorize(i)}async authorize(e){const t=await this.sendAction("request-authorization",e,!0);if("authorization-response"!==t.action)throw new Ao.UnexpectedActionError(t.action);if(!0!==t.payload.success)throw new Ao.RuntimeError(t.payload)}sendAction(e,t={},n=!1){let i=()=>{};const r=Ao.RuntimeError.getCallSite(1),o=this.environment.getNextMessageId(),s=new Promise(((s,a)=>{i=a;const c={action:e,payload:t,messageId:o},d=Co(this,go,"f");return this.addWireListener(o,s,(e=>this.nackHandler(e,a,r)),n),d.send(c).catch(a)}));return Object.assign(s,{cancel:i,messageId:o})}nackHandler(e,t,n){t("string"==typeof e?e:new Ao.RuntimeError(e,n))}ferryAction(e){return new Promise(((t,n)=>{const i=this.environment.getNextMessageId();e.messageId=i;const r=e=>{t(e.payload)};return Co(this,go,"f").send(e).then((()=>this.addWireListener(i,r,(e=>this.nackHandler(e,n)),!1))).catch(n)}))}registerMessageHandler(e){this.messageHandlers.push(e)}addWireListener(e,t,n,i){i?this.uncorrelatedListener=t:this.wireListeners.has(e)?n({reason:"Duplicate handler id",error:(0,_o.errorToPOJO)(new Ao.DuplicateCorrelationError(String(e)))}):this.wireListeners.set(e,{resolve:t,handleNack:n})}onmessage(e){for(const t of this.messageHandlers)t.call(null,e)}handleMessage(e){const t=e.correlationId||NaN;if("correlationId"in e){if(!this.wireListeners.has(t))return!1;{const{resolve:n,handleNack:i}=this.wireListeners.get(t);"ack"!==e.action?i({reason:"Did not receive ack action",error:(0,_o.errorToPOJO)(new Ao.NoAckError(e.action))}):"payload"in e?e.payload.success?n.call(null,e):i(e.payload):"string"==typeof e.reason?i(e):(console.warn("Received invalid response from core",e),i({reason:"invalid response shape"})),this.wireListeners.delete(t)}}else this.uncorrelatedListener&&this.uncorrelatedListener.call(null,e),this.uncorrelatedListener=()=>{};return!0}}Io=no.Transport=Oo,go=new WeakMap,mo=new WeakMap;const So=(...e)=>({log:(...t)=>console.debug(`[${(new Date).toISOString()}]`,...(e=>e.map((e=>`[${e}]`)))(e),...t),getLogger:(...t)=>So(...e,...t)}),Ro=So("@openfin/core-web/client");function Fo(e,t){if(!function(e){return"string"==typeof e}(e))throw new Error(`Property ${t} has invalid type. Expected string, got ${typeof e}.`)}const jo="web-broker-ports-ready",ko=Ro.getLogger("get-web-interop-ports");function Lo(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)}function To(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}"function"==typeof SuppressedError&&SuppressedError;const $o=e=>{var n,i,r;return r=class extends t.EventEmitter{constructor(t){super(),n.set(this,void 0),i.set(this,!1),this.connectSync=()=>{Lo(this,i,"f")||(e.addEventListener("message",(e=>{e.data?.topic?.startsWith("wire-message")&&e.data.message&&Lo(this,n,"f").call(this,{...JSON.parse(e.data.message),ports:e.ports})})),e.start())},this.connect=async()=>{this.connectSync()},this.send=t=>(e.postMessage({topic:"wire-message",message:JSON.stringify(t)}),Promise.resolve()),this.shutdown=async()=>{e.close()},To(this,n,t,"f")}getPort(){return e}},n=new WeakMap,i=new WeakMap,r};var Bo={},Go={};Object.defineProperty(Go,"__esModule",{value:!0}),Go.BaseEnvironment=void 0;const Wo=vr();Go.BaseEnvironment=class{async getViewWindowIdentity(e,t){const{identity:n}=await e.View.wrapSync(t).getCurrentWindow();return n}async getInteropInfo(e){const t=await e.Application.getCurrentSync().getInfo().catch((()=>null)),n=t?.initialOptions?.interopBrokerConfiguration??{};return{fdc3Version:t?(0,Wo.getDefaultViewFdc3VersionFromAppInfo)(t):void 0,...n,fdc3Info:{providerVersion:await e.System.getVersion(),provider:"OpenFin"}}}},Object.defineProperty(Bo,"__esModule",{value:!0});var Ho=Bo.BrowserEnvironment=void 0;const No=Go;class Do extends No.BaseEnvironment{constructor(){super(...arguments),this.type="other",this.getRandomId=()=>{const e=new Uint32Array(1);return window.crypto.getRandomValues(e)[0].toString(32)}}getAdapterVersionSync(){return""}observeBounds(e,t){throw new Error("Method not implemented.")}layoutAllowedInContext(e){return!1}initLayoutManager(e,t,n){throw new Error("Method not implemented.")}applyLayoutSnapshot(e,t,n){throw new Error("Method not implemented.")}createLayout(e,t){throw new Error("Method not implemented.")}destroyLayout(e,t){throw new Error("Method not implemented.")}resolveLayout(e,t){throw new Error("Method not implemented.")}initPlatform(...e){throw new Error("Method not implemented.")}writeToken(e,t){return Promise.resolve("")}retrievePort(e){throw new Error("Method not implemented.")}getNextMessageId(){return this.getRandomId()}createChildContent(e){throw new Error("Method not implemented.")}getWebWindow(e){throw new Error("Method not implemented.")}getCurrentEntityIdentity(){throw new Error("Method not implemented.")}getCurrentEntityType(){return"external connection"}raiseEvent(e,t){throw new Error("Method not implemented.")}getUrl(){return location.href}getDefaultChannelOptions(){return{create:{},connect:{}}}getRtcPeer(){return new RTCPeerConnection}getWsConstructor(){return WebSocket}whenReady(){return Promise.resolve()}}Ho=Bo.BrowserEnvironment=Do;const Uo=e=>"platform"in e&&void 0!==e.platform;var Vo,zo;class Ko extends Ho{constructor(e){super(),this.connectConfig=e,Vo.set(this,void 0),zo.set(this,new W((async()=>Promise.resolve().then((function(){return __webpack_require__(/*! ./main-b14f67c9.js */ "../../node_modules/@openfin/core-web/out/main-b14f67c9.js")}))))),Uo(e)&&this.validatePlatformOptions(e)}getAdapterVersionSync(){return"0.39.21"}validatePlatformOptions({platform:e}){if(!("layoutSnapshot"in e))throw new Error("Platform options are missing layoutSnapshot. Please provide a layoutSnapshot in the platform options.");if("windows"in e||"windows"in e.layoutSnapshot)throw new Error("It appears you tried to call connect() with a snapshot object from an OpenFin desktop environment. Note that connect() expects to be called with a platform property with this structure: { platform: { layoutSnapshot } }. To get a layoutSnapshot of the expected structure, use fin.Platform.Layout.getCurrentLayoutManagerSync().getLayoutSnapshot() in v34+ in your desktop environment.");const{layouts:t}=e.layoutSnapshot;Object.entries(t).map((([e,t])=>{if("object"!=typeof t||null===t)throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must be an object.`);if(!("content"in t))throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must contain a 'content' property.`)}))}async getInteropInfo(e){return{...{contextGroups:void 0,logging:{beforeAction:{enabled:!1},afterAction:{enabled:!1}}},fdc3Version:void 0,fdc3Info:{providerVersion:"0.39.21",provider:"OpenFin Web"}}}layoutAllowedInContext(e){return!0}async initLayoutManager(e,t,n){if(Lo(this,Vo,"f"))throw new Error("Layout already initialized.");if(!Uo(this.connectConfig))throw new Error("Platform options are missing from connection config.");const{WebLayoutEntryPoint:i}=await Lo(this,zo,"f").getValue();return To(this,Vo,new i(this.connectConfig),"f"),await Lo(this,Vo,"f").initLayoutManager(e,t,n)}async applyLayoutSnapshot(e,t,n){Lo(this,Vo,"f")?.applyLayoutSnapshot(e,t,n)}async createLayout(e,t){return Lo(this,Vo,"f")?.createLayout(e,t)}async destroyLayout(e,t){return Lo(this,Vo,"f")?.destroyLayout(e,t)}async getViewWindowIdentity(e,t){return Promise.resolve({uuid:t.uuid,name:t.uuid})}}Vo=new WeakMap,zo=new WeakMap;const qo=()=>{const e=((e,t)=>{const n=new RegExp(`^${t}<(?.*)>$`).exec(e)?.groups?.meta;if(n)try{return JSON.parse(atob(n))}catch(e){throw new Error(`Failed to decode JSON from ${n}.`)}})(window.name,"of-frame");if(e)try{const{name:t,uuid:n,brokerUrl:i,providerId:r,contextGroup:o}=e;return Fo(i,"brokerUrl"),Fo(n,"uuid"),Fo(t,"name"),{identity:{name:t,uuid:n},brokerUrl:i,interopConfig:{providerId:r,currentContextGroup:o}}}catch(e){throw new Error(`Unexpected error occurred when inferring platform information: ${e.stack}`)}},Jo=()=>{const e=r.v4();return{uuid:e,name:e}},Yo=async e=>{if("enabled"===e.connectionInheritance){const t=await(async e=>{const t=qo();if(t){const{validateOptions:n=(()=>!0)}=e,{identity:i,...r}=t;if(!await n(r))throw new Error("Parent options were rejected by validateOptions.");return t}})(e);if(t)return t}if(!e.options){const t="enabled"===e.connectionInheritance?"Broker URL was not specified nor provided by a platform container.":"Connection inheritance is disabled but no options were provided.";throw new Error(t)}return{...e.options,identity:Jo()}};exports.__classPrivateFieldGet=Lo,exports.__classPrivateFieldSet=To,exports.apiExposer=Gn,exports.commonjsGlobal=s,exports.connect=async t=>{try{Ro.log("Establishing connection",t);const{brokerUrl:n,identity:i,timeout:r,interopConfig:s}=await Yo(t),{workerPort:a,iframeBrokerPort:c}=await(async(e,t,n)=>{const{origin:i}=new URL(e),r=document.createElement("IFRAME");let s;r.style.display="none";try{return await new Promise(((a,c)=>{const d=e=>{if(e.source===r.contentWindow&&e.data?.topic===`ack-${jo}`){if(e.origin!==i)c(new Error(`Broker redirected to unexpected origin ${e.origin}, expected ${i}.`));else if(e.data.success){const[t,n]=e.ports;a({iframeBrokerPort:t,workerPort:n})}else c(new m(e.data));window.removeEventListener("message",d),clearTimeout(s)}};window.addEventListener("message",d),ko.log(`Connecting to broker ${e}`),r.setAttribute("src",e),r.setAttribute("name",o(t,"of-broker")),document.body.appendChild(r),ko.log("Iframe loaded, awaiting init message from iframe"),n&&(s=setTimeout((()=>{window.removeEventListener("message",d),document.body.removeChild(r),c(new Error("Worker did not initialize in time"))}),n))}))}catch(e){throw new Error(`Failed to initialise Fin Web Client. ${e.message}`,{cause:e})}})(n,i,r);Ro.log("Successfully established connection to shared worker");const d={entityType:"external connection",...i};a.start(),c.start();const h=((t,n,i)=>{const r=$o(n),o=new Ko(t),s=new Io(r,o,i);return s.connectSync(),window.Buffer=e.Buffer,new Wr(s)})(t,a,d);return s?.providerId&&(h.me.interop=h.Interop.connectSync(s.providerId),s?.currentContextGroup&&h.me.interop.joinContextGroup(s.currentContextGroup).catch((e=>{console.warn(`Error joining specified context group: ${s?.currentContextGroup}, continuing`,e)}))),{...h,me:{...h.me,identity:{uuid:h.me.uuid,name:h.me.name}}}}catch(e){throw new Error(`An error occured during web-interop connection: ${e.message}`)}},exports.decorators=Nn,exports.encodeOptions=o,exports.layout_constants=ai,exports.lazy=G; /***/ }), -/***/ "./node_modules/@openfin/core-web/out/main-b14f67c9.js": -/*!*************************************************************!*\ - !*** ./node_modules/@openfin/core-web/out/main-b14f67c9.js ***! - \*************************************************************/ +/***/ "../../node_modules/@openfin/core-web/out/main-b14f67c9.js": +/*!*****************************************************************!*\ + !*** ../../node_modules/@openfin/core-web/out/main-b14f67c9.js ***! + \*****************************************************************/ /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; -var t=__webpack_require__(/*! ./main-8cad4070.js */ "./node_modules/@openfin/core-web/out/main-8cad4070.js"),e=__webpack_require__(/*! uuid */ "../../node_modules/uuid/dist/esm-browser/index.js");__webpack_require__(/*! buffer/ */ "../../node_modules/buffer/index.js"),__webpack_require__(/*! events */ "../../node_modules/events/events.js"),__webpack_require__(/*! lodash/cloneDeep */ "../../node_modules/lodash/cloneDeep.js"),__webpack_require__(/*! lodash/isEqual */ "../../node_modules/lodash/isEqual.js");var i={},n={};Object.defineProperty(n,"__esModule",{value:!0}),n.mapValuesAsync=n.mapEntriesAsync=void 0;const o=(t,[e,i])=>({...t,[e]:i});async function s(t,e){return(await Promise.all(e.map((async([e,i])=>[e,await t(i,e)])))).reduce(o,{})}n.mapEntriesAsync=s,n.mapValuesAsync=async function(t,e){let i;return i=e instanceof Map?[...e.entries()]:Object.entries(e),s(t,i)};var r,a,l,h,d=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldSet||function(t,e,i,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(t,i):o?o.value=i:e.set(t,i),i},c=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldGet||function(t,e,i,n){if("a"===i&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?n:"a"===i?n.call(t):n?n.value:e.get(t)};Object.defineProperty(i,"__esModule",{value:!0});var m=i.DefaultLayoutManager=void 0;const u=n;class p{constructor(t){a.set(this,void 0),l.set(this,new Map),d(this,a,t,"f")}size(){return c(this,l,"f").size}async applyLayoutSnapshot({layouts:t}){if(Object.keys(t).length>1)throw new Error("[LayoutManager] Tried to call applyLayoutSnapshot with more than 1 layout. When implementing multiple layouts via overridden LayoutManager class, you must override and fully implement the applyLayoutSnapshot method without calling super.applyLayoutSnapshot().");const[[e,i]]=Object.entries(t);await p.createLayout(this,{layoutName:e,layout:i})}async showLayout({layoutName:t}){}async getLayoutSnapshot(){return{layouts:await(0,u.mapValuesAsync)((t=>t.getFrameSnapshot()),c(this,l,"f"))}}async removeLayout({layoutName:t}){}getLayoutIdentityForView(t){const e=[...c(this,l,"f").values()].find((e=>e.getCurrentViews().some((e=>e.name===t.name&&e.uuid===t.uuid))));return e?.identity??void 0}isLayoutVisible({layoutName:t}){return c(p,r,"m",h).call(p,this,t).isVisible()}resolveLayoutIdentity(t){if(t&&"layoutName"in t)return t;const e=[...c(this,l,"f").values()];if(1===e.length)return e[0].identity;const i=e.find((t=>t.isVisible()));return i?.identity??void 0}static async resolveLayout(t,e){const i=t.resolveLayoutIdentity(e);if(void 0===i||!("layoutName"in i))throw new Error("[layout-manager] resolveLayout: Could not resolve the layout identity. Make sure you include 'layoutName' in the identity object.");return c(p,r,"m",h).call(p,t,i.layoutName)}static async handleSharedView(t,e,i){await(0,u.mapValuesAsync)((async t=>{if(t.identity.layoutName!==e.layoutName){const e=t.getCurrentViews().find((t=>t.name===i.name));e&&await t.onViewDetached({viewIdentity:e,target:null}).catch(console.error)}}),c(t,l,"f"))}static async handleLastViewRemoved(t,e){await t.removeLayout(e),await c(t,a,"f").handleLastViewRemoved(t)}static async destroyLayout(t,{layoutName:e}){await c(p,r,"m",h).call(p,t,e).destroy(),c(t,l,"f").delete(e)}static async createLayout(t,e){const{layoutName:i}=e;if(c(t,l,"f").has(i))throw new Error(`Layout name ${i} already exists`);await c(t,a,"f").createLayout(e,t)}static registerLayout(t,e,i){c(t,l,"f").set(e,i)}static getAllLayouts(t){return[...c(t,l,"f").values()]}static setInitialSnapshot(t,e){c(t,a,"f").setInitialSnapshot(e)}static createClosedConstructor(...t){return class extends p{constructor(){super(...t)}}}}m=i.DefaultLayoutManager=p,r=p,a=new WeakMap,l=new WeakMap,h=function(t,e){const i=c(t,l,"f").get(e);if(!i)throw new Error(`[layout-manager] getLayoutByName: Could not locate layout with name '${e}'`);return i};var g={},f={},v={};Object.defineProperty(v,"__esModule",{value:!0}),v.ReversibleMap=void 0;v.ReversibleMap=class{constructor(){this.valueToKey=new Map,this.keyToValue=new Map,this.setUnique=(t,e)=>{if(this.hasKey(t)||this.hasValue(e))throw new Error("Key or value already in the map.");this.keyToValue.set(t,e),this.valueToKey.set(e,t)},this.getKey=t=>{const e=this.valueToKey.get(t);if(!e)throw new Error("Value not found in the map.");return e},this.deleteKey=t=>{const e=this.getValue(t);return this.keyToValue.delete(t),this.valueToKey.delete(e),e},this.deleteValue=t=>{const e=this.getKey(t);return this.keyToValue.delete(e),this.valueToKey.delete(t),e},this.hasKey=t=>this.keyToValue.has(t),this.hasValue=t=>this.valueToKey.has(t)}getValue(t){const e=this.keyToValue.get(t);if(!e)throw new Error("Key not found in the map.");return e}},Object.defineProperty(f,"__esModule",{value:!0});var _=f.LayoutContentCache=void 0;const y=t.lazy,C=v;class w{constructor(){this.contentItemCache=new C.ReversibleMap,this.contentItemCacheId=0,this.createCacheKey=()=>{const t=`entity-${this.contentItemCacheId.toString()}`;return this.contentItemCacheId+=1,t},this.hasKey=t=>this.contentItemCache.hasKey(t),this.getItemOrUndefined=t=>{try{return this.getContentItemOrThrow(t)}catch(t){return}},this.getContentItemOrThrow=(t,e)=>{if(!this.contentItemCache.hasKey(t))throw new Error("Layout component has been destroyed or detached from the current layout.");const i=this.contentItemCache.getValue(t);if(e&&!e.includes(i.type))throw new Error(`Layout item is not the expected type. Expected ${e.join(", ")}, got ${i.type}.`);return i},this.getOrCreateEntityId=t=>{if(this.contentItemCache.hasValue(t))return this.contentItemCache.getKey(t);t.onDestroyed((()=>{this.contentItemCache.deleteValue(t)}));const e=this.createCacheKey();return this.contentItemCache.setUnique(e,t),e}}static getSingleInstance(){return w.singleton.getValue()}}_=f.LayoutContentCache=w,w.singleton=new y.Lazy((()=>new w));var I={},b={};!function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.getAdjacentStacks=t.doShareEdge=t.getAdjacentItem=void 0;t.getAdjacentItem=(e,i)=>{const{parent:n}=e;if(e.isRoot()||!n)return;const o=["top","bottom"].includes(i)?"column":"row",s=["top","left"].includes(i)?-1:1;if(n.type===o){const t=n.contentItems.indexOf(e)+s;if(t>=0&&t{const n=t.getBounds(),o=e.getBounds();if(!n||!o)return!1;if(["top","bottom"].includes(i)){return!(n.righto.right)}return!(n.bottomo.bottom)};t.getAdjacentStacks=(e,i)=>{const n=["top","bottom"].includes(i)?"row":"column",o=s=>"stack"===s.type?(0,t.doShareEdge)(e,s,i)?[s]:[]:"root"===s.type||"ground"===s.type?[]:s.type===n?s.contentItems.map((t=>o(t))).flat():s.type!==n?["top","right"].includes(i)?o(s.contentItems[s.contentItems.length-1]):o(s.contentItems[0]):[],s=(0,t.getAdjacentItem)(e,i);return s?o(s):[]}}(b);var S=t.commonjsGlobal&&t.commonjsGlobal.__decorate||function(t,e,i,n){var o,s=arguments.length,r=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(s<3?o(r):s>3?o(e,i,r):o(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};Object.defineProperty(I,"__esModule",{value:!0}),I.LayoutEntitiesController=void 0;const E=t.decorators,x=b,L=i;class z{constructor(t,e,i){this.wire=t,this.layoutManager=e,this.layoutContentCache=i,this.analytics=t=>{this.wire.sendAction(`layout-controller-${t}`).catch((()=>{}))},this.getLayoutIdentityForViewOrThrow=async t=>{const e=this.layoutManager.getLayoutIdentityForView(t);if(!e)throw new Error(`View identity ${t.name} is not attached to any layouts.`);return e},this.getRoot=async t=>{this.analytics("get-root");const e=(await this.getLayout(t)).getRoot();return{type:e.type,entityId:this.layoutContentCache.getOrCreateEntityId(e)}},this.getStackByView=async t=>{this.analytics("get-stack-by-view");const e=await this.getLayoutIdentityForViewOrThrow(t),i=(await this.getLayout(e)).getStackByView(t);if("stack"===i?.type)return{entityId:this.layoutContentCache.getOrCreateEntityId(i),type:"stack"}},this.getStackViews=t=>{this.analytics("get-stack-views");return this.layoutContentCache.getContentItemOrThrow(t,["stack"]).contentItems.map((t=>({name:t.viewName,uuid:this.wire.me.uuid})))},this.isRoot=t=>{this.analytics("is-root");return this.layoutContentCache.getContentItemOrThrow(t).isRoot()},this.exists=t=>(this.analytics("exists"),this.layoutContentCache.hasKey(t)),this.addViewToStack=async(t,e,{index:i}={index:0})=>{this.analytics("add-view-to-stack");const n=this.layoutContentCache.getContentItemOrThrow(t);if(i&&i>n.contentItems.length+1)throw new Error(`Index '${i}' out of range, please exclude the index or specify a number between 0 and ${n.contentItems.length}`);const o={id:t,index:i},{identity:s}=await n.layout.platformCreateView(e,{location:o});return s},this.findViewInStack=(t,e)=>t.contentItems.find((t=>t.viewName===e.name)),this.removeViewFromStack=async(t,e)=>{this.analytics("remove-view-from-stack");const i=this.layoutContentCache.getContentItemOrThrow(t,["stack"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to remove a view ('${e.name}') which does not belong to the stack.`);await n.layout.platformCloseView(e)},this.createAdjacentStack=async(t,e,{position:i="right"}={})=>{if(this.analytics("create-adjacent-stack"),!Array.isArray(e)||0===e.length)throw new Error('The parameter "views" must be an array with at least 1 element.');if(!["top","bottom","left","right"].includes(i))throw new Error(`Invalid position '${i}' specified.`);const n=this.layoutContentCache.getContentItemOrThrow(t).createAdjacentStack({position:i}),o=this.layoutContentCache.getOrCreateEntityId(n);return await Promise.all(e.reverse().map((t=>this.addViewToStack(o,t)))),o},this.getAdjacentStacks=async({targetId:t,edge:e})=>{this.analytics("get-adjacent-stacks");const i=this.layoutContentCache.getContentItemOrThrow(t);return(0,x.getAdjacentStacks)(i,e).map((t=>({entityId:this.layoutContentCache.getOrCreateEntityId(t)})))},this.setStackActiveView=async(t,e)=>{this.analytics("set-stack-active-view");const i=this.layoutContentCache.getContentItemOrThrow(t,["stack"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to set a view ('${e.name}') as active when it does not belong to the stack.`);i.setActiveContentItem(n,!0)}}async getLayout(t){const e=await L.DefaultLayoutManager.resolveLayout(this.layoutManager,t);if(!e)throw new Error(`Could not resolve target layout identity ${JSON.stringify(t)}`);return e}getContent(t){this.analytics("get-content");return this.layoutContentCache.getContentItemOrThrow(t,["column","row"]).contentItems.map((t=>({type:t.type,entityId:this.layoutContentCache.getOrCreateEntityId(t)})))}getParent(t){this.analytics("get-parent");const e=this.layoutContentCache.getContentItemOrThrow(t);if(!e.isRoot())return e.parent?.contentItems.includes(e)?{type:e.parent.type,entityId:this.layoutContentCache.getOrCreateEntityId(e.parent)}:void 0}}S([(0,E.expose)()],z.prototype,"getLayoutIdentityForViewOrThrow",void 0),S([(0,E.expose)()],z.prototype,"getRoot",void 0),S([(0,E.expose)()],z.prototype,"getStackByView",void 0),S([(0,E.expose)()],z.prototype,"getStackViews",void 0),S([(0,E.expose)()],z.prototype,"getContent",null),S([(0,E.expose)()],z.prototype,"getParent",null),S([(0,E.expose)()],z.prototype,"isRoot",void 0),S([(0,E.expose)()],z.prototype,"exists",void 0),S([(0,E.expose)()],z.prototype,"addViewToStack",void 0),S([(0,E.expose)()],z.prototype,"removeViewFromStack",void 0),S([(0,E.expose)()],z.prototype,"createAdjacentStack",void 0),S([(0,E.expose)()],z.prototype,"getAdjacentStacks",void 0),S([(0,E.expose)()],z.prototype,"setStackActiveView",void 0),I.LayoutEntitiesController=z,Object.defineProperty(g,"__esModule",{value:!0});var M=g.initLayoutEndpoints=void 0;const P=t.apiExposer,T=t.layout_constants,A=f,k=I,D=i;M=g.initLayoutEndpoints=async function(t,e){const i=t.getFin(),n=await i.Platform.getCurrentSync().getClient(),o=new P.ChannelsExposer(n);await new P.ApiExposer(o).exposeInstance(new k.LayoutEntitiesController(t,e,A.LayoutContentCache.getSingleInstance()),{id:T.LAYOUT_CONTROLLER_ID}),await async function(t,e){const i=t=>async i=>{const n=await D.DefaultLayoutManager.resolveLayout(e,i.target);if(!n)throw new Error(`Could not resolve the layout target from payload ${JSON.stringify(i)}`);return t(n,i)},n=(e,n)=>{t.register(e,i(n))},o=(t,e)=>{n(t,e)};n("replace-view",((t,e)=>t.replaceView(e))),n("replace-layout",((t,{layout:e})=>t.replaceLayout(e))),n("add-view",((t,e)=>t.insertView(e))),o("layout-add-view",((t,{viewOptions:e,location:i,targetView:n})=>t.platformCreateView(e,{location:i,targetView:n}))),n("close-view",((t,e)=>t.cleanupView(e.viewIdentity))),o("layout-close-view",((t,e)=>t.platformCloseView(e.viewIdentity))),n("apply-preset-layout",((t,e)=>t.applyPreset(e))),n("get-layout-views",(t=>t.getCurrentViews())),n("get-frame-snapshot",(t=>t.getFrameSnapshot())),n("is-visible",(t=>t.isVisible())),n("destroy",(t=>t.destroy())),t.register("get-layout-snapshot",(()=>e.getLayoutSnapshot()))}(n,e)};var R={};Object.defineProperty(R,"__esModule",{value:!0});var U=R.BaseLayout=void 0;U=R.BaseLayout=class{};var O={};Object.defineProperty(O,"__esModule",{value:!0});var V=O.DOMEmitter=void 0;V=O.DOMEmitter=class{constructor(t){this.container=t}dispatchLocalEvent(t,e){const i={...e,type:t,tabSelector:`tab-${e.name}`,containerSelector:`container-${e.name}`,topic:"openfin-DOM-event"};this.container.dispatchEvent(new CustomEvent(t,{detail:i}))}};var B={};Object.defineProperty(B,"__esModule",{value:!0});var H=B.mapLayoutContentItemsImmutableSync=B.mapLayoutContentItemsImmutable=W=B.isVisible=void 0;var W=B.isVisible=t=>(0!==t.offsetWidth||0!==t.offsetHeight)&&"hidden"!==window.getComputedStyle(t).visibility&&t.offsetTop>=0&&t.offsetLeft>=0&&t.offsetTop<=window.innerHeight&&t.offsetLeft<=window.innerWidth;const F=t=>"type"in t&&"component"===t.type;B.mapLayoutContentItemsImmutable=async function t(e,i){return F(i)?e(i):{...i,content:await Promise.all(i.content?.map((i=>t(e,i))))}},H=B.mapLayoutContentItemsImmutableSync=function t(e,i){return F(i)?e(i):{...i,content:i.content?.map((i=>t(e,i)))}};class N extends Error{constructor(t,e){super(e),this.type=t}}class G extends N{constructor(t,e){super("Configuration",t),this.node=e}}class j extends N{constructor(t){super("PopoutBlocked",t)}}class $ extends N{constructor(t){super("API",t)}}class Z extends N{constructor(t){super("Bind",t)}}class q extends Error{constructor(t,e,i){super(`${t}: ${e}${void 0===i?"":": "+i}`)}}class X extends q{constructor(t,e){super("Assert",t,e)}}class Y extends q{constructor(t,e,i){super("UnreachableCase",t,`${e}${void 0===i?"":": "+i}`)}}class K extends q{constructor(t,e){super("UnexpectedNull",t,e)}}class J extends q{constructor(t,e){super("UnexpectedUndefined",t,e)}}var Q;!function(t){let e=!1;const i={PopoutCannotBeCreatedWithGroundItemConfig:{id:0,default:"Popout cannot be created with ground ItemConfig"},PleaseRegisterAConstructorFunction:{id:1,default:"Please register a constructor function"},ComponentTypeNotRegisteredAndBindComponentEventHandlerNotAssigned:{id:2,default:"Component type not registered and BindComponentEvent handler not assigned"},ComponentIsAlreadyRegistered:{id:3,default:"Component is already registered"},ComponentIsNotVirtuable:{id:4,default:"Component is not virtuable. Requires rootHtmlElement field/getter"},VirtualComponentDoesNotHaveRootHtmlElement:{id:5,default:'Virtual component does not have getter "rootHtmlElement"'},ItemConfigIsNotTypeComponent:{id:6,default:"ItemConfig is not of type component"},InvalidNumberPartInSizeString:{id:7,default:"Invalid number part in size string"},UnknownUnitInSizeString:{id:8,default:"Unknown unit in size string"},UnsupportedUnitInSizeString:{id:9,default:"Unsupported unit in size string"}};t.idCount=Object.keys(i).length;const n=Object.values(i);t.checkInitialise=function(){if(!e)for(let e=0;e="0"&&t<="9"}function Tt(t,e){const i=zt(e);t.style.width=i}function At(t,e){const i=zt(e);t.style.height=i}function kt(t){return{width:t.offsetWidth,height:t.offsetHeight}}function Dt(t,e){t.style.display=e?"":"none"}function Rt(t,e){if(void 0!==e)for(const i in e)if(e.hasOwnProperty(i)){const n=e[i],o=t[i];t[i]=Ut(o,n)}return t}function Ut(t,e){if("object"!=typeof e)return e;if(Array.isArray(e)){const t=e.length,i=new Array(t);for(let n=0;n36)throw new Error("Too many keys in config minifier map")},t.translateObject=n}(dt||(dt={})),function(t){t.defaults={type:at.ground,content:[],size:1,sizeUnit:ht.Fractional,minSize:void 0,minSizeUnit:ht.Pixel,id:"",isClosable:!0},t.createCopy=function(t,e){switch(t.type){case at.ground:case at.row:case at.column:return gt.createCopy(t,e);case at.stack:return ut.createCopy(t,e);case at.component:return pt.createCopy(t);default:throw new Y("CICC91354",t.type,"Invalid Config Item type specified")}},t.createDefault=function(t){switch(t){case at.ground:throw new X("CICCDR91562");case at.row:case at.column:return gt.createDefault(t);case at.stack:return ut.createDefault();case at.component:return pt.createDefault();default:throw new Y("CICCDD91563",t,"Invalid Config Item type specified")}},t.isComponentItem=function(t){return t.type===at.component},t.isStackItem=function(t){return t.type===at.stack},t.isGroundItem=function(t){return t.type===at.ground}}(ct||(ct={})),function(t){t.defaultMaximised=!1,function(t){t.createCopy=function(t,e){return void 0===t?void 0:{show:null!=e?e:t.show,popout:t.popout,close:t.close,maximise:t.maximise,minimise:t.minimise,tabDropdown:t.tabDropdown}}}(t.Header||(t.Header={}))}(mt||(mt={})),function(t){function e(t){const e=t.length,i=new Array(e);for(let n=0;n"__glMaximised"===t));t>0&&(o=!0,n=n.splice(t,1)),e=n.length>0?n[0]:ct.defaults.id}else e=n;return i=void 0!==t.maximised?t.maximised:o,{id:e,maximised:i}}}(wt||(wt={})),function(t){function e(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0;return{resolved:!0,root:Et.resolve(i),openPopouts:t.resolveOpenPopouts(e.openPopouts),dimensions:t.Dimensions.resolve(e.dimensions),settings:t.Settings.resolve(e.settings),header:t.Header.resolve(e.header,e.settings,e.labels)}}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:Lt.fromResolvedArray(e.openPopouts),settings:_t.Settings.createCopy(e.settings),dimensions:t.Dimensions.fromResolved(e.dimensions),header:_t.Header.createCopy(e.header)}},t.isResolved=function(t){const e=t;return void 0!==e.resolved&&!0===e.resolved},t.resolveOpenPopouts=function(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0,{root:Et.resolve(o),openPopouts:xt.resolveOpenPopouts(e.openPopouts),dimensions:xt.Dimensions.resolve(e.dimensions),settings:xt.Settings.resolve(e.settings),header:xt.Header.resolve(e.header,e.settings,e.labels),parentId:null!==(i=e.parentId)&&void 0!==i?i:null,indexInParent:null!==(n=e.indexInParent)&&void 0!==n?n:null,window:t.Window.resolve(e.window,e.dimensions),resolved:!0}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:i(e.openPopouts),dimensions:xt.Dimensions.fromResolved(e.dimensions),settings:_t.Settings.createCopy(e.settings),header:_t.Header.createCopy(e.header),parentId:e.parentId,indexInParent:e.indexInParent,window:t.Window.fromResolved(e.window)}},t.fromResolvedArray=i}(Lt||(Lt={}));class Wt{constructor(){this._allEventSubscriptions=[],this._subscriptionsMap=new Map,this.unbind=this.removeEventListener,this.trigger=this.emit}tryBubbleEvent(t,e){}emit(t,...e){let i=this._subscriptionsMap.get(t);if(void 0!==i){i=i.slice();for(let t=0;t0){const n=e.slice();n.unshift(t);const o=this._allEventSubscriptions.slice();for(let t=0;t0?n.contentItems[0]:n,e=0);const o=this._layoutManager.createAndInitContentItem(i,t);t.addChild(o,e),this._layoutManager.layoutConfig.settings.popInOnClose?this._onClose():this.close()}createWindow(){const t=this.createUrl(),e=Math.floor(1e6*Math.random()).toString(36),i=this.serializeWindowFeatures({width:this._initialWindowSize.width,height:this._initialWindowSize.height,innerWidth:this._initialWindowSize.width,innerHeight:this._initialWindowSize.height,menubar:"no",toolbar:"no",location:"no",personalbar:"no",resizable:"yes",scrollbars:"no",status:"no"});if(this._popoutWindow=globalThis.open(t,e,i),this._popoutWindow)this._popoutWindow.addEventListener("load",(()=>this.positionWindow()),{passive:!0}),this._popoutWindow.addEventListener("beforeunload",(()=>{this._layoutManager.layoutConfig.settings.popInOnClose?this.popIn():this._onClose()}),{passive:!0}),this._checkReadyInterval=setInterval((()=>this.checkReady()),10);else if(!0===this._layoutManager.layoutConfig.settings.blockedPopoutsThrowError){throw new j("Popout blocked")}}checkReady(){if(null===this._popoutWindow)throw new K("BPCR01844");this._popoutWindow.__glInstance&&this._popoutWindow.__glInstance.isInitialised&&(this.onInitialised(),void 0!==this._checkReadyInterval&&(clearInterval(this._checkReadyInterval),this._checkReadyInterval=void 0))}serializeWindowFeatures(t){const e=[];for(const i in t)e.push(i+"="+t[i].toString());return e.join(",")}createUrl(){const t="gl-window-config-"+Ot(),e=_t.minifyConfig(this._config);try{localStorage.setItem(t,JSON.stringify(e))}catch(t){throw new Error("Error while writing to localStorage "+function(t){return t instanceof Error?t.message:"string"==typeof t?t:"Unknown Error"}(t))}const i=new URL(location.href);return i.searchParams.set("gl-window",t),i.toString()}positionWindow(){if(null===this._popoutWindow)throw new Error("BrowserPopout.positionWindow: null popoutWindow");this._popoutWindow.moveTo(this._initialWindowSize.left,this._initialWindowSize.top),this._popoutWindow.focus()}onInitialised(){this._isInitialised=!0,this.getGlInstance().on("popIn",(()=>this.popIn())),this.emit("initialised")}_onClose(){setTimeout((()=>this.emit("closed")),50)}}class Gt extends Wt{constructor(t,e,i,n){super(),this.layoutManager=t,this._parent=i,this._element=n,this._popInParentIds=[],this._type=e.type,this._id=e.id,this._isInitialised=!1,this.isGround=!1,this.isRow=!1,this.isColumn=!1,this.isStack=!1,this.isComponent=!1,this.size=e.size,this.sizeUnit=e.sizeUnit,this.minSize=e.minSize,this.minSizeUnit=e.minSizeUnit,this._isClosable=e.isClosable,this._pendingEventPropagations={},this._throttledEvents=["stateChanged"],this._contentItems=this.createContentItems(e.content)}get type(){return this._type}get id(){return this._id}set id(t){this._id=t}get popInParentIds(){return this._popInParentIds}get parent(){return this._parent}get contentItems(){return this._contentItems}get isClosable(){return this._isClosable}get element(){return this._element}get isInitialised(){return this._isInitialised}static isStack(t){return t.isStack}static isComponentItem(t){return t.isComponent}static isComponentParentableItem(t){return t.isStack||t.isGround}removeChild(t,e=!1){const i=this._contentItems.indexOf(t);if(-1===i)throw new Error("Can't remove child item. Unknown content item");if(e||this._contentItems[i].destroy(),this._contentItems.splice(i,1),this._contentItems.length>0)this.updateSize(!1);else if(!this.isGround&&!0===this._isClosable){if(null===this._parent)throw new K("CIUC00874");this._parent.removeChild(this)}}addChild(t,e,i){return null!=e||(e=this._contentItems.length),this._contentItems.splice(e,0,t),t.setParent(this),!0===this._isInitialised&&!1===t._isInitialised&&t.init(),e}replaceChild(t,e,i=!1){const n=this._contentItems.indexOf(t),o=t._element.parentNode;if(-1===n)throw new X("CIRCI23232","Can't replace child. oldChild is not child of this");if(null===o)throw new K("CIRCP23232");if(o.replaceChild(e._element,t._element),!0===i&&(t._parent=null,t.destroy()),this._contentItems[n]=e,e.setParent(this),e.size=t.size,e.sizeUnit=t.sizeUnit,e.minSize=t.minSize,e.minSizeUnit=t.minSizeUnit,null===e._parent)throw new K("CIRCNC45699");!0===e._parent._isInitialised&&!1===e._isInitialised&&e.init(),this.updateSize(!1)}remove(){if(null===this._parent)throw new K("CIR11110");this._parent.removeChild(this)}popout(){const t=Ot(),e=this.layoutManager.createPopoutFromContentItem(this,void 0,t,void 0);return this.emitBaseBubblingEvent("stateChanged"),e}calculateConfigContent(){const t=this._contentItems,e=t.length,i=new Array(e);for(let n=0;nthis.propagateEventToLayoutManager(t,e))))}propagateEventToLayoutManager(t,e){this._pendingEventPropagations[t]=!1,this.layoutManager.emitUnknown(t,e)}}class jt extends Gt{constructor(t,e,i){super(t,e,i,document.createElement("div")),this._parentItem=i,this._focused=!1,this.isComponent=!0,this._reorderEnabled=e.reorderEnabled,this.applyUpdatableConfig(e),this._initialWantMaximise=e.maximised;const n=document.createElement("div");n.classList.add("lm_content"),this.element.appendChild(n),this._container=new Ft(e,this,t,n,(t=>this.handleUpdateItemConfigEvent(t)),(()=>this.show()),(()=>this.hide()),(t=>this.focus(t)),(t=>this.blur(t)))}get componentName(){return this._container.componentType}get componentType(){return this._container.componentType}get reorderEnabled(){return this._reorderEnabled}get initialWantMaximise(){return this._initialWantMaximise}get component(){return this._container.component}get container(){return this._container}get parentItem(){return this._parentItem}get headerConfig(){return this._headerConfig}get title(){return this._title}get tab(){return this._tab}get focused(){return this._focused}destroy(){this._container.destroy(),super.destroy()}applyUpdatableConfig(t){this.setTitle(t.title),this._headerConfig=t.header}toConfig(){const t=this._container.stateRequestEvent,e=void 0===t?this._container.state:t();return{type:at.component,content:[],size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,maximised:!1,isClosable:this.isClosable,reorderEnabled:this._reorderEnabled,title:this._title,header:mt.Header.createCopy(this._headerConfig),componentType:pt.copyComponentType(this.componentType),componentState:e}}close(){if(null===this.parent)throw new K("CIC68883");this.parent.removeChild(this,!1)}enterDragMode(t,e){Tt(this.element,t),At(this.element,e),this._container.enterDragMode(t,e)}exitDragMode(){this._container.exitDragMode()}enterStackMaximised(){this._container.enterStackMaximised()}exitStackMaximised(){this._container.exitStackMaximised()}drag(){this._container.drag()}updateSize(t){this.updateNodeSize(t)}init(){this.updateNodeSize(!1),super.init(),this._container.emit("open"),this.initContentItems()}setTitle(t){this._title=t,this.emit("titleChanged",t),this.emit("stateChanged")}setTab(t){this._tab=t,this.emit("tab",t),this._container.setTab(t)}hide(){super.hide(),this._container.setVisibility(!1)}show(){super.show(),this._container.setVisibility(!0)}focus(t=!1){this.parentItem.setActiveComponentItem(this,!0,t)}setFocused(t){this._focused=!0,this.tab.setFocused(),t||this.emitBaseBubblingEvent("focus")}blur(t=!1){this._focused&&this.layoutManager.setFocusedComponentItem(void 0,t)}setBlurred(t){this._focused=!1,this.tab.setBlurred(),t||this.emitBaseBubblingEvent("blur")}setParent(t){this._parentItem=t,super.setParent(t)}handleUpdateItemConfigEvent(t){this.applyUpdatableConfig(t)}updateNodeSize(t){if("none"!==this.element.style.display){const{width:e,height:i}=kt(this.element);this._container.setSizeToNodeSize(e,i,t)}}}class $t extends Gt{constructor(){super(...arguments),this._focused=!1}get focused(){return this._focused}setFocusedValue(t){this._focused=t}}class Zt extends Wt{constructor(t,e){super(),this._eElement=t,this._pointerTracking=!1,this._pointerDownEventListener=t=>this.onPointerDown(t),this._pointerMoveEventListener=t=>this.onPointerMove(t),this._pointerUpEventListener=t=>this.onPointerUp(t),this._timeout=void 0,this._allowableTargets=[t,...e],this._oDocument=document,this._eBody=document.body,this._nDelay=1800,this._nDistance=10,this._nX=0,this._nY=0,this._nOriginalX=0,this._nOriginalY=0,this._dragging=!1,this._eElement.addEventListener("pointerdown",this._pointerDownEventListener,{passive:!0})}destroy(){this.checkRemovePointerTrackingEventListeners(),this._eElement.removeEventListener("pointerdown",this._pointerDownEventListener)}cancelDrag(){this.processDragStop(void 0)}onPointerDown(t){if(this._allowableTargets.includes(t.target)&&t.isPrimary){const e=this.getPointerCoordinates(t);this.processPointerDown(e)}}processPointerDown(t){this._nOriginalX=t.x,this._nOriginalY=t.y,this._oDocument.addEventListener("pointermove",this._pointerMoveEventListener),this._oDocument.addEventListener("pointerup",this._pointerUpEventListener,{passive:!0}),this._pointerTracking=!0,this._timeout=setTimeout((()=>{try{this.startDrag()}catch(t){throw console.error(t),t}}),this._nDelay)}onPointerMove(t){this._pointerTracking&&(this.processDragMove(t),t.preventDefault())}processDragMove(t){this._nX=t.pageX-this._nOriginalX,this._nY=t.pageY-this._nOriginalY,!1===this._dragging&&(Math.abs(this._nX)>this._nDistance||Math.abs(this._nY)>this._nDistance)&&this.startDrag(),this._dragging&&this.emit("drag",this._nX,this._nY,t)}onPointerUp(t){this.processDragStop(t)}processDragStop(t){var e;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this.checkRemovePointerTrackingEventListeners(),!0===this._dragging&&(this._eBody.classList.remove("lm_dragging"),this._eElement.classList.remove("lm_dragging"),null===(e=this._oDocument.querySelector("iframe"))||void 0===e||e.style.setProperty("pointer-events",""),this._dragging=!1,this.emit("dragStop",t))}checkRemovePointerTrackingEventListeners(){this._pointerTracking&&(this._oDocument.removeEventListener("pointermove",this._pointerMoveEventListener),this._oDocument.removeEventListener("pointerup",this._pointerUpEventListener),this._pointerTracking=!1)}startDrag(){var t;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this._dragging=!0,this._eBody.classList.add("lm_dragging"),this._eElement.classList.add("lm_dragging"),null===(t=this._oDocument.querySelector("iframe"))||void 0===t||t.style.setProperty("pointer-events","none"),this.emit("dragStart",this._nOriginalX,this._nOriginalY)}getPointerCoordinates(t){return{x:t.pageX,y:t.pageY}}}class qt{constructor(t,e,i){this._isVertical=t,this._size=e,this._grabSize=i0){const i=this.createSplitter(Math.max(0,e-1)).element;e>0?(this.contentItems[e-1].element.insertAdjacentElement("afterend",i),i.insertAdjacentElement("afterend",t.element)):(this.contentItems[0].element.insertAdjacentElement("beforebegin",i),i.insertAdjacentElement("beforebegin",t.element))}else this._childElementContainer.appendChild(t.element);super.addChild(t,e);const n=1/this.contentItems.length*100;if(!0===i)return this.emitBaseBubblingEvent("stateChanged"),e;for(let e=0;e0&&(this.calculateRelativeSizes(),this.setAbsoluteSizes()),this.emitBaseBubblingEvent("stateChanged"),this.emit("resize")}setAbsoluteSizes(){const t=this.calculateAbsoluteSizes();for(let e=0;e0&&t.itemSizes[e]++,this._isColumn?(Tt(this.contentItems[e].element,t.crossAxisSize),At(this.contentItems[e].element,t.itemSizes[e])):(Tt(this.contentItems[e].element,t.itemSizes[e]),At(this.contentItems[e].element,t.crossAxisSize))}calculateAbsoluteSizes(){const t=(this.contentItems.length-1)*this._splitterSize,{width:e,height:i}=kt(this.element);let n,o;this._isColumn?(n=i-t,o=e):(n=e-t,o=i);let s=0;const r=[];for(let t=0;t0){const n=100-t;for(let t=0;t100&&e.length>0){for(let t=0;te)return;{const r=i/e;let a=i;for(let e=0;ethis.onSplitterDrag(e,t,i))),e.on("dragStop",(()=>this.onSplitterDragStop(e))),e.on("dragStart",(()=>this.onSplitterDragStart(e))),this._splitter.splice(t,0,e),e}getSplitItems(t){const e=this._splitter.indexOf(t);return{before:this.contentItems[e],after:this.contentItems[e+1]}}calculateContentItemMinSize(t){const e=t.minSize;if(void 0!==e){if(t.minSizeUnit===ht.Pixel)return e;throw new X("ROCGMD98831",JSON.stringify(t))}{const t=this.layoutManager.layoutConfig.dimensions;return this._isColumn?t.defaultMinItemHeight:t.defaultMinItemWidth}}calculateContentItemsTotalMinSize(t){let e=0;for(const i of t)e+=this.calculateContentItemMinSize(i);return e}onSplitterDragStart(t){const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=this.calculateContentItemsTotalMinSize(e.before.contentItems),s=this.calculateContentItemsTotalMinSize(e.after.contentItems);this._splitterPosition=0,this._splitterMinPosition=-1*(i-o),this._splitterMaxPosition=n-s}onSplitterDrag(t,e,i){let n=this._isColumn?i:e;if(null===this._splitterMinPosition||null===this._splitterMaxPosition)throw new K("ROCOSD59226");n=Math.max(n,this._splitterMinPosition),n=Math.min(n,this._splitterMaxPosition),this._splitterPosition=n;const o=zt(n);this._isColumn?t.element.style.top=o:t.element.style.left=o}onSplitterDragStop(t){if(null===this._splitterPosition)throw new K("ROCOSDS66932");{const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=(this._splitterPosition+i)/(i+n),s=e.before.size+e.after.size;e.before.size=o*s,e.after.size=(1-o)*s,t.element.style.top=zt(0),t.element.style.left=zt(0),globalThis.requestAnimationFrame((()=>this.updateSize(!1)))}}}!function(t){t.getElementDimensionSize=function(t,e){return"width"===e?function(t){return t.offsetWidth}(t):function(t){return t.offsetHeight}(t)},t.setElementDimensionSize=function(t,e,i){return"width"===e?Tt(t,i):At(t,i)},t.createElement=function(t,e){const i=t.createElement("div");return i.classList.add("lm_item"),e?i.classList.add("lm_column"):i.classList.add("lm_row"),i}}(Xt||(Xt={}));class Yt extends $t{constructor(t,e,i){super(t,vt.create(e),null,Yt.createElement(document)),this.isGround=!0,this._childElementContainer=this.element,this._containerElement=i;let n=null;for(;;){const t=n?n.previousSibling:this._containerElement.lastChild;if(!(t instanceof Element&&t.classList.contains("lm_content")))break;n=t}this._containerElement.insertBefore(this.element,n)}init(){if(!0!==this.isInitialised){this.updateNodeSize();for(let t=0;t0?this.contentItems[0]:this,n.isComponent)throw new Error("Cannot add item as child to ComponentItem");{const t=this.layoutManager.createAndInitContentItem(i,n);return e=n.addChild(t,e),n===this?-1:e}}loadComponentAsRoot(t){this.clearRoot();const e=Ct.resolve(t,!1);if(e.maximised)throw new Error("Root Component cannot be maximised");{const t=new jt(this.layoutManager,e,this);t.init(),this.addChild(t,0)}}addChild(t,e){if(this.contentItems.length>0)throw new Error("Ground node can only have a single child");return this._childElementContainer.appendChild(t.element),e=super.addChild(t,e),this.updateSize(!1),this.emitBaseBubblingEvent("stateChanged"),e}calculateConfigContent(){const t=this.contentItems,e=t.length,i=new Array(e);for(let n=0;n0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e)),this.updateContentItemsSize(!1))}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}createSideAreas(){const t=Yt.Area.oppositeSides,e=new Array(Object.keys(t).length);let i=0;for(const n in t){const o=n,s=this.getElementArea();if(null===s)throw new K("RCSA77553");s.side=o,"2"===t[o][1]?s[o]=s[t[o]]-50:s[o]=s[t[o]]+50,s.surface=(s.x2-s.x1)*(s.y2-s.y1),e[i++]=s}return e}highlightDropZone(t,e,i){this.layoutManager.tabDropPlaceholder.remove(),super.highlightDropZone(t,e,i)}onDrop(t,e){if(t.isComponent){const e=ut.createDefault(),i=t;e.header=mt.Header.createCopy(i.headerConfig);const n=this.layoutManager.createAndInitContentItem(e,this);n.addChild(t),t=n}if(0===this.contentItems.length)this.addChild(t);else{if(t.type===at.row||t.type===at.column){const e=ut.createDefault(),i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}const i="x"==e.side[0]?at.row:at.column,n="2"==e.side[1],o=this.contentItems[0];if(o instanceof Xt&&o.type===i){const e=o.contentItems[n?0:o.contentItems.length-1];o.addChild(t,n?0:void 0,!0),e.size*=.5,t.size=e.size,t.sizeUnit=ht.Percent,o.updateSize(!1)}else{const e=ct.createDefault(i),s=this.layoutManager.createContentItem(e,this);this.replaceChild(o,s),s.addChild(t,n?0:void 0,!0),s.addChild(o,n?void 0:0,!0),o.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}}dock(){throw new X("GID87731")}validateDocking(){throw new X("GIVD87732")}getAllContentItems(){const t=[this];return this.deepGetAllContentItems(this.contentItems,t),t}getConfigMaximisedItems(){const t=[];return this.deepFilterContentItems(this.contentItems,t,(t=>!(!Gt.isStack(t)||!t.initialWantMaximise)||!(!Gt.isComponentItem(t)||!t.initialWantMaximise))),t}getItemsByPopInParentId(t){const e=[];return this.deepFilterContentItems(this.contentItems,e,(e=>e.popInParentIds.includes(t))),e}toConfig(){throw new Error("Cannot generate GroundItem config")}setActiveComponentItem(t,e,i){}updateNodeSize(){const{width:t,height:e}=kt(this._containerElement);Tt(this.element,t),At(this.element,e),this.contentItems.length>0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e))}deepGetAllContentItems(t,e){for(let i=0;ithis.onClick(t),this._touchStartEventListener=t=>this.onTouchStart(t),this._element=document.createElement("div"),this._element.classList.add(i),this._element.title=e,this._header.on("destroy",(()=>this.destroy())),this._element.addEventListener("click",this._clickEventListener,{passive:!0}),this._element.addEventListener("touchstart",this._touchStartEventListener,{passive:!0}),this._header.controlsContainerElement.appendChild(this._element)}get element(){return this._element}destroy(){var t;this._element.removeEventListener("click",this._clickEventListener),this._element.removeEventListener("touchstart",this._touchStartEventListener),null===(t=this._element.parentNode)||void 0===t||t.removeChild(this._element)}onClick(t){this._pushEvent(t)}onTouchStart(t){this._pushEvent(t)}}class Jt{constructor(t,e,i,n,o){var s;this._layoutManager=t,this._componentItem=e,this._closeEvent=i,this._focusEvent=n,this._dragStartEvent=o,this._isActive=!1,this._tabClickListener=t=>this.onTabClickDown(t),this._tabTouchStartListener=t=>this.onTabTouchStart(t),this._closeClickListener=()=>this.onCloseClick(),this._closeTouchStartListener=()=>this.onCloseTouchStart(),this._dragStartListener=(t,e)=>this.onDragStart(t,e),this._contentItemDestroyListener=()=>this.onContentItemDestroy(),this._tabTitleChangedListener=t=>this.setTitle(t),this._element=document.createElement("div"),this._element.classList.add("lm_tab"),this._titleElement=document.createElement("span"),this._titleElement.classList.add("lm_title"),this._closeElement=document.createElement("div"),this._closeElement.classList.add("lm_close_tab"),this._element.appendChild(this._titleElement),this._element.appendChild(this._closeElement),e.isClosable?this._closeElement.style.display="":this._closeElement.style.display="none",this.setTitle(e.title),this._componentItem.on("titleChanged",this._tabTitleChangedListener);(null!==(s=e.reorderEnabled)&&void 0!==s?s:this._layoutManager.layoutConfig.settings.reorderEnabled)&&this.enableReorder(),this._element.addEventListener("click",this._tabClickListener,{passive:!0}),this._element.addEventListener("touchstart",this._tabTouchStartListener,{passive:!0}),this._componentItem.isClosable?(this._closeElement.addEventListener("click",this._closeClickListener,{passive:!0}),this._closeElement.addEventListener("touchstart",this._closeTouchStartListener,{passive:!0})):(this._closeElement.remove(),this._closeElement=void 0),this._componentItem.setTab(this),this._layoutManager.emit("tabCreated",this)}get isActive(){return this._isActive}get componentItem(){return this._componentItem}get contentItem(){return this._componentItem}get element(){return this._element}get titleElement(){return this._titleElement}get closeElement(){return this._closeElement}get reorderEnabled(){return void 0!==this._dragListener}set reorderEnabled(t){t!==this.reorderEnabled&&(t?this.enableReorder():this.disableReorder())}setTitle(t){this._titleElement.innerText=t,this._element.title=t}setActive(t){t!==this._isActive&&(this._isActive=t,t?this._element.classList.add("lm_active"):this._element.classList.remove("lm_active"))}destroy(){var t,e;this._closeEvent=void 0,this._focusEvent=void 0,this._dragStartEvent=void 0,this._element.removeEventListener("click",this._tabClickListener),this._element.removeEventListener("touchstart",this._tabTouchStartListener),null===(t=this._closeElement)||void 0===t||t.removeEventListener("click",this._closeClickListener),null===(e=this._closeElement)||void 0===e||e.removeEventListener("touchstart",this._closeTouchStartListener),this._componentItem.off("titleChanged",this._tabTitleChangedListener),this.reorderEnabled&&this.disableReorder(),this._element.remove()}setBlurred(){this._element.classList.remove("lm_focused"),this._titleElement.classList.remove("lm_focused")}setFocused(){this._element.classList.add("lm_focused"),this._titleElement.classList.add("lm_focused")}onDragStart(t,e){if(void 0===this._dragListener)throw new J("TODSDLU10093");if(void 0===this._dragStartEvent)throw new J("TODS23309");this._dragStartEvent(t,e,this._dragListener,this.componentItem)}onContentItemDestroy(){void 0!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=void 0)}onTabClickDown(t){const e=t.target;e!==this._element&&e!==this._titleElement||(0===t.button?this.notifyFocus():1===t.button&&this._componentItem.isClosable&&this.notifyClose())}onTabTouchStart(t){t.target===this._element&&this.notifyFocus()}onCloseClick(){this.notifyClose()}onCloseTouchStart(){this.notifyClose()}notifyClose(){if(void 0===this._closeEvent)throw new J("TNC15007");this._closeEvent(this._componentItem)}notifyFocus(){if(void 0===this._focusEvent)throw new J("TNA15007");this._focusEvent(this._componentItem)}enableReorder(){this._dragListener=new Zt(this._element,[this._titleElement]),this._dragListener.on("dragStart",this._dragStartListener),this._componentItem.on("destroy",this._contentItemDestroyListener)}disableReorder(){if(void 0===this._dragListener)throw new J("TDR87745");this._componentItem.off("destroy",this._contentItemDestroyListener),this._dragListener.off("dragStart",this._dragStartListener),this._dragListener=void 0}}class Qt{constructor(t,e,i,n,o){this._layoutManager=t,this._componentRemoveEvent=e,this._componentFocusEvent=i,this._componentDragStartEvent=n,this._dropdownActiveChangedEvent=o,this._tabs=[],this._lastVisibleTabIndex=-1,this._dropdownActive=!1,this._element=document.createElement("section"),this._element.classList.add("lm_tabs"),this._dropdownElement=document.createElement("section"),this._dropdownElement.classList.add("lm_tabdropdown_list"),this._dropdownElement.style.display="none"}get tabs(){return this._tabs}get tabCount(){return this._tabs.length}get lastVisibleTabIndex(){return this._lastVisibleTabIndex}get element(){return this._element}get dropdownElement(){return this._dropdownElement}get dropdownActive(){return this._dropdownActive}destroy(){for(let t=0;tthis.handleTabCloseEvent(t)),(t=>this.handleTabFocusEvent(t)),((t,e,i,n)=>this.handleTabDragStartEvent(t,e,i,n)));void 0===e&&(e=this._tabs.length),this._tabs.splice(e,0,i),ethis._lastVisibleTabIndex){const t=this._tabs[e];for(let t=e;t>0;t--)this._tabs[t]=this._tabs[t-1];this._tabs[0]=t}}updateTabSizes(t,e){let i=!1;this.tryUpdateTabSizes(i,t,e)||(i=!0,this.tryUpdateTabSizes(i,t,e)),i!==this._dropdownActive&&(this._dropdownActive=i,this._dropdownActiveChangedEvent())}tryUpdateTabSizes(t,e,i){if(this._tabs.length>0){if(void 0===i)throw new Error("non-empty tabs must have active component item");let n=0,o=!1;const s=this._layoutManager.layoutConfig.settings.tabOverlapAllowance,r=this._tabs.indexOf(i.tab),a=this._tabs[r];this._lastVisibleTabIndex=-1;for(let i=0;ie){if(o)i===r&&(l.style.zIndex="auto",l.style.marginLeft="",l.parentElement!==this._element&&this._element.appendChild(l));else{let t;if(t=r>0&&r<=i?(d-e)/(i-1):(d-e)/i,tthis.onClick(t),this._touchStartListener=t=>this.onTouchStart(t),this._rowColumnClosable=!0,this._closeButton=null,this._popoutButton=null,this._tabsContainer=new Qt(this._layoutManager,(t=>this.handleTabInitiatedComponentRemoveEvent(t)),(t=>this.handleTabInitiatedComponentFocusEvent(t)),((t,e,i,n)=>this.handleTabInitiatedDragStartEvent(t,e,i,n)),(()=>this.processTabDropdownActiveChanged())),this._show=i.show,this._popoutEnabled=i.popoutEnabled,this._popoutLabel=i.popoutLabel,this._maximiseEnabled=i.maximiseEnabled,this._maximiseLabel=i.maximiseLabel,this._minimiseEnabled=i.minimiseEnabled,this._minimiseLabel=i.minimiseLabel,this._closeEnabled=i.closeEnabled,this._closeLabel=i.closeLabel,this._tabDropdownEnabled=i.tabDropdownEnabled,this._tabDropdownLabel=i.tabDropdownLabel,this.setSide(i.side),this._canRemoveComponent=this._configClosable,this._element=document.createElement("section"),this._element.classList.add("lm_header"),this._controlsContainerElement=document.createElement("section"),this._controlsContainerElement.classList.add("lm_controls"),this._element.appendChild(this._tabsContainer.element),this._element.appendChild(this._controlsContainerElement),this._element.appendChild(this._tabsContainer.dropdownElement),this._element.addEventListener("click",this._clickListener,{passive:!0}),this._element.addEventListener("touchstart",this._touchStartListener,{passive:!0}),this._documentMouseUpListener=()=>this._tabsContainer.hideAdditionalTabsDropdown(),globalThis.document.addEventListener("mouseup",this._documentMouseUpListener,{passive:!0}),this._tabControlOffset=this._layoutManager.layoutConfig.settings.tabControlOffset,this._tabDropdownEnabled&&(this._tabDropdownButton=new Kt(this,this._tabDropdownLabel,"lm_tabdropdown",(()=>this._tabsContainer.showAdditionalTabsDropdown()))),this._popoutEnabled&&(this._popoutButton=new Kt(this,this._popoutLabel,"lm_popout",(()=>this.handleButtonPopoutEvent()))),this._maximiseEnabled&&(this._maximiseButton=new Kt(this,this._maximiseLabel,"lm_maximise",(t=>this.handleButtonMaximiseToggleEvent(t)))),this._configClosable&&(this._closeButton=new Kt(this,this._closeLabel,"lm_close",(()=>s()))),this.processTabDropdownActiveChanged()}get show(){return this._show}get side(){return this._side}get leftRightSided(){return this._leftRightSided}get layoutManager(){return this._layoutManager}get parent(){return this._parent}get tabs(){return this._tabsContainer.tabs}get lastVisibleTabIndex(){return this._tabsContainer.lastVisibleTabIndex}get element(){return this._element}get tabsContainerElement(){return this._tabsContainer.element}get controlsContainerElement(){return this._controlsContainerElement}destroy(){this.emit("destroy"),this._popoutEvent=void 0,this._maximiseToggleEvent=void 0,this._clickEvent=void 0,this._touchStartEvent=void 0,this._componentRemoveEvent=void 0,this._componentFocusEvent=void 0,this._componentDragStartEvent=void 0,this._tabsContainer.destroy(),globalThis.document.removeEventListener("mouseup",this._documentMouseUpListener),this._element.remove()}createTab(t,e){this._tabsContainer.createTab(t,e)}removeTab(t){this._tabsContainer.removeTab(t)}processActiveComponentChanged(t){this._tabsContainer.processActiveComponentChanged(t),this.updateTabSizes()}setSide(t){this._side=t,this._leftRightSided=[nt.right,nt.left].includes(this._side)}setRowColumnClosable(t){this._rowColumnClosable=t,this.updateClosability()}updateClosability(){let t;if(this._configClosable)if(this._rowColumnClosable){t=!0;const e=this.tabs.length;for(let i=0;i1}applyFocusedValue(t){t?this._element.classList.add("lm_focused"):this._element.classList.remove("lm_focused")}processMaximised(){if(void 0===this._maximiseButton)throw new J("HPMAX16997");this._maximiseButton.element.setAttribute("title",this._minimiseLabel)}processMinimised(){if(void 0===this._maximiseButton)throw new J("HPMIN16997");this._maximiseButton.element.setAttribute("title",this._maximiseLabel)}updateTabSizes(){if(this._tabsContainer.tabCount>0){const t=this._show?this._layoutManager.layoutConfig.dimensions.headerHeight:0;let e;this._leftRightSided?(this._element.style.height="",this._element.style.width=zt(t)):(this._element.style.width="",this._element.style.height=zt(t)),e=this._leftRightSided?this._element.offsetHeight-this._controlsContainerElement.offsetHeight-this._tabControlOffset:this._element.offsetWidth-this._controlsContainerElement.offsetWidth-this._tabControlOffset,this._tabsContainer.updateTabSizes(e,this._getActiveComponentItemEvent())}}handleTabInitiatedComponentRemoveEvent(t){if(this._canRemoveComponent){if(void 0===this._componentRemoveEvent)throw new J("HHTCE22294");this._componentRemoveEvent(t)}}handleTabInitiatedComponentFocusEvent(t){if(void 0===this._componentFocusEvent)throw new J("HHTAE22294");this._componentFocusEvent(t)}handleTabInitiatedDragStartEvent(t,e,i,n){if(this._canRemoveComponent){if(void 0===this._componentDragStartEvent)throw new J("HHTDSE22294");this._componentDragStartEvent(t,e,i,n)}else i.cancelDrag()}processTabDropdownActiveChanged(){void 0!==this._tabDropdownButton&&Dt(this._tabDropdownButton.element,this._tabsContainer.dropdownActive)}handleButtonPopoutEvent(){if(this._layoutManager.layoutConfig.settings.popoutWholeStack){if(void 0===this._popoutEvent)throw new J("HHBPOE17834");this._popoutEvent()}else{const t=this._getActiveComponentItemEvent();t&&t.popout()}}handleButtonMaximiseToggleEvent(t){if(void 0===this._maximiseToggleEvent)throw new J("HHBMTE16834");this._maximiseToggleEvent()}onClick(t){t.target===this._element&&this.notifyClick(t)}onTouchStart(t){t.target===this._element&&this.notifyTouchStart(t)}notifyClick(t){if(void 0===this._clickEvent)throw new J("HNHC46834");this._clickEvent(t)}notifyTouchStart(t){if(void 0===this._touchStartEvent)throw new J("HNHTS46834");this._touchStartEvent(t)}}class ee extends $t{constructor(t,e,i){var n,o,s,r,a,l,h,d,c,m,u,p,g,f,v,_,y,C,w;super(t,e,i,ee.createElement(document)),this._headerSideChanged=!1,this._resizeListener=()=>this.handleResize(),this._maximisedListener=()=>this.handleMaximised(),this._minimisedListener=()=>this.handleMinimised(),this._headerConfig=e.header;const I=t.layoutConfig.header,b=e.content;let S;if(1!==b.length)S=void 0;else{S=b[0].header}this._initialWantMaximise=e.maximised,this._initialActiveItemIndex=null!==(n=e.activeItemIndex)&&void 0!==n?n:0;const E=null!==(r=null!==(s=null===(o=this._headerConfig)||void 0===o?void 0:o.show)&&void 0!==s?s:null==S?void 0:S.show)&&void 0!==r?r:I.show,x=null!==(h=null!==(l=null===(a=this._headerConfig)||void 0===a?void 0:a.popout)&&void 0!==l?l:null==S?void 0:S.popout)&&void 0!==h?h:I.popout,L=null!==(m=null!==(c=null===(d=this._headerConfig)||void 0===d?void 0:d.maximise)&&void 0!==c?c:null==S?void 0:S.maximise)&&void 0!==m?m:I.maximise,z=null!==(g=null!==(p=null===(u=this._headerConfig)||void 0===u?void 0:u.close)&&void 0!==p?p:null==S?void 0:S.close)&&void 0!==g?g:I.close,M=null!==(_=null!==(v=null===(f=this._headerConfig)||void 0===f?void 0:f.minimise)&&void 0!==v?v:null==S?void 0:S.minimise)&&void 0!==_?_:I.minimise,P=null!==(w=null!==(C=null===(y=this._headerConfig)||void 0===y?void 0:y.tabDropdown)&&void 0!==C?C:null==S?void 0:S.tabDropdown)&&void 0!==w?w:I.tabDropdown;this._maximisedEnabled=!1!==L;const T={show:!1!==E,side:!1===E?nt.top:E,popoutEnabled:!1!==x,popoutLabel:!1===x?"":x,maximiseEnabled:this._maximisedEnabled,maximiseLabel:!1===L?"":L,closeEnabled:!1!==z,closeLabel:!1===z?"":z,minimiseEnabled:!0,minimiseLabel:M,tabDropdownEnabled:!1!==P,tabDropdownLabel:!1===P?"":P};this._header=new te(t,this,T,e.isClosable&&!1!==z,(()=>this.getActiveComponentItem()),(()=>this.remove()),(()=>this.handlePopoutEvent()),(()=>this.toggleMaximise()),(t=>this.handleHeaderClickEvent(t)),(t=>this.handleHeaderTouchStartEvent(t)),(t=>this.handleHeaderComponentRemoveEvent(t)),(t=>this.handleHeaderComponentFocusEvent(t)),((t,e,i,n)=>this.handleHeaderComponentStartDragEvent(t,e,i,n))),this.isStack=!0,this._childElementContainer=document.createElement("section"),this._childElementContainer.classList.add("lm_items"),this.on("resize",this._resizeListener),this._maximisedEnabled&&(this.on("maximised",this._maximisedListener),this.on("minimised",this._minimisedListener)),this.element.appendChild(this._header.element),this.element.appendChild(this._childElementContainer),this.setupHeaderPosition(),this._header.updateClosability()}get childElementContainer(){return this._childElementContainer}get header(){return this._header}get headerShow(){return this._header.show}get headerSide(){return this._header.side}get headerLeftRightSided(){return this._header.leftRightSided}get contentAreaDimensions(){return this._contentAreaDimensions}get initialWantMaximise(){return this._initialWantMaximise}get isMaximised(){return this===this.layoutManager.maximisedStack}get stackParent(){if(!this.parent)throw new Error("Stack should always have a parent");return this.parent}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}init(){if(!0===this.isInitialised)return;this.updateNodeSize();for(let t=0;t0){if(this._initialActiveItemIndex<0||this._initialActiveItemIndex>=e)throw new Error(`ActiveItemIndex out of range: ${this._initialActiveItemIndex} id: ${this.id}`);for(let i=0;ithis.contentItems.length)throw e-=1,new X("SAC99728");if(t instanceof jt)return e=super.addChild(t,e),this._childElementContainer.appendChild(t.element),this._header.createTab(t,e),this.setActiveComponentItem(t,i),this._header.updateTabSizes(),this.updateSize(!1),t.container.setBaseLogicalZIndex(),this._header.updateClosability(),this.emitStateChangedEvent(),e;throw new X("SACC88532")}removeChild(t,e){const i=t,n=this.contentItems.indexOf(i),o=1===this.contentItems.length;if(this._activeComponentItem===i&&(i.focused&&i.blur(),!o)){const t=0===n?1:n-1;this.setActiveComponentItem(this.contentItems[t],!1)}this._header.removeTab(i),super.removeChild(i,e),o||this._header.updateClosability(),this.emitStateChangedEvent()}toggleMaximise(){this.isMaximised?this.minimise():this.maximise()}maximise(){if(!this.isMaximised){this.layoutManager.setMaximisedStack(this);const t=this.contentItems,e=t.length;for(let i=0;i0&&void 0===t)throw new Error("expected non-empty stack to have an active component item");return{type:"stack",content:this.calculateConfigContent(),size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,isClosable:this.isClosable,maximised:this.isMaximised,header:this.createHeaderConfig(),activeItemIndex:t}}onDrop(t,e){if("header"===this._dropSegment){if(this.resetHeaderDropZone(),void 0===this._dropIndex)throw new J("SODDI68990");return void this.addChild(t,this._dropIndex)}if("body"===this._dropSegment)return void this.addChild(t,0,!0);const i="top"===this._dropSegment||"bottom"===this._dropSegment,n="left"===this._dropSegment||"right"===this._dropSegment,o="top"===this._dropSegment||"left"===this._dropSegment,s=i&&this.stackParent.isColumn||n&&this.stackParent.isRow;if(t.isComponent){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createAndInitContentItem(e,this);i.addChild(t),t=i}if(t.type===at.row||t.type===at.column){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}if(s){const e=this.stackParent.contentItems.indexOf(this);this.stackParent.addChild(t,o?e:e+1,!0),this.size*=.5,t.size=this.size,t.sizeUnit=this.sizeUnit,this.stackParent.updateSize(!1)}else{const e=i?at.column:at.row,n=ct.createDefault(e),s=this.layoutManager.createContentItem(n,this);this.stackParent.replaceChild(this,s),s.addChild(t,o?0:void 0,!0),s.addChild(this,o?void 0:0,!0),this.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}highlightDropZone(t,e){for(const i in this._contentAreaDimensions){const n=i,o=this._contentAreaDimensions[n].hoverArea;if(o.x1t&&o.y1e)return void("header"===n?(this._dropSegment="header",this.highlightHeaderDropZone(this._header.leftRightSided?e:t)):(this.resetHeaderDropZone(),this.highlightBodyDropZone(n)))}}getArea(){if("none"===this.element.style.display)return null;const t=super.getElementArea(this._header.element),e=super.getElementArea(this._childElementContainer);if(null===t||null===e)throw new K("SGAHC13086");const i=e.x2-e.x1,n=e.y2-e.y1;return this._contentAreaDimensions={header:{hoverArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2},highlightArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2}}},0===this.contentItems.length?(this._contentAreaDimensions.body={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2}},super.getElementArea(this.element)):(this._contentAreaDimensions.left={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x1+.25*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x1+.5*i,y2:e.y2}},this._contentAreaDimensions.top={hoverArea:{x1:e.x1+.25*i,y1:e.y1,x2:e.x1+.75*i,y2:e.y1+.5*n},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y1+.5*n}},this._contentAreaDimensions.right={hoverArea:{x1:e.x1+.75*i,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1+.5*i,y1:e.y1,x2:e.x2,y2:e.y2}},this._contentAreaDimensions.bottom={hoverArea:{x1:e.x1+.25*i,y1:e.y1+.5*n,x2:e.x1+.75*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1+.5*n,x2:e.x2,y2:e.y2}},super.getElementArea(this.element))}positionHeader(t){this._header.side!==t&&(this._header.setSide(t),this._headerSideChanged=!0,this.setupHeaderPosition())}updateNodeSize(){if("none"!==this.element.style.display){const t=kt(this.element);if(this._header.show){t[this._header.leftRightSided?it.width:it.height]-=this.layoutManager.layoutConfig.dimensions.headerHeight}this._childElementContainer.style.width=zt(t.width),this._childElementContainer.style.height=zt(t.height);for(let e=0;e=o&&t({...t,[e]:i});async function s(t,e){return(await Promise.all(e.map((async([e,i])=>[e,await t(i,e)])))).reduce(o,{})}n.mapEntriesAsync=s,n.mapValuesAsync=async function(t,e){let i;return i=e instanceof Map?[...e.entries()]:Object.entries(e),s(t,i)};var r,a,l,h,d=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldSet||function(t,e,i,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(t,i):o?o.value=i:e.set(t,i),i},c=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldGet||function(t,e,i,n){if("a"===i&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?n:"a"===i?n.call(t):n?n.value:e.get(t)};Object.defineProperty(i,"__esModule",{value:!0});var m=i.DefaultLayoutManager=void 0;const u=n;class p{constructor(t){a.set(this,void 0),l.set(this,new Map),d(this,a,t,"f")}size(){return c(this,l,"f").size}async applyLayoutSnapshot({layouts:t}){if(Object.keys(t).length>1)throw new Error("[LayoutManager] Tried to call applyLayoutSnapshot with more than 1 layout. When implementing multiple layouts via overridden LayoutManager class, you must override and fully implement the applyLayoutSnapshot method without calling super.applyLayoutSnapshot().");const[[e,i]]=Object.entries(t);await p.createLayout(this,{layoutName:e,layout:i})}async showLayout({layoutName:t}){}async getLayoutSnapshot(){return{layouts:await(0,u.mapValuesAsync)((t=>t.getFrameSnapshot()),c(this,l,"f"))}}async removeLayout({layoutName:t}){}getLayoutIdentityForView(t){const e=[...c(this,l,"f").values()].find((e=>e.getCurrentViews().some((e=>e.name===t.name&&e.uuid===t.uuid))));return e?.identity??void 0}isLayoutVisible({layoutName:t}){return c(p,r,"m",h).call(p,this,t).isVisible()}resolveLayoutIdentity(t){if(t&&"layoutName"in t)return t;const e=[...c(this,l,"f").values()];if(1===e.length)return e[0].identity;const i=e.find((t=>t.isVisible()));return i?.identity??void 0}static async resolveLayout(t,e){const i=t.resolveLayoutIdentity(e);if(void 0===i||!("layoutName"in i))throw new Error("[layout-manager] resolveLayout: Could not resolve the layout identity. Make sure you include 'layoutName' in the identity object.");return c(p,r,"m",h).call(p,t,i.layoutName)}static async handleSharedView(t,e,i){await(0,u.mapValuesAsync)((async t=>{if(t.identity.layoutName!==e.layoutName){const e=t.getCurrentViews().find((t=>t.name===i.name));e&&await t.onViewDetached({viewIdentity:e,target:null}).catch(console.error)}}),c(t,l,"f"))}static async handleLastViewRemoved(t,e){await t.removeLayout(e),await c(t,a,"f").handleLastViewRemoved(t)}static async destroyLayout(t,{layoutName:e}){await c(p,r,"m",h).call(p,t,e).destroy(),c(t,l,"f").delete(e)}static async createLayout(t,e){const{layoutName:i}=e;if(c(t,l,"f").has(i))throw new Error(`Layout name ${i} already exists`);await c(t,a,"f").createLayout(e,t)}static registerLayout(t,e,i){c(t,l,"f").set(e,i)}static getAllLayouts(t){return[...c(t,l,"f").values()]}static setInitialSnapshot(t,e){c(t,a,"f").setInitialSnapshot(e)}static createClosedConstructor(...t){return class extends p{constructor(){super(...t)}}}}m=i.DefaultLayoutManager=p,r=p,a=new WeakMap,l=new WeakMap,h=function(t,e){const i=c(t,l,"f").get(e);if(!i)throw new Error(`[layout-manager] getLayoutByName: Could not locate layout with name '${e}'`);return i};var g={},f={},v={};Object.defineProperty(v,"__esModule",{value:!0}),v.ReversibleMap=void 0;v.ReversibleMap=class{constructor(){this.valueToKey=new Map,this.keyToValue=new Map,this.setUnique=(t,e)=>{if(this.hasKey(t)||this.hasValue(e))throw new Error("Key or value already in the map.");this.keyToValue.set(t,e),this.valueToKey.set(e,t)},this.getKey=t=>{const e=this.valueToKey.get(t);if(!e)throw new Error("Value not found in the map.");return e},this.deleteKey=t=>{const e=this.getValue(t);return this.keyToValue.delete(t),this.valueToKey.delete(e),e},this.deleteValue=t=>{const e=this.getKey(t);return this.keyToValue.delete(e),this.valueToKey.delete(t),e},this.hasKey=t=>this.keyToValue.has(t),this.hasValue=t=>this.valueToKey.has(t)}getValue(t){const e=this.keyToValue.get(t);if(!e)throw new Error("Key not found in the map.");return e}},Object.defineProperty(f,"__esModule",{value:!0});var _=f.LayoutContentCache=void 0;const y=t.lazy,C=v;class w{constructor(){this.contentItemCache=new C.ReversibleMap,this.contentItemCacheId=0,this.createCacheKey=()=>{const t=`entity-${this.contentItemCacheId.toString()}`;return this.contentItemCacheId+=1,t},this.hasKey=t=>this.contentItemCache.hasKey(t),this.getItemOrUndefined=t=>{try{return this.getContentItemOrThrow(t)}catch(t){return}},this.getContentItemOrThrow=(t,e)=>{if(!this.contentItemCache.hasKey(t))throw new Error("Layout component has been destroyed or detached from the current layout.");const i=this.contentItemCache.getValue(t);if(e&&!e.includes(i.type))throw new Error(`Layout item is not the expected type. Expected ${e.join(", ")}, got ${i.type}.`);return i},this.getOrCreateEntityId=t=>{if(this.contentItemCache.hasValue(t))return this.contentItemCache.getKey(t);t.onDestroyed((()=>{this.contentItemCache.deleteValue(t)}));const e=this.createCacheKey();return this.contentItemCache.setUnique(e,t),e}}static getSingleInstance(){return w.singleton.getValue()}}_=f.LayoutContentCache=w,w.singleton=new y.Lazy((()=>new w));var I={},b={};!function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.getAdjacentStacks=t.doShareEdge=t.getAdjacentItem=void 0;t.getAdjacentItem=(e,i)=>{const{parent:n}=e;if(e.isRoot()||!n)return;const o=["top","bottom"].includes(i)?"column":"row",s=["top","left"].includes(i)?-1:1;if(n.type===o){const t=n.contentItems.indexOf(e)+s;if(t>=0&&t{const n=t.getBounds(),o=e.getBounds();if(!n||!o)return!1;if(["top","bottom"].includes(i)){return!(n.righto.right)}return!(n.bottomo.bottom)};t.getAdjacentStacks=(e,i)=>{const n=["top","bottom"].includes(i)?"row":"column",o=s=>"stack"===s.type?(0,t.doShareEdge)(e,s,i)?[s]:[]:"root"===s.type||"ground"===s.type?[]:s.type===n?s.contentItems.map((t=>o(t))).flat():s.type!==n?["top","right"].includes(i)?o(s.contentItems[s.contentItems.length-1]):o(s.contentItems[0]):[],s=(0,t.getAdjacentItem)(e,i);return s?o(s):[]}}(b);var S=t.commonjsGlobal&&t.commonjsGlobal.__decorate||function(t,e,i,n){var o,s=arguments.length,r=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(s<3?o(r):s>3?o(e,i,r):o(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};Object.defineProperty(I,"__esModule",{value:!0}),I.LayoutEntitiesController=void 0;const E=t.decorators,x=b,L=i;class z{constructor(t,e,i){this.wire=t,this.layoutManager=e,this.layoutContentCache=i,this.analytics=t=>{this.wire.sendAction(`layout-controller-${t}`).catch((()=>{}))},this.getLayoutIdentityForViewOrThrow=async t=>{const e=this.layoutManager.getLayoutIdentityForView(t);if(!e)throw new Error(`View identity ${t.name} is not attached to any layouts.`);return e},this.getRoot=async t=>{this.analytics("get-root");const e=(await this.getLayout(t)).getRoot();return{type:e.type,entityId:this.layoutContentCache.getOrCreateEntityId(e)}},this.getStackByView=async t=>{this.analytics("get-stack-by-view");const e=await this.getLayoutIdentityForViewOrThrow(t),i=(await this.getLayout(e)).getStackByView(t);if("stack"===i?.type)return{entityId:this.layoutContentCache.getOrCreateEntityId(i),type:"stack"}},this.getStackViews=t=>{this.analytics("get-stack-views");return this.layoutContentCache.getContentItemOrThrow(t,["stack"]).contentItems.map((t=>({name:t.viewName,uuid:this.wire.me.uuid})))},this.isRoot=t=>{this.analytics("is-root");return this.layoutContentCache.getContentItemOrThrow(t).isRoot()},this.exists=t=>(this.analytics("exists"),this.layoutContentCache.hasKey(t)),this.addViewToStack=async(t,e,{index:i}={index:0})=>{this.analytics("add-view-to-stack");const n=this.layoutContentCache.getContentItemOrThrow(t);if(i&&i>n.contentItems.length+1)throw new Error(`Index '${i}' out of range, please exclude the index or specify a number between 0 and ${n.contentItems.length}`);const o={id:t,index:i},{identity:s}=await n.layout.platformCreateView(e,{location:o});return s},this.findViewInStack=(t,e)=>t.contentItems.find((t=>t.viewName===e.name)),this.removeViewFromStack=async(t,e)=>{this.analytics("remove-view-from-stack");const i=this.layoutContentCache.getContentItemOrThrow(t,["stack"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to remove a view ('${e.name}') which does not belong to the stack.`);await n.layout.platformCloseView(e)},this.createAdjacentStack=async(t,e,{position:i="right"}={})=>{if(this.analytics("create-adjacent-stack"),!Array.isArray(e)||0===e.length)throw new Error('The parameter "views" must be an array with at least 1 element.');if(!["top","bottom","left","right"].includes(i))throw new Error(`Invalid position '${i}' specified.`);const n=this.layoutContentCache.getContentItemOrThrow(t).createAdjacentStack({position:i}),o=this.layoutContentCache.getOrCreateEntityId(n);return await Promise.all(e.reverse().map((t=>this.addViewToStack(o,t)))),o},this.getAdjacentStacks=async({targetId:t,edge:e})=>{this.analytics("get-adjacent-stacks");const i=this.layoutContentCache.getContentItemOrThrow(t);return(0,x.getAdjacentStacks)(i,e).map((t=>({entityId:this.layoutContentCache.getOrCreateEntityId(t)})))},this.setStackActiveView=async(t,e)=>{this.analytics("set-stack-active-view");const i=this.layoutContentCache.getContentItemOrThrow(t,["stack"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to set a view ('${e.name}') as active when it does not belong to the stack.`);i.setActiveContentItem(n,!0)}}async getLayout(t){const e=await L.DefaultLayoutManager.resolveLayout(this.layoutManager,t);if(!e)throw new Error(`Could not resolve target layout identity ${JSON.stringify(t)}`);return e}getContent(t){this.analytics("get-content");return this.layoutContentCache.getContentItemOrThrow(t,["column","row"]).contentItems.map((t=>({type:t.type,entityId:this.layoutContentCache.getOrCreateEntityId(t)})))}getParent(t){this.analytics("get-parent");const e=this.layoutContentCache.getContentItemOrThrow(t);if(!e.isRoot())return e.parent?.contentItems.includes(e)?{type:e.parent.type,entityId:this.layoutContentCache.getOrCreateEntityId(e.parent)}:void 0}}S([(0,E.expose)()],z.prototype,"getLayoutIdentityForViewOrThrow",void 0),S([(0,E.expose)()],z.prototype,"getRoot",void 0),S([(0,E.expose)()],z.prototype,"getStackByView",void 0),S([(0,E.expose)()],z.prototype,"getStackViews",void 0),S([(0,E.expose)()],z.prototype,"getContent",null),S([(0,E.expose)()],z.prototype,"getParent",null),S([(0,E.expose)()],z.prototype,"isRoot",void 0),S([(0,E.expose)()],z.prototype,"exists",void 0),S([(0,E.expose)()],z.prototype,"addViewToStack",void 0),S([(0,E.expose)()],z.prototype,"removeViewFromStack",void 0),S([(0,E.expose)()],z.prototype,"createAdjacentStack",void 0),S([(0,E.expose)()],z.prototype,"getAdjacentStacks",void 0),S([(0,E.expose)()],z.prototype,"setStackActiveView",void 0),I.LayoutEntitiesController=z,Object.defineProperty(g,"__esModule",{value:!0});var M=g.initLayoutEndpoints=void 0;const P=t.apiExposer,T=t.layout_constants,A=f,k=I,D=i;M=g.initLayoutEndpoints=async function(t,e){const i=t.getFin(),n=await i.Platform.getCurrentSync().getClient(),o=new P.ChannelsExposer(n);await new P.ApiExposer(o).exposeInstance(new k.LayoutEntitiesController(t,e,A.LayoutContentCache.getSingleInstance()),{id:T.LAYOUT_CONTROLLER_ID}),await async function(t,e){const i=t=>async i=>{const n=await D.DefaultLayoutManager.resolveLayout(e,i.target);if(!n)throw new Error(`Could not resolve the layout target from payload ${JSON.stringify(i)}`);return t(n,i)},n=(e,n)=>{t.register(e,i(n))},o=(t,e)=>{n(t,e)};n("replace-view",((t,e)=>t.replaceView(e))),n("replace-layout",((t,{layout:e})=>t.replaceLayout(e))),n("add-view",((t,e)=>t.insertView(e))),o("layout-add-view",((t,{viewOptions:e,location:i,targetView:n})=>t.platformCreateView(e,{location:i,targetView:n}))),n("close-view",((t,e)=>t.cleanupView(e.viewIdentity))),o("layout-close-view",((t,e)=>t.platformCloseView(e.viewIdentity))),n("apply-preset-layout",((t,e)=>t.applyPreset(e))),n("get-layout-views",(t=>t.getCurrentViews())),n("get-frame-snapshot",(t=>t.getFrameSnapshot())),n("is-visible",(t=>t.isVisible())),n("destroy",(t=>t.destroy())),t.register("get-layout-snapshot",(()=>e.getLayoutSnapshot()))}(n,e)};var R={};Object.defineProperty(R,"__esModule",{value:!0});var U=R.BaseLayout=void 0;U=R.BaseLayout=class{};var O={};Object.defineProperty(O,"__esModule",{value:!0});var V=O.DOMEmitter=void 0;V=O.DOMEmitter=class{constructor(t){this.container=t}dispatchLocalEvent(t,e){const i={...e,type:t,tabSelector:`tab-${e.name}`,containerSelector:`container-${e.name}`,topic:"openfin-DOM-event"};this.container.dispatchEvent(new CustomEvent(t,{detail:i}))}};var B={};Object.defineProperty(B,"__esModule",{value:!0});var H=B.mapLayoutContentItemsImmutableSync=B.mapLayoutContentItemsImmutable=W=B.isVisible=void 0;var W=B.isVisible=t=>(0!==t.offsetWidth||0!==t.offsetHeight)&&"hidden"!==window.getComputedStyle(t).visibility&&t.offsetTop>=0&&t.offsetLeft>=0&&t.offsetTop<=window.innerHeight&&t.offsetLeft<=window.innerWidth;const F=t=>"type"in t&&"component"===t.type;B.mapLayoutContentItemsImmutable=async function t(e,i){return F(i)?e(i):{...i,content:await Promise.all(i.content?.map((i=>t(e,i))))}},H=B.mapLayoutContentItemsImmutableSync=function t(e,i){return F(i)?e(i):{...i,content:i.content?.map((i=>t(e,i)))}};class N extends Error{constructor(t,e){super(e),this.type=t}}class G extends N{constructor(t,e){super("Configuration",t),this.node=e}}class j extends N{constructor(t){super("PopoutBlocked",t)}}class $ extends N{constructor(t){super("API",t)}}class Z extends N{constructor(t){super("Bind",t)}}class q extends Error{constructor(t,e,i){super(`${t}: ${e}${void 0===i?"":": "+i}`)}}class X extends q{constructor(t,e){super("Assert",t,e)}}class Y extends q{constructor(t,e,i){super("UnreachableCase",t,`${e}${void 0===i?"":": "+i}`)}}class K extends q{constructor(t,e){super("UnexpectedNull",t,e)}}class J extends q{constructor(t,e){super("UnexpectedUndefined",t,e)}}var Q;!function(t){let e=!1;const i={PopoutCannotBeCreatedWithGroundItemConfig:{id:0,default:"Popout cannot be created with ground ItemConfig"},PleaseRegisterAConstructorFunction:{id:1,default:"Please register a constructor function"},ComponentTypeNotRegisteredAndBindComponentEventHandlerNotAssigned:{id:2,default:"Component type not registered and BindComponentEvent handler not assigned"},ComponentIsAlreadyRegistered:{id:3,default:"Component is already registered"},ComponentIsNotVirtuable:{id:4,default:"Component is not virtuable. Requires rootHtmlElement field/getter"},VirtualComponentDoesNotHaveRootHtmlElement:{id:5,default:'Virtual component does not have getter "rootHtmlElement"'},ItemConfigIsNotTypeComponent:{id:6,default:"ItemConfig is not of type component"},InvalidNumberPartInSizeString:{id:7,default:"Invalid number part in size string"},UnknownUnitInSizeString:{id:8,default:"Unknown unit in size string"},UnsupportedUnitInSizeString:{id:9,default:"Unsupported unit in size string"}};t.idCount=Object.keys(i).length;const n=Object.values(i);t.checkInitialise=function(){if(!e)for(let e=0;e="0"&&t<="9"}function Tt(t,e){const i=zt(e);t.style.width=i}function At(t,e){const i=zt(e);t.style.height=i}function kt(t){return{width:t.offsetWidth,height:t.offsetHeight}}function Dt(t,e){t.style.display=e?"":"none"}function Rt(t,e){if(void 0!==e)for(const i in e)if(e.hasOwnProperty(i)){const n=e[i],o=t[i];t[i]=Ut(o,n)}return t}function Ut(t,e){if("object"!=typeof e)return e;if(Array.isArray(e)){const t=e.length,i=new Array(t);for(let n=0;n36)throw new Error("Too many keys in config minifier map")},t.translateObject=n}(dt||(dt={})),function(t){t.defaults={type:at.ground,content:[],size:1,sizeUnit:ht.Fractional,minSize:void 0,minSizeUnit:ht.Pixel,id:"",isClosable:!0},t.createCopy=function(t,e){switch(t.type){case at.ground:case at.row:case at.column:return gt.createCopy(t,e);case at.stack:return ut.createCopy(t,e);case at.component:return pt.createCopy(t);default:throw new Y("CICC91354",t.type,"Invalid Config Item type specified")}},t.createDefault=function(t){switch(t){case at.ground:throw new X("CICCDR91562");case at.row:case at.column:return gt.createDefault(t);case at.stack:return ut.createDefault();case at.component:return pt.createDefault();default:throw new Y("CICCDD91563",t,"Invalid Config Item type specified")}},t.isComponentItem=function(t){return t.type===at.component},t.isStackItem=function(t){return t.type===at.stack},t.isGroundItem=function(t){return t.type===at.ground}}(ct||(ct={})),function(t){t.defaultMaximised=!1,function(t){t.createCopy=function(t,e){return void 0===t?void 0:{show:null!=e?e:t.show,popout:t.popout,close:t.close,maximise:t.maximise,minimise:t.minimise,tabDropdown:t.tabDropdown}}}(t.Header||(t.Header={}))}(mt||(mt={})),function(t){function e(t){const e=t.length,i=new Array(e);for(let n=0;n"__glMaximised"===t));t>0&&(o=!0,n=n.splice(t,1)),e=n.length>0?n[0]:ct.defaults.id}else e=n;return i=void 0!==t.maximised?t.maximised:o,{id:e,maximised:i}}}(wt||(wt={})),function(t){function e(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0;return{resolved:!0,root:Et.resolve(i),openPopouts:t.resolveOpenPopouts(e.openPopouts),dimensions:t.Dimensions.resolve(e.dimensions),settings:t.Settings.resolve(e.settings),header:t.Header.resolve(e.header,e.settings,e.labels)}}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:Lt.fromResolvedArray(e.openPopouts),settings:_t.Settings.createCopy(e.settings),dimensions:t.Dimensions.fromResolved(e.dimensions),header:_t.Header.createCopy(e.header)}},t.isResolved=function(t){const e=t;return void 0!==e.resolved&&!0===e.resolved},t.resolveOpenPopouts=function(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0,{root:Et.resolve(o),openPopouts:xt.resolveOpenPopouts(e.openPopouts),dimensions:xt.Dimensions.resolve(e.dimensions),settings:xt.Settings.resolve(e.settings),header:xt.Header.resolve(e.header,e.settings,e.labels),parentId:null!==(i=e.parentId)&&void 0!==i?i:null,indexInParent:null!==(n=e.indexInParent)&&void 0!==n?n:null,window:t.Window.resolve(e.window,e.dimensions),resolved:!0}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:i(e.openPopouts),dimensions:xt.Dimensions.fromResolved(e.dimensions),settings:_t.Settings.createCopy(e.settings),header:_t.Header.createCopy(e.header),parentId:e.parentId,indexInParent:e.indexInParent,window:t.Window.fromResolved(e.window)}},t.fromResolvedArray=i}(Lt||(Lt={}));class Wt{constructor(){this._allEventSubscriptions=[],this._subscriptionsMap=new Map,this.unbind=this.removeEventListener,this.trigger=this.emit}tryBubbleEvent(t,e){}emit(t,...e){let i=this._subscriptionsMap.get(t);if(void 0!==i){i=i.slice();for(let t=0;t0){const n=e.slice();n.unshift(t);const o=this._allEventSubscriptions.slice();for(let t=0;t0?n.contentItems[0]:n,e=0);const o=this._layoutManager.createAndInitContentItem(i,t);t.addChild(o,e),this._layoutManager.layoutConfig.settings.popInOnClose?this._onClose():this.close()}createWindow(){const t=this.createUrl(),e=Math.floor(1e6*Math.random()).toString(36),i=this.serializeWindowFeatures({width:this._initialWindowSize.width,height:this._initialWindowSize.height,innerWidth:this._initialWindowSize.width,innerHeight:this._initialWindowSize.height,menubar:"no",toolbar:"no",location:"no",personalbar:"no",resizable:"yes",scrollbars:"no",status:"no"});if(this._popoutWindow=globalThis.open(t,e,i),this._popoutWindow)this._popoutWindow.addEventListener("load",(()=>this.positionWindow()),{passive:!0}),this._popoutWindow.addEventListener("beforeunload",(()=>{this._layoutManager.layoutConfig.settings.popInOnClose?this.popIn():this._onClose()}),{passive:!0}),this._checkReadyInterval=setInterval((()=>this.checkReady()),10);else if(!0===this._layoutManager.layoutConfig.settings.blockedPopoutsThrowError){throw new j("Popout blocked")}}checkReady(){if(null===this._popoutWindow)throw new K("BPCR01844");this._popoutWindow.__glInstance&&this._popoutWindow.__glInstance.isInitialised&&(this.onInitialised(),void 0!==this._checkReadyInterval&&(clearInterval(this._checkReadyInterval),this._checkReadyInterval=void 0))}serializeWindowFeatures(t){const e=[];for(const i in t)e.push(i+"="+t[i].toString());return e.join(",")}createUrl(){const t="gl-window-config-"+Ot(),e=_t.minifyConfig(this._config);try{localStorage.setItem(t,JSON.stringify(e))}catch(t){throw new Error("Error while writing to localStorage "+function(t){return t instanceof Error?t.message:"string"==typeof t?t:"Unknown Error"}(t))}const i=new URL(location.href);return i.searchParams.set("gl-window",t),i.toString()}positionWindow(){if(null===this._popoutWindow)throw new Error("BrowserPopout.positionWindow: null popoutWindow");this._popoutWindow.moveTo(this._initialWindowSize.left,this._initialWindowSize.top),this._popoutWindow.focus()}onInitialised(){this._isInitialised=!0,this.getGlInstance().on("popIn",(()=>this.popIn())),this.emit("initialised")}_onClose(){setTimeout((()=>this.emit("closed")),50)}}class Gt extends Wt{constructor(t,e,i,n){super(),this.layoutManager=t,this._parent=i,this._element=n,this._popInParentIds=[],this._type=e.type,this._id=e.id,this._isInitialised=!1,this.isGround=!1,this.isRow=!1,this.isColumn=!1,this.isStack=!1,this.isComponent=!1,this.size=e.size,this.sizeUnit=e.sizeUnit,this.minSize=e.minSize,this.minSizeUnit=e.minSizeUnit,this._isClosable=e.isClosable,this._pendingEventPropagations={},this._throttledEvents=["stateChanged"],this._contentItems=this.createContentItems(e.content)}get type(){return this._type}get id(){return this._id}set id(t){this._id=t}get popInParentIds(){return this._popInParentIds}get parent(){return this._parent}get contentItems(){return this._contentItems}get isClosable(){return this._isClosable}get element(){return this._element}get isInitialised(){return this._isInitialised}static isStack(t){return t.isStack}static isComponentItem(t){return t.isComponent}static isComponentParentableItem(t){return t.isStack||t.isGround}removeChild(t,e=!1){const i=this._contentItems.indexOf(t);if(-1===i)throw new Error("Can't remove child item. Unknown content item");if(e||this._contentItems[i].destroy(),this._contentItems.splice(i,1),this._contentItems.length>0)this.updateSize(!1);else if(!this.isGround&&!0===this._isClosable){if(null===this._parent)throw new K("CIUC00874");this._parent.removeChild(this)}}addChild(t,e,i){return null!=e||(e=this._contentItems.length),this._contentItems.splice(e,0,t),t.setParent(this),!0===this._isInitialised&&!1===t._isInitialised&&t.init(),e}replaceChild(t,e,i=!1){const n=this._contentItems.indexOf(t),o=t._element.parentNode;if(-1===n)throw new X("CIRCI23232","Can't replace child. oldChild is not child of this");if(null===o)throw new K("CIRCP23232");if(o.replaceChild(e._element,t._element),!0===i&&(t._parent=null,t.destroy()),this._contentItems[n]=e,e.setParent(this),e.size=t.size,e.sizeUnit=t.sizeUnit,e.minSize=t.minSize,e.minSizeUnit=t.minSizeUnit,null===e._parent)throw new K("CIRCNC45699");!0===e._parent._isInitialised&&!1===e._isInitialised&&e.init(),this.updateSize(!1)}remove(){if(null===this._parent)throw new K("CIR11110");this._parent.removeChild(this)}popout(){const t=Ot(),e=this.layoutManager.createPopoutFromContentItem(this,void 0,t,void 0);return this.emitBaseBubblingEvent("stateChanged"),e}calculateConfigContent(){const t=this._contentItems,e=t.length,i=new Array(e);for(let n=0;nthis.propagateEventToLayoutManager(t,e))))}propagateEventToLayoutManager(t,e){this._pendingEventPropagations[t]=!1,this.layoutManager.emitUnknown(t,e)}}class jt extends Gt{constructor(t,e,i){super(t,e,i,document.createElement("div")),this._parentItem=i,this._focused=!1,this.isComponent=!0,this._reorderEnabled=e.reorderEnabled,this.applyUpdatableConfig(e),this._initialWantMaximise=e.maximised;const n=document.createElement("div");n.classList.add("lm_content"),this.element.appendChild(n),this._container=new Ft(e,this,t,n,(t=>this.handleUpdateItemConfigEvent(t)),(()=>this.show()),(()=>this.hide()),(t=>this.focus(t)),(t=>this.blur(t)))}get componentName(){return this._container.componentType}get componentType(){return this._container.componentType}get reorderEnabled(){return this._reorderEnabled}get initialWantMaximise(){return this._initialWantMaximise}get component(){return this._container.component}get container(){return this._container}get parentItem(){return this._parentItem}get headerConfig(){return this._headerConfig}get title(){return this._title}get tab(){return this._tab}get focused(){return this._focused}destroy(){this._container.destroy(),super.destroy()}applyUpdatableConfig(t){this.setTitle(t.title),this._headerConfig=t.header}toConfig(){const t=this._container.stateRequestEvent,e=void 0===t?this._container.state:t();return{type:at.component,content:[],size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,maximised:!1,isClosable:this.isClosable,reorderEnabled:this._reorderEnabled,title:this._title,header:mt.Header.createCopy(this._headerConfig),componentType:pt.copyComponentType(this.componentType),componentState:e}}close(){if(null===this.parent)throw new K("CIC68883");this.parent.removeChild(this,!1)}enterDragMode(t,e){Tt(this.element,t),At(this.element,e),this._container.enterDragMode(t,e)}exitDragMode(){this._container.exitDragMode()}enterStackMaximised(){this._container.enterStackMaximised()}exitStackMaximised(){this._container.exitStackMaximised()}drag(){this._container.drag()}updateSize(t){this.updateNodeSize(t)}init(){this.updateNodeSize(!1),super.init(),this._container.emit("open"),this.initContentItems()}setTitle(t){this._title=t,this.emit("titleChanged",t),this.emit("stateChanged")}setTab(t){this._tab=t,this.emit("tab",t),this._container.setTab(t)}hide(){super.hide(),this._container.setVisibility(!1)}show(){super.show(),this._container.setVisibility(!0)}focus(t=!1){this.parentItem.setActiveComponentItem(this,!0,t)}setFocused(t){this._focused=!0,this.tab.setFocused(),t||this.emitBaseBubblingEvent("focus")}blur(t=!1){this._focused&&this.layoutManager.setFocusedComponentItem(void 0,t)}setBlurred(t){this._focused=!1,this.tab.setBlurred(),t||this.emitBaseBubblingEvent("blur")}setParent(t){this._parentItem=t,super.setParent(t)}handleUpdateItemConfigEvent(t){this.applyUpdatableConfig(t)}updateNodeSize(t){if("none"!==this.element.style.display){const{width:e,height:i}=kt(this.element);this._container.setSizeToNodeSize(e,i,t)}}}class $t extends Gt{constructor(){super(...arguments),this._focused=!1}get focused(){return this._focused}setFocusedValue(t){this._focused=t}}class Zt extends Wt{constructor(t,e){super(),this._eElement=t,this._pointerTracking=!1,this._pointerDownEventListener=t=>this.onPointerDown(t),this._pointerMoveEventListener=t=>this.onPointerMove(t),this._pointerUpEventListener=t=>this.onPointerUp(t),this._timeout=void 0,this._allowableTargets=[t,...e],this._oDocument=document,this._eBody=document.body,this._nDelay=1800,this._nDistance=10,this._nX=0,this._nY=0,this._nOriginalX=0,this._nOriginalY=0,this._dragging=!1,this._eElement.addEventListener("pointerdown",this._pointerDownEventListener,{passive:!0})}destroy(){this.checkRemovePointerTrackingEventListeners(),this._eElement.removeEventListener("pointerdown",this._pointerDownEventListener)}cancelDrag(){this.processDragStop(void 0)}onPointerDown(t){if(this._allowableTargets.includes(t.target)&&t.isPrimary){const e=this.getPointerCoordinates(t);this.processPointerDown(e)}}processPointerDown(t){this._nOriginalX=t.x,this._nOriginalY=t.y,this._oDocument.addEventListener("pointermove",this._pointerMoveEventListener),this._oDocument.addEventListener("pointerup",this._pointerUpEventListener,{passive:!0}),this._pointerTracking=!0,this._timeout=setTimeout((()=>{try{this.startDrag()}catch(t){throw console.error(t),t}}),this._nDelay)}onPointerMove(t){this._pointerTracking&&(this.processDragMove(t),t.preventDefault())}processDragMove(t){this._nX=t.pageX-this._nOriginalX,this._nY=t.pageY-this._nOriginalY,!1===this._dragging&&(Math.abs(this._nX)>this._nDistance||Math.abs(this._nY)>this._nDistance)&&this.startDrag(),this._dragging&&this.emit("drag",this._nX,this._nY,t)}onPointerUp(t){this.processDragStop(t)}processDragStop(t){var e;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this.checkRemovePointerTrackingEventListeners(),!0===this._dragging&&(this._eBody.classList.remove("lm_dragging"),this._eElement.classList.remove("lm_dragging"),null===(e=this._oDocument.querySelector("iframe"))||void 0===e||e.style.setProperty("pointer-events",""),this._dragging=!1,this.emit("dragStop",t))}checkRemovePointerTrackingEventListeners(){this._pointerTracking&&(this._oDocument.removeEventListener("pointermove",this._pointerMoveEventListener),this._oDocument.removeEventListener("pointerup",this._pointerUpEventListener),this._pointerTracking=!1)}startDrag(){var t;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this._dragging=!0,this._eBody.classList.add("lm_dragging"),this._eElement.classList.add("lm_dragging"),null===(t=this._oDocument.querySelector("iframe"))||void 0===t||t.style.setProperty("pointer-events","none"),this.emit("dragStart",this._nOriginalX,this._nOriginalY)}getPointerCoordinates(t){return{x:t.pageX,y:t.pageY}}}class qt{constructor(t,e,i){this._isVertical=t,this._size=e,this._grabSize=i0){const i=this.createSplitter(Math.max(0,e-1)).element;e>0?(this.contentItems[e-1].element.insertAdjacentElement("afterend",i),i.insertAdjacentElement("afterend",t.element)):(this.contentItems[0].element.insertAdjacentElement("beforebegin",i),i.insertAdjacentElement("beforebegin",t.element))}else this._childElementContainer.appendChild(t.element);super.addChild(t,e);const n=1/this.contentItems.length*100;if(!0===i)return this.emitBaseBubblingEvent("stateChanged"),e;for(let e=0;e0&&(this.calculateRelativeSizes(),this.setAbsoluteSizes()),this.emitBaseBubblingEvent("stateChanged"),this.emit("resize")}setAbsoluteSizes(){const t=this.calculateAbsoluteSizes();for(let e=0;e0&&t.itemSizes[e]++,this._isColumn?(Tt(this.contentItems[e].element,t.crossAxisSize),At(this.contentItems[e].element,t.itemSizes[e])):(Tt(this.contentItems[e].element,t.itemSizes[e]),At(this.contentItems[e].element,t.crossAxisSize))}calculateAbsoluteSizes(){const t=(this.contentItems.length-1)*this._splitterSize,{width:e,height:i}=kt(this.element);let n,o;this._isColumn?(n=i-t,o=e):(n=e-t,o=i);let s=0;const r=[];for(let t=0;t0){const n=100-t;for(let t=0;t100&&e.length>0){for(let t=0;te)return;{const r=i/e;let a=i;for(let e=0;ethis.onSplitterDrag(e,t,i))),e.on("dragStop",(()=>this.onSplitterDragStop(e))),e.on("dragStart",(()=>this.onSplitterDragStart(e))),this._splitter.splice(t,0,e),e}getSplitItems(t){const e=this._splitter.indexOf(t);return{before:this.contentItems[e],after:this.contentItems[e+1]}}calculateContentItemMinSize(t){const e=t.minSize;if(void 0!==e){if(t.minSizeUnit===ht.Pixel)return e;throw new X("ROCGMD98831",JSON.stringify(t))}{const t=this.layoutManager.layoutConfig.dimensions;return this._isColumn?t.defaultMinItemHeight:t.defaultMinItemWidth}}calculateContentItemsTotalMinSize(t){let e=0;for(const i of t)e+=this.calculateContentItemMinSize(i);return e}onSplitterDragStart(t){const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=this.calculateContentItemsTotalMinSize(e.before.contentItems),s=this.calculateContentItemsTotalMinSize(e.after.contentItems);this._splitterPosition=0,this._splitterMinPosition=-1*(i-o),this._splitterMaxPosition=n-s}onSplitterDrag(t,e,i){let n=this._isColumn?i:e;if(null===this._splitterMinPosition||null===this._splitterMaxPosition)throw new K("ROCOSD59226");n=Math.max(n,this._splitterMinPosition),n=Math.min(n,this._splitterMaxPosition),this._splitterPosition=n;const o=zt(n);this._isColumn?t.element.style.top=o:t.element.style.left=o}onSplitterDragStop(t){if(null===this._splitterPosition)throw new K("ROCOSDS66932");{const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=(this._splitterPosition+i)/(i+n),s=e.before.size+e.after.size;e.before.size=o*s,e.after.size=(1-o)*s,t.element.style.top=zt(0),t.element.style.left=zt(0),globalThis.requestAnimationFrame((()=>this.updateSize(!1)))}}}!function(t){t.getElementDimensionSize=function(t,e){return"width"===e?function(t){return t.offsetWidth}(t):function(t){return t.offsetHeight}(t)},t.setElementDimensionSize=function(t,e,i){return"width"===e?Tt(t,i):At(t,i)},t.createElement=function(t,e){const i=t.createElement("div");return i.classList.add("lm_item"),e?i.classList.add("lm_column"):i.classList.add("lm_row"),i}}(Xt||(Xt={}));class Yt extends $t{constructor(t,e,i){super(t,vt.create(e),null,Yt.createElement(document)),this.isGround=!0,this._childElementContainer=this.element,this._containerElement=i;let n=null;for(;;){const t=n?n.previousSibling:this._containerElement.lastChild;if(!(t instanceof Element&&t.classList.contains("lm_content")))break;n=t}this._containerElement.insertBefore(this.element,n)}init(){if(!0!==this.isInitialised){this.updateNodeSize();for(let t=0;t0?this.contentItems[0]:this,n.isComponent)throw new Error("Cannot add item as child to ComponentItem");{const t=this.layoutManager.createAndInitContentItem(i,n);return e=n.addChild(t,e),n===this?-1:e}}loadComponentAsRoot(t){this.clearRoot();const e=Ct.resolve(t,!1);if(e.maximised)throw new Error("Root Component cannot be maximised");{const t=new jt(this.layoutManager,e,this);t.init(),this.addChild(t,0)}}addChild(t,e){if(this.contentItems.length>0)throw new Error("Ground node can only have a single child");return this._childElementContainer.appendChild(t.element),e=super.addChild(t,e),this.updateSize(!1),this.emitBaseBubblingEvent("stateChanged"),e}calculateConfigContent(){const t=this.contentItems,e=t.length,i=new Array(e);for(let n=0;n0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e)),this.updateContentItemsSize(!1))}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}createSideAreas(){const t=Yt.Area.oppositeSides,e=new Array(Object.keys(t).length);let i=0;for(const n in t){const o=n,s=this.getElementArea();if(null===s)throw new K("RCSA77553");s.side=o,"2"===t[o][1]?s[o]=s[t[o]]-50:s[o]=s[t[o]]+50,s.surface=(s.x2-s.x1)*(s.y2-s.y1),e[i++]=s}return e}highlightDropZone(t,e,i){this.layoutManager.tabDropPlaceholder.remove(),super.highlightDropZone(t,e,i)}onDrop(t,e){if(t.isComponent){const e=ut.createDefault(),i=t;e.header=mt.Header.createCopy(i.headerConfig);const n=this.layoutManager.createAndInitContentItem(e,this);n.addChild(t),t=n}if(0===this.contentItems.length)this.addChild(t);else{if(t.type===at.row||t.type===at.column){const e=ut.createDefault(),i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}const i="x"==e.side[0]?at.row:at.column,n="2"==e.side[1],o=this.contentItems[0];if(o instanceof Xt&&o.type===i){const e=o.contentItems[n?0:o.contentItems.length-1];o.addChild(t,n?0:void 0,!0),e.size*=.5,t.size=e.size,t.sizeUnit=ht.Percent,o.updateSize(!1)}else{const e=ct.createDefault(i),s=this.layoutManager.createContentItem(e,this);this.replaceChild(o,s),s.addChild(t,n?0:void 0,!0),s.addChild(o,n?void 0:0,!0),o.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}}dock(){throw new X("GID87731")}validateDocking(){throw new X("GIVD87732")}getAllContentItems(){const t=[this];return this.deepGetAllContentItems(this.contentItems,t),t}getConfigMaximisedItems(){const t=[];return this.deepFilterContentItems(this.contentItems,t,(t=>!(!Gt.isStack(t)||!t.initialWantMaximise)||!(!Gt.isComponentItem(t)||!t.initialWantMaximise))),t}getItemsByPopInParentId(t){const e=[];return this.deepFilterContentItems(this.contentItems,e,(e=>e.popInParentIds.includes(t))),e}toConfig(){throw new Error("Cannot generate GroundItem config")}setActiveComponentItem(t,e,i){}updateNodeSize(){const{width:t,height:e}=kt(this._containerElement);Tt(this.element,t),At(this.element,e),this.contentItems.length>0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e))}deepGetAllContentItems(t,e){for(let i=0;ithis.onClick(t),this._touchStartEventListener=t=>this.onTouchStart(t),this._element=document.createElement("div"),this._element.classList.add(i),this._element.title=e,this._header.on("destroy",(()=>this.destroy())),this._element.addEventListener("click",this._clickEventListener,{passive:!0}),this._element.addEventListener("touchstart",this._touchStartEventListener,{passive:!0}),this._header.controlsContainerElement.appendChild(this._element)}get element(){return this._element}destroy(){var t;this._element.removeEventListener("click",this._clickEventListener),this._element.removeEventListener("touchstart",this._touchStartEventListener),null===(t=this._element.parentNode)||void 0===t||t.removeChild(this._element)}onClick(t){this._pushEvent(t)}onTouchStart(t){this._pushEvent(t)}}class Jt{constructor(t,e,i,n,o){var s;this._layoutManager=t,this._componentItem=e,this._closeEvent=i,this._focusEvent=n,this._dragStartEvent=o,this._isActive=!1,this._tabClickListener=t=>this.onTabClickDown(t),this._tabTouchStartListener=t=>this.onTabTouchStart(t),this._closeClickListener=()=>this.onCloseClick(),this._closeTouchStartListener=()=>this.onCloseTouchStart(),this._dragStartListener=(t,e)=>this.onDragStart(t,e),this._contentItemDestroyListener=()=>this.onContentItemDestroy(),this._tabTitleChangedListener=t=>this.setTitle(t),this._element=document.createElement("div"),this._element.classList.add("lm_tab"),this._titleElement=document.createElement("span"),this._titleElement.classList.add("lm_title"),this._closeElement=document.createElement("div"),this._closeElement.classList.add("lm_close_tab"),this._element.appendChild(this._titleElement),this._element.appendChild(this._closeElement),e.isClosable?this._closeElement.style.display="":this._closeElement.style.display="none",this.setTitle(e.title),this._componentItem.on("titleChanged",this._tabTitleChangedListener);(null!==(s=e.reorderEnabled)&&void 0!==s?s:this._layoutManager.layoutConfig.settings.reorderEnabled)&&this.enableReorder(),this._element.addEventListener("click",this._tabClickListener,{passive:!0}),this._element.addEventListener("touchstart",this._tabTouchStartListener,{passive:!0}),this._componentItem.isClosable?(this._closeElement.addEventListener("click",this._closeClickListener,{passive:!0}),this._closeElement.addEventListener("touchstart",this._closeTouchStartListener,{passive:!0})):(this._closeElement.remove(),this._closeElement=void 0),this._componentItem.setTab(this),this._layoutManager.emit("tabCreated",this)}get isActive(){return this._isActive}get componentItem(){return this._componentItem}get contentItem(){return this._componentItem}get element(){return this._element}get titleElement(){return this._titleElement}get closeElement(){return this._closeElement}get reorderEnabled(){return void 0!==this._dragListener}set reorderEnabled(t){t!==this.reorderEnabled&&(t?this.enableReorder():this.disableReorder())}setTitle(t){this._titleElement.innerText=t,this._element.title=t}setActive(t){t!==this._isActive&&(this._isActive=t,t?this._element.classList.add("lm_active"):this._element.classList.remove("lm_active"))}destroy(){var t,e;this._closeEvent=void 0,this._focusEvent=void 0,this._dragStartEvent=void 0,this._element.removeEventListener("click",this._tabClickListener),this._element.removeEventListener("touchstart",this._tabTouchStartListener),null===(t=this._closeElement)||void 0===t||t.removeEventListener("click",this._closeClickListener),null===(e=this._closeElement)||void 0===e||e.removeEventListener("touchstart",this._closeTouchStartListener),this._componentItem.off("titleChanged",this._tabTitleChangedListener),this.reorderEnabled&&this.disableReorder(),this._element.remove()}setBlurred(){this._element.classList.remove("lm_focused"),this._titleElement.classList.remove("lm_focused")}setFocused(){this._element.classList.add("lm_focused"),this._titleElement.classList.add("lm_focused")}onDragStart(t,e){if(void 0===this._dragListener)throw new J("TODSDLU10093");if(void 0===this._dragStartEvent)throw new J("TODS23309");this._dragStartEvent(t,e,this._dragListener,this.componentItem)}onContentItemDestroy(){void 0!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=void 0)}onTabClickDown(t){const e=t.target;e!==this._element&&e!==this._titleElement||(0===t.button?this.notifyFocus():1===t.button&&this._componentItem.isClosable&&this.notifyClose())}onTabTouchStart(t){t.target===this._element&&this.notifyFocus()}onCloseClick(){this.notifyClose()}onCloseTouchStart(){this.notifyClose()}notifyClose(){if(void 0===this._closeEvent)throw new J("TNC15007");this._closeEvent(this._componentItem)}notifyFocus(){if(void 0===this._focusEvent)throw new J("TNA15007");this._focusEvent(this._componentItem)}enableReorder(){this._dragListener=new Zt(this._element,[this._titleElement]),this._dragListener.on("dragStart",this._dragStartListener),this._componentItem.on("destroy",this._contentItemDestroyListener)}disableReorder(){if(void 0===this._dragListener)throw new J("TDR87745");this._componentItem.off("destroy",this._contentItemDestroyListener),this._dragListener.off("dragStart",this._dragStartListener),this._dragListener=void 0}}class Qt{constructor(t,e,i,n,o){this._layoutManager=t,this._componentRemoveEvent=e,this._componentFocusEvent=i,this._componentDragStartEvent=n,this._dropdownActiveChangedEvent=o,this._tabs=[],this._lastVisibleTabIndex=-1,this._dropdownActive=!1,this._element=document.createElement("section"),this._element.classList.add("lm_tabs"),this._dropdownElement=document.createElement("section"),this._dropdownElement.classList.add("lm_tabdropdown_list"),this._dropdownElement.style.display="none"}get tabs(){return this._tabs}get tabCount(){return this._tabs.length}get lastVisibleTabIndex(){return this._lastVisibleTabIndex}get element(){return this._element}get dropdownElement(){return this._dropdownElement}get dropdownActive(){return this._dropdownActive}destroy(){for(let t=0;tthis.handleTabCloseEvent(t)),(t=>this.handleTabFocusEvent(t)),((t,e,i,n)=>this.handleTabDragStartEvent(t,e,i,n)));void 0===e&&(e=this._tabs.length),this._tabs.splice(e,0,i),ethis._lastVisibleTabIndex){const t=this._tabs[e];for(let t=e;t>0;t--)this._tabs[t]=this._tabs[t-1];this._tabs[0]=t}}updateTabSizes(t,e){let i=!1;this.tryUpdateTabSizes(i,t,e)||(i=!0,this.tryUpdateTabSizes(i,t,e)),i!==this._dropdownActive&&(this._dropdownActive=i,this._dropdownActiveChangedEvent())}tryUpdateTabSizes(t,e,i){if(this._tabs.length>0){if(void 0===i)throw new Error("non-empty tabs must have active component item");let n=0,o=!1;const s=this._layoutManager.layoutConfig.settings.tabOverlapAllowance,r=this._tabs.indexOf(i.tab),a=this._tabs[r];this._lastVisibleTabIndex=-1;for(let i=0;ie){if(o)i===r&&(l.style.zIndex="auto",l.style.marginLeft="",l.parentElement!==this._element&&this._element.appendChild(l));else{let t;if(t=r>0&&r<=i?(d-e)/(i-1):(d-e)/i,tthis.onClick(t),this._touchStartListener=t=>this.onTouchStart(t),this._rowColumnClosable=!0,this._closeButton=null,this._popoutButton=null,this._tabsContainer=new Qt(this._layoutManager,(t=>this.handleTabInitiatedComponentRemoveEvent(t)),(t=>this.handleTabInitiatedComponentFocusEvent(t)),((t,e,i,n)=>this.handleTabInitiatedDragStartEvent(t,e,i,n)),(()=>this.processTabDropdownActiveChanged())),this._show=i.show,this._popoutEnabled=i.popoutEnabled,this._popoutLabel=i.popoutLabel,this._maximiseEnabled=i.maximiseEnabled,this._maximiseLabel=i.maximiseLabel,this._minimiseEnabled=i.minimiseEnabled,this._minimiseLabel=i.minimiseLabel,this._closeEnabled=i.closeEnabled,this._closeLabel=i.closeLabel,this._tabDropdownEnabled=i.tabDropdownEnabled,this._tabDropdownLabel=i.tabDropdownLabel,this.setSide(i.side),this._canRemoveComponent=this._configClosable,this._element=document.createElement("section"),this._element.classList.add("lm_header"),this._controlsContainerElement=document.createElement("section"),this._controlsContainerElement.classList.add("lm_controls"),this._element.appendChild(this._tabsContainer.element),this._element.appendChild(this._controlsContainerElement),this._element.appendChild(this._tabsContainer.dropdownElement),this._element.addEventListener("click",this._clickListener,{passive:!0}),this._element.addEventListener("touchstart",this._touchStartListener,{passive:!0}),this._documentMouseUpListener=()=>this._tabsContainer.hideAdditionalTabsDropdown(),globalThis.document.addEventListener("mouseup",this._documentMouseUpListener,{passive:!0}),this._tabControlOffset=this._layoutManager.layoutConfig.settings.tabControlOffset,this._tabDropdownEnabled&&(this._tabDropdownButton=new Kt(this,this._tabDropdownLabel,"lm_tabdropdown",(()=>this._tabsContainer.showAdditionalTabsDropdown()))),this._popoutEnabled&&(this._popoutButton=new Kt(this,this._popoutLabel,"lm_popout",(()=>this.handleButtonPopoutEvent()))),this._maximiseEnabled&&(this._maximiseButton=new Kt(this,this._maximiseLabel,"lm_maximise",(t=>this.handleButtonMaximiseToggleEvent(t)))),this._configClosable&&(this._closeButton=new Kt(this,this._closeLabel,"lm_close",(()=>s()))),this.processTabDropdownActiveChanged()}get show(){return this._show}get side(){return this._side}get leftRightSided(){return this._leftRightSided}get layoutManager(){return this._layoutManager}get parent(){return this._parent}get tabs(){return this._tabsContainer.tabs}get lastVisibleTabIndex(){return this._tabsContainer.lastVisibleTabIndex}get element(){return this._element}get tabsContainerElement(){return this._tabsContainer.element}get controlsContainerElement(){return this._controlsContainerElement}destroy(){this.emit("destroy"),this._popoutEvent=void 0,this._maximiseToggleEvent=void 0,this._clickEvent=void 0,this._touchStartEvent=void 0,this._componentRemoveEvent=void 0,this._componentFocusEvent=void 0,this._componentDragStartEvent=void 0,this._tabsContainer.destroy(),globalThis.document.removeEventListener("mouseup",this._documentMouseUpListener),this._element.remove()}createTab(t,e){this._tabsContainer.createTab(t,e)}removeTab(t){this._tabsContainer.removeTab(t)}processActiveComponentChanged(t){this._tabsContainer.processActiveComponentChanged(t),this.updateTabSizes()}setSide(t){this._side=t,this._leftRightSided=[nt.right,nt.left].includes(this._side)}setRowColumnClosable(t){this._rowColumnClosable=t,this.updateClosability()}updateClosability(){let t;if(this._configClosable)if(this._rowColumnClosable){t=!0;const e=this.tabs.length;for(let i=0;i1}applyFocusedValue(t){t?this._element.classList.add("lm_focused"):this._element.classList.remove("lm_focused")}processMaximised(){if(void 0===this._maximiseButton)throw new J("HPMAX16997");this._maximiseButton.element.setAttribute("title",this._minimiseLabel)}processMinimised(){if(void 0===this._maximiseButton)throw new J("HPMIN16997");this._maximiseButton.element.setAttribute("title",this._maximiseLabel)}updateTabSizes(){if(this._tabsContainer.tabCount>0){const t=this._show?this._layoutManager.layoutConfig.dimensions.headerHeight:0;let e;this._leftRightSided?(this._element.style.height="",this._element.style.width=zt(t)):(this._element.style.width="",this._element.style.height=zt(t)),e=this._leftRightSided?this._element.offsetHeight-this._controlsContainerElement.offsetHeight-this._tabControlOffset:this._element.offsetWidth-this._controlsContainerElement.offsetWidth-this._tabControlOffset,this._tabsContainer.updateTabSizes(e,this._getActiveComponentItemEvent())}}handleTabInitiatedComponentRemoveEvent(t){if(this._canRemoveComponent){if(void 0===this._componentRemoveEvent)throw new J("HHTCE22294");this._componentRemoveEvent(t)}}handleTabInitiatedComponentFocusEvent(t){if(void 0===this._componentFocusEvent)throw new J("HHTAE22294");this._componentFocusEvent(t)}handleTabInitiatedDragStartEvent(t,e,i,n){if(this._canRemoveComponent){if(void 0===this._componentDragStartEvent)throw new J("HHTDSE22294");this._componentDragStartEvent(t,e,i,n)}else i.cancelDrag()}processTabDropdownActiveChanged(){void 0!==this._tabDropdownButton&&Dt(this._tabDropdownButton.element,this._tabsContainer.dropdownActive)}handleButtonPopoutEvent(){if(this._layoutManager.layoutConfig.settings.popoutWholeStack){if(void 0===this._popoutEvent)throw new J("HHBPOE17834");this._popoutEvent()}else{const t=this._getActiveComponentItemEvent();t&&t.popout()}}handleButtonMaximiseToggleEvent(t){if(void 0===this._maximiseToggleEvent)throw new J("HHBMTE16834");this._maximiseToggleEvent()}onClick(t){t.target===this._element&&this.notifyClick(t)}onTouchStart(t){t.target===this._element&&this.notifyTouchStart(t)}notifyClick(t){if(void 0===this._clickEvent)throw new J("HNHC46834");this._clickEvent(t)}notifyTouchStart(t){if(void 0===this._touchStartEvent)throw new J("HNHTS46834");this._touchStartEvent(t)}}class ee extends $t{constructor(t,e,i){var n,o,s,r,a,l,h,d,c,m,u,p,g,f,v,_,y,C,w;super(t,e,i,ee.createElement(document)),this._headerSideChanged=!1,this._resizeListener=()=>this.handleResize(),this._maximisedListener=()=>this.handleMaximised(),this._minimisedListener=()=>this.handleMinimised(),this._headerConfig=e.header;const I=t.layoutConfig.header,b=e.content;let S;if(1!==b.length)S=void 0;else{S=b[0].header}this._initialWantMaximise=e.maximised,this._initialActiveItemIndex=null!==(n=e.activeItemIndex)&&void 0!==n?n:0;const E=null!==(r=null!==(s=null===(o=this._headerConfig)||void 0===o?void 0:o.show)&&void 0!==s?s:null==S?void 0:S.show)&&void 0!==r?r:I.show,x=null!==(h=null!==(l=null===(a=this._headerConfig)||void 0===a?void 0:a.popout)&&void 0!==l?l:null==S?void 0:S.popout)&&void 0!==h?h:I.popout,L=null!==(m=null!==(c=null===(d=this._headerConfig)||void 0===d?void 0:d.maximise)&&void 0!==c?c:null==S?void 0:S.maximise)&&void 0!==m?m:I.maximise,z=null!==(g=null!==(p=null===(u=this._headerConfig)||void 0===u?void 0:u.close)&&void 0!==p?p:null==S?void 0:S.close)&&void 0!==g?g:I.close,M=null!==(_=null!==(v=null===(f=this._headerConfig)||void 0===f?void 0:f.minimise)&&void 0!==v?v:null==S?void 0:S.minimise)&&void 0!==_?_:I.minimise,P=null!==(w=null!==(C=null===(y=this._headerConfig)||void 0===y?void 0:y.tabDropdown)&&void 0!==C?C:null==S?void 0:S.tabDropdown)&&void 0!==w?w:I.tabDropdown;this._maximisedEnabled=!1!==L;const T={show:!1!==E,side:!1===E?nt.top:E,popoutEnabled:!1!==x,popoutLabel:!1===x?"":x,maximiseEnabled:this._maximisedEnabled,maximiseLabel:!1===L?"":L,closeEnabled:!1!==z,closeLabel:!1===z?"":z,minimiseEnabled:!0,minimiseLabel:M,tabDropdownEnabled:!1!==P,tabDropdownLabel:!1===P?"":P};this._header=new te(t,this,T,e.isClosable&&!1!==z,(()=>this.getActiveComponentItem()),(()=>this.remove()),(()=>this.handlePopoutEvent()),(()=>this.toggleMaximise()),(t=>this.handleHeaderClickEvent(t)),(t=>this.handleHeaderTouchStartEvent(t)),(t=>this.handleHeaderComponentRemoveEvent(t)),(t=>this.handleHeaderComponentFocusEvent(t)),((t,e,i,n)=>this.handleHeaderComponentStartDragEvent(t,e,i,n))),this.isStack=!0,this._childElementContainer=document.createElement("section"),this._childElementContainer.classList.add("lm_items"),this.on("resize",this._resizeListener),this._maximisedEnabled&&(this.on("maximised",this._maximisedListener),this.on("minimised",this._minimisedListener)),this.element.appendChild(this._header.element),this.element.appendChild(this._childElementContainer),this.setupHeaderPosition(),this._header.updateClosability()}get childElementContainer(){return this._childElementContainer}get header(){return this._header}get headerShow(){return this._header.show}get headerSide(){return this._header.side}get headerLeftRightSided(){return this._header.leftRightSided}get contentAreaDimensions(){return this._contentAreaDimensions}get initialWantMaximise(){return this._initialWantMaximise}get isMaximised(){return this===this.layoutManager.maximisedStack}get stackParent(){if(!this.parent)throw new Error("Stack should always have a parent");return this.parent}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}init(){if(!0===this.isInitialised)return;this.updateNodeSize();for(let t=0;t0){if(this._initialActiveItemIndex<0||this._initialActiveItemIndex>=e)throw new Error(`ActiveItemIndex out of range: ${this._initialActiveItemIndex} id: ${this.id}`);for(let i=0;ithis.contentItems.length)throw e-=1,new X("SAC99728");if(t instanceof jt)return e=super.addChild(t,e),this._childElementContainer.appendChild(t.element),this._header.createTab(t,e),this.setActiveComponentItem(t,i),this._header.updateTabSizes(),this.updateSize(!1),t.container.setBaseLogicalZIndex(),this._header.updateClosability(),this.emitStateChangedEvent(),e;throw new X("SACC88532")}removeChild(t,e){const i=t,n=this.contentItems.indexOf(i),o=1===this.contentItems.length;if(this._activeComponentItem===i&&(i.focused&&i.blur(),!o)){const t=0===n?1:n-1;this.setActiveComponentItem(this.contentItems[t],!1)}this._header.removeTab(i),super.removeChild(i,e),o||this._header.updateClosability(),this.emitStateChangedEvent()}toggleMaximise(){this.isMaximised?this.minimise():this.maximise()}maximise(){if(!this.isMaximised){this.layoutManager.setMaximisedStack(this);const t=this.contentItems,e=t.length;for(let i=0;i0&&void 0===t)throw new Error("expected non-empty stack to have an active component item");return{type:"stack",content:this.calculateConfigContent(),size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,isClosable:this.isClosable,maximised:this.isMaximised,header:this.createHeaderConfig(),activeItemIndex:t}}onDrop(t,e){if("header"===this._dropSegment){if(this.resetHeaderDropZone(),void 0===this._dropIndex)throw new J("SODDI68990");return void this.addChild(t,this._dropIndex)}if("body"===this._dropSegment)return void this.addChild(t,0,!0);const i="top"===this._dropSegment||"bottom"===this._dropSegment,n="left"===this._dropSegment||"right"===this._dropSegment,o="top"===this._dropSegment||"left"===this._dropSegment,s=i&&this.stackParent.isColumn||n&&this.stackParent.isRow;if(t.isComponent){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createAndInitContentItem(e,this);i.addChild(t),t=i}if(t.type===at.row||t.type===at.column){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}if(s){const e=this.stackParent.contentItems.indexOf(this);this.stackParent.addChild(t,o?e:e+1,!0),this.size*=.5,t.size=this.size,t.sizeUnit=this.sizeUnit,this.stackParent.updateSize(!1)}else{const e=i?at.column:at.row,n=ct.createDefault(e),s=this.layoutManager.createContentItem(n,this);this.stackParent.replaceChild(this,s),s.addChild(t,o?0:void 0,!0),s.addChild(this,o?void 0:0,!0),this.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}highlightDropZone(t,e){for(const i in this._contentAreaDimensions){const n=i,o=this._contentAreaDimensions[n].hoverArea;if(o.x1t&&o.y1e)return void("header"===n?(this._dropSegment="header",this.highlightHeaderDropZone(this._header.leftRightSided?e:t)):(this.resetHeaderDropZone(),this.highlightBodyDropZone(n)))}}getArea(){if("none"===this.element.style.display)return null;const t=super.getElementArea(this._header.element),e=super.getElementArea(this._childElementContainer);if(null===t||null===e)throw new K("SGAHC13086");const i=e.x2-e.x1,n=e.y2-e.y1;return this._contentAreaDimensions={header:{hoverArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2},highlightArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2}}},0===this.contentItems.length?(this._contentAreaDimensions.body={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2}},super.getElementArea(this.element)):(this._contentAreaDimensions.left={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x1+.25*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x1+.5*i,y2:e.y2}},this._contentAreaDimensions.top={hoverArea:{x1:e.x1+.25*i,y1:e.y1,x2:e.x1+.75*i,y2:e.y1+.5*n},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y1+.5*n}},this._contentAreaDimensions.right={hoverArea:{x1:e.x1+.75*i,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1+.5*i,y1:e.y1,x2:e.x2,y2:e.y2}},this._contentAreaDimensions.bottom={hoverArea:{x1:e.x1+.25*i,y1:e.y1+.5*n,x2:e.x1+.75*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1+.5*n,x2:e.x2,y2:e.y2}},super.getElementArea(this.element))}positionHeader(t){this._header.side!==t&&(this._header.setSide(t),this._headerSideChanged=!0,this.setupHeaderPosition())}updateNodeSize(){if("none"!==this.element.style.display){const t=kt(this.element);if(this._header.show){t[this._header.leftRightSided?it.width:it.height]-=this.layoutManager.layoutConfig.dimensions.headerHeight}this._childElementContainer.style.width=zt(t.width),this._childElementContainer.style.height=zt(t.height);for(let e=0;e=o&&tthis.onDrag(t,e,i))),this._dragListener.on("dragStop",(()=>this.onDrop())),this.createDragProxyElements(t,e),null===this._componentItem.parent)throw new K("DPC10097");this._componentItemFocused=this._componentItem.focused,this._componentItemFocused&&this._componentItem.blur(),this._componentItem.parent.removeChild(this._componentItem,!0),this.setDimensions(),document.body.appendChild(this._element),this.determineMinMaxXY(),this._layoutManager.calculateItemAreas(),this.setDropPosition(t,e)}get element(){return this._element}createDragProxyElements(t,e){this._element=document.createElement("div"),this._element.classList.add("lm_dragProxy");const i=document.createElement("div");i.classList.add("lm_header");const n=document.createElement("div");n.classList.add("lm_tabs");const o=document.createElement("div");o.classList.add("lm_tab");const s=document.createElement("span");s.classList.add("lm_title"),o.appendChild(s),n.appendChild(o),i.appendChild(n),this._proxyContainerElement=document.createElement("div"),this._proxyContainerElement.classList.add("lm_content"),this._element.appendChild(i),this._element.appendChild(this._proxyContainerElement),this._originalParent instanceof ee&&this._originalParent.headerShow&&(this._sided=this._originalParent.headerLeftRightSided,this._element.classList.add("lm_"+this._originalParent.headerSide),[nt.right,nt.bottom].indexOf(this._originalParent.headerSide)>=0&&this._proxyContainerElement.insertAdjacentElement("afterend",i)),this._element.style.left=zt(t),this._element.style.top=zt(e),o.setAttribute("title",this._componentItem.title),s.insertAdjacentText("afterbegin",this._componentItem.title),this._proxyContainerElement.appendChild(this._componentItem.element)}determineMinMaxXY(){const t=this._layoutManager.groundItem;if(void 0===t)throw new J("DPDMMXY73109");{const e=t.element.getBoundingClientRect();this._minX=e.left+document.body.scrollLeft,this._minY=e.top+document.body.scrollTop,this._maxX=this._minX+e.width,this._maxY=this._minY+e.height}}onDrag(t,e,i){const n=i.pageX,o=i.pageY;this.setDropPosition(n,o),this._componentItem.drag()}setDropPosition(t,e){this._layoutManager.layoutConfig.settings.constrainDragToContainer&&(t<=this._minX?t=Math.ceil(this._minX):t>=this._maxX&&(t=Math.floor(this._maxX)),e<=this._minY?e=Math.ceil(this._minY):e>=this._maxY&&(e=Math.floor(this._maxY))),this._element.style.left=zt(t),this._element.style.top=zt(e),this._area=this._layoutManager.getArea(t,e),null!==this._area&&(this._lastValidArea=this._area,this._area.contentItem.highlightDropZone(t,e,this._area))}onDrop(){const t=this._layoutManager.dropTargetIndicator;if(null===t)throw new K("DPOD30011");let e;if(t.hide(),this._componentItem.exitDragMode(),null!==this._area)e=this._componentItem,this._area.contentItem.onDrop(e,this._area);else if(null!==this._lastValidArea){e=this._componentItem;this._lastValidArea.contentItem.onDrop(e,this._lastValidArea)}else this._originalParent?(e=this._componentItem,this._originalParent.addChild(e)):this._componentItem.destroy();this._element.remove(),this._layoutManager.emit("itemDropped",this._componentItem),this._componentItemFocused&&void 0!==e&&e.focus()}setDimensions(){const t=this._layoutManager.layoutConfig.dimensions;if(void 0===t)throw new Error("DragProxy.setDimensions: dimensions undefined");let e=t.dragProxyWidth,i=t.dragProxyHeight;if(void 0===e||void 0===i)throw new Error("DragProxy.setDimensions: width and/or height undefined");const n=!1===this._layoutManager.layoutConfig.header.show?0:t.headerHeight;this._element.style.width=zt(e),this._element.style.height=zt(i),e-=this._sided?n:0,i-=this._sided?0:n,this._proxyContainerElement.style.width=zt(e),this._proxyContainerElement.style.height=zt(i),this._componentItem.enterDragMode(e,i),this._componentItem.show()}}class ne{constructor(t,e,i,n,o,s,r){this._layoutManager=t,this._element=e,this._extraAllowableChildTargets=i,this._componentTypeOrFtn=n,this._componentState=o,this._title=s,this._id=r,this._dragListener=null,this._dummyGroundContainer=document.createElement("div");const a=gt.createDefault("row");this._dummyGroundContentItem=new Yt(this._layoutManager,a,this._dummyGroundContainer),this.createDragListener()}destroy(){this.removeDragListener()}createDragListener(){this.removeDragListener(),this._dragListener=new Zt(this._element,this._extraAllowableChildTargets),this._dragListener.on("dragStart",((t,e)=>this.onDragStart(t,e))),this._dragListener.on("dragStop",(()=>this.onDragStop()))}onDragStart(t,e){var i;const n="component";let o;if("function"==typeof this._componentTypeOrFtn){const t=this._componentTypeOrFtn();o=ne.isDragSourceComponentItemConfig(t)?{type:n,componentState:t.state,componentType:t.type,title:null!==(i=t.title)&&void 0!==i?i:this._title}:t}else o={type:n,componentState:this._componentState,componentType:this._componentTypeOrFtn,title:this._title,id:this._id};const s=bt.resolve(o,!1),r=new jt(this._layoutManager,s,this._dummyGroundContentItem);if(this._dummyGroundContentItem.contentItems.push(r),null===this._dragListener)throw new K("DSODSD66746");{const i=new ie(t,e,this._dragListener,this._layoutManager,r,this._dummyGroundContentItem),n=this._layoutManager.transitionIndicator;if(null===n)throw new K("DSODST66746");n.transitionElements(this._element,i.element)}}onDragStop(){this.createDragListener()}removeDragListener(){null!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=null)}}!function(t){t.isDragSourceComponentItemConfig=function(t){return!("componentType"in t)}}(ne||(ne={}));class oe{constructor(){this._element=document.createElement("div"),this._element.classList.add("lm_dropTargetIndicator");const t=document.createElement("div");t.classList.add("lm_inner"),this._element.appendChild(t),document.body.appendChild(this._element)}destroy(){this._element.remove()}highlightArea(t,e){this._element.style.left=zt(t.x1+e),this._element.style.top=zt(t.y1+e),this._element.style.width=zt(t.x2-t.x1-e),this._element.style.height=zt(t.y2-t.y1-e),this._element.style.display="block"}hide(){Dt(this._element,!1)}}class se{constructor(){this._element=document.createElement("div"),this._element.classList.add("lm_transition_indicator"),document.body.appendChild(this._element),this._toElement=null,this._fromDimensions=null,this._totalAnimationDuration=200,this._animationStartTime=null}destroy(){this._element.remove()}transitionElements(t,e){}nextAnimationFrame(){}measure(t){const e=t.getBoundingClientRect();return{left:e.left,top:e.top,width:t.offsetWidth,height:t.offsetHeight}}}class re extends Wt{constructor(t){super(),this._layoutManager=t,this._childEventListener=t=>this.onEventFromChild(t),globalThis.addEventListener(re.ChildEventName,this._childEventListener,{passive:!0})}emit(t,...e){"userBroadcast"===t?this.emitUserBroadcast(...e):super.emit(t,...e)}emitUserBroadcast(...t){this.handleUserBroadcastEvent("userBroadcast",t)}destroy(){globalThis.removeEventListener(re.ChildEventName,this._childEventListener)}handleUserBroadcastEvent(t,e){this._layoutManager.isSubWindow?this.propagateToParent(t,e):this.propagateToThisAndSubtree(t,e)}onEventFromChild(t){const e=t.detail;this.handleUserBroadcastEvent(e.eventName,e.args)}propagateToParent(t,e){const i={bubbles:!0,cancelable:!0,detail:{layoutManager:this._layoutManager,eventName:t,args:e}},n=new CustomEvent(re.ChildEventName,i),o=globalThis.opener;if(null===o)throw new K("EHPTP15778");o.dispatchEvent(n)}propagateToThisAndSubtree(t,e){this.emitUnknown(t,...e);for(let i=0;ithis.handleContainerResize())),this._windowBeforeUnloadListener=()=>this.onBeforeUnload(),this._windowBeforeUnloadListening=!1,this._maximisedStackBeforeDestroyedListener=t=>this.cleanupBeforeMaximisedStackDestroyed(t),this.isSubWindow=t.isSubWindow,this._constructorOrSubWindowLayoutConfig=t.constructorOrSubWindowLayoutConfig,Q.checkInitialise(),dt.checkInitialise(),void 0!==t.containerElement&&(this._containerElement=t.containerElement)}get container(){return this._containerElement}get isInitialised(){return this._isInitialised}get groundItem(){return this._groundItem}get root(){return this._groundItem}get openPopouts(){return this._openPopouts}get dropTargetIndicator(){return this._dropTargetIndicator}get transitionIndicator(){return this._transitionIndicator}get width(){return this._width}get height(){return this._height}get eventHub(){return this._eventHub}get rootItem(){if(void 0===this._groundItem)throw new Error("Cannot access rootItem before init");return 0===this._groundItem.contentItems.length?void 0:this._groundItem.contentItems[0]}get focusedComponentItem(){return this._focusedComponentItem}get tabDropPlaceholder(){return this._tabDropPlaceholder}get maximisedStack(){return this._maximisedStack}get deprecatedConstructor(){return!this.isSubWindow&&void 0!==this._constructorOrSubWindowLayoutConfig}destroy(){if(this._isInitialised){this._windowBeforeUnloadListening&&(globalThis.removeEventListener("beforeunload",this._windowBeforeUnloadListener),this._windowBeforeUnloadListening=!1),!0===this.layoutConfig.settings.closePopoutsOnUnload&&this.closeAllOpenPopouts(),this._resizeObserver.disconnect(),this.checkClearResizeTimeout(),void 0!==this._groundItem&&this._groundItem.destroy(),this._tabDropPlaceholder.remove(),null!==this._dropTargetIndicator&&this._dropTargetIndicator.destroy(),null!==this._transitionIndicator&&this._transitionIndicator.destroy(),this._eventHub.destroy();for(const t of this._dragSources)t.destroy();this._dragSources=[],this._isInitialised=!1}}minifyConfig(t){return _t.minifyConfig(t)}unminifyConfig(t){return _t.unminifyConfig(t)}init(){let t;if(this.setContainer(),this._dropTargetIndicator=new oe,this._transitionIndicator=new se,this.updateSizeFromContainer(),this.isSubWindow){if(void 0===this._constructorOrSubWindowLayoutConfig)throw new J("LMIU07155");{const e=this._constructorOrSubWindowLayoutConfig.root;if(void 0===e)throw new X("LMIC07156");if(!Ct.isComponent(e))throw new X("LMIC07157");t=e;const i=xt.resolve(this._constructorOrSubWindowLayoutConfig);this.layoutConfig=Object.assign(Object.assign({},i),{root:void 0})}}else void 0===this._constructorOrSubWindowLayoutConfig?this.layoutConfig=_t.createDefault():this.layoutConfig=xt.resolve(this._constructorOrSubWindowLayoutConfig);const e=this.layoutConfig;this._groundItem=new Yt(this,e.root,this._containerElement),this._groundItem.init(),this.checkLoadedLayoutMaximiseItem(),this._resizeObserver.observe(this._containerElement),this._isInitialised=!0,this.adjustColumnsResponsive(),this.emit("initialised"),void 0!==t&&this.loadComponentAsRoot(t)}loadLayout(t){if(!this.isInitialised)throw new Error("GoldenLayout: Need to call init() if LayoutConfig with defined root passed to constructor");if(void 0===this._groundItem)throw new J("LMLL11119");this.createSubWindows(),this.layoutConfig=xt.resolve(t),this._groundItem.loadRoot(this.layoutConfig.root),this.checkLoadedLayoutMaximiseItem(),this.adjustColumnsResponsive()}saveLayout(){if(!1===this._isInitialised)throw new Error("Can't create config, layout not yet initialised");if(void 0===this._groundItem)throw new J("LMTC18244");{const t=this._groundItem.calculateConfigContent();let e;e=1!==t.length?void 0:t[0],this.reconcilePopoutWindows();const i=[];for(let t=0;t=0?n=this._groundItem.contentItems[0]:e=0;break;case at.row:case at.column:e=n.addItem(t,i.index);break;case at.stack:if(Ct.isComponent(t)){e=n.addItem(t,i.index);break}throw Error(tt[6]);case at.component:throw new X("LMAIALC87444602");default:throw new Y("LMAIALU98881733",n.type)}if(Ct.isComponent(t)){const t=n.contentItems[e];Gt.isStack(t)&&(n=t,e=0)}return i.parentItem=n,i.index=e,i}}}loadComponentAsRoot(t){if(void 0===this._groundItem)throw new Error("Cannot add item before init");this._groundItem.loadComponentAsRoot(t)}updateSize(t,e){this.setSize(t,e)}setSize(t,e){if(this._width=t,this._height=e,!0===this._isInitialised){if(void 0===this._groundItem)throw new J("LMUS18881");if(this._groundItem.setSize(this._width,this._height),this._maximisedStack){const{width:t,height:e}=kt(this._containerElement);Tt(this._maximisedStack.element,t),At(this._maximisedStack.element,e),this._maximisedStack.updateSize(!1)}this.adjustColumnsResponsive()}}beginSizeInvalidation(){this._sizeInvalidationBeginCount++}endSizeInvalidation(){0==--this._sizeInvalidationBeginCount&&this.updateSizeFromContainer()}updateSizeFromContainer(){const{width:t,height:e}=kt(this._containerElement);this.setSize(t,e)}updateRootSize(t=!1){if(void 0===this._groundItem)throw new J("LMURS28881");this._groundItem.updateSize(t)}createAndInitContentItem(t,e){const i=this.createContentItem(t,e);return i.init(),i}createContentItem(t,e){if("string"!=typeof t.type)throw new G("Missing parameter 'type'",JSON.stringify(t));if(ct.isComponentItem(t)&&!(e instanceof ee)&&e&&!(!0===this.isSubWindow&&e instanceof Yt)){t={type:at.stack,content:[t],size:t.size,sizeUnit:t.sizeUnit,minSize:t.minSize,minSizeUnit:t.minSizeUnit,id:t.id,maximised:t.maximised,isClosable:t.isClosable,activeItemIndex:0,header:void 0}}return this.createContentItemFromConfig(t,e)}findFirstComponentItemById(t){if(void 0===this._groundItem)throw new J("LMFFCIBI82446");return this.findFirstContentItemTypeByIdRecursive(at.component,t,this._groundItem)}createPopout(t,e,i,n){return t instanceof Gt?this.createPopoutFromContentItem(t,e,i,n):this.createPopoutFromItemConfig(t,e,i,n)}createPopoutFromContentItem(t,e,i,n){let o=t.parent,s=t;for(;null!==o&&1===o.contentItems.length&&!o.isGround;)s=o,o=o.parent;if(null===o)throw new K("LMCPFCI00834");{if(void 0===n&&(n=o.contentItems.indexOf(s)),null!==i&&o.addPopInParentId(i),void 0===e){const i=globalThis.screenX||globalThis.screenLeft,n=globalThis.screenY||globalThis.screenTop,o=t.element.offsetLeft,s=t.element.offsetTop,{width:r,height:a}=kt(t.element);e={left:i+o,top:n+s,width:r,height:a}}const r=t.toConfig();if(t.remove(),ft.isRootItemConfig(r))return this.createPopoutFromItemConfig(r,e,i,n);throw new Error(`${tt[0]}`)}}beginVirtualSizedContainerAdding(){0==++this._virtualSizedContainerAddingBeginCount&&(this._virtualSizedContainers.length=0)}addVirtualSizedContainer(t){this._virtualSizedContainers.push(t)}endVirtualSizedContainerAdding(){if(0==--this._virtualSizedContainerAddingBeginCount){const t=this._virtualSizedContainers.length;if(t>0){this.fireBeforeVirtualRectingEvent(t);for(let e=0;ethis.emit("windowOpened",a))),a.on("closed",(()=>this.reconcilePopoutWindows())),this._openPopouts.push(a),this.layoutConfig.settings.closePopoutsOnUnload&&!this._windowBeforeUnloadListening&&(globalThis.addEventListener("beforeunload",this._windowBeforeUnloadListener,{passive:!0}),this._windowBeforeUnloadListening=!0),a}closeAllOpenPopouts(){for(let t=0;tglobalThis.close()),1)}getArea(t,e){let i=null,n=1/0;for(let o=0;o=s.x1&&t=s.y1&&es.surface&&(n=s.surface,i=s)}return i}calculateItemAreas(){const t=this.getAllContentItems(),e=this._groundItem;if(void 0===e)throw new J("LMCIAR44365");if(1!==t.length){e.contentItems[0].isStack?this._itemAreas=[]:this._itemAreas=e.createSideAreas();for(let e=0;e0){let e=t[0];if(Gt.isComponentItem(e)){const t=e.parent;if(null===t)throw new K("LMXLLMI69999");e=t}if(!Gt.isStack(e))throw new X("LMCLLMI19993");e.maximise()}}}processMaximiseStack(t){if(this._maximisedStack=t,t.on("beforeItemDestroyed",this._maximisedStackBeforeDestroyedListener),t.element.classList.add("lm_maximised"),t.element.insertAdjacentElement("afterend",this._maximisePlaceholder),void 0===this._groundItem)throw new J("LMMXI19993");{this._groundItem.element.prepend(t.element);const{width:e,height:i}=kt(this._containerElement);Tt(t.element,e),At(t.element,i),t.updateSize(!0),t.focusActiveContentItem(),this._maximisedStack.emit("maximised"),this.emit("stateChanged")}}processMinimiseMaximisedStack(){if(void 0===this._maximisedStack)throw new X("LMMMS74422");{const t=this._maximisedStack;if(null===t.parent)throw new K("LMMI13668");t.element.classList.remove("lm_maximised"),this._maximisePlaceholder.insertAdjacentElement("afterend",t.element),this._maximisePlaceholder.remove(),this.updateRootSize(!0),this._maximisedStack=void 0,t.off("beforeItemDestroyed",this._maximisedStackBeforeDestroyedListener),t.emit("minimised"),this.emit("stateChanged")}}reconcilePopoutWindows(){const t=[];for(let e=0;e{this._resizeTimeoutId=void 0,this.beginSizeInvalidation(),this.endSizeInvalidation()}),this.resizeDebounceInterval))}checkClearResizeTimeout(){void 0!==this._resizeTimeoutId&&(clearTimeout(this._resizeTimeoutId),this._resizeTimeoutId=void 0)}setContainer(){var t;const e=document.body,i=null!==(t=this._containerElement)&&void 0!==t?t:e;if(i===e){this.resizeWithContainerAutomatically=!0;const t=document.documentElement;t.style.height="100%",t.style.margin="0",t.style.padding="0",t.style.overflow="clip",e.style.height="100%",e.style.margin="0",e.style.padding="0",e.style.overflow="clip"}this._containerElement=i}onBeforeUnload(){this.destroy()}adjustColumnsResponsive(){if(void 0===this._groundItem)throw new J("LMACR20883");if(this._firstLoad=!1,this.useResponsiveLayout()&&!this._updatingColumnsResponsive&&this._groundItem.contentItems.length>0&&this._groundItem.contentItems[0].isRow){if(void 0===this._groundItem||null===this._width)throw new J("LMACR77412");{const t=this._groundItem.contentItems[0].contentItems.length;if(t<=1)return;{const e=this.layoutConfig.dimensions.defaultMinItemWidth;if(t*e<=this._width)return;{this._updatingColumnsResponsive=!0;const i=t-Math.max(Math.floor(this._width/e),1),n=this._groundItem.contentItems[0],o=this.getAllStacks();if(0===o.length)throw new X("LMACRS77413");{const t=o[0];for(let e=0;en?void 0:{parentItem:t,index:o}}}case 1:if(void 0===this._focusedComponentItem)return;{const t=this._focusedComponentItem.parentItem;return this.tryCreateLocationFromParentItem(t,e)}case 2:{const t=this.findFirstContentItemType(at.stack);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 3:{let t=this.findFirstContentItemType(at.row);return void 0!==t?this.tryCreateLocationFromParentItem(t,e):(t=this.findFirstContentItemType(at.column),void 0!==t?this.tryCreateLocationFromParentItem(t,e):void 0)}case 4:{const t=this.findFirstContentItemType(at.row);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 5:{const t=this.findFirstContentItemType(at.column);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 6:if(void 0===this._groundItem)throw new J("LMFLRIF18244");return void 0!==this.rootItem?void 0:void 0===e||0===e?{parentItem:this._groundItem,index:0}:void 0;case 7:if(void 0===this._groundItem)throw new J("LMFLF18244");{const t=this._groundItem.contentItems;if(0===t.length)return void 0===e||0===e?{parentItem:this._groundItem,index:0}:void 0;{const i=t[0];return this.tryCreateLocationFromParentItem(i,e)}}}}tryCreateLocationFromParentItem(t,e){const i=t.contentItems.length;return void 0===e?{parentItem:t,index:i}:e<0||e>i?void 0:{parentItem:t,index:e}}}!function(t){t.createMaximisePlaceElement=function(t){const e=t.createElement("div");return e.classList.add("lm_maximise_place"),e},t.createTabDropPlaceholderElement=function(t){const e=t.createElement("div");return e.classList.add("lm_drop_tab_placeholder"),e},t.defaultLocationSelectors=[{typeId:1,index:void 0},{typeId:2,index:void 0},{typeId:3,index:void 0},{typeId:7,index:void 0}],t.afterFocusedItemIfPossibleLocationSelectors=[{typeId:0,index:1},{typeId:2,index:void 0},{typeId:3,index:void 0},{typeId:7,index:void 0}]}(ae||(ae={}));class le extends ae{constructor(t,e,i,n){if(super(le.createLayoutManagerConstructorParameters(t,e)),this._bindComponentEventHanlderPassedInConstructor=!1,this._creationTimeoutPassed=!1,void 0!==e&&"function"==typeof e&&(this.bindComponentEvent=e,this._bindComponentEventHanlderPassedInConstructor=!0,void 0!==i&&(this.unbindComponentEvent=i)),!this._bindComponentEventHanlderPassedInConstructor&&this.isSubWindow){if(void 0===this._constructorOrSubWindowLayoutConfig)throw new J("VLC98823");{const t=xt.resolve(this._constructorOrSubWindowLayoutConfig);this.layoutConfig=Object.assign(Object.assign({},t),{root:void 0})}}!0!==n&&(this.deprecatedConstructor||this.init())}destroy(){this.bindComponentEvent=void 0,this.unbindComponentEvent=void 0,super.destroy()}init(){if(this._bindComponentEventHanlderPassedInConstructor||"loading"!==document.readyState&&null!==document.body){if(!this._bindComponentEventHanlderPassedInConstructor&&!0===this.isSubWindow&&!this._creationTimeoutPassed)return setTimeout((()=>this.init()),7),void(this._creationTimeoutPassed=!0);!0===this.isSubWindow&&(this._bindComponentEventHanlderPassedInConstructor||this.clearHtmlAndAdjustStylesForSubWindow(),window.__glInstance=this),super.init()}else document.addEventListener("DOMContentLoaded",(()=>this.init()),{passive:!0})}clearHtmlAndAdjustStylesForSubWindow(){const t=document.head,e=new Array(4);e[0]=document.querySelectorAll("body link"),e[1]=document.querySelectorAll("body style"),e[2]=document.querySelectorAll("template"),e[3]=document.querySelectorAll(".gl_keep");for(let i=0;ithis.emit("popIn"))),document.body.appendChild(t),!0}}bindComponent(t,e){if(void 0!==this.bindComponentEvent){return this.bindComponentEvent(t,e)}if(void 0!==this.getComponentEvent)return{virtual:!1,component:this.getComponentEvent(t,e)};{const t=`${tt[2]}: ${JSON.stringify(e)}`;throw new Z(t)}}unbindComponent(t,e,i){if(void 0!==this.unbindComponentEvent)this.unbindComponentEvent(t);else if(!e&&void 0!==this.releaseComponentEvent){if(void 0===i)throw new J("VCUCRCU333998");this.releaseComponentEvent(t,i)}}}!function(t){let e=!1;t.createLayoutManagerConstructorParameters=function(t,i){const n=e?null:new URL(document.location.href).searchParams.get("gl-window");e=!0;const o=null!==n;let s,r;if(null!==n){const e=localStorage.getItem(n);if(null===e)throw new Error("Null gl-window Config");localStorage.removeItem(n);const i=JSON.parse(e),o=_t.unminifyConfig(i);r=xt.fromResolved(o),t instanceof HTMLElement&&(s=t)}else void 0===t?r=void 0:t instanceof HTMLElement?(r=void 0,s=t):r=t,void 0===s&&i instanceof HTMLElement&&(s=i);return{constructorOrSubWindowLayoutConfig:r,isSubWindow:o,containerElement:s}}}(le||(le={}));class he extends le{constructor(t,e,i){super(t,e,i,!0),this._componentTypesMap=new Map,this._registeredComponentMap=new Map,this._virtuableComponentMap=new Map,this._containerVirtualRectingRequiredEventListener=(t,e,i)=>this.handleContainerVirtualRectingRequiredEvent(t,e,i),this._containerVirtualVisibilityChangeRequiredEventListener=(t,e)=>this.handleContainerVirtualVisibilityChangeRequiredEvent(t,e),this._containerVirtualZIndexChangeRequiredEventListener=(t,e,i)=>this.handleContainerVirtualZIndexChangeRequiredEvent(t,e,i),this.deprecatedConstructor||this.init()}registerComponent(t,e,i=!1){if("function"!=typeof e)throw new $("registerComponent() componentConstructorOrFactoryFtn parameter is not a function");if(e.hasOwnProperty("prototype")){const n=e;this.registerComponentConstructor(t,n,i)}else{const n=e;this.registerComponentFactoryFunction(t,n,i)}}registerComponentConstructor(t,e,i=!1){if("function"!=typeof e)throw new Error(tt[1]);if(void 0!==this._componentTypesMap.get(t))throw new Z(`${tt[3]}: ${t}`);this._componentTypesMap.set(t,{constructor:e,factoryFunction:void 0,virtual:i})}registerComponentFactoryFunction(t,e,i=!1){if("function"!=typeof e)throw new Z("Please register a constructor function");if(void 0!==this._componentTypesMap.get(t))throw new Z(`${tt[3]}: ${t}`);this._componentTypesMap.set(t,{constructor:void 0,factoryFunction:e,virtual:i})}registerComponentFunction(t){this.registerGetComponentConstructorCallback(t)}registerGetComponentConstructorCallback(t){if("function"!=typeof t)throw new Error("Please register a callback function");void 0!==this._getComponentConstructorFtn&&console.warn("Multiple component functions are being registered. Only the final registered function will be used."),this._getComponentConstructorFtn=t}getRegisteredComponentTypeNames(){const t=this._componentTypesMap.keys();return Array.from(t)}getComponentInstantiator(t){let e;const i=pt.resolveComponentTypeName(t);return void 0!==i&&(e=this._componentTypesMap.get(i)),void 0===e&&void 0!==this._getComponentConstructorFtn&&(e={constructor:this._getComponentConstructorFtn(t),factoryFunction:void 0,virtual:!1}),e}bindComponent(t,e){let i;const n=pt.resolveComponentTypeName(e);let o;if(void 0!==n&&(i=this._componentTypesMap.get(n)),void 0===i&&void 0!==this._getComponentConstructorFtn&&(i={constructor:this._getComponentConstructorFtn(e),factoryFunction:void 0,virtual:!1}),void 0!==i){const s=i.virtual;let r,a;r=void 0===e.componentState?void 0:Ut({},e.componentState);const l=i.constructor;if(void 0!==l)a=new l(t,r,s);else{const e=i.factoryFunction;if(void 0===e)throw new X("LMBCFFU10008");a=e(t,r,s)}if(s){if(void 0===a)throw new J("GLBCVCU988774");{const e=a,i=e.rootHtmlElement;if(void 0===i)throw new Z(`${tt[5]}: ${n}`);!function(t){const e="absolute";t.style.position!==e&&(t.style.position=e)}(i),this.container.appendChild(i),this._virtuableComponentMap.set(t,e),t.virtualRectingRequiredEvent=this._containerVirtualRectingRequiredEventListener,t.virtualVisibilityChangeRequiredEvent=this._containerVirtualVisibilityChangeRequiredEventListener,t.virtualZIndexChangeRequiredEvent=this._containerVirtualZIndexChangeRequiredEventListener}}this._registeredComponentMap.set(t,a),o={virtual:i.virtual,component:a}}else o=super.bindComponent(t,e);return o}unbindComponent(t,e,i){if(void 0===this._registeredComponentMap.get(t))super.unbindComponent(t,e,i);else{const e=this._virtuableComponentMap.get(t);if(void 0!==e){const i=e.rootHtmlElement;if(void 0===i)throw new X("GLUC77743",t.title);this.container.removeChild(i),this._virtuableComponentMap.delete(t)}}}fireBeforeVirtualRectingEvent(t){this._goldenLayoutBoundingClientRect=this.container.getBoundingClientRect(),super.fireBeforeVirtualRectingEvent(t)}handleContainerVirtualRectingRequiredEvent(t,e,i){const n=this._virtuableComponentMap.get(t);if(void 0===n)throw new J("GLHCSCE55933");{const o=n.rootHtmlElement;if(void 0===o)throw new Z(tt[4]+" "+t.title);{const n=t.element.getBoundingClientRect(),s=n.left-this._goldenLayoutBoundingClientRect.left;o.style.left=zt(s);const r=n.top-this._goldenLayoutBoundingClientRect.top;o.style.top=zt(r),Tt(o,e),At(o,i)}}}handleContainerVirtualVisibilityChangeRequiredEvent(t,e){const i=this._virtuableComponentMap.get(t);if(void 0===i)throw new J("GLHCVVCRE55934");{const n=i.rootHtmlElement;if(void 0===n)throw new Z(tt[4]+" "+t.title);Dt(n,e)}}handleContainerVirtualZIndexChangeRequiredEvent(t,e,i){const n=this._virtuableComponentMap.get(t);if(void 0===n)throw new J("GLHCVZICRE55935");{const e=n.rootHtmlElement;if(void 0===e)throw new Z(tt[4]+" "+t.title);e.style.zIndex=i}}}const de="initial_",ce={show:"top",popout:!1,maximise:!1,close:"close-tab-unused"},me={headerHeight:31},ue={hasHeaders:!0,reorderEnabled:!0},pe={popoutWholeStack:!1,constrainDragToContainer:!1,constrainDragToHeaders:!1,preventDragout:!1,showMaximiseIcon:!1,showPopoutIcon:!1,showCloseIcon:!1,blockedPopoutsThrowError:!0,closePopoutsOnUnload:!0,selectionEnabled:!1};var ge,fe;class ve{constructor(e){this.layout=e,ge.set(this,void 0),fe.set(this,void 0),this.handleResize=t=>{t.forEach((t=>this.resizeElement(t.target)))},this.handleMutation=()=>{this.layout.viewComponentsByContainerElement.forEach((t=>{this.resizeElement(t.container.element)}))},t.__classPrivateFieldSet(this,ge,new ResizeObserver(this.handleResize),"f"),t.__classPrivateFieldSet(this,fe,new MutationObserver(this.handleMutation),"f")}observeMutations(e){t.__classPrivateFieldGet(this,fe,"f")?.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["class"]})}destroy(){t.__classPrivateFieldGet(this,ge,"f").disconnect(),t.__classPrivateFieldGet(this,fe,"f").disconnect()}observeContainer(e){t.__classPrivateFieldGet(this,ge,"f").observe(e)}unobserveContainer(e){t.__classPrivateFieldGet(this,ge,"f").unobserve(e)}resizeElement(t){const e=this.layout.viewComponentsByContainerElement.get(t);e&&e.resize()}}ge=new WeakMap,fe=new WeakMap;var _e={};Object.defineProperty(_e,"__esModule",{value:!0});var ye=_e.BaseItem=void 0;class Ce{constructor(t,e,i){this._item=t,this._layout=e,this._wrap=i}get raw(){return this._item}get layout(){return this._layout}get type(){return this._item.type}get contentItems(){return(this._item.contentItems??[]).map((t=>this._wrap(t)))}get parent(){const t=this._item.parent;return t?this._wrap(t):null}setActiveContentItem(t,e){if("stack"!==this.type)throw new Error(`Cannot call setActiveContentItem from a non-stack item: ${this.type}`);this._item.setActiveContentItem(t.raw,e)}static wrapInternal(t,e,i){const n=Ce.wrapCache.get(e);if(n)return n;const o=new t(e,i,(e=>Ce.wrapInternal(t,e,i)));return Ce.wrapCache.set(e,o),o}}ye=_e.BaseItem=Ce,Ce.wrapCache=new WeakMap;const we=t=>!!t&&"contentItems"in t&&(t.isRow||t.isColumn);class Ie extends ye{isRoot(){return!!this._item.parent?.isGround}getBounds(){return this._item.element.getBoundingClientRect()}get viewName(){if(this._item.isComponent){const{component:t}=this._item;return t.identity.name}throw new Error("View name not found")}onDestroyed(t){const e=({target:i})=>{i===this._item&&(t(),this._item.off("itemDestroyed",e))};this._item.on("itemDestroyed",e)}createAdjacentStack({position:t="right"}={}){const e=this.raw;if(ee.isStack(e)&&e.parent){const i=["top","bottom"].includes(t)?"column":"row",n=["left","top"].includes(t)?1:0,o=we(e.parent)?e.parent:e.layoutManager,s=o,r=e.parent.contentItems.indexOf(e);e.parent.isGround&&e.parent.removeChild(e,!0);const a=o.newItem({type:i,content:[{type:"stack",content:[]}]},r);if(!a)throw new Error("createAdjacentStack: Failed to create new container");const l=a.contentItems[0];return a.addChild(this.raw,n),we(s)&&s.removeChild(e,!0),this._wrap(l)}throw new Error(`Cannot creat adjacent stacks for type: ${e.type}, must be type 'stack'`)}setActiveContentItem(t,e=!0){if(!ee.isStack(this._item))throw new Error(`Cannot call setActiveContentItem from a non-stack item: ${this.type}`);this._item.setActiveComponentItem(t.raw,!e)}static wrap(t,e){return ye.wrapInternal(Ie,t,e)}}function be(t=[],e){for(const i of t)"component"===i.type?Object.keys(e).forEach((t=>{t in i&&(i.componentState={[`${de}${t}`]:i[t],...i.componentState}),i[t]=e[t]})):be(i.content,e)}function Se(t=[],e,i){for(const n of t)if("component"===n.type)Object.keys(e).forEach((t=>{if(`${de}${t}`in n.componentState)return n[t]=n.componentState[`${de}${t}`],void delete n.componentState[`${de}${t}`];n[t]=e[t]}));else{if(n.size&&("row"===i||"column"===i)){n["row"===i?"width":"height"]=n.size?.includes(".")?parseFloat(n.size):parseInt(n.size)}Se(n.content,e,n.type)}}function Ee(t){if(t.root){t.root.content&&Se([t.root],{componentName:"view",isClosable:!0});const e=t.root;t.content=[e],delete t.root}return t}const xe=e=>class extends e{connectedCallback(){if(!this.name||!this.uuid)throw new Error(" Name or uuid attribute missing");if(!this.src)throw new Error(" missing 'src' attribute.");this.#t||(this.#t=document.createElement("iframe"),this.#t.src=this.src,this.#t.style.height="100%",this.#t.style.width="100%",this.#t.style.border="none",this.forceFrameName?this.#t.setAttribute("name",this.forceFrameName):this.#t.setAttribute("name",t.encodeOptions({brokerUrl:this.brokerUrl,name:this.name,uuid:this.uuid,providerId:this.providerId,contextGroup:this.contextGroup},"of-frame")),this.#t.setAttribute("id",this.name),this.appendChild(this.#t))}#t;get brokerUrl(){return this.getAttribute("of-broker")}set brokerUrl(t){t&&this.setAttribute("of-broker",t)}get name(){return this.getAttribute("of-name")}set name(t){t&&this.setAttribute("of-name",t)}get forceFrameName(){return this.getAttribute("forceFrameName")}set forceFrameName(t){t&&this.setAttribute("forceFrameName",t)}get uuid(){return this.getAttribute("of-uuid")}set uuid(t){t&&this.setAttribute("of-uuid",t)}get src(){return this.getAttribute("src")}set src(t){t&&this.setAttribute("src",t)}get providerId(){return this.getAttribute("of-provider-id")}set providerId(t){t&&this.setAttribute("of-provider-id",t)}get contextGroup(){return this.getAttribute("of-context-group")}set contextGroup(t){t&&this.setAttribute("of-context-group",t)}static get observedAttributes(){return["name"]}};class Le{static create(t){const e=document.createElement("of-view");return Object.entries(t).forEach((([t,i])=>{e.setAttribute(t,i)})),e}}customElements.define("of-view",xe(HTMLElement));class ze{constructor(t,i,n,{brokerUrl:o,interopConfig:s},r){this.container=t,this.config=i,this.ofView=null,this.isDragging=()=>this.container.tab.element?.className.includes("lm_dragging")??!1;const{url:a,web:l,interop:h,name:d}=i||{},c=d??`internal-generated-view-${e.v4()}`;if(this.identity={uuid:n,name:c},this.container.element.setAttribute("of-name",c),this.container.element.id=`container-${c}`,this.container.parent.id=c,void 0===a)return void this.handleUrlMissing();const m=this.updateTitleIfNotSet(a),u={"of-broker":o,"of-uuid":n,"of-name":c,src:a};l?.frameName&&(u.forceFrameName=l.frameName);const p=h?.currentContextGroup??s?.currentContextGroup;p&&(u["of-context-group"]=p),s?.providerId&&(u["of-provider-id"]=s?.providerId),this.ofView=Le.create(u),this.ofView.title=m??`Iframe: ${a}`,r.appendChild(this.ofView),this.ofView.style.position="absolute"}updateTitleIfNotSet(t){return"view"===this.container.parent.title&&this.container.parent.setTitle(t),this.container.parent.title}handleUrlMissing(){const t=document.createElement("div");t.setAttribute("style","padding: 20px");t.innerText="No URL provided",this.container.element.appendChild(t)}destroy(){this.ofView?.remove(),this.ofView=null}closeView(){this.container.close()}resize(){if(this.ofView){if(this.isDragging())return void(this.ofView.style.display="none");const t=this.container.element.getBoundingClientRect();this.ofView.style.position="absolute",this.ofView.style.height=`${t.height}px`,this.ofView.style.width=`${t.width}px`,this.ofView.style.inset=`${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`,this.ofView.style.display="block"}}}class Me extends U{static overrideConfig(t){const e={...ue,...t.settings,...pe};return e.reorderEnabled?be(t.content,{isClosable:!0}):be(t.content,{reorderEnabled:!1}),{dimensions:me,...t,settings:e,header:{...ce,show:!1!==t.settings?.hasHeaders&&ce.show}}}constructor(t,e,i,{options:n},o,s){super(),this.identity=t,this.container=e,this.initialConfig=i,this.layoutManager=o,this.platformProvider=s,this.viewComponentsByContainerElement=new Map,this.layoutContentCache=_.getSingleInstance(),this.reparentingViews=new Set,this.goldenLayoutDestroyed=!1,this.createViewComponent=(t,e)=>{m.handleSharedView(this.layoutManager,this.identity,e);const i=new ze(t,e,this.identity.uuid,this.options,this.iframeContainer);return e&&!1===e[`${de}isClosable`]&&this.stylesheet.insertRule(`#tab-${i.identity.name} .lm_close_tab { display: none; }`),this.viewComponentsByContainerElement.set(t.element,i),this.resizeController.observeContainer(t.element),i},this.iframeContainer=document.createElement("div"),this.iframeContainer.id=`openfin-layout-iframe-container-${this.identity.layoutName}`,this.domEmitter=new V(e),this.setupStylesheets(),this.layout=new he(this.container),this.layout.resizeWithContainerAutomatically=!0,this.options=n,this.layout.registerComponent("view",this.createViewComponent),this.setupListeners(),this.resizeController=new ve(this),this.layout.loadLayout(Me.overrideConfig(i));const r=document.createElement("div");r.id=`openfin-layout-shadow-container-${this.identity.layoutName}`,r.attachShadow({mode:"open",delegatesFocus:!1}).appendChild(this.iframeContainer),this.container.appendChild(r),this.resizeController.observeMutations(this.container)}getStackByView({name:t}){const e=this.layout.findFirstComponentItemById(t);if(e?.parent&&e?.parent?.isStack)return Ie.wrap(e.parent,this)}getRoot(){return Ie.wrap(this.layout.rootItem,this)}async platformCloseView(t){const e=[...this.viewComponentsByContainerElement.values()].find((e=>e.identity.name===t.name));if(!e)throw new Error(`View with name: ${t.name} not found in layout.`);e.closeView()}async platformCreateView(t,{location:e,targetView:i}={}){if(i)throw new Error("TargetView not supported in web");const n={options:this.platformProvider.normalizeOptions(t),target:this.identity,location:e};return this.insertView(n)}setupStylesheets(){if(this.container.setAttribute("data-openfin-layout-name",this.identity.layoutName),this.stylesheet=new CSSStyleSheet,this.stylesheet.insertRule(".lm_close { display: none; }"),document.adoptedStyleSheets.push(this.stylesheet),this.initialConfig.settings?.preventSplitterResize){const t=`\n [data-openfin-layout-name='${this.identity.layoutName}'] .lm_splitter {\n pointer-events: none;\n }`;this.stylesheet.insertRule(t)}}insertView({options:t,location:e,targetView:i}){const n=e?this.layoutContentCache.getItemOrUndefined(e.id):void 0,o=i?this.layoutContentCache.getItemOrUndefined(i.name):void 0,s=n??o??Ie.wrap(this.layout.rootItem,this);let r;if(ee.isStack(s.raw))r=s.raw;else{if(!we(s.raw))throw new Error("Cannot add a view at the requested location");r=s.raw.newItem({type:"stack",content:[]})}const a=Math.min(r.contentItems.length,e?.index??r.contentItems.length);let l=this.layout.findFirstComponentItemById(t.name);l?(l.parent&&l.parent.removeChild(l,!0),r.addChild(l,a)):l=r.newComponent("view",t,t.title??t.url??"Default Title",a);const h=l.component.identity;return Promise.resolve({identity:h})}replaceView({viewToReplace:t,newView:e}){throw new Error("Method not implemented.")}replaceLayout(t){throw new Error("Method not implemented.")}async cleanupView(t){}applyPreset(t){throw new Error("Method not implemented.")}getCurrentViews(){return[...this.viewComponentsByContainerElement.values()].map((t=>t.identity))}async getFrameSnapshot(){return Ee(xt.fromResolved(this.layout.toConfig()))}isVisible(){return W(this.container)}async onViewDetached({viewIdentity:t}){this.reparentingViews.add(t.name),this.platformCloseView(t)}async destroy(){this.goldenLayoutDestroyed||(this.goldenLayoutDestroyed=!0,this.layout.destroy()),this.iframeContainer.remove(),this.resizeController.destroy(),document.adoptedStyleSheets=document.adoptedStyleSheets.filter((t=>t!==this.stylesheet)),this.viewComponentsByContainerElement.clear()}setupListeners(){this.container.addEventListener("pointerdown",(t=>{if(t.target instanceof HTMLElement){const e=t.target.classList;["lm_tab","lm_title","lm_splitter","lm_drag_handle"].some((t=>e.contains(t)))&&(this.handleDragStart(),2===t.button&&t.stopPropagation())}}),!0),document.addEventListener("pointerup",(()=>this.handleDragEnd()),!0),this.layout.on("tabCreated",(t=>{const e=t.componentItem.component;t.element.id=`tab-${e.identity.name}`,this.domEmitter.dispatchLocalEvent("tab-created",e.identity)})),this.layout.on("itemCreated",(({target:t})=>{const e=t;if(Gt.isComponentItem(e)){const t=e.component;this.domEmitter.dispatchLocalEvent("container-created",t.identity)}})),this.layout.on("itemDestroyed",(t=>{const e=t.target;if(Gt.isComponentItem(e)){const t=e.component;this.removeViewComponent(t)}})),this.layout.on("itemDropped",(()=>{this.handleDragEnd()}))}handleDragStart(){this.iframeContainer.style.pointerEvents="none"}handleDragEnd(){this.iframeContainer.style.pointerEvents=""}removeViewComponent(t){if(t.config&&!1===t.config[`${de}isClosable`]){const e=[...this.stylesheet.cssRules].findIndex((e=>e.cssText.includes(`#tab-${t.identity.name}`)));this.stylesheet.deleteRule(e)}t.destroy(),this.viewComponentsByContainerElement.delete(t.container.element),this.resizeController.unobserveContainer(t.container.element),this.reparentingViews.has(t.identity.name)?this.reparentingViews.delete(t.identity.name):this.platformProvider.closeView(t.identity.name);0===this.getCurrentViews().length&&(this.goldenLayoutDestroyed||(this.goldenLayoutDestroyed=!0,m.handleLastViewRemoved(this.layoutManager,this.identity)))}}class Pe{constructor(t,e,i,n){this.windowIdentity=t,this.connectConfig=e,this.provider=i,this.fallbackContainer=n}async createLayout(t,e){if(!("container"in t)&&!this.fallbackContainer)throw new Error("Container property is not optional in web");const{layoutName:i}=t,n=t,o=this.provider.initLayoutViews(n),s=n.container??this.fallbackContainer,r={...this.windowIdentity,layoutName:i},a=new Me(r,s,o,this.connectConfig,e,this.provider);m.registerLayout(e,i,a),this.fallbackContainer=null}async getLayoutSnapshot(t){return t.getLayoutSnapshot()}async handleLastViewRemoved(t){}}class Te{static async init(e){const i=e.getFin().InterApplicationBus.Channel,n=await i.create(`custom-frame-${e.me.uuid}`);return n.setDefaultAction((async(t,{target:e,opts:i},o)=>{const s=n.connections.find((t=>t.name===e.name));if(s)return n.dispatch(s,t,{...i,target:e});throw new Error(`Client with name ${e.name} not found`)})),await t.relayChannelClientApi_1(n,"layout-relay"),new Te(e)}constructor(t){this.wire=t,this.viewNames=new Set}normalizeOptions(t,i="default"){const n=this.wire.me.uuid;let{name:o=`internal-generated-view-${e.v4()}`}=t;return o.match(/^internal-generated-view-/)&&this.viewNames.has(o)&&"duplicate"===i&&(o=`internal-generated-view-${e.v4()}`),this.viewNames.add(o),{...t,name:o,uuid:n}}closeView(t){this.viewNames.delete(t)}initLayoutViews({layout:t,multiInstanceViewBehavior:e}){return H((t=>{if("component"===t.type&&t.componentState){const i=this.normalizeOptions(t.componentState,e);return{...t,componentState:i}}return t}),t)}}var Ae;const ke=t=>t;Ae=new WeakMap,exports.WebLayoutEntryPoint=class{constructor(e){Ae.set(this,void 0),this.initLayoutManager=async(e,i,{container:n,layoutManagerOverride:o})=>{const s=await Te.init(i),r=o??ke,a=new Pe(i.me,t.__classPrivateFieldGet(this,Ae,"f"),s,n),l=new(r(m.createClosedConstructor(a)));return await M(i,l),l},this.applyLayoutSnapshot=async(e,i,n)=>{await i.applyLayoutSnapshot(t.__classPrivateFieldGet(this,Ae,"f").platform.layoutSnapshot)},this.createLayout=async(t,e)=>m.createLayout(t,e),this.destroyLayout=async(t,e)=>m.destroyLayout(t,e),t.__classPrivateFieldSet(this,Ae,e,"f")}}; @@ -7340,7 +7340,7 @@ module.exports = stubFalse; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.init = init; -const core_web_1 = __webpack_require__(/*! @openfin/core-web */ "./node_modules/@openfin/core-web/out/api-client.js"); +const core_web_1 = __webpack_require__(/*! @openfin/core-web */ "../../node_modules/@openfin/core-web/out/api-client.js"); const settings_1 = __webpack_require__(/*! ./settings */ "./client/src/platform/settings.ts"); /** * Initializes the OpenFin Web Broker connection. @@ -8387,7 +8387,7 @@ function version(uuid) { /******/ /************************************************************************/ var __webpack_exports__ = {}; -// This entry need to be wrapped in an IIFE because it need to be in strict mode. +// This entry needs to be wrapped in an IIFE because it needs to be in strict mode. (() => { "use strict"; var exports = __webpack_exports__; diff --git a/web/v19.2.0/cloud-interop/js/fdc3-panel.bundle.js.map b/web/v19.2.0/cloud-interop/js/fdc3-panel.bundle.js.map index 83a67ea..716b8ca 100644 --- a/web/v19.2.0/cloud-interop/js/fdc3-panel.bundle.js.map +++ b/web/v19.2.0/cloud-interop/js/fdc3-panel.bundle.js.map @@ -1 +1 @@ -{"version":3,"file":"fdc3-panel.bundle.js","mappings":";;;;;;;;;;AAAa,MAAM,mBAAO,CAAC,iFAAoB,EAAE,mBAAO,CAAC,mDAAS,EAAE,mBAAO,CAAC,+DAAM,EAAE,mBAAO,CAAC,mDAAQ,EAAE,mBAAO,CAAC,gEAAkB,EAAE,mBAAO,CAAC,4DAAgB,EAAE,eAAe;;;;;;;;;;;;ACA9J,MAAM,mBAAO,CAAC,mDAAS,IAAI,mBAAO,CAAC,mDAAQ,IAAI,mBAAO,CAAC,gEAAkB,IAAI,mBAAO,CAAC,4DAAgB,IAAI,mBAAO,CAAC,+DAAM,EAAE,kBAAkB,EAAE,GAAG,wBAAwB,GAAG,sGAAsG,q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AAuB,SAAS,MAAM,OAAO,cAAc,eAAe,2BAA2B,OAAO,eAAe,sDAAsD,oCAAoC,IAAI,iIAAiI,sBAAsB,yCAAyC,2FAA2F;;;;;;;;;;;;ACFv6nD;;AAEZ,kBAAkB;AAClB,mBAAmB;AACnB,qBAAqB;;AAErB;AACA;AACA;;AAEA;AACA,mCAAmC,SAAS;AAC5C;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,cAAc,SAAS;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,2CAA2C,UAAU;AACrD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;ACrJA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEY;;AAEZ,eAAe,mBAAO,CAAC,wDAAW;AAClC,gBAAgB,mBAAO,CAAC,oDAAS;AACjC;AACA;AACA;AACA;;AAEA,cAAc;AACd,kBAAkB;AAClB,yBAAyB;;AAEzB;AACA,kBAAkB;;AAElB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,kBAAkB,YAAY;AAC9B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA,wCAAwC,SAAS;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;;AAEA;AACA;AACA,cAAc,iBAAiB;AAC/B;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,iDAAiD,EAAE;AACnD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C;AAC1C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA,yBAAyB,eAAe;AACxC;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,yBAAyB,QAAQ;AACjC;AACA,sBAAsB,eAAe;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc,YAAY;AAC1B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB,sBAAsB;AACxC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,mBAAmB;AACnB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA,oBAAoB,SAAS;AAC7B;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA,qBAAqB,WAAW,GAAG,IAAI;AACvC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA,gBAAgB,WAAW,GAAG,IAAI,KAAK,aAAa;AACpD;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;;AAEA;AACA,GAAG;AACH;AACA;AACA,mBAAmB,KAAK,mDAAmD,cAAc;AACzF,GAAG;AACH;AACA;AACA,+BAA+B,IAAI;AACnC;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,MAAM,aAAa,SAAS;AACtD;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,SAAS,gBAAgB;AACzB,cAAc,oBAAoB,EAAE,IAAI;AACxC;AACA,YAAY,gBAAgB,EAAE,IAAI;AAClC;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,GAAG,SAAS,GAAG,KAAK,qBAAqB,EAAE,EAAE;AACpE,QAAQ;AACR,yBAAyB,GAAG,KAAK,yBAAyB,EAAE,EAAE;AAC9D,mBAAmB,yBAAyB,EAAE,EAAE;AAChD;AACA,MAAM;AACN,oBAAoB,IAAI,EAAE,GAAG,SAAS,IAAI,EAAE,EAAE;AAC9C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,0CAA0C,cAAc,SAAS,OAAO;AACxE;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,kBAAkB,YAAY;AAC9B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,kBAAkB,gBAAgB;AAClC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,kBAAkB,gBAAgB;AAClC;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,cAAc,YAAY;AAC1B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,QAAQ;AAC1B;AACA,oBAAoB,QAAQ;AAC5B;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;;;;;ACzjEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEa;;AAEb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB;;AAEnB;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,sBAAsB;AACxC;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA,eAAe;AACf;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA,oBAAoB,SAAS;AAC7B;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;;AAEA,kCAAkC,QAAQ;AAC1C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oBAAoB,iBAAiB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,QAAQ;AACR;AACA,uCAAuC,QAAQ;AAC/C;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,OAAO;AACzB;AACA;AACA;;AAEA;AACA,SAAS,yBAAyB;AAClC;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,gBAAgB;AAClC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,8DAA8D,YAAY;AAC1E;AACA,8DAA8D,YAAY;AAC1E;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,qCAAqC,YAAY;AACjD;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;AACA;;;;;;;;;;;AChfA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,SAAS,WAAW;;AAEpB;AACA;AACA;AACA,SAAS,WAAW;;AAEpB;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA,SAAS,WAAW;;AAEpB;AACA;AACA,SAAS,UAAU;;AAEnB;AACA;;;;;;;;;;;ACpFA,gBAAgB,mBAAO,C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;;;;;;;ACxBA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,kBAAkB,mBAAO,CAAC,+DAAe;AACzC,cAAc,mBAAO,CAAC,uDAAW;AACjC,eAAe,mBAAO,CAAC,yDAAY;AACnC,cAAc,mBAAO,CAAC,yDAAY;AAClC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,SAAS;AACpB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AChDA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACnBA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,UAAU;AACrB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACtBA,sBAAsB,mBAAO,CAAC,yEAAoB;AAClD,SAAS,mBAAO,CAAC,6CAAM;;AAEvB;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC3BA,SAAS,mBAAO,CAAC,6CAAM;;AAEvB;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpBA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,WAAW,mB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BAAO,CAAC,mDAAS;AAC7B,WAAW,mBAAO,CAAC,iDAAQ;AAC3B,aAAa,mBAAO,CAAC,qDAAU;;AAE/B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,SAAS;AACpB;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa,GAAG;AAChB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;AACA,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;;;;;;;;;;ACrKA,eAAe,mBAAO,CAAC,yDAAY;;AAEnC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;;;;;;;;;;AC7BA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,cAAc,mBAAO,CAAC,uDAAW;;AAEjC;AACA;AACA;AACA;AACA;AACA;AACA,WA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Q;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClFA,aAAa,mBAAO,CAAC,uDAAW;AAChC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA,iBAAiB,mBAAO,CAAC,6DAAc;AACvC,eAAe,mBAAO,CAAC,2DAAa;AACpC,eAAe,mBAAO,CAAC,yDAAY;AACnC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;AACA;AACA;AACA,oCAAoC;;AAEpC;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC9CA,aAAa,mBAAO,CAAC,uDAAW;AAChC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,eAAe,mBAAO,CAAC,yDAAY;AACnC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC3DA,kBAAkB,mBAAO,CAAC,iEAAgB;AAC1C,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC7BA,eAAe,mBAAO,CAAC,yDAAY;AACnC,kBAAkB,mBAAO,CAAC,iEAAgB;AAC1C,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AChCA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACnBA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,aAAa,UAAU;AACvB;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACbA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACZA,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,aAAa,aAAa;AAC1B;AACA;AACA;AACA;AACA;AACA;;AAE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ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACnFA,aAAa,mBAAO,CAAC,uDAAW;AAChC,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,SAAS,mBAAO,CAAC,6CAAM;AACvB,kBAAkB,mBAAO,CAAC,iEAAgB;AAC1C,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC/GA,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;A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AAoB;;AAElD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC5EA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,mBAAmB,mBAAO,CAAC,mEAAiB;AAC5C,kBAAkB,mBAAO,CAAC,iEAAgB;;AAE1C;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACxBA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACdA,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACnBA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;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mBAAO,CAAC,+DAAe;;AAExC;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;ACRA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACbA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;;;;;;;;;;ACjBA,gBAAgB,mBAAO,CAAC,6DAAc;;AAEtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACdA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,GAAG;AAChB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACbA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACbA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,UAAU,mBAAO,CAAC,iDAAQ;AAC1B,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjCA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;;;;;;;;;;;ACzBA,gBAAgB,mBAAO,CAAC,6DAAc;;AAEtC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,GAAG;AAChB;AACA;AACA;AACA,oBAAoB,QAAQ,IAAI,QAAQ;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,kBAAkB;AAClB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpCA,sBAAsB,mBAAO,CAAC,yEAAoB;AAClD,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA,8BAA8B,mBAAmB;AACjD;AACA;AACA;AACA;AACA;AACA,+CAA+C,mBAAmB;AAClE;AACA;AACA;;AAEA;;;;;;;;;;;ACnCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACzBA,iBAAiB,mBAAO,CAAC,6DAAc;AACvC,eAAe,mBAAO,CAAC,yDAAY;;AAEnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AChCA,WAAW,mBAAO,CAAC,mDAAS;AAC5B,gBAAgB,mBAAO,CAAC,2DAAa;;AAErC;AACA,kBAAkB,KAA0B;;AAE5C;AACA,gCAAgC,QAAa;;AAE7C;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACrCA,kBAAkB,mBAAO,CAAC,iEAAgB;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,kBAAkB;AAClB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClCA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,eAAe,mBAAO,CAAC,yDAAY;;AAEnC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpCA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClCA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC1BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC9BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC5BA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC1BA,uBAAuB,mBAAO,CAAC,2EAAqB;AACpD,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC1BA,oBAAoB,mBAAO,CAAC,qEAAkB;AAC9C,eAAe,mBAAO,CAAC,2DAAa;AACpC,kBAAkB,mBAAO,CAAC,+DAAe;;AAEzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;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ACA;;;AAGA;AACA;AACA;AACA;;AAEA,kBAAkB,cAAc;AAChC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,kBAAkB,cAAc;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,kBAAkB,aAAa;AAC/B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,iEAAe,GAAG;;;;;;;;;;;;;;;ACtNlB,iEAAe,sCAAsC;;;;;;;;;;;;;;;;ACAhB;;AAErC;AACA,OAAO,wDAAQ;AACf;AACA;;AAEA;AACA,gCAAgC;;AAEhC;AACA;AACA;AACA,qBAAqB;;AAErB;AACA,qBAAqB;;AAErB;AACA,qBAAqB;;AAErB;AACA,qBAAqB;AACrB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,iEAAe,KAAK;;;;;;;;;;;;;;;AClCpB,iEAAe,cAAc,EAAE,UAAU,EAAE,eAAe,EAAE,gBAAgB,EAAE,UAAU,GAAG,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,GAAG,QAAQ,CAAC,aAAa,CAAkB,cAAc,CAAC,CAAC;IAChF,MAAM,cAAc,GAAG,QAAQ,CAAC,aAAa,CAAiB,cAAc,CAAC,CAAC;IAE9E,IAAI,eAAe,KAAK,IAAI,IAAI,eAAe,KAAK,IAAI,IAAI,cAAc,KAAK,IAAI,EAAE,CAAC;QACrF,eAAe,CAAC,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;QAC3C,eAAe,CAAC,WAAW,GAAG,OAAO,CAAC,IAAI,IAAI,mBAAmB,CAAC;QAClE,cAAc,CAAC,WAAW,GAAG,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;IAC/D,CAAC;AACF,CAAC;AAED;;GAEG;AACH,KAAK,UAAU,aAAa;IAC3B,MAAM,eAAe,EAAE,CAAC;AACzB,CAAC","sources":["webpack://openfin-web--cloud-interop/./node_modules/@openfin/core-web/out/api-client.js","webpack://openfin-web--cloud-interop/./node_modules/@openfin/core-web/out/main-8cad4070.js","webpack://openfin-web--cloud-interop/./node_modules/@openfin/core-web/out/main-b14f67c9.js","webpack://openfin-web--cloud-interop/../../node_modules/base64-js/index.js","webpack://openfin-web--cloud-interop/../../node_modules/buffer/index.js","webpack://openfin-web--cloud-interop/../../node_modules/events/events.js","webpack://openfin-web--cloud-interop/../../node_modules/ieee754/index.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_DataView.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_Hash.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_ListCache.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_Map.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_MapCache.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_Promise.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_Set.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_SetCache.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_Stack.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_Symbol.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_Uint8Array.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_WeakMap.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_arrayEach.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_arrayFilter.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_arrayLikeKeys.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_arrayPush.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_arraySome.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_assignValue.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_assocIndexOf.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseAssign.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseAssignIn.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseAssignValue.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseClone.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseCreate.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseGetAllKeys.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseGetTag.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseIsArguments.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseIsEqual.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseIsEqualDeep.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseIsMap.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseIsNative.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseIsSet.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseIsTypedArray.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseKeys.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseKeysIn.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseTimes.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseUnary.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_cacheHas.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_cloneArrayBuffer.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_cloneBuffer.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_cloneDataView.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_cloneRegExp.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_cloneSymbol.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_cloneTypedArray.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_copyArray.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_copyObject.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_copySymbols.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_copySymbolsIn.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_coreJsData.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_defineProperty.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_equalArrays.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_equalByTag.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_equalObjects.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_freeGlobal.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_getAllKeys.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_getAllKeysIn.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_getMapData.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_getNative.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_getPrototype.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_getRawTag.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_getSymbols.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_getSymbolsIn.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_getTag.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_getValue.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_hashClear.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_hashDelete.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_hashGet.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_hashHas.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_hashSet.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_initCloneArray.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_initCloneByTag.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_initCloneObject.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_isIndex.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_isKeyable.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_isMasked.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_isPrototype.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_listCacheClear.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_listCacheDelete.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_listCacheGet.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_listCacheHas.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_listCacheSet.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_mapCacheClear.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_mapCacheDelete.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_mapCacheGet.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_mapCacheHas.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_mapCacheSet.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_mapToArray.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_nativeCreate.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_nativeKeys.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_nativeKeysIn.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_nodeUtil.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_objectToString.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_overArg.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_root.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_setCacheAdd.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_setCacheHas.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_setToArray.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_stackClear.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_stackDelete.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_stackGet.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_stackHas.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_stackSet.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_toSource.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/cloneDeep.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/eq.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/isArguments.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/isArray.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/isArrayLike.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/isBuffer.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/isEqual.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/isFunction.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/isLength.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/isMap.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/isObject.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/isObjectLike.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/isSet.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/isTypedArray.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/keys.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/keysIn.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/stubArray.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/stubFalse.js","webpack://openfin-web--cloud-interop/./client/src/platform/api.ts","webpack://openfin-web--cloud-interop/./client/src/platform/settings.ts","webpack://openfin-web--cloud-interop/../../node_modules/uuid/dist/esm-browser/index.js","webpack://openfin-web--cloud-interop/../../node_modules/uuid/dist/esm-browser/md5.js","webpack://openfin-web--cloud-interop/../../node_modules/uuid/dist/esm-browser/nil.js","webpack://openfin-web--cloud-interop/../../node_modules/uuid/dist/esm-browser/parse.js","webpack://openfin-web--cloud-interop/../../node_modules/uuid/dist/esm-browser/regex.js","webpack://openfin-web--cloud-interop/../../node_modules/uuid/dist/esm-browser/rng.js","webpack://openfin-web--cloud-interop/../../node_modules/uuid/dist/esm-browser/sha1.js","webpack://openfin-web--cloud-interop/../../node_modules/uuid/dist/esm-browser/stringify.js","webpack://openfin-web--cloud-interop/../../node_modules/uuid/dist/esm-browser/v1.js","webpack://openfin-web--cloud-interop/../../node_modules/uuid/dist/esm-browser/v3.js","webpack://openfin-web--cloud-interop/../../node_modules/uuid/dist/esm-browser/v35.js","webpack://openfin-web--cloud-interop/../../node_modules/uuid/dist/esm-browser/v4.js","webpack://openfin-web--cloud-interop/../../node_modules/uuid/dist/esm-browser/v5.js","webpack://openfin-web--cloud-interop/../../node_modules/uuid/dist/esm-browser/validate.js","webpack://openfin-web--cloud-interop/../../node_modules/uuid/dist/esm-browser/version.js","webpack://openfin-web--cloud-interop/webpack/bootstrap","webpack://openfin-web--cloud-interop/webpack/runtime/define property getters","webpack://openfin-web--cloud-interop/webpack/runtime/global","webpack://openfin-web--cloud-interop/webpack/runtime/hasOwnProperty shorthand","webpack://openfin-web--cloud-interop/webpack/runtime/make namespace object","webpack://openfin-web--cloud-interop/webpack/runtime/node module decorator","webpack://openfin-web--cloud-interop/./client/src/content/fdc3-panel.ts"],"sourcesContent":["\"use strict\";var e=require(\"./main-8cad4070.js\");require(\"buffer/\"),require(\"uuid\"),require(\"events\"),require(\"lodash/cloneDeep\"),require(\"lodash/isEqual\"),exports.connect=e.connect;\n","\"use strict\";var e=require(\"buffer/\"),t=require(\"events\"),n=require(\"lodash/cloneDeep\"),i=require(\"lodash/isEqual\"),r=require(\"uuid\");const o=(e,t)=>`${t}<${btoa(JSON.stringify(e))}>`;var s=\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof window?window:\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:{},a={},c={},d={},h={};async function l(e){const t=[];for(const n of e){const e=await n();t.push(e)}return t}Object.defineProperty(h,\"__esModule\",{value:!0}),h.promiseMapSerial=h.serial=h.promiseMap=h.promisify=void 0,h.promisify=function(e){return(...t)=>new Promise(((n,i)=>{e(...t,((e,t)=>e?i(e):n(t)))}))},h.promiseMap=async function(e,t){return Promise.all(e.map(t))},h.serial=l,h.promiseMapSerial=async function(e,t){return l(e.map(((e,n,i)=>()=>t(e,n,i))))};var u,p=s&&s.__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},w=s&&s.__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)};Object.defineProperty(d,\"__esModule\",{value:!0}),d.Reply=d.EmitterBase=d.Base=void 0;const y=h;class f{constructor(e){this.isNodeEnvironment=()=>\"node\"===this.wire.environment.type,this.isOpenFinEnvironment=()=>\"openfin\"===this.wire.environment.type,this.isBrowserEnvironment=()=>\"other\"===this.wire.environment.type,this.wire=e}get fin(){return this.wire.getFin()}get me(){return this.wire.me}}d.Base=f;d.EmitterBase=class extends f{constructor(e,t,...n){super(e),this.topic=t,u.set(this,void 0),this.eventNames=()=>this.hasEmitter()?this.getOrCreateEmitter().eventNames():[],this.emit=(e,t,...n)=>!!this.hasEmitter()&&this.getOrCreateEmitter().emit(e,t,...n),this.hasEmitter=()=>this.wire.eventAggregator.has(w(this,u,\"f\")),this.getOrCreateEmitter=()=>this.wire.eventAggregator.getOrCreate(w(this,u,\"f\")),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[],this.listenerCount=e=>this.hasEmitter()?this.getOrCreateEmitter().listenerCount(e):0,this.registerEventListener=async(e,t={},n,i)=>{const r={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e},o=this.getOrCreateEmitter();n(o);try{await this.wire.sendAction(\"subscribe-to-desktop-event\",r)}catch(e){throw i(o),this.deleteEmitterIfNothingRegistered(o),e}},this.deregisterEventListener=async(e,t={})=>{if(this.hasEmitter()){const n={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e};await this.wire.sendAction(\"unsubscribe-to-desktop-event\",n).catch((()=>null));return this.getOrCreateEmitter()}return Promise.resolve()},p(this,u,[t,...n],\"f\"),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[]}async on(e,t,n){return await this.registerEventListener(e,n,(n=>{n.on(e,t)}),(n=>{n.removeListener(e,t)})),this}async addListener(e,t,n){return this.on(e,t,n)}async once(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.once(e,i),n.once(e,t)}),(n=>{n.removeListener(e,i),n.removeListener(e,t)})),this}async prependListener(e,t,n){return await this.registerEventListener(e,n,(n=>{n.prependListener(e,t)}),(n=>{n.removeListener(e,t)})),this}async prependOnceListener(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.prependOnceListener(e,t),n.once(e,i)}),(n=>{n.removeListener(e,t),n.removeListener(e,i)})),this}async removeListener(e,t,n){const i=await this.deregisterEventListener(e,n);return i&&(i.removeListener(e,t),this.deleteEmitterIfNothingRegistered(i)),this}async deregisterAllListeners(e){const t={...this.identity,type:e,topic:this.topic};if(this.hasEmitter()){const e=this.getOrCreateEmitter(),n=e.listenerCount(t.type),i=[];for(let e=0;enull)));return await Promise.all(i),e}}async removeAllListeners(e){const t=async e=>{const t=await this.deregisterAllListeners(e);t&&(t.removeAllListeners(e),this.deleteEmitterIfNothingRegistered(t))};if(e)await t(e);else if(this.hasEmitter()){const e=this.getOrCreateEmitter().eventNames();await(0,y.promiseMap)(e,t)}return this}deleteEmitterIfNothingRegistered(e){0===e.eventNames().length&&this.wire.eventAggregator.delete(w(this,u,\"f\"))}},u=new WeakMap;d.Reply=class{};var g={};Object.defineProperty(g,\"__esModule\",{value:!0});var m=g.RuntimeError=g.NotSupportedError=g.NotImplementedError=g.NoAckError=g.DuplicateCorrelationError=g.UnexpectedActionError=g.DisconnectedError=void 0;class v extends Error{constructor(e){super(`Expected websocket state OPEN but found ${e}`),this.readyState=e}}g.DisconnectedError=v;class C extends Error{}g.UnexpectedActionError=C;class b extends Error{}g.DuplicateCorrelationError=b;class I extends Error{}g.NoAckError=I;class E extends Error{}g.NotImplementedError=E;class x extends Error{}g.NotSupportedError=x;class A extends Error{constructor(e){const{message:t,name:n,stack:i,...r}=e;super(t),this.name=n||\"Error\",this.stack=i??this.toString(),Object.keys(r).forEach((e=>{this[e]=r[e]}))}}class P extends Error{static getCallSite(e=0){const t=Error.stackTraceLimit,n=e+1;Error.stackTraceLimit=t+n;const i=Error.prepareStackTrace;Error.prepareStackTrace=(e,t)=>t;const r=(new Error).stack?.slice(n)??[];return Error.prepareStackTrace=i,Error.stackTraceLimit=t,r}static prepareStackTrace(e,t){if(\"function\"==typeof Error.prepareStackTrace)return Error.prepareStackTrace(e,t);let n=\"\";n+=e.name||\"Error\",n+=`: ${e.message||\"\"}`;for(const e of t)n+=`\\n at ${e.toString()}`;return n}constructor(e,t){const{reason:n,error:i}=e;super(n),this.name=\"RuntimeError\",i?.stack&&(this.cause=new A(i)),t&&(this.stack=P.prepareStackTrace(this,t))}}m=g.RuntimeError=P;var M={},_={},O={};Object.defineProperty(O,\"__esModule\",{value:!0}),O.validateIdentity=void 0,O.validateIdentity=function(e){let t;return\"object\"==typeof e&&\"string\"==typeof e.uuid||(t=\"Not a valid identity object\"),t};var S={},R={},F={},j={},k={},L={},T={};Object.defineProperty(T,\"__esModule\",{value:!0}),T.handleDeprecatedWarnings=void 0;var $;T.handleDeprecatedWarnings=e=>{(e.contentNavigation?.whitelist||e.contentNavigation?.blacklist||e.contentRedirect?.whitelist||e.contentRedirect?.blacklist)&&console.warn(\"The properties 'whitelist' and 'blacklist' have been marked as deprecated and will be removed in a future version. Please use 'allowlist' and 'denylist'.\")};var B={},G={};Object.defineProperty(G,\"__esModule\",{value:!0}),G.AsyncRetryableLazy=W=G.Lazy=void 0;var W=G.Lazy=class{constructor(e){this.producerFn=e}getValue(){return this.value||(this.value=this.producerFn()),this.value}};G.AsyncRetryableLazy=class{constructor(e){this.producerFn=e}async getValue(){return this.promise||(this.promise=this.producerFn().catch((e=>{throw delete this.promise,e}))),this.promise}};var H={};Object.defineProperty(H,\"__esModule\",{value:!0}),H.WebContents=void 0;const N=d;class D extends N.EmitterBase{constructor(e,t,n){super(e,n,t.uuid,t.name),this.identity=t,this.entityType=n}capturePage(e){return this.wire.sendAction(\"capture-page\",{options:e,...this.identity}).then((({payload:e})=>e.data))}executeJavaScript(e){return this.wire.sendAction(\"execute-javascript-in-window\",{...this.identity,code:e}).then((({payload:e})=>e.data))}getZoomLevel(){return this.wire.sendAction(\"get-zoom-level\",this.identity).then((({payload:e})=>e.data))}setZoomLevel(e){return this.wire.sendAction(\"set-zoom-level\",{...this.identity,level:e}).then((()=>{}))}navigate(e){return this.wire.sendAction(\"navigate-window\",{...this.identity,url:e}).then((()=>{}))}navigateBack(){return this.wire.sendAction(\"navigate-window-back\",{...this.identity}).then((()=>{}))}async navigateForward(){await this.wire.sendAction(\"navigate-window-forward\",{...this.identity})}stopNavigation(){return this.wire.sendAction(\"stop-window-navigation\",{...this.identity}).then((()=>{}))}reload(e=!1){return this.wire.sendAction(\"reload-window\",{ignoreCache:e,...this.identity}).then((()=>{}))}print(e={}){return this.wire.sendAction(\"print\",{...this.identity,options:e}).then((()=>{}))}findInPage(e,t){return this.wire.sendAction(\"find-in-page\",{...this.identity,searchTerm:e,options:t}).then((({payload:e})=>e.data))}stopFindInPage(e){return this.wire.sendAction(\"stop-find-in-page\",{...this.identity,action:e}).then((()=>{}))}getPrinters(){return this.wire.sendAction(\"get-printers\",{...this.identity}).then((({payload:e})=>e.data))}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){await this.wire.sendAction(\"focus-window\",{emitSynthFocused:e,...this.identity})}async showDeveloperTools(){await this.wire.sendAction(\"show-developer-tools\",this.identity)}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction(\"get-process-info\",this.identity);return e}async getSharedWorkers(){return this.wire.sendAction(\"get-shared-workers\",this.identity).then((({payload:e})=>e.data))}async inspectSharedWorker(){await this.wire.sendAction(\"inspect-shared-worker\",{...this.identity})}async inspectSharedWorkerById(e){await this.wire.sendAction(\"inspect-shared-worker-by-id\",{...this.identity,workerId:e})}async inspectServiceWorker(){await this.wire.sendAction(\"inspect-service-worker\",{...this.identity})}async showPopupWindow(e){if(this.wire.sendAction(`${this.entityType}-show-popup-window`,this.identity).catch((()=>{})),e?.onPopupReady){const t=async({popupName:t})=>{try{const n=this.fin.Window.wrapSync({uuid:this.fin.me.uuid,name:t});await e.onPopupReady(n)}catch(e){throw new Error(`Something went wrong during onPopupReady execution: ${e}`)}};await this.once(\"popup-ready\",t)}const{payload:t}=await this.wire.sendAction(\"try-create-popup-window\",{options:{...e,hasResultCallback:!!e?.onPopupResult,hasReadyCallback:!!e?.onPopupReady},...this.identity}),{data:{willOpen:n,options:i}}=t;n&&await this.fin.Window.create(i.initialOptions);if(e?.onPopupResult){const t=async t=>{await e.onPopupResult((e=>{const{name:t,uuid:n,result:i,data:r}=e,o={identity:{name:t,uuid:n},result:i};return r&&(o.data=r),o})(t))},n=async()=>{await this.removeListener(\"popup-result\",t)};await this.on(\"popup-result\",t),await this.once(\"popup-teardown\",n)}const{payload:r}=await this.wire.sendAction(\"show-popup-window\",{options:i,...this.identity});return r.data}}var U,V,z,K,q;function J(){return V||(V=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(function(){if($)return L;$=1,Object.defineProperty(L,\"__esModule\",{value:!0}),L.ViewModule=void 0;const e=d,t=O,n=J(),i=T;class r extends e.Base{async create(e){const{uuid:t}=this.wire.me;if(!e.name||\"string\"!=typeof e.name)throw new Error(\"Please provide a name property as a string in order to create a View.\");return(0,i.handleDeprecatedWarnings)(e),this.wire.environment.childViews?await this.wire.environment.createChildContent({entityType:\"view\",options:{...e,uuid:t}}):await this.wire.sendAction(\"create-view\",{...e,uuid:t}),this.wrapSync({uuid:t,name:e.name})}async wrap(e){this.wire.sendAction(\"view-wrap\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}wrapSync(e){this.wire.sendAction(\"view-wrap-sync\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}getCurrent(){if(this.wire.sendAction(\"view-get-current\").catch((e=>{})),!this.wire.me.isView)throw new Error(\"You are not in a View context\");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction(\"view-get-current-sync\").catch((e=>{})),!this.wire.me.isView)throw new Error(\"You are not in a View context\");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return L.ViewModule=r,L}(),e),n(function(){if(U)return B;var e;U=1,Object.defineProperty(B,\"__esModule\",{value:!0}),B.View=void 0;const t=g,n=G,i=H,r=ie();class o extends i.WebContents{constructor(i,o){super(i,o,\"view\"),this.identity=o,e.set(this,new n.Lazy((()=>this.fin.Platform.wrapSync(this.identity).getClient()))),this.attach=async e=>{await this.wire.sendAction(\"attach-view\",{target:e,...this.identity})},this.destroy=async()=>{await this.wire.sendAction(\"destroy-view\",{...this.identity})},this.show=async()=>{await this.wire.sendAction(\"show-view\",{...this.identity})},this.showAt=async(e,t={})=>{await this.wire.sendAction(\"show-view-at\",{bounds:e,...this.identity,options:t})},this.bringToFront=async()=>{await this.wire.sendAction(\"bring-view-to-front\",{...this.identity})},this.hide=async()=>{await this.wire.sendAction(\"hide-view\",{...this.identity})},this.setBounds=async e=>{await this.wire.sendAction(\"set-view-bounds\",{bounds:e,...this.identity})},this.getBounds=async()=>(await this.wire.sendAction(\"get-view-bounds\",{...this.identity})).payload.data,this.getInfo=async()=>(await this.wire.sendAction(\"get-view-info\",{...this.identity})).payload.data,this.getParentLayout=async()=>(this.wire.sendAction(\"view-get-parent-layout\",{...this.identity}).catch((()=>{})),this.fin.Platform.Layout.getLayoutByViewIdentity(this.identity)),this.getOptions=async()=>this.wire.sendAction(\"get-view-options\",{...this.identity}).then((({payload:e})=>e.data)),this.updateOptions=async e=>this.wire.sendAction(\"update-view-options\",{options:e,...this.identity}).then((()=>{})),this.getCurrentWindow=async()=>{const{payload:{data:e}}=await this.wire.sendAction(\"get-view-window\",{...this.identity});return new r._Window(this.wire,e)},this.getCurrentStack=async()=>{this.wire.sendAction(\"view-get-current-stack\").catch((()=>{}));try{return(await this.getParentLayout()).getStackByViewIdentity(this.identity)}catch(e){throw new t.RuntimeError({reason:\"This view does not belong to a stack.\",error:e})}},this.triggerBeforeUnload=async()=>(await this.wire.sendAction(\"trigger-before-unload\",{...this.identity})).payload.data,this.bindToElement=async e=>{if(!e)throw new Error(\"Element not found.\");return this.wire.environment.observeBounds(e,(async e=>this.setBounds(e)))}}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){const t=await this.getCurrentWindow();await t.focusedWebViewWasChanged(),await super.focus({emitSynthFocused:e})}}return B.View=o,e=new WeakMap,B}(),e)}(k)),k}function Y(){if(z)return j;z=1,Object.defineProperty(j,\"__esModule\",{value:!0}),j.Application=void 0;const e=d,t=ie(),n=J();class i extends e.EmitterBase{constructor(e,n){super(e,\"application\",n.uuid),this.identity=n,this.window=new t._Window(this.wire,{uuid:this.identity.uuid,name:this.identity.uuid})}windowListFromIdentityList(e){const n=[];return e.forEach((e=>{n.push(new t._Window(this.wire,{uuid:e.uuid,name:e.name}))})),n}isRunning(){return this.wire.sendAction(\"is-application-running\",this.identity).then((({payload:e})=>e.data))}async quit(e=!1){try{await this._close(e),await this.wire.sendAction(\"destroy-application\",{force:e,...this.identity})}catch(e){if(![\"Remote connection has closed\",\"Could not locate the requested application\"].some((t=>e.message.includes(t))))throw e}}async _close(e=!1){try{await this.wire.sendAction(\"close-application\",{force:e,...this.identity})}catch(e){if(!e.message.includes(\"Remote connection has closed\"))throw e}}close(e=!1){return console.warn(\"Deprecation Warning: Application.close is deprecated Please use Application.quit\"),this.wire.sendAction(\"application-close\",this.identity).catch((e=>{})),this._close(e)}getChildWindows(){return this.wire.sendAction(\"get-child-windows\",this.identity).then((({payload:e})=>{const t=[];return e.data.forEach((e=>{t.push({uuid:this.identity.uuid,name:e})})),this.windowListFromIdentityList(t)}))}getManifest(){return this.wire.sendAction(\"get-application-manifest\",this.identity).then((({payload:e})=>e.data))}getParentUuid(){return this.wire.sendAction(\"get-parent-application\",this.identity).then((({payload:e})=>e.data))}getShortcuts(){return this.wire.sendAction(\"get-shortcuts\",this.identity).then((({payload:e})=>e.data))}async getViews(){const{payload:e}=await this.wire.sendAction(\"application-get-views\",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}getZoomLevel(){return this.wire.sendAction(\"get-application-zoom-level\",this.identity).then((({payload:e})=>e.data))}getWindow(){return this.wire.sendAction(\"application-get-window\",this.identity).catch((e=>{})),Promise.resolve(this.window)}registerUser(e,t){return this.wire.sendAction(\"register-user\",{userName:e,appName:t,...this.identity}).then((()=>{}))}removeTrayIcon(){return this.wire.sendAction(\"remove-tray-icon\",this.identity).then((()=>{}))}restart(){return this.wire.sendAction(\"restart-application\",this.identity).then((()=>{}))}run(){return console.warn(\"Deprecation Warning: Application.run is deprecated Please use fin.Application.start\"),this.wire.sendAction(\"application-run\",this.identity).catch((e=>{})),this._run()}_run(e={}){return this.wire.sendAction(\"run-application\",{manifestUrl:this._manifestUrl,opts:e,...this.identity}).then((()=>{}))}scheduleRestart(){return this.wire.sendAction(\"relaunch-on-close\",this.identity).then((()=>{}))}async sendApplicationLog(){const{payload:e}=await this.wire.sendAction(\"send-application-log\",this.identity);return e.data}async setJumpList(e){await this.wire.sendAction(\"set-jump-list\",{config:e,...this.identity})}setTrayIcon(e){return this.wire.sendAction(\"set-tray-icon\",{enabledIcon:e,...this.identity}).then((()=>{}))}setShortcuts(e){return this.wire.sendAction(\"set-shortcuts\",{data:e,...this.identity}).then((()=>{}))}async setShortcutQueryParams(e){await this.wire.sendAction(\"set-shortcut-query-args\",{data:e,...this.identity})}setZoomLevel(e){return this.wire.sendAction(\"set-application-zoom-level\",{level:e,...this.identity}).then((()=>{}))}async setAppLogUsername(e){await this.wire.sendAction(\"set-app-log-username\",{data:e,...this.identity})}getTrayIconInfo(){return this.wire.sendAction(\"get-tray-icon-info\",this.identity).then((({payload:e})=>e.data))}hasTrayIcon(){return this.wire.sendAction(\"has-tray-icon\",this.identity).then((({payload:e})=>e.data))}terminate(){return this.wire.sendAction(\"terminate-application\",this.identity).then((()=>{}))}wait(){return this.wire.sendAction(\"wait-for-hung-application\",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction(\"get-info\",this.identity).then((({payload:e})=>e.data))}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction(\"application-get-process-info\",this.identity);return e}async setFileDownloadLocation(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t};await this.wire.sendAction(\"set-file-download-location\",{...n,downloadLocation:e})}async getFileDownloadLocation(){const{payload:{data:e}}=await this.wire.sendAction(\"get-file-download-location\",this.identity);return e}async showTrayIconPopupMenu(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t},{payload:i}=await this.wire.sendAction(\"show-tray-icon-popup-menu\",{...n,options:e});return i.data}async closeTrayIconPopupMenu(){const{name:e}=this.wire.me,t={uuid:this.identity.uuid,name:e};await this.wire.sendAction(\"close-tray-icon-popup-menu\",{...t})}}return j.Application=i,j}function Z(){return q||(q=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(function(){if(K)return F;K=1,Object.defineProperty(F,\"__esModule\",{value:!0}),F.ApplicationModule=void 0;const e=d,t=O,n=Y();class i extends e.Base{async wrap(e){this.wire.sendAction(\"wrap-application\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}wrapSync(e){this.wire.sendAction(\"wrap-application-sync\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}async _create(e){return void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&void 0===e.isPlatformController&&(e.autoShow=!0),await this.wire.sendAction(\"create-application\",e),this.wrap({uuid:e.uuid})}create(e){return console.warn(\"Deprecation Warning: fin.Application.create is deprecated. Please use fin.Application.start\"),this.wire.sendAction(\"application-create\").catch((e=>{})),this._create(e)}async start(e){this.wire.sendAction(\"start-application\").catch((e=>{}));const t=await this._create(e);return await this.wire.sendAction(\"run-application\",{uuid:e.uuid}),t}async startManyManifests(e,t){return this.wire.sendAction(\"run-applications\",{applications:e,opts:t}).then((()=>{}))}getCurrent(){return this.wire.sendAction(\"get-current-application\").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction(\"get-current-application-sync\").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}async startFromManifest(e,t){this.wire.sendAction(\"application-start-from-manifest\").catch((e=>{}));const n=await this._createFromManifest(e);return await n._run(t),n}createFromManifest(e){return console.warn(\"Deprecation Warning: fin.Application.createFromManifest is deprecated. Please use fin.Application.startFromManifest\"),this.wire.sendAction(\"application-create-from-manifest\").catch((e=>{})),this._createFromManifest(e)}_createFromManifest(e){return this.wire.sendAction(\"get-application-manifest\",{manifestUrl:e}).then((({payload:e})=>{const t=e.data.platform?e.data.platform.uuid:e.data.startup_app.uuid;return this.wrap({uuid:t})})).then((t=>(t._manifestUrl=e,t)))}}return F.ApplicationModule=i,F}(),e),n(Y(),e)}(R)),R}H.WebContents=D;var Q={};Object.defineProperty(Q,\"__esModule\",{value:!0}),Q.promisifySubscription=void 0;var X,ee,te;function ne(){if(X)return S;X=1,Object.defineProperty(S,\"__esModule\",{value:!0}),S._Window=void 0;const e=Z(),t=H,n=J(),i=T,r=Q;class o extends t.WebContents{constructor(e,t){super(e,t,\"window\")}async createWindow(e){this.wire.sendAction(\"window-create-window\",this.identity).catch((e=>{}));const t=await(0,r.promisifySubscription)(this,\"fire-constructor-callback\");void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&(e.autoShow=!0),(0,i.handleDeprecatedWarnings)(e);const n=this.wire.environment.createChildContent({entityType:\"window\",options:e}),[o]=await Promise.all([t.getValue(),n]);let s;const{success:a}=o,c=o.data,{message:d}=c;s=a?{httpResponseCode:c.httpResponseCode,apiInjected:c.apiInjected}:{message:c.message,networkErrorCode:c.networkErrorCode,stack:c.stack};const h={message:d,cbPayload:s,success:a};try{this.getWebWindow().fin.__internal_.openerSuccessCBCalled()}catch(e){}return h.success?this:Promise.reject(h)}getAllFrames(){return this.wire.sendAction(\"get-all-frames\",this.identity).then((({payload:e})=>e.data))}getBounds(){return this.wire.sendAction(\"get-window-bounds\",this.identity).then((({payload:e})=>e.data))}center(){return this.wire.sendAction(\"center-window\",this.identity).then((()=>{}))}blur(){return this.wire.sendAction(\"blur-window\",this.identity).then((()=>{}))}bringToFront(){return this.wire.sendAction(\"bring-window-to-front\",this.identity).then((()=>{}))}animate(e,t){return this.wire.sendAction(\"animate-window\",{transitions:e,options:t,...this.identity}).then((()=>{}))}hide(){return this.wire.sendAction(\"hide-window\",this.identity).then((()=>{}))}close(e=!1){return this.wire.sendAction(\"close-window\",{force:e,...this.identity}).then((()=>{Object.setPrototypeOf(this,null)}))}focusedWebViewWasChanged(){return this.wire.sendAction(\"focused-webview-changed\",this.identity).then((()=>{}))}getNativeId(){return this.wire.sendAction(\"get-window-native-id\",this.identity).then((({payload:e})=>e.data))}async getCurrentViews(){const{payload:e}=await this.wire.sendAction(\"window-get-views\",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}disableFrame(){return console.warn(\"Function is deprecated; use disableUserMovement instead.\"),this.wire.sendAction(\"disable-window-frame\",this.identity).then((()=>{}))}disableUserMovement(){return this.wire.sendAction(\"disable-window-frame\",this.identity).then((()=>{}))}enableFrame(){return console.warn(\"Function is deprecated; use enableUserMovement instead.\"),this.wire.sendAction(\"enable-window-frame\",this.identity).then((()=>{}))}enableUserMovement(){return this.wire.sendAction(\"enable-window-frame\",this.identity).then((()=>{}))}flash(){return this.wire.sendAction(\"flash-window\",this.identity).then((()=>{}))}stopFlashing(){return this.wire.sendAction(\"stop-flash-window\",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction(\"get-window-info\",this.identity).then((({payload:e})=>e.data))}async getLayout(e){this.wire.sendAction(\"window-get-layout\",this.identity).catch((e=>{}));const t=await this.getOptions();if(!t.layout&&!t.layoutSnapshot)throw new Error(\"Window does not have a Layout\");return this.fin.Platform.Layout.wrap(e??this.identity)}getOptions(){return this.wire.sendAction(\"get-window-options\",this.identity).then((({payload:e})=>e.data))}getParentApplication(){return this.wire.sendAction(\"window-get-parent-application\",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity))}getParentWindow(){return this.wire.sendAction(\"window-get-parent-window\",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity)).then((e=>e.getWindow()))}async getSnapshot(e){const t={area:e,...this.identity};console.warn(\"Window.getSnapshot has been deprecated, please use Window.capturePage\");return(await this.wire.sendAction(\"get-window-snapshot\",t)).payload.data}getState(){return this.wire.sendAction(\"get-window-state\",this.identity).then((({payload:e})=>e.data))}getWebWindow(){return this.wire.sendAction(\"window-get-web-window\",this.identity).catch((e=>{})),this.wire.environment.getWebWindow(this.identity)}isMainWindow(){return this.wire.sendAction(\"window-is-main-window\",this.identity).catch((e=>{})),this.me.uuid===this.me.name}isShowing(){return this.wire.sendAction(\"is-window-showing\",this.identity).then((({payload:e})=>e.data))}maximize(){return this.wire.sendAction(\"maximize-window\",this.identity).then((()=>{}))}minimize(){return this.wire.sendAction(\"minimize-window\",this.identity).then((()=>{}))}moveBy(e,t,n){return this.wire.sendAction(\"move-window-by\",{deltaLeft:e,deltaTop:t,positioningOptions:n,...this.identity}).then((()=>{}))}moveTo(e,t,n){return this.wire.sendAction(\"move-window\",{left:e,top:t,positioningOptions:n,...this.identity}).then((()=>{}))}resizeBy(e,t,n,i){return this.wire.sendAction(\"resize-window-by\",{deltaWidth:Math.floor(e),deltaHeight:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}resizeTo(e,t,n,i){return this.wire.sendAction(\"resize-window\",{width:Math.floor(e),height:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}restore(){return this.wire.sendAction(\"restore-window\",this.identity).then((()=>{}))}setAsForeground(){return this.wire.sendAction(\"set-foreground-window\",this.identity).then((()=>{}))}setBounds(e,t){return this.wire.sendAction(\"set-window-bounds\",{...e,...this.identity,positioningOptions:t}).then((()=>{}))}show(e=!1){return this.wire.sendAction(\"show-window\",{force:e,...this.identity}).then((()=>{}))}showAt(e,t,n=!1){return this.wire.sendAction(\"show-at-window\",{force:n,left:Math.floor(e),top:Math.floor(t),...this.identity}).then((()=>{}))}updateOptions(e){return this.wire.sendAction(\"update-window-options\",{options:e,...this.identity}).then((()=>{}))}authenticate(e,t){return this.wire.sendAction(\"window-authenticate\",{userName:e,password:t,...this.identity}).then((()=>{}))}async showPopupMenu(e){const{payload:t}=await this.wire.sendAction(\"show-popup-menu\",{options:e,...this.identity});return t.data}async closePopupMenu(){return this.wire.sendAction(\"close-popup-menu\",{...this.identity}).then((()=>{}))}async dispatchPopupResult(e){this.wire.sendAction(\"window-dispatch-popup-result\",this.identity).catch((e=>{})),await this.wire.sendAction(\"dispatch-popup-result\",{data:e,...this.identity})}async print(e={content:\"self\"}){switch(e.content){case void 0:case\"self\":return super.print(e);case\"screenshot\":return this.wire.sendAction(\"print-screenshot\",this.identity).then((()=>{}));case\"views\":return this.wire.sendAction(\"print-views\",{...this.identity,options:e}).then((()=>{}));default:return}}}return S._Window=o,S}function ie(){return te||(te=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(function(){if(ee)return _;ee=1,Object.defineProperty(_,\"__esModule\",{value:!0}),_._WindowModule=void 0;const e=d,t=O,n=ne();class i extends e.Base{async wrap(e){this.wire.sendAction(\"window-wrap\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}wrapSync(e){this.wire.sendAction(\"window-wrap-sync\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}create(e){return this.wire.sendAction(\"create-window\").catch((e=>{})),new n._Window(this.wire,{uuid:this.me.uuid,name:e.name}).createWindow(e)}getCurrent(){if(this.wire.sendAction(\"get-current-window\").catch((e=>{})),!this.wire.me.isWindow)throw new Error(\"You are not in a Window context\");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction(\"get-current-window-sync\").catch((e=>{})),!this.wire.me.isWindow)throw new Error(\"You are not in a Window context\");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return _._WindowModule=i,_}(),e),n(ne(),e)}(M)),M}Q.promisifySubscription=async(e,t,n=(()=>!0),i)=>{let r,o,s;const a=new Promise(((e,t)=>{r=e,o=t})),c=e=>{n(e)&&(clearTimeout(s),r(e))};return await e.on(t,c),i&&(s=setTimeout((()=>o(new Error(\"event timed out\"))),i)),a.finally((()=>{e.removeListener(t,c).catch((()=>null))})),{getValue:()=>a}},Object.defineProperty(c,\"__esModule\",{value:!0}),c.System=void 0;const re=d,oe=g,se=ie(),ae=t;class ce extends re.EmitterBase{constructor(e){super(e,\"system\")}sendExternalProcessRequest(e,t){return new Promise(((n,i)=>{const r=\"external-process-exited\";let o,s,a,c;\"function\"==typeof t.listener&&(a=e=>{const n=e||{};s={topic:\"exited\",uuid:n.processUuid||\"\",exitCode:n.exitCode||0},o===e.processUuid&&(t.listener(s),c.removeListener(r,a))},this.wire.me.name||(this.wire.me.name=this.wire.me.uuid),c=new se._Window(this.wire,this.wire.me),c.on(r,a)),this.wire.sendAction(e,t).then((({payload:e})=>{o=e.data.uuid,n(e.data),s&&o===s.uuid&&(t.listener(s),c.removeListener(r,a))})).catch((e=>{c&&c.removeListener(r,a),i(e)}))}))}getVersion(){return this.wire.sendAction(\"get-version\").then((({payload:e})=>e.data))}clearCache(e){return this.wire.sendAction(\"clear-cache\",e).then((()=>{}))}deleteCacheOnExit(){return this.wire.sendAction(\"delete-cache-request\").then((()=>{}))}exit(){return this.wire.sendAction(\"exit-desktop\").then((()=>{}))}async fetchManifest(e){const{payload:{data:t}}=await this.wire.sendAction(\"fetch-manifest\",{manifestUrl:e});return t}flushCookieStore(){return this.wire.sendAction(\"flush-cookie-store\").then((()=>{}))}getAllWindows(){return this.wire.sendAction(\"get-all-windows\").then((({payload:e})=>e.data))}getAllApplications(){return this.wire.sendAction(\"get-all-applications\").then((({payload:e})=>e.data))}getCommandLineArguments(){return this.wire.sendAction(\"get-command-line-arguments\").then((({payload:e})=>e.data))}async getCrashReporterState(){const{payload:{data:{diagnosticMode:e,isRunning:t}}}=await this.wire.sendAction(\"get-crash-reporter-state\");return console.warn(\"diagnosticMode property is deprecated. It will be removed in a future version\"),{diagnosticMode:e,diagnosticsMode:e,isRunning:t}}async startCrashReporter(e){const t=e,n={...t,diagnosticMode:t.diagnosticsMode||t.diagnosticMode},{payload:{data:{diagnosticMode:i,isRunning:r}}}=await this.wire.sendAction(\"start-crash-reporter\",n);return{diagnosticMode:i,diagnosticsMode:i,isRunning:r}}getUniqueUserId(){return this.wire.sendAction(\"get-unique-user-id\").then((({payload:e})=>e.data))}getEntityInfo(e,t){return this.wire.sendAction(\"get-entity-info\",{uuid:e,name:t}).then((({payload:e})=>e.data))}getEnvironmentVariable(e){return this.wire.sendAction(\"get-environment-variable\",{environmentVariables:e}).then((({payload:e})=>e.data))}getFocusedWindow(){return this.wire.sendAction(\"get-focused-window\").then((({payload:e})=>e.data))}async isAppCertified(e){const{payload:{data:{certifiedInfo:t}}}=await this.wire.sendAction(\"is-app-certified\",{manifestUrl:e});return t}getInstalledRuntimes(){return this.wire.sendAction(\"get-installed-runtimes\").then((({payload:e})=>e.data.runtimes))}async getInstalledApps(){const{payload:{data:{installedApps:e}}}=await this.wire.sendAction(\"get-installed-apps\");return e}getLog(e){return this.wire.sendAction(\"view-log\",e).then((({payload:e})=>e.data))}getMachineId(){return this.wire.sendAction(\"get-machine-id\").then((({payload:e})=>e.data))}getMinLogLevel(){return this.wire.sendAction(\"get-min-log-level\").then((({payload:e})=>e.data))}getLogList(){return this.wire.sendAction(\"list-logs\").then((({payload:e})=>e.data))}getMonitorInfo(){return this.wire.sendAction(\"get-monitor-info\").then((({payload:e})=>e.data))}getMousePosition(){return this.wire.sendAction(\"get-mouse-position\").then((({payload:e})=>e.data))}getProcessList(){return console.warn(\"System.getProcessList has been deprecated. Please consider using our new process APIs: Window.getProcessInfo, View.getProcessInfo, Application.getProcessInfo, System.getAllProcessInfo\"),this.wire.sendAction(\"process-snapshot\").then((({payload:e})=>e.data))}async getAllProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction(\"get-all-process-info\",this.identity);return e}getProxySettings(){return this.wire.sendAction(\"get-proxy-settings\").then((({payload:e})=>e.data))}getRuntimeInfo(){return this.wire.sendAction(\"get-runtime-info\").then((({payload:e})=>e.data))}getRvmInfo(){return this.wire.sendAction(\"get-rvm-info\").then((({payload:e})=>e.data))}getHostSpecs(){return this.wire.sendAction(\"get-host-specs\").then((({payload:e})=>e.data))}getOSInfo(){return this.wire.sendAction(\"get-os-info\").then((({payload:e})=>e.data))}launchExternalProcess(e){return this.sendExternalProcessRequest(\"launch-external-process\",e)}monitorExternalProcess(e){return this.sendExternalProcessRequest(\"monitor-external-process\",e)}log(e,t){return this.wire.sendAction(\"write-to-log\",{level:e,message:t}).then((()=>{}))}openUrlWithBrowser(e){return this.wire.sendAction(\"open-url-with-browser\",{url:e}).then((()=>{}))}async registerCustomProtocol(e){if(\"object\"!=typeof e)throw new Error(\"Must provide an object with a `protocolName` property having a string value.\");await this.wire.sendAction(\"register-custom-protocol\",e)}async unregisterCustomProtocol(e){await this.wire.sendAction(\"unregister-custom-protocol\",{protocolName:e})}async getCustomProtocolState(e){return this.wire.sendAction(\"get-custom-protocol-state\",{protocolName:e}).then((({payload:e})=>e.data))}releaseExternalProcess(e){return this.wire.sendAction(\"release-external-process\",{uuid:e}).then((()=>{}))}showDeveloperTools(e){return this.wire.sendAction(\"show-developer-tools\",e).then((()=>{}))}terminateExternalProcess(e){return this.wire.sendAction(\"terminate-external-process\",e).then((()=>{}))}updateProxySettings(e){return this.wire.sendAction(\"update-proxy\",e).then((()=>{}))}async downloadAsset(e,t){const n=()=>{};let i=n,r=n;const o=new Promise(((e,t)=>{i=e,r=t}));if(\"openfin\"!==this.wire.environment.type)throw new oe.NotSupportedError(\"downloadAsset only supported in an OpenFin Render process\");const s=oe.RuntimeError.getCallSite(),a=this.wire.environment.getNextMessageId().toString(),c=`asset-download-progress-${a}`,d=`asset-download-error-${a}`,h=`asset-download-complete-${a}`,l=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},u=()=>{this.removeListener(c,l)};await Promise.all([this.on(c,l),this.once(d,(e=>{u();const{reason:t,err:n}=e;r(new oe.RuntimeError({reason:t,error:n},s))})),this.once(h,(()=>{u(),i()}))]);const p=Object.assign(e,{downloadId:a});return await this.wire.sendAction(\"download-asset\",p).catch((e=>{throw u(),e})),o}downloadRuntime(e,t){const n=oe.RuntimeError.getCallSite();return new Promise(((i,r)=>{if(\"openfin\"!==this.wire.environment.type)return void r(new oe.NotSupportedError(\"downloadRuntime only supported in an OpenFin Render process\"));const o=this.wire.environment.getNextMessageId().toString(),s=`runtime-download-progress-${o}`,a=`runtime-download-error-${o}`,c=`runtime-download-complete-${o}`,d=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},h=()=>{this.removeListener(s,d)};this.on(s,d),this.once(a,(e=>{h();const{reason:t,err:i}=e;r(new oe.RuntimeError({reason:t,error:i},n))})),this.once(c,(()=>{h(),i()}));const l=Object.assign(e,{downloadId:o});this.wire.sendAction(\"download-runtime\",l).catch((e=>{h(),r(e)}))}))}downloadPreloadScripts(e){return this.wire.sendAction(\"download-preload-scripts\",{scripts:e}).then((({payload:e})=>e.data))}getAllExternalApplications(){return this.wire.sendAction(\"get-all-external-applications\").then((({payload:e})=>e.data))}getAppAssetInfo(e){return this.wire.sendAction(\"get-app-asset-info\",e).then((({payload:e})=>e.data))}getCookies(e){const t=this.wire.environment.getUrl(),n=Object.assign(e,{url:t});return this.wire.sendAction(\"get-cookies\",n).then((({payload:e})=>e.data))}setMinLogLevel(e){return this.wire.sendAction(\"set-min-log-level\",{level:e}).then((()=>{}))}resolveUuid(e){return this.wire.sendAction(\"resolve-uuid\",{entityKey:e}).then((({payload:e})=>e.data))}executeOnRemote(e,t){return t.requestingIdentity=e,this.wire.ferryAction(t)}readRegistryValue(e,t,n){return this.wire.sendAction(\"read-registry-value\",{rootKey:e,subkey:t,value:n}).then((({payload:e})=>e.data))}registerExternalConnection(e){return this.wire.sendAction(\"register-external-connection\",{uuid:e}).then((({payload:e})=>e.data))}async getServiceConfiguration(e){if(\"string\"!=typeof e.name)throw new Error(\"Must provide an object with a `name` property having a string value\");const{name:t}=e;return this.wire.sendAction(\"get-service-configuration\",{name:t}).then((({payload:e})=>e.data))}async getSystemAppConfig(e){if(\"string\"!=typeof e)throw new Error(\"Must provide a string value for name of system app\");return this.wire.sendAction(\"get-system-app-configuration\",{name:e}).then((({payload:e})=>e.data))}async registerShutdownHandler(e){this.wire.sendAction(\"system-register-shutdown-handler\").catch((e=>{}));const{uuid:t,name:n}=this.wire.me;this.on(\"system-shutdown\",(i=>{e({proceed:()=>{this.wire.environment.raiseEvent(\"application/system-shutdown-handled\",{uuid:t,name:n,topic:\"application\"})}})}))}runRvmHealthCheck(){return this.wire.sendAction(\"run-rvm-health-check\").then((({payload:e})=>e.data))}async launchManifest(e,t={}){const{subscribe:n,...i}=t,r=i;if(n){const e=new ae.EventEmitter;n(e);const t=\"app-version-progress\",i=\"runtime-status\",o=\"app-version-complete\",s=\"app-version-error\",a=this.wire.environment.getNextMessageId().toString();r.appVersionId=a;const c=[o,t,i,s],d=e=>{const{appVersionId:t,topic:n,type:i,...r}=e;return{...r,type:c.find((e=>i.includes(e)))}},h=t=>{const n=d(t);e.emit(n.type,n)},l=()=>{this.removeListener(`${t}.${a}`,h),this.removeListener(`${i}.${a}`,h),this.removeListener(`${o}.${a}`,h),this.removeListener(`${s}.${a}`,h),this.removeListener(`${o}.${a}`,l),this.removeListener(`${s}.${a}`,l)};await Promise.all([this.on(`${t}.${a}`,h),this.on(`${i}.${a}`,h),this.once(`${o}.${a}`,h),this.once(`${s}.${a}`,h),this.once(`${o}.${a}`,l),this.once(`${s}.${a}`,l)])}return(await this.wire.sendAction(\"launch-manifest\",{manifestUrl:e,opts:r})).payload.data.manifest}async queryPermissionForCurrentContext(e){const t={uuid:this.wire.me.uuid,name:this.wire.me.name};return(await this.wire.sendAction(\"query-permission-for-current-context\",{apiName:e,identity:t})).payload.data}async enableNativeWindowIntegrationProvider(e){const{payload:t}=await this.wire.sendAction(\"enable-native-window-integration-provider\",{permissions:e});return t.data}async registerUsage({data:e,type:t}){await this.wire.sendAction(\"register-usage\",{data:e,type:t})}async getPrinters(){const{payload:e}=await this.wire.sendAction(\"system-get-printers\");return e.data}async updateProcessLoggingOptions(e){await this.wire.sendAction(\"system-update-process-logging-options\",{options:e})}async getDomainSettings(){const{payload:{data:e}}=await this.wire.sendAction(\"get-domain-settings\",this.identity);return e}async setDomainSettings(e){await this.wire.sendAction(\"set-domain-settings\",{domainSettings:e,...this.identity})}async refreshExtensions(){const{payload:e}=await this.wire.sendAction(\"refresh-extensions\");return e.data}async getInstalledExtensions(){const{payload:e}=await this.wire.sendAction(\"get-installed-extensions\");return e.data}}c.System=ce;var de={},he={};Object.defineProperty(he,\"__esModule\",{value:!0}),he.RefCounter=void 0;he.RefCounter=class{constructor(){this.topicRefMap=new Map}incRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t+1;n=i,this.topicRefMap.set(e,i)}else this.topicRefMap.set(e,1),n=1;return n}decRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t-1;this.topicRefMap.set(e,i),n=i}else n=-1;return n}actOnFirst(e,t,n){return 1===this.incRefCount(e)?t():n()}actOnLast(e,t,n){return 0===this.decRefCount(e)?t():n()}};var le={},ue={},pe={};Object.defineProperty(pe,\"__esModule\",{value:!0}),pe.ChannelBase=pe.ProtectedItems=void 0;const we=e=>async(t,n,i)=>{const r=await e(t,n,i);return void 0===r?n:r};pe.ProtectedItems=class{constructor(e,t){this.providerIdentity=e,this.close=t}};class ye{static defaultAction(e){throw new Error(`No action registered at target for ${e}`)}constructor(){this.subscriptions=new Map}async processAction(e,t,n){try{const i=this.subscriptions.has(e)?this.subscriptions.get(e):(t,n)=>(this.defaultAction??ye.defaultAction)(e,t,n),r=this.preAction?await this.preAction(e,t,n):t,o=await i(r,n);return this.postAction?await this.postAction(e,o,n):o}catch(t){if(this.errorMiddleware)return this.errorMiddleware(e,t,n);throw t}}beforeAction(e){if(this.preAction)throw new Error(\"Already registered beforeAction middleware\");this.preAction=we(e)}onError(e){if(this.errorMiddleware)throw new Error(\"Already registered error middleware\");this.errorMiddleware=e}afterAction(e){if(this.postAction)throw new Error(\"Already registered afterAction middleware\");this.postAction=we(e)}remove(e){this.subscriptions.delete(e)}setDefaultAction(e){if(this.defaultAction)throw new Error(\"default action can only be set once\");this.defaultAction=e}register(e,t){if(this.subscriptions.has(e))throw new Error(`Subscription already registered for action: ${e}. Unsubscribe before adding new subscription`);return this.subscriptions.set(e,t),!0}}pe.ChannelBase=ye;var fe,ge,me,ve=s&&s.__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)},Ce=s&&s.__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};Object.defineProperty(ue,\"__esModule\",{value:!0}),ue.ChannelClient=void 0;const be=pe,Ie=new Map;class Ee extends be.ChannelBase{static closeChannelByEndpointId(e){const t=Ie.get(e);t&&ve(t,me,\"f\").call(t)}static handleProviderDisconnect(e){for(const t of Ie.values())t.providerIdentity.channelId===e.channelId&&(t.disconnectListener(e),ve(t,me,\"f\").call(t))}constructor(e,t,n){super(),fe.set(this,void 0),ge.set(this,void 0),this.processAction=(e,t,n)=>super.processAction(e,t,n),me.set(this,(()=>{Ie.delete(this.endpointId),ve(this,ge,\"f\").close()})),Ce(this,fe,new be.ProtectedItems(e,t),\"f\"),this.disconnectListener=()=>{},this.endpointId=e.endpointId,Ce(this,ge,n,\"f\"),Ie.set(this.endpointId,this),n.receive(this.processAction)}get providerIdentity(){return ve(this,fe,\"f\").providerIdentity}async dispatch(e,t){if(ve(this,ge,\"f\").isEndpointConnected(this.providerIdentity.channelId))return ve(this,ge,\"f\").send(this.providerIdentity.channelId,e,t);throw new Error(\"The client you are trying to dispatch from is disconnected from the target provider.\")}onDisconnection(e){this.disconnectListener=t=>{try{e(t)}catch(e){throw new Error(`Error while calling the onDisconnection callback: ${e.message}`)}finally{this.disconnectListener=()=>{}}}}async disconnect(){await this.sendDisconnectAction(),ve(this,me,\"f\").call(this)}async sendDisconnectAction(){const e=ve(this,fe,\"f\");await e.close()}static async wireClose(e,t,n){const{channelName:i,uuid:r,name:o}=t;await e.sendAction(\"disconnect-from-channel\",{channelName:i,uuid:r,name:o,endpointId:n})}}ue.ChannelClient=Ee,fe=new WeakMap,ge=new WeakMap,me=new WeakMap;var xe={},Ae={};Object.defineProperty(Ae,\"__esModule\",{value:!0}),Ae.exhaustiveCheck=void 0,Ae.exhaustiveCheck=function(e,t){throw new Error(`Unsupported value: ${e}${t?`\\n Supported values are: ${t.join(\"\")}`:\"\"}`)};var Pe,Me,_e,Oe={},Se=s&&s.__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},Re=s&&s.__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)};Object.defineProperty(Oe,\"__esModule\",{value:!0}),Oe.ClassicInfo=Oe.ClassicStrategy=void 0;Oe.ClassicStrategy=class{constructor(e,t,n,i){this.messageReceiver=t,this.endpointId=n,this.providerIdentity=i,Pe.set(this,void 0),Me.set(this,new Map),_e.set(this,new Map),this.send=async(e,t,n)=>{const i=Re(this,Me,\"f\").get(e);if(!i)throw new Error(`Could not locate routing info for endpoint ${e}`);const r={...i};r.isLocalEndpointId&&delete r.endpointId,delete r.isLocalEndpointId;const o=Re(this,Pe,\"f\").sendAction(\"send-channel-message\",{...r,providerIdentity:this.providerIdentity,action:t,payload:n});Re(this,_e,\"f\").get(e)?.add(o);return(await o.catch((e=>{throw new Error(e.message)})).finally((()=>{Re(this,_e,\"f\").get(e)?.delete(o)}))).payload.data.result},this.close=async()=>{this.messageReceiver.removeEndpoint(this.providerIdentity.channelId,this.endpointId),[...Re(this,Me,\"f\").keys()].forEach((e=>this.closeEndpoint(e))),Se(this,Me,new Map,\"f\")},Se(this,Pe,e,\"f\")}onEndpointDisconnect(e,t){}receive(e){this.messageReceiver.addEndpoint(e,this.providerIdentity.channelId,this.endpointId)}async closeEndpoint(e){const t=Re(this,Me,\"f\").get(e);Re(this,Me,\"f\").delete(e);const n=Re(this,_e,\"f\").get(e);n?.forEach((n=>{const i=`Channel connection with identity uuid: ${t?.uuid} / name: ${t?.name} / endpointId: ${e} no longer connected.`;n.cancel(new Error(i))}))}isEndpointConnected(e){return Re(this,Me,\"f\").has(e)}addEndpoint(e,t){Re(this,Me,\"f\").set(e,t.endpointIdentity),Re(this,_e,\"f\").set(e,new Set)}isValidEndpointPayload(e){return\"string\"==typeof e?.endpointIdentity?.endpointId||\"string\"==typeof e?.endpointIdentity?.channelId}},Pe=new WeakMap,Me=new WeakMap,_e=new WeakMap,Oe.ClassicInfo={version:5,minimumVersion:0,type:\"classic\"};var Fe={},je={},ke={};Object.defineProperty(ke,\"__esModule\",{value:!0}),ke.errorToPOJO=void 0,ke.errorToPOJO=function(e){return{stack:e.stack,name:e.name,message:e.message,toString:()=>e.stack||e.toString()}};var Le,Te,$e=s&&s.__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)},Be=s&&s.__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};Object.defineProperty(je,\"__esModule\",{value:!0}),je.RTCEndpoint=void 0;const Ge=ke;je.RTCEndpoint=class{static isValidEndpointPayload(e){const t=e=>\"object\"==typeof e&&null!==e;return t(e)&&t(e.endpointIdentity)&&t(e.rtc)&&\"string\"==typeof e.endpointIdentity.endpointId}constructor({rtc:e,endpointIdentity:t}){this.responseMap=new Map,Le.set(this,null),Te.set(this,void 0),this.connectionStateChangeHandler=e=>{\"connected\"!==this.rtc.rtcClient.connectionState&&(this.rtc.rtcClient.removeEventListener(\"connectionstatechange\",this.connectionStateChangeHandler),this.close(),$e(this,Te,\"f\")&&$e(this,Te,\"f\").call(this))},this.send=async(e,t)=>{const n=`message-${Math.random()}`,i=new Promise(((e,t)=>{this.responseMap.set(n,{resolve:e,reject:t})}));return this.rtc.channels.request.send(JSON.stringify({action:e,payload:t,messageId:n})),i},this.close=()=>{this.responseMap.forEach((e=>e.reject(\"Connection has closed.\"))),this.responseMap=new Map,this.rtc.channels.request.close(),this.rtc.channels.response.close(),this.rtc.rtcClient.close()},this.rtc=e,this.endpointIdentity=t,this.rtc.channels.response.addEventListener(\"message\",(e=>{let{data:t}=e;e.data instanceof ArrayBuffer&&(t=(new TextDecoder).decode(e.data));const{messageId:n,payload:i,success:r,error:o}=JSON.parse(t),{resolve:s,reject:a}=this.responseMap.get(n)??{};s&&a?(this.responseMap.delete(n),r?s(i):a(o)):(console.log(\"Could not find id in responseMap.\"),console.log(e))})),this.rtc.channels.request.addEventListener(\"message\",(async e=>{let{data:n}=e;e.data instanceof ArrayBuffer&&(n=(new TextDecoder).decode(e.data));const{messageId:i,action:r,payload:o}=JSON.parse(n);if($e(this,Le,\"f\"))try{const e=await $e(this,Le,\"f\").call(this,r,o,t);this.rtc.channels.response.send(JSON.stringify({messageId:i,payload:e,success:!0}))}catch(e){\"open\"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,error:(0,Ge.errorToPOJO)(e),success:!1}))}else\"open\"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,success:!1,error:\"Connection not ready.\"}))})),this.rtc.rtcClient.addEventListener(\"connectionstatechange\",this.connectionStateChangeHandler),Object.values(this.rtc.channels).forEach((e=>{e.onclose=e=>{[...this.responseMap.values()].forEach((e=>e.reject(new Error(\"RTCDataChannel closed unexpectedly, this is most commonly caused by message size. Note: RTC Channels have a message size limit of ~255kB.\")))),this.close(),$e(this,Te,\"f\")&&$e(this,Te,\"f\").call(this)}}))}onDisconnect(e){if($e(this,Te,\"f\"))throw new Error(\"RTCEndpoint disconnectListener cannot be set twice.\");Be(this,Te,e,\"f\")}receive(e){if($e(this,Le,\"f\"))throw new Error(\"You have already set a listener for this RTC Endpoint.\");Be(this,Le,e,\"f\")}get connected(){return\"connected\"===this.rtc.rtcClient.connectionState}},Le=new WeakMap,Te=new WeakMap;var We,He,Ne,De={},Ue=s&&s.__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)},Ve=s&&s.__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};Object.defineProperty(De,\"__esModule\",{value:!0}),De.EndpointStrategy=void 0;De.EndpointStrategy=class{constructor(e,t,n){this.EndpointType=e,this.StrategyName=n,We.set(this,null),He.set(this,new Map),Ne.set(this,!0),this.send=async(e,t,n)=>this.getEndpointById(e).send(t,n),this.close=async()=>{Ue(this,Ne,\"f\")&&(Ue(this,He,\"f\").forEach((e=>e.close())),Ve(this,He,new Map,\"f\")),Ve(this,Ne,!1,\"f\")},this.isValidEndpointPayload=t}onEndpointDisconnect(e,t){this.getEndpointById(e).onDisconnect(t)}receive(e){if(Ue(this,We,\"f\"))throw new Error(`You have already set a listener for this ${this.StrategyName} Strategy`);Ve(this,We,e,\"f\"),Ue(this,He,\"f\").forEach((e=>e.receive(Ue(this,We,\"f\"))))}getEndpointById(e){const t=Ue(this,He,\"f\").get(e);if(!t)throw new Error(`Client with endpoint id ${e} is not connected`);return t}get connected(){return Ue(this,Ne,\"f\")}isEndpointConnected(e){return Ue(this,He,\"f\").has(e)}addEndpoint(e,t){if(!Ue(this,Ne,\"f\"))return void console.warn(`Adding endpoint to disconnected ${this.StrategyName} Strategy`);const n=new this.EndpointType(t);Ue(this,We,\"f\")&&n.receive(Ue(this,We,\"f\")),Ue(this,He,\"f\").set(e,n)}async closeEndpoint(e){Ue(this,He,\"f\").delete(e)}},We=new WeakMap,He=new WeakMap,Ne=new WeakMap,Object.defineProperty(Fe,\"__esModule\",{value:!0}),Fe.RTCInfo=Fe.RTCStrategy=void 0;const ze=je,Ke=De;class qe extends Ke.EndpointStrategy{constructor(){super(ze.RTCEndpoint,ze.RTCEndpoint.isValidEndpointPayload,\"RTC\")}}Fe.RTCStrategy=qe,Fe.RTCInfo={version:2,minimumVersion:0,type:\"rtc\"};var Je={};Object.defineProperty(Je,\"__esModule\",{value:!0}),Je.RTCICEManager=void 0;const Ye=d;class Ze extends Ye.EmitterBase{constructor(e){super(e,\"channel\"),this.ensureChannelOpened=e=>new Promise(((t,n)=>{if(\"open\"===e.readyState)t();else if(\"connecting\"===e.readyState){const n=()=>{e.removeEventListener(\"open\",n),t()};e.addEventListener(\"open\",n)}else n(new Error(\"This Channel has already closed\"))}))}static createDataChannelPromise(e,t){let n;const i=new Promise((e=>{n=e})),r=i=>{const o=()=>{i.channel.removeEventListener(\"open\",o),n(i.channel)};i.channel.label===e&&(i.channel.addEventListener(\"open\",o),t.removeEventListener(\"datachannel\",r))};return t.addEventListener(\"datachannel\",r),i}async listenForProviderIce(e,t){await this.on(this.createProviderEventName(e),t,{timestamp:Date.now()})}async raiseProviderIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createProviderEventName(e)),t)}async listenForClientIce(e,t){await this.on(this.createClientEventName(e),t,{timestamp:Date.now()})}async raiseClientIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createClientEventName(e)),t)}cleanupIceListeners(e){this.removeAllListeners(this.createClientEventName(e)),this.removeAllListeners(this.createProviderEventName(e))}createClientEventName(e){return`ice-client-${e}`}createProviderEventName(e){return`ice-provider-${e}`}createRouteString(e){return`channel/${e}`}createRtcPeer(){return this.wire.environment.getRtcPeer()}async startClientOffer(){const e=Math.random().toString(),t=this.createRtcPeer();t.addEventListener(\"icecandidate\",(async t=>{t.candidate&&await this.raiseClientIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForProviderIce(e,(async e=>{await t.addIceCandidate(e.candidate)}));const n={request:t.createDataChannel(\"request\"),response:t.createDataChannel(\"response\")},i=await t.createOffer();await t.setLocalDescription(i);const r=Promise.all([n.request,n.response].map(this.ensureChannelOpened)).then((()=>{}));return{rtcClient:t,channels:n,offer:i,rtcConnectionId:e,channelsOpened:r}}async finishClientOffer(e,t,n){return await e.setRemoteDescription(t),await n,!0}async createProviderAnswer(e,t){const n=this.createRtcPeer(),i=Ze.createDataChannelPromise(\"request\",n),r=Ze.createDataChannelPromise(\"response\",n);n.addEventListener(\"icecandidate\",(async t=>{t.candidate&&await this.raiseProviderIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForClientIce(e,(async e=>{await n.addIceCandidate(e.candidate)})),await n.setRemoteDescription(t);const o=await n.createAnswer();await n.setLocalDescription(o);const s=Promise.all([i,r]).then((([t,n])=>(this.cleanupIceListeners(e),{request:t,response:n})));return{rtcClient:n,answer:o,channels:s}}}Je.RTCICEManager=Ze;var Qe={},Xe={};function et(e){return[...e.split(\".\").reverse().entries()].reduce(((e,[t,n])=>e+ +n*1e4**t),0)}function tt(e,t){return et(e)>=et(t)}function nt(e){return e.split(\"/\")[0]}Object.defineProperty(Xe,\"__esModule\",{value:!0}),Xe.runtimeUuidMeetsMinimumRuntimeVersion=Xe.parseRuntimeUuid=Xe.meetsMinimumRuntimeVersion=void 0,Xe.meetsMinimumRuntimeVersion=tt,Xe.parseRuntimeUuid=nt,Xe.runtimeUuidMeetsMinimumRuntimeVersion=function(e,t){return tt(nt(e),t)};var it,rt,ot,st,at,ct=s&&s.__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)},dt=s&&s.__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};Object.defineProperty(Qe,\"__esModule\",{value:!0}),Qe.ChannelProvider=void 0;const ht=pe,lt=Xe;class ut extends ht.ChannelBase{get connections(){return[...ct(this,it,\"f\")]}static handleClientDisconnection(e,t){const n=e.connections.find((e=>e.endpointId===t.endpointId));if(n)ct(e,st,\"f\").call(e,n);else{e.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name)).forEach(ct(e,st,\"f\"))}e.disconnectListener(t)}static setProviderRemoval(e,t){ut.removalMap.set(e,t)}constructor(e,t,n){super(),it.set(this,void 0),rt.set(this,void 0),ot.set(this,void 0),st.set(this,(e=>{const t=this.connections.filter((t=>t.endpointId!==e.endpointId));ct(this,ot,\"f\").closeEndpoint(e.endpointId),dt(this,it,t,\"f\")})),this.processAction=async(e,t,n)=>(ut.clientIsMultiRuntime(n)&&!(0,lt.runtimeUuidMeetsMinimumRuntimeVersion)(n.runtimeUuid,\"18.87.56.0\")?this.handleMultiRuntimeLegacyClient(n):this.checkForClientConnection(n),super.processAction(e,t,n)),at.set(this,(()=>{ct(this,ot,\"f\").close();const e=ut.removalMap.get(this);e&&e()})),dt(this,rt,new ht.ProtectedItems(e,t),\"f\"),this.connectListener=()=>{},this.disconnectListener=()=>{},dt(this,it,[],\"f\"),dt(this,ot,n,\"f\"),n.receive(this.processAction)}dispatch(e,t,n){const i=e.endpointId??this.getEndpointIdForOpenFinId(e,t);return i&&ct(this,ot,\"f\").isEndpointConnected(i)?ct(this,ot,\"f\").send(i,t,n):Promise.reject(new Error(`Client connection with identity uuid: ${e.uuid} / name: ${e.name} / endpointId: ${i} no longer connected.`))}async processConnection(e,t){return ct(this,it,\"f\").push(e),this.connectListener(e,t)}publish(e,t){return this.connections.map((n=>ct(this,ot,\"f\").send(n.endpointId,e,t)))}onConnection(e){this.connectListener=e}onDisconnection(e){this.disconnectListener=e}async destroy(){const e=ct(this,rt,\"f\");e.providerIdentity,dt(this,it,[],\"f\"),await e.close(),ct(this,at,\"f\").call(this)}async getAllClientInfo(){return this.connections.map((e=>{const{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}=e;return{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}}))}checkForClientConnection(e){if(!this.isClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider.\\n Client Identity: {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}isClientConnected(e){return ut.clientIdentityIncludesEndpointId(e)?this.connections.some((t=>t.endpointId===e.endpointId&&t.uuid===e.uuid&&t.name===e.name)):this.isLegacyClientConnected(e)}isLegacyClientConnected(e){return this.connections.some((t=>t.uuid===e.uuid&&t.name===e.name))}handleMultiRuntimeLegacyClient(e){if(!this.isLegacyClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider. Client Identity:\\n {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}getEndpointIdForOpenFinId(e,t){const n=this.connections.filter((t=>t.name===e.name&&t.uuid===e.uuid));if(n.length>=2){const n=ct(this,rt,\"f\"),{uuid:i,name:r}=e,o=n?.providerIdentity.uuid,s=n?.providerIdentity.name;console.warn(`WARNING: Dispatch call may have unintended results. The \"to\" argument of your dispatch call is missing the\\n \"endpointId\" parameter. The identity you are dispatching to ({uuid: ${i}, name: ${r}})\\n has multiple channelClients for this channel. Your dispatched action: (${t}) from the provider:\\n ({uuid: ${o}, name: ${s}}) will only be processed by the most recently-created client.`)}return n.pop()?.endpointId}static clientIdentityIncludesEndpointId(e){return void 0!==e.endpointId}static clientIsMultiRuntime(e){return void 0!==e.runtimeUuid}static async wireClose(e,t){await e.sendAction(\"destroy-channel\",{channelName:t})}}Qe.ChannelProvider=ut,it=new WeakMap,rt=new WeakMap,ot=new WeakMap,st=new WeakMap,at=new WeakMap,ut.removalMap=new WeakMap;var pt={};Object.defineProperty(pt,\"__esModule\",{value:!0}),pt.MessageReceiver=void 0;const wt=ue,yt=d;class ft extends yt.Base{constructor(e){super(e),this.onmessage=e=>\"process-channel-message\"===e.action&&(this.processChannelMessage(e),!0),this.endpointMap=new Map,this.latestEndpointIdByChannelId=new Map,e.registerMessageHandler(this.onmessage.bind(this))}async processChannelMessage(e){const{senderIdentity:t,providerIdentity:n,action:i,ackToSender:r,payload:o,intendedTargetIdentity:s}=e.payload,a=s.channelId??s.endpointId??this.latestEndpointIdByChannelId.get(n.channelId),c=this.endpointMap.get(a);if(!c)return r.payload.success=!1,r.payload.reason=`Client connection with identity uuid: ${this.wire.me.uuid} / name: ${this.wire.me.name} / endpointId: ${a} no longer connected.`,this.wire.sendRaw(r);try{const e=await c(i,o,t);return r.payload.payload=r.payload.payload||{},r.payload.payload.result=e,this.wire.sendRaw(r)}catch(e){return r.payload.success=!1,r.payload.reason=e.message,this.wire.sendRaw(r)}}addEndpoint(e,t,n){this.endpointMap.set(n,e),t!==n&&this.latestEndpointIdByChannelId.set(t,n)}removeEndpoint(e,t){this.endpointMap.delete(t),this.latestEndpointIdByChannelId.get(e)===t&&this.latestEndpointIdByChannelId.delete(e)}checkForPreviousClientConnection(e){const t=this.latestEndpointIdByChannelId.get(e);t&&(wt.ChannelClient.closeChannelByEndpointId(t),console.warn(\"You have created a second connection to an older provider. First connection has been removed from the clientMap\"),console.warn(\"If the provider calls publish(), you may receive multiple messages.\"))}}pt.MessageReceiver=ft;var gt={};Object.defineProperty(gt,\"__esModule\",{value:!0}),gt.ProtocolManager=void 0;gt.ProtocolManager=class{constructor(e){this.ProtocolsInPreferenceOrder=e,this.DefaultClientProtocols=[\"classic\"],this.DefaultProviderProtocols=[\"classic\"],this.getClientProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultClientProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(\", \")}.`);return t},this.getProviderProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultProviderProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(\", \")}.`);return t},this.getCompatibleProtocols=(e,t)=>t.supportedProtocols.filter((t=>e.some((e=>e.type===t.type&&t.version>=e.minimumVersion&&e.version>=(t.minimumVersion??0))))).slice(0,t.maxProtocols)}};var mt={};Object.defineProperty(mt,\"__esModule\",{value:!0});class vt{static combine(e,t){return new vt(e,t)}constructor(e,t){this.primary=e,this.secondary=t}onEndpointDisconnect(e,t){this.primary.onEndpointDisconnect(e,(()=>{this.secondary.isEndpointConnected(e)||t()})),this.secondary.onEndpointDisconnect(e,(()=>{this.primary.isEndpointConnected(e)||t()}))}isValidEndpointPayload(e){return this.primary.isValidEndpointPayload(e)||this.secondary.isValidEndpointPayload(e)}async closeEndpoint(e){await this.primary.closeEndpoint(e),await this.secondary.closeEndpoint(e)}isEndpointConnected(e){return this.primary.isEndpointConnected(e)||this.secondary.isEndpointConnected(e)}async addEndpoint(e,t){this.primary.isValidEndpointPayload(t)&&await this.primary.addEndpoint(e,t),this.secondary.isValidEndpointPayload(t)&&await this.secondary.addEndpoint(e,t)}receive(e){this.primary.receive(e),this.secondary.receive(e)}send(e,t,n){return this.primary.isEndpointConnected(e)?this.primary.send(e,t,n):this.secondary.send(e,t,n)}async close(){await Promise.all([this.primary.close(),this.secondary.close()])}}mt.default=vt;var Ct,bt,It=s&&s.__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},Et=s&&s.__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)},xt=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(xe,\"__esModule\",{value:!0}),xe.ConnectionManager=void 0;const At=Ae,Pt=d,Mt=Oe,_t=Fe,Ot=Je,St=Qe,Rt=pt,Ft=gt,jt=xt(mt);class kt extends Pt.Base{static getProtocolOptionsFromStrings(e){return e.map((e=>{switch(e){case\"rtc\":return _t.RTCInfo;case\"classic\":return Mt.ClassicInfo;default:return(0,At.exhaustiveCheck)(e,[\"rtc\",\"classic\"])}}))}constructor(e){super(e),Ct.set(this,void 0),bt.set(this,void 0),this.removeChannelFromProviderMap=e=>{this.providerMap.delete(e)},this.onmessage=e=>\"process-channel-connection\"===e.action&&(this.processChannelConnection(e),!0),this.providerMap=new Map,this.protocolManager=new Ft.ProtocolManager(\"node\"===this.wire.environment.type?[\"classic\"]:[\"rtc\",\"classic\"]),It(this,Ct,new Rt.MessageReceiver(e),\"f\"),It(this,bt,new Ot.RTCICEManager(e),\"f\"),e.registerMessageHandler(this.onmessage.bind(this))}createProvider(e,t){const n=Object.assign(this.wire.environment.getDefaultChannelOptions().create,e||{}),i=this.protocolManager.getProviderProtocols(n?.protocols),r=i.map((e=>{switch(e){case\"rtc\":return new _t.RTCStrategy;case\"classic\":return new Mt.ClassicStrategy(this.wire,Et(this,Ct,\"f\"),t.channelId,t);default:return(0,At.exhaustiveCheck)(e,[\"rtc\",\"classic\"])}}));let o;if(2===r.length){const[e,t]=r;o=jt.default.combine(e,t)}else{if(1!==r.length)throw new Error(\"failed to combine strategies\");[o]=r}const s=new St.ChannelProvider(t,(()=>St.ChannelProvider.wireClose(this.wire,t.channelName)),o),a=t.channelId;return this.providerMap.set(a,{provider:s,strategy:o,supportedProtocols:kt.getProtocolOptionsFromStrings(i)}),St.ChannelProvider.setProviderRemoval(s,this.removeChannelFromProviderMap.bind(this)),s}async createClientOffer(e){const t=this.protocolManager.getClientProtocols(e?.protocols);let n;return{offer:{supportedProtocols:await Promise.all(t.map((async e=>{switch(e){case\"rtc\":{const{rtcClient:e,channels:t,offer:i,rtcConnectionId:r,channelsOpened:o}=await Et(this,bt,\"f\").startClientOffer();return n={rtcClient:e,channels:t,channelsOpened:o},{type:\"rtc\",version:_t.RTCInfo.version,payload:{offer:i,rtcConnectionId:r}}}case\"classic\":return{type:\"classic\",version:Mt.ClassicInfo.version};default:return(0,At.exhaustiveCheck)(e,[\"rtc\",\"classic\"])}}))),maxProtocols:2},rtc:n}}async createClientStrategy(e,t){t.endpointId||(t.endpointId=this.wire.environment.getNextMessageId(),Et(this,Ct,\"f\").checkForPreviousClientConnection(t.channelId));const n=t.answer??{supportedProtocols:[{type:\"classic\",version:1}]},i=(await Promise.all(n.supportedProtocols.map((async n=>\"rtc\"===n.type&&e?(await Et(this,bt,\"f\").finishClientOffer(e.rtcClient,n.payload.answer,e.channelsOpened),new _t.RTCStrategy):\"classic\"===n.type?new Mt.ClassicStrategy(this.wire,Et(this,Ct,\"f\"),t.endpointId,t):null)))).filter((e=>null!==e));let r;if(e&&!i.some((e=>e instanceof _t.RTCStrategy))&&e&&e.rtcClient.close(),i.length>=2)r=jt.default.combine(i[0],i[1]);else{if(!i.length)throw new Error(\"No compatible protocols\");[r]=i}const o={endpointIdentity:t,rtc:e};return r.addEndpoint(t.channelId,o),r}async processChannelConnection(e){const{clientIdentity:t,providerIdentity:n,ackToSender:i,payload:r,offer:o}=e.payload;t.endpointId?t.isLocalEndpointId=!1:(t.endpointId=this.wire.environment.getNextMessageId(),t.isLocalEndpointId=!0);const s=n.channelId,a=this.providerMap.get(s);if(!a)return i.payload.success=!1,i.payload.reason=`Channel \"${n.channelName}\" has been destroyed.`,this.wire.sendRaw(i);const{provider:c,strategy:d,supportedProtocols:h}=a;try{if(!(c instanceof St.ChannelProvider))throw Error(\"Cannot connect to a channel client\");const e=o??{supportedProtocols:[{type:\"classic\",version:1}],maxProtocols:1},n=this.protocolManager.getCompatibleProtocols(h,e);if(!n.length)throw new Error(\"This provider does not support any of the offered protocols.\");const s=await c.processConnection(t,r);i.payload.payload=i.payload.payload||{};let a={supportedProtocols:[],endpointPayloadPromise:Promise.resolve({endpointIdentity:t})};return a=await n.reduce((async(e,t)=>{const n=await e;if(\"rtc\"===t.type){const{answer:e,rtcClient:i,channels:r}=await Et(this,bt,\"f\").createProviderAnswer(t.payload.rtcConnectionId,t.payload.offer);n.supportedProtocols.push({type:\"rtc\",version:_t.RTCInfo.version,payload:{answer:e}}),n.endpointPayloadPromise=n.endpointPayloadPromise.then((e=>r.then((t=>({...e,rtc:{rtcClient:i,channels:t}})))))}else n.supportedProtocols.push({type:\"classic\",version:Mt.ClassicInfo.version});return n}),Promise.resolve(a)),a.endpointPayloadPromise.then((e=>d.addEndpoint(t.endpointId,e))),i.payload.payload.result=s,i.payload.payload.answer=a,this.wire.sendRaw(i)}catch(e){return i.payload.success=!1,i.payload.reason=e.message,this.wire.sendRaw(i)}}}xe.ConnectionManager=kt,Ct=new WeakMap,bt=new WeakMap;var Lt,Tt,$t,Bt=s&&s.__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},Gt=s&&s.__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)};Object.defineProperty(le,\"__esModule\",{value:!0}),le.Channel=void 0;const Wt=t,Ht=G,Nt=d,Dt=ue,Ut=xe,Vt=Qe;function zt(e){const t=Math.floor(e/10),n=Math.min(3e4,500*2**t);return new Promise((e=>{setTimeout((()=>{e(!1)}),n)}))}class Kt extends Nt.EmitterBase{constructor(e){super(e,\"channel\"),Lt.set(this,void 0),Tt.set(this,new Wt.EventEmitter),$t.set(this,new Ht.AsyncRetryableLazy((async()=>{await Promise.all([this.on(\"disconnected\",(e=>{Dt.ChannelClient.handleProviderDisconnect(e)})),this.on(\"connected\",((...e)=>{Gt(this,Tt,\"f\").emit(\"connected\",...e)}))]).catch((()=>new Error(\"error setting up channel connection listeners\")))}))),Bt(this,Lt,new Ut.ConnectionManager(e),\"f\")}async getAllChannels(){return this.wire.sendAction(\"get-all-channels\").then((({payload:e})=>e.data))}async onChannelConnect(e){await this.on(\"connected\",e)}async onChannelDisconnect(e){await this.on(\"disconnected\",e)}async safeConnect(e,t,n){const i={count:0};do{let r=()=>{};const o=new Promise((t=>{r=n=>{e===n.channelName&&t(!0)},Gt(this,Tt,\"f\").on(\"connected\",r)}));try{if(i.count>0){i.gotConnectedEvent=await Promise.race([zt(i.count),o]);const t=await this.wire.sendAction(\"connect-to-channel\",{...n,retryInfo:i});return console.log(`Successfully connected to channelName: ${e}`),t.payload.data}const t=this.wire.sendAction(\"connect-to-channel\",n);i.originalMessageId=t.messageId;return(await t).payload.data}catch(n){if(!n.message.includes(\"internal-nack\"))throw n;t&&0===i.count&&console.warn(`No channel found for channelName: ${e}. Waiting for connection...`)}finally{i.count+=1,Gt(this,Tt,\"f\").removeListener(\"connected\",r)}}while(t);throw new Error(`No channel found for channelName: ${e}.`)}async connect(e,t={}){if(await Gt(this,$t,\"f\").getValue(),!e||\"string\"!=typeof e)throw new Error(\"Please provide a channelName string to connect to a channel.\");const n={wait:!0,...this.wire.environment.getDefaultChannelOptions().connect,...t},{offer:i,rtc:r}=await Gt(this,Lt,\"f\").createClientOffer(n);let o;(this.fin.me.isFrame||this.fin.me.isView||this.fin.me.isWindow)&&(o=(await this.fin.me.getInfo()).url);const s={channelName:e,...n,offer:i,connectionUrl:o},a=await this.safeConnect(e,n.wait,s),c=await Gt(this,Lt,\"f\").createClientStrategy(r,a),d=new Dt.ChannelClient(a,(()=>Dt.ChannelClient.wireClose(this.wire,a,a.endpointId)),c);return c.onEndpointDisconnect(a.channelId,(async()=>{try{await d.sendDisconnectAction()}catch(e){console.warn(`Something went wrong during disconnect for client with uuid: ${a.uuid} / name: ${a.name} / endpointId: ${a.endpointId}.`)}finally{Dt.ChannelClient.handleProviderDisconnect(a)}})),d}async create(e,t){if(!e)throw new Error(\"Please provide a channelName to create a channel\");const{payload:{data:n}}=await this.wire.sendAction(\"create-channel\",{channelName:e}),i=Gt(this,Lt,\"f\").createProvider(t,n);return this.on(\"client-disconnected\",(t=>{t.channelName===e&&Vt.ChannelProvider.handleClientDisconnection(i,t)})),i}}le.Channel=Kt,Lt=new WeakMap,Tt=new WeakMap,$t=new WeakMap,Object.defineProperty(de,\"__esModule\",{value:!0}),de.InterAppPayload=de.InterApplicationBus=void 0;const qt=t,Jt=d,Yt=he,Zt=le,Qt=O;class Xt extends Jt.Base{constructor(e){super(e),this.events={subscriberAdded:\"subscriber-added\",subscriberRemoved:\"subscriber-removed\"},this.refCounter=new Yt.RefCounter,this.Channel=new Zt.Channel(e),this.emitter=new qt.EventEmitter,e.registerMessageHandler(this.onmessage.bind(this)),this.on=this.emitter.on.bind(this.emitter),this.removeAllListeners=this.emitter.removeAllListeners.bind(this.emitter)}async publish(e,t){await this.wire.sendAction(\"publish-message\",{topic:e,message:t,sourceWindowName:this.me.name})}async send(e,t,n){const i=(0,Qt.validateIdentity)(e);if(i)throw new Error(i);await this.wire.sendAction(\"send-message\",{destinationUuid:e.uuid,destinationWindowName:e.name,topic:t,message:n,sourceWindowName:this.me.name})}subscribe(e,t,n){const i=this.createSubscriptionKey(e.uuid,e.name||\"*\",t);return this.emitter.on(i,n),this.refCounter.actOnFirst(i,(async()=>{await this.wire.sendAction(\"subscribe\",{sourceUuid:e.uuid,sourceWindowName:e.name||\"*\",topic:t,destinationWindowName:this.me.name})}),(()=>Promise.resolve()))}unsubscribe(e,t,n){const i=e.name||\"*\",r=this.createSubscriptionKey(e.uuid,i,t);return this.emitter.removeListener(r,n),this.refCounter.actOnLast(r,(async()=>{await this.wire.sendAction(\"unsubscribe\",{sourceUuid:e.uuid,sourceWindowName:i,topic:t,destinationWindowName:this.me.name})}),(()=>new Promise((e=>e)).then((()=>{}))))}processMessage(e){const{payload:{message:t,sourceWindowName:n,sourceUuid:i,topic:r}}=e,o=[this.createSubscriptionKey(i,n,r),this.createSubscriptionKey(i,\"*\",r),this.createSubscriptionKey(\"*\",\"*\",r)],s={uuid:i,name:n};o.forEach((e=>{this.emitter.emit(e,t,s)}))}emitSubscriverEvent(e,t){const{payload:{targetName:n,uuid:i,topic:r}}=t,o={name:n,uuid:i,topic:r};this.emitter.emit(e,o)}createSubscriptionKey(e,t,n){const i=t||\"*\";if(!(e&&i&&n))throw new Error(\"Missing uuid, name, or topic string\");return function(...e){return e.map((e=>Buffer.from(`${e}`).toString(\"base64\"))).join(\"/\")}(e,i,n)}onmessage(e){const{action:t}=e;switch(t){case\"process-message\":this.processMessage(e);break;case this.events.subscriberAdded:this.emitSubscriverEvent(this.events.subscriberAdded,e);break;case this.events.subscriberRemoved:this.emitSubscriverEvent(this.events.subscriberRemoved,e)}return!0}}de.InterApplicationBus=Xt;de.InterAppPayload=class{};var en={};Object.defineProperty(en,\"__esModule\",{value:!0}),en.Clipboard=void 0;const tn=d;class nn extends tn.Base{async writeText(e){await this.wire.sendAction(\"clipboard-write-text\",e)}async readText(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-text\",{type:e});return t.data}async writeImage(e){await this.wire.sendAction(\"clipboard-write-image\",e)}async readImage(e={format:\"dataURL\"}){const{payload:t}=await this.wire.sendAction(\"clipboard-read-image\",e);return t.data}async writeHtml(e){await this.wire.sendAction(\"clipboard-write-html\",e)}async readHtml(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-html\",{type:e});return t.data}async writeRtf(e){await this.wire.sendAction(\"clipboard-write-rtf\",e)}async readRtf(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-rtf\",{type:e});return t.data}async write(e){await this.wire.sendAction(\"clipboard-write\",e)}async getAvailableFormats(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-formats\",{type:e});return t.data}}en.Clipboard=nn;var rn={},on={},sn={};Object.defineProperty(sn,\"__esModule\",{value:!0}),sn.ExternalApplication=void 0;const an=d;class cn extends an.EmitterBase{constructor(e,t){super(e,\"external-application\",t.uuid),this.identity=t}getInfo(){return this.wire.sendAction(\"get-external-application-info\",this.identity).then((({payload:e})=>e.data))}}sn.ExternalApplication=cn,Object.defineProperty(on,\"__esModule\",{value:!0}),on.ExternalApplicationModule=void 0;const dn=d,hn=sn;class ln extends dn.Base{wrap(e){return this.wire.sendAction(\"external-application-wrap\").catch((e=>{})),Promise.resolve(new hn.ExternalApplication(this.wire,{uuid:e}))}wrapSync(e){return this.wire.sendAction(\"external-application-wrap-sync\").catch((e=>{})),new hn.ExternalApplication(this.wire,{uuid:e})}}on.ExternalApplicationModule=ln,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(on,e),n(sn,e)}(rn);var un={},pn={},wn={};Object.defineProperty(wn,\"__esModule\",{value:!0}),wn._Frame=void 0;const yn=d;class fn extends yn.EmitterBase{constructor(e,t){super(e,\"frame\",t.uuid,t.name),this.identity=t}getInfo(){return this.wire.sendAction(\"get-frame-info\",this.identity).then((({payload:e})=>e.data))}getParentWindow(){return this.wire.sendAction(\"get-parent-window\",this.identity).then((({payload:e})=>e.data))}}wn._Frame=fn,Object.defineProperty(pn,\"__esModule\",{value:!0}),pn._FrameModule=void 0;const gn=d,mn=O,vn=wn;class Cn extends gn.Base{async wrap(e){this.wire.sendAction(\"frame-wrap\").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}wrapSync(e){this.wire.sendAction(\"frame-wrap-sync\").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}getCurrent(){return this.wire.sendAction(\"frame-get-current\").catch((e=>{})),Promise.resolve(new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity()))}getCurrentSync(){return this.wire.sendAction(\"frame-get-current-sync\").catch((e=>{})),new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity())}}pn._FrameModule=Cn,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(pn,e),n(wn,e)}(un);var bn={};Object.defineProperty(bn,\"__esModule\",{value:!0}),bn.GlobalHotkey=void 0;const In=d;class En extends In.EmitterBase{constructor(e){super(e,\"global-hotkey\")}async register(e,t){await this.on(e,t),await this.wire.sendAction(\"global-hotkey-register\",{hotkey:e})}async unregister(e){await this.removeAllListeners(e),await this.wire.sendAction(\"global-hotkey-unregister\",{hotkey:e})}async unregisterAll(){await Promise.all(this.eventNames().filter((e=>!(\"registered\"===e||\"unregistered\"===e))).map((e=>this.removeAllListeners(e)))),await this.wire.sendAction(\"global-hotkey-unregister-all\",{})}async isRegistered(e){const{payload:{data:t}}=await this.wire.sendAction(\"global-hotkey-is-registered\",{hotkey:e});return t}}bn.GlobalHotkey=En;var xn,An={},Pn={},Mn={},_n=s&&s.__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)};Object.defineProperty(Mn,\"__esModule\",{value:!0}),Mn.Platform=void 0;const On=d,Sn=O,Rn=new Map;class Fn extends On.EmitterBase{constructor(e,t){super(t.wire,\"application\",e.uuid),this.getClient=e=>{this.wire.sendAction(\"platform-get-client\",this.identity).catch((e=>{}));const t=e||this.identity,{uuid:n}=t;if(!Rn.has(n)){const e=_n(this,xn,\"f\").call(this,n);Rn.set(n,e)}return Rn.get(n)},xn.set(this,(async e=>{try{const t=`custom-frame-${e}`,n=await this._channel.connect(t,{wait:!1});return n.onDisconnection((()=>{Rn.delete(e)})),n}catch(t){throw Rn.delete(e),new Error(\"The targeted Platform is not currently running. Listen for application-started event for the given Uuid.\")}})),this.launchLegacyManifest=this.launchContentManifest;const n=(0,Sn.validateIdentity)(e);if(n)throw new Error(n);this._channel=t,this.identity={uuid:e.uuid},this.Layout=this.fin.Platform.Layout,this.Application=this.fin.Application.wrapSync(this.identity)}async createView(e,t,n){this.wire.sendAction(\"platform-create-view\",this.identity).catch((e=>{}));const i=await this.getClient(),r=await i.dispatch(\"create-view\",{target:t,opts:e,targetView:n});if(!r||(0,Sn.validateIdentity)(r.identity))throw new Error(`When overwriting the createView call, please return an object that has a valid 'identity' property: ${JSON.stringify(r)}`);return this.fin.View.wrapSync(r.identity)}async createWindow(e){this.wire.sendAction(\"platform-create-window\",this.identity).catch((e=>{}));const t=await this.getClient();e.reason||(e.reason=\"api-call\");const n=await t.dispatch(\"create-view-container\",e);if(!n||(0,Sn.validateIdentity)(n.identity))throw new Error(`When overwriting the createWindow call, please return an object that has a valid 'identity' property: ${JSON.stringify(n)}`);const{identity:i}=n,r=this.fin.Window.wrapSync(i);return r.name=i.name,r.uuid=i.uuid,r}async quit(){this.wire.sendAction(\"platform-quit\",this.identity).catch((e=>{}));return(await this.getClient()).dispatch(\"quit\")}async closeView(e){this.wire.sendAction(\"platform-close-view\",this.identity).catch((e=>{}));const t=await this.getClient();await t.dispatch(\"close-view\",{view:e})}async reparentView(e,t){console.warn(\"Platform.reparentView has been deprecated, please use Platform.createView\"),this.wire.sendAction(\"platform-reparent-view\",this.identity).catch((e=>{}));const n={...e,uuid:e.uuid??this.identity.uuid},i=await this.fin.View.wrap(n),r=await i.getOptions();return this.createView(r,t)}async getSnapshot(){this.wire.sendAction(\"platform-get-snapshot\",this.identity).catch((e=>{}));return(await this.getClient()).dispatch(\"get-snapshot\")}async getViewSnapshot(e){return(await this.getClient()).dispatch(\"get-view-snapshot\",{viewIdentity:e})}async applySnapshot(e,t){this.wire.sendAction(\"platform-apply-snapshot\",this.identity).catch((e=>{}));const n=\"Requested snapshot must be a valid Snapshot object, or a url or filepath to such an object.\";let i;if(\"string\"==typeof e)try{i=(await this._channel.wire.sendAction(\"get-application-manifest\",{manifestUrl:e})).payload.data}catch(e){throw new Error(`${n}: ${e}`)}else i=e;if(!i.windows)throw new Error(n);const r=await this.getClient();return await r.dispatch(\"apply-snapshot\",{snapshot:i,options:t}),this}async fetchManifest(e){return(await this.getClient()).dispatch(\"platform-fetch-manifest\",{manifestUrl:e})}async launchContentManifest(e){this.wire.sendAction(\"platform-launch-content-manifest\",this.identity).catch((()=>{}));const t=await this.getClient(),n=await this.fetchManifest(e);return t.dispatch(\"launch-into-platform\",{manifest:n,manifestUrl:e}),this}async setWindowContext(e={},t){if(this.wire.sendAction(\"platform-set-window-context\",this.identity).catch((e=>{})),!e)throw new Error(\"Please provide a serializable object or string to set the context.\");const n=await this.getClient(),{entityType:i}=t?await this.fin.System.getEntityInfo(t.uuid,t.name):this.fin.me;await n.dispatch(\"set-window-context\",{context:e,entityType:i,target:t||{uuid:this.fin.me.uuid,name:this.fin.me.name}})}async getWindowContext(e){this.wire.sendAction(\"platform-get-window-context\",this.identity).catch((e=>{}));const t=await this.getClient(),{entityType:n}=e?await this.fin.System.getEntityInfo(e.uuid,e.name):this.fin.me;return t.dispatch(\"get-window-context\",{target:e||{uuid:this.fin.me.uuid,name:this.fin.me.name},entityType:n})}async closeWindow(e,t={skipBeforeUnload:!1}){this.wire.sendAction(\"platform-close-window\",this.identity).catch((e=>{}));return(await this.getClient()).dispatch(\"close-window\",{windowId:e,options:t})}}Mn.Platform=Fn,xn=new WeakMap;var jn={},kn={},Ln={},Tn={};function $n(e){switch(e){case\"columns\":case\"grid\":case\"rows\":case\"tabs\":return!0;default:return!1}}Object.defineProperty(Tn,\"__esModule\",{value:!0}),Tn.overrideFromComposables=Tn.isValidPresetType=void 0,Tn.isValidPresetType=$n,Tn.overrideFromComposables=function(...e){return t=>e.reduceRight(((e,t)=>n=>t(e(n))),(e=>e))(t)},Tn.default={isValidPresetType:$n};var Bn={},Gn={},Wn={};Object.defineProperty(Wn,\"__esModule\",{value:!0}),Wn.ApiConsumer=void 0;Wn.ApiConsumer=class{constructor(e){this.strategy=e,this.consume=async e=>(await this.strategy.getExposedFunctions(e)).reduce(((t,n)=>({...t,[n.key]:this.strategy.createFunction(n,e)})),{})}};var Hn={},Nn={};Object.defineProperty(Nn,\"__esModule\",{value:!0}),Nn.expose=Nn.getExposedProperties=void 0;const Dn=Symbol(\"exposedProperties\");Nn.getExposedProperties=e=>e[Dn]||e.prototype[Dn]||[];Nn.expose=e=>(t,n,i)=>{t[Dn]=t[Dn]||[],t[Dn].push({key:n,descriptor:i,options:e})},Object.defineProperty(Hn,\"__esModule\",{value:!0}),Hn.ApiExposer=void 0;const Un=Nn;Hn.ApiExposer=class{constructor(e){this.strategy=e,this.exposeInstance=async(e,t)=>{const n=(0,Un.getExposedProperties)(e),i=await Promise.all(n.map((async({key:n,options:i})=>({key:n,options:await this.strategy.exposeFunction(e[n].bind(e),{key:n,options:i,meta:t})}))));await this.strategy.exposeMeta(t,i)}}};var Vn={},zn={},Kn={};Object.defineProperty(Kn,\"__esModule\",{value:!0}),Kn.ChannelsConsumer=void 0;Kn.ChannelsConsumer=class{constructor(e){this.channel=e,this.getExposedFunctions=async e=>{const{id:t}=e,{props:n}=await this.channel.dispatch(`api-meta:${t}`);return n},this.createFunction=e=>(...t)=>{const{action:n}=e.options;return this.channel.dispatch(n,{args:t})}}};var qn={};Object.defineProperty(qn,\"__esModule\",{value:!0}),qn.ChannelsExposer=void 0;qn.ChannelsExposer=class{constructor(e){this.channelProviderOrClient=e,this.exposeFunction=async(e,t)=>{const{key:n,options:i,meta:r}=t,{id:o}=r,s=`${o}.${i?.action||n}`;return await this.channelProviderOrClient.register(s,(async({args:t})=>e(...t))),{action:s}},this.exposeMeta=async({id:e},t)=>{const n=`api-meta:${e}`;await this.channelProviderOrClient.register(n,(()=>({props:t})))}}},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Kn,e),n(qn,e)}(zn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(zn,e)}(Vn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Wn,e),n(Hn,e),n(Vn,e),n(Nn,e)}(Gn);var Jn={};Object.defineProperty(Jn,\"__esModule\",{value:!0}),Jn.createRelayedDispatch=exports.relayChannelClientApi_1=Jn.relayChannelClientApi=void 0;const Yn=[\"no longer connected\",\"RTCDataChannel closed unexpectedly\",\"The client you are trying to dispatch from is disconnected from the target provider\"];exports.relayChannelClientApi_1=Jn.relayChannelClientApi=async(e,t)=>{e.register(`relay:${t}`,(({action:t,target:n,payload:i})=>e.dispatch(n,t,i))),await Promise.resolve()};Jn.createRelayedDispatch=(e,t,n,i)=>async(r,o)=>{try{return await e.dispatch(`relay:${n}`,{action:r,payload:o,target:t})}catch(e){if(s=e.message,Yn.some((e=>s.includes(e)))&&i)throw new Error(i);throw e}var s};var Zn,Qn,Xn,ei=s&&s.__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},ti=s&&s.__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)};Object.defineProperty(Bn,\"__esModule\",{value:!0}),Bn.ColumnOrRow=Bn.TabStack=Bn.LayoutNode=void 0;const ni=Gn,ii=Jn;class ri{constructor(e,t){Zn.set(this,void 0),this.isRoot=()=>ti(this,Zn,\"f\").isRoot(this.entityId),this.exists=()=>ti(this,Zn,\"f\").exists(this.entityId),this.getParent=async()=>{const e=await ti(this,Zn,\"f\").getParent(this.entityId);if(e)return ri.getEntity(e,ti(this,Zn,\"f\"))},this.createAdjacentStack=async(e,t)=>{const n=await ti(this,Zn,\"f\").createAdjacentStack(this.entityId,e,t);return ri.getEntity({entityId:n,type:\"stack\"},ti(this,Zn,\"f\"))},this.getAdjacentStacks=async e=>(await ti(this,Zn,\"f\").getAdjacentStacks({targetId:this.entityId,edge:e})).map((e=>ri.getEntity({type:\"stack\",entityId:e.entityId},ti(this,Zn,\"f\")))),ei(this,Zn,e,\"f\"),this.entityId=t}}Bn.LayoutNode=ri,Zn=new WeakMap,ri.newLayoutEntitiesClient=async(e,t,n)=>{const i=(0,ii.createRelayedDispatch)(e,n,\"layout-relay\",\"You are trying to interact with a layout component on a window that does not exist or has been destroyed.\");return new ni.ApiConsumer(new ni.ChannelsConsumer({dispatch:i})).consume({id:t})},ri.getEntity=(e,t)=>{const{entityId:n,type:i}=e;switch(i){case\"column\":case\"row\":return new si(t,n,i);case\"stack\":return new oi(t,n);default:throw new Error(`Unrecognised Layout Entity encountered ('${JSON.stringify(e)})`)}};class oi extends ri{constructor(e,t){super(e,t),Qn.set(this,void 0),this.type=\"stack\",this.getViews=()=>ti(this,Qn,\"f\").getStackViews(this.entityId),this.addView=async(e,t={index:0})=>ti(this,Qn,\"f\").addViewToStack(this.entityId,e,t),this.removeView=async e=>{await ti(this,Qn,\"f\").removeViewFromStack(this.entityId,e)},this.setActiveView=async e=>{await ti(this,Qn,\"f\").setStackActiveView(this.entityId,e)},ei(this,Qn,e,\"f\")}}Bn.TabStack=oi,Qn=new WeakMap;class si extends ri{constructor(e,t,n){super(e,t),Xn.set(this,void 0),this.getContent=async()=>(await ti(this,Xn,\"f\").getContent(this.entityId)).map((e=>ri.getEntity(e,ti(this,Xn,\"f\")))),ei(this,Xn,e,\"f\"),this.type=n}}Bn.ColumnOrRow=si,Xn=new WeakMap;var ai={};Object.defineProperty(ai,\"__esModule\",{value:!0}),ai.DEFAULT_LAYOUT_KEY=ai.LAYOUT_CONTROLLER_ID=void 0,ai.LAYOUT_CONTROLLER_ID=\"layout-entities\",ai.DEFAULT_LAYOUT_KEY=\"__default__\";var ci,di,hi,li=s&&s.__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)};Object.defineProperty(Ln,\"__esModule\",{value:!0}),Ln.Layout=void 0;const ui=G,pi=O,wi=d,yi=Tn,fi=Bn,gi=ai;class mi extends wi.Base{static getClient(e){return li(e,di,\"f\").getValue()}constructor(e,t){super(t),ci.add(this),di.set(this,new ui.Lazy((async()=>fi.LayoutNode.newLayoutEntitiesClient(await this.platform.getClient(),gi.LAYOUT_CONTROLLER_ID,this.identity)))),this.replace=async e=>{this.wire.sendAction(\"layout-replace\").catch((e=>{}));const t=await this.platform.getClient();await t.dispatch(\"replace-layout\",{target:this.identity,opts:{layout:e}})},this.replaceView=async(e,t)=>{this.wire.sendAction(\"layout-replace-view\").catch((e=>{}));const n=await this.platform.getClient();await n.dispatch(\"replace-view\",{target:this.identity,opts:{viewToReplace:e,newView:t}})},this.applyPreset=async e=>{this.wire.sendAction(\"layout-apply-preset\").catch((e=>{}));const t=await this.platform.getClient(),{presetType:n}=e;if(!n||!(0,yi.isValidPresetType)(n))throw new Error(\"Cannot apply preset layout, please include an applicable presetType property in the PresetLayoutOptions.\");await t.dispatch(\"apply-preset-layout\",{target:this.identity,opts:{presetType:n}})};const n=(0,pi.validateIdentity)(e);if(n)throw new Error(n);this.identity=e,this.platform=this.fin.Platform.wrapSync({uuid:e.uuid}),e.uuid===this.fin.me.uuid&&e.name===this.fin.me.name&&(this.init=this.fin.Platform.Layout.init)}async getConfig(){this.wire.sendAction(\"layout-get-config\").catch((e=>{}));return(await this.platform.getClient()).dispatch(\"get-frame-snapshot\",{target:this.identity})}async getCurrentViews(){this.wire.sendAction(\"layout-get-views\").catch((e=>{}));const e=await this.platform.getClient();return(await e.dispatch(\"get-layout-views\",{target:this.identity})).map((e=>this.fin.View.wrapSync(e)))}async getRootItem(){this.wire.sendAction(\"layout-get-root-item\").catch((()=>{}));const e=await li(this,di,\"f\").getValue(),t=await e.getRoot(\"layoutName\"in this.identity?this.identity:void 0);return fi.LayoutNode.getEntity(t,e)}async getStackByViewIdentity(e){this.wire.sendAction(\"layout-get-stack-by-view\").catch((()=>{}));const t=await li(this,di,\"f\").getValue(),n=await t.getStackByView(e);if(!n)throw new Error(`No stack found for view: ${e.uuid}/${e.name}`);return fi.LayoutNode.getEntity(n,t)}async addView(e,{location:t,targetView:n}={}){this.wire.sendAction(\"layout-add-view\").catch((e=>{}));const{identity:i}=await li(this,ci,\"m\",hi).call(this,\"layout-add-view\",{viewOptions:e,location:t,targetView:n});return{identity:i}}async closeView(e){this.wire.sendAction(\"layout-close-view\").catch((e=>{})),await li(this,ci,\"m\",hi).call(this,\"layout-close-view\",{viewIdentity:e})}}Ln.Layout=mi,di=new WeakMap,ci=new WeakSet,hi=async function(e,t){return(await this.platform.getClient()).dispatch(e,{target:this.identity,opts:t})};var vi,Ci,bi,Ii,Ei,xi=s&&s.__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)},Ai=s&&s.__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};Object.defineProperty(kn,\"__esModule\",{value:!0}),kn.LayoutModule=void 0;const Pi=d,Mi=Ln,_i=ai;class Oi extends Pi.Base{constructor(){super(...arguments),vi.add(this),Ci.set(this,!1),bi.set(this,null),this.init=async(e={})=>{if(this.wire.sendAction(\"layout-init\").catch((e=>{})),!this.wire.environment.layoutAllowedInContext(this.fin))throw new Error(\"Layout.init can only be called from a Window context.\");if(xi(this,Ci,\"f\"))throw new Error(\"Layout.init was already called, please use Layout.create to add additional layouts.\");\"openfin\"===this.wire.environment.type&&await this.fin.Platform.getCurrentSync().getClient(),Ai(this,Ci,!0,\"f\"),Ai(this,bi,await this.wire.environment.initLayoutManager(this.fin,this.wire,e),\"f\"),await this.wire.environment.applyLayoutSnapshot(this.fin,xi(this,bi,\"f\"),e);const t={name:this.fin.me.name,uuid:this.fin.me.uuid};if(!e.layoutManagerOverride){const e={layoutName:_i.DEFAULT_LAYOUT_KEY,...t};return xi(this,Ii,\"f\").call(this,e)}return this.wrapSync(t)},Ii.set(this,(e=>{const t=\"[Layout] You are using a deprecated property `layoutManager` - it will throw if you access it starting in v37.\",n=new Proxy({},{get(e,n){throw console.warn(`[Layout-mgr-proxy] accessing ${n.toString()}`),new Error(t)}}),i=Object.assign(this.wrapSync(e),{layoutManager:n});return new Proxy(i,{get(e,n){if(\"layoutManager\"===n)throw console.warn(`[Layout-proxy] accessing ${n.toString()}`),new Error(t);return e[n]}})})),this.getCurrentLayoutManagerSync=()=>xi(this,vi,\"m\",Ei).call(this,\"fin.Platform.Layout.getCurrentLayoutManagerSync()\"),this.create=async e=>this.wire.environment.createLayout(xi(this,vi,\"m\",Ei).call(this,\"fin.Platform.Layout.create()\"),e),this.destroy=async e=>this.wire.environment.destroyLayout(xi(this,vi,\"m\",Ei).call(this,\"fin.Platform.Layout.destroy()\"),e)}async wrap(e){return this.wire.sendAction(\"layout-wrap\").catch((e=>{})),new Mi.Layout(e,this.wire)}wrapSync(e){return this.wire.sendAction(\"layout-wrap-sync\").catch((e=>{})),new Mi.Layout(e,this.wire)}async getCurrent(){if(this.wire.sendAction(\"layout-get-current\").catch((e=>{})),\"openfin\"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error(\"You are not in a Window context. Only Windows can have a Layout.\");const{uuid:e,name:t}=this.fin.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction(\"layout-get-current-sync\").catch((e=>{})),\"openfin\"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error(\"You are not in a Window context. Only Windows can have a Layout.\");const{uuid:e,name:t}=this.fin.me;return this.wrapSync({uuid:e,name:t})}async getLayoutByViewIdentity(e){this.wire.sendAction(\"layout-get-by-view-identity\").catch((()=>{}));let t=await this.wire.environment.getViewWindowIdentity(this.fin,e);t.identity&&(t=t.identity);try{const n=this.wrapSync(t),i=await Mi.Layout.getClient(n),r=await i.getLayoutIdentityForViewOrThrow(e);return this.wrapSync(r)}catch(n){if(![\"No action registered at target for\",\"getLayoutIdentityForViewOrThrow is not a function\"].some((e=>n.message.includes(e))))throw n;if(t.uuid===t.name)throw new Error(`View identity ${JSON.stringify(e)} is not attached to any layout in provider window ${JSON.stringify(t)}.`);return this.wrapSync(t)}}}kn.LayoutModule=Oi,Ci=new WeakMap,bi=new WeakMap,Ii=new WeakMap,vi=new WeakSet,Ei=function(e){if(!xi(this,bi,\"f\"))throw new Error(`You must call init before using the API ${e}`);return xi(this,bi,\"f\")},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(kn,e),n(Ln,e)}(jn),Object.defineProperty(Pn,\"__esModule\",{value:!0}),Pn.PlatformModule=void 0;const Si=d,Ri=Mn,Fi=jn;class ji extends Si.Base{constructor(e,t){super(e),this._channel=t,this.Layout=new Fi.LayoutModule(this.wire)}async init(e){if(!fin.__internal_.isPlatform||fin.me.name!==fin.me.uuid)throw new Error(\"fin.Platform.init should only be called from a custom platform provider running in the main window of the application.\");return this.wire.environment.initPlatform(this.fin,e)}async wrap(e){return this.wire.sendAction(\"platform-wrap\").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}wrapSync(e){return this.wire.sendAction(\"platform-wrap-sync\").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}async getCurrent(){return this.wire.sendAction(\"platform-get-current\").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction(\"platform-get-current-sync\").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}start(e){return this.wire.sendAction(\"platform-start\").catch((e=>{})),new Promise((async(t,n)=>{try{const{uuid:n}=e,i=await this.fin.Application._create({...e,isPlatformController:!0});i.once(\"platform-api-ready\",(()=>t(this.wrapSync({uuid:n})))),i._run({uuid:n})}catch(e){n(e)}}))}startFromManifest(e,t){return this.wire.sendAction(\"platform-start-from-manifest\").catch((e=>{})),new Promise((async(n,i)=>{try{const i=await this.fin.Application._createFromManifest(e);i.once(\"platform-api-ready\",(()=>n(this.wrapSync({uuid:i.identity.uuid})))),i._run(t)}catch(e){i(e)}}))}}Pn.PlatformModule=ji,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Pn,e),n(Mn,e)}(An);var ki={};!function(e){Object.defineProperty(e,\"__esModule\",{value:!0}),e.getMe=e.getBaseMe=e.environmentUnsupportedMessage=void 0;const t=J(),n=un,i=ie(),r=rn;function o(e,t,n){return{...{isView:\"view\"===e,isWindow:\"window\"===e,isFrame:\"iframe\"===e,isExternal:\"external connection\"===e},uuid:t,name:n,entityType:e}}e.environmentUnsupportedMessage=\"You are not running in OpenFin.\",e.getBaseMe=o,e.getMe=function(s){const{uuid:a,name:c,entityType:d}=s.me,h={setContext(){throw new Error(e.environmentUnsupportedMessage)},addContextHandler(){throw new Error(e.environmentUnsupportedMessage)},getContextGroups(){throw new Error(e.environmentUnsupportedMessage)},joinContextGroup(){throw new Error(e.environmentUnsupportedMessage)},removeFromContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getAllClientsInContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getInfoForContextGroup(){throw new Error(e.environmentUnsupportedMessage)}},l=\"Interop API has not been instantiated. Either connection has failed or you have not declared interop in your config.\",u={setContext(){throw new Error(l)},addContextHandler(){throw new Error(l)},getContextGroups(){throw new Error(l)},joinContextGroup(){throw new Error(l)},removeFromContextGroup(){throw new Error(l)},getAllClientsInContextGroup(){throw new Error(l)},getInfoForContextGroup(){throw new Error(l)}},p={eventNames:()=>{throw new Error(e.environmentUnsupportedMessage)},emit:()=>{throw new Error(e.environmentUnsupportedMessage)},listeners:()=>{throw new Error(e.environmentUnsupportedMessage)},listenerCount:()=>{throw new Error(e.environmentUnsupportedMessage)},on:()=>{throw new Error(e.environmentUnsupportedMessage)},addListener:()=>{throw new Error(e.environmentUnsupportedMessage)},once:()=>{throw new Error(e.environmentUnsupportedMessage)},prependListener:()=>{throw new Error(e.environmentUnsupportedMessage)},prependOnceListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeAllListeners:()=>{throw new Error(e.environmentUnsupportedMessage)}};switch(d){case\"view\":return Object.assign(new t.View(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case\"window\":return Object.assign(new i._Window(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case\"iframe\":return Object.assign(new n._Frame(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case\"external connection\":return Object.assign(new r.ExternalApplication(s,{uuid:a}),o(d,a,c),{interop:u,isOpenFin:!1});default:return{...o(d,a,c),...p,interop:h,isOpenFin:!1}}}}(ki);var Li={},Ti={},$i={};Object.defineProperty($i,\"__esModule\",{value:!0}),$i.createWarningObject=$i.createUnusableObject=void 0,$i.createUnusableObject=function(e){const t=()=>{throw new Error(e)};return new Proxy({},{apply:t,construct:t,defineProperty:t,deleteProperty:t,get:t,getOwnPropertyDescriptor:t,getPrototypeOf:t,has:t,isExtensible:t,ownKeys:t,preventExtensions:t,set:t,setPrototypeOf:t})},$i.createWarningObject=function(e,t){return new Proxy(t,{get:(...t)=>(console.warn(e),Reflect.get(...t)),set:(...t)=>(console.warn(e),Reflect.set(...t)),getOwnPropertyDescriptor:(...t)=>(console.warn(e),Reflect.getOwnPropertyDescriptor(...t)),ownKeys:(...t)=>(console.warn(e),Reflect.ownKeys(...t))})};var Bi,Gi={},Wi={};var Hi={};!function(e){Object.defineProperty(e,\"__esModule\",{value:!0}),e.wrapIntentHandler=e.BROKER_ERRORS=e.generateOverrideWarning=e.generateOverrideError=e.wrapContextHandler=e.wrapInTryCatch=e.generateId=void 0;e.generateId=()=>`${Math.random()}${Date.now()}`;e.wrapInTryCatch=(e,t)=>(...n)=>{try{return e(...n)}catch(e){throw new Error((t||\"\")+e)}};e.wrapContextHandler=(e,t)=>async n=>{try{await e(n)}catch(e){throw console.error(`Error thrown by handler ${t} for context type ${n.type}: ${e}`),e}};e.generateOverrideError=(e,t)=>`You have tried to to use ${e} but ${t} has not been overridden in the Interop Broker. Please override this function. Refer to our documentation for more info.`;e.generateOverrideWarning=(e,t,n,i)=>{const{uuid:r,name:o}=n;return i?`Entity with identity: ${r}/${o} has called ${i} or ${e} but ${t} has not been overridden.`:`Entity with identity: ${r}/${o} has called ${e} but ${t} has not been overridden.`},e.BROKER_ERRORS={fireIntent:(0,e.generateOverrideError)(\"fireIntent\",\"handleFiredIntent\"),fireIntentForContext:(0,e.generateOverrideError)(\"fireIntentForContext\",\"handleFiredIntentForContext\"),getInfoForIntent:(0,e.generateOverrideError)(\"getInfoForIntent\",\"handleInfoForIntent\"),getInfoForIntentsByContext:(0,e.generateOverrideError)(\"getInfoForIntentsByContext\",\"handleInfoForIntentsByContext\"),joinSessionContextGroupWithJoinContextGroup:\"The Context Group you have tried to join is a Session Context Group. Custom Context Groups can only be defined by the Interop Broker through code or manifest configuration. Please use joinSessionContextGroup.\",fdc3Open:(0,e.generateOverrideError)(\"fdc3.open\",\"fdc3HandleOpen\"),fdc3FindInstances:(0,e.generateOverrideError)(\"fdc3.findInstances\",\"fdc3HandleFindInstances\"),fdc3GetAppMetadata:(0,e.generateOverrideError)(\"fdc3.getAppMetadata\",\"fdc3HandleGetAppMetadata\"),fdc3GetInfo:(0,e.generateOverrideError)(\"fdc3.getInfo\",\"fdc3HandleGetInfo\")};e.wrapIntentHandler=(e,t)=>async n=>{try{return e(n)}catch(e){throw console.error(`Error thrown by handler ${t}: ${e}`),e}}}(Hi);var Ni,Di,Ui={};function Vi(){if(Di)return Gi;Di=1;var e,t,n,r=s&&s.__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},o=s&&s.__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)},a=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Gi,\"__esModule\",{value:!0}),Gi.InteropBroker=void 0;const c=d,h=a(function(){if(Bi)return Wi;Bi=1,Object.defineProperty(Wi,\"__esModule\",{value:!0});const e=Cr();return Wi.default=class{constructor(e,t){this.provider=e,this.id=t,this.lastContext=void 0,this.contextGroupMap=new Map,this.clients=new Map,this.registerListeners()}registerListeners(){this.provider.register(`sessionContextGroup:getContext-${this.id}`,this.getCurrentContext.bind(this)),this.provider.register(`sessionContextGroup:setContext-${this.id}`,this.setContext.bind(this)),this.provider.register(`sessionContextGroup:handlerAdded-${this.id}`,this.handlerAdded.bind(this)),this.provider.register(`sessionContextGroup:handlerRemoved-${this.id}`,this.handlerRemoved.bind(this))}getCurrentContext(e){return e.type?this.contextGroupMap.get(e.type):this.lastContext}setContext(t,n){const{context:i}=t,r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name} not in Session Client State Map`);this.contextGroupMap.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{e.contextHandlers.get(i.type)?.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getClientState(e){return this.clients.get(e.endpointId)}async handlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(i){const e=r.contextHandlers.get(i)||[];r.contextHandlers.set(i,[...e,n]);const o=this.contextGroupMap.get(i);o&&await this.provider.dispatch(t,n,o)}else{r.globalHandler=n;const e=[...this.contextGroupMap.keys()].map((async e=>{const i=this.contextGroupMap.get(e);i&&await this.provider.dispatch(t,n,i)}));await Promise.all(e)}}handlerRemoved(e,t){const{handlerId:n}=e,i=this.clients.get(t.endpointId);i?(Array.from(i.contextHandlers).forEach((([,e])=>{const t=e.indexOf(n);t>-1&&e.splice(t,1)})),i.globalHandler===n&&(i.globalHandler=void 0)):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={contextHandlers:new Map,clientIdentity:e,globalHandler:void 0};this.clients.set(e.endpointId,t)}}onDisconnection(e){this.clients.delete(e.endpointId)}},Wi}()),l=Hi,u=a(i),p=function(){if(Ni)return Ui;Ni=1,Object.defineProperty(Ui,\"__esModule\",{value:!0}),Ui.PrivateChannelProvider=void 0;const e=Vi();return Ui.PrivateChannelProvider=class t{constructor(e,t){this.provider=e,this.id=t,this.clients=new Map,this.registerListeners(),this.contextByContextType=new Map,this.lastContext=void 0,this.provider.onConnection((e=>this.registerNewClient(e))),this.provider.onDisconnection((async e=>{const{endpointId:t}=e;this.clients.has(t)&&await this.handleClientDisconnecting(e),0===(await this.provider.getAllClientInfo()).length&&this.provider.destroy()}))}getClientState(e){return this.clients.get(e.endpointId)}registerListeners(){this.provider.register(\"broadcast\",this.broadcast.bind(this)),this.provider.register(\"getCurrentContext\",this.getCurrentContext.bind(this)),this.provider.register(\"contextHandlerAdded\",this.contextHandlerAdded.bind(this)),this.provider.register(\"contextHandlerRemoved\",this.contextHandlerRemoved.bind(this)),this.provider.register(\"nonStandardHandlerRemoved\",this.nonStandardHandlerRemoved.bind(this)),this.provider.register(\"onAddContextHandlerAdded\",this.onAddContextHandlerAdded.bind(this)),this.provider.register(\"onDisconnectHandlerAdded\",this.onDisconnectHandlerAdded.bind(this)),this.provider.register(\"onUnsubscribeHandlerAdded\",this.onUnsubscribeHandlerAdded.bind(this)),this.provider.register(\"clientDisconnecting\",((e,t)=>{this.handleClientDisconnecting(t)}))}broadcast(t,n){const{context:i}=t;if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name}, tried to call broadcast, is not connected to this Private Channel`);const r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to broadcast - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);this.contextByContextType.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{const t=e.handlerIdsByContextTypes.get(i.type);t&&t.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getCurrentContext(e,t){const{contextType:n}=e;if(!this.getClientState(t))throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call getCurrentContext, is not connected to this Private Channel`);if(void 0!==n){return this.contextByContextType.get(n)||null}return this.lastContext?this.lastContext:null}contextHandlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call addContextListener, is not connected to this Private Channel`);if(i){const e=r.handlerIdsByContextTypes.get(i)||[];r.handlerIdsByContextTypes.set(i,[...e,n])}else r.globalHandler=n;Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&e.onAddContextListenerHandlerId&&this.provider.dispatch(e.clientIdentity,e.onAddContextListenerHandlerId,i)}))}async contextHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);if(i){let e;if(i.globalHandler===n)i.globalHandler=void 0;else for(const[t,r]of i.handlerIdsByContextTypes){const i=r.indexOf(n);i>-1&&(r.splice(i,1),e=t)}const r=(await this.getConnectedClients()).map((async n=>{const{clientIdentity:i,clientIdentity:{endpointId:r},onUnsubscribeHandlerId:o}=n;r!==t.endpointId&&o&&await this.provider.dispatch(i,o,e)}));try{await Promise.all(r)}catch(e){throw console.error(`Problem when attempting to dispatch to onUnsubscribeHandlers. Error: ${e} Removing Client: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}`),new Error(e)}}else console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}.`)}nonStandardHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);i?i.onDisconnectHandlerId===n?i.onDisconnectHandlerId=void 0:i.onAddContextListenerHandlerId===n?i.onAddContextListenerHandlerId=void 0:i.onUnsubscribeHandlerId===n&&(i.onUnsubscribeHandlerId=void 0):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}onAddContextHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onAddContextListener, is not connected to this Private Channel`);n.onAddContextListenerHandlerId=i,Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&Array.from(e.handlerIdsByContextTypes.keys()).forEach((e=>{this.provider.dispatch(t,i,e)}))}))}onDisconnectHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onDisconnect, is not connected to this Private Channel`);n.onDisconnectHandlerId=i}onUnsubscribeHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onUnsubscribe, is not connected to this Private Channel`);n.onUnsubscribeHandlerId=i}removeClient(e){const t=this.getClientState(e);if(!t)throw new Error(`Client with Identity: ${e.uuid} ${e.name}, tried to call disconnect, is not connected to this Private Channel`);t.handlerIdsByContextTypes.clear(),this.clients.delete(e.endpointId)}async fireOnDisconnectForOtherClients(e){const{endpointId:t}=e,n=(await this.getConnectedClients()).map((async e=>{const{clientIdentity:{endpointId:n},onDisconnectHandlerId:i}=e;n!==t&&i&&await this.provider.dispatch(e.clientIdentity,i)}));try{await Promise.all(n)}catch(t){throw console.error(`Problem when attempting to dispatch to onDisconnectHandlers. Error: ${t} Disconnecting Client: uuid: ${e.uuid}. name: ${e.name}. endpointId: ${e.endpointId}`),new Error(t)}}async unsubscribeAll(e){const{endpointId:t}=e,n=this.clients.get(t);if(n){const t=Array.from(n.handlerIdsByContextTypes.values()).flat(),i=n.globalHandler;if(t.length>0){const n=t.map((async t=>this.contextHandlerRemoved({handlerId:t},e)));try{await Promise.all(n)}catch(e){console.error(e.message)}}if(i)try{await this.contextHandlerRemoved({handlerId:i},e)}catch(e){console.error(e.message)}}}async handleClientDisconnecting(e){await this.unsubscribeAll(e),this.removeClient(e),await this.fireOnDisconnectForOtherClients(e)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={clientIdentity:e,handlerIdsByContextTypes:new Map,globalHandler:void 0,onAddContextListenerHandlerId:void 0,onUnsubscribeHandlerId:void 0,onDisconnectHandlerId:void 0};this.clients.set(e.endpointId,t)}}async getConnectedClients(){const e=await this.provider.getAllClientInfo();return Array.from(this.clients.values()).filter((t=>{const{uuid:n,name:i}=t.clientIdentity;return e.some((e=>i===e.name&&n===e.uuid))}))}static init(e,n){return new t(e,n)}},Ui}(),w=G,y=[{id:\"green\",displayMetadata:{color:\"#00CC88\",name:\"green\"}},{id:\"purple\",displayMetadata:{color:\"#8C61FF\",name:\"purple\"}},{id:\"orange\",displayMetadata:{color:\"#FF8C4C\",name:\"orange\"}},{id:\"red\",displayMetadata:{color:\"#FF5E60\",name:\"red\"}},{id:\"pink\",displayMetadata:{color:\"#FF8FB8\",name:\"pink\"}},{id:\"yellow\",displayMetadata:{color:\"#E9FF8F\",name:\"yellow\"}}];let f=class i extends c.Base{constructor(i,s,a){super(i),e.set(this,void 0),t.set(this,void 0),n.set(this,void 0),this.getProvider=()=>o(this,n,\"f\").getValue(),this.interopClients=new Map,this.contextGroupsById=new Map,r(this,t,a.contextGroups??[...y],\"f\"),r(this,e,a.fdc3Info,\"f\"),a?.logging&&(this.logging=a.logging),this.intentClientMap=new Map,this.lastContextMap=new Map,this.sessionContextGroupMap=new Map,r(this,n,new w.Lazy(s),\"f\"),this.setContextGroupMap(),this.setupChannelProvider()}static createClosedConstructor(...e){return class extends i{constructor(...t){if(t.length){const[n,i,r]=t;if(r&&\"object\"==typeof r&&!(0,u.default)(r,e[2]))return console.warn(\"You have modified the parameters of the InteropOverride constructor. This behavior is deprecated and will be removed in a future version. You can modify these options in your manifest. Please consult our Interop docs for guidance on migrating to the new override scheme.\"),void super(e[0],e[1],r);console.warn(\"You are attempting to pass arguments to the InteropOverride constructor. This is not necessary, and these passed arguments will be ignored. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.\")}super(...e)}}}setContext({context:e},t){this.wire.sendAction(\"interop-broker-set-context\").catch((e=>{}));const n=this.getClientState(t);if(!n||!n.contextGroupId)throw n?new Error(\"You must join a context group before you can set context.\"):new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);{const{contextGroupId:t}=n;this.setContextForGroup({context:e},t)}}setContextForGroup({context:e},t){this.wire.sendAction(\"interop-broker-set-context-for-group\").catch((e=>{}));const n=this.contextGroupsById.get(t);if(!n)throw new Error(`Unable to set context for context group that isn't in the context group mapping: ${t}.`);const r=i.checkContextIntegrity(e);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(e)}`);const o=e.type;n.set(o,e),this.lastContextMap.set(t,o);Array.from(this.interopClients.values()).filter((e=>e.contextGroupId===t)).forEach((t=>{for(const[,n]of t.contextHandlers)i.isContextTypeCompatible(o,n.contextType)&&this.invokeContextHandler(t.clientIdentity,n.handlerId,e)}))}getCurrentContext(e,t){this.wire.sendAction(\"interop-broker-get-current-context\").catch((e=>{}));const n=this.getClientState(t);if(!n?.contextGroupId)throw new Error(\"You must be a member of a context group to call getCurrentContext\");const{contextGroupId:i}=n,r=this.contextGroupsById.get(i),o=this.lastContextMap.get(i),s=e?.contextType??o;return r&&s?r.get(s):void 0}async joinContextGroup({contextGroupId:e,target:t},n){if(this.wire.sendAction(\"interop-broker-join-context-group\").catch((e=>{})),this.sessionContextGroupMap.has(e))throw new Error(l.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup);if(t){i.hasEndpointId(t)&&await this.addClientToContextGroup({contextGroupId:e},t);try{const n=this.channel.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name));if(!n.length)throw new Error(`Given Identity ${t.uuid} ${t.name} is not connected to the Interop Broker.`);n.length>1&&console.warn(`More than one connection found for identity ${t.uuid} ${t.name}`);const i=[];for(const t of n)i.push(this.addClientToContextGroup({contextGroupId:e},t));await Promise.all(i)}catch(e){throw new Error(e)}}else await this.addClientToContextGroup({contextGroupId:e},n)}async addClientToContextGroup({contextGroupId:e},t){this.wire.sendAction(\"interop-broker-add-client-to-context-group\").catch((e=>{}));const n=this.getClientState(t);if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(!this.getContextGroups().find((t=>t.id===e)))throw new Error(`Attempting to join a context group that does not exist: ${e}. You may only join existing context groups.`);if(n.contextGroupId!==e){n.contextGroupId=e,await this.setCurrentContextGroupInClientOptions(t,e);const i=this.contextGroupsById.get(e);for(const[,e]of n.contextHandlers){const{contextType:n,handlerId:r}=e;if(void 0===n)i.forEach(((e,n)=>{this.invokeContextHandler(t,r,e)}));else if(i.has(n)){const e=i.get(n);e&&this.invokeContextHandler(t,r,e)}}}}async removeFromContextGroup({target:e},t){if(this.wire.sendAction(\"interop-broker-remove-from-context-group\").catch((e=>{})),e){i.hasEndpointId(e)&&await this.removeClientFromContextGroup(e);try{const t=this.channel.connections.filter((t=>t.uuid===e.uuid&&t.name===e.name));if(!t.length)throw new Error(`No connection found for given Identity ${e.uuid} ${e.name}`);t.length>1&&console.warn(`More than one connection found for identity ${e.uuid} ${e.name}`);const n=[];for(const e of t)n.push(this.removeClientFromContextGroup(e));await Promise.all(n)}catch(e){throw new Error(e)}}else await this.removeClientFromContextGroup(t)}async removeClientFromContextGroup(e){this.wire.sendAction(\"interop-broker-remove-client-from-context-group\").catch((e=>{}));const t=this.getClientState(e);t&&(t.contextGroupId=void 0),await this.setCurrentContextGroupInClientOptions(e,null)}getContextGroups(){return this.wire.sendAction(\"interop-broker-get-context-groups\").catch((e=>{})),o(this,t,\"f\").map((e=>({...e})))}getInfoForContextGroup({contextGroupId:e}){return this.wire.sendAction(\"interop-broker-get-info-for-context-group\").catch((e=>{})),this.getContextGroups().find((t=>t.id===e))}getAllClientsInContextGroup({contextGroupId:e}){this.wire.sendAction(\"interop-broker-get-all-clients-in-context-group\").catch((e=>{}));return Array.from(this.interopClients.values()).filter((t=>t.contextGroupId===e)).map((e=>e.clientIdentity))}async handleFiredIntent(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.raiseIntent\",\"InteropBroker.handleFiredIntent\",t,\"interopClient.fireIntent\");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntent)}async setIntentTarget(e,t){this.wire.sendAction(\"interop-broker-set-intent-target\").catch((e=>{}));const n=this.intentClientMap.get(t.name),i=`intent-handler-${e.name}`;if(n){const t=n.get(i);if(t){if(t.pendingIntents.push(e),t.clientIdentity&&t.isReady){const{clientIdentity:e,pendingIntents:n}=t;try{const r=n[n.length-1];await this.invokeIntentHandler(e,i,r),t.pendingIntents=[]}catch(n){console.error(`Error invoking intent handler for client ${e.uuid}/${e.name}/${e.endpointId}`),t.isReady=!1}}}else n.set(i,{isReady:!1,pendingIntents:[e]})}else{this.intentClientMap.set(t.name,new Map);const n=this.intentClientMap.get(t.name);n&&n.set(i,{isReady:!1,pendingIntents:[e]})}}async handleInfoForIntent(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.findIntent\",\"InteropBroker.handleInfoForIntent\",t,\"interopClient.getInfoForIntent\");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntent)}async handleInfoForIntentsByContext(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.findIntentsByContext\",\"InteropBroker.handleInfoForIntentsByContext\",t,\"interopClient.getInfoForIntentsByContext\");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntentsByContext)}async handleFiredIntentForContext(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.raiseIntentForContext\",\"InteropBroker.handleFiredIntentForContext\",t,\"interopClient.fireIntentForContext\");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntentForContext)}async clientDisconnected(e){}async fdc3HandleOpen({app:e,context:t},n){const i=(0,l.generateOverrideWarning)(\"fdc3.open\",\"InteropBroker.fdc3HandleOpen\",n);throw console.warn(i),new Error(l.BROKER_ERRORS.fdc3Open)}async fdc3HandleFindInstances(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.open\",\"InteropBroker.fdc3HandleFindInstances\",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3FindInstances)}async fdc3HandleGetAppMetadata(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.getAppMetadata\",\"InteropBroker.fdc3HandleGetAppMetadata\",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3GetAppMetadata)}async invokeContextHandler(e,t,n){const i=await this.getProvider();try{await i.dispatch(e,t,n)}catch(i){console.error(`Error invoking context handler ${t} for context type ${n.type} in client ${e.uuid}/${e.name}/${e.endpointId}`,i)}}async invokeIntentHandler(e,t,n){const i=await this.getProvider();await i.dispatch(e,t,n)}async fdc3HandleGetInfo(t,n){const{fdc3Version:i}=t;return{fdc3Version:i,...o(this,e,\"f\"),optionalFeatures:{OriginatingAppMetadata:!1,UserChannelMembershipAPIs:!0},appMetadata:{appId:\"\",instanceId:\"\"}}}async getAllClientInfo(){return(await this.getProvider()).getAllClientInfo()}decorateSnapshot(e){return{...e,interopSnapshotDetails:{contextGroupStates:this.getContextGroupStates()}}}applySnapshot(e,t){const n=e?.interopSnapshotDetails?.contextGroupStates;n&&(t?.closeExistingWindows||this.updateExistingClients(n),this.rehydrateContextGroupStates(n))}updateExistingClients(e){this.interopClients.forEach((t=>{const{clientIdentity:n,contextGroupId:r,contextHandlers:o}=t;if(r){const t=e[r];for(const[,e]of Object.entries(t))o.forEach((t=>{const{handlerId:r,contextType:o}=t;i.isContextTypeCompatible(e.type,o)&&this.invokeContextHandler(n,r,e)}))}}))}getContextGroupStates(){return i.toObject(this.contextGroupsById)}rehydrateContextGroupStates(e){const t=Object.entries(e);for(const[e,n]of t){const t=Object.entries(n);for(const[n,i]of t)if(this.contextGroupsById.has(e)){this.contextGroupsById.get(e).set(n,i)}else console.warn(`Attempting to set a context group that isn't in the context group mapping. Skipping context group rehydration for: ${e}`)}}contextHandlerRegistered({contextType:e,handlerId:t},n){const i={contextType:e,handlerId:t},r=this.getClientState(n);if(r?.contextHandlers.set(t,i),r&&r.contextGroupId){const{contextGroupId:i}=r,o=this.contextGroupsById.get(i);if(void 0===e)o.forEach(((e,i)=>{this.invokeContextHandler(n,t,e)}));else if(o.has(e)){const i=o.get(e);i&&this.invokeContextHandler(n,t,i)}}}async intentHandlerRegistered(e,t){const{handlerId:n}=e,i=this.intentClientMap.get(t.name),r=i?.get(n);if(i)if(r){const{pendingIntents:e}=r;r.clientIdentity=t,r.isReady=!0;try{if(e.length>0){const i=e[e.length-1];await this.invokeIntentHandler(t,n,i),r.pendingIntents=[]}}catch(e){console.error(`Error invoking intent handler: ${n} for client ${t.uuid}/${t.name}/${t.endpointId}`)}}else i.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t});else{this.intentClientMap.set(t.name,new Map);const e=this.intentClientMap.get(t.name);e&&e.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t})}}removeContextHandler({handlerId:e},t){const n=this.getClientState(t);n&&n.contextHandlers.delete(e)}handleJoinSessionContextGroup({sessionContextGroupId:e},t){try{if(!e)throw new Error(\"Failed to join session context group: must specify group id.\");const n=this.sessionContextGroupMap.get(e);if(n)n.registerNewClient(t);else{const n=new h.default(this.channel,e);n.registerNewClient(t),this.sessionContextGroupMap.set(e,n)}return{hasConflict:this.contextGroupsById.has(e)}}catch(e){throw new Error(e)}}getClientState(e){return this.interopClients.get(e.endpointId)}static toObject(e){const t=Object.fromEntries(e),n={};return Object.entries(t).forEach((([e,t])=>{const i=Object.fromEntries(t);n[e]=i})),n}static checkContextIntegrity(e){if(!e)return{isValid:!1,reason:\"No context supplied\"};if(\"object\"!=typeof e)return{isValid:!1,reason:\"Context must be an Object\"};if(!e.type)return{isValid:!1,reason:\"Context must have a type property\"};if(e.id&&\"object\"!=typeof e.id)return{isValid:!1,reason:\"Context id must be an Object populated with key-value identifiers (if set)\"};if(e.id){const{id:t}=e,n=Object.keys(t);let i=!1;if(!n.length)return{isValid:!1,reason:\"Context id must have at least one key-value identifier\"};if(n.forEach((e=>{\"string\"==typeof e&&\"string\"==typeof t[e]||(i=!0)})),i)return{isValid:!1,reason:\"Context id key-value identifiers must be of type string\"}}return e.name&&\"string\"!=typeof e.name?{isValid:!1,reason:\"Context name must be of string type (if set)\"}:{isValid:!0}}static hasEndpointId(e){return void 0!==e.endpointId}static isContextTypeCompatible(e,t){return void 0===t||e===t}setContextGroupMap(){for(const e of this.getContextGroups())this.contextGroupsById.set(e.id,new Map)}async setCurrentContextGroupInClientOptions(e,t){try{const n=await this.fin.System.getEntityInfo(e.uuid,e.name);let i;\"view\"===n.entityType?i=await this.fin.View.wrap(e):\"window\"===n.entityType&&(i=await this.fin.Window.wrap(e)),i&&await i.updateOptions({interop:{currentContextGroup:t}})}catch(e){}}async setupChannelProvider(){try{const e=await this.getProvider();this.channel=e,this.wireChannel(e)}catch(e){throw new Error(`Error setting up Interop Broker Channel Provider: ${e}`)}}wireChannel(e){e.onConnection((async(e,t)=>{if(!await this.isConnectionAuthorized(e,t))throw new Error(`Connection not authorized for ${e.uuid}, ${e.name}`);if(!e.endpointId)throw new Error(\"Version too old to be compatible with Interop. Please upgrade your runtime to a more recent version.\");const n={contextGroupId:void 0,contextHandlers:new Map,clientIdentity:e};t?.currentContextGroup&&this.contextGroupsById.has(t.currentContextGroup)&&(n.contextGroupId=t?.currentContextGroup),this.interopClients.set(e.endpointId,n)})),e.onDisconnection((e=>{this.interopClients.delete(e.endpointId);const t=this.intentClientMap.get(e.name);t&&e.uuid===this.fin.me.uuid&&t.forEach((e=>{e.isReady=!1})),this.sessionContextGroupMap.forEach((t=>{t.onDisconnection(e)})),this.clientDisconnected(e)})),e.beforeAction((async(e,t,n)=>{if(!await this.isActionAuthorized(e,t,n))throw new Error(`Action (${e}) not authorized for ${n.uuid}, ${n.name}`);this.logging?.beforeAction?.enabled&&console.log(e,t,n)})),e.afterAction(((e,t,n)=>{this.logging?.afterAction?.enabled&&console.log(e,t,n)})),e.register(\"setContext\",this.setContext.bind(this)),e.register(\"fireIntent\",this.handleFiredIntent.bind(this)),e.register(\"getCurrentContext\",this.getCurrentContext.bind(this)),e.register(\"getInfoForIntent\",this.handleInfoForIntent.bind(this)),e.register(\"getInfoForIntentsByContext\",this.handleInfoForIntentsByContext.bind(this)),e.register(\"fireIntentForContext\",this.handleFiredIntentForContext.bind(this)),e.register(\"getContextGroups\",this.getContextGroups.bind(this)),e.register(\"joinContextGroup\",this.joinContextGroup.bind(this)),e.register(\"removeFromContextGroup\",this.removeFromContextGroup.bind(this)),e.register(\"getAllClientsInContextGroup\",this.getAllClientsInContextGroup.bind(this)),e.register(\"getInfoForContextGroup\",this.getInfoForContextGroup.bind(this)),e.register(\"contextHandlerRegistered\",this.contextHandlerRegistered.bind(this)),e.register(\"intentHandlerRegistered\",this.intentHandlerRegistered.bind(this)),e.register(\"removeContextHandler\",this.removeContextHandler.bind(this)),e.register(\"sessionContextGroup:createIfNeeded\",this.handleJoinSessionContextGroup.bind(this)),e.register(\"fdc3Open\",this.fdc3HandleOpen.bind(this)),e.register(\"fdc3v2FindIntentsByContext\",this.handleInfoForIntentsByContext.bind(this)),e.register(\"fdc3FindInstances\",this.fdc3HandleFindInstances.bind(this)),e.register(\"fdc3GetAppMetadata\",this.fdc3HandleGetAppMetadata.bind(this)),e.register(\"fdc3v2GetInfo\",(async(e,t)=>this.fdc3HandleGetInfo.bind(this)(e,t))),e.register(\"createPrivateChannelProvider\",(async e=>{const{channelId:t}=e,n=await this.fin.InterApplicationBus.Channel.create(t);p.PrivateChannelProvider.init(n,t)}))}isConnectionAuthorized(e,t){return this.wire.sendAction(\"interop-broker-is-connection-authorized\").catch((e=>{})),Promise.resolve(!0)}isActionAuthorized(e,t,n){return this.wire.sendAction(\"interop-broker-is-action-authorized\").catch((e=>{})),Promise.resolve(!0)}};return Gi.InteropBroker=f,e=new WeakMap,t=new WeakMap,n=new WeakMap,Gi}var zi,Ki={},qi={},Ji=s&&s.__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},Yi=s&&s.__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)};Object.defineProperty(qi,\"__esModule\",{value:!0});const Zi=d,Qi=Hi;class Xi extends Zi.Base{constructor(e,t,n){super(e),zi.set(this,void 0),this.id=n,Ji(this,zi,t,\"f\")}async setContext(e){this.wire.sendAction(\"interop-session-context-group-set-context\").catch((e=>{}));return(await Yi(this,zi,\"f\")).dispatch(`sessionContextGroup:setContext-${this.id}`,{sessionContextGroupId:this.id,context:e})}async getCurrentContext(e){this.wire.sendAction(\"interop-session-context-group-get-context\").catch((e=>{}));return(await Yi(this,zi,\"f\")).dispatch(`sessionContextGroup:getContext-${this.id}`,{sessionContextGroupId:this.id,type:e})}async addContextHandler(e,t){if(this.wire.sendAction(\"interop-session-context-group-add-handler\").catch((e=>{})),\"function\"!=typeof e)throw new Error(\"Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.\");const n=await Yi(this,zi,\"f\");let i;return i=t?`sessionContextHandler:invoke-${this.id}-${t}-${(0,Qi.generateId)()}`:`sessionContextHandler:invoke-${this.id}`,n.register(i,(0,Qi.wrapContextHandler)(e,i)),await n.dispatch(`sessionContextGroup:handlerAdded-${this.id}`,{handlerId:i,contextType:t}),{unsubscribe:await this.createUnsubscribeCb(i)}}async createUnsubscribeCb(e){const t=await Yi(this,zi,\"f\");return async()=>{t.remove(e),await t.dispatch(`sessionContextGroup:handlerRemoved-${this.id}`,{handlerId:e})}}getUserInstance(){return{id:this.id,setContext:(0,Qi.wrapInTryCatch)(this.setContext.bind(this),\"Failed to set context: \"),getCurrentContext:(0,Qi.wrapInTryCatch)(this.getCurrentContext.bind(this),\"Failed to get context: \"),addContextHandler:(0,Qi.wrapInTryCatch)(this.addContextHandler.bind(this),\"Failed to add context handler: \")}}}qi.default=Xi,zi=new WeakMap;var er={},tr={},nr={},ir={},rr=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),or=s&&s.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,\"default\",{enumerable:!0,value:t})}:function(e,t){e.default=t}),sr=s&&s.__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)&&rr(t,e,n);return or(t,e),t};Object.defineProperty(ir,\"__esModule\",{value:!0}),ir.PrivateChannelClient=void 0;const ar=sr(Hi);var cr,dr;function hr(){if(cr)return tr;cr=1;var e,t=s&&s.__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)},n=s&&s.__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},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(tr,\"__esModule\",{value:!0}),tr.FDC3ModuleBase=void 0;const o=nr,a=Hi,c=wr(),d=r(i);return tr.FDC3ModuleBase=class{get client(){return t(this,e,\"f\").call(this)}get fin(){return this.wire.getFin()}constructor(t,i){this.wire=i,e.set(this,void 0),n(this,e,t,\"f\")}async broadcast(e){return this.wire.sendAction(\"fdc3-broadcast\").catch((e=>{})),this.client.setContext(e)}async _open(e,t){this.wire.sendAction(\"fdc3-open\").catch((e=>{}));try{return await c.InteropClient.ferryFdc3Call(this.client,\"fdc3Open\",{app:e,context:t})}catch(e){const t=e.message===a.BROKER_ERRORS.fdc3Open?\"ResolverUnavailable\":e.message;throw new Error(t)}}async _getChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:\"system\",...(0,o.getUnsupportedChannelApis)()})))}async getOrCreateChannel(e){this.wire.sendAction(\"fdc3-get-or-create-channel\").catch((e=>{}));const t=(await this._getChannels()).find((t=>t.id===e));if(t)return{...t,type:\"system\",...(0,o.getUnsupportedChannelApis)()};try{const t=await this.client.joinSessionContextGroup(e);return(0,o.buildAppChannelObject)(t)}catch(e){throw console.error(e.message),new Error(o.ChannelError.CreationFailed)}}async getSystemChannels(){return this.wire.sendAction(\"fdc3-get-system-channels\").catch((e=>{})),this._getChannels()}async joinChannel(e){this.wire.sendAction(\"fdc3-join-channel\").catch((e=>{}));try{return await this.client.joinContextGroup(e)}catch(e){if(e.message===a.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup?console.error(\"The Channel you have tried to join is an App Channel. Custom Channels can only be defined by the Interop Broker through code or manifest configuration. Please use getOrCreateChannel.\"):console.error(e.message),e.message.startsWith(\"Attempting to join a context group that does not exist\"))throw new Error(o.ChannelError.NoChannelFound);throw new Error(o.ChannelError.AccessDenied)}}async getCurrentChannel(){this.wire.sendAction(\"fdc3-get-current-channel\").catch((e=>{}));const e=await this.getCurrentContextGroupInfo();return e?this.buildChannelObject(e):null}async leaveCurrentChannel(){return this.wire.sendAction(\"fdc3-leave-current-channel\").catch((e=>{})),this.client.removeFromContextGroup()}async getCurrentContextGroupInfo(){const e=await this.client.getContextGroups(),t=e.map((async e=>this.client.getAllClientsInContextGroup(e.id))),n=(await Promise.all(t)).findIndex((e=>e.some((e=>{const{uuid:t,name:n}=e;return this.wire.me.uuid===t&&this.wire.me.name===n}))));return e[n]}async buildChannelObject(e){return{...e,type:\"system\",addContextListener:(...[e,t])=>{let n,i;\"function\"==typeof e?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),n=e):(n=t,\"string\"==typeof e&&(i=e));const r=(async()=>{let e=!0;const t=await this.client.getCurrentContext(i);return this.client.addContextHandler(((i,r)=>{if(!e||(e=!1,!(0,d.default)(t,i)))return n(i,r)}),i)})();return{...r,unsubscribe:()=>r.then((e=>e.unsubscribe()))}},broadcast:this.broadcast.bind(this),getCurrentContext:async e=>{const t=await this.client.getCurrentContext(e);return void 0===t?null:t}}}},e=new WeakMap,tr}ir.PrivateChannelClient=class{constructor(e,t){this.id=t,this.client=e,this.listeners=new Map}async broadcast(e){return this.client.dispatch(\"broadcast\",{context:e})}async getCurrentContext(e){return this.client.dispatch(\"getCurrentContext\",{contextType:e})}async addContextListener(e,t){if(\"function\"!=typeof t)throw new Error(\"Non-function argument passed to the second parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.\");let n;n=e?`contextHandler:invoke-${this.id}-${e}-${ar.generateId()}`:`contextHandler:invoke-${this.id}-${ar.generateId()}`,this.client.register(n,ar.wrapContextHandler(t,n));const i={unsubscribe:await this.createContextUnsubscribeCb(n)};return this.listeners.set(n,i),await this.client.dispatch(\"contextHandlerAdded\",{handlerId:n,contextType:e}),i}createNonStandardUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch(\"nonStandardHandlerRemoved\",{handlerId:e})}}createContextUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch(\"contextHandlerRemoved\",{handlerId:e})}}onAddContextListener(e){const t=`onContextHandlerAdded:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch(\"onAddContextHandlerAdded\",{handlerId:t}),n}onDisconnect(e){const t=`onDisconnect:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch(\"onDisconnectHandlerAdded\",{handlerId:t}),n}onUnsubscribe(e){const t=`onUnsubscribe:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch(\"onUnsubscribeHandlerAdded\",{handlerId:t}),n}async cleanUpAllSubs(){Array.from(this.listeners.keys()).forEach((e=>{this.client.remove(e),this.listeners.delete(e)}))}async disconnect(){try{await this.client.dispatch(\"clientDisconnecting\"),await this.cleanUpAllSubs(),await this.client.disconnect()}catch(e){throw new Error(e.message)}}},function(e){var t=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,\"__esModule\",{value:!0}),e.getIntentResolution=e.isChannel=e.isContext=e.connectPrivateChannel=e.buildAppChannelObject=e.buildPrivateChannelObject=e.ChannelError=e.ResultError=e.UnsupportedChannelApiError=e.getUnsupportedChannelApis=void 0;const n=Hi,r=ir,o=t(i);e.getUnsupportedChannelApis=e=>({addContextListener:()=>{throw new a(\"Channel.addContextListener\",e)},broadcast:()=>{throw new a(\"Channel.broadcast\",e)},getCurrentContext:()=>{throw new a(\"Channel.getCurrentContext\",e)}});class a extends Error{constructor(e,t=\"System\"){super(e),this.message=`Calling ${e} on an instance of a ${t} Channel returned by fdc3.get${t}Channels is not supported. If you would like to use a ${t} Channel, please use fdc3.joinChannel, fdc3.addContextListener, and fdc3.broadcast instead.`}}var c,d;e.UnsupportedChannelApiError=a,function(e){e.NoResultReturned=\"NoResultReturned\",e.IntentHandlerRejected=\"IntentHandlerRejected\"}(c=e.ResultError||(e.ResultError={})),(d=e.ChannelError||(e.ChannelError={})).NoChannelFound=\"NoChannelFound\",d.AccessDenied=\"AccessDenied\",d.CreationFailed=\"CreationFailed\";e.buildPrivateChannelObject=e=>{let t=!1;const n=()=>{if(t)throw new Error(\"Private Channel Client has been disconnected from the Private Channel\")};return{id:e.id,type:\"private\",broadcast:async t=>(n(),e.broadcast(t)),getCurrentContext:async t=>(n(),e.getCurrentContext(t)),addContextListener:async(t,i)=>{n();let r=i,o=t;\"function\"==typeof t&&(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),r=t,o=null);return e.addContextListener(o,r)},onAddContextListener:t=>(n(),e.onAddContextListener(t)),disconnect:async()=>(n(),t=!0,e.disconnect()),onDisconnect:t=>(n(),e.onDisconnect(t)),onUnsubscribe:t=>(n(),e.onUnsubscribe(t))}};e.buildAppChannelObject=e=>({id:e.id,type:\"app\",broadcast:e.setContext,getCurrentContext:async t=>{const n=await e.getCurrentContext(t);return void 0===n?null:n},addContextListener:(t,n)=>{let i,r;\"function\"==typeof t?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),i=t):(i=n,\"string\"==typeof t&&(r=t));const s=(async()=>{let t=!0;const n=await e.getCurrentContext(r);return e.addContextHandler(((e,r)=>{if(!t||(t=!1,!(0,o.default)(n,e)))return i(e,r)}),r)})();return{...s,unsubscribe:()=>s.then((e=>e.unsubscribe()))}}});e.connectPrivateChannel=async t=>{try{const n=await fin.InterApplicationBus.Channel.connect(t),i=new r.PrivateChannelClient(n,t);return(0,e.buildPrivateChannelObject)(i)}catch(e){throw new Error(`Private Channel with id: ${t} doesn't exist`)}};e.isContext=e=>{if(e&&\"object\"==typeof e&&\"type\"in e){const{type:t}=e;return\"string\"==typeof t}return!1};e.isChannel=e=>{if(e&&\"object\"==typeof e&&\"type\"in e&&\"id\"in e){const{type:t,id:n}=e;return\"string\"==typeof t&&\"string\"==typeof n&&(\"app\"===t||\"private\"===t)}return!1};e.getIntentResolution=async(t,i,r,o)=>{const s=(0,n.generateId)(),a=new Promise(((e,t)=>{fin.InterApplicationBus.subscribe({uuid:\"*\"},s,(t=>{e(t)})).catch((()=>t(new Error(\"getResult is not supported in this environment\"))))})),d=r?{target:r,intentResolutionResultId:s}:{intentResolutionResultId:s},h=o?{name:o,context:i,metadata:d}:{...i,metadata:d},l=async()=>{let n=await a;if(!n||\"object\"!=typeof n)throw new Error(c.NoResultReturned);const{error:i}=n;if(i)throw new Error(c.IntentHandlerRejected);if((0,e.isChannel)(n)){const{id:i,type:r}=n;switch(r){case\"private\":n=await(0,e.connectPrivateChannel)(i);break;case\"app\":{const r=await t.joinSessionContextGroup(i);n=(0,e.buildAppChannelObject)(r);break}}}else if(!(0,e.isContext)(n))throw new Error(c.NoResultReturned);return n},u=o?await t.fireIntent(h):await t.fireIntentForContext(h);return\"object\"!=typeof u?{source:{appId:\"\",instanceId:\"\"},intent:\"\",version:\"2.0\",getResult:l}:{...u,getResult:l}}}(nr);var lr,ur,pr={};function wr(){if(ur)return Ki;ur=1;var e,t,n=s&&s.__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},i=s&&s.__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)},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ki,\"__esModule\",{value:!0}),Ki.InteropClient=void 0;const o=d,a=r(qi),c=function(){if(dr)return er;dr=1,Object.defineProperty(er,\"__esModule\",{value:!0}),er.Fdc3Module=void 0;const e=Hi,t=hr();class n extends t.FDC3ModuleBase{async open(e,t){await super._open(e,t)}addContextListener(e,t){let n;return this.wire.sendAction(\"fdc3-add-context-listener\").catch((e=>{})),\"function\"==typeof e?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),n=this.client.addContextHandler(e)):n=this.client.addContextHandler(t,null===e?void 0:e),{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}addIntentListener(e,t){this.wire.sendAction(\"fdc3-add-intent-listener\").catch((e=>{}));const n=this.client.registerIntentHandler((e=>{const{context:n,metadata:i}=e,{metadata:r}=n,o=i?.intentResolutionResultId||r?.intentResolutionResultId;o&&this.fin.InterApplicationBus.publish(o,null).catch((()=>null)),t(e.context)}),e,{fdc3Version:\"1.2\"});return{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}async raiseIntent(t,n,i){this.wire.sendAction(\"fdc3-raise-intent\").catch((e=>{}));const r=i?{name:t,context:n,metadata:{target:i}}:{name:t,context:n};try{return await this.client.fireIntent(r)}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntent?\"ResolverUnavailable\":t.message;throw new Error(n)}}async findIntent(t,n){this.wire.sendAction(\"fdc3-find-intent\").catch((e=>{}));try{return await this.client.getInfoForIntent({name:t,context:n})}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntent?\"ResolverUnavailable\":t.message;throw new Error(n)}}async findIntentsByContext(t){this.wire.sendAction(\"fdc3-find-intents-by-context\").catch((e=>{}));try{return await this.client.getInfoForIntentsByContext(t)}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntentsByContext?\"ResolverUnavailable\":t.message;throw new Error(n)}}async raiseIntentForContext(t,n){this.wire.sendAction(\"fdc3-raise-intent-for-context\").catch((e=>{}));try{return await this.client.fireIntentForContext({...t,metadata:{target:n}})}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntentForContext?\"ResolverUnavailable\":t.message;throw new Error(n)}}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}getInfo(){return this.wire.sendAction(\"fdc3-get-info\").catch((e=>{})),{providerVersion:this.wire.environment.getAdapterVersionSync(),provider:`openfin-${this.wire.me.uuid}`,fdc3Version:\"1.2\"}}}return er.Fdc3Module=n,er}(),h=function(){if(lr)return pr;lr=1,Object.defineProperty(pr,\"__esModule\",{value:!0}),pr.Fdc3Module2=void 0;const e=hr(),t=Hi,n=wr(),i=nr,r=ir;class o extends e.FDC3ModuleBase{async open(e,t){return\"string\"==typeof e&&console.warn(\"Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).\"),super._open(e,t)}async findInstances(e){this.wire.sendAction(\"fdc3-find-instances\").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,\"fdc3FindInstances\",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3FindInstances?\"ResolverUnavailable\":e.message;throw new Error(n)}}async getAppMetadata(e){this.wire.sendAction(\"fdc3-get-app-metadata\").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,\"fdc3GetAppMetadata\",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3GetAppMetadata?\"ResolverUnavailable\":e.message;throw new Error(n)}}async addContextListener(e,t){this.wire.sendAction(\"fdc3-add-context-listener\").catch((e=>{}));const n=e=>t=>{const{contextMetadata:n,...i}=t,r=n?[{...i},n]:[t,null];e(...r)};let i=t,r=n(i);return\"function\"==typeof e?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),i=e,r=n(i),this.client.addContextHandler(r)):this.client.addContextHandler(r,null===e?void 0:e)}async findIntent(e,n,i){this.wire.sendAction(\"fdc3-find-intent\").catch((e=>{}));try{return await this.client.getInfoForIntent({name:e,context:n,metadata:{resultType:i}})}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntent?\"ResolverUnavailable\":e.message;throw new Error(n)}}async findIntentsByContext(e,i){this.wire.sendAction(\"fdc3-find-intents-by-context\").catch((e=>{}));const r=i?{context:e,metadata:{resultType:i}}:e;try{return await n.InteropClient.ferryFdc3Call(this.client,\"fdc3v2FindIntentsByContext\",r)}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntentsByContext?\"ResolverUnavailable\":e.message;throw new Error(n)}}async raiseIntent(e,n,r){this.wire.sendAction(\"fdc3-raise-intent\").catch((e=>{}));try{return\"string\"==typeof r&&console.warn(\"Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).\"),(0,i.getIntentResolution)(this.client,n,r,e)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?\"ResolverUnavailable\":e.message;throw new Error(n)}}async raiseIntentForContext(e,n){this.wire.sendAction(\"fdc3-raise-intent-for-context\").catch((e=>{}));try{return\"string\"==typeof n&&console.warn(\"Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).\"),(0,i.getIntentResolution)(this.client,e,n)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?\"ResolverUnavailable\":e.message;throw new Error(n)}}async addIntentListener(e,t){if(this.wire.sendAction(\"fdc3-add-intent-listener\").catch((e=>{})),\"string\"!=typeof e)throw new Error(\"First argument must be an Intent name\");return this.client.registerIntentHandler((async e=>{let n,i;const{context:r,metadata:o}=e,{contextMetadata:s,metadata:a,...c}=r,d=o?.intentResolutionResultId||a?.intentResolutionResultId;try{const e=a?{metadata:a,...c}:{...c};n=await t(e,s),i=n}catch(e){n=e,i={error:!0}}if(d&&this.fin.InterApplicationBus.publish(d,i).catch((()=>null)),n instanceof Error)throw new Error(n.message);return n}),e,{fdc3Version:\"2.0\"})}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}async createPrivateChannel(){const e=(0,t.generateId)();await n.InteropClient.ferryFdc3Call(this.client,\"createPrivateChannelProvider\",{channelId:e});const o=await this.fin.InterApplicationBus.Channel.connect(e),s=new r.PrivateChannelClient(o,e);return(0,i.buildPrivateChannelObject)(s)}async getUserChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:\"user\",...(0,i.getUnsupportedChannelApis)(\"User\")})))}async getSystemChannels(){return console.warn(\"This API has been deprecated. Please use fdc3.getUserChannels instead.\"),super.getSystemChannels()}async joinUserChannel(e){return super.joinChannel(e)}async joinChannel(e){return console.warn(\"This API has been deprecated. Please use fdc3.joinUserChannel instead.\"),super.joinChannel(e)}async getCurrentChannel(){const e=await super.getCurrentChannel();return e?{...e,type:\"user\",broadcast:this.broadcast.bind(this)}:null}async getInfo(){return n.InteropClient.ferryFdc3Call(this.client,\"fdc3v2GetInfo\",{fdc3Version:\"2.0\"})}}return pr.Fdc3Module2=o,pr}(),l=Hi;let u=class extends o.Base{constructor(i,r){super(i),e.set(this,void 0),t.set(this,void 0),n(this,t,new Map,\"f\"),n(this,e,r,\"f\")}async setContext(t){this.wire.sendAction(\"interop-client-set-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"setContext\",{context:t})}async addContextHandler(t,n){if(this.wire.sendAction(\"interop-client-add-context-handler\").catch((e=>{})),\"function\"!=typeof t)throw new Error(\"Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.\");const r=await i(this,e,\"f\");let o;o=n?`invokeContextHandler-${n}-${(0,l.generateId)()}`:\"invokeContextHandler\";const s=(0,l.wrapContextHandler)(t,o);return r.register(o,s),await r.dispatch(\"contextHandlerRegistered\",{handlerId:o,contextType:n}),{unsubscribe:async()=>{r.remove(o),await r.dispatch(\"removeContextHandler\",{handlerId:o})}}}async getContextGroups(){this.wire.sendAction(\"interop-client-get-context-groups\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getContextGroups\")}async joinContextGroup(t,n){this.wire.sendAction(\"interop-client-join-context-group\").catch((e=>{}));const r=await i(this,e,\"f\");if(!t)throw new Error(\"No contextGroupId specified for joinContextGroup.\");return r.dispatch(\"joinContextGroup\",{contextGroupId:t,target:n})}async removeFromContextGroup(t){this.wire.sendAction(\"interop-client-remove-from-context-group\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"removeFromContextGroup\",{target:t})}async getAllClientsInContextGroup(t){this.wire.sendAction(\"interop-client-get-all-clients-in-context-group\").catch((e=>{}));const n=await i(this,e,\"f\");if(!t)throw new Error(\"No contextGroupId specified for getAllClientsInContextGroup.\");return n.dispatch(\"getAllClientsInContextGroup\",{contextGroupId:t})}async getInfoForContextGroup(t){this.wire.sendAction(\"interop-client-get-info-for-context-group\").catch((e=>{}));const n=await i(this,e,\"f\");if(!t)throw new Error(\"No contextGroupId specified for getInfoForContextGroup.\");return n.dispatch(\"getInfoForContextGroup\",{contextGroupId:t})}async fireIntent(t){this.wire.sendAction(\"interop-client-fire-intent\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"fireIntent\",t)}async registerIntentHandler(t,n,r){this.wire.sendAction(\"interop-client-register-intent-handler\").catch((e=>{}));const o=await i(this,e,\"f\"),s=`intent-handler-${n}`,a=(0,l.wrapIntentHandler)(t,s);try{await o.register(s,a),await o.dispatch(\"intentHandlerRegistered\",{handlerId:s,...r})}catch(e){throw new Error(\"Unable to register intent handler\")}return{unsubscribe:async()=>{o.remove(s)}}}async getCurrentContext(t){this.wire.sendAction(\"interop-client-get-current-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getCurrentContext\",{contextType:t})}async getInfoForIntent(t){this.wire.sendAction(\"interop-client-get-info-for-intent\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getInfoForIntent\",t)}async getInfoForIntentsByContext(t){this.wire.sendAction(\"interop-client-get-info-for-intents-by-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getInfoForIntentsByContext\",t)}async fireIntentForContext(t){this.wire.sendAction(\"interop-client-fire-intent-for-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"fireIntentForContext\",t)}async joinSessionContextGroup(n){try{const r=i(this,t,\"f\").get(n);if(r)return r.getUserInstance();const o=await i(this,e,\"f\"),{hasConflict:s}=await o.dispatch(\"sessionContextGroup:createIfNeeded\",{sessionContextGroupId:n});s&&console.warn(`A (non-session) context group with the name \"${n}\" already exists. If you are trying to join a Context Group, call joinContextGroup instead.`);const c=new a.default(this.wire,i(this,e,\"f\"),n);return i(this,t,\"f\").set(n,c),c.getUserInstance()}catch(e){throw console.error(`Error thrown trying to create Session Context Group with id \"${n}\": ${e}`),e}}async onDisconnection(t){this.wire.sendAction(\"interop-client-add-ondisconnection-listener\").catch((e=>{}));return(await i(this,e,\"f\")).onDisconnection((e=>{const{uuid:n}=e;t({type:\"interop-broker\",topic:\"disconnected\",brokerName:n})}))}getFDC3Sync(e){switch(e){case\"1.2\":return new c.Fdc3Module((()=>this),this.wire);case\"2.0\":return new h.Fdc3Module2((()=>this),this.wire);default:throw new Error(`Invalid FDC3 version provided: ${e}. Must be '1.2' or '2.0'`)}}async getFDC3(e){return this.getFDC3Sync(e)}static async ferryFdc3Call(t,n,r){return(await i(t,e,\"f\")).dispatch(n,r||null)}};return Ki.InteropClient=u,e=new WeakMap,t=new WeakMap,Ki}var yr,fr,gr,mr={};function vr(){if(yr)return mr;yr=1,Object.defineProperty(mr,\"__esModule\",{value:!0}),mr.overrideCheck=mr.checkFDC32Overrides=mr.getDefaultViewFdc3VersionFromAppInfo=void 0;const e=Vi();function t(t){return[\"fdc3HandleFindInstances\",\"handleInfoForIntent\",\"handleInfoForIntentsByContext\",\"fdc3HandleGetAppMetadata\",\"fdc3HandleGetInfo\",\"fdc3HandleOpen\",\"handleFiredIntent\",\"handleFiredIntentForContext\"].filter((n=>t[n]===e.InteropBroker.prototype[n]))}return mr.getDefaultViewFdc3VersionFromAppInfo=function({manifest:e,initialOptions:t}){const n=e?.platform?.defaultViewOptions?.fdc3InteropApi??t.defaultViewOptions?.fdc3InteropApi;return[\"1.2\",\"2.0\"].includes(n??\"\")?n:void 0},mr.checkFDC32Overrides=t,mr.overrideCheck=function(e,n){if(n&&\"2.0\"===n){const n=t(e);n.length>0&&console.warn(`WARNING: FDC3 2.0 has been set as a default option for Views in this Platform, but the required InteropBroker APIs for FDC3 2.0 compliance have not all been overridden.\\nThe following APIs need to be overridden:\\n${n.join(\"\\n\")}`)}},mr}function Cr(){return gr||(gr=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),i=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),i(function(){if(fr)return Ti;fr=1;var e=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ti,\"__esModule\",{value:!0}),Ti.InteropModule=void 0;const t=e(n),i=$i,r=d,o=Vi(),a=wr(),c=vr(),h=Tn,l=e=>new e,u=\"You have attempted to use or modify InteropBroker parameters, which is not allowed. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.\";class p extends r.Base{async init(e,n=l){this.wire.sendAction(\"interop-init\").catch((()=>{}));const r=await this.wire.environment.getInteropInfo(this.wire.getFin()),s=(0,i.createUnusableObject)(u),a=(0,i.createWarningObject)(u,(0,t.default)(r)),d=async()=>{throw new Error(u)},p=o.InteropBroker.createClosedConstructor(this.wire,(()=>this.fin.InterApplicationBus.Channel.create(`interop-broker-${e}`)),r);let w;return w=Array.isArray(n)?new((0,h.overrideFromComposables)(...n)(p))(s,d,a):await n(p,s,d,a),(0,c.overrideCheck)(w,r.fdc3Version),w}connectSync(e,t){return this.wire.sendAction(\"interop-connect-sync\").catch((()=>{})),new a.InteropClient(this.wire,this.wire.environment.whenReady().then((()=>this.fin.InterApplicationBus.Channel.connect(`interop-broker-${e}`,{payload:t}))))}}return Ti.InteropModule=p,Ti}(),e),i(wr(),e),i(Vi(),e)}(Li)),Li}var br={},Ir={},Er={},xr={};Object.defineProperty(xr,\"__esModule\",{value:!0}),xr.getSnapshotSourceChannelName=void 0;xr.getSnapshotSourceChannelName=e=>`snapshot-source-provider-${e.uuid}`;var Ar,Pr,Mr,_r,Or,Sr=s&&s.__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},Rr=s&&s.__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)};Object.defineProperty(Er,\"__esModule\",{value:!0}),Er.SnapshotSource=void 0;const Fr=d,jr=xr,kr=new Map;class Lr extends Fr.Base{constructor(e,t){super(e),Ar.set(this,void 0),Pr.set(this,(()=>(kr.has(this.identity.uuid)||kr.set(this.identity.uuid,{eventFired:null,clientPromise:null}),kr.get(this.identity.uuid)))),Mr.set(this,(()=>(Rr(this,Pr,\"f\").call(this).clientPromise||(Rr(this,Pr,\"f\").call(this).clientPromise=Rr(this,_r,\"f\").call(this)),Rr(this,Pr,\"f\").call(this).clientPromise))),_r.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);try{Rr(this,Pr,\"f\").call(this).eventFired||await Rr(this,Or,\"f\").call(this);const t=await this.fin.InterApplicationBus.Channel.connect(e,{wait:!1});return t.onDisconnection((()=>{Rr(this,Pr,\"f\").call(this).clientPromise=null,Rr(this,Pr,\"f\").call(this).eventFired=null})),t}catch(e){throw Rr(this,Pr,\"f\").call(this).clientPromise=null,new Error(\"The targeted SnapshotSource is not currently initialized. Await this object's ready() method.\")}})),Or.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);let t,n;const i=new Promise(((e,i)=>{t=e,n=i}));Rr(this,Pr,\"f\").call(this).eventFired=i;const r=async i=>{try{i.channelName===e&&(t(),await this.fin.InterApplicationBus.Channel.removeListener(\"connected\",r))}catch(e){n(e)}};await this.fin.InterApplicationBus.Channel.on(\"connected\",r)})),Sr(this,Ar,t,\"f\")}get identity(){return Rr(this,Ar,\"f\")}async ready(){this.wire.sendAction(\"snapshot-source-ready\").catch((e=>{}));try{await Rr(this,Mr,\"f\").call(this)}catch(e){await Rr(this,Pr,\"f\").call(this).eventFired}}async getSnapshot(){this.wire.sendAction(\"snapshot-source-get-snapshot\").catch((e=>{}));const e=await Rr(this,Mr,\"f\").call(this),t=await e.dispatch(\"get-snapshot\");return(await t).snapshot}async applySnapshot(e){this.wire.sendAction(\"snapshot-source-apply-snapshot\").catch((e=>{}));return(await Rr(this,Mr,\"f\").call(this)).dispatch(\"apply-snapshot\",{snapshot:e})}}Er.SnapshotSource=Lr,Ar=new WeakMap,Pr=new WeakMap,Mr=new WeakMap,_r=new WeakMap,Or=new WeakMap,Object.defineProperty(Ir,\"__esModule\",{value:!0}),Ir.SnapshotSourceModule=void 0;const Tr=d,$r=Er,Br=xr;class Gr extends Tr.Base{async init(e){if(this.wire.sendAction(\"snapshot-source-init\").catch((e=>{})),\"object\"!=typeof e||\"function\"!=typeof e.getSnapshot||\"function\"!=typeof e.applySnapshot)throw new Error(\"you must pass in a valid SnapshotProvider\");const t=await this.fin.InterApplicationBus.Channel.create((0,Br.getSnapshotSourceChannelName)(this.fin.me));t.register(\"get-snapshot\",(async()=>({snapshot:await e.getSnapshot()}))),t.register(\"apply-snapshot\",(({snapshot:t})=>e.applySnapshot(t)))}wrapSync(e){return this.wire.sendAction(\"snapshot-source-wrap-sync\").catch((e=>{})),new $r.SnapshotSource(this.wire,e)}async wrap(e){return this.wire.sendAction(\"snapshot-source-wrap\").catch((e=>{})),this.wrapSync(e)}}Ir.SnapshotSourceModule=Gr,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Ir,e),n(Er,e)}(br),Object.defineProperty(a,\"__esModule\",{value:!0});var Wr=a.Fin=void 0;const Hr=t,Nr=c,Dr=ie(),Ur=Z(),Vr=de,zr=en,Kr=rn,qr=un,Jr=bn,Yr=J(),Zr=An,Qr=ki,Xr=Cr(),eo=br;class to extends Hr.EventEmitter{constructor(e){super(),this.wire=e,this.System=new Nr.System(e),this.Window=new Dr._WindowModule(e),this.Application=new Ur.ApplicationModule(e),this.InterApplicationBus=new Vr.InterApplicationBus(e),this.Clipboard=new zr.Clipboard(e),this.ExternalApplication=new Kr.ExternalApplicationModule(e),this.Frame=new qr._FrameModule(e),this.GlobalHotkey=new Jr.GlobalHotkey(e),this.Platform=new Zr.PlatformModule(e,this.InterApplicationBus.Channel),this.View=new Yr.ViewModule(e),this.Interop=new Xr.InteropModule(e),this.SnapshotSource=new eo.SnapshotSourceModule(e),e.registerFin(this),this.me=(0,Qr.getMe)(e),e.on(\"disconnected\",(()=>{this.emit(\"disconnected\")}))}}Wr=a.Fin=to;var no={},io={};function ro(e){return\"string\"==typeof e.manifestUrl}function oo(e){return ao(e)&&\"string\"==typeof e.address}function so(e){return oo(e)&&\"string\"==typeof e.token}function ao(e){return\"string\"==typeof e.uuid}function co(e){return e.runtime&&\"string\"==typeof e.runtime.version}function ho(e){return ao(e)&&co(e)}Object.defineProperty(io,\"__esModule\",{value:!0}),io.isInternalConnectConfig=io.isPortDiscoveryConfig=io.isNewConnectConfig=io.isConfigWithReceiver=io.isRemoteConfig=io.isExistingConnectConfig=io.isExternalConfig=void 0,io.isExternalConfig=ro,io.isExistingConnectConfig=oo,io.isRemoteConfig=so,io.isConfigWithReceiver=function(e){return\"object\"==typeof e.receiver&&so({...e,address:\"\"})},io.isNewConnectConfig=ho,io.isPortDiscoveryConfig=function(e){return ro(e)&&co(e)||ho(e)},io.isInternalConnectConfig=function(e){return oo(e)||ho(e)};var lo={},uo={};Object.defineProperty(uo,\"__esModule\",{value:!0}),uo.EmitterMap=void 0;const po=t;function wo(e){return Buffer.from(e).toString(\"base64\")}uo.EmitterMap=class{constructor(){this.storage=new Map}hashKeys(e){return e.map(wo).join(\"/\")}getOrCreate(e){const t=this.hashKeys(e);return this.storage.has(t)||this.storage.set(t,new po.EventEmitter),this.storage.get(t)}has(e){return this.storage.has(this.hashKeys(e))}delete(e){const t=this.hashKeys(e);return this.storage.delete(t)}},Object.defineProperty(lo,\"__esModule\",{value:!0});const yo=uo;class fo extends yo.EmitterMap{constructor(){super(...arguments),this.dispatchEvent=e=>{if(function(e){return\"process-desktop-event\"===e.action}(e)){const{payload:t}=e,n=function(e){const{topic:t}=e;if(\"frame\"===t||\"window\"===t||\"view\"===t){const{uuid:n,name:i}=e;return[t,n,i]}if(\"application\"===t){const{uuid:n}=e;return[t,n]}return[t]}(t);if(this.has(n))return this.getOrCreate(n).emit(t.type,t),!0}return!1}}}lo.default=fo;var go,mo,vo=s&&s.__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},Co=s&&s.__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)},bo=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(no,\"__esModule\",{value:!0});var Io=no.Transport=void 0;const Eo=t,xo=io,Ao=g,Po=bo(lo),Mo=ki,_o=ke;class Oo extends Eo.EventEmitter{constructor(e,t,n){super(),this.wireListeners=new Map,this.topicRefMap=new Map,this.eventAggregator=new Po.default,this.messageHandlers=[this.eventAggregator.dispatchEvent],go.set(this,void 0),mo.set(this,void 0),this.connectSync=()=>{Co(this,go,\"f\").connectSync()},this.getPort=()=>Co(this,go,\"f\").getPort(),vo(this,go,new e(this.onmessage.bind(this)),\"f\"),this.environment=t,this.sendRaw=Co(this,go,\"f\").send.bind(Co(this,go,\"f\")),this.registerMessageHandler(this.handleMessage.bind(this)),Co(this,go,\"f\").on(\"disconnected\",(()=>{for(const[,{handleNack:e}]of this.wireListeners)e({reason:\"Remote connection has closed\"});this.wireListeners.clear(),this.emit(\"disconnected\")}));const{uuid:i,name:r}=n,o=this.environment.getCurrentEntityType();this.me=(0,Mo.getBaseMe)(o,i,r)}getFin(){if(!Co(this,mo,\"f\"))throw new Error(\"No Fin object registered for this transport\");return Co(this,mo,\"f\")}registerFin(e){if(Co(this,mo,\"f\"))throw new Error(\"Fin object has already been registered for this transport\");vo(this,mo,e,\"f\")}shutdown(){return Co(this,go,\"f\").shutdown()}async connect(e){if((0,xo.isConfigWithReceiver)(e))return await Co(this,go,\"f\").connect(e.receiver),this.authorize(e);if((0,xo.isRemoteConfig)(e))return this.connectRemote(e);if((0,xo.isExistingConnectConfig)(e))return this.connectByPort(e);if((0,xo.isNewConnectConfig)(e)){const t=await this.environment.retrievePort(e);return this.connectByPort({...e,address:`ws://localhost:${t}`})}}async connectRemote(e){return await Co(this,go,\"f\").connect(new(this.environment.getWsConstructor())(e.address)),this.authorize(e)}async connectByPort(e){const{address:t,uuid:n}=e,i={...e,type:\"file-token\"},r=Co(this,go,\"f\");await r.connect(new(this.environment.getWsConstructor())(e.address));const o=await this.sendAction(\"request-external-authorization\",{uuid:n,type:\"file-token\"},!0);if(\"external-authorization-response\"!==o.action)throw new Ao.UnexpectedActionError(o.action);return await this.environment.writeToken(o.payload.file,o.payload.token),this.authorize(i)}async authorize(e){const t=await this.sendAction(\"request-authorization\",e,!0);if(\"authorization-response\"!==t.action)throw new Ao.UnexpectedActionError(t.action);if(!0!==t.payload.success)throw new Ao.RuntimeError(t.payload)}sendAction(e,t={},n=!1){let i=()=>{};const r=Ao.RuntimeError.getCallSite(1),o=this.environment.getNextMessageId(),s=new Promise(((s,a)=>{i=a;const c={action:e,payload:t,messageId:o},d=Co(this,go,\"f\");return this.addWireListener(o,s,(e=>this.nackHandler(e,a,r)),n),d.send(c).catch(a)}));return Object.assign(s,{cancel:i,messageId:o})}nackHandler(e,t,n){t(\"string\"==typeof e?e:new Ao.RuntimeError(e,n))}ferryAction(e){return new Promise(((t,n)=>{const i=this.environment.getNextMessageId();e.messageId=i;const r=e=>{t(e.payload)};return Co(this,go,\"f\").send(e).then((()=>this.addWireListener(i,r,(e=>this.nackHandler(e,n)),!1))).catch(n)}))}registerMessageHandler(e){this.messageHandlers.push(e)}addWireListener(e,t,n,i){i?this.uncorrelatedListener=t:this.wireListeners.has(e)?n({reason:\"Duplicate handler id\",error:(0,_o.errorToPOJO)(new Ao.DuplicateCorrelationError(String(e)))}):this.wireListeners.set(e,{resolve:t,handleNack:n})}onmessage(e){for(const t of this.messageHandlers)t.call(null,e)}handleMessage(e){const t=e.correlationId||NaN;if(\"correlationId\"in e){if(!this.wireListeners.has(t))return!1;{const{resolve:n,handleNack:i}=this.wireListeners.get(t);\"ack\"!==e.action?i({reason:\"Did not receive ack action\",error:(0,_o.errorToPOJO)(new Ao.NoAckError(e.action))}):\"payload\"in e?e.payload.success?n.call(null,e):i(e.payload):\"string\"==typeof e.reason?i(e):(console.warn(\"Received invalid response from core\",e),i({reason:\"invalid response shape\"})),this.wireListeners.delete(t)}}else this.uncorrelatedListener&&this.uncorrelatedListener.call(null,e),this.uncorrelatedListener=()=>{};return!0}}Io=no.Transport=Oo,go=new WeakMap,mo=new WeakMap;const So=(...e)=>({log:(...t)=>console.debug(`[${(new Date).toISOString()}]`,...(e=>e.map((e=>`[${e}]`)))(e),...t),getLogger:(...t)=>So(...e,...t)}),Ro=So(\"@openfin/core-web/client\");function Fo(e,t){if(!function(e){return\"string\"==typeof e}(e))throw new Error(`Property ${t} has invalid type. Expected string, got ${typeof e}.`)}const jo=\"web-broker-ports-ready\",ko=Ro.getLogger(\"get-web-interop-ports\");function Lo(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)}function To(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}\"function\"==typeof SuppressedError&&SuppressedError;const $o=e=>{var n,i,r;return r=class extends t.EventEmitter{constructor(t){super(),n.set(this,void 0),i.set(this,!1),this.connectSync=()=>{Lo(this,i,\"f\")||(e.addEventListener(\"message\",(e=>{e.data?.topic?.startsWith(\"wire-message\")&&e.data.message&&Lo(this,n,\"f\").call(this,{...JSON.parse(e.data.message),ports:e.ports})})),e.start())},this.connect=async()=>{this.connectSync()},this.send=t=>(e.postMessage({topic:\"wire-message\",message:JSON.stringify(t)}),Promise.resolve()),this.shutdown=async()=>{e.close()},To(this,n,t,\"f\")}getPort(){return e}},n=new WeakMap,i=new WeakMap,r};var Bo={},Go={};Object.defineProperty(Go,\"__esModule\",{value:!0}),Go.BaseEnvironment=void 0;const Wo=vr();Go.BaseEnvironment=class{async getViewWindowIdentity(e,t){const{identity:n}=await e.View.wrapSync(t).getCurrentWindow();return n}async getInteropInfo(e){const t=await e.Application.getCurrentSync().getInfo().catch((()=>null)),n=t?.initialOptions?.interopBrokerConfiguration??{};return{fdc3Version:t?(0,Wo.getDefaultViewFdc3VersionFromAppInfo)(t):void 0,...n,fdc3Info:{providerVersion:await e.System.getVersion(),provider:\"OpenFin\"}}}},Object.defineProperty(Bo,\"__esModule\",{value:!0});var Ho=Bo.BrowserEnvironment=void 0;const No=Go;class Do extends No.BaseEnvironment{constructor(){super(...arguments),this.type=\"other\",this.getRandomId=()=>{const e=new Uint32Array(1);return window.crypto.getRandomValues(e)[0].toString(32)}}getAdapterVersionSync(){return\"\"}observeBounds(e,t){throw new Error(\"Method not implemented.\")}layoutAllowedInContext(e){return!1}initLayoutManager(e,t,n){throw new Error(\"Method not implemented.\")}applyLayoutSnapshot(e,t,n){throw new Error(\"Method not implemented.\")}createLayout(e,t){throw new Error(\"Method not implemented.\")}destroyLayout(e,t){throw new Error(\"Method not implemented.\")}resolveLayout(e,t){throw new Error(\"Method not implemented.\")}initPlatform(...e){throw new Error(\"Method not implemented.\")}writeToken(e,t){return Promise.resolve(\"\")}retrievePort(e){throw new Error(\"Method not implemented.\")}getNextMessageId(){return this.getRandomId()}createChildContent(e){throw new Error(\"Method not implemented.\")}getWebWindow(e){throw new Error(\"Method not implemented.\")}getCurrentEntityIdentity(){throw new Error(\"Method not implemented.\")}getCurrentEntityType(){return\"external connection\"}raiseEvent(e,t){throw new Error(\"Method not implemented.\")}getUrl(){return location.href}getDefaultChannelOptions(){return{create:{},connect:{}}}getRtcPeer(){return new RTCPeerConnection}getWsConstructor(){return WebSocket}whenReady(){return Promise.resolve()}}Ho=Bo.BrowserEnvironment=Do;const Uo=e=>\"platform\"in e&&void 0!==e.platform;var Vo,zo;class Ko extends Ho{constructor(e){super(),this.connectConfig=e,Vo.set(this,void 0),zo.set(this,new W((async()=>Promise.resolve().then((function(){return require(\"./main-b14f67c9.js\")}))))),Uo(e)&&this.validatePlatformOptions(e)}getAdapterVersionSync(){return\"0.39.21\"}validatePlatformOptions({platform:e}){if(!(\"layoutSnapshot\"in e))throw new Error(\"Platform options are missing layoutSnapshot. Please provide a layoutSnapshot in the platform options.\");if(\"windows\"in e||\"windows\"in e.layoutSnapshot)throw new Error(\"It appears you tried to call connect() with a snapshot object from an OpenFin desktop environment. Note that connect() expects to be called with a platform property with this structure: { platform: { layoutSnapshot } }. To get a layoutSnapshot of the expected structure, use fin.Platform.Layout.getCurrentLayoutManagerSync().getLayoutSnapshot() in v34+ in your desktop environment.\");const{layouts:t}=e.layoutSnapshot;Object.entries(t).map((([e,t])=>{if(\"object\"!=typeof t||null===t)throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must be an object.`);if(!(\"content\"in t))throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must contain a 'content' property.`)}))}async getInteropInfo(e){return{...{contextGroups:void 0,logging:{beforeAction:{enabled:!1},afterAction:{enabled:!1}}},fdc3Version:void 0,fdc3Info:{providerVersion:\"0.39.21\",provider:\"OpenFin Web\"}}}layoutAllowedInContext(e){return!0}async initLayoutManager(e,t,n){if(Lo(this,Vo,\"f\"))throw new Error(\"Layout already initialized.\");if(!Uo(this.connectConfig))throw new Error(\"Platform options are missing from connection config.\");const{WebLayoutEntryPoint:i}=await Lo(this,zo,\"f\").getValue();return To(this,Vo,new i(this.connectConfig),\"f\"),await Lo(this,Vo,\"f\").initLayoutManager(e,t,n)}async applyLayoutSnapshot(e,t,n){Lo(this,Vo,\"f\")?.applyLayoutSnapshot(e,t,n)}async createLayout(e,t){return Lo(this,Vo,\"f\")?.createLayout(e,t)}async destroyLayout(e,t){return Lo(this,Vo,\"f\")?.destroyLayout(e,t)}async getViewWindowIdentity(e,t){return Promise.resolve({uuid:t.uuid,name:t.uuid})}}Vo=new WeakMap,zo=new WeakMap;const qo=()=>{const e=((e,t)=>{const n=new RegExp(`^${t}<(?.*)>$`).exec(e)?.groups?.meta;if(n)try{return JSON.parse(atob(n))}catch(e){throw new Error(`Failed to decode JSON from ${n}.`)}})(window.name,\"of-frame\");if(e)try{const{name:t,uuid:n,brokerUrl:i,providerId:r,contextGroup:o}=e;return Fo(i,\"brokerUrl\"),Fo(n,\"uuid\"),Fo(t,\"name\"),{identity:{name:t,uuid:n},brokerUrl:i,interopConfig:{providerId:r,currentContextGroup:o}}}catch(e){throw new Error(`Unexpected error occurred when inferring platform information: ${e.stack}`)}},Jo=()=>{const e=r.v4();return{uuid:e,name:e}},Yo=async e=>{if(\"enabled\"===e.connectionInheritance){const t=await(async e=>{const t=qo();if(t){const{validateOptions:n=(()=>!0)}=e,{identity:i,...r}=t;if(!await n(r))throw new Error(\"Parent options were rejected by validateOptions.\");return t}})(e);if(t)return t}if(!e.options){const t=\"enabled\"===e.connectionInheritance?\"Broker URL was not specified nor provided by a platform container.\":\"Connection inheritance is disabled but no options were provided.\";throw new Error(t)}return{...e.options,identity:Jo()}};exports.__classPrivateFieldGet=Lo,exports.__classPrivateFieldSet=To,exports.apiExposer=Gn,exports.commonjsGlobal=s,exports.connect=async t=>{try{Ro.log(\"Establishing connection\",t);const{brokerUrl:n,identity:i,timeout:r,interopConfig:s}=await Yo(t),{workerPort:a,iframeBrokerPort:c}=await(async(e,t,n)=>{const{origin:i}=new URL(e),r=document.createElement(\"IFRAME\");let s;r.style.display=\"none\";try{return await new Promise(((a,c)=>{const d=e=>{if(e.source===r.contentWindow&&e.data?.topic===`ack-${jo}`){if(e.origin!==i)c(new Error(`Broker redirected to unexpected origin ${e.origin}, expected ${i}.`));else if(e.data.success){const[t,n]=e.ports;a({iframeBrokerPort:t,workerPort:n})}else c(new m(e.data));window.removeEventListener(\"message\",d),clearTimeout(s)}};window.addEventListener(\"message\",d),ko.log(`Connecting to broker ${e}`),r.setAttribute(\"src\",e),r.setAttribute(\"name\",o(t,\"of-broker\")),document.body.appendChild(r),ko.log(\"Iframe loaded, awaiting init message from iframe\"),n&&(s=setTimeout((()=>{window.removeEventListener(\"message\",d),document.body.removeChild(r),c(new Error(\"Worker did not initialize in time\"))}),n))}))}catch(e){throw new Error(`Failed to initialise Fin Web Client. ${e.message}`,{cause:e})}})(n,i,r);Ro.log(\"Successfully established connection to shared worker\");const d={entityType:\"external connection\",...i};a.start(),c.start();const h=((t,n,i)=>{const r=$o(n),o=new Ko(t),s=new Io(r,o,i);return s.connectSync(),window.Buffer=e.Buffer,new Wr(s)})(t,a,d);return s?.providerId&&(h.me.interop=h.Interop.connectSync(s.providerId),s?.currentContextGroup&&h.me.interop.joinContextGroup(s.currentContextGroup).catch((e=>{console.warn(`Error joining specified context group: ${s?.currentContextGroup}, continuing`,e)}))),{...h,me:{...h.me,identity:{uuid:h.me.uuid,name:h.me.name}}}}catch(e){throw new Error(`An error occured during web-interop connection: ${e.message}`)}},exports.decorators=Nn,exports.encodeOptions=o,exports.layout_constants=ai,exports.lazy=G;\n","\"use strict\";var t=require(\"./main-8cad4070.js\"),e=require(\"uuid\");require(\"buffer/\"),require(\"events\"),require(\"lodash/cloneDeep\"),require(\"lodash/isEqual\");var i={},n={};Object.defineProperty(n,\"__esModule\",{value:!0}),n.mapValuesAsync=n.mapEntriesAsync=void 0;const o=(t,[e,i])=>({...t,[e]:i});async function s(t,e){return(await Promise.all(e.map((async([e,i])=>[e,await t(i,e)])))).reduce(o,{})}n.mapEntriesAsync=s,n.mapValuesAsync=async function(t,e){let i;return i=e instanceof Map?[...e.entries()]:Object.entries(e),s(t,i)};var r,a,l,h,d=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldSet||function(t,e,i,n,o){if(\"m\"===n)throw new TypeError(\"Private method is not writable\");if(\"a\"===n&&!o)throw new TypeError(\"Private accessor was defined without a setter\");if(\"function\"==typeof e?t!==e||!o:!e.has(t))throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");return\"a\"===n?o.call(t,i):o?o.value=i:e.set(t,i),i},c=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldGet||function(t,e,i,n){if(\"a\"===i&&!n)throw new TypeError(\"Private accessor was defined without a getter\");if(\"function\"==typeof e?t!==e||!n:!e.has(t))throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");return\"m\"===i?n:\"a\"===i?n.call(t):n?n.value:e.get(t)};Object.defineProperty(i,\"__esModule\",{value:!0});var m=i.DefaultLayoutManager=void 0;const u=n;class p{constructor(t){a.set(this,void 0),l.set(this,new Map),d(this,a,t,\"f\")}size(){return c(this,l,\"f\").size}async applyLayoutSnapshot({layouts:t}){if(Object.keys(t).length>1)throw new Error(\"[LayoutManager] Tried to call applyLayoutSnapshot with more than 1 layout. When implementing multiple layouts via overridden LayoutManager class, you must override and fully implement the applyLayoutSnapshot method without calling super.applyLayoutSnapshot().\");const[[e,i]]=Object.entries(t);await p.createLayout(this,{layoutName:e,layout:i})}async showLayout({layoutName:t}){}async getLayoutSnapshot(){return{layouts:await(0,u.mapValuesAsync)((t=>t.getFrameSnapshot()),c(this,l,\"f\"))}}async removeLayout({layoutName:t}){}getLayoutIdentityForView(t){const e=[...c(this,l,\"f\").values()].find((e=>e.getCurrentViews().some((e=>e.name===t.name&&e.uuid===t.uuid))));return e?.identity??void 0}isLayoutVisible({layoutName:t}){return c(p,r,\"m\",h).call(p,this,t).isVisible()}resolveLayoutIdentity(t){if(t&&\"layoutName\"in t)return t;const e=[...c(this,l,\"f\").values()];if(1===e.length)return e[0].identity;const i=e.find((t=>t.isVisible()));return i?.identity??void 0}static async resolveLayout(t,e){const i=t.resolveLayoutIdentity(e);if(void 0===i||!(\"layoutName\"in i))throw new Error(\"[layout-manager] resolveLayout: Could not resolve the layout identity. Make sure you include 'layoutName' in the identity object.\");return c(p,r,\"m\",h).call(p,t,i.layoutName)}static async handleSharedView(t,e,i){await(0,u.mapValuesAsync)((async t=>{if(t.identity.layoutName!==e.layoutName){const e=t.getCurrentViews().find((t=>t.name===i.name));e&&await t.onViewDetached({viewIdentity:e,target:null}).catch(console.error)}}),c(t,l,\"f\"))}static async handleLastViewRemoved(t,e){await t.removeLayout(e),await c(t,a,\"f\").handleLastViewRemoved(t)}static async destroyLayout(t,{layoutName:e}){await c(p,r,\"m\",h).call(p,t,e).destroy(),c(t,l,\"f\").delete(e)}static async createLayout(t,e){const{layoutName:i}=e;if(c(t,l,\"f\").has(i))throw new Error(`Layout name ${i} already exists`);await c(t,a,\"f\").createLayout(e,t)}static registerLayout(t,e,i){c(t,l,\"f\").set(e,i)}static getAllLayouts(t){return[...c(t,l,\"f\").values()]}static setInitialSnapshot(t,e){c(t,a,\"f\").setInitialSnapshot(e)}static createClosedConstructor(...t){return class extends p{constructor(){super(...t)}}}}m=i.DefaultLayoutManager=p,r=p,a=new WeakMap,l=new WeakMap,h=function(t,e){const i=c(t,l,\"f\").get(e);if(!i)throw new Error(`[layout-manager] getLayoutByName: Could not locate layout with name '${e}'`);return i};var g={},f={},v={};Object.defineProperty(v,\"__esModule\",{value:!0}),v.ReversibleMap=void 0;v.ReversibleMap=class{constructor(){this.valueToKey=new Map,this.keyToValue=new Map,this.setUnique=(t,e)=>{if(this.hasKey(t)||this.hasValue(e))throw new Error(\"Key or value already in the map.\");this.keyToValue.set(t,e),this.valueToKey.set(e,t)},this.getKey=t=>{const e=this.valueToKey.get(t);if(!e)throw new Error(\"Value not found in the map.\");return e},this.deleteKey=t=>{const e=this.getValue(t);return this.keyToValue.delete(t),this.valueToKey.delete(e),e},this.deleteValue=t=>{const e=this.getKey(t);return this.keyToValue.delete(e),this.valueToKey.delete(t),e},this.hasKey=t=>this.keyToValue.has(t),this.hasValue=t=>this.valueToKey.has(t)}getValue(t){const e=this.keyToValue.get(t);if(!e)throw new Error(\"Key not found in the map.\");return e}},Object.defineProperty(f,\"__esModule\",{value:!0});var _=f.LayoutContentCache=void 0;const y=t.lazy,C=v;class w{constructor(){this.contentItemCache=new C.ReversibleMap,this.contentItemCacheId=0,this.createCacheKey=()=>{const t=`entity-${this.contentItemCacheId.toString()}`;return this.contentItemCacheId+=1,t},this.hasKey=t=>this.contentItemCache.hasKey(t),this.getItemOrUndefined=t=>{try{return this.getContentItemOrThrow(t)}catch(t){return}},this.getContentItemOrThrow=(t,e)=>{if(!this.contentItemCache.hasKey(t))throw new Error(\"Layout component has been destroyed or detached from the current layout.\");const i=this.contentItemCache.getValue(t);if(e&&!e.includes(i.type))throw new Error(`Layout item is not the expected type. Expected ${e.join(\", \")}, got ${i.type}.`);return i},this.getOrCreateEntityId=t=>{if(this.contentItemCache.hasValue(t))return this.contentItemCache.getKey(t);t.onDestroyed((()=>{this.contentItemCache.deleteValue(t)}));const e=this.createCacheKey();return this.contentItemCache.setUnique(e,t),e}}static getSingleInstance(){return w.singleton.getValue()}}_=f.LayoutContentCache=w,w.singleton=new y.Lazy((()=>new w));var I={},b={};!function(t){Object.defineProperty(t,\"__esModule\",{value:!0}),t.getAdjacentStacks=t.doShareEdge=t.getAdjacentItem=void 0;t.getAdjacentItem=(e,i)=>{const{parent:n}=e;if(e.isRoot()||!n)return;const o=[\"top\",\"bottom\"].includes(i)?\"column\":\"row\",s=[\"top\",\"left\"].includes(i)?-1:1;if(n.type===o){const t=n.contentItems.indexOf(e)+s;if(t>=0&&t{const n=t.getBounds(),o=e.getBounds();if(!n||!o)return!1;if([\"top\",\"bottom\"].includes(i)){return!(n.righto.right)}return!(n.bottomo.bottom)};t.getAdjacentStacks=(e,i)=>{const n=[\"top\",\"bottom\"].includes(i)?\"row\":\"column\",o=s=>\"stack\"===s.type?(0,t.doShareEdge)(e,s,i)?[s]:[]:\"root\"===s.type||\"ground\"===s.type?[]:s.type===n?s.contentItems.map((t=>o(t))).flat():s.type!==n?[\"top\",\"right\"].includes(i)?o(s.contentItems[s.contentItems.length-1]):o(s.contentItems[0]):[],s=(0,t.getAdjacentItem)(e,i);return s?o(s):[]}}(b);var S=t.commonjsGlobal&&t.commonjsGlobal.__decorate||function(t,e,i,n){var o,s=arguments.length,r=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if(\"object\"==typeof Reflect&&\"function\"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(s<3?o(r):s>3?o(e,i,r):o(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};Object.defineProperty(I,\"__esModule\",{value:!0}),I.LayoutEntitiesController=void 0;const E=t.decorators,x=b,L=i;class z{constructor(t,e,i){this.wire=t,this.layoutManager=e,this.layoutContentCache=i,this.analytics=t=>{this.wire.sendAction(`layout-controller-${t}`).catch((()=>{}))},this.getLayoutIdentityForViewOrThrow=async t=>{const e=this.layoutManager.getLayoutIdentityForView(t);if(!e)throw new Error(`View identity ${t.name} is not attached to any layouts.`);return e},this.getRoot=async t=>{this.analytics(\"get-root\");const e=(await this.getLayout(t)).getRoot();return{type:e.type,entityId:this.layoutContentCache.getOrCreateEntityId(e)}},this.getStackByView=async t=>{this.analytics(\"get-stack-by-view\");const e=await this.getLayoutIdentityForViewOrThrow(t),i=(await this.getLayout(e)).getStackByView(t);if(\"stack\"===i?.type)return{entityId:this.layoutContentCache.getOrCreateEntityId(i),type:\"stack\"}},this.getStackViews=t=>{this.analytics(\"get-stack-views\");return this.layoutContentCache.getContentItemOrThrow(t,[\"stack\"]).contentItems.map((t=>({name:t.viewName,uuid:this.wire.me.uuid})))},this.isRoot=t=>{this.analytics(\"is-root\");return this.layoutContentCache.getContentItemOrThrow(t).isRoot()},this.exists=t=>(this.analytics(\"exists\"),this.layoutContentCache.hasKey(t)),this.addViewToStack=async(t,e,{index:i}={index:0})=>{this.analytics(\"add-view-to-stack\");const n=this.layoutContentCache.getContentItemOrThrow(t);if(i&&i>n.contentItems.length+1)throw new Error(`Index '${i}' out of range, please exclude the index or specify a number between 0 and ${n.contentItems.length}`);const o={id:t,index:i},{identity:s}=await n.layout.platformCreateView(e,{location:o});return s},this.findViewInStack=(t,e)=>t.contentItems.find((t=>t.viewName===e.name)),this.removeViewFromStack=async(t,e)=>{this.analytics(\"remove-view-from-stack\");const i=this.layoutContentCache.getContentItemOrThrow(t,[\"stack\"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to remove a view ('${e.name}') which does not belong to the stack.`);await n.layout.platformCloseView(e)},this.createAdjacentStack=async(t,e,{position:i=\"right\"}={})=>{if(this.analytics(\"create-adjacent-stack\"),!Array.isArray(e)||0===e.length)throw new Error('The parameter \"views\" must be an array with at least 1 element.');if(![\"top\",\"bottom\",\"left\",\"right\"].includes(i))throw new Error(`Invalid position '${i}' specified.`);const n=this.layoutContentCache.getContentItemOrThrow(t).createAdjacentStack({position:i}),o=this.layoutContentCache.getOrCreateEntityId(n);return await Promise.all(e.reverse().map((t=>this.addViewToStack(o,t)))),o},this.getAdjacentStacks=async({targetId:t,edge:e})=>{this.analytics(\"get-adjacent-stacks\");const i=this.layoutContentCache.getContentItemOrThrow(t);return(0,x.getAdjacentStacks)(i,e).map((t=>({entityId:this.layoutContentCache.getOrCreateEntityId(t)})))},this.setStackActiveView=async(t,e)=>{this.analytics(\"set-stack-active-view\");const i=this.layoutContentCache.getContentItemOrThrow(t,[\"stack\"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to set a view ('${e.name}') as active when it does not belong to the stack.`);i.setActiveContentItem(n,!0)}}async getLayout(t){const e=await L.DefaultLayoutManager.resolveLayout(this.layoutManager,t);if(!e)throw new Error(`Could not resolve target layout identity ${JSON.stringify(t)}`);return e}getContent(t){this.analytics(\"get-content\");return this.layoutContentCache.getContentItemOrThrow(t,[\"column\",\"row\"]).contentItems.map((t=>({type:t.type,entityId:this.layoutContentCache.getOrCreateEntityId(t)})))}getParent(t){this.analytics(\"get-parent\");const e=this.layoutContentCache.getContentItemOrThrow(t);if(!e.isRoot())return e.parent?.contentItems.includes(e)?{type:e.parent.type,entityId:this.layoutContentCache.getOrCreateEntityId(e.parent)}:void 0}}S([(0,E.expose)()],z.prototype,\"getLayoutIdentityForViewOrThrow\",void 0),S([(0,E.expose)()],z.prototype,\"getRoot\",void 0),S([(0,E.expose)()],z.prototype,\"getStackByView\",void 0),S([(0,E.expose)()],z.prototype,\"getStackViews\",void 0),S([(0,E.expose)()],z.prototype,\"getContent\",null),S([(0,E.expose)()],z.prototype,\"getParent\",null),S([(0,E.expose)()],z.prototype,\"isRoot\",void 0),S([(0,E.expose)()],z.prototype,\"exists\",void 0),S([(0,E.expose)()],z.prototype,\"addViewToStack\",void 0),S([(0,E.expose)()],z.prototype,\"removeViewFromStack\",void 0),S([(0,E.expose)()],z.prototype,\"createAdjacentStack\",void 0),S([(0,E.expose)()],z.prototype,\"getAdjacentStacks\",void 0),S([(0,E.expose)()],z.prototype,\"setStackActiveView\",void 0),I.LayoutEntitiesController=z,Object.defineProperty(g,\"__esModule\",{value:!0});var M=g.initLayoutEndpoints=void 0;const P=t.apiExposer,T=t.layout_constants,A=f,k=I,D=i;M=g.initLayoutEndpoints=async function(t,e){const i=t.getFin(),n=await i.Platform.getCurrentSync().getClient(),o=new P.ChannelsExposer(n);await new P.ApiExposer(o).exposeInstance(new k.LayoutEntitiesController(t,e,A.LayoutContentCache.getSingleInstance()),{id:T.LAYOUT_CONTROLLER_ID}),await async function(t,e){const i=t=>async i=>{const n=await D.DefaultLayoutManager.resolveLayout(e,i.target);if(!n)throw new Error(`Could not resolve the layout target from payload ${JSON.stringify(i)}`);return t(n,i)},n=(e,n)=>{t.register(e,i(n))},o=(t,e)=>{n(t,e)};n(\"replace-view\",((t,e)=>t.replaceView(e))),n(\"replace-layout\",((t,{layout:e})=>t.replaceLayout(e))),n(\"add-view\",((t,e)=>t.insertView(e))),o(\"layout-add-view\",((t,{viewOptions:e,location:i,targetView:n})=>t.platformCreateView(e,{location:i,targetView:n}))),n(\"close-view\",((t,e)=>t.cleanupView(e.viewIdentity))),o(\"layout-close-view\",((t,e)=>t.platformCloseView(e.viewIdentity))),n(\"apply-preset-layout\",((t,e)=>t.applyPreset(e))),n(\"get-layout-views\",(t=>t.getCurrentViews())),n(\"get-frame-snapshot\",(t=>t.getFrameSnapshot())),n(\"is-visible\",(t=>t.isVisible())),n(\"destroy\",(t=>t.destroy())),t.register(\"get-layout-snapshot\",(()=>e.getLayoutSnapshot()))}(n,e)};var R={};Object.defineProperty(R,\"__esModule\",{value:!0});var U=R.BaseLayout=void 0;U=R.BaseLayout=class{};var O={};Object.defineProperty(O,\"__esModule\",{value:!0});var V=O.DOMEmitter=void 0;V=O.DOMEmitter=class{constructor(t){this.container=t}dispatchLocalEvent(t,e){const i={...e,type:t,tabSelector:`tab-${e.name}`,containerSelector:`container-${e.name}`,topic:\"openfin-DOM-event\"};this.container.dispatchEvent(new CustomEvent(t,{detail:i}))}};var B={};Object.defineProperty(B,\"__esModule\",{value:!0});var H=B.mapLayoutContentItemsImmutableSync=B.mapLayoutContentItemsImmutable=W=B.isVisible=void 0;var W=B.isVisible=t=>(0!==t.offsetWidth||0!==t.offsetHeight)&&\"hidden\"!==window.getComputedStyle(t).visibility&&t.offsetTop>=0&&t.offsetLeft>=0&&t.offsetTop<=window.innerHeight&&t.offsetLeft<=window.innerWidth;const F=t=>\"type\"in t&&\"component\"===t.type;B.mapLayoutContentItemsImmutable=async function t(e,i){return F(i)?e(i):{...i,content:await Promise.all(i.content?.map((i=>t(e,i))))}},H=B.mapLayoutContentItemsImmutableSync=function t(e,i){return F(i)?e(i):{...i,content:i.content?.map((i=>t(e,i)))}};class N extends Error{constructor(t,e){super(e),this.type=t}}class G extends N{constructor(t,e){super(\"Configuration\",t),this.node=e}}class j extends N{constructor(t){super(\"PopoutBlocked\",t)}}class $ extends N{constructor(t){super(\"API\",t)}}class Z extends N{constructor(t){super(\"Bind\",t)}}class q extends Error{constructor(t,e,i){super(`${t}: ${e}${void 0===i?\"\":\": \"+i}`)}}class X extends q{constructor(t,e){super(\"Assert\",t,e)}}class Y extends q{constructor(t,e,i){super(\"UnreachableCase\",t,`${e}${void 0===i?\"\":\": \"+i}`)}}class K extends q{constructor(t,e){super(\"UnexpectedNull\",t,e)}}class J extends q{constructor(t,e){super(\"UnexpectedUndefined\",t,e)}}var Q;!function(t){let e=!1;const i={PopoutCannotBeCreatedWithGroundItemConfig:{id:0,default:\"Popout cannot be created with ground ItemConfig\"},PleaseRegisterAConstructorFunction:{id:1,default:\"Please register a constructor function\"},ComponentTypeNotRegisteredAndBindComponentEventHandlerNotAssigned:{id:2,default:\"Component type not registered and BindComponentEvent handler not assigned\"},ComponentIsAlreadyRegistered:{id:3,default:\"Component is already registered\"},ComponentIsNotVirtuable:{id:4,default:\"Component is not virtuable. Requires rootHtmlElement field/getter\"},VirtualComponentDoesNotHaveRootHtmlElement:{id:5,default:'Virtual component does not have getter \"rootHtmlElement\"'},ItemConfigIsNotTypeComponent:{id:6,default:\"ItemConfig is not of type component\"},InvalidNumberPartInSizeString:{id:7,default:\"Invalid number part in size string\"},UnknownUnitInSizeString:{id:8,default:\"Unknown unit in size string\"},UnsupportedUnitInSizeString:{id:9,default:\"Unsupported unit in size string\"}};t.idCount=Object.keys(i).length;const n=Object.values(i);t.checkInitialise=function(){if(!e)for(let e=0;e=\"0\"&&t<=\"9\"}function Tt(t,e){const i=zt(e);t.style.width=i}function At(t,e){const i=zt(e);t.style.height=i}function kt(t){return{width:t.offsetWidth,height:t.offsetHeight}}function Dt(t,e){t.style.display=e?\"\":\"none\"}function Rt(t,e){if(void 0!==e)for(const i in e)if(e.hasOwnProperty(i)){const n=e[i],o=t[i];t[i]=Ut(o,n)}return t}function Ut(t,e){if(\"object\"!=typeof e)return e;if(Array.isArray(e)){const t=e.length,i=new Array(t);for(let n=0;n36)throw new Error(\"Too many keys in config minifier map\")},t.translateObject=n}(dt||(dt={})),function(t){t.defaults={type:at.ground,content:[],size:1,sizeUnit:ht.Fractional,minSize:void 0,minSizeUnit:ht.Pixel,id:\"\",isClosable:!0},t.createCopy=function(t,e){switch(t.type){case at.ground:case at.row:case at.column:return gt.createCopy(t,e);case at.stack:return ut.createCopy(t,e);case at.component:return pt.createCopy(t);default:throw new Y(\"CICC91354\",t.type,\"Invalid Config Item type specified\")}},t.createDefault=function(t){switch(t){case at.ground:throw new X(\"CICCDR91562\");case at.row:case at.column:return gt.createDefault(t);case at.stack:return ut.createDefault();case at.component:return pt.createDefault();default:throw new Y(\"CICCDD91563\",t,\"Invalid Config Item type specified\")}},t.isComponentItem=function(t){return t.type===at.component},t.isStackItem=function(t){return t.type===at.stack},t.isGroundItem=function(t){return t.type===at.ground}}(ct||(ct={})),function(t){t.defaultMaximised=!1,function(t){t.createCopy=function(t,e){return void 0===t?void 0:{show:null!=e?e:t.show,popout:t.popout,close:t.close,maximise:t.maximise,minimise:t.minimise,tabDropdown:t.tabDropdown}}}(t.Header||(t.Header={}))}(mt||(mt={})),function(t){function e(t){const e=t.length,i=new Array(e);for(let n=0;n\"__glMaximised\"===t));t>0&&(o=!0,n=n.splice(t,1)),e=n.length>0?n[0]:ct.defaults.id}else e=n;return i=void 0!==t.maximised?t.maximised:o,{id:e,maximised:i}}}(wt||(wt={})),function(t){function e(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0;return{resolved:!0,root:Et.resolve(i),openPopouts:t.resolveOpenPopouts(e.openPopouts),dimensions:t.Dimensions.resolve(e.dimensions),settings:t.Settings.resolve(e.settings),header:t.Header.resolve(e.header,e.settings,e.labels)}}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:Lt.fromResolvedArray(e.openPopouts),settings:_t.Settings.createCopy(e.settings),dimensions:t.Dimensions.fromResolved(e.dimensions),header:_t.Header.createCopy(e.header)}},t.isResolved=function(t){const e=t;return void 0!==e.resolved&&!0===e.resolved},t.resolveOpenPopouts=function(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0,{root:Et.resolve(o),openPopouts:xt.resolveOpenPopouts(e.openPopouts),dimensions:xt.Dimensions.resolve(e.dimensions),settings:xt.Settings.resolve(e.settings),header:xt.Header.resolve(e.header,e.settings,e.labels),parentId:null!==(i=e.parentId)&&void 0!==i?i:null,indexInParent:null!==(n=e.indexInParent)&&void 0!==n?n:null,window:t.Window.resolve(e.window,e.dimensions),resolved:!0}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:i(e.openPopouts),dimensions:xt.Dimensions.fromResolved(e.dimensions),settings:_t.Settings.createCopy(e.settings),header:_t.Header.createCopy(e.header),parentId:e.parentId,indexInParent:e.indexInParent,window:t.Window.fromResolved(e.window)}},t.fromResolvedArray=i}(Lt||(Lt={}));class Wt{constructor(){this._allEventSubscriptions=[],this._subscriptionsMap=new Map,this.unbind=this.removeEventListener,this.trigger=this.emit}tryBubbleEvent(t,e){}emit(t,...e){let i=this._subscriptionsMap.get(t);if(void 0!==i){i=i.slice();for(let t=0;t0){const n=e.slice();n.unshift(t);const o=this._allEventSubscriptions.slice();for(let t=0;t0?n.contentItems[0]:n,e=0);const o=this._layoutManager.createAndInitContentItem(i,t);t.addChild(o,e),this._layoutManager.layoutConfig.settings.popInOnClose?this._onClose():this.close()}createWindow(){const t=this.createUrl(),e=Math.floor(1e6*Math.random()).toString(36),i=this.serializeWindowFeatures({width:this._initialWindowSize.width,height:this._initialWindowSize.height,innerWidth:this._initialWindowSize.width,innerHeight:this._initialWindowSize.height,menubar:\"no\",toolbar:\"no\",location:\"no\",personalbar:\"no\",resizable:\"yes\",scrollbars:\"no\",status:\"no\"});if(this._popoutWindow=globalThis.open(t,e,i),this._popoutWindow)this._popoutWindow.addEventListener(\"load\",(()=>this.positionWindow()),{passive:!0}),this._popoutWindow.addEventListener(\"beforeunload\",(()=>{this._layoutManager.layoutConfig.settings.popInOnClose?this.popIn():this._onClose()}),{passive:!0}),this._checkReadyInterval=setInterval((()=>this.checkReady()),10);else if(!0===this._layoutManager.layoutConfig.settings.blockedPopoutsThrowError){throw new j(\"Popout blocked\")}}checkReady(){if(null===this._popoutWindow)throw new K(\"BPCR01844\");this._popoutWindow.__glInstance&&this._popoutWindow.__glInstance.isInitialised&&(this.onInitialised(),void 0!==this._checkReadyInterval&&(clearInterval(this._checkReadyInterval),this._checkReadyInterval=void 0))}serializeWindowFeatures(t){const e=[];for(const i in t)e.push(i+\"=\"+t[i].toString());return e.join(\",\")}createUrl(){const t=\"gl-window-config-\"+Ot(),e=_t.minifyConfig(this._config);try{localStorage.setItem(t,JSON.stringify(e))}catch(t){throw new Error(\"Error while writing to localStorage \"+function(t){return t instanceof Error?t.message:\"string\"==typeof t?t:\"Unknown Error\"}(t))}const i=new URL(location.href);return i.searchParams.set(\"gl-window\",t),i.toString()}positionWindow(){if(null===this._popoutWindow)throw new Error(\"BrowserPopout.positionWindow: null popoutWindow\");this._popoutWindow.moveTo(this._initialWindowSize.left,this._initialWindowSize.top),this._popoutWindow.focus()}onInitialised(){this._isInitialised=!0,this.getGlInstance().on(\"popIn\",(()=>this.popIn())),this.emit(\"initialised\")}_onClose(){setTimeout((()=>this.emit(\"closed\")),50)}}class Gt extends Wt{constructor(t,e,i,n){super(),this.layoutManager=t,this._parent=i,this._element=n,this._popInParentIds=[],this._type=e.type,this._id=e.id,this._isInitialised=!1,this.isGround=!1,this.isRow=!1,this.isColumn=!1,this.isStack=!1,this.isComponent=!1,this.size=e.size,this.sizeUnit=e.sizeUnit,this.minSize=e.minSize,this.minSizeUnit=e.minSizeUnit,this._isClosable=e.isClosable,this._pendingEventPropagations={},this._throttledEvents=[\"stateChanged\"],this._contentItems=this.createContentItems(e.content)}get type(){return this._type}get id(){return this._id}set id(t){this._id=t}get popInParentIds(){return this._popInParentIds}get parent(){return this._parent}get contentItems(){return this._contentItems}get isClosable(){return this._isClosable}get element(){return this._element}get isInitialised(){return this._isInitialised}static isStack(t){return t.isStack}static isComponentItem(t){return t.isComponent}static isComponentParentableItem(t){return t.isStack||t.isGround}removeChild(t,e=!1){const i=this._contentItems.indexOf(t);if(-1===i)throw new Error(\"Can't remove child item. Unknown content item\");if(e||this._contentItems[i].destroy(),this._contentItems.splice(i,1),this._contentItems.length>0)this.updateSize(!1);else if(!this.isGround&&!0===this._isClosable){if(null===this._parent)throw new K(\"CIUC00874\");this._parent.removeChild(this)}}addChild(t,e,i){return null!=e||(e=this._contentItems.length),this._contentItems.splice(e,0,t),t.setParent(this),!0===this._isInitialised&&!1===t._isInitialised&&t.init(),e}replaceChild(t,e,i=!1){const n=this._contentItems.indexOf(t),o=t._element.parentNode;if(-1===n)throw new X(\"CIRCI23232\",\"Can't replace child. oldChild is not child of this\");if(null===o)throw new K(\"CIRCP23232\");if(o.replaceChild(e._element,t._element),!0===i&&(t._parent=null,t.destroy()),this._contentItems[n]=e,e.setParent(this),e.size=t.size,e.sizeUnit=t.sizeUnit,e.minSize=t.minSize,e.minSizeUnit=t.minSizeUnit,null===e._parent)throw new K(\"CIRCNC45699\");!0===e._parent._isInitialised&&!1===e._isInitialised&&e.init(),this.updateSize(!1)}remove(){if(null===this._parent)throw new K(\"CIR11110\");this._parent.removeChild(this)}popout(){const t=Ot(),e=this.layoutManager.createPopoutFromContentItem(this,void 0,t,void 0);return this.emitBaseBubblingEvent(\"stateChanged\"),e}calculateConfigContent(){const t=this._contentItems,e=t.length,i=new Array(e);for(let n=0;nthis.propagateEventToLayoutManager(t,e))))}propagateEventToLayoutManager(t,e){this._pendingEventPropagations[t]=!1,this.layoutManager.emitUnknown(t,e)}}class jt extends Gt{constructor(t,e,i){super(t,e,i,document.createElement(\"div\")),this._parentItem=i,this._focused=!1,this.isComponent=!0,this._reorderEnabled=e.reorderEnabled,this.applyUpdatableConfig(e),this._initialWantMaximise=e.maximised;const n=document.createElement(\"div\");n.classList.add(\"lm_content\"),this.element.appendChild(n),this._container=new Ft(e,this,t,n,(t=>this.handleUpdateItemConfigEvent(t)),(()=>this.show()),(()=>this.hide()),(t=>this.focus(t)),(t=>this.blur(t)))}get componentName(){return this._container.componentType}get componentType(){return this._container.componentType}get reorderEnabled(){return this._reorderEnabled}get initialWantMaximise(){return this._initialWantMaximise}get component(){return this._container.component}get container(){return this._container}get parentItem(){return this._parentItem}get headerConfig(){return this._headerConfig}get title(){return this._title}get tab(){return this._tab}get focused(){return this._focused}destroy(){this._container.destroy(),super.destroy()}applyUpdatableConfig(t){this.setTitle(t.title),this._headerConfig=t.header}toConfig(){const t=this._container.stateRequestEvent,e=void 0===t?this._container.state:t();return{type:at.component,content:[],size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,maximised:!1,isClosable:this.isClosable,reorderEnabled:this._reorderEnabled,title:this._title,header:mt.Header.createCopy(this._headerConfig),componentType:pt.copyComponentType(this.componentType),componentState:e}}close(){if(null===this.parent)throw new K(\"CIC68883\");this.parent.removeChild(this,!1)}enterDragMode(t,e){Tt(this.element,t),At(this.element,e),this._container.enterDragMode(t,e)}exitDragMode(){this._container.exitDragMode()}enterStackMaximised(){this._container.enterStackMaximised()}exitStackMaximised(){this._container.exitStackMaximised()}drag(){this._container.drag()}updateSize(t){this.updateNodeSize(t)}init(){this.updateNodeSize(!1),super.init(),this._container.emit(\"open\"),this.initContentItems()}setTitle(t){this._title=t,this.emit(\"titleChanged\",t),this.emit(\"stateChanged\")}setTab(t){this._tab=t,this.emit(\"tab\",t),this._container.setTab(t)}hide(){super.hide(),this._container.setVisibility(!1)}show(){super.show(),this._container.setVisibility(!0)}focus(t=!1){this.parentItem.setActiveComponentItem(this,!0,t)}setFocused(t){this._focused=!0,this.tab.setFocused(),t||this.emitBaseBubblingEvent(\"focus\")}blur(t=!1){this._focused&&this.layoutManager.setFocusedComponentItem(void 0,t)}setBlurred(t){this._focused=!1,this.tab.setBlurred(),t||this.emitBaseBubblingEvent(\"blur\")}setParent(t){this._parentItem=t,super.setParent(t)}handleUpdateItemConfigEvent(t){this.applyUpdatableConfig(t)}updateNodeSize(t){if(\"none\"!==this.element.style.display){const{width:e,height:i}=kt(this.element);this._container.setSizeToNodeSize(e,i,t)}}}class $t extends Gt{constructor(){super(...arguments),this._focused=!1}get focused(){return this._focused}setFocusedValue(t){this._focused=t}}class Zt extends Wt{constructor(t,e){super(),this._eElement=t,this._pointerTracking=!1,this._pointerDownEventListener=t=>this.onPointerDown(t),this._pointerMoveEventListener=t=>this.onPointerMove(t),this._pointerUpEventListener=t=>this.onPointerUp(t),this._timeout=void 0,this._allowableTargets=[t,...e],this._oDocument=document,this._eBody=document.body,this._nDelay=1800,this._nDistance=10,this._nX=0,this._nY=0,this._nOriginalX=0,this._nOriginalY=0,this._dragging=!1,this._eElement.addEventListener(\"pointerdown\",this._pointerDownEventListener,{passive:!0})}destroy(){this.checkRemovePointerTrackingEventListeners(),this._eElement.removeEventListener(\"pointerdown\",this._pointerDownEventListener)}cancelDrag(){this.processDragStop(void 0)}onPointerDown(t){if(this._allowableTargets.includes(t.target)&&t.isPrimary){const e=this.getPointerCoordinates(t);this.processPointerDown(e)}}processPointerDown(t){this._nOriginalX=t.x,this._nOriginalY=t.y,this._oDocument.addEventListener(\"pointermove\",this._pointerMoveEventListener),this._oDocument.addEventListener(\"pointerup\",this._pointerUpEventListener,{passive:!0}),this._pointerTracking=!0,this._timeout=setTimeout((()=>{try{this.startDrag()}catch(t){throw console.error(t),t}}),this._nDelay)}onPointerMove(t){this._pointerTracking&&(this.processDragMove(t),t.preventDefault())}processDragMove(t){this._nX=t.pageX-this._nOriginalX,this._nY=t.pageY-this._nOriginalY,!1===this._dragging&&(Math.abs(this._nX)>this._nDistance||Math.abs(this._nY)>this._nDistance)&&this.startDrag(),this._dragging&&this.emit(\"drag\",this._nX,this._nY,t)}onPointerUp(t){this.processDragStop(t)}processDragStop(t){var e;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this.checkRemovePointerTrackingEventListeners(),!0===this._dragging&&(this._eBody.classList.remove(\"lm_dragging\"),this._eElement.classList.remove(\"lm_dragging\"),null===(e=this._oDocument.querySelector(\"iframe\"))||void 0===e||e.style.setProperty(\"pointer-events\",\"\"),this._dragging=!1,this.emit(\"dragStop\",t))}checkRemovePointerTrackingEventListeners(){this._pointerTracking&&(this._oDocument.removeEventListener(\"pointermove\",this._pointerMoveEventListener),this._oDocument.removeEventListener(\"pointerup\",this._pointerUpEventListener),this._pointerTracking=!1)}startDrag(){var t;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this._dragging=!0,this._eBody.classList.add(\"lm_dragging\"),this._eElement.classList.add(\"lm_dragging\"),null===(t=this._oDocument.querySelector(\"iframe\"))||void 0===t||t.style.setProperty(\"pointer-events\",\"none\"),this.emit(\"dragStart\",this._nOriginalX,this._nOriginalY)}getPointerCoordinates(t){return{x:t.pageX,y:t.pageY}}}class qt{constructor(t,e,i){this._isVertical=t,this._size=e,this._grabSize=i0){const i=this.createSplitter(Math.max(0,e-1)).element;e>0?(this.contentItems[e-1].element.insertAdjacentElement(\"afterend\",i),i.insertAdjacentElement(\"afterend\",t.element)):(this.contentItems[0].element.insertAdjacentElement(\"beforebegin\",i),i.insertAdjacentElement(\"beforebegin\",t.element))}else this._childElementContainer.appendChild(t.element);super.addChild(t,e);const n=1/this.contentItems.length*100;if(!0===i)return this.emitBaseBubblingEvent(\"stateChanged\"),e;for(let e=0;e0&&(this.calculateRelativeSizes(),this.setAbsoluteSizes()),this.emitBaseBubblingEvent(\"stateChanged\"),this.emit(\"resize\")}setAbsoluteSizes(){const t=this.calculateAbsoluteSizes();for(let e=0;e0&&t.itemSizes[e]++,this._isColumn?(Tt(this.contentItems[e].element,t.crossAxisSize),At(this.contentItems[e].element,t.itemSizes[e])):(Tt(this.contentItems[e].element,t.itemSizes[e]),At(this.contentItems[e].element,t.crossAxisSize))}calculateAbsoluteSizes(){const t=(this.contentItems.length-1)*this._splitterSize,{width:e,height:i}=kt(this.element);let n,o;this._isColumn?(n=i-t,o=e):(n=e-t,o=i);let s=0;const r=[];for(let t=0;t0){const n=100-t;for(let t=0;t100&&e.length>0){for(let t=0;te)return;{const r=i/e;let a=i;for(let e=0;ethis.onSplitterDrag(e,t,i))),e.on(\"dragStop\",(()=>this.onSplitterDragStop(e))),e.on(\"dragStart\",(()=>this.onSplitterDragStart(e))),this._splitter.splice(t,0,e),e}getSplitItems(t){const e=this._splitter.indexOf(t);return{before:this.contentItems[e],after:this.contentItems[e+1]}}calculateContentItemMinSize(t){const e=t.minSize;if(void 0!==e){if(t.minSizeUnit===ht.Pixel)return e;throw new X(\"ROCGMD98831\",JSON.stringify(t))}{const t=this.layoutManager.layoutConfig.dimensions;return this._isColumn?t.defaultMinItemHeight:t.defaultMinItemWidth}}calculateContentItemsTotalMinSize(t){let e=0;for(const i of t)e+=this.calculateContentItemMinSize(i);return e}onSplitterDragStart(t){const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=this.calculateContentItemsTotalMinSize(e.before.contentItems),s=this.calculateContentItemsTotalMinSize(e.after.contentItems);this._splitterPosition=0,this._splitterMinPosition=-1*(i-o),this._splitterMaxPosition=n-s}onSplitterDrag(t,e,i){let n=this._isColumn?i:e;if(null===this._splitterMinPosition||null===this._splitterMaxPosition)throw new K(\"ROCOSD59226\");n=Math.max(n,this._splitterMinPosition),n=Math.min(n,this._splitterMaxPosition),this._splitterPosition=n;const o=zt(n);this._isColumn?t.element.style.top=o:t.element.style.left=o}onSplitterDragStop(t){if(null===this._splitterPosition)throw new K(\"ROCOSDS66932\");{const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=(this._splitterPosition+i)/(i+n),s=e.before.size+e.after.size;e.before.size=o*s,e.after.size=(1-o)*s,t.element.style.top=zt(0),t.element.style.left=zt(0),globalThis.requestAnimationFrame((()=>this.updateSize(!1)))}}}!function(t){t.getElementDimensionSize=function(t,e){return\"width\"===e?function(t){return t.offsetWidth}(t):function(t){return t.offsetHeight}(t)},t.setElementDimensionSize=function(t,e,i){return\"width\"===e?Tt(t,i):At(t,i)},t.createElement=function(t,e){const i=t.createElement(\"div\");return i.classList.add(\"lm_item\"),e?i.classList.add(\"lm_column\"):i.classList.add(\"lm_row\"),i}}(Xt||(Xt={}));class Yt extends $t{constructor(t,e,i){super(t,vt.create(e),null,Yt.createElement(document)),this.isGround=!0,this._childElementContainer=this.element,this._containerElement=i;let n=null;for(;;){const t=n?n.previousSibling:this._containerElement.lastChild;if(!(t instanceof Element&&t.classList.contains(\"lm_content\")))break;n=t}this._containerElement.insertBefore(this.element,n)}init(){if(!0!==this.isInitialised){this.updateNodeSize();for(let t=0;t0?this.contentItems[0]:this,n.isComponent)throw new Error(\"Cannot add item as child to ComponentItem\");{const t=this.layoutManager.createAndInitContentItem(i,n);return e=n.addChild(t,e),n===this?-1:e}}loadComponentAsRoot(t){this.clearRoot();const e=Ct.resolve(t,!1);if(e.maximised)throw new Error(\"Root Component cannot be maximised\");{const t=new jt(this.layoutManager,e,this);t.init(),this.addChild(t,0)}}addChild(t,e){if(this.contentItems.length>0)throw new Error(\"Ground node can only have a single child\");return this._childElementContainer.appendChild(t.element),e=super.addChild(t,e),this.updateSize(!1),this.emitBaseBubblingEvent(\"stateChanged\"),e}calculateConfigContent(){const t=this.contentItems,e=t.length,i=new Array(e);for(let n=0;n0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e)),this.updateContentItemsSize(!1))}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}createSideAreas(){const t=Yt.Area.oppositeSides,e=new Array(Object.keys(t).length);let i=0;for(const n in t){const o=n,s=this.getElementArea();if(null===s)throw new K(\"RCSA77553\");s.side=o,\"2\"===t[o][1]?s[o]=s[t[o]]-50:s[o]=s[t[o]]+50,s.surface=(s.x2-s.x1)*(s.y2-s.y1),e[i++]=s}return e}highlightDropZone(t,e,i){this.layoutManager.tabDropPlaceholder.remove(),super.highlightDropZone(t,e,i)}onDrop(t,e){if(t.isComponent){const e=ut.createDefault(),i=t;e.header=mt.Header.createCopy(i.headerConfig);const n=this.layoutManager.createAndInitContentItem(e,this);n.addChild(t),t=n}if(0===this.contentItems.length)this.addChild(t);else{if(t.type===at.row||t.type===at.column){const e=ut.createDefault(),i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}const i=\"x\"==e.side[0]?at.row:at.column,n=\"2\"==e.side[1],o=this.contentItems[0];if(o instanceof Xt&&o.type===i){const e=o.contentItems[n?0:o.contentItems.length-1];o.addChild(t,n?0:void 0,!0),e.size*=.5,t.size=e.size,t.sizeUnit=ht.Percent,o.updateSize(!1)}else{const e=ct.createDefault(i),s=this.layoutManager.createContentItem(e,this);this.replaceChild(o,s),s.addChild(t,n?0:void 0,!0),s.addChild(o,n?void 0:0,!0),o.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}}dock(){throw new X(\"GID87731\")}validateDocking(){throw new X(\"GIVD87732\")}getAllContentItems(){const t=[this];return this.deepGetAllContentItems(this.contentItems,t),t}getConfigMaximisedItems(){const t=[];return this.deepFilterContentItems(this.contentItems,t,(t=>!(!Gt.isStack(t)||!t.initialWantMaximise)||!(!Gt.isComponentItem(t)||!t.initialWantMaximise))),t}getItemsByPopInParentId(t){const e=[];return this.deepFilterContentItems(this.contentItems,e,(e=>e.popInParentIds.includes(t))),e}toConfig(){throw new Error(\"Cannot generate GroundItem config\")}setActiveComponentItem(t,e,i){}updateNodeSize(){const{width:t,height:e}=kt(this._containerElement);Tt(this.element,t),At(this.element,e),this.contentItems.length>0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e))}deepGetAllContentItems(t,e){for(let i=0;ithis.onClick(t),this._touchStartEventListener=t=>this.onTouchStart(t),this._element=document.createElement(\"div\"),this._element.classList.add(i),this._element.title=e,this._header.on(\"destroy\",(()=>this.destroy())),this._element.addEventListener(\"click\",this._clickEventListener,{passive:!0}),this._element.addEventListener(\"touchstart\",this._touchStartEventListener,{passive:!0}),this._header.controlsContainerElement.appendChild(this._element)}get element(){return this._element}destroy(){var t;this._element.removeEventListener(\"click\",this._clickEventListener),this._element.removeEventListener(\"touchstart\",this._touchStartEventListener),null===(t=this._element.parentNode)||void 0===t||t.removeChild(this._element)}onClick(t){this._pushEvent(t)}onTouchStart(t){this._pushEvent(t)}}class Jt{constructor(t,e,i,n,o){var s;this._layoutManager=t,this._componentItem=e,this._closeEvent=i,this._focusEvent=n,this._dragStartEvent=o,this._isActive=!1,this._tabClickListener=t=>this.onTabClickDown(t),this._tabTouchStartListener=t=>this.onTabTouchStart(t),this._closeClickListener=()=>this.onCloseClick(),this._closeTouchStartListener=()=>this.onCloseTouchStart(),this._dragStartListener=(t,e)=>this.onDragStart(t,e),this._contentItemDestroyListener=()=>this.onContentItemDestroy(),this._tabTitleChangedListener=t=>this.setTitle(t),this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_tab\"),this._titleElement=document.createElement(\"span\"),this._titleElement.classList.add(\"lm_title\"),this._closeElement=document.createElement(\"div\"),this._closeElement.classList.add(\"lm_close_tab\"),this._element.appendChild(this._titleElement),this._element.appendChild(this._closeElement),e.isClosable?this._closeElement.style.display=\"\":this._closeElement.style.display=\"none\",this.setTitle(e.title),this._componentItem.on(\"titleChanged\",this._tabTitleChangedListener);(null!==(s=e.reorderEnabled)&&void 0!==s?s:this._layoutManager.layoutConfig.settings.reorderEnabled)&&this.enableReorder(),this._element.addEventListener(\"click\",this._tabClickListener,{passive:!0}),this._element.addEventListener(\"touchstart\",this._tabTouchStartListener,{passive:!0}),this._componentItem.isClosable?(this._closeElement.addEventListener(\"click\",this._closeClickListener,{passive:!0}),this._closeElement.addEventListener(\"touchstart\",this._closeTouchStartListener,{passive:!0})):(this._closeElement.remove(),this._closeElement=void 0),this._componentItem.setTab(this),this._layoutManager.emit(\"tabCreated\",this)}get isActive(){return this._isActive}get componentItem(){return this._componentItem}get contentItem(){return this._componentItem}get element(){return this._element}get titleElement(){return this._titleElement}get closeElement(){return this._closeElement}get reorderEnabled(){return void 0!==this._dragListener}set reorderEnabled(t){t!==this.reorderEnabled&&(t?this.enableReorder():this.disableReorder())}setTitle(t){this._titleElement.innerText=t,this._element.title=t}setActive(t){t!==this._isActive&&(this._isActive=t,t?this._element.classList.add(\"lm_active\"):this._element.classList.remove(\"lm_active\"))}destroy(){var t,e;this._closeEvent=void 0,this._focusEvent=void 0,this._dragStartEvent=void 0,this._element.removeEventListener(\"click\",this._tabClickListener),this._element.removeEventListener(\"touchstart\",this._tabTouchStartListener),null===(t=this._closeElement)||void 0===t||t.removeEventListener(\"click\",this._closeClickListener),null===(e=this._closeElement)||void 0===e||e.removeEventListener(\"touchstart\",this._closeTouchStartListener),this._componentItem.off(\"titleChanged\",this._tabTitleChangedListener),this.reorderEnabled&&this.disableReorder(),this._element.remove()}setBlurred(){this._element.classList.remove(\"lm_focused\"),this._titleElement.classList.remove(\"lm_focused\")}setFocused(){this._element.classList.add(\"lm_focused\"),this._titleElement.classList.add(\"lm_focused\")}onDragStart(t,e){if(void 0===this._dragListener)throw new J(\"TODSDLU10093\");if(void 0===this._dragStartEvent)throw new J(\"TODS23309\");this._dragStartEvent(t,e,this._dragListener,this.componentItem)}onContentItemDestroy(){void 0!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=void 0)}onTabClickDown(t){const e=t.target;e!==this._element&&e!==this._titleElement||(0===t.button?this.notifyFocus():1===t.button&&this._componentItem.isClosable&&this.notifyClose())}onTabTouchStart(t){t.target===this._element&&this.notifyFocus()}onCloseClick(){this.notifyClose()}onCloseTouchStart(){this.notifyClose()}notifyClose(){if(void 0===this._closeEvent)throw new J(\"TNC15007\");this._closeEvent(this._componentItem)}notifyFocus(){if(void 0===this._focusEvent)throw new J(\"TNA15007\");this._focusEvent(this._componentItem)}enableReorder(){this._dragListener=new Zt(this._element,[this._titleElement]),this._dragListener.on(\"dragStart\",this._dragStartListener),this._componentItem.on(\"destroy\",this._contentItemDestroyListener)}disableReorder(){if(void 0===this._dragListener)throw new J(\"TDR87745\");this._componentItem.off(\"destroy\",this._contentItemDestroyListener),this._dragListener.off(\"dragStart\",this._dragStartListener),this._dragListener=void 0}}class Qt{constructor(t,e,i,n,o){this._layoutManager=t,this._componentRemoveEvent=e,this._componentFocusEvent=i,this._componentDragStartEvent=n,this._dropdownActiveChangedEvent=o,this._tabs=[],this._lastVisibleTabIndex=-1,this._dropdownActive=!1,this._element=document.createElement(\"section\"),this._element.classList.add(\"lm_tabs\"),this._dropdownElement=document.createElement(\"section\"),this._dropdownElement.classList.add(\"lm_tabdropdown_list\"),this._dropdownElement.style.display=\"none\"}get tabs(){return this._tabs}get tabCount(){return this._tabs.length}get lastVisibleTabIndex(){return this._lastVisibleTabIndex}get element(){return this._element}get dropdownElement(){return this._dropdownElement}get dropdownActive(){return this._dropdownActive}destroy(){for(let t=0;tthis.handleTabCloseEvent(t)),(t=>this.handleTabFocusEvent(t)),((t,e,i,n)=>this.handleTabDragStartEvent(t,e,i,n)));void 0===e&&(e=this._tabs.length),this._tabs.splice(e,0,i),ethis._lastVisibleTabIndex){const t=this._tabs[e];for(let t=e;t>0;t--)this._tabs[t]=this._tabs[t-1];this._tabs[0]=t}}updateTabSizes(t,e){let i=!1;this.tryUpdateTabSizes(i,t,e)||(i=!0,this.tryUpdateTabSizes(i,t,e)),i!==this._dropdownActive&&(this._dropdownActive=i,this._dropdownActiveChangedEvent())}tryUpdateTabSizes(t,e,i){if(this._tabs.length>0){if(void 0===i)throw new Error(\"non-empty tabs must have active component item\");let n=0,o=!1;const s=this._layoutManager.layoutConfig.settings.tabOverlapAllowance,r=this._tabs.indexOf(i.tab),a=this._tabs[r];this._lastVisibleTabIndex=-1;for(let i=0;ie){if(o)i===r&&(l.style.zIndex=\"auto\",l.style.marginLeft=\"\",l.parentElement!==this._element&&this._element.appendChild(l));else{let t;if(t=r>0&&r<=i?(d-e)/(i-1):(d-e)/i,tthis.onClick(t),this._touchStartListener=t=>this.onTouchStart(t),this._rowColumnClosable=!0,this._closeButton=null,this._popoutButton=null,this._tabsContainer=new Qt(this._layoutManager,(t=>this.handleTabInitiatedComponentRemoveEvent(t)),(t=>this.handleTabInitiatedComponentFocusEvent(t)),((t,e,i,n)=>this.handleTabInitiatedDragStartEvent(t,e,i,n)),(()=>this.processTabDropdownActiveChanged())),this._show=i.show,this._popoutEnabled=i.popoutEnabled,this._popoutLabel=i.popoutLabel,this._maximiseEnabled=i.maximiseEnabled,this._maximiseLabel=i.maximiseLabel,this._minimiseEnabled=i.minimiseEnabled,this._minimiseLabel=i.minimiseLabel,this._closeEnabled=i.closeEnabled,this._closeLabel=i.closeLabel,this._tabDropdownEnabled=i.tabDropdownEnabled,this._tabDropdownLabel=i.tabDropdownLabel,this.setSide(i.side),this._canRemoveComponent=this._configClosable,this._element=document.createElement(\"section\"),this._element.classList.add(\"lm_header\"),this._controlsContainerElement=document.createElement(\"section\"),this._controlsContainerElement.classList.add(\"lm_controls\"),this._element.appendChild(this._tabsContainer.element),this._element.appendChild(this._controlsContainerElement),this._element.appendChild(this._tabsContainer.dropdownElement),this._element.addEventListener(\"click\",this._clickListener,{passive:!0}),this._element.addEventListener(\"touchstart\",this._touchStartListener,{passive:!0}),this._documentMouseUpListener=()=>this._tabsContainer.hideAdditionalTabsDropdown(),globalThis.document.addEventListener(\"mouseup\",this._documentMouseUpListener,{passive:!0}),this._tabControlOffset=this._layoutManager.layoutConfig.settings.tabControlOffset,this._tabDropdownEnabled&&(this._tabDropdownButton=new Kt(this,this._tabDropdownLabel,\"lm_tabdropdown\",(()=>this._tabsContainer.showAdditionalTabsDropdown()))),this._popoutEnabled&&(this._popoutButton=new Kt(this,this._popoutLabel,\"lm_popout\",(()=>this.handleButtonPopoutEvent()))),this._maximiseEnabled&&(this._maximiseButton=new Kt(this,this._maximiseLabel,\"lm_maximise\",(t=>this.handleButtonMaximiseToggleEvent(t)))),this._configClosable&&(this._closeButton=new Kt(this,this._closeLabel,\"lm_close\",(()=>s()))),this.processTabDropdownActiveChanged()}get show(){return this._show}get side(){return this._side}get leftRightSided(){return this._leftRightSided}get layoutManager(){return this._layoutManager}get parent(){return this._parent}get tabs(){return this._tabsContainer.tabs}get lastVisibleTabIndex(){return this._tabsContainer.lastVisibleTabIndex}get element(){return this._element}get tabsContainerElement(){return this._tabsContainer.element}get controlsContainerElement(){return this._controlsContainerElement}destroy(){this.emit(\"destroy\"),this._popoutEvent=void 0,this._maximiseToggleEvent=void 0,this._clickEvent=void 0,this._touchStartEvent=void 0,this._componentRemoveEvent=void 0,this._componentFocusEvent=void 0,this._componentDragStartEvent=void 0,this._tabsContainer.destroy(),globalThis.document.removeEventListener(\"mouseup\",this._documentMouseUpListener),this._element.remove()}createTab(t,e){this._tabsContainer.createTab(t,e)}removeTab(t){this._tabsContainer.removeTab(t)}processActiveComponentChanged(t){this._tabsContainer.processActiveComponentChanged(t),this.updateTabSizes()}setSide(t){this._side=t,this._leftRightSided=[nt.right,nt.left].includes(this._side)}setRowColumnClosable(t){this._rowColumnClosable=t,this.updateClosability()}updateClosability(){let t;if(this._configClosable)if(this._rowColumnClosable){t=!0;const e=this.tabs.length;for(let i=0;i1}applyFocusedValue(t){t?this._element.classList.add(\"lm_focused\"):this._element.classList.remove(\"lm_focused\")}processMaximised(){if(void 0===this._maximiseButton)throw new J(\"HPMAX16997\");this._maximiseButton.element.setAttribute(\"title\",this._minimiseLabel)}processMinimised(){if(void 0===this._maximiseButton)throw new J(\"HPMIN16997\");this._maximiseButton.element.setAttribute(\"title\",this._maximiseLabel)}updateTabSizes(){if(this._tabsContainer.tabCount>0){const t=this._show?this._layoutManager.layoutConfig.dimensions.headerHeight:0;let e;this._leftRightSided?(this._element.style.height=\"\",this._element.style.width=zt(t)):(this._element.style.width=\"\",this._element.style.height=zt(t)),e=this._leftRightSided?this._element.offsetHeight-this._controlsContainerElement.offsetHeight-this._tabControlOffset:this._element.offsetWidth-this._controlsContainerElement.offsetWidth-this._tabControlOffset,this._tabsContainer.updateTabSizes(e,this._getActiveComponentItemEvent())}}handleTabInitiatedComponentRemoveEvent(t){if(this._canRemoveComponent){if(void 0===this._componentRemoveEvent)throw new J(\"HHTCE22294\");this._componentRemoveEvent(t)}}handleTabInitiatedComponentFocusEvent(t){if(void 0===this._componentFocusEvent)throw new J(\"HHTAE22294\");this._componentFocusEvent(t)}handleTabInitiatedDragStartEvent(t,e,i,n){if(this._canRemoveComponent){if(void 0===this._componentDragStartEvent)throw new J(\"HHTDSE22294\");this._componentDragStartEvent(t,e,i,n)}else i.cancelDrag()}processTabDropdownActiveChanged(){void 0!==this._tabDropdownButton&&Dt(this._tabDropdownButton.element,this._tabsContainer.dropdownActive)}handleButtonPopoutEvent(){if(this._layoutManager.layoutConfig.settings.popoutWholeStack){if(void 0===this._popoutEvent)throw new J(\"HHBPOE17834\");this._popoutEvent()}else{const t=this._getActiveComponentItemEvent();t&&t.popout()}}handleButtonMaximiseToggleEvent(t){if(void 0===this._maximiseToggleEvent)throw new J(\"HHBMTE16834\");this._maximiseToggleEvent()}onClick(t){t.target===this._element&&this.notifyClick(t)}onTouchStart(t){t.target===this._element&&this.notifyTouchStart(t)}notifyClick(t){if(void 0===this._clickEvent)throw new J(\"HNHC46834\");this._clickEvent(t)}notifyTouchStart(t){if(void 0===this._touchStartEvent)throw new J(\"HNHTS46834\");this._touchStartEvent(t)}}class ee extends $t{constructor(t,e,i){var n,o,s,r,a,l,h,d,c,m,u,p,g,f,v,_,y,C,w;super(t,e,i,ee.createElement(document)),this._headerSideChanged=!1,this._resizeListener=()=>this.handleResize(),this._maximisedListener=()=>this.handleMaximised(),this._minimisedListener=()=>this.handleMinimised(),this._headerConfig=e.header;const I=t.layoutConfig.header,b=e.content;let S;if(1!==b.length)S=void 0;else{S=b[0].header}this._initialWantMaximise=e.maximised,this._initialActiveItemIndex=null!==(n=e.activeItemIndex)&&void 0!==n?n:0;const E=null!==(r=null!==(s=null===(o=this._headerConfig)||void 0===o?void 0:o.show)&&void 0!==s?s:null==S?void 0:S.show)&&void 0!==r?r:I.show,x=null!==(h=null!==(l=null===(a=this._headerConfig)||void 0===a?void 0:a.popout)&&void 0!==l?l:null==S?void 0:S.popout)&&void 0!==h?h:I.popout,L=null!==(m=null!==(c=null===(d=this._headerConfig)||void 0===d?void 0:d.maximise)&&void 0!==c?c:null==S?void 0:S.maximise)&&void 0!==m?m:I.maximise,z=null!==(g=null!==(p=null===(u=this._headerConfig)||void 0===u?void 0:u.close)&&void 0!==p?p:null==S?void 0:S.close)&&void 0!==g?g:I.close,M=null!==(_=null!==(v=null===(f=this._headerConfig)||void 0===f?void 0:f.minimise)&&void 0!==v?v:null==S?void 0:S.minimise)&&void 0!==_?_:I.minimise,P=null!==(w=null!==(C=null===(y=this._headerConfig)||void 0===y?void 0:y.tabDropdown)&&void 0!==C?C:null==S?void 0:S.tabDropdown)&&void 0!==w?w:I.tabDropdown;this._maximisedEnabled=!1!==L;const T={show:!1!==E,side:!1===E?nt.top:E,popoutEnabled:!1!==x,popoutLabel:!1===x?\"\":x,maximiseEnabled:this._maximisedEnabled,maximiseLabel:!1===L?\"\":L,closeEnabled:!1!==z,closeLabel:!1===z?\"\":z,minimiseEnabled:!0,minimiseLabel:M,tabDropdownEnabled:!1!==P,tabDropdownLabel:!1===P?\"\":P};this._header=new te(t,this,T,e.isClosable&&!1!==z,(()=>this.getActiveComponentItem()),(()=>this.remove()),(()=>this.handlePopoutEvent()),(()=>this.toggleMaximise()),(t=>this.handleHeaderClickEvent(t)),(t=>this.handleHeaderTouchStartEvent(t)),(t=>this.handleHeaderComponentRemoveEvent(t)),(t=>this.handleHeaderComponentFocusEvent(t)),((t,e,i,n)=>this.handleHeaderComponentStartDragEvent(t,e,i,n))),this.isStack=!0,this._childElementContainer=document.createElement(\"section\"),this._childElementContainer.classList.add(\"lm_items\"),this.on(\"resize\",this._resizeListener),this._maximisedEnabled&&(this.on(\"maximised\",this._maximisedListener),this.on(\"minimised\",this._minimisedListener)),this.element.appendChild(this._header.element),this.element.appendChild(this._childElementContainer),this.setupHeaderPosition(),this._header.updateClosability()}get childElementContainer(){return this._childElementContainer}get header(){return this._header}get headerShow(){return this._header.show}get headerSide(){return this._header.side}get headerLeftRightSided(){return this._header.leftRightSided}get contentAreaDimensions(){return this._contentAreaDimensions}get initialWantMaximise(){return this._initialWantMaximise}get isMaximised(){return this===this.layoutManager.maximisedStack}get stackParent(){if(!this.parent)throw new Error(\"Stack should always have a parent\");return this.parent}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}init(){if(!0===this.isInitialised)return;this.updateNodeSize();for(let t=0;t0){if(this._initialActiveItemIndex<0||this._initialActiveItemIndex>=e)throw new Error(`ActiveItemIndex out of range: ${this._initialActiveItemIndex} id: ${this.id}`);for(let i=0;ithis.contentItems.length)throw e-=1,new X(\"SAC99728\");if(t instanceof jt)return e=super.addChild(t,e),this._childElementContainer.appendChild(t.element),this._header.createTab(t,e),this.setActiveComponentItem(t,i),this._header.updateTabSizes(),this.updateSize(!1),t.container.setBaseLogicalZIndex(),this._header.updateClosability(),this.emitStateChangedEvent(),e;throw new X(\"SACC88532\")}removeChild(t,e){const i=t,n=this.contentItems.indexOf(i),o=1===this.contentItems.length;if(this._activeComponentItem===i&&(i.focused&&i.blur(),!o)){const t=0===n?1:n-1;this.setActiveComponentItem(this.contentItems[t],!1)}this._header.removeTab(i),super.removeChild(i,e),o||this._header.updateClosability(),this.emitStateChangedEvent()}toggleMaximise(){this.isMaximised?this.minimise():this.maximise()}maximise(){if(!this.isMaximised){this.layoutManager.setMaximisedStack(this);const t=this.contentItems,e=t.length;for(let i=0;i0&&void 0===t)throw new Error(\"expected non-empty stack to have an active component item\");return{type:\"stack\",content:this.calculateConfigContent(),size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,isClosable:this.isClosable,maximised:this.isMaximised,header:this.createHeaderConfig(),activeItemIndex:t}}onDrop(t,e){if(\"header\"===this._dropSegment){if(this.resetHeaderDropZone(),void 0===this._dropIndex)throw new J(\"SODDI68990\");return void this.addChild(t,this._dropIndex)}if(\"body\"===this._dropSegment)return void this.addChild(t,0,!0);const i=\"top\"===this._dropSegment||\"bottom\"===this._dropSegment,n=\"left\"===this._dropSegment||\"right\"===this._dropSegment,o=\"top\"===this._dropSegment||\"left\"===this._dropSegment,s=i&&this.stackParent.isColumn||n&&this.stackParent.isRow;if(t.isComponent){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createAndInitContentItem(e,this);i.addChild(t),t=i}if(t.type===at.row||t.type===at.column){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}if(s){const e=this.stackParent.contentItems.indexOf(this);this.stackParent.addChild(t,o?e:e+1,!0),this.size*=.5,t.size=this.size,t.sizeUnit=this.sizeUnit,this.stackParent.updateSize(!1)}else{const e=i?at.column:at.row,n=ct.createDefault(e),s=this.layoutManager.createContentItem(n,this);this.stackParent.replaceChild(this,s),s.addChild(t,o?0:void 0,!0),s.addChild(this,o?void 0:0,!0),this.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}highlightDropZone(t,e){for(const i in this._contentAreaDimensions){const n=i,o=this._contentAreaDimensions[n].hoverArea;if(o.x1t&&o.y1e)return void(\"header\"===n?(this._dropSegment=\"header\",this.highlightHeaderDropZone(this._header.leftRightSided?e:t)):(this.resetHeaderDropZone(),this.highlightBodyDropZone(n)))}}getArea(){if(\"none\"===this.element.style.display)return null;const t=super.getElementArea(this._header.element),e=super.getElementArea(this._childElementContainer);if(null===t||null===e)throw new K(\"SGAHC13086\");const i=e.x2-e.x1,n=e.y2-e.y1;return this._contentAreaDimensions={header:{hoverArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2},highlightArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2}}},0===this.contentItems.length?(this._contentAreaDimensions.body={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2}},super.getElementArea(this.element)):(this._contentAreaDimensions.left={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x1+.25*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x1+.5*i,y2:e.y2}},this._contentAreaDimensions.top={hoverArea:{x1:e.x1+.25*i,y1:e.y1,x2:e.x1+.75*i,y2:e.y1+.5*n},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y1+.5*n}},this._contentAreaDimensions.right={hoverArea:{x1:e.x1+.75*i,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1+.5*i,y1:e.y1,x2:e.x2,y2:e.y2}},this._contentAreaDimensions.bottom={hoverArea:{x1:e.x1+.25*i,y1:e.y1+.5*n,x2:e.x1+.75*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1+.5*n,x2:e.x2,y2:e.y2}},super.getElementArea(this.element))}positionHeader(t){this._header.side!==t&&(this._header.setSide(t),this._headerSideChanged=!0,this.setupHeaderPosition())}updateNodeSize(){if(\"none\"!==this.element.style.display){const t=kt(this.element);if(this._header.show){t[this._header.leftRightSided?it.width:it.height]-=this.layoutManager.layoutConfig.dimensions.headerHeight}this._childElementContainer.style.width=zt(t.width),this._childElementContainer.style.height=zt(t.height);for(let e=0;e=o&&tthis.onDrag(t,e,i))),this._dragListener.on(\"dragStop\",(()=>this.onDrop())),this.createDragProxyElements(t,e),null===this._componentItem.parent)throw new K(\"DPC10097\");this._componentItemFocused=this._componentItem.focused,this._componentItemFocused&&this._componentItem.blur(),this._componentItem.parent.removeChild(this._componentItem,!0),this.setDimensions(),document.body.appendChild(this._element),this.determineMinMaxXY(),this._layoutManager.calculateItemAreas(),this.setDropPosition(t,e)}get element(){return this._element}createDragProxyElements(t,e){this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_dragProxy\");const i=document.createElement(\"div\");i.classList.add(\"lm_header\");const n=document.createElement(\"div\");n.classList.add(\"lm_tabs\");const o=document.createElement(\"div\");o.classList.add(\"lm_tab\");const s=document.createElement(\"span\");s.classList.add(\"lm_title\"),o.appendChild(s),n.appendChild(o),i.appendChild(n),this._proxyContainerElement=document.createElement(\"div\"),this._proxyContainerElement.classList.add(\"lm_content\"),this._element.appendChild(i),this._element.appendChild(this._proxyContainerElement),this._originalParent instanceof ee&&this._originalParent.headerShow&&(this._sided=this._originalParent.headerLeftRightSided,this._element.classList.add(\"lm_\"+this._originalParent.headerSide),[nt.right,nt.bottom].indexOf(this._originalParent.headerSide)>=0&&this._proxyContainerElement.insertAdjacentElement(\"afterend\",i)),this._element.style.left=zt(t),this._element.style.top=zt(e),o.setAttribute(\"title\",this._componentItem.title),s.insertAdjacentText(\"afterbegin\",this._componentItem.title),this._proxyContainerElement.appendChild(this._componentItem.element)}determineMinMaxXY(){const t=this._layoutManager.groundItem;if(void 0===t)throw new J(\"DPDMMXY73109\");{const e=t.element.getBoundingClientRect();this._minX=e.left+document.body.scrollLeft,this._minY=e.top+document.body.scrollTop,this._maxX=this._minX+e.width,this._maxY=this._minY+e.height}}onDrag(t,e,i){const n=i.pageX,o=i.pageY;this.setDropPosition(n,o),this._componentItem.drag()}setDropPosition(t,e){this._layoutManager.layoutConfig.settings.constrainDragToContainer&&(t<=this._minX?t=Math.ceil(this._minX):t>=this._maxX&&(t=Math.floor(this._maxX)),e<=this._minY?e=Math.ceil(this._minY):e>=this._maxY&&(e=Math.floor(this._maxY))),this._element.style.left=zt(t),this._element.style.top=zt(e),this._area=this._layoutManager.getArea(t,e),null!==this._area&&(this._lastValidArea=this._area,this._area.contentItem.highlightDropZone(t,e,this._area))}onDrop(){const t=this._layoutManager.dropTargetIndicator;if(null===t)throw new K(\"DPOD30011\");let e;if(t.hide(),this._componentItem.exitDragMode(),null!==this._area)e=this._componentItem,this._area.contentItem.onDrop(e,this._area);else if(null!==this._lastValidArea){e=this._componentItem;this._lastValidArea.contentItem.onDrop(e,this._lastValidArea)}else this._originalParent?(e=this._componentItem,this._originalParent.addChild(e)):this._componentItem.destroy();this._element.remove(),this._layoutManager.emit(\"itemDropped\",this._componentItem),this._componentItemFocused&&void 0!==e&&e.focus()}setDimensions(){const t=this._layoutManager.layoutConfig.dimensions;if(void 0===t)throw new Error(\"DragProxy.setDimensions: dimensions undefined\");let e=t.dragProxyWidth,i=t.dragProxyHeight;if(void 0===e||void 0===i)throw new Error(\"DragProxy.setDimensions: width and/or height undefined\");const n=!1===this._layoutManager.layoutConfig.header.show?0:t.headerHeight;this._element.style.width=zt(e),this._element.style.height=zt(i),e-=this._sided?n:0,i-=this._sided?0:n,this._proxyContainerElement.style.width=zt(e),this._proxyContainerElement.style.height=zt(i),this._componentItem.enterDragMode(e,i),this._componentItem.show()}}class ne{constructor(t,e,i,n,o,s,r){this._layoutManager=t,this._element=e,this._extraAllowableChildTargets=i,this._componentTypeOrFtn=n,this._componentState=o,this._title=s,this._id=r,this._dragListener=null,this._dummyGroundContainer=document.createElement(\"div\");const a=gt.createDefault(\"row\");this._dummyGroundContentItem=new Yt(this._layoutManager,a,this._dummyGroundContainer),this.createDragListener()}destroy(){this.removeDragListener()}createDragListener(){this.removeDragListener(),this._dragListener=new Zt(this._element,this._extraAllowableChildTargets),this._dragListener.on(\"dragStart\",((t,e)=>this.onDragStart(t,e))),this._dragListener.on(\"dragStop\",(()=>this.onDragStop()))}onDragStart(t,e){var i;const n=\"component\";let o;if(\"function\"==typeof this._componentTypeOrFtn){const t=this._componentTypeOrFtn();o=ne.isDragSourceComponentItemConfig(t)?{type:n,componentState:t.state,componentType:t.type,title:null!==(i=t.title)&&void 0!==i?i:this._title}:t}else o={type:n,componentState:this._componentState,componentType:this._componentTypeOrFtn,title:this._title,id:this._id};const s=bt.resolve(o,!1),r=new jt(this._layoutManager,s,this._dummyGroundContentItem);if(this._dummyGroundContentItem.contentItems.push(r),null===this._dragListener)throw new K(\"DSODSD66746\");{const i=new ie(t,e,this._dragListener,this._layoutManager,r,this._dummyGroundContentItem),n=this._layoutManager.transitionIndicator;if(null===n)throw new K(\"DSODST66746\");n.transitionElements(this._element,i.element)}}onDragStop(){this.createDragListener()}removeDragListener(){null!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=null)}}!function(t){t.isDragSourceComponentItemConfig=function(t){return!(\"componentType\"in t)}}(ne||(ne={}));class oe{constructor(){this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_dropTargetIndicator\");const t=document.createElement(\"div\");t.classList.add(\"lm_inner\"),this._element.appendChild(t),document.body.appendChild(this._element)}destroy(){this._element.remove()}highlightArea(t,e){this._element.style.left=zt(t.x1+e),this._element.style.top=zt(t.y1+e),this._element.style.width=zt(t.x2-t.x1-e),this._element.style.height=zt(t.y2-t.y1-e),this._element.style.display=\"block\"}hide(){Dt(this._element,!1)}}class se{constructor(){this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_transition_indicator\"),document.body.appendChild(this._element),this._toElement=null,this._fromDimensions=null,this._totalAnimationDuration=200,this._animationStartTime=null}destroy(){this._element.remove()}transitionElements(t,e){}nextAnimationFrame(){}measure(t){const e=t.getBoundingClientRect();return{left:e.left,top:e.top,width:t.offsetWidth,height:t.offsetHeight}}}class re extends Wt{constructor(t){super(),this._layoutManager=t,this._childEventListener=t=>this.onEventFromChild(t),globalThis.addEventListener(re.ChildEventName,this._childEventListener,{passive:!0})}emit(t,...e){\"userBroadcast\"===t?this.emitUserBroadcast(...e):super.emit(t,...e)}emitUserBroadcast(...t){this.handleUserBroadcastEvent(\"userBroadcast\",t)}destroy(){globalThis.removeEventListener(re.ChildEventName,this._childEventListener)}handleUserBroadcastEvent(t,e){this._layoutManager.isSubWindow?this.propagateToParent(t,e):this.propagateToThisAndSubtree(t,e)}onEventFromChild(t){const e=t.detail;this.handleUserBroadcastEvent(e.eventName,e.args)}propagateToParent(t,e){const i={bubbles:!0,cancelable:!0,detail:{layoutManager:this._layoutManager,eventName:t,args:e}},n=new CustomEvent(re.ChildEventName,i),o=globalThis.opener;if(null===o)throw new K(\"EHPTP15778\");o.dispatchEvent(n)}propagateToThisAndSubtree(t,e){this.emitUnknown(t,...e);for(let i=0;ithis.handleContainerResize())),this._windowBeforeUnloadListener=()=>this.onBeforeUnload(),this._windowBeforeUnloadListening=!1,this._maximisedStackBeforeDestroyedListener=t=>this.cleanupBeforeMaximisedStackDestroyed(t),this.isSubWindow=t.isSubWindow,this._constructorOrSubWindowLayoutConfig=t.constructorOrSubWindowLayoutConfig,Q.checkInitialise(),dt.checkInitialise(),void 0!==t.containerElement&&(this._containerElement=t.containerElement)}get container(){return this._containerElement}get isInitialised(){return this._isInitialised}get groundItem(){return this._groundItem}get root(){return this._groundItem}get openPopouts(){return this._openPopouts}get dropTargetIndicator(){return this._dropTargetIndicator}get transitionIndicator(){return this._transitionIndicator}get width(){return this._width}get height(){return this._height}get eventHub(){return this._eventHub}get rootItem(){if(void 0===this._groundItem)throw new Error(\"Cannot access rootItem before init\");return 0===this._groundItem.contentItems.length?void 0:this._groundItem.contentItems[0]}get focusedComponentItem(){return this._focusedComponentItem}get tabDropPlaceholder(){return this._tabDropPlaceholder}get maximisedStack(){return this._maximisedStack}get deprecatedConstructor(){return!this.isSubWindow&&void 0!==this._constructorOrSubWindowLayoutConfig}destroy(){if(this._isInitialised){this._windowBeforeUnloadListening&&(globalThis.removeEventListener(\"beforeunload\",this._windowBeforeUnloadListener),this._windowBeforeUnloadListening=!1),!0===this.layoutConfig.settings.closePopoutsOnUnload&&this.closeAllOpenPopouts(),this._resizeObserver.disconnect(),this.checkClearResizeTimeout(),void 0!==this._groundItem&&this._groundItem.destroy(),this._tabDropPlaceholder.remove(),null!==this._dropTargetIndicator&&this._dropTargetIndicator.destroy(),null!==this._transitionIndicator&&this._transitionIndicator.destroy(),this._eventHub.destroy();for(const t of this._dragSources)t.destroy();this._dragSources=[],this._isInitialised=!1}}minifyConfig(t){return _t.minifyConfig(t)}unminifyConfig(t){return _t.unminifyConfig(t)}init(){let t;if(this.setContainer(),this._dropTargetIndicator=new oe,this._transitionIndicator=new se,this.updateSizeFromContainer(),this.isSubWindow){if(void 0===this._constructorOrSubWindowLayoutConfig)throw new J(\"LMIU07155\");{const e=this._constructorOrSubWindowLayoutConfig.root;if(void 0===e)throw new X(\"LMIC07156\");if(!Ct.isComponent(e))throw new X(\"LMIC07157\");t=e;const i=xt.resolve(this._constructorOrSubWindowLayoutConfig);this.layoutConfig=Object.assign(Object.assign({},i),{root:void 0})}}else void 0===this._constructorOrSubWindowLayoutConfig?this.layoutConfig=_t.createDefault():this.layoutConfig=xt.resolve(this._constructorOrSubWindowLayoutConfig);const e=this.layoutConfig;this._groundItem=new Yt(this,e.root,this._containerElement),this._groundItem.init(),this.checkLoadedLayoutMaximiseItem(),this._resizeObserver.observe(this._containerElement),this._isInitialised=!0,this.adjustColumnsResponsive(),this.emit(\"initialised\"),void 0!==t&&this.loadComponentAsRoot(t)}loadLayout(t){if(!this.isInitialised)throw new Error(\"GoldenLayout: Need to call init() if LayoutConfig with defined root passed to constructor\");if(void 0===this._groundItem)throw new J(\"LMLL11119\");this.createSubWindows(),this.layoutConfig=xt.resolve(t),this._groundItem.loadRoot(this.layoutConfig.root),this.checkLoadedLayoutMaximiseItem(),this.adjustColumnsResponsive()}saveLayout(){if(!1===this._isInitialised)throw new Error(\"Can't create config, layout not yet initialised\");if(void 0===this._groundItem)throw new J(\"LMTC18244\");{const t=this._groundItem.calculateConfigContent();let e;e=1!==t.length?void 0:t[0],this.reconcilePopoutWindows();const i=[];for(let t=0;t=0?n=this._groundItem.contentItems[0]:e=0;break;case at.row:case at.column:e=n.addItem(t,i.index);break;case at.stack:if(Ct.isComponent(t)){e=n.addItem(t,i.index);break}throw Error(tt[6]);case at.component:throw new X(\"LMAIALC87444602\");default:throw new Y(\"LMAIALU98881733\",n.type)}if(Ct.isComponent(t)){const t=n.contentItems[e];Gt.isStack(t)&&(n=t,e=0)}return i.parentItem=n,i.index=e,i}}}loadComponentAsRoot(t){if(void 0===this._groundItem)throw new Error(\"Cannot add item before init\");this._groundItem.loadComponentAsRoot(t)}updateSize(t,e){this.setSize(t,e)}setSize(t,e){if(this._width=t,this._height=e,!0===this._isInitialised){if(void 0===this._groundItem)throw new J(\"LMUS18881\");if(this._groundItem.setSize(this._width,this._height),this._maximisedStack){const{width:t,height:e}=kt(this._containerElement);Tt(this._maximisedStack.element,t),At(this._maximisedStack.element,e),this._maximisedStack.updateSize(!1)}this.adjustColumnsResponsive()}}beginSizeInvalidation(){this._sizeInvalidationBeginCount++}endSizeInvalidation(){0==--this._sizeInvalidationBeginCount&&this.updateSizeFromContainer()}updateSizeFromContainer(){const{width:t,height:e}=kt(this._containerElement);this.setSize(t,e)}updateRootSize(t=!1){if(void 0===this._groundItem)throw new J(\"LMURS28881\");this._groundItem.updateSize(t)}createAndInitContentItem(t,e){const i=this.createContentItem(t,e);return i.init(),i}createContentItem(t,e){if(\"string\"!=typeof t.type)throw new G(\"Missing parameter 'type'\",JSON.stringify(t));if(ct.isComponentItem(t)&&!(e instanceof ee)&&e&&!(!0===this.isSubWindow&&e instanceof Yt)){t={type:at.stack,content:[t],size:t.size,sizeUnit:t.sizeUnit,minSize:t.minSize,minSizeUnit:t.minSizeUnit,id:t.id,maximised:t.maximised,isClosable:t.isClosable,activeItemIndex:0,header:void 0}}return this.createContentItemFromConfig(t,e)}findFirstComponentItemById(t){if(void 0===this._groundItem)throw new J(\"LMFFCIBI82446\");return this.findFirstContentItemTypeByIdRecursive(at.component,t,this._groundItem)}createPopout(t,e,i,n){return t instanceof Gt?this.createPopoutFromContentItem(t,e,i,n):this.createPopoutFromItemConfig(t,e,i,n)}createPopoutFromContentItem(t,e,i,n){let o=t.parent,s=t;for(;null!==o&&1===o.contentItems.length&&!o.isGround;)s=o,o=o.parent;if(null===o)throw new K(\"LMCPFCI00834\");{if(void 0===n&&(n=o.contentItems.indexOf(s)),null!==i&&o.addPopInParentId(i),void 0===e){const i=globalThis.screenX||globalThis.screenLeft,n=globalThis.screenY||globalThis.screenTop,o=t.element.offsetLeft,s=t.element.offsetTop,{width:r,height:a}=kt(t.element);e={left:i+o,top:n+s,width:r,height:a}}const r=t.toConfig();if(t.remove(),ft.isRootItemConfig(r))return this.createPopoutFromItemConfig(r,e,i,n);throw new Error(`${tt[0]}`)}}beginVirtualSizedContainerAdding(){0==++this._virtualSizedContainerAddingBeginCount&&(this._virtualSizedContainers.length=0)}addVirtualSizedContainer(t){this._virtualSizedContainers.push(t)}endVirtualSizedContainerAdding(){if(0==--this._virtualSizedContainerAddingBeginCount){const t=this._virtualSizedContainers.length;if(t>0){this.fireBeforeVirtualRectingEvent(t);for(let e=0;ethis.emit(\"windowOpened\",a))),a.on(\"closed\",(()=>this.reconcilePopoutWindows())),this._openPopouts.push(a),this.layoutConfig.settings.closePopoutsOnUnload&&!this._windowBeforeUnloadListening&&(globalThis.addEventListener(\"beforeunload\",this._windowBeforeUnloadListener,{passive:!0}),this._windowBeforeUnloadListening=!0),a}closeAllOpenPopouts(){for(let t=0;tglobalThis.close()),1)}getArea(t,e){let i=null,n=1/0;for(let o=0;o=s.x1&&t=s.y1&&es.surface&&(n=s.surface,i=s)}return i}calculateItemAreas(){const t=this.getAllContentItems(),e=this._groundItem;if(void 0===e)throw new J(\"LMCIAR44365\");if(1!==t.length){e.contentItems[0].isStack?this._itemAreas=[]:this._itemAreas=e.createSideAreas();for(let e=0;e0){let e=t[0];if(Gt.isComponentItem(e)){const t=e.parent;if(null===t)throw new K(\"LMXLLMI69999\");e=t}if(!Gt.isStack(e))throw new X(\"LMCLLMI19993\");e.maximise()}}}processMaximiseStack(t){if(this._maximisedStack=t,t.on(\"beforeItemDestroyed\",this._maximisedStackBeforeDestroyedListener),t.element.classList.add(\"lm_maximised\"),t.element.insertAdjacentElement(\"afterend\",this._maximisePlaceholder),void 0===this._groundItem)throw new J(\"LMMXI19993\");{this._groundItem.element.prepend(t.element);const{width:e,height:i}=kt(this._containerElement);Tt(t.element,e),At(t.element,i),t.updateSize(!0),t.focusActiveContentItem(),this._maximisedStack.emit(\"maximised\"),this.emit(\"stateChanged\")}}processMinimiseMaximisedStack(){if(void 0===this._maximisedStack)throw new X(\"LMMMS74422\");{const t=this._maximisedStack;if(null===t.parent)throw new K(\"LMMI13668\");t.element.classList.remove(\"lm_maximised\"),this._maximisePlaceholder.insertAdjacentElement(\"afterend\",t.element),this._maximisePlaceholder.remove(),this.updateRootSize(!0),this._maximisedStack=void 0,t.off(\"beforeItemDestroyed\",this._maximisedStackBeforeDestroyedListener),t.emit(\"minimised\"),this.emit(\"stateChanged\")}}reconcilePopoutWindows(){const t=[];for(let e=0;e{this._resizeTimeoutId=void 0,this.beginSizeInvalidation(),this.endSizeInvalidation()}),this.resizeDebounceInterval))}checkClearResizeTimeout(){void 0!==this._resizeTimeoutId&&(clearTimeout(this._resizeTimeoutId),this._resizeTimeoutId=void 0)}setContainer(){var t;const e=document.body,i=null!==(t=this._containerElement)&&void 0!==t?t:e;if(i===e){this.resizeWithContainerAutomatically=!0;const t=document.documentElement;t.style.height=\"100%\",t.style.margin=\"0\",t.style.padding=\"0\",t.style.overflow=\"clip\",e.style.height=\"100%\",e.style.margin=\"0\",e.style.padding=\"0\",e.style.overflow=\"clip\"}this._containerElement=i}onBeforeUnload(){this.destroy()}adjustColumnsResponsive(){if(void 0===this._groundItem)throw new J(\"LMACR20883\");if(this._firstLoad=!1,this.useResponsiveLayout()&&!this._updatingColumnsResponsive&&this._groundItem.contentItems.length>0&&this._groundItem.contentItems[0].isRow){if(void 0===this._groundItem||null===this._width)throw new J(\"LMACR77412\");{const t=this._groundItem.contentItems[0].contentItems.length;if(t<=1)return;{const e=this.layoutConfig.dimensions.defaultMinItemWidth;if(t*e<=this._width)return;{this._updatingColumnsResponsive=!0;const i=t-Math.max(Math.floor(this._width/e),1),n=this._groundItem.contentItems[0],o=this.getAllStacks();if(0===o.length)throw new X(\"LMACRS77413\");{const t=o[0];for(let e=0;en?void 0:{parentItem:t,index:o}}}case 1:if(void 0===this._focusedComponentItem)return;{const t=this._focusedComponentItem.parentItem;return this.tryCreateLocationFromParentItem(t,e)}case 2:{const t=this.findFirstContentItemType(at.stack);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 3:{let t=this.findFirstContentItemType(at.row);return void 0!==t?this.tryCreateLocationFromParentItem(t,e):(t=this.findFirstContentItemType(at.column),void 0!==t?this.tryCreateLocationFromParentItem(t,e):void 0)}case 4:{const t=this.findFirstContentItemType(at.row);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 5:{const t=this.findFirstContentItemType(at.column);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 6:if(void 0===this._groundItem)throw new J(\"LMFLRIF18244\");return void 0!==this.rootItem?void 0:void 0===e||0===e?{parentItem:this._groundItem,index:0}:void 0;case 7:if(void 0===this._groundItem)throw new J(\"LMFLF18244\");{const t=this._groundItem.contentItems;if(0===t.length)return void 0===e||0===e?{parentItem:this._groundItem,index:0}:void 0;{const i=t[0];return this.tryCreateLocationFromParentItem(i,e)}}}}tryCreateLocationFromParentItem(t,e){const i=t.contentItems.length;return void 0===e?{parentItem:t,index:i}:e<0||e>i?void 0:{parentItem:t,index:e}}}!function(t){t.createMaximisePlaceElement=function(t){const e=t.createElement(\"div\");return e.classList.add(\"lm_maximise_place\"),e},t.createTabDropPlaceholderElement=function(t){const e=t.createElement(\"div\");return e.classList.add(\"lm_drop_tab_placeholder\"),e},t.defaultLocationSelectors=[{typeId:1,index:void 0},{typeId:2,index:void 0},{typeId:3,index:void 0},{typeId:7,index:void 0}],t.afterFocusedItemIfPossibleLocationSelectors=[{typeId:0,index:1},{typeId:2,index:void 0},{typeId:3,index:void 0},{typeId:7,index:void 0}]}(ae||(ae={}));class le extends ae{constructor(t,e,i,n){if(super(le.createLayoutManagerConstructorParameters(t,e)),this._bindComponentEventHanlderPassedInConstructor=!1,this._creationTimeoutPassed=!1,void 0!==e&&\"function\"==typeof e&&(this.bindComponentEvent=e,this._bindComponentEventHanlderPassedInConstructor=!0,void 0!==i&&(this.unbindComponentEvent=i)),!this._bindComponentEventHanlderPassedInConstructor&&this.isSubWindow){if(void 0===this._constructorOrSubWindowLayoutConfig)throw new J(\"VLC98823\");{const t=xt.resolve(this._constructorOrSubWindowLayoutConfig);this.layoutConfig=Object.assign(Object.assign({},t),{root:void 0})}}!0!==n&&(this.deprecatedConstructor||this.init())}destroy(){this.bindComponentEvent=void 0,this.unbindComponentEvent=void 0,super.destroy()}init(){if(this._bindComponentEventHanlderPassedInConstructor||\"loading\"!==document.readyState&&null!==document.body){if(!this._bindComponentEventHanlderPassedInConstructor&&!0===this.isSubWindow&&!this._creationTimeoutPassed)return setTimeout((()=>this.init()),7),void(this._creationTimeoutPassed=!0);!0===this.isSubWindow&&(this._bindComponentEventHanlderPassedInConstructor||this.clearHtmlAndAdjustStylesForSubWindow(),window.__glInstance=this),super.init()}else document.addEventListener(\"DOMContentLoaded\",(()=>this.init()),{passive:!0})}clearHtmlAndAdjustStylesForSubWindow(){const t=document.head,e=new Array(4);e[0]=document.querySelectorAll(\"body link\"),e[1]=document.querySelectorAll(\"body style\"),e[2]=document.querySelectorAll(\"template\"),e[3]=document.querySelectorAll(\".gl_keep\");for(let i=0;ithis.emit(\"popIn\"))),document.body.appendChild(t),!0}}bindComponent(t,e){if(void 0!==this.bindComponentEvent){return this.bindComponentEvent(t,e)}if(void 0!==this.getComponentEvent)return{virtual:!1,component:this.getComponentEvent(t,e)};{const t=`${tt[2]}: ${JSON.stringify(e)}`;throw new Z(t)}}unbindComponent(t,e,i){if(void 0!==this.unbindComponentEvent)this.unbindComponentEvent(t);else if(!e&&void 0!==this.releaseComponentEvent){if(void 0===i)throw new J(\"VCUCRCU333998\");this.releaseComponentEvent(t,i)}}}!function(t){let e=!1;t.createLayoutManagerConstructorParameters=function(t,i){const n=e?null:new URL(document.location.href).searchParams.get(\"gl-window\");e=!0;const o=null!==n;let s,r;if(null!==n){const e=localStorage.getItem(n);if(null===e)throw new Error(\"Null gl-window Config\");localStorage.removeItem(n);const i=JSON.parse(e),o=_t.unminifyConfig(i);r=xt.fromResolved(o),t instanceof HTMLElement&&(s=t)}else void 0===t?r=void 0:t instanceof HTMLElement?(r=void 0,s=t):r=t,void 0===s&&i instanceof HTMLElement&&(s=i);return{constructorOrSubWindowLayoutConfig:r,isSubWindow:o,containerElement:s}}}(le||(le={}));class he extends le{constructor(t,e,i){super(t,e,i,!0),this._componentTypesMap=new Map,this._registeredComponentMap=new Map,this._virtuableComponentMap=new Map,this._containerVirtualRectingRequiredEventListener=(t,e,i)=>this.handleContainerVirtualRectingRequiredEvent(t,e,i),this._containerVirtualVisibilityChangeRequiredEventListener=(t,e)=>this.handleContainerVirtualVisibilityChangeRequiredEvent(t,e),this._containerVirtualZIndexChangeRequiredEventListener=(t,e,i)=>this.handleContainerVirtualZIndexChangeRequiredEvent(t,e,i),this.deprecatedConstructor||this.init()}registerComponent(t,e,i=!1){if(\"function\"!=typeof e)throw new $(\"registerComponent() componentConstructorOrFactoryFtn parameter is not a function\");if(e.hasOwnProperty(\"prototype\")){const n=e;this.registerComponentConstructor(t,n,i)}else{const n=e;this.registerComponentFactoryFunction(t,n,i)}}registerComponentConstructor(t,e,i=!1){if(\"function\"!=typeof e)throw new Error(tt[1]);if(void 0!==this._componentTypesMap.get(t))throw new Z(`${tt[3]}: ${t}`);this._componentTypesMap.set(t,{constructor:e,factoryFunction:void 0,virtual:i})}registerComponentFactoryFunction(t,e,i=!1){if(\"function\"!=typeof e)throw new Z(\"Please register a constructor function\");if(void 0!==this._componentTypesMap.get(t))throw new Z(`${tt[3]}: ${t}`);this._componentTypesMap.set(t,{constructor:void 0,factoryFunction:e,virtual:i})}registerComponentFunction(t){this.registerGetComponentConstructorCallback(t)}registerGetComponentConstructorCallback(t){if(\"function\"!=typeof t)throw new Error(\"Please register a callback function\");void 0!==this._getComponentConstructorFtn&&console.warn(\"Multiple component functions are being registered. Only the final registered function will be used.\"),this._getComponentConstructorFtn=t}getRegisteredComponentTypeNames(){const t=this._componentTypesMap.keys();return Array.from(t)}getComponentInstantiator(t){let e;const i=pt.resolveComponentTypeName(t);return void 0!==i&&(e=this._componentTypesMap.get(i)),void 0===e&&void 0!==this._getComponentConstructorFtn&&(e={constructor:this._getComponentConstructorFtn(t),factoryFunction:void 0,virtual:!1}),e}bindComponent(t,e){let i;const n=pt.resolveComponentTypeName(e);let o;if(void 0!==n&&(i=this._componentTypesMap.get(n)),void 0===i&&void 0!==this._getComponentConstructorFtn&&(i={constructor:this._getComponentConstructorFtn(e),factoryFunction:void 0,virtual:!1}),void 0!==i){const s=i.virtual;let r,a;r=void 0===e.componentState?void 0:Ut({},e.componentState);const l=i.constructor;if(void 0!==l)a=new l(t,r,s);else{const e=i.factoryFunction;if(void 0===e)throw new X(\"LMBCFFU10008\");a=e(t,r,s)}if(s){if(void 0===a)throw new J(\"GLBCVCU988774\");{const e=a,i=e.rootHtmlElement;if(void 0===i)throw new Z(`${tt[5]}: ${n}`);!function(t){const e=\"absolute\";t.style.position!==e&&(t.style.position=e)}(i),this.container.appendChild(i),this._virtuableComponentMap.set(t,e),t.virtualRectingRequiredEvent=this._containerVirtualRectingRequiredEventListener,t.virtualVisibilityChangeRequiredEvent=this._containerVirtualVisibilityChangeRequiredEventListener,t.virtualZIndexChangeRequiredEvent=this._containerVirtualZIndexChangeRequiredEventListener}}this._registeredComponentMap.set(t,a),o={virtual:i.virtual,component:a}}else o=super.bindComponent(t,e);return o}unbindComponent(t,e,i){if(void 0===this._registeredComponentMap.get(t))super.unbindComponent(t,e,i);else{const e=this._virtuableComponentMap.get(t);if(void 0!==e){const i=e.rootHtmlElement;if(void 0===i)throw new X(\"GLUC77743\",t.title);this.container.removeChild(i),this._virtuableComponentMap.delete(t)}}}fireBeforeVirtualRectingEvent(t){this._goldenLayoutBoundingClientRect=this.container.getBoundingClientRect(),super.fireBeforeVirtualRectingEvent(t)}handleContainerVirtualRectingRequiredEvent(t,e,i){const n=this._virtuableComponentMap.get(t);if(void 0===n)throw new J(\"GLHCSCE55933\");{const o=n.rootHtmlElement;if(void 0===o)throw new Z(tt[4]+\" \"+t.title);{const n=t.element.getBoundingClientRect(),s=n.left-this._goldenLayoutBoundingClientRect.left;o.style.left=zt(s);const r=n.top-this._goldenLayoutBoundingClientRect.top;o.style.top=zt(r),Tt(o,e),At(o,i)}}}handleContainerVirtualVisibilityChangeRequiredEvent(t,e){const i=this._virtuableComponentMap.get(t);if(void 0===i)throw new J(\"GLHCVVCRE55934\");{const n=i.rootHtmlElement;if(void 0===n)throw new Z(tt[4]+\" \"+t.title);Dt(n,e)}}handleContainerVirtualZIndexChangeRequiredEvent(t,e,i){const n=this._virtuableComponentMap.get(t);if(void 0===n)throw new J(\"GLHCVZICRE55935\");{const e=n.rootHtmlElement;if(void 0===e)throw new Z(tt[4]+\" \"+t.title);e.style.zIndex=i}}}const de=\"initial_\",ce={show:\"top\",popout:!1,maximise:!1,close:\"close-tab-unused\"},me={headerHeight:31},ue={hasHeaders:!0,reorderEnabled:!0},pe={popoutWholeStack:!1,constrainDragToContainer:!1,constrainDragToHeaders:!1,preventDragout:!1,showMaximiseIcon:!1,showPopoutIcon:!1,showCloseIcon:!1,blockedPopoutsThrowError:!0,closePopoutsOnUnload:!0,selectionEnabled:!1};var ge,fe;class ve{constructor(e){this.layout=e,ge.set(this,void 0),fe.set(this,void 0),this.handleResize=t=>{t.forEach((t=>this.resizeElement(t.target)))},this.handleMutation=()=>{this.layout.viewComponentsByContainerElement.forEach((t=>{this.resizeElement(t.container.element)}))},t.__classPrivateFieldSet(this,ge,new ResizeObserver(this.handleResize),\"f\"),t.__classPrivateFieldSet(this,fe,new MutationObserver(this.handleMutation),\"f\")}observeMutations(e){t.__classPrivateFieldGet(this,fe,\"f\")?.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[\"class\"]})}destroy(){t.__classPrivateFieldGet(this,ge,\"f\").disconnect(),t.__classPrivateFieldGet(this,fe,\"f\").disconnect()}observeContainer(e){t.__classPrivateFieldGet(this,ge,\"f\").observe(e)}unobserveContainer(e){t.__classPrivateFieldGet(this,ge,\"f\").unobserve(e)}resizeElement(t){const e=this.layout.viewComponentsByContainerElement.get(t);e&&e.resize()}}ge=new WeakMap,fe=new WeakMap;var _e={};Object.defineProperty(_e,\"__esModule\",{value:!0});var ye=_e.BaseItem=void 0;class Ce{constructor(t,e,i){this._item=t,this._layout=e,this._wrap=i}get raw(){return this._item}get layout(){return this._layout}get type(){return this._item.type}get contentItems(){return(this._item.contentItems??[]).map((t=>this._wrap(t)))}get parent(){const t=this._item.parent;return t?this._wrap(t):null}setActiveContentItem(t,e){if(\"stack\"!==this.type)throw new Error(`Cannot call setActiveContentItem from a non-stack item: ${this.type}`);this._item.setActiveContentItem(t.raw,e)}static wrapInternal(t,e,i){const n=Ce.wrapCache.get(e);if(n)return n;const o=new t(e,i,(e=>Ce.wrapInternal(t,e,i)));return Ce.wrapCache.set(e,o),o}}ye=_e.BaseItem=Ce,Ce.wrapCache=new WeakMap;const we=t=>!!t&&\"contentItems\"in t&&(t.isRow||t.isColumn);class Ie extends ye{isRoot(){return!!this._item.parent?.isGround}getBounds(){return this._item.element.getBoundingClientRect()}get viewName(){if(this._item.isComponent){const{component:t}=this._item;return t.identity.name}throw new Error(\"View name not found\")}onDestroyed(t){const e=({target:i})=>{i===this._item&&(t(),this._item.off(\"itemDestroyed\",e))};this._item.on(\"itemDestroyed\",e)}createAdjacentStack({position:t=\"right\"}={}){const e=this.raw;if(ee.isStack(e)&&e.parent){const i=[\"top\",\"bottom\"].includes(t)?\"column\":\"row\",n=[\"left\",\"top\"].includes(t)?1:0,o=we(e.parent)?e.parent:e.layoutManager,s=o,r=e.parent.contentItems.indexOf(e);e.parent.isGround&&e.parent.removeChild(e,!0);const a=o.newItem({type:i,content:[{type:\"stack\",content:[]}]},r);if(!a)throw new Error(\"createAdjacentStack: Failed to create new container\");const l=a.contentItems[0];return a.addChild(this.raw,n),we(s)&&s.removeChild(e,!0),this._wrap(l)}throw new Error(`Cannot creat adjacent stacks for type: ${e.type}, must be type 'stack'`)}setActiveContentItem(t,e=!0){if(!ee.isStack(this._item))throw new Error(`Cannot call setActiveContentItem from a non-stack item: ${this.type}`);this._item.setActiveComponentItem(t.raw,!e)}static wrap(t,e){return ye.wrapInternal(Ie,t,e)}}function be(t=[],e){for(const i of t)\"component\"===i.type?Object.keys(e).forEach((t=>{t in i&&(i.componentState={[`${de}${t}`]:i[t],...i.componentState}),i[t]=e[t]})):be(i.content,e)}function Se(t=[],e,i){for(const n of t)if(\"component\"===n.type)Object.keys(e).forEach((t=>{if(`${de}${t}`in n.componentState)return n[t]=n.componentState[`${de}${t}`],void delete n.componentState[`${de}${t}`];n[t]=e[t]}));else{if(n.size&&(\"row\"===i||\"column\"===i)){n[\"row\"===i?\"width\":\"height\"]=n.size?.includes(\".\")?parseFloat(n.size):parseInt(n.size)}Se(n.content,e,n.type)}}function Ee(t){if(t.root){t.root.content&&Se([t.root],{componentName:\"view\",isClosable:!0});const e=t.root;t.content=[e],delete t.root}return t}const xe=e=>class extends e{connectedCallback(){if(!this.name||!this.uuid)throw new Error(\" Name or uuid attribute missing\");if(!this.src)throw new Error(\" missing 'src' attribute.\");this.#t||(this.#t=document.createElement(\"iframe\"),this.#t.src=this.src,this.#t.style.height=\"100%\",this.#t.style.width=\"100%\",this.#t.style.border=\"none\",this.forceFrameName?this.#t.setAttribute(\"name\",this.forceFrameName):this.#t.setAttribute(\"name\",t.encodeOptions({brokerUrl:this.brokerUrl,name:this.name,uuid:this.uuid,providerId:this.providerId,contextGroup:this.contextGroup},\"of-frame\")),this.#t.setAttribute(\"id\",this.name),this.appendChild(this.#t))}#t;get brokerUrl(){return this.getAttribute(\"of-broker\")}set brokerUrl(t){t&&this.setAttribute(\"of-broker\",t)}get name(){return this.getAttribute(\"of-name\")}set name(t){t&&this.setAttribute(\"of-name\",t)}get forceFrameName(){return this.getAttribute(\"forceFrameName\")}set forceFrameName(t){t&&this.setAttribute(\"forceFrameName\",t)}get uuid(){return this.getAttribute(\"of-uuid\")}set uuid(t){t&&this.setAttribute(\"of-uuid\",t)}get src(){return this.getAttribute(\"src\")}set src(t){t&&this.setAttribute(\"src\",t)}get providerId(){return this.getAttribute(\"of-provider-id\")}set providerId(t){t&&this.setAttribute(\"of-provider-id\",t)}get contextGroup(){return this.getAttribute(\"of-context-group\")}set contextGroup(t){t&&this.setAttribute(\"of-context-group\",t)}static get observedAttributes(){return[\"name\"]}};class Le{static create(t){const e=document.createElement(\"of-view\");return Object.entries(t).forEach((([t,i])=>{e.setAttribute(t,i)})),e}}customElements.define(\"of-view\",xe(HTMLElement));class ze{constructor(t,i,n,{brokerUrl:o,interopConfig:s},r){this.container=t,this.config=i,this.ofView=null,this.isDragging=()=>this.container.tab.element?.className.includes(\"lm_dragging\")??!1;const{url:a,web:l,interop:h,name:d}=i||{},c=d??`internal-generated-view-${e.v4()}`;if(this.identity={uuid:n,name:c},this.container.element.setAttribute(\"of-name\",c),this.container.element.id=`container-${c}`,this.container.parent.id=c,void 0===a)return void this.handleUrlMissing();const m=this.updateTitleIfNotSet(a),u={\"of-broker\":o,\"of-uuid\":n,\"of-name\":c,src:a};l?.frameName&&(u.forceFrameName=l.frameName);const p=h?.currentContextGroup??s?.currentContextGroup;p&&(u[\"of-context-group\"]=p),s?.providerId&&(u[\"of-provider-id\"]=s?.providerId),this.ofView=Le.create(u),this.ofView.title=m??`Iframe: ${a}`,r.appendChild(this.ofView),this.ofView.style.position=\"absolute\"}updateTitleIfNotSet(t){return\"view\"===this.container.parent.title&&this.container.parent.setTitle(t),this.container.parent.title}handleUrlMissing(){const t=document.createElement(\"div\");t.setAttribute(\"style\",\"padding: 20px\");t.innerText=\"No URL provided\",this.container.element.appendChild(t)}destroy(){this.ofView?.remove(),this.ofView=null}closeView(){this.container.close()}resize(){if(this.ofView){if(this.isDragging())return void(this.ofView.style.display=\"none\");const t=this.container.element.getBoundingClientRect();this.ofView.style.position=\"absolute\",this.ofView.style.height=`${t.height}px`,this.ofView.style.width=`${t.width}px`,this.ofView.style.inset=`${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`,this.ofView.style.display=\"block\"}}}class Me extends U{static overrideConfig(t){const e={...ue,...t.settings,...pe};return e.reorderEnabled?be(t.content,{isClosable:!0}):be(t.content,{reorderEnabled:!1}),{dimensions:me,...t,settings:e,header:{...ce,show:!1!==t.settings?.hasHeaders&&ce.show}}}constructor(t,e,i,{options:n},o,s){super(),this.identity=t,this.container=e,this.initialConfig=i,this.layoutManager=o,this.platformProvider=s,this.viewComponentsByContainerElement=new Map,this.layoutContentCache=_.getSingleInstance(),this.reparentingViews=new Set,this.goldenLayoutDestroyed=!1,this.createViewComponent=(t,e)=>{m.handleSharedView(this.layoutManager,this.identity,e);const i=new ze(t,e,this.identity.uuid,this.options,this.iframeContainer);return e&&!1===e[`${de}isClosable`]&&this.stylesheet.insertRule(`#tab-${i.identity.name} .lm_close_tab { display: none; }`),this.viewComponentsByContainerElement.set(t.element,i),this.resizeController.observeContainer(t.element),i},this.iframeContainer=document.createElement(\"div\"),this.iframeContainer.id=`openfin-layout-iframe-container-${this.identity.layoutName}`,this.domEmitter=new V(e),this.setupStylesheets(),this.layout=new he(this.container),this.layout.resizeWithContainerAutomatically=!0,this.options=n,this.layout.registerComponent(\"view\",this.createViewComponent),this.setupListeners(),this.resizeController=new ve(this),this.layout.loadLayout(Me.overrideConfig(i));const r=document.createElement(\"div\");r.id=`openfin-layout-shadow-container-${this.identity.layoutName}`,r.attachShadow({mode:\"open\",delegatesFocus:!1}).appendChild(this.iframeContainer),this.container.appendChild(r),this.resizeController.observeMutations(this.container)}getStackByView({name:t}){const e=this.layout.findFirstComponentItemById(t);if(e?.parent&&e?.parent?.isStack)return Ie.wrap(e.parent,this)}getRoot(){return Ie.wrap(this.layout.rootItem,this)}async platformCloseView(t){const e=[...this.viewComponentsByContainerElement.values()].find((e=>e.identity.name===t.name));if(!e)throw new Error(`View with name: ${t.name} not found in layout.`);e.closeView()}async platformCreateView(t,{location:e,targetView:i}={}){if(i)throw new Error(\"TargetView not supported in web\");const n={options:this.platformProvider.normalizeOptions(t),target:this.identity,location:e};return this.insertView(n)}setupStylesheets(){if(this.container.setAttribute(\"data-openfin-layout-name\",this.identity.layoutName),this.stylesheet=new CSSStyleSheet,this.stylesheet.insertRule(\".lm_close { display: none; }\"),document.adoptedStyleSheets.push(this.stylesheet),this.initialConfig.settings?.preventSplitterResize){const t=`\\n [data-openfin-layout-name='${this.identity.layoutName}'] .lm_splitter {\\n pointer-events: none;\\n }`;this.stylesheet.insertRule(t)}}insertView({options:t,location:e,targetView:i}){const n=e?this.layoutContentCache.getItemOrUndefined(e.id):void 0,o=i?this.layoutContentCache.getItemOrUndefined(i.name):void 0,s=n??o??Ie.wrap(this.layout.rootItem,this);let r;if(ee.isStack(s.raw))r=s.raw;else{if(!we(s.raw))throw new Error(\"Cannot add a view at the requested location\");r=s.raw.newItem({type:\"stack\",content:[]})}const a=Math.min(r.contentItems.length,e?.index??r.contentItems.length);let l=this.layout.findFirstComponentItemById(t.name);l?(l.parent&&l.parent.removeChild(l,!0),r.addChild(l,a)):l=r.newComponent(\"view\",t,t.title??t.url??\"Default Title\",a);const h=l.component.identity;return Promise.resolve({identity:h})}replaceView({viewToReplace:t,newView:e}){throw new Error(\"Method not implemented.\")}replaceLayout(t){throw new Error(\"Method not implemented.\")}async cleanupView(t){}applyPreset(t){throw new Error(\"Method not implemented.\")}getCurrentViews(){return[...this.viewComponentsByContainerElement.values()].map((t=>t.identity))}async getFrameSnapshot(){return Ee(xt.fromResolved(this.layout.toConfig()))}isVisible(){return W(this.container)}async onViewDetached({viewIdentity:t}){this.reparentingViews.add(t.name),this.platformCloseView(t)}async destroy(){this.goldenLayoutDestroyed||(this.goldenLayoutDestroyed=!0,this.layout.destroy()),this.iframeContainer.remove(),this.resizeController.destroy(),document.adoptedStyleSheets=document.adoptedStyleSheets.filter((t=>t!==this.stylesheet)),this.viewComponentsByContainerElement.clear()}setupListeners(){this.container.addEventListener(\"pointerdown\",(t=>{if(t.target instanceof HTMLElement){const e=t.target.classList;[\"lm_tab\",\"lm_title\",\"lm_splitter\",\"lm_drag_handle\"].some((t=>e.contains(t)))&&(this.handleDragStart(),2===t.button&&t.stopPropagation())}}),!0),document.addEventListener(\"pointerup\",(()=>this.handleDragEnd()),!0),this.layout.on(\"tabCreated\",(t=>{const e=t.componentItem.component;t.element.id=`tab-${e.identity.name}`,this.domEmitter.dispatchLocalEvent(\"tab-created\",e.identity)})),this.layout.on(\"itemCreated\",(({target:t})=>{const e=t;if(Gt.isComponentItem(e)){const t=e.component;this.domEmitter.dispatchLocalEvent(\"container-created\",t.identity)}})),this.layout.on(\"itemDestroyed\",(t=>{const e=t.target;if(Gt.isComponentItem(e)){const t=e.component;this.removeViewComponent(t)}})),this.layout.on(\"itemDropped\",(()=>{this.handleDragEnd()}))}handleDragStart(){this.iframeContainer.style.pointerEvents=\"none\"}handleDragEnd(){this.iframeContainer.style.pointerEvents=\"\"}removeViewComponent(t){if(t.config&&!1===t.config[`${de}isClosable`]){const e=[...this.stylesheet.cssRules].findIndex((e=>e.cssText.includes(`#tab-${t.identity.name}`)));this.stylesheet.deleteRule(e)}t.destroy(),this.viewComponentsByContainerElement.delete(t.container.element),this.resizeController.unobserveContainer(t.container.element),this.reparentingViews.has(t.identity.name)?this.reparentingViews.delete(t.identity.name):this.platformProvider.closeView(t.identity.name);0===this.getCurrentViews().length&&(this.goldenLayoutDestroyed||(this.goldenLayoutDestroyed=!0,m.handleLastViewRemoved(this.layoutManager,this.identity)))}}class Pe{constructor(t,e,i,n){this.windowIdentity=t,this.connectConfig=e,this.provider=i,this.fallbackContainer=n}async createLayout(t,e){if(!(\"container\"in t)&&!this.fallbackContainer)throw new Error(\"Container property is not optional in web\");const{layoutName:i}=t,n=t,o=this.provider.initLayoutViews(n),s=n.container??this.fallbackContainer,r={...this.windowIdentity,layoutName:i},a=new Me(r,s,o,this.connectConfig,e,this.provider);m.registerLayout(e,i,a),this.fallbackContainer=null}async getLayoutSnapshot(t){return t.getLayoutSnapshot()}async handleLastViewRemoved(t){}}class Te{static async init(e){const i=e.getFin().InterApplicationBus.Channel,n=await i.create(`custom-frame-${e.me.uuid}`);return n.setDefaultAction((async(t,{target:e,opts:i},o)=>{const s=n.connections.find((t=>t.name===e.name));if(s)return n.dispatch(s,t,{...i,target:e});throw new Error(`Client with name ${e.name} not found`)})),await t.relayChannelClientApi_1(n,\"layout-relay\"),new Te(e)}constructor(t){this.wire=t,this.viewNames=new Set}normalizeOptions(t,i=\"default\"){const n=this.wire.me.uuid;let{name:o=`internal-generated-view-${e.v4()}`}=t;return o.match(/^internal-generated-view-/)&&this.viewNames.has(o)&&\"duplicate\"===i&&(o=`internal-generated-view-${e.v4()}`),this.viewNames.add(o),{...t,name:o,uuid:n}}closeView(t){this.viewNames.delete(t)}initLayoutViews({layout:t,multiInstanceViewBehavior:e}){return H((t=>{if(\"component\"===t.type&&t.componentState){const i=this.normalizeOptions(t.componentState,e);return{...t,componentState:i}}return t}),t)}}var Ae;const ke=t=>t;Ae=new WeakMap,exports.WebLayoutEntryPoint=class{constructor(e){Ae.set(this,void 0),this.initLayoutManager=async(e,i,{container:n,layoutManagerOverride:o})=>{const s=await Te.init(i),r=o??ke,a=new Pe(i.me,t.__classPrivateFieldGet(this,Ae,\"f\"),s,n),l=new(r(m.createClosedConstructor(a)));return await M(i,l),l},this.applyLayoutSnapshot=async(e,i,n)=>{await i.applyLayoutSnapshot(t.__classPrivateFieldGet(this,Ae,\"f\").platform.layoutSnapshot)},this.createLayout=async(t,e)=>m.createLayout(t,e),this.destroyLayout=async(t,e)=>m.destroyLayout(t,e),t.__classPrivateFieldSet(this,Ae,e,\"f\")}};\n","'use strict'\n\nexports.byteLength = byteLength\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\nfor (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i]\n revLookup[code.charCodeAt(i)] = i\n}\n\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction getLens (b64) {\n var len = b64.length\n\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // Trim off extra bytes after placeholder bytes are found\n // See: https://github.com/beatgammit/base64-js/issues/42\n var validLen = b64.indexOf('=')\n if (validLen === -1) validLen = len\n\n var placeHoldersLen = validLen === len\n ? 0\n : 4 - (validLen % 4)\n\n return [validLen, placeHoldersLen]\n}\n\n// base64 is 4/3 + up to two characters of the original data\nfunction byteLength (b64) {\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction _byteLength (b64, validLen, placeHoldersLen) {\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction toByteArray (b64) {\n var tmp\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n\n var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))\n\n var curByte = 0\n\n // if there are placeholders, only get up to the last complete 4 chars\n var len = placeHoldersLen > 0\n ? validLen - 4\n : validLen\n\n var i\n for (i = 0; i < len; i += 4) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 18) |\n (revLookup[b64.charCodeAt(i + 1)] << 12) |\n (revLookup[b64.charCodeAt(i + 2)] << 6) |\n revLookup[b64.charCodeAt(i + 3)]\n arr[curByte++] = (tmp >> 16) & 0xFF\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 2) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 2) |\n (revLookup[b64.charCodeAt(i + 1)] >> 4)\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 1) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 10) |\n (revLookup[b64.charCodeAt(i + 1)] << 4) |\n (revLookup[b64.charCodeAt(i + 2)] >> 2)\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] +\n lookup[num >> 12 & 0x3F] +\n lookup[num >> 6 & 0x3F] +\n lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n var tmp\n var output = []\n for (var i = start; i < end; i += 3) {\n tmp =\n ((uint8[i] << 16) & 0xFF0000) +\n ((uint8[i + 1] << 8) & 0xFF00) +\n (uint8[i + 2] & 0xFF)\n output.push(tripletToBase64(tmp))\n }\n return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n var tmp\n var len = uint8.length\n var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n var parts = []\n var maxChunkLength = 16383 // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1]\n parts.push(\n lookup[tmp >> 2] +\n lookup[(tmp << 4) & 0x3F] +\n '=='\n )\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + uint8[len - 1]\n parts.push(\n lookup[tmp >> 10] +\n lookup[(tmp >> 4) & 0x3F] +\n lookup[(tmp << 2) & 0x3F] +\n '='\n )\n }\n\n return parts.join('')\n}\n","/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n/* eslint-disable no-proto */\n\n'use strict'\n\nconst base64 = require('base64-js')\nconst ieee754 = require('ieee754')\nconst customInspectSymbol =\n (typeof Symbol === 'function' && typeof Symbol['for'] === 'function') // eslint-disable-line dot-notation\n ? Symbol['for']('nodejs.util.inspect.custom') // eslint-disable-line dot-notation\n : null\n\nexports.Buffer = Buffer\nexports.SlowBuffer = SlowBuffer\nexports.INSPECT_MAX_BYTES = 50\n\nconst K_MAX_LENGTH = 0x7fffffff\nexports.kMaxLength = K_MAX_LENGTH\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Print warning and recommend using `buffer` v4.x which has an Object\n * implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * We report that the browser does not support typed arrays if the are not subclassable\n * using __proto__. Firefox 4-29 lacks support for adding new properties to `Uint8Array`\n * (See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438). IE 10 lacks support\n * for __proto__ and has a buggy typed array implementation.\n */\nBuffer.TYPED_ARRAY_SUPPORT = typedArraySupport()\n\nif (!Buffer.TYPED_ARRAY_SUPPORT && typeof console !== 'undefined' &&\n typeof console.error === 'function') {\n console.error(\n 'This browser lacks typed array (Uint8Array) support which is required by ' +\n '`buffer` v5.x. Use `buffer` v4.x if you require old browser support.'\n )\n}\n\nfunction typedArraySupport () {\n // Can typed array instances can be augmented?\n try {\n const arr = new Uint8Array(1)\n const proto = { foo: function () { return 42 } }\n Object.setPrototypeOf(proto, Uint8Array.prototype)\n Object.setPrototypeOf(arr, proto)\n return arr.foo() === 42\n } catch (e) {\n return false\n }\n}\n\nObject.defineProperty(Buffer.prototype, 'parent', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.buffer\n }\n})\n\nObject.defineProperty(Buffer.prototype, 'offset', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.byteOffset\n }\n})\n\nfunction createBuffer (length) {\n if (length > K_MAX_LENGTH) {\n throw new RangeError('The value \"' + length + '\" is invalid for option \"size\"')\n }\n // Return an augmented `Uint8Array` instance\n const buf = new Uint8Array(length)\n Object.setPrototypeOf(buf, Buffer.prototype)\n return buf\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new TypeError(\n 'The \"string\" argument must be of type string. Received type number'\n )\n }\n return allocUnsafe(arg)\n }\n return from(arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\nfunction from (value, encodingOrOffset, length) {\n if (typeof value === 'string') {\n return fromString(value, encodingOrOffset)\n }\n\n if (ArrayBuffer.isView(value)) {\n return fromArrayView(value)\n }\n\n if (value == null) {\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n }\n\n if (isInstance(value, ArrayBuffer) ||\n (value && isInstance(value.buffer, ArrayBuffer))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof SharedArrayBuffer !== 'undefined' &&\n (isInstance(value, SharedArrayBuffer) ||\n (value && isInstance(value.buffer, SharedArrayBuffer)))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof value === 'number') {\n throw new TypeError(\n 'The \"value\" argument must not be of type number. Received type number'\n )\n }\n\n const valueOf = value.valueOf && value.valueOf()\n if (valueOf != null && valueOf !== value) {\n return Buffer.from(valueOf, encodingOrOffset, length)\n }\n\n const b = fromObject(value)\n if (b) return b\n\n if (typeof Symbol !== 'undefined' && Symbol.toPrimitive != null &&\n typeof value[Symbol.toPrimitive] === 'function') {\n return Buffer.from(value[Symbol.toPrimitive]('string'), encodingOrOffset, length)\n }\n\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n return from(value, encodingOrOffset, length)\n}\n\n// Note: Change prototype *after* Buffer.from is defined to workaround Chrome bug:\n// https://github.com/feross/buffer/pull/148\nObject.setPrototypeOf(Buffer.prototype, Uint8Array.prototype)\nObject.setPrototypeOf(Buffer, Uint8Array)\n\nfunction assertSize (size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be of type number')\n } else if (size < 0) {\n throw new RangeError('The value \"' + size + '\" is invalid for option \"size\"')\n }\n}\n\nfunction alloc (size, fill, encoding) {\n assertSize(size)\n if (size <= 0) {\n return createBuffer(size)\n }\n if (fill !== undefined) {\n // Only pay attention to encoding if it's a string. This\n // prevents accidentally sending in a number that would\n // be interpreted as a start offset.\n return typeof encoding === 'string'\n ? createBuffer(size).fill(fill, encoding)\n : createBuffer(size).fill(fill)\n }\n return createBuffer(size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n return alloc(size, fill, encoding)\n}\n\nfunction allocUnsafe (size) {\n assertSize(size)\n return createBuffer(size < 0 ? 0 : checked(size) | 0)\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n return allocUnsafe(size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n return allocUnsafe(size)\n}\n\nfunction fromString (string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8'\n }\n\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n\n const length = byteLength(string, encoding) | 0\n let buf = createBuffer(length)\n\n const actual = buf.write(string, encoding)\n\n if (actual !== length) {\n // Writing a hex string, for example, that contains invalid characters will\n // cause everything after the first invalid character to be ignored. (e.g.\n // 'abxxcd' will be treated as 'ab')\n buf = buf.slice(0, actual)\n }\n\n return buf\n}\n\nfunction fromArrayLike (array) {\n const length = array.length < 0 ? 0 : checked(array.length) | 0\n const buf = createBuffer(length)\n for (let i = 0; i < length; i += 1) {\n buf[i] = array[i] & 255\n }\n return buf\n}\n\nfunction fromArrayView (arrayView) {\n if (isInstance(arrayView, Uint8Array)) {\n const copy = new Uint8Array(arrayView)\n return fromArrayBuffer(copy.buffer, copy.byteOffset, copy.byteLength)\n }\n return fromArrayLike(arrayView)\n}\n\nfunction fromArrayBuffer (array, byteOffset, length) {\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\"offset\" is outside of buffer bounds')\n }\n\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\"length\" is outside of buffer bounds')\n }\n\n let buf\n if (byteOffset === undefined && length === undefined) {\n buf = new Uint8Array(array)\n } else if (length === undefined) {\n buf = new Uint8Array(array, byteOffset)\n } else {\n buf = new Uint8Array(array, byteOffset, length)\n }\n\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(buf, Buffer.prototype)\n\n return buf\n}\n\nfunction fromObject (obj) {\n if (Buffer.isBuffer(obj)) {\n const len = checked(obj.length) | 0\n const buf = createBuffer(len)\n\n if (buf.length === 0) {\n return buf\n }\n\n obj.copy(buf, 0, 0, len)\n return buf\n }\n\n if (obj.length !== undefined) {\n if (typeof obj.length !== 'number' || numberIsNaN(obj.length)) {\n return createBuffer(0)\n }\n return fromArrayLike(obj)\n }\n\n if (obj.type === 'Buffer' && Array.isArray(obj.data)) {\n return fromArrayLike(obj.data)\n }\n}\n\nfunction checked (length) {\n // Note: cannot use `length < K_MAX_LENGTH` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= K_MAX_LENGTH) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + K_MAX_LENGTH.toString(16) + ' bytes')\n }\n return length | 0\n}\n\nfunction SlowBuffer (length) {\n if (+length != length) { // eslint-disable-line eqeqeq\n length = 0\n }\n return Buffer.alloc(+length)\n}\n\nBuffer.isBuffer = function isBuffer (b) {\n return b != null && b._isBuffer === true &&\n b !== Buffer.prototype // so Buffer.isBuffer(Buffer.prototype) will be false\n}\n\nBuffer.compare = function compare (a, b) {\n if (isInstance(a, Uint8Array)) a = Buffer.from(a, a.offset, a.byteLength)\n if (isInstance(b, Uint8Array)) b = Buffer.from(b, b.offset, b.byteLength)\n if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n throw new TypeError(\n 'The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array'\n )\n }\n\n if (a === b) return 0\n\n let x = a.length\n let y = b.length\n\n for (let i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i]\n y = b[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n switch (String(encoding).toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'latin1':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return true\n default:\n return false\n }\n}\n\nBuffer.concat = function concat (list, length) {\n if (!Array.isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n\n if (list.length === 0) {\n return Buffer.alloc(0)\n }\n\n let i\n if (length === undefined) {\n length = 0\n for (i = 0; i < list.length; ++i) {\n length += list[i].length\n }\n }\n\n const buffer = Buffer.allocUnsafe(length)\n let pos = 0\n for (i = 0; i < list.length; ++i) {\n let buf = list[i]\n if (isInstance(buf, Uint8Array)) {\n if (pos + buf.length > buffer.length) {\n if (!Buffer.isBuffer(buf)) buf = Buffer.from(buf)\n buf.copy(buffer, pos)\n } else {\n Uint8Array.prototype.set.call(\n buffer,\n buf,\n pos\n )\n }\n } else if (!Buffer.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n } else {\n buf.copy(buffer, pos)\n }\n pos += buf.length\n }\n return buffer\n}\n\nfunction byteLength (string, encoding) {\n if (Buffer.isBuffer(string)) {\n return string.length\n }\n if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) {\n return string.byteLength\n }\n if (typeof string !== 'string') {\n throw new TypeError(\n 'The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. ' +\n 'Received type ' + typeof string\n )\n }\n\n const len = string.length\n const mustMatch = (arguments.length > 2 && arguments[2] === true)\n if (!mustMatch && len === 0) return 0\n\n // Use a for loop to avoid recursion\n let loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'ascii':\n case 'latin1':\n case 'binary':\n return len\n case 'utf8':\n case 'utf-8':\n return utf8ToBytes(string).length\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return len * 2\n case 'hex':\n return len >>> 1\n case 'base64':\n return base64ToBytes(string).length\n default:\n if (loweredCase) {\n return mustMatch ? -1 : utf8ToBytes(string).length // assume utf8\n }\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n let loweredCase = false\n\n // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n // property of a typed array.\n\n // This behaves neither like String nor Uint8Array in that we set start/end\n // to their upper/lower bounds if the value passed is out of range.\n // undefined is handled specially as per ECMA-262 6th Edition,\n // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n if (start === undefined || start < 0) {\n start = 0\n }\n // Return early if start > this.length. Done here to prevent potential uint32\n // coercion fail below.\n if (start > this.length) {\n return ''\n }\n\n if (end === undefined || end > this.length) {\n end = this.length\n }\n\n if (end <= 0) {\n return ''\n }\n\n // Force coercion to uint32. This will also coerce falsey/NaN values to 0.\n end >>>= 0\n start >>>= 0\n\n if (end <= start) {\n return ''\n }\n\n if (!encoding) encoding = 'utf8'\n\n while (true) {\n switch (encoding) {\n case 'hex':\n return hexSlice(this, start, end)\n\n case 'utf8':\n case 'utf-8':\n return utf8Slice(this, start, end)\n\n case 'ascii':\n return asciiSlice(this, start, end)\n\n case 'latin1':\n case 'binary':\n return latin1Slice(this, start, end)\n\n case 'base64':\n return base64Slice(this, start, end)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return utf16leSlice(this, start, end)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = (encoding + '').toLowerCase()\n loweredCase = true\n }\n }\n}\n\n// This property is used by `Buffer.isBuffer` (and the `is-buffer` npm package)\n// to detect a Buffer instance. It's not possible to use `instanceof Buffer`\n// reliably in a browserify context because there could be multiple different\n// copies of the 'buffer' package in use. This method works even for Buffer\n// instances that were created from another copy of the `buffer` package.\n// See: https://github.com/feross/buffer/issues/154\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n const i = b[n]\n b[n] = b[m]\n b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n const len = this.length\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits')\n }\n for (let i = 0; i < len; i += 2) {\n swap(this, i, i + 1)\n }\n return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n const len = this.length\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits')\n }\n for (let i = 0; i < len; i += 4) {\n swap(this, i, i + 3)\n swap(this, i + 1, i + 2)\n }\n return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n const len = this.length\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits')\n }\n for (let i = 0; i < len; i += 8) {\n swap(this, i, i + 7)\n swap(this, i + 1, i + 6)\n swap(this, i + 2, i + 5)\n swap(this, i + 3, i + 4)\n }\n return this\n}\n\nBuffer.prototype.toString = function toString () {\n const length = this.length\n if (length === 0) return ''\n if (arguments.length === 0) return utf8Slice(this, 0, length)\n return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.toLocaleString = Buffer.prototype.toString\n\nBuffer.prototype.equals = function equals (b) {\n if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n if (this === b) return true\n return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n let str = ''\n const max = exports.INSPECT_MAX_BYTES\n str = this.toString('hex', 0, max).replace(/(.{2})/g, '$1 ').trim()\n if (this.length > max) str += ' ... '\n return ''\n}\nif (customInspectSymbol) {\n Buffer.prototype[customInspectSymbol] = Buffer.prototype.inspect\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n if (isInstance(target, Uint8Array)) {\n target = Buffer.from(target, target.offset, target.byteLength)\n }\n if (!Buffer.isBuffer(target)) {\n throw new TypeError(\n 'The \"target\" argument must be one of type Buffer or Uint8Array. ' +\n 'Received type ' + (typeof target)\n )\n }\n\n if (start === undefined) {\n start = 0\n }\n if (end === undefined) {\n end = target ? target.length : 0\n }\n if (thisStart === undefined) {\n thisStart = 0\n }\n if (thisEnd === undefined) {\n thisEnd = this.length\n }\n\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError('out of range index')\n }\n\n if (thisStart >= thisEnd && start >= end) {\n return 0\n }\n if (thisStart >= thisEnd) {\n return -1\n }\n if (start >= end) {\n return 1\n }\n\n start >>>= 0\n end >>>= 0\n thisStart >>>= 0\n thisEnd >>>= 0\n\n if (this === target) return 0\n\n let x = thisEnd - thisStart\n let y = end - start\n const len = Math.min(x, y)\n\n const thisCopy = this.slice(thisStart, thisEnd)\n const targetCopy = target.slice(start, end)\n\n for (let i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i]\n y = targetCopy[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (numberIsNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [val], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n let indexSize = 1\n let arrLength = arr.length\n let valLength = val.length\n\n if (encoding !== undefined) {\n encoding = String(encoding).toLowerCase()\n if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n encoding === 'utf16le' || encoding === 'utf-16le') {\n if (arr.length < 2 || val.length < 2) {\n return -1\n }\n indexSize = 2\n arrLength /= 2\n valLength /= 2\n byteOffset /= 2\n }\n }\n\n function read (buf, i) {\n if (indexSize === 1) {\n return buf[i]\n } else {\n return buf.readUInt16BE(i * indexSize)\n }\n }\n\n let i\n if (dir) {\n let foundIndex = -1\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1) foundIndex = i\n if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n } else {\n if (foundIndex !== -1) i -= i - foundIndex\n foundIndex = -1\n }\n }\n } else {\n if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n for (i = byteOffset; i >= 0; i--) {\n let found = true\n for (let j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false\n break\n }\n }\n if (found) return i\n }\n }\n\n return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n offset = Number(offset) || 0\n const remaining = buf.length - offset\n if (!length) {\n length = remaining\n } else {\n length = Number(length)\n if (length > remaining) {\n length = remaining\n }\n }\n\n const strLen = string.length\n\n if (length > strLen / 2) {\n length = strLen / 2\n }\n let i\n for (i = 0; i < length; ++i) {\n const parsed = parseInt(string.substr(i * 2, 2), 16)\n if (numberIsNaN(parsed)) return i\n buf[offset + i] = parsed\n }\n return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n // Buffer#write(string)\n if (offset === undefined) {\n encoding = 'utf8'\n length = this.length\n offset = 0\n // Buffer#write(string, encoding)\n } else if (length === undefined && typeof offset === 'string') {\n encoding = offset\n length = this.length\n offset = 0\n // Buffer#write(string, offset[, length][, encoding])\n } else if (isFinite(offset)) {\n offset = offset >>> 0\n if (isFinite(length)) {\n length = length >>> 0\n if (encoding === undefined) encoding = 'utf8'\n } else {\n encoding = length\n length = undefined\n }\n } else {\n throw new Error(\n 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n )\n }\n\n const remaining = this.length - offset\n if (length === undefined || length > remaining) length = remaining\n\n if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n throw new RangeError('Attempt to write outside buffer bounds')\n }\n\n if (!encoding) encoding = 'utf8'\n\n let loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'hex':\n return hexWrite(this, string, offset, length)\n\n case 'utf8':\n case 'utf-8':\n return utf8Write(this, string, offset, length)\n\n case 'ascii':\n case 'latin1':\n case 'binary':\n return asciiWrite(this, string, offset, length)\n\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return base64Write(this, string, offset, length)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return ucs2Write(this, string, offset, length)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0)\n }\n}\n\nfunction base64Slice (buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf)\n } else {\n return base64.fromByteArray(buf.slice(start, end))\n }\n}\n\nfunction utf8Slice (buf, start, end) {\n end = Math.min(buf.length, end)\n const res = []\n\n let i = start\n while (i < end) {\n const firstByte = buf[i]\n let codePoint = null\n let bytesPerSequence = (firstByte > 0xEF)\n ? 4\n : (firstByte > 0xDF)\n ? 3\n : (firstByte > 0xBF)\n ? 2\n : 1\n\n if (i + bytesPerSequence <= end) {\n let secondByte, thirdByte, fourthByte, tempCodePoint\n\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 0x80) {\n codePoint = firstByte\n }\n break\n case 2:\n secondByte = buf[i + 1]\n if ((secondByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n if (tempCodePoint > 0x7F) {\n codePoint = tempCodePoint\n }\n }\n break\n case 3:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n codePoint = tempCodePoint\n }\n }\n break\n case 4:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n fourthByte = buf[i + 3]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n codePoint = tempCodePoint\n }\n }\n }\n }\n\n if (codePoint === null) {\n // we did not generate a valid codePoint so insert a\n // replacement char (U+FFFD) and advance only 1 byte\n codePoint = 0xFFFD\n bytesPerSequence = 1\n } else if (codePoint > 0xFFFF) {\n // encode to utf16 (surrogate pair dance)\n codePoint -= 0x10000\n res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n codePoint = 0xDC00 | codePoint & 0x3FF\n }\n\n res.push(codePoint)\n i += bytesPerSequence\n }\n\n return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nconst MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n const len = codePoints.length\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n }\n\n // Decode in chunks to avoid \"call stack size exceeded\".\n let res = ''\n let i = 0\n while (i < len) {\n res += String.fromCharCode.apply(\n String,\n codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n )\n }\n return res\n}\n\nfunction asciiSlice (buf, start, end) {\n let ret = ''\n end = Math.min(buf.length, end)\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F)\n }\n return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n let ret = ''\n end = Math.min(buf.length, end)\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i])\n }\n return ret\n}\n\nfunction hexSlice (buf, start, end) {\n const len = buf.length\n\n if (!start || start < 0) start = 0\n if (!end || end < 0 || end > len) end = len\n\n let out = ''\n for (let i = start; i < end; ++i) {\n out += hexSliceLookupTable[buf[i]]\n }\n return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n const bytes = buf.slice(start, end)\n let res = ''\n // If bytes.length is odd, the last 8 bits must be ignored (same as node.js)\n for (let i = 0; i < bytes.length - 1; i += 2) {\n res += String.fromCharCode(bytes[i] + (bytes[i + 1] * 256))\n }\n return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n const len = this.length\n start = ~~start\n end = end === undefined ? len : ~~end\n\n if (start < 0) {\n start += len\n if (start < 0) start = 0\n } else if (start > len) {\n start = len\n }\n\n if (end < 0) {\n end += len\n if (end < 0) end = 0\n } else if (end > len) {\n end = len\n }\n\n if (end < start) end = start\n\n const newBuf = this.subarray(start, end)\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(newBuf, Buffer.prototype)\n\n return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUintLE =\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let val = this[offset]\n let mul = 1\n let i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUintBE =\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n checkOffset(offset, byteLength, this.length)\n }\n\n let val = this[offset + --byteLength]\n let mul = 1\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUint8 =\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n return this[offset]\n}\n\nBuffer.prototype.readUint16LE =\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUint16BE =\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUint32LE =\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return ((this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16)) +\n (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUint32BE =\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] * 0x1000000) +\n ((this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n this[offset + 3])\n}\n\nBuffer.prototype.readBigUInt64LE = defineBigIntMethod(function readBigUInt64LE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const lo = first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24\n\n const hi = this[++offset] +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n last * 2 ** 24\n\n return BigInt(lo) + (BigInt(hi) << BigInt(32))\n})\n\nBuffer.prototype.readBigUInt64BE = defineBigIntMethod(function readBigUInt64BE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const hi = first * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset]\n\n const lo = this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last\n\n return (BigInt(hi) << BigInt(32)) + BigInt(lo)\n})\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let val = this[offset]\n let mul = 1\n let i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let i = byteLength\n let mul = 1\n let val = this[offset + --i]\n while (i > 0 && (mul *= 0x100)) {\n val += this[offset + --i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n if (!(this[offset] & 0x80)) return (this[offset])\n return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n const val = this[offset] | (this[offset + 1] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n const val = this[offset + 1] | (this[offset] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16) |\n (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] << 24) |\n (this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n (this[offset + 3])\n}\n\nBuffer.prototype.readBigInt64LE = defineBigIntMethod(function readBigInt64LE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const val = this[offset + 4] +\n this[offset + 5] * 2 ** 8 +\n this[offset + 6] * 2 ** 16 +\n (last << 24) // Overflow\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24)\n})\n\nBuffer.prototype.readBigInt64BE = defineBigIntMethod(function readBigInt64BE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const val = (first << 24) + // Overflow\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset]\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last)\n})\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUintLE =\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n let mul = 1\n let i = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUintBE =\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n let i = byteLength - 1\n let mul = 1\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUint8 =\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeUint16LE =\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeUint16BE =\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeUint32LE =\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset + 3] = (value >>> 24)\n this[offset + 2] = (value >>> 16)\n this[offset + 1] = (value >>> 8)\n this[offset] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeUint32BE =\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nfunction wrtBigUInt64LE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7)\n\n let lo = Number(value & BigInt(0xffffffff))\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n return offset\n}\n\nfunction wrtBigUInt64BE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7)\n\n let lo = Number(value & BigInt(0xffffffff))\n buf[offset + 7] = lo\n lo = lo >> 8\n buf[offset + 6] = lo\n lo = lo >> 8\n buf[offset + 5] = lo\n lo = lo >> 8\n buf[offset + 4] = lo\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n buf[offset + 3] = hi\n hi = hi >> 8\n buf[offset + 2] = hi\n hi = hi >> 8\n buf[offset + 1] = hi\n hi = hi >> 8\n buf[offset] = hi\n return offset + 8\n}\n\nBuffer.prototype.writeBigUInt64LE = defineBigIntMethod(function writeBigUInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeBigUInt64BE = defineBigIntMethod(function writeBigUInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n let i = 0\n let mul = 1\n let sub = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n let i = byteLength - 1\n let mul = 1\n let sub = 0\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n if (value < 0) value = 0xff + value + 1\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n this[offset + 2] = (value >>> 16)\n this[offset + 3] = (value >>> 24)\n return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (value < 0) value = 0xffffffff + value + 1\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeBigInt64LE = defineBigIntMethod(function writeBigInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nBuffer.prototype.writeBigInt64BE = defineBigIntMethod(function writeBigInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n }\n ieee754.write(buf, value, offset, littleEndian, 23, 4)\n return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n }\n ieee754.write(buf, value, offset, littleEndian, 52, 8)\n return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n if (!Buffer.isBuffer(target)) throw new TypeError('argument should be a Buffer')\n if (!start) start = 0\n if (!end && end !== 0) end = this.length\n if (targetStart >= target.length) targetStart = target.length\n if (!targetStart) targetStart = 0\n if (end > 0 && end < start) end = start\n\n // Copy 0 bytes; we're done\n if (end === start) return 0\n if (target.length === 0 || this.length === 0) return 0\n\n // Fatal error conditions\n if (targetStart < 0) {\n throw new RangeError('targetStart out of bounds')\n }\n if (start < 0 || start >= this.length) throw new RangeError('Index out of range')\n if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n // Are we oob?\n if (end > this.length) end = this.length\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start\n }\n\n const len = end - start\n\n if (this === target && typeof Uint8Array.prototype.copyWithin === 'function') {\n // Use built-in when available, missing from IE11\n this.copyWithin(targetStart, start, end)\n } else {\n Uint8Array.prototype.set.call(\n target,\n this.subarray(start, end),\n targetStart\n )\n }\n\n return len\n}\n\n// Usage:\n// buffer.fill(number[, offset[, end]])\n// buffer.fill(buffer[, offset[, end]])\n// buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n // Handle string cases:\n if (typeof val === 'string') {\n if (typeof start === 'string') {\n encoding = start\n start = 0\n end = this.length\n } else if (typeof end === 'string') {\n encoding = end\n end = this.length\n }\n if (encoding !== undefined && typeof encoding !== 'string') {\n throw new TypeError('encoding must be a string')\n }\n if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n if (val.length === 1) {\n const code = val.charCodeAt(0)\n if ((encoding === 'utf8' && code < 128) ||\n encoding === 'latin1') {\n // Fast path: If `val` fits into a single byte, use that numeric value.\n val = code\n }\n }\n } else if (typeof val === 'number') {\n val = val & 255\n } else if (typeof val === 'boolean') {\n val = Number(val)\n }\n\n // Invalid ranges are not set to a default, so can range check early.\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError('Out of range index')\n }\n\n if (end <= start) {\n return this\n }\n\n start = start >>> 0\n end = end === undefined ? this.length : end >>> 0\n\n if (!val) val = 0\n\n let i\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val\n }\n } else {\n const bytes = Buffer.isBuffer(val)\n ? val\n : Buffer.from(val, encoding)\n const len = bytes.length\n if (len === 0) {\n throw new TypeError('The value \"' + val +\n '\" is invalid for argument \"value\"')\n }\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len]\n }\n }\n\n return this\n}\n\n// CUSTOM ERRORS\n// =============\n\n// Simplified versions from Node, changed for Buffer-only usage\nconst errors = {}\nfunction E (sym, getMessage, Base) {\n errors[sym] = class NodeError extends Base {\n constructor () {\n super()\n\n Object.defineProperty(this, 'message', {\n value: getMessage.apply(this, arguments),\n writable: true,\n configurable: true\n })\n\n // Add the error code to the name to include it in the stack trace.\n this.name = `${this.name} [${sym}]`\n // Access the stack to generate the error message including the error code\n // from the name.\n this.stack // eslint-disable-line no-unused-expressions\n // Reset the name to the actual name.\n delete this.name\n }\n\n get code () {\n return sym\n }\n\n set code (value) {\n Object.defineProperty(this, 'code', {\n configurable: true,\n enumerable: true,\n value,\n writable: true\n })\n }\n\n toString () {\n return `${this.name} [${sym}]: ${this.message}`\n }\n }\n}\n\nE('ERR_BUFFER_OUT_OF_BOUNDS',\n function (name) {\n if (name) {\n return `${name} is outside of buffer bounds`\n }\n\n return 'Attempt to access memory outside buffer bounds'\n }, RangeError)\nE('ERR_INVALID_ARG_TYPE',\n function (name, actual) {\n return `The \"${name}\" argument must be of type number. Received type ${typeof actual}`\n }, TypeError)\nE('ERR_OUT_OF_RANGE',\n function (str, range, input) {\n let msg = `The value of \"${str}\" is out of range.`\n let received = input\n if (Number.isInteger(input) && Math.abs(input) > 2 ** 32) {\n received = addNumericalSeparator(String(input))\n } else if (typeof input === 'bigint') {\n received = String(input)\n if (input > BigInt(2) ** BigInt(32) || input < -(BigInt(2) ** BigInt(32))) {\n received = addNumericalSeparator(received)\n }\n received += 'n'\n }\n msg += ` It must be ${range}. Received ${received}`\n return msg\n }, RangeError)\n\nfunction addNumericalSeparator (val) {\n let res = ''\n let i = val.length\n const start = val[0] === '-' ? 1 : 0\n for (; i >= start + 4; i -= 3) {\n res = `_${val.slice(i - 3, i)}${res}`\n }\n return `${val.slice(0, i)}${res}`\n}\n\n// CHECK FUNCTIONS\n// ===============\n\nfunction checkBounds (buf, offset, byteLength) {\n validateNumber(offset, 'offset')\n if (buf[offset] === undefined || buf[offset + byteLength] === undefined) {\n boundsError(offset, buf.length - (byteLength + 1))\n }\n}\n\nfunction checkIntBI (value, min, max, buf, offset, byteLength) {\n if (value > max || value < min) {\n const n = typeof min === 'bigint' ? 'n' : ''\n let range\n if (byteLength > 3) {\n if (min === 0 || min === BigInt(0)) {\n range = `>= 0${n} and < 2${n} ** ${(byteLength + 1) * 8}${n}`\n } else {\n range = `>= -(2${n} ** ${(byteLength + 1) * 8 - 1}${n}) and < 2 ** ` +\n `${(byteLength + 1) * 8 - 1}${n}`\n }\n } else {\n range = `>= ${min}${n} and <= ${max}${n}`\n }\n throw new errors.ERR_OUT_OF_RANGE('value', range, value)\n }\n checkBounds(buf, offset, byteLength)\n}\n\nfunction validateNumber (value, name) {\n if (typeof value !== 'number') {\n throw new errors.ERR_INVALID_ARG_TYPE(name, 'number', value)\n }\n}\n\nfunction boundsError (value, length, type) {\n if (Math.floor(value) !== value) {\n validateNumber(value, type)\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset', 'an integer', value)\n }\n\n if (length < 0) {\n throw new errors.ERR_BUFFER_OUT_OF_BOUNDS()\n }\n\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset',\n `>= ${type ? 1 : 0} and <= ${length}`,\n value)\n}\n\n// HELPER FUNCTIONS\n// ================\n\nconst INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n // Node takes equal signs as end of the Base64 encoding\n str = str.split('=')[0]\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = str.trim().replace(INVALID_BASE64_RE, '')\n // Node converts strings with length < 2 to ''\n if (str.length < 2) return ''\n // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n while (str.length % 4 !== 0) {\n str = str + '='\n }\n return str\n}\n\nfunction utf8ToBytes (string, units) {\n units = units || Infinity\n let codePoint\n const length = string.length\n let leadSurrogate = null\n const bytes = []\n\n for (let i = 0; i < length; ++i) {\n codePoint = string.charCodeAt(i)\n\n // is surrogate component\n if (codePoint > 0xD7FF && codePoint < 0xE000) {\n // last char was a lead\n if (!leadSurrogate) {\n // no lead yet\n if (codePoint > 0xDBFF) {\n // unexpected trail\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n } else if (i + 1 === length) {\n // unpaired lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n }\n\n // valid lead\n leadSurrogate = codePoint\n\n continue\n }\n\n // 2 leads in a row\n if (codePoint < 0xDC00) {\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n leadSurrogate = codePoint\n continue\n }\n\n // valid surrogate pair\n codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n } else if (leadSurrogate) {\n // valid bmp char, but last char was a lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n }\n\n leadSurrogate = null\n\n // encode utf8\n if (codePoint < 0x80) {\n if ((units -= 1) < 0) break\n bytes.push(codePoint)\n } else if (codePoint < 0x800) {\n if ((units -= 2) < 0) break\n bytes.push(\n codePoint >> 0x6 | 0xC0,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x10000) {\n if ((units -= 3) < 0) break\n bytes.push(\n codePoint >> 0xC | 0xE0,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x110000) {\n if ((units -= 4) < 0) break\n bytes.push(\n codePoint >> 0x12 | 0xF0,\n codePoint >> 0xC & 0x3F | 0x80,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else {\n throw new Error('Invalid code point')\n }\n }\n\n return bytes\n}\n\nfunction asciiToBytes (str) {\n const byteArray = []\n for (let i = 0; i < str.length; ++i) {\n // Node's code seems to be doing this and not & 0x7F..\n byteArray.push(str.charCodeAt(i) & 0xFF)\n }\n return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n let c, hi, lo\n const byteArray = []\n for (let i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0) break\n\n c = str.charCodeAt(i)\n hi = c >> 8\n lo = c % 256\n byteArray.push(lo)\n byteArray.push(hi)\n }\n\n return byteArray\n}\n\nfunction base64ToBytes (str) {\n return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n let i\n for (i = 0; i < length; ++i) {\n if ((i + offset >= dst.length) || (i >= src.length)) break\n dst[i + offset] = src[i]\n }\n return i\n}\n\n// ArrayBuffer or Uint8Array objects from other contexts (i.e. iframes) do not pass\n// the `instanceof` check but they should be treated as of that type.\n// See: https://github.com/feross/buffer/issues/166\nfunction isInstance (obj, type) {\n return obj instanceof type ||\n (obj != null && obj.constructor != null && obj.constructor.name != null &&\n obj.constructor.name === type.name)\n}\nfunction numberIsNaN (obj) {\n // For IE11 support\n return obj !== obj // eslint-disable-line no-self-compare\n}\n\n// Create lookup table for `toString('hex')`\n// See: https://github.com/feross/buffer/issues/219\nconst hexSliceLookupTable = (function () {\n const alphabet = '0123456789abcdef'\n const table = new Array(256)\n for (let i = 0; i < 16; ++i) {\n const i16 = i * 16\n for (let j = 0; j < 16; ++j) {\n table[i16 + j] = alphabet[i] + alphabet[j]\n }\n }\n return table\n})()\n\n// Return not function with Error if BigInt not supported\nfunction defineBigIntMethod (fn) {\n return typeof BigInt === 'undefined' ? BufferBigIntNotDefined : fn\n}\n\nfunction BufferBigIntNotDefined () {\n throw new Error('BigInt not supported')\n}\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\nvar R = typeof Reflect === 'object' ? Reflect : null\nvar ReflectApply = R && typeof R.apply === 'function'\n ? R.apply\n : function ReflectApply(target, receiver, args) {\n return Function.prototype.apply.call(target, receiver, args);\n }\n\nvar ReflectOwnKeys\nif (R && typeof R.ownKeys === 'function') {\n ReflectOwnKeys = R.ownKeys\n} else if (Object.getOwnPropertySymbols) {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target)\n .concat(Object.getOwnPropertySymbols(target));\n };\n} else {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target);\n };\n}\n\nfunction ProcessEmitWarning(warning) {\n if (console && console.warn) console.warn(warning);\n}\n\nvar NumberIsNaN = Number.isNaN || function NumberIsNaN(value) {\n return value !== value;\n}\n\nfunction EventEmitter() {\n EventEmitter.init.call(this);\n}\nmodule.exports = EventEmitter;\nmodule.exports.once = once;\n\n// Backwards-compat with node 0.10.x\nEventEmitter.EventEmitter = EventEmitter;\n\nEventEmitter.prototype._events = undefined;\nEventEmitter.prototype._eventsCount = 0;\nEventEmitter.prototype._maxListeners = undefined;\n\n// By default EventEmitters will print a warning if more than 10 listeners are\n// added to it. This is a useful default which helps finding memory leaks.\nvar defaultMaxListeners = 10;\n\nfunction checkListener(listener) {\n if (typeof listener !== 'function') {\n throw new TypeError('The \"listener\" argument must be of type Function. Received type ' + typeof listener);\n }\n}\n\nObject.defineProperty(EventEmitter, 'defaultMaxListeners', {\n enumerable: true,\n get: function() {\n return defaultMaxListeners;\n },\n set: function(arg) {\n if (typeof arg !== 'number' || arg < 0 || NumberIsNaN(arg)) {\n throw new RangeError('The value of \"defaultMaxListeners\" is out of range. It must be a non-negative number. Received ' + arg + '.');\n }\n defaultMaxListeners = arg;\n }\n});\n\nEventEmitter.init = function() {\n\n if (this._events === undefined ||\n this._events === Object.getPrototypeOf(this)._events) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n }\n\n this._maxListeners = this._maxListeners || undefined;\n};\n\n// Obviously not all Emitters should be limited to 10. This function allows\n// that to be increased. Set to zero for unlimited.\nEventEmitter.prototype.setMaxListeners = function setMaxListeners(n) {\n if (typeof n !== 'number' || n < 0 || NumberIsNaN(n)) {\n throw new RangeError('The value of \"n\" is out of range. It must be a non-negative number. Received ' + n + '.');\n }\n this._maxListeners = n;\n return this;\n};\n\nfunction _getMaxListeners(that) {\n if (that._maxListeners === undefined)\n return EventEmitter.defaultMaxListeners;\n return that._maxListeners;\n}\n\nEventEmitter.prototype.getMaxListeners = function getMaxListeners() {\n return _getMaxListeners(this);\n};\n\nEventEmitter.prototype.emit = function emit(type) {\n var args = [];\n for (var i = 1; i < arguments.length; i++) args.push(arguments[i]);\n var doError = (type === 'error');\n\n var events = this._events;\n if (events !== undefined)\n doError = (doError && events.error === undefined);\n else if (!doError)\n return false;\n\n // If there is no 'error' event listener then throw.\n if (doError) {\n var er;\n if (args.length > 0)\n er = args[0];\n if (er instanceof Error) {\n // Note: The comments on the `throw` lines are intentional, they show\n // up in Node's output if this results in an unhandled exception.\n throw er; // Unhandled 'error' event\n }\n // At least give some kind of context to the user\n var err = new Error('Unhandled error.' + (er ? ' (' + er.message + ')' : ''));\n err.context = er;\n throw err; // Unhandled 'error' event\n }\n\n var handler = events[type];\n\n if (handler === undefined)\n return false;\n\n if (typeof handler === 'function') {\n ReflectApply(handler, this, args);\n } else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n ReflectApply(listeners[i], this, args);\n }\n\n return true;\n};\n\nfunction _addListener(target, type, listener, prepend) {\n var m;\n var events;\n var existing;\n\n checkListener(listener);\n\n events = target._events;\n if (events === undefined) {\n events = target._events = Object.create(null);\n target._eventsCount = 0;\n } else {\n // To avoid recursion in the case that type === \"newListener\"! Before\n // adding it to the listeners, first emit \"newListener\".\n if (events.newListener !== undefined) {\n target.emit('newListener', type,\n listener.listener ? listener.listener : listener);\n\n // Re-assign `events` because a newListener handler could have caused the\n // this._events to be assigned to a new object\n events = target._events;\n }\n existing = events[type];\n }\n\n if (existing === undefined) {\n // Optimize the case of one listener. Don't need the extra array object.\n existing = events[type] = listener;\n ++target._eventsCount;\n } else {\n if (typeof existing === 'function') {\n // Adding the second element, need to change to array.\n existing = events[type] =\n prepend ? [listener, existing] : [existing, listener];\n // If we've already got an array, just append.\n } else if (prepend) {\n existing.unshift(listener);\n } else {\n existing.push(listener);\n }\n\n // Check for listener leak\n m = _getMaxListeners(target);\n if (m > 0 && existing.length > m && !existing.warned) {\n existing.warned = true;\n // No error code for this since it is a Warning\n // eslint-disable-next-line no-restricted-syntax\n var w = new Error('Possible EventEmitter memory leak detected. ' +\n existing.length + ' ' + String(type) + ' listeners ' +\n 'added. Use emitter.setMaxListeners() to ' +\n 'increase limit');\n w.name = 'MaxListenersExceededWarning';\n w.emitter = target;\n w.type = type;\n w.count = existing.length;\n ProcessEmitWarning(w);\n }\n }\n\n return target;\n}\n\nEventEmitter.prototype.addListener = function addListener(type, listener) {\n return _addListener(this, type, listener, false);\n};\n\nEventEmitter.prototype.on = EventEmitter.prototype.addListener;\n\nEventEmitter.prototype.prependListener =\n function prependListener(type, listener) {\n return _addListener(this, type, listener, true);\n };\n\nfunction onceWrapper() {\n if (!this.fired) {\n this.target.removeListener(this.type, this.wrapFn);\n this.fired = true;\n if (arguments.length === 0)\n return this.listener.call(this.target);\n return this.listener.apply(this.target, arguments);\n }\n}\n\nfunction _onceWrap(target, type, listener) {\n var state = { fired: false, wrapFn: undefined, target: target, type: type, listener: listener };\n var wrapped = onceWrapper.bind(state);\n wrapped.listener = listener;\n state.wrapFn = wrapped;\n return wrapped;\n}\n\nEventEmitter.prototype.once = function once(type, listener) {\n checkListener(listener);\n this.on(type, _onceWrap(this, type, listener));\n return this;\n};\n\nEventEmitter.prototype.prependOnceListener =\n function prependOnceListener(type, listener) {\n checkListener(listener);\n this.prependListener(type, _onceWrap(this, type, listener));\n return this;\n };\n\n// Emits a 'removeListener' event if and only if the listener was removed.\nEventEmitter.prototype.removeListener =\n function removeListener(type, listener) {\n var list, events, position, i, originalListener;\n\n checkListener(listener);\n\n events = this._events;\n if (events === undefined)\n return this;\n\n list = events[type];\n if (list === undefined)\n return this;\n\n if (list === listener || list.listener === listener) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else {\n delete events[type];\n if (events.removeListener)\n this.emit('removeListener', type, list.listener || listener);\n }\n } else if (typeof list !== 'function') {\n position = -1;\n\n for (i = list.length - 1; i >= 0; i--) {\n if (list[i] === listener || list[i].listener === listener) {\n originalListener = list[i].listener;\n position = i;\n break;\n }\n }\n\n if (position < 0)\n return this;\n\n if (position === 0)\n list.shift();\n else {\n spliceOne(list, position);\n }\n\n if (list.length === 1)\n events[type] = list[0];\n\n if (events.removeListener !== undefined)\n this.emit('removeListener', type, originalListener || listener);\n }\n\n return this;\n };\n\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\n\nEventEmitter.prototype.removeAllListeners =\n function removeAllListeners(type) {\n var listeners, events, i;\n\n events = this._events;\n if (events === undefined)\n return this;\n\n // not listening for removeListener, no need to emit\n if (events.removeListener === undefined) {\n if (arguments.length === 0) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n } else if (events[type] !== undefined) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else\n delete events[type];\n }\n return this;\n }\n\n // emit removeListener for all listeners on all events\n if (arguments.length === 0) {\n var keys = Object.keys(events);\n var key;\n for (i = 0; i < keys.length; ++i) {\n key = keys[i];\n if (key === 'removeListener') continue;\n this.removeAllListeners(key);\n }\n this.removeAllListeners('removeListener');\n this._events = Object.create(null);\n this._eventsCount = 0;\n return this;\n }\n\n listeners = events[type];\n\n if (typeof listeners === 'function') {\n this.removeListener(type, listeners);\n } else if (listeners !== undefined) {\n // LIFO order\n for (i = listeners.length - 1; i >= 0; i--) {\n this.removeListener(type, listeners[i]);\n }\n }\n\n return this;\n };\n\nfunction _listeners(target, type, unwrap) {\n var events = target._events;\n\n if (events === undefined)\n return [];\n\n var evlistener = events[type];\n if (evlistener === undefined)\n return [];\n\n if (typeof evlistener === 'function')\n return unwrap ? [evlistener.listener || evlistener] : [evlistener];\n\n return unwrap ?\n unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length);\n}\n\nEventEmitter.prototype.listeners = function listeners(type) {\n return _listeners(this, type, true);\n};\n\nEventEmitter.prototype.rawListeners = function rawListeners(type) {\n return _listeners(this, type, false);\n};\n\nEventEmitter.listenerCount = function(emitter, type) {\n if (typeof emitter.listenerCount === 'function') {\n return emitter.listenerCount(type);\n } else {\n return listenerCount.call(emitter, type);\n }\n};\n\nEventEmitter.prototype.listenerCount = listenerCount;\nfunction listenerCount(type) {\n var events = this._events;\n\n if (events !== undefined) {\n var evlistener = events[type];\n\n if (typeof evlistener === 'function') {\n return 1;\n } else if (evlistener !== undefined) {\n return evlistener.length;\n }\n }\n\n return 0;\n}\n\nEventEmitter.prototype.eventNames = function eventNames() {\n return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : [];\n};\n\nfunction arrayClone(arr, n) {\n var copy = new Array(n);\n for (var i = 0; i < n; ++i)\n copy[i] = arr[i];\n return copy;\n}\n\nfunction spliceOne(list, index) {\n for (; index + 1 < list.length; index++)\n list[index] = list[index + 1];\n list.pop();\n}\n\nfunction unwrapListeners(arr) {\n var ret = new Array(arr.length);\n for (var i = 0; i < ret.length; ++i) {\n ret[i] = arr[i].listener || arr[i];\n }\n return ret;\n}\n\nfunction once(emitter, name) {\n return new Promise(function (resolve, reject) {\n function errorListener(err) {\n emitter.removeListener(name, resolver);\n reject(err);\n }\n\n function resolver() {\n if (typeof emitter.removeListener === 'function') {\n emitter.removeListener('error', errorListener);\n }\n resolve([].slice.call(arguments));\n };\n\n eventTargetAgnosticAddListener(emitter, name, resolver, { once: true });\n if (name !== 'error') {\n addErrorHandlerIfEventEmitter(emitter, errorListener, { once: true });\n }\n });\n}\n\nfunction addErrorHandlerIfEventEmitter(emitter, handler, flags) {\n if (typeof emitter.on === 'function') {\n eventTargetAgnosticAddListener(emitter, 'error', handler, flags);\n }\n}\n\nfunction eventTargetAgnosticAddListener(emitter, name, listener, flags) {\n if (typeof emitter.on === 'function') {\n if (flags.once) {\n emitter.once(name, listener);\n } else {\n emitter.on(name, listener);\n }\n } else if (typeof emitter.addEventListener === 'function') {\n // EventTarget does not have `error` event semantics like Node\n // EventEmitters, we do not listen for `error` events here.\n emitter.addEventListener(name, function wrapListener(arg) {\n // IE does not have builtin `{ once: true }` support so we\n // have to do it manually.\n if (flags.once) {\n emitter.removeEventListener(name, wrapListener);\n }\n listener(arg);\n });\n } else {\n throw new TypeError('The \"emitter\" argument must be of type EventEmitter. Received type ' + typeof emitter);\n }\n}\n","/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */\nexports.read = function (buffer, offset, isLE, mLen, nBytes) {\n var e, m\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var nBits = -7\n var i = isLE ? (nBytes - 1) : 0\n var d = isLE ? -1 : 1\n var s = buffer[offset + i]\n\n i += d\n\n e = s & ((1 << (-nBits)) - 1)\n s >>= (-nBits)\n nBits += eLen\n for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & ((1 << (-nBits)) - 1)\n e >>= (-nBits)\n nBits += mLen\n for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias\n } else if (e === eMax) {\n return m ? NaN : ((s ? -1 : 1) * Infinity)\n } else {\n m = m + Math.pow(2, mLen)\n e = e - eBias\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n var i = isLE ? 0 : (nBytes - 1)\n var d = isLE ? 1 : -1\n var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n value = Math.abs(value)\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0\n e = eMax\n } else {\n e = Math.floor(Math.log(value) / Math.LN2)\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--\n c *= 2\n }\n if (e + eBias >= 1) {\n value += rt / c\n } else {\n value += rt * Math.pow(2, 1 - eBias)\n }\n if (value * c >= 2) {\n e++\n c /= 2\n }\n\n if (e + eBias >= eMax) {\n m = 0\n e = eMax\n } else if (e + eBias >= 1) {\n m = ((value * c) - 1) * Math.pow(2, mLen)\n e = e + eBias\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n e = 0\n }\n }\n\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n e = (e << mLen) | m\n eLen += mLen\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128\n}\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView');\n\nmodule.exports = DataView;\n","var hashClear = require('./_hashClear'),\n hashDelete = require('./_hashDelete'),\n hashGet = require('./_hashGet'),\n hashHas = require('./_hashHas'),\n hashSet = require('./_hashSet');\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\nmodule.exports = Hash;\n","var listCacheClear = require('./_listCacheClear'),\n listCacheDelete = require('./_listCacheDelete'),\n listCacheGet = require('./_listCacheGet'),\n listCacheHas = require('./_listCacheHas'),\n listCacheSet = require('./_listCacheSet');\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\nmodule.exports = ListCache;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map');\n\nmodule.exports = Map;\n","var mapCacheClear = require('./_mapCacheClear'),\n mapCacheDelete = require('./_mapCacheDelete'),\n mapCacheGet = require('./_mapCacheGet'),\n mapCacheHas = require('./_mapCacheHas'),\n mapCacheSet = require('./_mapCacheSet');\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\nmodule.exports = MapCache;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Promise = getNative(root, 'Promise');\n\nmodule.exports = Promise;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Set = getNative(root, 'Set');\n\nmodule.exports = Set;\n","var MapCache = require('./_MapCache'),\n setCacheAdd = require('./_setCacheAdd'),\n setCacheHas = require('./_setCacheHas');\n\n/**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\nfunction SetCache(values) {\n var index = -1,\n length = values == null ? 0 : values.length;\n\n this.__data__ = new MapCache;\n while (++index < length) {\n this.add(values[index]);\n }\n}\n\n// Add methods to `SetCache`.\nSetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\nSetCache.prototype.has = setCacheHas;\n\nmodule.exports = SetCache;\n","var ListCache = require('./_ListCache'),\n stackClear = require('./_stackClear'),\n stackDelete = require('./_stackDelete'),\n stackGet = require('./_stackGet'),\n stackHas = require('./_stackHas'),\n stackSet = require('./_stackSet');\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\nmodule.exports = Stack;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Uint8Array = root.Uint8Array;\n\nmodule.exports = Uint8Array;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar WeakMap = getNative(root, 'WeakMap');\n\nmodule.exports = WeakMap;\n","/**\n * A specialized version of `_.forEach` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\nfunction arrayEach(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (iteratee(array[index], index, array) === false) {\n break;\n }\n }\n return array;\n}\n\nmodule.exports = arrayEach;\n","/**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\nfunction arrayFilter(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result[resIndex++] = value;\n }\n }\n return result;\n}\n\nmodule.exports = arrayFilter;\n","var baseTimes = require('./_baseTimes'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isIndex = require('./_isIndex'),\n isTypedArray = require('./isTypedArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = arrayLikeKeys;\n","/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n}\n\nmodule.exports = arrayPush;\n","/**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\nfunction arraySome(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (predicate(array[index], index, array)) {\n return true;\n }\n }\n return false;\n}\n\nmodule.exports = arraySome;\n","var baseAssignValue = require('./_baseAssignValue'),\n eq = require('./eq');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\nmodule.exports = assignValue;\n","var eq = require('./eq');\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\nmodule.exports = assocIndexOf;\n","var copyObject = require('./_copyObject'),\n keys = require('./keys');\n\n/**\n * The base implementation of `_.assign` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssign(object, source) {\n return object && copyObject(source, keys(source), object);\n}\n\nmodule.exports = baseAssign;\n","var copyObject = require('./_copyObject'),\n keysIn = require('./keysIn');\n\n/**\n * The base implementation of `_.assignIn` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssignIn(object, source) {\n return object && copyObject(source, keysIn(source), object);\n}\n\nmodule.exports = baseAssignIn;\n","var defineProperty = require('./_defineProperty');\n\n/**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction baseAssignValue(object, key, value) {\n if (key == '__proto__' && defineProperty) {\n defineProperty(object, key, {\n 'configurable': true,\n 'enumerable': true,\n 'value': value,\n 'writable': true\n });\n } else {\n object[key] = value;\n }\n}\n\nmodule.exports = baseAssignValue;\n","var Stack = require('./_Stack'),\n arrayEach = require('./_arrayEach'),\n assignValue = require('./_assignValue'),\n baseAssign = require('./_baseAssign'),\n baseAssignIn = require('./_baseAssignIn'),\n cloneBuffer = require('./_cloneBuffer'),\n copyArray = require('./_copyArray'),\n copySymbols = require('./_copySymbols'),\n copySymbolsIn = require('./_copySymbolsIn'),\n getAllKeys = require('./_getAllKeys'),\n getAllKeysIn = require('./_getAllKeysIn'),\n getTag = require('./_getTag'),\n initCloneArray = require('./_initCloneArray'),\n initCloneByTag = require('./_initCloneByTag'),\n initCloneObject = require('./_initCloneObject'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isMap = require('./isMap'),\n isObject = require('./isObject'),\n isSet = require('./isSet'),\n keys = require('./keys'),\n keysIn = require('./keysIn');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_FLAT_FLAG = 2,\n CLONE_SYMBOLS_FLAG = 4;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values supported by `_.clone`. */\nvar cloneableTags = {};\ncloneableTags[argsTag] = cloneableTags[arrayTag] =\ncloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =\ncloneableTags[boolTag] = cloneableTags[dateTag] =\ncloneableTags[float32Tag] = cloneableTags[float64Tag] =\ncloneableTags[int8Tag] = cloneableTags[int16Tag] =\ncloneableTags[int32Tag] = cloneableTags[mapTag] =\ncloneableTags[numberTag] = cloneableTags[objectTag] =\ncloneableTags[regexpTag] = cloneableTags[setTag] =\ncloneableTags[stringTag] = cloneableTags[symbolTag] =\ncloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =\ncloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;\ncloneableTags[errorTag] = cloneableTags[funcTag] =\ncloneableTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.clone` and `_.cloneDeep` which tracks\n * traversed objects.\n *\n * @private\n * @param {*} value The value to clone.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Deep clone\n * 2 - Flatten inherited properties\n * 4 - Clone symbols\n * @param {Function} [customizer] The function to customize cloning.\n * @param {string} [key] The key of `value`.\n * @param {Object} [object] The parent object of `value`.\n * @param {Object} [stack] Tracks traversed objects and their clone counterparts.\n * @returns {*} Returns the cloned value.\n */\nfunction baseClone(value, bitmask, customizer, key, object, stack) {\n var result,\n isDeep = bitmask & CLONE_DEEP_FLAG,\n isFlat = bitmask & CLONE_FLAT_FLAG,\n isFull = bitmask & CLONE_SYMBOLS_FLAG;\n\n if (customizer) {\n result = object ? customizer(value, key, object, stack) : customizer(value);\n }\n if (result !== undefined) {\n return result;\n }\n if (!isObject(value)) {\n return value;\n }\n var isArr = isArray(value);\n if (isArr) {\n result = initCloneArray(value);\n if (!isDeep) {\n return copyArray(value, result);\n }\n } else {\n var tag = getTag(value),\n isFunc = tag == funcTag || tag == genTag;\n\n if (isBuffer(value)) {\n return cloneBuffer(value, isDeep);\n }\n if (tag == objectTag || tag == argsTag || (isFunc && !object)) {\n result = (isFlat || isFunc) ? {} : initCloneObject(value);\n if (!isDeep) {\n return isFlat\n ? copySymbolsIn(value, baseAssignIn(result, value))\n : copySymbols(value, baseAssign(result, value));\n }\n } else {\n if (!cloneableTags[tag]) {\n return object ? value : {};\n }\n result = initCloneByTag(value, tag, isDeep);\n }\n }\n // Check for circular references and return its corresponding clone.\n stack || (stack = new Stack);\n var stacked = stack.get(value);\n if (stacked) {\n return stacked;\n }\n stack.set(value, result);\n\n if (isSet(value)) {\n value.forEach(function(subValue) {\n result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));\n });\n } else if (isMap(value)) {\n value.forEach(function(subValue, key) {\n result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n }\n\n var keysFunc = isFull\n ? (isFlat ? getAllKeysIn : getAllKeys)\n : (isFlat ? keysIn : keys);\n\n var props = isArr ? undefined : keysFunc(value);\n arrayEach(props || value, function(subValue, key) {\n if (props) {\n key = subValue;\n subValue = value[key];\n }\n // Recursively populate clone (susceptible to call stack limits).\n assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n return result;\n}\n\nmodule.exports = baseClone;\n","var isObject = require('./isObject');\n\n/** Built-in value references. */\nvar objectCreate = Object.create;\n\n/**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} proto The object to inherit from.\n * @returns {Object} Returns the new object.\n */\nvar baseCreate = (function() {\n function object() {}\n return function(proto) {\n if (!isObject(proto)) {\n return {};\n }\n if (objectCreate) {\n return objectCreate(proto);\n }\n object.prototype = proto;\n var result = new object;\n object.prototype = undefined;\n return result;\n };\n}());\n\nmodule.exports = baseCreate;\n","var arrayPush = require('./_arrayPush'),\n isArray = require('./isArray');\n\n/**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction baseGetAllKeys(object, keysFunc, symbolsFunc) {\n var result = keysFunc(object);\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n}\n\nmodule.exports = baseGetAllKeys;\n","var Symbol = require('./_Symbol'),\n getRawTag = require('./_getRawTag'),\n objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]';\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\nmodule.exports = baseIsArguments;\n","var baseIsEqualDeep = require('./_baseIsEqualDeep'),\n isObjectLike = require('./isObjectLike');\n\n/**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Unordered comparison\n * 2 - Partial comparison\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\nfunction baseIsEqual(value, other, bitmask, customizer, stack) {\n if (value === other) {\n return true;\n }\n if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\n return value !== value && other !== other;\n }\n return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n}\n\nmodule.exports = baseIsEqual;\n","var Stack = require('./_Stack'),\n equalArrays = require('./_equalArrays'),\n equalByTag = require('./_equalByTag'),\n equalObjects = require('./_equalObjects'),\n getTag = require('./_getTag'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isTypedArray = require('./isTypedArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n var objIsArr = isArray(object),\n othIsArr = isArray(other),\n objTag = objIsArr ? arrayTag : getTag(object),\n othTag = othIsArr ? arrayTag : getTag(other);\n\n objTag = objTag == argsTag ? objectTag : objTag;\n othTag = othTag == argsTag ? objectTag : othTag;\n\n var objIsObj = objTag == objectTag,\n othIsObj = othTag == objectTag,\n isSameTag = objTag == othTag;\n\n if (isSameTag && isBuffer(object)) {\n if (!isBuffer(other)) {\n return false;\n }\n objIsArr = true;\n objIsObj = false;\n }\n if (isSameTag && !objIsObj) {\n stack || (stack = new Stack);\n return (objIsArr || isTypedArray(object))\n ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n }\n if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n if (objIsWrapped || othIsWrapped) {\n var objUnwrapped = objIsWrapped ? object.value() : object,\n othUnwrapped = othIsWrapped ? other.value() : other;\n\n stack || (stack = new Stack);\n return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n }\n }\n if (!isSameTag) {\n return false;\n }\n stack || (stack = new Stack);\n return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n}\n\nmodule.exports = baseIsEqualDeep;\n","var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]';\n\n/**\n * The base implementation of `_.isMap` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n */\nfunction baseIsMap(value) {\n return isObjectLike(value) && getTag(value) == mapTag;\n}\n\nmodule.exports = baseIsMap;\n","var isFunction = require('./isFunction'),\n isMasked = require('./_isMasked'),\n isObject = require('./isObject'),\n toSource = require('./_toSource');\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\nmodule.exports = baseIsNative;\n","var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar setTag = '[object Set]';\n\n/**\n * The base implementation of `_.isSet` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n */\nfunction baseIsSet(value) {\n return isObjectLike(value) && getTag(value) == setTag;\n}\n\nmodule.exports = baseIsSet;\n","var baseGetTag = require('./_baseGetTag'),\n isLength = require('./isLength'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n\nmodule.exports = baseIsTypedArray;\n","var isPrototype = require('./_isPrototype'),\n nativeKeys = require('./_nativeKeys');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeys;\n","var isObject = require('./isObject'),\n isPrototype = require('./_isPrototype'),\n nativeKeysIn = require('./_nativeKeysIn');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeysIn(object) {\n if (!isObject(object)) {\n return nativeKeysIn(object);\n }\n var isProto = isPrototype(object),\n result = [];\n\n for (var key in object) {\n if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeysIn;\n","/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\nmodule.exports = baseTimes;\n","/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n return function(value) {\n return func(value);\n };\n}\n\nmodule.exports = baseUnary;\n","/**\n * Checks if a `cache` value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction cacheHas(cache, key) {\n return cache.has(key);\n}\n\nmodule.exports = cacheHas;\n","var Uint8Array = require('./_Uint8Array');\n\n/**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\nfunction cloneArrayBuffer(arrayBuffer) {\n var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n return result;\n}\n\nmodule.exports = cloneArrayBuffer;\n","var root = require('./_root');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined,\n allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;\n\n/**\n * Creates a clone of `buffer`.\n *\n * @private\n * @param {Buffer} buffer The buffer to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Buffer} Returns the cloned buffer.\n */\nfunction cloneBuffer(buffer, isDeep) {\n if (isDeep) {\n return buffer.slice();\n }\n var length = buffer.length,\n result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\n\n buffer.copy(result);\n return result;\n}\n\nmodule.exports = cloneBuffer;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer');\n\n/**\n * Creates a clone of `dataView`.\n *\n * @private\n * @param {Object} dataView The data view to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned data view.\n */\nfunction cloneDataView(dataView, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;\n return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);\n}\n\nmodule.exports = cloneDataView;\n","/** Used to match `RegExp` flags from their coerced string values. */\nvar reFlags = /\\w*$/;\n\n/**\n * Creates a clone of `regexp`.\n *\n * @private\n * @param {Object} regexp The regexp to clone.\n * @returns {Object} Returns the cloned regexp.\n */\nfunction cloneRegExp(regexp) {\n var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));\n result.lastIndex = regexp.lastIndex;\n return result;\n}\n\nmodule.exports = cloneRegExp;\n","var Symbol = require('./_Symbol');\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * Creates a clone of the `symbol` object.\n *\n * @private\n * @param {Object} symbol The symbol object to clone.\n * @returns {Object} Returns the cloned symbol object.\n */\nfunction cloneSymbol(symbol) {\n return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};\n}\n\nmodule.exports = cloneSymbol;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer');\n\n/**\n * Creates a clone of `typedArray`.\n *\n * @private\n * @param {Object} typedArray The typed array to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned typed array.\n */\nfunction cloneTypedArray(typedArray, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n}\n\nmodule.exports = cloneTypedArray;\n","/**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\nfunction copyArray(source, array) {\n var index = -1,\n length = source.length;\n\n array || (array = Array(length));\n while (++index < length) {\n array[index] = source[index];\n }\n return array;\n}\n\nmodule.exports = copyArray;\n","var assignValue = require('./_assignValue'),\n baseAssignValue = require('./_baseAssignValue');\n\n/**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\nfunction copyObject(source, props, object, customizer) {\n var isNew = !object;\n object || (object = {});\n\n var index = -1,\n length = props.length;\n\n while (++index < length) {\n var key = props[index];\n\n var newValue = customizer\n ? customizer(object[key], source[key], key, object, source)\n : undefined;\n\n if (newValue === undefined) {\n newValue = source[key];\n }\n if (isNew) {\n baseAssignValue(object, key, newValue);\n } else {\n assignValue(object, key, newValue);\n }\n }\n return object;\n}\n\nmodule.exports = copyObject;\n","var copyObject = require('./_copyObject'),\n getSymbols = require('./_getSymbols');\n\n/**\n * Copies own symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbols(source, object) {\n return copyObject(source, getSymbols(source), object);\n}\n\nmodule.exports = copySymbols;\n","var copyObject = require('./_copyObject'),\n getSymbolsIn = require('./_getSymbolsIn');\n\n/**\n * Copies own and inherited symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbolsIn(source, object) {\n return copyObject(source, getSymbolsIn(source), object);\n}\n\nmodule.exports = copySymbolsIn;\n","var root = require('./_root');\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\nmodule.exports = coreJsData;\n","var getNative = require('./_getNative');\n\nvar defineProperty = (function() {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n}());\n\nmodule.exports = defineProperty;\n","var SetCache = require('./_SetCache'),\n arraySome = require('./_arraySome'),\n cacheHas = require('./_cacheHas');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\nfunction equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n arrLength = array.length,\n othLength = other.length;\n\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n return false;\n }\n // Check that cyclic values are equal.\n var arrStacked = stack.get(array);\n var othStacked = stack.get(other);\n if (arrStacked && othStacked) {\n return arrStacked == other && othStacked == array;\n }\n var index = -1,\n result = true,\n seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n stack.set(array, other);\n stack.set(other, array);\n\n // Ignore non-index properties.\n while (++index < arrLength) {\n var arrValue = array[index],\n othValue = other[index];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, arrValue, index, other, array, stack)\n : customizer(arrValue, othValue, index, array, other, stack);\n }\n if (compared !== undefined) {\n if (compared) {\n continue;\n }\n result = false;\n break;\n }\n // Recursively compare arrays (susceptible to call stack limits).\n if (seen) {\n if (!arraySome(other, function(othValue, othIndex) {\n if (!cacheHas(seen, othIndex) &&\n (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n return seen.push(othIndex);\n }\n })) {\n result = false;\n break;\n }\n } else if (!(\n arrValue === othValue ||\n equalFunc(arrValue, othValue, bitmask, customizer, stack)\n )) {\n result = false;\n break;\n }\n }\n stack['delete'](array);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalArrays;\n","var Symbol = require('./_Symbol'),\n Uint8Array = require('./_Uint8Array'),\n eq = require('./eq'),\n equalArrays = require('./_equalArrays'),\n mapToArray = require('./_mapToArray'),\n setToArray = require('./_setToArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]';\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n switch (tag) {\n case dataViewTag:\n if ((object.byteLength != other.byteLength) ||\n (object.byteOffset != other.byteOffset)) {\n return false;\n }\n object = object.buffer;\n other = other.buffer;\n\n case arrayBufferTag:\n if ((object.byteLength != other.byteLength) ||\n !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n return false;\n }\n return true;\n\n case boolTag:\n case dateTag:\n case numberTag:\n // Coerce booleans to `1` or `0` and dates to milliseconds.\n // Invalid dates are coerced to `NaN`.\n return eq(+object, +other);\n\n case errorTag:\n return object.name == other.name && object.message == other.message;\n\n case regexpTag:\n case stringTag:\n // Coerce regexes to strings and treat strings, primitives and objects,\n // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n // for more details.\n return object == (other + '');\n\n case mapTag:\n var convert = mapToArray;\n\n case setTag:\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n convert || (convert = setToArray);\n\n if (object.size != other.size && !isPartial) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked) {\n return stacked == other;\n }\n bitmask |= COMPARE_UNORDERED_FLAG;\n\n // Recursively compare objects (susceptible to call stack limits).\n stack.set(object, other);\n var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n stack['delete'](object);\n return result;\n\n case symbolTag:\n if (symbolValueOf) {\n return symbolValueOf.call(object) == symbolValueOf.call(other);\n }\n }\n return false;\n}\n\nmodule.exports = equalByTag;\n","var getAllKeys = require('./_getAllKeys');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n objProps = getAllKeys(object),\n objLength = objProps.length,\n othProps = getAllKeys(other),\n othLength = othProps.length;\n\n if (objLength != othLength && !isPartial) {\n return false;\n }\n var index = objLength;\n while (index--) {\n var key = objProps[index];\n if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n return false;\n }\n }\n // Check that cyclic values are equal.\n var objStacked = stack.get(object);\n var othStacked = stack.get(other);\n if (objStacked && othStacked) {\n return objStacked == other && othStacked == object;\n }\n var result = true;\n stack.set(object, other);\n stack.set(other, object);\n\n var skipCtor = isPartial;\n while (++index < objLength) {\n key = objProps[index];\n var objValue = object[key],\n othValue = other[key];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, objValue, key, other, object, stack)\n : customizer(objValue, othValue, key, object, other, stack);\n }\n // Recursively compare objects (susceptible to call stack limits).\n if (!(compared === undefined\n ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n : compared\n )) {\n result = false;\n break;\n }\n skipCtor || (skipCtor = key == 'constructor');\n }\n if (result && !skipCtor) {\n var objCtor = object.constructor,\n othCtor = other.constructor;\n\n // Non `Object` object instances with different constructors are not equal.\n if (objCtor != othCtor &&\n ('constructor' in object && 'constructor' in other) &&\n !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n result = false;\n }\n }\n stack['delete'](object);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalObjects;\n","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n","var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbols = require('./_getSymbols'),\n keys = require('./keys');\n\n/**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeys(object) {\n return baseGetAllKeys(object, keys, getSymbols);\n}\n\nmodule.exports = getAllKeys;\n","var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbolsIn = require('./_getSymbolsIn'),\n keysIn = require('./keysIn');\n\n/**\n * Creates an array of own and inherited enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeysIn(object) {\n return baseGetAllKeys(object, keysIn, getSymbolsIn);\n}\n\nmodule.exports = getAllKeysIn;\n","var isKeyable = require('./_isKeyable');\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\nmodule.exports = getMapData;\n","var baseIsNative = require('./_baseIsNative'),\n getValue = require('./_getValue');\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\nmodule.exports = getNative;\n","var overArg = require('./_overArg');\n\n/** Built-in value references. */\nvar getPrototype = overArg(Object.getPrototypeOf, Object);\n\nmodule.exports = getPrototype;\n","var Symbol = require('./_Symbol');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nmodule.exports = getRawTag;\n","var arrayFilter = require('./_arrayFilter'),\n stubArray = require('./stubArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n if (object == null) {\n return [];\n }\n object = Object(object);\n return arrayFilter(nativeGetSymbols(object), function(symbol) {\n return propertyIsEnumerable.call(object, symbol);\n });\n};\n\nmodule.exports = getSymbols;\n","var arrayPush = require('./_arrayPush'),\n getPrototype = require('./_getPrototype'),\n getSymbols = require('./_getSymbols'),\n stubArray = require('./stubArray');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own and inherited enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {\n var result = [];\n while (object) {\n arrayPush(result, getSymbols(object));\n object = getPrototype(object);\n }\n return result;\n};\n\nmodule.exports = getSymbolsIn;\n","var DataView = require('./_DataView'),\n Map = require('./_Map'),\n Promise = require('./_Promise'),\n Set = require('./_Set'),\n WeakMap = require('./_WeakMap'),\n baseGetTag = require('./_baseGetTag'),\n toSource = require('./_toSource');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n setTag = '[object Set]',\n weakMapTag = '[object WeakMap]';\n\nvar dataViewTag = '[object DataView]';\n\n/** Used to detect maps, sets, and weakmaps. */\nvar dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nvar getTag = baseGetTag;\n\n// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\nif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = baseGetTag(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : '';\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n}\n\nmodule.exports = getTag;\n","/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\nmodule.exports = getValue;\n","var nativeCreate = require('./_nativeCreate');\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n}\n\nmodule.exports = hashClear;\n","/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = hashDelete;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\nmodule.exports = hashGet;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\nmodule.exports = hashHas;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\nmodule.exports = hashSet;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Initializes an array clone.\n *\n * @private\n * @param {Array} array The array to clone.\n * @returns {Array} Returns the initialized clone.\n */\nfunction initCloneArray(array) {\n var length = array.length,\n result = new array.constructor(length);\n\n // Add properties assigned by `RegExp#exec`.\n if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {\n result.index = array.index;\n result.input = array.input;\n }\n return result;\n}\n\nmodule.exports = initCloneArray;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer'),\n cloneDataView = require('./_cloneDataView'),\n cloneRegExp = require('./_cloneRegExp'),\n cloneSymbol = require('./_cloneSymbol'),\n cloneTypedArray = require('./_cloneTypedArray');\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/**\n * Initializes an object clone based on its `toStringTag`.\n *\n * **Note:** This function only supports cloning values with tags of\n * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.\n *\n * @private\n * @param {Object} object The object to clone.\n * @param {string} tag The `toStringTag` of the object to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneByTag(object, tag, isDeep) {\n var Ctor = object.constructor;\n switch (tag) {\n case arrayBufferTag:\n return cloneArrayBuffer(object);\n\n case boolTag:\n case dateTag:\n return new Ctor(+object);\n\n case dataViewTag:\n return cloneDataView(object, isDeep);\n\n case float32Tag: case float64Tag:\n case int8Tag: case int16Tag: case int32Tag:\n case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:\n return cloneTypedArray(object, isDeep);\n\n case mapTag:\n return new Ctor;\n\n case numberTag:\n case stringTag:\n return new Ctor(object);\n\n case regexpTag:\n return cloneRegExp(object);\n\n case setTag:\n return new Ctor;\n\n case symbolTag:\n return cloneSymbol(object);\n }\n}\n\nmodule.exports = initCloneByTag;\n","var baseCreate = require('./_baseCreate'),\n getPrototype = require('./_getPrototype'),\n isPrototype = require('./_isPrototype');\n\n/**\n * Initializes an object clone.\n *\n * @private\n * @param {Object} object The object to clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneObject(object) {\n return (typeof object.constructor == 'function' && !isPrototype(object))\n ? baseCreate(getPrototype(object))\n : {};\n}\n\nmodule.exports = initCloneObject;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n var type = typeof value;\n length = length == null ? MAX_SAFE_INTEGER : length;\n\n return !!length &&\n (type == 'number' ||\n (type != 'symbol' && reIsUint.test(value))) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\nmodule.exports = isIndex;\n","/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\nmodule.exports = isKeyable;\n","var coreJsData = require('./_coreJsData');\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\nmodule.exports = isMasked;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\nmodule.exports = isPrototype;\n","/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n}\n\nmodule.exports = listCacheClear;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype;\n\n/** Built-in value references. */\nvar splice = arrayProto.splice;\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n}\n\nmodule.exports = listCacheDelete;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\nmodule.exports = listCacheGet;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\nmodule.exports = listCacheHas;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\nmodule.exports = listCacheSet;\n","var Hash = require('./_Hash'),\n ListCache = require('./_ListCache'),\n Map = require('./_Map');\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\nmodule.exports = mapCacheClear;\n","var getMapData = require('./_getMapData');\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = mapCacheDelete;\n","var getMapData = require('./_getMapData');\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\nmodule.exports = mapCacheGet;\n","var getMapData = require('./_getMapData');\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\nmodule.exports = mapCacheHas;\n","var getMapData = require('./_getMapData');\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n}\n\nmodule.exports = mapCacheSet;\n","/**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\nfunction mapToArray(map) {\n var index = -1,\n result = Array(map.size);\n\n map.forEach(function(value, key) {\n result[++index] = [key, value];\n });\n return result;\n}\n\nmodule.exports = mapToArray;\n","var getNative = require('./_getNative');\n\n/* Built-in method references that are verified to be native. */\nvar nativeCreate = getNative(Object, 'create');\n\nmodule.exports = nativeCreate;\n","var overArg = require('./_overArg');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeKeys = overArg(Object.keys, Object);\n\nmodule.exports = nativeKeys;\n","/**\n * This function is like\n * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * except that it includes inherited enumerable properties.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction nativeKeysIn(object) {\n var result = [];\n if (object != null) {\n for (var key in Object(object)) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = nativeKeysIn;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n try {\n // Use `util.types` for Node.js 10+.\n var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n if (types) {\n return types;\n }\n\n // Legacy `process.binding('util')` for Node.js < 10.\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n}());\n\nmodule.exports = nodeUtil;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n","/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\nmodule.exports = overArg;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n","/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\nfunction setCacheAdd(value) {\n this.__data__.set(value, HASH_UNDEFINED);\n return this;\n}\n\nmodule.exports = setCacheAdd;\n","/**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\nfunction setCacheHas(value) {\n return this.__data__.has(value);\n}\n\nmodule.exports = setCacheHas;\n","/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\nfunction setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n}\n\nmodule.exports = setToArray;\n","var ListCache = require('./_ListCache');\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}\n\nmodule.exports = stackClear;\n","/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n var data = this.__data__,\n result = data['delete'](key);\n\n this.size = data.size;\n return result;\n}\n\nmodule.exports = stackDelete;\n","/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n return this.__data__.get(key);\n}\n\nmodule.exports = stackGet;\n","/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n return this.__data__.has(key);\n}\n\nmodule.exports = stackHas;\n","var ListCache = require('./_ListCache'),\n Map = require('./_Map'),\n MapCache = require('./_MapCache');\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n var data = this.__data__;\n if (data instanceof ListCache) {\n var pairs = data.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n this.size = ++data.size;\n return this;\n }\n data = this.__data__ = new MapCache(pairs);\n }\n data.set(key, value);\n this.size = data.size;\n return this;\n}\n\nmodule.exports = stackSet;\n","/** Used for built-in method references. */\nvar funcProto = Function.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\nmodule.exports = toSource;\n","var baseClone = require('./_baseClone');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_SYMBOLS_FLAG = 4;\n\n/**\n * This method is like `_.clone` except that it recursively clones `value`.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Lang\n * @param {*} value The value to recursively clone.\n * @returns {*} Returns the deep cloned value.\n * @see _.clone\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var deep = _.cloneDeep(objects);\n * console.log(deep[0] === objects[0]);\n * // => false\n */\nfunction cloneDeep(value) {\n return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);\n}\n\nmodule.exports = cloneDeep;\n","/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\nmodule.exports = eq;\n","var baseIsArguments = require('./_baseIsArguments'),\n isObjectLike = require('./isObjectLike');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n};\n\nmodule.exports = isArguments;\n","/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\nmodule.exports = isArray;\n","var isFunction = require('./isFunction'),\n isLength = require('./isLength');\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\nmodule.exports = isArrayLike;\n","var root = require('./_root'),\n stubFalse = require('./stubFalse');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\nmodule.exports = isBuffer;\n","var baseIsEqual = require('./_baseIsEqual');\n\n/**\n * Performs a deep comparison between two values to determine if they are\n * equivalent.\n *\n * **Note:** This method supports comparing arrays, array buffers, booleans,\n * date objects, error objects, maps, numbers, `Object` objects, regexes,\n * sets, strings, symbols, and typed arrays. `Object` objects are compared\n * by their own, not inherited, enumerable properties. Functions and DOM\n * nodes are compared by strict equality, i.e. `===`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.isEqual(object, other);\n * // => true\n *\n * object === other;\n * // => false\n */\nfunction isEqual(value, other) {\n return baseIsEqual(value, other);\n}\n\nmodule.exports = isEqual;\n","var baseGetTag = require('./_baseGetTag'),\n isObject = require('./isObject');\n\n/** `Object#toString` result references. */\nvar asyncTag = '[object AsyncFunction]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n proxyTag = '[object Proxy]';\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\nmodule.exports = isFunction;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\nmodule.exports = isLength;\n","var baseIsMap = require('./_baseIsMap'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsMap = nodeUtil && nodeUtil.isMap;\n\n/**\n * Checks if `value` is classified as a `Map` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n * @example\n *\n * _.isMap(new Map);\n * // => true\n *\n * _.isMap(new WeakMap);\n * // => false\n */\nvar isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;\n\nmodule.exports = isMap;\n","/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n","var baseIsSet = require('./_baseIsSet'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsSet = nodeUtil && nodeUtil.isSet;\n\n/**\n * Checks if `value` is classified as a `Set` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n * @example\n *\n * _.isSet(new Set);\n * // => true\n *\n * _.isSet(new WeakSet);\n * // => false\n */\nvar isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;\n\nmodule.exports = isSet;\n","var baseIsTypedArray = require('./_baseIsTypedArray'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\nmodule.exports = isTypedArray;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeys = require('./_baseKeys'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\nmodule.exports = keys;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeysIn = require('./_baseKeysIn'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\nfunction keysIn(object) {\n return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n}\n\nmodule.exports = keysIn;\n","/**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\nfunction stubArray() {\n return [];\n}\n\nmodule.exports = stubArray;\n","/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n return false;\n}\n\nmodule.exports = stubFalse;\n","import { connect, type BaseConnectionOptions } from \"@openfin/core-web\";\nimport { getSettings } from \"./settings\";\n\n/**\n * Initializes the OpenFin Web Broker connection.\n * @param inherit Should we inherit settings from the host (available in the OpenFin layout system) or use settings? Default is true.\n */\nexport async function init(inherit: boolean = true): Promise {\n\t// Set window.fin to the `fin` object.\n\tlet options: BaseConnectionOptions | undefined;\n\tif (window.fin === undefined) {\n\t\tif (!inherit) {\n\t\t\tconst settings = await getSettings();\n\t\t\tif (settings === undefined) {\n\t\t\t\tconsole.error(\n\t\t\t\t\t\"Unable to run the sample as we have been unable to load the web manifest and it's settings from the currently running html page. Please ensure that the web manifest is being served and that it contains the custom_settings section.\"\n\t\t\t\t);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\toptions = {\n\t\t\t\tbrokerUrl: settings.platform.interop.brokerUrl,\n\t\t\t\tinteropConfig: {\n\t\t\t\t\tproviderId: settings.platform.interop.providerId,\n\t\t\t\t\tcurrentContextGroup: settings.platform.interop.defaultContextGroup\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t\t// Specify an interopConfig with a specific provider ID and a context group to initialize the `fin.me.interop` client on connection.\n\t\tif (options) {\n\t\t\twindow.fin = await connect({\n\t\t\t\toptions\n\t\t\t});\n\t\t} else {\n\t\t\twindow.fin = await connect({\n\t\t\t\tconnectionInheritance: \"enabled\"\n\t\t\t});\n\t\t}\n\t\tconsole.log(\"Finished initializing the fin API.\");\n\t\t// Create and dispatch the finReady event\n\t\tconst event = new CustomEvent(\"finReady\");\n\t\twindow.dispatchEvent(event);\n\t}\n\n\tif (window.fdc3 === undefined && window?.fin?.me.interop?.getFDC3Sync !== undefined) {\n\t\twindow.fdc3 = fin.me.interop.getFDC3Sync(\"2.0\");\n\t\tconsole.log(\"Finished initializing the fdc3 API.\");\n\t\t// Create and dispatch the FDC3Ready event\n\t\tconst event = new CustomEvent(\"fdc3Ready\");\n\t\twindow.dispatchEvent(event);\n\t}\n}\n","import type { WebLayoutSnapshot } from \"@openfin/core-web\";\nimport type { Settings } from \"../shapes/setting-shapes\";\n\n/**\n * Fetches the settings for the application.\n * @returns The settings for the application.\n */\nexport async function getSettings(): Promise {\n\tconst settings = await getManifestSettings();\n\tif (settings === undefined) {\n\t\tconsole.error(\n\t\t\t\"Unable to run the example as settings are required and we fetch them from the link web manifest from the html page that is being served. It should exist in the customSettings section of the web manifest.\"\n\t\t);\n\t}\n\treturn settings;\n}\n\n/**\n * Returns a default layout from the settings if provided.\n * @returns The default layout from the settings.\n */\nexport async function getDefaultLayout(): Promise {\n\tconst settings = await getSettings();\n\tif (settings?.platform?.layout?.defaultLayout === undefined) {\n\t\tconsole.error(\n\t\t\t\"Unable to run the example as without a layout being defined. Please ensure that settings have been provided in the web manifest.\"\n\t\t);\n\t\treturn;\n\t}\n\tif (typeof settings.platform.layout.defaultLayout === \"string\") {\n\t\tconst layoutResponse = await fetch(settings.platform.layout.defaultLayout);\n\t\tconst layoutJson = (await layoutResponse.json()) as WebLayoutSnapshot;\n\t\treturn layoutJson;\n\t}\n\treturn settings.platform.layout.defaultLayout;\n}\n\n/**\n * Returns the settings from the manifest file.\n * @returns customSettings for this example\n */\nasync function getManifestSettings(): Promise {\n\t// Get the manifest link\n\tconst link = document.querySelector('link[rel=\"manifest\"]');\n\tif (link !== null) {\n\t\tconst manifestResponse = await fetch(link.href);\n\t\tconst manifestJson = (await manifestResponse.json()) as { custom_settings: Settings };\n\t\treturn manifestJson.custom_settings;\n\t}\n}\n","export { default as v1 } from './v1.js';\nexport { default as v3 } from './v3.js';\nexport { default as v4 } from './v4.js';\nexport { default as v5 } from './v5.js';\nexport { default as NIL } from './nil.js';\nexport { default as version } from './version.js';\nexport { default as validate } from './validate.js';\nexport { default as stringify } from './stringify.js';\nexport { default as parse } from './parse.js';","/*\n * Browser-compatible JavaScript MD5\n *\n * Modification of JavaScript MD5\n * https://github.com/blueimp/JavaScript-MD5\n *\n * Copyright 2011, Sebastian Tschan\n * https://blueimp.net\n *\n * Licensed under the MIT license:\n * https://opensource.org/licenses/MIT\n *\n * Based on\n * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message\n * Digest Algorithm, as defined in RFC 1321.\n * Version 2.2 Copyright (C) Paul Johnston 1999 - 2009\n * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet\n * Distributed under the BSD License\n * See http://pajhome.org.uk/crypt/md5 for more info.\n */\nfunction md5(bytes) {\n if (typeof bytes === 'string') {\n var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape\n\n bytes = new Uint8Array(msg.length);\n\n for (var i = 0; i < msg.length; ++i) {\n bytes[i] = msg.charCodeAt(i);\n }\n }\n\n return md5ToHexEncodedArray(wordsToMd5(bytesToWords(bytes), bytes.length * 8));\n}\n/*\n * Convert an array of little-endian words to an array of bytes\n */\n\n\nfunction md5ToHexEncodedArray(input) {\n var output = [];\n var length32 = input.length * 32;\n var hexTab = '0123456789abcdef';\n\n for (var i = 0; i < length32; i += 8) {\n var x = input[i >> 5] >>> i % 32 & 0xff;\n var hex = parseInt(hexTab.charAt(x >>> 4 & 0x0f) + hexTab.charAt(x & 0x0f), 16);\n output.push(hex);\n }\n\n return output;\n}\n/**\n * Calculate output length with padding and bit length\n */\n\n\nfunction getOutputLength(inputLength8) {\n return (inputLength8 + 64 >>> 9 << 4) + 14 + 1;\n}\n/*\n * Calculate the MD5 of an array of little-endian words, and a bit length.\n */\n\n\nfunction wordsToMd5(x, len) {\n /* append padding */\n x[len >> 5] |= 0x80 << len % 32;\n x[getOutputLength(len) - 1] = len;\n var a = 1732584193;\n var b = -271733879;\n var c = -1732584194;\n var d = 271733878;\n\n for (var i = 0; i < x.length; i += 16) {\n var olda = a;\n var oldb = b;\n var oldc = c;\n var oldd = d;\n a = md5ff(a, b, c, d, x[i], 7, -680876936);\n d = md5ff(d, a, b, c, x[i + 1], 12, -389564586);\n c = md5ff(c, d, a, b, x[i + 2], 17, 606105819);\n b = md5ff(b, c, d, a, x[i + 3], 22, -1044525330);\n a = md5ff(a, b, c, d, x[i + 4], 7, -176418897);\n d = md5ff(d, a, b, c, x[i + 5], 12, 1200080426);\n c = md5ff(c, d, a, b, x[i + 6], 17, -1473231341);\n b = md5ff(b, c, d, a, x[i + 7], 22, -45705983);\n a = md5ff(a, b, c, d, x[i + 8], 7, 1770035416);\n d = md5ff(d, a, b, c, x[i + 9], 12, -1958414417);\n c = md5ff(c, d, a, b, x[i + 10], 17, -42063);\n b = md5ff(b, c, d, a, x[i + 11], 22, -1990404162);\n a = md5ff(a, b, c, d, x[i + 12], 7, 1804603682);\n d = md5ff(d, a, b, c, x[i + 13], 12, -40341101);\n c = md5ff(c, d, a, b, x[i + 14], 17, -1502002290);\n b = md5ff(b, c, d, a, x[i + 15], 22, 1236535329);\n a = md5gg(a, b, c, d, x[i + 1], 5, -165796510);\n d = md5gg(d, a, b, c, x[i + 6], 9, -1069501632);\n c = md5gg(c, d, a, b, x[i + 11], 14, 643717713);\n b = md5gg(b, c, d, a, x[i], 20, -373897302);\n a = md5gg(a, b, c, d, x[i + 5], 5, -701558691);\n d = md5gg(d, a, b, c, x[i + 10], 9, 38016083);\n c = md5gg(c, d, a, b, x[i + 15], 14, -660478335);\n b = md5gg(b, c, d, a, x[i + 4], 20, -405537848);\n a = md5gg(a, b, c, d, x[i + 9], 5, 568446438);\n d = md5gg(d, a, b, c, x[i + 14], 9, -1019803690);\n c = md5gg(c, d, a, b, x[i + 3], 14, -187363961);\n b = md5gg(b, c, d, a, x[i + 8], 20, 1163531501);\n a = md5gg(a, b, c, d, x[i + 13], 5, -1444681467);\n d = md5gg(d, a, b, c, x[i + 2], 9, -51403784);\n c = md5gg(c, d, a, b, x[i + 7], 14, 1735328473);\n b = md5gg(b, c, d, a, x[i + 12], 20, -1926607734);\n a = md5hh(a, b, c, d, x[i + 5], 4, -378558);\n d = md5hh(d, a, b, c, x[i + 8], 11, -2022574463);\n c = md5hh(c, d, a, b, x[i + 11], 16, 1839030562);\n b = md5hh(b, c, d, a, x[i + 14], 23, -35309556);\n a = md5hh(a, b, c, d, x[i + 1], 4, -1530992060);\n d = md5hh(d, a, b, c, x[i + 4], 11, 1272893353);\n c = md5hh(c, d, a, b, x[i + 7], 16, -155497632);\n b = md5hh(b, c, d, a, x[i + 10], 23, -1094730640);\n a = md5hh(a, b, c, d, x[i + 13], 4, 681279174);\n d = md5hh(d, a, b, c, x[i], 11, -358537222);\n c = md5hh(c, d, a, b, x[i + 3], 16, -722521979);\n b = md5hh(b, c, d, a, x[i + 6], 23, 76029189);\n a = md5hh(a, b, c, d, x[i + 9], 4, -640364487);\n d = md5hh(d, a, b, c, x[i + 12], 11, -421815835);\n c = md5hh(c, d, a, b, x[i + 15], 16, 530742520);\n b = md5hh(b, c, d, a, x[i + 2], 23, -995338651);\n a = md5ii(a, b, c, d, x[i], 6, -198630844);\n d = md5ii(d, a, b, c, x[i + 7], 10, 1126891415);\n c = md5ii(c, d, a, b, x[i + 14], 15, -1416354905);\n b = md5ii(b, c, d, a, x[i + 5], 21, -57434055);\n a = md5ii(a, b, c, d, x[i + 12], 6, 1700485571);\n d = md5ii(d, a, b, c, x[i + 3], 10, -1894986606);\n c = md5ii(c, d, a, b, x[i + 10], 15, -1051523);\n b = md5ii(b, c, d, a, x[i + 1], 21, -2054922799);\n a = md5ii(a, b, c, d, x[i + 8], 6, 1873313359);\n d = md5ii(d, a, b, c, x[i + 15], 10, -30611744);\n c = md5ii(c, d, a, b, x[i + 6], 15, -1560198380);\n b = md5ii(b, c, d, a, x[i + 13], 21, 1309151649);\n a = md5ii(a, b, c, d, x[i + 4], 6, -145523070);\n d = md5ii(d, a, b, c, x[i + 11], 10, -1120210379);\n c = md5ii(c, d, a, b, x[i + 2], 15, 718787259);\n b = md5ii(b, c, d, a, x[i + 9], 21, -343485551);\n a = safeAdd(a, olda);\n b = safeAdd(b, oldb);\n c = safeAdd(c, oldc);\n d = safeAdd(d, oldd);\n }\n\n return [a, b, c, d];\n}\n/*\n * Convert an array bytes to an array of little-endian words\n * Characters >255 have their high-byte silently ignored.\n */\n\n\nfunction bytesToWords(input) {\n if (input.length === 0) {\n return [];\n }\n\n var length8 = input.length * 8;\n var output = new Uint32Array(getOutputLength(length8));\n\n for (var i = 0; i < length8; i += 8) {\n output[i >> 5] |= (input[i / 8] & 0xff) << i % 32;\n }\n\n return output;\n}\n/*\n * Add integers, wrapping at 2^32. This uses 16-bit operations internally\n * to work around bugs in some JS interpreters.\n */\n\n\nfunction safeAdd(x, y) {\n var lsw = (x & 0xffff) + (y & 0xffff);\n var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n return msw << 16 | lsw & 0xffff;\n}\n/*\n * Bitwise rotate a 32-bit number to the left.\n */\n\n\nfunction bitRotateLeft(num, cnt) {\n return num << cnt | num >>> 32 - cnt;\n}\n/*\n * These functions implement the four basic operations the algorithm uses.\n */\n\n\nfunction md5cmn(q, a, b, x, s, t) {\n return safeAdd(bitRotateLeft(safeAdd(safeAdd(a, q), safeAdd(x, t)), s), b);\n}\n\nfunction md5ff(a, b, c, d, x, s, t) {\n return md5cmn(b & c | ~b & d, a, b, x, s, t);\n}\n\nfunction md5gg(a, b, c, d, x, s, t) {\n return md5cmn(b & d | c & ~d, a, b, x, s, t);\n}\n\nfunction md5hh(a, b, c, d, x, s, t) {\n return md5cmn(b ^ c ^ d, a, b, x, s, t);\n}\n\nfunction md5ii(a, b, c, d, x, s, t) {\n return md5cmn(c ^ (b | ~d), a, b, x, s, t);\n}\n\nexport default md5;","export default '00000000-0000-0000-0000-000000000000';","import validate from './validate.js';\n\nfunction parse(uuid) {\n if (!validate(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n var v;\n var arr = new Uint8Array(16); // Parse ########-....-....-....-............\n\n arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24;\n arr[1] = v >>> 16 & 0xff;\n arr[2] = v >>> 8 & 0xff;\n arr[3] = v & 0xff; // Parse ........-####-....-....-............\n\n arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8;\n arr[5] = v & 0xff; // Parse ........-....-####-....-............\n\n arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8;\n arr[7] = v & 0xff; // Parse ........-....-....-####-............\n\n arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8;\n arr[9] = v & 0xff; // Parse ........-....-....-....-############\n // (Use \"/\" to avoid 32-bit truncation when bit-shifting high-order bytes)\n\n arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff;\n arr[11] = v / 0x100000000 & 0xff;\n arr[12] = v >>> 24 & 0xff;\n arr[13] = v >>> 16 & 0xff;\n arr[14] = v >>> 8 & 0xff;\n arr[15] = v & 0xff;\n return arr;\n}\n\nexport default parse;","export default /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;","// Unique ID creation requires a high quality random # generator. In the browser we therefore\n// require the crypto API and do not support built-in fallback to lower quality random number\n// generators (like Math.random()).\nvar getRandomValues;\nvar rnds8 = new Uint8Array(16);\nexport default function rng() {\n // lazy load so that environments that need to polyfill have a chance to do so\n if (!getRandomValues) {\n // getRandomValues needs to be invoked in a context where \"this\" is a Crypto implementation. Also,\n // find the complete implementation of crypto (msCrypto) on IE11.\n getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto !== 'undefined' && typeof msCrypto.getRandomValues === 'function' && msCrypto.getRandomValues.bind(msCrypto);\n\n if (!getRandomValues) {\n throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');\n }\n }\n\n return getRandomValues(rnds8);\n}","// Adapted from Chris Veness' SHA1 code at\n// http://www.movable-type.co.uk/scripts/sha1.html\nfunction f(s, x, y, z) {\n switch (s) {\n case 0:\n return x & y ^ ~x & z;\n\n case 1:\n return x ^ y ^ z;\n\n case 2:\n return x & y ^ x & z ^ y & z;\n\n case 3:\n return x ^ y ^ z;\n }\n}\n\nfunction ROTL(x, n) {\n return x << n | x >>> 32 - n;\n}\n\nfunction sha1(bytes) {\n var K = [0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xca62c1d6];\n var H = [0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0];\n\n if (typeof bytes === 'string') {\n var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape\n\n bytes = [];\n\n for (var i = 0; i < msg.length; ++i) {\n bytes.push(msg.charCodeAt(i));\n }\n } else if (!Array.isArray(bytes)) {\n // Convert Array-like to Array\n bytes = Array.prototype.slice.call(bytes);\n }\n\n bytes.push(0x80);\n var l = bytes.length / 4 + 2;\n var N = Math.ceil(l / 16);\n var M = new Array(N);\n\n for (var _i = 0; _i < N; ++_i) {\n var arr = new Uint32Array(16);\n\n for (var j = 0; j < 16; ++j) {\n arr[j] = bytes[_i * 64 + j * 4] << 24 | bytes[_i * 64 + j * 4 + 1] << 16 | bytes[_i * 64 + j * 4 + 2] << 8 | bytes[_i * 64 + j * 4 + 3];\n }\n\n M[_i] = arr;\n }\n\n M[N - 1][14] = (bytes.length - 1) * 8 / Math.pow(2, 32);\n M[N - 1][14] = Math.floor(M[N - 1][14]);\n M[N - 1][15] = (bytes.length - 1) * 8 & 0xffffffff;\n\n for (var _i2 = 0; _i2 < N; ++_i2) {\n var W = new Uint32Array(80);\n\n for (var t = 0; t < 16; ++t) {\n W[t] = M[_i2][t];\n }\n\n for (var _t = 16; _t < 80; ++_t) {\n W[_t] = ROTL(W[_t - 3] ^ W[_t - 8] ^ W[_t - 14] ^ W[_t - 16], 1);\n }\n\n var a = H[0];\n var b = H[1];\n var c = H[2];\n var d = H[3];\n var e = H[4];\n\n for (var _t2 = 0; _t2 < 80; ++_t2) {\n var s = Math.floor(_t2 / 20);\n var T = ROTL(a, 5) + f(s, b, c, d) + e + K[s] + W[_t2] >>> 0;\n e = d;\n d = c;\n c = ROTL(b, 30) >>> 0;\n b = a;\n a = T;\n }\n\n H[0] = H[0] + a >>> 0;\n H[1] = H[1] + b >>> 0;\n H[2] = H[2] + c >>> 0;\n H[3] = H[3] + d >>> 0;\n H[4] = H[4] + e >>> 0;\n }\n\n return [H[0] >> 24 & 0xff, H[0] >> 16 & 0xff, H[0] >> 8 & 0xff, H[0] & 0xff, H[1] >> 24 & 0xff, H[1] >> 16 & 0xff, H[1] >> 8 & 0xff, H[1] & 0xff, H[2] >> 24 & 0xff, H[2] >> 16 & 0xff, H[2] >> 8 & 0xff, H[2] & 0xff, H[3] >> 24 & 0xff, H[3] >> 16 & 0xff, H[3] >> 8 & 0xff, H[3] & 0xff, H[4] >> 24 & 0xff, H[4] >> 16 & 0xff, H[4] >> 8 & 0xff, H[4] & 0xff];\n}\n\nexport default sha1;","import validate from './validate.js';\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\n\nvar byteToHex = [];\n\nfor (var i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).substr(1));\n}\n\nfunction stringify(arr) {\n var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n var uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!validate(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n\n return uuid;\n}\n\nexport default stringify;","import rng from './rng.js';\nimport stringify from './stringify.js'; // **`v1()` - Generate time-based UUID**\n//\n// Inspired by https://github.com/LiosK/UUID.js\n// and http://docs.python.org/library/uuid.html\n\nvar _nodeId;\n\nvar _clockseq; // Previous uuid creation time\n\n\nvar _lastMSecs = 0;\nvar _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details\n\nfunction v1(options, buf, offset) {\n var i = buf && offset || 0;\n var b = buf || new Array(16);\n options = options || {};\n var node = options.node || _nodeId;\n var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not\n // specified. We do this lazily to minimize issues related to insufficient\n // system entropy. See #189\n\n if (node == null || clockseq == null) {\n var seedBytes = options.random || (options.rng || rng)();\n\n if (node == null) {\n // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)\n node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]];\n }\n\n if (clockseq == null) {\n // Per 4.2.2, randomize (14 bit) clockseq\n clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;\n }\n } // UUID timestamps are 100 nano-second units since the Gregorian epoch,\n // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so\n // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'\n // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.\n\n\n var msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock\n // cycle to simulate higher resolution clock\n\n var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs)\n\n var dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression\n\n if (dt < 0 && options.clockseq === undefined) {\n clockseq = clockseq + 1 & 0x3fff;\n } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new\n // time interval\n\n\n if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {\n nsecs = 0;\n } // Per 4.2.1.2 Throw error if too many uuids are requested\n\n\n if (nsecs >= 10000) {\n throw new Error(\"uuid.v1(): Can't create more than 10M uuids/sec\");\n }\n\n _lastMSecs = msecs;\n _lastNSecs = nsecs;\n _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch\n\n msecs += 12219292800000; // `time_low`\n\n var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;\n b[i++] = tl >>> 24 & 0xff;\n b[i++] = tl >>> 16 & 0xff;\n b[i++] = tl >>> 8 & 0xff;\n b[i++] = tl & 0xff; // `time_mid`\n\n var tmh = msecs / 0x100000000 * 10000 & 0xfffffff;\n b[i++] = tmh >>> 8 & 0xff;\n b[i++] = tmh & 0xff; // `time_high_and_version`\n\n b[i++] = tmh >>> 24 & 0xf | 0x10; // include version\n\n b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)\n\n b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low`\n\n b[i++] = clockseq & 0xff; // `node`\n\n for (var n = 0; n < 6; ++n) {\n b[i + n] = node[n];\n }\n\n return buf || stringify(b);\n}\n\nexport default v1;","import v35 from './v35.js';\nimport md5 from './md5.js';\nvar v3 = v35('v3', 0x30, md5);\nexport default v3;","import stringify from './stringify.js';\nimport parse from './parse.js';\n\nfunction stringToBytes(str) {\n str = unescape(encodeURIComponent(str)); // UTF8 escape\n\n var bytes = [];\n\n for (var i = 0; i < str.length; ++i) {\n bytes.push(str.charCodeAt(i));\n }\n\n return bytes;\n}\n\nexport var DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8';\nexport var URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8';\nexport default function (name, version, hashfunc) {\n function generateUUID(value, namespace, buf, offset) {\n if (typeof value === 'string') {\n value = stringToBytes(value);\n }\n\n if (typeof namespace === 'string') {\n namespace = parse(namespace);\n }\n\n if (namespace.length !== 16) {\n throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)');\n } // Compute hash of namespace and value, Per 4.3\n // Future: Use spread syntax when supported on all platforms, e.g. `bytes =\n // hashfunc([...namespace, ... value])`\n\n\n var bytes = new Uint8Array(16 + value.length);\n bytes.set(namespace);\n bytes.set(value, namespace.length);\n bytes = hashfunc(bytes);\n bytes[6] = bytes[6] & 0x0f | version;\n bytes[8] = bytes[8] & 0x3f | 0x80;\n\n if (buf) {\n offset = offset || 0;\n\n for (var i = 0; i < 16; ++i) {\n buf[offset + i] = bytes[i];\n }\n\n return buf;\n }\n\n return stringify(bytes);\n } // Function#name is not settable on some platforms (#270)\n\n\n try {\n generateUUID.name = name; // eslint-disable-next-line no-empty\n } catch (err) {} // For CommonJS default export support\n\n\n generateUUID.DNS = DNS;\n generateUUID.URL = URL;\n return generateUUID;\n}","import rng from './rng.js';\nimport stringify from './stringify.js';\n\nfunction v4(options, buf, offset) {\n options = options || {};\n var rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n offset = offset || 0;\n\n for (var i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n\n return buf;\n }\n\n return stringify(rnds);\n}\n\nexport default v4;","import v35 from './v35.js';\nimport sha1 from './sha1.js';\nvar v5 = v35('v5', 0x50, sha1);\nexport default v5;","import REGEX from './regex.js';\n\nfunction validate(uuid) {\n return typeof uuid === 'string' && REGEX.test(uuid);\n}\n\nexport default validate;","import validate from './validate.js';\n\nfunction version(uuid) {\n if (!validate(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n return parseInt(uuid.substr(14, 1), 16);\n}\n\nexport default version;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = (module) => {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","import type { Context } from \"@finos/fdc3\";\nimport { init } from \"../platform/api\";\n\nwindow.addEventListener(\"DOMContentLoaded\", async () => {\n\tawait init(false);\n\tawait initializeDOM();\n});\n\n/**\n * Adds an FDC3 context listener to the window.\n */\nasync function addFDC3Listener(): Promise {\n\tif (window.fdc3) {\n\t\tawait window.fdc3.addContextListener(null, (context) => {\n\t\t\tupdateDOMElements(context);\n\t\t});\n\t} else {\n\t\twindow.addEventListener(\"fdc3Ready\", async () => {\n\t\t\tawait window.fdc3.addContextListener(null, (context) => {\n\t\t\t\tupdateDOMElements(context);\n\t\t\t});\n\t\t});\n\t}\n}\n\n/**\n * Updates the DOM elements with the provided context.\n * @param context The context to update the DOM elements with.\n */\nfunction updateDOMElements(context: Context): void {\n\tconst contextTypeSpan = document.querySelector(\"#contextType\");\n\tconst contextNameSpan = document.querySelector(\"#contextName\");\n\tconst contextBodyPre = document.querySelector(\"#contextBody\");\n\n\tif (contextTypeSpan !== null && contextNameSpan !== null && contextBodyPre !== null) {\n\t\tcontextTypeSpan.textContent = context.type;\n\t\tcontextNameSpan.textContent = context.name ?? \"No name provided.\";\n\t\tcontextBodyPre.textContent = JSON.stringify(context, null, 2);\n\t}\n}\n\n/**\n * Initialize the DOM elements.\n */\nasync function initializeDOM(): Promise {\n\tawait addFDC3Listener();\n}\n"],"names":[],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"fdc3-panel.bundle.js","mappings":";;;;;;;;;;AAAa,MAAM,mBAAO,CAAC,qFAAoB,EAAE,mBAAO,CAAC,mDAAS,EAAE,mBAAO,CAAC,+DAAM,EAAE,mBAAO,CAAC,mDAAQ,EAAE,mBAAO,CAAC,gEAAkB,EAAE,mBAAO,CAAC,4DAAgB,EAAE,eAAe;;;;;;;;;;;;ACA9J,MAAM,mBAAO,CAAC,mDAAS,IAAI,mBAAO,CAAC,mDAAQ,IAAI,mBA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AkC,OAAO,EAAE,GAAG,mHAAmH,OAAO,0BAA0B,oBAAoB,aAAa,yBAAyB,iBAAiB,qCAAqC,EAAE,cAAc,2CAA2C,kDAAkD,OAAO,uBAAuB,SAAS,MAAM,OAAO,cAAc,eAAe,2BAA2B,OAAO,eAAe,sDAAsD,oCAAoC,IAAI,iIAAiI,sBAAsB,yCAAyC,2FAA2F;;;;;;;;;;;;ACFv6nD;;AAEZ,kBAAkB;AAClB,mBAAmB;AACnB,qBAAqB;;AAErB;AACA;AACA;;AAEA;AACA,mCAAmC,SAAS;AAC5C;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,cAAc,SAAS;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,2CAA2C,UAAU;AACrD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;ACrJA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEY;;AAEZ,eAAe,mBAAO,CAAC,wDAAW;AAClC,gBAAgB,mBAAO,CAAC,oDAAS;AACjC;AACA;AACA;AACA;;AAEA,cAAc;AACd,kBAAkB;AAClB,yBAAyB;;AAEzB;AACA,kBAAkB;;AAElB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,kBAAkB,YAAY;AAC9B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA,wCAAwC,SAAS;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;;AAEA;AACA;AACA,cAAc,iBAAiB;AAC/B;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,iDAAiD,EAAE;AACnD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C;AAC1C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA,yBAAyB,eAAe;AACxC;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,yBAAyB,QAAQ;AACjC;AACA,sBAAsB,eAAe;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc,YAAY;AAC1B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB,sBAAsB;AACxC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,mBAAmB;AACnB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA,oBAAoB,SAAS;AAC7B;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA,qBAAqB,WAAW,GAAG,IAAI;AACvC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA,gBAAgB,WAAW,GAAG,IAAI,KAAK,aAAa;AACpD;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;;AAEA;AACA,GAAG;AACH;AACA;AACA,mBAAmB,KAAK,mDAAmD,cAAc;AACzF,GAAG;AACH;AACA;AACA,+BAA+B,IAAI;AACnC;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,MAAM,aAAa,SAAS;AACtD;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,SAAS,gBAAgB;AACzB,cAAc,oBAAoB,EAAE,IAAI;AACxC;AACA,YAAY,gBAAgB,EAAE,IAAI;AAClC;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,GAAG,SAAS,GAAG,KAAK,qBAAqB,EAAE,EAAE;AACpE,QAAQ;AACR,yBAAyB,GAAG,KAAK,yBAAyB,EAAE,EAAE;AAC9D,mBAAmB,yBAAyB,EAAE,EAAE;AAChD;AACA,MAAM;AACN,oBAAoB,IAAI,EAAE,GAAG,SAAS,IAAI,EAAE,EAAE;AAC9C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,0CAA0C,cAAc,SAAS,OAAO;AACxE;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,kBAAkB,YAAY;AAC9B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,kBAAkB,gBAAgB;AAClC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,kBAAkB,gBAAgB;AAClC;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,cAAc,YAAY;AAC1B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,QAAQ;AAC1B;AACA,oBAAoB,QAAQ;AAC5B;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;;;;;ACzjEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEa;;AAEb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB;;AAEnB;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,sBAAsB;AACxC;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA,eAAe;AACf;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA,oBAAoB,SAAS;AAC7B;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;;AAEA,kCAAkC,QAAQ;AAC1C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oBAAoB,iBAAiB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,QAAQ;AACR;AACA,uCAAuC,QAAQ;AAC/C;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,OAAO;AACzB;AACA;AACA;;AAEA;AACA,SAAS,yBAAyB;AAClC;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,gBAAgB;AAClC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,8DAA8D,YAAY;AAC1E;AACA,8DAA8D,YAAY;AAC1E;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,qCAAqC,YAAY;AACjD;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;AACA;;;;;;;;;;;AChfA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,SAAS,WAAW;;AAEpB;AACA;AACA;AACA,SAAS,WAAW;;AAEpB;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,M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AAO;AAClB,WAAW,UAAU;AACrB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACxBA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,kBAAkB,mBAAO,CAAC,+DAAe;AACzC,cAAc,mBAAO,CAAC,uDAAW;AACjC,eAAe,mBAAO,CAAC,yDAAY;AACnC,cAAc,mBAAO,CAAC,yDAAY;AAClC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,SAAS;AACpB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AChDA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACnBA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,UAAU;AACrB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACtBA,sBAAsB,mBAAO,CAAC,yEAAoB;AAClD,SAAS,mBAAO,CAAC,6CAAM;;AAEvB;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC3BA,SAAS,mBAAO,CAAC,6CAAM;;AAEvB;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,GAAG;AACd,aAAa,QAA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AC,uDAAW;AACjC,eAAe,mBAAO,CAAC,yDAAY;AACnC,YAAY,mBAAO,CAAC,mDAAS;AAC7B,eAAe,mBAAO,CAAC,yDAAY;AACnC,YAAY,mBAAO,CAAC,mDAAS;AAC7B,WAAW,mBAAO,CAAC,iDAAQ;AAC3B,aAAa,mBAAO,CAAC,qDAAU;;AAE/B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,SAAS;AACpB;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa,GAAG;AAChB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;AACA,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;;;;;;;;;;ACrKA,eAAe,mBAAO,CAAC,yDAAY;;AAEnC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AA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AAE3C;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClFA,aAAa,mBAAO,CAAC,uDAAW;AAChC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA,iBAAiB,mBAAO,CAAC,6DAAc;AACvC,eAAe,mBAAO,CAAC,2DAAa;AACpC,eAAe,mBAAO,CAAC,yDAAY;AACnC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;AACA;AACA;AACA,oCAAoC;;AAEpC;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC9CA,aAAa,mBAAO,CAAC,uDAAW;AAChC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,eAAe,mBAAO,CAAC,yDAAY;AACnC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC3DA,kBAAkB,mBAAO,CAAC,iEAAgB;AAC1C,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC7BA,eAAe,mBAAO,CAAC,yDAAY;AACnC,kBAAkB,mBAAO,CAAC,iEAAgB;AAC1C,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AChCA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACnBA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,aAAa,UAAU;AACvB;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACbA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACZA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ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACnFA,aAAa,mBAAO,CAAC,uDAAW;AAChC,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,SAAS,mBAAO,CAAC,6CAAM;AACvB,kBAAkB,mBAAO,CAAC,iEAAgB;AAC1C,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC/GA,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AAC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A;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACzDA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa,GAAG;AAChB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACZA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACdA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AChBA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,GAAG;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC7BA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACtBA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACtBA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACzBA,uBAAuB,mBAAO,CAAC,2EAAqB;AACpD,oBAAoB,mBAAO,CAAC,qEAAkB;AAC9C,kBAAkB,mBAAO,CAAC,iEAAgB;AAC1C,kBAAkB,mBAAO,CAAC,iEAAgB;AAC1C,sBAAsB,mBAAO,CAAC,yEAAoB;;AAElD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC5EA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,mBAAmB,mBAAO,CAAC,mEAAiB;AAC5C,kBAAkB,mBAAO,CAAC,iEAAgB;;AAE1C;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACxBA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACdA,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACnBA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,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;AACA;AACA,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,aAAa,UAAU;AACvB;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACdA,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;ACRA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACbA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;;;;;;;;;;ACjBA,gBAAgB,mBAAO,CAAC,6DAAc;;AAEtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACdA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,GAAG;AAChB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACbA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACbA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,UAAU,mBAAO,CAAC,iDAAQ;AAC1B,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjCA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;;;;;;;;;;;ACzBA,gBAAgB,mBAAO,CAAC,6DAAc;;AAEtC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,GAAG;AAChB;AACA;AACA;AACA,oBAAoB,QAAQ,IAAI,QAAQ;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,kBAAkB;AAClB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpCA,sBAAsB,mBAAO,CAAC,yEAAoB;AAClD,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA,8BAA8B,mBAAmB;AACjD;AACA;AACA;AACA;AACA;AACA,+CAA+C,mBAAmB;AAClE;AACA;AACA;;AAEA;;;;;;;;;;;ACnCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACzBA,iBAAiB,mBAAO,CAAC,6DAAc;AACvC,eAAe,mBAAO,CAAC,yDAAY;;AAEnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AChCA,WAAW,mBAAO,CAAC,mDAAS;AAC5B,gBAAgB,mBAAO,CAAC,2DAAa;;AAErC;AACA,kBAAkB,KAA0B;;AAE5C;AACA,gCAAgC,QAAa;;AAE7C;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACrCA,kBAAkB,mBAAO,CAAC,iEAAgB;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,kBAAkB;AAClB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClCA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,eAAe,mBAAO,CAAC,yDAAY;;AAEnC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpCA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClCA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC1BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC9BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC5BA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC1BA,uBAAuB,mBAAO,CAAC,2EAAqB;AACpD,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC1BA,oBAAoB,mBAAO,CAAC,qEAAkB;AAC9C,eAAe,mBAAO,CAAC,2DAAa;AACpC,kBAAkB,mBAAO,CAAC,+DAAe;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AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD;;AAEnD;;AAEA,oBAAoB,gBAAgB;AACpC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA,kBAAkB,cAAc;AAChC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,kBAAkB,cAAc;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,kBAAkB,aAAa;AAC/B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,iEAAe,GAAG;;;;;;;;;;;;;;;ACtNlB,iEAAe,sCAAsC;;;;;;;;;;;;;;;;ACAhB;;AAErC;AACA,OAAO,wDAAQ;AACf;AACA;;AAEA;AACA,gCAAgC;;AAEhC;AACA;AACA;AACA,qBAAqB;;AAErB;AACA,qBAAqB;;AAErB;AACA,qBAAqB;;AAErB;AACA,qBAAqB;AACrB;;AAEA;AACA;AACA;AACA;AACA;AACA;A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GG;AACH,SAAS,iBAAiB,CAAC,OAAgB;IAC1C,MAAM,eAAe,GAAG,QAAQ,CAAC,aAAa,CAAkB,cAAc,CAAC,CAAC;IAChF,MAAM,eAAe,GAAG,QAAQ,CAAC,aAAa,CAAkB,cAAc,CAAC,CAAC;IAChF,MAAM,cAAc,GAAG,QAAQ,CAAC,aAAa,CAAiB,cAAc,CAAC,CAAC;IAE9E,IAAI,eAAe,KAAK,IAAI,IAAI,eAAe,KAAK,IAAI,IAAI,cAAc,KAAK,IAAI,EAAE,CAAC;QACrF,eAAe,CAAC,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;QAC3C,eAAe,CAAC,WAAW,GAAG,OAAO,CAAC,IAAI,IAAI,mBAAmB,CAAC;QAClE,cAAc,CAAC,WAAW,GAAG,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;IAC/D,CAAC;AACF,CAAC;AAED;;GAEG;AACH,KAAK,UAAU,aAAa;IAC3B,MAAM,eAAe,EAAE,CAAC;AACzB,CAAC","sources":["webpack://openfin-web--cloud-interop/../../node_modules/@openfin/core-web/out/api-client.js","webpack://openfin-web--cloud-interop/../../node_modules/@openfin/core-web/out/main-8cad4070.js","webpack://openfin-web--cloud-interop/../../node_modules/@openfin/core-web/out/main-b14f67c9.js","webpack://openfin-web--cloud-interop/../../node_modules/base64-js/index.js","webpack://openfin-web--cloud-interop/../../node_modules/buffer/index.js","webpack://openfin-web--cloud-interop/../../node_modules/events/events.js","webpack://openfin-web--cloud-interop/../../node_modules/ieee754/index.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_DataView.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_Hash.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_ListCache.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_Map.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_MapCache.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_Promise.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_Set.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_SetCache.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_Stack.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_Symbol.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_Uint8Array.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_WeakMap.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_arrayEach.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_arrayFilter.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_arrayLikeKeys.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_arrayPush.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_arraySome.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_assignValue.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_assocIndexOf.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseAssign.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseAssignIn.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseAssignValue.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseClone.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseCreate.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseGetAllKeys.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseGetTag.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseIsArguments.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseIsEqual.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseIsEqualDeep.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseIsMap.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseIsNative.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseIsSet.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseIsTypedArray.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseKeys.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseKeysIn.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseTimes.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseUnary.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_cacheHas.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_cloneArrayBuffer.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_cloneBuffer.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_cloneDataView.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_cloneRegExp.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_cloneSymbol.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_cloneTypedArray.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_copyArray.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_copyObject.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_copySymbols.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_copySymbolsIn.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_coreJsData.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_defineProperty.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_equalArrays.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_equalByTag.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_equalObjects.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_freeGlobal.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_getAllKeys.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_getAllKeysIn.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_getMapData.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_getNative.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_getPrototype.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_getRawTag.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_getSymbols.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_getSymbolsIn.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_getTag.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_getValue.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_hashClear.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_hashDelete.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_hashGet.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_hashHas.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_hashSet.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_initCloneArray.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_initCloneByTag.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_initCloneObject.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_isIndex.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_isKeyable.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_isMasked.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_isPrototype.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_listCacheClear.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_listCacheDelete.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_listCacheGet.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_listCacheHas.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_listCacheSet.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_mapCacheClear.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_mapCacheDelete.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_mapCacheGet.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_mapCacheHas.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_mapCacheSet.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_mapToArray.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_nativeCreate.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_nativeKeys.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_nativeKeysIn.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_nodeUtil.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_objectToString.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_overArg.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_root.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_setCacheAdd.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_setCacheHas.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_setToArray.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_stackClear.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_stackDelete.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_stackGet.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_stackHas.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_stackSet.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_toSource.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/cloneDeep.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/eq.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/isArguments.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/isArray.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/isArrayLike.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/isBuffer.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/isEqual.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/isFunction.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/isLength.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/isMap.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/isObject.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/isObjectLike.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/isSet.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/isTypedArray.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/keys.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/keysIn.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/stubArray.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/stubFalse.js","webpack://openfin-web--cloud-interop/./client/src/platform/api.ts","webpack://openfin-web--cloud-interop/./client/src/platform/settings.ts","webpack://openfin-web--cloud-interop/../../node_modules/uuid/dist/esm-browser/index.js","webpack://openfin-web--cloud-interop/../../node_modules/uuid/dist/esm-browser/md5.js","webpack://openfin-web--cloud-interop/../../node_modules/uuid/dist/esm-browser/nil.js","webpack://openfin-web--cloud-interop/../../node_modules/uuid/dist/esm-browser/parse.js","webpack://openfin-web--cloud-interop/../../node_modules/uuid/dist/esm-browser/regex.js","webpack://openfin-web--cloud-interop/../../node_modules/uuid/dist/esm-browser/rng.js","webpack://openfin-web--cloud-interop/../../node_modules/uuid/dist/esm-browser/sha1.js","webpack://openfin-web--cloud-interop/../../node_modules/uuid/dist/esm-browser/stringify.js","webpack://openfin-web--cloud-interop/../../node_modules/uuid/dist/esm-browser/v1.js","webpack://openfin-web--cloud-interop/../../node_modules/uuid/dist/esm-browser/v3.js","webpack://openfin-web--cloud-interop/../../node_modules/uuid/dist/esm-browser/v35.js","webpack://openfin-web--cloud-interop/../../node_modules/uuid/dist/esm-browser/v4.js","webpack://openfin-web--cloud-interop/../../node_modules/uuid/dist/esm-browser/v5.js","webpack://openfin-web--cloud-interop/../../node_modules/uuid/dist/esm-browser/validate.js","webpack://openfin-web--cloud-interop/../../node_modules/uuid/dist/esm-browser/version.js","webpack://openfin-web--cloud-interop/webpack/bootstrap","webpack://openfin-web--cloud-interop/webpack/runtime/define property getters","webpack://openfin-web--cloud-interop/webpack/runtime/global","webpack://openfin-web--cloud-interop/webpack/runtime/hasOwnProperty shorthand","webpack://openfin-web--cloud-interop/webpack/runtime/make namespace object","webpack://openfin-web--cloud-interop/webpack/runtime/node module decorator","webpack://openfin-web--cloud-interop/./client/src/content/fdc3-panel.ts"],"sourcesContent":["\"use strict\";var e=require(\"./main-8cad4070.js\");require(\"buffer/\"),require(\"uuid\"),require(\"events\"),require(\"lodash/cloneDeep\"),require(\"lodash/isEqual\"),exports.connect=e.connect;\n","\"use strict\";var e=require(\"buffer/\"),t=require(\"events\"),n=require(\"lodash/cloneDeep\"),i=require(\"lodash/isEqual\"),r=require(\"uuid\");const o=(e,t)=>`${t}<${btoa(JSON.stringify(e))}>`;var s=\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof window?window:\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:{},a={},c={},d={},h={};async function l(e){const t=[];for(const n of e){const e=await n();t.push(e)}return t}Object.defineProperty(h,\"__esModule\",{value:!0}),h.promiseMapSerial=h.serial=h.promiseMap=h.promisify=void 0,h.promisify=function(e){return(...t)=>new Promise(((n,i)=>{e(...t,((e,t)=>e?i(e):n(t)))}))},h.promiseMap=async function(e,t){return Promise.all(e.map(t))},h.serial=l,h.promiseMapSerial=async function(e,t){return l(e.map(((e,n,i)=>()=>t(e,n,i))))};var u,p=s&&s.__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},w=s&&s.__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)};Object.defineProperty(d,\"__esModule\",{value:!0}),d.Reply=d.EmitterBase=d.Base=void 0;const y=h;class f{constructor(e){this.isNodeEnvironment=()=>\"node\"===this.wire.environment.type,this.isOpenFinEnvironment=()=>\"openfin\"===this.wire.environment.type,this.isBrowserEnvironment=()=>\"other\"===this.wire.environment.type,this.wire=e}get fin(){return this.wire.getFin()}get me(){return this.wire.me}}d.Base=f;d.EmitterBase=class extends f{constructor(e,t,...n){super(e),this.topic=t,u.set(this,void 0),this.eventNames=()=>this.hasEmitter()?this.getOrCreateEmitter().eventNames():[],this.emit=(e,t,...n)=>!!this.hasEmitter()&&this.getOrCreateEmitter().emit(e,t,...n),this.hasEmitter=()=>this.wire.eventAggregator.has(w(this,u,\"f\")),this.getOrCreateEmitter=()=>this.wire.eventAggregator.getOrCreate(w(this,u,\"f\")),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[],this.listenerCount=e=>this.hasEmitter()?this.getOrCreateEmitter().listenerCount(e):0,this.registerEventListener=async(e,t={},n,i)=>{const r={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e},o=this.getOrCreateEmitter();n(o);try{await this.wire.sendAction(\"subscribe-to-desktop-event\",r)}catch(e){throw i(o),this.deleteEmitterIfNothingRegistered(o),e}},this.deregisterEventListener=async(e,t={})=>{if(this.hasEmitter()){const n={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e};await this.wire.sendAction(\"unsubscribe-to-desktop-event\",n).catch((()=>null));return this.getOrCreateEmitter()}return Promise.resolve()},p(this,u,[t,...n],\"f\"),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[]}async on(e,t,n){return await this.registerEventListener(e,n,(n=>{n.on(e,t)}),(n=>{n.removeListener(e,t)})),this}async addListener(e,t,n){return this.on(e,t,n)}async once(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.once(e,i),n.once(e,t)}),(n=>{n.removeListener(e,i),n.removeListener(e,t)})),this}async prependListener(e,t,n){return await this.registerEventListener(e,n,(n=>{n.prependListener(e,t)}),(n=>{n.removeListener(e,t)})),this}async prependOnceListener(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.prependOnceListener(e,t),n.once(e,i)}),(n=>{n.removeListener(e,t),n.removeListener(e,i)})),this}async removeListener(e,t,n){const i=await this.deregisterEventListener(e,n);return i&&(i.removeListener(e,t),this.deleteEmitterIfNothingRegistered(i)),this}async deregisterAllListeners(e){const t={...this.identity,type:e,topic:this.topic};if(this.hasEmitter()){const e=this.getOrCreateEmitter(),n=e.listenerCount(t.type),i=[];for(let e=0;enull)));return await Promise.all(i),e}}async removeAllListeners(e){const t=async e=>{const t=await this.deregisterAllListeners(e);t&&(t.removeAllListeners(e),this.deleteEmitterIfNothingRegistered(t))};if(e)await t(e);else if(this.hasEmitter()){const e=this.getOrCreateEmitter().eventNames();await(0,y.promiseMap)(e,t)}return this}deleteEmitterIfNothingRegistered(e){0===e.eventNames().length&&this.wire.eventAggregator.delete(w(this,u,\"f\"))}},u=new WeakMap;d.Reply=class{};var g={};Object.defineProperty(g,\"__esModule\",{value:!0});var m=g.RuntimeError=g.NotSupportedError=g.NotImplementedError=g.NoAckError=g.DuplicateCorrelationError=g.UnexpectedActionError=g.DisconnectedError=void 0;class v extends Error{constructor(e){super(`Expected websocket state OPEN but found ${e}`),this.readyState=e}}g.DisconnectedError=v;class C extends Error{}g.UnexpectedActionError=C;class b extends Error{}g.DuplicateCorrelationError=b;class I extends Error{}g.NoAckError=I;class E extends Error{}g.NotImplementedError=E;class x extends Error{}g.NotSupportedError=x;class A extends Error{constructor(e){const{message:t,name:n,stack:i,...r}=e;super(t),this.name=n||\"Error\",this.stack=i??this.toString(),Object.keys(r).forEach((e=>{this[e]=r[e]}))}}class P extends Error{static getCallSite(e=0){const t=Error.stackTraceLimit,n=e+1;Error.stackTraceLimit=t+n;const i=Error.prepareStackTrace;Error.prepareStackTrace=(e,t)=>t;const r=(new Error).stack?.slice(n)??[];return Error.prepareStackTrace=i,Error.stackTraceLimit=t,r}static prepareStackTrace(e,t){if(\"function\"==typeof Error.prepareStackTrace)return Error.prepareStackTrace(e,t);let n=\"\";n+=e.name||\"Error\",n+=`: ${e.message||\"\"}`;for(const e of t)n+=`\\n at ${e.toString()}`;return n}constructor(e,t){const{reason:n,error:i}=e;super(n),this.name=\"RuntimeError\",i?.stack&&(this.cause=new A(i)),t&&(this.stack=P.prepareStackTrace(this,t))}}m=g.RuntimeError=P;var M={},_={},O={};Object.defineProperty(O,\"__esModule\",{value:!0}),O.validateIdentity=void 0,O.validateIdentity=function(e){let t;return\"object\"==typeof e&&\"string\"==typeof e.uuid||(t=\"Not a valid identity object\"),t};var S={},R={},F={},j={},k={},L={},T={};Object.defineProperty(T,\"__esModule\",{value:!0}),T.handleDeprecatedWarnings=void 0;var $;T.handleDeprecatedWarnings=e=>{(e.contentNavigation?.whitelist||e.contentNavigation?.blacklist||e.contentRedirect?.whitelist||e.contentRedirect?.blacklist)&&console.warn(\"The properties 'whitelist' and 'blacklist' have been marked as deprecated and will be removed in a future version. Please use 'allowlist' and 'denylist'.\")};var B={},G={};Object.defineProperty(G,\"__esModule\",{value:!0}),G.AsyncRetryableLazy=W=G.Lazy=void 0;var W=G.Lazy=class{constructor(e){this.producerFn=e}getValue(){return this.value||(this.value=this.producerFn()),this.value}};G.AsyncRetryableLazy=class{constructor(e){this.producerFn=e}async getValue(){return this.promise||(this.promise=this.producerFn().catch((e=>{throw delete this.promise,e}))),this.promise}};var H={};Object.defineProperty(H,\"__esModule\",{value:!0}),H.WebContents=void 0;const N=d;class D extends N.EmitterBase{constructor(e,t,n){super(e,n,t.uuid,t.name),this.identity=t,this.entityType=n}capturePage(e){return this.wire.sendAction(\"capture-page\",{options:e,...this.identity}).then((({payload:e})=>e.data))}executeJavaScript(e){return this.wire.sendAction(\"execute-javascript-in-window\",{...this.identity,code:e}).then((({payload:e})=>e.data))}getZoomLevel(){return this.wire.sendAction(\"get-zoom-level\",this.identity).then((({payload:e})=>e.data))}setZoomLevel(e){return this.wire.sendAction(\"set-zoom-level\",{...this.identity,level:e}).then((()=>{}))}navigate(e){return this.wire.sendAction(\"navigate-window\",{...this.identity,url:e}).then((()=>{}))}navigateBack(){return this.wire.sendAction(\"navigate-window-back\",{...this.identity}).then((()=>{}))}async navigateForward(){await this.wire.sendAction(\"navigate-window-forward\",{...this.identity})}stopNavigation(){return this.wire.sendAction(\"stop-window-navigation\",{...this.identity}).then((()=>{}))}reload(e=!1){return this.wire.sendAction(\"reload-window\",{ignoreCache:e,...this.identity}).then((()=>{}))}print(e={}){return this.wire.sendAction(\"print\",{...this.identity,options:e}).then((()=>{}))}findInPage(e,t){return this.wire.sendAction(\"find-in-page\",{...this.identity,searchTerm:e,options:t}).then((({payload:e})=>e.data))}stopFindInPage(e){return this.wire.sendAction(\"stop-find-in-page\",{...this.identity,action:e}).then((()=>{}))}getPrinters(){return this.wire.sendAction(\"get-printers\",{...this.identity}).then((({payload:e})=>e.data))}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){await this.wire.sendAction(\"focus-window\",{emitSynthFocused:e,...this.identity})}async showDeveloperTools(){await this.wire.sendAction(\"show-developer-tools\",this.identity)}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction(\"get-process-info\",this.identity);return e}async getSharedWorkers(){return this.wire.sendAction(\"get-shared-workers\",this.identity).then((({payload:e})=>e.data))}async inspectSharedWorker(){await this.wire.sendAction(\"inspect-shared-worker\",{...this.identity})}async inspectSharedWorkerById(e){await this.wire.sendAction(\"inspect-shared-worker-by-id\",{...this.identity,workerId:e})}async inspectServiceWorker(){await this.wire.sendAction(\"inspect-service-worker\",{...this.identity})}async showPopupWindow(e){if(this.wire.sendAction(`${this.entityType}-show-popup-window`,this.identity).catch((()=>{})),e?.onPopupReady){const t=async({popupName:t})=>{try{const n=this.fin.Window.wrapSync({uuid:this.fin.me.uuid,name:t});await e.onPopupReady(n)}catch(e){throw new Error(`Something went wrong during onPopupReady execution: ${e}`)}};await this.once(\"popup-ready\",t)}const{payload:t}=await this.wire.sendAction(\"try-create-popup-window\",{options:{...e,hasResultCallback:!!e?.onPopupResult,hasReadyCallback:!!e?.onPopupReady},...this.identity}),{data:{willOpen:n,options:i}}=t;n&&await this.fin.Window.create(i.initialOptions);if(e?.onPopupResult){const t=async t=>{await e.onPopupResult((e=>{const{name:t,uuid:n,result:i,data:r}=e,o={identity:{name:t,uuid:n},result:i};return r&&(o.data=r),o})(t))},n=async()=>{await this.removeListener(\"popup-result\",t)};await this.on(\"popup-result\",t),await this.once(\"popup-teardown\",n)}const{payload:r}=await this.wire.sendAction(\"show-popup-window\",{options:i,...this.identity});return r.data}}var U,V,z,K,q;function J(){return V||(V=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(function(){if($)return L;$=1,Object.defineProperty(L,\"__esModule\",{value:!0}),L.ViewModule=void 0;const e=d,t=O,n=J(),i=T;class r extends e.Base{async create(e){const{uuid:t}=this.wire.me;if(!e.name||\"string\"!=typeof e.name)throw new Error(\"Please provide a name property as a string in order to create a View.\");return(0,i.handleDeprecatedWarnings)(e),this.wire.environment.childViews?await this.wire.environment.createChildContent({entityType:\"view\",options:{...e,uuid:t}}):await this.wire.sendAction(\"create-view\",{...e,uuid:t}),this.wrapSync({uuid:t,name:e.name})}async wrap(e){this.wire.sendAction(\"view-wrap\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}wrapSync(e){this.wire.sendAction(\"view-wrap-sync\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}getCurrent(){if(this.wire.sendAction(\"view-get-current\").catch((e=>{})),!this.wire.me.isView)throw new Error(\"You are not in a View context\");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction(\"view-get-current-sync\").catch((e=>{})),!this.wire.me.isView)throw new Error(\"You are not in a View context\");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return L.ViewModule=r,L}(),e),n(function(){if(U)return B;var e;U=1,Object.defineProperty(B,\"__esModule\",{value:!0}),B.View=void 0;const t=g,n=G,i=H,r=ie();class o extends i.WebContents{constructor(i,o){super(i,o,\"view\"),this.identity=o,e.set(this,new n.Lazy((()=>this.fin.Platform.wrapSync(this.identity).getClient()))),this.attach=async e=>{await this.wire.sendAction(\"attach-view\",{target:e,...this.identity})},this.destroy=async()=>{await this.wire.sendAction(\"destroy-view\",{...this.identity})},this.show=async()=>{await this.wire.sendAction(\"show-view\",{...this.identity})},this.showAt=async(e,t={})=>{await this.wire.sendAction(\"show-view-at\",{bounds:e,...this.identity,options:t})},this.bringToFront=async()=>{await this.wire.sendAction(\"bring-view-to-front\",{...this.identity})},this.hide=async()=>{await this.wire.sendAction(\"hide-view\",{...this.identity})},this.setBounds=async e=>{await this.wire.sendAction(\"set-view-bounds\",{bounds:e,...this.identity})},this.getBounds=async()=>(await this.wire.sendAction(\"get-view-bounds\",{...this.identity})).payload.data,this.getInfo=async()=>(await this.wire.sendAction(\"get-view-info\",{...this.identity})).payload.data,this.getParentLayout=async()=>(this.wire.sendAction(\"view-get-parent-layout\",{...this.identity}).catch((()=>{})),this.fin.Platform.Layout.getLayoutByViewIdentity(this.identity)),this.getOptions=async()=>this.wire.sendAction(\"get-view-options\",{...this.identity}).then((({payload:e})=>e.data)),this.updateOptions=async e=>this.wire.sendAction(\"update-view-options\",{options:e,...this.identity}).then((()=>{})),this.getCurrentWindow=async()=>{const{payload:{data:e}}=await this.wire.sendAction(\"get-view-window\",{...this.identity});return new r._Window(this.wire,e)},this.getCurrentStack=async()=>{this.wire.sendAction(\"view-get-current-stack\").catch((()=>{}));try{return(await this.getParentLayout()).getStackByViewIdentity(this.identity)}catch(e){throw new t.RuntimeError({reason:\"This view does not belong to a stack.\",error:e})}},this.triggerBeforeUnload=async()=>(await this.wire.sendAction(\"trigger-before-unload\",{...this.identity})).payload.data,this.bindToElement=async e=>{if(!e)throw new Error(\"Element not found.\");return this.wire.environment.observeBounds(e,(async e=>this.setBounds(e)))}}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){const t=await this.getCurrentWindow();await t.focusedWebViewWasChanged(),await super.focus({emitSynthFocused:e})}}return B.View=o,e=new WeakMap,B}(),e)}(k)),k}function Y(){if(z)return j;z=1,Object.defineProperty(j,\"__esModule\",{value:!0}),j.Application=void 0;const e=d,t=ie(),n=J();class i extends e.EmitterBase{constructor(e,n){super(e,\"application\",n.uuid),this.identity=n,this.window=new t._Window(this.wire,{uuid:this.identity.uuid,name:this.identity.uuid})}windowListFromIdentityList(e){const n=[];return e.forEach((e=>{n.push(new t._Window(this.wire,{uuid:e.uuid,name:e.name}))})),n}isRunning(){return this.wire.sendAction(\"is-application-running\",this.identity).then((({payload:e})=>e.data))}async quit(e=!1){try{await this._close(e),await this.wire.sendAction(\"destroy-application\",{force:e,...this.identity})}catch(e){if(![\"Remote connection has closed\",\"Could not locate the requested application\"].some((t=>e.message.includes(t))))throw e}}async _close(e=!1){try{await this.wire.sendAction(\"close-application\",{force:e,...this.identity})}catch(e){if(!e.message.includes(\"Remote connection has closed\"))throw e}}close(e=!1){return console.warn(\"Deprecation Warning: Application.close is deprecated Please use Application.quit\"),this.wire.sendAction(\"application-close\",this.identity).catch((e=>{})),this._close(e)}getChildWindows(){return this.wire.sendAction(\"get-child-windows\",this.identity).then((({payload:e})=>{const t=[];return e.data.forEach((e=>{t.push({uuid:this.identity.uuid,name:e})})),this.windowListFromIdentityList(t)}))}getManifest(){return this.wire.sendAction(\"get-application-manifest\",this.identity).then((({payload:e})=>e.data))}getParentUuid(){return this.wire.sendAction(\"get-parent-application\",this.identity).then((({payload:e})=>e.data))}getShortcuts(){return this.wire.sendAction(\"get-shortcuts\",this.identity).then((({payload:e})=>e.data))}async getViews(){const{payload:e}=await this.wire.sendAction(\"application-get-views\",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}getZoomLevel(){return this.wire.sendAction(\"get-application-zoom-level\",this.identity).then((({payload:e})=>e.data))}getWindow(){return this.wire.sendAction(\"application-get-window\",this.identity).catch((e=>{})),Promise.resolve(this.window)}registerUser(e,t){return this.wire.sendAction(\"register-user\",{userName:e,appName:t,...this.identity}).then((()=>{}))}removeTrayIcon(){return this.wire.sendAction(\"remove-tray-icon\",this.identity).then((()=>{}))}restart(){return this.wire.sendAction(\"restart-application\",this.identity).then((()=>{}))}run(){return console.warn(\"Deprecation Warning: Application.run is deprecated Please use fin.Application.start\"),this.wire.sendAction(\"application-run\",this.identity).catch((e=>{})),this._run()}_run(e={}){return this.wire.sendAction(\"run-application\",{manifestUrl:this._manifestUrl,opts:e,...this.identity}).then((()=>{}))}scheduleRestart(){return this.wire.sendAction(\"relaunch-on-close\",this.identity).then((()=>{}))}async sendApplicationLog(){const{payload:e}=await this.wire.sendAction(\"send-application-log\",this.identity);return e.data}async setJumpList(e){await this.wire.sendAction(\"set-jump-list\",{config:e,...this.identity})}setTrayIcon(e){return this.wire.sendAction(\"set-tray-icon\",{enabledIcon:e,...this.identity}).then((()=>{}))}setShortcuts(e){return this.wire.sendAction(\"set-shortcuts\",{data:e,...this.identity}).then((()=>{}))}async setShortcutQueryParams(e){await this.wire.sendAction(\"set-shortcut-query-args\",{data:e,...this.identity})}setZoomLevel(e){return this.wire.sendAction(\"set-application-zoom-level\",{level:e,...this.identity}).then((()=>{}))}async setAppLogUsername(e){await this.wire.sendAction(\"set-app-log-username\",{data:e,...this.identity})}getTrayIconInfo(){return this.wire.sendAction(\"get-tray-icon-info\",this.identity).then((({payload:e})=>e.data))}hasTrayIcon(){return this.wire.sendAction(\"has-tray-icon\",this.identity).then((({payload:e})=>e.data))}terminate(){return this.wire.sendAction(\"terminate-application\",this.identity).then((()=>{}))}wait(){return this.wire.sendAction(\"wait-for-hung-application\",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction(\"get-info\",this.identity).then((({payload:e})=>e.data))}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction(\"application-get-process-info\",this.identity);return e}async setFileDownloadLocation(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t};await this.wire.sendAction(\"set-file-download-location\",{...n,downloadLocation:e})}async getFileDownloadLocation(){const{payload:{data:e}}=await this.wire.sendAction(\"get-file-download-location\",this.identity);return e}async showTrayIconPopupMenu(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t},{payload:i}=await this.wire.sendAction(\"show-tray-icon-popup-menu\",{...n,options:e});return i.data}async closeTrayIconPopupMenu(){const{name:e}=this.wire.me,t={uuid:this.identity.uuid,name:e};await this.wire.sendAction(\"close-tray-icon-popup-menu\",{...t})}}return j.Application=i,j}function Z(){return q||(q=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(function(){if(K)return F;K=1,Object.defineProperty(F,\"__esModule\",{value:!0}),F.ApplicationModule=void 0;const e=d,t=O,n=Y();class i extends e.Base{async wrap(e){this.wire.sendAction(\"wrap-application\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}wrapSync(e){this.wire.sendAction(\"wrap-application-sync\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}async _create(e){return void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&void 0===e.isPlatformController&&(e.autoShow=!0),await this.wire.sendAction(\"create-application\",e),this.wrap({uuid:e.uuid})}create(e){return console.warn(\"Deprecation Warning: fin.Application.create is deprecated. Please use fin.Application.start\"),this.wire.sendAction(\"application-create\").catch((e=>{})),this._create(e)}async start(e){this.wire.sendAction(\"start-application\").catch((e=>{}));const t=await this._create(e);return await this.wire.sendAction(\"run-application\",{uuid:e.uuid}),t}async startManyManifests(e,t){return this.wire.sendAction(\"run-applications\",{applications:e,opts:t}).then((()=>{}))}getCurrent(){return this.wire.sendAction(\"get-current-application\").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction(\"get-current-application-sync\").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}async startFromManifest(e,t){this.wire.sendAction(\"application-start-from-manifest\").catch((e=>{}));const n=await this._createFromManifest(e);return await n._run(t),n}createFromManifest(e){return console.warn(\"Deprecation Warning: fin.Application.createFromManifest is deprecated. Please use fin.Application.startFromManifest\"),this.wire.sendAction(\"application-create-from-manifest\").catch((e=>{})),this._createFromManifest(e)}_createFromManifest(e){return this.wire.sendAction(\"get-application-manifest\",{manifestUrl:e}).then((({payload:e})=>{const t=e.data.platform?e.data.platform.uuid:e.data.startup_app.uuid;return this.wrap({uuid:t})})).then((t=>(t._manifestUrl=e,t)))}}return F.ApplicationModule=i,F}(),e),n(Y(),e)}(R)),R}H.WebContents=D;var Q={};Object.defineProperty(Q,\"__esModule\",{value:!0}),Q.promisifySubscription=void 0;var X,ee,te;function ne(){if(X)return S;X=1,Object.defineProperty(S,\"__esModule\",{value:!0}),S._Window=void 0;const e=Z(),t=H,n=J(),i=T,r=Q;class o extends t.WebContents{constructor(e,t){super(e,t,\"window\")}async createWindow(e){this.wire.sendAction(\"window-create-window\",this.identity).catch((e=>{}));const t=await(0,r.promisifySubscription)(this,\"fire-constructor-callback\");void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&(e.autoShow=!0),(0,i.handleDeprecatedWarnings)(e);const n=this.wire.environment.createChildContent({entityType:\"window\",options:e}),[o]=await Promise.all([t.getValue(),n]);let s;const{success:a}=o,c=o.data,{message:d}=c;s=a?{httpResponseCode:c.httpResponseCode,apiInjected:c.apiInjected}:{message:c.message,networkErrorCode:c.networkErrorCode,stack:c.stack};const h={message:d,cbPayload:s,success:a};try{this.getWebWindow().fin.__internal_.openerSuccessCBCalled()}catch(e){}return h.success?this:Promise.reject(h)}getAllFrames(){return this.wire.sendAction(\"get-all-frames\",this.identity).then((({payload:e})=>e.data))}getBounds(){return this.wire.sendAction(\"get-window-bounds\",this.identity).then((({payload:e})=>e.data))}center(){return this.wire.sendAction(\"center-window\",this.identity).then((()=>{}))}blur(){return this.wire.sendAction(\"blur-window\",this.identity).then((()=>{}))}bringToFront(){return this.wire.sendAction(\"bring-window-to-front\",this.identity).then((()=>{}))}animate(e,t){return this.wire.sendAction(\"animate-window\",{transitions:e,options:t,...this.identity}).then((()=>{}))}hide(){return this.wire.sendAction(\"hide-window\",this.identity).then((()=>{}))}close(e=!1){return this.wire.sendAction(\"close-window\",{force:e,...this.identity}).then((()=>{Object.setPrototypeOf(this,null)}))}focusedWebViewWasChanged(){return this.wire.sendAction(\"focused-webview-changed\",this.identity).then((()=>{}))}getNativeId(){return this.wire.sendAction(\"get-window-native-id\",this.identity).then((({payload:e})=>e.data))}async getCurrentViews(){const{payload:e}=await this.wire.sendAction(\"window-get-views\",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}disableFrame(){return console.warn(\"Function is deprecated; use disableUserMovement instead.\"),this.wire.sendAction(\"disable-window-frame\",this.identity).then((()=>{}))}disableUserMovement(){return this.wire.sendAction(\"disable-window-frame\",this.identity).then((()=>{}))}enableFrame(){return console.warn(\"Function is deprecated; use enableUserMovement instead.\"),this.wire.sendAction(\"enable-window-frame\",this.identity).then((()=>{}))}enableUserMovement(){return this.wire.sendAction(\"enable-window-frame\",this.identity).then((()=>{}))}flash(){return this.wire.sendAction(\"flash-window\",this.identity).then((()=>{}))}stopFlashing(){return this.wire.sendAction(\"stop-flash-window\",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction(\"get-window-info\",this.identity).then((({payload:e})=>e.data))}async getLayout(e){this.wire.sendAction(\"window-get-layout\",this.identity).catch((e=>{}));const t=await this.getOptions();if(!t.layout&&!t.layoutSnapshot)throw new Error(\"Window does not have a Layout\");return this.fin.Platform.Layout.wrap(e??this.identity)}getOptions(){return this.wire.sendAction(\"get-window-options\",this.identity).then((({payload:e})=>e.data))}getParentApplication(){return this.wire.sendAction(\"window-get-parent-application\",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity))}getParentWindow(){return this.wire.sendAction(\"window-get-parent-window\",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity)).then((e=>e.getWindow()))}async getSnapshot(e){const t={area:e,...this.identity};console.warn(\"Window.getSnapshot has been deprecated, please use Window.capturePage\");return(await this.wire.sendAction(\"get-window-snapshot\",t)).payload.data}getState(){return this.wire.sendAction(\"get-window-state\",this.identity).then((({payload:e})=>e.data))}getWebWindow(){return this.wire.sendAction(\"window-get-web-window\",this.identity).catch((e=>{})),this.wire.environment.getWebWindow(this.identity)}isMainWindow(){return this.wire.sendAction(\"window-is-main-window\",this.identity).catch((e=>{})),this.me.uuid===this.me.name}isShowing(){return this.wire.sendAction(\"is-window-showing\",this.identity).then((({payload:e})=>e.data))}maximize(){return this.wire.sendAction(\"maximize-window\",this.identity).then((()=>{}))}minimize(){return this.wire.sendAction(\"minimize-window\",this.identity).then((()=>{}))}moveBy(e,t,n){return this.wire.sendAction(\"move-window-by\",{deltaLeft:e,deltaTop:t,positioningOptions:n,...this.identity}).then((()=>{}))}moveTo(e,t,n){return this.wire.sendAction(\"move-window\",{left:e,top:t,positioningOptions:n,...this.identity}).then((()=>{}))}resizeBy(e,t,n,i){return this.wire.sendAction(\"resize-window-by\",{deltaWidth:Math.floor(e),deltaHeight:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}resizeTo(e,t,n,i){return this.wire.sendAction(\"resize-window\",{width:Math.floor(e),height:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}restore(){return this.wire.sendAction(\"restore-window\",this.identity).then((()=>{}))}setAsForeground(){return this.wire.sendAction(\"set-foreground-window\",this.identity).then((()=>{}))}setBounds(e,t){return this.wire.sendAction(\"set-window-bounds\",{...e,...this.identity,positioningOptions:t}).then((()=>{}))}show(e=!1){return this.wire.sendAction(\"show-window\",{force:e,...this.identity}).then((()=>{}))}showAt(e,t,n=!1){return this.wire.sendAction(\"show-at-window\",{force:n,left:Math.floor(e),top:Math.floor(t),...this.identity}).then((()=>{}))}updateOptions(e){return this.wire.sendAction(\"update-window-options\",{options:e,...this.identity}).then((()=>{}))}authenticate(e,t){return this.wire.sendAction(\"window-authenticate\",{userName:e,password:t,...this.identity}).then((()=>{}))}async showPopupMenu(e){const{payload:t}=await this.wire.sendAction(\"show-popup-menu\",{options:e,...this.identity});return t.data}async closePopupMenu(){return this.wire.sendAction(\"close-popup-menu\",{...this.identity}).then((()=>{}))}async dispatchPopupResult(e){this.wire.sendAction(\"window-dispatch-popup-result\",this.identity).catch((e=>{})),await this.wire.sendAction(\"dispatch-popup-result\",{data:e,...this.identity})}async print(e={content:\"self\"}){switch(e.content){case void 0:case\"self\":return super.print(e);case\"screenshot\":return this.wire.sendAction(\"print-screenshot\",this.identity).then((()=>{}));case\"views\":return this.wire.sendAction(\"print-views\",{...this.identity,options:e}).then((()=>{}));default:return}}}return S._Window=o,S}function ie(){return te||(te=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(function(){if(ee)return _;ee=1,Object.defineProperty(_,\"__esModule\",{value:!0}),_._WindowModule=void 0;const e=d,t=O,n=ne();class i extends e.Base{async wrap(e){this.wire.sendAction(\"window-wrap\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}wrapSync(e){this.wire.sendAction(\"window-wrap-sync\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}create(e){return this.wire.sendAction(\"create-window\").catch((e=>{})),new n._Window(this.wire,{uuid:this.me.uuid,name:e.name}).createWindow(e)}getCurrent(){if(this.wire.sendAction(\"get-current-window\").catch((e=>{})),!this.wire.me.isWindow)throw new Error(\"You are not in a Window context\");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction(\"get-current-window-sync\").catch((e=>{})),!this.wire.me.isWindow)throw new Error(\"You are not in a Window context\");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return _._WindowModule=i,_}(),e),n(ne(),e)}(M)),M}Q.promisifySubscription=async(e,t,n=(()=>!0),i)=>{let r,o,s;const a=new Promise(((e,t)=>{r=e,o=t})),c=e=>{n(e)&&(clearTimeout(s),r(e))};return await e.on(t,c),i&&(s=setTimeout((()=>o(new Error(\"event timed out\"))),i)),a.finally((()=>{e.removeListener(t,c).catch((()=>null))})),{getValue:()=>a}},Object.defineProperty(c,\"__esModule\",{value:!0}),c.System=void 0;const re=d,oe=g,se=ie(),ae=t;class ce extends re.EmitterBase{constructor(e){super(e,\"system\")}sendExternalProcessRequest(e,t){return new Promise(((n,i)=>{const r=\"external-process-exited\";let o,s,a,c;\"function\"==typeof t.listener&&(a=e=>{const n=e||{};s={topic:\"exited\",uuid:n.processUuid||\"\",exitCode:n.exitCode||0},o===e.processUuid&&(t.listener(s),c.removeListener(r,a))},this.wire.me.name||(this.wire.me.name=this.wire.me.uuid),c=new se._Window(this.wire,this.wire.me),c.on(r,a)),this.wire.sendAction(e,t).then((({payload:e})=>{o=e.data.uuid,n(e.data),s&&o===s.uuid&&(t.listener(s),c.removeListener(r,a))})).catch((e=>{c&&c.removeListener(r,a),i(e)}))}))}getVersion(){return this.wire.sendAction(\"get-version\").then((({payload:e})=>e.data))}clearCache(e){return this.wire.sendAction(\"clear-cache\",e).then((()=>{}))}deleteCacheOnExit(){return this.wire.sendAction(\"delete-cache-request\").then((()=>{}))}exit(){return this.wire.sendAction(\"exit-desktop\").then((()=>{}))}async fetchManifest(e){const{payload:{data:t}}=await this.wire.sendAction(\"fetch-manifest\",{manifestUrl:e});return t}flushCookieStore(){return this.wire.sendAction(\"flush-cookie-store\").then((()=>{}))}getAllWindows(){return this.wire.sendAction(\"get-all-windows\").then((({payload:e})=>e.data))}getAllApplications(){return this.wire.sendAction(\"get-all-applications\").then((({payload:e})=>e.data))}getCommandLineArguments(){return this.wire.sendAction(\"get-command-line-arguments\").then((({payload:e})=>e.data))}async getCrashReporterState(){const{payload:{data:{diagnosticMode:e,isRunning:t}}}=await this.wire.sendAction(\"get-crash-reporter-state\");return console.warn(\"diagnosticMode property is deprecated. It will be removed in a future version\"),{diagnosticMode:e,diagnosticsMode:e,isRunning:t}}async startCrashReporter(e){const t=e,n={...t,diagnosticMode:t.diagnosticsMode||t.diagnosticMode},{payload:{data:{diagnosticMode:i,isRunning:r}}}=await this.wire.sendAction(\"start-crash-reporter\",n);return{diagnosticMode:i,diagnosticsMode:i,isRunning:r}}getUniqueUserId(){return this.wire.sendAction(\"get-unique-user-id\").then((({payload:e})=>e.data))}getEntityInfo(e,t){return this.wire.sendAction(\"get-entity-info\",{uuid:e,name:t}).then((({payload:e})=>e.data))}getEnvironmentVariable(e){return this.wire.sendAction(\"get-environment-variable\",{environmentVariables:e}).then((({payload:e})=>e.data))}getFocusedWindow(){return this.wire.sendAction(\"get-focused-window\").then((({payload:e})=>e.data))}async isAppCertified(e){const{payload:{data:{certifiedInfo:t}}}=await this.wire.sendAction(\"is-app-certified\",{manifestUrl:e});return t}getInstalledRuntimes(){return this.wire.sendAction(\"get-installed-runtimes\").then((({payload:e})=>e.data.runtimes))}async getInstalledApps(){const{payload:{data:{installedApps:e}}}=await this.wire.sendAction(\"get-installed-apps\");return e}getLog(e){return this.wire.sendAction(\"view-log\",e).then((({payload:e})=>e.data))}getMachineId(){return this.wire.sendAction(\"get-machine-id\").then((({payload:e})=>e.data))}getMinLogLevel(){return this.wire.sendAction(\"get-min-log-level\").then((({payload:e})=>e.data))}getLogList(){return this.wire.sendAction(\"list-logs\").then((({payload:e})=>e.data))}getMonitorInfo(){return this.wire.sendAction(\"get-monitor-info\").then((({payload:e})=>e.data))}getMousePosition(){return this.wire.sendAction(\"get-mouse-position\").then((({payload:e})=>e.data))}getProcessList(){return console.warn(\"System.getProcessList has been deprecated. Please consider using our new process APIs: Window.getProcessInfo, View.getProcessInfo, Application.getProcessInfo, System.getAllProcessInfo\"),this.wire.sendAction(\"process-snapshot\").then((({payload:e})=>e.data))}async getAllProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction(\"get-all-process-info\",this.identity);return e}getProxySettings(){return this.wire.sendAction(\"get-proxy-settings\").then((({payload:e})=>e.data))}getRuntimeInfo(){return this.wire.sendAction(\"get-runtime-info\").then((({payload:e})=>e.data))}getRvmInfo(){return this.wire.sendAction(\"get-rvm-info\").then((({payload:e})=>e.data))}getHostSpecs(){return this.wire.sendAction(\"get-host-specs\").then((({payload:e})=>e.data))}getOSInfo(){return this.wire.sendAction(\"get-os-info\").then((({payload:e})=>e.data))}launchExternalProcess(e){return this.sendExternalProcessRequest(\"launch-external-process\",e)}monitorExternalProcess(e){return this.sendExternalProcessRequest(\"monitor-external-process\",e)}log(e,t){return this.wire.sendAction(\"write-to-log\",{level:e,message:t}).then((()=>{}))}openUrlWithBrowser(e){return this.wire.sendAction(\"open-url-with-browser\",{url:e}).then((()=>{}))}async registerCustomProtocol(e){if(\"object\"!=typeof e)throw new Error(\"Must provide an object with a `protocolName` property having a string value.\");await this.wire.sendAction(\"register-custom-protocol\",e)}async unregisterCustomProtocol(e){await this.wire.sendAction(\"unregister-custom-protocol\",{protocolName:e})}async getCustomProtocolState(e){return this.wire.sendAction(\"get-custom-protocol-state\",{protocolName:e}).then((({payload:e})=>e.data))}releaseExternalProcess(e){return this.wire.sendAction(\"release-external-process\",{uuid:e}).then((()=>{}))}showDeveloperTools(e){return this.wire.sendAction(\"show-developer-tools\",e).then((()=>{}))}terminateExternalProcess(e){return this.wire.sendAction(\"terminate-external-process\",e).then((()=>{}))}updateProxySettings(e){return this.wire.sendAction(\"update-proxy\",e).then((()=>{}))}async downloadAsset(e,t){const n=()=>{};let i=n,r=n;const o=new Promise(((e,t)=>{i=e,r=t}));if(\"openfin\"!==this.wire.environment.type)throw new oe.NotSupportedError(\"downloadAsset only supported in an OpenFin Render process\");const s=oe.RuntimeError.getCallSite(),a=this.wire.environment.getNextMessageId().toString(),c=`asset-download-progress-${a}`,d=`asset-download-error-${a}`,h=`asset-download-complete-${a}`,l=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},u=()=>{this.removeListener(c,l)};await Promise.all([this.on(c,l),this.once(d,(e=>{u();const{reason:t,err:n}=e;r(new oe.RuntimeError({reason:t,error:n},s))})),this.once(h,(()=>{u(),i()}))]);const p=Object.assign(e,{downloadId:a});return await this.wire.sendAction(\"download-asset\",p).catch((e=>{throw u(),e})),o}downloadRuntime(e,t){const n=oe.RuntimeError.getCallSite();return new Promise(((i,r)=>{if(\"openfin\"!==this.wire.environment.type)return void r(new oe.NotSupportedError(\"downloadRuntime only supported in an OpenFin Render process\"));const o=this.wire.environment.getNextMessageId().toString(),s=`runtime-download-progress-${o}`,a=`runtime-download-error-${o}`,c=`runtime-download-complete-${o}`,d=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},h=()=>{this.removeListener(s,d)};this.on(s,d),this.once(a,(e=>{h();const{reason:t,err:i}=e;r(new oe.RuntimeError({reason:t,error:i},n))})),this.once(c,(()=>{h(),i()}));const l=Object.assign(e,{downloadId:o});this.wire.sendAction(\"download-runtime\",l).catch((e=>{h(),r(e)}))}))}downloadPreloadScripts(e){return this.wire.sendAction(\"download-preload-scripts\",{scripts:e}).then((({payload:e})=>e.data))}getAllExternalApplications(){return this.wire.sendAction(\"get-all-external-applications\").then((({payload:e})=>e.data))}getAppAssetInfo(e){return this.wire.sendAction(\"get-app-asset-info\",e).then((({payload:e})=>e.data))}getCookies(e){const t=this.wire.environment.getUrl(),n=Object.assign(e,{url:t});return this.wire.sendAction(\"get-cookies\",n).then((({payload:e})=>e.data))}setMinLogLevel(e){return this.wire.sendAction(\"set-min-log-level\",{level:e}).then((()=>{}))}resolveUuid(e){return this.wire.sendAction(\"resolve-uuid\",{entityKey:e}).then((({payload:e})=>e.data))}executeOnRemote(e,t){return t.requestingIdentity=e,this.wire.ferryAction(t)}readRegistryValue(e,t,n){return this.wire.sendAction(\"read-registry-value\",{rootKey:e,subkey:t,value:n}).then((({payload:e})=>e.data))}registerExternalConnection(e){return this.wire.sendAction(\"register-external-connection\",{uuid:e}).then((({payload:e})=>e.data))}async getServiceConfiguration(e){if(\"string\"!=typeof e.name)throw new Error(\"Must provide an object with a `name` property having a string value\");const{name:t}=e;return this.wire.sendAction(\"get-service-configuration\",{name:t}).then((({payload:e})=>e.data))}async getSystemAppConfig(e){if(\"string\"!=typeof e)throw new Error(\"Must provide a string value for name of system app\");return this.wire.sendAction(\"get-system-app-configuration\",{name:e}).then((({payload:e})=>e.data))}async registerShutdownHandler(e){this.wire.sendAction(\"system-register-shutdown-handler\").catch((e=>{}));const{uuid:t,name:n}=this.wire.me;this.on(\"system-shutdown\",(i=>{e({proceed:()=>{this.wire.environment.raiseEvent(\"application/system-shutdown-handled\",{uuid:t,name:n,topic:\"application\"})}})}))}runRvmHealthCheck(){return this.wire.sendAction(\"run-rvm-health-check\").then((({payload:e})=>e.data))}async launchManifest(e,t={}){const{subscribe:n,...i}=t,r=i;if(n){const e=new ae.EventEmitter;n(e);const t=\"app-version-progress\",i=\"runtime-status\",o=\"app-version-complete\",s=\"app-version-error\",a=this.wire.environment.getNextMessageId().toString();r.appVersionId=a;const c=[o,t,i,s],d=e=>{const{appVersionId:t,topic:n,type:i,...r}=e;return{...r,type:c.find((e=>i.includes(e)))}},h=t=>{const n=d(t);e.emit(n.type,n)},l=()=>{this.removeListener(`${t}.${a}`,h),this.removeListener(`${i}.${a}`,h),this.removeListener(`${o}.${a}`,h),this.removeListener(`${s}.${a}`,h),this.removeListener(`${o}.${a}`,l),this.removeListener(`${s}.${a}`,l)};await Promise.all([this.on(`${t}.${a}`,h),this.on(`${i}.${a}`,h),this.once(`${o}.${a}`,h),this.once(`${s}.${a}`,h),this.once(`${o}.${a}`,l),this.once(`${s}.${a}`,l)])}return(await this.wire.sendAction(\"launch-manifest\",{manifestUrl:e,opts:r})).payload.data.manifest}async queryPermissionForCurrentContext(e){const t={uuid:this.wire.me.uuid,name:this.wire.me.name};return(await this.wire.sendAction(\"query-permission-for-current-context\",{apiName:e,identity:t})).payload.data}async enableNativeWindowIntegrationProvider(e){const{payload:t}=await this.wire.sendAction(\"enable-native-window-integration-provider\",{permissions:e});return t.data}async registerUsage({data:e,type:t}){await this.wire.sendAction(\"register-usage\",{data:e,type:t})}async getPrinters(){const{payload:e}=await this.wire.sendAction(\"system-get-printers\");return e.data}async updateProcessLoggingOptions(e){await this.wire.sendAction(\"system-update-process-logging-options\",{options:e})}async getDomainSettings(){const{payload:{data:e}}=await this.wire.sendAction(\"get-domain-settings\",this.identity);return e}async setDomainSettings(e){await this.wire.sendAction(\"set-domain-settings\",{domainSettings:e,...this.identity})}async refreshExtensions(){const{payload:e}=await this.wire.sendAction(\"refresh-extensions\");return e.data}async getInstalledExtensions(){const{payload:e}=await this.wire.sendAction(\"get-installed-extensions\");return e.data}}c.System=ce;var de={},he={};Object.defineProperty(he,\"__esModule\",{value:!0}),he.RefCounter=void 0;he.RefCounter=class{constructor(){this.topicRefMap=new Map}incRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t+1;n=i,this.topicRefMap.set(e,i)}else this.topicRefMap.set(e,1),n=1;return n}decRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t-1;this.topicRefMap.set(e,i),n=i}else n=-1;return n}actOnFirst(e,t,n){return 1===this.incRefCount(e)?t():n()}actOnLast(e,t,n){return 0===this.decRefCount(e)?t():n()}};var le={},ue={},pe={};Object.defineProperty(pe,\"__esModule\",{value:!0}),pe.ChannelBase=pe.ProtectedItems=void 0;const we=e=>async(t,n,i)=>{const r=await e(t,n,i);return void 0===r?n:r};pe.ProtectedItems=class{constructor(e,t){this.providerIdentity=e,this.close=t}};class ye{static defaultAction(e){throw new Error(`No action registered at target for ${e}`)}constructor(){this.subscriptions=new Map}async processAction(e,t,n){try{const i=this.subscriptions.has(e)?this.subscriptions.get(e):(t,n)=>(this.defaultAction??ye.defaultAction)(e,t,n),r=this.preAction?await this.preAction(e,t,n):t,o=await i(r,n);return this.postAction?await this.postAction(e,o,n):o}catch(t){if(this.errorMiddleware)return this.errorMiddleware(e,t,n);throw t}}beforeAction(e){if(this.preAction)throw new Error(\"Already registered beforeAction middleware\");this.preAction=we(e)}onError(e){if(this.errorMiddleware)throw new Error(\"Already registered error middleware\");this.errorMiddleware=e}afterAction(e){if(this.postAction)throw new Error(\"Already registered afterAction middleware\");this.postAction=we(e)}remove(e){this.subscriptions.delete(e)}setDefaultAction(e){if(this.defaultAction)throw new Error(\"default action can only be set once\");this.defaultAction=e}register(e,t){if(this.subscriptions.has(e))throw new Error(`Subscription already registered for action: ${e}. Unsubscribe before adding new subscription`);return this.subscriptions.set(e,t),!0}}pe.ChannelBase=ye;var fe,ge,me,ve=s&&s.__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)},Ce=s&&s.__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};Object.defineProperty(ue,\"__esModule\",{value:!0}),ue.ChannelClient=void 0;const be=pe,Ie=new Map;class Ee extends be.ChannelBase{static closeChannelByEndpointId(e){const t=Ie.get(e);t&&ve(t,me,\"f\").call(t)}static handleProviderDisconnect(e){for(const t of Ie.values())t.providerIdentity.channelId===e.channelId&&(t.disconnectListener(e),ve(t,me,\"f\").call(t))}constructor(e,t,n){super(),fe.set(this,void 0),ge.set(this,void 0),this.processAction=(e,t,n)=>super.processAction(e,t,n),me.set(this,(()=>{Ie.delete(this.endpointId),ve(this,ge,\"f\").close()})),Ce(this,fe,new be.ProtectedItems(e,t),\"f\"),this.disconnectListener=()=>{},this.endpointId=e.endpointId,Ce(this,ge,n,\"f\"),Ie.set(this.endpointId,this),n.receive(this.processAction)}get providerIdentity(){return ve(this,fe,\"f\").providerIdentity}async dispatch(e,t){if(ve(this,ge,\"f\").isEndpointConnected(this.providerIdentity.channelId))return ve(this,ge,\"f\").send(this.providerIdentity.channelId,e,t);throw new Error(\"The client you are trying to dispatch from is disconnected from the target provider.\")}onDisconnection(e){this.disconnectListener=t=>{try{e(t)}catch(e){throw new Error(`Error while calling the onDisconnection callback: ${e.message}`)}finally{this.disconnectListener=()=>{}}}}async disconnect(){await this.sendDisconnectAction(),ve(this,me,\"f\").call(this)}async sendDisconnectAction(){const e=ve(this,fe,\"f\");await e.close()}static async wireClose(e,t,n){const{channelName:i,uuid:r,name:o}=t;await e.sendAction(\"disconnect-from-channel\",{channelName:i,uuid:r,name:o,endpointId:n})}}ue.ChannelClient=Ee,fe=new WeakMap,ge=new WeakMap,me=new WeakMap;var xe={},Ae={};Object.defineProperty(Ae,\"__esModule\",{value:!0}),Ae.exhaustiveCheck=void 0,Ae.exhaustiveCheck=function(e,t){throw new Error(`Unsupported value: ${e}${t?`\\n Supported values are: ${t.join(\"\")}`:\"\"}`)};var Pe,Me,_e,Oe={},Se=s&&s.__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},Re=s&&s.__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)};Object.defineProperty(Oe,\"__esModule\",{value:!0}),Oe.ClassicInfo=Oe.ClassicStrategy=void 0;Oe.ClassicStrategy=class{constructor(e,t,n,i){this.messageReceiver=t,this.endpointId=n,this.providerIdentity=i,Pe.set(this,void 0),Me.set(this,new Map),_e.set(this,new Map),this.send=async(e,t,n)=>{const i=Re(this,Me,\"f\").get(e);if(!i)throw new Error(`Could not locate routing info for endpoint ${e}`);const r={...i};r.isLocalEndpointId&&delete r.endpointId,delete r.isLocalEndpointId;const o=Re(this,Pe,\"f\").sendAction(\"send-channel-message\",{...r,providerIdentity:this.providerIdentity,action:t,payload:n});Re(this,_e,\"f\").get(e)?.add(o);return(await o.catch((e=>{throw new Error(e.message)})).finally((()=>{Re(this,_e,\"f\").get(e)?.delete(o)}))).payload.data.result},this.close=async()=>{this.messageReceiver.removeEndpoint(this.providerIdentity.channelId,this.endpointId),[...Re(this,Me,\"f\").keys()].forEach((e=>this.closeEndpoint(e))),Se(this,Me,new Map,\"f\")},Se(this,Pe,e,\"f\")}onEndpointDisconnect(e,t){}receive(e){this.messageReceiver.addEndpoint(e,this.providerIdentity.channelId,this.endpointId)}async closeEndpoint(e){const t=Re(this,Me,\"f\").get(e);Re(this,Me,\"f\").delete(e);const n=Re(this,_e,\"f\").get(e);n?.forEach((n=>{const i=`Channel connection with identity uuid: ${t?.uuid} / name: ${t?.name} / endpointId: ${e} no longer connected.`;n.cancel(new Error(i))}))}isEndpointConnected(e){return Re(this,Me,\"f\").has(e)}addEndpoint(e,t){Re(this,Me,\"f\").set(e,t.endpointIdentity),Re(this,_e,\"f\").set(e,new Set)}isValidEndpointPayload(e){return\"string\"==typeof e?.endpointIdentity?.endpointId||\"string\"==typeof e?.endpointIdentity?.channelId}},Pe=new WeakMap,Me=new WeakMap,_e=new WeakMap,Oe.ClassicInfo={version:5,minimumVersion:0,type:\"classic\"};var Fe={},je={},ke={};Object.defineProperty(ke,\"__esModule\",{value:!0}),ke.errorToPOJO=void 0,ke.errorToPOJO=function(e){return{stack:e.stack,name:e.name,message:e.message,toString:()=>e.stack||e.toString()}};var Le,Te,$e=s&&s.__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)},Be=s&&s.__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};Object.defineProperty(je,\"__esModule\",{value:!0}),je.RTCEndpoint=void 0;const Ge=ke;je.RTCEndpoint=class{static isValidEndpointPayload(e){const t=e=>\"object\"==typeof e&&null!==e;return t(e)&&t(e.endpointIdentity)&&t(e.rtc)&&\"string\"==typeof e.endpointIdentity.endpointId}constructor({rtc:e,endpointIdentity:t}){this.responseMap=new Map,Le.set(this,null),Te.set(this,void 0),this.connectionStateChangeHandler=e=>{\"connected\"!==this.rtc.rtcClient.connectionState&&(this.rtc.rtcClient.removeEventListener(\"connectionstatechange\",this.connectionStateChangeHandler),this.close(),$e(this,Te,\"f\")&&$e(this,Te,\"f\").call(this))},this.send=async(e,t)=>{const n=`message-${Math.random()}`,i=new Promise(((e,t)=>{this.responseMap.set(n,{resolve:e,reject:t})}));return this.rtc.channels.request.send(JSON.stringify({action:e,payload:t,messageId:n})),i},this.close=()=>{this.responseMap.forEach((e=>e.reject(\"Connection has closed.\"))),this.responseMap=new Map,this.rtc.channels.request.close(),this.rtc.channels.response.close(),this.rtc.rtcClient.close()},this.rtc=e,this.endpointIdentity=t,this.rtc.channels.response.addEventListener(\"message\",(e=>{let{data:t}=e;e.data instanceof ArrayBuffer&&(t=(new TextDecoder).decode(e.data));const{messageId:n,payload:i,success:r,error:o}=JSON.parse(t),{resolve:s,reject:a}=this.responseMap.get(n)??{};s&&a?(this.responseMap.delete(n),r?s(i):a(o)):(console.log(\"Could not find id in responseMap.\"),console.log(e))})),this.rtc.channels.request.addEventListener(\"message\",(async e=>{let{data:n}=e;e.data instanceof ArrayBuffer&&(n=(new TextDecoder).decode(e.data));const{messageId:i,action:r,payload:o}=JSON.parse(n);if($e(this,Le,\"f\"))try{const e=await $e(this,Le,\"f\").call(this,r,o,t);this.rtc.channels.response.send(JSON.stringify({messageId:i,payload:e,success:!0}))}catch(e){\"open\"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,error:(0,Ge.errorToPOJO)(e),success:!1}))}else\"open\"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,success:!1,error:\"Connection not ready.\"}))})),this.rtc.rtcClient.addEventListener(\"connectionstatechange\",this.connectionStateChangeHandler),Object.values(this.rtc.channels).forEach((e=>{e.onclose=e=>{[...this.responseMap.values()].forEach((e=>e.reject(new Error(\"RTCDataChannel closed unexpectedly, this is most commonly caused by message size. Note: RTC Channels have a message size limit of ~255kB.\")))),this.close(),$e(this,Te,\"f\")&&$e(this,Te,\"f\").call(this)}}))}onDisconnect(e){if($e(this,Te,\"f\"))throw new Error(\"RTCEndpoint disconnectListener cannot be set twice.\");Be(this,Te,e,\"f\")}receive(e){if($e(this,Le,\"f\"))throw new Error(\"You have already set a listener for this RTC Endpoint.\");Be(this,Le,e,\"f\")}get connected(){return\"connected\"===this.rtc.rtcClient.connectionState}},Le=new WeakMap,Te=new WeakMap;var We,He,Ne,De={},Ue=s&&s.__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)},Ve=s&&s.__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};Object.defineProperty(De,\"__esModule\",{value:!0}),De.EndpointStrategy=void 0;De.EndpointStrategy=class{constructor(e,t,n){this.EndpointType=e,this.StrategyName=n,We.set(this,null),He.set(this,new Map),Ne.set(this,!0),this.send=async(e,t,n)=>this.getEndpointById(e).send(t,n),this.close=async()=>{Ue(this,Ne,\"f\")&&(Ue(this,He,\"f\").forEach((e=>e.close())),Ve(this,He,new Map,\"f\")),Ve(this,Ne,!1,\"f\")},this.isValidEndpointPayload=t}onEndpointDisconnect(e,t){this.getEndpointById(e).onDisconnect(t)}receive(e){if(Ue(this,We,\"f\"))throw new Error(`You have already set a listener for this ${this.StrategyName} Strategy`);Ve(this,We,e,\"f\"),Ue(this,He,\"f\").forEach((e=>e.receive(Ue(this,We,\"f\"))))}getEndpointById(e){const t=Ue(this,He,\"f\").get(e);if(!t)throw new Error(`Client with endpoint id ${e} is not connected`);return t}get connected(){return Ue(this,Ne,\"f\")}isEndpointConnected(e){return Ue(this,He,\"f\").has(e)}addEndpoint(e,t){if(!Ue(this,Ne,\"f\"))return void console.warn(`Adding endpoint to disconnected ${this.StrategyName} Strategy`);const n=new this.EndpointType(t);Ue(this,We,\"f\")&&n.receive(Ue(this,We,\"f\")),Ue(this,He,\"f\").set(e,n)}async closeEndpoint(e){Ue(this,He,\"f\").delete(e)}},We=new WeakMap,He=new WeakMap,Ne=new WeakMap,Object.defineProperty(Fe,\"__esModule\",{value:!0}),Fe.RTCInfo=Fe.RTCStrategy=void 0;const ze=je,Ke=De;class qe extends Ke.EndpointStrategy{constructor(){super(ze.RTCEndpoint,ze.RTCEndpoint.isValidEndpointPayload,\"RTC\")}}Fe.RTCStrategy=qe,Fe.RTCInfo={version:2,minimumVersion:0,type:\"rtc\"};var Je={};Object.defineProperty(Je,\"__esModule\",{value:!0}),Je.RTCICEManager=void 0;const Ye=d;class Ze extends Ye.EmitterBase{constructor(e){super(e,\"channel\"),this.ensureChannelOpened=e=>new Promise(((t,n)=>{if(\"open\"===e.readyState)t();else if(\"connecting\"===e.readyState){const n=()=>{e.removeEventListener(\"open\",n),t()};e.addEventListener(\"open\",n)}else n(new Error(\"This Channel has already closed\"))}))}static createDataChannelPromise(e,t){let n;const i=new Promise((e=>{n=e})),r=i=>{const o=()=>{i.channel.removeEventListener(\"open\",o),n(i.channel)};i.channel.label===e&&(i.channel.addEventListener(\"open\",o),t.removeEventListener(\"datachannel\",r))};return t.addEventListener(\"datachannel\",r),i}async listenForProviderIce(e,t){await this.on(this.createProviderEventName(e),t,{timestamp:Date.now()})}async raiseProviderIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createProviderEventName(e)),t)}async listenForClientIce(e,t){await this.on(this.createClientEventName(e),t,{timestamp:Date.now()})}async raiseClientIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createClientEventName(e)),t)}cleanupIceListeners(e){this.removeAllListeners(this.createClientEventName(e)),this.removeAllListeners(this.createProviderEventName(e))}createClientEventName(e){return`ice-client-${e}`}createProviderEventName(e){return`ice-provider-${e}`}createRouteString(e){return`channel/${e}`}createRtcPeer(){return this.wire.environment.getRtcPeer()}async startClientOffer(){const e=Math.random().toString(),t=this.createRtcPeer();t.addEventListener(\"icecandidate\",(async t=>{t.candidate&&await this.raiseClientIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForProviderIce(e,(async e=>{await t.addIceCandidate(e.candidate)}));const n={request:t.createDataChannel(\"request\"),response:t.createDataChannel(\"response\")},i=await t.createOffer();await t.setLocalDescription(i);const r=Promise.all([n.request,n.response].map(this.ensureChannelOpened)).then((()=>{}));return{rtcClient:t,channels:n,offer:i,rtcConnectionId:e,channelsOpened:r}}async finishClientOffer(e,t,n){return await e.setRemoteDescription(t),await n,!0}async createProviderAnswer(e,t){const n=this.createRtcPeer(),i=Ze.createDataChannelPromise(\"request\",n),r=Ze.createDataChannelPromise(\"response\",n);n.addEventListener(\"icecandidate\",(async t=>{t.candidate&&await this.raiseProviderIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForClientIce(e,(async e=>{await n.addIceCandidate(e.candidate)})),await n.setRemoteDescription(t);const o=await n.createAnswer();await n.setLocalDescription(o);const s=Promise.all([i,r]).then((([t,n])=>(this.cleanupIceListeners(e),{request:t,response:n})));return{rtcClient:n,answer:o,channels:s}}}Je.RTCICEManager=Ze;var Qe={},Xe={};function et(e){return[...e.split(\".\").reverse().entries()].reduce(((e,[t,n])=>e+ +n*1e4**t),0)}function tt(e,t){return et(e)>=et(t)}function nt(e){return e.split(\"/\")[0]}Object.defineProperty(Xe,\"__esModule\",{value:!0}),Xe.runtimeUuidMeetsMinimumRuntimeVersion=Xe.parseRuntimeUuid=Xe.meetsMinimumRuntimeVersion=void 0,Xe.meetsMinimumRuntimeVersion=tt,Xe.parseRuntimeUuid=nt,Xe.runtimeUuidMeetsMinimumRuntimeVersion=function(e,t){return tt(nt(e),t)};var it,rt,ot,st,at,ct=s&&s.__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)},dt=s&&s.__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};Object.defineProperty(Qe,\"__esModule\",{value:!0}),Qe.ChannelProvider=void 0;const ht=pe,lt=Xe;class ut extends ht.ChannelBase{get connections(){return[...ct(this,it,\"f\")]}static handleClientDisconnection(e,t){const n=e.connections.find((e=>e.endpointId===t.endpointId));if(n)ct(e,st,\"f\").call(e,n);else{e.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name)).forEach(ct(e,st,\"f\"))}e.disconnectListener(t)}static setProviderRemoval(e,t){ut.removalMap.set(e,t)}constructor(e,t,n){super(),it.set(this,void 0),rt.set(this,void 0),ot.set(this,void 0),st.set(this,(e=>{const t=this.connections.filter((t=>t.endpointId!==e.endpointId));ct(this,ot,\"f\").closeEndpoint(e.endpointId),dt(this,it,t,\"f\")})),this.processAction=async(e,t,n)=>(ut.clientIsMultiRuntime(n)&&!(0,lt.runtimeUuidMeetsMinimumRuntimeVersion)(n.runtimeUuid,\"18.87.56.0\")?this.handleMultiRuntimeLegacyClient(n):this.checkForClientConnection(n),super.processAction(e,t,n)),at.set(this,(()=>{ct(this,ot,\"f\").close();const e=ut.removalMap.get(this);e&&e()})),dt(this,rt,new ht.ProtectedItems(e,t),\"f\"),this.connectListener=()=>{},this.disconnectListener=()=>{},dt(this,it,[],\"f\"),dt(this,ot,n,\"f\"),n.receive(this.processAction)}dispatch(e,t,n){const i=e.endpointId??this.getEndpointIdForOpenFinId(e,t);return i&&ct(this,ot,\"f\").isEndpointConnected(i)?ct(this,ot,\"f\").send(i,t,n):Promise.reject(new Error(`Client connection with identity uuid: ${e.uuid} / name: ${e.name} / endpointId: ${i} no longer connected.`))}async processConnection(e,t){return ct(this,it,\"f\").push(e),this.connectListener(e,t)}publish(e,t){return this.connections.map((n=>ct(this,ot,\"f\").send(n.endpointId,e,t)))}onConnection(e){this.connectListener=e}onDisconnection(e){this.disconnectListener=e}async destroy(){const e=ct(this,rt,\"f\");e.providerIdentity,dt(this,it,[],\"f\"),await e.close(),ct(this,at,\"f\").call(this)}async getAllClientInfo(){return this.connections.map((e=>{const{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}=e;return{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}}))}checkForClientConnection(e){if(!this.isClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider.\\n Client Identity: {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}isClientConnected(e){return ut.clientIdentityIncludesEndpointId(e)?this.connections.some((t=>t.endpointId===e.endpointId&&t.uuid===e.uuid&&t.name===e.name)):this.isLegacyClientConnected(e)}isLegacyClientConnected(e){return this.connections.some((t=>t.uuid===e.uuid&&t.name===e.name))}handleMultiRuntimeLegacyClient(e){if(!this.isLegacyClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider. Client Identity:\\n {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}getEndpointIdForOpenFinId(e,t){const n=this.connections.filter((t=>t.name===e.name&&t.uuid===e.uuid));if(n.length>=2){const n=ct(this,rt,\"f\"),{uuid:i,name:r}=e,o=n?.providerIdentity.uuid,s=n?.providerIdentity.name;console.warn(`WARNING: Dispatch call may have unintended results. The \"to\" argument of your dispatch call is missing the\\n \"endpointId\" parameter. The identity you are dispatching to ({uuid: ${i}, name: ${r}})\\n has multiple channelClients for this channel. Your dispatched action: (${t}) from the provider:\\n ({uuid: ${o}, name: ${s}}) will only be processed by the most recently-created client.`)}return n.pop()?.endpointId}static clientIdentityIncludesEndpointId(e){return void 0!==e.endpointId}static clientIsMultiRuntime(e){return void 0!==e.runtimeUuid}static async wireClose(e,t){await e.sendAction(\"destroy-channel\",{channelName:t})}}Qe.ChannelProvider=ut,it=new WeakMap,rt=new WeakMap,ot=new WeakMap,st=new WeakMap,at=new WeakMap,ut.removalMap=new WeakMap;var pt={};Object.defineProperty(pt,\"__esModule\",{value:!0}),pt.MessageReceiver=void 0;const wt=ue,yt=d;class ft extends yt.Base{constructor(e){super(e),this.onmessage=e=>\"process-channel-message\"===e.action&&(this.processChannelMessage(e),!0),this.endpointMap=new Map,this.latestEndpointIdByChannelId=new Map,e.registerMessageHandler(this.onmessage.bind(this))}async processChannelMessage(e){const{senderIdentity:t,providerIdentity:n,action:i,ackToSender:r,payload:o,intendedTargetIdentity:s}=e.payload,a=s.channelId??s.endpointId??this.latestEndpointIdByChannelId.get(n.channelId),c=this.endpointMap.get(a);if(!c)return r.payload.success=!1,r.payload.reason=`Client connection with identity uuid: ${this.wire.me.uuid} / name: ${this.wire.me.name} / endpointId: ${a} no longer connected.`,this.wire.sendRaw(r);try{const e=await c(i,o,t);return r.payload.payload=r.payload.payload||{},r.payload.payload.result=e,this.wire.sendRaw(r)}catch(e){return r.payload.success=!1,r.payload.reason=e.message,this.wire.sendRaw(r)}}addEndpoint(e,t,n){this.endpointMap.set(n,e),t!==n&&this.latestEndpointIdByChannelId.set(t,n)}removeEndpoint(e,t){this.endpointMap.delete(t),this.latestEndpointIdByChannelId.get(e)===t&&this.latestEndpointIdByChannelId.delete(e)}checkForPreviousClientConnection(e){const t=this.latestEndpointIdByChannelId.get(e);t&&(wt.ChannelClient.closeChannelByEndpointId(t),console.warn(\"You have created a second connection to an older provider. First connection has been removed from the clientMap\"),console.warn(\"If the provider calls publish(), you may receive multiple messages.\"))}}pt.MessageReceiver=ft;var gt={};Object.defineProperty(gt,\"__esModule\",{value:!0}),gt.ProtocolManager=void 0;gt.ProtocolManager=class{constructor(e){this.ProtocolsInPreferenceOrder=e,this.DefaultClientProtocols=[\"classic\"],this.DefaultProviderProtocols=[\"classic\"],this.getClientProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultClientProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(\", \")}.`);return t},this.getProviderProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultProviderProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(\", \")}.`);return t},this.getCompatibleProtocols=(e,t)=>t.supportedProtocols.filter((t=>e.some((e=>e.type===t.type&&t.version>=e.minimumVersion&&e.version>=(t.minimumVersion??0))))).slice(0,t.maxProtocols)}};var mt={};Object.defineProperty(mt,\"__esModule\",{value:!0});class vt{static combine(e,t){return new vt(e,t)}constructor(e,t){this.primary=e,this.secondary=t}onEndpointDisconnect(e,t){this.primary.onEndpointDisconnect(e,(()=>{this.secondary.isEndpointConnected(e)||t()})),this.secondary.onEndpointDisconnect(e,(()=>{this.primary.isEndpointConnected(e)||t()}))}isValidEndpointPayload(e){return this.primary.isValidEndpointPayload(e)||this.secondary.isValidEndpointPayload(e)}async closeEndpoint(e){await this.primary.closeEndpoint(e),await this.secondary.closeEndpoint(e)}isEndpointConnected(e){return this.primary.isEndpointConnected(e)||this.secondary.isEndpointConnected(e)}async addEndpoint(e,t){this.primary.isValidEndpointPayload(t)&&await this.primary.addEndpoint(e,t),this.secondary.isValidEndpointPayload(t)&&await this.secondary.addEndpoint(e,t)}receive(e){this.primary.receive(e),this.secondary.receive(e)}send(e,t,n){return this.primary.isEndpointConnected(e)?this.primary.send(e,t,n):this.secondary.send(e,t,n)}async close(){await Promise.all([this.primary.close(),this.secondary.close()])}}mt.default=vt;var Ct,bt,It=s&&s.__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},Et=s&&s.__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)},xt=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(xe,\"__esModule\",{value:!0}),xe.ConnectionManager=void 0;const At=Ae,Pt=d,Mt=Oe,_t=Fe,Ot=Je,St=Qe,Rt=pt,Ft=gt,jt=xt(mt);class kt extends Pt.Base{static getProtocolOptionsFromStrings(e){return e.map((e=>{switch(e){case\"rtc\":return _t.RTCInfo;case\"classic\":return Mt.ClassicInfo;default:return(0,At.exhaustiveCheck)(e,[\"rtc\",\"classic\"])}}))}constructor(e){super(e),Ct.set(this,void 0),bt.set(this,void 0),this.removeChannelFromProviderMap=e=>{this.providerMap.delete(e)},this.onmessage=e=>\"process-channel-connection\"===e.action&&(this.processChannelConnection(e),!0),this.providerMap=new Map,this.protocolManager=new Ft.ProtocolManager(\"node\"===this.wire.environment.type?[\"classic\"]:[\"rtc\",\"classic\"]),It(this,Ct,new Rt.MessageReceiver(e),\"f\"),It(this,bt,new Ot.RTCICEManager(e),\"f\"),e.registerMessageHandler(this.onmessage.bind(this))}createProvider(e,t){const n=Object.assign(this.wire.environment.getDefaultChannelOptions().create,e||{}),i=this.protocolManager.getProviderProtocols(n?.protocols),r=i.map((e=>{switch(e){case\"rtc\":return new _t.RTCStrategy;case\"classic\":return new Mt.ClassicStrategy(this.wire,Et(this,Ct,\"f\"),t.channelId,t);default:return(0,At.exhaustiveCheck)(e,[\"rtc\",\"classic\"])}}));let o;if(2===r.length){const[e,t]=r;o=jt.default.combine(e,t)}else{if(1!==r.length)throw new Error(\"failed to combine strategies\");[o]=r}const s=new St.ChannelProvider(t,(()=>St.ChannelProvider.wireClose(this.wire,t.channelName)),o),a=t.channelId;return this.providerMap.set(a,{provider:s,strategy:o,supportedProtocols:kt.getProtocolOptionsFromStrings(i)}),St.ChannelProvider.setProviderRemoval(s,this.removeChannelFromProviderMap.bind(this)),s}async createClientOffer(e){const t=this.protocolManager.getClientProtocols(e?.protocols);let n;return{offer:{supportedProtocols:await Promise.all(t.map((async e=>{switch(e){case\"rtc\":{const{rtcClient:e,channels:t,offer:i,rtcConnectionId:r,channelsOpened:o}=await Et(this,bt,\"f\").startClientOffer();return n={rtcClient:e,channels:t,channelsOpened:o},{type:\"rtc\",version:_t.RTCInfo.version,payload:{offer:i,rtcConnectionId:r}}}case\"classic\":return{type:\"classic\",version:Mt.ClassicInfo.version};default:return(0,At.exhaustiveCheck)(e,[\"rtc\",\"classic\"])}}))),maxProtocols:2},rtc:n}}async createClientStrategy(e,t){t.endpointId||(t.endpointId=this.wire.environment.getNextMessageId(),Et(this,Ct,\"f\").checkForPreviousClientConnection(t.channelId));const n=t.answer??{supportedProtocols:[{type:\"classic\",version:1}]},i=(await Promise.all(n.supportedProtocols.map((async n=>\"rtc\"===n.type&&e?(await Et(this,bt,\"f\").finishClientOffer(e.rtcClient,n.payload.answer,e.channelsOpened),new _t.RTCStrategy):\"classic\"===n.type?new Mt.ClassicStrategy(this.wire,Et(this,Ct,\"f\"),t.endpointId,t):null)))).filter((e=>null!==e));let r;if(e&&!i.some((e=>e instanceof _t.RTCStrategy))&&e&&e.rtcClient.close(),i.length>=2)r=jt.default.combine(i[0],i[1]);else{if(!i.length)throw new Error(\"No compatible protocols\");[r]=i}const o={endpointIdentity:t,rtc:e};return r.addEndpoint(t.channelId,o),r}async processChannelConnection(e){const{clientIdentity:t,providerIdentity:n,ackToSender:i,payload:r,offer:o}=e.payload;t.endpointId?t.isLocalEndpointId=!1:(t.endpointId=this.wire.environment.getNextMessageId(),t.isLocalEndpointId=!0);const s=n.channelId,a=this.providerMap.get(s);if(!a)return i.payload.success=!1,i.payload.reason=`Channel \"${n.channelName}\" has been destroyed.`,this.wire.sendRaw(i);const{provider:c,strategy:d,supportedProtocols:h}=a;try{if(!(c instanceof St.ChannelProvider))throw Error(\"Cannot connect to a channel client\");const e=o??{supportedProtocols:[{type:\"classic\",version:1}],maxProtocols:1},n=this.protocolManager.getCompatibleProtocols(h,e);if(!n.length)throw new Error(\"This provider does not support any of the offered protocols.\");const s=await c.processConnection(t,r);i.payload.payload=i.payload.payload||{};let a={supportedProtocols:[],endpointPayloadPromise:Promise.resolve({endpointIdentity:t})};return a=await n.reduce((async(e,t)=>{const n=await e;if(\"rtc\"===t.type){const{answer:e,rtcClient:i,channels:r}=await Et(this,bt,\"f\").createProviderAnswer(t.payload.rtcConnectionId,t.payload.offer);n.supportedProtocols.push({type:\"rtc\",version:_t.RTCInfo.version,payload:{answer:e}}),n.endpointPayloadPromise=n.endpointPayloadPromise.then((e=>r.then((t=>({...e,rtc:{rtcClient:i,channels:t}})))))}else n.supportedProtocols.push({type:\"classic\",version:Mt.ClassicInfo.version});return n}),Promise.resolve(a)),a.endpointPayloadPromise.then((e=>d.addEndpoint(t.endpointId,e))),i.payload.payload.result=s,i.payload.payload.answer=a,this.wire.sendRaw(i)}catch(e){return i.payload.success=!1,i.payload.reason=e.message,this.wire.sendRaw(i)}}}xe.ConnectionManager=kt,Ct=new WeakMap,bt=new WeakMap;var Lt,Tt,$t,Bt=s&&s.__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},Gt=s&&s.__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)};Object.defineProperty(le,\"__esModule\",{value:!0}),le.Channel=void 0;const Wt=t,Ht=G,Nt=d,Dt=ue,Ut=xe,Vt=Qe;function zt(e){const t=Math.floor(e/10),n=Math.min(3e4,500*2**t);return new Promise((e=>{setTimeout((()=>{e(!1)}),n)}))}class Kt extends Nt.EmitterBase{constructor(e){super(e,\"channel\"),Lt.set(this,void 0),Tt.set(this,new Wt.EventEmitter),$t.set(this,new Ht.AsyncRetryableLazy((async()=>{await Promise.all([this.on(\"disconnected\",(e=>{Dt.ChannelClient.handleProviderDisconnect(e)})),this.on(\"connected\",((...e)=>{Gt(this,Tt,\"f\").emit(\"connected\",...e)}))]).catch((()=>new Error(\"error setting up channel connection listeners\")))}))),Bt(this,Lt,new Ut.ConnectionManager(e),\"f\")}async getAllChannels(){return this.wire.sendAction(\"get-all-channels\").then((({payload:e})=>e.data))}async onChannelConnect(e){await this.on(\"connected\",e)}async onChannelDisconnect(e){await this.on(\"disconnected\",e)}async safeConnect(e,t,n){const i={count:0};do{let r=()=>{};const o=new Promise((t=>{r=n=>{e===n.channelName&&t(!0)},Gt(this,Tt,\"f\").on(\"connected\",r)}));try{if(i.count>0){i.gotConnectedEvent=await Promise.race([zt(i.count),o]);const t=await this.wire.sendAction(\"connect-to-channel\",{...n,retryInfo:i});return console.log(`Successfully connected to channelName: ${e}`),t.payload.data}const t=this.wire.sendAction(\"connect-to-channel\",n);i.originalMessageId=t.messageId;return(await t).payload.data}catch(n){if(!n.message.includes(\"internal-nack\"))throw n;t&&0===i.count&&console.warn(`No channel found for channelName: ${e}. Waiting for connection...`)}finally{i.count+=1,Gt(this,Tt,\"f\").removeListener(\"connected\",r)}}while(t);throw new Error(`No channel found for channelName: ${e}.`)}async connect(e,t={}){if(await Gt(this,$t,\"f\").getValue(),!e||\"string\"!=typeof e)throw new Error(\"Please provide a channelName string to connect to a channel.\");const n={wait:!0,...this.wire.environment.getDefaultChannelOptions().connect,...t},{offer:i,rtc:r}=await Gt(this,Lt,\"f\").createClientOffer(n);let o;(this.fin.me.isFrame||this.fin.me.isView||this.fin.me.isWindow)&&(o=(await this.fin.me.getInfo()).url);const s={channelName:e,...n,offer:i,connectionUrl:o},a=await this.safeConnect(e,n.wait,s),c=await Gt(this,Lt,\"f\").createClientStrategy(r,a),d=new Dt.ChannelClient(a,(()=>Dt.ChannelClient.wireClose(this.wire,a,a.endpointId)),c);return c.onEndpointDisconnect(a.channelId,(async()=>{try{await d.sendDisconnectAction()}catch(e){console.warn(`Something went wrong during disconnect for client with uuid: ${a.uuid} / name: ${a.name} / endpointId: ${a.endpointId}.`)}finally{Dt.ChannelClient.handleProviderDisconnect(a)}})),d}async create(e,t){if(!e)throw new Error(\"Please provide a channelName to create a channel\");const{payload:{data:n}}=await this.wire.sendAction(\"create-channel\",{channelName:e}),i=Gt(this,Lt,\"f\").createProvider(t,n);return this.on(\"client-disconnected\",(t=>{t.channelName===e&&Vt.ChannelProvider.handleClientDisconnection(i,t)})),i}}le.Channel=Kt,Lt=new WeakMap,Tt=new WeakMap,$t=new WeakMap,Object.defineProperty(de,\"__esModule\",{value:!0}),de.InterAppPayload=de.InterApplicationBus=void 0;const qt=t,Jt=d,Yt=he,Zt=le,Qt=O;class Xt extends Jt.Base{constructor(e){super(e),this.events={subscriberAdded:\"subscriber-added\",subscriberRemoved:\"subscriber-removed\"},this.refCounter=new Yt.RefCounter,this.Channel=new Zt.Channel(e),this.emitter=new qt.EventEmitter,e.registerMessageHandler(this.onmessage.bind(this)),this.on=this.emitter.on.bind(this.emitter),this.removeAllListeners=this.emitter.removeAllListeners.bind(this.emitter)}async publish(e,t){await this.wire.sendAction(\"publish-message\",{topic:e,message:t,sourceWindowName:this.me.name})}async send(e,t,n){const i=(0,Qt.validateIdentity)(e);if(i)throw new Error(i);await this.wire.sendAction(\"send-message\",{destinationUuid:e.uuid,destinationWindowName:e.name,topic:t,message:n,sourceWindowName:this.me.name})}subscribe(e,t,n){const i=this.createSubscriptionKey(e.uuid,e.name||\"*\",t);return this.emitter.on(i,n),this.refCounter.actOnFirst(i,(async()=>{await this.wire.sendAction(\"subscribe\",{sourceUuid:e.uuid,sourceWindowName:e.name||\"*\",topic:t,destinationWindowName:this.me.name})}),(()=>Promise.resolve()))}unsubscribe(e,t,n){const i=e.name||\"*\",r=this.createSubscriptionKey(e.uuid,i,t);return this.emitter.removeListener(r,n),this.refCounter.actOnLast(r,(async()=>{await this.wire.sendAction(\"unsubscribe\",{sourceUuid:e.uuid,sourceWindowName:i,topic:t,destinationWindowName:this.me.name})}),(()=>new Promise((e=>e)).then((()=>{}))))}processMessage(e){const{payload:{message:t,sourceWindowName:n,sourceUuid:i,topic:r}}=e,o=[this.createSubscriptionKey(i,n,r),this.createSubscriptionKey(i,\"*\",r),this.createSubscriptionKey(\"*\",\"*\",r)],s={uuid:i,name:n};o.forEach((e=>{this.emitter.emit(e,t,s)}))}emitSubscriverEvent(e,t){const{payload:{targetName:n,uuid:i,topic:r}}=t,o={name:n,uuid:i,topic:r};this.emitter.emit(e,o)}createSubscriptionKey(e,t,n){const i=t||\"*\";if(!(e&&i&&n))throw new Error(\"Missing uuid, name, or topic string\");return function(...e){return e.map((e=>Buffer.from(`${e}`).toString(\"base64\"))).join(\"/\")}(e,i,n)}onmessage(e){const{action:t}=e;switch(t){case\"process-message\":this.processMessage(e);break;case this.events.subscriberAdded:this.emitSubscriverEvent(this.events.subscriberAdded,e);break;case this.events.subscriberRemoved:this.emitSubscriverEvent(this.events.subscriberRemoved,e)}return!0}}de.InterApplicationBus=Xt;de.InterAppPayload=class{};var en={};Object.defineProperty(en,\"__esModule\",{value:!0}),en.Clipboard=void 0;const tn=d;class nn extends tn.Base{async writeText(e){await this.wire.sendAction(\"clipboard-write-text\",e)}async readText(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-text\",{type:e});return t.data}async writeImage(e){await this.wire.sendAction(\"clipboard-write-image\",e)}async readImage(e={format:\"dataURL\"}){const{payload:t}=await this.wire.sendAction(\"clipboard-read-image\",e);return t.data}async writeHtml(e){await this.wire.sendAction(\"clipboard-write-html\",e)}async readHtml(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-html\",{type:e});return t.data}async writeRtf(e){await this.wire.sendAction(\"clipboard-write-rtf\",e)}async readRtf(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-rtf\",{type:e});return t.data}async write(e){await this.wire.sendAction(\"clipboard-write\",e)}async getAvailableFormats(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-formats\",{type:e});return t.data}}en.Clipboard=nn;var rn={},on={},sn={};Object.defineProperty(sn,\"__esModule\",{value:!0}),sn.ExternalApplication=void 0;const an=d;class cn extends an.EmitterBase{constructor(e,t){super(e,\"external-application\",t.uuid),this.identity=t}getInfo(){return this.wire.sendAction(\"get-external-application-info\",this.identity).then((({payload:e})=>e.data))}}sn.ExternalApplication=cn,Object.defineProperty(on,\"__esModule\",{value:!0}),on.ExternalApplicationModule=void 0;const dn=d,hn=sn;class ln extends dn.Base{wrap(e){return this.wire.sendAction(\"external-application-wrap\").catch((e=>{})),Promise.resolve(new hn.ExternalApplication(this.wire,{uuid:e}))}wrapSync(e){return this.wire.sendAction(\"external-application-wrap-sync\").catch((e=>{})),new hn.ExternalApplication(this.wire,{uuid:e})}}on.ExternalApplicationModule=ln,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(on,e),n(sn,e)}(rn);var un={},pn={},wn={};Object.defineProperty(wn,\"__esModule\",{value:!0}),wn._Frame=void 0;const yn=d;class fn extends yn.EmitterBase{constructor(e,t){super(e,\"frame\",t.uuid,t.name),this.identity=t}getInfo(){return this.wire.sendAction(\"get-frame-info\",this.identity).then((({payload:e})=>e.data))}getParentWindow(){return this.wire.sendAction(\"get-parent-window\",this.identity).then((({payload:e})=>e.data))}}wn._Frame=fn,Object.defineProperty(pn,\"__esModule\",{value:!0}),pn._FrameModule=void 0;const gn=d,mn=O,vn=wn;class Cn extends gn.Base{async wrap(e){this.wire.sendAction(\"frame-wrap\").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}wrapSync(e){this.wire.sendAction(\"frame-wrap-sync\").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}getCurrent(){return this.wire.sendAction(\"frame-get-current\").catch((e=>{})),Promise.resolve(new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity()))}getCurrentSync(){return this.wire.sendAction(\"frame-get-current-sync\").catch((e=>{})),new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity())}}pn._FrameModule=Cn,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(pn,e),n(wn,e)}(un);var bn={};Object.defineProperty(bn,\"__esModule\",{value:!0}),bn.GlobalHotkey=void 0;const In=d;class En extends In.EmitterBase{constructor(e){super(e,\"global-hotkey\")}async register(e,t){await this.on(e,t),await this.wire.sendAction(\"global-hotkey-register\",{hotkey:e})}async unregister(e){await this.removeAllListeners(e),await this.wire.sendAction(\"global-hotkey-unregister\",{hotkey:e})}async unregisterAll(){await Promise.all(this.eventNames().filter((e=>!(\"registered\"===e||\"unregistered\"===e))).map((e=>this.removeAllListeners(e)))),await this.wire.sendAction(\"global-hotkey-unregister-all\",{})}async isRegistered(e){const{payload:{data:t}}=await this.wire.sendAction(\"global-hotkey-is-registered\",{hotkey:e});return t}}bn.GlobalHotkey=En;var xn,An={},Pn={},Mn={},_n=s&&s.__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)};Object.defineProperty(Mn,\"__esModule\",{value:!0}),Mn.Platform=void 0;const On=d,Sn=O,Rn=new Map;class Fn extends On.EmitterBase{constructor(e,t){super(t.wire,\"application\",e.uuid),this.getClient=e=>{this.wire.sendAction(\"platform-get-client\",this.identity).catch((e=>{}));const t=e||this.identity,{uuid:n}=t;if(!Rn.has(n)){const e=_n(this,xn,\"f\").call(this,n);Rn.set(n,e)}return Rn.get(n)},xn.set(this,(async e=>{try{const t=`custom-frame-${e}`,n=await this._channel.connect(t,{wait:!1});return n.onDisconnection((()=>{Rn.delete(e)})),n}catch(t){throw Rn.delete(e),new Error(\"The targeted Platform is not currently running. Listen for application-started event for the given Uuid.\")}})),this.launchLegacyManifest=this.launchContentManifest;const n=(0,Sn.validateIdentity)(e);if(n)throw new Error(n);this._channel=t,this.identity={uuid:e.uuid},this.Layout=this.fin.Platform.Layout,this.Application=this.fin.Application.wrapSync(this.identity)}async createView(e,t,n){this.wire.sendAction(\"platform-create-view\",this.identity).catch((e=>{}));const i=await this.getClient(),r=await i.dispatch(\"create-view\",{target:t,opts:e,targetView:n});if(!r||(0,Sn.validateIdentity)(r.identity))throw new Error(`When overwriting the createView call, please return an object that has a valid 'identity' property: ${JSON.stringify(r)}`);return this.fin.View.wrapSync(r.identity)}async createWindow(e){this.wire.sendAction(\"platform-create-window\",this.identity).catch((e=>{}));const t=await this.getClient();e.reason||(e.reason=\"api-call\");const n=await t.dispatch(\"create-view-container\",e);if(!n||(0,Sn.validateIdentity)(n.identity))throw new Error(`When overwriting the createWindow call, please return an object that has a valid 'identity' property: ${JSON.stringify(n)}`);const{identity:i}=n,r=this.fin.Window.wrapSync(i);return r.name=i.name,r.uuid=i.uuid,r}async quit(){this.wire.sendAction(\"platform-quit\",this.identity).catch((e=>{}));return(await this.getClient()).dispatch(\"quit\")}async closeView(e){this.wire.sendAction(\"platform-close-view\",this.identity).catch((e=>{}));const t=await this.getClient();await t.dispatch(\"close-view\",{view:e})}async reparentView(e,t){console.warn(\"Platform.reparentView has been deprecated, please use Platform.createView\"),this.wire.sendAction(\"platform-reparent-view\",this.identity).catch((e=>{}));const n={...e,uuid:e.uuid??this.identity.uuid},i=await this.fin.View.wrap(n),r=await i.getOptions();return this.createView(r,t)}async getSnapshot(){this.wire.sendAction(\"platform-get-snapshot\",this.identity).catch((e=>{}));return(await this.getClient()).dispatch(\"get-snapshot\")}async getViewSnapshot(e){return(await this.getClient()).dispatch(\"get-view-snapshot\",{viewIdentity:e})}async applySnapshot(e,t){this.wire.sendAction(\"platform-apply-snapshot\",this.identity).catch((e=>{}));const n=\"Requested snapshot must be a valid Snapshot object, or a url or filepath to such an object.\";let i;if(\"string\"==typeof e)try{i=(await this._channel.wire.sendAction(\"get-application-manifest\",{manifestUrl:e})).payload.data}catch(e){throw new Error(`${n}: ${e}`)}else i=e;if(!i.windows)throw new Error(n);const r=await this.getClient();return await r.dispatch(\"apply-snapshot\",{snapshot:i,options:t}),this}async fetchManifest(e){return(await this.getClient()).dispatch(\"platform-fetch-manifest\",{manifestUrl:e})}async launchContentManifest(e){this.wire.sendAction(\"platform-launch-content-manifest\",this.identity).catch((()=>{}));const t=await this.getClient(),n=await this.fetchManifest(e);return t.dispatch(\"launch-into-platform\",{manifest:n,manifestUrl:e}),this}async setWindowContext(e={},t){if(this.wire.sendAction(\"platform-set-window-context\",this.identity).catch((e=>{})),!e)throw new Error(\"Please provide a serializable object or string to set the context.\");const n=await this.getClient(),{entityType:i}=t?await this.fin.System.getEntityInfo(t.uuid,t.name):this.fin.me;await n.dispatch(\"set-window-context\",{context:e,entityType:i,target:t||{uuid:this.fin.me.uuid,name:this.fin.me.name}})}async getWindowContext(e){this.wire.sendAction(\"platform-get-window-context\",this.identity).catch((e=>{}));const t=await this.getClient(),{entityType:n}=e?await this.fin.System.getEntityInfo(e.uuid,e.name):this.fin.me;return t.dispatch(\"get-window-context\",{target:e||{uuid:this.fin.me.uuid,name:this.fin.me.name},entityType:n})}async closeWindow(e,t={skipBeforeUnload:!1}){this.wire.sendAction(\"platform-close-window\",this.identity).catch((e=>{}));return(await this.getClient()).dispatch(\"close-window\",{windowId:e,options:t})}}Mn.Platform=Fn,xn=new WeakMap;var jn={},kn={},Ln={},Tn={};function $n(e){switch(e){case\"columns\":case\"grid\":case\"rows\":case\"tabs\":return!0;default:return!1}}Object.defineProperty(Tn,\"__esModule\",{value:!0}),Tn.overrideFromComposables=Tn.isValidPresetType=void 0,Tn.isValidPresetType=$n,Tn.overrideFromComposables=function(...e){return t=>e.reduceRight(((e,t)=>n=>t(e(n))),(e=>e))(t)},Tn.default={isValidPresetType:$n};var Bn={},Gn={},Wn={};Object.defineProperty(Wn,\"__esModule\",{value:!0}),Wn.ApiConsumer=void 0;Wn.ApiConsumer=class{constructor(e){this.strategy=e,this.consume=async e=>(await this.strategy.getExposedFunctions(e)).reduce(((t,n)=>({...t,[n.key]:this.strategy.createFunction(n,e)})),{})}};var Hn={},Nn={};Object.defineProperty(Nn,\"__esModule\",{value:!0}),Nn.expose=Nn.getExposedProperties=void 0;const Dn=Symbol(\"exposedProperties\");Nn.getExposedProperties=e=>e[Dn]||e.prototype[Dn]||[];Nn.expose=e=>(t,n,i)=>{t[Dn]=t[Dn]||[],t[Dn].push({key:n,descriptor:i,options:e})},Object.defineProperty(Hn,\"__esModule\",{value:!0}),Hn.ApiExposer=void 0;const Un=Nn;Hn.ApiExposer=class{constructor(e){this.strategy=e,this.exposeInstance=async(e,t)=>{const n=(0,Un.getExposedProperties)(e),i=await Promise.all(n.map((async({key:n,options:i})=>({key:n,options:await this.strategy.exposeFunction(e[n].bind(e),{key:n,options:i,meta:t})}))));await this.strategy.exposeMeta(t,i)}}};var Vn={},zn={},Kn={};Object.defineProperty(Kn,\"__esModule\",{value:!0}),Kn.ChannelsConsumer=void 0;Kn.ChannelsConsumer=class{constructor(e){this.channel=e,this.getExposedFunctions=async e=>{const{id:t}=e,{props:n}=await this.channel.dispatch(`api-meta:${t}`);return n},this.createFunction=e=>(...t)=>{const{action:n}=e.options;return this.channel.dispatch(n,{args:t})}}};var qn={};Object.defineProperty(qn,\"__esModule\",{value:!0}),qn.ChannelsExposer=void 0;qn.ChannelsExposer=class{constructor(e){this.channelProviderOrClient=e,this.exposeFunction=async(e,t)=>{const{key:n,options:i,meta:r}=t,{id:o}=r,s=`${o}.${i?.action||n}`;return await this.channelProviderOrClient.register(s,(async({args:t})=>e(...t))),{action:s}},this.exposeMeta=async({id:e},t)=>{const n=`api-meta:${e}`;await this.channelProviderOrClient.register(n,(()=>({props:t})))}}},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Kn,e),n(qn,e)}(zn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(zn,e)}(Vn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Wn,e),n(Hn,e),n(Vn,e),n(Nn,e)}(Gn);var Jn={};Object.defineProperty(Jn,\"__esModule\",{value:!0}),Jn.createRelayedDispatch=exports.relayChannelClientApi_1=Jn.relayChannelClientApi=void 0;const Yn=[\"no longer connected\",\"RTCDataChannel closed unexpectedly\",\"The client you are trying to dispatch from is disconnected from the target provider\"];exports.relayChannelClientApi_1=Jn.relayChannelClientApi=async(e,t)=>{e.register(`relay:${t}`,(({action:t,target:n,payload:i})=>e.dispatch(n,t,i))),await Promise.resolve()};Jn.createRelayedDispatch=(e,t,n,i)=>async(r,o)=>{try{return await e.dispatch(`relay:${n}`,{action:r,payload:o,target:t})}catch(e){if(s=e.message,Yn.some((e=>s.includes(e)))&&i)throw new Error(i);throw e}var s};var Zn,Qn,Xn,ei=s&&s.__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},ti=s&&s.__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)};Object.defineProperty(Bn,\"__esModule\",{value:!0}),Bn.ColumnOrRow=Bn.TabStack=Bn.LayoutNode=void 0;const ni=Gn,ii=Jn;class ri{constructor(e,t){Zn.set(this,void 0),this.isRoot=()=>ti(this,Zn,\"f\").isRoot(this.entityId),this.exists=()=>ti(this,Zn,\"f\").exists(this.entityId),this.getParent=async()=>{const e=await ti(this,Zn,\"f\").getParent(this.entityId);if(e)return ri.getEntity(e,ti(this,Zn,\"f\"))},this.createAdjacentStack=async(e,t)=>{const n=await ti(this,Zn,\"f\").createAdjacentStack(this.entityId,e,t);return ri.getEntity({entityId:n,type:\"stack\"},ti(this,Zn,\"f\"))},this.getAdjacentStacks=async e=>(await ti(this,Zn,\"f\").getAdjacentStacks({targetId:this.entityId,edge:e})).map((e=>ri.getEntity({type:\"stack\",entityId:e.entityId},ti(this,Zn,\"f\")))),ei(this,Zn,e,\"f\"),this.entityId=t}}Bn.LayoutNode=ri,Zn=new WeakMap,ri.newLayoutEntitiesClient=async(e,t,n)=>{const i=(0,ii.createRelayedDispatch)(e,n,\"layout-relay\",\"You are trying to interact with a layout component on a window that does not exist or has been destroyed.\");return new ni.ApiConsumer(new ni.ChannelsConsumer({dispatch:i})).consume({id:t})},ri.getEntity=(e,t)=>{const{entityId:n,type:i}=e;switch(i){case\"column\":case\"row\":return new si(t,n,i);case\"stack\":return new oi(t,n);default:throw new Error(`Unrecognised Layout Entity encountered ('${JSON.stringify(e)})`)}};class oi extends ri{constructor(e,t){super(e,t),Qn.set(this,void 0),this.type=\"stack\",this.getViews=()=>ti(this,Qn,\"f\").getStackViews(this.entityId),this.addView=async(e,t={index:0})=>ti(this,Qn,\"f\").addViewToStack(this.entityId,e,t),this.removeView=async e=>{await ti(this,Qn,\"f\").removeViewFromStack(this.entityId,e)},this.setActiveView=async e=>{await ti(this,Qn,\"f\").setStackActiveView(this.entityId,e)},ei(this,Qn,e,\"f\")}}Bn.TabStack=oi,Qn=new WeakMap;class si extends ri{constructor(e,t,n){super(e,t),Xn.set(this,void 0),this.getContent=async()=>(await ti(this,Xn,\"f\").getContent(this.entityId)).map((e=>ri.getEntity(e,ti(this,Xn,\"f\")))),ei(this,Xn,e,\"f\"),this.type=n}}Bn.ColumnOrRow=si,Xn=new WeakMap;var ai={};Object.defineProperty(ai,\"__esModule\",{value:!0}),ai.DEFAULT_LAYOUT_KEY=ai.LAYOUT_CONTROLLER_ID=void 0,ai.LAYOUT_CONTROLLER_ID=\"layout-entities\",ai.DEFAULT_LAYOUT_KEY=\"__default__\";var ci,di,hi,li=s&&s.__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)};Object.defineProperty(Ln,\"__esModule\",{value:!0}),Ln.Layout=void 0;const ui=G,pi=O,wi=d,yi=Tn,fi=Bn,gi=ai;class mi extends wi.Base{static getClient(e){return li(e,di,\"f\").getValue()}constructor(e,t){super(t),ci.add(this),di.set(this,new ui.Lazy((async()=>fi.LayoutNode.newLayoutEntitiesClient(await this.platform.getClient(),gi.LAYOUT_CONTROLLER_ID,this.identity)))),this.replace=async e=>{this.wire.sendAction(\"layout-replace\").catch((e=>{}));const t=await this.platform.getClient();await t.dispatch(\"replace-layout\",{target:this.identity,opts:{layout:e}})},this.replaceView=async(e,t)=>{this.wire.sendAction(\"layout-replace-view\").catch((e=>{}));const n=await this.platform.getClient();await n.dispatch(\"replace-view\",{target:this.identity,opts:{viewToReplace:e,newView:t}})},this.applyPreset=async e=>{this.wire.sendAction(\"layout-apply-preset\").catch((e=>{}));const t=await this.platform.getClient(),{presetType:n}=e;if(!n||!(0,yi.isValidPresetType)(n))throw new Error(\"Cannot apply preset layout, please include an applicable presetType property in the PresetLayoutOptions.\");await t.dispatch(\"apply-preset-layout\",{target:this.identity,opts:{presetType:n}})};const n=(0,pi.validateIdentity)(e);if(n)throw new Error(n);this.identity=e,this.platform=this.fin.Platform.wrapSync({uuid:e.uuid}),e.uuid===this.fin.me.uuid&&e.name===this.fin.me.name&&(this.init=this.fin.Platform.Layout.init)}async getConfig(){this.wire.sendAction(\"layout-get-config\").catch((e=>{}));return(await this.platform.getClient()).dispatch(\"get-frame-snapshot\",{target:this.identity})}async getCurrentViews(){this.wire.sendAction(\"layout-get-views\").catch((e=>{}));const e=await this.platform.getClient();return(await e.dispatch(\"get-layout-views\",{target:this.identity})).map((e=>this.fin.View.wrapSync(e)))}async getRootItem(){this.wire.sendAction(\"layout-get-root-item\").catch((()=>{}));const e=await li(this,di,\"f\").getValue(),t=await e.getRoot(\"layoutName\"in this.identity?this.identity:void 0);return fi.LayoutNode.getEntity(t,e)}async getStackByViewIdentity(e){this.wire.sendAction(\"layout-get-stack-by-view\").catch((()=>{}));const t=await li(this,di,\"f\").getValue(),n=await t.getStackByView(e);if(!n)throw new Error(`No stack found for view: ${e.uuid}/${e.name}`);return fi.LayoutNode.getEntity(n,t)}async addView(e,{location:t,targetView:n}={}){this.wire.sendAction(\"layout-add-view\").catch((e=>{}));const{identity:i}=await li(this,ci,\"m\",hi).call(this,\"layout-add-view\",{viewOptions:e,location:t,targetView:n});return{identity:i}}async closeView(e){this.wire.sendAction(\"layout-close-view\").catch((e=>{})),await li(this,ci,\"m\",hi).call(this,\"layout-close-view\",{viewIdentity:e})}}Ln.Layout=mi,di=new WeakMap,ci=new WeakSet,hi=async function(e,t){return(await this.platform.getClient()).dispatch(e,{target:this.identity,opts:t})};var vi,Ci,bi,Ii,Ei,xi=s&&s.__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)},Ai=s&&s.__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};Object.defineProperty(kn,\"__esModule\",{value:!0}),kn.LayoutModule=void 0;const Pi=d,Mi=Ln,_i=ai;class Oi extends Pi.Base{constructor(){super(...arguments),vi.add(this),Ci.set(this,!1),bi.set(this,null),this.init=async(e={})=>{if(this.wire.sendAction(\"layout-init\").catch((e=>{})),!this.wire.environment.layoutAllowedInContext(this.fin))throw new Error(\"Layout.init can only be called from a Window context.\");if(xi(this,Ci,\"f\"))throw new Error(\"Layout.init was already called, please use Layout.create to add additional layouts.\");\"openfin\"===this.wire.environment.type&&await this.fin.Platform.getCurrentSync().getClient(),Ai(this,Ci,!0,\"f\"),Ai(this,bi,await this.wire.environment.initLayoutManager(this.fin,this.wire,e),\"f\"),await this.wire.environment.applyLayoutSnapshot(this.fin,xi(this,bi,\"f\"),e);const t={name:this.fin.me.name,uuid:this.fin.me.uuid};if(!e.layoutManagerOverride){const e={layoutName:_i.DEFAULT_LAYOUT_KEY,...t};return xi(this,Ii,\"f\").call(this,e)}return this.wrapSync(t)},Ii.set(this,(e=>{const t=\"[Layout] You are using a deprecated property `layoutManager` - it will throw if you access it starting in v37.\",n=new Proxy({},{get(e,n){throw console.warn(`[Layout-mgr-proxy] accessing ${n.toString()}`),new Error(t)}}),i=Object.assign(this.wrapSync(e),{layoutManager:n});return new Proxy(i,{get(e,n){if(\"layoutManager\"===n)throw console.warn(`[Layout-proxy] accessing ${n.toString()}`),new Error(t);return e[n]}})})),this.getCurrentLayoutManagerSync=()=>xi(this,vi,\"m\",Ei).call(this,\"fin.Platform.Layout.getCurrentLayoutManagerSync()\"),this.create=async e=>this.wire.environment.createLayout(xi(this,vi,\"m\",Ei).call(this,\"fin.Platform.Layout.create()\"),e),this.destroy=async e=>this.wire.environment.destroyLayout(xi(this,vi,\"m\",Ei).call(this,\"fin.Platform.Layout.destroy()\"),e)}async wrap(e){return this.wire.sendAction(\"layout-wrap\").catch((e=>{})),new Mi.Layout(e,this.wire)}wrapSync(e){return this.wire.sendAction(\"layout-wrap-sync\").catch((e=>{})),new Mi.Layout(e,this.wire)}async getCurrent(){if(this.wire.sendAction(\"layout-get-current\").catch((e=>{})),\"openfin\"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error(\"You are not in a Window context. Only Windows can have a Layout.\");const{uuid:e,name:t}=this.fin.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction(\"layout-get-current-sync\").catch((e=>{})),\"openfin\"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error(\"You are not in a Window context. Only Windows can have a Layout.\");const{uuid:e,name:t}=this.fin.me;return this.wrapSync({uuid:e,name:t})}async getLayoutByViewIdentity(e){this.wire.sendAction(\"layout-get-by-view-identity\").catch((()=>{}));let t=await this.wire.environment.getViewWindowIdentity(this.fin,e);t.identity&&(t=t.identity);try{const n=this.wrapSync(t),i=await Mi.Layout.getClient(n),r=await i.getLayoutIdentityForViewOrThrow(e);return this.wrapSync(r)}catch(n){if(![\"No action registered at target for\",\"getLayoutIdentityForViewOrThrow is not a function\"].some((e=>n.message.includes(e))))throw n;if(t.uuid===t.name)throw new Error(`View identity ${JSON.stringify(e)} is not attached to any layout in provider window ${JSON.stringify(t)}.`);return this.wrapSync(t)}}}kn.LayoutModule=Oi,Ci=new WeakMap,bi=new WeakMap,Ii=new WeakMap,vi=new WeakSet,Ei=function(e){if(!xi(this,bi,\"f\"))throw new Error(`You must call init before using the API ${e}`);return xi(this,bi,\"f\")},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(kn,e),n(Ln,e)}(jn),Object.defineProperty(Pn,\"__esModule\",{value:!0}),Pn.PlatformModule=void 0;const Si=d,Ri=Mn,Fi=jn;class ji extends Si.Base{constructor(e,t){super(e),this._channel=t,this.Layout=new Fi.LayoutModule(this.wire)}async init(e){if(!fin.__internal_.isPlatform||fin.me.name!==fin.me.uuid)throw new Error(\"fin.Platform.init should only be called from a custom platform provider running in the main window of the application.\");return this.wire.environment.initPlatform(this.fin,e)}async wrap(e){return this.wire.sendAction(\"platform-wrap\").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}wrapSync(e){return this.wire.sendAction(\"platform-wrap-sync\").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}async getCurrent(){return this.wire.sendAction(\"platform-get-current\").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction(\"platform-get-current-sync\").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}start(e){return this.wire.sendAction(\"platform-start\").catch((e=>{})),new Promise((async(t,n)=>{try{const{uuid:n}=e,i=await this.fin.Application._create({...e,isPlatformController:!0});i.once(\"platform-api-ready\",(()=>t(this.wrapSync({uuid:n})))),i._run({uuid:n})}catch(e){n(e)}}))}startFromManifest(e,t){return this.wire.sendAction(\"platform-start-from-manifest\").catch((e=>{})),new Promise((async(n,i)=>{try{const i=await this.fin.Application._createFromManifest(e);i.once(\"platform-api-ready\",(()=>n(this.wrapSync({uuid:i.identity.uuid})))),i._run(t)}catch(e){i(e)}}))}}Pn.PlatformModule=ji,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Pn,e),n(Mn,e)}(An);var ki={};!function(e){Object.defineProperty(e,\"__esModule\",{value:!0}),e.getMe=e.getBaseMe=e.environmentUnsupportedMessage=void 0;const t=J(),n=un,i=ie(),r=rn;function o(e,t,n){return{...{isView:\"view\"===e,isWindow:\"window\"===e,isFrame:\"iframe\"===e,isExternal:\"external connection\"===e},uuid:t,name:n,entityType:e}}e.environmentUnsupportedMessage=\"You are not running in OpenFin.\",e.getBaseMe=o,e.getMe=function(s){const{uuid:a,name:c,entityType:d}=s.me,h={setContext(){throw new Error(e.environmentUnsupportedMessage)},addContextHandler(){throw new Error(e.environmentUnsupportedMessage)},getContextGroups(){throw new Error(e.environmentUnsupportedMessage)},joinContextGroup(){throw new Error(e.environmentUnsupportedMessage)},removeFromContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getAllClientsInContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getInfoForContextGroup(){throw new Error(e.environmentUnsupportedMessage)}},l=\"Interop API has not been instantiated. Either connection has failed or you have not declared interop in your config.\",u={setContext(){throw new Error(l)},addContextHandler(){throw new Error(l)},getContextGroups(){throw new Error(l)},joinContextGroup(){throw new Error(l)},removeFromContextGroup(){throw new Error(l)},getAllClientsInContextGroup(){throw new Error(l)},getInfoForContextGroup(){throw new Error(l)}},p={eventNames:()=>{throw new Error(e.environmentUnsupportedMessage)},emit:()=>{throw new Error(e.environmentUnsupportedMessage)},listeners:()=>{throw new Error(e.environmentUnsupportedMessage)},listenerCount:()=>{throw new Error(e.environmentUnsupportedMessage)},on:()=>{throw new Error(e.environmentUnsupportedMessage)},addListener:()=>{throw new Error(e.environmentUnsupportedMessage)},once:()=>{throw new Error(e.environmentUnsupportedMessage)},prependListener:()=>{throw new Error(e.environmentUnsupportedMessage)},prependOnceListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeAllListeners:()=>{throw new Error(e.environmentUnsupportedMessage)}};switch(d){case\"view\":return Object.assign(new t.View(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case\"window\":return Object.assign(new i._Window(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case\"iframe\":return Object.assign(new n._Frame(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case\"external connection\":return Object.assign(new r.ExternalApplication(s,{uuid:a}),o(d,a,c),{interop:u,isOpenFin:!1});default:return{...o(d,a,c),...p,interop:h,isOpenFin:!1}}}}(ki);var Li={},Ti={},$i={};Object.defineProperty($i,\"__esModule\",{value:!0}),$i.createWarningObject=$i.createUnusableObject=void 0,$i.createUnusableObject=function(e){const t=()=>{throw new Error(e)};return new Proxy({},{apply:t,construct:t,defineProperty:t,deleteProperty:t,get:t,getOwnPropertyDescriptor:t,getPrototypeOf:t,has:t,isExtensible:t,ownKeys:t,preventExtensions:t,set:t,setPrototypeOf:t})},$i.createWarningObject=function(e,t){return new Proxy(t,{get:(...t)=>(console.warn(e),Reflect.get(...t)),set:(...t)=>(console.warn(e),Reflect.set(...t)),getOwnPropertyDescriptor:(...t)=>(console.warn(e),Reflect.getOwnPropertyDescriptor(...t)),ownKeys:(...t)=>(console.warn(e),Reflect.ownKeys(...t))})};var Bi,Gi={},Wi={};var Hi={};!function(e){Object.defineProperty(e,\"__esModule\",{value:!0}),e.wrapIntentHandler=e.BROKER_ERRORS=e.generateOverrideWarning=e.generateOverrideError=e.wrapContextHandler=e.wrapInTryCatch=e.generateId=void 0;e.generateId=()=>`${Math.random()}${Date.now()}`;e.wrapInTryCatch=(e,t)=>(...n)=>{try{return e(...n)}catch(e){throw new Error((t||\"\")+e)}};e.wrapContextHandler=(e,t)=>async n=>{try{await e(n)}catch(e){throw console.error(`Error thrown by handler ${t} for context type ${n.type}: ${e}`),e}};e.generateOverrideError=(e,t)=>`You have tried to to use ${e} but ${t} has not been overridden in the Interop Broker. Please override this function. Refer to our documentation for more info.`;e.generateOverrideWarning=(e,t,n,i)=>{const{uuid:r,name:o}=n;return i?`Entity with identity: ${r}/${o} has called ${i} or ${e} but ${t} has not been overridden.`:`Entity with identity: ${r}/${o} has called ${e} but ${t} has not been overridden.`},e.BROKER_ERRORS={fireIntent:(0,e.generateOverrideError)(\"fireIntent\",\"handleFiredIntent\"),fireIntentForContext:(0,e.generateOverrideError)(\"fireIntentForContext\",\"handleFiredIntentForContext\"),getInfoForIntent:(0,e.generateOverrideError)(\"getInfoForIntent\",\"handleInfoForIntent\"),getInfoForIntentsByContext:(0,e.generateOverrideError)(\"getInfoForIntentsByContext\",\"handleInfoForIntentsByContext\"),joinSessionContextGroupWithJoinContextGroup:\"The Context Group you have tried to join is a Session Context Group. Custom Context Groups can only be defined by the Interop Broker through code or manifest configuration. Please use joinSessionContextGroup.\",fdc3Open:(0,e.generateOverrideError)(\"fdc3.open\",\"fdc3HandleOpen\"),fdc3FindInstances:(0,e.generateOverrideError)(\"fdc3.findInstances\",\"fdc3HandleFindInstances\"),fdc3GetAppMetadata:(0,e.generateOverrideError)(\"fdc3.getAppMetadata\",\"fdc3HandleGetAppMetadata\"),fdc3GetInfo:(0,e.generateOverrideError)(\"fdc3.getInfo\",\"fdc3HandleGetInfo\")};e.wrapIntentHandler=(e,t)=>async n=>{try{return e(n)}catch(e){throw console.error(`Error thrown by handler ${t}: ${e}`),e}}}(Hi);var Ni,Di,Ui={};function Vi(){if(Di)return Gi;Di=1;var e,t,n,r=s&&s.__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},o=s&&s.__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)},a=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Gi,\"__esModule\",{value:!0}),Gi.InteropBroker=void 0;const c=d,h=a(function(){if(Bi)return Wi;Bi=1,Object.defineProperty(Wi,\"__esModule\",{value:!0});const e=Cr();return Wi.default=class{constructor(e,t){this.provider=e,this.id=t,this.lastContext=void 0,this.contextGroupMap=new Map,this.clients=new Map,this.registerListeners()}registerListeners(){this.provider.register(`sessionContextGroup:getContext-${this.id}`,this.getCurrentContext.bind(this)),this.provider.register(`sessionContextGroup:setContext-${this.id}`,this.setContext.bind(this)),this.provider.register(`sessionContextGroup:handlerAdded-${this.id}`,this.handlerAdded.bind(this)),this.provider.register(`sessionContextGroup:handlerRemoved-${this.id}`,this.handlerRemoved.bind(this))}getCurrentContext(e){return e.type?this.contextGroupMap.get(e.type):this.lastContext}setContext(t,n){const{context:i}=t,r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name} not in Session Client State Map`);this.contextGroupMap.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{e.contextHandlers.get(i.type)?.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getClientState(e){return this.clients.get(e.endpointId)}async handlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(i){const e=r.contextHandlers.get(i)||[];r.contextHandlers.set(i,[...e,n]);const o=this.contextGroupMap.get(i);o&&await this.provider.dispatch(t,n,o)}else{r.globalHandler=n;const e=[...this.contextGroupMap.keys()].map((async e=>{const i=this.contextGroupMap.get(e);i&&await this.provider.dispatch(t,n,i)}));await Promise.all(e)}}handlerRemoved(e,t){const{handlerId:n}=e,i=this.clients.get(t.endpointId);i?(Array.from(i.contextHandlers).forEach((([,e])=>{const t=e.indexOf(n);t>-1&&e.splice(t,1)})),i.globalHandler===n&&(i.globalHandler=void 0)):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={contextHandlers:new Map,clientIdentity:e,globalHandler:void 0};this.clients.set(e.endpointId,t)}}onDisconnection(e){this.clients.delete(e.endpointId)}},Wi}()),l=Hi,u=a(i),p=function(){if(Ni)return Ui;Ni=1,Object.defineProperty(Ui,\"__esModule\",{value:!0}),Ui.PrivateChannelProvider=void 0;const e=Vi();return Ui.PrivateChannelProvider=class t{constructor(e,t){this.provider=e,this.id=t,this.clients=new Map,this.registerListeners(),this.contextByContextType=new Map,this.lastContext=void 0,this.provider.onConnection((e=>this.registerNewClient(e))),this.provider.onDisconnection((async e=>{const{endpointId:t}=e;this.clients.has(t)&&await this.handleClientDisconnecting(e),0===(await this.provider.getAllClientInfo()).length&&this.provider.destroy()}))}getClientState(e){return this.clients.get(e.endpointId)}registerListeners(){this.provider.register(\"broadcast\",this.broadcast.bind(this)),this.provider.register(\"getCurrentContext\",this.getCurrentContext.bind(this)),this.provider.register(\"contextHandlerAdded\",this.contextHandlerAdded.bind(this)),this.provider.register(\"contextHandlerRemoved\",this.contextHandlerRemoved.bind(this)),this.provider.register(\"nonStandardHandlerRemoved\",this.nonStandardHandlerRemoved.bind(this)),this.provider.register(\"onAddContextHandlerAdded\",this.onAddContextHandlerAdded.bind(this)),this.provider.register(\"onDisconnectHandlerAdded\",this.onDisconnectHandlerAdded.bind(this)),this.provider.register(\"onUnsubscribeHandlerAdded\",this.onUnsubscribeHandlerAdded.bind(this)),this.provider.register(\"clientDisconnecting\",((e,t)=>{this.handleClientDisconnecting(t)}))}broadcast(t,n){const{context:i}=t;if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name}, tried to call broadcast, is not connected to this Private Channel`);const r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to broadcast - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);this.contextByContextType.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{const t=e.handlerIdsByContextTypes.get(i.type);t&&t.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getCurrentContext(e,t){const{contextType:n}=e;if(!this.getClientState(t))throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call getCurrentContext, is not connected to this Private Channel`);if(void 0!==n){return this.contextByContextType.get(n)||null}return this.lastContext?this.lastContext:null}contextHandlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call addContextListener, is not connected to this Private Channel`);if(i){const e=r.handlerIdsByContextTypes.get(i)||[];r.handlerIdsByContextTypes.set(i,[...e,n])}else r.globalHandler=n;Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&e.onAddContextListenerHandlerId&&this.provider.dispatch(e.clientIdentity,e.onAddContextListenerHandlerId,i)}))}async contextHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);if(i){let e;if(i.globalHandler===n)i.globalHandler=void 0;else for(const[t,r]of i.handlerIdsByContextTypes){const i=r.indexOf(n);i>-1&&(r.splice(i,1),e=t)}const r=(await this.getConnectedClients()).map((async n=>{const{clientIdentity:i,clientIdentity:{endpointId:r},onUnsubscribeHandlerId:o}=n;r!==t.endpointId&&o&&await this.provider.dispatch(i,o,e)}));try{await Promise.all(r)}catch(e){throw console.error(`Problem when attempting to dispatch to onUnsubscribeHandlers. Error: ${e} Removing Client: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}`),new Error(e)}}else console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}.`)}nonStandardHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);i?i.onDisconnectHandlerId===n?i.onDisconnectHandlerId=void 0:i.onAddContextListenerHandlerId===n?i.onAddContextListenerHandlerId=void 0:i.onUnsubscribeHandlerId===n&&(i.onUnsubscribeHandlerId=void 0):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}onAddContextHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onAddContextListener, is not connected to this Private Channel`);n.onAddContextListenerHandlerId=i,Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&Array.from(e.handlerIdsByContextTypes.keys()).forEach((e=>{this.provider.dispatch(t,i,e)}))}))}onDisconnectHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onDisconnect, is not connected to this Private Channel`);n.onDisconnectHandlerId=i}onUnsubscribeHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onUnsubscribe, is not connected to this Private Channel`);n.onUnsubscribeHandlerId=i}removeClient(e){const t=this.getClientState(e);if(!t)throw new Error(`Client with Identity: ${e.uuid} ${e.name}, tried to call disconnect, is not connected to this Private Channel`);t.handlerIdsByContextTypes.clear(),this.clients.delete(e.endpointId)}async fireOnDisconnectForOtherClients(e){const{endpointId:t}=e,n=(await this.getConnectedClients()).map((async e=>{const{clientIdentity:{endpointId:n},onDisconnectHandlerId:i}=e;n!==t&&i&&await this.provider.dispatch(e.clientIdentity,i)}));try{await Promise.all(n)}catch(t){throw console.error(`Problem when attempting to dispatch to onDisconnectHandlers. Error: ${t} Disconnecting Client: uuid: ${e.uuid}. name: ${e.name}. endpointId: ${e.endpointId}`),new Error(t)}}async unsubscribeAll(e){const{endpointId:t}=e,n=this.clients.get(t);if(n){const t=Array.from(n.handlerIdsByContextTypes.values()).flat(),i=n.globalHandler;if(t.length>0){const n=t.map((async t=>this.contextHandlerRemoved({handlerId:t},e)));try{await Promise.all(n)}catch(e){console.error(e.message)}}if(i)try{await this.contextHandlerRemoved({handlerId:i},e)}catch(e){console.error(e.message)}}}async handleClientDisconnecting(e){await this.unsubscribeAll(e),this.removeClient(e),await this.fireOnDisconnectForOtherClients(e)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={clientIdentity:e,handlerIdsByContextTypes:new Map,globalHandler:void 0,onAddContextListenerHandlerId:void 0,onUnsubscribeHandlerId:void 0,onDisconnectHandlerId:void 0};this.clients.set(e.endpointId,t)}}async getConnectedClients(){const e=await this.provider.getAllClientInfo();return Array.from(this.clients.values()).filter((t=>{const{uuid:n,name:i}=t.clientIdentity;return e.some((e=>i===e.name&&n===e.uuid))}))}static init(e,n){return new t(e,n)}},Ui}(),w=G,y=[{id:\"green\",displayMetadata:{color:\"#00CC88\",name:\"green\"}},{id:\"purple\",displayMetadata:{color:\"#8C61FF\",name:\"purple\"}},{id:\"orange\",displayMetadata:{color:\"#FF8C4C\",name:\"orange\"}},{id:\"red\",displayMetadata:{color:\"#FF5E60\",name:\"red\"}},{id:\"pink\",displayMetadata:{color:\"#FF8FB8\",name:\"pink\"}},{id:\"yellow\",displayMetadata:{color:\"#E9FF8F\",name:\"yellow\"}}];let f=class i extends c.Base{constructor(i,s,a){super(i),e.set(this,void 0),t.set(this,void 0),n.set(this,void 0),this.getProvider=()=>o(this,n,\"f\").getValue(),this.interopClients=new Map,this.contextGroupsById=new Map,r(this,t,a.contextGroups??[...y],\"f\"),r(this,e,a.fdc3Info,\"f\"),a?.logging&&(this.logging=a.logging),this.intentClientMap=new Map,this.lastContextMap=new Map,this.sessionContextGroupMap=new Map,r(this,n,new w.Lazy(s),\"f\"),this.setContextGroupMap(),this.setupChannelProvider()}static createClosedConstructor(...e){return class extends i{constructor(...t){if(t.length){const[n,i,r]=t;if(r&&\"object\"==typeof r&&!(0,u.default)(r,e[2]))return console.warn(\"You have modified the parameters of the InteropOverride constructor. This behavior is deprecated and will be removed in a future version. You can modify these options in your manifest. Please consult our Interop docs for guidance on migrating to the new override scheme.\"),void super(e[0],e[1],r);console.warn(\"You are attempting to pass arguments to the InteropOverride constructor. This is not necessary, and these passed arguments will be ignored. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.\")}super(...e)}}}setContext({context:e},t){this.wire.sendAction(\"interop-broker-set-context\").catch((e=>{}));const n=this.getClientState(t);if(!n||!n.contextGroupId)throw n?new Error(\"You must join a context group before you can set context.\"):new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);{const{contextGroupId:t}=n;this.setContextForGroup({context:e},t)}}setContextForGroup({context:e},t){this.wire.sendAction(\"interop-broker-set-context-for-group\").catch((e=>{}));const n=this.contextGroupsById.get(t);if(!n)throw new Error(`Unable to set context for context group that isn't in the context group mapping: ${t}.`);const r=i.checkContextIntegrity(e);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(e)}`);const o=e.type;n.set(o,e),this.lastContextMap.set(t,o);Array.from(this.interopClients.values()).filter((e=>e.contextGroupId===t)).forEach((t=>{for(const[,n]of t.contextHandlers)i.isContextTypeCompatible(o,n.contextType)&&this.invokeContextHandler(t.clientIdentity,n.handlerId,e)}))}getCurrentContext(e,t){this.wire.sendAction(\"interop-broker-get-current-context\").catch((e=>{}));const n=this.getClientState(t);if(!n?.contextGroupId)throw new Error(\"You must be a member of a context group to call getCurrentContext\");const{contextGroupId:i}=n,r=this.contextGroupsById.get(i),o=this.lastContextMap.get(i),s=e?.contextType??o;return r&&s?r.get(s):void 0}async joinContextGroup({contextGroupId:e,target:t},n){if(this.wire.sendAction(\"interop-broker-join-context-group\").catch((e=>{})),this.sessionContextGroupMap.has(e))throw new Error(l.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup);if(t){i.hasEndpointId(t)&&await this.addClientToContextGroup({contextGroupId:e},t);try{const n=this.channel.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name));if(!n.length)throw new Error(`Given Identity ${t.uuid} ${t.name} is not connected to the Interop Broker.`);n.length>1&&console.warn(`More than one connection found for identity ${t.uuid} ${t.name}`);const i=[];for(const t of n)i.push(this.addClientToContextGroup({contextGroupId:e},t));await Promise.all(i)}catch(e){throw new Error(e)}}else await this.addClientToContextGroup({contextGroupId:e},n)}async addClientToContextGroup({contextGroupId:e},t){this.wire.sendAction(\"interop-broker-add-client-to-context-group\").catch((e=>{}));const n=this.getClientState(t);if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(!this.getContextGroups().find((t=>t.id===e)))throw new Error(`Attempting to join a context group that does not exist: ${e}. You may only join existing context groups.`);if(n.contextGroupId!==e){n.contextGroupId=e,await this.setCurrentContextGroupInClientOptions(t,e);const i=this.contextGroupsById.get(e);for(const[,e]of n.contextHandlers){const{contextType:n,handlerId:r}=e;if(void 0===n)i.forEach(((e,n)=>{this.invokeContextHandler(t,r,e)}));else if(i.has(n)){const e=i.get(n);e&&this.invokeContextHandler(t,r,e)}}}}async removeFromContextGroup({target:e},t){if(this.wire.sendAction(\"interop-broker-remove-from-context-group\").catch((e=>{})),e){i.hasEndpointId(e)&&await this.removeClientFromContextGroup(e);try{const t=this.channel.connections.filter((t=>t.uuid===e.uuid&&t.name===e.name));if(!t.length)throw new Error(`No connection found for given Identity ${e.uuid} ${e.name}`);t.length>1&&console.warn(`More than one connection found for identity ${e.uuid} ${e.name}`);const n=[];for(const e of t)n.push(this.removeClientFromContextGroup(e));await Promise.all(n)}catch(e){throw new Error(e)}}else await this.removeClientFromContextGroup(t)}async removeClientFromContextGroup(e){this.wire.sendAction(\"interop-broker-remove-client-from-context-group\").catch((e=>{}));const t=this.getClientState(e);t&&(t.contextGroupId=void 0),await this.setCurrentContextGroupInClientOptions(e,null)}getContextGroups(){return this.wire.sendAction(\"interop-broker-get-context-groups\").catch((e=>{})),o(this,t,\"f\").map((e=>({...e})))}getInfoForContextGroup({contextGroupId:e}){return this.wire.sendAction(\"interop-broker-get-info-for-context-group\").catch((e=>{})),this.getContextGroups().find((t=>t.id===e))}getAllClientsInContextGroup({contextGroupId:e}){this.wire.sendAction(\"interop-broker-get-all-clients-in-context-group\").catch((e=>{}));return Array.from(this.interopClients.values()).filter((t=>t.contextGroupId===e)).map((e=>e.clientIdentity))}async handleFiredIntent(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.raiseIntent\",\"InteropBroker.handleFiredIntent\",t,\"interopClient.fireIntent\");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntent)}async setIntentTarget(e,t){this.wire.sendAction(\"interop-broker-set-intent-target\").catch((e=>{}));const n=this.intentClientMap.get(t.name),i=`intent-handler-${e.name}`;if(n){const t=n.get(i);if(t){if(t.pendingIntents.push(e),t.clientIdentity&&t.isReady){const{clientIdentity:e,pendingIntents:n}=t;try{const r=n[n.length-1];await this.invokeIntentHandler(e,i,r),t.pendingIntents=[]}catch(n){console.error(`Error invoking intent handler for client ${e.uuid}/${e.name}/${e.endpointId}`),t.isReady=!1}}}else n.set(i,{isReady:!1,pendingIntents:[e]})}else{this.intentClientMap.set(t.name,new Map);const n=this.intentClientMap.get(t.name);n&&n.set(i,{isReady:!1,pendingIntents:[e]})}}async handleInfoForIntent(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.findIntent\",\"InteropBroker.handleInfoForIntent\",t,\"interopClient.getInfoForIntent\");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntent)}async handleInfoForIntentsByContext(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.findIntentsByContext\",\"InteropBroker.handleInfoForIntentsByContext\",t,\"interopClient.getInfoForIntentsByContext\");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntentsByContext)}async handleFiredIntentForContext(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.raiseIntentForContext\",\"InteropBroker.handleFiredIntentForContext\",t,\"interopClient.fireIntentForContext\");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntentForContext)}async clientDisconnected(e){}async fdc3HandleOpen({app:e,context:t},n){const i=(0,l.generateOverrideWarning)(\"fdc3.open\",\"InteropBroker.fdc3HandleOpen\",n);throw console.warn(i),new Error(l.BROKER_ERRORS.fdc3Open)}async fdc3HandleFindInstances(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.open\",\"InteropBroker.fdc3HandleFindInstances\",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3FindInstances)}async fdc3HandleGetAppMetadata(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.getAppMetadata\",\"InteropBroker.fdc3HandleGetAppMetadata\",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3GetAppMetadata)}async invokeContextHandler(e,t,n){const i=await this.getProvider();try{await i.dispatch(e,t,n)}catch(i){console.error(`Error invoking context handler ${t} for context type ${n.type} in client ${e.uuid}/${e.name}/${e.endpointId}`,i)}}async invokeIntentHandler(e,t,n){const i=await this.getProvider();await i.dispatch(e,t,n)}async fdc3HandleGetInfo(t,n){const{fdc3Version:i}=t;return{fdc3Version:i,...o(this,e,\"f\"),optionalFeatures:{OriginatingAppMetadata:!1,UserChannelMembershipAPIs:!0},appMetadata:{appId:\"\",instanceId:\"\"}}}async getAllClientInfo(){return(await this.getProvider()).getAllClientInfo()}decorateSnapshot(e){return{...e,interopSnapshotDetails:{contextGroupStates:this.getContextGroupStates()}}}applySnapshot(e,t){const n=e?.interopSnapshotDetails?.contextGroupStates;n&&(t?.closeExistingWindows||this.updateExistingClients(n),this.rehydrateContextGroupStates(n))}updateExistingClients(e){this.interopClients.forEach((t=>{const{clientIdentity:n,contextGroupId:r,contextHandlers:o}=t;if(r){const t=e[r];for(const[,e]of Object.entries(t))o.forEach((t=>{const{handlerId:r,contextType:o}=t;i.isContextTypeCompatible(e.type,o)&&this.invokeContextHandler(n,r,e)}))}}))}getContextGroupStates(){return i.toObject(this.contextGroupsById)}rehydrateContextGroupStates(e){const t=Object.entries(e);for(const[e,n]of t){const t=Object.entries(n);for(const[n,i]of t)if(this.contextGroupsById.has(e)){this.contextGroupsById.get(e).set(n,i)}else console.warn(`Attempting to set a context group that isn't in the context group mapping. Skipping context group rehydration for: ${e}`)}}contextHandlerRegistered({contextType:e,handlerId:t},n){const i={contextType:e,handlerId:t},r=this.getClientState(n);if(r?.contextHandlers.set(t,i),r&&r.contextGroupId){const{contextGroupId:i}=r,o=this.contextGroupsById.get(i);if(void 0===e)o.forEach(((e,i)=>{this.invokeContextHandler(n,t,e)}));else if(o.has(e)){const i=o.get(e);i&&this.invokeContextHandler(n,t,i)}}}async intentHandlerRegistered(e,t){const{handlerId:n}=e,i=this.intentClientMap.get(t.name),r=i?.get(n);if(i)if(r){const{pendingIntents:e}=r;r.clientIdentity=t,r.isReady=!0;try{if(e.length>0){const i=e[e.length-1];await this.invokeIntentHandler(t,n,i),r.pendingIntents=[]}}catch(e){console.error(`Error invoking intent handler: ${n} for client ${t.uuid}/${t.name}/${t.endpointId}`)}}else i.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t});else{this.intentClientMap.set(t.name,new Map);const e=this.intentClientMap.get(t.name);e&&e.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t})}}removeContextHandler({handlerId:e},t){const n=this.getClientState(t);n&&n.contextHandlers.delete(e)}handleJoinSessionContextGroup({sessionContextGroupId:e},t){try{if(!e)throw new Error(\"Failed to join session context group: must specify group id.\");const n=this.sessionContextGroupMap.get(e);if(n)n.registerNewClient(t);else{const n=new h.default(this.channel,e);n.registerNewClient(t),this.sessionContextGroupMap.set(e,n)}return{hasConflict:this.contextGroupsById.has(e)}}catch(e){throw new Error(e)}}getClientState(e){return this.interopClients.get(e.endpointId)}static toObject(e){const t=Object.fromEntries(e),n={};return Object.entries(t).forEach((([e,t])=>{const i=Object.fromEntries(t);n[e]=i})),n}static checkContextIntegrity(e){if(!e)return{isValid:!1,reason:\"No context supplied\"};if(\"object\"!=typeof e)return{isValid:!1,reason:\"Context must be an Object\"};if(!e.type)return{isValid:!1,reason:\"Context must have a type property\"};if(e.id&&\"object\"!=typeof e.id)return{isValid:!1,reason:\"Context id must be an Object populated with key-value identifiers (if set)\"};if(e.id){const{id:t}=e,n=Object.keys(t);let i=!1;if(!n.length)return{isValid:!1,reason:\"Context id must have at least one key-value identifier\"};if(n.forEach((e=>{\"string\"==typeof e&&\"string\"==typeof t[e]||(i=!0)})),i)return{isValid:!1,reason:\"Context id key-value identifiers must be of type string\"}}return e.name&&\"string\"!=typeof e.name?{isValid:!1,reason:\"Context name must be of string type (if set)\"}:{isValid:!0}}static hasEndpointId(e){return void 0!==e.endpointId}static isContextTypeCompatible(e,t){return void 0===t||e===t}setContextGroupMap(){for(const e of this.getContextGroups())this.contextGroupsById.set(e.id,new Map)}async setCurrentContextGroupInClientOptions(e,t){try{const n=await this.fin.System.getEntityInfo(e.uuid,e.name);let i;\"view\"===n.entityType?i=await this.fin.View.wrap(e):\"window\"===n.entityType&&(i=await this.fin.Window.wrap(e)),i&&await i.updateOptions({interop:{currentContextGroup:t}})}catch(e){}}async setupChannelProvider(){try{const e=await this.getProvider();this.channel=e,this.wireChannel(e)}catch(e){throw new Error(`Error setting up Interop Broker Channel Provider: ${e}`)}}wireChannel(e){e.onConnection((async(e,t)=>{if(!await this.isConnectionAuthorized(e,t))throw new Error(`Connection not authorized for ${e.uuid}, ${e.name}`);if(!e.endpointId)throw new Error(\"Version too old to be compatible with Interop. Please upgrade your runtime to a more recent version.\");const n={contextGroupId:void 0,contextHandlers:new Map,clientIdentity:e};t?.currentContextGroup&&this.contextGroupsById.has(t.currentContextGroup)&&(n.contextGroupId=t?.currentContextGroup),this.interopClients.set(e.endpointId,n)})),e.onDisconnection((e=>{this.interopClients.delete(e.endpointId);const t=this.intentClientMap.get(e.name);t&&e.uuid===this.fin.me.uuid&&t.forEach((e=>{e.isReady=!1})),this.sessionContextGroupMap.forEach((t=>{t.onDisconnection(e)})),this.clientDisconnected(e)})),e.beforeAction((async(e,t,n)=>{if(!await this.isActionAuthorized(e,t,n))throw new Error(`Action (${e}) not authorized for ${n.uuid}, ${n.name}`);this.logging?.beforeAction?.enabled&&console.log(e,t,n)})),e.afterAction(((e,t,n)=>{this.logging?.afterAction?.enabled&&console.log(e,t,n)})),e.register(\"setContext\",this.setContext.bind(this)),e.register(\"fireIntent\",this.handleFiredIntent.bind(this)),e.register(\"getCurrentContext\",this.getCurrentContext.bind(this)),e.register(\"getInfoForIntent\",this.handleInfoForIntent.bind(this)),e.register(\"getInfoForIntentsByContext\",this.handleInfoForIntentsByContext.bind(this)),e.register(\"fireIntentForContext\",this.handleFiredIntentForContext.bind(this)),e.register(\"getContextGroups\",this.getContextGroups.bind(this)),e.register(\"joinContextGroup\",this.joinContextGroup.bind(this)),e.register(\"removeFromContextGroup\",this.removeFromContextGroup.bind(this)),e.register(\"getAllClientsInContextGroup\",this.getAllClientsInContextGroup.bind(this)),e.register(\"getInfoForContextGroup\",this.getInfoForContextGroup.bind(this)),e.register(\"contextHandlerRegistered\",this.contextHandlerRegistered.bind(this)),e.register(\"intentHandlerRegistered\",this.intentHandlerRegistered.bind(this)),e.register(\"removeContextHandler\",this.removeContextHandler.bind(this)),e.register(\"sessionContextGroup:createIfNeeded\",this.handleJoinSessionContextGroup.bind(this)),e.register(\"fdc3Open\",this.fdc3HandleOpen.bind(this)),e.register(\"fdc3v2FindIntentsByContext\",this.handleInfoForIntentsByContext.bind(this)),e.register(\"fdc3FindInstances\",this.fdc3HandleFindInstances.bind(this)),e.register(\"fdc3GetAppMetadata\",this.fdc3HandleGetAppMetadata.bind(this)),e.register(\"fdc3v2GetInfo\",(async(e,t)=>this.fdc3HandleGetInfo.bind(this)(e,t))),e.register(\"createPrivateChannelProvider\",(async e=>{const{channelId:t}=e,n=await this.fin.InterApplicationBus.Channel.create(t);p.PrivateChannelProvider.init(n,t)}))}isConnectionAuthorized(e,t){return this.wire.sendAction(\"interop-broker-is-connection-authorized\").catch((e=>{})),Promise.resolve(!0)}isActionAuthorized(e,t,n){return this.wire.sendAction(\"interop-broker-is-action-authorized\").catch((e=>{})),Promise.resolve(!0)}};return Gi.InteropBroker=f,e=new WeakMap,t=new WeakMap,n=new WeakMap,Gi}var zi,Ki={},qi={},Ji=s&&s.__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},Yi=s&&s.__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)};Object.defineProperty(qi,\"__esModule\",{value:!0});const Zi=d,Qi=Hi;class Xi extends Zi.Base{constructor(e,t,n){super(e),zi.set(this,void 0),this.id=n,Ji(this,zi,t,\"f\")}async setContext(e){this.wire.sendAction(\"interop-session-context-group-set-context\").catch((e=>{}));return(await Yi(this,zi,\"f\")).dispatch(`sessionContextGroup:setContext-${this.id}`,{sessionContextGroupId:this.id,context:e})}async getCurrentContext(e){this.wire.sendAction(\"interop-session-context-group-get-context\").catch((e=>{}));return(await Yi(this,zi,\"f\")).dispatch(`sessionContextGroup:getContext-${this.id}`,{sessionContextGroupId:this.id,type:e})}async addContextHandler(e,t){if(this.wire.sendAction(\"interop-session-context-group-add-handler\").catch((e=>{})),\"function\"!=typeof e)throw new Error(\"Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.\");const n=await Yi(this,zi,\"f\");let i;return i=t?`sessionContextHandler:invoke-${this.id}-${t}-${(0,Qi.generateId)()}`:`sessionContextHandler:invoke-${this.id}`,n.register(i,(0,Qi.wrapContextHandler)(e,i)),await n.dispatch(`sessionContextGroup:handlerAdded-${this.id}`,{handlerId:i,contextType:t}),{unsubscribe:await this.createUnsubscribeCb(i)}}async createUnsubscribeCb(e){const t=await Yi(this,zi,\"f\");return async()=>{t.remove(e),await t.dispatch(`sessionContextGroup:handlerRemoved-${this.id}`,{handlerId:e})}}getUserInstance(){return{id:this.id,setContext:(0,Qi.wrapInTryCatch)(this.setContext.bind(this),\"Failed to set context: \"),getCurrentContext:(0,Qi.wrapInTryCatch)(this.getCurrentContext.bind(this),\"Failed to get context: \"),addContextHandler:(0,Qi.wrapInTryCatch)(this.addContextHandler.bind(this),\"Failed to add context handler: \")}}}qi.default=Xi,zi=new WeakMap;var er={},tr={},nr={},ir={},rr=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),or=s&&s.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,\"default\",{enumerable:!0,value:t})}:function(e,t){e.default=t}),sr=s&&s.__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)&&rr(t,e,n);return or(t,e),t};Object.defineProperty(ir,\"__esModule\",{value:!0}),ir.PrivateChannelClient=void 0;const ar=sr(Hi);var cr,dr;function hr(){if(cr)return tr;cr=1;var e,t=s&&s.__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)},n=s&&s.__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},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(tr,\"__esModule\",{value:!0}),tr.FDC3ModuleBase=void 0;const o=nr,a=Hi,c=wr(),d=r(i);return tr.FDC3ModuleBase=class{get client(){return t(this,e,\"f\").call(this)}get fin(){return this.wire.getFin()}constructor(t,i){this.wire=i,e.set(this,void 0),n(this,e,t,\"f\")}async broadcast(e){return this.wire.sendAction(\"fdc3-broadcast\").catch((e=>{})),this.client.setContext(e)}async _open(e,t){this.wire.sendAction(\"fdc3-open\").catch((e=>{}));try{return await c.InteropClient.ferryFdc3Call(this.client,\"fdc3Open\",{app:e,context:t})}catch(e){const t=e.message===a.BROKER_ERRORS.fdc3Open?\"ResolverUnavailable\":e.message;throw new Error(t)}}async _getChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:\"system\",...(0,o.getUnsupportedChannelApis)()})))}async getOrCreateChannel(e){this.wire.sendAction(\"fdc3-get-or-create-channel\").catch((e=>{}));const t=(await this._getChannels()).find((t=>t.id===e));if(t)return{...t,type:\"system\",...(0,o.getUnsupportedChannelApis)()};try{const t=await this.client.joinSessionContextGroup(e);return(0,o.buildAppChannelObject)(t)}catch(e){throw console.error(e.message),new Error(o.ChannelError.CreationFailed)}}async getSystemChannels(){return this.wire.sendAction(\"fdc3-get-system-channels\").catch((e=>{})),this._getChannels()}async joinChannel(e){this.wire.sendAction(\"fdc3-join-channel\").catch((e=>{}));try{return await this.client.joinContextGroup(e)}catch(e){if(e.message===a.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup?console.error(\"The Channel you have tried to join is an App Channel. Custom Channels can only be defined by the Interop Broker through code or manifest configuration. Please use getOrCreateChannel.\"):console.error(e.message),e.message.startsWith(\"Attempting to join a context group that does not exist\"))throw new Error(o.ChannelError.NoChannelFound);throw new Error(o.ChannelError.AccessDenied)}}async getCurrentChannel(){this.wire.sendAction(\"fdc3-get-current-channel\").catch((e=>{}));const e=await this.getCurrentContextGroupInfo();return e?this.buildChannelObject(e):null}async leaveCurrentChannel(){return this.wire.sendAction(\"fdc3-leave-current-channel\").catch((e=>{})),this.client.removeFromContextGroup()}async getCurrentContextGroupInfo(){const e=await this.client.getContextGroups(),t=e.map((async e=>this.client.getAllClientsInContextGroup(e.id))),n=(await Promise.all(t)).findIndex((e=>e.some((e=>{const{uuid:t,name:n}=e;return this.wire.me.uuid===t&&this.wire.me.name===n}))));return e[n]}async buildChannelObject(e){return{...e,type:\"system\",addContextListener:(...[e,t])=>{let n,i;\"function\"==typeof e?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),n=e):(n=t,\"string\"==typeof e&&(i=e));const r=(async()=>{let e=!0;const t=await this.client.getCurrentContext(i);return this.client.addContextHandler(((i,r)=>{if(!e||(e=!1,!(0,d.default)(t,i)))return n(i,r)}),i)})();return{...r,unsubscribe:()=>r.then((e=>e.unsubscribe()))}},broadcast:this.broadcast.bind(this),getCurrentContext:async e=>{const t=await this.client.getCurrentContext(e);return void 0===t?null:t}}}},e=new WeakMap,tr}ir.PrivateChannelClient=class{constructor(e,t){this.id=t,this.client=e,this.listeners=new Map}async broadcast(e){return this.client.dispatch(\"broadcast\",{context:e})}async getCurrentContext(e){return this.client.dispatch(\"getCurrentContext\",{contextType:e})}async addContextListener(e,t){if(\"function\"!=typeof t)throw new Error(\"Non-function argument passed to the second parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.\");let n;n=e?`contextHandler:invoke-${this.id}-${e}-${ar.generateId()}`:`contextHandler:invoke-${this.id}-${ar.generateId()}`,this.client.register(n,ar.wrapContextHandler(t,n));const i={unsubscribe:await this.createContextUnsubscribeCb(n)};return this.listeners.set(n,i),await this.client.dispatch(\"contextHandlerAdded\",{handlerId:n,contextType:e}),i}createNonStandardUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch(\"nonStandardHandlerRemoved\",{handlerId:e})}}createContextUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch(\"contextHandlerRemoved\",{handlerId:e})}}onAddContextListener(e){const t=`onContextHandlerAdded:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch(\"onAddContextHandlerAdded\",{handlerId:t}),n}onDisconnect(e){const t=`onDisconnect:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch(\"onDisconnectHandlerAdded\",{handlerId:t}),n}onUnsubscribe(e){const t=`onUnsubscribe:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch(\"onUnsubscribeHandlerAdded\",{handlerId:t}),n}async cleanUpAllSubs(){Array.from(this.listeners.keys()).forEach((e=>{this.client.remove(e),this.listeners.delete(e)}))}async disconnect(){try{await this.client.dispatch(\"clientDisconnecting\"),await this.cleanUpAllSubs(),await this.client.disconnect()}catch(e){throw new Error(e.message)}}},function(e){var t=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,\"__esModule\",{value:!0}),e.getIntentResolution=e.isChannel=e.isContext=e.connectPrivateChannel=e.buildAppChannelObject=e.buildPrivateChannelObject=e.ChannelError=e.ResultError=e.UnsupportedChannelApiError=e.getUnsupportedChannelApis=void 0;const n=Hi,r=ir,o=t(i);e.getUnsupportedChannelApis=e=>({addContextListener:()=>{throw new a(\"Channel.addContextListener\",e)},broadcast:()=>{throw new a(\"Channel.broadcast\",e)},getCurrentContext:()=>{throw new a(\"Channel.getCurrentContext\",e)}});class a extends Error{constructor(e,t=\"System\"){super(e),this.message=`Calling ${e} on an instance of a ${t} Channel returned by fdc3.get${t}Channels is not supported. If you would like to use a ${t} Channel, please use fdc3.joinChannel, fdc3.addContextListener, and fdc3.broadcast instead.`}}var c,d;e.UnsupportedChannelApiError=a,function(e){e.NoResultReturned=\"NoResultReturned\",e.IntentHandlerRejected=\"IntentHandlerRejected\"}(c=e.ResultError||(e.ResultError={})),(d=e.ChannelError||(e.ChannelError={})).NoChannelFound=\"NoChannelFound\",d.AccessDenied=\"AccessDenied\",d.CreationFailed=\"CreationFailed\";e.buildPrivateChannelObject=e=>{let t=!1;const n=()=>{if(t)throw new Error(\"Private Channel Client has been disconnected from the Private Channel\")};return{id:e.id,type:\"private\",broadcast:async t=>(n(),e.broadcast(t)),getCurrentContext:async t=>(n(),e.getCurrentContext(t)),addContextListener:async(t,i)=>{n();let r=i,o=t;\"function\"==typeof t&&(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),r=t,o=null);return e.addContextListener(o,r)},onAddContextListener:t=>(n(),e.onAddContextListener(t)),disconnect:async()=>(n(),t=!0,e.disconnect()),onDisconnect:t=>(n(),e.onDisconnect(t)),onUnsubscribe:t=>(n(),e.onUnsubscribe(t))}};e.buildAppChannelObject=e=>({id:e.id,type:\"app\",broadcast:e.setContext,getCurrentContext:async t=>{const n=await e.getCurrentContext(t);return void 0===n?null:n},addContextListener:(t,n)=>{let i,r;\"function\"==typeof t?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),i=t):(i=n,\"string\"==typeof t&&(r=t));const s=(async()=>{let t=!0;const n=await e.getCurrentContext(r);return e.addContextHandler(((e,r)=>{if(!t||(t=!1,!(0,o.default)(n,e)))return i(e,r)}),r)})();return{...s,unsubscribe:()=>s.then((e=>e.unsubscribe()))}}});e.connectPrivateChannel=async t=>{try{const n=await fin.InterApplicationBus.Channel.connect(t),i=new r.PrivateChannelClient(n,t);return(0,e.buildPrivateChannelObject)(i)}catch(e){throw new Error(`Private Channel with id: ${t} doesn't exist`)}};e.isContext=e=>{if(e&&\"object\"==typeof e&&\"type\"in e){const{type:t}=e;return\"string\"==typeof t}return!1};e.isChannel=e=>{if(e&&\"object\"==typeof e&&\"type\"in e&&\"id\"in e){const{type:t,id:n}=e;return\"string\"==typeof t&&\"string\"==typeof n&&(\"app\"===t||\"private\"===t)}return!1};e.getIntentResolution=async(t,i,r,o)=>{const s=(0,n.generateId)(),a=new Promise(((e,t)=>{fin.InterApplicationBus.subscribe({uuid:\"*\"},s,(t=>{e(t)})).catch((()=>t(new Error(\"getResult is not supported in this environment\"))))})),d=r?{target:r,intentResolutionResultId:s}:{intentResolutionResultId:s},h=o?{name:o,context:i,metadata:d}:{...i,metadata:d},l=async()=>{let n=await a;if(!n||\"object\"!=typeof n)throw new Error(c.NoResultReturned);const{error:i}=n;if(i)throw new Error(c.IntentHandlerRejected);if((0,e.isChannel)(n)){const{id:i,type:r}=n;switch(r){case\"private\":n=await(0,e.connectPrivateChannel)(i);break;case\"app\":{const r=await t.joinSessionContextGroup(i);n=(0,e.buildAppChannelObject)(r);break}}}else if(!(0,e.isContext)(n))throw new Error(c.NoResultReturned);return n},u=o?await t.fireIntent(h):await t.fireIntentForContext(h);return\"object\"!=typeof u?{source:{appId:\"\",instanceId:\"\"},intent:\"\",version:\"2.0\",getResult:l}:{...u,getResult:l}}}(nr);var lr,ur,pr={};function wr(){if(ur)return Ki;ur=1;var e,t,n=s&&s.__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},i=s&&s.__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)},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ki,\"__esModule\",{value:!0}),Ki.InteropClient=void 0;const o=d,a=r(qi),c=function(){if(dr)return er;dr=1,Object.defineProperty(er,\"__esModule\",{value:!0}),er.Fdc3Module=void 0;const e=Hi,t=hr();class n extends t.FDC3ModuleBase{async open(e,t){await super._open(e,t)}addContextListener(e,t){let n;return this.wire.sendAction(\"fdc3-add-context-listener\").catch((e=>{})),\"function\"==typeof e?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),n=this.client.addContextHandler(e)):n=this.client.addContextHandler(t,null===e?void 0:e),{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}addIntentListener(e,t){this.wire.sendAction(\"fdc3-add-intent-listener\").catch((e=>{}));const n=this.client.registerIntentHandler((e=>{const{context:n,metadata:i}=e,{metadata:r}=n,o=i?.intentResolutionResultId||r?.intentResolutionResultId;o&&this.fin.InterApplicationBus.publish(o,null).catch((()=>null)),t(e.context)}),e,{fdc3Version:\"1.2\"});return{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}async raiseIntent(t,n,i){this.wire.sendAction(\"fdc3-raise-intent\").catch((e=>{}));const r=i?{name:t,context:n,metadata:{target:i}}:{name:t,context:n};try{return await this.client.fireIntent(r)}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntent?\"ResolverUnavailable\":t.message;throw new Error(n)}}async findIntent(t,n){this.wire.sendAction(\"fdc3-find-intent\").catch((e=>{}));try{return await this.client.getInfoForIntent({name:t,context:n})}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntent?\"ResolverUnavailable\":t.message;throw new Error(n)}}async findIntentsByContext(t){this.wire.sendAction(\"fdc3-find-intents-by-context\").catch((e=>{}));try{return await this.client.getInfoForIntentsByContext(t)}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntentsByContext?\"ResolverUnavailable\":t.message;throw new Error(n)}}async raiseIntentForContext(t,n){this.wire.sendAction(\"fdc3-raise-intent-for-context\").catch((e=>{}));try{return await this.client.fireIntentForContext({...t,metadata:{target:n}})}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntentForContext?\"ResolverUnavailable\":t.message;throw new Error(n)}}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}getInfo(){return this.wire.sendAction(\"fdc3-get-info\").catch((e=>{})),{providerVersion:this.wire.environment.getAdapterVersionSync(),provider:`openfin-${this.wire.me.uuid}`,fdc3Version:\"1.2\"}}}return er.Fdc3Module=n,er}(),h=function(){if(lr)return pr;lr=1,Object.defineProperty(pr,\"__esModule\",{value:!0}),pr.Fdc3Module2=void 0;const e=hr(),t=Hi,n=wr(),i=nr,r=ir;class o extends e.FDC3ModuleBase{async open(e,t){return\"string\"==typeof e&&console.warn(\"Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).\"),super._open(e,t)}async findInstances(e){this.wire.sendAction(\"fdc3-find-instances\").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,\"fdc3FindInstances\",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3FindInstances?\"ResolverUnavailable\":e.message;throw new Error(n)}}async getAppMetadata(e){this.wire.sendAction(\"fdc3-get-app-metadata\").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,\"fdc3GetAppMetadata\",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3GetAppMetadata?\"ResolverUnavailable\":e.message;throw new Error(n)}}async addContextListener(e,t){this.wire.sendAction(\"fdc3-add-context-listener\").catch((e=>{}));const n=e=>t=>{const{contextMetadata:n,...i}=t,r=n?[{...i},n]:[t,null];e(...r)};let i=t,r=n(i);return\"function\"==typeof e?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),i=e,r=n(i),this.client.addContextHandler(r)):this.client.addContextHandler(r,null===e?void 0:e)}async findIntent(e,n,i){this.wire.sendAction(\"fdc3-find-intent\").catch((e=>{}));try{return await this.client.getInfoForIntent({name:e,context:n,metadata:{resultType:i}})}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntent?\"ResolverUnavailable\":e.message;throw new Error(n)}}async findIntentsByContext(e,i){this.wire.sendAction(\"fdc3-find-intents-by-context\").catch((e=>{}));const r=i?{context:e,metadata:{resultType:i}}:e;try{return await n.InteropClient.ferryFdc3Call(this.client,\"fdc3v2FindIntentsByContext\",r)}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntentsByContext?\"ResolverUnavailable\":e.message;throw new Error(n)}}async raiseIntent(e,n,r){this.wire.sendAction(\"fdc3-raise-intent\").catch((e=>{}));try{return\"string\"==typeof r&&console.warn(\"Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).\"),(0,i.getIntentResolution)(this.client,n,r,e)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?\"ResolverUnavailable\":e.message;throw new Error(n)}}async raiseIntentForContext(e,n){this.wire.sendAction(\"fdc3-raise-intent-for-context\").catch((e=>{}));try{return\"string\"==typeof n&&console.warn(\"Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).\"),(0,i.getIntentResolution)(this.client,e,n)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?\"ResolverUnavailable\":e.message;throw new Error(n)}}async addIntentListener(e,t){if(this.wire.sendAction(\"fdc3-add-intent-listener\").catch((e=>{})),\"string\"!=typeof e)throw new Error(\"First argument must be an Intent name\");return this.client.registerIntentHandler((async e=>{let n,i;const{context:r,metadata:o}=e,{contextMetadata:s,metadata:a,...c}=r,d=o?.intentResolutionResultId||a?.intentResolutionResultId;try{const e=a?{metadata:a,...c}:{...c};n=await t(e,s),i=n}catch(e){n=e,i={error:!0}}if(d&&this.fin.InterApplicationBus.publish(d,i).catch((()=>null)),n instanceof Error)throw new Error(n.message);return n}),e,{fdc3Version:\"2.0\"})}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}async createPrivateChannel(){const e=(0,t.generateId)();await n.InteropClient.ferryFdc3Call(this.client,\"createPrivateChannelProvider\",{channelId:e});const o=await this.fin.InterApplicationBus.Channel.connect(e),s=new r.PrivateChannelClient(o,e);return(0,i.buildPrivateChannelObject)(s)}async getUserChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:\"user\",...(0,i.getUnsupportedChannelApis)(\"User\")})))}async getSystemChannels(){return console.warn(\"This API has been deprecated. Please use fdc3.getUserChannels instead.\"),super.getSystemChannels()}async joinUserChannel(e){return super.joinChannel(e)}async joinChannel(e){return console.warn(\"This API has been deprecated. Please use fdc3.joinUserChannel instead.\"),super.joinChannel(e)}async getCurrentChannel(){const e=await super.getCurrentChannel();return e?{...e,type:\"user\",broadcast:this.broadcast.bind(this)}:null}async getInfo(){return n.InteropClient.ferryFdc3Call(this.client,\"fdc3v2GetInfo\",{fdc3Version:\"2.0\"})}}return pr.Fdc3Module2=o,pr}(),l=Hi;let u=class extends o.Base{constructor(i,r){super(i),e.set(this,void 0),t.set(this,void 0),n(this,t,new Map,\"f\"),n(this,e,r,\"f\")}async setContext(t){this.wire.sendAction(\"interop-client-set-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"setContext\",{context:t})}async addContextHandler(t,n){if(this.wire.sendAction(\"interop-client-add-context-handler\").catch((e=>{})),\"function\"!=typeof t)throw new Error(\"Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.\");const r=await i(this,e,\"f\");let o;o=n?`invokeContextHandler-${n}-${(0,l.generateId)()}`:\"invokeContextHandler\";const s=(0,l.wrapContextHandler)(t,o);return r.register(o,s),await r.dispatch(\"contextHandlerRegistered\",{handlerId:o,contextType:n}),{unsubscribe:async()=>{r.remove(o),await r.dispatch(\"removeContextHandler\",{handlerId:o})}}}async getContextGroups(){this.wire.sendAction(\"interop-client-get-context-groups\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getContextGroups\")}async joinContextGroup(t,n){this.wire.sendAction(\"interop-client-join-context-group\").catch((e=>{}));const r=await i(this,e,\"f\");if(!t)throw new Error(\"No contextGroupId specified for joinContextGroup.\");return r.dispatch(\"joinContextGroup\",{contextGroupId:t,target:n})}async removeFromContextGroup(t){this.wire.sendAction(\"interop-client-remove-from-context-group\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"removeFromContextGroup\",{target:t})}async getAllClientsInContextGroup(t){this.wire.sendAction(\"interop-client-get-all-clients-in-context-group\").catch((e=>{}));const n=await i(this,e,\"f\");if(!t)throw new Error(\"No contextGroupId specified for getAllClientsInContextGroup.\");return n.dispatch(\"getAllClientsInContextGroup\",{contextGroupId:t})}async getInfoForContextGroup(t){this.wire.sendAction(\"interop-client-get-info-for-context-group\").catch((e=>{}));const n=await i(this,e,\"f\");if(!t)throw new Error(\"No contextGroupId specified for getInfoForContextGroup.\");return n.dispatch(\"getInfoForContextGroup\",{contextGroupId:t})}async fireIntent(t){this.wire.sendAction(\"interop-client-fire-intent\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"fireIntent\",t)}async registerIntentHandler(t,n,r){this.wire.sendAction(\"interop-client-register-intent-handler\").catch((e=>{}));const o=await i(this,e,\"f\"),s=`intent-handler-${n}`,a=(0,l.wrapIntentHandler)(t,s);try{await o.register(s,a),await o.dispatch(\"intentHandlerRegistered\",{handlerId:s,...r})}catch(e){throw new Error(\"Unable to register intent handler\")}return{unsubscribe:async()=>{o.remove(s)}}}async getCurrentContext(t){this.wire.sendAction(\"interop-client-get-current-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getCurrentContext\",{contextType:t})}async getInfoForIntent(t){this.wire.sendAction(\"interop-client-get-info-for-intent\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getInfoForIntent\",t)}async getInfoForIntentsByContext(t){this.wire.sendAction(\"interop-client-get-info-for-intents-by-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getInfoForIntentsByContext\",t)}async fireIntentForContext(t){this.wire.sendAction(\"interop-client-fire-intent-for-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"fireIntentForContext\",t)}async joinSessionContextGroup(n){try{const r=i(this,t,\"f\").get(n);if(r)return r.getUserInstance();const o=await i(this,e,\"f\"),{hasConflict:s}=await o.dispatch(\"sessionContextGroup:createIfNeeded\",{sessionContextGroupId:n});s&&console.warn(`A (non-session) context group with the name \"${n}\" already exists. If you are trying to join a Context Group, call joinContextGroup instead.`);const c=new a.default(this.wire,i(this,e,\"f\"),n);return i(this,t,\"f\").set(n,c),c.getUserInstance()}catch(e){throw console.error(`Error thrown trying to create Session Context Group with id \"${n}\": ${e}`),e}}async onDisconnection(t){this.wire.sendAction(\"interop-client-add-ondisconnection-listener\").catch((e=>{}));return(await i(this,e,\"f\")).onDisconnection((e=>{const{uuid:n}=e;t({type:\"interop-broker\",topic:\"disconnected\",brokerName:n})}))}getFDC3Sync(e){switch(e){case\"1.2\":return new c.Fdc3Module((()=>this),this.wire);case\"2.0\":return new h.Fdc3Module2((()=>this),this.wire);default:throw new Error(`Invalid FDC3 version provided: ${e}. Must be '1.2' or '2.0'`)}}async getFDC3(e){return this.getFDC3Sync(e)}static async ferryFdc3Call(t,n,r){return(await i(t,e,\"f\")).dispatch(n,r||null)}};return Ki.InteropClient=u,e=new WeakMap,t=new WeakMap,Ki}var yr,fr,gr,mr={};function vr(){if(yr)return mr;yr=1,Object.defineProperty(mr,\"__esModule\",{value:!0}),mr.overrideCheck=mr.checkFDC32Overrides=mr.getDefaultViewFdc3VersionFromAppInfo=void 0;const e=Vi();function t(t){return[\"fdc3HandleFindInstances\",\"handleInfoForIntent\",\"handleInfoForIntentsByContext\",\"fdc3HandleGetAppMetadata\",\"fdc3HandleGetInfo\",\"fdc3HandleOpen\",\"handleFiredIntent\",\"handleFiredIntentForContext\"].filter((n=>t[n]===e.InteropBroker.prototype[n]))}return mr.getDefaultViewFdc3VersionFromAppInfo=function({manifest:e,initialOptions:t}){const n=e?.platform?.defaultViewOptions?.fdc3InteropApi??t.defaultViewOptions?.fdc3InteropApi;return[\"1.2\",\"2.0\"].includes(n??\"\")?n:void 0},mr.checkFDC32Overrides=t,mr.overrideCheck=function(e,n){if(n&&\"2.0\"===n){const n=t(e);n.length>0&&console.warn(`WARNING: FDC3 2.0 has been set as a default option for Views in this Platform, but the required InteropBroker APIs for FDC3 2.0 compliance have not all been overridden.\\nThe following APIs need to be overridden:\\n${n.join(\"\\n\")}`)}},mr}function Cr(){return gr||(gr=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),i=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),i(function(){if(fr)return Ti;fr=1;var e=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ti,\"__esModule\",{value:!0}),Ti.InteropModule=void 0;const t=e(n),i=$i,r=d,o=Vi(),a=wr(),c=vr(),h=Tn,l=e=>new e,u=\"You have attempted to use or modify InteropBroker parameters, which is not allowed. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.\";class p extends r.Base{async init(e,n=l){this.wire.sendAction(\"interop-init\").catch((()=>{}));const r=await this.wire.environment.getInteropInfo(this.wire.getFin()),s=(0,i.createUnusableObject)(u),a=(0,i.createWarningObject)(u,(0,t.default)(r)),d=async()=>{throw new Error(u)},p=o.InteropBroker.createClosedConstructor(this.wire,(()=>this.fin.InterApplicationBus.Channel.create(`interop-broker-${e}`)),r);let w;return w=Array.isArray(n)?new((0,h.overrideFromComposables)(...n)(p))(s,d,a):await n(p,s,d,a),(0,c.overrideCheck)(w,r.fdc3Version),w}connectSync(e,t){return this.wire.sendAction(\"interop-connect-sync\").catch((()=>{})),new a.InteropClient(this.wire,this.wire.environment.whenReady().then((()=>this.fin.InterApplicationBus.Channel.connect(`interop-broker-${e}`,{payload:t}))))}}return Ti.InteropModule=p,Ti}(),e),i(wr(),e),i(Vi(),e)}(Li)),Li}var br={},Ir={},Er={},xr={};Object.defineProperty(xr,\"__esModule\",{value:!0}),xr.getSnapshotSourceChannelName=void 0;xr.getSnapshotSourceChannelName=e=>`snapshot-source-provider-${e.uuid}`;var Ar,Pr,Mr,_r,Or,Sr=s&&s.__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},Rr=s&&s.__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)};Object.defineProperty(Er,\"__esModule\",{value:!0}),Er.SnapshotSource=void 0;const Fr=d,jr=xr,kr=new Map;class Lr extends Fr.Base{constructor(e,t){super(e),Ar.set(this,void 0),Pr.set(this,(()=>(kr.has(this.identity.uuid)||kr.set(this.identity.uuid,{eventFired:null,clientPromise:null}),kr.get(this.identity.uuid)))),Mr.set(this,(()=>(Rr(this,Pr,\"f\").call(this).clientPromise||(Rr(this,Pr,\"f\").call(this).clientPromise=Rr(this,_r,\"f\").call(this)),Rr(this,Pr,\"f\").call(this).clientPromise))),_r.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);try{Rr(this,Pr,\"f\").call(this).eventFired||await Rr(this,Or,\"f\").call(this);const t=await this.fin.InterApplicationBus.Channel.connect(e,{wait:!1});return t.onDisconnection((()=>{Rr(this,Pr,\"f\").call(this).clientPromise=null,Rr(this,Pr,\"f\").call(this).eventFired=null})),t}catch(e){throw Rr(this,Pr,\"f\").call(this).clientPromise=null,new Error(\"The targeted SnapshotSource is not currently initialized. Await this object's ready() method.\")}})),Or.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);let t,n;const i=new Promise(((e,i)=>{t=e,n=i}));Rr(this,Pr,\"f\").call(this).eventFired=i;const r=async i=>{try{i.channelName===e&&(t(),await this.fin.InterApplicationBus.Channel.removeListener(\"connected\",r))}catch(e){n(e)}};await this.fin.InterApplicationBus.Channel.on(\"connected\",r)})),Sr(this,Ar,t,\"f\")}get identity(){return Rr(this,Ar,\"f\")}async ready(){this.wire.sendAction(\"snapshot-source-ready\").catch((e=>{}));try{await Rr(this,Mr,\"f\").call(this)}catch(e){await Rr(this,Pr,\"f\").call(this).eventFired}}async getSnapshot(){this.wire.sendAction(\"snapshot-source-get-snapshot\").catch((e=>{}));const e=await Rr(this,Mr,\"f\").call(this),t=await e.dispatch(\"get-snapshot\");return(await t).snapshot}async applySnapshot(e){this.wire.sendAction(\"snapshot-source-apply-snapshot\").catch((e=>{}));return(await Rr(this,Mr,\"f\").call(this)).dispatch(\"apply-snapshot\",{snapshot:e})}}Er.SnapshotSource=Lr,Ar=new WeakMap,Pr=new WeakMap,Mr=new WeakMap,_r=new WeakMap,Or=new WeakMap,Object.defineProperty(Ir,\"__esModule\",{value:!0}),Ir.SnapshotSourceModule=void 0;const Tr=d,$r=Er,Br=xr;class Gr extends Tr.Base{async init(e){if(this.wire.sendAction(\"snapshot-source-init\").catch((e=>{})),\"object\"!=typeof e||\"function\"!=typeof e.getSnapshot||\"function\"!=typeof e.applySnapshot)throw new Error(\"you must pass in a valid SnapshotProvider\");const t=await this.fin.InterApplicationBus.Channel.create((0,Br.getSnapshotSourceChannelName)(this.fin.me));t.register(\"get-snapshot\",(async()=>({snapshot:await e.getSnapshot()}))),t.register(\"apply-snapshot\",(({snapshot:t})=>e.applySnapshot(t)))}wrapSync(e){return this.wire.sendAction(\"snapshot-source-wrap-sync\").catch((e=>{})),new $r.SnapshotSource(this.wire,e)}async wrap(e){return this.wire.sendAction(\"snapshot-source-wrap\").catch((e=>{})),this.wrapSync(e)}}Ir.SnapshotSourceModule=Gr,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Ir,e),n(Er,e)}(br),Object.defineProperty(a,\"__esModule\",{value:!0});var Wr=a.Fin=void 0;const Hr=t,Nr=c,Dr=ie(),Ur=Z(),Vr=de,zr=en,Kr=rn,qr=un,Jr=bn,Yr=J(),Zr=An,Qr=ki,Xr=Cr(),eo=br;class to extends Hr.EventEmitter{constructor(e){super(),this.wire=e,this.System=new Nr.System(e),this.Window=new Dr._WindowModule(e),this.Application=new Ur.ApplicationModule(e),this.InterApplicationBus=new Vr.InterApplicationBus(e),this.Clipboard=new zr.Clipboard(e),this.ExternalApplication=new Kr.ExternalApplicationModule(e),this.Frame=new qr._FrameModule(e),this.GlobalHotkey=new Jr.GlobalHotkey(e),this.Platform=new Zr.PlatformModule(e,this.InterApplicationBus.Channel),this.View=new Yr.ViewModule(e),this.Interop=new Xr.InteropModule(e),this.SnapshotSource=new eo.SnapshotSourceModule(e),e.registerFin(this),this.me=(0,Qr.getMe)(e),e.on(\"disconnected\",(()=>{this.emit(\"disconnected\")}))}}Wr=a.Fin=to;var no={},io={};function ro(e){return\"string\"==typeof e.manifestUrl}function oo(e){return ao(e)&&\"string\"==typeof e.address}function so(e){return oo(e)&&\"string\"==typeof e.token}function ao(e){return\"string\"==typeof e.uuid}function co(e){return e.runtime&&\"string\"==typeof e.runtime.version}function ho(e){return ao(e)&&co(e)}Object.defineProperty(io,\"__esModule\",{value:!0}),io.isInternalConnectConfig=io.isPortDiscoveryConfig=io.isNewConnectConfig=io.isConfigWithReceiver=io.isRemoteConfig=io.isExistingConnectConfig=io.isExternalConfig=void 0,io.isExternalConfig=ro,io.isExistingConnectConfig=oo,io.isRemoteConfig=so,io.isConfigWithReceiver=function(e){return\"object\"==typeof e.receiver&&so({...e,address:\"\"})},io.isNewConnectConfig=ho,io.isPortDiscoveryConfig=function(e){return ro(e)&&co(e)||ho(e)},io.isInternalConnectConfig=function(e){return oo(e)||ho(e)};var lo={},uo={};Object.defineProperty(uo,\"__esModule\",{value:!0}),uo.EmitterMap=void 0;const po=t;function wo(e){return Buffer.from(e).toString(\"base64\")}uo.EmitterMap=class{constructor(){this.storage=new Map}hashKeys(e){return e.map(wo).join(\"/\")}getOrCreate(e){const t=this.hashKeys(e);return this.storage.has(t)||this.storage.set(t,new po.EventEmitter),this.storage.get(t)}has(e){return this.storage.has(this.hashKeys(e))}delete(e){const t=this.hashKeys(e);return this.storage.delete(t)}},Object.defineProperty(lo,\"__esModule\",{value:!0});const yo=uo;class fo extends yo.EmitterMap{constructor(){super(...arguments),this.dispatchEvent=e=>{if(function(e){return\"process-desktop-event\"===e.action}(e)){const{payload:t}=e,n=function(e){const{topic:t}=e;if(\"frame\"===t||\"window\"===t||\"view\"===t){const{uuid:n,name:i}=e;return[t,n,i]}if(\"application\"===t){const{uuid:n}=e;return[t,n]}return[t]}(t);if(this.has(n))return this.getOrCreate(n).emit(t.type,t),!0}return!1}}}lo.default=fo;var go,mo,vo=s&&s.__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},Co=s&&s.__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)},bo=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(no,\"__esModule\",{value:!0});var Io=no.Transport=void 0;const Eo=t,xo=io,Ao=g,Po=bo(lo),Mo=ki,_o=ke;class Oo extends Eo.EventEmitter{constructor(e,t,n){super(),this.wireListeners=new Map,this.topicRefMap=new Map,this.eventAggregator=new Po.default,this.messageHandlers=[this.eventAggregator.dispatchEvent],go.set(this,void 0),mo.set(this,void 0),this.connectSync=()=>{Co(this,go,\"f\").connectSync()},this.getPort=()=>Co(this,go,\"f\").getPort(),vo(this,go,new e(this.onmessage.bind(this)),\"f\"),this.environment=t,this.sendRaw=Co(this,go,\"f\").send.bind(Co(this,go,\"f\")),this.registerMessageHandler(this.handleMessage.bind(this)),Co(this,go,\"f\").on(\"disconnected\",(()=>{for(const[,{handleNack:e}]of this.wireListeners)e({reason:\"Remote connection has closed\"});this.wireListeners.clear(),this.emit(\"disconnected\")}));const{uuid:i,name:r}=n,o=this.environment.getCurrentEntityType();this.me=(0,Mo.getBaseMe)(o,i,r)}getFin(){if(!Co(this,mo,\"f\"))throw new Error(\"No Fin object registered for this transport\");return Co(this,mo,\"f\")}registerFin(e){if(Co(this,mo,\"f\"))throw new Error(\"Fin object has already been registered for this transport\");vo(this,mo,e,\"f\")}shutdown(){return Co(this,go,\"f\").shutdown()}async connect(e){if((0,xo.isConfigWithReceiver)(e))return await Co(this,go,\"f\").connect(e.receiver),this.authorize(e);if((0,xo.isRemoteConfig)(e))return this.connectRemote(e);if((0,xo.isExistingConnectConfig)(e))return this.connectByPort(e);if((0,xo.isNewConnectConfig)(e)){const t=await this.environment.retrievePort(e);return this.connectByPort({...e,address:`ws://localhost:${t}`})}}async connectRemote(e){return await Co(this,go,\"f\").connect(new(this.environment.getWsConstructor())(e.address)),this.authorize(e)}async connectByPort(e){const{address:t,uuid:n}=e,i={...e,type:\"file-token\"},r=Co(this,go,\"f\");await r.connect(new(this.environment.getWsConstructor())(e.address));const o=await this.sendAction(\"request-external-authorization\",{uuid:n,type:\"file-token\"},!0);if(\"external-authorization-response\"!==o.action)throw new Ao.UnexpectedActionError(o.action);return await this.environment.writeToken(o.payload.file,o.payload.token),this.authorize(i)}async authorize(e){const t=await this.sendAction(\"request-authorization\",e,!0);if(\"authorization-response\"!==t.action)throw new Ao.UnexpectedActionError(t.action);if(!0!==t.payload.success)throw new Ao.RuntimeError(t.payload)}sendAction(e,t={},n=!1){let i=()=>{};const r=Ao.RuntimeError.getCallSite(1),o=this.environment.getNextMessageId(),s=new Promise(((s,a)=>{i=a;const c={action:e,payload:t,messageId:o},d=Co(this,go,\"f\");return this.addWireListener(o,s,(e=>this.nackHandler(e,a,r)),n),d.send(c).catch(a)}));return Object.assign(s,{cancel:i,messageId:o})}nackHandler(e,t,n){t(\"string\"==typeof e?e:new Ao.RuntimeError(e,n))}ferryAction(e){return new Promise(((t,n)=>{const i=this.environment.getNextMessageId();e.messageId=i;const r=e=>{t(e.payload)};return Co(this,go,\"f\").send(e).then((()=>this.addWireListener(i,r,(e=>this.nackHandler(e,n)),!1))).catch(n)}))}registerMessageHandler(e){this.messageHandlers.push(e)}addWireListener(e,t,n,i){i?this.uncorrelatedListener=t:this.wireListeners.has(e)?n({reason:\"Duplicate handler id\",error:(0,_o.errorToPOJO)(new Ao.DuplicateCorrelationError(String(e)))}):this.wireListeners.set(e,{resolve:t,handleNack:n})}onmessage(e){for(const t of this.messageHandlers)t.call(null,e)}handleMessage(e){const t=e.correlationId||NaN;if(\"correlationId\"in e){if(!this.wireListeners.has(t))return!1;{const{resolve:n,handleNack:i}=this.wireListeners.get(t);\"ack\"!==e.action?i({reason:\"Did not receive ack action\",error:(0,_o.errorToPOJO)(new Ao.NoAckError(e.action))}):\"payload\"in e?e.payload.success?n.call(null,e):i(e.payload):\"string\"==typeof e.reason?i(e):(console.warn(\"Received invalid response from core\",e),i({reason:\"invalid response shape\"})),this.wireListeners.delete(t)}}else this.uncorrelatedListener&&this.uncorrelatedListener.call(null,e),this.uncorrelatedListener=()=>{};return!0}}Io=no.Transport=Oo,go=new WeakMap,mo=new WeakMap;const So=(...e)=>({log:(...t)=>console.debug(`[${(new Date).toISOString()}]`,...(e=>e.map((e=>`[${e}]`)))(e),...t),getLogger:(...t)=>So(...e,...t)}),Ro=So(\"@openfin/core-web/client\");function Fo(e,t){if(!function(e){return\"string\"==typeof e}(e))throw new Error(`Property ${t} has invalid type. Expected string, got ${typeof e}.`)}const jo=\"web-broker-ports-ready\",ko=Ro.getLogger(\"get-web-interop-ports\");function Lo(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)}function To(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}\"function\"==typeof SuppressedError&&SuppressedError;const $o=e=>{var n,i,r;return r=class extends t.EventEmitter{constructor(t){super(),n.set(this,void 0),i.set(this,!1),this.connectSync=()=>{Lo(this,i,\"f\")||(e.addEventListener(\"message\",(e=>{e.data?.topic?.startsWith(\"wire-message\")&&e.data.message&&Lo(this,n,\"f\").call(this,{...JSON.parse(e.data.message),ports:e.ports})})),e.start())},this.connect=async()=>{this.connectSync()},this.send=t=>(e.postMessage({topic:\"wire-message\",message:JSON.stringify(t)}),Promise.resolve()),this.shutdown=async()=>{e.close()},To(this,n,t,\"f\")}getPort(){return e}},n=new WeakMap,i=new WeakMap,r};var Bo={},Go={};Object.defineProperty(Go,\"__esModule\",{value:!0}),Go.BaseEnvironment=void 0;const Wo=vr();Go.BaseEnvironment=class{async getViewWindowIdentity(e,t){const{identity:n}=await e.View.wrapSync(t).getCurrentWindow();return n}async getInteropInfo(e){const t=await e.Application.getCurrentSync().getInfo().catch((()=>null)),n=t?.initialOptions?.interopBrokerConfiguration??{};return{fdc3Version:t?(0,Wo.getDefaultViewFdc3VersionFromAppInfo)(t):void 0,...n,fdc3Info:{providerVersion:await e.System.getVersion(),provider:\"OpenFin\"}}}},Object.defineProperty(Bo,\"__esModule\",{value:!0});var Ho=Bo.BrowserEnvironment=void 0;const No=Go;class Do extends No.BaseEnvironment{constructor(){super(...arguments),this.type=\"other\",this.getRandomId=()=>{const e=new Uint32Array(1);return window.crypto.getRandomValues(e)[0].toString(32)}}getAdapterVersionSync(){return\"\"}observeBounds(e,t){throw new Error(\"Method not implemented.\")}layoutAllowedInContext(e){return!1}initLayoutManager(e,t,n){throw new Error(\"Method not implemented.\")}applyLayoutSnapshot(e,t,n){throw new Error(\"Method not implemented.\")}createLayout(e,t){throw new Error(\"Method not implemented.\")}destroyLayout(e,t){throw new Error(\"Method not implemented.\")}resolveLayout(e,t){throw new Error(\"Method not implemented.\")}initPlatform(...e){throw new Error(\"Method not implemented.\")}writeToken(e,t){return Promise.resolve(\"\")}retrievePort(e){throw new Error(\"Method not implemented.\")}getNextMessageId(){return this.getRandomId()}createChildContent(e){throw new Error(\"Method not implemented.\")}getWebWindow(e){throw new Error(\"Method not implemented.\")}getCurrentEntityIdentity(){throw new Error(\"Method not implemented.\")}getCurrentEntityType(){return\"external connection\"}raiseEvent(e,t){throw new Error(\"Method not implemented.\")}getUrl(){return location.href}getDefaultChannelOptions(){return{create:{},connect:{}}}getRtcPeer(){return new RTCPeerConnection}getWsConstructor(){return WebSocket}whenReady(){return Promise.resolve()}}Ho=Bo.BrowserEnvironment=Do;const Uo=e=>\"platform\"in e&&void 0!==e.platform;var Vo,zo;class Ko extends Ho{constructor(e){super(),this.connectConfig=e,Vo.set(this,void 0),zo.set(this,new W((async()=>Promise.resolve().then((function(){return require(\"./main-b14f67c9.js\")}))))),Uo(e)&&this.validatePlatformOptions(e)}getAdapterVersionSync(){return\"0.39.21\"}validatePlatformOptions({platform:e}){if(!(\"layoutSnapshot\"in e))throw new Error(\"Platform options are missing layoutSnapshot. Please provide a layoutSnapshot in the platform options.\");if(\"windows\"in e||\"windows\"in e.layoutSnapshot)throw new Error(\"It appears you tried to call connect() with a snapshot object from an OpenFin desktop environment. Note that connect() expects to be called with a platform property with this structure: { platform: { layoutSnapshot } }. To get a layoutSnapshot of the expected structure, use fin.Platform.Layout.getCurrentLayoutManagerSync().getLayoutSnapshot() in v34+ in your desktop environment.\");const{layouts:t}=e.layoutSnapshot;Object.entries(t).map((([e,t])=>{if(\"object\"!=typeof t||null===t)throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must be an object.`);if(!(\"content\"in t))throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must contain a 'content' property.`)}))}async getInteropInfo(e){return{...{contextGroups:void 0,logging:{beforeAction:{enabled:!1},afterAction:{enabled:!1}}},fdc3Version:void 0,fdc3Info:{providerVersion:\"0.39.21\",provider:\"OpenFin Web\"}}}layoutAllowedInContext(e){return!0}async initLayoutManager(e,t,n){if(Lo(this,Vo,\"f\"))throw new Error(\"Layout already initialized.\");if(!Uo(this.connectConfig))throw new Error(\"Platform options are missing from connection config.\");const{WebLayoutEntryPoint:i}=await Lo(this,zo,\"f\").getValue();return To(this,Vo,new i(this.connectConfig),\"f\"),await Lo(this,Vo,\"f\").initLayoutManager(e,t,n)}async applyLayoutSnapshot(e,t,n){Lo(this,Vo,\"f\")?.applyLayoutSnapshot(e,t,n)}async createLayout(e,t){return Lo(this,Vo,\"f\")?.createLayout(e,t)}async destroyLayout(e,t){return Lo(this,Vo,\"f\")?.destroyLayout(e,t)}async getViewWindowIdentity(e,t){return Promise.resolve({uuid:t.uuid,name:t.uuid})}}Vo=new WeakMap,zo=new WeakMap;const qo=()=>{const e=((e,t)=>{const n=new RegExp(`^${t}<(?.*)>$`).exec(e)?.groups?.meta;if(n)try{return JSON.parse(atob(n))}catch(e){throw new Error(`Failed to decode JSON from ${n}.`)}})(window.name,\"of-frame\");if(e)try{const{name:t,uuid:n,brokerUrl:i,providerId:r,contextGroup:o}=e;return Fo(i,\"brokerUrl\"),Fo(n,\"uuid\"),Fo(t,\"name\"),{identity:{name:t,uuid:n},brokerUrl:i,interopConfig:{providerId:r,currentContextGroup:o}}}catch(e){throw new Error(`Unexpected error occurred when inferring platform information: ${e.stack}`)}},Jo=()=>{const e=r.v4();return{uuid:e,name:e}},Yo=async e=>{if(\"enabled\"===e.connectionInheritance){const t=await(async e=>{const t=qo();if(t){const{validateOptions:n=(()=>!0)}=e,{identity:i,...r}=t;if(!await n(r))throw new Error(\"Parent options were rejected by validateOptions.\");return t}})(e);if(t)return t}if(!e.options){const t=\"enabled\"===e.connectionInheritance?\"Broker URL was not specified nor provided by a platform container.\":\"Connection inheritance is disabled but no options were provided.\";throw new Error(t)}return{...e.options,identity:Jo()}};exports.__classPrivateFieldGet=Lo,exports.__classPrivateFieldSet=To,exports.apiExposer=Gn,exports.commonjsGlobal=s,exports.connect=async t=>{try{Ro.log(\"Establishing connection\",t);const{brokerUrl:n,identity:i,timeout:r,interopConfig:s}=await Yo(t),{workerPort:a,iframeBrokerPort:c}=await(async(e,t,n)=>{const{origin:i}=new URL(e),r=document.createElement(\"IFRAME\");let s;r.style.display=\"none\";try{return await new Promise(((a,c)=>{const d=e=>{if(e.source===r.contentWindow&&e.data?.topic===`ack-${jo}`){if(e.origin!==i)c(new Error(`Broker redirected to unexpected origin ${e.origin}, expected ${i}.`));else if(e.data.success){const[t,n]=e.ports;a({iframeBrokerPort:t,workerPort:n})}else c(new m(e.data));window.removeEventListener(\"message\",d),clearTimeout(s)}};window.addEventListener(\"message\",d),ko.log(`Connecting to broker ${e}`),r.setAttribute(\"src\",e),r.setAttribute(\"name\",o(t,\"of-broker\")),document.body.appendChild(r),ko.log(\"Iframe loaded, awaiting init message from iframe\"),n&&(s=setTimeout((()=>{window.removeEventListener(\"message\",d),document.body.removeChild(r),c(new Error(\"Worker did not initialize in time\"))}),n))}))}catch(e){throw new Error(`Failed to initialise Fin Web Client. ${e.message}`,{cause:e})}})(n,i,r);Ro.log(\"Successfully established connection to shared worker\");const d={entityType:\"external connection\",...i};a.start(),c.start();const h=((t,n,i)=>{const r=$o(n),o=new Ko(t),s=new Io(r,o,i);return s.connectSync(),window.Buffer=e.Buffer,new Wr(s)})(t,a,d);return s?.providerId&&(h.me.interop=h.Interop.connectSync(s.providerId),s?.currentContextGroup&&h.me.interop.joinContextGroup(s.currentContextGroup).catch((e=>{console.warn(`Error joining specified context group: ${s?.currentContextGroup}, continuing`,e)}))),{...h,me:{...h.me,identity:{uuid:h.me.uuid,name:h.me.name}}}}catch(e){throw new Error(`An error occured during web-interop connection: ${e.message}`)}},exports.decorators=Nn,exports.encodeOptions=o,exports.layout_constants=ai,exports.lazy=G;\n","\"use strict\";var t=require(\"./main-8cad4070.js\"),e=require(\"uuid\");require(\"buffer/\"),require(\"events\"),require(\"lodash/cloneDeep\"),require(\"lodash/isEqual\");var i={},n={};Object.defineProperty(n,\"__esModule\",{value:!0}),n.mapValuesAsync=n.mapEntriesAsync=void 0;const o=(t,[e,i])=>({...t,[e]:i});async function s(t,e){return(await Promise.all(e.map((async([e,i])=>[e,await t(i,e)])))).reduce(o,{})}n.mapEntriesAsync=s,n.mapValuesAsync=async function(t,e){let i;return i=e instanceof Map?[...e.entries()]:Object.entries(e),s(t,i)};var r,a,l,h,d=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldSet||function(t,e,i,n,o){if(\"m\"===n)throw new TypeError(\"Private method is not writable\");if(\"a\"===n&&!o)throw new TypeError(\"Private accessor was defined without a setter\");if(\"function\"==typeof e?t!==e||!o:!e.has(t))throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");return\"a\"===n?o.call(t,i):o?o.value=i:e.set(t,i),i},c=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldGet||function(t,e,i,n){if(\"a\"===i&&!n)throw new TypeError(\"Private accessor was defined without a getter\");if(\"function\"==typeof e?t!==e||!n:!e.has(t))throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");return\"m\"===i?n:\"a\"===i?n.call(t):n?n.value:e.get(t)};Object.defineProperty(i,\"__esModule\",{value:!0});var m=i.DefaultLayoutManager=void 0;const u=n;class p{constructor(t){a.set(this,void 0),l.set(this,new Map),d(this,a,t,\"f\")}size(){return c(this,l,\"f\").size}async applyLayoutSnapshot({layouts:t}){if(Object.keys(t).length>1)throw new Error(\"[LayoutManager] Tried to call applyLayoutSnapshot with more than 1 layout. When implementing multiple layouts via overridden LayoutManager class, you must override and fully implement the applyLayoutSnapshot method without calling super.applyLayoutSnapshot().\");const[[e,i]]=Object.entries(t);await p.createLayout(this,{layoutName:e,layout:i})}async showLayout({layoutName:t}){}async getLayoutSnapshot(){return{layouts:await(0,u.mapValuesAsync)((t=>t.getFrameSnapshot()),c(this,l,\"f\"))}}async removeLayout({layoutName:t}){}getLayoutIdentityForView(t){const e=[...c(this,l,\"f\").values()].find((e=>e.getCurrentViews().some((e=>e.name===t.name&&e.uuid===t.uuid))));return e?.identity??void 0}isLayoutVisible({layoutName:t}){return c(p,r,\"m\",h).call(p,this,t).isVisible()}resolveLayoutIdentity(t){if(t&&\"layoutName\"in t)return t;const e=[...c(this,l,\"f\").values()];if(1===e.length)return e[0].identity;const i=e.find((t=>t.isVisible()));return i?.identity??void 0}static async resolveLayout(t,e){const i=t.resolveLayoutIdentity(e);if(void 0===i||!(\"layoutName\"in i))throw new Error(\"[layout-manager] resolveLayout: Could not resolve the layout identity. Make sure you include 'layoutName' in the identity object.\");return c(p,r,\"m\",h).call(p,t,i.layoutName)}static async handleSharedView(t,e,i){await(0,u.mapValuesAsync)((async t=>{if(t.identity.layoutName!==e.layoutName){const e=t.getCurrentViews().find((t=>t.name===i.name));e&&await t.onViewDetached({viewIdentity:e,target:null}).catch(console.error)}}),c(t,l,\"f\"))}static async handleLastViewRemoved(t,e){await t.removeLayout(e),await c(t,a,\"f\").handleLastViewRemoved(t)}static async destroyLayout(t,{layoutName:e}){await c(p,r,\"m\",h).call(p,t,e).destroy(),c(t,l,\"f\").delete(e)}static async createLayout(t,e){const{layoutName:i}=e;if(c(t,l,\"f\").has(i))throw new Error(`Layout name ${i} already exists`);await c(t,a,\"f\").createLayout(e,t)}static registerLayout(t,e,i){c(t,l,\"f\").set(e,i)}static getAllLayouts(t){return[...c(t,l,\"f\").values()]}static setInitialSnapshot(t,e){c(t,a,\"f\").setInitialSnapshot(e)}static createClosedConstructor(...t){return class extends p{constructor(){super(...t)}}}}m=i.DefaultLayoutManager=p,r=p,a=new WeakMap,l=new WeakMap,h=function(t,e){const i=c(t,l,\"f\").get(e);if(!i)throw new Error(`[layout-manager] getLayoutByName: Could not locate layout with name '${e}'`);return i};var g={},f={},v={};Object.defineProperty(v,\"__esModule\",{value:!0}),v.ReversibleMap=void 0;v.ReversibleMap=class{constructor(){this.valueToKey=new Map,this.keyToValue=new Map,this.setUnique=(t,e)=>{if(this.hasKey(t)||this.hasValue(e))throw new Error(\"Key or value already in the map.\");this.keyToValue.set(t,e),this.valueToKey.set(e,t)},this.getKey=t=>{const e=this.valueToKey.get(t);if(!e)throw new Error(\"Value not found in the map.\");return e},this.deleteKey=t=>{const e=this.getValue(t);return this.keyToValue.delete(t),this.valueToKey.delete(e),e},this.deleteValue=t=>{const e=this.getKey(t);return this.keyToValue.delete(e),this.valueToKey.delete(t),e},this.hasKey=t=>this.keyToValue.has(t),this.hasValue=t=>this.valueToKey.has(t)}getValue(t){const e=this.keyToValue.get(t);if(!e)throw new Error(\"Key not found in the map.\");return e}},Object.defineProperty(f,\"__esModule\",{value:!0});var _=f.LayoutContentCache=void 0;const y=t.lazy,C=v;class w{constructor(){this.contentItemCache=new C.ReversibleMap,this.contentItemCacheId=0,this.createCacheKey=()=>{const t=`entity-${this.contentItemCacheId.toString()}`;return this.contentItemCacheId+=1,t},this.hasKey=t=>this.contentItemCache.hasKey(t),this.getItemOrUndefined=t=>{try{return this.getContentItemOrThrow(t)}catch(t){return}},this.getContentItemOrThrow=(t,e)=>{if(!this.contentItemCache.hasKey(t))throw new Error(\"Layout component has been destroyed or detached from the current layout.\");const i=this.contentItemCache.getValue(t);if(e&&!e.includes(i.type))throw new Error(`Layout item is not the expected type. Expected ${e.join(\", \")}, got ${i.type}.`);return i},this.getOrCreateEntityId=t=>{if(this.contentItemCache.hasValue(t))return this.contentItemCache.getKey(t);t.onDestroyed((()=>{this.contentItemCache.deleteValue(t)}));const e=this.createCacheKey();return this.contentItemCache.setUnique(e,t),e}}static getSingleInstance(){return w.singleton.getValue()}}_=f.LayoutContentCache=w,w.singleton=new y.Lazy((()=>new w));var I={},b={};!function(t){Object.defineProperty(t,\"__esModule\",{value:!0}),t.getAdjacentStacks=t.doShareEdge=t.getAdjacentItem=void 0;t.getAdjacentItem=(e,i)=>{const{parent:n}=e;if(e.isRoot()||!n)return;const o=[\"top\",\"bottom\"].includes(i)?\"column\":\"row\",s=[\"top\",\"left\"].includes(i)?-1:1;if(n.type===o){const t=n.contentItems.indexOf(e)+s;if(t>=0&&t{const n=t.getBounds(),o=e.getBounds();if(!n||!o)return!1;if([\"top\",\"bottom\"].includes(i)){return!(n.righto.right)}return!(n.bottomo.bottom)};t.getAdjacentStacks=(e,i)=>{const n=[\"top\",\"bottom\"].includes(i)?\"row\":\"column\",o=s=>\"stack\"===s.type?(0,t.doShareEdge)(e,s,i)?[s]:[]:\"root\"===s.type||\"ground\"===s.type?[]:s.type===n?s.contentItems.map((t=>o(t))).flat():s.type!==n?[\"top\",\"right\"].includes(i)?o(s.contentItems[s.contentItems.length-1]):o(s.contentItems[0]):[],s=(0,t.getAdjacentItem)(e,i);return s?o(s):[]}}(b);var S=t.commonjsGlobal&&t.commonjsGlobal.__decorate||function(t,e,i,n){var o,s=arguments.length,r=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if(\"object\"==typeof Reflect&&\"function\"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(s<3?o(r):s>3?o(e,i,r):o(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};Object.defineProperty(I,\"__esModule\",{value:!0}),I.LayoutEntitiesController=void 0;const E=t.decorators,x=b,L=i;class z{constructor(t,e,i){this.wire=t,this.layoutManager=e,this.layoutContentCache=i,this.analytics=t=>{this.wire.sendAction(`layout-controller-${t}`).catch((()=>{}))},this.getLayoutIdentityForViewOrThrow=async t=>{const e=this.layoutManager.getLayoutIdentityForView(t);if(!e)throw new Error(`View identity ${t.name} is not attached to any layouts.`);return e},this.getRoot=async t=>{this.analytics(\"get-root\");const e=(await this.getLayout(t)).getRoot();return{type:e.type,entityId:this.layoutContentCache.getOrCreateEntityId(e)}},this.getStackByView=async t=>{this.analytics(\"get-stack-by-view\");const e=await this.getLayoutIdentityForViewOrThrow(t),i=(await this.getLayout(e)).getStackByView(t);if(\"stack\"===i?.type)return{entityId:this.layoutContentCache.getOrCreateEntityId(i),type:\"stack\"}},this.getStackViews=t=>{this.analytics(\"get-stack-views\");return this.layoutContentCache.getContentItemOrThrow(t,[\"stack\"]).contentItems.map((t=>({name:t.viewName,uuid:this.wire.me.uuid})))},this.isRoot=t=>{this.analytics(\"is-root\");return this.layoutContentCache.getContentItemOrThrow(t).isRoot()},this.exists=t=>(this.analytics(\"exists\"),this.layoutContentCache.hasKey(t)),this.addViewToStack=async(t,e,{index:i}={index:0})=>{this.analytics(\"add-view-to-stack\");const n=this.layoutContentCache.getContentItemOrThrow(t);if(i&&i>n.contentItems.length+1)throw new Error(`Index '${i}' out of range, please exclude the index or specify a number between 0 and ${n.contentItems.length}`);const o={id:t,index:i},{identity:s}=await n.layout.platformCreateView(e,{location:o});return s},this.findViewInStack=(t,e)=>t.contentItems.find((t=>t.viewName===e.name)),this.removeViewFromStack=async(t,e)=>{this.analytics(\"remove-view-from-stack\");const i=this.layoutContentCache.getContentItemOrThrow(t,[\"stack\"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to remove a view ('${e.name}') which does not belong to the stack.`);await n.layout.platformCloseView(e)},this.createAdjacentStack=async(t,e,{position:i=\"right\"}={})=>{if(this.analytics(\"create-adjacent-stack\"),!Array.isArray(e)||0===e.length)throw new Error('The parameter \"views\" must be an array with at least 1 element.');if(![\"top\",\"bottom\",\"left\",\"right\"].includes(i))throw new Error(`Invalid position '${i}' specified.`);const n=this.layoutContentCache.getContentItemOrThrow(t).createAdjacentStack({position:i}),o=this.layoutContentCache.getOrCreateEntityId(n);return await Promise.all(e.reverse().map((t=>this.addViewToStack(o,t)))),o},this.getAdjacentStacks=async({targetId:t,edge:e})=>{this.analytics(\"get-adjacent-stacks\");const i=this.layoutContentCache.getContentItemOrThrow(t);return(0,x.getAdjacentStacks)(i,e).map((t=>({entityId:this.layoutContentCache.getOrCreateEntityId(t)})))},this.setStackActiveView=async(t,e)=>{this.analytics(\"set-stack-active-view\");const i=this.layoutContentCache.getContentItemOrThrow(t,[\"stack\"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to set a view ('${e.name}') as active when it does not belong to the stack.`);i.setActiveContentItem(n,!0)}}async getLayout(t){const e=await L.DefaultLayoutManager.resolveLayout(this.layoutManager,t);if(!e)throw new Error(`Could not resolve target layout identity ${JSON.stringify(t)}`);return e}getContent(t){this.analytics(\"get-content\");return this.layoutContentCache.getContentItemOrThrow(t,[\"column\",\"row\"]).contentItems.map((t=>({type:t.type,entityId:this.layoutContentCache.getOrCreateEntityId(t)})))}getParent(t){this.analytics(\"get-parent\");const e=this.layoutContentCache.getContentItemOrThrow(t);if(!e.isRoot())return e.parent?.contentItems.includes(e)?{type:e.parent.type,entityId:this.layoutContentCache.getOrCreateEntityId(e.parent)}:void 0}}S([(0,E.expose)()],z.prototype,\"getLayoutIdentityForViewOrThrow\",void 0),S([(0,E.expose)()],z.prototype,\"getRoot\",void 0),S([(0,E.expose)()],z.prototype,\"getStackByView\",void 0),S([(0,E.expose)()],z.prototype,\"getStackViews\",void 0),S([(0,E.expose)()],z.prototype,\"getContent\",null),S([(0,E.expose)()],z.prototype,\"getParent\",null),S([(0,E.expose)()],z.prototype,\"isRoot\",void 0),S([(0,E.expose)()],z.prototype,\"exists\",void 0),S([(0,E.expose)()],z.prototype,\"addViewToStack\",void 0),S([(0,E.expose)()],z.prototype,\"removeViewFromStack\",void 0),S([(0,E.expose)()],z.prototype,\"createAdjacentStack\",void 0),S([(0,E.expose)()],z.prototype,\"getAdjacentStacks\",void 0),S([(0,E.expose)()],z.prototype,\"setStackActiveView\",void 0),I.LayoutEntitiesController=z,Object.defineProperty(g,\"__esModule\",{value:!0});var M=g.initLayoutEndpoints=void 0;const P=t.apiExposer,T=t.layout_constants,A=f,k=I,D=i;M=g.initLayoutEndpoints=async function(t,e){const i=t.getFin(),n=await i.Platform.getCurrentSync().getClient(),o=new P.ChannelsExposer(n);await new P.ApiExposer(o).exposeInstance(new k.LayoutEntitiesController(t,e,A.LayoutContentCache.getSingleInstance()),{id:T.LAYOUT_CONTROLLER_ID}),await async function(t,e){const i=t=>async i=>{const n=await D.DefaultLayoutManager.resolveLayout(e,i.target);if(!n)throw new Error(`Could not resolve the layout target from payload ${JSON.stringify(i)}`);return t(n,i)},n=(e,n)=>{t.register(e,i(n))},o=(t,e)=>{n(t,e)};n(\"replace-view\",((t,e)=>t.replaceView(e))),n(\"replace-layout\",((t,{layout:e})=>t.replaceLayout(e))),n(\"add-view\",((t,e)=>t.insertView(e))),o(\"layout-add-view\",((t,{viewOptions:e,location:i,targetView:n})=>t.platformCreateView(e,{location:i,targetView:n}))),n(\"close-view\",((t,e)=>t.cleanupView(e.viewIdentity))),o(\"layout-close-view\",((t,e)=>t.platformCloseView(e.viewIdentity))),n(\"apply-preset-layout\",((t,e)=>t.applyPreset(e))),n(\"get-layout-views\",(t=>t.getCurrentViews())),n(\"get-frame-snapshot\",(t=>t.getFrameSnapshot())),n(\"is-visible\",(t=>t.isVisible())),n(\"destroy\",(t=>t.destroy())),t.register(\"get-layout-snapshot\",(()=>e.getLayoutSnapshot()))}(n,e)};var R={};Object.defineProperty(R,\"__esModule\",{value:!0});var U=R.BaseLayout=void 0;U=R.BaseLayout=class{};var O={};Object.defineProperty(O,\"__esModule\",{value:!0});var V=O.DOMEmitter=void 0;V=O.DOMEmitter=class{constructor(t){this.container=t}dispatchLocalEvent(t,e){const i={...e,type:t,tabSelector:`tab-${e.name}`,containerSelector:`container-${e.name}`,topic:\"openfin-DOM-event\"};this.container.dispatchEvent(new CustomEvent(t,{detail:i}))}};var B={};Object.defineProperty(B,\"__esModule\",{value:!0});var H=B.mapLayoutContentItemsImmutableSync=B.mapLayoutContentItemsImmutable=W=B.isVisible=void 0;var W=B.isVisible=t=>(0!==t.offsetWidth||0!==t.offsetHeight)&&\"hidden\"!==window.getComputedStyle(t).visibility&&t.offsetTop>=0&&t.offsetLeft>=0&&t.offsetTop<=window.innerHeight&&t.offsetLeft<=window.innerWidth;const F=t=>\"type\"in t&&\"component\"===t.type;B.mapLayoutContentItemsImmutable=async function t(e,i){return F(i)?e(i):{...i,content:await Promise.all(i.content?.map((i=>t(e,i))))}},H=B.mapLayoutContentItemsImmutableSync=function t(e,i){return F(i)?e(i):{...i,content:i.content?.map((i=>t(e,i)))}};class N extends Error{constructor(t,e){super(e),this.type=t}}class G extends N{constructor(t,e){super(\"Configuration\",t),this.node=e}}class j extends N{constructor(t){super(\"PopoutBlocked\",t)}}class $ extends N{constructor(t){super(\"API\",t)}}class Z extends N{constructor(t){super(\"Bind\",t)}}class q extends Error{constructor(t,e,i){super(`${t}: ${e}${void 0===i?\"\":\": \"+i}`)}}class X extends q{constructor(t,e){super(\"Assert\",t,e)}}class Y extends q{constructor(t,e,i){super(\"UnreachableCase\",t,`${e}${void 0===i?\"\":\": \"+i}`)}}class K extends q{constructor(t,e){super(\"UnexpectedNull\",t,e)}}class J extends q{constructor(t,e){super(\"UnexpectedUndefined\",t,e)}}var Q;!function(t){let e=!1;const i={PopoutCannotBeCreatedWithGroundItemConfig:{id:0,default:\"Popout cannot be created with ground ItemConfig\"},PleaseRegisterAConstructorFunction:{id:1,default:\"Please register a constructor function\"},ComponentTypeNotRegisteredAndBindComponentEventHandlerNotAssigned:{id:2,default:\"Component type not registered and BindComponentEvent handler not assigned\"},ComponentIsAlreadyRegistered:{id:3,default:\"Component is already registered\"},ComponentIsNotVirtuable:{id:4,default:\"Component is not virtuable. Requires rootHtmlElement field/getter\"},VirtualComponentDoesNotHaveRootHtmlElement:{id:5,default:'Virtual component does not have getter \"rootHtmlElement\"'},ItemConfigIsNotTypeComponent:{id:6,default:\"ItemConfig is not of type component\"},InvalidNumberPartInSizeString:{id:7,default:\"Invalid number part in size string\"},UnknownUnitInSizeString:{id:8,default:\"Unknown unit in size string\"},UnsupportedUnitInSizeString:{id:9,default:\"Unsupported unit in size string\"}};t.idCount=Object.keys(i).length;const n=Object.values(i);t.checkInitialise=function(){if(!e)for(let e=0;e=\"0\"&&t<=\"9\"}function Tt(t,e){const i=zt(e);t.style.width=i}function At(t,e){const i=zt(e);t.style.height=i}function kt(t){return{width:t.offsetWidth,height:t.offsetHeight}}function Dt(t,e){t.style.display=e?\"\":\"none\"}function Rt(t,e){if(void 0!==e)for(const i in e)if(e.hasOwnProperty(i)){const n=e[i],o=t[i];t[i]=Ut(o,n)}return t}function Ut(t,e){if(\"object\"!=typeof e)return e;if(Array.isArray(e)){const t=e.length,i=new Array(t);for(let n=0;n36)throw new Error(\"Too many keys in config minifier map\")},t.translateObject=n}(dt||(dt={})),function(t){t.defaults={type:at.ground,content:[],size:1,sizeUnit:ht.Fractional,minSize:void 0,minSizeUnit:ht.Pixel,id:\"\",isClosable:!0},t.createCopy=function(t,e){switch(t.type){case at.ground:case at.row:case at.column:return gt.createCopy(t,e);case at.stack:return ut.createCopy(t,e);case at.component:return pt.createCopy(t);default:throw new Y(\"CICC91354\",t.type,\"Invalid Config Item type specified\")}},t.createDefault=function(t){switch(t){case at.ground:throw new X(\"CICCDR91562\");case at.row:case at.column:return gt.createDefault(t);case at.stack:return ut.createDefault();case at.component:return pt.createDefault();default:throw new Y(\"CICCDD91563\",t,\"Invalid Config Item type specified\")}},t.isComponentItem=function(t){return t.type===at.component},t.isStackItem=function(t){return t.type===at.stack},t.isGroundItem=function(t){return t.type===at.ground}}(ct||(ct={})),function(t){t.defaultMaximised=!1,function(t){t.createCopy=function(t,e){return void 0===t?void 0:{show:null!=e?e:t.show,popout:t.popout,close:t.close,maximise:t.maximise,minimise:t.minimise,tabDropdown:t.tabDropdown}}}(t.Header||(t.Header={}))}(mt||(mt={})),function(t){function e(t){const e=t.length,i=new Array(e);for(let n=0;n\"__glMaximised\"===t));t>0&&(o=!0,n=n.splice(t,1)),e=n.length>0?n[0]:ct.defaults.id}else e=n;return i=void 0!==t.maximised?t.maximised:o,{id:e,maximised:i}}}(wt||(wt={})),function(t){function e(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0;return{resolved:!0,root:Et.resolve(i),openPopouts:t.resolveOpenPopouts(e.openPopouts),dimensions:t.Dimensions.resolve(e.dimensions),settings:t.Settings.resolve(e.settings),header:t.Header.resolve(e.header,e.settings,e.labels)}}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:Lt.fromResolvedArray(e.openPopouts),settings:_t.Settings.createCopy(e.settings),dimensions:t.Dimensions.fromResolved(e.dimensions),header:_t.Header.createCopy(e.header)}},t.isResolved=function(t){const e=t;return void 0!==e.resolved&&!0===e.resolved},t.resolveOpenPopouts=function(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0,{root:Et.resolve(o),openPopouts:xt.resolveOpenPopouts(e.openPopouts),dimensions:xt.Dimensions.resolve(e.dimensions),settings:xt.Settings.resolve(e.settings),header:xt.Header.resolve(e.header,e.settings,e.labels),parentId:null!==(i=e.parentId)&&void 0!==i?i:null,indexInParent:null!==(n=e.indexInParent)&&void 0!==n?n:null,window:t.Window.resolve(e.window,e.dimensions),resolved:!0}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:i(e.openPopouts),dimensions:xt.Dimensions.fromResolved(e.dimensions),settings:_t.Settings.createCopy(e.settings),header:_t.Header.createCopy(e.header),parentId:e.parentId,indexInParent:e.indexInParent,window:t.Window.fromResolved(e.window)}},t.fromResolvedArray=i}(Lt||(Lt={}));class Wt{constructor(){this._allEventSubscriptions=[],this._subscriptionsMap=new Map,this.unbind=this.removeEventListener,this.trigger=this.emit}tryBubbleEvent(t,e){}emit(t,...e){let i=this._subscriptionsMap.get(t);if(void 0!==i){i=i.slice();for(let t=0;t0){const n=e.slice();n.unshift(t);const o=this._allEventSubscriptions.slice();for(let t=0;t0?n.contentItems[0]:n,e=0);const o=this._layoutManager.createAndInitContentItem(i,t);t.addChild(o,e),this._layoutManager.layoutConfig.settings.popInOnClose?this._onClose():this.close()}createWindow(){const t=this.createUrl(),e=Math.floor(1e6*Math.random()).toString(36),i=this.serializeWindowFeatures({width:this._initialWindowSize.width,height:this._initialWindowSize.height,innerWidth:this._initialWindowSize.width,innerHeight:this._initialWindowSize.height,menubar:\"no\",toolbar:\"no\",location:\"no\",personalbar:\"no\",resizable:\"yes\",scrollbars:\"no\",status:\"no\"});if(this._popoutWindow=globalThis.open(t,e,i),this._popoutWindow)this._popoutWindow.addEventListener(\"load\",(()=>this.positionWindow()),{passive:!0}),this._popoutWindow.addEventListener(\"beforeunload\",(()=>{this._layoutManager.layoutConfig.settings.popInOnClose?this.popIn():this._onClose()}),{passive:!0}),this._checkReadyInterval=setInterval((()=>this.checkReady()),10);else if(!0===this._layoutManager.layoutConfig.settings.blockedPopoutsThrowError){throw new j(\"Popout blocked\")}}checkReady(){if(null===this._popoutWindow)throw new K(\"BPCR01844\");this._popoutWindow.__glInstance&&this._popoutWindow.__glInstance.isInitialised&&(this.onInitialised(),void 0!==this._checkReadyInterval&&(clearInterval(this._checkReadyInterval),this._checkReadyInterval=void 0))}serializeWindowFeatures(t){const e=[];for(const i in t)e.push(i+\"=\"+t[i].toString());return e.join(\",\")}createUrl(){const t=\"gl-window-config-\"+Ot(),e=_t.minifyConfig(this._config);try{localStorage.setItem(t,JSON.stringify(e))}catch(t){throw new Error(\"Error while writing to localStorage \"+function(t){return t instanceof Error?t.message:\"string\"==typeof t?t:\"Unknown Error\"}(t))}const i=new URL(location.href);return i.searchParams.set(\"gl-window\",t),i.toString()}positionWindow(){if(null===this._popoutWindow)throw new Error(\"BrowserPopout.positionWindow: null popoutWindow\");this._popoutWindow.moveTo(this._initialWindowSize.left,this._initialWindowSize.top),this._popoutWindow.focus()}onInitialised(){this._isInitialised=!0,this.getGlInstance().on(\"popIn\",(()=>this.popIn())),this.emit(\"initialised\")}_onClose(){setTimeout((()=>this.emit(\"closed\")),50)}}class Gt extends Wt{constructor(t,e,i,n){super(),this.layoutManager=t,this._parent=i,this._element=n,this._popInParentIds=[],this._type=e.type,this._id=e.id,this._isInitialised=!1,this.isGround=!1,this.isRow=!1,this.isColumn=!1,this.isStack=!1,this.isComponent=!1,this.size=e.size,this.sizeUnit=e.sizeUnit,this.minSize=e.minSize,this.minSizeUnit=e.minSizeUnit,this._isClosable=e.isClosable,this._pendingEventPropagations={},this._throttledEvents=[\"stateChanged\"],this._contentItems=this.createContentItems(e.content)}get type(){return this._type}get id(){return this._id}set id(t){this._id=t}get popInParentIds(){return this._popInParentIds}get parent(){return this._parent}get contentItems(){return this._contentItems}get isClosable(){return this._isClosable}get element(){return this._element}get isInitialised(){return this._isInitialised}static isStack(t){return t.isStack}static isComponentItem(t){return t.isComponent}static isComponentParentableItem(t){return t.isStack||t.isGround}removeChild(t,e=!1){const i=this._contentItems.indexOf(t);if(-1===i)throw new Error(\"Can't remove child item. Unknown content item\");if(e||this._contentItems[i].destroy(),this._contentItems.splice(i,1),this._contentItems.length>0)this.updateSize(!1);else if(!this.isGround&&!0===this._isClosable){if(null===this._parent)throw new K(\"CIUC00874\");this._parent.removeChild(this)}}addChild(t,e,i){return null!=e||(e=this._contentItems.length),this._contentItems.splice(e,0,t),t.setParent(this),!0===this._isInitialised&&!1===t._isInitialised&&t.init(),e}replaceChild(t,e,i=!1){const n=this._contentItems.indexOf(t),o=t._element.parentNode;if(-1===n)throw new X(\"CIRCI23232\",\"Can't replace child. oldChild is not child of this\");if(null===o)throw new K(\"CIRCP23232\");if(o.replaceChild(e._element,t._element),!0===i&&(t._parent=null,t.destroy()),this._contentItems[n]=e,e.setParent(this),e.size=t.size,e.sizeUnit=t.sizeUnit,e.minSize=t.minSize,e.minSizeUnit=t.minSizeUnit,null===e._parent)throw new K(\"CIRCNC45699\");!0===e._parent._isInitialised&&!1===e._isInitialised&&e.init(),this.updateSize(!1)}remove(){if(null===this._parent)throw new K(\"CIR11110\");this._parent.removeChild(this)}popout(){const t=Ot(),e=this.layoutManager.createPopoutFromContentItem(this,void 0,t,void 0);return this.emitBaseBubblingEvent(\"stateChanged\"),e}calculateConfigContent(){const t=this._contentItems,e=t.length,i=new Array(e);for(let n=0;nthis.propagateEventToLayoutManager(t,e))))}propagateEventToLayoutManager(t,e){this._pendingEventPropagations[t]=!1,this.layoutManager.emitUnknown(t,e)}}class jt extends Gt{constructor(t,e,i){super(t,e,i,document.createElement(\"div\")),this._parentItem=i,this._focused=!1,this.isComponent=!0,this._reorderEnabled=e.reorderEnabled,this.applyUpdatableConfig(e),this._initialWantMaximise=e.maximised;const n=document.createElement(\"div\");n.classList.add(\"lm_content\"),this.element.appendChild(n),this._container=new Ft(e,this,t,n,(t=>this.handleUpdateItemConfigEvent(t)),(()=>this.show()),(()=>this.hide()),(t=>this.focus(t)),(t=>this.blur(t)))}get componentName(){return this._container.componentType}get componentType(){return this._container.componentType}get reorderEnabled(){return this._reorderEnabled}get initialWantMaximise(){return this._initialWantMaximise}get component(){return this._container.component}get container(){return this._container}get parentItem(){return this._parentItem}get headerConfig(){return this._headerConfig}get title(){return this._title}get tab(){return this._tab}get focused(){return this._focused}destroy(){this._container.destroy(),super.destroy()}applyUpdatableConfig(t){this.setTitle(t.title),this._headerConfig=t.header}toConfig(){const t=this._container.stateRequestEvent,e=void 0===t?this._container.state:t();return{type:at.component,content:[],size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,maximised:!1,isClosable:this.isClosable,reorderEnabled:this._reorderEnabled,title:this._title,header:mt.Header.createCopy(this._headerConfig),componentType:pt.copyComponentType(this.componentType),componentState:e}}close(){if(null===this.parent)throw new K(\"CIC68883\");this.parent.removeChild(this,!1)}enterDragMode(t,e){Tt(this.element,t),At(this.element,e),this._container.enterDragMode(t,e)}exitDragMode(){this._container.exitDragMode()}enterStackMaximised(){this._container.enterStackMaximised()}exitStackMaximised(){this._container.exitStackMaximised()}drag(){this._container.drag()}updateSize(t){this.updateNodeSize(t)}init(){this.updateNodeSize(!1),super.init(),this._container.emit(\"open\"),this.initContentItems()}setTitle(t){this._title=t,this.emit(\"titleChanged\",t),this.emit(\"stateChanged\")}setTab(t){this._tab=t,this.emit(\"tab\",t),this._container.setTab(t)}hide(){super.hide(),this._container.setVisibility(!1)}show(){super.show(),this._container.setVisibility(!0)}focus(t=!1){this.parentItem.setActiveComponentItem(this,!0,t)}setFocused(t){this._focused=!0,this.tab.setFocused(),t||this.emitBaseBubblingEvent(\"focus\")}blur(t=!1){this._focused&&this.layoutManager.setFocusedComponentItem(void 0,t)}setBlurred(t){this._focused=!1,this.tab.setBlurred(),t||this.emitBaseBubblingEvent(\"blur\")}setParent(t){this._parentItem=t,super.setParent(t)}handleUpdateItemConfigEvent(t){this.applyUpdatableConfig(t)}updateNodeSize(t){if(\"none\"!==this.element.style.display){const{width:e,height:i}=kt(this.element);this._container.setSizeToNodeSize(e,i,t)}}}class $t extends Gt{constructor(){super(...arguments),this._focused=!1}get focused(){return this._focused}setFocusedValue(t){this._focused=t}}class Zt extends Wt{constructor(t,e){super(),this._eElement=t,this._pointerTracking=!1,this._pointerDownEventListener=t=>this.onPointerDown(t),this._pointerMoveEventListener=t=>this.onPointerMove(t),this._pointerUpEventListener=t=>this.onPointerUp(t),this._timeout=void 0,this._allowableTargets=[t,...e],this._oDocument=document,this._eBody=document.body,this._nDelay=1800,this._nDistance=10,this._nX=0,this._nY=0,this._nOriginalX=0,this._nOriginalY=0,this._dragging=!1,this._eElement.addEventListener(\"pointerdown\",this._pointerDownEventListener,{passive:!0})}destroy(){this.checkRemovePointerTrackingEventListeners(),this._eElement.removeEventListener(\"pointerdown\",this._pointerDownEventListener)}cancelDrag(){this.processDragStop(void 0)}onPointerDown(t){if(this._allowableTargets.includes(t.target)&&t.isPrimary){const e=this.getPointerCoordinates(t);this.processPointerDown(e)}}processPointerDown(t){this._nOriginalX=t.x,this._nOriginalY=t.y,this._oDocument.addEventListener(\"pointermove\",this._pointerMoveEventListener),this._oDocument.addEventListener(\"pointerup\",this._pointerUpEventListener,{passive:!0}),this._pointerTracking=!0,this._timeout=setTimeout((()=>{try{this.startDrag()}catch(t){throw console.error(t),t}}),this._nDelay)}onPointerMove(t){this._pointerTracking&&(this.processDragMove(t),t.preventDefault())}processDragMove(t){this._nX=t.pageX-this._nOriginalX,this._nY=t.pageY-this._nOriginalY,!1===this._dragging&&(Math.abs(this._nX)>this._nDistance||Math.abs(this._nY)>this._nDistance)&&this.startDrag(),this._dragging&&this.emit(\"drag\",this._nX,this._nY,t)}onPointerUp(t){this.processDragStop(t)}processDragStop(t){var e;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this.checkRemovePointerTrackingEventListeners(),!0===this._dragging&&(this._eBody.classList.remove(\"lm_dragging\"),this._eElement.classList.remove(\"lm_dragging\"),null===(e=this._oDocument.querySelector(\"iframe\"))||void 0===e||e.style.setProperty(\"pointer-events\",\"\"),this._dragging=!1,this.emit(\"dragStop\",t))}checkRemovePointerTrackingEventListeners(){this._pointerTracking&&(this._oDocument.removeEventListener(\"pointermove\",this._pointerMoveEventListener),this._oDocument.removeEventListener(\"pointerup\",this._pointerUpEventListener),this._pointerTracking=!1)}startDrag(){var t;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this._dragging=!0,this._eBody.classList.add(\"lm_dragging\"),this._eElement.classList.add(\"lm_dragging\"),null===(t=this._oDocument.querySelector(\"iframe\"))||void 0===t||t.style.setProperty(\"pointer-events\",\"none\"),this.emit(\"dragStart\",this._nOriginalX,this._nOriginalY)}getPointerCoordinates(t){return{x:t.pageX,y:t.pageY}}}class qt{constructor(t,e,i){this._isVertical=t,this._size=e,this._grabSize=i0){const i=this.createSplitter(Math.max(0,e-1)).element;e>0?(this.contentItems[e-1].element.insertAdjacentElement(\"afterend\",i),i.insertAdjacentElement(\"afterend\",t.element)):(this.contentItems[0].element.insertAdjacentElement(\"beforebegin\",i),i.insertAdjacentElement(\"beforebegin\",t.element))}else this._childElementContainer.appendChild(t.element);super.addChild(t,e);const n=1/this.contentItems.length*100;if(!0===i)return this.emitBaseBubblingEvent(\"stateChanged\"),e;for(let e=0;e0&&(this.calculateRelativeSizes(),this.setAbsoluteSizes()),this.emitBaseBubblingEvent(\"stateChanged\"),this.emit(\"resize\")}setAbsoluteSizes(){const t=this.calculateAbsoluteSizes();for(let e=0;e0&&t.itemSizes[e]++,this._isColumn?(Tt(this.contentItems[e].element,t.crossAxisSize),At(this.contentItems[e].element,t.itemSizes[e])):(Tt(this.contentItems[e].element,t.itemSizes[e]),At(this.contentItems[e].element,t.crossAxisSize))}calculateAbsoluteSizes(){const t=(this.contentItems.length-1)*this._splitterSize,{width:e,height:i}=kt(this.element);let n,o;this._isColumn?(n=i-t,o=e):(n=e-t,o=i);let s=0;const r=[];for(let t=0;t0){const n=100-t;for(let t=0;t100&&e.length>0){for(let t=0;te)return;{const r=i/e;let a=i;for(let e=0;ethis.onSplitterDrag(e,t,i))),e.on(\"dragStop\",(()=>this.onSplitterDragStop(e))),e.on(\"dragStart\",(()=>this.onSplitterDragStart(e))),this._splitter.splice(t,0,e),e}getSplitItems(t){const e=this._splitter.indexOf(t);return{before:this.contentItems[e],after:this.contentItems[e+1]}}calculateContentItemMinSize(t){const e=t.minSize;if(void 0!==e){if(t.minSizeUnit===ht.Pixel)return e;throw new X(\"ROCGMD98831\",JSON.stringify(t))}{const t=this.layoutManager.layoutConfig.dimensions;return this._isColumn?t.defaultMinItemHeight:t.defaultMinItemWidth}}calculateContentItemsTotalMinSize(t){let e=0;for(const i of t)e+=this.calculateContentItemMinSize(i);return e}onSplitterDragStart(t){const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=this.calculateContentItemsTotalMinSize(e.before.contentItems),s=this.calculateContentItemsTotalMinSize(e.after.contentItems);this._splitterPosition=0,this._splitterMinPosition=-1*(i-o),this._splitterMaxPosition=n-s}onSplitterDrag(t,e,i){let n=this._isColumn?i:e;if(null===this._splitterMinPosition||null===this._splitterMaxPosition)throw new K(\"ROCOSD59226\");n=Math.max(n,this._splitterMinPosition),n=Math.min(n,this._splitterMaxPosition),this._splitterPosition=n;const o=zt(n);this._isColumn?t.element.style.top=o:t.element.style.left=o}onSplitterDragStop(t){if(null===this._splitterPosition)throw new K(\"ROCOSDS66932\");{const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=(this._splitterPosition+i)/(i+n),s=e.before.size+e.after.size;e.before.size=o*s,e.after.size=(1-o)*s,t.element.style.top=zt(0),t.element.style.left=zt(0),globalThis.requestAnimationFrame((()=>this.updateSize(!1)))}}}!function(t){t.getElementDimensionSize=function(t,e){return\"width\"===e?function(t){return t.offsetWidth}(t):function(t){return t.offsetHeight}(t)},t.setElementDimensionSize=function(t,e,i){return\"width\"===e?Tt(t,i):At(t,i)},t.createElement=function(t,e){const i=t.createElement(\"div\");return i.classList.add(\"lm_item\"),e?i.classList.add(\"lm_column\"):i.classList.add(\"lm_row\"),i}}(Xt||(Xt={}));class Yt extends $t{constructor(t,e,i){super(t,vt.create(e),null,Yt.createElement(document)),this.isGround=!0,this._childElementContainer=this.element,this._containerElement=i;let n=null;for(;;){const t=n?n.previousSibling:this._containerElement.lastChild;if(!(t instanceof Element&&t.classList.contains(\"lm_content\")))break;n=t}this._containerElement.insertBefore(this.element,n)}init(){if(!0!==this.isInitialised){this.updateNodeSize();for(let t=0;t0?this.contentItems[0]:this,n.isComponent)throw new Error(\"Cannot add item as child to ComponentItem\");{const t=this.layoutManager.createAndInitContentItem(i,n);return e=n.addChild(t,e),n===this?-1:e}}loadComponentAsRoot(t){this.clearRoot();const e=Ct.resolve(t,!1);if(e.maximised)throw new Error(\"Root Component cannot be maximised\");{const t=new jt(this.layoutManager,e,this);t.init(),this.addChild(t,0)}}addChild(t,e){if(this.contentItems.length>0)throw new Error(\"Ground node can only have a single child\");return this._childElementContainer.appendChild(t.element),e=super.addChild(t,e),this.updateSize(!1),this.emitBaseBubblingEvent(\"stateChanged\"),e}calculateConfigContent(){const t=this.contentItems,e=t.length,i=new Array(e);for(let n=0;n0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e)),this.updateContentItemsSize(!1))}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}createSideAreas(){const t=Yt.Area.oppositeSides,e=new Array(Object.keys(t).length);let i=0;for(const n in t){const o=n,s=this.getElementArea();if(null===s)throw new K(\"RCSA77553\");s.side=o,\"2\"===t[o][1]?s[o]=s[t[o]]-50:s[o]=s[t[o]]+50,s.surface=(s.x2-s.x1)*(s.y2-s.y1),e[i++]=s}return e}highlightDropZone(t,e,i){this.layoutManager.tabDropPlaceholder.remove(),super.highlightDropZone(t,e,i)}onDrop(t,e){if(t.isComponent){const e=ut.createDefault(),i=t;e.header=mt.Header.createCopy(i.headerConfig);const n=this.layoutManager.createAndInitContentItem(e,this);n.addChild(t),t=n}if(0===this.contentItems.length)this.addChild(t);else{if(t.type===at.row||t.type===at.column){const e=ut.createDefault(),i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}const i=\"x\"==e.side[0]?at.row:at.column,n=\"2\"==e.side[1],o=this.contentItems[0];if(o instanceof Xt&&o.type===i){const e=o.contentItems[n?0:o.contentItems.length-1];o.addChild(t,n?0:void 0,!0),e.size*=.5,t.size=e.size,t.sizeUnit=ht.Percent,o.updateSize(!1)}else{const e=ct.createDefault(i),s=this.layoutManager.createContentItem(e,this);this.replaceChild(o,s),s.addChild(t,n?0:void 0,!0),s.addChild(o,n?void 0:0,!0),o.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}}dock(){throw new X(\"GID87731\")}validateDocking(){throw new X(\"GIVD87732\")}getAllContentItems(){const t=[this];return this.deepGetAllContentItems(this.contentItems,t),t}getConfigMaximisedItems(){const t=[];return this.deepFilterContentItems(this.contentItems,t,(t=>!(!Gt.isStack(t)||!t.initialWantMaximise)||!(!Gt.isComponentItem(t)||!t.initialWantMaximise))),t}getItemsByPopInParentId(t){const e=[];return this.deepFilterContentItems(this.contentItems,e,(e=>e.popInParentIds.includes(t))),e}toConfig(){throw new Error(\"Cannot generate GroundItem config\")}setActiveComponentItem(t,e,i){}updateNodeSize(){const{width:t,height:e}=kt(this._containerElement);Tt(this.element,t),At(this.element,e),this.contentItems.length>0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e))}deepGetAllContentItems(t,e){for(let i=0;ithis.onClick(t),this._touchStartEventListener=t=>this.onTouchStart(t),this._element=document.createElement(\"div\"),this._element.classList.add(i),this._element.title=e,this._header.on(\"destroy\",(()=>this.destroy())),this._element.addEventListener(\"click\",this._clickEventListener,{passive:!0}),this._element.addEventListener(\"touchstart\",this._touchStartEventListener,{passive:!0}),this._header.controlsContainerElement.appendChild(this._element)}get element(){return this._element}destroy(){var t;this._element.removeEventListener(\"click\",this._clickEventListener),this._element.removeEventListener(\"touchstart\",this._touchStartEventListener),null===(t=this._element.parentNode)||void 0===t||t.removeChild(this._element)}onClick(t){this._pushEvent(t)}onTouchStart(t){this._pushEvent(t)}}class Jt{constructor(t,e,i,n,o){var s;this._layoutManager=t,this._componentItem=e,this._closeEvent=i,this._focusEvent=n,this._dragStartEvent=o,this._isActive=!1,this._tabClickListener=t=>this.onTabClickDown(t),this._tabTouchStartListener=t=>this.onTabTouchStart(t),this._closeClickListener=()=>this.onCloseClick(),this._closeTouchStartListener=()=>this.onCloseTouchStart(),this._dragStartListener=(t,e)=>this.onDragStart(t,e),this._contentItemDestroyListener=()=>this.onContentItemDestroy(),this._tabTitleChangedListener=t=>this.setTitle(t),this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_tab\"),this._titleElement=document.createElement(\"span\"),this._titleElement.classList.add(\"lm_title\"),this._closeElement=document.createElement(\"div\"),this._closeElement.classList.add(\"lm_close_tab\"),this._element.appendChild(this._titleElement),this._element.appendChild(this._closeElement),e.isClosable?this._closeElement.style.display=\"\":this._closeElement.style.display=\"none\",this.setTitle(e.title),this._componentItem.on(\"titleChanged\",this._tabTitleChangedListener);(null!==(s=e.reorderEnabled)&&void 0!==s?s:this._layoutManager.layoutConfig.settings.reorderEnabled)&&this.enableReorder(),this._element.addEventListener(\"click\",this._tabClickListener,{passive:!0}),this._element.addEventListener(\"touchstart\",this._tabTouchStartListener,{passive:!0}),this._componentItem.isClosable?(this._closeElement.addEventListener(\"click\",this._closeClickListener,{passive:!0}),this._closeElement.addEventListener(\"touchstart\",this._closeTouchStartListener,{passive:!0})):(this._closeElement.remove(),this._closeElement=void 0),this._componentItem.setTab(this),this._layoutManager.emit(\"tabCreated\",this)}get isActive(){return this._isActive}get componentItem(){return this._componentItem}get contentItem(){return this._componentItem}get element(){return this._element}get titleElement(){return this._titleElement}get closeElement(){return this._closeElement}get reorderEnabled(){return void 0!==this._dragListener}set reorderEnabled(t){t!==this.reorderEnabled&&(t?this.enableReorder():this.disableReorder())}setTitle(t){this._titleElement.innerText=t,this._element.title=t}setActive(t){t!==this._isActive&&(this._isActive=t,t?this._element.classList.add(\"lm_active\"):this._element.classList.remove(\"lm_active\"))}destroy(){var t,e;this._closeEvent=void 0,this._focusEvent=void 0,this._dragStartEvent=void 0,this._element.removeEventListener(\"click\",this._tabClickListener),this._element.removeEventListener(\"touchstart\",this._tabTouchStartListener),null===(t=this._closeElement)||void 0===t||t.removeEventListener(\"click\",this._closeClickListener),null===(e=this._closeElement)||void 0===e||e.removeEventListener(\"touchstart\",this._closeTouchStartListener),this._componentItem.off(\"titleChanged\",this._tabTitleChangedListener),this.reorderEnabled&&this.disableReorder(),this._element.remove()}setBlurred(){this._element.classList.remove(\"lm_focused\"),this._titleElement.classList.remove(\"lm_focused\")}setFocused(){this._element.classList.add(\"lm_focused\"),this._titleElement.classList.add(\"lm_focused\")}onDragStart(t,e){if(void 0===this._dragListener)throw new J(\"TODSDLU10093\");if(void 0===this._dragStartEvent)throw new J(\"TODS23309\");this._dragStartEvent(t,e,this._dragListener,this.componentItem)}onContentItemDestroy(){void 0!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=void 0)}onTabClickDown(t){const e=t.target;e!==this._element&&e!==this._titleElement||(0===t.button?this.notifyFocus():1===t.button&&this._componentItem.isClosable&&this.notifyClose())}onTabTouchStart(t){t.target===this._element&&this.notifyFocus()}onCloseClick(){this.notifyClose()}onCloseTouchStart(){this.notifyClose()}notifyClose(){if(void 0===this._closeEvent)throw new J(\"TNC15007\");this._closeEvent(this._componentItem)}notifyFocus(){if(void 0===this._focusEvent)throw new J(\"TNA15007\");this._focusEvent(this._componentItem)}enableReorder(){this._dragListener=new Zt(this._element,[this._titleElement]),this._dragListener.on(\"dragStart\",this._dragStartListener),this._componentItem.on(\"destroy\",this._contentItemDestroyListener)}disableReorder(){if(void 0===this._dragListener)throw new J(\"TDR87745\");this._componentItem.off(\"destroy\",this._contentItemDestroyListener),this._dragListener.off(\"dragStart\",this._dragStartListener),this._dragListener=void 0}}class Qt{constructor(t,e,i,n,o){this._layoutManager=t,this._componentRemoveEvent=e,this._componentFocusEvent=i,this._componentDragStartEvent=n,this._dropdownActiveChangedEvent=o,this._tabs=[],this._lastVisibleTabIndex=-1,this._dropdownActive=!1,this._element=document.createElement(\"section\"),this._element.classList.add(\"lm_tabs\"),this._dropdownElement=document.createElement(\"section\"),this._dropdownElement.classList.add(\"lm_tabdropdown_list\"),this._dropdownElement.style.display=\"none\"}get tabs(){return this._tabs}get tabCount(){return this._tabs.length}get lastVisibleTabIndex(){return this._lastVisibleTabIndex}get element(){return this._element}get dropdownElement(){return this._dropdownElement}get dropdownActive(){return this._dropdownActive}destroy(){for(let t=0;tthis.handleTabCloseEvent(t)),(t=>this.handleTabFocusEvent(t)),((t,e,i,n)=>this.handleTabDragStartEvent(t,e,i,n)));void 0===e&&(e=this._tabs.length),this._tabs.splice(e,0,i),ethis._lastVisibleTabIndex){const t=this._tabs[e];for(let t=e;t>0;t--)this._tabs[t]=this._tabs[t-1];this._tabs[0]=t}}updateTabSizes(t,e){let i=!1;this.tryUpdateTabSizes(i,t,e)||(i=!0,this.tryUpdateTabSizes(i,t,e)),i!==this._dropdownActive&&(this._dropdownActive=i,this._dropdownActiveChangedEvent())}tryUpdateTabSizes(t,e,i){if(this._tabs.length>0){if(void 0===i)throw new Error(\"non-empty tabs must have active component item\");let n=0,o=!1;const s=this._layoutManager.layoutConfig.settings.tabOverlapAllowance,r=this._tabs.indexOf(i.tab),a=this._tabs[r];this._lastVisibleTabIndex=-1;for(let i=0;ie){if(o)i===r&&(l.style.zIndex=\"auto\",l.style.marginLeft=\"\",l.parentElement!==this._element&&this._element.appendChild(l));else{let t;if(t=r>0&&r<=i?(d-e)/(i-1):(d-e)/i,tthis.onClick(t),this._touchStartListener=t=>this.onTouchStart(t),this._rowColumnClosable=!0,this._closeButton=null,this._popoutButton=null,this._tabsContainer=new Qt(this._layoutManager,(t=>this.handleTabInitiatedComponentRemoveEvent(t)),(t=>this.handleTabInitiatedComponentFocusEvent(t)),((t,e,i,n)=>this.handleTabInitiatedDragStartEvent(t,e,i,n)),(()=>this.processTabDropdownActiveChanged())),this._show=i.show,this._popoutEnabled=i.popoutEnabled,this._popoutLabel=i.popoutLabel,this._maximiseEnabled=i.maximiseEnabled,this._maximiseLabel=i.maximiseLabel,this._minimiseEnabled=i.minimiseEnabled,this._minimiseLabel=i.minimiseLabel,this._closeEnabled=i.closeEnabled,this._closeLabel=i.closeLabel,this._tabDropdownEnabled=i.tabDropdownEnabled,this._tabDropdownLabel=i.tabDropdownLabel,this.setSide(i.side),this._canRemoveComponent=this._configClosable,this._element=document.createElement(\"section\"),this._element.classList.add(\"lm_header\"),this._controlsContainerElement=document.createElement(\"section\"),this._controlsContainerElement.classList.add(\"lm_controls\"),this._element.appendChild(this._tabsContainer.element),this._element.appendChild(this._controlsContainerElement),this._element.appendChild(this._tabsContainer.dropdownElement),this._element.addEventListener(\"click\",this._clickListener,{passive:!0}),this._element.addEventListener(\"touchstart\",this._touchStartListener,{passive:!0}),this._documentMouseUpListener=()=>this._tabsContainer.hideAdditionalTabsDropdown(),globalThis.document.addEventListener(\"mouseup\",this._documentMouseUpListener,{passive:!0}),this._tabControlOffset=this._layoutManager.layoutConfig.settings.tabControlOffset,this._tabDropdownEnabled&&(this._tabDropdownButton=new Kt(this,this._tabDropdownLabel,\"lm_tabdropdown\",(()=>this._tabsContainer.showAdditionalTabsDropdown()))),this._popoutEnabled&&(this._popoutButton=new Kt(this,this._popoutLabel,\"lm_popout\",(()=>this.handleButtonPopoutEvent()))),this._maximiseEnabled&&(this._maximiseButton=new Kt(this,this._maximiseLabel,\"lm_maximise\",(t=>this.handleButtonMaximiseToggleEvent(t)))),this._configClosable&&(this._closeButton=new Kt(this,this._closeLabel,\"lm_close\",(()=>s()))),this.processTabDropdownActiveChanged()}get show(){return this._show}get side(){return this._side}get leftRightSided(){return this._leftRightSided}get layoutManager(){return this._layoutManager}get parent(){return this._parent}get tabs(){return this._tabsContainer.tabs}get lastVisibleTabIndex(){return this._tabsContainer.lastVisibleTabIndex}get element(){return this._element}get tabsContainerElement(){return this._tabsContainer.element}get controlsContainerElement(){return this._controlsContainerElement}destroy(){this.emit(\"destroy\"),this._popoutEvent=void 0,this._maximiseToggleEvent=void 0,this._clickEvent=void 0,this._touchStartEvent=void 0,this._componentRemoveEvent=void 0,this._componentFocusEvent=void 0,this._componentDragStartEvent=void 0,this._tabsContainer.destroy(),globalThis.document.removeEventListener(\"mouseup\",this._documentMouseUpListener),this._element.remove()}createTab(t,e){this._tabsContainer.createTab(t,e)}removeTab(t){this._tabsContainer.removeTab(t)}processActiveComponentChanged(t){this._tabsContainer.processActiveComponentChanged(t),this.updateTabSizes()}setSide(t){this._side=t,this._leftRightSided=[nt.right,nt.left].includes(this._side)}setRowColumnClosable(t){this._rowColumnClosable=t,this.updateClosability()}updateClosability(){let t;if(this._configClosable)if(this._rowColumnClosable){t=!0;const e=this.tabs.length;for(let i=0;i1}applyFocusedValue(t){t?this._element.classList.add(\"lm_focused\"):this._element.classList.remove(\"lm_focused\")}processMaximised(){if(void 0===this._maximiseButton)throw new J(\"HPMAX16997\");this._maximiseButton.element.setAttribute(\"title\",this._minimiseLabel)}processMinimised(){if(void 0===this._maximiseButton)throw new J(\"HPMIN16997\");this._maximiseButton.element.setAttribute(\"title\",this._maximiseLabel)}updateTabSizes(){if(this._tabsContainer.tabCount>0){const t=this._show?this._layoutManager.layoutConfig.dimensions.headerHeight:0;let e;this._leftRightSided?(this._element.style.height=\"\",this._element.style.width=zt(t)):(this._element.style.width=\"\",this._element.style.height=zt(t)),e=this._leftRightSided?this._element.offsetHeight-this._controlsContainerElement.offsetHeight-this._tabControlOffset:this._element.offsetWidth-this._controlsContainerElement.offsetWidth-this._tabControlOffset,this._tabsContainer.updateTabSizes(e,this._getActiveComponentItemEvent())}}handleTabInitiatedComponentRemoveEvent(t){if(this._canRemoveComponent){if(void 0===this._componentRemoveEvent)throw new J(\"HHTCE22294\");this._componentRemoveEvent(t)}}handleTabInitiatedComponentFocusEvent(t){if(void 0===this._componentFocusEvent)throw new J(\"HHTAE22294\");this._componentFocusEvent(t)}handleTabInitiatedDragStartEvent(t,e,i,n){if(this._canRemoveComponent){if(void 0===this._componentDragStartEvent)throw new J(\"HHTDSE22294\");this._componentDragStartEvent(t,e,i,n)}else i.cancelDrag()}processTabDropdownActiveChanged(){void 0!==this._tabDropdownButton&&Dt(this._tabDropdownButton.element,this._tabsContainer.dropdownActive)}handleButtonPopoutEvent(){if(this._layoutManager.layoutConfig.settings.popoutWholeStack){if(void 0===this._popoutEvent)throw new J(\"HHBPOE17834\");this._popoutEvent()}else{const t=this._getActiveComponentItemEvent();t&&t.popout()}}handleButtonMaximiseToggleEvent(t){if(void 0===this._maximiseToggleEvent)throw new J(\"HHBMTE16834\");this._maximiseToggleEvent()}onClick(t){t.target===this._element&&this.notifyClick(t)}onTouchStart(t){t.target===this._element&&this.notifyTouchStart(t)}notifyClick(t){if(void 0===this._clickEvent)throw new J(\"HNHC46834\");this._clickEvent(t)}notifyTouchStart(t){if(void 0===this._touchStartEvent)throw new J(\"HNHTS46834\");this._touchStartEvent(t)}}class ee extends $t{constructor(t,e,i){var n,o,s,r,a,l,h,d,c,m,u,p,g,f,v,_,y,C,w;super(t,e,i,ee.createElement(document)),this._headerSideChanged=!1,this._resizeListener=()=>this.handleResize(),this._maximisedListener=()=>this.handleMaximised(),this._minimisedListener=()=>this.handleMinimised(),this._headerConfig=e.header;const I=t.layoutConfig.header,b=e.content;let S;if(1!==b.length)S=void 0;else{S=b[0].header}this._initialWantMaximise=e.maximised,this._initialActiveItemIndex=null!==(n=e.activeItemIndex)&&void 0!==n?n:0;const E=null!==(r=null!==(s=null===(o=this._headerConfig)||void 0===o?void 0:o.show)&&void 0!==s?s:null==S?void 0:S.show)&&void 0!==r?r:I.show,x=null!==(h=null!==(l=null===(a=this._headerConfig)||void 0===a?void 0:a.popout)&&void 0!==l?l:null==S?void 0:S.popout)&&void 0!==h?h:I.popout,L=null!==(m=null!==(c=null===(d=this._headerConfig)||void 0===d?void 0:d.maximise)&&void 0!==c?c:null==S?void 0:S.maximise)&&void 0!==m?m:I.maximise,z=null!==(g=null!==(p=null===(u=this._headerConfig)||void 0===u?void 0:u.close)&&void 0!==p?p:null==S?void 0:S.close)&&void 0!==g?g:I.close,M=null!==(_=null!==(v=null===(f=this._headerConfig)||void 0===f?void 0:f.minimise)&&void 0!==v?v:null==S?void 0:S.minimise)&&void 0!==_?_:I.minimise,P=null!==(w=null!==(C=null===(y=this._headerConfig)||void 0===y?void 0:y.tabDropdown)&&void 0!==C?C:null==S?void 0:S.tabDropdown)&&void 0!==w?w:I.tabDropdown;this._maximisedEnabled=!1!==L;const T={show:!1!==E,side:!1===E?nt.top:E,popoutEnabled:!1!==x,popoutLabel:!1===x?\"\":x,maximiseEnabled:this._maximisedEnabled,maximiseLabel:!1===L?\"\":L,closeEnabled:!1!==z,closeLabel:!1===z?\"\":z,minimiseEnabled:!0,minimiseLabel:M,tabDropdownEnabled:!1!==P,tabDropdownLabel:!1===P?\"\":P};this._header=new te(t,this,T,e.isClosable&&!1!==z,(()=>this.getActiveComponentItem()),(()=>this.remove()),(()=>this.handlePopoutEvent()),(()=>this.toggleMaximise()),(t=>this.handleHeaderClickEvent(t)),(t=>this.handleHeaderTouchStartEvent(t)),(t=>this.handleHeaderComponentRemoveEvent(t)),(t=>this.handleHeaderComponentFocusEvent(t)),((t,e,i,n)=>this.handleHeaderComponentStartDragEvent(t,e,i,n))),this.isStack=!0,this._childElementContainer=document.createElement(\"section\"),this._childElementContainer.classList.add(\"lm_items\"),this.on(\"resize\",this._resizeListener),this._maximisedEnabled&&(this.on(\"maximised\",this._maximisedListener),this.on(\"minimised\",this._minimisedListener)),this.element.appendChild(this._header.element),this.element.appendChild(this._childElementContainer),this.setupHeaderPosition(),this._header.updateClosability()}get childElementContainer(){return this._childElementContainer}get header(){return this._header}get headerShow(){return this._header.show}get headerSide(){return this._header.side}get headerLeftRightSided(){return this._header.leftRightSided}get contentAreaDimensions(){return this._contentAreaDimensions}get initialWantMaximise(){return this._initialWantMaximise}get isMaximised(){return this===this.layoutManager.maximisedStack}get stackParent(){if(!this.parent)throw new Error(\"Stack should always have a parent\");return this.parent}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}init(){if(!0===this.isInitialised)return;this.updateNodeSize();for(let t=0;t0){if(this._initialActiveItemIndex<0||this._initialActiveItemIndex>=e)throw new Error(`ActiveItemIndex out of range: ${this._initialActiveItemIndex} id: ${this.id}`);for(let i=0;ithis.contentItems.length)throw e-=1,new X(\"SAC99728\");if(t instanceof jt)return e=super.addChild(t,e),this._childElementContainer.appendChild(t.element),this._header.createTab(t,e),this.setActiveComponentItem(t,i),this._header.updateTabSizes(),this.updateSize(!1),t.container.setBaseLogicalZIndex(),this._header.updateClosability(),this.emitStateChangedEvent(),e;throw new X(\"SACC88532\")}removeChild(t,e){const i=t,n=this.contentItems.indexOf(i),o=1===this.contentItems.length;if(this._activeComponentItem===i&&(i.focused&&i.blur(),!o)){const t=0===n?1:n-1;this.setActiveComponentItem(this.contentItems[t],!1)}this._header.removeTab(i),super.removeChild(i,e),o||this._header.updateClosability(),this.emitStateChangedEvent()}toggleMaximise(){this.isMaximised?this.minimise():this.maximise()}maximise(){if(!this.isMaximised){this.layoutManager.setMaximisedStack(this);const t=this.contentItems,e=t.length;for(let i=0;i0&&void 0===t)throw new Error(\"expected non-empty stack to have an active component item\");return{type:\"stack\",content:this.calculateConfigContent(),size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,isClosable:this.isClosable,maximised:this.isMaximised,header:this.createHeaderConfig(),activeItemIndex:t}}onDrop(t,e){if(\"header\"===this._dropSegment){if(this.resetHeaderDropZone(),void 0===this._dropIndex)throw new J(\"SODDI68990\");return void this.addChild(t,this._dropIndex)}if(\"body\"===this._dropSegment)return void this.addChild(t,0,!0);const i=\"top\"===this._dropSegment||\"bottom\"===this._dropSegment,n=\"left\"===this._dropSegment||\"right\"===this._dropSegment,o=\"top\"===this._dropSegment||\"left\"===this._dropSegment,s=i&&this.stackParent.isColumn||n&&this.stackParent.isRow;if(t.isComponent){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createAndInitContentItem(e,this);i.addChild(t),t=i}if(t.type===at.row||t.type===at.column){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}if(s){const e=this.stackParent.contentItems.indexOf(this);this.stackParent.addChild(t,o?e:e+1,!0),this.size*=.5,t.size=this.size,t.sizeUnit=this.sizeUnit,this.stackParent.updateSize(!1)}else{const e=i?at.column:at.row,n=ct.createDefault(e),s=this.layoutManager.createContentItem(n,this);this.stackParent.replaceChild(this,s),s.addChild(t,o?0:void 0,!0),s.addChild(this,o?void 0:0,!0),this.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}highlightDropZone(t,e){for(const i in this._contentAreaDimensions){const n=i,o=this._contentAreaDimensions[n].hoverArea;if(o.x1t&&o.y1e)return void(\"header\"===n?(this._dropSegment=\"header\",this.highlightHeaderDropZone(this._header.leftRightSided?e:t)):(this.resetHeaderDropZone(),this.highlightBodyDropZone(n)))}}getArea(){if(\"none\"===this.element.style.display)return null;const t=super.getElementArea(this._header.element),e=super.getElementArea(this._childElementContainer);if(null===t||null===e)throw new K(\"SGAHC13086\");const i=e.x2-e.x1,n=e.y2-e.y1;return this._contentAreaDimensions={header:{hoverArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2},highlightArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2}}},0===this.contentItems.length?(this._contentAreaDimensions.body={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2}},super.getElementArea(this.element)):(this._contentAreaDimensions.left={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x1+.25*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x1+.5*i,y2:e.y2}},this._contentAreaDimensions.top={hoverArea:{x1:e.x1+.25*i,y1:e.y1,x2:e.x1+.75*i,y2:e.y1+.5*n},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y1+.5*n}},this._contentAreaDimensions.right={hoverArea:{x1:e.x1+.75*i,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1+.5*i,y1:e.y1,x2:e.x2,y2:e.y2}},this._contentAreaDimensions.bottom={hoverArea:{x1:e.x1+.25*i,y1:e.y1+.5*n,x2:e.x1+.75*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1+.5*n,x2:e.x2,y2:e.y2}},super.getElementArea(this.element))}positionHeader(t){this._header.side!==t&&(this._header.setSide(t),this._headerSideChanged=!0,this.setupHeaderPosition())}updateNodeSize(){if(\"none\"!==this.element.style.display){const t=kt(this.element);if(this._header.show){t[this._header.leftRightSided?it.width:it.height]-=this.layoutManager.layoutConfig.dimensions.headerHeight}this._childElementContainer.style.width=zt(t.width),this._childElementContainer.style.height=zt(t.height);for(let e=0;e=o&&tthis.onDrag(t,e,i))),this._dragListener.on(\"dragStop\",(()=>this.onDrop())),this.createDragProxyElements(t,e),null===this._componentItem.parent)throw new K(\"DPC10097\");this._componentItemFocused=this._componentItem.focused,this._componentItemFocused&&this._componentItem.blur(),this._componentItem.parent.removeChild(this._componentItem,!0),this.setDimensions(),document.body.appendChild(this._element),this.determineMinMaxXY(),this._layoutManager.calculateItemAreas(),this.setDropPosition(t,e)}get element(){return this._element}createDragProxyElements(t,e){this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_dragProxy\");const i=document.createElement(\"div\");i.classList.add(\"lm_header\");const n=document.createElement(\"div\");n.classList.add(\"lm_tabs\");const o=document.createElement(\"div\");o.classList.add(\"lm_tab\");const s=document.createElement(\"span\");s.classList.add(\"lm_title\"),o.appendChild(s),n.appendChild(o),i.appendChild(n),this._proxyContainerElement=document.createElement(\"div\"),this._proxyContainerElement.classList.add(\"lm_content\"),this._element.appendChild(i),this._element.appendChild(this._proxyContainerElement),this._originalParent instanceof ee&&this._originalParent.headerShow&&(this._sided=this._originalParent.headerLeftRightSided,this._element.classList.add(\"lm_\"+this._originalParent.headerSide),[nt.right,nt.bottom].indexOf(this._originalParent.headerSide)>=0&&this._proxyContainerElement.insertAdjacentElement(\"afterend\",i)),this._element.style.left=zt(t),this._element.style.top=zt(e),o.setAttribute(\"title\",this._componentItem.title),s.insertAdjacentText(\"afterbegin\",this._componentItem.title),this._proxyContainerElement.appendChild(this._componentItem.element)}determineMinMaxXY(){const t=this._layoutManager.groundItem;if(void 0===t)throw new J(\"DPDMMXY73109\");{const e=t.element.getBoundingClientRect();this._minX=e.left+document.body.scrollLeft,this._minY=e.top+document.body.scrollTop,this._maxX=this._minX+e.width,this._maxY=this._minY+e.height}}onDrag(t,e,i){const n=i.pageX,o=i.pageY;this.setDropPosition(n,o),this._componentItem.drag()}setDropPosition(t,e){this._layoutManager.layoutConfig.settings.constrainDragToContainer&&(t<=this._minX?t=Math.ceil(this._minX):t>=this._maxX&&(t=Math.floor(this._maxX)),e<=this._minY?e=Math.ceil(this._minY):e>=this._maxY&&(e=Math.floor(this._maxY))),this._element.style.left=zt(t),this._element.style.top=zt(e),this._area=this._layoutManager.getArea(t,e),null!==this._area&&(this._lastValidArea=this._area,this._area.contentItem.highlightDropZone(t,e,this._area))}onDrop(){const t=this._layoutManager.dropTargetIndicator;if(null===t)throw new K(\"DPOD30011\");let e;if(t.hide(),this._componentItem.exitDragMode(),null!==this._area)e=this._componentItem,this._area.contentItem.onDrop(e,this._area);else if(null!==this._lastValidArea){e=this._componentItem;this._lastValidArea.contentItem.onDrop(e,this._lastValidArea)}else this._originalParent?(e=this._componentItem,this._originalParent.addChild(e)):this._componentItem.destroy();this._element.remove(),this._layoutManager.emit(\"itemDropped\",this._componentItem),this._componentItemFocused&&void 0!==e&&e.focus()}setDimensions(){const t=this._layoutManager.layoutConfig.dimensions;if(void 0===t)throw new Error(\"DragProxy.setDimensions: dimensions undefined\");let e=t.dragProxyWidth,i=t.dragProxyHeight;if(void 0===e||void 0===i)throw new Error(\"DragProxy.setDimensions: width and/or height undefined\");const n=!1===this._layoutManager.layoutConfig.header.show?0:t.headerHeight;this._element.style.width=zt(e),this._element.style.height=zt(i),e-=this._sided?n:0,i-=this._sided?0:n,this._proxyContainerElement.style.width=zt(e),this._proxyContainerElement.style.height=zt(i),this._componentItem.enterDragMode(e,i),this._componentItem.show()}}class ne{constructor(t,e,i,n,o,s,r){this._layoutManager=t,this._element=e,this._extraAllowableChildTargets=i,this._componentTypeOrFtn=n,this._componentState=o,this._title=s,this._id=r,this._dragListener=null,this._dummyGroundContainer=document.createElement(\"div\");const a=gt.createDefault(\"row\");this._dummyGroundContentItem=new Yt(this._layoutManager,a,this._dummyGroundContainer),this.createDragListener()}destroy(){this.removeDragListener()}createDragListener(){this.removeDragListener(),this._dragListener=new Zt(this._element,this._extraAllowableChildTargets),this._dragListener.on(\"dragStart\",((t,e)=>this.onDragStart(t,e))),this._dragListener.on(\"dragStop\",(()=>this.onDragStop()))}onDragStart(t,e){var i;const n=\"component\";let o;if(\"function\"==typeof this._componentTypeOrFtn){const t=this._componentTypeOrFtn();o=ne.isDragSourceComponentItemConfig(t)?{type:n,componentState:t.state,componentType:t.type,title:null!==(i=t.title)&&void 0!==i?i:this._title}:t}else o={type:n,componentState:this._componentState,componentType:this._componentTypeOrFtn,title:this._title,id:this._id};const s=bt.resolve(o,!1),r=new jt(this._layoutManager,s,this._dummyGroundContentItem);if(this._dummyGroundContentItem.contentItems.push(r),null===this._dragListener)throw new K(\"DSODSD66746\");{const i=new ie(t,e,this._dragListener,this._layoutManager,r,this._dummyGroundContentItem),n=this._layoutManager.transitionIndicator;if(null===n)throw new K(\"DSODST66746\");n.transitionElements(this._element,i.element)}}onDragStop(){this.createDragListener()}removeDragListener(){null!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=null)}}!function(t){t.isDragSourceComponentItemConfig=function(t){return!(\"componentType\"in t)}}(ne||(ne={}));class oe{constructor(){this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_dropTargetIndicator\");const t=document.createElement(\"div\");t.classList.add(\"lm_inner\"),this._element.appendChild(t),document.body.appendChild(this._element)}destroy(){this._element.remove()}highlightArea(t,e){this._element.style.left=zt(t.x1+e),this._element.style.top=zt(t.y1+e),this._element.style.width=zt(t.x2-t.x1-e),this._element.style.height=zt(t.y2-t.y1-e),this._element.style.display=\"block\"}hide(){Dt(this._element,!1)}}class se{constructor(){this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_transition_indicator\"),document.body.appendChild(this._element),this._toElement=null,this._fromDimensions=null,this._totalAnimationDuration=200,this._animationStartTime=null}destroy(){this._element.remove()}transitionElements(t,e){}nextAnimationFrame(){}measure(t){const e=t.getBoundingClientRect();return{left:e.left,top:e.top,width:t.offsetWidth,height:t.offsetHeight}}}class re extends Wt{constructor(t){super(),this._layoutManager=t,this._childEventListener=t=>this.onEventFromChild(t),globalThis.addEventListener(re.ChildEventName,this._childEventListener,{passive:!0})}emit(t,...e){\"userBroadcast\"===t?this.emitUserBroadcast(...e):super.emit(t,...e)}emitUserBroadcast(...t){this.handleUserBroadcastEvent(\"userBroadcast\",t)}destroy(){globalThis.removeEventListener(re.ChildEventName,this._childEventListener)}handleUserBroadcastEvent(t,e){this._layoutManager.isSubWindow?this.propagateToParent(t,e):this.propagateToThisAndSubtree(t,e)}onEventFromChild(t){const e=t.detail;this.handleUserBroadcastEvent(e.eventName,e.args)}propagateToParent(t,e){const i={bubbles:!0,cancelable:!0,detail:{layoutManager:this._layoutManager,eventName:t,args:e}},n=new CustomEvent(re.ChildEventName,i),o=globalThis.opener;if(null===o)throw new K(\"EHPTP15778\");o.dispatchEvent(n)}propagateToThisAndSubtree(t,e){this.emitUnknown(t,...e);for(let i=0;ithis.handleContainerResize())),this._windowBeforeUnloadListener=()=>this.onBeforeUnload(),this._windowBeforeUnloadListening=!1,this._maximisedStackBeforeDestroyedListener=t=>this.cleanupBeforeMaximisedStackDestroyed(t),this.isSubWindow=t.isSubWindow,this._constructorOrSubWindowLayoutConfig=t.constructorOrSubWindowLayoutConfig,Q.checkInitialise(),dt.checkInitialise(),void 0!==t.containerElement&&(this._containerElement=t.containerElement)}get container(){return this._containerElement}get isInitialised(){return this._isInitialised}get groundItem(){return this._groundItem}get root(){return this._groundItem}get openPopouts(){return this._openPopouts}get dropTargetIndicator(){return this._dropTargetIndicator}get transitionIndicator(){return this._transitionIndicator}get width(){return this._width}get height(){return this._height}get eventHub(){return this._eventHub}get rootItem(){if(void 0===this._groundItem)throw new Error(\"Cannot access rootItem before init\");return 0===this._groundItem.contentItems.length?void 0:this._groundItem.contentItems[0]}get focusedComponentItem(){return this._focusedComponentItem}get tabDropPlaceholder(){return this._tabDropPlaceholder}get maximisedStack(){return this._maximisedStack}get deprecatedConstructor(){return!this.isSubWindow&&void 0!==this._constructorOrSubWindowLayoutConfig}destroy(){if(this._isInitialised){this._windowBeforeUnloadListening&&(globalThis.removeEventListener(\"beforeunload\",this._windowBeforeUnloadListener),this._windowBeforeUnloadListening=!1),!0===this.layoutConfig.settings.closePopoutsOnUnload&&this.closeAllOpenPopouts(),this._resizeObserver.disconnect(),this.checkClearResizeTimeout(),void 0!==this._groundItem&&this._groundItem.destroy(),this._tabDropPlaceholder.remove(),null!==this._dropTargetIndicator&&this._dropTargetIndicator.destroy(),null!==this._transitionIndicator&&this._transitionIndicator.destroy(),this._eventHub.destroy();for(const t of this._dragSources)t.destroy();this._dragSources=[],this._isInitialised=!1}}minifyConfig(t){return _t.minifyConfig(t)}unminifyConfig(t){return _t.unminifyConfig(t)}init(){let t;if(this.setContainer(),this._dropTargetIndicator=new oe,this._transitionIndicator=new se,this.updateSizeFromContainer(),this.isSubWindow){if(void 0===this._constructorOrSubWindowLayoutConfig)throw new J(\"LMIU07155\");{const e=this._constructorOrSubWindowLayoutConfig.root;if(void 0===e)throw new X(\"LMIC07156\");if(!Ct.isComponent(e))throw new X(\"LMIC07157\");t=e;const i=xt.resolve(this._constructorOrSubWindowLayoutConfig);this.layoutConfig=Object.assign(Object.assign({},i),{root:void 0})}}else void 0===this._constructorOrSubWindowLayoutConfig?this.layoutConfig=_t.createDefault():this.layoutConfig=xt.resolve(this._constructorOrSubWindowLayoutConfig);const e=this.layoutConfig;this._groundItem=new Yt(this,e.root,this._containerElement),this._groundItem.init(),this.checkLoadedLayoutMaximiseItem(),this._resizeObserver.observe(this._containerElement),this._isInitialised=!0,this.adjustColumnsResponsive(),this.emit(\"initialised\"),void 0!==t&&this.loadComponentAsRoot(t)}loadLayout(t){if(!this.isInitialised)throw new Error(\"GoldenLayout: Need to call init() if LayoutConfig with defined root passed to constructor\");if(void 0===this._groundItem)throw new J(\"LMLL11119\");this.createSubWindows(),this.layoutConfig=xt.resolve(t),this._groundItem.loadRoot(this.layoutConfig.root),this.checkLoadedLayoutMaximiseItem(),this.adjustColumnsResponsive()}saveLayout(){if(!1===this._isInitialised)throw new Error(\"Can't create config, layout not yet initialised\");if(void 0===this._groundItem)throw new J(\"LMTC18244\");{const t=this._groundItem.calculateConfigContent();let e;e=1!==t.length?void 0:t[0],this.reconcilePopoutWindows();const i=[];for(let t=0;t=0?n=this._groundItem.contentItems[0]:e=0;break;case at.row:case at.column:e=n.addItem(t,i.index);break;case at.stack:if(Ct.isComponent(t)){e=n.addItem(t,i.index);break}throw Error(tt[6]);case at.component:throw new X(\"LMAIALC87444602\");default:throw new Y(\"LMAIALU98881733\",n.type)}if(Ct.isComponent(t)){const t=n.contentItems[e];Gt.isStack(t)&&(n=t,e=0)}return i.parentItem=n,i.index=e,i}}}loadComponentAsRoot(t){if(void 0===this._groundItem)throw new Error(\"Cannot add item before init\");this._groundItem.loadComponentAsRoot(t)}updateSize(t,e){this.setSize(t,e)}setSize(t,e){if(this._width=t,this._height=e,!0===this._isInitialised){if(void 0===this._groundItem)throw new J(\"LMUS18881\");if(this._groundItem.setSize(this._width,this._height),this._maximisedStack){const{width:t,height:e}=kt(this._containerElement);Tt(this._maximisedStack.element,t),At(this._maximisedStack.element,e),this._maximisedStack.updateSize(!1)}this.adjustColumnsResponsive()}}beginSizeInvalidation(){this._sizeInvalidationBeginCount++}endSizeInvalidation(){0==--this._sizeInvalidationBeginCount&&this.updateSizeFromContainer()}updateSizeFromContainer(){const{width:t,height:e}=kt(this._containerElement);this.setSize(t,e)}updateRootSize(t=!1){if(void 0===this._groundItem)throw new J(\"LMURS28881\");this._groundItem.updateSize(t)}createAndInitContentItem(t,e){const i=this.createContentItem(t,e);return i.init(),i}createContentItem(t,e){if(\"string\"!=typeof t.type)throw new G(\"Missing parameter 'type'\",JSON.stringify(t));if(ct.isComponentItem(t)&&!(e instanceof ee)&&e&&!(!0===this.isSubWindow&&e instanceof Yt)){t={type:at.stack,content:[t],size:t.size,sizeUnit:t.sizeUnit,minSize:t.minSize,minSizeUnit:t.minSizeUnit,id:t.id,maximised:t.maximised,isClosable:t.isClosable,activeItemIndex:0,header:void 0}}return this.createContentItemFromConfig(t,e)}findFirstComponentItemById(t){if(void 0===this._groundItem)throw new J(\"LMFFCIBI82446\");return this.findFirstContentItemTypeByIdRecursive(at.component,t,this._groundItem)}createPopout(t,e,i,n){return t instanceof Gt?this.createPopoutFromContentItem(t,e,i,n):this.createPopoutFromItemConfig(t,e,i,n)}createPopoutFromContentItem(t,e,i,n){let o=t.parent,s=t;for(;null!==o&&1===o.contentItems.length&&!o.isGround;)s=o,o=o.parent;if(null===o)throw new K(\"LMCPFCI00834\");{if(void 0===n&&(n=o.contentItems.indexOf(s)),null!==i&&o.addPopInParentId(i),void 0===e){const i=globalThis.screenX||globalThis.screenLeft,n=globalThis.screenY||globalThis.screenTop,o=t.element.offsetLeft,s=t.element.offsetTop,{width:r,height:a}=kt(t.element);e={left:i+o,top:n+s,width:r,height:a}}const r=t.toConfig();if(t.remove(),ft.isRootItemConfig(r))return this.createPopoutFromItemConfig(r,e,i,n);throw new Error(`${tt[0]}`)}}beginVirtualSizedContainerAdding(){0==++this._virtualSizedContainerAddingBeginCount&&(this._virtualSizedContainers.length=0)}addVirtualSizedContainer(t){this._virtualSizedContainers.push(t)}endVirtualSizedContainerAdding(){if(0==--this._virtualSizedContainerAddingBeginCount){const t=this._virtualSizedContainers.length;if(t>0){this.fireBeforeVirtualRectingEvent(t);for(let e=0;ethis.emit(\"windowOpened\",a))),a.on(\"closed\",(()=>this.reconcilePopoutWindows())),this._openPopouts.push(a),this.layoutConfig.settings.closePopoutsOnUnload&&!this._windowBeforeUnloadListening&&(globalThis.addEventListener(\"beforeunload\",this._windowBeforeUnloadListener,{passive:!0}),this._windowBeforeUnloadListening=!0),a}closeAllOpenPopouts(){for(let t=0;tglobalThis.close()),1)}getArea(t,e){let i=null,n=1/0;for(let o=0;o=s.x1&&t=s.y1&&es.surface&&(n=s.surface,i=s)}return i}calculateItemAreas(){const t=this.getAllContentItems(),e=this._groundItem;if(void 0===e)throw new J(\"LMCIAR44365\");if(1!==t.length){e.contentItems[0].isStack?this._itemAreas=[]:this._itemAreas=e.createSideAreas();for(let e=0;e0){let e=t[0];if(Gt.isComponentItem(e)){const t=e.parent;if(null===t)throw new K(\"LMXLLMI69999\");e=t}if(!Gt.isStack(e))throw new X(\"LMCLLMI19993\");e.maximise()}}}processMaximiseStack(t){if(this._maximisedStack=t,t.on(\"beforeItemDestroyed\",this._maximisedStackBeforeDestroyedListener),t.element.classList.add(\"lm_maximised\"),t.element.insertAdjacentElement(\"afterend\",this._maximisePlaceholder),void 0===this._groundItem)throw new J(\"LMMXI19993\");{this._groundItem.element.prepend(t.element);const{width:e,height:i}=kt(this._containerElement);Tt(t.element,e),At(t.element,i),t.updateSize(!0),t.focusActiveContentItem(),this._maximisedStack.emit(\"maximised\"),this.emit(\"stateChanged\")}}processMinimiseMaximisedStack(){if(void 0===this._maximisedStack)throw new X(\"LMMMS74422\");{const t=this._maximisedStack;if(null===t.parent)throw new K(\"LMMI13668\");t.element.classList.remove(\"lm_maximised\"),this._maximisePlaceholder.insertAdjacentElement(\"afterend\",t.element),this._maximisePlaceholder.remove(),this.updateRootSize(!0),this._maximisedStack=void 0,t.off(\"beforeItemDestroyed\",this._maximisedStackBeforeDestroyedListener),t.emit(\"minimised\"),this.emit(\"stateChanged\")}}reconcilePopoutWindows(){const t=[];for(let e=0;e{this._resizeTimeoutId=void 0,this.beginSizeInvalidation(),this.endSizeInvalidation()}),this.resizeDebounceInterval))}checkClearResizeTimeout(){void 0!==this._resizeTimeoutId&&(clearTimeout(this._resizeTimeoutId),this._resizeTimeoutId=void 0)}setContainer(){var t;const e=document.body,i=null!==(t=this._containerElement)&&void 0!==t?t:e;if(i===e){this.resizeWithContainerAutomatically=!0;const t=document.documentElement;t.style.height=\"100%\",t.style.margin=\"0\",t.style.padding=\"0\",t.style.overflow=\"clip\",e.style.height=\"100%\",e.style.margin=\"0\",e.style.padding=\"0\",e.style.overflow=\"clip\"}this._containerElement=i}onBeforeUnload(){this.destroy()}adjustColumnsResponsive(){if(void 0===this._groundItem)throw new J(\"LMACR20883\");if(this._firstLoad=!1,this.useResponsiveLayout()&&!this._updatingColumnsResponsive&&this._groundItem.contentItems.length>0&&this._groundItem.contentItems[0].isRow){if(void 0===this._groundItem||null===this._width)throw new J(\"LMACR77412\");{const t=this._groundItem.contentItems[0].contentItems.length;if(t<=1)return;{const e=this.layoutConfig.dimensions.defaultMinItemWidth;if(t*e<=this._width)return;{this._updatingColumnsResponsive=!0;const i=t-Math.max(Math.floor(this._width/e),1),n=this._groundItem.contentItems[0],o=this.getAllStacks();if(0===o.length)throw new X(\"LMACRS77413\");{const t=o[0];for(let e=0;en?void 0:{parentItem:t,index:o}}}case 1:if(void 0===this._focusedComponentItem)return;{const t=this._focusedComponentItem.parentItem;return this.tryCreateLocationFromParentItem(t,e)}case 2:{const t=this.findFirstContentItemType(at.stack);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 3:{let t=this.findFirstContentItemType(at.row);return void 0!==t?this.tryCreateLocationFromParentItem(t,e):(t=this.findFirstContentItemType(at.column),void 0!==t?this.tryCreateLocationFromParentItem(t,e):void 0)}case 4:{const t=this.findFirstContentItemType(at.row);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 5:{const t=this.findFirstContentItemType(at.column);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 6:if(void 0===this._groundItem)throw new J(\"LMFLRIF18244\");return void 0!==this.rootItem?void 0:void 0===e||0===e?{parentItem:this._groundItem,index:0}:void 0;case 7:if(void 0===this._groundItem)throw new J(\"LMFLF18244\");{const t=this._groundItem.contentItems;if(0===t.length)return void 0===e||0===e?{parentItem:this._groundItem,index:0}:void 0;{const i=t[0];return this.tryCreateLocationFromParentItem(i,e)}}}}tryCreateLocationFromParentItem(t,e){const i=t.contentItems.length;return void 0===e?{parentItem:t,index:i}:e<0||e>i?void 0:{parentItem:t,index:e}}}!function(t){t.createMaximisePlaceElement=function(t){const e=t.createElement(\"div\");return e.classList.add(\"lm_maximise_place\"),e},t.createTabDropPlaceholderElement=function(t){const e=t.createElement(\"div\");return e.classList.add(\"lm_drop_tab_placeholder\"),e},t.defaultLocationSelectors=[{typeId:1,index:void 0},{typeId:2,index:void 0},{typeId:3,index:void 0},{typeId:7,index:void 0}],t.afterFocusedItemIfPossibleLocationSelectors=[{typeId:0,index:1},{typeId:2,index:void 0},{typeId:3,index:void 0},{typeId:7,index:void 0}]}(ae||(ae={}));class le extends ae{constructor(t,e,i,n){if(super(le.createLayoutManagerConstructorParameters(t,e)),this._bindComponentEventHanlderPassedInConstructor=!1,this._creationTimeoutPassed=!1,void 0!==e&&\"function\"==typeof e&&(this.bindComponentEvent=e,this._bindComponentEventHanlderPassedInConstructor=!0,void 0!==i&&(this.unbindComponentEvent=i)),!this._bindComponentEventHanlderPassedInConstructor&&this.isSubWindow){if(void 0===this._constructorOrSubWindowLayoutConfig)throw new J(\"VLC98823\");{const t=xt.resolve(this._constructorOrSubWindowLayoutConfig);this.layoutConfig=Object.assign(Object.assign({},t),{root:void 0})}}!0!==n&&(this.deprecatedConstructor||this.init())}destroy(){this.bindComponentEvent=void 0,this.unbindComponentEvent=void 0,super.destroy()}init(){if(this._bindComponentEventHanlderPassedInConstructor||\"loading\"!==document.readyState&&null!==document.body){if(!this._bindComponentEventHanlderPassedInConstructor&&!0===this.isSubWindow&&!this._creationTimeoutPassed)return setTimeout((()=>this.init()),7),void(this._creationTimeoutPassed=!0);!0===this.isSubWindow&&(this._bindComponentEventHanlderPassedInConstructor||this.clearHtmlAndAdjustStylesForSubWindow(),window.__glInstance=this),super.init()}else document.addEventListener(\"DOMContentLoaded\",(()=>this.init()),{passive:!0})}clearHtmlAndAdjustStylesForSubWindow(){const t=document.head,e=new Array(4);e[0]=document.querySelectorAll(\"body link\"),e[1]=document.querySelectorAll(\"body style\"),e[2]=document.querySelectorAll(\"template\"),e[3]=document.querySelectorAll(\".gl_keep\");for(let i=0;ithis.emit(\"popIn\"))),document.body.appendChild(t),!0}}bindComponent(t,e){if(void 0!==this.bindComponentEvent){return this.bindComponentEvent(t,e)}if(void 0!==this.getComponentEvent)return{virtual:!1,component:this.getComponentEvent(t,e)};{const t=`${tt[2]}: ${JSON.stringify(e)}`;throw new Z(t)}}unbindComponent(t,e,i){if(void 0!==this.unbindComponentEvent)this.unbindComponentEvent(t);else if(!e&&void 0!==this.releaseComponentEvent){if(void 0===i)throw new J(\"VCUCRCU333998\");this.releaseComponentEvent(t,i)}}}!function(t){let e=!1;t.createLayoutManagerConstructorParameters=function(t,i){const n=e?null:new URL(document.location.href).searchParams.get(\"gl-window\");e=!0;const o=null!==n;let s,r;if(null!==n){const e=localStorage.getItem(n);if(null===e)throw new Error(\"Null gl-window Config\");localStorage.removeItem(n);const i=JSON.parse(e),o=_t.unminifyConfig(i);r=xt.fromResolved(o),t instanceof HTMLElement&&(s=t)}else void 0===t?r=void 0:t instanceof HTMLElement?(r=void 0,s=t):r=t,void 0===s&&i instanceof HTMLElement&&(s=i);return{constructorOrSubWindowLayoutConfig:r,isSubWindow:o,containerElement:s}}}(le||(le={}));class he extends le{constructor(t,e,i){super(t,e,i,!0),this._componentTypesMap=new Map,this._registeredComponentMap=new Map,this._virtuableComponentMap=new Map,this._containerVirtualRectingRequiredEventListener=(t,e,i)=>this.handleContainerVirtualRectingRequiredEvent(t,e,i),this._containerVirtualVisibilityChangeRequiredEventListener=(t,e)=>this.handleContainerVirtualVisibilityChangeRequiredEvent(t,e),this._containerVirtualZIndexChangeRequiredEventListener=(t,e,i)=>this.handleContainerVirtualZIndexChangeRequiredEvent(t,e,i),this.deprecatedConstructor||this.init()}registerComponent(t,e,i=!1){if(\"function\"!=typeof e)throw new $(\"registerComponent() componentConstructorOrFactoryFtn parameter is not a function\");if(e.hasOwnProperty(\"prototype\")){const n=e;this.registerComponentConstructor(t,n,i)}else{const n=e;this.registerComponentFactoryFunction(t,n,i)}}registerComponentConstructor(t,e,i=!1){if(\"function\"!=typeof e)throw new Error(tt[1]);if(void 0!==this._componentTypesMap.get(t))throw new Z(`${tt[3]}: ${t}`);this._componentTypesMap.set(t,{constructor:e,factoryFunction:void 0,virtual:i})}registerComponentFactoryFunction(t,e,i=!1){if(\"function\"!=typeof e)throw new Z(\"Please register a constructor function\");if(void 0!==this._componentTypesMap.get(t))throw new Z(`${tt[3]}: ${t}`);this._componentTypesMap.set(t,{constructor:void 0,factoryFunction:e,virtual:i})}registerComponentFunction(t){this.registerGetComponentConstructorCallback(t)}registerGetComponentConstructorCallback(t){if(\"function\"!=typeof t)throw new Error(\"Please register a callback function\");void 0!==this._getComponentConstructorFtn&&console.warn(\"Multiple component functions are being registered. Only the final registered function will be used.\"),this._getComponentConstructorFtn=t}getRegisteredComponentTypeNames(){const t=this._componentTypesMap.keys();return Array.from(t)}getComponentInstantiator(t){let e;const i=pt.resolveComponentTypeName(t);return void 0!==i&&(e=this._componentTypesMap.get(i)),void 0===e&&void 0!==this._getComponentConstructorFtn&&(e={constructor:this._getComponentConstructorFtn(t),factoryFunction:void 0,virtual:!1}),e}bindComponent(t,e){let i;const n=pt.resolveComponentTypeName(e);let o;if(void 0!==n&&(i=this._componentTypesMap.get(n)),void 0===i&&void 0!==this._getComponentConstructorFtn&&(i={constructor:this._getComponentConstructorFtn(e),factoryFunction:void 0,virtual:!1}),void 0!==i){const s=i.virtual;let r,a;r=void 0===e.componentState?void 0:Ut({},e.componentState);const l=i.constructor;if(void 0!==l)a=new l(t,r,s);else{const e=i.factoryFunction;if(void 0===e)throw new X(\"LMBCFFU10008\");a=e(t,r,s)}if(s){if(void 0===a)throw new J(\"GLBCVCU988774\");{const e=a,i=e.rootHtmlElement;if(void 0===i)throw new Z(`${tt[5]}: ${n}`);!function(t){const e=\"absolute\";t.style.position!==e&&(t.style.position=e)}(i),this.container.appendChild(i),this._virtuableComponentMap.set(t,e),t.virtualRectingRequiredEvent=this._containerVirtualRectingRequiredEventListener,t.virtualVisibilityChangeRequiredEvent=this._containerVirtualVisibilityChangeRequiredEventListener,t.virtualZIndexChangeRequiredEvent=this._containerVirtualZIndexChangeRequiredEventListener}}this._registeredComponentMap.set(t,a),o={virtual:i.virtual,component:a}}else o=super.bindComponent(t,e);return o}unbindComponent(t,e,i){if(void 0===this._registeredComponentMap.get(t))super.unbindComponent(t,e,i);else{const e=this._virtuableComponentMap.get(t);if(void 0!==e){const i=e.rootHtmlElement;if(void 0===i)throw new X(\"GLUC77743\",t.title);this.container.removeChild(i),this._virtuableComponentMap.delete(t)}}}fireBeforeVirtualRectingEvent(t){this._goldenLayoutBoundingClientRect=this.container.getBoundingClientRect(),super.fireBeforeVirtualRectingEvent(t)}handleContainerVirtualRectingRequiredEvent(t,e,i){const n=this._virtuableComponentMap.get(t);if(void 0===n)throw new J(\"GLHCSCE55933\");{const o=n.rootHtmlElement;if(void 0===o)throw new Z(tt[4]+\" \"+t.title);{const n=t.element.getBoundingClientRect(),s=n.left-this._goldenLayoutBoundingClientRect.left;o.style.left=zt(s);const r=n.top-this._goldenLayoutBoundingClientRect.top;o.style.top=zt(r),Tt(o,e),At(o,i)}}}handleContainerVirtualVisibilityChangeRequiredEvent(t,e){const i=this._virtuableComponentMap.get(t);if(void 0===i)throw new J(\"GLHCVVCRE55934\");{const n=i.rootHtmlElement;if(void 0===n)throw new Z(tt[4]+\" \"+t.title);Dt(n,e)}}handleContainerVirtualZIndexChangeRequiredEvent(t,e,i){const n=this._virtuableComponentMap.get(t);if(void 0===n)throw new J(\"GLHCVZICRE55935\");{const e=n.rootHtmlElement;if(void 0===e)throw new Z(tt[4]+\" \"+t.title);e.style.zIndex=i}}}const de=\"initial_\",ce={show:\"top\",popout:!1,maximise:!1,close:\"close-tab-unused\"},me={headerHeight:31},ue={hasHeaders:!0,reorderEnabled:!0},pe={popoutWholeStack:!1,constrainDragToContainer:!1,constrainDragToHeaders:!1,preventDragout:!1,showMaximiseIcon:!1,showPopoutIcon:!1,showCloseIcon:!1,blockedPopoutsThrowError:!0,closePopoutsOnUnload:!0,selectionEnabled:!1};var ge,fe;class ve{constructor(e){this.layout=e,ge.set(this,void 0),fe.set(this,void 0),this.handleResize=t=>{t.forEach((t=>this.resizeElement(t.target)))},this.handleMutation=()=>{this.layout.viewComponentsByContainerElement.forEach((t=>{this.resizeElement(t.container.element)}))},t.__classPrivateFieldSet(this,ge,new ResizeObserver(this.handleResize),\"f\"),t.__classPrivateFieldSet(this,fe,new MutationObserver(this.handleMutation),\"f\")}observeMutations(e){t.__classPrivateFieldGet(this,fe,\"f\")?.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[\"class\"]})}destroy(){t.__classPrivateFieldGet(this,ge,\"f\").disconnect(),t.__classPrivateFieldGet(this,fe,\"f\").disconnect()}observeContainer(e){t.__classPrivateFieldGet(this,ge,\"f\").observe(e)}unobserveContainer(e){t.__classPrivateFieldGet(this,ge,\"f\").unobserve(e)}resizeElement(t){const e=this.layout.viewComponentsByContainerElement.get(t);e&&e.resize()}}ge=new WeakMap,fe=new WeakMap;var _e={};Object.defineProperty(_e,\"__esModule\",{value:!0});var ye=_e.BaseItem=void 0;class Ce{constructor(t,e,i){this._item=t,this._layout=e,this._wrap=i}get raw(){return this._item}get layout(){return this._layout}get type(){return this._item.type}get contentItems(){return(this._item.contentItems??[]).map((t=>this._wrap(t)))}get parent(){const t=this._item.parent;return t?this._wrap(t):null}setActiveContentItem(t,e){if(\"stack\"!==this.type)throw new Error(`Cannot call setActiveContentItem from a non-stack item: ${this.type}`);this._item.setActiveContentItem(t.raw,e)}static wrapInternal(t,e,i){const n=Ce.wrapCache.get(e);if(n)return n;const o=new t(e,i,(e=>Ce.wrapInternal(t,e,i)));return Ce.wrapCache.set(e,o),o}}ye=_e.BaseItem=Ce,Ce.wrapCache=new WeakMap;const we=t=>!!t&&\"contentItems\"in t&&(t.isRow||t.isColumn);class Ie extends ye{isRoot(){return!!this._item.parent?.isGround}getBounds(){return this._item.element.getBoundingClientRect()}get viewName(){if(this._item.isComponent){const{component:t}=this._item;return t.identity.name}throw new Error(\"View name not found\")}onDestroyed(t){const e=({target:i})=>{i===this._item&&(t(),this._item.off(\"itemDestroyed\",e))};this._item.on(\"itemDestroyed\",e)}createAdjacentStack({position:t=\"right\"}={}){const e=this.raw;if(ee.isStack(e)&&e.parent){const i=[\"top\",\"bottom\"].includes(t)?\"column\":\"row\",n=[\"left\",\"top\"].includes(t)?1:0,o=we(e.parent)?e.parent:e.layoutManager,s=o,r=e.parent.contentItems.indexOf(e);e.parent.isGround&&e.parent.removeChild(e,!0);const a=o.newItem({type:i,content:[{type:\"stack\",content:[]}]},r);if(!a)throw new Error(\"createAdjacentStack: Failed to create new container\");const l=a.contentItems[0];return a.addChild(this.raw,n),we(s)&&s.removeChild(e,!0),this._wrap(l)}throw new Error(`Cannot creat adjacent stacks for type: ${e.type}, must be type 'stack'`)}setActiveContentItem(t,e=!0){if(!ee.isStack(this._item))throw new Error(`Cannot call setActiveContentItem from a non-stack item: ${this.type}`);this._item.setActiveComponentItem(t.raw,!e)}static wrap(t,e){return ye.wrapInternal(Ie,t,e)}}function be(t=[],e){for(const i of t)\"component\"===i.type?Object.keys(e).forEach((t=>{t in i&&(i.componentState={[`${de}${t}`]:i[t],...i.componentState}),i[t]=e[t]})):be(i.content,e)}function Se(t=[],e,i){for(const n of t)if(\"component\"===n.type)Object.keys(e).forEach((t=>{if(`${de}${t}`in n.componentState)return n[t]=n.componentState[`${de}${t}`],void delete n.componentState[`${de}${t}`];n[t]=e[t]}));else{if(n.size&&(\"row\"===i||\"column\"===i)){n[\"row\"===i?\"width\":\"height\"]=n.size?.includes(\".\")?parseFloat(n.size):parseInt(n.size)}Se(n.content,e,n.type)}}function Ee(t){if(t.root){t.root.content&&Se([t.root],{componentName:\"view\",isClosable:!0});const e=t.root;t.content=[e],delete t.root}return t}const xe=e=>class extends e{connectedCallback(){if(!this.name||!this.uuid)throw new Error(\" Name or uuid attribute missing\");if(!this.src)throw new Error(\" missing 'src' attribute.\");this.#t||(this.#t=document.createElement(\"iframe\"),this.#t.src=this.src,this.#t.style.height=\"100%\",this.#t.style.width=\"100%\",this.#t.style.border=\"none\",this.forceFrameName?this.#t.setAttribute(\"name\",this.forceFrameName):this.#t.setAttribute(\"name\",t.encodeOptions({brokerUrl:this.brokerUrl,name:this.name,uuid:this.uuid,providerId:this.providerId,contextGroup:this.contextGroup},\"of-frame\")),this.#t.setAttribute(\"id\",this.name),this.appendChild(this.#t))}#t;get brokerUrl(){return this.getAttribute(\"of-broker\")}set brokerUrl(t){t&&this.setAttribute(\"of-broker\",t)}get name(){return this.getAttribute(\"of-name\")}set name(t){t&&this.setAttribute(\"of-name\",t)}get forceFrameName(){return this.getAttribute(\"forceFrameName\")}set forceFrameName(t){t&&this.setAttribute(\"forceFrameName\",t)}get uuid(){return this.getAttribute(\"of-uuid\")}set uuid(t){t&&this.setAttribute(\"of-uuid\",t)}get src(){return this.getAttribute(\"src\")}set src(t){t&&this.setAttribute(\"src\",t)}get providerId(){return this.getAttribute(\"of-provider-id\")}set providerId(t){t&&this.setAttribute(\"of-provider-id\",t)}get contextGroup(){return this.getAttribute(\"of-context-group\")}set contextGroup(t){t&&this.setAttribute(\"of-context-group\",t)}static get observedAttributes(){return[\"name\"]}};class Le{static create(t){const e=document.createElement(\"of-view\");return Object.entries(t).forEach((([t,i])=>{e.setAttribute(t,i)})),e}}customElements.define(\"of-view\",xe(HTMLElement));class ze{constructor(t,i,n,{brokerUrl:o,interopConfig:s},r){this.container=t,this.config=i,this.ofView=null,this.isDragging=()=>this.container.tab.element?.className.includes(\"lm_dragging\")??!1;const{url:a,web:l,interop:h,name:d}=i||{},c=d??`internal-generated-view-${e.v4()}`;if(this.identity={uuid:n,name:c},this.container.element.setAttribute(\"of-name\",c),this.container.element.id=`container-${c}`,this.container.parent.id=c,void 0===a)return void this.handleUrlMissing();const m=this.updateTitleIfNotSet(a),u={\"of-broker\":o,\"of-uuid\":n,\"of-name\":c,src:a};l?.frameName&&(u.forceFrameName=l.frameName);const p=h?.currentContextGroup??s?.currentContextGroup;p&&(u[\"of-context-group\"]=p),s?.providerId&&(u[\"of-provider-id\"]=s?.providerId),this.ofView=Le.create(u),this.ofView.title=m??`Iframe: ${a}`,r.appendChild(this.ofView),this.ofView.style.position=\"absolute\"}updateTitleIfNotSet(t){return\"view\"===this.container.parent.title&&this.container.parent.setTitle(t),this.container.parent.title}handleUrlMissing(){const t=document.createElement(\"div\");t.setAttribute(\"style\",\"padding: 20px\");t.innerText=\"No URL provided\",this.container.element.appendChild(t)}destroy(){this.ofView?.remove(),this.ofView=null}closeView(){this.container.close()}resize(){if(this.ofView){if(this.isDragging())return void(this.ofView.style.display=\"none\");const t=this.container.element.getBoundingClientRect();this.ofView.style.position=\"absolute\",this.ofView.style.height=`${t.height}px`,this.ofView.style.width=`${t.width}px`,this.ofView.style.inset=`${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`,this.ofView.style.display=\"block\"}}}class Me extends U{static overrideConfig(t){const e={...ue,...t.settings,...pe};return e.reorderEnabled?be(t.content,{isClosable:!0}):be(t.content,{reorderEnabled:!1}),{dimensions:me,...t,settings:e,header:{...ce,show:!1!==t.settings?.hasHeaders&&ce.show}}}constructor(t,e,i,{options:n},o,s){super(),this.identity=t,this.container=e,this.initialConfig=i,this.layoutManager=o,this.platformProvider=s,this.viewComponentsByContainerElement=new Map,this.layoutContentCache=_.getSingleInstance(),this.reparentingViews=new Set,this.goldenLayoutDestroyed=!1,this.createViewComponent=(t,e)=>{m.handleSharedView(this.layoutManager,this.identity,e);const i=new ze(t,e,this.identity.uuid,this.options,this.iframeContainer);return e&&!1===e[`${de}isClosable`]&&this.stylesheet.insertRule(`#tab-${i.identity.name} .lm_close_tab { display: none; }`),this.viewComponentsByContainerElement.set(t.element,i),this.resizeController.observeContainer(t.element),i},this.iframeContainer=document.createElement(\"div\"),this.iframeContainer.id=`openfin-layout-iframe-container-${this.identity.layoutName}`,this.domEmitter=new V(e),this.setupStylesheets(),this.layout=new he(this.container),this.layout.resizeWithContainerAutomatically=!0,this.options=n,this.layout.registerComponent(\"view\",this.createViewComponent),this.setupListeners(),this.resizeController=new ve(this),this.layout.loadLayout(Me.overrideConfig(i));const r=document.createElement(\"div\");r.id=`openfin-layout-shadow-container-${this.identity.layoutName}`,r.attachShadow({mode:\"open\",delegatesFocus:!1}).appendChild(this.iframeContainer),this.container.appendChild(r),this.resizeController.observeMutations(this.container)}getStackByView({name:t}){const e=this.layout.findFirstComponentItemById(t);if(e?.parent&&e?.parent?.isStack)return Ie.wrap(e.parent,this)}getRoot(){return Ie.wrap(this.layout.rootItem,this)}async platformCloseView(t){const e=[...this.viewComponentsByContainerElement.values()].find((e=>e.identity.name===t.name));if(!e)throw new Error(`View with name: ${t.name} not found in layout.`);e.closeView()}async platformCreateView(t,{location:e,targetView:i}={}){if(i)throw new Error(\"TargetView not supported in web\");const n={options:this.platformProvider.normalizeOptions(t),target:this.identity,location:e};return this.insertView(n)}setupStylesheets(){if(this.container.setAttribute(\"data-openfin-layout-name\",this.identity.layoutName),this.stylesheet=new CSSStyleSheet,this.stylesheet.insertRule(\".lm_close { display: none; }\"),document.adoptedStyleSheets.push(this.stylesheet),this.initialConfig.settings?.preventSplitterResize){const t=`\\n [data-openfin-layout-name='${this.identity.layoutName}'] .lm_splitter {\\n pointer-events: none;\\n }`;this.stylesheet.insertRule(t)}}insertView({options:t,location:e,targetView:i}){const n=e?this.layoutContentCache.getItemOrUndefined(e.id):void 0,o=i?this.layoutContentCache.getItemOrUndefined(i.name):void 0,s=n??o??Ie.wrap(this.layout.rootItem,this);let r;if(ee.isStack(s.raw))r=s.raw;else{if(!we(s.raw))throw new Error(\"Cannot add a view at the requested location\");r=s.raw.newItem({type:\"stack\",content:[]})}const a=Math.min(r.contentItems.length,e?.index??r.contentItems.length);let l=this.layout.findFirstComponentItemById(t.name);l?(l.parent&&l.parent.removeChild(l,!0),r.addChild(l,a)):l=r.newComponent(\"view\",t,t.title??t.url??\"Default Title\",a);const h=l.component.identity;return Promise.resolve({identity:h})}replaceView({viewToReplace:t,newView:e}){throw new Error(\"Method not implemented.\")}replaceLayout(t){throw new Error(\"Method not implemented.\")}async cleanupView(t){}applyPreset(t){throw new Error(\"Method not implemented.\")}getCurrentViews(){return[...this.viewComponentsByContainerElement.values()].map((t=>t.identity))}async getFrameSnapshot(){return Ee(xt.fromResolved(this.layout.toConfig()))}isVisible(){return W(this.container)}async onViewDetached({viewIdentity:t}){this.reparentingViews.add(t.name),this.platformCloseView(t)}async destroy(){this.goldenLayoutDestroyed||(this.goldenLayoutDestroyed=!0,this.layout.destroy()),this.iframeContainer.remove(),this.resizeController.destroy(),document.adoptedStyleSheets=document.adoptedStyleSheets.filter((t=>t!==this.stylesheet)),this.viewComponentsByContainerElement.clear()}setupListeners(){this.container.addEventListener(\"pointerdown\",(t=>{if(t.target instanceof HTMLElement){const e=t.target.classList;[\"lm_tab\",\"lm_title\",\"lm_splitter\",\"lm_drag_handle\"].some((t=>e.contains(t)))&&(this.handleDragStart(),2===t.button&&t.stopPropagation())}}),!0),document.addEventListener(\"pointerup\",(()=>this.handleDragEnd()),!0),this.layout.on(\"tabCreated\",(t=>{const e=t.componentItem.component;t.element.id=`tab-${e.identity.name}`,this.domEmitter.dispatchLocalEvent(\"tab-created\",e.identity)})),this.layout.on(\"itemCreated\",(({target:t})=>{const e=t;if(Gt.isComponentItem(e)){const t=e.component;this.domEmitter.dispatchLocalEvent(\"container-created\",t.identity)}})),this.layout.on(\"itemDestroyed\",(t=>{const e=t.target;if(Gt.isComponentItem(e)){const t=e.component;this.removeViewComponent(t)}})),this.layout.on(\"itemDropped\",(()=>{this.handleDragEnd()}))}handleDragStart(){this.iframeContainer.style.pointerEvents=\"none\"}handleDragEnd(){this.iframeContainer.style.pointerEvents=\"\"}removeViewComponent(t){if(t.config&&!1===t.config[`${de}isClosable`]){const e=[...this.stylesheet.cssRules].findIndex((e=>e.cssText.includes(`#tab-${t.identity.name}`)));this.stylesheet.deleteRule(e)}t.destroy(),this.viewComponentsByContainerElement.delete(t.container.element),this.resizeController.unobserveContainer(t.container.element),this.reparentingViews.has(t.identity.name)?this.reparentingViews.delete(t.identity.name):this.platformProvider.closeView(t.identity.name);0===this.getCurrentViews().length&&(this.goldenLayoutDestroyed||(this.goldenLayoutDestroyed=!0,m.handleLastViewRemoved(this.layoutManager,this.identity)))}}class Pe{constructor(t,e,i,n){this.windowIdentity=t,this.connectConfig=e,this.provider=i,this.fallbackContainer=n}async createLayout(t,e){if(!(\"container\"in t)&&!this.fallbackContainer)throw new Error(\"Container property is not optional in web\");const{layoutName:i}=t,n=t,o=this.provider.initLayoutViews(n),s=n.container??this.fallbackContainer,r={...this.windowIdentity,layoutName:i},a=new Me(r,s,o,this.connectConfig,e,this.provider);m.registerLayout(e,i,a),this.fallbackContainer=null}async getLayoutSnapshot(t){return t.getLayoutSnapshot()}async handleLastViewRemoved(t){}}class Te{static async init(e){const i=e.getFin().InterApplicationBus.Channel,n=await i.create(`custom-frame-${e.me.uuid}`);return n.setDefaultAction((async(t,{target:e,opts:i},o)=>{const s=n.connections.find((t=>t.name===e.name));if(s)return n.dispatch(s,t,{...i,target:e});throw new Error(`Client with name ${e.name} not found`)})),await t.relayChannelClientApi_1(n,\"layout-relay\"),new Te(e)}constructor(t){this.wire=t,this.viewNames=new Set}normalizeOptions(t,i=\"default\"){const n=this.wire.me.uuid;let{name:o=`internal-generated-view-${e.v4()}`}=t;return o.match(/^internal-generated-view-/)&&this.viewNames.has(o)&&\"duplicate\"===i&&(o=`internal-generated-view-${e.v4()}`),this.viewNames.add(o),{...t,name:o,uuid:n}}closeView(t){this.viewNames.delete(t)}initLayoutViews({layout:t,multiInstanceViewBehavior:e}){return H((t=>{if(\"component\"===t.type&&t.componentState){const i=this.normalizeOptions(t.componentState,e);return{...t,componentState:i}}return t}),t)}}var Ae;const ke=t=>t;Ae=new WeakMap,exports.WebLayoutEntryPoint=class{constructor(e){Ae.set(this,void 0),this.initLayoutManager=async(e,i,{container:n,layoutManagerOverride:o})=>{const s=await Te.init(i),r=o??ke,a=new Pe(i.me,t.__classPrivateFieldGet(this,Ae,\"f\"),s,n),l=new(r(m.createClosedConstructor(a)));return await M(i,l),l},this.applyLayoutSnapshot=async(e,i,n)=>{await i.applyLayoutSnapshot(t.__classPrivateFieldGet(this,Ae,\"f\").platform.layoutSnapshot)},this.createLayout=async(t,e)=>m.createLayout(t,e),this.destroyLayout=async(t,e)=>m.destroyLayout(t,e),t.__classPrivateFieldSet(this,Ae,e,\"f\")}};\n","'use strict'\n\nexports.byteLength = byteLength\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\nfor (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i]\n revLookup[code.charCodeAt(i)] = i\n}\n\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction getLens (b64) {\n var len = b64.length\n\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // Trim off extra bytes after placeholder bytes are found\n // See: https://github.com/beatgammit/base64-js/issues/42\n var validLen = b64.indexOf('=')\n if (validLen === -1) validLen = len\n\n var placeHoldersLen = validLen === len\n ? 0\n : 4 - (validLen % 4)\n\n return [validLen, placeHoldersLen]\n}\n\n// base64 is 4/3 + up to two characters of the original data\nfunction byteLength (b64) {\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction _byteLength (b64, validLen, placeHoldersLen) {\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction toByteArray (b64) {\n var tmp\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n\n var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))\n\n var curByte = 0\n\n // if there are placeholders, only get up to the last complete 4 chars\n var len = placeHoldersLen > 0\n ? validLen - 4\n : validLen\n\n var i\n for (i = 0; i < len; i += 4) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 18) |\n (revLookup[b64.charCodeAt(i + 1)] << 12) |\n (revLookup[b64.charCodeAt(i + 2)] << 6) |\n revLookup[b64.charCodeAt(i + 3)]\n arr[curByte++] = (tmp >> 16) & 0xFF\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 2) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 2) |\n (revLookup[b64.charCodeAt(i + 1)] >> 4)\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 1) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 10) |\n (revLookup[b64.charCodeAt(i + 1)] << 4) |\n (revLookup[b64.charCodeAt(i + 2)] >> 2)\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] +\n lookup[num >> 12 & 0x3F] +\n lookup[num >> 6 & 0x3F] +\n lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n var tmp\n var output = []\n for (var i = start; i < end; i += 3) {\n tmp =\n ((uint8[i] << 16) & 0xFF0000) +\n ((uint8[i + 1] << 8) & 0xFF00) +\n (uint8[i + 2] & 0xFF)\n output.push(tripletToBase64(tmp))\n }\n return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n var tmp\n var len = uint8.length\n var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n var parts = []\n var maxChunkLength = 16383 // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1]\n parts.push(\n lookup[tmp >> 2] +\n lookup[(tmp << 4) & 0x3F] +\n '=='\n )\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + uint8[len - 1]\n parts.push(\n lookup[tmp >> 10] +\n lookup[(tmp >> 4) & 0x3F] +\n lookup[(tmp << 2) & 0x3F] +\n '='\n )\n }\n\n return parts.join('')\n}\n","/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n/* eslint-disable no-proto */\n\n'use strict'\n\nconst base64 = require('base64-js')\nconst ieee754 = require('ieee754')\nconst customInspectSymbol =\n (typeof Symbol === 'function' && typeof Symbol['for'] === 'function') // eslint-disable-line dot-notation\n ? Symbol['for']('nodejs.util.inspect.custom') // eslint-disable-line dot-notation\n : null\n\nexports.Buffer = Buffer\nexports.SlowBuffer = SlowBuffer\nexports.INSPECT_MAX_BYTES = 50\n\nconst K_MAX_LENGTH = 0x7fffffff\nexports.kMaxLength = K_MAX_LENGTH\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Print warning and recommend using `buffer` v4.x which has an Object\n * implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * We report that the browser does not support typed arrays if the are not subclassable\n * using __proto__. Firefox 4-29 lacks support for adding new properties to `Uint8Array`\n * (See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438). IE 10 lacks support\n * for __proto__ and has a buggy typed array implementation.\n */\nBuffer.TYPED_ARRAY_SUPPORT = typedArraySupport()\n\nif (!Buffer.TYPED_ARRAY_SUPPORT && typeof console !== 'undefined' &&\n typeof console.error === 'function') {\n console.error(\n 'This browser lacks typed array (Uint8Array) support which is required by ' +\n '`buffer` v5.x. Use `buffer` v4.x if you require old browser support.'\n )\n}\n\nfunction typedArraySupport () {\n // Can typed array instances can be augmented?\n try {\n const arr = new Uint8Array(1)\n const proto = { foo: function () { return 42 } }\n Object.setPrototypeOf(proto, Uint8Array.prototype)\n Object.setPrototypeOf(arr, proto)\n return arr.foo() === 42\n } catch (e) {\n return false\n }\n}\n\nObject.defineProperty(Buffer.prototype, 'parent', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.buffer\n }\n})\n\nObject.defineProperty(Buffer.prototype, 'offset', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.byteOffset\n }\n})\n\nfunction createBuffer (length) {\n if (length > K_MAX_LENGTH) {\n throw new RangeError('The value \"' + length + '\" is invalid for option \"size\"')\n }\n // Return an augmented `Uint8Array` instance\n const buf = new Uint8Array(length)\n Object.setPrototypeOf(buf, Buffer.prototype)\n return buf\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new TypeError(\n 'The \"string\" argument must be of type string. Received type number'\n )\n }\n return allocUnsafe(arg)\n }\n return from(arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\nfunction from (value, encodingOrOffset, length) {\n if (typeof value === 'string') {\n return fromString(value, encodingOrOffset)\n }\n\n if (ArrayBuffer.isView(value)) {\n return fromArrayView(value)\n }\n\n if (value == null) {\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n }\n\n if (isInstance(value, ArrayBuffer) ||\n (value && isInstance(value.buffer, ArrayBuffer))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof SharedArrayBuffer !== 'undefined' &&\n (isInstance(value, SharedArrayBuffer) ||\n (value && isInstance(value.buffer, SharedArrayBuffer)))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof value === 'number') {\n throw new TypeError(\n 'The \"value\" argument must not be of type number. Received type number'\n )\n }\n\n const valueOf = value.valueOf && value.valueOf()\n if (valueOf != null && valueOf !== value) {\n return Buffer.from(valueOf, encodingOrOffset, length)\n }\n\n const b = fromObject(value)\n if (b) return b\n\n if (typeof Symbol !== 'undefined' && Symbol.toPrimitive != null &&\n typeof value[Symbol.toPrimitive] === 'function') {\n return Buffer.from(value[Symbol.toPrimitive]('string'), encodingOrOffset, length)\n }\n\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n return from(value, encodingOrOffset, length)\n}\n\n// Note: Change prototype *after* Buffer.from is defined to workaround Chrome bug:\n// https://github.com/feross/buffer/pull/148\nObject.setPrototypeOf(Buffer.prototype, Uint8Array.prototype)\nObject.setPrototypeOf(Buffer, Uint8Array)\n\nfunction assertSize (size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be of type number')\n } else if (size < 0) {\n throw new RangeError('The value \"' + size + '\" is invalid for option \"size\"')\n }\n}\n\nfunction alloc (size, fill, encoding) {\n assertSize(size)\n if (size <= 0) {\n return createBuffer(size)\n }\n if (fill !== undefined) {\n // Only pay attention to encoding if it's a string. This\n // prevents accidentally sending in a number that would\n // be interpreted as a start offset.\n return typeof encoding === 'string'\n ? createBuffer(size).fill(fill, encoding)\n : createBuffer(size).fill(fill)\n }\n return createBuffer(size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n return alloc(size, fill, encoding)\n}\n\nfunction allocUnsafe (size) {\n assertSize(size)\n return createBuffer(size < 0 ? 0 : checked(size) | 0)\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n return allocUnsafe(size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n return allocUnsafe(size)\n}\n\nfunction fromString (string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8'\n }\n\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n\n const length = byteLength(string, encoding) | 0\n let buf = createBuffer(length)\n\n const actual = buf.write(string, encoding)\n\n if (actual !== length) {\n // Writing a hex string, for example, that contains invalid characters will\n // cause everything after the first invalid character to be ignored. (e.g.\n // 'abxxcd' will be treated as 'ab')\n buf = buf.slice(0, actual)\n }\n\n return buf\n}\n\nfunction fromArrayLike (array) {\n const length = array.length < 0 ? 0 : checked(array.length) | 0\n const buf = createBuffer(length)\n for (let i = 0; i < length; i += 1) {\n buf[i] = array[i] & 255\n }\n return buf\n}\n\nfunction fromArrayView (arrayView) {\n if (isInstance(arrayView, Uint8Array)) {\n const copy = new Uint8Array(arrayView)\n return fromArrayBuffer(copy.buffer, copy.byteOffset, copy.byteLength)\n }\n return fromArrayLike(arrayView)\n}\n\nfunction fromArrayBuffer (array, byteOffset, length) {\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\"offset\" is outside of buffer bounds')\n }\n\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\"length\" is outside of buffer bounds')\n }\n\n let buf\n if (byteOffset === undefined && length === undefined) {\n buf = new Uint8Array(array)\n } else if (length === undefined) {\n buf = new Uint8Array(array, byteOffset)\n } else {\n buf = new Uint8Array(array, byteOffset, length)\n }\n\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(buf, Buffer.prototype)\n\n return buf\n}\n\nfunction fromObject (obj) {\n if (Buffer.isBuffer(obj)) {\n const len = checked(obj.length) | 0\n const buf = createBuffer(len)\n\n if (buf.length === 0) {\n return buf\n }\n\n obj.copy(buf, 0, 0, len)\n return buf\n }\n\n if (obj.length !== undefined) {\n if (typeof obj.length !== 'number' || numberIsNaN(obj.length)) {\n return createBuffer(0)\n }\n return fromArrayLike(obj)\n }\n\n if (obj.type === 'Buffer' && Array.isArray(obj.data)) {\n return fromArrayLike(obj.data)\n }\n}\n\nfunction checked (length) {\n // Note: cannot use `length < K_MAX_LENGTH` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= K_MAX_LENGTH) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + K_MAX_LENGTH.toString(16) + ' bytes')\n }\n return length | 0\n}\n\nfunction SlowBuffer (length) {\n if (+length != length) { // eslint-disable-line eqeqeq\n length = 0\n }\n return Buffer.alloc(+length)\n}\n\nBuffer.isBuffer = function isBuffer (b) {\n return b != null && b._isBuffer === true &&\n b !== Buffer.prototype // so Buffer.isBuffer(Buffer.prototype) will be false\n}\n\nBuffer.compare = function compare (a, b) {\n if (isInstance(a, Uint8Array)) a = Buffer.from(a, a.offset, a.byteLength)\n if (isInstance(b, Uint8Array)) b = Buffer.from(b, b.offset, b.byteLength)\n if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n throw new TypeError(\n 'The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array'\n )\n }\n\n if (a === b) return 0\n\n let x = a.length\n let y = b.length\n\n for (let i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i]\n y = b[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n switch (String(encoding).toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'latin1':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return true\n default:\n return false\n }\n}\n\nBuffer.concat = function concat (list, length) {\n if (!Array.isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n\n if (list.length === 0) {\n return Buffer.alloc(0)\n }\n\n let i\n if (length === undefined) {\n length = 0\n for (i = 0; i < list.length; ++i) {\n length += list[i].length\n }\n }\n\n const buffer = Buffer.allocUnsafe(length)\n let pos = 0\n for (i = 0; i < list.length; ++i) {\n let buf = list[i]\n if (isInstance(buf, Uint8Array)) {\n if (pos + buf.length > buffer.length) {\n if (!Buffer.isBuffer(buf)) buf = Buffer.from(buf)\n buf.copy(buffer, pos)\n } else {\n Uint8Array.prototype.set.call(\n buffer,\n buf,\n pos\n )\n }\n } else if (!Buffer.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n } else {\n buf.copy(buffer, pos)\n }\n pos += buf.length\n }\n return buffer\n}\n\nfunction byteLength (string, encoding) {\n if (Buffer.isBuffer(string)) {\n return string.length\n }\n if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) {\n return string.byteLength\n }\n if (typeof string !== 'string') {\n throw new TypeError(\n 'The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. ' +\n 'Received type ' + typeof string\n )\n }\n\n const len = string.length\n const mustMatch = (arguments.length > 2 && arguments[2] === true)\n if (!mustMatch && len === 0) return 0\n\n // Use a for loop to avoid recursion\n let loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'ascii':\n case 'latin1':\n case 'binary':\n return len\n case 'utf8':\n case 'utf-8':\n return utf8ToBytes(string).length\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return len * 2\n case 'hex':\n return len >>> 1\n case 'base64':\n return base64ToBytes(string).length\n default:\n if (loweredCase) {\n return mustMatch ? -1 : utf8ToBytes(string).length // assume utf8\n }\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n let loweredCase = false\n\n // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n // property of a typed array.\n\n // This behaves neither like String nor Uint8Array in that we set start/end\n // to their upper/lower bounds if the value passed is out of range.\n // undefined is handled specially as per ECMA-262 6th Edition,\n // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n if (start === undefined || start < 0) {\n start = 0\n }\n // Return early if start > this.length. Done here to prevent potential uint32\n // coercion fail below.\n if (start > this.length) {\n return ''\n }\n\n if (end === undefined || end > this.length) {\n end = this.length\n }\n\n if (end <= 0) {\n return ''\n }\n\n // Force coercion to uint32. This will also coerce falsey/NaN values to 0.\n end >>>= 0\n start >>>= 0\n\n if (end <= start) {\n return ''\n }\n\n if (!encoding) encoding = 'utf8'\n\n while (true) {\n switch (encoding) {\n case 'hex':\n return hexSlice(this, start, end)\n\n case 'utf8':\n case 'utf-8':\n return utf8Slice(this, start, end)\n\n case 'ascii':\n return asciiSlice(this, start, end)\n\n case 'latin1':\n case 'binary':\n return latin1Slice(this, start, end)\n\n case 'base64':\n return base64Slice(this, start, end)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return utf16leSlice(this, start, end)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = (encoding + '').toLowerCase()\n loweredCase = true\n }\n }\n}\n\n// This property is used by `Buffer.isBuffer` (and the `is-buffer` npm package)\n// to detect a Buffer instance. It's not possible to use `instanceof Buffer`\n// reliably in a browserify context because there could be multiple different\n// copies of the 'buffer' package in use. This method works even for Buffer\n// instances that were created from another copy of the `buffer` package.\n// See: https://github.com/feross/buffer/issues/154\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n const i = b[n]\n b[n] = b[m]\n b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n const len = this.length\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits')\n }\n for (let i = 0; i < len; i += 2) {\n swap(this, i, i + 1)\n }\n return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n const len = this.length\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits')\n }\n for (let i = 0; i < len; i += 4) {\n swap(this, i, i + 3)\n swap(this, i + 1, i + 2)\n }\n return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n const len = this.length\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits')\n }\n for (let i = 0; i < len; i += 8) {\n swap(this, i, i + 7)\n swap(this, i + 1, i + 6)\n swap(this, i + 2, i + 5)\n swap(this, i + 3, i + 4)\n }\n return this\n}\n\nBuffer.prototype.toString = function toString () {\n const length = this.length\n if (length === 0) return ''\n if (arguments.length === 0) return utf8Slice(this, 0, length)\n return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.toLocaleString = Buffer.prototype.toString\n\nBuffer.prototype.equals = function equals (b) {\n if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n if (this === b) return true\n return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n let str = ''\n const max = exports.INSPECT_MAX_BYTES\n str = this.toString('hex', 0, max).replace(/(.{2})/g, '$1 ').trim()\n if (this.length > max) str += ' ... '\n return ''\n}\nif (customInspectSymbol) {\n Buffer.prototype[customInspectSymbol] = Buffer.prototype.inspect\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n if (isInstance(target, Uint8Array)) {\n target = Buffer.from(target, target.offset, target.byteLength)\n }\n if (!Buffer.isBuffer(target)) {\n throw new TypeError(\n 'The \"target\" argument must be one of type Buffer or Uint8Array. ' +\n 'Received type ' + (typeof target)\n )\n }\n\n if (start === undefined) {\n start = 0\n }\n if (end === undefined) {\n end = target ? target.length : 0\n }\n if (thisStart === undefined) {\n thisStart = 0\n }\n if (thisEnd === undefined) {\n thisEnd = this.length\n }\n\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError('out of range index')\n }\n\n if (thisStart >= thisEnd && start >= end) {\n return 0\n }\n if (thisStart >= thisEnd) {\n return -1\n }\n if (start >= end) {\n return 1\n }\n\n start >>>= 0\n end >>>= 0\n thisStart >>>= 0\n thisEnd >>>= 0\n\n if (this === target) return 0\n\n let x = thisEnd - thisStart\n let y = end - start\n const len = Math.min(x, y)\n\n const thisCopy = this.slice(thisStart, thisEnd)\n const targetCopy = target.slice(start, end)\n\n for (let i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i]\n y = targetCopy[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (numberIsNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [val], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n let indexSize = 1\n let arrLength = arr.length\n let valLength = val.length\n\n if (encoding !== undefined) {\n encoding = String(encoding).toLowerCase()\n if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n encoding === 'utf16le' || encoding === 'utf-16le') {\n if (arr.length < 2 || val.length < 2) {\n return -1\n }\n indexSize = 2\n arrLength /= 2\n valLength /= 2\n byteOffset /= 2\n }\n }\n\n function read (buf, i) {\n if (indexSize === 1) {\n return buf[i]\n } else {\n return buf.readUInt16BE(i * indexSize)\n }\n }\n\n let i\n if (dir) {\n let foundIndex = -1\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1) foundIndex = i\n if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n } else {\n if (foundIndex !== -1) i -= i - foundIndex\n foundIndex = -1\n }\n }\n } else {\n if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n for (i = byteOffset; i >= 0; i--) {\n let found = true\n for (let j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false\n break\n }\n }\n if (found) return i\n }\n }\n\n return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n offset = Number(offset) || 0\n const remaining = buf.length - offset\n if (!length) {\n length = remaining\n } else {\n length = Number(length)\n if (length > remaining) {\n length = remaining\n }\n }\n\n const strLen = string.length\n\n if (length > strLen / 2) {\n length = strLen / 2\n }\n let i\n for (i = 0; i < length; ++i) {\n const parsed = parseInt(string.substr(i * 2, 2), 16)\n if (numberIsNaN(parsed)) return i\n buf[offset + i] = parsed\n }\n return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n // Buffer#write(string)\n if (offset === undefined) {\n encoding = 'utf8'\n length = this.length\n offset = 0\n // Buffer#write(string, encoding)\n } else if (length === undefined && typeof offset === 'string') {\n encoding = offset\n length = this.length\n offset = 0\n // Buffer#write(string, offset[, length][, encoding])\n } else if (isFinite(offset)) {\n offset = offset >>> 0\n if (isFinite(length)) {\n length = length >>> 0\n if (encoding === undefined) encoding = 'utf8'\n } else {\n encoding = length\n length = undefined\n }\n } else {\n throw new Error(\n 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n )\n }\n\n const remaining = this.length - offset\n if (length === undefined || length > remaining) length = remaining\n\n if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n throw new RangeError('Attempt to write outside buffer bounds')\n }\n\n if (!encoding) encoding = 'utf8'\n\n let loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'hex':\n return hexWrite(this, string, offset, length)\n\n case 'utf8':\n case 'utf-8':\n return utf8Write(this, string, offset, length)\n\n case 'ascii':\n case 'latin1':\n case 'binary':\n return asciiWrite(this, string, offset, length)\n\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return base64Write(this, string, offset, length)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return ucs2Write(this, string, offset, length)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0)\n }\n}\n\nfunction base64Slice (buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf)\n } else {\n return base64.fromByteArray(buf.slice(start, end))\n }\n}\n\nfunction utf8Slice (buf, start, end) {\n end = Math.min(buf.length, end)\n const res = []\n\n let i = start\n while (i < end) {\n const firstByte = buf[i]\n let codePoint = null\n let bytesPerSequence = (firstByte > 0xEF)\n ? 4\n : (firstByte > 0xDF)\n ? 3\n : (firstByte > 0xBF)\n ? 2\n : 1\n\n if (i + bytesPerSequence <= end) {\n let secondByte, thirdByte, fourthByte, tempCodePoint\n\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 0x80) {\n codePoint = firstByte\n }\n break\n case 2:\n secondByte = buf[i + 1]\n if ((secondByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n if (tempCodePoint > 0x7F) {\n codePoint = tempCodePoint\n }\n }\n break\n case 3:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n codePoint = tempCodePoint\n }\n }\n break\n case 4:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n fourthByte = buf[i + 3]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n codePoint = tempCodePoint\n }\n }\n }\n }\n\n if (codePoint === null) {\n // we did not generate a valid codePoint so insert a\n // replacement char (U+FFFD) and advance only 1 byte\n codePoint = 0xFFFD\n bytesPerSequence = 1\n } else if (codePoint > 0xFFFF) {\n // encode to utf16 (surrogate pair dance)\n codePoint -= 0x10000\n res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n codePoint = 0xDC00 | codePoint & 0x3FF\n }\n\n res.push(codePoint)\n i += bytesPerSequence\n }\n\n return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nconst MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n const len = codePoints.length\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n }\n\n // Decode in chunks to avoid \"call stack size exceeded\".\n let res = ''\n let i = 0\n while (i < len) {\n res += String.fromCharCode.apply(\n String,\n codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n )\n }\n return res\n}\n\nfunction asciiSlice (buf, start, end) {\n let ret = ''\n end = Math.min(buf.length, end)\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F)\n }\n return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n let ret = ''\n end = Math.min(buf.length, end)\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i])\n }\n return ret\n}\n\nfunction hexSlice (buf, start, end) {\n const len = buf.length\n\n if (!start || start < 0) start = 0\n if (!end || end < 0 || end > len) end = len\n\n let out = ''\n for (let i = start; i < end; ++i) {\n out += hexSliceLookupTable[buf[i]]\n }\n return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n const bytes = buf.slice(start, end)\n let res = ''\n // If bytes.length is odd, the last 8 bits must be ignored (same as node.js)\n for (let i = 0; i < bytes.length - 1; i += 2) {\n res += String.fromCharCode(bytes[i] + (bytes[i + 1] * 256))\n }\n return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n const len = this.length\n start = ~~start\n end = end === undefined ? len : ~~end\n\n if (start < 0) {\n start += len\n if (start < 0) start = 0\n } else if (start > len) {\n start = len\n }\n\n if (end < 0) {\n end += len\n if (end < 0) end = 0\n } else if (end > len) {\n end = len\n }\n\n if (end < start) end = start\n\n const newBuf = this.subarray(start, end)\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(newBuf, Buffer.prototype)\n\n return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUintLE =\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let val = this[offset]\n let mul = 1\n let i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUintBE =\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n checkOffset(offset, byteLength, this.length)\n }\n\n let val = this[offset + --byteLength]\n let mul = 1\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUint8 =\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n return this[offset]\n}\n\nBuffer.prototype.readUint16LE =\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUint16BE =\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUint32LE =\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return ((this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16)) +\n (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUint32BE =\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] * 0x1000000) +\n ((this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n this[offset + 3])\n}\n\nBuffer.prototype.readBigUInt64LE = defineBigIntMethod(function readBigUInt64LE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const lo = first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24\n\n const hi = this[++offset] +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n last * 2 ** 24\n\n return BigInt(lo) + (BigInt(hi) << BigInt(32))\n})\n\nBuffer.prototype.readBigUInt64BE = defineBigIntMethod(function readBigUInt64BE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const hi = first * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset]\n\n const lo = this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last\n\n return (BigInt(hi) << BigInt(32)) + BigInt(lo)\n})\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let val = this[offset]\n let mul = 1\n let i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let i = byteLength\n let mul = 1\n let val = this[offset + --i]\n while (i > 0 && (mul *= 0x100)) {\n val += this[offset + --i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n if (!(this[offset] & 0x80)) return (this[offset])\n return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n const val = this[offset] | (this[offset + 1] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n const val = this[offset + 1] | (this[offset] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16) |\n (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] << 24) |\n (this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n (this[offset + 3])\n}\n\nBuffer.prototype.readBigInt64LE = defineBigIntMethod(function readBigInt64LE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const val = this[offset + 4] +\n this[offset + 5] * 2 ** 8 +\n this[offset + 6] * 2 ** 16 +\n (last << 24) // Overflow\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24)\n})\n\nBuffer.prototype.readBigInt64BE = defineBigIntMethod(function readBigInt64BE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const val = (first << 24) + // Overflow\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset]\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last)\n})\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUintLE =\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n let mul = 1\n let i = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUintBE =\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n let i = byteLength - 1\n let mul = 1\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUint8 =\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeUint16LE =\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeUint16BE =\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeUint32LE =\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset + 3] = (value >>> 24)\n this[offset + 2] = (value >>> 16)\n this[offset + 1] = (value >>> 8)\n this[offset] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeUint32BE =\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nfunction wrtBigUInt64LE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7)\n\n let lo = Number(value & BigInt(0xffffffff))\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n return offset\n}\n\nfunction wrtBigUInt64BE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7)\n\n let lo = Number(value & BigInt(0xffffffff))\n buf[offset + 7] = lo\n lo = lo >> 8\n buf[offset + 6] = lo\n lo = lo >> 8\n buf[offset + 5] = lo\n lo = lo >> 8\n buf[offset + 4] = lo\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n buf[offset + 3] = hi\n hi = hi >> 8\n buf[offset + 2] = hi\n hi = hi >> 8\n buf[offset + 1] = hi\n hi = hi >> 8\n buf[offset] = hi\n return offset + 8\n}\n\nBuffer.prototype.writeBigUInt64LE = defineBigIntMethod(function writeBigUInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeBigUInt64BE = defineBigIntMethod(function writeBigUInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n let i = 0\n let mul = 1\n let sub = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n let i = byteLength - 1\n let mul = 1\n let sub = 0\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n if (value < 0) value = 0xff + value + 1\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n this[offset + 2] = (value >>> 16)\n this[offset + 3] = (value >>> 24)\n return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (value < 0) value = 0xffffffff + value + 1\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeBigInt64LE = defineBigIntMethod(function writeBigInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nBuffer.prototype.writeBigInt64BE = defineBigIntMethod(function writeBigInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n }\n ieee754.write(buf, value, offset, littleEndian, 23, 4)\n return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n }\n ieee754.write(buf, value, offset, littleEndian, 52, 8)\n return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n if (!Buffer.isBuffer(target)) throw new TypeError('argument should be a Buffer')\n if (!start) start = 0\n if (!end && end !== 0) end = this.length\n if (targetStart >= target.length) targetStart = target.length\n if (!targetStart) targetStart = 0\n if (end > 0 && end < start) end = start\n\n // Copy 0 bytes; we're done\n if (end === start) return 0\n if (target.length === 0 || this.length === 0) return 0\n\n // Fatal error conditions\n if (targetStart < 0) {\n throw new RangeError('targetStart out of bounds')\n }\n if (start < 0 || start >= this.length) throw new RangeError('Index out of range')\n if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n // Are we oob?\n if (end > this.length) end = this.length\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start\n }\n\n const len = end - start\n\n if (this === target && typeof Uint8Array.prototype.copyWithin === 'function') {\n // Use built-in when available, missing from IE11\n this.copyWithin(targetStart, start, end)\n } else {\n Uint8Array.prototype.set.call(\n target,\n this.subarray(start, end),\n targetStart\n )\n }\n\n return len\n}\n\n// Usage:\n// buffer.fill(number[, offset[, end]])\n// buffer.fill(buffer[, offset[, end]])\n// buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n // Handle string cases:\n if (typeof val === 'string') {\n if (typeof start === 'string') {\n encoding = start\n start = 0\n end = this.length\n } else if (typeof end === 'string') {\n encoding = end\n end = this.length\n }\n if (encoding !== undefined && typeof encoding !== 'string') {\n throw new TypeError('encoding must be a string')\n }\n if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n if (val.length === 1) {\n const code = val.charCodeAt(0)\n if ((encoding === 'utf8' && code < 128) ||\n encoding === 'latin1') {\n // Fast path: If `val` fits into a single byte, use that numeric value.\n val = code\n }\n }\n } else if (typeof val === 'number') {\n val = val & 255\n } else if (typeof val === 'boolean') {\n val = Number(val)\n }\n\n // Invalid ranges are not set to a default, so can range check early.\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError('Out of range index')\n }\n\n if (end <= start) {\n return this\n }\n\n start = start >>> 0\n end = end === undefined ? this.length : end >>> 0\n\n if (!val) val = 0\n\n let i\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val\n }\n } else {\n const bytes = Buffer.isBuffer(val)\n ? val\n : Buffer.from(val, encoding)\n const len = bytes.length\n if (len === 0) {\n throw new TypeError('The value \"' + val +\n '\" is invalid for argument \"value\"')\n }\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len]\n }\n }\n\n return this\n}\n\n// CUSTOM ERRORS\n// =============\n\n// Simplified versions from Node, changed for Buffer-only usage\nconst errors = {}\nfunction E (sym, getMessage, Base) {\n errors[sym] = class NodeError extends Base {\n constructor () {\n super()\n\n Object.defineProperty(this, 'message', {\n value: getMessage.apply(this, arguments),\n writable: true,\n configurable: true\n })\n\n // Add the error code to the name to include it in the stack trace.\n this.name = `${this.name} [${sym}]`\n // Access the stack to generate the error message including the error code\n // from the name.\n this.stack // eslint-disable-line no-unused-expressions\n // Reset the name to the actual name.\n delete this.name\n }\n\n get code () {\n return sym\n }\n\n set code (value) {\n Object.defineProperty(this, 'code', {\n configurable: true,\n enumerable: true,\n value,\n writable: true\n })\n }\n\n toString () {\n return `${this.name} [${sym}]: ${this.message}`\n }\n }\n}\n\nE('ERR_BUFFER_OUT_OF_BOUNDS',\n function (name) {\n if (name) {\n return `${name} is outside of buffer bounds`\n }\n\n return 'Attempt to access memory outside buffer bounds'\n }, RangeError)\nE('ERR_INVALID_ARG_TYPE',\n function (name, actual) {\n return `The \"${name}\" argument must be of type number. Received type ${typeof actual}`\n }, TypeError)\nE('ERR_OUT_OF_RANGE',\n function (str, range, input) {\n let msg = `The value of \"${str}\" is out of range.`\n let received = input\n if (Number.isInteger(input) && Math.abs(input) > 2 ** 32) {\n received = addNumericalSeparator(String(input))\n } else if (typeof input === 'bigint') {\n received = String(input)\n if (input > BigInt(2) ** BigInt(32) || input < -(BigInt(2) ** BigInt(32))) {\n received = addNumericalSeparator(received)\n }\n received += 'n'\n }\n msg += ` It must be ${range}. Received ${received}`\n return msg\n }, RangeError)\n\nfunction addNumericalSeparator (val) {\n let res = ''\n let i = val.length\n const start = val[0] === '-' ? 1 : 0\n for (; i >= start + 4; i -= 3) {\n res = `_${val.slice(i - 3, i)}${res}`\n }\n return `${val.slice(0, i)}${res}`\n}\n\n// CHECK FUNCTIONS\n// ===============\n\nfunction checkBounds (buf, offset, byteLength) {\n validateNumber(offset, 'offset')\n if (buf[offset] === undefined || buf[offset + byteLength] === undefined) {\n boundsError(offset, buf.length - (byteLength + 1))\n }\n}\n\nfunction checkIntBI (value, min, max, buf, offset, byteLength) {\n if (value > max || value < min) {\n const n = typeof min === 'bigint' ? 'n' : ''\n let range\n if (byteLength > 3) {\n if (min === 0 || min === BigInt(0)) {\n range = `>= 0${n} and < 2${n} ** ${(byteLength + 1) * 8}${n}`\n } else {\n range = `>= -(2${n} ** ${(byteLength + 1) * 8 - 1}${n}) and < 2 ** ` +\n `${(byteLength + 1) * 8 - 1}${n}`\n }\n } else {\n range = `>= ${min}${n} and <= ${max}${n}`\n }\n throw new errors.ERR_OUT_OF_RANGE('value', range, value)\n }\n checkBounds(buf, offset, byteLength)\n}\n\nfunction validateNumber (value, name) {\n if (typeof value !== 'number') {\n throw new errors.ERR_INVALID_ARG_TYPE(name, 'number', value)\n }\n}\n\nfunction boundsError (value, length, type) {\n if (Math.floor(value) !== value) {\n validateNumber(value, type)\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset', 'an integer', value)\n }\n\n if (length < 0) {\n throw new errors.ERR_BUFFER_OUT_OF_BOUNDS()\n }\n\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset',\n `>= ${type ? 1 : 0} and <= ${length}`,\n value)\n}\n\n// HELPER FUNCTIONS\n// ================\n\nconst INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n // Node takes equal signs as end of the Base64 encoding\n str = str.split('=')[0]\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = str.trim().replace(INVALID_BASE64_RE, '')\n // Node converts strings with length < 2 to ''\n if (str.length < 2) return ''\n // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n while (str.length % 4 !== 0) {\n str = str + '='\n }\n return str\n}\n\nfunction utf8ToBytes (string, units) {\n units = units || Infinity\n let codePoint\n const length = string.length\n let leadSurrogate = null\n const bytes = []\n\n for (let i = 0; i < length; ++i) {\n codePoint = string.charCodeAt(i)\n\n // is surrogate component\n if (codePoint > 0xD7FF && codePoint < 0xE000) {\n // last char was a lead\n if (!leadSurrogate) {\n // no lead yet\n if (codePoint > 0xDBFF) {\n // unexpected trail\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n } else if (i + 1 === length) {\n // unpaired lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n }\n\n // valid lead\n leadSurrogate = codePoint\n\n continue\n }\n\n // 2 leads in a row\n if (codePoint < 0xDC00) {\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n leadSurrogate = codePoint\n continue\n }\n\n // valid surrogate pair\n codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n } else if (leadSurrogate) {\n // valid bmp char, but last char was a lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n }\n\n leadSurrogate = null\n\n // encode utf8\n if (codePoint < 0x80) {\n if ((units -= 1) < 0) break\n bytes.push(codePoint)\n } else if (codePoint < 0x800) {\n if ((units -= 2) < 0) break\n bytes.push(\n codePoint >> 0x6 | 0xC0,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x10000) {\n if ((units -= 3) < 0) break\n bytes.push(\n codePoint >> 0xC | 0xE0,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x110000) {\n if ((units -= 4) < 0) break\n bytes.push(\n codePoint >> 0x12 | 0xF0,\n codePoint >> 0xC & 0x3F | 0x80,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else {\n throw new Error('Invalid code point')\n }\n }\n\n return bytes\n}\n\nfunction asciiToBytes (str) {\n const byteArray = []\n for (let i = 0; i < str.length; ++i) {\n // Node's code seems to be doing this and not & 0x7F..\n byteArray.push(str.charCodeAt(i) & 0xFF)\n }\n return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n let c, hi, lo\n const byteArray = []\n for (let i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0) break\n\n c = str.charCodeAt(i)\n hi = c >> 8\n lo = c % 256\n byteArray.push(lo)\n byteArray.push(hi)\n }\n\n return byteArray\n}\n\nfunction base64ToBytes (str) {\n return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n let i\n for (i = 0; i < length; ++i) {\n if ((i + offset >= dst.length) || (i >= src.length)) break\n dst[i + offset] = src[i]\n }\n return i\n}\n\n// ArrayBuffer or Uint8Array objects from other contexts (i.e. iframes) do not pass\n// the `instanceof` check but they should be treated as of that type.\n// See: https://github.com/feross/buffer/issues/166\nfunction isInstance (obj, type) {\n return obj instanceof type ||\n (obj != null && obj.constructor != null && obj.constructor.name != null &&\n obj.constructor.name === type.name)\n}\nfunction numberIsNaN (obj) {\n // For IE11 support\n return obj !== obj // eslint-disable-line no-self-compare\n}\n\n// Create lookup table for `toString('hex')`\n// See: https://github.com/feross/buffer/issues/219\nconst hexSliceLookupTable = (function () {\n const alphabet = '0123456789abcdef'\n const table = new Array(256)\n for (let i = 0; i < 16; ++i) {\n const i16 = i * 16\n for (let j = 0; j < 16; ++j) {\n table[i16 + j] = alphabet[i] + alphabet[j]\n }\n }\n return table\n})()\n\n// Return not function with Error if BigInt not supported\nfunction defineBigIntMethod (fn) {\n return typeof BigInt === 'undefined' ? BufferBigIntNotDefined : fn\n}\n\nfunction BufferBigIntNotDefined () {\n throw new Error('BigInt not supported')\n}\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\nvar R = typeof Reflect === 'object' ? Reflect : null\nvar ReflectApply = R && typeof R.apply === 'function'\n ? R.apply\n : function ReflectApply(target, receiver, args) {\n return Function.prototype.apply.call(target, receiver, args);\n }\n\nvar ReflectOwnKeys\nif (R && typeof R.ownKeys === 'function') {\n ReflectOwnKeys = R.ownKeys\n} else if (Object.getOwnPropertySymbols) {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target)\n .concat(Object.getOwnPropertySymbols(target));\n };\n} else {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target);\n };\n}\n\nfunction ProcessEmitWarning(warning) {\n if (console && console.warn) console.warn(warning);\n}\n\nvar NumberIsNaN = Number.isNaN || function NumberIsNaN(value) {\n return value !== value;\n}\n\nfunction EventEmitter() {\n EventEmitter.init.call(this);\n}\nmodule.exports = EventEmitter;\nmodule.exports.once = once;\n\n// Backwards-compat with node 0.10.x\nEventEmitter.EventEmitter = EventEmitter;\n\nEventEmitter.prototype._events = undefined;\nEventEmitter.prototype._eventsCount = 0;\nEventEmitter.prototype._maxListeners = undefined;\n\n// By default EventEmitters will print a warning if more than 10 listeners are\n// added to it. This is a useful default which helps finding memory leaks.\nvar defaultMaxListeners = 10;\n\nfunction checkListener(listener) {\n if (typeof listener !== 'function') {\n throw new TypeError('The \"listener\" argument must be of type Function. Received type ' + typeof listener);\n }\n}\n\nObject.defineProperty(EventEmitter, 'defaultMaxListeners', {\n enumerable: true,\n get: function() {\n return defaultMaxListeners;\n },\n set: function(arg) {\n if (typeof arg !== 'number' || arg < 0 || NumberIsNaN(arg)) {\n throw new RangeError('The value of \"defaultMaxListeners\" is out of range. It must be a non-negative number. Received ' + arg + '.');\n }\n defaultMaxListeners = arg;\n }\n});\n\nEventEmitter.init = function() {\n\n if (this._events === undefined ||\n this._events === Object.getPrototypeOf(this)._events) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n }\n\n this._maxListeners = this._maxListeners || undefined;\n};\n\n// Obviously not all Emitters should be limited to 10. This function allows\n// that to be increased. Set to zero for unlimited.\nEventEmitter.prototype.setMaxListeners = function setMaxListeners(n) {\n if (typeof n !== 'number' || n < 0 || NumberIsNaN(n)) {\n throw new RangeError('The value of \"n\" is out of range. It must be a non-negative number. Received ' + n + '.');\n }\n this._maxListeners = n;\n return this;\n};\n\nfunction _getMaxListeners(that) {\n if (that._maxListeners === undefined)\n return EventEmitter.defaultMaxListeners;\n return that._maxListeners;\n}\n\nEventEmitter.prototype.getMaxListeners = function getMaxListeners() {\n return _getMaxListeners(this);\n};\n\nEventEmitter.prototype.emit = function emit(type) {\n var args = [];\n for (var i = 1; i < arguments.length; i++) args.push(arguments[i]);\n var doError = (type === 'error');\n\n var events = this._events;\n if (events !== undefined)\n doError = (doError && events.error === undefined);\n else if (!doError)\n return false;\n\n // If there is no 'error' event listener then throw.\n if (doError) {\n var er;\n if (args.length > 0)\n er = args[0];\n if (er instanceof Error) {\n // Note: The comments on the `throw` lines are intentional, they show\n // up in Node's output if this results in an unhandled exception.\n throw er; // Unhandled 'error' event\n }\n // At least give some kind of context to the user\n var err = new Error('Unhandled error.' + (er ? ' (' + er.message + ')' : ''));\n err.context = er;\n throw err; // Unhandled 'error' event\n }\n\n var handler = events[type];\n\n if (handler === undefined)\n return false;\n\n if (typeof handler === 'function') {\n ReflectApply(handler, this, args);\n } else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n ReflectApply(listeners[i], this, args);\n }\n\n return true;\n};\n\nfunction _addListener(target, type, listener, prepend) {\n var m;\n var events;\n var existing;\n\n checkListener(listener);\n\n events = target._events;\n if (events === undefined) {\n events = target._events = Object.create(null);\n target._eventsCount = 0;\n } else {\n // To avoid recursion in the case that type === \"newListener\"! Before\n // adding it to the listeners, first emit \"newListener\".\n if (events.newListener !== undefined) {\n target.emit('newListener', type,\n listener.listener ? listener.listener : listener);\n\n // Re-assign `events` because a newListener handler could have caused the\n // this._events to be assigned to a new object\n events = target._events;\n }\n existing = events[type];\n }\n\n if (existing === undefined) {\n // Optimize the case of one listener. Don't need the extra array object.\n existing = events[type] = listener;\n ++target._eventsCount;\n } else {\n if (typeof existing === 'function') {\n // Adding the second element, need to change to array.\n existing = events[type] =\n prepend ? [listener, existing] : [existing, listener];\n // If we've already got an array, just append.\n } else if (prepend) {\n existing.unshift(listener);\n } else {\n existing.push(listener);\n }\n\n // Check for listener leak\n m = _getMaxListeners(target);\n if (m > 0 && existing.length > m && !existing.warned) {\n existing.warned = true;\n // No error code for this since it is a Warning\n // eslint-disable-next-line no-restricted-syntax\n var w = new Error('Possible EventEmitter memory leak detected. ' +\n existing.length + ' ' + String(type) + ' listeners ' +\n 'added. Use emitter.setMaxListeners() to ' +\n 'increase limit');\n w.name = 'MaxListenersExceededWarning';\n w.emitter = target;\n w.type = type;\n w.count = existing.length;\n ProcessEmitWarning(w);\n }\n }\n\n return target;\n}\n\nEventEmitter.prototype.addListener = function addListener(type, listener) {\n return _addListener(this, type, listener, false);\n};\n\nEventEmitter.prototype.on = EventEmitter.prototype.addListener;\n\nEventEmitter.prototype.prependListener =\n function prependListener(type, listener) {\n return _addListener(this, type, listener, true);\n };\n\nfunction onceWrapper() {\n if (!this.fired) {\n this.target.removeListener(this.type, this.wrapFn);\n this.fired = true;\n if (arguments.length === 0)\n return this.listener.call(this.target);\n return this.listener.apply(this.target, arguments);\n }\n}\n\nfunction _onceWrap(target, type, listener) {\n var state = { fired: false, wrapFn: undefined, target: target, type: type, listener: listener };\n var wrapped = onceWrapper.bind(state);\n wrapped.listener = listener;\n state.wrapFn = wrapped;\n return wrapped;\n}\n\nEventEmitter.prototype.once = function once(type, listener) {\n checkListener(listener);\n this.on(type, _onceWrap(this, type, listener));\n return this;\n};\n\nEventEmitter.prototype.prependOnceListener =\n function prependOnceListener(type, listener) {\n checkListener(listener);\n this.prependListener(type, _onceWrap(this, type, listener));\n return this;\n };\n\n// Emits a 'removeListener' event if and only if the listener was removed.\nEventEmitter.prototype.removeListener =\n function removeListener(type, listener) {\n var list, events, position, i, originalListener;\n\n checkListener(listener);\n\n events = this._events;\n if (events === undefined)\n return this;\n\n list = events[type];\n if (list === undefined)\n return this;\n\n if (list === listener || list.listener === listener) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else {\n delete events[type];\n if (events.removeListener)\n this.emit('removeListener', type, list.listener || listener);\n }\n } else if (typeof list !== 'function') {\n position = -1;\n\n for (i = list.length - 1; i >= 0; i--) {\n if (list[i] === listener || list[i].listener === listener) {\n originalListener = list[i].listener;\n position = i;\n break;\n }\n }\n\n if (position < 0)\n return this;\n\n if (position === 0)\n list.shift();\n else {\n spliceOne(list, position);\n }\n\n if (list.length === 1)\n events[type] = list[0];\n\n if (events.removeListener !== undefined)\n this.emit('removeListener', type, originalListener || listener);\n }\n\n return this;\n };\n\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\n\nEventEmitter.prototype.removeAllListeners =\n function removeAllListeners(type) {\n var listeners, events, i;\n\n events = this._events;\n if (events === undefined)\n return this;\n\n // not listening for removeListener, no need to emit\n if (events.removeListener === undefined) {\n if (arguments.length === 0) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n } else if (events[type] !== undefined) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else\n delete events[type];\n }\n return this;\n }\n\n // emit removeListener for all listeners on all events\n if (arguments.length === 0) {\n var keys = Object.keys(events);\n var key;\n for (i = 0; i < keys.length; ++i) {\n key = keys[i];\n if (key === 'removeListener') continue;\n this.removeAllListeners(key);\n }\n this.removeAllListeners('removeListener');\n this._events = Object.create(null);\n this._eventsCount = 0;\n return this;\n }\n\n listeners = events[type];\n\n if (typeof listeners === 'function') {\n this.removeListener(type, listeners);\n } else if (listeners !== undefined) {\n // LIFO order\n for (i = listeners.length - 1; i >= 0; i--) {\n this.removeListener(type, listeners[i]);\n }\n }\n\n return this;\n };\n\nfunction _listeners(target, type, unwrap) {\n var events = target._events;\n\n if (events === undefined)\n return [];\n\n var evlistener = events[type];\n if (evlistener === undefined)\n return [];\n\n if (typeof evlistener === 'function')\n return unwrap ? [evlistener.listener || evlistener] : [evlistener];\n\n return unwrap ?\n unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length);\n}\n\nEventEmitter.prototype.listeners = function listeners(type) {\n return _listeners(this, type, true);\n};\n\nEventEmitter.prototype.rawListeners = function rawListeners(type) {\n return _listeners(this, type, false);\n};\n\nEventEmitter.listenerCount = function(emitter, type) {\n if (typeof emitter.listenerCount === 'function') {\n return emitter.listenerCount(type);\n } else {\n return listenerCount.call(emitter, type);\n }\n};\n\nEventEmitter.prototype.listenerCount = listenerCount;\nfunction listenerCount(type) {\n var events = this._events;\n\n if (events !== undefined) {\n var evlistener = events[type];\n\n if (typeof evlistener === 'function') {\n return 1;\n } else if (evlistener !== undefined) {\n return evlistener.length;\n }\n }\n\n return 0;\n}\n\nEventEmitter.prototype.eventNames = function eventNames() {\n return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : [];\n};\n\nfunction arrayClone(arr, n) {\n var copy = new Array(n);\n for (var i = 0; i < n; ++i)\n copy[i] = arr[i];\n return copy;\n}\n\nfunction spliceOne(list, index) {\n for (; index + 1 < list.length; index++)\n list[index] = list[index + 1];\n list.pop();\n}\n\nfunction unwrapListeners(arr) {\n var ret = new Array(arr.length);\n for (var i = 0; i < ret.length; ++i) {\n ret[i] = arr[i].listener || arr[i];\n }\n return ret;\n}\n\nfunction once(emitter, name) {\n return new Promise(function (resolve, reject) {\n function errorListener(err) {\n emitter.removeListener(name, resolver);\n reject(err);\n }\n\n function resolver() {\n if (typeof emitter.removeListener === 'function') {\n emitter.removeListener('error', errorListener);\n }\n resolve([].slice.call(arguments));\n };\n\n eventTargetAgnosticAddListener(emitter, name, resolver, { once: true });\n if (name !== 'error') {\n addErrorHandlerIfEventEmitter(emitter, errorListener, { once: true });\n }\n });\n}\n\nfunction addErrorHandlerIfEventEmitter(emitter, handler, flags) {\n if (typeof emitter.on === 'function') {\n eventTargetAgnosticAddListener(emitter, 'error', handler, flags);\n }\n}\n\nfunction eventTargetAgnosticAddListener(emitter, name, listener, flags) {\n if (typeof emitter.on === 'function') {\n if (flags.once) {\n emitter.once(name, listener);\n } else {\n emitter.on(name, listener);\n }\n } else if (typeof emitter.addEventListener === 'function') {\n // EventTarget does not have `error` event semantics like Node\n // EventEmitters, we do not listen for `error` events here.\n emitter.addEventListener(name, function wrapListener(arg) {\n // IE does not have builtin `{ once: true }` support so we\n // have to do it manually.\n if (flags.once) {\n emitter.removeEventListener(name, wrapListener);\n }\n listener(arg);\n });\n } else {\n throw new TypeError('The \"emitter\" argument must be of type EventEmitter. Received type ' + typeof emitter);\n }\n}\n","/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */\nexports.read = function (buffer, offset, isLE, mLen, nBytes) {\n var e, m\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var nBits = -7\n var i = isLE ? (nBytes - 1) : 0\n var d = isLE ? -1 : 1\n var s = buffer[offset + i]\n\n i += d\n\n e = s & ((1 << (-nBits)) - 1)\n s >>= (-nBits)\n nBits += eLen\n for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & ((1 << (-nBits)) - 1)\n e >>= (-nBits)\n nBits += mLen\n for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias\n } else if (e === eMax) {\n return m ? NaN : ((s ? -1 : 1) * Infinity)\n } else {\n m = m + Math.pow(2, mLen)\n e = e - eBias\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n var i = isLE ? 0 : (nBytes - 1)\n var d = isLE ? 1 : -1\n var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n value = Math.abs(value)\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0\n e = eMax\n } else {\n e = Math.floor(Math.log(value) / Math.LN2)\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--\n c *= 2\n }\n if (e + eBias >= 1) {\n value += rt / c\n } else {\n value += rt * Math.pow(2, 1 - eBias)\n }\n if (value * c >= 2) {\n e++\n c /= 2\n }\n\n if (e + eBias >= eMax) {\n m = 0\n e = eMax\n } else if (e + eBias >= 1) {\n m = ((value * c) - 1) * Math.pow(2, mLen)\n e = e + eBias\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n e = 0\n }\n }\n\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n e = (e << mLen) | m\n eLen += mLen\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128\n}\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView');\n\nmodule.exports = DataView;\n","var hashClear = require('./_hashClear'),\n hashDelete = require('./_hashDelete'),\n hashGet = require('./_hashGet'),\n hashHas = require('./_hashHas'),\n hashSet = require('./_hashSet');\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\nmodule.exports = Hash;\n","var listCacheClear = require('./_listCacheClear'),\n listCacheDelete = require('./_listCacheDelete'),\n listCacheGet = require('./_listCacheGet'),\n listCacheHas = require('./_listCacheHas'),\n listCacheSet = require('./_listCacheSet');\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\nmodule.exports = ListCache;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map');\n\nmodule.exports = Map;\n","var mapCacheClear = require('./_mapCacheClear'),\n mapCacheDelete = require('./_mapCacheDelete'),\n mapCacheGet = require('./_mapCacheGet'),\n mapCacheHas = require('./_mapCacheHas'),\n mapCacheSet = require('./_mapCacheSet');\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\nmodule.exports = MapCache;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Promise = getNative(root, 'Promise');\n\nmodule.exports = Promise;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Set = getNative(root, 'Set');\n\nmodule.exports = Set;\n","var MapCache = require('./_MapCache'),\n setCacheAdd = require('./_setCacheAdd'),\n setCacheHas = require('./_setCacheHas');\n\n/**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\nfunction SetCache(values) {\n var index = -1,\n length = values == null ? 0 : values.length;\n\n this.__data__ = new MapCache;\n while (++index < length) {\n this.add(values[index]);\n }\n}\n\n// Add methods to `SetCache`.\nSetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\nSetCache.prototype.has = setCacheHas;\n\nmodule.exports = SetCache;\n","var ListCache = require('./_ListCache'),\n stackClear = require('./_stackClear'),\n stackDelete = require('./_stackDelete'),\n stackGet = require('./_stackGet'),\n stackHas = require('./_stackHas'),\n stackSet = require('./_stackSet');\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\nmodule.exports = Stack;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Uint8Array = root.Uint8Array;\n\nmodule.exports = Uint8Array;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar WeakMap = getNative(root, 'WeakMap');\n\nmodule.exports = WeakMap;\n","/**\n * A specialized version of `_.forEach` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\nfunction arrayEach(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (iteratee(array[index], index, array) === false) {\n break;\n }\n }\n return array;\n}\n\nmodule.exports = arrayEach;\n","/**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\nfunction arrayFilter(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result[resIndex++] = value;\n }\n }\n return result;\n}\n\nmodule.exports = arrayFilter;\n","var baseTimes = require('./_baseTimes'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isIndex = require('./_isIndex'),\n isTypedArray = require('./isTypedArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = arrayLikeKeys;\n","/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n}\n\nmodule.exports = arrayPush;\n","/**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\nfunction arraySome(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (predicate(array[index], index, array)) {\n return true;\n }\n }\n return false;\n}\n\nmodule.exports = arraySome;\n","var baseAssignValue = require('./_baseAssignValue'),\n eq = require('./eq');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\nmodule.exports = assignValue;\n","var eq = require('./eq');\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\nmodule.exports = assocIndexOf;\n","var copyObject = require('./_copyObject'),\n keys = require('./keys');\n\n/**\n * The base implementation of `_.assign` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssign(object, source) {\n return object && copyObject(source, keys(source), object);\n}\n\nmodule.exports = baseAssign;\n","var copyObject = require('./_copyObject'),\n keysIn = require('./keysIn');\n\n/**\n * The base implementation of `_.assignIn` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssignIn(object, source) {\n return object && copyObject(source, keysIn(source), object);\n}\n\nmodule.exports = baseAssignIn;\n","var defineProperty = require('./_defineProperty');\n\n/**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction baseAssignValue(object, key, value) {\n if (key == '__proto__' && defineProperty) {\n defineProperty(object, key, {\n 'configurable': true,\n 'enumerable': true,\n 'value': value,\n 'writable': true\n });\n } else {\n object[key] = value;\n }\n}\n\nmodule.exports = baseAssignValue;\n","var Stack = require('./_Stack'),\n arrayEach = require('./_arrayEach'),\n assignValue = require('./_assignValue'),\n baseAssign = require('./_baseAssign'),\n baseAssignIn = require('./_baseAssignIn'),\n cloneBuffer = require('./_cloneBuffer'),\n copyArray = require('./_copyArray'),\n copySymbols = require('./_copySymbols'),\n copySymbolsIn = require('./_copySymbolsIn'),\n getAllKeys = require('./_getAllKeys'),\n getAllKeysIn = require('./_getAllKeysIn'),\n getTag = require('./_getTag'),\n initCloneArray = require('./_initCloneArray'),\n initCloneByTag = require('./_initCloneByTag'),\n initCloneObject = require('./_initCloneObject'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isMap = require('./isMap'),\n isObject = require('./isObject'),\n isSet = require('./isSet'),\n keys = require('./keys'),\n keysIn = require('./keysIn');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_FLAT_FLAG = 2,\n CLONE_SYMBOLS_FLAG = 4;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values supported by `_.clone`. */\nvar cloneableTags = {};\ncloneableTags[argsTag] = cloneableTags[arrayTag] =\ncloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =\ncloneableTags[boolTag] = cloneableTags[dateTag] =\ncloneableTags[float32Tag] = cloneableTags[float64Tag] =\ncloneableTags[int8Tag] = cloneableTags[int16Tag] =\ncloneableTags[int32Tag] = cloneableTags[mapTag] =\ncloneableTags[numberTag] = cloneableTags[objectTag] =\ncloneableTags[regexpTag] = cloneableTags[setTag] =\ncloneableTags[stringTag] = cloneableTags[symbolTag] =\ncloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =\ncloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;\ncloneableTags[errorTag] = cloneableTags[funcTag] =\ncloneableTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.clone` and `_.cloneDeep` which tracks\n * traversed objects.\n *\n * @private\n * @param {*} value The value to clone.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Deep clone\n * 2 - Flatten inherited properties\n * 4 - Clone symbols\n * @param {Function} [customizer] The function to customize cloning.\n * @param {string} [key] The key of `value`.\n * @param {Object} [object] The parent object of `value`.\n * @param {Object} [stack] Tracks traversed objects and their clone counterparts.\n * @returns {*} Returns the cloned value.\n */\nfunction baseClone(value, bitmask, customizer, key, object, stack) {\n var result,\n isDeep = bitmask & CLONE_DEEP_FLAG,\n isFlat = bitmask & CLONE_FLAT_FLAG,\n isFull = bitmask & CLONE_SYMBOLS_FLAG;\n\n if (customizer) {\n result = object ? customizer(value, key, object, stack) : customizer(value);\n }\n if (result !== undefined) {\n return result;\n }\n if (!isObject(value)) {\n return value;\n }\n var isArr = isArray(value);\n if (isArr) {\n result = initCloneArray(value);\n if (!isDeep) {\n return copyArray(value, result);\n }\n } else {\n var tag = getTag(value),\n isFunc = tag == funcTag || tag == genTag;\n\n if (isBuffer(value)) {\n return cloneBuffer(value, isDeep);\n }\n if (tag == objectTag || tag == argsTag || (isFunc && !object)) {\n result = (isFlat || isFunc) ? {} : initCloneObject(value);\n if (!isDeep) {\n return isFlat\n ? copySymbolsIn(value, baseAssignIn(result, value))\n : copySymbols(value, baseAssign(result, value));\n }\n } else {\n if (!cloneableTags[tag]) {\n return object ? value : {};\n }\n result = initCloneByTag(value, tag, isDeep);\n }\n }\n // Check for circular references and return its corresponding clone.\n stack || (stack = new Stack);\n var stacked = stack.get(value);\n if (stacked) {\n return stacked;\n }\n stack.set(value, result);\n\n if (isSet(value)) {\n value.forEach(function(subValue) {\n result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));\n });\n } else if (isMap(value)) {\n value.forEach(function(subValue, key) {\n result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n }\n\n var keysFunc = isFull\n ? (isFlat ? getAllKeysIn : getAllKeys)\n : (isFlat ? keysIn : keys);\n\n var props = isArr ? undefined : keysFunc(value);\n arrayEach(props || value, function(subValue, key) {\n if (props) {\n key = subValue;\n subValue = value[key];\n }\n // Recursively populate clone (susceptible to call stack limits).\n assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n return result;\n}\n\nmodule.exports = baseClone;\n","var isObject = require('./isObject');\n\n/** Built-in value references. */\nvar objectCreate = Object.create;\n\n/**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} proto The object to inherit from.\n * @returns {Object} Returns the new object.\n */\nvar baseCreate = (function() {\n function object() {}\n return function(proto) {\n if (!isObject(proto)) {\n return {};\n }\n if (objectCreate) {\n return objectCreate(proto);\n }\n object.prototype = proto;\n var result = new object;\n object.prototype = undefined;\n return result;\n };\n}());\n\nmodule.exports = baseCreate;\n","var arrayPush = require('./_arrayPush'),\n isArray = require('./isArray');\n\n/**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction baseGetAllKeys(object, keysFunc, symbolsFunc) {\n var result = keysFunc(object);\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n}\n\nmodule.exports = baseGetAllKeys;\n","var Symbol = require('./_Symbol'),\n getRawTag = require('./_getRawTag'),\n objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]';\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\nmodule.exports = baseIsArguments;\n","var baseIsEqualDeep = require('./_baseIsEqualDeep'),\n isObjectLike = require('./isObjectLike');\n\n/**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Unordered comparison\n * 2 - Partial comparison\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\nfunction baseIsEqual(value, other, bitmask, customizer, stack) {\n if (value === other) {\n return true;\n }\n if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\n return value !== value && other !== other;\n }\n return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n}\n\nmodule.exports = baseIsEqual;\n","var Stack = require('./_Stack'),\n equalArrays = require('./_equalArrays'),\n equalByTag = require('./_equalByTag'),\n equalObjects = require('./_equalObjects'),\n getTag = require('./_getTag'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isTypedArray = require('./isTypedArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n var objIsArr = isArray(object),\n othIsArr = isArray(other),\n objTag = objIsArr ? arrayTag : getTag(object),\n othTag = othIsArr ? arrayTag : getTag(other);\n\n objTag = objTag == argsTag ? objectTag : objTag;\n othTag = othTag == argsTag ? objectTag : othTag;\n\n var objIsObj = objTag == objectTag,\n othIsObj = othTag == objectTag,\n isSameTag = objTag == othTag;\n\n if (isSameTag && isBuffer(object)) {\n if (!isBuffer(other)) {\n return false;\n }\n objIsArr = true;\n objIsObj = false;\n }\n if (isSameTag && !objIsObj) {\n stack || (stack = new Stack);\n return (objIsArr || isTypedArray(object))\n ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n }\n if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n if (objIsWrapped || othIsWrapped) {\n var objUnwrapped = objIsWrapped ? object.value() : object,\n othUnwrapped = othIsWrapped ? other.value() : other;\n\n stack || (stack = new Stack);\n return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n }\n }\n if (!isSameTag) {\n return false;\n }\n stack || (stack = new Stack);\n return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n}\n\nmodule.exports = baseIsEqualDeep;\n","var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]';\n\n/**\n * The base implementation of `_.isMap` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n */\nfunction baseIsMap(value) {\n return isObjectLike(value) && getTag(value) == mapTag;\n}\n\nmodule.exports = baseIsMap;\n","var isFunction = require('./isFunction'),\n isMasked = require('./_isMasked'),\n isObject = require('./isObject'),\n toSource = require('./_toSource');\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\nmodule.exports = baseIsNative;\n","var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar setTag = '[object Set]';\n\n/**\n * The base implementation of `_.isSet` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n */\nfunction baseIsSet(value) {\n return isObjectLike(value) && getTag(value) == setTag;\n}\n\nmodule.exports = baseIsSet;\n","var baseGetTag = require('./_baseGetTag'),\n isLength = require('./isLength'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n\nmodule.exports = baseIsTypedArray;\n","var isPrototype = require('./_isPrototype'),\n nativeKeys = require('./_nativeKeys');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeys;\n","var isObject = require('./isObject'),\n isPrototype = require('./_isPrototype'),\n nativeKeysIn = require('./_nativeKeysIn');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeysIn(object) {\n if (!isObject(object)) {\n return nativeKeysIn(object);\n }\n var isProto = isPrototype(object),\n result = [];\n\n for (var key in object) {\n if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeysIn;\n","/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\nmodule.exports = baseTimes;\n","/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n return function(value) {\n return func(value);\n };\n}\n\nmodule.exports = baseUnary;\n","/**\n * Checks if a `cache` value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction cacheHas(cache, key) {\n return cache.has(key);\n}\n\nmodule.exports = cacheHas;\n","var Uint8Array = require('./_Uint8Array');\n\n/**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\nfunction cloneArrayBuffer(arrayBuffer) {\n var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n return result;\n}\n\nmodule.exports = cloneArrayBuffer;\n","var root = require('./_root');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined,\n allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;\n\n/**\n * Creates a clone of `buffer`.\n *\n * @private\n * @param {Buffer} buffer The buffer to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Buffer} Returns the cloned buffer.\n */\nfunction cloneBuffer(buffer, isDeep) {\n if (isDeep) {\n return buffer.slice();\n }\n var length = buffer.length,\n result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\n\n buffer.copy(result);\n return result;\n}\n\nmodule.exports = cloneBuffer;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer');\n\n/**\n * Creates a clone of `dataView`.\n *\n * @private\n * @param {Object} dataView The data view to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned data view.\n */\nfunction cloneDataView(dataView, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;\n return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);\n}\n\nmodule.exports = cloneDataView;\n","/** Used to match `RegExp` flags from their coerced string values. */\nvar reFlags = /\\w*$/;\n\n/**\n * Creates a clone of `regexp`.\n *\n * @private\n * @param {Object} regexp The regexp to clone.\n * @returns {Object} Returns the cloned regexp.\n */\nfunction cloneRegExp(regexp) {\n var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));\n result.lastIndex = regexp.lastIndex;\n return result;\n}\n\nmodule.exports = cloneRegExp;\n","var Symbol = require('./_Symbol');\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * Creates a clone of the `symbol` object.\n *\n * @private\n * @param {Object} symbol The symbol object to clone.\n * @returns {Object} Returns the cloned symbol object.\n */\nfunction cloneSymbol(symbol) {\n return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};\n}\n\nmodule.exports = cloneSymbol;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer');\n\n/**\n * Creates a clone of `typedArray`.\n *\n * @private\n * @param {Object} typedArray The typed array to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned typed array.\n */\nfunction cloneTypedArray(typedArray, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n}\n\nmodule.exports = cloneTypedArray;\n","/**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\nfunction copyArray(source, array) {\n var index = -1,\n length = source.length;\n\n array || (array = Array(length));\n while (++index < length) {\n array[index] = source[index];\n }\n return array;\n}\n\nmodule.exports = copyArray;\n","var assignValue = require('./_assignValue'),\n baseAssignValue = require('./_baseAssignValue');\n\n/**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\nfunction copyObject(source, props, object, customizer) {\n var isNew = !object;\n object || (object = {});\n\n var index = -1,\n length = props.length;\n\n while (++index < length) {\n var key = props[index];\n\n var newValue = customizer\n ? customizer(object[key], source[key], key, object, source)\n : undefined;\n\n if (newValue === undefined) {\n newValue = source[key];\n }\n if (isNew) {\n baseAssignValue(object, key, newValue);\n } else {\n assignValue(object, key, newValue);\n }\n }\n return object;\n}\n\nmodule.exports = copyObject;\n","var copyObject = require('./_copyObject'),\n getSymbols = require('./_getSymbols');\n\n/**\n * Copies own symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbols(source, object) {\n return copyObject(source, getSymbols(source), object);\n}\n\nmodule.exports = copySymbols;\n","var copyObject = require('./_copyObject'),\n getSymbolsIn = require('./_getSymbolsIn');\n\n/**\n * Copies own and inherited symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbolsIn(source, object) {\n return copyObject(source, getSymbolsIn(source), object);\n}\n\nmodule.exports = copySymbolsIn;\n","var root = require('./_root');\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\nmodule.exports = coreJsData;\n","var getNative = require('./_getNative');\n\nvar defineProperty = (function() {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n}());\n\nmodule.exports = defineProperty;\n","var SetCache = require('./_SetCache'),\n arraySome = require('./_arraySome'),\n cacheHas = require('./_cacheHas');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\nfunction equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n arrLength = array.length,\n othLength = other.length;\n\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n return false;\n }\n // Check that cyclic values are equal.\n var arrStacked = stack.get(array);\n var othStacked = stack.get(other);\n if (arrStacked && othStacked) {\n return arrStacked == other && othStacked == array;\n }\n var index = -1,\n result = true,\n seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n stack.set(array, other);\n stack.set(other, array);\n\n // Ignore non-index properties.\n while (++index < arrLength) {\n var arrValue = array[index],\n othValue = other[index];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, arrValue, index, other, array, stack)\n : customizer(arrValue, othValue, index, array, other, stack);\n }\n if (compared !== undefined) {\n if (compared) {\n continue;\n }\n result = false;\n break;\n }\n // Recursively compare arrays (susceptible to call stack limits).\n if (seen) {\n if (!arraySome(other, function(othValue, othIndex) {\n if (!cacheHas(seen, othIndex) &&\n (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n return seen.push(othIndex);\n }\n })) {\n result = false;\n break;\n }\n } else if (!(\n arrValue === othValue ||\n equalFunc(arrValue, othValue, bitmask, customizer, stack)\n )) {\n result = false;\n break;\n }\n }\n stack['delete'](array);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalArrays;\n","var Symbol = require('./_Symbol'),\n Uint8Array = require('./_Uint8Array'),\n eq = require('./eq'),\n equalArrays = require('./_equalArrays'),\n mapToArray = require('./_mapToArray'),\n setToArray = require('./_setToArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]';\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n switch (tag) {\n case dataViewTag:\n if ((object.byteLength != other.byteLength) ||\n (object.byteOffset != other.byteOffset)) {\n return false;\n }\n object = object.buffer;\n other = other.buffer;\n\n case arrayBufferTag:\n if ((object.byteLength != other.byteLength) ||\n !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n return false;\n }\n return true;\n\n case boolTag:\n case dateTag:\n case numberTag:\n // Coerce booleans to `1` or `0` and dates to milliseconds.\n // Invalid dates are coerced to `NaN`.\n return eq(+object, +other);\n\n case errorTag:\n return object.name == other.name && object.message == other.message;\n\n case regexpTag:\n case stringTag:\n // Coerce regexes to strings and treat strings, primitives and objects,\n // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n // for more details.\n return object == (other + '');\n\n case mapTag:\n var convert = mapToArray;\n\n case setTag:\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n convert || (convert = setToArray);\n\n if (object.size != other.size && !isPartial) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked) {\n return stacked == other;\n }\n bitmask |= COMPARE_UNORDERED_FLAG;\n\n // Recursively compare objects (susceptible to call stack limits).\n stack.set(object, other);\n var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n stack['delete'](object);\n return result;\n\n case symbolTag:\n if (symbolValueOf) {\n return symbolValueOf.call(object) == symbolValueOf.call(other);\n }\n }\n return false;\n}\n\nmodule.exports = equalByTag;\n","var getAllKeys = require('./_getAllKeys');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n objProps = getAllKeys(object),\n objLength = objProps.length,\n othProps = getAllKeys(other),\n othLength = othProps.length;\n\n if (objLength != othLength && !isPartial) {\n return false;\n }\n var index = objLength;\n while (index--) {\n var key = objProps[index];\n if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n return false;\n }\n }\n // Check that cyclic values are equal.\n var objStacked = stack.get(object);\n var othStacked = stack.get(other);\n if (objStacked && othStacked) {\n return objStacked == other && othStacked == object;\n }\n var result = true;\n stack.set(object, other);\n stack.set(other, object);\n\n var skipCtor = isPartial;\n while (++index < objLength) {\n key = objProps[index];\n var objValue = object[key],\n othValue = other[key];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, objValue, key, other, object, stack)\n : customizer(objValue, othValue, key, object, other, stack);\n }\n // Recursively compare objects (susceptible to call stack limits).\n if (!(compared === undefined\n ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n : compared\n )) {\n result = false;\n break;\n }\n skipCtor || (skipCtor = key == 'constructor');\n }\n if (result && !skipCtor) {\n var objCtor = object.constructor,\n othCtor = other.constructor;\n\n // Non `Object` object instances with different constructors are not equal.\n if (objCtor != othCtor &&\n ('constructor' in object && 'constructor' in other) &&\n !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n result = false;\n }\n }\n stack['delete'](object);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalObjects;\n","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n","var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbols = require('./_getSymbols'),\n keys = require('./keys');\n\n/**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeys(object) {\n return baseGetAllKeys(object, keys, getSymbols);\n}\n\nmodule.exports = getAllKeys;\n","var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbolsIn = require('./_getSymbolsIn'),\n keysIn = require('./keysIn');\n\n/**\n * Creates an array of own and inherited enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeysIn(object) {\n return baseGetAllKeys(object, keysIn, getSymbolsIn);\n}\n\nmodule.exports = getAllKeysIn;\n","var isKeyable = require('./_isKeyable');\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\nmodule.exports = getMapData;\n","var baseIsNative = require('./_baseIsNative'),\n getValue = require('./_getValue');\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\nmodule.exports = getNative;\n","var overArg = require('./_overArg');\n\n/** Built-in value references. */\nvar getPrototype = overArg(Object.getPrototypeOf, Object);\n\nmodule.exports = getPrototype;\n","var Symbol = require('./_Symbol');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nmodule.exports = getRawTag;\n","var arrayFilter = require('./_arrayFilter'),\n stubArray = require('./stubArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n if (object == null) {\n return [];\n }\n object = Object(object);\n return arrayFilter(nativeGetSymbols(object), function(symbol) {\n return propertyIsEnumerable.call(object, symbol);\n });\n};\n\nmodule.exports = getSymbols;\n","var arrayPush = require('./_arrayPush'),\n getPrototype = require('./_getPrototype'),\n getSymbols = require('./_getSymbols'),\n stubArray = require('./stubArray');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own and inherited enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {\n var result = [];\n while (object) {\n arrayPush(result, getSymbols(object));\n object = getPrototype(object);\n }\n return result;\n};\n\nmodule.exports = getSymbolsIn;\n","var DataView = require('./_DataView'),\n Map = require('./_Map'),\n Promise = require('./_Promise'),\n Set = require('./_Set'),\n WeakMap = require('./_WeakMap'),\n baseGetTag = require('./_baseGetTag'),\n toSource = require('./_toSource');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n setTag = '[object Set]',\n weakMapTag = '[object WeakMap]';\n\nvar dataViewTag = '[object DataView]';\n\n/** Used to detect maps, sets, and weakmaps. */\nvar dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nvar getTag = baseGetTag;\n\n// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\nif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = baseGetTag(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : '';\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n}\n\nmodule.exports = getTag;\n","/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\nmodule.exports = getValue;\n","var nativeCreate = require('./_nativeCreate');\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n}\n\nmodule.exports = hashClear;\n","/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = hashDelete;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\nmodule.exports = hashGet;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\nmodule.exports = hashHas;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\nmodule.exports = hashSet;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Initializes an array clone.\n *\n * @private\n * @param {Array} array The array to clone.\n * @returns {Array} Returns the initialized clone.\n */\nfunction initCloneArray(array) {\n var length = array.length,\n result = new array.constructor(length);\n\n // Add properties assigned by `RegExp#exec`.\n if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {\n result.index = array.index;\n result.input = array.input;\n }\n return result;\n}\n\nmodule.exports = initCloneArray;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer'),\n cloneDataView = require('./_cloneDataView'),\n cloneRegExp = require('./_cloneRegExp'),\n cloneSymbol = require('./_cloneSymbol'),\n cloneTypedArray = require('./_cloneTypedArray');\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/**\n * Initializes an object clone based on its `toStringTag`.\n *\n * **Note:** This function only supports cloning values with tags of\n * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.\n *\n * @private\n * @param {Object} object The object to clone.\n * @param {string} tag The `toStringTag` of the object to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneByTag(object, tag, isDeep) {\n var Ctor = object.constructor;\n switch (tag) {\n case arrayBufferTag:\n return cloneArrayBuffer(object);\n\n case boolTag:\n case dateTag:\n return new Ctor(+object);\n\n case dataViewTag:\n return cloneDataView(object, isDeep);\n\n case float32Tag: case float64Tag:\n case int8Tag: case int16Tag: case int32Tag:\n case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:\n return cloneTypedArray(object, isDeep);\n\n case mapTag:\n return new Ctor;\n\n case numberTag:\n case stringTag:\n return new Ctor(object);\n\n case regexpTag:\n return cloneRegExp(object);\n\n case setTag:\n return new Ctor;\n\n case symbolTag:\n return cloneSymbol(object);\n }\n}\n\nmodule.exports = initCloneByTag;\n","var baseCreate = require('./_baseCreate'),\n getPrototype = require('./_getPrototype'),\n isPrototype = require('./_isPrototype');\n\n/**\n * Initializes an object clone.\n *\n * @private\n * @param {Object} object The object to clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneObject(object) {\n return (typeof object.constructor == 'function' && !isPrototype(object))\n ? baseCreate(getPrototype(object))\n : {};\n}\n\nmodule.exports = initCloneObject;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n var type = typeof value;\n length = length == null ? MAX_SAFE_INTEGER : length;\n\n return !!length &&\n (type == 'number' ||\n (type != 'symbol' && reIsUint.test(value))) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\nmodule.exports = isIndex;\n","/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\nmodule.exports = isKeyable;\n","var coreJsData = require('./_coreJsData');\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\nmodule.exports = isMasked;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\nmodule.exports = isPrototype;\n","/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n}\n\nmodule.exports = listCacheClear;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype;\n\n/** Built-in value references. */\nvar splice = arrayProto.splice;\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n}\n\nmodule.exports = listCacheDelete;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\nmodule.exports = listCacheGet;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\nmodule.exports = listCacheHas;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\nmodule.exports = listCacheSet;\n","var Hash = require('./_Hash'),\n ListCache = require('./_ListCache'),\n Map = require('./_Map');\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\nmodule.exports = mapCacheClear;\n","var getMapData = require('./_getMapData');\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = mapCacheDelete;\n","var getMapData = require('./_getMapData');\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\nmodule.exports = mapCacheGet;\n","var getMapData = require('./_getMapData');\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\nmodule.exports = mapCacheHas;\n","var getMapData = require('./_getMapData');\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n}\n\nmodule.exports = mapCacheSet;\n","/**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\nfunction mapToArray(map) {\n var index = -1,\n result = Array(map.size);\n\n map.forEach(function(value, key) {\n result[++index] = [key, value];\n });\n return result;\n}\n\nmodule.exports = mapToArray;\n","var getNative = require('./_getNative');\n\n/* Built-in method references that are verified to be native. */\nvar nativeCreate = getNative(Object, 'create');\n\nmodule.exports = nativeCreate;\n","var overArg = require('./_overArg');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeKeys = overArg(Object.keys, Object);\n\nmodule.exports = nativeKeys;\n","/**\n * This function is like\n * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * except that it includes inherited enumerable properties.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction nativeKeysIn(object) {\n var result = [];\n if (object != null) {\n for (var key in Object(object)) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = nativeKeysIn;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n try {\n // Use `util.types` for Node.js 10+.\n var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n if (types) {\n return types;\n }\n\n // Legacy `process.binding('util')` for Node.js < 10.\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n}());\n\nmodule.exports = nodeUtil;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n","/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\nmodule.exports = overArg;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n","/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\nfunction setCacheAdd(value) {\n this.__data__.set(value, HASH_UNDEFINED);\n return this;\n}\n\nmodule.exports = setCacheAdd;\n","/**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\nfunction setCacheHas(value) {\n return this.__data__.has(value);\n}\n\nmodule.exports = setCacheHas;\n","/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\nfunction setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n}\n\nmodule.exports = setToArray;\n","var ListCache = require('./_ListCache');\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}\n\nmodule.exports = stackClear;\n","/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n var data = this.__data__,\n result = data['delete'](key);\n\n this.size = data.size;\n return result;\n}\n\nmodule.exports = stackDelete;\n","/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n return this.__data__.get(key);\n}\n\nmodule.exports = stackGet;\n","/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n return this.__data__.has(key);\n}\n\nmodule.exports = stackHas;\n","var ListCache = require('./_ListCache'),\n Map = require('./_Map'),\n MapCache = require('./_MapCache');\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n var data = this.__data__;\n if (data instanceof ListCache) {\n var pairs = data.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n this.size = ++data.size;\n return this;\n }\n data = this.__data__ = new MapCache(pairs);\n }\n data.set(key, value);\n this.size = data.size;\n return this;\n}\n\nmodule.exports = stackSet;\n","/** Used for built-in method references. */\nvar funcProto = Function.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\nmodule.exports = toSource;\n","var baseClone = require('./_baseClone');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_SYMBOLS_FLAG = 4;\n\n/**\n * This method is like `_.clone` except that it recursively clones `value`.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Lang\n * @param {*} value The value to recursively clone.\n * @returns {*} Returns the deep cloned value.\n * @see _.clone\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var deep = _.cloneDeep(objects);\n * console.log(deep[0] === objects[0]);\n * // => false\n */\nfunction cloneDeep(value) {\n return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);\n}\n\nmodule.exports = cloneDeep;\n","/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\nmodule.exports = eq;\n","var baseIsArguments = require('./_baseIsArguments'),\n isObjectLike = require('./isObjectLike');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n};\n\nmodule.exports = isArguments;\n","/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\nmodule.exports = isArray;\n","var isFunction = require('./isFunction'),\n isLength = require('./isLength');\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\nmodule.exports = isArrayLike;\n","var root = require('./_root'),\n stubFalse = require('./stubFalse');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\nmodule.exports = isBuffer;\n","var baseIsEqual = require('./_baseIsEqual');\n\n/**\n * Performs a deep comparison between two values to determine if they are\n * equivalent.\n *\n * **Note:** This method supports comparing arrays, array buffers, booleans,\n * date objects, error objects, maps, numbers, `Object` objects, regexes,\n * sets, strings, symbols, and typed arrays. `Object` objects are compared\n * by their own, not inherited, enumerable properties. Functions and DOM\n * nodes are compared by strict equality, i.e. `===`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.isEqual(object, other);\n * // => true\n *\n * object === other;\n * // => false\n */\nfunction isEqual(value, other) {\n return baseIsEqual(value, other);\n}\n\nmodule.exports = isEqual;\n","var baseGetTag = require('./_baseGetTag'),\n isObject = require('./isObject');\n\n/** `Object#toString` result references. */\nvar asyncTag = '[object AsyncFunction]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n proxyTag = '[object Proxy]';\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\nmodule.exports = isFunction;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\nmodule.exports = isLength;\n","var baseIsMap = require('./_baseIsMap'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsMap = nodeUtil && nodeUtil.isMap;\n\n/**\n * Checks if `value` is classified as a `Map` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n * @example\n *\n * _.isMap(new Map);\n * // => true\n *\n * _.isMap(new WeakMap);\n * // => false\n */\nvar isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;\n\nmodule.exports = isMap;\n","/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n","var baseIsSet = require('./_baseIsSet'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsSet = nodeUtil && nodeUtil.isSet;\n\n/**\n * Checks if `value` is classified as a `Set` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n * @example\n *\n * _.isSet(new Set);\n * // => true\n *\n * _.isSet(new WeakSet);\n * // => false\n */\nvar isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;\n\nmodule.exports = isSet;\n","var baseIsTypedArray = require('./_baseIsTypedArray'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\nmodule.exports = isTypedArray;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeys = require('./_baseKeys'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\nmodule.exports = keys;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeysIn = require('./_baseKeysIn'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\nfunction keysIn(object) {\n return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n}\n\nmodule.exports = keysIn;\n","/**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\nfunction stubArray() {\n return [];\n}\n\nmodule.exports = stubArray;\n","/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n return false;\n}\n\nmodule.exports = stubFalse;\n","import { connect, type BaseConnectionOptions } from \"@openfin/core-web\";\nimport { getSettings } from \"./settings\";\n\n/**\n * Initializes the OpenFin Web Broker connection.\n * @param inherit Should we inherit settings from the host (available in the OpenFin layout system) or use settings? Default is true.\n */\nexport async function init(inherit: boolean = true): Promise {\n\t// Set window.fin to the `fin` object.\n\tlet options: BaseConnectionOptions | undefined;\n\tif (window.fin === undefined) {\n\t\tif (!inherit) {\n\t\t\tconst settings = await getSettings();\n\t\t\tif (settings === undefined) {\n\t\t\t\tconsole.error(\n\t\t\t\t\t\"Unable to run the sample as we have been unable to load the web manifest and it's settings from the currently running html page. Please ensure that the web manifest is being served and that it contains the custom_settings section.\"\n\t\t\t\t);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\toptions = {\n\t\t\t\tbrokerUrl: settings.platform.interop.brokerUrl,\n\t\t\t\tinteropConfig: {\n\t\t\t\t\tproviderId: settings.platform.interop.providerId,\n\t\t\t\t\tcurrentContextGroup: settings.platform.interop.defaultContextGroup\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t\t// Specify an interopConfig with a specific provider ID and a context group to initialize the `fin.me.interop` client on connection.\n\t\tif (options) {\n\t\t\twindow.fin = await connect({\n\t\t\t\toptions\n\t\t\t});\n\t\t} else {\n\t\t\twindow.fin = await connect({\n\t\t\t\tconnectionInheritance: \"enabled\"\n\t\t\t});\n\t\t}\n\t\tconsole.log(\"Finished initializing the fin API.\");\n\t\t// Create and dispatch the finReady event\n\t\tconst event = new CustomEvent(\"finReady\");\n\t\twindow.dispatchEvent(event);\n\t}\n\n\tif (window.fdc3 === undefined && window?.fin?.me.interop?.getFDC3Sync !== undefined) {\n\t\twindow.fdc3 = fin.me.interop.getFDC3Sync(\"2.0\");\n\t\tconsole.log(\"Finished initializing the fdc3 API.\");\n\t\t// Create and dispatch the FDC3Ready event\n\t\tconst event = new CustomEvent(\"fdc3Ready\");\n\t\twindow.dispatchEvent(event);\n\t}\n}\n","import type { WebLayoutSnapshot } from \"@openfin/core-web\";\nimport type { Settings } from \"../shapes/setting-shapes\";\n\n/**\n * Fetches the settings for the application.\n * @returns The settings for the application.\n */\nexport async function getSettings(): Promise {\n\tconst settings = await getManifestSettings();\n\tif (settings === undefined) {\n\t\tconsole.error(\n\t\t\t\"Unable to run the example as settings are required and we fetch them from the link web manifest from the html page that is being served. It should exist in the customSettings section of the web manifest.\"\n\t\t);\n\t}\n\treturn settings;\n}\n\n/**\n * Returns a default layout from the settings if provided.\n * @returns The default layout from the settings.\n */\nexport async function getDefaultLayout(): Promise {\n\tconst settings = await getSettings();\n\tif (settings?.platform?.layout?.defaultLayout === undefined) {\n\t\tconsole.error(\n\t\t\t\"Unable to run the example as without a layout being defined. Please ensure that settings have been provided in the web manifest.\"\n\t\t);\n\t\treturn;\n\t}\n\tif (typeof settings.platform.layout.defaultLayout === \"string\") {\n\t\tconst layoutResponse = await fetch(settings.platform.layout.defaultLayout);\n\t\tconst layoutJson = (await layoutResponse.json()) as WebLayoutSnapshot;\n\t\treturn layoutJson;\n\t}\n\treturn settings.platform.layout.defaultLayout;\n}\n\n/**\n * Returns the settings from the manifest file.\n * @returns customSettings for this example\n */\nasync function getManifestSettings(): Promise {\n\t// Get the manifest link\n\tconst link = document.querySelector('link[rel=\"manifest\"]');\n\tif (link !== null) {\n\t\tconst manifestResponse = await fetch(link.href);\n\t\tconst manifestJson = (await manifestResponse.json()) as { custom_settings: Settings };\n\t\treturn manifestJson.custom_settings;\n\t}\n}\n","export { default as v1 } from './v1.js';\nexport { default as v3 } from './v3.js';\nexport { default as v4 } from './v4.js';\nexport { default as v5 } from './v5.js';\nexport { default as NIL } from './nil.js';\nexport { default as version } from './version.js';\nexport { default as validate } from './validate.js';\nexport { default as stringify } from './stringify.js';\nexport { default as parse } from './parse.js';","/*\n * Browser-compatible JavaScript MD5\n *\n * Modification of JavaScript MD5\n * https://github.com/blueimp/JavaScript-MD5\n *\n * Copyright 2011, Sebastian Tschan\n * https://blueimp.net\n *\n * Licensed under the MIT license:\n * https://opensource.org/licenses/MIT\n *\n * Based on\n * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message\n * Digest Algorithm, as defined in RFC 1321.\n * Version 2.2 Copyright (C) Paul Johnston 1999 - 2009\n * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet\n * Distributed under the BSD License\n * See http://pajhome.org.uk/crypt/md5 for more info.\n */\nfunction md5(bytes) {\n if (typeof bytes === 'string') {\n var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape\n\n bytes = new Uint8Array(msg.length);\n\n for (var i = 0; i < msg.length; ++i) {\n bytes[i] = msg.charCodeAt(i);\n }\n }\n\n return md5ToHexEncodedArray(wordsToMd5(bytesToWords(bytes), bytes.length * 8));\n}\n/*\n * Convert an array of little-endian words to an array of bytes\n */\n\n\nfunction md5ToHexEncodedArray(input) {\n var output = [];\n var length32 = input.length * 32;\n var hexTab = '0123456789abcdef';\n\n for (var i = 0; i < length32; i += 8) {\n var x = input[i >> 5] >>> i % 32 & 0xff;\n var hex = parseInt(hexTab.charAt(x >>> 4 & 0x0f) + hexTab.charAt(x & 0x0f), 16);\n output.push(hex);\n }\n\n return output;\n}\n/**\n * Calculate output length with padding and bit length\n */\n\n\nfunction getOutputLength(inputLength8) {\n return (inputLength8 + 64 >>> 9 << 4) + 14 + 1;\n}\n/*\n * Calculate the MD5 of an array of little-endian words, and a bit length.\n */\n\n\nfunction wordsToMd5(x, len) {\n /* append padding */\n x[len >> 5] |= 0x80 << len % 32;\n x[getOutputLength(len) - 1] = len;\n var a = 1732584193;\n var b = -271733879;\n var c = -1732584194;\n var d = 271733878;\n\n for (var i = 0; i < x.length; i += 16) {\n var olda = a;\n var oldb = b;\n var oldc = c;\n var oldd = d;\n a = md5ff(a, b, c, d, x[i], 7, -680876936);\n d = md5ff(d, a, b, c, x[i + 1], 12, -389564586);\n c = md5ff(c, d, a, b, x[i + 2], 17, 606105819);\n b = md5ff(b, c, d, a, x[i + 3], 22, -1044525330);\n a = md5ff(a, b, c, d, x[i + 4], 7, -176418897);\n d = md5ff(d, a, b, c, x[i + 5], 12, 1200080426);\n c = md5ff(c, d, a, b, x[i + 6], 17, -1473231341);\n b = md5ff(b, c, d, a, x[i + 7], 22, -45705983);\n a = md5ff(a, b, c, d, x[i + 8], 7, 1770035416);\n d = md5ff(d, a, b, c, x[i + 9], 12, -1958414417);\n c = md5ff(c, d, a, b, x[i + 10], 17, -42063);\n b = md5ff(b, c, d, a, x[i + 11], 22, -1990404162);\n a = md5ff(a, b, c, d, x[i + 12], 7, 1804603682);\n d = md5ff(d, a, b, c, x[i + 13], 12, -40341101);\n c = md5ff(c, d, a, b, x[i + 14], 17, -1502002290);\n b = md5ff(b, c, d, a, x[i + 15], 22, 1236535329);\n a = md5gg(a, b, c, d, x[i + 1], 5, -165796510);\n d = md5gg(d, a, b, c, x[i + 6], 9, -1069501632);\n c = md5gg(c, d, a, b, x[i + 11], 14, 643717713);\n b = md5gg(b, c, d, a, x[i], 20, -373897302);\n a = md5gg(a, b, c, d, x[i + 5], 5, -701558691);\n d = md5gg(d, a, b, c, x[i + 10], 9, 38016083);\n c = md5gg(c, d, a, b, x[i + 15], 14, -660478335);\n b = md5gg(b, c, d, a, x[i + 4], 20, -405537848);\n a = md5gg(a, b, c, d, x[i + 9], 5, 568446438);\n d = md5gg(d, a, b, c, x[i + 14], 9, -1019803690);\n c = md5gg(c, d, a, b, x[i + 3], 14, -187363961);\n b = md5gg(b, c, d, a, x[i + 8], 20, 1163531501);\n a = md5gg(a, b, c, d, x[i + 13], 5, -1444681467);\n d = md5gg(d, a, b, c, x[i + 2], 9, -51403784);\n c = md5gg(c, d, a, b, x[i + 7], 14, 1735328473);\n b = md5gg(b, c, d, a, x[i + 12], 20, -1926607734);\n a = md5hh(a, b, c, d, x[i + 5], 4, -378558);\n d = md5hh(d, a, b, c, x[i + 8], 11, -2022574463);\n c = md5hh(c, d, a, b, x[i + 11], 16, 1839030562);\n b = md5hh(b, c, d, a, x[i + 14], 23, -35309556);\n a = md5hh(a, b, c, d, x[i + 1], 4, -1530992060);\n d = md5hh(d, a, b, c, x[i + 4], 11, 1272893353);\n c = md5hh(c, d, a, b, x[i + 7], 16, -155497632);\n b = md5hh(b, c, d, a, x[i + 10], 23, -1094730640);\n a = md5hh(a, b, c, d, x[i + 13], 4, 681279174);\n d = md5hh(d, a, b, c, x[i], 11, -358537222);\n c = md5hh(c, d, a, b, x[i + 3], 16, -722521979);\n b = md5hh(b, c, d, a, x[i + 6], 23, 76029189);\n a = md5hh(a, b, c, d, x[i + 9], 4, -640364487);\n d = md5hh(d, a, b, c, x[i + 12], 11, -421815835);\n c = md5hh(c, d, a, b, x[i + 15], 16, 530742520);\n b = md5hh(b, c, d, a, x[i + 2], 23, -995338651);\n a = md5ii(a, b, c, d, x[i], 6, -198630844);\n d = md5ii(d, a, b, c, x[i + 7], 10, 1126891415);\n c = md5ii(c, d, a, b, x[i + 14], 15, -1416354905);\n b = md5ii(b, c, d, a, x[i + 5], 21, -57434055);\n a = md5ii(a, b, c, d, x[i + 12], 6, 1700485571);\n d = md5ii(d, a, b, c, x[i + 3], 10, -1894986606);\n c = md5ii(c, d, a, b, x[i + 10], 15, -1051523);\n b = md5ii(b, c, d, a, x[i + 1], 21, -2054922799);\n a = md5ii(a, b, c, d, x[i + 8], 6, 1873313359);\n d = md5ii(d, a, b, c, x[i + 15], 10, -30611744);\n c = md5ii(c, d, a, b, x[i + 6], 15, -1560198380);\n b = md5ii(b, c, d, a, x[i + 13], 21, 1309151649);\n a = md5ii(a, b, c, d, x[i + 4], 6, -145523070);\n d = md5ii(d, a, b, c, x[i + 11], 10, -1120210379);\n c = md5ii(c, d, a, b, x[i + 2], 15, 718787259);\n b = md5ii(b, c, d, a, x[i + 9], 21, -343485551);\n a = safeAdd(a, olda);\n b = safeAdd(b, oldb);\n c = safeAdd(c, oldc);\n d = safeAdd(d, oldd);\n }\n\n return [a, b, c, d];\n}\n/*\n * Convert an array bytes to an array of little-endian words\n * Characters >255 have their high-byte silently ignored.\n */\n\n\nfunction bytesToWords(input) {\n if (input.length === 0) {\n return [];\n }\n\n var length8 = input.length * 8;\n var output = new Uint32Array(getOutputLength(length8));\n\n for (var i = 0; i < length8; i += 8) {\n output[i >> 5] |= (input[i / 8] & 0xff) << i % 32;\n }\n\n return output;\n}\n/*\n * Add integers, wrapping at 2^32. This uses 16-bit operations internally\n * to work around bugs in some JS interpreters.\n */\n\n\nfunction safeAdd(x, y) {\n var lsw = (x & 0xffff) + (y & 0xffff);\n var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n return msw << 16 | lsw & 0xffff;\n}\n/*\n * Bitwise rotate a 32-bit number to the left.\n */\n\n\nfunction bitRotateLeft(num, cnt) {\n return num << cnt | num >>> 32 - cnt;\n}\n/*\n * These functions implement the four basic operations the algorithm uses.\n */\n\n\nfunction md5cmn(q, a, b, x, s, t) {\n return safeAdd(bitRotateLeft(safeAdd(safeAdd(a, q), safeAdd(x, t)), s), b);\n}\n\nfunction md5ff(a, b, c, d, x, s, t) {\n return md5cmn(b & c | ~b & d, a, b, x, s, t);\n}\n\nfunction md5gg(a, b, c, d, x, s, t) {\n return md5cmn(b & d | c & ~d, a, b, x, s, t);\n}\n\nfunction md5hh(a, b, c, d, x, s, t) {\n return md5cmn(b ^ c ^ d, a, b, x, s, t);\n}\n\nfunction md5ii(a, b, c, d, x, s, t) {\n return md5cmn(c ^ (b | ~d), a, b, x, s, t);\n}\n\nexport default md5;","export default '00000000-0000-0000-0000-000000000000';","import validate from './validate.js';\n\nfunction parse(uuid) {\n if (!validate(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n var v;\n var arr = new Uint8Array(16); // Parse ########-....-....-....-............\n\n arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24;\n arr[1] = v >>> 16 & 0xff;\n arr[2] = v >>> 8 & 0xff;\n arr[3] = v & 0xff; // Parse ........-####-....-....-............\n\n arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8;\n arr[5] = v & 0xff; // Parse ........-....-####-....-............\n\n arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8;\n arr[7] = v & 0xff; // Parse ........-....-....-####-............\n\n arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8;\n arr[9] = v & 0xff; // Parse ........-....-....-....-############\n // (Use \"/\" to avoid 32-bit truncation when bit-shifting high-order bytes)\n\n arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff;\n arr[11] = v / 0x100000000 & 0xff;\n arr[12] = v >>> 24 & 0xff;\n arr[13] = v >>> 16 & 0xff;\n arr[14] = v >>> 8 & 0xff;\n arr[15] = v & 0xff;\n return arr;\n}\n\nexport default parse;","export default /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;","// Unique ID creation requires a high quality random # generator. In the browser we therefore\n// require the crypto API and do not support built-in fallback to lower quality random number\n// generators (like Math.random()).\nvar getRandomValues;\nvar rnds8 = new Uint8Array(16);\nexport default function rng() {\n // lazy load so that environments that need to polyfill have a chance to do so\n if (!getRandomValues) {\n // getRandomValues needs to be invoked in a context where \"this\" is a Crypto implementation. Also,\n // find the complete implementation of crypto (msCrypto) on IE11.\n getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto !== 'undefined' && typeof msCrypto.getRandomValues === 'function' && msCrypto.getRandomValues.bind(msCrypto);\n\n if (!getRandomValues) {\n throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');\n }\n }\n\n return getRandomValues(rnds8);\n}","// Adapted from Chris Veness' SHA1 code at\n// http://www.movable-type.co.uk/scripts/sha1.html\nfunction f(s, x, y, z) {\n switch (s) {\n case 0:\n return x & y ^ ~x & z;\n\n case 1:\n return x ^ y ^ z;\n\n case 2:\n return x & y ^ x & z ^ y & z;\n\n case 3:\n return x ^ y ^ z;\n }\n}\n\nfunction ROTL(x, n) {\n return x << n | x >>> 32 - n;\n}\n\nfunction sha1(bytes) {\n var K = [0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xca62c1d6];\n var H = [0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0];\n\n if (typeof bytes === 'string') {\n var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape\n\n bytes = [];\n\n for (var i = 0; i < msg.length; ++i) {\n bytes.push(msg.charCodeAt(i));\n }\n } else if (!Array.isArray(bytes)) {\n // Convert Array-like to Array\n bytes = Array.prototype.slice.call(bytes);\n }\n\n bytes.push(0x80);\n var l = bytes.length / 4 + 2;\n var N = Math.ceil(l / 16);\n var M = new Array(N);\n\n for (var _i = 0; _i < N; ++_i) {\n var arr = new Uint32Array(16);\n\n for (var j = 0; j < 16; ++j) {\n arr[j] = bytes[_i * 64 + j * 4] << 24 | bytes[_i * 64 + j * 4 + 1] << 16 | bytes[_i * 64 + j * 4 + 2] << 8 | bytes[_i * 64 + j * 4 + 3];\n }\n\n M[_i] = arr;\n }\n\n M[N - 1][14] = (bytes.length - 1) * 8 / Math.pow(2, 32);\n M[N - 1][14] = Math.floor(M[N - 1][14]);\n M[N - 1][15] = (bytes.length - 1) * 8 & 0xffffffff;\n\n for (var _i2 = 0; _i2 < N; ++_i2) {\n var W = new Uint32Array(80);\n\n for (var t = 0; t < 16; ++t) {\n W[t] = M[_i2][t];\n }\n\n for (var _t = 16; _t < 80; ++_t) {\n W[_t] = ROTL(W[_t - 3] ^ W[_t - 8] ^ W[_t - 14] ^ W[_t - 16], 1);\n }\n\n var a = H[0];\n var b = H[1];\n var c = H[2];\n var d = H[3];\n var e = H[4];\n\n for (var _t2 = 0; _t2 < 80; ++_t2) {\n var s = Math.floor(_t2 / 20);\n var T = ROTL(a, 5) + f(s, b, c, d) + e + K[s] + W[_t2] >>> 0;\n e = d;\n d = c;\n c = ROTL(b, 30) >>> 0;\n b = a;\n a = T;\n }\n\n H[0] = H[0] + a >>> 0;\n H[1] = H[1] + b >>> 0;\n H[2] = H[2] + c >>> 0;\n H[3] = H[3] + d >>> 0;\n H[4] = H[4] + e >>> 0;\n }\n\n return [H[0] >> 24 & 0xff, H[0] >> 16 & 0xff, H[0] >> 8 & 0xff, H[0] & 0xff, H[1] >> 24 & 0xff, H[1] >> 16 & 0xff, H[1] >> 8 & 0xff, H[1] & 0xff, H[2] >> 24 & 0xff, H[2] >> 16 & 0xff, H[2] >> 8 & 0xff, H[2] & 0xff, H[3] >> 24 & 0xff, H[3] >> 16 & 0xff, H[3] >> 8 & 0xff, H[3] & 0xff, H[4] >> 24 & 0xff, H[4] >> 16 & 0xff, H[4] >> 8 & 0xff, H[4] & 0xff];\n}\n\nexport default sha1;","import validate from './validate.js';\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\n\nvar byteToHex = [];\n\nfor (var i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).substr(1));\n}\n\nfunction stringify(arr) {\n var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n var uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!validate(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n\n return uuid;\n}\n\nexport default stringify;","import rng from './rng.js';\nimport stringify from './stringify.js'; // **`v1()` - Generate time-based UUID**\n//\n// Inspired by https://github.com/LiosK/UUID.js\n// and http://docs.python.org/library/uuid.html\n\nvar _nodeId;\n\nvar _clockseq; // Previous uuid creation time\n\n\nvar _lastMSecs = 0;\nvar _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details\n\nfunction v1(options, buf, offset) {\n var i = buf && offset || 0;\n var b = buf || new Array(16);\n options = options || {};\n var node = options.node || _nodeId;\n var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not\n // specified. We do this lazily to minimize issues related to insufficient\n // system entropy. See #189\n\n if (node == null || clockseq == null) {\n var seedBytes = options.random || (options.rng || rng)();\n\n if (node == null) {\n // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)\n node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]];\n }\n\n if (clockseq == null) {\n // Per 4.2.2, randomize (14 bit) clockseq\n clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;\n }\n } // UUID timestamps are 100 nano-second units since the Gregorian epoch,\n // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so\n // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'\n // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.\n\n\n var msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock\n // cycle to simulate higher resolution clock\n\n var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs)\n\n var dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression\n\n if (dt < 0 && options.clockseq === undefined) {\n clockseq = clockseq + 1 & 0x3fff;\n } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new\n // time interval\n\n\n if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {\n nsecs = 0;\n } // Per 4.2.1.2 Throw error if too many uuids are requested\n\n\n if (nsecs >= 10000) {\n throw new Error(\"uuid.v1(): Can't create more than 10M uuids/sec\");\n }\n\n _lastMSecs = msecs;\n _lastNSecs = nsecs;\n _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch\n\n msecs += 12219292800000; // `time_low`\n\n var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;\n b[i++] = tl >>> 24 & 0xff;\n b[i++] = tl >>> 16 & 0xff;\n b[i++] = tl >>> 8 & 0xff;\n b[i++] = tl & 0xff; // `time_mid`\n\n var tmh = msecs / 0x100000000 * 10000 & 0xfffffff;\n b[i++] = tmh >>> 8 & 0xff;\n b[i++] = tmh & 0xff; // `time_high_and_version`\n\n b[i++] = tmh >>> 24 & 0xf | 0x10; // include version\n\n b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)\n\n b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low`\n\n b[i++] = clockseq & 0xff; // `node`\n\n for (var n = 0; n < 6; ++n) {\n b[i + n] = node[n];\n }\n\n return buf || stringify(b);\n}\n\nexport default v1;","import v35 from './v35.js';\nimport md5 from './md5.js';\nvar v3 = v35('v3', 0x30, md5);\nexport default v3;","import stringify from './stringify.js';\nimport parse from './parse.js';\n\nfunction stringToBytes(str) {\n str = unescape(encodeURIComponent(str)); // UTF8 escape\n\n var bytes = [];\n\n for (var i = 0; i < str.length; ++i) {\n bytes.push(str.charCodeAt(i));\n }\n\n return bytes;\n}\n\nexport var DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8';\nexport var URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8';\nexport default function (name, version, hashfunc) {\n function generateUUID(value, namespace, buf, offset) {\n if (typeof value === 'string') {\n value = stringToBytes(value);\n }\n\n if (typeof namespace === 'string') {\n namespace = parse(namespace);\n }\n\n if (namespace.length !== 16) {\n throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)');\n } // Compute hash of namespace and value, Per 4.3\n // Future: Use spread syntax when supported on all platforms, e.g. `bytes =\n // hashfunc([...namespace, ... value])`\n\n\n var bytes = new Uint8Array(16 + value.length);\n bytes.set(namespace);\n bytes.set(value, namespace.length);\n bytes = hashfunc(bytes);\n bytes[6] = bytes[6] & 0x0f | version;\n bytes[8] = bytes[8] & 0x3f | 0x80;\n\n if (buf) {\n offset = offset || 0;\n\n for (var i = 0; i < 16; ++i) {\n buf[offset + i] = bytes[i];\n }\n\n return buf;\n }\n\n return stringify(bytes);\n } // Function#name is not settable on some platforms (#270)\n\n\n try {\n generateUUID.name = name; // eslint-disable-next-line no-empty\n } catch (err) {} // For CommonJS default export support\n\n\n generateUUID.DNS = DNS;\n generateUUID.URL = URL;\n return generateUUID;\n}","import rng from './rng.js';\nimport stringify from './stringify.js';\n\nfunction v4(options, buf, offset) {\n options = options || {};\n var rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n offset = offset || 0;\n\n for (var i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n\n return buf;\n }\n\n return stringify(rnds);\n}\n\nexport default v4;","import v35 from './v35.js';\nimport sha1 from './sha1.js';\nvar v5 = v35('v5', 0x50, sha1);\nexport default v5;","import REGEX from './regex.js';\n\nfunction validate(uuid) {\n return typeof uuid === 'string' && REGEX.test(uuid);\n}\n\nexport default validate;","import validate from './validate.js';\n\nfunction version(uuid) {\n if (!validate(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n return parseInt(uuid.substr(14, 1), 16);\n}\n\nexport default version;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = (module) => {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","import type { Context } from \"@finos/fdc3\";\nimport { init } from \"../platform/api\";\n\nwindow.addEventListener(\"DOMContentLoaded\", async () => {\n\tawait init(false);\n\tawait initializeDOM();\n});\n\n/**\n * Adds an FDC3 context listener to the window.\n */\nasync function addFDC3Listener(): Promise {\n\tif (window.fdc3) {\n\t\tawait window.fdc3.addContextListener(null, (context) => {\n\t\t\tupdateDOMElements(context);\n\t\t});\n\t} else {\n\t\twindow.addEventListener(\"fdc3Ready\", async () => {\n\t\t\tawait window.fdc3.addContextListener(null, (context) => {\n\t\t\t\tupdateDOMElements(context);\n\t\t\t});\n\t\t});\n\t}\n}\n\n/**\n * Updates the DOM elements with the provided context.\n * @param context The context to update the DOM elements with.\n */\nfunction updateDOMElements(context: Context): void {\n\tconst contextTypeSpan = document.querySelector(\"#contextType\");\n\tconst contextNameSpan = document.querySelector(\"#contextName\");\n\tconst contextBodyPre = document.querySelector(\"#contextBody\");\n\n\tif (contextTypeSpan !== null && contextNameSpan !== null && contextBodyPre !== null) {\n\t\tcontextTypeSpan.textContent = context.type;\n\t\tcontextNameSpan.textContent = context.name ?? \"No name provided.\";\n\t\tcontextBodyPre.textContent = JSON.stringify(context, null, 2);\n\t}\n}\n\n/**\n * Initialize the DOM elements.\n */\nasync function initializeDOM(): Promise {\n\tawait addFDC3Listener();\n}\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/web/v19.2.0/cloud-interop/js/fdc3-view.bundle.js b/web/v19.2.0/cloud-interop/js/fdc3-view.bundle.js index 2b461d7..b618e9f 100644 --- a/web/v19.2.0/cloud-interop/js/fdc3-view.bundle.js +++ b/web/v19.2.0/cloud-interop/js/fdc3-view.bundle.js @@ -1,38 +1,38 @@ /******/ (() => { // webpackBootstrap /******/ var __webpack_modules__ = ({ -/***/ "./node_modules/@openfin/core-web/out/api-client.js": -/*!**********************************************************!*\ - !*** ./node_modules/@openfin/core-web/out/api-client.js ***! - \**********************************************************/ +/***/ "../../node_modules/@openfin/core-web/out/api-client.js": +/*!**************************************************************!*\ + !*** ../../node_modules/@openfin/core-web/out/api-client.js ***! + \**************************************************************/ /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; -var e=__webpack_require__(/*! ./main-8cad4070.js */ "./node_modules/@openfin/core-web/out/main-8cad4070.js");__webpack_require__(/*! buffer/ */ "../../node_modules/buffer/index.js"),__webpack_require__(/*! uuid */ "../../node_modules/uuid/dist/esm-browser/index.js"),__webpack_require__(/*! events */ "../../node_modules/events/events.js"),__webpack_require__(/*! lodash/cloneDeep */ "../../node_modules/lodash/cloneDeep.js"),__webpack_require__(/*! lodash/isEqual */ "../../node_modules/lodash/isEqual.js"),exports.connect=e.connect; +var e=__webpack_require__(/*! ./main-8cad4070.js */ "../../node_modules/@openfin/core-web/out/main-8cad4070.js");__webpack_require__(/*! buffer/ */ "../../node_modules/buffer/index.js"),__webpack_require__(/*! uuid */ "../../node_modules/uuid/dist/esm-browser/index.js"),__webpack_require__(/*! events */ "../../node_modules/events/events.js"),__webpack_require__(/*! lodash/cloneDeep */ "../../node_modules/lodash/cloneDeep.js"),__webpack_require__(/*! lodash/isEqual */ "../../node_modules/lodash/isEqual.js"),exports.connect=e.connect; /***/ }), -/***/ "./node_modules/@openfin/core-web/out/main-8cad4070.js": -/*!*************************************************************!*\ - !*** ./node_modules/@openfin/core-web/out/main-8cad4070.js ***! - \*************************************************************/ +/***/ "../../node_modules/@openfin/core-web/out/main-8cad4070.js": +/*!*****************************************************************!*\ + !*** ../../node_modules/@openfin/core-web/out/main-8cad4070.js ***! + \*****************************************************************/ /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; -var e=__webpack_require__(/*! buffer/ */ "../../node_modules/buffer/index.js"),t=__webpack_require__(/*! events */ "../../node_modules/events/events.js"),n=__webpack_require__(/*! lodash/cloneDeep */ "../../node_modules/lodash/cloneDeep.js"),i=__webpack_require__(/*! lodash/isEqual */ "../../node_modules/lodash/isEqual.js"),r=__webpack_require__(/*! uuid */ "../../node_modules/uuid/dist/esm-browser/index.js");const o=(e,t)=>`${t}<${btoa(JSON.stringify(e))}>`;var s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof __webpack_require__.g?__webpack_require__.g:"undefined"!=typeof self?self:{},a={},c={},d={},h={};async function l(e){const t=[];for(const n of e){const e=await n();t.push(e)}return t}Object.defineProperty(h,"__esModule",{value:!0}),h.promiseMapSerial=h.serial=h.promiseMap=h.promisify=void 0,h.promisify=function(e){return(...t)=>new Promise(((n,i)=>{e(...t,((e,t)=>e?i(e):n(t)))}))},h.promiseMap=async function(e,t){return Promise.all(e.map(t))},h.serial=l,h.promiseMapSerial=async function(e,t){return l(e.map(((e,n,i)=>()=>t(e,n,i))))};var u,p=s&&s.__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},w=s&&s.__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)};Object.defineProperty(d,"__esModule",{value:!0}),d.Reply=d.EmitterBase=d.Base=void 0;const y=h;class f{constructor(e){this.isNodeEnvironment=()=>"node"===this.wire.environment.type,this.isOpenFinEnvironment=()=>"openfin"===this.wire.environment.type,this.isBrowserEnvironment=()=>"other"===this.wire.environment.type,this.wire=e}get fin(){return this.wire.getFin()}get me(){return this.wire.me}}d.Base=f;d.EmitterBase=class extends f{constructor(e,t,...n){super(e),this.topic=t,u.set(this,void 0),this.eventNames=()=>this.hasEmitter()?this.getOrCreateEmitter().eventNames():[],this.emit=(e,t,...n)=>!!this.hasEmitter()&&this.getOrCreateEmitter().emit(e,t,...n),this.hasEmitter=()=>this.wire.eventAggregator.has(w(this,u,"f")),this.getOrCreateEmitter=()=>this.wire.eventAggregator.getOrCreate(w(this,u,"f")),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[],this.listenerCount=e=>this.hasEmitter()?this.getOrCreateEmitter().listenerCount(e):0,this.registerEventListener=async(e,t={},n,i)=>{const r={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e},o=this.getOrCreateEmitter();n(o);try{await this.wire.sendAction("subscribe-to-desktop-event",r)}catch(e){throw i(o),this.deleteEmitterIfNothingRegistered(o),e}},this.deregisterEventListener=async(e,t={})=>{if(this.hasEmitter()){const n={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e};await this.wire.sendAction("unsubscribe-to-desktop-event",n).catch((()=>null));return this.getOrCreateEmitter()}return Promise.resolve()},p(this,u,[t,...n],"f"),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[]}async on(e,t,n){return await this.registerEventListener(e,n,(n=>{n.on(e,t)}),(n=>{n.removeListener(e,t)})),this}async addListener(e,t,n){return this.on(e,t,n)}async once(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.once(e,i),n.once(e,t)}),(n=>{n.removeListener(e,i),n.removeListener(e,t)})),this}async prependListener(e,t,n){return await this.registerEventListener(e,n,(n=>{n.prependListener(e,t)}),(n=>{n.removeListener(e,t)})),this}async prependOnceListener(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.prependOnceListener(e,t),n.once(e,i)}),(n=>{n.removeListener(e,t),n.removeListener(e,i)})),this}async removeListener(e,t,n){const i=await this.deregisterEventListener(e,n);return i&&(i.removeListener(e,t),this.deleteEmitterIfNothingRegistered(i)),this}async deregisterAllListeners(e){const t={...this.identity,type:e,topic:this.topic};if(this.hasEmitter()){const e=this.getOrCreateEmitter(),n=e.listenerCount(t.type),i=[];for(let e=0;enull)));return await Promise.all(i),e}}async removeAllListeners(e){const t=async e=>{const t=await this.deregisterAllListeners(e);t&&(t.removeAllListeners(e),this.deleteEmitterIfNothingRegistered(t))};if(e)await t(e);else if(this.hasEmitter()){const e=this.getOrCreateEmitter().eventNames();await(0,y.promiseMap)(e,t)}return this}deleteEmitterIfNothingRegistered(e){0===e.eventNames().length&&this.wire.eventAggregator.delete(w(this,u,"f"))}},u=new WeakMap;d.Reply=class{};var g={};Object.defineProperty(g,"__esModule",{value:!0});var m=g.RuntimeError=g.NotSupportedError=g.NotImplementedError=g.NoAckError=g.DuplicateCorrelationError=g.UnexpectedActionError=g.DisconnectedError=void 0;class v extends Error{constructor(e){super(`Expected websocket state OPEN but found ${e}`),this.readyState=e}}g.DisconnectedError=v;class C extends Error{}g.UnexpectedActionError=C;class b extends Error{}g.DuplicateCorrelationError=b;class I extends Error{}g.NoAckError=I;class E extends Error{}g.NotImplementedError=E;class x extends Error{}g.NotSupportedError=x;class A extends Error{constructor(e){const{message:t,name:n,stack:i,...r}=e;super(t),this.name=n||"Error",this.stack=i??this.toString(),Object.keys(r).forEach((e=>{this[e]=r[e]}))}}class P extends Error{static getCallSite(e=0){const t=Error.stackTraceLimit,n=e+1;Error.stackTraceLimit=t+n;const i=Error.prepareStackTrace;Error.prepareStackTrace=(e,t)=>t;const r=(new Error).stack?.slice(n)??[];return Error.prepareStackTrace=i,Error.stackTraceLimit=t,r}static prepareStackTrace(e,t){if("function"==typeof Error.prepareStackTrace)return Error.prepareStackTrace(e,t);let n="";n+=e.name||"Error",n+=`: ${e.message||""}`;for(const e of t)n+=`\n at ${e.toString()}`;return n}constructor(e,t){const{reason:n,error:i}=e;super(n),this.name="RuntimeError",i?.stack&&(this.cause=new A(i)),t&&(this.stack=P.prepareStackTrace(this,t))}}m=g.RuntimeError=P;var M={},_={},O={};Object.defineProperty(O,"__esModule",{value:!0}),O.validateIdentity=void 0,O.validateIdentity=function(e){let t;return"object"==typeof e&&"string"==typeof e.uuid||(t="Not a valid identity object"),t};var S={},R={},F={},j={},k={},L={},T={};Object.defineProperty(T,"__esModule",{value:!0}),T.handleDeprecatedWarnings=void 0;var $;T.handleDeprecatedWarnings=e=>{(e.contentNavigation?.whitelist||e.contentNavigation?.blacklist||e.contentRedirect?.whitelist||e.contentRedirect?.blacklist)&&console.warn("The properties 'whitelist' and 'blacklist' have been marked as deprecated and will be removed in a future version. Please use 'allowlist' and 'denylist'.")};var B={},G={};Object.defineProperty(G,"__esModule",{value:!0}),G.AsyncRetryableLazy=W=G.Lazy=void 0;var W=G.Lazy=class{constructor(e){this.producerFn=e}getValue(){return this.value||(this.value=this.producerFn()),this.value}};G.AsyncRetryableLazy=class{constructor(e){this.producerFn=e}async getValue(){return this.promise||(this.promise=this.producerFn().catch((e=>{throw delete this.promise,e}))),this.promise}};var H={};Object.defineProperty(H,"__esModule",{value:!0}),H.WebContents=void 0;const N=d;class D extends N.EmitterBase{constructor(e,t,n){super(e,n,t.uuid,t.name),this.identity=t,this.entityType=n}capturePage(e){return this.wire.sendAction("capture-page",{options:e,...this.identity}).then((({payload:e})=>e.data))}executeJavaScript(e){return this.wire.sendAction("execute-javascript-in-window",{...this.identity,code:e}).then((({payload:e})=>e.data))}getZoomLevel(){return this.wire.sendAction("get-zoom-level",this.identity).then((({payload:e})=>e.data))}setZoomLevel(e){return this.wire.sendAction("set-zoom-level",{...this.identity,level:e}).then((()=>{}))}navigate(e){return this.wire.sendAction("navigate-window",{...this.identity,url:e}).then((()=>{}))}navigateBack(){return this.wire.sendAction("navigate-window-back",{...this.identity}).then((()=>{}))}async navigateForward(){await this.wire.sendAction("navigate-window-forward",{...this.identity})}stopNavigation(){return this.wire.sendAction("stop-window-navigation",{...this.identity}).then((()=>{}))}reload(e=!1){return this.wire.sendAction("reload-window",{ignoreCache:e,...this.identity}).then((()=>{}))}print(e={}){return this.wire.sendAction("print",{...this.identity,options:e}).then((()=>{}))}findInPage(e,t){return this.wire.sendAction("find-in-page",{...this.identity,searchTerm:e,options:t}).then((({payload:e})=>e.data))}stopFindInPage(e){return this.wire.sendAction("stop-find-in-page",{...this.identity,action:e}).then((()=>{}))}getPrinters(){return this.wire.sendAction("get-printers",{...this.identity}).then((({payload:e})=>e.data))}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){await this.wire.sendAction("focus-window",{emitSynthFocused:e,...this.identity})}async showDeveloperTools(){await this.wire.sendAction("show-developer-tools",this.identity)}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction("get-process-info",this.identity);return e}async getSharedWorkers(){return this.wire.sendAction("get-shared-workers",this.identity).then((({payload:e})=>e.data))}async inspectSharedWorker(){await this.wire.sendAction("inspect-shared-worker",{...this.identity})}async inspectSharedWorkerById(e){await this.wire.sendAction("inspect-shared-worker-by-id",{...this.identity,workerId:e})}async inspectServiceWorker(){await this.wire.sendAction("inspect-service-worker",{...this.identity})}async showPopupWindow(e){if(this.wire.sendAction(`${this.entityType}-show-popup-window`,this.identity).catch((()=>{})),e?.onPopupReady){const t=async({popupName:t})=>{try{const n=this.fin.Window.wrapSync({uuid:this.fin.me.uuid,name:t});await e.onPopupReady(n)}catch(e){throw new Error(`Something went wrong during onPopupReady execution: ${e}`)}};await this.once("popup-ready",t)}const{payload:t}=await this.wire.sendAction("try-create-popup-window",{options:{...e,hasResultCallback:!!e?.onPopupResult,hasReadyCallback:!!e?.onPopupReady},...this.identity}),{data:{willOpen:n,options:i}}=t;n&&await this.fin.Window.create(i.initialOptions);if(e?.onPopupResult){const t=async t=>{await e.onPopupResult((e=>{const{name:t,uuid:n,result:i,data:r}=e,o={identity:{name:t,uuid:n},result:i};return r&&(o.data=r),o})(t))},n=async()=>{await this.removeListener("popup-result",t)};await this.on("popup-result",t),await this.once("popup-teardown",n)}const{payload:r}=await this.wire.sendAction("show-popup-window",{options:i,...this.identity});return r.data}}var U,V,z,K,q;function J(){return V||(V=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(function(){if($)return L;$=1,Object.defineProperty(L,"__esModule",{value:!0}),L.ViewModule=void 0;const e=d,t=O,n=J(),i=T;class r extends e.Base{async create(e){const{uuid:t}=this.wire.me;if(!e.name||"string"!=typeof e.name)throw new Error("Please provide a name property as a string in order to create a View.");return(0,i.handleDeprecatedWarnings)(e),this.wire.environment.childViews?await this.wire.environment.createChildContent({entityType:"view",options:{...e,uuid:t}}):await this.wire.sendAction("create-view",{...e,uuid:t}),this.wrapSync({uuid:t,name:e.name})}async wrap(e){this.wire.sendAction("view-wrap").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}wrapSync(e){this.wire.sendAction("view-wrap-sync").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}getCurrent(){if(this.wire.sendAction("view-get-current").catch((e=>{})),!this.wire.me.isView)throw new Error("You are not in a View context");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction("view-get-current-sync").catch((e=>{})),!this.wire.me.isView)throw new Error("You are not in a View context");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return L.ViewModule=r,L}(),e),n(function(){if(U)return B;var e;U=1,Object.defineProperty(B,"__esModule",{value:!0}),B.View=void 0;const t=g,n=G,i=H,r=ie();class o extends i.WebContents{constructor(i,o){super(i,o,"view"),this.identity=o,e.set(this,new n.Lazy((()=>this.fin.Platform.wrapSync(this.identity).getClient()))),this.attach=async e=>{await this.wire.sendAction("attach-view",{target:e,...this.identity})},this.destroy=async()=>{await this.wire.sendAction("destroy-view",{...this.identity})},this.show=async()=>{await this.wire.sendAction("show-view",{...this.identity})},this.showAt=async(e,t={})=>{await this.wire.sendAction("show-view-at",{bounds:e,...this.identity,options:t})},this.bringToFront=async()=>{await this.wire.sendAction("bring-view-to-front",{...this.identity})},this.hide=async()=>{await this.wire.sendAction("hide-view",{...this.identity})},this.setBounds=async e=>{await this.wire.sendAction("set-view-bounds",{bounds:e,...this.identity})},this.getBounds=async()=>(await this.wire.sendAction("get-view-bounds",{...this.identity})).payload.data,this.getInfo=async()=>(await this.wire.sendAction("get-view-info",{...this.identity})).payload.data,this.getParentLayout=async()=>(this.wire.sendAction("view-get-parent-layout",{...this.identity}).catch((()=>{})),this.fin.Platform.Layout.getLayoutByViewIdentity(this.identity)),this.getOptions=async()=>this.wire.sendAction("get-view-options",{...this.identity}).then((({payload:e})=>e.data)),this.updateOptions=async e=>this.wire.sendAction("update-view-options",{options:e,...this.identity}).then((()=>{})),this.getCurrentWindow=async()=>{const{payload:{data:e}}=await this.wire.sendAction("get-view-window",{...this.identity});return new r._Window(this.wire,e)},this.getCurrentStack=async()=>{this.wire.sendAction("view-get-current-stack").catch((()=>{}));try{return(await this.getParentLayout()).getStackByViewIdentity(this.identity)}catch(e){throw new t.RuntimeError({reason:"This view does not belong to a stack.",error:e})}},this.triggerBeforeUnload=async()=>(await this.wire.sendAction("trigger-before-unload",{...this.identity})).payload.data,this.bindToElement=async e=>{if(!e)throw new Error("Element not found.");return this.wire.environment.observeBounds(e,(async e=>this.setBounds(e)))}}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){const t=await this.getCurrentWindow();await t.focusedWebViewWasChanged(),await super.focus({emitSynthFocused:e})}}return B.View=o,e=new WeakMap,B}(),e)}(k)),k}function Y(){if(z)return j;z=1,Object.defineProperty(j,"__esModule",{value:!0}),j.Application=void 0;const e=d,t=ie(),n=J();class i extends e.EmitterBase{constructor(e,n){super(e,"application",n.uuid),this.identity=n,this.window=new t._Window(this.wire,{uuid:this.identity.uuid,name:this.identity.uuid})}windowListFromIdentityList(e){const n=[];return e.forEach((e=>{n.push(new t._Window(this.wire,{uuid:e.uuid,name:e.name}))})),n}isRunning(){return this.wire.sendAction("is-application-running",this.identity).then((({payload:e})=>e.data))}async quit(e=!1){try{await this._close(e),await this.wire.sendAction("destroy-application",{force:e,...this.identity})}catch(e){if(!["Remote connection has closed","Could not locate the requested application"].some((t=>e.message.includes(t))))throw e}}async _close(e=!1){try{await this.wire.sendAction("close-application",{force:e,...this.identity})}catch(e){if(!e.message.includes("Remote connection has closed"))throw e}}close(e=!1){return console.warn("Deprecation Warning: Application.close is deprecated Please use Application.quit"),this.wire.sendAction("application-close",this.identity).catch((e=>{})),this._close(e)}getChildWindows(){return this.wire.sendAction("get-child-windows",this.identity).then((({payload:e})=>{const t=[];return e.data.forEach((e=>{t.push({uuid:this.identity.uuid,name:e})})),this.windowListFromIdentityList(t)}))}getManifest(){return this.wire.sendAction("get-application-manifest",this.identity).then((({payload:e})=>e.data))}getParentUuid(){return this.wire.sendAction("get-parent-application",this.identity).then((({payload:e})=>e.data))}getShortcuts(){return this.wire.sendAction("get-shortcuts",this.identity).then((({payload:e})=>e.data))}async getViews(){const{payload:e}=await this.wire.sendAction("application-get-views",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}getZoomLevel(){return this.wire.sendAction("get-application-zoom-level",this.identity).then((({payload:e})=>e.data))}getWindow(){return this.wire.sendAction("application-get-window",this.identity).catch((e=>{})),Promise.resolve(this.window)}registerUser(e,t){return this.wire.sendAction("register-user",{userName:e,appName:t,...this.identity}).then((()=>{}))}removeTrayIcon(){return this.wire.sendAction("remove-tray-icon",this.identity).then((()=>{}))}restart(){return this.wire.sendAction("restart-application",this.identity).then((()=>{}))}run(){return console.warn("Deprecation Warning: Application.run is deprecated Please use fin.Application.start"),this.wire.sendAction("application-run",this.identity).catch((e=>{})),this._run()}_run(e={}){return this.wire.sendAction("run-application",{manifestUrl:this._manifestUrl,opts:e,...this.identity}).then((()=>{}))}scheduleRestart(){return this.wire.sendAction("relaunch-on-close",this.identity).then((()=>{}))}async sendApplicationLog(){const{payload:e}=await this.wire.sendAction("send-application-log",this.identity);return e.data}async setJumpList(e){await this.wire.sendAction("set-jump-list",{config:e,...this.identity})}setTrayIcon(e){return this.wire.sendAction("set-tray-icon",{enabledIcon:e,...this.identity}).then((()=>{}))}setShortcuts(e){return this.wire.sendAction("set-shortcuts",{data:e,...this.identity}).then((()=>{}))}async setShortcutQueryParams(e){await this.wire.sendAction("set-shortcut-query-args",{data:e,...this.identity})}setZoomLevel(e){return this.wire.sendAction("set-application-zoom-level",{level:e,...this.identity}).then((()=>{}))}async setAppLogUsername(e){await this.wire.sendAction("set-app-log-username",{data:e,...this.identity})}getTrayIconInfo(){return this.wire.sendAction("get-tray-icon-info",this.identity).then((({payload:e})=>e.data))}hasTrayIcon(){return this.wire.sendAction("has-tray-icon",this.identity).then((({payload:e})=>e.data))}terminate(){return this.wire.sendAction("terminate-application",this.identity).then((()=>{}))}wait(){return this.wire.sendAction("wait-for-hung-application",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction("get-info",this.identity).then((({payload:e})=>e.data))}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction("application-get-process-info",this.identity);return e}async setFileDownloadLocation(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t};await this.wire.sendAction("set-file-download-location",{...n,downloadLocation:e})}async getFileDownloadLocation(){const{payload:{data:e}}=await this.wire.sendAction("get-file-download-location",this.identity);return e}async showTrayIconPopupMenu(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t},{payload:i}=await this.wire.sendAction("show-tray-icon-popup-menu",{...n,options:e});return i.data}async closeTrayIconPopupMenu(){const{name:e}=this.wire.me,t={uuid:this.identity.uuid,name:e};await this.wire.sendAction("close-tray-icon-popup-menu",{...t})}}return j.Application=i,j}function Z(){return q||(q=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(function(){if(K)return F;K=1,Object.defineProperty(F,"__esModule",{value:!0}),F.ApplicationModule=void 0;const e=d,t=O,n=Y();class i extends e.Base{async wrap(e){this.wire.sendAction("wrap-application").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}wrapSync(e){this.wire.sendAction("wrap-application-sync").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}async _create(e){return void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&void 0===e.isPlatformController&&(e.autoShow=!0),await this.wire.sendAction("create-application",e),this.wrap({uuid:e.uuid})}create(e){return console.warn("Deprecation Warning: fin.Application.create is deprecated. Please use fin.Application.start"),this.wire.sendAction("application-create").catch((e=>{})),this._create(e)}async start(e){this.wire.sendAction("start-application").catch((e=>{}));const t=await this._create(e);return await this.wire.sendAction("run-application",{uuid:e.uuid}),t}async startManyManifests(e,t){return this.wire.sendAction("run-applications",{applications:e,opts:t}).then((()=>{}))}getCurrent(){return this.wire.sendAction("get-current-application").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction("get-current-application-sync").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}async startFromManifest(e,t){this.wire.sendAction("application-start-from-manifest").catch((e=>{}));const n=await this._createFromManifest(e);return await n._run(t),n}createFromManifest(e){return console.warn("Deprecation Warning: fin.Application.createFromManifest is deprecated. Please use fin.Application.startFromManifest"),this.wire.sendAction("application-create-from-manifest").catch((e=>{})),this._createFromManifest(e)}_createFromManifest(e){return this.wire.sendAction("get-application-manifest",{manifestUrl:e}).then((({payload:e})=>{const t=e.data.platform?e.data.platform.uuid:e.data.startup_app.uuid;return this.wrap({uuid:t})})).then((t=>(t._manifestUrl=e,t)))}}return F.ApplicationModule=i,F}(),e),n(Y(),e)}(R)),R}H.WebContents=D;var Q={};Object.defineProperty(Q,"__esModule",{value:!0}),Q.promisifySubscription=void 0;var X,ee,te;function ne(){if(X)return S;X=1,Object.defineProperty(S,"__esModule",{value:!0}),S._Window=void 0;const e=Z(),t=H,n=J(),i=T,r=Q;class o extends t.WebContents{constructor(e,t){super(e,t,"window")}async createWindow(e){this.wire.sendAction("window-create-window",this.identity).catch((e=>{}));const t=await(0,r.promisifySubscription)(this,"fire-constructor-callback");void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&(e.autoShow=!0),(0,i.handleDeprecatedWarnings)(e);const n=this.wire.environment.createChildContent({entityType:"window",options:e}),[o]=await Promise.all([t.getValue(),n]);let s;const{success:a}=o,c=o.data,{message:d}=c;s=a?{httpResponseCode:c.httpResponseCode,apiInjected:c.apiInjected}:{message:c.message,networkErrorCode:c.networkErrorCode,stack:c.stack};const h={message:d,cbPayload:s,success:a};try{this.getWebWindow().fin.__internal_.openerSuccessCBCalled()}catch(e){}return h.success?this:Promise.reject(h)}getAllFrames(){return this.wire.sendAction("get-all-frames",this.identity).then((({payload:e})=>e.data))}getBounds(){return this.wire.sendAction("get-window-bounds",this.identity).then((({payload:e})=>e.data))}center(){return this.wire.sendAction("center-window",this.identity).then((()=>{}))}blur(){return this.wire.sendAction("blur-window",this.identity).then((()=>{}))}bringToFront(){return this.wire.sendAction("bring-window-to-front",this.identity).then((()=>{}))}animate(e,t){return this.wire.sendAction("animate-window",{transitions:e,options:t,...this.identity}).then((()=>{}))}hide(){return this.wire.sendAction("hide-window",this.identity).then((()=>{}))}close(e=!1){return this.wire.sendAction("close-window",{force:e,...this.identity}).then((()=>{Object.setPrototypeOf(this,null)}))}focusedWebViewWasChanged(){return this.wire.sendAction("focused-webview-changed",this.identity).then((()=>{}))}getNativeId(){return this.wire.sendAction("get-window-native-id",this.identity).then((({payload:e})=>e.data))}async getCurrentViews(){const{payload:e}=await this.wire.sendAction("window-get-views",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}disableFrame(){return console.warn("Function is deprecated; use disableUserMovement instead."),this.wire.sendAction("disable-window-frame",this.identity).then((()=>{}))}disableUserMovement(){return this.wire.sendAction("disable-window-frame",this.identity).then((()=>{}))}enableFrame(){return console.warn("Function is deprecated; use enableUserMovement instead."),this.wire.sendAction("enable-window-frame",this.identity).then((()=>{}))}enableUserMovement(){return this.wire.sendAction("enable-window-frame",this.identity).then((()=>{}))}flash(){return this.wire.sendAction("flash-window",this.identity).then((()=>{}))}stopFlashing(){return this.wire.sendAction("stop-flash-window",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction("get-window-info",this.identity).then((({payload:e})=>e.data))}async getLayout(e){this.wire.sendAction("window-get-layout",this.identity).catch((e=>{}));const t=await this.getOptions();if(!t.layout&&!t.layoutSnapshot)throw new Error("Window does not have a Layout");return this.fin.Platform.Layout.wrap(e??this.identity)}getOptions(){return this.wire.sendAction("get-window-options",this.identity).then((({payload:e})=>e.data))}getParentApplication(){return this.wire.sendAction("window-get-parent-application",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity))}getParentWindow(){return this.wire.sendAction("window-get-parent-window",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity)).then((e=>e.getWindow()))}async getSnapshot(e){const t={area:e,...this.identity};console.warn("Window.getSnapshot has been deprecated, please use Window.capturePage");return(await this.wire.sendAction("get-window-snapshot",t)).payload.data}getState(){return this.wire.sendAction("get-window-state",this.identity).then((({payload:e})=>e.data))}getWebWindow(){return this.wire.sendAction("window-get-web-window",this.identity).catch((e=>{})),this.wire.environment.getWebWindow(this.identity)}isMainWindow(){return this.wire.sendAction("window-is-main-window",this.identity).catch((e=>{})),this.me.uuid===this.me.name}isShowing(){return this.wire.sendAction("is-window-showing",this.identity).then((({payload:e})=>e.data))}maximize(){return this.wire.sendAction("maximize-window",this.identity).then((()=>{}))}minimize(){return this.wire.sendAction("minimize-window",this.identity).then((()=>{}))}moveBy(e,t,n){return this.wire.sendAction("move-window-by",{deltaLeft:e,deltaTop:t,positioningOptions:n,...this.identity}).then((()=>{}))}moveTo(e,t,n){return this.wire.sendAction("move-window",{left:e,top:t,positioningOptions:n,...this.identity}).then((()=>{}))}resizeBy(e,t,n,i){return this.wire.sendAction("resize-window-by",{deltaWidth:Math.floor(e),deltaHeight:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}resizeTo(e,t,n,i){return this.wire.sendAction("resize-window",{width:Math.floor(e),height:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}restore(){return this.wire.sendAction("restore-window",this.identity).then((()=>{}))}setAsForeground(){return this.wire.sendAction("set-foreground-window",this.identity).then((()=>{}))}setBounds(e,t){return this.wire.sendAction("set-window-bounds",{...e,...this.identity,positioningOptions:t}).then((()=>{}))}show(e=!1){return this.wire.sendAction("show-window",{force:e,...this.identity}).then((()=>{}))}showAt(e,t,n=!1){return this.wire.sendAction("show-at-window",{force:n,left:Math.floor(e),top:Math.floor(t),...this.identity}).then((()=>{}))}updateOptions(e){return this.wire.sendAction("update-window-options",{options:e,...this.identity}).then((()=>{}))}authenticate(e,t){return this.wire.sendAction("window-authenticate",{userName:e,password:t,...this.identity}).then((()=>{}))}async showPopupMenu(e){const{payload:t}=await this.wire.sendAction("show-popup-menu",{options:e,...this.identity});return t.data}async closePopupMenu(){return this.wire.sendAction("close-popup-menu",{...this.identity}).then((()=>{}))}async dispatchPopupResult(e){this.wire.sendAction("window-dispatch-popup-result",this.identity).catch((e=>{})),await this.wire.sendAction("dispatch-popup-result",{data:e,...this.identity})}async print(e={content:"self"}){switch(e.content){case void 0:case"self":return super.print(e);case"screenshot":return this.wire.sendAction("print-screenshot",this.identity).then((()=>{}));case"views":return this.wire.sendAction("print-views",{...this.identity,options:e}).then((()=>{}));default:return}}}return S._Window=o,S}function ie(){return te||(te=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(function(){if(ee)return _;ee=1,Object.defineProperty(_,"__esModule",{value:!0}),_._WindowModule=void 0;const e=d,t=O,n=ne();class i extends e.Base{async wrap(e){this.wire.sendAction("window-wrap").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}wrapSync(e){this.wire.sendAction("window-wrap-sync").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}create(e){return this.wire.sendAction("create-window").catch((e=>{})),new n._Window(this.wire,{uuid:this.me.uuid,name:e.name}).createWindow(e)}getCurrent(){if(this.wire.sendAction("get-current-window").catch((e=>{})),!this.wire.me.isWindow)throw new Error("You are not in a Window context");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction("get-current-window-sync").catch((e=>{})),!this.wire.me.isWindow)throw new Error("You are not in a Window context");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return _._WindowModule=i,_}(),e),n(ne(),e)}(M)),M}Q.promisifySubscription=async(e,t,n=(()=>!0),i)=>{let r,o,s;const a=new Promise(((e,t)=>{r=e,o=t})),c=e=>{n(e)&&(clearTimeout(s),r(e))};return await e.on(t,c),i&&(s=setTimeout((()=>o(new Error("event timed out"))),i)),a.finally((()=>{e.removeListener(t,c).catch((()=>null))})),{getValue:()=>a}},Object.defineProperty(c,"__esModule",{value:!0}),c.System=void 0;const re=d,oe=g,se=ie(),ae=t;class ce extends re.EmitterBase{constructor(e){super(e,"system")}sendExternalProcessRequest(e,t){return new Promise(((n,i)=>{const r="external-process-exited";let o,s,a,c;"function"==typeof t.listener&&(a=e=>{const n=e||{};s={topic:"exited",uuid:n.processUuid||"",exitCode:n.exitCode||0},o===e.processUuid&&(t.listener(s),c.removeListener(r,a))},this.wire.me.name||(this.wire.me.name=this.wire.me.uuid),c=new se._Window(this.wire,this.wire.me),c.on(r,a)),this.wire.sendAction(e,t).then((({payload:e})=>{o=e.data.uuid,n(e.data),s&&o===s.uuid&&(t.listener(s),c.removeListener(r,a))})).catch((e=>{c&&c.removeListener(r,a),i(e)}))}))}getVersion(){return this.wire.sendAction("get-version").then((({payload:e})=>e.data))}clearCache(e){return this.wire.sendAction("clear-cache",e).then((()=>{}))}deleteCacheOnExit(){return this.wire.sendAction("delete-cache-request").then((()=>{}))}exit(){return this.wire.sendAction("exit-desktop").then((()=>{}))}async fetchManifest(e){const{payload:{data:t}}=await this.wire.sendAction("fetch-manifest",{manifestUrl:e});return t}flushCookieStore(){return this.wire.sendAction("flush-cookie-store").then((()=>{}))}getAllWindows(){return this.wire.sendAction("get-all-windows").then((({payload:e})=>e.data))}getAllApplications(){return this.wire.sendAction("get-all-applications").then((({payload:e})=>e.data))}getCommandLineArguments(){return this.wire.sendAction("get-command-line-arguments").then((({payload:e})=>e.data))}async getCrashReporterState(){const{payload:{data:{diagnosticMode:e,isRunning:t}}}=await this.wire.sendAction("get-crash-reporter-state");return console.warn("diagnosticMode property is deprecated. It will be removed in a future version"),{diagnosticMode:e,diagnosticsMode:e,isRunning:t}}async startCrashReporter(e){const t=e,n={...t,diagnosticMode:t.diagnosticsMode||t.diagnosticMode},{payload:{data:{diagnosticMode:i,isRunning:r}}}=await this.wire.sendAction("start-crash-reporter",n);return{diagnosticMode:i,diagnosticsMode:i,isRunning:r}}getUniqueUserId(){return this.wire.sendAction("get-unique-user-id").then((({payload:e})=>e.data))}getEntityInfo(e,t){return this.wire.sendAction("get-entity-info",{uuid:e,name:t}).then((({payload:e})=>e.data))}getEnvironmentVariable(e){return this.wire.sendAction("get-environment-variable",{environmentVariables:e}).then((({payload:e})=>e.data))}getFocusedWindow(){return this.wire.sendAction("get-focused-window").then((({payload:e})=>e.data))}async isAppCertified(e){const{payload:{data:{certifiedInfo:t}}}=await this.wire.sendAction("is-app-certified",{manifestUrl:e});return t}getInstalledRuntimes(){return this.wire.sendAction("get-installed-runtimes").then((({payload:e})=>e.data.runtimes))}async getInstalledApps(){const{payload:{data:{installedApps:e}}}=await this.wire.sendAction("get-installed-apps");return e}getLog(e){return this.wire.sendAction("view-log",e).then((({payload:e})=>e.data))}getMachineId(){return this.wire.sendAction("get-machine-id").then((({payload:e})=>e.data))}getMinLogLevel(){return this.wire.sendAction("get-min-log-level").then((({payload:e})=>e.data))}getLogList(){return this.wire.sendAction("list-logs").then((({payload:e})=>e.data))}getMonitorInfo(){return this.wire.sendAction("get-monitor-info").then((({payload:e})=>e.data))}getMousePosition(){return this.wire.sendAction("get-mouse-position").then((({payload:e})=>e.data))}getProcessList(){return console.warn("System.getProcessList has been deprecated. Please consider using our new process APIs: Window.getProcessInfo, View.getProcessInfo, Application.getProcessInfo, System.getAllProcessInfo"),this.wire.sendAction("process-snapshot").then((({payload:e})=>e.data))}async getAllProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction("get-all-process-info",this.identity);return e}getProxySettings(){return this.wire.sendAction("get-proxy-settings").then((({payload:e})=>e.data))}getRuntimeInfo(){return this.wire.sendAction("get-runtime-info").then((({payload:e})=>e.data))}getRvmInfo(){return this.wire.sendAction("get-rvm-info").then((({payload:e})=>e.data))}getHostSpecs(){return this.wire.sendAction("get-host-specs").then((({payload:e})=>e.data))}getOSInfo(){return this.wire.sendAction("get-os-info").then((({payload:e})=>e.data))}launchExternalProcess(e){return this.sendExternalProcessRequest("launch-external-process",e)}monitorExternalProcess(e){return this.sendExternalProcessRequest("monitor-external-process",e)}log(e,t){return this.wire.sendAction("write-to-log",{level:e,message:t}).then((()=>{}))}openUrlWithBrowser(e){return this.wire.sendAction("open-url-with-browser",{url:e}).then((()=>{}))}async registerCustomProtocol(e){if("object"!=typeof e)throw new Error("Must provide an object with a `protocolName` property having a string value.");await this.wire.sendAction("register-custom-protocol",e)}async unregisterCustomProtocol(e){await this.wire.sendAction("unregister-custom-protocol",{protocolName:e})}async getCustomProtocolState(e){return this.wire.sendAction("get-custom-protocol-state",{protocolName:e}).then((({payload:e})=>e.data))}releaseExternalProcess(e){return this.wire.sendAction("release-external-process",{uuid:e}).then((()=>{}))}showDeveloperTools(e){return this.wire.sendAction("show-developer-tools",e).then((()=>{}))}terminateExternalProcess(e){return this.wire.sendAction("terminate-external-process",e).then((()=>{}))}updateProxySettings(e){return this.wire.sendAction("update-proxy",e).then((()=>{}))}async downloadAsset(e,t){const n=()=>{};let i=n,r=n;const o=new Promise(((e,t)=>{i=e,r=t}));if("openfin"!==this.wire.environment.type)throw new oe.NotSupportedError("downloadAsset only supported in an OpenFin Render process");const s=oe.RuntimeError.getCallSite(),a=this.wire.environment.getNextMessageId().toString(),c=`asset-download-progress-${a}`,d=`asset-download-error-${a}`,h=`asset-download-complete-${a}`,l=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},u=()=>{this.removeListener(c,l)};await Promise.all([this.on(c,l),this.once(d,(e=>{u();const{reason:t,err:n}=e;r(new oe.RuntimeError({reason:t,error:n},s))})),this.once(h,(()=>{u(),i()}))]);const p=Object.assign(e,{downloadId:a});return await this.wire.sendAction("download-asset",p).catch((e=>{throw u(),e})),o}downloadRuntime(e,t){const n=oe.RuntimeError.getCallSite();return new Promise(((i,r)=>{if("openfin"!==this.wire.environment.type)return void r(new oe.NotSupportedError("downloadRuntime only supported in an OpenFin Render process"));const o=this.wire.environment.getNextMessageId().toString(),s=`runtime-download-progress-${o}`,a=`runtime-download-error-${o}`,c=`runtime-download-complete-${o}`,d=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},h=()=>{this.removeListener(s,d)};this.on(s,d),this.once(a,(e=>{h();const{reason:t,err:i}=e;r(new oe.RuntimeError({reason:t,error:i},n))})),this.once(c,(()=>{h(),i()}));const l=Object.assign(e,{downloadId:o});this.wire.sendAction("download-runtime",l).catch((e=>{h(),r(e)}))}))}downloadPreloadScripts(e){return this.wire.sendAction("download-preload-scripts",{scripts:e}).then((({payload:e})=>e.data))}getAllExternalApplications(){return this.wire.sendAction("get-all-external-applications").then((({payload:e})=>e.data))}getAppAssetInfo(e){return this.wire.sendAction("get-app-asset-info",e).then((({payload:e})=>e.data))}getCookies(e){const t=this.wire.environment.getUrl(),n=Object.assign(e,{url:t});return this.wire.sendAction("get-cookies",n).then((({payload:e})=>e.data))}setMinLogLevel(e){return this.wire.sendAction("set-min-log-level",{level:e}).then((()=>{}))}resolveUuid(e){return this.wire.sendAction("resolve-uuid",{entityKey:e}).then((({payload:e})=>e.data))}executeOnRemote(e,t){return t.requestingIdentity=e,this.wire.ferryAction(t)}readRegistryValue(e,t,n){return this.wire.sendAction("read-registry-value",{rootKey:e,subkey:t,value:n}).then((({payload:e})=>e.data))}registerExternalConnection(e){return this.wire.sendAction("register-external-connection",{uuid:e}).then((({payload:e})=>e.data))}async getServiceConfiguration(e){if("string"!=typeof e.name)throw new Error("Must provide an object with a `name` property having a string value");const{name:t}=e;return this.wire.sendAction("get-service-configuration",{name:t}).then((({payload:e})=>e.data))}async getSystemAppConfig(e){if("string"!=typeof e)throw new Error("Must provide a string value for name of system app");return this.wire.sendAction("get-system-app-configuration",{name:e}).then((({payload:e})=>e.data))}async registerShutdownHandler(e){this.wire.sendAction("system-register-shutdown-handler").catch((e=>{}));const{uuid:t,name:n}=this.wire.me;this.on("system-shutdown",(i=>{e({proceed:()=>{this.wire.environment.raiseEvent("application/system-shutdown-handled",{uuid:t,name:n,topic:"application"})}})}))}runRvmHealthCheck(){return this.wire.sendAction("run-rvm-health-check").then((({payload:e})=>e.data))}async launchManifest(e,t={}){const{subscribe:n,...i}=t,r=i;if(n){const e=new ae.EventEmitter;n(e);const t="app-version-progress",i="runtime-status",o="app-version-complete",s="app-version-error",a=this.wire.environment.getNextMessageId().toString();r.appVersionId=a;const c=[o,t,i,s],d=e=>{const{appVersionId:t,topic:n,type:i,...r}=e;return{...r,type:c.find((e=>i.includes(e)))}},h=t=>{const n=d(t);e.emit(n.type,n)},l=()=>{this.removeListener(`${t}.${a}`,h),this.removeListener(`${i}.${a}`,h),this.removeListener(`${o}.${a}`,h),this.removeListener(`${s}.${a}`,h),this.removeListener(`${o}.${a}`,l),this.removeListener(`${s}.${a}`,l)};await Promise.all([this.on(`${t}.${a}`,h),this.on(`${i}.${a}`,h),this.once(`${o}.${a}`,h),this.once(`${s}.${a}`,h),this.once(`${o}.${a}`,l),this.once(`${s}.${a}`,l)])}return(await this.wire.sendAction("launch-manifest",{manifestUrl:e,opts:r})).payload.data.manifest}async queryPermissionForCurrentContext(e){const t={uuid:this.wire.me.uuid,name:this.wire.me.name};return(await this.wire.sendAction("query-permission-for-current-context",{apiName:e,identity:t})).payload.data}async enableNativeWindowIntegrationProvider(e){const{payload:t}=await this.wire.sendAction("enable-native-window-integration-provider",{permissions:e});return t.data}async registerUsage({data:e,type:t}){await this.wire.sendAction("register-usage",{data:e,type:t})}async getPrinters(){const{payload:e}=await this.wire.sendAction("system-get-printers");return e.data}async updateProcessLoggingOptions(e){await this.wire.sendAction("system-update-process-logging-options",{options:e})}async getDomainSettings(){const{payload:{data:e}}=await this.wire.sendAction("get-domain-settings",this.identity);return e}async setDomainSettings(e){await this.wire.sendAction("set-domain-settings",{domainSettings:e,...this.identity})}async refreshExtensions(){const{payload:e}=await this.wire.sendAction("refresh-extensions");return e.data}async getInstalledExtensions(){const{payload:e}=await this.wire.sendAction("get-installed-extensions");return e.data}}c.System=ce;var de={},he={};Object.defineProperty(he,"__esModule",{value:!0}),he.RefCounter=void 0;he.RefCounter=class{constructor(){this.topicRefMap=new Map}incRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t+1;n=i,this.topicRefMap.set(e,i)}else this.topicRefMap.set(e,1),n=1;return n}decRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t-1;this.topicRefMap.set(e,i),n=i}else n=-1;return n}actOnFirst(e,t,n){return 1===this.incRefCount(e)?t():n()}actOnLast(e,t,n){return 0===this.decRefCount(e)?t():n()}};var le={},ue={},pe={};Object.defineProperty(pe,"__esModule",{value:!0}),pe.ChannelBase=pe.ProtectedItems=void 0;const we=e=>async(t,n,i)=>{const r=await e(t,n,i);return void 0===r?n:r};pe.ProtectedItems=class{constructor(e,t){this.providerIdentity=e,this.close=t}};class ye{static defaultAction(e){throw new Error(`No action registered at target for ${e}`)}constructor(){this.subscriptions=new Map}async processAction(e,t,n){try{const i=this.subscriptions.has(e)?this.subscriptions.get(e):(t,n)=>(this.defaultAction??ye.defaultAction)(e,t,n),r=this.preAction?await this.preAction(e,t,n):t,o=await i(r,n);return this.postAction?await this.postAction(e,o,n):o}catch(t){if(this.errorMiddleware)return this.errorMiddleware(e,t,n);throw t}}beforeAction(e){if(this.preAction)throw new Error("Already registered beforeAction middleware");this.preAction=we(e)}onError(e){if(this.errorMiddleware)throw new Error("Already registered error middleware");this.errorMiddleware=e}afterAction(e){if(this.postAction)throw new Error("Already registered afterAction middleware");this.postAction=we(e)}remove(e){this.subscriptions.delete(e)}setDefaultAction(e){if(this.defaultAction)throw new Error("default action can only be set once");this.defaultAction=e}register(e,t){if(this.subscriptions.has(e))throw new Error(`Subscription already registered for action: ${e}. Unsubscribe before adding new subscription`);return this.subscriptions.set(e,t),!0}}pe.ChannelBase=ye;var fe,ge,me,ve=s&&s.__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)},Ce=s&&s.__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};Object.defineProperty(ue,"__esModule",{value:!0}),ue.ChannelClient=void 0;const be=pe,Ie=new Map;class Ee extends be.ChannelBase{static closeChannelByEndpointId(e){const t=Ie.get(e);t&&ve(t,me,"f").call(t)}static handleProviderDisconnect(e){for(const t of Ie.values())t.providerIdentity.channelId===e.channelId&&(t.disconnectListener(e),ve(t,me,"f").call(t))}constructor(e,t,n){super(),fe.set(this,void 0),ge.set(this,void 0),this.processAction=(e,t,n)=>super.processAction(e,t,n),me.set(this,(()=>{Ie.delete(this.endpointId),ve(this,ge,"f").close()})),Ce(this,fe,new be.ProtectedItems(e,t),"f"),this.disconnectListener=()=>{},this.endpointId=e.endpointId,Ce(this,ge,n,"f"),Ie.set(this.endpointId,this),n.receive(this.processAction)}get providerIdentity(){return ve(this,fe,"f").providerIdentity}async dispatch(e,t){if(ve(this,ge,"f").isEndpointConnected(this.providerIdentity.channelId))return ve(this,ge,"f").send(this.providerIdentity.channelId,e,t);throw new Error("The client you are trying to dispatch from is disconnected from the target provider.")}onDisconnection(e){this.disconnectListener=t=>{try{e(t)}catch(e){throw new Error(`Error while calling the onDisconnection callback: ${e.message}`)}finally{this.disconnectListener=()=>{}}}}async disconnect(){await this.sendDisconnectAction(),ve(this,me,"f").call(this)}async sendDisconnectAction(){const e=ve(this,fe,"f");await e.close()}static async wireClose(e,t,n){const{channelName:i,uuid:r,name:o}=t;await e.sendAction("disconnect-from-channel",{channelName:i,uuid:r,name:o,endpointId:n})}}ue.ChannelClient=Ee,fe=new WeakMap,ge=new WeakMap,me=new WeakMap;var xe={},Ae={};Object.defineProperty(Ae,"__esModule",{value:!0}),Ae.exhaustiveCheck=void 0,Ae.exhaustiveCheck=function(e,t){throw new Error(`Unsupported value: ${e}${t?`\n Supported values are: ${t.join("")}`:""}`)};var Pe,Me,_e,Oe={},Se=s&&s.__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},Re=s&&s.__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)};Object.defineProperty(Oe,"__esModule",{value:!0}),Oe.ClassicInfo=Oe.ClassicStrategy=void 0;Oe.ClassicStrategy=class{constructor(e,t,n,i){this.messageReceiver=t,this.endpointId=n,this.providerIdentity=i,Pe.set(this,void 0),Me.set(this,new Map),_e.set(this,new Map),this.send=async(e,t,n)=>{const i=Re(this,Me,"f").get(e);if(!i)throw new Error(`Could not locate routing info for endpoint ${e}`);const r={...i};r.isLocalEndpointId&&delete r.endpointId,delete r.isLocalEndpointId;const o=Re(this,Pe,"f").sendAction("send-channel-message",{...r,providerIdentity:this.providerIdentity,action:t,payload:n});Re(this,_e,"f").get(e)?.add(o);return(await o.catch((e=>{throw new Error(e.message)})).finally((()=>{Re(this,_e,"f").get(e)?.delete(o)}))).payload.data.result},this.close=async()=>{this.messageReceiver.removeEndpoint(this.providerIdentity.channelId,this.endpointId),[...Re(this,Me,"f").keys()].forEach((e=>this.closeEndpoint(e))),Se(this,Me,new Map,"f")},Se(this,Pe,e,"f")}onEndpointDisconnect(e,t){}receive(e){this.messageReceiver.addEndpoint(e,this.providerIdentity.channelId,this.endpointId)}async closeEndpoint(e){const t=Re(this,Me,"f").get(e);Re(this,Me,"f").delete(e);const n=Re(this,_e,"f").get(e);n?.forEach((n=>{const i=`Channel connection with identity uuid: ${t?.uuid} / name: ${t?.name} / endpointId: ${e} no longer connected.`;n.cancel(new Error(i))}))}isEndpointConnected(e){return Re(this,Me,"f").has(e)}addEndpoint(e,t){Re(this,Me,"f").set(e,t.endpointIdentity),Re(this,_e,"f").set(e,new Set)}isValidEndpointPayload(e){return"string"==typeof e?.endpointIdentity?.endpointId||"string"==typeof e?.endpointIdentity?.channelId}},Pe=new WeakMap,Me=new WeakMap,_e=new WeakMap,Oe.ClassicInfo={version:5,minimumVersion:0,type:"classic"};var Fe={},je={},ke={};Object.defineProperty(ke,"__esModule",{value:!0}),ke.errorToPOJO=void 0,ke.errorToPOJO=function(e){return{stack:e.stack,name:e.name,message:e.message,toString:()=>e.stack||e.toString()}};var Le,Te,$e=s&&s.__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)},Be=s&&s.__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};Object.defineProperty(je,"__esModule",{value:!0}),je.RTCEndpoint=void 0;const Ge=ke;je.RTCEndpoint=class{static isValidEndpointPayload(e){const t=e=>"object"==typeof e&&null!==e;return t(e)&&t(e.endpointIdentity)&&t(e.rtc)&&"string"==typeof e.endpointIdentity.endpointId}constructor({rtc:e,endpointIdentity:t}){this.responseMap=new Map,Le.set(this,null),Te.set(this,void 0),this.connectionStateChangeHandler=e=>{"connected"!==this.rtc.rtcClient.connectionState&&(this.rtc.rtcClient.removeEventListener("connectionstatechange",this.connectionStateChangeHandler),this.close(),$e(this,Te,"f")&&$e(this,Te,"f").call(this))},this.send=async(e,t)=>{const n=`message-${Math.random()}`,i=new Promise(((e,t)=>{this.responseMap.set(n,{resolve:e,reject:t})}));return this.rtc.channels.request.send(JSON.stringify({action:e,payload:t,messageId:n})),i},this.close=()=>{this.responseMap.forEach((e=>e.reject("Connection has closed."))),this.responseMap=new Map,this.rtc.channels.request.close(),this.rtc.channels.response.close(),this.rtc.rtcClient.close()},this.rtc=e,this.endpointIdentity=t,this.rtc.channels.response.addEventListener("message",(e=>{let{data:t}=e;e.data instanceof ArrayBuffer&&(t=(new TextDecoder).decode(e.data));const{messageId:n,payload:i,success:r,error:o}=JSON.parse(t),{resolve:s,reject:a}=this.responseMap.get(n)??{};s&&a?(this.responseMap.delete(n),r?s(i):a(o)):(console.log("Could not find id in responseMap."),console.log(e))})),this.rtc.channels.request.addEventListener("message",(async e=>{let{data:n}=e;e.data instanceof ArrayBuffer&&(n=(new TextDecoder).decode(e.data));const{messageId:i,action:r,payload:o}=JSON.parse(n);if($e(this,Le,"f"))try{const e=await $e(this,Le,"f").call(this,r,o,t);this.rtc.channels.response.send(JSON.stringify({messageId:i,payload:e,success:!0}))}catch(e){"open"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,error:(0,Ge.errorToPOJO)(e),success:!1}))}else"open"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,success:!1,error:"Connection not ready."}))})),this.rtc.rtcClient.addEventListener("connectionstatechange",this.connectionStateChangeHandler),Object.values(this.rtc.channels).forEach((e=>{e.onclose=e=>{[...this.responseMap.values()].forEach((e=>e.reject(new Error("RTCDataChannel closed unexpectedly, this is most commonly caused by message size. Note: RTC Channels have a message size limit of ~255kB.")))),this.close(),$e(this,Te,"f")&&$e(this,Te,"f").call(this)}}))}onDisconnect(e){if($e(this,Te,"f"))throw new Error("RTCEndpoint disconnectListener cannot be set twice.");Be(this,Te,e,"f")}receive(e){if($e(this,Le,"f"))throw new Error("You have already set a listener for this RTC Endpoint.");Be(this,Le,e,"f")}get connected(){return"connected"===this.rtc.rtcClient.connectionState}},Le=new WeakMap,Te=new WeakMap;var We,He,Ne,De={},Ue=s&&s.__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)},Ve=s&&s.__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};Object.defineProperty(De,"__esModule",{value:!0}),De.EndpointStrategy=void 0;De.EndpointStrategy=class{constructor(e,t,n){this.EndpointType=e,this.StrategyName=n,We.set(this,null),He.set(this,new Map),Ne.set(this,!0),this.send=async(e,t,n)=>this.getEndpointById(e).send(t,n),this.close=async()=>{Ue(this,Ne,"f")&&(Ue(this,He,"f").forEach((e=>e.close())),Ve(this,He,new Map,"f")),Ve(this,Ne,!1,"f")},this.isValidEndpointPayload=t}onEndpointDisconnect(e,t){this.getEndpointById(e).onDisconnect(t)}receive(e){if(Ue(this,We,"f"))throw new Error(`You have already set a listener for this ${this.StrategyName} Strategy`);Ve(this,We,e,"f"),Ue(this,He,"f").forEach((e=>e.receive(Ue(this,We,"f"))))}getEndpointById(e){const t=Ue(this,He,"f").get(e);if(!t)throw new Error(`Client with endpoint id ${e} is not connected`);return t}get connected(){return Ue(this,Ne,"f")}isEndpointConnected(e){return Ue(this,He,"f").has(e)}addEndpoint(e,t){if(!Ue(this,Ne,"f"))return void console.warn(`Adding endpoint to disconnected ${this.StrategyName} Strategy`);const n=new this.EndpointType(t);Ue(this,We,"f")&&n.receive(Ue(this,We,"f")),Ue(this,He,"f").set(e,n)}async closeEndpoint(e){Ue(this,He,"f").delete(e)}},We=new WeakMap,He=new WeakMap,Ne=new WeakMap,Object.defineProperty(Fe,"__esModule",{value:!0}),Fe.RTCInfo=Fe.RTCStrategy=void 0;const ze=je,Ke=De;class qe extends Ke.EndpointStrategy{constructor(){super(ze.RTCEndpoint,ze.RTCEndpoint.isValidEndpointPayload,"RTC")}}Fe.RTCStrategy=qe,Fe.RTCInfo={version:2,minimumVersion:0,type:"rtc"};var Je={};Object.defineProperty(Je,"__esModule",{value:!0}),Je.RTCICEManager=void 0;const Ye=d;class Ze extends Ye.EmitterBase{constructor(e){super(e,"channel"),this.ensureChannelOpened=e=>new Promise(((t,n)=>{if("open"===e.readyState)t();else if("connecting"===e.readyState){const n=()=>{e.removeEventListener("open",n),t()};e.addEventListener("open",n)}else n(new Error("This Channel has already closed"))}))}static createDataChannelPromise(e,t){let n;const i=new Promise((e=>{n=e})),r=i=>{const o=()=>{i.channel.removeEventListener("open",o),n(i.channel)};i.channel.label===e&&(i.channel.addEventListener("open",o),t.removeEventListener("datachannel",r))};return t.addEventListener("datachannel",r),i}async listenForProviderIce(e,t){await this.on(this.createProviderEventName(e),t,{timestamp:Date.now()})}async raiseProviderIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createProviderEventName(e)),t)}async listenForClientIce(e,t){await this.on(this.createClientEventName(e),t,{timestamp:Date.now()})}async raiseClientIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createClientEventName(e)),t)}cleanupIceListeners(e){this.removeAllListeners(this.createClientEventName(e)),this.removeAllListeners(this.createProviderEventName(e))}createClientEventName(e){return`ice-client-${e}`}createProviderEventName(e){return`ice-provider-${e}`}createRouteString(e){return`channel/${e}`}createRtcPeer(){return this.wire.environment.getRtcPeer()}async startClientOffer(){const e=Math.random().toString(),t=this.createRtcPeer();t.addEventListener("icecandidate",(async t=>{t.candidate&&await this.raiseClientIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForProviderIce(e,(async e=>{await t.addIceCandidate(e.candidate)}));const n={request:t.createDataChannel("request"),response:t.createDataChannel("response")},i=await t.createOffer();await t.setLocalDescription(i);const r=Promise.all([n.request,n.response].map(this.ensureChannelOpened)).then((()=>{}));return{rtcClient:t,channels:n,offer:i,rtcConnectionId:e,channelsOpened:r}}async finishClientOffer(e,t,n){return await e.setRemoteDescription(t),await n,!0}async createProviderAnswer(e,t){const n=this.createRtcPeer(),i=Ze.createDataChannelPromise("request",n),r=Ze.createDataChannelPromise("response",n);n.addEventListener("icecandidate",(async t=>{t.candidate&&await this.raiseProviderIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForClientIce(e,(async e=>{await n.addIceCandidate(e.candidate)})),await n.setRemoteDescription(t);const o=await n.createAnswer();await n.setLocalDescription(o);const s=Promise.all([i,r]).then((([t,n])=>(this.cleanupIceListeners(e),{request:t,response:n})));return{rtcClient:n,answer:o,channels:s}}}Je.RTCICEManager=Ze;var Qe={},Xe={};function et(e){return[...e.split(".").reverse().entries()].reduce(((e,[t,n])=>e+ +n*1e4**t),0)}function tt(e,t){return et(e)>=et(t)}function nt(e){return e.split("/")[0]}Object.defineProperty(Xe,"__esModule",{value:!0}),Xe.runtimeUuidMeetsMinimumRuntimeVersion=Xe.parseRuntimeUuid=Xe.meetsMinimumRuntimeVersion=void 0,Xe.meetsMinimumRuntimeVersion=tt,Xe.parseRuntimeUuid=nt,Xe.runtimeUuidMeetsMinimumRuntimeVersion=function(e,t){return tt(nt(e),t)};var it,rt,ot,st,at,ct=s&&s.__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)},dt=s&&s.__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};Object.defineProperty(Qe,"__esModule",{value:!0}),Qe.ChannelProvider=void 0;const ht=pe,lt=Xe;class ut extends ht.ChannelBase{get connections(){return[...ct(this,it,"f")]}static handleClientDisconnection(e,t){const n=e.connections.find((e=>e.endpointId===t.endpointId));if(n)ct(e,st,"f").call(e,n);else{e.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name)).forEach(ct(e,st,"f"))}e.disconnectListener(t)}static setProviderRemoval(e,t){ut.removalMap.set(e,t)}constructor(e,t,n){super(),it.set(this,void 0),rt.set(this,void 0),ot.set(this,void 0),st.set(this,(e=>{const t=this.connections.filter((t=>t.endpointId!==e.endpointId));ct(this,ot,"f").closeEndpoint(e.endpointId),dt(this,it,t,"f")})),this.processAction=async(e,t,n)=>(ut.clientIsMultiRuntime(n)&&!(0,lt.runtimeUuidMeetsMinimumRuntimeVersion)(n.runtimeUuid,"18.87.56.0")?this.handleMultiRuntimeLegacyClient(n):this.checkForClientConnection(n),super.processAction(e,t,n)),at.set(this,(()=>{ct(this,ot,"f").close();const e=ut.removalMap.get(this);e&&e()})),dt(this,rt,new ht.ProtectedItems(e,t),"f"),this.connectListener=()=>{},this.disconnectListener=()=>{},dt(this,it,[],"f"),dt(this,ot,n,"f"),n.receive(this.processAction)}dispatch(e,t,n){const i=e.endpointId??this.getEndpointIdForOpenFinId(e,t);return i&&ct(this,ot,"f").isEndpointConnected(i)?ct(this,ot,"f").send(i,t,n):Promise.reject(new Error(`Client connection with identity uuid: ${e.uuid} / name: ${e.name} / endpointId: ${i} no longer connected.`))}async processConnection(e,t){return ct(this,it,"f").push(e),this.connectListener(e,t)}publish(e,t){return this.connections.map((n=>ct(this,ot,"f").send(n.endpointId,e,t)))}onConnection(e){this.connectListener=e}onDisconnection(e){this.disconnectListener=e}async destroy(){const e=ct(this,rt,"f");e.providerIdentity,dt(this,it,[],"f"),await e.close(),ct(this,at,"f").call(this)}async getAllClientInfo(){return this.connections.map((e=>{const{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}=e;return{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}}))}checkForClientConnection(e){if(!this.isClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider.\n Client Identity: {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}isClientConnected(e){return ut.clientIdentityIncludesEndpointId(e)?this.connections.some((t=>t.endpointId===e.endpointId&&t.uuid===e.uuid&&t.name===e.name)):this.isLegacyClientConnected(e)}isLegacyClientConnected(e){return this.connections.some((t=>t.uuid===e.uuid&&t.name===e.name))}handleMultiRuntimeLegacyClient(e){if(!this.isLegacyClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider. Client Identity:\n {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}getEndpointIdForOpenFinId(e,t){const n=this.connections.filter((t=>t.name===e.name&&t.uuid===e.uuid));if(n.length>=2){const n=ct(this,rt,"f"),{uuid:i,name:r}=e,o=n?.providerIdentity.uuid,s=n?.providerIdentity.name;console.warn(`WARNING: Dispatch call may have unintended results. The "to" argument of your dispatch call is missing the\n "endpointId" parameter. The identity you are dispatching to ({uuid: ${i}, name: ${r}})\n has multiple channelClients for this channel. Your dispatched action: (${t}) from the provider:\n ({uuid: ${o}, name: ${s}}) will only be processed by the most recently-created client.`)}return n.pop()?.endpointId}static clientIdentityIncludesEndpointId(e){return void 0!==e.endpointId}static clientIsMultiRuntime(e){return void 0!==e.runtimeUuid}static async wireClose(e,t){await e.sendAction("destroy-channel",{channelName:t})}}Qe.ChannelProvider=ut,it=new WeakMap,rt=new WeakMap,ot=new WeakMap,st=new WeakMap,at=new WeakMap,ut.removalMap=new WeakMap;var pt={};Object.defineProperty(pt,"__esModule",{value:!0}),pt.MessageReceiver=void 0;const wt=ue,yt=d;class ft extends yt.Base{constructor(e){super(e),this.onmessage=e=>"process-channel-message"===e.action&&(this.processChannelMessage(e),!0),this.endpointMap=new Map,this.latestEndpointIdByChannelId=new Map,e.registerMessageHandler(this.onmessage.bind(this))}async processChannelMessage(e){const{senderIdentity:t,providerIdentity:n,action:i,ackToSender:r,payload:o,intendedTargetIdentity:s}=e.payload,a=s.channelId??s.endpointId??this.latestEndpointIdByChannelId.get(n.channelId),c=this.endpointMap.get(a);if(!c)return r.payload.success=!1,r.payload.reason=`Client connection with identity uuid: ${this.wire.me.uuid} / name: ${this.wire.me.name} / endpointId: ${a} no longer connected.`,this.wire.sendRaw(r);try{const e=await c(i,o,t);return r.payload.payload=r.payload.payload||{},r.payload.payload.result=e,this.wire.sendRaw(r)}catch(e){return r.payload.success=!1,r.payload.reason=e.message,this.wire.sendRaw(r)}}addEndpoint(e,t,n){this.endpointMap.set(n,e),t!==n&&this.latestEndpointIdByChannelId.set(t,n)}removeEndpoint(e,t){this.endpointMap.delete(t),this.latestEndpointIdByChannelId.get(e)===t&&this.latestEndpointIdByChannelId.delete(e)}checkForPreviousClientConnection(e){const t=this.latestEndpointIdByChannelId.get(e);t&&(wt.ChannelClient.closeChannelByEndpointId(t),console.warn("You have created a second connection to an older provider. First connection has been removed from the clientMap"),console.warn("If the provider calls publish(), you may receive multiple messages."))}}pt.MessageReceiver=ft;var gt={};Object.defineProperty(gt,"__esModule",{value:!0}),gt.ProtocolManager=void 0;gt.ProtocolManager=class{constructor(e){this.ProtocolsInPreferenceOrder=e,this.DefaultClientProtocols=["classic"],this.DefaultProviderProtocols=["classic"],this.getClientProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultClientProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(", ")}.`);return t},this.getProviderProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultProviderProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(", ")}.`);return t},this.getCompatibleProtocols=(e,t)=>t.supportedProtocols.filter((t=>e.some((e=>e.type===t.type&&t.version>=e.minimumVersion&&e.version>=(t.minimumVersion??0))))).slice(0,t.maxProtocols)}};var mt={};Object.defineProperty(mt,"__esModule",{value:!0});class vt{static combine(e,t){return new vt(e,t)}constructor(e,t){this.primary=e,this.secondary=t}onEndpointDisconnect(e,t){this.primary.onEndpointDisconnect(e,(()=>{this.secondary.isEndpointConnected(e)||t()})),this.secondary.onEndpointDisconnect(e,(()=>{this.primary.isEndpointConnected(e)||t()}))}isValidEndpointPayload(e){return this.primary.isValidEndpointPayload(e)||this.secondary.isValidEndpointPayload(e)}async closeEndpoint(e){await this.primary.closeEndpoint(e),await this.secondary.closeEndpoint(e)}isEndpointConnected(e){return this.primary.isEndpointConnected(e)||this.secondary.isEndpointConnected(e)}async addEndpoint(e,t){this.primary.isValidEndpointPayload(t)&&await this.primary.addEndpoint(e,t),this.secondary.isValidEndpointPayload(t)&&await this.secondary.addEndpoint(e,t)}receive(e){this.primary.receive(e),this.secondary.receive(e)}send(e,t,n){return this.primary.isEndpointConnected(e)?this.primary.send(e,t,n):this.secondary.send(e,t,n)}async close(){await Promise.all([this.primary.close(),this.secondary.close()])}}mt.default=vt;var Ct,bt,It=s&&s.__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},Et=s&&s.__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)},xt=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(xe,"__esModule",{value:!0}),xe.ConnectionManager=void 0;const At=Ae,Pt=d,Mt=Oe,_t=Fe,Ot=Je,St=Qe,Rt=pt,Ft=gt,jt=xt(mt);class kt extends Pt.Base{static getProtocolOptionsFromStrings(e){return e.map((e=>{switch(e){case"rtc":return _t.RTCInfo;case"classic":return Mt.ClassicInfo;default:return(0,At.exhaustiveCheck)(e,["rtc","classic"])}}))}constructor(e){super(e),Ct.set(this,void 0),bt.set(this,void 0),this.removeChannelFromProviderMap=e=>{this.providerMap.delete(e)},this.onmessage=e=>"process-channel-connection"===e.action&&(this.processChannelConnection(e),!0),this.providerMap=new Map,this.protocolManager=new Ft.ProtocolManager("node"===this.wire.environment.type?["classic"]:["rtc","classic"]),It(this,Ct,new Rt.MessageReceiver(e),"f"),It(this,bt,new Ot.RTCICEManager(e),"f"),e.registerMessageHandler(this.onmessage.bind(this))}createProvider(e,t){const n=Object.assign(this.wire.environment.getDefaultChannelOptions().create,e||{}),i=this.protocolManager.getProviderProtocols(n?.protocols),r=i.map((e=>{switch(e){case"rtc":return new _t.RTCStrategy;case"classic":return new Mt.ClassicStrategy(this.wire,Et(this,Ct,"f"),t.channelId,t);default:return(0,At.exhaustiveCheck)(e,["rtc","classic"])}}));let o;if(2===r.length){const[e,t]=r;o=jt.default.combine(e,t)}else{if(1!==r.length)throw new Error("failed to combine strategies");[o]=r}const s=new St.ChannelProvider(t,(()=>St.ChannelProvider.wireClose(this.wire,t.channelName)),o),a=t.channelId;return this.providerMap.set(a,{provider:s,strategy:o,supportedProtocols:kt.getProtocolOptionsFromStrings(i)}),St.ChannelProvider.setProviderRemoval(s,this.removeChannelFromProviderMap.bind(this)),s}async createClientOffer(e){const t=this.protocolManager.getClientProtocols(e?.protocols);let n;return{offer:{supportedProtocols:await Promise.all(t.map((async e=>{switch(e){case"rtc":{const{rtcClient:e,channels:t,offer:i,rtcConnectionId:r,channelsOpened:o}=await Et(this,bt,"f").startClientOffer();return n={rtcClient:e,channels:t,channelsOpened:o},{type:"rtc",version:_t.RTCInfo.version,payload:{offer:i,rtcConnectionId:r}}}case"classic":return{type:"classic",version:Mt.ClassicInfo.version};default:return(0,At.exhaustiveCheck)(e,["rtc","classic"])}}))),maxProtocols:2},rtc:n}}async createClientStrategy(e,t){t.endpointId||(t.endpointId=this.wire.environment.getNextMessageId(),Et(this,Ct,"f").checkForPreviousClientConnection(t.channelId));const n=t.answer??{supportedProtocols:[{type:"classic",version:1}]},i=(await Promise.all(n.supportedProtocols.map((async n=>"rtc"===n.type&&e?(await Et(this,bt,"f").finishClientOffer(e.rtcClient,n.payload.answer,e.channelsOpened),new _t.RTCStrategy):"classic"===n.type?new Mt.ClassicStrategy(this.wire,Et(this,Ct,"f"),t.endpointId,t):null)))).filter((e=>null!==e));let r;if(e&&!i.some((e=>e instanceof _t.RTCStrategy))&&e&&e.rtcClient.close(),i.length>=2)r=jt.default.combine(i[0],i[1]);else{if(!i.length)throw new Error("No compatible protocols");[r]=i}const o={endpointIdentity:t,rtc:e};return r.addEndpoint(t.channelId,o),r}async processChannelConnection(e){const{clientIdentity:t,providerIdentity:n,ackToSender:i,payload:r,offer:o}=e.payload;t.endpointId?t.isLocalEndpointId=!1:(t.endpointId=this.wire.environment.getNextMessageId(),t.isLocalEndpointId=!0);const s=n.channelId,a=this.providerMap.get(s);if(!a)return i.payload.success=!1,i.payload.reason=`Channel "${n.channelName}" has been destroyed.`,this.wire.sendRaw(i);const{provider:c,strategy:d,supportedProtocols:h}=a;try{if(!(c instanceof St.ChannelProvider))throw Error("Cannot connect to a channel client");const e=o??{supportedProtocols:[{type:"classic",version:1}],maxProtocols:1},n=this.protocolManager.getCompatibleProtocols(h,e);if(!n.length)throw new Error("This provider does not support any of the offered protocols.");const s=await c.processConnection(t,r);i.payload.payload=i.payload.payload||{};let a={supportedProtocols:[],endpointPayloadPromise:Promise.resolve({endpointIdentity:t})};return a=await n.reduce((async(e,t)=>{const n=await e;if("rtc"===t.type){const{answer:e,rtcClient:i,channels:r}=await Et(this,bt,"f").createProviderAnswer(t.payload.rtcConnectionId,t.payload.offer);n.supportedProtocols.push({type:"rtc",version:_t.RTCInfo.version,payload:{answer:e}}),n.endpointPayloadPromise=n.endpointPayloadPromise.then((e=>r.then((t=>({...e,rtc:{rtcClient:i,channels:t}})))))}else n.supportedProtocols.push({type:"classic",version:Mt.ClassicInfo.version});return n}),Promise.resolve(a)),a.endpointPayloadPromise.then((e=>d.addEndpoint(t.endpointId,e))),i.payload.payload.result=s,i.payload.payload.answer=a,this.wire.sendRaw(i)}catch(e){return i.payload.success=!1,i.payload.reason=e.message,this.wire.sendRaw(i)}}}xe.ConnectionManager=kt,Ct=new WeakMap,bt=new WeakMap;var Lt,Tt,$t,Bt=s&&s.__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},Gt=s&&s.__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)};Object.defineProperty(le,"__esModule",{value:!0}),le.Channel=void 0;const Wt=t,Ht=G,Nt=d,Dt=ue,Ut=xe,Vt=Qe;function zt(e){const t=Math.floor(e/10),n=Math.min(3e4,500*2**t);return new Promise((e=>{setTimeout((()=>{e(!1)}),n)}))}class Kt extends Nt.EmitterBase{constructor(e){super(e,"channel"),Lt.set(this,void 0),Tt.set(this,new Wt.EventEmitter),$t.set(this,new Ht.AsyncRetryableLazy((async()=>{await Promise.all([this.on("disconnected",(e=>{Dt.ChannelClient.handleProviderDisconnect(e)})),this.on("connected",((...e)=>{Gt(this,Tt,"f").emit("connected",...e)}))]).catch((()=>new Error("error setting up channel connection listeners")))}))),Bt(this,Lt,new Ut.ConnectionManager(e),"f")}async getAllChannels(){return this.wire.sendAction("get-all-channels").then((({payload:e})=>e.data))}async onChannelConnect(e){await this.on("connected",e)}async onChannelDisconnect(e){await this.on("disconnected",e)}async safeConnect(e,t,n){const i={count:0};do{let r=()=>{};const o=new Promise((t=>{r=n=>{e===n.channelName&&t(!0)},Gt(this,Tt,"f").on("connected",r)}));try{if(i.count>0){i.gotConnectedEvent=await Promise.race([zt(i.count),o]);const t=await this.wire.sendAction("connect-to-channel",{...n,retryInfo:i});return console.log(`Successfully connected to channelName: ${e}`),t.payload.data}const t=this.wire.sendAction("connect-to-channel",n);i.originalMessageId=t.messageId;return(await t).payload.data}catch(n){if(!n.message.includes("internal-nack"))throw n;t&&0===i.count&&console.warn(`No channel found for channelName: ${e}. Waiting for connection...`)}finally{i.count+=1,Gt(this,Tt,"f").removeListener("connected",r)}}while(t);throw new Error(`No channel found for channelName: ${e}.`)}async connect(e,t={}){if(await Gt(this,$t,"f").getValue(),!e||"string"!=typeof e)throw new Error("Please provide a channelName string to connect to a channel.");const n={wait:!0,...this.wire.environment.getDefaultChannelOptions().connect,...t},{offer:i,rtc:r}=await Gt(this,Lt,"f").createClientOffer(n);let o;(this.fin.me.isFrame||this.fin.me.isView||this.fin.me.isWindow)&&(o=(await this.fin.me.getInfo()).url);const s={channelName:e,...n,offer:i,connectionUrl:o},a=await this.safeConnect(e,n.wait,s),c=await Gt(this,Lt,"f").createClientStrategy(r,a),d=new Dt.ChannelClient(a,(()=>Dt.ChannelClient.wireClose(this.wire,a,a.endpointId)),c);return c.onEndpointDisconnect(a.channelId,(async()=>{try{await d.sendDisconnectAction()}catch(e){console.warn(`Something went wrong during disconnect for client with uuid: ${a.uuid} / name: ${a.name} / endpointId: ${a.endpointId}.`)}finally{Dt.ChannelClient.handleProviderDisconnect(a)}})),d}async create(e,t){if(!e)throw new Error("Please provide a channelName to create a channel");const{payload:{data:n}}=await this.wire.sendAction("create-channel",{channelName:e}),i=Gt(this,Lt,"f").createProvider(t,n);return this.on("client-disconnected",(t=>{t.channelName===e&&Vt.ChannelProvider.handleClientDisconnection(i,t)})),i}}le.Channel=Kt,Lt=new WeakMap,Tt=new WeakMap,$t=new WeakMap,Object.defineProperty(de,"__esModule",{value:!0}),de.InterAppPayload=de.InterApplicationBus=void 0;const qt=t,Jt=d,Yt=he,Zt=le,Qt=O;class Xt extends Jt.Base{constructor(e){super(e),this.events={subscriberAdded:"subscriber-added",subscriberRemoved:"subscriber-removed"},this.refCounter=new Yt.RefCounter,this.Channel=new Zt.Channel(e),this.emitter=new qt.EventEmitter,e.registerMessageHandler(this.onmessage.bind(this)),this.on=this.emitter.on.bind(this.emitter),this.removeAllListeners=this.emitter.removeAllListeners.bind(this.emitter)}async publish(e,t){await this.wire.sendAction("publish-message",{topic:e,message:t,sourceWindowName:this.me.name})}async send(e,t,n){const i=(0,Qt.validateIdentity)(e);if(i)throw new Error(i);await this.wire.sendAction("send-message",{destinationUuid:e.uuid,destinationWindowName:e.name,topic:t,message:n,sourceWindowName:this.me.name})}subscribe(e,t,n){const i=this.createSubscriptionKey(e.uuid,e.name||"*",t);return this.emitter.on(i,n),this.refCounter.actOnFirst(i,(async()=>{await this.wire.sendAction("subscribe",{sourceUuid:e.uuid,sourceWindowName:e.name||"*",topic:t,destinationWindowName:this.me.name})}),(()=>Promise.resolve()))}unsubscribe(e,t,n){const i=e.name||"*",r=this.createSubscriptionKey(e.uuid,i,t);return this.emitter.removeListener(r,n),this.refCounter.actOnLast(r,(async()=>{await this.wire.sendAction("unsubscribe",{sourceUuid:e.uuid,sourceWindowName:i,topic:t,destinationWindowName:this.me.name})}),(()=>new Promise((e=>e)).then((()=>{}))))}processMessage(e){const{payload:{message:t,sourceWindowName:n,sourceUuid:i,topic:r}}=e,o=[this.createSubscriptionKey(i,n,r),this.createSubscriptionKey(i,"*",r),this.createSubscriptionKey("*","*",r)],s={uuid:i,name:n};o.forEach((e=>{this.emitter.emit(e,t,s)}))}emitSubscriverEvent(e,t){const{payload:{targetName:n,uuid:i,topic:r}}=t,o={name:n,uuid:i,topic:r};this.emitter.emit(e,o)}createSubscriptionKey(e,t,n){const i=t||"*";if(!(e&&i&&n))throw new Error("Missing uuid, name, or topic string");return function(...e){return e.map((e=>Buffer.from(`${e}`).toString("base64"))).join("/")}(e,i,n)}onmessage(e){const{action:t}=e;switch(t){case"process-message":this.processMessage(e);break;case this.events.subscriberAdded:this.emitSubscriverEvent(this.events.subscriberAdded,e);break;case this.events.subscriberRemoved:this.emitSubscriverEvent(this.events.subscriberRemoved,e)}return!0}}de.InterApplicationBus=Xt;de.InterAppPayload=class{};var en={};Object.defineProperty(en,"__esModule",{value:!0}),en.Clipboard=void 0;const tn=d;class nn extends tn.Base{async writeText(e){await this.wire.sendAction("clipboard-write-text",e)}async readText(e){const{payload:t}=await this.wire.sendAction("clipboard-read-text",{type:e});return t.data}async writeImage(e){await this.wire.sendAction("clipboard-write-image",e)}async readImage(e={format:"dataURL"}){const{payload:t}=await this.wire.sendAction("clipboard-read-image",e);return t.data}async writeHtml(e){await this.wire.sendAction("clipboard-write-html",e)}async readHtml(e){const{payload:t}=await this.wire.sendAction("clipboard-read-html",{type:e});return t.data}async writeRtf(e){await this.wire.sendAction("clipboard-write-rtf",e)}async readRtf(e){const{payload:t}=await this.wire.sendAction("clipboard-read-rtf",{type:e});return t.data}async write(e){await this.wire.sendAction("clipboard-write",e)}async getAvailableFormats(e){const{payload:t}=await this.wire.sendAction("clipboard-read-formats",{type:e});return t.data}}en.Clipboard=nn;var rn={},on={},sn={};Object.defineProperty(sn,"__esModule",{value:!0}),sn.ExternalApplication=void 0;const an=d;class cn extends an.EmitterBase{constructor(e,t){super(e,"external-application",t.uuid),this.identity=t}getInfo(){return this.wire.sendAction("get-external-application-info",this.identity).then((({payload:e})=>e.data))}}sn.ExternalApplication=cn,Object.defineProperty(on,"__esModule",{value:!0}),on.ExternalApplicationModule=void 0;const dn=d,hn=sn;class ln extends dn.Base{wrap(e){return this.wire.sendAction("external-application-wrap").catch((e=>{})),Promise.resolve(new hn.ExternalApplication(this.wire,{uuid:e}))}wrapSync(e){return this.wire.sendAction("external-application-wrap-sync").catch((e=>{})),new hn.ExternalApplication(this.wire,{uuid:e})}}on.ExternalApplicationModule=ln,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(on,e),n(sn,e)}(rn);var un={},pn={},wn={};Object.defineProperty(wn,"__esModule",{value:!0}),wn._Frame=void 0;const yn=d;class fn extends yn.EmitterBase{constructor(e,t){super(e,"frame",t.uuid,t.name),this.identity=t}getInfo(){return this.wire.sendAction("get-frame-info",this.identity).then((({payload:e})=>e.data))}getParentWindow(){return this.wire.sendAction("get-parent-window",this.identity).then((({payload:e})=>e.data))}}wn._Frame=fn,Object.defineProperty(pn,"__esModule",{value:!0}),pn._FrameModule=void 0;const gn=d,mn=O,vn=wn;class Cn extends gn.Base{async wrap(e){this.wire.sendAction("frame-wrap").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}wrapSync(e){this.wire.sendAction("frame-wrap-sync").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}getCurrent(){return this.wire.sendAction("frame-get-current").catch((e=>{})),Promise.resolve(new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity()))}getCurrentSync(){return this.wire.sendAction("frame-get-current-sync").catch((e=>{})),new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity())}}pn._FrameModule=Cn,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(pn,e),n(wn,e)}(un);var bn={};Object.defineProperty(bn,"__esModule",{value:!0}),bn.GlobalHotkey=void 0;const In=d;class En extends In.EmitterBase{constructor(e){super(e,"global-hotkey")}async register(e,t){await this.on(e,t),await this.wire.sendAction("global-hotkey-register",{hotkey:e})}async unregister(e){await this.removeAllListeners(e),await this.wire.sendAction("global-hotkey-unregister",{hotkey:e})}async unregisterAll(){await Promise.all(this.eventNames().filter((e=>!("registered"===e||"unregistered"===e))).map((e=>this.removeAllListeners(e)))),await this.wire.sendAction("global-hotkey-unregister-all",{})}async isRegistered(e){const{payload:{data:t}}=await this.wire.sendAction("global-hotkey-is-registered",{hotkey:e});return t}}bn.GlobalHotkey=En;var xn,An={},Pn={},Mn={},_n=s&&s.__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)};Object.defineProperty(Mn,"__esModule",{value:!0}),Mn.Platform=void 0;const On=d,Sn=O,Rn=new Map;class Fn extends On.EmitterBase{constructor(e,t){super(t.wire,"application",e.uuid),this.getClient=e=>{this.wire.sendAction("platform-get-client",this.identity).catch((e=>{}));const t=e||this.identity,{uuid:n}=t;if(!Rn.has(n)){const e=_n(this,xn,"f").call(this,n);Rn.set(n,e)}return Rn.get(n)},xn.set(this,(async e=>{try{const t=`custom-frame-${e}`,n=await this._channel.connect(t,{wait:!1});return n.onDisconnection((()=>{Rn.delete(e)})),n}catch(t){throw Rn.delete(e),new Error("The targeted Platform is not currently running. Listen for application-started event for the given Uuid.")}})),this.launchLegacyManifest=this.launchContentManifest;const n=(0,Sn.validateIdentity)(e);if(n)throw new Error(n);this._channel=t,this.identity={uuid:e.uuid},this.Layout=this.fin.Platform.Layout,this.Application=this.fin.Application.wrapSync(this.identity)}async createView(e,t,n){this.wire.sendAction("platform-create-view",this.identity).catch((e=>{}));const i=await this.getClient(),r=await i.dispatch("create-view",{target:t,opts:e,targetView:n});if(!r||(0,Sn.validateIdentity)(r.identity))throw new Error(`When overwriting the createView call, please return an object that has a valid 'identity' property: ${JSON.stringify(r)}`);return this.fin.View.wrapSync(r.identity)}async createWindow(e){this.wire.sendAction("platform-create-window",this.identity).catch((e=>{}));const t=await this.getClient();e.reason||(e.reason="api-call");const n=await t.dispatch("create-view-container",e);if(!n||(0,Sn.validateIdentity)(n.identity))throw new Error(`When overwriting the createWindow call, please return an object that has a valid 'identity' property: ${JSON.stringify(n)}`);const{identity:i}=n,r=this.fin.Window.wrapSync(i);return r.name=i.name,r.uuid=i.uuid,r}async quit(){this.wire.sendAction("platform-quit",this.identity).catch((e=>{}));return(await this.getClient()).dispatch("quit")}async closeView(e){this.wire.sendAction("platform-close-view",this.identity).catch((e=>{}));const t=await this.getClient();await t.dispatch("close-view",{view:e})}async reparentView(e,t){console.warn("Platform.reparentView has been deprecated, please use Platform.createView"),this.wire.sendAction("platform-reparent-view",this.identity).catch((e=>{}));const n={...e,uuid:e.uuid??this.identity.uuid},i=await this.fin.View.wrap(n),r=await i.getOptions();return this.createView(r,t)}async getSnapshot(){this.wire.sendAction("platform-get-snapshot",this.identity).catch((e=>{}));return(await this.getClient()).dispatch("get-snapshot")}async getViewSnapshot(e){return(await this.getClient()).dispatch("get-view-snapshot",{viewIdentity:e})}async applySnapshot(e,t){this.wire.sendAction("platform-apply-snapshot",this.identity).catch((e=>{}));const n="Requested snapshot must be a valid Snapshot object, or a url or filepath to such an object.";let i;if("string"==typeof e)try{i=(await this._channel.wire.sendAction("get-application-manifest",{manifestUrl:e})).payload.data}catch(e){throw new Error(`${n}: ${e}`)}else i=e;if(!i.windows)throw new Error(n);const r=await this.getClient();return await r.dispatch("apply-snapshot",{snapshot:i,options:t}),this}async fetchManifest(e){return(await this.getClient()).dispatch("platform-fetch-manifest",{manifestUrl:e})}async launchContentManifest(e){this.wire.sendAction("platform-launch-content-manifest",this.identity).catch((()=>{}));const t=await this.getClient(),n=await this.fetchManifest(e);return t.dispatch("launch-into-platform",{manifest:n,manifestUrl:e}),this}async setWindowContext(e={},t){if(this.wire.sendAction("platform-set-window-context",this.identity).catch((e=>{})),!e)throw new Error("Please provide a serializable object or string to set the context.");const n=await this.getClient(),{entityType:i}=t?await this.fin.System.getEntityInfo(t.uuid,t.name):this.fin.me;await n.dispatch("set-window-context",{context:e,entityType:i,target:t||{uuid:this.fin.me.uuid,name:this.fin.me.name}})}async getWindowContext(e){this.wire.sendAction("platform-get-window-context",this.identity).catch((e=>{}));const t=await this.getClient(),{entityType:n}=e?await this.fin.System.getEntityInfo(e.uuid,e.name):this.fin.me;return t.dispatch("get-window-context",{target:e||{uuid:this.fin.me.uuid,name:this.fin.me.name},entityType:n})}async closeWindow(e,t={skipBeforeUnload:!1}){this.wire.sendAction("platform-close-window",this.identity).catch((e=>{}));return(await this.getClient()).dispatch("close-window",{windowId:e,options:t})}}Mn.Platform=Fn,xn=new WeakMap;var jn={},kn={},Ln={},Tn={};function $n(e){switch(e){case"columns":case"grid":case"rows":case"tabs":return!0;default:return!1}}Object.defineProperty(Tn,"__esModule",{value:!0}),Tn.overrideFromComposables=Tn.isValidPresetType=void 0,Tn.isValidPresetType=$n,Tn.overrideFromComposables=function(...e){return t=>e.reduceRight(((e,t)=>n=>t(e(n))),(e=>e))(t)},Tn.default={isValidPresetType:$n};var Bn={},Gn={},Wn={};Object.defineProperty(Wn,"__esModule",{value:!0}),Wn.ApiConsumer=void 0;Wn.ApiConsumer=class{constructor(e){this.strategy=e,this.consume=async e=>(await this.strategy.getExposedFunctions(e)).reduce(((t,n)=>({...t,[n.key]:this.strategy.createFunction(n,e)})),{})}};var Hn={},Nn={};Object.defineProperty(Nn,"__esModule",{value:!0}),Nn.expose=Nn.getExposedProperties=void 0;const Dn=Symbol("exposedProperties");Nn.getExposedProperties=e=>e[Dn]||e.prototype[Dn]||[];Nn.expose=e=>(t,n,i)=>{t[Dn]=t[Dn]||[],t[Dn].push({key:n,descriptor:i,options:e})},Object.defineProperty(Hn,"__esModule",{value:!0}),Hn.ApiExposer=void 0;const Un=Nn;Hn.ApiExposer=class{constructor(e){this.strategy=e,this.exposeInstance=async(e,t)=>{const n=(0,Un.getExposedProperties)(e),i=await Promise.all(n.map((async({key:n,options:i})=>({key:n,options:await this.strategy.exposeFunction(e[n].bind(e),{key:n,options:i,meta:t})}))));await this.strategy.exposeMeta(t,i)}}};var Vn={},zn={},Kn={};Object.defineProperty(Kn,"__esModule",{value:!0}),Kn.ChannelsConsumer=void 0;Kn.ChannelsConsumer=class{constructor(e){this.channel=e,this.getExposedFunctions=async e=>{const{id:t}=e,{props:n}=await this.channel.dispatch(`api-meta:${t}`);return n},this.createFunction=e=>(...t)=>{const{action:n}=e.options;return this.channel.dispatch(n,{args:t})}}};var qn={};Object.defineProperty(qn,"__esModule",{value:!0}),qn.ChannelsExposer=void 0;qn.ChannelsExposer=class{constructor(e){this.channelProviderOrClient=e,this.exposeFunction=async(e,t)=>{const{key:n,options:i,meta:r}=t,{id:o}=r,s=`${o}.${i?.action||n}`;return await this.channelProviderOrClient.register(s,(async({args:t})=>e(...t))),{action:s}},this.exposeMeta=async({id:e},t)=>{const n=`api-meta:${e}`;await this.channelProviderOrClient.register(n,(()=>({props:t})))}}},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Kn,e),n(qn,e)}(zn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(zn,e)}(Vn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Wn,e),n(Hn,e),n(Vn,e),n(Nn,e)}(Gn);var Jn={};Object.defineProperty(Jn,"__esModule",{value:!0}),Jn.createRelayedDispatch=exports.relayChannelClientApi_1=Jn.relayChannelClientApi=void 0;const Yn=["no longer connected","RTCDataChannel closed unexpectedly","The client you are trying to dispatch from is disconnected from the target provider"];exports.relayChannelClientApi_1=Jn.relayChannelClientApi=async(e,t)=>{e.register(`relay:${t}`,(({action:t,target:n,payload:i})=>e.dispatch(n,t,i))),await Promise.resolve()};Jn.createRelayedDispatch=(e,t,n,i)=>async(r,o)=>{try{return await e.dispatch(`relay:${n}`,{action:r,payload:o,target:t})}catch(e){if(s=e.message,Yn.some((e=>s.includes(e)))&&i)throw new Error(i);throw e}var s};var Zn,Qn,Xn,ei=s&&s.__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},ti=s&&s.__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)};Object.defineProperty(Bn,"__esModule",{value:!0}),Bn.ColumnOrRow=Bn.TabStack=Bn.LayoutNode=void 0;const ni=Gn,ii=Jn;class ri{constructor(e,t){Zn.set(this,void 0),this.isRoot=()=>ti(this,Zn,"f").isRoot(this.entityId),this.exists=()=>ti(this,Zn,"f").exists(this.entityId),this.getParent=async()=>{const e=await ti(this,Zn,"f").getParent(this.entityId);if(e)return ri.getEntity(e,ti(this,Zn,"f"))},this.createAdjacentStack=async(e,t)=>{const n=await ti(this,Zn,"f").createAdjacentStack(this.entityId,e,t);return ri.getEntity({entityId:n,type:"stack"},ti(this,Zn,"f"))},this.getAdjacentStacks=async e=>(await ti(this,Zn,"f").getAdjacentStacks({targetId:this.entityId,edge:e})).map((e=>ri.getEntity({type:"stack",entityId:e.entityId},ti(this,Zn,"f")))),ei(this,Zn,e,"f"),this.entityId=t}}Bn.LayoutNode=ri,Zn=new WeakMap,ri.newLayoutEntitiesClient=async(e,t,n)=>{const i=(0,ii.createRelayedDispatch)(e,n,"layout-relay","You are trying to interact with a layout component on a window that does not exist or has been destroyed.");return new ni.ApiConsumer(new ni.ChannelsConsumer({dispatch:i})).consume({id:t})},ri.getEntity=(e,t)=>{const{entityId:n,type:i}=e;switch(i){case"column":case"row":return new si(t,n,i);case"stack":return new oi(t,n);default:throw new Error(`Unrecognised Layout Entity encountered ('${JSON.stringify(e)})`)}};class oi extends ri{constructor(e,t){super(e,t),Qn.set(this,void 0),this.type="stack",this.getViews=()=>ti(this,Qn,"f").getStackViews(this.entityId),this.addView=async(e,t={index:0})=>ti(this,Qn,"f").addViewToStack(this.entityId,e,t),this.removeView=async e=>{await ti(this,Qn,"f").removeViewFromStack(this.entityId,e)},this.setActiveView=async e=>{await ti(this,Qn,"f").setStackActiveView(this.entityId,e)},ei(this,Qn,e,"f")}}Bn.TabStack=oi,Qn=new WeakMap;class si extends ri{constructor(e,t,n){super(e,t),Xn.set(this,void 0),this.getContent=async()=>(await ti(this,Xn,"f").getContent(this.entityId)).map((e=>ri.getEntity(e,ti(this,Xn,"f")))),ei(this,Xn,e,"f"),this.type=n}}Bn.ColumnOrRow=si,Xn=new WeakMap;var ai={};Object.defineProperty(ai,"__esModule",{value:!0}),ai.DEFAULT_LAYOUT_KEY=ai.LAYOUT_CONTROLLER_ID=void 0,ai.LAYOUT_CONTROLLER_ID="layout-entities",ai.DEFAULT_LAYOUT_KEY="__default__";var ci,di,hi,li=s&&s.__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)};Object.defineProperty(Ln,"__esModule",{value:!0}),Ln.Layout=void 0;const ui=G,pi=O,wi=d,yi=Tn,fi=Bn,gi=ai;class mi extends wi.Base{static getClient(e){return li(e,di,"f").getValue()}constructor(e,t){super(t),ci.add(this),di.set(this,new ui.Lazy((async()=>fi.LayoutNode.newLayoutEntitiesClient(await this.platform.getClient(),gi.LAYOUT_CONTROLLER_ID,this.identity)))),this.replace=async e=>{this.wire.sendAction("layout-replace").catch((e=>{}));const t=await this.platform.getClient();await t.dispatch("replace-layout",{target:this.identity,opts:{layout:e}})},this.replaceView=async(e,t)=>{this.wire.sendAction("layout-replace-view").catch((e=>{}));const n=await this.platform.getClient();await n.dispatch("replace-view",{target:this.identity,opts:{viewToReplace:e,newView:t}})},this.applyPreset=async e=>{this.wire.sendAction("layout-apply-preset").catch((e=>{}));const t=await this.platform.getClient(),{presetType:n}=e;if(!n||!(0,yi.isValidPresetType)(n))throw new Error("Cannot apply preset layout, please include an applicable presetType property in the PresetLayoutOptions.");await t.dispatch("apply-preset-layout",{target:this.identity,opts:{presetType:n}})};const n=(0,pi.validateIdentity)(e);if(n)throw new Error(n);this.identity=e,this.platform=this.fin.Platform.wrapSync({uuid:e.uuid}),e.uuid===this.fin.me.uuid&&e.name===this.fin.me.name&&(this.init=this.fin.Platform.Layout.init)}async getConfig(){this.wire.sendAction("layout-get-config").catch((e=>{}));return(await this.platform.getClient()).dispatch("get-frame-snapshot",{target:this.identity})}async getCurrentViews(){this.wire.sendAction("layout-get-views").catch((e=>{}));const e=await this.platform.getClient();return(await e.dispatch("get-layout-views",{target:this.identity})).map((e=>this.fin.View.wrapSync(e)))}async getRootItem(){this.wire.sendAction("layout-get-root-item").catch((()=>{}));const e=await li(this,di,"f").getValue(),t=await e.getRoot("layoutName"in this.identity?this.identity:void 0);return fi.LayoutNode.getEntity(t,e)}async getStackByViewIdentity(e){this.wire.sendAction("layout-get-stack-by-view").catch((()=>{}));const t=await li(this,di,"f").getValue(),n=await t.getStackByView(e);if(!n)throw new Error(`No stack found for view: ${e.uuid}/${e.name}`);return fi.LayoutNode.getEntity(n,t)}async addView(e,{location:t,targetView:n}={}){this.wire.sendAction("layout-add-view").catch((e=>{}));const{identity:i}=await li(this,ci,"m",hi).call(this,"layout-add-view",{viewOptions:e,location:t,targetView:n});return{identity:i}}async closeView(e){this.wire.sendAction("layout-close-view").catch((e=>{})),await li(this,ci,"m",hi).call(this,"layout-close-view",{viewIdentity:e})}}Ln.Layout=mi,di=new WeakMap,ci=new WeakSet,hi=async function(e,t){return(await this.platform.getClient()).dispatch(e,{target:this.identity,opts:t})};var vi,Ci,bi,Ii,Ei,xi=s&&s.__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)},Ai=s&&s.__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};Object.defineProperty(kn,"__esModule",{value:!0}),kn.LayoutModule=void 0;const Pi=d,Mi=Ln,_i=ai;class Oi extends Pi.Base{constructor(){super(...arguments),vi.add(this),Ci.set(this,!1),bi.set(this,null),this.init=async(e={})=>{if(this.wire.sendAction("layout-init").catch((e=>{})),!this.wire.environment.layoutAllowedInContext(this.fin))throw new Error("Layout.init can only be called from a Window context.");if(xi(this,Ci,"f"))throw new Error("Layout.init was already called, please use Layout.create to add additional layouts.");"openfin"===this.wire.environment.type&&await this.fin.Platform.getCurrentSync().getClient(),Ai(this,Ci,!0,"f"),Ai(this,bi,await this.wire.environment.initLayoutManager(this.fin,this.wire,e),"f"),await this.wire.environment.applyLayoutSnapshot(this.fin,xi(this,bi,"f"),e);const t={name:this.fin.me.name,uuid:this.fin.me.uuid};if(!e.layoutManagerOverride){const e={layoutName:_i.DEFAULT_LAYOUT_KEY,...t};return xi(this,Ii,"f").call(this,e)}return this.wrapSync(t)},Ii.set(this,(e=>{const t="[Layout] You are using a deprecated property `layoutManager` - it will throw if you access it starting in v37.",n=new Proxy({},{get(e,n){throw console.warn(`[Layout-mgr-proxy] accessing ${n.toString()}`),new Error(t)}}),i=Object.assign(this.wrapSync(e),{layoutManager:n});return new Proxy(i,{get(e,n){if("layoutManager"===n)throw console.warn(`[Layout-proxy] accessing ${n.toString()}`),new Error(t);return e[n]}})})),this.getCurrentLayoutManagerSync=()=>xi(this,vi,"m",Ei).call(this,"fin.Platform.Layout.getCurrentLayoutManagerSync()"),this.create=async e=>this.wire.environment.createLayout(xi(this,vi,"m",Ei).call(this,"fin.Platform.Layout.create()"),e),this.destroy=async e=>this.wire.environment.destroyLayout(xi(this,vi,"m",Ei).call(this,"fin.Platform.Layout.destroy()"),e)}async wrap(e){return this.wire.sendAction("layout-wrap").catch((e=>{})),new Mi.Layout(e,this.wire)}wrapSync(e){return this.wire.sendAction("layout-wrap-sync").catch((e=>{})),new Mi.Layout(e,this.wire)}async getCurrent(){if(this.wire.sendAction("layout-get-current").catch((e=>{})),"openfin"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error("You are not in a Window context. Only Windows can have a Layout.");const{uuid:e,name:t}=this.fin.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction("layout-get-current-sync").catch((e=>{})),"openfin"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error("You are not in a Window context. Only Windows can have a Layout.");const{uuid:e,name:t}=this.fin.me;return this.wrapSync({uuid:e,name:t})}async getLayoutByViewIdentity(e){this.wire.sendAction("layout-get-by-view-identity").catch((()=>{}));let t=await this.wire.environment.getViewWindowIdentity(this.fin,e);t.identity&&(t=t.identity);try{const n=this.wrapSync(t),i=await Mi.Layout.getClient(n),r=await i.getLayoutIdentityForViewOrThrow(e);return this.wrapSync(r)}catch(n){if(!["No action registered at target for","getLayoutIdentityForViewOrThrow is not a function"].some((e=>n.message.includes(e))))throw n;if(t.uuid===t.name)throw new Error(`View identity ${JSON.stringify(e)} is not attached to any layout in provider window ${JSON.stringify(t)}.`);return this.wrapSync(t)}}}kn.LayoutModule=Oi,Ci=new WeakMap,bi=new WeakMap,Ii=new WeakMap,vi=new WeakSet,Ei=function(e){if(!xi(this,bi,"f"))throw new Error(`You must call init before using the API ${e}`);return xi(this,bi,"f")},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(kn,e),n(Ln,e)}(jn),Object.defineProperty(Pn,"__esModule",{value:!0}),Pn.PlatformModule=void 0;const Si=d,Ri=Mn,Fi=jn;class ji extends Si.Base{constructor(e,t){super(e),this._channel=t,this.Layout=new Fi.LayoutModule(this.wire)}async init(e){if(!fin.__internal_.isPlatform||fin.me.name!==fin.me.uuid)throw new Error("fin.Platform.init should only be called from a custom platform provider running in the main window of the application.");return this.wire.environment.initPlatform(this.fin,e)}async wrap(e){return this.wire.sendAction("platform-wrap").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}wrapSync(e){return this.wire.sendAction("platform-wrap-sync").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}async getCurrent(){return this.wire.sendAction("platform-get-current").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction("platform-get-current-sync").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}start(e){return this.wire.sendAction("platform-start").catch((e=>{})),new Promise((async(t,n)=>{try{const{uuid:n}=e,i=await this.fin.Application._create({...e,isPlatformController:!0});i.once("platform-api-ready",(()=>t(this.wrapSync({uuid:n})))),i._run({uuid:n})}catch(e){n(e)}}))}startFromManifest(e,t){return this.wire.sendAction("platform-start-from-manifest").catch((e=>{})),new Promise((async(n,i)=>{try{const i=await this.fin.Application._createFromManifest(e);i.once("platform-api-ready",(()=>n(this.wrapSync({uuid:i.identity.uuid})))),i._run(t)}catch(e){i(e)}}))}}Pn.PlatformModule=ji,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Pn,e),n(Mn,e)}(An);var ki={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getMe=e.getBaseMe=e.environmentUnsupportedMessage=void 0;const t=J(),n=un,i=ie(),r=rn;function o(e,t,n){return{...{isView:"view"===e,isWindow:"window"===e,isFrame:"iframe"===e,isExternal:"external connection"===e},uuid:t,name:n,entityType:e}}e.environmentUnsupportedMessage="You are not running in OpenFin.",e.getBaseMe=o,e.getMe=function(s){const{uuid:a,name:c,entityType:d}=s.me,h={setContext(){throw new Error(e.environmentUnsupportedMessage)},addContextHandler(){throw new Error(e.environmentUnsupportedMessage)},getContextGroups(){throw new Error(e.environmentUnsupportedMessage)},joinContextGroup(){throw new Error(e.environmentUnsupportedMessage)},removeFromContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getAllClientsInContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getInfoForContextGroup(){throw new Error(e.environmentUnsupportedMessage)}},l="Interop API has not been instantiated. Either connection has failed or you have not declared interop in your config.",u={setContext(){throw new Error(l)},addContextHandler(){throw new Error(l)},getContextGroups(){throw new Error(l)},joinContextGroup(){throw new Error(l)},removeFromContextGroup(){throw new Error(l)},getAllClientsInContextGroup(){throw new Error(l)},getInfoForContextGroup(){throw new Error(l)}},p={eventNames:()=>{throw new Error(e.environmentUnsupportedMessage)},emit:()=>{throw new Error(e.environmentUnsupportedMessage)},listeners:()=>{throw new Error(e.environmentUnsupportedMessage)},listenerCount:()=>{throw new Error(e.environmentUnsupportedMessage)},on:()=>{throw new Error(e.environmentUnsupportedMessage)},addListener:()=>{throw new Error(e.environmentUnsupportedMessage)},once:()=>{throw new Error(e.environmentUnsupportedMessage)},prependListener:()=>{throw new Error(e.environmentUnsupportedMessage)},prependOnceListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeAllListeners:()=>{throw new Error(e.environmentUnsupportedMessage)}};switch(d){case"view":return Object.assign(new t.View(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case"window":return Object.assign(new i._Window(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case"iframe":return Object.assign(new n._Frame(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case"external connection":return Object.assign(new r.ExternalApplication(s,{uuid:a}),o(d,a,c),{interop:u,isOpenFin:!1});default:return{...o(d,a,c),...p,interop:h,isOpenFin:!1}}}}(ki);var Li={},Ti={},$i={};Object.defineProperty($i,"__esModule",{value:!0}),$i.createWarningObject=$i.createUnusableObject=void 0,$i.createUnusableObject=function(e){const t=()=>{throw new Error(e)};return new Proxy({},{apply:t,construct:t,defineProperty:t,deleteProperty:t,get:t,getOwnPropertyDescriptor:t,getPrototypeOf:t,has:t,isExtensible:t,ownKeys:t,preventExtensions:t,set:t,setPrototypeOf:t})},$i.createWarningObject=function(e,t){return new Proxy(t,{get:(...t)=>(console.warn(e),Reflect.get(...t)),set:(...t)=>(console.warn(e),Reflect.set(...t)),getOwnPropertyDescriptor:(...t)=>(console.warn(e),Reflect.getOwnPropertyDescriptor(...t)),ownKeys:(...t)=>(console.warn(e),Reflect.ownKeys(...t))})};var Bi,Gi={},Wi={};var Hi={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.wrapIntentHandler=e.BROKER_ERRORS=e.generateOverrideWarning=e.generateOverrideError=e.wrapContextHandler=e.wrapInTryCatch=e.generateId=void 0;e.generateId=()=>`${Math.random()}${Date.now()}`;e.wrapInTryCatch=(e,t)=>(...n)=>{try{return e(...n)}catch(e){throw new Error((t||"")+e)}};e.wrapContextHandler=(e,t)=>async n=>{try{await e(n)}catch(e){throw console.error(`Error thrown by handler ${t} for context type ${n.type}: ${e}`),e}};e.generateOverrideError=(e,t)=>`You have tried to to use ${e} but ${t} has not been overridden in the Interop Broker. Please override this function. Refer to our documentation for more info.`;e.generateOverrideWarning=(e,t,n,i)=>{const{uuid:r,name:o}=n;return i?`Entity with identity: ${r}/${o} has called ${i} or ${e} but ${t} has not been overridden.`:`Entity with identity: ${r}/${o} has called ${e} but ${t} has not been overridden.`},e.BROKER_ERRORS={fireIntent:(0,e.generateOverrideError)("fireIntent","handleFiredIntent"),fireIntentForContext:(0,e.generateOverrideError)("fireIntentForContext","handleFiredIntentForContext"),getInfoForIntent:(0,e.generateOverrideError)("getInfoForIntent","handleInfoForIntent"),getInfoForIntentsByContext:(0,e.generateOverrideError)("getInfoForIntentsByContext","handleInfoForIntentsByContext"),joinSessionContextGroupWithJoinContextGroup:"The Context Group you have tried to join is a Session Context Group. Custom Context Groups can only be defined by the Interop Broker through code or manifest configuration. Please use joinSessionContextGroup.",fdc3Open:(0,e.generateOverrideError)("fdc3.open","fdc3HandleOpen"),fdc3FindInstances:(0,e.generateOverrideError)("fdc3.findInstances","fdc3HandleFindInstances"),fdc3GetAppMetadata:(0,e.generateOverrideError)("fdc3.getAppMetadata","fdc3HandleGetAppMetadata"),fdc3GetInfo:(0,e.generateOverrideError)("fdc3.getInfo","fdc3HandleGetInfo")};e.wrapIntentHandler=(e,t)=>async n=>{try{return e(n)}catch(e){throw console.error(`Error thrown by handler ${t}: ${e}`),e}}}(Hi);var Ni,Di,Ui={};function Vi(){if(Di)return Gi;Di=1;var e,t,n,r=s&&s.__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},o=s&&s.__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)},a=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Gi,"__esModule",{value:!0}),Gi.InteropBroker=void 0;const c=d,h=a(function(){if(Bi)return Wi;Bi=1,Object.defineProperty(Wi,"__esModule",{value:!0});const e=Cr();return Wi.default=class{constructor(e,t){this.provider=e,this.id=t,this.lastContext=void 0,this.contextGroupMap=new Map,this.clients=new Map,this.registerListeners()}registerListeners(){this.provider.register(`sessionContextGroup:getContext-${this.id}`,this.getCurrentContext.bind(this)),this.provider.register(`sessionContextGroup:setContext-${this.id}`,this.setContext.bind(this)),this.provider.register(`sessionContextGroup:handlerAdded-${this.id}`,this.handlerAdded.bind(this)),this.provider.register(`sessionContextGroup:handlerRemoved-${this.id}`,this.handlerRemoved.bind(this))}getCurrentContext(e){return e.type?this.contextGroupMap.get(e.type):this.lastContext}setContext(t,n){const{context:i}=t,r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name} not in Session Client State Map`);this.contextGroupMap.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{e.contextHandlers.get(i.type)?.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getClientState(e){return this.clients.get(e.endpointId)}async handlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(i){const e=r.contextHandlers.get(i)||[];r.contextHandlers.set(i,[...e,n]);const o=this.contextGroupMap.get(i);o&&await this.provider.dispatch(t,n,o)}else{r.globalHandler=n;const e=[...this.contextGroupMap.keys()].map((async e=>{const i=this.contextGroupMap.get(e);i&&await this.provider.dispatch(t,n,i)}));await Promise.all(e)}}handlerRemoved(e,t){const{handlerId:n}=e,i=this.clients.get(t.endpointId);i?(Array.from(i.contextHandlers).forEach((([,e])=>{const t=e.indexOf(n);t>-1&&e.splice(t,1)})),i.globalHandler===n&&(i.globalHandler=void 0)):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={contextHandlers:new Map,clientIdentity:e,globalHandler:void 0};this.clients.set(e.endpointId,t)}}onDisconnection(e){this.clients.delete(e.endpointId)}},Wi}()),l=Hi,u=a(i),p=function(){if(Ni)return Ui;Ni=1,Object.defineProperty(Ui,"__esModule",{value:!0}),Ui.PrivateChannelProvider=void 0;const e=Vi();return Ui.PrivateChannelProvider=class t{constructor(e,t){this.provider=e,this.id=t,this.clients=new Map,this.registerListeners(),this.contextByContextType=new Map,this.lastContext=void 0,this.provider.onConnection((e=>this.registerNewClient(e))),this.provider.onDisconnection((async e=>{const{endpointId:t}=e;this.clients.has(t)&&await this.handleClientDisconnecting(e),0===(await this.provider.getAllClientInfo()).length&&this.provider.destroy()}))}getClientState(e){return this.clients.get(e.endpointId)}registerListeners(){this.provider.register("broadcast",this.broadcast.bind(this)),this.provider.register("getCurrentContext",this.getCurrentContext.bind(this)),this.provider.register("contextHandlerAdded",this.contextHandlerAdded.bind(this)),this.provider.register("contextHandlerRemoved",this.contextHandlerRemoved.bind(this)),this.provider.register("nonStandardHandlerRemoved",this.nonStandardHandlerRemoved.bind(this)),this.provider.register("onAddContextHandlerAdded",this.onAddContextHandlerAdded.bind(this)),this.provider.register("onDisconnectHandlerAdded",this.onDisconnectHandlerAdded.bind(this)),this.provider.register("onUnsubscribeHandlerAdded",this.onUnsubscribeHandlerAdded.bind(this)),this.provider.register("clientDisconnecting",((e,t)=>{this.handleClientDisconnecting(t)}))}broadcast(t,n){const{context:i}=t;if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name}, tried to call broadcast, is not connected to this Private Channel`);const r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to broadcast - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);this.contextByContextType.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{const t=e.handlerIdsByContextTypes.get(i.type);t&&t.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getCurrentContext(e,t){const{contextType:n}=e;if(!this.getClientState(t))throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call getCurrentContext, is not connected to this Private Channel`);if(void 0!==n){return this.contextByContextType.get(n)||null}return this.lastContext?this.lastContext:null}contextHandlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call addContextListener, is not connected to this Private Channel`);if(i){const e=r.handlerIdsByContextTypes.get(i)||[];r.handlerIdsByContextTypes.set(i,[...e,n])}else r.globalHandler=n;Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&e.onAddContextListenerHandlerId&&this.provider.dispatch(e.clientIdentity,e.onAddContextListenerHandlerId,i)}))}async contextHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);if(i){let e;if(i.globalHandler===n)i.globalHandler=void 0;else for(const[t,r]of i.handlerIdsByContextTypes){const i=r.indexOf(n);i>-1&&(r.splice(i,1),e=t)}const r=(await this.getConnectedClients()).map((async n=>{const{clientIdentity:i,clientIdentity:{endpointId:r},onUnsubscribeHandlerId:o}=n;r!==t.endpointId&&o&&await this.provider.dispatch(i,o,e)}));try{await Promise.all(r)}catch(e){throw console.error(`Problem when attempting to dispatch to onUnsubscribeHandlers. Error: ${e} Removing Client: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}`),new Error(e)}}else console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}.`)}nonStandardHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);i?i.onDisconnectHandlerId===n?i.onDisconnectHandlerId=void 0:i.onAddContextListenerHandlerId===n?i.onAddContextListenerHandlerId=void 0:i.onUnsubscribeHandlerId===n&&(i.onUnsubscribeHandlerId=void 0):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}onAddContextHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onAddContextListener, is not connected to this Private Channel`);n.onAddContextListenerHandlerId=i,Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&Array.from(e.handlerIdsByContextTypes.keys()).forEach((e=>{this.provider.dispatch(t,i,e)}))}))}onDisconnectHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onDisconnect, is not connected to this Private Channel`);n.onDisconnectHandlerId=i}onUnsubscribeHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onUnsubscribe, is not connected to this Private Channel`);n.onUnsubscribeHandlerId=i}removeClient(e){const t=this.getClientState(e);if(!t)throw new Error(`Client with Identity: ${e.uuid} ${e.name}, tried to call disconnect, is not connected to this Private Channel`);t.handlerIdsByContextTypes.clear(),this.clients.delete(e.endpointId)}async fireOnDisconnectForOtherClients(e){const{endpointId:t}=e,n=(await this.getConnectedClients()).map((async e=>{const{clientIdentity:{endpointId:n},onDisconnectHandlerId:i}=e;n!==t&&i&&await this.provider.dispatch(e.clientIdentity,i)}));try{await Promise.all(n)}catch(t){throw console.error(`Problem when attempting to dispatch to onDisconnectHandlers. Error: ${t} Disconnecting Client: uuid: ${e.uuid}. name: ${e.name}. endpointId: ${e.endpointId}`),new Error(t)}}async unsubscribeAll(e){const{endpointId:t}=e,n=this.clients.get(t);if(n){const t=Array.from(n.handlerIdsByContextTypes.values()).flat(),i=n.globalHandler;if(t.length>0){const n=t.map((async t=>this.contextHandlerRemoved({handlerId:t},e)));try{await Promise.all(n)}catch(e){console.error(e.message)}}if(i)try{await this.contextHandlerRemoved({handlerId:i},e)}catch(e){console.error(e.message)}}}async handleClientDisconnecting(e){await this.unsubscribeAll(e),this.removeClient(e),await this.fireOnDisconnectForOtherClients(e)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={clientIdentity:e,handlerIdsByContextTypes:new Map,globalHandler:void 0,onAddContextListenerHandlerId:void 0,onUnsubscribeHandlerId:void 0,onDisconnectHandlerId:void 0};this.clients.set(e.endpointId,t)}}async getConnectedClients(){const e=await this.provider.getAllClientInfo();return Array.from(this.clients.values()).filter((t=>{const{uuid:n,name:i}=t.clientIdentity;return e.some((e=>i===e.name&&n===e.uuid))}))}static init(e,n){return new t(e,n)}},Ui}(),w=G,y=[{id:"green",displayMetadata:{color:"#00CC88",name:"green"}},{id:"purple",displayMetadata:{color:"#8C61FF",name:"purple"}},{id:"orange",displayMetadata:{color:"#FF8C4C",name:"orange"}},{id:"red",displayMetadata:{color:"#FF5E60",name:"red"}},{id:"pink",displayMetadata:{color:"#FF8FB8",name:"pink"}},{id:"yellow",displayMetadata:{color:"#E9FF8F",name:"yellow"}}];let f=class i extends c.Base{constructor(i,s,a){super(i),e.set(this,void 0),t.set(this,void 0),n.set(this,void 0),this.getProvider=()=>o(this,n,"f").getValue(),this.interopClients=new Map,this.contextGroupsById=new Map,r(this,t,a.contextGroups??[...y],"f"),r(this,e,a.fdc3Info,"f"),a?.logging&&(this.logging=a.logging),this.intentClientMap=new Map,this.lastContextMap=new Map,this.sessionContextGroupMap=new Map,r(this,n,new w.Lazy(s),"f"),this.setContextGroupMap(),this.setupChannelProvider()}static createClosedConstructor(...e){return class extends i{constructor(...t){if(t.length){const[n,i,r]=t;if(r&&"object"==typeof r&&!(0,u.default)(r,e[2]))return console.warn("You have modified the parameters of the InteropOverride constructor. This behavior is deprecated and will be removed in a future version. You can modify these options in your manifest. Please consult our Interop docs for guidance on migrating to the new override scheme."),void super(e[0],e[1],r);console.warn("You are attempting to pass arguments to the InteropOverride constructor. This is not necessary, and these passed arguments will be ignored. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.")}super(...e)}}}setContext({context:e},t){this.wire.sendAction("interop-broker-set-context").catch((e=>{}));const n=this.getClientState(t);if(!n||!n.contextGroupId)throw n?new Error("You must join a context group before you can set context."):new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);{const{contextGroupId:t}=n;this.setContextForGroup({context:e},t)}}setContextForGroup({context:e},t){this.wire.sendAction("interop-broker-set-context-for-group").catch((e=>{}));const n=this.contextGroupsById.get(t);if(!n)throw new Error(`Unable to set context for context group that isn't in the context group mapping: ${t}.`);const r=i.checkContextIntegrity(e);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(e)}`);const o=e.type;n.set(o,e),this.lastContextMap.set(t,o);Array.from(this.interopClients.values()).filter((e=>e.contextGroupId===t)).forEach((t=>{for(const[,n]of t.contextHandlers)i.isContextTypeCompatible(o,n.contextType)&&this.invokeContextHandler(t.clientIdentity,n.handlerId,e)}))}getCurrentContext(e,t){this.wire.sendAction("interop-broker-get-current-context").catch((e=>{}));const n=this.getClientState(t);if(!n?.contextGroupId)throw new Error("You must be a member of a context group to call getCurrentContext");const{contextGroupId:i}=n,r=this.contextGroupsById.get(i),o=this.lastContextMap.get(i),s=e?.contextType??o;return r&&s?r.get(s):void 0}async joinContextGroup({contextGroupId:e,target:t},n){if(this.wire.sendAction("interop-broker-join-context-group").catch((e=>{})),this.sessionContextGroupMap.has(e))throw new Error(l.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup);if(t){i.hasEndpointId(t)&&await this.addClientToContextGroup({contextGroupId:e},t);try{const n=this.channel.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name));if(!n.length)throw new Error(`Given Identity ${t.uuid} ${t.name} is not connected to the Interop Broker.`);n.length>1&&console.warn(`More than one connection found for identity ${t.uuid} ${t.name}`);const i=[];for(const t of n)i.push(this.addClientToContextGroup({contextGroupId:e},t));await Promise.all(i)}catch(e){throw new Error(e)}}else await this.addClientToContextGroup({contextGroupId:e},n)}async addClientToContextGroup({contextGroupId:e},t){this.wire.sendAction("interop-broker-add-client-to-context-group").catch((e=>{}));const n=this.getClientState(t);if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(!this.getContextGroups().find((t=>t.id===e)))throw new Error(`Attempting to join a context group that does not exist: ${e}. You may only join existing context groups.`);if(n.contextGroupId!==e){n.contextGroupId=e,await this.setCurrentContextGroupInClientOptions(t,e);const i=this.contextGroupsById.get(e);for(const[,e]of n.contextHandlers){const{contextType:n,handlerId:r}=e;if(void 0===n)i.forEach(((e,n)=>{this.invokeContextHandler(t,r,e)}));else if(i.has(n)){const e=i.get(n);e&&this.invokeContextHandler(t,r,e)}}}}async removeFromContextGroup({target:e},t){if(this.wire.sendAction("interop-broker-remove-from-context-group").catch((e=>{})),e){i.hasEndpointId(e)&&await this.removeClientFromContextGroup(e);try{const t=this.channel.connections.filter((t=>t.uuid===e.uuid&&t.name===e.name));if(!t.length)throw new Error(`No connection found for given Identity ${e.uuid} ${e.name}`);t.length>1&&console.warn(`More than one connection found for identity ${e.uuid} ${e.name}`);const n=[];for(const e of t)n.push(this.removeClientFromContextGroup(e));await Promise.all(n)}catch(e){throw new Error(e)}}else await this.removeClientFromContextGroup(t)}async removeClientFromContextGroup(e){this.wire.sendAction("interop-broker-remove-client-from-context-group").catch((e=>{}));const t=this.getClientState(e);t&&(t.contextGroupId=void 0),await this.setCurrentContextGroupInClientOptions(e,null)}getContextGroups(){return this.wire.sendAction("interop-broker-get-context-groups").catch((e=>{})),o(this,t,"f").map((e=>({...e})))}getInfoForContextGroup({contextGroupId:e}){return this.wire.sendAction("interop-broker-get-info-for-context-group").catch((e=>{})),this.getContextGroups().find((t=>t.id===e))}getAllClientsInContextGroup({contextGroupId:e}){this.wire.sendAction("interop-broker-get-all-clients-in-context-group").catch((e=>{}));return Array.from(this.interopClients.values()).filter((t=>t.contextGroupId===e)).map((e=>e.clientIdentity))}async handleFiredIntent(e,t){const n=(0,l.generateOverrideWarning)("fdc3.raiseIntent","InteropBroker.handleFiredIntent",t,"interopClient.fireIntent");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntent)}async setIntentTarget(e,t){this.wire.sendAction("interop-broker-set-intent-target").catch((e=>{}));const n=this.intentClientMap.get(t.name),i=`intent-handler-${e.name}`;if(n){const t=n.get(i);if(t){if(t.pendingIntents.push(e),t.clientIdentity&&t.isReady){const{clientIdentity:e,pendingIntents:n}=t;try{const r=n[n.length-1];await this.invokeIntentHandler(e,i,r),t.pendingIntents=[]}catch(n){console.error(`Error invoking intent handler for client ${e.uuid}/${e.name}/${e.endpointId}`),t.isReady=!1}}}else n.set(i,{isReady:!1,pendingIntents:[e]})}else{this.intentClientMap.set(t.name,new Map);const n=this.intentClientMap.get(t.name);n&&n.set(i,{isReady:!1,pendingIntents:[e]})}}async handleInfoForIntent(e,t){const n=(0,l.generateOverrideWarning)("fdc3.findIntent","InteropBroker.handleInfoForIntent",t,"interopClient.getInfoForIntent");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntent)}async handleInfoForIntentsByContext(e,t){const n=(0,l.generateOverrideWarning)("fdc3.findIntentsByContext","InteropBroker.handleInfoForIntentsByContext",t,"interopClient.getInfoForIntentsByContext");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntentsByContext)}async handleFiredIntentForContext(e,t){const n=(0,l.generateOverrideWarning)("fdc3.raiseIntentForContext","InteropBroker.handleFiredIntentForContext",t,"interopClient.fireIntentForContext");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntentForContext)}async clientDisconnected(e){}async fdc3HandleOpen({app:e,context:t},n){const i=(0,l.generateOverrideWarning)("fdc3.open","InteropBroker.fdc3HandleOpen",n);throw console.warn(i),new Error(l.BROKER_ERRORS.fdc3Open)}async fdc3HandleFindInstances(e,t){const n=(0,l.generateOverrideWarning)("fdc3.open","InteropBroker.fdc3HandleFindInstances",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3FindInstances)}async fdc3HandleGetAppMetadata(e,t){const n=(0,l.generateOverrideWarning)("fdc3.getAppMetadata","InteropBroker.fdc3HandleGetAppMetadata",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3GetAppMetadata)}async invokeContextHandler(e,t,n){const i=await this.getProvider();try{await i.dispatch(e,t,n)}catch(i){console.error(`Error invoking context handler ${t} for context type ${n.type} in client ${e.uuid}/${e.name}/${e.endpointId}`,i)}}async invokeIntentHandler(e,t,n){const i=await this.getProvider();await i.dispatch(e,t,n)}async fdc3HandleGetInfo(t,n){const{fdc3Version:i}=t;return{fdc3Version:i,...o(this,e,"f"),optionalFeatures:{OriginatingAppMetadata:!1,UserChannelMembershipAPIs:!0},appMetadata:{appId:"",instanceId:""}}}async getAllClientInfo(){return(await this.getProvider()).getAllClientInfo()}decorateSnapshot(e){return{...e,interopSnapshotDetails:{contextGroupStates:this.getContextGroupStates()}}}applySnapshot(e,t){const n=e?.interopSnapshotDetails?.contextGroupStates;n&&(t?.closeExistingWindows||this.updateExistingClients(n),this.rehydrateContextGroupStates(n))}updateExistingClients(e){this.interopClients.forEach((t=>{const{clientIdentity:n,contextGroupId:r,contextHandlers:o}=t;if(r){const t=e[r];for(const[,e]of Object.entries(t))o.forEach((t=>{const{handlerId:r,contextType:o}=t;i.isContextTypeCompatible(e.type,o)&&this.invokeContextHandler(n,r,e)}))}}))}getContextGroupStates(){return i.toObject(this.contextGroupsById)}rehydrateContextGroupStates(e){const t=Object.entries(e);for(const[e,n]of t){const t=Object.entries(n);for(const[n,i]of t)if(this.contextGroupsById.has(e)){this.contextGroupsById.get(e).set(n,i)}else console.warn(`Attempting to set a context group that isn't in the context group mapping. Skipping context group rehydration for: ${e}`)}}contextHandlerRegistered({contextType:e,handlerId:t},n){const i={contextType:e,handlerId:t},r=this.getClientState(n);if(r?.contextHandlers.set(t,i),r&&r.contextGroupId){const{contextGroupId:i}=r,o=this.contextGroupsById.get(i);if(void 0===e)o.forEach(((e,i)=>{this.invokeContextHandler(n,t,e)}));else if(o.has(e)){const i=o.get(e);i&&this.invokeContextHandler(n,t,i)}}}async intentHandlerRegistered(e,t){const{handlerId:n}=e,i=this.intentClientMap.get(t.name),r=i?.get(n);if(i)if(r){const{pendingIntents:e}=r;r.clientIdentity=t,r.isReady=!0;try{if(e.length>0){const i=e[e.length-1];await this.invokeIntentHandler(t,n,i),r.pendingIntents=[]}}catch(e){console.error(`Error invoking intent handler: ${n} for client ${t.uuid}/${t.name}/${t.endpointId}`)}}else i.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t});else{this.intentClientMap.set(t.name,new Map);const e=this.intentClientMap.get(t.name);e&&e.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t})}}removeContextHandler({handlerId:e},t){const n=this.getClientState(t);n&&n.contextHandlers.delete(e)}handleJoinSessionContextGroup({sessionContextGroupId:e},t){try{if(!e)throw new Error("Failed to join session context group: must specify group id.");const n=this.sessionContextGroupMap.get(e);if(n)n.registerNewClient(t);else{const n=new h.default(this.channel,e);n.registerNewClient(t),this.sessionContextGroupMap.set(e,n)}return{hasConflict:this.contextGroupsById.has(e)}}catch(e){throw new Error(e)}}getClientState(e){return this.interopClients.get(e.endpointId)}static toObject(e){const t=Object.fromEntries(e),n={};return Object.entries(t).forEach((([e,t])=>{const i=Object.fromEntries(t);n[e]=i})),n}static checkContextIntegrity(e){if(!e)return{isValid:!1,reason:"No context supplied"};if("object"!=typeof e)return{isValid:!1,reason:"Context must be an Object"};if(!e.type)return{isValid:!1,reason:"Context must have a type property"};if(e.id&&"object"!=typeof e.id)return{isValid:!1,reason:"Context id must be an Object populated with key-value identifiers (if set)"};if(e.id){const{id:t}=e,n=Object.keys(t);let i=!1;if(!n.length)return{isValid:!1,reason:"Context id must have at least one key-value identifier"};if(n.forEach((e=>{"string"==typeof e&&"string"==typeof t[e]||(i=!0)})),i)return{isValid:!1,reason:"Context id key-value identifiers must be of type string"}}return e.name&&"string"!=typeof e.name?{isValid:!1,reason:"Context name must be of string type (if set)"}:{isValid:!0}}static hasEndpointId(e){return void 0!==e.endpointId}static isContextTypeCompatible(e,t){return void 0===t||e===t}setContextGroupMap(){for(const e of this.getContextGroups())this.contextGroupsById.set(e.id,new Map)}async setCurrentContextGroupInClientOptions(e,t){try{const n=await this.fin.System.getEntityInfo(e.uuid,e.name);let i;"view"===n.entityType?i=await this.fin.View.wrap(e):"window"===n.entityType&&(i=await this.fin.Window.wrap(e)),i&&await i.updateOptions({interop:{currentContextGroup:t}})}catch(e){}}async setupChannelProvider(){try{const e=await this.getProvider();this.channel=e,this.wireChannel(e)}catch(e){throw new Error(`Error setting up Interop Broker Channel Provider: ${e}`)}}wireChannel(e){e.onConnection((async(e,t)=>{if(!await this.isConnectionAuthorized(e,t))throw new Error(`Connection not authorized for ${e.uuid}, ${e.name}`);if(!e.endpointId)throw new Error("Version too old to be compatible with Interop. Please upgrade your runtime to a more recent version.");const n={contextGroupId:void 0,contextHandlers:new Map,clientIdentity:e};t?.currentContextGroup&&this.contextGroupsById.has(t.currentContextGroup)&&(n.contextGroupId=t?.currentContextGroup),this.interopClients.set(e.endpointId,n)})),e.onDisconnection((e=>{this.interopClients.delete(e.endpointId);const t=this.intentClientMap.get(e.name);t&&e.uuid===this.fin.me.uuid&&t.forEach((e=>{e.isReady=!1})),this.sessionContextGroupMap.forEach((t=>{t.onDisconnection(e)})),this.clientDisconnected(e)})),e.beforeAction((async(e,t,n)=>{if(!await this.isActionAuthorized(e,t,n))throw new Error(`Action (${e}) not authorized for ${n.uuid}, ${n.name}`);this.logging?.beforeAction?.enabled&&console.log(e,t,n)})),e.afterAction(((e,t,n)=>{this.logging?.afterAction?.enabled&&console.log(e,t,n)})),e.register("setContext",this.setContext.bind(this)),e.register("fireIntent",this.handleFiredIntent.bind(this)),e.register("getCurrentContext",this.getCurrentContext.bind(this)),e.register("getInfoForIntent",this.handleInfoForIntent.bind(this)),e.register("getInfoForIntentsByContext",this.handleInfoForIntentsByContext.bind(this)),e.register("fireIntentForContext",this.handleFiredIntentForContext.bind(this)),e.register("getContextGroups",this.getContextGroups.bind(this)),e.register("joinContextGroup",this.joinContextGroup.bind(this)),e.register("removeFromContextGroup",this.removeFromContextGroup.bind(this)),e.register("getAllClientsInContextGroup",this.getAllClientsInContextGroup.bind(this)),e.register("getInfoForContextGroup",this.getInfoForContextGroup.bind(this)),e.register("contextHandlerRegistered",this.contextHandlerRegistered.bind(this)),e.register("intentHandlerRegistered",this.intentHandlerRegistered.bind(this)),e.register("removeContextHandler",this.removeContextHandler.bind(this)),e.register("sessionContextGroup:createIfNeeded",this.handleJoinSessionContextGroup.bind(this)),e.register("fdc3Open",this.fdc3HandleOpen.bind(this)),e.register("fdc3v2FindIntentsByContext",this.handleInfoForIntentsByContext.bind(this)),e.register("fdc3FindInstances",this.fdc3HandleFindInstances.bind(this)),e.register("fdc3GetAppMetadata",this.fdc3HandleGetAppMetadata.bind(this)),e.register("fdc3v2GetInfo",(async(e,t)=>this.fdc3HandleGetInfo.bind(this)(e,t))),e.register("createPrivateChannelProvider",(async e=>{const{channelId:t}=e,n=await this.fin.InterApplicationBus.Channel.create(t);p.PrivateChannelProvider.init(n,t)}))}isConnectionAuthorized(e,t){return this.wire.sendAction("interop-broker-is-connection-authorized").catch((e=>{})),Promise.resolve(!0)}isActionAuthorized(e,t,n){return this.wire.sendAction("interop-broker-is-action-authorized").catch((e=>{})),Promise.resolve(!0)}};return Gi.InteropBroker=f,e=new WeakMap,t=new WeakMap,n=new WeakMap,Gi}var zi,Ki={},qi={},Ji=s&&s.__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},Yi=s&&s.__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)};Object.defineProperty(qi,"__esModule",{value:!0});const Zi=d,Qi=Hi;class Xi extends Zi.Base{constructor(e,t,n){super(e),zi.set(this,void 0),this.id=n,Ji(this,zi,t,"f")}async setContext(e){this.wire.sendAction("interop-session-context-group-set-context").catch((e=>{}));return(await Yi(this,zi,"f")).dispatch(`sessionContextGroup:setContext-${this.id}`,{sessionContextGroupId:this.id,context:e})}async getCurrentContext(e){this.wire.sendAction("interop-session-context-group-get-context").catch((e=>{}));return(await Yi(this,zi,"f")).dispatch(`sessionContextGroup:getContext-${this.id}`,{sessionContextGroupId:this.id,type:e})}async addContextHandler(e,t){if(this.wire.sendAction("interop-session-context-group-add-handler").catch((e=>{})),"function"!=typeof e)throw new Error("Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");const n=await Yi(this,zi,"f");let i;return i=t?`sessionContextHandler:invoke-${this.id}-${t}-${(0,Qi.generateId)()}`:`sessionContextHandler:invoke-${this.id}`,n.register(i,(0,Qi.wrapContextHandler)(e,i)),await n.dispatch(`sessionContextGroup:handlerAdded-${this.id}`,{handlerId:i,contextType:t}),{unsubscribe:await this.createUnsubscribeCb(i)}}async createUnsubscribeCb(e){const t=await Yi(this,zi,"f");return async()=>{t.remove(e),await t.dispatch(`sessionContextGroup:handlerRemoved-${this.id}`,{handlerId:e})}}getUserInstance(){return{id:this.id,setContext:(0,Qi.wrapInTryCatch)(this.setContext.bind(this),"Failed to set context: "),getCurrentContext:(0,Qi.wrapInTryCatch)(this.getCurrentContext.bind(this),"Failed to get context: "),addContextHandler:(0,Qi.wrapInTryCatch)(this.addContextHandler.bind(this),"Failed to add context handler: ")}}}qi.default=Xi,zi=new WeakMap;var er={},tr={},nr={},ir={},rr=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),or=s&&s.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),sr=s&&s.__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)&&rr(t,e,n);return or(t,e),t};Object.defineProperty(ir,"__esModule",{value:!0}),ir.PrivateChannelClient=void 0;const ar=sr(Hi);var cr,dr;function hr(){if(cr)return tr;cr=1;var e,t=s&&s.__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)},n=s&&s.__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},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(tr,"__esModule",{value:!0}),tr.FDC3ModuleBase=void 0;const o=nr,a=Hi,c=wr(),d=r(i);return tr.FDC3ModuleBase=class{get client(){return t(this,e,"f").call(this)}get fin(){return this.wire.getFin()}constructor(t,i){this.wire=i,e.set(this,void 0),n(this,e,t,"f")}async broadcast(e){return this.wire.sendAction("fdc3-broadcast").catch((e=>{})),this.client.setContext(e)}async _open(e,t){this.wire.sendAction("fdc3-open").catch((e=>{}));try{return await c.InteropClient.ferryFdc3Call(this.client,"fdc3Open",{app:e,context:t})}catch(e){const t=e.message===a.BROKER_ERRORS.fdc3Open?"ResolverUnavailable":e.message;throw new Error(t)}}async _getChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:"system",...(0,o.getUnsupportedChannelApis)()})))}async getOrCreateChannel(e){this.wire.sendAction("fdc3-get-or-create-channel").catch((e=>{}));const t=(await this._getChannels()).find((t=>t.id===e));if(t)return{...t,type:"system",...(0,o.getUnsupportedChannelApis)()};try{const t=await this.client.joinSessionContextGroup(e);return(0,o.buildAppChannelObject)(t)}catch(e){throw console.error(e.message),new Error(o.ChannelError.CreationFailed)}}async getSystemChannels(){return this.wire.sendAction("fdc3-get-system-channels").catch((e=>{})),this._getChannels()}async joinChannel(e){this.wire.sendAction("fdc3-join-channel").catch((e=>{}));try{return await this.client.joinContextGroup(e)}catch(e){if(e.message===a.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup?console.error("The Channel you have tried to join is an App Channel. Custom Channels can only be defined by the Interop Broker through code or manifest configuration. Please use getOrCreateChannel."):console.error(e.message),e.message.startsWith("Attempting to join a context group that does not exist"))throw new Error(o.ChannelError.NoChannelFound);throw new Error(o.ChannelError.AccessDenied)}}async getCurrentChannel(){this.wire.sendAction("fdc3-get-current-channel").catch((e=>{}));const e=await this.getCurrentContextGroupInfo();return e?this.buildChannelObject(e):null}async leaveCurrentChannel(){return this.wire.sendAction("fdc3-leave-current-channel").catch((e=>{})),this.client.removeFromContextGroup()}async getCurrentContextGroupInfo(){const e=await this.client.getContextGroups(),t=e.map((async e=>this.client.getAllClientsInContextGroup(e.id))),n=(await Promise.all(t)).findIndex((e=>e.some((e=>{const{uuid:t,name:n}=e;return this.wire.me.uuid===t&&this.wire.me.name===n}))));return e[n]}async buildChannelObject(e){return{...e,type:"system",addContextListener:(...[e,t])=>{let n,i;"function"==typeof e?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),n=e):(n=t,"string"==typeof e&&(i=e));const r=(async()=>{let e=!0;const t=await this.client.getCurrentContext(i);return this.client.addContextHandler(((i,r)=>{if(!e||(e=!1,!(0,d.default)(t,i)))return n(i,r)}),i)})();return{...r,unsubscribe:()=>r.then((e=>e.unsubscribe()))}},broadcast:this.broadcast.bind(this),getCurrentContext:async e=>{const t=await this.client.getCurrentContext(e);return void 0===t?null:t}}}},e=new WeakMap,tr}ir.PrivateChannelClient=class{constructor(e,t){this.id=t,this.client=e,this.listeners=new Map}async broadcast(e){return this.client.dispatch("broadcast",{context:e})}async getCurrentContext(e){return this.client.dispatch("getCurrentContext",{contextType:e})}async addContextListener(e,t){if("function"!=typeof t)throw new Error("Non-function argument passed to the second parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");let n;n=e?`contextHandler:invoke-${this.id}-${e}-${ar.generateId()}`:`contextHandler:invoke-${this.id}-${ar.generateId()}`,this.client.register(n,ar.wrapContextHandler(t,n));const i={unsubscribe:await this.createContextUnsubscribeCb(n)};return this.listeners.set(n,i),await this.client.dispatch("contextHandlerAdded",{handlerId:n,contextType:e}),i}createNonStandardUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch("nonStandardHandlerRemoved",{handlerId:e})}}createContextUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch("contextHandlerRemoved",{handlerId:e})}}onAddContextListener(e){const t=`onContextHandlerAdded:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch("onAddContextHandlerAdded",{handlerId:t}),n}onDisconnect(e){const t=`onDisconnect:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch("onDisconnectHandlerAdded",{handlerId:t}),n}onUnsubscribe(e){const t=`onUnsubscribe:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch("onUnsubscribeHandlerAdded",{handlerId:t}),n}async cleanUpAllSubs(){Array.from(this.listeners.keys()).forEach((e=>{this.client.remove(e),this.listeners.delete(e)}))}async disconnect(){try{await this.client.dispatch("clientDisconnecting"),await this.cleanUpAllSubs(),await this.client.disconnect()}catch(e){throw new Error(e.message)}}},function(e){var t=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.getIntentResolution=e.isChannel=e.isContext=e.connectPrivateChannel=e.buildAppChannelObject=e.buildPrivateChannelObject=e.ChannelError=e.ResultError=e.UnsupportedChannelApiError=e.getUnsupportedChannelApis=void 0;const n=Hi,r=ir,o=t(i);e.getUnsupportedChannelApis=e=>({addContextListener:()=>{throw new a("Channel.addContextListener",e)},broadcast:()=>{throw new a("Channel.broadcast",e)},getCurrentContext:()=>{throw new a("Channel.getCurrentContext",e)}});class a extends Error{constructor(e,t="System"){super(e),this.message=`Calling ${e} on an instance of a ${t} Channel returned by fdc3.get${t}Channels is not supported. If you would like to use a ${t} Channel, please use fdc3.joinChannel, fdc3.addContextListener, and fdc3.broadcast instead.`}}var c,d;e.UnsupportedChannelApiError=a,function(e){e.NoResultReturned="NoResultReturned",e.IntentHandlerRejected="IntentHandlerRejected"}(c=e.ResultError||(e.ResultError={})),(d=e.ChannelError||(e.ChannelError={})).NoChannelFound="NoChannelFound",d.AccessDenied="AccessDenied",d.CreationFailed="CreationFailed";e.buildPrivateChannelObject=e=>{let t=!1;const n=()=>{if(t)throw new Error("Private Channel Client has been disconnected from the Private Channel")};return{id:e.id,type:"private",broadcast:async t=>(n(),e.broadcast(t)),getCurrentContext:async t=>(n(),e.getCurrentContext(t)),addContextListener:async(t,i)=>{n();let r=i,o=t;"function"==typeof t&&(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),r=t,o=null);return e.addContextListener(o,r)},onAddContextListener:t=>(n(),e.onAddContextListener(t)),disconnect:async()=>(n(),t=!0,e.disconnect()),onDisconnect:t=>(n(),e.onDisconnect(t)),onUnsubscribe:t=>(n(),e.onUnsubscribe(t))}};e.buildAppChannelObject=e=>({id:e.id,type:"app",broadcast:e.setContext,getCurrentContext:async t=>{const n=await e.getCurrentContext(t);return void 0===n?null:n},addContextListener:(t,n)=>{let i,r;"function"==typeof t?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),i=t):(i=n,"string"==typeof t&&(r=t));const s=(async()=>{let t=!0;const n=await e.getCurrentContext(r);return e.addContextHandler(((e,r)=>{if(!t||(t=!1,!(0,o.default)(n,e)))return i(e,r)}),r)})();return{...s,unsubscribe:()=>s.then((e=>e.unsubscribe()))}}});e.connectPrivateChannel=async t=>{try{const n=await fin.InterApplicationBus.Channel.connect(t),i=new r.PrivateChannelClient(n,t);return(0,e.buildPrivateChannelObject)(i)}catch(e){throw new Error(`Private Channel with id: ${t} doesn't exist`)}};e.isContext=e=>{if(e&&"object"==typeof e&&"type"in e){const{type:t}=e;return"string"==typeof t}return!1};e.isChannel=e=>{if(e&&"object"==typeof e&&"type"in e&&"id"in e){const{type:t,id:n}=e;return"string"==typeof t&&"string"==typeof n&&("app"===t||"private"===t)}return!1};e.getIntentResolution=async(t,i,r,o)=>{const s=(0,n.generateId)(),a=new Promise(((e,t)=>{fin.InterApplicationBus.subscribe({uuid:"*"},s,(t=>{e(t)})).catch((()=>t(new Error("getResult is not supported in this environment"))))})),d=r?{target:r,intentResolutionResultId:s}:{intentResolutionResultId:s},h=o?{name:o,context:i,metadata:d}:{...i,metadata:d},l=async()=>{let n=await a;if(!n||"object"!=typeof n)throw new Error(c.NoResultReturned);const{error:i}=n;if(i)throw new Error(c.IntentHandlerRejected);if((0,e.isChannel)(n)){const{id:i,type:r}=n;switch(r){case"private":n=await(0,e.connectPrivateChannel)(i);break;case"app":{const r=await t.joinSessionContextGroup(i);n=(0,e.buildAppChannelObject)(r);break}}}else if(!(0,e.isContext)(n))throw new Error(c.NoResultReturned);return n},u=o?await t.fireIntent(h):await t.fireIntentForContext(h);return"object"!=typeof u?{source:{appId:"",instanceId:""},intent:"",version:"2.0",getResult:l}:{...u,getResult:l}}}(nr);var lr,ur,pr={};function wr(){if(ur)return Ki;ur=1;var e,t,n=s&&s.__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},i=s&&s.__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)},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ki,"__esModule",{value:!0}),Ki.InteropClient=void 0;const o=d,a=r(qi),c=function(){if(dr)return er;dr=1,Object.defineProperty(er,"__esModule",{value:!0}),er.Fdc3Module=void 0;const e=Hi,t=hr();class n extends t.FDC3ModuleBase{async open(e,t){await super._open(e,t)}addContextListener(e,t){let n;return this.wire.sendAction("fdc3-add-context-listener").catch((e=>{})),"function"==typeof e?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),n=this.client.addContextHandler(e)):n=this.client.addContextHandler(t,null===e?void 0:e),{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}addIntentListener(e,t){this.wire.sendAction("fdc3-add-intent-listener").catch((e=>{}));const n=this.client.registerIntentHandler((e=>{const{context:n,metadata:i}=e,{metadata:r}=n,o=i?.intentResolutionResultId||r?.intentResolutionResultId;o&&this.fin.InterApplicationBus.publish(o,null).catch((()=>null)),t(e.context)}),e,{fdc3Version:"1.2"});return{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}async raiseIntent(t,n,i){this.wire.sendAction("fdc3-raise-intent").catch((e=>{}));const r=i?{name:t,context:n,metadata:{target:i}}:{name:t,context:n};try{return await this.client.fireIntent(r)}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntent?"ResolverUnavailable":t.message;throw new Error(n)}}async findIntent(t,n){this.wire.sendAction("fdc3-find-intent").catch((e=>{}));try{return await this.client.getInfoForIntent({name:t,context:n})}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntent?"ResolverUnavailable":t.message;throw new Error(n)}}async findIntentsByContext(t){this.wire.sendAction("fdc3-find-intents-by-context").catch((e=>{}));try{return await this.client.getInfoForIntentsByContext(t)}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntentsByContext?"ResolverUnavailable":t.message;throw new Error(n)}}async raiseIntentForContext(t,n){this.wire.sendAction("fdc3-raise-intent-for-context").catch((e=>{}));try{return await this.client.fireIntentForContext({...t,metadata:{target:n}})}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntentForContext?"ResolverUnavailable":t.message;throw new Error(n)}}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}getInfo(){return this.wire.sendAction("fdc3-get-info").catch((e=>{})),{providerVersion:this.wire.environment.getAdapterVersionSync(),provider:`openfin-${this.wire.me.uuid}`,fdc3Version:"1.2"}}}return er.Fdc3Module=n,er}(),h=function(){if(lr)return pr;lr=1,Object.defineProperty(pr,"__esModule",{value:!0}),pr.Fdc3Module2=void 0;const e=hr(),t=Hi,n=wr(),i=nr,r=ir;class o extends e.FDC3ModuleBase{async open(e,t){return"string"==typeof e&&console.warn("Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string })."),super._open(e,t)}async findInstances(e){this.wire.sendAction("fdc3-find-instances").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,"fdc3FindInstances",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3FindInstances?"ResolverUnavailable":e.message;throw new Error(n)}}async getAppMetadata(e){this.wire.sendAction("fdc3-get-app-metadata").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,"fdc3GetAppMetadata",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3GetAppMetadata?"ResolverUnavailable":e.message;throw new Error(n)}}async addContextListener(e,t){this.wire.sendAction("fdc3-add-context-listener").catch((e=>{}));const n=e=>t=>{const{contextMetadata:n,...i}=t,r=n?[{...i},n]:[t,null];e(...r)};let i=t,r=n(i);return"function"==typeof e?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),i=e,r=n(i),this.client.addContextHandler(r)):this.client.addContextHandler(r,null===e?void 0:e)}async findIntent(e,n,i){this.wire.sendAction("fdc3-find-intent").catch((e=>{}));try{return await this.client.getInfoForIntent({name:e,context:n,metadata:{resultType:i}})}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntent?"ResolverUnavailable":e.message;throw new Error(n)}}async findIntentsByContext(e,i){this.wire.sendAction("fdc3-find-intents-by-context").catch((e=>{}));const r=i?{context:e,metadata:{resultType:i}}:e;try{return await n.InteropClient.ferryFdc3Call(this.client,"fdc3v2FindIntentsByContext",r)}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntentsByContext?"ResolverUnavailable":e.message;throw new Error(n)}}async raiseIntent(e,n,r){this.wire.sendAction("fdc3-raise-intent").catch((e=>{}));try{return"string"==typeof r&&console.warn("Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string })."),(0,i.getIntentResolution)(this.client,n,r,e)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?"ResolverUnavailable":e.message;throw new Error(n)}}async raiseIntentForContext(e,n){this.wire.sendAction("fdc3-raise-intent-for-context").catch((e=>{}));try{return"string"==typeof n&&console.warn("Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string })."),(0,i.getIntentResolution)(this.client,e,n)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?"ResolverUnavailable":e.message;throw new Error(n)}}async addIntentListener(e,t){if(this.wire.sendAction("fdc3-add-intent-listener").catch((e=>{})),"string"!=typeof e)throw new Error("First argument must be an Intent name");return this.client.registerIntentHandler((async e=>{let n,i;const{context:r,metadata:o}=e,{contextMetadata:s,metadata:a,...c}=r,d=o?.intentResolutionResultId||a?.intentResolutionResultId;try{const e=a?{metadata:a,...c}:{...c};n=await t(e,s),i=n}catch(e){n=e,i={error:!0}}if(d&&this.fin.InterApplicationBus.publish(d,i).catch((()=>null)),n instanceof Error)throw new Error(n.message);return n}),e,{fdc3Version:"2.0"})}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}async createPrivateChannel(){const e=(0,t.generateId)();await n.InteropClient.ferryFdc3Call(this.client,"createPrivateChannelProvider",{channelId:e});const o=await this.fin.InterApplicationBus.Channel.connect(e),s=new r.PrivateChannelClient(o,e);return(0,i.buildPrivateChannelObject)(s)}async getUserChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:"user",...(0,i.getUnsupportedChannelApis)("User")})))}async getSystemChannels(){return console.warn("This API has been deprecated. Please use fdc3.getUserChannels instead."),super.getSystemChannels()}async joinUserChannel(e){return super.joinChannel(e)}async joinChannel(e){return console.warn("This API has been deprecated. Please use fdc3.joinUserChannel instead."),super.joinChannel(e)}async getCurrentChannel(){const e=await super.getCurrentChannel();return e?{...e,type:"user",broadcast:this.broadcast.bind(this)}:null}async getInfo(){return n.InteropClient.ferryFdc3Call(this.client,"fdc3v2GetInfo",{fdc3Version:"2.0"})}}return pr.Fdc3Module2=o,pr}(),l=Hi;let u=class extends o.Base{constructor(i,r){super(i),e.set(this,void 0),t.set(this,void 0),n(this,t,new Map,"f"),n(this,e,r,"f")}async setContext(t){this.wire.sendAction("interop-client-set-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("setContext",{context:t})}async addContextHandler(t,n){if(this.wire.sendAction("interop-client-add-context-handler").catch((e=>{})),"function"!=typeof t)throw new Error("Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");const r=await i(this,e,"f");let o;o=n?`invokeContextHandler-${n}-${(0,l.generateId)()}`:"invokeContextHandler";const s=(0,l.wrapContextHandler)(t,o);return r.register(o,s),await r.dispatch("contextHandlerRegistered",{handlerId:o,contextType:n}),{unsubscribe:async()=>{r.remove(o),await r.dispatch("removeContextHandler",{handlerId:o})}}}async getContextGroups(){this.wire.sendAction("interop-client-get-context-groups").catch((e=>{}));return(await i(this,e,"f")).dispatch("getContextGroups")}async joinContextGroup(t,n){this.wire.sendAction("interop-client-join-context-group").catch((e=>{}));const r=await i(this,e,"f");if(!t)throw new Error("No contextGroupId specified for joinContextGroup.");return r.dispatch("joinContextGroup",{contextGroupId:t,target:n})}async removeFromContextGroup(t){this.wire.sendAction("interop-client-remove-from-context-group").catch((e=>{}));return(await i(this,e,"f")).dispatch("removeFromContextGroup",{target:t})}async getAllClientsInContextGroup(t){this.wire.sendAction("interop-client-get-all-clients-in-context-group").catch((e=>{}));const n=await i(this,e,"f");if(!t)throw new Error("No contextGroupId specified for getAllClientsInContextGroup.");return n.dispatch("getAllClientsInContextGroup",{contextGroupId:t})}async getInfoForContextGroup(t){this.wire.sendAction("interop-client-get-info-for-context-group").catch((e=>{}));const n=await i(this,e,"f");if(!t)throw new Error("No contextGroupId specified for getInfoForContextGroup.");return n.dispatch("getInfoForContextGroup",{contextGroupId:t})}async fireIntent(t){this.wire.sendAction("interop-client-fire-intent").catch((e=>{}));return(await i(this,e,"f")).dispatch("fireIntent",t)}async registerIntentHandler(t,n,r){this.wire.sendAction("interop-client-register-intent-handler").catch((e=>{}));const o=await i(this,e,"f"),s=`intent-handler-${n}`,a=(0,l.wrapIntentHandler)(t,s);try{await o.register(s,a),await o.dispatch("intentHandlerRegistered",{handlerId:s,...r})}catch(e){throw new Error("Unable to register intent handler")}return{unsubscribe:async()=>{o.remove(s)}}}async getCurrentContext(t){this.wire.sendAction("interop-client-get-current-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("getCurrentContext",{contextType:t})}async getInfoForIntent(t){this.wire.sendAction("interop-client-get-info-for-intent").catch((e=>{}));return(await i(this,e,"f")).dispatch("getInfoForIntent",t)}async getInfoForIntentsByContext(t){this.wire.sendAction("interop-client-get-info-for-intents-by-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("getInfoForIntentsByContext",t)}async fireIntentForContext(t){this.wire.sendAction("interop-client-fire-intent-for-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("fireIntentForContext",t)}async joinSessionContextGroup(n){try{const r=i(this,t,"f").get(n);if(r)return r.getUserInstance();const o=await i(this,e,"f"),{hasConflict:s}=await o.dispatch("sessionContextGroup:createIfNeeded",{sessionContextGroupId:n});s&&console.warn(`A (non-session) context group with the name "${n}" already exists. If you are trying to join a Context Group, call joinContextGroup instead.`);const c=new a.default(this.wire,i(this,e,"f"),n);return i(this,t,"f").set(n,c),c.getUserInstance()}catch(e){throw console.error(`Error thrown trying to create Session Context Group with id "${n}": ${e}`),e}}async onDisconnection(t){this.wire.sendAction("interop-client-add-ondisconnection-listener").catch((e=>{}));return(await i(this,e,"f")).onDisconnection((e=>{const{uuid:n}=e;t({type:"interop-broker",topic:"disconnected",brokerName:n})}))}getFDC3Sync(e){switch(e){case"1.2":return new c.Fdc3Module((()=>this),this.wire);case"2.0":return new h.Fdc3Module2((()=>this),this.wire);default:throw new Error(`Invalid FDC3 version provided: ${e}. Must be '1.2' or '2.0'`)}}async getFDC3(e){return this.getFDC3Sync(e)}static async ferryFdc3Call(t,n,r){return(await i(t,e,"f")).dispatch(n,r||null)}};return Ki.InteropClient=u,e=new WeakMap,t=new WeakMap,Ki}var yr,fr,gr,mr={};function vr(){if(yr)return mr;yr=1,Object.defineProperty(mr,"__esModule",{value:!0}),mr.overrideCheck=mr.checkFDC32Overrides=mr.getDefaultViewFdc3VersionFromAppInfo=void 0;const e=Vi();function t(t){return["fdc3HandleFindInstances","handleInfoForIntent","handleInfoForIntentsByContext","fdc3HandleGetAppMetadata","fdc3HandleGetInfo","fdc3HandleOpen","handleFiredIntent","handleFiredIntentForContext"].filter((n=>t[n]===e.InteropBroker.prototype[n]))}return mr.getDefaultViewFdc3VersionFromAppInfo=function({manifest:e,initialOptions:t}){const n=e?.platform?.defaultViewOptions?.fdc3InteropApi??t.defaultViewOptions?.fdc3InteropApi;return["1.2","2.0"].includes(n??"")?n:void 0},mr.checkFDC32Overrides=t,mr.overrideCheck=function(e,n){if(n&&"2.0"===n){const n=t(e);n.length>0&&console.warn(`WARNING: FDC3 2.0 has been set as a default option for Views in this Platform, but the required InteropBroker APIs for FDC3 2.0 compliance have not all been overridden.\nThe following APIs need to be overridden:\n${n.join("\n")}`)}},mr}function Cr(){return gr||(gr=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),i=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),i(function(){if(fr)return Ti;fr=1;var e=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ti,"__esModule",{value:!0}),Ti.InteropModule=void 0;const t=e(n),i=$i,r=d,o=Vi(),a=wr(),c=vr(),h=Tn,l=e=>new e,u="You have attempted to use or modify InteropBroker parameters, which is not allowed. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.";class p extends r.Base{async init(e,n=l){this.wire.sendAction("interop-init").catch((()=>{}));const r=await this.wire.environment.getInteropInfo(this.wire.getFin()),s=(0,i.createUnusableObject)(u),a=(0,i.createWarningObject)(u,(0,t.default)(r)),d=async()=>{throw new Error(u)},p=o.InteropBroker.createClosedConstructor(this.wire,(()=>this.fin.InterApplicationBus.Channel.create(`interop-broker-${e}`)),r);let w;return w=Array.isArray(n)?new((0,h.overrideFromComposables)(...n)(p))(s,d,a):await n(p,s,d,a),(0,c.overrideCheck)(w,r.fdc3Version),w}connectSync(e,t){return this.wire.sendAction("interop-connect-sync").catch((()=>{})),new a.InteropClient(this.wire,this.wire.environment.whenReady().then((()=>this.fin.InterApplicationBus.Channel.connect(`interop-broker-${e}`,{payload:t}))))}}return Ti.InteropModule=p,Ti}(),e),i(wr(),e),i(Vi(),e)}(Li)),Li}var br={},Ir={},Er={},xr={};Object.defineProperty(xr,"__esModule",{value:!0}),xr.getSnapshotSourceChannelName=void 0;xr.getSnapshotSourceChannelName=e=>`snapshot-source-provider-${e.uuid}`;var Ar,Pr,Mr,_r,Or,Sr=s&&s.__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},Rr=s&&s.__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)};Object.defineProperty(Er,"__esModule",{value:!0}),Er.SnapshotSource=void 0;const Fr=d,jr=xr,kr=new Map;class Lr extends Fr.Base{constructor(e,t){super(e),Ar.set(this,void 0),Pr.set(this,(()=>(kr.has(this.identity.uuid)||kr.set(this.identity.uuid,{eventFired:null,clientPromise:null}),kr.get(this.identity.uuid)))),Mr.set(this,(()=>(Rr(this,Pr,"f").call(this).clientPromise||(Rr(this,Pr,"f").call(this).clientPromise=Rr(this,_r,"f").call(this)),Rr(this,Pr,"f").call(this).clientPromise))),_r.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);try{Rr(this,Pr,"f").call(this).eventFired||await Rr(this,Or,"f").call(this);const t=await this.fin.InterApplicationBus.Channel.connect(e,{wait:!1});return t.onDisconnection((()=>{Rr(this,Pr,"f").call(this).clientPromise=null,Rr(this,Pr,"f").call(this).eventFired=null})),t}catch(e){throw Rr(this,Pr,"f").call(this).clientPromise=null,new Error("The targeted SnapshotSource is not currently initialized. Await this object's ready() method.")}})),Or.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);let t,n;const i=new Promise(((e,i)=>{t=e,n=i}));Rr(this,Pr,"f").call(this).eventFired=i;const r=async i=>{try{i.channelName===e&&(t(),await this.fin.InterApplicationBus.Channel.removeListener("connected",r))}catch(e){n(e)}};await this.fin.InterApplicationBus.Channel.on("connected",r)})),Sr(this,Ar,t,"f")}get identity(){return Rr(this,Ar,"f")}async ready(){this.wire.sendAction("snapshot-source-ready").catch((e=>{}));try{await Rr(this,Mr,"f").call(this)}catch(e){await Rr(this,Pr,"f").call(this).eventFired}}async getSnapshot(){this.wire.sendAction("snapshot-source-get-snapshot").catch((e=>{}));const e=await Rr(this,Mr,"f").call(this),t=await e.dispatch("get-snapshot");return(await t).snapshot}async applySnapshot(e){this.wire.sendAction("snapshot-source-apply-snapshot").catch((e=>{}));return(await Rr(this,Mr,"f").call(this)).dispatch("apply-snapshot",{snapshot:e})}}Er.SnapshotSource=Lr,Ar=new WeakMap,Pr=new WeakMap,Mr=new WeakMap,_r=new WeakMap,Or=new WeakMap,Object.defineProperty(Ir,"__esModule",{value:!0}),Ir.SnapshotSourceModule=void 0;const Tr=d,$r=Er,Br=xr;class Gr extends Tr.Base{async init(e){if(this.wire.sendAction("snapshot-source-init").catch((e=>{})),"object"!=typeof e||"function"!=typeof e.getSnapshot||"function"!=typeof e.applySnapshot)throw new Error("you must pass in a valid SnapshotProvider");const t=await this.fin.InterApplicationBus.Channel.create((0,Br.getSnapshotSourceChannelName)(this.fin.me));t.register("get-snapshot",(async()=>({snapshot:await e.getSnapshot()}))),t.register("apply-snapshot",(({snapshot:t})=>e.applySnapshot(t)))}wrapSync(e){return this.wire.sendAction("snapshot-source-wrap-sync").catch((e=>{})),new $r.SnapshotSource(this.wire,e)}async wrap(e){return this.wire.sendAction("snapshot-source-wrap").catch((e=>{})),this.wrapSync(e)}}Ir.SnapshotSourceModule=Gr,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Ir,e),n(Er,e)}(br),Object.defineProperty(a,"__esModule",{value:!0});var Wr=a.Fin=void 0;const Hr=t,Nr=c,Dr=ie(),Ur=Z(),Vr=de,zr=en,Kr=rn,qr=un,Jr=bn,Yr=J(),Zr=An,Qr=ki,Xr=Cr(),eo=br;class to extends Hr.EventEmitter{constructor(e){super(),this.wire=e,this.System=new Nr.System(e),this.Window=new Dr._WindowModule(e),this.Application=new Ur.ApplicationModule(e),this.InterApplicationBus=new Vr.InterApplicationBus(e),this.Clipboard=new zr.Clipboard(e),this.ExternalApplication=new Kr.ExternalApplicationModule(e),this.Frame=new qr._FrameModule(e),this.GlobalHotkey=new Jr.GlobalHotkey(e),this.Platform=new Zr.PlatformModule(e,this.InterApplicationBus.Channel),this.View=new Yr.ViewModule(e),this.Interop=new Xr.InteropModule(e),this.SnapshotSource=new eo.SnapshotSourceModule(e),e.registerFin(this),this.me=(0,Qr.getMe)(e),e.on("disconnected",(()=>{this.emit("disconnected")}))}}Wr=a.Fin=to;var no={},io={};function ro(e){return"string"==typeof e.manifestUrl}function oo(e){return ao(e)&&"string"==typeof e.address}function so(e){return oo(e)&&"string"==typeof e.token}function ao(e){return"string"==typeof e.uuid}function co(e){return e.runtime&&"string"==typeof e.runtime.version}function ho(e){return ao(e)&&co(e)}Object.defineProperty(io,"__esModule",{value:!0}),io.isInternalConnectConfig=io.isPortDiscoveryConfig=io.isNewConnectConfig=io.isConfigWithReceiver=io.isRemoteConfig=io.isExistingConnectConfig=io.isExternalConfig=void 0,io.isExternalConfig=ro,io.isExistingConnectConfig=oo,io.isRemoteConfig=so,io.isConfigWithReceiver=function(e){return"object"==typeof e.receiver&&so({...e,address:""})},io.isNewConnectConfig=ho,io.isPortDiscoveryConfig=function(e){return ro(e)&&co(e)||ho(e)},io.isInternalConnectConfig=function(e){return oo(e)||ho(e)};var lo={},uo={};Object.defineProperty(uo,"__esModule",{value:!0}),uo.EmitterMap=void 0;const po=t;function wo(e){return Buffer.from(e).toString("base64")}uo.EmitterMap=class{constructor(){this.storage=new Map}hashKeys(e){return e.map(wo).join("/")}getOrCreate(e){const t=this.hashKeys(e);return this.storage.has(t)||this.storage.set(t,new po.EventEmitter),this.storage.get(t)}has(e){return this.storage.has(this.hashKeys(e))}delete(e){const t=this.hashKeys(e);return this.storage.delete(t)}},Object.defineProperty(lo,"__esModule",{value:!0});const yo=uo;class fo extends yo.EmitterMap{constructor(){super(...arguments),this.dispatchEvent=e=>{if(function(e){return"process-desktop-event"===e.action}(e)){const{payload:t}=e,n=function(e){const{topic:t}=e;if("frame"===t||"window"===t||"view"===t){const{uuid:n,name:i}=e;return[t,n,i]}if("application"===t){const{uuid:n}=e;return[t,n]}return[t]}(t);if(this.has(n))return this.getOrCreate(n).emit(t.type,t),!0}return!1}}}lo.default=fo;var go,mo,vo=s&&s.__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},Co=s&&s.__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)},bo=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(no,"__esModule",{value:!0});var Io=no.Transport=void 0;const Eo=t,xo=io,Ao=g,Po=bo(lo),Mo=ki,_o=ke;class Oo extends Eo.EventEmitter{constructor(e,t,n){super(),this.wireListeners=new Map,this.topicRefMap=new Map,this.eventAggregator=new Po.default,this.messageHandlers=[this.eventAggregator.dispatchEvent],go.set(this,void 0),mo.set(this,void 0),this.connectSync=()=>{Co(this,go,"f").connectSync()},this.getPort=()=>Co(this,go,"f").getPort(),vo(this,go,new e(this.onmessage.bind(this)),"f"),this.environment=t,this.sendRaw=Co(this,go,"f").send.bind(Co(this,go,"f")),this.registerMessageHandler(this.handleMessage.bind(this)),Co(this,go,"f").on("disconnected",(()=>{for(const[,{handleNack:e}]of this.wireListeners)e({reason:"Remote connection has closed"});this.wireListeners.clear(),this.emit("disconnected")}));const{uuid:i,name:r}=n,o=this.environment.getCurrentEntityType();this.me=(0,Mo.getBaseMe)(o,i,r)}getFin(){if(!Co(this,mo,"f"))throw new Error("No Fin object registered for this transport");return Co(this,mo,"f")}registerFin(e){if(Co(this,mo,"f"))throw new Error("Fin object has already been registered for this transport");vo(this,mo,e,"f")}shutdown(){return Co(this,go,"f").shutdown()}async connect(e){if((0,xo.isConfigWithReceiver)(e))return await Co(this,go,"f").connect(e.receiver),this.authorize(e);if((0,xo.isRemoteConfig)(e))return this.connectRemote(e);if((0,xo.isExistingConnectConfig)(e))return this.connectByPort(e);if((0,xo.isNewConnectConfig)(e)){const t=await this.environment.retrievePort(e);return this.connectByPort({...e,address:`ws://localhost:${t}`})}}async connectRemote(e){return await Co(this,go,"f").connect(new(this.environment.getWsConstructor())(e.address)),this.authorize(e)}async connectByPort(e){const{address:t,uuid:n}=e,i={...e,type:"file-token"},r=Co(this,go,"f");await r.connect(new(this.environment.getWsConstructor())(e.address));const o=await this.sendAction("request-external-authorization",{uuid:n,type:"file-token"},!0);if("external-authorization-response"!==o.action)throw new Ao.UnexpectedActionError(o.action);return await this.environment.writeToken(o.payload.file,o.payload.token),this.authorize(i)}async authorize(e){const t=await this.sendAction("request-authorization",e,!0);if("authorization-response"!==t.action)throw new Ao.UnexpectedActionError(t.action);if(!0!==t.payload.success)throw new Ao.RuntimeError(t.payload)}sendAction(e,t={},n=!1){let i=()=>{};const r=Ao.RuntimeError.getCallSite(1),o=this.environment.getNextMessageId(),s=new Promise(((s,a)=>{i=a;const c={action:e,payload:t,messageId:o},d=Co(this,go,"f");return this.addWireListener(o,s,(e=>this.nackHandler(e,a,r)),n),d.send(c).catch(a)}));return Object.assign(s,{cancel:i,messageId:o})}nackHandler(e,t,n){t("string"==typeof e?e:new Ao.RuntimeError(e,n))}ferryAction(e){return new Promise(((t,n)=>{const i=this.environment.getNextMessageId();e.messageId=i;const r=e=>{t(e.payload)};return Co(this,go,"f").send(e).then((()=>this.addWireListener(i,r,(e=>this.nackHandler(e,n)),!1))).catch(n)}))}registerMessageHandler(e){this.messageHandlers.push(e)}addWireListener(e,t,n,i){i?this.uncorrelatedListener=t:this.wireListeners.has(e)?n({reason:"Duplicate handler id",error:(0,_o.errorToPOJO)(new Ao.DuplicateCorrelationError(String(e)))}):this.wireListeners.set(e,{resolve:t,handleNack:n})}onmessage(e){for(const t of this.messageHandlers)t.call(null,e)}handleMessage(e){const t=e.correlationId||NaN;if("correlationId"in e){if(!this.wireListeners.has(t))return!1;{const{resolve:n,handleNack:i}=this.wireListeners.get(t);"ack"!==e.action?i({reason:"Did not receive ack action",error:(0,_o.errorToPOJO)(new Ao.NoAckError(e.action))}):"payload"in e?e.payload.success?n.call(null,e):i(e.payload):"string"==typeof e.reason?i(e):(console.warn("Received invalid response from core",e),i({reason:"invalid response shape"})),this.wireListeners.delete(t)}}else this.uncorrelatedListener&&this.uncorrelatedListener.call(null,e),this.uncorrelatedListener=()=>{};return!0}}Io=no.Transport=Oo,go=new WeakMap,mo=new WeakMap;const So=(...e)=>({log:(...t)=>console.debug(`[${(new Date).toISOString()}]`,...(e=>e.map((e=>`[${e}]`)))(e),...t),getLogger:(...t)=>So(...e,...t)}),Ro=So("@openfin/core-web/client");function Fo(e,t){if(!function(e){return"string"==typeof e}(e))throw new Error(`Property ${t} has invalid type. Expected string, got ${typeof e}.`)}const jo="web-broker-ports-ready",ko=Ro.getLogger("get-web-interop-ports");function Lo(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)}function To(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}"function"==typeof SuppressedError&&SuppressedError;const $o=e=>{var n,i,r;return r=class extends t.EventEmitter{constructor(t){super(),n.set(this,void 0),i.set(this,!1),this.connectSync=()=>{Lo(this,i,"f")||(e.addEventListener("message",(e=>{e.data?.topic?.startsWith("wire-message")&&e.data.message&&Lo(this,n,"f").call(this,{...JSON.parse(e.data.message),ports:e.ports})})),e.start())},this.connect=async()=>{this.connectSync()},this.send=t=>(e.postMessage({topic:"wire-message",message:JSON.stringify(t)}),Promise.resolve()),this.shutdown=async()=>{e.close()},To(this,n,t,"f")}getPort(){return e}},n=new WeakMap,i=new WeakMap,r};var Bo={},Go={};Object.defineProperty(Go,"__esModule",{value:!0}),Go.BaseEnvironment=void 0;const Wo=vr();Go.BaseEnvironment=class{async getViewWindowIdentity(e,t){const{identity:n}=await e.View.wrapSync(t).getCurrentWindow();return n}async getInteropInfo(e){const t=await e.Application.getCurrentSync().getInfo().catch((()=>null)),n=t?.initialOptions?.interopBrokerConfiguration??{};return{fdc3Version:t?(0,Wo.getDefaultViewFdc3VersionFromAppInfo)(t):void 0,...n,fdc3Info:{providerVersion:await e.System.getVersion(),provider:"OpenFin"}}}},Object.defineProperty(Bo,"__esModule",{value:!0});var Ho=Bo.BrowserEnvironment=void 0;const No=Go;class Do extends No.BaseEnvironment{constructor(){super(...arguments),this.type="other",this.getRandomId=()=>{const e=new Uint32Array(1);return window.crypto.getRandomValues(e)[0].toString(32)}}getAdapterVersionSync(){return""}observeBounds(e,t){throw new Error("Method not implemented.")}layoutAllowedInContext(e){return!1}initLayoutManager(e,t,n){throw new Error("Method not implemented.")}applyLayoutSnapshot(e,t,n){throw new Error("Method not implemented.")}createLayout(e,t){throw new Error("Method not implemented.")}destroyLayout(e,t){throw new Error("Method not implemented.")}resolveLayout(e,t){throw new Error("Method not implemented.")}initPlatform(...e){throw new Error("Method not implemented.")}writeToken(e,t){return Promise.resolve("")}retrievePort(e){throw new Error("Method not implemented.")}getNextMessageId(){return this.getRandomId()}createChildContent(e){throw new Error("Method not implemented.")}getWebWindow(e){throw new Error("Method not implemented.")}getCurrentEntityIdentity(){throw new Error("Method not implemented.")}getCurrentEntityType(){return"external connection"}raiseEvent(e,t){throw new Error("Method not implemented.")}getUrl(){return location.href}getDefaultChannelOptions(){return{create:{},connect:{}}}getRtcPeer(){return new RTCPeerConnection}getWsConstructor(){return WebSocket}whenReady(){return Promise.resolve()}}Ho=Bo.BrowserEnvironment=Do;const Uo=e=>"platform"in e&&void 0!==e.platform;var Vo,zo;class Ko extends Ho{constructor(e){super(),this.connectConfig=e,Vo.set(this,void 0),zo.set(this,new W((async()=>Promise.resolve().then((function(){return __webpack_require__(/*! ./main-b14f67c9.js */ "./node_modules/@openfin/core-web/out/main-b14f67c9.js")}))))),Uo(e)&&this.validatePlatformOptions(e)}getAdapterVersionSync(){return"0.39.21"}validatePlatformOptions({platform:e}){if(!("layoutSnapshot"in e))throw new Error("Platform options are missing layoutSnapshot. Please provide a layoutSnapshot in the platform options.");if("windows"in e||"windows"in e.layoutSnapshot)throw new Error("It appears you tried to call connect() with a snapshot object from an OpenFin desktop environment. Note that connect() expects to be called with a platform property with this structure: { platform: { layoutSnapshot } }. To get a layoutSnapshot of the expected structure, use fin.Platform.Layout.getCurrentLayoutManagerSync().getLayoutSnapshot() in v34+ in your desktop environment.");const{layouts:t}=e.layoutSnapshot;Object.entries(t).map((([e,t])=>{if("object"!=typeof t||null===t)throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must be an object.`);if(!("content"in t))throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must contain a 'content' property.`)}))}async getInteropInfo(e){return{...{contextGroups:void 0,logging:{beforeAction:{enabled:!1},afterAction:{enabled:!1}}},fdc3Version:void 0,fdc3Info:{providerVersion:"0.39.21",provider:"OpenFin Web"}}}layoutAllowedInContext(e){return!0}async initLayoutManager(e,t,n){if(Lo(this,Vo,"f"))throw new Error("Layout already initialized.");if(!Uo(this.connectConfig))throw new Error("Platform options are missing from connection config.");const{WebLayoutEntryPoint:i}=await Lo(this,zo,"f").getValue();return To(this,Vo,new i(this.connectConfig),"f"),await Lo(this,Vo,"f").initLayoutManager(e,t,n)}async applyLayoutSnapshot(e,t,n){Lo(this,Vo,"f")?.applyLayoutSnapshot(e,t,n)}async createLayout(e,t){return Lo(this,Vo,"f")?.createLayout(e,t)}async destroyLayout(e,t){return Lo(this,Vo,"f")?.destroyLayout(e,t)}async getViewWindowIdentity(e,t){return Promise.resolve({uuid:t.uuid,name:t.uuid})}}Vo=new WeakMap,zo=new WeakMap;const qo=()=>{const e=((e,t)=>{const n=new RegExp(`^${t}<(?.*)>$`).exec(e)?.groups?.meta;if(n)try{return JSON.parse(atob(n))}catch(e){throw new Error(`Failed to decode JSON from ${n}.`)}})(window.name,"of-frame");if(e)try{const{name:t,uuid:n,brokerUrl:i,providerId:r,contextGroup:o}=e;return Fo(i,"brokerUrl"),Fo(n,"uuid"),Fo(t,"name"),{identity:{name:t,uuid:n},brokerUrl:i,interopConfig:{providerId:r,currentContextGroup:o}}}catch(e){throw new Error(`Unexpected error occurred when inferring platform information: ${e.stack}`)}},Jo=()=>{const e=r.v4();return{uuid:e,name:e}},Yo=async e=>{if("enabled"===e.connectionInheritance){const t=await(async e=>{const t=qo();if(t){const{validateOptions:n=(()=>!0)}=e,{identity:i,...r}=t;if(!await n(r))throw new Error("Parent options were rejected by validateOptions.");return t}})(e);if(t)return t}if(!e.options){const t="enabled"===e.connectionInheritance?"Broker URL was not specified nor provided by a platform container.":"Connection inheritance is disabled but no options were provided.";throw new Error(t)}return{...e.options,identity:Jo()}};exports.__classPrivateFieldGet=Lo,exports.__classPrivateFieldSet=To,exports.apiExposer=Gn,exports.commonjsGlobal=s,exports.connect=async t=>{try{Ro.log("Establishing connection",t);const{brokerUrl:n,identity:i,timeout:r,interopConfig:s}=await Yo(t),{workerPort:a,iframeBrokerPort:c}=await(async(e,t,n)=>{const{origin:i}=new URL(e),r=document.createElement("IFRAME");let s;r.style.display="none";try{return await new Promise(((a,c)=>{const d=e=>{if(e.source===r.contentWindow&&e.data?.topic===`ack-${jo}`){if(e.origin!==i)c(new Error(`Broker redirected to unexpected origin ${e.origin}, expected ${i}.`));else if(e.data.success){const[t,n]=e.ports;a({iframeBrokerPort:t,workerPort:n})}else c(new m(e.data));window.removeEventListener("message",d),clearTimeout(s)}};window.addEventListener("message",d),ko.log(`Connecting to broker ${e}`),r.setAttribute("src",e),r.setAttribute("name",o(t,"of-broker")),document.body.appendChild(r),ko.log("Iframe loaded, awaiting init message from iframe"),n&&(s=setTimeout((()=>{window.removeEventListener("message",d),document.body.removeChild(r),c(new Error("Worker did not initialize in time"))}),n))}))}catch(e){throw new Error(`Failed to initialise Fin Web Client. ${e.message}`,{cause:e})}})(n,i,r);Ro.log("Successfully established connection to shared worker");const d={entityType:"external connection",...i};a.start(),c.start();const h=((t,n,i)=>{const r=$o(n),o=new Ko(t),s=new Io(r,o,i);return s.connectSync(),window.Buffer=e.Buffer,new Wr(s)})(t,a,d);return s?.providerId&&(h.me.interop=h.Interop.connectSync(s.providerId),s?.currentContextGroup&&h.me.interop.joinContextGroup(s.currentContextGroup).catch((e=>{console.warn(`Error joining specified context group: ${s?.currentContextGroup}, continuing`,e)}))),{...h,me:{...h.me,identity:{uuid:h.me.uuid,name:h.me.name}}}}catch(e){throw new Error(`An error occured during web-interop connection: ${e.message}`)}},exports.decorators=Nn,exports.encodeOptions=o,exports.layout_constants=ai,exports.lazy=G; +var e=__webpack_require__(/*! buffer/ */ "../../node_modules/buffer/index.js"),t=__webpack_require__(/*! events */ "../../node_modules/events/events.js"),n=__webpack_require__(/*! lodash/cloneDeep */ "../../node_modules/lodash/cloneDeep.js"),i=__webpack_require__(/*! lodash/isEqual */ "../../node_modules/lodash/isEqual.js"),r=__webpack_require__(/*! uuid */ "../../node_modules/uuid/dist/esm-browser/index.js");const o=(e,t)=>`${t}<${btoa(JSON.stringify(e))}>`;var s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof __webpack_require__.g?__webpack_require__.g:"undefined"!=typeof self?self:{},a={},c={},d={},h={};async function l(e){const t=[];for(const n of e){const e=await n();t.push(e)}return t}Object.defineProperty(h,"__esModule",{value:!0}),h.promiseMapSerial=h.serial=h.promiseMap=h.promisify=void 0,h.promisify=function(e){return(...t)=>new Promise(((n,i)=>{e(...t,((e,t)=>e?i(e):n(t)))}))},h.promiseMap=async function(e,t){return Promise.all(e.map(t))},h.serial=l,h.promiseMapSerial=async function(e,t){return l(e.map(((e,n,i)=>()=>t(e,n,i))))};var u,p=s&&s.__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},w=s&&s.__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)};Object.defineProperty(d,"__esModule",{value:!0}),d.Reply=d.EmitterBase=d.Base=void 0;const y=h;class f{constructor(e){this.isNodeEnvironment=()=>"node"===this.wire.environment.type,this.isOpenFinEnvironment=()=>"openfin"===this.wire.environment.type,this.isBrowserEnvironment=()=>"other"===this.wire.environment.type,this.wire=e}get fin(){return this.wire.getFin()}get me(){return this.wire.me}}d.Base=f;d.EmitterBase=class extends f{constructor(e,t,...n){super(e),this.topic=t,u.set(this,void 0),this.eventNames=()=>this.hasEmitter()?this.getOrCreateEmitter().eventNames():[],this.emit=(e,t,...n)=>!!this.hasEmitter()&&this.getOrCreateEmitter().emit(e,t,...n),this.hasEmitter=()=>this.wire.eventAggregator.has(w(this,u,"f")),this.getOrCreateEmitter=()=>this.wire.eventAggregator.getOrCreate(w(this,u,"f")),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[],this.listenerCount=e=>this.hasEmitter()?this.getOrCreateEmitter().listenerCount(e):0,this.registerEventListener=async(e,t={},n,i)=>{const r={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e},o=this.getOrCreateEmitter();n(o);try{await this.wire.sendAction("subscribe-to-desktop-event",r)}catch(e){throw i(o),this.deleteEmitterIfNothingRegistered(o),e}},this.deregisterEventListener=async(e,t={})=>{if(this.hasEmitter()){const n={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e};await this.wire.sendAction("unsubscribe-to-desktop-event",n).catch((()=>null));return this.getOrCreateEmitter()}return Promise.resolve()},p(this,u,[t,...n],"f"),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[]}async on(e,t,n){return await this.registerEventListener(e,n,(n=>{n.on(e,t)}),(n=>{n.removeListener(e,t)})),this}async addListener(e,t,n){return this.on(e,t,n)}async once(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.once(e,i),n.once(e,t)}),(n=>{n.removeListener(e,i),n.removeListener(e,t)})),this}async prependListener(e,t,n){return await this.registerEventListener(e,n,(n=>{n.prependListener(e,t)}),(n=>{n.removeListener(e,t)})),this}async prependOnceListener(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.prependOnceListener(e,t),n.once(e,i)}),(n=>{n.removeListener(e,t),n.removeListener(e,i)})),this}async removeListener(e,t,n){const i=await this.deregisterEventListener(e,n);return i&&(i.removeListener(e,t),this.deleteEmitterIfNothingRegistered(i)),this}async deregisterAllListeners(e){const t={...this.identity,type:e,topic:this.topic};if(this.hasEmitter()){const e=this.getOrCreateEmitter(),n=e.listenerCount(t.type),i=[];for(let e=0;enull)));return await Promise.all(i),e}}async removeAllListeners(e){const t=async e=>{const t=await this.deregisterAllListeners(e);t&&(t.removeAllListeners(e),this.deleteEmitterIfNothingRegistered(t))};if(e)await t(e);else if(this.hasEmitter()){const e=this.getOrCreateEmitter().eventNames();await(0,y.promiseMap)(e,t)}return this}deleteEmitterIfNothingRegistered(e){0===e.eventNames().length&&this.wire.eventAggregator.delete(w(this,u,"f"))}},u=new WeakMap;d.Reply=class{};var g={};Object.defineProperty(g,"__esModule",{value:!0});var m=g.RuntimeError=g.NotSupportedError=g.NotImplementedError=g.NoAckError=g.DuplicateCorrelationError=g.UnexpectedActionError=g.DisconnectedError=void 0;class v extends Error{constructor(e){super(`Expected websocket state OPEN but found ${e}`),this.readyState=e}}g.DisconnectedError=v;class C extends Error{}g.UnexpectedActionError=C;class b extends Error{}g.DuplicateCorrelationError=b;class I extends Error{}g.NoAckError=I;class E extends Error{}g.NotImplementedError=E;class x extends Error{}g.NotSupportedError=x;class A extends Error{constructor(e){const{message:t,name:n,stack:i,...r}=e;super(t),this.name=n||"Error",this.stack=i??this.toString(),Object.keys(r).forEach((e=>{this[e]=r[e]}))}}class P extends Error{static getCallSite(e=0){const t=Error.stackTraceLimit,n=e+1;Error.stackTraceLimit=t+n;const i=Error.prepareStackTrace;Error.prepareStackTrace=(e,t)=>t;const r=(new Error).stack?.slice(n)??[];return Error.prepareStackTrace=i,Error.stackTraceLimit=t,r}static prepareStackTrace(e,t){if("function"==typeof Error.prepareStackTrace)return Error.prepareStackTrace(e,t);let n="";n+=e.name||"Error",n+=`: ${e.message||""}`;for(const e of t)n+=`\n at ${e.toString()}`;return n}constructor(e,t){const{reason:n,error:i}=e;super(n),this.name="RuntimeError",i?.stack&&(this.cause=new A(i)),t&&(this.stack=P.prepareStackTrace(this,t))}}m=g.RuntimeError=P;var M={},_={},O={};Object.defineProperty(O,"__esModule",{value:!0}),O.validateIdentity=void 0,O.validateIdentity=function(e){let t;return"object"==typeof e&&"string"==typeof e.uuid||(t="Not a valid identity object"),t};var S={},R={},F={},j={},k={},L={},T={};Object.defineProperty(T,"__esModule",{value:!0}),T.handleDeprecatedWarnings=void 0;var $;T.handleDeprecatedWarnings=e=>{(e.contentNavigation?.whitelist||e.contentNavigation?.blacklist||e.contentRedirect?.whitelist||e.contentRedirect?.blacklist)&&console.warn("The properties 'whitelist' and 'blacklist' have been marked as deprecated and will be removed in a future version. Please use 'allowlist' and 'denylist'.")};var B={},G={};Object.defineProperty(G,"__esModule",{value:!0}),G.AsyncRetryableLazy=W=G.Lazy=void 0;var W=G.Lazy=class{constructor(e){this.producerFn=e}getValue(){return this.value||(this.value=this.producerFn()),this.value}};G.AsyncRetryableLazy=class{constructor(e){this.producerFn=e}async getValue(){return this.promise||(this.promise=this.producerFn().catch((e=>{throw delete this.promise,e}))),this.promise}};var H={};Object.defineProperty(H,"__esModule",{value:!0}),H.WebContents=void 0;const N=d;class D extends N.EmitterBase{constructor(e,t,n){super(e,n,t.uuid,t.name),this.identity=t,this.entityType=n}capturePage(e){return this.wire.sendAction("capture-page",{options:e,...this.identity}).then((({payload:e})=>e.data))}executeJavaScript(e){return this.wire.sendAction("execute-javascript-in-window",{...this.identity,code:e}).then((({payload:e})=>e.data))}getZoomLevel(){return this.wire.sendAction("get-zoom-level",this.identity).then((({payload:e})=>e.data))}setZoomLevel(e){return this.wire.sendAction("set-zoom-level",{...this.identity,level:e}).then((()=>{}))}navigate(e){return this.wire.sendAction("navigate-window",{...this.identity,url:e}).then((()=>{}))}navigateBack(){return this.wire.sendAction("navigate-window-back",{...this.identity}).then((()=>{}))}async navigateForward(){await this.wire.sendAction("navigate-window-forward",{...this.identity})}stopNavigation(){return this.wire.sendAction("stop-window-navigation",{...this.identity}).then((()=>{}))}reload(e=!1){return this.wire.sendAction("reload-window",{ignoreCache:e,...this.identity}).then((()=>{}))}print(e={}){return this.wire.sendAction("print",{...this.identity,options:e}).then((()=>{}))}findInPage(e,t){return this.wire.sendAction("find-in-page",{...this.identity,searchTerm:e,options:t}).then((({payload:e})=>e.data))}stopFindInPage(e){return this.wire.sendAction("stop-find-in-page",{...this.identity,action:e}).then((()=>{}))}getPrinters(){return this.wire.sendAction("get-printers",{...this.identity}).then((({payload:e})=>e.data))}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){await this.wire.sendAction("focus-window",{emitSynthFocused:e,...this.identity})}async showDeveloperTools(){await this.wire.sendAction("show-developer-tools",this.identity)}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction("get-process-info",this.identity);return e}async getSharedWorkers(){return this.wire.sendAction("get-shared-workers",this.identity).then((({payload:e})=>e.data))}async inspectSharedWorker(){await this.wire.sendAction("inspect-shared-worker",{...this.identity})}async inspectSharedWorkerById(e){await this.wire.sendAction("inspect-shared-worker-by-id",{...this.identity,workerId:e})}async inspectServiceWorker(){await this.wire.sendAction("inspect-service-worker",{...this.identity})}async showPopupWindow(e){if(this.wire.sendAction(`${this.entityType}-show-popup-window`,this.identity).catch((()=>{})),e?.onPopupReady){const t=async({popupName:t})=>{try{const n=this.fin.Window.wrapSync({uuid:this.fin.me.uuid,name:t});await e.onPopupReady(n)}catch(e){throw new Error(`Something went wrong during onPopupReady execution: ${e}`)}};await this.once("popup-ready",t)}const{payload:t}=await this.wire.sendAction("try-create-popup-window",{options:{...e,hasResultCallback:!!e?.onPopupResult,hasReadyCallback:!!e?.onPopupReady},...this.identity}),{data:{willOpen:n,options:i}}=t;n&&await this.fin.Window.create(i.initialOptions);if(e?.onPopupResult){const t=async t=>{await e.onPopupResult((e=>{const{name:t,uuid:n,result:i,data:r}=e,o={identity:{name:t,uuid:n},result:i};return r&&(o.data=r),o})(t))},n=async()=>{await this.removeListener("popup-result",t)};await this.on("popup-result",t),await this.once("popup-teardown",n)}const{payload:r}=await this.wire.sendAction("show-popup-window",{options:i,...this.identity});return r.data}}var U,V,z,K,q;function J(){return V||(V=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(function(){if($)return L;$=1,Object.defineProperty(L,"__esModule",{value:!0}),L.ViewModule=void 0;const e=d,t=O,n=J(),i=T;class r extends e.Base{async create(e){const{uuid:t}=this.wire.me;if(!e.name||"string"!=typeof e.name)throw new Error("Please provide a name property as a string in order to create a View.");return(0,i.handleDeprecatedWarnings)(e),this.wire.environment.childViews?await this.wire.environment.createChildContent({entityType:"view",options:{...e,uuid:t}}):await this.wire.sendAction("create-view",{...e,uuid:t}),this.wrapSync({uuid:t,name:e.name})}async wrap(e){this.wire.sendAction("view-wrap").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}wrapSync(e){this.wire.sendAction("view-wrap-sync").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}getCurrent(){if(this.wire.sendAction("view-get-current").catch((e=>{})),!this.wire.me.isView)throw new Error("You are not in a View context");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction("view-get-current-sync").catch((e=>{})),!this.wire.me.isView)throw new Error("You are not in a View context");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return L.ViewModule=r,L}(),e),n(function(){if(U)return B;var e;U=1,Object.defineProperty(B,"__esModule",{value:!0}),B.View=void 0;const t=g,n=G,i=H,r=ie();class o extends i.WebContents{constructor(i,o){super(i,o,"view"),this.identity=o,e.set(this,new n.Lazy((()=>this.fin.Platform.wrapSync(this.identity).getClient()))),this.attach=async e=>{await this.wire.sendAction("attach-view",{target:e,...this.identity})},this.destroy=async()=>{await this.wire.sendAction("destroy-view",{...this.identity})},this.show=async()=>{await this.wire.sendAction("show-view",{...this.identity})},this.showAt=async(e,t={})=>{await this.wire.sendAction("show-view-at",{bounds:e,...this.identity,options:t})},this.bringToFront=async()=>{await this.wire.sendAction("bring-view-to-front",{...this.identity})},this.hide=async()=>{await this.wire.sendAction("hide-view",{...this.identity})},this.setBounds=async e=>{await this.wire.sendAction("set-view-bounds",{bounds:e,...this.identity})},this.getBounds=async()=>(await this.wire.sendAction("get-view-bounds",{...this.identity})).payload.data,this.getInfo=async()=>(await this.wire.sendAction("get-view-info",{...this.identity})).payload.data,this.getParentLayout=async()=>(this.wire.sendAction("view-get-parent-layout",{...this.identity}).catch((()=>{})),this.fin.Platform.Layout.getLayoutByViewIdentity(this.identity)),this.getOptions=async()=>this.wire.sendAction("get-view-options",{...this.identity}).then((({payload:e})=>e.data)),this.updateOptions=async e=>this.wire.sendAction("update-view-options",{options:e,...this.identity}).then((()=>{})),this.getCurrentWindow=async()=>{const{payload:{data:e}}=await this.wire.sendAction("get-view-window",{...this.identity});return new r._Window(this.wire,e)},this.getCurrentStack=async()=>{this.wire.sendAction("view-get-current-stack").catch((()=>{}));try{return(await this.getParentLayout()).getStackByViewIdentity(this.identity)}catch(e){throw new t.RuntimeError({reason:"This view does not belong to a stack.",error:e})}},this.triggerBeforeUnload=async()=>(await this.wire.sendAction("trigger-before-unload",{...this.identity})).payload.data,this.bindToElement=async e=>{if(!e)throw new Error("Element not found.");return this.wire.environment.observeBounds(e,(async e=>this.setBounds(e)))}}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){const t=await this.getCurrentWindow();await t.focusedWebViewWasChanged(),await super.focus({emitSynthFocused:e})}}return B.View=o,e=new WeakMap,B}(),e)}(k)),k}function Y(){if(z)return j;z=1,Object.defineProperty(j,"__esModule",{value:!0}),j.Application=void 0;const e=d,t=ie(),n=J();class i extends e.EmitterBase{constructor(e,n){super(e,"application",n.uuid),this.identity=n,this.window=new t._Window(this.wire,{uuid:this.identity.uuid,name:this.identity.uuid})}windowListFromIdentityList(e){const n=[];return e.forEach((e=>{n.push(new t._Window(this.wire,{uuid:e.uuid,name:e.name}))})),n}isRunning(){return this.wire.sendAction("is-application-running",this.identity).then((({payload:e})=>e.data))}async quit(e=!1){try{await this._close(e),await this.wire.sendAction("destroy-application",{force:e,...this.identity})}catch(e){if(!["Remote connection has closed","Could not locate the requested application"].some((t=>e.message.includes(t))))throw e}}async _close(e=!1){try{await this.wire.sendAction("close-application",{force:e,...this.identity})}catch(e){if(!e.message.includes("Remote connection has closed"))throw e}}close(e=!1){return console.warn("Deprecation Warning: Application.close is deprecated Please use Application.quit"),this.wire.sendAction("application-close",this.identity).catch((e=>{})),this._close(e)}getChildWindows(){return this.wire.sendAction("get-child-windows",this.identity).then((({payload:e})=>{const t=[];return e.data.forEach((e=>{t.push({uuid:this.identity.uuid,name:e})})),this.windowListFromIdentityList(t)}))}getManifest(){return this.wire.sendAction("get-application-manifest",this.identity).then((({payload:e})=>e.data))}getParentUuid(){return this.wire.sendAction("get-parent-application",this.identity).then((({payload:e})=>e.data))}getShortcuts(){return this.wire.sendAction("get-shortcuts",this.identity).then((({payload:e})=>e.data))}async getViews(){const{payload:e}=await this.wire.sendAction("application-get-views",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}getZoomLevel(){return this.wire.sendAction("get-application-zoom-level",this.identity).then((({payload:e})=>e.data))}getWindow(){return this.wire.sendAction("application-get-window",this.identity).catch((e=>{})),Promise.resolve(this.window)}registerUser(e,t){return this.wire.sendAction("register-user",{userName:e,appName:t,...this.identity}).then((()=>{}))}removeTrayIcon(){return this.wire.sendAction("remove-tray-icon",this.identity).then((()=>{}))}restart(){return this.wire.sendAction("restart-application",this.identity).then((()=>{}))}run(){return console.warn("Deprecation Warning: Application.run is deprecated Please use fin.Application.start"),this.wire.sendAction("application-run",this.identity).catch((e=>{})),this._run()}_run(e={}){return this.wire.sendAction("run-application",{manifestUrl:this._manifestUrl,opts:e,...this.identity}).then((()=>{}))}scheduleRestart(){return this.wire.sendAction("relaunch-on-close",this.identity).then((()=>{}))}async sendApplicationLog(){const{payload:e}=await this.wire.sendAction("send-application-log",this.identity);return e.data}async setJumpList(e){await this.wire.sendAction("set-jump-list",{config:e,...this.identity})}setTrayIcon(e){return this.wire.sendAction("set-tray-icon",{enabledIcon:e,...this.identity}).then((()=>{}))}setShortcuts(e){return this.wire.sendAction("set-shortcuts",{data:e,...this.identity}).then((()=>{}))}async setShortcutQueryParams(e){await this.wire.sendAction("set-shortcut-query-args",{data:e,...this.identity})}setZoomLevel(e){return this.wire.sendAction("set-application-zoom-level",{level:e,...this.identity}).then((()=>{}))}async setAppLogUsername(e){await this.wire.sendAction("set-app-log-username",{data:e,...this.identity})}getTrayIconInfo(){return this.wire.sendAction("get-tray-icon-info",this.identity).then((({payload:e})=>e.data))}hasTrayIcon(){return this.wire.sendAction("has-tray-icon",this.identity).then((({payload:e})=>e.data))}terminate(){return this.wire.sendAction("terminate-application",this.identity).then((()=>{}))}wait(){return this.wire.sendAction("wait-for-hung-application",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction("get-info",this.identity).then((({payload:e})=>e.data))}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction("application-get-process-info",this.identity);return e}async setFileDownloadLocation(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t};await this.wire.sendAction("set-file-download-location",{...n,downloadLocation:e})}async getFileDownloadLocation(){const{payload:{data:e}}=await this.wire.sendAction("get-file-download-location",this.identity);return e}async showTrayIconPopupMenu(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t},{payload:i}=await this.wire.sendAction("show-tray-icon-popup-menu",{...n,options:e});return i.data}async closeTrayIconPopupMenu(){const{name:e}=this.wire.me,t={uuid:this.identity.uuid,name:e};await this.wire.sendAction("close-tray-icon-popup-menu",{...t})}}return j.Application=i,j}function Z(){return q||(q=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(function(){if(K)return F;K=1,Object.defineProperty(F,"__esModule",{value:!0}),F.ApplicationModule=void 0;const e=d,t=O,n=Y();class i extends e.Base{async wrap(e){this.wire.sendAction("wrap-application").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}wrapSync(e){this.wire.sendAction("wrap-application-sync").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}async _create(e){return void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&void 0===e.isPlatformController&&(e.autoShow=!0),await this.wire.sendAction("create-application",e),this.wrap({uuid:e.uuid})}create(e){return console.warn("Deprecation Warning: fin.Application.create is deprecated. Please use fin.Application.start"),this.wire.sendAction("application-create").catch((e=>{})),this._create(e)}async start(e){this.wire.sendAction("start-application").catch((e=>{}));const t=await this._create(e);return await this.wire.sendAction("run-application",{uuid:e.uuid}),t}async startManyManifests(e,t){return this.wire.sendAction("run-applications",{applications:e,opts:t}).then((()=>{}))}getCurrent(){return this.wire.sendAction("get-current-application").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction("get-current-application-sync").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}async startFromManifest(e,t){this.wire.sendAction("application-start-from-manifest").catch((e=>{}));const n=await this._createFromManifest(e);return await n._run(t),n}createFromManifest(e){return console.warn("Deprecation Warning: fin.Application.createFromManifest is deprecated. Please use fin.Application.startFromManifest"),this.wire.sendAction("application-create-from-manifest").catch((e=>{})),this._createFromManifest(e)}_createFromManifest(e){return this.wire.sendAction("get-application-manifest",{manifestUrl:e}).then((({payload:e})=>{const t=e.data.platform?e.data.platform.uuid:e.data.startup_app.uuid;return this.wrap({uuid:t})})).then((t=>(t._manifestUrl=e,t)))}}return F.ApplicationModule=i,F}(),e),n(Y(),e)}(R)),R}H.WebContents=D;var Q={};Object.defineProperty(Q,"__esModule",{value:!0}),Q.promisifySubscription=void 0;var X,ee,te;function ne(){if(X)return S;X=1,Object.defineProperty(S,"__esModule",{value:!0}),S._Window=void 0;const e=Z(),t=H,n=J(),i=T,r=Q;class o extends t.WebContents{constructor(e,t){super(e,t,"window")}async createWindow(e){this.wire.sendAction("window-create-window",this.identity).catch((e=>{}));const t=await(0,r.promisifySubscription)(this,"fire-constructor-callback");void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&(e.autoShow=!0),(0,i.handleDeprecatedWarnings)(e);const n=this.wire.environment.createChildContent({entityType:"window",options:e}),[o]=await Promise.all([t.getValue(),n]);let s;const{success:a}=o,c=o.data,{message:d}=c;s=a?{httpResponseCode:c.httpResponseCode,apiInjected:c.apiInjected}:{message:c.message,networkErrorCode:c.networkErrorCode,stack:c.stack};const h={message:d,cbPayload:s,success:a};try{this.getWebWindow().fin.__internal_.openerSuccessCBCalled()}catch(e){}return h.success?this:Promise.reject(h)}getAllFrames(){return this.wire.sendAction("get-all-frames",this.identity).then((({payload:e})=>e.data))}getBounds(){return this.wire.sendAction("get-window-bounds",this.identity).then((({payload:e})=>e.data))}center(){return this.wire.sendAction("center-window",this.identity).then((()=>{}))}blur(){return this.wire.sendAction("blur-window",this.identity).then((()=>{}))}bringToFront(){return this.wire.sendAction("bring-window-to-front",this.identity).then((()=>{}))}animate(e,t){return this.wire.sendAction("animate-window",{transitions:e,options:t,...this.identity}).then((()=>{}))}hide(){return this.wire.sendAction("hide-window",this.identity).then((()=>{}))}close(e=!1){return this.wire.sendAction("close-window",{force:e,...this.identity}).then((()=>{Object.setPrototypeOf(this,null)}))}focusedWebViewWasChanged(){return this.wire.sendAction("focused-webview-changed",this.identity).then((()=>{}))}getNativeId(){return this.wire.sendAction("get-window-native-id",this.identity).then((({payload:e})=>e.data))}async getCurrentViews(){const{payload:e}=await this.wire.sendAction("window-get-views",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}disableFrame(){return console.warn("Function is deprecated; use disableUserMovement instead."),this.wire.sendAction("disable-window-frame",this.identity).then((()=>{}))}disableUserMovement(){return this.wire.sendAction("disable-window-frame",this.identity).then((()=>{}))}enableFrame(){return console.warn("Function is deprecated; use enableUserMovement instead."),this.wire.sendAction("enable-window-frame",this.identity).then((()=>{}))}enableUserMovement(){return this.wire.sendAction("enable-window-frame",this.identity).then((()=>{}))}flash(){return this.wire.sendAction("flash-window",this.identity).then((()=>{}))}stopFlashing(){return this.wire.sendAction("stop-flash-window",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction("get-window-info",this.identity).then((({payload:e})=>e.data))}async getLayout(e){this.wire.sendAction("window-get-layout",this.identity).catch((e=>{}));const t=await this.getOptions();if(!t.layout&&!t.layoutSnapshot)throw new Error("Window does not have a Layout");return this.fin.Platform.Layout.wrap(e??this.identity)}getOptions(){return this.wire.sendAction("get-window-options",this.identity).then((({payload:e})=>e.data))}getParentApplication(){return this.wire.sendAction("window-get-parent-application",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity))}getParentWindow(){return this.wire.sendAction("window-get-parent-window",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity)).then((e=>e.getWindow()))}async getSnapshot(e){const t={area:e,...this.identity};console.warn("Window.getSnapshot has been deprecated, please use Window.capturePage");return(await this.wire.sendAction("get-window-snapshot",t)).payload.data}getState(){return this.wire.sendAction("get-window-state",this.identity).then((({payload:e})=>e.data))}getWebWindow(){return this.wire.sendAction("window-get-web-window",this.identity).catch((e=>{})),this.wire.environment.getWebWindow(this.identity)}isMainWindow(){return this.wire.sendAction("window-is-main-window",this.identity).catch((e=>{})),this.me.uuid===this.me.name}isShowing(){return this.wire.sendAction("is-window-showing",this.identity).then((({payload:e})=>e.data))}maximize(){return this.wire.sendAction("maximize-window",this.identity).then((()=>{}))}minimize(){return this.wire.sendAction("minimize-window",this.identity).then((()=>{}))}moveBy(e,t,n){return this.wire.sendAction("move-window-by",{deltaLeft:e,deltaTop:t,positioningOptions:n,...this.identity}).then((()=>{}))}moveTo(e,t,n){return this.wire.sendAction("move-window",{left:e,top:t,positioningOptions:n,...this.identity}).then((()=>{}))}resizeBy(e,t,n,i){return this.wire.sendAction("resize-window-by",{deltaWidth:Math.floor(e),deltaHeight:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}resizeTo(e,t,n,i){return this.wire.sendAction("resize-window",{width:Math.floor(e),height:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}restore(){return this.wire.sendAction("restore-window",this.identity).then((()=>{}))}setAsForeground(){return this.wire.sendAction("set-foreground-window",this.identity).then((()=>{}))}setBounds(e,t){return this.wire.sendAction("set-window-bounds",{...e,...this.identity,positioningOptions:t}).then((()=>{}))}show(e=!1){return this.wire.sendAction("show-window",{force:e,...this.identity}).then((()=>{}))}showAt(e,t,n=!1){return this.wire.sendAction("show-at-window",{force:n,left:Math.floor(e),top:Math.floor(t),...this.identity}).then((()=>{}))}updateOptions(e){return this.wire.sendAction("update-window-options",{options:e,...this.identity}).then((()=>{}))}authenticate(e,t){return this.wire.sendAction("window-authenticate",{userName:e,password:t,...this.identity}).then((()=>{}))}async showPopupMenu(e){const{payload:t}=await this.wire.sendAction("show-popup-menu",{options:e,...this.identity});return t.data}async closePopupMenu(){return this.wire.sendAction("close-popup-menu",{...this.identity}).then((()=>{}))}async dispatchPopupResult(e){this.wire.sendAction("window-dispatch-popup-result",this.identity).catch((e=>{})),await this.wire.sendAction("dispatch-popup-result",{data:e,...this.identity})}async print(e={content:"self"}){switch(e.content){case void 0:case"self":return super.print(e);case"screenshot":return this.wire.sendAction("print-screenshot",this.identity).then((()=>{}));case"views":return this.wire.sendAction("print-views",{...this.identity,options:e}).then((()=>{}));default:return}}}return S._Window=o,S}function ie(){return te||(te=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(function(){if(ee)return _;ee=1,Object.defineProperty(_,"__esModule",{value:!0}),_._WindowModule=void 0;const e=d,t=O,n=ne();class i extends e.Base{async wrap(e){this.wire.sendAction("window-wrap").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}wrapSync(e){this.wire.sendAction("window-wrap-sync").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}create(e){return this.wire.sendAction("create-window").catch((e=>{})),new n._Window(this.wire,{uuid:this.me.uuid,name:e.name}).createWindow(e)}getCurrent(){if(this.wire.sendAction("get-current-window").catch((e=>{})),!this.wire.me.isWindow)throw new Error("You are not in a Window context");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction("get-current-window-sync").catch((e=>{})),!this.wire.me.isWindow)throw new Error("You are not in a Window context");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return _._WindowModule=i,_}(),e),n(ne(),e)}(M)),M}Q.promisifySubscription=async(e,t,n=(()=>!0),i)=>{let r,o,s;const a=new Promise(((e,t)=>{r=e,o=t})),c=e=>{n(e)&&(clearTimeout(s),r(e))};return await e.on(t,c),i&&(s=setTimeout((()=>o(new Error("event timed out"))),i)),a.finally((()=>{e.removeListener(t,c).catch((()=>null))})),{getValue:()=>a}},Object.defineProperty(c,"__esModule",{value:!0}),c.System=void 0;const re=d,oe=g,se=ie(),ae=t;class ce extends re.EmitterBase{constructor(e){super(e,"system")}sendExternalProcessRequest(e,t){return new Promise(((n,i)=>{const r="external-process-exited";let o,s,a,c;"function"==typeof t.listener&&(a=e=>{const n=e||{};s={topic:"exited",uuid:n.processUuid||"",exitCode:n.exitCode||0},o===e.processUuid&&(t.listener(s),c.removeListener(r,a))},this.wire.me.name||(this.wire.me.name=this.wire.me.uuid),c=new se._Window(this.wire,this.wire.me),c.on(r,a)),this.wire.sendAction(e,t).then((({payload:e})=>{o=e.data.uuid,n(e.data),s&&o===s.uuid&&(t.listener(s),c.removeListener(r,a))})).catch((e=>{c&&c.removeListener(r,a),i(e)}))}))}getVersion(){return this.wire.sendAction("get-version").then((({payload:e})=>e.data))}clearCache(e){return this.wire.sendAction("clear-cache",e).then((()=>{}))}deleteCacheOnExit(){return this.wire.sendAction("delete-cache-request").then((()=>{}))}exit(){return this.wire.sendAction("exit-desktop").then((()=>{}))}async fetchManifest(e){const{payload:{data:t}}=await this.wire.sendAction("fetch-manifest",{manifestUrl:e});return t}flushCookieStore(){return this.wire.sendAction("flush-cookie-store").then((()=>{}))}getAllWindows(){return this.wire.sendAction("get-all-windows").then((({payload:e})=>e.data))}getAllApplications(){return this.wire.sendAction("get-all-applications").then((({payload:e})=>e.data))}getCommandLineArguments(){return this.wire.sendAction("get-command-line-arguments").then((({payload:e})=>e.data))}async getCrashReporterState(){const{payload:{data:{diagnosticMode:e,isRunning:t}}}=await this.wire.sendAction("get-crash-reporter-state");return console.warn("diagnosticMode property is deprecated. It will be removed in a future version"),{diagnosticMode:e,diagnosticsMode:e,isRunning:t}}async startCrashReporter(e){const t=e,n={...t,diagnosticMode:t.diagnosticsMode||t.diagnosticMode},{payload:{data:{diagnosticMode:i,isRunning:r}}}=await this.wire.sendAction("start-crash-reporter",n);return{diagnosticMode:i,diagnosticsMode:i,isRunning:r}}getUniqueUserId(){return this.wire.sendAction("get-unique-user-id").then((({payload:e})=>e.data))}getEntityInfo(e,t){return this.wire.sendAction("get-entity-info",{uuid:e,name:t}).then((({payload:e})=>e.data))}getEnvironmentVariable(e){return this.wire.sendAction("get-environment-variable",{environmentVariables:e}).then((({payload:e})=>e.data))}getFocusedWindow(){return this.wire.sendAction("get-focused-window").then((({payload:e})=>e.data))}async isAppCertified(e){const{payload:{data:{certifiedInfo:t}}}=await this.wire.sendAction("is-app-certified",{manifestUrl:e});return t}getInstalledRuntimes(){return this.wire.sendAction("get-installed-runtimes").then((({payload:e})=>e.data.runtimes))}async getInstalledApps(){const{payload:{data:{installedApps:e}}}=await this.wire.sendAction("get-installed-apps");return e}getLog(e){return this.wire.sendAction("view-log",e).then((({payload:e})=>e.data))}getMachineId(){return this.wire.sendAction("get-machine-id").then((({payload:e})=>e.data))}getMinLogLevel(){return this.wire.sendAction("get-min-log-level").then((({payload:e})=>e.data))}getLogList(){return this.wire.sendAction("list-logs").then((({payload:e})=>e.data))}getMonitorInfo(){return this.wire.sendAction("get-monitor-info").then((({payload:e})=>e.data))}getMousePosition(){return this.wire.sendAction("get-mouse-position").then((({payload:e})=>e.data))}getProcessList(){return console.warn("System.getProcessList has been deprecated. Please consider using our new process APIs: Window.getProcessInfo, View.getProcessInfo, Application.getProcessInfo, System.getAllProcessInfo"),this.wire.sendAction("process-snapshot").then((({payload:e})=>e.data))}async getAllProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction("get-all-process-info",this.identity);return e}getProxySettings(){return this.wire.sendAction("get-proxy-settings").then((({payload:e})=>e.data))}getRuntimeInfo(){return this.wire.sendAction("get-runtime-info").then((({payload:e})=>e.data))}getRvmInfo(){return this.wire.sendAction("get-rvm-info").then((({payload:e})=>e.data))}getHostSpecs(){return this.wire.sendAction("get-host-specs").then((({payload:e})=>e.data))}getOSInfo(){return this.wire.sendAction("get-os-info").then((({payload:e})=>e.data))}launchExternalProcess(e){return this.sendExternalProcessRequest("launch-external-process",e)}monitorExternalProcess(e){return this.sendExternalProcessRequest("monitor-external-process",e)}log(e,t){return this.wire.sendAction("write-to-log",{level:e,message:t}).then((()=>{}))}openUrlWithBrowser(e){return this.wire.sendAction("open-url-with-browser",{url:e}).then((()=>{}))}async registerCustomProtocol(e){if("object"!=typeof e)throw new Error("Must provide an object with a `protocolName` property having a string value.");await this.wire.sendAction("register-custom-protocol",e)}async unregisterCustomProtocol(e){await this.wire.sendAction("unregister-custom-protocol",{protocolName:e})}async getCustomProtocolState(e){return this.wire.sendAction("get-custom-protocol-state",{protocolName:e}).then((({payload:e})=>e.data))}releaseExternalProcess(e){return this.wire.sendAction("release-external-process",{uuid:e}).then((()=>{}))}showDeveloperTools(e){return this.wire.sendAction("show-developer-tools",e).then((()=>{}))}terminateExternalProcess(e){return this.wire.sendAction("terminate-external-process",e).then((()=>{}))}updateProxySettings(e){return this.wire.sendAction("update-proxy",e).then((()=>{}))}async downloadAsset(e,t){const n=()=>{};let i=n,r=n;const o=new Promise(((e,t)=>{i=e,r=t}));if("openfin"!==this.wire.environment.type)throw new oe.NotSupportedError("downloadAsset only supported in an OpenFin Render process");const s=oe.RuntimeError.getCallSite(),a=this.wire.environment.getNextMessageId().toString(),c=`asset-download-progress-${a}`,d=`asset-download-error-${a}`,h=`asset-download-complete-${a}`,l=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},u=()=>{this.removeListener(c,l)};await Promise.all([this.on(c,l),this.once(d,(e=>{u();const{reason:t,err:n}=e;r(new oe.RuntimeError({reason:t,error:n},s))})),this.once(h,(()=>{u(),i()}))]);const p=Object.assign(e,{downloadId:a});return await this.wire.sendAction("download-asset",p).catch((e=>{throw u(),e})),o}downloadRuntime(e,t){const n=oe.RuntimeError.getCallSite();return new Promise(((i,r)=>{if("openfin"!==this.wire.environment.type)return void r(new oe.NotSupportedError("downloadRuntime only supported in an OpenFin Render process"));const o=this.wire.environment.getNextMessageId().toString(),s=`runtime-download-progress-${o}`,a=`runtime-download-error-${o}`,c=`runtime-download-complete-${o}`,d=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},h=()=>{this.removeListener(s,d)};this.on(s,d),this.once(a,(e=>{h();const{reason:t,err:i}=e;r(new oe.RuntimeError({reason:t,error:i},n))})),this.once(c,(()=>{h(),i()}));const l=Object.assign(e,{downloadId:o});this.wire.sendAction("download-runtime",l).catch((e=>{h(),r(e)}))}))}downloadPreloadScripts(e){return this.wire.sendAction("download-preload-scripts",{scripts:e}).then((({payload:e})=>e.data))}getAllExternalApplications(){return this.wire.sendAction("get-all-external-applications").then((({payload:e})=>e.data))}getAppAssetInfo(e){return this.wire.sendAction("get-app-asset-info",e).then((({payload:e})=>e.data))}getCookies(e){const t=this.wire.environment.getUrl(),n=Object.assign(e,{url:t});return this.wire.sendAction("get-cookies",n).then((({payload:e})=>e.data))}setMinLogLevel(e){return this.wire.sendAction("set-min-log-level",{level:e}).then((()=>{}))}resolveUuid(e){return this.wire.sendAction("resolve-uuid",{entityKey:e}).then((({payload:e})=>e.data))}executeOnRemote(e,t){return t.requestingIdentity=e,this.wire.ferryAction(t)}readRegistryValue(e,t,n){return this.wire.sendAction("read-registry-value",{rootKey:e,subkey:t,value:n}).then((({payload:e})=>e.data))}registerExternalConnection(e){return this.wire.sendAction("register-external-connection",{uuid:e}).then((({payload:e})=>e.data))}async getServiceConfiguration(e){if("string"!=typeof e.name)throw new Error("Must provide an object with a `name` property having a string value");const{name:t}=e;return this.wire.sendAction("get-service-configuration",{name:t}).then((({payload:e})=>e.data))}async getSystemAppConfig(e){if("string"!=typeof e)throw new Error("Must provide a string value for name of system app");return this.wire.sendAction("get-system-app-configuration",{name:e}).then((({payload:e})=>e.data))}async registerShutdownHandler(e){this.wire.sendAction("system-register-shutdown-handler").catch((e=>{}));const{uuid:t,name:n}=this.wire.me;this.on("system-shutdown",(i=>{e({proceed:()=>{this.wire.environment.raiseEvent("application/system-shutdown-handled",{uuid:t,name:n,topic:"application"})}})}))}runRvmHealthCheck(){return this.wire.sendAction("run-rvm-health-check").then((({payload:e})=>e.data))}async launchManifest(e,t={}){const{subscribe:n,...i}=t,r=i;if(n){const e=new ae.EventEmitter;n(e);const t="app-version-progress",i="runtime-status",o="app-version-complete",s="app-version-error",a=this.wire.environment.getNextMessageId().toString();r.appVersionId=a;const c=[o,t,i,s],d=e=>{const{appVersionId:t,topic:n,type:i,...r}=e;return{...r,type:c.find((e=>i.includes(e)))}},h=t=>{const n=d(t);e.emit(n.type,n)},l=()=>{this.removeListener(`${t}.${a}`,h),this.removeListener(`${i}.${a}`,h),this.removeListener(`${o}.${a}`,h),this.removeListener(`${s}.${a}`,h),this.removeListener(`${o}.${a}`,l),this.removeListener(`${s}.${a}`,l)};await Promise.all([this.on(`${t}.${a}`,h),this.on(`${i}.${a}`,h),this.once(`${o}.${a}`,h),this.once(`${s}.${a}`,h),this.once(`${o}.${a}`,l),this.once(`${s}.${a}`,l)])}return(await this.wire.sendAction("launch-manifest",{manifestUrl:e,opts:r})).payload.data.manifest}async queryPermissionForCurrentContext(e){const t={uuid:this.wire.me.uuid,name:this.wire.me.name};return(await this.wire.sendAction("query-permission-for-current-context",{apiName:e,identity:t})).payload.data}async enableNativeWindowIntegrationProvider(e){const{payload:t}=await this.wire.sendAction("enable-native-window-integration-provider",{permissions:e});return t.data}async registerUsage({data:e,type:t}){await this.wire.sendAction("register-usage",{data:e,type:t})}async getPrinters(){const{payload:e}=await this.wire.sendAction("system-get-printers");return e.data}async updateProcessLoggingOptions(e){await this.wire.sendAction("system-update-process-logging-options",{options:e})}async getDomainSettings(){const{payload:{data:e}}=await this.wire.sendAction("get-domain-settings",this.identity);return e}async setDomainSettings(e){await this.wire.sendAction("set-domain-settings",{domainSettings:e,...this.identity})}async refreshExtensions(){const{payload:e}=await this.wire.sendAction("refresh-extensions");return e.data}async getInstalledExtensions(){const{payload:e}=await this.wire.sendAction("get-installed-extensions");return e.data}}c.System=ce;var de={},he={};Object.defineProperty(he,"__esModule",{value:!0}),he.RefCounter=void 0;he.RefCounter=class{constructor(){this.topicRefMap=new Map}incRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t+1;n=i,this.topicRefMap.set(e,i)}else this.topicRefMap.set(e,1),n=1;return n}decRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t-1;this.topicRefMap.set(e,i),n=i}else n=-1;return n}actOnFirst(e,t,n){return 1===this.incRefCount(e)?t():n()}actOnLast(e,t,n){return 0===this.decRefCount(e)?t():n()}};var le={},ue={},pe={};Object.defineProperty(pe,"__esModule",{value:!0}),pe.ChannelBase=pe.ProtectedItems=void 0;const we=e=>async(t,n,i)=>{const r=await e(t,n,i);return void 0===r?n:r};pe.ProtectedItems=class{constructor(e,t){this.providerIdentity=e,this.close=t}};class ye{static defaultAction(e){throw new Error(`No action registered at target for ${e}`)}constructor(){this.subscriptions=new Map}async processAction(e,t,n){try{const i=this.subscriptions.has(e)?this.subscriptions.get(e):(t,n)=>(this.defaultAction??ye.defaultAction)(e,t,n),r=this.preAction?await this.preAction(e,t,n):t,o=await i(r,n);return this.postAction?await this.postAction(e,o,n):o}catch(t){if(this.errorMiddleware)return this.errorMiddleware(e,t,n);throw t}}beforeAction(e){if(this.preAction)throw new Error("Already registered beforeAction middleware");this.preAction=we(e)}onError(e){if(this.errorMiddleware)throw new Error("Already registered error middleware");this.errorMiddleware=e}afterAction(e){if(this.postAction)throw new Error("Already registered afterAction middleware");this.postAction=we(e)}remove(e){this.subscriptions.delete(e)}setDefaultAction(e){if(this.defaultAction)throw new Error("default action can only be set once");this.defaultAction=e}register(e,t){if(this.subscriptions.has(e))throw new Error(`Subscription already registered for action: ${e}. Unsubscribe before adding new subscription`);return this.subscriptions.set(e,t),!0}}pe.ChannelBase=ye;var fe,ge,me,ve=s&&s.__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)},Ce=s&&s.__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};Object.defineProperty(ue,"__esModule",{value:!0}),ue.ChannelClient=void 0;const be=pe,Ie=new Map;class Ee extends be.ChannelBase{static closeChannelByEndpointId(e){const t=Ie.get(e);t&&ve(t,me,"f").call(t)}static handleProviderDisconnect(e){for(const t of Ie.values())t.providerIdentity.channelId===e.channelId&&(t.disconnectListener(e),ve(t,me,"f").call(t))}constructor(e,t,n){super(),fe.set(this,void 0),ge.set(this,void 0),this.processAction=(e,t,n)=>super.processAction(e,t,n),me.set(this,(()=>{Ie.delete(this.endpointId),ve(this,ge,"f").close()})),Ce(this,fe,new be.ProtectedItems(e,t),"f"),this.disconnectListener=()=>{},this.endpointId=e.endpointId,Ce(this,ge,n,"f"),Ie.set(this.endpointId,this),n.receive(this.processAction)}get providerIdentity(){return ve(this,fe,"f").providerIdentity}async dispatch(e,t){if(ve(this,ge,"f").isEndpointConnected(this.providerIdentity.channelId))return ve(this,ge,"f").send(this.providerIdentity.channelId,e,t);throw new Error("The client you are trying to dispatch from is disconnected from the target provider.")}onDisconnection(e){this.disconnectListener=t=>{try{e(t)}catch(e){throw new Error(`Error while calling the onDisconnection callback: ${e.message}`)}finally{this.disconnectListener=()=>{}}}}async disconnect(){await this.sendDisconnectAction(),ve(this,me,"f").call(this)}async sendDisconnectAction(){const e=ve(this,fe,"f");await e.close()}static async wireClose(e,t,n){const{channelName:i,uuid:r,name:o}=t;await e.sendAction("disconnect-from-channel",{channelName:i,uuid:r,name:o,endpointId:n})}}ue.ChannelClient=Ee,fe=new WeakMap,ge=new WeakMap,me=new WeakMap;var xe={},Ae={};Object.defineProperty(Ae,"__esModule",{value:!0}),Ae.exhaustiveCheck=void 0,Ae.exhaustiveCheck=function(e,t){throw new Error(`Unsupported value: ${e}${t?`\n Supported values are: ${t.join("")}`:""}`)};var Pe,Me,_e,Oe={},Se=s&&s.__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},Re=s&&s.__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)};Object.defineProperty(Oe,"__esModule",{value:!0}),Oe.ClassicInfo=Oe.ClassicStrategy=void 0;Oe.ClassicStrategy=class{constructor(e,t,n,i){this.messageReceiver=t,this.endpointId=n,this.providerIdentity=i,Pe.set(this,void 0),Me.set(this,new Map),_e.set(this,new Map),this.send=async(e,t,n)=>{const i=Re(this,Me,"f").get(e);if(!i)throw new Error(`Could not locate routing info for endpoint ${e}`);const r={...i};r.isLocalEndpointId&&delete r.endpointId,delete r.isLocalEndpointId;const o=Re(this,Pe,"f").sendAction("send-channel-message",{...r,providerIdentity:this.providerIdentity,action:t,payload:n});Re(this,_e,"f").get(e)?.add(o);return(await o.catch((e=>{throw new Error(e.message)})).finally((()=>{Re(this,_e,"f").get(e)?.delete(o)}))).payload.data.result},this.close=async()=>{this.messageReceiver.removeEndpoint(this.providerIdentity.channelId,this.endpointId),[...Re(this,Me,"f").keys()].forEach((e=>this.closeEndpoint(e))),Se(this,Me,new Map,"f")},Se(this,Pe,e,"f")}onEndpointDisconnect(e,t){}receive(e){this.messageReceiver.addEndpoint(e,this.providerIdentity.channelId,this.endpointId)}async closeEndpoint(e){const t=Re(this,Me,"f").get(e);Re(this,Me,"f").delete(e);const n=Re(this,_e,"f").get(e);n?.forEach((n=>{const i=`Channel connection with identity uuid: ${t?.uuid} / name: ${t?.name} / endpointId: ${e} no longer connected.`;n.cancel(new Error(i))}))}isEndpointConnected(e){return Re(this,Me,"f").has(e)}addEndpoint(e,t){Re(this,Me,"f").set(e,t.endpointIdentity),Re(this,_e,"f").set(e,new Set)}isValidEndpointPayload(e){return"string"==typeof e?.endpointIdentity?.endpointId||"string"==typeof e?.endpointIdentity?.channelId}},Pe=new WeakMap,Me=new WeakMap,_e=new WeakMap,Oe.ClassicInfo={version:5,minimumVersion:0,type:"classic"};var Fe={},je={},ke={};Object.defineProperty(ke,"__esModule",{value:!0}),ke.errorToPOJO=void 0,ke.errorToPOJO=function(e){return{stack:e.stack,name:e.name,message:e.message,toString:()=>e.stack||e.toString()}};var Le,Te,$e=s&&s.__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)},Be=s&&s.__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};Object.defineProperty(je,"__esModule",{value:!0}),je.RTCEndpoint=void 0;const Ge=ke;je.RTCEndpoint=class{static isValidEndpointPayload(e){const t=e=>"object"==typeof e&&null!==e;return t(e)&&t(e.endpointIdentity)&&t(e.rtc)&&"string"==typeof e.endpointIdentity.endpointId}constructor({rtc:e,endpointIdentity:t}){this.responseMap=new Map,Le.set(this,null),Te.set(this,void 0),this.connectionStateChangeHandler=e=>{"connected"!==this.rtc.rtcClient.connectionState&&(this.rtc.rtcClient.removeEventListener("connectionstatechange",this.connectionStateChangeHandler),this.close(),$e(this,Te,"f")&&$e(this,Te,"f").call(this))},this.send=async(e,t)=>{const n=`message-${Math.random()}`,i=new Promise(((e,t)=>{this.responseMap.set(n,{resolve:e,reject:t})}));return this.rtc.channels.request.send(JSON.stringify({action:e,payload:t,messageId:n})),i},this.close=()=>{this.responseMap.forEach((e=>e.reject("Connection has closed."))),this.responseMap=new Map,this.rtc.channels.request.close(),this.rtc.channels.response.close(),this.rtc.rtcClient.close()},this.rtc=e,this.endpointIdentity=t,this.rtc.channels.response.addEventListener("message",(e=>{let{data:t}=e;e.data instanceof ArrayBuffer&&(t=(new TextDecoder).decode(e.data));const{messageId:n,payload:i,success:r,error:o}=JSON.parse(t),{resolve:s,reject:a}=this.responseMap.get(n)??{};s&&a?(this.responseMap.delete(n),r?s(i):a(o)):(console.log("Could not find id in responseMap."),console.log(e))})),this.rtc.channels.request.addEventListener("message",(async e=>{let{data:n}=e;e.data instanceof ArrayBuffer&&(n=(new TextDecoder).decode(e.data));const{messageId:i,action:r,payload:o}=JSON.parse(n);if($e(this,Le,"f"))try{const e=await $e(this,Le,"f").call(this,r,o,t);this.rtc.channels.response.send(JSON.stringify({messageId:i,payload:e,success:!0}))}catch(e){"open"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,error:(0,Ge.errorToPOJO)(e),success:!1}))}else"open"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,success:!1,error:"Connection not ready."}))})),this.rtc.rtcClient.addEventListener("connectionstatechange",this.connectionStateChangeHandler),Object.values(this.rtc.channels).forEach((e=>{e.onclose=e=>{[...this.responseMap.values()].forEach((e=>e.reject(new Error("RTCDataChannel closed unexpectedly, this is most commonly caused by message size. Note: RTC Channels have a message size limit of ~255kB.")))),this.close(),$e(this,Te,"f")&&$e(this,Te,"f").call(this)}}))}onDisconnect(e){if($e(this,Te,"f"))throw new Error("RTCEndpoint disconnectListener cannot be set twice.");Be(this,Te,e,"f")}receive(e){if($e(this,Le,"f"))throw new Error("You have already set a listener for this RTC Endpoint.");Be(this,Le,e,"f")}get connected(){return"connected"===this.rtc.rtcClient.connectionState}},Le=new WeakMap,Te=new WeakMap;var We,He,Ne,De={},Ue=s&&s.__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)},Ve=s&&s.__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};Object.defineProperty(De,"__esModule",{value:!0}),De.EndpointStrategy=void 0;De.EndpointStrategy=class{constructor(e,t,n){this.EndpointType=e,this.StrategyName=n,We.set(this,null),He.set(this,new Map),Ne.set(this,!0),this.send=async(e,t,n)=>this.getEndpointById(e).send(t,n),this.close=async()=>{Ue(this,Ne,"f")&&(Ue(this,He,"f").forEach((e=>e.close())),Ve(this,He,new Map,"f")),Ve(this,Ne,!1,"f")},this.isValidEndpointPayload=t}onEndpointDisconnect(e,t){this.getEndpointById(e).onDisconnect(t)}receive(e){if(Ue(this,We,"f"))throw new Error(`You have already set a listener for this ${this.StrategyName} Strategy`);Ve(this,We,e,"f"),Ue(this,He,"f").forEach((e=>e.receive(Ue(this,We,"f"))))}getEndpointById(e){const t=Ue(this,He,"f").get(e);if(!t)throw new Error(`Client with endpoint id ${e} is not connected`);return t}get connected(){return Ue(this,Ne,"f")}isEndpointConnected(e){return Ue(this,He,"f").has(e)}addEndpoint(e,t){if(!Ue(this,Ne,"f"))return void console.warn(`Adding endpoint to disconnected ${this.StrategyName} Strategy`);const n=new this.EndpointType(t);Ue(this,We,"f")&&n.receive(Ue(this,We,"f")),Ue(this,He,"f").set(e,n)}async closeEndpoint(e){Ue(this,He,"f").delete(e)}},We=new WeakMap,He=new WeakMap,Ne=new WeakMap,Object.defineProperty(Fe,"__esModule",{value:!0}),Fe.RTCInfo=Fe.RTCStrategy=void 0;const ze=je,Ke=De;class qe extends Ke.EndpointStrategy{constructor(){super(ze.RTCEndpoint,ze.RTCEndpoint.isValidEndpointPayload,"RTC")}}Fe.RTCStrategy=qe,Fe.RTCInfo={version:2,minimumVersion:0,type:"rtc"};var Je={};Object.defineProperty(Je,"__esModule",{value:!0}),Je.RTCICEManager=void 0;const Ye=d;class Ze extends Ye.EmitterBase{constructor(e){super(e,"channel"),this.ensureChannelOpened=e=>new Promise(((t,n)=>{if("open"===e.readyState)t();else if("connecting"===e.readyState){const n=()=>{e.removeEventListener("open",n),t()};e.addEventListener("open",n)}else n(new Error("This Channel has already closed"))}))}static createDataChannelPromise(e,t){let n;const i=new Promise((e=>{n=e})),r=i=>{const o=()=>{i.channel.removeEventListener("open",o),n(i.channel)};i.channel.label===e&&(i.channel.addEventListener("open",o),t.removeEventListener("datachannel",r))};return t.addEventListener("datachannel",r),i}async listenForProviderIce(e,t){await this.on(this.createProviderEventName(e),t,{timestamp:Date.now()})}async raiseProviderIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createProviderEventName(e)),t)}async listenForClientIce(e,t){await this.on(this.createClientEventName(e),t,{timestamp:Date.now()})}async raiseClientIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createClientEventName(e)),t)}cleanupIceListeners(e){this.removeAllListeners(this.createClientEventName(e)),this.removeAllListeners(this.createProviderEventName(e))}createClientEventName(e){return`ice-client-${e}`}createProviderEventName(e){return`ice-provider-${e}`}createRouteString(e){return`channel/${e}`}createRtcPeer(){return this.wire.environment.getRtcPeer()}async startClientOffer(){const e=Math.random().toString(),t=this.createRtcPeer();t.addEventListener("icecandidate",(async t=>{t.candidate&&await this.raiseClientIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForProviderIce(e,(async e=>{await t.addIceCandidate(e.candidate)}));const n={request:t.createDataChannel("request"),response:t.createDataChannel("response")},i=await t.createOffer();await t.setLocalDescription(i);const r=Promise.all([n.request,n.response].map(this.ensureChannelOpened)).then((()=>{}));return{rtcClient:t,channels:n,offer:i,rtcConnectionId:e,channelsOpened:r}}async finishClientOffer(e,t,n){return await e.setRemoteDescription(t),await n,!0}async createProviderAnswer(e,t){const n=this.createRtcPeer(),i=Ze.createDataChannelPromise("request",n),r=Ze.createDataChannelPromise("response",n);n.addEventListener("icecandidate",(async t=>{t.candidate&&await this.raiseProviderIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForClientIce(e,(async e=>{await n.addIceCandidate(e.candidate)})),await n.setRemoteDescription(t);const o=await n.createAnswer();await n.setLocalDescription(o);const s=Promise.all([i,r]).then((([t,n])=>(this.cleanupIceListeners(e),{request:t,response:n})));return{rtcClient:n,answer:o,channels:s}}}Je.RTCICEManager=Ze;var Qe={},Xe={};function et(e){return[...e.split(".").reverse().entries()].reduce(((e,[t,n])=>e+ +n*1e4**t),0)}function tt(e,t){return et(e)>=et(t)}function nt(e){return e.split("/")[0]}Object.defineProperty(Xe,"__esModule",{value:!0}),Xe.runtimeUuidMeetsMinimumRuntimeVersion=Xe.parseRuntimeUuid=Xe.meetsMinimumRuntimeVersion=void 0,Xe.meetsMinimumRuntimeVersion=tt,Xe.parseRuntimeUuid=nt,Xe.runtimeUuidMeetsMinimumRuntimeVersion=function(e,t){return tt(nt(e),t)};var it,rt,ot,st,at,ct=s&&s.__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)},dt=s&&s.__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};Object.defineProperty(Qe,"__esModule",{value:!0}),Qe.ChannelProvider=void 0;const ht=pe,lt=Xe;class ut extends ht.ChannelBase{get connections(){return[...ct(this,it,"f")]}static handleClientDisconnection(e,t){const n=e.connections.find((e=>e.endpointId===t.endpointId));if(n)ct(e,st,"f").call(e,n);else{e.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name)).forEach(ct(e,st,"f"))}e.disconnectListener(t)}static setProviderRemoval(e,t){ut.removalMap.set(e,t)}constructor(e,t,n){super(),it.set(this,void 0),rt.set(this,void 0),ot.set(this,void 0),st.set(this,(e=>{const t=this.connections.filter((t=>t.endpointId!==e.endpointId));ct(this,ot,"f").closeEndpoint(e.endpointId),dt(this,it,t,"f")})),this.processAction=async(e,t,n)=>(ut.clientIsMultiRuntime(n)&&!(0,lt.runtimeUuidMeetsMinimumRuntimeVersion)(n.runtimeUuid,"18.87.56.0")?this.handleMultiRuntimeLegacyClient(n):this.checkForClientConnection(n),super.processAction(e,t,n)),at.set(this,(()=>{ct(this,ot,"f").close();const e=ut.removalMap.get(this);e&&e()})),dt(this,rt,new ht.ProtectedItems(e,t),"f"),this.connectListener=()=>{},this.disconnectListener=()=>{},dt(this,it,[],"f"),dt(this,ot,n,"f"),n.receive(this.processAction)}dispatch(e,t,n){const i=e.endpointId??this.getEndpointIdForOpenFinId(e,t);return i&&ct(this,ot,"f").isEndpointConnected(i)?ct(this,ot,"f").send(i,t,n):Promise.reject(new Error(`Client connection with identity uuid: ${e.uuid} / name: ${e.name} / endpointId: ${i} no longer connected.`))}async processConnection(e,t){return ct(this,it,"f").push(e),this.connectListener(e,t)}publish(e,t){return this.connections.map((n=>ct(this,ot,"f").send(n.endpointId,e,t)))}onConnection(e){this.connectListener=e}onDisconnection(e){this.disconnectListener=e}async destroy(){const e=ct(this,rt,"f");e.providerIdentity,dt(this,it,[],"f"),await e.close(),ct(this,at,"f").call(this)}async getAllClientInfo(){return this.connections.map((e=>{const{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}=e;return{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}}))}checkForClientConnection(e){if(!this.isClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider.\n Client Identity: {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}isClientConnected(e){return ut.clientIdentityIncludesEndpointId(e)?this.connections.some((t=>t.endpointId===e.endpointId&&t.uuid===e.uuid&&t.name===e.name)):this.isLegacyClientConnected(e)}isLegacyClientConnected(e){return this.connections.some((t=>t.uuid===e.uuid&&t.name===e.name))}handleMultiRuntimeLegacyClient(e){if(!this.isLegacyClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider. Client Identity:\n {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}getEndpointIdForOpenFinId(e,t){const n=this.connections.filter((t=>t.name===e.name&&t.uuid===e.uuid));if(n.length>=2){const n=ct(this,rt,"f"),{uuid:i,name:r}=e,o=n?.providerIdentity.uuid,s=n?.providerIdentity.name;console.warn(`WARNING: Dispatch call may have unintended results. The "to" argument of your dispatch call is missing the\n "endpointId" parameter. The identity you are dispatching to ({uuid: ${i}, name: ${r}})\n has multiple channelClients for this channel. Your dispatched action: (${t}) from the provider:\n ({uuid: ${o}, name: ${s}}) will only be processed by the most recently-created client.`)}return n.pop()?.endpointId}static clientIdentityIncludesEndpointId(e){return void 0!==e.endpointId}static clientIsMultiRuntime(e){return void 0!==e.runtimeUuid}static async wireClose(e,t){await e.sendAction("destroy-channel",{channelName:t})}}Qe.ChannelProvider=ut,it=new WeakMap,rt=new WeakMap,ot=new WeakMap,st=new WeakMap,at=new WeakMap,ut.removalMap=new WeakMap;var pt={};Object.defineProperty(pt,"__esModule",{value:!0}),pt.MessageReceiver=void 0;const wt=ue,yt=d;class ft extends yt.Base{constructor(e){super(e),this.onmessage=e=>"process-channel-message"===e.action&&(this.processChannelMessage(e),!0),this.endpointMap=new Map,this.latestEndpointIdByChannelId=new Map,e.registerMessageHandler(this.onmessage.bind(this))}async processChannelMessage(e){const{senderIdentity:t,providerIdentity:n,action:i,ackToSender:r,payload:o,intendedTargetIdentity:s}=e.payload,a=s.channelId??s.endpointId??this.latestEndpointIdByChannelId.get(n.channelId),c=this.endpointMap.get(a);if(!c)return r.payload.success=!1,r.payload.reason=`Client connection with identity uuid: ${this.wire.me.uuid} / name: ${this.wire.me.name} / endpointId: ${a} no longer connected.`,this.wire.sendRaw(r);try{const e=await c(i,o,t);return r.payload.payload=r.payload.payload||{},r.payload.payload.result=e,this.wire.sendRaw(r)}catch(e){return r.payload.success=!1,r.payload.reason=e.message,this.wire.sendRaw(r)}}addEndpoint(e,t,n){this.endpointMap.set(n,e),t!==n&&this.latestEndpointIdByChannelId.set(t,n)}removeEndpoint(e,t){this.endpointMap.delete(t),this.latestEndpointIdByChannelId.get(e)===t&&this.latestEndpointIdByChannelId.delete(e)}checkForPreviousClientConnection(e){const t=this.latestEndpointIdByChannelId.get(e);t&&(wt.ChannelClient.closeChannelByEndpointId(t),console.warn("You have created a second connection to an older provider. First connection has been removed from the clientMap"),console.warn("If the provider calls publish(), you may receive multiple messages."))}}pt.MessageReceiver=ft;var gt={};Object.defineProperty(gt,"__esModule",{value:!0}),gt.ProtocolManager=void 0;gt.ProtocolManager=class{constructor(e){this.ProtocolsInPreferenceOrder=e,this.DefaultClientProtocols=["classic"],this.DefaultProviderProtocols=["classic"],this.getClientProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultClientProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(", ")}.`);return t},this.getProviderProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultProviderProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(", ")}.`);return t},this.getCompatibleProtocols=(e,t)=>t.supportedProtocols.filter((t=>e.some((e=>e.type===t.type&&t.version>=e.minimumVersion&&e.version>=(t.minimumVersion??0))))).slice(0,t.maxProtocols)}};var mt={};Object.defineProperty(mt,"__esModule",{value:!0});class vt{static combine(e,t){return new vt(e,t)}constructor(e,t){this.primary=e,this.secondary=t}onEndpointDisconnect(e,t){this.primary.onEndpointDisconnect(e,(()=>{this.secondary.isEndpointConnected(e)||t()})),this.secondary.onEndpointDisconnect(e,(()=>{this.primary.isEndpointConnected(e)||t()}))}isValidEndpointPayload(e){return this.primary.isValidEndpointPayload(e)||this.secondary.isValidEndpointPayload(e)}async closeEndpoint(e){await this.primary.closeEndpoint(e),await this.secondary.closeEndpoint(e)}isEndpointConnected(e){return this.primary.isEndpointConnected(e)||this.secondary.isEndpointConnected(e)}async addEndpoint(e,t){this.primary.isValidEndpointPayload(t)&&await this.primary.addEndpoint(e,t),this.secondary.isValidEndpointPayload(t)&&await this.secondary.addEndpoint(e,t)}receive(e){this.primary.receive(e),this.secondary.receive(e)}send(e,t,n){return this.primary.isEndpointConnected(e)?this.primary.send(e,t,n):this.secondary.send(e,t,n)}async close(){await Promise.all([this.primary.close(),this.secondary.close()])}}mt.default=vt;var Ct,bt,It=s&&s.__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},Et=s&&s.__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)},xt=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(xe,"__esModule",{value:!0}),xe.ConnectionManager=void 0;const At=Ae,Pt=d,Mt=Oe,_t=Fe,Ot=Je,St=Qe,Rt=pt,Ft=gt,jt=xt(mt);class kt extends Pt.Base{static getProtocolOptionsFromStrings(e){return e.map((e=>{switch(e){case"rtc":return _t.RTCInfo;case"classic":return Mt.ClassicInfo;default:return(0,At.exhaustiveCheck)(e,["rtc","classic"])}}))}constructor(e){super(e),Ct.set(this,void 0),bt.set(this,void 0),this.removeChannelFromProviderMap=e=>{this.providerMap.delete(e)},this.onmessage=e=>"process-channel-connection"===e.action&&(this.processChannelConnection(e),!0),this.providerMap=new Map,this.protocolManager=new Ft.ProtocolManager("node"===this.wire.environment.type?["classic"]:["rtc","classic"]),It(this,Ct,new Rt.MessageReceiver(e),"f"),It(this,bt,new Ot.RTCICEManager(e),"f"),e.registerMessageHandler(this.onmessage.bind(this))}createProvider(e,t){const n=Object.assign(this.wire.environment.getDefaultChannelOptions().create,e||{}),i=this.protocolManager.getProviderProtocols(n?.protocols),r=i.map((e=>{switch(e){case"rtc":return new _t.RTCStrategy;case"classic":return new Mt.ClassicStrategy(this.wire,Et(this,Ct,"f"),t.channelId,t);default:return(0,At.exhaustiveCheck)(e,["rtc","classic"])}}));let o;if(2===r.length){const[e,t]=r;o=jt.default.combine(e,t)}else{if(1!==r.length)throw new Error("failed to combine strategies");[o]=r}const s=new St.ChannelProvider(t,(()=>St.ChannelProvider.wireClose(this.wire,t.channelName)),o),a=t.channelId;return this.providerMap.set(a,{provider:s,strategy:o,supportedProtocols:kt.getProtocolOptionsFromStrings(i)}),St.ChannelProvider.setProviderRemoval(s,this.removeChannelFromProviderMap.bind(this)),s}async createClientOffer(e){const t=this.protocolManager.getClientProtocols(e?.protocols);let n;return{offer:{supportedProtocols:await Promise.all(t.map((async e=>{switch(e){case"rtc":{const{rtcClient:e,channels:t,offer:i,rtcConnectionId:r,channelsOpened:o}=await Et(this,bt,"f").startClientOffer();return n={rtcClient:e,channels:t,channelsOpened:o},{type:"rtc",version:_t.RTCInfo.version,payload:{offer:i,rtcConnectionId:r}}}case"classic":return{type:"classic",version:Mt.ClassicInfo.version};default:return(0,At.exhaustiveCheck)(e,["rtc","classic"])}}))),maxProtocols:2},rtc:n}}async createClientStrategy(e,t){t.endpointId||(t.endpointId=this.wire.environment.getNextMessageId(),Et(this,Ct,"f").checkForPreviousClientConnection(t.channelId));const n=t.answer??{supportedProtocols:[{type:"classic",version:1}]},i=(await Promise.all(n.supportedProtocols.map((async n=>"rtc"===n.type&&e?(await Et(this,bt,"f").finishClientOffer(e.rtcClient,n.payload.answer,e.channelsOpened),new _t.RTCStrategy):"classic"===n.type?new Mt.ClassicStrategy(this.wire,Et(this,Ct,"f"),t.endpointId,t):null)))).filter((e=>null!==e));let r;if(e&&!i.some((e=>e instanceof _t.RTCStrategy))&&e&&e.rtcClient.close(),i.length>=2)r=jt.default.combine(i[0],i[1]);else{if(!i.length)throw new Error("No compatible protocols");[r]=i}const o={endpointIdentity:t,rtc:e};return r.addEndpoint(t.channelId,o),r}async processChannelConnection(e){const{clientIdentity:t,providerIdentity:n,ackToSender:i,payload:r,offer:o}=e.payload;t.endpointId?t.isLocalEndpointId=!1:(t.endpointId=this.wire.environment.getNextMessageId(),t.isLocalEndpointId=!0);const s=n.channelId,a=this.providerMap.get(s);if(!a)return i.payload.success=!1,i.payload.reason=`Channel "${n.channelName}" has been destroyed.`,this.wire.sendRaw(i);const{provider:c,strategy:d,supportedProtocols:h}=a;try{if(!(c instanceof St.ChannelProvider))throw Error("Cannot connect to a channel client");const e=o??{supportedProtocols:[{type:"classic",version:1}],maxProtocols:1},n=this.protocolManager.getCompatibleProtocols(h,e);if(!n.length)throw new Error("This provider does not support any of the offered protocols.");const s=await c.processConnection(t,r);i.payload.payload=i.payload.payload||{};let a={supportedProtocols:[],endpointPayloadPromise:Promise.resolve({endpointIdentity:t})};return a=await n.reduce((async(e,t)=>{const n=await e;if("rtc"===t.type){const{answer:e,rtcClient:i,channels:r}=await Et(this,bt,"f").createProviderAnswer(t.payload.rtcConnectionId,t.payload.offer);n.supportedProtocols.push({type:"rtc",version:_t.RTCInfo.version,payload:{answer:e}}),n.endpointPayloadPromise=n.endpointPayloadPromise.then((e=>r.then((t=>({...e,rtc:{rtcClient:i,channels:t}})))))}else n.supportedProtocols.push({type:"classic",version:Mt.ClassicInfo.version});return n}),Promise.resolve(a)),a.endpointPayloadPromise.then((e=>d.addEndpoint(t.endpointId,e))),i.payload.payload.result=s,i.payload.payload.answer=a,this.wire.sendRaw(i)}catch(e){return i.payload.success=!1,i.payload.reason=e.message,this.wire.sendRaw(i)}}}xe.ConnectionManager=kt,Ct=new WeakMap,bt=new WeakMap;var Lt,Tt,$t,Bt=s&&s.__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},Gt=s&&s.__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)};Object.defineProperty(le,"__esModule",{value:!0}),le.Channel=void 0;const Wt=t,Ht=G,Nt=d,Dt=ue,Ut=xe,Vt=Qe;function zt(e){const t=Math.floor(e/10),n=Math.min(3e4,500*2**t);return new Promise((e=>{setTimeout((()=>{e(!1)}),n)}))}class Kt extends Nt.EmitterBase{constructor(e){super(e,"channel"),Lt.set(this,void 0),Tt.set(this,new Wt.EventEmitter),$t.set(this,new Ht.AsyncRetryableLazy((async()=>{await Promise.all([this.on("disconnected",(e=>{Dt.ChannelClient.handleProviderDisconnect(e)})),this.on("connected",((...e)=>{Gt(this,Tt,"f").emit("connected",...e)}))]).catch((()=>new Error("error setting up channel connection listeners")))}))),Bt(this,Lt,new Ut.ConnectionManager(e),"f")}async getAllChannels(){return this.wire.sendAction("get-all-channels").then((({payload:e})=>e.data))}async onChannelConnect(e){await this.on("connected",e)}async onChannelDisconnect(e){await this.on("disconnected",e)}async safeConnect(e,t,n){const i={count:0};do{let r=()=>{};const o=new Promise((t=>{r=n=>{e===n.channelName&&t(!0)},Gt(this,Tt,"f").on("connected",r)}));try{if(i.count>0){i.gotConnectedEvent=await Promise.race([zt(i.count),o]);const t=await this.wire.sendAction("connect-to-channel",{...n,retryInfo:i});return console.log(`Successfully connected to channelName: ${e}`),t.payload.data}const t=this.wire.sendAction("connect-to-channel",n);i.originalMessageId=t.messageId;return(await t).payload.data}catch(n){if(!n.message.includes("internal-nack"))throw n;t&&0===i.count&&console.warn(`No channel found for channelName: ${e}. Waiting for connection...`)}finally{i.count+=1,Gt(this,Tt,"f").removeListener("connected",r)}}while(t);throw new Error(`No channel found for channelName: ${e}.`)}async connect(e,t={}){if(await Gt(this,$t,"f").getValue(),!e||"string"!=typeof e)throw new Error("Please provide a channelName string to connect to a channel.");const n={wait:!0,...this.wire.environment.getDefaultChannelOptions().connect,...t},{offer:i,rtc:r}=await Gt(this,Lt,"f").createClientOffer(n);let o;(this.fin.me.isFrame||this.fin.me.isView||this.fin.me.isWindow)&&(o=(await this.fin.me.getInfo()).url);const s={channelName:e,...n,offer:i,connectionUrl:o},a=await this.safeConnect(e,n.wait,s),c=await Gt(this,Lt,"f").createClientStrategy(r,a),d=new Dt.ChannelClient(a,(()=>Dt.ChannelClient.wireClose(this.wire,a,a.endpointId)),c);return c.onEndpointDisconnect(a.channelId,(async()=>{try{await d.sendDisconnectAction()}catch(e){console.warn(`Something went wrong during disconnect for client with uuid: ${a.uuid} / name: ${a.name} / endpointId: ${a.endpointId}.`)}finally{Dt.ChannelClient.handleProviderDisconnect(a)}})),d}async create(e,t){if(!e)throw new Error("Please provide a channelName to create a channel");const{payload:{data:n}}=await this.wire.sendAction("create-channel",{channelName:e}),i=Gt(this,Lt,"f").createProvider(t,n);return this.on("client-disconnected",(t=>{t.channelName===e&&Vt.ChannelProvider.handleClientDisconnection(i,t)})),i}}le.Channel=Kt,Lt=new WeakMap,Tt=new WeakMap,$t=new WeakMap,Object.defineProperty(de,"__esModule",{value:!0}),de.InterAppPayload=de.InterApplicationBus=void 0;const qt=t,Jt=d,Yt=he,Zt=le,Qt=O;class Xt extends Jt.Base{constructor(e){super(e),this.events={subscriberAdded:"subscriber-added",subscriberRemoved:"subscriber-removed"},this.refCounter=new Yt.RefCounter,this.Channel=new Zt.Channel(e),this.emitter=new qt.EventEmitter,e.registerMessageHandler(this.onmessage.bind(this)),this.on=this.emitter.on.bind(this.emitter),this.removeAllListeners=this.emitter.removeAllListeners.bind(this.emitter)}async publish(e,t){await this.wire.sendAction("publish-message",{topic:e,message:t,sourceWindowName:this.me.name})}async send(e,t,n){const i=(0,Qt.validateIdentity)(e);if(i)throw new Error(i);await this.wire.sendAction("send-message",{destinationUuid:e.uuid,destinationWindowName:e.name,topic:t,message:n,sourceWindowName:this.me.name})}subscribe(e,t,n){const i=this.createSubscriptionKey(e.uuid,e.name||"*",t);return this.emitter.on(i,n),this.refCounter.actOnFirst(i,(async()=>{await this.wire.sendAction("subscribe",{sourceUuid:e.uuid,sourceWindowName:e.name||"*",topic:t,destinationWindowName:this.me.name})}),(()=>Promise.resolve()))}unsubscribe(e,t,n){const i=e.name||"*",r=this.createSubscriptionKey(e.uuid,i,t);return this.emitter.removeListener(r,n),this.refCounter.actOnLast(r,(async()=>{await this.wire.sendAction("unsubscribe",{sourceUuid:e.uuid,sourceWindowName:i,topic:t,destinationWindowName:this.me.name})}),(()=>new Promise((e=>e)).then((()=>{}))))}processMessage(e){const{payload:{message:t,sourceWindowName:n,sourceUuid:i,topic:r}}=e,o=[this.createSubscriptionKey(i,n,r),this.createSubscriptionKey(i,"*",r),this.createSubscriptionKey("*","*",r)],s={uuid:i,name:n};o.forEach((e=>{this.emitter.emit(e,t,s)}))}emitSubscriverEvent(e,t){const{payload:{targetName:n,uuid:i,topic:r}}=t,o={name:n,uuid:i,topic:r};this.emitter.emit(e,o)}createSubscriptionKey(e,t,n){const i=t||"*";if(!(e&&i&&n))throw new Error("Missing uuid, name, or topic string");return function(...e){return e.map((e=>Buffer.from(`${e}`).toString("base64"))).join("/")}(e,i,n)}onmessage(e){const{action:t}=e;switch(t){case"process-message":this.processMessage(e);break;case this.events.subscriberAdded:this.emitSubscriverEvent(this.events.subscriberAdded,e);break;case this.events.subscriberRemoved:this.emitSubscriverEvent(this.events.subscriberRemoved,e)}return!0}}de.InterApplicationBus=Xt;de.InterAppPayload=class{};var en={};Object.defineProperty(en,"__esModule",{value:!0}),en.Clipboard=void 0;const tn=d;class nn extends tn.Base{async writeText(e){await this.wire.sendAction("clipboard-write-text",e)}async readText(e){const{payload:t}=await this.wire.sendAction("clipboard-read-text",{type:e});return t.data}async writeImage(e){await this.wire.sendAction("clipboard-write-image",e)}async readImage(e={format:"dataURL"}){const{payload:t}=await this.wire.sendAction("clipboard-read-image",e);return t.data}async writeHtml(e){await this.wire.sendAction("clipboard-write-html",e)}async readHtml(e){const{payload:t}=await this.wire.sendAction("clipboard-read-html",{type:e});return t.data}async writeRtf(e){await this.wire.sendAction("clipboard-write-rtf",e)}async readRtf(e){const{payload:t}=await this.wire.sendAction("clipboard-read-rtf",{type:e});return t.data}async write(e){await this.wire.sendAction("clipboard-write",e)}async getAvailableFormats(e){const{payload:t}=await this.wire.sendAction("clipboard-read-formats",{type:e});return t.data}}en.Clipboard=nn;var rn={},on={},sn={};Object.defineProperty(sn,"__esModule",{value:!0}),sn.ExternalApplication=void 0;const an=d;class cn extends an.EmitterBase{constructor(e,t){super(e,"external-application",t.uuid),this.identity=t}getInfo(){return this.wire.sendAction("get-external-application-info",this.identity).then((({payload:e})=>e.data))}}sn.ExternalApplication=cn,Object.defineProperty(on,"__esModule",{value:!0}),on.ExternalApplicationModule=void 0;const dn=d,hn=sn;class ln extends dn.Base{wrap(e){return this.wire.sendAction("external-application-wrap").catch((e=>{})),Promise.resolve(new hn.ExternalApplication(this.wire,{uuid:e}))}wrapSync(e){return this.wire.sendAction("external-application-wrap-sync").catch((e=>{})),new hn.ExternalApplication(this.wire,{uuid:e})}}on.ExternalApplicationModule=ln,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(on,e),n(sn,e)}(rn);var un={},pn={},wn={};Object.defineProperty(wn,"__esModule",{value:!0}),wn._Frame=void 0;const yn=d;class fn extends yn.EmitterBase{constructor(e,t){super(e,"frame",t.uuid,t.name),this.identity=t}getInfo(){return this.wire.sendAction("get-frame-info",this.identity).then((({payload:e})=>e.data))}getParentWindow(){return this.wire.sendAction("get-parent-window",this.identity).then((({payload:e})=>e.data))}}wn._Frame=fn,Object.defineProperty(pn,"__esModule",{value:!0}),pn._FrameModule=void 0;const gn=d,mn=O,vn=wn;class Cn extends gn.Base{async wrap(e){this.wire.sendAction("frame-wrap").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}wrapSync(e){this.wire.sendAction("frame-wrap-sync").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}getCurrent(){return this.wire.sendAction("frame-get-current").catch((e=>{})),Promise.resolve(new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity()))}getCurrentSync(){return this.wire.sendAction("frame-get-current-sync").catch((e=>{})),new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity())}}pn._FrameModule=Cn,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(pn,e),n(wn,e)}(un);var bn={};Object.defineProperty(bn,"__esModule",{value:!0}),bn.GlobalHotkey=void 0;const In=d;class En extends In.EmitterBase{constructor(e){super(e,"global-hotkey")}async register(e,t){await this.on(e,t),await this.wire.sendAction("global-hotkey-register",{hotkey:e})}async unregister(e){await this.removeAllListeners(e),await this.wire.sendAction("global-hotkey-unregister",{hotkey:e})}async unregisterAll(){await Promise.all(this.eventNames().filter((e=>!("registered"===e||"unregistered"===e))).map((e=>this.removeAllListeners(e)))),await this.wire.sendAction("global-hotkey-unregister-all",{})}async isRegistered(e){const{payload:{data:t}}=await this.wire.sendAction("global-hotkey-is-registered",{hotkey:e});return t}}bn.GlobalHotkey=En;var xn,An={},Pn={},Mn={},_n=s&&s.__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)};Object.defineProperty(Mn,"__esModule",{value:!0}),Mn.Platform=void 0;const On=d,Sn=O,Rn=new Map;class Fn extends On.EmitterBase{constructor(e,t){super(t.wire,"application",e.uuid),this.getClient=e=>{this.wire.sendAction("platform-get-client",this.identity).catch((e=>{}));const t=e||this.identity,{uuid:n}=t;if(!Rn.has(n)){const e=_n(this,xn,"f").call(this,n);Rn.set(n,e)}return Rn.get(n)},xn.set(this,(async e=>{try{const t=`custom-frame-${e}`,n=await this._channel.connect(t,{wait:!1});return n.onDisconnection((()=>{Rn.delete(e)})),n}catch(t){throw Rn.delete(e),new Error("The targeted Platform is not currently running. Listen for application-started event for the given Uuid.")}})),this.launchLegacyManifest=this.launchContentManifest;const n=(0,Sn.validateIdentity)(e);if(n)throw new Error(n);this._channel=t,this.identity={uuid:e.uuid},this.Layout=this.fin.Platform.Layout,this.Application=this.fin.Application.wrapSync(this.identity)}async createView(e,t,n){this.wire.sendAction("platform-create-view",this.identity).catch((e=>{}));const i=await this.getClient(),r=await i.dispatch("create-view",{target:t,opts:e,targetView:n});if(!r||(0,Sn.validateIdentity)(r.identity))throw new Error(`When overwriting the createView call, please return an object that has a valid 'identity' property: ${JSON.stringify(r)}`);return this.fin.View.wrapSync(r.identity)}async createWindow(e){this.wire.sendAction("platform-create-window",this.identity).catch((e=>{}));const t=await this.getClient();e.reason||(e.reason="api-call");const n=await t.dispatch("create-view-container",e);if(!n||(0,Sn.validateIdentity)(n.identity))throw new Error(`When overwriting the createWindow call, please return an object that has a valid 'identity' property: ${JSON.stringify(n)}`);const{identity:i}=n,r=this.fin.Window.wrapSync(i);return r.name=i.name,r.uuid=i.uuid,r}async quit(){this.wire.sendAction("platform-quit",this.identity).catch((e=>{}));return(await this.getClient()).dispatch("quit")}async closeView(e){this.wire.sendAction("platform-close-view",this.identity).catch((e=>{}));const t=await this.getClient();await t.dispatch("close-view",{view:e})}async reparentView(e,t){console.warn("Platform.reparentView has been deprecated, please use Platform.createView"),this.wire.sendAction("platform-reparent-view",this.identity).catch((e=>{}));const n={...e,uuid:e.uuid??this.identity.uuid},i=await this.fin.View.wrap(n),r=await i.getOptions();return this.createView(r,t)}async getSnapshot(){this.wire.sendAction("platform-get-snapshot",this.identity).catch((e=>{}));return(await this.getClient()).dispatch("get-snapshot")}async getViewSnapshot(e){return(await this.getClient()).dispatch("get-view-snapshot",{viewIdentity:e})}async applySnapshot(e,t){this.wire.sendAction("platform-apply-snapshot",this.identity).catch((e=>{}));const n="Requested snapshot must be a valid Snapshot object, or a url or filepath to such an object.";let i;if("string"==typeof e)try{i=(await this._channel.wire.sendAction("get-application-manifest",{manifestUrl:e})).payload.data}catch(e){throw new Error(`${n}: ${e}`)}else i=e;if(!i.windows)throw new Error(n);const r=await this.getClient();return await r.dispatch("apply-snapshot",{snapshot:i,options:t}),this}async fetchManifest(e){return(await this.getClient()).dispatch("platform-fetch-manifest",{manifestUrl:e})}async launchContentManifest(e){this.wire.sendAction("platform-launch-content-manifest",this.identity).catch((()=>{}));const t=await this.getClient(),n=await this.fetchManifest(e);return t.dispatch("launch-into-platform",{manifest:n,manifestUrl:e}),this}async setWindowContext(e={},t){if(this.wire.sendAction("platform-set-window-context",this.identity).catch((e=>{})),!e)throw new Error("Please provide a serializable object or string to set the context.");const n=await this.getClient(),{entityType:i}=t?await this.fin.System.getEntityInfo(t.uuid,t.name):this.fin.me;await n.dispatch("set-window-context",{context:e,entityType:i,target:t||{uuid:this.fin.me.uuid,name:this.fin.me.name}})}async getWindowContext(e){this.wire.sendAction("platform-get-window-context",this.identity).catch((e=>{}));const t=await this.getClient(),{entityType:n}=e?await this.fin.System.getEntityInfo(e.uuid,e.name):this.fin.me;return t.dispatch("get-window-context",{target:e||{uuid:this.fin.me.uuid,name:this.fin.me.name},entityType:n})}async closeWindow(e,t={skipBeforeUnload:!1}){this.wire.sendAction("platform-close-window",this.identity).catch((e=>{}));return(await this.getClient()).dispatch("close-window",{windowId:e,options:t})}}Mn.Platform=Fn,xn=new WeakMap;var jn={},kn={},Ln={},Tn={};function $n(e){switch(e){case"columns":case"grid":case"rows":case"tabs":return!0;default:return!1}}Object.defineProperty(Tn,"__esModule",{value:!0}),Tn.overrideFromComposables=Tn.isValidPresetType=void 0,Tn.isValidPresetType=$n,Tn.overrideFromComposables=function(...e){return t=>e.reduceRight(((e,t)=>n=>t(e(n))),(e=>e))(t)},Tn.default={isValidPresetType:$n};var Bn={},Gn={},Wn={};Object.defineProperty(Wn,"__esModule",{value:!0}),Wn.ApiConsumer=void 0;Wn.ApiConsumer=class{constructor(e){this.strategy=e,this.consume=async e=>(await this.strategy.getExposedFunctions(e)).reduce(((t,n)=>({...t,[n.key]:this.strategy.createFunction(n,e)})),{})}};var Hn={},Nn={};Object.defineProperty(Nn,"__esModule",{value:!0}),Nn.expose=Nn.getExposedProperties=void 0;const Dn=Symbol("exposedProperties");Nn.getExposedProperties=e=>e[Dn]||e.prototype[Dn]||[];Nn.expose=e=>(t,n,i)=>{t[Dn]=t[Dn]||[],t[Dn].push({key:n,descriptor:i,options:e})},Object.defineProperty(Hn,"__esModule",{value:!0}),Hn.ApiExposer=void 0;const Un=Nn;Hn.ApiExposer=class{constructor(e){this.strategy=e,this.exposeInstance=async(e,t)=>{const n=(0,Un.getExposedProperties)(e),i=await Promise.all(n.map((async({key:n,options:i})=>({key:n,options:await this.strategy.exposeFunction(e[n].bind(e),{key:n,options:i,meta:t})}))));await this.strategy.exposeMeta(t,i)}}};var Vn={},zn={},Kn={};Object.defineProperty(Kn,"__esModule",{value:!0}),Kn.ChannelsConsumer=void 0;Kn.ChannelsConsumer=class{constructor(e){this.channel=e,this.getExposedFunctions=async e=>{const{id:t}=e,{props:n}=await this.channel.dispatch(`api-meta:${t}`);return n},this.createFunction=e=>(...t)=>{const{action:n}=e.options;return this.channel.dispatch(n,{args:t})}}};var qn={};Object.defineProperty(qn,"__esModule",{value:!0}),qn.ChannelsExposer=void 0;qn.ChannelsExposer=class{constructor(e){this.channelProviderOrClient=e,this.exposeFunction=async(e,t)=>{const{key:n,options:i,meta:r}=t,{id:o}=r,s=`${o}.${i?.action||n}`;return await this.channelProviderOrClient.register(s,(async({args:t})=>e(...t))),{action:s}},this.exposeMeta=async({id:e},t)=>{const n=`api-meta:${e}`;await this.channelProviderOrClient.register(n,(()=>({props:t})))}}},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Kn,e),n(qn,e)}(zn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(zn,e)}(Vn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Wn,e),n(Hn,e),n(Vn,e),n(Nn,e)}(Gn);var Jn={};Object.defineProperty(Jn,"__esModule",{value:!0}),Jn.createRelayedDispatch=exports.relayChannelClientApi_1=Jn.relayChannelClientApi=void 0;const Yn=["no longer connected","RTCDataChannel closed unexpectedly","The client you are trying to dispatch from is disconnected from the target provider"];exports.relayChannelClientApi_1=Jn.relayChannelClientApi=async(e,t)=>{e.register(`relay:${t}`,(({action:t,target:n,payload:i})=>e.dispatch(n,t,i))),await Promise.resolve()};Jn.createRelayedDispatch=(e,t,n,i)=>async(r,o)=>{try{return await e.dispatch(`relay:${n}`,{action:r,payload:o,target:t})}catch(e){if(s=e.message,Yn.some((e=>s.includes(e)))&&i)throw new Error(i);throw e}var s};var Zn,Qn,Xn,ei=s&&s.__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},ti=s&&s.__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)};Object.defineProperty(Bn,"__esModule",{value:!0}),Bn.ColumnOrRow=Bn.TabStack=Bn.LayoutNode=void 0;const ni=Gn,ii=Jn;class ri{constructor(e,t){Zn.set(this,void 0),this.isRoot=()=>ti(this,Zn,"f").isRoot(this.entityId),this.exists=()=>ti(this,Zn,"f").exists(this.entityId),this.getParent=async()=>{const e=await ti(this,Zn,"f").getParent(this.entityId);if(e)return ri.getEntity(e,ti(this,Zn,"f"))},this.createAdjacentStack=async(e,t)=>{const n=await ti(this,Zn,"f").createAdjacentStack(this.entityId,e,t);return ri.getEntity({entityId:n,type:"stack"},ti(this,Zn,"f"))},this.getAdjacentStacks=async e=>(await ti(this,Zn,"f").getAdjacentStacks({targetId:this.entityId,edge:e})).map((e=>ri.getEntity({type:"stack",entityId:e.entityId},ti(this,Zn,"f")))),ei(this,Zn,e,"f"),this.entityId=t}}Bn.LayoutNode=ri,Zn=new WeakMap,ri.newLayoutEntitiesClient=async(e,t,n)=>{const i=(0,ii.createRelayedDispatch)(e,n,"layout-relay","You are trying to interact with a layout component on a window that does not exist or has been destroyed.");return new ni.ApiConsumer(new ni.ChannelsConsumer({dispatch:i})).consume({id:t})},ri.getEntity=(e,t)=>{const{entityId:n,type:i}=e;switch(i){case"column":case"row":return new si(t,n,i);case"stack":return new oi(t,n);default:throw new Error(`Unrecognised Layout Entity encountered ('${JSON.stringify(e)})`)}};class oi extends ri{constructor(e,t){super(e,t),Qn.set(this,void 0),this.type="stack",this.getViews=()=>ti(this,Qn,"f").getStackViews(this.entityId),this.addView=async(e,t={index:0})=>ti(this,Qn,"f").addViewToStack(this.entityId,e,t),this.removeView=async e=>{await ti(this,Qn,"f").removeViewFromStack(this.entityId,e)},this.setActiveView=async e=>{await ti(this,Qn,"f").setStackActiveView(this.entityId,e)},ei(this,Qn,e,"f")}}Bn.TabStack=oi,Qn=new WeakMap;class si extends ri{constructor(e,t,n){super(e,t),Xn.set(this,void 0),this.getContent=async()=>(await ti(this,Xn,"f").getContent(this.entityId)).map((e=>ri.getEntity(e,ti(this,Xn,"f")))),ei(this,Xn,e,"f"),this.type=n}}Bn.ColumnOrRow=si,Xn=new WeakMap;var ai={};Object.defineProperty(ai,"__esModule",{value:!0}),ai.DEFAULT_LAYOUT_KEY=ai.LAYOUT_CONTROLLER_ID=void 0,ai.LAYOUT_CONTROLLER_ID="layout-entities",ai.DEFAULT_LAYOUT_KEY="__default__";var ci,di,hi,li=s&&s.__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)};Object.defineProperty(Ln,"__esModule",{value:!0}),Ln.Layout=void 0;const ui=G,pi=O,wi=d,yi=Tn,fi=Bn,gi=ai;class mi extends wi.Base{static getClient(e){return li(e,di,"f").getValue()}constructor(e,t){super(t),ci.add(this),di.set(this,new ui.Lazy((async()=>fi.LayoutNode.newLayoutEntitiesClient(await this.platform.getClient(),gi.LAYOUT_CONTROLLER_ID,this.identity)))),this.replace=async e=>{this.wire.sendAction("layout-replace").catch((e=>{}));const t=await this.platform.getClient();await t.dispatch("replace-layout",{target:this.identity,opts:{layout:e}})},this.replaceView=async(e,t)=>{this.wire.sendAction("layout-replace-view").catch((e=>{}));const n=await this.platform.getClient();await n.dispatch("replace-view",{target:this.identity,opts:{viewToReplace:e,newView:t}})},this.applyPreset=async e=>{this.wire.sendAction("layout-apply-preset").catch((e=>{}));const t=await this.platform.getClient(),{presetType:n}=e;if(!n||!(0,yi.isValidPresetType)(n))throw new Error("Cannot apply preset layout, please include an applicable presetType property in the PresetLayoutOptions.");await t.dispatch("apply-preset-layout",{target:this.identity,opts:{presetType:n}})};const n=(0,pi.validateIdentity)(e);if(n)throw new Error(n);this.identity=e,this.platform=this.fin.Platform.wrapSync({uuid:e.uuid}),e.uuid===this.fin.me.uuid&&e.name===this.fin.me.name&&(this.init=this.fin.Platform.Layout.init)}async getConfig(){this.wire.sendAction("layout-get-config").catch((e=>{}));return(await this.platform.getClient()).dispatch("get-frame-snapshot",{target:this.identity})}async getCurrentViews(){this.wire.sendAction("layout-get-views").catch((e=>{}));const e=await this.platform.getClient();return(await e.dispatch("get-layout-views",{target:this.identity})).map((e=>this.fin.View.wrapSync(e)))}async getRootItem(){this.wire.sendAction("layout-get-root-item").catch((()=>{}));const e=await li(this,di,"f").getValue(),t=await e.getRoot("layoutName"in this.identity?this.identity:void 0);return fi.LayoutNode.getEntity(t,e)}async getStackByViewIdentity(e){this.wire.sendAction("layout-get-stack-by-view").catch((()=>{}));const t=await li(this,di,"f").getValue(),n=await t.getStackByView(e);if(!n)throw new Error(`No stack found for view: ${e.uuid}/${e.name}`);return fi.LayoutNode.getEntity(n,t)}async addView(e,{location:t,targetView:n}={}){this.wire.sendAction("layout-add-view").catch((e=>{}));const{identity:i}=await li(this,ci,"m",hi).call(this,"layout-add-view",{viewOptions:e,location:t,targetView:n});return{identity:i}}async closeView(e){this.wire.sendAction("layout-close-view").catch((e=>{})),await li(this,ci,"m",hi).call(this,"layout-close-view",{viewIdentity:e})}}Ln.Layout=mi,di=new WeakMap,ci=new WeakSet,hi=async function(e,t){return(await this.platform.getClient()).dispatch(e,{target:this.identity,opts:t})};var vi,Ci,bi,Ii,Ei,xi=s&&s.__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)},Ai=s&&s.__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};Object.defineProperty(kn,"__esModule",{value:!0}),kn.LayoutModule=void 0;const Pi=d,Mi=Ln,_i=ai;class Oi extends Pi.Base{constructor(){super(...arguments),vi.add(this),Ci.set(this,!1),bi.set(this,null),this.init=async(e={})=>{if(this.wire.sendAction("layout-init").catch((e=>{})),!this.wire.environment.layoutAllowedInContext(this.fin))throw new Error("Layout.init can only be called from a Window context.");if(xi(this,Ci,"f"))throw new Error("Layout.init was already called, please use Layout.create to add additional layouts.");"openfin"===this.wire.environment.type&&await this.fin.Platform.getCurrentSync().getClient(),Ai(this,Ci,!0,"f"),Ai(this,bi,await this.wire.environment.initLayoutManager(this.fin,this.wire,e),"f"),await this.wire.environment.applyLayoutSnapshot(this.fin,xi(this,bi,"f"),e);const t={name:this.fin.me.name,uuid:this.fin.me.uuid};if(!e.layoutManagerOverride){const e={layoutName:_i.DEFAULT_LAYOUT_KEY,...t};return xi(this,Ii,"f").call(this,e)}return this.wrapSync(t)},Ii.set(this,(e=>{const t="[Layout] You are using a deprecated property `layoutManager` - it will throw if you access it starting in v37.",n=new Proxy({},{get(e,n){throw console.warn(`[Layout-mgr-proxy] accessing ${n.toString()}`),new Error(t)}}),i=Object.assign(this.wrapSync(e),{layoutManager:n});return new Proxy(i,{get(e,n){if("layoutManager"===n)throw console.warn(`[Layout-proxy] accessing ${n.toString()}`),new Error(t);return e[n]}})})),this.getCurrentLayoutManagerSync=()=>xi(this,vi,"m",Ei).call(this,"fin.Platform.Layout.getCurrentLayoutManagerSync()"),this.create=async e=>this.wire.environment.createLayout(xi(this,vi,"m",Ei).call(this,"fin.Platform.Layout.create()"),e),this.destroy=async e=>this.wire.environment.destroyLayout(xi(this,vi,"m",Ei).call(this,"fin.Platform.Layout.destroy()"),e)}async wrap(e){return this.wire.sendAction("layout-wrap").catch((e=>{})),new Mi.Layout(e,this.wire)}wrapSync(e){return this.wire.sendAction("layout-wrap-sync").catch((e=>{})),new Mi.Layout(e,this.wire)}async getCurrent(){if(this.wire.sendAction("layout-get-current").catch((e=>{})),"openfin"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error("You are not in a Window context. Only Windows can have a Layout.");const{uuid:e,name:t}=this.fin.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction("layout-get-current-sync").catch((e=>{})),"openfin"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error("You are not in a Window context. Only Windows can have a Layout.");const{uuid:e,name:t}=this.fin.me;return this.wrapSync({uuid:e,name:t})}async getLayoutByViewIdentity(e){this.wire.sendAction("layout-get-by-view-identity").catch((()=>{}));let t=await this.wire.environment.getViewWindowIdentity(this.fin,e);t.identity&&(t=t.identity);try{const n=this.wrapSync(t),i=await Mi.Layout.getClient(n),r=await i.getLayoutIdentityForViewOrThrow(e);return this.wrapSync(r)}catch(n){if(!["No action registered at target for","getLayoutIdentityForViewOrThrow is not a function"].some((e=>n.message.includes(e))))throw n;if(t.uuid===t.name)throw new Error(`View identity ${JSON.stringify(e)} is not attached to any layout in provider window ${JSON.stringify(t)}.`);return this.wrapSync(t)}}}kn.LayoutModule=Oi,Ci=new WeakMap,bi=new WeakMap,Ii=new WeakMap,vi=new WeakSet,Ei=function(e){if(!xi(this,bi,"f"))throw new Error(`You must call init before using the API ${e}`);return xi(this,bi,"f")},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(kn,e),n(Ln,e)}(jn),Object.defineProperty(Pn,"__esModule",{value:!0}),Pn.PlatformModule=void 0;const Si=d,Ri=Mn,Fi=jn;class ji extends Si.Base{constructor(e,t){super(e),this._channel=t,this.Layout=new Fi.LayoutModule(this.wire)}async init(e){if(!fin.__internal_.isPlatform||fin.me.name!==fin.me.uuid)throw new Error("fin.Platform.init should only be called from a custom platform provider running in the main window of the application.");return this.wire.environment.initPlatform(this.fin,e)}async wrap(e){return this.wire.sendAction("platform-wrap").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}wrapSync(e){return this.wire.sendAction("platform-wrap-sync").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}async getCurrent(){return this.wire.sendAction("platform-get-current").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction("platform-get-current-sync").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}start(e){return this.wire.sendAction("platform-start").catch((e=>{})),new Promise((async(t,n)=>{try{const{uuid:n}=e,i=await this.fin.Application._create({...e,isPlatformController:!0});i.once("platform-api-ready",(()=>t(this.wrapSync({uuid:n})))),i._run({uuid:n})}catch(e){n(e)}}))}startFromManifest(e,t){return this.wire.sendAction("platform-start-from-manifest").catch((e=>{})),new Promise((async(n,i)=>{try{const i=await this.fin.Application._createFromManifest(e);i.once("platform-api-ready",(()=>n(this.wrapSync({uuid:i.identity.uuid})))),i._run(t)}catch(e){i(e)}}))}}Pn.PlatformModule=ji,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Pn,e),n(Mn,e)}(An);var ki={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getMe=e.getBaseMe=e.environmentUnsupportedMessage=void 0;const t=J(),n=un,i=ie(),r=rn;function o(e,t,n){return{...{isView:"view"===e,isWindow:"window"===e,isFrame:"iframe"===e,isExternal:"external connection"===e},uuid:t,name:n,entityType:e}}e.environmentUnsupportedMessage="You are not running in OpenFin.",e.getBaseMe=o,e.getMe=function(s){const{uuid:a,name:c,entityType:d}=s.me,h={setContext(){throw new Error(e.environmentUnsupportedMessage)},addContextHandler(){throw new Error(e.environmentUnsupportedMessage)},getContextGroups(){throw new Error(e.environmentUnsupportedMessage)},joinContextGroup(){throw new Error(e.environmentUnsupportedMessage)},removeFromContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getAllClientsInContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getInfoForContextGroup(){throw new Error(e.environmentUnsupportedMessage)}},l="Interop API has not been instantiated. Either connection has failed or you have not declared interop in your config.",u={setContext(){throw new Error(l)},addContextHandler(){throw new Error(l)},getContextGroups(){throw new Error(l)},joinContextGroup(){throw new Error(l)},removeFromContextGroup(){throw new Error(l)},getAllClientsInContextGroup(){throw new Error(l)},getInfoForContextGroup(){throw new Error(l)}},p={eventNames:()=>{throw new Error(e.environmentUnsupportedMessage)},emit:()=>{throw new Error(e.environmentUnsupportedMessage)},listeners:()=>{throw new Error(e.environmentUnsupportedMessage)},listenerCount:()=>{throw new Error(e.environmentUnsupportedMessage)},on:()=>{throw new Error(e.environmentUnsupportedMessage)},addListener:()=>{throw new Error(e.environmentUnsupportedMessage)},once:()=>{throw new Error(e.environmentUnsupportedMessage)},prependListener:()=>{throw new Error(e.environmentUnsupportedMessage)},prependOnceListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeAllListeners:()=>{throw new Error(e.environmentUnsupportedMessage)}};switch(d){case"view":return Object.assign(new t.View(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case"window":return Object.assign(new i._Window(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case"iframe":return Object.assign(new n._Frame(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case"external connection":return Object.assign(new r.ExternalApplication(s,{uuid:a}),o(d,a,c),{interop:u,isOpenFin:!1});default:return{...o(d,a,c),...p,interop:h,isOpenFin:!1}}}}(ki);var Li={},Ti={},$i={};Object.defineProperty($i,"__esModule",{value:!0}),$i.createWarningObject=$i.createUnusableObject=void 0,$i.createUnusableObject=function(e){const t=()=>{throw new Error(e)};return new Proxy({},{apply:t,construct:t,defineProperty:t,deleteProperty:t,get:t,getOwnPropertyDescriptor:t,getPrototypeOf:t,has:t,isExtensible:t,ownKeys:t,preventExtensions:t,set:t,setPrototypeOf:t})},$i.createWarningObject=function(e,t){return new Proxy(t,{get:(...t)=>(console.warn(e),Reflect.get(...t)),set:(...t)=>(console.warn(e),Reflect.set(...t)),getOwnPropertyDescriptor:(...t)=>(console.warn(e),Reflect.getOwnPropertyDescriptor(...t)),ownKeys:(...t)=>(console.warn(e),Reflect.ownKeys(...t))})};var Bi,Gi={},Wi={};var Hi={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.wrapIntentHandler=e.BROKER_ERRORS=e.generateOverrideWarning=e.generateOverrideError=e.wrapContextHandler=e.wrapInTryCatch=e.generateId=void 0;e.generateId=()=>`${Math.random()}${Date.now()}`;e.wrapInTryCatch=(e,t)=>(...n)=>{try{return e(...n)}catch(e){throw new Error((t||"")+e)}};e.wrapContextHandler=(e,t)=>async n=>{try{await e(n)}catch(e){throw console.error(`Error thrown by handler ${t} for context type ${n.type}: ${e}`),e}};e.generateOverrideError=(e,t)=>`You have tried to to use ${e} but ${t} has not been overridden in the Interop Broker. Please override this function. Refer to our documentation for more info.`;e.generateOverrideWarning=(e,t,n,i)=>{const{uuid:r,name:o}=n;return i?`Entity with identity: ${r}/${o} has called ${i} or ${e} but ${t} has not been overridden.`:`Entity with identity: ${r}/${o} has called ${e} but ${t} has not been overridden.`},e.BROKER_ERRORS={fireIntent:(0,e.generateOverrideError)("fireIntent","handleFiredIntent"),fireIntentForContext:(0,e.generateOverrideError)("fireIntentForContext","handleFiredIntentForContext"),getInfoForIntent:(0,e.generateOverrideError)("getInfoForIntent","handleInfoForIntent"),getInfoForIntentsByContext:(0,e.generateOverrideError)("getInfoForIntentsByContext","handleInfoForIntentsByContext"),joinSessionContextGroupWithJoinContextGroup:"The Context Group you have tried to join is a Session Context Group. Custom Context Groups can only be defined by the Interop Broker through code or manifest configuration. Please use joinSessionContextGroup.",fdc3Open:(0,e.generateOverrideError)("fdc3.open","fdc3HandleOpen"),fdc3FindInstances:(0,e.generateOverrideError)("fdc3.findInstances","fdc3HandleFindInstances"),fdc3GetAppMetadata:(0,e.generateOverrideError)("fdc3.getAppMetadata","fdc3HandleGetAppMetadata"),fdc3GetInfo:(0,e.generateOverrideError)("fdc3.getInfo","fdc3HandleGetInfo")};e.wrapIntentHandler=(e,t)=>async n=>{try{return e(n)}catch(e){throw console.error(`Error thrown by handler ${t}: ${e}`),e}}}(Hi);var Ni,Di,Ui={};function Vi(){if(Di)return Gi;Di=1;var e,t,n,r=s&&s.__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},o=s&&s.__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)},a=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Gi,"__esModule",{value:!0}),Gi.InteropBroker=void 0;const c=d,h=a(function(){if(Bi)return Wi;Bi=1,Object.defineProperty(Wi,"__esModule",{value:!0});const e=Cr();return Wi.default=class{constructor(e,t){this.provider=e,this.id=t,this.lastContext=void 0,this.contextGroupMap=new Map,this.clients=new Map,this.registerListeners()}registerListeners(){this.provider.register(`sessionContextGroup:getContext-${this.id}`,this.getCurrentContext.bind(this)),this.provider.register(`sessionContextGroup:setContext-${this.id}`,this.setContext.bind(this)),this.provider.register(`sessionContextGroup:handlerAdded-${this.id}`,this.handlerAdded.bind(this)),this.provider.register(`sessionContextGroup:handlerRemoved-${this.id}`,this.handlerRemoved.bind(this))}getCurrentContext(e){return e.type?this.contextGroupMap.get(e.type):this.lastContext}setContext(t,n){const{context:i}=t,r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name} not in Session Client State Map`);this.contextGroupMap.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{e.contextHandlers.get(i.type)?.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getClientState(e){return this.clients.get(e.endpointId)}async handlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(i){const e=r.contextHandlers.get(i)||[];r.contextHandlers.set(i,[...e,n]);const o=this.contextGroupMap.get(i);o&&await this.provider.dispatch(t,n,o)}else{r.globalHandler=n;const e=[...this.contextGroupMap.keys()].map((async e=>{const i=this.contextGroupMap.get(e);i&&await this.provider.dispatch(t,n,i)}));await Promise.all(e)}}handlerRemoved(e,t){const{handlerId:n}=e,i=this.clients.get(t.endpointId);i?(Array.from(i.contextHandlers).forEach((([,e])=>{const t=e.indexOf(n);t>-1&&e.splice(t,1)})),i.globalHandler===n&&(i.globalHandler=void 0)):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={contextHandlers:new Map,clientIdentity:e,globalHandler:void 0};this.clients.set(e.endpointId,t)}}onDisconnection(e){this.clients.delete(e.endpointId)}},Wi}()),l=Hi,u=a(i),p=function(){if(Ni)return Ui;Ni=1,Object.defineProperty(Ui,"__esModule",{value:!0}),Ui.PrivateChannelProvider=void 0;const e=Vi();return Ui.PrivateChannelProvider=class t{constructor(e,t){this.provider=e,this.id=t,this.clients=new Map,this.registerListeners(),this.contextByContextType=new Map,this.lastContext=void 0,this.provider.onConnection((e=>this.registerNewClient(e))),this.provider.onDisconnection((async e=>{const{endpointId:t}=e;this.clients.has(t)&&await this.handleClientDisconnecting(e),0===(await this.provider.getAllClientInfo()).length&&this.provider.destroy()}))}getClientState(e){return this.clients.get(e.endpointId)}registerListeners(){this.provider.register("broadcast",this.broadcast.bind(this)),this.provider.register("getCurrentContext",this.getCurrentContext.bind(this)),this.provider.register("contextHandlerAdded",this.contextHandlerAdded.bind(this)),this.provider.register("contextHandlerRemoved",this.contextHandlerRemoved.bind(this)),this.provider.register("nonStandardHandlerRemoved",this.nonStandardHandlerRemoved.bind(this)),this.provider.register("onAddContextHandlerAdded",this.onAddContextHandlerAdded.bind(this)),this.provider.register("onDisconnectHandlerAdded",this.onDisconnectHandlerAdded.bind(this)),this.provider.register("onUnsubscribeHandlerAdded",this.onUnsubscribeHandlerAdded.bind(this)),this.provider.register("clientDisconnecting",((e,t)=>{this.handleClientDisconnecting(t)}))}broadcast(t,n){const{context:i}=t;if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name}, tried to call broadcast, is not connected to this Private Channel`);const r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to broadcast - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);this.contextByContextType.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{const t=e.handlerIdsByContextTypes.get(i.type);t&&t.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getCurrentContext(e,t){const{contextType:n}=e;if(!this.getClientState(t))throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call getCurrentContext, is not connected to this Private Channel`);if(void 0!==n){return this.contextByContextType.get(n)||null}return this.lastContext?this.lastContext:null}contextHandlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call addContextListener, is not connected to this Private Channel`);if(i){const e=r.handlerIdsByContextTypes.get(i)||[];r.handlerIdsByContextTypes.set(i,[...e,n])}else r.globalHandler=n;Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&e.onAddContextListenerHandlerId&&this.provider.dispatch(e.clientIdentity,e.onAddContextListenerHandlerId,i)}))}async contextHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);if(i){let e;if(i.globalHandler===n)i.globalHandler=void 0;else for(const[t,r]of i.handlerIdsByContextTypes){const i=r.indexOf(n);i>-1&&(r.splice(i,1),e=t)}const r=(await this.getConnectedClients()).map((async n=>{const{clientIdentity:i,clientIdentity:{endpointId:r},onUnsubscribeHandlerId:o}=n;r!==t.endpointId&&o&&await this.provider.dispatch(i,o,e)}));try{await Promise.all(r)}catch(e){throw console.error(`Problem when attempting to dispatch to onUnsubscribeHandlers. Error: ${e} Removing Client: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}`),new Error(e)}}else console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}.`)}nonStandardHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);i?i.onDisconnectHandlerId===n?i.onDisconnectHandlerId=void 0:i.onAddContextListenerHandlerId===n?i.onAddContextListenerHandlerId=void 0:i.onUnsubscribeHandlerId===n&&(i.onUnsubscribeHandlerId=void 0):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}onAddContextHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onAddContextListener, is not connected to this Private Channel`);n.onAddContextListenerHandlerId=i,Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&Array.from(e.handlerIdsByContextTypes.keys()).forEach((e=>{this.provider.dispatch(t,i,e)}))}))}onDisconnectHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onDisconnect, is not connected to this Private Channel`);n.onDisconnectHandlerId=i}onUnsubscribeHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onUnsubscribe, is not connected to this Private Channel`);n.onUnsubscribeHandlerId=i}removeClient(e){const t=this.getClientState(e);if(!t)throw new Error(`Client with Identity: ${e.uuid} ${e.name}, tried to call disconnect, is not connected to this Private Channel`);t.handlerIdsByContextTypes.clear(),this.clients.delete(e.endpointId)}async fireOnDisconnectForOtherClients(e){const{endpointId:t}=e,n=(await this.getConnectedClients()).map((async e=>{const{clientIdentity:{endpointId:n},onDisconnectHandlerId:i}=e;n!==t&&i&&await this.provider.dispatch(e.clientIdentity,i)}));try{await Promise.all(n)}catch(t){throw console.error(`Problem when attempting to dispatch to onDisconnectHandlers. Error: ${t} Disconnecting Client: uuid: ${e.uuid}. name: ${e.name}. endpointId: ${e.endpointId}`),new Error(t)}}async unsubscribeAll(e){const{endpointId:t}=e,n=this.clients.get(t);if(n){const t=Array.from(n.handlerIdsByContextTypes.values()).flat(),i=n.globalHandler;if(t.length>0){const n=t.map((async t=>this.contextHandlerRemoved({handlerId:t},e)));try{await Promise.all(n)}catch(e){console.error(e.message)}}if(i)try{await this.contextHandlerRemoved({handlerId:i},e)}catch(e){console.error(e.message)}}}async handleClientDisconnecting(e){await this.unsubscribeAll(e),this.removeClient(e),await this.fireOnDisconnectForOtherClients(e)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={clientIdentity:e,handlerIdsByContextTypes:new Map,globalHandler:void 0,onAddContextListenerHandlerId:void 0,onUnsubscribeHandlerId:void 0,onDisconnectHandlerId:void 0};this.clients.set(e.endpointId,t)}}async getConnectedClients(){const e=await this.provider.getAllClientInfo();return Array.from(this.clients.values()).filter((t=>{const{uuid:n,name:i}=t.clientIdentity;return e.some((e=>i===e.name&&n===e.uuid))}))}static init(e,n){return new t(e,n)}},Ui}(),w=G,y=[{id:"green",displayMetadata:{color:"#00CC88",name:"green"}},{id:"purple",displayMetadata:{color:"#8C61FF",name:"purple"}},{id:"orange",displayMetadata:{color:"#FF8C4C",name:"orange"}},{id:"red",displayMetadata:{color:"#FF5E60",name:"red"}},{id:"pink",displayMetadata:{color:"#FF8FB8",name:"pink"}},{id:"yellow",displayMetadata:{color:"#E9FF8F",name:"yellow"}}];let f=class i extends c.Base{constructor(i,s,a){super(i),e.set(this,void 0),t.set(this,void 0),n.set(this,void 0),this.getProvider=()=>o(this,n,"f").getValue(),this.interopClients=new Map,this.contextGroupsById=new Map,r(this,t,a.contextGroups??[...y],"f"),r(this,e,a.fdc3Info,"f"),a?.logging&&(this.logging=a.logging),this.intentClientMap=new Map,this.lastContextMap=new Map,this.sessionContextGroupMap=new Map,r(this,n,new w.Lazy(s),"f"),this.setContextGroupMap(),this.setupChannelProvider()}static createClosedConstructor(...e){return class extends i{constructor(...t){if(t.length){const[n,i,r]=t;if(r&&"object"==typeof r&&!(0,u.default)(r,e[2]))return console.warn("You have modified the parameters of the InteropOverride constructor. This behavior is deprecated and will be removed in a future version. You can modify these options in your manifest. Please consult our Interop docs for guidance on migrating to the new override scheme."),void super(e[0],e[1],r);console.warn("You are attempting to pass arguments to the InteropOverride constructor. This is not necessary, and these passed arguments will be ignored. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.")}super(...e)}}}setContext({context:e},t){this.wire.sendAction("interop-broker-set-context").catch((e=>{}));const n=this.getClientState(t);if(!n||!n.contextGroupId)throw n?new Error("You must join a context group before you can set context."):new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);{const{contextGroupId:t}=n;this.setContextForGroup({context:e},t)}}setContextForGroup({context:e},t){this.wire.sendAction("interop-broker-set-context-for-group").catch((e=>{}));const n=this.contextGroupsById.get(t);if(!n)throw new Error(`Unable to set context for context group that isn't in the context group mapping: ${t}.`);const r=i.checkContextIntegrity(e);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(e)}`);const o=e.type;n.set(o,e),this.lastContextMap.set(t,o);Array.from(this.interopClients.values()).filter((e=>e.contextGroupId===t)).forEach((t=>{for(const[,n]of t.contextHandlers)i.isContextTypeCompatible(o,n.contextType)&&this.invokeContextHandler(t.clientIdentity,n.handlerId,e)}))}getCurrentContext(e,t){this.wire.sendAction("interop-broker-get-current-context").catch((e=>{}));const n=this.getClientState(t);if(!n?.contextGroupId)throw new Error("You must be a member of a context group to call getCurrentContext");const{contextGroupId:i}=n,r=this.contextGroupsById.get(i),o=this.lastContextMap.get(i),s=e?.contextType??o;return r&&s?r.get(s):void 0}async joinContextGroup({contextGroupId:e,target:t},n){if(this.wire.sendAction("interop-broker-join-context-group").catch((e=>{})),this.sessionContextGroupMap.has(e))throw new Error(l.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup);if(t){i.hasEndpointId(t)&&await this.addClientToContextGroup({contextGroupId:e},t);try{const n=this.channel.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name));if(!n.length)throw new Error(`Given Identity ${t.uuid} ${t.name} is not connected to the Interop Broker.`);n.length>1&&console.warn(`More than one connection found for identity ${t.uuid} ${t.name}`);const i=[];for(const t of n)i.push(this.addClientToContextGroup({contextGroupId:e},t));await Promise.all(i)}catch(e){throw new Error(e)}}else await this.addClientToContextGroup({contextGroupId:e},n)}async addClientToContextGroup({contextGroupId:e},t){this.wire.sendAction("interop-broker-add-client-to-context-group").catch((e=>{}));const n=this.getClientState(t);if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(!this.getContextGroups().find((t=>t.id===e)))throw new Error(`Attempting to join a context group that does not exist: ${e}. You may only join existing context groups.`);if(n.contextGroupId!==e){n.contextGroupId=e,await this.setCurrentContextGroupInClientOptions(t,e);const i=this.contextGroupsById.get(e);for(const[,e]of n.contextHandlers){const{contextType:n,handlerId:r}=e;if(void 0===n)i.forEach(((e,n)=>{this.invokeContextHandler(t,r,e)}));else if(i.has(n)){const e=i.get(n);e&&this.invokeContextHandler(t,r,e)}}}}async removeFromContextGroup({target:e},t){if(this.wire.sendAction("interop-broker-remove-from-context-group").catch((e=>{})),e){i.hasEndpointId(e)&&await this.removeClientFromContextGroup(e);try{const t=this.channel.connections.filter((t=>t.uuid===e.uuid&&t.name===e.name));if(!t.length)throw new Error(`No connection found for given Identity ${e.uuid} ${e.name}`);t.length>1&&console.warn(`More than one connection found for identity ${e.uuid} ${e.name}`);const n=[];for(const e of t)n.push(this.removeClientFromContextGroup(e));await Promise.all(n)}catch(e){throw new Error(e)}}else await this.removeClientFromContextGroup(t)}async removeClientFromContextGroup(e){this.wire.sendAction("interop-broker-remove-client-from-context-group").catch((e=>{}));const t=this.getClientState(e);t&&(t.contextGroupId=void 0),await this.setCurrentContextGroupInClientOptions(e,null)}getContextGroups(){return this.wire.sendAction("interop-broker-get-context-groups").catch((e=>{})),o(this,t,"f").map((e=>({...e})))}getInfoForContextGroup({contextGroupId:e}){return this.wire.sendAction("interop-broker-get-info-for-context-group").catch((e=>{})),this.getContextGroups().find((t=>t.id===e))}getAllClientsInContextGroup({contextGroupId:e}){this.wire.sendAction("interop-broker-get-all-clients-in-context-group").catch((e=>{}));return Array.from(this.interopClients.values()).filter((t=>t.contextGroupId===e)).map((e=>e.clientIdentity))}async handleFiredIntent(e,t){const n=(0,l.generateOverrideWarning)("fdc3.raiseIntent","InteropBroker.handleFiredIntent",t,"interopClient.fireIntent");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntent)}async setIntentTarget(e,t){this.wire.sendAction("interop-broker-set-intent-target").catch((e=>{}));const n=this.intentClientMap.get(t.name),i=`intent-handler-${e.name}`;if(n){const t=n.get(i);if(t){if(t.pendingIntents.push(e),t.clientIdentity&&t.isReady){const{clientIdentity:e,pendingIntents:n}=t;try{const r=n[n.length-1];await this.invokeIntentHandler(e,i,r),t.pendingIntents=[]}catch(n){console.error(`Error invoking intent handler for client ${e.uuid}/${e.name}/${e.endpointId}`),t.isReady=!1}}}else n.set(i,{isReady:!1,pendingIntents:[e]})}else{this.intentClientMap.set(t.name,new Map);const n=this.intentClientMap.get(t.name);n&&n.set(i,{isReady:!1,pendingIntents:[e]})}}async handleInfoForIntent(e,t){const n=(0,l.generateOverrideWarning)("fdc3.findIntent","InteropBroker.handleInfoForIntent",t,"interopClient.getInfoForIntent");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntent)}async handleInfoForIntentsByContext(e,t){const n=(0,l.generateOverrideWarning)("fdc3.findIntentsByContext","InteropBroker.handleInfoForIntentsByContext",t,"interopClient.getInfoForIntentsByContext");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntentsByContext)}async handleFiredIntentForContext(e,t){const n=(0,l.generateOverrideWarning)("fdc3.raiseIntentForContext","InteropBroker.handleFiredIntentForContext",t,"interopClient.fireIntentForContext");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntentForContext)}async clientDisconnected(e){}async fdc3HandleOpen({app:e,context:t},n){const i=(0,l.generateOverrideWarning)("fdc3.open","InteropBroker.fdc3HandleOpen",n);throw console.warn(i),new Error(l.BROKER_ERRORS.fdc3Open)}async fdc3HandleFindInstances(e,t){const n=(0,l.generateOverrideWarning)("fdc3.open","InteropBroker.fdc3HandleFindInstances",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3FindInstances)}async fdc3HandleGetAppMetadata(e,t){const n=(0,l.generateOverrideWarning)("fdc3.getAppMetadata","InteropBroker.fdc3HandleGetAppMetadata",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3GetAppMetadata)}async invokeContextHandler(e,t,n){const i=await this.getProvider();try{await i.dispatch(e,t,n)}catch(i){console.error(`Error invoking context handler ${t} for context type ${n.type} in client ${e.uuid}/${e.name}/${e.endpointId}`,i)}}async invokeIntentHandler(e,t,n){const i=await this.getProvider();await i.dispatch(e,t,n)}async fdc3HandleGetInfo(t,n){const{fdc3Version:i}=t;return{fdc3Version:i,...o(this,e,"f"),optionalFeatures:{OriginatingAppMetadata:!1,UserChannelMembershipAPIs:!0},appMetadata:{appId:"",instanceId:""}}}async getAllClientInfo(){return(await this.getProvider()).getAllClientInfo()}decorateSnapshot(e){return{...e,interopSnapshotDetails:{contextGroupStates:this.getContextGroupStates()}}}applySnapshot(e,t){const n=e?.interopSnapshotDetails?.contextGroupStates;n&&(t?.closeExistingWindows||this.updateExistingClients(n),this.rehydrateContextGroupStates(n))}updateExistingClients(e){this.interopClients.forEach((t=>{const{clientIdentity:n,contextGroupId:r,contextHandlers:o}=t;if(r){const t=e[r];for(const[,e]of Object.entries(t))o.forEach((t=>{const{handlerId:r,contextType:o}=t;i.isContextTypeCompatible(e.type,o)&&this.invokeContextHandler(n,r,e)}))}}))}getContextGroupStates(){return i.toObject(this.contextGroupsById)}rehydrateContextGroupStates(e){const t=Object.entries(e);for(const[e,n]of t){const t=Object.entries(n);for(const[n,i]of t)if(this.contextGroupsById.has(e)){this.contextGroupsById.get(e).set(n,i)}else console.warn(`Attempting to set a context group that isn't in the context group mapping. Skipping context group rehydration for: ${e}`)}}contextHandlerRegistered({contextType:e,handlerId:t},n){const i={contextType:e,handlerId:t},r=this.getClientState(n);if(r?.contextHandlers.set(t,i),r&&r.contextGroupId){const{contextGroupId:i}=r,o=this.contextGroupsById.get(i);if(void 0===e)o.forEach(((e,i)=>{this.invokeContextHandler(n,t,e)}));else if(o.has(e)){const i=o.get(e);i&&this.invokeContextHandler(n,t,i)}}}async intentHandlerRegistered(e,t){const{handlerId:n}=e,i=this.intentClientMap.get(t.name),r=i?.get(n);if(i)if(r){const{pendingIntents:e}=r;r.clientIdentity=t,r.isReady=!0;try{if(e.length>0){const i=e[e.length-1];await this.invokeIntentHandler(t,n,i),r.pendingIntents=[]}}catch(e){console.error(`Error invoking intent handler: ${n} for client ${t.uuid}/${t.name}/${t.endpointId}`)}}else i.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t});else{this.intentClientMap.set(t.name,new Map);const e=this.intentClientMap.get(t.name);e&&e.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t})}}removeContextHandler({handlerId:e},t){const n=this.getClientState(t);n&&n.contextHandlers.delete(e)}handleJoinSessionContextGroup({sessionContextGroupId:e},t){try{if(!e)throw new Error("Failed to join session context group: must specify group id.");const n=this.sessionContextGroupMap.get(e);if(n)n.registerNewClient(t);else{const n=new h.default(this.channel,e);n.registerNewClient(t),this.sessionContextGroupMap.set(e,n)}return{hasConflict:this.contextGroupsById.has(e)}}catch(e){throw new Error(e)}}getClientState(e){return this.interopClients.get(e.endpointId)}static toObject(e){const t=Object.fromEntries(e),n={};return Object.entries(t).forEach((([e,t])=>{const i=Object.fromEntries(t);n[e]=i})),n}static checkContextIntegrity(e){if(!e)return{isValid:!1,reason:"No context supplied"};if("object"!=typeof e)return{isValid:!1,reason:"Context must be an Object"};if(!e.type)return{isValid:!1,reason:"Context must have a type property"};if(e.id&&"object"!=typeof e.id)return{isValid:!1,reason:"Context id must be an Object populated with key-value identifiers (if set)"};if(e.id){const{id:t}=e,n=Object.keys(t);let i=!1;if(!n.length)return{isValid:!1,reason:"Context id must have at least one key-value identifier"};if(n.forEach((e=>{"string"==typeof e&&"string"==typeof t[e]||(i=!0)})),i)return{isValid:!1,reason:"Context id key-value identifiers must be of type string"}}return e.name&&"string"!=typeof e.name?{isValid:!1,reason:"Context name must be of string type (if set)"}:{isValid:!0}}static hasEndpointId(e){return void 0!==e.endpointId}static isContextTypeCompatible(e,t){return void 0===t||e===t}setContextGroupMap(){for(const e of this.getContextGroups())this.contextGroupsById.set(e.id,new Map)}async setCurrentContextGroupInClientOptions(e,t){try{const n=await this.fin.System.getEntityInfo(e.uuid,e.name);let i;"view"===n.entityType?i=await this.fin.View.wrap(e):"window"===n.entityType&&(i=await this.fin.Window.wrap(e)),i&&await i.updateOptions({interop:{currentContextGroup:t}})}catch(e){}}async setupChannelProvider(){try{const e=await this.getProvider();this.channel=e,this.wireChannel(e)}catch(e){throw new Error(`Error setting up Interop Broker Channel Provider: ${e}`)}}wireChannel(e){e.onConnection((async(e,t)=>{if(!await this.isConnectionAuthorized(e,t))throw new Error(`Connection not authorized for ${e.uuid}, ${e.name}`);if(!e.endpointId)throw new Error("Version too old to be compatible with Interop. Please upgrade your runtime to a more recent version.");const n={contextGroupId:void 0,contextHandlers:new Map,clientIdentity:e};t?.currentContextGroup&&this.contextGroupsById.has(t.currentContextGroup)&&(n.contextGroupId=t?.currentContextGroup),this.interopClients.set(e.endpointId,n)})),e.onDisconnection((e=>{this.interopClients.delete(e.endpointId);const t=this.intentClientMap.get(e.name);t&&e.uuid===this.fin.me.uuid&&t.forEach((e=>{e.isReady=!1})),this.sessionContextGroupMap.forEach((t=>{t.onDisconnection(e)})),this.clientDisconnected(e)})),e.beforeAction((async(e,t,n)=>{if(!await this.isActionAuthorized(e,t,n))throw new Error(`Action (${e}) not authorized for ${n.uuid}, ${n.name}`);this.logging?.beforeAction?.enabled&&console.log(e,t,n)})),e.afterAction(((e,t,n)=>{this.logging?.afterAction?.enabled&&console.log(e,t,n)})),e.register("setContext",this.setContext.bind(this)),e.register("fireIntent",this.handleFiredIntent.bind(this)),e.register("getCurrentContext",this.getCurrentContext.bind(this)),e.register("getInfoForIntent",this.handleInfoForIntent.bind(this)),e.register("getInfoForIntentsByContext",this.handleInfoForIntentsByContext.bind(this)),e.register("fireIntentForContext",this.handleFiredIntentForContext.bind(this)),e.register("getContextGroups",this.getContextGroups.bind(this)),e.register("joinContextGroup",this.joinContextGroup.bind(this)),e.register("removeFromContextGroup",this.removeFromContextGroup.bind(this)),e.register("getAllClientsInContextGroup",this.getAllClientsInContextGroup.bind(this)),e.register("getInfoForContextGroup",this.getInfoForContextGroup.bind(this)),e.register("contextHandlerRegistered",this.contextHandlerRegistered.bind(this)),e.register("intentHandlerRegistered",this.intentHandlerRegistered.bind(this)),e.register("removeContextHandler",this.removeContextHandler.bind(this)),e.register("sessionContextGroup:createIfNeeded",this.handleJoinSessionContextGroup.bind(this)),e.register("fdc3Open",this.fdc3HandleOpen.bind(this)),e.register("fdc3v2FindIntentsByContext",this.handleInfoForIntentsByContext.bind(this)),e.register("fdc3FindInstances",this.fdc3HandleFindInstances.bind(this)),e.register("fdc3GetAppMetadata",this.fdc3HandleGetAppMetadata.bind(this)),e.register("fdc3v2GetInfo",(async(e,t)=>this.fdc3HandleGetInfo.bind(this)(e,t))),e.register("createPrivateChannelProvider",(async e=>{const{channelId:t}=e,n=await this.fin.InterApplicationBus.Channel.create(t);p.PrivateChannelProvider.init(n,t)}))}isConnectionAuthorized(e,t){return this.wire.sendAction("interop-broker-is-connection-authorized").catch((e=>{})),Promise.resolve(!0)}isActionAuthorized(e,t,n){return this.wire.sendAction("interop-broker-is-action-authorized").catch((e=>{})),Promise.resolve(!0)}};return Gi.InteropBroker=f,e=new WeakMap,t=new WeakMap,n=new WeakMap,Gi}var zi,Ki={},qi={},Ji=s&&s.__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},Yi=s&&s.__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)};Object.defineProperty(qi,"__esModule",{value:!0});const Zi=d,Qi=Hi;class Xi extends Zi.Base{constructor(e,t,n){super(e),zi.set(this,void 0),this.id=n,Ji(this,zi,t,"f")}async setContext(e){this.wire.sendAction("interop-session-context-group-set-context").catch((e=>{}));return(await Yi(this,zi,"f")).dispatch(`sessionContextGroup:setContext-${this.id}`,{sessionContextGroupId:this.id,context:e})}async getCurrentContext(e){this.wire.sendAction("interop-session-context-group-get-context").catch((e=>{}));return(await Yi(this,zi,"f")).dispatch(`sessionContextGroup:getContext-${this.id}`,{sessionContextGroupId:this.id,type:e})}async addContextHandler(e,t){if(this.wire.sendAction("interop-session-context-group-add-handler").catch((e=>{})),"function"!=typeof e)throw new Error("Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");const n=await Yi(this,zi,"f");let i;return i=t?`sessionContextHandler:invoke-${this.id}-${t}-${(0,Qi.generateId)()}`:`sessionContextHandler:invoke-${this.id}`,n.register(i,(0,Qi.wrapContextHandler)(e,i)),await n.dispatch(`sessionContextGroup:handlerAdded-${this.id}`,{handlerId:i,contextType:t}),{unsubscribe:await this.createUnsubscribeCb(i)}}async createUnsubscribeCb(e){const t=await Yi(this,zi,"f");return async()=>{t.remove(e),await t.dispatch(`sessionContextGroup:handlerRemoved-${this.id}`,{handlerId:e})}}getUserInstance(){return{id:this.id,setContext:(0,Qi.wrapInTryCatch)(this.setContext.bind(this),"Failed to set context: "),getCurrentContext:(0,Qi.wrapInTryCatch)(this.getCurrentContext.bind(this),"Failed to get context: "),addContextHandler:(0,Qi.wrapInTryCatch)(this.addContextHandler.bind(this),"Failed to add context handler: ")}}}qi.default=Xi,zi=new WeakMap;var er={},tr={},nr={},ir={},rr=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),or=s&&s.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),sr=s&&s.__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)&&rr(t,e,n);return or(t,e),t};Object.defineProperty(ir,"__esModule",{value:!0}),ir.PrivateChannelClient=void 0;const ar=sr(Hi);var cr,dr;function hr(){if(cr)return tr;cr=1;var e,t=s&&s.__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)},n=s&&s.__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},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(tr,"__esModule",{value:!0}),tr.FDC3ModuleBase=void 0;const o=nr,a=Hi,c=wr(),d=r(i);return tr.FDC3ModuleBase=class{get client(){return t(this,e,"f").call(this)}get fin(){return this.wire.getFin()}constructor(t,i){this.wire=i,e.set(this,void 0),n(this,e,t,"f")}async broadcast(e){return this.wire.sendAction("fdc3-broadcast").catch((e=>{})),this.client.setContext(e)}async _open(e,t){this.wire.sendAction("fdc3-open").catch((e=>{}));try{return await c.InteropClient.ferryFdc3Call(this.client,"fdc3Open",{app:e,context:t})}catch(e){const t=e.message===a.BROKER_ERRORS.fdc3Open?"ResolverUnavailable":e.message;throw new Error(t)}}async _getChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:"system",...(0,o.getUnsupportedChannelApis)()})))}async getOrCreateChannel(e){this.wire.sendAction("fdc3-get-or-create-channel").catch((e=>{}));const t=(await this._getChannels()).find((t=>t.id===e));if(t)return{...t,type:"system",...(0,o.getUnsupportedChannelApis)()};try{const t=await this.client.joinSessionContextGroup(e);return(0,o.buildAppChannelObject)(t)}catch(e){throw console.error(e.message),new Error(o.ChannelError.CreationFailed)}}async getSystemChannels(){return this.wire.sendAction("fdc3-get-system-channels").catch((e=>{})),this._getChannels()}async joinChannel(e){this.wire.sendAction("fdc3-join-channel").catch((e=>{}));try{return await this.client.joinContextGroup(e)}catch(e){if(e.message===a.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup?console.error("The Channel you have tried to join is an App Channel. Custom Channels can only be defined by the Interop Broker through code or manifest configuration. Please use getOrCreateChannel."):console.error(e.message),e.message.startsWith("Attempting to join a context group that does not exist"))throw new Error(o.ChannelError.NoChannelFound);throw new Error(o.ChannelError.AccessDenied)}}async getCurrentChannel(){this.wire.sendAction("fdc3-get-current-channel").catch((e=>{}));const e=await this.getCurrentContextGroupInfo();return e?this.buildChannelObject(e):null}async leaveCurrentChannel(){return this.wire.sendAction("fdc3-leave-current-channel").catch((e=>{})),this.client.removeFromContextGroup()}async getCurrentContextGroupInfo(){const e=await this.client.getContextGroups(),t=e.map((async e=>this.client.getAllClientsInContextGroup(e.id))),n=(await Promise.all(t)).findIndex((e=>e.some((e=>{const{uuid:t,name:n}=e;return this.wire.me.uuid===t&&this.wire.me.name===n}))));return e[n]}async buildChannelObject(e){return{...e,type:"system",addContextListener:(...[e,t])=>{let n,i;"function"==typeof e?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),n=e):(n=t,"string"==typeof e&&(i=e));const r=(async()=>{let e=!0;const t=await this.client.getCurrentContext(i);return this.client.addContextHandler(((i,r)=>{if(!e||(e=!1,!(0,d.default)(t,i)))return n(i,r)}),i)})();return{...r,unsubscribe:()=>r.then((e=>e.unsubscribe()))}},broadcast:this.broadcast.bind(this),getCurrentContext:async e=>{const t=await this.client.getCurrentContext(e);return void 0===t?null:t}}}},e=new WeakMap,tr}ir.PrivateChannelClient=class{constructor(e,t){this.id=t,this.client=e,this.listeners=new Map}async broadcast(e){return this.client.dispatch("broadcast",{context:e})}async getCurrentContext(e){return this.client.dispatch("getCurrentContext",{contextType:e})}async addContextListener(e,t){if("function"!=typeof t)throw new Error("Non-function argument passed to the second parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");let n;n=e?`contextHandler:invoke-${this.id}-${e}-${ar.generateId()}`:`contextHandler:invoke-${this.id}-${ar.generateId()}`,this.client.register(n,ar.wrapContextHandler(t,n));const i={unsubscribe:await this.createContextUnsubscribeCb(n)};return this.listeners.set(n,i),await this.client.dispatch("contextHandlerAdded",{handlerId:n,contextType:e}),i}createNonStandardUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch("nonStandardHandlerRemoved",{handlerId:e})}}createContextUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch("contextHandlerRemoved",{handlerId:e})}}onAddContextListener(e){const t=`onContextHandlerAdded:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch("onAddContextHandlerAdded",{handlerId:t}),n}onDisconnect(e){const t=`onDisconnect:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch("onDisconnectHandlerAdded",{handlerId:t}),n}onUnsubscribe(e){const t=`onUnsubscribe:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch("onUnsubscribeHandlerAdded",{handlerId:t}),n}async cleanUpAllSubs(){Array.from(this.listeners.keys()).forEach((e=>{this.client.remove(e),this.listeners.delete(e)}))}async disconnect(){try{await this.client.dispatch("clientDisconnecting"),await this.cleanUpAllSubs(),await this.client.disconnect()}catch(e){throw new Error(e.message)}}},function(e){var t=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.getIntentResolution=e.isChannel=e.isContext=e.connectPrivateChannel=e.buildAppChannelObject=e.buildPrivateChannelObject=e.ChannelError=e.ResultError=e.UnsupportedChannelApiError=e.getUnsupportedChannelApis=void 0;const n=Hi,r=ir,o=t(i);e.getUnsupportedChannelApis=e=>({addContextListener:()=>{throw new a("Channel.addContextListener",e)},broadcast:()=>{throw new a("Channel.broadcast",e)},getCurrentContext:()=>{throw new a("Channel.getCurrentContext",e)}});class a extends Error{constructor(e,t="System"){super(e),this.message=`Calling ${e} on an instance of a ${t} Channel returned by fdc3.get${t}Channels is not supported. If you would like to use a ${t} Channel, please use fdc3.joinChannel, fdc3.addContextListener, and fdc3.broadcast instead.`}}var c,d;e.UnsupportedChannelApiError=a,function(e){e.NoResultReturned="NoResultReturned",e.IntentHandlerRejected="IntentHandlerRejected"}(c=e.ResultError||(e.ResultError={})),(d=e.ChannelError||(e.ChannelError={})).NoChannelFound="NoChannelFound",d.AccessDenied="AccessDenied",d.CreationFailed="CreationFailed";e.buildPrivateChannelObject=e=>{let t=!1;const n=()=>{if(t)throw new Error("Private Channel Client has been disconnected from the Private Channel")};return{id:e.id,type:"private",broadcast:async t=>(n(),e.broadcast(t)),getCurrentContext:async t=>(n(),e.getCurrentContext(t)),addContextListener:async(t,i)=>{n();let r=i,o=t;"function"==typeof t&&(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),r=t,o=null);return e.addContextListener(o,r)},onAddContextListener:t=>(n(),e.onAddContextListener(t)),disconnect:async()=>(n(),t=!0,e.disconnect()),onDisconnect:t=>(n(),e.onDisconnect(t)),onUnsubscribe:t=>(n(),e.onUnsubscribe(t))}};e.buildAppChannelObject=e=>({id:e.id,type:"app",broadcast:e.setContext,getCurrentContext:async t=>{const n=await e.getCurrentContext(t);return void 0===n?null:n},addContextListener:(t,n)=>{let i,r;"function"==typeof t?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),i=t):(i=n,"string"==typeof t&&(r=t));const s=(async()=>{let t=!0;const n=await e.getCurrentContext(r);return e.addContextHandler(((e,r)=>{if(!t||(t=!1,!(0,o.default)(n,e)))return i(e,r)}),r)})();return{...s,unsubscribe:()=>s.then((e=>e.unsubscribe()))}}});e.connectPrivateChannel=async t=>{try{const n=await fin.InterApplicationBus.Channel.connect(t),i=new r.PrivateChannelClient(n,t);return(0,e.buildPrivateChannelObject)(i)}catch(e){throw new Error(`Private Channel with id: ${t} doesn't exist`)}};e.isContext=e=>{if(e&&"object"==typeof e&&"type"in e){const{type:t}=e;return"string"==typeof t}return!1};e.isChannel=e=>{if(e&&"object"==typeof e&&"type"in e&&"id"in e){const{type:t,id:n}=e;return"string"==typeof t&&"string"==typeof n&&("app"===t||"private"===t)}return!1};e.getIntentResolution=async(t,i,r,o)=>{const s=(0,n.generateId)(),a=new Promise(((e,t)=>{fin.InterApplicationBus.subscribe({uuid:"*"},s,(t=>{e(t)})).catch((()=>t(new Error("getResult is not supported in this environment"))))})),d=r?{target:r,intentResolutionResultId:s}:{intentResolutionResultId:s},h=o?{name:o,context:i,metadata:d}:{...i,metadata:d},l=async()=>{let n=await a;if(!n||"object"!=typeof n)throw new Error(c.NoResultReturned);const{error:i}=n;if(i)throw new Error(c.IntentHandlerRejected);if((0,e.isChannel)(n)){const{id:i,type:r}=n;switch(r){case"private":n=await(0,e.connectPrivateChannel)(i);break;case"app":{const r=await t.joinSessionContextGroup(i);n=(0,e.buildAppChannelObject)(r);break}}}else if(!(0,e.isContext)(n))throw new Error(c.NoResultReturned);return n},u=o?await t.fireIntent(h):await t.fireIntentForContext(h);return"object"!=typeof u?{source:{appId:"",instanceId:""},intent:"",version:"2.0",getResult:l}:{...u,getResult:l}}}(nr);var lr,ur,pr={};function wr(){if(ur)return Ki;ur=1;var e,t,n=s&&s.__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},i=s&&s.__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)},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ki,"__esModule",{value:!0}),Ki.InteropClient=void 0;const o=d,a=r(qi),c=function(){if(dr)return er;dr=1,Object.defineProperty(er,"__esModule",{value:!0}),er.Fdc3Module=void 0;const e=Hi,t=hr();class n extends t.FDC3ModuleBase{async open(e,t){await super._open(e,t)}addContextListener(e,t){let n;return this.wire.sendAction("fdc3-add-context-listener").catch((e=>{})),"function"==typeof e?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),n=this.client.addContextHandler(e)):n=this.client.addContextHandler(t,null===e?void 0:e),{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}addIntentListener(e,t){this.wire.sendAction("fdc3-add-intent-listener").catch((e=>{}));const n=this.client.registerIntentHandler((e=>{const{context:n,metadata:i}=e,{metadata:r}=n,o=i?.intentResolutionResultId||r?.intentResolutionResultId;o&&this.fin.InterApplicationBus.publish(o,null).catch((()=>null)),t(e.context)}),e,{fdc3Version:"1.2"});return{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}async raiseIntent(t,n,i){this.wire.sendAction("fdc3-raise-intent").catch((e=>{}));const r=i?{name:t,context:n,metadata:{target:i}}:{name:t,context:n};try{return await this.client.fireIntent(r)}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntent?"ResolverUnavailable":t.message;throw new Error(n)}}async findIntent(t,n){this.wire.sendAction("fdc3-find-intent").catch((e=>{}));try{return await this.client.getInfoForIntent({name:t,context:n})}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntent?"ResolverUnavailable":t.message;throw new Error(n)}}async findIntentsByContext(t){this.wire.sendAction("fdc3-find-intents-by-context").catch((e=>{}));try{return await this.client.getInfoForIntentsByContext(t)}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntentsByContext?"ResolverUnavailable":t.message;throw new Error(n)}}async raiseIntentForContext(t,n){this.wire.sendAction("fdc3-raise-intent-for-context").catch((e=>{}));try{return await this.client.fireIntentForContext({...t,metadata:{target:n}})}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntentForContext?"ResolverUnavailable":t.message;throw new Error(n)}}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}getInfo(){return this.wire.sendAction("fdc3-get-info").catch((e=>{})),{providerVersion:this.wire.environment.getAdapterVersionSync(),provider:`openfin-${this.wire.me.uuid}`,fdc3Version:"1.2"}}}return er.Fdc3Module=n,er}(),h=function(){if(lr)return pr;lr=1,Object.defineProperty(pr,"__esModule",{value:!0}),pr.Fdc3Module2=void 0;const e=hr(),t=Hi,n=wr(),i=nr,r=ir;class o extends e.FDC3ModuleBase{async open(e,t){return"string"==typeof e&&console.warn("Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string })."),super._open(e,t)}async findInstances(e){this.wire.sendAction("fdc3-find-instances").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,"fdc3FindInstances",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3FindInstances?"ResolverUnavailable":e.message;throw new Error(n)}}async getAppMetadata(e){this.wire.sendAction("fdc3-get-app-metadata").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,"fdc3GetAppMetadata",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3GetAppMetadata?"ResolverUnavailable":e.message;throw new Error(n)}}async addContextListener(e,t){this.wire.sendAction("fdc3-add-context-listener").catch((e=>{}));const n=e=>t=>{const{contextMetadata:n,...i}=t,r=n?[{...i},n]:[t,null];e(...r)};let i=t,r=n(i);return"function"==typeof e?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),i=e,r=n(i),this.client.addContextHandler(r)):this.client.addContextHandler(r,null===e?void 0:e)}async findIntent(e,n,i){this.wire.sendAction("fdc3-find-intent").catch((e=>{}));try{return await this.client.getInfoForIntent({name:e,context:n,metadata:{resultType:i}})}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntent?"ResolverUnavailable":e.message;throw new Error(n)}}async findIntentsByContext(e,i){this.wire.sendAction("fdc3-find-intents-by-context").catch((e=>{}));const r=i?{context:e,metadata:{resultType:i}}:e;try{return await n.InteropClient.ferryFdc3Call(this.client,"fdc3v2FindIntentsByContext",r)}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntentsByContext?"ResolverUnavailable":e.message;throw new Error(n)}}async raiseIntent(e,n,r){this.wire.sendAction("fdc3-raise-intent").catch((e=>{}));try{return"string"==typeof r&&console.warn("Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string })."),(0,i.getIntentResolution)(this.client,n,r,e)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?"ResolverUnavailable":e.message;throw new Error(n)}}async raiseIntentForContext(e,n){this.wire.sendAction("fdc3-raise-intent-for-context").catch((e=>{}));try{return"string"==typeof n&&console.warn("Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string })."),(0,i.getIntentResolution)(this.client,e,n)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?"ResolverUnavailable":e.message;throw new Error(n)}}async addIntentListener(e,t){if(this.wire.sendAction("fdc3-add-intent-listener").catch((e=>{})),"string"!=typeof e)throw new Error("First argument must be an Intent name");return this.client.registerIntentHandler((async e=>{let n,i;const{context:r,metadata:o}=e,{contextMetadata:s,metadata:a,...c}=r,d=o?.intentResolutionResultId||a?.intentResolutionResultId;try{const e=a?{metadata:a,...c}:{...c};n=await t(e,s),i=n}catch(e){n=e,i={error:!0}}if(d&&this.fin.InterApplicationBus.publish(d,i).catch((()=>null)),n instanceof Error)throw new Error(n.message);return n}),e,{fdc3Version:"2.0"})}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}async createPrivateChannel(){const e=(0,t.generateId)();await n.InteropClient.ferryFdc3Call(this.client,"createPrivateChannelProvider",{channelId:e});const o=await this.fin.InterApplicationBus.Channel.connect(e),s=new r.PrivateChannelClient(o,e);return(0,i.buildPrivateChannelObject)(s)}async getUserChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:"user",...(0,i.getUnsupportedChannelApis)("User")})))}async getSystemChannels(){return console.warn("This API has been deprecated. Please use fdc3.getUserChannels instead."),super.getSystemChannels()}async joinUserChannel(e){return super.joinChannel(e)}async joinChannel(e){return console.warn("This API has been deprecated. Please use fdc3.joinUserChannel instead."),super.joinChannel(e)}async getCurrentChannel(){const e=await super.getCurrentChannel();return e?{...e,type:"user",broadcast:this.broadcast.bind(this)}:null}async getInfo(){return n.InteropClient.ferryFdc3Call(this.client,"fdc3v2GetInfo",{fdc3Version:"2.0"})}}return pr.Fdc3Module2=o,pr}(),l=Hi;let u=class extends o.Base{constructor(i,r){super(i),e.set(this,void 0),t.set(this,void 0),n(this,t,new Map,"f"),n(this,e,r,"f")}async setContext(t){this.wire.sendAction("interop-client-set-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("setContext",{context:t})}async addContextHandler(t,n){if(this.wire.sendAction("interop-client-add-context-handler").catch((e=>{})),"function"!=typeof t)throw new Error("Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");const r=await i(this,e,"f");let o;o=n?`invokeContextHandler-${n}-${(0,l.generateId)()}`:"invokeContextHandler";const s=(0,l.wrapContextHandler)(t,o);return r.register(o,s),await r.dispatch("contextHandlerRegistered",{handlerId:o,contextType:n}),{unsubscribe:async()=>{r.remove(o),await r.dispatch("removeContextHandler",{handlerId:o})}}}async getContextGroups(){this.wire.sendAction("interop-client-get-context-groups").catch((e=>{}));return(await i(this,e,"f")).dispatch("getContextGroups")}async joinContextGroup(t,n){this.wire.sendAction("interop-client-join-context-group").catch((e=>{}));const r=await i(this,e,"f");if(!t)throw new Error("No contextGroupId specified for joinContextGroup.");return r.dispatch("joinContextGroup",{contextGroupId:t,target:n})}async removeFromContextGroup(t){this.wire.sendAction("interop-client-remove-from-context-group").catch((e=>{}));return(await i(this,e,"f")).dispatch("removeFromContextGroup",{target:t})}async getAllClientsInContextGroup(t){this.wire.sendAction("interop-client-get-all-clients-in-context-group").catch((e=>{}));const n=await i(this,e,"f");if(!t)throw new Error("No contextGroupId specified for getAllClientsInContextGroup.");return n.dispatch("getAllClientsInContextGroup",{contextGroupId:t})}async getInfoForContextGroup(t){this.wire.sendAction("interop-client-get-info-for-context-group").catch((e=>{}));const n=await i(this,e,"f");if(!t)throw new Error("No contextGroupId specified for getInfoForContextGroup.");return n.dispatch("getInfoForContextGroup",{contextGroupId:t})}async fireIntent(t){this.wire.sendAction("interop-client-fire-intent").catch((e=>{}));return(await i(this,e,"f")).dispatch("fireIntent",t)}async registerIntentHandler(t,n,r){this.wire.sendAction("interop-client-register-intent-handler").catch((e=>{}));const o=await i(this,e,"f"),s=`intent-handler-${n}`,a=(0,l.wrapIntentHandler)(t,s);try{await o.register(s,a),await o.dispatch("intentHandlerRegistered",{handlerId:s,...r})}catch(e){throw new Error("Unable to register intent handler")}return{unsubscribe:async()=>{o.remove(s)}}}async getCurrentContext(t){this.wire.sendAction("interop-client-get-current-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("getCurrentContext",{contextType:t})}async getInfoForIntent(t){this.wire.sendAction("interop-client-get-info-for-intent").catch((e=>{}));return(await i(this,e,"f")).dispatch("getInfoForIntent",t)}async getInfoForIntentsByContext(t){this.wire.sendAction("interop-client-get-info-for-intents-by-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("getInfoForIntentsByContext",t)}async fireIntentForContext(t){this.wire.sendAction("interop-client-fire-intent-for-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("fireIntentForContext",t)}async joinSessionContextGroup(n){try{const r=i(this,t,"f").get(n);if(r)return r.getUserInstance();const o=await i(this,e,"f"),{hasConflict:s}=await o.dispatch("sessionContextGroup:createIfNeeded",{sessionContextGroupId:n});s&&console.warn(`A (non-session) context group with the name "${n}" already exists. If you are trying to join a Context Group, call joinContextGroup instead.`);const c=new a.default(this.wire,i(this,e,"f"),n);return i(this,t,"f").set(n,c),c.getUserInstance()}catch(e){throw console.error(`Error thrown trying to create Session Context Group with id "${n}": ${e}`),e}}async onDisconnection(t){this.wire.sendAction("interop-client-add-ondisconnection-listener").catch((e=>{}));return(await i(this,e,"f")).onDisconnection((e=>{const{uuid:n}=e;t({type:"interop-broker",topic:"disconnected",brokerName:n})}))}getFDC3Sync(e){switch(e){case"1.2":return new c.Fdc3Module((()=>this),this.wire);case"2.0":return new h.Fdc3Module2((()=>this),this.wire);default:throw new Error(`Invalid FDC3 version provided: ${e}. Must be '1.2' or '2.0'`)}}async getFDC3(e){return this.getFDC3Sync(e)}static async ferryFdc3Call(t,n,r){return(await i(t,e,"f")).dispatch(n,r||null)}};return Ki.InteropClient=u,e=new WeakMap,t=new WeakMap,Ki}var yr,fr,gr,mr={};function vr(){if(yr)return mr;yr=1,Object.defineProperty(mr,"__esModule",{value:!0}),mr.overrideCheck=mr.checkFDC32Overrides=mr.getDefaultViewFdc3VersionFromAppInfo=void 0;const e=Vi();function t(t){return["fdc3HandleFindInstances","handleInfoForIntent","handleInfoForIntentsByContext","fdc3HandleGetAppMetadata","fdc3HandleGetInfo","fdc3HandleOpen","handleFiredIntent","handleFiredIntentForContext"].filter((n=>t[n]===e.InteropBroker.prototype[n]))}return mr.getDefaultViewFdc3VersionFromAppInfo=function({manifest:e,initialOptions:t}){const n=e?.platform?.defaultViewOptions?.fdc3InteropApi??t.defaultViewOptions?.fdc3InteropApi;return["1.2","2.0"].includes(n??"")?n:void 0},mr.checkFDC32Overrides=t,mr.overrideCheck=function(e,n){if(n&&"2.0"===n){const n=t(e);n.length>0&&console.warn(`WARNING: FDC3 2.0 has been set as a default option for Views in this Platform, but the required InteropBroker APIs for FDC3 2.0 compliance have not all been overridden.\nThe following APIs need to be overridden:\n${n.join("\n")}`)}},mr}function Cr(){return gr||(gr=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),i=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),i(function(){if(fr)return Ti;fr=1;var e=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ti,"__esModule",{value:!0}),Ti.InteropModule=void 0;const t=e(n),i=$i,r=d,o=Vi(),a=wr(),c=vr(),h=Tn,l=e=>new e,u="You have attempted to use or modify InteropBroker parameters, which is not allowed. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.";class p extends r.Base{async init(e,n=l){this.wire.sendAction("interop-init").catch((()=>{}));const r=await this.wire.environment.getInteropInfo(this.wire.getFin()),s=(0,i.createUnusableObject)(u),a=(0,i.createWarningObject)(u,(0,t.default)(r)),d=async()=>{throw new Error(u)},p=o.InteropBroker.createClosedConstructor(this.wire,(()=>this.fin.InterApplicationBus.Channel.create(`interop-broker-${e}`)),r);let w;return w=Array.isArray(n)?new((0,h.overrideFromComposables)(...n)(p))(s,d,a):await n(p,s,d,a),(0,c.overrideCheck)(w,r.fdc3Version),w}connectSync(e,t){return this.wire.sendAction("interop-connect-sync").catch((()=>{})),new a.InteropClient(this.wire,this.wire.environment.whenReady().then((()=>this.fin.InterApplicationBus.Channel.connect(`interop-broker-${e}`,{payload:t}))))}}return Ti.InteropModule=p,Ti}(),e),i(wr(),e),i(Vi(),e)}(Li)),Li}var br={},Ir={},Er={},xr={};Object.defineProperty(xr,"__esModule",{value:!0}),xr.getSnapshotSourceChannelName=void 0;xr.getSnapshotSourceChannelName=e=>`snapshot-source-provider-${e.uuid}`;var Ar,Pr,Mr,_r,Or,Sr=s&&s.__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},Rr=s&&s.__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)};Object.defineProperty(Er,"__esModule",{value:!0}),Er.SnapshotSource=void 0;const Fr=d,jr=xr,kr=new Map;class Lr extends Fr.Base{constructor(e,t){super(e),Ar.set(this,void 0),Pr.set(this,(()=>(kr.has(this.identity.uuid)||kr.set(this.identity.uuid,{eventFired:null,clientPromise:null}),kr.get(this.identity.uuid)))),Mr.set(this,(()=>(Rr(this,Pr,"f").call(this).clientPromise||(Rr(this,Pr,"f").call(this).clientPromise=Rr(this,_r,"f").call(this)),Rr(this,Pr,"f").call(this).clientPromise))),_r.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);try{Rr(this,Pr,"f").call(this).eventFired||await Rr(this,Or,"f").call(this);const t=await this.fin.InterApplicationBus.Channel.connect(e,{wait:!1});return t.onDisconnection((()=>{Rr(this,Pr,"f").call(this).clientPromise=null,Rr(this,Pr,"f").call(this).eventFired=null})),t}catch(e){throw Rr(this,Pr,"f").call(this).clientPromise=null,new Error("The targeted SnapshotSource is not currently initialized. Await this object's ready() method.")}})),Or.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);let t,n;const i=new Promise(((e,i)=>{t=e,n=i}));Rr(this,Pr,"f").call(this).eventFired=i;const r=async i=>{try{i.channelName===e&&(t(),await this.fin.InterApplicationBus.Channel.removeListener("connected",r))}catch(e){n(e)}};await this.fin.InterApplicationBus.Channel.on("connected",r)})),Sr(this,Ar,t,"f")}get identity(){return Rr(this,Ar,"f")}async ready(){this.wire.sendAction("snapshot-source-ready").catch((e=>{}));try{await Rr(this,Mr,"f").call(this)}catch(e){await Rr(this,Pr,"f").call(this).eventFired}}async getSnapshot(){this.wire.sendAction("snapshot-source-get-snapshot").catch((e=>{}));const e=await Rr(this,Mr,"f").call(this),t=await e.dispatch("get-snapshot");return(await t).snapshot}async applySnapshot(e){this.wire.sendAction("snapshot-source-apply-snapshot").catch((e=>{}));return(await Rr(this,Mr,"f").call(this)).dispatch("apply-snapshot",{snapshot:e})}}Er.SnapshotSource=Lr,Ar=new WeakMap,Pr=new WeakMap,Mr=new WeakMap,_r=new WeakMap,Or=new WeakMap,Object.defineProperty(Ir,"__esModule",{value:!0}),Ir.SnapshotSourceModule=void 0;const Tr=d,$r=Er,Br=xr;class Gr extends Tr.Base{async init(e){if(this.wire.sendAction("snapshot-source-init").catch((e=>{})),"object"!=typeof e||"function"!=typeof e.getSnapshot||"function"!=typeof e.applySnapshot)throw new Error("you must pass in a valid SnapshotProvider");const t=await this.fin.InterApplicationBus.Channel.create((0,Br.getSnapshotSourceChannelName)(this.fin.me));t.register("get-snapshot",(async()=>({snapshot:await e.getSnapshot()}))),t.register("apply-snapshot",(({snapshot:t})=>e.applySnapshot(t)))}wrapSync(e){return this.wire.sendAction("snapshot-source-wrap-sync").catch((e=>{})),new $r.SnapshotSource(this.wire,e)}async wrap(e){return this.wire.sendAction("snapshot-source-wrap").catch((e=>{})),this.wrapSync(e)}}Ir.SnapshotSourceModule=Gr,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Ir,e),n(Er,e)}(br),Object.defineProperty(a,"__esModule",{value:!0});var Wr=a.Fin=void 0;const Hr=t,Nr=c,Dr=ie(),Ur=Z(),Vr=de,zr=en,Kr=rn,qr=un,Jr=bn,Yr=J(),Zr=An,Qr=ki,Xr=Cr(),eo=br;class to extends Hr.EventEmitter{constructor(e){super(),this.wire=e,this.System=new Nr.System(e),this.Window=new Dr._WindowModule(e),this.Application=new Ur.ApplicationModule(e),this.InterApplicationBus=new Vr.InterApplicationBus(e),this.Clipboard=new zr.Clipboard(e),this.ExternalApplication=new Kr.ExternalApplicationModule(e),this.Frame=new qr._FrameModule(e),this.GlobalHotkey=new Jr.GlobalHotkey(e),this.Platform=new Zr.PlatformModule(e,this.InterApplicationBus.Channel),this.View=new Yr.ViewModule(e),this.Interop=new Xr.InteropModule(e),this.SnapshotSource=new eo.SnapshotSourceModule(e),e.registerFin(this),this.me=(0,Qr.getMe)(e),e.on("disconnected",(()=>{this.emit("disconnected")}))}}Wr=a.Fin=to;var no={},io={};function ro(e){return"string"==typeof e.manifestUrl}function oo(e){return ao(e)&&"string"==typeof e.address}function so(e){return oo(e)&&"string"==typeof e.token}function ao(e){return"string"==typeof e.uuid}function co(e){return e.runtime&&"string"==typeof e.runtime.version}function ho(e){return ao(e)&&co(e)}Object.defineProperty(io,"__esModule",{value:!0}),io.isInternalConnectConfig=io.isPortDiscoveryConfig=io.isNewConnectConfig=io.isConfigWithReceiver=io.isRemoteConfig=io.isExistingConnectConfig=io.isExternalConfig=void 0,io.isExternalConfig=ro,io.isExistingConnectConfig=oo,io.isRemoteConfig=so,io.isConfigWithReceiver=function(e){return"object"==typeof e.receiver&&so({...e,address:""})},io.isNewConnectConfig=ho,io.isPortDiscoveryConfig=function(e){return ro(e)&&co(e)||ho(e)},io.isInternalConnectConfig=function(e){return oo(e)||ho(e)};var lo={},uo={};Object.defineProperty(uo,"__esModule",{value:!0}),uo.EmitterMap=void 0;const po=t;function wo(e){return Buffer.from(e).toString("base64")}uo.EmitterMap=class{constructor(){this.storage=new Map}hashKeys(e){return e.map(wo).join("/")}getOrCreate(e){const t=this.hashKeys(e);return this.storage.has(t)||this.storage.set(t,new po.EventEmitter),this.storage.get(t)}has(e){return this.storage.has(this.hashKeys(e))}delete(e){const t=this.hashKeys(e);return this.storage.delete(t)}},Object.defineProperty(lo,"__esModule",{value:!0});const yo=uo;class fo extends yo.EmitterMap{constructor(){super(...arguments),this.dispatchEvent=e=>{if(function(e){return"process-desktop-event"===e.action}(e)){const{payload:t}=e,n=function(e){const{topic:t}=e;if("frame"===t||"window"===t||"view"===t){const{uuid:n,name:i}=e;return[t,n,i]}if("application"===t){const{uuid:n}=e;return[t,n]}return[t]}(t);if(this.has(n))return this.getOrCreate(n).emit(t.type,t),!0}return!1}}}lo.default=fo;var go,mo,vo=s&&s.__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},Co=s&&s.__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)},bo=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(no,"__esModule",{value:!0});var Io=no.Transport=void 0;const Eo=t,xo=io,Ao=g,Po=bo(lo),Mo=ki,_o=ke;class Oo extends Eo.EventEmitter{constructor(e,t,n){super(),this.wireListeners=new Map,this.topicRefMap=new Map,this.eventAggregator=new Po.default,this.messageHandlers=[this.eventAggregator.dispatchEvent],go.set(this,void 0),mo.set(this,void 0),this.connectSync=()=>{Co(this,go,"f").connectSync()},this.getPort=()=>Co(this,go,"f").getPort(),vo(this,go,new e(this.onmessage.bind(this)),"f"),this.environment=t,this.sendRaw=Co(this,go,"f").send.bind(Co(this,go,"f")),this.registerMessageHandler(this.handleMessage.bind(this)),Co(this,go,"f").on("disconnected",(()=>{for(const[,{handleNack:e}]of this.wireListeners)e({reason:"Remote connection has closed"});this.wireListeners.clear(),this.emit("disconnected")}));const{uuid:i,name:r}=n,o=this.environment.getCurrentEntityType();this.me=(0,Mo.getBaseMe)(o,i,r)}getFin(){if(!Co(this,mo,"f"))throw new Error("No Fin object registered for this transport");return Co(this,mo,"f")}registerFin(e){if(Co(this,mo,"f"))throw new Error("Fin object has already been registered for this transport");vo(this,mo,e,"f")}shutdown(){return Co(this,go,"f").shutdown()}async connect(e){if((0,xo.isConfigWithReceiver)(e))return await Co(this,go,"f").connect(e.receiver),this.authorize(e);if((0,xo.isRemoteConfig)(e))return this.connectRemote(e);if((0,xo.isExistingConnectConfig)(e))return this.connectByPort(e);if((0,xo.isNewConnectConfig)(e)){const t=await this.environment.retrievePort(e);return this.connectByPort({...e,address:`ws://localhost:${t}`})}}async connectRemote(e){return await Co(this,go,"f").connect(new(this.environment.getWsConstructor())(e.address)),this.authorize(e)}async connectByPort(e){const{address:t,uuid:n}=e,i={...e,type:"file-token"},r=Co(this,go,"f");await r.connect(new(this.environment.getWsConstructor())(e.address));const o=await this.sendAction("request-external-authorization",{uuid:n,type:"file-token"},!0);if("external-authorization-response"!==o.action)throw new Ao.UnexpectedActionError(o.action);return await this.environment.writeToken(o.payload.file,o.payload.token),this.authorize(i)}async authorize(e){const t=await this.sendAction("request-authorization",e,!0);if("authorization-response"!==t.action)throw new Ao.UnexpectedActionError(t.action);if(!0!==t.payload.success)throw new Ao.RuntimeError(t.payload)}sendAction(e,t={},n=!1){let i=()=>{};const r=Ao.RuntimeError.getCallSite(1),o=this.environment.getNextMessageId(),s=new Promise(((s,a)=>{i=a;const c={action:e,payload:t,messageId:o},d=Co(this,go,"f");return this.addWireListener(o,s,(e=>this.nackHandler(e,a,r)),n),d.send(c).catch(a)}));return Object.assign(s,{cancel:i,messageId:o})}nackHandler(e,t,n){t("string"==typeof e?e:new Ao.RuntimeError(e,n))}ferryAction(e){return new Promise(((t,n)=>{const i=this.environment.getNextMessageId();e.messageId=i;const r=e=>{t(e.payload)};return Co(this,go,"f").send(e).then((()=>this.addWireListener(i,r,(e=>this.nackHandler(e,n)),!1))).catch(n)}))}registerMessageHandler(e){this.messageHandlers.push(e)}addWireListener(e,t,n,i){i?this.uncorrelatedListener=t:this.wireListeners.has(e)?n({reason:"Duplicate handler id",error:(0,_o.errorToPOJO)(new Ao.DuplicateCorrelationError(String(e)))}):this.wireListeners.set(e,{resolve:t,handleNack:n})}onmessage(e){for(const t of this.messageHandlers)t.call(null,e)}handleMessage(e){const t=e.correlationId||NaN;if("correlationId"in e){if(!this.wireListeners.has(t))return!1;{const{resolve:n,handleNack:i}=this.wireListeners.get(t);"ack"!==e.action?i({reason:"Did not receive ack action",error:(0,_o.errorToPOJO)(new Ao.NoAckError(e.action))}):"payload"in e?e.payload.success?n.call(null,e):i(e.payload):"string"==typeof e.reason?i(e):(console.warn("Received invalid response from core",e),i({reason:"invalid response shape"})),this.wireListeners.delete(t)}}else this.uncorrelatedListener&&this.uncorrelatedListener.call(null,e),this.uncorrelatedListener=()=>{};return!0}}Io=no.Transport=Oo,go=new WeakMap,mo=new WeakMap;const So=(...e)=>({log:(...t)=>console.debug(`[${(new Date).toISOString()}]`,...(e=>e.map((e=>`[${e}]`)))(e),...t),getLogger:(...t)=>So(...e,...t)}),Ro=So("@openfin/core-web/client");function Fo(e,t){if(!function(e){return"string"==typeof e}(e))throw new Error(`Property ${t} has invalid type. Expected string, got ${typeof e}.`)}const jo="web-broker-ports-ready",ko=Ro.getLogger("get-web-interop-ports");function Lo(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)}function To(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}"function"==typeof SuppressedError&&SuppressedError;const $o=e=>{var n,i,r;return r=class extends t.EventEmitter{constructor(t){super(),n.set(this,void 0),i.set(this,!1),this.connectSync=()=>{Lo(this,i,"f")||(e.addEventListener("message",(e=>{e.data?.topic?.startsWith("wire-message")&&e.data.message&&Lo(this,n,"f").call(this,{...JSON.parse(e.data.message),ports:e.ports})})),e.start())},this.connect=async()=>{this.connectSync()},this.send=t=>(e.postMessage({topic:"wire-message",message:JSON.stringify(t)}),Promise.resolve()),this.shutdown=async()=>{e.close()},To(this,n,t,"f")}getPort(){return e}},n=new WeakMap,i=new WeakMap,r};var Bo={},Go={};Object.defineProperty(Go,"__esModule",{value:!0}),Go.BaseEnvironment=void 0;const Wo=vr();Go.BaseEnvironment=class{async getViewWindowIdentity(e,t){const{identity:n}=await e.View.wrapSync(t).getCurrentWindow();return n}async getInteropInfo(e){const t=await e.Application.getCurrentSync().getInfo().catch((()=>null)),n=t?.initialOptions?.interopBrokerConfiguration??{};return{fdc3Version:t?(0,Wo.getDefaultViewFdc3VersionFromAppInfo)(t):void 0,...n,fdc3Info:{providerVersion:await e.System.getVersion(),provider:"OpenFin"}}}},Object.defineProperty(Bo,"__esModule",{value:!0});var Ho=Bo.BrowserEnvironment=void 0;const No=Go;class Do extends No.BaseEnvironment{constructor(){super(...arguments),this.type="other",this.getRandomId=()=>{const e=new Uint32Array(1);return window.crypto.getRandomValues(e)[0].toString(32)}}getAdapterVersionSync(){return""}observeBounds(e,t){throw new Error("Method not implemented.")}layoutAllowedInContext(e){return!1}initLayoutManager(e,t,n){throw new Error("Method not implemented.")}applyLayoutSnapshot(e,t,n){throw new Error("Method not implemented.")}createLayout(e,t){throw new Error("Method not implemented.")}destroyLayout(e,t){throw new Error("Method not implemented.")}resolveLayout(e,t){throw new Error("Method not implemented.")}initPlatform(...e){throw new Error("Method not implemented.")}writeToken(e,t){return Promise.resolve("")}retrievePort(e){throw new Error("Method not implemented.")}getNextMessageId(){return this.getRandomId()}createChildContent(e){throw new Error("Method not implemented.")}getWebWindow(e){throw new Error("Method not implemented.")}getCurrentEntityIdentity(){throw new Error("Method not implemented.")}getCurrentEntityType(){return"external connection"}raiseEvent(e,t){throw new Error("Method not implemented.")}getUrl(){return location.href}getDefaultChannelOptions(){return{create:{},connect:{}}}getRtcPeer(){return new RTCPeerConnection}getWsConstructor(){return WebSocket}whenReady(){return Promise.resolve()}}Ho=Bo.BrowserEnvironment=Do;const Uo=e=>"platform"in e&&void 0!==e.platform;var Vo,zo;class Ko extends Ho{constructor(e){super(),this.connectConfig=e,Vo.set(this,void 0),zo.set(this,new W((async()=>Promise.resolve().then((function(){return __webpack_require__(/*! ./main-b14f67c9.js */ "../../node_modules/@openfin/core-web/out/main-b14f67c9.js")}))))),Uo(e)&&this.validatePlatformOptions(e)}getAdapterVersionSync(){return"0.39.21"}validatePlatformOptions({platform:e}){if(!("layoutSnapshot"in e))throw new Error("Platform options are missing layoutSnapshot. Please provide a layoutSnapshot in the platform options.");if("windows"in e||"windows"in e.layoutSnapshot)throw new Error("It appears you tried to call connect() with a snapshot object from an OpenFin desktop environment. Note that connect() expects to be called with a platform property with this structure: { platform: { layoutSnapshot } }. To get a layoutSnapshot of the expected structure, use fin.Platform.Layout.getCurrentLayoutManagerSync().getLayoutSnapshot() in v34+ in your desktop environment.");const{layouts:t}=e.layoutSnapshot;Object.entries(t).map((([e,t])=>{if("object"!=typeof t||null===t)throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must be an object.`);if(!("content"in t))throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must contain a 'content' property.`)}))}async getInteropInfo(e){return{...{contextGroups:void 0,logging:{beforeAction:{enabled:!1},afterAction:{enabled:!1}}},fdc3Version:void 0,fdc3Info:{providerVersion:"0.39.21",provider:"OpenFin Web"}}}layoutAllowedInContext(e){return!0}async initLayoutManager(e,t,n){if(Lo(this,Vo,"f"))throw new Error("Layout already initialized.");if(!Uo(this.connectConfig))throw new Error("Platform options are missing from connection config.");const{WebLayoutEntryPoint:i}=await Lo(this,zo,"f").getValue();return To(this,Vo,new i(this.connectConfig),"f"),await Lo(this,Vo,"f").initLayoutManager(e,t,n)}async applyLayoutSnapshot(e,t,n){Lo(this,Vo,"f")?.applyLayoutSnapshot(e,t,n)}async createLayout(e,t){return Lo(this,Vo,"f")?.createLayout(e,t)}async destroyLayout(e,t){return Lo(this,Vo,"f")?.destroyLayout(e,t)}async getViewWindowIdentity(e,t){return Promise.resolve({uuid:t.uuid,name:t.uuid})}}Vo=new WeakMap,zo=new WeakMap;const qo=()=>{const e=((e,t)=>{const n=new RegExp(`^${t}<(?.*)>$`).exec(e)?.groups?.meta;if(n)try{return JSON.parse(atob(n))}catch(e){throw new Error(`Failed to decode JSON from ${n}.`)}})(window.name,"of-frame");if(e)try{const{name:t,uuid:n,brokerUrl:i,providerId:r,contextGroup:o}=e;return Fo(i,"brokerUrl"),Fo(n,"uuid"),Fo(t,"name"),{identity:{name:t,uuid:n},brokerUrl:i,interopConfig:{providerId:r,currentContextGroup:o}}}catch(e){throw new Error(`Unexpected error occurred when inferring platform information: ${e.stack}`)}},Jo=()=>{const e=r.v4();return{uuid:e,name:e}},Yo=async e=>{if("enabled"===e.connectionInheritance){const t=await(async e=>{const t=qo();if(t){const{validateOptions:n=(()=>!0)}=e,{identity:i,...r}=t;if(!await n(r))throw new Error("Parent options were rejected by validateOptions.");return t}})(e);if(t)return t}if(!e.options){const t="enabled"===e.connectionInheritance?"Broker URL was not specified nor provided by a platform container.":"Connection inheritance is disabled but no options were provided.";throw new Error(t)}return{...e.options,identity:Jo()}};exports.__classPrivateFieldGet=Lo,exports.__classPrivateFieldSet=To,exports.apiExposer=Gn,exports.commonjsGlobal=s,exports.connect=async t=>{try{Ro.log("Establishing connection",t);const{brokerUrl:n,identity:i,timeout:r,interopConfig:s}=await Yo(t),{workerPort:a,iframeBrokerPort:c}=await(async(e,t,n)=>{const{origin:i}=new URL(e),r=document.createElement("IFRAME");let s;r.style.display="none";try{return await new Promise(((a,c)=>{const d=e=>{if(e.source===r.contentWindow&&e.data?.topic===`ack-${jo}`){if(e.origin!==i)c(new Error(`Broker redirected to unexpected origin ${e.origin}, expected ${i}.`));else if(e.data.success){const[t,n]=e.ports;a({iframeBrokerPort:t,workerPort:n})}else c(new m(e.data));window.removeEventListener("message",d),clearTimeout(s)}};window.addEventListener("message",d),ko.log(`Connecting to broker ${e}`),r.setAttribute("src",e),r.setAttribute("name",o(t,"of-broker")),document.body.appendChild(r),ko.log("Iframe loaded, awaiting init message from iframe"),n&&(s=setTimeout((()=>{window.removeEventListener("message",d),document.body.removeChild(r),c(new Error("Worker did not initialize in time"))}),n))}))}catch(e){throw new Error(`Failed to initialise Fin Web Client. ${e.message}`,{cause:e})}})(n,i,r);Ro.log("Successfully established connection to shared worker");const d={entityType:"external connection",...i};a.start(),c.start();const h=((t,n,i)=>{const r=$o(n),o=new Ko(t),s=new Io(r,o,i);return s.connectSync(),window.Buffer=e.Buffer,new Wr(s)})(t,a,d);return s?.providerId&&(h.me.interop=h.Interop.connectSync(s.providerId),s?.currentContextGroup&&h.me.interop.joinContextGroup(s.currentContextGroup).catch((e=>{console.warn(`Error joining specified context group: ${s?.currentContextGroup}, continuing`,e)}))),{...h,me:{...h.me,identity:{uuid:h.me.uuid,name:h.me.name}}}}catch(e){throw new Error(`An error occured during web-interop connection: ${e.message}`)}},exports.decorators=Nn,exports.encodeOptions=o,exports.layout_constants=ai,exports.lazy=G; /***/ }), -/***/ "./node_modules/@openfin/core-web/out/main-b14f67c9.js": -/*!*************************************************************!*\ - !*** ./node_modules/@openfin/core-web/out/main-b14f67c9.js ***! - \*************************************************************/ +/***/ "../../node_modules/@openfin/core-web/out/main-b14f67c9.js": +/*!*****************************************************************!*\ + !*** ../../node_modules/@openfin/core-web/out/main-b14f67c9.js ***! + \*****************************************************************/ /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; -var t=__webpack_require__(/*! ./main-8cad4070.js */ "./node_modules/@openfin/core-web/out/main-8cad4070.js"),e=__webpack_require__(/*! uuid */ "../../node_modules/uuid/dist/esm-browser/index.js");__webpack_require__(/*! buffer/ */ "../../node_modules/buffer/index.js"),__webpack_require__(/*! events */ "../../node_modules/events/events.js"),__webpack_require__(/*! lodash/cloneDeep */ "../../node_modules/lodash/cloneDeep.js"),__webpack_require__(/*! lodash/isEqual */ "../../node_modules/lodash/isEqual.js");var i={},n={};Object.defineProperty(n,"__esModule",{value:!0}),n.mapValuesAsync=n.mapEntriesAsync=void 0;const o=(t,[e,i])=>({...t,[e]:i});async function s(t,e){return(await Promise.all(e.map((async([e,i])=>[e,await t(i,e)])))).reduce(o,{})}n.mapEntriesAsync=s,n.mapValuesAsync=async function(t,e){let i;return i=e instanceof Map?[...e.entries()]:Object.entries(e),s(t,i)};var r,a,l,h,d=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldSet||function(t,e,i,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(t,i):o?o.value=i:e.set(t,i),i},c=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldGet||function(t,e,i,n){if("a"===i&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?n:"a"===i?n.call(t):n?n.value:e.get(t)};Object.defineProperty(i,"__esModule",{value:!0});var m=i.DefaultLayoutManager=void 0;const u=n;class p{constructor(t){a.set(this,void 0),l.set(this,new Map),d(this,a,t,"f")}size(){return c(this,l,"f").size}async applyLayoutSnapshot({layouts:t}){if(Object.keys(t).length>1)throw new Error("[LayoutManager] Tried to call applyLayoutSnapshot with more than 1 layout. When implementing multiple layouts via overridden LayoutManager class, you must override and fully implement the applyLayoutSnapshot method without calling super.applyLayoutSnapshot().");const[[e,i]]=Object.entries(t);await p.createLayout(this,{layoutName:e,layout:i})}async showLayout({layoutName:t}){}async getLayoutSnapshot(){return{layouts:await(0,u.mapValuesAsync)((t=>t.getFrameSnapshot()),c(this,l,"f"))}}async removeLayout({layoutName:t}){}getLayoutIdentityForView(t){const e=[...c(this,l,"f").values()].find((e=>e.getCurrentViews().some((e=>e.name===t.name&&e.uuid===t.uuid))));return e?.identity??void 0}isLayoutVisible({layoutName:t}){return c(p,r,"m",h).call(p,this,t).isVisible()}resolveLayoutIdentity(t){if(t&&"layoutName"in t)return t;const e=[...c(this,l,"f").values()];if(1===e.length)return e[0].identity;const i=e.find((t=>t.isVisible()));return i?.identity??void 0}static async resolveLayout(t,e){const i=t.resolveLayoutIdentity(e);if(void 0===i||!("layoutName"in i))throw new Error("[layout-manager] resolveLayout: Could not resolve the layout identity. Make sure you include 'layoutName' in the identity object.");return c(p,r,"m",h).call(p,t,i.layoutName)}static async handleSharedView(t,e,i){await(0,u.mapValuesAsync)((async t=>{if(t.identity.layoutName!==e.layoutName){const e=t.getCurrentViews().find((t=>t.name===i.name));e&&await t.onViewDetached({viewIdentity:e,target:null}).catch(console.error)}}),c(t,l,"f"))}static async handleLastViewRemoved(t,e){await t.removeLayout(e),await c(t,a,"f").handleLastViewRemoved(t)}static async destroyLayout(t,{layoutName:e}){await c(p,r,"m",h).call(p,t,e).destroy(),c(t,l,"f").delete(e)}static async createLayout(t,e){const{layoutName:i}=e;if(c(t,l,"f").has(i))throw new Error(`Layout name ${i} already exists`);await c(t,a,"f").createLayout(e,t)}static registerLayout(t,e,i){c(t,l,"f").set(e,i)}static getAllLayouts(t){return[...c(t,l,"f").values()]}static setInitialSnapshot(t,e){c(t,a,"f").setInitialSnapshot(e)}static createClosedConstructor(...t){return class extends p{constructor(){super(...t)}}}}m=i.DefaultLayoutManager=p,r=p,a=new WeakMap,l=new WeakMap,h=function(t,e){const i=c(t,l,"f").get(e);if(!i)throw new Error(`[layout-manager] getLayoutByName: Could not locate layout with name '${e}'`);return i};var g={},f={},v={};Object.defineProperty(v,"__esModule",{value:!0}),v.ReversibleMap=void 0;v.ReversibleMap=class{constructor(){this.valueToKey=new Map,this.keyToValue=new Map,this.setUnique=(t,e)=>{if(this.hasKey(t)||this.hasValue(e))throw new Error("Key or value already in the map.");this.keyToValue.set(t,e),this.valueToKey.set(e,t)},this.getKey=t=>{const e=this.valueToKey.get(t);if(!e)throw new Error("Value not found in the map.");return e},this.deleteKey=t=>{const e=this.getValue(t);return this.keyToValue.delete(t),this.valueToKey.delete(e),e},this.deleteValue=t=>{const e=this.getKey(t);return this.keyToValue.delete(e),this.valueToKey.delete(t),e},this.hasKey=t=>this.keyToValue.has(t),this.hasValue=t=>this.valueToKey.has(t)}getValue(t){const e=this.keyToValue.get(t);if(!e)throw new Error("Key not found in the map.");return e}},Object.defineProperty(f,"__esModule",{value:!0});var _=f.LayoutContentCache=void 0;const y=t.lazy,C=v;class w{constructor(){this.contentItemCache=new C.ReversibleMap,this.contentItemCacheId=0,this.createCacheKey=()=>{const t=`entity-${this.contentItemCacheId.toString()}`;return this.contentItemCacheId+=1,t},this.hasKey=t=>this.contentItemCache.hasKey(t),this.getItemOrUndefined=t=>{try{return this.getContentItemOrThrow(t)}catch(t){return}},this.getContentItemOrThrow=(t,e)=>{if(!this.contentItemCache.hasKey(t))throw new Error("Layout component has been destroyed or detached from the current layout.");const i=this.contentItemCache.getValue(t);if(e&&!e.includes(i.type))throw new Error(`Layout item is not the expected type. Expected ${e.join(", ")}, got ${i.type}.`);return i},this.getOrCreateEntityId=t=>{if(this.contentItemCache.hasValue(t))return this.contentItemCache.getKey(t);t.onDestroyed((()=>{this.contentItemCache.deleteValue(t)}));const e=this.createCacheKey();return this.contentItemCache.setUnique(e,t),e}}static getSingleInstance(){return w.singleton.getValue()}}_=f.LayoutContentCache=w,w.singleton=new y.Lazy((()=>new w));var I={},b={};!function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.getAdjacentStacks=t.doShareEdge=t.getAdjacentItem=void 0;t.getAdjacentItem=(e,i)=>{const{parent:n}=e;if(e.isRoot()||!n)return;const o=["top","bottom"].includes(i)?"column":"row",s=["top","left"].includes(i)?-1:1;if(n.type===o){const t=n.contentItems.indexOf(e)+s;if(t>=0&&t{const n=t.getBounds(),o=e.getBounds();if(!n||!o)return!1;if(["top","bottom"].includes(i)){return!(n.righto.right)}return!(n.bottomo.bottom)};t.getAdjacentStacks=(e,i)=>{const n=["top","bottom"].includes(i)?"row":"column",o=s=>"stack"===s.type?(0,t.doShareEdge)(e,s,i)?[s]:[]:"root"===s.type||"ground"===s.type?[]:s.type===n?s.contentItems.map((t=>o(t))).flat():s.type!==n?["top","right"].includes(i)?o(s.contentItems[s.contentItems.length-1]):o(s.contentItems[0]):[],s=(0,t.getAdjacentItem)(e,i);return s?o(s):[]}}(b);var S=t.commonjsGlobal&&t.commonjsGlobal.__decorate||function(t,e,i,n){var o,s=arguments.length,r=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(s<3?o(r):s>3?o(e,i,r):o(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};Object.defineProperty(I,"__esModule",{value:!0}),I.LayoutEntitiesController=void 0;const E=t.decorators,x=b,L=i;class z{constructor(t,e,i){this.wire=t,this.layoutManager=e,this.layoutContentCache=i,this.analytics=t=>{this.wire.sendAction(`layout-controller-${t}`).catch((()=>{}))},this.getLayoutIdentityForViewOrThrow=async t=>{const e=this.layoutManager.getLayoutIdentityForView(t);if(!e)throw new Error(`View identity ${t.name} is not attached to any layouts.`);return e},this.getRoot=async t=>{this.analytics("get-root");const e=(await this.getLayout(t)).getRoot();return{type:e.type,entityId:this.layoutContentCache.getOrCreateEntityId(e)}},this.getStackByView=async t=>{this.analytics("get-stack-by-view");const e=await this.getLayoutIdentityForViewOrThrow(t),i=(await this.getLayout(e)).getStackByView(t);if("stack"===i?.type)return{entityId:this.layoutContentCache.getOrCreateEntityId(i),type:"stack"}},this.getStackViews=t=>{this.analytics("get-stack-views");return this.layoutContentCache.getContentItemOrThrow(t,["stack"]).contentItems.map((t=>({name:t.viewName,uuid:this.wire.me.uuid})))},this.isRoot=t=>{this.analytics("is-root");return this.layoutContentCache.getContentItemOrThrow(t).isRoot()},this.exists=t=>(this.analytics("exists"),this.layoutContentCache.hasKey(t)),this.addViewToStack=async(t,e,{index:i}={index:0})=>{this.analytics("add-view-to-stack");const n=this.layoutContentCache.getContentItemOrThrow(t);if(i&&i>n.contentItems.length+1)throw new Error(`Index '${i}' out of range, please exclude the index or specify a number between 0 and ${n.contentItems.length}`);const o={id:t,index:i},{identity:s}=await n.layout.platformCreateView(e,{location:o});return s},this.findViewInStack=(t,e)=>t.contentItems.find((t=>t.viewName===e.name)),this.removeViewFromStack=async(t,e)=>{this.analytics("remove-view-from-stack");const i=this.layoutContentCache.getContentItemOrThrow(t,["stack"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to remove a view ('${e.name}') which does not belong to the stack.`);await n.layout.platformCloseView(e)},this.createAdjacentStack=async(t,e,{position:i="right"}={})=>{if(this.analytics("create-adjacent-stack"),!Array.isArray(e)||0===e.length)throw new Error('The parameter "views" must be an array with at least 1 element.');if(!["top","bottom","left","right"].includes(i))throw new Error(`Invalid position '${i}' specified.`);const n=this.layoutContentCache.getContentItemOrThrow(t).createAdjacentStack({position:i}),o=this.layoutContentCache.getOrCreateEntityId(n);return await Promise.all(e.reverse().map((t=>this.addViewToStack(o,t)))),o},this.getAdjacentStacks=async({targetId:t,edge:e})=>{this.analytics("get-adjacent-stacks");const i=this.layoutContentCache.getContentItemOrThrow(t);return(0,x.getAdjacentStacks)(i,e).map((t=>({entityId:this.layoutContentCache.getOrCreateEntityId(t)})))},this.setStackActiveView=async(t,e)=>{this.analytics("set-stack-active-view");const i=this.layoutContentCache.getContentItemOrThrow(t,["stack"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to set a view ('${e.name}') as active when it does not belong to the stack.`);i.setActiveContentItem(n,!0)}}async getLayout(t){const e=await L.DefaultLayoutManager.resolveLayout(this.layoutManager,t);if(!e)throw new Error(`Could not resolve target layout identity ${JSON.stringify(t)}`);return e}getContent(t){this.analytics("get-content");return this.layoutContentCache.getContentItemOrThrow(t,["column","row"]).contentItems.map((t=>({type:t.type,entityId:this.layoutContentCache.getOrCreateEntityId(t)})))}getParent(t){this.analytics("get-parent");const e=this.layoutContentCache.getContentItemOrThrow(t);if(!e.isRoot())return e.parent?.contentItems.includes(e)?{type:e.parent.type,entityId:this.layoutContentCache.getOrCreateEntityId(e.parent)}:void 0}}S([(0,E.expose)()],z.prototype,"getLayoutIdentityForViewOrThrow",void 0),S([(0,E.expose)()],z.prototype,"getRoot",void 0),S([(0,E.expose)()],z.prototype,"getStackByView",void 0),S([(0,E.expose)()],z.prototype,"getStackViews",void 0),S([(0,E.expose)()],z.prototype,"getContent",null),S([(0,E.expose)()],z.prototype,"getParent",null),S([(0,E.expose)()],z.prototype,"isRoot",void 0),S([(0,E.expose)()],z.prototype,"exists",void 0),S([(0,E.expose)()],z.prototype,"addViewToStack",void 0),S([(0,E.expose)()],z.prototype,"removeViewFromStack",void 0),S([(0,E.expose)()],z.prototype,"createAdjacentStack",void 0),S([(0,E.expose)()],z.prototype,"getAdjacentStacks",void 0),S([(0,E.expose)()],z.prototype,"setStackActiveView",void 0),I.LayoutEntitiesController=z,Object.defineProperty(g,"__esModule",{value:!0});var M=g.initLayoutEndpoints=void 0;const P=t.apiExposer,T=t.layout_constants,A=f,k=I,D=i;M=g.initLayoutEndpoints=async function(t,e){const i=t.getFin(),n=await i.Platform.getCurrentSync().getClient(),o=new P.ChannelsExposer(n);await new P.ApiExposer(o).exposeInstance(new k.LayoutEntitiesController(t,e,A.LayoutContentCache.getSingleInstance()),{id:T.LAYOUT_CONTROLLER_ID}),await async function(t,e){const i=t=>async i=>{const n=await D.DefaultLayoutManager.resolveLayout(e,i.target);if(!n)throw new Error(`Could not resolve the layout target from payload ${JSON.stringify(i)}`);return t(n,i)},n=(e,n)=>{t.register(e,i(n))},o=(t,e)=>{n(t,e)};n("replace-view",((t,e)=>t.replaceView(e))),n("replace-layout",((t,{layout:e})=>t.replaceLayout(e))),n("add-view",((t,e)=>t.insertView(e))),o("layout-add-view",((t,{viewOptions:e,location:i,targetView:n})=>t.platformCreateView(e,{location:i,targetView:n}))),n("close-view",((t,e)=>t.cleanupView(e.viewIdentity))),o("layout-close-view",((t,e)=>t.platformCloseView(e.viewIdentity))),n("apply-preset-layout",((t,e)=>t.applyPreset(e))),n("get-layout-views",(t=>t.getCurrentViews())),n("get-frame-snapshot",(t=>t.getFrameSnapshot())),n("is-visible",(t=>t.isVisible())),n("destroy",(t=>t.destroy())),t.register("get-layout-snapshot",(()=>e.getLayoutSnapshot()))}(n,e)};var R={};Object.defineProperty(R,"__esModule",{value:!0});var U=R.BaseLayout=void 0;U=R.BaseLayout=class{};var O={};Object.defineProperty(O,"__esModule",{value:!0});var V=O.DOMEmitter=void 0;V=O.DOMEmitter=class{constructor(t){this.container=t}dispatchLocalEvent(t,e){const i={...e,type:t,tabSelector:`tab-${e.name}`,containerSelector:`container-${e.name}`,topic:"openfin-DOM-event"};this.container.dispatchEvent(new CustomEvent(t,{detail:i}))}};var B={};Object.defineProperty(B,"__esModule",{value:!0});var H=B.mapLayoutContentItemsImmutableSync=B.mapLayoutContentItemsImmutable=W=B.isVisible=void 0;var W=B.isVisible=t=>(0!==t.offsetWidth||0!==t.offsetHeight)&&"hidden"!==window.getComputedStyle(t).visibility&&t.offsetTop>=0&&t.offsetLeft>=0&&t.offsetTop<=window.innerHeight&&t.offsetLeft<=window.innerWidth;const F=t=>"type"in t&&"component"===t.type;B.mapLayoutContentItemsImmutable=async function t(e,i){return F(i)?e(i):{...i,content:await Promise.all(i.content?.map((i=>t(e,i))))}},H=B.mapLayoutContentItemsImmutableSync=function t(e,i){return F(i)?e(i):{...i,content:i.content?.map((i=>t(e,i)))}};class N extends Error{constructor(t,e){super(e),this.type=t}}class G extends N{constructor(t,e){super("Configuration",t),this.node=e}}class j extends N{constructor(t){super("PopoutBlocked",t)}}class $ extends N{constructor(t){super("API",t)}}class Z extends N{constructor(t){super("Bind",t)}}class q extends Error{constructor(t,e,i){super(`${t}: ${e}${void 0===i?"":": "+i}`)}}class X extends q{constructor(t,e){super("Assert",t,e)}}class Y extends q{constructor(t,e,i){super("UnreachableCase",t,`${e}${void 0===i?"":": "+i}`)}}class K extends q{constructor(t,e){super("UnexpectedNull",t,e)}}class J extends q{constructor(t,e){super("UnexpectedUndefined",t,e)}}var Q;!function(t){let e=!1;const i={PopoutCannotBeCreatedWithGroundItemConfig:{id:0,default:"Popout cannot be created with ground ItemConfig"},PleaseRegisterAConstructorFunction:{id:1,default:"Please register a constructor function"},ComponentTypeNotRegisteredAndBindComponentEventHandlerNotAssigned:{id:2,default:"Component type not registered and BindComponentEvent handler not assigned"},ComponentIsAlreadyRegistered:{id:3,default:"Component is already registered"},ComponentIsNotVirtuable:{id:4,default:"Component is not virtuable. Requires rootHtmlElement field/getter"},VirtualComponentDoesNotHaveRootHtmlElement:{id:5,default:'Virtual component does not have getter "rootHtmlElement"'},ItemConfigIsNotTypeComponent:{id:6,default:"ItemConfig is not of type component"},InvalidNumberPartInSizeString:{id:7,default:"Invalid number part in size string"},UnknownUnitInSizeString:{id:8,default:"Unknown unit in size string"},UnsupportedUnitInSizeString:{id:9,default:"Unsupported unit in size string"}};t.idCount=Object.keys(i).length;const n=Object.values(i);t.checkInitialise=function(){if(!e)for(let e=0;e="0"&&t<="9"}function Tt(t,e){const i=zt(e);t.style.width=i}function At(t,e){const i=zt(e);t.style.height=i}function kt(t){return{width:t.offsetWidth,height:t.offsetHeight}}function Dt(t,e){t.style.display=e?"":"none"}function Rt(t,e){if(void 0!==e)for(const i in e)if(e.hasOwnProperty(i)){const n=e[i],o=t[i];t[i]=Ut(o,n)}return t}function Ut(t,e){if("object"!=typeof e)return e;if(Array.isArray(e)){const t=e.length,i=new Array(t);for(let n=0;n36)throw new Error("Too many keys in config minifier map")},t.translateObject=n}(dt||(dt={})),function(t){t.defaults={type:at.ground,content:[],size:1,sizeUnit:ht.Fractional,minSize:void 0,minSizeUnit:ht.Pixel,id:"",isClosable:!0},t.createCopy=function(t,e){switch(t.type){case at.ground:case at.row:case at.column:return gt.createCopy(t,e);case at.stack:return ut.createCopy(t,e);case at.component:return pt.createCopy(t);default:throw new Y("CICC91354",t.type,"Invalid Config Item type specified")}},t.createDefault=function(t){switch(t){case at.ground:throw new X("CICCDR91562");case at.row:case at.column:return gt.createDefault(t);case at.stack:return ut.createDefault();case at.component:return pt.createDefault();default:throw new Y("CICCDD91563",t,"Invalid Config Item type specified")}},t.isComponentItem=function(t){return t.type===at.component},t.isStackItem=function(t){return t.type===at.stack},t.isGroundItem=function(t){return t.type===at.ground}}(ct||(ct={})),function(t){t.defaultMaximised=!1,function(t){t.createCopy=function(t,e){return void 0===t?void 0:{show:null!=e?e:t.show,popout:t.popout,close:t.close,maximise:t.maximise,minimise:t.minimise,tabDropdown:t.tabDropdown}}}(t.Header||(t.Header={}))}(mt||(mt={})),function(t){function e(t){const e=t.length,i=new Array(e);for(let n=0;n"__glMaximised"===t));t>0&&(o=!0,n=n.splice(t,1)),e=n.length>0?n[0]:ct.defaults.id}else e=n;return i=void 0!==t.maximised?t.maximised:o,{id:e,maximised:i}}}(wt||(wt={})),function(t){function e(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0;return{resolved:!0,root:Et.resolve(i),openPopouts:t.resolveOpenPopouts(e.openPopouts),dimensions:t.Dimensions.resolve(e.dimensions),settings:t.Settings.resolve(e.settings),header:t.Header.resolve(e.header,e.settings,e.labels)}}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:Lt.fromResolvedArray(e.openPopouts),settings:_t.Settings.createCopy(e.settings),dimensions:t.Dimensions.fromResolved(e.dimensions),header:_t.Header.createCopy(e.header)}},t.isResolved=function(t){const e=t;return void 0!==e.resolved&&!0===e.resolved},t.resolveOpenPopouts=function(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0,{root:Et.resolve(o),openPopouts:xt.resolveOpenPopouts(e.openPopouts),dimensions:xt.Dimensions.resolve(e.dimensions),settings:xt.Settings.resolve(e.settings),header:xt.Header.resolve(e.header,e.settings,e.labels),parentId:null!==(i=e.parentId)&&void 0!==i?i:null,indexInParent:null!==(n=e.indexInParent)&&void 0!==n?n:null,window:t.Window.resolve(e.window,e.dimensions),resolved:!0}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:i(e.openPopouts),dimensions:xt.Dimensions.fromResolved(e.dimensions),settings:_t.Settings.createCopy(e.settings),header:_t.Header.createCopy(e.header),parentId:e.parentId,indexInParent:e.indexInParent,window:t.Window.fromResolved(e.window)}},t.fromResolvedArray=i}(Lt||(Lt={}));class Wt{constructor(){this._allEventSubscriptions=[],this._subscriptionsMap=new Map,this.unbind=this.removeEventListener,this.trigger=this.emit}tryBubbleEvent(t,e){}emit(t,...e){let i=this._subscriptionsMap.get(t);if(void 0!==i){i=i.slice();for(let t=0;t0){const n=e.slice();n.unshift(t);const o=this._allEventSubscriptions.slice();for(let t=0;t0?n.contentItems[0]:n,e=0);const o=this._layoutManager.createAndInitContentItem(i,t);t.addChild(o,e),this._layoutManager.layoutConfig.settings.popInOnClose?this._onClose():this.close()}createWindow(){const t=this.createUrl(),e=Math.floor(1e6*Math.random()).toString(36),i=this.serializeWindowFeatures({width:this._initialWindowSize.width,height:this._initialWindowSize.height,innerWidth:this._initialWindowSize.width,innerHeight:this._initialWindowSize.height,menubar:"no",toolbar:"no",location:"no",personalbar:"no",resizable:"yes",scrollbars:"no",status:"no"});if(this._popoutWindow=globalThis.open(t,e,i),this._popoutWindow)this._popoutWindow.addEventListener("load",(()=>this.positionWindow()),{passive:!0}),this._popoutWindow.addEventListener("beforeunload",(()=>{this._layoutManager.layoutConfig.settings.popInOnClose?this.popIn():this._onClose()}),{passive:!0}),this._checkReadyInterval=setInterval((()=>this.checkReady()),10);else if(!0===this._layoutManager.layoutConfig.settings.blockedPopoutsThrowError){throw new j("Popout blocked")}}checkReady(){if(null===this._popoutWindow)throw new K("BPCR01844");this._popoutWindow.__glInstance&&this._popoutWindow.__glInstance.isInitialised&&(this.onInitialised(),void 0!==this._checkReadyInterval&&(clearInterval(this._checkReadyInterval),this._checkReadyInterval=void 0))}serializeWindowFeatures(t){const e=[];for(const i in t)e.push(i+"="+t[i].toString());return e.join(",")}createUrl(){const t="gl-window-config-"+Ot(),e=_t.minifyConfig(this._config);try{localStorage.setItem(t,JSON.stringify(e))}catch(t){throw new Error("Error while writing to localStorage "+function(t){return t instanceof Error?t.message:"string"==typeof t?t:"Unknown Error"}(t))}const i=new URL(location.href);return i.searchParams.set("gl-window",t),i.toString()}positionWindow(){if(null===this._popoutWindow)throw new Error("BrowserPopout.positionWindow: null popoutWindow");this._popoutWindow.moveTo(this._initialWindowSize.left,this._initialWindowSize.top),this._popoutWindow.focus()}onInitialised(){this._isInitialised=!0,this.getGlInstance().on("popIn",(()=>this.popIn())),this.emit("initialised")}_onClose(){setTimeout((()=>this.emit("closed")),50)}}class Gt extends Wt{constructor(t,e,i,n){super(),this.layoutManager=t,this._parent=i,this._element=n,this._popInParentIds=[],this._type=e.type,this._id=e.id,this._isInitialised=!1,this.isGround=!1,this.isRow=!1,this.isColumn=!1,this.isStack=!1,this.isComponent=!1,this.size=e.size,this.sizeUnit=e.sizeUnit,this.minSize=e.minSize,this.minSizeUnit=e.minSizeUnit,this._isClosable=e.isClosable,this._pendingEventPropagations={},this._throttledEvents=["stateChanged"],this._contentItems=this.createContentItems(e.content)}get type(){return this._type}get id(){return this._id}set id(t){this._id=t}get popInParentIds(){return this._popInParentIds}get parent(){return this._parent}get contentItems(){return this._contentItems}get isClosable(){return this._isClosable}get element(){return this._element}get isInitialised(){return this._isInitialised}static isStack(t){return t.isStack}static isComponentItem(t){return t.isComponent}static isComponentParentableItem(t){return t.isStack||t.isGround}removeChild(t,e=!1){const i=this._contentItems.indexOf(t);if(-1===i)throw new Error("Can't remove child item. Unknown content item");if(e||this._contentItems[i].destroy(),this._contentItems.splice(i,1),this._contentItems.length>0)this.updateSize(!1);else if(!this.isGround&&!0===this._isClosable){if(null===this._parent)throw new K("CIUC00874");this._parent.removeChild(this)}}addChild(t,e,i){return null!=e||(e=this._contentItems.length),this._contentItems.splice(e,0,t),t.setParent(this),!0===this._isInitialised&&!1===t._isInitialised&&t.init(),e}replaceChild(t,e,i=!1){const n=this._contentItems.indexOf(t),o=t._element.parentNode;if(-1===n)throw new X("CIRCI23232","Can't replace child. oldChild is not child of this");if(null===o)throw new K("CIRCP23232");if(o.replaceChild(e._element,t._element),!0===i&&(t._parent=null,t.destroy()),this._contentItems[n]=e,e.setParent(this),e.size=t.size,e.sizeUnit=t.sizeUnit,e.minSize=t.minSize,e.minSizeUnit=t.minSizeUnit,null===e._parent)throw new K("CIRCNC45699");!0===e._parent._isInitialised&&!1===e._isInitialised&&e.init(),this.updateSize(!1)}remove(){if(null===this._parent)throw new K("CIR11110");this._parent.removeChild(this)}popout(){const t=Ot(),e=this.layoutManager.createPopoutFromContentItem(this,void 0,t,void 0);return this.emitBaseBubblingEvent("stateChanged"),e}calculateConfigContent(){const t=this._contentItems,e=t.length,i=new Array(e);for(let n=0;nthis.propagateEventToLayoutManager(t,e))))}propagateEventToLayoutManager(t,e){this._pendingEventPropagations[t]=!1,this.layoutManager.emitUnknown(t,e)}}class jt extends Gt{constructor(t,e,i){super(t,e,i,document.createElement("div")),this._parentItem=i,this._focused=!1,this.isComponent=!0,this._reorderEnabled=e.reorderEnabled,this.applyUpdatableConfig(e),this._initialWantMaximise=e.maximised;const n=document.createElement("div");n.classList.add("lm_content"),this.element.appendChild(n),this._container=new Ft(e,this,t,n,(t=>this.handleUpdateItemConfigEvent(t)),(()=>this.show()),(()=>this.hide()),(t=>this.focus(t)),(t=>this.blur(t)))}get componentName(){return this._container.componentType}get componentType(){return this._container.componentType}get reorderEnabled(){return this._reorderEnabled}get initialWantMaximise(){return this._initialWantMaximise}get component(){return this._container.component}get container(){return this._container}get parentItem(){return this._parentItem}get headerConfig(){return this._headerConfig}get title(){return this._title}get tab(){return this._tab}get focused(){return this._focused}destroy(){this._container.destroy(),super.destroy()}applyUpdatableConfig(t){this.setTitle(t.title),this._headerConfig=t.header}toConfig(){const t=this._container.stateRequestEvent,e=void 0===t?this._container.state:t();return{type:at.component,content:[],size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,maximised:!1,isClosable:this.isClosable,reorderEnabled:this._reorderEnabled,title:this._title,header:mt.Header.createCopy(this._headerConfig),componentType:pt.copyComponentType(this.componentType),componentState:e}}close(){if(null===this.parent)throw new K("CIC68883");this.parent.removeChild(this,!1)}enterDragMode(t,e){Tt(this.element,t),At(this.element,e),this._container.enterDragMode(t,e)}exitDragMode(){this._container.exitDragMode()}enterStackMaximised(){this._container.enterStackMaximised()}exitStackMaximised(){this._container.exitStackMaximised()}drag(){this._container.drag()}updateSize(t){this.updateNodeSize(t)}init(){this.updateNodeSize(!1),super.init(),this._container.emit("open"),this.initContentItems()}setTitle(t){this._title=t,this.emit("titleChanged",t),this.emit("stateChanged")}setTab(t){this._tab=t,this.emit("tab",t),this._container.setTab(t)}hide(){super.hide(),this._container.setVisibility(!1)}show(){super.show(),this._container.setVisibility(!0)}focus(t=!1){this.parentItem.setActiveComponentItem(this,!0,t)}setFocused(t){this._focused=!0,this.tab.setFocused(),t||this.emitBaseBubblingEvent("focus")}blur(t=!1){this._focused&&this.layoutManager.setFocusedComponentItem(void 0,t)}setBlurred(t){this._focused=!1,this.tab.setBlurred(),t||this.emitBaseBubblingEvent("blur")}setParent(t){this._parentItem=t,super.setParent(t)}handleUpdateItemConfigEvent(t){this.applyUpdatableConfig(t)}updateNodeSize(t){if("none"!==this.element.style.display){const{width:e,height:i}=kt(this.element);this._container.setSizeToNodeSize(e,i,t)}}}class $t extends Gt{constructor(){super(...arguments),this._focused=!1}get focused(){return this._focused}setFocusedValue(t){this._focused=t}}class Zt extends Wt{constructor(t,e){super(),this._eElement=t,this._pointerTracking=!1,this._pointerDownEventListener=t=>this.onPointerDown(t),this._pointerMoveEventListener=t=>this.onPointerMove(t),this._pointerUpEventListener=t=>this.onPointerUp(t),this._timeout=void 0,this._allowableTargets=[t,...e],this._oDocument=document,this._eBody=document.body,this._nDelay=1800,this._nDistance=10,this._nX=0,this._nY=0,this._nOriginalX=0,this._nOriginalY=0,this._dragging=!1,this._eElement.addEventListener("pointerdown",this._pointerDownEventListener,{passive:!0})}destroy(){this.checkRemovePointerTrackingEventListeners(),this._eElement.removeEventListener("pointerdown",this._pointerDownEventListener)}cancelDrag(){this.processDragStop(void 0)}onPointerDown(t){if(this._allowableTargets.includes(t.target)&&t.isPrimary){const e=this.getPointerCoordinates(t);this.processPointerDown(e)}}processPointerDown(t){this._nOriginalX=t.x,this._nOriginalY=t.y,this._oDocument.addEventListener("pointermove",this._pointerMoveEventListener),this._oDocument.addEventListener("pointerup",this._pointerUpEventListener,{passive:!0}),this._pointerTracking=!0,this._timeout=setTimeout((()=>{try{this.startDrag()}catch(t){throw console.error(t),t}}),this._nDelay)}onPointerMove(t){this._pointerTracking&&(this.processDragMove(t),t.preventDefault())}processDragMove(t){this._nX=t.pageX-this._nOriginalX,this._nY=t.pageY-this._nOriginalY,!1===this._dragging&&(Math.abs(this._nX)>this._nDistance||Math.abs(this._nY)>this._nDistance)&&this.startDrag(),this._dragging&&this.emit("drag",this._nX,this._nY,t)}onPointerUp(t){this.processDragStop(t)}processDragStop(t){var e;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this.checkRemovePointerTrackingEventListeners(),!0===this._dragging&&(this._eBody.classList.remove("lm_dragging"),this._eElement.classList.remove("lm_dragging"),null===(e=this._oDocument.querySelector("iframe"))||void 0===e||e.style.setProperty("pointer-events",""),this._dragging=!1,this.emit("dragStop",t))}checkRemovePointerTrackingEventListeners(){this._pointerTracking&&(this._oDocument.removeEventListener("pointermove",this._pointerMoveEventListener),this._oDocument.removeEventListener("pointerup",this._pointerUpEventListener),this._pointerTracking=!1)}startDrag(){var t;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this._dragging=!0,this._eBody.classList.add("lm_dragging"),this._eElement.classList.add("lm_dragging"),null===(t=this._oDocument.querySelector("iframe"))||void 0===t||t.style.setProperty("pointer-events","none"),this.emit("dragStart",this._nOriginalX,this._nOriginalY)}getPointerCoordinates(t){return{x:t.pageX,y:t.pageY}}}class qt{constructor(t,e,i){this._isVertical=t,this._size=e,this._grabSize=i0){const i=this.createSplitter(Math.max(0,e-1)).element;e>0?(this.contentItems[e-1].element.insertAdjacentElement("afterend",i),i.insertAdjacentElement("afterend",t.element)):(this.contentItems[0].element.insertAdjacentElement("beforebegin",i),i.insertAdjacentElement("beforebegin",t.element))}else this._childElementContainer.appendChild(t.element);super.addChild(t,e);const n=1/this.contentItems.length*100;if(!0===i)return this.emitBaseBubblingEvent("stateChanged"),e;for(let e=0;e0&&(this.calculateRelativeSizes(),this.setAbsoluteSizes()),this.emitBaseBubblingEvent("stateChanged"),this.emit("resize")}setAbsoluteSizes(){const t=this.calculateAbsoluteSizes();for(let e=0;e0&&t.itemSizes[e]++,this._isColumn?(Tt(this.contentItems[e].element,t.crossAxisSize),At(this.contentItems[e].element,t.itemSizes[e])):(Tt(this.contentItems[e].element,t.itemSizes[e]),At(this.contentItems[e].element,t.crossAxisSize))}calculateAbsoluteSizes(){const t=(this.contentItems.length-1)*this._splitterSize,{width:e,height:i}=kt(this.element);let n,o;this._isColumn?(n=i-t,o=e):(n=e-t,o=i);let s=0;const r=[];for(let t=0;t0){const n=100-t;for(let t=0;t100&&e.length>0){for(let t=0;te)return;{const r=i/e;let a=i;for(let e=0;ethis.onSplitterDrag(e,t,i))),e.on("dragStop",(()=>this.onSplitterDragStop(e))),e.on("dragStart",(()=>this.onSplitterDragStart(e))),this._splitter.splice(t,0,e),e}getSplitItems(t){const e=this._splitter.indexOf(t);return{before:this.contentItems[e],after:this.contentItems[e+1]}}calculateContentItemMinSize(t){const e=t.minSize;if(void 0!==e){if(t.minSizeUnit===ht.Pixel)return e;throw new X("ROCGMD98831",JSON.stringify(t))}{const t=this.layoutManager.layoutConfig.dimensions;return this._isColumn?t.defaultMinItemHeight:t.defaultMinItemWidth}}calculateContentItemsTotalMinSize(t){let e=0;for(const i of t)e+=this.calculateContentItemMinSize(i);return e}onSplitterDragStart(t){const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=this.calculateContentItemsTotalMinSize(e.before.contentItems),s=this.calculateContentItemsTotalMinSize(e.after.contentItems);this._splitterPosition=0,this._splitterMinPosition=-1*(i-o),this._splitterMaxPosition=n-s}onSplitterDrag(t,e,i){let n=this._isColumn?i:e;if(null===this._splitterMinPosition||null===this._splitterMaxPosition)throw new K("ROCOSD59226");n=Math.max(n,this._splitterMinPosition),n=Math.min(n,this._splitterMaxPosition),this._splitterPosition=n;const o=zt(n);this._isColumn?t.element.style.top=o:t.element.style.left=o}onSplitterDragStop(t){if(null===this._splitterPosition)throw new K("ROCOSDS66932");{const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=(this._splitterPosition+i)/(i+n),s=e.before.size+e.after.size;e.before.size=o*s,e.after.size=(1-o)*s,t.element.style.top=zt(0),t.element.style.left=zt(0),globalThis.requestAnimationFrame((()=>this.updateSize(!1)))}}}!function(t){t.getElementDimensionSize=function(t,e){return"width"===e?function(t){return t.offsetWidth}(t):function(t){return t.offsetHeight}(t)},t.setElementDimensionSize=function(t,e,i){return"width"===e?Tt(t,i):At(t,i)},t.createElement=function(t,e){const i=t.createElement("div");return i.classList.add("lm_item"),e?i.classList.add("lm_column"):i.classList.add("lm_row"),i}}(Xt||(Xt={}));class Yt extends $t{constructor(t,e,i){super(t,vt.create(e),null,Yt.createElement(document)),this.isGround=!0,this._childElementContainer=this.element,this._containerElement=i;let n=null;for(;;){const t=n?n.previousSibling:this._containerElement.lastChild;if(!(t instanceof Element&&t.classList.contains("lm_content")))break;n=t}this._containerElement.insertBefore(this.element,n)}init(){if(!0!==this.isInitialised){this.updateNodeSize();for(let t=0;t0?this.contentItems[0]:this,n.isComponent)throw new Error("Cannot add item as child to ComponentItem");{const t=this.layoutManager.createAndInitContentItem(i,n);return e=n.addChild(t,e),n===this?-1:e}}loadComponentAsRoot(t){this.clearRoot();const e=Ct.resolve(t,!1);if(e.maximised)throw new Error("Root Component cannot be maximised");{const t=new jt(this.layoutManager,e,this);t.init(),this.addChild(t,0)}}addChild(t,e){if(this.contentItems.length>0)throw new Error("Ground node can only have a single child");return this._childElementContainer.appendChild(t.element),e=super.addChild(t,e),this.updateSize(!1),this.emitBaseBubblingEvent("stateChanged"),e}calculateConfigContent(){const t=this.contentItems,e=t.length,i=new Array(e);for(let n=0;n0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e)),this.updateContentItemsSize(!1))}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}createSideAreas(){const t=Yt.Area.oppositeSides,e=new Array(Object.keys(t).length);let i=0;for(const n in t){const o=n,s=this.getElementArea();if(null===s)throw new K("RCSA77553");s.side=o,"2"===t[o][1]?s[o]=s[t[o]]-50:s[o]=s[t[o]]+50,s.surface=(s.x2-s.x1)*(s.y2-s.y1),e[i++]=s}return e}highlightDropZone(t,e,i){this.layoutManager.tabDropPlaceholder.remove(),super.highlightDropZone(t,e,i)}onDrop(t,e){if(t.isComponent){const e=ut.createDefault(),i=t;e.header=mt.Header.createCopy(i.headerConfig);const n=this.layoutManager.createAndInitContentItem(e,this);n.addChild(t),t=n}if(0===this.contentItems.length)this.addChild(t);else{if(t.type===at.row||t.type===at.column){const e=ut.createDefault(),i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}const i="x"==e.side[0]?at.row:at.column,n="2"==e.side[1],o=this.contentItems[0];if(o instanceof Xt&&o.type===i){const e=o.contentItems[n?0:o.contentItems.length-1];o.addChild(t,n?0:void 0,!0),e.size*=.5,t.size=e.size,t.sizeUnit=ht.Percent,o.updateSize(!1)}else{const e=ct.createDefault(i),s=this.layoutManager.createContentItem(e,this);this.replaceChild(o,s),s.addChild(t,n?0:void 0,!0),s.addChild(o,n?void 0:0,!0),o.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}}dock(){throw new X("GID87731")}validateDocking(){throw new X("GIVD87732")}getAllContentItems(){const t=[this];return this.deepGetAllContentItems(this.contentItems,t),t}getConfigMaximisedItems(){const t=[];return this.deepFilterContentItems(this.contentItems,t,(t=>!(!Gt.isStack(t)||!t.initialWantMaximise)||!(!Gt.isComponentItem(t)||!t.initialWantMaximise))),t}getItemsByPopInParentId(t){const e=[];return this.deepFilterContentItems(this.contentItems,e,(e=>e.popInParentIds.includes(t))),e}toConfig(){throw new Error("Cannot generate GroundItem config")}setActiveComponentItem(t,e,i){}updateNodeSize(){const{width:t,height:e}=kt(this._containerElement);Tt(this.element,t),At(this.element,e),this.contentItems.length>0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e))}deepGetAllContentItems(t,e){for(let i=0;ithis.onClick(t),this._touchStartEventListener=t=>this.onTouchStart(t),this._element=document.createElement("div"),this._element.classList.add(i),this._element.title=e,this._header.on("destroy",(()=>this.destroy())),this._element.addEventListener("click",this._clickEventListener,{passive:!0}),this._element.addEventListener("touchstart",this._touchStartEventListener,{passive:!0}),this._header.controlsContainerElement.appendChild(this._element)}get element(){return this._element}destroy(){var t;this._element.removeEventListener("click",this._clickEventListener),this._element.removeEventListener("touchstart",this._touchStartEventListener),null===(t=this._element.parentNode)||void 0===t||t.removeChild(this._element)}onClick(t){this._pushEvent(t)}onTouchStart(t){this._pushEvent(t)}}class Jt{constructor(t,e,i,n,o){var s;this._layoutManager=t,this._componentItem=e,this._closeEvent=i,this._focusEvent=n,this._dragStartEvent=o,this._isActive=!1,this._tabClickListener=t=>this.onTabClickDown(t),this._tabTouchStartListener=t=>this.onTabTouchStart(t),this._closeClickListener=()=>this.onCloseClick(),this._closeTouchStartListener=()=>this.onCloseTouchStart(),this._dragStartListener=(t,e)=>this.onDragStart(t,e),this._contentItemDestroyListener=()=>this.onContentItemDestroy(),this._tabTitleChangedListener=t=>this.setTitle(t),this._element=document.createElement("div"),this._element.classList.add("lm_tab"),this._titleElement=document.createElement("span"),this._titleElement.classList.add("lm_title"),this._closeElement=document.createElement("div"),this._closeElement.classList.add("lm_close_tab"),this._element.appendChild(this._titleElement),this._element.appendChild(this._closeElement),e.isClosable?this._closeElement.style.display="":this._closeElement.style.display="none",this.setTitle(e.title),this._componentItem.on("titleChanged",this._tabTitleChangedListener);(null!==(s=e.reorderEnabled)&&void 0!==s?s:this._layoutManager.layoutConfig.settings.reorderEnabled)&&this.enableReorder(),this._element.addEventListener("click",this._tabClickListener,{passive:!0}),this._element.addEventListener("touchstart",this._tabTouchStartListener,{passive:!0}),this._componentItem.isClosable?(this._closeElement.addEventListener("click",this._closeClickListener,{passive:!0}),this._closeElement.addEventListener("touchstart",this._closeTouchStartListener,{passive:!0})):(this._closeElement.remove(),this._closeElement=void 0),this._componentItem.setTab(this),this._layoutManager.emit("tabCreated",this)}get isActive(){return this._isActive}get componentItem(){return this._componentItem}get contentItem(){return this._componentItem}get element(){return this._element}get titleElement(){return this._titleElement}get closeElement(){return this._closeElement}get reorderEnabled(){return void 0!==this._dragListener}set reorderEnabled(t){t!==this.reorderEnabled&&(t?this.enableReorder():this.disableReorder())}setTitle(t){this._titleElement.innerText=t,this._element.title=t}setActive(t){t!==this._isActive&&(this._isActive=t,t?this._element.classList.add("lm_active"):this._element.classList.remove("lm_active"))}destroy(){var t,e;this._closeEvent=void 0,this._focusEvent=void 0,this._dragStartEvent=void 0,this._element.removeEventListener("click",this._tabClickListener),this._element.removeEventListener("touchstart",this._tabTouchStartListener),null===(t=this._closeElement)||void 0===t||t.removeEventListener("click",this._closeClickListener),null===(e=this._closeElement)||void 0===e||e.removeEventListener("touchstart",this._closeTouchStartListener),this._componentItem.off("titleChanged",this._tabTitleChangedListener),this.reorderEnabled&&this.disableReorder(),this._element.remove()}setBlurred(){this._element.classList.remove("lm_focused"),this._titleElement.classList.remove("lm_focused")}setFocused(){this._element.classList.add("lm_focused"),this._titleElement.classList.add("lm_focused")}onDragStart(t,e){if(void 0===this._dragListener)throw new J("TODSDLU10093");if(void 0===this._dragStartEvent)throw new J("TODS23309");this._dragStartEvent(t,e,this._dragListener,this.componentItem)}onContentItemDestroy(){void 0!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=void 0)}onTabClickDown(t){const e=t.target;e!==this._element&&e!==this._titleElement||(0===t.button?this.notifyFocus():1===t.button&&this._componentItem.isClosable&&this.notifyClose())}onTabTouchStart(t){t.target===this._element&&this.notifyFocus()}onCloseClick(){this.notifyClose()}onCloseTouchStart(){this.notifyClose()}notifyClose(){if(void 0===this._closeEvent)throw new J("TNC15007");this._closeEvent(this._componentItem)}notifyFocus(){if(void 0===this._focusEvent)throw new J("TNA15007");this._focusEvent(this._componentItem)}enableReorder(){this._dragListener=new Zt(this._element,[this._titleElement]),this._dragListener.on("dragStart",this._dragStartListener),this._componentItem.on("destroy",this._contentItemDestroyListener)}disableReorder(){if(void 0===this._dragListener)throw new J("TDR87745");this._componentItem.off("destroy",this._contentItemDestroyListener),this._dragListener.off("dragStart",this._dragStartListener),this._dragListener=void 0}}class Qt{constructor(t,e,i,n,o){this._layoutManager=t,this._componentRemoveEvent=e,this._componentFocusEvent=i,this._componentDragStartEvent=n,this._dropdownActiveChangedEvent=o,this._tabs=[],this._lastVisibleTabIndex=-1,this._dropdownActive=!1,this._element=document.createElement("section"),this._element.classList.add("lm_tabs"),this._dropdownElement=document.createElement("section"),this._dropdownElement.classList.add("lm_tabdropdown_list"),this._dropdownElement.style.display="none"}get tabs(){return this._tabs}get tabCount(){return this._tabs.length}get lastVisibleTabIndex(){return this._lastVisibleTabIndex}get element(){return this._element}get dropdownElement(){return this._dropdownElement}get dropdownActive(){return this._dropdownActive}destroy(){for(let t=0;tthis.handleTabCloseEvent(t)),(t=>this.handleTabFocusEvent(t)),((t,e,i,n)=>this.handleTabDragStartEvent(t,e,i,n)));void 0===e&&(e=this._tabs.length),this._tabs.splice(e,0,i),ethis._lastVisibleTabIndex){const t=this._tabs[e];for(let t=e;t>0;t--)this._tabs[t]=this._tabs[t-1];this._tabs[0]=t}}updateTabSizes(t,e){let i=!1;this.tryUpdateTabSizes(i,t,e)||(i=!0,this.tryUpdateTabSizes(i,t,e)),i!==this._dropdownActive&&(this._dropdownActive=i,this._dropdownActiveChangedEvent())}tryUpdateTabSizes(t,e,i){if(this._tabs.length>0){if(void 0===i)throw new Error("non-empty tabs must have active component item");let n=0,o=!1;const s=this._layoutManager.layoutConfig.settings.tabOverlapAllowance,r=this._tabs.indexOf(i.tab),a=this._tabs[r];this._lastVisibleTabIndex=-1;for(let i=0;ie){if(o)i===r&&(l.style.zIndex="auto",l.style.marginLeft="",l.parentElement!==this._element&&this._element.appendChild(l));else{let t;if(t=r>0&&r<=i?(d-e)/(i-1):(d-e)/i,tthis.onClick(t),this._touchStartListener=t=>this.onTouchStart(t),this._rowColumnClosable=!0,this._closeButton=null,this._popoutButton=null,this._tabsContainer=new Qt(this._layoutManager,(t=>this.handleTabInitiatedComponentRemoveEvent(t)),(t=>this.handleTabInitiatedComponentFocusEvent(t)),((t,e,i,n)=>this.handleTabInitiatedDragStartEvent(t,e,i,n)),(()=>this.processTabDropdownActiveChanged())),this._show=i.show,this._popoutEnabled=i.popoutEnabled,this._popoutLabel=i.popoutLabel,this._maximiseEnabled=i.maximiseEnabled,this._maximiseLabel=i.maximiseLabel,this._minimiseEnabled=i.minimiseEnabled,this._minimiseLabel=i.minimiseLabel,this._closeEnabled=i.closeEnabled,this._closeLabel=i.closeLabel,this._tabDropdownEnabled=i.tabDropdownEnabled,this._tabDropdownLabel=i.tabDropdownLabel,this.setSide(i.side),this._canRemoveComponent=this._configClosable,this._element=document.createElement("section"),this._element.classList.add("lm_header"),this._controlsContainerElement=document.createElement("section"),this._controlsContainerElement.classList.add("lm_controls"),this._element.appendChild(this._tabsContainer.element),this._element.appendChild(this._controlsContainerElement),this._element.appendChild(this._tabsContainer.dropdownElement),this._element.addEventListener("click",this._clickListener,{passive:!0}),this._element.addEventListener("touchstart",this._touchStartListener,{passive:!0}),this._documentMouseUpListener=()=>this._tabsContainer.hideAdditionalTabsDropdown(),globalThis.document.addEventListener("mouseup",this._documentMouseUpListener,{passive:!0}),this._tabControlOffset=this._layoutManager.layoutConfig.settings.tabControlOffset,this._tabDropdownEnabled&&(this._tabDropdownButton=new Kt(this,this._tabDropdownLabel,"lm_tabdropdown",(()=>this._tabsContainer.showAdditionalTabsDropdown()))),this._popoutEnabled&&(this._popoutButton=new Kt(this,this._popoutLabel,"lm_popout",(()=>this.handleButtonPopoutEvent()))),this._maximiseEnabled&&(this._maximiseButton=new Kt(this,this._maximiseLabel,"lm_maximise",(t=>this.handleButtonMaximiseToggleEvent(t)))),this._configClosable&&(this._closeButton=new Kt(this,this._closeLabel,"lm_close",(()=>s()))),this.processTabDropdownActiveChanged()}get show(){return this._show}get side(){return this._side}get leftRightSided(){return this._leftRightSided}get layoutManager(){return this._layoutManager}get parent(){return this._parent}get tabs(){return this._tabsContainer.tabs}get lastVisibleTabIndex(){return this._tabsContainer.lastVisibleTabIndex}get element(){return this._element}get tabsContainerElement(){return this._tabsContainer.element}get controlsContainerElement(){return this._controlsContainerElement}destroy(){this.emit("destroy"),this._popoutEvent=void 0,this._maximiseToggleEvent=void 0,this._clickEvent=void 0,this._touchStartEvent=void 0,this._componentRemoveEvent=void 0,this._componentFocusEvent=void 0,this._componentDragStartEvent=void 0,this._tabsContainer.destroy(),globalThis.document.removeEventListener("mouseup",this._documentMouseUpListener),this._element.remove()}createTab(t,e){this._tabsContainer.createTab(t,e)}removeTab(t){this._tabsContainer.removeTab(t)}processActiveComponentChanged(t){this._tabsContainer.processActiveComponentChanged(t),this.updateTabSizes()}setSide(t){this._side=t,this._leftRightSided=[nt.right,nt.left].includes(this._side)}setRowColumnClosable(t){this._rowColumnClosable=t,this.updateClosability()}updateClosability(){let t;if(this._configClosable)if(this._rowColumnClosable){t=!0;const e=this.tabs.length;for(let i=0;i1}applyFocusedValue(t){t?this._element.classList.add("lm_focused"):this._element.classList.remove("lm_focused")}processMaximised(){if(void 0===this._maximiseButton)throw new J("HPMAX16997");this._maximiseButton.element.setAttribute("title",this._minimiseLabel)}processMinimised(){if(void 0===this._maximiseButton)throw new J("HPMIN16997");this._maximiseButton.element.setAttribute("title",this._maximiseLabel)}updateTabSizes(){if(this._tabsContainer.tabCount>0){const t=this._show?this._layoutManager.layoutConfig.dimensions.headerHeight:0;let e;this._leftRightSided?(this._element.style.height="",this._element.style.width=zt(t)):(this._element.style.width="",this._element.style.height=zt(t)),e=this._leftRightSided?this._element.offsetHeight-this._controlsContainerElement.offsetHeight-this._tabControlOffset:this._element.offsetWidth-this._controlsContainerElement.offsetWidth-this._tabControlOffset,this._tabsContainer.updateTabSizes(e,this._getActiveComponentItemEvent())}}handleTabInitiatedComponentRemoveEvent(t){if(this._canRemoveComponent){if(void 0===this._componentRemoveEvent)throw new J("HHTCE22294");this._componentRemoveEvent(t)}}handleTabInitiatedComponentFocusEvent(t){if(void 0===this._componentFocusEvent)throw new J("HHTAE22294");this._componentFocusEvent(t)}handleTabInitiatedDragStartEvent(t,e,i,n){if(this._canRemoveComponent){if(void 0===this._componentDragStartEvent)throw new J("HHTDSE22294");this._componentDragStartEvent(t,e,i,n)}else i.cancelDrag()}processTabDropdownActiveChanged(){void 0!==this._tabDropdownButton&&Dt(this._tabDropdownButton.element,this._tabsContainer.dropdownActive)}handleButtonPopoutEvent(){if(this._layoutManager.layoutConfig.settings.popoutWholeStack){if(void 0===this._popoutEvent)throw new J("HHBPOE17834");this._popoutEvent()}else{const t=this._getActiveComponentItemEvent();t&&t.popout()}}handleButtonMaximiseToggleEvent(t){if(void 0===this._maximiseToggleEvent)throw new J("HHBMTE16834");this._maximiseToggleEvent()}onClick(t){t.target===this._element&&this.notifyClick(t)}onTouchStart(t){t.target===this._element&&this.notifyTouchStart(t)}notifyClick(t){if(void 0===this._clickEvent)throw new J("HNHC46834");this._clickEvent(t)}notifyTouchStart(t){if(void 0===this._touchStartEvent)throw new J("HNHTS46834");this._touchStartEvent(t)}}class ee extends $t{constructor(t,e,i){var n,o,s,r,a,l,h,d,c,m,u,p,g,f,v,_,y,C,w;super(t,e,i,ee.createElement(document)),this._headerSideChanged=!1,this._resizeListener=()=>this.handleResize(),this._maximisedListener=()=>this.handleMaximised(),this._minimisedListener=()=>this.handleMinimised(),this._headerConfig=e.header;const I=t.layoutConfig.header,b=e.content;let S;if(1!==b.length)S=void 0;else{S=b[0].header}this._initialWantMaximise=e.maximised,this._initialActiveItemIndex=null!==(n=e.activeItemIndex)&&void 0!==n?n:0;const E=null!==(r=null!==(s=null===(o=this._headerConfig)||void 0===o?void 0:o.show)&&void 0!==s?s:null==S?void 0:S.show)&&void 0!==r?r:I.show,x=null!==(h=null!==(l=null===(a=this._headerConfig)||void 0===a?void 0:a.popout)&&void 0!==l?l:null==S?void 0:S.popout)&&void 0!==h?h:I.popout,L=null!==(m=null!==(c=null===(d=this._headerConfig)||void 0===d?void 0:d.maximise)&&void 0!==c?c:null==S?void 0:S.maximise)&&void 0!==m?m:I.maximise,z=null!==(g=null!==(p=null===(u=this._headerConfig)||void 0===u?void 0:u.close)&&void 0!==p?p:null==S?void 0:S.close)&&void 0!==g?g:I.close,M=null!==(_=null!==(v=null===(f=this._headerConfig)||void 0===f?void 0:f.minimise)&&void 0!==v?v:null==S?void 0:S.minimise)&&void 0!==_?_:I.minimise,P=null!==(w=null!==(C=null===(y=this._headerConfig)||void 0===y?void 0:y.tabDropdown)&&void 0!==C?C:null==S?void 0:S.tabDropdown)&&void 0!==w?w:I.tabDropdown;this._maximisedEnabled=!1!==L;const T={show:!1!==E,side:!1===E?nt.top:E,popoutEnabled:!1!==x,popoutLabel:!1===x?"":x,maximiseEnabled:this._maximisedEnabled,maximiseLabel:!1===L?"":L,closeEnabled:!1!==z,closeLabel:!1===z?"":z,minimiseEnabled:!0,minimiseLabel:M,tabDropdownEnabled:!1!==P,tabDropdownLabel:!1===P?"":P};this._header=new te(t,this,T,e.isClosable&&!1!==z,(()=>this.getActiveComponentItem()),(()=>this.remove()),(()=>this.handlePopoutEvent()),(()=>this.toggleMaximise()),(t=>this.handleHeaderClickEvent(t)),(t=>this.handleHeaderTouchStartEvent(t)),(t=>this.handleHeaderComponentRemoveEvent(t)),(t=>this.handleHeaderComponentFocusEvent(t)),((t,e,i,n)=>this.handleHeaderComponentStartDragEvent(t,e,i,n))),this.isStack=!0,this._childElementContainer=document.createElement("section"),this._childElementContainer.classList.add("lm_items"),this.on("resize",this._resizeListener),this._maximisedEnabled&&(this.on("maximised",this._maximisedListener),this.on("minimised",this._minimisedListener)),this.element.appendChild(this._header.element),this.element.appendChild(this._childElementContainer),this.setupHeaderPosition(),this._header.updateClosability()}get childElementContainer(){return this._childElementContainer}get header(){return this._header}get headerShow(){return this._header.show}get headerSide(){return this._header.side}get headerLeftRightSided(){return this._header.leftRightSided}get contentAreaDimensions(){return this._contentAreaDimensions}get initialWantMaximise(){return this._initialWantMaximise}get isMaximised(){return this===this.layoutManager.maximisedStack}get stackParent(){if(!this.parent)throw new Error("Stack should always have a parent");return this.parent}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}init(){if(!0===this.isInitialised)return;this.updateNodeSize();for(let t=0;t0){if(this._initialActiveItemIndex<0||this._initialActiveItemIndex>=e)throw new Error(`ActiveItemIndex out of range: ${this._initialActiveItemIndex} id: ${this.id}`);for(let i=0;ithis.contentItems.length)throw e-=1,new X("SAC99728");if(t instanceof jt)return e=super.addChild(t,e),this._childElementContainer.appendChild(t.element),this._header.createTab(t,e),this.setActiveComponentItem(t,i),this._header.updateTabSizes(),this.updateSize(!1),t.container.setBaseLogicalZIndex(),this._header.updateClosability(),this.emitStateChangedEvent(),e;throw new X("SACC88532")}removeChild(t,e){const i=t,n=this.contentItems.indexOf(i),o=1===this.contentItems.length;if(this._activeComponentItem===i&&(i.focused&&i.blur(),!o)){const t=0===n?1:n-1;this.setActiveComponentItem(this.contentItems[t],!1)}this._header.removeTab(i),super.removeChild(i,e),o||this._header.updateClosability(),this.emitStateChangedEvent()}toggleMaximise(){this.isMaximised?this.minimise():this.maximise()}maximise(){if(!this.isMaximised){this.layoutManager.setMaximisedStack(this);const t=this.contentItems,e=t.length;for(let i=0;i0&&void 0===t)throw new Error("expected non-empty stack to have an active component item");return{type:"stack",content:this.calculateConfigContent(),size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,isClosable:this.isClosable,maximised:this.isMaximised,header:this.createHeaderConfig(),activeItemIndex:t}}onDrop(t,e){if("header"===this._dropSegment){if(this.resetHeaderDropZone(),void 0===this._dropIndex)throw new J("SODDI68990");return void this.addChild(t,this._dropIndex)}if("body"===this._dropSegment)return void this.addChild(t,0,!0);const i="top"===this._dropSegment||"bottom"===this._dropSegment,n="left"===this._dropSegment||"right"===this._dropSegment,o="top"===this._dropSegment||"left"===this._dropSegment,s=i&&this.stackParent.isColumn||n&&this.stackParent.isRow;if(t.isComponent){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createAndInitContentItem(e,this);i.addChild(t),t=i}if(t.type===at.row||t.type===at.column){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}if(s){const e=this.stackParent.contentItems.indexOf(this);this.stackParent.addChild(t,o?e:e+1,!0),this.size*=.5,t.size=this.size,t.sizeUnit=this.sizeUnit,this.stackParent.updateSize(!1)}else{const e=i?at.column:at.row,n=ct.createDefault(e),s=this.layoutManager.createContentItem(n,this);this.stackParent.replaceChild(this,s),s.addChild(t,o?0:void 0,!0),s.addChild(this,o?void 0:0,!0),this.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}highlightDropZone(t,e){for(const i in this._contentAreaDimensions){const n=i,o=this._contentAreaDimensions[n].hoverArea;if(o.x1t&&o.y1e)return void("header"===n?(this._dropSegment="header",this.highlightHeaderDropZone(this._header.leftRightSided?e:t)):(this.resetHeaderDropZone(),this.highlightBodyDropZone(n)))}}getArea(){if("none"===this.element.style.display)return null;const t=super.getElementArea(this._header.element),e=super.getElementArea(this._childElementContainer);if(null===t||null===e)throw new K("SGAHC13086");const i=e.x2-e.x1,n=e.y2-e.y1;return this._contentAreaDimensions={header:{hoverArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2},highlightArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2}}},0===this.contentItems.length?(this._contentAreaDimensions.body={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2}},super.getElementArea(this.element)):(this._contentAreaDimensions.left={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x1+.25*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x1+.5*i,y2:e.y2}},this._contentAreaDimensions.top={hoverArea:{x1:e.x1+.25*i,y1:e.y1,x2:e.x1+.75*i,y2:e.y1+.5*n},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y1+.5*n}},this._contentAreaDimensions.right={hoverArea:{x1:e.x1+.75*i,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1+.5*i,y1:e.y1,x2:e.x2,y2:e.y2}},this._contentAreaDimensions.bottom={hoverArea:{x1:e.x1+.25*i,y1:e.y1+.5*n,x2:e.x1+.75*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1+.5*n,x2:e.x2,y2:e.y2}},super.getElementArea(this.element))}positionHeader(t){this._header.side!==t&&(this._header.setSide(t),this._headerSideChanged=!0,this.setupHeaderPosition())}updateNodeSize(){if("none"!==this.element.style.display){const t=kt(this.element);if(this._header.show){t[this._header.leftRightSided?it.width:it.height]-=this.layoutManager.layoutConfig.dimensions.headerHeight}this._childElementContainer.style.width=zt(t.width),this._childElementContainer.style.height=zt(t.height);for(let e=0;e=o&&t({...t,[e]:i});async function s(t,e){return(await Promise.all(e.map((async([e,i])=>[e,await t(i,e)])))).reduce(o,{})}n.mapEntriesAsync=s,n.mapValuesAsync=async function(t,e){let i;return i=e instanceof Map?[...e.entries()]:Object.entries(e),s(t,i)};var r,a,l,h,d=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldSet||function(t,e,i,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(t,i):o?o.value=i:e.set(t,i),i},c=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldGet||function(t,e,i,n){if("a"===i&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?n:"a"===i?n.call(t):n?n.value:e.get(t)};Object.defineProperty(i,"__esModule",{value:!0});var m=i.DefaultLayoutManager=void 0;const u=n;class p{constructor(t){a.set(this,void 0),l.set(this,new Map),d(this,a,t,"f")}size(){return c(this,l,"f").size}async applyLayoutSnapshot({layouts:t}){if(Object.keys(t).length>1)throw new Error("[LayoutManager] Tried to call applyLayoutSnapshot with more than 1 layout. When implementing multiple layouts via overridden LayoutManager class, you must override and fully implement the applyLayoutSnapshot method without calling super.applyLayoutSnapshot().");const[[e,i]]=Object.entries(t);await p.createLayout(this,{layoutName:e,layout:i})}async showLayout({layoutName:t}){}async getLayoutSnapshot(){return{layouts:await(0,u.mapValuesAsync)((t=>t.getFrameSnapshot()),c(this,l,"f"))}}async removeLayout({layoutName:t}){}getLayoutIdentityForView(t){const e=[...c(this,l,"f").values()].find((e=>e.getCurrentViews().some((e=>e.name===t.name&&e.uuid===t.uuid))));return e?.identity??void 0}isLayoutVisible({layoutName:t}){return c(p,r,"m",h).call(p,this,t).isVisible()}resolveLayoutIdentity(t){if(t&&"layoutName"in t)return t;const e=[...c(this,l,"f").values()];if(1===e.length)return e[0].identity;const i=e.find((t=>t.isVisible()));return i?.identity??void 0}static async resolveLayout(t,e){const i=t.resolveLayoutIdentity(e);if(void 0===i||!("layoutName"in i))throw new Error("[layout-manager] resolveLayout: Could not resolve the layout identity. Make sure you include 'layoutName' in the identity object.");return c(p,r,"m",h).call(p,t,i.layoutName)}static async handleSharedView(t,e,i){await(0,u.mapValuesAsync)((async t=>{if(t.identity.layoutName!==e.layoutName){const e=t.getCurrentViews().find((t=>t.name===i.name));e&&await t.onViewDetached({viewIdentity:e,target:null}).catch(console.error)}}),c(t,l,"f"))}static async handleLastViewRemoved(t,e){await t.removeLayout(e),await c(t,a,"f").handleLastViewRemoved(t)}static async destroyLayout(t,{layoutName:e}){await c(p,r,"m",h).call(p,t,e).destroy(),c(t,l,"f").delete(e)}static async createLayout(t,e){const{layoutName:i}=e;if(c(t,l,"f").has(i))throw new Error(`Layout name ${i} already exists`);await c(t,a,"f").createLayout(e,t)}static registerLayout(t,e,i){c(t,l,"f").set(e,i)}static getAllLayouts(t){return[...c(t,l,"f").values()]}static setInitialSnapshot(t,e){c(t,a,"f").setInitialSnapshot(e)}static createClosedConstructor(...t){return class extends p{constructor(){super(...t)}}}}m=i.DefaultLayoutManager=p,r=p,a=new WeakMap,l=new WeakMap,h=function(t,e){const i=c(t,l,"f").get(e);if(!i)throw new Error(`[layout-manager] getLayoutByName: Could not locate layout with name '${e}'`);return i};var g={},f={},v={};Object.defineProperty(v,"__esModule",{value:!0}),v.ReversibleMap=void 0;v.ReversibleMap=class{constructor(){this.valueToKey=new Map,this.keyToValue=new Map,this.setUnique=(t,e)=>{if(this.hasKey(t)||this.hasValue(e))throw new Error("Key or value already in the map.");this.keyToValue.set(t,e),this.valueToKey.set(e,t)},this.getKey=t=>{const e=this.valueToKey.get(t);if(!e)throw new Error("Value not found in the map.");return e},this.deleteKey=t=>{const e=this.getValue(t);return this.keyToValue.delete(t),this.valueToKey.delete(e),e},this.deleteValue=t=>{const e=this.getKey(t);return this.keyToValue.delete(e),this.valueToKey.delete(t),e},this.hasKey=t=>this.keyToValue.has(t),this.hasValue=t=>this.valueToKey.has(t)}getValue(t){const e=this.keyToValue.get(t);if(!e)throw new Error("Key not found in the map.");return e}},Object.defineProperty(f,"__esModule",{value:!0});var _=f.LayoutContentCache=void 0;const y=t.lazy,C=v;class w{constructor(){this.contentItemCache=new C.ReversibleMap,this.contentItemCacheId=0,this.createCacheKey=()=>{const t=`entity-${this.contentItemCacheId.toString()}`;return this.contentItemCacheId+=1,t},this.hasKey=t=>this.contentItemCache.hasKey(t),this.getItemOrUndefined=t=>{try{return this.getContentItemOrThrow(t)}catch(t){return}},this.getContentItemOrThrow=(t,e)=>{if(!this.contentItemCache.hasKey(t))throw new Error("Layout component has been destroyed or detached from the current layout.");const i=this.contentItemCache.getValue(t);if(e&&!e.includes(i.type))throw new Error(`Layout item is not the expected type. Expected ${e.join(", ")}, got ${i.type}.`);return i},this.getOrCreateEntityId=t=>{if(this.contentItemCache.hasValue(t))return this.contentItemCache.getKey(t);t.onDestroyed((()=>{this.contentItemCache.deleteValue(t)}));const e=this.createCacheKey();return this.contentItemCache.setUnique(e,t),e}}static getSingleInstance(){return w.singleton.getValue()}}_=f.LayoutContentCache=w,w.singleton=new y.Lazy((()=>new w));var I={},b={};!function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.getAdjacentStacks=t.doShareEdge=t.getAdjacentItem=void 0;t.getAdjacentItem=(e,i)=>{const{parent:n}=e;if(e.isRoot()||!n)return;const o=["top","bottom"].includes(i)?"column":"row",s=["top","left"].includes(i)?-1:1;if(n.type===o){const t=n.contentItems.indexOf(e)+s;if(t>=0&&t{const n=t.getBounds(),o=e.getBounds();if(!n||!o)return!1;if(["top","bottom"].includes(i)){return!(n.righto.right)}return!(n.bottomo.bottom)};t.getAdjacentStacks=(e,i)=>{const n=["top","bottom"].includes(i)?"row":"column",o=s=>"stack"===s.type?(0,t.doShareEdge)(e,s,i)?[s]:[]:"root"===s.type||"ground"===s.type?[]:s.type===n?s.contentItems.map((t=>o(t))).flat():s.type!==n?["top","right"].includes(i)?o(s.contentItems[s.contentItems.length-1]):o(s.contentItems[0]):[],s=(0,t.getAdjacentItem)(e,i);return s?o(s):[]}}(b);var S=t.commonjsGlobal&&t.commonjsGlobal.__decorate||function(t,e,i,n){var o,s=arguments.length,r=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(s<3?o(r):s>3?o(e,i,r):o(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};Object.defineProperty(I,"__esModule",{value:!0}),I.LayoutEntitiesController=void 0;const E=t.decorators,x=b,L=i;class z{constructor(t,e,i){this.wire=t,this.layoutManager=e,this.layoutContentCache=i,this.analytics=t=>{this.wire.sendAction(`layout-controller-${t}`).catch((()=>{}))},this.getLayoutIdentityForViewOrThrow=async t=>{const e=this.layoutManager.getLayoutIdentityForView(t);if(!e)throw new Error(`View identity ${t.name} is not attached to any layouts.`);return e},this.getRoot=async t=>{this.analytics("get-root");const e=(await this.getLayout(t)).getRoot();return{type:e.type,entityId:this.layoutContentCache.getOrCreateEntityId(e)}},this.getStackByView=async t=>{this.analytics("get-stack-by-view");const e=await this.getLayoutIdentityForViewOrThrow(t),i=(await this.getLayout(e)).getStackByView(t);if("stack"===i?.type)return{entityId:this.layoutContentCache.getOrCreateEntityId(i),type:"stack"}},this.getStackViews=t=>{this.analytics("get-stack-views");return this.layoutContentCache.getContentItemOrThrow(t,["stack"]).contentItems.map((t=>({name:t.viewName,uuid:this.wire.me.uuid})))},this.isRoot=t=>{this.analytics("is-root");return this.layoutContentCache.getContentItemOrThrow(t).isRoot()},this.exists=t=>(this.analytics("exists"),this.layoutContentCache.hasKey(t)),this.addViewToStack=async(t,e,{index:i}={index:0})=>{this.analytics("add-view-to-stack");const n=this.layoutContentCache.getContentItemOrThrow(t);if(i&&i>n.contentItems.length+1)throw new Error(`Index '${i}' out of range, please exclude the index or specify a number between 0 and ${n.contentItems.length}`);const o={id:t,index:i},{identity:s}=await n.layout.platformCreateView(e,{location:o});return s},this.findViewInStack=(t,e)=>t.contentItems.find((t=>t.viewName===e.name)),this.removeViewFromStack=async(t,e)=>{this.analytics("remove-view-from-stack");const i=this.layoutContentCache.getContentItemOrThrow(t,["stack"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to remove a view ('${e.name}') which does not belong to the stack.`);await n.layout.platformCloseView(e)},this.createAdjacentStack=async(t,e,{position:i="right"}={})=>{if(this.analytics("create-adjacent-stack"),!Array.isArray(e)||0===e.length)throw new Error('The parameter "views" must be an array with at least 1 element.');if(!["top","bottom","left","right"].includes(i))throw new Error(`Invalid position '${i}' specified.`);const n=this.layoutContentCache.getContentItemOrThrow(t).createAdjacentStack({position:i}),o=this.layoutContentCache.getOrCreateEntityId(n);return await Promise.all(e.reverse().map((t=>this.addViewToStack(o,t)))),o},this.getAdjacentStacks=async({targetId:t,edge:e})=>{this.analytics("get-adjacent-stacks");const i=this.layoutContentCache.getContentItemOrThrow(t);return(0,x.getAdjacentStacks)(i,e).map((t=>({entityId:this.layoutContentCache.getOrCreateEntityId(t)})))},this.setStackActiveView=async(t,e)=>{this.analytics("set-stack-active-view");const i=this.layoutContentCache.getContentItemOrThrow(t,["stack"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to set a view ('${e.name}') as active when it does not belong to the stack.`);i.setActiveContentItem(n,!0)}}async getLayout(t){const e=await L.DefaultLayoutManager.resolveLayout(this.layoutManager,t);if(!e)throw new Error(`Could not resolve target layout identity ${JSON.stringify(t)}`);return e}getContent(t){this.analytics("get-content");return this.layoutContentCache.getContentItemOrThrow(t,["column","row"]).contentItems.map((t=>({type:t.type,entityId:this.layoutContentCache.getOrCreateEntityId(t)})))}getParent(t){this.analytics("get-parent");const e=this.layoutContentCache.getContentItemOrThrow(t);if(!e.isRoot())return e.parent?.contentItems.includes(e)?{type:e.parent.type,entityId:this.layoutContentCache.getOrCreateEntityId(e.parent)}:void 0}}S([(0,E.expose)()],z.prototype,"getLayoutIdentityForViewOrThrow",void 0),S([(0,E.expose)()],z.prototype,"getRoot",void 0),S([(0,E.expose)()],z.prototype,"getStackByView",void 0),S([(0,E.expose)()],z.prototype,"getStackViews",void 0),S([(0,E.expose)()],z.prototype,"getContent",null),S([(0,E.expose)()],z.prototype,"getParent",null),S([(0,E.expose)()],z.prototype,"isRoot",void 0),S([(0,E.expose)()],z.prototype,"exists",void 0),S([(0,E.expose)()],z.prototype,"addViewToStack",void 0),S([(0,E.expose)()],z.prototype,"removeViewFromStack",void 0),S([(0,E.expose)()],z.prototype,"createAdjacentStack",void 0),S([(0,E.expose)()],z.prototype,"getAdjacentStacks",void 0),S([(0,E.expose)()],z.prototype,"setStackActiveView",void 0),I.LayoutEntitiesController=z,Object.defineProperty(g,"__esModule",{value:!0});var M=g.initLayoutEndpoints=void 0;const P=t.apiExposer,T=t.layout_constants,A=f,k=I,D=i;M=g.initLayoutEndpoints=async function(t,e){const i=t.getFin(),n=await i.Platform.getCurrentSync().getClient(),o=new P.ChannelsExposer(n);await new P.ApiExposer(o).exposeInstance(new k.LayoutEntitiesController(t,e,A.LayoutContentCache.getSingleInstance()),{id:T.LAYOUT_CONTROLLER_ID}),await async function(t,e){const i=t=>async i=>{const n=await D.DefaultLayoutManager.resolveLayout(e,i.target);if(!n)throw new Error(`Could not resolve the layout target from payload ${JSON.stringify(i)}`);return t(n,i)},n=(e,n)=>{t.register(e,i(n))},o=(t,e)=>{n(t,e)};n("replace-view",((t,e)=>t.replaceView(e))),n("replace-layout",((t,{layout:e})=>t.replaceLayout(e))),n("add-view",((t,e)=>t.insertView(e))),o("layout-add-view",((t,{viewOptions:e,location:i,targetView:n})=>t.platformCreateView(e,{location:i,targetView:n}))),n("close-view",((t,e)=>t.cleanupView(e.viewIdentity))),o("layout-close-view",((t,e)=>t.platformCloseView(e.viewIdentity))),n("apply-preset-layout",((t,e)=>t.applyPreset(e))),n("get-layout-views",(t=>t.getCurrentViews())),n("get-frame-snapshot",(t=>t.getFrameSnapshot())),n("is-visible",(t=>t.isVisible())),n("destroy",(t=>t.destroy())),t.register("get-layout-snapshot",(()=>e.getLayoutSnapshot()))}(n,e)};var R={};Object.defineProperty(R,"__esModule",{value:!0});var U=R.BaseLayout=void 0;U=R.BaseLayout=class{};var O={};Object.defineProperty(O,"__esModule",{value:!0});var V=O.DOMEmitter=void 0;V=O.DOMEmitter=class{constructor(t){this.container=t}dispatchLocalEvent(t,e){const i={...e,type:t,tabSelector:`tab-${e.name}`,containerSelector:`container-${e.name}`,topic:"openfin-DOM-event"};this.container.dispatchEvent(new CustomEvent(t,{detail:i}))}};var B={};Object.defineProperty(B,"__esModule",{value:!0});var H=B.mapLayoutContentItemsImmutableSync=B.mapLayoutContentItemsImmutable=W=B.isVisible=void 0;var W=B.isVisible=t=>(0!==t.offsetWidth||0!==t.offsetHeight)&&"hidden"!==window.getComputedStyle(t).visibility&&t.offsetTop>=0&&t.offsetLeft>=0&&t.offsetTop<=window.innerHeight&&t.offsetLeft<=window.innerWidth;const F=t=>"type"in t&&"component"===t.type;B.mapLayoutContentItemsImmutable=async function t(e,i){return F(i)?e(i):{...i,content:await Promise.all(i.content?.map((i=>t(e,i))))}},H=B.mapLayoutContentItemsImmutableSync=function t(e,i){return F(i)?e(i):{...i,content:i.content?.map((i=>t(e,i)))}};class N extends Error{constructor(t,e){super(e),this.type=t}}class G extends N{constructor(t,e){super("Configuration",t),this.node=e}}class j extends N{constructor(t){super("PopoutBlocked",t)}}class $ extends N{constructor(t){super("API",t)}}class Z extends N{constructor(t){super("Bind",t)}}class q extends Error{constructor(t,e,i){super(`${t}: ${e}${void 0===i?"":": "+i}`)}}class X extends q{constructor(t,e){super("Assert",t,e)}}class Y extends q{constructor(t,e,i){super("UnreachableCase",t,`${e}${void 0===i?"":": "+i}`)}}class K extends q{constructor(t,e){super("UnexpectedNull",t,e)}}class J extends q{constructor(t,e){super("UnexpectedUndefined",t,e)}}var Q;!function(t){let e=!1;const i={PopoutCannotBeCreatedWithGroundItemConfig:{id:0,default:"Popout cannot be created with ground ItemConfig"},PleaseRegisterAConstructorFunction:{id:1,default:"Please register a constructor function"},ComponentTypeNotRegisteredAndBindComponentEventHandlerNotAssigned:{id:2,default:"Component type not registered and BindComponentEvent handler not assigned"},ComponentIsAlreadyRegistered:{id:3,default:"Component is already registered"},ComponentIsNotVirtuable:{id:4,default:"Component is not virtuable. Requires rootHtmlElement field/getter"},VirtualComponentDoesNotHaveRootHtmlElement:{id:5,default:'Virtual component does not have getter "rootHtmlElement"'},ItemConfigIsNotTypeComponent:{id:6,default:"ItemConfig is not of type component"},InvalidNumberPartInSizeString:{id:7,default:"Invalid number part in size string"},UnknownUnitInSizeString:{id:8,default:"Unknown unit in size string"},UnsupportedUnitInSizeString:{id:9,default:"Unsupported unit in size string"}};t.idCount=Object.keys(i).length;const n=Object.values(i);t.checkInitialise=function(){if(!e)for(let e=0;e="0"&&t<="9"}function Tt(t,e){const i=zt(e);t.style.width=i}function At(t,e){const i=zt(e);t.style.height=i}function kt(t){return{width:t.offsetWidth,height:t.offsetHeight}}function Dt(t,e){t.style.display=e?"":"none"}function Rt(t,e){if(void 0!==e)for(const i in e)if(e.hasOwnProperty(i)){const n=e[i],o=t[i];t[i]=Ut(o,n)}return t}function Ut(t,e){if("object"!=typeof e)return e;if(Array.isArray(e)){const t=e.length,i=new Array(t);for(let n=0;n36)throw new Error("Too many keys in config minifier map")},t.translateObject=n}(dt||(dt={})),function(t){t.defaults={type:at.ground,content:[],size:1,sizeUnit:ht.Fractional,minSize:void 0,minSizeUnit:ht.Pixel,id:"",isClosable:!0},t.createCopy=function(t,e){switch(t.type){case at.ground:case at.row:case at.column:return gt.createCopy(t,e);case at.stack:return ut.createCopy(t,e);case at.component:return pt.createCopy(t);default:throw new Y("CICC91354",t.type,"Invalid Config Item type specified")}},t.createDefault=function(t){switch(t){case at.ground:throw new X("CICCDR91562");case at.row:case at.column:return gt.createDefault(t);case at.stack:return ut.createDefault();case at.component:return pt.createDefault();default:throw new Y("CICCDD91563",t,"Invalid Config Item type specified")}},t.isComponentItem=function(t){return t.type===at.component},t.isStackItem=function(t){return t.type===at.stack},t.isGroundItem=function(t){return t.type===at.ground}}(ct||(ct={})),function(t){t.defaultMaximised=!1,function(t){t.createCopy=function(t,e){return void 0===t?void 0:{show:null!=e?e:t.show,popout:t.popout,close:t.close,maximise:t.maximise,minimise:t.minimise,tabDropdown:t.tabDropdown}}}(t.Header||(t.Header={}))}(mt||(mt={})),function(t){function e(t){const e=t.length,i=new Array(e);for(let n=0;n"__glMaximised"===t));t>0&&(o=!0,n=n.splice(t,1)),e=n.length>0?n[0]:ct.defaults.id}else e=n;return i=void 0!==t.maximised?t.maximised:o,{id:e,maximised:i}}}(wt||(wt={})),function(t){function e(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0;return{resolved:!0,root:Et.resolve(i),openPopouts:t.resolveOpenPopouts(e.openPopouts),dimensions:t.Dimensions.resolve(e.dimensions),settings:t.Settings.resolve(e.settings),header:t.Header.resolve(e.header,e.settings,e.labels)}}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:Lt.fromResolvedArray(e.openPopouts),settings:_t.Settings.createCopy(e.settings),dimensions:t.Dimensions.fromResolved(e.dimensions),header:_t.Header.createCopy(e.header)}},t.isResolved=function(t){const e=t;return void 0!==e.resolved&&!0===e.resolved},t.resolveOpenPopouts=function(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0,{root:Et.resolve(o),openPopouts:xt.resolveOpenPopouts(e.openPopouts),dimensions:xt.Dimensions.resolve(e.dimensions),settings:xt.Settings.resolve(e.settings),header:xt.Header.resolve(e.header,e.settings,e.labels),parentId:null!==(i=e.parentId)&&void 0!==i?i:null,indexInParent:null!==(n=e.indexInParent)&&void 0!==n?n:null,window:t.Window.resolve(e.window,e.dimensions),resolved:!0}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:i(e.openPopouts),dimensions:xt.Dimensions.fromResolved(e.dimensions),settings:_t.Settings.createCopy(e.settings),header:_t.Header.createCopy(e.header),parentId:e.parentId,indexInParent:e.indexInParent,window:t.Window.fromResolved(e.window)}},t.fromResolvedArray=i}(Lt||(Lt={}));class Wt{constructor(){this._allEventSubscriptions=[],this._subscriptionsMap=new Map,this.unbind=this.removeEventListener,this.trigger=this.emit}tryBubbleEvent(t,e){}emit(t,...e){let i=this._subscriptionsMap.get(t);if(void 0!==i){i=i.slice();for(let t=0;t0){const n=e.slice();n.unshift(t);const o=this._allEventSubscriptions.slice();for(let t=0;t0?n.contentItems[0]:n,e=0);const o=this._layoutManager.createAndInitContentItem(i,t);t.addChild(o,e),this._layoutManager.layoutConfig.settings.popInOnClose?this._onClose():this.close()}createWindow(){const t=this.createUrl(),e=Math.floor(1e6*Math.random()).toString(36),i=this.serializeWindowFeatures({width:this._initialWindowSize.width,height:this._initialWindowSize.height,innerWidth:this._initialWindowSize.width,innerHeight:this._initialWindowSize.height,menubar:"no",toolbar:"no",location:"no",personalbar:"no",resizable:"yes",scrollbars:"no",status:"no"});if(this._popoutWindow=globalThis.open(t,e,i),this._popoutWindow)this._popoutWindow.addEventListener("load",(()=>this.positionWindow()),{passive:!0}),this._popoutWindow.addEventListener("beforeunload",(()=>{this._layoutManager.layoutConfig.settings.popInOnClose?this.popIn():this._onClose()}),{passive:!0}),this._checkReadyInterval=setInterval((()=>this.checkReady()),10);else if(!0===this._layoutManager.layoutConfig.settings.blockedPopoutsThrowError){throw new j("Popout blocked")}}checkReady(){if(null===this._popoutWindow)throw new K("BPCR01844");this._popoutWindow.__glInstance&&this._popoutWindow.__glInstance.isInitialised&&(this.onInitialised(),void 0!==this._checkReadyInterval&&(clearInterval(this._checkReadyInterval),this._checkReadyInterval=void 0))}serializeWindowFeatures(t){const e=[];for(const i in t)e.push(i+"="+t[i].toString());return e.join(",")}createUrl(){const t="gl-window-config-"+Ot(),e=_t.minifyConfig(this._config);try{localStorage.setItem(t,JSON.stringify(e))}catch(t){throw new Error("Error while writing to localStorage "+function(t){return t instanceof Error?t.message:"string"==typeof t?t:"Unknown Error"}(t))}const i=new URL(location.href);return i.searchParams.set("gl-window",t),i.toString()}positionWindow(){if(null===this._popoutWindow)throw new Error("BrowserPopout.positionWindow: null popoutWindow");this._popoutWindow.moveTo(this._initialWindowSize.left,this._initialWindowSize.top),this._popoutWindow.focus()}onInitialised(){this._isInitialised=!0,this.getGlInstance().on("popIn",(()=>this.popIn())),this.emit("initialised")}_onClose(){setTimeout((()=>this.emit("closed")),50)}}class Gt extends Wt{constructor(t,e,i,n){super(),this.layoutManager=t,this._parent=i,this._element=n,this._popInParentIds=[],this._type=e.type,this._id=e.id,this._isInitialised=!1,this.isGround=!1,this.isRow=!1,this.isColumn=!1,this.isStack=!1,this.isComponent=!1,this.size=e.size,this.sizeUnit=e.sizeUnit,this.minSize=e.minSize,this.minSizeUnit=e.minSizeUnit,this._isClosable=e.isClosable,this._pendingEventPropagations={},this._throttledEvents=["stateChanged"],this._contentItems=this.createContentItems(e.content)}get type(){return this._type}get id(){return this._id}set id(t){this._id=t}get popInParentIds(){return this._popInParentIds}get parent(){return this._parent}get contentItems(){return this._contentItems}get isClosable(){return this._isClosable}get element(){return this._element}get isInitialised(){return this._isInitialised}static isStack(t){return t.isStack}static isComponentItem(t){return t.isComponent}static isComponentParentableItem(t){return t.isStack||t.isGround}removeChild(t,e=!1){const i=this._contentItems.indexOf(t);if(-1===i)throw new Error("Can't remove child item. Unknown content item");if(e||this._contentItems[i].destroy(),this._contentItems.splice(i,1),this._contentItems.length>0)this.updateSize(!1);else if(!this.isGround&&!0===this._isClosable){if(null===this._parent)throw new K("CIUC00874");this._parent.removeChild(this)}}addChild(t,e,i){return null!=e||(e=this._contentItems.length),this._contentItems.splice(e,0,t),t.setParent(this),!0===this._isInitialised&&!1===t._isInitialised&&t.init(),e}replaceChild(t,e,i=!1){const n=this._contentItems.indexOf(t),o=t._element.parentNode;if(-1===n)throw new X("CIRCI23232","Can't replace child. oldChild is not child of this");if(null===o)throw new K("CIRCP23232");if(o.replaceChild(e._element,t._element),!0===i&&(t._parent=null,t.destroy()),this._contentItems[n]=e,e.setParent(this),e.size=t.size,e.sizeUnit=t.sizeUnit,e.minSize=t.minSize,e.minSizeUnit=t.minSizeUnit,null===e._parent)throw new K("CIRCNC45699");!0===e._parent._isInitialised&&!1===e._isInitialised&&e.init(),this.updateSize(!1)}remove(){if(null===this._parent)throw new K("CIR11110");this._parent.removeChild(this)}popout(){const t=Ot(),e=this.layoutManager.createPopoutFromContentItem(this,void 0,t,void 0);return this.emitBaseBubblingEvent("stateChanged"),e}calculateConfigContent(){const t=this._contentItems,e=t.length,i=new Array(e);for(let n=0;nthis.propagateEventToLayoutManager(t,e))))}propagateEventToLayoutManager(t,e){this._pendingEventPropagations[t]=!1,this.layoutManager.emitUnknown(t,e)}}class jt extends Gt{constructor(t,e,i){super(t,e,i,document.createElement("div")),this._parentItem=i,this._focused=!1,this.isComponent=!0,this._reorderEnabled=e.reorderEnabled,this.applyUpdatableConfig(e),this._initialWantMaximise=e.maximised;const n=document.createElement("div");n.classList.add("lm_content"),this.element.appendChild(n),this._container=new Ft(e,this,t,n,(t=>this.handleUpdateItemConfigEvent(t)),(()=>this.show()),(()=>this.hide()),(t=>this.focus(t)),(t=>this.blur(t)))}get componentName(){return this._container.componentType}get componentType(){return this._container.componentType}get reorderEnabled(){return this._reorderEnabled}get initialWantMaximise(){return this._initialWantMaximise}get component(){return this._container.component}get container(){return this._container}get parentItem(){return this._parentItem}get headerConfig(){return this._headerConfig}get title(){return this._title}get tab(){return this._tab}get focused(){return this._focused}destroy(){this._container.destroy(),super.destroy()}applyUpdatableConfig(t){this.setTitle(t.title),this._headerConfig=t.header}toConfig(){const t=this._container.stateRequestEvent,e=void 0===t?this._container.state:t();return{type:at.component,content:[],size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,maximised:!1,isClosable:this.isClosable,reorderEnabled:this._reorderEnabled,title:this._title,header:mt.Header.createCopy(this._headerConfig),componentType:pt.copyComponentType(this.componentType),componentState:e}}close(){if(null===this.parent)throw new K("CIC68883");this.parent.removeChild(this,!1)}enterDragMode(t,e){Tt(this.element,t),At(this.element,e),this._container.enterDragMode(t,e)}exitDragMode(){this._container.exitDragMode()}enterStackMaximised(){this._container.enterStackMaximised()}exitStackMaximised(){this._container.exitStackMaximised()}drag(){this._container.drag()}updateSize(t){this.updateNodeSize(t)}init(){this.updateNodeSize(!1),super.init(),this._container.emit("open"),this.initContentItems()}setTitle(t){this._title=t,this.emit("titleChanged",t),this.emit("stateChanged")}setTab(t){this._tab=t,this.emit("tab",t),this._container.setTab(t)}hide(){super.hide(),this._container.setVisibility(!1)}show(){super.show(),this._container.setVisibility(!0)}focus(t=!1){this.parentItem.setActiveComponentItem(this,!0,t)}setFocused(t){this._focused=!0,this.tab.setFocused(),t||this.emitBaseBubblingEvent("focus")}blur(t=!1){this._focused&&this.layoutManager.setFocusedComponentItem(void 0,t)}setBlurred(t){this._focused=!1,this.tab.setBlurred(),t||this.emitBaseBubblingEvent("blur")}setParent(t){this._parentItem=t,super.setParent(t)}handleUpdateItemConfigEvent(t){this.applyUpdatableConfig(t)}updateNodeSize(t){if("none"!==this.element.style.display){const{width:e,height:i}=kt(this.element);this._container.setSizeToNodeSize(e,i,t)}}}class $t extends Gt{constructor(){super(...arguments),this._focused=!1}get focused(){return this._focused}setFocusedValue(t){this._focused=t}}class Zt extends Wt{constructor(t,e){super(),this._eElement=t,this._pointerTracking=!1,this._pointerDownEventListener=t=>this.onPointerDown(t),this._pointerMoveEventListener=t=>this.onPointerMove(t),this._pointerUpEventListener=t=>this.onPointerUp(t),this._timeout=void 0,this._allowableTargets=[t,...e],this._oDocument=document,this._eBody=document.body,this._nDelay=1800,this._nDistance=10,this._nX=0,this._nY=0,this._nOriginalX=0,this._nOriginalY=0,this._dragging=!1,this._eElement.addEventListener("pointerdown",this._pointerDownEventListener,{passive:!0})}destroy(){this.checkRemovePointerTrackingEventListeners(),this._eElement.removeEventListener("pointerdown",this._pointerDownEventListener)}cancelDrag(){this.processDragStop(void 0)}onPointerDown(t){if(this._allowableTargets.includes(t.target)&&t.isPrimary){const e=this.getPointerCoordinates(t);this.processPointerDown(e)}}processPointerDown(t){this._nOriginalX=t.x,this._nOriginalY=t.y,this._oDocument.addEventListener("pointermove",this._pointerMoveEventListener),this._oDocument.addEventListener("pointerup",this._pointerUpEventListener,{passive:!0}),this._pointerTracking=!0,this._timeout=setTimeout((()=>{try{this.startDrag()}catch(t){throw console.error(t),t}}),this._nDelay)}onPointerMove(t){this._pointerTracking&&(this.processDragMove(t),t.preventDefault())}processDragMove(t){this._nX=t.pageX-this._nOriginalX,this._nY=t.pageY-this._nOriginalY,!1===this._dragging&&(Math.abs(this._nX)>this._nDistance||Math.abs(this._nY)>this._nDistance)&&this.startDrag(),this._dragging&&this.emit("drag",this._nX,this._nY,t)}onPointerUp(t){this.processDragStop(t)}processDragStop(t){var e;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this.checkRemovePointerTrackingEventListeners(),!0===this._dragging&&(this._eBody.classList.remove("lm_dragging"),this._eElement.classList.remove("lm_dragging"),null===(e=this._oDocument.querySelector("iframe"))||void 0===e||e.style.setProperty("pointer-events",""),this._dragging=!1,this.emit("dragStop",t))}checkRemovePointerTrackingEventListeners(){this._pointerTracking&&(this._oDocument.removeEventListener("pointermove",this._pointerMoveEventListener),this._oDocument.removeEventListener("pointerup",this._pointerUpEventListener),this._pointerTracking=!1)}startDrag(){var t;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this._dragging=!0,this._eBody.classList.add("lm_dragging"),this._eElement.classList.add("lm_dragging"),null===(t=this._oDocument.querySelector("iframe"))||void 0===t||t.style.setProperty("pointer-events","none"),this.emit("dragStart",this._nOriginalX,this._nOriginalY)}getPointerCoordinates(t){return{x:t.pageX,y:t.pageY}}}class qt{constructor(t,e,i){this._isVertical=t,this._size=e,this._grabSize=i0){const i=this.createSplitter(Math.max(0,e-1)).element;e>0?(this.contentItems[e-1].element.insertAdjacentElement("afterend",i),i.insertAdjacentElement("afterend",t.element)):(this.contentItems[0].element.insertAdjacentElement("beforebegin",i),i.insertAdjacentElement("beforebegin",t.element))}else this._childElementContainer.appendChild(t.element);super.addChild(t,e);const n=1/this.contentItems.length*100;if(!0===i)return this.emitBaseBubblingEvent("stateChanged"),e;for(let e=0;e0&&(this.calculateRelativeSizes(),this.setAbsoluteSizes()),this.emitBaseBubblingEvent("stateChanged"),this.emit("resize")}setAbsoluteSizes(){const t=this.calculateAbsoluteSizes();for(let e=0;e0&&t.itemSizes[e]++,this._isColumn?(Tt(this.contentItems[e].element,t.crossAxisSize),At(this.contentItems[e].element,t.itemSizes[e])):(Tt(this.contentItems[e].element,t.itemSizes[e]),At(this.contentItems[e].element,t.crossAxisSize))}calculateAbsoluteSizes(){const t=(this.contentItems.length-1)*this._splitterSize,{width:e,height:i}=kt(this.element);let n,o;this._isColumn?(n=i-t,o=e):(n=e-t,o=i);let s=0;const r=[];for(let t=0;t0){const n=100-t;for(let t=0;t100&&e.length>0){for(let t=0;te)return;{const r=i/e;let a=i;for(let e=0;ethis.onSplitterDrag(e,t,i))),e.on("dragStop",(()=>this.onSplitterDragStop(e))),e.on("dragStart",(()=>this.onSplitterDragStart(e))),this._splitter.splice(t,0,e),e}getSplitItems(t){const e=this._splitter.indexOf(t);return{before:this.contentItems[e],after:this.contentItems[e+1]}}calculateContentItemMinSize(t){const e=t.minSize;if(void 0!==e){if(t.minSizeUnit===ht.Pixel)return e;throw new X("ROCGMD98831",JSON.stringify(t))}{const t=this.layoutManager.layoutConfig.dimensions;return this._isColumn?t.defaultMinItemHeight:t.defaultMinItemWidth}}calculateContentItemsTotalMinSize(t){let e=0;for(const i of t)e+=this.calculateContentItemMinSize(i);return e}onSplitterDragStart(t){const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=this.calculateContentItemsTotalMinSize(e.before.contentItems),s=this.calculateContentItemsTotalMinSize(e.after.contentItems);this._splitterPosition=0,this._splitterMinPosition=-1*(i-o),this._splitterMaxPosition=n-s}onSplitterDrag(t,e,i){let n=this._isColumn?i:e;if(null===this._splitterMinPosition||null===this._splitterMaxPosition)throw new K("ROCOSD59226");n=Math.max(n,this._splitterMinPosition),n=Math.min(n,this._splitterMaxPosition),this._splitterPosition=n;const o=zt(n);this._isColumn?t.element.style.top=o:t.element.style.left=o}onSplitterDragStop(t){if(null===this._splitterPosition)throw new K("ROCOSDS66932");{const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=(this._splitterPosition+i)/(i+n),s=e.before.size+e.after.size;e.before.size=o*s,e.after.size=(1-o)*s,t.element.style.top=zt(0),t.element.style.left=zt(0),globalThis.requestAnimationFrame((()=>this.updateSize(!1)))}}}!function(t){t.getElementDimensionSize=function(t,e){return"width"===e?function(t){return t.offsetWidth}(t):function(t){return t.offsetHeight}(t)},t.setElementDimensionSize=function(t,e,i){return"width"===e?Tt(t,i):At(t,i)},t.createElement=function(t,e){const i=t.createElement("div");return i.classList.add("lm_item"),e?i.classList.add("lm_column"):i.classList.add("lm_row"),i}}(Xt||(Xt={}));class Yt extends $t{constructor(t,e,i){super(t,vt.create(e),null,Yt.createElement(document)),this.isGround=!0,this._childElementContainer=this.element,this._containerElement=i;let n=null;for(;;){const t=n?n.previousSibling:this._containerElement.lastChild;if(!(t instanceof Element&&t.classList.contains("lm_content")))break;n=t}this._containerElement.insertBefore(this.element,n)}init(){if(!0!==this.isInitialised){this.updateNodeSize();for(let t=0;t0?this.contentItems[0]:this,n.isComponent)throw new Error("Cannot add item as child to ComponentItem");{const t=this.layoutManager.createAndInitContentItem(i,n);return e=n.addChild(t,e),n===this?-1:e}}loadComponentAsRoot(t){this.clearRoot();const e=Ct.resolve(t,!1);if(e.maximised)throw new Error("Root Component cannot be maximised");{const t=new jt(this.layoutManager,e,this);t.init(),this.addChild(t,0)}}addChild(t,e){if(this.contentItems.length>0)throw new Error("Ground node can only have a single child");return this._childElementContainer.appendChild(t.element),e=super.addChild(t,e),this.updateSize(!1),this.emitBaseBubblingEvent("stateChanged"),e}calculateConfigContent(){const t=this.contentItems,e=t.length,i=new Array(e);for(let n=0;n0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e)),this.updateContentItemsSize(!1))}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}createSideAreas(){const t=Yt.Area.oppositeSides,e=new Array(Object.keys(t).length);let i=0;for(const n in t){const o=n,s=this.getElementArea();if(null===s)throw new K("RCSA77553");s.side=o,"2"===t[o][1]?s[o]=s[t[o]]-50:s[o]=s[t[o]]+50,s.surface=(s.x2-s.x1)*(s.y2-s.y1),e[i++]=s}return e}highlightDropZone(t,e,i){this.layoutManager.tabDropPlaceholder.remove(),super.highlightDropZone(t,e,i)}onDrop(t,e){if(t.isComponent){const e=ut.createDefault(),i=t;e.header=mt.Header.createCopy(i.headerConfig);const n=this.layoutManager.createAndInitContentItem(e,this);n.addChild(t),t=n}if(0===this.contentItems.length)this.addChild(t);else{if(t.type===at.row||t.type===at.column){const e=ut.createDefault(),i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}const i="x"==e.side[0]?at.row:at.column,n="2"==e.side[1],o=this.contentItems[0];if(o instanceof Xt&&o.type===i){const e=o.contentItems[n?0:o.contentItems.length-1];o.addChild(t,n?0:void 0,!0),e.size*=.5,t.size=e.size,t.sizeUnit=ht.Percent,o.updateSize(!1)}else{const e=ct.createDefault(i),s=this.layoutManager.createContentItem(e,this);this.replaceChild(o,s),s.addChild(t,n?0:void 0,!0),s.addChild(o,n?void 0:0,!0),o.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}}dock(){throw new X("GID87731")}validateDocking(){throw new X("GIVD87732")}getAllContentItems(){const t=[this];return this.deepGetAllContentItems(this.contentItems,t),t}getConfigMaximisedItems(){const t=[];return this.deepFilterContentItems(this.contentItems,t,(t=>!(!Gt.isStack(t)||!t.initialWantMaximise)||!(!Gt.isComponentItem(t)||!t.initialWantMaximise))),t}getItemsByPopInParentId(t){const e=[];return this.deepFilterContentItems(this.contentItems,e,(e=>e.popInParentIds.includes(t))),e}toConfig(){throw new Error("Cannot generate GroundItem config")}setActiveComponentItem(t,e,i){}updateNodeSize(){const{width:t,height:e}=kt(this._containerElement);Tt(this.element,t),At(this.element,e),this.contentItems.length>0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e))}deepGetAllContentItems(t,e){for(let i=0;ithis.onClick(t),this._touchStartEventListener=t=>this.onTouchStart(t),this._element=document.createElement("div"),this._element.classList.add(i),this._element.title=e,this._header.on("destroy",(()=>this.destroy())),this._element.addEventListener("click",this._clickEventListener,{passive:!0}),this._element.addEventListener("touchstart",this._touchStartEventListener,{passive:!0}),this._header.controlsContainerElement.appendChild(this._element)}get element(){return this._element}destroy(){var t;this._element.removeEventListener("click",this._clickEventListener),this._element.removeEventListener("touchstart",this._touchStartEventListener),null===(t=this._element.parentNode)||void 0===t||t.removeChild(this._element)}onClick(t){this._pushEvent(t)}onTouchStart(t){this._pushEvent(t)}}class Jt{constructor(t,e,i,n,o){var s;this._layoutManager=t,this._componentItem=e,this._closeEvent=i,this._focusEvent=n,this._dragStartEvent=o,this._isActive=!1,this._tabClickListener=t=>this.onTabClickDown(t),this._tabTouchStartListener=t=>this.onTabTouchStart(t),this._closeClickListener=()=>this.onCloseClick(),this._closeTouchStartListener=()=>this.onCloseTouchStart(),this._dragStartListener=(t,e)=>this.onDragStart(t,e),this._contentItemDestroyListener=()=>this.onContentItemDestroy(),this._tabTitleChangedListener=t=>this.setTitle(t),this._element=document.createElement("div"),this._element.classList.add("lm_tab"),this._titleElement=document.createElement("span"),this._titleElement.classList.add("lm_title"),this._closeElement=document.createElement("div"),this._closeElement.classList.add("lm_close_tab"),this._element.appendChild(this._titleElement),this._element.appendChild(this._closeElement),e.isClosable?this._closeElement.style.display="":this._closeElement.style.display="none",this.setTitle(e.title),this._componentItem.on("titleChanged",this._tabTitleChangedListener);(null!==(s=e.reorderEnabled)&&void 0!==s?s:this._layoutManager.layoutConfig.settings.reorderEnabled)&&this.enableReorder(),this._element.addEventListener("click",this._tabClickListener,{passive:!0}),this._element.addEventListener("touchstart",this._tabTouchStartListener,{passive:!0}),this._componentItem.isClosable?(this._closeElement.addEventListener("click",this._closeClickListener,{passive:!0}),this._closeElement.addEventListener("touchstart",this._closeTouchStartListener,{passive:!0})):(this._closeElement.remove(),this._closeElement=void 0),this._componentItem.setTab(this),this._layoutManager.emit("tabCreated",this)}get isActive(){return this._isActive}get componentItem(){return this._componentItem}get contentItem(){return this._componentItem}get element(){return this._element}get titleElement(){return this._titleElement}get closeElement(){return this._closeElement}get reorderEnabled(){return void 0!==this._dragListener}set reorderEnabled(t){t!==this.reorderEnabled&&(t?this.enableReorder():this.disableReorder())}setTitle(t){this._titleElement.innerText=t,this._element.title=t}setActive(t){t!==this._isActive&&(this._isActive=t,t?this._element.classList.add("lm_active"):this._element.classList.remove("lm_active"))}destroy(){var t,e;this._closeEvent=void 0,this._focusEvent=void 0,this._dragStartEvent=void 0,this._element.removeEventListener("click",this._tabClickListener),this._element.removeEventListener("touchstart",this._tabTouchStartListener),null===(t=this._closeElement)||void 0===t||t.removeEventListener("click",this._closeClickListener),null===(e=this._closeElement)||void 0===e||e.removeEventListener("touchstart",this._closeTouchStartListener),this._componentItem.off("titleChanged",this._tabTitleChangedListener),this.reorderEnabled&&this.disableReorder(),this._element.remove()}setBlurred(){this._element.classList.remove("lm_focused"),this._titleElement.classList.remove("lm_focused")}setFocused(){this._element.classList.add("lm_focused"),this._titleElement.classList.add("lm_focused")}onDragStart(t,e){if(void 0===this._dragListener)throw new J("TODSDLU10093");if(void 0===this._dragStartEvent)throw new J("TODS23309");this._dragStartEvent(t,e,this._dragListener,this.componentItem)}onContentItemDestroy(){void 0!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=void 0)}onTabClickDown(t){const e=t.target;e!==this._element&&e!==this._titleElement||(0===t.button?this.notifyFocus():1===t.button&&this._componentItem.isClosable&&this.notifyClose())}onTabTouchStart(t){t.target===this._element&&this.notifyFocus()}onCloseClick(){this.notifyClose()}onCloseTouchStart(){this.notifyClose()}notifyClose(){if(void 0===this._closeEvent)throw new J("TNC15007");this._closeEvent(this._componentItem)}notifyFocus(){if(void 0===this._focusEvent)throw new J("TNA15007");this._focusEvent(this._componentItem)}enableReorder(){this._dragListener=new Zt(this._element,[this._titleElement]),this._dragListener.on("dragStart",this._dragStartListener),this._componentItem.on("destroy",this._contentItemDestroyListener)}disableReorder(){if(void 0===this._dragListener)throw new J("TDR87745");this._componentItem.off("destroy",this._contentItemDestroyListener),this._dragListener.off("dragStart",this._dragStartListener),this._dragListener=void 0}}class Qt{constructor(t,e,i,n,o){this._layoutManager=t,this._componentRemoveEvent=e,this._componentFocusEvent=i,this._componentDragStartEvent=n,this._dropdownActiveChangedEvent=o,this._tabs=[],this._lastVisibleTabIndex=-1,this._dropdownActive=!1,this._element=document.createElement("section"),this._element.classList.add("lm_tabs"),this._dropdownElement=document.createElement("section"),this._dropdownElement.classList.add("lm_tabdropdown_list"),this._dropdownElement.style.display="none"}get tabs(){return this._tabs}get tabCount(){return this._tabs.length}get lastVisibleTabIndex(){return this._lastVisibleTabIndex}get element(){return this._element}get dropdownElement(){return this._dropdownElement}get dropdownActive(){return this._dropdownActive}destroy(){for(let t=0;tthis.handleTabCloseEvent(t)),(t=>this.handleTabFocusEvent(t)),((t,e,i,n)=>this.handleTabDragStartEvent(t,e,i,n)));void 0===e&&(e=this._tabs.length),this._tabs.splice(e,0,i),ethis._lastVisibleTabIndex){const t=this._tabs[e];for(let t=e;t>0;t--)this._tabs[t]=this._tabs[t-1];this._tabs[0]=t}}updateTabSizes(t,e){let i=!1;this.tryUpdateTabSizes(i,t,e)||(i=!0,this.tryUpdateTabSizes(i,t,e)),i!==this._dropdownActive&&(this._dropdownActive=i,this._dropdownActiveChangedEvent())}tryUpdateTabSizes(t,e,i){if(this._tabs.length>0){if(void 0===i)throw new Error("non-empty tabs must have active component item");let n=0,o=!1;const s=this._layoutManager.layoutConfig.settings.tabOverlapAllowance,r=this._tabs.indexOf(i.tab),a=this._tabs[r];this._lastVisibleTabIndex=-1;for(let i=0;ie){if(o)i===r&&(l.style.zIndex="auto",l.style.marginLeft="",l.parentElement!==this._element&&this._element.appendChild(l));else{let t;if(t=r>0&&r<=i?(d-e)/(i-1):(d-e)/i,tthis.onClick(t),this._touchStartListener=t=>this.onTouchStart(t),this._rowColumnClosable=!0,this._closeButton=null,this._popoutButton=null,this._tabsContainer=new Qt(this._layoutManager,(t=>this.handleTabInitiatedComponentRemoveEvent(t)),(t=>this.handleTabInitiatedComponentFocusEvent(t)),((t,e,i,n)=>this.handleTabInitiatedDragStartEvent(t,e,i,n)),(()=>this.processTabDropdownActiveChanged())),this._show=i.show,this._popoutEnabled=i.popoutEnabled,this._popoutLabel=i.popoutLabel,this._maximiseEnabled=i.maximiseEnabled,this._maximiseLabel=i.maximiseLabel,this._minimiseEnabled=i.minimiseEnabled,this._minimiseLabel=i.minimiseLabel,this._closeEnabled=i.closeEnabled,this._closeLabel=i.closeLabel,this._tabDropdownEnabled=i.tabDropdownEnabled,this._tabDropdownLabel=i.tabDropdownLabel,this.setSide(i.side),this._canRemoveComponent=this._configClosable,this._element=document.createElement("section"),this._element.classList.add("lm_header"),this._controlsContainerElement=document.createElement("section"),this._controlsContainerElement.classList.add("lm_controls"),this._element.appendChild(this._tabsContainer.element),this._element.appendChild(this._controlsContainerElement),this._element.appendChild(this._tabsContainer.dropdownElement),this._element.addEventListener("click",this._clickListener,{passive:!0}),this._element.addEventListener("touchstart",this._touchStartListener,{passive:!0}),this._documentMouseUpListener=()=>this._tabsContainer.hideAdditionalTabsDropdown(),globalThis.document.addEventListener("mouseup",this._documentMouseUpListener,{passive:!0}),this._tabControlOffset=this._layoutManager.layoutConfig.settings.tabControlOffset,this._tabDropdownEnabled&&(this._tabDropdownButton=new Kt(this,this._tabDropdownLabel,"lm_tabdropdown",(()=>this._tabsContainer.showAdditionalTabsDropdown()))),this._popoutEnabled&&(this._popoutButton=new Kt(this,this._popoutLabel,"lm_popout",(()=>this.handleButtonPopoutEvent()))),this._maximiseEnabled&&(this._maximiseButton=new Kt(this,this._maximiseLabel,"lm_maximise",(t=>this.handleButtonMaximiseToggleEvent(t)))),this._configClosable&&(this._closeButton=new Kt(this,this._closeLabel,"lm_close",(()=>s()))),this.processTabDropdownActiveChanged()}get show(){return this._show}get side(){return this._side}get leftRightSided(){return this._leftRightSided}get layoutManager(){return this._layoutManager}get parent(){return this._parent}get tabs(){return this._tabsContainer.tabs}get lastVisibleTabIndex(){return this._tabsContainer.lastVisibleTabIndex}get element(){return this._element}get tabsContainerElement(){return this._tabsContainer.element}get controlsContainerElement(){return this._controlsContainerElement}destroy(){this.emit("destroy"),this._popoutEvent=void 0,this._maximiseToggleEvent=void 0,this._clickEvent=void 0,this._touchStartEvent=void 0,this._componentRemoveEvent=void 0,this._componentFocusEvent=void 0,this._componentDragStartEvent=void 0,this._tabsContainer.destroy(),globalThis.document.removeEventListener("mouseup",this._documentMouseUpListener),this._element.remove()}createTab(t,e){this._tabsContainer.createTab(t,e)}removeTab(t){this._tabsContainer.removeTab(t)}processActiveComponentChanged(t){this._tabsContainer.processActiveComponentChanged(t),this.updateTabSizes()}setSide(t){this._side=t,this._leftRightSided=[nt.right,nt.left].includes(this._side)}setRowColumnClosable(t){this._rowColumnClosable=t,this.updateClosability()}updateClosability(){let t;if(this._configClosable)if(this._rowColumnClosable){t=!0;const e=this.tabs.length;for(let i=0;i1}applyFocusedValue(t){t?this._element.classList.add("lm_focused"):this._element.classList.remove("lm_focused")}processMaximised(){if(void 0===this._maximiseButton)throw new J("HPMAX16997");this._maximiseButton.element.setAttribute("title",this._minimiseLabel)}processMinimised(){if(void 0===this._maximiseButton)throw new J("HPMIN16997");this._maximiseButton.element.setAttribute("title",this._maximiseLabel)}updateTabSizes(){if(this._tabsContainer.tabCount>0){const t=this._show?this._layoutManager.layoutConfig.dimensions.headerHeight:0;let e;this._leftRightSided?(this._element.style.height="",this._element.style.width=zt(t)):(this._element.style.width="",this._element.style.height=zt(t)),e=this._leftRightSided?this._element.offsetHeight-this._controlsContainerElement.offsetHeight-this._tabControlOffset:this._element.offsetWidth-this._controlsContainerElement.offsetWidth-this._tabControlOffset,this._tabsContainer.updateTabSizes(e,this._getActiveComponentItemEvent())}}handleTabInitiatedComponentRemoveEvent(t){if(this._canRemoveComponent){if(void 0===this._componentRemoveEvent)throw new J("HHTCE22294");this._componentRemoveEvent(t)}}handleTabInitiatedComponentFocusEvent(t){if(void 0===this._componentFocusEvent)throw new J("HHTAE22294");this._componentFocusEvent(t)}handleTabInitiatedDragStartEvent(t,e,i,n){if(this._canRemoveComponent){if(void 0===this._componentDragStartEvent)throw new J("HHTDSE22294");this._componentDragStartEvent(t,e,i,n)}else i.cancelDrag()}processTabDropdownActiveChanged(){void 0!==this._tabDropdownButton&&Dt(this._tabDropdownButton.element,this._tabsContainer.dropdownActive)}handleButtonPopoutEvent(){if(this._layoutManager.layoutConfig.settings.popoutWholeStack){if(void 0===this._popoutEvent)throw new J("HHBPOE17834");this._popoutEvent()}else{const t=this._getActiveComponentItemEvent();t&&t.popout()}}handleButtonMaximiseToggleEvent(t){if(void 0===this._maximiseToggleEvent)throw new J("HHBMTE16834");this._maximiseToggleEvent()}onClick(t){t.target===this._element&&this.notifyClick(t)}onTouchStart(t){t.target===this._element&&this.notifyTouchStart(t)}notifyClick(t){if(void 0===this._clickEvent)throw new J("HNHC46834");this._clickEvent(t)}notifyTouchStart(t){if(void 0===this._touchStartEvent)throw new J("HNHTS46834");this._touchStartEvent(t)}}class ee extends $t{constructor(t,e,i){var n,o,s,r,a,l,h,d,c,m,u,p,g,f,v,_,y,C,w;super(t,e,i,ee.createElement(document)),this._headerSideChanged=!1,this._resizeListener=()=>this.handleResize(),this._maximisedListener=()=>this.handleMaximised(),this._minimisedListener=()=>this.handleMinimised(),this._headerConfig=e.header;const I=t.layoutConfig.header,b=e.content;let S;if(1!==b.length)S=void 0;else{S=b[0].header}this._initialWantMaximise=e.maximised,this._initialActiveItemIndex=null!==(n=e.activeItemIndex)&&void 0!==n?n:0;const E=null!==(r=null!==(s=null===(o=this._headerConfig)||void 0===o?void 0:o.show)&&void 0!==s?s:null==S?void 0:S.show)&&void 0!==r?r:I.show,x=null!==(h=null!==(l=null===(a=this._headerConfig)||void 0===a?void 0:a.popout)&&void 0!==l?l:null==S?void 0:S.popout)&&void 0!==h?h:I.popout,L=null!==(m=null!==(c=null===(d=this._headerConfig)||void 0===d?void 0:d.maximise)&&void 0!==c?c:null==S?void 0:S.maximise)&&void 0!==m?m:I.maximise,z=null!==(g=null!==(p=null===(u=this._headerConfig)||void 0===u?void 0:u.close)&&void 0!==p?p:null==S?void 0:S.close)&&void 0!==g?g:I.close,M=null!==(_=null!==(v=null===(f=this._headerConfig)||void 0===f?void 0:f.minimise)&&void 0!==v?v:null==S?void 0:S.minimise)&&void 0!==_?_:I.minimise,P=null!==(w=null!==(C=null===(y=this._headerConfig)||void 0===y?void 0:y.tabDropdown)&&void 0!==C?C:null==S?void 0:S.tabDropdown)&&void 0!==w?w:I.tabDropdown;this._maximisedEnabled=!1!==L;const T={show:!1!==E,side:!1===E?nt.top:E,popoutEnabled:!1!==x,popoutLabel:!1===x?"":x,maximiseEnabled:this._maximisedEnabled,maximiseLabel:!1===L?"":L,closeEnabled:!1!==z,closeLabel:!1===z?"":z,minimiseEnabled:!0,minimiseLabel:M,tabDropdownEnabled:!1!==P,tabDropdownLabel:!1===P?"":P};this._header=new te(t,this,T,e.isClosable&&!1!==z,(()=>this.getActiveComponentItem()),(()=>this.remove()),(()=>this.handlePopoutEvent()),(()=>this.toggleMaximise()),(t=>this.handleHeaderClickEvent(t)),(t=>this.handleHeaderTouchStartEvent(t)),(t=>this.handleHeaderComponentRemoveEvent(t)),(t=>this.handleHeaderComponentFocusEvent(t)),((t,e,i,n)=>this.handleHeaderComponentStartDragEvent(t,e,i,n))),this.isStack=!0,this._childElementContainer=document.createElement("section"),this._childElementContainer.classList.add("lm_items"),this.on("resize",this._resizeListener),this._maximisedEnabled&&(this.on("maximised",this._maximisedListener),this.on("minimised",this._minimisedListener)),this.element.appendChild(this._header.element),this.element.appendChild(this._childElementContainer),this.setupHeaderPosition(),this._header.updateClosability()}get childElementContainer(){return this._childElementContainer}get header(){return this._header}get headerShow(){return this._header.show}get headerSide(){return this._header.side}get headerLeftRightSided(){return this._header.leftRightSided}get contentAreaDimensions(){return this._contentAreaDimensions}get initialWantMaximise(){return this._initialWantMaximise}get isMaximised(){return this===this.layoutManager.maximisedStack}get stackParent(){if(!this.parent)throw new Error("Stack should always have a parent");return this.parent}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}init(){if(!0===this.isInitialised)return;this.updateNodeSize();for(let t=0;t0){if(this._initialActiveItemIndex<0||this._initialActiveItemIndex>=e)throw new Error(`ActiveItemIndex out of range: ${this._initialActiveItemIndex} id: ${this.id}`);for(let i=0;ithis.contentItems.length)throw e-=1,new X("SAC99728");if(t instanceof jt)return e=super.addChild(t,e),this._childElementContainer.appendChild(t.element),this._header.createTab(t,e),this.setActiveComponentItem(t,i),this._header.updateTabSizes(),this.updateSize(!1),t.container.setBaseLogicalZIndex(),this._header.updateClosability(),this.emitStateChangedEvent(),e;throw new X("SACC88532")}removeChild(t,e){const i=t,n=this.contentItems.indexOf(i),o=1===this.contentItems.length;if(this._activeComponentItem===i&&(i.focused&&i.blur(),!o)){const t=0===n?1:n-1;this.setActiveComponentItem(this.contentItems[t],!1)}this._header.removeTab(i),super.removeChild(i,e),o||this._header.updateClosability(),this.emitStateChangedEvent()}toggleMaximise(){this.isMaximised?this.minimise():this.maximise()}maximise(){if(!this.isMaximised){this.layoutManager.setMaximisedStack(this);const t=this.contentItems,e=t.length;for(let i=0;i0&&void 0===t)throw new Error("expected non-empty stack to have an active component item");return{type:"stack",content:this.calculateConfigContent(),size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,isClosable:this.isClosable,maximised:this.isMaximised,header:this.createHeaderConfig(),activeItemIndex:t}}onDrop(t,e){if("header"===this._dropSegment){if(this.resetHeaderDropZone(),void 0===this._dropIndex)throw new J("SODDI68990");return void this.addChild(t,this._dropIndex)}if("body"===this._dropSegment)return void this.addChild(t,0,!0);const i="top"===this._dropSegment||"bottom"===this._dropSegment,n="left"===this._dropSegment||"right"===this._dropSegment,o="top"===this._dropSegment||"left"===this._dropSegment,s=i&&this.stackParent.isColumn||n&&this.stackParent.isRow;if(t.isComponent){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createAndInitContentItem(e,this);i.addChild(t),t=i}if(t.type===at.row||t.type===at.column){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}if(s){const e=this.stackParent.contentItems.indexOf(this);this.stackParent.addChild(t,o?e:e+1,!0),this.size*=.5,t.size=this.size,t.sizeUnit=this.sizeUnit,this.stackParent.updateSize(!1)}else{const e=i?at.column:at.row,n=ct.createDefault(e),s=this.layoutManager.createContentItem(n,this);this.stackParent.replaceChild(this,s),s.addChild(t,o?0:void 0,!0),s.addChild(this,o?void 0:0,!0),this.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}highlightDropZone(t,e){for(const i in this._contentAreaDimensions){const n=i,o=this._contentAreaDimensions[n].hoverArea;if(o.x1t&&o.y1e)return void("header"===n?(this._dropSegment="header",this.highlightHeaderDropZone(this._header.leftRightSided?e:t)):(this.resetHeaderDropZone(),this.highlightBodyDropZone(n)))}}getArea(){if("none"===this.element.style.display)return null;const t=super.getElementArea(this._header.element),e=super.getElementArea(this._childElementContainer);if(null===t||null===e)throw new K("SGAHC13086");const i=e.x2-e.x1,n=e.y2-e.y1;return this._contentAreaDimensions={header:{hoverArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2},highlightArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2}}},0===this.contentItems.length?(this._contentAreaDimensions.body={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2}},super.getElementArea(this.element)):(this._contentAreaDimensions.left={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x1+.25*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x1+.5*i,y2:e.y2}},this._contentAreaDimensions.top={hoverArea:{x1:e.x1+.25*i,y1:e.y1,x2:e.x1+.75*i,y2:e.y1+.5*n},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y1+.5*n}},this._contentAreaDimensions.right={hoverArea:{x1:e.x1+.75*i,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1+.5*i,y1:e.y1,x2:e.x2,y2:e.y2}},this._contentAreaDimensions.bottom={hoverArea:{x1:e.x1+.25*i,y1:e.y1+.5*n,x2:e.x1+.75*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1+.5*n,x2:e.x2,y2:e.y2}},super.getElementArea(this.element))}positionHeader(t){this._header.side!==t&&(this._header.setSide(t),this._headerSideChanged=!0,this.setupHeaderPosition())}updateNodeSize(){if("none"!==this.element.style.display){const t=kt(this.element);if(this._header.show){t[this._header.leftRightSided?it.width:it.height]-=this.layoutManager.layoutConfig.dimensions.headerHeight}this._childElementContainer.style.width=zt(t.width),this._childElementContainer.style.height=zt(t.height);for(let e=0;e=o&&tthis.onDrag(t,e,i))),this._dragListener.on("dragStop",(()=>this.onDrop())),this.createDragProxyElements(t,e),null===this._componentItem.parent)throw new K("DPC10097");this._componentItemFocused=this._componentItem.focused,this._componentItemFocused&&this._componentItem.blur(),this._componentItem.parent.removeChild(this._componentItem,!0),this.setDimensions(),document.body.appendChild(this._element),this.determineMinMaxXY(),this._layoutManager.calculateItemAreas(),this.setDropPosition(t,e)}get element(){return this._element}createDragProxyElements(t,e){this._element=document.createElement("div"),this._element.classList.add("lm_dragProxy");const i=document.createElement("div");i.classList.add("lm_header");const n=document.createElement("div");n.classList.add("lm_tabs");const o=document.createElement("div");o.classList.add("lm_tab");const s=document.createElement("span");s.classList.add("lm_title"),o.appendChild(s),n.appendChild(o),i.appendChild(n),this._proxyContainerElement=document.createElement("div"),this._proxyContainerElement.classList.add("lm_content"),this._element.appendChild(i),this._element.appendChild(this._proxyContainerElement),this._originalParent instanceof ee&&this._originalParent.headerShow&&(this._sided=this._originalParent.headerLeftRightSided,this._element.classList.add("lm_"+this._originalParent.headerSide),[nt.right,nt.bottom].indexOf(this._originalParent.headerSide)>=0&&this._proxyContainerElement.insertAdjacentElement("afterend",i)),this._element.style.left=zt(t),this._element.style.top=zt(e),o.setAttribute("title",this._componentItem.title),s.insertAdjacentText("afterbegin",this._componentItem.title),this._proxyContainerElement.appendChild(this._componentItem.element)}determineMinMaxXY(){const t=this._layoutManager.groundItem;if(void 0===t)throw new J("DPDMMXY73109");{const e=t.element.getBoundingClientRect();this._minX=e.left+document.body.scrollLeft,this._minY=e.top+document.body.scrollTop,this._maxX=this._minX+e.width,this._maxY=this._minY+e.height}}onDrag(t,e,i){const n=i.pageX,o=i.pageY;this.setDropPosition(n,o),this._componentItem.drag()}setDropPosition(t,e){this._layoutManager.layoutConfig.settings.constrainDragToContainer&&(t<=this._minX?t=Math.ceil(this._minX):t>=this._maxX&&(t=Math.floor(this._maxX)),e<=this._minY?e=Math.ceil(this._minY):e>=this._maxY&&(e=Math.floor(this._maxY))),this._element.style.left=zt(t),this._element.style.top=zt(e),this._area=this._layoutManager.getArea(t,e),null!==this._area&&(this._lastValidArea=this._area,this._area.contentItem.highlightDropZone(t,e,this._area))}onDrop(){const t=this._layoutManager.dropTargetIndicator;if(null===t)throw new K("DPOD30011");let e;if(t.hide(),this._componentItem.exitDragMode(),null!==this._area)e=this._componentItem,this._area.contentItem.onDrop(e,this._area);else if(null!==this._lastValidArea){e=this._componentItem;this._lastValidArea.contentItem.onDrop(e,this._lastValidArea)}else this._originalParent?(e=this._componentItem,this._originalParent.addChild(e)):this._componentItem.destroy();this._element.remove(),this._layoutManager.emit("itemDropped",this._componentItem),this._componentItemFocused&&void 0!==e&&e.focus()}setDimensions(){const t=this._layoutManager.layoutConfig.dimensions;if(void 0===t)throw new Error("DragProxy.setDimensions: dimensions undefined");let e=t.dragProxyWidth,i=t.dragProxyHeight;if(void 0===e||void 0===i)throw new Error("DragProxy.setDimensions: width and/or height undefined");const n=!1===this._layoutManager.layoutConfig.header.show?0:t.headerHeight;this._element.style.width=zt(e),this._element.style.height=zt(i),e-=this._sided?n:0,i-=this._sided?0:n,this._proxyContainerElement.style.width=zt(e),this._proxyContainerElement.style.height=zt(i),this._componentItem.enterDragMode(e,i),this._componentItem.show()}}class ne{constructor(t,e,i,n,o,s,r){this._layoutManager=t,this._element=e,this._extraAllowableChildTargets=i,this._componentTypeOrFtn=n,this._componentState=o,this._title=s,this._id=r,this._dragListener=null,this._dummyGroundContainer=document.createElement("div");const a=gt.createDefault("row");this._dummyGroundContentItem=new Yt(this._layoutManager,a,this._dummyGroundContainer),this.createDragListener()}destroy(){this.removeDragListener()}createDragListener(){this.removeDragListener(),this._dragListener=new Zt(this._element,this._extraAllowableChildTargets),this._dragListener.on("dragStart",((t,e)=>this.onDragStart(t,e))),this._dragListener.on("dragStop",(()=>this.onDragStop()))}onDragStart(t,e){var i;const n="component";let o;if("function"==typeof this._componentTypeOrFtn){const t=this._componentTypeOrFtn();o=ne.isDragSourceComponentItemConfig(t)?{type:n,componentState:t.state,componentType:t.type,title:null!==(i=t.title)&&void 0!==i?i:this._title}:t}else o={type:n,componentState:this._componentState,componentType:this._componentTypeOrFtn,title:this._title,id:this._id};const s=bt.resolve(o,!1),r=new jt(this._layoutManager,s,this._dummyGroundContentItem);if(this._dummyGroundContentItem.contentItems.push(r),null===this._dragListener)throw new K("DSODSD66746");{const i=new ie(t,e,this._dragListener,this._layoutManager,r,this._dummyGroundContentItem),n=this._layoutManager.transitionIndicator;if(null===n)throw new K("DSODST66746");n.transitionElements(this._element,i.element)}}onDragStop(){this.createDragListener()}removeDragListener(){null!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=null)}}!function(t){t.isDragSourceComponentItemConfig=function(t){return!("componentType"in t)}}(ne||(ne={}));class oe{constructor(){this._element=document.createElement("div"),this._element.classList.add("lm_dropTargetIndicator");const t=document.createElement("div");t.classList.add("lm_inner"),this._element.appendChild(t),document.body.appendChild(this._element)}destroy(){this._element.remove()}highlightArea(t,e){this._element.style.left=zt(t.x1+e),this._element.style.top=zt(t.y1+e),this._element.style.width=zt(t.x2-t.x1-e),this._element.style.height=zt(t.y2-t.y1-e),this._element.style.display="block"}hide(){Dt(this._element,!1)}}class se{constructor(){this._element=document.createElement("div"),this._element.classList.add("lm_transition_indicator"),document.body.appendChild(this._element),this._toElement=null,this._fromDimensions=null,this._totalAnimationDuration=200,this._animationStartTime=null}destroy(){this._element.remove()}transitionElements(t,e){}nextAnimationFrame(){}measure(t){const e=t.getBoundingClientRect();return{left:e.left,top:e.top,width:t.offsetWidth,height:t.offsetHeight}}}class re extends Wt{constructor(t){super(),this._layoutManager=t,this._childEventListener=t=>this.onEventFromChild(t),globalThis.addEventListener(re.ChildEventName,this._childEventListener,{passive:!0})}emit(t,...e){"userBroadcast"===t?this.emitUserBroadcast(...e):super.emit(t,...e)}emitUserBroadcast(...t){this.handleUserBroadcastEvent("userBroadcast",t)}destroy(){globalThis.removeEventListener(re.ChildEventName,this._childEventListener)}handleUserBroadcastEvent(t,e){this._layoutManager.isSubWindow?this.propagateToParent(t,e):this.propagateToThisAndSubtree(t,e)}onEventFromChild(t){const e=t.detail;this.handleUserBroadcastEvent(e.eventName,e.args)}propagateToParent(t,e){const i={bubbles:!0,cancelable:!0,detail:{layoutManager:this._layoutManager,eventName:t,args:e}},n=new CustomEvent(re.ChildEventName,i),o=globalThis.opener;if(null===o)throw new K("EHPTP15778");o.dispatchEvent(n)}propagateToThisAndSubtree(t,e){this.emitUnknown(t,...e);for(let i=0;ithis.handleContainerResize())),this._windowBeforeUnloadListener=()=>this.onBeforeUnload(),this._windowBeforeUnloadListening=!1,this._maximisedStackBeforeDestroyedListener=t=>this.cleanupBeforeMaximisedStackDestroyed(t),this.isSubWindow=t.isSubWindow,this._constructorOrSubWindowLayoutConfig=t.constructorOrSubWindowLayoutConfig,Q.checkInitialise(),dt.checkInitialise(),void 0!==t.containerElement&&(this._containerElement=t.containerElement)}get container(){return this._containerElement}get isInitialised(){return this._isInitialised}get groundItem(){return this._groundItem}get root(){return this._groundItem}get openPopouts(){return this._openPopouts}get dropTargetIndicator(){return this._dropTargetIndicator}get transitionIndicator(){return this._transitionIndicator}get width(){return this._width}get height(){return this._height}get eventHub(){return this._eventHub}get rootItem(){if(void 0===this._groundItem)throw new Error("Cannot access rootItem before init");return 0===this._groundItem.contentItems.length?void 0:this._groundItem.contentItems[0]}get focusedComponentItem(){return this._focusedComponentItem}get tabDropPlaceholder(){return this._tabDropPlaceholder}get maximisedStack(){return this._maximisedStack}get deprecatedConstructor(){return!this.isSubWindow&&void 0!==this._constructorOrSubWindowLayoutConfig}destroy(){if(this._isInitialised){this._windowBeforeUnloadListening&&(globalThis.removeEventListener("beforeunload",this._windowBeforeUnloadListener),this._windowBeforeUnloadListening=!1),!0===this.layoutConfig.settings.closePopoutsOnUnload&&this.closeAllOpenPopouts(),this._resizeObserver.disconnect(),this.checkClearResizeTimeout(),void 0!==this._groundItem&&this._groundItem.destroy(),this._tabDropPlaceholder.remove(),null!==this._dropTargetIndicator&&this._dropTargetIndicator.destroy(),null!==this._transitionIndicator&&this._transitionIndicator.destroy(),this._eventHub.destroy();for(const t of this._dragSources)t.destroy();this._dragSources=[],this._isInitialised=!1}}minifyConfig(t){return _t.minifyConfig(t)}unminifyConfig(t){return _t.unminifyConfig(t)}init(){let t;if(this.setContainer(),this._dropTargetIndicator=new oe,this._transitionIndicator=new se,this.updateSizeFromContainer(),this.isSubWindow){if(void 0===this._constructorOrSubWindowLayoutConfig)throw new J("LMIU07155");{const e=this._constructorOrSubWindowLayoutConfig.root;if(void 0===e)throw new X("LMIC07156");if(!Ct.isComponent(e))throw new X("LMIC07157");t=e;const i=xt.resolve(this._constructorOrSubWindowLayoutConfig);this.layoutConfig=Object.assign(Object.assign({},i),{root:void 0})}}else void 0===this._constructorOrSubWindowLayoutConfig?this.layoutConfig=_t.createDefault():this.layoutConfig=xt.resolve(this._constructorOrSubWindowLayoutConfig);const e=this.layoutConfig;this._groundItem=new Yt(this,e.root,this._containerElement),this._groundItem.init(),this.checkLoadedLayoutMaximiseItem(),this._resizeObserver.observe(this._containerElement),this._isInitialised=!0,this.adjustColumnsResponsive(),this.emit("initialised"),void 0!==t&&this.loadComponentAsRoot(t)}loadLayout(t){if(!this.isInitialised)throw new Error("GoldenLayout: Need to call init() if LayoutConfig with defined root passed to constructor");if(void 0===this._groundItem)throw new J("LMLL11119");this.createSubWindows(),this.layoutConfig=xt.resolve(t),this._groundItem.loadRoot(this.layoutConfig.root),this.checkLoadedLayoutMaximiseItem(),this.adjustColumnsResponsive()}saveLayout(){if(!1===this._isInitialised)throw new Error("Can't create config, layout not yet initialised");if(void 0===this._groundItem)throw new J("LMTC18244");{const t=this._groundItem.calculateConfigContent();let e;e=1!==t.length?void 0:t[0],this.reconcilePopoutWindows();const i=[];for(let t=0;t=0?n=this._groundItem.contentItems[0]:e=0;break;case at.row:case at.column:e=n.addItem(t,i.index);break;case at.stack:if(Ct.isComponent(t)){e=n.addItem(t,i.index);break}throw Error(tt[6]);case at.component:throw new X("LMAIALC87444602");default:throw new Y("LMAIALU98881733",n.type)}if(Ct.isComponent(t)){const t=n.contentItems[e];Gt.isStack(t)&&(n=t,e=0)}return i.parentItem=n,i.index=e,i}}}loadComponentAsRoot(t){if(void 0===this._groundItem)throw new Error("Cannot add item before init");this._groundItem.loadComponentAsRoot(t)}updateSize(t,e){this.setSize(t,e)}setSize(t,e){if(this._width=t,this._height=e,!0===this._isInitialised){if(void 0===this._groundItem)throw new J("LMUS18881");if(this._groundItem.setSize(this._width,this._height),this._maximisedStack){const{width:t,height:e}=kt(this._containerElement);Tt(this._maximisedStack.element,t),At(this._maximisedStack.element,e),this._maximisedStack.updateSize(!1)}this.adjustColumnsResponsive()}}beginSizeInvalidation(){this._sizeInvalidationBeginCount++}endSizeInvalidation(){0==--this._sizeInvalidationBeginCount&&this.updateSizeFromContainer()}updateSizeFromContainer(){const{width:t,height:e}=kt(this._containerElement);this.setSize(t,e)}updateRootSize(t=!1){if(void 0===this._groundItem)throw new J("LMURS28881");this._groundItem.updateSize(t)}createAndInitContentItem(t,e){const i=this.createContentItem(t,e);return i.init(),i}createContentItem(t,e){if("string"!=typeof t.type)throw new G("Missing parameter 'type'",JSON.stringify(t));if(ct.isComponentItem(t)&&!(e instanceof ee)&&e&&!(!0===this.isSubWindow&&e instanceof Yt)){t={type:at.stack,content:[t],size:t.size,sizeUnit:t.sizeUnit,minSize:t.minSize,minSizeUnit:t.minSizeUnit,id:t.id,maximised:t.maximised,isClosable:t.isClosable,activeItemIndex:0,header:void 0}}return this.createContentItemFromConfig(t,e)}findFirstComponentItemById(t){if(void 0===this._groundItem)throw new J("LMFFCIBI82446");return this.findFirstContentItemTypeByIdRecursive(at.component,t,this._groundItem)}createPopout(t,e,i,n){return t instanceof Gt?this.createPopoutFromContentItem(t,e,i,n):this.createPopoutFromItemConfig(t,e,i,n)}createPopoutFromContentItem(t,e,i,n){let o=t.parent,s=t;for(;null!==o&&1===o.contentItems.length&&!o.isGround;)s=o,o=o.parent;if(null===o)throw new K("LMCPFCI00834");{if(void 0===n&&(n=o.contentItems.indexOf(s)),null!==i&&o.addPopInParentId(i),void 0===e){const i=globalThis.screenX||globalThis.screenLeft,n=globalThis.screenY||globalThis.screenTop,o=t.element.offsetLeft,s=t.element.offsetTop,{width:r,height:a}=kt(t.element);e={left:i+o,top:n+s,width:r,height:a}}const r=t.toConfig();if(t.remove(),ft.isRootItemConfig(r))return this.createPopoutFromItemConfig(r,e,i,n);throw new Error(`${tt[0]}`)}}beginVirtualSizedContainerAdding(){0==++this._virtualSizedContainerAddingBeginCount&&(this._virtualSizedContainers.length=0)}addVirtualSizedContainer(t){this._virtualSizedContainers.push(t)}endVirtualSizedContainerAdding(){if(0==--this._virtualSizedContainerAddingBeginCount){const t=this._virtualSizedContainers.length;if(t>0){this.fireBeforeVirtualRectingEvent(t);for(let e=0;ethis.emit("windowOpened",a))),a.on("closed",(()=>this.reconcilePopoutWindows())),this._openPopouts.push(a),this.layoutConfig.settings.closePopoutsOnUnload&&!this._windowBeforeUnloadListening&&(globalThis.addEventListener("beforeunload",this._windowBeforeUnloadListener,{passive:!0}),this._windowBeforeUnloadListening=!0),a}closeAllOpenPopouts(){for(let t=0;tglobalThis.close()),1)}getArea(t,e){let i=null,n=1/0;for(let o=0;o=s.x1&&t=s.y1&&es.surface&&(n=s.surface,i=s)}return i}calculateItemAreas(){const t=this.getAllContentItems(),e=this._groundItem;if(void 0===e)throw new J("LMCIAR44365");if(1!==t.length){e.contentItems[0].isStack?this._itemAreas=[]:this._itemAreas=e.createSideAreas();for(let e=0;e0){let e=t[0];if(Gt.isComponentItem(e)){const t=e.parent;if(null===t)throw new K("LMXLLMI69999");e=t}if(!Gt.isStack(e))throw new X("LMCLLMI19993");e.maximise()}}}processMaximiseStack(t){if(this._maximisedStack=t,t.on("beforeItemDestroyed",this._maximisedStackBeforeDestroyedListener),t.element.classList.add("lm_maximised"),t.element.insertAdjacentElement("afterend",this._maximisePlaceholder),void 0===this._groundItem)throw new J("LMMXI19993");{this._groundItem.element.prepend(t.element);const{width:e,height:i}=kt(this._containerElement);Tt(t.element,e),At(t.element,i),t.updateSize(!0),t.focusActiveContentItem(),this._maximisedStack.emit("maximised"),this.emit("stateChanged")}}processMinimiseMaximisedStack(){if(void 0===this._maximisedStack)throw new X("LMMMS74422");{const t=this._maximisedStack;if(null===t.parent)throw new K("LMMI13668");t.element.classList.remove("lm_maximised"),this._maximisePlaceholder.insertAdjacentElement("afterend",t.element),this._maximisePlaceholder.remove(),this.updateRootSize(!0),this._maximisedStack=void 0,t.off("beforeItemDestroyed",this._maximisedStackBeforeDestroyedListener),t.emit("minimised"),this.emit("stateChanged")}}reconcilePopoutWindows(){const t=[];for(let e=0;e{this._resizeTimeoutId=void 0,this.beginSizeInvalidation(),this.endSizeInvalidation()}),this.resizeDebounceInterval))}checkClearResizeTimeout(){void 0!==this._resizeTimeoutId&&(clearTimeout(this._resizeTimeoutId),this._resizeTimeoutId=void 0)}setContainer(){var t;const e=document.body,i=null!==(t=this._containerElement)&&void 0!==t?t:e;if(i===e){this.resizeWithContainerAutomatically=!0;const t=document.documentElement;t.style.height="100%",t.style.margin="0",t.style.padding="0",t.style.overflow="clip",e.style.height="100%",e.style.margin="0",e.style.padding="0",e.style.overflow="clip"}this._containerElement=i}onBeforeUnload(){this.destroy()}adjustColumnsResponsive(){if(void 0===this._groundItem)throw new J("LMACR20883");if(this._firstLoad=!1,this.useResponsiveLayout()&&!this._updatingColumnsResponsive&&this._groundItem.contentItems.length>0&&this._groundItem.contentItems[0].isRow){if(void 0===this._groundItem||null===this._width)throw new J("LMACR77412");{const t=this._groundItem.contentItems[0].contentItems.length;if(t<=1)return;{const e=this.layoutConfig.dimensions.defaultMinItemWidth;if(t*e<=this._width)return;{this._updatingColumnsResponsive=!0;const i=t-Math.max(Math.floor(this._width/e),1),n=this._groundItem.contentItems[0],o=this.getAllStacks();if(0===o.length)throw new X("LMACRS77413");{const t=o[0];for(let e=0;en?void 0:{parentItem:t,index:o}}}case 1:if(void 0===this._focusedComponentItem)return;{const t=this._focusedComponentItem.parentItem;return this.tryCreateLocationFromParentItem(t,e)}case 2:{const t=this.findFirstContentItemType(at.stack);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 3:{let t=this.findFirstContentItemType(at.row);return void 0!==t?this.tryCreateLocationFromParentItem(t,e):(t=this.findFirstContentItemType(at.column),void 0!==t?this.tryCreateLocationFromParentItem(t,e):void 0)}case 4:{const t=this.findFirstContentItemType(at.row);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 5:{const t=this.findFirstContentItemType(at.column);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 6:if(void 0===this._groundItem)throw new J("LMFLRIF18244");return void 0!==this.rootItem?void 0:void 0===e||0===e?{parentItem:this._groundItem,index:0}:void 0;case 7:if(void 0===this._groundItem)throw new J("LMFLF18244");{const t=this._groundItem.contentItems;if(0===t.length)return void 0===e||0===e?{parentItem:this._groundItem,index:0}:void 0;{const i=t[0];return this.tryCreateLocationFromParentItem(i,e)}}}}tryCreateLocationFromParentItem(t,e){const i=t.contentItems.length;return void 0===e?{parentItem:t,index:i}:e<0||e>i?void 0:{parentItem:t,index:e}}}!function(t){t.createMaximisePlaceElement=function(t){const e=t.createElement("div");return e.classList.add("lm_maximise_place"),e},t.createTabDropPlaceholderElement=function(t){const e=t.createElement("div");return e.classList.add("lm_drop_tab_placeholder"),e},t.defaultLocationSelectors=[{typeId:1,index:void 0},{typeId:2,index:void 0},{typeId:3,index:void 0},{typeId:7,index:void 0}],t.afterFocusedItemIfPossibleLocationSelectors=[{typeId:0,index:1},{typeId:2,index:void 0},{typeId:3,index:void 0},{typeId:7,index:void 0}]}(ae||(ae={}));class le extends ae{constructor(t,e,i,n){if(super(le.createLayoutManagerConstructorParameters(t,e)),this._bindComponentEventHanlderPassedInConstructor=!1,this._creationTimeoutPassed=!1,void 0!==e&&"function"==typeof e&&(this.bindComponentEvent=e,this._bindComponentEventHanlderPassedInConstructor=!0,void 0!==i&&(this.unbindComponentEvent=i)),!this._bindComponentEventHanlderPassedInConstructor&&this.isSubWindow){if(void 0===this._constructorOrSubWindowLayoutConfig)throw new J("VLC98823");{const t=xt.resolve(this._constructorOrSubWindowLayoutConfig);this.layoutConfig=Object.assign(Object.assign({},t),{root:void 0})}}!0!==n&&(this.deprecatedConstructor||this.init())}destroy(){this.bindComponentEvent=void 0,this.unbindComponentEvent=void 0,super.destroy()}init(){if(this._bindComponentEventHanlderPassedInConstructor||"loading"!==document.readyState&&null!==document.body){if(!this._bindComponentEventHanlderPassedInConstructor&&!0===this.isSubWindow&&!this._creationTimeoutPassed)return setTimeout((()=>this.init()),7),void(this._creationTimeoutPassed=!0);!0===this.isSubWindow&&(this._bindComponentEventHanlderPassedInConstructor||this.clearHtmlAndAdjustStylesForSubWindow(),window.__glInstance=this),super.init()}else document.addEventListener("DOMContentLoaded",(()=>this.init()),{passive:!0})}clearHtmlAndAdjustStylesForSubWindow(){const t=document.head,e=new Array(4);e[0]=document.querySelectorAll("body link"),e[1]=document.querySelectorAll("body style"),e[2]=document.querySelectorAll("template"),e[3]=document.querySelectorAll(".gl_keep");for(let i=0;ithis.emit("popIn"))),document.body.appendChild(t),!0}}bindComponent(t,e){if(void 0!==this.bindComponentEvent){return this.bindComponentEvent(t,e)}if(void 0!==this.getComponentEvent)return{virtual:!1,component:this.getComponentEvent(t,e)};{const t=`${tt[2]}: ${JSON.stringify(e)}`;throw new Z(t)}}unbindComponent(t,e,i){if(void 0!==this.unbindComponentEvent)this.unbindComponentEvent(t);else if(!e&&void 0!==this.releaseComponentEvent){if(void 0===i)throw new J("VCUCRCU333998");this.releaseComponentEvent(t,i)}}}!function(t){let e=!1;t.createLayoutManagerConstructorParameters=function(t,i){const n=e?null:new URL(document.location.href).searchParams.get("gl-window");e=!0;const o=null!==n;let s,r;if(null!==n){const e=localStorage.getItem(n);if(null===e)throw new Error("Null gl-window Config");localStorage.removeItem(n);const i=JSON.parse(e),o=_t.unminifyConfig(i);r=xt.fromResolved(o),t instanceof HTMLElement&&(s=t)}else void 0===t?r=void 0:t instanceof HTMLElement?(r=void 0,s=t):r=t,void 0===s&&i instanceof HTMLElement&&(s=i);return{constructorOrSubWindowLayoutConfig:r,isSubWindow:o,containerElement:s}}}(le||(le={}));class he extends le{constructor(t,e,i){super(t,e,i,!0),this._componentTypesMap=new Map,this._registeredComponentMap=new Map,this._virtuableComponentMap=new Map,this._containerVirtualRectingRequiredEventListener=(t,e,i)=>this.handleContainerVirtualRectingRequiredEvent(t,e,i),this._containerVirtualVisibilityChangeRequiredEventListener=(t,e)=>this.handleContainerVirtualVisibilityChangeRequiredEvent(t,e),this._containerVirtualZIndexChangeRequiredEventListener=(t,e,i)=>this.handleContainerVirtualZIndexChangeRequiredEvent(t,e,i),this.deprecatedConstructor||this.init()}registerComponent(t,e,i=!1){if("function"!=typeof e)throw new $("registerComponent() componentConstructorOrFactoryFtn parameter is not a function");if(e.hasOwnProperty("prototype")){const n=e;this.registerComponentConstructor(t,n,i)}else{const n=e;this.registerComponentFactoryFunction(t,n,i)}}registerComponentConstructor(t,e,i=!1){if("function"!=typeof e)throw new Error(tt[1]);if(void 0!==this._componentTypesMap.get(t))throw new Z(`${tt[3]}: ${t}`);this._componentTypesMap.set(t,{constructor:e,factoryFunction:void 0,virtual:i})}registerComponentFactoryFunction(t,e,i=!1){if("function"!=typeof e)throw new Z("Please register a constructor function");if(void 0!==this._componentTypesMap.get(t))throw new Z(`${tt[3]}: ${t}`);this._componentTypesMap.set(t,{constructor:void 0,factoryFunction:e,virtual:i})}registerComponentFunction(t){this.registerGetComponentConstructorCallback(t)}registerGetComponentConstructorCallback(t){if("function"!=typeof t)throw new Error("Please register a callback function");void 0!==this._getComponentConstructorFtn&&console.warn("Multiple component functions are being registered. Only the final registered function will be used."),this._getComponentConstructorFtn=t}getRegisteredComponentTypeNames(){const t=this._componentTypesMap.keys();return Array.from(t)}getComponentInstantiator(t){let e;const i=pt.resolveComponentTypeName(t);return void 0!==i&&(e=this._componentTypesMap.get(i)),void 0===e&&void 0!==this._getComponentConstructorFtn&&(e={constructor:this._getComponentConstructorFtn(t),factoryFunction:void 0,virtual:!1}),e}bindComponent(t,e){let i;const n=pt.resolveComponentTypeName(e);let o;if(void 0!==n&&(i=this._componentTypesMap.get(n)),void 0===i&&void 0!==this._getComponentConstructorFtn&&(i={constructor:this._getComponentConstructorFtn(e),factoryFunction:void 0,virtual:!1}),void 0!==i){const s=i.virtual;let r,a;r=void 0===e.componentState?void 0:Ut({},e.componentState);const l=i.constructor;if(void 0!==l)a=new l(t,r,s);else{const e=i.factoryFunction;if(void 0===e)throw new X("LMBCFFU10008");a=e(t,r,s)}if(s){if(void 0===a)throw new J("GLBCVCU988774");{const e=a,i=e.rootHtmlElement;if(void 0===i)throw new Z(`${tt[5]}: ${n}`);!function(t){const e="absolute";t.style.position!==e&&(t.style.position=e)}(i),this.container.appendChild(i),this._virtuableComponentMap.set(t,e),t.virtualRectingRequiredEvent=this._containerVirtualRectingRequiredEventListener,t.virtualVisibilityChangeRequiredEvent=this._containerVirtualVisibilityChangeRequiredEventListener,t.virtualZIndexChangeRequiredEvent=this._containerVirtualZIndexChangeRequiredEventListener}}this._registeredComponentMap.set(t,a),o={virtual:i.virtual,component:a}}else o=super.bindComponent(t,e);return o}unbindComponent(t,e,i){if(void 0===this._registeredComponentMap.get(t))super.unbindComponent(t,e,i);else{const e=this._virtuableComponentMap.get(t);if(void 0!==e){const i=e.rootHtmlElement;if(void 0===i)throw new X("GLUC77743",t.title);this.container.removeChild(i),this._virtuableComponentMap.delete(t)}}}fireBeforeVirtualRectingEvent(t){this._goldenLayoutBoundingClientRect=this.container.getBoundingClientRect(),super.fireBeforeVirtualRectingEvent(t)}handleContainerVirtualRectingRequiredEvent(t,e,i){const n=this._virtuableComponentMap.get(t);if(void 0===n)throw new J("GLHCSCE55933");{const o=n.rootHtmlElement;if(void 0===o)throw new Z(tt[4]+" "+t.title);{const n=t.element.getBoundingClientRect(),s=n.left-this._goldenLayoutBoundingClientRect.left;o.style.left=zt(s);const r=n.top-this._goldenLayoutBoundingClientRect.top;o.style.top=zt(r),Tt(o,e),At(o,i)}}}handleContainerVirtualVisibilityChangeRequiredEvent(t,e){const i=this._virtuableComponentMap.get(t);if(void 0===i)throw new J("GLHCVVCRE55934");{const n=i.rootHtmlElement;if(void 0===n)throw new Z(tt[4]+" "+t.title);Dt(n,e)}}handleContainerVirtualZIndexChangeRequiredEvent(t,e,i){const n=this._virtuableComponentMap.get(t);if(void 0===n)throw new J("GLHCVZICRE55935");{const e=n.rootHtmlElement;if(void 0===e)throw new Z(tt[4]+" "+t.title);e.style.zIndex=i}}}const de="initial_",ce={show:"top",popout:!1,maximise:!1,close:"close-tab-unused"},me={headerHeight:31},ue={hasHeaders:!0,reorderEnabled:!0},pe={popoutWholeStack:!1,constrainDragToContainer:!1,constrainDragToHeaders:!1,preventDragout:!1,showMaximiseIcon:!1,showPopoutIcon:!1,showCloseIcon:!1,blockedPopoutsThrowError:!0,closePopoutsOnUnload:!0,selectionEnabled:!1};var ge,fe;class ve{constructor(e){this.layout=e,ge.set(this,void 0),fe.set(this,void 0),this.handleResize=t=>{t.forEach((t=>this.resizeElement(t.target)))},this.handleMutation=()=>{this.layout.viewComponentsByContainerElement.forEach((t=>{this.resizeElement(t.container.element)}))},t.__classPrivateFieldSet(this,ge,new ResizeObserver(this.handleResize),"f"),t.__classPrivateFieldSet(this,fe,new MutationObserver(this.handleMutation),"f")}observeMutations(e){t.__classPrivateFieldGet(this,fe,"f")?.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["class"]})}destroy(){t.__classPrivateFieldGet(this,ge,"f").disconnect(),t.__classPrivateFieldGet(this,fe,"f").disconnect()}observeContainer(e){t.__classPrivateFieldGet(this,ge,"f").observe(e)}unobserveContainer(e){t.__classPrivateFieldGet(this,ge,"f").unobserve(e)}resizeElement(t){const e=this.layout.viewComponentsByContainerElement.get(t);e&&e.resize()}}ge=new WeakMap,fe=new WeakMap;var _e={};Object.defineProperty(_e,"__esModule",{value:!0});var ye=_e.BaseItem=void 0;class Ce{constructor(t,e,i){this._item=t,this._layout=e,this._wrap=i}get raw(){return this._item}get layout(){return this._layout}get type(){return this._item.type}get contentItems(){return(this._item.contentItems??[]).map((t=>this._wrap(t)))}get parent(){const t=this._item.parent;return t?this._wrap(t):null}setActiveContentItem(t,e){if("stack"!==this.type)throw new Error(`Cannot call setActiveContentItem from a non-stack item: ${this.type}`);this._item.setActiveContentItem(t.raw,e)}static wrapInternal(t,e,i){const n=Ce.wrapCache.get(e);if(n)return n;const o=new t(e,i,(e=>Ce.wrapInternal(t,e,i)));return Ce.wrapCache.set(e,o),o}}ye=_e.BaseItem=Ce,Ce.wrapCache=new WeakMap;const we=t=>!!t&&"contentItems"in t&&(t.isRow||t.isColumn);class Ie extends ye{isRoot(){return!!this._item.parent?.isGround}getBounds(){return this._item.element.getBoundingClientRect()}get viewName(){if(this._item.isComponent){const{component:t}=this._item;return t.identity.name}throw new Error("View name not found")}onDestroyed(t){const e=({target:i})=>{i===this._item&&(t(),this._item.off("itemDestroyed",e))};this._item.on("itemDestroyed",e)}createAdjacentStack({position:t="right"}={}){const e=this.raw;if(ee.isStack(e)&&e.parent){const i=["top","bottom"].includes(t)?"column":"row",n=["left","top"].includes(t)?1:0,o=we(e.parent)?e.parent:e.layoutManager,s=o,r=e.parent.contentItems.indexOf(e);e.parent.isGround&&e.parent.removeChild(e,!0);const a=o.newItem({type:i,content:[{type:"stack",content:[]}]},r);if(!a)throw new Error("createAdjacentStack: Failed to create new container");const l=a.contentItems[0];return a.addChild(this.raw,n),we(s)&&s.removeChild(e,!0),this._wrap(l)}throw new Error(`Cannot creat adjacent stacks for type: ${e.type}, must be type 'stack'`)}setActiveContentItem(t,e=!0){if(!ee.isStack(this._item))throw new Error(`Cannot call setActiveContentItem from a non-stack item: ${this.type}`);this._item.setActiveComponentItem(t.raw,!e)}static wrap(t,e){return ye.wrapInternal(Ie,t,e)}}function be(t=[],e){for(const i of t)"component"===i.type?Object.keys(e).forEach((t=>{t in i&&(i.componentState={[`${de}${t}`]:i[t],...i.componentState}),i[t]=e[t]})):be(i.content,e)}function Se(t=[],e,i){for(const n of t)if("component"===n.type)Object.keys(e).forEach((t=>{if(`${de}${t}`in n.componentState)return n[t]=n.componentState[`${de}${t}`],void delete n.componentState[`${de}${t}`];n[t]=e[t]}));else{if(n.size&&("row"===i||"column"===i)){n["row"===i?"width":"height"]=n.size?.includes(".")?parseFloat(n.size):parseInt(n.size)}Se(n.content,e,n.type)}}function Ee(t){if(t.root){t.root.content&&Se([t.root],{componentName:"view",isClosable:!0});const e=t.root;t.content=[e],delete t.root}return t}const xe=e=>class extends e{connectedCallback(){if(!this.name||!this.uuid)throw new Error(" Name or uuid attribute missing");if(!this.src)throw new Error(" missing 'src' attribute.");this.#t||(this.#t=document.createElement("iframe"),this.#t.src=this.src,this.#t.style.height="100%",this.#t.style.width="100%",this.#t.style.border="none",this.forceFrameName?this.#t.setAttribute("name",this.forceFrameName):this.#t.setAttribute("name",t.encodeOptions({brokerUrl:this.brokerUrl,name:this.name,uuid:this.uuid,providerId:this.providerId,contextGroup:this.contextGroup},"of-frame")),this.#t.setAttribute("id",this.name),this.appendChild(this.#t))}#t;get brokerUrl(){return this.getAttribute("of-broker")}set brokerUrl(t){t&&this.setAttribute("of-broker",t)}get name(){return this.getAttribute("of-name")}set name(t){t&&this.setAttribute("of-name",t)}get forceFrameName(){return this.getAttribute("forceFrameName")}set forceFrameName(t){t&&this.setAttribute("forceFrameName",t)}get uuid(){return this.getAttribute("of-uuid")}set uuid(t){t&&this.setAttribute("of-uuid",t)}get src(){return this.getAttribute("src")}set src(t){t&&this.setAttribute("src",t)}get providerId(){return this.getAttribute("of-provider-id")}set providerId(t){t&&this.setAttribute("of-provider-id",t)}get contextGroup(){return this.getAttribute("of-context-group")}set contextGroup(t){t&&this.setAttribute("of-context-group",t)}static get observedAttributes(){return["name"]}};class Le{static create(t){const e=document.createElement("of-view");return Object.entries(t).forEach((([t,i])=>{e.setAttribute(t,i)})),e}}customElements.define("of-view",xe(HTMLElement));class ze{constructor(t,i,n,{brokerUrl:o,interopConfig:s},r){this.container=t,this.config=i,this.ofView=null,this.isDragging=()=>this.container.tab.element?.className.includes("lm_dragging")??!1;const{url:a,web:l,interop:h,name:d}=i||{},c=d??`internal-generated-view-${e.v4()}`;if(this.identity={uuid:n,name:c},this.container.element.setAttribute("of-name",c),this.container.element.id=`container-${c}`,this.container.parent.id=c,void 0===a)return void this.handleUrlMissing();const m=this.updateTitleIfNotSet(a),u={"of-broker":o,"of-uuid":n,"of-name":c,src:a};l?.frameName&&(u.forceFrameName=l.frameName);const p=h?.currentContextGroup??s?.currentContextGroup;p&&(u["of-context-group"]=p),s?.providerId&&(u["of-provider-id"]=s?.providerId),this.ofView=Le.create(u),this.ofView.title=m??`Iframe: ${a}`,r.appendChild(this.ofView),this.ofView.style.position="absolute"}updateTitleIfNotSet(t){return"view"===this.container.parent.title&&this.container.parent.setTitle(t),this.container.parent.title}handleUrlMissing(){const t=document.createElement("div");t.setAttribute("style","padding: 20px");t.innerText="No URL provided",this.container.element.appendChild(t)}destroy(){this.ofView?.remove(),this.ofView=null}closeView(){this.container.close()}resize(){if(this.ofView){if(this.isDragging())return void(this.ofView.style.display="none");const t=this.container.element.getBoundingClientRect();this.ofView.style.position="absolute",this.ofView.style.height=`${t.height}px`,this.ofView.style.width=`${t.width}px`,this.ofView.style.inset=`${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`,this.ofView.style.display="block"}}}class Me extends U{static overrideConfig(t){const e={...ue,...t.settings,...pe};return e.reorderEnabled?be(t.content,{isClosable:!0}):be(t.content,{reorderEnabled:!1}),{dimensions:me,...t,settings:e,header:{...ce,show:!1!==t.settings?.hasHeaders&&ce.show}}}constructor(t,e,i,{options:n},o,s){super(),this.identity=t,this.container=e,this.initialConfig=i,this.layoutManager=o,this.platformProvider=s,this.viewComponentsByContainerElement=new Map,this.layoutContentCache=_.getSingleInstance(),this.reparentingViews=new Set,this.goldenLayoutDestroyed=!1,this.createViewComponent=(t,e)=>{m.handleSharedView(this.layoutManager,this.identity,e);const i=new ze(t,e,this.identity.uuid,this.options,this.iframeContainer);return e&&!1===e[`${de}isClosable`]&&this.stylesheet.insertRule(`#tab-${i.identity.name} .lm_close_tab { display: none; }`),this.viewComponentsByContainerElement.set(t.element,i),this.resizeController.observeContainer(t.element),i},this.iframeContainer=document.createElement("div"),this.iframeContainer.id=`openfin-layout-iframe-container-${this.identity.layoutName}`,this.domEmitter=new V(e),this.setupStylesheets(),this.layout=new he(this.container),this.layout.resizeWithContainerAutomatically=!0,this.options=n,this.layout.registerComponent("view",this.createViewComponent),this.setupListeners(),this.resizeController=new ve(this),this.layout.loadLayout(Me.overrideConfig(i));const r=document.createElement("div");r.id=`openfin-layout-shadow-container-${this.identity.layoutName}`,r.attachShadow({mode:"open",delegatesFocus:!1}).appendChild(this.iframeContainer),this.container.appendChild(r),this.resizeController.observeMutations(this.container)}getStackByView({name:t}){const e=this.layout.findFirstComponentItemById(t);if(e?.parent&&e?.parent?.isStack)return Ie.wrap(e.parent,this)}getRoot(){return Ie.wrap(this.layout.rootItem,this)}async platformCloseView(t){const e=[...this.viewComponentsByContainerElement.values()].find((e=>e.identity.name===t.name));if(!e)throw new Error(`View with name: ${t.name} not found in layout.`);e.closeView()}async platformCreateView(t,{location:e,targetView:i}={}){if(i)throw new Error("TargetView not supported in web");const n={options:this.platformProvider.normalizeOptions(t),target:this.identity,location:e};return this.insertView(n)}setupStylesheets(){if(this.container.setAttribute("data-openfin-layout-name",this.identity.layoutName),this.stylesheet=new CSSStyleSheet,this.stylesheet.insertRule(".lm_close { display: none; }"),document.adoptedStyleSheets.push(this.stylesheet),this.initialConfig.settings?.preventSplitterResize){const t=`\n [data-openfin-layout-name='${this.identity.layoutName}'] .lm_splitter {\n pointer-events: none;\n }`;this.stylesheet.insertRule(t)}}insertView({options:t,location:e,targetView:i}){const n=e?this.layoutContentCache.getItemOrUndefined(e.id):void 0,o=i?this.layoutContentCache.getItemOrUndefined(i.name):void 0,s=n??o??Ie.wrap(this.layout.rootItem,this);let r;if(ee.isStack(s.raw))r=s.raw;else{if(!we(s.raw))throw new Error("Cannot add a view at the requested location");r=s.raw.newItem({type:"stack",content:[]})}const a=Math.min(r.contentItems.length,e?.index??r.contentItems.length);let l=this.layout.findFirstComponentItemById(t.name);l?(l.parent&&l.parent.removeChild(l,!0),r.addChild(l,a)):l=r.newComponent("view",t,t.title??t.url??"Default Title",a);const h=l.component.identity;return Promise.resolve({identity:h})}replaceView({viewToReplace:t,newView:e}){throw new Error("Method not implemented.")}replaceLayout(t){throw new Error("Method not implemented.")}async cleanupView(t){}applyPreset(t){throw new Error("Method not implemented.")}getCurrentViews(){return[...this.viewComponentsByContainerElement.values()].map((t=>t.identity))}async getFrameSnapshot(){return Ee(xt.fromResolved(this.layout.toConfig()))}isVisible(){return W(this.container)}async onViewDetached({viewIdentity:t}){this.reparentingViews.add(t.name),this.platformCloseView(t)}async destroy(){this.goldenLayoutDestroyed||(this.goldenLayoutDestroyed=!0,this.layout.destroy()),this.iframeContainer.remove(),this.resizeController.destroy(),document.adoptedStyleSheets=document.adoptedStyleSheets.filter((t=>t!==this.stylesheet)),this.viewComponentsByContainerElement.clear()}setupListeners(){this.container.addEventListener("pointerdown",(t=>{if(t.target instanceof HTMLElement){const e=t.target.classList;["lm_tab","lm_title","lm_splitter","lm_drag_handle"].some((t=>e.contains(t)))&&(this.handleDragStart(),2===t.button&&t.stopPropagation())}}),!0),document.addEventListener("pointerup",(()=>this.handleDragEnd()),!0),this.layout.on("tabCreated",(t=>{const e=t.componentItem.component;t.element.id=`tab-${e.identity.name}`,this.domEmitter.dispatchLocalEvent("tab-created",e.identity)})),this.layout.on("itemCreated",(({target:t})=>{const e=t;if(Gt.isComponentItem(e)){const t=e.component;this.domEmitter.dispatchLocalEvent("container-created",t.identity)}})),this.layout.on("itemDestroyed",(t=>{const e=t.target;if(Gt.isComponentItem(e)){const t=e.component;this.removeViewComponent(t)}})),this.layout.on("itemDropped",(()=>{this.handleDragEnd()}))}handleDragStart(){this.iframeContainer.style.pointerEvents="none"}handleDragEnd(){this.iframeContainer.style.pointerEvents=""}removeViewComponent(t){if(t.config&&!1===t.config[`${de}isClosable`]){const e=[...this.stylesheet.cssRules].findIndex((e=>e.cssText.includes(`#tab-${t.identity.name}`)));this.stylesheet.deleteRule(e)}t.destroy(),this.viewComponentsByContainerElement.delete(t.container.element),this.resizeController.unobserveContainer(t.container.element),this.reparentingViews.has(t.identity.name)?this.reparentingViews.delete(t.identity.name):this.platformProvider.closeView(t.identity.name);0===this.getCurrentViews().length&&(this.goldenLayoutDestroyed||(this.goldenLayoutDestroyed=!0,m.handleLastViewRemoved(this.layoutManager,this.identity)))}}class Pe{constructor(t,e,i,n){this.windowIdentity=t,this.connectConfig=e,this.provider=i,this.fallbackContainer=n}async createLayout(t,e){if(!("container"in t)&&!this.fallbackContainer)throw new Error("Container property is not optional in web");const{layoutName:i}=t,n=t,o=this.provider.initLayoutViews(n),s=n.container??this.fallbackContainer,r={...this.windowIdentity,layoutName:i},a=new Me(r,s,o,this.connectConfig,e,this.provider);m.registerLayout(e,i,a),this.fallbackContainer=null}async getLayoutSnapshot(t){return t.getLayoutSnapshot()}async handleLastViewRemoved(t){}}class Te{static async init(e){const i=e.getFin().InterApplicationBus.Channel,n=await i.create(`custom-frame-${e.me.uuid}`);return n.setDefaultAction((async(t,{target:e,opts:i},o)=>{const s=n.connections.find((t=>t.name===e.name));if(s)return n.dispatch(s,t,{...i,target:e});throw new Error(`Client with name ${e.name} not found`)})),await t.relayChannelClientApi_1(n,"layout-relay"),new Te(e)}constructor(t){this.wire=t,this.viewNames=new Set}normalizeOptions(t,i="default"){const n=this.wire.me.uuid;let{name:o=`internal-generated-view-${e.v4()}`}=t;return o.match(/^internal-generated-view-/)&&this.viewNames.has(o)&&"duplicate"===i&&(o=`internal-generated-view-${e.v4()}`),this.viewNames.add(o),{...t,name:o,uuid:n}}closeView(t){this.viewNames.delete(t)}initLayoutViews({layout:t,multiInstanceViewBehavior:e}){return H((t=>{if("component"===t.type&&t.componentState){const i=this.normalizeOptions(t.componentState,e);return{...t,componentState:i}}return t}),t)}}var Ae;const ke=t=>t;Ae=new WeakMap,exports.WebLayoutEntryPoint=class{constructor(e){Ae.set(this,void 0),this.initLayoutManager=async(e,i,{container:n,layoutManagerOverride:o})=>{const s=await Te.init(i),r=o??ke,a=new Pe(i.me,t.__classPrivateFieldGet(this,Ae,"f"),s,n),l=new(r(m.createClosedConstructor(a)));return await M(i,l),l},this.applyLayoutSnapshot=async(e,i,n)=>{await i.applyLayoutSnapshot(t.__classPrivateFieldGet(this,Ae,"f").platform.layoutSnapshot)},this.createLayout=async(t,e)=>m.createLayout(t,e),this.destroyLayout=async(t,e)=>m.destroyLayout(t,e),t.__classPrivateFieldSet(this,Ae,e,"f")}}; @@ -7340,7 +7340,7 @@ module.exports = stubFalse; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.init = init; -const core_web_1 = __webpack_require__(/*! @openfin/core-web */ "./node_modules/@openfin/core-web/out/api-client.js"); +const core_web_1 = __webpack_require__(/*! @openfin/core-web */ "../../node_modules/@openfin/core-web/out/api-client.js"); const settings_1 = __webpack_require__(/*! ./settings */ "./client/src/platform/settings.ts"); /** * Initializes the OpenFin Web Broker connection. @@ -8387,7 +8387,7 @@ function version(uuid) { /******/ /************************************************************************/ var __webpack_exports__ = {}; -// This entry need to be wrapped in an IIFE because it need to be in strict mode. +// This entry needs to be wrapped in an IIFE because it needs to be in strict mode. (() => { "use strict"; var exports = __webpack_exports__; diff --git a/web/v19.2.0/cloud-interop/js/fdc3-view.bundle.js.map b/web/v19.2.0/cloud-interop/js/fdc3-view.bundle.js.map index b18b4a6..181dde6 100644 --- a/web/v19.2.0/cloud-interop/js/fdc3-view.bundle.js.map +++ b/web/v19.2.0/cloud-interop/js/fdc3-view.bundle.js.map @@ -1 +1 @@ -{"version":3,"file":"fdc3-view.bundle.js","mappings":";;;;;;;;;;AAAa,MAAM,mBAAO,CAAC,iFAAoB,EAAE,mBAAO,CAAC,mDAAS,EAAE,mBAAO,CAAC,+DAAM,EAAE,mBAAO,CAAC,mDAAQ,EAAE,mBAAO,CAAC,gEAAkB,EAAE,mBAAO,CAAC,4DAAgB,EAAE,eAAe;;;;;;;;;;;;ACA9J,MAAM,mBAAO,CAAC,mDAAS,IAAI,mBAAO,CAAC,mDAAQ,IAAI,mBAAO,CAAC,gEAAkB,IAAI,mBAAO,CAAC,4DAAgB,IAAI,mBAAO,CAAC,+DAAM,EAAE,kBAAkB,EAAE,GAAG,wBAAwB,GAAG,sGAAsG,qBAAM,CAAC,qBAAM,iCAAiC,KAAK,KAAK,KAAK,MAAM,oBAAoB,WAAW,kBAAkB,kBAAkB,UAAU,SAAS,sCAAsC,SAAS,sFAAsF,mCAAmC,6BAA6B,GAAG,kCAAkC,6BAA6B,mDAAmD,0CAA0C,yDAAyD,iEAAiE,oFAAoF,2IAA2I,mDAAmD,kDAAkD,oFAAoF,4IAA4I,sDAAsD,sCAAsC,SAAS,sCAAsC,UAAU,QAAQ,eAAe,mNAAmN,UAAU,0BAA0B,SAAS,qBAAqB,SAAS,8BAA8B,sBAAsB,yiBAAyiB,QAAQ,SAAS,2EAA2E,6BAA6B,KAAK,IA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;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,cAAc,SAAS;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,2CAA2C,UAAU;AACrD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;ACrJA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEY;;AAEZ,eAAe,mBAAO,CAAC,wDAAW;AAClC,gBAAgB,mBAAO,CAAC,oDAAS;AACjC;AACA;AACA;AACA;;AAEA,cAAc;AACd,kBAAkB;AAClB,yBAAyB;;AAEzB;AACA,kBAAkB;;AAElB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,kBAAkB,YAAY;AAC9B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA,wCAAwC,SAAS;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;;AAEA;AACA;AACA,cAAc,iBAAiB;AAC/B;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,iDAAiD,EAAE;AACnD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C;AAC1C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA,yBAAyB,eAAe;AACxC;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,yBAAyB,QAAQ;AACjC;AACA,sBAAsB,eAAe;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc,YAAY;AAC1B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB,sBAAsB;AACxC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,mBAAmB;AACnB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA,oBAAoB,SAAS;AAC7B;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA,qBAAqB,WAAW,GAAG,IAAI;AACvC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA,gBAAgB,WAAW,GAAG,IAAI,KAAK,aAAa;AACpD;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;;AAEA;AACA,GAAG;AACH;AACA;AACA,mBAAmB,KAAK,mDAAmD,cAAc;AACzF,GAAG;AACH;AACA;AACA,+BAA+B,IAAI;AACnC;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,MAAM,aAAa,SAAS;AACtD;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,SAAS,gBAAgB;AACzB,cAAc,oBAAoB,EAAE,IAAI;AACxC;AACA,YAAY,gBAAgB,EAAE,IAAI;AAClC;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,GAAG,SAAS,GAAG,KAAK,qBAAqB,EAAE,EAAE;AACpE,QAAQ;AACR,yBAAyB,GAAG,KAAK,yBAAyB,EAAE,EAAE;AAC9D,mBAAmB,yBAAyB,EAAE,EAAE;AAChD;AACA,MAAM;AACN,oBAAoB,IAAI,EAAE,GAAG,SAAS,IAAI,EAAE,EAAE;AAC9C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,0CAA0C,cAAc,SAAS,OAAO;AACxE;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,kBAAkB,YAAY;AAC9B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,kBAAkB,gBAAgB;AAClC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,kBAAkB,gBAAgB;AAClC;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,cAAc,YAAY;AAC1B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,QAAQ;AAC1B;AACA,oBAAoB,QAAQ;AAC5B;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;;;;;ACzjEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEa;;AAEb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB;;AAEnB;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,sBAAsB;AACxC;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA,eAAe;AACf;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA,oBAAoB,SAAS;AAC7B;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;;AAEA,kCAAkC,QAAQ;AAC1C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oBAAoB,iBAAiB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,QAAQ;AACR;AACA,uCAAuC,QAAQ;AAC/C;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,OAAO;AACzB;AACA;AACA;;AAEA;AACA,SAAS,yBAAyB;AAClC;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,gBAAgB;AAClC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,8DAA8D,YAAY;AAC1E;AACA,8DAA8D,YAAY;AAC1E;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,qCAAqC,YAAY;AACjD;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;AACA;;;;;;;;;;;AChfA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,SAAS,WAAW;;AAEpB;AACA;AACA;AACA,SAAS,WAAW;;AAEpB;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA,SAAS,WAAW;;AAEpB;AACA;AACA,SAAS,UAAU;;AAEnB;AACA;;;;;;;;;;;ACpFA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,WAAW,mBAAO,CAAC,mDAAS;;AAE5B;AACA;;AAEA;;;;;;;;;;;ACNA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,cAAc,mBAAO,CAAC,yDAAY;AAClC,cAAc,mBAAO,CAAC,yDAAY;AAClC,cAAc,mBAAO,CAAC,yDAAY;;AAElC;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC/BA,qBAA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AAW,UAAU;AACrB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa,GAAG;AAChB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;AACA,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;;;;;;;;;;ACrKA,eAAe,mBAAO,CAAC,yDAAY;;AAEnC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;;;;;;;;;;AC7BA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,cAAc,mBAAO,CAAC,uDAAW;;AAEjC;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACnBA,aAAa,mBAAO,CAAC,uDAAW;AAChC,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,qBAAqB,mBAAO,CAAC,uEAAmB;;AAEhD;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC3BA,iBAAiB,mBAAO,CAAC,+DAAe;A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;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA,iBAAiB,mBAAO,CAAC,6DAAc;AACvC,eAAe,mBAAO,CAAC,2DAAa;AACpC,eAAe,mBAAO,CAAC,yDAAY;AACnC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;AACA;AACA;AACA,oCAAoC;;AAEpC;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC9CA,aAAa,mBAAO,CAAC,uDAAW;AAChC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,eAAe,mBAAO,CAAC,yDAAY;AACnC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC3DA,kBAAkB,mBAAO,CAAC,iEAAgB;AAC1C,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AAC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C;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ,UAAU;AAC7B,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACfA,WAAW,mBAAO,CAAC,mDAAS;;AAE5B;AACA;;AAEA;;;;;;;;;;;ACLA,gBAAgB,mBAAO,CAAC,6DAAc;;AAEtC;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,IAAI;AACJ,CAAC;;AAED;;;;;;;;;;;ACVA,eAAe,mBAAO,CAAC,2DAAa;AACpC,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACnFA,aAAa,mBAAO,CAAC,uDAAW;AAChC,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,SAAS,mBAAO,CAAC,6CAAM;AACvB,kBAAkB,mBAAO,CAAC,iEAAgB;AAC1C,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC/GA,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACzFA;AACA,wBAAwB,qBAAM,gBAAgB,qBAAM,IAAI,qBAAM,sBAAsB,qBAAM;;AAE1F;;;;;;;;;;;ACHA,qBAAqB,mBAAO,CAAC,uEAAmB;AAChD,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,WAAW,mBAAO,CAAC,iDAAQ;;AAE3B;AACA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AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,GAAG;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC7BA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACtBA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACtBA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACzBA,uBAAuB,mBAAO,CAAC,2EAAqB;AACpD,oBAAoB,mBAAO,CAAC,qEAAkB;AAC9C,kBAAkB,mBAAO,CAAC,iEAAgB;AAC1C,kBAAkB,mBAAO,CAAC,iEAAgB;AAC1C,sBAAsB,mBAAO,CAAC,yEAAoB;;AAElD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC5EA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,mBAAmB,mBAAO,CAAC,mEAAiB;AAC5C,kBAAkB,mBAAO,CAAC,iEAAgB;;AAE1C;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACxBA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACdA,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACnBA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACZA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClCA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,GAAG;AAChB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;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ACpB;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;;;;;;;;;;ACjBA,gBAAgB,mBAAO,CAAC,6DAAc;;AAEtC;AACA;;AAEA;;;;;;;;;;;ACLA,cAAc,mBAAO,CAAC,yDAAY;;AAElC;AACA;;AAEA;;;;;;;;;;;ACLA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACnBA,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA,kBAAkB,KAA0B;;AAE5C;AACA,gCAAgC,QAAa;;AAE7C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ,CAAC;;AAED;;;;;;;;;;;AC7BA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACrBA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,aAAa,UAAU;AACvB;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACdA,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;ACRA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACbA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;;;;;;;;;;ACjBA,gBAAgB,mBAAO,CAAC,6DAAc;;AAEtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACdA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,GAAG;AAChB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACbA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACbA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,UAAU,mBAAO,CAAC,iDAAQ;AAC1B,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjCA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;;;;;;;;;;;ACzBA,gBAAgB,mBAAO,CAAC,6DAAc;;AAEtC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,GAAG;AAChB;AACA;AACA;AACA,oBAAoB,QAAQ,IAAI,QAAQ;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,kBAAkB;AAClB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpCA,sBAAsB,mBAAO,CAAC,yEAAoB;AAClD,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA,8BAA8B,mBAAmB;AACjD;AACA;AACA;AACA;AACA;AACA,+CAA+C,mBAAmB;AAClE;AACA;AACA;;AAEA;;;;;;;;;;;ACnCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACzBA,iBAAiB,mBAAO,CAAC,6DAAc;AACvC,eAAe,mBAAO,CAAC,yDAAY;;AAEnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AChCA,WAAW,mBAAO,CAAC,mDAAS;AAC5B,gBAAgB,mBAAO,CAAC,2DAAa;;AAErC;AACA,kBAAkB,KAA0B;;AAE5C;AACA,gCAAgC,QAAa;;AAE7C;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACrCA,kBAAkB,mBAAO,CAAC,iEAAgB;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,kBAAkB;AAClB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClCA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,eAAe,mBAAO,CAAC,yDAAY;;AAEnC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpCA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClCA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC1BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC9BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC5BA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC1BA,uBAAuB,mBAAO,CAAC,2EAAqB;AACpD,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC1BA,oBAAoB,mBAAO,CAAC,qEAAkB;AAC9C,eAAe,mBAAO,CAAC,2DAAa;AACpC,kBAAkB,mBAAO,CAAC,+DAAe;;AAEzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpCA,oBAAoB,mBAAO,CAAC,qEAAkB;AAC9C,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,kBAAkB,mBAAO,CAAC,+DAAe;;AAEzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC/BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,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,CAAC,MAAM,cAAc,CAAC,IAAI,EAAE,CAAsB,CAAC;QACtE,OAAO,UAAU,CAAC;IACnB,CAAC;IACD,OAAO,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,aAAa,CAAC;AAC/C,CAAC;AAED;;;GAGG;AACH,KAAK,UAAU,mBAAmB;IACjC,wBAAwB;IACxB,MAAM,IAAI,GAAG,QAAQ,CAAC,aAAa,CAAkB,sBAAsB,CAAC,CAAC;IAC7E,IAAI,IAAI,KAAK,IAAI,EAAE,CAAC;QACnB,MAAM,gBAAgB,GAAG,MAAM,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAChD,MAAM,YAAY,GAAG,CAAC,MAAM,gBAAgB,CAAC,IAAI,EAAE,CAAkC,CAAC;QACtF,OAAO,YAAY,CAAC,eAAe,CAAC;IACrC,CAAC;AACF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACjDuC;AACA;AACA;AACA;AACE;AACQ;AACE;AACE;;;;;;;;;;;;;;;;ACPtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD;;AAEnD;;AAEA,oBAAoB,gBAAgB;AACpC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA,kBAAkB,cAAc;AAChC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,kBAAkB,cAAc;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,kBAAkB,aAAa;AAC/B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,iEAAe,GAAG;;;;;;;;;;;;;;;ACtNlB,iEAAe,sCAAsC;;;;;;;;;;;;;;;;ACAhB;;AAErC;AACA,OAAO,wDAAQ;AACf;AACA;;AAEA;AACA,gCAAgC;;AAEhC;AACA;AACA;AACA,qBAAqB;;AAErB;AACA,qBAAqB;;AAErB;AACA,qBAAqB;;AAErB;AACA,qBAAqB;AACrB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,iEAAe,KAAK;;;;;;;;;;;;;;;AClCpB,iEAAe,cAAc,EAAE,UAAU,EAAE,eAAe,EAAE,gBAAgB,EAAE,UAAU,GAAG,yCAAyC;;;;;;;;;;;;;;;ACApI;AACA;AACA;AACA;AACA;AACe;AACf;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;AClBA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,mDAAmD;;AAEnD;;AAEA,oBAAoB,gBAAgB;AACpC;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,mBAAmB,QAAQ;AAC3B;;AAEA,oBAAoB,QAAQ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AC/C,MAAM,MAAM,CAAC,IAAI,CAAC,kBAAkB,CAAC,IAAI,EAAE,CAAC,OAAO,EAAE,EAAE;gBACtD,iBAAiB,CAAC,OAAO,CAAC,CAAC;YAC5B,CAAC,CAAC,CAAC;QACJ,CAAC,CAAC,CAAC;IACJ,CAAC;AACF,CAAC;AAED;;;GAGG;AACH,SAAS,iBAAiB,CAAC,OAAgB;IAC1C,MAAM,eAAe,GAAG,QAAQ,CAAC,aAAa,CAAkB,cAAc,CAAC,CAAC;IAChF,MAAM,eAAe,GAAG,QAAQ,CAAC,aAAa,CAAkB,cAAc,CAAC,CAAC;IAChF,MAAM,cAAc,GAAG,QAAQ,CAAC,aAAa,CAAiB,cAAc,CAAC,CAAC;IAE9E,IAAI,eAAe,KAAK,IAAI,IAAI,eAAe,KAAK,IAAI,IAAI,cAAc,KAAK,IAAI,EAAE,CAAC;QACrF,eAAe,CAAC,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;QAC3C,eAAe,CAAC,WAAW,GAAG,OAAO,CAAC,IAAI,IAAI,mBAAmB,CAAC;QAClE,cAAc,CAAC,WAAW,GAAG,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;IAC/D,CAAC;AACF,CAAC;AAED;;GAEG;AACH,KAAK,UAAU,aAAa;IAC3B,MAAM,eAAe,GAAG,QAAQ,CAAC,aAAa,CAAoB,YAAY,CAAC,CAAC;IAEhF,IAAI,eAAe,KAAK,IAAI,EAAE,CAAC;QAC9B,eAAe,CAAC,gBAAgB,CAAC,OAAO,EAAE,KAAK,IAAI,EAAE;YACpD,MAAM,gBAAgB,EAAE,CAAC;QAC1B,CAAC,CAAC,CAAC;IACJ,CAAC;IAED,MAAM,eAAe,EAAE,CAAC;AACzB,CAAC","sources":["webpack://openfin-web--cloud-interop/./node_modules/@openfin/core-web/out/api-client.js","webpack://openfin-web--cloud-interop/./node_modules/@openfin/core-web/out/main-8cad4070.js","webpack://openfin-web--cloud-interop/./node_modules/@openfin/core-web/out/main-b14f67c9.js","webpack://openfin-web--cloud-interop/../../node_modules/base64-js/index.js","webpack://openfin-web--cloud-interop/../../node_modules/buffer/index.js","webpack://openfin-web--cloud-interop/../../node_modules/events/events.js","webpack://openfin-web--cloud-interop/../../node_modules/ieee754/index.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_DataView.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_Hash.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_ListCache.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_Map.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_MapCache.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_Promise.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_Set.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_SetCache.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_Stack.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_Symbol.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_Uint8Array.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_WeakMap.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_arrayEach.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_arrayFilter.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_arrayLikeKeys.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_arrayPush.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_arraySome.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_assignValue.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_assocIndexOf.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseAssign.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseAssignIn.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseAssignValue.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseClone.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseCreate.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseGetAllKeys.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseGetTag.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseIsArguments.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseIsEqual.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseIsEqualDeep.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseIsMap.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseIsNative.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseIsSet.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseIsTypedArray.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseKeys.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseKeysIn.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseTimes.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseUnary.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_cacheHas.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_cloneArrayBuffer.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_cloneBuffer.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_cloneDataView.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_cloneRegExp.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_cloneSymbol.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_cloneTypedArray.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_copyArray.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_copyObject.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_copySymbols.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_copySymbolsIn.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_coreJsData.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_defineProperty.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_equalArrays.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_equalByTag.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_equalObjects.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_freeGlobal.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_getAllKeys.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_getAllKeysIn.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_getMapData.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_getNative.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_getPrototype.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_getRawTag.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_getSymbols.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_getSymbolsIn.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_getTag.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_getValue.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_hashClear.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_hashDelete.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_hashGet.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_hashHas.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_hashSet.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_initCloneArray.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_initCloneByTag.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_initCloneObject.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_isIndex.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_isKeyable.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_isMasked.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_isPrototype.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_listCacheClear.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_listCacheDelete.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_listCacheGet.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_listCacheHas.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_listCacheSet.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_mapCacheClear.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_mapCacheDelete.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_mapCacheGet.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_mapCacheHas.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_mapCacheSet.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_mapToArray.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_nativeCreate.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_nativeKeys.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_nativeKeysIn.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_nodeUtil.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_objectToString.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_overArg.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_root.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_setCacheAdd.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_setCacheHas.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_setToArray.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_stackClear.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_stackDelete.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_stackGet.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_stackHas.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_stackSet.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_toSource.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/cloneDeep.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/eq.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/isArguments.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/isArray.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/isArrayLike.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/isBuffer.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/isEqual.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/isFunction.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/isLength.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/isMap.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/isObject.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/isObjectLike.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/isSet.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/isTypedArray.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/keys.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/keysIn.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/stubArray.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/stubFalse.js","webpack://openfin-web--cloud-interop/./client/src/platform/api.ts","webpack://openfin-web--cloud-interop/./client/src/platform/settings.ts","webpack://openfin-web--cloud-interop/../../node_modules/uuid/dist/esm-browser/index.js","webpack://openfin-web--cloud-interop/../../node_modules/uuid/dist/esm-browser/md5.js","webpack://openfin-web--cloud-interop/../../node_modules/uuid/dist/esm-browser/nil.js","webpack://openfin-web--cloud-interop/../../node_modules/uuid/dist/esm-browser/parse.js","webpack://openfin-web--cloud-interop/../../node_modules/uuid/dist/esm-browser/regex.js","webpack://openfin-web--cloud-interop/../../node_modules/uuid/dist/esm-browser/rng.js","webpack://openfin-web--cloud-interop/../../node_modules/uuid/dist/esm-browser/sha1.js","webpack://openfin-web--cloud-interop/../../node_modules/uuid/dist/esm-browser/stringify.js","webpack://openfin-web--cloud-interop/../../node_modules/uuid/dist/esm-browser/v1.js","webpack://openfin-web--cloud-interop/../../node_modules/uuid/dist/esm-browser/v3.js","webpack://openfin-web--cloud-interop/../../node_modules/uuid/dist/esm-browser/v35.js","webpack://openfin-web--cloud-interop/../../node_modules/uuid/dist/esm-browser/v4.js","webpack://openfin-web--cloud-interop/../../node_modules/uuid/dist/esm-browser/v5.js","webpack://openfin-web--cloud-interop/../../node_modules/uuid/dist/esm-browser/validate.js","webpack://openfin-web--cloud-interop/../../node_modules/uuid/dist/esm-browser/version.js","webpack://openfin-web--cloud-interop/webpack/bootstrap","webpack://openfin-web--cloud-interop/webpack/runtime/define property getters","webpack://openfin-web--cloud-interop/webpack/runtime/global","webpack://openfin-web--cloud-interop/webpack/runtime/hasOwnProperty shorthand","webpack://openfin-web--cloud-interop/webpack/runtime/make namespace object","webpack://openfin-web--cloud-interop/webpack/runtime/node module decorator","webpack://openfin-web--cloud-interop/./client/src/content/fdc3-view.ts"],"sourcesContent":["\"use strict\";var e=require(\"./main-8cad4070.js\");require(\"buffer/\"),require(\"uuid\"),require(\"events\"),require(\"lodash/cloneDeep\"),require(\"lodash/isEqual\"),exports.connect=e.connect;\n","\"use strict\";var e=require(\"buffer/\"),t=require(\"events\"),n=require(\"lodash/cloneDeep\"),i=require(\"lodash/isEqual\"),r=require(\"uuid\");const o=(e,t)=>`${t}<${btoa(JSON.stringify(e))}>`;var s=\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof window?window:\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:{},a={},c={},d={},h={};async function l(e){const t=[];for(const n of e){const e=await n();t.push(e)}return t}Object.defineProperty(h,\"__esModule\",{value:!0}),h.promiseMapSerial=h.serial=h.promiseMap=h.promisify=void 0,h.promisify=function(e){return(...t)=>new Promise(((n,i)=>{e(...t,((e,t)=>e?i(e):n(t)))}))},h.promiseMap=async function(e,t){return Promise.all(e.map(t))},h.serial=l,h.promiseMapSerial=async function(e,t){return l(e.map(((e,n,i)=>()=>t(e,n,i))))};var u,p=s&&s.__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},w=s&&s.__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)};Object.defineProperty(d,\"__esModule\",{value:!0}),d.Reply=d.EmitterBase=d.Base=void 0;const y=h;class f{constructor(e){this.isNodeEnvironment=()=>\"node\"===this.wire.environment.type,this.isOpenFinEnvironment=()=>\"openfin\"===this.wire.environment.type,this.isBrowserEnvironment=()=>\"other\"===this.wire.environment.type,this.wire=e}get fin(){return this.wire.getFin()}get me(){return this.wire.me}}d.Base=f;d.EmitterBase=class extends f{constructor(e,t,...n){super(e),this.topic=t,u.set(this,void 0),this.eventNames=()=>this.hasEmitter()?this.getOrCreateEmitter().eventNames():[],this.emit=(e,t,...n)=>!!this.hasEmitter()&&this.getOrCreateEmitter().emit(e,t,...n),this.hasEmitter=()=>this.wire.eventAggregator.has(w(this,u,\"f\")),this.getOrCreateEmitter=()=>this.wire.eventAggregator.getOrCreate(w(this,u,\"f\")),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[],this.listenerCount=e=>this.hasEmitter()?this.getOrCreateEmitter().listenerCount(e):0,this.registerEventListener=async(e,t={},n,i)=>{const r={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e},o=this.getOrCreateEmitter();n(o);try{await this.wire.sendAction(\"subscribe-to-desktop-event\",r)}catch(e){throw i(o),this.deleteEmitterIfNothingRegistered(o),e}},this.deregisterEventListener=async(e,t={})=>{if(this.hasEmitter()){const n={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e};await this.wire.sendAction(\"unsubscribe-to-desktop-event\",n).catch((()=>null));return this.getOrCreateEmitter()}return Promise.resolve()},p(this,u,[t,...n],\"f\"),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[]}async on(e,t,n){return await this.registerEventListener(e,n,(n=>{n.on(e,t)}),(n=>{n.removeListener(e,t)})),this}async addListener(e,t,n){return this.on(e,t,n)}async once(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.once(e,i),n.once(e,t)}),(n=>{n.removeListener(e,i),n.removeListener(e,t)})),this}async prependListener(e,t,n){return await this.registerEventListener(e,n,(n=>{n.prependListener(e,t)}),(n=>{n.removeListener(e,t)})),this}async prependOnceListener(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.prependOnceListener(e,t),n.once(e,i)}),(n=>{n.removeListener(e,t),n.removeListener(e,i)})),this}async removeListener(e,t,n){const i=await this.deregisterEventListener(e,n);return i&&(i.removeListener(e,t),this.deleteEmitterIfNothingRegistered(i)),this}async deregisterAllListeners(e){const t={...this.identity,type:e,topic:this.topic};if(this.hasEmitter()){const e=this.getOrCreateEmitter(),n=e.listenerCount(t.type),i=[];for(let e=0;enull)));return await Promise.all(i),e}}async removeAllListeners(e){const t=async e=>{const t=await this.deregisterAllListeners(e);t&&(t.removeAllListeners(e),this.deleteEmitterIfNothingRegistered(t))};if(e)await t(e);else if(this.hasEmitter()){const e=this.getOrCreateEmitter().eventNames();await(0,y.promiseMap)(e,t)}return this}deleteEmitterIfNothingRegistered(e){0===e.eventNames().length&&this.wire.eventAggregator.delete(w(this,u,\"f\"))}},u=new WeakMap;d.Reply=class{};var g={};Object.defineProperty(g,\"__esModule\",{value:!0});var m=g.RuntimeError=g.NotSupportedError=g.NotImplementedError=g.NoAckError=g.DuplicateCorrelationError=g.UnexpectedActionError=g.DisconnectedError=void 0;class v extends Error{constructor(e){super(`Expected websocket state OPEN but found ${e}`),this.readyState=e}}g.DisconnectedError=v;class C extends Error{}g.UnexpectedActionError=C;class b extends Error{}g.DuplicateCorrelationError=b;class I extends Error{}g.NoAckError=I;class E extends Error{}g.NotImplementedError=E;class x extends Error{}g.NotSupportedError=x;class A extends Error{constructor(e){const{message:t,name:n,stack:i,...r}=e;super(t),this.name=n||\"Error\",this.stack=i??this.toString(),Object.keys(r).forEach((e=>{this[e]=r[e]}))}}class P extends Error{static getCallSite(e=0){const t=Error.stackTraceLimit,n=e+1;Error.stackTraceLimit=t+n;const i=Error.prepareStackTrace;Error.prepareStackTrace=(e,t)=>t;const r=(new Error).stack?.slice(n)??[];return Error.prepareStackTrace=i,Error.stackTraceLimit=t,r}static prepareStackTrace(e,t){if(\"function\"==typeof Error.prepareStackTrace)return Error.prepareStackTrace(e,t);let n=\"\";n+=e.name||\"Error\",n+=`: ${e.message||\"\"}`;for(const e of t)n+=`\\n at ${e.toString()}`;return n}constructor(e,t){const{reason:n,error:i}=e;super(n),this.name=\"RuntimeError\",i?.stack&&(this.cause=new A(i)),t&&(this.stack=P.prepareStackTrace(this,t))}}m=g.RuntimeError=P;var M={},_={},O={};Object.defineProperty(O,\"__esModule\",{value:!0}),O.validateIdentity=void 0,O.validateIdentity=function(e){let t;return\"object\"==typeof e&&\"string\"==typeof e.uuid||(t=\"Not a valid identity object\"),t};var S={},R={},F={},j={},k={},L={},T={};Object.defineProperty(T,\"__esModule\",{value:!0}),T.handleDeprecatedWarnings=void 0;var $;T.handleDeprecatedWarnings=e=>{(e.contentNavigation?.whitelist||e.contentNavigation?.blacklist||e.contentRedirect?.whitelist||e.contentRedirect?.blacklist)&&console.warn(\"The properties 'whitelist' and 'blacklist' have been marked as deprecated and will be removed in a future version. Please use 'allowlist' and 'denylist'.\")};var B={},G={};Object.defineProperty(G,\"__esModule\",{value:!0}),G.AsyncRetryableLazy=W=G.Lazy=void 0;var W=G.Lazy=class{constructor(e){this.producerFn=e}getValue(){return this.value||(this.value=this.producerFn()),this.value}};G.AsyncRetryableLazy=class{constructor(e){this.producerFn=e}async getValue(){return this.promise||(this.promise=this.producerFn().catch((e=>{throw delete this.promise,e}))),this.promise}};var H={};Object.defineProperty(H,\"__esModule\",{value:!0}),H.WebContents=void 0;const N=d;class D extends N.EmitterBase{constructor(e,t,n){super(e,n,t.uuid,t.name),this.identity=t,this.entityType=n}capturePage(e){return this.wire.sendAction(\"capture-page\",{options:e,...this.identity}).then((({payload:e})=>e.data))}executeJavaScript(e){return this.wire.sendAction(\"execute-javascript-in-window\",{...this.identity,code:e}).then((({payload:e})=>e.data))}getZoomLevel(){return this.wire.sendAction(\"get-zoom-level\",this.identity).then((({payload:e})=>e.data))}setZoomLevel(e){return this.wire.sendAction(\"set-zoom-level\",{...this.identity,level:e}).then((()=>{}))}navigate(e){return this.wire.sendAction(\"navigate-window\",{...this.identity,url:e}).then((()=>{}))}navigateBack(){return this.wire.sendAction(\"navigate-window-back\",{...this.identity}).then((()=>{}))}async navigateForward(){await this.wire.sendAction(\"navigate-window-forward\",{...this.identity})}stopNavigation(){return this.wire.sendAction(\"stop-window-navigation\",{...this.identity}).then((()=>{}))}reload(e=!1){return this.wire.sendAction(\"reload-window\",{ignoreCache:e,...this.identity}).then((()=>{}))}print(e={}){return this.wire.sendAction(\"print\",{...this.identity,options:e}).then((()=>{}))}findInPage(e,t){return this.wire.sendAction(\"find-in-page\",{...this.identity,searchTerm:e,options:t}).then((({payload:e})=>e.data))}stopFindInPage(e){return this.wire.sendAction(\"stop-find-in-page\",{...this.identity,action:e}).then((()=>{}))}getPrinters(){return this.wire.sendAction(\"get-printers\",{...this.identity}).then((({payload:e})=>e.data))}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){await this.wire.sendAction(\"focus-window\",{emitSynthFocused:e,...this.identity})}async showDeveloperTools(){await this.wire.sendAction(\"show-developer-tools\",this.identity)}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction(\"get-process-info\",this.identity);return e}async getSharedWorkers(){return this.wire.sendAction(\"get-shared-workers\",this.identity).then((({payload:e})=>e.data))}async inspectSharedWorker(){await this.wire.sendAction(\"inspect-shared-worker\",{...this.identity})}async inspectSharedWorkerById(e){await this.wire.sendAction(\"inspect-shared-worker-by-id\",{...this.identity,workerId:e})}async inspectServiceWorker(){await this.wire.sendAction(\"inspect-service-worker\",{...this.identity})}async showPopupWindow(e){if(this.wire.sendAction(`${this.entityType}-show-popup-window`,this.identity).catch((()=>{})),e?.onPopupReady){const t=async({popupName:t})=>{try{const n=this.fin.Window.wrapSync({uuid:this.fin.me.uuid,name:t});await e.onPopupReady(n)}catch(e){throw new Error(`Something went wrong during onPopupReady execution: ${e}`)}};await this.once(\"popup-ready\",t)}const{payload:t}=await this.wire.sendAction(\"try-create-popup-window\",{options:{...e,hasResultCallback:!!e?.onPopupResult,hasReadyCallback:!!e?.onPopupReady},...this.identity}),{data:{willOpen:n,options:i}}=t;n&&await this.fin.Window.create(i.initialOptions);if(e?.onPopupResult){const t=async t=>{await e.onPopupResult((e=>{const{name:t,uuid:n,result:i,data:r}=e,o={identity:{name:t,uuid:n},result:i};return r&&(o.data=r),o})(t))},n=async()=>{await this.removeListener(\"popup-result\",t)};await this.on(\"popup-result\",t),await this.once(\"popup-teardown\",n)}const{payload:r}=await this.wire.sendAction(\"show-popup-window\",{options:i,...this.identity});return r.data}}var U,V,z,K,q;function J(){return V||(V=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(function(){if($)return L;$=1,Object.defineProperty(L,\"__esModule\",{value:!0}),L.ViewModule=void 0;const e=d,t=O,n=J(),i=T;class r extends e.Base{async create(e){const{uuid:t}=this.wire.me;if(!e.name||\"string\"!=typeof e.name)throw new Error(\"Please provide a name property as a string in order to create a View.\");return(0,i.handleDeprecatedWarnings)(e),this.wire.environment.childViews?await this.wire.environment.createChildContent({entityType:\"view\",options:{...e,uuid:t}}):await this.wire.sendAction(\"create-view\",{...e,uuid:t}),this.wrapSync({uuid:t,name:e.name})}async wrap(e){this.wire.sendAction(\"view-wrap\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}wrapSync(e){this.wire.sendAction(\"view-wrap-sync\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}getCurrent(){if(this.wire.sendAction(\"view-get-current\").catch((e=>{})),!this.wire.me.isView)throw new Error(\"You are not in a View context\");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction(\"view-get-current-sync\").catch((e=>{})),!this.wire.me.isView)throw new Error(\"You are not in a View context\");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return L.ViewModule=r,L}(),e),n(function(){if(U)return B;var e;U=1,Object.defineProperty(B,\"__esModule\",{value:!0}),B.View=void 0;const t=g,n=G,i=H,r=ie();class o extends i.WebContents{constructor(i,o){super(i,o,\"view\"),this.identity=o,e.set(this,new n.Lazy((()=>this.fin.Platform.wrapSync(this.identity).getClient()))),this.attach=async e=>{await this.wire.sendAction(\"attach-view\",{target:e,...this.identity})},this.destroy=async()=>{await this.wire.sendAction(\"destroy-view\",{...this.identity})},this.show=async()=>{await this.wire.sendAction(\"show-view\",{...this.identity})},this.showAt=async(e,t={})=>{await this.wire.sendAction(\"show-view-at\",{bounds:e,...this.identity,options:t})},this.bringToFront=async()=>{await this.wire.sendAction(\"bring-view-to-front\",{...this.identity})},this.hide=async()=>{await this.wire.sendAction(\"hide-view\",{...this.identity})},this.setBounds=async e=>{await this.wire.sendAction(\"set-view-bounds\",{bounds:e,...this.identity})},this.getBounds=async()=>(await this.wire.sendAction(\"get-view-bounds\",{...this.identity})).payload.data,this.getInfo=async()=>(await this.wire.sendAction(\"get-view-info\",{...this.identity})).payload.data,this.getParentLayout=async()=>(this.wire.sendAction(\"view-get-parent-layout\",{...this.identity}).catch((()=>{})),this.fin.Platform.Layout.getLayoutByViewIdentity(this.identity)),this.getOptions=async()=>this.wire.sendAction(\"get-view-options\",{...this.identity}).then((({payload:e})=>e.data)),this.updateOptions=async e=>this.wire.sendAction(\"update-view-options\",{options:e,...this.identity}).then((()=>{})),this.getCurrentWindow=async()=>{const{payload:{data:e}}=await this.wire.sendAction(\"get-view-window\",{...this.identity});return new r._Window(this.wire,e)},this.getCurrentStack=async()=>{this.wire.sendAction(\"view-get-current-stack\").catch((()=>{}));try{return(await this.getParentLayout()).getStackByViewIdentity(this.identity)}catch(e){throw new t.RuntimeError({reason:\"This view does not belong to a stack.\",error:e})}},this.triggerBeforeUnload=async()=>(await this.wire.sendAction(\"trigger-before-unload\",{...this.identity})).payload.data,this.bindToElement=async e=>{if(!e)throw new Error(\"Element not found.\");return this.wire.environment.observeBounds(e,(async e=>this.setBounds(e)))}}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){const t=await this.getCurrentWindow();await t.focusedWebViewWasChanged(),await super.focus({emitSynthFocused:e})}}return B.View=o,e=new WeakMap,B}(),e)}(k)),k}function Y(){if(z)return j;z=1,Object.defineProperty(j,\"__esModule\",{value:!0}),j.Application=void 0;const e=d,t=ie(),n=J();class i extends e.EmitterBase{constructor(e,n){super(e,\"application\",n.uuid),this.identity=n,this.window=new t._Window(this.wire,{uuid:this.identity.uuid,name:this.identity.uuid})}windowListFromIdentityList(e){const n=[];return e.forEach((e=>{n.push(new t._Window(this.wire,{uuid:e.uuid,name:e.name}))})),n}isRunning(){return this.wire.sendAction(\"is-application-running\",this.identity).then((({payload:e})=>e.data))}async quit(e=!1){try{await this._close(e),await this.wire.sendAction(\"destroy-application\",{force:e,...this.identity})}catch(e){if(![\"Remote connection has closed\",\"Could not locate the requested application\"].some((t=>e.message.includes(t))))throw e}}async _close(e=!1){try{await this.wire.sendAction(\"close-application\",{force:e,...this.identity})}catch(e){if(!e.message.includes(\"Remote connection has closed\"))throw e}}close(e=!1){return console.warn(\"Deprecation Warning: Application.close is deprecated Please use Application.quit\"),this.wire.sendAction(\"application-close\",this.identity).catch((e=>{})),this._close(e)}getChildWindows(){return this.wire.sendAction(\"get-child-windows\",this.identity).then((({payload:e})=>{const t=[];return e.data.forEach((e=>{t.push({uuid:this.identity.uuid,name:e})})),this.windowListFromIdentityList(t)}))}getManifest(){return this.wire.sendAction(\"get-application-manifest\",this.identity).then((({payload:e})=>e.data))}getParentUuid(){return this.wire.sendAction(\"get-parent-application\",this.identity).then((({payload:e})=>e.data))}getShortcuts(){return this.wire.sendAction(\"get-shortcuts\",this.identity).then((({payload:e})=>e.data))}async getViews(){const{payload:e}=await this.wire.sendAction(\"application-get-views\",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}getZoomLevel(){return this.wire.sendAction(\"get-application-zoom-level\",this.identity).then((({payload:e})=>e.data))}getWindow(){return this.wire.sendAction(\"application-get-window\",this.identity).catch((e=>{})),Promise.resolve(this.window)}registerUser(e,t){return this.wire.sendAction(\"register-user\",{userName:e,appName:t,...this.identity}).then((()=>{}))}removeTrayIcon(){return this.wire.sendAction(\"remove-tray-icon\",this.identity).then((()=>{}))}restart(){return this.wire.sendAction(\"restart-application\",this.identity).then((()=>{}))}run(){return console.warn(\"Deprecation Warning: Application.run is deprecated Please use fin.Application.start\"),this.wire.sendAction(\"application-run\",this.identity).catch((e=>{})),this._run()}_run(e={}){return this.wire.sendAction(\"run-application\",{manifestUrl:this._manifestUrl,opts:e,...this.identity}).then((()=>{}))}scheduleRestart(){return this.wire.sendAction(\"relaunch-on-close\",this.identity).then((()=>{}))}async sendApplicationLog(){const{payload:e}=await this.wire.sendAction(\"send-application-log\",this.identity);return e.data}async setJumpList(e){await this.wire.sendAction(\"set-jump-list\",{config:e,...this.identity})}setTrayIcon(e){return this.wire.sendAction(\"set-tray-icon\",{enabledIcon:e,...this.identity}).then((()=>{}))}setShortcuts(e){return this.wire.sendAction(\"set-shortcuts\",{data:e,...this.identity}).then((()=>{}))}async setShortcutQueryParams(e){await this.wire.sendAction(\"set-shortcut-query-args\",{data:e,...this.identity})}setZoomLevel(e){return this.wire.sendAction(\"set-application-zoom-level\",{level:e,...this.identity}).then((()=>{}))}async setAppLogUsername(e){await this.wire.sendAction(\"set-app-log-username\",{data:e,...this.identity})}getTrayIconInfo(){return this.wire.sendAction(\"get-tray-icon-info\",this.identity).then((({payload:e})=>e.data))}hasTrayIcon(){return this.wire.sendAction(\"has-tray-icon\",this.identity).then((({payload:e})=>e.data))}terminate(){return this.wire.sendAction(\"terminate-application\",this.identity).then((()=>{}))}wait(){return this.wire.sendAction(\"wait-for-hung-application\",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction(\"get-info\",this.identity).then((({payload:e})=>e.data))}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction(\"application-get-process-info\",this.identity);return e}async setFileDownloadLocation(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t};await this.wire.sendAction(\"set-file-download-location\",{...n,downloadLocation:e})}async getFileDownloadLocation(){const{payload:{data:e}}=await this.wire.sendAction(\"get-file-download-location\",this.identity);return e}async showTrayIconPopupMenu(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t},{payload:i}=await this.wire.sendAction(\"show-tray-icon-popup-menu\",{...n,options:e});return i.data}async closeTrayIconPopupMenu(){const{name:e}=this.wire.me,t={uuid:this.identity.uuid,name:e};await this.wire.sendAction(\"close-tray-icon-popup-menu\",{...t})}}return j.Application=i,j}function Z(){return q||(q=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(function(){if(K)return F;K=1,Object.defineProperty(F,\"__esModule\",{value:!0}),F.ApplicationModule=void 0;const e=d,t=O,n=Y();class i extends e.Base{async wrap(e){this.wire.sendAction(\"wrap-application\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}wrapSync(e){this.wire.sendAction(\"wrap-application-sync\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}async _create(e){return void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&void 0===e.isPlatformController&&(e.autoShow=!0),await this.wire.sendAction(\"create-application\",e),this.wrap({uuid:e.uuid})}create(e){return console.warn(\"Deprecation Warning: fin.Application.create is deprecated. Please use fin.Application.start\"),this.wire.sendAction(\"application-create\").catch((e=>{})),this._create(e)}async start(e){this.wire.sendAction(\"start-application\").catch((e=>{}));const t=await this._create(e);return await this.wire.sendAction(\"run-application\",{uuid:e.uuid}),t}async startManyManifests(e,t){return this.wire.sendAction(\"run-applications\",{applications:e,opts:t}).then((()=>{}))}getCurrent(){return this.wire.sendAction(\"get-current-application\").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction(\"get-current-application-sync\").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}async startFromManifest(e,t){this.wire.sendAction(\"application-start-from-manifest\").catch((e=>{}));const n=await this._createFromManifest(e);return await n._run(t),n}createFromManifest(e){return console.warn(\"Deprecation Warning: fin.Application.createFromManifest is deprecated. Please use fin.Application.startFromManifest\"),this.wire.sendAction(\"application-create-from-manifest\").catch((e=>{})),this._createFromManifest(e)}_createFromManifest(e){return this.wire.sendAction(\"get-application-manifest\",{manifestUrl:e}).then((({payload:e})=>{const t=e.data.platform?e.data.platform.uuid:e.data.startup_app.uuid;return this.wrap({uuid:t})})).then((t=>(t._manifestUrl=e,t)))}}return F.ApplicationModule=i,F}(),e),n(Y(),e)}(R)),R}H.WebContents=D;var Q={};Object.defineProperty(Q,\"__esModule\",{value:!0}),Q.promisifySubscription=void 0;var X,ee,te;function ne(){if(X)return S;X=1,Object.defineProperty(S,\"__esModule\",{value:!0}),S._Window=void 0;const e=Z(),t=H,n=J(),i=T,r=Q;class o extends t.WebContents{constructor(e,t){super(e,t,\"window\")}async createWindow(e){this.wire.sendAction(\"window-create-window\",this.identity).catch((e=>{}));const t=await(0,r.promisifySubscription)(this,\"fire-constructor-callback\");void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&(e.autoShow=!0),(0,i.handleDeprecatedWarnings)(e);const n=this.wire.environment.createChildContent({entityType:\"window\",options:e}),[o]=await Promise.all([t.getValue(),n]);let s;const{success:a}=o,c=o.data,{message:d}=c;s=a?{httpResponseCode:c.httpResponseCode,apiInjected:c.apiInjected}:{message:c.message,networkErrorCode:c.networkErrorCode,stack:c.stack};const h={message:d,cbPayload:s,success:a};try{this.getWebWindow().fin.__internal_.openerSuccessCBCalled()}catch(e){}return h.success?this:Promise.reject(h)}getAllFrames(){return this.wire.sendAction(\"get-all-frames\",this.identity).then((({payload:e})=>e.data))}getBounds(){return this.wire.sendAction(\"get-window-bounds\",this.identity).then((({payload:e})=>e.data))}center(){return this.wire.sendAction(\"center-window\",this.identity).then((()=>{}))}blur(){return this.wire.sendAction(\"blur-window\",this.identity).then((()=>{}))}bringToFront(){return this.wire.sendAction(\"bring-window-to-front\",this.identity).then((()=>{}))}animate(e,t){return this.wire.sendAction(\"animate-window\",{transitions:e,options:t,...this.identity}).then((()=>{}))}hide(){return this.wire.sendAction(\"hide-window\",this.identity).then((()=>{}))}close(e=!1){return this.wire.sendAction(\"close-window\",{force:e,...this.identity}).then((()=>{Object.setPrototypeOf(this,null)}))}focusedWebViewWasChanged(){return this.wire.sendAction(\"focused-webview-changed\",this.identity).then((()=>{}))}getNativeId(){return this.wire.sendAction(\"get-window-native-id\",this.identity).then((({payload:e})=>e.data))}async getCurrentViews(){const{payload:e}=await this.wire.sendAction(\"window-get-views\",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}disableFrame(){return console.warn(\"Function is deprecated; use disableUserMovement instead.\"),this.wire.sendAction(\"disable-window-frame\",this.identity).then((()=>{}))}disableUserMovement(){return this.wire.sendAction(\"disable-window-frame\",this.identity).then((()=>{}))}enableFrame(){return console.warn(\"Function is deprecated; use enableUserMovement instead.\"),this.wire.sendAction(\"enable-window-frame\",this.identity).then((()=>{}))}enableUserMovement(){return this.wire.sendAction(\"enable-window-frame\",this.identity).then((()=>{}))}flash(){return this.wire.sendAction(\"flash-window\",this.identity).then((()=>{}))}stopFlashing(){return this.wire.sendAction(\"stop-flash-window\",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction(\"get-window-info\",this.identity).then((({payload:e})=>e.data))}async getLayout(e){this.wire.sendAction(\"window-get-layout\",this.identity).catch((e=>{}));const t=await this.getOptions();if(!t.layout&&!t.layoutSnapshot)throw new Error(\"Window does not have a Layout\");return this.fin.Platform.Layout.wrap(e??this.identity)}getOptions(){return this.wire.sendAction(\"get-window-options\",this.identity).then((({payload:e})=>e.data))}getParentApplication(){return this.wire.sendAction(\"window-get-parent-application\",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity))}getParentWindow(){return this.wire.sendAction(\"window-get-parent-window\",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity)).then((e=>e.getWindow()))}async getSnapshot(e){const t={area:e,...this.identity};console.warn(\"Window.getSnapshot has been deprecated, please use Window.capturePage\");return(await this.wire.sendAction(\"get-window-snapshot\",t)).payload.data}getState(){return this.wire.sendAction(\"get-window-state\",this.identity).then((({payload:e})=>e.data))}getWebWindow(){return this.wire.sendAction(\"window-get-web-window\",this.identity).catch((e=>{})),this.wire.environment.getWebWindow(this.identity)}isMainWindow(){return this.wire.sendAction(\"window-is-main-window\",this.identity).catch((e=>{})),this.me.uuid===this.me.name}isShowing(){return this.wire.sendAction(\"is-window-showing\",this.identity).then((({payload:e})=>e.data))}maximize(){return this.wire.sendAction(\"maximize-window\",this.identity).then((()=>{}))}minimize(){return this.wire.sendAction(\"minimize-window\",this.identity).then((()=>{}))}moveBy(e,t,n){return this.wire.sendAction(\"move-window-by\",{deltaLeft:e,deltaTop:t,positioningOptions:n,...this.identity}).then((()=>{}))}moveTo(e,t,n){return this.wire.sendAction(\"move-window\",{left:e,top:t,positioningOptions:n,...this.identity}).then((()=>{}))}resizeBy(e,t,n,i){return this.wire.sendAction(\"resize-window-by\",{deltaWidth:Math.floor(e),deltaHeight:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}resizeTo(e,t,n,i){return this.wire.sendAction(\"resize-window\",{width:Math.floor(e),height:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}restore(){return this.wire.sendAction(\"restore-window\",this.identity).then((()=>{}))}setAsForeground(){return this.wire.sendAction(\"set-foreground-window\",this.identity).then((()=>{}))}setBounds(e,t){return this.wire.sendAction(\"set-window-bounds\",{...e,...this.identity,positioningOptions:t}).then((()=>{}))}show(e=!1){return this.wire.sendAction(\"show-window\",{force:e,...this.identity}).then((()=>{}))}showAt(e,t,n=!1){return this.wire.sendAction(\"show-at-window\",{force:n,left:Math.floor(e),top:Math.floor(t),...this.identity}).then((()=>{}))}updateOptions(e){return this.wire.sendAction(\"update-window-options\",{options:e,...this.identity}).then((()=>{}))}authenticate(e,t){return this.wire.sendAction(\"window-authenticate\",{userName:e,password:t,...this.identity}).then((()=>{}))}async showPopupMenu(e){const{payload:t}=await this.wire.sendAction(\"show-popup-menu\",{options:e,...this.identity});return t.data}async closePopupMenu(){return this.wire.sendAction(\"close-popup-menu\",{...this.identity}).then((()=>{}))}async dispatchPopupResult(e){this.wire.sendAction(\"window-dispatch-popup-result\",this.identity).catch((e=>{})),await this.wire.sendAction(\"dispatch-popup-result\",{data:e,...this.identity})}async print(e={content:\"self\"}){switch(e.content){case void 0:case\"self\":return super.print(e);case\"screenshot\":return this.wire.sendAction(\"print-screenshot\",this.identity).then((()=>{}));case\"views\":return this.wire.sendAction(\"print-views\",{...this.identity,options:e}).then((()=>{}));default:return}}}return S._Window=o,S}function ie(){return te||(te=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(function(){if(ee)return _;ee=1,Object.defineProperty(_,\"__esModule\",{value:!0}),_._WindowModule=void 0;const e=d,t=O,n=ne();class i extends e.Base{async wrap(e){this.wire.sendAction(\"window-wrap\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}wrapSync(e){this.wire.sendAction(\"window-wrap-sync\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}create(e){return this.wire.sendAction(\"create-window\").catch((e=>{})),new n._Window(this.wire,{uuid:this.me.uuid,name:e.name}).createWindow(e)}getCurrent(){if(this.wire.sendAction(\"get-current-window\").catch((e=>{})),!this.wire.me.isWindow)throw new Error(\"You are not in a Window context\");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction(\"get-current-window-sync\").catch((e=>{})),!this.wire.me.isWindow)throw new Error(\"You are not in a Window context\");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return _._WindowModule=i,_}(),e),n(ne(),e)}(M)),M}Q.promisifySubscription=async(e,t,n=(()=>!0),i)=>{let r,o,s;const a=new Promise(((e,t)=>{r=e,o=t})),c=e=>{n(e)&&(clearTimeout(s),r(e))};return await e.on(t,c),i&&(s=setTimeout((()=>o(new Error(\"event timed out\"))),i)),a.finally((()=>{e.removeListener(t,c).catch((()=>null))})),{getValue:()=>a}},Object.defineProperty(c,\"__esModule\",{value:!0}),c.System=void 0;const re=d,oe=g,se=ie(),ae=t;class ce extends re.EmitterBase{constructor(e){super(e,\"system\")}sendExternalProcessRequest(e,t){return new Promise(((n,i)=>{const r=\"external-process-exited\";let o,s,a,c;\"function\"==typeof t.listener&&(a=e=>{const n=e||{};s={topic:\"exited\",uuid:n.processUuid||\"\",exitCode:n.exitCode||0},o===e.processUuid&&(t.listener(s),c.removeListener(r,a))},this.wire.me.name||(this.wire.me.name=this.wire.me.uuid),c=new se._Window(this.wire,this.wire.me),c.on(r,a)),this.wire.sendAction(e,t).then((({payload:e})=>{o=e.data.uuid,n(e.data),s&&o===s.uuid&&(t.listener(s),c.removeListener(r,a))})).catch((e=>{c&&c.removeListener(r,a),i(e)}))}))}getVersion(){return this.wire.sendAction(\"get-version\").then((({payload:e})=>e.data))}clearCache(e){return this.wire.sendAction(\"clear-cache\",e).then((()=>{}))}deleteCacheOnExit(){return this.wire.sendAction(\"delete-cache-request\").then((()=>{}))}exit(){return this.wire.sendAction(\"exit-desktop\").then((()=>{}))}async fetchManifest(e){const{payload:{data:t}}=await this.wire.sendAction(\"fetch-manifest\",{manifestUrl:e});return t}flushCookieStore(){return this.wire.sendAction(\"flush-cookie-store\").then((()=>{}))}getAllWindows(){return this.wire.sendAction(\"get-all-windows\").then((({payload:e})=>e.data))}getAllApplications(){return this.wire.sendAction(\"get-all-applications\").then((({payload:e})=>e.data))}getCommandLineArguments(){return this.wire.sendAction(\"get-command-line-arguments\").then((({payload:e})=>e.data))}async getCrashReporterState(){const{payload:{data:{diagnosticMode:e,isRunning:t}}}=await this.wire.sendAction(\"get-crash-reporter-state\");return console.warn(\"diagnosticMode property is deprecated. It will be removed in a future version\"),{diagnosticMode:e,diagnosticsMode:e,isRunning:t}}async startCrashReporter(e){const t=e,n={...t,diagnosticMode:t.diagnosticsMode||t.diagnosticMode},{payload:{data:{diagnosticMode:i,isRunning:r}}}=await this.wire.sendAction(\"start-crash-reporter\",n);return{diagnosticMode:i,diagnosticsMode:i,isRunning:r}}getUniqueUserId(){return this.wire.sendAction(\"get-unique-user-id\").then((({payload:e})=>e.data))}getEntityInfo(e,t){return this.wire.sendAction(\"get-entity-info\",{uuid:e,name:t}).then((({payload:e})=>e.data))}getEnvironmentVariable(e){return this.wire.sendAction(\"get-environment-variable\",{environmentVariables:e}).then((({payload:e})=>e.data))}getFocusedWindow(){return this.wire.sendAction(\"get-focused-window\").then((({payload:e})=>e.data))}async isAppCertified(e){const{payload:{data:{certifiedInfo:t}}}=await this.wire.sendAction(\"is-app-certified\",{manifestUrl:e});return t}getInstalledRuntimes(){return this.wire.sendAction(\"get-installed-runtimes\").then((({payload:e})=>e.data.runtimes))}async getInstalledApps(){const{payload:{data:{installedApps:e}}}=await this.wire.sendAction(\"get-installed-apps\");return e}getLog(e){return this.wire.sendAction(\"view-log\",e).then((({payload:e})=>e.data))}getMachineId(){return this.wire.sendAction(\"get-machine-id\").then((({payload:e})=>e.data))}getMinLogLevel(){return this.wire.sendAction(\"get-min-log-level\").then((({payload:e})=>e.data))}getLogList(){return this.wire.sendAction(\"list-logs\").then((({payload:e})=>e.data))}getMonitorInfo(){return this.wire.sendAction(\"get-monitor-info\").then((({payload:e})=>e.data))}getMousePosition(){return this.wire.sendAction(\"get-mouse-position\").then((({payload:e})=>e.data))}getProcessList(){return console.warn(\"System.getProcessList has been deprecated. Please consider using our new process APIs: Window.getProcessInfo, View.getProcessInfo, Application.getProcessInfo, System.getAllProcessInfo\"),this.wire.sendAction(\"process-snapshot\").then((({payload:e})=>e.data))}async getAllProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction(\"get-all-process-info\",this.identity);return e}getProxySettings(){return this.wire.sendAction(\"get-proxy-settings\").then((({payload:e})=>e.data))}getRuntimeInfo(){return this.wire.sendAction(\"get-runtime-info\").then((({payload:e})=>e.data))}getRvmInfo(){return this.wire.sendAction(\"get-rvm-info\").then((({payload:e})=>e.data))}getHostSpecs(){return this.wire.sendAction(\"get-host-specs\").then((({payload:e})=>e.data))}getOSInfo(){return this.wire.sendAction(\"get-os-info\").then((({payload:e})=>e.data))}launchExternalProcess(e){return this.sendExternalProcessRequest(\"launch-external-process\",e)}monitorExternalProcess(e){return this.sendExternalProcessRequest(\"monitor-external-process\",e)}log(e,t){return this.wire.sendAction(\"write-to-log\",{level:e,message:t}).then((()=>{}))}openUrlWithBrowser(e){return this.wire.sendAction(\"open-url-with-browser\",{url:e}).then((()=>{}))}async registerCustomProtocol(e){if(\"object\"!=typeof e)throw new Error(\"Must provide an object with a `protocolName` property having a string value.\");await this.wire.sendAction(\"register-custom-protocol\",e)}async unregisterCustomProtocol(e){await this.wire.sendAction(\"unregister-custom-protocol\",{protocolName:e})}async getCustomProtocolState(e){return this.wire.sendAction(\"get-custom-protocol-state\",{protocolName:e}).then((({payload:e})=>e.data))}releaseExternalProcess(e){return this.wire.sendAction(\"release-external-process\",{uuid:e}).then((()=>{}))}showDeveloperTools(e){return this.wire.sendAction(\"show-developer-tools\",e).then((()=>{}))}terminateExternalProcess(e){return this.wire.sendAction(\"terminate-external-process\",e).then((()=>{}))}updateProxySettings(e){return this.wire.sendAction(\"update-proxy\",e).then((()=>{}))}async downloadAsset(e,t){const n=()=>{};let i=n,r=n;const o=new Promise(((e,t)=>{i=e,r=t}));if(\"openfin\"!==this.wire.environment.type)throw new oe.NotSupportedError(\"downloadAsset only supported in an OpenFin Render process\");const s=oe.RuntimeError.getCallSite(),a=this.wire.environment.getNextMessageId().toString(),c=`asset-download-progress-${a}`,d=`asset-download-error-${a}`,h=`asset-download-complete-${a}`,l=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},u=()=>{this.removeListener(c,l)};await Promise.all([this.on(c,l),this.once(d,(e=>{u();const{reason:t,err:n}=e;r(new oe.RuntimeError({reason:t,error:n},s))})),this.once(h,(()=>{u(),i()}))]);const p=Object.assign(e,{downloadId:a});return await this.wire.sendAction(\"download-asset\",p).catch((e=>{throw u(),e})),o}downloadRuntime(e,t){const n=oe.RuntimeError.getCallSite();return new Promise(((i,r)=>{if(\"openfin\"!==this.wire.environment.type)return void r(new oe.NotSupportedError(\"downloadRuntime only supported in an OpenFin Render process\"));const o=this.wire.environment.getNextMessageId().toString(),s=`runtime-download-progress-${o}`,a=`runtime-download-error-${o}`,c=`runtime-download-complete-${o}`,d=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},h=()=>{this.removeListener(s,d)};this.on(s,d),this.once(a,(e=>{h();const{reason:t,err:i}=e;r(new oe.RuntimeError({reason:t,error:i},n))})),this.once(c,(()=>{h(),i()}));const l=Object.assign(e,{downloadId:o});this.wire.sendAction(\"download-runtime\",l).catch((e=>{h(),r(e)}))}))}downloadPreloadScripts(e){return this.wire.sendAction(\"download-preload-scripts\",{scripts:e}).then((({payload:e})=>e.data))}getAllExternalApplications(){return this.wire.sendAction(\"get-all-external-applications\").then((({payload:e})=>e.data))}getAppAssetInfo(e){return this.wire.sendAction(\"get-app-asset-info\",e).then((({payload:e})=>e.data))}getCookies(e){const t=this.wire.environment.getUrl(),n=Object.assign(e,{url:t});return this.wire.sendAction(\"get-cookies\",n).then((({payload:e})=>e.data))}setMinLogLevel(e){return this.wire.sendAction(\"set-min-log-level\",{level:e}).then((()=>{}))}resolveUuid(e){return this.wire.sendAction(\"resolve-uuid\",{entityKey:e}).then((({payload:e})=>e.data))}executeOnRemote(e,t){return t.requestingIdentity=e,this.wire.ferryAction(t)}readRegistryValue(e,t,n){return this.wire.sendAction(\"read-registry-value\",{rootKey:e,subkey:t,value:n}).then((({payload:e})=>e.data))}registerExternalConnection(e){return this.wire.sendAction(\"register-external-connection\",{uuid:e}).then((({payload:e})=>e.data))}async getServiceConfiguration(e){if(\"string\"!=typeof e.name)throw new Error(\"Must provide an object with a `name` property having a string value\");const{name:t}=e;return this.wire.sendAction(\"get-service-configuration\",{name:t}).then((({payload:e})=>e.data))}async getSystemAppConfig(e){if(\"string\"!=typeof e)throw new Error(\"Must provide a string value for name of system app\");return this.wire.sendAction(\"get-system-app-configuration\",{name:e}).then((({payload:e})=>e.data))}async registerShutdownHandler(e){this.wire.sendAction(\"system-register-shutdown-handler\").catch((e=>{}));const{uuid:t,name:n}=this.wire.me;this.on(\"system-shutdown\",(i=>{e({proceed:()=>{this.wire.environment.raiseEvent(\"application/system-shutdown-handled\",{uuid:t,name:n,topic:\"application\"})}})}))}runRvmHealthCheck(){return this.wire.sendAction(\"run-rvm-health-check\").then((({payload:e})=>e.data))}async launchManifest(e,t={}){const{subscribe:n,...i}=t,r=i;if(n){const e=new ae.EventEmitter;n(e);const t=\"app-version-progress\",i=\"runtime-status\",o=\"app-version-complete\",s=\"app-version-error\",a=this.wire.environment.getNextMessageId().toString();r.appVersionId=a;const c=[o,t,i,s],d=e=>{const{appVersionId:t,topic:n,type:i,...r}=e;return{...r,type:c.find((e=>i.includes(e)))}},h=t=>{const n=d(t);e.emit(n.type,n)},l=()=>{this.removeListener(`${t}.${a}`,h),this.removeListener(`${i}.${a}`,h),this.removeListener(`${o}.${a}`,h),this.removeListener(`${s}.${a}`,h),this.removeListener(`${o}.${a}`,l),this.removeListener(`${s}.${a}`,l)};await Promise.all([this.on(`${t}.${a}`,h),this.on(`${i}.${a}`,h),this.once(`${o}.${a}`,h),this.once(`${s}.${a}`,h),this.once(`${o}.${a}`,l),this.once(`${s}.${a}`,l)])}return(await this.wire.sendAction(\"launch-manifest\",{manifestUrl:e,opts:r})).payload.data.manifest}async queryPermissionForCurrentContext(e){const t={uuid:this.wire.me.uuid,name:this.wire.me.name};return(await this.wire.sendAction(\"query-permission-for-current-context\",{apiName:e,identity:t})).payload.data}async enableNativeWindowIntegrationProvider(e){const{payload:t}=await this.wire.sendAction(\"enable-native-window-integration-provider\",{permissions:e});return t.data}async registerUsage({data:e,type:t}){await this.wire.sendAction(\"register-usage\",{data:e,type:t})}async getPrinters(){const{payload:e}=await this.wire.sendAction(\"system-get-printers\");return e.data}async updateProcessLoggingOptions(e){await this.wire.sendAction(\"system-update-process-logging-options\",{options:e})}async getDomainSettings(){const{payload:{data:e}}=await this.wire.sendAction(\"get-domain-settings\",this.identity);return e}async setDomainSettings(e){await this.wire.sendAction(\"set-domain-settings\",{domainSettings:e,...this.identity})}async refreshExtensions(){const{payload:e}=await this.wire.sendAction(\"refresh-extensions\");return e.data}async getInstalledExtensions(){const{payload:e}=await this.wire.sendAction(\"get-installed-extensions\");return e.data}}c.System=ce;var de={},he={};Object.defineProperty(he,\"__esModule\",{value:!0}),he.RefCounter=void 0;he.RefCounter=class{constructor(){this.topicRefMap=new Map}incRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t+1;n=i,this.topicRefMap.set(e,i)}else this.topicRefMap.set(e,1),n=1;return n}decRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t-1;this.topicRefMap.set(e,i),n=i}else n=-1;return n}actOnFirst(e,t,n){return 1===this.incRefCount(e)?t():n()}actOnLast(e,t,n){return 0===this.decRefCount(e)?t():n()}};var le={},ue={},pe={};Object.defineProperty(pe,\"__esModule\",{value:!0}),pe.ChannelBase=pe.ProtectedItems=void 0;const we=e=>async(t,n,i)=>{const r=await e(t,n,i);return void 0===r?n:r};pe.ProtectedItems=class{constructor(e,t){this.providerIdentity=e,this.close=t}};class ye{static defaultAction(e){throw new Error(`No action registered at target for ${e}`)}constructor(){this.subscriptions=new Map}async processAction(e,t,n){try{const i=this.subscriptions.has(e)?this.subscriptions.get(e):(t,n)=>(this.defaultAction??ye.defaultAction)(e,t,n),r=this.preAction?await this.preAction(e,t,n):t,o=await i(r,n);return this.postAction?await this.postAction(e,o,n):o}catch(t){if(this.errorMiddleware)return this.errorMiddleware(e,t,n);throw t}}beforeAction(e){if(this.preAction)throw new Error(\"Already registered beforeAction middleware\");this.preAction=we(e)}onError(e){if(this.errorMiddleware)throw new Error(\"Already registered error middleware\");this.errorMiddleware=e}afterAction(e){if(this.postAction)throw new Error(\"Already registered afterAction middleware\");this.postAction=we(e)}remove(e){this.subscriptions.delete(e)}setDefaultAction(e){if(this.defaultAction)throw new Error(\"default action can only be set once\");this.defaultAction=e}register(e,t){if(this.subscriptions.has(e))throw new Error(`Subscription already registered for action: ${e}. Unsubscribe before adding new subscription`);return this.subscriptions.set(e,t),!0}}pe.ChannelBase=ye;var fe,ge,me,ve=s&&s.__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)},Ce=s&&s.__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};Object.defineProperty(ue,\"__esModule\",{value:!0}),ue.ChannelClient=void 0;const be=pe,Ie=new Map;class Ee extends be.ChannelBase{static closeChannelByEndpointId(e){const t=Ie.get(e);t&&ve(t,me,\"f\").call(t)}static handleProviderDisconnect(e){for(const t of Ie.values())t.providerIdentity.channelId===e.channelId&&(t.disconnectListener(e),ve(t,me,\"f\").call(t))}constructor(e,t,n){super(),fe.set(this,void 0),ge.set(this,void 0),this.processAction=(e,t,n)=>super.processAction(e,t,n),me.set(this,(()=>{Ie.delete(this.endpointId),ve(this,ge,\"f\").close()})),Ce(this,fe,new be.ProtectedItems(e,t),\"f\"),this.disconnectListener=()=>{},this.endpointId=e.endpointId,Ce(this,ge,n,\"f\"),Ie.set(this.endpointId,this),n.receive(this.processAction)}get providerIdentity(){return ve(this,fe,\"f\").providerIdentity}async dispatch(e,t){if(ve(this,ge,\"f\").isEndpointConnected(this.providerIdentity.channelId))return ve(this,ge,\"f\").send(this.providerIdentity.channelId,e,t);throw new Error(\"The client you are trying to dispatch from is disconnected from the target provider.\")}onDisconnection(e){this.disconnectListener=t=>{try{e(t)}catch(e){throw new Error(`Error while calling the onDisconnection callback: ${e.message}`)}finally{this.disconnectListener=()=>{}}}}async disconnect(){await this.sendDisconnectAction(),ve(this,me,\"f\").call(this)}async sendDisconnectAction(){const e=ve(this,fe,\"f\");await e.close()}static async wireClose(e,t,n){const{channelName:i,uuid:r,name:o}=t;await e.sendAction(\"disconnect-from-channel\",{channelName:i,uuid:r,name:o,endpointId:n})}}ue.ChannelClient=Ee,fe=new WeakMap,ge=new WeakMap,me=new WeakMap;var xe={},Ae={};Object.defineProperty(Ae,\"__esModule\",{value:!0}),Ae.exhaustiveCheck=void 0,Ae.exhaustiveCheck=function(e,t){throw new Error(`Unsupported value: ${e}${t?`\\n Supported values are: ${t.join(\"\")}`:\"\"}`)};var Pe,Me,_e,Oe={},Se=s&&s.__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},Re=s&&s.__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)};Object.defineProperty(Oe,\"__esModule\",{value:!0}),Oe.ClassicInfo=Oe.ClassicStrategy=void 0;Oe.ClassicStrategy=class{constructor(e,t,n,i){this.messageReceiver=t,this.endpointId=n,this.providerIdentity=i,Pe.set(this,void 0),Me.set(this,new Map),_e.set(this,new Map),this.send=async(e,t,n)=>{const i=Re(this,Me,\"f\").get(e);if(!i)throw new Error(`Could not locate routing info for endpoint ${e}`);const r={...i};r.isLocalEndpointId&&delete r.endpointId,delete r.isLocalEndpointId;const o=Re(this,Pe,\"f\").sendAction(\"send-channel-message\",{...r,providerIdentity:this.providerIdentity,action:t,payload:n});Re(this,_e,\"f\").get(e)?.add(o);return(await o.catch((e=>{throw new Error(e.message)})).finally((()=>{Re(this,_e,\"f\").get(e)?.delete(o)}))).payload.data.result},this.close=async()=>{this.messageReceiver.removeEndpoint(this.providerIdentity.channelId,this.endpointId),[...Re(this,Me,\"f\").keys()].forEach((e=>this.closeEndpoint(e))),Se(this,Me,new Map,\"f\")},Se(this,Pe,e,\"f\")}onEndpointDisconnect(e,t){}receive(e){this.messageReceiver.addEndpoint(e,this.providerIdentity.channelId,this.endpointId)}async closeEndpoint(e){const t=Re(this,Me,\"f\").get(e);Re(this,Me,\"f\").delete(e);const n=Re(this,_e,\"f\").get(e);n?.forEach((n=>{const i=`Channel connection with identity uuid: ${t?.uuid} / name: ${t?.name} / endpointId: ${e} no longer connected.`;n.cancel(new Error(i))}))}isEndpointConnected(e){return Re(this,Me,\"f\").has(e)}addEndpoint(e,t){Re(this,Me,\"f\").set(e,t.endpointIdentity),Re(this,_e,\"f\").set(e,new Set)}isValidEndpointPayload(e){return\"string\"==typeof e?.endpointIdentity?.endpointId||\"string\"==typeof e?.endpointIdentity?.channelId}},Pe=new WeakMap,Me=new WeakMap,_e=new WeakMap,Oe.ClassicInfo={version:5,minimumVersion:0,type:\"classic\"};var Fe={},je={},ke={};Object.defineProperty(ke,\"__esModule\",{value:!0}),ke.errorToPOJO=void 0,ke.errorToPOJO=function(e){return{stack:e.stack,name:e.name,message:e.message,toString:()=>e.stack||e.toString()}};var Le,Te,$e=s&&s.__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)},Be=s&&s.__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};Object.defineProperty(je,\"__esModule\",{value:!0}),je.RTCEndpoint=void 0;const Ge=ke;je.RTCEndpoint=class{static isValidEndpointPayload(e){const t=e=>\"object\"==typeof e&&null!==e;return t(e)&&t(e.endpointIdentity)&&t(e.rtc)&&\"string\"==typeof e.endpointIdentity.endpointId}constructor({rtc:e,endpointIdentity:t}){this.responseMap=new Map,Le.set(this,null),Te.set(this,void 0),this.connectionStateChangeHandler=e=>{\"connected\"!==this.rtc.rtcClient.connectionState&&(this.rtc.rtcClient.removeEventListener(\"connectionstatechange\",this.connectionStateChangeHandler),this.close(),$e(this,Te,\"f\")&&$e(this,Te,\"f\").call(this))},this.send=async(e,t)=>{const n=`message-${Math.random()}`,i=new Promise(((e,t)=>{this.responseMap.set(n,{resolve:e,reject:t})}));return this.rtc.channels.request.send(JSON.stringify({action:e,payload:t,messageId:n})),i},this.close=()=>{this.responseMap.forEach((e=>e.reject(\"Connection has closed.\"))),this.responseMap=new Map,this.rtc.channels.request.close(),this.rtc.channels.response.close(),this.rtc.rtcClient.close()},this.rtc=e,this.endpointIdentity=t,this.rtc.channels.response.addEventListener(\"message\",(e=>{let{data:t}=e;e.data instanceof ArrayBuffer&&(t=(new TextDecoder).decode(e.data));const{messageId:n,payload:i,success:r,error:o}=JSON.parse(t),{resolve:s,reject:a}=this.responseMap.get(n)??{};s&&a?(this.responseMap.delete(n),r?s(i):a(o)):(console.log(\"Could not find id in responseMap.\"),console.log(e))})),this.rtc.channels.request.addEventListener(\"message\",(async e=>{let{data:n}=e;e.data instanceof ArrayBuffer&&(n=(new TextDecoder).decode(e.data));const{messageId:i,action:r,payload:o}=JSON.parse(n);if($e(this,Le,\"f\"))try{const e=await $e(this,Le,\"f\").call(this,r,o,t);this.rtc.channels.response.send(JSON.stringify({messageId:i,payload:e,success:!0}))}catch(e){\"open\"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,error:(0,Ge.errorToPOJO)(e),success:!1}))}else\"open\"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,success:!1,error:\"Connection not ready.\"}))})),this.rtc.rtcClient.addEventListener(\"connectionstatechange\",this.connectionStateChangeHandler),Object.values(this.rtc.channels).forEach((e=>{e.onclose=e=>{[...this.responseMap.values()].forEach((e=>e.reject(new Error(\"RTCDataChannel closed unexpectedly, this is most commonly caused by message size. Note: RTC Channels have a message size limit of ~255kB.\")))),this.close(),$e(this,Te,\"f\")&&$e(this,Te,\"f\").call(this)}}))}onDisconnect(e){if($e(this,Te,\"f\"))throw new Error(\"RTCEndpoint disconnectListener cannot be set twice.\");Be(this,Te,e,\"f\")}receive(e){if($e(this,Le,\"f\"))throw new Error(\"You have already set a listener for this RTC Endpoint.\");Be(this,Le,e,\"f\")}get connected(){return\"connected\"===this.rtc.rtcClient.connectionState}},Le=new WeakMap,Te=new WeakMap;var We,He,Ne,De={},Ue=s&&s.__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)},Ve=s&&s.__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};Object.defineProperty(De,\"__esModule\",{value:!0}),De.EndpointStrategy=void 0;De.EndpointStrategy=class{constructor(e,t,n){this.EndpointType=e,this.StrategyName=n,We.set(this,null),He.set(this,new Map),Ne.set(this,!0),this.send=async(e,t,n)=>this.getEndpointById(e).send(t,n),this.close=async()=>{Ue(this,Ne,\"f\")&&(Ue(this,He,\"f\").forEach((e=>e.close())),Ve(this,He,new Map,\"f\")),Ve(this,Ne,!1,\"f\")},this.isValidEndpointPayload=t}onEndpointDisconnect(e,t){this.getEndpointById(e).onDisconnect(t)}receive(e){if(Ue(this,We,\"f\"))throw new Error(`You have already set a listener for this ${this.StrategyName} Strategy`);Ve(this,We,e,\"f\"),Ue(this,He,\"f\").forEach((e=>e.receive(Ue(this,We,\"f\"))))}getEndpointById(e){const t=Ue(this,He,\"f\").get(e);if(!t)throw new Error(`Client with endpoint id ${e} is not connected`);return t}get connected(){return Ue(this,Ne,\"f\")}isEndpointConnected(e){return Ue(this,He,\"f\").has(e)}addEndpoint(e,t){if(!Ue(this,Ne,\"f\"))return void console.warn(`Adding endpoint to disconnected ${this.StrategyName} Strategy`);const n=new this.EndpointType(t);Ue(this,We,\"f\")&&n.receive(Ue(this,We,\"f\")),Ue(this,He,\"f\").set(e,n)}async closeEndpoint(e){Ue(this,He,\"f\").delete(e)}},We=new WeakMap,He=new WeakMap,Ne=new WeakMap,Object.defineProperty(Fe,\"__esModule\",{value:!0}),Fe.RTCInfo=Fe.RTCStrategy=void 0;const ze=je,Ke=De;class qe extends Ke.EndpointStrategy{constructor(){super(ze.RTCEndpoint,ze.RTCEndpoint.isValidEndpointPayload,\"RTC\")}}Fe.RTCStrategy=qe,Fe.RTCInfo={version:2,minimumVersion:0,type:\"rtc\"};var Je={};Object.defineProperty(Je,\"__esModule\",{value:!0}),Je.RTCICEManager=void 0;const Ye=d;class Ze extends Ye.EmitterBase{constructor(e){super(e,\"channel\"),this.ensureChannelOpened=e=>new Promise(((t,n)=>{if(\"open\"===e.readyState)t();else if(\"connecting\"===e.readyState){const n=()=>{e.removeEventListener(\"open\",n),t()};e.addEventListener(\"open\",n)}else n(new Error(\"This Channel has already closed\"))}))}static createDataChannelPromise(e,t){let n;const i=new Promise((e=>{n=e})),r=i=>{const o=()=>{i.channel.removeEventListener(\"open\",o),n(i.channel)};i.channel.label===e&&(i.channel.addEventListener(\"open\",o),t.removeEventListener(\"datachannel\",r))};return t.addEventListener(\"datachannel\",r),i}async listenForProviderIce(e,t){await this.on(this.createProviderEventName(e),t,{timestamp:Date.now()})}async raiseProviderIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createProviderEventName(e)),t)}async listenForClientIce(e,t){await this.on(this.createClientEventName(e),t,{timestamp:Date.now()})}async raiseClientIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createClientEventName(e)),t)}cleanupIceListeners(e){this.removeAllListeners(this.createClientEventName(e)),this.removeAllListeners(this.createProviderEventName(e))}createClientEventName(e){return`ice-client-${e}`}createProviderEventName(e){return`ice-provider-${e}`}createRouteString(e){return`channel/${e}`}createRtcPeer(){return this.wire.environment.getRtcPeer()}async startClientOffer(){const e=Math.random().toString(),t=this.createRtcPeer();t.addEventListener(\"icecandidate\",(async t=>{t.candidate&&await this.raiseClientIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForProviderIce(e,(async e=>{await t.addIceCandidate(e.candidate)}));const n={request:t.createDataChannel(\"request\"),response:t.createDataChannel(\"response\")},i=await t.createOffer();await t.setLocalDescription(i);const r=Promise.all([n.request,n.response].map(this.ensureChannelOpened)).then((()=>{}));return{rtcClient:t,channels:n,offer:i,rtcConnectionId:e,channelsOpened:r}}async finishClientOffer(e,t,n){return await e.setRemoteDescription(t),await n,!0}async createProviderAnswer(e,t){const n=this.createRtcPeer(),i=Ze.createDataChannelPromise(\"request\",n),r=Ze.createDataChannelPromise(\"response\",n);n.addEventListener(\"icecandidate\",(async t=>{t.candidate&&await this.raiseProviderIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForClientIce(e,(async e=>{await n.addIceCandidate(e.candidate)})),await n.setRemoteDescription(t);const o=await n.createAnswer();await n.setLocalDescription(o);const s=Promise.all([i,r]).then((([t,n])=>(this.cleanupIceListeners(e),{request:t,response:n})));return{rtcClient:n,answer:o,channels:s}}}Je.RTCICEManager=Ze;var Qe={},Xe={};function et(e){return[...e.split(\".\").reverse().entries()].reduce(((e,[t,n])=>e+ +n*1e4**t),0)}function tt(e,t){return et(e)>=et(t)}function nt(e){return e.split(\"/\")[0]}Object.defineProperty(Xe,\"__esModule\",{value:!0}),Xe.runtimeUuidMeetsMinimumRuntimeVersion=Xe.parseRuntimeUuid=Xe.meetsMinimumRuntimeVersion=void 0,Xe.meetsMinimumRuntimeVersion=tt,Xe.parseRuntimeUuid=nt,Xe.runtimeUuidMeetsMinimumRuntimeVersion=function(e,t){return tt(nt(e),t)};var it,rt,ot,st,at,ct=s&&s.__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)},dt=s&&s.__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};Object.defineProperty(Qe,\"__esModule\",{value:!0}),Qe.ChannelProvider=void 0;const ht=pe,lt=Xe;class ut extends ht.ChannelBase{get connections(){return[...ct(this,it,\"f\")]}static handleClientDisconnection(e,t){const n=e.connections.find((e=>e.endpointId===t.endpointId));if(n)ct(e,st,\"f\").call(e,n);else{e.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name)).forEach(ct(e,st,\"f\"))}e.disconnectListener(t)}static setProviderRemoval(e,t){ut.removalMap.set(e,t)}constructor(e,t,n){super(),it.set(this,void 0),rt.set(this,void 0),ot.set(this,void 0),st.set(this,(e=>{const t=this.connections.filter((t=>t.endpointId!==e.endpointId));ct(this,ot,\"f\").closeEndpoint(e.endpointId),dt(this,it,t,\"f\")})),this.processAction=async(e,t,n)=>(ut.clientIsMultiRuntime(n)&&!(0,lt.runtimeUuidMeetsMinimumRuntimeVersion)(n.runtimeUuid,\"18.87.56.0\")?this.handleMultiRuntimeLegacyClient(n):this.checkForClientConnection(n),super.processAction(e,t,n)),at.set(this,(()=>{ct(this,ot,\"f\").close();const e=ut.removalMap.get(this);e&&e()})),dt(this,rt,new ht.ProtectedItems(e,t),\"f\"),this.connectListener=()=>{},this.disconnectListener=()=>{},dt(this,it,[],\"f\"),dt(this,ot,n,\"f\"),n.receive(this.processAction)}dispatch(e,t,n){const i=e.endpointId??this.getEndpointIdForOpenFinId(e,t);return i&&ct(this,ot,\"f\").isEndpointConnected(i)?ct(this,ot,\"f\").send(i,t,n):Promise.reject(new Error(`Client connection with identity uuid: ${e.uuid} / name: ${e.name} / endpointId: ${i} no longer connected.`))}async processConnection(e,t){return ct(this,it,\"f\").push(e),this.connectListener(e,t)}publish(e,t){return this.connections.map((n=>ct(this,ot,\"f\").send(n.endpointId,e,t)))}onConnection(e){this.connectListener=e}onDisconnection(e){this.disconnectListener=e}async destroy(){const e=ct(this,rt,\"f\");e.providerIdentity,dt(this,it,[],\"f\"),await e.close(),ct(this,at,\"f\").call(this)}async getAllClientInfo(){return this.connections.map((e=>{const{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}=e;return{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}}))}checkForClientConnection(e){if(!this.isClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider.\\n Client Identity: {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}isClientConnected(e){return ut.clientIdentityIncludesEndpointId(e)?this.connections.some((t=>t.endpointId===e.endpointId&&t.uuid===e.uuid&&t.name===e.name)):this.isLegacyClientConnected(e)}isLegacyClientConnected(e){return this.connections.some((t=>t.uuid===e.uuid&&t.name===e.name))}handleMultiRuntimeLegacyClient(e){if(!this.isLegacyClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider. Client Identity:\\n {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}getEndpointIdForOpenFinId(e,t){const n=this.connections.filter((t=>t.name===e.name&&t.uuid===e.uuid));if(n.length>=2){const n=ct(this,rt,\"f\"),{uuid:i,name:r}=e,o=n?.providerIdentity.uuid,s=n?.providerIdentity.name;console.warn(`WARNING: Dispatch call may have unintended results. The \"to\" argument of your dispatch call is missing the\\n \"endpointId\" parameter. The identity you are dispatching to ({uuid: ${i}, name: ${r}})\\n has multiple channelClients for this channel. Your dispatched action: (${t}) from the provider:\\n ({uuid: ${o}, name: ${s}}) will only be processed by the most recently-created client.`)}return n.pop()?.endpointId}static clientIdentityIncludesEndpointId(e){return void 0!==e.endpointId}static clientIsMultiRuntime(e){return void 0!==e.runtimeUuid}static async wireClose(e,t){await e.sendAction(\"destroy-channel\",{channelName:t})}}Qe.ChannelProvider=ut,it=new WeakMap,rt=new WeakMap,ot=new WeakMap,st=new WeakMap,at=new WeakMap,ut.removalMap=new WeakMap;var pt={};Object.defineProperty(pt,\"__esModule\",{value:!0}),pt.MessageReceiver=void 0;const wt=ue,yt=d;class ft extends yt.Base{constructor(e){super(e),this.onmessage=e=>\"process-channel-message\"===e.action&&(this.processChannelMessage(e),!0),this.endpointMap=new Map,this.latestEndpointIdByChannelId=new Map,e.registerMessageHandler(this.onmessage.bind(this))}async processChannelMessage(e){const{senderIdentity:t,providerIdentity:n,action:i,ackToSender:r,payload:o,intendedTargetIdentity:s}=e.payload,a=s.channelId??s.endpointId??this.latestEndpointIdByChannelId.get(n.channelId),c=this.endpointMap.get(a);if(!c)return r.payload.success=!1,r.payload.reason=`Client connection with identity uuid: ${this.wire.me.uuid} / name: ${this.wire.me.name} / endpointId: ${a} no longer connected.`,this.wire.sendRaw(r);try{const e=await c(i,o,t);return r.payload.payload=r.payload.payload||{},r.payload.payload.result=e,this.wire.sendRaw(r)}catch(e){return r.payload.success=!1,r.payload.reason=e.message,this.wire.sendRaw(r)}}addEndpoint(e,t,n){this.endpointMap.set(n,e),t!==n&&this.latestEndpointIdByChannelId.set(t,n)}removeEndpoint(e,t){this.endpointMap.delete(t),this.latestEndpointIdByChannelId.get(e)===t&&this.latestEndpointIdByChannelId.delete(e)}checkForPreviousClientConnection(e){const t=this.latestEndpointIdByChannelId.get(e);t&&(wt.ChannelClient.closeChannelByEndpointId(t),console.warn(\"You have created a second connection to an older provider. First connection has been removed from the clientMap\"),console.warn(\"If the provider calls publish(), you may receive multiple messages.\"))}}pt.MessageReceiver=ft;var gt={};Object.defineProperty(gt,\"__esModule\",{value:!0}),gt.ProtocolManager=void 0;gt.ProtocolManager=class{constructor(e){this.ProtocolsInPreferenceOrder=e,this.DefaultClientProtocols=[\"classic\"],this.DefaultProviderProtocols=[\"classic\"],this.getClientProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultClientProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(\", \")}.`);return t},this.getProviderProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultProviderProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(\", \")}.`);return t},this.getCompatibleProtocols=(e,t)=>t.supportedProtocols.filter((t=>e.some((e=>e.type===t.type&&t.version>=e.minimumVersion&&e.version>=(t.minimumVersion??0))))).slice(0,t.maxProtocols)}};var mt={};Object.defineProperty(mt,\"__esModule\",{value:!0});class vt{static combine(e,t){return new vt(e,t)}constructor(e,t){this.primary=e,this.secondary=t}onEndpointDisconnect(e,t){this.primary.onEndpointDisconnect(e,(()=>{this.secondary.isEndpointConnected(e)||t()})),this.secondary.onEndpointDisconnect(e,(()=>{this.primary.isEndpointConnected(e)||t()}))}isValidEndpointPayload(e){return this.primary.isValidEndpointPayload(e)||this.secondary.isValidEndpointPayload(e)}async closeEndpoint(e){await this.primary.closeEndpoint(e),await this.secondary.closeEndpoint(e)}isEndpointConnected(e){return this.primary.isEndpointConnected(e)||this.secondary.isEndpointConnected(e)}async addEndpoint(e,t){this.primary.isValidEndpointPayload(t)&&await this.primary.addEndpoint(e,t),this.secondary.isValidEndpointPayload(t)&&await this.secondary.addEndpoint(e,t)}receive(e){this.primary.receive(e),this.secondary.receive(e)}send(e,t,n){return this.primary.isEndpointConnected(e)?this.primary.send(e,t,n):this.secondary.send(e,t,n)}async close(){await Promise.all([this.primary.close(),this.secondary.close()])}}mt.default=vt;var Ct,bt,It=s&&s.__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},Et=s&&s.__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)},xt=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(xe,\"__esModule\",{value:!0}),xe.ConnectionManager=void 0;const At=Ae,Pt=d,Mt=Oe,_t=Fe,Ot=Je,St=Qe,Rt=pt,Ft=gt,jt=xt(mt);class kt extends Pt.Base{static getProtocolOptionsFromStrings(e){return e.map((e=>{switch(e){case\"rtc\":return _t.RTCInfo;case\"classic\":return Mt.ClassicInfo;default:return(0,At.exhaustiveCheck)(e,[\"rtc\",\"classic\"])}}))}constructor(e){super(e),Ct.set(this,void 0),bt.set(this,void 0),this.removeChannelFromProviderMap=e=>{this.providerMap.delete(e)},this.onmessage=e=>\"process-channel-connection\"===e.action&&(this.processChannelConnection(e),!0),this.providerMap=new Map,this.protocolManager=new Ft.ProtocolManager(\"node\"===this.wire.environment.type?[\"classic\"]:[\"rtc\",\"classic\"]),It(this,Ct,new Rt.MessageReceiver(e),\"f\"),It(this,bt,new Ot.RTCICEManager(e),\"f\"),e.registerMessageHandler(this.onmessage.bind(this))}createProvider(e,t){const n=Object.assign(this.wire.environment.getDefaultChannelOptions().create,e||{}),i=this.protocolManager.getProviderProtocols(n?.protocols),r=i.map((e=>{switch(e){case\"rtc\":return new _t.RTCStrategy;case\"classic\":return new Mt.ClassicStrategy(this.wire,Et(this,Ct,\"f\"),t.channelId,t);default:return(0,At.exhaustiveCheck)(e,[\"rtc\",\"classic\"])}}));let o;if(2===r.length){const[e,t]=r;o=jt.default.combine(e,t)}else{if(1!==r.length)throw new Error(\"failed to combine strategies\");[o]=r}const s=new St.ChannelProvider(t,(()=>St.ChannelProvider.wireClose(this.wire,t.channelName)),o),a=t.channelId;return this.providerMap.set(a,{provider:s,strategy:o,supportedProtocols:kt.getProtocolOptionsFromStrings(i)}),St.ChannelProvider.setProviderRemoval(s,this.removeChannelFromProviderMap.bind(this)),s}async createClientOffer(e){const t=this.protocolManager.getClientProtocols(e?.protocols);let n;return{offer:{supportedProtocols:await Promise.all(t.map((async e=>{switch(e){case\"rtc\":{const{rtcClient:e,channels:t,offer:i,rtcConnectionId:r,channelsOpened:o}=await Et(this,bt,\"f\").startClientOffer();return n={rtcClient:e,channels:t,channelsOpened:o},{type:\"rtc\",version:_t.RTCInfo.version,payload:{offer:i,rtcConnectionId:r}}}case\"classic\":return{type:\"classic\",version:Mt.ClassicInfo.version};default:return(0,At.exhaustiveCheck)(e,[\"rtc\",\"classic\"])}}))),maxProtocols:2},rtc:n}}async createClientStrategy(e,t){t.endpointId||(t.endpointId=this.wire.environment.getNextMessageId(),Et(this,Ct,\"f\").checkForPreviousClientConnection(t.channelId));const n=t.answer??{supportedProtocols:[{type:\"classic\",version:1}]},i=(await Promise.all(n.supportedProtocols.map((async n=>\"rtc\"===n.type&&e?(await Et(this,bt,\"f\").finishClientOffer(e.rtcClient,n.payload.answer,e.channelsOpened),new _t.RTCStrategy):\"classic\"===n.type?new Mt.ClassicStrategy(this.wire,Et(this,Ct,\"f\"),t.endpointId,t):null)))).filter((e=>null!==e));let r;if(e&&!i.some((e=>e instanceof _t.RTCStrategy))&&e&&e.rtcClient.close(),i.length>=2)r=jt.default.combine(i[0],i[1]);else{if(!i.length)throw new Error(\"No compatible protocols\");[r]=i}const o={endpointIdentity:t,rtc:e};return r.addEndpoint(t.channelId,o),r}async processChannelConnection(e){const{clientIdentity:t,providerIdentity:n,ackToSender:i,payload:r,offer:o}=e.payload;t.endpointId?t.isLocalEndpointId=!1:(t.endpointId=this.wire.environment.getNextMessageId(),t.isLocalEndpointId=!0);const s=n.channelId,a=this.providerMap.get(s);if(!a)return i.payload.success=!1,i.payload.reason=`Channel \"${n.channelName}\" has been destroyed.`,this.wire.sendRaw(i);const{provider:c,strategy:d,supportedProtocols:h}=a;try{if(!(c instanceof St.ChannelProvider))throw Error(\"Cannot connect to a channel client\");const e=o??{supportedProtocols:[{type:\"classic\",version:1}],maxProtocols:1},n=this.protocolManager.getCompatibleProtocols(h,e);if(!n.length)throw new Error(\"This provider does not support any of the offered protocols.\");const s=await c.processConnection(t,r);i.payload.payload=i.payload.payload||{};let a={supportedProtocols:[],endpointPayloadPromise:Promise.resolve({endpointIdentity:t})};return a=await n.reduce((async(e,t)=>{const n=await e;if(\"rtc\"===t.type){const{answer:e,rtcClient:i,channels:r}=await Et(this,bt,\"f\").createProviderAnswer(t.payload.rtcConnectionId,t.payload.offer);n.supportedProtocols.push({type:\"rtc\",version:_t.RTCInfo.version,payload:{answer:e}}),n.endpointPayloadPromise=n.endpointPayloadPromise.then((e=>r.then((t=>({...e,rtc:{rtcClient:i,channels:t}})))))}else n.supportedProtocols.push({type:\"classic\",version:Mt.ClassicInfo.version});return n}),Promise.resolve(a)),a.endpointPayloadPromise.then((e=>d.addEndpoint(t.endpointId,e))),i.payload.payload.result=s,i.payload.payload.answer=a,this.wire.sendRaw(i)}catch(e){return i.payload.success=!1,i.payload.reason=e.message,this.wire.sendRaw(i)}}}xe.ConnectionManager=kt,Ct=new WeakMap,bt=new WeakMap;var Lt,Tt,$t,Bt=s&&s.__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},Gt=s&&s.__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)};Object.defineProperty(le,\"__esModule\",{value:!0}),le.Channel=void 0;const Wt=t,Ht=G,Nt=d,Dt=ue,Ut=xe,Vt=Qe;function zt(e){const t=Math.floor(e/10),n=Math.min(3e4,500*2**t);return new Promise((e=>{setTimeout((()=>{e(!1)}),n)}))}class Kt extends Nt.EmitterBase{constructor(e){super(e,\"channel\"),Lt.set(this,void 0),Tt.set(this,new Wt.EventEmitter),$t.set(this,new Ht.AsyncRetryableLazy((async()=>{await Promise.all([this.on(\"disconnected\",(e=>{Dt.ChannelClient.handleProviderDisconnect(e)})),this.on(\"connected\",((...e)=>{Gt(this,Tt,\"f\").emit(\"connected\",...e)}))]).catch((()=>new Error(\"error setting up channel connection listeners\")))}))),Bt(this,Lt,new Ut.ConnectionManager(e),\"f\")}async getAllChannels(){return this.wire.sendAction(\"get-all-channels\").then((({payload:e})=>e.data))}async onChannelConnect(e){await this.on(\"connected\",e)}async onChannelDisconnect(e){await this.on(\"disconnected\",e)}async safeConnect(e,t,n){const i={count:0};do{let r=()=>{};const o=new Promise((t=>{r=n=>{e===n.channelName&&t(!0)},Gt(this,Tt,\"f\").on(\"connected\",r)}));try{if(i.count>0){i.gotConnectedEvent=await Promise.race([zt(i.count),o]);const t=await this.wire.sendAction(\"connect-to-channel\",{...n,retryInfo:i});return console.log(`Successfully connected to channelName: ${e}`),t.payload.data}const t=this.wire.sendAction(\"connect-to-channel\",n);i.originalMessageId=t.messageId;return(await t).payload.data}catch(n){if(!n.message.includes(\"internal-nack\"))throw n;t&&0===i.count&&console.warn(`No channel found for channelName: ${e}. Waiting for connection...`)}finally{i.count+=1,Gt(this,Tt,\"f\").removeListener(\"connected\",r)}}while(t);throw new Error(`No channel found for channelName: ${e}.`)}async connect(e,t={}){if(await Gt(this,$t,\"f\").getValue(),!e||\"string\"!=typeof e)throw new Error(\"Please provide a channelName string to connect to a channel.\");const n={wait:!0,...this.wire.environment.getDefaultChannelOptions().connect,...t},{offer:i,rtc:r}=await Gt(this,Lt,\"f\").createClientOffer(n);let o;(this.fin.me.isFrame||this.fin.me.isView||this.fin.me.isWindow)&&(o=(await this.fin.me.getInfo()).url);const s={channelName:e,...n,offer:i,connectionUrl:o},a=await this.safeConnect(e,n.wait,s),c=await Gt(this,Lt,\"f\").createClientStrategy(r,a),d=new Dt.ChannelClient(a,(()=>Dt.ChannelClient.wireClose(this.wire,a,a.endpointId)),c);return c.onEndpointDisconnect(a.channelId,(async()=>{try{await d.sendDisconnectAction()}catch(e){console.warn(`Something went wrong during disconnect for client with uuid: ${a.uuid} / name: ${a.name} / endpointId: ${a.endpointId}.`)}finally{Dt.ChannelClient.handleProviderDisconnect(a)}})),d}async create(e,t){if(!e)throw new Error(\"Please provide a channelName to create a channel\");const{payload:{data:n}}=await this.wire.sendAction(\"create-channel\",{channelName:e}),i=Gt(this,Lt,\"f\").createProvider(t,n);return this.on(\"client-disconnected\",(t=>{t.channelName===e&&Vt.ChannelProvider.handleClientDisconnection(i,t)})),i}}le.Channel=Kt,Lt=new WeakMap,Tt=new WeakMap,$t=new WeakMap,Object.defineProperty(de,\"__esModule\",{value:!0}),de.InterAppPayload=de.InterApplicationBus=void 0;const qt=t,Jt=d,Yt=he,Zt=le,Qt=O;class Xt extends Jt.Base{constructor(e){super(e),this.events={subscriberAdded:\"subscriber-added\",subscriberRemoved:\"subscriber-removed\"},this.refCounter=new Yt.RefCounter,this.Channel=new Zt.Channel(e),this.emitter=new qt.EventEmitter,e.registerMessageHandler(this.onmessage.bind(this)),this.on=this.emitter.on.bind(this.emitter),this.removeAllListeners=this.emitter.removeAllListeners.bind(this.emitter)}async publish(e,t){await this.wire.sendAction(\"publish-message\",{topic:e,message:t,sourceWindowName:this.me.name})}async send(e,t,n){const i=(0,Qt.validateIdentity)(e);if(i)throw new Error(i);await this.wire.sendAction(\"send-message\",{destinationUuid:e.uuid,destinationWindowName:e.name,topic:t,message:n,sourceWindowName:this.me.name})}subscribe(e,t,n){const i=this.createSubscriptionKey(e.uuid,e.name||\"*\",t);return this.emitter.on(i,n),this.refCounter.actOnFirst(i,(async()=>{await this.wire.sendAction(\"subscribe\",{sourceUuid:e.uuid,sourceWindowName:e.name||\"*\",topic:t,destinationWindowName:this.me.name})}),(()=>Promise.resolve()))}unsubscribe(e,t,n){const i=e.name||\"*\",r=this.createSubscriptionKey(e.uuid,i,t);return this.emitter.removeListener(r,n),this.refCounter.actOnLast(r,(async()=>{await this.wire.sendAction(\"unsubscribe\",{sourceUuid:e.uuid,sourceWindowName:i,topic:t,destinationWindowName:this.me.name})}),(()=>new Promise((e=>e)).then((()=>{}))))}processMessage(e){const{payload:{message:t,sourceWindowName:n,sourceUuid:i,topic:r}}=e,o=[this.createSubscriptionKey(i,n,r),this.createSubscriptionKey(i,\"*\",r),this.createSubscriptionKey(\"*\",\"*\",r)],s={uuid:i,name:n};o.forEach((e=>{this.emitter.emit(e,t,s)}))}emitSubscriverEvent(e,t){const{payload:{targetName:n,uuid:i,topic:r}}=t,o={name:n,uuid:i,topic:r};this.emitter.emit(e,o)}createSubscriptionKey(e,t,n){const i=t||\"*\";if(!(e&&i&&n))throw new Error(\"Missing uuid, name, or topic string\");return function(...e){return e.map((e=>Buffer.from(`${e}`).toString(\"base64\"))).join(\"/\")}(e,i,n)}onmessage(e){const{action:t}=e;switch(t){case\"process-message\":this.processMessage(e);break;case this.events.subscriberAdded:this.emitSubscriverEvent(this.events.subscriberAdded,e);break;case this.events.subscriberRemoved:this.emitSubscriverEvent(this.events.subscriberRemoved,e)}return!0}}de.InterApplicationBus=Xt;de.InterAppPayload=class{};var en={};Object.defineProperty(en,\"__esModule\",{value:!0}),en.Clipboard=void 0;const tn=d;class nn extends tn.Base{async writeText(e){await this.wire.sendAction(\"clipboard-write-text\",e)}async readText(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-text\",{type:e});return t.data}async writeImage(e){await this.wire.sendAction(\"clipboard-write-image\",e)}async readImage(e={format:\"dataURL\"}){const{payload:t}=await this.wire.sendAction(\"clipboard-read-image\",e);return t.data}async writeHtml(e){await this.wire.sendAction(\"clipboard-write-html\",e)}async readHtml(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-html\",{type:e});return t.data}async writeRtf(e){await this.wire.sendAction(\"clipboard-write-rtf\",e)}async readRtf(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-rtf\",{type:e});return t.data}async write(e){await this.wire.sendAction(\"clipboard-write\",e)}async getAvailableFormats(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-formats\",{type:e});return t.data}}en.Clipboard=nn;var rn={},on={},sn={};Object.defineProperty(sn,\"__esModule\",{value:!0}),sn.ExternalApplication=void 0;const an=d;class cn extends an.EmitterBase{constructor(e,t){super(e,\"external-application\",t.uuid),this.identity=t}getInfo(){return this.wire.sendAction(\"get-external-application-info\",this.identity).then((({payload:e})=>e.data))}}sn.ExternalApplication=cn,Object.defineProperty(on,\"__esModule\",{value:!0}),on.ExternalApplicationModule=void 0;const dn=d,hn=sn;class ln extends dn.Base{wrap(e){return this.wire.sendAction(\"external-application-wrap\").catch((e=>{})),Promise.resolve(new hn.ExternalApplication(this.wire,{uuid:e}))}wrapSync(e){return this.wire.sendAction(\"external-application-wrap-sync\").catch((e=>{})),new hn.ExternalApplication(this.wire,{uuid:e})}}on.ExternalApplicationModule=ln,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(on,e),n(sn,e)}(rn);var un={},pn={},wn={};Object.defineProperty(wn,\"__esModule\",{value:!0}),wn._Frame=void 0;const yn=d;class fn extends yn.EmitterBase{constructor(e,t){super(e,\"frame\",t.uuid,t.name),this.identity=t}getInfo(){return this.wire.sendAction(\"get-frame-info\",this.identity).then((({payload:e})=>e.data))}getParentWindow(){return this.wire.sendAction(\"get-parent-window\",this.identity).then((({payload:e})=>e.data))}}wn._Frame=fn,Object.defineProperty(pn,\"__esModule\",{value:!0}),pn._FrameModule=void 0;const gn=d,mn=O,vn=wn;class Cn extends gn.Base{async wrap(e){this.wire.sendAction(\"frame-wrap\").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}wrapSync(e){this.wire.sendAction(\"frame-wrap-sync\").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}getCurrent(){return this.wire.sendAction(\"frame-get-current\").catch((e=>{})),Promise.resolve(new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity()))}getCurrentSync(){return this.wire.sendAction(\"frame-get-current-sync\").catch((e=>{})),new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity())}}pn._FrameModule=Cn,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(pn,e),n(wn,e)}(un);var bn={};Object.defineProperty(bn,\"__esModule\",{value:!0}),bn.GlobalHotkey=void 0;const In=d;class En extends In.EmitterBase{constructor(e){super(e,\"global-hotkey\")}async register(e,t){await this.on(e,t),await this.wire.sendAction(\"global-hotkey-register\",{hotkey:e})}async unregister(e){await this.removeAllListeners(e),await this.wire.sendAction(\"global-hotkey-unregister\",{hotkey:e})}async unregisterAll(){await Promise.all(this.eventNames().filter((e=>!(\"registered\"===e||\"unregistered\"===e))).map((e=>this.removeAllListeners(e)))),await this.wire.sendAction(\"global-hotkey-unregister-all\",{})}async isRegistered(e){const{payload:{data:t}}=await this.wire.sendAction(\"global-hotkey-is-registered\",{hotkey:e});return t}}bn.GlobalHotkey=En;var xn,An={},Pn={},Mn={},_n=s&&s.__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)};Object.defineProperty(Mn,\"__esModule\",{value:!0}),Mn.Platform=void 0;const On=d,Sn=O,Rn=new Map;class Fn extends On.EmitterBase{constructor(e,t){super(t.wire,\"application\",e.uuid),this.getClient=e=>{this.wire.sendAction(\"platform-get-client\",this.identity).catch((e=>{}));const t=e||this.identity,{uuid:n}=t;if(!Rn.has(n)){const e=_n(this,xn,\"f\").call(this,n);Rn.set(n,e)}return Rn.get(n)},xn.set(this,(async e=>{try{const t=`custom-frame-${e}`,n=await this._channel.connect(t,{wait:!1});return n.onDisconnection((()=>{Rn.delete(e)})),n}catch(t){throw Rn.delete(e),new Error(\"The targeted Platform is not currently running. Listen for application-started event for the given Uuid.\")}})),this.launchLegacyManifest=this.launchContentManifest;const n=(0,Sn.validateIdentity)(e);if(n)throw new Error(n);this._channel=t,this.identity={uuid:e.uuid},this.Layout=this.fin.Platform.Layout,this.Application=this.fin.Application.wrapSync(this.identity)}async createView(e,t,n){this.wire.sendAction(\"platform-create-view\",this.identity).catch((e=>{}));const i=await this.getClient(),r=await i.dispatch(\"create-view\",{target:t,opts:e,targetView:n});if(!r||(0,Sn.validateIdentity)(r.identity))throw new Error(`When overwriting the createView call, please return an object that has a valid 'identity' property: ${JSON.stringify(r)}`);return this.fin.View.wrapSync(r.identity)}async createWindow(e){this.wire.sendAction(\"platform-create-window\",this.identity).catch((e=>{}));const t=await this.getClient();e.reason||(e.reason=\"api-call\");const n=await t.dispatch(\"create-view-container\",e);if(!n||(0,Sn.validateIdentity)(n.identity))throw new Error(`When overwriting the createWindow call, please return an object that has a valid 'identity' property: ${JSON.stringify(n)}`);const{identity:i}=n,r=this.fin.Window.wrapSync(i);return r.name=i.name,r.uuid=i.uuid,r}async quit(){this.wire.sendAction(\"platform-quit\",this.identity).catch((e=>{}));return(await this.getClient()).dispatch(\"quit\")}async closeView(e){this.wire.sendAction(\"platform-close-view\",this.identity).catch((e=>{}));const t=await this.getClient();await t.dispatch(\"close-view\",{view:e})}async reparentView(e,t){console.warn(\"Platform.reparentView has been deprecated, please use Platform.createView\"),this.wire.sendAction(\"platform-reparent-view\",this.identity).catch((e=>{}));const n={...e,uuid:e.uuid??this.identity.uuid},i=await this.fin.View.wrap(n),r=await i.getOptions();return this.createView(r,t)}async getSnapshot(){this.wire.sendAction(\"platform-get-snapshot\",this.identity).catch((e=>{}));return(await this.getClient()).dispatch(\"get-snapshot\")}async getViewSnapshot(e){return(await this.getClient()).dispatch(\"get-view-snapshot\",{viewIdentity:e})}async applySnapshot(e,t){this.wire.sendAction(\"platform-apply-snapshot\",this.identity).catch((e=>{}));const n=\"Requested snapshot must be a valid Snapshot object, or a url or filepath to such an object.\";let i;if(\"string\"==typeof e)try{i=(await this._channel.wire.sendAction(\"get-application-manifest\",{manifestUrl:e})).payload.data}catch(e){throw new Error(`${n}: ${e}`)}else i=e;if(!i.windows)throw new Error(n);const r=await this.getClient();return await r.dispatch(\"apply-snapshot\",{snapshot:i,options:t}),this}async fetchManifest(e){return(await this.getClient()).dispatch(\"platform-fetch-manifest\",{manifestUrl:e})}async launchContentManifest(e){this.wire.sendAction(\"platform-launch-content-manifest\",this.identity).catch((()=>{}));const t=await this.getClient(),n=await this.fetchManifest(e);return t.dispatch(\"launch-into-platform\",{manifest:n,manifestUrl:e}),this}async setWindowContext(e={},t){if(this.wire.sendAction(\"platform-set-window-context\",this.identity).catch((e=>{})),!e)throw new Error(\"Please provide a serializable object or string to set the context.\");const n=await this.getClient(),{entityType:i}=t?await this.fin.System.getEntityInfo(t.uuid,t.name):this.fin.me;await n.dispatch(\"set-window-context\",{context:e,entityType:i,target:t||{uuid:this.fin.me.uuid,name:this.fin.me.name}})}async getWindowContext(e){this.wire.sendAction(\"platform-get-window-context\",this.identity).catch((e=>{}));const t=await this.getClient(),{entityType:n}=e?await this.fin.System.getEntityInfo(e.uuid,e.name):this.fin.me;return t.dispatch(\"get-window-context\",{target:e||{uuid:this.fin.me.uuid,name:this.fin.me.name},entityType:n})}async closeWindow(e,t={skipBeforeUnload:!1}){this.wire.sendAction(\"platform-close-window\",this.identity).catch((e=>{}));return(await this.getClient()).dispatch(\"close-window\",{windowId:e,options:t})}}Mn.Platform=Fn,xn=new WeakMap;var jn={},kn={},Ln={},Tn={};function $n(e){switch(e){case\"columns\":case\"grid\":case\"rows\":case\"tabs\":return!0;default:return!1}}Object.defineProperty(Tn,\"__esModule\",{value:!0}),Tn.overrideFromComposables=Tn.isValidPresetType=void 0,Tn.isValidPresetType=$n,Tn.overrideFromComposables=function(...e){return t=>e.reduceRight(((e,t)=>n=>t(e(n))),(e=>e))(t)},Tn.default={isValidPresetType:$n};var Bn={},Gn={},Wn={};Object.defineProperty(Wn,\"__esModule\",{value:!0}),Wn.ApiConsumer=void 0;Wn.ApiConsumer=class{constructor(e){this.strategy=e,this.consume=async e=>(await this.strategy.getExposedFunctions(e)).reduce(((t,n)=>({...t,[n.key]:this.strategy.createFunction(n,e)})),{})}};var Hn={},Nn={};Object.defineProperty(Nn,\"__esModule\",{value:!0}),Nn.expose=Nn.getExposedProperties=void 0;const Dn=Symbol(\"exposedProperties\");Nn.getExposedProperties=e=>e[Dn]||e.prototype[Dn]||[];Nn.expose=e=>(t,n,i)=>{t[Dn]=t[Dn]||[],t[Dn].push({key:n,descriptor:i,options:e})},Object.defineProperty(Hn,\"__esModule\",{value:!0}),Hn.ApiExposer=void 0;const Un=Nn;Hn.ApiExposer=class{constructor(e){this.strategy=e,this.exposeInstance=async(e,t)=>{const n=(0,Un.getExposedProperties)(e),i=await Promise.all(n.map((async({key:n,options:i})=>({key:n,options:await this.strategy.exposeFunction(e[n].bind(e),{key:n,options:i,meta:t})}))));await this.strategy.exposeMeta(t,i)}}};var Vn={},zn={},Kn={};Object.defineProperty(Kn,\"__esModule\",{value:!0}),Kn.ChannelsConsumer=void 0;Kn.ChannelsConsumer=class{constructor(e){this.channel=e,this.getExposedFunctions=async e=>{const{id:t}=e,{props:n}=await this.channel.dispatch(`api-meta:${t}`);return n},this.createFunction=e=>(...t)=>{const{action:n}=e.options;return this.channel.dispatch(n,{args:t})}}};var qn={};Object.defineProperty(qn,\"__esModule\",{value:!0}),qn.ChannelsExposer=void 0;qn.ChannelsExposer=class{constructor(e){this.channelProviderOrClient=e,this.exposeFunction=async(e,t)=>{const{key:n,options:i,meta:r}=t,{id:o}=r,s=`${o}.${i?.action||n}`;return await this.channelProviderOrClient.register(s,(async({args:t})=>e(...t))),{action:s}},this.exposeMeta=async({id:e},t)=>{const n=`api-meta:${e}`;await this.channelProviderOrClient.register(n,(()=>({props:t})))}}},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Kn,e),n(qn,e)}(zn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(zn,e)}(Vn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Wn,e),n(Hn,e),n(Vn,e),n(Nn,e)}(Gn);var Jn={};Object.defineProperty(Jn,\"__esModule\",{value:!0}),Jn.createRelayedDispatch=exports.relayChannelClientApi_1=Jn.relayChannelClientApi=void 0;const Yn=[\"no longer connected\",\"RTCDataChannel closed unexpectedly\",\"The client you are trying to dispatch from is disconnected from the target provider\"];exports.relayChannelClientApi_1=Jn.relayChannelClientApi=async(e,t)=>{e.register(`relay:${t}`,(({action:t,target:n,payload:i})=>e.dispatch(n,t,i))),await Promise.resolve()};Jn.createRelayedDispatch=(e,t,n,i)=>async(r,o)=>{try{return await e.dispatch(`relay:${n}`,{action:r,payload:o,target:t})}catch(e){if(s=e.message,Yn.some((e=>s.includes(e)))&&i)throw new Error(i);throw e}var s};var Zn,Qn,Xn,ei=s&&s.__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},ti=s&&s.__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)};Object.defineProperty(Bn,\"__esModule\",{value:!0}),Bn.ColumnOrRow=Bn.TabStack=Bn.LayoutNode=void 0;const ni=Gn,ii=Jn;class ri{constructor(e,t){Zn.set(this,void 0),this.isRoot=()=>ti(this,Zn,\"f\").isRoot(this.entityId),this.exists=()=>ti(this,Zn,\"f\").exists(this.entityId),this.getParent=async()=>{const e=await ti(this,Zn,\"f\").getParent(this.entityId);if(e)return ri.getEntity(e,ti(this,Zn,\"f\"))},this.createAdjacentStack=async(e,t)=>{const n=await ti(this,Zn,\"f\").createAdjacentStack(this.entityId,e,t);return ri.getEntity({entityId:n,type:\"stack\"},ti(this,Zn,\"f\"))},this.getAdjacentStacks=async e=>(await ti(this,Zn,\"f\").getAdjacentStacks({targetId:this.entityId,edge:e})).map((e=>ri.getEntity({type:\"stack\",entityId:e.entityId},ti(this,Zn,\"f\")))),ei(this,Zn,e,\"f\"),this.entityId=t}}Bn.LayoutNode=ri,Zn=new WeakMap,ri.newLayoutEntitiesClient=async(e,t,n)=>{const i=(0,ii.createRelayedDispatch)(e,n,\"layout-relay\",\"You are trying to interact with a layout component on a window that does not exist or has been destroyed.\");return new ni.ApiConsumer(new ni.ChannelsConsumer({dispatch:i})).consume({id:t})},ri.getEntity=(e,t)=>{const{entityId:n,type:i}=e;switch(i){case\"column\":case\"row\":return new si(t,n,i);case\"stack\":return new oi(t,n);default:throw new Error(`Unrecognised Layout Entity encountered ('${JSON.stringify(e)})`)}};class oi extends ri{constructor(e,t){super(e,t),Qn.set(this,void 0),this.type=\"stack\",this.getViews=()=>ti(this,Qn,\"f\").getStackViews(this.entityId),this.addView=async(e,t={index:0})=>ti(this,Qn,\"f\").addViewToStack(this.entityId,e,t),this.removeView=async e=>{await ti(this,Qn,\"f\").removeViewFromStack(this.entityId,e)},this.setActiveView=async e=>{await ti(this,Qn,\"f\").setStackActiveView(this.entityId,e)},ei(this,Qn,e,\"f\")}}Bn.TabStack=oi,Qn=new WeakMap;class si extends ri{constructor(e,t,n){super(e,t),Xn.set(this,void 0),this.getContent=async()=>(await ti(this,Xn,\"f\").getContent(this.entityId)).map((e=>ri.getEntity(e,ti(this,Xn,\"f\")))),ei(this,Xn,e,\"f\"),this.type=n}}Bn.ColumnOrRow=si,Xn=new WeakMap;var ai={};Object.defineProperty(ai,\"__esModule\",{value:!0}),ai.DEFAULT_LAYOUT_KEY=ai.LAYOUT_CONTROLLER_ID=void 0,ai.LAYOUT_CONTROLLER_ID=\"layout-entities\",ai.DEFAULT_LAYOUT_KEY=\"__default__\";var ci,di,hi,li=s&&s.__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)};Object.defineProperty(Ln,\"__esModule\",{value:!0}),Ln.Layout=void 0;const ui=G,pi=O,wi=d,yi=Tn,fi=Bn,gi=ai;class mi extends wi.Base{static getClient(e){return li(e,di,\"f\").getValue()}constructor(e,t){super(t),ci.add(this),di.set(this,new ui.Lazy((async()=>fi.LayoutNode.newLayoutEntitiesClient(await this.platform.getClient(),gi.LAYOUT_CONTROLLER_ID,this.identity)))),this.replace=async e=>{this.wire.sendAction(\"layout-replace\").catch((e=>{}));const t=await this.platform.getClient();await t.dispatch(\"replace-layout\",{target:this.identity,opts:{layout:e}})},this.replaceView=async(e,t)=>{this.wire.sendAction(\"layout-replace-view\").catch((e=>{}));const n=await this.platform.getClient();await n.dispatch(\"replace-view\",{target:this.identity,opts:{viewToReplace:e,newView:t}})},this.applyPreset=async e=>{this.wire.sendAction(\"layout-apply-preset\").catch((e=>{}));const t=await this.platform.getClient(),{presetType:n}=e;if(!n||!(0,yi.isValidPresetType)(n))throw new Error(\"Cannot apply preset layout, please include an applicable presetType property in the PresetLayoutOptions.\");await t.dispatch(\"apply-preset-layout\",{target:this.identity,opts:{presetType:n}})};const n=(0,pi.validateIdentity)(e);if(n)throw new Error(n);this.identity=e,this.platform=this.fin.Platform.wrapSync({uuid:e.uuid}),e.uuid===this.fin.me.uuid&&e.name===this.fin.me.name&&(this.init=this.fin.Platform.Layout.init)}async getConfig(){this.wire.sendAction(\"layout-get-config\").catch((e=>{}));return(await this.platform.getClient()).dispatch(\"get-frame-snapshot\",{target:this.identity})}async getCurrentViews(){this.wire.sendAction(\"layout-get-views\").catch((e=>{}));const e=await this.platform.getClient();return(await e.dispatch(\"get-layout-views\",{target:this.identity})).map((e=>this.fin.View.wrapSync(e)))}async getRootItem(){this.wire.sendAction(\"layout-get-root-item\").catch((()=>{}));const e=await li(this,di,\"f\").getValue(),t=await e.getRoot(\"layoutName\"in this.identity?this.identity:void 0);return fi.LayoutNode.getEntity(t,e)}async getStackByViewIdentity(e){this.wire.sendAction(\"layout-get-stack-by-view\").catch((()=>{}));const t=await li(this,di,\"f\").getValue(),n=await t.getStackByView(e);if(!n)throw new Error(`No stack found for view: ${e.uuid}/${e.name}`);return fi.LayoutNode.getEntity(n,t)}async addView(e,{location:t,targetView:n}={}){this.wire.sendAction(\"layout-add-view\").catch((e=>{}));const{identity:i}=await li(this,ci,\"m\",hi).call(this,\"layout-add-view\",{viewOptions:e,location:t,targetView:n});return{identity:i}}async closeView(e){this.wire.sendAction(\"layout-close-view\").catch((e=>{})),await li(this,ci,\"m\",hi).call(this,\"layout-close-view\",{viewIdentity:e})}}Ln.Layout=mi,di=new WeakMap,ci=new WeakSet,hi=async function(e,t){return(await this.platform.getClient()).dispatch(e,{target:this.identity,opts:t})};var vi,Ci,bi,Ii,Ei,xi=s&&s.__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)},Ai=s&&s.__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};Object.defineProperty(kn,\"__esModule\",{value:!0}),kn.LayoutModule=void 0;const Pi=d,Mi=Ln,_i=ai;class Oi extends Pi.Base{constructor(){super(...arguments),vi.add(this),Ci.set(this,!1),bi.set(this,null),this.init=async(e={})=>{if(this.wire.sendAction(\"layout-init\").catch((e=>{})),!this.wire.environment.layoutAllowedInContext(this.fin))throw new Error(\"Layout.init can only be called from a Window context.\");if(xi(this,Ci,\"f\"))throw new Error(\"Layout.init was already called, please use Layout.create to add additional layouts.\");\"openfin\"===this.wire.environment.type&&await this.fin.Platform.getCurrentSync().getClient(),Ai(this,Ci,!0,\"f\"),Ai(this,bi,await this.wire.environment.initLayoutManager(this.fin,this.wire,e),\"f\"),await this.wire.environment.applyLayoutSnapshot(this.fin,xi(this,bi,\"f\"),e);const t={name:this.fin.me.name,uuid:this.fin.me.uuid};if(!e.layoutManagerOverride){const e={layoutName:_i.DEFAULT_LAYOUT_KEY,...t};return xi(this,Ii,\"f\").call(this,e)}return this.wrapSync(t)},Ii.set(this,(e=>{const t=\"[Layout] You are using a deprecated property `layoutManager` - it will throw if you access it starting in v37.\",n=new Proxy({},{get(e,n){throw console.warn(`[Layout-mgr-proxy] accessing ${n.toString()}`),new Error(t)}}),i=Object.assign(this.wrapSync(e),{layoutManager:n});return new Proxy(i,{get(e,n){if(\"layoutManager\"===n)throw console.warn(`[Layout-proxy] accessing ${n.toString()}`),new Error(t);return e[n]}})})),this.getCurrentLayoutManagerSync=()=>xi(this,vi,\"m\",Ei).call(this,\"fin.Platform.Layout.getCurrentLayoutManagerSync()\"),this.create=async e=>this.wire.environment.createLayout(xi(this,vi,\"m\",Ei).call(this,\"fin.Platform.Layout.create()\"),e),this.destroy=async e=>this.wire.environment.destroyLayout(xi(this,vi,\"m\",Ei).call(this,\"fin.Platform.Layout.destroy()\"),e)}async wrap(e){return this.wire.sendAction(\"layout-wrap\").catch((e=>{})),new Mi.Layout(e,this.wire)}wrapSync(e){return this.wire.sendAction(\"layout-wrap-sync\").catch((e=>{})),new Mi.Layout(e,this.wire)}async getCurrent(){if(this.wire.sendAction(\"layout-get-current\").catch((e=>{})),\"openfin\"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error(\"You are not in a Window context. Only Windows can have a Layout.\");const{uuid:e,name:t}=this.fin.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction(\"layout-get-current-sync\").catch((e=>{})),\"openfin\"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error(\"You are not in a Window context. Only Windows can have a Layout.\");const{uuid:e,name:t}=this.fin.me;return this.wrapSync({uuid:e,name:t})}async getLayoutByViewIdentity(e){this.wire.sendAction(\"layout-get-by-view-identity\").catch((()=>{}));let t=await this.wire.environment.getViewWindowIdentity(this.fin,e);t.identity&&(t=t.identity);try{const n=this.wrapSync(t),i=await Mi.Layout.getClient(n),r=await i.getLayoutIdentityForViewOrThrow(e);return this.wrapSync(r)}catch(n){if(![\"No action registered at target for\",\"getLayoutIdentityForViewOrThrow is not a function\"].some((e=>n.message.includes(e))))throw n;if(t.uuid===t.name)throw new Error(`View identity ${JSON.stringify(e)} is not attached to any layout in provider window ${JSON.stringify(t)}.`);return this.wrapSync(t)}}}kn.LayoutModule=Oi,Ci=new WeakMap,bi=new WeakMap,Ii=new WeakMap,vi=new WeakSet,Ei=function(e){if(!xi(this,bi,\"f\"))throw new Error(`You must call init before using the API ${e}`);return xi(this,bi,\"f\")},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(kn,e),n(Ln,e)}(jn),Object.defineProperty(Pn,\"__esModule\",{value:!0}),Pn.PlatformModule=void 0;const Si=d,Ri=Mn,Fi=jn;class ji extends Si.Base{constructor(e,t){super(e),this._channel=t,this.Layout=new Fi.LayoutModule(this.wire)}async init(e){if(!fin.__internal_.isPlatform||fin.me.name!==fin.me.uuid)throw new Error(\"fin.Platform.init should only be called from a custom platform provider running in the main window of the application.\");return this.wire.environment.initPlatform(this.fin,e)}async wrap(e){return this.wire.sendAction(\"platform-wrap\").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}wrapSync(e){return this.wire.sendAction(\"platform-wrap-sync\").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}async getCurrent(){return this.wire.sendAction(\"platform-get-current\").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction(\"platform-get-current-sync\").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}start(e){return this.wire.sendAction(\"platform-start\").catch((e=>{})),new Promise((async(t,n)=>{try{const{uuid:n}=e,i=await this.fin.Application._create({...e,isPlatformController:!0});i.once(\"platform-api-ready\",(()=>t(this.wrapSync({uuid:n})))),i._run({uuid:n})}catch(e){n(e)}}))}startFromManifest(e,t){return this.wire.sendAction(\"platform-start-from-manifest\").catch((e=>{})),new Promise((async(n,i)=>{try{const i=await this.fin.Application._createFromManifest(e);i.once(\"platform-api-ready\",(()=>n(this.wrapSync({uuid:i.identity.uuid})))),i._run(t)}catch(e){i(e)}}))}}Pn.PlatformModule=ji,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Pn,e),n(Mn,e)}(An);var ki={};!function(e){Object.defineProperty(e,\"__esModule\",{value:!0}),e.getMe=e.getBaseMe=e.environmentUnsupportedMessage=void 0;const t=J(),n=un,i=ie(),r=rn;function o(e,t,n){return{...{isView:\"view\"===e,isWindow:\"window\"===e,isFrame:\"iframe\"===e,isExternal:\"external connection\"===e},uuid:t,name:n,entityType:e}}e.environmentUnsupportedMessage=\"You are not running in OpenFin.\",e.getBaseMe=o,e.getMe=function(s){const{uuid:a,name:c,entityType:d}=s.me,h={setContext(){throw new Error(e.environmentUnsupportedMessage)},addContextHandler(){throw new Error(e.environmentUnsupportedMessage)},getContextGroups(){throw new Error(e.environmentUnsupportedMessage)},joinContextGroup(){throw new Error(e.environmentUnsupportedMessage)},removeFromContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getAllClientsInContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getInfoForContextGroup(){throw new Error(e.environmentUnsupportedMessage)}},l=\"Interop API has not been instantiated. Either connection has failed or you have not declared interop in your config.\",u={setContext(){throw new Error(l)},addContextHandler(){throw new Error(l)},getContextGroups(){throw new Error(l)},joinContextGroup(){throw new Error(l)},removeFromContextGroup(){throw new Error(l)},getAllClientsInContextGroup(){throw new Error(l)},getInfoForContextGroup(){throw new Error(l)}},p={eventNames:()=>{throw new Error(e.environmentUnsupportedMessage)},emit:()=>{throw new Error(e.environmentUnsupportedMessage)},listeners:()=>{throw new Error(e.environmentUnsupportedMessage)},listenerCount:()=>{throw new Error(e.environmentUnsupportedMessage)},on:()=>{throw new Error(e.environmentUnsupportedMessage)},addListener:()=>{throw new Error(e.environmentUnsupportedMessage)},once:()=>{throw new Error(e.environmentUnsupportedMessage)},prependListener:()=>{throw new Error(e.environmentUnsupportedMessage)},prependOnceListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeAllListeners:()=>{throw new Error(e.environmentUnsupportedMessage)}};switch(d){case\"view\":return Object.assign(new t.View(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case\"window\":return Object.assign(new i._Window(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case\"iframe\":return Object.assign(new n._Frame(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case\"external connection\":return Object.assign(new r.ExternalApplication(s,{uuid:a}),o(d,a,c),{interop:u,isOpenFin:!1});default:return{...o(d,a,c),...p,interop:h,isOpenFin:!1}}}}(ki);var Li={},Ti={},$i={};Object.defineProperty($i,\"__esModule\",{value:!0}),$i.createWarningObject=$i.createUnusableObject=void 0,$i.createUnusableObject=function(e){const t=()=>{throw new Error(e)};return new Proxy({},{apply:t,construct:t,defineProperty:t,deleteProperty:t,get:t,getOwnPropertyDescriptor:t,getPrototypeOf:t,has:t,isExtensible:t,ownKeys:t,preventExtensions:t,set:t,setPrototypeOf:t})},$i.createWarningObject=function(e,t){return new Proxy(t,{get:(...t)=>(console.warn(e),Reflect.get(...t)),set:(...t)=>(console.warn(e),Reflect.set(...t)),getOwnPropertyDescriptor:(...t)=>(console.warn(e),Reflect.getOwnPropertyDescriptor(...t)),ownKeys:(...t)=>(console.warn(e),Reflect.ownKeys(...t))})};var Bi,Gi={},Wi={};var Hi={};!function(e){Object.defineProperty(e,\"__esModule\",{value:!0}),e.wrapIntentHandler=e.BROKER_ERRORS=e.generateOverrideWarning=e.generateOverrideError=e.wrapContextHandler=e.wrapInTryCatch=e.generateId=void 0;e.generateId=()=>`${Math.random()}${Date.now()}`;e.wrapInTryCatch=(e,t)=>(...n)=>{try{return e(...n)}catch(e){throw new Error((t||\"\")+e)}};e.wrapContextHandler=(e,t)=>async n=>{try{await e(n)}catch(e){throw console.error(`Error thrown by handler ${t} for context type ${n.type}: ${e}`),e}};e.generateOverrideError=(e,t)=>`You have tried to to use ${e} but ${t} has not been overridden in the Interop Broker. Please override this function. Refer to our documentation for more info.`;e.generateOverrideWarning=(e,t,n,i)=>{const{uuid:r,name:o}=n;return i?`Entity with identity: ${r}/${o} has called ${i} or ${e} but ${t} has not been overridden.`:`Entity with identity: ${r}/${o} has called ${e} but ${t} has not been overridden.`},e.BROKER_ERRORS={fireIntent:(0,e.generateOverrideError)(\"fireIntent\",\"handleFiredIntent\"),fireIntentForContext:(0,e.generateOverrideError)(\"fireIntentForContext\",\"handleFiredIntentForContext\"),getInfoForIntent:(0,e.generateOverrideError)(\"getInfoForIntent\",\"handleInfoForIntent\"),getInfoForIntentsByContext:(0,e.generateOverrideError)(\"getInfoForIntentsByContext\",\"handleInfoForIntentsByContext\"),joinSessionContextGroupWithJoinContextGroup:\"The Context Group you have tried to join is a Session Context Group. Custom Context Groups can only be defined by the Interop Broker through code or manifest configuration. Please use joinSessionContextGroup.\",fdc3Open:(0,e.generateOverrideError)(\"fdc3.open\",\"fdc3HandleOpen\"),fdc3FindInstances:(0,e.generateOverrideError)(\"fdc3.findInstances\",\"fdc3HandleFindInstances\"),fdc3GetAppMetadata:(0,e.generateOverrideError)(\"fdc3.getAppMetadata\",\"fdc3HandleGetAppMetadata\"),fdc3GetInfo:(0,e.generateOverrideError)(\"fdc3.getInfo\",\"fdc3HandleGetInfo\")};e.wrapIntentHandler=(e,t)=>async n=>{try{return e(n)}catch(e){throw console.error(`Error thrown by handler ${t}: ${e}`),e}}}(Hi);var Ni,Di,Ui={};function Vi(){if(Di)return Gi;Di=1;var e,t,n,r=s&&s.__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},o=s&&s.__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)},a=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Gi,\"__esModule\",{value:!0}),Gi.InteropBroker=void 0;const c=d,h=a(function(){if(Bi)return Wi;Bi=1,Object.defineProperty(Wi,\"__esModule\",{value:!0});const e=Cr();return Wi.default=class{constructor(e,t){this.provider=e,this.id=t,this.lastContext=void 0,this.contextGroupMap=new Map,this.clients=new Map,this.registerListeners()}registerListeners(){this.provider.register(`sessionContextGroup:getContext-${this.id}`,this.getCurrentContext.bind(this)),this.provider.register(`sessionContextGroup:setContext-${this.id}`,this.setContext.bind(this)),this.provider.register(`sessionContextGroup:handlerAdded-${this.id}`,this.handlerAdded.bind(this)),this.provider.register(`sessionContextGroup:handlerRemoved-${this.id}`,this.handlerRemoved.bind(this))}getCurrentContext(e){return e.type?this.contextGroupMap.get(e.type):this.lastContext}setContext(t,n){const{context:i}=t,r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name} not in Session Client State Map`);this.contextGroupMap.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{e.contextHandlers.get(i.type)?.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getClientState(e){return this.clients.get(e.endpointId)}async handlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(i){const e=r.contextHandlers.get(i)||[];r.contextHandlers.set(i,[...e,n]);const o=this.contextGroupMap.get(i);o&&await this.provider.dispatch(t,n,o)}else{r.globalHandler=n;const e=[...this.contextGroupMap.keys()].map((async e=>{const i=this.contextGroupMap.get(e);i&&await this.provider.dispatch(t,n,i)}));await Promise.all(e)}}handlerRemoved(e,t){const{handlerId:n}=e,i=this.clients.get(t.endpointId);i?(Array.from(i.contextHandlers).forEach((([,e])=>{const t=e.indexOf(n);t>-1&&e.splice(t,1)})),i.globalHandler===n&&(i.globalHandler=void 0)):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={contextHandlers:new Map,clientIdentity:e,globalHandler:void 0};this.clients.set(e.endpointId,t)}}onDisconnection(e){this.clients.delete(e.endpointId)}},Wi}()),l=Hi,u=a(i),p=function(){if(Ni)return Ui;Ni=1,Object.defineProperty(Ui,\"__esModule\",{value:!0}),Ui.PrivateChannelProvider=void 0;const e=Vi();return Ui.PrivateChannelProvider=class t{constructor(e,t){this.provider=e,this.id=t,this.clients=new Map,this.registerListeners(),this.contextByContextType=new Map,this.lastContext=void 0,this.provider.onConnection((e=>this.registerNewClient(e))),this.provider.onDisconnection((async e=>{const{endpointId:t}=e;this.clients.has(t)&&await this.handleClientDisconnecting(e),0===(await this.provider.getAllClientInfo()).length&&this.provider.destroy()}))}getClientState(e){return this.clients.get(e.endpointId)}registerListeners(){this.provider.register(\"broadcast\",this.broadcast.bind(this)),this.provider.register(\"getCurrentContext\",this.getCurrentContext.bind(this)),this.provider.register(\"contextHandlerAdded\",this.contextHandlerAdded.bind(this)),this.provider.register(\"contextHandlerRemoved\",this.contextHandlerRemoved.bind(this)),this.provider.register(\"nonStandardHandlerRemoved\",this.nonStandardHandlerRemoved.bind(this)),this.provider.register(\"onAddContextHandlerAdded\",this.onAddContextHandlerAdded.bind(this)),this.provider.register(\"onDisconnectHandlerAdded\",this.onDisconnectHandlerAdded.bind(this)),this.provider.register(\"onUnsubscribeHandlerAdded\",this.onUnsubscribeHandlerAdded.bind(this)),this.provider.register(\"clientDisconnecting\",((e,t)=>{this.handleClientDisconnecting(t)}))}broadcast(t,n){const{context:i}=t;if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name}, tried to call broadcast, is not connected to this Private Channel`);const r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to broadcast - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);this.contextByContextType.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{const t=e.handlerIdsByContextTypes.get(i.type);t&&t.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getCurrentContext(e,t){const{contextType:n}=e;if(!this.getClientState(t))throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call getCurrentContext, is not connected to this Private Channel`);if(void 0!==n){return this.contextByContextType.get(n)||null}return this.lastContext?this.lastContext:null}contextHandlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call addContextListener, is not connected to this Private Channel`);if(i){const e=r.handlerIdsByContextTypes.get(i)||[];r.handlerIdsByContextTypes.set(i,[...e,n])}else r.globalHandler=n;Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&e.onAddContextListenerHandlerId&&this.provider.dispatch(e.clientIdentity,e.onAddContextListenerHandlerId,i)}))}async contextHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);if(i){let e;if(i.globalHandler===n)i.globalHandler=void 0;else for(const[t,r]of i.handlerIdsByContextTypes){const i=r.indexOf(n);i>-1&&(r.splice(i,1),e=t)}const r=(await this.getConnectedClients()).map((async n=>{const{clientIdentity:i,clientIdentity:{endpointId:r},onUnsubscribeHandlerId:o}=n;r!==t.endpointId&&o&&await this.provider.dispatch(i,o,e)}));try{await Promise.all(r)}catch(e){throw console.error(`Problem when attempting to dispatch to onUnsubscribeHandlers. Error: ${e} Removing Client: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}`),new Error(e)}}else console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}.`)}nonStandardHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);i?i.onDisconnectHandlerId===n?i.onDisconnectHandlerId=void 0:i.onAddContextListenerHandlerId===n?i.onAddContextListenerHandlerId=void 0:i.onUnsubscribeHandlerId===n&&(i.onUnsubscribeHandlerId=void 0):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}onAddContextHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onAddContextListener, is not connected to this Private Channel`);n.onAddContextListenerHandlerId=i,Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&Array.from(e.handlerIdsByContextTypes.keys()).forEach((e=>{this.provider.dispatch(t,i,e)}))}))}onDisconnectHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onDisconnect, is not connected to this Private Channel`);n.onDisconnectHandlerId=i}onUnsubscribeHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onUnsubscribe, is not connected to this Private Channel`);n.onUnsubscribeHandlerId=i}removeClient(e){const t=this.getClientState(e);if(!t)throw new Error(`Client with Identity: ${e.uuid} ${e.name}, tried to call disconnect, is not connected to this Private Channel`);t.handlerIdsByContextTypes.clear(),this.clients.delete(e.endpointId)}async fireOnDisconnectForOtherClients(e){const{endpointId:t}=e,n=(await this.getConnectedClients()).map((async e=>{const{clientIdentity:{endpointId:n},onDisconnectHandlerId:i}=e;n!==t&&i&&await this.provider.dispatch(e.clientIdentity,i)}));try{await Promise.all(n)}catch(t){throw console.error(`Problem when attempting to dispatch to onDisconnectHandlers. Error: ${t} Disconnecting Client: uuid: ${e.uuid}. name: ${e.name}. endpointId: ${e.endpointId}`),new Error(t)}}async unsubscribeAll(e){const{endpointId:t}=e,n=this.clients.get(t);if(n){const t=Array.from(n.handlerIdsByContextTypes.values()).flat(),i=n.globalHandler;if(t.length>0){const n=t.map((async t=>this.contextHandlerRemoved({handlerId:t},e)));try{await Promise.all(n)}catch(e){console.error(e.message)}}if(i)try{await this.contextHandlerRemoved({handlerId:i},e)}catch(e){console.error(e.message)}}}async handleClientDisconnecting(e){await this.unsubscribeAll(e),this.removeClient(e),await this.fireOnDisconnectForOtherClients(e)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={clientIdentity:e,handlerIdsByContextTypes:new Map,globalHandler:void 0,onAddContextListenerHandlerId:void 0,onUnsubscribeHandlerId:void 0,onDisconnectHandlerId:void 0};this.clients.set(e.endpointId,t)}}async getConnectedClients(){const e=await this.provider.getAllClientInfo();return Array.from(this.clients.values()).filter((t=>{const{uuid:n,name:i}=t.clientIdentity;return e.some((e=>i===e.name&&n===e.uuid))}))}static init(e,n){return new t(e,n)}},Ui}(),w=G,y=[{id:\"green\",displayMetadata:{color:\"#00CC88\",name:\"green\"}},{id:\"purple\",displayMetadata:{color:\"#8C61FF\",name:\"purple\"}},{id:\"orange\",displayMetadata:{color:\"#FF8C4C\",name:\"orange\"}},{id:\"red\",displayMetadata:{color:\"#FF5E60\",name:\"red\"}},{id:\"pink\",displayMetadata:{color:\"#FF8FB8\",name:\"pink\"}},{id:\"yellow\",displayMetadata:{color:\"#E9FF8F\",name:\"yellow\"}}];let f=class i extends c.Base{constructor(i,s,a){super(i),e.set(this,void 0),t.set(this,void 0),n.set(this,void 0),this.getProvider=()=>o(this,n,\"f\").getValue(),this.interopClients=new Map,this.contextGroupsById=new Map,r(this,t,a.contextGroups??[...y],\"f\"),r(this,e,a.fdc3Info,\"f\"),a?.logging&&(this.logging=a.logging),this.intentClientMap=new Map,this.lastContextMap=new Map,this.sessionContextGroupMap=new Map,r(this,n,new w.Lazy(s),\"f\"),this.setContextGroupMap(),this.setupChannelProvider()}static createClosedConstructor(...e){return class extends i{constructor(...t){if(t.length){const[n,i,r]=t;if(r&&\"object\"==typeof r&&!(0,u.default)(r,e[2]))return console.warn(\"You have modified the parameters of the InteropOverride constructor. This behavior is deprecated and will be removed in a future version. You can modify these options in your manifest. Please consult our Interop docs for guidance on migrating to the new override scheme.\"),void super(e[0],e[1],r);console.warn(\"You are attempting to pass arguments to the InteropOverride constructor. This is not necessary, and these passed arguments will be ignored. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.\")}super(...e)}}}setContext({context:e},t){this.wire.sendAction(\"interop-broker-set-context\").catch((e=>{}));const n=this.getClientState(t);if(!n||!n.contextGroupId)throw n?new Error(\"You must join a context group before you can set context.\"):new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);{const{contextGroupId:t}=n;this.setContextForGroup({context:e},t)}}setContextForGroup({context:e},t){this.wire.sendAction(\"interop-broker-set-context-for-group\").catch((e=>{}));const n=this.contextGroupsById.get(t);if(!n)throw new Error(`Unable to set context for context group that isn't in the context group mapping: ${t}.`);const r=i.checkContextIntegrity(e);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(e)}`);const o=e.type;n.set(o,e),this.lastContextMap.set(t,o);Array.from(this.interopClients.values()).filter((e=>e.contextGroupId===t)).forEach((t=>{for(const[,n]of t.contextHandlers)i.isContextTypeCompatible(o,n.contextType)&&this.invokeContextHandler(t.clientIdentity,n.handlerId,e)}))}getCurrentContext(e,t){this.wire.sendAction(\"interop-broker-get-current-context\").catch((e=>{}));const n=this.getClientState(t);if(!n?.contextGroupId)throw new Error(\"You must be a member of a context group to call getCurrentContext\");const{contextGroupId:i}=n,r=this.contextGroupsById.get(i),o=this.lastContextMap.get(i),s=e?.contextType??o;return r&&s?r.get(s):void 0}async joinContextGroup({contextGroupId:e,target:t},n){if(this.wire.sendAction(\"interop-broker-join-context-group\").catch((e=>{})),this.sessionContextGroupMap.has(e))throw new Error(l.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup);if(t){i.hasEndpointId(t)&&await this.addClientToContextGroup({contextGroupId:e},t);try{const n=this.channel.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name));if(!n.length)throw new Error(`Given Identity ${t.uuid} ${t.name} is not connected to the Interop Broker.`);n.length>1&&console.warn(`More than one connection found for identity ${t.uuid} ${t.name}`);const i=[];for(const t of n)i.push(this.addClientToContextGroup({contextGroupId:e},t));await Promise.all(i)}catch(e){throw new Error(e)}}else await this.addClientToContextGroup({contextGroupId:e},n)}async addClientToContextGroup({contextGroupId:e},t){this.wire.sendAction(\"interop-broker-add-client-to-context-group\").catch((e=>{}));const n=this.getClientState(t);if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(!this.getContextGroups().find((t=>t.id===e)))throw new Error(`Attempting to join a context group that does not exist: ${e}. You may only join existing context groups.`);if(n.contextGroupId!==e){n.contextGroupId=e,await this.setCurrentContextGroupInClientOptions(t,e);const i=this.contextGroupsById.get(e);for(const[,e]of n.contextHandlers){const{contextType:n,handlerId:r}=e;if(void 0===n)i.forEach(((e,n)=>{this.invokeContextHandler(t,r,e)}));else if(i.has(n)){const e=i.get(n);e&&this.invokeContextHandler(t,r,e)}}}}async removeFromContextGroup({target:e},t){if(this.wire.sendAction(\"interop-broker-remove-from-context-group\").catch((e=>{})),e){i.hasEndpointId(e)&&await this.removeClientFromContextGroup(e);try{const t=this.channel.connections.filter((t=>t.uuid===e.uuid&&t.name===e.name));if(!t.length)throw new Error(`No connection found for given Identity ${e.uuid} ${e.name}`);t.length>1&&console.warn(`More than one connection found for identity ${e.uuid} ${e.name}`);const n=[];for(const e of t)n.push(this.removeClientFromContextGroup(e));await Promise.all(n)}catch(e){throw new Error(e)}}else await this.removeClientFromContextGroup(t)}async removeClientFromContextGroup(e){this.wire.sendAction(\"interop-broker-remove-client-from-context-group\").catch((e=>{}));const t=this.getClientState(e);t&&(t.contextGroupId=void 0),await this.setCurrentContextGroupInClientOptions(e,null)}getContextGroups(){return this.wire.sendAction(\"interop-broker-get-context-groups\").catch((e=>{})),o(this,t,\"f\").map((e=>({...e})))}getInfoForContextGroup({contextGroupId:e}){return this.wire.sendAction(\"interop-broker-get-info-for-context-group\").catch((e=>{})),this.getContextGroups().find((t=>t.id===e))}getAllClientsInContextGroup({contextGroupId:e}){this.wire.sendAction(\"interop-broker-get-all-clients-in-context-group\").catch((e=>{}));return Array.from(this.interopClients.values()).filter((t=>t.contextGroupId===e)).map((e=>e.clientIdentity))}async handleFiredIntent(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.raiseIntent\",\"InteropBroker.handleFiredIntent\",t,\"interopClient.fireIntent\");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntent)}async setIntentTarget(e,t){this.wire.sendAction(\"interop-broker-set-intent-target\").catch((e=>{}));const n=this.intentClientMap.get(t.name),i=`intent-handler-${e.name}`;if(n){const t=n.get(i);if(t){if(t.pendingIntents.push(e),t.clientIdentity&&t.isReady){const{clientIdentity:e,pendingIntents:n}=t;try{const r=n[n.length-1];await this.invokeIntentHandler(e,i,r),t.pendingIntents=[]}catch(n){console.error(`Error invoking intent handler for client ${e.uuid}/${e.name}/${e.endpointId}`),t.isReady=!1}}}else n.set(i,{isReady:!1,pendingIntents:[e]})}else{this.intentClientMap.set(t.name,new Map);const n=this.intentClientMap.get(t.name);n&&n.set(i,{isReady:!1,pendingIntents:[e]})}}async handleInfoForIntent(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.findIntent\",\"InteropBroker.handleInfoForIntent\",t,\"interopClient.getInfoForIntent\");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntent)}async handleInfoForIntentsByContext(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.findIntentsByContext\",\"InteropBroker.handleInfoForIntentsByContext\",t,\"interopClient.getInfoForIntentsByContext\");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntentsByContext)}async handleFiredIntentForContext(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.raiseIntentForContext\",\"InteropBroker.handleFiredIntentForContext\",t,\"interopClient.fireIntentForContext\");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntentForContext)}async clientDisconnected(e){}async fdc3HandleOpen({app:e,context:t},n){const i=(0,l.generateOverrideWarning)(\"fdc3.open\",\"InteropBroker.fdc3HandleOpen\",n);throw console.warn(i),new Error(l.BROKER_ERRORS.fdc3Open)}async fdc3HandleFindInstances(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.open\",\"InteropBroker.fdc3HandleFindInstances\",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3FindInstances)}async fdc3HandleGetAppMetadata(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.getAppMetadata\",\"InteropBroker.fdc3HandleGetAppMetadata\",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3GetAppMetadata)}async invokeContextHandler(e,t,n){const i=await this.getProvider();try{await i.dispatch(e,t,n)}catch(i){console.error(`Error invoking context handler ${t} for context type ${n.type} in client ${e.uuid}/${e.name}/${e.endpointId}`,i)}}async invokeIntentHandler(e,t,n){const i=await this.getProvider();await i.dispatch(e,t,n)}async fdc3HandleGetInfo(t,n){const{fdc3Version:i}=t;return{fdc3Version:i,...o(this,e,\"f\"),optionalFeatures:{OriginatingAppMetadata:!1,UserChannelMembershipAPIs:!0},appMetadata:{appId:\"\",instanceId:\"\"}}}async getAllClientInfo(){return(await this.getProvider()).getAllClientInfo()}decorateSnapshot(e){return{...e,interopSnapshotDetails:{contextGroupStates:this.getContextGroupStates()}}}applySnapshot(e,t){const n=e?.interopSnapshotDetails?.contextGroupStates;n&&(t?.closeExistingWindows||this.updateExistingClients(n),this.rehydrateContextGroupStates(n))}updateExistingClients(e){this.interopClients.forEach((t=>{const{clientIdentity:n,contextGroupId:r,contextHandlers:o}=t;if(r){const t=e[r];for(const[,e]of Object.entries(t))o.forEach((t=>{const{handlerId:r,contextType:o}=t;i.isContextTypeCompatible(e.type,o)&&this.invokeContextHandler(n,r,e)}))}}))}getContextGroupStates(){return i.toObject(this.contextGroupsById)}rehydrateContextGroupStates(e){const t=Object.entries(e);for(const[e,n]of t){const t=Object.entries(n);for(const[n,i]of t)if(this.contextGroupsById.has(e)){this.contextGroupsById.get(e).set(n,i)}else console.warn(`Attempting to set a context group that isn't in the context group mapping. Skipping context group rehydration for: ${e}`)}}contextHandlerRegistered({contextType:e,handlerId:t},n){const i={contextType:e,handlerId:t},r=this.getClientState(n);if(r?.contextHandlers.set(t,i),r&&r.contextGroupId){const{contextGroupId:i}=r,o=this.contextGroupsById.get(i);if(void 0===e)o.forEach(((e,i)=>{this.invokeContextHandler(n,t,e)}));else if(o.has(e)){const i=o.get(e);i&&this.invokeContextHandler(n,t,i)}}}async intentHandlerRegistered(e,t){const{handlerId:n}=e,i=this.intentClientMap.get(t.name),r=i?.get(n);if(i)if(r){const{pendingIntents:e}=r;r.clientIdentity=t,r.isReady=!0;try{if(e.length>0){const i=e[e.length-1];await this.invokeIntentHandler(t,n,i),r.pendingIntents=[]}}catch(e){console.error(`Error invoking intent handler: ${n} for client ${t.uuid}/${t.name}/${t.endpointId}`)}}else i.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t});else{this.intentClientMap.set(t.name,new Map);const e=this.intentClientMap.get(t.name);e&&e.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t})}}removeContextHandler({handlerId:e},t){const n=this.getClientState(t);n&&n.contextHandlers.delete(e)}handleJoinSessionContextGroup({sessionContextGroupId:e},t){try{if(!e)throw new Error(\"Failed to join session context group: must specify group id.\");const n=this.sessionContextGroupMap.get(e);if(n)n.registerNewClient(t);else{const n=new h.default(this.channel,e);n.registerNewClient(t),this.sessionContextGroupMap.set(e,n)}return{hasConflict:this.contextGroupsById.has(e)}}catch(e){throw new Error(e)}}getClientState(e){return this.interopClients.get(e.endpointId)}static toObject(e){const t=Object.fromEntries(e),n={};return Object.entries(t).forEach((([e,t])=>{const i=Object.fromEntries(t);n[e]=i})),n}static checkContextIntegrity(e){if(!e)return{isValid:!1,reason:\"No context supplied\"};if(\"object\"!=typeof e)return{isValid:!1,reason:\"Context must be an Object\"};if(!e.type)return{isValid:!1,reason:\"Context must have a type property\"};if(e.id&&\"object\"!=typeof e.id)return{isValid:!1,reason:\"Context id must be an Object populated with key-value identifiers (if set)\"};if(e.id){const{id:t}=e,n=Object.keys(t);let i=!1;if(!n.length)return{isValid:!1,reason:\"Context id must have at least one key-value identifier\"};if(n.forEach((e=>{\"string\"==typeof e&&\"string\"==typeof t[e]||(i=!0)})),i)return{isValid:!1,reason:\"Context id key-value identifiers must be of type string\"}}return e.name&&\"string\"!=typeof e.name?{isValid:!1,reason:\"Context name must be of string type (if set)\"}:{isValid:!0}}static hasEndpointId(e){return void 0!==e.endpointId}static isContextTypeCompatible(e,t){return void 0===t||e===t}setContextGroupMap(){for(const e of this.getContextGroups())this.contextGroupsById.set(e.id,new Map)}async setCurrentContextGroupInClientOptions(e,t){try{const n=await this.fin.System.getEntityInfo(e.uuid,e.name);let i;\"view\"===n.entityType?i=await this.fin.View.wrap(e):\"window\"===n.entityType&&(i=await this.fin.Window.wrap(e)),i&&await i.updateOptions({interop:{currentContextGroup:t}})}catch(e){}}async setupChannelProvider(){try{const e=await this.getProvider();this.channel=e,this.wireChannel(e)}catch(e){throw new Error(`Error setting up Interop Broker Channel Provider: ${e}`)}}wireChannel(e){e.onConnection((async(e,t)=>{if(!await this.isConnectionAuthorized(e,t))throw new Error(`Connection not authorized for ${e.uuid}, ${e.name}`);if(!e.endpointId)throw new Error(\"Version too old to be compatible with Interop. Please upgrade your runtime to a more recent version.\");const n={contextGroupId:void 0,contextHandlers:new Map,clientIdentity:e};t?.currentContextGroup&&this.contextGroupsById.has(t.currentContextGroup)&&(n.contextGroupId=t?.currentContextGroup),this.interopClients.set(e.endpointId,n)})),e.onDisconnection((e=>{this.interopClients.delete(e.endpointId);const t=this.intentClientMap.get(e.name);t&&e.uuid===this.fin.me.uuid&&t.forEach((e=>{e.isReady=!1})),this.sessionContextGroupMap.forEach((t=>{t.onDisconnection(e)})),this.clientDisconnected(e)})),e.beforeAction((async(e,t,n)=>{if(!await this.isActionAuthorized(e,t,n))throw new Error(`Action (${e}) not authorized for ${n.uuid}, ${n.name}`);this.logging?.beforeAction?.enabled&&console.log(e,t,n)})),e.afterAction(((e,t,n)=>{this.logging?.afterAction?.enabled&&console.log(e,t,n)})),e.register(\"setContext\",this.setContext.bind(this)),e.register(\"fireIntent\",this.handleFiredIntent.bind(this)),e.register(\"getCurrentContext\",this.getCurrentContext.bind(this)),e.register(\"getInfoForIntent\",this.handleInfoForIntent.bind(this)),e.register(\"getInfoForIntentsByContext\",this.handleInfoForIntentsByContext.bind(this)),e.register(\"fireIntentForContext\",this.handleFiredIntentForContext.bind(this)),e.register(\"getContextGroups\",this.getContextGroups.bind(this)),e.register(\"joinContextGroup\",this.joinContextGroup.bind(this)),e.register(\"removeFromContextGroup\",this.removeFromContextGroup.bind(this)),e.register(\"getAllClientsInContextGroup\",this.getAllClientsInContextGroup.bind(this)),e.register(\"getInfoForContextGroup\",this.getInfoForContextGroup.bind(this)),e.register(\"contextHandlerRegistered\",this.contextHandlerRegistered.bind(this)),e.register(\"intentHandlerRegistered\",this.intentHandlerRegistered.bind(this)),e.register(\"removeContextHandler\",this.removeContextHandler.bind(this)),e.register(\"sessionContextGroup:createIfNeeded\",this.handleJoinSessionContextGroup.bind(this)),e.register(\"fdc3Open\",this.fdc3HandleOpen.bind(this)),e.register(\"fdc3v2FindIntentsByContext\",this.handleInfoForIntentsByContext.bind(this)),e.register(\"fdc3FindInstances\",this.fdc3HandleFindInstances.bind(this)),e.register(\"fdc3GetAppMetadata\",this.fdc3HandleGetAppMetadata.bind(this)),e.register(\"fdc3v2GetInfo\",(async(e,t)=>this.fdc3HandleGetInfo.bind(this)(e,t))),e.register(\"createPrivateChannelProvider\",(async e=>{const{channelId:t}=e,n=await this.fin.InterApplicationBus.Channel.create(t);p.PrivateChannelProvider.init(n,t)}))}isConnectionAuthorized(e,t){return this.wire.sendAction(\"interop-broker-is-connection-authorized\").catch((e=>{})),Promise.resolve(!0)}isActionAuthorized(e,t,n){return this.wire.sendAction(\"interop-broker-is-action-authorized\").catch((e=>{})),Promise.resolve(!0)}};return Gi.InteropBroker=f,e=new WeakMap,t=new WeakMap,n=new WeakMap,Gi}var zi,Ki={},qi={},Ji=s&&s.__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},Yi=s&&s.__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)};Object.defineProperty(qi,\"__esModule\",{value:!0});const Zi=d,Qi=Hi;class Xi extends Zi.Base{constructor(e,t,n){super(e),zi.set(this,void 0),this.id=n,Ji(this,zi,t,\"f\")}async setContext(e){this.wire.sendAction(\"interop-session-context-group-set-context\").catch((e=>{}));return(await Yi(this,zi,\"f\")).dispatch(`sessionContextGroup:setContext-${this.id}`,{sessionContextGroupId:this.id,context:e})}async getCurrentContext(e){this.wire.sendAction(\"interop-session-context-group-get-context\").catch((e=>{}));return(await Yi(this,zi,\"f\")).dispatch(`sessionContextGroup:getContext-${this.id}`,{sessionContextGroupId:this.id,type:e})}async addContextHandler(e,t){if(this.wire.sendAction(\"interop-session-context-group-add-handler\").catch((e=>{})),\"function\"!=typeof e)throw new Error(\"Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.\");const n=await Yi(this,zi,\"f\");let i;return i=t?`sessionContextHandler:invoke-${this.id}-${t}-${(0,Qi.generateId)()}`:`sessionContextHandler:invoke-${this.id}`,n.register(i,(0,Qi.wrapContextHandler)(e,i)),await n.dispatch(`sessionContextGroup:handlerAdded-${this.id}`,{handlerId:i,contextType:t}),{unsubscribe:await this.createUnsubscribeCb(i)}}async createUnsubscribeCb(e){const t=await Yi(this,zi,\"f\");return async()=>{t.remove(e),await t.dispatch(`sessionContextGroup:handlerRemoved-${this.id}`,{handlerId:e})}}getUserInstance(){return{id:this.id,setContext:(0,Qi.wrapInTryCatch)(this.setContext.bind(this),\"Failed to set context: \"),getCurrentContext:(0,Qi.wrapInTryCatch)(this.getCurrentContext.bind(this),\"Failed to get context: \"),addContextHandler:(0,Qi.wrapInTryCatch)(this.addContextHandler.bind(this),\"Failed to add context handler: \")}}}qi.default=Xi,zi=new WeakMap;var er={},tr={},nr={},ir={},rr=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),or=s&&s.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,\"default\",{enumerable:!0,value:t})}:function(e,t){e.default=t}),sr=s&&s.__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)&&rr(t,e,n);return or(t,e),t};Object.defineProperty(ir,\"__esModule\",{value:!0}),ir.PrivateChannelClient=void 0;const ar=sr(Hi);var cr,dr;function hr(){if(cr)return tr;cr=1;var e,t=s&&s.__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)},n=s&&s.__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},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(tr,\"__esModule\",{value:!0}),tr.FDC3ModuleBase=void 0;const o=nr,a=Hi,c=wr(),d=r(i);return tr.FDC3ModuleBase=class{get client(){return t(this,e,\"f\").call(this)}get fin(){return this.wire.getFin()}constructor(t,i){this.wire=i,e.set(this,void 0),n(this,e,t,\"f\")}async broadcast(e){return this.wire.sendAction(\"fdc3-broadcast\").catch((e=>{})),this.client.setContext(e)}async _open(e,t){this.wire.sendAction(\"fdc3-open\").catch((e=>{}));try{return await c.InteropClient.ferryFdc3Call(this.client,\"fdc3Open\",{app:e,context:t})}catch(e){const t=e.message===a.BROKER_ERRORS.fdc3Open?\"ResolverUnavailable\":e.message;throw new Error(t)}}async _getChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:\"system\",...(0,o.getUnsupportedChannelApis)()})))}async getOrCreateChannel(e){this.wire.sendAction(\"fdc3-get-or-create-channel\").catch((e=>{}));const t=(await this._getChannels()).find((t=>t.id===e));if(t)return{...t,type:\"system\",...(0,o.getUnsupportedChannelApis)()};try{const t=await this.client.joinSessionContextGroup(e);return(0,o.buildAppChannelObject)(t)}catch(e){throw console.error(e.message),new Error(o.ChannelError.CreationFailed)}}async getSystemChannels(){return this.wire.sendAction(\"fdc3-get-system-channels\").catch((e=>{})),this._getChannels()}async joinChannel(e){this.wire.sendAction(\"fdc3-join-channel\").catch((e=>{}));try{return await this.client.joinContextGroup(e)}catch(e){if(e.message===a.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup?console.error(\"The Channel you have tried to join is an App Channel. Custom Channels can only be defined by the Interop Broker through code or manifest configuration. Please use getOrCreateChannel.\"):console.error(e.message),e.message.startsWith(\"Attempting to join a context group that does not exist\"))throw new Error(o.ChannelError.NoChannelFound);throw new Error(o.ChannelError.AccessDenied)}}async getCurrentChannel(){this.wire.sendAction(\"fdc3-get-current-channel\").catch((e=>{}));const e=await this.getCurrentContextGroupInfo();return e?this.buildChannelObject(e):null}async leaveCurrentChannel(){return this.wire.sendAction(\"fdc3-leave-current-channel\").catch((e=>{})),this.client.removeFromContextGroup()}async getCurrentContextGroupInfo(){const e=await this.client.getContextGroups(),t=e.map((async e=>this.client.getAllClientsInContextGroup(e.id))),n=(await Promise.all(t)).findIndex((e=>e.some((e=>{const{uuid:t,name:n}=e;return this.wire.me.uuid===t&&this.wire.me.name===n}))));return e[n]}async buildChannelObject(e){return{...e,type:\"system\",addContextListener:(...[e,t])=>{let n,i;\"function\"==typeof e?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),n=e):(n=t,\"string\"==typeof e&&(i=e));const r=(async()=>{let e=!0;const t=await this.client.getCurrentContext(i);return this.client.addContextHandler(((i,r)=>{if(!e||(e=!1,!(0,d.default)(t,i)))return n(i,r)}),i)})();return{...r,unsubscribe:()=>r.then((e=>e.unsubscribe()))}},broadcast:this.broadcast.bind(this),getCurrentContext:async e=>{const t=await this.client.getCurrentContext(e);return void 0===t?null:t}}}},e=new WeakMap,tr}ir.PrivateChannelClient=class{constructor(e,t){this.id=t,this.client=e,this.listeners=new Map}async broadcast(e){return this.client.dispatch(\"broadcast\",{context:e})}async getCurrentContext(e){return this.client.dispatch(\"getCurrentContext\",{contextType:e})}async addContextListener(e,t){if(\"function\"!=typeof t)throw new Error(\"Non-function argument passed to the second parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.\");let n;n=e?`contextHandler:invoke-${this.id}-${e}-${ar.generateId()}`:`contextHandler:invoke-${this.id}-${ar.generateId()}`,this.client.register(n,ar.wrapContextHandler(t,n));const i={unsubscribe:await this.createContextUnsubscribeCb(n)};return this.listeners.set(n,i),await this.client.dispatch(\"contextHandlerAdded\",{handlerId:n,contextType:e}),i}createNonStandardUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch(\"nonStandardHandlerRemoved\",{handlerId:e})}}createContextUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch(\"contextHandlerRemoved\",{handlerId:e})}}onAddContextListener(e){const t=`onContextHandlerAdded:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch(\"onAddContextHandlerAdded\",{handlerId:t}),n}onDisconnect(e){const t=`onDisconnect:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch(\"onDisconnectHandlerAdded\",{handlerId:t}),n}onUnsubscribe(e){const t=`onUnsubscribe:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch(\"onUnsubscribeHandlerAdded\",{handlerId:t}),n}async cleanUpAllSubs(){Array.from(this.listeners.keys()).forEach((e=>{this.client.remove(e),this.listeners.delete(e)}))}async disconnect(){try{await this.client.dispatch(\"clientDisconnecting\"),await this.cleanUpAllSubs(),await this.client.disconnect()}catch(e){throw new Error(e.message)}}},function(e){var t=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,\"__esModule\",{value:!0}),e.getIntentResolution=e.isChannel=e.isContext=e.connectPrivateChannel=e.buildAppChannelObject=e.buildPrivateChannelObject=e.ChannelError=e.ResultError=e.UnsupportedChannelApiError=e.getUnsupportedChannelApis=void 0;const n=Hi,r=ir,o=t(i);e.getUnsupportedChannelApis=e=>({addContextListener:()=>{throw new a(\"Channel.addContextListener\",e)},broadcast:()=>{throw new a(\"Channel.broadcast\",e)},getCurrentContext:()=>{throw new a(\"Channel.getCurrentContext\",e)}});class a extends Error{constructor(e,t=\"System\"){super(e),this.message=`Calling ${e} on an instance of a ${t} Channel returned by fdc3.get${t}Channels is not supported. If you would like to use a ${t} Channel, please use fdc3.joinChannel, fdc3.addContextListener, and fdc3.broadcast instead.`}}var c,d;e.UnsupportedChannelApiError=a,function(e){e.NoResultReturned=\"NoResultReturned\",e.IntentHandlerRejected=\"IntentHandlerRejected\"}(c=e.ResultError||(e.ResultError={})),(d=e.ChannelError||(e.ChannelError={})).NoChannelFound=\"NoChannelFound\",d.AccessDenied=\"AccessDenied\",d.CreationFailed=\"CreationFailed\";e.buildPrivateChannelObject=e=>{let t=!1;const n=()=>{if(t)throw new Error(\"Private Channel Client has been disconnected from the Private Channel\")};return{id:e.id,type:\"private\",broadcast:async t=>(n(),e.broadcast(t)),getCurrentContext:async t=>(n(),e.getCurrentContext(t)),addContextListener:async(t,i)=>{n();let r=i,o=t;\"function\"==typeof t&&(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),r=t,o=null);return e.addContextListener(o,r)},onAddContextListener:t=>(n(),e.onAddContextListener(t)),disconnect:async()=>(n(),t=!0,e.disconnect()),onDisconnect:t=>(n(),e.onDisconnect(t)),onUnsubscribe:t=>(n(),e.onUnsubscribe(t))}};e.buildAppChannelObject=e=>({id:e.id,type:\"app\",broadcast:e.setContext,getCurrentContext:async t=>{const n=await e.getCurrentContext(t);return void 0===n?null:n},addContextListener:(t,n)=>{let i,r;\"function\"==typeof t?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),i=t):(i=n,\"string\"==typeof t&&(r=t));const s=(async()=>{let t=!0;const n=await e.getCurrentContext(r);return e.addContextHandler(((e,r)=>{if(!t||(t=!1,!(0,o.default)(n,e)))return i(e,r)}),r)})();return{...s,unsubscribe:()=>s.then((e=>e.unsubscribe()))}}});e.connectPrivateChannel=async t=>{try{const n=await fin.InterApplicationBus.Channel.connect(t),i=new r.PrivateChannelClient(n,t);return(0,e.buildPrivateChannelObject)(i)}catch(e){throw new Error(`Private Channel with id: ${t} doesn't exist`)}};e.isContext=e=>{if(e&&\"object\"==typeof e&&\"type\"in e){const{type:t}=e;return\"string\"==typeof t}return!1};e.isChannel=e=>{if(e&&\"object\"==typeof e&&\"type\"in e&&\"id\"in e){const{type:t,id:n}=e;return\"string\"==typeof t&&\"string\"==typeof n&&(\"app\"===t||\"private\"===t)}return!1};e.getIntentResolution=async(t,i,r,o)=>{const s=(0,n.generateId)(),a=new Promise(((e,t)=>{fin.InterApplicationBus.subscribe({uuid:\"*\"},s,(t=>{e(t)})).catch((()=>t(new Error(\"getResult is not supported in this environment\"))))})),d=r?{target:r,intentResolutionResultId:s}:{intentResolutionResultId:s},h=o?{name:o,context:i,metadata:d}:{...i,metadata:d},l=async()=>{let n=await a;if(!n||\"object\"!=typeof n)throw new Error(c.NoResultReturned);const{error:i}=n;if(i)throw new Error(c.IntentHandlerRejected);if((0,e.isChannel)(n)){const{id:i,type:r}=n;switch(r){case\"private\":n=await(0,e.connectPrivateChannel)(i);break;case\"app\":{const r=await t.joinSessionContextGroup(i);n=(0,e.buildAppChannelObject)(r);break}}}else if(!(0,e.isContext)(n))throw new Error(c.NoResultReturned);return n},u=o?await t.fireIntent(h):await t.fireIntentForContext(h);return\"object\"!=typeof u?{source:{appId:\"\",instanceId:\"\"},intent:\"\",version:\"2.0\",getResult:l}:{...u,getResult:l}}}(nr);var lr,ur,pr={};function wr(){if(ur)return Ki;ur=1;var e,t,n=s&&s.__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},i=s&&s.__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)},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ki,\"__esModule\",{value:!0}),Ki.InteropClient=void 0;const o=d,a=r(qi),c=function(){if(dr)return er;dr=1,Object.defineProperty(er,\"__esModule\",{value:!0}),er.Fdc3Module=void 0;const e=Hi,t=hr();class n extends t.FDC3ModuleBase{async open(e,t){await super._open(e,t)}addContextListener(e,t){let n;return this.wire.sendAction(\"fdc3-add-context-listener\").catch((e=>{})),\"function\"==typeof e?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),n=this.client.addContextHandler(e)):n=this.client.addContextHandler(t,null===e?void 0:e),{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}addIntentListener(e,t){this.wire.sendAction(\"fdc3-add-intent-listener\").catch((e=>{}));const n=this.client.registerIntentHandler((e=>{const{context:n,metadata:i}=e,{metadata:r}=n,o=i?.intentResolutionResultId||r?.intentResolutionResultId;o&&this.fin.InterApplicationBus.publish(o,null).catch((()=>null)),t(e.context)}),e,{fdc3Version:\"1.2\"});return{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}async raiseIntent(t,n,i){this.wire.sendAction(\"fdc3-raise-intent\").catch((e=>{}));const r=i?{name:t,context:n,metadata:{target:i}}:{name:t,context:n};try{return await this.client.fireIntent(r)}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntent?\"ResolverUnavailable\":t.message;throw new Error(n)}}async findIntent(t,n){this.wire.sendAction(\"fdc3-find-intent\").catch((e=>{}));try{return await this.client.getInfoForIntent({name:t,context:n})}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntent?\"ResolverUnavailable\":t.message;throw new Error(n)}}async findIntentsByContext(t){this.wire.sendAction(\"fdc3-find-intents-by-context\").catch((e=>{}));try{return await this.client.getInfoForIntentsByContext(t)}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntentsByContext?\"ResolverUnavailable\":t.message;throw new Error(n)}}async raiseIntentForContext(t,n){this.wire.sendAction(\"fdc3-raise-intent-for-context\").catch((e=>{}));try{return await this.client.fireIntentForContext({...t,metadata:{target:n}})}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntentForContext?\"ResolverUnavailable\":t.message;throw new Error(n)}}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}getInfo(){return this.wire.sendAction(\"fdc3-get-info\").catch((e=>{})),{providerVersion:this.wire.environment.getAdapterVersionSync(),provider:`openfin-${this.wire.me.uuid}`,fdc3Version:\"1.2\"}}}return er.Fdc3Module=n,er}(),h=function(){if(lr)return pr;lr=1,Object.defineProperty(pr,\"__esModule\",{value:!0}),pr.Fdc3Module2=void 0;const e=hr(),t=Hi,n=wr(),i=nr,r=ir;class o extends e.FDC3ModuleBase{async open(e,t){return\"string\"==typeof e&&console.warn(\"Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).\"),super._open(e,t)}async findInstances(e){this.wire.sendAction(\"fdc3-find-instances\").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,\"fdc3FindInstances\",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3FindInstances?\"ResolverUnavailable\":e.message;throw new Error(n)}}async getAppMetadata(e){this.wire.sendAction(\"fdc3-get-app-metadata\").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,\"fdc3GetAppMetadata\",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3GetAppMetadata?\"ResolverUnavailable\":e.message;throw new Error(n)}}async addContextListener(e,t){this.wire.sendAction(\"fdc3-add-context-listener\").catch((e=>{}));const n=e=>t=>{const{contextMetadata:n,...i}=t,r=n?[{...i},n]:[t,null];e(...r)};let i=t,r=n(i);return\"function\"==typeof e?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),i=e,r=n(i),this.client.addContextHandler(r)):this.client.addContextHandler(r,null===e?void 0:e)}async findIntent(e,n,i){this.wire.sendAction(\"fdc3-find-intent\").catch((e=>{}));try{return await this.client.getInfoForIntent({name:e,context:n,metadata:{resultType:i}})}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntent?\"ResolverUnavailable\":e.message;throw new Error(n)}}async findIntentsByContext(e,i){this.wire.sendAction(\"fdc3-find-intents-by-context\").catch((e=>{}));const r=i?{context:e,metadata:{resultType:i}}:e;try{return await n.InteropClient.ferryFdc3Call(this.client,\"fdc3v2FindIntentsByContext\",r)}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntentsByContext?\"ResolverUnavailable\":e.message;throw new Error(n)}}async raiseIntent(e,n,r){this.wire.sendAction(\"fdc3-raise-intent\").catch((e=>{}));try{return\"string\"==typeof r&&console.warn(\"Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).\"),(0,i.getIntentResolution)(this.client,n,r,e)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?\"ResolverUnavailable\":e.message;throw new Error(n)}}async raiseIntentForContext(e,n){this.wire.sendAction(\"fdc3-raise-intent-for-context\").catch((e=>{}));try{return\"string\"==typeof n&&console.warn(\"Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).\"),(0,i.getIntentResolution)(this.client,e,n)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?\"ResolverUnavailable\":e.message;throw new Error(n)}}async addIntentListener(e,t){if(this.wire.sendAction(\"fdc3-add-intent-listener\").catch((e=>{})),\"string\"!=typeof e)throw new Error(\"First argument must be an Intent name\");return this.client.registerIntentHandler((async e=>{let n,i;const{context:r,metadata:o}=e,{contextMetadata:s,metadata:a,...c}=r,d=o?.intentResolutionResultId||a?.intentResolutionResultId;try{const e=a?{metadata:a,...c}:{...c};n=await t(e,s),i=n}catch(e){n=e,i={error:!0}}if(d&&this.fin.InterApplicationBus.publish(d,i).catch((()=>null)),n instanceof Error)throw new Error(n.message);return n}),e,{fdc3Version:\"2.0\"})}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}async createPrivateChannel(){const e=(0,t.generateId)();await n.InteropClient.ferryFdc3Call(this.client,\"createPrivateChannelProvider\",{channelId:e});const o=await this.fin.InterApplicationBus.Channel.connect(e),s=new r.PrivateChannelClient(o,e);return(0,i.buildPrivateChannelObject)(s)}async getUserChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:\"user\",...(0,i.getUnsupportedChannelApis)(\"User\")})))}async getSystemChannels(){return console.warn(\"This API has been deprecated. Please use fdc3.getUserChannels instead.\"),super.getSystemChannels()}async joinUserChannel(e){return super.joinChannel(e)}async joinChannel(e){return console.warn(\"This API has been deprecated. Please use fdc3.joinUserChannel instead.\"),super.joinChannel(e)}async getCurrentChannel(){const e=await super.getCurrentChannel();return e?{...e,type:\"user\",broadcast:this.broadcast.bind(this)}:null}async getInfo(){return n.InteropClient.ferryFdc3Call(this.client,\"fdc3v2GetInfo\",{fdc3Version:\"2.0\"})}}return pr.Fdc3Module2=o,pr}(),l=Hi;let u=class extends o.Base{constructor(i,r){super(i),e.set(this,void 0),t.set(this,void 0),n(this,t,new Map,\"f\"),n(this,e,r,\"f\")}async setContext(t){this.wire.sendAction(\"interop-client-set-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"setContext\",{context:t})}async addContextHandler(t,n){if(this.wire.sendAction(\"interop-client-add-context-handler\").catch((e=>{})),\"function\"!=typeof t)throw new Error(\"Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.\");const r=await i(this,e,\"f\");let o;o=n?`invokeContextHandler-${n}-${(0,l.generateId)()}`:\"invokeContextHandler\";const s=(0,l.wrapContextHandler)(t,o);return r.register(o,s),await r.dispatch(\"contextHandlerRegistered\",{handlerId:o,contextType:n}),{unsubscribe:async()=>{r.remove(o),await r.dispatch(\"removeContextHandler\",{handlerId:o})}}}async getContextGroups(){this.wire.sendAction(\"interop-client-get-context-groups\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getContextGroups\")}async joinContextGroup(t,n){this.wire.sendAction(\"interop-client-join-context-group\").catch((e=>{}));const r=await i(this,e,\"f\");if(!t)throw new Error(\"No contextGroupId specified for joinContextGroup.\");return r.dispatch(\"joinContextGroup\",{contextGroupId:t,target:n})}async removeFromContextGroup(t){this.wire.sendAction(\"interop-client-remove-from-context-group\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"removeFromContextGroup\",{target:t})}async getAllClientsInContextGroup(t){this.wire.sendAction(\"interop-client-get-all-clients-in-context-group\").catch((e=>{}));const n=await i(this,e,\"f\");if(!t)throw new Error(\"No contextGroupId specified for getAllClientsInContextGroup.\");return n.dispatch(\"getAllClientsInContextGroup\",{contextGroupId:t})}async getInfoForContextGroup(t){this.wire.sendAction(\"interop-client-get-info-for-context-group\").catch((e=>{}));const n=await i(this,e,\"f\");if(!t)throw new Error(\"No contextGroupId specified for getInfoForContextGroup.\");return n.dispatch(\"getInfoForContextGroup\",{contextGroupId:t})}async fireIntent(t){this.wire.sendAction(\"interop-client-fire-intent\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"fireIntent\",t)}async registerIntentHandler(t,n,r){this.wire.sendAction(\"interop-client-register-intent-handler\").catch((e=>{}));const o=await i(this,e,\"f\"),s=`intent-handler-${n}`,a=(0,l.wrapIntentHandler)(t,s);try{await o.register(s,a),await o.dispatch(\"intentHandlerRegistered\",{handlerId:s,...r})}catch(e){throw new Error(\"Unable to register intent handler\")}return{unsubscribe:async()=>{o.remove(s)}}}async getCurrentContext(t){this.wire.sendAction(\"interop-client-get-current-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getCurrentContext\",{contextType:t})}async getInfoForIntent(t){this.wire.sendAction(\"interop-client-get-info-for-intent\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getInfoForIntent\",t)}async getInfoForIntentsByContext(t){this.wire.sendAction(\"interop-client-get-info-for-intents-by-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getInfoForIntentsByContext\",t)}async fireIntentForContext(t){this.wire.sendAction(\"interop-client-fire-intent-for-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"fireIntentForContext\",t)}async joinSessionContextGroup(n){try{const r=i(this,t,\"f\").get(n);if(r)return r.getUserInstance();const o=await i(this,e,\"f\"),{hasConflict:s}=await o.dispatch(\"sessionContextGroup:createIfNeeded\",{sessionContextGroupId:n});s&&console.warn(`A (non-session) context group with the name \"${n}\" already exists. If you are trying to join a Context Group, call joinContextGroup instead.`);const c=new a.default(this.wire,i(this,e,\"f\"),n);return i(this,t,\"f\").set(n,c),c.getUserInstance()}catch(e){throw console.error(`Error thrown trying to create Session Context Group with id \"${n}\": ${e}`),e}}async onDisconnection(t){this.wire.sendAction(\"interop-client-add-ondisconnection-listener\").catch((e=>{}));return(await i(this,e,\"f\")).onDisconnection((e=>{const{uuid:n}=e;t({type:\"interop-broker\",topic:\"disconnected\",brokerName:n})}))}getFDC3Sync(e){switch(e){case\"1.2\":return new c.Fdc3Module((()=>this),this.wire);case\"2.0\":return new h.Fdc3Module2((()=>this),this.wire);default:throw new Error(`Invalid FDC3 version provided: ${e}. Must be '1.2' or '2.0'`)}}async getFDC3(e){return this.getFDC3Sync(e)}static async ferryFdc3Call(t,n,r){return(await i(t,e,\"f\")).dispatch(n,r||null)}};return Ki.InteropClient=u,e=new WeakMap,t=new WeakMap,Ki}var yr,fr,gr,mr={};function vr(){if(yr)return mr;yr=1,Object.defineProperty(mr,\"__esModule\",{value:!0}),mr.overrideCheck=mr.checkFDC32Overrides=mr.getDefaultViewFdc3VersionFromAppInfo=void 0;const e=Vi();function t(t){return[\"fdc3HandleFindInstances\",\"handleInfoForIntent\",\"handleInfoForIntentsByContext\",\"fdc3HandleGetAppMetadata\",\"fdc3HandleGetInfo\",\"fdc3HandleOpen\",\"handleFiredIntent\",\"handleFiredIntentForContext\"].filter((n=>t[n]===e.InteropBroker.prototype[n]))}return mr.getDefaultViewFdc3VersionFromAppInfo=function({manifest:e,initialOptions:t}){const n=e?.platform?.defaultViewOptions?.fdc3InteropApi??t.defaultViewOptions?.fdc3InteropApi;return[\"1.2\",\"2.0\"].includes(n??\"\")?n:void 0},mr.checkFDC32Overrides=t,mr.overrideCheck=function(e,n){if(n&&\"2.0\"===n){const n=t(e);n.length>0&&console.warn(`WARNING: FDC3 2.0 has been set as a default option for Views in this Platform, but the required InteropBroker APIs for FDC3 2.0 compliance have not all been overridden.\\nThe following APIs need to be overridden:\\n${n.join(\"\\n\")}`)}},mr}function Cr(){return gr||(gr=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),i=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),i(function(){if(fr)return Ti;fr=1;var e=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ti,\"__esModule\",{value:!0}),Ti.InteropModule=void 0;const t=e(n),i=$i,r=d,o=Vi(),a=wr(),c=vr(),h=Tn,l=e=>new e,u=\"You have attempted to use or modify InteropBroker parameters, which is not allowed. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.\";class p extends r.Base{async init(e,n=l){this.wire.sendAction(\"interop-init\").catch((()=>{}));const r=await this.wire.environment.getInteropInfo(this.wire.getFin()),s=(0,i.createUnusableObject)(u),a=(0,i.createWarningObject)(u,(0,t.default)(r)),d=async()=>{throw new Error(u)},p=o.InteropBroker.createClosedConstructor(this.wire,(()=>this.fin.InterApplicationBus.Channel.create(`interop-broker-${e}`)),r);let w;return w=Array.isArray(n)?new((0,h.overrideFromComposables)(...n)(p))(s,d,a):await n(p,s,d,a),(0,c.overrideCheck)(w,r.fdc3Version),w}connectSync(e,t){return this.wire.sendAction(\"interop-connect-sync\").catch((()=>{})),new a.InteropClient(this.wire,this.wire.environment.whenReady().then((()=>this.fin.InterApplicationBus.Channel.connect(`interop-broker-${e}`,{payload:t}))))}}return Ti.InteropModule=p,Ti}(),e),i(wr(),e),i(Vi(),e)}(Li)),Li}var br={},Ir={},Er={},xr={};Object.defineProperty(xr,\"__esModule\",{value:!0}),xr.getSnapshotSourceChannelName=void 0;xr.getSnapshotSourceChannelName=e=>`snapshot-source-provider-${e.uuid}`;var Ar,Pr,Mr,_r,Or,Sr=s&&s.__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},Rr=s&&s.__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)};Object.defineProperty(Er,\"__esModule\",{value:!0}),Er.SnapshotSource=void 0;const Fr=d,jr=xr,kr=new Map;class Lr extends Fr.Base{constructor(e,t){super(e),Ar.set(this,void 0),Pr.set(this,(()=>(kr.has(this.identity.uuid)||kr.set(this.identity.uuid,{eventFired:null,clientPromise:null}),kr.get(this.identity.uuid)))),Mr.set(this,(()=>(Rr(this,Pr,\"f\").call(this).clientPromise||(Rr(this,Pr,\"f\").call(this).clientPromise=Rr(this,_r,\"f\").call(this)),Rr(this,Pr,\"f\").call(this).clientPromise))),_r.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);try{Rr(this,Pr,\"f\").call(this).eventFired||await Rr(this,Or,\"f\").call(this);const t=await this.fin.InterApplicationBus.Channel.connect(e,{wait:!1});return t.onDisconnection((()=>{Rr(this,Pr,\"f\").call(this).clientPromise=null,Rr(this,Pr,\"f\").call(this).eventFired=null})),t}catch(e){throw Rr(this,Pr,\"f\").call(this).clientPromise=null,new Error(\"The targeted SnapshotSource is not currently initialized. Await this object's ready() method.\")}})),Or.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);let t,n;const i=new Promise(((e,i)=>{t=e,n=i}));Rr(this,Pr,\"f\").call(this).eventFired=i;const r=async i=>{try{i.channelName===e&&(t(),await this.fin.InterApplicationBus.Channel.removeListener(\"connected\",r))}catch(e){n(e)}};await this.fin.InterApplicationBus.Channel.on(\"connected\",r)})),Sr(this,Ar,t,\"f\")}get identity(){return Rr(this,Ar,\"f\")}async ready(){this.wire.sendAction(\"snapshot-source-ready\").catch((e=>{}));try{await Rr(this,Mr,\"f\").call(this)}catch(e){await Rr(this,Pr,\"f\").call(this).eventFired}}async getSnapshot(){this.wire.sendAction(\"snapshot-source-get-snapshot\").catch((e=>{}));const e=await Rr(this,Mr,\"f\").call(this),t=await e.dispatch(\"get-snapshot\");return(await t).snapshot}async applySnapshot(e){this.wire.sendAction(\"snapshot-source-apply-snapshot\").catch((e=>{}));return(await Rr(this,Mr,\"f\").call(this)).dispatch(\"apply-snapshot\",{snapshot:e})}}Er.SnapshotSource=Lr,Ar=new WeakMap,Pr=new WeakMap,Mr=new WeakMap,_r=new WeakMap,Or=new WeakMap,Object.defineProperty(Ir,\"__esModule\",{value:!0}),Ir.SnapshotSourceModule=void 0;const Tr=d,$r=Er,Br=xr;class Gr extends Tr.Base{async init(e){if(this.wire.sendAction(\"snapshot-source-init\").catch((e=>{})),\"object\"!=typeof e||\"function\"!=typeof e.getSnapshot||\"function\"!=typeof e.applySnapshot)throw new Error(\"you must pass in a valid SnapshotProvider\");const t=await this.fin.InterApplicationBus.Channel.create((0,Br.getSnapshotSourceChannelName)(this.fin.me));t.register(\"get-snapshot\",(async()=>({snapshot:await e.getSnapshot()}))),t.register(\"apply-snapshot\",(({snapshot:t})=>e.applySnapshot(t)))}wrapSync(e){return this.wire.sendAction(\"snapshot-source-wrap-sync\").catch((e=>{})),new $r.SnapshotSource(this.wire,e)}async wrap(e){return this.wire.sendAction(\"snapshot-source-wrap\").catch((e=>{})),this.wrapSync(e)}}Ir.SnapshotSourceModule=Gr,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Ir,e),n(Er,e)}(br),Object.defineProperty(a,\"__esModule\",{value:!0});var Wr=a.Fin=void 0;const Hr=t,Nr=c,Dr=ie(),Ur=Z(),Vr=de,zr=en,Kr=rn,qr=un,Jr=bn,Yr=J(),Zr=An,Qr=ki,Xr=Cr(),eo=br;class to extends Hr.EventEmitter{constructor(e){super(),this.wire=e,this.System=new Nr.System(e),this.Window=new Dr._WindowModule(e),this.Application=new Ur.ApplicationModule(e),this.InterApplicationBus=new Vr.InterApplicationBus(e),this.Clipboard=new zr.Clipboard(e),this.ExternalApplication=new Kr.ExternalApplicationModule(e),this.Frame=new qr._FrameModule(e),this.GlobalHotkey=new Jr.GlobalHotkey(e),this.Platform=new Zr.PlatformModule(e,this.InterApplicationBus.Channel),this.View=new Yr.ViewModule(e),this.Interop=new Xr.InteropModule(e),this.SnapshotSource=new eo.SnapshotSourceModule(e),e.registerFin(this),this.me=(0,Qr.getMe)(e),e.on(\"disconnected\",(()=>{this.emit(\"disconnected\")}))}}Wr=a.Fin=to;var no={},io={};function ro(e){return\"string\"==typeof e.manifestUrl}function oo(e){return ao(e)&&\"string\"==typeof e.address}function so(e){return oo(e)&&\"string\"==typeof e.token}function ao(e){return\"string\"==typeof e.uuid}function co(e){return e.runtime&&\"string\"==typeof e.runtime.version}function ho(e){return ao(e)&&co(e)}Object.defineProperty(io,\"__esModule\",{value:!0}),io.isInternalConnectConfig=io.isPortDiscoveryConfig=io.isNewConnectConfig=io.isConfigWithReceiver=io.isRemoteConfig=io.isExistingConnectConfig=io.isExternalConfig=void 0,io.isExternalConfig=ro,io.isExistingConnectConfig=oo,io.isRemoteConfig=so,io.isConfigWithReceiver=function(e){return\"object\"==typeof e.receiver&&so({...e,address:\"\"})},io.isNewConnectConfig=ho,io.isPortDiscoveryConfig=function(e){return ro(e)&&co(e)||ho(e)},io.isInternalConnectConfig=function(e){return oo(e)||ho(e)};var lo={},uo={};Object.defineProperty(uo,\"__esModule\",{value:!0}),uo.EmitterMap=void 0;const po=t;function wo(e){return Buffer.from(e).toString(\"base64\")}uo.EmitterMap=class{constructor(){this.storage=new Map}hashKeys(e){return e.map(wo).join(\"/\")}getOrCreate(e){const t=this.hashKeys(e);return this.storage.has(t)||this.storage.set(t,new po.EventEmitter),this.storage.get(t)}has(e){return this.storage.has(this.hashKeys(e))}delete(e){const t=this.hashKeys(e);return this.storage.delete(t)}},Object.defineProperty(lo,\"__esModule\",{value:!0});const yo=uo;class fo extends yo.EmitterMap{constructor(){super(...arguments),this.dispatchEvent=e=>{if(function(e){return\"process-desktop-event\"===e.action}(e)){const{payload:t}=e,n=function(e){const{topic:t}=e;if(\"frame\"===t||\"window\"===t||\"view\"===t){const{uuid:n,name:i}=e;return[t,n,i]}if(\"application\"===t){const{uuid:n}=e;return[t,n]}return[t]}(t);if(this.has(n))return this.getOrCreate(n).emit(t.type,t),!0}return!1}}}lo.default=fo;var go,mo,vo=s&&s.__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},Co=s&&s.__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)},bo=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(no,\"__esModule\",{value:!0});var Io=no.Transport=void 0;const Eo=t,xo=io,Ao=g,Po=bo(lo),Mo=ki,_o=ke;class Oo extends Eo.EventEmitter{constructor(e,t,n){super(),this.wireListeners=new Map,this.topicRefMap=new Map,this.eventAggregator=new Po.default,this.messageHandlers=[this.eventAggregator.dispatchEvent],go.set(this,void 0),mo.set(this,void 0),this.connectSync=()=>{Co(this,go,\"f\").connectSync()},this.getPort=()=>Co(this,go,\"f\").getPort(),vo(this,go,new e(this.onmessage.bind(this)),\"f\"),this.environment=t,this.sendRaw=Co(this,go,\"f\").send.bind(Co(this,go,\"f\")),this.registerMessageHandler(this.handleMessage.bind(this)),Co(this,go,\"f\").on(\"disconnected\",(()=>{for(const[,{handleNack:e}]of this.wireListeners)e({reason:\"Remote connection has closed\"});this.wireListeners.clear(),this.emit(\"disconnected\")}));const{uuid:i,name:r}=n,o=this.environment.getCurrentEntityType();this.me=(0,Mo.getBaseMe)(o,i,r)}getFin(){if(!Co(this,mo,\"f\"))throw new Error(\"No Fin object registered for this transport\");return Co(this,mo,\"f\")}registerFin(e){if(Co(this,mo,\"f\"))throw new Error(\"Fin object has already been registered for this transport\");vo(this,mo,e,\"f\")}shutdown(){return Co(this,go,\"f\").shutdown()}async connect(e){if((0,xo.isConfigWithReceiver)(e))return await Co(this,go,\"f\").connect(e.receiver),this.authorize(e);if((0,xo.isRemoteConfig)(e))return this.connectRemote(e);if((0,xo.isExistingConnectConfig)(e))return this.connectByPort(e);if((0,xo.isNewConnectConfig)(e)){const t=await this.environment.retrievePort(e);return this.connectByPort({...e,address:`ws://localhost:${t}`})}}async connectRemote(e){return await Co(this,go,\"f\").connect(new(this.environment.getWsConstructor())(e.address)),this.authorize(e)}async connectByPort(e){const{address:t,uuid:n}=e,i={...e,type:\"file-token\"},r=Co(this,go,\"f\");await r.connect(new(this.environment.getWsConstructor())(e.address));const o=await this.sendAction(\"request-external-authorization\",{uuid:n,type:\"file-token\"},!0);if(\"external-authorization-response\"!==o.action)throw new Ao.UnexpectedActionError(o.action);return await this.environment.writeToken(o.payload.file,o.payload.token),this.authorize(i)}async authorize(e){const t=await this.sendAction(\"request-authorization\",e,!0);if(\"authorization-response\"!==t.action)throw new Ao.UnexpectedActionError(t.action);if(!0!==t.payload.success)throw new Ao.RuntimeError(t.payload)}sendAction(e,t={},n=!1){let i=()=>{};const r=Ao.RuntimeError.getCallSite(1),o=this.environment.getNextMessageId(),s=new Promise(((s,a)=>{i=a;const c={action:e,payload:t,messageId:o},d=Co(this,go,\"f\");return this.addWireListener(o,s,(e=>this.nackHandler(e,a,r)),n),d.send(c).catch(a)}));return Object.assign(s,{cancel:i,messageId:o})}nackHandler(e,t,n){t(\"string\"==typeof e?e:new Ao.RuntimeError(e,n))}ferryAction(e){return new Promise(((t,n)=>{const i=this.environment.getNextMessageId();e.messageId=i;const r=e=>{t(e.payload)};return Co(this,go,\"f\").send(e).then((()=>this.addWireListener(i,r,(e=>this.nackHandler(e,n)),!1))).catch(n)}))}registerMessageHandler(e){this.messageHandlers.push(e)}addWireListener(e,t,n,i){i?this.uncorrelatedListener=t:this.wireListeners.has(e)?n({reason:\"Duplicate handler id\",error:(0,_o.errorToPOJO)(new Ao.DuplicateCorrelationError(String(e)))}):this.wireListeners.set(e,{resolve:t,handleNack:n})}onmessage(e){for(const t of this.messageHandlers)t.call(null,e)}handleMessage(e){const t=e.correlationId||NaN;if(\"correlationId\"in e){if(!this.wireListeners.has(t))return!1;{const{resolve:n,handleNack:i}=this.wireListeners.get(t);\"ack\"!==e.action?i({reason:\"Did not receive ack action\",error:(0,_o.errorToPOJO)(new Ao.NoAckError(e.action))}):\"payload\"in e?e.payload.success?n.call(null,e):i(e.payload):\"string\"==typeof e.reason?i(e):(console.warn(\"Received invalid response from core\",e),i({reason:\"invalid response shape\"})),this.wireListeners.delete(t)}}else this.uncorrelatedListener&&this.uncorrelatedListener.call(null,e),this.uncorrelatedListener=()=>{};return!0}}Io=no.Transport=Oo,go=new WeakMap,mo=new WeakMap;const So=(...e)=>({log:(...t)=>console.debug(`[${(new Date).toISOString()}]`,...(e=>e.map((e=>`[${e}]`)))(e),...t),getLogger:(...t)=>So(...e,...t)}),Ro=So(\"@openfin/core-web/client\");function Fo(e,t){if(!function(e){return\"string\"==typeof e}(e))throw new Error(`Property ${t} has invalid type. Expected string, got ${typeof e}.`)}const jo=\"web-broker-ports-ready\",ko=Ro.getLogger(\"get-web-interop-ports\");function Lo(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)}function To(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}\"function\"==typeof SuppressedError&&SuppressedError;const $o=e=>{var n,i,r;return r=class extends t.EventEmitter{constructor(t){super(),n.set(this,void 0),i.set(this,!1),this.connectSync=()=>{Lo(this,i,\"f\")||(e.addEventListener(\"message\",(e=>{e.data?.topic?.startsWith(\"wire-message\")&&e.data.message&&Lo(this,n,\"f\").call(this,{...JSON.parse(e.data.message),ports:e.ports})})),e.start())},this.connect=async()=>{this.connectSync()},this.send=t=>(e.postMessage({topic:\"wire-message\",message:JSON.stringify(t)}),Promise.resolve()),this.shutdown=async()=>{e.close()},To(this,n,t,\"f\")}getPort(){return e}},n=new WeakMap,i=new WeakMap,r};var Bo={},Go={};Object.defineProperty(Go,\"__esModule\",{value:!0}),Go.BaseEnvironment=void 0;const Wo=vr();Go.BaseEnvironment=class{async getViewWindowIdentity(e,t){const{identity:n}=await e.View.wrapSync(t).getCurrentWindow();return n}async getInteropInfo(e){const t=await e.Application.getCurrentSync().getInfo().catch((()=>null)),n=t?.initialOptions?.interopBrokerConfiguration??{};return{fdc3Version:t?(0,Wo.getDefaultViewFdc3VersionFromAppInfo)(t):void 0,...n,fdc3Info:{providerVersion:await e.System.getVersion(),provider:\"OpenFin\"}}}},Object.defineProperty(Bo,\"__esModule\",{value:!0});var Ho=Bo.BrowserEnvironment=void 0;const No=Go;class Do extends No.BaseEnvironment{constructor(){super(...arguments),this.type=\"other\",this.getRandomId=()=>{const e=new Uint32Array(1);return window.crypto.getRandomValues(e)[0].toString(32)}}getAdapterVersionSync(){return\"\"}observeBounds(e,t){throw new Error(\"Method not implemented.\")}layoutAllowedInContext(e){return!1}initLayoutManager(e,t,n){throw new Error(\"Method not implemented.\")}applyLayoutSnapshot(e,t,n){throw new Error(\"Method not implemented.\")}createLayout(e,t){throw new Error(\"Method not implemented.\")}destroyLayout(e,t){throw new Error(\"Method not implemented.\")}resolveLayout(e,t){throw new Error(\"Method not implemented.\")}initPlatform(...e){throw new Error(\"Method not implemented.\")}writeToken(e,t){return Promise.resolve(\"\")}retrievePort(e){throw new Error(\"Method not implemented.\")}getNextMessageId(){return this.getRandomId()}createChildContent(e){throw new Error(\"Method not implemented.\")}getWebWindow(e){throw new Error(\"Method not implemented.\")}getCurrentEntityIdentity(){throw new Error(\"Method not implemented.\")}getCurrentEntityType(){return\"external connection\"}raiseEvent(e,t){throw new Error(\"Method not implemented.\")}getUrl(){return location.href}getDefaultChannelOptions(){return{create:{},connect:{}}}getRtcPeer(){return new RTCPeerConnection}getWsConstructor(){return WebSocket}whenReady(){return Promise.resolve()}}Ho=Bo.BrowserEnvironment=Do;const Uo=e=>\"platform\"in e&&void 0!==e.platform;var Vo,zo;class Ko extends Ho{constructor(e){super(),this.connectConfig=e,Vo.set(this,void 0),zo.set(this,new W((async()=>Promise.resolve().then((function(){return require(\"./main-b14f67c9.js\")}))))),Uo(e)&&this.validatePlatformOptions(e)}getAdapterVersionSync(){return\"0.39.21\"}validatePlatformOptions({platform:e}){if(!(\"layoutSnapshot\"in e))throw new Error(\"Platform options are missing layoutSnapshot. Please provide a layoutSnapshot in the platform options.\");if(\"windows\"in e||\"windows\"in e.layoutSnapshot)throw new Error(\"It appears you tried to call connect() with a snapshot object from an OpenFin desktop environment. Note that connect() expects to be called with a platform property with this structure: { platform: { layoutSnapshot } }. To get a layoutSnapshot of the expected structure, use fin.Platform.Layout.getCurrentLayoutManagerSync().getLayoutSnapshot() in v34+ in your desktop environment.\");const{layouts:t}=e.layoutSnapshot;Object.entries(t).map((([e,t])=>{if(\"object\"!=typeof t||null===t)throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must be an object.`);if(!(\"content\"in t))throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must contain a 'content' property.`)}))}async getInteropInfo(e){return{...{contextGroups:void 0,logging:{beforeAction:{enabled:!1},afterAction:{enabled:!1}}},fdc3Version:void 0,fdc3Info:{providerVersion:\"0.39.21\",provider:\"OpenFin Web\"}}}layoutAllowedInContext(e){return!0}async initLayoutManager(e,t,n){if(Lo(this,Vo,\"f\"))throw new Error(\"Layout already initialized.\");if(!Uo(this.connectConfig))throw new Error(\"Platform options are missing from connection config.\");const{WebLayoutEntryPoint:i}=await Lo(this,zo,\"f\").getValue();return To(this,Vo,new i(this.connectConfig),\"f\"),await Lo(this,Vo,\"f\").initLayoutManager(e,t,n)}async applyLayoutSnapshot(e,t,n){Lo(this,Vo,\"f\")?.applyLayoutSnapshot(e,t,n)}async createLayout(e,t){return Lo(this,Vo,\"f\")?.createLayout(e,t)}async destroyLayout(e,t){return Lo(this,Vo,\"f\")?.destroyLayout(e,t)}async getViewWindowIdentity(e,t){return Promise.resolve({uuid:t.uuid,name:t.uuid})}}Vo=new WeakMap,zo=new WeakMap;const qo=()=>{const e=((e,t)=>{const n=new RegExp(`^${t}<(?.*)>$`).exec(e)?.groups?.meta;if(n)try{return JSON.parse(atob(n))}catch(e){throw new Error(`Failed to decode JSON from ${n}.`)}})(window.name,\"of-frame\");if(e)try{const{name:t,uuid:n,brokerUrl:i,providerId:r,contextGroup:o}=e;return Fo(i,\"brokerUrl\"),Fo(n,\"uuid\"),Fo(t,\"name\"),{identity:{name:t,uuid:n},brokerUrl:i,interopConfig:{providerId:r,currentContextGroup:o}}}catch(e){throw new Error(`Unexpected error occurred when inferring platform information: ${e.stack}`)}},Jo=()=>{const e=r.v4();return{uuid:e,name:e}},Yo=async e=>{if(\"enabled\"===e.connectionInheritance){const t=await(async e=>{const t=qo();if(t){const{validateOptions:n=(()=>!0)}=e,{identity:i,...r}=t;if(!await n(r))throw new Error(\"Parent options were rejected by validateOptions.\");return t}})(e);if(t)return t}if(!e.options){const t=\"enabled\"===e.connectionInheritance?\"Broker URL was not specified nor provided by a platform container.\":\"Connection inheritance is disabled but no options were provided.\";throw new Error(t)}return{...e.options,identity:Jo()}};exports.__classPrivateFieldGet=Lo,exports.__classPrivateFieldSet=To,exports.apiExposer=Gn,exports.commonjsGlobal=s,exports.connect=async t=>{try{Ro.log(\"Establishing connection\",t);const{brokerUrl:n,identity:i,timeout:r,interopConfig:s}=await Yo(t),{workerPort:a,iframeBrokerPort:c}=await(async(e,t,n)=>{const{origin:i}=new URL(e),r=document.createElement(\"IFRAME\");let s;r.style.display=\"none\";try{return await new Promise(((a,c)=>{const d=e=>{if(e.source===r.contentWindow&&e.data?.topic===`ack-${jo}`){if(e.origin!==i)c(new Error(`Broker redirected to unexpected origin ${e.origin}, expected ${i}.`));else if(e.data.success){const[t,n]=e.ports;a({iframeBrokerPort:t,workerPort:n})}else c(new m(e.data));window.removeEventListener(\"message\",d),clearTimeout(s)}};window.addEventListener(\"message\",d),ko.log(`Connecting to broker ${e}`),r.setAttribute(\"src\",e),r.setAttribute(\"name\",o(t,\"of-broker\")),document.body.appendChild(r),ko.log(\"Iframe loaded, awaiting init message from iframe\"),n&&(s=setTimeout((()=>{window.removeEventListener(\"message\",d),document.body.removeChild(r),c(new Error(\"Worker did not initialize in time\"))}),n))}))}catch(e){throw new Error(`Failed to initialise Fin Web Client. ${e.message}`,{cause:e})}})(n,i,r);Ro.log(\"Successfully established connection to shared worker\");const d={entityType:\"external connection\",...i};a.start(),c.start();const h=((t,n,i)=>{const r=$o(n),o=new Ko(t),s=new Io(r,o,i);return s.connectSync(),window.Buffer=e.Buffer,new Wr(s)})(t,a,d);return s?.providerId&&(h.me.interop=h.Interop.connectSync(s.providerId),s?.currentContextGroup&&h.me.interop.joinContextGroup(s.currentContextGroup).catch((e=>{console.warn(`Error joining specified context group: ${s?.currentContextGroup}, continuing`,e)}))),{...h,me:{...h.me,identity:{uuid:h.me.uuid,name:h.me.name}}}}catch(e){throw new Error(`An error occured during web-interop connection: ${e.message}`)}},exports.decorators=Nn,exports.encodeOptions=o,exports.layout_constants=ai,exports.lazy=G;\n","\"use strict\";var t=require(\"./main-8cad4070.js\"),e=require(\"uuid\");require(\"buffer/\"),require(\"events\"),require(\"lodash/cloneDeep\"),require(\"lodash/isEqual\");var i={},n={};Object.defineProperty(n,\"__esModule\",{value:!0}),n.mapValuesAsync=n.mapEntriesAsync=void 0;const o=(t,[e,i])=>({...t,[e]:i});async function s(t,e){return(await Promise.all(e.map((async([e,i])=>[e,await t(i,e)])))).reduce(o,{})}n.mapEntriesAsync=s,n.mapValuesAsync=async function(t,e){let i;return i=e instanceof Map?[...e.entries()]:Object.entries(e),s(t,i)};var r,a,l,h,d=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldSet||function(t,e,i,n,o){if(\"m\"===n)throw new TypeError(\"Private method is not writable\");if(\"a\"===n&&!o)throw new TypeError(\"Private accessor was defined without a setter\");if(\"function\"==typeof e?t!==e||!o:!e.has(t))throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");return\"a\"===n?o.call(t,i):o?o.value=i:e.set(t,i),i},c=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldGet||function(t,e,i,n){if(\"a\"===i&&!n)throw new TypeError(\"Private accessor was defined without a getter\");if(\"function\"==typeof e?t!==e||!n:!e.has(t))throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");return\"m\"===i?n:\"a\"===i?n.call(t):n?n.value:e.get(t)};Object.defineProperty(i,\"__esModule\",{value:!0});var m=i.DefaultLayoutManager=void 0;const u=n;class p{constructor(t){a.set(this,void 0),l.set(this,new Map),d(this,a,t,\"f\")}size(){return c(this,l,\"f\").size}async applyLayoutSnapshot({layouts:t}){if(Object.keys(t).length>1)throw new Error(\"[LayoutManager] Tried to call applyLayoutSnapshot with more than 1 layout. When implementing multiple layouts via overridden LayoutManager class, you must override and fully implement the applyLayoutSnapshot method without calling super.applyLayoutSnapshot().\");const[[e,i]]=Object.entries(t);await p.createLayout(this,{layoutName:e,layout:i})}async showLayout({layoutName:t}){}async getLayoutSnapshot(){return{layouts:await(0,u.mapValuesAsync)((t=>t.getFrameSnapshot()),c(this,l,\"f\"))}}async removeLayout({layoutName:t}){}getLayoutIdentityForView(t){const e=[...c(this,l,\"f\").values()].find((e=>e.getCurrentViews().some((e=>e.name===t.name&&e.uuid===t.uuid))));return e?.identity??void 0}isLayoutVisible({layoutName:t}){return c(p,r,\"m\",h).call(p,this,t).isVisible()}resolveLayoutIdentity(t){if(t&&\"layoutName\"in t)return t;const e=[...c(this,l,\"f\").values()];if(1===e.length)return e[0].identity;const i=e.find((t=>t.isVisible()));return i?.identity??void 0}static async resolveLayout(t,e){const i=t.resolveLayoutIdentity(e);if(void 0===i||!(\"layoutName\"in i))throw new Error(\"[layout-manager] resolveLayout: Could not resolve the layout identity. Make sure you include 'layoutName' in the identity object.\");return c(p,r,\"m\",h).call(p,t,i.layoutName)}static async handleSharedView(t,e,i){await(0,u.mapValuesAsync)((async t=>{if(t.identity.layoutName!==e.layoutName){const e=t.getCurrentViews().find((t=>t.name===i.name));e&&await t.onViewDetached({viewIdentity:e,target:null}).catch(console.error)}}),c(t,l,\"f\"))}static async handleLastViewRemoved(t,e){await t.removeLayout(e),await c(t,a,\"f\").handleLastViewRemoved(t)}static async destroyLayout(t,{layoutName:e}){await c(p,r,\"m\",h).call(p,t,e).destroy(),c(t,l,\"f\").delete(e)}static async createLayout(t,e){const{layoutName:i}=e;if(c(t,l,\"f\").has(i))throw new Error(`Layout name ${i} already exists`);await c(t,a,\"f\").createLayout(e,t)}static registerLayout(t,e,i){c(t,l,\"f\").set(e,i)}static getAllLayouts(t){return[...c(t,l,\"f\").values()]}static setInitialSnapshot(t,e){c(t,a,\"f\").setInitialSnapshot(e)}static createClosedConstructor(...t){return class extends p{constructor(){super(...t)}}}}m=i.DefaultLayoutManager=p,r=p,a=new WeakMap,l=new WeakMap,h=function(t,e){const i=c(t,l,\"f\").get(e);if(!i)throw new Error(`[layout-manager] getLayoutByName: Could not locate layout with name '${e}'`);return i};var g={},f={},v={};Object.defineProperty(v,\"__esModule\",{value:!0}),v.ReversibleMap=void 0;v.ReversibleMap=class{constructor(){this.valueToKey=new Map,this.keyToValue=new Map,this.setUnique=(t,e)=>{if(this.hasKey(t)||this.hasValue(e))throw new Error(\"Key or value already in the map.\");this.keyToValue.set(t,e),this.valueToKey.set(e,t)},this.getKey=t=>{const e=this.valueToKey.get(t);if(!e)throw new Error(\"Value not found in the map.\");return e},this.deleteKey=t=>{const e=this.getValue(t);return this.keyToValue.delete(t),this.valueToKey.delete(e),e},this.deleteValue=t=>{const e=this.getKey(t);return this.keyToValue.delete(e),this.valueToKey.delete(t),e},this.hasKey=t=>this.keyToValue.has(t),this.hasValue=t=>this.valueToKey.has(t)}getValue(t){const e=this.keyToValue.get(t);if(!e)throw new Error(\"Key not found in the map.\");return e}},Object.defineProperty(f,\"__esModule\",{value:!0});var _=f.LayoutContentCache=void 0;const y=t.lazy,C=v;class w{constructor(){this.contentItemCache=new C.ReversibleMap,this.contentItemCacheId=0,this.createCacheKey=()=>{const t=`entity-${this.contentItemCacheId.toString()}`;return this.contentItemCacheId+=1,t},this.hasKey=t=>this.contentItemCache.hasKey(t),this.getItemOrUndefined=t=>{try{return this.getContentItemOrThrow(t)}catch(t){return}},this.getContentItemOrThrow=(t,e)=>{if(!this.contentItemCache.hasKey(t))throw new Error(\"Layout component has been destroyed or detached from the current layout.\");const i=this.contentItemCache.getValue(t);if(e&&!e.includes(i.type))throw new Error(`Layout item is not the expected type. Expected ${e.join(\", \")}, got ${i.type}.`);return i},this.getOrCreateEntityId=t=>{if(this.contentItemCache.hasValue(t))return this.contentItemCache.getKey(t);t.onDestroyed((()=>{this.contentItemCache.deleteValue(t)}));const e=this.createCacheKey();return this.contentItemCache.setUnique(e,t),e}}static getSingleInstance(){return w.singleton.getValue()}}_=f.LayoutContentCache=w,w.singleton=new y.Lazy((()=>new w));var I={},b={};!function(t){Object.defineProperty(t,\"__esModule\",{value:!0}),t.getAdjacentStacks=t.doShareEdge=t.getAdjacentItem=void 0;t.getAdjacentItem=(e,i)=>{const{parent:n}=e;if(e.isRoot()||!n)return;const o=[\"top\",\"bottom\"].includes(i)?\"column\":\"row\",s=[\"top\",\"left\"].includes(i)?-1:1;if(n.type===o){const t=n.contentItems.indexOf(e)+s;if(t>=0&&t{const n=t.getBounds(),o=e.getBounds();if(!n||!o)return!1;if([\"top\",\"bottom\"].includes(i)){return!(n.righto.right)}return!(n.bottomo.bottom)};t.getAdjacentStacks=(e,i)=>{const n=[\"top\",\"bottom\"].includes(i)?\"row\":\"column\",o=s=>\"stack\"===s.type?(0,t.doShareEdge)(e,s,i)?[s]:[]:\"root\"===s.type||\"ground\"===s.type?[]:s.type===n?s.contentItems.map((t=>o(t))).flat():s.type!==n?[\"top\",\"right\"].includes(i)?o(s.contentItems[s.contentItems.length-1]):o(s.contentItems[0]):[],s=(0,t.getAdjacentItem)(e,i);return s?o(s):[]}}(b);var S=t.commonjsGlobal&&t.commonjsGlobal.__decorate||function(t,e,i,n){var o,s=arguments.length,r=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if(\"object\"==typeof Reflect&&\"function\"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(s<3?o(r):s>3?o(e,i,r):o(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};Object.defineProperty(I,\"__esModule\",{value:!0}),I.LayoutEntitiesController=void 0;const E=t.decorators,x=b,L=i;class z{constructor(t,e,i){this.wire=t,this.layoutManager=e,this.layoutContentCache=i,this.analytics=t=>{this.wire.sendAction(`layout-controller-${t}`).catch((()=>{}))},this.getLayoutIdentityForViewOrThrow=async t=>{const e=this.layoutManager.getLayoutIdentityForView(t);if(!e)throw new Error(`View identity ${t.name} is not attached to any layouts.`);return e},this.getRoot=async t=>{this.analytics(\"get-root\");const e=(await this.getLayout(t)).getRoot();return{type:e.type,entityId:this.layoutContentCache.getOrCreateEntityId(e)}},this.getStackByView=async t=>{this.analytics(\"get-stack-by-view\");const e=await this.getLayoutIdentityForViewOrThrow(t),i=(await this.getLayout(e)).getStackByView(t);if(\"stack\"===i?.type)return{entityId:this.layoutContentCache.getOrCreateEntityId(i),type:\"stack\"}},this.getStackViews=t=>{this.analytics(\"get-stack-views\");return this.layoutContentCache.getContentItemOrThrow(t,[\"stack\"]).contentItems.map((t=>({name:t.viewName,uuid:this.wire.me.uuid})))},this.isRoot=t=>{this.analytics(\"is-root\");return this.layoutContentCache.getContentItemOrThrow(t).isRoot()},this.exists=t=>(this.analytics(\"exists\"),this.layoutContentCache.hasKey(t)),this.addViewToStack=async(t,e,{index:i}={index:0})=>{this.analytics(\"add-view-to-stack\");const n=this.layoutContentCache.getContentItemOrThrow(t);if(i&&i>n.contentItems.length+1)throw new Error(`Index '${i}' out of range, please exclude the index or specify a number between 0 and ${n.contentItems.length}`);const o={id:t,index:i},{identity:s}=await n.layout.platformCreateView(e,{location:o});return s},this.findViewInStack=(t,e)=>t.contentItems.find((t=>t.viewName===e.name)),this.removeViewFromStack=async(t,e)=>{this.analytics(\"remove-view-from-stack\");const i=this.layoutContentCache.getContentItemOrThrow(t,[\"stack\"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to remove a view ('${e.name}') which does not belong to the stack.`);await n.layout.platformCloseView(e)},this.createAdjacentStack=async(t,e,{position:i=\"right\"}={})=>{if(this.analytics(\"create-adjacent-stack\"),!Array.isArray(e)||0===e.length)throw new Error('The parameter \"views\" must be an array with at least 1 element.');if(![\"top\",\"bottom\",\"left\",\"right\"].includes(i))throw new Error(`Invalid position '${i}' specified.`);const n=this.layoutContentCache.getContentItemOrThrow(t).createAdjacentStack({position:i}),o=this.layoutContentCache.getOrCreateEntityId(n);return await Promise.all(e.reverse().map((t=>this.addViewToStack(o,t)))),o},this.getAdjacentStacks=async({targetId:t,edge:e})=>{this.analytics(\"get-adjacent-stacks\");const i=this.layoutContentCache.getContentItemOrThrow(t);return(0,x.getAdjacentStacks)(i,e).map((t=>({entityId:this.layoutContentCache.getOrCreateEntityId(t)})))},this.setStackActiveView=async(t,e)=>{this.analytics(\"set-stack-active-view\");const i=this.layoutContentCache.getContentItemOrThrow(t,[\"stack\"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to set a view ('${e.name}') as active when it does not belong to the stack.`);i.setActiveContentItem(n,!0)}}async getLayout(t){const e=await L.DefaultLayoutManager.resolveLayout(this.layoutManager,t);if(!e)throw new Error(`Could not resolve target layout identity ${JSON.stringify(t)}`);return e}getContent(t){this.analytics(\"get-content\");return this.layoutContentCache.getContentItemOrThrow(t,[\"column\",\"row\"]).contentItems.map((t=>({type:t.type,entityId:this.layoutContentCache.getOrCreateEntityId(t)})))}getParent(t){this.analytics(\"get-parent\");const e=this.layoutContentCache.getContentItemOrThrow(t);if(!e.isRoot())return e.parent?.contentItems.includes(e)?{type:e.parent.type,entityId:this.layoutContentCache.getOrCreateEntityId(e.parent)}:void 0}}S([(0,E.expose)()],z.prototype,\"getLayoutIdentityForViewOrThrow\",void 0),S([(0,E.expose)()],z.prototype,\"getRoot\",void 0),S([(0,E.expose)()],z.prototype,\"getStackByView\",void 0),S([(0,E.expose)()],z.prototype,\"getStackViews\",void 0),S([(0,E.expose)()],z.prototype,\"getContent\",null),S([(0,E.expose)()],z.prototype,\"getParent\",null),S([(0,E.expose)()],z.prototype,\"isRoot\",void 0),S([(0,E.expose)()],z.prototype,\"exists\",void 0),S([(0,E.expose)()],z.prototype,\"addViewToStack\",void 0),S([(0,E.expose)()],z.prototype,\"removeViewFromStack\",void 0),S([(0,E.expose)()],z.prototype,\"createAdjacentStack\",void 0),S([(0,E.expose)()],z.prototype,\"getAdjacentStacks\",void 0),S([(0,E.expose)()],z.prototype,\"setStackActiveView\",void 0),I.LayoutEntitiesController=z,Object.defineProperty(g,\"__esModule\",{value:!0});var M=g.initLayoutEndpoints=void 0;const P=t.apiExposer,T=t.layout_constants,A=f,k=I,D=i;M=g.initLayoutEndpoints=async function(t,e){const i=t.getFin(),n=await i.Platform.getCurrentSync().getClient(),o=new P.ChannelsExposer(n);await new P.ApiExposer(o).exposeInstance(new k.LayoutEntitiesController(t,e,A.LayoutContentCache.getSingleInstance()),{id:T.LAYOUT_CONTROLLER_ID}),await async function(t,e){const i=t=>async i=>{const n=await D.DefaultLayoutManager.resolveLayout(e,i.target);if(!n)throw new Error(`Could not resolve the layout target from payload ${JSON.stringify(i)}`);return t(n,i)},n=(e,n)=>{t.register(e,i(n))},o=(t,e)=>{n(t,e)};n(\"replace-view\",((t,e)=>t.replaceView(e))),n(\"replace-layout\",((t,{layout:e})=>t.replaceLayout(e))),n(\"add-view\",((t,e)=>t.insertView(e))),o(\"layout-add-view\",((t,{viewOptions:e,location:i,targetView:n})=>t.platformCreateView(e,{location:i,targetView:n}))),n(\"close-view\",((t,e)=>t.cleanupView(e.viewIdentity))),o(\"layout-close-view\",((t,e)=>t.platformCloseView(e.viewIdentity))),n(\"apply-preset-layout\",((t,e)=>t.applyPreset(e))),n(\"get-layout-views\",(t=>t.getCurrentViews())),n(\"get-frame-snapshot\",(t=>t.getFrameSnapshot())),n(\"is-visible\",(t=>t.isVisible())),n(\"destroy\",(t=>t.destroy())),t.register(\"get-layout-snapshot\",(()=>e.getLayoutSnapshot()))}(n,e)};var R={};Object.defineProperty(R,\"__esModule\",{value:!0});var U=R.BaseLayout=void 0;U=R.BaseLayout=class{};var O={};Object.defineProperty(O,\"__esModule\",{value:!0});var V=O.DOMEmitter=void 0;V=O.DOMEmitter=class{constructor(t){this.container=t}dispatchLocalEvent(t,e){const i={...e,type:t,tabSelector:`tab-${e.name}`,containerSelector:`container-${e.name}`,topic:\"openfin-DOM-event\"};this.container.dispatchEvent(new CustomEvent(t,{detail:i}))}};var B={};Object.defineProperty(B,\"__esModule\",{value:!0});var H=B.mapLayoutContentItemsImmutableSync=B.mapLayoutContentItemsImmutable=W=B.isVisible=void 0;var W=B.isVisible=t=>(0!==t.offsetWidth||0!==t.offsetHeight)&&\"hidden\"!==window.getComputedStyle(t).visibility&&t.offsetTop>=0&&t.offsetLeft>=0&&t.offsetTop<=window.innerHeight&&t.offsetLeft<=window.innerWidth;const F=t=>\"type\"in t&&\"component\"===t.type;B.mapLayoutContentItemsImmutable=async function t(e,i){return F(i)?e(i):{...i,content:await Promise.all(i.content?.map((i=>t(e,i))))}},H=B.mapLayoutContentItemsImmutableSync=function t(e,i){return F(i)?e(i):{...i,content:i.content?.map((i=>t(e,i)))}};class N extends Error{constructor(t,e){super(e),this.type=t}}class G extends N{constructor(t,e){super(\"Configuration\",t),this.node=e}}class j extends N{constructor(t){super(\"PopoutBlocked\",t)}}class $ extends N{constructor(t){super(\"API\",t)}}class Z extends N{constructor(t){super(\"Bind\",t)}}class q extends Error{constructor(t,e,i){super(`${t}: ${e}${void 0===i?\"\":\": \"+i}`)}}class X extends q{constructor(t,e){super(\"Assert\",t,e)}}class Y extends q{constructor(t,e,i){super(\"UnreachableCase\",t,`${e}${void 0===i?\"\":\": \"+i}`)}}class K extends q{constructor(t,e){super(\"UnexpectedNull\",t,e)}}class J extends q{constructor(t,e){super(\"UnexpectedUndefined\",t,e)}}var Q;!function(t){let e=!1;const i={PopoutCannotBeCreatedWithGroundItemConfig:{id:0,default:\"Popout cannot be created with ground ItemConfig\"},PleaseRegisterAConstructorFunction:{id:1,default:\"Please register a constructor function\"},ComponentTypeNotRegisteredAndBindComponentEventHandlerNotAssigned:{id:2,default:\"Component type not registered and BindComponentEvent handler not assigned\"},ComponentIsAlreadyRegistered:{id:3,default:\"Component is already registered\"},ComponentIsNotVirtuable:{id:4,default:\"Component is not virtuable. Requires rootHtmlElement field/getter\"},VirtualComponentDoesNotHaveRootHtmlElement:{id:5,default:'Virtual component does not have getter \"rootHtmlElement\"'},ItemConfigIsNotTypeComponent:{id:6,default:\"ItemConfig is not of type component\"},InvalidNumberPartInSizeString:{id:7,default:\"Invalid number part in size string\"},UnknownUnitInSizeString:{id:8,default:\"Unknown unit in size string\"},UnsupportedUnitInSizeString:{id:9,default:\"Unsupported unit in size string\"}};t.idCount=Object.keys(i).length;const n=Object.values(i);t.checkInitialise=function(){if(!e)for(let e=0;e=\"0\"&&t<=\"9\"}function Tt(t,e){const i=zt(e);t.style.width=i}function At(t,e){const i=zt(e);t.style.height=i}function kt(t){return{width:t.offsetWidth,height:t.offsetHeight}}function Dt(t,e){t.style.display=e?\"\":\"none\"}function Rt(t,e){if(void 0!==e)for(const i in e)if(e.hasOwnProperty(i)){const n=e[i],o=t[i];t[i]=Ut(o,n)}return t}function Ut(t,e){if(\"object\"!=typeof e)return e;if(Array.isArray(e)){const t=e.length,i=new Array(t);for(let n=0;n36)throw new Error(\"Too many keys in config minifier map\")},t.translateObject=n}(dt||(dt={})),function(t){t.defaults={type:at.ground,content:[],size:1,sizeUnit:ht.Fractional,minSize:void 0,minSizeUnit:ht.Pixel,id:\"\",isClosable:!0},t.createCopy=function(t,e){switch(t.type){case at.ground:case at.row:case at.column:return gt.createCopy(t,e);case at.stack:return ut.createCopy(t,e);case at.component:return pt.createCopy(t);default:throw new Y(\"CICC91354\",t.type,\"Invalid Config Item type specified\")}},t.createDefault=function(t){switch(t){case at.ground:throw new X(\"CICCDR91562\");case at.row:case at.column:return gt.createDefault(t);case at.stack:return ut.createDefault();case at.component:return pt.createDefault();default:throw new Y(\"CICCDD91563\",t,\"Invalid Config Item type specified\")}},t.isComponentItem=function(t){return t.type===at.component},t.isStackItem=function(t){return t.type===at.stack},t.isGroundItem=function(t){return t.type===at.ground}}(ct||(ct={})),function(t){t.defaultMaximised=!1,function(t){t.createCopy=function(t,e){return void 0===t?void 0:{show:null!=e?e:t.show,popout:t.popout,close:t.close,maximise:t.maximise,minimise:t.minimise,tabDropdown:t.tabDropdown}}}(t.Header||(t.Header={}))}(mt||(mt={})),function(t){function e(t){const e=t.length,i=new Array(e);for(let n=0;n\"__glMaximised\"===t));t>0&&(o=!0,n=n.splice(t,1)),e=n.length>0?n[0]:ct.defaults.id}else e=n;return i=void 0!==t.maximised?t.maximised:o,{id:e,maximised:i}}}(wt||(wt={})),function(t){function e(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0;return{resolved:!0,root:Et.resolve(i),openPopouts:t.resolveOpenPopouts(e.openPopouts),dimensions:t.Dimensions.resolve(e.dimensions),settings:t.Settings.resolve(e.settings),header:t.Header.resolve(e.header,e.settings,e.labels)}}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:Lt.fromResolvedArray(e.openPopouts),settings:_t.Settings.createCopy(e.settings),dimensions:t.Dimensions.fromResolved(e.dimensions),header:_t.Header.createCopy(e.header)}},t.isResolved=function(t){const e=t;return void 0!==e.resolved&&!0===e.resolved},t.resolveOpenPopouts=function(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0,{root:Et.resolve(o),openPopouts:xt.resolveOpenPopouts(e.openPopouts),dimensions:xt.Dimensions.resolve(e.dimensions),settings:xt.Settings.resolve(e.settings),header:xt.Header.resolve(e.header,e.settings,e.labels),parentId:null!==(i=e.parentId)&&void 0!==i?i:null,indexInParent:null!==(n=e.indexInParent)&&void 0!==n?n:null,window:t.Window.resolve(e.window,e.dimensions),resolved:!0}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:i(e.openPopouts),dimensions:xt.Dimensions.fromResolved(e.dimensions),settings:_t.Settings.createCopy(e.settings),header:_t.Header.createCopy(e.header),parentId:e.parentId,indexInParent:e.indexInParent,window:t.Window.fromResolved(e.window)}},t.fromResolvedArray=i}(Lt||(Lt={}));class Wt{constructor(){this._allEventSubscriptions=[],this._subscriptionsMap=new Map,this.unbind=this.removeEventListener,this.trigger=this.emit}tryBubbleEvent(t,e){}emit(t,...e){let i=this._subscriptionsMap.get(t);if(void 0!==i){i=i.slice();for(let t=0;t0){const n=e.slice();n.unshift(t);const o=this._allEventSubscriptions.slice();for(let t=0;t0?n.contentItems[0]:n,e=0);const o=this._layoutManager.createAndInitContentItem(i,t);t.addChild(o,e),this._layoutManager.layoutConfig.settings.popInOnClose?this._onClose():this.close()}createWindow(){const t=this.createUrl(),e=Math.floor(1e6*Math.random()).toString(36),i=this.serializeWindowFeatures({width:this._initialWindowSize.width,height:this._initialWindowSize.height,innerWidth:this._initialWindowSize.width,innerHeight:this._initialWindowSize.height,menubar:\"no\",toolbar:\"no\",location:\"no\",personalbar:\"no\",resizable:\"yes\",scrollbars:\"no\",status:\"no\"});if(this._popoutWindow=globalThis.open(t,e,i),this._popoutWindow)this._popoutWindow.addEventListener(\"load\",(()=>this.positionWindow()),{passive:!0}),this._popoutWindow.addEventListener(\"beforeunload\",(()=>{this._layoutManager.layoutConfig.settings.popInOnClose?this.popIn():this._onClose()}),{passive:!0}),this._checkReadyInterval=setInterval((()=>this.checkReady()),10);else if(!0===this._layoutManager.layoutConfig.settings.blockedPopoutsThrowError){throw new j(\"Popout blocked\")}}checkReady(){if(null===this._popoutWindow)throw new K(\"BPCR01844\");this._popoutWindow.__glInstance&&this._popoutWindow.__glInstance.isInitialised&&(this.onInitialised(),void 0!==this._checkReadyInterval&&(clearInterval(this._checkReadyInterval),this._checkReadyInterval=void 0))}serializeWindowFeatures(t){const e=[];for(const i in t)e.push(i+\"=\"+t[i].toString());return e.join(\",\")}createUrl(){const t=\"gl-window-config-\"+Ot(),e=_t.minifyConfig(this._config);try{localStorage.setItem(t,JSON.stringify(e))}catch(t){throw new Error(\"Error while writing to localStorage \"+function(t){return t instanceof Error?t.message:\"string\"==typeof t?t:\"Unknown Error\"}(t))}const i=new URL(location.href);return i.searchParams.set(\"gl-window\",t),i.toString()}positionWindow(){if(null===this._popoutWindow)throw new Error(\"BrowserPopout.positionWindow: null popoutWindow\");this._popoutWindow.moveTo(this._initialWindowSize.left,this._initialWindowSize.top),this._popoutWindow.focus()}onInitialised(){this._isInitialised=!0,this.getGlInstance().on(\"popIn\",(()=>this.popIn())),this.emit(\"initialised\")}_onClose(){setTimeout((()=>this.emit(\"closed\")),50)}}class Gt extends Wt{constructor(t,e,i,n){super(),this.layoutManager=t,this._parent=i,this._element=n,this._popInParentIds=[],this._type=e.type,this._id=e.id,this._isInitialised=!1,this.isGround=!1,this.isRow=!1,this.isColumn=!1,this.isStack=!1,this.isComponent=!1,this.size=e.size,this.sizeUnit=e.sizeUnit,this.minSize=e.minSize,this.minSizeUnit=e.minSizeUnit,this._isClosable=e.isClosable,this._pendingEventPropagations={},this._throttledEvents=[\"stateChanged\"],this._contentItems=this.createContentItems(e.content)}get type(){return this._type}get id(){return this._id}set id(t){this._id=t}get popInParentIds(){return this._popInParentIds}get parent(){return this._parent}get contentItems(){return this._contentItems}get isClosable(){return this._isClosable}get element(){return this._element}get isInitialised(){return this._isInitialised}static isStack(t){return t.isStack}static isComponentItem(t){return t.isComponent}static isComponentParentableItem(t){return t.isStack||t.isGround}removeChild(t,e=!1){const i=this._contentItems.indexOf(t);if(-1===i)throw new Error(\"Can't remove child item. Unknown content item\");if(e||this._contentItems[i].destroy(),this._contentItems.splice(i,1),this._contentItems.length>0)this.updateSize(!1);else if(!this.isGround&&!0===this._isClosable){if(null===this._parent)throw new K(\"CIUC00874\");this._parent.removeChild(this)}}addChild(t,e,i){return null!=e||(e=this._contentItems.length),this._contentItems.splice(e,0,t),t.setParent(this),!0===this._isInitialised&&!1===t._isInitialised&&t.init(),e}replaceChild(t,e,i=!1){const n=this._contentItems.indexOf(t),o=t._element.parentNode;if(-1===n)throw new X(\"CIRCI23232\",\"Can't replace child. oldChild is not child of this\");if(null===o)throw new K(\"CIRCP23232\");if(o.replaceChild(e._element,t._element),!0===i&&(t._parent=null,t.destroy()),this._contentItems[n]=e,e.setParent(this),e.size=t.size,e.sizeUnit=t.sizeUnit,e.minSize=t.minSize,e.minSizeUnit=t.minSizeUnit,null===e._parent)throw new K(\"CIRCNC45699\");!0===e._parent._isInitialised&&!1===e._isInitialised&&e.init(),this.updateSize(!1)}remove(){if(null===this._parent)throw new K(\"CIR11110\");this._parent.removeChild(this)}popout(){const t=Ot(),e=this.layoutManager.createPopoutFromContentItem(this,void 0,t,void 0);return this.emitBaseBubblingEvent(\"stateChanged\"),e}calculateConfigContent(){const t=this._contentItems,e=t.length,i=new Array(e);for(let n=0;nthis.propagateEventToLayoutManager(t,e))))}propagateEventToLayoutManager(t,e){this._pendingEventPropagations[t]=!1,this.layoutManager.emitUnknown(t,e)}}class jt extends Gt{constructor(t,e,i){super(t,e,i,document.createElement(\"div\")),this._parentItem=i,this._focused=!1,this.isComponent=!0,this._reorderEnabled=e.reorderEnabled,this.applyUpdatableConfig(e),this._initialWantMaximise=e.maximised;const n=document.createElement(\"div\");n.classList.add(\"lm_content\"),this.element.appendChild(n),this._container=new Ft(e,this,t,n,(t=>this.handleUpdateItemConfigEvent(t)),(()=>this.show()),(()=>this.hide()),(t=>this.focus(t)),(t=>this.blur(t)))}get componentName(){return this._container.componentType}get componentType(){return this._container.componentType}get reorderEnabled(){return this._reorderEnabled}get initialWantMaximise(){return this._initialWantMaximise}get component(){return this._container.component}get container(){return this._container}get parentItem(){return this._parentItem}get headerConfig(){return this._headerConfig}get title(){return this._title}get tab(){return this._tab}get focused(){return this._focused}destroy(){this._container.destroy(),super.destroy()}applyUpdatableConfig(t){this.setTitle(t.title),this._headerConfig=t.header}toConfig(){const t=this._container.stateRequestEvent,e=void 0===t?this._container.state:t();return{type:at.component,content:[],size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,maximised:!1,isClosable:this.isClosable,reorderEnabled:this._reorderEnabled,title:this._title,header:mt.Header.createCopy(this._headerConfig),componentType:pt.copyComponentType(this.componentType),componentState:e}}close(){if(null===this.parent)throw new K(\"CIC68883\");this.parent.removeChild(this,!1)}enterDragMode(t,e){Tt(this.element,t),At(this.element,e),this._container.enterDragMode(t,e)}exitDragMode(){this._container.exitDragMode()}enterStackMaximised(){this._container.enterStackMaximised()}exitStackMaximised(){this._container.exitStackMaximised()}drag(){this._container.drag()}updateSize(t){this.updateNodeSize(t)}init(){this.updateNodeSize(!1),super.init(),this._container.emit(\"open\"),this.initContentItems()}setTitle(t){this._title=t,this.emit(\"titleChanged\",t),this.emit(\"stateChanged\")}setTab(t){this._tab=t,this.emit(\"tab\",t),this._container.setTab(t)}hide(){super.hide(),this._container.setVisibility(!1)}show(){super.show(),this._container.setVisibility(!0)}focus(t=!1){this.parentItem.setActiveComponentItem(this,!0,t)}setFocused(t){this._focused=!0,this.tab.setFocused(),t||this.emitBaseBubblingEvent(\"focus\")}blur(t=!1){this._focused&&this.layoutManager.setFocusedComponentItem(void 0,t)}setBlurred(t){this._focused=!1,this.tab.setBlurred(),t||this.emitBaseBubblingEvent(\"blur\")}setParent(t){this._parentItem=t,super.setParent(t)}handleUpdateItemConfigEvent(t){this.applyUpdatableConfig(t)}updateNodeSize(t){if(\"none\"!==this.element.style.display){const{width:e,height:i}=kt(this.element);this._container.setSizeToNodeSize(e,i,t)}}}class $t extends Gt{constructor(){super(...arguments),this._focused=!1}get focused(){return this._focused}setFocusedValue(t){this._focused=t}}class Zt extends Wt{constructor(t,e){super(),this._eElement=t,this._pointerTracking=!1,this._pointerDownEventListener=t=>this.onPointerDown(t),this._pointerMoveEventListener=t=>this.onPointerMove(t),this._pointerUpEventListener=t=>this.onPointerUp(t),this._timeout=void 0,this._allowableTargets=[t,...e],this._oDocument=document,this._eBody=document.body,this._nDelay=1800,this._nDistance=10,this._nX=0,this._nY=0,this._nOriginalX=0,this._nOriginalY=0,this._dragging=!1,this._eElement.addEventListener(\"pointerdown\",this._pointerDownEventListener,{passive:!0})}destroy(){this.checkRemovePointerTrackingEventListeners(),this._eElement.removeEventListener(\"pointerdown\",this._pointerDownEventListener)}cancelDrag(){this.processDragStop(void 0)}onPointerDown(t){if(this._allowableTargets.includes(t.target)&&t.isPrimary){const e=this.getPointerCoordinates(t);this.processPointerDown(e)}}processPointerDown(t){this._nOriginalX=t.x,this._nOriginalY=t.y,this._oDocument.addEventListener(\"pointermove\",this._pointerMoveEventListener),this._oDocument.addEventListener(\"pointerup\",this._pointerUpEventListener,{passive:!0}),this._pointerTracking=!0,this._timeout=setTimeout((()=>{try{this.startDrag()}catch(t){throw console.error(t),t}}),this._nDelay)}onPointerMove(t){this._pointerTracking&&(this.processDragMove(t),t.preventDefault())}processDragMove(t){this._nX=t.pageX-this._nOriginalX,this._nY=t.pageY-this._nOriginalY,!1===this._dragging&&(Math.abs(this._nX)>this._nDistance||Math.abs(this._nY)>this._nDistance)&&this.startDrag(),this._dragging&&this.emit(\"drag\",this._nX,this._nY,t)}onPointerUp(t){this.processDragStop(t)}processDragStop(t){var e;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this.checkRemovePointerTrackingEventListeners(),!0===this._dragging&&(this._eBody.classList.remove(\"lm_dragging\"),this._eElement.classList.remove(\"lm_dragging\"),null===(e=this._oDocument.querySelector(\"iframe\"))||void 0===e||e.style.setProperty(\"pointer-events\",\"\"),this._dragging=!1,this.emit(\"dragStop\",t))}checkRemovePointerTrackingEventListeners(){this._pointerTracking&&(this._oDocument.removeEventListener(\"pointermove\",this._pointerMoveEventListener),this._oDocument.removeEventListener(\"pointerup\",this._pointerUpEventListener),this._pointerTracking=!1)}startDrag(){var t;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this._dragging=!0,this._eBody.classList.add(\"lm_dragging\"),this._eElement.classList.add(\"lm_dragging\"),null===(t=this._oDocument.querySelector(\"iframe\"))||void 0===t||t.style.setProperty(\"pointer-events\",\"none\"),this.emit(\"dragStart\",this._nOriginalX,this._nOriginalY)}getPointerCoordinates(t){return{x:t.pageX,y:t.pageY}}}class qt{constructor(t,e,i){this._isVertical=t,this._size=e,this._grabSize=i0){const i=this.createSplitter(Math.max(0,e-1)).element;e>0?(this.contentItems[e-1].element.insertAdjacentElement(\"afterend\",i),i.insertAdjacentElement(\"afterend\",t.element)):(this.contentItems[0].element.insertAdjacentElement(\"beforebegin\",i),i.insertAdjacentElement(\"beforebegin\",t.element))}else this._childElementContainer.appendChild(t.element);super.addChild(t,e);const n=1/this.contentItems.length*100;if(!0===i)return this.emitBaseBubblingEvent(\"stateChanged\"),e;for(let e=0;e0&&(this.calculateRelativeSizes(),this.setAbsoluteSizes()),this.emitBaseBubblingEvent(\"stateChanged\"),this.emit(\"resize\")}setAbsoluteSizes(){const t=this.calculateAbsoluteSizes();for(let e=0;e0&&t.itemSizes[e]++,this._isColumn?(Tt(this.contentItems[e].element,t.crossAxisSize),At(this.contentItems[e].element,t.itemSizes[e])):(Tt(this.contentItems[e].element,t.itemSizes[e]),At(this.contentItems[e].element,t.crossAxisSize))}calculateAbsoluteSizes(){const t=(this.contentItems.length-1)*this._splitterSize,{width:e,height:i}=kt(this.element);let n,o;this._isColumn?(n=i-t,o=e):(n=e-t,o=i);let s=0;const r=[];for(let t=0;t0){const n=100-t;for(let t=0;t100&&e.length>0){for(let t=0;te)return;{const r=i/e;let a=i;for(let e=0;ethis.onSplitterDrag(e,t,i))),e.on(\"dragStop\",(()=>this.onSplitterDragStop(e))),e.on(\"dragStart\",(()=>this.onSplitterDragStart(e))),this._splitter.splice(t,0,e),e}getSplitItems(t){const e=this._splitter.indexOf(t);return{before:this.contentItems[e],after:this.contentItems[e+1]}}calculateContentItemMinSize(t){const e=t.minSize;if(void 0!==e){if(t.minSizeUnit===ht.Pixel)return e;throw new X(\"ROCGMD98831\",JSON.stringify(t))}{const t=this.layoutManager.layoutConfig.dimensions;return this._isColumn?t.defaultMinItemHeight:t.defaultMinItemWidth}}calculateContentItemsTotalMinSize(t){let e=0;for(const i of t)e+=this.calculateContentItemMinSize(i);return e}onSplitterDragStart(t){const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=this.calculateContentItemsTotalMinSize(e.before.contentItems),s=this.calculateContentItemsTotalMinSize(e.after.contentItems);this._splitterPosition=0,this._splitterMinPosition=-1*(i-o),this._splitterMaxPosition=n-s}onSplitterDrag(t,e,i){let n=this._isColumn?i:e;if(null===this._splitterMinPosition||null===this._splitterMaxPosition)throw new K(\"ROCOSD59226\");n=Math.max(n,this._splitterMinPosition),n=Math.min(n,this._splitterMaxPosition),this._splitterPosition=n;const o=zt(n);this._isColumn?t.element.style.top=o:t.element.style.left=o}onSplitterDragStop(t){if(null===this._splitterPosition)throw new K(\"ROCOSDS66932\");{const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=(this._splitterPosition+i)/(i+n),s=e.before.size+e.after.size;e.before.size=o*s,e.after.size=(1-o)*s,t.element.style.top=zt(0),t.element.style.left=zt(0),globalThis.requestAnimationFrame((()=>this.updateSize(!1)))}}}!function(t){t.getElementDimensionSize=function(t,e){return\"width\"===e?function(t){return t.offsetWidth}(t):function(t){return t.offsetHeight}(t)},t.setElementDimensionSize=function(t,e,i){return\"width\"===e?Tt(t,i):At(t,i)},t.createElement=function(t,e){const i=t.createElement(\"div\");return i.classList.add(\"lm_item\"),e?i.classList.add(\"lm_column\"):i.classList.add(\"lm_row\"),i}}(Xt||(Xt={}));class Yt extends $t{constructor(t,e,i){super(t,vt.create(e),null,Yt.createElement(document)),this.isGround=!0,this._childElementContainer=this.element,this._containerElement=i;let n=null;for(;;){const t=n?n.previousSibling:this._containerElement.lastChild;if(!(t instanceof Element&&t.classList.contains(\"lm_content\")))break;n=t}this._containerElement.insertBefore(this.element,n)}init(){if(!0!==this.isInitialised){this.updateNodeSize();for(let t=0;t0?this.contentItems[0]:this,n.isComponent)throw new Error(\"Cannot add item as child to ComponentItem\");{const t=this.layoutManager.createAndInitContentItem(i,n);return e=n.addChild(t,e),n===this?-1:e}}loadComponentAsRoot(t){this.clearRoot();const e=Ct.resolve(t,!1);if(e.maximised)throw new Error(\"Root Component cannot be maximised\");{const t=new jt(this.layoutManager,e,this);t.init(),this.addChild(t,0)}}addChild(t,e){if(this.contentItems.length>0)throw new Error(\"Ground node can only have a single child\");return this._childElementContainer.appendChild(t.element),e=super.addChild(t,e),this.updateSize(!1),this.emitBaseBubblingEvent(\"stateChanged\"),e}calculateConfigContent(){const t=this.contentItems,e=t.length,i=new Array(e);for(let n=0;n0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e)),this.updateContentItemsSize(!1))}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}createSideAreas(){const t=Yt.Area.oppositeSides,e=new Array(Object.keys(t).length);let i=0;for(const n in t){const o=n,s=this.getElementArea();if(null===s)throw new K(\"RCSA77553\");s.side=o,\"2\"===t[o][1]?s[o]=s[t[o]]-50:s[o]=s[t[o]]+50,s.surface=(s.x2-s.x1)*(s.y2-s.y1),e[i++]=s}return e}highlightDropZone(t,e,i){this.layoutManager.tabDropPlaceholder.remove(),super.highlightDropZone(t,e,i)}onDrop(t,e){if(t.isComponent){const e=ut.createDefault(),i=t;e.header=mt.Header.createCopy(i.headerConfig);const n=this.layoutManager.createAndInitContentItem(e,this);n.addChild(t),t=n}if(0===this.contentItems.length)this.addChild(t);else{if(t.type===at.row||t.type===at.column){const e=ut.createDefault(),i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}const i=\"x\"==e.side[0]?at.row:at.column,n=\"2\"==e.side[1],o=this.contentItems[0];if(o instanceof Xt&&o.type===i){const e=o.contentItems[n?0:o.contentItems.length-1];o.addChild(t,n?0:void 0,!0),e.size*=.5,t.size=e.size,t.sizeUnit=ht.Percent,o.updateSize(!1)}else{const e=ct.createDefault(i),s=this.layoutManager.createContentItem(e,this);this.replaceChild(o,s),s.addChild(t,n?0:void 0,!0),s.addChild(o,n?void 0:0,!0),o.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}}dock(){throw new X(\"GID87731\")}validateDocking(){throw new X(\"GIVD87732\")}getAllContentItems(){const t=[this];return this.deepGetAllContentItems(this.contentItems,t),t}getConfigMaximisedItems(){const t=[];return this.deepFilterContentItems(this.contentItems,t,(t=>!(!Gt.isStack(t)||!t.initialWantMaximise)||!(!Gt.isComponentItem(t)||!t.initialWantMaximise))),t}getItemsByPopInParentId(t){const e=[];return this.deepFilterContentItems(this.contentItems,e,(e=>e.popInParentIds.includes(t))),e}toConfig(){throw new Error(\"Cannot generate GroundItem config\")}setActiveComponentItem(t,e,i){}updateNodeSize(){const{width:t,height:e}=kt(this._containerElement);Tt(this.element,t),At(this.element,e),this.contentItems.length>0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e))}deepGetAllContentItems(t,e){for(let i=0;ithis.onClick(t),this._touchStartEventListener=t=>this.onTouchStart(t),this._element=document.createElement(\"div\"),this._element.classList.add(i),this._element.title=e,this._header.on(\"destroy\",(()=>this.destroy())),this._element.addEventListener(\"click\",this._clickEventListener,{passive:!0}),this._element.addEventListener(\"touchstart\",this._touchStartEventListener,{passive:!0}),this._header.controlsContainerElement.appendChild(this._element)}get element(){return this._element}destroy(){var t;this._element.removeEventListener(\"click\",this._clickEventListener),this._element.removeEventListener(\"touchstart\",this._touchStartEventListener),null===(t=this._element.parentNode)||void 0===t||t.removeChild(this._element)}onClick(t){this._pushEvent(t)}onTouchStart(t){this._pushEvent(t)}}class Jt{constructor(t,e,i,n,o){var s;this._layoutManager=t,this._componentItem=e,this._closeEvent=i,this._focusEvent=n,this._dragStartEvent=o,this._isActive=!1,this._tabClickListener=t=>this.onTabClickDown(t),this._tabTouchStartListener=t=>this.onTabTouchStart(t),this._closeClickListener=()=>this.onCloseClick(),this._closeTouchStartListener=()=>this.onCloseTouchStart(),this._dragStartListener=(t,e)=>this.onDragStart(t,e),this._contentItemDestroyListener=()=>this.onContentItemDestroy(),this._tabTitleChangedListener=t=>this.setTitle(t),this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_tab\"),this._titleElement=document.createElement(\"span\"),this._titleElement.classList.add(\"lm_title\"),this._closeElement=document.createElement(\"div\"),this._closeElement.classList.add(\"lm_close_tab\"),this._element.appendChild(this._titleElement),this._element.appendChild(this._closeElement),e.isClosable?this._closeElement.style.display=\"\":this._closeElement.style.display=\"none\",this.setTitle(e.title),this._componentItem.on(\"titleChanged\",this._tabTitleChangedListener);(null!==(s=e.reorderEnabled)&&void 0!==s?s:this._layoutManager.layoutConfig.settings.reorderEnabled)&&this.enableReorder(),this._element.addEventListener(\"click\",this._tabClickListener,{passive:!0}),this._element.addEventListener(\"touchstart\",this._tabTouchStartListener,{passive:!0}),this._componentItem.isClosable?(this._closeElement.addEventListener(\"click\",this._closeClickListener,{passive:!0}),this._closeElement.addEventListener(\"touchstart\",this._closeTouchStartListener,{passive:!0})):(this._closeElement.remove(),this._closeElement=void 0),this._componentItem.setTab(this),this._layoutManager.emit(\"tabCreated\",this)}get isActive(){return this._isActive}get componentItem(){return this._componentItem}get contentItem(){return this._componentItem}get element(){return this._element}get titleElement(){return this._titleElement}get closeElement(){return this._closeElement}get reorderEnabled(){return void 0!==this._dragListener}set reorderEnabled(t){t!==this.reorderEnabled&&(t?this.enableReorder():this.disableReorder())}setTitle(t){this._titleElement.innerText=t,this._element.title=t}setActive(t){t!==this._isActive&&(this._isActive=t,t?this._element.classList.add(\"lm_active\"):this._element.classList.remove(\"lm_active\"))}destroy(){var t,e;this._closeEvent=void 0,this._focusEvent=void 0,this._dragStartEvent=void 0,this._element.removeEventListener(\"click\",this._tabClickListener),this._element.removeEventListener(\"touchstart\",this._tabTouchStartListener),null===(t=this._closeElement)||void 0===t||t.removeEventListener(\"click\",this._closeClickListener),null===(e=this._closeElement)||void 0===e||e.removeEventListener(\"touchstart\",this._closeTouchStartListener),this._componentItem.off(\"titleChanged\",this._tabTitleChangedListener),this.reorderEnabled&&this.disableReorder(),this._element.remove()}setBlurred(){this._element.classList.remove(\"lm_focused\"),this._titleElement.classList.remove(\"lm_focused\")}setFocused(){this._element.classList.add(\"lm_focused\"),this._titleElement.classList.add(\"lm_focused\")}onDragStart(t,e){if(void 0===this._dragListener)throw new J(\"TODSDLU10093\");if(void 0===this._dragStartEvent)throw new J(\"TODS23309\");this._dragStartEvent(t,e,this._dragListener,this.componentItem)}onContentItemDestroy(){void 0!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=void 0)}onTabClickDown(t){const e=t.target;e!==this._element&&e!==this._titleElement||(0===t.button?this.notifyFocus():1===t.button&&this._componentItem.isClosable&&this.notifyClose())}onTabTouchStart(t){t.target===this._element&&this.notifyFocus()}onCloseClick(){this.notifyClose()}onCloseTouchStart(){this.notifyClose()}notifyClose(){if(void 0===this._closeEvent)throw new J(\"TNC15007\");this._closeEvent(this._componentItem)}notifyFocus(){if(void 0===this._focusEvent)throw new J(\"TNA15007\");this._focusEvent(this._componentItem)}enableReorder(){this._dragListener=new Zt(this._element,[this._titleElement]),this._dragListener.on(\"dragStart\",this._dragStartListener),this._componentItem.on(\"destroy\",this._contentItemDestroyListener)}disableReorder(){if(void 0===this._dragListener)throw new J(\"TDR87745\");this._componentItem.off(\"destroy\",this._contentItemDestroyListener),this._dragListener.off(\"dragStart\",this._dragStartListener),this._dragListener=void 0}}class Qt{constructor(t,e,i,n,o){this._layoutManager=t,this._componentRemoveEvent=e,this._componentFocusEvent=i,this._componentDragStartEvent=n,this._dropdownActiveChangedEvent=o,this._tabs=[],this._lastVisibleTabIndex=-1,this._dropdownActive=!1,this._element=document.createElement(\"section\"),this._element.classList.add(\"lm_tabs\"),this._dropdownElement=document.createElement(\"section\"),this._dropdownElement.classList.add(\"lm_tabdropdown_list\"),this._dropdownElement.style.display=\"none\"}get tabs(){return this._tabs}get tabCount(){return this._tabs.length}get lastVisibleTabIndex(){return this._lastVisibleTabIndex}get element(){return this._element}get dropdownElement(){return this._dropdownElement}get dropdownActive(){return this._dropdownActive}destroy(){for(let t=0;tthis.handleTabCloseEvent(t)),(t=>this.handleTabFocusEvent(t)),((t,e,i,n)=>this.handleTabDragStartEvent(t,e,i,n)));void 0===e&&(e=this._tabs.length),this._tabs.splice(e,0,i),ethis._lastVisibleTabIndex){const t=this._tabs[e];for(let t=e;t>0;t--)this._tabs[t]=this._tabs[t-1];this._tabs[0]=t}}updateTabSizes(t,e){let i=!1;this.tryUpdateTabSizes(i,t,e)||(i=!0,this.tryUpdateTabSizes(i,t,e)),i!==this._dropdownActive&&(this._dropdownActive=i,this._dropdownActiveChangedEvent())}tryUpdateTabSizes(t,e,i){if(this._tabs.length>0){if(void 0===i)throw new Error(\"non-empty tabs must have active component item\");let n=0,o=!1;const s=this._layoutManager.layoutConfig.settings.tabOverlapAllowance,r=this._tabs.indexOf(i.tab),a=this._tabs[r];this._lastVisibleTabIndex=-1;for(let i=0;ie){if(o)i===r&&(l.style.zIndex=\"auto\",l.style.marginLeft=\"\",l.parentElement!==this._element&&this._element.appendChild(l));else{let t;if(t=r>0&&r<=i?(d-e)/(i-1):(d-e)/i,tthis.onClick(t),this._touchStartListener=t=>this.onTouchStart(t),this._rowColumnClosable=!0,this._closeButton=null,this._popoutButton=null,this._tabsContainer=new Qt(this._layoutManager,(t=>this.handleTabInitiatedComponentRemoveEvent(t)),(t=>this.handleTabInitiatedComponentFocusEvent(t)),((t,e,i,n)=>this.handleTabInitiatedDragStartEvent(t,e,i,n)),(()=>this.processTabDropdownActiveChanged())),this._show=i.show,this._popoutEnabled=i.popoutEnabled,this._popoutLabel=i.popoutLabel,this._maximiseEnabled=i.maximiseEnabled,this._maximiseLabel=i.maximiseLabel,this._minimiseEnabled=i.minimiseEnabled,this._minimiseLabel=i.minimiseLabel,this._closeEnabled=i.closeEnabled,this._closeLabel=i.closeLabel,this._tabDropdownEnabled=i.tabDropdownEnabled,this._tabDropdownLabel=i.tabDropdownLabel,this.setSide(i.side),this._canRemoveComponent=this._configClosable,this._element=document.createElement(\"section\"),this._element.classList.add(\"lm_header\"),this._controlsContainerElement=document.createElement(\"section\"),this._controlsContainerElement.classList.add(\"lm_controls\"),this._element.appendChild(this._tabsContainer.element),this._element.appendChild(this._controlsContainerElement),this._element.appendChild(this._tabsContainer.dropdownElement),this._element.addEventListener(\"click\",this._clickListener,{passive:!0}),this._element.addEventListener(\"touchstart\",this._touchStartListener,{passive:!0}),this._documentMouseUpListener=()=>this._tabsContainer.hideAdditionalTabsDropdown(),globalThis.document.addEventListener(\"mouseup\",this._documentMouseUpListener,{passive:!0}),this._tabControlOffset=this._layoutManager.layoutConfig.settings.tabControlOffset,this._tabDropdownEnabled&&(this._tabDropdownButton=new Kt(this,this._tabDropdownLabel,\"lm_tabdropdown\",(()=>this._tabsContainer.showAdditionalTabsDropdown()))),this._popoutEnabled&&(this._popoutButton=new Kt(this,this._popoutLabel,\"lm_popout\",(()=>this.handleButtonPopoutEvent()))),this._maximiseEnabled&&(this._maximiseButton=new Kt(this,this._maximiseLabel,\"lm_maximise\",(t=>this.handleButtonMaximiseToggleEvent(t)))),this._configClosable&&(this._closeButton=new Kt(this,this._closeLabel,\"lm_close\",(()=>s()))),this.processTabDropdownActiveChanged()}get show(){return this._show}get side(){return this._side}get leftRightSided(){return this._leftRightSided}get layoutManager(){return this._layoutManager}get parent(){return this._parent}get tabs(){return this._tabsContainer.tabs}get lastVisibleTabIndex(){return this._tabsContainer.lastVisibleTabIndex}get element(){return this._element}get tabsContainerElement(){return this._tabsContainer.element}get controlsContainerElement(){return this._controlsContainerElement}destroy(){this.emit(\"destroy\"),this._popoutEvent=void 0,this._maximiseToggleEvent=void 0,this._clickEvent=void 0,this._touchStartEvent=void 0,this._componentRemoveEvent=void 0,this._componentFocusEvent=void 0,this._componentDragStartEvent=void 0,this._tabsContainer.destroy(),globalThis.document.removeEventListener(\"mouseup\",this._documentMouseUpListener),this._element.remove()}createTab(t,e){this._tabsContainer.createTab(t,e)}removeTab(t){this._tabsContainer.removeTab(t)}processActiveComponentChanged(t){this._tabsContainer.processActiveComponentChanged(t),this.updateTabSizes()}setSide(t){this._side=t,this._leftRightSided=[nt.right,nt.left].includes(this._side)}setRowColumnClosable(t){this._rowColumnClosable=t,this.updateClosability()}updateClosability(){let t;if(this._configClosable)if(this._rowColumnClosable){t=!0;const e=this.tabs.length;for(let i=0;i1}applyFocusedValue(t){t?this._element.classList.add(\"lm_focused\"):this._element.classList.remove(\"lm_focused\")}processMaximised(){if(void 0===this._maximiseButton)throw new J(\"HPMAX16997\");this._maximiseButton.element.setAttribute(\"title\",this._minimiseLabel)}processMinimised(){if(void 0===this._maximiseButton)throw new J(\"HPMIN16997\");this._maximiseButton.element.setAttribute(\"title\",this._maximiseLabel)}updateTabSizes(){if(this._tabsContainer.tabCount>0){const t=this._show?this._layoutManager.layoutConfig.dimensions.headerHeight:0;let e;this._leftRightSided?(this._element.style.height=\"\",this._element.style.width=zt(t)):(this._element.style.width=\"\",this._element.style.height=zt(t)),e=this._leftRightSided?this._element.offsetHeight-this._controlsContainerElement.offsetHeight-this._tabControlOffset:this._element.offsetWidth-this._controlsContainerElement.offsetWidth-this._tabControlOffset,this._tabsContainer.updateTabSizes(e,this._getActiveComponentItemEvent())}}handleTabInitiatedComponentRemoveEvent(t){if(this._canRemoveComponent){if(void 0===this._componentRemoveEvent)throw new J(\"HHTCE22294\");this._componentRemoveEvent(t)}}handleTabInitiatedComponentFocusEvent(t){if(void 0===this._componentFocusEvent)throw new J(\"HHTAE22294\");this._componentFocusEvent(t)}handleTabInitiatedDragStartEvent(t,e,i,n){if(this._canRemoveComponent){if(void 0===this._componentDragStartEvent)throw new J(\"HHTDSE22294\");this._componentDragStartEvent(t,e,i,n)}else i.cancelDrag()}processTabDropdownActiveChanged(){void 0!==this._tabDropdownButton&&Dt(this._tabDropdownButton.element,this._tabsContainer.dropdownActive)}handleButtonPopoutEvent(){if(this._layoutManager.layoutConfig.settings.popoutWholeStack){if(void 0===this._popoutEvent)throw new J(\"HHBPOE17834\");this._popoutEvent()}else{const t=this._getActiveComponentItemEvent();t&&t.popout()}}handleButtonMaximiseToggleEvent(t){if(void 0===this._maximiseToggleEvent)throw new J(\"HHBMTE16834\");this._maximiseToggleEvent()}onClick(t){t.target===this._element&&this.notifyClick(t)}onTouchStart(t){t.target===this._element&&this.notifyTouchStart(t)}notifyClick(t){if(void 0===this._clickEvent)throw new J(\"HNHC46834\");this._clickEvent(t)}notifyTouchStart(t){if(void 0===this._touchStartEvent)throw new J(\"HNHTS46834\");this._touchStartEvent(t)}}class ee extends $t{constructor(t,e,i){var n,o,s,r,a,l,h,d,c,m,u,p,g,f,v,_,y,C,w;super(t,e,i,ee.createElement(document)),this._headerSideChanged=!1,this._resizeListener=()=>this.handleResize(),this._maximisedListener=()=>this.handleMaximised(),this._minimisedListener=()=>this.handleMinimised(),this._headerConfig=e.header;const I=t.layoutConfig.header,b=e.content;let S;if(1!==b.length)S=void 0;else{S=b[0].header}this._initialWantMaximise=e.maximised,this._initialActiveItemIndex=null!==(n=e.activeItemIndex)&&void 0!==n?n:0;const E=null!==(r=null!==(s=null===(o=this._headerConfig)||void 0===o?void 0:o.show)&&void 0!==s?s:null==S?void 0:S.show)&&void 0!==r?r:I.show,x=null!==(h=null!==(l=null===(a=this._headerConfig)||void 0===a?void 0:a.popout)&&void 0!==l?l:null==S?void 0:S.popout)&&void 0!==h?h:I.popout,L=null!==(m=null!==(c=null===(d=this._headerConfig)||void 0===d?void 0:d.maximise)&&void 0!==c?c:null==S?void 0:S.maximise)&&void 0!==m?m:I.maximise,z=null!==(g=null!==(p=null===(u=this._headerConfig)||void 0===u?void 0:u.close)&&void 0!==p?p:null==S?void 0:S.close)&&void 0!==g?g:I.close,M=null!==(_=null!==(v=null===(f=this._headerConfig)||void 0===f?void 0:f.minimise)&&void 0!==v?v:null==S?void 0:S.minimise)&&void 0!==_?_:I.minimise,P=null!==(w=null!==(C=null===(y=this._headerConfig)||void 0===y?void 0:y.tabDropdown)&&void 0!==C?C:null==S?void 0:S.tabDropdown)&&void 0!==w?w:I.tabDropdown;this._maximisedEnabled=!1!==L;const T={show:!1!==E,side:!1===E?nt.top:E,popoutEnabled:!1!==x,popoutLabel:!1===x?\"\":x,maximiseEnabled:this._maximisedEnabled,maximiseLabel:!1===L?\"\":L,closeEnabled:!1!==z,closeLabel:!1===z?\"\":z,minimiseEnabled:!0,minimiseLabel:M,tabDropdownEnabled:!1!==P,tabDropdownLabel:!1===P?\"\":P};this._header=new te(t,this,T,e.isClosable&&!1!==z,(()=>this.getActiveComponentItem()),(()=>this.remove()),(()=>this.handlePopoutEvent()),(()=>this.toggleMaximise()),(t=>this.handleHeaderClickEvent(t)),(t=>this.handleHeaderTouchStartEvent(t)),(t=>this.handleHeaderComponentRemoveEvent(t)),(t=>this.handleHeaderComponentFocusEvent(t)),((t,e,i,n)=>this.handleHeaderComponentStartDragEvent(t,e,i,n))),this.isStack=!0,this._childElementContainer=document.createElement(\"section\"),this._childElementContainer.classList.add(\"lm_items\"),this.on(\"resize\",this._resizeListener),this._maximisedEnabled&&(this.on(\"maximised\",this._maximisedListener),this.on(\"minimised\",this._minimisedListener)),this.element.appendChild(this._header.element),this.element.appendChild(this._childElementContainer),this.setupHeaderPosition(),this._header.updateClosability()}get childElementContainer(){return this._childElementContainer}get header(){return this._header}get headerShow(){return this._header.show}get headerSide(){return this._header.side}get headerLeftRightSided(){return this._header.leftRightSided}get contentAreaDimensions(){return this._contentAreaDimensions}get initialWantMaximise(){return this._initialWantMaximise}get isMaximised(){return this===this.layoutManager.maximisedStack}get stackParent(){if(!this.parent)throw new Error(\"Stack should always have a parent\");return this.parent}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}init(){if(!0===this.isInitialised)return;this.updateNodeSize();for(let t=0;t0){if(this._initialActiveItemIndex<0||this._initialActiveItemIndex>=e)throw new Error(`ActiveItemIndex out of range: ${this._initialActiveItemIndex} id: ${this.id}`);for(let i=0;ithis.contentItems.length)throw e-=1,new X(\"SAC99728\");if(t instanceof jt)return e=super.addChild(t,e),this._childElementContainer.appendChild(t.element),this._header.createTab(t,e),this.setActiveComponentItem(t,i),this._header.updateTabSizes(),this.updateSize(!1),t.container.setBaseLogicalZIndex(),this._header.updateClosability(),this.emitStateChangedEvent(),e;throw new X(\"SACC88532\")}removeChild(t,e){const i=t,n=this.contentItems.indexOf(i),o=1===this.contentItems.length;if(this._activeComponentItem===i&&(i.focused&&i.blur(),!o)){const t=0===n?1:n-1;this.setActiveComponentItem(this.contentItems[t],!1)}this._header.removeTab(i),super.removeChild(i,e),o||this._header.updateClosability(),this.emitStateChangedEvent()}toggleMaximise(){this.isMaximised?this.minimise():this.maximise()}maximise(){if(!this.isMaximised){this.layoutManager.setMaximisedStack(this);const t=this.contentItems,e=t.length;for(let i=0;i0&&void 0===t)throw new Error(\"expected non-empty stack to have an active component item\");return{type:\"stack\",content:this.calculateConfigContent(),size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,isClosable:this.isClosable,maximised:this.isMaximised,header:this.createHeaderConfig(),activeItemIndex:t}}onDrop(t,e){if(\"header\"===this._dropSegment){if(this.resetHeaderDropZone(),void 0===this._dropIndex)throw new J(\"SODDI68990\");return void this.addChild(t,this._dropIndex)}if(\"body\"===this._dropSegment)return void this.addChild(t,0,!0);const i=\"top\"===this._dropSegment||\"bottom\"===this._dropSegment,n=\"left\"===this._dropSegment||\"right\"===this._dropSegment,o=\"top\"===this._dropSegment||\"left\"===this._dropSegment,s=i&&this.stackParent.isColumn||n&&this.stackParent.isRow;if(t.isComponent){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createAndInitContentItem(e,this);i.addChild(t),t=i}if(t.type===at.row||t.type===at.column){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}if(s){const e=this.stackParent.contentItems.indexOf(this);this.stackParent.addChild(t,o?e:e+1,!0),this.size*=.5,t.size=this.size,t.sizeUnit=this.sizeUnit,this.stackParent.updateSize(!1)}else{const e=i?at.column:at.row,n=ct.createDefault(e),s=this.layoutManager.createContentItem(n,this);this.stackParent.replaceChild(this,s),s.addChild(t,o?0:void 0,!0),s.addChild(this,o?void 0:0,!0),this.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}highlightDropZone(t,e){for(const i in this._contentAreaDimensions){const n=i,o=this._contentAreaDimensions[n].hoverArea;if(o.x1t&&o.y1e)return void(\"header\"===n?(this._dropSegment=\"header\",this.highlightHeaderDropZone(this._header.leftRightSided?e:t)):(this.resetHeaderDropZone(),this.highlightBodyDropZone(n)))}}getArea(){if(\"none\"===this.element.style.display)return null;const t=super.getElementArea(this._header.element),e=super.getElementArea(this._childElementContainer);if(null===t||null===e)throw new K(\"SGAHC13086\");const i=e.x2-e.x1,n=e.y2-e.y1;return this._contentAreaDimensions={header:{hoverArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2},highlightArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2}}},0===this.contentItems.length?(this._contentAreaDimensions.body={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2}},super.getElementArea(this.element)):(this._contentAreaDimensions.left={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x1+.25*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x1+.5*i,y2:e.y2}},this._contentAreaDimensions.top={hoverArea:{x1:e.x1+.25*i,y1:e.y1,x2:e.x1+.75*i,y2:e.y1+.5*n},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y1+.5*n}},this._contentAreaDimensions.right={hoverArea:{x1:e.x1+.75*i,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1+.5*i,y1:e.y1,x2:e.x2,y2:e.y2}},this._contentAreaDimensions.bottom={hoverArea:{x1:e.x1+.25*i,y1:e.y1+.5*n,x2:e.x1+.75*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1+.5*n,x2:e.x2,y2:e.y2}},super.getElementArea(this.element))}positionHeader(t){this._header.side!==t&&(this._header.setSide(t),this._headerSideChanged=!0,this.setupHeaderPosition())}updateNodeSize(){if(\"none\"!==this.element.style.display){const t=kt(this.element);if(this._header.show){t[this._header.leftRightSided?it.width:it.height]-=this.layoutManager.layoutConfig.dimensions.headerHeight}this._childElementContainer.style.width=zt(t.width),this._childElementContainer.style.height=zt(t.height);for(let e=0;e=o&&tthis.onDrag(t,e,i))),this._dragListener.on(\"dragStop\",(()=>this.onDrop())),this.createDragProxyElements(t,e),null===this._componentItem.parent)throw new K(\"DPC10097\");this._componentItemFocused=this._componentItem.focused,this._componentItemFocused&&this._componentItem.blur(),this._componentItem.parent.removeChild(this._componentItem,!0),this.setDimensions(),document.body.appendChild(this._element),this.determineMinMaxXY(),this._layoutManager.calculateItemAreas(),this.setDropPosition(t,e)}get element(){return this._element}createDragProxyElements(t,e){this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_dragProxy\");const i=document.createElement(\"div\");i.classList.add(\"lm_header\");const n=document.createElement(\"div\");n.classList.add(\"lm_tabs\");const o=document.createElement(\"div\");o.classList.add(\"lm_tab\");const s=document.createElement(\"span\");s.classList.add(\"lm_title\"),o.appendChild(s),n.appendChild(o),i.appendChild(n),this._proxyContainerElement=document.createElement(\"div\"),this._proxyContainerElement.classList.add(\"lm_content\"),this._element.appendChild(i),this._element.appendChild(this._proxyContainerElement),this._originalParent instanceof ee&&this._originalParent.headerShow&&(this._sided=this._originalParent.headerLeftRightSided,this._element.classList.add(\"lm_\"+this._originalParent.headerSide),[nt.right,nt.bottom].indexOf(this._originalParent.headerSide)>=0&&this._proxyContainerElement.insertAdjacentElement(\"afterend\",i)),this._element.style.left=zt(t),this._element.style.top=zt(e),o.setAttribute(\"title\",this._componentItem.title),s.insertAdjacentText(\"afterbegin\",this._componentItem.title),this._proxyContainerElement.appendChild(this._componentItem.element)}determineMinMaxXY(){const t=this._layoutManager.groundItem;if(void 0===t)throw new J(\"DPDMMXY73109\");{const e=t.element.getBoundingClientRect();this._minX=e.left+document.body.scrollLeft,this._minY=e.top+document.body.scrollTop,this._maxX=this._minX+e.width,this._maxY=this._minY+e.height}}onDrag(t,e,i){const n=i.pageX,o=i.pageY;this.setDropPosition(n,o),this._componentItem.drag()}setDropPosition(t,e){this._layoutManager.layoutConfig.settings.constrainDragToContainer&&(t<=this._minX?t=Math.ceil(this._minX):t>=this._maxX&&(t=Math.floor(this._maxX)),e<=this._minY?e=Math.ceil(this._minY):e>=this._maxY&&(e=Math.floor(this._maxY))),this._element.style.left=zt(t),this._element.style.top=zt(e),this._area=this._layoutManager.getArea(t,e),null!==this._area&&(this._lastValidArea=this._area,this._area.contentItem.highlightDropZone(t,e,this._area))}onDrop(){const t=this._layoutManager.dropTargetIndicator;if(null===t)throw new K(\"DPOD30011\");let e;if(t.hide(),this._componentItem.exitDragMode(),null!==this._area)e=this._componentItem,this._area.contentItem.onDrop(e,this._area);else if(null!==this._lastValidArea){e=this._componentItem;this._lastValidArea.contentItem.onDrop(e,this._lastValidArea)}else this._originalParent?(e=this._componentItem,this._originalParent.addChild(e)):this._componentItem.destroy();this._element.remove(),this._layoutManager.emit(\"itemDropped\",this._componentItem),this._componentItemFocused&&void 0!==e&&e.focus()}setDimensions(){const t=this._layoutManager.layoutConfig.dimensions;if(void 0===t)throw new Error(\"DragProxy.setDimensions: dimensions undefined\");let e=t.dragProxyWidth,i=t.dragProxyHeight;if(void 0===e||void 0===i)throw new Error(\"DragProxy.setDimensions: width and/or height undefined\");const n=!1===this._layoutManager.layoutConfig.header.show?0:t.headerHeight;this._element.style.width=zt(e),this._element.style.height=zt(i),e-=this._sided?n:0,i-=this._sided?0:n,this._proxyContainerElement.style.width=zt(e),this._proxyContainerElement.style.height=zt(i),this._componentItem.enterDragMode(e,i),this._componentItem.show()}}class ne{constructor(t,e,i,n,o,s,r){this._layoutManager=t,this._element=e,this._extraAllowableChildTargets=i,this._componentTypeOrFtn=n,this._componentState=o,this._title=s,this._id=r,this._dragListener=null,this._dummyGroundContainer=document.createElement(\"div\");const a=gt.createDefault(\"row\");this._dummyGroundContentItem=new Yt(this._layoutManager,a,this._dummyGroundContainer),this.createDragListener()}destroy(){this.removeDragListener()}createDragListener(){this.removeDragListener(),this._dragListener=new Zt(this._element,this._extraAllowableChildTargets),this._dragListener.on(\"dragStart\",((t,e)=>this.onDragStart(t,e))),this._dragListener.on(\"dragStop\",(()=>this.onDragStop()))}onDragStart(t,e){var i;const n=\"component\";let o;if(\"function\"==typeof this._componentTypeOrFtn){const t=this._componentTypeOrFtn();o=ne.isDragSourceComponentItemConfig(t)?{type:n,componentState:t.state,componentType:t.type,title:null!==(i=t.title)&&void 0!==i?i:this._title}:t}else o={type:n,componentState:this._componentState,componentType:this._componentTypeOrFtn,title:this._title,id:this._id};const s=bt.resolve(o,!1),r=new jt(this._layoutManager,s,this._dummyGroundContentItem);if(this._dummyGroundContentItem.contentItems.push(r),null===this._dragListener)throw new K(\"DSODSD66746\");{const i=new ie(t,e,this._dragListener,this._layoutManager,r,this._dummyGroundContentItem),n=this._layoutManager.transitionIndicator;if(null===n)throw new K(\"DSODST66746\");n.transitionElements(this._element,i.element)}}onDragStop(){this.createDragListener()}removeDragListener(){null!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=null)}}!function(t){t.isDragSourceComponentItemConfig=function(t){return!(\"componentType\"in t)}}(ne||(ne={}));class oe{constructor(){this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_dropTargetIndicator\");const t=document.createElement(\"div\");t.classList.add(\"lm_inner\"),this._element.appendChild(t),document.body.appendChild(this._element)}destroy(){this._element.remove()}highlightArea(t,e){this._element.style.left=zt(t.x1+e),this._element.style.top=zt(t.y1+e),this._element.style.width=zt(t.x2-t.x1-e),this._element.style.height=zt(t.y2-t.y1-e),this._element.style.display=\"block\"}hide(){Dt(this._element,!1)}}class se{constructor(){this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_transition_indicator\"),document.body.appendChild(this._element),this._toElement=null,this._fromDimensions=null,this._totalAnimationDuration=200,this._animationStartTime=null}destroy(){this._element.remove()}transitionElements(t,e){}nextAnimationFrame(){}measure(t){const e=t.getBoundingClientRect();return{left:e.left,top:e.top,width:t.offsetWidth,height:t.offsetHeight}}}class re extends Wt{constructor(t){super(),this._layoutManager=t,this._childEventListener=t=>this.onEventFromChild(t),globalThis.addEventListener(re.ChildEventName,this._childEventListener,{passive:!0})}emit(t,...e){\"userBroadcast\"===t?this.emitUserBroadcast(...e):super.emit(t,...e)}emitUserBroadcast(...t){this.handleUserBroadcastEvent(\"userBroadcast\",t)}destroy(){globalThis.removeEventListener(re.ChildEventName,this._childEventListener)}handleUserBroadcastEvent(t,e){this._layoutManager.isSubWindow?this.propagateToParent(t,e):this.propagateToThisAndSubtree(t,e)}onEventFromChild(t){const e=t.detail;this.handleUserBroadcastEvent(e.eventName,e.args)}propagateToParent(t,e){const i={bubbles:!0,cancelable:!0,detail:{layoutManager:this._layoutManager,eventName:t,args:e}},n=new CustomEvent(re.ChildEventName,i),o=globalThis.opener;if(null===o)throw new K(\"EHPTP15778\");o.dispatchEvent(n)}propagateToThisAndSubtree(t,e){this.emitUnknown(t,...e);for(let i=0;ithis.handleContainerResize())),this._windowBeforeUnloadListener=()=>this.onBeforeUnload(),this._windowBeforeUnloadListening=!1,this._maximisedStackBeforeDestroyedListener=t=>this.cleanupBeforeMaximisedStackDestroyed(t),this.isSubWindow=t.isSubWindow,this._constructorOrSubWindowLayoutConfig=t.constructorOrSubWindowLayoutConfig,Q.checkInitialise(),dt.checkInitialise(),void 0!==t.containerElement&&(this._containerElement=t.containerElement)}get container(){return this._containerElement}get isInitialised(){return this._isInitialised}get groundItem(){return this._groundItem}get root(){return this._groundItem}get openPopouts(){return this._openPopouts}get dropTargetIndicator(){return this._dropTargetIndicator}get transitionIndicator(){return this._transitionIndicator}get width(){return this._width}get height(){return this._height}get eventHub(){return this._eventHub}get rootItem(){if(void 0===this._groundItem)throw new Error(\"Cannot access rootItem before init\");return 0===this._groundItem.contentItems.length?void 0:this._groundItem.contentItems[0]}get focusedComponentItem(){return this._focusedComponentItem}get tabDropPlaceholder(){return this._tabDropPlaceholder}get maximisedStack(){return this._maximisedStack}get deprecatedConstructor(){return!this.isSubWindow&&void 0!==this._constructorOrSubWindowLayoutConfig}destroy(){if(this._isInitialised){this._windowBeforeUnloadListening&&(globalThis.removeEventListener(\"beforeunload\",this._windowBeforeUnloadListener),this._windowBeforeUnloadListening=!1),!0===this.layoutConfig.settings.closePopoutsOnUnload&&this.closeAllOpenPopouts(),this._resizeObserver.disconnect(),this.checkClearResizeTimeout(),void 0!==this._groundItem&&this._groundItem.destroy(),this._tabDropPlaceholder.remove(),null!==this._dropTargetIndicator&&this._dropTargetIndicator.destroy(),null!==this._transitionIndicator&&this._transitionIndicator.destroy(),this._eventHub.destroy();for(const t of this._dragSources)t.destroy();this._dragSources=[],this._isInitialised=!1}}minifyConfig(t){return _t.minifyConfig(t)}unminifyConfig(t){return _t.unminifyConfig(t)}init(){let t;if(this.setContainer(),this._dropTargetIndicator=new oe,this._transitionIndicator=new se,this.updateSizeFromContainer(),this.isSubWindow){if(void 0===this._constructorOrSubWindowLayoutConfig)throw new J(\"LMIU07155\");{const e=this._constructorOrSubWindowLayoutConfig.root;if(void 0===e)throw new X(\"LMIC07156\");if(!Ct.isComponent(e))throw new X(\"LMIC07157\");t=e;const i=xt.resolve(this._constructorOrSubWindowLayoutConfig);this.layoutConfig=Object.assign(Object.assign({},i),{root:void 0})}}else void 0===this._constructorOrSubWindowLayoutConfig?this.layoutConfig=_t.createDefault():this.layoutConfig=xt.resolve(this._constructorOrSubWindowLayoutConfig);const e=this.layoutConfig;this._groundItem=new Yt(this,e.root,this._containerElement),this._groundItem.init(),this.checkLoadedLayoutMaximiseItem(),this._resizeObserver.observe(this._containerElement),this._isInitialised=!0,this.adjustColumnsResponsive(),this.emit(\"initialised\"),void 0!==t&&this.loadComponentAsRoot(t)}loadLayout(t){if(!this.isInitialised)throw new Error(\"GoldenLayout: Need to call init() if LayoutConfig with defined root passed to constructor\");if(void 0===this._groundItem)throw new J(\"LMLL11119\");this.createSubWindows(),this.layoutConfig=xt.resolve(t),this._groundItem.loadRoot(this.layoutConfig.root),this.checkLoadedLayoutMaximiseItem(),this.adjustColumnsResponsive()}saveLayout(){if(!1===this._isInitialised)throw new Error(\"Can't create config, layout not yet initialised\");if(void 0===this._groundItem)throw new J(\"LMTC18244\");{const t=this._groundItem.calculateConfigContent();let e;e=1!==t.length?void 0:t[0],this.reconcilePopoutWindows();const i=[];for(let t=0;t=0?n=this._groundItem.contentItems[0]:e=0;break;case at.row:case at.column:e=n.addItem(t,i.index);break;case at.stack:if(Ct.isComponent(t)){e=n.addItem(t,i.index);break}throw Error(tt[6]);case at.component:throw new X(\"LMAIALC87444602\");default:throw new Y(\"LMAIALU98881733\",n.type)}if(Ct.isComponent(t)){const t=n.contentItems[e];Gt.isStack(t)&&(n=t,e=0)}return i.parentItem=n,i.index=e,i}}}loadComponentAsRoot(t){if(void 0===this._groundItem)throw new Error(\"Cannot add item before init\");this._groundItem.loadComponentAsRoot(t)}updateSize(t,e){this.setSize(t,e)}setSize(t,e){if(this._width=t,this._height=e,!0===this._isInitialised){if(void 0===this._groundItem)throw new J(\"LMUS18881\");if(this._groundItem.setSize(this._width,this._height),this._maximisedStack){const{width:t,height:e}=kt(this._containerElement);Tt(this._maximisedStack.element,t),At(this._maximisedStack.element,e),this._maximisedStack.updateSize(!1)}this.adjustColumnsResponsive()}}beginSizeInvalidation(){this._sizeInvalidationBeginCount++}endSizeInvalidation(){0==--this._sizeInvalidationBeginCount&&this.updateSizeFromContainer()}updateSizeFromContainer(){const{width:t,height:e}=kt(this._containerElement);this.setSize(t,e)}updateRootSize(t=!1){if(void 0===this._groundItem)throw new J(\"LMURS28881\");this._groundItem.updateSize(t)}createAndInitContentItem(t,e){const i=this.createContentItem(t,e);return i.init(),i}createContentItem(t,e){if(\"string\"!=typeof t.type)throw new G(\"Missing parameter 'type'\",JSON.stringify(t));if(ct.isComponentItem(t)&&!(e instanceof ee)&&e&&!(!0===this.isSubWindow&&e instanceof Yt)){t={type:at.stack,content:[t],size:t.size,sizeUnit:t.sizeUnit,minSize:t.minSize,minSizeUnit:t.minSizeUnit,id:t.id,maximised:t.maximised,isClosable:t.isClosable,activeItemIndex:0,header:void 0}}return this.createContentItemFromConfig(t,e)}findFirstComponentItemById(t){if(void 0===this._groundItem)throw new J(\"LMFFCIBI82446\");return this.findFirstContentItemTypeByIdRecursive(at.component,t,this._groundItem)}createPopout(t,e,i,n){return t instanceof Gt?this.createPopoutFromContentItem(t,e,i,n):this.createPopoutFromItemConfig(t,e,i,n)}createPopoutFromContentItem(t,e,i,n){let o=t.parent,s=t;for(;null!==o&&1===o.contentItems.length&&!o.isGround;)s=o,o=o.parent;if(null===o)throw new K(\"LMCPFCI00834\");{if(void 0===n&&(n=o.contentItems.indexOf(s)),null!==i&&o.addPopInParentId(i),void 0===e){const i=globalThis.screenX||globalThis.screenLeft,n=globalThis.screenY||globalThis.screenTop,o=t.element.offsetLeft,s=t.element.offsetTop,{width:r,height:a}=kt(t.element);e={left:i+o,top:n+s,width:r,height:a}}const r=t.toConfig();if(t.remove(),ft.isRootItemConfig(r))return this.createPopoutFromItemConfig(r,e,i,n);throw new Error(`${tt[0]}`)}}beginVirtualSizedContainerAdding(){0==++this._virtualSizedContainerAddingBeginCount&&(this._virtualSizedContainers.length=0)}addVirtualSizedContainer(t){this._virtualSizedContainers.push(t)}endVirtualSizedContainerAdding(){if(0==--this._virtualSizedContainerAddingBeginCount){const t=this._virtualSizedContainers.length;if(t>0){this.fireBeforeVirtualRectingEvent(t);for(let e=0;ethis.emit(\"windowOpened\",a))),a.on(\"closed\",(()=>this.reconcilePopoutWindows())),this._openPopouts.push(a),this.layoutConfig.settings.closePopoutsOnUnload&&!this._windowBeforeUnloadListening&&(globalThis.addEventListener(\"beforeunload\",this._windowBeforeUnloadListener,{passive:!0}),this._windowBeforeUnloadListening=!0),a}closeAllOpenPopouts(){for(let t=0;tglobalThis.close()),1)}getArea(t,e){let i=null,n=1/0;for(let o=0;o=s.x1&&t=s.y1&&es.surface&&(n=s.surface,i=s)}return i}calculateItemAreas(){const t=this.getAllContentItems(),e=this._groundItem;if(void 0===e)throw new J(\"LMCIAR44365\");if(1!==t.length){e.contentItems[0].isStack?this._itemAreas=[]:this._itemAreas=e.createSideAreas();for(let e=0;e0){let e=t[0];if(Gt.isComponentItem(e)){const t=e.parent;if(null===t)throw new K(\"LMXLLMI69999\");e=t}if(!Gt.isStack(e))throw new X(\"LMCLLMI19993\");e.maximise()}}}processMaximiseStack(t){if(this._maximisedStack=t,t.on(\"beforeItemDestroyed\",this._maximisedStackBeforeDestroyedListener),t.element.classList.add(\"lm_maximised\"),t.element.insertAdjacentElement(\"afterend\",this._maximisePlaceholder),void 0===this._groundItem)throw new J(\"LMMXI19993\");{this._groundItem.element.prepend(t.element);const{width:e,height:i}=kt(this._containerElement);Tt(t.element,e),At(t.element,i),t.updateSize(!0),t.focusActiveContentItem(),this._maximisedStack.emit(\"maximised\"),this.emit(\"stateChanged\")}}processMinimiseMaximisedStack(){if(void 0===this._maximisedStack)throw new X(\"LMMMS74422\");{const t=this._maximisedStack;if(null===t.parent)throw new K(\"LMMI13668\");t.element.classList.remove(\"lm_maximised\"),this._maximisePlaceholder.insertAdjacentElement(\"afterend\",t.element),this._maximisePlaceholder.remove(),this.updateRootSize(!0),this._maximisedStack=void 0,t.off(\"beforeItemDestroyed\",this._maximisedStackBeforeDestroyedListener),t.emit(\"minimised\"),this.emit(\"stateChanged\")}}reconcilePopoutWindows(){const t=[];for(let e=0;e{this._resizeTimeoutId=void 0,this.beginSizeInvalidation(),this.endSizeInvalidation()}),this.resizeDebounceInterval))}checkClearResizeTimeout(){void 0!==this._resizeTimeoutId&&(clearTimeout(this._resizeTimeoutId),this._resizeTimeoutId=void 0)}setContainer(){var t;const e=document.body,i=null!==(t=this._containerElement)&&void 0!==t?t:e;if(i===e){this.resizeWithContainerAutomatically=!0;const t=document.documentElement;t.style.height=\"100%\",t.style.margin=\"0\",t.style.padding=\"0\",t.style.overflow=\"clip\",e.style.height=\"100%\",e.style.margin=\"0\",e.style.padding=\"0\",e.style.overflow=\"clip\"}this._containerElement=i}onBeforeUnload(){this.destroy()}adjustColumnsResponsive(){if(void 0===this._groundItem)throw new J(\"LMACR20883\");if(this._firstLoad=!1,this.useResponsiveLayout()&&!this._updatingColumnsResponsive&&this._groundItem.contentItems.length>0&&this._groundItem.contentItems[0].isRow){if(void 0===this._groundItem||null===this._width)throw new J(\"LMACR77412\");{const t=this._groundItem.contentItems[0].contentItems.length;if(t<=1)return;{const e=this.layoutConfig.dimensions.defaultMinItemWidth;if(t*e<=this._width)return;{this._updatingColumnsResponsive=!0;const i=t-Math.max(Math.floor(this._width/e),1),n=this._groundItem.contentItems[0],o=this.getAllStacks();if(0===o.length)throw new X(\"LMACRS77413\");{const t=o[0];for(let e=0;en?void 0:{parentItem:t,index:o}}}case 1:if(void 0===this._focusedComponentItem)return;{const t=this._focusedComponentItem.parentItem;return this.tryCreateLocationFromParentItem(t,e)}case 2:{const t=this.findFirstContentItemType(at.stack);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 3:{let t=this.findFirstContentItemType(at.row);return void 0!==t?this.tryCreateLocationFromParentItem(t,e):(t=this.findFirstContentItemType(at.column),void 0!==t?this.tryCreateLocationFromParentItem(t,e):void 0)}case 4:{const t=this.findFirstContentItemType(at.row);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 5:{const t=this.findFirstContentItemType(at.column);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 6:if(void 0===this._groundItem)throw new J(\"LMFLRIF18244\");return void 0!==this.rootItem?void 0:void 0===e||0===e?{parentItem:this._groundItem,index:0}:void 0;case 7:if(void 0===this._groundItem)throw new J(\"LMFLF18244\");{const t=this._groundItem.contentItems;if(0===t.length)return void 0===e||0===e?{parentItem:this._groundItem,index:0}:void 0;{const i=t[0];return this.tryCreateLocationFromParentItem(i,e)}}}}tryCreateLocationFromParentItem(t,e){const i=t.contentItems.length;return void 0===e?{parentItem:t,index:i}:e<0||e>i?void 0:{parentItem:t,index:e}}}!function(t){t.createMaximisePlaceElement=function(t){const e=t.createElement(\"div\");return e.classList.add(\"lm_maximise_place\"),e},t.createTabDropPlaceholderElement=function(t){const e=t.createElement(\"div\");return e.classList.add(\"lm_drop_tab_placeholder\"),e},t.defaultLocationSelectors=[{typeId:1,index:void 0},{typeId:2,index:void 0},{typeId:3,index:void 0},{typeId:7,index:void 0}],t.afterFocusedItemIfPossibleLocationSelectors=[{typeId:0,index:1},{typeId:2,index:void 0},{typeId:3,index:void 0},{typeId:7,index:void 0}]}(ae||(ae={}));class le extends ae{constructor(t,e,i,n){if(super(le.createLayoutManagerConstructorParameters(t,e)),this._bindComponentEventHanlderPassedInConstructor=!1,this._creationTimeoutPassed=!1,void 0!==e&&\"function\"==typeof e&&(this.bindComponentEvent=e,this._bindComponentEventHanlderPassedInConstructor=!0,void 0!==i&&(this.unbindComponentEvent=i)),!this._bindComponentEventHanlderPassedInConstructor&&this.isSubWindow){if(void 0===this._constructorOrSubWindowLayoutConfig)throw new J(\"VLC98823\");{const t=xt.resolve(this._constructorOrSubWindowLayoutConfig);this.layoutConfig=Object.assign(Object.assign({},t),{root:void 0})}}!0!==n&&(this.deprecatedConstructor||this.init())}destroy(){this.bindComponentEvent=void 0,this.unbindComponentEvent=void 0,super.destroy()}init(){if(this._bindComponentEventHanlderPassedInConstructor||\"loading\"!==document.readyState&&null!==document.body){if(!this._bindComponentEventHanlderPassedInConstructor&&!0===this.isSubWindow&&!this._creationTimeoutPassed)return setTimeout((()=>this.init()),7),void(this._creationTimeoutPassed=!0);!0===this.isSubWindow&&(this._bindComponentEventHanlderPassedInConstructor||this.clearHtmlAndAdjustStylesForSubWindow(),window.__glInstance=this),super.init()}else document.addEventListener(\"DOMContentLoaded\",(()=>this.init()),{passive:!0})}clearHtmlAndAdjustStylesForSubWindow(){const t=document.head,e=new Array(4);e[0]=document.querySelectorAll(\"body link\"),e[1]=document.querySelectorAll(\"body style\"),e[2]=document.querySelectorAll(\"template\"),e[3]=document.querySelectorAll(\".gl_keep\");for(let i=0;ithis.emit(\"popIn\"))),document.body.appendChild(t),!0}}bindComponent(t,e){if(void 0!==this.bindComponentEvent){return this.bindComponentEvent(t,e)}if(void 0!==this.getComponentEvent)return{virtual:!1,component:this.getComponentEvent(t,e)};{const t=`${tt[2]}: ${JSON.stringify(e)}`;throw new Z(t)}}unbindComponent(t,e,i){if(void 0!==this.unbindComponentEvent)this.unbindComponentEvent(t);else if(!e&&void 0!==this.releaseComponentEvent){if(void 0===i)throw new J(\"VCUCRCU333998\");this.releaseComponentEvent(t,i)}}}!function(t){let e=!1;t.createLayoutManagerConstructorParameters=function(t,i){const n=e?null:new URL(document.location.href).searchParams.get(\"gl-window\");e=!0;const o=null!==n;let s,r;if(null!==n){const e=localStorage.getItem(n);if(null===e)throw new Error(\"Null gl-window Config\");localStorage.removeItem(n);const i=JSON.parse(e),o=_t.unminifyConfig(i);r=xt.fromResolved(o),t instanceof HTMLElement&&(s=t)}else void 0===t?r=void 0:t instanceof HTMLElement?(r=void 0,s=t):r=t,void 0===s&&i instanceof HTMLElement&&(s=i);return{constructorOrSubWindowLayoutConfig:r,isSubWindow:o,containerElement:s}}}(le||(le={}));class he extends le{constructor(t,e,i){super(t,e,i,!0),this._componentTypesMap=new Map,this._registeredComponentMap=new Map,this._virtuableComponentMap=new Map,this._containerVirtualRectingRequiredEventListener=(t,e,i)=>this.handleContainerVirtualRectingRequiredEvent(t,e,i),this._containerVirtualVisibilityChangeRequiredEventListener=(t,e)=>this.handleContainerVirtualVisibilityChangeRequiredEvent(t,e),this._containerVirtualZIndexChangeRequiredEventListener=(t,e,i)=>this.handleContainerVirtualZIndexChangeRequiredEvent(t,e,i),this.deprecatedConstructor||this.init()}registerComponent(t,e,i=!1){if(\"function\"!=typeof e)throw new $(\"registerComponent() componentConstructorOrFactoryFtn parameter is not a function\");if(e.hasOwnProperty(\"prototype\")){const n=e;this.registerComponentConstructor(t,n,i)}else{const n=e;this.registerComponentFactoryFunction(t,n,i)}}registerComponentConstructor(t,e,i=!1){if(\"function\"!=typeof e)throw new Error(tt[1]);if(void 0!==this._componentTypesMap.get(t))throw new Z(`${tt[3]}: ${t}`);this._componentTypesMap.set(t,{constructor:e,factoryFunction:void 0,virtual:i})}registerComponentFactoryFunction(t,e,i=!1){if(\"function\"!=typeof e)throw new Z(\"Please register a constructor function\");if(void 0!==this._componentTypesMap.get(t))throw new Z(`${tt[3]}: ${t}`);this._componentTypesMap.set(t,{constructor:void 0,factoryFunction:e,virtual:i})}registerComponentFunction(t){this.registerGetComponentConstructorCallback(t)}registerGetComponentConstructorCallback(t){if(\"function\"!=typeof t)throw new Error(\"Please register a callback function\");void 0!==this._getComponentConstructorFtn&&console.warn(\"Multiple component functions are being registered. Only the final registered function will be used.\"),this._getComponentConstructorFtn=t}getRegisteredComponentTypeNames(){const t=this._componentTypesMap.keys();return Array.from(t)}getComponentInstantiator(t){let e;const i=pt.resolveComponentTypeName(t);return void 0!==i&&(e=this._componentTypesMap.get(i)),void 0===e&&void 0!==this._getComponentConstructorFtn&&(e={constructor:this._getComponentConstructorFtn(t),factoryFunction:void 0,virtual:!1}),e}bindComponent(t,e){let i;const n=pt.resolveComponentTypeName(e);let o;if(void 0!==n&&(i=this._componentTypesMap.get(n)),void 0===i&&void 0!==this._getComponentConstructorFtn&&(i={constructor:this._getComponentConstructorFtn(e),factoryFunction:void 0,virtual:!1}),void 0!==i){const s=i.virtual;let r,a;r=void 0===e.componentState?void 0:Ut({},e.componentState);const l=i.constructor;if(void 0!==l)a=new l(t,r,s);else{const e=i.factoryFunction;if(void 0===e)throw new X(\"LMBCFFU10008\");a=e(t,r,s)}if(s){if(void 0===a)throw new J(\"GLBCVCU988774\");{const e=a,i=e.rootHtmlElement;if(void 0===i)throw new Z(`${tt[5]}: ${n}`);!function(t){const e=\"absolute\";t.style.position!==e&&(t.style.position=e)}(i),this.container.appendChild(i),this._virtuableComponentMap.set(t,e),t.virtualRectingRequiredEvent=this._containerVirtualRectingRequiredEventListener,t.virtualVisibilityChangeRequiredEvent=this._containerVirtualVisibilityChangeRequiredEventListener,t.virtualZIndexChangeRequiredEvent=this._containerVirtualZIndexChangeRequiredEventListener}}this._registeredComponentMap.set(t,a),o={virtual:i.virtual,component:a}}else o=super.bindComponent(t,e);return o}unbindComponent(t,e,i){if(void 0===this._registeredComponentMap.get(t))super.unbindComponent(t,e,i);else{const e=this._virtuableComponentMap.get(t);if(void 0!==e){const i=e.rootHtmlElement;if(void 0===i)throw new X(\"GLUC77743\",t.title);this.container.removeChild(i),this._virtuableComponentMap.delete(t)}}}fireBeforeVirtualRectingEvent(t){this._goldenLayoutBoundingClientRect=this.container.getBoundingClientRect(),super.fireBeforeVirtualRectingEvent(t)}handleContainerVirtualRectingRequiredEvent(t,e,i){const n=this._virtuableComponentMap.get(t);if(void 0===n)throw new J(\"GLHCSCE55933\");{const o=n.rootHtmlElement;if(void 0===o)throw new Z(tt[4]+\" \"+t.title);{const n=t.element.getBoundingClientRect(),s=n.left-this._goldenLayoutBoundingClientRect.left;o.style.left=zt(s);const r=n.top-this._goldenLayoutBoundingClientRect.top;o.style.top=zt(r),Tt(o,e),At(o,i)}}}handleContainerVirtualVisibilityChangeRequiredEvent(t,e){const i=this._virtuableComponentMap.get(t);if(void 0===i)throw new J(\"GLHCVVCRE55934\");{const n=i.rootHtmlElement;if(void 0===n)throw new Z(tt[4]+\" \"+t.title);Dt(n,e)}}handleContainerVirtualZIndexChangeRequiredEvent(t,e,i){const n=this._virtuableComponentMap.get(t);if(void 0===n)throw new J(\"GLHCVZICRE55935\");{const e=n.rootHtmlElement;if(void 0===e)throw new Z(tt[4]+\" \"+t.title);e.style.zIndex=i}}}const de=\"initial_\",ce={show:\"top\",popout:!1,maximise:!1,close:\"close-tab-unused\"},me={headerHeight:31},ue={hasHeaders:!0,reorderEnabled:!0},pe={popoutWholeStack:!1,constrainDragToContainer:!1,constrainDragToHeaders:!1,preventDragout:!1,showMaximiseIcon:!1,showPopoutIcon:!1,showCloseIcon:!1,blockedPopoutsThrowError:!0,closePopoutsOnUnload:!0,selectionEnabled:!1};var ge,fe;class ve{constructor(e){this.layout=e,ge.set(this,void 0),fe.set(this,void 0),this.handleResize=t=>{t.forEach((t=>this.resizeElement(t.target)))},this.handleMutation=()=>{this.layout.viewComponentsByContainerElement.forEach((t=>{this.resizeElement(t.container.element)}))},t.__classPrivateFieldSet(this,ge,new ResizeObserver(this.handleResize),\"f\"),t.__classPrivateFieldSet(this,fe,new MutationObserver(this.handleMutation),\"f\")}observeMutations(e){t.__classPrivateFieldGet(this,fe,\"f\")?.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[\"class\"]})}destroy(){t.__classPrivateFieldGet(this,ge,\"f\").disconnect(),t.__classPrivateFieldGet(this,fe,\"f\").disconnect()}observeContainer(e){t.__classPrivateFieldGet(this,ge,\"f\").observe(e)}unobserveContainer(e){t.__classPrivateFieldGet(this,ge,\"f\").unobserve(e)}resizeElement(t){const e=this.layout.viewComponentsByContainerElement.get(t);e&&e.resize()}}ge=new WeakMap,fe=new WeakMap;var _e={};Object.defineProperty(_e,\"__esModule\",{value:!0});var ye=_e.BaseItem=void 0;class Ce{constructor(t,e,i){this._item=t,this._layout=e,this._wrap=i}get raw(){return this._item}get layout(){return this._layout}get type(){return this._item.type}get contentItems(){return(this._item.contentItems??[]).map((t=>this._wrap(t)))}get parent(){const t=this._item.parent;return t?this._wrap(t):null}setActiveContentItem(t,e){if(\"stack\"!==this.type)throw new Error(`Cannot call setActiveContentItem from a non-stack item: ${this.type}`);this._item.setActiveContentItem(t.raw,e)}static wrapInternal(t,e,i){const n=Ce.wrapCache.get(e);if(n)return n;const o=new t(e,i,(e=>Ce.wrapInternal(t,e,i)));return Ce.wrapCache.set(e,o),o}}ye=_e.BaseItem=Ce,Ce.wrapCache=new WeakMap;const we=t=>!!t&&\"contentItems\"in t&&(t.isRow||t.isColumn);class Ie extends ye{isRoot(){return!!this._item.parent?.isGround}getBounds(){return this._item.element.getBoundingClientRect()}get viewName(){if(this._item.isComponent){const{component:t}=this._item;return t.identity.name}throw new Error(\"View name not found\")}onDestroyed(t){const e=({target:i})=>{i===this._item&&(t(),this._item.off(\"itemDestroyed\",e))};this._item.on(\"itemDestroyed\",e)}createAdjacentStack({position:t=\"right\"}={}){const e=this.raw;if(ee.isStack(e)&&e.parent){const i=[\"top\",\"bottom\"].includes(t)?\"column\":\"row\",n=[\"left\",\"top\"].includes(t)?1:0,o=we(e.parent)?e.parent:e.layoutManager,s=o,r=e.parent.contentItems.indexOf(e);e.parent.isGround&&e.parent.removeChild(e,!0);const a=o.newItem({type:i,content:[{type:\"stack\",content:[]}]},r);if(!a)throw new Error(\"createAdjacentStack: Failed to create new container\");const l=a.contentItems[0];return a.addChild(this.raw,n),we(s)&&s.removeChild(e,!0),this._wrap(l)}throw new Error(`Cannot creat adjacent stacks for type: ${e.type}, must be type 'stack'`)}setActiveContentItem(t,e=!0){if(!ee.isStack(this._item))throw new Error(`Cannot call setActiveContentItem from a non-stack item: ${this.type}`);this._item.setActiveComponentItem(t.raw,!e)}static wrap(t,e){return ye.wrapInternal(Ie,t,e)}}function be(t=[],e){for(const i of t)\"component\"===i.type?Object.keys(e).forEach((t=>{t in i&&(i.componentState={[`${de}${t}`]:i[t],...i.componentState}),i[t]=e[t]})):be(i.content,e)}function Se(t=[],e,i){for(const n of t)if(\"component\"===n.type)Object.keys(e).forEach((t=>{if(`${de}${t}`in n.componentState)return n[t]=n.componentState[`${de}${t}`],void delete n.componentState[`${de}${t}`];n[t]=e[t]}));else{if(n.size&&(\"row\"===i||\"column\"===i)){n[\"row\"===i?\"width\":\"height\"]=n.size?.includes(\".\")?parseFloat(n.size):parseInt(n.size)}Se(n.content,e,n.type)}}function Ee(t){if(t.root){t.root.content&&Se([t.root],{componentName:\"view\",isClosable:!0});const e=t.root;t.content=[e],delete t.root}return t}const xe=e=>class extends e{connectedCallback(){if(!this.name||!this.uuid)throw new Error(\" Name or uuid attribute missing\");if(!this.src)throw new Error(\" missing 'src' attribute.\");this.#t||(this.#t=document.createElement(\"iframe\"),this.#t.src=this.src,this.#t.style.height=\"100%\",this.#t.style.width=\"100%\",this.#t.style.border=\"none\",this.forceFrameName?this.#t.setAttribute(\"name\",this.forceFrameName):this.#t.setAttribute(\"name\",t.encodeOptions({brokerUrl:this.brokerUrl,name:this.name,uuid:this.uuid,providerId:this.providerId,contextGroup:this.contextGroup},\"of-frame\")),this.#t.setAttribute(\"id\",this.name),this.appendChild(this.#t))}#t;get brokerUrl(){return this.getAttribute(\"of-broker\")}set brokerUrl(t){t&&this.setAttribute(\"of-broker\",t)}get name(){return this.getAttribute(\"of-name\")}set name(t){t&&this.setAttribute(\"of-name\",t)}get forceFrameName(){return this.getAttribute(\"forceFrameName\")}set forceFrameName(t){t&&this.setAttribute(\"forceFrameName\",t)}get uuid(){return this.getAttribute(\"of-uuid\")}set uuid(t){t&&this.setAttribute(\"of-uuid\",t)}get src(){return this.getAttribute(\"src\")}set src(t){t&&this.setAttribute(\"src\",t)}get providerId(){return this.getAttribute(\"of-provider-id\")}set providerId(t){t&&this.setAttribute(\"of-provider-id\",t)}get contextGroup(){return this.getAttribute(\"of-context-group\")}set contextGroup(t){t&&this.setAttribute(\"of-context-group\",t)}static get observedAttributes(){return[\"name\"]}};class Le{static create(t){const e=document.createElement(\"of-view\");return Object.entries(t).forEach((([t,i])=>{e.setAttribute(t,i)})),e}}customElements.define(\"of-view\",xe(HTMLElement));class ze{constructor(t,i,n,{brokerUrl:o,interopConfig:s},r){this.container=t,this.config=i,this.ofView=null,this.isDragging=()=>this.container.tab.element?.className.includes(\"lm_dragging\")??!1;const{url:a,web:l,interop:h,name:d}=i||{},c=d??`internal-generated-view-${e.v4()}`;if(this.identity={uuid:n,name:c},this.container.element.setAttribute(\"of-name\",c),this.container.element.id=`container-${c}`,this.container.parent.id=c,void 0===a)return void this.handleUrlMissing();const m=this.updateTitleIfNotSet(a),u={\"of-broker\":o,\"of-uuid\":n,\"of-name\":c,src:a};l?.frameName&&(u.forceFrameName=l.frameName);const p=h?.currentContextGroup??s?.currentContextGroup;p&&(u[\"of-context-group\"]=p),s?.providerId&&(u[\"of-provider-id\"]=s?.providerId),this.ofView=Le.create(u),this.ofView.title=m??`Iframe: ${a}`,r.appendChild(this.ofView),this.ofView.style.position=\"absolute\"}updateTitleIfNotSet(t){return\"view\"===this.container.parent.title&&this.container.parent.setTitle(t),this.container.parent.title}handleUrlMissing(){const t=document.createElement(\"div\");t.setAttribute(\"style\",\"padding: 20px\");t.innerText=\"No URL provided\",this.container.element.appendChild(t)}destroy(){this.ofView?.remove(),this.ofView=null}closeView(){this.container.close()}resize(){if(this.ofView){if(this.isDragging())return void(this.ofView.style.display=\"none\");const t=this.container.element.getBoundingClientRect();this.ofView.style.position=\"absolute\",this.ofView.style.height=`${t.height}px`,this.ofView.style.width=`${t.width}px`,this.ofView.style.inset=`${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`,this.ofView.style.display=\"block\"}}}class Me extends U{static overrideConfig(t){const e={...ue,...t.settings,...pe};return e.reorderEnabled?be(t.content,{isClosable:!0}):be(t.content,{reorderEnabled:!1}),{dimensions:me,...t,settings:e,header:{...ce,show:!1!==t.settings?.hasHeaders&&ce.show}}}constructor(t,e,i,{options:n},o,s){super(),this.identity=t,this.container=e,this.initialConfig=i,this.layoutManager=o,this.platformProvider=s,this.viewComponentsByContainerElement=new Map,this.layoutContentCache=_.getSingleInstance(),this.reparentingViews=new Set,this.goldenLayoutDestroyed=!1,this.createViewComponent=(t,e)=>{m.handleSharedView(this.layoutManager,this.identity,e);const i=new ze(t,e,this.identity.uuid,this.options,this.iframeContainer);return e&&!1===e[`${de}isClosable`]&&this.stylesheet.insertRule(`#tab-${i.identity.name} .lm_close_tab { display: none; }`),this.viewComponentsByContainerElement.set(t.element,i),this.resizeController.observeContainer(t.element),i},this.iframeContainer=document.createElement(\"div\"),this.iframeContainer.id=`openfin-layout-iframe-container-${this.identity.layoutName}`,this.domEmitter=new V(e),this.setupStylesheets(),this.layout=new he(this.container),this.layout.resizeWithContainerAutomatically=!0,this.options=n,this.layout.registerComponent(\"view\",this.createViewComponent),this.setupListeners(),this.resizeController=new ve(this),this.layout.loadLayout(Me.overrideConfig(i));const r=document.createElement(\"div\");r.id=`openfin-layout-shadow-container-${this.identity.layoutName}`,r.attachShadow({mode:\"open\",delegatesFocus:!1}).appendChild(this.iframeContainer),this.container.appendChild(r),this.resizeController.observeMutations(this.container)}getStackByView({name:t}){const e=this.layout.findFirstComponentItemById(t);if(e?.parent&&e?.parent?.isStack)return Ie.wrap(e.parent,this)}getRoot(){return Ie.wrap(this.layout.rootItem,this)}async platformCloseView(t){const e=[...this.viewComponentsByContainerElement.values()].find((e=>e.identity.name===t.name));if(!e)throw new Error(`View with name: ${t.name} not found in layout.`);e.closeView()}async platformCreateView(t,{location:e,targetView:i}={}){if(i)throw new Error(\"TargetView not supported in web\");const n={options:this.platformProvider.normalizeOptions(t),target:this.identity,location:e};return this.insertView(n)}setupStylesheets(){if(this.container.setAttribute(\"data-openfin-layout-name\",this.identity.layoutName),this.stylesheet=new CSSStyleSheet,this.stylesheet.insertRule(\".lm_close { display: none; }\"),document.adoptedStyleSheets.push(this.stylesheet),this.initialConfig.settings?.preventSplitterResize){const t=`\\n [data-openfin-layout-name='${this.identity.layoutName}'] .lm_splitter {\\n pointer-events: none;\\n }`;this.stylesheet.insertRule(t)}}insertView({options:t,location:e,targetView:i}){const n=e?this.layoutContentCache.getItemOrUndefined(e.id):void 0,o=i?this.layoutContentCache.getItemOrUndefined(i.name):void 0,s=n??o??Ie.wrap(this.layout.rootItem,this);let r;if(ee.isStack(s.raw))r=s.raw;else{if(!we(s.raw))throw new Error(\"Cannot add a view at the requested location\");r=s.raw.newItem({type:\"stack\",content:[]})}const a=Math.min(r.contentItems.length,e?.index??r.contentItems.length);let l=this.layout.findFirstComponentItemById(t.name);l?(l.parent&&l.parent.removeChild(l,!0),r.addChild(l,a)):l=r.newComponent(\"view\",t,t.title??t.url??\"Default Title\",a);const h=l.component.identity;return Promise.resolve({identity:h})}replaceView({viewToReplace:t,newView:e}){throw new Error(\"Method not implemented.\")}replaceLayout(t){throw new Error(\"Method not implemented.\")}async cleanupView(t){}applyPreset(t){throw new Error(\"Method not implemented.\")}getCurrentViews(){return[...this.viewComponentsByContainerElement.values()].map((t=>t.identity))}async getFrameSnapshot(){return Ee(xt.fromResolved(this.layout.toConfig()))}isVisible(){return W(this.container)}async onViewDetached({viewIdentity:t}){this.reparentingViews.add(t.name),this.platformCloseView(t)}async destroy(){this.goldenLayoutDestroyed||(this.goldenLayoutDestroyed=!0,this.layout.destroy()),this.iframeContainer.remove(),this.resizeController.destroy(),document.adoptedStyleSheets=document.adoptedStyleSheets.filter((t=>t!==this.stylesheet)),this.viewComponentsByContainerElement.clear()}setupListeners(){this.container.addEventListener(\"pointerdown\",(t=>{if(t.target instanceof HTMLElement){const e=t.target.classList;[\"lm_tab\",\"lm_title\",\"lm_splitter\",\"lm_drag_handle\"].some((t=>e.contains(t)))&&(this.handleDragStart(),2===t.button&&t.stopPropagation())}}),!0),document.addEventListener(\"pointerup\",(()=>this.handleDragEnd()),!0),this.layout.on(\"tabCreated\",(t=>{const e=t.componentItem.component;t.element.id=`tab-${e.identity.name}`,this.domEmitter.dispatchLocalEvent(\"tab-created\",e.identity)})),this.layout.on(\"itemCreated\",(({target:t})=>{const e=t;if(Gt.isComponentItem(e)){const t=e.component;this.domEmitter.dispatchLocalEvent(\"container-created\",t.identity)}})),this.layout.on(\"itemDestroyed\",(t=>{const e=t.target;if(Gt.isComponentItem(e)){const t=e.component;this.removeViewComponent(t)}})),this.layout.on(\"itemDropped\",(()=>{this.handleDragEnd()}))}handleDragStart(){this.iframeContainer.style.pointerEvents=\"none\"}handleDragEnd(){this.iframeContainer.style.pointerEvents=\"\"}removeViewComponent(t){if(t.config&&!1===t.config[`${de}isClosable`]){const e=[...this.stylesheet.cssRules].findIndex((e=>e.cssText.includes(`#tab-${t.identity.name}`)));this.stylesheet.deleteRule(e)}t.destroy(),this.viewComponentsByContainerElement.delete(t.container.element),this.resizeController.unobserveContainer(t.container.element),this.reparentingViews.has(t.identity.name)?this.reparentingViews.delete(t.identity.name):this.platformProvider.closeView(t.identity.name);0===this.getCurrentViews().length&&(this.goldenLayoutDestroyed||(this.goldenLayoutDestroyed=!0,m.handleLastViewRemoved(this.layoutManager,this.identity)))}}class Pe{constructor(t,e,i,n){this.windowIdentity=t,this.connectConfig=e,this.provider=i,this.fallbackContainer=n}async createLayout(t,e){if(!(\"container\"in t)&&!this.fallbackContainer)throw new Error(\"Container property is not optional in web\");const{layoutName:i}=t,n=t,o=this.provider.initLayoutViews(n),s=n.container??this.fallbackContainer,r={...this.windowIdentity,layoutName:i},a=new Me(r,s,o,this.connectConfig,e,this.provider);m.registerLayout(e,i,a),this.fallbackContainer=null}async getLayoutSnapshot(t){return t.getLayoutSnapshot()}async handleLastViewRemoved(t){}}class Te{static async init(e){const i=e.getFin().InterApplicationBus.Channel,n=await i.create(`custom-frame-${e.me.uuid}`);return n.setDefaultAction((async(t,{target:e,opts:i},o)=>{const s=n.connections.find((t=>t.name===e.name));if(s)return n.dispatch(s,t,{...i,target:e});throw new Error(`Client with name ${e.name} not found`)})),await t.relayChannelClientApi_1(n,\"layout-relay\"),new Te(e)}constructor(t){this.wire=t,this.viewNames=new Set}normalizeOptions(t,i=\"default\"){const n=this.wire.me.uuid;let{name:o=`internal-generated-view-${e.v4()}`}=t;return o.match(/^internal-generated-view-/)&&this.viewNames.has(o)&&\"duplicate\"===i&&(o=`internal-generated-view-${e.v4()}`),this.viewNames.add(o),{...t,name:o,uuid:n}}closeView(t){this.viewNames.delete(t)}initLayoutViews({layout:t,multiInstanceViewBehavior:e}){return H((t=>{if(\"component\"===t.type&&t.componentState){const i=this.normalizeOptions(t.componentState,e);return{...t,componentState:i}}return t}),t)}}var Ae;const ke=t=>t;Ae=new WeakMap,exports.WebLayoutEntryPoint=class{constructor(e){Ae.set(this,void 0),this.initLayoutManager=async(e,i,{container:n,layoutManagerOverride:o})=>{const s=await Te.init(i),r=o??ke,a=new Pe(i.me,t.__classPrivateFieldGet(this,Ae,\"f\"),s,n),l=new(r(m.createClosedConstructor(a)));return await M(i,l),l},this.applyLayoutSnapshot=async(e,i,n)=>{await i.applyLayoutSnapshot(t.__classPrivateFieldGet(this,Ae,\"f\").platform.layoutSnapshot)},this.createLayout=async(t,e)=>m.createLayout(t,e),this.destroyLayout=async(t,e)=>m.destroyLayout(t,e),t.__classPrivateFieldSet(this,Ae,e,\"f\")}};\n","'use strict'\n\nexports.byteLength = byteLength\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\nfor (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i]\n revLookup[code.charCodeAt(i)] = i\n}\n\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction getLens (b64) {\n var len = b64.length\n\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // Trim off extra bytes after placeholder bytes are found\n // See: https://github.com/beatgammit/base64-js/issues/42\n var validLen = b64.indexOf('=')\n if (validLen === -1) validLen = len\n\n var placeHoldersLen = validLen === len\n ? 0\n : 4 - (validLen % 4)\n\n return [validLen, placeHoldersLen]\n}\n\n// base64 is 4/3 + up to two characters of the original data\nfunction byteLength (b64) {\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction _byteLength (b64, validLen, placeHoldersLen) {\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction toByteArray (b64) {\n var tmp\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n\n var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))\n\n var curByte = 0\n\n // if there are placeholders, only get up to the last complete 4 chars\n var len = placeHoldersLen > 0\n ? validLen - 4\n : validLen\n\n var i\n for (i = 0; i < len; i += 4) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 18) |\n (revLookup[b64.charCodeAt(i + 1)] << 12) |\n (revLookup[b64.charCodeAt(i + 2)] << 6) |\n revLookup[b64.charCodeAt(i + 3)]\n arr[curByte++] = (tmp >> 16) & 0xFF\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 2) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 2) |\n (revLookup[b64.charCodeAt(i + 1)] >> 4)\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 1) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 10) |\n (revLookup[b64.charCodeAt(i + 1)] << 4) |\n (revLookup[b64.charCodeAt(i + 2)] >> 2)\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] +\n lookup[num >> 12 & 0x3F] +\n lookup[num >> 6 & 0x3F] +\n lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n var tmp\n var output = []\n for (var i = start; i < end; i += 3) {\n tmp =\n ((uint8[i] << 16) & 0xFF0000) +\n ((uint8[i + 1] << 8) & 0xFF00) +\n (uint8[i + 2] & 0xFF)\n output.push(tripletToBase64(tmp))\n }\n return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n var tmp\n var len = uint8.length\n var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n var parts = []\n var maxChunkLength = 16383 // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1]\n parts.push(\n lookup[tmp >> 2] +\n lookup[(tmp << 4) & 0x3F] +\n '=='\n )\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + uint8[len - 1]\n parts.push(\n lookup[tmp >> 10] +\n lookup[(tmp >> 4) & 0x3F] +\n lookup[(tmp << 2) & 0x3F] +\n '='\n )\n }\n\n return parts.join('')\n}\n","/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n/* eslint-disable no-proto */\n\n'use strict'\n\nconst base64 = require('base64-js')\nconst ieee754 = require('ieee754')\nconst customInspectSymbol =\n (typeof Symbol === 'function' && typeof Symbol['for'] === 'function') // eslint-disable-line dot-notation\n ? Symbol['for']('nodejs.util.inspect.custom') // eslint-disable-line dot-notation\n : null\n\nexports.Buffer = Buffer\nexports.SlowBuffer = SlowBuffer\nexports.INSPECT_MAX_BYTES = 50\n\nconst K_MAX_LENGTH = 0x7fffffff\nexports.kMaxLength = K_MAX_LENGTH\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Print warning and recommend using `buffer` v4.x which has an Object\n * implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * We report that the browser does not support typed arrays if the are not subclassable\n * using __proto__. Firefox 4-29 lacks support for adding new properties to `Uint8Array`\n * (See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438). IE 10 lacks support\n * for __proto__ and has a buggy typed array implementation.\n */\nBuffer.TYPED_ARRAY_SUPPORT = typedArraySupport()\n\nif (!Buffer.TYPED_ARRAY_SUPPORT && typeof console !== 'undefined' &&\n typeof console.error === 'function') {\n console.error(\n 'This browser lacks typed array (Uint8Array) support which is required by ' +\n '`buffer` v5.x. Use `buffer` v4.x if you require old browser support.'\n )\n}\n\nfunction typedArraySupport () {\n // Can typed array instances can be augmented?\n try {\n const arr = new Uint8Array(1)\n const proto = { foo: function () { return 42 } }\n Object.setPrototypeOf(proto, Uint8Array.prototype)\n Object.setPrototypeOf(arr, proto)\n return arr.foo() === 42\n } catch (e) {\n return false\n }\n}\n\nObject.defineProperty(Buffer.prototype, 'parent', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.buffer\n }\n})\n\nObject.defineProperty(Buffer.prototype, 'offset', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.byteOffset\n }\n})\n\nfunction createBuffer (length) {\n if (length > K_MAX_LENGTH) {\n throw new RangeError('The value \"' + length + '\" is invalid for option \"size\"')\n }\n // Return an augmented `Uint8Array` instance\n const buf = new Uint8Array(length)\n Object.setPrototypeOf(buf, Buffer.prototype)\n return buf\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new TypeError(\n 'The \"string\" argument must be of type string. Received type number'\n )\n }\n return allocUnsafe(arg)\n }\n return from(arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\nfunction from (value, encodingOrOffset, length) {\n if (typeof value === 'string') {\n return fromString(value, encodingOrOffset)\n }\n\n if (ArrayBuffer.isView(value)) {\n return fromArrayView(value)\n }\n\n if (value == null) {\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n }\n\n if (isInstance(value, ArrayBuffer) ||\n (value && isInstance(value.buffer, ArrayBuffer))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof SharedArrayBuffer !== 'undefined' &&\n (isInstance(value, SharedArrayBuffer) ||\n (value && isInstance(value.buffer, SharedArrayBuffer)))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof value === 'number') {\n throw new TypeError(\n 'The \"value\" argument must not be of type number. Received type number'\n )\n }\n\n const valueOf = value.valueOf && value.valueOf()\n if (valueOf != null && valueOf !== value) {\n return Buffer.from(valueOf, encodingOrOffset, length)\n }\n\n const b = fromObject(value)\n if (b) return b\n\n if (typeof Symbol !== 'undefined' && Symbol.toPrimitive != null &&\n typeof value[Symbol.toPrimitive] === 'function') {\n return Buffer.from(value[Symbol.toPrimitive]('string'), encodingOrOffset, length)\n }\n\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n return from(value, encodingOrOffset, length)\n}\n\n// Note: Change prototype *after* Buffer.from is defined to workaround Chrome bug:\n// https://github.com/feross/buffer/pull/148\nObject.setPrototypeOf(Buffer.prototype, Uint8Array.prototype)\nObject.setPrototypeOf(Buffer, Uint8Array)\n\nfunction assertSize (size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be of type number')\n } else if (size < 0) {\n throw new RangeError('The value \"' + size + '\" is invalid for option \"size\"')\n }\n}\n\nfunction alloc (size, fill, encoding) {\n assertSize(size)\n if (size <= 0) {\n return createBuffer(size)\n }\n if (fill !== undefined) {\n // Only pay attention to encoding if it's a string. This\n // prevents accidentally sending in a number that would\n // be interpreted as a start offset.\n return typeof encoding === 'string'\n ? createBuffer(size).fill(fill, encoding)\n : createBuffer(size).fill(fill)\n }\n return createBuffer(size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n return alloc(size, fill, encoding)\n}\n\nfunction allocUnsafe (size) {\n assertSize(size)\n return createBuffer(size < 0 ? 0 : checked(size) | 0)\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n return allocUnsafe(size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n return allocUnsafe(size)\n}\n\nfunction fromString (string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8'\n }\n\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n\n const length = byteLength(string, encoding) | 0\n let buf = createBuffer(length)\n\n const actual = buf.write(string, encoding)\n\n if (actual !== length) {\n // Writing a hex string, for example, that contains invalid characters will\n // cause everything after the first invalid character to be ignored. (e.g.\n // 'abxxcd' will be treated as 'ab')\n buf = buf.slice(0, actual)\n }\n\n return buf\n}\n\nfunction fromArrayLike (array) {\n const length = array.length < 0 ? 0 : checked(array.length) | 0\n const buf = createBuffer(length)\n for (let i = 0; i < length; i += 1) {\n buf[i] = array[i] & 255\n }\n return buf\n}\n\nfunction fromArrayView (arrayView) {\n if (isInstance(arrayView, Uint8Array)) {\n const copy = new Uint8Array(arrayView)\n return fromArrayBuffer(copy.buffer, copy.byteOffset, copy.byteLength)\n }\n return fromArrayLike(arrayView)\n}\n\nfunction fromArrayBuffer (array, byteOffset, length) {\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\"offset\" is outside of buffer bounds')\n }\n\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\"length\" is outside of buffer bounds')\n }\n\n let buf\n if (byteOffset === undefined && length === undefined) {\n buf = new Uint8Array(array)\n } else if (length === undefined) {\n buf = new Uint8Array(array, byteOffset)\n } else {\n buf = new Uint8Array(array, byteOffset, length)\n }\n\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(buf, Buffer.prototype)\n\n return buf\n}\n\nfunction fromObject (obj) {\n if (Buffer.isBuffer(obj)) {\n const len = checked(obj.length) | 0\n const buf = createBuffer(len)\n\n if (buf.length === 0) {\n return buf\n }\n\n obj.copy(buf, 0, 0, len)\n return buf\n }\n\n if (obj.length !== undefined) {\n if (typeof obj.length !== 'number' || numberIsNaN(obj.length)) {\n return createBuffer(0)\n }\n return fromArrayLike(obj)\n }\n\n if (obj.type === 'Buffer' && Array.isArray(obj.data)) {\n return fromArrayLike(obj.data)\n }\n}\n\nfunction checked (length) {\n // Note: cannot use `length < K_MAX_LENGTH` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= K_MAX_LENGTH) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + K_MAX_LENGTH.toString(16) + ' bytes')\n }\n return length | 0\n}\n\nfunction SlowBuffer (length) {\n if (+length != length) { // eslint-disable-line eqeqeq\n length = 0\n }\n return Buffer.alloc(+length)\n}\n\nBuffer.isBuffer = function isBuffer (b) {\n return b != null && b._isBuffer === true &&\n b !== Buffer.prototype // so Buffer.isBuffer(Buffer.prototype) will be false\n}\n\nBuffer.compare = function compare (a, b) {\n if (isInstance(a, Uint8Array)) a = Buffer.from(a, a.offset, a.byteLength)\n if (isInstance(b, Uint8Array)) b = Buffer.from(b, b.offset, b.byteLength)\n if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n throw new TypeError(\n 'The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array'\n )\n }\n\n if (a === b) return 0\n\n let x = a.length\n let y = b.length\n\n for (let i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i]\n y = b[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n switch (String(encoding).toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'latin1':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return true\n default:\n return false\n }\n}\n\nBuffer.concat = function concat (list, length) {\n if (!Array.isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n\n if (list.length === 0) {\n return Buffer.alloc(0)\n }\n\n let i\n if (length === undefined) {\n length = 0\n for (i = 0; i < list.length; ++i) {\n length += list[i].length\n }\n }\n\n const buffer = Buffer.allocUnsafe(length)\n let pos = 0\n for (i = 0; i < list.length; ++i) {\n let buf = list[i]\n if (isInstance(buf, Uint8Array)) {\n if (pos + buf.length > buffer.length) {\n if (!Buffer.isBuffer(buf)) buf = Buffer.from(buf)\n buf.copy(buffer, pos)\n } else {\n Uint8Array.prototype.set.call(\n buffer,\n buf,\n pos\n )\n }\n } else if (!Buffer.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n } else {\n buf.copy(buffer, pos)\n }\n pos += buf.length\n }\n return buffer\n}\n\nfunction byteLength (string, encoding) {\n if (Buffer.isBuffer(string)) {\n return string.length\n }\n if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) {\n return string.byteLength\n }\n if (typeof string !== 'string') {\n throw new TypeError(\n 'The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. ' +\n 'Received type ' + typeof string\n )\n }\n\n const len = string.length\n const mustMatch = (arguments.length > 2 && arguments[2] === true)\n if (!mustMatch && len === 0) return 0\n\n // Use a for loop to avoid recursion\n let loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'ascii':\n case 'latin1':\n case 'binary':\n return len\n case 'utf8':\n case 'utf-8':\n return utf8ToBytes(string).length\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return len * 2\n case 'hex':\n return len >>> 1\n case 'base64':\n return base64ToBytes(string).length\n default:\n if (loweredCase) {\n return mustMatch ? -1 : utf8ToBytes(string).length // assume utf8\n }\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n let loweredCase = false\n\n // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n // property of a typed array.\n\n // This behaves neither like String nor Uint8Array in that we set start/end\n // to their upper/lower bounds if the value passed is out of range.\n // undefined is handled specially as per ECMA-262 6th Edition,\n // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n if (start === undefined || start < 0) {\n start = 0\n }\n // Return early if start > this.length. Done here to prevent potential uint32\n // coercion fail below.\n if (start > this.length) {\n return ''\n }\n\n if (end === undefined || end > this.length) {\n end = this.length\n }\n\n if (end <= 0) {\n return ''\n }\n\n // Force coercion to uint32. This will also coerce falsey/NaN values to 0.\n end >>>= 0\n start >>>= 0\n\n if (end <= start) {\n return ''\n }\n\n if (!encoding) encoding = 'utf8'\n\n while (true) {\n switch (encoding) {\n case 'hex':\n return hexSlice(this, start, end)\n\n case 'utf8':\n case 'utf-8':\n return utf8Slice(this, start, end)\n\n case 'ascii':\n return asciiSlice(this, start, end)\n\n case 'latin1':\n case 'binary':\n return latin1Slice(this, start, end)\n\n case 'base64':\n return base64Slice(this, start, end)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return utf16leSlice(this, start, end)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = (encoding + '').toLowerCase()\n loweredCase = true\n }\n }\n}\n\n// This property is used by `Buffer.isBuffer` (and the `is-buffer` npm package)\n// to detect a Buffer instance. It's not possible to use `instanceof Buffer`\n// reliably in a browserify context because there could be multiple different\n// copies of the 'buffer' package in use. This method works even for Buffer\n// instances that were created from another copy of the `buffer` package.\n// See: https://github.com/feross/buffer/issues/154\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n const i = b[n]\n b[n] = b[m]\n b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n const len = this.length\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits')\n }\n for (let i = 0; i < len; i += 2) {\n swap(this, i, i + 1)\n }\n return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n const len = this.length\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits')\n }\n for (let i = 0; i < len; i += 4) {\n swap(this, i, i + 3)\n swap(this, i + 1, i + 2)\n }\n return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n const len = this.length\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits')\n }\n for (let i = 0; i < len; i += 8) {\n swap(this, i, i + 7)\n swap(this, i + 1, i + 6)\n swap(this, i + 2, i + 5)\n swap(this, i + 3, i + 4)\n }\n return this\n}\n\nBuffer.prototype.toString = function toString () {\n const length = this.length\n if (length === 0) return ''\n if (arguments.length === 0) return utf8Slice(this, 0, length)\n return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.toLocaleString = Buffer.prototype.toString\n\nBuffer.prototype.equals = function equals (b) {\n if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n if (this === b) return true\n return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n let str = ''\n const max = exports.INSPECT_MAX_BYTES\n str = this.toString('hex', 0, max).replace(/(.{2})/g, '$1 ').trim()\n if (this.length > max) str += ' ... '\n return ''\n}\nif (customInspectSymbol) {\n Buffer.prototype[customInspectSymbol] = Buffer.prototype.inspect\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n if (isInstance(target, Uint8Array)) {\n target = Buffer.from(target, target.offset, target.byteLength)\n }\n if (!Buffer.isBuffer(target)) {\n throw new TypeError(\n 'The \"target\" argument must be one of type Buffer or Uint8Array. ' +\n 'Received type ' + (typeof target)\n )\n }\n\n if (start === undefined) {\n start = 0\n }\n if (end === undefined) {\n end = target ? target.length : 0\n }\n if (thisStart === undefined) {\n thisStart = 0\n }\n if (thisEnd === undefined) {\n thisEnd = this.length\n }\n\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError('out of range index')\n }\n\n if (thisStart >= thisEnd && start >= end) {\n return 0\n }\n if (thisStart >= thisEnd) {\n return -1\n }\n if (start >= end) {\n return 1\n }\n\n start >>>= 0\n end >>>= 0\n thisStart >>>= 0\n thisEnd >>>= 0\n\n if (this === target) return 0\n\n let x = thisEnd - thisStart\n let y = end - start\n const len = Math.min(x, y)\n\n const thisCopy = this.slice(thisStart, thisEnd)\n const targetCopy = target.slice(start, end)\n\n for (let i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i]\n y = targetCopy[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (numberIsNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [val], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n let indexSize = 1\n let arrLength = arr.length\n let valLength = val.length\n\n if (encoding !== undefined) {\n encoding = String(encoding).toLowerCase()\n if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n encoding === 'utf16le' || encoding === 'utf-16le') {\n if (arr.length < 2 || val.length < 2) {\n return -1\n }\n indexSize = 2\n arrLength /= 2\n valLength /= 2\n byteOffset /= 2\n }\n }\n\n function read (buf, i) {\n if (indexSize === 1) {\n return buf[i]\n } else {\n return buf.readUInt16BE(i * indexSize)\n }\n }\n\n let i\n if (dir) {\n let foundIndex = -1\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1) foundIndex = i\n if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n } else {\n if (foundIndex !== -1) i -= i - foundIndex\n foundIndex = -1\n }\n }\n } else {\n if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n for (i = byteOffset; i >= 0; i--) {\n let found = true\n for (let j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false\n break\n }\n }\n if (found) return i\n }\n }\n\n return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n offset = Number(offset) || 0\n const remaining = buf.length - offset\n if (!length) {\n length = remaining\n } else {\n length = Number(length)\n if (length > remaining) {\n length = remaining\n }\n }\n\n const strLen = string.length\n\n if (length > strLen / 2) {\n length = strLen / 2\n }\n let i\n for (i = 0; i < length; ++i) {\n const parsed = parseInt(string.substr(i * 2, 2), 16)\n if (numberIsNaN(parsed)) return i\n buf[offset + i] = parsed\n }\n return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n // Buffer#write(string)\n if (offset === undefined) {\n encoding = 'utf8'\n length = this.length\n offset = 0\n // Buffer#write(string, encoding)\n } else if (length === undefined && typeof offset === 'string') {\n encoding = offset\n length = this.length\n offset = 0\n // Buffer#write(string, offset[, length][, encoding])\n } else if (isFinite(offset)) {\n offset = offset >>> 0\n if (isFinite(length)) {\n length = length >>> 0\n if (encoding === undefined) encoding = 'utf8'\n } else {\n encoding = length\n length = undefined\n }\n } else {\n throw new Error(\n 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n )\n }\n\n const remaining = this.length - offset\n if (length === undefined || length > remaining) length = remaining\n\n if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n throw new RangeError('Attempt to write outside buffer bounds')\n }\n\n if (!encoding) encoding = 'utf8'\n\n let loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'hex':\n return hexWrite(this, string, offset, length)\n\n case 'utf8':\n case 'utf-8':\n return utf8Write(this, string, offset, length)\n\n case 'ascii':\n case 'latin1':\n case 'binary':\n return asciiWrite(this, string, offset, length)\n\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return base64Write(this, string, offset, length)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return ucs2Write(this, string, offset, length)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0)\n }\n}\n\nfunction base64Slice (buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf)\n } else {\n return base64.fromByteArray(buf.slice(start, end))\n }\n}\n\nfunction utf8Slice (buf, start, end) {\n end = Math.min(buf.length, end)\n const res = []\n\n let i = start\n while (i < end) {\n const firstByte = buf[i]\n let codePoint = null\n let bytesPerSequence = (firstByte > 0xEF)\n ? 4\n : (firstByte > 0xDF)\n ? 3\n : (firstByte > 0xBF)\n ? 2\n : 1\n\n if (i + bytesPerSequence <= end) {\n let secondByte, thirdByte, fourthByte, tempCodePoint\n\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 0x80) {\n codePoint = firstByte\n }\n break\n case 2:\n secondByte = buf[i + 1]\n if ((secondByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n if (tempCodePoint > 0x7F) {\n codePoint = tempCodePoint\n }\n }\n break\n case 3:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n codePoint = tempCodePoint\n }\n }\n break\n case 4:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n fourthByte = buf[i + 3]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n codePoint = tempCodePoint\n }\n }\n }\n }\n\n if (codePoint === null) {\n // we did not generate a valid codePoint so insert a\n // replacement char (U+FFFD) and advance only 1 byte\n codePoint = 0xFFFD\n bytesPerSequence = 1\n } else if (codePoint > 0xFFFF) {\n // encode to utf16 (surrogate pair dance)\n codePoint -= 0x10000\n res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n codePoint = 0xDC00 | codePoint & 0x3FF\n }\n\n res.push(codePoint)\n i += bytesPerSequence\n }\n\n return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nconst MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n const len = codePoints.length\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n }\n\n // Decode in chunks to avoid \"call stack size exceeded\".\n let res = ''\n let i = 0\n while (i < len) {\n res += String.fromCharCode.apply(\n String,\n codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n )\n }\n return res\n}\n\nfunction asciiSlice (buf, start, end) {\n let ret = ''\n end = Math.min(buf.length, end)\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F)\n }\n return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n let ret = ''\n end = Math.min(buf.length, end)\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i])\n }\n return ret\n}\n\nfunction hexSlice (buf, start, end) {\n const len = buf.length\n\n if (!start || start < 0) start = 0\n if (!end || end < 0 || end > len) end = len\n\n let out = ''\n for (let i = start; i < end; ++i) {\n out += hexSliceLookupTable[buf[i]]\n }\n return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n const bytes = buf.slice(start, end)\n let res = ''\n // If bytes.length is odd, the last 8 bits must be ignored (same as node.js)\n for (let i = 0; i < bytes.length - 1; i += 2) {\n res += String.fromCharCode(bytes[i] + (bytes[i + 1] * 256))\n }\n return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n const len = this.length\n start = ~~start\n end = end === undefined ? len : ~~end\n\n if (start < 0) {\n start += len\n if (start < 0) start = 0\n } else if (start > len) {\n start = len\n }\n\n if (end < 0) {\n end += len\n if (end < 0) end = 0\n } else if (end > len) {\n end = len\n }\n\n if (end < start) end = start\n\n const newBuf = this.subarray(start, end)\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(newBuf, Buffer.prototype)\n\n return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUintLE =\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let val = this[offset]\n let mul = 1\n let i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUintBE =\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n checkOffset(offset, byteLength, this.length)\n }\n\n let val = this[offset + --byteLength]\n let mul = 1\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUint8 =\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n return this[offset]\n}\n\nBuffer.prototype.readUint16LE =\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUint16BE =\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUint32LE =\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return ((this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16)) +\n (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUint32BE =\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] * 0x1000000) +\n ((this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n this[offset + 3])\n}\n\nBuffer.prototype.readBigUInt64LE = defineBigIntMethod(function readBigUInt64LE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const lo = first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24\n\n const hi = this[++offset] +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n last * 2 ** 24\n\n return BigInt(lo) + (BigInt(hi) << BigInt(32))\n})\n\nBuffer.prototype.readBigUInt64BE = defineBigIntMethod(function readBigUInt64BE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const hi = first * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset]\n\n const lo = this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last\n\n return (BigInt(hi) << BigInt(32)) + BigInt(lo)\n})\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let val = this[offset]\n let mul = 1\n let i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let i = byteLength\n let mul = 1\n let val = this[offset + --i]\n while (i > 0 && (mul *= 0x100)) {\n val += this[offset + --i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n if (!(this[offset] & 0x80)) return (this[offset])\n return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n const val = this[offset] | (this[offset + 1] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n const val = this[offset + 1] | (this[offset] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16) |\n (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] << 24) |\n (this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n (this[offset + 3])\n}\n\nBuffer.prototype.readBigInt64LE = defineBigIntMethod(function readBigInt64LE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const val = this[offset + 4] +\n this[offset + 5] * 2 ** 8 +\n this[offset + 6] * 2 ** 16 +\n (last << 24) // Overflow\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24)\n})\n\nBuffer.prototype.readBigInt64BE = defineBigIntMethod(function readBigInt64BE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const val = (first << 24) + // Overflow\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset]\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last)\n})\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUintLE =\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n let mul = 1\n let i = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUintBE =\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n let i = byteLength - 1\n let mul = 1\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUint8 =\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeUint16LE =\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeUint16BE =\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeUint32LE =\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset + 3] = (value >>> 24)\n this[offset + 2] = (value >>> 16)\n this[offset + 1] = (value >>> 8)\n this[offset] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeUint32BE =\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nfunction wrtBigUInt64LE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7)\n\n let lo = Number(value & BigInt(0xffffffff))\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n return offset\n}\n\nfunction wrtBigUInt64BE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7)\n\n let lo = Number(value & BigInt(0xffffffff))\n buf[offset + 7] = lo\n lo = lo >> 8\n buf[offset + 6] = lo\n lo = lo >> 8\n buf[offset + 5] = lo\n lo = lo >> 8\n buf[offset + 4] = lo\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n buf[offset + 3] = hi\n hi = hi >> 8\n buf[offset + 2] = hi\n hi = hi >> 8\n buf[offset + 1] = hi\n hi = hi >> 8\n buf[offset] = hi\n return offset + 8\n}\n\nBuffer.prototype.writeBigUInt64LE = defineBigIntMethod(function writeBigUInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeBigUInt64BE = defineBigIntMethod(function writeBigUInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n let i = 0\n let mul = 1\n let sub = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n let i = byteLength - 1\n let mul = 1\n let sub = 0\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n if (value < 0) value = 0xff + value + 1\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n this[offset + 2] = (value >>> 16)\n this[offset + 3] = (value >>> 24)\n return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (value < 0) value = 0xffffffff + value + 1\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeBigInt64LE = defineBigIntMethod(function writeBigInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nBuffer.prototype.writeBigInt64BE = defineBigIntMethod(function writeBigInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n }\n ieee754.write(buf, value, offset, littleEndian, 23, 4)\n return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n }\n ieee754.write(buf, value, offset, littleEndian, 52, 8)\n return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n if (!Buffer.isBuffer(target)) throw new TypeError('argument should be a Buffer')\n if (!start) start = 0\n if (!end && end !== 0) end = this.length\n if (targetStart >= target.length) targetStart = target.length\n if (!targetStart) targetStart = 0\n if (end > 0 && end < start) end = start\n\n // Copy 0 bytes; we're done\n if (end === start) return 0\n if (target.length === 0 || this.length === 0) return 0\n\n // Fatal error conditions\n if (targetStart < 0) {\n throw new RangeError('targetStart out of bounds')\n }\n if (start < 0 || start >= this.length) throw new RangeError('Index out of range')\n if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n // Are we oob?\n if (end > this.length) end = this.length\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start\n }\n\n const len = end - start\n\n if (this === target && typeof Uint8Array.prototype.copyWithin === 'function') {\n // Use built-in when available, missing from IE11\n this.copyWithin(targetStart, start, end)\n } else {\n Uint8Array.prototype.set.call(\n target,\n this.subarray(start, end),\n targetStart\n )\n }\n\n return len\n}\n\n// Usage:\n// buffer.fill(number[, offset[, end]])\n// buffer.fill(buffer[, offset[, end]])\n// buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n // Handle string cases:\n if (typeof val === 'string') {\n if (typeof start === 'string') {\n encoding = start\n start = 0\n end = this.length\n } else if (typeof end === 'string') {\n encoding = end\n end = this.length\n }\n if (encoding !== undefined && typeof encoding !== 'string') {\n throw new TypeError('encoding must be a string')\n }\n if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n if (val.length === 1) {\n const code = val.charCodeAt(0)\n if ((encoding === 'utf8' && code < 128) ||\n encoding === 'latin1') {\n // Fast path: If `val` fits into a single byte, use that numeric value.\n val = code\n }\n }\n } else if (typeof val === 'number') {\n val = val & 255\n } else if (typeof val === 'boolean') {\n val = Number(val)\n }\n\n // Invalid ranges are not set to a default, so can range check early.\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError('Out of range index')\n }\n\n if (end <= start) {\n return this\n }\n\n start = start >>> 0\n end = end === undefined ? this.length : end >>> 0\n\n if (!val) val = 0\n\n let i\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val\n }\n } else {\n const bytes = Buffer.isBuffer(val)\n ? val\n : Buffer.from(val, encoding)\n const len = bytes.length\n if (len === 0) {\n throw new TypeError('The value \"' + val +\n '\" is invalid for argument \"value\"')\n }\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len]\n }\n }\n\n return this\n}\n\n// CUSTOM ERRORS\n// =============\n\n// Simplified versions from Node, changed for Buffer-only usage\nconst errors = {}\nfunction E (sym, getMessage, Base) {\n errors[sym] = class NodeError extends Base {\n constructor () {\n super()\n\n Object.defineProperty(this, 'message', {\n value: getMessage.apply(this, arguments),\n writable: true,\n configurable: true\n })\n\n // Add the error code to the name to include it in the stack trace.\n this.name = `${this.name} [${sym}]`\n // Access the stack to generate the error message including the error code\n // from the name.\n this.stack // eslint-disable-line no-unused-expressions\n // Reset the name to the actual name.\n delete this.name\n }\n\n get code () {\n return sym\n }\n\n set code (value) {\n Object.defineProperty(this, 'code', {\n configurable: true,\n enumerable: true,\n value,\n writable: true\n })\n }\n\n toString () {\n return `${this.name} [${sym}]: ${this.message}`\n }\n }\n}\n\nE('ERR_BUFFER_OUT_OF_BOUNDS',\n function (name) {\n if (name) {\n return `${name} is outside of buffer bounds`\n }\n\n return 'Attempt to access memory outside buffer bounds'\n }, RangeError)\nE('ERR_INVALID_ARG_TYPE',\n function (name, actual) {\n return `The \"${name}\" argument must be of type number. Received type ${typeof actual}`\n }, TypeError)\nE('ERR_OUT_OF_RANGE',\n function (str, range, input) {\n let msg = `The value of \"${str}\" is out of range.`\n let received = input\n if (Number.isInteger(input) && Math.abs(input) > 2 ** 32) {\n received = addNumericalSeparator(String(input))\n } else if (typeof input === 'bigint') {\n received = String(input)\n if (input > BigInt(2) ** BigInt(32) || input < -(BigInt(2) ** BigInt(32))) {\n received = addNumericalSeparator(received)\n }\n received += 'n'\n }\n msg += ` It must be ${range}. Received ${received}`\n return msg\n }, RangeError)\n\nfunction addNumericalSeparator (val) {\n let res = ''\n let i = val.length\n const start = val[0] === '-' ? 1 : 0\n for (; i >= start + 4; i -= 3) {\n res = `_${val.slice(i - 3, i)}${res}`\n }\n return `${val.slice(0, i)}${res}`\n}\n\n// CHECK FUNCTIONS\n// ===============\n\nfunction checkBounds (buf, offset, byteLength) {\n validateNumber(offset, 'offset')\n if (buf[offset] === undefined || buf[offset + byteLength] === undefined) {\n boundsError(offset, buf.length - (byteLength + 1))\n }\n}\n\nfunction checkIntBI (value, min, max, buf, offset, byteLength) {\n if (value > max || value < min) {\n const n = typeof min === 'bigint' ? 'n' : ''\n let range\n if (byteLength > 3) {\n if (min === 0 || min === BigInt(0)) {\n range = `>= 0${n} and < 2${n} ** ${(byteLength + 1) * 8}${n}`\n } else {\n range = `>= -(2${n} ** ${(byteLength + 1) * 8 - 1}${n}) and < 2 ** ` +\n `${(byteLength + 1) * 8 - 1}${n}`\n }\n } else {\n range = `>= ${min}${n} and <= ${max}${n}`\n }\n throw new errors.ERR_OUT_OF_RANGE('value', range, value)\n }\n checkBounds(buf, offset, byteLength)\n}\n\nfunction validateNumber (value, name) {\n if (typeof value !== 'number') {\n throw new errors.ERR_INVALID_ARG_TYPE(name, 'number', value)\n }\n}\n\nfunction boundsError (value, length, type) {\n if (Math.floor(value) !== value) {\n validateNumber(value, type)\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset', 'an integer', value)\n }\n\n if (length < 0) {\n throw new errors.ERR_BUFFER_OUT_OF_BOUNDS()\n }\n\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset',\n `>= ${type ? 1 : 0} and <= ${length}`,\n value)\n}\n\n// HELPER FUNCTIONS\n// ================\n\nconst INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n // Node takes equal signs as end of the Base64 encoding\n str = str.split('=')[0]\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = str.trim().replace(INVALID_BASE64_RE, '')\n // Node converts strings with length < 2 to ''\n if (str.length < 2) return ''\n // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n while (str.length % 4 !== 0) {\n str = str + '='\n }\n return str\n}\n\nfunction utf8ToBytes (string, units) {\n units = units || Infinity\n let codePoint\n const length = string.length\n let leadSurrogate = null\n const bytes = []\n\n for (let i = 0; i < length; ++i) {\n codePoint = string.charCodeAt(i)\n\n // is surrogate component\n if (codePoint > 0xD7FF && codePoint < 0xE000) {\n // last char was a lead\n if (!leadSurrogate) {\n // no lead yet\n if (codePoint > 0xDBFF) {\n // unexpected trail\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n } else if (i + 1 === length) {\n // unpaired lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n }\n\n // valid lead\n leadSurrogate = codePoint\n\n continue\n }\n\n // 2 leads in a row\n if (codePoint < 0xDC00) {\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n leadSurrogate = codePoint\n continue\n }\n\n // valid surrogate pair\n codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n } else if (leadSurrogate) {\n // valid bmp char, but last char was a lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n }\n\n leadSurrogate = null\n\n // encode utf8\n if (codePoint < 0x80) {\n if ((units -= 1) < 0) break\n bytes.push(codePoint)\n } else if (codePoint < 0x800) {\n if ((units -= 2) < 0) break\n bytes.push(\n codePoint >> 0x6 | 0xC0,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x10000) {\n if ((units -= 3) < 0) break\n bytes.push(\n codePoint >> 0xC | 0xE0,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x110000) {\n if ((units -= 4) < 0) break\n bytes.push(\n codePoint >> 0x12 | 0xF0,\n codePoint >> 0xC & 0x3F | 0x80,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else {\n throw new Error('Invalid code point')\n }\n }\n\n return bytes\n}\n\nfunction asciiToBytes (str) {\n const byteArray = []\n for (let i = 0; i < str.length; ++i) {\n // Node's code seems to be doing this and not & 0x7F..\n byteArray.push(str.charCodeAt(i) & 0xFF)\n }\n return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n let c, hi, lo\n const byteArray = []\n for (let i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0) break\n\n c = str.charCodeAt(i)\n hi = c >> 8\n lo = c % 256\n byteArray.push(lo)\n byteArray.push(hi)\n }\n\n return byteArray\n}\n\nfunction base64ToBytes (str) {\n return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n let i\n for (i = 0; i < length; ++i) {\n if ((i + offset >= dst.length) || (i >= src.length)) break\n dst[i + offset] = src[i]\n }\n return i\n}\n\n// ArrayBuffer or Uint8Array objects from other contexts (i.e. iframes) do not pass\n// the `instanceof` check but they should be treated as of that type.\n// See: https://github.com/feross/buffer/issues/166\nfunction isInstance (obj, type) {\n return obj instanceof type ||\n (obj != null && obj.constructor != null && obj.constructor.name != null &&\n obj.constructor.name === type.name)\n}\nfunction numberIsNaN (obj) {\n // For IE11 support\n return obj !== obj // eslint-disable-line no-self-compare\n}\n\n// Create lookup table for `toString('hex')`\n// See: https://github.com/feross/buffer/issues/219\nconst hexSliceLookupTable = (function () {\n const alphabet = '0123456789abcdef'\n const table = new Array(256)\n for (let i = 0; i < 16; ++i) {\n const i16 = i * 16\n for (let j = 0; j < 16; ++j) {\n table[i16 + j] = alphabet[i] + alphabet[j]\n }\n }\n return table\n})()\n\n// Return not function with Error if BigInt not supported\nfunction defineBigIntMethod (fn) {\n return typeof BigInt === 'undefined' ? BufferBigIntNotDefined : fn\n}\n\nfunction BufferBigIntNotDefined () {\n throw new Error('BigInt not supported')\n}\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\nvar R = typeof Reflect === 'object' ? Reflect : null\nvar ReflectApply = R && typeof R.apply === 'function'\n ? R.apply\n : function ReflectApply(target, receiver, args) {\n return Function.prototype.apply.call(target, receiver, args);\n }\n\nvar ReflectOwnKeys\nif (R && typeof R.ownKeys === 'function') {\n ReflectOwnKeys = R.ownKeys\n} else if (Object.getOwnPropertySymbols) {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target)\n .concat(Object.getOwnPropertySymbols(target));\n };\n} else {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target);\n };\n}\n\nfunction ProcessEmitWarning(warning) {\n if (console && console.warn) console.warn(warning);\n}\n\nvar NumberIsNaN = Number.isNaN || function NumberIsNaN(value) {\n return value !== value;\n}\n\nfunction EventEmitter() {\n EventEmitter.init.call(this);\n}\nmodule.exports = EventEmitter;\nmodule.exports.once = once;\n\n// Backwards-compat with node 0.10.x\nEventEmitter.EventEmitter = EventEmitter;\n\nEventEmitter.prototype._events = undefined;\nEventEmitter.prototype._eventsCount = 0;\nEventEmitter.prototype._maxListeners = undefined;\n\n// By default EventEmitters will print a warning if more than 10 listeners are\n// added to it. This is a useful default which helps finding memory leaks.\nvar defaultMaxListeners = 10;\n\nfunction checkListener(listener) {\n if (typeof listener !== 'function') {\n throw new TypeError('The \"listener\" argument must be of type Function. Received type ' + typeof listener);\n }\n}\n\nObject.defineProperty(EventEmitter, 'defaultMaxListeners', {\n enumerable: true,\n get: function() {\n return defaultMaxListeners;\n },\n set: function(arg) {\n if (typeof arg !== 'number' || arg < 0 || NumberIsNaN(arg)) {\n throw new RangeError('The value of \"defaultMaxListeners\" is out of range. It must be a non-negative number. Received ' + arg + '.');\n }\n defaultMaxListeners = arg;\n }\n});\n\nEventEmitter.init = function() {\n\n if (this._events === undefined ||\n this._events === Object.getPrototypeOf(this)._events) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n }\n\n this._maxListeners = this._maxListeners || undefined;\n};\n\n// Obviously not all Emitters should be limited to 10. This function allows\n// that to be increased. Set to zero for unlimited.\nEventEmitter.prototype.setMaxListeners = function setMaxListeners(n) {\n if (typeof n !== 'number' || n < 0 || NumberIsNaN(n)) {\n throw new RangeError('The value of \"n\" is out of range. It must be a non-negative number. Received ' + n + '.');\n }\n this._maxListeners = n;\n return this;\n};\n\nfunction _getMaxListeners(that) {\n if (that._maxListeners === undefined)\n return EventEmitter.defaultMaxListeners;\n return that._maxListeners;\n}\n\nEventEmitter.prototype.getMaxListeners = function getMaxListeners() {\n return _getMaxListeners(this);\n};\n\nEventEmitter.prototype.emit = function emit(type) {\n var args = [];\n for (var i = 1; i < arguments.length; i++) args.push(arguments[i]);\n var doError = (type === 'error');\n\n var events = this._events;\n if (events !== undefined)\n doError = (doError && events.error === undefined);\n else if (!doError)\n return false;\n\n // If there is no 'error' event listener then throw.\n if (doError) {\n var er;\n if (args.length > 0)\n er = args[0];\n if (er instanceof Error) {\n // Note: The comments on the `throw` lines are intentional, they show\n // up in Node's output if this results in an unhandled exception.\n throw er; // Unhandled 'error' event\n }\n // At least give some kind of context to the user\n var err = new Error('Unhandled error.' + (er ? ' (' + er.message + ')' : ''));\n err.context = er;\n throw err; // Unhandled 'error' event\n }\n\n var handler = events[type];\n\n if (handler === undefined)\n return false;\n\n if (typeof handler === 'function') {\n ReflectApply(handler, this, args);\n } else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n ReflectApply(listeners[i], this, args);\n }\n\n return true;\n};\n\nfunction _addListener(target, type, listener, prepend) {\n var m;\n var events;\n var existing;\n\n checkListener(listener);\n\n events = target._events;\n if (events === undefined) {\n events = target._events = Object.create(null);\n target._eventsCount = 0;\n } else {\n // To avoid recursion in the case that type === \"newListener\"! Before\n // adding it to the listeners, first emit \"newListener\".\n if (events.newListener !== undefined) {\n target.emit('newListener', type,\n listener.listener ? listener.listener : listener);\n\n // Re-assign `events` because a newListener handler could have caused the\n // this._events to be assigned to a new object\n events = target._events;\n }\n existing = events[type];\n }\n\n if (existing === undefined) {\n // Optimize the case of one listener. Don't need the extra array object.\n existing = events[type] = listener;\n ++target._eventsCount;\n } else {\n if (typeof existing === 'function') {\n // Adding the second element, need to change to array.\n existing = events[type] =\n prepend ? [listener, existing] : [existing, listener];\n // If we've already got an array, just append.\n } else if (prepend) {\n existing.unshift(listener);\n } else {\n existing.push(listener);\n }\n\n // Check for listener leak\n m = _getMaxListeners(target);\n if (m > 0 && existing.length > m && !existing.warned) {\n existing.warned = true;\n // No error code for this since it is a Warning\n // eslint-disable-next-line no-restricted-syntax\n var w = new Error('Possible EventEmitter memory leak detected. ' +\n existing.length + ' ' + String(type) + ' listeners ' +\n 'added. Use emitter.setMaxListeners() to ' +\n 'increase limit');\n w.name = 'MaxListenersExceededWarning';\n w.emitter = target;\n w.type = type;\n w.count = existing.length;\n ProcessEmitWarning(w);\n }\n }\n\n return target;\n}\n\nEventEmitter.prototype.addListener = function addListener(type, listener) {\n return _addListener(this, type, listener, false);\n};\n\nEventEmitter.prototype.on = EventEmitter.prototype.addListener;\n\nEventEmitter.prototype.prependListener =\n function prependListener(type, listener) {\n return _addListener(this, type, listener, true);\n };\n\nfunction onceWrapper() {\n if (!this.fired) {\n this.target.removeListener(this.type, this.wrapFn);\n this.fired = true;\n if (arguments.length === 0)\n return this.listener.call(this.target);\n return this.listener.apply(this.target, arguments);\n }\n}\n\nfunction _onceWrap(target, type, listener) {\n var state = { fired: false, wrapFn: undefined, target: target, type: type, listener: listener };\n var wrapped = onceWrapper.bind(state);\n wrapped.listener = listener;\n state.wrapFn = wrapped;\n return wrapped;\n}\n\nEventEmitter.prototype.once = function once(type, listener) {\n checkListener(listener);\n this.on(type, _onceWrap(this, type, listener));\n return this;\n};\n\nEventEmitter.prototype.prependOnceListener =\n function prependOnceListener(type, listener) {\n checkListener(listener);\n this.prependListener(type, _onceWrap(this, type, listener));\n return this;\n };\n\n// Emits a 'removeListener' event if and only if the listener was removed.\nEventEmitter.prototype.removeListener =\n function removeListener(type, listener) {\n var list, events, position, i, originalListener;\n\n checkListener(listener);\n\n events = this._events;\n if (events === undefined)\n return this;\n\n list = events[type];\n if (list === undefined)\n return this;\n\n if (list === listener || list.listener === listener) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else {\n delete events[type];\n if (events.removeListener)\n this.emit('removeListener', type, list.listener || listener);\n }\n } else if (typeof list !== 'function') {\n position = -1;\n\n for (i = list.length - 1; i >= 0; i--) {\n if (list[i] === listener || list[i].listener === listener) {\n originalListener = list[i].listener;\n position = i;\n break;\n }\n }\n\n if (position < 0)\n return this;\n\n if (position === 0)\n list.shift();\n else {\n spliceOne(list, position);\n }\n\n if (list.length === 1)\n events[type] = list[0];\n\n if (events.removeListener !== undefined)\n this.emit('removeListener', type, originalListener || listener);\n }\n\n return this;\n };\n\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\n\nEventEmitter.prototype.removeAllListeners =\n function removeAllListeners(type) {\n var listeners, events, i;\n\n events = this._events;\n if (events === undefined)\n return this;\n\n // not listening for removeListener, no need to emit\n if (events.removeListener === undefined) {\n if (arguments.length === 0) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n } else if (events[type] !== undefined) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else\n delete events[type];\n }\n return this;\n }\n\n // emit removeListener for all listeners on all events\n if (arguments.length === 0) {\n var keys = Object.keys(events);\n var key;\n for (i = 0; i < keys.length; ++i) {\n key = keys[i];\n if (key === 'removeListener') continue;\n this.removeAllListeners(key);\n }\n this.removeAllListeners('removeListener');\n this._events = Object.create(null);\n this._eventsCount = 0;\n return this;\n }\n\n listeners = events[type];\n\n if (typeof listeners === 'function') {\n this.removeListener(type, listeners);\n } else if (listeners !== undefined) {\n // LIFO order\n for (i = listeners.length - 1; i >= 0; i--) {\n this.removeListener(type, listeners[i]);\n }\n }\n\n return this;\n };\n\nfunction _listeners(target, type, unwrap) {\n var events = target._events;\n\n if (events === undefined)\n return [];\n\n var evlistener = events[type];\n if (evlistener === undefined)\n return [];\n\n if (typeof evlistener === 'function')\n return unwrap ? [evlistener.listener || evlistener] : [evlistener];\n\n return unwrap ?\n unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length);\n}\n\nEventEmitter.prototype.listeners = function listeners(type) {\n return _listeners(this, type, true);\n};\n\nEventEmitter.prototype.rawListeners = function rawListeners(type) {\n return _listeners(this, type, false);\n};\n\nEventEmitter.listenerCount = function(emitter, type) {\n if (typeof emitter.listenerCount === 'function') {\n return emitter.listenerCount(type);\n } else {\n return listenerCount.call(emitter, type);\n }\n};\n\nEventEmitter.prototype.listenerCount = listenerCount;\nfunction listenerCount(type) {\n var events = this._events;\n\n if (events !== undefined) {\n var evlistener = events[type];\n\n if (typeof evlistener === 'function') {\n return 1;\n } else if (evlistener !== undefined) {\n return evlistener.length;\n }\n }\n\n return 0;\n}\n\nEventEmitter.prototype.eventNames = function eventNames() {\n return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : [];\n};\n\nfunction arrayClone(arr, n) {\n var copy = new Array(n);\n for (var i = 0; i < n; ++i)\n copy[i] = arr[i];\n return copy;\n}\n\nfunction spliceOne(list, index) {\n for (; index + 1 < list.length; index++)\n list[index] = list[index + 1];\n list.pop();\n}\n\nfunction unwrapListeners(arr) {\n var ret = new Array(arr.length);\n for (var i = 0; i < ret.length; ++i) {\n ret[i] = arr[i].listener || arr[i];\n }\n return ret;\n}\n\nfunction once(emitter, name) {\n return new Promise(function (resolve, reject) {\n function errorListener(err) {\n emitter.removeListener(name, resolver);\n reject(err);\n }\n\n function resolver() {\n if (typeof emitter.removeListener === 'function') {\n emitter.removeListener('error', errorListener);\n }\n resolve([].slice.call(arguments));\n };\n\n eventTargetAgnosticAddListener(emitter, name, resolver, { once: true });\n if (name !== 'error') {\n addErrorHandlerIfEventEmitter(emitter, errorListener, { once: true });\n }\n });\n}\n\nfunction addErrorHandlerIfEventEmitter(emitter, handler, flags) {\n if (typeof emitter.on === 'function') {\n eventTargetAgnosticAddListener(emitter, 'error', handler, flags);\n }\n}\n\nfunction eventTargetAgnosticAddListener(emitter, name, listener, flags) {\n if (typeof emitter.on === 'function') {\n if (flags.once) {\n emitter.once(name, listener);\n } else {\n emitter.on(name, listener);\n }\n } else if (typeof emitter.addEventListener === 'function') {\n // EventTarget does not have `error` event semantics like Node\n // EventEmitters, we do not listen for `error` events here.\n emitter.addEventListener(name, function wrapListener(arg) {\n // IE does not have builtin `{ once: true }` support so we\n // have to do it manually.\n if (flags.once) {\n emitter.removeEventListener(name, wrapListener);\n }\n listener(arg);\n });\n } else {\n throw new TypeError('The \"emitter\" argument must be of type EventEmitter. Received type ' + typeof emitter);\n }\n}\n","/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */\nexports.read = function (buffer, offset, isLE, mLen, nBytes) {\n var e, m\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var nBits = -7\n var i = isLE ? (nBytes - 1) : 0\n var d = isLE ? -1 : 1\n var s = buffer[offset + i]\n\n i += d\n\n e = s & ((1 << (-nBits)) - 1)\n s >>= (-nBits)\n nBits += eLen\n for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & ((1 << (-nBits)) - 1)\n e >>= (-nBits)\n nBits += mLen\n for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias\n } else if (e === eMax) {\n return m ? NaN : ((s ? -1 : 1) * Infinity)\n } else {\n m = m + Math.pow(2, mLen)\n e = e - eBias\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n var i = isLE ? 0 : (nBytes - 1)\n var d = isLE ? 1 : -1\n var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n value = Math.abs(value)\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0\n e = eMax\n } else {\n e = Math.floor(Math.log(value) / Math.LN2)\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--\n c *= 2\n }\n if (e + eBias >= 1) {\n value += rt / c\n } else {\n value += rt * Math.pow(2, 1 - eBias)\n }\n if (value * c >= 2) {\n e++\n c /= 2\n }\n\n if (e + eBias >= eMax) {\n m = 0\n e = eMax\n } else if (e + eBias >= 1) {\n m = ((value * c) - 1) * Math.pow(2, mLen)\n e = e + eBias\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n e = 0\n }\n }\n\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n e = (e << mLen) | m\n eLen += mLen\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128\n}\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView');\n\nmodule.exports = DataView;\n","var hashClear = require('./_hashClear'),\n hashDelete = require('./_hashDelete'),\n hashGet = require('./_hashGet'),\n hashHas = require('./_hashHas'),\n hashSet = require('./_hashSet');\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\nmodule.exports = Hash;\n","var listCacheClear = require('./_listCacheClear'),\n listCacheDelete = require('./_listCacheDelete'),\n listCacheGet = require('./_listCacheGet'),\n listCacheHas = require('./_listCacheHas'),\n listCacheSet = require('./_listCacheSet');\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\nmodule.exports = ListCache;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map');\n\nmodule.exports = Map;\n","var mapCacheClear = require('./_mapCacheClear'),\n mapCacheDelete = require('./_mapCacheDelete'),\n mapCacheGet = require('./_mapCacheGet'),\n mapCacheHas = require('./_mapCacheHas'),\n mapCacheSet = require('./_mapCacheSet');\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\nmodule.exports = MapCache;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Promise = getNative(root, 'Promise');\n\nmodule.exports = Promise;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Set = getNative(root, 'Set');\n\nmodule.exports = Set;\n","var MapCache = require('./_MapCache'),\n setCacheAdd = require('./_setCacheAdd'),\n setCacheHas = require('./_setCacheHas');\n\n/**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\nfunction SetCache(values) {\n var index = -1,\n length = values == null ? 0 : values.length;\n\n this.__data__ = new MapCache;\n while (++index < length) {\n this.add(values[index]);\n }\n}\n\n// Add methods to `SetCache`.\nSetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\nSetCache.prototype.has = setCacheHas;\n\nmodule.exports = SetCache;\n","var ListCache = require('./_ListCache'),\n stackClear = require('./_stackClear'),\n stackDelete = require('./_stackDelete'),\n stackGet = require('./_stackGet'),\n stackHas = require('./_stackHas'),\n stackSet = require('./_stackSet');\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\nmodule.exports = Stack;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Uint8Array = root.Uint8Array;\n\nmodule.exports = Uint8Array;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar WeakMap = getNative(root, 'WeakMap');\n\nmodule.exports = WeakMap;\n","/**\n * A specialized version of `_.forEach` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\nfunction arrayEach(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (iteratee(array[index], index, array) === false) {\n break;\n }\n }\n return array;\n}\n\nmodule.exports = arrayEach;\n","/**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\nfunction arrayFilter(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result[resIndex++] = value;\n }\n }\n return result;\n}\n\nmodule.exports = arrayFilter;\n","var baseTimes = require('./_baseTimes'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isIndex = require('./_isIndex'),\n isTypedArray = require('./isTypedArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = arrayLikeKeys;\n","/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n}\n\nmodule.exports = arrayPush;\n","/**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\nfunction arraySome(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (predicate(array[index], index, array)) {\n return true;\n }\n }\n return false;\n}\n\nmodule.exports = arraySome;\n","var baseAssignValue = require('./_baseAssignValue'),\n eq = require('./eq');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\nmodule.exports = assignValue;\n","var eq = require('./eq');\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\nmodule.exports = assocIndexOf;\n","var copyObject = require('./_copyObject'),\n keys = require('./keys');\n\n/**\n * The base implementation of `_.assign` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssign(object, source) {\n return object && copyObject(source, keys(source), object);\n}\n\nmodule.exports = baseAssign;\n","var copyObject = require('./_copyObject'),\n keysIn = require('./keysIn');\n\n/**\n * The base implementation of `_.assignIn` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssignIn(object, source) {\n return object && copyObject(source, keysIn(source), object);\n}\n\nmodule.exports = baseAssignIn;\n","var defineProperty = require('./_defineProperty');\n\n/**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction baseAssignValue(object, key, value) {\n if (key == '__proto__' && defineProperty) {\n defineProperty(object, key, {\n 'configurable': true,\n 'enumerable': true,\n 'value': value,\n 'writable': true\n });\n } else {\n object[key] = value;\n }\n}\n\nmodule.exports = baseAssignValue;\n","var Stack = require('./_Stack'),\n arrayEach = require('./_arrayEach'),\n assignValue = require('./_assignValue'),\n baseAssign = require('./_baseAssign'),\n baseAssignIn = require('./_baseAssignIn'),\n cloneBuffer = require('./_cloneBuffer'),\n copyArray = require('./_copyArray'),\n copySymbols = require('./_copySymbols'),\n copySymbolsIn = require('./_copySymbolsIn'),\n getAllKeys = require('./_getAllKeys'),\n getAllKeysIn = require('./_getAllKeysIn'),\n getTag = require('./_getTag'),\n initCloneArray = require('./_initCloneArray'),\n initCloneByTag = require('./_initCloneByTag'),\n initCloneObject = require('./_initCloneObject'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isMap = require('./isMap'),\n isObject = require('./isObject'),\n isSet = require('./isSet'),\n keys = require('./keys'),\n keysIn = require('./keysIn');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_FLAT_FLAG = 2,\n CLONE_SYMBOLS_FLAG = 4;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values supported by `_.clone`. */\nvar cloneableTags = {};\ncloneableTags[argsTag] = cloneableTags[arrayTag] =\ncloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =\ncloneableTags[boolTag] = cloneableTags[dateTag] =\ncloneableTags[float32Tag] = cloneableTags[float64Tag] =\ncloneableTags[int8Tag] = cloneableTags[int16Tag] =\ncloneableTags[int32Tag] = cloneableTags[mapTag] =\ncloneableTags[numberTag] = cloneableTags[objectTag] =\ncloneableTags[regexpTag] = cloneableTags[setTag] =\ncloneableTags[stringTag] = cloneableTags[symbolTag] =\ncloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =\ncloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;\ncloneableTags[errorTag] = cloneableTags[funcTag] =\ncloneableTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.clone` and `_.cloneDeep` which tracks\n * traversed objects.\n *\n * @private\n * @param {*} value The value to clone.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Deep clone\n * 2 - Flatten inherited properties\n * 4 - Clone symbols\n * @param {Function} [customizer] The function to customize cloning.\n * @param {string} [key] The key of `value`.\n * @param {Object} [object] The parent object of `value`.\n * @param {Object} [stack] Tracks traversed objects and their clone counterparts.\n * @returns {*} Returns the cloned value.\n */\nfunction baseClone(value, bitmask, customizer, key, object, stack) {\n var result,\n isDeep = bitmask & CLONE_DEEP_FLAG,\n isFlat = bitmask & CLONE_FLAT_FLAG,\n isFull = bitmask & CLONE_SYMBOLS_FLAG;\n\n if (customizer) {\n result = object ? customizer(value, key, object, stack) : customizer(value);\n }\n if (result !== undefined) {\n return result;\n }\n if (!isObject(value)) {\n return value;\n }\n var isArr = isArray(value);\n if (isArr) {\n result = initCloneArray(value);\n if (!isDeep) {\n return copyArray(value, result);\n }\n } else {\n var tag = getTag(value),\n isFunc = tag == funcTag || tag == genTag;\n\n if (isBuffer(value)) {\n return cloneBuffer(value, isDeep);\n }\n if (tag == objectTag || tag == argsTag || (isFunc && !object)) {\n result = (isFlat || isFunc) ? {} : initCloneObject(value);\n if (!isDeep) {\n return isFlat\n ? copySymbolsIn(value, baseAssignIn(result, value))\n : copySymbols(value, baseAssign(result, value));\n }\n } else {\n if (!cloneableTags[tag]) {\n return object ? value : {};\n }\n result = initCloneByTag(value, tag, isDeep);\n }\n }\n // Check for circular references and return its corresponding clone.\n stack || (stack = new Stack);\n var stacked = stack.get(value);\n if (stacked) {\n return stacked;\n }\n stack.set(value, result);\n\n if (isSet(value)) {\n value.forEach(function(subValue) {\n result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));\n });\n } else if (isMap(value)) {\n value.forEach(function(subValue, key) {\n result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n }\n\n var keysFunc = isFull\n ? (isFlat ? getAllKeysIn : getAllKeys)\n : (isFlat ? keysIn : keys);\n\n var props = isArr ? undefined : keysFunc(value);\n arrayEach(props || value, function(subValue, key) {\n if (props) {\n key = subValue;\n subValue = value[key];\n }\n // Recursively populate clone (susceptible to call stack limits).\n assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n return result;\n}\n\nmodule.exports = baseClone;\n","var isObject = require('./isObject');\n\n/** Built-in value references. */\nvar objectCreate = Object.create;\n\n/**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} proto The object to inherit from.\n * @returns {Object} Returns the new object.\n */\nvar baseCreate = (function() {\n function object() {}\n return function(proto) {\n if (!isObject(proto)) {\n return {};\n }\n if (objectCreate) {\n return objectCreate(proto);\n }\n object.prototype = proto;\n var result = new object;\n object.prototype = undefined;\n return result;\n };\n}());\n\nmodule.exports = baseCreate;\n","var arrayPush = require('./_arrayPush'),\n isArray = require('./isArray');\n\n/**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction baseGetAllKeys(object, keysFunc, symbolsFunc) {\n var result = keysFunc(object);\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n}\n\nmodule.exports = baseGetAllKeys;\n","var Symbol = require('./_Symbol'),\n getRawTag = require('./_getRawTag'),\n objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]';\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\nmodule.exports = baseIsArguments;\n","var baseIsEqualDeep = require('./_baseIsEqualDeep'),\n isObjectLike = require('./isObjectLike');\n\n/**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Unordered comparison\n * 2 - Partial comparison\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\nfunction baseIsEqual(value, other, bitmask, customizer, stack) {\n if (value === other) {\n return true;\n }\n if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\n return value !== value && other !== other;\n }\n return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n}\n\nmodule.exports = baseIsEqual;\n","var Stack = require('./_Stack'),\n equalArrays = require('./_equalArrays'),\n equalByTag = require('./_equalByTag'),\n equalObjects = require('./_equalObjects'),\n getTag = require('./_getTag'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isTypedArray = require('./isTypedArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n var objIsArr = isArray(object),\n othIsArr = isArray(other),\n objTag = objIsArr ? arrayTag : getTag(object),\n othTag = othIsArr ? arrayTag : getTag(other);\n\n objTag = objTag == argsTag ? objectTag : objTag;\n othTag = othTag == argsTag ? objectTag : othTag;\n\n var objIsObj = objTag == objectTag,\n othIsObj = othTag == objectTag,\n isSameTag = objTag == othTag;\n\n if (isSameTag && isBuffer(object)) {\n if (!isBuffer(other)) {\n return false;\n }\n objIsArr = true;\n objIsObj = false;\n }\n if (isSameTag && !objIsObj) {\n stack || (stack = new Stack);\n return (objIsArr || isTypedArray(object))\n ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n }\n if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n if (objIsWrapped || othIsWrapped) {\n var objUnwrapped = objIsWrapped ? object.value() : object,\n othUnwrapped = othIsWrapped ? other.value() : other;\n\n stack || (stack = new Stack);\n return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n }\n }\n if (!isSameTag) {\n return false;\n }\n stack || (stack = new Stack);\n return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n}\n\nmodule.exports = baseIsEqualDeep;\n","var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]';\n\n/**\n * The base implementation of `_.isMap` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n */\nfunction baseIsMap(value) {\n return isObjectLike(value) && getTag(value) == mapTag;\n}\n\nmodule.exports = baseIsMap;\n","var isFunction = require('./isFunction'),\n isMasked = require('./_isMasked'),\n isObject = require('./isObject'),\n toSource = require('./_toSource');\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\nmodule.exports = baseIsNative;\n","var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar setTag = '[object Set]';\n\n/**\n * The base implementation of `_.isSet` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n */\nfunction baseIsSet(value) {\n return isObjectLike(value) && getTag(value) == setTag;\n}\n\nmodule.exports = baseIsSet;\n","var baseGetTag = require('./_baseGetTag'),\n isLength = require('./isLength'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n\nmodule.exports = baseIsTypedArray;\n","var isPrototype = require('./_isPrototype'),\n nativeKeys = require('./_nativeKeys');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeys;\n","var isObject = require('./isObject'),\n isPrototype = require('./_isPrototype'),\n nativeKeysIn = require('./_nativeKeysIn');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeysIn(object) {\n if (!isObject(object)) {\n return nativeKeysIn(object);\n }\n var isProto = isPrototype(object),\n result = [];\n\n for (var key in object) {\n if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeysIn;\n","/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\nmodule.exports = baseTimes;\n","/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n return function(value) {\n return func(value);\n };\n}\n\nmodule.exports = baseUnary;\n","/**\n * Checks if a `cache` value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction cacheHas(cache, key) {\n return cache.has(key);\n}\n\nmodule.exports = cacheHas;\n","var Uint8Array = require('./_Uint8Array');\n\n/**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\nfunction cloneArrayBuffer(arrayBuffer) {\n var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n return result;\n}\n\nmodule.exports = cloneArrayBuffer;\n","var root = require('./_root');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined,\n allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;\n\n/**\n * Creates a clone of `buffer`.\n *\n * @private\n * @param {Buffer} buffer The buffer to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Buffer} Returns the cloned buffer.\n */\nfunction cloneBuffer(buffer, isDeep) {\n if (isDeep) {\n return buffer.slice();\n }\n var length = buffer.length,\n result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\n\n buffer.copy(result);\n return result;\n}\n\nmodule.exports = cloneBuffer;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer');\n\n/**\n * Creates a clone of `dataView`.\n *\n * @private\n * @param {Object} dataView The data view to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned data view.\n */\nfunction cloneDataView(dataView, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;\n return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);\n}\n\nmodule.exports = cloneDataView;\n","/** Used to match `RegExp` flags from their coerced string values. */\nvar reFlags = /\\w*$/;\n\n/**\n * Creates a clone of `regexp`.\n *\n * @private\n * @param {Object} regexp The regexp to clone.\n * @returns {Object} Returns the cloned regexp.\n */\nfunction cloneRegExp(regexp) {\n var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));\n result.lastIndex = regexp.lastIndex;\n return result;\n}\n\nmodule.exports = cloneRegExp;\n","var Symbol = require('./_Symbol');\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * Creates a clone of the `symbol` object.\n *\n * @private\n * @param {Object} symbol The symbol object to clone.\n * @returns {Object} Returns the cloned symbol object.\n */\nfunction cloneSymbol(symbol) {\n return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};\n}\n\nmodule.exports = cloneSymbol;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer');\n\n/**\n * Creates a clone of `typedArray`.\n *\n * @private\n * @param {Object} typedArray The typed array to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned typed array.\n */\nfunction cloneTypedArray(typedArray, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n}\n\nmodule.exports = cloneTypedArray;\n","/**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\nfunction copyArray(source, array) {\n var index = -1,\n length = source.length;\n\n array || (array = Array(length));\n while (++index < length) {\n array[index] = source[index];\n }\n return array;\n}\n\nmodule.exports = copyArray;\n","var assignValue = require('./_assignValue'),\n baseAssignValue = require('./_baseAssignValue');\n\n/**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\nfunction copyObject(source, props, object, customizer) {\n var isNew = !object;\n object || (object = {});\n\n var index = -1,\n length = props.length;\n\n while (++index < length) {\n var key = props[index];\n\n var newValue = customizer\n ? customizer(object[key], source[key], key, object, source)\n : undefined;\n\n if (newValue === undefined) {\n newValue = source[key];\n }\n if (isNew) {\n baseAssignValue(object, key, newValue);\n } else {\n assignValue(object, key, newValue);\n }\n }\n return object;\n}\n\nmodule.exports = copyObject;\n","var copyObject = require('./_copyObject'),\n getSymbols = require('./_getSymbols');\n\n/**\n * Copies own symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbols(source, object) {\n return copyObject(source, getSymbols(source), object);\n}\n\nmodule.exports = copySymbols;\n","var copyObject = require('./_copyObject'),\n getSymbolsIn = require('./_getSymbolsIn');\n\n/**\n * Copies own and inherited symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbolsIn(source, object) {\n return copyObject(source, getSymbolsIn(source), object);\n}\n\nmodule.exports = copySymbolsIn;\n","var root = require('./_root');\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\nmodule.exports = coreJsData;\n","var getNative = require('./_getNative');\n\nvar defineProperty = (function() {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n}());\n\nmodule.exports = defineProperty;\n","var SetCache = require('./_SetCache'),\n arraySome = require('./_arraySome'),\n cacheHas = require('./_cacheHas');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\nfunction equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n arrLength = array.length,\n othLength = other.length;\n\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n return false;\n }\n // Check that cyclic values are equal.\n var arrStacked = stack.get(array);\n var othStacked = stack.get(other);\n if (arrStacked && othStacked) {\n return arrStacked == other && othStacked == array;\n }\n var index = -1,\n result = true,\n seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n stack.set(array, other);\n stack.set(other, array);\n\n // Ignore non-index properties.\n while (++index < arrLength) {\n var arrValue = array[index],\n othValue = other[index];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, arrValue, index, other, array, stack)\n : customizer(arrValue, othValue, index, array, other, stack);\n }\n if (compared !== undefined) {\n if (compared) {\n continue;\n }\n result = false;\n break;\n }\n // Recursively compare arrays (susceptible to call stack limits).\n if (seen) {\n if (!arraySome(other, function(othValue, othIndex) {\n if (!cacheHas(seen, othIndex) &&\n (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n return seen.push(othIndex);\n }\n })) {\n result = false;\n break;\n }\n } else if (!(\n arrValue === othValue ||\n equalFunc(arrValue, othValue, bitmask, customizer, stack)\n )) {\n result = false;\n break;\n }\n }\n stack['delete'](array);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalArrays;\n","var Symbol = require('./_Symbol'),\n Uint8Array = require('./_Uint8Array'),\n eq = require('./eq'),\n equalArrays = require('./_equalArrays'),\n mapToArray = require('./_mapToArray'),\n setToArray = require('./_setToArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]';\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n switch (tag) {\n case dataViewTag:\n if ((object.byteLength != other.byteLength) ||\n (object.byteOffset != other.byteOffset)) {\n return false;\n }\n object = object.buffer;\n other = other.buffer;\n\n case arrayBufferTag:\n if ((object.byteLength != other.byteLength) ||\n !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n return false;\n }\n return true;\n\n case boolTag:\n case dateTag:\n case numberTag:\n // Coerce booleans to `1` or `0` and dates to milliseconds.\n // Invalid dates are coerced to `NaN`.\n return eq(+object, +other);\n\n case errorTag:\n return object.name == other.name && object.message == other.message;\n\n case regexpTag:\n case stringTag:\n // Coerce regexes to strings and treat strings, primitives and objects,\n // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n // for more details.\n return object == (other + '');\n\n case mapTag:\n var convert = mapToArray;\n\n case setTag:\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n convert || (convert = setToArray);\n\n if (object.size != other.size && !isPartial) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked) {\n return stacked == other;\n }\n bitmask |= COMPARE_UNORDERED_FLAG;\n\n // Recursively compare objects (susceptible to call stack limits).\n stack.set(object, other);\n var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n stack['delete'](object);\n return result;\n\n case symbolTag:\n if (symbolValueOf) {\n return symbolValueOf.call(object) == symbolValueOf.call(other);\n }\n }\n return false;\n}\n\nmodule.exports = equalByTag;\n","var getAllKeys = require('./_getAllKeys');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n objProps = getAllKeys(object),\n objLength = objProps.length,\n othProps = getAllKeys(other),\n othLength = othProps.length;\n\n if (objLength != othLength && !isPartial) {\n return false;\n }\n var index = objLength;\n while (index--) {\n var key = objProps[index];\n if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n return false;\n }\n }\n // Check that cyclic values are equal.\n var objStacked = stack.get(object);\n var othStacked = stack.get(other);\n if (objStacked && othStacked) {\n return objStacked == other && othStacked == object;\n }\n var result = true;\n stack.set(object, other);\n stack.set(other, object);\n\n var skipCtor = isPartial;\n while (++index < objLength) {\n key = objProps[index];\n var objValue = object[key],\n othValue = other[key];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, objValue, key, other, object, stack)\n : customizer(objValue, othValue, key, object, other, stack);\n }\n // Recursively compare objects (susceptible to call stack limits).\n if (!(compared === undefined\n ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n : compared\n )) {\n result = false;\n break;\n }\n skipCtor || (skipCtor = key == 'constructor');\n }\n if (result && !skipCtor) {\n var objCtor = object.constructor,\n othCtor = other.constructor;\n\n // Non `Object` object instances with different constructors are not equal.\n if (objCtor != othCtor &&\n ('constructor' in object && 'constructor' in other) &&\n !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n result = false;\n }\n }\n stack['delete'](object);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalObjects;\n","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n","var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbols = require('./_getSymbols'),\n keys = require('./keys');\n\n/**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeys(object) {\n return baseGetAllKeys(object, keys, getSymbols);\n}\n\nmodule.exports = getAllKeys;\n","var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbolsIn = require('./_getSymbolsIn'),\n keysIn = require('./keysIn');\n\n/**\n * Creates an array of own and inherited enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeysIn(object) {\n return baseGetAllKeys(object, keysIn, getSymbolsIn);\n}\n\nmodule.exports = getAllKeysIn;\n","var isKeyable = require('./_isKeyable');\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\nmodule.exports = getMapData;\n","var baseIsNative = require('./_baseIsNative'),\n getValue = require('./_getValue');\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\nmodule.exports = getNative;\n","var overArg = require('./_overArg');\n\n/** Built-in value references. */\nvar getPrototype = overArg(Object.getPrototypeOf, Object);\n\nmodule.exports = getPrototype;\n","var Symbol = require('./_Symbol');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nmodule.exports = getRawTag;\n","var arrayFilter = require('./_arrayFilter'),\n stubArray = require('./stubArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n if (object == null) {\n return [];\n }\n object = Object(object);\n return arrayFilter(nativeGetSymbols(object), function(symbol) {\n return propertyIsEnumerable.call(object, symbol);\n });\n};\n\nmodule.exports = getSymbols;\n","var arrayPush = require('./_arrayPush'),\n getPrototype = require('./_getPrototype'),\n getSymbols = require('./_getSymbols'),\n stubArray = require('./stubArray');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own and inherited enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {\n var result = [];\n while (object) {\n arrayPush(result, getSymbols(object));\n object = getPrototype(object);\n }\n return result;\n};\n\nmodule.exports = getSymbolsIn;\n","var DataView = require('./_DataView'),\n Map = require('./_Map'),\n Promise = require('./_Promise'),\n Set = require('./_Set'),\n WeakMap = require('./_WeakMap'),\n baseGetTag = require('./_baseGetTag'),\n toSource = require('./_toSource');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n setTag = '[object Set]',\n weakMapTag = '[object WeakMap]';\n\nvar dataViewTag = '[object DataView]';\n\n/** Used to detect maps, sets, and weakmaps. */\nvar dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nvar getTag = baseGetTag;\n\n// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\nif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = baseGetTag(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : '';\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n}\n\nmodule.exports = getTag;\n","/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\nmodule.exports = getValue;\n","var nativeCreate = require('./_nativeCreate');\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n}\n\nmodule.exports = hashClear;\n","/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = hashDelete;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\nmodule.exports = hashGet;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\nmodule.exports = hashHas;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\nmodule.exports = hashSet;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Initializes an array clone.\n *\n * @private\n * @param {Array} array The array to clone.\n * @returns {Array} Returns the initialized clone.\n */\nfunction initCloneArray(array) {\n var length = array.length,\n result = new array.constructor(length);\n\n // Add properties assigned by `RegExp#exec`.\n if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {\n result.index = array.index;\n result.input = array.input;\n }\n return result;\n}\n\nmodule.exports = initCloneArray;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer'),\n cloneDataView = require('./_cloneDataView'),\n cloneRegExp = require('./_cloneRegExp'),\n cloneSymbol = require('./_cloneSymbol'),\n cloneTypedArray = require('./_cloneTypedArray');\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/**\n * Initializes an object clone based on its `toStringTag`.\n *\n * **Note:** This function only supports cloning values with tags of\n * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.\n *\n * @private\n * @param {Object} object The object to clone.\n * @param {string} tag The `toStringTag` of the object to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneByTag(object, tag, isDeep) {\n var Ctor = object.constructor;\n switch (tag) {\n case arrayBufferTag:\n return cloneArrayBuffer(object);\n\n case boolTag:\n case dateTag:\n return new Ctor(+object);\n\n case dataViewTag:\n return cloneDataView(object, isDeep);\n\n case float32Tag: case float64Tag:\n case int8Tag: case int16Tag: case int32Tag:\n case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:\n return cloneTypedArray(object, isDeep);\n\n case mapTag:\n return new Ctor;\n\n case numberTag:\n case stringTag:\n return new Ctor(object);\n\n case regexpTag:\n return cloneRegExp(object);\n\n case setTag:\n return new Ctor;\n\n case symbolTag:\n return cloneSymbol(object);\n }\n}\n\nmodule.exports = initCloneByTag;\n","var baseCreate = require('./_baseCreate'),\n getPrototype = require('./_getPrototype'),\n isPrototype = require('./_isPrototype');\n\n/**\n * Initializes an object clone.\n *\n * @private\n * @param {Object} object The object to clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneObject(object) {\n return (typeof object.constructor == 'function' && !isPrototype(object))\n ? baseCreate(getPrototype(object))\n : {};\n}\n\nmodule.exports = initCloneObject;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n var type = typeof value;\n length = length == null ? MAX_SAFE_INTEGER : length;\n\n return !!length &&\n (type == 'number' ||\n (type != 'symbol' && reIsUint.test(value))) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\nmodule.exports = isIndex;\n","/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\nmodule.exports = isKeyable;\n","var coreJsData = require('./_coreJsData');\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\nmodule.exports = isMasked;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\nmodule.exports = isPrototype;\n","/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n}\n\nmodule.exports = listCacheClear;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype;\n\n/** Built-in value references. */\nvar splice = arrayProto.splice;\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n}\n\nmodule.exports = listCacheDelete;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\nmodule.exports = listCacheGet;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\nmodule.exports = listCacheHas;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\nmodule.exports = listCacheSet;\n","var Hash = require('./_Hash'),\n ListCache = require('./_ListCache'),\n Map = require('./_Map');\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\nmodule.exports = mapCacheClear;\n","var getMapData = require('./_getMapData');\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = mapCacheDelete;\n","var getMapData = require('./_getMapData');\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\nmodule.exports = mapCacheGet;\n","var getMapData = require('./_getMapData');\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\nmodule.exports = mapCacheHas;\n","var getMapData = require('./_getMapData');\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n}\n\nmodule.exports = mapCacheSet;\n","/**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\nfunction mapToArray(map) {\n var index = -1,\n result = Array(map.size);\n\n map.forEach(function(value, key) {\n result[++index] = [key, value];\n });\n return result;\n}\n\nmodule.exports = mapToArray;\n","var getNative = require('./_getNative');\n\n/* Built-in method references that are verified to be native. */\nvar nativeCreate = getNative(Object, 'create');\n\nmodule.exports = nativeCreate;\n","var overArg = require('./_overArg');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeKeys = overArg(Object.keys, Object);\n\nmodule.exports = nativeKeys;\n","/**\n * This function is like\n * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * except that it includes inherited enumerable properties.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction nativeKeysIn(object) {\n var result = [];\n if (object != null) {\n for (var key in Object(object)) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = nativeKeysIn;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n try {\n // Use `util.types` for Node.js 10+.\n var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n if (types) {\n return types;\n }\n\n // Legacy `process.binding('util')` for Node.js < 10.\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n}());\n\nmodule.exports = nodeUtil;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n","/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\nmodule.exports = overArg;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n","/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\nfunction setCacheAdd(value) {\n this.__data__.set(value, HASH_UNDEFINED);\n return this;\n}\n\nmodule.exports = setCacheAdd;\n","/**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\nfunction setCacheHas(value) {\n return this.__data__.has(value);\n}\n\nmodule.exports = setCacheHas;\n","/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\nfunction setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n}\n\nmodule.exports = setToArray;\n","var ListCache = require('./_ListCache');\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}\n\nmodule.exports = stackClear;\n","/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n var data = this.__data__,\n result = data['delete'](key);\n\n this.size = data.size;\n return result;\n}\n\nmodule.exports = stackDelete;\n","/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n return this.__data__.get(key);\n}\n\nmodule.exports = stackGet;\n","/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n return this.__data__.has(key);\n}\n\nmodule.exports = stackHas;\n","var ListCache = require('./_ListCache'),\n Map = require('./_Map'),\n MapCache = require('./_MapCache');\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n var data = this.__data__;\n if (data instanceof ListCache) {\n var pairs = data.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n this.size = ++data.size;\n return this;\n }\n data = this.__data__ = new MapCache(pairs);\n }\n data.set(key, value);\n this.size = data.size;\n return this;\n}\n\nmodule.exports = stackSet;\n","/** Used for built-in method references. */\nvar funcProto = Function.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\nmodule.exports = toSource;\n","var baseClone = require('./_baseClone');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_SYMBOLS_FLAG = 4;\n\n/**\n * This method is like `_.clone` except that it recursively clones `value`.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Lang\n * @param {*} value The value to recursively clone.\n * @returns {*} Returns the deep cloned value.\n * @see _.clone\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var deep = _.cloneDeep(objects);\n * console.log(deep[0] === objects[0]);\n * // => false\n */\nfunction cloneDeep(value) {\n return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);\n}\n\nmodule.exports = cloneDeep;\n","/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\nmodule.exports = eq;\n","var baseIsArguments = require('./_baseIsArguments'),\n isObjectLike = require('./isObjectLike');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n};\n\nmodule.exports = isArguments;\n","/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\nmodule.exports = isArray;\n","var isFunction = require('./isFunction'),\n isLength = require('./isLength');\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\nmodule.exports = isArrayLike;\n","var root = require('./_root'),\n stubFalse = require('./stubFalse');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\nmodule.exports = isBuffer;\n","var baseIsEqual = require('./_baseIsEqual');\n\n/**\n * Performs a deep comparison between two values to determine if they are\n * equivalent.\n *\n * **Note:** This method supports comparing arrays, array buffers, booleans,\n * date objects, error objects, maps, numbers, `Object` objects, regexes,\n * sets, strings, symbols, and typed arrays. `Object` objects are compared\n * by their own, not inherited, enumerable properties. Functions and DOM\n * nodes are compared by strict equality, i.e. `===`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.isEqual(object, other);\n * // => true\n *\n * object === other;\n * // => false\n */\nfunction isEqual(value, other) {\n return baseIsEqual(value, other);\n}\n\nmodule.exports = isEqual;\n","var baseGetTag = require('./_baseGetTag'),\n isObject = require('./isObject');\n\n/** `Object#toString` result references. */\nvar asyncTag = '[object AsyncFunction]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n proxyTag = '[object Proxy]';\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\nmodule.exports = isFunction;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\nmodule.exports = isLength;\n","var baseIsMap = require('./_baseIsMap'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsMap = nodeUtil && nodeUtil.isMap;\n\n/**\n * Checks if `value` is classified as a `Map` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n * @example\n *\n * _.isMap(new Map);\n * // => true\n *\n * _.isMap(new WeakMap);\n * // => false\n */\nvar isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;\n\nmodule.exports = isMap;\n","/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n","var baseIsSet = require('./_baseIsSet'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsSet = nodeUtil && nodeUtil.isSet;\n\n/**\n * Checks if `value` is classified as a `Set` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n * @example\n *\n * _.isSet(new Set);\n * // => true\n *\n * _.isSet(new WeakSet);\n * // => false\n */\nvar isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;\n\nmodule.exports = isSet;\n","var baseIsTypedArray = require('./_baseIsTypedArray'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\nmodule.exports = isTypedArray;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeys = require('./_baseKeys'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\nmodule.exports = keys;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeysIn = require('./_baseKeysIn'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\nfunction keysIn(object) {\n return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n}\n\nmodule.exports = keysIn;\n","/**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\nfunction stubArray() {\n return [];\n}\n\nmodule.exports = stubArray;\n","/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n return false;\n}\n\nmodule.exports = stubFalse;\n","import { connect, type BaseConnectionOptions } from \"@openfin/core-web\";\nimport { getSettings } from \"./settings\";\n\n/**\n * Initializes the OpenFin Web Broker connection.\n * @param inherit Should we inherit settings from the host (available in the OpenFin layout system) or use settings? Default is true.\n */\nexport async function init(inherit: boolean = true): Promise {\n\t// Set window.fin to the `fin` object.\n\tlet options: BaseConnectionOptions | undefined;\n\tif (window.fin === undefined) {\n\t\tif (!inherit) {\n\t\t\tconst settings = await getSettings();\n\t\t\tif (settings === undefined) {\n\t\t\t\tconsole.error(\n\t\t\t\t\t\"Unable to run the sample as we have been unable to load the web manifest and it's settings from the currently running html page. Please ensure that the web manifest is being served and that it contains the custom_settings section.\"\n\t\t\t\t);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\toptions = {\n\t\t\t\tbrokerUrl: settings.platform.interop.brokerUrl,\n\t\t\t\tinteropConfig: {\n\t\t\t\t\tproviderId: settings.platform.interop.providerId,\n\t\t\t\t\tcurrentContextGroup: settings.platform.interop.defaultContextGroup\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t\t// Specify an interopConfig with a specific provider ID and a context group to initialize the `fin.me.interop` client on connection.\n\t\tif (options) {\n\t\t\twindow.fin = await connect({\n\t\t\t\toptions\n\t\t\t});\n\t\t} else {\n\t\t\twindow.fin = await connect({\n\t\t\t\tconnectionInheritance: \"enabled\"\n\t\t\t});\n\t\t}\n\t\tconsole.log(\"Finished initializing the fin API.\");\n\t\t// Create and dispatch the finReady event\n\t\tconst event = new CustomEvent(\"finReady\");\n\t\twindow.dispatchEvent(event);\n\t}\n\n\tif (window.fdc3 === undefined && window?.fin?.me.interop?.getFDC3Sync !== undefined) {\n\t\twindow.fdc3 = fin.me.interop.getFDC3Sync(\"2.0\");\n\t\tconsole.log(\"Finished initializing the fdc3 API.\");\n\t\t// Create and dispatch the FDC3Ready event\n\t\tconst event = new CustomEvent(\"fdc3Ready\");\n\t\twindow.dispatchEvent(event);\n\t}\n}\n","import type { WebLayoutSnapshot } from \"@openfin/core-web\";\nimport type { Settings } from \"../shapes/setting-shapes\";\n\n/**\n * Fetches the settings for the application.\n * @returns The settings for the application.\n */\nexport async function getSettings(): Promise {\n\tconst settings = await getManifestSettings();\n\tif (settings === undefined) {\n\t\tconsole.error(\n\t\t\t\"Unable to run the example as settings are required and we fetch them from the link web manifest from the html page that is being served. It should exist in the customSettings section of the web manifest.\"\n\t\t);\n\t}\n\treturn settings;\n}\n\n/**\n * Returns a default layout from the settings if provided.\n * @returns The default layout from the settings.\n */\nexport async function getDefaultLayout(): Promise {\n\tconst settings = await getSettings();\n\tif (settings?.platform?.layout?.defaultLayout === undefined) {\n\t\tconsole.error(\n\t\t\t\"Unable to run the example as without a layout being defined. Please ensure that settings have been provided in the web manifest.\"\n\t\t);\n\t\treturn;\n\t}\n\tif (typeof settings.platform.layout.defaultLayout === \"string\") {\n\t\tconst layoutResponse = await fetch(settings.platform.layout.defaultLayout);\n\t\tconst layoutJson = (await layoutResponse.json()) as WebLayoutSnapshot;\n\t\treturn layoutJson;\n\t}\n\treturn settings.platform.layout.defaultLayout;\n}\n\n/**\n * Returns the settings from the manifest file.\n * @returns customSettings for this example\n */\nasync function getManifestSettings(): Promise {\n\t// Get the manifest link\n\tconst link = document.querySelector('link[rel=\"manifest\"]');\n\tif (link !== null) {\n\t\tconst manifestResponse = await fetch(link.href);\n\t\tconst manifestJson = (await manifestResponse.json()) as { custom_settings: Settings };\n\t\treturn manifestJson.custom_settings;\n\t}\n}\n","export { default as v1 } from './v1.js';\nexport { default as v3 } from './v3.js';\nexport { default as v4 } from './v4.js';\nexport { default as v5 } from './v5.js';\nexport { default as NIL } from './nil.js';\nexport { default as version } from './version.js';\nexport { default as validate } from './validate.js';\nexport { default as stringify } from './stringify.js';\nexport { default as parse } from './parse.js';","/*\n * Browser-compatible JavaScript MD5\n *\n * Modification of JavaScript MD5\n * https://github.com/blueimp/JavaScript-MD5\n *\n * Copyright 2011, Sebastian Tschan\n * https://blueimp.net\n *\n * Licensed under the MIT license:\n * https://opensource.org/licenses/MIT\n *\n * Based on\n * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message\n * Digest Algorithm, as defined in RFC 1321.\n * Version 2.2 Copyright (C) Paul Johnston 1999 - 2009\n * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet\n * Distributed under the BSD License\n * See http://pajhome.org.uk/crypt/md5 for more info.\n */\nfunction md5(bytes) {\n if (typeof bytes === 'string') {\n var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape\n\n bytes = new Uint8Array(msg.length);\n\n for (var i = 0; i < msg.length; ++i) {\n bytes[i] = msg.charCodeAt(i);\n }\n }\n\n return md5ToHexEncodedArray(wordsToMd5(bytesToWords(bytes), bytes.length * 8));\n}\n/*\n * Convert an array of little-endian words to an array of bytes\n */\n\n\nfunction md5ToHexEncodedArray(input) {\n var output = [];\n var length32 = input.length * 32;\n var hexTab = '0123456789abcdef';\n\n for (var i = 0; i < length32; i += 8) {\n var x = input[i >> 5] >>> i % 32 & 0xff;\n var hex = parseInt(hexTab.charAt(x >>> 4 & 0x0f) + hexTab.charAt(x & 0x0f), 16);\n output.push(hex);\n }\n\n return output;\n}\n/**\n * Calculate output length with padding and bit length\n */\n\n\nfunction getOutputLength(inputLength8) {\n return (inputLength8 + 64 >>> 9 << 4) + 14 + 1;\n}\n/*\n * Calculate the MD5 of an array of little-endian words, and a bit length.\n */\n\n\nfunction wordsToMd5(x, len) {\n /* append padding */\n x[len >> 5] |= 0x80 << len % 32;\n x[getOutputLength(len) - 1] = len;\n var a = 1732584193;\n var b = -271733879;\n var c = -1732584194;\n var d = 271733878;\n\n for (var i = 0; i < x.length; i += 16) {\n var olda = a;\n var oldb = b;\n var oldc = c;\n var oldd = d;\n a = md5ff(a, b, c, d, x[i], 7, -680876936);\n d = md5ff(d, a, b, c, x[i + 1], 12, -389564586);\n c = md5ff(c, d, a, b, x[i + 2], 17, 606105819);\n b = md5ff(b, c, d, a, x[i + 3], 22, -1044525330);\n a = md5ff(a, b, c, d, x[i + 4], 7, -176418897);\n d = md5ff(d, a, b, c, x[i + 5], 12, 1200080426);\n c = md5ff(c, d, a, b, x[i + 6], 17, -1473231341);\n b = md5ff(b, c, d, a, x[i + 7], 22, -45705983);\n a = md5ff(a, b, c, d, x[i + 8], 7, 1770035416);\n d = md5ff(d, a, b, c, x[i + 9], 12, -1958414417);\n c = md5ff(c, d, a, b, x[i + 10], 17, -42063);\n b = md5ff(b, c, d, a, x[i + 11], 22, -1990404162);\n a = md5ff(a, b, c, d, x[i + 12], 7, 1804603682);\n d = md5ff(d, a, b, c, x[i + 13], 12, -40341101);\n c = md5ff(c, d, a, b, x[i + 14], 17, -1502002290);\n b = md5ff(b, c, d, a, x[i + 15], 22, 1236535329);\n a = md5gg(a, b, c, d, x[i + 1], 5, -165796510);\n d = md5gg(d, a, b, c, x[i + 6], 9, -1069501632);\n c = md5gg(c, d, a, b, x[i + 11], 14, 643717713);\n b = md5gg(b, c, d, a, x[i], 20, -373897302);\n a = md5gg(a, b, c, d, x[i + 5], 5, -701558691);\n d = md5gg(d, a, b, c, x[i + 10], 9, 38016083);\n c = md5gg(c, d, a, b, x[i + 15], 14, -660478335);\n b = md5gg(b, c, d, a, x[i + 4], 20, -405537848);\n a = md5gg(a, b, c, d, x[i + 9], 5, 568446438);\n d = md5gg(d, a, b, c, x[i + 14], 9, -1019803690);\n c = md5gg(c, d, a, b, x[i + 3], 14, -187363961);\n b = md5gg(b, c, d, a, x[i + 8], 20, 1163531501);\n a = md5gg(a, b, c, d, x[i + 13], 5, -1444681467);\n d = md5gg(d, a, b, c, x[i + 2], 9, -51403784);\n c = md5gg(c, d, a, b, x[i + 7], 14, 1735328473);\n b = md5gg(b, c, d, a, x[i + 12], 20, -1926607734);\n a = md5hh(a, b, c, d, x[i + 5], 4, -378558);\n d = md5hh(d, a, b, c, x[i + 8], 11, -2022574463);\n c = md5hh(c, d, a, b, x[i + 11], 16, 1839030562);\n b = md5hh(b, c, d, a, x[i + 14], 23, -35309556);\n a = md5hh(a, b, c, d, x[i + 1], 4, -1530992060);\n d = md5hh(d, a, b, c, x[i + 4], 11, 1272893353);\n c = md5hh(c, d, a, b, x[i + 7], 16, -155497632);\n b = md5hh(b, c, d, a, x[i + 10], 23, -1094730640);\n a = md5hh(a, b, c, d, x[i + 13], 4, 681279174);\n d = md5hh(d, a, b, c, x[i], 11, -358537222);\n c = md5hh(c, d, a, b, x[i + 3], 16, -722521979);\n b = md5hh(b, c, d, a, x[i + 6], 23, 76029189);\n a = md5hh(a, b, c, d, x[i + 9], 4, -640364487);\n d = md5hh(d, a, b, c, x[i + 12], 11, -421815835);\n c = md5hh(c, d, a, b, x[i + 15], 16, 530742520);\n b = md5hh(b, c, d, a, x[i + 2], 23, -995338651);\n a = md5ii(a, b, c, d, x[i], 6, -198630844);\n d = md5ii(d, a, b, c, x[i + 7], 10, 1126891415);\n c = md5ii(c, d, a, b, x[i + 14], 15, -1416354905);\n b = md5ii(b, c, d, a, x[i + 5], 21, -57434055);\n a = md5ii(a, b, c, d, x[i + 12], 6, 1700485571);\n d = md5ii(d, a, b, c, x[i + 3], 10, -1894986606);\n c = md5ii(c, d, a, b, x[i + 10], 15, -1051523);\n b = md5ii(b, c, d, a, x[i + 1], 21, -2054922799);\n a = md5ii(a, b, c, d, x[i + 8], 6, 1873313359);\n d = md5ii(d, a, b, c, x[i + 15], 10, -30611744);\n c = md5ii(c, d, a, b, x[i + 6], 15, -1560198380);\n b = md5ii(b, c, d, a, x[i + 13], 21, 1309151649);\n a = md5ii(a, b, c, d, x[i + 4], 6, -145523070);\n d = md5ii(d, a, b, c, x[i + 11], 10, -1120210379);\n c = md5ii(c, d, a, b, x[i + 2], 15, 718787259);\n b = md5ii(b, c, d, a, x[i + 9], 21, -343485551);\n a = safeAdd(a, olda);\n b = safeAdd(b, oldb);\n c = safeAdd(c, oldc);\n d = safeAdd(d, oldd);\n }\n\n return [a, b, c, d];\n}\n/*\n * Convert an array bytes to an array of little-endian words\n * Characters >255 have their high-byte silently ignored.\n */\n\n\nfunction bytesToWords(input) {\n if (input.length === 0) {\n return [];\n }\n\n var length8 = input.length * 8;\n var output = new Uint32Array(getOutputLength(length8));\n\n for (var i = 0; i < length8; i += 8) {\n output[i >> 5] |= (input[i / 8] & 0xff) << i % 32;\n }\n\n return output;\n}\n/*\n * Add integers, wrapping at 2^32. This uses 16-bit operations internally\n * to work around bugs in some JS interpreters.\n */\n\n\nfunction safeAdd(x, y) {\n var lsw = (x & 0xffff) + (y & 0xffff);\n var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n return msw << 16 | lsw & 0xffff;\n}\n/*\n * Bitwise rotate a 32-bit number to the left.\n */\n\n\nfunction bitRotateLeft(num, cnt) {\n return num << cnt | num >>> 32 - cnt;\n}\n/*\n * These functions implement the four basic operations the algorithm uses.\n */\n\n\nfunction md5cmn(q, a, b, x, s, t) {\n return safeAdd(bitRotateLeft(safeAdd(safeAdd(a, q), safeAdd(x, t)), s), b);\n}\n\nfunction md5ff(a, b, c, d, x, s, t) {\n return md5cmn(b & c | ~b & d, a, b, x, s, t);\n}\n\nfunction md5gg(a, b, c, d, x, s, t) {\n return md5cmn(b & d | c & ~d, a, b, x, s, t);\n}\n\nfunction md5hh(a, b, c, d, x, s, t) {\n return md5cmn(b ^ c ^ d, a, b, x, s, t);\n}\n\nfunction md5ii(a, b, c, d, x, s, t) {\n return md5cmn(c ^ (b | ~d), a, b, x, s, t);\n}\n\nexport default md5;","export default '00000000-0000-0000-0000-000000000000';","import validate from './validate.js';\n\nfunction parse(uuid) {\n if (!validate(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n var v;\n var arr = new Uint8Array(16); // Parse ########-....-....-....-............\n\n arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24;\n arr[1] = v >>> 16 & 0xff;\n arr[2] = v >>> 8 & 0xff;\n arr[3] = v & 0xff; // Parse ........-####-....-....-............\n\n arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8;\n arr[5] = v & 0xff; // Parse ........-....-####-....-............\n\n arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8;\n arr[7] = v & 0xff; // Parse ........-....-....-####-............\n\n arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8;\n arr[9] = v & 0xff; // Parse ........-....-....-....-############\n // (Use \"/\" to avoid 32-bit truncation when bit-shifting high-order bytes)\n\n arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff;\n arr[11] = v / 0x100000000 & 0xff;\n arr[12] = v >>> 24 & 0xff;\n arr[13] = v >>> 16 & 0xff;\n arr[14] = v >>> 8 & 0xff;\n arr[15] = v & 0xff;\n return arr;\n}\n\nexport default parse;","export default /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;","// Unique ID creation requires a high quality random # generator. In the browser we therefore\n// require the crypto API and do not support built-in fallback to lower quality random number\n// generators (like Math.random()).\nvar getRandomValues;\nvar rnds8 = new Uint8Array(16);\nexport default function rng() {\n // lazy load so that environments that need to polyfill have a chance to do so\n if (!getRandomValues) {\n // getRandomValues needs to be invoked in a context where \"this\" is a Crypto implementation. Also,\n // find the complete implementation of crypto (msCrypto) on IE11.\n getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto !== 'undefined' && typeof msCrypto.getRandomValues === 'function' && msCrypto.getRandomValues.bind(msCrypto);\n\n if (!getRandomValues) {\n throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');\n }\n }\n\n return getRandomValues(rnds8);\n}","// Adapted from Chris Veness' SHA1 code at\n// http://www.movable-type.co.uk/scripts/sha1.html\nfunction f(s, x, y, z) {\n switch (s) {\n case 0:\n return x & y ^ ~x & z;\n\n case 1:\n return x ^ y ^ z;\n\n case 2:\n return x & y ^ x & z ^ y & z;\n\n case 3:\n return x ^ y ^ z;\n }\n}\n\nfunction ROTL(x, n) {\n return x << n | x >>> 32 - n;\n}\n\nfunction sha1(bytes) {\n var K = [0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xca62c1d6];\n var H = [0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0];\n\n if (typeof bytes === 'string') {\n var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape\n\n bytes = [];\n\n for (var i = 0; i < msg.length; ++i) {\n bytes.push(msg.charCodeAt(i));\n }\n } else if (!Array.isArray(bytes)) {\n // Convert Array-like to Array\n bytes = Array.prototype.slice.call(bytes);\n }\n\n bytes.push(0x80);\n var l = bytes.length / 4 + 2;\n var N = Math.ceil(l / 16);\n var M = new Array(N);\n\n for (var _i = 0; _i < N; ++_i) {\n var arr = new Uint32Array(16);\n\n for (var j = 0; j < 16; ++j) {\n arr[j] = bytes[_i * 64 + j * 4] << 24 | bytes[_i * 64 + j * 4 + 1] << 16 | bytes[_i * 64 + j * 4 + 2] << 8 | bytes[_i * 64 + j * 4 + 3];\n }\n\n M[_i] = arr;\n }\n\n M[N - 1][14] = (bytes.length - 1) * 8 / Math.pow(2, 32);\n M[N - 1][14] = Math.floor(M[N - 1][14]);\n M[N - 1][15] = (bytes.length - 1) * 8 & 0xffffffff;\n\n for (var _i2 = 0; _i2 < N; ++_i2) {\n var W = new Uint32Array(80);\n\n for (var t = 0; t < 16; ++t) {\n W[t] = M[_i2][t];\n }\n\n for (var _t = 16; _t < 80; ++_t) {\n W[_t] = ROTL(W[_t - 3] ^ W[_t - 8] ^ W[_t - 14] ^ W[_t - 16], 1);\n }\n\n var a = H[0];\n var b = H[1];\n var c = H[2];\n var d = H[3];\n var e = H[4];\n\n for (var _t2 = 0; _t2 < 80; ++_t2) {\n var s = Math.floor(_t2 / 20);\n var T = ROTL(a, 5) + f(s, b, c, d) + e + K[s] + W[_t2] >>> 0;\n e = d;\n d = c;\n c = ROTL(b, 30) >>> 0;\n b = a;\n a = T;\n }\n\n H[0] = H[0] + a >>> 0;\n H[1] = H[1] + b >>> 0;\n H[2] = H[2] + c >>> 0;\n H[3] = H[3] + d >>> 0;\n H[4] = H[4] + e >>> 0;\n }\n\n return [H[0] >> 24 & 0xff, H[0] >> 16 & 0xff, H[0] >> 8 & 0xff, H[0] & 0xff, H[1] >> 24 & 0xff, H[1] >> 16 & 0xff, H[1] >> 8 & 0xff, H[1] & 0xff, H[2] >> 24 & 0xff, H[2] >> 16 & 0xff, H[2] >> 8 & 0xff, H[2] & 0xff, H[3] >> 24 & 0xff, H[3] >> 16 & 0xff, H[3] >> 8 & 0xff, H[3] & 0xff, H[4] >> 24 & 0xff, H[4] >> 16 & 0xff, H[4] >> 8 & 0xff, H[4] & 0xff];\n}\n\nexport default sha1;","import validate from './validate.js';\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\n\nvar byteToHex = [];\n\nfor (var i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).substr(1));\n}\n\nfunction stringify(arr) {\n var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n var uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!validate(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n\n return uuid;\n}\n\nexport default stringify;","import rng from './rng.js';\nimport stringify from './stringify.js'; // **`v1()` - Generate time-based UUID**\n//\n// Inspired by https://github.com/LiosK/UUID.js\n// and http://docs.python.org/library/uuid.html\n\nvar _nodeId;\n\nvar _clockseq; // Previous uuid creation time\n\n\nvar _lastMSecs = 0;\nvar _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details\n\nfunction v1(options, buf, offset) {\n var i = buf && offset || 0;\n var b = buf || new Array(16);\n options = options || {};\n var node = options.node || _nodeId;\n var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not\n // specified. We do this lazily to minimize issues related to insufficient\n // system entropy. See #189\n\n if (node == null || clockseq == null) {\n var seedBytes = options.random || (options.rng || rng)();\n\n if (node == null) {\n // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)\n node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]];\n }\n\n if (clockseq == null) {\n // Per 4.2.2, randomize (14 bit) clockseq\n clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;\n }\n } // UUID timestamps are 100 nano-second units since the Gregorian epoch,\n // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so\n // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'\n // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.\n\n\n var msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock\n // cycle to simulate higher resolution clock\n\n var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs)\n\n var dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression\n\n if (dt < 0 && options.clockseq === undefined) {\n clockseq = clockseq + 1 & 0x3fff;\n } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new\n // time interval\n\n\n if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {\n nsecs = 0;\n } // Per 4.2.1.2 Throw error if too many uuids are requested\n\n\n if (nsecs >= 10000) {\n throw new Error(\"uuid.v1(): Can't create more than 10M uuids/sec\");\n }\n\n _lastMSecs = msecs;\n _lastNSecs = nsecs;\n _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch\n\n msecs += 12219292800000; // `time_low`\n\n var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;\n b[i++] = tl >>> 24 & 0xff;\n b[i++] = tl >>> 16 & 0xff;\n b[i++] = tl >>> 8 & 0xff;\n b[i++] = tl & 0xff; // `time_mid`\n\n var tmh = msecs / 0x100000000 * 10000 & 0xfffffff;\n b[i++] = tmh >>> 8 & 0xff;\n b[i++] = tmh & 0xff; // `time_high_and_version`\n\n b[i++] = tmh >>> 24 & 0xf | 0x10; // include version\n\n b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)\n\n b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low`\n\n b[i++] = clockseq & 0xff; // `node`\n\n for (var n = 0; n < 6; ++n) {\n b[i + n] = node[n];\n }\n\n return buf || stringify(b);\n}\n\nexport default v1;","import v35 from './v35.js';\nimport md5 from './md5.js';\nvar v3 = v35('v3', 0x30, md5);\nexport default v3;","import stringify from './stringify.js';\nimport parse from './parse.js';\n\nfunction stringToBytes(str) {\n str = unescape(encodeURIComponent(str)); // UTF8 escape\n\n var bytes = [];\n\n for (var i = 0; i < str.length; ++i) {\n bytes.push(str.charCodeAt(i));\n }\n\n return bytes;\n}\n\nexport var DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8';\nexport var URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8';\nexport default function (name, version, hashfunc) {\n function generateUUID(value, namespace, buf, offset) {\n if (typeof value === 'string') {\n value = stringToBytes(value);\n }\n\n if (typeof namespace === 'string') {\n namespace = parse(namespace);\n }\n\n if (namespace.length !== 16) {\n throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)');\n } // Compute hash of namespace and value, Per 4.3\n // Future: Use spread syntax when supported on all platforms, e.g. `bytes =\n // hashfunc([...namespace, ... value])`\n\n\n var bytes = new Uint8Array(16 + value.length);\n bytes.set(namespace);\n bytes.set(value, namespace.length);\n bytes = hashfunc(bytes);\n bytes[6] = bytes[6] & 0x0f | version;\n bytes[8] = bytes[8] & 0x3f | 0x80;\n\n if (buf) {\n offset = offset || 0;\n\n for (var i = 0; i < 16; ++i) {\n buf[offset + i] = bytes[i];\n }\n\n return buf;\n }\n\n return stringify(bytes);\n } // Function#name is not settable on some platforms (#270)\n\n\n try {\n generateUUID.name = name; // eslint-disable-next-line no-empty\n } catch (err) {} // For CommonJS default export support\n\n\n generateUUID.DNS = DNS;\n generateUUID.URL = URL;\n return generateUUID;\n}","import rng from './rng.js';\nimport stringify from './stringify.js';\n\nfunction v4(options, buf, offset) {\n options = options || {};\n var rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n offset = offset || 0;\n\n for (var i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n\n return buf;\n }\n\n return stringify(rnds);\n}\n\nexport default v4;","import v35 from './v35.js';\nimport sha1 from './sha1.js';\nvar v5 = v35('v5', 0x50, sha1);\nexport default v5;","import REGEX from './regex.js';\n\nfunction validate(uuid) {\n return typeof uuid === 'string' && REGEX.test(uuid);\n}\n\nexport default validate;","import validate from './validate.js';\n\nfunction version(uuid) {\n if (!validate(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n return parseInt(uuid.substr(14, 1), 16);\n}\n\nexport default version;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = (module) => {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","import type { Context } from \"@finos/fdc3\";\nimport { init } from \"../platform/api\";\n\nwindow.addEventListener(\"DOMContentLoaded\", async () => {\n\tawait init(true);\n\tawait initializeDOM();\n});\n\n/**\n * Broadcasts a context using FDC3.\n */\nasync function broadcastContext(): Promise {\n\tconst contextType = \"fdc3.instrument\";\n\tconst contextName = \"Apple\";\n\tconst idData = {\n\t\tticker: \"AAPL\"\n\t};\n\tconst context = {\n\t\ttype: contextType,\n\t\tname: contextName,\n\t\tid: idData\n\t};\n\tif (window.fdc3) {\n\t\tawait window.fdc3.broadcast(context);\n\t\tconsole.log(`Broadcasted context: ${contextType} - ${contextName}`);\n\t} else {\n\t\twindow.addEventListener(\"fdc3Ready\", async () => {\n\t\t\tawait window.fdc3.broadcast(context);\n\t\t\tconsole.log(`Broadcasted context: ${contextType} - ${contextName}`);\n\t\t});\n\t}\n}\n\n/**\n * Adds an FDC3 context listener to the window.\n */\nasync function addFDC3Listener(): Promise {\n\tif (window.fdc3) {\n\t\tawait window.fdc3.addContextListener(null, (context) => {\n\t\t\tupdateDOMElements(context);\n\t\t});\n\t} else {\n\t\twindow.addEventListener(\"fdc3Ready\", async () => {\n\t\t\tawait window.fdc3.addContextListener(null, (context) => {\n\t\t\t\tupdateDOMElements(context);\n\t\t\t});\n\t\t});\n\t}\n}\n\n/**\n * Updates the DOM elements with the provided context.\n * @param context The context to update the DOM elements with.\n */\nfunction updateDOMElements(context: Context): void {\n\tconst contextTypeSpan = document.querySelector(\"#contextType\");\n\tconst contextNameSpan = document.querySelector(\"#contextName\");\n\tconst contextBodyPre = document.querySelector(\"#contextBody\");\n\n\tif (contextTypeSpan !== null && contextNameSpan !== null && contextBodyPre !== null) {\n\t\tcontextTypeSpan.textContent = context.type;\n\t\tcontextNameSpan.textContent = context.name ?? \"No name provided.\";\n\t\tcontextBodyPre.textContent = JSON.stringify(context, null, 2);\n\t}\n}\n\n/**\n * Initialize the DOM elements.\n */\nasync function initializeDOM(): Promise {\n\tconst broadcastButton = document.querySelector(\"#broadcast\");\n\n\tif (broadcastButton !== null) {\n\t\tbroadcastButton.addEventListener(\"click\", async () => {\n\t\t\tawait broadcastContext();\n\t\t});\n\t}\n\n\tawait addFDC3Listener();\n}\n"],"names":[],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"fdc3-view.bundle.js","mappings":";;;;;;;;;;AAAa,MAAM,mBAAO,CAAC,qFAAoB,EAAE,mBAAO,CAAC,mDAAS,EAAE,mBAAO,CAAC,+DAAM,EAAE,mBAAO,CAAC,mDAAQ,EAAE,mBAAO,CAAC,gEAAkB,EAAE,mBAAO,CAAC,4DAAgB,EAAE,eAAe;;;;;;;;;;;;ACA9J,MAAM,mBAAO,CAAC,mDAAS,IAAI,mBAAO,CAAC,mDAAQ,IAAI,mBAAO,CAAC,gEAAkB,IAAI,mBAAO,CAAC,4DAAgB,IAAI,mBAAO,CAAC,+DAAM,EAAE,kBAAkB,EAAE,GAAG,wBAAwB,GA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AkD,OAAO,uBAAuB,SAAS,MAAM,OAAO,cAAc,eAAe,2BAA2B,OAAO,eAAe,sDAAsD,oCAAoC,IAAI,iIAAiI,sBAAsB,yCAAyC,2FAA2F;;;;;;;;;;;;ACFv6nD;;AAEZ,kBAAkB;AAClB,mBAAmB;AACnB,qBAAqB;;AAErB;AACA;AACA;;AAEA;AACA,mCAAmC,SAAS;AAC5C;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,cAAc,SAAS;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,2CAA2C,UAAU;AACrD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;ACrJA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEY;;AAEZ,eAAe,mBAAO,CAAC,wDAAW;AAClC,gBAAgB,mBAAO,CAAC,oDAAS;AACjC;AACA;AACA;AACA;;AAEA,cAAc;AACd,kBAAkB;AAClB,yBAAyB;;AAEzB;AACA,kBAAkB;;AAElB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,kBAAkB,YAAY;AAC9B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA,wCAAwC,SAAS;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;;AAEA;AACA;AACA,cAAc,iBAAiB;AAC/B;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,iDAAiD,EAAE;AACnD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C;AAC1C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA,yBAAyB,eAAe;AACxC;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,yBAAyB,QAAQ;AACjC;AACA,sBAAsB,eAAe;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc,YAAY;AAC1B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB,sBAAsB;AACxC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,mBAAmB;AACnB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA,oBAAoB,SAAS;AAC7B;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA,qBAAqB,WAAW,GAAG,IAAI;AACvC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA,gBAAgB,WAAW,GAAG,IAAI,KAAK,aAAa;AACpD;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;;AAEA;AACA,GAAG;AACH;AACA;AACA,mBAAmB,KAAK,mDAAmD,cAAc;AACzF,GAAG;AACH;AACA;AACA,+BAA+B,IAAI;AACnC;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,MAAM,aAAa,SAAS;AACtD;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,SAAS,gBAAgB;AACzB,cAAc,oBAAoB,EAAE,IAAI;AACxC;AACA,YAAY,gBAAgB,EAAE,IAAI;AAClC;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,GAAG,SAAS,GAAG,KAAK,qBAAqB,EAAE,EAAE;AACpE,QAAQ;AACR,yBAAyB,GAAG,KAAK,yBAAyB,EAAE,EAAE;AAC9D,mBAAmB,yBAAyB,EAAE,EAAE;AAChD;AACA,MAAM;AACN,oBAAoB,IAAI,EAAE,GAAG,SAAS,IAAI,EAAE,EAAE;AAC9C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,0CAA0C,cAAc,SAAS,OAAO;AACxE;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,kBAAkB,YAAY;AAC9B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,kBAAkB,gBAAgB;AAClC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,kBAAkB,gBAAgB;AAClC;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,cAAc,YAAY;AAC1B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,QAAQ;AAC1B;AACA,oBAAoB,QAAQ;AAC5B;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;;;;;ACzjEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEa;;AAEb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB;;AAEnB;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,sBAAsB;AACxC;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA,eAAe;AACf;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA,oBAAoB,SAAS;AAC7B;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;;AAEA,kCAAkC,QAAQ;AAC1C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oBAAoB,iBAAiB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,QAAQ;AACR;AACA,uCAAuC,QAAQ;AAC/C;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,OAAO;AACzB;AACA;AACA;;AAEA;AACA,SAAS,yBAAyB;AAClC;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,gBAAgB;AAClC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,8DAA8D,YAAY;AAC1E;AACA,8DAA8D,YAAY;AAC1E;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,qCAAqC,YAAY;AACjD;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;AACA;;;;;;;;;;;AChfA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,SAAS,WAAW;;AAEpB;AACA;AACA;AACA,SAAS,WAAW;;AAEpB;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA,SAAS,WAAW;;AAEpB;AACA;AACA,SAAS,UAAU;;AAEnB;AACA;;;;;;;;;;;ACpFA,gBA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A;;AAEA;;;;;;;;;;;ACxBA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,kBAAkB,mBAAO,CAAC,+DAAe;AACzC,cAAc,mBAAO,CAAC,uDAAW;AACjC,eAAe,mBAAO,CAAC,yDAAY;AACnC,cAAc,mBAAO,CAAC,yDAAY;AAClC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,SAAS;AACpB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AChDA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACnBA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,UAAU;AACrB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACtBA,sBAAsB,mBAAO,CAAC,yEAAoB;AAClD,SAAS,mBAAO,CAAC,6CAAM;;AAEvB;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC3BA,SAAS,mBAAO,CAAC,6CAAM;;AAEvB;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpBA,iBAAiB,mBAAO,CAAC,+DAAe;A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AACnC,YAAY,mBAAO,CAAC,mDAAS;AAC7B,WAAW,mBAAO,CAAC,iDAAQ;AAC3B,aAAa,mBAAO,CAAC,qDAAU;;AAE/B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,SAAS;AACpB;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa,GAAG;AAChB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;AACA,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;;;;;;;;;;ACrKA,eAAe,mBAAO,CAAC,yDAAY;;AAEnC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;;;;;;;;;;AC7BA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,cAAc,mBAAO,CAAC,uDAAW;;AAEjC;AACA;AACA;AACA;AACA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nB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClFA,aAAa,mBAAO,CAAC,uDAAW;AAChC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA,iBAAiB,mBAAO,CAAC,6DAAc;AACvC,eAAe,mBAAO,CAAC,2DAAa;AACpC,eAAe,mBAAO,CAAC,yDAAY;AACnC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;AACA;AACA;AACA,oCAAoC;;AAEpC;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC9CA,aAAa,mBAAO,CAAC,uDAAW;AAChC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,eAAe,mBAAO,CAAC,yDAAY;AACnC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC3DA,kBAAkB,mBAAO,CAAC,iEAAgB;AAC1C,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC7BA,eAAe,mBAAO,CAAC,yDAAY;AACnC,kBAAkB,mBAAO,CAAC,iEAAgB;AAC1C,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AChCA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACnBA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,aAAa,UAAU;AACvB;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACbA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACZA,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,aAAa,aAAa;AAC1B;AACA;AACA;AACA;A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,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACnFA,aAAa,mBAAO,CAAC,uDAAW;AAChC,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,SAAS,mBAAO,CAAC,6CAAM;AACvB,kBAAkB,mBAAO,CAAC,iEAAgB;AAC1C,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC/GA,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA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AAO,CAAC,yEAAoB;;AAElD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC5EA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,mBAAmB,mBAAO,CAAC,mEAAiB;AAC5C,kBAAkB,mBAAO,CAAC,iEAAgB;;AAE1C;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACxBA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACdA,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACnBA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A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ACdA,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;ACRA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACbA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;;;;;;;;;;ACjBA,gBAAgB,mBAAO,CAAC,6DAAc;;AAEtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACdA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,GAAG;AAChB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACbA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACbA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,UAAU,mBAAO,CAAC,iDAAQ;AAC1B,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjCA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;;;;;;;;;;;ACzBA,gBAAgB,mBAAO,CAAC,6DAAc;;AAEtC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,GAAG;AAChB;AACA;AACA;AACA,oBAAoB,QAAQ,IAAI,QAAQ;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,kBAAkB;AAClB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpCA,sBAAsB,mBAAO,CAAC,yEAAoB;AAClD,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA,8BAA8B,mBAAmB;AACjD;AACA;AACA;AACA;AACA;AACA,+CAA+C,mBAAmB;AAClE;AACA;AACA;;AAEA;;;;;;;;;;;ACnCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACzBA,iBAAiB,mBAAO,CAAC,6DAAc;AACvC,eAAe,mBAAO,CAAC,yDAAY;;AAEnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AChCA,WAAW,mBAAO,CAAC,mDAAS;AAC5B,gBAAgB,mBAAO,CAAC,2DAAa;;AAErC;AACA,kBAAkB,KAA0B;;AAE5C;AACA,gCAAgC,QAAa;;AAE7C;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACrCA,kBAAkB,mBAAO,CAAC,iEAAgB;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,kBAAkB;AAClB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClCA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,eAAe,mBAAO,CAAC,yDAAY;;AAEnC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpCA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClCA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC1BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC9BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC5BA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC1BA,uBAAuB,mBAAO,CAAC,2EAAqB;AACpD,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC1BA,oBAAoB,mBAAO,CAAC,qEAAkB;AAC9C,eAAe,mBAAO,CAAC,2DAAa;AACpC,kBAAkB,mBAAO,CAAC,+DAAe;;AAEzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;A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A;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA,kBAAkB,cAAc;AAChC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,kBAAkB,cAAc;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,kBAAkB,aAAa;AAC/B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,iEAAe,GAAG;;;;;;;;;;;;;;;ACtNlB,iEAAe,sCAAsC;;;;;;;;;;;;;;;;ACAhB;;AAErC;AACA,OAAO,wDAAQ;AACf;AACA;;AAEA;AACA,gCAAgC;;AAEhC;AACA;AACA;AACA,qBAAqB;;AAErB;AACA,qBAAqB;;AAErB;AACA,qBAAqB;;AAErB;AACA,qBAAqB;AACrB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,iEAAe,KAAK;;;;;;;;;;;;;;;AClCpB,iEAAe,cAAc,EAAE,UAAU,EAAE,eAAe,EAAE,gBAAgB,EAAE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AAa;IAC3B,MAAM,eAAe,GAAG,QAAQ,CAAC,aAAa,CAAoB,YAAY,CAAC,CAAC;IAEhF,IAAI,eAAe,KAAK,IAAI,EAAE,CAAC;QAC9B,eAAe,CAAC,gBAAgB,CAAC,OAAO,EAAE,KAAK,IAAI,EAAE;YACpD,MAAM,gBAAgB,EAAE,CAAC;QAC1B,CAAC,CAAC,CAAC;IACJ,CAAC;IAED,MAAM,eAAe,EAAE,CAAC;AACzB,CAAC","sources":["webpack://openfin-web--cloud-interop/../../node_modules/@openfin/core-web/out/api-client.js","webpack://openfin-web--cloud-interop/../../node_modules/@openfin/core-web/out/main-8cad4070.js","webpack://openfin-web--cloud-interop/../../node_modules/@openfin/core-web/out/main-b14f67c9.js","webpack://openfin-web--cloud-interop/../../node_modules/base64-js/index.js","webpack://openfin-web--cloud-interop/../../node_modules/buffer/index.js","webpack://openfin-web--cloud-interop/../../node_modules/events/events.js","webpack://openfin-web--cloud-interop/../../node_modules/ieee754/index.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_DataView.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_Hash.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_ListCache.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_Map.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_MapCache.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_Promise.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_Set.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_SetCache.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_Stack.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_Symbol.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_Uint8Array.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_WeakMap.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_arrayEach.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_arrayFilter.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_arrayLikeKeys.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_arrayPush.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_arraySome.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_assignValue.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_assocIndexOf.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseAssign.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseAssignIn.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseAssignValue.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseClone.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseCreate.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseGetAllKeys.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseGetTag.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseIsArguments.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseIsEqual.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseIsEqualDeep.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseIsMap.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseIsNative.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseIsSet.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseIsTypedArray.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseKeys.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseKeysIn.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseTimes.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseUnary.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_cacheHas.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_cloneArrayBuffer.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_cloneBuffer.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_cloneDataView.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_cloneRegExp.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_cloneSymbol.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_cloneTypedArray.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_copyArray.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_copyObject.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_copySymbols.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_copySymbolsIn.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_coreJsData.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_defineProperty.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_equalArrays.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_equalByTag.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_equalObjects.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_freeGlobal.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_getAllKeys.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_getAllKeysIn.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_getMapData.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_getNative.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_getPrototype.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_getRawTag.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_getSymbols.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_getSymbolsIn.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_getTag.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_getValue.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_hashClear.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_hashDelete.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_hashGet.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_hashHas.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_hashSet.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_initCloneArray.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_initCloneByTag.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_initCloneObject.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_isIndex.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_isKeyable.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_isMasked.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_isPrototype.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_listCacheClear.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_listCacheDelete.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_listCacheGet.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_listCacheHas.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_listCacheSet.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_mapCacheClear.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_mapCacheDelete.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_mapCacheGet.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_mapCacheHas.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_mapCacheSet.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_mapToArray.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_nativeCreate.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_nativeKeys.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_nativeKeysIn.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_nodeUtil.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_objectToString.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_overArg.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_root.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_setCacheAdd.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_setCacheHas.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_setToArray.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_stackClear.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_stackDelete.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_stackGet.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_stackHas.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_stackSet.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_toSource.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/cloneDeep.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/eq.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/isArguments.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/isArray.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/isArrayLike.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/isBuffer.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/isEqual.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/isFunction.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/isLength.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/isMap.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/isObject.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/isObjectLike.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/isSet.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/isTypedArray.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/keys.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/keysIn.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/stubArray.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/stubFalse.js","webpack://openfin-web--cloud-interop/./client/src/platform/api.ts","webpack://openfin-web--cloud-interop/./client/src/platform/settings.ts","webpack://openfin-web--cloud-interop/../../node_modules/uuid/dist/esm-browser/index.js","webpack://openfin-web--cloud-interop/../../node_modules/uuid/dist/esm-browser/md5.js","webpack://openfin-web--cloud-interop/../../node_modules/uuid/dist/esm-browser/nil.js","webpack://openfin-web--cloud-interop/../../node_modules/uuid/dist/esm-browser/parse.js","webpack://openfin-web--cloud-interop/../../node_modules/uuid/dist/esm-browser/regex.js","webpack://openfin-web--cloud-interop/../../node_modules/uuid/dist/esm-browser/rng.js","webpack://openfin-web--cloud-interop/../../node_modules/uuid/dist/esm-browser/sha1.js","webpack://openfin-web--cloud-interop/../../node_modules/uuid/dist/esm-browser/stringify.js","webpack://openfin-web--cloud-interop/../../node_modules/uuid/dist/esm-browser/v1.js","webpack://openfin-web--cloud-interop/../../node_modules/uuid/dist/esm-browser/v3.js","webpack://openfin-web--cloud-interop/../../node_modules/uuid/dist/esm-browser/v35.js","webpack://openfin-web--cloud-interop/../../node_modules/uuid/dist/esm-browser/v4.js","webpack://openfin-web--cloud-interop/../../node_modules/uuid/dist/esm-browser/v5.js","webpack://openfin-web--cloud-interop/../../node_modules/uuid/dist/esm-browser/validate.js","webpack://openfin-web--cloud-interop/../../node_modules/uuid/dist/esm-browser/version.js","webpack://openfin-web--cloud-interop/webpack/bootstrap","webpack://openfin-web--cloud-interop/webpack/runtime/define property getters","webpack://openfin-web--cloud-interop/webpack/runtime/global","webpack://openfin-web--cloud-interop/webpack/runtime/hasOwnProperty shorthand","webpack://openfin-web--cloud-interop/webpack/runtime/make namespace object","webpack://openfin-web--cloud-interop/webpack/runtime/node module decorator","webpack://openfin-web--cloud-interop/./client/src/content/fdc3-view.ts"],"sourcesContent":["\"use strict\";var e=require(\"./main-8cad4070.js\");require(\"buffer/\"),require(\"uuid\"),require(\"events\"),require(\"lodash/cloneDeep\"),require(\"lodash/isEqual\"),exports.connect=e.connect;\n","\"use strict\";var e=require(\"buffer/\"),t=require(\"events\"),n=require(\"lodash/cloneDeep\"),i=require(\"lodash/isEqual\"),r=require(\"uuid\");const o=(e,t)=>`${t}<${btoa(JSON.stringify(e))}>`;var s=\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof window?window:\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:{},a={},c={},d={},h={};async function l(e){const t=[];for(const n of e){const e=await n();t.push(e)}return t}Object.defineProperty(h,\"__esModule\",{value:!0}),h.promiseMapSerial=h.serial=h.promiseMap=h.promisify=void 0,h.promisify=function(e){return(...t)=>new Promise(((n,i)=>{e(...t,((e,t)=>e?i(e):n(t)))}))},h.promiseMap=async function(e,t){return Promise.all(e.map(t))},h.serial=l,h.promiseMapSerial=async function(e,t){return l(e.map(((e,n,i)=>()=>t(e,n,i))))};var u,p=s&&s.__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},w=s&&s.__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)};Object.defineProperty(d,\"__esModule\",{value:!0}),d.Reply=d.EmitterBase=d.Base=void 0;const y=h;class f{constructor(e){this.isNodeEnvironment=()=>\"node\"===this.wire.environment.type,this.isOpenFinEnvironment=()=>\"openfin\"===this.wire.environment.type,this.isBrowserEnvironment=()=>\"other\"===this.wire.environment.type,this.wire=e}get fin(){return this.wire.getFin()}get me(){return this.wire.me}}d.Base=f;d.EmitterBase=class extends f{constructor(e,t,...n){super(e),this.topic=t,u.set(this,void 0),this.eventNames=()=>this.hasEmitter()?this.getOrCreateEmitter().eventNames():[],this.emit=(e,t,...n)=>!!this.hasEmitter()&&this.getOrCreateEmitter().emit(e,t,...n),this.hasEmitter=()=>this.wire.eventAggregator.has(w(this,u,\"f\")),this.getOrCreateEmitter=()=>this.wire.eventAggregator.getOrCreate(w(this,u,\"f\")),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[],this.listenerCount=e=>this.hasEmitter()?this.getOrCreateEmitter().listenerCount(e):0,this.registerEventListener=async(e,t={},n,i)=>{const r={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e},o=this.getOrCreateEmitter();n(o);try{await this.wire.sendAction(\"subscribe-to-desktop-event\",r)}catch(e){throw i(o),this.deleteEmitterIfNothingRegistered(o),e}},this.deregisterEventListener=async(e,t={})=>{if(this.hasEmitter()){const n={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e};await this.wire.sendAction(\"unsubscribe-to-desktop-event\",n).catch((()=>null));return this.getOrCreateEmitter()}return Promise.resolve()},p(this,u,[t,...n],\"f\"),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[]}async on(e,t,n){return await this.registerEventListener(e,n,(n=>{n.on(e,t)}),(n=>{n.removeListener(e,t)})),this}async addListener(e,t,n){return this.on(e,t,n)}async once(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.once(e,i),n.once(e,t)}),(n=>{n.removeListener(e,i),n.removeListener(e,t)})),this}async prependListener(e,t,n){return await this.registerEventListener(e,n,(n=>{n.prependListener(e,t)}),(n=>{n.removeListener(e,t)})),this}async prependOnceListener(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.prependOnceListener(e,t),n.once(e,i)}),(n=>{n.removeListener(e,t),n.removeListener(e,i)})),this}async removeListener(e,t,n){const i=await this.deregisterEventListener(e,n);return i&&(i.removeListener(e,t),this.deleteEmitterIfNothingRegistered(i)),this}async deregisterAllListeners(e){const t={...this.identity,type:e,topic:this.topic};if(this.hasEmitter()){const e=this.getOrCreateEmitter(),n=e.listenerCount(t.type),i=[];for(let e=0;enull)));return await Promise.all(i),e}}async removeAllListeners(e){const t=async e=>{const t=await this.deregisterAllListeners(e);t&&(t.removeAllListeners(e),this.deleteEmitterIfNothingRegistered(t))};if(e)await t(e);else if(this.hasEmitter()){const e=this.getOrCreateEmitter().eventNames();await(0,y.promiseMap)(e,t)}return this}deleteEmitterIfNothingRegistered(e){0===e.eventNames().length&&this.wire.eventAggregator.delete(w(this,u,\"f\"))}},u=new WeakMap;d.Reply=class{};var g={};Object.defineProperty(g,\"__esModule\",{value:!0});var m=g.RuntimeError=g.NotSupportedError=g.NotImplementedError=g.NoAckError=g.DuplicateCorrelationError=g.UnexpectedActionError=g.DisconnectedError=void 0;class v extends Error{constructor(e){super(`Expected websocket state OPEN but found ${e}`),this.readyState=e}}g.DisconnectedError=v;class C extends Error{}g.UnexpectedActionError=C;class b extends Error{}g.DuplicateCorrelationError=b;class I extends Error{}g.NoAckError=I;class E extends Error{}g.NotImplementedError=E;class x extends Error{}g.NotSupportedError=x;class A extends Error{constructor(e){const{message:t,name:n,stack:i,...r}=e;super(t),this.name=n||\"Error\",this.stack=i??this.toString(),Object.keys(r).forEach((e=>{this[e]=r[e]}))}}class P extends Error{static getCallSite(e=0){const t=Error.stackTraceLimit,n=e+1;Error.stackTraceLimit=t+n;const i=Error.prepareStackTrace;Error.prepareStackTrace=(e,t)=>t;const r=(new Error).stack?.slice(n)??[];return Error.prepareStackTrace=i,Error.stackTraceLimit=t,r}static prepareStackTrace(e,t){if(\"function\"==typeof Error.prepareStackTrace)return Error.prepareStackTrace(e,t);let n=\"\";n+=e.name||\"Error\",n+=`: ${e.message||\"\"}`;for(const e of t)n+=`\\n at ${e.toString()}`;return n}constructor(e,t){const{reason:n,error:i}=e;super(n),this.name=\"RuntimeError\",i?.stack&&(this.cause=new A(i)),t&&(this.stack=P.prepareStackTrace(this,t))}}m=g.RuntimeError=P;var M={},_={},O={};Object.defineProperty(O,\"__esModule\",{value:!0}),O.validateIdentity=void 0,O.validateIdentity=function(e){let t;return\"object\"==typeof e&&\"string\"==typeof e.uuid||(t=\"Not a valid identity object\"),t};var S={},R={},F={},j={},k={},L={},T={};Object.defineProperty(T,\"__esModule\",{value:!0}),T.handleDeprecatedWarnings=void 0;var $;T.handleDeprecatedWarnings=e=>{(e.contentNavigation?.whitelist||e.contentNavigation?.blacklist||e.contentRedirect?.whitelist||e.contentRedirect?.blacklist)&&console.warn(\"The properties 'whitelist' and 'blacklist' have been marked as deprecated and will be removed in a future version. Please use 'allowlist' and 'denylist'.\")};var B={},G={};Object.defineProperty(G,\"__esModule\",{value:!0}),G.AsyncRetryableLazy=W=G.Lazy=void 0;var W=G.Lazy=class{constructor(e){this.producerFn=e}getValue(){return this.value||(this.value=this.producerFn()),this.value}};G.AsyncRetryableLazy=class{constructor(e){this.producerFn=e}async getValue(){return this.promise||(this.promise=this.producerFn().catch((e=>{throw delete this.promise,e}))),this.promise}};var H={};Object.defineProperty(H,\"__esModule\",{value:!0}),H.WebContents=void 0;const N=d;class D extends N.EmitterBase{constructor(e,t,n){super(e,n,t.uuid,t.name),this.identity=t,this.entityType=n}capturePage(e){return this.wire.sendAction(\"capture-page\",{options:e,...this.identity}).then((({payload:e})=>e.data))}executeJavaScript(e){return this.wire.sendAction(\"execute-javascript-in-window\",{...this.identity,code:e}).then((({payload:e})=>e.data))}getZoomLevel(){return this.wire.sendAction(\"get-zoom-level\",this.identity).then((({payload:e})=>e.data))}setZoomLevel(e){return this.wire.sendAction(\"set-zoom-level\",{...this.identity,level:e}).then((()=>{}))}navigate(e){return this.wire.sendAction(\"navigate-window\",{...this.identity,url:e}).then((()=>{}))}navigateBack(){return this.wire.sendAction(\"navigate-window-back\",{...this.identity}).then((()=>{}))}async navigateForward(){await this.wire.sendAction(\"navigate-window-forward\",{...this.identity})}stopNavigation(){return this.wire.sendAction(\"stop-window-navigation\",{...this.identity}).then((()=>{}))}reload(e=!1){return this.wire.sendAction(\"reload-window\",{ignoreCache:e,...this.identity}).then((()=>{}))}print(e={}){return this.wire.sendAction(\"print\",{...this.identity,options:e}).then((()=>{}))}findInPage(e,t){return this.wire.sendAction(\"find-in-page\",{...this.identity,searchTerm:e,options:t}).then((({payload:e})=>e.data))}stopFindInPage(e){return this.wire.sendAction(\"stop-find-in-page\",{...this.identity,action:e}).then((()=>{}))}getPrinters(){return this.wire.sendAction(\"get-printers\",{...this.identity}).then((({payload:e})=>e.data))}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){await this.wire.sendAction(\"focus-window\",{emitSynthFocused:e,...this.identity})}async showDeveloperTools(){await this.wire.sendAction(\"show-developer-tools\",this.identity)}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction(\"get-process-info\",this.identity);return e}async getSharedWorkers(){return this.wire.sendAction(\"get-shared-workers\",this.identity).then((({payload:e})=>e.data))}async inspectSharedWorker(){await this.wire.sendAction(\"inspect-shared-worker\",{...this.identity})}async inspectSharedWorkerById(e){await this.wire.sendAction(\"inspect-shared-worker-by-id\",{...this.identity,workerId:e})}async inspectServiceWorker(){await this.wire.sendAction(\"inspect-service-worker\",{...this.identity})}async showPopupWindow(e){if(this.wire.sendAction(`${this.entityType}-show-popup-window`,this.identity).catch((()=>{})),e?.onPopupReady){const t=async({popupName:t})=>{try{const n=this.fin.Window.wrapSync({uuid:this.fin.me.uuid,name:t});await e.onPopupReady(n)}catch(e){throw new Error(`Something went wrong during onPopupReady execution: ${e}`)}};await this.once(\"popup-ready\",t)}const{payload:t}=await this.wire.sendAction(\"try-create-popup-window\",{options:{...e,hasResultCallback:!!e?.onPopupResult,hasReadyCallback:!!e?.onPopupReady},...this.identity}),{data:{willOpen:n,options:i}}=t;n&&await this.fin.Window.create(i.initialOptions);if(e?.onPopupResult){const t=async t=>{await e.onPopupResult((e=>{const{name:t,uuid:n,result:i,data:r}=e,o={identity:{name:t,uuid:n},result:i};return r&&(o.data=r),o})(t))},n=async()=>{await this.removeListener(\"popup-result\",t)};await this.on(\"popup-result\",t),await this.once(\"popup-teardown\",n)}const{payload:r}=await this.wire.sendAction(\"show-popup-window\",{options:i,...this.identity});return r.data}}var U,V,z,K,q;function J(){return V||(V=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(function(){if($)return L;$=1,Object.defineProperty(L,\"__esModule\",{value:!0}),L.ViewModule=void 0;const e=d,t=O,n=J(),i=T;class r extends e.Base{async create(e){const{uuid:t}=this.wire.me;if(!e.name||\"string\"!=typeof e.name)throw new Error(\"Please provide a name property as a string in order to create a View.\");return(0,i.handleDeprecatedWarnings)(e),this.wire.environment.childViews?await this.wire.environment.createChildContent({entityType:\"view\",options:{...e,uuid:t}}):await this.wire.sendAction(\"create-view\",{...e,uuid:t}),this.wrapSync({uuid:t,name:e.name})}async wrap(e){this.wire.sendAction(\"view-wrap\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}wrapSync(e){this.wire.sendAction(\"view-wrap-sync\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}getCurrent(){if(this.wire.sendAction(\"view-get-current\").catch((e=>{})),!this.wire.me.isView)throw new Error(\"You are not in a View context\");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction(\"view-get-current-sync\").catch((e=>{})),!this.wire.me.isView)throw new Error(\"You are not in a View context\");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return L.ViewModule=r,L}(),e),n(function(){if(U)return B;var e;U=1,Object.defineProperty(B,\"__esModule\",{value:!0}),B.View=void 0;const t=g,n=G,i=H,r=ie();class o extends i.WebContents{constructor(i,o){super(i,o,\"view\"),this.identity=o,e.set(this,new n.Lazy((()=>this.fin.Platform.wrapSync(this.identity).getClient()))),this.attach=async e=>{await this.wire.sendAction(\"attach-view\",{target:e,...this.identity})},this.destroy=async()=>{await this.wire.sendAction(\"destroy-view\",{...this.identity})},this.show=async()=>{await this.wire.sendAction(\"show-view\",{...this.identity})},this.showAt=async(e,t={})=>{await this.wire.sendAction(\"show-view-at\",{bounds:e,...this.identity,options:t})},this.bringToFront=async()=>{await this.wire.sendAction(\"bring-view-to-front\",{...this.identity})},this.hide=async()=>{await this.wire.sendAction(\"hide-view\",{...this.identity})},this.setBounds=async e=>{await this.wire.sendAction(\"set-view-bounds\",{bounds:e,...this.identity})},this.getBounds=async()=>(await this.wire.sendAction(\"get-view-bounds\",{...this.identity})).payload.data,this.getInfo=async()=>(await this.wire.sendAction(\"get-view-info\",{...this.identity})).payload.data,this.getParentLayout=async()=>(this.wire.sendAction(\"view-get-parent-layout\",{...this.identity}).catch((()=>{})),this.fin.Platform.Layout.getLayoutByViewIdentity(this.identity)),this.getOptions=async()=>this.wire.sendAction(\"get-view-options\",{...this.identity}).then((({payload:e})=>e.data)),this.updateOptions=async e=>this.wire.sendAction(\"update-view-options\",{options:e,...this.identity}).then((()=>{})),this.getCurrentWindow=async()=>{const{payload:{data:e}}=await this.wire.sendAction(\"get-view-window\",{...this.identity});return new r._Window(this.wire,e)},this.getCurrentStack=async()=>{this.wire.sendAction(\"view-get-current-stack\").catch((()=>{}));try{return(await this.getParentLayout()).getStackByViewIdentity(this.identity)}catch(e){throw new t.RuntimeError({reason:\"This view does not belong to a stack.\",error:e})}},this.triggerBeforeUnload=async()=>(await this.wire.sendAction(\"trigger-before-unload\",{...this.identity})).payload.data,this.bindToElement=async e=>{if(!e)throw new Error(\"Element not found.\");return this.wire.environment.observeBounds(e,(async e=>this.setBounds(e)))}}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){const t=await this.getCurrentWindow();await t.focusedWebViewWasChanged(),await super.focus({emitSynthFocused:e})}}return B.View=o,e=new WeakMap,B}(),e)}(k)),k}function Y(){if(z)return j;z=1,Object.defineProperty(j,\"__esModule\",{value:!0}),j.Application=void 0;const e=d,t=ie(),n=J();class i extends e.EmitterBase{constructor(e,n){super(e,\"application\",n.uuid),this.identity=n,this.window=new t._Window(this.wire,{uuid:this.identity.uuid,name:this.identity.uuid})}windowListFromIdentityList(e){const n=[];return e.forEach((e=>{n.push(new t._Window(this.wire,{uuid:e.uuid,name:e.name}))})),n}isRunning(){return this.wire.sendAction(\"is-application-running\",this.identity).then((({payload:e})=>e.data))}async quit(e=!1){try{await this._close(e),await this.wire.sendAction(\"destroy-application\",{force:e,...this.identity})}catch(e){if(![\"Remote connection has closed\",\"Could not locate the requested application\"].some((t=>e.message.includes(t))))throw e}}async _close(e=!1){try{await this.wire.sendAction(\"close-application\",{force:e,...this.identity})}catch(e){if(!e.message.includes(\"Remote connection has closed\"))throw e}}close(e=!1){return console.warn(\"Deprecation Warning: Application.close is deprecated Please use Application.quit\"),this.wire.sendAction(\"application-close\",this.identity).catch((e=>{})),this._close(e)}getChildWindows(){return this.wire.sendAction(\"get-child-windows\",this.identity).then((({payload:e})=>{const t=[];return e.data.forEach((e=>{t.push({uuid:this.identity.uuid,name:e})})),this.windowListFromIdentityList(t)}))}getManifest(){return this.wire.sendAction(\"get-application-manifest\",this.identity).then((({payload:e})=>e.data))}getParentUuid(){return this.wire.sendAction(\"get-parent-application\",this.identity).then((({payload:e})=>e.data))}getShortcuts(){return this.wire.sendAction(\"get-shortcuts\",this.identity).then((({payload:e})=>e.data))}async getViews(){const{payload:e}=await this.wire.sendAction(\"application-get-views\",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}getZoomLevel(){return this.wire.sendAction(\"get-application-zoom-level\",this.identity).then((({payload:e})=>e.data))}getWindow(){return this.wire.sendAction(\"application-get-window\",this.identity).catch((e=>{})),Promise.resolve(this.window)}registerUser(e,t){return this.wire.sendAction(\"register-user\",{userName:e,appName:t,...this.identity}).then((()=>{}))}removeTrayIcon(){return this.wire.sendAction(\"remove-tray-icon\",this.identity).then((()=>{}))}restart(){return this.wire.sendAction(\"restart-application\",this.identity).then((()=>{}))}run(){return console.warn(\"Deprecation Warning: Application.run is deprecated Please use fin.Application.start\"),this.wire.sendAction(\"application-run\",this.identity).catch((e=>{})),this._run()}_run(e={}){return this.wire.sendAction(\"run-application\",{manifestUrl:this._manifestUrl,opts:e,...this.identity}).then((()=>{}))}scheduleRestart(){return this.wire.sendAction(\"relaunch-on-close\",this.identity).then((()=>{}))}async sendApplicationLog(){const{payload:e}=await this.wire.sendAction(\"send-application-log\",this.identity);return e.data}async setJumpList(e){await this.wire.sendAction(\"set-jump-list\",{config:e,...this.identity})}setTrayIcon(e){return this.wire.sendAction(\"set-tray-icon\",{enabledIcon:e,...this.identity}).then((()=>{}))}setShortcuts(e){return this.wire.sendAction(\"set-shortcuts\",{data:e,...this.identity}).then((()=>{}))}async setShortcutQueryParams(e){await this.wire.sendAction(\"set-shortcut-query-args\",{data:e,...this.identity})}setZoomLevel(e){return this.wire.sendAction(\"set-application-zoom-level\",{level:e,...this.identity}).then((()=>{}))}async setAppLogUsername(e){await this.wire.sendAction(\"set-app-log-username\",{data:e,...this.identity})}getTrayIconInfo(){return this.wire.sendAction(\"get-tray-icon-info\",this.identity).then((({payload:e})=>e.data))}hasTrayIcon(){return this.wire.sendAction(\"has-tray-icon\",this.identity).then((({payload:e})=>e.data))}terminate(){return this.wire.sendAction(\"terminate-application\",this.identity).then((()=>{}))}wait(){return this.wire.sendAction(\"wait-for-hung-application\",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction(\"get-info\",this.identity).then((({payload:e})=>e.data))}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction(\"application-get-process-info\",this.identity);return e}async setFileDownloadLocation(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t};await this.wire.sendAction(\"set-file-download-location\",{...n,downloadLocation:e})}async getFileDownloadLocation(){const{payload:{data:e}}=await this.wire.sendAction(\"get-file-download-location\",this.identity);return e}async showTrayIconPopupMenu(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t},{payload:i}=await this.wire.sendAction(\"show-tray-icon-popup-menu\",{...n,options:e});return i.data}async closeTrayIconPopupMenu(){const{name:e}=this.wire.me,t={uuid:this.identity.uuid,name:e};await this.wire.sendAction(\"close-tray-icon-popup-menu\",{...t})}}return j.Application=i,j}function Z(){return q||(q=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(function(){if(K)return F;K=1,Object.defineProperty(F,\"__esModule\",{value:!0}),F.ApplicationModule=void 0;const e=d,t=O,n=Y();class i extends e.Base{async wrap(e){this.wire.sendAction(\"wrap-application\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}wrapSync(e){this.wire.sendAction(\"wrap-application-sync\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}async _create(e){return void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&void 0===e.isPlatformController&&(e.autoShow=!0),await this.wire.sendAction(\"create-application\",e),this.wrap({uuid:e.uuid})}create(e){return console.warn(\"Deprecation Warning: fin.Application.create is deprecated. Please use fin.Application.start\"),this.wire.sendAction(\"application-create\").catch((e=>{})),this._create(e)}async start(e){this.wire.sendAction(\"start-application\").catch((e=>{}));const t=await this._create(e);return await this.wire.sendAction(\"run-application\",{uuid:e.uuid}),t}async startManyManifests(e,t){return this.wire.sendAction(\"run-applications\",{applications:e,opts:t}).then((()=>{}))}getCurrent(){return this.wire.sendAction(\"get-current-application\").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction(\"get-current-application-sync\").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}async startFromManifest(e,t){this.wire.sendAction(\"application-start-from-manifest\").catch((e=>{}));const n=await this._createFromManifest(e);return await n._run(t),n}createFromManifest(e){return console.warn(\"Deprecation Warning: fin.Application.createFromManifest is deprecated. Please use fin.Application.startFromManifest\"),this.wire.sendAction(\"application-create-from-manifest\").catch((e=>{})),this._createFromManifest(e)}_createFromManifest(e){return this.wire.sendAction(\"get-application-manifest\",{manifestUrl:e}).then((({payload:e})=>{const t=e.data.platform?e.data.platform.uuid:e.data.startup_app.uuid;return this.wrap({uuid:t})})).then((t=>(t._manifestUrl=e,t)))}}return F.ApplicationModule=i,F}(),e),n(Y(),e)}(R)),R}H.WebContents=D;var Q={};Object.defineProperty(Q,\"__esModule\",{value:!0}),Q.promisifySubscription=void 0;var X,ee,te;function ne(){if(X)return S;X=1,Object.defineProperty(S,\"__esModule\",{value:!0}),S._Window=void 0;const e=Z(),t=H,n=J(),i=T,r=Q;class o extends t.WebContents{constructor(e,t){super(e,t,\"window\")}async createWindow(e){this.wire.sendAction(\"window-create-window\",this.identity).catch((e=>{}));const t=await(0,r.promisifySubscription)(this,\"fire-constructor-callback\");void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&(e.autoShow=!0),(0,i.handleDeprecatedWarnings)(e);const n=this.wire.environment.createChildContent({entityType:\"window\",options:e}),[o]=await Promise.all([t.getValue(),n]);let s;const{success:a}=o,c=o.data,{message:d}=c;s=a?{httpResponseCode:c.httpResponseCode,apiInjected:c.apiInjected}:{message:c.message,networkErrorCode:c.networkErrorCode,stack:c.stack};const h={message:d,cbPayload:s,success:a};try{this.getWebWindow().fin.__internal_.openerSuccessCBCalled()}catch(e){}return h.success?this:Promise.reject(h)}getAllFrames(){return this.wire.sendAction(\"get-all-frames\",this.identity).then((({payload:e})=>e.data))}getBounds(){return this.wire.sendAction(\"get-window-bounds\",this.identity).then((({payload:e})=>e.data))}center(){return this.wire.sendAction(\"center-window\",this.identity).then((()=>{}))}blur(){return this.wire.sendAction(\"blur-window\",this.identity).then((()=>{}))}bringToFront(){return this.wire.sendAction(\"bring-window-to-front\",this.identity).then((()=>{}))}animate(e,t){return this.wire.sendAction(\"animate-window\",{transitions:e,options:t,...this.identity}).then((()=>{}))}hide(){return this.wire.sendAction(\"hide-window\",this.identity).then((()=>{}))}close(e=!1){return this.wire.sendAction(\"close-window\",{force:e,...this.identity}).then((()=>{Object.setPrototypeOf(this,null)}))}focusedWebViewWasChanged(){return this.wire.sendAction(\"focused-webview-changed\",this.identity).then((()=>{}))}getNativeId(){return this.wire.sendAction(\"get-window-native-id\",this.identity).then((({payload:e})=>e.data))}async getCurrentViews(){const{payload:e}=await this.wire.sendAction(\"window-get-views\",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}disableFrame(){return console.warn(\"Function is deprecated; use disableUserMovement instead.\"),this.wire.sendAction(\"disable-window-frame\",this.identity).then((()=>{}))}disableUserMovement(){return this.wire.sendAction(\"disable-window-frame\",this.identity).then((()=>{}))}enableFrame(){return console.warn(\"Function is deprecated; use enableUserMovement instead.\"),this.wire.sendAction(\"enable-window-frame\",this.identity).then((()=>{}))}enableUserMovement(){return this.wire.sendAction(\"enable-window-frame\",this.identity).then((()=>{}))}flash(){return this.wire.sendAction(\"flash-window\",this.identity).then((()=>{}))}stopFlashing(){return this.wire.sendAction(\"stop-flash-window\",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction(\"get-window-info\",this.identity).then((({payload:e})=>e.data))}async getLayout(e){this.wire.sendAction(\"window-get-layout\",this.identity).catch((e=>{}));const t=await this.getOptions();if(!t.layout&&!t.layoutSnapshot)throw new Error(\"Window does not have a Layout\");return this.fin.Platform.Layout.wrap(e??this.identity)}getOptions(){return this.wire.sendAction(\"get-window-options\",this.identity).then((({payload:e})=>e.data))}getParentApplication(){return this.wire.sendAction(\"window-get-parent-application\",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity))}getParentWindow(){return this.wire.sendAction(\"window-get-parent-window\",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity)).then((e=>e.getWindow()))}async getSnapshot(e){const t={area:e,...this.identity};console.warn(\"Window.getSnapshot has been deprecated, please use Window.capturePage\");return(await this.wire.sendAction(\"get-window-snapshot\",t)).payload.data}getState(){return this.wire.sendAction(\"get-window-state\",this.identity).then((({payload:e})=>e.data))}getWebWindow(){return this.wire.sendAction(\"window-get-web-window\",this.identity).catch((e=>{})),this.wire.environment.getWebWindow(this.identity)}isMainWindow(){return this.wire.sendAction(\"window-is-main-window\",this.identity).catch((e=>{})),this.me.uuid===this.me.name}isShowing(){return this.wire.sendAction(\"is-window-showing\",this.identity).then((({payload:e})=>e.data))}maximize(){return this.wire.sendAction(\"maximize-window\",this.identity).then((()=>{}))}minimize(){return this.wire.sendAction(\"minimize-window\",this.identity).then((()=>{}))}moveBy(e,t,n){return this.wire.sendAction(\"move-window-by\",{deltaLeft:e,deltaTop:t,positioningOptions:n,...this.identity}).then((()=>{}))}moveTo(e,t,n){return this.wire.sendAction(\"move-window\",{left:e,top:t,positioningOptions:n,...this.identity}).then((()=>{}))}resizeBy(e,t,n,i){return this.wire.sendAction(\"resize-window-by\",{deltaWidth:Math.floor(e),deltaHeight:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}resizeTo(e,t,n,i){return this.wire.sendAction(\"resize-window\",{width:Math.floor(e),height:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}restore(){return this.wire.sendAction(\"restore-window\",this.identity).then((()=>{}))}setAsForeground(){return this.wire.sendAction(\"set-foreground-window\",this.identity).then((()=>{}))}setBounds(e,t){return this.wire.sendAction(\"set-window-bounds\",{...e,...this.identity,positioningOptions:t}).then((()=>{}))}show(e=!1){return this.wire.sendAction(\"show-window\",{force:e,...this.identity}).then((()=>{}))}showAt(e,t,n=!1){return this.wire.sendAction(\"show-at-window\",{force:n,left:Math.floor(e),top:Math.floor(t),...this.identity}).then((()=>{}))}updateOptions(e){return this.wire.sendAction(\"update-window-options\",{options:e,...this.identity}).then((()=>{}))}authenticate(e,t){return this.wire.sendAction(\"window-authenticate\",{userName:e,password:t,...this.identity}).then((()=>{}))}async showPopupMenu(e){const{payload:t}=await this.wire.sendAction(\"show-popup-menu\",{options:e,...this.identity});return t.data}async closePopupMenu(){return this.wire.sendAction(\"close-popup-menu\",{...this.identity}).then((()=>{}))}async dispatchPopupResult(e){this.wire.sendAction(\"window-dispatch-popup-result\",this.identity).catch((e=>{})),await this.wire.sendAction(\"dispatch-popup-result\",{data:e,...this.identity})}async print(e={content:\"self\"}){switch(e.content){case void 0:case\"self\":return super.print(e);case\"screenshot\":return this.wire.sendAction(\"print-screenshot\",this.identity).then((()=>{}));case\"views\":return this.wire.sendAction(\"print-views\",{...this.identity,options:e}).then((()=>{}));default:return}}}return S._Window=o,S}function ie(){return te||(te=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(function(){if(ee)return _;ee=1,Object.defineProperty(_,\"__esModule\",{value:!0}),_._WindowModule=void 0;const e=d,t=O,n=ne();class i extends e.Base{async wrap(e){this.wire.sendAction(\"window-wrap\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}wrapSync(e){this.wire.sendAction(\"window-wrap-sync\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}create(e){return this.wire.sendAction(\"create-window\").catch((e=>{})),new n._Window(this.wire,{uuid:this.me.uuid,name:e.name}).createWindow(e)}getCurrent(){if(this.wire.sendAction(\"get-current-window\").catch((e=>{})),!this.wire.me.isWindow)throw new Error(\"You are not in a Window context\");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction(\"get-current-window-sync\").catch((e=>{})),!this.wire.me.isWindow)throw new Error(\"You are not in a Window context\");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return _._WindowModule=i,_}(),e),n(ne(),e)}(M)),M}Q.promisifySubscription=async(e,t,n=(()=>!0),i)=>{let r,o,s;const a=new Promise(((e,t)=>{r=e,o=t})),c=e=>{n(e)&&(clearTimeout(s),r(e))};return await e.on(t,c),i&&(s=setTimeout((()=>o(new Error(\"event timed out\"))),i)),a.finally((()=>{e.removeListener(t,c).catch((()=>null))})),{getValue:()=>a}},Object.defineProperty(c,\"__esModule\",{value:!0}),c.System=void 0;const re=d,oe=g,se=ie(),ae=t;class ce extends re.EmitterBase{constructor(e){super(e,\"system\")}sendExternalProcessRequest(e,t){return new Promise(((n,i)=>{const r=\"external-process-exited\";let o,s,a,c;\"function\"==typeof t.listener&&(a=e=>{const n=e||{};s={topic:\"exited\",uuid:n.processUuid||\"\",exitCode:n.exitCode||0},o===e.processUuid&&(t.listener(s),c.removeListener(r,a))},this.wire.me.name||(this.wire.me.name=this.wire.me.uuid),c=new se._Window(this.wire,this.wire.me),c.on(r,a)),this.wire.sendAction(e,t).then((({payload:e})=>{o=e.data.uuid,n(e.data),s&&o===s.uuid&&(t.listener(s),c.removeListener(r,a))})).catch((e=>{c&&c.removeListener(r,a),i(e)}))}))}getVersion(){return this.wire.sendAction(\"get-version\").then((({payload:e})=>e.data))}clearCache(e){return this.wire.sendAction(\"clear-cache\",e).then((()=>{}))}deleteCacheOnExit(){return this.wire.sendAction(\"delete-cache-request\").then((()=>{}))}exit(){return this.wire.sendAction(\"exit-desktop\").then((()=>{}))}async fetchManifest(e){const{payload:{data:t}}=await this.wire.sendAction(\"fetch-manifest\",{manifestUrl:e});return t}flushCookieStore(){return this.wire.sendAction(\"flush-cookie-store\").then((()=>{}))}getAllWindows(){return this.wire.sendAction(\"get-all-windows\").then((({payload:e})=>e.data))}getAllApplications(){return this.wire.sendAction(\"get-all-applications\").then((({payload:e})=>e.data))}getCommandLineArguments(){return this.wire.sendAction(\"get-command-line-arguments\").then((({payload:e})=>e.data))}async getCrashReporterState(){const{payload:{data:{diagnosticMode:e,isRunning:t}}}=await this.wire.sendAction(\"get-crash-reporter-state\");return console.warn(\"diagnosticMode property is deprecated. It will be removed in a future version\"),{diagnosticMode:e,diagnosticsMode:e,isRunning:t}}async startCrashReporter(e){const t=e,n={...t,diagnosticMode:t.diagnosticsMode||t.diagnosticMode},{payload:{data:{diagnosticMode:i,isRunning:r}}}=await this.wire.sendAction(\"start-crash-reporter\",n);return{diagnosticMode:i,diagnosticsMode:i,isRunning:r}}getUniqueUserId(){return this.wire.sendAction(\"get-unique-user-id\").then((({payload:e})=>e.data))}getEntityInfo(e,t){return this.wire.sendAction(\"get-entity-info\",{uuid:e,name:t}).then((({payload:e})=>e.data))}getEnvironmentVariable(e){return this.wire.sendAction(\"get-environment-variable\",{environmentVariables:e}).then((({payload:e})=>e.data))}getFocusedWindow(){return this.wire.sendAction(\"get-focused-window\").then((({payload:e})=>e.data))}async isAppCertified(e){const{payload:{data:{certifiedInfo:t}}}=await this.wire.sendAction(\"is-app-certified\",{manifestUrl:e});return t}getInstalledRuntimes(){return this.wire.sendAction(\"get-installed-runtimes\").then((({payload:e})=>e.data.runtimes))}async getInstalledApps(){const{payload:{data:{installedApps:e}}}=await this.wire.sendAction(\"get-installed-apps\");return e}getLog(e){return this.wire.sendAction(\"view-log\",e).then((({payload:e})=>e.data))}getMachineId(){return this.wire.sendAction(\"get-machine-id\").then((({payload:e})=>e.data))}getMinLogLevel(){return this.wire.sendAction(\"get-min-log-level\").then((({payload:e})=>e.data))}getLogList(){return this.wire.sendAction(\"list-logs\").then((({payload:e})=>e.data))}getMonitorInfo(){return this.wire.sendAction(\"get-monitor-info\").then((({payload:e})=>e.data))}getMousePosition(){return this.wire.sendAction(\"get-mouse-position\").then((({payload:e})=>e.data))}getProcessList(){return console.warn(\"System.getProcessList has been deprecated. Please consider using our new process APIs: Window.getProcessInfo, View.getProcessInfo, Application.getProcessInfo, System.getAllProcessInfo\"),this.wire.sendAction(\"process-snapshot\").then((({payload:e})=>e.data))}async getAllProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction(\"get-all-process-info\",this.identity);return e}getProxySettings(){return this.wire.sendAction(\"get-proxy-settings\").then((({payload:e})=>e.data))}getRuntimeInfo(){return this.wire.sendAction(\"get-runtime-info\").then((({payload:e})=>e.data))}getRvmInfo(){return this.wire.sendAction(\"get-rvm-info\").then((({payload:e})=>e.data))}getHostSpecs(){return this.wire.sendAction(\"get-host-specs\").then((({payload:e})=>e.data))}getOSInfo(){return this.wire.sendAction(\"get-os-info\").then((({payload:e})=>e.data))}launchExternalProcess(e){return this.sendExternalProcessRequest(\"launch-external-process\",e)}monitorExternalProcess(e){return this.sendExternalProcessRequest(\"monitor-external-process\",e)}log(e,t){return this.wire.sendAction(\"write-to-log\",{level:e,message:t}).then((()=>{}))}openUrlWithBrowser(e){return this.wire.sendAction(\"open-url-with-browser\",{url:e}).then((()=>{}))}async registerCustomProtocol(e){if(\"object\"!=typeof e)throw new Error(\"Must provide an object with a `protocolName` property having a string value.\");await this.wire.sendAction(\"register-custom-protocol\",e)}async unregisterCustomProtocol(e){await this.wire.sendAction(\"unregister-custom-protocol\",{protocolName:e})}async getCustomProtocolState(e){return this.wire.sendAction(\"get-custom-protocol-state\",{protocolName:e}).then((({payload:e})=>e.data))}releaseExternalProcess(e){return this.wire.sendAction(\"release-external-process\",{uuid:e}).then((()=>{}))}showDeveloperTools(e){return this.wire.sendAction(\"show-developer-tools\",e).then((()=>{}))}terminateExternalProcess(e){return this.wire.sendAction(\"terminate-external-process\",e).then((()=>{}))}updateProxySettings(e){return this.wire.sendAction(\"update-proxy\",e).then((()=>{}))}async downloadAsset(e,t){const n=()=>{};let i=n,r=n;const o=new Promise(((e,t)=>{i=e,r=t}));if(\"openfin\"!==this.wire.environment.type)throw new oe.NotSupportedError(\"downloadAsset only supported in an OpenFin Render process\");const s=oe.RuntimeError.getCallSite(),a=this.wire.environment.getNextMessageId().toString(),c=`asset-download-progress-${a}`,d=`asset-download-error-${a}`,h=`asset-download-complete-${a}`,l=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},u=()=>{this.removeListener(c,l)};await Promise.all([this.on(c,l),this.once(d,(e=>{u();const{reason:t,err:n}=e;r(new oe.RuntimeError({reason:t,error:n},s))})),this.once(h,(()=>{u(),i()}))]);const p=Object.assign(e,{downloadId:a});return await this.wire.sendAction(\"download-asset\",p).catch((e=>{throw u(),e})),o}downloadRuntime(e,t){const n=oe.RuntimeError.getCallSite();return new Promise(((i,r)=>{if(\"openfin\"!==this.wire.environment.type)return void r(new oe.NotSupportedError(\"downloadRuntime only supported in an OpenFin Render process\"));const o=this.wire.environment.getNextMessageId().toString(),s=`runtime-download-progress-${o}`,a=`runtime-download-error-${o}`,c=`runtime-download-complete-${o}`,d=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},h=()=>{this.removeListener(s,d)};this.on(s,d),this.once(a,(e=>{h();const{reason:t,err:i}=e;r(new oe.RuntimeError({reason:t,error:i},n))})),this.once(c,(()=>{h(),i()}));const l=Object.assign(e,{downloadId:o});this.wire.sendAction(\"download-runtime\",l).catch((e=>{h(),r(e)}))}))}downloadPreloadScripts(e){return this.wire.sendAction(\"download-preload-scripts\",{scripts:e}).then((({payload:e})=>e.data))}getAllExternalApplications(){return this.wire.sendAction(\"get-all-external-applications\").then((({payload:e})=>e.data))}getAppAssetInfo(e){return this.wire.sendAction(\"get-app-asset-info\",e).then((({payload:e})=>e.data))}getCookies(e){const t=this.wire.environment.getUrl(),n=Object.assign(e,{url:t});return this.wire.sendAction(\"get-cookies\",n).then((({payload:e})=>e.data))}setMinLogLevel(e){return this.wire.sendAction(\"set-min-log-level\",{level:e}).then((()=>{}))}resolveUuid(e){return this.wire.sendAction(\"resolve-uuid\",{entityKey:e}).then((({payload:e})=>e.data))}executeOnRemote(e,t){return t.requestingIdentity=e,this.wire.ferryAction(t)}readRegistryValue(e,t,n){return this.wire.sendAction(\"read-registry-value\",{rootKey:e,subkey:t,value:n}).then((({payload:e})=>e.data))}registerExternalConnection(e){return this.wire.sendAction(\"register-external-connection\",{uuid:e}).then((({payload:e})=>e.data))}async getServiceConfiguration(e){if(\"string\"!=typeof e.name)throw new Error(\"Must provide an object with a `name` property having a string value\");const{name:t}=e;return this.wire.sendAction(\"get-service-configuration\",{name:t}).then((({payload:e})=>e.data))}async getSystemAppConfig(e){if(\"string\"!=typeof e)throw new Error(\"Must provide a string value for name of system app\");return this.wire.sendAction(\"get-system-app-configuration\",{name:e}).then((({payload:e})=>e.data))}async registerShutdownHandler(e){this.wire.sendAction(\"system-register-shutdown-handler\").catch((e=>{}));const{uuid:t,name:n}=this.wire.me;this.on(\"system-shutdown\",(i=>{e({proceed:()=>{this.wire.environment.raiseEvent(\"application/system-shutdown-handled\",{uuid:t,name:n,topic:\"application\"})}})}))}runRvmHealthCheck(){return this.wire.sendAction(\"run-rvm-health-check\").then((({payload:e})=>e.data))}async launchManifest(e,t={}){const{subscribe:n,...i}=t,r=i;if(n){const e=new ae.EventEmitter;n(e);const t=\"app-version-progress\",i=\"runtime-status\",o=\"app-version-complete\",s=\"app-version-error\",a=this.wire.environment.getNextMessageId().toString();r.appVersionId=a;const c=[o,t,i,s],d=e=>{const{appVersionId:t,topic:n,type:i,...r}=e;return{...r,type:c.find((e=>i.includes(e)))}},h=t=>{const n=d(t);e.emit(n.type,n)},l=()=>{this.removeListener(`${t}.${a}`,h),this.removeListener(`${i}.${a}`,h),this.removeListener(`${o}.${a}`,h),this.removeListener(`${s}.${a}`,h),this.removeListener(`${o}.${a}`,l),this.removeListener(`${s}.${a}`,l)};await Promise.all([this.on(`${t}.${a}`,h),this.on(`${i}.${a}`,h),this.once(`${o}.${a}`,h),this.once(`${s}.${a}`,h),this.once(`${o}.${a}`,l),this.once(`${s}.${a}`,l)])}return(await this.wire.sendAction(\"launch-manifest\",{manifestUrl:e,opts:r})).payload.data.manifest}async queryPermissionForCurrentContext(e){const t={uuid:this.wire.me.uuid,name:this.wire.me.name};return(await this.wire.sendAction(\"query-permission-for-current-context\",{apiName:e,identity:t})).payload.data}async enableNativeWindowIntegrationProvider(e){const{payload:t}=await this.wire.sendAction(\"enable-native-window-integration-provider\",{permissions:e});return t.data}async registerUsage({data:e,type:t}){await this.wire.sendAction(\"register-usage\",{data:e,type:t})}async getPrinters(){const{payload:e}=await this.wire.sendAction(\"system-get-printers\");return e.data}async updateProcessLoggingOptions(e){await this.wire.sendAction(\"system-update-process-logging-options\",{options:e})}async getDomainSettings(){const{payload:{data:e}}=await this.wire.sendAction(\"get-domain-settings\",this.identity);return e}async setDomainSettings(e){await this.wire.sendAction(\"set-domain-settings\",{domainSettings:e,...this.identity})}async refreshExtensions(){const{payload:e}=await this.wire.sendAction(\"refresh-extensions\");return e.data}async getInstalledExtensions(){const{payload:e}=await this.wire.sendAction(\"get-installed-extensions\");return e.data}}c.System=ce;var de={},he={};Object.defineProperty(he,\"__esModule\",{value:!0}),he.RefCounter=void 0;he.RefCounter=class{constructor(){this.topicRefMap=new Map}incRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t+1;n=i,this.topicRefMap.set(e,i)}else this.topicRefMap.set(e,1),n=1;return n}decRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t-1;this.topicRefMap.set(e,i),n=i}else n=-1;return n}actOnFirst(e,t,n){return 1===this.incRefCount(e)?t():n()}actOnLast(e,t,n){return 0===this.decRefCount(e)?t():n()}};var le={},ue={},pe={};Object.defineProperty(pe,\"__esModule\",{value:!0}),pe.ChannelBase=pe.ProtectedItems=void 0;const we=e=>async(t,n,i)=>{const r=await e(t,n,i);return void 0===r?n:r};pe.ProtectedItems=class{constructor(e,t){this.providerIdentity=e,this.close=t}};class ye{static defaultAction(e){throw new Error(`No action registered at target for ${e}`)}constructor(){this.subscriptions=new Map}async processAction(e,t,n){try{const i=this.subscriptions.has(e)?this.subscriptions.get(e):(t,n)=>(this.defaultAction??ye.defaultAction)(e,t,n),r=this.preAction?await this.preAction(e,t,n):t,o=await i(r,n);return this.postAction?await this.postAction(e,o,n):o}catch(t){if(this.errorMiddleware)return this.errorMiddleware(e,t,n);throw t}}beforeAction(e){if(this.preAction)throw new Error(\"Already registered beforeAction middleware\");this.preAction=we(e)}onError(e){if(this.errorMiddleware)throw new Error(\"Already registered error middleware\");this.errorMiddleware=e}afterAction(e){if(this.postAction)throw new Error(\"Already registered afterAction middleware\");this.postAction=we(e)}remove(e){this.subscriptions.delete(e)}setDefaultAction(e){if(this.defaultAction)throw new Error(\"default action can only be set once\");this.defaultAction=e}register(e,t){if(this.subscriptions.has(e))throw new Error(`Subscription already registered for action: ${e}. Unsubscribe before adding new subscription`);return this.subscriptions.set(e,t),!0}}pe.ChannelBase=ye;var fe,ge,me,ve=s&&s.__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)},Ce=s&&s.__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};Object.defineProperty(ue,\"__esModule\",{value:!0}),ue.ChannelClient=void 0;const be=pe,Ie=new Map;class Ee extends be.ChannelBase{static closeChannelByEndpointId(e){const t=Ie.get(e);t&&ve(t,me,\"f\").call(t)}static handleProviderDisconnect(e){for(const t of Ie.values())t.providerIdentity.channelId===e.channelId&&(t.disconnectListener(e),ve(t,me,\"f\").call(t))}constructor(e,t,n){super(),fe.set(this,void 0),ge.set(this,void 0),this.processAction=(e,t,n)=>super.processAction(e,t,n),me.set(this,(()=>{Ie.delete(this.endpointId),ve(this,ge,\"f\").close()})),Ce(this,fe,new be.ProtectedItems(e,t),\"f\"),this.disconnectListener=()=>{},this.endpointId=e.endpointId,Ce(this,ge,n,\"f\"),Ie.set(this.endpointId,this),n.receive(this.processAction)}get providerIdentity(){return ve(this,fe,\"f\").providerIdentity}async dispatch(e,t){if(ve(this,ge,\"f\").isEndpointConnected(this.providerIdentity.channelId))return ve(this,ge,\"f\").send(this.providerIdentity.channelId,e,t);throw new Error(\"The client you are trying to dispatch from is disconnected from the target provider.\")}onDisconnection(e){this.disconnectListener=t=>{try{e(t)}catch(e){throw new Error(`Error while calling the onDisconnection callback: ${e.message}`)}finally{this.disconnectListener=()=>{}}}}async disconnect(){await this.sendDisconnectAction(),ve(this,me,\"f\").call(this)}async sendDisconnectAction(){const e=ve(this,fe,\"f\");await e.close()}static async wireClose(e,t,n){const{channelName:i,uuid:r,name:o}=t;await e.sendAction(\"disconnect-from-channel\",{channelName:i,uuid:r,name:o,endpointId:n})}}ue.ChannelClient=Ee,fe=new WeakMap,ge=new WeakMap,me=new WeakMap;var xe={},Ae={};Object.defineProperty(Ae,\"__esModule\",{value:!0}),Ae.exhaustiveCheck=void 0,Ae.exhaustiveCheck=function(e,t){throw new Error(`Unsupported value: ${e}${t?`\\n Supported values are: ${t.join(\"\")}`:\"\"}`)};var Pe,Me,_e,Oe={},Se=s&&s.__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},Re=s&&s.__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)};Object.defineProperty(Oe,\"__esModule\",{value:!0}),Oe.ClassicInfo=Oe.ClassicStrategy=void 0;Oe.ClassicStrategy=class{constructor(e,t,n,i){this.messageReceiver=t,this.endpointId=n,this.providerIdentity=i,Pe.set(this,void 0),Me.set(this,new Map),_e.set(this,new Map),this.send=async(e,t,n)=>{const i=Re(this,Me,\"f\").get(e);if(!i)throw new Error(`Could not locate routing info for endpoint ${e}`);const r={...i};r.isLocalEndpointId&&delete r.endpointId,delete r.isLocalEndpointId;const o=Re(this,Pe,\"f\").sendAction(\"send-channel-message\",{...r,providerIdentity:this.providerIdentity,action:t,payload:n});Re(this,_e,\"f\").get(e)?.add(o);return(await o.catch((e=>{throw new Error(e.message)})).finally((()=>{Re(this,_e,\"f\").get(e)?.delete(o)}))).payload.data.result},this.close=async()=>{this.messageReceiver.removeEndpoint(this.providerIdentity.channelId,this.endpointId),[...Re(this,Me,\"f\").keys()].forEach((e=>this.closeEndpoint(e))),Se(this,Me,new Map,\"f\")},Se(this,Pe,e,\"f\")}onEndpointDisconnect(e,t){}receive(e){this.messageReceiver.addEndpoint(e,this.providerIdentity.channelId,this.endpointId)}async closeEndpoint(e){const t=Re(this,Me,\"f\").get(e);Re(this,Me,\"f\").delete(e);const n=Re(this,_e,\"f\").get(e);n?.forEach((n=>{const i=`Channel connection with identity uuid: ${t?.uuid} / name: ${t?.name} / endpointId: ${e} no longer connected.`;n.cancel(new Error(i))}))}isEndpointConnected(e){return Re(this,Me,\"f\").has(e)}addEndpoint(e,t){Re(this,Me,\"f\").set(e,t.endpointIdentity),Re(this,_e,\"f\").set(e,new Set)}isValidEndpointPayload(e){return\"string\"==typeof e?.endpointIdentity?.endpointId||\"string\"==typeof e?.endpointIdentity?.channelId}},Pe=new WeakMap,Me=new WeakMap,_e=new WeakMap,Oe.ClassicInfo={version:5,minimumVersion:0,type:\"classic\"};var Fe={},je={},ke={};Object.defineProperty(ke,\"__esModule\",{value:!0}),ke.errorToPOJO=void 0,ke.errorToPOJO=function(e){return{stack:e.stack,name:e.name,message:e.message,toString:()=>e.stack||e.toString()}};var Le,Te,$e=s&&s.__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)},Be=s&&s.__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};Object.defineProperty(je,\"__esModule\",{value:!0}),je.RTCEndpoint=void 0;const Ge=ke;je.RTCEndpoint=class{static isValidEndpointPayload(e){const t=e=>\"object\"==typeof e&&null!==e;return t(e)&&t(e.endpointIdentity)&&t(e.rtc)&&\"string\"==typeof e.endpointIdentity.endpointId}constructor({rtc:e,endpointIdentity:t}){this.responseMap=new Map,Le.set(this,null),Te.set(this,void 0),this.connectionStateChangeHandler=e=>{\"connected\"!==this.rtc.rtcClient.connectionState&&(this.rtc.rtcClient.removeEventListener(\"connectionstatechange\",this.connectionStateChangeHandler),this.close(),$e(this,Te,\"f\")&&$e(this,Te,\"f\").call(this))},this.send=async(e,t)=>{const n=`message-${Math.random()}`,i=new Promise(((e,t)=>{this.responseMap.set(n,{resolve:e,reject:t})}));return this.rtc.channels.request.send(JSON.stringify({action:e,payload:t,messageId:n})),i},this.close=()=>{this.responseMap.forEach((e=>e.reject(\"Connection has closed.\"))),this.responseMap=new Map,this.rtc.channels.request.close(),this.rtc.channels.response.close(),this.rtc.rtcClient.close()},this.rtc=e,this.endpointIdentity=t,this.rtc.channels.response.addEventListener(\"message\",(e=>{let{data:t}=e;e.data instanceof ArrayBuffer&&(t=(new TextDecoder).decode(e.data));const{messageId:n,payload:i,success:r,error:o}=JSON.parse(t),{resolve:s,reject:a}=this.responseMap.get(n)??{};s&&a?(this.responseMap.delete(n),r?s(i):a(o)):(console.log(\"Could not find id in responseMap.\"),console.log(e))})),this.rtc.channels.request.addEventListener(\"message\",(async e=>{let{data:n}=e;e.data instanceof ArrayBuffer&&(n=(new TextDecoder).decode(e.data));const{messageId:i,action:r,payload:o}=JSON.parse(n);if($e(this,Le,\"f\"))try{const e=await $e(this,Le,\"f\").call(this,r,o,t);this.rtc.channels.response.send(JSON.stringify({messageId:i,payload:e,success:!0}))}catch(e){\"open\"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,error:(0,Ge.errorToPOJO)(e),success:!1}))}else\"open\"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,success:!1,error:\"Connection not ready.\"}))})),this.rtc.rtcClient.addEventListener(\"connectionstatechange\",this.connectionStateChangeHandler),Object.values(this.rtc.channels).forEach((e=>{e.onclose=e=>{[...this.responseMap.values()].forEach((e=>e.reject(new Error(\"RTCDataChannel closed unexpectedly, this is most commonly caused by message size. Note: RTC Channels have a message size limit of ~255kB.\")))),this.close(),$e(this,Te,\"f\")&&$e(this,Te,\"f\").call(this)}}))}onDisconnect(e){if($e(this,Te,\"f\"))throw new Error(\"RTCEndpoint disconnectListener cannot be set twice.\");Be(this,Te,e,\"f\")}receive(e){if($e(this,Le,\"f\"))throw new Error(\"You have already set a listener for this RTC Endpoint.\");Be(this,Le,e,\"f\")}get connected(){return\"connected\"===this.rtc.rtcClient.connectionState}},Le=new WeakMap,Te=new WeakMap;var We,He,Ne,De={},Ue=s&&s.__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)},Ve=s&&s.__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};Object.defineProperty(De,\"__esModule\",{value:!0}),De.EndpointStrategy=void 0;De.EndpointStrategy=class{constructor(e,t,n){this.EndpointType=e,this.StrategyName=n,We.set(this,null),He.set(this,new Map),Ne.set(this,!0),this.send=async(e,t,n)=>this.getEndpointById(e).send(t,n),this.close=async()=>{Ue(this,Ne,\"f\")&&(Ue(this,He,\"f\").forEach((e=>e.close())),Ve(this,He,new Map,\"f\")),Ve(this,Ne,!1,\"f\")},this.isValidEndpointPayload=t}onEndpointDisconnect(e,t){this.getEndpointById(e).onDisconnect(t)}receive(e){if(Ue(this,We,\"f\"))throw new Error(`You have already set a listener for this ${this.StrategyName} Strategy`);Ve(this,We,e,\"f\"),Ue(this,He,\"f\").forEach((e=>e.receive(Ue(this,We,\"f\"))))}getEndpointById(e){const t=Ue(this,He,\"f\").get(e);if(!t)throw new Error(`Client with endpoint id ${e} is not connected`);return t}get connected(){return Ue(this,Ne,\"f\")}isEndpointConnected(e){return Ue(this,He,\"f\").has(e)}addEndpoint(e,t){if(!Ue(this,Ne,\"f\"))return void console.warn(`Adding endpoint to disconnected ${this.StrategyName} Strategy`);const n=new this.EndpointType(t);Ue(this,We,\"f\")&&n.receive(Ue(this,We,\"f\")),Ue(this,He,\"f\").set(e,n)}async closeEndpoint(e){Ue(this,He,\"f\").delete(e)}},We=new WeakMap,He=new WeakMap,Ne=new WeakMap,Object.defineProperty(Fe,\"__esModule\",{value:!0}),Fe.RTCInfo=Fe.RTCStrategy=void 0;const ze=je,Ke=De;class qe extends Ke.EndpointStrategy{constructor(){super(ze.RTCEndpoint,ze.RTCEndpoint.isValidEndpointPayload,\"RTC\")}}Fe.RTCStrategy=qe,Fe.RTCInfo={version:2,minimumVersion:0,type:\"rtc\"};var Je={};Object.defineProperty(Je,\"__esModule\",{value:!0}),Je.RTCICEManager=void 0;const Ye=d;class Ze extends Ye.EmitterBase{constructor(e){super(e,\"channel\"),this.ensureChannelOpened=e=>new Promise(((t,n)=>{if(\"open\"===e.readyState)t();else if(\"connecting\"===e.readyState){const n=()=>{e.removeEventListener(\"open\",n),t()};e.addEventListener(\"open\",n)}else n(new Error(\"This Channel has already closed\"))}))}static createDataChannelPromise(e,t){let n;const i=new Promise((e=>{n=e})),r=i=>{const o=()=>{i.channel.removeEventListener(\"open\",o),n(i.channel)};i.channel.label===e&&(i.channel.addEventListener(\"open\",o),t.removeEventListener(\"datachannel\",r))};return t.addEventListener(\"datachannel\",r),i}async listenForProviderIce(e,t){await this.on(this.createProviderEventName(e),t,{timestamp:Date.now()})}async raiseProviderIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createProviderEventName(e)),t)}async listenForClientIce(e,t){await this.on(this.createClientEventName(e),t,{timestamp:Date.now()})}async raiseClientIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createClientEventName(e)),t)}cleanupIceListeners(e){this.removeAllListeners(this.createClientEventName(e)),this.removeAllListeners(this.createProviderEventName(e))}createClientEventName(e){return`ice-client-${e}`}createProviderEventName(e){return`ice-provider-${e}`}createRouteString(e){return`channel/${e}`}createRtcPeer(){return this.wire.environment.getRtcPeer()}async startClientOffer(){const e=Math.random().toString(),t=this.createRtcPeer();t.addEventListener(\"icecandidate\",(async t=>{t.candidate&&await this.raiseClientIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForProviderIce(e,(async e=>{await t.addIceCandidate(e.candidate)}));const n={request:t.createDataChannel(\"request\"),response:t.createDataChannel(\"response\")},i=await t.createOffer();await t.setLocalDescription(i);const r=Promise.all([n.request,n.response].map(this.ensureChannelOpened)).then((()=>{}));return{rtcClient:t,channels:n,offer:i,rtcConnectionId:e,channelsOpened:r}}async finishClientOffer(e,t,n){return await e.setRemoteDescription(t),await n,!0}async createProviderAnswer(e,t){const n=this.createRtcPeer(),i=Ze.createDataChannelPromise(\"request\",n),r=Ze.createDataChannelPromise(\"response\",n);n.addEventListener(\"icecandidate\",(async t=>{t.candidate&&await this.raiseProviderIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForClientIce(e,(async e=>{await n.addIceCandidate(e.candidate)})),await n.setRemoteDescription(t);const o=await n.createAnswer();await n.setLocalDescription(o);const s=Promise.all([i,r]).then((([t,n])=>(this.cleanupIceListeners(e),{request:t,response:n})));return{rtcClient:n,answer:o,channels:s}}}Je.RTCICEManager=Ze;var Qe={},Xe={};function et(e){return[...e.split(\".\").reverse().entries()].reduce(((e,[t,n])=>e+ +n*1e4**t),0)}function tt(e,t){return et(e)>=et(t)}function nt(e){return e.split(\"/\")[0]}Object.defineProperty(Xe,\"__esModule\",{value:!0}),Xe.runtimeUuidMeetsMinimumRuntimeVersion=Xe.parseRuntimeUuid=Xe.meetsMinimumRuntimeVersion=void 0,Xe.meetsMinimumRuntimeVersion=tt,Xe.parseRuntimeUuid=nt,Xe.runtimeUuidMeetsMinimumRuntimeVersion=function(e,t){return tt(nt(e),t)};var it,rt,ot,st,at,ct=s&&s.__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)},dt=s&&s.__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};Object.defineProperty(Qe,\"__esModule\",{value:!0}),Qe.ChannelProvider=void 0;const ht=pe,lt=Xe;class ut extends ht.ChannelBase{get connections(){return[...ct(this,it,\"f\")]}static handleClientDisconnection(e,t){const n=e.connections.find((e=>e.endpointId===t.endpointId));if(n)ct(e,st,\"f\").call(e,n);else{e.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name)).forEach(ct(e,st,\"f\"))}e.disconnectListener(t)}static setProviderRemoval(e,t){ut.removalMap.set(e,t)}constructor(e,t,n){super(),it.set(this,void 0),rt.set(this,void 0),ot.set(this,void 0),st.set(this,(e=>{const t=this.connections.filter((t=>t.endpointId!==e.endpointId));ct(this,ot,\"f\").closeEndpoint(e.endpointId),dt(this,it,t,\"f\")})),this.processAction=async(e,t,n)=>(ut.clientIsMultiRuntime(n)&&!(0,lt.runtimeUuidMeetsMinimumRuntimeVersion)(n.runtimeUuid,\"18.87.56.0\")?this.handleMultiRuntimeLegacyClient(n):this.checkForClientConnection(n),super.processAction(e,t,n)),at.set(this,(()=>{ct(this,ot,\"f\").close();const e=ut.removalMap.get(this);e&&e()})),dt(this,rt,new ht.ProtectedItems(e,t),\"f\"),this.connectListener=()=>{},this.disconnectListener=()=>{},dt(this,it,[],\"f\"),dt(this,ot,n,\"f\"),n.receive(this.processAction)}dispatch(e,t,n){const i=e.endpointId??this.getEndpointIdForOpenFinId(e,t);return i&&ct(this,ot,\"f\").isEndpointConnected(i)?ct(this,ot,\"f\").send(i,t,n):Promise.reject(new Error(`Client connection with identity uuid: ${e.uuid} / name: ${e.name} / endpointId: ${i} no longer connected.`))}async processConnection(e,t){return ct(this,it,\"f\").push(e),this.connectListener(e,t)}publish(e,t){return this.connections.map((n=>ct(this,ot,\"f\").send(n.endpointId,e,t)))}onConnection(e){this.connectListener=e}onDisconnection(e){this.disconnectListener=e}async destroy(){const e=ct(this,rt,\"f\");e.providerIdentity,dt(this,it,[],\"f\"),await e.close(),ct(this,at,\"f\").call(this)}async getAllClientInfo(){return this.connections.map((e=>{const{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}=e;return{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}}))}checkForClientConnection(e){if(!this.isClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider.\\n Client Identity: {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}isClientConnected(e){return ut.clientIdentityIncludesEndpointId(e)?this.connections.some((t=>t.endpointId===e.endpointId&&t.uuid===e.uuid&&t.name===e.name)):this.isLegacyClientConnected(e)}isLegacyClientConnected(e){return this.connections.some((t=>t.uuid===e.uuid&&t.name===e.name))}handleMultiRuntimeLegacyClient(e){if(!this.isLegacyClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider. Client Identity:\\n {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}getEndpointIdForOpenFinId(e,t){const n=this.connections.filter((t=>t.name===e.name&&t.uuid===e.uuid));if(n.length>=2){const n=ct(this,rt,\"f\"),{uuid:i,name:r}=e,o=n?.providerIdentity.uuid,s=n?.providerIdentity.name;console.warn(`WARNING: Dispatch call may have unintended results. The \"to\" argument of your dispatch call is missing the\\n \"endpointId\" parameter. The identity you are dispatching to ({uuid: ${i}, name: ${r}})\\n has multiple channelClients for this channel. Your dispatched action: (${t}) from the provider:\\n ({uuid: ${o}, name: ${s}}) will only be processed by the most recently-created client.`)}return n.pop()?.endpointId}static clientIdentityIncludesEndpointId(e){return void 0!==e.endpointId}static clientIsMultiRuntime(e){return void 0!==e.runtimeUuid}static async wireClose(e,t){await e.sendAction(\"destroy-channel\",{channelName:t})}}Qe.ChannelProvider=ut,it=new WeakMap,rt=new WeakMap,ot=new WeakMap,st=new WeakMap,at=new WeakMap,ut.removalMap=new WeakMap;var pt={};Object.defineProperty(pt,\"__esModule\",{value:!0}),pt.MessageReceiver=void 0;const wt=ue,yt=d;class ft extends yt.Base{constructor(e){super(e),this.onmessage=e=>\"process-channel-message\"===e.action&&(this.processChannelMessage(e),!0),this.endpointMap=new Map,this.latestEndpointIdByChannelId=new Map,e.registerMessageHandler(this.onmessage.bind(this))}async processChannelMessage(e){const{senderIdentity:t,providerIdentity:n,action:i,ackToSender:r,payload:o,intendedTargetIdentity:s}=e.payload,a=s.channelId??s.endpointId??this.latestEndpointIdByChannelId.get(n.channelId),c=this.endpointMap.get(a);if(!c)return r.payload.success=!1,r.payload.reason=`Client connection with identity uuid: ${this.wire.me.uuid} / name: ${this.wire.me.name} / endpointId: ${a} no longer connected.`,this.wire.sendRaw(r);try{const e=await c(i,o,t);return r.payload.payload=r.payload.payload||{},r.payload.payload.result=e,this.wire.sendRaw(r)}catch(e){return r.payload.success=!1,r.payload.reason=e.message,this.wire.sendRaw(r)}}addEndpoint(e,t,n){this.endpointMap.set(n,e),t!==n&&this.latestEndpointIdByChannelId.set(t,n)}removeEndpoint(e,t){this.endpointMap.delete(t),this.latestEndpointIdByChannelId.get(e)===t&&this.latestEndpointIdByChannelId.delete(e)}checkForPreviousClientConnection(e){const t=this.latestEndpointIdByChannelId.get(e);t&&(wt.ChannelClient.closeChannelByEndpointId(t),console.warn(\"You have created a second connection to an older provider. First connection has been removed from the clientMap\"),console.warn(\"If the provider calls publish(), you may receive multiple messages.\"))}}pt.MessageReceiver=ft;var gt={};Object.defineProperty(gt,\"__esModule\",{value:!0}),gt.ProtocolManager=void 0;gt.ProtocolManager=class{constructor(e){this.ProtocolsInPreferenceOrder=e,this.DefaultClientProtocols=[\"classic\"],this.DefaultProviderProtocols=[\"classic\"],this.getClientProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultClientProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(\", \")}.`);return t},this.getProviderProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultProviderProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(\", \")}.`);return t},this.getCompatibleProtocols=(e,t)=>t.supportedProtocols.filter((t=>e.some((e=>e.type===t.type&&t.version>=e.minimumVersion&&e.version>=(t.minimumVersion??0))))).slice(0,t.maxProtocols)}};var mt={};Object.defineProperty(mt,\"__esModule\",{value:!0});class vt{static combine(e,t){return new vt(e,t)}constructor(e,t){this.primary=e,this.secondary=t}onEndpointDisconnect(e,t){this.primary.onEndpointDisconnect(e,(()=>{this.secondary.isEndpointConnected(e)||t()})),this.secondary.onEndpointDisconnect(e,(()=>{this.primary.isEndpointConnected(e)||t()}))}isValidEndpointPayload(e){return this.primary.isValidEndpointPayload(e)||this.secondary.isValidEndpointPayload(e)}async closeEndpoint(e){await this.primary.closeEndpoint(e),await this.secondary.closeEndpoint(e)}isEndpointConnected(e){return this.primary.isEndpointConnected(e)||this.secondary.isEndpointConnected(e)}async addEndpoint(e,t){this.primary.isValidEndpointPayload(t)&&await this.primary.addEndpoint(e,t),this.secondary.isValidEndpointPayload(t)&&await this.secondary.addEndpoint(e,t)}receive(e){this.primary.receive(e),this.secondary.receive(e)}send(e,t,n){return this.primary.isEndpointConnected(e)?this.primary.send(e,t,n):this.secondary.send(e,t,n)}async close(){await Promise.all([this.primary.close(),this.secondary.close()])}}mt.default=vt;var Ct,bt,It=s&&s.__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},Et=s&&s.__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)},xt=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(xe,\"__esModule\",{value:!0}),xe.ConnectionManager=void 0;const At=Ae,Pt=d,Mt=Oe,_t=Fe,Ot=Je,St=Qe,Rt=pt,Ft=gt,jt=xt(mt);class kt extends Pt.Base{static getProtocolOptionsFromStrings(e){return e.map((e=>{switch(e){case\"rtc\":return _t.RTCInfo;case\"classic\":return Mt.ClassicInfo;default:return(0,At.exhaustiveCheck)(e,[\"rtc\",\"classic\"])}}))}constructor(e){super(e),Ct.set(this,void 0),bt.set(this,void 0),this.removeChannelFromProviderMap=e=>{this.providerMap.delete(e)},this.onmessage=e=>\"process-channel-connection\"===e.action&&(this.processChannelConnection(e),!0),this.providerMap=new Map,this.protocolManager=new Ft.ProtocolManager(\"node\"===this.wire.environment.type?[\"classic\"]:[\"rtc\",\"classic\"]),It(this,Ct,new Rt.MessageReceiver(e),\"f\"),It(this,bt,new Ot.RTCICEManager(e),\"f\"),e.registerMessageHandler(this.onmessage.bind(this))}createProvider(e,t){const n=Object.assign(this.wire.environment.getDefaultChannelOptions().create,e||{}),i=this.protocolManager.getProviderProtocols(n?.protocols),r=i.map((e=>{switch(e){case\"rtc\":return new _t.RTCStrategy;case\"classic\":return new Mt.ClassicStrategy(this.wire,Et(this,Ct,\"f\"),t.channelId,t);default:return(0,At.exhaustiveCheck)(e,[\"rtc\",\"classic\"])}}));let o;if(2===r.length){const[e,t]=r;o=jt.default.combine(e,t)}else{if(1!==r.length)throw new Error(\"failed to combine strategies\");[o]=r}const s=new St.ChannelProvider(t,(()=>St.ChannelProvider.wireClose(this.wire,t.channelName)),o),a=t.channelId;return this.providerMap.set(a,{provider:s,strategy:o,supportedProtocols:kt.getProtocolOptionsFromStrings(i)}),St.ChannelProvider.setProviderRemoval(s,this.removeChannelFromProviderMap.bind(this)),s}async createClientOffer(e){const t=this.protocolManager.getClientProtocols(e?.protocols);let n;return{offer:{supportedProtocols:await Promise.all(t.map((async e=>{switch(e){case\"rtc\":{const{rtcClient:e,channels:t,offer:i,rtcConnectionId:r,channelsOpened:o}=await Et(this,bt,\"f\").startClientOffer();return n={rtcClient:e,channels:t,channelsOpened:o},{type:\"rtc\",version:_t.RTCInfo.version,payload:{offer:i,rtcConnectionId:r}}}case\"classic\":return{type:\"classic\",version:Mt.ClassicInfo.version};default:return(0,At.exhaustiveCheck)(e,[\"rtc\",\"classic\"])}}))),maxProtocols:2},rtc:n}}async createClientStrategy(e,t){t.endpointId||(t.endpointId=this.wire.environment.getNextMessageId(),Et(this,Ct,\"f\").checkForPreviousClientConnection(t.channelId));const n=t.answer??{supportedProtocols:[{type:\"classic\",version:1}]},i=(await Promise.all(n.supportedProtocols.map((async n=>\"rtc\"===n.type&&e?(await Et(this,bt,\"f\").finishClientOffer(e.rtcClient,n.payload.answer,e.channelsOpened),new _t.RTCStrategy):\"classic\"===n.type?new Mt.ClassicStrategy(this.wire,Et(this,Ct,\"f\"),t.endpointId,t):null)))).filter((e=>null!==e));let r;if(e&&!i.some((e=>e instanceof _t.RTCStrategy))&&e&&e.rtcClient.close(),i.length>=2)r=jt.default.combine(i[0],i[1]);else{if(!i.length)throw new Error(\"No compatible protocols\");[r]=i}const o={endpointIdentity:t,rtc:e};return r.addEndpoint(t.channelId,o),r}async processChannelConnection(e){const{clientIdentity:t,providerIdentity:n,ackToSender:i,payload:r,offer:o}=e.payload;t.endpointId?t.isLocalEndpointId=!1:(t.endpointId=this.wire.environment.getNextMessageId(),t.isLocalEndpointId=!0);const s=n.channelId,a=this.providerMap.get(s);if(!a)return i.payload.success=!1,i.payload.reason=`Channel \"${n.channelName}\" has been destroyed.`,this.wire.sendRaw(i);const{provider:c,strategy:d,supportedProtocols:h}=a;try{if(!(c instanceof St.ChannelProvider))throw Error(\"Cannot connect to a channel client\");const e=o??{supportedProtocols:[{type:\"classic\",version:1}],maxProtocols:1},n=this.protocolManager.getCompatibleProtocols(h,e);if(!n.length)throw new Error(\"This provider does not support any of the offered protocols.\");const s=await c.processConnection(t,r);i.payload.payload=i.payload.payload||{};let a={supportedProtocols:[],endpointPayloadPromise:Promise.resolve({endpointIdentity:t})};return a=await n.reduce((async(e,t)=>{const n=await e;if(\"rtc\"===t.type){const{answer:e,rtcClient:i,channels:r}=await Et(this,bt,\"f\").createProviderAnswer(t.payload.rtcConnectionId,t.payload.offer);n.supportedProtocols.push({type:\"rtc\",version:_t.RTCInfo.version,payload:{answer:e}}),n.endpointPayloadPromise=n.endpointPayloadPromise.then((e=>r.then((t=>({...e,rtc:{rtcClient:i,channels:t}})))))}else n.supportedProtocols.push({type:\"classic\",version:Mt.ClassicInfo.version});return n}),Promise.resolve(a)),a.endpointPayloadPromise.then((e=>d.addEndpoint(t.endpointId,e))),i.payload.payload.result=s,i.payload.payload.answer=a,this.wire.sendRaw(i)}catch(e){return i.payload.success=!1,i.payload.reason=e.message,this.wire.sendRaw(i)}}}xe.ConnectionManager=kt,Ct=new WeakMap,bt=new WeakMap;var Lt,Tt,$t,Bt=s&&s.__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},Gt=s&&s.__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)};Object.defineProperty(le,\"__esModule\",{value:!0}),le.Channel=void 0;const Wt=t,Ht=G,Nt=d,Dt=ue,Ut=xe,Vt=Qe;function zt(e){const t=Math.floor(e/10),n=Math.min(3e4,500*2**t);return new Promise((e=>{setTimeout((()=>{e(!1)}),n)}))}class Kt extends Nt.EmitterBase{constructor(e){super(e,\"channel\"),Lt.set(this,void 0),Tt.set(this,new Wt.EventEmitter),$t.set(this,new Ht.AsyncRetryableLazy((async()=>{await Promise.all([this.on(\"disconnected\",(e=>{Dt.ChannelClient.handleProviderDisconnect(e)})),this.on(\"connected\",((...e)=>{Gt(this,Tt,\"f\").emit(\"connected\",...e)}))]).catch((()=>new Error(\"error setting up channel connection listeners\")))}))),Bt(this,Lt,new Ut.ConnectionManager(e),\"f\")}async getAllChannels(){return this.wire.sendAction(\"get-all-channels\").then((({payload:e})=>e.data))}async onChannelConnect(e){await this.on(\"connected\",e)}async onChannelDisconnect(e){await this.on(\"disconnected\",e)}async safeConnect(e,t,n){const i={count:0};do{let r=()=>{};const o=new Promise((t=>{r=n=>{e===n.channelName&&t(!0)},Gt(this,Tt,\"f\").on(\"connected\",r)}));try{if(i.count>0){i.gotConnectedEvent=await Promise.race([zt(i.count),o]);const t=await this.wire.sendAction(\"connect-to-channel\",{...n,retryInfo:i});return console.log(`Successfully connected to channelName: ${e}`),t.payload.data}const t=this.wire.sendAction(\"connect-to-channel\",n);i.originalMessageId=t.messageId;return(await t).payload.data}catch(n){if(!n.message.includes(\"internal-nack\"))throw n;t&&0===i.count&&console.warn(`No channel found for channelName: ${e}. Waiting for connection...`)}finally{i.count+=1,Gt(this,Tt,\"f\").removeListener(\"connected\",r)}}while(t);throw new Error(`No channel found for channelName: ${e}.`)}async connect(e,t={}){if(await Gt(this,$t,\"f\").getValue(),!e||\"string\"!=typeof e)throw new Error(\"Please provide a channelName string to connect to a channel.\");const n={wait:!0,...this.wire.environment.getDefaultChannelOptions().connect,...t},{offer:i,rtc:r}=await Gt(this,Lt,\"f\").createClientOffer(n);let o;(this.fin.me.isFrame||this.fin.me.isView||this.fin.me.isWindow)&&(o=(await this.fin.me.getInfo()).url);const s={channelName:e,...n,offer:i,connectionUrl:o},a=await this.safeConnect(e,n.wait,s),c=await Gt(this,Lt,\"f\").createClientStrategy(r,a),d=new Dt.ChannelClient(a,(()=>Dt.ChannelClient.wireClose(this.wire,a,a.endpointId)),c);return c.onEndpointDisconnect(a.channelId,(async()=>{try{await d.sendDisconnectAction()}catch(e){console.warn(`Something went wrong during disconnect for client with uuid: ${a.uuid} / name: ${a.name} / endpointId: ${a.endpointId}.`)}finally{Dt.ChannelClient.handleProviderDisconnect(a)}})),d}async create(e,t){if(!e)throw new Error(\"Please provide a channelName to create a channel\");const{payload:{data:n}}=await this.wire.sendAction(\"create-channel\",{channelName:e}),i=Gt(this,Lt,\"f\").createProvider(t,n);return this.on(\"client-disconnected\",(t=>{t.channelName===e&&Vt.ChannelProvider.handleClientDisconnection(i,t)})),i}}le.Channel=Kt,Lt=new WeakMap,Tt=new WeakMap,$t=new WeakMap,Object.defineProperty(de,\"__esModule\",{value:!0}),de.InterAppPayload=de.InterApplicationBus=void 0;const qt=t,Jt=d,Yt=he,Zt=le,Qt=O;class Xt extends Jt.Base{constructor(e){super(e),this.events={subscriberAdded:\"subscriber-added\",subscriberRemoved:\"subscriber-removed\"},this.refCounter=new Yt.RefCounter,this.Channel=new Zt.Channel(e),this.emitter=new qt.EventEmitter,e.registerMessageHandler(this.onmessage.bind(this)),this.on=this.emitter.on.bind(this.emitter),this.removeAllListeners=this.emitter.removeAllListeners.bind(this.emitter)}async publish(e,t){await this.wire.sendAction(\"publish-message\",{topic:e,message:t,sourceWindowName:this.me.name})}async send(e,t,n){const i=(0,Qt.validateIdentity)(e);if(i)throw new Error(i);await this.wire.sendAction(\"send-message\",{destinationUuid:e.uuid,destinationWindowName:e.name,topic:t,message:n,sourceWindowName:this.me.name})}subscribe(e,t,n){const i=this.createSubscriptionKey(e.uuid,e.name||\"*\",t);return this.emitter.on(i,n),this.refCounter.actOnFirst(i,(async()=>{await this.wire.sendAction(\"subscribe\",{sourceUuid:e.uuid,sourceWindowName:e.name||\"*\",topic:t,destinationWindowName:this.me.name})}),(()=>Promise.resolve()))}unsubscribe(e,t,n){const i=e.name||\"*\",r=this.createSubscriptionKey(e.uuid,i,t);return this.emitter.removeListener(r,n),this.refCounter.actOnLast(r,(async()=>{await this.wire.sendAction(\"unsubscribe\",{sourceUuid:e.uuid,sourceWindowName:i,topic:t,destinationWindowName:this.me.name})}),(()=>new Promise((e=>e)).then((()=>{}))))}processMessage(e){const{payload:{message:t,sourceWindowName:n,sourceUuid:i,topic:r}}=e,o=[this.createSubscriptionKey(i,n,r),this.createSubscriptionKey(i,\"*\",r),this.createSubscriptionKey(\"*\",\"*\",r)],s={uuid:i,name:n};o.forEach((e=>{this.emitter.emit(e,t,s)}))}emitSubscriverEvent(e,t){const{payload:{targetName:n,uuid:i,topic:r}}=t,o={name:n,uuid:i,topic:r};this.emitter.emit(e,o)}createSubscriptionKey(e,t,n){const i=t||\"*\";if(!(e&&i&&n))throw new Error(\"Missing uuid, name, or topic string\");return function(...e){return e.map((e=>Buffer.from(`${e}`).toString(\"base64\"))).join(\"/\")}(e,i,n)}onmessage(e){const{action:t}=e;switch(t){case\"process-message\":this.processMessage(e);break;case this.events.subscriberAdded:this.emitSubscriverEvent(this.events.subscriberAdded,e);break;case this.events.subscriberRemoved:this.emitSubscriverEvent(this.events.subscriberRemoved,e)}return!0}}de.InterApplicationBus=Xt;de.InterAppPayload=class{};var en={};Object.defineProperty(en,\"__esModule\",{value:!0}),en.Clipboard=void 0;const tn=d;class nn extends tn.Base{async writeText(e){await this.wire.sendAction(\"clipboard-write-text\",e)}async readText(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-text\",{type:e});return t.data}async writeImage(e){await this.wire.sendAction(\"clipboard-write-image\",e)}async readImage(e={format:\"dataURL\"}){const{payload:t}=await this.wire.sendAction(\"clipboard-read-image\",e);return t.data}async writeHtml(e){await this.wire.sendAction(\"clipboard-write-html\",e)}async readHtml(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-html\",{type:e});return t.data}async writeRtf(e){await this.wire.sendAction(\"clipboard-write-rtf\",e)}async readRtf(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-rtf\",{type:e});return t.data}async write(e){await this.wire.sendAction(\"clipboard-write\",e)}async getAvailableFormats(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-formats\",{type:e});return t.data}}en.Clipboard=nn;var rn={},on={},sn={};Object.defineProperty(sn,\"__esModule\",{value:!0}),sn.ExternalApplication=void 0;const an=d;class cn extends an.EmitterBase{constructor(e,t){super(e,\"external-application\",t.uuid),this.identity=t}getInfo(){return this.wire.sendAction(\"get-external-application-info\",this.identity).then((({payload:e})=>e.data))}}sn.ExternalApplication=cn,Object.defineProperty(on,\"__esModule\",{value:!0}),on.ExternalApplicationModule=void 0;const dn=d,hn=sn;class ln extends dn.Base{wrap(e){return this.wire.sendAction(\"external-application-wrap\").catch((e=>{})),Promise.resolve(new hn.ExternalApplication(this.wire,{uuid:e}))}wrapSync(e){return this.wire.sendAction(\"external-application-wrap-sync\").catch((e=>{})),new hn.ExternalApplication(this.wire,{uuid:e})}}on.ExternalApplicationModule=ln,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(on,e),n(sn,e)}(rn);var un={},pn={},wn={};Object.defineProperty(wn,\"__esModule\",{value:!0}),wn._Frame=void 0;const yn=d;class fn extends yn.EmitterBase{constructor(e,t){super(e,\"frame\",t.uuid,t.name),this.identity=t}getInfo(){return this.wire.sendAction(\"get-frame-info\",this.identity).then((({payload:e})=>e.data))}getParentWindow(){return this.wire.sendAction(\"get-parent-window\",this.identity).then((({payload:e})=>e.data))}}wn._Frame=fn,Object.defineProperty(pn,\"__esModule\",{value:!0}),pn._FrameModule=void 0;const gn=d,mn=O,vn=wn;class Cn extends gn.Base{async wrap(e){this.wire.sendAction(\"frame-wrap\").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}wrapSync(e){this.wire.sendAction(\"frame-wrap-sync\").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}getCurrent(){return this.wire.sendAction(\"frame-get-current\").catch((e=>{})),Promise.resolve(new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity()))}getCurrentSync(){return this.wire.sendAction(\"frame-get-current-sync\").catch((e=>{})),new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity())}}pn._FrameModule=Cn,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(pn,e),n(wn,e)}(un);var bn={};Object.defineProperty(bn,\"__esModule\",{value:!0}),bn.GlobalHotkey=void 0;const In=d;class En extends In.EmitterBase{constructor(e){super(e,\"global-hotkey\")}async register(e,t){await this.on(e,t),await this.wire.sendAction(\"global-hotkey-register\",{hotkey:e})}async unregister(e){await this.removeAllListeners(e),await this.wire.sendAction(\"global-hotkey-unregister\",{hotkey:e})}async unregisterAll(){await Promise.all(this.eventNames().filter((e=>!(\"registered\"===e||\"unregistered\"===e))).map((e=>this.removeAllListeners(e)))),await this.wire.sendAction(\"global-hotkey-unregister-all\",{})}async isRegistered(e){const{payload:{data:t}}=await this.wire.sendAction(\"global-hotkey-is-registered\",{hotkey:e});return t}}bn.GlobalHotkey=En;var xn,An={},Pn={},Mn={},_n=s&&s.__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)};Object.defineProperty(Mn,\"__esModule\",{value:!0}),Mn.Platform=void 0;const On=d,Sn=O,Rn=new Map;class Fn extends On.EmitterBase{constructor(e,t){super(t.wire,\"application\",e.uuid),this.getClient=e=>{this.wire.sendAction(\"platform-get-client\",this.identity).catch((e=>{}));const t=e||this.identity,{uuid:n}=t;if(!Rn.has(n)){const e=_n(this,xn,\"f\").call(this,n);Rn.set(n,e)}return Rn.get(n)},xn.set(this,(async e=>{try{const t=`custom-frame-${e}`,n=await this._channel.connect(t,{wait:!1});return n.onDisconnection((()=>{Rn.delete(e)})),n}catch(t){throw Rn.delete(e),new Error(\"The targeted Platform is not currently running. Listen for application-started event for the given Uuid.\")}})),this.launchLegacyManifest=this.launchContentManifest;const n=(0,Sn.validateIdentity)(e);if(n)throw new Error(n);this._channel=t,this.identity={uuid:e.uuid},this.Layout=this.fin.Platform.Layout,this.Application=this.fin.Application.wrapSync(this.identity)}async createView(e,t,n){this.wire.sendAction(\"platform-create-view\",this.identity).catch((e=>{}));const i=await this.getClient(),r=await i.dispatch(\"create-view\",{target:t,opts:e,targetView:n});if(!r||(0,Sn.validateIdentity)(r.identity))throw new Error(`When overwriting the createView call, please return an object that has a valid 'identity' property: ${JSON.stringify(r)}`);return this.fin.View.wrapSync(r.identity)}async createWindow(e){this.wire.sendAction(\"platform-create-window\",this.identity).catch((e=>{}));const t=await this.getClient();e.reason||(e.reason=\"api-call\");const n=await t.dispatch(\"create-view-container\",e);if(!n||(0,Sn.validateIdentity)(n.identity))throw new Error(`When overwriting the createWindow call, please return an object that has a valid 'identity' property: ${JSON.stringify(n)}`);const{identity:i}=n,r=this.fin.Window.wrapSync(i);return r.name=i.name,r.uuid=i.uuid,r}async quit(){this.wire.sendAction(\"platform-quit\",this.identity).catch((e=>{}));return(await this.getClient()).dispatch(\"quit\")}async closeView(e){this.wire.sendAction(\"platform-close-view\",this.identity).catch((e=>{}));const t=await this.getClient();await t.dispatch(\"close-view\",{view:e})}async reparentView(e,t){console.warn(\"Platform.reparentView has been deprecated, please use Platform.createView\"),this.wire.sendAction(\"platform-reparent-view\",this.identity).catch((e=>{}));const n={...e,uuid:e.uuid??this.identity.uuid},i=await this.fin.View.wrap(n),r=await i.getOptions();return this.createView(r,t)}async getSnapshot(){this.wire.sendAction(\"platform-get-snapshot\",this.identity).catch((e=>{}));return(await this.getClient()).dispatch(\"get-snapshot\")}async getViewSnapshot(e){return(await this.getClient()).dispatch(\"get-view-snapshot\",{viewIdentity:e})}async applySnapshot(e,t){this.wire.sendAction(\"platform-apply-snapshot\",this.identity).catch((e=>{}));const n=\"Requested snapshot must be a valid Snapshot object, or a url or filepath to such an object.\";let i;if(\"string\"==typeof e)try{i=(await this._channel.wire.sendAction(\"get-application-manifest\",{manifestUrl:e})).payload.data}catch(e){throw new Error(`${n}: ${e}`)}else i=e;if(!i.windows)throw new Error(n);const r=await this.getClient();return await r.dispatch(\"apply-snapshot\",{snapshot:i,options:t}),this}async fetchManifest(e){return(await this.getClient()).dispatch(\"platform-fetch-manifest\",{manifestUrl:e})}async launchContentManifest(e){this.wire.sendAction(\"platform-launch-content-manifest\",this.identity).catch((()=>{}));const t=await this.getClient(),n=await this.fetchManifest(e);return t.dispatch(\"launch-into-platform\",{manifest:n,manifestUrl:e}),this}async setWindowContext(e={},t){if(this.wire.sendAction(\"platform-set-window-context\",this.identity).catch((e=>{})),!e)throw new Error(\"Please provide a serializable object or string to set the context.\");const n=await this.getClient(),{entityType:i}=t?await this.fin.System.getEntityInfo(t.uuid,t.name):this.fin.me;await n.dispatch(\"set-window-context\",{context:e,entityType:i,target:t||{uuid:this.fin.me.uuid,name:this.fin.me.name}})}async getWindowContext(e){this.wire.sendAction(\"platform-get-window-context\",this.identity).catch((e=>{}));const t=await this.getClient(),{entityType:n}=e?await this.fin.System.getEntityInfo(e.uuid,e.name):this.fin.me;return t.dispatch(\"get-window-context\",{target:e||{uuid:this.fin.me.uuid,name:this.fin.me.name},entityType:n})}async closeWindow(e,t={skipBeforeUnload:!1}){this.wire.sendAction(\"platform-close-window\",this.identity).catch((e=>{}));return(await this.getClient()).dispatch(\"close-window\",{windowId:e,options:t})}}Mn.Platform=Fn,xn=new WeakMap;var jn={},kn={},Ln={},Tn={};function $n(e){switch(e){case\"columns\":case\"grid\":case\"rows\":case\"tabs\":return!0;default:return!1}}Object.defineProperty(Tn,\"__esModule\",{value:!0}),Tn.overrideFromComposables=Tn.isValidPresetType=void 0,Tn.isValidPresetType=$n,Tn.overrideFromComposables=function(...e){return t=>e.reduceRight(((e,t)=>n=>t(e(n))),(e=>e))(t)},Tn.default={isValidPresetType:$n};var Bn={},Gn={},Wn={};Object.defineProperty(Wn,\"__esModule\",{value:!0}),Wn.ApiConsumer=void 0;Wn.ApiConsumer=class{constructor(e){this.strategy=e,this.consume=async e=>(await this.strategy.getExposedFunctions(e)).reduce(((t,n)=>({...t,[n.key]:this.strategy.createFunction(n,e)})),{})}};var Hn={},Nn={};Object.defineProperty(Nn,\"__esModule\",{value:!0}),Nn.expose=Nn.getExposedProperties=void 0;const Dn=Symbol(\"exposedProperties\");Nn.getExposedProperties=e=>e[Dn]||e.prototype[Dn]||[];Nn.expose=e=>(t,n,i)=>{t[Dn]=t[Dn]||[],t[Dn].push({key:n,descriptor:i,options:e})},Object.defineProperty(Hn,\"__esModule\",{value:!0}),Hn.ApiExposer=void 0;const Un=Nn;Hn.ApiExposer=class{constructor(e){this.strategy=e,this.exposeInstance=async(e,t)=>{const n=(0,Un.getExposedProperties)(e),i=await Promise.all(n.map((async({key:n,options:i})=>({key:n,options:await this.strategy.exposeFunction(e[n].bind(e),{key:n,options:i,meta:t})}))));await this.strategy.exposeMeta(t,i)}}};var Vn={},zn={},Kn={};Object.defineProperty(Kn,\"__esModule\",{value:!0}),Kn.ChannelsConsumer=void 0;Kn.ChannelsConsumer=class{constructor(e){this.channel=e,this.getExposedFunctions=async e=>{const{id:t}=e,{props:n}=await this.channel.dispatch(`api-meta:${t}`);return n},this.createFunction=e=>(...t)=>{const{action:n}=e.options;return this.channel.dispatch(n,{args:t})}}};var qn={};Object.defineProperty(qn,\"__esModule\",{value:!0}),qn.ChannelsExposer=void 0;qn.ChannelsExposer=class{constructor(e){this.channelProviderOrClient=e,this.exposeFunction=async(e,t)=>{const{key:n,options:i,meta:r}=t,{id:o}=r,s=`${o}.${i?.action||n}`;return await this.channelProviderOrClient.register(s,(async({args:t})=>e(...t))),{action:s}},this.exposeMeta=async({id:e},t)=>{const n=`api-meta:${e}`;await this.channelProviderOrClient.register(n,(()=>({props:t})))}}},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Kn,e),n(qn,e)}(zn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(zn,e)}(Vn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Wn,e),n(Hn,e),n(Vn,e),n(Nn,e)}(Gn);var Jn={};Object.defineProperty(Jn,\"__esModule\",{value:!0}),Jn.createRelayedDispatch=exports.relayChannelClientApi_1=Jn.relayChannelClientApi=void 0;const Yn=[\"no longer connected\",\"RTCDataChannel closed unexpectedly\",\"The client you are trying to dispatch from is disconnected from the target provider\"];exports.relayChannelClientApi_1=Jn.relayChannelClientApi=async(e,t)=>{e.register(`relay:${t}`,(({action:t,target:n,payload:i})=>e.dispatch(n,t,i))),await Promise.resolve()};Jn.createRelayedDispatch=(e,t,n,i)=>async(r,o)=>{try{return await e.dispatch(`relay:${n}`,{action:r,payload:o,target:t})}catch(e){if(s=e.message,Yn.some((e=>s.includes(e)))&&i)throw new Error(i);throw e}var s};var Zn,Qn,Xn,ei=s&&s.__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},ti=s&&s.__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)};Object.defineProperty(Bn,\"__esModule\",{value:!0}),Bn.ColumnOrRow=Bn.TabStack=Bn.LayoutNode=void 0;const ni=Gn,ii=Jn;class ri{constructor(e,t){Zn.set(this,void 0),this.isRoot=()=>ti(this,Zn,\"f\").isRoot(this.entityId),this.exists=()=>ti(this,Zn,\"f\").exists(this.entityId),this.getParent=async()=>{const e=await ti(this,Zn,\"f\").getParent(this.entityId);if(e)return ri.getEntity(e,ti(this,Zn,\"f\"))},this.createAdjacentStack=async(e,t)=>{const n=await ti(this,Zn,\"f\").createAdjacentStack(this.entityId,e,t);return ri.getEntity({entityId:n,type:\"stack\"},ti(this,Zn,\"f\"))},this.getAdjacentStacks=async e=>(await ti(this,Zn,\"f\").getAdjacentStacks({targetId:this.entityId,edge:e})).map((e=>ri.getEntity({type:\"stack\",entityId:e.entityId},ti(this,Zn,\"f\")))),ei(this,Zn,e,\"f\"),this.entityId=t}}Bn.LayoutNode=ri,Zn=new WeakMap,ri.newLayoutEntitiesClient=async(e,t,n)=>{const i=(0,ii.createRelayedDispatch)(e,n,\"layout-relay\",\"You are trying to interact with a layout component on a window that does not exist or has been destroyed.\");return new ni.ApiConsumer(new ni.ChannelsConsumer({dispatch:i})).consume({id:t})},ri.getEntity=(e,t)=>{const{entityId:n,type:i}=e;switch(i){case\"column\":case\"row\":return new si(t,n,i);case\"stack\":return new oi(t,n);default:throw new Error(`Unrecognised Layout Entity encountered ('${JSON.stringify(e)})`)}};class oi extends ri{constructor(e,t){super(e,t),Qn.set(this,void 0),this.type=\"stack\",this.getViews=()=>ti(this,Qn,\"f\").getStackViews(this.entityId),this.addView=async(e,t={index:0})=>ti(this,Qn,\"f\").addViewToStack(this.entityId,e,t),this.removeView=async e=>{await ti(this,Qn,\"f\").removeViewFromStack(this.entityId,e)},this.setActiveView=async e=>{await ti(this,Qn,\"f\").setStackActiveView(this.entityId,e)},ei(this,Qn,e,\"f\")}}Bn.TabStack=oi,Qn=new WeakMap;class si extends ri{constructor(e,t,n){super(e,t),Xn.set(this,void 0),this.getContent=async()=>(await ti(this,Xn,\"f\").getContent(this.entityId)).map((e=>ri.getEntity(e,ti(this,Xn,\"f\")))),ei(this,Xn,e,\"f\"),this.type=n}}Bn.ColumnOrRow=si,Xn=new WeakMap;var ai={};Object.defineProperty(ai,\"__esModule\",{value:!0}),ai.DEFAULT_LAYOUT_KEY=ai.LAYOUT_CONTROLLER_ID=void 0,ai.LAYOUT_CONTROLLER_ID=\"layout-entities\",ai.DEFAULT_LAYOUT_KEY=\"__default__\";var ci,di,hi,li=s&&s.__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)};Object.defineProperty(Ln,\"__esModule\",{value:!0}),Ln.Layout=void 0;const ui=G,pi=O,wi=d,yi=Tn,fi=Bn,gi=ai;class mi extends wi.Base{static getClient(e){return li(e,di,\"f\").getValue()}constructor(e,t){super(t),ci.add(this),di.set(this,new ui.Lazy((async()=>fi.LayoutNode.newLayoutEntitiesClient(await this.platform.getClient(),gi.LAYOUT_CONTROLLER_ID,this.identity)))),this.replace=async e=>{this.wire.sendAction(\"layout-replace\").catch((e=>{}));const t=await this.platform.getClient();await t.dispatch(\"replace-layout\",{target:this.identity,opts:{layout:e}})},this.replaceView=async(e,t)=>{this.wire.sendAction(\"layout-replace-view\").catch((e=>{}));const n=await this.platform.getClient();await n.dispatch(\"replace-view\",{target:this.identity,opts:{viewToReplace:e,newView:t}})},this.applyPreset=async e=>{this.wire.sendAction(\"layout-apply-preset\").catch((e=>{}));const t=await this.platform.getClient(),{presetType:n}=e;if(!n||!(0,yi.isValidPresetType)(n))throw new Error(\"Cannot apply preset layout, please include an applicable presetType property in the PresetLayoutOptions.\");await t.dispatch(\"apply-preset-layout\",{target:this.identity,opts:{presetType:n}})};const n=(0,pi.validateIdentity)(e);if(n)throw new Error(n);this.identity=e,this.platform=this.fin.Platform.wrapSync({uuid:e.uuid}),e.uuid===this.fin.me.uuid&&e.name===this.fin.me.name&&(this.init=this.fin.Platform.Layout.init)}async getConfig(){this.wire.sendAction(\"layout-get-config\").catch((e=>{}));return(await this.platform.getClient()).dispatch(\"get-frame-snapshot\",{target:this.identity})}async getCurrentViews(){this.wire.sendAction(\"layout-get-views\").catch((e=>{}));const e=await this.platform.getClient();return(await e.dispatch(\"get-layout-views\",{target:this.identity})).map((e=>this.fin.View.wrapSync(e)))}async getRootItem(){this.wire.sendAction(\"layout-get-root-item\").catch((()=>{}));const e=await li(this,di,\"f\").getValue(),t=await e.getRoot(\"layoutName\"in this.identity?this.identity:void 0);return fi.LayoutNode.getEntity(t,e)}async getStackByViewIdentity(e){this.wire.sendAction(\"layout-get-stack-by-view\").catch((()=>{}));const t=await li(this,di,\"f\").getValue(),n=await t.getStackByView(e);if(!n)throw new Error(`No stack found for view: ${e.uuid}/${e.name}`);return fi.LayoutNode.getEntity(n,t)}async addView(e,{location:t,targetView:n}={}){this.wire.sendAction(\"layout-add-view\").catch((e=>{}));const{identity:i}=await li(this,ci,\"m\",hi).call(this,\"layout-add-view\",{viewOptions:e,location:t,targetView:n});return{identity:i}}async closeView(e){this.wire.sendAction(\"layout-close-view\").catch((e=>{})),await li(this,ci,\"m\",hi).call(this,\"layout-close-view\",{viewIdentity:e})}}Ln.Layout=mi,di=new WeakMap,ci=new WeakSet,hi=async function(e,t){return(await this.platform.getClient()).dispatch(e,{target:this.identity,opts:t})};var vi,Ci,bi,Ii,Ei,xi=s&&s.__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)},Ai=s&&s.__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};Object.defineProperty(kn,\"__esModule\",{value:!0}),kn.LayoutModule=void 0;const Pi=d,Mi=Ln,_i=ai;class Oi extends Pi.Base{constructor(){super(...arguments),vi.add(this),Ci.set(this,!1),bi.set(this,null),this.init=async(e={})=>{if(this.wire.sendAction(\"layout-init\").catch((e=>{})),!this.wire.environment.layoutAllowedInContext(this.fin))throw new Error(\"Layout.init can only be called from a Window context.\");if(xi(this,Ci,\"f\"))throw new Error(\"Layout.init was already called, please use Layout.create to add additional layouts.\");\"openfin\"===this.wire.environment.type&&await this.fin.Platform.getCurrentSync().getClient(),Ai(this,Ci,!0,\"f\"),Ai(this,bi,await this.wire.environment.initLayoutManager(this.fin,this.wire,e),\"f\"),await this.wire.environment.applyLayoutSnapshot(this.fin,xi(this,bi,\"f\"),e);const t={name:this.fin.me.name,uuid:this.fin.me.uuid};if(!e.layoutManagerOverride){const e={layoutName:_i.DEFAULT_LAYOUT_KEY,...t};return xi(this,Ii,\"f\").call(this,e)}return this.wrapSync(t)},Ii.set(this,(e=>{const t=\"[Layout] You are using a deprecated property `layoutManager` - it will throw if you access it starting in v37.\",n=new Proxy({},{get(e,n){throw console.warn(`[Layout-mgr-proxy] accessing ${n.toString()}`),new Error(t)}}),i=Object.assign(this.wrapSync(e),{layoutManager:n});return new Proxy(i,{get(e,n){if(\"layoutManager\"===n)throw console.warn(`[Layout-proxy] accessing ${n.toString()}`),new Error(t);return e[n]}})})),this.getCurrentLayoutManagerSync=()=>xi(this,vi,\"m\",Ei).call(this,\"fin.Platform.Layout.getCurrentLayoutManagerSync()\"),this.create=async e=>this.wire.environment.createLayout(xi(this,vi,\"m\",Ei).call(this,\"fin.Platform.Layout.create()\"),e),this.destroy=async e=>this.wire.environment.destroyLayout(xi(this,vi,\"m\",Ei).call(this,\"fin.Platform.Layout.destroy()\"),e)}async wrap(e){return this.wire.sendAction(\"layout-wrap\").catch((e=>{})),new Mi.Layout(e,this.wire)}wrapSync(e){return this.wire.sendAction(\"layout-wrap-sync\").catch((e=>{})),new Mi.Layout(e,this.wire)}async getCurrent(){if(this.wire.sendAction(\"layout-get-current\").catch((e=>{})),\"openfin\"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error(\"You are not in a Window context. Only Windows can have a Layout.\");const{uuid:e,name:t}=this.fin.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction(\"layout-get-current-sync\").catch((e=>{})),\"openfin\"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error(\"You are not in a Window context. Only Windows can have a Layout.\");const{uuid:e,name:t}=this.fin.me;return this.wrapSync({uuid:e,name:t})}async getLayoutByViewIdentity(e){this.wire.sendAction(\"layout-get-by-view-identity\").catch((()=>{}));let t=await this.wire.environment.getViewWindowIdentity(this.fin,e);t.identity&&(t=t.identity);try{const n=this.wrapSync(t),i=await Mi.Layout.getClient(n),r=await i.getLayoutIdentityForViewOrThrow(e);return this.wrapSync(r)}catch(n){if(![\"No action registered at target for\",\"getLayoutIdentityForViewOrThrow is not a function\"].some((e=>n.message.includes(e))))throw n;if(t.uuid===t.name)throw new Error(`View identity ${JSON.stringify(e)} is not attached to any layout in provider window ${JSON.stringify(t)}.`);return this.wrapSync(t)}}}kn.LayoutModule=Oi,Ci=new WeakMap,bi=new WeakMap,Ii=new WeakMap,vi=new WeakSet,Ei=function(e){if(!xi(this,bi,\"f\"))throw new Error(`You must call init before using the API ${e}`);return xi(this,bi,\"f\")},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(kn,e),n(Ln,e)}(jn),Object.defineProperty(Pn,\"__esModule\",{value:!0}),Pn.PlatformModule=void 0;const Si=d,Ri=Mn,Fi=jn;class ji extends Si.Base{constructor(e,t){super(e),this._channel=t,this.Layout=new Fi.LayoutModule(this.wire)}async init(e){if(!fin.__internal_.isPlatform||fin.me.name!==fin.me.uuid)throw new Error(\"fin.Platform.init should only be called from a custom platform provider running in the main window of the application.\");return this.wire.environment.initPlatform(this.fin,e)}async wrap(e){return this.wire.sendAction(\"platform-wrap\").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}wrapSync(e){return this.wire.sendAction(\"platform-wrap-sync\").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}async getCurrent(){return this.wire.sendAction(\"platform-get-current\").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction(\"platform-get-current-sync\").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}start(e){return this.wire.sendAction(\"platform-start\").catch((e=>{})),new Promise((async(t,n)=>{try{const{uuid:n}=e,i=await this.fin.Application._create({...e,isPlatformController:!0});i.once(\"platform-api-ready\",(()=>t(this.wrapSync({uuid:n})))),i._run({uuid:n})}catch(e){n(e)}}))}startFromManifest(e,t){return this.wire.sendAction(\"platform-start-from-manifest\").catch((e=>{})),new Promise((async(n,i)=>{try{const i=await this.fin.Application._createFromManifest(e);i.once(\"platform-api-ready\",(()=>n(this.wrapSync({uuid:i.identity.uuid})))),i._run(t)}catch(e){i(e)}}))}}Pn.PlatformModule=ji,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Pn,e),n(Mn,e)}(An);var ki={};!function(e){Object.defineProperty(e,\"__esModule\",{value:!0}),e.getMe=e.getBaseMe=e.environmentUnsupportedMessage=void 0;const t=J(),n=un,i=ie(),r=rn;function o(e,t,n){return{...{isView:\"view\"===e,isWindow:\"window\"===e,isFrame:\"iframe\"===e,isExternal:\"external connection\"===e},uuid:t,name:n,entityType:e}}e.environmentUnsupportedMessage=\"You are not running in OpenFin.\",e.getBaseMe=o,e.getMe=function(s){const{uuid:a,name:c,entityType:d}=s.me,h={setContext(){throw new Error(e.environmentUnsupportedMessage)},addContextHandler(){throw new Error(e.environmentUnsupportedMessage)},getContextGroups(){throw new Error(e.environmentUnsupportedMessage)},joinContextGroup(){throw new Error(e.environmentUnsupportedMessage)},removeFromContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getAllClientsInContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getInfoForContextGroup(){throw new Error(e.environmentUnsupportedMessage)}},l=\"Interop API has not been instantiated. Either connection has failed or you have not declared interop in your config.\",u={setContext(){throw new Error(l)},addContextHandler(){throw new Error(l)},getContextGroups(){throw new Error(l)},joinContextGroup(){throw new Error(l)},removeFromContextGroup(){throw new Error(l)},getAllClientsInContextGroup(){throw new Error(l)},getInfoForContextGroup(){throw new Error(l)}},p={eventNames:()=>{throw new Error(e.environmentUnsupportedMessage)},emit:()=>{throw new Error(e.environmentUnsupportedMessage)},listeners:()=>{throw new Error(e.environmentUnsupportedMessage)},listenerCount:()=>{throw new Error(e.environmentUnsupportedMessage)},on:()=>{throw new Error(e.environmentUnsupportedMessage)},addListener:()=>{throw new Error(e.environmentUnsupportedMessage)},once:()=>{throw new Error(e.environmentUnsupportedMessage)},prependListener:()=>{throw new Error(e.environmentUnsupportedMessage)},prependOnceListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeAllListeners:()=>{throw new Error(e.environmentUnsupportedMessage)}};switch(d){case\"view\":return Object.assign(new t.View(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case\"window\":return Object.assign(new i._Window(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case\"iframe\":return Object.assign(new n._Frame(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case\"external connection\":return Object.assign(new r.ExternalApplication(s,{uuid:a}),o(d,a,c),{interop:u,isOpenFin:!1});default:return{...o(d,a,c),...p,interop:h,isOpenFin:!1}}}}(ki);var Li={},Ti={},$i={};Object.defineProperty($i,\"__esModule\",{value:!0}),$i.createWarningObject=$i.createUnusableObject=void 0,$i.createUnusableObject=function(e){const t=()=>{throw new Error(e)};return new Proxy({},{apply:t,construct:t,defineProperty:t,deleteProperty:t,get:t,getOwnPropertyDescriptor:t,getPrototypeOf:t,has:t,isExtensible:t,ownKeys:t,preventExtensions:t,set:t,setPrototypeOf:t})},$i.createWarningObject=function(e,t){return new Proxy(t,{get:(...t)=>(console.warn(e),Reflect.get(...t)),set:(...t)=>(console.warn(e),Reflect.set(...t)),getOwnPropertyDescriptor:(...t)=>(console.warn(e),Reflect.getOwnPropertyDescriptor(...t)),ownKeys:(...t)=>(console.warn(e),Reflect.ownKeys(...t))})};var Bi,Gi={},Wi={};var Hi={};!function(e){Object.defineProperty(e,\"__esModule\",{value:!0}),e.wrapIntentHandler=e.BROKER_ERRORS=e.generateOverrideWarning=e.generateOverrideError=e.wrapContextHandler=e.wrapInTryCatch=e.generateId=void 0;e.generateId=()=>`${Math.random()}${Date.now()}`;e.wrapInTryCatch=(e,t)=>(...n)=>{try{return e(...n)}catch(e){throw new Error((t||\"\")+e)}};e.wrapContextHandler=(e,t)=>async n=>{try{await e(n)}catch(e){throw console.error(`Error thrown by handler ${t} for context type ${n.type}: ${e}`),e}};e.generateOverrideError=(e,t)=>`You have tried to to use ${e} but ${t} has not been overridden in the Interop Broker. Please override this function. Refer to our documentation for more info.`;e.generateOverrideWarning=(e,t,n,i)=>{const{uuid:r,name:o}=n;return i?`Entity with identity: ${r}/${o} has called ${i} or ${e} but ${t} has not been overridden.`:`Entity with identity: ${r}/${o} has called ${e} but ${t} has not been overridden.`},e.BROKER_ERRORS={fireIntent:(0,e.generateOverrideError)(\"fireIntent\",\"handleFiredIntent\"),fireIntentForContext:(0,e.generateOverrideError)(\"fireIntentForContext\",\"handleFiredIntentForContext\"),getInfoForIntent:(0,e.generateOverrideError)(\"getInfoForIntent\",\"handleInfoForIntent\"),getInfoForIntentsByContext:(0,e.generateOverrideError)(\"getInfoForIntentsByContext\",\"handleInfoForIntentsByContext\"),joinSessionContextGroupWithJoinContextGroup:\"The Context Group you have tried to join is a Session Context Group. Custom Context Groups can only be defined by the Interop Broker through code or manifest configuration. Please use joinSessionContextGroup.\",fdc3Open:(0,e.generateOverrideError)(\"fdc3.open\",\"fdc3HandleOpen\"),fdc3FindInstances:(0,e.generateOverrideError)(\"fdc3.findInstances\",\"fdc3HandleFindInstances\"),fdc3GetAppMetadata:(0,e.generateOverrideError)(\"fdc3.getAppMetadata\",\"fdc3HandleGetAppMetadata\"),fdc3GetInfo:(0,e.generateOverrideError)(\"fdc3.getInfo\",\"fdc3HandleGetInfo\")};e.wrapIntentHandler=(e,t)=>async n=>{try{return e(n)}catch(e){throw console.error(`Error thrown by handler ${t}: ${e}`),e}}}(Hi);var Ni,Di,Ui={};function Vi(){if(Di)return Gi;Di=1;var e,t,n,r=s&&s.__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},o=s&&s.__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)},a=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Gi,\"__esModule\",{value:!0}),Gi.InteropBroker=void 0;const c=d,h=a(function(){if(Bi)return Wi;Bi=1,Object.defineProperty(Wi,\"__esModule\",{value:!0});const e=Cr();return Wi.default=class{constructor(e,t){this.provider=e,this.id=t,this.lastContext=void 0,this.contextGroupMap=new Map,this.clients=new Map,this.registerListeners()}registerListeners(){this.provider.register(`sessionContextGroup:getContext-${this.id}`,this.getCurrentContext.bind(this)),this.provider.register(`sessionContextGroup:setContext-${this.id}`,this.setContext.bind(this)),this.provider.register(`sessionContextGroup:handlerAdded-${this.id}`,this.handlerAdded.bind(this)),this.provider.register(`sessionContextGroup:handlerRemoved-${this.id}`,this.handlerRemoved.bind(this))}getCurrentContext(e){return e.type?this.contextGroupMap.get(e.type):this.lastContext}setContext(t,n){const{context:i}=t,r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name} not in Session Client State Map`);this.contextGroupMap.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{e.contextHandlers.get(i.type)?.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getClientState(e){return this.clients.get(e.endpointId)}async handlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(i){const e=r.contextHandlers.get(i)||[];r.contextHandlers.set(i,[...e,n]);const o=this.contextGroupMap.get(i);o&&await this.provider.dispatch(t,n,o)}else{r.globalHandler=n;const e=[...this.contextGroupMap.keys()].map((async e=>{const i=this.contextGroupMap.get(e);i&&await this.provider.dispatch(t,n,i)}));await Promise.all(e)}}handlerRemoved(e,t){const{handlerId:n}=e,i=this.clients.get(t.endpointId);i?(Array.from(i.contextHandlers).forEach((([,e])=>{const t=e.indexOf(n);t>-1&&e.splice(t,1)})),i.globalHandler===n&&(i.globalHandler=void 0)):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={contextHandlers:new Map,clientIdentity:e,globalHandler:void 0};this.clients.set(e.endpointId,t)}}onDisconnection(e){this.clients.delete(e.endpointId)}},Wi}()),l=Hi,u=a(i),p=function(){if(Ni)return Ui;Ni=1,Object.defineProperty(Ui,\"__esModule\",{value:!0}),Ui.PrivateChannelProvider=void 0;const e=Vi();return Ui.PrivateChannelProvider=class t{constructor(e,t){this.provider=e,this.id=t,this.clients=new Map,this.registerListeners(),this.contextByContextType=new Map,this.lastContext=void 0,this.provider.onConnection((e=>this.registerNewClient(e))),this.provider.onDisconnection((async e=>{const{endpointId:t}=e;this.clients.has(t)&&await this.handleClientDisconnecting(e),0===(await this.provider.getAllClientInfo()).length&&this.provider.destroy()}))}getClientState(e){return this.clients.get(e.endpointId)}registerListeners(){this.provider.register(\"broadcast\",this.broadcast.bind(this)),this.provider.register(\"getCurrentContext\",this.getCurrentContext.bind(this)),this.provider.register(\"contextHandlerAdded\",this.contextHandlerAdded.bind(this)),this.provider.register(\"contextHandlerRemoved\",this.contextHandlerRemoved.bind(this)),this.provider.register(\"nonStandardHandlerRemoved\",this.nonStandardHandlerRemoved.bind(this)),this.provider.register(\"onAddContextHandlerAdded\",this.onAddContextHandlerAdded.bind(this)),this.provider.register(\"onDisconnectHandlerAdded\",this.onDisconnectHandlerAdded.bind(this)),this.provider.register(\"onUnsubscribeHandlerAdded\",this.onUnsubscribeHandlerAdded.bind(this)),this.provider.register(\"clientDisconnecting\",((e,t)=>{this.handleClientDisconnecting(t)}))}broadcast(t,n){const{context:i}=t;if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name}, tried to call broadcast, is not connected to this Private Channel`);const r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to broadcast - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);this.contextByContextType.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{const t=e.handlerIdsByContextTypes.get(i.type);t&&t.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getCurrentContext(e,t){const{contextType:n}=e;if(!this.getClientState(t))throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call getCurrentContext, is not connected to this Private Channel`);if(void 0!==n){return this.contextByContextType.get(n)||null}return this.lastContext?this.lastContext:null}contextHandlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call addContextListener, is not connected to this Private Channel`);if(i){const e=r.handlerIdsByContextTypes.get(i)||[];r.handlerIdsByContextTypes.set(i,[...e,n])}else r.globalHandler=n;Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&e.onAddContextListenerHandlerId&&this.provider.dispatch(e.clientIdentity,e.onAddContextListenerHandlerId,i)}))}async contextHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);if(i){let e;if(i.globalHandler===n)i.globalHandler=void 0;else for(const[t,r]of i.handlerIdsByContextTypes){const i=r.indexOf(n);i>-1&&(r.splice(i,1),e=t)}const r=(await this.getConnectedClients()).map((async n=>{const{clientIdentity:i,clientIdentity:{endpointId:r},onUnsubscribeHandlerId:o}=n;r!==t.endpointId&&o&&await this.provider.dispatch(i,o,e)}));try{await Promise.all(r)}catch(e){throw console.error(`Problem when attempting to dispatch to onUnsubscribeHandlers. Error: ${e} Removing Client: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}`),new Error(e)}}else console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}.`)}nonStandardHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);i?i.onDisconnectHandlerId===n?i.onDisconnectHandlerId=void 0:i.onAddContextListenerHandlerId===n?i.onAddContextListenerHandlerId=void 0:i.onUnsubscribeHandlerId===n&&(i.onUnsubscribeHandlerId=void 0):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}onAddContextHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onAddContextListener, is not connected to this Private Channel`);n.onAddContextListenerHandlerId=i,Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&Array.from(e.handlerIdsByContextTypes.keys()).forEach((e=>{this.provider.dispatch(t,i,e)}))}))}onDisconnectHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onDisconnect, is not connected to this Private Channel`);n.onDisconnectHandlerId=i}onUnsubscribeHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onUnsubscribe, is not connected to this Private Channel`);n.onUnsubscribeHandlerId=i}removeClient(e){const t=this.getClientState(e);if(!t)throw new Error(`Client with Identity: ${e.uuid} ${e.name}, tried to call disconnect, is not connected to this Private Channel`);t.handlerIdsByContextTypes.clear(),this.clients.delete(e.endpointId)}async fireOnDisconnectForOtherClients(e){const{endpointId:t}=e,n=(await this.getConnectedClients()).map((async e=>{const{clientIdentity:{endpointId:n},onDisconnectHandlerId:i}=e;n!==t&&i&&await this.provider.dispatch(e.clientIdentity,i)}));try{await Promise.all(n)}catch(t){throw console.error(`Problem when attempting to dispatch to onDisconnectHandlers. Error: ${t} Disconnecting Client: uuid: ${e.uuid}. name: ${e.name}. endpointId: ${e.endpointId}`),new Error(t)}}async unsubscribeAll(e){const{endpointId:t}=e,n=this.clients.get(t);if(n){const t=Array.from(n.handlerIdsByContextTypes.values()).flat(),i=n.globalHandler;if(t.length>0){const n=t.map((async t=>this.contextHandlerRemoved({handlerId:t},e)));try{await Promise.all(n)}catch(e){console.error(e.message)}}if(i)try{await this.contextHandlerRemoved({handlerId:i},e)}catch(e){console.error(e.message)}}}async handleClientDisconnecting(e){await this.unsubscribeAll(e),this.removeClient(e),await this.fireOnDisconnectForOtherClients(e)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={clientIdentity:e,handlerIdsByContextTypes:new Map,globalHandler:void 0,onAddContextListenerHandlerId:void 0,onUnsubscribeHandlerId:void 0,onDisconnectHandlerId:void 0};this.clients.set(e.endpointId,t)}}async getConnectedClients(){const e=await this.provider.getAllClientInfo();return Array.from(this.clients.values()).filter((t=>{const{uuid:n,name:i}=t.clientIdentity;return e.some((e=>i===e.name&&n===e.uuid))}))}static init(e,n){return new t(e,n)}},Ui}(),w=G,y=[{id:\"green\",displayMetadata:{color:\"#00CC88\",name:\"green\"}},{id:\"purple\",displayMetadata:{color:\"#8C61FF\",name:\"purple\"}},{id:\"orange\",displayMetadata:{color:\"#FF8C4C\",name:\"orange\"}},{id:\"red\",displayMetadata:{color:\"#FF5E60\",name:\"red\"}},{id:\"pink\",displayMetadata:{color:\"#FF8FB8\",name:\"pink\"}},{id:\"yellow\",displayMetadata:{color:\"#E9FF8F\",name:\"yellow\"}}];let f=class i extends c.Base{constructor(i,s,a){super(i),e.set(this,void 0),t.set(this,void 0),n.set(this,void 0),this.getProvider=()=>o(this,n,\"f\").getValue(),this.interopClients=new Map,this.contextGroupsById=new Map,r(this,t,a.contextGroups??[...y],\"f\"),r(this,e,a.fdc3Info,\"f\"),a?.logging&&(this.logging=a.logging),this.intentClientMap=new Map,this.lastContextMap=new Map,this.sessionContextGroupMap=new Map,r(this,n,new w.Lazy(s),\"f\"),this.setContextGroupMap(),this.setupChannelProvider()}static createClosedConstructor(...e){return class extends i{constructor(...t){if(t.length){const[n,i,r]=t;if(r&&\"object\"==typeof r&&!(0,u.default)(r,e[2]))return console.warn(\"You have modified the parameters of the InteropOverride constructor. This behavior is deprecated and will be removed in a future version. You can modify these options in your manifest. Please consult our Interop docs for guidance on migrating to the new override scheme.\"),void super(e[0],e[1],r);console.warn(\"You are attempting to pass arguments to the InteropOverride constructor. This is not necessary, and these passed arguments will be ignored. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.\")}super(...e)}}}setContext({context:e},t){this.wire.sendAction(\"interop-broker-set-context\").catch((e=>{}));const n=this.getClientState(t);if(!n||!n.contextGroupId)throw n?new Error(\"You must join a context group before you can set context.\"):new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);{const{contextGroupId:t}=n;this.setContextForGroup({context:e},t)}}setContextForGroup({context:e},t){this.wire.sendAction(\"interop-broker-set-context-for-group\").catch((e=>{}));const n=this.contextGroupsById.get(t);if(!n)throw new Error(`Unable to set context for context group that isn't in the context group mapping: ${t}.`);const r=i.checkContextIntegrity(e);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(e)}`);const o=e.type;n.set(o,e),this.lastContextMap.set(t,o);Array.from(this.interopClients.values()).filter((e=>e.contextGroupId===t)).forEach((t=>{for(const[,n]of t.contextHandlers)i.isContextTypeCompatible(o,n.contextType)&&this.invokeContextHandler(t.clientIdentity,n.handlerId,e)}))}getCurrentContext(e,t){this.wire.sendAction(\"interop-broker-get-current-context\").catch((e=>{}));const n=this.getClientState(t);if(!n?.contextGroupId)throw new Error(\"You must be a member of a context group to call getCurrentContext\");const{contextGroupId:i}=n,r=this.contextGroupsById.get(i),o=this.lastContextMap.get(i),s=e?.contextType??o;return r&&s?r.get(s):void 0}async joinContextGroup({contextGroupId:e,target:t},n){if(this.wire.sendAction(\"interop-broker-join-context-group\").catch((e=>{})),this.sessionContextGroupMap.has(e))throw new Error(l.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup);if(t){i.hasEndpointId(t)&&await this.addClientToContextGroup({contextGroupId:e},t);try{const n=this.channel.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name));if(!n.length)throw new Error(`Given Identity ${t.uuid} ${t.name} is not connected to the Interop Broker.`);n.length>1&&console.warn(`More than one connection found for identity ${t.uuid} ${t.name}`);const i=[];for(const t of n)i.push(this.addClientToContextGroup({contextGroupId:e},t));await Promise.all(i)}catch(e){throw new Error(e)}}else await this.addClientToContextGroup({contextGroupId:e},n)}async addClientToContextGroup({contextGroupId:e},t){this.wire.sendAction(\"interop-broker-add-client-to-context-group\").catch((e=>{}));const n=this.getClientState(t);if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(!this.getContextGroups().find((t=>t.id===e)))throw new Error(`Attempting to join a context group that does not exist: ${e}. You may only join existing context groups.`);if(n.contextGroupId!==e){n.contextGroupId=e,await this.setCurrentContextGroupInClientOptions(t,e);const i=this.contextGroupsById.get(e);for(const[,e]of n.contextHandlers){const{contextType:n,handlerId:r}=e;if(void 0===n)i.forEach(((e,n)=>{this.invokeContextHandler(t,r,e)}));else if(i.has(n)){const e=i.get(n);e&&this.invokeContextHandler(t,r,e)}}}}async removeFromContextGroup({target:e},t){if(this.wire.sendAction(\"interop-broker-remove-from-context-group\").catch((e=>{})),e){i.hasEndpointId(e)&&await this.removeClientFromContextGroup(e);try{const t=this.channel.connections.filter((t=>t.uuid===e.uuid&&t.name===e.name));if(!t.length)throw new Error(`No connection found for given Identity ${e.uuid} ${e.name}`);t.length>1&&console.warn(`More than one connection found for identity ${e.uuid} ${e.name}`);const n=[];for(const e of t)n.push(this.removeClientFromContextGroup(e));await Promise.all(n)}catch(e){throw new Error(e)}}else await this.removeClientFromContextGroup(t)}async removeClientFromContextGroup(e){this.wire.sendAction(\"interop-broker-remove-client-from-context-group\").catch((e=>{}));const t=this.getClientState(e);t&&(t.contextGroupId=void 0),await this.setCurrentContextGroupInClientOptions(e,null)}getContextGroups(){return this.wire.sendAction(\"interop-broker-get-context-groups\").catch((e=>{})),o(this,t,\"f\").map((e=>({...e})))}getInfoForContextGroup({contextGroupId:e}){return this.wire.sendAction(\"interop-broker-get-info-for-context-group\").catch((e=>{})),this.getContextGroups().find((t=>t.id===e))}getAllClientsInContextGroup({contextGroupId:e}){this.wire.sendAction(\"interop-broker-get-all-clients-in-context-group\").catch((e=>{}));return Array.from(this.interopClients.values()).filter((t=>t.contextGroupId===e)).map((e=>e.clientIdentity))}async handleFiredIntent(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.raiseIntent\",\"InteropBroker.handleFiredIntent\",t,\"interopClient.fireIntent\");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntent)}async setIntentTarget(e,t){this.wire.sendAction(\"interop-broker-set-intent-target\").catch((e=>{}));const n=this.intentClientMap.get(t.name),i=`intent-handler-${e.name}`;if(n){const t=n.get(i);if(t){if(t.pendingIntents.push(e),t.clientIdentity&&t.isReady){const{clientIdentity:e,pendingIntents:n}=t;try{const r=n[n.length-1];await this.invokeIntentHandler(e,i,r),t.pendingIntents=[]}catch(n){console.error(`Error invoking intent handler for client ${e.uuid}/${e.name}/${e.endpointId}`),t.isReady=!1}}}else n.set(i,{isReady:!1,pendingIntents:[e]})}else{this.intentClientMap.set(t.name,new Map);const n=this.intentClientMap.get(t.name);n&&n.set(i,{isReady:!1,pendingIntents:[e]})}}async handleInfoForIntent(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.findIntent\",\"InteropBroker.handleInfoForIntent\",t,\"interopClient.getInfoForIntent\");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntent)}async handleInfoForIntentsByContext(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.findIntentsByContext\",\"InteropBroker.handleInfoForIntentsByContext\",t,\"interopClient.getInfoForIntentsByContext\");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntentsByContext)}async handleFiredIntentForContext(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.raiseIntentForContext\",\"InteropBroker.handleFiredIntentForContext\",t,\"interopClient.fireIntentForContext\");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntentForContext)}async clientDisconnected(e){}async fdc3HandleOpen({app:e,context:t},n){const i=(0,l.generateOverrideWarning)(\"fdc3.open\",\"InteropBroker.fdc3HandleOpen\",n);throw console.warn(i),new Error(l.BROKER_ERRORS.fdc3Open)}async fdc3HandleFindInstances(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.open\",\"InteropBroker.fdc3HandleFindInstances\",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3FindInstances)}async fdc3HandleGetAppMetadata(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.getAppMetadata\",\"InteropBroker.fdc3HandleGetAppMetadata\",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3GetAppMetadata)}async invokeContextHandler(e,t,n){const i=await this.getProvider();try{await i.dispatch(e,t,n)}catch(i){console.error(`Error invoking context handler ${t} for context type ${n.type} in client ${e.uuid}/${e.name}/${e.endpointId}`,i)}}async invokeIntentHandler(e,t,n){const i=await this.getProvider();await i.dispatch(e,t,n)}async fdc3HandleGetInfo(t,n){const{fdc3Version:i}=t;return{fdc3Version:i,...o(this,e,\"f\"),optionalFeatures:{OriginatingAppMetadata:!1,UserChannelMembershipAPIs:!0},appMetadata:{appId:\"\",instanceId:\"\"}}}async getAllClientInfo(){return(await this.getProvider()).getAllClientInfo()}decorateSnapshot(e){return{...e,interopSnapshotDetails:{contextGroupStates:this.getContextGroupStates()}}}applySnapshot(e,t){const n=e?.interopSnapshotDetails?.contextGroupStates;n&&(t?.closeExistingWindows||this.updateExistingClients(n),this.rehydrateContextGroupStates(n))}updateExistingClients(e){this.interopClients.forEach((t=>{const{clientIdentity:n,contextGroupId:r,contextHandlers:o}=t;if(r){const t=e[r];for(const[,e]of Object.entries(t))o.forEach((t=>{const{handlerId:r,contextType:o}=t;i.isContextTypeCompatible(e.type,o)&&this.invokeContextHandler(n,r,e)}))}}))}getContextGroupStates(){return i.toObject(this.contextGroupsById)}rehydrateContextGroupStates(e){const t=Object.entries(e);for(const[e,n]of t){const t=Object.entries(n);for(const[n,i]of t)if(this.contextGroupsById.has(e)){this.contextGroupsById.get(e).set(n,i)}else console.warn(`Attempting to set a context group that isn't in the context group mapping. Skipping context group rehydration for: ${e}`)}}contextHandlerRegistered({contextType:e,handlerId:t},n){const i={contextType:e,handlerId:t},r=this.getClientState(n);if(r?.contextHandlers.set(t,i),r&&r.contextGroupId){const{contextGroupId:i}=r,o=this.contextGroupsById.get(i);if(void 0===e)o.forEach(((e,i)=>{this.invokeContextHandler(n,t,e)}));else if(o.has(e)){const i=o.get(e);i&&this.invokeContextHandler(n,t,i)}}}async intentHandlerRegistered(e,t){const{handlerId:n}=e,i=this.intentClientMap.get(t.name),r=i?.get(n);if(i)if(r){const{pendingIntents:e}=r;r.clientIdentity=t,r.isReady=!0;try{if(e.length>0){const i=e[e.length-1];await this.invokeIntentHandler(t,n,i),r.pendingIntents=[]}}catch(e){console.error(`Error invoking intent handler: ${n} for client ${t.uuid}/${t.name}/${t.endpointId}`)}}else i.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t});else{this.intentClientMap.set(t.name,new Map);const e=this.intentClientMap.get(t.name);e&&e.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t})}}removeContextHandler({handlerId:e},t){const n=this.getClientState(t);n&&n.contextHandlers.delete(e)}handleJoinSessionContextGroup({sessionContextGroupId:e},t){try{if(!e)throw new Error(\"Failed to join session context group: must specify group id.\");const n=this.sessionContextGroupMap.get(e);if(n)n.registerNewClient(t);else{const n=new h.default(this.channel,e);n.registerNewClient(t),this.sessionContextGroupMap.set(e,n)}return{hasConflict:this.contextGroupsById.has(e)}}catch(e){throw new Error(e)}}getClientState(e){return this.interopClients.get(e.endpointId)}static toObject(e){const t=Object.fromEntries(e),n={};return Object.entries(t).forEach((([e,t])=>{const i=Object.fromEntries(t);n[e]=i})),n}static checkContextIntegrity(e){if(!e)return{isValid:!1,reason:\"No context supplied\"};if(\"object\"!=typeof e)return{isValid:!1,reason:\"Context must be an Object\"};if(!e.type)return{isValid:!1,reason:\"Context must have a type property\"};if(e.id&&\"object\"!=typeof e.id)return{isValid:!1,reason:\"Context id must be an Object populated with key-value identifiers (if set)\"};if(e.id){const{id:t}=e,n=Object.keys(t);let i=!1;if(!n.length)return{isValid:!1,reason:\"Context id must have at least one key-value identifier\"};if(n.forEach((e=>{\"string\"==typeof e&&\"string\"==typeof t[e]||(i=!0)})),i)return{isValid:!1,reason:\"Context id key-value identifiers must be of type string\"}}return e.name&&\"string\"!=typeof e.name?{isValid:!1,reason:\"Context name must be of string type (if set)\"}:{isValid:!0}}static hasEndpointId(e){return void 0!==e.endpointId}static isContextTypeCompatible(e,t){return void 0===t||e===t}setContextGroupMap(){for(const e of this.getContextGroups())this.contextGroupsById.set(e.id,new Map)}async setCurrentContextGroupInClientOptions(e,t){try{const n=await this.fin.System.getEntityInfo(e.uuid,e.name);let i;\"view\"===n.entityType?i=await this.fin.View.wrap(e):\"window\"===n.entityType&&(i=await this.fin.Window.wrap(e)),i&&await i.updateOptions({interop:{currentContextGroup:t}})}catch(e){}}async setupChannelProvider(){try{const e=await this.getProvider();this.channel=e,this.wireChannel(e)}catch(e){throw new Error(`Error setting up Interop Broker Channel Provider: ${e}`)}}wireChannel(e){e.onConnection((async(e,t)=>{if(!await this.isConnectionAuthorized(e,t))throw new Error(`Connection not authorized for ${e.uuid}, ${e.name}`);if(!e.endpointId)throw new Error(\"Version too old to be compatible with Interop. Please upgrade your runtime to a more recent version.\");const n={contextGroupId:void 0,contextHandlers:new Map,clientIdentity:e};t?.currentContextGroup&&this.contextGroupsById.has(t.currentContextGroup)&&(n.contextGroupId=t?.currentContextGroup),this.interopClients.set(e.endpointId,n)})),e.onDisconnection((e=>{this.interopClients.delete(e.endpointId);const t=this.intentClientMap.get(e.name);t&&e.uuid===this.fin.me.uuid&&t.forEach((e=>{e.isReady=!1})),this.sessionContextGroupMap.forEach((t=>{t.onDisconnection(e)})),this.clientDisconnected(e)})),e.beforeAction((async(e,t,n)=>{if(!await this.isActionAuthorized(e,t,n))throw new Error(`Action (${e}) not authorized for ${n.uuid}, ${n.name}`);this.logging?.beforeAction?.enabled&&console.log(e,t,n)})),e.afterAction(((e,t,n)=>{this.logging?.afterAction?.enabled&&console.log(e,t,n)})),e.register(\"setContext\",this.setContext.bind(this)),e.register(\"fireIntent\",this.handleFiredIntent.bind(this)),e.register(\"getCurrentContext\",this.getCurrentContext.bind(this)),e.register(\"getInfoForIntent\",this.handleInfoForIntent.bind(this)),e.register(\"getInfoForIntentsByContext\",this.handleInfoForIntentsByContext.bind(this)),e.register(\"fireIntentForContext\",this.handleFiredIntentForContext.bind(this)),e.register(\"getContextGroups\",this.getContextGroups.bind(this)),e.register(\"joinContextGroup\",this.joinContextGroup.bind(this)),e.register(\"removeFromContextGroup\",this.removeFromContextGroup.bind(this)),e.register(\"getAllClientsInContextGroup\",this.getAllClientsInContextGroup.bind(this)),e.register(\"getInfoForContextGroup\",this.getInfoForContextGroup.bind(this)),e.register(\"contextHandlerRegistered\",this.contextHandlerRegistered.bind(this)),e.register(\"intentHandlerRegistered\",this.intentHandlerRegistered.bind(this)),e.register(\"removeContextHandler\",this.removeContextHandler.bind(this)),e.register(\"sessionContextGroup:createIfNeeded\",this.handleJoinSessionContextGroup.bind(this)),e.register(\"fdc3Open\",this.fdc3HandleOpen.bind(this)),e.register(\"fdc3v2FindIntentsByContext\",this.handleInfoForIntentsByContext.bind(this)),e.register(\"fdc3FindInstances\",this.fdc3HandleFindInstances.bind(this)),e.register(\"fdc3GetAppMetadata\",this.fdc3HandleGetAppMetadata.bind(this)),e.register(\"fdc3v2GetInfo\",(async(e,t)=>this.fdc3HandleGetInfo.bind(this)(e,t))),e.register(\"createPrivateChannelProvider\",(async e=>{const{channelId:t}=e,n=await this.fin.InterApplicationBus.Channel.create(t);p.PrivateChannelProvider.init(n,t)}))}isConnectionAuthorized(e,t){return this.wire.sendAction(\"interop-broker-is-connection-authorized\").catch((e=>{})),Promise.resolve(!0)}isActionAuthorized(e,t,n){return this.wire.sendAction(\"interop-broker-is-action-authorized\").catch((e=>{})),Promise.resolve(!0)}};return Gi.InteropBroker=f,e=new WeakMap,t=new WeakMap,n=new WeakMap,Gi}var zi,Ki={},qi={},Ji=s&&s.__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},Yi=s&&s.__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)};Object.defineProperty(qi,\"__esModule\",{value:!0});const Zi=d,Qi=Hi;class Xi extends Zi.Base{constructor(e,t,n){super(e),zi.set(this,void 0),this.id=n,Ji(this,zi,t,\"f\")}async setContext(e){this.wire.sendAction(\"interop-session-context-group-set-context\").catch((e=>{}));return(await Yi(this,zi,\"f\")).dispatch(`sessionContextGroup:setContext-${this.id}`,{sessionContextGroupId:this.id,context:e})}async getCurrentContext(e){this.wire.sendAction(\"interop-session-context-group-get-context\").catch((e=>{}));return(await Yi(this,zi,\"f\")).dispatch(`sessionContextGroup:getContext-${this.id}`,{sessionContextGroupId:this.id,type:e})}async addContextHandler(e,t){if(this.wire.sendAction(\"interop-session-context-group-add-handler\").catch((e=>{})),\"function\"!=typeof e)throw new Error(\"Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.\");const n=await Yi(this,zi,\"f\");let i;return i=t?`sessionContextHandler:invoke-${this.id}-${t}-${(0,Qi.generateId)()}`:`sessionContextHandler:invoke-${this.id}`,n.register(i,(0,Qi.wrapContextHandler)(e,i)),await n.dispatch(`sessionContextGroup:handlerAdded-${this.id}`,{handlerId:i,contextType:t}),{unsubscribe:await this.createUnsubscribeCb(i)}}async createUnsubscribeCb(e){const t=await Yi(this,zi,\"f\");return async()=>{t.remove(e),await t.dispatch(`sessionContextGroup:handlerRemoved-${this.id}`,{handlerId:e})}}getUserInstance(){return{id:this.id,setContext:(0,Qi.wrapInTryCatch)(this.setContext.bind(this),\"Failed to set context: \"),getCurrentContext:(0,Qi.wrapInTryCatch)(this.getCurrentContext.bind(this),\"Failed to get context: \"),addContextHandler:(0,Qi.wrapInTryCatch)(this.addContextHandler.bind(this),\"Failed to add context handler: \")}}}qi.default=Xi,zi=new WeakMap;var er={},tr={},nr={},ir={},rr=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),or=s&&s.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,\"default\",{enumerable:!0,value:t})}:function(e,t){e.default=t}),sr=s&&s.__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)&&rr(t,e,n);return or(t,e),t};Object.defineProperty(ir,\"__esModule\",{value:!0}),ir.PrivateChannelClient=void 0;const ar=sr(Hi);var cr,dr;function hr(){if(cr)return tr;cr=1;var e,t=s&&s.__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)},n=s&&s.__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},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(tr,\"__esModule\",{value:!0}),tr.FDC3ModuleBase=void 0;const o=nr,a=Hi,c=wr(),d=r(i);return tr.FDC3ModuleBase=class{get client(){return t(this,e,\"f\").call(this)}get fin(){return this.wire.getFin()}constructor(t,i){this.wire=i,e.set(this,void 0),n(this,e,t,\"f\")}async broadcast(e){return this.wire.sendAction(\"fdc3-broadcast\").catch((e=>{})),this.client.setContext(e)}async _open(e,t){this.wire.sendAction(\"fdc3-open\").catch((e=>{}));try{return await c.InteropClient.ferryFdc3Call(this.client,\"fdc3Open\",{app:e,context:t})}catch(e){const t=e.message===a.BROKER_ERRORS.fdc3Open?\"ResolverUnavailable\":e.message;throw new Error(t)}}async _getChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:\"system\",...(0,o.getUnsupportedChannelApis)()})))}async getOrCreateChannel(e){this.wire.sendAction(\"fdc3-get-or-create-channel\").catch((e=>{}));const t=(await this._getChannels()).find((t=>t.id===e));if(t)return{...t,type:\"system\",...(0,o.getUnsupportedChannelApis)()};try{const t=await this.client.joinSessionContextGroup(e);return(0,o.buildAppChannelObject)(t)}catch(e){throw console.error(e.message),new Error(o.ChannelError.CreationFailed)}}async getSystemChannels(){return this.wire.sendAction(\"fdc3-get-system-channels\").catch((e=>{})),this._getChannels()}async joinChannel(e){this.wire.sendAction(\"fdc3-join-channel\").catch((e=>{}));try{return await this.client.joinContextGroup(e)}catch(e){if(e.message===a.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup?console.error(\"The Channel you have tried to join is an App Channel. Custom Channels can only be defined by the Interop Broker through code or manifest configuration. Please use getOrCreateChannel.\"):console.error(e.message),e.message.startsWith(\"Attempting to join a context group that does not exist\"))throw new Error(o.ChannelError.NoChannelFound);throw new Error(o.ChannelError.AccessDenied)}}async getCurrentChannel(){this.wire.sendAction(\"fdc3-get-current-channel\").catch((e=>{}));const e=await this.getCurrentContextGroupInfo();return e?this.buildChannelObject(e):null}async leaveCurrentChannel(){return this.wire.sendAction(\"fdc3-leave-current-channel\").catch((e=>{})),this.client.removeFromContextGroup()}async getCurrentContextGroupInfo(){const e=await this.client.getContextGroups(),t=e.map((async e=>this.client.getAllClientsInContextGroup(e.id))),n=(await Promise.all(t)).findIndex((e=>e.some((e=>{const{uuid:t,name:n}=e;return this.wire.me.uuid===t&&this.wire.me.name===n}))));return e[n]}async buildChannelObject(e){return{...e,type:\"system\",addContextListener:(...[e,t])=>{let n,i;\"function\"==typeof e?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),n=e):(n=t,\"string\"==typeof e&&(i=e));const r=(async()=>{let e=!0;const t=await this.client.getCurrentContext(i);return this.client.addContextHandler(((i,r)=>{if(!e||(e=!1,!(0,d.default)(t,i)))return n(i,r)}),i)})();return{...r,unsubscribe:()=>r.then((e=>e.unsubscribe()))}},broadcast:this.broadcast.bind(this),getCurrentContext:async e=>{const t=await this.client.getCurrentContext(e);return void 0===t?null:t}}}},e=new WeakMap,tr}ir.PrivateChannelClient=class{constructor(e,t){this.id=t,this.client=e,this.listeners=new Map}async broadcast(e){return this.client.dispatch(\"broadcast\",{context:e})}async getCurrentContext(e){return this.client.dispatch(\"getCurrentContext\",{contextType:e})}async addContextListener(e,t){if(\"function\"!=typeof t)throw new Error(\"Non-function argument passed to the second parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.\");let n;n=e?`contextHandler:invoke-${this.id}-${e}-${ar.generateId()}`:`contextHandler:invoke-${this.id}-${ar.generateId()}`,this.client.register(n,ar.wrapContextHandler(t,n));const i={unsubscribe:await this.createContextUnsubscribeCb(n)};return this.listeners.set(n,i),await this.client.dispatch(\"contextHandlerAdded\",{handlerId:n,contextType:e}),i}createNonStandardUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch(\"nonStandardHandlerRemoved\",{handlerId:e})}}createContextUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch(\"contextHandlerRemoved\",{handlerId:e})}}onAddContextListener(e){const t=`onContextHandlerAdded:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch(\"onAddContextHandlerAdded\",{handlerId:t}),n}onDisconnect(e){const t=`onDisconnect:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch(\"onDisconnectHandlerAdded\",{handlerId:t}),n}onUnsubscribe(e){const t=`onUnsubscribe:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch(\"onUnsubscribeHandlerAdded\",{handlerId:t}),n}async cleanUpAllSubs(){Array.from(this.listeners.keys()).forEach((e=>{this.client.remove(e),this.listeners.delete(e)}))}async disconnect(){try{await this.client.dispatch(\"clientDisconnecting\"),await this.cleanUpAllSubs(),await this.client.disconnect()}catch(e){throw new Error(e.message)}}},function(e){var t=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,\"__esModule\",{value:!0}),e.getIntentResolution=e.isChannel=e.isContext=e.connectPrivateChannel=e.buildAppChannelObject=e.buildPrivateChannelObject=e.ChannelError=e.ResultError=e.UnsupportedChannelApiError=e.getUnsupportedChannelApis=void 0;const n=Hi,r=ir,o=t(i);e.getUnsupportedChannelApis=e=>({addContextListener:()=>{throw new a(\"Channel.addContextListener\",e)},broadcast:()=>{throw new a(\"Channel.broadcast\",e)},getCurrentContext:()=>{throw new a(\"Channel.getCurrentContext\",e)}});class a extends Error{constructor(e,t=\"System\"){super(e),this.message=`Calling ${e} on an instance of a ${t} Channel returned by fdc3.get${t}Channels is not supported. If you would like to use a ${t} Channel, please use fdc3.joinChannel, fdc3.addContextListener, and fdc3.broadcast instead.`}}var c,d;e.UnsupportedChannelApiError=a,function(e){e.NoResultReturned=\"NoResultReturned\",e.IntentHandlerRejected=\"IntentHandlerRejected\"}(c=e.ResultError||(e.ResultError={})),(d=e.ChannelError||(e.ChannelError={})).NoChannelFound=\"NoChannelFound\",d.AccessDenied=\"AccessDenied\",d.CreationFailed=\"CreationFailed\";e.buildPrivateChannelObject=e=>{let t=!1;const n=()=>{if(t)throw new Error(\"Private Channel Client has been disconnected from the Private Channel\")};return{id:e.id,type:\"private\",broadcast:async t=>(n(),e.broadcast(t)),getCurrentContext:async t=>(n(),e.getCurrentContext(t)),addContextListener:async(t,i)=>{n();let r=i,o=t;\"function\"==typeof t&&(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),r=t,o=null);return e.addContextListener(o,r)},onAddContextListener:t=>(n(),e.onAddContextListener(t)),disconnect:async()=>(n(),t=!0,e.disconnect()),onDisconnect:t=>(n(),e.onDisconnect(t)),onUnsubscribe:t=>(n(),e.onUnsubscribe(t))}};e.buildAppChannelObject=e=>({id:e.id,type:\"app\",broadcast:e.setContext,getCurrentContext:async t=>{const n=await e.getCurrentContext(t);return void 0===n?null:n},addContextListener:(t,n)=>{let i,r;\"function\"==typeof t?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),i=t):(i=n,\"string\"==typeof t&&(r=t));const s=(async()=>{let t=!0;const n=await e.getCurrentContext(r);return e.addContextHandler(((e,r)=>{if(!t||(t=!1,!(0,o.default)(n,e)))return i(e,r)}),r)})();return{...s,unsubscribe:()=>s.then((e=>e.unsubscribe()))}}});e.connectPrivateChannel=async t=>{try{const n=await fin.InterApplicationBus.Channel.connect(t),i=new r.PrivateChannelClient(n,t);return(0,e.buildPrivateChannelObject)(i)}catch(e){throw new Error(`Private Channel with id: ${t} doesn't exist`)}};e.isContext=e=>{if(e&&\"object\"==typeof e&&\"type\"in e){const{type:t}=e;return\"string\"==typeof t}return!1};e.isChannel=e=>{if(e&&\"object\"==typeof e&&\"type\"in e&&\"id\"in e){const{type:t,id:n}=e;return\"string\"==typeof t&&\"string\"==typeof n&&(\"app\"===t||\"private\"===t)}return!1};e.getIntentResolution=async(t,i,r,o)=>{const s=(0,n.generateId)(),a=new Promise(((e,t)=>{fin.InterApplicationBus.subscribe({uuid:\"*\"},s,(t=>{e(t)})).catch((()=>t(new Error(\"getResult is not supported in this environment\"))))})),d=r?{target:r,intentResolutionResultId:s}:{intentResolutionResultId:s},h=o?{name:o,context:i,metadata:d}:{...i,metadata:d},l=async()=>{let n=await a;if(!n||\"object\"!=typeof n)throw new Error(c.NoResultReturned);const{error:i}=n;if(i)throw new Error(c.IntentHandlerRejected);if((0,e.isChannel)(n)){const{id:i,type:r}=n;switch(r){case\"private\":n=await(0,e.connectPrivateChannel)(i);break;case\"app\":{const r=await t.joinSessionContextGroup(i);n=(0,e.buildAppChannelObject)(r);break}}}else if(!(0,e.isContext)(n))throw new Error(c.NoResultReturned);return n},u=o?await t.fireIntent(h):await t.fireIntentForContext(h);return\"object\"!=typeof u?{source:{appId:\"\",instanceId:\"\"},intent:\"\",version:\"2.0\",getResult:l}:{...u,getResult:l}}}(nr);var lr,ur,pr={};function wr(){if(ur)return Ki;ur=1;var e,t,n=s&&s.__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},i=s&&s.__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)},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ki,\"__esModule\",{value:!0}),Ki.InteropClient=void 0;const o=d,a=r(qi),c=function(){if(dr)return er;dr=1,Object.defineProperty(er,\"__esModule\",{value:!0}),er.Fdc3Module=void 0;const e=Hi,t=hr();class n extends t.FDC3ModuleBase{async open(e,t){await super._open(e,t)}addContextListener(e,t){let n;return this.wire.sendAction(\"fdc3-add-context-listener\").catch((e=>{})),\"function\"==typeof e?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),n=this.client.addContextHandler(e)):n=this.client.addContextHandler(t,null===e?void 0:e),{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}addIntentListener(e,t){this.wire.sendAction(\"fdc3-add-intent-listener\").catch((e=>{}));const n=this.client.registerIntentHandler((e=>{const{context:n,metadata:i}=e,{metadata:r}=n,o=i?.intentResolutionResultId||r?.intentResolutionResultId;o&&this.fin.InterApplicationBus.publish(o,null).catch((()=>null)),t(e.context)}),e,{fdc3Version:\"1.2\"});return{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}async raiseIntent(t,n,i){this.wire.sendAction(\"fdc3-raise-intent\").catch((e=>{}));const r=i?{name:t,context:n,metadata:{target:i}}:{name:t,context:n};try{return await this.client.fireIntent(r)}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntent?\"ResolverUnavailable\":t.message;throw new Error(n)}}async findIntent(t,n){this.wire.sendAction(\"fdc3-find-intent\").catch((e=>{}));try{return await this.client.getInfoForIntent({name:t,context:n})}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntent?\"ResolverUnavailable\":t.message;throw new Error(n)}}async findIntentsByContext(t){this.wire.sendAction(\"fdc3-find-intents-by-context\").catch((e=>{}));try{return await this.client.getInfoForIntentsByContext(t)}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntentsByContext?\"ResolverUnavailable\":t.message;throw new Error(n)}}async raiseIntentForContext(t,n){this.wire.sendAction(\"fdc3-raise-intent-for-context\").catch((e=>{}));try{return await this.client.fireIntentForContext({...t,metadata:{target:n}})}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntentForContext?\"ResolverUnavailable\":t.message;throw new Error(n)}}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}getInfo(){return this.wire.sendAction(\"fdc3-get-info\").catch((e=>{})),{providerVersion:this.wire.environment.getAdapterVersionSync(),provider:`openfin-${this.wire.me.uuid}`,fdc3Version:\"1.2\"}}}return er.Fdc3Module=n,er}(),h=function(){if(lr)return pr;lr=1,Object.defineProperty(pr,\"__esModule\",{value:!0}),pr.Fdc3Module2=void 0;const e=hr(),t=Hi,n=wr(),i=nr,r=ir;class o extends e.FDC3ModuleBase{async open(e,t){return\"string\"==typeof e&&console.warn(\"Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).\"),super._open(e,t)}async findInstances(e){this.wire.sendAction(\"fdc3-find-instances\").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,\"fdc3FindInstances\",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3FindInstances?\"ResolverUnavailable\":e.message;throw new Error(n)}}async getAppMetadata(e){this.wire.sendAction(\"fdc3-get-app-metadata\").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,\"fdc3GetAppMetadata\",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3GetAppMetadata?\"ResolverUnavailable\":e.message;throw new Error(n)}}async addContextListener(e,t){this.wire.sendAction(\"fdc3-add-context-listener\").catch((e=>{}));const n=e=>t=>{const{contextMetadata:n,...i}=t,r=n?[{...i},n]:[t,null];e(...r)};let i=t,r=n(i);return\"function\"==typeof e?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),i=e,r=n(i),this.client.addContextHandler(r)):this.client.addContextHandler(r,null===e?void 0:e)}async findIntent(e,n,i){this.wire.sendAction(\"fdc3-find-intent\").catch((e=>{}));try{return await this.client.getInfoForIntent({name:e,context:n,metadata:{resultType:i}})}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntent?\"ResolverUnavailable\":e.message;throw new Error(n)}}async findIntentsByContext(e,i){this.wire.sendAction(\"fdc3-find-intents-by-context\").catch((e=>{}));const r=i?{context:e,metadata:{resultType:i}}:e;try{return await n.InteropClient.ferryFdc3Call(this.client,\"fdc3v2FindIntentsByContext\",r)}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntentsByContext?\"ResolverUnavailable\":e.message;throw new Error(n)}}async raiseIntent(e,n,r){this.wire.sendAction(\"fdc3-raise-intent\").catch((e=>{}));try{return\"string\"==typeof r&&console.warn(\"Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).\"),(0,i.getIntentResolution)(this.client,n,r,e)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?\"ResolverUnavailable\":e.message;throw new Error(n)}}async raiseIntentForContext(e,n){this.wire.sendAction(\"fdc3-raise-intent-for-context\").catch((e=>{}));try{return\"string\"==typeof n&&console.warn(\"Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).\"),(0,i.getIntentResolution)(this.client,e,n)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?\"ResolverUnavailable\":e.message;throw new Error(n)}}async addIntentListener(e,t){if(this.wire.sendAction(\"fdc3-add-intent-listener\").catch((e=>{})),\"string\"!=typeof e)throw new Error(\"First argument must be an Intent name\");return this.client.registerIntentHandler((async e=>{let n,i;const{context:r,metadata:o}=e,{contextMetadata:s,metadata:a,...c}=r,d=o?.intentResolutionResultId||a?.intentResolutionResultId;try{const e=a?{metadata:a,...c}:{...c};n=await t(e,s),i=n}catch(e){n=e,i={error:!0}}if(d&&this.fin.InterApplicationBus.publish(d,i).catch((()=>null)),n instanceof Error)throw new Error(n.message);return n}),e,{fdc3Version:\"2.0\"})}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}async createPrivateChannel(){const e=(0,t.generateId)();await n.InteropClient.ferryFdc3Call(this.client,\"createPrivateChannelProvider\",{channelId:e});const o=await this.fin.InterApplicationBus.Channel.connect(e),s=new r.PrivateChannelClient(o,e);return(0,i.buildPrivateChannelObject)(s)}async getUserChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:\"user\",...(0,i.getUnsupportedChannelApis)(\"User\")})))}async getSystemChannels(){return console.warn(\"This API has been deprecated. Please use fdc3.getUserChannels instead.\"),super.getSystemChannels()}async joinUserChannel(e){return super.joinChannel(e)}async joinChannel(e){return console.warn(\"This API has been deprecated. Please use fdc3.joinUserChannel instead.\"),super.joinChannel(e)}async getCurrentChannel(){const e=await super.getCurrentChannel();return e?{...e,type:\"user\",broadcast:this.broadcast.bind(this)}:null}async getInfo(){return n.InteropClient.ferryFdc3Call(this.client,\"fdc3v2GetInfo\",{fdc3Version:\"2.0\"})}}return pr.Fdc3Module2=o,pr}(),l=Hi;let u=class extends o.Base{constructor(i,r){super(i),e.set(this,void 0),t.set(this,void 0),n(this,t,new Map,\"f\"),n(this,e,r,\"f\")}async setContext(t){this.wire.sendAction(\"interop-client-set-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"setContext\",{context:t})}async addContextHandler(t,n){if(this.wire.sendAction(\"interop-client-add-context-handler\").catch((e=>{})),\"function\"!=typeof t)throw new Error(\"Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.\");const r=await i(this,e,\"f\");let o;o=n?`invokeContextHandler-${n}-${(0,l.generateId)()}`:\"invokeContextHandler\";const s=(0,l.wrapContextHandler)(t,o);return r.register(o,s),await r.dispatch(\"contextHandlerRegistered\",{handlerId:o,contextType:n}),{unsubscribe:async()=>{r.remove(o),await r.dispatch(\"removeContextHandler\",{handlerId:o})}}}async getContextGroups(){this.wire.sendAction(\"interop-client-get-context-groups\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getContextGroups\")}async joinContextGroup(t,n){this.wire.sendAction(\"interop-client-join-context-group\").catch((e=>{}));const r=await i(this,e,\"f\");if(!t)throw new Error(\"No contextGroupId specified for joinContextGroup.\");return r.dispatch(\"joinContextGroup\",{contextGroupId:t,target:n})}async removeFromContextGroup(t){this.wire.sendAction(\"interop-client-remove-from-context-group\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"removeFromContextGroup\",{target:t})}async getAllClientsInContextGroup(t){this.wire.sendAction(\"interop-client-get-all-clients-in-context-group\").catch((e=>{}));const n=await i(this,e,\"f\");if(!t)throw new Error(\"No contextGroupId specified for getAllClientsInContextGroup.\");return n.dispatch(\"getAllClientsInContextGroup\",{contextGroupId:t})}async getInfoForContextGroup(t){this.wire.sendAction(\"interop-client-get-info-for-context-group\").catch((e=>{}));const n=await i(this,e,\"f\");if(!t)throw new Error(\"No contextGroupId specified for getInfoForContextGroup.\");return n.dispatch(\"getInfoForContextGroup\",{contextGroupId:t})}async fireIntent(t){this.wire.sendAction(\"interop-client-fire-intent\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"fireIntent\",t)}async registerIntentHandler(t,n,r){this.wire.sendAction(\"interop-client-register-intent-handler\").catch((e=>{}));const o=await i(this,e,\"f\"),s=`intent-handler-${n}`,a=(0,l.wrapIntentHandler)(t,s);try{await o.register(s,a),await o.dispatch(\"intentHandlerRegistered\",{handlerId:s,...r})}catch(e){throw new Error(\"Unable to register intent handler\")}return{unsubscribe:async()=>{o.remove(s)}}}async getCurrentContext(t){this.wire.sendAction(\"interop-client-get-current-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getCurrentContext\",{contextType:t})}async getInfoForIntent(t){this.wire.sendAction(\"interop-client-get-info-for-intent\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getInfoForIntent\",t)}async getInfoForIntentsByContext(t){this.wire.sendAction(\"interop-client-get-info-for-intents-by-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getInfoForIntentsByContext\",t)}async fireIntentForContext(t){this.wire.sendAction(\"interop-client-fire-intent-for-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"fireIntentForContext\",t)}async joinSessionContextGroup(n){try{const r=i(this,t,\"f\").get(n);if(r)return r.getUserInstance();const o=await i(this,e,\"f\"),{hasConflict:s}=await o.dispatch(\"sessionContextGroup:createIfNeeded\",{sessionContextGroupId:n});s&&console.warn(`A (non-session) context group with the name \"${n}\" already exists. If you are trying to join a Context Group, call joinContextGroup instead.`);const c=new a.default(this.wire,i(this,e,\"f\"),n);return i(this,t,\"f\").set(n,c),c.getUserInstance()}catch(e){throw console.error(`Error thrown trying to create Session Context Group with id \"${n}\": ${e}`),e}}async onDisconnection(t){this.wire.sendAction(\"interop-client-add-ondisconnection-listener\").catch((e=>{}));return(await i(this,e,\"f\")).onDisconnection((e=>{const{uuid:n}=e;t({type:\"interop-broker\",topic:\"disconnected\",brokerName:n})}))}getFDC3Sync(e){switch(e){case\"1.2\":return new c.Fdc3Module((()=>this),this.wire);case\"2.0\":return new h.Fdc3Module2((()=>this),this.wire);default:throw new Error(`Invalid FDC3 version provided: ${e}. Must be '1.2' or '2.0'`)}}async getFDC3(e){return this.getFDC3Sync(e)}static async ferryFdc3Call(t,n,r){return(await i(t,e,\"f\")).dispatch(n,r||null)}};return Ki.InteropClient=u,e=new WeakMap,t=new WeakMap,Ki}var yr,fr,gr,mr={};function vr(){if(yr)return mr;yr=1,Object.defineProperty(mr,\"__esModule\",{value:!0}),mr.overrideCheck=mr.checkFDC32Overrides=mr.getDefaultViewFdc3VersionFromAppInfo=void 0;const e=Vi();function t(t){return[\"fdc3HandleFindInstances\",\"handleInfoForIntent\",\"handleInfoForIntentsByContext\",\"fdc3HandleGetAppMetadata\",\"fdc3HandleGetInfo\",\"fdc3HandleOpen\",\"handleFiredIntent\",\"handleFiredIntentForContext\"].filter((n=>t[n]===e.InteropBroker.prototype[n]))}return mr.getDefaultViewFdc3VersionFromAppInfo=function({manifest:e,initialOptions:t}){const n=e?.platform?.defaultViewOptions?.fdc3InteropApi??t.defaultViewOptions?.fdc3InteropApi;return[\"1.2\",\"2.0\"].includes(n??\"\")?n:void 0},mr.checkFDC32Overrides=t,mr.overrideCheck=function(e,n){if(n&&\"2.0\"===n){const n=t(e);n.length>0&&console.warn(`WARNING: FDC3 2.0 has been set as a default option for Views in this Platform, but the required InteropBroker APIs for FDC3 2.0 compliance have not all been overridden.\\nThe following APIs need to be overridden:\\n${n.join(\"\\n\")}`)}},mr}function Cr(){return gr||(gr=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),i=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),i(function(){if(fr)return Ti;fr=1;var e=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ti,\"__esModule\",{value:!0}),Ti.InteropModule=void 0;const t=e(n),i=$i,r=d,o=Vi(),a=wr(),c=vr(),h=Tn,l=e=>new e,u=\"You have attempted to use or modify InteropBroker parameters, which is not allowed. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.\";class p extends r.Base{async init(e,n=l){this.wire.sendAction(\"interop-init\").catch((()=>{}));const r=await this.wire.environment.getInteropInfo(this.wire.getFin()),s=(0,i.createUnusableObject)(u),a=(0,i.createWarningObject)(u,(0,t.default)(r)),d=async()=>{throw new Error(u)},p=o.InteropBroker.createClosedConstructor(this.wire,(()=>this.fin.InterApplicationBus.Channel.create(`interop-broker-${e}`)),r);let w;return w=Array.isArray(n)?new((0,h.overrideFromComposables)(...n)(p))(s,d,a):await n(p,s,d,a),(0,c.overrideCheck)(w,r.fdc3Version),w}connectSync(e,t){return this.wire.sendAction(\"interop-connect-sync\").catch((()=>{})),new a.InteropClient(this.wire,this.wire.environment.whenReady().then((()=>this.fin.InterApplicationBus.Channel.connect(`interop-broker-${e}`,{payload:t}))))}}return Ti.InteropModule=p,Ti}(),e),i(wr(),e),i(Vi(),e)}(Li)),Li}var br={},Ir={},Er={},xr={};Object.defineProperty(xr,\"__esModule\",{value:!0}),xr.getSnapshotSourceChannelName=void 0;xr.getSnapshotSourceChannelName=e=>`snapshot-source-provider-${e.uuid}`;var Ar,Pr,Mr,_r,Or,Sr=s&&s.__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},Rr=s&&s.__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)};Object.defineProperty(Er,\"__esModule\",{value:!0}),Er.SnapshotSource=void 0;const Fr=d,jr=xr,kr=new Map;class Lr extends Fr.Base{constructor(e,t){super(e),Ar.set(this,void 0),Pr.set(this,(()=>(kr.has(this.identity.uuid)||kr.set(this.identity.uuid,{eventFired:null,clientPromise:null}),kr.get(this.identity.uuid)))),Mr.set(this,(()=>(Rr(this,Pr,\"f\").call(this).clientPromise||(Rr(this,Pr,\"f\").call(this).clientPromise=Rr(this,_r,\"f\").call(this)),Rr(this,Pr,\"f\").call(this).clientPromise))),_r.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);try{Rr(this,Pr,\"f\").call(this).eventFired||await Rr(this,Or,\"f\").call(this);const t=await this.fin.InterApplicationBus.Channel.connect(e,{wait:!1});return t.onDisconnection((()=>{Rr(this,Pr,\"f\").call(this).clientPromise=null,Rr(this,Pr,\"f\").call(this).eventFired=null})),t}catch(e){throw Rr(this,Pr,\"f\").call(this).clientPromise=null,new Error(\"The targeted SnapshotSource is not currently initialized. Await this object's ready() method.\")}})),Or.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);let t,n;const i=new Promise(((e,i)=>{t=e,n=i}));Rr(this,Pr,\"f\").call(this).eventFired=i;const r=async i=>{try{i.channelName===e&&(t(),await this.fin.InterApplicationBus.Channel.removeListener(\"connected\",r))}catch(e){n(e)}};await this.fin.InterApplicationBus.Channel.on(\"connected\",r)})),Sr(this,Ar,t,\"f\")}get identity(){return Rr(this,Ar,\"f\")}async ready(){this.wire.sendAction(\"snapshot-source-ready\").catch((e=>{}));try{await Rr(this,Mr,\"f\").call(this)}catch(e){await Rr(this,Pr,\"f\").call(this).eventFired}}async getSnapshot(){this.wire.sendAction(\"snapshot-source-get-snapshot\").catch((e=>{}));const e=await Rr(this,Mr,\"f\").call(this),t=await e.dispatch(\"get-snapshot\");return(await t).snapshot}async applySnapshot(e){this.wire.sendAction(\"snapshot-source-apply-snapshot\").catch((e=>{}));return(await Rr(this,Mr,\"f\").call(this)).dispatch(\"apply-snapshot\",{snapshot:e})}}Er.SnapshotSource=Lr,Ar=new WeakMap,Pr=new WeakMap,Mr=new WeakMap,_r=new WeakMap,Or=new WeakMap,Object.defineProperty(Ir,\"__esModule\",{value:!0}),Ir.SnapshotSourceModule=void 0;const Tr=d,$r=Er,Br=xr;class Gr extends Tr.Base{async init(e){if(this.wire.sendAction(\"snapshot-source-init\").catch((e=>{})),\"object\"!=typeof e||\"function\"!=typeof e.getSnapshot||\"function\"!=typeof e.applySnapshot)throw new Error(\"you must pass in a valid SnapshotProvider\");const t=await this.fin.InterApplicationBus.Channel.create((0,Br.getSnapshotSourceChannelName)(this.fin.me));t.register(\"get-snapshot\",(async()=>({snapshot:await e.getSnapshot()}))),t.register(\"apply-snapshot\",(({snapshot:t})=>e.applySnapshot(t)))}wrapSync(e){return this.wire.sendAction(\"snapshot-source-wrap-sync\").catch((e=>{})),new $r.SnapshotSource(this.wire,e)}async wrap(e){return this.wire.sendAction(\"snapshot-source-wrap\").catch((e=>{})),this.wrapSync(e)}}Ir.SnapshotSourceModule=Gr,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Ir,e),n(Er,e)}(br),Object.defineProperty(a,\"__esModule\",{value:!0});var Wr=a.Fin=void 0;const Hr=t,Nr=c,Dr=ie(),Ur=Z(),Vr=de,zr=en,Kr=rn,qr=un,Jr=bn,Yr=J(),Zr=An,Qr=ki,Xr=Cr(),eo=br;class to extends Hr.EventEmitter{constructor(e){super(),this.wire=e,this.System=new Nr.System(e),this.Window=new Dr._WindowModule(e),this.Application=new Ur.ApplicationModule(e),this.InterApplicationBus=new Vr.InterApplicationBus(e),this.Clipboard=new zr.Clipboard(e),this.ExternalApplication=new Kr.ExternalApplicationModule(e),this.Frame=new qr._FrameModule(e),this.GlobalHotkey=new Jr.GlobalHotkey(e),this.Platform=new Zr.PlatformModule(e,this.InterApplicationBus.Channel),this.View=new Yr.ViewModule(e),this.Interop=new Xr.InteropModule(e),this.SnapshotSource=new eo.SnapshotSourceModule(e),e.registerFin(this),this.me=(0,Qr.getMe)(e),e.on(\"disconnected\",(()=>{this.emit(\"disconnected\")}))}}Wr=a.Fin=to;var no={},io={};function ro(e){return\"string\"==typeof e.manifestUrl}function oo(e){return ao(e)&&\"string\"==typeof e.address}function so(e){return oo(e)&&\"string\"==typeof e.token}function ao(e){return\"string\"==typeof e.uuid}function co(e){return e.runtime&&\"string\"==typeof e.runtime.version}function ho(e){return ao(e)&&co(e)}Object.defineProperty(io,\"__esModule\",{value:!0}),io.isInternalConnectConfig=io.isPortDiscoveryConfig=io.isNewConnectConfig=io.isConfigWithReceiver=io.isRemoteConfig=io.isExistingConnectConfig=io.isExternalConfig=void 0,io.isExternalConfig=ro,io.isExistingConnectConfig=oo,io.isRemoteConfig=so,io.isConfigWithReceiver=function(e){return\"object\"==typeof e.receiver&&so({...e,address:\"\"})},io.isNewConnectConfig=ho,io.isPortDiscoveryConfig=function(e){return ro(e)&&co(e)||ho(e)},io.isInternalConnectConfig=function(e){return oo(e)||ho(e)};var lo={},uo={};Object.defineProperty(uo,\"__esModule\",{value:!0}),uo.EmitterMap=void 0;const po=t;function wo(e){return Buffer.from(e).toString(\"base64\")}uo.EmitterMap=class{constructor(){this.storage=new Map}hashKeys(e){return e.map(wo).join(\"/\")}getOrCreate(e){const t=this.hashKeys(e);return this.storage.has(t)||this.storage.set(t,new po.EventEmitter),this.storage.get(t)}has(e){return this.storage.has(this.hashKeys(e))}delete(e){const t=this.hashKeys(e);return this.storage.delete(t)}},Object.defineProperty(lo,\"__esModule\",{value:!0});const yo=uo;class fo extends yo.EmitterMap{constructor(){super(...arguments),this.dispatchEvent=e=>{if(function(e){return\"process-desktop-event\"===e.action}(e)){const{payload:t}=e,n=function(e){const{topic:t}=e;if(\"frame\"===t||\"window\"===t||\"view\"===t){const{uuid:n,name:i}=e;return[t,n,i]}if(\"application\"===t){const{uuid:n}=e;return[t,n]}return[t]}(t);if(this.has(n))return this.getOrCreate(n).emit(t.type,t),!0}return!1}}}lo.default=fo;var go,mo,vo=s&&s.__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},Co=s&&s.__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)},bo=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(no,\"__esModule\",{value:!0});var Io=no.Transport=void 0;const Eo=t,xo=io,Ao=g,Po=bo(lo),Mo=ki,_o=ke;class Oo extends Eo.EventEmitter{constructor(e,t,n){super(),this.wireListeners=new Map,this.topicRefMap=new Map,this.eventAggregator=new Po.default,this.messageHandlers=[this.eventAggregator.dispatchEvent],go.set(this,void 0),mo.set(this,void 0),this.connectSync=()=>{Co(this,go,\"f\").connectSync()},this.getPort=()=>Co(this,go,\"f\").getPort(),vo(this,go,new e(this.onmessage.bind(this)),\"f\"),this.environment=t,this.sendRaw=Co(this,go,\"f\").send.bind(Co(this,go,\"f\")),this.registerMessageHandler(this.handleMessage.bind(this)),Co(this,go,\"f\").on(\"disconnected\",(()=>{for(const[,{handleNack:e}]of this.wireListeners)e({reason:\"Remote connection has closed\"});this.wireListeners.clear(),this.emit(\"disconnected\")}));const{uuid:i,name:r}=n,o=this.environment.getCurrentEntityType();this.me=(0,Mo.getBaseMe)(o,i,r)}getFin(){if(!Co(this,mo,\"f\"))throw new Error(\"No Fin object registered for this transport\");return Co(this,mo,\"f\")}registerFin(e){if(Co(this,mo,\"f\"))throw new Error(\"Fin object has already been registered for this transport\");vo(this,mo,e,\"f\")}shutdown(){return Co(this,go,\"f\").shutdown()}async connect(e){if((0,xo.isConfigWithReceiver)(e))return await Co(this,go,\"f\").connect(e.receiver),this.authorize(e);if((0,xo.isRemoteConfig)(e))return this.connectRemote(e);if((0,xo.isExistingConnectConfig)(e))return this.connectByPort(e);if((0,xo.isNewConnectConfig)(e)){const t=await this.environment.retrievePort(e);return this.connectByPort({...e,address:`ws://localhost:${t}`})}}async connectRemote(e){return await Co(this,go,\"f\").connect(new(this.environment.getWsConstructor())(e.address)),this.authorize(e)}async connectByPort(e){const{address:t,uuid:n}=e,i={...e,type:\"file-token\"},r=Co(this,go,\"f\");await r.connect(new(this.environment.getWsConstructor())(e.address));const o=await this.sendAction(\"request-external-authorization\",{uuid:n,type:\"file-token\"},!0);if(\"external-authorization-response\"!==o.action)throw new Ao.UnexpectedActionError(o.action);return await this.environment.writeToken(o.payload.file,o.payload.token),this.authorize(i)}async authorize(e){const t=await this.sendAction(\"request-authorization\",e,!0);if(\"authorization-response\"!==t.action)throw new Ao.UnexpectedActionError(t.action);if(!0!==t.payload.success)throw new Ao.RuntimeError(t.payload)}sendAction(e,t={},n=!1){let i=()=>{};const r=Ao.RuntimeError.getCallSite(1),o=this.environment.getNextMessageId(),s=new Promise(((s,a)=>{i=a;const c={action:e,payload:t,messageId:o},d=Co(this,go,\"f\");return this.addWireListener(o,s,(e=>this.nackHandler(e,a,r)),n),d.send(c).catch(a)}));return Object.assign(s,{cancel:i,messageId:o})}nackHandler(e,t,n){t(\"string\"==typeof e?e:new Ao.RuntimeError(e,n))}ferryAction(e){return new Promise(((t,n)=>{const i=this.environment.getNextMessageId();e.messageId=i;const r=e=>{t(e.payload)};return Co(this,go,\"f\").send(e).then((()=>this.addWireListener(i,r,(e=>this.nackHandler(e,n)),!1))).catch(n)}))}registerMessageHandler(e){this.messageHandlers.push(e)}addWireListener(e,t,n,i){i?this.uncorrelatedListener=t:this.wireListeners.has(e)?n({reason:\"Duplicate handler id\",error:(0,_o.errorToPOJO)(new Ao.DuplicateCorrelationError(String(e)))}):this.wireListeners.set(e,{resolve:t,handleNack:n})}onmessage(e){for(const t of this.messageHandlers)t.call(null,e)}handleMessage(e){const t=e.correlationId||NaN;if(\"correlationId\"in e){if(!this.wireListeners.has(t))return!1;{const{resolve:n,handleNack:i}=this.wireListeners.get(t);\"ack\"!==e.action?i({reason:\"Did not receive ack action\",error:(0,_o.errorToPOJO)(new Ao.NoAckError(e.action))}):\"payload\"in e?e.payload.success?n.call(null,e):i(e.payload):\"string\"==typeof e.reason?i(e):(console.warn(\"Received invalid response from core\",e),i({reason:\"invalid response shape\"})),this.wireListeners.delete(t)}}else this.uncorrelatedListener&&this.uncorrelatedListener.call(null,e),this.uncorrelatedListener=()=>{};return!0}}Io=no.Transport=Oo,go=new WeakMap,mo=new WeakMap;const So=(...e)=>({log:(...t)=>console.debug(`[${(new Date).toISOString()}]`,...(e=>e.map((e=>`[${e}]`)))(e),...t),getLogger:(...t)=>So(...e,...t)}),Ro=So(\"@openfin/core-web/client\");function Fo(e,t){if(!function(e){return\"string\"==typeof e}(e))throw new Error(`Property ${t} has invalid type. Expected string, got ${typeof e}.`)}const jo=\"web-broker-ports-ready\",ko=Ro.getLogger(\"get-web-interop-ports\");function Lo(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)}function To(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}\"function\"==typeof SuppressedError&&SuppressedError;const $o=e=>{var n,i,r;return r=class extends t.EventEmitter{constructor(t){super(),n.set(this,void 0),i.set(this,!1),this.connectSync=()=>{Lo(this,i,\"f\")||(e.addEventListener(\"message\",(e=>{e.data?.topic?.startsWith(\"wire-message\")&&e.data.message&&Lo(this,n,\"f\").call(this,{...JSON.parse(e.data.message),ports:e.ports})})),e.start())},this.connect=async()=>{this.connectSync()},this.send=t=>(e.postMessage({topic:\"wire-message\",message:JSON.stringify(t)}),Promise.resolve()),this.shutdown=async()=>{e.close()},To(this,n,t,\"f\")}getPort(){return e}},n=new WeakMap,i=new WeakMap,r};var Bo={},Go={};Object.defineProperty(Go,\"__esModule\",{value:!0}),Go.BaseEnvironment=void 0;const Wo=vr();Go.BaseEnvironment=class{async getViewWindowIdentity(e,t){const{identity:n}=await e.View.wrapSync(t).getCurrentWindow();return n}async getInteropInfo(e){const t=await e.Application.getCurrentSync().getInfo().catch((()=>null)),n=t?.initialOptions?.interopBrokerConfiguration??{};return{fdc3Version:t?(0,Wo.getDefaultViewFdc3VersionFromAppInfo)(t):void 0,...n,fdc3Info:{providerVersion:await e.System.getVersion(),provider:\"OpenFin\"}}}},Object.defineProperty(Bo,\"__esModule\",{value:!0});var Ho=Bo.BrowserEnvironment=void 0;const No=Go;class Do extends No.BaseEnvironment{constructor(){super(...arguments),this.type=\"other\",this.getRandomId=()=>{const e=new Uint32Array(1);return window.crypto.getRandomValues(e)[0].toString(32)}}getAdapterVersionSync(){return\"\"}observeBounds(e,t){throw new Error(\"Method not implemented.\")}layoutAllowedInContext(e){return!1}initLayoutManager(e,t,n){throw new Error(\"Method not implemented.\")}applyLayoutSnapshot(e,t,n){throw new Error(\"Method not implemented.\")}createLayout(e,t){throw new Error(\"Method not implemented.\")}destroyLayout(e,t){throw new Error(\"Method not implemented.\")}resolveLayout(e,t){throw new Error(\"Method not implemented.\")}initPlatform(...e){throw new Error(\"Method not implemented.\")}writeToken(e,t){return Promise.resolve(\"\")}retrievePort(e){throw new Error(\"Method not implemented.\")}getNextMessageId(){return this.getRandomId()}createChildContent(e){throw new Error(\"Method not implemented.\")}getWebWindow(e){throw new Error(\"Method not implemented.\")}getCurrentEntityIdentity(){throw new Error(\"Method not implemented.\")}getCurrentEntityType(){return\"external connection\"}raiseEvent(e,t){throw new Error(\"Method not implemented.\")}getUrl(){return location.href}getDefaultChannelOptions(){return{create:{},connect:{}}}getRtcPeer(){return new RTCPeerConnection}getWsConstructor(){return WebSocket}whenReady(){return Promise.resolve()}}Ho=Bo.BrowserEnvironment=Do;const Uo=e=>\"platform\"in e&&void 0!==e.platform;var Vo,zo;class Ko extends Ho{constructor(e){super(),this.connectConfig=e,Vo.set(this,void 0),zo.set(this,new W((async()=>Promise.resolve().then((function(){return require(\"./main-b14f67c9.js\")}))))),Uo(e)&&this.validatePlatformOptions(e)}getAdapterVersionSync(){return\"0.39.21\"}validatePlatformOptions({platform:e}){if(!(\"layoutSnapshot\"in e))throw new Error(\"Platform options are missing layoutSnapshot. Please provide a layoutSnapshot in the platform options.\");if(\"windows\"in e||\"windows\"in e.layoutSnapshot)throw new Error(\"It appears you tried to call connect() with a snapshot object from an OpenFin desktop environment. Note that connect() expects to be called with a platform property with this structure: { platform: { layoutSnapshot } }. To get a layoutSnapshot of the expected structure, use fin.Platform.Layout.getCurrentLayoutManagerSync().getLayoutSnapshot() in v34+ in your desktop environment.\");const{layouts:t}=e.layoutSnapshot;Object.entries(t).map((([e,t])=>{if(\"object\"!=typeof t||null===t)throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must be an object.`);if(!(\"content\"in t))throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must contain a 'content' property.`)}))}async getInteropInfo(e){return{...{contextGroups:void 0,logging:{beforeAction:{enabled:!1},afterAction:{enabled:!1}}},fdc3Version:void 0,fdc3Info:{providerVersion:\"0.39.21\",provider:\"OpenFin Web\"}}}layoutAllowedInContext(e){return!0}async initLayoutManager(e,t,n){if(Lo(this,Vo,\"f\"))throw new Error(\"Layout already initialized.\");if(!Uo(this.connectConfig))throw new Error(\"Platform options are missing from connection config.\");const{WebLayoutEntryPoint:i}=await Lo(this,zo,\"f\").getValue();return To(this,Vo,new i(this.connectConfig),\"f\"),await Lo(this,Vo,\"f\").initLayoutManager(e,t,n)}async applyLayoutSnapshot(e,t,n){Lo(this,Vo,\"f\")?.applyLayoutSnapshot(e,t,n)}async createLayout(e,t){return Lo(this,Vo,\"f\")?.createLayout(e,t)}async destroyLayout(e,t){return Lo(this,Vo,\"f\")?.destroyLayout(e,t)}async getViewWindowIdentity(e,t){return Promise.resolve({uuid:t.uuid,name:t.uuid})}}Vo=new WeakMap,zo=new WeakMap;const qo=()=>{const e=((e,t)=>{const n=new RegExp(`^${t}<(?.*)>$`).exec(e)?.groups?.meta;if(n)try{return JSON.parse(atob(n))}catch(e){throw new Error(`Failed to decode JSON from ${n}.`)}})(window.name,\"of-frame\");if(e)try{const{name:t,uuid:n,brokerUrl:i,providerId:r,contextGroup:o}=e;return Fo(i,\"brokerUrl\"),Fo(n,\"uuid\"),Fo(t,\"name\"),{identity:{name:t,uuid:n},brokerUrl:i,interopConfig:{providerId:r,currentContextGroup:o}}}catch(e){throw new Error(`Unexpected error occurred when inferring platform information: ${e.stack}`)}},Jo=()=>{const e=r.v4();return{uuid:e,name:e}},Yo=async e=>{if(\"enabled\"===e.connectionInheritance){const t=await(async e=>{const t=qo();if(t){const{validateOptions:n=(()=>!0)}=e,{identity:i,...r}=t;if(!await n(r))throw new Error(\"Parent options were rejected by validateOptions.\");return t}})(e);if(t)return t}if(!e.options){const t=\"enabled\"===e.connectionInheritance?\"Broker URL was not specified nor provided by a platform container.\":\"Connection inheritance is disabled but no options were provided.\";throw new Error(t)}return{...e.options,identity:Jo()}};exports.__classPrivateFieldGet=Lo,exports.__classPrivateFieldSet=To,exports.apiExposer=Gn,exports.commonjsGlobal=s,exports.connect=async t=>{try{Ro.log(\"Establishing connection\",t);const{brokerUrl:n,identity:i,timeout:r,interopConfig:s}=await Yo(t),{workerPort:a,iframeBrokerPort:c}=await(async(e,t,n)=>{const{origin:i}=new URL(e),r=document.createElement(\"IFRAME\");let s;r.style.display=\"none\";try{return await new Promise(((a,c)=>{const d=e=>{if(e.source===r.contentWindow&&e.data?.topic===`ack-${jo}`){if(e.origin!==i)c(new Error(`Broker redirected to unexpected origin ${e.origin}, expected ${i}.`));else if(e.data.success){const[t,n]=e.ports;a({iframeBrokerPort:t,workerPort:n})}else c(new m(e.data));window.removeEventListener(\"message\",d),clearTimeout(s)}};window.addEventListener(\"message\",d),ko.log(`Connecting to broker ${e}`),r.setAttribute(\"src\",e),r.setAttribute(\"name\",o(t,\"of-broker\")),document.body.appendChild(r),ko.log(\"Iframe loaded, awaiting init message from iframe\"),n&&(s=setTimeout((()=>{window.removeEventListener(\"message\",d),document.body.removeChild(r),c(new Error(\"Worker did not initialize in time\"))}),n))}))}catch(e){throw new Error(`Failed to initialise Fin Web Client. ${e.message}`,{cause:e})}})(n,i,r);Ro.log(\"Successfully established connection to shared worker\");const d={entityType:\"external connection\",...i};a.start(),c.start();const h=((t,n,i)=>{const r=$o(n),o=new Ko(t),s=new Io(r,o,i);return s.connectSync(),window.Buffer=e.Buffer,new Wr(s)})(t,a,d);return s?.providerId&&(h.me.interop=h.Interop.connectSync(s.providerId),s?.currentContextGroup&&h.me.interop.joinContextGroup(s.currentContextGroup).catch((e=>{console.warn(`Error joining specified context group: ${s?.currentContextGroup}, continuing`,e)}))),{...h,me:{...h.me,identity:{uuid:h.me.uuid,name:h.me.name}}}}catch(e){throw new Error(`An error occured during web-interop connection: ${e.message}`)}},exports.decorators=Nn,exports.encodeOptions=o,exports.layout_constants=ai,exports.lazy=G;\n","\"use strict\";var t=require(\"./main-8cad4070.js\"),e=require(\"uuid\");require(\"buffer/\"),require(\"events\"),require(\"lodash/cloneDeep\"),require(\"lodash/isEqual\");var i={},n={};Object.defineProperty(n,\"__esModule\",{value:!0}),n.mapValuesAsync=n.mapEntriesAsync=void 0;const o=(t,[e,i])=>({...t,[e]:i});async function s(t,e){return(await Promise.all(e.map((async([e,i])=>[e,await t(i,e)])))).reduce(o,{})}n.mapEntriesAsync=s,n.mapValuesAsync=async function(t,e){let i;return i=e instanceof Map?[...e.entries()]:Object.entries(e),s(t,i)};var r,a,l,h,d=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldSet||function(t,e,i,n,o){if(\"m\"===n)throw new TypeError(\"Private method is not writable\");if(\"a\"===n&&!o)throw new TypeError(\"Private accessor was defined without a setter\");if(\"function\"==typeof e?t!==e||!o:!e.has(t))throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");return\"a\"===n?o.call(t,i):o?o.value=i:e.set(t,i),i},c=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldGet||function(t,e,i,n){if(\"a\"===i&&!n)throw new TypeError(\"Private accessor was defined without a getter\");if(\"function\"==typeof e?t!==e||!n:!e.has(t))throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");return\"m\"===i?n:\"a\"===i?n.call(t):n?n.value:e.get(t)};Object.defineProperty(i,\"__esModule\",{value:!0});var m=i.DefaultLayoutManager=void 0;const u=n;class p{constructor(t){a.set(this,void 0),l.set(this,new Map),d(this,a,t,\"f\")}size(){return c(this,l,\"f\").size}async applyLayoutSnapshot({layouts:t}){if(Object.keys(t).length>1)throw new Error(\"[LayoutManager] Tried to call applyLayoutSnapshot with more than 1 layout. When implementing multiple layouts via overridden LayoutManager class, you must override and fully implement the applyLayoutSnapshot method without calling super.applyLayoutSnapshot().\");const[[e,i]]=Object.entries(t);await p.createLayout(this,{layoutName:e,layout:i})}async showLayout({layoutName:t}){}async getLayoutSnapshot(){return{layouts:await(0,u.mapValuesAsync)((t=>t.getFrameSnapshot()),c(this,l,\"f\"))}}async removeLayout({layoutName:t}){}getLayoutIdentityForView(t){const e=[...c(this,l,\"f\").values()].find((e=>e.getCurrentViews().some((e=>e.name===t.name&&e.uuid===t.uuid))));return e?.identity??void 0}isLayoutVisible({layoutName:t}){return c(p,r,\"m\",h).call(p,this,t).isVisible()}resolveLayoutIdentity(t){if(t&&\"layoutName\"in t)return t;const e=[...c(this,l,\"f\").values()];if(1===e.length)return e[0].identity;const i=e.find((t=>t.isVisible()));return i?.identity??void 0}static async resolveLayout(t,e){const i=t.resolveLayoutIdentity(e);if(void 0===i||!(\"layoutName\"in i))throw new Error(\"[layout-manager] resolveLayout: Could not resolve the layout identity. Make sure you include 'layoutName' in the identity object.\");return c(p,r,\"m\",h).call(p,t,i.layoutName)}static async handleSharedView(t,e,i){await(0,u.mapValuesAsync)((async t=>{if(t.identity.layoutName!==e.layoutName){const e=t.getCurrentViews().find((t=>t.name===i.name));e&&await t.onViewDetached({viewIdentity:e,target:null}).catch(console.error)}}),c(t,l,\"f\"))}static async handleLastViewRemoved(t,e){await t.removeLayout(e),await c(t,a,\"f\").handleLastViewRemoved(t)}static async destroyLayout(t,{layoutName:e}){await c(p,r,\"m\",h).call(p,t,e).destroy(),c(t,l,\"f\").delete(e)}static async createLayout(t,e){const{layoutName:i}=e;if(c(t,l,\"f\").has(i))throw new Error(`Layout name ${i} already exists`);await c(t,a,\"f\").createLayout(e,t)}static registerLayout(t,e,i){c(t,l,\"f\").set(e,i)}static getAllLayouts(t){return[...c(t,l,\"f\").values()]}static setInitialSnapshot(t,e){c(t,a,\"f\").setInitialSnapshot(e)}static createClosedConstructor(...t){return class extends p{constructor(){super(...t)}}}}m=i.DefaultLayoutManager=p,r=p,a=new WeakMap,l=new WeakMap,h=function(t,e){const i=c(t,l,\"f\").get(e);if(!i)throw new Error(`[layout-manager] getLayoutByName: Could not locate layout with name '${e}'`);return i};var g={},f={},v={};Object.defineProperty(v,\"__esModule\",{value:!0}),v.ReversibleMap=void 0;v.ReversibleMap=class{constructor(){this.valueToKey=new Map,this.keyToValue=new Map,this.setUnique=(t,e)=>{if(this.hasKey(t)||this.hasValue(e))throw new Error(\"Key or value already in the map.\");this.keyToValue.set(t,e),this.valueToKey.set(e,t)},this.getKey=t=>{const e=this.valueToKey.get(t);if(!e)throw new Error(\"Value not found in the map.\");return e},this.deleteKey=t=>{const e=this.getValue(t);return this.keyToValue.delete(t),this.valueToKey.delete(e),e},this.deleteValue=t=>{const e=this.getKey(t);return this.keyToValue.delete(e),this.valueToKey.delete(t),e},this.hasKey=t=>this.keyToValue.has(t),this.hasValue=t=>this.valueToKey.has(t)}getValue(t){const e=this.keyToValue.get(t);if(!e)throw new Error(\"Key not found in the map.\");return e}},Object.defineProperty(f,\"__esModule\",{value:!0});var _=f.LayoutContentCache=void 0;const y=t.lazy,C=v;class w{constructor(){this.contentItemCache=new C.ReversibleMap,this.contentItemCacheId=0,this.createCacheKey=()=>{const t=`entity-${this.contentItemCacheId.toString()}`;return this.contentItemCacheId+=1,t},this.hasKey=t=>this.contentItemCache.hasKey(t),this.getItemOrUndefined=t=>{try{return this.getContentItemOrThrow(t)}catch(t){return}},this.getContentItemOrThrow=(t,e)=>{if(!this.contentItemCache.hasKey(t))throw new Error(\"Layout component has been destroyed or detached from the current layout.\");const i=this.contentItemCache.getValue(t);if(e&&!e.includes(i.type))throw new Error(`Layout item is not the expected type. Expected ${e.join(\", \")}, got ${i.type}.`);return i},this.getOrCreateEntityId=t=>{if(this.contentItemCache.hasValue(t))return this.contentItemCache.getKey(t);t.onDestroyed((()=>{this.contentItemCache.deleteValue(t)}));const e=this.createCacheKey();return this.contentItemCache.setUnique(e,t),e}}static getSingleInstance(){return w.singleton.getValue()}}_=f.LayoutContentCache=w,w.singleton=new y.Lazy((()=>new w));var I={},b={};!function(t){Object.defineProperty(t,\"__esModule\",{value:!0}),t.getAdjacentStacks=t.doShareEdge=t.getAdjacentItem=void 0;t.getAdjacentItem=(e,i)=>{const{parent:n}=e;if(e.isRoot()||!n)return;const o=[\"top\",\"bottom\"].includes(i)?\"column\":\"row\",s=[\"top\",\"left\"].includes(i)?-1:1;if(n.type===o){const t=n.contentItems.indexOf(e)+s;if(t>=0&&t{const n=t.getBounds(),o=e.getBounds();if(!n||!o)return!1;if([\"top\",\"bottom\"].includes(i)){return!(n.righto.right)}return!(n.bottomo.bottom)};t.getAdjacentStacks=(e,i)=>{const n=[\"top\",\"bottom\"].includes(i)?\"row\":\"column\",o=s=>\"stack\"===s.type?(0,t.doShareEdge)(e,s,i)?[s]:[]:\"root\"===s.type||\"ground\"===s.type?[]:s.type===n?s.contentItems.map((t=>o(t))).flat():s.type!==n?[\"top\",\"right\"].includes(i)?o(s.contentItems[s.contentItems.length-1]):o(s.contentItems[0]):[],s=(0,t.getAdjacentItem)(e,i);return s?o(s):[]}}(b);var S=t.commonjsGlobal&&t.commonjsGlobal.__decorate||function(t,e,i,n){var o,s=arguments.length,r=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if(\"object\"==typeof Reflect&&\"function\"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(s<3?o(r):s>3?o(e,i,r):o(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};Object.defineProperty(I,\"__esModule\",{value:!0}),I.LayoutEntitiesController=void 0;const E=t.decorators,x=b,L=i;class z{constructor(t,e,i){this.wire=t,this.layoutManager=e,this.layoutContentCache=i,this.analytics=t=>{this.wire.sendAction(`layout-controller-${t}`).catch((()=>{}))},this.getLayoutIdentityForViewOrThrow=async t=>{const e=this.layoutManager.getLayoutIdentityForView(t);if(!e)throw new Error(`View identity ${t.name} is not attached to any layouts.`);return e},this.getRoot=async t=>{this.analytics(\"get-root\");const e=(await this.getLayout(t)).getRoot();return{type:e.type,entityId:this.layoutContentCache.getOrCreateEntityId(e)}},this.getStackByView=async t=>{this.analytics(\"get-stack-by-view\");const e=await this.getLayoutIdentityForViewOrThrow(t),i=(await this.getLayout(e)).getStackByView(t);if(\"stack\"===i?.type)return{entityId:this.layoutContentCache.getOrCreateEntityId(i),type:\"stack\"}},this.getStackViews=t=>{this.analytics(\"get-stack-views\");return this.layoutContentCache.getContentItemOrThrow(t,[\"stack\"]).contentItems.map((t=>({name:t.viewName,uuid:this.wire.me.uuid})))},this.isRoot=t=>{this.analytics(\"is-root\");return this.layoutContentCache.getContentItemOrThrow(t).isRoot()},this.exists=t=>(this.analytics(\"exists\"),this.layoutContentCache.hasKey(t)),this.addViewToStack=async(t,e,{index:i}={index:0})=>{this.analytics(\"add-view-to-stack\");const n=this.layoutContentCache.getContentItemOrThrow(t);if(i&&i>n.contentItems.length+1)throw new Error(`Index '${i}' out of range, please exclude the index or specify a number between 0 and ${n.contentItems.length}`);const o={id:t,index:i},{identity:s}=await n.layout.platformCreateView(e,{location:o});return s},this.findViewInStack=(t,e)=>t.contentItems.find((t=>t.viewName===e.name)),this.removeViewFromStack=async(t,e)=>{this.analytics(\"remove-view-from-stack\");const i=this.layoutContentCache.getContentItemOrThrow(t,[\"stack\"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to remove a view ('${e.name}') which does not belong to the stack.`);await n.layout.platformCloseView(e)},this.createAdjacentStack=async(t,e,{position:i=\"right\"}={})=>{if(this.analytics(\"create-adjacent-stack\"),!Array.isArray(e)||0===e.length)throw new Error('The parameter \"views\" must be an array with at least 1 element.');if(![\"top\",\"bottom\",\"left\",\"right\"].includes(i))throw new Error(`Invalid position '${i}' specified.`);const n=this.layoutContentCache.getContentItemOrThrow(t).createAdjacentStack({position:i}),o=this.layoutContentCache.getOrCreateEntityId(n);return await Promise.all(e.reverse().map((t=>this.addViewToStack(o,t)))),o},this.getAdjacentStacks=async({targetId:t,edge:e})=>{this.analytics(\"get-adjacent-stacks\");const i=this.layoutContentCache.getContentItemOrThrow(t);return(0,x.getAdjacentStacks)(i,e).map((t=>({entityId:this.layoutContentCache.getOrCreateEntityId(t)})))},this.setStackActiveView=async(t,e)=>{this.analytics(\"set-stack-active-view\");const i=this.layoutContentCache.getContentItemOrThrow(t,[\"stack\"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to set a view ('${e.name}') as active when it does not belong to the stack.`);i.setActiveContentItem(n,!0)}}async getLayout(t){const e=await L.DefaultLayoutManager.resolveLayout(this.layoutManager,t);if(!e)throw new Error(`Could not resolve target layout identity ${JSON.stringify(t)}`);return e}getContent(t){this.analytics(\"get-content\");return this.layoutContentCache.getContentItemOrThrow(t,[\"column\",\"row\"]).contentItems.map((t=>({type:t.type,entityId:this.layoutContentCache.getOrCreateEntityId(t)})))}getParent(t){this.analytics(\"get-parent\");const e=this.layoutContentCache.getContentItemOrThrow(t);if(!e.isRoot())return e.parent?.contentItems.includes(e)?{type:e.parent.type,entityId:this.layoutContentCache.getOrCreateEntityId(e.parent)}:void 0}}S([(0,E.expose)()],z.prototype,\"getLayoutIdentityForViewOrThrow\",void 0),S([(0,E.expose)()],z.prototype,\"getRoot\",void 0),S([(0,E.expose)()],z.prototype,\"getStackByView\",void 0),S([(0,E.expose)()],z.prototype,\"getStackViews\",void 0),S([(0,E.expose)()],z.prototype,\"getContent\",null),S([(0,E.expose)()],z.prototype,\"getParent\",null),S([(0,E.expose)()],z.prototype,\"isRoot\",void 0),S([(0,E.expose)()],z.prototype,\"exists\",void 0),S([(0,E.expose)()],z.prototype,\"addViewToStack\",void 0),S([(0,E.expose)()],z.prototype,\"removeViewFromStack\",void 0),S([(0,E.expose)()],z.prototype,\"createAdjacentStack\",void 0),S([(0,E.expose)()],z.prototype,\"getAdjacentStacks\",void 0),S([(0,E.expose)()],z.prototype,\"setStackActiveView\",void 0),I.LayoutEntitiesController=z,Object.defineProperty(g,\"__esModule\",{value:!0});var M=g.initLayoutEndpoints=void 0;const P=t.apiExposer,T=t.layout_constants,A=f,k=I,D=i;M=g.initLayoutEndpoints=async function(t,e){const i=t.getFin(),n=await i.Platform.getCurrentSync().getClient(),o=new P.ChannelsExposer(n);await new P.ApiExposer(o).exposeInstance(new k.LayoutEntitiesController(t,e,A.LayoutContentCache.getSingleInstance()),{id:T.LAYOUT_CONTROLLER_ID}),await async function(t,e){const i=t=>async i=>{const n=await D.DefaultLayoutManager.resolveLayout(e,i.target);if(!n)throw new Error(`Could not resolve the layout target from payload ${JSON.stringify(i)}`);return t(n,i)},n=(e,n)=>{t.register(e,i(n))},o=(t,e)=>{n(t,e)};n(\"replace-view\",((t,e)=>t.replaceView(e))),n(\"replace-layout\",((t,{layout:e})=>t.replaceLayout(e))),n(\"add-view\",((t,e)=>t.insertView(e))),o(\"layout-add-view\",((t,{viewOptions:e,location:i,targetView:n})=>t.platformCreateView(e,{location:i,targetView:n}))),n(\"close-view\",((t,e)=>t.cleanupView(e.viewIdentity))),o(\"layout-close-view\",((t,e)=>t.platformCloseView(e.viewIdentity))),n(\"apply-preset-layout\",((t,e)=>t.applyPreset(e))),n(\"get-layout-views\",(t=>t.getCurrentViews())),n(\"get-frame-snapshot\",(t=>t.getFrameSnapshot())),n(\"is-visible\",(t=>t.isVisible())),n(\"destroy\",(t=>t.destroy())),t.register(\"get-layout-snapshot\",(()=>e.getLayoutSnapshot()))}(n,e)};var R={};Object.defineProperty(R,\"__esModule\",{value:!0});var U=R.BaseLayout=void 0;U=R.BaseLayout=class{};var O={};Object.defineProperty(O,\"__esModule\",{value:!0});var V=O.DOMEmitter=void 0;V=O.DOMEmitter=class{constructor(t){this.container=t}dispatchLocalEvent(t,e){const i={...e,type:t,tabSelector:`tab-${e.name}`,containerSelector:`container-${e.name}`,topic:\"openfin-DOM-event\"};this.container.dispatchEvent(new CustomEvent(t,{detail:i}))}};var B={};Object.defineProperty(B,\"__esModule\",{value:!0});var H=B.mapLayoutContentItemsImmutableSync=B.mapLayoutContentItemsImmutable=W=B.isVisible=void 0;var W=B.isVisible=t=>(0!==t.offsetWidth||0!==t.offsetHeight)&&\"hidden\"!==window.getComputedStyle(t).visibility&&t.offsetTop>=0&&t.offsetLeft>=0&&t.offsetTop<=window.innerHeight&&t.offsetLeft<=window.innerWidth;const F=t=>\"type\"in t&&\"component\"===t.type;B.mapLayoutContentItemsImmutable=async function t(e,i){return F(i)?e(i):{...i,content:await Promise.all(i.content?.map((i=>t(e,i))))}},H=B.mapLayoutContentItemsImmutableSync=function t(e,i){return F(i)?e(i):{...i,content:i.content?.map((i=>t(e,i)))}};class N extends Error{constructor(t,e){super(e),this.type=t}}class G extends N{constructor(t,e){super(\"Configuration\",t),this.node=e}}class j extends N{constructor(t){super(\"PopoutBlocked\",t)}}class $ extends N{constructor(t){super(\"API\",t)}}class Z extends N{constructor(t){super(\"Bind\",t)}}class q extends Error{constructor(t,e,i){super(`${t}: ${e}${void 0===i?\"\":\": \"+i}`)}}class X extends q{constructor(t,e){super(\"Assert\",t,e)}}class Y extends q{constructor(t,e,i){super(\"UnreachableCase\",t,`${e}${void 0===i?\"\":\": \"+i}`)}}class K extends q{constructor(t,e){super(\"UnexpectedNull\",t,e)}}class J extends q{constructor(t,e){super(\"UnexpectedUndefined\",t,e)}}var Q;!function(t){let e=!1;const i={PopoutCannotBeCreatedWithGroundItemConfig:{id:0,default:\"Popout cannot be created with ground ItemConfig\"},PleaseRegisterAConstructorFunction:{id:1,default:\"Please register a constructor function\"},ComponentTypeNotRegisteredAndBindComponentEventHandlerNotAssigned:{id:2,default:\"Component type not registered and BindComponentEvent handler not assigned\"},ComponentIsAlreadyRegistered:{id:3,default:\"Component is already registered\"},ComponentIsNotVirtuable:{id:4,default:\"Component is not virtuable. Requires rootHtmlElement field/getter\"},VirtualComponentDoesNotHaveRootHtmlElement:{id:5,default:'Virtual component does not have getter \"rootHtmlElement\"'},ItemConfigIsNotTypeComponent:{id:6,default:\"ItemConfig is not of type component\"},InvalidNumberPartInSizeString:{id:7,default:\"Invalid number part in size string\"},UnknownUnitInSizeString:{id:8,default:\"Unknown unit in size string\"},UnsupportedUnitInSizeString:{id:9,default:\"Unsupported unit in size string\"}};t.idCount=Object.keys(i).length;const n=Object.values(i);t.checkInitialise=function(){if(!e)for(let e=0;e=\"0\"&&t<=\"9\"}function Tt(t,e){const i=zt(e);t.style.width=i}function At(t,e){const i=zt(e);t.style.height=i}function kt(t){return{width:t.offsetWidth,height:t.offsetHeight}}function Dt(t,e){t.style.display=e?\"\":\"none\"}function Rt(t,e){if(void 0!==e)for(const i in e)if(e.hasOwnProperty(i)){const n=e[i],o=t[i];t[i]=Ut(o,n)}return t}function Ut(t,e){if(\"object\"!=typeof e)return e;if(Array.isArray(e)){const t=e.length,i=new Array(t);for(let n=0;n36)throw new Error(\"Too many keys in config minifier map\")},t.translateObject=n}(dt||(dt={})),function(t){t.defaults={type:at.ground,content:[],size:1,sizeUnit:ht.Fractional,minSize:void 0,minSizeUnit:ht.Pixel,id:\"\",isClosable:!0},t.createCopy=function(t,e){switch(t.type){case at.ground:case at.row:case at.column:return gt.createCopy(t,e);case at.stack:return ut.createCopy(t,e);case at.component:return pt.createCopy(t);default:throw new Y(\"CICC91354\",t.type,\"Invalid Config Item type specified\")}},t.createDefault=function(t){switch(t){case at.ground:throw new X(\"CICCDR91562\");case at.row:case at.column:return gt.createDefault(t);case at.stack:return ut.createDefault();case at.component:return pt.createDefault();default:throw new Y(\"CICCDD91563\",t,\"Invalid Config Item type specified\")}},t.isComponentItem=function(t){return t.type===at.component},t.isStackItem=function(t){return t.type===at.stack},t.isGroundItem=function(t){return t.type===at.ground}}(ct||(ct={})),function(t){t.defaultMaximised=!1,function(t){t.createCopy=function(t,e){return void 0===t?void 0:{show:null!=e?e:t.show,popout:t.popout,close:t.close,maximise:t.maximise,minimise:t.minimise,tabDropdown:t.tabDropdown}}}(t.Header||(t.Header={}))}(mt||(mt={})),function(t){function e(t){const e=t.length,i=new Array(e);for(let n=0;n\"__glMaximised\"===t));t>0&&(o=!0,n=n.splice(t,1)),e=n.length>0?n[0]:ct.defaults.id}else e=n;return i=void 0!==t.maximised?t.maximised:o,{id:e,maximised:i}}}(wt||(wt={})),function(t){function e(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0;return{resolved:!0,root:Et.resolve(i),openPopouts:t.resolveOpenPopouts(e.openPopouts),dimensions:t.Dimensions.resolve(e.dimensions),settings:t.Settings.resolve(e.settings),header:t.Header.resolve(e.header,e.settings,e.labels)}}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:Lt.fromResolvedArray(e.openPopouts),settings:_t.Settings.createCopy(e.settings),dimensions:t.Dimensions.fromResolved(e.dimensions),header:_t.Header.createCopy(e.header)}},t.isResolved=function(t){const e=t;return void 0!==e.resolved&&!0===e.resolved},t.resolveOpenPopouts=function(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0,{root:Et.resolve(o),openPopouts:xt.resolveOpenPopouts(e.openPopouts),dimensions:xt.Dimensions.resolve(e.dimensions),settings:xt.Settings.resolve(e.settings),header:xt.Header.resolve(e.header,e.settings,e.labels),parentId:null!==(i=e.parentId)&&void 0!==i?i:null,indexInParent:null!==(n=e.indexInParent)&&void 0!==n?n:null,window:t.Window.resolve(e.window,e.dimensions),resolved:!0}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:i(e.openPopouts),dimensions:xt.Dimensions.fromResolved(e.dimensions),settings:_t.Settings.createCopy(e.settings),header:_t.Header.createCopy(e.header),parentId:e.parentId,indexInParent:e.indexInParent,window:t.Window.fromResolved(e.window)}},t.fromResolvedArray=i}(Lt||(Lt={}));class Wt{constructor(){this._allEventSubscriptions=[],this._subscriptionsMap=new Map,this.unbind=this.removeEventListener,this.trigger=this.emit}tryBubbleEvent(t,e){}emit(t,...e){let i=this._subscriptionsMap.get(t);if(void 0!==i){i=i.slice();for(let t=0;t0){const n=e.slice();n.unshift(t);const o=this._allEventSubscriptions.slice();for(let t=0;t0?n.contentItems[0]:n,e=0);const o=this._layoutManager.createAndInitContentItem(i,t);t.addChild(o,e),this._layoutManager.layoutConfig.settings.popInOnClose?this._onClose():this.close()}createWindow(){const t=this.createUrl(),e=Math.floor(1e6*Math.random()).toString(36),i=this.serializeWindowFeatures({width:this._initialWindowSize.width,height:this._initialWindowSize.height,innerWidth:this._initialWindowSize.width,innerHeight:this._initialWindowSize.height,menubar:\"no\",toolbar:\"no\",location:\"no\",personalbar:\"no\",resizable:\"yes\",scrollbars:\"no\",status:\"no\"});if(this._popoutWindow=globalThis.open(t,e,i),this._popoutWindow)this._popoutWindow.addEventListener(\"load\",(()=>this.positionWindow()),{passive:!0}),this._popoutWindow.addEventListener(\"beforeunload\",(()=>{this._layoutManager.layoutConfig.settings.popInOnClose?this.popIn():this._onClose()}),{passive:!0}),this._checkReadyInterval=setInterval((()=>this.checkReady()),10);else if(!0===this._layoutManager.layoutConfig.settings.blockedPopoutsThrowError){throw new j(\"Popout blocked\")}}checkReady(){if(null===this._popoutWindow)throw new K(\"BPCR01844\");this._popoutWindow.__glInstance&&this._popoutWindow.__glInstance.isInitialised&&(this.onInitialised(),void 0!==this._checkReadyInterval&&(clearInterval(this._checkReadyInterval),this._checkReadyInterval=void 0))}serializeWindowFeatures(t){const e=[];for(const i in t)e.push(i+\"=\"+t[i].toString());return e.join(\",\")}createUrl(){const t=\"gl-window-config-\"+Ot(),e=_t.minifyConfig(this._config);try{localStorage.setItem(t,JSON.stringify(e))}catch(t){throw new Error(\"Error while writing to localStorage \"+function(t){return t instanceof Error?t.message:\"string\"==typeof t?t:\"Unknown Error\"}(t))}const i=new URL(location.href);return i.searchParams.set(\"gl-window\",t),i.toString()}positionWindow(){if(null===this._popoutWindow)throw new Error(\"BrowserPopout.positionWindow: null popoutWindow\");this._popoutWindow.moveTo(this._initialWindowSize.left,this._initialWindowSize.top),this._popoutWindow.focus()}onInitialised(){this._isInitialised=!0,this.getGlInstance().on(\"popIn\",(()=>this.popIn())),this.emit(\"initialised\")}_onClose(){setTimeout((()=>this.emit(\"closed\")),50)}}class Gt extends Wt{constructor(t,e,i,n){super(),this.layoutManager=t,this._parent=i,this._element=n,this._popInParentIds=[],this._type=e.type,this._id=e.id,this._isInitialised=!1,this.isGround=!1,this.isRow=!1,this.isColumn=!1,this.isStack=!1,this.isComponent=!1,this.size=e.size,this.sizeUnit=e.sizeUnit,this.minSize=e.minSize,this.minSizeUnit=e.minSizeUnit,this._isClosable=e.isClosable,this._pendingEventPropagations={},this._throttledEvents=[\"stateChanged\"],this._contentItems=this.createContentItems(e.content)}get type(){return this._type}get id(){return this._id}set id(t){this._id=t}get popInParentIds(){return this._popInParentIds}get parent(){return this._parent}get contentItems(){return this._contentItems}get isClosable(){return this._isClosable}get element(){return this._element}get isInitialised(){return this._isInitialised}static isStack(t){return t.isStack}static isComponentItem(t){return t.isComponent}static isComponentParentableItem(t){return t.isStack||t.isGround}removeChild(t,e=!1){const i=this._contentItems.indexOf(t);if(-1===i)throw new Error(\"Can't remove child item. Unknown content item\");if(e||this._contentItems[i].destroy(),this._contentItems.splice(i,1),this._contentItems.length>0)this.updateSize(!1);else if(!this.isGround&&!0===this._isClosable){if(null===this._parent)throw new K(\"CIUC00874\");this._parent.removeChild(this)}}addChild(t,e,i){return null!=e||(e=this._contentItems.length),this._contentItems.splice(e,0,t),t.setParent(this),!0===this._isInitialised&&!1===t._isInitialised&&t.init(),e}replaceChild(t,e,i=!1){const n=this._contentItems.indexOf(t),o=t._element.parentNode;if(-1===n)throw new X(\"CIRCI23232\",\"Can't replace child. oldChild is not child of this\");if(null===o)throw new K(\"CIRCP23232\");if(o.replaceChild(e._element,t._element),!0===i&&(t._parent=null,t.destroy()),this._contentItems[n]=e,e.setParent(this),e.size=t.size,e.sizeUnit=t.sizeUnit,e.minSize=t.minSize,e.minSizeUnit=t.minSizeUnit,null===e._parent)throw new K(\"CIRCNC45699\");!0===e._parent._isInitialised&&!1===e._isInitialised&&e.init(),this.updateSize(!1)}remove(){if(null===this._parent)throw new K(\"CIR11110\");this._parent.removeChild(this)}popout(){const t=Ot(),e=this.layoutManager.createPopoutFromContentItem(this,void 0,t,void 0);return this.emitBaseBubblingEvent(\"stateChanged\"),e}calculateConfigContent(){const t=this._contentItems,e=t.length,i=new Array(e);for(let n=0;nthis.propagateEventToLayoutManager(t,e))))}propagateEventToLayoutManager(t,e){this._pendingEventPropagations[t]=!1,this.layoutManager.emitUnknown(t,e)}}class jt extends Gt{constructor(t,e,i){super(t,e,i,document.createElement(\"div\")),this._parentItem=i,this._focused=!1,this.isComponent=!0,this._reorderEnabled=e.reorderEnabled,this.applyUpdatableConfig(e),this._initialWantMaximise=e.maximised;const n=document.createElement(\"div\");n.classList.add(\"lm_content\"),this.element.appendChild(n),this._container=new Ft(e,this,t,n,(t=>this.handleUpdateItemConfigEvent(t)),(()=>this.show()),(()=>this.hide()),(t=>this.focus(t)),(t=>this.blur(t)))}get componentName(){return this._container.componentType}get componentType(){return this._container.componentType}get reorderEnabled(){return this._reorderEnabled}get initialWantMaximise(){return this._initialWantMaximise}get component(){return this._container.component}get container(){return this._container}get parentItem(){return this._parentItem}get headerConfig(){return this._headerConfig}get title(){return this._title}get tab(){return this._tab}get focused(){return this._focused}destroy(){this._container.destroy(),super.destroy()}applyUpdatableConfig(t){this.setTitle(t.title),this._headerConfig=t.header}toConfig(){const t=this._container.stateRequestEvent,e=void 0===t?this._container.state:t();return{type:at.component,content:[],size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,maximised:!1,isClosable:this.isClosable,reorderEnabled:this._reorderEnabled,title:this._title,header:mt.Header.createCopy(this._headerConfig),componentType:pt.copyComponentType(this.componentType),componentState:e}}close(){if(null===this.parent)throw new K(\"CIC68883\");this.parent.removeChild(this,!1)}enterDragMode(t,e){Tt(this.element,t),At(this.element,e),this._container.enterDragMode(t,e)}exitDragMode(){this._container.exitDragMode()}enterStackMaximised(){this._container.enterStackMaximised()}exitStackMaximised(){this._container.exitStackMaximised()}drag(){this._container.drag()}updateSize(t){this.updateNodeSize(t)}init(){this.updateNodeSize(!1),super.init(),this._container.emit(\"open\"),this.initContentItems()}setTitle(t){this._title=t,this.emit(\"titleChanged\",t),this.emit(\"stateChanged\")}setTab(t){this._tab=t,this.emit(\"tab\",t),this._container.setTab(t)}hide(){super.hide(),this._container.setVisibility(!1)}show(){super.show(),this._container.setVisibility(!0)}focus(t=!1){this.parentItem.setActiveComponentItem(this,!0,t)}setFocused(t){this._focused=!0,this.tab.setFocused(),t||this.emitBaseBubblingEvent(\"focus\")}blur(t=!1){this._focused&&this.layoutManager.setFocusedComponentItem(void 0,t)}setBlurred(t){this._focused=!1,this.tab.setBlurred(),t||this.emitBaseBubblingEvent(\"blur\")}setParent(t){this._parentItem=t,super.setParent(t)}handleUpdateItemConfigEvent(t){this.applyUpdatableConfig(t)}updateNodeSize(t){if(\"none\"!==this.element.style.display){const{width:e,height:i}=kt(this.element);this._container.setSizeToNodeSize(e,i,t)}}}class $t extends Gt{constructor(){super(...arguments),this._focused=!1}get focused(){return this._focused}setFocusedValue(t){this._focused=t}}class Zt extends Wt{constructor(t,e){super(),this._eElement=t,this._pointerTracking=!1,this._pointerDownEventListener=t=>this.onPointerDown(t),this._pointerMoveEventListener=t=>this.onPointerMove(t),this._pointerUpEventListener=t=>this.onPointerUp(t),this._timeout=void 0,this._allowableTargets=[t,...e],this._oDocument=document,this._eBody=document.body,this._nDelay=1800,this._nDistance=10,this._nX=0,this._nY=0,this._nOriginalX=0,this._nOriginalY=0,this._dragging=!1,this._eElement.addEventListener(\"pointerdown\",this._pointerDownEventListener,{passive:!0})}destroy(){this.checkRemovePointerTrackingEventListeners(),this._eElement.removeEventListener(\"pointerdown\",this._pointerDownEventListener)}cancelDrag(){this.processDragStop(void 0)}onPointerDown(t){if(this._allowableTargets.includes(t.target)&&t.isPrimary){const e=this.getPointerCoordinates(t);this.processPointerDown(e)}}processPointerDown(t){this._nOriginalX=t.x,this._nOriginalY=t.y,this._oDocument.addEventListener(\"pointermove\",this._pointerMoveEventListener),this._oDocument.addEventListener(\"pointerup\",this._pointerUpEventListener,{passive:!0}),this._pointerTracking=!0,this._timeout=setTimeout((()=>{try{this.startDrag()}catch(t){throw console.error(t),t}}),this._nDelay)}onPointerMove(t){this._pointerTracking&&(this.processDragMove(t),t.preventDefault())}processDragMove(t){this._nX=t.pageX-this._nOriginalX,this._nY=t.pageY-this._nOriginalY,!1===this._dragging&&(Math.abs(this._nX)>this._nDistance||Math.abs(this._nY)>this._nDistance)&&this.startDrag(),this._dragging&&this.emit(\"drag\",this._nX,this._nY,t)}onPointerUp(t){this.processDragStop(t)}processDragStop(t){var e;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this.checkRemovePointerTrackingEventListeners(),!0===this._dragging&&(this._eBody.classList.remove(\"lm_dragging\"),this._eElement.classList.remove(\"lm_dragging\"),null===(e=this._oDocument.querySelector(\"iframe\"))||void 0===e||e.style.setProperty(\"pointer-events\",\"\"),this._dragging=!1,this.emit(\"dragStop\",t))}checkRemovePointerTrackingEventListeners(){this._pointerTracking&&(this._oDocument.removeEventListener(\"pointermove\",this._pointerMoveEventListener),this._oDocument.removeEventListener(\"pointerup\",this._pointerUpEventListener),this._pointerTracking=!1)}startDrag(){var t;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this._dragging=!0,this._eBody.classList.add(\"lm_dragging\"),this._eElement.classList.add(\"lm_dragging\"),null===(t=this._oDocument.querySelector(\"iframe\"))||void 0===t||t.style.setProperty(\"pointer-events\",\"none\"),this.emit(\"dragStart\",this._nOriginalX,this._nOriginalY)}getPointerCoordinates(t){return{x:t.pageX,y:t.pageY}}}class qt{constructor(t,e,i){this._isVertical=t,this._size=e,this._grabSize=i0){const i=this.createSplitter(Math.max(0,e-1)).element;e>0?(this.contentItems[e-1].element.insertAdjacentElement(\"afterend\",i),i.insertAdjacentElement(\"afterend\",t.element)):(this.contentItems[0].element.insertAdjacentElement(\"beforebegin\",i),i.insertAdjacentElement(\"beforebegin\",t.element))}else this._childElementContainer.appendChild(t.element);super.addChild(t,e);const n=1/this.contentItems.length*100;if(!0===i)return this.emitBaseBubblingEvent(\"stateChanged\"),e;for(let e=0;e0&&(this.calculateRelativeSizes(),this.setAbsoluteSizes()),this.emitBaseBubblingEvent(\"stateChanged\"),this.emit(\"resize\")}setAbsoluteSizes(){const t=this.calculateAbsoluteSizes();for(let e=0;e0&&t.itemSizes[e]++,this._isColumn?(Tt(this.contentItems[e].element,t.crossAxisSize),At(this.contentItems[e].element,t.itemSizes[e])):(Tt(this.contentItems[e].element,t.itemSizes[e]),At(this.contentItems[e].element,t.crossAxisSize))}calculateAbsoluteSizes(){const t=(this.contentItems.length-1)*this._splitterSize,{width:e,height:i}=kt(this.element);let n,o;this._isColumn?(n=i-t,o=e):(n=e-t,o=i);let s=0;const r=[];for(let t=0;t0){const n=100-t;for(let t=0;t100&&e.length>0){for(let t=0;te)return;{const r=i/e;let a=i;for(let e=0;ethis.onSplitterDrag(e,t,i))),e.on(\"dragStop\",(()=>this.onSplitterDragStop(e))),e.on(\"dragStart\",(()=>this.onSplitterDragStart(e))),this._splitter.splice(t,0,e),e}getSplitItems(t){const e=this._splitter.indexOf(t);return{before:this.contentItems[e],after:this.contentItems[e+1]}}calculateContentItemMinSize(t){const e=t.minSize;if(void 0!==e){if(t.minSizeUnit===ht.Pixel)return e;throw new X(\"ROCGMD98831\",JSON.stringify(t))}{const t=this.layoutManager.layoutConfig.dimensions;return this._isColumn?t.defaultMinItemHeight:t.defaultMinItemWidth}}calculateContentItemsTotalMinSize(t){let e=0;for(const i of t)e+=this.calculateContentItemMinSize(i);return e}onSplitterDragStart(t){const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=this.calculateContentItemsTotalMinSize(e.before.contentItems),s=this.calculateContentItemsTotalMinSize(e.after.contentItems);this._splitterPosition=0,this._splitterMinPosition=-1*(i-o),this._splitterMaxPosition=n-s}onSplitterDrag(t,e,i){let n=this._isColumn?i:e;if(null===this._splitterMinPosition||null===this._splitterMaxPosition)throw new K(\"ROCOSD59226\");n=Math.max(n,this._splitterMinPosition),n=Math.min(n,this._splitterMaxPosition),this._splitterPosition=n;const o=zt(n);this._isColumn?t.element.style.top=o:t.element.style.left=o}onSplitterDragStop(t){if(null===this._splitterPosition)throw new K(\"ROCOSDS66932\");{const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=(this._splitterPosition+i)/(i+n),s=e.before.size+e.after.size;e.before.size=o*s,e.after.size=(1-o)*s,t.element.style.top=zt(0),t.element.style.left=zt(0),globalThis.requestAnimationFrame((()=>this.updateSize(!1)))}}}!function(t){t.getElementDimensionSize=function(t,e){return\"width\"===e?function(t){return t.offsetWidth}(t):function(t){return t.offsetHeight}(t)},t.setElementDimensionSize=function(t,e,i){return\"width\"===e?Tt(t,i):At(t,i)},t.createElement=function(t,e){const i=t.createElement(\"div\");return i.classList.add(\"lm_item\"),e?i.classList.add(\"lm_column\"):i.classList.add(\"lm_row\"),i}}(Xt||(Xt={}));class Yt extends $t{constructor(t,e,i){super(t,vt.create(e),null,Yt.createElement(document)),this.isGround=!0,this._childElementContainer=this.element,this._containerElement=i;let n=null;for(;;){const t=n?n.previousSibling:this._containerElement.lastChild;if(!(t instanceof Element&&t.classList.contains(\"lm_content\")))break;n=t}this._containerElement.insertBefore(this.element,n)}init(){if(!0!==this.isInitialised){this.updateNodeSize();for(let t=0;t0?this.contentItems[0]:this,n.isComponent)throw new Error(\"Cannot add item as child to ComponentItem\");{const t=this.layoutManager.createAndInitContentItem(i,n);return e=n.addChild(t,e),n===this?-1:e}}loadComponentAsRoot(t){this.clearRoot();const e=Ct.resolve(t,!1);if(e.maximised)throw new Error(\"Root Component cannot be maximised\");{const t=new jt(this.layoutManager,e,this);t.init(),this.addChild(t,0)}}addChild(t,e){if(this.contentItems.length>0)throw new Error(\"Ground node can only have a single child\");return this._childElementContainer.appendChild(t.element),e=super.addChild(t,e),this.updateSize(!1),this.emitBaseBubblingEvent(\"stateChanged\"),e}calculateConfigContent(){const t=this.contentItems,e=t.length,i=new Array(e);for(let n=0;n0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e)),this.updateContentItemsSize(!1))}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}createSideAreas(){const t=Yt.Area.oppositeSides,e=new Array(Object.keys(t).length);let i=0;for(const n in t){const o=n,s=this.getElementArea();if(null===s)throw new K(\"RCSA77553\");s.side=o,\"2\"===t[o][1]?s[o]=s[t[o]]-50:s[o]=s[t[o]]+50,s.surface=(s.x2-s.x1)*(s.y2-s.y1),e[i++]=s}return e}highlightDropZone(t,e,i){this.layoutManager.tabDropPlaceholder.remove(),super.highlightDropZone(t,e,i)}onDrop(t,e){if(t.isComponent){const e=ut.createDefault(),i=t;e.header=mt.Header.createCopy(i.headerConfig);const n=this.layoutManager.createAndInitContentItem(e,this);n.addChild(t),t=n}if(0===this.contentItems.length)this.addChild(t);else{if(t.type===at.row||t.type===at.column){const e=ut.createDefault(),i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}const i=\"x\"==e.side[0]?at.row:at.column,n=\"2\"==e.side[1],o=this.contentItems[0];if(o instanceof Xt&&o.type===i){const e=o.contentItems[n?0:o.contentItems.length-1];o.addChild(t,n?0:void 0,!0),e.size*=.5,t.size=e.size,t.sizeUnit=ht.Percent,o.updateSize(!1)}else{const e=ct.createDefault(i),s=this.layoutManager.createContentItem(e,this);this.replaceChild(o,s),s.addChild(t,n?0:void 0,!0),s.addChild(o,n?void 0:0,!0),o.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}}dock(){throw new X(\"GID87731\")}validateDocking(){throw new X(\"GIVD87732\")}getAllContentItems(){const t=[this];return this.deepGetAllContentItems(this.contentItems,t),t}getConfigMaximisedItems(){const t=[];return this.deepFilterContentItems(this.contentItems,t,(t=>!(!Gt.isStack(t)||!t.initialWantMaximise)||!(!Gt.isComponentItem(t)||!t.initialWantMaximise))),t}getItemsByPopInParentId(t){const e=[];return this.deepFilterContentItems(this.contentItems,e,(e=>e.popInParentIds.includes(t))),e}toConfig(){throw new Error(\"Cannot generate GroundItem config\")}setActiveComponentItem(t,e,i){}updateNodeSize(){const{width:t,height:e}=kt(this._containerElement);Tt(this.element,t),At(this.element,e),this.contentItems.length>0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e))}deepGetAllContentItems(t,e){for(let i=0;ithis.onClick(t),this._touchStartEventListener=t=>this.onTouchStart(t),this._element=document.createElement(\"div\"),this._element.classList.add(i),this._element.title=e,this._header.on(\"destroy\",(()=>this.destroy())),this._element.addEventListener(\"click\",this._clickEventListener,{passive:!0}),this._element.addEventListener(\"touchstart\",this._touchStartEventListener,{passive:!0}),this._header.controlsContainerElement.appendChild(this._element)}get element(){return this._element}destroy(){var t;this._element.removeEventListener(\"click\",this._clickEventListener),this._element.removeEventListener(\"touchstart\",this._touchStartEventListener),null===(t=this._element.parentNode)||void 0===t||t.removeChild(this._element)}onClick(t){this._pushEvent(t)}onTouchStart(t){this._pushEvent(t)}}class Jt{constructor(t,e,i,n,o){var s;this._layoutManager=t,this._componentItem=e,this._closeEvent=i,this._focusEvent=n,this._dragStartEvent=o,this._isActive=!1,this._tabClickListener=t=>this.onTabClickDown(t),this._tabTouchStartListener=t=>this.onTabTouchStart(t),this._closeClickListener=()=>this.onCloseClick(),this._closeTouchStartListener=()=>this.onCloseTouchStart(),this._dragStartListener=(t,e)=>this.onDragStart(t,e),this._contentItemDestroyListener=()=>this.onContentItemDestroy(),this._tabTitleChangedListener=t=>this.setTitle(t),this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_tab\"),this._titleElement=document.createElement(\"span\"),this._titleElement.classList.add(\"lm_title\"),this._closeElement=document.createElement(\"div\"),this._closeElement.classList.add(\"lm_close_tab\"),this._element.appendChild(this._titleElement),this._element.appendChild(this._closeElement),e.isClosable?this._closeElement.style.display=\"\":this._closeElement.style.display=\"none\",this.setTitle(e.title),this._componentItem.on(\"titleChanged\",this._tabTitleChangedListener);(null!==(s=e.reorderEnabled)&&void 0!==s?s:this._layoutManager.layoutConfig.settings.reorderEnabled)&&this.enableReorder(),this._element.addEventListener(\"click\",this._tabClickListener,{passive:!0}),this._element.addEventListener(\"touchstart\",this._tabTouchStartListener,{passive:!0}),this._componentItem.isClosable?(this._closeElement.addEventListener(\"click\",this._closeClickListener,{passive:!0}),this._closeElement.addEventListener(\"touchstart\",this._closeTouchStartListener,{passive:!0})):(this._closeElement.remove(),this._closeElement=void 0),this._componentItem.setTab(this),this._layoutManager.emit(\"tabCreated\",this)}get isActive(){return this._isActive}get componentItem(){return this._componentItem}get contentItem(){return this._componentItem}get element(){return this._element}get titleElement(){return this._titleElement}get closeElement(){return this._closeElement}get reorderEnabled(){return void 0!==this._dragListener}set reorderEnabled(t){t!==this.reorderEnabled&&(t?this.enableReorder():this.disableReorder())}setTitle(t){this._titleElement.innerText=t,this._element.title=t}setActive(t){t!==this._isActive&&(this._isActive=t,t?this._element.classList.add(\"lm_active\"):this._element.classList.remove(\"lm_active\"))}destroy(){var t,e;this._closeEvent=void 0,this._focusEvent=void 0,this._dragStartEvent=void 0,this._element.removeEventListener(\"click\",this._tabClickListener),this._element.removeEventListener(\"touchstart\",this._tabTouchStartListener),null===(t=this._closeElement)||void 0===t||t.removeEventListener(\"click\",this._closeClickListener),null===(e=this._closeElement)||void 0===e||e.removeEventListener(\"touchstart\",this._closeTouchStartListener),this._componentItem.off(\"titleChanged\",this._tabTitleChangedListener),this.reorderEnabled&&this.disableReorder(),this._element.remove()}setBlurred(){this._element.classList.remove(\"lm_focused\"),this._titleElement.classList.remove(\"lm_focused\")}setFocused(){this._element.classList.add(\"lm_focused\"),this._titleElement.classList.add(\"lm_focused\")}onDragStart(t,e){if(void 0===this._dragListener)throw new J(\"TODSDLU10093\");if(void 0===this._dragStartEvent)throw new J(\"TODS23309\");this._dragStartEvent(t,e,this._dragListener,this.componentItem)}onContentItemDestroy(){void 0!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=void 0)}onTabClickDown(t){const e=t.target;e!==this._element&&e!==this._titleElement||(0===t.button?this.notifyFocus():1===t.button&&this._componentItem.isClosable&&this.notifyClose())}onTabTouchStart(t){t.target===this._element&&this.notifyFocus()}onCloseClick(){this.notifyClose()}onCloseTouchStart(){this.notifyClose()}notifyClose(){if(void 0===this._closeEvent)throw new J(\"TNC15007\");this._closeEvent(this._componentItem)}notifyFocus(){if(void 0===this._focusEvent)throw new J(\"TNA15007\");this._focusEvent(this._componentItem)}enableReorder(){this._dragListener=new Zt(this._element,[this._titleElement]),this._dragListener.on(\"dragStart\",this._dragStartListener),this._componentItem.on(\"destroy\",this._contentItemDestroyListener)}disableReorder(){if(void 0===this._dragListener)throw new J(\"TDR87745\");this._componentItem.off(\"destroy\",this._contentItemDestroyListener),this._dragListener.off(\"dragStart\",this._dragStartListener),this._dragListener=void 0}}class Qt{constructor(t,e,i,n,o){this._layoutManager=t,this._componentRemoveEvent=e,this._componentFocusEvent=i,this._componentDragStartEvent=n,this._dropdownActiveChangedEvent=o,this._tabs=[],this._lastVisibleTabIndex=-1,this._dropdownActive=!1,this._element=document.createElement(\"section\"),this._element.classList.add(\"lm_tabs\"),this._dropdownElement=document.createElement(\"section\"),this._dropdownElement.classList.add(\"lm_tabdropdown_list\"),this._dropdownElement.style.display=\"none\"}get tabs(){return this._tabs}get tabCount(){return this._tabs.length}get lastVisibleTabIndex(){return this._lastVisibleTabIndex}get element(){return this._element}get dropdownElement(){return this._dropdownElement}get dropdownActive(){return this._dropdownActive}destroy(){for(let t=0;tthis.handleTabCloseEvent(t)),(t=>this.handleTabFocusEvent(t)),((t,e,i,n)=>this.handleTabDragStartEvent(t,e,i,n)));void 0===e&&(e=this._tabs.length),this._tabs.splice(e,0,i),ethis._lastVisibleTabIndex){const t=this._tabs[e];for(let t=e;t>0;t--)this._tabs[t]=this._tabs[t-1];this._tabs[0]=t}}updateTabSizes(t,e){let i=!1;this.tryUpdateTabSizes(i,t,e)||(i=!0,this.tryUpdateTabSizes(i,t,e)),i!==this._dropdownActive&&(this._dropdownActive=i,this._dropdownActiveChangedEvent())}tryUpdateTabSizes(t,e,i){if(this._tabs.length>0){if(void 0===i)throw new Error(\"non-empty tabs must have active component item\");let n=0,o=!1;const s=this._layoutManager.layoutConfig.settings.tabOverlapAllowance,r=this._tabs.indexOf(i.tab),a=this._tabs[r];this._lastVisibleTabIndex=-1;for(let i=0;ie){if(o)i===r&&(l.style.zIndex=\"auto\",l.style.marginLeft=\"\",l.parentElement!==this._element&&this._element.appendChild(l));else{let t;if(t=r>0&&r<=i?(d-e)/(i-1):(d-e)/i,tthis.onClick(t),this._touchStartListener=t=>this.onTouchStart(t),this._rowColumnClosable=!0,this._closeButton=null,this._popoutButton=null,this._tabsContainer=new Qt(this._layoutManager,(t=>this.handleTabInitiatedComponentRemoveEvent(t)),(t=>this.handleTabInitiatedComponentFocusEvent(t)),((t,e,i,n)=>this.handleTabInitiatedDragStartEvent(t,e,i,n)),(()=>this.processTabDropdownActiveChanged())),this._show=i.show,this._popoutEnabled=i.popoutEnabled,this._popoutLabel=i.popoutLabel,this._maximiseEnabled=i.maximiseEnabled,this._maximiseLabel=i.maximiseLabel,this._minimiseEnabled=i.minimiseEnabled,this._minimiseLabel=i.minimiseLabel,this._closeEnabled=i.closeEnabled,this._closeLabel=i.closeLabel,this._tabDropdownEnabled=i.tabDropdownEnabled,this._tabDropdownLabel=i.tabDropdownLabel,this.setSide(i.side),this._canRemoveComponent=this._configClosable,this._element=document.createElement(\"section\"),this._element.classList.add(\"lm_header\"),this._controlsContainerElement=document.createElement(\"section\"),this._controlsContainerElement.classList.add(\"lm_controls\"),this._element.appendChild(this._tabsContainer.element),this._element.appendChild(this._controlsContainerElement),this._element.appendChild(this._tabsContainer.dropdownElement),this._element.addEventListener(\"click\",this._clickListener,{passive:!0}),this._element.addEventListener(\"touchstart\",this._touchStartListener,{passive:!0}),this._documentMouseUpListener=()=>this._tabsContainer.hideAdditionalTabsDropdown(),globalThis.document.addEventListener(\"mouseup\",this._documentMouseUpListener,{passive:!0}),this._tabControlOffset=this._layoutManager.layoutConfig.settings.tabControlOffset,this._tabDropdownEnabled&&(this._tabDropdownButton=new Kt(this,this._tabDropdownLabel,\"lm_tabdropdown\",(()=>this._tabsContainer.showAdditionalTabsDropdown()))),this._popoutEnabled&&(this._popoutButton=new Kt(this,this._popoutLabel,\"lm_popout\",(()=>this.handleButtonPopoutEvent()))),this._maximiseEnabled&&(this._maximiseButton=new Kt(this,this._maximiseLabel,\"lm_maximise\",(t=>this.handleButtonMaximiseToggleEvent(t)))),this._configClosable&&(this._closeButton=new Kt(this,this._closeLabel,\"lm_close\",(()=>s()))),this.processTabDropdownActiveChanged()}get show(){return this._show}get side(){return this._side}get leftRightSided(){return this._leftRightSided}get layoutManager(){return this._layoutManager}get parent(){return this._parent}get tabs(){return this._tabsContainer.tabs}get lastVisibleTabIndex(){return this._tabsContainer.lastVisibleTabIndex}get element(){return this._element}get tabsContainerElement(){return this._tabsContainer.element}get controlsContainerElement(){return this._controlsContainerElement}destroy(){this.emit(\"destroy\"),this._popoutEvent=void 0,this._maximiseToggleEvent=void 0,this._clickEvent=void 0,this._touchStartEvent=void 0,this._componentRemoveEvent=void 0,this._componentFocusEvent=void 0,this._componentDragStartEvent=void 0,this._tabsContainer.destroy(),globalThis.document.removeEventListener(\"mouseup\",this._documentMouseUpListener),this._element.remove()}createTab(t,e){this._tabsContainer.createTab(t,e)}removeTab(t){this._tabsContainer.removeTab(t)}processActiveComponentChanged(t){this._tabsContainer.processActiveComponentChanged(t),this.updateTabSizes()}setSide(t){this._side=t,this._leftRightSided=[nt.right,nt.left].includes(this._side)}setRowColumnClosable(t){this._rowColumnClosable=t,this.updateClosability()}updateClosability(){let t;if(this._configClosable)if(this._rowColumnClosable){t=!0;const e=this.tabs.length;for(let i=0;i1}applyFocusedValue(t){t?this._element.classList.add(\"lm_focused\"):this._element.classList.remove(\"lm_focused\")}processMaximised(){if(void 0===this._maximiseButton)throw new J(\"HPMAX16997\");this._maximiseButton.element.setAttribute(\"title\",this._minimiseLabel)}processMinimised(){if(void 0===this._maximiseButton)throw new J(\"HPMIN16997\");this._maximiseButton.element.setAttribute(\"title\",this._maximiseLabel)}updateTabSizes(){if(this._tabsContainer.tabCount>0){const t=this._show?this._layoutManager.layoutConfig.dimensions.headerHeight:0;let e;this._leftRightSided?(this._element.style.height=\"\",this._element.style.width=zt(t)):(this._element.style.width=\"\",this._element.style.height=zt(t)),e=this._leftRightSided?this._element.offsetHeight-this._controlsContainerElement.offsetHeight-this._tabControlOffset:this._element.offsetWidth-this._controlsContainerElement.offsetWidth-this._tabControlOffset,this._tabsContainer.updateTabSizes(e,this._getActiveComponentItemEvent())}}handleTabInitiatedComponentRemoveEvent(t){if(this._canRemoveComponent){if(void 0===this._componentRemoveEvent)throw new J(\"HHTCE22294\");this._componentRemoveEvent(t)}}handleTabInitiatedComponentFocusEvent(t){if(void 0===this._componentFocusEvent)throw new J(\"HHTAE22294\");this._componentFocusEvent(t)}handleTabInitiatedDragStartEvent(t,e,i,n){if(this._canRemoveComponent){if(void 0===this._componentDragStartEvent)throw new J(\"HHTDSE22294\");this._componentDragStartEvent(t,e,i,n)}else i.cancelDrag()}processTabDropdownActiveChanged(){void 0!==this._tabDropdownButton&&Dt(this._tabDropdownButton.element,this._tabsContainer.dropdownActive)}handleButtonPopoutEvent(){if(this._layoutManager.layoutConfig.settings.popoutWholeStack){if(void 0===this._popoutEvent)throw new J(\"HHBPOE17834\");this._popoutEvent()}else{const t=this._getActiveComponentItemEvent();t&&t.popout()}}handleButtonMaximiseToggleEvent(t){if(void 0===this._maximiseToggleEvent)throw new J(\"HHBMTE16834\");this._maximiseToggleEvent()}onClick(t){t.target===this._element&&this.notifyClick(t)}onTouchStart(t){t.target===this._element&&this.notifyTouchStart(t)}notifyClick(t){if(void 0===this._clickEvent)throw new J(\"HNHC46834\");this._clickEvent(t)}notifyTouchStart(t){if(void 0===this._touchStartEvent)throw new J(\"HNHTS46834\");this._touchStartEvent(t)}}class ee extends $t{constructor(t,e,i){var n,o,s,r,a,l,h,d,c,m,u,p,g,f,v,_,y,C,w;super(t,e,i,ee.createElement(document)),this._headerSideChanged=!1,this._resizeListener=()=>this.handleResize(),this._maximisedListener=()=>this.handleMaximised(),this._minimisedListener=()=>this.handleMinimised(),this._headerConfig=e.header;const I=t.layoutConfig.header,b=e.content;let S;if(1!==b.length)S=void 0;else{S=b[0].header}this._initialWantMaximise=e.maximised,this._initialActiveItemIndex=null!==(n=e.activeItemIndex)&&void 0!==n?n:0;const E=null!==(r=null!==(s=null===(o=this._headerConfig)||void 0===o?void 0:o.show)&&void 0!==s?s:null==S?void 0:S.show)&&void 0!==r?r:I.show,x=null!==(h=null!==(l=null===(a=this._headerConfig)||void 0===a?void 0:a.popout)&&void 0!==l?l:null==S?void 0:S.popout)&&void 0!==h?h:I.popout,L=null!==(m=null!==(c=null===(d=this._headerConfig)||void 0===d?void 0:d.maximise)&&void 0!==c?c:null==S?void 0:S.maximise)&&void 0!==m?m:I.maximise,z=null!==(g=null!==(p=null===(u=this._headerConfig)||void 0===u?void 0:u.close)&&void 0!==p?p:null==S?void 0:S.close)&&void 0!==g?g:I.close,M=null!==(_=null!==(v=null===(f=this._headerConfig)||void 0===f?void 0:f.minimise)&&void 0!==v?v:null==S?void 0:S.minimise)&&void 0!==_?_:I.minimise,P=null!==(w=null!==(C=null===(y=this._headerConfig)||void 0===y?void 0:y.tabDropdown)&&void 0!==C?C:null==S?void 0:S.tabDropdown)&&void 0!==w?w:I.tabDropdown;this._maximisedEnabled=!1!==L;const T={show:!1!==E,side:!1===E?nt.top:E,popoutEnabled:!1!==x,popoutLabel:!1===x?\"\":x,maximiseEnabled:this._maximisedEnabled,maximiseLabel:!1===L?\"\":L,closeEnabled:!1!==z,closeLabel:!1===z?\"\":z,minimiseEnabled:!0,minimiseLabel:M,tabDropdownEnabled:!1!==P,tabDropdownLabel:!1===P?\"\":P};this._header=new te(t,this,T,e.isClosable&&!1!==z,(()=>this.getActiveComponentItem()),(()=>this.remove()),(()=>this.handlePopoutEvent()),(()=>this.toggleMaximise()),(t=>this.handleHeaderClickEvent(t)),(t=>this.handleHeaderTouchStartEvent(t)),(t=>this.handleHeaderComponentRemoveEvent(t)),(t=>this.handleHeaderComponentFocusEvent(t)),((t,e,i,n)=>this.handleHeaderComponentStartDragEvent(t,e,i,n))),this.isStack=!0,this._childElementContainer=document.createElement(\"section\"),this._childElementContainer.classList.add(\"lm_items\"),this.on(\"resize\",this._resizeListener),this._maximisedEnabled&&(this.on(\"maximised\",this._maximisedListener),this.on(\"minimised\",this._minimisedListener)),this.element.appendChild(this._header.element),this.element.appendChild(this._childElementContainer),this.setupHeaderPosition(),this._header.updateClosability()}get childElementContainer(){return this._childElementContainer}get header(){return this._header}get headerShow(){return this._header.show}get headerSide(){return this._header.side}get headerLeftRightSided(){return this._header.leftRightSided}get contentAreaDimensions(){return this._contentAreaDimensions}get initialWantMaximise(){return this._initialWantMaximise}get isMaximised(){return this===this.layoutManager.maximisedStack}get stackParent(){if(!this.parent)throw new Error(\"Stack should always have a parent\");return this.parent}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}init(){if(!0===this.isInitialised)return;this.updateNodeSize();for(let t=0;t0){if(this._initialActiveItemIndex<0||this._initialActiveItemIndex>=e)throw new Error(`ActiveItemIndex out of range: ${this._initialActiveItemIndex} id: ${this.id}`);for(let i=0;ithis.contentItems.length)throw e-=1,new X(\"SAC99728\");if(t instanceof jt)return e=super.addChild(t,e),this._childElementContainer.appendChild(t.element),this._header.createTab(t,e),this.setActiveComponentItem(t,i),this._header.updateTabSizes(),this.updateSize(!1),t.container.setBaseLogicalZIndex(),this._header.updateClosability(),this.emitStateChangedEvent(),e;throw new X(\"SACC88532\")}removeChild(t,e){const i=t,n=this.contentItems.indexOf(i),o=1===this.contentItems.length;if(this._activeComponentItem===i&&(i.focused&&i.blur(),!o)){const t=0===n?1:n-1;this.setActiveComponentItem(this.contentItems[t],!1)}this._header.removeTab(i),super.removeChild(i,e),o||this._header.updateClosability(),this.emitStateChangedEvent()}toggleMaximise(){this.isMaximised?this.minimise():this.maximise()}maximise(){if(!this.isMaximised){this.layoutManager.setMaximisedStack(this);const t=this.contentItems,e=t.length;for(let i=0;i0&&void 0===t)throw new Error(\"expected non-empty stack to have an active component item\");return{type:\"stack\",content:this.calculateConfigContent(),size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,isClosable:this.isClosable,maximised:this.isMaximised,header:this.createHeaderConfig(),activeItemIndex:t}}onDrop(t,e){if(\"header\"===this._dropSegment){if(this.resetHeaderDropZone(),void 0===this._dropIndex)throw new J(\"SODDI68990\");return void this.addChild(t,this._dropIndex)}if(\"body\"===this._dropSegment)return void this.addChild(t,0,!0);const i=\"top\"===this._dropSegment||\"bottom\"===this._dropSegment,n=\"left\"===this._dropSegment||\"right\"===this._dropSegment,o=\"top\"===this._dropSegment||\"left\"===this._dropSegment,s=i&&this.stackParent.isColumn||n&&this.stackParent.isRow;if(t.isComponent){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createAndInitContentItem(e,this);i.addChild(t),t=i}if(t.type===at.row||t.type===at.column){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}if(s){const e=this.stackParent.contentItems.indexOf(this);this.stackParent.addChild(t,o?e:e+1,!0),this.size*=.5,t.size=this.size,t.sizeUnit=this.sizeUnit,this.stackParent.updateSize(!1)}else{const e=i?at.column:at.row,n=ct.createDefault(e),s=this.layoutManager.createContentItem(n,this);this.stackParent.replaceChild(this,s),s.addChild(t,o?0:void 0,!0),s.addChild(this,o?void 0:0,!0),this.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}highlightDropZone(t,e){for(const i in this._contentAreaDimensions){const n=i,o=this._contentAreaDimensions[n].hoverArea;if(o.x1t&&o.y1e)return void(\"header\"===n?(this._dropSegment=\"header\",this.highlightHeaderDropZone(this._header.leftRightSided?e:t)):(this.resetHeaderDropZone(),this.highlightBodyDropZone(n)))}}getArea(){if(\"none\"===this.element.style.display)return null;const t=super.getElementArea(this._header.element),e=super.getElementArea(this._childElementContainer);if(null===t||null===e)throw new K(\"SGAHC13086\");const i=e.x2-e.x1,n=e.y2-e.y1;return this._contentAreaDimensions={header:{hoverArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2},highlightArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2}}},0===this.contentItems.length?(this._contentAreaDimensions.body={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2}},super.getElementArea(this.element)):(this._contentAreaDimensions.left={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x1+.25*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x1+.5*i,y2:e.y2}},this._contentAreaDimensions.top={hoverArea:{x1:e.x1+.25*i,y1:e.y1,x2:e.x1+.75*i,y2:e.y1+.5*n},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y1+.5*n}},this._contentAreaDimensions.right={hoverArea:{x1:e.x1+.75*i,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1+.5*i,y1:e.y1,x2:e.x2,y2:e.y2}},this._contentAreaDimensions.bottom={hoverArea:{x1:e.x1+.25*i,y1:e.y1+.5*n,x2:e.x1+.75*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1+.5*n,x2:e.x2,y2:e.y2}},super.getElementArea(this.element))}positionHeader(t){this._header.side!==t&&(this._header.setSide(t),this._headerSideChanged=!0,this.setupHeaderPosition())}updateNodeSize(){if(\"none\"!==this.element.style.display){const t=kt(this.element);if(this._header.show){t[this._header.leftRightSided?it.width:it.height]-=this.layoutManager.layoutConfig.dimensions.headerHeight}this._childElementContainer.style.width=zt(t.width),this._childElementContainer.style.height=zt(t.height);for(let e=0;e=o&&tthis.onDrag(t,e,i))),this._dragListener.on(\"dragStop\",(()=>this.onDrop())),this.createDragProxyElements(t,e),null===this._componentItem.parent)throw new K(\"DPC10097\");this._componentItemFocused=this._componentItem.focused,this._componentItemFocused&&this._componentItem.blur(),this._componentItem.parent.removeChild(this._componentItem,!0),this.setDimensions(),document.body.appendChild(this._element),this.determineMinMaxXY(),this._layoutManager.calculateItemAreas(),this.setDropPosition(t,e)}get element(){return this._element}createDragProxyElements(t,e){this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_dragProxy\");const i=document.createElement(\"div\");i.classList.add(\"lm_header\");const n=document.createElement(\"div\");n.classList.add(\"lm_tabs\");const o=document.createElement(\"div\");o.classList.add(\"lm_tab\");const s=document.createElement(\"span\");s.classList.add(\"lm_title\"),o.appendChild(s),n.appendChild(o),i.appendChild(n),this._proxyContainerElement=document.createElement(\"div\"),this._proxyContainerElement.classList.add(\"lm_content\"),this._element.appendChild(i),this._element.appendChild(this._proxyContainerElement),this._originalParent instanceof ee&&this._originalParent.headerShow&&(this._sided=this._originalParent.headerLeftRightSided,this._element.classList.add(\"lm_\"+this._originalParent.headerSide),[nt.right,nt.bottom].indexOf(this._originalParent.headerSide)>=0&&this._proxyContainerElement.insertAdjacentElement(\"afterend\",i)),this._element.style.left=zt(t),this._element.style.top=zt(e),o.setAttribute(\"title\",this._componentItem.title),s.insertAdjacentText(\"afterbegin\",this._componentItem.title),this._proxyContainerElement.appendChild(this._componentItem.element)}determineMinMaxXY(){const t=this._layoutManager.groundItem;if(void 0===t)throw new J(\"DPDMMXY73109\");{const e=t.element.getBoundingClientRect();this._minX=e.left+document.body.scrollLeft,this._minY=e.top+document.body.scrollTop,this._maxX=this._minX+e.width,this._maxY=this._minY+e.height}}onDrag(t,e,i){const n=i.pageX,o=i.pageY;this.setDropPosition(n,o),this._componentItem.drag()}setDropPosition(t,e){this._layoutManager.layoutConfig.settings.constrainDragToContainer&&(t<=this._minX?t=Math.ceil(this._minX):t>=this._maxX&&(t=Math.floor(this._maxX)),e<=this._minY?e=Math.ceil(this._minY):e>=this._maxY&&(e=Math.floor(this._maxY))),this._element.style.left=zt(t),this._element.style.top=zt(e),this._area=this._layoutManager.getArea(t,e),null!==this._area&&(this._lastValidArea=this._area,this._area.contentItem.highlightDropZone(t,e,this._area))}onDrop(){const t=this._layoutManager.dropTargetIndicator;if(null===t)throw new K(\"DPOD30011\");let e;if(t.hide(),this._componentItem.exitDragMode(),null!==this._area)e=this._componentItem,this._area.contentItem.onDrop(e,this._area);else if(null!==this._lastValidArea){e=this._componentItem;this._lastValidArea.contentItem.onDrop(e,this._lastValidArea)}else this._originalParent?(e=this._componentItem,this._originalParent.addChild(e)):this._componentItem.destroy();this._element.remove(),this._layoutManager.emit(\"itemDropped\",this._componentItem),this._componentItemFocused&&void 0!==e&&e.focus()}setDimensions(){const t=this._layoutManager.layoutConfig.dimensions;if(void 0===t)throw new Error(\"DragProxy.setDimensions: dimensions undefined\");let e=t.dragProxyWidth,i=t.dragProxyHeight;if(void 0===e||void 0===i)throw new Error(\"DragProxy.setDimensions: width and/or height undefined\");const n=!1===this._layoutManager.layoutConfig.header.show?0:t.headerHeight;this._element.style.width=zt(e),this._element.style.height=zt(i),e-=this._sided?n:0,i-=this._sided?0:n,this._proxyContainerElement.style.width=zt(e),this._proxyContainerElement.style.height=zt(i),this._componentItem.enterDragMode(e,i),this._componentItem.show()}}class ne{constructor(t,e,i,n,o,s,r){this._layoutManager=t,this._element=e,this._extraAllowableChildTargets=i,this._componentTypeOrFtn=n,this._componentState=o,this._title=s,this._id=r,this._dragListener=null,this._dummyGroundContainer=document.createElement(\"div\");const a=gt.createDefault(\"row\");this._dummyGroundContentItem=new Yt(this._layoutManager,a,this._dummyGroundContainer),this.createDragListener()}destroy(){this.removeDragListener()}createDragListener(){this.removeDragListener(),this._dragListener=new Zt(this._element,this._extraAllowableChildTargets),this._dragListener.on(\"dragStart\",((t,e)=>this.onDragStart(t,e))),this._dragListener.on(\"dragStop\",(()=>this.onDragStop()))}onDragStart(t,e){var i;const n=\"component\";let o;if(\"function\"==typeof this._componentTypeOrFtn){const t=this._componentTypeOrFtn();o=ne.isDragSourceComponentItemConfig(t)?{type:n,componentState:t.state,componentType:t.type,title:null!==(i=t.title)&&void 0!==i?i:this._title}:t}else o={type:n,componentState:this._componentState,componentType:this._componentTypeOrFtn,title:this._title,id:this._id};const s=bt.resolve(o,!1),r=new jt(this._layoutManager,s,this._dummyGroundContentItem);if(this._dummyGroundContentItem.contentItems.push(r),null===this._dragListener)throw new K(\"DSODSD66746\");{const i=new ie(t,e,this._dragListener,this._layoutManager,r,this._dummyGroundContentItem),n=this._layoutManager.transitionIndicator;if(null===n)throw new K(\"DSODST66746\");n.transitionElements(this._element,i.element)}}onDragStop(){this.createDragListener()}removeDragListener(){null!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=null)}}!function(t){t.isDragSourceComponentItemConfig=function(t){return!(\"componentType\"in t)}}(ne||(ne={}));class oe{constructor(){this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_dropTargetIndicator\");const t=document.createElement(\"div\");t.classList.add(\"lm_inner\"),this._element.appendChild(t),document.body.appendChild(this._element)}destroy(){this._element.remove()}highlightArea(t,e){this._element.style.left=zt(t.x1+e),this._element.style.top=zt(t.y1+e),this._element.style.width=zt(t.x2-t.x1-e),this._element.style.height=zt(t.y2-t.y1-e),this._element.style.display=\"block\"}hide(){Dt(this._element,!1)}}class se{constructor(){this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_transition_indicator\"),document.body.appendChild(this._element),this._toElement=null,this._fromDimensions=null,this._totalAnimationDuration=200,this._animationStartTime=null}destroy(){this._element.remove()}transitionElements(t,e){}nextAnimationFrame(){}measure(t){const e=t.getBoundingClientRect();return{left:e.left,top:e.top,width:t.offsetWidth,height:t.offsetHeight}}}class re extends Wt{constructor(t){super(),this._layoutManager=t,this._childEventListener=t=>this.onEventFromChild(t),globalThis.addEventListener(re.ChildEventName,this._childEventListener,{passive:!0})}emit(t,...e){\"userBroadcast\"===t?this.emitUserBroadcast(...e):super.emit(t,...e)}emitUserBroadcast(...t){this.handleUserBroadcastEvent(\"userBroadcast\",t)}destroy(){globalThis.removeEventListener(re.ChildEventName,this._childEventListener)}handleUserBroadcastEvent(t,e){this._layoutManager.isSubWindow?this.propagateToParent(t,e):this.propagateToThisAndSubtree(t,e)}onEventFromChild(t){const e=t.detail;this.handleUserBroadcastEvent(e.eventName,e.args)}propagateToParent(t,e){const i={bubbles:!0,cancelable:!0,detail:{layoutManager:this._layoutManager,eventName:t,args:e}},n=new CustomEvent(re.ChildEventName,i),o=globalThis.opener;if(null===o)throw new K(\"EHPTP15778\");o.dispatchEvent(n)}propagateToThisAndSubtree(t,e){this.emitUnknown(t,...e);for(let i=0;ithis.handleContainerResize())),this._windowBeforeUnloadListener=()=>this.onBeforeUnload(),this._windowBeforeUnloadListening=!1,this._maximisedStackBeforeDestroyedListener=t=>this.cleanupBeforeMaximisedStackDestroyed(t),this.isSubWindow=t.isSubWindow,this._constructorOrSubWindowLayoutConfig=t.constructorOrSubWindowLayoutConfig,Q.checkInitialise(),dt.checkInitialise(),void 0!==t.containerElement&&(this._containerElement=t.containerElement)}get container(){return this._containerElement}get isInitialised(){return this._isInitialised}get groundItem(){return this._groundItem}get root(){return this._groundItem}get openPopouts(){return this._openPopouts}get dropTargetIndicator(){return this._dropTargetIndicator}get transitionIndicator(){return this._transitionIndicator}get width(){return this._width}get height(){return this._height}get eventHub(){return this._eventHub}get rootItem(){if(void 0===this._groundItem)throw new Error(\"Cannot access rootItem before init\");return 0===this._groundItem.contentItems.length?void 0:this._groundItem.contentItems[0]}get focusedComponentItem(){return this._focusedComponentItem}get tabDropPlaceholder(){return this._tabDropPlaceholder}get maximisedStack(){return this._maximisedStack}get deprecatedConstructor(){return!this.isSubWindow&&void 0!==this._constructorOrSubWindowLayoutConfig}destroy(){if(this._isInitialised){this._windowBeforeUnloadListening&&(globalThis.removeEventListener(\"beforeunload\",this._windowBeforeUnloadListener),this._windowBeforeUnloadListening=!1),!0===this.layoutConfig.settings.closePopoutsOnUnload&&this.closeAllOpenPopouts(),this._resizeObserver.disconnect(),this.checkClearResizeTimeout(),void 0!==this._groundItem&&this._groundItem.destroy(),this._tabDropPlaceholder.remove(),null!==this._dropTargetIndicator&&this._dropTargetIndicator.destroy(),null!==this._transitionIndicator&&this._transitionIndicator.destroy(),this._eventHub.destroy();for(const t of this._dragSources)t.destroy();this._dragSources=[],this._isInitialised=!1}}minifyConfig(t){return _t.minifyConfig(t)}unminifyConfig(t){return _t.unminifyConfig(t)}init(){let t;if(this.setContainer(),this._dropTargetIndicator=new oe,this._transitionIndicator=new se,this.updateSizeFromContainer(),this.isSubWindow){if(void 0===this._constructorOrSubWindowLayoutConfig)throw new J(\"LMIU07155\");{const e=this._constructorOrSubWindowLayoutConfig.root;if(void 0===e)throw new X(\"LMIC07156\");if(!Ct.isComponent(e))throw new X(\"LMIC07157\");t=e;const i=xt.resolve(this._constructorOrSubWindowLayoutConfig);this.layoutConfig=Object.assign(Object.assign({},i),{root:void 0})}}else void 0===this._constructorOrSubWindowLayoutConfig?this.layoutConfig=_t.createDefault():this.layoutConfig=xt.resolve(this._constructorOrSubWindowLayoutConfig);const e=this.layoutConfig;this._groundItem=new Yt(this,e.root,this._containerElement),this._groundItem.init(),this.checkLoadedLayoutMaximiseItem(),this._resizeObserver.observe(this._containerElement),this._isInitialised=!0,this.adjustColumnsResponsive(),this.emit(\"initialised\"),void 0!==t&&this.loadComponentAsRoot(t)}loadLayout(t){if(!this.isInitialised)throw new Error(\"GoldenLayout: Need to call init() if LayoutConfig with defined root passed to constructor\");if(void 0===this._groundItem)throw new J(\"LMLL11119\");this.createSubWindows(),this.layoutConfig=xt.resolve(t),this._groundItem.loadRoot(this.layoutConfig.root),this.checkLoadedLayoutMaximiseItem(),this.adjustColumnsResponsive()}saveLayout(){if(!1===this._isInitialised)throw new Error(\"Can't create config, layout not yet initialised\");if(void 0===this._groundItem)throw new J(\"LMTC18244\");{const t=this._groundItem.calculateConfigContent();let e;e=1!==t.length?void 0:t[0],this.reconcilePopoutWindows();const i=[];for(let t=0;t=0?n=this._groundItem.contentItems[0]:e=0;break;case at.row:case at.column:e=n.addItem(t,i.index);break;case at.stack:if(Ct.isComponent(t)){e=n.addItem(t,i.index);break}throw Error(tt[6]);case at.component:throw new X(\"LMAIALC87444602\");default:throw new Y(\"LMAIALU98881733\",n.type)}if(Ct.isComponent(t)){const t=n.contentItems[e];Gt.isStack(t)&&(n=t,e=0)}return i.parentItem=n,i.index=e,i}}}loadComponentAsRoot(t){if(void 0===this._groundItem)throw new Error(\"Cannot add item before init\");this._groundItem.loadComponentAsRoot(t)}updateSize(t,e){this.setSize(t,e)}setSize(t,e){if(this._width=t,this._height=e,!0===this._isInitialised){if(void 0===this._groundItem)throw new J(\"LMUS18881\");if(this._groundItem.setSize(this._width,this._height),this._maximisedStack){const{width:t,height:e}=kt(this._containerElement);Tt(this._maximisedStack.element,t),At(this._maximisedStack.element,e),this._maximisedStack.updateSize(!1)}this.adjustColumnsResponsive()}}beginSizeInvalidation(){this._sizeInvalidationBeginCount++}endSizeInvalidation(){0==--this._sizeInvalidationBeginCount&&this.updateSizeFromContainer()}updateSizeFromContainer(){const{width:t,height:e}=kt(this._containerElement);this.setSize(t,e)}updateRootSize(t=!1){if(void 0===this._groundItem)throw new J(\"LMURS28881\");this._groundItem.updateSize(t)}createAndInitContentItem(t,e){const i=this.createContentItem(t,e);return i.init(),i}createContentItem(t,e){if(\"string\"!=typeof t.type)throw new G(\"Missing parameter 'type'\",JSON.stringify(t));if(ct.isComponentItem(t)&&!(e instanceof ee)&&e&&!(!0===this.isSubWindow&&e instanceof Yt)){t={type:at.stack,content:[t],size:t.size,sizeUnit:t.sizeUnit,minSize:t.minSize,minSizeUnit:t.minSizeUnit,id:t.id,maximised:t.maximised,isClosable:t.isClosable,activeItemIndex:0,header:void 0}}return this.createContentItemFromConfig(t,e)}findFirstComponentItemById(t){if(void 0===this._groundItem)throw new J(\"LMFFCIBI82446\");return this.findFirstContentItemTypeByIdRecursive(at.component,t,this._groundItem)}createPopout(t,e,i,n){return t instanceof Gt?this.createPopoutFromContentItem(t,e,i,n):this.createPopoutFromItemConfig(t,e,i,n)}createPopoutFromContentItem(t,e,i,n){let o=t.parent,s=t;for(;null!==o&&1===o.contentItems.length&&!o.isGround;)s=o,o=o.parent;if(null===o)throw new K(\"LMCPFCI00834\");{if(void 0===n&&(n=o.contentItems.indexOf(s)),null!==i&&o.addPopInParentId(i),void 0===e){const i=globalThis.screenX||globalThis.screenLeft,n=globalThis.screenY||globalThis.screenTop,o=t.element.offsetLeft,s=t.element.offsetTop,{width:r,height:a}=kt(t.element);e={left:i+o,top:n+s,width:r,height:a}}const r=t.toConfig();if(t.remove(),ft.isRootItemConfig(r))return this.createPopoutFromItemConfig(r,e,i,n);throw new Error(`${tt[0]}`)}}beginVirtualSizedContainerAdding(){0==++this._virtualSizedContainerAddingBeginCount&&(this._virtualSizedContainers.length=0)}addVirtualSizedContainer(t){this._virtualSizedContainers.push(t)}endVirtualSizedContainerAdding(){if(0==--this._virtualSizedContainerAddingBeginCount){const t=this._virtualSizedContainers.length;if(t>0){this.fireBeforeVirtualRectingEvent(t);for(let e=0;ethis.emit(\"windowOpened\",a))),a.on(\"closed\",(()=>this.reconcilePopoutWindows())),this._openPopouts.push(a),this.layoutConfig.settings.closePopoutsOnUnload&&!this._windowBeforeUnloadListening&&(globalThis.addEventListener(\"beforeunload\",this._windowBeforeUnloadListener,{passive:!0}),this._windowBeforeUnloadListening=!0),a}closeAllOpenPopouts(){for(let t=0;tglobalThis.close()),1)}getArea(t,e){let i=null,n=1/0;for(let o=0;o=s.x1&&t=s.y1&&es.surface&&(n=s.surface,i=s)}return i}calculateItemAreas(){const t=this.getAllContentItems(),e=this._groundItem;if(void 0===e)throw new J(\"LMCIAR44365\");if(1!==t.length){e.contentItems[0].isStack?this._itemAreas=[]:this._itemAreas=e.createSideAreas();for(let e=0;e0){let e=t[0];if(Gt.isComponentItem(e)){const t=e.parent;if(null===t)throw new K(\"LMXLLMI69999\");e=t}if(!Gt.isStack(e))throw new X(\"LMCLLMI19993\");e.maximise()}}}processMaximiseStack(t){if(this._maximisedStack=t,t.on(\"beforeItemDestroyed\",this._maximisedStackBeforeDestroyedListener),t.element.classList.add(\"lm_maximised\"),t.element.insertAdjacentElement(\"afterend\",this._maximisePlaceholder),void 0===this._groundItem)throw new J(\"LMMXI19993\");{this._groundItem.element.prepend(t.element);const{width:e,height:i}=kt(this._containerElement);Tt(t.element,e),At(t.element,i),t.updateSize(!0),t.focusActiveContentItem(),this._maximisedStack.emit(\"maximised\"),this.emit(\"stateChanged\")}}processMinimiseMaximisedStack(){if(void 0===this._maximisedStack)throw new X(\"LMMMS74422\");{const t=this._maximisedStack;if(null===t.parent)throw new K(\"LMMI13668\");t.element.classList.remove(\"lm_maximised\"),this._maximisePlaceholder.insertAdjacentElement(\"afterend\",t.element),this._maximisePlaceholder.remove(),this.updateRootSize(!0),this._maximisedStack=void 0,t.off(\"beforeItemDestroyed\",this._maximisedStackBeforeDestroyedListener),t.emit(\"minimised\"),this.emit(\"stateChanged\")}}reconcilePopoutWindows(){const t=[];for(let e=0;e{this._resizeTimeoutId=void 0,this.beginSizeInvalidation(),this.endSizeInvalidation()}),this.resizeDebounceInterval))}checkClearResizeTimeout(){void 0!==this._resizeTimeoutId&&(clearTimeout(this._resizeTimeoutId),this._resizeTimeoutId=void 0)}setContainer(){var t;const e=document.body,i=null!==(t=this._containerElement)&&void 0!==t?t:e;if(i===e){this.resizeWithContainerAutomatically=!0;const t=document.documentElement;t.style.height=\"100%\",t.style.margin=\"0\",t.style.padding=\"0\",t.style.overflow=\"clip\",e.style.height=\"100%\",e.style.margin=\"0\",e.style.padding=\"0\",e.style.overflow=\"clip\"}this._containerElement=i}onBeforeUnload(){this.destroy()}adjustColumnsResponsive(){if(void 0===this._groundItem)throw new J(\"LMACR20883\");if(this._firstLoad=!1,this.useResponsiveLayout()&&!this._updatingColumnsResponsive&&this._groundItem.contentItems.length>0&&this._groundItem.contentItems[0].isRow){if(void 0===this._groundItem||null===this._width)throw new J(\"LMACR77412\");{const t=this._groundItem.contentItems[0].contentItems.length;if(t<=1)return;{const e=this.layoutConfig.dimensions.defaultMinItemWidth;if(t*e<=this._width)return;{this._updatingColumnsResponsive=!0;const i=t-Math.max(Math.floor(this._width/e),1),n=this._groundItem.contentItems[0],o=this.getAllStacks();if(0===o.length)throw new X(\"LMACRS77413\");{const t=o[0];for(let e=0;en?void 0:{parentItem:t,index:o}}}case 1:if(void 0===this._focusedComponentItem)return;{const t=this._focusedComponentItem.parentItem;return this.tryCreateLocationFromParentItem(t,e)}case 2:{const t=this.findFirstContentItemType(at.stack);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 3:{let t=this.findFirstContentItemType(at.row);return void 0!==t?this.tryCreateLocationFromParentItem(t,e):(t=this.findFirstContentItemType(at.column),void 0!==t?this.tryCreateLocationFromParentItem(t,e):void 0)}case 4:{const t=this.findFirstContentItemType(at.row);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 5:{const t=this.findFirstContentItemType(at.column);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 6:if(void 0===this._groundItem)throw new J(\"LMFLRIF18244\");return void 0!==this.rootItem?void 0:void 0===e||0===e?{parentItem:this._groundItem,index:0}:void 0;case 7:if(void 0===this._groundItem)throw new J(\"LMFLF18244\");{const t=this._groundItem.contentItems;if(0===t.length)return void 0===e||0===e?{parentItem:this._groundItem,index:0}:void 0;{const i=t[0];return this.tryCreateLocationFromParentItem(i,e)}}}}tryCreateLocationFromParentItem(t,e){const i=t.contentItems.length;return void 0===e?{parentItem:t,index:i}:e<0||e>i?void 0:{parentItem:t,index:e}}}!function(t){t.createMaximisePlaceElement=function(t){const e=t.createElement(\"div\");return e.classList.add(\"lm_maximise_place\"),e},t.createTabDropPlaceholderElement=function(t){const e=t.createElement(\"div\");return e.classList.add(\"lm_drop_tab_placeholder\"),e},t.defaultLocationSelectors=[{typeId:1,index:void 0},{typeId:2,index:void 0},{typeId:3,index:void 0},{typeId:7,index:void 0}],t.afterFocusedItemIfPossibleLocationSelectors=[{typeId:0,index:1},{typeId:2,index:void 0},{typeId:3,index:void 0},{typeId:7,index:void 0}]}(ae||(ae={}));class le extends ae{constructor(t,e,i,n){if(super(le.createLayoutManagerConstructorParameters(t,e)),this._bindComponentEventHanlderPassedInConstructor=!1,this._creationTimeoutPassed=!1,void 0!==e&&\"function\"==typeof e&&(this.bindComponentEvent=e,this._bindComponentEventHanlderPassedInConstructor=!0,void 0!==i&&(this.unbindComponentEvent=i)),!this._bindComponentEventHanlderPassedInConstructor&&this.isSubWindow){if(void 0===this._constructorOrSubWindowLayoutConfig)throw new J(\"VLC98823\");{const t=xt.resolve(this._constructorOrSubWindowLayoutConfig);this.layoutConfig=Object.assign(Object.assign({},t),{root:void 0})}}!0!==n&&(this.deprecatedConstructor||this.init())}destroy(){this.bindComponentEvent=void 0,this.unbindComponentEvent=void 0,super.destroy()}init(){if(this._bindComponentEventHanlderPassedInConstructor||\"loading\"!==document.readyState&&null!==document.body){if(!this._bindComponentEventHanlderPassedInConstructor&&!0===this.isSubWindow&&!this._creationTimeoutPassed)return setTimeout((()=>this.init()),7),void(this._creationTimeoutPassed=!0);!0===this.isSubWindow&&(this._bindComponentEventHanlderPassedInConstructor||this.clearHtmlAndAdjustStylesForSubWindow(),window.__glInstance=this),super.init()}else document.addEventListener(\"DOMContentLoaded\",(()=>this.init()),{passive:!0})}clearHtmlAndAdjustStylesForSubWindow(){const t=document.head,e=new Array(4);e[0]=document.querySelectorAll(\"body link\"),e[1]=document.querySelectorAll(\"body style\"),e[2]=document.querySelectorAll(\"template\"),e[3]=document.querySelectorAll(\".gl_keep\");for(let i=0;ithis.emit(\"popIn\"))),document.body.appendChild(t),!0}}bindComponent(t,e){if(void 0!==this.bindComponentEvent){return this.bindComponentEvent(t,e)}if(void 0!==this.getComponentEvent)return{virtual:!1,component:this.getComponentEvent(t,e)};{const t=`${tt[2]}: ${JSON.stringify(e)}`;throw new Z(t)}}unbindComponent(t,e,i){if(void 0!==this.unbindComponentEvent)this.unbindComponentEvent(t);else if(!e&&void 0!==this.releaseComponentEvent){if(void 0===i)throw new J(\"VCUCRCU333998\");this.releaseComponentEvent(t,i)}}}!function(t){let e=!1;t.createLayoutManagerConstructorParameters=function(t,i){const n=e?null:new URL(document.location.href).searchParams.get(\"gl-window\");e=!0;const o=null!==n;let s,r;if(null!==n){const e=localStorage.getItem(n);if(null===e)throw new Error(\"Null gl-window Config\");localStorage.removeItem(n);const i=JSON.parse(e),o=_t.unminifyConfig(i);r=xt.fromResolved(o),t instanceof HTMLElement&&(s=t)}else void 0===t?r=void 0:t instanceof HTMLElement?(r=void 0,s=t):r=t,void 0===s&&i instanceof HTMLElement&&(s=i);return{constructorOrSubWindowLayoutConfig:r,isSubWindow:o,containerElement:s}}}(le||(le={}));class he extends le{constructor(t,e,i){super(t,e,i,!0),this._componentTypesMap=new Map,this._registeredComponentMap=new Map,this._virtuableComponentMap=new Map,this._containerVirtualRectingRequiredEventListener=(t,e,i)=>this.handleContainerVirtualRectingRequiredEvent(t,e,i),this._containerVirtualVisibilityChangeRequiredEventListener=(t,e)=>this.handleContainerVirtualVisibilityChangeRequiredEvent(t,e),this._containerVirtualZIndexChangeRequiredEventListener=(t,e,i)=>this.handleContainerVirtualZIndexChangeRequiredEvent(t,e,i),this.deprecatedConstructor||this.init()}registerComponent(t,e,i=!1){if(\"function\"!=typeof e)throw new $(\"registerComponent() componentConstructorOrFactoryFtn parameter is not a function\");if(e.hasOwnProperty(\"prototype\")){const n=e;this.registerComponentConstructor(t,n,i)}else{const n=e;this.registerComponentFactoryFunction(t,n,i)}}registerComponentConstructor(t,e,i=!1){if(\"function\"!=typeof e)throw new Error(tt[1]);if(void 0!==this._componentTypesMap.get(t))throw new Z(`${tt[3]}: ${t}`);this._componentTypesMap.set(t,{constructor:e,factoryFunction:void 0,virtual:i})}registerComponentFactoryFunction(t,e,i=!1){if(\"function\"!=typeof e)throw new Z(\"Please register a constructor function\");if(void 0!==this._componentTypesMap.get(t))throw new Z(`${tt[3]}: ${t}`);this._componentTypesMap.set(t,{constructor:void 0,factoryFunction:e,virtual:i})}registerComponentFunction(t){this.registerGetComponentConstructorCallback(t)}registerGetComponentConstructorCallback(t){if(\"function\"!=typeof t)throw new Error(\"Please register a callback function\");void 0!==this._getComponentConstructorFtn&&console.warn(\"Multiple component functions are being registered. Only the final registered function will be used.\"),this._getComponentConstructorFtn=t}getRegisteredComponentTypeNames(){const t=this._componentTypesMap.keys();return Array.from(t)}getComponentInstantiator(t){let e;const i=pt.resolveComponentTypeName(t);return void 0!==i&&(e=this._componentTypesMap.get(i)),void 0===e&&void 0!==this._getComponentConstructorFtn&&(e={constructor:this._getComponentConstructorFtn(t),factoryFunction:void 0,virtual:!1}),e}bindComponent(t,e){let i;const n=pt.resolveComponentTypeName(e);let o;if(void 0!==n&&(i=this._componentTypesMap.get(n)),void 0===i&&void 0!==this._getComponentConstructorFtn&&(i={constructor:this._getComponentConstructorFtn(e),factoryFunction:void 0,virtual:!1}),void 0!==i){const s=i.virtual;let r,a;r=void 0===e.componentState?void 0:Ut({},e.componentState);const l=i.constructor;if(void 0!==l)a=new l(t,r,s);else{const e=i.factoryFunction;if(void 0===e)throw new X(\"LMBCFFU10008\");a=e(t,r,s)}if(s){if(void 0===a)throw new J(\"GLBCVCU988774\");{const e=a,i=e.rootHtmlElement;if(void 0===i)throw new Z(`${tt[5]}: ${n}`);!function(t){const e=\"absolute\";t.style.position!==e&&(t.style.position=e)}(i),this.container.appendChild(i),this._virtuableComponentMap.set(t,e),t.virtualRectingRequiredEvent=this._containerVirtualRectingRequiredEventListener,t.virtualVisibilityChangeRequiredEvent=this._containerVirtualVisibilityChangeRequiredEventListener,t.virtualZIndexChangeRequiredEvent=this._containerVirtualZIndexChangeRequiredEventListener}}this._registeredComponentMap.set(t,a),o={virtual:i.virtual,component:a}}else o=super.bindComponent(t,e);return o}unbindComponent(t,e,i){if(void 0===this._registeredComponentMap.get(t))super.unbindComponent(t,e,i);else{const e=this._virtuableComponentMap.get(t);if(void 0!==e){const i=e.rootHtmlElement;if(void 0===i)throw new X(\"GLUC77743\",t.title);this.container.removeChild(i),this._virtuableComponentMap.delete(t)}}}fireBeforeVirtualRectingEvent(t){this._goldenLayoutBoundingClientRect=this.container.getBoundingClientRect(),super.fireBeforeVirtualRectingEvent(t)}handleContainerVirtualRectingRequiredEvent(t,e,i){const n=this._virtuableComponentMap.get(t);if(void 0===n)throw new J(\"GLHCSCE55933\");{const o=n.rootHtmlElement;if(void 0===o)throw new Z(tt[4]+\" \"+t.title);{const n=t.element.getBoundingClientRect(),s=n.left-this._goldenLayoutBoundingClientRect.left;o.style.left=zt(s);const r=n.top-this._goldenLayoutBoundingClientRect.top;o.style.top=zt(r),Tt(o,e),At(o,i)}}}handleContainerVirtualVisibilityChangeRequiredEvent(t,e){const i=this._virtuableComponentMap.get(t);if(void 0===i)throw new J(\"GLHCVVCRE55934\");{const n=i.rootHtmlElement;if(void 0===n)throw new Z(tt[4]+\" \"+t.title);Dt(n,e)}}handleContainerVirtualZIndexChangeRequiredEvent(t,e,i){const n=this._virtuableComponentMap.get(t);if(void 0===n)throw new J(\"GLHCVZICRE55935\");{const e=n.rootHtmlElement;if(void 0===e)throw new Z(tt[4]+\" \"+t.title);e.style.zIndex=i}}}const de=\"initial_\",ce={show:\"top\",popout:!1,maximise:!1,close:\"close-tab-unused\"},me={headerHeight:31},ue={hasHeaders:!0,reorderEnabled:!0},pe={popoutWholeStack:!1,constrainDragToContainer:!1,constrainDragToHeaders:!1,preventDragout:!1,showMaximiseIcon:!1,showPopoutIcon:!1,showCloseIcon:!1,blockedPopoutsThrowError:!0,closePopoutsOnUnload:!0,selectionEnabled:!1};var ge,fe;class ve{constructor(e){this.layout=e,ge.set(this,void 0),fe.set(this,void 0),this.handleResize=t=>{t.forEach((t=>this.resizeElement(t.target)))},this.handleMutation=()=>{this.layout.viewComponentsByContainerElement.forEach((t=>{this.resizeElement(t.container.element)}))},t.__classPrivateFieldSet(this,ge,new ResizeObserver(this.handleResize),\"f\"),t.__classPrivateFieldSet(this,fe,new MutationObserver(this.handleMutation),\"f\")}observeMutations(e){t.__classPrivateFieldGet(this,fe,\"f\")?.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[\"class\"]})}destroy(){t.__classPrivateFieldGet(this,ge,\"f\").disconnect(),t.__classPrivateFieldGet(this,fe,\"f\").disconnect()}observeContainer(e){t.__classPrivateFieldGet(this,ge,\"f\").observe(e)}unobserveContainer(e){t.__classPrivateFieldGet(this,ge,\"f\").unobserve(e)}resizeElement(t){const e=this.layout.viewComponentsByContainerElement.get(t);e&&e.resize()}}ge=new WeakMap,fe=new WeakMap;var _e={};Object.defineProperty(_e,\"__esModule\",{value:!0});var ye=_e.BaseItem=void 0;class Ce{constructor(t,e,i){this._item=t,this._layout=e,this._wrap=i}get raw(){return this._item}get layout(){return this._layout}get type(){return this._item.type}get contentItems(){return(this._item.contentItems??[]).map((t=>this._wrap(t)))}get parent(){const t=this._item.parent;return t?this._wrap(t):null}setActiveContentItem(t,e){if(\"stack\"!==this.type)throw new Error(`Cannot call setActiveContentItem from a non-stack item: ${this.type}`);this._item.setActiveContentItem(t.raw,e)}static wrapInternal(t,e,i){const n=Ce.wrapCache.get(e);if(n)return n;const o=new t(e,i,(e=>Ce.wrapInternal(t,e,i)));return Ce.wrapCache.set(e,o),o}}ye=_e.BaseItem=Ce,Ce.wrapCache=new WeakMap;const we=t=>!!t&&\"contentItems\"in t&&(t.isRow||t.isColumn);class Ie extends ye{isRoot(){return!!this._item.parent?.isGround}getBounds(){return this._item.element.getBoundingClientRect()}get viewName(){if(this._item.isComponent){const{component:t}=this._item;return t.identity.name}throw new Error(\"View name not found\")}onDestroyed(t){const e=({target:i})=>{i===this._item&&(t(),this._item.off(\"itemDestroyed\",e))};this._item.on(\"itemDestroyed\",e)}createAdjacentStack({position:t=\"right\"}={}){const e=this.raw;if(ee.isStack(e)&&e.parent){const i=[\"top\",\"bottom\"].includes(t)?\"column\":\"row\",n=[\"left\",\"top\"].includes(t)?1:0,o=we(e.parent)?e.parent:e.layoutManager,s=o,r=e.parent.contentItems.indexOf(e);e.parent.isGround&&e.parent.removeChild(e,!0);const a=o.newItem({type:i,content:[{type:\"stack\",content:[]}]},r);if(!a)throw new Error(\"createAdjacentStack: Failed to create new container\");const l=a.contentItems[0];return a.addChild(this.raw,n),we(s)&&s.removeChild(e,!0),this._wrap(l)}throw new Error(`Cannot creat adjacent stacks for type: ${e.type}, must be type 'stack'`)}setActiveContentItem(t,e=!0){if(!ee.isStack(this._item))throw new Error(`Cannot call setActiveContentItem from a non-stack item: ${this.type}`);this._item.setActiveComponentItem(t.raw,!e)}static wrap(t,e){return ye.wrapInternal(Ie,t,e)}}function be(t=[],e){for(const i of t)\"component\"===i.type?Object.keys(e).forEach((t=>{t in i&&(i.componentState={[`${de}${t}`]:i[t],...i.componentState}),i[t]=e[t]})):be(i.content,e)}function Se(t=[],e,i){for(const n of t)if(\"component\"===n.type)Object.keys(e).forEach((t=>{if(`${de}${t}`in n.componentState)return n[t]=n.componentState[`${de}${t}`],void delete n.componentState[`${de}${t}`];n[t]=e[t]}));else{if(n.size&&(\"row\"===i||\"column\"===i)){n[\"row\"===i?\"width\":\"height\"]=n.size?.includes(\".\")?parseFloat(n.size):parseInt(n.size)}Se(n.content,e,n.type)}}function Ee(t){if(t.root){t.root.content&&Se([t.root],{componentName:\"view\",isClosable:!0});const e=t.root;t.content=[e],delete t.root}return t}const xe=e=>class extends e{connectedCallback(){if(!this.name||!this.uuid)throw new Error(\" Name or uuid attribute missing\");if(!this.src)throw new Error(\" missing 'src' attribute.\");this.#t||(this.#t=document.createElement(\"iframe\"),this.#t.src=this.src,this.#t.style.height=\"100%\",this.#t.style.width=\"100%\",this.#t.style.border=\"none\",this.forceFrameName?this.#t.setAttribute(\"name\",this.forceFrameName):this.#t.setAttribute(\"name\",t.encodeOptions({brokerUrl:this.brokerUrl,name:this.name,uuid:this.uuid,providerId:this.providerId,contextGroup:this.contextGroup},\"of-frame\")),this.#t.setAttribute(\"id\",this.name),this.appendChild(this.#t))}#t;get brokerUrl(){return this.getAttribute(\"of-broker\")}set brokerUrl(t){t&&this.setAttribute(\"of-broker\",t)}get name(){return this.getAttribute(\"of-name\")}set name(t){t&&this.setAttribute(\"of-name\",t)}get forceFrameName(){return this.getAttribute(\"forceFrameName\")}set forceFrameName(t){t&&this.setAttribute(\"forceFrameName\",t)}get uuid(){return this.getAttribute(\"of-uuid\")}set uuid(t){t&&this.setAttribute(\"of-uuid\",t)}get src(){return this.getAttribute(\"src\")}set src(t){t&&this.setAttribute(\"src\",t)}get providerId(){return this.getAttribute(\"of-provider-id\")}set providerId(t){t&&this.setAttribute(\"of-provider-id\",t)}get contextGroup(){return this.getAttribute(\"of-context-group\")}set contextGroup(t){t&&this.setAttribute(\"of-context-group\",t)}static get observedAttributes(){return[\"name\"]}};class Le{static create(t){const e=document.createElement(\"of-view\");return Object.entries(t).forEach((([t,i])=>{e.setAttribute(t,i)})),e}}customElements.define(\"of-view\",xe(HTMLElement));class ze{constructor(t,i,n,{brokerUrl:o,interopConfig:s},r){this.container=t,this.config=i,this.ofView=null,this.isDragging=()=>this.container.tab.element?.className.includes(\"lm_dragging\")??!1;const{url:a,web:l,interop:h,name:d}=i||{},c=d??`internal-generated-view-${e.v4()}`;if(this.identity={uuid:n,name:c},this.container.element.setAttribute(\"of-name\",c),this.container.element.id=`container-${c}`,this.container.parent.id=c,void 0===a)return void this.handleUrlMissing();const m=this.updateTitleIfNotSet(a),u={\"of-broker\":o,\"of-uuid\":n,\"of-name\":c,src:a};l?.frameName&&(u.forceFrameName=l.frameName);const p=h?.currentContextGroup??s?.currentContextGroup;p&&(u[\"of-context-group\"]=p),s?.providerId&&(u[\"of-provider-id\"]=s?.providerId),this.ofView=Le.create(u),this.ofView.title=m??`Iframe: ${a}`,r.appendChild(this.ofView),this.ofView.style.position=\"absolute\"}updateTitleIfNotSet(t){return\"view\"===this.container.parent.title&&this.container.parent.setTitle(t),this.container.parent.title}handleUrlMissing(){const t=document.createElement(\"div\");t.setAttribute(\"style\",\"padding: 20px\");t.innerText=\"No URL provided\",this.container.element.appendChild(t)}destroy(){this.ofView?.remove(),this.ofView=null}closeView(){this.container.close()}resize(){if(this.ofView){if(this.isDragging())return void(this.ofView.style.display=\"none\");const t=this.container.element.getBoundingClientRect();this.ofView.style.position=\"absolute\",this.ofView.style.height=`${t.height}px`,this.ofView.style.width=`${t.width}px`,this.ofView.style.inset=`${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`,this.ofView.style.display=\"block\"}}}class Me extends U{static overrideConfig(t){const e={...ue,...t.settings,...pe};return e.reorderEnabled?be(t.content,{isClosable:!0}):be(t.content,{reorderEnabled:!1}),{dimensions:me,...t,settings:e,header:{...ce,show:!1!==t.settings?.hasHeaders&&ce.show}}}constructor(t,e,i,{options:n},o,s){super(),this.identity=t,this.container=e,this.initialConfig=i,this.layoutManager=o,this.platformProvider=s,this.viewComponentsByContainerElement=new Map,this.layoutContentCache=_.getSingleInstance(),this.reparentingViews=new Set,this.goldenLayoutDestroyed=!1,this.createViewComponent=(t,e)=>{m.handleSharedView(this.layoutManager,this.identity,e);const i=new ze(t,e,this.identity.uuid,this.options,this.iframeContainer);return e&&!1===e[`${de}isClosable`]&&this.stylesheet.insertRule(`#tab-${i.identity.name} .lm_close_tab { display: none; }`),this.viewComponentsByContainerElement.set(t.element,i),this.resizeController.observeContainer(t.element),i},this.iframeContainer=document.createElement(\"div\"),this.iframeContainer.id=`openfin-layout-iframe-container-${this.identity.layoutName}`,this.domEmitter=new V(e),this.setupStylesheets(),this.layout=new he(this.container),this.layout.resizeWithContainerAutomatically=!0,this.options=n,this.layout.registerComponent(\"view\",this.createViewComponent),this.setupListeners(),this.resizeController=new ve(this),this.layout.loadLayout(Me.overrideConfig(i));const r=document.createElement(\"div\");r.id=`openfin-layout-shadow-container-${this.identity.layoutName}`,r.attachShadow({mode:\"open\",delegatesFocus:!1}).appendChild(this.iframeContainer),this.container.appendChild(r),this.resizeController.observeMutations(this.container)}getStackByView({name:t}){const e=this.layout.findFirstComponentItemById(t);if(e?.parent&&e?.parent?.isStack)return Ie.wrap(e.parent,this)}getRoot(){return Ie.wrap(this.layout.rootItem,this)}async platformCloseView(t){const e=[...this.viewComponentsByContainerElement.values()].find((e=>e.identity.name===t.name));if(!e)throw new Error(`View with name: ${t.name} not found in layout.`);e.closeView()}async platformCreateView(t,{location:e,targetView:i}={}){if(i)throw new Error(\"TargetView not supported in web\");const n={options:this.platformProvider.normalizeOptions(t),target:this.identity,location:e};return this.insertView(n)}setupStylesheets(){if(this.container.setAttribute(\"data-openfin-layout-name\",this.identity.layoutName),this.stylesheet=new CSSStyleSheet,this.stylesheet.insertRule(\".lm_close { display: none; }\"),document.adoptedStyleSheets.push(this.stylesheet),this.initialConfig.settings?.preventSplitterResize){const t=`\\n [data-openfin-layout-name='${this.identity.layoutName}'] .lm_splitter {\\n pointer-events: none;\\n }`;this.stylesheet.insertRule(t)}}insertView({options:t,location:e,targetView:i}){const n=e?this.layoutContentCache.getItemOrUndefined(e.id):void 0,o=i?this.layoutContentCache.getItemOrUndefined(i.name):void 0,s=n??o??Ie.wrap(this.layout.rootItem,this);let r;if(ee.isStack(s.raw))r=s.raw;else{if(!we(s.raw))throw new Error(\"Cannot add a view at the requested location\");r=s.raw.newItem({type:\"stack\",content:[]})}const a=Math.min(r.contentItems.length,e?.index??r.contentItems.length);let l=this.layout.findFirstComponentItemById(t.name);l?(l.parent&&l.parent.removeChild(l,!0),r.addChild(l,a)):l=r.newComponent(\"view\",t,t.title??t.url??\"Default Title\",a);const h=l.component.identity;return Promise.resolve({identity:h})}replaceView({viewToReplace:t,newView:e}){throw new Error(\"Method not implemented.\")}replaceLayout(t){throw new Error(\"Method not implemented.\")}async cleanupView(t){}applyPreset(t){throw new Error(\"Method not implemented.\")}getCurrentViews(){return[...this.viewComponentsByContainerElement.values()].map((t=>t.identity))}async getFrameSnapshot(){return Ee(xt.fromResolved(this.layout.toConfig()))}isVisible(){return W(this.container)}async onViewDetached({viewIdentity:t}){this.reparentingViews.add(t.name),this.platformCloseView(t)}async destroy(){this.goldenLayoutDestroyed||(this.goldenLayoutDestroyed=!0,this.layout.destroy()),this.iframeContainer.remove(),this.resizeController.destroy(),document.adoptedStyleSheets=document.adoptedStyleSheets.filter((t=>t!==this.stylesheet)),this.viewComponentsByContainerElement.clear()}setupListeners(){this.container.addEventListener(\"pointerdown\",(t=>{if(t.target instanceof HTMLElement){const e=t.target.classList;[\"lm_tab\",\"lm_title\",\"lm_splitter\",\"lm_drag_handle\"].some((t=>e.contains(t)))&&(this.handleDragStart(),2===t.button&&t.stopPropagation())}}),!0),document.addEventListener(\"pointerup\",(()=>this.handleDragEnd()),!0),this.layout.on(\"tabCreated\",(t=>{const e=t.componentItem.component;t.element.id=`tab-${e.identity.name}`,this.domEmitter.dispatchLocalEvent(\"tab-created\",e.identity)})),this.layout.on(\"itemCreated\",(({target:t})=>{const e=t;if(Gt.isComponentItem(e)){const t=e.component;this.domEmitter.dispatchLocalEvent(\"container-created\",t.identity)}})),this.layout.on(\"itemDestroyed\",(t=>{const e=t.target;if(Gt.isComponentItem(e)){const t=e.component;this.removeViewComponent(t)}})),this.layout.on(\"itemDropped\",(()=>{this.handleDragEnd()}))}handleDragStart(){this.iframeContainer.style.pointerEvents=\"none\"}handleDragEnd(){this.iframeContainer.style.pointerEvents=\"\"}removeViewComponent(t){if(t.config&&!1===t.config[`${de}isClosable`]){const e=[...this.stylesheet.cssRules].findIndex((e=>e.cssText.includes(`#tab-${t.identity.name}`)));this.stylesheet.deleteRule(e)}t.destroy(),this.viewComponentsByContainerElement.delete(t.container.element),this.resizeController.unobserveContainer(t.container.element),this.reparentingViews.has(t.identity.name)?this.reparentingViews.delete(t.identity.name):this.platformProvider.closeView(t.identity.name);0===this.getCurrentViews().length&&(this.goldenLayoutDestroyed||(this.goldenLayoutDestroyed=!0,m.handleLastViewRemoved(this.layoutManager,this.identity)))}}class Pe{constructor(t,e,i,n){this.windowIdentity=t,this.connectConfig=e,this.provider=i,this.fallbackContainer=n}async createLayout(t,e){if(!(\"container\"in t)&&!this.fallbackContainer)throw new Error(\"Container property is not optional in web\");const{layoutName:i}=t,n=t,o=this.provider.initLayoutViews(n),s=n.container??this.fallbackContainer,r={...this.windowIdentity,layoutName:i},a=new Me(r,s,o,this.connectConfig,e,this.provider);m.registerLayout(e,i,a),this.fallbackContainer=null}async getLayoutSnapshot(t){return t.getLayoutSnapshot()}async handleLastViewRemoved(t){}}class Te{static async init(e){const i=e.getFin().InterApplicationBus.Channel,n=await i.create(`custom-frame-${e.me.uuid}`);return n.setDefaultAction((async(t,{target:e,opts:i},o)=>{const s=n.connections.find((t=>t.name===e.name));if(s)return n.dispatch(s,t,{...i,target:e});throw new Error(`Client with name ${e.name} not found`)})),await t.relayChannelClientApi_1(n,\"layout-relay\"),new Te(e)}constructor(t){this.wire=t,this.viewNames=new Set}normalizeOptions(t,i=\"default\"){const n=this.wire.me.uuid;let{name:o=`internal-generated-view-${e.v4()}`}=t;return o.match(/^internal-generated-view-/)&&this.viewNames.has(o)&&\"duplicate\"===i&&(o=`internal-generated-view-${e.v4()}`),this.viewNames.add(o),{...t,name:o,uuid:n}}closeView(t){this.viewNames.delete(t)}initLayoutViews({layout:t,multiInstanceViewBehavior:e}){return H((t=>{if(\"component\"===t.type&&t.componentState){const i=this.normalizeOptions(t.componentState,e);return{...t,componentState:i}}return t}),t)}}var Ae;const ke=t=>t;Ae=new WeakMap,exports.WebLayoutEntryPoint=class{constructor(e){Ae.set(this,void 0),this.initLayoutManager=async(e,i,{container:n,layoutManagerOverride:o})=>{const s=await Te.init(i),r=o??ke,a=new Pe(i.me,t.__classPrivateFieldGet(this,Ae,\"f\"),s,n),l=new(r(m.createClosedConstructor(a)));return await M(i,l),l},this.applyLayoutSnapshot=async(e,i,n)=>{await i.applyLayoutSnapshot(t.__classPrivateFieldGet(this,Ae,\"f\").platform.layoutSnapshot)},this.createLayout=async(t,e)=>m.createLayout(t,e),this.destroyLayout=async(t,e)=>m.destroyLayout(t,e),t.__classPrivateFieldSet(this,Ae,e,\"f\")}};\n","'use strict'\n\nexports.byteLength = byteLength\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\nfor (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i]\n revLookup[code.charCodeAt(i)] = i\n}\n\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction getLens (b64) {\n var len = b64.length\n\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // Trim off extra bytes after placeholder bytes are found\n // See: https://github.com/beatgammit/base64-js/issues/42\n var validLen = b64.indexOf('=')\n if (validLen === -1) validLen = len\n\n var placeHoldersLen = validLen === len\n ? 0\n : 4 - (validLen % 4)\n\n return [validLen, placeHoldersLen]\n}\n\n// base64 is 4/3 + up to two characters of the original data\nfunction byteLength (b64) {\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction _byteLength (b64, validLen, placeHoldersLen) {\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction toByteArray (b64) {\n var tmp\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n\n var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))\n\n var curByte = 0\n\n // if there are placeholders, only get up to the last complete 4 chars\n var len = placeHoldersLen > 0\n ? validLen - 4\n : validLen\n\n var i\n for (i = 0; i < len; i += 4) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 18) |\n (revLookup[b64.charCodeAt(i + 1)] << 12) |\n (revLookup[b64.charCodeAt(i + 2)] << 6) |\n revLookup[b64.charCodeAt(i + 3)]\n arr[curByte++] = (tmp >> 16) & 0xFF\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 2) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 2) |\n (revLookup[b64.charCodeAt(i + 1)] >> 4)\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 1) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 10) |\n (revLookup[b64.charCodeAt(i + 1)] << 4) |\n (revLookup[b64.charCodeAt(i + 2)] >> 2)\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] +\n lookup[num >> 12 & 0x3F] +\n lookup[num >> 6 & 0x3F] +\n lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n var tmp\n var output = []\n for (var i = start; i < end; i += 3) {\n tmp =\n ((uint8[i] << 16) & 0xFF0000) +\n ((uint8[i + 1] << 8) & 0xFF00) +\n (uint8[i + 2] & 0xFF)\n output.push(tripletToBase64(tmp))\n }\n return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n var tmp\n var len = uint8.length\n var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n var parts = []\n var maxChunkLength = 16383 // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1]\n parts.push(\n lookup[tmp >> 2] +\n lookup[(tmp << 4) & 0x3F] +\n '=='\n )\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + uint8[len - 1]\n parts.push(\n lookup[tmp >> 10] +\n lookup[(tmp >> 4) & 0x3F] +\n lookup[(tmp << 2) & 0x3F] +\n '='\n )\n }\n\n return parts.join('')\n}\n","/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n/* eslint-disable no-proto */\n\n'use strict'\n\nconst base64 = require('base64-js')\nconst ieee754 = require('ieee754')\nconst customInspectSymbol =\n (typeof Symbol === 'function' && typeof Symbol['for'] === 'function') // eslint-disable-line dot-notation\n ? Symbol['for']('nodejs.util.inspect.custom') // eslint-disable-line dot-notation\n : null\n\nexports.Buffer = Buffer\nexports.SlowBuffer = SlowBuffer\nexports.INSPECT_MAX_BYTES = 50\n\nconst K_MAX_LENGTH = 0x7fffffff\nexports.kMaxLength = K_MAX_LENGTH\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Print warning and recommend using `buffer` v4.x which has an Object\n * implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * We report that the browser does not support typed arrays if the are not subclassable\n * using __proto__. Firefox 4-29 lacks support for adding new properties to `Uint8Array`\n * (See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438). IE 10 lacks support\n * for __proto__ and has a buggy typed array implementation.\n */\nBuffer.TYPED_ARRAY_SUPPORT = typedArraySupport()\n\nif (!Buffer.TYPED_ARRAY_SUPPORT && typeof console !== 'undefined' &&\n typeof console.error === 'function') {\n console.error(\n 'This browser lacks typed array (Uint8Array) support which is required by ' +\n '`buffer` v5.x. Use `buffer` v4.x if you require old browser support.'\n )\n}\n\nfunction typedArraySupport () {\n // Can typed array instances can be augmented?\n try {\n const arr = new Uint8Array(1)\n const proto = { foo: function () { return 42 } }\n Object.setPrototypeOf(proto, Uint8Array.prototype)\n Object.setPrototypeOf(arr, proto)\n return arr.foo() === 42\n } catch (e) {\n return false\n }\n}\n\nObject.defineProperty(Buffer.prototype, 'parent', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.buffer\n }\n})\n\nObject.defineProperty(Buffer.prototype, 'offset', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.byteOffset\n }\n})\n\nfunction createBuffer (length) {\n if (length > K_MAX_LENGTH) {\n throw new RangeError('The value \"' + length + '\" is invalid for option \"size\"')\n }\n // Return an augmented `Uint8Array` instance\n const buf = new Uint8Array(length)\n Object.setPrototypeOf(buf, Buffer.prototype)\n return buf\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new TypeError(\n 'The \"string\" argument must be of type string. Received type number'\n )\n }\n return allocUnsafe(arg)\n }\n return from(arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\nfunction from (value, encodingOrOffset, length) {\n if (typeof value === 'string') {\n return fromString(value, encodingOrOffset)\n }\n\n if (ArrayBuffer.isView(value)) {\n return fromArrayView(value)\n }\n\n if (value == null) {\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n }\n\n if (isInstance(value, ArrayBuffer) ||\n (value && isInstance(value.buffer, ArrayBuffer))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof SharedArrayBuffer !== 'undefined' &&\n (isInstance(value, SharedArrayBuffer) ||\n (value && isInstance(value.buffer, SharedArrayBuffer)))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof value === 'number') {\n throw new TypeError(\n 'The \"value\" argument must not be of type number. Received type number'\n )\n }\n\n const valueOf = value.valueOf && value.valueOf()\n if (valueOf != null && valueOf !== value) {\n return Buffer.from(valueOf, encodingOrOffset, length)\n }\n\n const b = fromObject(value)\n if (b) return b\n\n if (typeof Symbol !== 'undefined' && Symbol.toPrimitive != null &&\n typeof value[Symbol.toPrimitive] === 'function') {\n return Buffer.from(value[Symbol.toPrimitive]('string'), encodingOrOffset, length)\n }\n\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n return from(value, encodingOrOffset, length)\n}\n\n// Note: Change prototype *after* Buffer.from is defined to workaround Chrome bug:\n// https://github.com/feross/buffer/pull/148\nObject.setPrototypeOf(Buffer.prototype, Uint8Array.prototype)\nObject.setPrototypeOf(Buffer, Uint8Array)\n\nfunction assertSize (size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be of type number')\n } else if (size < 0) {\n throw new RangeError('The value \"' + size + '\" is invalid for option \"size\"')\n }\n}\n\nfunction alloc (size, fill, encoding) {\n assertSize(size)\n if (size <= 0) {\n return createBuffer(size)\n }\n if (fill !== undefined) {\n // Only pay attention to encoding if it's a string. This\n // prevents accidentally sending in a number that would\n // be interpreted as a start offset.\n return typeof encoding === 'string'\n ? createBuffer(size).fill(fill, encoding)\n : createBuffer(size).fill(fill)\n }\n return createBuffer(size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n return alloc(size, fill, encoding)\n}\n\nfunction allocUnsafe (size) {\n assertSize(size)\n return createBuffer(size < 0 ? 0 : checked(size) | 0)\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n return allocUnsafe(size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n return allocUnsafe(size)\n}\n\nfunction fromString (string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8'\n }\n\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n\n const length = byteLength(string, encoding) | 0\n let buf = createBuffer(length)\n\n const actual = buf.write(string, encoding)\n\n if (actual !== length) {\n // Writing a hex string, for example, that contains invalid characters will\n // cause everything after the first invalid character to be ignored. (e.g.\n // 'abxxcd' will be treated as 'ab')\n buf = buf.slice(0, actual)\n }\n\n return buf\n}\n\nfunction fromArrayLike (array) {\n const length = array.length < 0 ? 0 : checked(array.length) | 0\n const buf = createBuffer(length)\n for (let i = 0; i < length; i += 1) {\n buf[i] = array[i] & 255\n }\n return buf\n}\n\nfunction fromArrayView (arrayView) {\n if (isInstance(arrayView, Uint8Array)) {\n const copy = new Uint8Array(arrayView)\n return fromArrayBuffer(copy.buffer, copy.byteOffset, copy.byteLength)\n }\n return fromArrayLike(arrayView)\n}\n\nfunction fromArrayBuffer (array, byteOffset, length) {\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\"offset\" is outside of buffer bounds')\n }\n\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\"length\" is outside of buffer bounds')\n }\n\n let buf\n if (byteOffset === undefined && length === undefined) {\n buf = new Uint8Array(array)\n } else if (length === undefined) {\n buf = new Uint8Array(array, byteOffset)\n } else {\n buf = new Uint8Array(array, byteOffset, length)\n }\n\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(buf, Buffer.prototype)\n\n return buf\n}\n\nfunction fromObject (obj) {\n if (Buffer.isBuffer(obj)) {\n const len = checked(obj.length) | 0\n const buf = createBuffer(len)\n\n if (buf.length === 0) {\n return buf\n }\n\n obj.copy(buf, 0, 0, len)\n return buf\n }\n\n if (obj.length !== undefined) {\n if (typeof obj.length !== 'number' || numberIsNaN(obj.length)) {\n return createBuffer(0)\n }\n return fromArrayLike(obj)\n }\n\n if (obj.type === 'Buffer' && Array.isArray(obj.data)) {\n return fromArrayLike(obj.data)\n }\n}\n\nfunction checked (length) {\n // Note: cannot use `length < K_MAX_LENGTH` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= K_MAX_LENGTH) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + K_MAX_LENGTH.toString(16) + ' bytes')\n }\n return length | 0\n}\n\nfunction SlowBuffer (length) {\n if (+length != length) { // eslint-disable-line eqeqeq\n length = 0\n }\n return Buffer.alloc(+length)\n}\n\nBuffer.isBuffer = function isBuffer (b) {\n return b != null && b._isBuffer === true &&\n b !== Buffer.prototype // so Buffer.isBuffer(Buffer.prototype) will be false\n}\n\nBuffer.compare = function compare (a, b) {\n if (isInstance(a, Uint8Array)) a = Buffer.from(a, a.offset, a.byteLength)\n if (isInstance(b, Uint8Array)) b = Buffer.from(b, b.offset, b.byteLength)\n if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n throw new TypeError(\n 'The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array'\n )\n }\n\n if (a === b) return 0\n\n let x = a.length\n let y = b.length\n\n for (let i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i]\n y = b[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n switch (String(encoding).toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'latin1':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return true\n default:\n return false\n }\n}\n\nBuffer.concat = function concat (list, length) {\n if (!Array.isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n\n if (list.length === 0) {\n return Buffer.alloc(0)\n }\n\n let i\n if (length === undefined) {\n length = 0\n for (i = 0; i < list.length; ++i) {\n length += list[i].length\n }\n }\n\n const buffer = Buffer.allocUnsafe(length)\n let pos = 0\n for (i = 0; i < list.length; ++i) {\n let buf = list[i]\n if (isInstance(buf, Uint8Array)) {\n if (pos + buf.length > buffer.length) {\n if (!Buffer.isBuffer(buf)) buf = Buffer.from(buf)\n buf.copy(buffer, pos)\n } else {\n Uint8Array.prototype.set.call(\n buffer,\n buf,\n pos\n )\n }\n } else if (!Buffer.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n } else {\n buf.copy(buffer, pos)\n }\n pos += buf.length\n }\n return buffer\n}\n\nfunction byteLength (string, encoding) {\n if (Buffer.isBuffer(string)) {\n return string.length\n }\n if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) {\n return string.byteLength\n }\n if (typeof string !== 'string') {\n throw new TypeError(\n 'The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. ' +\n 'Received type ' + typeof string\n )\n }\n\n const len = string.length\n const mustMatch = (arguments.length > 2 && arguments[2] === true)\n if (!mustMatch && len === 0) return 0\n\n // Use a for loop to avoid recursion\n let loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'ascii':\n case 'latin1':\n case 'binary':\n return len\n case 'utf8':\n case 'utf-8':\n return utf8ToBytes(string).length\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return len * 2\n case 'hex':\n return len >>> 1\n case 'base64':\n return base64ToBytes(string).length\n default:\n if (loweredCase) {\n return mustMatch ? -1 : utf8ToBytes(string).length // assume utf8\n }\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n let loweredCase = false\n\n // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n // property of a typed array.\n\n // This behaves neither like String nor Uint8Array in that we set start/end\n // to their upper/lower bounds if the value passed is out of range.\n // undefined is handled specially as per ECMA-262 6th Edition,\n // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n if (start === undefined || start < 0) {\n start = 0\n }\n // Return early if start > this.length. Done here to prevent potential uint32\n // coercion fail below.\n if (start > this.length) {\n return ''\n }\n\n if (end === undefined || end > this.length) {\n end = this.length\n }\n\n if (end <= 0) {\n return ''\n }\n\n // Force coercion to uint32. This will also coerce falsey/NaN values to 0.\n end >>>= 0\n start >>>= 0\n\n if (end <= start) {\n return ''\n }\n\n if (!encoding) encoding = 'utf8'\n\n while (true) {\n switch (encoding) {\n case 'hex':\n return hexSlice(this, start, end)\n\n case 'utf8':\n case 'utf-8':\n return utf8Slice(this, start, end)\n\n case 'ascii':\n return asciiSlice(this, start, end)\n\n case 'latin1':\n case 'binary':\n return latin1Slice(this, start, end)\n\n case 'base64':\n return base64Slice(this, start, end)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return utf16leSlice(this, start, end)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = (encoding + '').toLowerCase()\n loweredCase = true\n }\n }\n}\n\n// This property is used by `Buffer.isBuffer` (and the `is-buffer` npm package)\n// to detect a Buffer instance. It's not possible to use `instanceof Buffer`\n// reliably in a browserify context because there could be multiple different\n// copies of the 'buffer' package in use. This method works even for Buffer\n// instances that were created from another copy of the `buffer` package.\n// See: https://github.com/feross/buffer/issues/154\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n const i = b[n]\n b[n] = b[m]\n b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n const len = this.length\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits')\n }\n for (let i = 0; i < len; i += 2) {\n swap(this, i, i + 1)\n }\n return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n const len = this.length\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits')\n }\n for (let i = 0; i < len; i += 4) {\n swap(this, i, i + 3)\n swap(this, i + 1, i + 2)\n }\n return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n const len = this.length\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits')\n }\n for (let i = 0; i < len; i += 8) {\n swap(this, i, i + 7)\n swap(this, i + 1, i + 6)\n swap(this, i + 2, i + 5)\n swap(this, i + 3, i + 4)\n }\n return this\n}\n\nBuffer.prototype.toString = function toString () {\n const length = this.length\n if (length === 0) return ''\n if (arguments.length === 0) return utf8Slice(this, 0, length)\n return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.toLocaleString = Buffer.prototype.toString\n\nBuffer.prototype.equals = function equals (b) {\n if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n if (this === b) return true\n return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n let str = ''\n const max = exports.INSPECT_MAX_BYTES\n str = this.toString('hex', 0, max).replace(/(.{2})/g, '$1 ').trim()\n if (this.length > max) str += ' ... '\n return ''\n}\nif (customInspectSymbol) {\n Buffer.prototype[customInspectSymbol] = Buffer.prototype.inspect\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n if (isInstance(target, Uint8Array)) {\n target = Buffer.from(target, target.offset, target.byteLength)\n }\n if (!Buffer.isBuffer(target)) {\n throw new TypeError(\n 'The \"target\" argument must be one of type Buffer or Uint8Array. ' +\n 'Received type ' + (typeof target)\n )\n }\n\n if (start === undefined) {\n start = 0\n }\n if (end === undefined) {\n end = target ? target.length : 0\n }\n if (thisStart === undefined) {\n thisStart = 0\n }\n if (thisEnd === undefined) {\n thisEnd = this.length\n }\n\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError('out of range index')\n }\n\n if (thisStart >= thisEnd && start >= end) {\n return 0\n }\n if (thisStart >= thisEnd) {\n return -1\n }\n if (start >= end) {\n return 1\n }\n\n start >>>= 0\n end >>>= 0\n thisStart >>>= 0\n thisEnd >>>= 0\n\n if (this === target) return 0\n\n let x = thisEnd - thisStart\n let y = end - start\n const len = Math.min(x, y)\n\n const thisCopy = this.slice(thisStart, thisEnd)\n const targetCopy = target.slice(start, end)\n\n for (let i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i]\n y = targetCopy[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (numberIsNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [val], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n let indexSize = 1\n let arrLength = arr.length\n let valLength = val.length\n\n if (encoding !== undefined) {\n encoding = String(encoding).toLowerCase()\n if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n encoding === 'utf16le' || encoding === 'utf-16le') {\n if (arr.length < 2 || val.length < 2) {\n return -1\n }\n indexSize = 2\n arrLength /= 2\n valLength /= 2\n byteOffset /= 2\n }\n }\n\n function read (buf, i) {\n if (indexSize === 1) {\n return buf[i]\n } else {\n return buf.readUInt16BE(i * indexSize)\n }\n }\n\n let i\n if (dir) {\n let foundIndex = -1\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1) foundIndex = i\n if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n } else {\n if (foundIndex !== -1) i -= i - foundIndex\n foundIndex = -1\n }\n }\n } else {\n if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n for (i = byteOffset; i >= 0; i--) {\n let found = true\n for (let j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false\n break\n }\n }\n if (found) return i\n }\n }\n\n return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n offset = Number(offset) || 0\n const remaining = buf.length - offset\n if (!length) {\n length = remaining\n } else {\n length = Number(length)\n if (length > remaining) {\n length = remaining\n }\n }\n\n const strLen = string.length\n\n if (length > strLen / 2) {\n length = strLen / 2\n }\n let i\n for (i = 0; i < length; ++i) {\n const parsed = parseInt(string.substr(i * 2, 2), 16)\n if (numberIsNaN(parsed)) return i\n buf[offset + i] = parsed\n }\n return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n // Buffer#write(string)\n if (offset === undefined) {\n encoding = 'utf8'\n length = this.length\n offset = 0\n // Buffer#write(string, encoding)\n } else if (length === undefined && typeof offset === 'string') {\n encoding = offset\n length = this.length\n offset = 0\n // Buffer#write(string, offset[, length][, encoding])\n } else if (isFinite(offset)) {\n offset = offset >>> 0\n if (isFinite(length)) {\n length = length >>> 0\n if (encoding === undefined) encoding = 'utf8'\n } else {\n encoding = length\n length = undefined\n }\n } else {\n throw new Error(\n 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n )\n }\n\n const remaining = this.length - offset\n if (length === undefined || length > remaining) length = remaining\n\n if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n throw new RangeError('Attempt to write outside buffer bounds')\n }\n\n if (!encoding) encoding = 'utf8'\n\n let loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'hex':\n return hexWrite(this, string, offset, length)\n\n case 'utf8':\n case 'utf-8':\n return utf8Write(this, string, offset, length)\n\n case 'ascii':\n case 'latin1':\n case 'binary':\n return asciiWrite(this, string, offset, length)\n\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return base64Write(this, string, offset, length)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return ucs2Write(this, string, offset, length)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0)\n }\n}\n\nfunction base64Slice (buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf)\n } else {\n return base64.fromByteArray(buf.slice(start, end))\n }\n}\n\nfunction utf8Slice (buf, start, end) {\n end = Math.min(buf.length, end)\n const res = []\n\n let i = start\n while (i < end) {\n const firstByte = buf[i]\n let codePoint = null\n let bytesPerSequence = (firstByte > 0xEF)\n ? 4\n : (firstByte > 0xDF)\n ? 3\n : (firstByte > 0xBF)\n ? 2\n : 1\n\n if (i + bytesPerSequence <= end) {\n let secondByte, thirdByte, fourthByte, tempCodePoint\n\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 0x80) {\n codePoint = firstByte\n }\n break\n case 2:\n secondByte = buf[i + 1]\n if ((secondByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n if (tempCodePoint > 0x7F) {\n codePoint = tempCodePoint\n }\n }\n break\n case 3:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n codePoint = tempCodePoint\n }\n }\n break\n case 4:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n fourthByte = buf[i + 3]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n codePoint = tempCodePoint\n }\n }\n }\n }\n\n if (codePoint === null) {\n // we did not generate a valid codePoint so insert a\n // replacement char (U+FFFD) and advance only 1 byte\n codePoint = 0xFFFD\n bytesPerSequence = 1\n } else if (codePoint > 0xFFFF) {\n // encode to utf16 (surrogate pair dance)\n codePoint -= 0x10000\n res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n codePoint = 0xDC00 | codePoint & 0x3FF\n }\n\n res.push(codePoint)\n i += bytesPerSequence\n }\n\n return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nconst MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n const len = codePoints.length\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n }\n\n // Decode in chunks to avoid \"call stack size exceeded\".\n let res = ''\n let i = 0\n while (i < len) {\n res += String.fromCharCode.apply(\n String,\n codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n )\n }\n return res\n}\n\nfunction asciiSlice (buf, start, end) {\n let ret = ''\n end = Math.min(buf.length, end)\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F)\n }\n return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n let ret = ''\n end = Math.min(buf.length, end)\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i])\n }\n return ret\n}\n\nfunction hexSlice (buf, start, end) {\n const len = buf.length\n\n if (!start || start < 0) start = 0\n if (!end || end < 0 || end > len) end = len\n\n let out = ''\n for (let i = start; i < end; ++i) {\n out += hexSliceLookupTable[buf[i]]\n }\n return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n const bytes = buf.slice(start, end)\n let res = ''\n // If bytes.length is odd, the last 8 bits must be ignored (same as node.js)\n for (let i = 0; i < bytes.length - 1; i += 2) {\n res += String.fromCharCode(bytes[i] + (bytes[i + 1] * 256))\n }\n return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n const len = this.length\n start = ~~start\n end = end === undefined ? len : ~~end\n\n if (start < 0) {\n start += len\n if (start < 0) start = 0\n } else if (start > len) {\n start = len\n }\n\n if (end < 0) {\n end += len\n if (end < 0) end = 0\n } else if (end > len) {\n end = len\n }\n\n if (end < start) end = start\n\n const newBuf = this.subarray(start, end)\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(newBuf, Buffer.prototype)\n\n return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUintLE =\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let val = this[offset]\n let mul = 1\n let i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUintBE =\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n checkOffset(offset, byteLength, this.length)\n }\n\n let val = this[offset + --byteLength]\n let mul = 1\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUint8 =\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n return this[offset]\n}\n\nBuffer.prototype.readUint16LE =\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUint16BE =\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUint32LE =\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return ((this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16)) +\n (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUint32BE =\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] * 0x1000000) +\n ((this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n this[offset + 3])\n}\n\nBuffer.prototype.readBigUInt64LE = defineBigIntMethod(function readBigUInt64LE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const lo = first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24\n\n const hi = this[++offset] +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n last * 2 ** 24\n\n return BigInt(lo) + (BigInt(hi) << BigInt(32))\n})\n\nBuffer.prototype.readBigUInt64BE = defineBigIntMethod(function readBigUInt64BE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const hi = first * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset]\n\n const lo = this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last\n\n return (BigInt(hi) << BigInt(32)) + BigInt(lo)\n})\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let val = this[offset]\n let mul = 1\n let i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let i = byteLength\n let mul = 1\n let val = this[offset + --i]\n while (i > 0 && (mul *= 0x100)) {\n val += this[offset + --i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n if (!(this[offset] & 0x80)) return (this[offset])\n return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n const val = this[offset] | (this[offset + 1] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n const val = this[offset + 1] | (this[offset] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16) |\n (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] << 24) |\n (this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n (this[offset + 3])\n}\n\nBuffer.prototype.readBigInt64LE = defineBigIntMethod(function readBigInt64LE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const val = this[offset + 4] +\n this[offset + 5] * 2 ** 8 +\n this[offset + 6] * 2 ** 16 +\n (last << 24) // Overflow\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24)\n})\n\nBuffer.prototype.readBigInt64BE = defineBigIntMethod(function readBigInt64BE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const val = (first << 24) + // Overflow\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset]\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last)\n})\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUintLE =\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n let mul = 1\n let i = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUintBE =\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n let i = byteLength - 1\n let mul = 1\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUint8 =\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeUint16LE =\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeUint16BE =\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeUint32LE =\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset + 3] = (value >>> 24)\n this[offset + 2] = (value >>> 16)\n this[offset + 1] = (value >>> 8)\n this[offset] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeUint32BE =\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nfunction wrtBigUInt64LE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7)\n\n let lo = Number(value & BigInt(0xffffffff))\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n return offset\n}\n\nfunction wrtBigUInt64BE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7)\n\n let lo = Number(value & BigInt(0xffffffff))\n buf[offset + 7] = lo\n lo = lo >> 8\n buf[offset + 6] = lo\n lo = lo >> 8\n buf[offset + 5] = lo\n lo = lo >> 8\n buf[offset + 4] = lo\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n buf[offset + 3] = hi\n hi = hi >> 8\n buf[offset + 2] = hi\n hi = hi >> 8\n buf[offset + 1] = hi\n hi = hi >> 8\n buf[offset] = hi\n return offset + 8\n}\n\nBuffer.prototype.writeBigUInt64LE = defineBigIntMethod(function writeBigUInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeBigUInt64BE = defineBigIntMethod(function writeBigUInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n let i = 0\n let mul = 1\n let sub = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n let i = byteLength - 1\n let mul = 1\n let sub = 0\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n if (value < 0) value = 0xff + value + 1\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n this[offset + 2] = (value >>> 16)\n this[offset + 3] = (value >>> 24)\n return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (value < 0) value = 0xffffffff + value + 1\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeBigInt64LE = defineBigIntMethod(function writeBigInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nBuffer.prototype.writeBigInt64BE = defineBigIntMethod(function writeBigInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n }\n ieee754.write(buf, value, offset, littleEndian, 23, 4)\n return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n }\n ieee754.write(buf, value, offset, littleEndian, 52, 8)\n return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n if (!Buffer.isBuffer(target)) throw new TypeError('argument should be a Buffer')\n if (!start) start = 0\n if (!end && end !== 0) end = this.length\n if (targetStart >= target.length) targetStart = target.length\n if (!targetStart) targetStart = 0\n if (end > 0 && end < start) end = start\n\n // Copy 0 bytes; we're done\n if (end === start) return 0\n if (target.length === 0 || this.length === 0) return 0\n\n // Fatal error conditions\n if (targetStart < 0) {\n throw new RangeError('targetStart out of bounds')\n }\n if (start < 0 || start >= this.length) throw new RangeError('Index out of range')\n if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n // Are we oob?\n if (end > this.length) end = this.length\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start\n }\n\n const len = end - start\n\n if (this === target && typeof Uint8Array.prototype.copyWithin === 'function') {\n // Use built-in when available, missing from IE11\n this.copyWithin(targetStart, start, end)\n } else {\n Uint8Array.prototype.set.call(\n target,\n this.subarray(start, end),\n targetStart\n )\n }\n\n return len\n}\n\n// Usage:\n// buffer.fill(number[, offset[, end]])\n// buffer.fill(buffer[, offset[, end]])\n// buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n // Handle string cases:\n if (typeof val === 'string') {\n if (typeof start === 'string') {\n encoding = start\n start = 0\n end = this.length\n } else if (typeof end === 'string') {\n encoding = end\n end = this.length\n }\n if (encoding !== undefined && typeof encoding !== 'string') {\n throw new TypeError('encoding must be a string')\n }\n if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n if (val.length === 1) {\n const code = val.charCodeAt(0)\n if ((encoding === 'utf8' && code < 128) ||\n encoding === 'latin1') {\n // Fast path: If `val` fits into a single byte, use that numeric value.\n val = code\n }\n }\n } else if (typeof val === 'number') {\n val = val & 255\n } else if (typeof val === 'boolean') {\n val = Number(val)\n }\n\n // Invalid ranges are not set to a default, so can range check early.\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError('Out of range index')\n }\n\n if (end <= start) {\n return this\n }\n\n start = start >>> 0\n end = end === undefined ? this.length : end >>> 0\n\n if (!val) val = 0\n\n let i\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val\n }\n } else {\n const bytes = Buffer.isBuffer(val)\n ? val\n : Buffer.from(val, encoding)\n const len = bytes.length\n if (len === 0) {\n throw new TypeError('The value \"' + val +\n '\" is invalid for argument \"value\"')\n }\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len]\n }\n }\n\n return this\n}\n\n// CUSTOM ERRORS\n// =============\n\n// Simplified versions from Node, changed for Buffer-only usage\nconst errors = {}\nfunction E (sym, getMessage, Base) {\n errors[sym] = class NodeError extends Base {\n constructor () {\n super()\n\n Object.defineProperty(this, 'message', {\n value: getMessage.apply(this, arguments),\n writable: true,\n configurable: true\n })\n\n // Add the error code to the name to include it in the stack trace.\n this.name = `${this.name} [${sym}]`\n // Access the stack to generate the error message including the error code\n // from the name.\n this.stack // eslint-disable-line no-unused-expressions\n // Reset the name to the actual name.\n delete this.name\n }\n\n get code () {\n return sym\n }\n\n set code (value) {\n Object.defineProperty(this, 'code', {\n configurable: true,\n enumerable: true,\n value,\n writable: true\n })\n }\n\n toString () {\n return `${this.name} [${sym}]: ${this.message}`\n }\n }\n}\n\nE('ERR_BUFFER_OUT_OF_BOUNDS',\n function (name) {\n if (name) {\n return `${name} is outside of buffer bounds`\n }\n\n return 'Attempt to access memory outside buffer bounds'\n }, RangeError)\nE('ERR_INVALID_ARG_TYPE',\n function (name, actual) {\n return `The \"${name}\" argument must be of type number. Received type ${typeof actual}`\n }, TypeError)\nE('ERR_OUT_OF_RANGE',\n function (str, range, input) {\n let msg = `The value of \"${str}\" is out of range.`\n let received = input\n if (Number.isInteger(input) && Math.abs(input) > 2 ** 32) {\n received = addNumericalSeparator(String(input))\n } else if (typeof input === 'bigint') {\n received = String(input)\n if (input > BigInt(2) ** BigInt(32) || input < -(BigInt(2) ** BigInt(32))) {\n received = addNumericalSeparator(received)\n }\n received += 'n'\n }\n msg += ` It must be ${range}. Received ${received}`\n return msg\n }, RangeError)\n\nfunction addNumericalSeparator (val) {\n let res = ''\n let i = val.length\n const start = val[0] === '-' ? 1 : 0\n for (; i >= start + 4; i -= 3) {\n res = `_${val.slice(i - 3, i)}${res}`\n }\n return `${val.slice(0, i)}${res}`\n}\n\n// CHECK FUNCTIONS\n// ===============\n\nfunction checkBounds (buf, offset, byteLength) {\n validateNumber(offset, 'offset')\n if (buf[offset] === undefined || buf[offset + byteLength] === undefined) {\n boundsError(offset, buf.length - (byteLength + 1))\n }\n}\n\nfunction checkIntBI (value, min, max, buf, offset, byteLength) {\n if (value > max || value < min) {\n const n = typeof min === 'bigint' ? 'n' : ''\n let range\n if (byteLength > 3) {\n if (min === 0 || min === BigInt(0)) {\n range = `>= 0${n} and < 2${n} ** ${(byteLength + 1) * 8}${n}`\n } else {\n range = `>= -(2${n} ** ${(byteLength + 1) * 8 - 1}${n}) and < 2 ** ` +\n `${(byteLength + 1) * 8 - 1}${n}`\n }\n } else {\n range = `>= ${min}${n} and <= ${max}${n}`\n }\n throw new errors.ERR_OUT_OF_RANGE('value', range, value)\n }\n checkBounds(buf, offset, byteLength)\n}\n\nfunction validateNumber (value, name) {\n if (typeof value !== 'number') {\n throw new errors.ERR_INVALID_ARG_TYPE(name, 'number', value)\n }\n}\n\nfunction boundsError (value, length, type) {\n if (Math.floor(value) !== value) {\n validateNumber(value, type)\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset', 'an integer', value)\n }\n\n if (length < 0) {\n throw new errors.ERR_BUFFER_OUT_OF_BOUNDS()\n }\n\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset',\n `>= ${type ? 1 : 0} and <= ${length}`,\n value)\n}\n\n// HELPER FUNCTIONS\n// ================\n\nconst INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n // Node takes equal signs as end of the Base64 encoding\n str = str.split('=')[0]\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = str.trim().replace(INVALID_BASE64_RE, '')\n // Node converts strings with length < 2 to ''\n if (str.length < 2) return ''\n // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n while (str.length % 4 !== 0) {\n str = str + '='\n }\n return str\n}\n\nfunction utf8ToBytes (string, units) {\n units = units || Infinity\n let codePoint\n const length = string.length\n let leadSurrogate = null\n const bytes = []\n\n for (let i = 0; i < length; ++i) {\n codePoint = string.charCodeAt(i)\n\n // is surrogate component\n if (codePoint > 0xD7FF && codePoint < 0xE000) {\n // last char was a lead\n if (!leadSurrogate) {\n // no lead yet\n if (codePoint > 0xDBFF) {\n // unexpected trail\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n } else if (i + 1 === length) {\n // unpaired lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n }\n\n // valid lead\n leadSurrogate = codePoint\n\n continue\n }\n\n // 2 leads in a row\n if (codePoint < 0xDC00) {\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n leadSurrogate = codePoint\n continue\n }\n\n // valid surrogate pair\n codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n } else if (leadSurrogate) {\n // valid bmp char, but last char was a lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n }\n\n leadSurrogate = null\n\n // encode utf8\n if (codePoint < 0x80) {\n if ((units -= 1) < 0) break\n bytes.push(codePoint)\n } else if (codePoint < 0x800) {\n if ((units -= 2) < 0) break\n bytes.push(\n codePoint >> 0x6 | 0xC0,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x10000) {\n if ((units -= 3) < 0) break\n bytes.push(\n codePoint >> 0xC | 0xE0,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x110000) {\n if ((units -= 4) < 0) break\n bytes.push(\n codePoint >> 0x12 | 0xF0,\n codePoint >> 0xC & 0x3F | 0x80,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else {\n throw new Error('Invalid code point')\n }\n }\n\n return bytes\n}\n\nfunction asciiToBytes (str) {\n const byteArray = []\n for (let i = 0; i < str.length; ++i) {\n // Node's code seems to be doing this and not & 0x7F..\n byteArray.push(str.charCodeAt(i) & 0xFF)\n }\n return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n let c, hi, lo\n const byteArray = []\n for (let i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0) break\n\n c = str.charCodeAt(i)\n hi = c >> 8\n lo = c % 256\n byteArray.push(lo)\n byteArray.push(hi)\n }\n\n return byteArray\n}\n\nfunction base64ToBytes (str) {\n return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n let i\n for (i = 0; i < length; ++i) {\n if ((i + offset >= dst.length) || (i >= src.length)) break\n dst[i + offset] = src[i]\n }\n return i\n}\n\n// ArrayBuffer or Uint8Array objects from other contexts (i.e. iframes) do not pass\n// the `instanceof` check but they should be treated as of that type.\n// See: https://github.com/feross/buffer/issues/166\nfunction isInstance (obj, type) {\n return obj instanceof type ||\n (obj != null && obj.constructor != null && obj.constructor.name != null &&\n obj.constructor.name === type.name)\n}\nfunction numberIsNaN (obj) {\n // For IE11 support\n return obj !== obj // eslint-disable-line no-self-compare\n}\n\n// Create lookup table for `toString('hex')`\n// See: https://github.com/feross/buffer/issues/219\nconst hexSliceLookupTable = (function () {\n const alphabet = '0123456789abcdef'\n const table = new Array(256)\n for (let i = 0; i < 16; ++i) {\n const i16 = i * 16\n for (let j = 0; j < 16; ++j) {\n table[i16 + j] = alphabet[i] + alphabet[j]\n }\n }\n return table\n})()\n\n// Return not function with Error if BigInt not supported\nfunction defineBigIntMethod (fn) {\n return typeof BigInt === 'undefined' ? BufferBigIntNotDefined : fn\n}\n\nfunction BufferBigIntNotDefined () {\n throw new Error('BigInt not supported')\n}\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\nvar R = typeof Reflect === 'object' ? Reflect : null\nvar ReflectApply = R && typeof R.apply === 'function'\n ? R.apply\n : function ReflectApply(target, receiver, args) {\n return Function.prototype.apply.call(target, receiver, args);\n }\n\nvar ReflectOwnKeys\nif (R && typeof R.ownKeys === 'function') {\n ReflectOwnKeys = R.ownKeys\n} else if (Object.getOwnPropertySymbols) {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target)\n .concat(Object.getOwnPropertySymbols(target));\n };\n} else {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target);\n };\n}\n\nfunction ProcessEmitWarning(warning) {\n if (console && console.warn) console.warn(warning);\n}\n\nvar NumberIsNaN = Number.isNaN || function NumberIsNaN(value) {\n return value !== value;\n}\n\nfunction EventEmitter() {\n EventEmitter.init.call(this);\n}\nmodule.exports = EventEmitter;\nmodule.exports.once = once;\n\n// Backwards-compat with node 0.10.x\nEventEmitter.EventEmitter = EventEmitter;\n\nEventEmitter.prototype._events = undefined;\nEventEmitter.prototype._eventsCount = 0;\nEventEmitter.prototype._maxListeners = undefined;\n\n// By default EventEmitters will print a warning if more than 10 listeners are\n// added to it. This is a useful default which helps finding memory leaks.\nvar defaultMaxListeners = 10;\n\nfunction checkListener(listener) {\n if (typeof listener !== 'function') {\n throw new TypeError('The \"listener\" argument must be of type Function. Received type ' + typeof listener);\n }\n}\n\nObject.defineProperty(EventEmitter, 'defaultMaxListeners', {\n enumerable: true,\n get: function() {\n return defaultMaxListeners;\n },\n set: function(arg) {\n if (typeof arg !== 'number' || arg < 0 || NumberIsNaN(arg)) {\n throw new RangeError('The value of \"defaultMaxListeners\" is out of range. It must be a non-negative number. Received ' + arg + '.');\n }\n defaultMaxListeners = arg;\n }\n});\n\nEventEmitter.init = function() {\n\n if (this._events === undefined ||\n this._events === Object.getPrototypeOf(this)._events) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n }\n\n this._maxListeners = this._maxListeners || undefined;\n};\n\n// Obviously not all Emitters should be limited to 10. This function allows\n// that to be increased. Set to zero for unlimited.\nEventEmitter.prototype.setMaxListeners = function setMaxListeners(n) {\n if (typeof n !== 'number' || n < 0 || NumberIsNaN(n)) {\n throw new RangeError('The value of \"n\" is out of range. It must be a non-negative number. Received ' + n + '.');\n }\n this._maxListeners = n;\n return this;\n};\n\nfunction _getMaxListeners(that) {\n if (that._maxListeners === undefined)\n return EventEmitter.defaultMaxListeners;\n return that._maxListeners;\n}\n\nEventEmitter.prototype.getMaxListeners = function getMaxListeners() {\n return _getMaxListeners(this);\n};\n\nEventEmitter.prototype.emit = function emit(type) {\n var args = [];\n for (var i = 1; i < arguments.length; i++) args.push(arguments[i]);\n var doError = (type === 'error');\n\n var events = this._events;\n if (events !== undefined)\n doError = (doError && events.error === undefined);\n else if (!doError)\n return false;\n\n // If there is no 'error' event listener then throw.\n if (doError) {\n var er;\n if (args.length > 0)\n er = args[0];\n if (er instanceof Error) {\n // Note: The comments on the `throw` lines are intentional, they show\n // up in Node's output if this results in an unhandled exception.\n throw er; // Unhandled 'error' event\n }\n // At least give some kind of context to the user\n var err = new Error('Unhandled error.' + (er ? ' (' + er.message + ')' : ''));\n err.context = er;\n throw err; // Unhandled 'error' event\n }\n\n var handler = events[type];\n\n if (handler === undefined)\n return false;\n\n if (typeof handler === 'function') {\n ReflectApply(handler, this, args);\n } else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n ReflectApply(listeners[i], this, args);\n }\n\n return true;\n};\n\nfunction _addListener(target, type, listener, prepend) {\n var m;\n var events;\n var existing;\n\n checkListener(listener);\n\n events = target._events;\n if (events === undefined) {\n events = target._events = Object.create(null);\n target._eventsCount = 0;\n } else {\n // To avoid recursion in the case that type === \"newListener\"! Before\n // adding it to the listeners, first emit \"newListener\".\n if (events.newListener !== undefined) {\n target.emit('newListener', type,\n listener.listener ? listener.listener : listener);\n\n // Re-assign `events` because a newListener handler could have caused the\n // this._events to be assigned to a new object\n events = target._events;\n }\n existing = events[type];\n }\n\n if (existing === undefined) {\n // Optimize the case of one listener. Don't need the extra array object.\n existing = events[type] = listener;\n ++target._eventsCount;\n } else {\n if (typeof existing === 'function') {\n // Adding the second element, need to change to array.\n existing = events[type] =\n prepend ? [listener, existing] : [existing, listener];\n // If we've already got an array, just append.\n } else if (prepend) {\n existing.unshift(listener);\n } else {\n existing.push(listener);\n }\n\n // Check for listener leak\n m = _getMaxListeners(target);\n if (m > 0 && existing.length > m && !existing.warned) {\n existing.warned = true;\n // No error code for this since it is a Warning\n // eslint-disable-next-line no-restricted-syntax\n var w = new Error('Possible EventEmitter memory leak detected. ' +\n existing.length + ' ' + String(type) + ' listeners ' +\n 'added. Use emitter.setMaxListeners() to ' +\n 'increase limit');\n w.name = 'MaxListenersExceededWarning';\n w.emitter = target;\n w.type = type;\n w.count = existing.length;\n ProcessEmitWarning(w);\n }\n }\n\n return target;\n}\n\nEventEmitter.prototype.addListener = function addListener(type, listener) {\n return _addListener(this, type, listener, false);\n};\n\nEventEmitter.prototype.on = EventEmitter.prototype.addListener;\n\nEventEmitter.prototype.prependListener =\n function prependListener(type, listener) {\n return _addListener(this, type, listener, true);\n };\n\nfunction onceWrapper() {\n if (!this.fired) {\n this.target.removeListener(this.type, this.wrapFn);\n this.fired = true;\n if (arguments.length === 0)\n return this.listener.call(this.target);\n return this.listener.apply(this.target, arguments);\n }\n}\n\nfunction _onceWrap(target, type, listener) {\n var state = { fired: false, wrapFn: undefined, target: target, type: type, listener: listener };\n var wrapped = onceWrapper.bind(state);\n wrapped.listener = listener;\n state.wrapFn = wrapped;\n return wrapped;\n}\n\nEventEmitter.prototype.once = function once(type, listener) {\n checkListener(listener);\n this.on(type, _onceWrap(this, type, listener));\n return this;\n};\n\nEventEmitter.prototype.prependOnceListener =\n function prependOnceListener(type, listener) {\n checkListener(listener);\n this.prependListener(type, _onceWrap(this, type, listener));\n return this;\n };\n\n// Emits a 'removeListener' event if and only if the listener was removed.\nEventEmitter.prototype.removeListener =\n function removeListener(type, listener) {\n var list, events, position, i, originalListener;\n\n checkListener(listener);\n\n events = this._events;\n if (events === undefined)\n return this;\n\n list = events[type];\n if (list === undefined)\n return this;\n\n if (list === listener || list.listener === listener) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else {\n delete events[type];\n if (events.removeListener)\n this.emit('removeListener', type, list.listener || listener);\n }\n } else if (typeof list !== 'function') {\n position = -1;\n\n for (i = list.length - 1; i >= 0; i--) {\n if (list[i] === listener || list[i].listener === listener) {\n originalListener = list[i].listener;\n position = i;\n break;\n }\n }\n\n if (position < 0)\n return this;\n\n if (position === 0)\n list.shift();\n else {\n spliceOne(list, position);\n }\n\n if (list.length === 1)\n events[type] = list[0];\n\n if (events.removeListener !== undefined)\n this.emit('removeListener', type, originalListener || listener);\n }\n\n return this;\n };\n\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\n\nEventEmitter.prototype.removeAllListeners =\n function removeAllListeners(type) {\n var listeners, events, i;\n\n events = this._events;\n if (events === undefined)\n return this;\n\n // not listening for removeListener, no need to emit\n if (events.removeListener === undefined) {\n if (arguments.length === 0) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n } else if (events[type] !== undefined) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else\n delete events[type];\n }\n return this;\n }\n\n // emit removeListener for all listeners on all events\n if (arguments.length === 0) {\n var keys = Object.keys(events);\n var key;\n for (i = 0; i < keys.length; ++i) {\n key = keys[i];\n if (key === 'removeListener') continue;\n this.removeAllListeners(key);\n }\n this.removeAllListeners('removeListener');\n this._events = Object.create(null);\n this._eventsCount = 0;\n return this;\n }\n\n listeners = events[type];\n\n if (typeof listeners === 'function') {\n this.removeListener(type, listeners);\n } else if (listeners !== undefined) {\n // LIFO order\n for (i = listeners.length - 1; i >= 0; i--) {\n this.removeListener(type, listeners[i]);\n }\n }\n\n return this;\n };\n\nfunction _listeners(target, type, unwrap) {\n var events = target._events;\n\n if (events === undefined)\n return [];\n\n var evlistener = events[type];\n if (evlistener === undefined)\n return [];\n\n if (typeof evlistener === 'function')\n return unwrap ? [evlistener.listener || evlistener] : [evlistener];\n\n return unwrap ?\n unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length);\n}\n\nEventEmitter.prototype.listeners = function listeners(type) {\n return _listeners(this, type, true);\n};\n\nEventEmitter.prototype.rawListeners = function rawListeners(type) {\n return _listeners(this, type, false);\n};\n\nEventEmitter.listenerCount = function(emitter, type) {\n if (typeof emitter.listenerCount === 'function') {\n return emitter.listenerCount(type);\n } else {\n return listenerCount.call(emitter, type);\n }\n};\n\nEventEmitter.prototype.listenerCount = listenerCount;\nfunction listenerCount(type) {\n var events = this._events;\n\n if (events !== undefined) {\n var evlistener = events[type];\n\n if (typeof evlistener === 'function') {\n return 1;\n } else if (evlistener !== undefined) {\n return evlistener.length;\n }\n }\n\n return 0;\n}\n\nEventEmitter.prototype.eventNames = function eventNames() {\n return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : [];\n};\n\nfunction arrayClone(arr, n) {\n var copy = new Array(n);\n for (var i = 0; i < n; ++i)\n copy[i] = arr[i];\n return copy;\n}\n\nfunction spliceOne(list, index) {\n for (; index + 1 < list.length; index++)\n list[index] = list[index + 1];\n list.pop();\n}\n\nfunction unwrapListeners(arr) {\n var ret = new Array(arr.length);\n for (var i = 0; i < ret.length; ++i) {\n ret[i] = arr[i].listener || arr[i];\n }\n return ret;\n}\n\nfunction once(emitter, name) {\n return new Promise(function (resolve, reject) {\n function errorListener(err) {\n emitter.removeListener(name, resolver);\n reject(err);\n }\n\n function resolver() {\n if (typeof emitter.removeListener === 'function') {\n emitter.removeListener('error', errorListener);\n }\n resolve([].slice.call(arguments));\n };\n\n eventTargetAgnosticAddListener(emitter, name, resolver, { once: true });\n if (name !== 'error') {\n addErrorHandlerIfEventEmitter(emitter, errorListener, { once: true });\n }\n });\n}\n\nfunction addErrorHandlerIfEventEmitter(emitter, handler, flags) {\n if (typeof emitter.on === 'function') {\n eventTargetAgnosticAddListener(emitter, 'error', handler, flags);\n }\n}\n\nfunction eventTargetAgnosticAddListener(emitter, name, listener, flags) {\n if (typeof emitter.on === 'function') {\n if (flags.once) {\n emitter.once(name, listener);\n } else {\n emitter.on(name, listener);\n }\n } else if (typeof emitter.addEventListener === 'function') {\n // EventTarget does not have `error` event semantics like Node\n // EventEmitters, we do not listen for `error` events here.\n emitter.addEventListener(name, function wrapListener(arg) {\n // IE does not have builtin `{ once: true }` support so we\n // have to do it manually.\n if (flags.once) {\n emitter.removeEventListener(name, wrapListener);\n }\n listener(arg);\n });\n } else {\n throw new TypeError('The \"emitter\" argument must be of type EventEmitter. Received type ' + typeof emitter);\n }\n}\n","/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */\nexports.read = function (buffer, offset, isLE, mLen, nBytes) {\n var e, m\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var nBits = -7\n var i = isLE ? (nBytes - 1) : 0\n var d = isLE ? -1 : 1\n var s = buffer[offset + i]\n\n i += d\n\n e = s & ((1 << (-nBits)) - 1)\n s >>= (-nBits)\n nBits += eLen\n for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & ((1 << (-nBits)) - 1)\n e >>= (-nBits)\n nBits += mLen\n for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias\n } else if (e === eMax) {\n return m ? NaN : ((s ? -1 : 1) * Infinity)\n } else {\n m = m + Math.pow(2, mLen)\n e = e - eBias\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n var i = isLE ? 0 : (nBytes - 1)\n var d = isLE ? 1 : -1\n var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n value = Math.abs(value)\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0\n e = eMax\n } else {\n e = Math.floor(Math.log(value) / Math.LN2)\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--\n c *= 2\n }\n if (e + eBias >= 1) {\n value += rt / c\n } else {\n value += rt * Math.pow(2, 1 - eBias)\n }\n if (value * c >= 2) {\n e++\n c /= 2\n }\n\n if (e + eBias >= eMax) {\n m = 0\n e = eMax\n } else if (e + eBias >= 1) {\n m = ((value * c) - 1) * Math.pow(2, mLen)\n e = e + eBias\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n e = 0\n }\n }\n\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n e = (e << mLen) | m\n eLen += mLen\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128\n}\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView');\n\nmodule.exports = DataView;\n","var hashClear = require('./_hashClear'),\n hashDelete = require('./_hashDelete'),\n hashGet = require('./_hashGet'),\n hashHas = require('./_hashHas'),\n hashSet = require('./_hashSet');\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\nmodule.exports = Hash;\n","var listCacheClear = require('./_listCacheClear'),\n listCacheDelete = require('./_listCacheDelete'),\n listCacheGet = require('./_listCacheGet'),\n listCacheHas = require('./_listCacheHas'),\n listCacheSet = require('./_listCacheSet');\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\nmodule.exports = ListCache;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map');\n\nmodule.exports = Map;\n","var mapCacheClear = require('./_mapCacheClear'),\n mapCacheDelete = require('./_mapCacheDelete'),\n mapCacheGet = require('./_mapCacheGet'),\n mapCacheHas = require('./_mapCacheHas'),\n mapCacheSet = require('./_mapCacheSet');\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\nmodule.exports = MapCache;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Promise = getNative(root, 'Promise');\n\nmodule.exports = Promise;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Set = getNative(root, 'Set');\n\nmodule.exports = Set;\n","var MapCache = require('./_MapCache'),\n setCacheAdd = require('./_setCacheAdd'),\n setCacheHas = require('./_setCacheHas');\n\n/**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\nfunction SetCache(values) {\n var index = -1,\n length = values == null ? 0 : values.length;\n\n this.__data__ = new MapCache;\n while (++index < length) {\n this.add(values[index]);\n }\n}\n\n// Add methods to `SetCache`.\nSetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\nSetCache.prototype.has = setCacheHas;\n\nmodule.exports = SetCache;\n","var ListCache = require('./_ListCache'),\n stackClear = require('./_stackClear'),\n stackDelete = require('./_stackDelete'),\n stackGet = require('./_stackGet'),\n stackHas = require('./_stackHas'),\n stackSet = require('./_stackSet');\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\nmodule.exports = Stack;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Uint8Array = root.Uint8Array;\n\nmodule.exports = Uint8Array;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar WeakMap = getNative(root, 'WeakMap');\n\nmodule.exports = WeakMap;\n","/**\n * A specialized version of `_.forEach` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\nfunction arrayEach(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (iteratee(array[index], index, array) === false) {\n break;\n }\n }\n return array;\n}\n\nmodule.exports = arrayEach;\n","/**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\nfunction arrayFilter(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result[resIndex++] = value;\n }\n }\n return result;\n}\n\nmodule.exports = arrayFilter;\n","var baseTimes = require('./_baseTimes'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isIndex = require('./_isIndex'),\n isTypedArray = require('./isTypedArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = arrayLikeKeys;\n","/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n}\n\nmodule.exports = arrayPush;\n","/**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\nfunction arraySome(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (predicate(array[index], index, array)) {\n return true;\n }\n }\n return false;\n}\n\nmodule.exports = arraySome;\n","var baseAssignValue = require('./_baseAssignValue'),\n eq = require('./eq');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\nmodule.exports = assignValue;\n","var eq = require('./eq');\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\nmodule.exports = assocIndexOf;\n","var copyObject = require('./_copyObject'),\n keys = require('./keys');\n\n/**\n * The base implementation of `_.assign` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssign(object, source) {\n return object && copyObject(source, keys(source), object);\n}\n\nmodule.exports = baseAssign;\n","var copyObject = require('./_copyObject'),\n keysIn = require('./keysIn');\n\n/**\n * The base implementation of `_.assignIn` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssignIn(object, source) {\n return object && copyObject(source, keysIn(source), object);\n}\n\nmodule.exports = baseAssignIn;\n","var defineProperty = require('./_defineProperty');\n\n/**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction baseAssignValue(object, key, value) {\n if (key == '__proto__' && defineProperty) {\n defineProperty(object, key, {\n 'configurable': true,\n 'enumerable': true,\n 'value': value,\n 'writable': true\n });\n } else {\n object[key] = value;\n }\n}\n\nmodule.exports = baseAssignValue;\n","var Stack = require('./_Stack'),\n arrayEach = require('./_arrayEach'),\n assignValue = require('./_assignValue'),\n baseAssign = require('./_baseAssign'),\n baseAssignIn = require('./_baseAssignIn'),\n cloneBuffer = require('./_cloneBuffer'),\n copyArray = require('./_copyArray'),\n copySymbols = require('./_copySymbols'),\n copySymbolsIn = require('./_copySymbolsIn'),\n getAllKeys = require('./_getAllKeys'),\n getAllKeysIn = require('./_getAllKeysIn'),\n getTag = require('./_getTag'),\n initCloneArray = require('./_initCloneArray'),\n initCloneByTag = require('./_initCloneByTag'),\n initCloneObject = require('./_initCloneObject'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isMap = require('./isMap'),\n isObject = require('./isObject'),\n isSet = require('./isSet'),\n keys = require('./keys'),\n keysIn = require('./keysIn');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_FLAT_FLAG = 2,\n CLONE_SYMBOLS_FLAG = 4;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values supported by `_.clone`. */\nvar cloneableTags = {};\ncloneableTags[argsTag] = cloneableTags[arrayTag] =\ncloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =\ncloneableTags[boolTag] = cloneableTags[dateTag] =\ncloneableTags[float32Tag] = cloneableTags[float64Tag] =\ncloneableTags[int8Tag] = cloneableTags[int16Tag] =\ncloneableTags[int32Tag] = cloneableTags[mapTag] =\ncloneableTags[numberTag] = cloneableTags[objectTag] =\ncloneableTags[regexpTag] = cloneableTags[setTag] =\ncloneableTags[stringTag] = cloneableTags[symbolTag] =\ncloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =\ncloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;\ncloneableTags[errorTag] = cloneableTags[funcTag] =\ncloneableTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.clone` and `_.cloneDeep` which tracks\n * traversed objects.\n *\n * @private\n * @param {*} value The value to clone.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Deep clone\n * 2 - Flatten inherited properties\n * 4 - Clone symbols\n * @param {Function} [customizer] The function to customize cloning.\n * @param {string} [key] The key of `value`.\n * @param {Object} [object] The parent object of `value`.\n * @param {Object} [stack] Tracks traversed objects and their clone counterparts.\n * @returns {*} Returns the cloned value.\n */\nfunction baseClone(value, bitmask, customizer, key, object, stack) {\n var result,\n isDeep = bitmask & CLONE_DEEP_FLAG,\n isFlat = bitmask & CLONE_FLAT_FLAG,\n isFull = bitmask & CLONE_SYMBOLS_FLAG;\n\n if (customizer) {\n result = object ? customizer(value, key, object, stack) : customizer(value);\n }\n if (result !== undefined) {\n return result;\n }\n if (!isObject(value)) {\n return value;\n }\n var isArr = isArray(value);\n if (isArr) {\n result = initCloneArray(value);\n if (!isDeep) {\n return copyArray(value, result);\n }\n } else {\n var tag = getTag(value),\n isFunc = tag == funcTag || tag == genTag;\n\n if (isBuffer(value)) {\n return cloneBuffer(value, isDeep);\n }\n if (tag == objectTag || tag == argsTag || (isFunc && !object)) {\n result = (isFlat || isFunc) ? {} : initCloneObject(value);\n if (!isDeep) {\n return isFlat\n ? copySymbolsIn(value, baseAssignIn(result, value))\n : copySymbols(value, baseAssign(result, value));\n }\n } else {\n if (!cloneableTags[tag]) {\n return object ? value : {};\n }\n result = initCloneByTag(value, tag, isDeep);\n }\n }\n // Check for circular references and return its corresponding clone.\n stack || (stack = new Stack);\n var stacked = stack.get(value);\n if (stacked) {\n return stacked;\n }\n stack.set(value, result);\n\n if (isSet(value)) {\n value.forEach(function(subValue) {\n result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));\n });\n } else if (isMap(value)) {\n value.forEach(function(subValue, key) {\n result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n }\n\n var keysFunc = isFull\n ? (isFlat ? getAllKeysIn : getAllKeys)\n : (isFlat ? keysIn : keys);\n\n var props = isArr ? undefined : keysFunc(value);\n arrayEach(props || value, function(subValue, key) {\n if (props) {\n key = subValue;\n subValue = value[key];\n }\n // Recursively populate clone (susceptible to call stack limits).\n assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n return result;\n}\n\nmodule.exports = baseClone;\n","var isObject = require('./isObject');\n\n/** Built-in value references. */\nvar objectCreate = Object.create;\n\n/**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} proto The object to inherit from.\n * @returns {Object} Returns the new object.\n */\nvar baseCreate = (function() {\n function object() {}\n return function(proto) {\n if (!isObject(proto)) {\n return {};\n }\n if (objectCreate) {\n return objectCreate(proto);\n }\n object.prototype = proto;\n var result = new object;\n object.prototype = undefined;\n return result;\n };\n}());\n\nmodule.exports = baseCreate;\n","var arrayPush = require('./_arrayPush'),\n isArray = require('./isArray');\n\n/**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction baseGetAllKeys(object, keysFunc, symbolsFunc) {\n var result = keysFunc(object);\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n}\n\nmodule.exports = baseGetAllKeys;\n","var Symbol = require('./_Symbol'),\n getRawTag = require('./_getRawTag'),\n objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]';\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\nmodule.exports = baseIsArguments;\n","var baseIsEqualDeep = require('./_baseIsEqualDeep'),\n isObjectLike = require('./isObjectLike');\n\n/**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Unordered comparison\n * 2 - Partial comparison\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\nfunction baseIsEqual(value, other, bitmask, customizer, stack) {\n if (value === other) {\n return true;\n }\n if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\n return value !== value && other !== other;\n }\n return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n}\n\nmodule.exports = baseIsEqual;\n","var Stack = require('./_Stack'),\n equalArrays = require('./_equalArrays'),\n equalByTag = require('./_equalByTag'),\n equalObjects = require('./_equalObjects'),\n getTag = require('./_getTag'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isTypedArray = require('./isTypedArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n var objIsArr = isArray(object),\n othIsArr = isArray(other),\n objTag = objIsArr ? arrayTag : getTag(object),\n othTag = othIsArr ? arrayTag : getTag(other);\n\n objTag = objTag == argsTag ? objectTag : objTag;\n othTag = othTag == argsTag ? objectTag : othTag;\n\n var objIsObj = objTag == objectTag,\n othIsObj = othTag == objectTag,\n isSameTag = objTag == othTag;\n\n if (isSameTag && isBuffer(object)) {\n if (!isBuffer(other)) {\n return false;\n }\n objIsArr = true;\n objIsObj = false;\n }\n if (isSameTag && !objIsObj) {\n stack || (stack = new Stack);\n return (objIsArr || isTypedArray(object))\n ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n }\n if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n if (objIsWrapped || othIsWrapped) {\n var objUnwrapped = objIsWrapped ? object.value() : object,\n othUnwrapped = othIsWrapped ? other.value() : other;\n\n stack || (stack = new Stack);\n return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n }\n }\n if (!isSameTag) {\n return false;\n }\n stack || (stack = new Stack);\n return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n}\n\nmodule.exports = baseIsEqualDeep;\n","var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]';\n\n/**\n * The base implementation of `_.isMap` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n */\nfunction baseIsMap(value) {\n return isObjectLike(value) && getTag(value) == mapTag;\n}\n\nmodule.exports = baseIsMap;\n","var isFunction = require('./isFunction'),\n isMasked = require('./_isMasked'),\n isObject = require('./isObject'),\n toSource = require('./_toSource');\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\nmodule.exports = baseIsNative;\n","var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar setTag = '[object Set]';\n\n/**\n * The base implementation of `_.isSet` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n */\nfunction baseIsSet(value) {\n return isObjectLike(value) && getTag(value) == setTag;\n}\n\nmodule.exports = baseIsSet;\n","var baseGetTag = require('./_baseGetTag'),\n isLength = require('./isLength'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n\nmodule.exports = baseIsTypedArray;\n","var isPrototype = require('./_isPrototype'),\n nativeKeys = require('./_nativeKeys');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeys;\n","var isObject = require('./isObject'),\n isPrototype = require('./_isPrototype'),\n nativeKeysIn = require('./_nativeKeysIn');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeysIn(object) {\n if (!isObject(object)) {\n return nativeKeysIn(object);\n }\n var isProto = isPrototype(object),\n result = [];\n\n for (var key in object) {\n if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeysIn;\n","/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\nmodule.exports = baseTimes;\n","/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n return function(value) {\n return func(value);\n };\n}\n\nmodule.exports = baseUnary;\n","/**\n * Checks if a `cache` value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction cacheHas(cache, key) {\n return cache.has(key);\n}\n\nmodule.exports = cacheHas;\n","var Uint8Array = require('./_Uint8Array');\n\n/**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\nfunction cloneArrayBuffer(arrayBuffer) {\n var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n return result;\n}\n\nmodule.exports = cloneArrayBuffer;\n","var root = require('./_root');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined,\n allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;\n\n/**\n * Creates a clone of `buffer`.\n *\n * @private\n * @param {Buffer} buffer The buffer to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Buffer} Returns the cloned buffer.\n */\nfunction cloneBuffer(buffer, isDeep) {\n if (isDeep) {\n return buffer.slice();\n }\n var length = buffer.length,\n result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\n\n buffer.copy(result);\n return result;\n}\n\nmodule.exports = cloneBuffer;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer');\n\n/**\n * Creates a clone of `dataView`.\n *\n * @private\n * @param {Object} dataView The data view to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned data view.\n */\nfunction cloneDataView(dataView, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;\n return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);\n}\n\nmodule.exports = cloneDataView;\n","/** Used to match `RegExp` flags from their coerced string values. */\nvar reFlags = /\\w*$/;\n\n/**\n * Creates a clone of `regexp`.\n *\n * @private\n * @param {Object} regexp The regexp to clone.\n * @returns {Object} Returns the cloned regexp.\n */\nfunction cloneRegExp(regexp) {\n var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));\n result.lastIndex = regexp.lastIndex;\n return result;\n}\n\nmodule.exports = cloneRegExp;\n","var Symbol = require('./_Symbol');\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * Creates a clone of the `symbol` object.\n *\n * @private\n * @param {Object} symbol The symbol object to clone.\n * @returns {Object} Returns the cloned symbol object.\n */\nfunction cloneSymbol(symbol) {\n return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};\n}\n\nmodule.exports = cloneSymbol;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer');\n\n/**\n * Creates a clone of `typedArray`.\n *\n * @private\n * @param {Object} typedArray The typed array to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned typed array.\n */\nfunction cloneTypedArray(typedArray, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n}\n\nmodule.exports = cloneTypedArray;\n","/**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\nfunction copyArray(source, array) {\n var index = -1,\n length = source.length;\n\n array || (array = Array(length));\n while (++index < length) {\n array[index] = source[index];\n }\n return array;\n}\n\nmodule.exports = copyArray;\n","var assignValue = require('./_assignValue'),\n baseAssignValue = require('./_baseAssignValue');\n\n/**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\nfunction copyObject(source, props, object, customizer) {\n var isNew = !object;\n object || (object = {});\n\n var index = -1,\n length = props.length;\n\n while (++index < length) {\n var key = props[index];\n\n var newValue = customizer\n ? customizer(object[key], source[key], key, object, source)\n : undefined;\n\n if (newValue === undefined) {\n newValue = source[key];\n }\n if (isNew) {\n baseAssignValue(object, key, newValue);\n } else {\n assignValue(object, key, newValue);\n }\n }\n return object;\n}\n\nmodule.exports = copyObject;\n","var copyObject = require('./_copyObject'),\n getSymbols = require('./_getSymbols');\n\n/**\n * Copies own symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbols(source, object) {\n return copyObject(source, getSymbols(source), object);\n}\n\nmodule.exports = copySymbols;\n","var copyObject = require('./_copyObject'),\n getSymbolsIn = require('./_getSymbolsIn');\n\n/**\n * Copies own and inherited symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbolsIn(source, object) {\n return copyObject(source, getSymbolsIn(source), object);\n}\n\nmodule.exports = copySymbolsIn;\n","var root = require('./_root');\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\nmodule.exports = coreJsData;\n","var getNative = require('./_getNative');\n\nvar defineProperty = (function() {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n}());\n\nmodule.exports = defineProperty;\n","var SetCache = require('./_SetCache'),\n arraySome = require('./_arraySome'),\n cacheHas = require('./_cacheHas');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\nfunction equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n arrLength = array.length,\n othLength = other.length;\n\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n return false;\n }\n // Check that cyclic values are equal.\n var arrStacked = stack.get(array);\n var othStacked = stack.get(other);\n if (arrStacked && othStacked) {\n return arrStacked == other && othStacked == array;\n }\n var index = -1,\n result = true,\n seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n stack.set(array, other);\n stack.set(other, array);\n\n // Ignore non-index properties.\n while (++index < arrLength) {\n var arrValue = array[index],\n othValue = other[index];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, arrValue, index, other, array, stack)\n : customizer(arrValue, othValue, index, array, other, stack);\n }\n if (compared !== undefined) {\n if (compared) {\n continue;\n }\n result = false;\n break;\n }\n // Recursively compare arrays (susceptible to call stack limits).\n if (seen) {\n if (!arraySome(other, function(othValue, othIndex) {\n if (!cacheHas(seen, othIndex) &&\n (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n return seen.push(othIndex);\n }\n })) {\n result = false;\n break;\n }\n } else if (!(\n arrValue === othValue ||\n equalFunc(arrValue, othValue, bitmask, customizer, stack)\n )) {\n result = false;\n break;\n }\n }\n stack['delete'](array);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalArrays;\n","var Symbol = require('./_Symbol'),\n Uint8Array = require('./_Uint8Array'),\n eq = require('./eq'),\n equalArrays = require('./_equalArrays'),\n mapToArray = require('./_mapToArray'),\n setToArray = require('./_setToArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]';\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n switch (tag) {\n case dataViewTag:\n if ((object.byteLength != other.byteLength) ||\n (object.byteOffset != other.byteOffset)) {\n return false;\n }\n object = object.buffer;\n other = other.buffer;\n\n case arrayBufferTag:\n if ((object.byteLength != other.byteLength) ||\n !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n return false;\n }\n return true;\n\n case boolTag:\n case dateTag:\n case numberTag:\n // Coerce booleans to `1` or `0` and dates to milliseconds.\n // Invalid dates are coerced to `NaN`.\n return eq(+object, +other);\n\n case errorTag:\n return object.name == other.name && object.message == other.message;\n\n case regexpTag:\n case stringTag:\n // Coerce regexes to strings and treat strings, primitives and objects,\n // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n // for more details.\n return object == (other + '');\n\n case mapTag:\n var convert = mapToArray;\n\n case setTag:\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n convert || (convert = setToArray);\n\n if (object.size != other.size && !isPartial) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked) {\n return stacked == other;\n }\n bitmask |= COMPARE_UNORDERED_FLAG;\n\n // Recursively compare objects (susceptible to call stack limits).\n stack.set(object, other);\n var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n stack['delete'](object);\n return result;\n\n case symbolTag:\n if (symbolValueOf) {\n return symbolValueOf.call(object) == symbolValueOf.call(other);\n }\n }\n return false;\n}\n\nmodule.exports = equalByTag;\n","var getAllKeys = require('./_getAllKeys');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n objProps = getAllKeys(object),\n objLength = objProps.length,\n othProps = getAllKeys(other),\n othLength = othProps.length;\n\n if (objLength != othLength && !isPartial) {\n return false;\n }\n var index = objLength;\n while (index--) {\n var key = objProps[index];\n if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n return false;\n }\n }\n // Check that cyclic values are equal.\n var objStacked = stack.get(object);\n var othStacked = stack.get(other);\n if (objStacked && othStacked) {\n return objStacked == other && othStacked == object;\n }\n var result = true;\n stack.set(object, other);\n stack.set(other, object);\n\n var skipCtor = isPartial;\n while (++index < objLength) {\n key = objProps[index];\n var objValue = object[key],\n othValue = other[key];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, objValue, key, other, object, stack)\n : customizer(objValue, othValue, key, object, other, stack);\n }\n // Recursively compare objects (susceptible to call stack limits).\n if (!(compared === undefined\n ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n : compared\n )) {\n result = false;\n break;\n }\n skipCtor || (skipCtor = key == 'constructor');\n }\n if (result && !skipCtor) {\n var objCtor = object.constructor,\n othCtor = other.constructor;\n\n // Non `Object` object instances with different constructors are not equal.\n if (objCtor != othCtor &&\n ('constructor' in object && 'constructor' in other) &&\n !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n result = false;\n }\n }\n stack['delete'](object);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalObjects;\n","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n","var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbols = require('./_getSymbols'),\n keys = require('./keys');\n\n/**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeys(object) {\n return baseGetAllKeys(object, keys, getSymbols);\n}\n\nmodule.exports = getAllKeys;\n","var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbolsIn = require('./_getSymbolsIn'),\n keysIn = require('./keysIn');\n\n/**\n * Creates an array of own and inherited enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeysIn(object) {\n return baseGetAllKeys(object, keysIn, getSymbolsIn);\n}\n\nmodule.exports = getAllKeysIn;\n","var isKeyable = require('./_isKeyable');\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\nmodule.exports = getMapData;\n","var baseIsNative = require('./_baseIsNative'),\n getValue = require('./_getValue');\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\nmodule.exports = getNative;\n","var overArg = require('./_overArg');\n\n/** Built-in value references. */\nvar getPrototype = overArg(Object.getPrototypeOf, Object);\n\nmodule.exports = getPrototype;\n","var Symbol = require('./_Symbol');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nmodule.exports = getRawTag;\n","var arrayFilter = require('./_arrayFilter'),\n stubArray = require('./stubArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n if (object == null) {\n return [];\n }\n object = Object(object);\n return arrayFilter(nativeGetSymbols(object), function(symbol) {\n return propertyIsEnumerable.call(object, symbol);\n });\n};\n\nmodule.exports = getSymbols;\n","var arrayPush = require('./_arrayPush'),\n getPrototype = require('./_getPrototype'),\n getSymbols = require('./_getSymbols'),\n stubArray = require('./stubArray');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own and inherited enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {\n var result = [];\n while (object) {\n arrayPush(result, getSymbols(object));\n object = getPrototype(object);\n }\n return result;\n};\n\nmodule.exports = getSymbolsIn;\n","var DataView = require('./_DataView'),\n Map = require('./_Map'),\n Promise = require('./_Promise'),\n Set = require('./_Set'),\n WeakMap = require('./_WeakMap'),\n baseGetTag = require('./_baseGetTag'),\n toSource = require('./_toSource');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n setTag = '[object Set]',\n weakMapTag = '[object WeakMap]';\n\nvar dataViewTag = '[object DataView]';\n\n/** Used to detect maps, sets, and weakmaps. */\nvar dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nvar getTag = baseGetTag;\n\n// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\nif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = baseGetTag(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : '';\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n}\n\nmodule.exports = getTag;\n","/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\nmodule.exports = getValue;\n","var nativeCreate = require('./_nativeCreate');\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n}\n\nmodule.exports = hashClear;\n","/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = hashDelete;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\nmodule.exports = hashGet;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\nmodule.exports = hashHas;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\nmodule.exports = hashSet;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Initializes an array clone.\n *\n * @private\n * @param {Array} array The array to clone.\n * @returns {Array} Returns the initialized clone.\n */\nfunction initCloneArray(array) {\n var length = array.length,\n result = new array.constructor(length);\n\n // Add properties assigned by `RegExp#exec`.\n if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {\n result.index = array.index;\n result.input = array.input;\n }\n return result;\n}\n\nmodule.exports = initCloneArray;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer'),\n cloneDataView = require('./_cloneDataView'),\n cloneRegExp = require('./_cloneRegExp'),\n cloneSymbol = require('./_cloneSymbol'),\n cloneTypedArray = require('./_cloneTypedArray');\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/**\n * Initializes an object clone based on its `toStringTag`.\n *\n * **Note:** This function only supports cloning values with tags of\n * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.\n *\n * @private\n * @param {Object} object The object to clone.\n * @param {string} tag The `toStringTag` of the object to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneByTag(object, tag, isDeep) {\n var Ctor = object.constructor;\n switch (tag) {\n case arrayBufferTag:\n return cloneArrayBuffer(object);\n\n case boolTag:\n case dateTag:\n return new Ctor(+object);\n\n case dataViewTag:\n return cloneDataView(object, isDeep);\n\n case float32Tag: case float64Tag:\n case int8Tag: case int16Tag: case int32Tag:\n case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:\n return cloneTypedArray(object, isDeep);\n\n case mapTag:\n return new Ctor;\n\n case numberTag:\n case stringTag:\n return new Ctor(object);\n\n case regexpTag:\n return cloneRegExp(object);\n\n case setTag:\n return new Ctor;\n\n case symbolTag:\n return cloneSymbol(object);\n }\n}\n\nmodule.exports = initCloneByTag;\n","var baseCreate = require('./_baseCreate'),\n getPrototype = require('./_getPrototype'),\n isPrototype = require('./_isPrototype');\n\n/**\n * Initializes an object clone.\n *\n * @private\n * @param {Object} object The object to clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneObject(object) {\n return (typeof object.constructor == 'function' && !isPrototype(object))\n ? baseCreate(getPrototype(object))\n : {};\n}\n\nmodule.exports = initCloneObject;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n var type = typeof value;\n length = length == null ? MAX_SAFE_INTEGER : length;\n\n return !!length &&\n (type == 'number' ||\n (type != 'symbol' && reIsUint.test(value))) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\nmodule.exports = isIndex;\n","/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\nmodule.exports = isKeyable;\n","var coreJsData = require('./_coreJsData');\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\nmodule.exports = isMasked;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\nmodule.exports = isPrototype;\n","/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n}\n\nmodule.exports = listCacheClear;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype;\n\n/** Built-in value references. */\nvar splice = arrayProto.splice;\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n}\n\nmodule.exports = listCacheDelete;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\nmodule.exports = listCacheGet;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\nmodule.exports = listCacheHas;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\nmodule.exports = listCacheSet;\n","var Hash = require('./_Hash'),\n ListCache = require('./_ListCache'),\n Map = require('./_Map');\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\nmodule.exports = mapCacheClear;\n","var getMapData = require('./_getMapData');\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = mapCacheDelete;\n","var getMapData = require('./_getMapData');\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\nmodule.exports = mapCacheGet;\n","var getMapData = require('./_getMapData');\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\nmodule.exports = mapCacheHas;\n","var getMapData = require('./_getMapData');\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n}\n\nmodule.exports = mapCacheSet;\n","/**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\nfunction mapToArray(map) {\n var index = -1,\n result = Array(map.size);\n\n map.forEach(function(value, key) {\n result[++index] = [key, value];\n });\n return result;\n}\n\nmodule.exports = mapToArray;\n","var getNative = require('./_getNative');\n\n/* Built-in method references that are verified to be native. */\nvar nativeCreate = getNative(Object, 'create');\n\nmodule.exports = nativeCreate;\n","var overArg = require('./_overArg');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeKeys = overArg(Object.keys, Object);\n\nmodule.exports = nativeKeys;\n","/**\n * This function is like\n * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * except that it includes inherited enumerable properties.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction nativeKeysIn(object) {\n var result = [];\n if (object != null) {\n for (var key in Object(object)) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = nativeKeysIn;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n try {\n // Use `util.types` for Node.js 10+.\n var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n if (types) {\n return types;\n }\n\n // Legacy `process.binding('util')` for Node.js < 10.\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n}());\n\nmodule.exports = nodeUtil;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n","/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\nmodule.exports = overArg;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n","/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\nfunction setCacheAdd(value) {\n this.__data__.set(value, HASH_UNDEFINED);\n return this;\n}\n\nmodule.exports = setCacheAdd;\n","/**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\nfunction setCacheHas(value) {\n return this.__data__.has(value);\n}\n\nmodule.exports = setCacheHas;\n","/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\nfunction setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n}\n\nmodule.exports = setToArray;\n","var ListCache = require('./_ListCache');\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}\n\nmodule.exports = stackClear;\n","/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n var data = this.__data__,\n result = data['delete'](key);\n\n this.size = data.size;\n return result;\n}\n\nmodule.exports = stackDelete;\n","/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n return this.__data__.get(key);\n}\n\nmodule.exports = stackGet;\n","/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n return this.__data__.has(key);\n}\n\nmodule.exports = stackHas;\n","var ListCache = require('./_ListCache'),\n Map = require('./_Map'),\n MapCache = require('./_MapCache');\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n var data = this.__data__;\n if (data instanceof ListCache) {\n var pairs = data.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n this.size = ++data.size;\n return this;\n }\n data = this.__data__ = new MapCache(pairs);\n }\n data.set(key, value);\n this.size = data.size;\n return this;\n}\n\nmodule.exports = stackSet;\n","/** Used for built-in method references. */\nvar funcProto = Function.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\nmodule.exports = toSource;\n","var baseClone = require('./_baseClone');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_SYMBOLS_FLAG = 4;\n\n/**\n * This method is like `_.clone` except that it recursively clones `value`.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Lang\n * @param {*} value The value to recursively clone.\n * @returns {*} Returns the deep cloned value.\n * @see _.clone\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var deep = _.cloneDeep(objects);\n * console.log(deep[0] === objects[0]);\n * // => false\n */\nfunction cloneDeep(value) {\n return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);\n}\n\nmodule.exports = cloneDeep;\n","/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\nmodule.exports = eq;\n","var baseIsArguments = require('./_baseIsArguments'),\n isObjectLike = require('./isObjectLike');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n};\n\nmodule.exports = isArguments;\n","/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\nmodule.exports = isArray;\n","var isFunction = require('./isFunction'),\n isLength = require('./isLength');\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\nmodule.exports = isArrayLike;\n","var root = require('./_root'),\n stubFalse = require('./stubFalse');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\nmodule.exports = isBuffer;\n","var baseIsEqual = require('./_baseIsEqual');\n\n/**\n * Performs a deep comparison between two values to determine if they are\n * equivalent.\n *\n * **Note:** This method supports comparing arrays, array buffers, booleans,\n * date objects, error objects, maps, numbers, `Object` objects, regexes,\n * sets, strings, symbols, and typed arrays. `Object` objects are compared\n * by their own, not inherited, enumerable properties. Functions and DOM\n * nodes are compared by strict equality, i.e. `===`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.isEqual(object, other);\n * // => true\n *\n * object === other;\n * // => false\n */\nfunction isEqual(value, other) {\n return baseIsEqual(value, other);\n}\n\nmodule.exports = isEqual;\n","var baseGetTag = require('./_baseGetTag'),\n isObject = require('./isObject');\n\n/** `Object#toString` result references. */\nvar asyncTag = '[object AsyncFunction]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n proxyTag = '[object Proxy]';\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\nmodule.exports = isFunction;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\nmodule.exports = isLength;\n","var baseIsMap = require('./_baseIsMap'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsMap = nodeUtil && nodeUtil.isMap;\n\n/**\n * Checks if `value` is classified as a `Map` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n * @example\n *\n * _.isMap(new Map);\n * // => true\n *\n * _.isMap(new WeakMap);\n * // => false\n */\nvar isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;\n\nmodule.exports = isMap;\n","/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n","var baseIsSet = require('./_baseIsSet'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsSet = nodeUtil && nodeUtil.isSet;\n\n/**\n * Checks if `value` is classified as a `Set` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n * @example\n *\n * _.isSet(new Set);\n * // => true\n *\n * _.isSet(new WeakSet);\n * // => false\n */\nvar isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;\n\nmodule.exports = isSet;\n","var baseIsTypedArray = require('./_baseIsTypedArray'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\nmodule.exports = isTypedArray;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeys = require('./_baseKeys'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\nmodule.exports = keys;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeysIn = require('./_baseKeysIn'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\nfunction keysIn(object) {\n return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n}\n\nmodule.exports = keysIn;\n","/**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\nfunction stubArray() {\n return [];\n}\n\nmodule.exports = stubArray;\n","/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n return false;\n}\n\nmodule.exports = stubFalse;\n","import { connect, type BaseConnectionOptions } from \"@openfin/core-web\";\nimport { getSettings } from \"./settings\";\n\n/**\n * Initializes the OpenFin Web Broker connection.\n * @param inherit Should we inherit settings from the host (available in the OpenFin layout system) or use settings? Default is true.\n */\nexport async function init(inherit: boolean = true): Promise {\n\t// Set window.fin to the `fin` object.\n\tlet options: BaseConnectionOptions | undefined;\n\tif (window.fin === undefined) {\n\t\tif (!inherit) {\n\t\t\tconst settings = await getSettings();\n\t\t\tif (settings === undefined) {\n\t\t\t\tconsole.error(\n\t\t\t\t\t\"Unable to run the sample as we have been unable to load the web manifest and it's settings from the currently running html page. Please ensure that the web manifest is being served and that it contains the custom_settings section.\"\n\t\t\t\t);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\toptions = {\n\t\t\t\tbrokerUrl: settings.platform.interop.brokerUrl,\n\t\t\t\tinteropConfig: {\n\t\t\t\t\tproviderId: settings.platform.interop.providerId,\n\t\t\t\t\tcurrentContextGroup: settings.platform.interop.defaultContextGroup\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t\t// Specify an interopConfig with a specific provider ID and a context group to initialize the `fin.me.interop` client on connection.\n\t\tif (options) {\n\t\t\twindow.fin = await connect({\n\t\t\t\toptions\n\t\t\t});\n\t\t} else {\n\t\t\twindow.fin = await connect({\n\t\t\t\tconnectionInheritance: \"enabled\"\n\t\t\t});\n\t\t}\n\t\tconsole.log(\"Finished initializing the fin API.\");\n\t\t// Create and dispatch the finReady event\n\t\tconst event = new CustomEvent(\"finReady\");\n\t\twindow.dispatchEvent(event);\n\t}\n\n\tif (window.fdc3 === undefined && window?.fin?.me.interop?.getFDC3Sync !== undefined) {\n\t\twindow.fdc3 = fin.me.interop.getFDC3Sync(\"2.0\");\n\t\tconsole.log(\"Finished initializing the fdc3 API.\");\n\t\t// Create and dispatch the FDC3Ready event\n\t\tconst event = new CustomEvent(\"fdc3Ready\");\n\t\twindow.dispatchEvent(event);\n\t}\n}\n","import type { WebLayoutSnapshot } from \"@openfin/core-web\";\nimport type { Settings } from \"../shapes/setting-shapes\";\n\n/**\n * Fetches the settings for the application.\n * @returns The settings for the application.\n */\nexport async function getSettings(): Promise {\n\tconst settings = await getManifestSettings();\n\tif (settings === undefined) {\n\t\tconsole.error(\n\t\t\t\"Unable to run the example as settings are required and we fetch them from the link web manifest from the html page that is being served. It should exist in the customSettings section of the web manifest.\"\n\t\t);\n\t}\n\treturn settings;\n}\n\n/**\n * Returns a default layout from the settings if provided.\n * @returns The default layout from the settings.\n */\nexport async function getDefaultLayout(): Promise {\n\tconst settings = await getSettings();\n\tif (settings?.platform?.layout?.defaultLayout === undefined) {\n\t\tconsole.error(\n\t\t\t\"Unable to run the example as without a layout being defined. Please ensure that settings have been provided in the web manifest.\"\n\t\t);\n\t\treturn;\n\t}\n\tif (typeof settings.platform.layout.defaultLayout === \"string\") {\n\t\tconst layoutResponse = await fetch(settings.platform.layout.defaultLayout);\n\t\tconst layoutJson = (await layoutResponse.json()) as WebLayoutSnapshot;\n\t\treturn layoutJson;\n\t}\n\treturn settings.platform.layout.defaultLayout;\n}\n\n/**\n * Returns the settings from the manifest file.\n * @returns customSettings for this example\n */\nasync function getManifestSettings(): Promise {\n\t// Get the manifest link\n\tconst link = document.querySelector('link[rel=\"manifest\"]');\n\tif (link !== null) {\n\t\tconst manifestResponse = await fetch(link.href);\n\t\tconst manifestJson = (await manifestResponse.json()) as { custom_settings: Settings };\n\t\treturn manifestJson.custom_settings;\n\t}\n}\n","export { default as v1 } from './v1.js';\nexport { default as v3 } from './v3.js';\nexport { default as v4 } from './v4.js';\nexport { default as v5 } from './v5.js';\nexport { default as NIL } from './nil.js';\nexport { default as version } from './version.js';\nexport { default as validate } from './validate.js';\nexport { default as stringify } from './stringify.js';\nexport { default as parse } from './parse.js';","/*\n * Browser-compatible JavaScript MD5\n *\n * Modification of JavaScript MD5\n * https://github.com/blueimp/JavaScript-MD5\n *\n * Copyright 2011, Sebastian Tschan\n * https://blueimp.net\n *\n * Licensed under the MIT license:\n * https://opensource.org/licenses/MIT\n *\n * Based on\n * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message\n * Digest Algorithm, as defined in RFC 1321.\n * Version 2.2 Copyright (C) Paul Johnston 1999 - 2009\n * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet\n * Distributed under the BSD License\n * See http://pajhome.org.uk/crypt/md5 for more info.\n */\nfunction md5(bytes) {\n if (typeof bytes === 'string') {\n var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape\n\n bytes = new Uint8Array(msg.length);\n\n for (var i = 0; i < msg.length; ++i) {\n bytes[i] = msg.charCodeAt(i);\n }\n }\n\n return md5ToHexEncodedArray(wordsToMd5(bytesToWords(bytes), bytes.length * 8));\n}\n/*\n * Convert an array of little-endian words to an array of bytes\n */\n\n\nfunction md5ToHexEncodedArray(input) {\n var output = [];\n var length32 = input.length * 32;\n var hexTab = '0123456789abcdef';\n\n for (var i = 0; i < length32; i += 8) {\n var x = input[i >> 5] >>> i % 32 & 0xff;\n var hex = parseInt(hexTab.charAt(x >>> 4 & 0x0f) + hexTab.charAt(x & 0x0f), 16);\n output.push(hex);\n }\n\n return output;\n}\n/**\n * Calculate output length with padding and bit length\n */\n\n\nfunction getOutputLength(inputLength8) {\n return (inputLength8 + 64 >>> 9 << 4) + 14 + 1;\n}\n/*\n * Calculate the MD5 of an array of little-endian words, and a bit length.\n */\n\n\nfunction wordsToMd5(x, len) {\n /* append padding */\n x[len >> 5] |= 0x80 << len % 32;\n x[getOutputLength(len) - 1] = len;\n var a = 1732584193;\n var b = -271733879;\n var c = -1732584194;\n var d = 271733878;\n\n for (var i = 0; i < x.length; i += 16) {\n var olda = a;\n var oldb = b;\n var oldc = c;\n var oldd = d;\n a = md5ff(a, b, c, d, x[i], 7, -680876936);\n d = md5ff(d, a, b, c, x[i + 1], 12, -389564586);\n c = md5ff(c, d, a, b, x[i + 2], 17, 606105819);\n b = md5ff(b, c, d, a, x[i + 3], 22, -1044525330);\n a = md5ff(a, b, c, d, x[i + 4], 7, -176418897);\n d = md5ff(d, a, b, c, x[i + 5], 12, 1200080426);\n c = md5ff(c, d, a, b, x[i + 6], 17, -1473231341);\n b = md5ff(b, c, d, a, x[i + 7], 22, -45705983);\n a = md5ff(a, b, c, d, x[i + 8], 7, 1770035416);\n d = md5ff(d, a, b, c, x[i + 9], 12, -1958414417);\n c = md5ff(c, d, a, b, x[i + 10], 17, -42063);\n b = md5ff(b, c, d, a, x[i + 11], 22, -1990404162);\n a = md5ff(a, b, c, d, x[i + 12], 7, 1804603682);\n d = md5ff(d, a, b, c, x[i + 13], 12, -40341101);\n c = md5ff(c, d, a, b, x[i + 14], 17, -1502002290);\n b = md5ff(b, c, d, a, x[i + 15], 22, 1236535329);\n a = md5gg(a, b, c, d, x[i + 1], 5, -165796510);\n d = md5gg(d, a, b, c, x[i + 6], 9, -1069501632);\n c = md5gg(c, d, a, b, x[i + 11], 14, 643717713);\n b = md5gg(b, c, d, a, x[i], 20, -373897302);\n a = md5gg(a, b, c, d, x[i + 5], 5, -701558691);\n d = md5gg(d, a, b, c, x[i + 10], 9, 38016083);\n c = md5gg(c, d, a, b, x[i + 15], 14, -660478335);\n b = md5gg(b, c, d, a, x[i + 4], 20, -405537848);\n a = md5gg(a, b, c, d, x[i + 9], 5, 568446438);\n d = md5gg(d, a, b, c, x[i + 14], 9, -1019803690);\n c = md5gg(c, d, a, b, x[i + 3], 14, -187363961);\n b = md5gg(b, c, d, a, x[i + 8], 20, 1163531501);\n a = md5gg(a, b, c, d, x[i + 13], 5, -1444681467);\n d = md5gg(d, a, b, c, x[i + 2], 9, -51403784);\n c = md5gg(c, d, a, b, x[i + 7], 14, 1735328473);\n b = md5gg(b, c, d, a, x[i + 12], 20, -1926607734);\n a = md5hh(a, b, c, d, x[i + 5], 4, -378558);\n d = md5hh(d, a, b, c, x[i + 8], 11, -2022574463);\n c = md5hh(c, d, a, b, x[i + 11], 16, 1839030562);\n b = md5hh(b, c, d, a, x[i + 14], 23, -35309556);\n a = md5hh(a, b, c, d, x[i + 1], 4, -1530992060);\n d = md5hh(d, a, b, c, x[i + 4], 11, 1272893353);\n c = md5hh(c, d, a, b, x[i + 7], 16, -155497632);\n b = md5hh(b, c, d, a, x[i + 10], 23, -1094730640);\n a = md5hh(a, b, c, d, x[i + 13], 4, 681279174);\n d = md5hh(d, a, b, c, x[i], 11, -358537222);\n c = md5hh(c, d, a, b, x[i + 3], 16, -722521979);\n b = md5hh(b, c, d, a, x[i + 6], 23, 76029189);\n a = md5hh(a, b, c, d, x[i + 9], 4, -640364487);\n d = md5hh(d, a, b, c, x[i + 12], 11, -421815835);\n c = md5hh(c, d, a, b, x[i + 15], 16, 530742520);\n b = md5hh(b, c, d, a, x[i + 2], 23, -995338651);\n a = md5ii(a, b, c, d, x[i], 6, -198630844);\n d = md5ii(d, a, b, c, x[i + 7], 10, 1126891415);\n c = md5ii(c, d, a, b, x[i + 14], 15, -1416354905);\n b = md5ii(b, c, d, a, x[i + 5], 21, -57434055);\n a = md5ii(a, b, c, d, x[i + 12], 6, 1700485571);\n d = md5ii(d, a, b, c, x[i + 3], 10, -1894986606);\n c = md5ii(c, d, a, b, x[i + 10], 15, -1051523);\n b = md5ii(b, c, d, a, x[i + 1], 21, -2054922799);\n a = md5ii(a, b, c, d, x[i + 8], 6, 1873313359);\n d = md5ii(d, a, b, c, x[i + 15], 10, -30611744);\n c = md5ii(c, d, a, b, x[i + 6], 15, -1560198380);\n b = md5ii(b, c, d, a, x[i + 13], 21, 1309151649);\n a = md5ii(a, b, c, d, x[i + 4], 6, -145523070);\n d = md5ii(d, a, b, c, x[i + 11], 10, -1120210379);\n c = md5ii(c, d, a, b, x[i + 2], 15, 718787259);\n b = md5ii(b, c, d, a, x[i + 9], 21, -343485551);\n a = safeAdd(a, olda);\n b = safeAdd(b, oldb);\n c = safeAdd(c, oldc);\n d = safeAdd(d, oldd);\n }\n\n return [a, b, c, d];\n}\n/*\n * Convert an array bytes to an array of little-endian words\n * Characters >255 have their high-byte silently ignored.\n */\n\n\nfunction bytesToWords(input) {\n if (input.length === 0) {\n return [];\n }\n\n var length8 = input.length * 8;\n var output = new Uint32Array(getOutputLength(length8));\n\n for (var i = 0; i < length8; i += 8) {\n output[i >> 5] |= (input[i / 8] & 0xff) << i % 32;\n }\n\n return output;\n}\n/*\n * Add integers, wrapping at 2^32. This uses 16-bit operations internally\n * to work around bugs in some JS interpreters.\n */\n\n\nfunction safeAdd(x, y) {\n var lsw = (x & 0xffff) + (y & 0xffff);\n var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n return msw << 16 | lsw & 0xffff;\n}\n/*\n * Bitwise rotate a 32-bit number to the left.\n */\n\n\nfunction bitRotateLeft(num, cnt) {\n return num << cnt | num >>> 32 - cnt;\n}\n/*\n * These functions implement the four basic operations the algorithm uses.\n */\n\n\nfunction md5cmn(q, a, b, x, s, t) {\n return safeAdd(bitRotateLeft(safeAdd(safeAdd(a, q), safeAdd(x, t)), s), b);\n}\n\nfunction md5ff(a, b, c, d, x, s, t) {\n return md5cmn(b & c | ~b & d, a, b, x, s, t);\n}\n\nfunction md5gg(a, b, c, d, x, s, t) {\n return md5cmn(b & d | c & ~d, a, b, x, s, t);\n}\n\nfunction md5hh(a, b, c, d, x, s, t) {\n return md5cmn(b ^ c ^ d, a, b, x, s, t);\n}\n\nfunction md5ii(a, b, c, d, x, s, t) {\n return md5cmn(c ^ (b | ~d), a, b, x, s, t);\n}\n\nexport default md5;","export default '00000000-0000-0000-0000-000000000000';","import validate from './validate.js';\n\nfunction parse(uuid) {\n if (!validate(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n var v;\n var arr = new Uint8Array(16); // Parse ########-....-....-....-............\n\n arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24;\n arr[1] = v >>> 16 & 0xff;\n arr[2] = v >>> 8 & 0xff;\n arr[3] = v & 0xff; // Parse ........-####-....-....-............\n\n arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8;\n arr[5] = v & 0xff; // Parse ........-....-####-....-............\n\n arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8;\n arr[7] = v & 0xff; // Parse ........-....-....-####-............\n\n arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8;\n arr[9] = v & 0xff; // Parse ........-....-....-....-############\n // (Use \"/\" to avoid 32-bit truncation when bit-shifting high-order bytes)\n\n arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff;\n arr[11] = v / 0x100000000 & 0xff;\n arr[12] = v >>> 24 & 0xff;\n arr[13] = v >>> 16 & 0xff;\n arr[14] = v >>> 8 & 0xff;\n arr[15] = v & 0xff;\n return arr;\n}\n\nexport default parse;","export default /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;","// Unique ID creation requires a high quality random # generator. In the browser we therefore\n// require the crypto API and do not support built-in fallback to lower quality random number\n// generators (like Math.random()).\nvar getRandomValues;\nvar rnds8 = new Uint8Array(16);\nexport default function rng() {\n // lazy load so that environments that need to polyfill have a chance to do so\n if (!getRandomValues) {\n // getRandomValues needs to be invoked in a context where \"this\" is a Crypto implementation. Also,\n // find the complete implementation of crypto (msCrypto) on IE11.\n getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto !== 'undefined' && typeof msCrypto.getRandomValues === 'function' && msCrypto.getRandomValues.bind(msCrypto);\n\n if (!getRandomValues) {\n throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');\n }\n }\n\n return getRandomValues(rnds8);\n}","// Adapted from Chris Veness' SHA1 code at\n// http://www.movable-type.co.uk/scripts/sha1.html\nfunction f(s, x, y, z) {\n switch (s) {\n case 0:\n return x & y ^ ~x & z;\n\n case 1:\n return x ^ y ^ z;\n\n case 2:\n return x & y ^ x & z ^ y & z;\n\n case 3:\n return x ^ y ^ z;\n }\n}\n\nfunction ROTL(x, n) {\n return x << n | x >>> 32 - n;\n}\n\nfunction sha1(bytes) {\n var K = [0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xca62c1d6];\n var H = [0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0];\n\n if (typeof bytes === 'string') {\n var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape\n\n bytes = [];\n\n for (var i = 0; i < msg.length; ++i) {\n bytes.push(msg.charCodeAt(i));\n }\n } else if (!Array.isArray(bytes)) {\n // Convert Array-like to Array\n bytes = Array.prototype.slice.call(bytes);\n }\n\n bytes.push(0x80);\n var l = bytes.length / 4 + 2;\n var N = Math.ceil(l / 16);\n var M = new Array(N);\n\n for (var _i = 0; _i < N; ++_i) {\n var arr = new Uint32Array(16);\n\n for (var j = 0; j < 16; ++j) {\n arr[j] = bytes[_i * 64 + j * 4] << 24 | bytes[_i * 64 + j * 4 + 1] << 16 | bytes[_i * 64 + j * 4 + 2] << 8 | bytes[_i * 64 + j * 4 + 3];\n }\n\n M[_i] = arr;\n }\n\n M[N - 1][14] = (bytes.length - 1) * 8 / Math.pow(2, 32);\n M[N - 1][14] = Math.floor(M[N - 1][14]);\n M[N - 1][15] = (bytes.length - 1) * 8 & 0xffffffff;\n\n for (var _i2 = 0; _i2 < N; ++_i2) {\n var W = new Uint32Array(80);\n\n for (var t = 0; t < 16; ++t) {\n W[t] = M[_i2][t];\n }\n\n for (var _t = 16; _t < 80; ++_t) {\n W[_t] = ROTL(W[_t - 3] ^ W[_t - 8] ^ W[_t - 14] ^ W[_t - 16], 1);\n }\n\n var a = H[0];\n var b = H[1];\n var c = H[2];\n var d = H[3];\n var e = H[4];\n\n for (var _t2 = 0; _t2 < 80; ++_t2) {\n var s = Math.floor(_t2 / 20);\n var T = ROTL(a, 5) + f(s, b, c, d) + e + K[s] + W[_t2] >>> 0;\n e = d;\n d = c;\n c = ROTL(b, 30) >>> 0;\n b = a;\n a = T;\n }\n\n H[0] = H[0] + a >>> 0;\n H[1] = H[1] + b >>> 0;\n H[2] = H[2] + c >>> 0;\n H[3] = H[3] + d >>> 0;\n H[4] = H[4] + e >>> 0;\n }\n\n return [H[0] >> 24 & 0xff, H[0] >> 16 & 0xff, H[0] >> 8 & 0xff, H[0] & 0xff, H[1] >> 24 & 0xff, H[1] >> 16 & 0xff, H[1] >> 8 & 0xff, H[1] & 0xff, H[2] >> 24 & 0xff, H[2] >> 16 & 0xff, H[2] >> 8 & 0xff, H[2] & 0xff, H[3] >> 24 & 0xff, H[3] >> 16 & 0xff, H[3] >> 8 & 0xff, H[3] & 0xff, H[4] >> 24 & 0xff, H[4] >> 16 & 0xff, H[4] >> 8 & 0xff, H[4] & 0xff];\n}\n\nexport default sha1;","import validate from './validate.js';\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\n\nvar byteToHex = [];\n\nfor (var i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).substr(1));\n}\n\nfunction stringify(arr) {\n var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n var uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!validate(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n\n return uuid;\n}\n\nexport default stringify;","import rng from './rng.js';\nimport stringify from './stringify.js'; // **`v1()` - Generate time-based UUID**\n//\n// Inspired by https://github.com/LiosK/UUID.js\n// and http://docs.python.org/library/uuid.html\n\nvar _nodeId;\n\nvar _clockseq; // Previous uuid creation time\n\n\nvar _lastMSecs = 0;\nvar _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details\n\nfunction v1(options, buf, offset) {\n var i = buf && offset || 0;\n var b = buf || new Array(16);\n options = options || {};\n var node = options.node || _nodeId;\n var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not\n // specified. We do this lazily to minimize issues related to insufficient\n // system entropy. See #189\n\n if (node == null || clockseq == null) {\n var seedBytes = options.random || (options.rng || rng)();\n\n if (node == null) {\n // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)\n node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]];\n }\n\n if (clockseq == null) {\n // Per 4.2.2, randomize (14 bit) clockseq\n clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;\n }\n } // UUID timestamps are 100 nano-second units since the Gregorian epoch,\n // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so\n // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'\n // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.\n\n\n var msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock\n // cycle to simulate higher resolution clock\n\n var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs)\n\n var dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression\n\n if (dt < 0 && options.clockseq === undefined) {\n clockseq = clockseq + 1 & 0x3fff;\n } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new\n // time interval\n\n\n if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {\n nsecs = 0;\n } // Per 4.2.1.2 Throw error if too many uuids are requested\n\n\n if (nsecs >= 10000) {\n throw new Error(\"uuid.v1(): Can't create more than 10M uuids/sec\");\n }\n\n _lastMSecs = msecs;\n _lastNSecs = nsecs;\n _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch\n\n msecs += 12219292800000; // `time_low`\n\n var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;\n b[i++] = tl >>> 24 & 0xff;\n b[i++] = tl >>> 16 & 0xff;\n b[i++] = tl >>> 8 & 0xff;\n b[i++] = tl & 0xff; // `time_mid`\n\n var tmh = msecs / 0x100000000 * 10000 & 0xfffffff;\n b[i++] = tmh >>> 8 & 0xff;\n b[i++] = tmh & 0xff; // `time_high_and_version`\n\n b[i++] = tmh >>> 24 & 0xf | 0x10; // include version\n\n b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)\n\n b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low`\n\n b[i++] = clockseq & 0xff; // `node`\n\n for (var n = 0; n < 6; ++n) {\n b[i + n] = node[n];\n }\n\n return buf || stringify(b);\n}\n\nexport default v1;","import v35 from './v35.js';\nimport md5 from './md5.js';\nvar v3 = v35('v3', 0x30, md5);\nexport default v3;","import stringify from './stringify.js';\nimport parse from './parse.js';\n\nfunction stringToBytes(str) {\n str = unescape(encodeURIComponent(str)); // UTF8 escape\n\n var bytes = [];\n\n for (var i = 0; i < str.length; ++i) {\n bytes.push(str.charCodeAt(i));\n }\n\n return bytes;\n}\n\nexport var DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8';\nexport var URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8';\nexport default function (name, version, hashfunc) {\n function generateUUID(value, namespace, buf, offset) {\n if (typeof value === 'string') {\n value = stringToBytes(value);\n }\n\n if (typeof namespace === 'string') {\n namespace = parse(namespace);\n }\n\n if (namespace.length !== 16) {\n throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)');\n } // Compute hash of namespace and value, Per 4.3\n // Future: Use spread syntax when supported on all platforms, e.g. `bytes =\n // hashfunc([...namespace, ... value])`\n\n\n var bytes = new Uint8Array(16 + value.length);\n bytes.set(namespace);\n bytes.set(value, namespace.length);\n bytes = hashfunc(bytes);\n bytes[6] = bytes[6] & 0x0f | version;\n bytes[8] = bytes[8] & 0x3f | 0x80;\n\n if (buf) {\n offset = offset || 0;\n\n for (var i = 0; i < 16; ++i) {\n buf[offset + i] = bytes[i];\n }\n\n return buf;\n }\n\n return stringify(bytes);\n } // Function#name is not settable on some platforms (#270)\n\n\n try {\n generateUUID.name = name; // eslint-disable-next-line no-empty\n } catch (err) {} // For CommonJS default export support\n\n\n generateUUID.DNS = DNS;\n generateUUID.URL = URL;\n return generateUUID;\n}","import rng from './rng.js';\nimport stringify from './stringify.js';\n\nfunction v4(options, buf, offset) {\n options = options || {};\n var rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n offset = offset || 0;\n\n for (var i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n\n return buf;\n }\n\n return stringify(rnds);\n}\n\nexport default v4;","import v35 from './v35.js';\nimport sha1 from './sha1.js';\nvar v5 = v35('v5', 0x50, sha1);\nexport default v5;","import REGEX from './regex.js';\n\nfunction validate(uuid) {\n return typeof uuid === 'string' && REGEX.test(uuid);\n}\n\nexport default validate;","import validate from './validate.js';\n\nfunction version(uuid) {\n if (!validate(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n return parseInt(uuid.substr(14, 1), 16);\n}\n\nexport default version;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = (module) => {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","import type { Context } from \"@finos/fdc3\";\nimport { init } from \"../platform/api\";\n\nwindow.addEventListener(\"DOMContentLoaded\", async () => {\n\tawait init(true);\n\tawait initializeDOM();\n});\n\n/**\n * Broadcasts a context using FDC3.\n */\nasync function broadcastContext(): Promise {\n\tconst contextType = \"fdc3.instrument\";\n\tconst contextName = \"Apple\";\n\tconst idData = {\n\t\tticker: \"AAPL\"\n\t};\n\tconst context = {\n\t\ttype: contextType,\n\t\tname: contextName,\n\t\tid: idData\n\t};\n\tif (window.fdc3) {\n\t\tawait window.fdc3.broadcast(context);\n\t\tconsole.log(`Broadcasted context: ${contextType} - ${contextName}`);\n\t} else {\n\t\twindow.addEventListener(\"fdc3Ready\", async () => {\n\t\t\tawait window.fdc3.broadcast(context);\n\t\t\tconsole.log(`Broadcasted context: ${contextType} - ${contextName}`);\n\t\t});\n\t}\n}\n\n/**\n * Adds an FDC3 context listener to the window.\n */\nasync function addFDC3Listener(): Promise {\n\tif (window.fdc3) {\n\t\tawait window.fdc3.addContextListener(null, (context) => {\n\t\t\tupdateDOMElements(context);\n\t\t});\n\t} else {\n\t\twindow.addEventListener(\"fdc3Ready\", async () => {\n\t\t\tawait window.fdc3.addContextListener(null, (context) => {\n\t\t\t\tupdateDOMElements(context);\n\t\t\t});\n\t\t});\n\t}\n}\n\n/**\n * Updates the DOM elements with the provided context.\n * @param context The context to update the DOM elements with.\n */\nfunction updateDOMElements(context: Context): void {\n\tconst contextTypeSpan = document.querySelector(\"#contextType\");\n\tconst contextNameSpan = document.querySelector(\"#contextName\");\n\tconst contextBodyPre = document.querySelector(\"#contextBody\");\n\n\tif (contextTypeSpan !== null && contextNameSpan !== null && contextBodyPre !== null) {\n\t\tcontextTypeSpan.textContent = context.type;\n\t\tcontextNameSpan.textContent = context.name ?? \"No name provided.\";\n\t\tcontextBodyPre.textContent = JSON.stringify(context, null, 2);\n\t}\n}\n\n/**\n * Initialize the DOM elements.\n */\nasync function initializeDOM(): Promise {\n\tconst broadcastButton = document.querySelector(\"#broadcast\");\n\n\tif (broadcastButton !== null) {\n\t\tbroadcastButton.addEventListener(\"click\", async () => {\n\t\t\tawait broadcastContext();\n\t\t});\n\t}\n\n\tawait addFDC3Listener();\n}\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/web/v19.2.0/cloud-interop/js/iframe-broker.bundle.js b/web/v19.2.0/cloud-interop/js/iframe-broker.bundle.js index db83fa5..4ccf924 100644 --- a/web/v19.2.0/cloud-interop/js/iframe-broker.bundle.js +++ b/web/v19.2.0/cloud-interop/js/iframe-broker.bundle.js @@ -2,10 +2,10 @@ /******/ "use strict"; /******/ var __webpack_modules__ = ({ -/***/ "./node_modules/@openfin/core-web/out/iframe-broker.js": -/*!*************************************************************!*\ - !*** ./node_modules/@openfin/core-web/out/iframe-broker.js ***! - \*************************************************************/ +/***/ "../../node_modules/@openfin/core-web/out/iframe-broker.js": +/*!*****************************************************************!*\ + !*** ../../node_modules/@openfin/core-web/out/iframe-broker.js ***! + \*****************************************************************/ /***/ ((__unused_webpack_module, exports) => { const e="web-broker-ports-ready",t="worker-initialize-connection",i="create-fallback-connection",r="request-fallback-connection",n=e=>`ack-${e}`,o=(...e)=>({log:(...t)=>console.debug(`[${(new Date).toISOString()}]`,...(e=>e.map((e=>`[${e}]`)))(e),...t),getLogger:(...t)=>o(...e,...t)}),s=e=>window.top===e,a=(e,t)=>{try{return e.origin===t.origin}catch(e){return!1}},c="openfin/web-shared-worker";class d{static get lockApi(){return navigator.locks}constructor(e){this.name=e,this.releaseCallback=null,d.pending.add(this),this.lockAcquiredPromise=new Promise(((e,t)=>{this.lockReleasedPromise=d.lockApi.request(this.name,(()=>(d.pending.delete(this),e(),new Promise((e=>{d.held.add(this),this.releaseCallback=e}))))).catch((e=>{throw t(e),e}))}))}async acquired(){await this.lockAcquiredPromise}async release(){if(!this.releaseCallback)throw new Error(`Lock ${this.name} not acquired.`);this.releaseCallback(),this.releaseCallback=null,await this.lockReleasedPromise,d.held.delete(this)}async onReleased(e){if(!this.lockReleasedPromise)throw new Error(`Lock ${this.name} not queued.`);return this.lockReleasedPromise.then(e)}autoRelease(){this.acquired().then((()=>this.release()))}static async releaseAll(){const e=Promise.all([...this.pending].map((async e=>{await e.acquired(),await e.release()})));await Promise.all([...this.held].map((async e=>{await e.release()}))),await e}}d.pending=new Set,d.held=new Set;class l{constructor(e=100,t=2){this.pingIntervalMs=e,this.allowedMissedPings=t,this.lockSelf=async e=>{const t=new d((e=>`__OPENFIN__${e.uuid}_${e.name}`)(e));return await t.acquired(),t}}async lockProxiedConnection(e,t){let i=0;t.addEventListener("message",(e=>{"pong"===e.data.topic&&i--}));const r=await this.lockSelf(e);let n=setInterval((()=>{i>=this.allowedMissedPings?(r.release(),clearInterval(n)):(i++,t.postMessage({topic:"ping"}))}),this.pingIntervalMs);t.start()}registerProxiedConnection(e){e.addEventListener("message",(t=>{"ping"===t.data.topic&&e.postMessage({topic:"pong"})})),e.start()}}class h{constructor(e,t,o){this.workerUrl=e,this.iframeWindow=t,this.forceWorker=o,this.identityDisconnectionController=new l,this.isSharedWorkerSupported=()=>!this.forceWorker&&!!window.SharedWorker,this.state="ready",this.establishWorkerConnectionViaWindow=async(e,t)=>{if(a(this.iframeWindow,e)){const o=new MessageChannel,s=new MessageChannel;return this.identityDisconnectionController.registerProxiedConnection(s.port1),new Promise(((a,c)=>{o.port1.addEventListener("message",(e=>{e.data.topic===n(i)&&(e.data.success?a(o.port1):c(e.data.reason))})),o.port1.start();const d={topic:r,payload:{identity:t}};e.postMessage(d,location.origin,[o.port2,s.port2])}))}throw new Error("Could not connect via top level browsing context as its origin does not much the web interop broker.")},this.listenForNestedConnections=e=>{"top-window"===this.state&&a(this.iframeWindow,this.iframeWindow.parent)&&this.iframeWindow.parent.addEventListener("message",(async t=>{const{data:n}=t;if(t.origin===location.origin&&n.topic===r){const[r,...o]=t.ports;if(o.length>0&&n.payload?.identity){const[e]=o;await this.identityDisconnectionController.lockProxiedConnection(n.payload.identity,e)}const s={topic:i};e.postMessage(s,[r])}}))},this.initialize=async e=>{if("ready"!==this.state)throw new Error("Worker connection already initialized");return(e=>{const t=i=>!(!(e=>{try{return!e.origin}catch(e){return!0}})(i)&&i.origin===e.origin)||!s(i)&&t(i.parent);return!s(e)&&t(e.parent)})(this.iframeWindow)&&a(this.iframeWindow,this.iframeWindow.top)?this.state="partitioned-frame":s(this.iframeWindow.parent)?this.state="top-window":this.state="frame",this.connect(e)}}async connect(e){if("ready"===this.state)throw new Error("Must call initialize before connect");switch(this.state){case"partitioned-frame":return this.establishWorkerConnectionViaWindow(this.iframeWindow.top,e);case"top-window":{let t;return t=this.isSharedWorkerSupported()?new SharedWorker(this.workerUrl,c).port:new Worker(this.workerUrl),await this.identityDisconnectionController.lockSelf(e),this.listenForNestedConnections(t),t}case"frame":{if(!this.isSharedWorkerSupported())try{return await this.establishWorkerConnectionViaWindow(this.iframeWindow.top,e)}catch(e){throw new Error(`SharedWorker is not supported and an unexpected error occured when trying to connect via fallback mechanism: ${e.message}`,{cause:e})}await this.identityDisconnectionController.lockSelf(e);const{port:t}=new SharedWorker(this.workerUrl,c);return t}default:throw this.state,new Error(`Invalid state: ${this.state}`)}}}const w=o("@openfin/core-web/iframe-broker"),p=()=>{const e=((e,t)=>{const i=new RegExp(`^${t}<(?.*)>$`).exec(e)?.groups?.meta;if(i)try{return JSON.parse(atob(i))}catch(e){throw new Error(`Failed to decode JSON from ${i}.`)}})(window.name,"of-broker");if(!e)throw new Error("Invalid or missing identity string in iframe context. Ensure that this iframe is being renderered via the @openfin/core-web library.");return e};function g(t){const i={topic:n(e),success:!1,reason:t?.reason??"Connection Rejected"};window.parent.postMessage(i,"*")}exports.init=async i=>{try{const{sharedWorkerUrl:r}=i;await("loading"===document.readyState?new Promise((e=>{const t=()=>{e(),window.removeEventListener("DOMContentLoaded",t)};window.addEventListener("DOMContentLoaded",t)})):Promise.resolve());const o=p(),s=new h(r,window,"same-site"!==i.experimental?.crossTab),a=await s.initialize(o);w.log(`Loading ${r} in ${s.state} mode...`);const c=await(async(i,r,o)=>{const s=new MessageChannel,a=new MessageChannel,c={topic:t,payload:{identity:o}};await new Promise(((e,i)=>{r.addEventListener("message",(r=>{r.data.topic===n(t)&&(r.data.success?e():i(new Error(r.data.reason)))})),r.start?.(),r.postMessage(c,[a.port2])}));const d={topic:n(e),success:!0,payload:{identity:o}};return i.postMessage(d,"*",[s.port2,a.port1]),s.port1})(window.parent,a,o);c.start(),a.start?.(),w.log(`Port transfer complete in ${s.state} mode. Connection established with identity ${JSON.stringify(o)}. SharedWorker support=${s.isSharedWorkerSupported()}`)}catch(e){const t=new Error(`An unexpected error occured during initialization. ${e.message}`);g({reason:t.message}),console.error(t)}},exports.rejectConnections=g; @@ -96,7 +96,7 @@ async function getManifestSettings() { /******/ /************************************************************************/ var __webpack_exports__ = {}; -// This entry need to be wrapped in an IIFE because it uses a non-standard name for the exports (exports). +// This entry needs to be wrapped in an IIFE because it needs to be isolated against other modules in the chunk. (() => { var exports = __webpack_exports__; /*!**********************************************!*\ @@ -104,7 +104,7 @@ var exports = __webpack_exports__; \**********************************************/ Object.defineProperty(exports, "__esModule", ({ value: true })); -const iframe_broker_1 = __webpack_require__(/*! @openfin/core-web/iframe-broker */ "./node_modules/@openfin/core-web/out/iframe-broker.js"); +const iframe_broker_1 = __webpack_require__(/*! @openfin/core-web/iframe-broker */ "../../node_modules/@openfin/core-web/out/iframe-broker.js"); const settings_1 = __webpack_require__(/*! ./settings */ "./client/src/platform/settings.ts"); /** * Initializes the OpenFin Web Broker connection. diff --git a/web/v19.2.0/cloud-interop/js/iframe-broker.bundle.js.map b/web/v19.2.0/cloud-interop/js/iframe-broker.bundle.js.map index 38778f3..9350b0e 100644 --- a/web/v19.2.0/cloud-interop/js/iframe-broker.bundle.js.map +++ b/web/v19.2.0/cloud-interop/js/iframe-broker.bundle.js.map @@ -1 +1 @@ -{"version":3,"file":"iframe-broker.bundle.js","mappings":";;;;;;;;;;AAAa,6IAA6I,EAAE,cAAc,8BAA8B,yBAAyB,wBAAwB,EAAE,8CAA8C,gCAAgC,IAAI,2BAA2B,SAAS,UAAU,+BAA+B,QAAQ,qBAAqB,uBAAuB,eAAe,wGAAwG,uGAAuG,wCAAwC,iBAAiB,aAAa,GAAG,GAAG,iBAAiB,+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AAG,CAAC,MAAM,gBAAgB,CAAC,IAAI,EAAE,CAAkC,CAAC;QACtF,OAAO,YAAY,CAAC,eAAe,CAAC;IACrC,CAAC;AACF,CAAC;;;;;;;UCjDD;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;;;;;;;;ACtBA,4IAA+E;AAC/E,8FAAyC;AAEzC;;;GAGG;AACH,KAAK,UAAU,IAAI;IAClB,MAAM,QAAQ,GAAG,MAAM,0BAAW,GAAE,CAAC;IACrC,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;QAC5B,OAAO,CAAC,KAAK,CACZ,wOAAwO,CACxO,CAAC;QACF,OAAO;IACR,CAAC;IACD,OAAO,wBAAoB,EAAC;QAC3B,eAAe,EAAE,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,eAAe;KAC1D,CAAC,CAAC;AACJ,CAAC;AAED,IAAI,EAAE;KACJ,IAAI,CAAC,GAAG,EAAE;IACV,OAAO,CAAC,GAAG,CAAC,6CAA6C,CAAC,CAAC;IAC3D,OAAO,IAAI,CAAC;AACb,CAAC,CAAC;KACD,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC","sources":["webpack://openfin-web--cloud-interop/./node_modules/@openfin/core-web/out/iframe-broker.js","webpack://openfin-web--cloud-interop/./client/src/platform/settings.ts","webpack://openfin-web--cloud-interop/webpack/bootstrap","webpack://openfin-web--cloud-interop/./client/src/platform/iframe-broker.ts"],"sourcesContent":["\"use strict\";const e=\"web-broker-ports-ready\",t=\"worker-initialize-connection\",i=\"create-fallback-connection\",r=\"request-fallback-connection\",n=e=>`ack-${e}`,o=(...e)=>({log:(...t)=>console.debug(`[${(new Date).toISOString()}]`,...(e=>e.map((e=>`[${e}]`)))(e),...t),getLogger:(...t)=>o(...e,...t)}),s=e=>window.top===e,a=(e,t)=>{try{return e.origin===t.origin}catch(e){return!1}},c=\"openfin/web-shared-worker\";class d{static get lockApi(){return navigator.locks}constructor(e){this.name=e,this.releaseCallback=null,d.pending.add(this),this.lockAcquiredPromise=new Promise(((e,t)=>{this.lockReleasedPromise=d.lockApi.request(this.name,(()=>(d.pending.delete(this),e(),new Promise((e=>{d.held.add(this),this.releaseCallback=e}))))).catch((e=>{throw t(e),e}))}))}async acquired(){await this.lockAcquiredPromise}async release(){if(!this.releaseCallback)throw new Error(`Lock ${this.name} not acquired.`);this.releaseCallback(),this.releaseCallback=null,await this.lockReleasedPromise,d.held.delete(this)}async onReleased(e){if(!this.lockReleasedPromise)throw new Error(`Lock ${this.name} not queued.`);return this.lockReleasedPromise.then(e)}autoRelease(){this.acquired().then((()=>this.release()))}static async releaseAll(){const e=Promise.all([...this.pending].map((async e=>{await e.acquired(),await e.release()})));await Promise.all([...this.held].map((async e=>{await e.release()}))),await e}}d.pending=new Set,d.held=new Set;class l{constructor(e=100,t=2){this.pingIntervalMs=e,this.allowedMissedPings=t,this.lockSelf=async e=>{const t=new d((e=>`__OPENFIN__${e.uuid}_${e.name}`)(e));return await t.acquired(),t}}async lockProxiedConnection(e,t){let i=0;t.addEventListener(\"message\",(e=>{\"pong\"===e.data.topic&&i--}));const r=await this.lockSelf(e);let n=setInterval((()=>{i>=this.allowedMissedPings?(r.release(),clearInterval(n)):(i++,t.postMessage({topic:\"ping\"}))}),this.pingIntervalMs);t.start()}registerProxiedConnection(e){e.addEventListener(\"message\",(t=>{\"ping\"===t.data.topic&&e.postMessage({topic:\"pong\"})})),e.start()}}class h{constructor(e,t,o){this.workerUrl=e,this.iframeWindow=t,this.forceWorker=o,this.identityDisconnectionController=new l,this.isSharedWorkerSupported=()=>!this.forceWorker&&!!window.SharedWorker,this.state=\"ready\",this.establishWorkerConnectionViaWindow=async(e,t)=>{if(a(this.iframeWindow,e)){const o=new MessageChannel,s=new MessageChannel;return this.identityDisconnectionController.registerProxiedConnection(s.port1),new Promise(((a,c)=>{o.port1.addEventListener(\"message\",(e=>{e.data.topic===n(i)&&(e.data.success?a(o.port1):c(e.data.reason))})),o.port1.start();const d={topic:r,payload:{identity:t}};e.postMessage(d,location.origin,[o.port2,s.port2])}))}throw new Error(\"Could not connect via top level browsing context as its origin does not much the web interop broker.\")},this.listenForNestedConnections=e=>{\"top-window\"===this.state&&a(this.iframeWindow,this.iframeWindow.parent)&&this.iframeWindow.parent.addEventListener(\"message\",(async t=>{const{data:n}=t;if(t.origin===location.origin&&n.topic===r){const[r,...o]=t.ports;if(o.length>0&&n.payload?.identity){const[e]=o;await this.identityDisconnectionController.lockProxiedConnection(n.payload.identity,e)}const s={topic:i};e.postMessage(s,[r])}}))},this.initialize=async e=>{if(\"ready\"!==this.state)throw new Error(\"Worker connection already initialized\");return(e=>{const t=i=>!(!(e=>{try{return!e.origin}catch(e){return!0}})(i)&&i.origin===e.origin)||!s(i)&&t(i.parent);return!s(e)&&t(e.parent)})(this.iframeWindow)&&a(this.iframeWindow,this.iframeWindow.top)?this.state=\"partitioned-frame\":s(this.iframeWindow.parent)?this.state=\"top-window\":this.state=\"frame\",this.connect(e)}}async connect(e){if(\"ready\"===this.state)throw new Error(\"Must call initialize before connect\");switch(this.state){case\"partitioned-frame\":return this.establishWorkerConnectionViaWindow(this.iframeWindow.top,e);case\"top-window\":{let t;return t=this.isSharedWorkerSupported()?new SharedWorker(this.workerUrl,c).port:new Worker(this.workerUrl),await this.identityDisconnectionController.lockSelf(e),this.listenForNestedConnections(t),t}case\"frame\":{if(!this.isSharedWorkerSupported())try{return await this.establishWorkerConnectionViaWindow(this.iframeWindow.top,e)}catch(e){throw new Error(`SharedWorker is not supported and an unexpected error occured when trying to connect via fallback mechanism: ${e.message}`,{cause:e})}await this.identityDisconnectionController.lockSelf(e);const{port:t}=new SharedWorker(this.workerUrl,c);return t}default:throw this.state,new Error(`Invalid state: ${this.state}`)}}}const w=o(\"@openfin/core-web/iframe-broker\"),p=()=>{const e=((e,t)=>{const i=new RegExp(`^${t}<(?.*)>$`).exec(e)?.groups?.meta;if(i)try{return JSON.parse(atob(i))}catch(e){throw new Error(`Failed to decode JSON from ${i}.`)}})(window.name,\"of-broker\");if(!e)throw new Error(\"Invalid or missing identity string in iframe context. Ensure that this iframe is being renderered via the @openfin/core-web library.\");return e};function g(t){const i={topic:n(e),success:!1,reason:t?.reason??\"Connection Rejected\"};window.parent.postMessage(i,\"*\")}exports.init=async i=>{try{const{sharedWorkerUrl:r}=i;await(\"loading\"===document.readyState?new Promise((e=>{const t=()=>{e(),window.removeEventListener(\"DOMContentLoaded\",t)};window.addEventListener(\"DOMContentLoaded\",t)})):Promise.resolve());const o=p(),s=new h(r,window,\"same-site\"!==i.experimental?.crossTab),a=await s.initialize(o);w.log(`Loading ${r} in ${s.state} mode...`);const c=await(async(i,r,o)=>{const s=new MessageChannel,a=new MessageChannel,c={topic:t,payload:{identity:o}};await new Promise(((e,i)=>{r.addEventListener(\"message\",(r=>{r.data.topic===n(t)&&(r.data.success?e():i(new Error(r.data.reason)))})),r.start?.(),r.postMessage(c,[a.port2])}));const d={topic:n(e),success:!0,payload:{identity:o}};return i.postMessage(d,\"*\",[s.port2,a.port1]),s.port1})(window.parent,a,o);c.start(),a.start?.(),w.log(`Port transfer complete in ${s.state} mode. Connection established with identity ${JSON.stringify(o)}. SharedWorker support=${s.isSharedWorkerSupported()}`)}catch(e){const t=new Error(`An unexpected error occured during initialization. ${e.message}`);g({reason:t.message}),console.error(t)}},exports.rejectConnections=g;\n","import type { WebLayoutSnapshot } from \"@openfin/core-web\";\nimport type { Settings } from \"../shapes/setting-shapes\";\n\n/**\n * Fetches the settings for the application.\n * @returns The settings for the application.\n */\nexport async function getSettings(): Promise {\n\tconst settings = await getManifestSettings();\n\tif (settings === undefined) {\n\t\tconsole.error(\n\t\t\t\"Unable to run the example as settings are required and we fetch them from the link web manifest from the html page that is being served. It should exist in the customSettings section of the web manifest.\"\n\t\t);\n\t}\n\treturn settings;\n}\n\n/**\n * Returns a default layout from the settings if provided.\n * @returns The default layout from the settings.\n */\nexport async function getDefaultLayout(): Promise {\n\tconst settings = await getSettings();\n\tif (settings?.platform?.layout?.defaultLayout === undefined) {\n\t\tconsole.error(\n\t\t\t\"Unable to run the example as without a layout being defined. Please ensure that settings have been provided in the web manifest.\"\n\t\t);\n\t\treturn;\n\t}\n\tif (typeof settings.platform.layout.defaultLayout === \"string\") {\n\t\tconst layoutResponse = await fetch(settings.platform.layout.defaultLayout);\n\t\tconst layoutJson = (await layoutResponse.json()) as WebLayoutSnapshot;\n\t\treturn layoutJson;\n\t}\n\treturn settings.platform.layout.defaultLayout;\n}\n\n/**\n * Returns the settings from the manifest file.\n * @returns customSettings for this example\n */\nasync function getManifestSettings(): Promise {\n\t// Get the manifest link\n\tconst link = document.querySelector('link[rel=\"manifest\"]');\n\tif (link !== null) {\n\t\tconst manifestResponse = await fetch(link.href);\n\t\tconst manifestJson = (await manifestResponse.json()) as { custom_settings: Settings };\n\t\treturn manifestJson.custom_settings;\n\t}\n}\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","import { init as initBrokerConnection } from \"@openfin/core-web/iframe-broker\";\nimport { getSettings } from \"./settings\";\n\n/**\n * Initializes the OpenFin Web Broker connection.\n * @returns A promise that resolves when the connection is established.\n */\nasync function init(): Promise {\n\tconst settings = await getSettings();\n\tif (settings === undefined) {\n\t\tconsole.error(\n\t\t\t\"Unable to run the sample as we have been unable to load the web manifest and it's settings from the currently running html page. Please ensure that the web manifest is being served and that it contains the custom_settings section.\"\n\t\t);\n\t\treturn;\n\t}\n\treturn initBrokerConnection({\n\t\tsharedWorkerUrl: settings.platform.interop.sharedWorkerUrl\n\t});\n}\n\ninit()\n\t.then(() => {\n\t\tconsole.log(\"Connected to the OpenFin IFrame Web Broker.\");\n\t\treturn true;\n\t})\n\t.catch((err) => console.error(err));\n"],"names":[],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"iframe-broker.bundle.js","mappings":";;;;;;;;;;AAAa,6IAA6I,EAAE,cAAc,8BAA8B,yBAAyB,wBAAwB,EAAE,8CAA8C,gCAAgC,IAAI,2BAA2B,SAAS,UAAU,+BAA+B,QAAQ,qBAAqB,uBAAuB,eAAe,wGAAwG,uGAAuG,wCAAwC,iBAAiB,aAAa,GAAG,GAAG,iBAAiB,+BAA+B,gBAAgB,iDAAiD,WAAW,gBAAgB,oGAAoG,oBAAoB,qDAAqD,WAAW,cAAc,wCAAwC,cAAc,2CAA2C,0BAA0B,qDAAqD,qCAAqC,IAAI,gDAAgD,kBAAkB,aAAa,iCAAiC,QAAQ,uBAAuB,wEAAwE,gCAAgC,OAAO,GAAG,OAAO,OAAO,6BAA6B,iCAAiC,QAAQ,kCAAkC,2BAA2B,GAAG,+BAA+B,wBAAwB,8EAA8E,aAAa,GAAG,uBAAuB,UAAU,6BAA6B,kCAAkC,sCAAsC,aAAa,EAAE,cAAc,QAAQ,mBAAmB,qPAAqP,2BAA2B,gDAAgD,oGAAoG,wCAAwC,kEAAkE,mBAAmB,SAAS,iBAAiB,aAAa,mDAAmD,GAAG,wHAAwH,qCAAqC,yIAAyI,MAAM,OAAO,GAAG,4CAA4C,sBAAsB,oCAAoC,WAAW,uFAAuF,SAAS,SAAS,sBAAsB,GAAG,2BAA2B,iFAAiF,WAAW,mBAAmB,IAAI,gBAAgB,SAAS,UAAU,+CAA+C,yBAAyB,wLAAwL,iBAAiB,+EAA+E,mBAAmB,gGAAgG,kBAAkB,MAAM,u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AI,CAAC;AACb,CAAC,CAAC;KACD,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC","sources":["webpack://openfin-web--cloud-interop/../../node_modules/@openfin/core-web/out/iframe-broker.js","webpack://openfin-web--cloud-interop/./client/src/platform/settings.ts","webpack://openfin-web--cloud-interop/webpack/bootstrap","webpack://openfin-web--cloud-interop/./client/src/platform/iframe-broker.ts"],"sourcesContent":["\"use strict\";const e=\"web-broker-ports-ready\",t=\"worker-initialize-connection\",i=\"create-fallback-connection\",r=\"request-fallback-connection\",n=e=>`ack-${e}`,o=(...e)=>({log:(...t)=>console.debug(`[${(new Date).toISOString()}]`,...(e=>e.map((e=>`[${e}]`)))(e),...t),getLogger:(...t)=>o(...e,...t)}),s=e=>window.top===e,a=(e,t)=>{try{return e.origin===t.origin}catch(e){return!1}},c=\"openfin/web-shared-worker\";class d{static get lockApi(){return navigator.locks}constructor(e){this.name=e,this.releaseCallback=null,d.pending.add(this),this.lockAcquiredPromise=new Promise(((e,t)=>{this.lockReleasedPromise=d.lockApi.request(this.name,(()=>(d.pending.delete(this),e(),new Promise((e=>{d.held.add(this),this.releaseCallback=e}))))).catch((e=>{throw t(e),e}))}))}async acquired(){await this.lockAcquiredPromise}async release(){if(!this.releaseCallback)throw new Error(`Lock ${this.name} not acquired.`);this.releaseCallback(),this.releaseCallback=null,await this.lockReleasedPromise,d.held.delete(this)}async onReleased(e){if(!this.lockReleasedPromise)throw new Error(`Lock ${this.name} not queued.`);return this.lockReleasedPromise.then(e)}autoRelease(){this.acquired().then((()=>this.release()))}static async releaseAll(){const e=Promise.all([...this.pending].map((async e=>{await e.acquired(),await e.release()})));await Promise.all([...this.held].map((async e=>{await e.release()}))),await e}}d.pending=new Set,d.held=new Set;class l{constructor(e=100,t=2){this.pingIntervalMs=e,this.allowedMissedPings=t,this.lockSelf=async e=>{const t=new d((e=>`__OPENFIN__${e.uuid}_${e.name}`)(e));return await t.acquired(),t}}async lockProxiedConnection(e,t){let i=0;t.addEventListener(\"message\",(e=>{\"pong\"===e.data.topic&&i--}));const r=await this.lockSelf(e);let n=setInterval((()=>{i>=this.allowedMissedPings?(r.release(),clearInterval(n)):(i++,t.postMessage({topic:\"ping\"}))}),this.pingIntervalMs);t.start()}registerProxiedConnection(e){e.addEventListener(\"message\",(t=>{\"ping\"===t.data.topic&&e.postMessage({topic:\"pong\"})})),e.start()}}class h{constructor(e,t,o){this.workerUrl=e,this.iframeWindow=t,this.forceWorker=o,this.identityDisconnectionController=new l,this.isSharedWorkerSupported=()=>!this.forceWorker&&!!window.SharedWorker,this.state=\"ready\",this.establishWorkerConnectionViaWindow=async(e,t)=>{if(a(this.iframeWindow,e)){const o=new MessageChannel,s=new MessageChannel;return this.identityDisconnectionController.registerProxiedConnection(s.port1),new Promise(((a,c)=>{o.port1.addEventListener(\"message\",(e=>{e.data.topic===n(i)&&(e.data.success?a(o.port1):c(e.data.reason))})),o.port1.start();const d={topic:r,payload:{identity:t}};e.postMessage(d,location.origin,[o.port2,s.port2])}))}throw new Error(\"Could not connect via top level browsing context as its origin does not much the web interop broker.\")},this.listenForNestedConnections=e=>{\"top-window\"===this.state&&a(this.iframeWindow,this.iframeWindow.parent)&&this.iframeWindow.parent.addEventListener(\"message\",(async t=>{const{data:n}=t;if(t.origin===location.origin&&n.topic===r){const[r,...o]=t.ports;if(o.length>0&&n.payload?.identity){const[e]=o;await this.identityDisconnectionController.lockProxiedConnection(n.payload.identity,e)}const s={topic:i};e.postMessage(s,[r])}}))},this.initialize=async e=>{if(\"ready\"!==this.state)throw new Error(\"Worker connection already initialized\");return(e=>{const t=i=>!(!(e=>{try{return!e.origin}catch(e){return!0}})(i)&&i.origin===e.origin)||!s(i)&&t(i.parent);return!s(e)&&t(e.parent)})(this.iframeWindow)&&a(this.iframeWindow,this.iframeWindow.top)?this.state=\"partitioned-frame\":s(this.iframeWindow.parent)?this.state=\"top-window\":this.state=\"frame\",this.connect(e)}}async connect(e){if(\"ready\"===this.state)throw new Error(\"Must call initialize before connect\");switch(this.state){case\"partitioned-frame\":return this.establishWorkerConnectionViaWindow(this.iframeWindow.top,e);case\"top-window\":{let t;return t=this.isSharedWorkerSupported()?new SharedWorker(this.workerUrl,c).port:new Worker(this.workerUrl),await this.identityDisconnectionController.lockSelf(e),this.listenForNestedConnections(t),t}case\"frame\":{if(!this.isSharedWorkerSupported())try{return await this.establishWorkerConnectionViaWindow(this.iframeWindow.top,e)}catch(e){throw new Error(`SharedWorker is not supported and an unexpected error occured when trying to connect via fallback mechanism: ${e.message}`,{cause:e})}await this.identityDisconnectionController.lockSelf(e);const{port:t}=new SharedWorker(this.workerUrl,c);return t}default:throw this.state,new Error(`Invalid state: ${this.state}`)}}}const w=o(\"@openfin/core-web/iframe-broker\"),p=()=>{const e=((e,t)=>{const i=new RegExp(`^${t}<(?.*)>$`).exec(e)?.groups?.meta;if(i)try{return JSON.parse(atob(i))}catch(e){throw new Error(`Failed to decode JSON from ${i}.`)}})(window.name,\"of-broker\");if(!e)throw new Error(\"Invalid or missing identity string in iframe context. Ensure that this iframe is being renderered via the @openfin/core-web library.\");return e};function g(t){const i={topic:n(e),success:!1,reason:t?.reason??\"Connection Rejected\"};window.parent.postMessage(i,\"*\")}exports.init=async i=>{try{const{sharedWorkerUrl:r}=i;await(\"loading\"===document.readyState?new Promise((e=>{const t=()=>{e(),window.removeEventListener(\"DOMContentLoaded\",t)};window.addEventListener(\"DOMContentLoaded\",t)})):Promise.resolve());const o=p(),s=new h(r,window,\"same-site\"!==i.experimental?.crossTab),a=await s.initialize(o);w.log(`Loading ${r} in ${s.state} mode...`);const c=await(async(i,r,o)=>{const s=new MessageChannel,a=new MessageChannel,c={topic:t,payload:{identity:o}};await new Promise(((e,i)=>{r.addEventListener(\"message\",(r=>{r.data.topic===n(t)&&(r.data.success?e():i(new Error(r.data.reason)))})),r.start?.(),r.postMessage(c,[a.port2])}));const d={topic:n(e),success:!0,payload:{identity:o}};return i.postMessage(d,\"*\",[s.port2,a.port1]),s.port1})(window.parent,a,o);c.start(),a.start?.(),w.log(`Port transfer complete in ${s.state} mode. Connection established with identity ${JSON.stringify(o)}. SharedWorker support=${s.isSharedWorkerSupported()}`)}catch(e){const t=new Error(`An unexpected error occured during initialization. ${e.message}`);g({reason:t.message}),console.error(t)}},exports.rejectConnections=g;\n","import type { WebLayoutSnapshot } from \"@openfin/core-web\";\nimport type { Settings } from \"../shapes/setting-shapes\";\n\n/**\n * Fetches the settings for the application.\n * @returns The settings for the application.\n */\nexport async function getSettings(): Promise {\n\tconst settings = await getManifestSettings();\n\tif (settings === undefined) {\n\t\tconsole.error(\n\t\t\t\"Unable to run the example as settings are required and we fetch them from the link web manifest from the html page that is being served. It should exist in the customSettings section of the web manifest.\"\n\t\t);\n\t}\n\treturn settings;\n}\n\n/**\n * Returns a default layout from the settings if provided.\n * @returns The default layout from the settings.\n */\nexport async function getDefaultLayout(): Promise {\n\tconst settings = await getSettings();\n\tif (settings?.platform?.layout?.defaultLayout === undefined) {\n\t\tconsole.error(\n\t\t\t\"Unable to run the example as without a layout being defined. Please ensure that settings have been provided in the web manifest.\"\n\t\t);\n\t\treturn;\n\t}\n\tif (typeof settings.platform.layout.defaultLayout === \"string\") {\n\t\tconst layoutResponse = await fetch(settings.platform.layout.defaultLayout);\n\t\tconst layoutJson = (await layoutResponse.json()) as WebLayoutSnapshot;\n\t\treturn layoutJson;\n\t}\n\treturn settings.platform.layout.defaultLayout;\n}\n\n/**\n * Returns the settings from the manifest file.\n * @returns customSettings for this example\n */\nasync function getManifestSettings(): Promise {\n\t// Get the manifest link\n\tconst link = document.querySelector('link[rel=\"manifest\"]');\n\tif (link !== null) {\n\t\tconst manifestResponse = await fetch(link.href);\n\t\tconst manifestJson = (await manifestResponse.json()) as { custom_settings: Settings };\n\t\treturn manifestJson.custom_settings;\n\t}\n}\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","import { init as initBrokerConnection } from \"@openfin/core-web/iframe-broker\";\nimport { getSettings } from \"./settings\";\n\n/**\n * Initializes the OpenFin Web Broker connection.\n * @returns A promise that resolves when the connection is established.\n */\nasync function init(): Promise {\n\tconst settings = await getSettings();\n\tif (settings === undefined) {\n\t\tconsole.error(\n\t\t\t\"Unable to run the sample as we have been unable to load the web manifest and it's settings from the currently running html page. Please ensure that the web manifest is being served and that it contains the custom_settings section.\"\n\t\t);\n\t\treturn;\n\t}\n\treturn initBrokerConnection({\n\t\tsharedWorkerUrl: settings.platform.interop.sharedWorkerUrl\n\t});\n}\n\ninit()\n\t.then(() => {\n\t\tconsole.log(\"Connected to the OpenFin IFrame Web Broker.\");\n\t\treturn true;\n\t})\n\t.catch((err) => console.error(err));\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/web/v19.2.0/cloud-interop/js/interop-view.bundle.js b/web/v19.2.0/cloud-interop/js/interop-view.bundle.js index ef7a58e..cef614b 100644 --- a/web/v19.2.0/cloud-interop/js/interop-view.bundle.js +++ b/web/v19.2.0/cloud-interop/js/interop-view.bundle.js @@ -1,38 +1,38 @@ /******/ (() => { // webpackBootstrap /******/ var __webpack_modules__ = ({ -/***/ "./node_modules/@openfin/core-web/out/api-client.js": -/*!**********************************************************!*\ - !*** ./node_modules/@openfin/core-web/out/api-client.js ***! - \**********************************************************/ +/***/ "../../node_modules/@openfin/core-web/out/api-client.js": +/*!**************************************************************!*\ + !*** ../../node_modules/@openfin/core-web/out/api-client.js ***! + \**************************************************************/ /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; -var e=__webpack_require__(/*! ./main-8cad4070.js */ "./node_modules/@openfin/core-web/out/main-8cad4070.js");__webpack_require__(/*! buffer/ */ "../../node_modules/buffer/index.js"),__webpack_require__(/*! uuid */ "../../node_modules/uuid/dist/esm-browser/index.js"),__webpack_require__(/*! events */ "../../node_modules/events/events.js"),__webpack_require__(/*! lodash/cloneDeep */ "../../node_modules/lodash/cloneDeep.js"),__webpack_require__(/*! lodash/isEqual */ "../../node_modules/lodash/isEqual.js"),exports.connect=e.connect; +var e=__webpack_require__(/*! ./main-8cad4070.js */ "../../node_modules/@openfin/core-web/out/main-8cad4070.js");__webpack_require__(/*! buffer/ */ "../../node_modules/buffer/index.js"),__webpack_require__(/*! uuid */ "../../node_modules/uuid/dist/esm-browser/index.js"),__webpack_require__(/*! events */ "../../node_modules/events/events.js"),__webpack_require__(/*! lodash/cloneDeep */ "../../node_modules/lodash/cloneDeep.js"),__webpack_require__(/*! lodash/isEqual */ "../../node_modules/lodash/isEqual.js"),exports.connect=e.connect; /***/ }), -/***/ "./node_modules/@openfin/core-web/out/main-8cad4070.js": -/*!*************************************************************!*\ - !*** ./node_modules/@openfin/core-web/out/main-8cad4070.js ***! - \*************************************************************/ +/***/ "../../node_modules/@openfin/core-web/out/main-8cad4070.js": +/*!*****************************************************************!*\ + !*** ../../node_modules/@openfin/core-web/out/main-8cad4070.js ***! + \*****************************************************************/ /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; -var e=__webpack_require__(/*! buffer/ */ "../../node_modules/buffer/index.js"),t=__webpack_require__(/*! events */ "../../node_modules/events/events.js"),n=__webpack_require__(/*! lodash/cloneDeep */ "../../node_modules/lodash/cloneDeep.js"),i=__webpack_require__(/*! lodash/isEqual */ "../../node_modules/lodash/isEqual.js"),r=__webpack_require__(/*! uuid */ "../../node_modules/uuid/dist/esm-browser/index.js");const o=(e,t)=>`${t}<${btoa(JSON.stringify(e))}>`;var s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof __webpack_require__.g?__webpack_require__.g:"undefined"!=typeof self?self:{},a={},c={},d={},h={};async function l(e){const t=[];for(const n of e){const e=await n();t.push(e)}return t}Object.defineProperty(h,"__esModule",{value:!0}),h.promiseMapSerial=h.serial=h.promiseMap=h.promisify=void 0,h.promisify=function(e){return(...t)=>new Promise(((n,i)=>{e(...t,((e,t)=>e?i(e):n(t)))}))},h.promiseMap=async function(e,t){return Promise.all(e.map(t))},h.serial=l,h.promiseMapSerial=async function(e,t){return l(e.map(((e,n,i)=>()=>t(e,n,i))))};var u,p=s&&s.__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},w=s&&s.__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)};Object.defineProperty(d,"__esModule",{value:!0}),d.Reply=d.EmitterBase=d.Base=void 0;const y=h;class f{constructor(e){this.isNodeEnvironment=()=>"node"===this.wire.environment.type,this.isOpenFinEnvironment=()=>"openfin"===this.wire.environment.type,this.isBrowserEnvironment=()=>"other"===this.wire.environment.type,this.wire=e}get fin(){return this.wire.getFin()}get me(){return this.wire.me}}d.Base=f;d.EmitterBase=class extends f{constructor(e,t,...n){super(e),this.topic=t,u.set(this,void 0),this.eventNames=()=>this.hasEmitter()?this.getOrCreateEmitter().eventNames():[],this.emit=(e,t,...n)=>!!this.hasEmitter()&&this.getOrCreateEmitter().emit(e,t,...n),this.hasEmitter=()=>this.wire.eventAggregator.has(w(this,u,"f")),this.getOrCreateEmitter=()=>this.wire.eventAggregator.getOrCreate(w(this,u,"f")),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[],this.listenerCount=e=>this.hasEmitter()?this.getOrCreateEmitter().listenerCount(e):0,this.registerEventListener=async(e,t={},n,i)=>{const r={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e},o=this.getOrCreateEmitter();n(o);try{await this.wire.sendAction("subscribe-to-desktop-event",r)}catch(e){throw i(o),this.deleteEmitterIfNothingRegistered(o),e}},this.deregisterEventListener=async(e,t={})=>{if(this.hasEmitter()){const n={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e};await this.wire.sendAction("unsubscribe-to-desktop-event",n).catch((()=>null));return this.getOrCreateEmitter()}return Promise.resolve()},p(this,u,[t,...n],"f"),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[]}async on(e,t,n){return await this.registerEventListener(e,n,(n=>{n.on(e,t)}),(n=>{n.removeListener(e,t)})),this}async addListener(e,t,n){return this.on(e,t,n)}async once(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.once(e,i),n.once(e,t)}),(n=>{n.removeListener(e,i),n.removeListener(e,t)})),this}async prependListener(e,t,n){return await this.registerEventListener(e,n,(n=>{n.prependListener(e,t)}),(n=>{n.removeListener(e,t)})),this}async prependOnceListener(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.prependOnceListener(e,t),n.once(e,i)}),(n=>{n.removeListener(e,t),n.removeListener(e,i)})),this}async removeListener(e,t,n){const i=await this.deregisterEventListener(e,n);return i&&(i.removeListener(e,t),this.deleteEmitterIfNothingRegistered(i)),this}async deregisterAllListeners(e){const t={...this.identity,type:e,topic:this.topic};if(this.hasEmitter()){const e=this.getOrCreateEmitter(),n=e.listenerCount(t.type),i=[];for(let e=0;enull)));return await Promise.all(i),e}}async removeAllListeners(e){const t=async e=>{const t=await this.deregisterAllListeners(e);t&&(t.removeAllListeners(e),this.deleteEmitterIfNothingRegistered(t))};if(e)await t(e);else if(this.hasEmitter()){const e=this.getOrCreateEmitter().eventNames();await(0,y.promiseMap)(e,t)}return this}deleteEmitterIfNothingRegistered(e){0===e.eventNames().length&&this.wire.eventAggregator.delete(w(this,u,"f"))}},u=new WeakMap;d.Reply=class{};var g={};Object.defineProperty(g,"__esModule",{value:!0});var m=g.RuntimeError=g.NotSupportedError=g.NotImplementedError=g.NoAckError=g.DuplicateCorrelationError=g.UnexpectedActionError=g.DisconnectedError=void 0;class v extends Error{constructor(e){super(`Expected websocket state OPEN but found ${e}`),this.readyState=e}}g.DisconnectedError=v;class C extends Error{}g.UnexpectedActionError=C;class b extends Error{}g.DuplicateCorrelationError=b;class I extends Error{}g.NoAckError=I;class E extends Error{}g.NotImplementedError=E;class x extends Error{}g.NotSupportedError=x;class A extends Error{constructor(e){const{message:t,name:n,stack:i,...r}=e;super(t),this.name=n||"Error",this.stack=i??this.toString(),Object.keys(r).forEach((e=>{this[e]=r[e]}))}}class P extends Error{static getCallSite(e=0){const t=Error.stackTraceLimit,n=e+1;Error.stackTraceLimit=t+n;const i=Error.prepareStackTrace;Error.prepareStackTrace=(e,t)=>t;const r=(new Error).stack?.slice(n)??[];return Error.prepareStackTrace=i,Error.stackTraceLimit=t,r}static prepareStackTrace(e,t){if("function"==typeof Error.prepareStackTrace)return Error.prepareStackTrace(e,t);let n="";n+=e.name||"Error",n+=`: ${e.message||""}`;for(const e of t)n+=`\n at ${e.toString()}`;return n}constructor(e,t){const{reason:n,error:i}=e;super(n),this.name="RuntimeError",i?.stack&&(this.cause=new A(i)),t&&(this.stack=P.prepareStackTrace(this,t))}}m=g.RuntimeError=P;var M={},_={},O={};Object.defineProperty(O,"__esModule",{value:!0}),O.validateIdentity=void 0,O.validateIdentity=function(e){let t;return"object"==typeof e&&"string"==typeof e.uuid||(t="Not a valid identity object"),t};var S={},R={},F={},j={},k={},L={},T={};Object.defineProperty(T,"__esModule",{value:!0}),T.handleDeprecatedWarnings=void 0;var $;T.handleDeprecatedWarnings=e=>{(e.contentNavigation?.whitelist||e.contentNavigation?.blacklist||e.contentRedirect?.whitelist||e.contentRedirect?.blacklist)&&console.warn("The properties 'whitelist' and 'blacklist' have been marked as deprecated and will be removed in a future version. Please use 'allowlist' and 'denylist'.")};var B={},G={};Object.defineProperty(G,"__esModule",{value:!0}),G.AsyncRetryableLazy=W=G.Lazy=void 0;var W=G.Lazy=class{constructor(e){this.producerFn=e}getValue(){return this.value||(this.value=this.producerFn()),this.value}};G.AsyncRetryableLazy=class{constructor(e){this.producerFn=e}async getValue(){return this.promise||(this.promise=this.producerFn().catch((e=>{throw delete this.promise,e}))),this.promise}};var H={};Object.defineProperty(H,"__esModule",{value:!0}),H.WebContents=void 0;const N=d;class D extends N.EmitterBase{constructor(e,t,n){super(e,n,t.uuid,t.name),this.identity=t,this.entityType=n}capturePage(e){return this.wire.sendAction("capture-page",{options:e,...this.identity}).then((({payload:e})=>e.data))}executeJavaScript(e){return this.wire.sendAction("execute-javascript-in-window",{...this.identity,code:e}).then((({payload:e})=>e.data))}getZoomLevel(){return this.wire.sendAction("get-zoom-level",this.identity).then((({payload:e})=>e.data))}setZoomLevel(e){return this.wire.sendAction("set-zoom-level",{...this.identity,level:e}).then((()=>{}))}navigate(e){return this.wire.sendAction("navigate-window",{...this.identity,url:e}).then((()=>{}))}navigateBack(){return this.wire.sendAction("navigate-window-back",{...this.identity}).then((()=>{}))}async navigateForward(){await this.wire.sendAction("navigate-window-forward",{...this.identity})}stopNavigation(){return this.wire.sendAction("stop-window-navigation",{...this.identity}).then((()=>{}))}reload(e=!1){return this.wire.sendAction("reload-window",{ignoreCache:e,...this.identity}).then((()=>{}))}print(e={}){return this.wire.sendAction("print",{...this.identity,options:e}).then((()=>{}))}findInPage(e,t){return this.wire.sendAction("find-in-page",{...this.identity,searchTerm:e,options:t}).then((({payload:e})=>e.data))}stopFindInPage(e){return this.wire.sendAction("stop-find-in-page",{...this.identity,action:e}).then((()=>{}))}getPrinters(){return this.wire.sendAction("get-printers",{...this.identity}).then((({payload:e})=>e.data))}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){await this.wire.sendAction("focus-window",{emitSynthFocused:e,...this.identity})}async showDeveloperTools(){await this.wire.sendAction("show-developer-tools",this.identity)}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction("get-process-info",this.identity);return e}async getSharedWorkers(){return this.wire.sendAction("get-shared-workers",this.identity).then((({payload:e})=>e.data))}async inspectSharedWorker(){await this.wire.sendAction("inspect-shared-worker",{...this.identity})}async inspectSharedWorkerById(e){await this.wire.sendAction("inspect-shared-worker-by-id",{...this.identity,workerId:e})}async inspectServiceWorker(){await this.wire.sendAction("inspect-service-worker",{...this.identity})}async showPopupWindow(e){if(this.wire.sendAction(`${this.entityType}-show-popup-window`,this.identity).catch((()=>{})),e?.onPopupReady){const t=async({popupName:t})=>{try{const n=this.fin.Window.wrapSync({uuid:this.fin.me.uuid,name:t});await e.onPopupReady(n)}catch(e){throw new Error(`Something went wrong during onPopupReady execution: ${e}`)}};await this.once("popup-ready",t)}const{payload:t}=await this.wire.sendAction("try-create-popup-window",{options:{...e,hasResultCallback:!!e?.onPopupResult,hasReadyCallback:!!e?.onPopupReady},...this.identity}),{data:{willOpen:n,options:i}}=t;n&&await this.fin.Window.create(i.initialOptions);if(e?.onPopupResult){const t=async t=>{await e.onPopupResult((e=>{const{name:t,uuid:n,result:i,data:r}=e,o={identity:{name:t,uuid:n},result:i};return r&&(o.data=r),o})(t))},n=async()=>{await this.removeListener("popup-result",t)};await this.on("popup-result",t),await this.once("popup-teardown",n)}const{payload:r}=await this.wire.sendAction("show-popup-window",{options:i,...this.identity});return r.data}}var U,V,z,K,q;function J(){return V||(V=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(function(){if($)return L;$=1,Object.defineProperty(L,"__esModule",{value:!0}),L.ViewModule=void 0;const e=d,t=O,n=J(),i=T;class r extends e.Base{async create(e){const{uuid:t}=this.wire.me;if(!e.name||"string"!=typeof e.name)throw new Error("Please provide a name property as a string in order to create a View.");return(0,i.handleDeprecatedWarnings)(e),this.wire.environment.childViews?await this.wire.environment.createChildContent({entityType:"view",options:{...e,uuid:t}}):await this.wire.sendAction("create-view",{...e,uuid:t}),this.wrapSync({uuid:t,name:e.name})}async wrap(e){this.wire.sendAction("view-wrap").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}wrapSync(e){this.wire.sendAction("view-wrap-sync").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}getCurrent(){if(this.wire.sendAction("view-get-current").catch((e=>{})),!this.wire.me.isView)throw new Error("You are not in a View context");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction("view-get-current-sync").catch((e=>{})),!this.wire.me.isView)throw new Error("You are not in a View context");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return L.ViewModule=r,L}(),e),n(function(){if(U)return B;var e;U=1,Object.defineProperty(B,"__esModule",{value:!0}),B.View=void 0;const t=g,n=G,i=H,r=ie();class o extends i.WebContents{constructor(i,o){super(i,o,"view"),this.identity=o,e.set(this,new n.Lazy((()=>this.fin.Platform.wrapSync(this.identity).getClient()))),this.attach=async e=>{await this.wire.sendAction("attach-view",{target:e,...this.identity})},this.destroy=async()=>{await this.wire.sendAction("destroy-view",{...this.identity})},this.show=async()=>{await this.wire.sendAction("show-view",{...this.identity})},this.showAt=async(e,t={})=>{await this.wire.sendAction("show-view-at",{bounds:e,...this.identity,options:t})},this.bringToFront=async()=>{await this.wire.sendAction("bring-view-to-front",{...this.identity})},this.hide=async()=>{await this.wire.sendAction("hide-view",{...this.identity})},this.setBounds=async e=>{await this.wire.sendAction("set-view-bounds",{bounds:e,...this.identity})},this.getBounds=async()=>(await this.wire.sendAction("get-view-bounds",{...this.identity})).payload.data,this.getInfo=async()=>(await this.wire.sendAction("get-view-info",{...this.identity})).payload.data,this.getParentLayout=async()=>(this.wire.sendAction("view-get-parent-layout",{...this.identity}).catch((()=>{})),this.fin.Platform.Layout.getLayoutByViewIdentity(this.identity)),this.getOptions=async()=>this.wire.sendAction("get-view-options",{...this.identity}).then((({payload:e})=>e.data)),this.updateOptions=async e=>this.wire.sendAction("update-view-options",{options:e,...this.identity}).then((()=>{})),this.getCurrentWindow=async()=>{const{payload:{data:e}}=await this.wire.sendAction("get-view-window",{...this.identity});return new r._Window(this.wire,e)},this.getCurrentStack=async()=>{this.wire.sendAction("view-get-current-stack").catch((()=>{}));try{return(await this.getParentLayout()).getStackByViewIdentity(this.identity)}catch(e){throw new t.RuntimeError({reason:"This view does not belong to a stack.",error:e})}},this.triggerBeforeUnload=async()=>(await this.wire.sendAction("trigger-before-unload",{...this.identity})).payload.data,this.bindToElement=async e=>{if(!e)throw new Error("Element not found.");return this.wire.environment.observeBounds(e,(async e=>this.setBounds(e)))}}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){const t=await this.getCurrentWindow();await t.focusedWebViewWasChanged(),await super.focus({emitSynthFocused:e})}}return B.View=o,e=new WeakMap,B}(),e)}(k)),k}function Y(){if(z)return j;z=1,Object.defineProperty(j,"__esModule",{value:!0}),j.Application=void 0;const e=d,t=ie(),n=J();class i extends e.EmitterBase{constructor(e,n){super(e,"application",n.uuid),this.identity=n,this.window=new t._Window(this.wire,{uuid:this.identity.uuid,name:this.identity.uuid})}windowListFromIdentityList(e){const n=[];return e.forEach((e=>{n.push(new t._Window(this.wire,{uuid:e.uuid,name:e.name}))})),n}isRunning(){return this.wire.sendAction("is-application-running",this.identity).then((({payload:e})=>e.data))}async quit(e=!1){try{await this._close(e),await this.wire.sendAction("destroy-application",{force:e,...this.identity})}catch(e){if(!["Remote connection has closed","Could not locate the requested application"].some((t=>e.message.includes(t))))throw e}}async _close(e=!1){try{await this.wire.sendAction("close-application",{force:e,...this.identity})}catch(e){if(!e.message.includes("Remote connection has closed"))throw e}}close(e=!1){return console.warn("Deprecation Warning: Application.close is deprecated Please use Application.quit"),this.wire.sendAction("application-close",this.identity).catch((e=>{})),this._close(e)}getChildWindows(){return this.wire.sendAction("get-child-windows",this.identity).then((({payload:e})=>{const t=[];return e.data.forEach((e=>{t.push({uuid:this.identity.uuid,name:e})})),this.windowListFromIdentityList(t)}))}getManifest(){return this.wire.sendAction("get-application-manifest",this.identity).then((({payload:e})=>e.data))}getParentUuid(){return this.wire.sendAction("get-parent-application",this.identity).then((({payload:e})=>e.data))}getShortcuts(){return this.wire.sendAction("get-shortcuts",this.identity).then((({payload:e})=>e.data))}async getViews(){const{payload:e}=await this.wire.sendAction("application-get-views",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}getZoomLevel(){return this.wire.sendAction("get-application-zoom-level",this.identity).then((({payload:e})=>e.data))}getWindow(){return this.wire.sendAction("application-get-window",this.identity).catch((e=>{})),Promise.resolve(this.window)}registerUser(e,t){return this.wire.sendAction("register-user",{userName:e,appName:t,...this.identity}).then((()=>{}))}removeTrayIcon(){return this.wire.sendAction("remove-tray-icon",this.identity).then((()=>{}))}restart(){return this.wire.sendAction("restart-application",this.identity).then((()=>{}))}run(){return console.warn("Deprecation Warning: Application.run is deprecated Please use fin.Application.start"),this.wire.sendAction("application-run",this.identity).catch((e=>{})),this._run()}_run(e={}){return this.wire.sendAction("run-application",{manifestUrl:this._manifestUrl,opts:e,...this.identity}).then((()=>{}))}scheduleRestart(){return this.wire.sendAction("relaunch-on-close",this.identity).then((()=>{}))}async sendApplicationLog(){const{payload:e}=await this.wire.sendAction("send-application-log",this.identity);return e.data}async setJumpList(e){await this.wire.sendAction("set-jump-list",{config:e,...this.identity})}setTrayIcon(e){return this.wire.sendAction("set-tray-icon",{enabledIcon:e,...this.identity}).then((()=>{}))}setShortcuts(e){return this.wire.sendAction("set-shortcuts",{data:e,...this.identity}).then((()=>{}))}async setShortcutQueryParams(e){await this.wire.sendAction("set-shortcut-query-args",{data:e,...this.identity})}setZoomLevel(e){return this.wire.sendAction("set-application-zoom-level",{level:e,...this.identity}).then((()=>{}))}async setAppLogUsername(e){await this.wire.sendAction("set-app-log-username",{data:e,...this.identity})}getTrayIconInfo(){return this.wire.sendAction("get-tray-icon-info",this.identity).then((({payload:e})=>e.data))}hasTrayIcon(){return this.wire.sendAction("has-tray-icon",this.identity).then((({payload:e})=>e.data))}terminate(){return this.wire.sendAction("terminate-application",this.identity).then((()=>{}))}wait(){return this.wire.sendAction("wait-for-hung-application",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction("get-info",this.identity).then((({payload:e})=>e.data))}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction("application-get-process-info",this.identity);return e}async setFileDownloadLocation(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t};await this.wire.sendAction("set-file-download-location",{...n,downloadLocation:e})}async getFileDownloadLocation(){const{payload:{data:e}}=await this.wire.sendAction("get-file-download-location",this.identity);return e}async showTrayIconPopupMenu(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t},{payload:i}=await this.wire.sendAction("show-tray-icon-popup-menu",{...n,options:e});return i.data}async closeTrayIconPopupMenu(){const{name:e}=this.wire.me,t={uuid:this.identity.uuid,name:e};await this.wire.sendAction("close-tray-icon-popup-menu",{...t})}}return j.Application=i,j}function Z(){return q||(q=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(function(){if(K)return F;K=1,Object.defineProperty(F,"__esModule",{value:!0}),F.ApplicationModule=void 0;const e=d,t=O,n=Y();class i extends e.Base{async wrap(e){this.wire.sendAction("wrap-application").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}wrapSync(e){this.wire.sendAction("wrap-application-sync").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}async _create(e){return void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&void 0===e.isPlatformController&&(e.autoShow=!0),await this.wire.sendAction("create-application",e),this.wrap({uuid:e.uuid})}create(e){return console.warn("Deprecation Warning: fin.Application.create is deprecated. Please use fin.Application.start"),this.wire.sendAction("application-create").catch((e=>{})),this._create(e)}async start(e){this.wire.sendAction("start-application").catch((e=>{}));const t=await this._create(e);return await this.wire.sendAction("run-application",{uuid:e.uuid}),t}async startManyManifests(e,t){return this.wire.sendAction("run-applications",{applications:e,opts:t}).then((()=>{}))}getCurrent(){return this.wire.sendAction("get-current-application").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction("get-current-application-sync").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}async startFromManifest(e,t){this.wire.sendAction("application-start-from-manifest").catch((e=>{}));const n=await this._createFromManifest(e);return await n._run(t),n}createFromManifest(e){return console.warn("Deprecation Warning: fin.Application.createFromManifest is deprecated. Please use fin.Application.startFromManifest"),this.wire.sendAction("application-create-from-manifest").catch((e=>{})),this._createFromManifest(e)}_createFromManifest(e){return this.wire.sendAction("get-application-manifest",{manifestUrl:e}).then((({payload:e})=>{const t=e.data.platform?e.data.platform.uuid:e.data.startup_app.uuid;return this.wrap({uuid:t})})).then((t=>(t._manifestUrl=e,t)))}}return F.ApplicationModule=i,F}(),e),n(Y(),e)}(R)),R}H.WebContents=D;var Q={};Object.defineProperty(Q,"__esModule",{value:!0}),Q.promisifySubscription=void 0;var X,ee,te;function ne(){if(X)return S;X=1,Object.defineProperty(S,"__esModule",{value:!0}),S._Window=void 0;const e=Z(),t=H,n=J(),i=T,r=Q;class o extends t.WebContents{constructor(e,t){super(e,t,"window")}async createWindow(e){this.wire.sendAction("window-create-window",this.identity).catch((e=>{}));const t=await(0,r.promisifySubscription)(this,"fire-constructor-callback");void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&(e.autoShow=!0),(0,i.handleDeprecatedWarnings)(e);const n=this.wire.environment.createChildContent({entityType:"window",options:e}),[o]=await Promise.all([t.getValue(),n]);let s;const{success:a}=o,c=o.data,{message:d}=c;s=a?{httpResponseCode:c.httpResponseCode,apiInjected:c.apiInjected}:{message:c.message,networkErrorCode:c.networkErrorCode,stack:c.stack};const h={message:d,cbPayload:s,success:a};try{this.getWebWindow().fin.__internal_.openerSuccessCBCalled()}catch(e){}return h.success?this:Promise.reject(h)}getAllFrames(){return this.wire.sendAction("get-all-frames",this.identity).then((({payload:e})=>e.data))}getBounds(){return this.wire.sendAction("get-window-bounds",this.identity).then((({payload:e})=>e.data))}center(){return this.wire.sendAction("center-window",this.identity).then((()=>{}))}blur(){return this.wire.sendAction("blur-window",this.identity).then((()=>{}))}bringToFront(){return this.wire.sendAction("bring-window-to-front",this.identity).then((()=>{}))}animate(e,t){return this.wire.sendAction("animate-window",{transitions:e,options:t,...this.identity}).then((()=>{}))}hide(){return this.wire.sendAction("hide-window",this.identity).then((()=>{}))}close(e=!1){return this.wire.sendAction("close-window",{force:e,...this.identity}).then((()=>{Object.setPrototypeOf(this,null)}))}focusedWebViewWasChanged(){return this.wire.sendAction("focused-webview-changed",this.identity).then((()=>{}))}getNativeId(){return this.wire.sendAction("get-window-native-id",this.identity).then((({payload:e})=>e.data))}async getCurrentViews(){const{payload:e}=await this.wire.sendAction("window-get-views",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}disableFrame(){return console.warn("Function is deprecated; use disableUserMovement instead."),this.wire.sendAction("disable-window-frame",this.identity).then((()=>{}))}disableUserMovement(){return this.wire.sendAction("disable-window-frame",this.identity).then((()=>{}))}enableFrame(){return console.warn("Function is deprecated; use enableUserMovement instead."),this.wire.sendAction("enable-window-frame",this.identity).then((()=>{}))}enableUserMovement(){return this.wire.sendAction("enable-window-frame",this.identity).then((()=>{}))}flash(){return this.wire.sendAction("flash-window",this.identity).then((()=>{}))}stopFlashing(){return this.wire.sendAction("stop-flash-window",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction("get-window-info",this.identity).then((({payload:e})=>e.data))}async getLayout(e){this.wire.sendAction("window-get-layout",this.identity).catch((e=>{}));const t=await this.getOptions();if(!t.layout&&!t.layoutSnapshot)throw new Error("Window does not have a Layout");return this.fin.Platform.Layout.wrap(e??this.identity)}getOptions(){return this.wire.sendAction("get-window-options",this.identity).then((({payload:e})=>e.data))}getParentApplication(){return this.wire.sendAction("window-get-parent-application",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity))}getParentWindow(){return this.wire.sendAction("window-get-parent-window",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity)).then((e=>e.getWindow()))}async getSnapshot(e){const t={area:e,...this.identity};console.warn("Window.getSnapshot has been deprecated, please use Window.capturePage");return(await this.wire.sendAction("get-window-snapshot",t)).payload.data}getState(){return this.wire.sendAction("get-window-state",this.identity).then((({payload:e})=>e.data))}getWebWindow(){return this.wire.sendAction("window-get-web-window",this.identity).catch((e=>{})),this.wire.environment.getWebWindow(this.identity)}isMainWindow(){return this.wire.sendAction("window-is-main-window",this.identity).catch((e=>{})),this.me.uuid===this.me.name}isShowing(){return this.wire.sendAction("is-window-showing",this.identity).then((({payload:e})=>e.data))}maximize(){return this.wire.sendAction("maximize-window",this.identity).then((()=>{}))}minimize(){return this.wire.sendAction("minimize-window",this.identity).then((()=>{}))}moveBy(e,t,n){return this.wire.sendAction("move-window-by",{deltaLeft:e,deltaTop:t,positioningOptions:n,...this.identity}).then((()=>{}))}moveTo(e,t,n){return this.wire.sendAction("move-window",{left:e,top:t,positioningOptions:n,...this.identity}).then((()=>{}))}resizeBy(e,t,n,i){return this.wire.sendAction("resize-window-by",{deltaWidth:Math.floor(e),deltaHeight:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}resizeTo(e,t,n,i){return this.wire.sendAction("resize-window",{width:Math.floor(e),height:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}restore(){return this.wire.sendAction("restore-window",this.identity).then((()=>{}))}setAsForeground(){return this.wire.sendAction("set-foreground-window",this.identity).then((()=>{}))}setBounds(e,t){return this.wire.sendAction("set-window-bounds",{...e,...this.identity,positioningOptions:t}).then((()=>{}))}show(e=!1){return this.wire.sendAction("show-window",{force:e,...this.identity}).then((()=>{}))}showAt(e,t,n=!1){return this.wire.sendAction("show-at-window",{force:n,left:Math.floor(e),top:Math.floor(t),...this.identity}).then((()=>{}))}updateOptions(e){return this.wire.sendAction("update-window-options",{options:e,...this.identity}).then((()=>{}))}authenticate(e,t){return this.wire.sendAction("window-authenticate",{userName:e,password:t,...this.identity}).then((()=>{}))}async showPopupMenu(e){const{payload:t}=await this.wire.sendAction("show-popup-menu",{options:e,...this.identity});return t.data}async closePopupMenu(){return this.wire.sendAction("close-popup-menu",{...this.identity}).then((()=>{}))}async dispatchPopupResult(e){this.wire.sendAction("window-dispatch-popup-result",this.identity).catch((e=>{})),await this.wire.sendAction("dispatch-popup-result",{data:e,...this.identity})}async print(e={content:"self"}){switch(e.content){case void 0:case"self":return super.print(e);case"screenshot":return this.wire.sendAction("print-screenshot",this.identity).then((()=>{}));case"views":return this.wire.sendAction("print-views",{...this.identity,options:e}).then((()=>{}));default:return}}}return S._Window=o,S}function ie(){return te||(te=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(function(){if(ee)return _;ee=1,Object.defineProperty(_,"__esModule",{value:!0}),_._WindowModule=void 0;const e=d,t=O,n=ne();class i extends e.Base{async wrap(e){this.wire.sendAction("window-wrap").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}wrapSync(e){this.wire.sendAction("window-wrap-sync").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}create(e){return this.wire.sendAction("create-window").catch((e=>{})),new n._Window(this.wire,{uuid:this.me.uuid,name:e.name}).createWindow(e)}getCurrent(){if(this.wire.sendAction("get-current-window").catch((e=>{})),!this.wire.me.isWindow)throw new Error("You are not in a Window context");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction("get-current-window-sync").catch((e=>{})),!this.wire.me.isWindow)throw new Error("You are not in a Window context");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return _._WindowModule=i,_}(),e),n(ne(),e)}(M)),M}Q.promisifySubscription=async(e,t,n=(()=>!0),i)=>{let r,o,s;const a=new Promise(((e,t)=>{r=e,o=t})),c=e=>{n(e)&&(clearTimeout(s),r(e))};return await e.on(t,c),i&&(s=setTimeout((()=>o(new Error("event timed out"))),i)),a.finally((()=>{e.removeListener(t,c).catch((()=>null))})),{getValue:()=>a}},Object.defineProperty(c,"__esModule",{value:!0}),c.System=void 0;const re=d,oe=g,se=ie(),ae=t;class ce extends re.EmitterBase{constructor(e){super(e,"system")}sendExternalProcessRequest(e,t){return new Promise(((n,i)=>{const r="external-process-exited";let o,s,a,c;"function"==typeof t.listener&&(a=e=>{const n=e||{};s={topic:"exited",uuid:n.processUuid||"",exitCode:n.exitCode||0},o===e.processUuid&&(t.listener(s),c.removeListener(r,a))},this.wire.me.name||(this.wire.me.name=this.wire.me.uuid),c=new se._Window(this.wire,this.wire.me),c.on(r,a)),this.wire.sendAction(e,t).then((({payload:e})=>{o=e.data.uuid,n(e.data),s&&o===s.uuid&&(t.listener(s),c.removeListener(r,a))})).catch((e=>{c&&c.removeListener(r,a),i(e)}))}))}getVersion(){return this.wire.sendAction("get-version").then((({payload:e})=>e.data))}clearCache(e){return this.wire.sendAction("clear-cache",e).then((()=>{}))}deleteCacheOnExit(){return this.wire.sendAction("delete-cache-request").then((()=>{}))}exit(){return this.wire.sendAction("exit-desktop").then((()=>{}))}async fetchManifest(e){const{payload:{data:t}}=await this.wire.sendAction("fetch-manifest",{manifestUrl:e});return t}flushCookieStore(){return this.wire.sendAction("flush-cookie-store").then((()=>{}))}getAllWindows(){return this.wire.sendAction("get-all-windows").then((({payload:e})=>e.data))}getAllApplications(){return this.wire.sendAction("get-all-applications").then((({payload:e})=>e.data))}getCommandLineArguments(){return this.wire.sendAction("get-command-line-arguments").then((({payload:e})=>e.data))}async getCrashReporterState(){const{payload:{data:{diagnosticMode:e,isRunning:t}}}=await this.wire.sendAction("get-crash-reporter-state");return console.warn("diagnosticMode property is deprecated. It will be removed in a future version"),{diagnosticMode:e,diagnosticsMode:e,isRunning:t}}async startCrashReporter(e){const t=e,n={...t,diagnosticMode:t.diagnosticsMode||t.diagnosticMode},{payload:{data:{diagnosticMode:i,isRunning:r}}}=await this.wire.sendAction("start-crash-reporter",n);return{diagnosticMode:i,diagnosticsMode:i,isRunning:r}}getUniqueUserId(){return this.wire.sendAction("get-unique-user-id").then((({payload:e})=>e.data))}getEntityInfo(e,t){return this.wire.sendAction("get-entity-info",{uuid:e,name:t}).then((({payload:e})=>e.data))}getEnvironmentVariable(e){return this.wire.sendAction("get-environment-variable",{environmentVariables:e}).then((({payload:e})=>e.data))}getFocusedWindow(){return this.wire.sendAction("get-focused-window").then((({payload:e})=>e.data))}async isAppCertified(e){const{payload:{data:{certifiedInfo:t}}}=await this.wire.sendAction("is-app-certified",{manifestUrl:e});return t}getInstalledRuntimes(){return this.wire.sendAction("get-installed-runtimes").then((({payload:e})=>e.data.runtimes))}async getInstalledApps(){const{payload:{data:{installedApps:e}}}=await this.wire.sendAction("get-installed-apps");return e}getLog(e){return this.wire.sendAction("view-log",e).then((({payload:e})=>e.data))}getMachineId(){return this.wire.sendAction("get-machine-id").then((({payload:e})=>e.data))}getMinLogLevel(){return this.wire.sendAction("get-min-log-level").then((({payload:e})=>e.data))}getLogList(){return this.wire.sendAction("list-logs").then((({payload:e})=>e.data))}getMonitorInfo(){return this.wire.sendAction("get-monitor-info").then((({payload:e})=>e.data))}getMousePosition(){return this.wire.sendAction("get-mouse-position").then((({payload:e})=>e.data))}getProcessList(){return console.warn("System.getProcessList has been deprecated. Please consider using our new process APIs: Window.getProcessInfo, View.getProcessInfo, Application.getProcessInfo, System.getAllProcessInfo"),this.wire.sendAction("process-snapshot").then((({payload:e})=>e.data))}async getAllProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction("get-all-process-info",this.identity);return e}getProxySettings(){return this.wire.sendAction("get-proxy-settings").then((({payload:e})=>e.data))}getRuntimeInfo(){return this.wire.sendAction("get-runtime-info").then((({payload:e})=>e.data))}getRvmInfo(){return this.wire.sendAction("get-rvm-info").then((({payload:e})=>e.data))}getHostSpecs(){return this.wire.sendAction("get-host-specs").then((({payload:e})=>e.data))}getOSInfo(){return this.wire.sendAction("get-os-info").then((({payload:e})=>e.data))}launchExternalProcess(e){return this.sendExternalProcessRequest("launch-external-process",e)}monitorExternalProcess(e){return this.sendExternalProcessRequest("monitor-external-process",e)}log(e,t){return this.wire.sendAction("write-to-log",{level:e,message:t}).then((()=>{}))}openUrlWithBrowser(e){return this.wire.sendAction("open-url-with-browser",{url:e}).then((()=>{}))}async registerCustomProtocol(e){if("object"!=typeof e)throw new Error("Must provide an object with a `protocolName` property having a string value.");await this.wire.sendAction("register-custom-protocol",e)}async unregisterCustomProtocol(e){await this.wire.sendAction("unregister-custom-protocol",{protocolName:e})}async getCustomProtocolState(e){return this.wire.sendAction("get-custom-protocol-state",{protocolName:e}).then((({payload:e})=>e.data))}releaseExternalProcess(e){return this.wire.sendAction("release-external-process",{uuid:e}).then((()=>{}))}showDeveloperTools(e){return this.wire.sendAction("show-developer-tools",e).then((()=>{}))}terminateExternalProcess(e){return this.wire.sendAction("terminate-external-process",e).then((()=>{}))}updateProxySettings(e){return this.wire.sendAction("update-proxy",e).then((()=>{}))}async downloadAsset(e,t){const n=()=>{};let i=n,r=n;const o=new Promise(((e,t)=>{i=e,r=t}));if("openfin"!==this.wire.environment.type)throw new oe.NotSupportedError("downloadAsset only supported in an OpenFin Render process");const s=oe.RuntimeError.getCallSite(),a=this.wire.environment.getNextMessageId().toString(),c=`asset-download-progress-${a}`,d=`asset-download-error-${a}`,h=`asset-download-complete-${a}`,l=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},u=()=>{this.removeListener(c,l)};await Promise.all([this.on(c,l),this.once(d,(e=>{u();const{reason:t,err:n}=e;r(new oe.RuntimeError({reason:t,error:n},s))})),this.once(h,(()=>{u(),i()}))]);const p=Object.assign(e,{downloadId:a});return await this.wire.sendAction("download-asset",p).catch((e=>{throw u(),e})),o}downloadRuntime(e,t){const n=oe.RuntimeError.getCallSite();return new Promise(((i,r)=>{if("openfin"!==this.wire.environment.type)return void r(new oe.NotSupportedError("downloadRuntime only supported in an OpenFin Render process"));const o=this.wire.environment.getNextMessageId().toString(),s=`runtime-download-progress-${o}`,a=`runtime-download-error-${o}`,c=`runtime-download-complete-${o}`,d=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},h=()=>{this.removeListener(s,d)};this.on(s,d),this.once(a,(e=>{h();const{reason:t,err:i}=e;r(new oe.RuntimeError({reason:t,error:i},n))})),this.once(c,(()=>{h(),i()}));const l=Object.assign(e,{downloadId:o});this.wire.sendAction("download-runtime",l).catch((e=>{h(),r(e)}))}))}downloadPreloadScripts(e){return this.wire.sendAction("download-preload-scripts",{scripts:e}).then((({payload:e})=>e.data))}getAllExternalApplications(){return this.wire.sendAction("get-all-external-applications").then((({payload:e})=>e.data))}getAppAssetInfo(e){return this.wire.sendAction("get-app-asset-info",e).then((({payload:e})=>e.data))}getCookies(e){const t=this.wire.environment.getUrl(),n=Object.assign(e,{url:t});return this.wire.sendAction("get-cookies",n).then((({payload:e})=>e.data))}setMinLogLevel(e){return this.wire.sendAction("set-min-log-level",{level:e}).then((()=>{}))}resolveUuid(e){return this.wire.sendAction("resolve-uuid",{entityKey:e}).then((({payload:e})=>e.data))}executeOnRemote(e,t){return t.requestingIdentity=e,this.wire.ferryAction(t)}readRegistryValue(e,t,n){return this.wire.sendAction("read-registry-value",{rootKey:e,subkey:t,value:n}).then((({payload:e})=>e.data))}registerExternalConnection(e){return this.wire.sendAction("register-external-connection",{uuid:e}).then((({payload:e})=>e.data))}async getServiceConfiguration(e){if("string"!=typeof e.name)throw new Error("Must provide an object with a `name` property having a string value");const{name:t}=e;return this.wire.sendAction("get-service-configuration",{name:t}).then((({payload:e})=>e.data))}async getSystemAppConfig(e){if("string"!=typeof e)throw new Error("Must provide a string value for name of system app");return this.wire.sendAction("get-system-app-configuration",{name:e}).then((({payload:e})=>e.data))}async registerShutdownHandler(e){this.wire.sendAction("system-register-shutdown-handler").catch((e=>{}));const{uuid:t,name:n}=this.wire.me;this.on("system-shutdown",(i=>{e({proceed:()=>{this.wire.environment.raiseEvent("application/system-shutdown-handled",{uuid:t,name:n,topic:"application"})}})}))}runRvmHealthCheck(){return this.wire.sendAction("run-rvm-health-check").then((({payload:e})=>e.data))}async launchManifest(e,t={}){const{subscribe:n,...i}=t,r=i;if(n){const e=new ae.EventEmitter;n(e);const t="app-version-progress",i="runtime-status",o="app-version-complete",s="app-version-error",a=this.wire.environment.getNextMessageId().toString();r.appVersionId=a;const c=[o,t,i,s],d=e=>{const{appVersionId:t,topic:n,type:i,...r}=e;return{...r,type:c.find((e=>i.includes(e)))}},h=t=>{const n=d(t);e.emit(n.type,n)},l=()=>{this.removeListener(`${t}.${a}`,h),this.removeListener(`${i}.${a}`,h),this.removeListener(`${o}.${a}`,h),this.removeListener(`${s}.${a}`,h),this.removeListener(`${o}.${a}`,l),this.removeListener(`${s}.${a}`,l)};await Promise.all([this.on(`${t}.${a}`,h),this.on(`${i}.${a}`,h),this.once(`${o}.${a}`,h),this.once(`${s}.${a}`,h),this.once(`${o}.${a}`,l),this.once(`${s}.${a}`,l)])}return(await this.wire.sendAction("launch-manifest",{manifestUrl:e,opts:r})).payload.data.manifest}async queryPermissionForCurrentContext(e){const t={uuid:this.wire.me.uuid,name:this.wire.me.name};return(await this.wire.sendAction("query-permission-for-current-context",{apiName:e,identity:t})).payload.data}async enableNativeWindowIntegrationProvider(e){const{payload:t}=await this.wire.sendAction("enable-native-window-integration-provider",{permissions:e});return t.data}async registerUsage({data:e,type:t}){await this.wire.sendAction("register-usage",{data:e,type:t})}async getPrinters(){const{payload:e}=await this.wire.sendAction("system-get-printers");return e.data}async updateProcessLoggingOptions(e){await this.wire.sendAction("system-update-process-logging-options",{options:e})}async getDomainSettings(){const{payload:{data:e}}=await this.wire.sendAction("get-domain-settings",this.identity);return e}async setDomainSettings(e){await this.wire.sendAction("set-domain-settings",{domainSettings:e,...this.identity})}async refreshExtensions(){const{payload:e}=await this.wire.sendAction("refresh-extensions");return e.data}async getInstalledExtensions(){const{payload:e}=await this.wire.sendAction("get-installed-extensions");return e.data}}c.System=ce;var de={},he={};Object.defineProperty(he,"__esModule",{value:!0}),he.RefCounter=void 0;he.RefCounter=class{constructor(){this.topicRefMap=new Map}incRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t+1;n=i,this.topicRefMap.set(e,i)}else this.topicRefMap.set(e,1),n=1;return n}decRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t-1;this.topicRefMap.set(e,i),n=i}else n=-1;return n}actOnFirst(e,t,n){return 1===this.incRefCount(e)?t():n()}actOnLast(e,t,n){return 0===this.decRefCount(e)?t():n()}};var le={},ue={},pe={};Object.defineProperty(pe,"__esModule",{value:!0}),pe.ChannelBase=pe.ProtectedItems=void 0;const we=e=>async(t,n,i)=>{const r=await e(t,n,i);return void 0===r?n:r};pe.ProtectedItems=class{constructor(e,t){this.providerIdentity=e,this.close=t}};class ye{static defaultAction(e){throw new Error(`No action registered at target for ${e}`)}constructor(){this.subscriptions=new Map}async processAction(e,t,n){try{const i=this.subscriptions.has(e)?this.subscriptions.get(e):(t,n)=>(this.defaultAction??ye.defaultAction)(e,t,n),r=this.preAction?await this.preAction(e,t,n):t,o=await i(r,n);return this.postAction?await this.postAction(e,o,n):o}catch(t){if(this.errorMiddleware)return this.errorMiddleware(e,t,n);throw t}}beforeAction(e){if(this.preAction)throw new Error("Already registered beforeAction middleware");this.preAction=we(e)}onError(e){if(this.errorMiddleware)throw new Error("Already registered error middleware");this.errorMiddleware=e}afterAction(e){if(this.postAction)throw new Error("Already registered afterAction middleware");this.postAction=we(e)}remove(e){this.subscriptions.delete(e)}setDefaultAction(e){if(this.defaultAction)throw new Error("default action can only be set once");this.defaultAction=e}register(e,t){if(this.subscriptions.has(e))throw new Error(`Subscription already registered for action: ${e}. Unsubscribe before adding new subscription`);return this.subscriptions.set(e,t),!0}}pe.ChannelBase=ye;var fe,ge,me,ve=s&&s.__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)},Ce=s&&s.__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};Object.defineProperty(ue,"__esModule",{value:!0}),ue.ChannelClient=void 0;const be=pe,Ie=new Map;class Ee extends be.ChannelBase{static closeChannelByEndpointId(e){const t=Ie.get(e);t&&ve(t,me,"f").call(t)}static handleProviderDisconnect(e){for(const t of Ie.values())t.providerIdentity.channelId===e.channelId&&(t.disconnectListener(e),ve(t,me,"f").call(t))}constructor(e,t,n){super(),fe.set(this,void 0),ge.set(this,void 0),this.processAction=(e,t,n)=>super.processAction(e,t,n),me.set(this,(()=>{Ie.delete(this.endpointId),ve(this,ge,"f").close()})),Ce(this,fe,new be.ProtectedItems(e,t),"f"),this.disconnectListener=()=>{},this.endpointId=e.endpointId,Ce(this,ge,n,"f"),Ie.set(this.endpointId,this),n.receive(this.processAction)}get providerIdentity(){return ve(this,fe,"f").providerIdentity}async dispatch(e,t){if(ve(this,ge,"f").isEndpointConnected(this.providerIdentity.channelId))return ve(this,ge,"f").send(this.providerIdentity.channelId,e,t);throw new Error("The client you are trying to dispatch from is disconnected from the target provider.")}onDisconnection(e){this.disconnectListener=t=>{try{e(t)}catch(e){throw new Error(`Error while calling the onDisconnection callback: ${e.message}`)}finally{this.disconnectListener=()=>{}}}}async disconnect(){await this.sendDisconnectAction(),ve(this,me,"f").call(this)}async sendDisconnectAction(){const e=ve(this,fe,"f");await e.close()}static async wireClose(e,t,n){const{channelName:i,uuid:r,name:o}=t;await e.sendAction("disconnect-from-channel",{channelName:i,uuid:r,name:o,endpointId:n})}}ue.ChannelClient=Ee,fe=new WeakMap,ge=new WeakMap,me=new WeakMap;var xe={},Ae={};Object.defineProperty(Ae,"__esModule",{value:!0}),Ae.exhaustiveCheck=void 0,Ae.exhaustiveCheck=function(e,t){throw new Error(`Unsupported value: ${e}${t?`\n Supported values are: ${t.join("")}`:""}`)};var Pe,Me,_e,Oe={},Se=s&&s.__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},Re=s&&s.__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)};Object.defineProperty(Oe,"__esModule",{value:!0}),Oe.ClassicInfo=Oe.ClassicStrategy=void 0;Oe.ClassicStrategy=class{constructor(e,t,n,i){this.messageReceiver=t,this.endpointId=n,this.providerIdentity=i,Pe.set(this,void 0),Me.set(this,new Map),_e.set(this,new Map),this.send=async(e,t,n)=>{const i=Re(this,Me,"f").get(e);if(!i)throw new Error(`Could not locate routing info for endpoint ${e}`);const r={...i};r.isLocalEndpointId&&delete r.endpointId,delete r.isLocalEndpointId;const o=Re(this,Pe,"f").sendAction("send-channel-message",{...r,providerIdentity:this.providerIdentity,action:t,payload:n});Re(this,_e,"f").get(e)?.add(o);return(await o.catch((e=>{throw new Error(e.message)})).finally((()=>{Re(this,_e,"f").get(e)?.delete(o)}))).payload.data.result},this.close=async()=>{this.messageReceiver.removeEndpoint(this.providerIdentity.channelId,this.endpointId),[...Re(this,Me,"f").keys()].forEach((e=>this.closeEndpoint(e))),Se(this,Me,new Map,"f")},Se(this,Pe,e,"f")}onEndpointDisconnect(e,t){}receive(e){this.messageReceiver.addEndpoint(e,this.providerIdentity.channelId,this.endpointId)}async closeEndpoint(e){const t=Re(this,Me,"f").get(e);Re(this,Me,"f").delete(e);const n=Re(this,_e,"f").get(e);n?.forEach((n=>{const i=`Channel connection with identity uuid: ${t?.uuid} / name: ${t?.name} / endpointId: ${e} no longer connected.`;n.cancel(new Error(i))}))}isEndpointConnected(e){return Re(this,Me,"f").has(e)}addEndpoint(e,t){Re(this,Me,"f").set(e,t.endpointIdentity),Re(this,_e,"f").set(e,new Set)}isValidEndpointPayload(e){return"string"==typeof e?.endpointIdentity?.endpointId||"string"==typeof e?.endpointIdentity?.channelId}},Pe=new WeakMap,Me=new WeakMap,_e=new WeakMap,Oe.ClassicInfo={version:5,minimumVersion:0,type:"classic"};var Fe={},je={},ke={};Object.defineProperty(ke,"__esModule",{value:!0}),ke.errorToPOJO=void 0,ke.errorToPOJO=function(e){return{stack:e.stack,name:e.name,message:e.message,toString:()=>e.stack||e.toString()}};var Le,Te,$e=s&&s.__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)},Be=s&&s.__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};Object.defineProperty(je,"__esModule",{value:!0}),je.RTCEndpoint=void 0;const Ge=ke;je.RTCEndpoint=class{static isValidEndpointPayload(e){const t=e=>"object"==typeof e&&null!==e;return t(e)&&t(e.endpointIdentity)&&t(e.rtc)&&"string"==typeof e.endpointIdentity.endpointId}constructor({rtc:e,endpointIdentity:t}){this.responseMap=new Map,Le.set(this,null),Te.set(this,void 0),this.connectionStateChangeHandler=e=>{"connected"!==this.rtc.rtcClient.connectionState&&(this.rtc.rtcClient.removeEventListener("connectionstatechange",this.connectionStateChangeHandler),this.close(),$e(this,Te,"f")&&$e(this,Te,"f").call(this))},this.send=async(e,t)=>{const n=`message-${Math.random()}`,i=new Promise(((e,t)=>{this.responseMap.set(n,{resolve:e,reject:t})}));return this.rtc.channels.request.send(JSON.stringify({action:e,payload:t,messageId:n})),i},this.close=()=>{this.responseMap.forEach((e=>e.reject("Connection has closed."))),this.responseMap=new Map,this.rtc.channels.request.close(),this.rtc.channels.response.close(),this.rtc.rtcClient.close()},this.rtc=e,this.endpointIdentity=t,this.rtc.channels.response.addEventListener("message",(e=>{let{data:t}=e;e.data instanceof ArrayBuffer&&(t=(new TextDecoder).decode(e.data));const{messageId:n,payload:i,success:r,error:o}=JSON.parse(t),{resolve:s,reject:a}=this.responseMap.get(n)??{};s&&a?(this.responseMap.delete(n),r?s(i):a(o)):(console.log("Could not find id in responseMap."),console.log(e))})),this.rtc.channels.request.addEventListener("message",(async e=>{let{data:n}=e;e.data instanceof ArrayBuffer&&(n=(new TextDecoder).decode(e.data));const{messageId:i,action:r,payload:o}=JSON.parse(n);if($e(this,Le,"f"))try{const e=await $e(this,Le,"f").call(this,r,o,t);this.rtc.channels.response.send(JSON.stringify({messageId:i,payload:e,success:!0}))}catch(e){"open"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,error:(0,Ge.errorToPOJO)(e),success:!1}))}else"open"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,success:!1,error:"Connection not ready."}))})),this.rtc.rtcClient.addEventListener("connectionstatechange",this.connectionStateChangeHandler),Object.values(this.rtc.channels).forEach((e=>{e.onclose=e=>{[...this.responseMap.values()].forEach((e=>e.reject(new Error("RTCDataChannel closed unexpectedly, this is most commonly caused by message size. Note: RTC Channels have a message size limit of ~255kB.")))),this.close(),$e(this,Te,"f")&&$e(this,Te,"f").call(this)}}))}onDisconnect(e){if($e(this,Te,"f"))throw new Error("RTCEndpoint disconnectListener cannot be set twice.");Be(this,Te,e,"f")}receive(e){if($e(this,Le,"f"))throw new Error("You have already set a listener for this RTC Endpoint.");Be(this,Le,e,"f")}get connected(){return"connected"===this.rtc.rtcClient.connectionState}},Le=new WeakMap,Te=new WeakMap;var We,He,Ne,De={},Ue=s&&s.__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)},Ve=s&&s.__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};Object.defineProperty(De,"__esModule",{value:!0}),De.EndpointStrategy=void 0;De.EndpointStrategy=class{constructor(e,t,n){this.EndpointType=e,this.StrategyName=n,We.set(this,null),He.set(this,new Map),Ne.set(this,!0),this.send=async(e,t,n)=>this.getEndpointById(e).send(t,n),this.close=async()=>{Ue(this,Ne,"f")&&(Ue(this,He,"f").forEach((e=>e.close())),Ve(this,He,new Map,"f")),Ve(this,Ne,!1,"f")},this.isValidEndpointPayload=t}onEndpointDisconnect(e,t){this.getEndpointById(e).onDisconnect(t)}receive(e){if(Ue(this,We,"f"))throw new Error(`You have already set a listener for this ${this.StrategyName} Strategy`);Ve(this,We,e,"f"),Ue(this,He,"f").forEach((e=>e.receive(Ue(this,We,"f"))))}getEndpointById(e){const t=Ue(this,He,"f").get(e);if(!t)throw new Error(`Client with endpoint id ${e} is not connected`);return t}get connected(){return Ue(this,Ne,"f")}isEndpointConnected(e){return Ue(this,He,"f").has(e)}addEndpoint(e,t){if(!Ue(this,Ne,"f"))return void console.warn(`Adding endpoint to disconnected ${this.StrategyName} Strategy`);const n=new this.EndpointType(t);Ue(this,We,"f")&&n.receive(Ue(this,We,"f")),Ue(this,He,"f").set(e,n)}async closeEndpoint(e){Ue(this,He,"f").delete(e)}},We=new WeakMap,He=new WeakMap,Ne=new WeakMap,Object.defineProperty(Fe,"__esModule",{value:!0}),Fe.RTCInfo=Fe.RTCStrategy=void 0;const ze=je,Ke=De;class qe extends Ke.EndpointStrategy{constructor(){super(ze.RTCEndpoint,ze.RTCEndpoint.isValidEndpointPayload,"RTC")}}Fe.RTCStrategy=qe,Fe.RTCInfo={version:2,minimumVersion:0,type:"rtc"};var Je={};Object.defineProperty(Je,"__esModule",{value:!0}),Je.RTCICEManager=void 0;const Ye=d;class Ze extends Ye.EmitterBase{constructor(e){super(e,"channel"),this.ensureChannelOpened=e=>new Promise(((t,n)=>{if("open"===e.readyState)t();else if("connecting"===e.readyState){const n=()=>{e.removeEventListener("open",n),t()};e.addEventListener("open",n)}else n(new Error("This Channel has already closed"))}))}static createDataChannelPromise(e,t){let n;const i=new Promise((e=>{n=e})),r=i=>{const o=()=>{i.channel.removeEventListener("open",o),n(i.channel)};i.channel.label===e&&(i.channel.addEventListener("open",o),t.removeEventListener("datachannel",r))};return t.addEventListener("datachannel",r),i}async listenForProviderIce(e,t){await this.on(this.createProviderEventName(e),t,{timestamp:Date.now()})}async raiseProviderIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createProviderEventName(e)),t)}async listenForClientIce(e,t){await this.on(this.createClientEventName(e),t,{timestamp:Date.now()})}async raiseClientIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createClientEventName(e)),t)}cleanupIceListeners(e){this.removeAllListeners(this.createClientEventName(e)),this.removeAllListeners(this.createProviderEventName(e))}createClientEventName(e){return`ice-client-${e}`}createProviderEventName(e){return`ice-provider-${e}`}createRouteString(e){return`channel/${e}`}createRtcPeer(){return this.wire.environment.getRtcPeer()}async startClientOffer(){const e=Math.random().toString(),t=this.createRtcPeer();t.addEventListener("icecandidate",(async t=>{t.candidate&&await this.raiseClientIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForProviderIce(e,(async e=>{await t.addIceCandidate(e.candidate)}));const n={request:t.createDataChannel("request"),response:t.createDataChannel("response")},i=await t.createOffer();await t.setLocalDescription(i);const r=Promise.all([n.request,n.response].map(this.ensureChannelOpened)).then((()=>{}));return{rtcClient:t,channels:n,offer:i,rtcConnectionId:e,channelsOpened:r}}async finishClientOffer(e,t,n){return await e.setRemoteDescription(t),await n,!0}async createProviderAnswer(e,t){const n=this.createRtcPeer(),i=Ze.createDataChannelPromise("request",n),r=Ze.createDataChannelPromise("response",n);n.addEventListener("icecandidate",(async t=>{t.candidate&&await this.raiseProviderIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForClientIce(e,(async e=>{await n.addIceCandidate(e.candidate)})),await n.setRemoteDescription(t);const o=await n.createAnswer();await n.setLocalDescription(o);const s=Promise.all([i,r]).then((([t,n])=>(this.cleanupIceListeners(e),{request:t,response:n})));return{rtcClient:n,answer:o,channels:s}}}Je.RTCICEManager=Ze;var Qe={},Xe={};function et(e){return[...e.split(".").reverse().entries()].reduce(((e,[t,n])=>e+ +n*1e4**t),0)}function tt(e,t){return et(e)>=et(t)}function nt(e){return e.split("/")[0]}Object.defineProperty(Xe,"__esModule",{value:!0}),Xe.runtimeUuidMeetsMinimumRuntimeVersion=Xe.parseRuntimeUuid=Xe.meetsMinimumRuntimeVersion=void 0,Xe.meetsMinimumRuntimeVersion=tt,Xe.parseRuntimeUuid=nt,Xe.runtimeUuidMeetsMinimumRuntimeVersion=function(e,t){return tt(nt(e),t)};var it,rt,ot,st,at,ct=s&&s.__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)},dt=s&&s.__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};Object.defineProperty(Qe,"__esModule",{value:!0}),Qe.ChannelProvider=void 0;const ht=pe,lt=Xe;class ut extends ht.ChannelBase{get connections(){return[...ct(this,it,"f")]}static handleClientDisconnection(e,t){const n=e.connections.find((e=>e.endpointId===t.endpointId));if(n)ct(e,st,"f").call(e,n);else{e.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name)).forEach(ct(e,st,"f"))}e.disconnectListener(t)}static setProviderRemoval(e,t){ut.removalMap.set(e,t)}constructor(e,t,n){super(),it.set(this,void 0),rt.set(this,void 0),ot.set(this,void 0),st.set(this,(e=>{const t=this.connections.filter((t=>t.endpointId!==e.endpointId));ct(this,ot,"f").closeEndpoint(e.endpointId),dt(this,it,t,"f")})),this.processAction=async(e,t,n)=>(ut.clientIsMultiRuntime(n)&&!(0,lt.runtimeUuidMeetsMinimumRuntimeVersion)(n.runtimeUuid,"18.87.56.0")?this.handleMultiRuntimeLegacyClient(n):this.checkForClientConnection(n),super.processAction(e,t,n)),at.set(this,(()=>{ct(this,ot,"f").close();const e=ut.removalMap.get(this);e&&e()})),dt(this,rt,new ht.ProtectedItems(e,t),"f"),this.connectListener=()=>{},this.disconnectListener=()=>{},dt(this,it,[],"f"),dt(this,ot,n,"f"),n.receive(this.processAction)}dispatch(e,t,n){const i=e.endpointId??this.getEndpointIdForOpenFinId(e,t);return i&&ct(this,ot,"f").isEndpointConnected(i)?ct(this,ot,"f").send(i,t,n):Promise.reject(new Error(`Client connection with identity uuid: ${e.uuid} / name: ${e.name} / endpointId: ${i} no longer connected.`))}async processConnection(e,t){return ct(this,it,"f").push(e),this.connectListener(e,t)}publish(e,t){return this.connections.map((n=>ct(this,ot,"f").send(n.endpointId,e,t)))}onConnection(e){this.connectListener=e}onDisconnection(e){this.disconnectListener=e}async destroy(){const e=ct(this,rt,"f");e.providerIdentity,dt(this,it,[],"f"),await e.close(),ct(this,at,"f").call(this)}async getAllClientInfo(){return this.connections.map((e=>{const{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}=e;return{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}}))}checkForClientConnection(e){if(!this.isClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider.\n Client Identity: {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}isClientConnected(e){return ut.clientIdentityIncludesEndpointId(e)?this.connections.some((t=>t.endpointId===e.endpointId&&t.uuid===e.uuid&&t.name===e.name)):this.isLegacyClientConnected(e)}isLegacyClientConnected(e){return this.connections.some((t=>t.uuid===e.uuid&&t.name===e.name))}handleMultiRuntimeLegacyClient(e){if(!this.isLegacyClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider. Client Identity:\n {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}getEndpointIdForOpenFinId(e,t){const n=this.connections.filter((t=>t.name===e.name&&t.uuid===e.uuid));if(n.length>=2){const n=ct(this,rt,"f"),{uuid:i,name:r}=e,o=n?.providerIdentity.uuid,s=n?.providerIdentity.name;console.warn(`WARNING: Dispatch call may have unintended results. The "to" argument of your dispatch call is missing the\n "endpointId" parameter. The identity you are dispatching to ({uuid: ${i}, name: ${r}})\n has multiple channelClients for this channel. Your dispatched action: (${t}) from the provider:\n ({uuid: ${o}, name: ${s}}) will only be processed by the most recently-created client.`)}return n.pop()?.endpointId}static clientIdentityIncludesEndpointId(e){return void 0!==e.endpointId}static clientIsMultiRuntime(e){return void 0!==e.runtimeUuid}static async wireClose(e,t){await e.sendAction("destroy-channel",{channelName:t})}}Qe.ChannelProvider=ut,it=new WeakMap,rt=new WeakMap,ot=new WeakMap,st=new WeakMap,at=new WeakMap,ut.removalMap=new WeakMap;var pt={};Object.defineProperty(pt,"__esModule",{value:!0}),pt.MessageReceiver=void 0;const wt=ue,yt=d;class ft extends yt.Base{constructor(e){super(e),this.onmessage=e=>"process-channel-message"===e.action&&(this.processChannelMessage(e),!0),this.endpointMap=new Map,this.latestEndpointIdByChannelId=new Map,e.registerMessageHandler(this.onmessage.bind(this))}async processChannelMessage(e){const{senderIdentity:t,providerIdentity:n,action:i,ackToSender:r,payload:o,intendedTargetIdentity:s}=e.payload,a=s.channelId??s.endpointId??this.latestEndpointIdByChannelId.get(n.channelId),c=this.endpointMap.get(a);if(!c)return r.payload.success=!1,r.payload.reason=`Client connection with identity uuid: ${this.wire.me.uuid} / name: ${this.wire.me.name} / endpointId: ${a} no longer connected.`,this.wire.sendRaw(r);try{const e=await c(i,o,t);return r.payload.payload=r.payload.payload||{},r.payload.payload.result=e,this.wire.sendRaw(r)}catch(e){return r.payload.success=!1,r.payload.reason=e.message,this.wire.sendRaw(r)}}addEndpoint(e,t,n){this.endpointMap.set(n,e),t!==n&&this.latestEndpointIdByChannelId.set(t,n)}removeEndpoint(e,t){this.endpointMap.delete(t),this.latestEndpointIdByChannelId.get(e)===t&&this.latestEndpointIdByChannelId.delete(e)}checkForPreviousClientConnection(e){const t=this.latestEndpointIdByChannelId.get(e);t&&(wt.ChannelClient.closeChannelByEndpointId(t),console.warn("You have created a second connection to an older provider. First connection has been removed from the clientMap"),console.warn("If the provider calls publish(), you may receive multiple messages."))}}pt.MessageReceiver=ft;var gt={};Object.defineProperty(gt,"__esModule",{value:!0}),gt.ProtocolManager=void 0;gt.ProtocolManager=class{constructor(e){this.ProtocolsInPreferenceOrder=e,this.DefaultClientProtocols=["classic"],this.DefaultProviderProtocols=["classic"],this.getClientProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultClientProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(", ")}.`);return t},this.getProviderProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultProviderProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(", ")}.`);return t},this.getCompatibleProtocols=(e,t)=>t.supportedProtocols.filter((t=>e.some((e=>e.type===t.type&&t.version>=e.minimumVersion&&e.version>=(t.minimumVersion??0))))).slice(0,t.maxProtocols)}};var mt={};Object.defineProperty(mt,"__esModule",{value:!0});class vt{static combine(e,t){return new vt(e,t)}constructor(e,t){this.primary=e,this.secondary=t}onEndpointDisconnect(e,t){this.primary.onEndpointDisconnect(e,(()=>{this.secondary.isEndpointConnected(e)||t()})),this.secondary.onEndpointDisconnect(e,(()=>{this.primary.isEndpointConnected(e)||t()}))}isValidEndpointPayload(e){return this.primary.isValidEndpointPayload(e)||this.secondary.isValidEndpointPayload(e)}async closeEndpoint(e){await this.primary.closeEndpoint(e),await this.secondary.closeEndpoint(e)}isEndpointConnected(e){return this.primary.isEndpointConnected(e)||this.secondary.isEndpointConnected(e)}async addEndpoint(e,t){this.primary.isValidEndpointPayload(t)&&await this.primary.addEndpoint(e,t),this.secondary.isValidEndpointPayload(t)&&await this.secondary.addEndpoint(e,t)}receive(e){this.primary.receive(e),this.secondary.receive(e)}send(e,t,n){return this.primary.isEndpointConnected(e)?this.primary.send(e,t,n):this.secondary.send(e,t,n)}async close(){await Promise.all([this.primary.close(),this.secondary.close()])}}mt.default=vt;var Ct,bt,It=s&&s.__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},Et=s&&s.__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)},xt=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(xe,"__esModule",{value:!0}),xe.ConnectionManager=void 0;const At=Ae,Pt=d,Mt=Oe,_t=Fe,Ot=Je,St=Qe,Rt=pt,Ft=gt,jt=xt(mt);class kt extends Pt.Base{static getProtocolOptionsFromStrings(e){return e.map((e=>{switch(e){case"rtc":return _t.RTCInfo;case"classic":return Mt.ClassicInfo;default:return(0,At.exhaustiveCheck)(e,["rtc","classic"])}}))}constructor(e){super(e),Ct.set(this,void 0),bt.set(this,void 0),this.removeChannelFromProviderMap=e=>{this.providerMap.delete(e)},this.onmessage=e=>"process-channel-connection"===e.action&&(this.processChannelConnection(e),!0),this.providerMap=new Map,this.protocolManager=new Ft.ProtocolManager("node"===this.wire.environment.type?["classic"]:["rtc","classic"]),It(this,Ct,new Rt.MessageReceiver(e),"f"),It(this,bt,new Ot.RTCICEManager(e),"f"),e.registerMessageHandler(this.onmessage.bind(this))}createProvider(e,t){const n=Object.assign(this.wire.environment.getDefaultChannelOptions().create,e||{}),i=this.protocolManager.getProviderProtocols(n?.protocols),r=i.map((e=>{switch(e){case"rtc":return new _t.RTCStrategy;case"classic":return new Mt.ClassicStrategy(this.wire,Et(this,Ct,"f"),t.channelId,t);default:return(0,At.exhaustiveCheck)(e,["rtc","classic"])}}));let o;if(2===r.length){const[e,t]=r;o=jt.default.combine(e,t)}else{if(1!==r.length)throw new Error("failed to combine strategies");[o]=r}const s=new St.ChannelProvider(t,(()=>St.ChannelProvider.wireClose(this.wire,t.channelName)),o),a=t.channelId;return this.providerMap.set(a,{provider:s,strategy:o,supportedProtocols:kt.getProtocolOptionsFromStrings(i)}),St.ChannelProvider.setProviderRemoval(s,this.removeChannelFromProviderMap.bind(this)),s}async createClientOffer(e){const t=this.protocolManager.getClientProtocols(e?.protocols);let n;return{offer:{supportedProtocols:await Promise.all(t.map((async e=>{switch(e){case"rtc":{const{rtcClient:e,channels:t,offer:i,rtcConnectionId:r,channelsOpened:o}=await Et(this,bt,"f").startClientOffer();return n={rtcClient:e,channels:t,channelsOpened:o},{type:"rtc",version:_t.RTCInfo.version,payload:{offer:i,rtcConnectionId:r}}}case"classic":return{type:"classic",version:Mt.ClassicInfo.version};default:return(0,At.exhaustiveCheck)(e,["rtc","classic"])}}))),maxProtocols:2},rtc:n}}async createClientStrategy(e,t){t.endpointId||(t.endpointId=this.wire.environment.getNextMessageId(),Et(this,Ct,"f").checkForPreviousClientConnection(t.channelId));const n=t.answer??{supportedProtocols:[{type:"classic",version:1}]},i=(await Promise.all(n.supportedProtocols.map((async n=>"rtc"===n.type&&e?(await Et(this,bt,"f").finishClientOffer(e.rtcClient,n.payload.answer,e.channelsOpened),new _t.RTCStrategy):"classic"===n.type?new Mt.ClassicStrategy(this.wire,Et(this,Ct,"f"),t.endpointId,t):null)))).filter((e=>null!==e));let r;if(e&&!i.some((e=>e instanceof _t.RTCStrategy))&&e&&e.rtcClient.close(),i.length>=2)r=jt.default.combine(i[0],i[1]);else{if(!i.length)throw new Error("No compatible protocols");[r]=i}const o={endpointIdentity:t,rtc:e};return r.addEndpoint(t.channelId,o),r}async processChannelConnection(e){const{clientIdentity:t,providerIdentity:n,ackToSender:i,payload:r,offer:o}=e.payload;t.endpointId?t.isLocalEndpointId=!1:(t.endpointId=this.wire.environment.getNextMessageId(),t.isLocalEndpointId=!0);const s=n.channelId,a=this.providerMap.get(s);if(!a)return i.payload.success=!1,i.payload.reason=`Channel "${n.channelName}" has been destroyed.`,this.wire.sendRaw(i);const{provider:c,strategy:d,supportedProtocols:h}=a;try{if(!(c instanceof St.ChannelProvider))throw Error("Cannot connect to a channel client");const e=o??{supportedProtocols:[{type:"classic",version:1}],maxProtocols:1},n=this.protocolManager.getCompatibleProtocols(h,e);if(!n.length)throw new Error("This provider does not support any of the offered protocols.");const s=await c.processConnection(t,r);i.payload.payload=i.payload.payload||{};let a={supportedProtocols:[],endpointPayloadPromise:Promise.resolve({endpointIdentity:t})};return a=await n.reduce((async(e,t)=>{const n=await e;if("rtc"===t.type){const{answer:e,rtcClient:i,channels:r}=await Et(this,bt,"f").createProviderAnswer(t.payload.rtcConnectionId,t.payload.offer);n.supportedProtocols.push({type:"rtc",version:_t.RTCInfo.version,payload:{answer:e}}),n.endpointPayloadPromise=n.endpointPayloadPromise.then((e=>r.then((t=>({...e,rtc:{rtcClient:i,channels:t}})))))}else n.supportedProtocols.push({type:"classic",version:Mt.ClassicInfo.version});return n}),Promise.resolve(a)),a.endpointPayloadPromise.then((e=>d.addEndpoint(t.endpointId,e))),i.payload.payload.result=s,i.payload.payload.answer=a,this.wire.sendRaw(i)}catch(e){return i.payload.success=!1,i.payload.reason=e.message,this.wire.sendRaw(i)}}}xe.ConnectionManager=kt,Ct=new WeakMap,bt=new WeakMap;var Lt,Tt,$t,Bt=s&&s.__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},Gt=s&&s.__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)};Object.defineProperty(le,"__esModule",{value:!0}),le.Channel=void 0;const Wt=t,Ht=G,Nt=d,Dt=ue,Ut=xe,Vt=Qe;function zt(e){const t=Math.floor(e/10),n=Math.min(3e4,500*2**t);return new Promise((e=>{setTimeout((()=>{e(!1)}),n)}))}class Kt extends Nt.EmitterBase{constructor(e){super(e,"channel"),Lt.set(this,void 0),Tt.set(this,new Wt.EventEmitter),$t.set(this,new Ht.AsyncRetryableLazy((async()=>{await Promise.all([this.on("disconnected",(e=>{Dt.ChannelClient.handleProviderDisconnect(e)})),this.on("connected",((...e)=>{Gt(this,Tt,"f").emit("connected",...e)}))]).catch((()=>new Error("error setting up channel connection listeners")))}))),Bt(this,Lt,new Ut.ConnectionManager(e),"f")}async getAllChannels(){return this.wire.sendAction("get-all-channels").then((({payload:e})=>e.data))}async onChannelConnect(e){await this.on("connected",e)}async onChannelDisconnect(e){await this.on("disconnected",e)}async safeConnect(e,t,n){const i={count:0};do{let r=()=>{};const o=new Promise((t=>{r=n=>{e===n.channelName&&t(!0)},Gt(this,Tt,"f").on("connected",r)}));try{if(i.count>0){i.gotConnectedEvent=await Promise.race([zt(i.count),o]);const t=await this.wire.sendAction("connect-to-channel",{...n,retryInfo:i});return console.log(`Successfully connected to channelName: ${e}`),t.payload.data}const t=this.wire.sendAction("connect-to-channel",n);i.originalMessageId=t.messageId;return(await t).payload.data}catch(n){if(!n.message.includes("internal-nack"))throw n;t&&0===i.count&&console.warn(`No channel found for channelName: ${e}. Waiting for connection...`)}finally{i.count+=1,Gt(this,Tt,"f").removeListener("connected",r)}}while(t);throw new Error(`No channel found for channelName: ${e}.`)}async connect(e,t={}){if(await Gt(this,$t,"f").getValue(),!e||"string"!=typeof e)throw new Error("Please provide a channelName string to connect to a channel.");const n={wait:!0,...this.wire.environment.getDefaultChannelOptions().connect,...t},{offer:i,rtc:r}=await Gt(this,Lt,"f").createClientOffer(n);let o;(this.fin.me.isFrame||this.fin.me.isView||this.fin.me.isWindow)&&(o=(await this.fin.me.getInfo()).url);const s={channelName:e,...n,offer:i,connectionUrl:o},a=await this.safeConnect(e,n.wait,s),c=await Gt(this,Lt,"f").createClientStrategy(r,a),d=new Dt.ChannelClient(a,(()=>Dt.ChannelClient.wireClose(this.wire,a,a.endpointId)),c);return c.onEndpointDisconnect(a.channelId,(async()=>{try{await d.sendDisconnectAction()}catch(e){console.warn(`Something went wrong during disconnect for client with uuid: ${a.uuid} / name: ${a.name} / endpointId: ${a.endpointId}.`)}finally{Dt.ChannelClient.handleProviderDisconnect(a)}})),d}async create(e,t){if(!e)throw new Error("Please provide a channelName to create a channel");const{payload:{data:n}}=await this.wire.sendAction("create-channel",{channelName:e}),i=Gt(this,Lt,"f").createProvider(t,n);return this.on("client-disconnected",(t=>{t.channelName===e&&Vt.ChannelProvider.handleClientDisconnection(i,t)})),i}}le.Channel=Kt,Lt=new WeakMap,Tt=new WeakMap,$t=new WeakMap,Object.defineProperty(de,"__esModule",{value:!0}),de.InterAppPayload=de.InterApplicationBus=void 0;const qt=t,Jt=d,Yt=he,Zt=le,Qt=O;class Xt extends Jt.Base{constructor(e){super(e),this.events={subscriberAdded:"subscriber-added",subscriberRemoved:"subscriber-removed"},this.refCounter=new Yt.RefCounter,this.Channel=new Zt.Channel(e),this.emitter=new qt.EventEmitter,e.registerMessageHandler(this.onmessage.bind(this)),this.on=this.emitter.on.bind(this.emitter),this.removeAllListeners=this.emitter.removeAllListeners.bind(this.emitter)}async publish(e,t){await this.wire.sendAction("publish-message",{topic:e,message:t,sourceWindowName:this.me.name})}async send(e,t,n){const i=(0,Qt.validateIdentity)(e);if(i)throw new Error(i);await this.wire.sendAction("send-message",{destinationUuid:e.uuid,destinationWindowName:e.name,topic:t,message:n,sourceWindowName:this.me.name})}subscribe(e,t,n){const i=this.createSubscriptionKey(e.uuid,e.name||"*",t);return this.emitter.on(i,n),this.refCounter.actOnFirst(i,(async()=>{await this.wire.sendAction("subscribe",{sourceUuid:e.uuid,sourceWindowName:e.name||"*",topic:t,destinationWindowName:this.me.name})}),(()=>Promise.resolve()))}unsubscribe(e,t,n){const i=e.name||"*",r=this.createSubscriptionKey(e.uuid,i,t);return this.emitter.removeListener(r,n),this.refCounter.actOnLast(r,(async()=>{await this.wire.sendAction("unsubscribe",{sourceUuid:e.uuid,sourceWindowName:i,topic:t,destinationWindowName:this.me.name})}),(()=>new Promise((e=>e)).then((()=>{}))))}processMessage(e){const{payload:{message:t,sourceWindowName:n,sourceUuid:i,topic:r}}=e,o=[this.createSubscriptionKey(i,n,r),this.createSubscriptionKey(i,"*",r),this.createSubscriptionKey("*","*",r)],s={uuid:i,name:n};o.forEach((e=>{this.emitter.emit(e,t,s)}))}emitSubscriverEvent(e,t){const{payload:{targetName:n,uuid:i,topic:r}}=t,o={name:n,uuid:i,topic:r};this.emitter.emit(e,o)}createSubscriptionKey(e,t,n){const i=t||"*";if(!(e&&i&&n))throw new Error("Missing uuid, name, or topic string");return function(...e){return e.map((e=>Buffer.from(`${e}`).toString("base64"))).join("/")}(e,i,n)}onmessage(e){const{action:t}=e;switch(t){case"process-message":this.processMessage(e);break;case this.events.subscriberAdded:this.emitSubscriverEvent(this.events.subscriberAdded,e);break;case this.events.subscriberRemoved:this.emitSubscriverEvent(this.events.subscriberRemoved,e)}return!0}}de.InterApplicationBus=Xt;de.InterAppPayload=class{};var en={};Object.defineProperty(en,"__esModule",{value:!0}),en.Clipboard=void 0;const tn=d;class nn extends tn.Base{async writeText(e){await this.wire.sendAction("clipboard-write-text",e)}async readText(e){const{payload:t}=await this.wire.sendAction("clipboard-read-text",{type:e});return t.data}async writeImage(e){await this.wire.sendAction("clipboard-write-image",e)}async readImage(e={format:"dataURL"}){const{payload:t}=await this.wire.sendAction("clipboard-read-image",e);return t.data}async writeHtml(e){await this.wire.sendAction("clipboard-write-html",e)}async readHtml(e){const{payload:t}=await this.wire.sendAction("clipboard-read-html",{type:e});return t.data}async writeRtf(e){await this.wire.sendAction("clipboard-write-rtf",e)}async readRtf(e){const{payload:t}=await this.wire.sendAction("clipboard-read-rtf",{type:e});return t.data}async write(e){await this.wire.sendAction("clipboard-write",e)}async getAvailableFormats(e){const{payload:t}=await this.wire.sendAction("clipboard-read-formats",{type:e});return t.data}}en.Clipboard=nn;var rn={},on={},sn={};Object.defineProperty(sn,"__esModule",{value:!0}),sn.ExternalApplication=void 0;const an=d;class cn extends an.EmitterBase{constructor(e,t){super(e,"external-application",t.uuid),this.identity=t}getInfo(){return this.wire.sendAction("get-external-application-info",this.identity).then((({payload:e})=>e.data))}}sn.ExternalApplication=cn,Object.defineProperty(on,"__esModule",{value:!0}),on.ExternalApplicationModule=void 0;const dn=d,hn=sn;class ln extends dn.Base{wrap(e){return this.wire.sendAction("external-application-wrap").catch((e=>{})),Promise.resolve(new hn.ExternalApplication(this.wire,{uuid:e}))}wrapSync(e){return this.wire.sendAction("external-application-wrap-sync").catch((e=>{})),new hn.ExternalApplication(this.wire,{uuid:e})}}on.ExternalApplicationModule=ln,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(on,e),n(sn,e)}(rn);var un={},pn={},wn={};Object.defineProperty(wn,"__esModule",{value:!0}),wn._Frame=void 0;const yn=d;class fn extends yn.EmitterBase{constructor(e,t){super(e,"frame",t.uuid,t.name),this.identity=t}getInfo(){return this.wire.sendAction("get-frame-info",this.identity).then((({payload:e})=>e.data))}getParentWindow(){return this.wire.sendAction("get-parent-window",this.identity).then((({payload:e})=>e.data))}}wn._Frame=fn,Object.defineProperty(pn,"__esModule",{value:!0}),pn._FrameModule=void 0;const gn=d,mn=O,vn=wn;class Cn extends gn.Base{async wrap(e){this.wire.sendAction("frame-wrap").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}wrapSync(e){this.wire.sendAction("frame-wrap-sync").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}getCurrent(){return this.wire.sendAction("frame-get-current").catch((e=>{})),Promise.resolve(new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity()))}getCurrentSync(){return this.wire.sendAction("frame-get-current-sync").catch((e=>{})),new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity())}}pn._FrameModule=Cn,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(pn,e),n(wn,e)}(un);var bn={};Object.defineProperty(bn,"__esModule",{value:!0}),bn.GlobalHotkey=void 0;const In=d;class En extends In.EmitterBase{constructor(e){super(e,"global-hotkey")}async register(e,t){await this.on(e,t),await this.wire.sendAction("global-hotkey-register",{hotkey:e})}async unregister(e){await this.removeAllListeners(e),await this.wire.sendAction("global-hotkey-unregister",{hotkey:e})}async unregisterAll(){await Promise.all(this.eventNames().filter((e=>!("registered"===e||"unregistered"===e))).map((e=>this.removeAllListeners(e)))),await this.wire.sendAction("global-hotkey-unregister-all",{})}async isRegistered(e){const{payload:{data:t}}=await this.wire.sendAction("global-hotkey-is-registered",{hotkey:e});return t}}bn.GlobalHotkey=En;var xn,An={},Pn={},Mn={},_n=s&&s.__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)};Object.defineProperty(Mn,"__esModule",{value:!0}),Mn.Platform=void 0;const On=d,Sn=O,Rn=new Map;class Fn extends On.EmitterBase{constructor(e,t){super(t.wire,"application",e.uuid),this.getClient=e=>{this.wire.sendAction("platform-get-client",this.identity).catch((e=>{}));const t=e||this.identity,{uuid:n}=t;if(!Rn.has(n)){const e=_n(this,xn,"f").call(this,n);Rn.set(n,e)}return Rn.get(n)},xn.set(this,(async e=>{try{const t=`custom-frame-${e}`,n=await this._channel.connect(t,{wait:!1});return n.onDisconnection((()=>{Rn.delete(e)})),n}catch(t){throw Rn.delete(e),new Error("The targeted Platform is not currently running. Listen for application-started event for the given Uuid.")}})),this.launchLegacyManifest=this.launchContentManifest;const n=(0,Sn.validateIdentity)(e);if(n)throw new Error(n);this._channel=t,this.identity={uuid:e.uuid},this.Layout=this.fin.Platform.Layout,this.Application=this.fin.Application.wrapSync(this.identity)}async createView(e,t,n){this.wire.sendAction("platform-create-view",this.identity).catch((e=>{}));const i=await this.getClient(),r=await i.dispatch("create-view",{target:t,opts:e,targetView:n});if(!r||(0,Sn.validateIdentity)(r.identity))throw new Error(`When overwriting the createView call, please return an object that has a valid 'identity' property: ${JSON.stringify(r)}`);return this.fin.View.wrapSync(r.identity)}async createWindow(e){this.wire.sendAction("platform-create-window",this.identity).catch((e=>{}));const t=await this.getClient();e.reason||(e.reason="api-call");const n=await t.dispatch("create-view-container",e);if(!n||(0,Sn.validateIdentity)(n.identity))throw new Error(`When overwriting the createWindow call, please return an object that has a valid 'identity' property: ${JSON.stringify(n)}`);const{identity:i}=n,r=this.fin.Window.wrapSync(i);return r.name=i.name,r.uuid=i.uuid,r}async quit(){this.wire.sendAction("platform-quit",this.identity).catch((e=>{}));return(await this.getClient()).dispatch("quit")}async closeView(e){this.wire.sendAction("platform-close-view",this.identity).catch((e=>{}));const t=await this.getClient();await t.dispatch("close-view",{view:e})}async reparentView(e,t){console.warn("Platform.reparentView has been deprecated, please use Platform.createView"),this.wire.sendAction("platform-reparent-view",this.identity).catch((e=>{}));const n={...e,uuid:e.uuid??this.identity.uuid},i=await this.fin.View.wrap(n),r=await i.getOptions();return this.createView(r,t)}async getSnapshot(){this.wire.sendAction("platform-get-snapshot",this.identity).catch((e=>{}));return(await this.getClient()).dispatch("get-snapshot")}async getViewSnapshot(e){return(await this.getClient()).dispatch("get-view-snapshot",{viewIdentity:e})}async applySnapshot(e,t){this.wire.sendAction("platform-apply-snapshot",this.identity).catch((e=>{}));const n="Requested snapshot must be a valid Snapshot object, or a url or filepath to such an object.";let i;if("string"==typeof e)try{i=(await this._channel.wire.sendAction("get-application-manifest",{manifestUrl:e})).payload.data}catch(e){throw new Error(`${n}: ${e}`)}else i=e;if(!i.windows)throw new Error(n);const r=await this.getClient();return await r.dispatch("apply-snapshot",{snapshot:i,options:t}),this}async fetchManifest(e){return(await this.getClient()).dispatch("platform-fetch-manifest",{manifestUrl:e})}async launchContentManifest(e){this.wire.sendAction("platform-launch-content-manifest",this.identity).catch((()=>{}));const t=await this.getClient(),n=await this.fetchManifest(e);return t.dispatch("launch-into-platform",{manifest:n,manifestUrl:e}),this}async setWindowContext(e={},t){if(this.wire.sendAction("platform-set-window-context",this.identity).catch((e=>{})),!e)throw new Error("Please provide a serializable object or string to set the context.");const n=await this.getClient(),{entityType:i}=t?await this.fin.System.getEntityInfo(t.uuid,t.name):this.fin.me;await n.dispatch("set-window-context",{context:e,entityType:i,target:t||{uuid:this.fin.me.uuid,name:this.fin.me.name}})}async getWindowContext(e){this.wire.sendAction("platform-get-window-context",this.identity).catch((e=>{}));const t=await this.getClient(),{entityType:n}=e?await this.fin.System.getEntityInfo(e.uuid,e.name):this.fin.me;return t.dispatch("get-window-context",{target:e||{uuid:this.fin.me.uuid,name:this.fin.me.name},entityType:n})}async closeWindow(e,t={skipBeforeUnload:!1}){this.wire.sendAction("platform-close-window",this.identity).catch((e=>{}));return(await this.getClient()).dispatch("close-window",{windowId:e,options:t})}}Mn.Platform=Fn,xn=new WeakMap;var jn={},kn={},Ln={},Tn={};function $n(e){switch(e){case"columns":case"grid":case"rows":case"tabs":return!0;default:return!1}}Object.defineProperty(Tn,"__esModule",{value:!0}),Tn.overrideFromComposables=Tn.isValidPresetType=void 0,Tn.isValidPresetType=$n,Tn.overrideFromComposables=function(...e){return t=>e.reduceRight(((e,t)=>n=>t(e(n))),(e=>e))(t)},Tn.default={isValidPresetType:$n};var Bn={},Gn={},Wn={};Object.defineProperty(Wn,"__esModule",{value:!0}),Wn.ApiConsumer=void 0;Wn.ApiConsumer=class{constructor(e){this.strategy=e,this.consume=async e=>(await this.strategy.getExposedFunctions(e)).reduce(((t,n)=>({...t,[n.key]:this.strategy.createFunction(n,e)})),{})}};var Hn={},Nn={};Object.defineProperty(Nn,"__esModule",{value:!0}),Nn.expose=Nn.getExposedProperties=void 0;const Dn=Symbol("exposedProperties");Nn.getExposedProperties=e=>e[Dn]||e.prototype[Dn]||[];Nn.expose=e=>(t,n,i)=>{t[Dn]=t[Dn]||[],t[Dn].push({key:n,descriptor:i,options:e})},Object.defineProperty(Hn,"__esModule",{value:!0}),Hn.ApiExposer=void 0;const Un=Nn;Hn.ApiExposer=class{constructor(e){this.strategy=e,this.exposeInstance=async(e,t)=>{const n=(0,Un.getExposedProperties)(e),i=await Promise.all(n.map((async({key:n,options:i})=>({key:n,options:await this.strategy.exposeFunction(e[n].bind(e),{key:n,options:i,meta:t})}))));await this.strategy.exposeMeta(t,i)}}};var Vn={},zn={},Kn={};Object.defineProperty(Kn,"__esModule",{value:!0}),Kn.ChannelsConsumer=void 0;Kn.ChannelsConsumer=class{constructor(e){this.channel=e,this.getExposedFunctions=async e=>{const{id:t}=e,{props:n}=await this.channel.dispatch(`api-meta:${t}`);return n},this.createFunction=e=>(...t)=>{const{action:n}=e.options;return this.channel.dispatch(n,{args:t})}}};var qn={};Object.defineProperty(qn,"__esModule",{value:!0}),qn.ChannelsExposer=void 0;qn.ChannelsExposer=class{constructor(e){this.channelProviderOrClient=e,this.exposeFunction=async(e,t)=>{const{key:n,options:i,meta:r}=t,{id:o}=r,s=`${o}.${i?.action||n}`;return await this.channelProviderOrClient.register(s,(async({args:t})=>e(...t))),{action:s}},this.exposeMeta=async({id:e},t)=>{const n=`api-meta:${e}`;await this.channelProviderOrClient.register(n,(()=>({props:t})))}}},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Kn,e),n(qn,e)}(zn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(zn,e)}(Vn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Wn,e),n(Hn,e),n(Vn,e),n(Nn,e)}(Gn);var Jn={};Object.defineProperty(Jn,"__esModule",{value:!0}),Jn.createRelayedDispatch=exports.relayChannelClientApi_1=Jn.relayChannelClientApi=void 0;const Yn=["no longer connected","RTCDataChannel closed unexpectedly","The client you are trying to dispatch from is disconnected from the target provider"];exports.relayChannelClientApi_1=Jn.relayChannelClientApi=async(e,t)=>{e.register(`relay:${t}`,(({action:t,target:n,payload:i})=>e.dispatch(n,t,i))),await Promise.resolve()};Jn.createRelayedDispatch=(e,t,n,i)=>async(r,o)=>{try{return await e.dispatch(`relay:${n}`,{action:r,payload:o,target:t})}catch(e){if(s=e.message,Yn.some((e=>s.includes(e)))&&i)throw new Error(i);throw e}var s};var Zn,Qn,Xn,ei=s&&s.__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},ti=s&&s.__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)};Object.defineProperty(Bn,"__esModule",{value:!0}),Bn.ColumnOrRow=Bn.TabStack=Bn.LayoutNode=void 0;const ni=Gn,ii=Jn;class ri{constructor(e,t){Zn.set(this,void 0),this.isRoot=()=>ti(this,Zn,"f").isRoot(this.entityId),this.exists=()=>ti(this,Zn,"f").exists(this.entityId),this.getParent=async()=>{const e=await ti(this,Zn,"f").getParent(this.entityId);if(e)return ri.getEntity(e,ti(this,Zn,"f"))},this.createAdjacentStack=async(e,t)=>{const n=await ti(this,Zn,"f").createAdjacentStack(this.entityId,e,t);return ri.getEntity({entityId:n,type:"stack"},ti(this,Zn,"f"))},this.getAdjacentStacks=async e=>(await ti(this,Zn,"f").getAdjacentStacks({targetId:this.entityId,edge:e})).map((e=>ri.getEntity({type:"stack",entityId:e.entityId},ti(this,Zn,"f")))),ei(this,Zn,e,"f"),this.entityId=t}}Bn.LayoutNode=ri,Zn=new WeakMap,ri.newLayoutEntitiesClient=async(e,t,n)=>{const i=(0,ii.createRelayedDispatch)(e,n,"layout-relay","You are trying to interact with a layout component on a window that does not exist or has been destroyed.");return new ni.ApiConsumer(new ni.ChannelsConsumer({dispatch:i})).consume({id:t})},ri.getEntity=(e,t)=>{const{entityId:n,type:i}=e;switch(i){case"column":case"row":return new si(t,n,i);case"stack":return new oi(t,n);default:throw new Error(`Unrecognised Layout Entity encountered ('${JSON.stringify(e)})`)}};class oi extends ri{constructor(e,t){super(e,t),Qn.set(this,void 0),this.type="stack",this.getViews=()=>ti(this,Qn,"f").getStackViews(this.entityId),this.addView=async(e,t={index:0})=>ti(this,Qn,"f").addViewToStack(this.entityId,e,t),this.removeView=async e=>{await ti(this,Qn,"f").removeViewFromStack(this.entityId,e)},this.setActiveView=async e=>{await ti(this,Qn,"f").setStackActiveView(this.entityId,e)},ei(this,Qn,e,"f")}}Bn.TabStack=oi,Qn=new WeakMap;class si extends ri{constructor(e,t,n){super(e,t),Xn.set(this,void 0),this.getContent=async()=>(await ti(this,Xn,"f").getContent(this.entityId)).map((e=>ri.getEntity(e,ti(this,Xn,"f")))),ei(this,Xn,e,"f"),this.type=n}}Bn.ColumnOrRow=si,Xn=new WeakMap;var ai={};Object.defineProperty(ai,"__esModule",{value:!0}),ai.DEFAULT_LAYOUT_KEY=ai.LAYOUT_CONTROLLER_ID=void 0,ai.LAYOUT_CONTROLLER_ID="layout-entities",ai.DEFAULT_LAYOUT_KEY="__default__";var ci,di,hi,li=s&&s.__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)};Object.defineProperty(Ln,"__esModule",{value:!0}),Ln.Layout=void 0;const ui=G,pi=O,wi=d,yi=Tn,fi=Bn,gi=ai;class mi extends wi.Base{static getClient(e){return li(e,di,"f").getValue()}constructor(e,t){super(t),ci.add(this),di.set(this,new ui.Lazy((async()=>fi.LayoutNode.newLayoutEntitiesClient(await this.platform.getClient(),gi.LAYOUT_CONTROLLER_ID,this.identity)))),this.replace=async e=>{this.wire.sendAction("layout-replace").catch((e=>{}));const t=await this.platform.getClient();await t.dispatch("replace-layout",{target:this.identity,opts:{layout:e}})},this.replaceView=async(e,t)=>{this.wire.sendAction("layout-replace-view").catch((e=>{}));const n=await this.platform.getClient();await n.dispatch("replace-view",{target:this.identity,opts:{viewToReplace:e,newView:t}})},this.applyPreset=async e=>{this.wire.sendAction("layout-apply-preset").catch((e=>{}));const t=await this.platform.getClient(),{presetType:n}=e;if(!n||!(0,yi.isValidPresetType)(n))throw new Error("Cannot apply preset layout, please include an applicable presetType property in the PresetLayoutOptions.");await t.dispatch("apply-preset-layout",{target:this.identity,opts:{presetType:n}})};const n=(0,pi.validateIdentity)(e);if(n)throw new Error(n);this.identity=e,this.platform=this.fin.Platform.wrapSync({uuid:e.uuid}),e.uuid===this.fin.me.uuid&&e.name===this.fin.me.name&&(this.init=this.fin.Platform.Layout.init)}async getConfig(){this.wire.sendAction("layout-get-config").catch((e=>{}));return(await this.platform.getClient()).dispatch("get-frame-snapshot",{target:this.identity})}async getCurrentViews(){this.wire.sendAction("layout-get-views").catch((e=>{}));const e=await this.platform.getClient();return(await e.dispatch("get-layout-views",{target:this.identity})).map((e=>this.fin.View.wrapSync(e)))}async getRootItem(){this.wire.sendAction("layout-get-root-item").catch((()=>{}));const e=await li(this,di,"f").getValue(),t=await e.getRoot("layoutName"in this.identity?this.identity:void 0);return fi.LayoutNode.getEntity(t,e)}async getStackByViewIdentity(e){this.wire.sendAction("layout-get-stack-by-view").catch((()=>{}));const t=await li(this,di,"f").getValue(),n=await t.getStackByView(e);if(!n)throw new Error(`No stack found for view: ${e.uuid}/${e.name}`);return fi.LayoutNode.getEntity(n,t)}async addView(e,{location:t,targetView:n}={}){this.wire.sendAction("layout-add-view").catch((e=>{}));const{identity:i}=await li(this,ci,"m",hi).call(this,"layout-add-view",{viewOptions:e,location:t,targetView:n});return{identity:i}}async closeView(e){this.wire.sendAction("layout-close-view").catch((e=>{})),await li(this,ci,"m",hi).call(this,"layout-close-view",{viewIdentity:e})}}Ln.Layout=mi,di=new WeakMap,ci=new WeakSet,hi=async function(e,t){return(await this.platform.getClient()).dispatch(e,{target:this.identity,opts:t})};var vi,Ci,bi,Ii,Ei,xi=s&&s.__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)},Ai=s&&s.__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};Object.defineProperty(kn,"__esModule",{value:!0}),kn.LayoutModule=void 0;const Pi=d,Mi=Ln,_i=ai;class Oi extends Pi.Base{constructor(){super(...arguments),vi.add(this),Ci.set(this,!1),bi.set(this,null),this.init=async(e={})=>{if(this.wire.sendAction("layout-init").catch((e=>{})),!this.wire.environment.layoutAllowedInContext(this.fin))throw new Error("Layout.init can only be called from a Window context.");if(xi(this,Ci,"f"))throw new Error("Layout.init was already called, please use Layout.create to add additional layouts.");"openfin"===this.wire.environment.type&&await this.fin.Platform.getCurrentSync().getClient(),Ai(this,Ci,!0,"f"),Ai(this,bi,await this.wire.environment.initLayoutManager(this.fin,this.wire,e),"f"),await this.wire.environment.applyLayoutSnapshot(this.fin,xi(this,bi,"f"),e);const t={name:this.fin.me.name,uuid:this.fin.me.uuid};if(!e.layoutManagerOverride){const e={layoutName:_i.DEFAULT_LAYOUT_KEY,...t};return xi(this,Ii,"f").call(this,e)}return this.wrapSync(t)},Ii.set(this,(e=>{const t="[Layout] You are using a deprecated property `layoutManager` - it will throw if you access it starting in v37.",n=new Proxy({},{get(e,n){throw console.warn(`[Layout-mgr-proxy] accessing ${n.toString()}`),new Error(t)}}),i=Object.assign(this.wrapSync(e),{layoutManager:n});return new Proxy(i,{get(e,n){if("layoutManager"===n)throw console.warn(`[Layout-proxy] accessing ${n.toString()}`),new Error(t);return e[n]}})})),this.getCurrentLayoutManagerSync=()=>xi(this,vi,"m",Ei).call(this,"fin.Platform.Layout.getCurrentLayoutManagerSync()"),this.create=async e=>this.wire.environment.createLayout(xi(this,vi,"m",Ei).call(this,"fin.Platform.Layout.create()"),e),this.destroy=async e=>this.wire.environment.destroyLayout(xi(this,vi,"m",Ei).call(this,"fin.Platform.Layout.destroy()"),e)}async wrap(e){return this.wire.sendAction("layout-wrap").catch((e=>{})),new Mi.Layout(e,this.wire)}wrapSync(e){return this.wire.sendAction("layout-wrap-sync").catch((e=>{})),new Mi.Layout(e,this.wire)}async getCurrent(){if(this.wire.sendAction("layout-get-current").catch((e=>{})),"openfin"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error("You are not in a Window context. Only Windows can have a Layout.");const{uuid:e,name:t}=this.fin.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction("layout-get-current-sync").catch((e=>{})),"openfin"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error("You are not in a Window context. Only Windows can have a Layout.");const{uuid:e,name:t}=this.fin.me;return this.wrapSync({uuid:e,name:t})}async getLayoutByViewIdentity(e){this.wire.sendAction("layout-get-by-view-identity").catch((()=>{}));let t=await this.wire.environment.getViewWindowIdentity(this.fin,e);t.identity&&(t=t.identity);try{const n=this.wrapSync(t),i=await Mi.Layout.getClient(n),r=await i.getLayoutIdentityForViewOrThrow(e);return this.wrapSync(r)}catch(n){if(!["No action registered at target for","getLayoutIdentityForViewOrThrow is not a function"].some((e=>n.message.includes(e))))throw n;if(t.uuid===t.name)throw new Error(`View identity ${JSON.stringify(e)} is not attached to any layout in provider window ${JSON.stringify(t)}.`);return this.wrapSync(t)}}}kn.LayoutModule=Oi,Ci=new WeakMap,bi=new WeakMap,Ii=new WeakMap,vi=new WeakSet,Ei=function(e){if(!xi(this,bi,"f"))throw new Error(`You must call init before using the API ${e}`);return xi(this,bi,"f")},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(kn,e),n(Ln,e)}(jn),Object.defineProperty(Pn,"__esModule",{value:!0}),Pn.PlatformModule=void 0;const Si=d,Ri=Mn,Fi=jn;class ji extends Si.Base{constructor(e,t){super(e),this._channel=t,this.Layout=new Fi.LayoutModule(this.wire)}async init(e){if(!fin.__internal_.isPlatform||fin.me.name!==fin.me.uuid)throw new Error("fin.Platform.init should only be called from a custom platform provider running in the main window of the application.");return this.wire.environment.initPlatform(this.fin,e)}async wrap(e){return this.wire.sendAction("platform-wrap").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}wrapSync(e){return this.wire.sendAction("platform-wrap-sync").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}async getCurrent(){return this.wire.sendAction("platform-get-current").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction("platform-get-current-sync").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}start(e){return this.wire.sendAction("platform-start").catch((e=>{})),new Promise((async(t,n)=>{try{const{uuid:n}=e,i=await this.fin.Application._create({...e,isPlatformController:!0});i.once("platform-api-ready",(()=>t(this.wrapSync({uuid:n})))),i._run({uuid:n})}catch(e){n(e)}}))}startFromManifest(e,t){return this.wire.sendAction("platform-start-from-manifest").catch((e=>{})),new Promise((async(n,i)=>{try{const i=await this.fin.Application._createFromManifest(e);i.once("platform-api-ready",(()=>n(this.wrapSync({uuid:i.identity.uuid})))),i._run(t)}catch(e){i(e)}}))}}Pn.PlatformModule=ji,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Pn,e),n(Mn,e)}(An);var ki={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getMe=e.getBaseMe=e.environmentUnsupportedMessage=void 0;const t=J(),n=un,i=ie(),r=rn;function o(e,t,n){return{...{isView:"view"===e,isWindow:"window"===e,isFrame:"iframe"===e,isExternal:"external connection"===e},uuid:t,name:n,entityType:e}}e.environmentUnsupportedMessage="You are not running in OpenFin.",e.getBaseMe=o,e.getMe=function(s){const{uuid:a,name:c,entityType:d}=s.me,h={setContext(){throw new Error(e.environmentUnsupportedMessage)},addContextHandler(){throw new Error(e.environmentUnsupportedMessage)},getContextGroups(){throw new Error(e.environmentUnsupportedMessage)},joinContextGroup(){throw new Error(e.environmentUnsupportedMessage)},removeFromContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getAllClientsInContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getInfoForContextGroup(){throw new Error(e.environmentUnsupportedMessage)}},l="Interop API has not been instantiated. Either connection has failed or you have not declared interop in your config.",u={setContext(){throw new Error(l)},addContextHandler(){throw new Error(l)},getContextGroups(){throw new Error(l)},joinContextGroup(){throw new Error(l)},removeFromContextGroup(){throw new Error(l)},getAllClientsInContextGroup(){throw new Error(l)},getInfoForContextGroup(){throw new Error(l)}},p={eventNames:()=>{throw new Error(e.environmentUnsupportedMessage)},emit:()=>{throw new Error(e.environmentUnsupportedMessage)},listeners:()=>{throw new Error(e.environmentUnsupportedMessage)},listenerCount:()=>{throw new Error(e.environmentUnsupportedMessage)},on:()=>{throw new Error(e.environmentUnsupportedMessage)},addListener:()=>{throw new Error(e.environmentUnsupportedMessage)},once:()=>{throw new Error(e.environmentUnsupportedMessage)},prependListener:()=>{throw new Error(e.environmentUnsupportedMessage)},prependOnceListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeAllListeners:()=>{throw new Error(e.environmentUnsupportedMessage)}};switch(d){case"view":return Object.assign(new t.View(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case"window":return Object.assign(new i._Window(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case"iframe":return Object.assign(new n._Frame(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case"external connection":return Object.assign(new r.ExternalApplication(s,{uuid:a}),o(d,a,c),{interop:u,isOpenFin:!1});default:return{...o(d,a,c),...p,interop:h,isOpenFin:!1}}}}(ki);var Li={},Ti={},$i={};Object.defineProperty($i,"__esModule",{value:!0}),$i.createWarningObject=$i.createUnusableObject=void 0,$i.createUnusableObject=function(e){const t=()=>{throw new Error(e)};return new Proxy({},{apply:t,construct:t,defineProperty:t,deleteProperty:t,get:t,getOwnPropertyDescriptor:t,getPrototypeOf:t,has:t,isExtensible:t,ownKeys:t,preventExtensions:t,set:t,setPrototypeOf:t})},$i.createWarningObject=function(e,t){return new Proxy(t,{get:(...t)=>(console.warn(e),Reflect.get(...t)),set:(...t)=>(console.warn(e),Reflect.set(...t)),getOwnPropertyDescriptor:(...t)=>(console.warn(e),Reflect.getOwnPropertyDescriptor(...t)),ownKeys:(...t)=>(console.warn(e),Reflect.ownKeys(...t))})};var Bi,Gi={},Wi={};var Hi={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.wrapIntentHandler=e.BROKER_ERRORS=e.generateOverrideWarning=e.generateOverrideError=e.wrapContextHandler=e.wrapInTryCatch=e.generateId=void 0;e.generateId=()=>`${Math.random()}${Date.now()}`;e.wrapInTryCatch=(e,t)=>(...n)=>{try{return e(...n)}catch(e){throw new Error((t||"")+e)}};e.wrapContextHandler=(e,t)=>async n=>{try{await e(n)}catch(e){throw console.error(`Error thrown by handler ${t} for context type ${n.type}: ${e}`),e}};e.generateOverrideError=(e,t)=>`You have tried to to use ${e} but ${t} has not been overridden in the Interop Broker. Please override this function. Refer to our documentation for more info.`;e.generateOverrideWarning=(e,t,n,i)=>{const{uuid:r,name:o}=n;return i?`Entity with identity: ${r}/${o} has called ${i} or ${e} but ${t} has not been overridden.`:`Entity with identity: ${r}/${o} has called ${e} but ${t} has not been overridden.`},e.BROKER_ERRORS={fireIntent:(0,e.generateOverrideError)("fireIntent","handleFiredIntent"),fireIntentForContext:(0,e.generateOverrideError)("fireIntentForContext","handleFiredIntentForContext"),getInfoForIntent:(0,e.generateOverrideError)("getInfoForIntent","handleInfoForIntent"),getInfoForIntentsByContext:(0,e.generateOverrideError)("getInfoForIntentsByContext","handleInfoForIntentsByContext"),joinSessionContextGroupWithJoinContextGroup:"The Context Group you have tried to join is a Session Context Group. Custom Context Groups can only be defined by the Interop Broker through code or manifest configuration. Please use joinSessionContextGroup.",fdc3Open:(0,e.generateOverrideError)("fdc3.open","fdc3HandleOpen"),fdc3FindInstances:(0,e.generateOverrideError)("fdc3.findInstances","fdc3HandleFindInstances"),fdc3GetAppMetadata:(0,e.generateOverrideError)("fdc3.getAppMetadata","fdc3HandleGetAppMetadata"),fdc3GetInfo:(0,e.generateOverrideError)("fdc3.getInfo","fdc3HandleGetInfo")};e.wrapIntentHandler=(e,t)=>async n=>{try{return e(n)}catch(e){throw console.error(`Error thrown by handler ${t}: ${e}`),e}}}(Hi);var Ni,Di,Ui={};function Vi(){if(Di)return Gi;Di=1;var e,t,n,r=s&&s.__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},o=s&&s.__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)},a=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Gi,"__esModule",{value:!0}),Gi.InteropBroker=void 0;const c=d,h=a(function(){if(Bi)return Wi;Bi=1,Object.defineProperty(Wi,"__esModule",{value:!0});const e=Cr();return Wi.default=class{constructor(e,t){this.provider=e,this.id=t,this.lastContext=void 0,this.contextGroupMap=new Map,this.clients=new Map,this.registerListeners()}registerListeners(){this.provider.register(`sessionContextGroup:getContext-${this.id}`,this.getCurrentContext.bind(this)),this.provider.register(`sessionContextGroup:setContext-${this.id}`,this.setContext.bind(this)),this.provider.register(`sessionContextGroup:handlerAdded-${this.id}`,this.handlerAdded.bind(this)),this.provider.register(`sessionContextGroup:handlerRemoved-${this.id}`,this.handlerRemoved.bind(this))}getCurrentContext(e){return e.type?this.contextGroupMap.get(e.type):this.lastContext}setContext(t,n){const{context:i}=t,r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name} not in Session Client State Map`);this.contextGroupMap.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{e.contextHandlers.get(i.type)?.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getClientState(e){return this.clients.get(e.endpointId)}async handlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(i){const e=r.contextHandlers.get(i)||[];r.contextHandlers.set(i,[...e,n]);const o=this.contextGroupMap.get(i);o&&await this.provider.dispatch(t,n,o)}else{r.globalHandler=n;const e=[...this.contextGroupMap.keys()].map((async e=>{const i=this.contextGroupMap.get(e);i&&await this.provider.dispatch(t,n,i)}));await Promise.all(e)}}handlerRemoved(e,t){const{handlerId:n}=e,i=this.clients.get(t.endpointId);i?(Array.from(i.contextHandlers).forEach((([,e])=>{const t=e.indexOf(n);t>-1&&e.splice(t,1)})),i.globalHandler===n&&(i.globalHandler=void 0)):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={contextHandlers:new Map,clientIdentity:e,globalHandler:void 0};this.clients.set(e.endpointId,t)}}onDisconnection(e){this.clients.delete(e.endpointId)}},Wi}()),l=Hi,u=a(i),p=function(){if(Ni)return Ui;Ni=1,Object.defineProperty(Ui,"__esModule",{value:!0}),Ui.PrivateChannelProvider=void 0;const e=Vi();return Ui.PrivateChannelProvider=class t{constructor(e,t){this.provider=e,this.id=t,this.clients=new Map,this.registerListeners(),this.contextByContextType=new Map,this.lastContext=void 0,this.provider.onConnection((e=>this.registerNewClient(e))),this.provider.onDisconnection((async e=>{const{endpointId:t}=e;this.clients.has(t)&&await this.handleClientDisconnecting(e),0===(await this.provider.getAllClientInfo()).length&&this.provider.destroy()}))}getClientState(e){return this.clients.get(e.endpointId)}registerListeners(){this.provider.register("broadcast",this.broadcast.bind(this)),this.provider.register("getCurrentContext",this.getCurrentContext.bind(this)),this.provider.register("contextHandlerAdded",this.contextHandlerAdded.bind(this)),this.provider.register("contextHandlerRemoved",this.contextHandlerRemoved.bind(this)),this.provider.register("nonStandardHandlerRemoved",this.nonStandardHandlerRemoved.bind(this)),this.provider.register("onAddContextHandlerAdded",this.onAddContextHandlerAdded.bind(this)),this.provider.register("onDisconnectHandlerAdded",this.onDisconnectHandlerAdded.bind(this)),this.provider.register("onUnsubscribeHandlerAdded",this.onUnsubscribeHandlerAdded.bind(this)),this.provider.register("clientDisconnecting",((e,t)=>{this.handleClientDisconnecting(t)}))}broadcast(t,n){const{context:i}=t;if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name}, tried to call broadcast, is not connected to this Private Channel`);const r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to broadcast - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);this.contextByContextType.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{const t=e.handlerIdsByContextTypes.get(i.type);t&&t.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getCurrentContext(e,t){const{contextType:n}=e;if(!this.getClientState(t))throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call getCurrentContext, is not connected to this Private Channel`);if(void 0!==n){return this.contextByContextType.get(n)||null}return this.lastContext?this.lastContext:null}contextHandlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call addContextListener, is not connected to this Private Channel`);if(i){const e=r.handlerIdsByContextTypes.get(i)||[];r.handlerIdsByContextTypes.set(i,[...e,n])}else r.globalHandler=n;Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&e.onAddContextListenerHandlerId&&this.provider.dispatch(e.clientIdentity,e.onAddContextListenerHandlerId,i)}))}async contextHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);if(i){let e;if(i.globalHandler===n)i.globalHandler=void 0;else for(const[t,r]of i.handlerIdsByContextTypes){const i=r.indexOf(n);i>-1&&(r.splice(i,1),e=t)}const r=(await this.getConnectedClients()).map((async n=>{const{clientIdentity:i,clientIdentity:{endpointId:r},onUnsubscribeHandlerId:o}=n;r!==t.endpointId&&o&&await this.provider.dispatch(i,o,e)}));try{await Promise.all(r)}catch(e){throw console.error(`Problem when attempting to dispatch to onUnsubscribeHandlers. Error: ${e} Removing Client: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}`),new Error(e)}}else console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}.`)}nonStandardHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);i?i.onDisconnectHandlerId===n?i.onDisconnectHandlerId=void 0:i.onAddContextListenerHandlerId===n?i.onAddContextListenerHandlerId=void 0:i.onUnsubscribeHandlerId===n&&(i.onUnsubscribeHandlerId=void 0):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}onAddContextHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onAddContextListener, is not connected to this Private Channel`);n.onAddContextListenerHandlerId=i,Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&Array.from(e.handlerIdsByContextTypes.keys()).forEach((e=>{this.provider.dispatch(t,i,e)}))}))}onDisconnectHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onDisconnect, is not connected to this Private Channel`);n.onDisconnectHandlerId=i}onUnsubscribeHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onUnsubscribe, is not connected to this Private Channel`);n.onUnsubscribeHandlerId=i}removeClient(e){const t=this.getClientState(e);if(!t)throw new Error(`Client with Identity: ${e.uuid} ${e.name}, tried to call disconnect, is not connected to this Private Channel`);t.handlerIdsByContextTypes.clear(),this.clients.delete(e.endpointId)}async fireOnDisconnectForOtherClients(e){const{endpointId:t}=e,n=(await this.getConnectedClients()).map((async e=>{const{clientIdentity:{endpointId:n},onDisconnectHandlerId:i}=e;n!==t&&i&&await this.provider.dispatch(e.clientIdentity,i)}));try{await Promise.all(n)}catch(t){throw console.error(`Problem when attempting to dispatch to onDisconnectHandlers. Error: ${t} Disconnecting Client: uuid: ${e.uuid}. name: ${e.name}. endpointId: ${e.endpointId}`),new Error(t)}}async unsubscribeAll(e){const{endpointId:t}=e,n=this.clients.get(t);if(n){const t=Array.from(n.handlerIdsByContextTypes.values()).flat(),i=n.globalHandler;if(t.length>0){const n=t.map((async t=>this.contextHandlerRemoved({handlerId:t},e)));try{await Promise.all(n)}catch(e){console.error(e.message)}}if(i)try{await this.contextHandlerRemoved({handlerId:i},e)}catch(e){console.error(e.message)}}}async handleClientDisconnecting(e){await this.unsubscribeAll(e),this.removeClient(e),await this.fireOnDisconnectForOtherClients(e)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={clientIdentity:e,handlerIdsByContextTypes:new Map,globalHandler:void 0,onAddContextListenerHandlerId:void 0,onUnsubscribeHandlerId:void 0,onDisconnectHandlerId:void 0};this.clients.set(e.endpointId,t)}}async getConnectedClients(){const e=await this.provider.getAllClientInfo();return Array.from(this.clients.values()).filter((t=>{const{uuid:n,name:i}=t.clientIdentity;return e.some((e=>i===e.name&&n===e.uuid))}))}static init(e,n){return new t(e,n)}},Ui}(),w=G,y=[{id:"green",displayMetadata:{color:"#00CC88",name:"green"}},{id:"purple",displayMetadata:{color:"#8C61FF",name:"purple"}},{id:"orange",displayMetadata:{color:"#FF8C4C",name:"orange"}},{id:"red",displayMetadata:{color:"#FF5E60",name:"red"}},{id:"pink",displayMetadata:{color:"#FF8FB8",name:"pink"}},{id:"yellow",displayMetadata:{color:"#E9FF8F",name:"yellow"}}];let f=class i extends c.Base{constructor(i,s,a){super(i),e.set(this,void 0),t.set(this,void 0),n.set(this,void 0),this.getProvider=()=>o(this,n,"f").getValue(),this.interopClients=new Map,this.contextGroupsById=new Map,r(this,t,a.contextGroups??[...y],"f"),r(this,e,a.fdc3Info,"f"),a?.logging&&(this.logging=a.logging),this.intentClientMap=new Map,this.lastContextMap=new Map,this.sessionContextGroupMap=new Map,r(this,n,new w.Lazy(s),"f"),this.setContextGroupMap(),this.setupChannelProvider()}static createClosedConstructor(...e){return class extends i{constructor(...t){if(t.length){const[n,i,r]=t;if(r&&"object"==typeof r&&!(0,u.default)(r,e[2]))return console.warn("You have modified the parameters of the InteropOverride constructor. This behavior is deprecated and will be removed in a future version. You can modify these options in your manifest. Please consult our Interop docs for guidance on migrating to the new override scheme."),void super(e[0],e[1],r);console.warn("You are attempting to pass arguments to the InteropOverride constructor. This is not necessary, and these passed arguments will be ignored. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.")}super(...e)}}}setContext({context:e},t){this.wire.sendAction("interop-broker-set-context").catch((e=>{}));const n=this.getClientState(t);if(!n||!n.contextGroupId)throw n?new Error("You must join a context group before you can set context."):new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);{const{contextGroupId:t}=n;this.setContextForGroup({context:e},t)}}setContextForGroup({context:e},t){this.wire.sendAction("interop-broker-set-context-for-group").catch((e=>{}));const n=this.contextGroupsById.get(t);if(!n)throw new Error(`Unable to set context for context group that isn't in the context group mapping: ${t}.`);const r=i.checkContextIntegrity(e);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(e)}`);const o=e.type;n.set(o,e),this.lastContextMap.set(t,o);Array.from(this.interopClients.values()).filter((e=>e.contextGroupId===t)).forEach((t=>{for(const[,n]of t.contextHandlers)i.isContextTypeCompatible(o,n.contextType)&&this.invokeContextHandler(t.clientIdentity,n.handlerId,e)}))}getCurrentContext(e,t){this.wire.sendAction("interop-broker-get-current-context").catch((e=>{}));const n=this.getClientState(t);if(!n?.contextGroupId)throw new Error("You must be a member of a context group to call getCurrentContext");const{contextGroupId:i}=n,r=this.contextGroupsById.get(i),o=this.lastContextMap.get(i),s=e?.contextType??o;return r&&s?r.get(s):void 0}async joinContextGroup({contextGroupId:e,target:t},n){if(this.wire.sendAction("interop-broker-join-context-group").catch((e=>{})),this.sessionContextGroupMap.has(e))throw new Error(l.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup);if(t){i.hasEndpointId(t)&&await this.addClientToContextGroup({contextGroupId:e},t);try{const n=this.channel.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name));if(!n.length)throw new Error(`Given Identity ${t.uuid} ${t.name} is not connected to the Interop Broker.`);n.length>1&&console.warn(`More than one connection found for identity ${t.uuid} ${t.name}`);const i=[];for(const t of n)i.push(this.addClientToContextGroup({contextGroupId:e},t));await Promise.all(i)}catch(e){throw new Error(e)}}else await this.addClientToContextGroup({contextGroupId:e},n)}async addClientToContextGroup({contextGroupId:e},t){this.wire.sendAction("interop-broker-add-client-to-context-group").catch((e=>{}));const n=this.getClientState(t);if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(!this.getContextGroups().find((t=>t.id===e)))throw new Error(`Attempting to join a context group that does not exist: ${e}. You may only join existing context groups.`);if(n.contextGroupId!==e){n.contextGroupId=e,await this.setCurrentContextGroupInClientOptions(t,e);const i=this.contextGroupsById.get(e);for(const[,e]of n.contextHandlers){const{contextType:n,handlerId:r}=e;if(void 0===n)i.forEach(((e,n)=>{this.invokeContextHandler(t,r,e)}));else if(i.has(n)){const e=i.get(n);e&&this.invokeContextHandler(t,r,e)}}}}async removeFromContextGroup({target:e},t){if(this.wire.sendAction("interop-broker-remove-from-context-group").catch((e=>{})),e){i.hasEndpointId(e)&&await this.removeClientFromContextGroup(e);try{const t=this.channel.connections.filter((t=>t.uuid===e.uuid&&t.name===e.name));if(!t.length)throw new Error(`No connection found for given Identity ${e.uuid} ${e.name}`);t.length>1&&console.warn(`More than one connection found for identity ${e.uuid} ${e.name}`);const n=[];for(const e of t)n.push(this.removeClientFromContextGroup(e));await Promise.all(n)}catch(e){throw new Error(e)}}else await this.removeClientFromContextGroup(t)}async removeClientFromContextGroup(e){this.wire.sendAction("interop-broker-remove-client-from-context-group").catch((e=>{}));const t=this.getClientState(e);t&&(t.contextGroupId=void 0),await this.setCurrentContextGroupInClientOptions(e,null)}getContextGroups(){return this.wire.sendAction("interop-broker-get-context-groups").catch((e=>{})),o(this,t,"f").map((e=>({...e})))}getInfoForContextGroup({contextGroupId:e}){return this.wire.sendAction("interop-broker-get-info-for-context-group").catch((e=>{})),this.getContextGroups().find((t=>t.id===e))}getAllClientsInContextGroup({contextGroupId:e}){this.wire.sendAction("interop-broker-get-all-clients-in-context-group").catch((e=>{}));return Array.from(this.interopClients.values()).filter((t=>t.contextGroupId===e)).map((e=>e.clientIdentity))}async handleFiredIntent(e,t){const n=(0,l.generateOverrideWarning)("fdc3.raiseIntent","InteropBroker.handleFiredIntent",t,"interopClient.fireIntent");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntent)}async setIntentTarget(e,t){this.wire.sendAction("interop-broker-set-intent-target").catch((e=>{}));const n=this.intentClientMap.get(t.name),i=`intent-handler-${e.name}`;if(n){const t=n.get(i);if(t){if(t.pendingIntents.push(e),t.clientIdentity&&t.isReady){const{clientIdentity:e,pendingIntents:n}=t;try{const r=n[n.length-1];await this.invokeIntentHandler(e,i,r),t.pendingIntents=[]}catch(n){console.error(`Error invoking intent handler for client ${e.uuid}/${e.name}/${e.endpointId}`),t.isReady=!1}}}else n.set(i,{isReady:!1,pendingIntents:[e]})}else{this.intentClientMap.set(t.name,new Map);const n=this.intentClientMap.get(t.name);n&&n.set(i,{isReady:!1,pendingIntents:[e]})}}async handleInfoForIntent(e,t){const n=(0,l.generateOverrideWarning)("fdc3.findIntent","InteropBroker.handleInfoForIntent",t,"interopClient.getInfoForIntent");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntent)}async handleInfoForIntentsByContext(e,t){const n=(0,l.generateOverrideWarning)("fdc3.findIntentsByContext","InteropBroker.handleInfoForIntentsByContext",t,"interopClient.getInfoForIntentsByContext");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntentsByContext)}async handleFiredIntentForContext(e,t){const n=(0,l.generateOverrideWarning)("fdc3.raiseIntentForContext","InteropBroker.handleFiredIntentForContext",t,"interopClient.fireIntentForContext");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntentForContext)}async clientDisconnected(e){}async fdc3HandleOpen({app:e,context:t},n){const i=(0,l.generateOverrideWarning)("fdc3.open","InteropBroker.fdc3HandleOpen",n);throw console.warn(i),new Error(l.BROKER_ERRORS.fdc3Open)}async fdc3HandleFindInstances(e,t){const n=(0,l.generateOverrideWarning)("fdc3.open","InteropBroker.fdc3HandleFindInstances",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3FindInstances)}async fdc3HandleGetAppMetadata(e,t){const n=(0,l.generateOverrideWarning)("fdc3.getAppMetadata","InteropBroker.fdc3HandleGetAppMetadata",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3GetAppMetadata)}async invokeContextHandler(e,t,n){const i=await this.getProvider();try{await i.dispatch(e,t,n)}catch(i){console.error(`Error invoking context handler ${t} for context type ${n.type} in client ${e.uuid}/${e.name}/${e.endpointId}`,i)}}async invokeIntentHandler(e,t,n){const i=await this.getProvider();await i.dispatch(e,t,n)}async fdc3HandleGetInfo(t,n){const{fdc3Version:i}=t;return{fdc3Version:i,...o(this,e,"f"),optionalFeatures:{OriginatingAppMetadata:!1,UserChannelMembershipAPIs:!0},appMetadata:{appId:"",instanceId:""}}}async getAllClientInfo(){return(await this.getProvider()).getAllClientInfo()}decorateSnapshot(e){return{...e,interopSnapshotDetails:{contextGroupStates:this.getContextGroupStates()}}}applySnapshot(e,t){const n=e?.interopSnapshotDetails?.contextGroupStates;n&&(t?.closeExistingWindows||this.updateExistingClients(n),this.rehydrateContextGroupStates(n))}updateExistingClients(e){this.interopClients.forEach((t=>{const{clientIdentity:n,contextGroupId:r,contextHandlers:o}=t;if(r){const t=e[r];for(const[,e]of Object.entries(t))o.forEach((t=>{const{handlerId:r,contextType:o}=t;i.isContextTypeCompatible(e.type,o)&&this.invokeContextHandler(n,r,e)}))}}))}getContextGroupStates(){return i.toObject(this.contextGroupsById)}rehydrateContextGroupStates(e){const t=Object.entries(e);for(const[e,n]of t){const t=Object.entries(n);for(const[n,i]of t)if(this.contextGroupsById.has(e)){this.contextGroupsById.get(e).set(n,i)}else console.warn(`Attempting to set a context group that isn't in the context group mapping. Skipping context group rehydration for: ${e}`)}}contextHandlerRegistered({contextType:e,handlerId:t},n){const i={contextType:e,handlerId:t},r=this.getClientState(n);if(r?.contextHandlers.set(t,i),r&&r.contextGroupId){const{contextGroupId:i}=r,o=this.contextGroupsById.get(i);if(void 0===e)o.forEach(((e,i)=>{this.invokeContextHandler(n,t,e)}));else if(o.has(e)){const i=o.get(e);i&&this.invokeContextHandler(n,t,i)}}}async intentHandlerRegistered(e,t){const{handlerId:n}=e,i=this.intentClientMap.get(t.name),r=i?.get(n);if(i)if(r){const{pendingIntents:e}=r;r.clientIdentity=t,r.isReady=!0;try{if(e.length>0){const i=e[e.length-1];await this.invokeIntentHandler(t,n,i),r.pendingIntents=[]}}catch(e){console.error(`Error invoking intent handler: ${n} for client ${t.uuid}/${t.name}/${t.endpointId}`)}}else i.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t});else{this.intentClientMap.set(t.name,new Map);const e=this.intentClientMap.get(t.name);e&&e.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t})}}removeContextHandler({handlerId:e},t){const n=this.getClientState(t);n&&n.contextHandlers.delete(e)}handleJoinSessionContextGroup({sessionContextGroupId:e},t){try{if(!e)throw new Error("Failed to join session context group: must specify group id.");const n=this.sessionContextGroupMap.get(e);if(n)n.registerNewClient(t);else{const n=new h.default(this.channel,e);n.registerNewClient(t),this.sessionContextGroupMap.set(e,n)}return{hasConflict:this.contextGroupsById.has(e)}}catch(e){throw new Error(e)}}getClientState(e){return this.interopClients.get(e.endpointId)}static toObject(e){const t=Object.fromEntries(e),n={};return Object.entries(t).forEach((([e,t])=>{const i=Object.fromEntries(t);n[e]=i})),n}static checkContextIntegrity(e){if(!e)return{isValid:!1,reason:"No context supplied"};if("object"!=typeof e)return{isValid:!1,reason:"Context must be an Object"};if(!e.type)return{isValid:!1,reason:"Context must have a type property"};if(e.id&&"object"!=typeof e.id)return{isValid:!1,reason:"Context id must be an Object populated with key-value identifiers (if set)"};if(e.id){const{id:t}=e,n=Object.keys(t);let i=!1;if(!n.length)return{isValid:!1,reason:"Context id must have at least one key-value identifier"};if(n.forEach((e=>{"string"==typeof e&&"string"==typeof t[e]||(i=!0)})),i)return{isValid:!1,reason:"Context id key-value identifiers must be of type string"}}return e.name&&"string"!=typeof e.name?{isValid:!1,reason:"Context name must be of string type (if set)"}:{isValid:!0}}static hasEndpointId(e){return void 0!==e.endpointId}static isContextTypeCompatible(e,t){return void 0===t||e===t}setContextGroupMap(){for(const e of this.getContextGroups())this.contextGroupsById.set(e.id,new Map)}async setCurrentContextGroupInClientOptions(e,t){try{const n=await this.fin.System.getEntityInfo(e.uuid,e.name);let i;"view"===n.entityType?i=await this.fin.View.wrap(e):"window"===n.entityType&&(i=await this.fin.Window.wrap(e)),i&&await i.updateOptions({interop:{currentContextGroup:t}})}catch(e){}}async setupChannelProvider(){try{const e=await this.getProvider();this.channel=e,this.wireChannel(e)}catch(e){throw new Error(`Error setting up Interop Broker Channel Provider: ${e}`)}}wireChannel(e){e.onConnection((async(e,t)=>{if(!await this.isConnectionAuthorized(e,t))throw new Error(`Connection not authorized for ${e.uuid}, ${e.name}`);if(!e.endpointId)throw new Error("Version too old to be compatible with Interop. Please upgrade your runtime to a more recent version.");const n={contextGroupId:void 0,contextHandlers:new Map,clientIdentity:e};t?.currentContextGroup&&this.contextGroupsById.has(t.currentContextGroup)&&(n.contextGroupId=t?.currentContextGroup),this.interopClients.set(e.endpointId,n)})),e.onDisconnection((e=>{this.interopClients.delete(e.endpointId);const t=this.intentClientMap.get(e.name);t&&e.uuid===this.fin.me.uuid&&t.forEach((e=>{e.isReady=!1})),this.sessionContextGroupMap.forEach((t=>{t.onDisconnection(e)})),this.clientDisconnected(e)})),e.beforeAction((async(e,t,n)=>{if(!await this.isActionAuthorized(e,t,n))throw new Error(`Action (${e}) not authorized for ${n.uuid}, ${n.name}`);this.logging?.beforeAction?.enabled&&console.log(e,t,n)})),e.afterAction(((e,t,n)=>{this.logging?.afterAction?.enabled&&console.log(e,t,n)})),e.register("setContext",this.setContext.bind(this)),e.register("fireIntent",this.handleFiredIntent.bind(this)),e.register("getCurrentContext",this.getCurrentContext.bind(this)),e.register("getInfoForIntent",this.handleInfoForIntent.bind(this)),e.register("getInfoForIntentsByContext",this.handleInfoForIntentsByContext.bind(this)),e.register("fireIntentForContext",this.handleFiredIntentForContext.bind(this)),e.register("getContextGroups",this.getContextGroups.bind(this)),e.register("joinContextGroup",this.joinContextGroup.bind(this)),e.register("removeFromContextGroup",this.removeFromContextGroup.bind(this)),e.register("getAllClientsInContextGroup",this.getAllClientsInContextGroup.bind(this)),e.register("getInfoForContextGroup",this.getInfoForContextGroup.bind(this)),e.register("contextHandlerRegistered",this.contextHandlerRegistered.bind(this)),e.register("intentHandlerRegistered",this.intentHandlerRegistered.bind(this)),e.register("removeContextHandler",this.removeContextHandler.bind(this)),e.register("sessionContextGroup:createIfNeeded",this.handleJoinSessionContextGroup.bind(this)),e.register("fdc3Open",this.fdc3HandleOpen.bind(this)),e.register("fdc3v2FindIntentsByContext",this.handleInfoForIntentsByContext.bind(this)),e.register("fdc3FindInstances",this.fdc3HandleFindInstances.bind(this)),e.register("fdc3GetAppMetadata",this.fdc3HandleGetAppMetadata.bind(this)),e.register("fdc3v2GetInfo",(async(e,t)=>this.fdc3HandleGetInfo.bind(this)(e,t))),e.register("createPrivateChannelProvider",(async e=>{const{channelId:t}=e,n=await this.fin.InterApplicationBus.Channel.create(t);p.PrivateChannelProvider.init(n,t)}))}isConnectionAuthorized(e,t){return this.wire.sendAction("interop-broker-is-connection-authorized").catch((e=>{})),Promise.resolve(!0)}isActionAuthorized(e,t,n){return this.wire.sendAction("interop-broker-is-action-authorized").catch((e=>{})),Promise.resolve(!0)}};return Gi.InteropBroker=f,e=new WeakMap,t=new WeakMap,n=new WeakMap,Gi}var zi,Ki={},qi={},Ji=s&&s.__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},Yi=s&&s.__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)};Object.defineProperty(qi,"__esModule",{value:!0});const Zi=d,Qi=Hi;class Xi extends Zi.Base{constructor(e,t,n){super(e),zi.set(this,void 0),this.id=n,Ji(this,zi,t,"f")}async setContext(e){this.wire.sendAction("interop-session-context-group-set-context").catch((e=>{}));return(await Yi(this,zi,"f")).dispatch(`sessionContextGroup:setContext-${this.id}`,{sessionContextGroupId:this.id,context:e})}async getCurrentContext(e){this.wire.sendAction("interop-session-context-group-get-context").catch((e=>{}));return(await Yi(this,zi,"f")).dispatch(`sessionContextGroup:getContext-${this.id}`,{sessionContextGroupId:this.id,type:e})}async addContextHandler(e,t){if(this.wire.sendAction("interop-session-context-group-add-handler").catch((e=>{})),"function"!=typeof e)throw new Error("Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");const n=await Yi(this,zi,"f");let i;return i=t?`sessionContextHandler:invoke-${this.id}-${t}-${(0,Qi.generateId)()}`:`sessionContextHandler:invoke-${this.id}`,n.register(i,(0,Qi.wrapContextHandler)(e,i)),await n.dispatch(`sessionContextGroup:handlerAdded-${this.id}`,{handlerId:i,contextType:t}),{unsubscribe:await this.createUnsubscribeCb(i)}}async createUnsubscribeCb(e){const t=await Yi(this,zi,"f");return async()=>{t.remove(e),await t.dispatch(`sessionContextGroup:handlerRemoved-${this.id}`,{handlerId:e})}}getUserInstance(){return{id:this.id,setContext:(0,Qi.wrapInTryCatch)(this.setContext.bind(this),"Failed to set context: "),getCurrentContext:(0,Qi.wrapInTryCatch)(this.getCurrentContext.bind(this),"Failed to get context: "),addContextHandler:(0,Qi.wrapInTryCatch)(this.addContextHandler.bind(this),"Failed to add context handler: ")}}}qi.default=Xi,zi=new WeakMap;var er={},tr={},nr={},ir={},rr=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),or=s&&s.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),sr=s&&s.__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)&&rr(t,e,n);return or(t,e),t};Object.defineProperty(ir,"__esModule",{value:!0}),ir.PrivateChannelClient=void 0;const ar=sr(Hi);var cr,dr;function hr(){if(cr)return tr;cr=1;var e,t=s&&s.__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)},n=s&&s.__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},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(tr,"__esModule",{value:!0}),tr.FDC3ModuleBase=void 0;const o=nr,a=Hi,c=wr(),d=r(i);return tr.FDC3ModuleBase=class{get client(){return t(this,e,"f").call(this)}get fin(){return this.wire.getFin()}constructor(t,i){this.wire=i,e.set(this,void 0),n(this,e,t,"f")}async broadcast(e){return this.wire.sendAction("fdc3-broadcast").catch((e=>{})),this.client.setContext(e)}async _open(e,t){this.wire.sendAction("fdc3-open").catch((e=>{}));try{return await c.InteropClient.ferryFdc3Call(this.client,"fdc3Open",{app:e,context:t})}catch(e){const t=e.message===a.BROKER_ERRORS.fdc3Open?"ResolverUnavailable":e.message;throw new Error(t)}}async _getChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:"system",...(0,o.getUnsupportedChannelApis)()})))}async getOrCreateChannel(e){this.wire.sendAction("fdc3-get-or-create-channel").catch((e=>{}));const t=(await this._getChannels()).find((t=>t.id===e));if(t)return{...t,type:"system",...(0,o.getUnsupportedChannelApis)()};try{const t=await this.client.joinSessionContextGroup(e);return(0,o.buildAppChannelObject)(t)}catch(e){throw console.error(e.message),new Error(o.ChannelError.CreationFailed)}}async getSystemChannels(){return this.wire.sendAction("fdc3-get-system-channels").catch((e=>{})),this._getChannels()}async joinChannel(e){this.wire.sendAction("fdc3-join-channel").catch((e=>{}));try{return await this.client.joinContextGroup(e)}catch(e){if(e.message===a.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup?console.error("The Channel you have tried to join is an App Channel. Custom Channels can only be defined by the Interop Broker through code or manifest configuration. Please use getOrCreateChannel."):console.error(e.message),e.message.startsWith("Attempting to join a context group that does not exist"))throw new Error(o.ChannelError.NoChannelFound);throw new Error(o.ChannelError.AccessDenied)}}async getCurrentChannel(){this.wire.sendAction("fdc3-get-current-channel").catch((e=>{}));const e=await this.getCurrentContextGroupInfo();return e?this.buildChannelObject(e):null}async leaveCurrentChannel(){return this.wire.sendAction("fdc3-leave-current-channel").catch((e=>{})),this.client.removeFromContextGroup()}async getCurrentContextGroupInfo(){const e=await this.client.getContextGroups(),t=e.map((async e=>this.client.getAllClientsInContextGroup(e.id))),n=(await Promise.all(t)).findIndex((e=>e.some((e=>{const{uuid:t,name:n}=e;return this.wire.me.uuid===t&&this.wire.me.name===n}))));return e[n]}async buildChannelObject(e){return{...e,type:"system",addContextListener:(...[e,t])=>{let n,i;"function"==typeof e?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),n=e):(n=t,"string"==typeof e&&(i=e));const r=(async()=>{let e=!0;const t=await this.client.getCurrentContext(i);return this.client.addContextHandler(((i,r)=>{if(!e||(e=!1,!(0,d.default)(t,i)))return n(i,r)}),i)})();return{...r,unsubscribe:()=>r.then((e=>e.unsubscribe()))}},broadcast:this.broadcast.bind(this),getCurrentContext:async e=>{const t=await this.client.getCurrentContext(e);return void 0===t?null:t}}}},e=new WeakMap,tr}ir.PrivateChannelClient=class{constructor(e,t){this.id=t,this.client=e,this.listeners=new Map}async broadcast(e){return this.client.dispatch("broadcast",{context:e})}async getCurrentContext(e){return this.client.dispatch("getCurrentContext",{contextType:e})}async addContextListener(e,t){if("function"!=typeof t)throw new Error("Non-function argument passed to the second parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");let n;n=e?`contextHandler:invoke-${this.id}-${e}-${ar.generateId()}`:`contextHandler:invoke-${this.id}-${ar.generateId()}`,this.client.register(n,ar.wrapContextHandler(t,n));const i={unsubscribe:await this.createContextUnsubscribeCb(n)};return this.listeners.set(n,i),await this.client.dispatch("contextHandlerAdded",{handlerId:n,contextType:e}),i}createNonStandardUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch("nonStandardHandlerRemoved",{handlerId:e})}}createContextUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch("contextHandlerRemoved",{handlerId:e})}}onAddContextListener(e){const t=`onContextHandlerAdded:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch("onAddContextHandlerAdded",{handlerId:t}),n}onDisconnect(e){const t=`onDisconnect:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch("onDisconnectHandlerAdded",{handlerId:t}),n}onUnsubscribe(e){const t=`onUnsubscribe:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch("onUnsubscribeHandlerAdded",{handlerId:t}),n}async cleanUpAllSubs(){Array.from(this.listeners.keys()).forEach((e=>{this.client.remove(e),this.listeners.delete(e)}))}async disconnect(){try{await this.client.dispatch("clientDisconnecting"),await this.cleanUpAllSubs(),await this.client.disconnect()}catch(e){throw new Error(e.message)}}},function(e){var t=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.getIntentResolution=e.isChannel=e.isContext=e.connectPrivateChannel=e.buildAppChannelObject=e.buildPrivateChannelObject=e.ChannelError=e.ResultError=e.UnsupportedChannelApiError=e.getUnsupportedChannelApis=void 0;const n=Hi,r=ir,o=t(i);e.getUnsupportedChannelApis=e=>({addContextListener:()=>{throw new a("Channel.addContextListener",e)},broadcast:()=>{throw new a("Channel.broadcast",e)},getCurrentContext:()=>{throw new a("Channel.getCurrentContext",e)}});class a extends Error{constructor(e,t="System"){super(e),this.message=`Calling ${e} on an instance of a ${t} Channel returned by fdc3.get${t}Channels is not supported. If you would like to use a ${t} Channel, please use fdc3.joinChannel, fdc3.addContextListener, and fdc3.broadcast instead.`}}var c,d;e.UnsupportedChannelApiError=a,function(e){e.NoResultReturned="NoResultReturned",e.IntentHandlerRejected="IntentHandlerRejected"}(c=e.ResultError||(e.ResultError={})),(d=e.ChannelError||(e.ChannelError={})).NoChannelFound="NoChannelFound",d.AccessDenied="AccessDenied",d.CreationFailed="CreationFailed";e.buildPrivateChannelObject=e=>{let t=!1;const n=()=>{if(t)throw new Error("Private Channel Client has been disconnected from the Private Channel")};return{id:e.id,type:"private",broadcast:async t=>(n(),e.broadcast(t)),getCurrentContext:async t=>(n(),e.getCurrentContext(t)),addContextListener:async(t,i)=>{n();let r=i,o=t;"function"==typeof t&&(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),r=t,o=null);return e.addContextListener(o,r)},onAddContextListener:t=>(n(),e.onAddContextListener(t)),disconnect:async()=>(n(),t=!0,e.disconnect()),onDisconnect:t=>(n(),e.onDisconnect(t)),onUnsubscribe:t=>(n(),e.onUnsubscribe(t))}};e.buildAppChannelObject=e=>({id:e.id,type:"app",broadcast:e.setContext,getCurrentContext:async t=>{const n=await e.getCurrentContext(t);return void 0===n?null:n},addContextListener:(t,n)=>{let i,r;"function"==typeof t?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),i=t):(i=n,"string"==typeof t&&(r=t));const s=(async()=>{let t=!0;const n=await e.getCurrentContext(r);return e.addContextHandler(((e,r)=>{if(!t||(t=!1,!(0,o.default)(n,e)))return i(e,r)}),r)})();return{...s,unsubscribe:()=>s.then((e=>e.unsubscribe()))}}});e.connectPrivateChannel=async t=>{try{const n=await fin.InterApplicationBus.Channel.connect(t),i=new r.PrivateChannelClient(n,t);return(0,e.buildPrivateChannelObject)(i)}catch(e){throw new Error(`Private Channel with id: ${t} doesn't exist`)}};e.isContext=e=>{if(e&&"object"==typeof e&&"type"in e){const{type:t}=e;return"string"==typeof t}return!1};e.isChannel=e=>{if(e&&"object"==typeof e&&"type"in e&&"id"in e){const{type:t,id:n}=e;return"string"==typeof t&&"string"==typeof n&&("app"===t||"private"===t)}return!1};e.getIntentResolution=async(t,i,r,o)=>{const s=(0,n.generateId)(),a=new Promise(((e,t)=>{fin.InterApplicationBus.subscribe({uuid:"*"},s,(t=>{e(t)})).catch((()=>t(new Error("getResult is not supported in this environment"))))})),d=r?{target:r,intentResolutionResultId:s}:{intentResolutionResultId:s},h=o?{name:o,context:i,metadata:d}:{...i,metadata:d},l=async()=>{let n=await a;if(!n||"object"!=typeof n)throw new Error(c.NoResultReturned);const{error:i}=n;if(i)throw new Error(c.IntentHandlerRejected);if((0,e.isChannel)(n)){const{id:i,type:r}=n;switch(r){case"private":n=await(0,e.connectPrivateChannel)(i);break;case"app":{const r=await t.joinSessionContextGroup(i);n=(0,e.buildAppChannelObject)(r);break}}}else if(!(0,e.isContext)(n))throw new Error(c.NoResultReturned);return n},u=o?await t.fireIntent(h):await t.fireIntentForContext(h);return"object"!=typeof u?{source:{appId:"",instanceId:""},intent:"",version:"2.0",getResult:l}:{...u,getResult:l}}}(nr);var lr,ur,pr={};function wr(){if(ur)return Ki;ur=1;var e,t,n=s&&s.__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},i=s&&s.__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)},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ki,"__esModule",{value:!0}),Ki.InteropClient=void 0;const o=d,a=r(qi),c=function(){if(dr)return er;dr=1,Object.defineProperty(er,"__esModule",{value:!0}),er.Fdc3Module=void 0;const e=Hi,t=hr();class n extends t.FDC3ModuleBase{async open(e,t){await super._open(e,t)}addContextListener(e,t){let n;return this.wire.sendAction("fdc3-add-context-listener").catch((e=>{})),"function"==typeof e?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),n=this.client.addContextHandler(e)):n=this.client.addContextHandler(t,null===e?void 0:e),{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}addIntentListener(e,t){this.wire.sendAction("fdc3-add-intent-listener").catch((e=>{}));const n=this.client.registerIntentHandler((e=>{const{context:n,metadata:i}=e,{metadata:r}=n,o=i?.intentResolutionResultId||r?.intentResolutionResultId;o&&this.fin.InterApplicationBus.publish(o,null).catch((()=>null)),t(e.context)}),e,{fdc3Version:"1.2"});return{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}async raiseIntent(t,n,i){this.wire.sendAction("fdc3-raise-intent").catch((e=>{}));const r=i?{name:t,context:n,metadata:{target:i}}:{name:t,context:n};try{return await this.client.fireIntent(r)}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntent?"ResolverUnavailable":t.message;throw new Error(n)}}async findIntent(t,n){this.wire.sendAction("fdc3-find-intent").catch((e=>{}));try{return await this.client.getInfoForIntent({name:t,context:n})}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntent?"ResolverUnavailable":t.message;throw new Error(n)}}async findIntentsByContext(t){this.wire.sendAction("fdc3-find-intents-by-context").catch((e=>{}));try{return await this.client.getInfoForIntentsByContext(t)}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntentsByContext?"ResolverUnavailable":t.message;throw new Error(n)}}async raiseIntentForContext(t,n){this.wire.sendAction("fdc3-raise-intent-for-context").catch((e=>{}));try{return await this.client.fireIntentForContext({...t,metadata:{target:n}})}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntentForContext?"ResolverUnavailable":t.message;throw new Error(n)}}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}getInfo(){return this.wire.sendAction("fdc3-get-info").catch((e=>{})),{providerVersion:this.wire.environment.getAdapterVersionSync(),provider:`openfin-${this.wire.me.uuid}`,fdc3Version:"1.2"}}}return er.Fdc3Module=n,er}(),h=function(){if(lr)return pr;lr=1,Object.defineProperty(pr,"__esModule",{value:!0}),pr.Fdc3Module2=void 0;const e=hr(),t=Hi,n=wr(),i=nr,r=ir;class o extends e.FDC3ModuleBase{async open(e,t){return"string"==typeof e&&console.warn("Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string })."),super._open(e,t)}async findInstances(e){this.wire.sendAction("fdc3-find-instances").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,"fdc3FindInstances",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3FindInstances?"ResolverUnavailable":e.message;throw new Error(n)}}async getAppMetadata(e){this.wire.sendAction("fdc3-get-app-metadata").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,"fdc3GetAppMetadata",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3GetAppMetadata?"ResolverUnavailable":e.message;throw new Error(n)}}async addContextListener(e,t){this.wire.sendAction("fdc3-add-context-listener").catch((e=>{}));const n=e=>t=>{const{contextMetadata:n,...i}=t,r=n?[{...i},n]:[t,null];e(...r)};let i=t,r=n(i);return"function"==typeof e?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),i=e,r=n(i),this.client.addContextHandler(r)):this.client.addContextHandler(r,null===e?void 0:e)}async findIntent(e,n,i){this.wire.sendAction("fdc3-find-intent").catch((e=>{}));try{return await this.client.getInfoForIntent({name:e,context:n,metadata:{resultType:i}})}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntent?"ResolverUnavailable":e.message;throw new Error(n)}}async findIntentsByContext(e,i){this.wire.sendAction("fdc3-find-intents-by-context").catch((e=>{}));const r=i?{context:e,metadata:{resultType:i}}:e;try{return await n.InteropClient.ferryFdc3Call(this.client,"fdc3v2FindIntentsByContext",r)}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntentsByContext?"ResolverUnavailable":e.message;throw new Error(n)}}async raiseIntent(e,n,r){this.wire.sendAction("fdc3-raise-intent").catch((e=>{}));try{return"string"==typeof r&&console.warn("Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string })."),(0,i.getIntentResolution)(this.client,n,r,e)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?"ResolverUnavailable":e.message;throw new Error(n)}}async raiseIntentForContext(e,n){this.wire.sendAction("fdc3-raise-intent-for-context").catch((e=>{}));try{return"string"==typeof n&&console.warn("Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string })."),(0,i.getIntentResolution)(this.client,e,n)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?"ResolverUnavailable":e.message;throw new Error(n)}}async addIntentListener(e,t){if(this.wire.sendAction("fdc3-add-intent-listener").catch((e=>{})),"string"!=typeof e)throw new Error("First argument must be an Intent name");return this.client.registerIntentHandler((async e=>{let n,i;const{context:r,metadata:o}=e,{contextMetadata:s,metadata:a,...c}=r,d=o?.intentResolutionResultId||a?.intentResolutionResultId;try{const e=a?{metadata:a,...c}:{...c};n=await t(e,s),i=n}catch(e){n=e,i={error:!0}}if(d&&this.fin.InterApplicationBus.publish(d,i).catch((()=>null)),n instanceof Error)throw new Error(n.message);return n}),e,{fdc3Version:"2.0"})}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}async createPrivateChannel(){const e=(0,t.generateId)();await n.InteropClient.ferryFdc3Call(this.client,"createPrivateChannelProvider",{channelId:e});const o=await this.fin.InterApplicationBus.Channel.connect(e),s=new r.PrivateChannelClient(o,e);return(0,i.buildPrivateChannelObject)(s)}async getUserChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:"user",...(0,i.getUnsupportedChannelApis)("User")})))}async getSystemChannels(){return console.warn("This API has been deprecated. Please use fdc3.getUserChannels instead."),super.getSystemChannels()}async joinUserChannel(e){return super.joinChannel(e)}async joinChannel(e){return console.warn("This API has been deprecated. Please use fdc3.joinUserChannel instead."),super.joinChannel(e)}async getCurrentChannel(){const e=await super.getCurrentChannel();return e?{...e,type:"user",broadcast:this.broadcast.bind(this)}:null}async getInfo(){return n.InteropClient.ferryFdc3Call(this.client,"fdc3v2GetInfo",{fdc3Version:"2.0"})}}return pr.Fdc3Module2=o,pr}(),l=Hi;let u=class extends o.Base{constructor(i,r){super(i),e.set(this,void 0),t.set(this,void 0),n(this,t,new Map,"f"),n(this,e,r,"f")}async setContext(t){this.wire.sendAction("interop-client-set-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("setContext",{context:t})}async addContextHandler(t,n){if(this.wire.sendAction("interop-client-add-context-handler").catch((e=>{})),"function"!=typeof t)throw new Error("Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");const r=await i(this,e,"f");let o;o=n?`invokeContextHandler-${n}-${(0,l.generateId)()}`:"invokeContextHandler";const s=(0,l.wrapContextHandler)(t,o);return r.register(o,s),await r.dispatch("contextHandlerRegistered",{handlerId:o,contextType:n}),{unsubscribe:async()=>{r.remove(o),await r.dispatch("removeContextHandler",{handlerId:o})}}}async getContextGroups(){this.wire.sendAction("interop-client-get-context-groups").catch((e=>{}));return(await i(this,e,"f")).dispatch("getContextGroups")}async joinContextGroup(t,n){this.wire.sendAction("interop-client-join-context-group").catch((e=>{}));const r=await i(this,e,"f");if(!t)throw new Error("No contextGroupId specified for joinContextGroup.");return r.dispatch("joinContextGroup",{contextGroupId:t,target:n})}async removeFromContextGroup(t){this.wire.sendAction("interop-client-remove-from-context-group").catch((e=>{}));return(await i(this,e,"f")).dispatch("removeFromContextGroup",{target:t})}async getAllClientsInContextGroup(t){this.wire.sendAction("interop-client-get-all-clients-in-context-group").catch((e=>{}));const n=await i(this,e,"f");if(!t)throw new Error("No contextGroupId specified for getAllClientsInContextGroup.");return n.dispatch("getAllClientsInContextGroup",{contextGroupId:t})}async getInfoForContextGroup(t){this.wire.sendAction("interop-client-get-info-for-context-group").catch((e=>{}));const n=await i(this,e,"f");if(!t)throw new Error("No contextGroupId specified for getInfoForContextGroup.");return n.dispatch("getInfoForContextGroup",{contextGroupId:t})}async fireIntent(t){this.wire.sendAction("interop-client-fire-intent").catch((e=>{}));return(await i(this,e,"f")).dispatch("fireIntent",t)}async registerIntentHandler(t,n,r){this.wire.sendAction("interop-client-register-intent-handler").catch((e=>{}));const o=await i(this,e,"f"),s=`intent-handler-${n}`,a=(0,l.wrapIntentHandler)(t,s);try{await o.register(s,a),await o.dispatch("intentHandlerRegistered",{handlerId:s,...r})}catch(e){throw new Error("Unable to register intent handler")}return{unsubscribe:async()=>{o.remove(s)}}}async getCurrentContext(t){this.wire.sendAction("interop-client-get-current-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("getCurrentContext",{contextType:t})}async getInfoForIntent(t){this.wire.sendAction("interop-client-get-info-for-intent").catch((e=>{}));return(await i(this,e,"f")).dispatch("getInfoForIntent",t)}async getInfoForIntentsByContext(t){this.wire.sendAction("interop-client-get-info-for-intents-by-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("getInfoForIntentsByContext",t)}async fireIntentForContext(t){this.wire.sendAction("interop-client-fire-intent-for-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("fireIntentForContext",t)}async joinSessionContextGroup(n){try{const r=i(this,t,"f").get(n);if(r)return r.getUserInstance();const o=await i(this,e,"f"),{hasConflict:s}=await o.dispatch("sessionContextGroup:createIfNeeded",{sessionContextGroupId:n});s&&console.warn(`A (non-session) context group with the name "${n}" already exists. If you are trying to join a Context Group, call joinContextGroup instead.`);const c=new a.default(this.wire,i(this,e,"f"),n);return i(this,t,"f").set(n,c),c.getUserInstance()}catch(e){throw console.error(`Error thrown trying to create Session Context Group with id "${n}": ${e}`),e}}async onDisconnection(t){this.wire.sendAction("interop-client-add-ondisconnection-listener").catch((e=>{}));return(await i(this,e,"f")).onDisconnection((e=>{const{uuid:n}=e;t({type:"interop-broker",topic:"disconnected",brokerName:n})}))}getFDC3Sync(e){switch(e){case"1.2":return new c.Fdc3Module((()=>this),this.wire);case"2.0":return new h.Fdc3Module2((()=>this),this.wire);default:throw new Error(`Invalid FDC3 version provided: ${e}. Must be '1.2' or '2.0'`)}}async getFDC3(e){return this.getFDC3Sync(e)}static async ferryFdc3Call(t,n,r){return(await i(t,e,"f")).dispatch(n,r||null)}};return Ki.InteropClient=u,e=new WeakMap,t=new WeakMap,Ki}var yr,fr,gr,mr={};function vr(){if(yr)return mr;yr=1,Object.defineProperty(mr,"__esModule",{value:!0}),mr.overrideCheck=mr.checkFDC32Overrides=mr.getDefaultViewFdc3VersionFromAppInfo=void 0;const e=Vi();function t(t){return["fdc3HandleFindInstances","handleInfoForIntent","handleInfoForIntentsByContext","fdc3HandleGetAppMetadata","fdc3HandleGetInfo","fdc3HandleOpen","handleFiredIntent","handleFiredIntentForContext"].filter((n=>t[n]===e.InteropBroker.prototype[n]))}return mr.getDefaultViewFdc3VersionFromAppInfo=function({manifest:e,initialOptions:t}){const n=e?.platform?.defaultViewOptions?.fdc3InteropApi??t.defaultViewOptions?.fdc3InteropApi;return["1.2","2.0"].includes(n??"")?n:void 0},mr.checkFDC32Overrides=t,mr.overrideCheck=function(e,n){if(n&&"2.0"===n){const n=t(e);n.length>0&&console.warn(`WARNING: FDC3 2.0 has been set as a default option for Views in this Platform, but the required InteropBroker APIs for FDC3 2.0 compliance have not all been overridden.\nThe following APIs need to be overridden:\n${n.join("\n")}`)}},mr}function Cr(){return gr||(gr=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),i=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),i(function(){if(fr)return Ti;fr=1;var e=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ti,"__esModule",{value:!0}),Ti.InteropModule=void 0;const t=e(n),i=$i,r=d,o=Vi(),a=wr(),c=vr(),h=Tn,l=e=>new e,u="You have attempted to use or modify InteropBroker parameters, which is not allowed. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.";class p extends r.Base{async init(e,n=l){this.wire.sendAction("interop-init").catch((()=>{}));const r=await this.wire.environment.getInteropInfo(this.wire.getFin()),s=(0,i.createUnusableObject)(u),a=(0,i.createWarningObject)(u,(0,t.default)(r)),d=async()=>{throw new Error(u)},p=o.InteropBroker.createClosedConstructor(this.wire,(()=>this.fin.InterApplicationBus.Channel.create(`interop-broker-${e}`)),r);let w;return w=Array.isArray(n)?new((0,h.overrideFromComposables)(...n)(p))(s,d,a):await n(p,s,d,a),(0,c.overrideCheck)(w,r.fdc3Version),w}connectSync(e,t){return this.wire.sendAction("interop-connect-sync").catch((()=>{})),new a.InteropClient(this.wire,this.wire.environment.whenReady().then((()=>this.fin.InterApplicationBus.Channel.connect(`interop-broker-${e}`,{payload:t}))))}}return Ti.InteropModule=p,Ti}(),e),i(wr(),e),i(Vi(),e)}(Li)),Li}var br={},Ir={},Er={},xr={};Object.defineProperty(xr,"__esModule",{value:!0}),xr.getSnapshotSourceChannelName=void 0;xr.getSnapshotSourceChannelName=e=>`snapshot-source-provider-${e.uuid}`;var Ar,Pr,Mr,_r,Or,Sr=s&&s.__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},Rr=s&&s.__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)};Object.defineProperty(Er,"__esModule",{value:!0}),Er.SnapshotSource=void 0;const Fr=d,jr=xr,kr=new Map;class Lr extends Fr.Base{constructor(e,t){super(e),Ar.set(this,void 0),Pr.set(this,(()=>(kr.has(this.identity.uuid)||kr.set(this.identity.uuid,{eventFired:null,clientPromise:null}),kr.get(this.identity.uuid)))),Mr.set(this,(()=>(Rr(this,Pr,"f").call(this).clientPromise||(Rr(this,Pr,"f").call(this).clientPromise=Rr(this,_r,"f").call(this)),Rr(this,Pr,"f").call(this).clientPromise))),_r.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);try{Rr(this,Pr,"f").call(this).eventFired||await Rr(this,Or,"f").call(this);const t=await this.fin.InterApplicationBus.Channel.connect(e,{wait:!1});return t.onDisconnection((()=>{Rr(this,Pr,"f").call(this).clientPromise=null,Rr(this,Pr,"f").call(this).eventFired=null})),t}catch(e){throw Rr(this,Pr,"f").call(this).clientPromise=null,new Error("The targeted SnapshotSource is not currently initialized. Await this object's ready() method.")}})),Or.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);let t,n;const i=new Promise(((e,i)=>{t=e,n=i}));Rr(this,Pr,"f").call(this).eventFired=i;const r=async i=>{try{i.channelName===e&&(t(),await this.fin.InterApplicationBus.Channel.removeListener("connected",r))}catch(e){n(e)}};await this.fin.InterApplicationBus.Channel.on("connected",r)})),Sr(this,Ar,t,"f")}get identity(){return Rr(this,Ar,"f")}async ready(){this.wire.sendAction("snapshot-source-ready").catch((e=>{}));try{await Rr(this,Mr,"f").call(this)}catch(e){await Rr(this,Pr,"f").call(this).eventFired}}async getSnapshot(){this.wire.sendAction("snapshot-source-get-snapshot").catch((e=>{}));const e=await Rr(this,Mr,"f").call(this),t=await e.dispatch("get-snapshot");return(await t).snapshot}async applySnapshot(e){this.wire.sendAction("snapshot-source-apply-snapshot").catch((e=>{}));return(await Rr(this,Mr,"f").call(this)).dispatch("apply-snapshot",{snapshot:e})}}Er.SnapshotSource=Lr,Ar=new WeakMap,Pr=new WeakMap,Mr=new WeakMap,_r=new WeakMap,Or=new WeakMap,Object.defineProperty(Ir,"__esModule",{value:!0}),Ir.SnapshotSourceModule=void 0;const Tr=d,$r=Er,Br=xr;class Gr extends Tr.Base{async init(e){if(this.wire.sendAction("snapshot-source-init").catch((e=>{})),"object"!=typeof e||"function"!=typeof e.getSnapshot||"function"!=typeof e.applySnapshot)throw new Error("you must pass in a valid SnapshotProvider");const t=await this.fin.InterApplicationBus.Channel.create((0,Br.getSnapshotSourceChannelName)(this.fin.me));t.register("get-snapshot",(async()=>({snapshot:await e.getSnapshot()}))),t.register("apply-snapshot",(({snapshot:t})=>e.applySnapshot(t)))}wrapSync(e){return this.wire.sendAction("snapshot-source-wrap-sync").catch((e=>{})),new $r.SnapshotSource(this.wire,e)}async wrap(e){return this.wire.sendAction("snapshot-source-wrap").catch((e=>{})),this.wrapSync(e)}}Ir.SnapshotSourceModule=Gr,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Ir,e),n(Er,e)}(br),Object.defineProperty(a,"__esModule",{value:!0});var Wr=a.Fin=void 0;const Hr=t,Nr=c,Dr=ie(),Ur=Z(),Vr=de,zr=en,Kr=rn,qr=un,Jr=bn,Yr=J(),Zr=An,Qr=ki,Xr=Cr(),eo=br;class to extends Hr.EventEmitter{constructor(e){super(),this.wire=e,this.System=new Nr.System(e),this.Window=new Dr._WindowModule(e),this.Application=new Ur.ApplicationModule(e),this.InterApplicationBus=new Vr.InterApplicationBus(e),this.Clipboard=new zr.Clipboard(e),this.ExternalApplication=new Kr.ExternalApplicationModule(e),this.Frame=new qr._FrameModule(e),this.GlobalHotkey=new Jr.GlobalHotkey(e),this.Platform=new Zr.PlatformModule(e,this.InterApplicationBus.Channel),this.View=new Yr.ViewModule(e),this.Interop=new Xr.InteropModule(e),this.SnapshotSource=new eo.SnapshotSourceModule(e),e.registerFin(this),this.me=(0,Qr.getMe)(e),e.on("disconnected",(()=>{this.emit("disconnected")}))}}Wr=a.Fin=to;var no={},io={};function ro(e){return"string"==typeof e.manifestUrl}function oo(e){return ao(e)&&"string"==typeof e.address}function so(e){return oo(e)&&"string"==typeof e.token}function ao(e){return"string"==typeof e.uuid}function co(e){return e.runtime&&"string"==typeof e.runtime.version}function ho(e){return ao(e)&&co(e)}Object.defineProperty(io,"__esModule",{value:!0}),io.isInternalConnectConfig=io.isPortDiscoveryConfig=io.isNewConnectConfig=io.isConfigWithReceiver=io.isRemoteConfig=io.isExistingConnectConfig=io.isExternalConfig=void 0,io.isExternalConfig=ro,io.isExistingConnectConfig=oo,io.isRemoteConfig=so,io.isConfigWithReceiver=function(e){return"object"==typeof e.receiver&&so({...e,address:""})},io.isNewConnectConfig=ho,io.isPortDiscoveryConfig=function(e){return ro(e)&&co(e)||ho(e)},io.isInternalConnectConfig=function(e){return oo(e)||ho(e)};var lo={},uo={};Object.defineProperty(uo,"__esModule",{value:!0}),uo.EmitterMap=void 0;const po=t;function wo(e){return Buffer.from(e).toString("base64")}uo.EmitterMap=class{constructor(){this.storage=new Map}hashKeys(e){return e.map(wo).join("/")}getOrCreate(e){const t=this.hashKeys(e);return this.storage.has(t)||this.storage.set(t,new po.EventEmitter),this.storage.get(t)}has(e){return this.storage.has(this.hashKeys(e))}delete(e){const t=this.hashKeys(e);return this.storage.delete(t)}},Object.defineProperty(lo,"__esModule",{value:!0});const yo=uo;class fo extends yo.EmitterMap{constructor(){super(...arguments),this.dispatchEvent=e=>{if(function(e){return"process-desktop-event"===e.action}(e)){const{payload:t}=e,n=function(e){const{topic:t}=e;if("frame"===t||"window"===t||"view"===t){const{uuid:n,name:i}=e;return[t,n,i]}if("application"===t){const{uuid:n}=e;return[t,n]}return[t]}(t);if(this.has(n))return this.getOrCreate(n).emit(t.type,t),!0}return!1}}}lo.default=fo;var go,mo,vo=s&&s.__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},Co=s&&s.__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)},bo=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(no,"__esModule",{value:!0});var Io=no.Transport=void 0;const Eo=t,xo=io,Ao=g,Po=bo(lo),Mo=ki,_o=ke;class Oo extends Eo.EventEmitter{constructor(e,t,n){super(),this.wireListeners=new Map,this.topicRefMap=new Map,this.eventAggregator=new Po.default,this.messageHandlers=[this.eventAggregator.dispatchEvent],go.set(this,void 0),mo.set(this,void 0),this.connectSync=()=>{Co(this,go,"f").connectSync()},this.getPort=()=>Co(this,go,"f").getPort(),vo(this,go,new e(this.onmessage.bind(this)),"f"),this.environment=t,this.sendRaw=Co(this,go,"f").send.bind(Co(this,go,"f")),this.registerMessageHandler(this.handleMessage.bind(this)),Co(this,go,"f").on("disconnected",(()=>{for(const[,{handleNack:e}]of this.wireListeners)e({reason:"Remote connection has closed"});this.wireListeners.clear(),this.emit("disconnected")}));const{uuid:i,name:r}=n,o=this.environment.getCurrentEntityType();this.me=(0,Mo.getBaseMe)(o,i,r)}getFin(){if(!Co(this,mo,"f"))throw new Error("No Fin object registered for this transport");return Co(this,mo,"f")}registerFin(e){if(Co(this,mo,"f"))throw new Error("Fin object has already been registered for this transport");vo(this,mo,e,"f")}shutdown(){return Co(this,go,"f").shutdown()}async connect(e){if((0,xo.isConfigWithReceiver)(e))return await Co(this,go,"f").connect(e.receiver),this.authorize(e);if((0,xo.isRemoteConfig)(e))return this.connectRemote(e);if((0,xo.isExistingConnectConfig)(e))return this.connectByPort(e);if((0,xo.isNewConnectConfig)(e)){const t=await this.environment.retrievePort(e);return this.connectByPort({...e,address:`ws://localhost:${t}`})}}async connectRemote(e){return await Co(this,go,"f").connect(new(this.environment.getWsConstructor())(e.address)),this.authorize(e)}async connectByPort(e){const{address:t,uuid:n}=e,i={...e,type:"file-token"},r=Co(this,go,"f");await r.connect(new(this.environment.getWsConstructor())(e.address));const o=await this.sendAction("request-external-authorization",{uuid:n,type:"file-token"},!0);if("external-authorization-response"!==o.action)throw new Ao.UnexpectedActionError(o.action);return await this.environment.writeToken(o.payload.file,o.payload.token),this.authorize(i)}async authorize(e){const t=await this.sendAction("request-authorization",e,!0);if("authorization-response"!==t.action)throw new Ao.UnexpectedActionError(t.action);if(!0!==t.payload.success)throw new Ao.RuntimeError(t.payload)}sendAction(e,t={},n=!1){let i=()=>{};const r=Ao.RuntimeError.getCallSite(1),o=this.environment.getNextMessageId(),s=new Promise(((s,a)=>{i=a;const c={action:e,payload:t,messageId:o},d=Co(this,go,"f");return this.addWireListener(o,s,(e=>this.nackHandler(e,a,r)),n),d.send(c).catch(a)}));return Object.assign(s,{cancel:i,messageId:o})}nackHandler(e,t,n){t("string"==typeof e?e:new Ao.RuntimeError(e,n))}ferryAction(e){return new Promise(((t,n)=>{const i=this.environment.getNextMessageId();e.messageId=i;const r=e=>{t(e.payload)};return Co(this,go,"f").send(e).then((()=>this.addWireListener(i,r,(e=>this.nackHandler(e,n)),!1))).catch(n)}))}registerMessageHandler(e){this.messageHandlers.push(e)}addWireListener(e,t,n,i){i?this.uncorrelatedListener=t:this.wireListeners.has(e)?n({reason:"Duplicate handler id",error:(0,_o.errorToPOJO)(new Ao.DuplicateCorrelationError(String(e)))}):this.wireListeners.set(e,{resolve:t,handleNack:n})}onmessage(e){for(const t of this.messageHandlers)t.call(null,e)}handleMessage(e){const t=e.correlationId||NaN;if("correlationId"in e){if(!this.wireListeners.has(t))return!1;{const{resolve:n,handleNack:i}=this.wireListeners.get(t);"ack"!==e.action?i({reason:"Did not receive ack action",error:(0,_o.errorToPOJO)(new Ao.NoAckError(e.action))}):"payload"in e?e.payload.success?n.call(null,e):i(e.payload):"string"==typeof e.reason?i(e):(console.warn("Received invalid response from core",e),i({reason:"invalid response shape"})),this.wireListeners.delete(t)}}else this.uncorrelatedListener&&this.uncorrelatedListener.call(null,e),this.uncorrelatedListener=()=>{};return!0}}Io=no.Transport=Oo,go=new WeakMap,mo=new WeakMap;const So=(...e)=>({log:(...t)=>console.debug(`[${(new Date).toISOString()}]`,...(e=>e.map((e=>`[${e}]`)))(e),...t),getLogger:(...t)=>So(...e,...t)}),Ro=So("@openfin/core-web/client");function Fo(e,t){if(!function(e){return"string"==typeof e}(e))throw new Error(`Property ${t} has invalid type. Expected string, got ${typeof e}.`)}const jo="web-broker-ports-ready",ko=Ro.getLogger("get-web-interop-ports");function Lo(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)}function To(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}"function"==typeof SuppressedError&&SuppressedError;const $o=e=>{var n,i,r;return r=class extends t.EventEmitter{constructor(t){super(),n.set(this,void 0),i.set(this,!1),this.connectSync=()=>{Lo(this,i,"f")||(e.addEventListener("message",(e=>{e.data?.topic?.startsWith("wire-message")&&e.data.message&&Lo(this,n,"f").call(this,{...JSON.parse(e.data.message),ports:e.ports})})),e.start())},this.connect=async()=>{this.connectSync()},this.send=t=>(e.postMessage({topic:"wire-message",message:JSON.stringify(t)}),Promise.resolve()),this.shutdown=async()=>{e.close()},To(this,n,t,"f")}getPort(){return e}},n=new WeakMap,i=new WeakMap,r};var Bo={},Go={};Object.defineProperty(Go,"__esModule",{value:!0}),Go.BaseEnvironment=void 0;const Wo=vr();Go.BaseEnvironment=class{async getViewWindowIdentity(e,t){const{identity:n}=await e.View.wrapSync(t).getCurrentWindow();return n}async getInteropInfo(e){const t=await e.Application.getCurrentSync().getInfo().catch((()=>null)),n=t?.initialOptions?.interopBrokerConfiguration??{};return{fdc3Version:t?(0,Wo.getDefaultViewFdc3VersionFromAppInfo)(t):void 0,...n,fdc3Info:{providerVersion:await e.System.getVersion(),provider:"OpenFin"}}}},Object.defineProperty(Bo,"__esModule",{value:!0});var Ho=Bo.BrowserEnvironment=void 0;const No=Go;class Do extends No.BaseEnvironment{constructor(){super(...arguments),this.type="other",this.getRandomId=()=>{const e=new Uint32Array(1);return window.crypto.getRandomValues(e)[0].toString(32)}}getAdapterVersionSync(){return""}observeBounds(e,t){throw new Error("Method not implemented.")}layoutAllowedInContext(e){return!1}initLayoutManager(e,t,n){throw new Error("Method not implemented.")}applyLayoutSnapshot(e,t,n){throw new Error("Method not implemented.")}createLayout(e,t){throw new Error("Method not implemented.")}destroyLayout(e,t){throw new Error("Method not implemented.")}resolveLayout(e,t){throw new Error("Method not implemented.")}initPlatform(...e){throw new Error("Method not implemented.")}writeToken(e,t){return Promise.resolve("")}retrievePort(e){throw new Error("Method not implemented.")}getNextMessageId(){return this.getRandomId()}createChildContent(e){throw new Error("Method not implemented.")}getWebWindow(e){throw new Error("Method not implemented.")}getCurrentEntityIdentity(){throw new Error("Method not implemented.")}getCurrentEntityType(){return"external connection"}raiseEvent(e,t){throw new Error("Method not implemented.")}getUrl(){return location.href}getDefaultChannelOptions(){return{create:{},connect:{}}}getRtcPeer(){return new RTCPeerConnection}getWsConstructor(){return WebSocket}whenReady(){return Promise.resolve()}}Ho=Bo.BrowserEnvironment=Do;const Uo=e=>"platform"in e&&void 0!==e.platform;var Vo,zo;class Ko extends Ho{constructor(e){super(),this.connectConfig=e,Vo.set(this,void 0),zo.set(this,new W((async()=>Promise.resolve().then((function(){return __webpack_require__(/*! ./main-b14f67c9.js */ "./node_modules/@openfin/core-web/out/main-b14f67c9.js")}))))),Uo(e)&&this.validatePlatformOptions(e)}getAdapterVersionSync(){return"0.39.21"}validatePlatformOptions({platform:e}){if(!("layoutSnapshot"in e))throw new Error("Platform options are missing layoutSnapshot. Please provide a layoutSnapshot in the platform options.");if("windows"in e||"windows"in e.layoutSnapshot)throw new Error("It appears you tried to call connect() with a snapshot object from an OpenFin desktop environment. Note that connect() expects to be called with a platform property with this structure: { platform: { layoutSnapshot } }. To get a layoutSnapshot of the expected structure, use fin.Platform.Layout.getCurrentLayoutManagerSync().getLayoutSnapshot() in v34+ in your desktop environment.");const{layouts:t}=e.layoutSnapshot;Object.entries(t).map((([e,t])=>{if("object"!=typeof t||null===t)throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must be an object.`);if(!("content"in t))throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must contain a 'content' property.`)}))}async getInteropInfo(e){return{...{contextGroups:void 0,logging:{beforeAction:{enabled:!1},afterAction:{enabled:!1}}},fdc3Version:void 0,fdc3Info:{providerVersion:"0.39.21",provider:"OpenFin Web"}}}layoutAllowedInContext(e){return!0}async initLayoutManager(e,t,n){if(Lo(this,Vo,"f"))throw new Error("Layout already initialized.");if(!Uo(this.connectConfig))throw new Error("Platform options are missing from connection config.");const{WebLayoutEntryPoint:i}=await Lo(this,zo,"f").getValue();return To(this,Vo,new i(this.connectConfig),"f"),await Lo(this,Vo,"f").initLayoutManager(e,t,n)}async applyLayoutSnapshot(e,t,n){Lo(this,Vo,"f")?.applyLayoutSnapshot(e,t,n)}async createLayout(e,t){return Lo(this,Vo,"f")?.createLayout(e,t)}async destroyLayout(e,t){return Lo(this,Vo,"f")?.destroyLayout(e,t)}async getViewWindowIdentity(e,t){return Promise.resolve({uuid:t.uuid,name:t.uuid})}}Vo=new WeakMap,zo=new WeakMap;const qo=()=>{const e=((e,t)=>{const n=new RegExp(`^${t}<(?.*)>$`).exec(e)?.groups?.meta;if(n)try{return JSON.parse(atob(n))}catch(e){throw new Error(`Failed to decode JSON from ${n}.`)}})(window.name,"of-frame");if(e)try{const{name:t,uuid:n,brokerUrl:i,providerId:r,contextGroup:o}=e;return Fo(i,"brokerUrl"),Fo(n,"uuid"),Fo(t,"name"),{identity:{name:t,uuid:n},brokerUrl:i,interopConfig:{providerId:r,currentContextGroup:o}}}catch(e){throw new Error(`Unexpected error occurred when inferring platform information: ${e.stack}`)}},Jo=()=>{const e=r.v4();return{uuid:e,name:e}},Yo=async e=>{if("enabled"===e.connectionInheritance){const t=await(async e=>{const t=qo();if(t){const{validateOptions:n=(()=>!0)}=e,{identity:i,...r}=t;if(!await n(r))throw new Error("Parent options were rejected by validateOptions.");return t}})(e);if(t)return t}if(!e.options){const t="enabled"===e.connectionInheritance?"Broker URL was not specified nor provided by a platform container.":"Connection inheritance is disabled but no options were provided.";throw new Error(t)}return{...e.options,identity:Jo()}};exports.__classPrivateFieldGet=Lo,exports.__classPrivateFieldSet=To,exports.apiExposer=Gn,exports.commonjsGlobal=s,exports.connect=async t=>{try{Ro.log("Establishing connection",t);const{brokerUrl:n,identity:i,timeout:r,interopConfig:s}=await Yo(t),{workerPort:a,iframeBrokerPort:c}=await(async(e,t,n)=>{const{origin:i}=new URL(e),r=document.createElement("IFRAME");let s;r.style.display="none";try{return await new Promise(((a,c)=>{const d=e=>{if(e.source===r.contentWindow&&e.data?.topic===`ack-${jo}`){if(e.origin!==i)c(new Error(`Broker redirected to unexpected origin ${e.origin}, expected ${i}.`));else if(e.data.success){const[t,n]=e.ports;a({iframeBrokerPort:t,workerPort:n})}else c(new m(e.data));window.removeEventListener("message",d),clearTimeout(s)}};window.addEventListener("message",d),ko.log(`Connecting to broker ${e}`),r.setAttribute("src",e),r.setAttribute("name",o(t,"of-broker")),document.body.appendChild(r),ko.log("Iframe loaded, awaiting init message from iframe"),n&&(s=setTimeout((()=>{window.removeEventListener("message",d),document.body.removeChild(r),c(new Error("Worker did not initialize in time"))}),n))}))}catch(e){throw new Error(`Failed to initialise Fin Web Client. ${e.message}`,{cause:e})}})(n,i,r);Ro.log("Successfully established connection to shared worker");const d={entityType:"external connection",...i};a.start(),c.start();const h=((t,n,i)=>{const r=$o(n),o=new Ko(t),s=new Io(r,o,i);return s.connectSync(),window.Buffer=e.Buffer,new Wr(s)})(t,a,d);return s?.providerId&&(h.me.interop=h.Interop.connectSync(s.providerId),s?.currentContextGroup&&h.me.interop.joinContextGroup(s.currentContextGroup).catch((e=>{console.warn(`Error joining specified context group: ${s?.currentContextGroup}, continuing`,e)}))),{...h,me:{...h.me,identity:{uuid:h.me.uuid,name:h.me.name}}}}catch(e){throw new Error(`An error occured during web-interop connection: ${e.message}`)}},exports.decorators=Nn,exports.encodeOptions=o,exports.layout_constants=ai,exports.lazy=G; +var e=__webpack_require__(/*! buffer/ */ "../../node_modules/buffer/index.js"),t=__webpack_require__(/*! events */ "../../node_modules/events/events.js"),n=__webpack_require__(/*! lodash/cloneDeep */ "../../node_modules/lodash/cloneDeep.js"),i=__webpack_require__(/*! lodash/isEqual */ "../../node_modules/lodash/isEqual.js"),r=__webpack_require__(/*! uuid */ "../../node_modules/uuid/dist/esm-browser/index.js");const o=(e,t)=>`${t}<${btoa(JSON.stringify(e))}>`;var s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof __webpack_require__.g?__webpack_require__.g:"undefined"!=typeof self?self:{},a={},c={},d={},h={};async function l(e){const t=[];for(const n of e){const e=await n();t.push(e)}return t}Object.defineProperty(h,"__esModule",{value:!0}),h.promiseMapSerial=h.serial=h.promiseMap=h.promisify=void 0,h.promisify=function(e){return(...t)=>new Promise(((n,i)=>{e(...t,((e,t)=>e?i(e):n(t)))}))},h.promiseMap=async function(e,t){return Promise.all(e.map(t))},h.serial=l,h.promiseMapSerial=async function(e,t){return l(e.map(((e,n,i)=>()=>t(e,n,i))))};var u,p=s&&s.__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},w=s&&s.__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)};Object.defineProperty(d,"__esModule",{value:!0}),d.Reply=d.EmitterBase=d.Base=void 0;const y=h;class f{constructor(e){this.isNodeEnvironment=()=>"node"===this.wire.environment.type,this.isOpenFinEnvironment=()=>"openfin"===this.wire.environment.type,this.isBrowserEnvironment=()=>"other"===this.wire.environment.type,this.wire=e}get fin(){return this.wire.getFin()}get me(){return this.wire.me}}d.Base=f;d.EmitterBase=class extends f{constructor(e,t,...n){super(e),this.topic=t,u.set(this,void 0),this.eventNames=()=>this.hasEmitter()?this.getOrCreateEmitter().eventNames():[],this.emit=(e,t,...n)=>!!this.hasEmitter()&&this.getOrCreateEmitter().emit(e,t,...n),this.hasEmitter=()=>this.wire.eventAggregator.has(w(this,u,"f")),this.getOrCreateEmitter=()=>this.wire.eventAggregator.getOrCreate(w(this,u,"f")),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[],this.listenerCount=e=>this.hasEmitter()?this.getOrCreateEmitter().listenerCount(e):0,this.registerEventListener=async(e,t={},n,i)=>{const r={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e},o=this.getOrCreateEmitter();n(o);try{await this.wire.sendAction("subscribe-to-desktop-event",r)}catch(e){throw i(o),this.deleteEmitterIfNothingRegistered(o),e}},this.deregisterEventListener=async(e,t={})=>{if(this.hasEmitter()){const n={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e};await this.wire.sendAction("unsubscribe-to-desktop-event",n).catch((()=>null));return this.getOrCreateEmitter()}return Promise.resolve()},p(this,u,[t,...n],"f"),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[]}async on(e,t,n){return await this.registerEventListener(e,n,(n=>{n.on(e,t)}),(n=>{n.removeListener(e,t)})),this}async addListener(e,t,n){return this.on(e,t,n)}async once(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.once(e,i),n.once(e,t)}),(n=>{n.removeListener(e,i),n.removeListener(e,t)})),this}async prependListener(e,t,n){return await this.registerEventListener(e,n,(n=>{n.prependListener(e,t)}),(n=>{n.removeListener(e,t)})),this}async prependOnceListener(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.prependOnceListener(e,t),n.once(e,i)}),(n=>{n.removeListener(e,t),n.removeListener(e,i)})),this}async removeListener(e,t,n){const i=await this.deregisterEventListener(e,n);return i&&(i.removeListener(e,t),this.deleteEmitterIfNothingRegistered(i)),this}async deregisterAllListeners(e){const t={...this.identity,type:e,topic:this.topic};if(this.hasEmitter()){const e=this.getOrCreateEmitter(),n=e.listenerCount(t.type),i=[];for(let e=0;enull)));return await Promise.all(i),e}}async removeAllListeners(e){const t=async e=>{const t=await this.deregisterAllListeners(e);t&&(t.removeAllListeners(e),this.deleteEmitterIfNothingRegistered(t))};if(e)await t(e);else if(this.hasEmitter()){const e=this.getOrCreateEmitter().eventNames();await(0,y.promiseMap)(e,t)}return this}deleteEmitterIfNothingRegistered(e){0===e.eventNames().length&&this.wire.eventAggregator.delete(w(this,u,"f"))}},u=new WeakMap;d.Reply=class{};var g={};Object.defineProperty(g,"__esModule",{value:!0});var m=g.RuntimeError=g.NotSupportedError=g.NotImplementedError=g.NoAckError=g.DuplicateCorrelationError=g.UnexpectedActionError=g.DisconnectedError=void 0;class v extends Error{constructor(e){super(`Expected websocket state OPEN but found ${e}`),this.readyState=e}}g.DisconnectedError=v;class C extends Error{}g.UnexpectedActionError=C;class b extends Error{}g.DuplicateCorrelationError=b;class I extends Error{}g.NoAckError=I;class E extends Error{}g.NotImplementedError=E;class x extends Error{}g.NotSupportedError=x;class A extends Error{constructor(e){const{message:t,name:n,stack:i,...r}=e;super(t),this.name=n||"Error",this.stack=i??this.toString(),Object.keys(r).forEach((e=>{this[e]=r[e]}))}}class P extends Error{static getCallSite(e=0){const t=Error.stackTraceLimit,n=e+1;Error.stackTraceLimit=t+n;const i=Error.prepareStackTrace;Error.prepareStackTrace=(e,t)=>t;const r=(new Error).stack?.slice(n)??[];return Error.prepareStackTrace=i,Error.stackTraceLimit=t,r}static prepareStackTrace(e,t){if("function"==typeof Error.prepareStackTrace)return Error.prepareStackTrace(e,t);let n="";n+=e.name||"Error",n+=`: ${e.message||""}`;for(const e of t)n+=`\n at ${e.toString()}`;return n}constructor(e,t){const{reason:n,error:i}=e;super(n),this.name="RuntimeError",i?.stack&&(this.cause=new A(i)),t&&(this.stack=P.prepareStackTrace(this,t))}}m=g.RuntimeError=P;var M={},_={},O={};Object.defineProperty(O,"__esModule",{value:!0}),O.validateIdentity=void 0,O.validateIdentity=function(e){let t;return"object"==typeof e&&"string"==typeof e.uuid||(t="Not a valid identity object"),t};var S={},R={},F={},j={},k={},L={},T={};Object.defineProperty(T,"__esModule",{value:!0}),T.handleDeprecatedWarnings=void 0;var $;T.handleDeprecatedWarnings=e=>{(e.contentNavigation?.whitelist||e.contentNavigation?.blacklist||e.contentRedirect?.whitelist||e.contentRedirect?.blacklist)&&console.warn("The properties 'whitelist' and 'blacklist' have been marked as deprecated and will be removed in a future version. Please use 'allowlist' and 'denylist'.")};var B={},G={};Object.defineProperty(G,"__esModule",{value:!0}),G.AsyncRetryableLazy=W=G.Lazy=void 0;var W=G.Lazy=class{constructor(e){this.producerFn=e}getValue(){return this.value||(this.value=this.producerFn()),this.value}};G.AsyncRetryableLazy=class{constructor(e){this.producerFn=e}async getValue(){return this.promise||(this.promise=this.producerFn().catch((e=>{throw delete this.promise,e}))),this.promise}};var H={};Object.defineProperty(H,"__esModule",{value:!0}),H.WebContents=void 0;const N=d;class D extends N.EmitterBase{constructor(e,t,n){super(e,n,t.uuid,t.name),this.identity=t,this.entityType=n}capturePage(e){return this.wire.sendAction("capture-page",{options:e,...this.identity}).then((({payload:e})=>e.data))}executeJavaScript(e){return this.wire.sendAction("execute-javascript-in-window",{...this.identity,code:e}).then((({payload:e})=>e.data))}getZoomLevel(){return this.wire.sendAction("get-zoom-level",this.identity).then((({payload:e})=>e.data))}setZoomLevel(e){return this.wire.sendAction("set-zoom-level",{...this.identity,level:e}).then((()=>{}))}navigate(e){return this.wire.sendAction("navigate-window",{...this.identity,url:e}).then((()=>{}))}navigateBack(){return this.wire.sendAction("navigate-window-back",{...this.identity}).then((()=>{}))}async navigateForward(){await this.wire.sendAction("navigate-window-forward",{...this.identity})}stopNavigation(){return this.wire.sendAction("stop-window-navigation",{...this.identity}).then((()=>{}))}reload(e=!1){return this.wire.sendAction("reload-window",{ignoreCache:e,...this.identity}).then((()=>{}))}print(e={}){return this.wire.sendAction("print",{...this.identity,options:e}).then((()=>{}))}findInPage(e,t){return this.wire.sendAction("find-in-page",{...this.identity,searchTerm:e,options:t}).then((({payload:e})=>e.data))}stopFindInPage(e){return this.wire.sendAction("stop-find-in-page",{...this.identity,action:e}).then((()=>{}))}getPrinters(){return this.wire.sendAction("get-printers",{...this.identity}).then((({payload:e})=>e.data))}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){await this.wire.sendAction("focus-window",{emitSynthFocused:e,...this.identity})}async showDeveloperTools(){await this.wire.sendAction("show-developer-tools",this.identity)}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction("get-process-info",this.identity);return e}async getSharedWorkers(){return this.wire.sendAction("get-shared-workers",this.identity).then((({payload:e})=>e.data))}async inspectSharedWorker(){await this.wire.sendAction("inspect-shared-worker",{...this.identity})}async inspectSharedWorkerById(e){await this.wire.sendAction("inspect-shared-worker-by-id",{...this.identity,workerId:e})}async inspectServiceWorker(){await this.wire.sendAction("inspect-service-worker",{...this.identity})}async showPopupWindow(e){if(this.wire.sendAction(`${this.entityType}-show-popup-window`,this.identity).catch((()=>{})),e?.onPopupReady){const t=async({popupName:t})=>{try{const n=this.fin.Window.wrapSync({uuid:this.fin.me.uuid,name:t});await e.onPopupReady(n)}catch(e){throw new Error(`Something went wrong during onPopupReady execution: ${e}`)}};await this.once("popup-ready",t)}const{payload:t}=await this.wire.sendAction("try-create-popup-window",{options:{...e,hasResultCallback:!!e?.onPopupResult,hasReadyCallback:!!e?.onPopupReady},...this.identity}),{data:{willOpen:n,options:i}}=t;n&&await this.fin.Window.create(i.initialOptions);if(e?.onPopupResult){const t=async t=>{await e.onPopupResult((e=>{const{name:t,uuid:n,result:i,data:r}=e,o={identity:{name:t,uuid:n},result:i};return r&&(o.data=r),o})(t))},n=async()=>{await this.removeListener("popup-result",t)};await this.on("popup-result",t),await this.once("popup-teardown",n)}const{payload:r}=await this.wire.sendAction("show-popup-window",{options:i,...this.identity});return r.data}}var U,V,z,K,q;function J(){return V||(V=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(function(){if($)return L;$=1,Object.defineProperty(L,"__esModule",{value:!0}),L.ViewModule=void 0;const e=d,t=O,n=J(),i=T;class r extends e.Base{async create(e){const{uuid:t}=this.wire.me;if(!e.name||"string"!=typeof e.name)throw new Error("Please provide a name property as a string in order to create a View.");return(0,i.handleDeprecatedWarnings)(e),this.wire.environment.childViews?await this.wire.environment.createChildContent({entityType:"view",options:{...e,uuid:t}}):await this.wire.sendAction("create-view",{...e,uuid:t}),this.wrapSync({uuid:t,name:e.name})}async wrap(e){this.wire.sendAction("view-wrap").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}wrapSync(e){this.wire.sendAction("view-wrap-sync").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}getCurrent(){if(this.wire.sendAction("view-get-current").catch((e=>{})),!this.wire.me.isView)throw new Error("You are not in a View context");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction("view-get-current-sync").catch((e=>{})),!this.wire.me.isView)throw new Error("You are not in a View context");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return L.ViewModule=r,L}(),e),n(function(){if(U)return B;var e;U=1,Object.defineProperty(B,"__esModule",{value:!0}),B.View=void 0;const t=g,n=G,i=H,r=ie();class o extends i.WebContents{constructor(i,o){super(i,o,"view"),this.identity=o,e.set(this,new n.Lazy((()=>this.fin.Platform.wrapSync(this.identity).getClient()))),this.attach=async e=>{await this.wire.sendAction("attach-view",{target:e,...this.identity})},this.destroy=async()=>{await this.wire.sendAction("destroy-view",{...this.identity})},this.show=async()=>{await this.wire.sendAction("show-view",{...this.identity})},this.showAt=async(e,t={})=>{await this.wire.sendAction("show-view-at",{bounds:e,...this.identity,options:t})},this.bringToFront=async()=>{await this.wire.sendAction("bring-view-to-front",{...this.identity})},this.hide=async()=>{await this.wire.sendAction("hide-view",{...this.identity})},this.setBounds=async e=>{await this.wire.sendAction("set-view-bounds",{bounds:e,...this.identity})},this.getBounds=async()=>(await this.wire.sendAction("get-view-bounds",{...this.identity})).payload.data,this.getInfo=async()=>(await this.wire.sendAction("get-view-info",{...this.identity})).payload.data,this.getParentLayout=async()=>(this.wire.sendAction("view-get-parent-layout",{...this.identity}).catch((()=>{})),this.fin.Platform.Layout.getLayoutByViewIdentity(this.identity)),this.getOptions=async()=>this.wire.sendAction("get-view-options",{...this.identity}).then((({payload:e})=>e.data)),this.updateOptions=async e=>this.wire.sendAction("update-view-options",{options:e,...this.identity}).then((()=>{})),this.getCurrentWindow=async()=>{const{payload:{data:e}}=await this.wire.sendAction("get-view-window",{...this.identity});return new r._Window(this.wire,e)},this.getCurrentStack=async()=>{this.wire.sendAction("view-get-current-stack").catch((()=>{}));try{return(await this.getParentLayout()).getStackByViewIdentity(this.identity)}catch(e){throw new t.RuntimeError({reason:"This view does not belong to a stack.",error:e})}},this.triggerBeforeUnload=async()=>(await this.wire.sendAction("trigger-before-unload",{...this.identity})).payload.data,this.bindToElement=async e=>{if(!e)throw new Error("Element not found.");return this.wire.environment.observeBounds(e,(async e=>this.setBounds(e)))}}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){const t=await this.getCurrentWindow();await t.focusedWebViewWasChanged(),await super.focus({emitSynthFocused:e})}}return B.View=o,e=new WeakMap,B}(),e)}(k)),k}function Y(){if(z)return j;z=1,Object.defineProperty(j,"__esModule",{value:!0}),j.Application=void 0;const e=d,t=ie(),n=J();class i extends e.EmitterBase{constructor(e,n){super(e,"application",n.uuid),this.identity=n,this.window=new t._Window(this.wire,{uuid:this.identity.uuid,name:this.identity.uuid})}windowListFromIdentityList(e){const n=[];return e.forEach((e=>{n.push(new t._Window(this.wire,{uuid:e.uuid,name:e.name}))})),n}isRunning(){return this.wire.sendAction("is-application-running",this.identity).then((({payload:e})=>e.data))}async quit(e=!1){try{await this._close(e),await this.wire.sendAction("destroy-application",{force:e,...this.identity})}catch(e){if(!["Remote connection has closed","Could not locate the requested application"].some((t=>e.message.includes(t))))throw e}}async _close(e=!1){try{await this.wire.sendAction("close-application",{force:e,...this.identity})}catch(e){if(!e.message.includes("Remote connection has closed"))throw e}}close(e=!1){return console.warn("Deprecation Warning: Application.close is deprecated Please use Application.quit"),this.wire.sendAction("application-close",this.identity).catch((e=>{})),this._close(e)}getChildWindows(){return this.wire.sendAction("get-child-windows",this.identity).then((({payload:e})=>{const t=[];return e.data.forEach((e=>{t.push({uuid:this.identity.uuid,name:e})})),this.windowListFromIdentityList(t)}))}getManifest(){return this.wire.sendAction("get-application-manifest",this.identity).then((({payload:e})=>e.data))}getParentUuid(){return this.wire.sendAction("get-parent-application",this.identity).then((({payload:e})=>e.data))}getShortcuts(){return this.wire.sendAction("get-shortcuts",this.identity).then((({payload:e})=>e.data))}async getViews(){const{payload:e}=await this.wire.sendAction("application-get-views",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}getZoomLevel(){return this.wire.sendAction("get-application-zoom-level",this.identity).then((({payload:e})=>e.data))}getWindow(){return this.wire.sendAction("application-get-window",this.identity).catch((e=>{})),Promise.resolve(this.window)}registerUser(e,t){return this.wire.sendAction("register-user",{userName:e,appName:t,...this.identity}).then((()=>{}))}removeTrayIcon(){return this.wire.sendAction("remove-tray-icon",this.identity).then((()=>{}))}restart(){return this.wire.sendAction("restart-application",this.identity).then((()=>{}))}run(){return console.warn("Deprecation Warning: Application.run is deprecated Please use fin.Application.start"),this.wire.sendAction("application-run",this.identity).catch((e=>{})),this._run()}_run(e={}){return this.wire.sendAction("run-application",{manifestUrl:this._manifestUrl,opts:e,...this.identity}).then((()=>{}))}scheduleRestart(){return this.wire.sendAction("relaunch-on-close",this.identity).then((()=>{}))}async sendApplicationLog(){const{payload:e}=await this.wire.sendAction("send-application-log",this.identity);return e.data}async setJumpList(e){await this.wire.sendAction("set-jump-list",{config:e,...this.identity})}setTrayIcon(e){return this.wire.sendAction("set-tray-icon",{enabledIcon:e,...this.identity}).then((()=>{}))}setShortcuts(e){return this.wire.sendAction("set-shortcuts",{data:e,...this.identity}).then((()=>{}))}async setShortcutQueryParams(e){await this.wire.sendAction("set-shortcut-query-args",{data:e,...this.identity})}setZoomLevel(e){return this.wire.sendAction("set-application-zoom-level",{level:e,...this.identity}).then((()=>{}))}async setAppLogUsername(e){await this.wire.sendAction("set-app-log-username",{data:e,...this.identity})}getTrayIconInfo(){return this.wire.sendAction("get-tray-icon-info",this.identity).then((({payload:e})=>e.data))}hasTrayIcon(){return this.wire.sendAction("has-tray-icon",this.identity).then((({payload:e})=>e.data))}terminate(){return this.wire.sendAction("terminate-application",this.identity).then((()=>{}))}wait(){return this.wire.sendAction("wait-for-hung-application",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction("get-info",this.identity).then((({payload:e})=>e.data))}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction("application-get-process-info",this.identity);return e}async setFileDownloadLocation(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t};await this.wire.sendAction("set-file-download-location",{...n,downloadLocation:e})}async getFileDownloadLocation(){const{payload:{data:e}}=await this.wire.sendAction("get-file-download-location",this.identity);return e}async showTrayIconPopupMenu(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t},{payload:i}=await this.wire.sendAction("show-tray-icon-popup-menu",{...n,options:e});return i.data}async closeTrayIconPopupMenu(){const{name:e}=this.wire.me,t={uuid:this.identity.uuid,name:e};await this.wire.sendAction("close-tray-icon-popup-menu",{...t})}}return j.Application=i,j}function Z(){return q||(q=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(function(){if(K)return F;K=1,Object.defineProperty(F,"__esModule",{value:!0}),F.ApplicationModule=void 0;const e=d,t=O,n=Y();class i extends e.Base{async wrap(e){this.wire.sendAction("wrap-application").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}wrapSync(e){this.wire.sendAction("wrap-application-sync").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}async _create(e){return void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&void 0===e.isPlatformController&&(e.autoShow=!0),await this.wire.sendAction("create-application",e),this.wrap({uuid:e.uuid})}create(e){return console.warn("Deprecation Warning: fin.Application.create is deprecated. Please use fin.Application.start"),this.wire.sendAction("application-create").catch((e=>{})),this._create(e)}async start(e){this.wire.sendAction("start-application").catch((e=>{}));const t=await this._create(e);return await this.wire.sendAction("run-application",{uuid:e.uuid}),t}async startManyManifests(e,t){return this.wire.sendAction("run-applications",{applications:e,opts:t}).then((()=>{}))}getCurrent(){return this.wire.sendAction("get-current-application").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction("get-current-application-sync").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}async startFromManifest(e,t){this.wire.sendAction("application-start-from-manifest").catch((e=>{}));const n=await this._createFromManifest(e);return await n._run(t),n}createFromManifest(e){return console.warn("Deprecation Warning: fin.Application.createFromManifest is deprecated. Please use fin.Application.startFromManifest"),this.wire.sendAction("application-create-from-manifest").catch((e=>{})),this._createFromManifest(e)}_createFromManifest(e){return this.wire.sendAction("get-application-manifest",{manifestUrl:e}).then((({payload:e})=>{const t=e.data.platform?e.data.platform.uuid:e.data.startup_app.uuid;return this.wrap({uuid:t})})).then((t=>(t._manifestUrl=e,t)))}}return F.ApplicationModule=i,F}(),e),n(Y(),e)}(R)),R}H.WebContents=D;var Q={};Object.defineProperty(Q,"__esModule",{value:!0}),Q.promisifySubscription=void 0;var X,ee,te;function ne(){if(X)return S;X=1,Object.defineProperty(S,"__esModule",{value:!0}),S._Window=void 0;const e=Z(),t=H,n=J(),i=T,r=Q;class o extends t.WebContents{constructor(e,t){super(e,t,"window")}async createWindow(e){this.wire.sendAction("window-create-window",this.identity).catch((e=>{}));const t=await(0,r.promisifySubscription)(this,"fire-constructor-callback");void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&(e.autoShow=!0),(0,i.handleDeprecatedWarnings)(e);const n=this.wire.environment.createChildContent({entityType:"window",options:e}),[o]=await Promise.all([t.getValue(),n]);let s;const{success:a}=o,c=o.data,{message:d}=c;s=a?{httpResponseCode:c.httpResponseCode,apiInjected:c.apiInjected}:{message:c.message,networkErrorCode:c.networkErrorCode,stack:c.stack};const h={message:d,cbPayload:s,success:a};try{this.getWebWindow().fin.__internal_.openerSuccessCBCalled()}catch(e){}return h.success?this:Promise.reject(h)}getAllFrames(){return this.wire.sendAction("get-all-frames",this.identity).then((({payload:e})=>e.data))}getBounds(){return this.wire.sendAction("get-window-bounds",this.identity).then((({payload:e})=>e.data))}center(){return this.wire.sendAction("center-window",this.identity).then((()=>{}))}blur(){return this.wire.sendAction("blur-window",this.identity).then((()=>{}))}bringToFront(){return this.wire.sendAction("bring-window-to-front",this.identity).then((()=>{}))}animate(e,t){return this.wire.sendAction("animate-window",{transitions:e,options:t,...this.identity}).then((()=>{}))}hide(){return this.wire.sendAction("hide-window",this.identity).then((()=>{}))}close(e=!1){return this.wire.sendAction("close-window",{force:e,...this.identity}).then((()=>{Object.setPrototypeOf(this,null)}))}focusedWebViewWasChanged(){return this.wire.sendAction("focused-webview-changed",this.identity).then((()=>{}))}getNativeId(){return this.wire.sendAction("get-window-native-id",this.identity).then((({payload:e})=>e.data))}async getCurrentViews(){const{payload:e}=await this.wire.sendAction("window-get-views",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}disableFrame(){return console.warn("Function is deprecated; use disableUserMovement instead."),this.wire.sendAction("disable-window-frame",this.identity).then((()=>{}))}disableUserMovement(){return this.wire.sendAction("disable-window-frame",this.identity).then((()=>{}))}enableFrame(){return console.warn("Function is deprecated; use enableUserMovement instead."),this.wire.sendAction("enable-window-frame",this.identity).then((()=>{}))}enableUserMovement(){return this.wire.sendAction("enable-window-frame",this.identity).then((()=>{}))}flash(){return this.wire.sendAction("flash-window",this.identity).then((()=>{}))}stopFlashing(){return this.wire.sendAction("stop-flash-window",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction("get-window-info",this.identity).then((({payload:e})=>e.data))}async getLayout(e){this.wire.sendAction("window-get-layout",this.identity).catch((e=>{}));const t=await this.getOptions();if(!t.layout&&!t.layoutSnapshot)throw new Error("Window does not have a Layout");return this.fin.Platform.Layout.wrap(e??this.identity)}getOptions(){return this.wire.sendAction("get-window-options",this.identity).then((({payload:e})=>e.data))}getParentApplication(){return this.wire.sendAction("window-get-parent-application",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity))}getParentWindow(){return this.wire.sendAction("window-get-parent-window",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity)).then((e=>e.getWindow()))}async getSnapshot(e){const t={area:e,...this.identity};console.warn("Window.getSnapshot has been deprecated, please use Window.capturePage");return(await this.wire.sendAction("get-window-snapshot",t)).payload.data}getState(){return this.wire.sendAction("get-window-state",this.identity).then((({payload:e})=>e.data))}getWebWindow(){return this.wire.sendAction("window-get-web-window",this.identity).catch((e=>{})),this.wire.environment.getWebWindow(this.identity)}isMainWindow(){return this.wire.sendAction("window-is-main-window",this.identity).catch((e=>{})),this.me.uuid===this.me.name}isShowing(){return this.wire.sendAction("is-window-showing",this.identity).then((({payload:e})=>e.data))}maximize(){return this.wire.sendAction("maximize-window",this.identity).then((()=>{}))}minimize(){return this.wire.sendAction("minimize-window",this.identity).then((()=>{}))}moveBy(e,t,n){return this.wire.sendAction("move-window-by",{deltaLeft:e,deltaTop:t,positioningOptions:n,...this.identity}).then((()=>{}))}moveTo(e,t,n){return this.wire.sendAction("move-window",{left:e,top:t,positioningOptions:n,...this.identity}).then((()=>{}))}resizeBy(e,t,n,i){return this.wire.sendAction("resize-window-by",{deltaWidth:Math.floor(e),deltaHeight:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}resizeTo(e,t,n,i){return this.wire.sendAction("resize-window",{width:Math.floor(e),height:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}restore(){return this.wire.sendAction("restore-window",this.identity).then((()=>{}))}setAsForeground(){return this.wire.sendAction("set-foreground-window",this.identity).then((()=>{}))}setBounds(e,t){return this.wire.sendAction("set-window-bounds",{...e,...this.identity,positioningOptions:t}).then((()=>{}))}show(e=!1){return this.wire.sendAction("show-window",{force:e,...this.identity}).then((()=>{}))}showAt(e,t,n=!1){return this.wire.sendAction("show-at-window",{force:n,left:Math.floor(e),top:Math.floor(t),...this.identity}).then((()=>{}))}updateOptions(e){return this.wire.sendAction("update-window-options",{options:e,...this.identity}).then((()=>{}))}authenticate(e,t){return this.wire.sendAction("window-authenticate",{userName:e,password:t,...this.identity}).then((()=>{}))}async showPopupMenu(e){const{payload:t}=await this.wire.sendAction("show-popup-menu",{options:e,...this.identity});return t.data}async closePopupMenu(){return this.wire.sendAction("close-popup-menu",{...this.identity}).then((()=>{}))}async dispatchPopupResult(e){this.wire.sendAction("window-dispatch-popup-result",this.identity).catch((e=>{})),await this.wire.sendAction("dispatch-popup-result",{data:e,...this.identity})}async print(e={content:"self"}){switch(e.content){case void 0:case"self":return super.print(e);case"screenshot":return this.wire.sendAction("print-screenshot",this.identity).then((()=>{}));case"views":return this.wire.sendAction("print-views",{...this.identity,options:e}).then((()=>{}));default:return}}}return S._Window=o,S}function ie(){return te||(te=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(function(){if(ee)return _;ee=1,Object.defineProperty(_,"__esModule",{value:!0}),_._WindowModule=void 0;const e=d,t=O,n=ne();class i extends e.Base{async wrap(e){this.wire.sendAction("window-wrap").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}wrapSync(e){this.wire.sendAction("window-wrap-sync").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}create(e){return this.wire.sendAction("create-window").catch((e=>{})),new n._Window(this.wire,{uuid:this.me.uuid,name:e.name}).createWindow(e)}getCurrent(){if(this.wire.sendAction("get-current-window").catch((e=>{})),!this.wire.me.isWindow)throw new Error("You are not in a Window context");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction("get-current-window-sync").catch((e=>{})),!this.wire.me.isWindow)throw new Error("You are not in a Window context");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return _._WindowModule=i,_}(),e),n(ne(),e)}(M)),M}Q.promisifySubscription=async(e,t,n=(()=>!0),i)=>{let r,o,s;const a=new Promise(((e,t)=>{r=e,o=t})),c=e=>{n(e)&&(clearTimeout(s),r(e))};return await e.on(t,c),i&&(s=setTimeout((()=>o(new Error("event timed out"))),i)),a.finally((()=>{e.removeListener(t,c).catch((()=>null))})),{getValue:()=>a}},Object.defineProperty(c,"__esModule",{value:!0}),c.System=void 0;const re=d,oe=g,se=ie(),ae=t;class ce extends re.EmitterBase{constructor(e){super(e,"system")}sendExternalProcessRequest(e,t){return new Promise(((n,i)=>{const r="external-process-exited";let o,s,a,c;"function"==typeof t.listener&&(a=e=>{const n=e||{};s={topic:"exited",uuid:n.processUuid||"",exitCode:n.exitCode||0},o===e.processUuid&&(t.listener(s),c.removeListener(r,a))},this.wire.me.name||(this.wire.me.name=this.wire.me.uuid),c=new se._Window(this.wire,this.wire.me),c.on(r,a)),this.wire.sendAction(e,t).then((({payload:e})=>{o=e.data.uuid,n(e.data),s&&o===s.uuid&&(t.listener(s),c.removeListener(r,a))})).catch((e=>{c&&c.removeListener(r,a),i(e)}))}))}getVersion(){return this.wire.sendAction("get-version").then((({payload:e})=>e.data))}clearCache(e){return this.wire.sendAction("clear-cache",e).then((()=>{}))}deleteCacheOnExit(){return this.wire.sendAction("delete-cache-request").then((()=>{}))}exit(){return this.wire.sendAction("exit-desktop").then((()=>{}))}async fetchManifest(e){const{payload:{data:t}}=await this.wire.sendAction("fetch-manifest",{manifestUrl:e});return t}flushCookieStore(){return this.wire.sendAction("flush-cookie-store").then((()=>{}))}getAllWindows(){return this.wire.sendAction("get-all-windows").then((({payload:e})=>e.data))}getAllApplications(){return this.wire.sendAction("get-all-applications").then((({payload:e})=>e.data))}getCommandLineArguments(){return this.wire.sendAction("get-command-line-arguments").then((({payload:e})=>e.data))}async getCrashReporterState(){const{payload:{data:{diagnosticMode:e,isRunning:t}}}=await this.wire.sendAction("get-crash-reporter-state");return console.warn("diagnosticMode property is deprecated. It will be removed in a future version"),{diagnosticMode:e,diagnosticsMode:e,isRunning:t}}async startCrashReporter(e){const t=e,n={...t,diagnosticMode:t.diagnosticsMode||t.diagnosticMode},{payload:{data:{diagnosticMode:i,isRunning:r}}}=await this.wire.sendAction("start-crash-reporter",n);return{diagnosticMode:i,diagnosticsMode:i,isRunning:r}}getUniqueUserId(){return this.wire.sendAction("get-unique-user-id").then((({payload:e})=>e.data))}getEntityInfo(e,t){return this.wire.sendAction("get-entity-info",{uuid:e,name:t}).then((({payload:e})=>e.data))}getEnvironmentVariable(e){return this.wire.sendAction("get-environment-variable",{environmentVariables:e}).then((({payload:e})=>e.data))}getFocusedWindow(){return this.wire.sendAction("get-focused-window").then((({payload:e})=>e.data))}async isAppCertified(e){const{payload:{data:{certifiedInfo:t}}}=await this.wire.sendAction("is-app-certified",{manifestUrl:e});return t}getInstalledRuntimes(){return this.wire.sendAction("get-installed-runtimes").then((({payload:e})=>e.data.runtimes))}async getInstalledApps(){const{payload:{data:{installedApps:e}}}=await this.wire.sendAction("get-installed-apps");return e}getLog(e){return this.wire.sendAction("view-log",e).then((({payload:e})=>e.data))}getMachineId(){return this.wire.sendAction("get-machine-id").then((({payload:e})=>e.data))}getMinLogLevel(){return this.wire.sendAction("get-min-log-level").then((({payload:e})=>e.data))}getLogList(){return this.wire.sendAction("list-logs").then((({payload:e})=>e.data))}getMonitorInfo(){return this.wire.sendAction("get-monitor-info").then((({payload:e})=>e.data))}getMousePosition(){return this.wire.sendAction("get-mouse-position").then((({payload:e})=>e.data))}getProcessList(){return console.warn("System.getProcessList has been deprecated. Please consider using our new process APIs: Window.getProcessInfo, View.getProcessInfo, Application.getProcessInfo, System.getAllProcessInfo"),this.wire.sendAction("process-snapshot").then((({payload:e})=>e.data))}async getAllProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction("get-all-process-info",this.identity);return e}getProxySettings(){return this.wire.sendAction("get-proxy-settings").then((({payload:e})=>e.data))}getRuntimeInfo(){return this.wire.sendAction("get-runtime-info").then((({payload:e})=>e.data))}getRvmInfo(){return this.wire.sendAction("get-rvm-info").then((({payload:e})=>e.data))}getHostSpecs(){return this.wire.sendAction("get-host-specs").then((({payload:e})=>e.data))}getOSInfo(){return this.wire.sendAction("get-os-info").then((({payload:e})=>e.data))}launchExternalProcess(e){return this.sendExternalProcessRequest("launch-external-process",e)}monitorExternalProcess(e){return this.sendExternalProcessRequest("monitor-external-process",e)}log(e,t){return this.wire.sendAction("write-to-log",{level:e,message:t}).then((()=>{}))}openUrlWithBrowser(e){return this.wire.sendAction("open-url-with-browser",{url:e}).then((()=>{}))}async registerCustomProtocol(e){if("object"!=typeof e)throw new Error("Must provide an object with a `protocolName` property having a string value.");await this.wire.sendAction("register-custom-protocol",e)}async unregisterCustomProtocol(e){await this.wire.sendAction("unregister-custom-protocol",{protocolName:e})}async getCustomProtocolState(e){return this.wire.sendAction("get-custom-protocol-state",{protocolName:e}).then((({payload:e})=>e.data))}releaseExternalProcess(e){return this.wire.sendAction("release-external-process",{uuid:e}).then((()=>{}))}showDeveloperTools(e){return this.wire.sendAction("show-developer-tools",e).then((()=>{}))}terminateExternalProcess(e){return this.wire.sendAction("terminate-external-process",e).then((()=>{}))}updateProxySettings(e){return this.wire.sendAction("update-proxy",e).then((()=>{}))}async downloadAsset(e,t){const n=()=>{};let i=n,r=n;const o=new Promise(((e,t)=>{i=e,r=t}));if("openfin"!==this.wire.environment.type)throw new oe.NotSupportedError("downloadAsset only supported in an OpenFin Render process");const s=oe.RuntimeError.getCallSite(),a=this.wire.environment.getNextMessageId().toString(),c=`asset-download-progress-${a}`,d=`asset-download-error-${a}`,h=`asset-download-complete-${a}`,l=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},u=()=>{this.removeListener(c,l)};await Promise.all([this.on(c,l),this.once(d,(e=>{u();const{reason:t,err:n}=e;r(new oe.RuntimeError({reason:t,error:n},s))})),this.once(h,(()=>{u(),i()}))]);const p=Object.assign(e,{downloadId:a});return await this.wire.sendAction("download-asset",p).catch((e=>{throw u(),e})),o}downloadRuntime(e,t){const n=oe.RuntimeError.getCallSite();return new Promise(((i,r)=>{if("openfin"!==this.wire.environment.type)return void r(new oe.NotSupportedError("downloadRuntime only supported in an OpenFin Render process"));const o=this.wire.environment.getNextMessageId().toString(),s=`runtime-download-progress-${o}`,a=`runtime-download-error-${o}`,c=`runtime-download-complete-${o}`,d=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},h=()=>{this.removeListener(s,d)};this.on(s,d),this.once(a,(e=>{h();const{reason:t,err:i}=e;r(new oe.RuntimeError({reason:t,error:i},n))})),this.once(c,(()=>{h(),i()}));const l=Object.assign(e,{downloadId:o});this.wire.sendAction("download-runtime",l).catch((e=>{h(),r(e)}))}))}downloadPreloadScripts(e){return this.wire.sendAction("download-preload-scripts",{scripts:e}).then((({payload:e})=>e.data))}getAllExternalApplications(){return this.wire.sendAction("get-all-external-applications").then((({payload:e})=>e.data))}getAppAssetInfo(e){return this.wire.sendAction("get-app-asset-info",e).then((({payload:e})=>e.data))}getCookies(e){const t=this.wire.environment.getUrl(),n=Object.assign(e,{url:t});return this.wire.sendAction("get-cookies",n).then((({payload:e})=>e.data))}setMinLogLevel(e){return this.wire.sendAction("set-min-log-level",{level:e}).then((()=>{}))}resolveUuid(e){return this.wire.sendAction("resolve-uuid",{entityKey:e}).then((({payload:e})=>e.data))}executeOnRemote(e,t){return t.requestingIdentity=e,this.wire.ferryAction(t)}readRegistryValue(e,t,n){return this.wire.sendAction("read-registry-value",{rootKey:e,subkey:t,value:n}).then((({payload:e})=>e.data))}registerExternalConnection(e){return this.wire.sendAction("register-external-connection",{uuid:e}).then((({payload:e})=>e.data))}async getServiceConfiguration(e){if("string"!=typeof e.name)throw new Error("Must provide an object with a `name` property having a string value");const{name:t}=e;return this.wire.sendAction("get-service-configuration",{name:t}).then((({payload:e})=>e.data))}async getSystemAppConfig(e){if("string"!=typeof e)throw new Error("Must provide a string value for name of system app");return this.wire.sendAction("get-system-app-configuration",{name:e}).then((({payload:e})=>e.data))}async registerShutdownHandler(e){this.wire.sendAction("system-register-shutdown-handler").catch((e=>{}));const{uuid:t,name:n}=this.wire.me;this.on("system-shutdown",(i=>{e({proceed:()=>{this.wire.environment.raiseEvent("application/system-shutdown-handled",{uuid:t,name:n,topic:"application"})}})}))}runRvmHealthCheck(){return this.wire.sendAction("run-rvm-health-check").then((({payload:e})=>e.data))}async launchManifest(e,t={}){const{subscribe:n,...i}=t,r=i;if(n){const e=new ae.EventEmitter;n(e);const t="app-version-progress",i="runtime-status",o="app-version-complete",s="app-version-error",a=this.wire.environment.getNextMessageId().toString();r.appVersionId=a;const c=[o,t,i,s],d=e=>{const{appVersionId:t,topic:n,type:i,...r}=e;return{...r,type:c.find((e=>i.includes(e)))}},h=t=>{const n=d(t);e.emit(n.type,n)},l=()=>{this.removeListener(`${t}.${a}`,h),this.removeListener(`${i}.${a}`,h),this.removeListener(`${o}.${a}`,h),this.removeListener(`${s}.${a}`,h),this.removeListener(`${o}.${a}`,l),this.removeListener(`${s}.${a}`,l)};await Promise.all([this.on(`${t}.${a}`,h),this.on(`${i}.${a}`,h),this.once(`${o}.${a}`,h),this.once(`${s}.${a}`,h),this.once(`${o}.${a}`,l),this.once(`${s}.${a}`,l)])}return(await this.wire.sendAction("launch-manifest",{manifestUrl:e,opts:r})).payload.data.manifest}async queryPermissionForCurrentContext(e){const t={uuid:this.wire.me.uuid,name:this.wire.me.name};return(await this.wire.sendAction("query-permission-for-current-context",{apiName:e,identity:t})).payload.data}async enableNativeWindowIntegrationProvider(e){const{payload:t}=await this.wire.sendAction("enable-native-window-integration-provider",{permissions:e});return t.data}async registerUsage({data:e,type:t}){await this.wire.sendAction("register-usage",{data:e,type:t})}async getPrinters(){const{payload:e}=await this.wire.sendAction("system-get-printers");return e.data}async updateProcessLoggingOptions(e){await this.wire.sendAction("system-update-process-logging-options",{options:e})}async getDomainSettings(){const{payload:{data:e}}=await this.wire.sendAction("get-domain-settings",this.identity);return e}async setDomainSettings(e){await this.wire.sendAction("set-domain-settings",{domainSettings:e,...this.identity})}async refreshExtensions(){const{payload:e}=await this.wire.sendAction("refresh-extensions");return e.data}async getInstalledExtensions(){const{payload:e}=await this.wire.sendAction("get-installed-extensions");return e.data}}c.System=ce;var de={},he={};Object.defineProperty(he,"__esModule",{value:!0}),he.RefCounter=void 0;he.RefCounter=class{constructor(){this.topicRefMap=new Map}incRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t+1;n=i,this.topicRefMap.set(e,i)}else this.topicRefMap.set(e,1),n=1;return n}decRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t-1;this.topicRefMap.set(e,i),n=i}else n=-1;return n}actOnFirst(e,t,n){return 1===this.incRefCount(e)?t():n()}actOnLast(e,t,n){return 0===this.decRefCount(e)?t():n()}};var le={},ue={},pe={};Object.defineProperty(pe,"__esModule",{value:!0}),pe.ChannelBase=pe.ProtectedItems=void 0;const we=e=>async(t,n,i)=>{const r=await e(t,n,i);return void 0===r?n:r};pe.ProtectedItems=class{constructor(e,t){this.providerIdentity=e,this.close=t}};class ye{static defaultAction(e){throw new Error(`No action registered at target for ${e}`)}constructor(){this.subscriptions=new Map}async processAction(e,t,n){try{const i=this.subscriptions.has(e)?this.subscriptions.get(e):(t,n)=>(this.defaultAction??ye.defaultAction)(e,t,n),r=this.preAction?await this.preAction(e,t,n):t,o=await i(r,n);return this.postAction?await this.postAction(e,o,n):o}catch(t){if(this.errorMiddleware)return this.errorMiddleware(e,t,n);throw t}}beforeAction(e){if(this.preAction)throw new Error("Already registered beforeAction middleware");this.preAction=we(e)}onError(e){if(this.errorMiddleware)throw new Error("Already registered error middleware");this.errorMiddleware=e}afterAction(e){if(this.postAction)throw new Error("Already registered afterAction middleware");this.postAction=we(e)}remove(e){this.subscriptions.delete(e)}setDefaultAction(e){if(this.defaultAction)throw new Error("default action can only be set once");this.defaultAction=e}register(e,t){if(this.subscriptions.has(e))throw new Error(`Subscription already registered for action: ${e}. Unsubscribe before adding new subscription`);return this.subscriptions.set(e,t),!0}}pe.ChannelBase=ye;var fe,ge,me,ve=s&&s.__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)},Ce=s&&s.__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};Object.defineProperty(ue,"__esModule",{value:!0}),ue.ChannelClient=void 0;const be=pe,Ie=new Map;class Ee extends be.ChannelBase{static closeChannelByEndpointId(e){const t=Ie.get(e);t&&ve(t,me,"f").call(t)}static handleProviderDisconnect(e){for(const t of Ie.values())t.providerIdentity.channelId===e.channelId&&(t.disconnectListener(e),ve(t,me,"f").call(t))}constructor(e,t,n){super(),fe.set(this,void 0),ge.set(this,void 0),this.processAction=(e,t,n)=>super.processAction(e,t,n),me.set(this,(()=>{Ie.delete(this.endpointId),ve(this,ge,"f").close()})),Ce(this,fe,new be.ProtectedItems(e,t),"f"),this.disconnectListener=()=>{},this.endpointId=e.endpointId,Ce(this,ge,n,"f"),Ie.set(this.endpointId,this),n.receive(this.processAction)}get providerIdentity(){return ve(this,fe,"f").providerIdentity}async dispatch(e,t){if(ve(this,ge,"f").isEndpointConnected(this.providerIdentity.channelId))return ve(this,ge,"f").send(this.providerIdentity.channelId,e,t);throw new Error("The client you are trying to dispatch from is disconnected from the target provider.")}onDisconnection(e){this.disconnectListener=t=>{try{e(t)}catch(e){throw new Error(`Error while calling the onDisconnection callback: ${e.message}`)}finally{this.disconnectListener=()=>{}}}}async disconnect(){await this.sendDisconnectAction(),ve(this,me,"f").call(this)}async sendDisconnectAction(){const e=ve(this,fe,"f");await e.close()}static async wireClose(e,t,n){const{channelName:i,uuid:r,name:o}=t;await e.sendAction("disconnect-from-channel",{channelName:i,uuid:r,name:o,endpointId:n})}}ue.ChannelClient=Ee,fe=new WeakMap,ge=new WeakMap,me=new WeakMap;var xe={},Ae={};Object.defineProperty(Ae,"__esModule",{value:!0}),Ae.exhaustiveCheck=void 0,Ae.exhaustiveCheck=function(e,t){throw new Error(`Unsupported value: ${e}${t?`\n Supported values are: ${t.join("")}`:""}`)};var Pe,Me,_e,Oe={},Se=s&&s.__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},Re=s&&s.__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)};Object.defineProperty(Oe,"__esModule",{value:!0}),Oe.ClassicInfo=Oe.ClassicStrategy=void 0;Oe.ClassicStrategy=class{constructor(e,t,n,i){this.messageReceiver=t,this.endpointId=n,this.providerIdentity=i,Pe.set(this,void 0),Me.set(this,new Map),_e.set(this,new Map),this.send=async(e,t,n)=>{const i=Re(this,Me,"f").get(e);if(!i)throw new Error(`Could not locate routing info for endpoint ${e}`);const r={...i};r.isLocalEndpointId&&delete r.endpointId,delete r.isLocalEndpointId;const o=Re(this,Pe,"f").sendAction("send-channel-message",{...r,providerIdentity:this.providerIdentity,action:t,payload:n});Re(this,_e,"f").get(e)?.add(o);return(await o.catch((e=>{throw new Error(e.message)})).finally((()=>{Re(this,_e,"f").get(e)?.delete(o)}))).payload.data.result},this.close=async()=>{this.messageReceiver.removeEndpoint(this.providerIdentity.channelId,this.endpointId),[...Re(this,Me,"f").keys()].forEach((e=>this.closeEndpoint(e))),Se(this,Me,new Map,"f")},Se(this,Pe,e,"f")}onEndpointDisconnect(e,t){}receive(e){this.messageReceiver.addEndpoint(e,this.providerIdentity.channelId,this.endpointId)}async closeEndpoint(e){const t=Re(this,Me,"f").get(e);Re(this,Me,"f").delete(e);const n=Re(this,_e,"f").get(e);n?.forEach((n=>{const i=`Channel connection with identity uuid: ${t?.uuid} / name: ${t?.name} / endpointId: ${e} no longer connected.`;n.cancel(new Error(i))}))}isEndpointConnected(e){return Re(this,Me,"f").has(e)}addEndpoint(e,t){Re(this,Me,"f").set(e,t.endpointIdentity),Re(this,_e,"f").set(e,new Set)}isValidEndpointPayload(e){return"string"==typeof e?.endpointIdentity?.endpointId||"string"==typeof e?.endpointIdentity?.channelId}},Pe=new WeakMap,Me=new WeakMap,_e=new WeakMap,Oe.ClassicInfo={version:5,minimumVersion:0,type:"classic"};var Fe={},je={},ke={};Object.defineProperty(ke,"__esModule",{value:!0}),ke.errorToPOJO=void 0,ke.errorToPOJO=function(e){return{stack:e.stack,name:e.name,message:e.message,toString:()=>e.stack||e.toString()}};var Le,Te,$e=s&&s.__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)},Be=s&&s.__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};Object.defineProperty(je,"__esModule",{value:!0}),je.RTCEndpoint=void 0;const Ge=ke;je.RTCEndpoint=class{static isValidEndpointPayload(e){const t=e=>"object"==typeof e&&null!==e;return t(e)&&t(e.endpointIdentity)&&t(e.rtc)&&"string"==typeof e.endpointIdentity.endpointId}constructor({rtc:e,endpointIdentity:t}){this.responseMap=new Map,Le.set(this,null),Te.set(this,void 0),this.connectionStateChangeHandler=e=>{"connected"!==this.rtc.rtcClient.connectionState&&(this.rtc.rtcClient.removeEventListener("connectionstatechange",this.connectionStateChangeHandler),this.close(),$e(this,Te,"f")&&$e(this,Te,"f").call(this))},this.send=async(e,t)=>{const n=`message-${Math.random()}`,i=new Promise(((e,t)=>{this.responseMap.set(n,{resolve:e,reject:t})}));return this.rtc.channels.request.send(JSON.stringify({action:e,payload:t,messageId:n})),i},this.close=()=>{this.responseMap.forEach((e=>e.reject("Connection has closed."))),this.responseMap=new Map,this.rtc.channels.request.close(),this.rtc.channels.response.close(),this.rtc.rtcClient.close()},this.rtc=e,this.endpointIdentity=t,this.rtc.channels.response.addEventListener("message",(e=>{let{data:t}=e;e.data instanceof ArrayBuffer&&(t=(new TextDecoder).decode(e.data));const{messageId:n,payload:i,success:r,error:o}=JSON.parse(t),{resolve:s,reject:a}=this.responseMap.get(n)??{};s&&a?(this.responseMap.delete(n),r?s(i):a(o)):(console.log("Could not find id in responseMap."),console.log(e))})),this.rtc.channels.request.addEventListener("message",(async e=>{let{data:n}=e;e.data instanceof ArrayBuffer&&(n=(new TextDecoder).decode(e.data));const{messageId:i,action:r,payload:o}=JSON.parse(n);if($e(this,Le,"f"))try{const e=await $e(this,Le,"f").call(this,r,o,t);this.rtc.channels.response.send(JSON.stringify({messageId:i,payload:e,success:!0}))}catch(e){"open"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,error:(0,Ge.errorToPOJO)(e),success:!1}))}else"open"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,success:!1,error:"Connection not ready."}))})),this.rtc.rtcClient.addEventListener("connectionstatechange",this.connectionStateChangeHandler),Object.values(this.rtc.channels).forEach((e=>{e.onclose=e=>{[...this.responseMap.values()].forEach((e=>e.reject(new Error("RTCDataChannel closed unexpectedly, this is most commonly caused by message size. Note: RTC Channels have a message size limit of ~255kB.")))),this.close(),$e(this,Te,"f")&&$e(this,Te,"f").call(this)}}))}onDisconnect(e){if($e(this,Te,"f"))throw new Error("RTCEndpoint disconnectListener cannot be set twice.");Be(this,Te,e,"f")}receive(e){if($e(this,Le,"f"))throw new Error("You have already set a listener for this RTC Endpoint.");Be(this,Le,e,"f")}get connected(){return"connected"===this.rtc.rtcClient.connectionState}},Le=new WeakMap,Te=new WeakMap;var We,He,Ne,De={},Ue=s&&s.__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)},Ve=s&&s.__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};Object.defineProperty(De,"__esModule",{value:!0}),De.EndpointStrategy=void 0;De.EndpointStrategy=class{constructor(e,t,n){this.EndpointType=e,this.StrategyName=n,We.set(this,null),He.set(this,new Map),Ne.set(this,!0),this.send=async(e,t,n)=>this.getEndpointById(e).send(t,n),this.close=async()=>{Ue(this,Ne,"f")&&(Ue(this,He,"f").forEach((e=>e.close())),Ve(this,He,new Map,"f")),Ve(this,Ne,!1,"f")},this.isValidEndpointPayload=t}onEndpointDisconnect(e,t){this.getEndpointById(e).onDisconnect(t)}receive(e){if(Ue(this,We,"f"))throw new Error(`You have already set a listener for this ${this.StrategyName} Strategy`);Ve(this,We,e,"f"),Ue(this,He,"f").forEach((e=>e.receive(Ue(this,We,"f"))))}getEndpointById(e){const t=Ue(this,He,"f").get(e);if(!t)throw new Error(`Client with endpoint id ${e} is not connected`);return t}get connected(){return Ue(this,Ne,"f")}isEndpointConnected(e){return Ue(this,He,"f").has(e)}addEndpoint(e,t){if(!Ue(this,Ne,"f"))return void console.warn(`Adding endpoint to disconnected ${this.StrategyName} Strategy`);const n=new this.EndpointType(t);Ue(this,We,"f")&&n.receive(Ue(this,We,"f")),Ue(this,He,"f").set(e,n)}async closeEndpoint(e){Ue(this,He,"f").delete(e)}},We=new WeakMap,He=new WeakMap,Ne=new WeakMap,Object.defineProperty(Fe,"__esModule",{value:!0}),Fe.RTCInfo=Fe.RTCStrategy=void 0;const ze=je,Ke=De;class qe extends Ke.EndpointStrategy{constructor(){super(ze.RTCEndpoint,ze.RTCEndpoint.isValidEndpointPayload,"RTC")}}Fe.RTCStrategy=qe,Fe.RTCInfo={version:2,minimumVersion:0,type:"rtc"};var Je={};Object.defineProperty(Je,"__esModule",{value:!0}),Je.RTCICEManager=void 0;const Ye=d;class Ze extends Ye.EmitterBase{constructor(e){super(e,"channel"),this.ensureChannelOpened=e=>new Promise(((t,n)=>{if("open"===e.readyState)t();else if("connecting"===e.readyState){const n=()=>{e.removeEventListener("open",n),t()};e.addEventListener("open",n)}else n(new Error("This Channel has already closed"))}))}static createDataChannelPromise(e,t){let n;const i=new Promise((e=>{n=e})),r=i=>{const o=()=>{i.channel.removeEventListener("open",o),n(i.channel)};i.channel.label===e&&(i.channel.addEventListener("open",o),t.removeEventListener("datachannel",r))};return t.addEventListener("datachannel",r),i}async listenForProviderIce(e,t){await this.on(this.createProviderEventName(e),t,{timestamp:Date.now()})}async raiseProviderIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createProviderEventName(e)),t)}async listenForClientIce(e,t){await this.on(this.createClientEventName(e),t,{timestamp:Date.now()})}async raiseClientIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createClientEventName(e)),t)}cleanupIceListeners(e){this.removeAllListeners(this.createClientEventName(e)),this.removeAllListeners(this.createProviderEventName(e))}createClientEventName(e){return`ice-client-${e}`}createProviderEventName(e){return`ice-provider-${e}`}createRouteString(e){return`channel/${e}`}createRtcPeer(){return this.wire.environment.getRtcPeer()}async startClientOffer(){const e=Math.random().toString(),t=this.createRtcPeer();t.addEventListener("icecandidate",(async t=>{t.candidate&&await this.raiseClientIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForProviderIce(e,(async e=>{await t.addIceCandidate(e.candidate)}));const n={request:t.createDataChannel("request"),response:t.createDataChannel("response")},i=await t.createOffer();await t.setLocalDescription(i);const r=Promise.all([n.request,n.response].map(this.ensureChannelOpened)).then((()=>{}));return{rtcClient:t,channels:n,offer:i,rtcConnectionId:e,channelsOpened:r}}async finishClientOffer(e,t,n){return await e.setRemoteDescription(t),await n,!0}async createProviderAnswer(e,t){const n=this.createRtcPeer(),i=Ze.createDataChannelPromise("request",n),r=Ze.createDataChannelPromise("response",n);n.addEventListener("icecandidate",(async t=>{t.candidate&&await this.raiseProviderIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForClientIce(e,(async e=>{await n.addIceCandidate(e.candidate)})),await n.setRemoteDescription(t);const o=await n.createAnswer();await n.setLocalDescription(o);const s=Promise.all([i,r]).then((([t,n])=>(this.cleanupIceListeners(e),{request:t,response:n})));return{rtcClient:n,answer:o,channels:s}}}Je.RTCICEManager=Ze;var Qe={},Xe={};function et(e){return[...e.split(".").reverse().entries()].reduce(((e,[t,n])=>e+ +n*1e4**t),0)}function tt(e,t){return et(e)>=et(t)}function nt(e){return e.split("/")[0]}Object.defineProperty(Xe,"__esModule",{value:!0}),Xe.runtimeUuidMeetsMinimumRuntimeVersion=Xe.parseRuntimeUuid=Xe.meetsMinimumRuntimeVersion=void 0,Xe.meetsMinimumRuntimeVersion=tt,Xe.parseRuntimeUuid=nt,Xe.runtimeUuidMeetsMinimumRuntimeVersion=function(e,t){return tt(nt(e),t)};var it,rt,ot,st,at,ct=s&&s.__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)},dt=s&&s.__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};Object.defineProperty(Qe,"__esModule",{value:!0}),Qe.ChannelProvider=void 0;const ht=pe,lt=Xe;class ut extends ht.ChannelBase{get connections(){return[...ct(this,it,"f")]}static handleClientDisconnection(e,t){const n=e.connections.find((e=>e.endpointId===t.endpointId));if(n)ct(e,st,"f").call(e,n);else{e.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name)).forEach(ct(e,st,"f"))}e.disconnectListener(t)}static setProviderRemoval(e,t){ut.removalMap.set(e,t)}constructor(e,t,n){super(),it.set(this,void 0),rt.set(this,void 0),ot.set(this,void 0),st.set(this,(e=>{const t=this.connections.filter((t=>t.endpointId!==e.endpointId));ct(this,ot,"f").closeEndpoint(e.endpointId),dt(this,it,t,"f")})),this.processAction=async(e,t,n)=>(ut.clientIsMultiRuntime(n)&&!(0,lt.runtimeUuidMeetsMinimumRuntimeVersion)(n.runtimeUuid,"18.87.56.0")?this.handleMultiRuntimeLegacyClient(n):this.checkForClientConnection(n),super.processAction(e,t,n)),at.set(this,(()=>{ct(this,ot,"f").close();const e=ut.removalMap.get(this);e&&e()})),dt(this,rt,new ht.ProtectedItems(e,t),"f"),this.connectListener=()=>{},this.disconnectListener=()=>{},dt(this,it,[],"f"),dt(this,ot,n,"f"),n.receive(this.processAction)}dispatch(e,t,n){const i=e.endpointId??this.getEndpointIdForOpenFinId(e,t);return i&&ct(this,ot,"f").isEndpointConnected(i)?ct(this,ot,"f").send(i,t,n):Promise.reject(new Error(`Client connection with identity uuid: ${e.uuid} / name: ${e.name} / endpointId: ${i} no longer connected.`))}async processConnection(e,t){return ct(this,it,"f").push(e),this.connectListener(e,t)}publish(e,t){return this.connections.map((n=>ct(this,ot,"f").send(n.endpointId,e,t)))}onConnection(e){this.connectListener=e}onDisconnection(e){this.disconnectListener=e}async destroy(){const e=ct(this,rt,"f");e.providerIdentity,dt(this,it,[],"f"),await e.close(),ct(this,at,"f").call(this)}async getAllClientInfo(){return this.connections.map((e=>{const{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}=e;return{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}}))}checkForClientConnection(e){if(!this.isClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider.\n Client Identity: {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}isClientConnected(e){return ut.clientIdentityIncludesEndpointId(e)?this.connections.some((t=>t.endpointId===e.endpointId&&t.uuid===e.uuid&&t.name===e.name)):this.isLegacyClientConnected(e)}isLegacyClientConnected(e){return this.connections.some((t=>t.uuid===e.uuid&&t.name===e.name))}handleMultiRuntimeLegacyClient(e){if(!this.isLegacyClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider. Client Identity:\n {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}getEndpointIdForOpenFinId(e,t){const n=this.connections.filter((t=>t.name===e.name&&t.uuid===e.uuid));if(n.length>=2){const n=ct(this,rt,"f"),{uuid:i,name:r}=e,o=n?.providerIdentity.uuid,s=n?.providerIdentity.name;console.warn(`WARNING: Dispatch call may have unintended results. The "to" argument of your dispatch call is missing the\n "endpointId" parameter. The identity you are dispatching to ({uuid: ${i}, name: ${r}})\n has multiple channelClients for this channel. Your dispatched action: (${t}) from the provider:\n ({uuid: ${o}, name: ${s}}) will only be processed by the most recently-created client.`)}return n.pop()?.endpointId}static clientIdentityIncludesEndpointId(e){return void 0!==e.endpointId}static clientIsMultiRuntime(e){return void 0!==e.runtimeUuid}static async wireClose(e,t){await e.sendAction("destroy-channel",{channelName:t})}}Qe.ChannelProvider=ut,it=new WeakMap,rt=new WeakMap,ot=new WeakMap,st=new WeakMap,at=new WeakMap,ut.removalMap=new WeakMap;var pt={};Object.defineProperty(pt,"__esModule",{value:!0}),pt.MessageReceiver=void 0;const wt=ue,yt=d;class ft extends yt.Base{constructor(e){super(e),this.onmessage=e=>"process-channel-message"===e.action&&(this.processChannelMessage(e),!0),this.endpointMap=new Map,this.latestEndpointIdByChannelId=new Map,e.registerMessageHandler(this.onmessage.bind(this))}async processChannelMessage(e){const{senderIdentity:t,providerIdentity:n,action:i,ackToSender:r,payload:o,intendedTargetIdentity:s}=e.payload,a=s.channelId??s.endpointId??this.latestEndpointIdByChannelId.get(n.channelId),c=this.endpointMap.get(a);if(!c)return r.payload.success=!1,r.payload.reason=`Client connection with identity uuid: ${this.wire.me.uuid} / name: ${this.wire.me.name} / endpointId: ${a} no longer connected.`,this.wire.sendRaw(r);try{const e=await c(i,o,t);return r.payload.payload=r.payload.payload||{},r.payload.payload.result=e,this.wire.sendRaw(r)}catch(e){return r.payload.success=!1,r.payload.reason=e.message,this.wire.sendRaw(r)}}addEndpoint(e,t,n){this.endpointMap.set(n,e),t!==n&&this.latestEndpointIdByChannelId.set(t,n)}removeEndpoint(e,t){this.endpointMap.delete(t),this.latestEndpointIdByChannelId.get(e)===t&&this.latestEndpointIdByChannelId.delete(e)}checkForPreviousClientConnection(e){const t=this.latestEndpointIdByChannelId.get(e);t&&(wt.ChannelClient.closeChannelByEndpointId(t),console.warn("You have created a second connection to an older provider. First connection has been removed from the clientMap"),console.warn("If the provider calls publish(), you may receive multiple messages."))}}pt.MessageReceiver=ft;var gt={};Object.defineProperty(gt,"__esModule",{value:!0}),gt.ProtocolManager=void 0;gt.ProtocolManager=class{constructor(e){this.ProtocolsInPreferenceOrder=e,this.DefaultClientProtocols=["classic"],this.DefaultProviderProtocols=["classic"],this.getClientProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultClientProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(", ")}.`);return t},this.getProviderProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultProviderProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(", ")}.`);return t},this.getCompatibleProtocols=(e,t)=>t.supportedProtocols.filter((t=>e.some((e=>e.type===t.type&&t.version>=e.minimumVersion&&e.version>=(t.minimumVersion??0))))).slice(0,t.maxProtocols)}};var mt={};Object.defineProperty(mt,"__esModule",{value:!0});class vt{static combine(e,t){return new vt(e,t)}constructor(e,t){this.primary=e,this.secondary=t}onEndpointDisconnect(e,t){this.primary.onEndpointDisconnect(e,(()=>{this.secondary.isEndpointConnected(e)||t()})),this.secondary.onEndpointDisconnect(e,(()=>{this.primary.isEndpointConnected(e)||t()}))}isValidEndpointPayload(e){return this.primary.isValidEndpointPayload(e)||this.secondary.isValidEndpointPayload(e)}async closeEndpoint(e){await this.primary.closeEndpoint(e),await this.secondary.closeEndpoint(e)}isEndpointConnected(e){return this.primary.isEndpointConnected(e)||this.secondary.isEndpointConnected(e)}async addEndpoint(e,t){this.primary.isValidEndpointPayload(t)&&await this.primary.addEndpoint(e,t),this.secondary.isValidEndpointPayload(t)&&await this.secondary.addEndpoint(e,t)}receive(e){this.primary.receive(e),this.secondary.receive(e)}send(e,t,n){return this.primary.isEndpointConnected(e)?this.primary.send(e,t,n):this.secondary.send(e,t,n)}async close(){await Promise.all([this.primary.close(),this.secondary.close()])}}mt.default=vt;var Ct,bt,It=s&&s.__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},Et=s&&s.__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)},xt=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(xe,"__esModule",{value:!0}),xe.ConnectionManager=void 0;const At=Ae,Pt=d,Mt=Oe,_t=Fe,Ot=Je,St=Qe,Rt=pt,Ft=gt,jt=xt(mt);class kt extends Pt.Base{static getProtocolOptionsFromStrings(e){return e.map((e=>{switch(e){case"rtc":return _t.RTCInfo;case"classic":return Mt.ClassicInfo;default:return(0,At.exhaustiveCheck)(e,["rtc","classic"])}}))}constructor(e){super(e),Ct.set(this,void 0),bt.set(this,void 0),this.removeChannelFromProviderMap=e=>{this.providerMap.delete(e)},this.onmessage=e=>"process-channel-connection"===e.action&&(this.processChannelConnection(e),!0),this.providerMap=new Map,this.protocolManager=new Ft.ProtocolManager("node"===this.wire.environment.type?["classic"]:["rtc","classic"]),It(this,Ct,new Rt.MessageReceiver(e),"f"),It(this,bt,new Ot.RTCICEManager(e),"f"),e.registerMessageHandler(this.onmessage.bind(this))}createProvider(e,t){const n=Object.assign(this.wire.environment.getDefaultChannelOptions().create,e||{}),i=this.protocolManager.getProviderProtocols(n?.protocols),r=i.map((e=>{switch(e){case"rtc":return new _t.RTCStrategy;case"classic":return new Mt.ClassicStrategy(this.wire,Et(this,Ct,"f"),t.channelId,t);default:return(0,At.exhaustiveCheck)(e,["rtc","classic"])}}));let o;if(2===r.length){const[e,t]=r;o=jt.default.combine(e,t)}else{if(1!==r.length)throw new Error("failed to combine strategies");[o]=r}const s=new St.ChannelProvider(t,(()=>St.ChannelProvider.wireClose(this.wire,t.channelName)),o),a=t.channelId;return this.providerMap.set(a,{provider:s,strategy:o,supportedProtocols:kt.getProtocolOptionsFromStrings(i)}),St.ChannelProvider.setProviderRemoval(s,this.removeChannelFromProviderMap.bind(this)),s}async createClientOffer(e){const t=this.protocolManager.getClientProtocols(e?.protocols);let n;return{offer:{supportedProtocols:await Promise.all(t.map((async e=>{switch(e){case"rtc":{const{rtcClient:e,channels:t,offer:i,rtcConnectionId:r,channelsOpened:o}=await Et(this,bt,"f").startClientOffer();return n={rtcClient:e,channels:t,channelsOpened:o},{type:"rtc",version:_t.RTCInfo.version,payload:{offer:i,rtcConnectionId:r}}}case"classic":return{type:"classic",version:Mt.ClassicInfo.version};default:return(0,At.exhaustiveCheck)(e,["rtc","classic"])}}))),maxProtocols:2},rtc:n}}async createClientStrategy(e,t){t.endpointId||(t.endpointId=this.wire.environment.getNextMessageId(),Et(this,Ct,"f").checkForPreviousClientConnection(t.channelId));const n=t.answer??{supportedProtocols:[{type:"classic",version:1}]},i=(await Promise.all(n.supportedProtocols.map((async n=>"rtc"===n.type&&e?(await Et(this,bt,"f").finishClientOffer(e.rtcClient,n.payload.answer,e.channelsOpened),new _t.RTCStrategy):"classic"===n.type?new Mt.ClassicStrategy(this.wire,Et(this,Ct,"f"),t.endpointId,t):null)))).filter((e=>null!==e));let r;if(e&&!i.some((e=>e instanceof _t.RTCStrategy))&&e&&e.rtcClient.close(),i.length>=2)r=jt.default.combine(i[0],i[1]);else{if(!i.length)throw new Error("No compatible protocols");[r]=i}const o={endpointIdentity:t,rtc:e};return r.addEndpoint(t.channelId,o),r}async processChannelConnection(e){const{clientIdentity:t,providerIdentity:n,ackToSender:i,payload:r,offer:o}=e.payload;t.endpointId?t.isLocalEndpointId=!1:(t.endpointId=this.wire.environment.getNextMessageId(),t.isLocalEndpointId=!0);const s=n.channelId,a=this.providerMap.get(s);if(!a)return i.payload.success=!1,i.payload.reason=`Channel "${n.channelName}" has been destroyed.`,this.wire.sendRaw(i);const{provider:c,strategy:d,supportedProtocols:h}=a;try{if(!(c instanceof St.ChannelProvider))throw Error("Cannot connect to a channel client");const e=o??{supportedProtocols:[{type:"classic",version:1}],maxProtocols:1},n=this.protocolManager.getCompatibleProtocols(h,e);if(!n.length)throw new Error("This provider does not support any of the offered protocols.");const s=await c.processConnection(t,r);i.payload.payload=i.payload.payload||{};let a={supportedProtocols:[],endpointPayloadPromise:Promise.resolve({endpointIdentity:t})};return a=await n.reduce((async(e,t)=>{const n=await e;if("rtc"===t.type){const{answer:e,rtcClient:i,channels:r}=await Et(this,bt,"f").createProviderAnswer(t.payload.rtcConnectionId,t.payload.offer);n.supportedProtocols.push({type:"rtc",version:_t.RTCInfo.version,payload:{answer:e}}),n.endpointPayloadPromise=n.endpointPayloadPromise.then((e=>r.then((t=>({...e,rtc:{rtcClient:i,channels:t}})))))}else n.supportedProtocols.push({type:"classic",version:Mt.ClassicInfo.version});return n}),Promise.resolve(a)),a.endpointPayloadPromise.then((e=>d.addEndpoint(t.endpointId,e))),i.payload.payload.result=s,i.payload.payload.answer=a,this.wire.sendRaw(i)}catch(e){return i.payload.success=!1,i.payload.reason=e.message,this.wire.sendRaw(i)}}}xe.ConnectionManager=kt,Ct=new WeakMap,bt=new WeakMap;var Lt,Tt,$t,Bt=s&&s.__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},Gt=s&&s.__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)};Object.defineProperty(le,"__esModule",{value:!0}),le.Channel=void 0;const Wt=t,Ht=G,Nt=d,Dt=ue,Ut=xe,Vt=Qe;function zt(e){const t=Math.floor(e/10),n=Math.min(3e4,500*2**t);return new Promise((e=>{setTimeout((()=>{e(!1)}),n)}))}class Kt extends Nt.EmitterBase{constructor(e){super(e,"channel"),Lt.set(this,void 0),Tt.set(this,new Wt.EventEmitter),$t.set(this,new Ht.AsyncRetryableLazy((async()=>{await Promise.all([this.on("disconnected",(e=>{Dt.ChannelClient.handleProviderDisconnect(e)})),this.on("connected",((...e)=>{Gt(this,Tt,"f").emit("connected",...e)}))]).catch((()=>new Error("error setting up channel connection listeners")))}))),Bt(this,Lt,new Ut.ConnectionManager(e),"f")}async getAllChannels(){return this.wire.sendAction("get-all-channels").then((({payload:e})=>e.data))}async onChannelConnect(e){await this.on("connected",e)}async onChannelDisconnect(e){await this.on("disconnected",e)}async safeConnect(e,t,n){const i={count:0};do{let r=()=>{};const o=new Promise((t=>{r=n=>{e===n.channelName&&t(!0)},Gt(this,Tt,"f").on("connected",r)}));try{if(i.count>0){i.gotConnectedEvent=await Promise.race([zt(i.count),o]);const t=await this.wire.sendAction("connect-to-channel",{...n,retryInfo:i});return console.log(`Successfully connected to channelName: ${e}`),t.payload.data}const t=this.wire.sendAction("connect-to-channel",n);i.originalMessageId=t.messageId;return(await t).payload.data}catch(n){if(!n.message.includes("internal-nack"))throw n;t&&0===i.count&&console.warn(`No channel found for channelName: ${e}. Waiting for connection...`)}finally{i.count+=1,Gt(this,Tt,"f").removeListener("connected",r)}}while(t);throw new Error(`No channel found for channelName: ${e}.`)}async connect(e,t={}){if(await Gt(this,$t,"f").getValue(),!e||"string"!=typeof e)throw new Error("Please provide a channelName string to connect to a channel.");const n={wait:!0,...this.wire.environment.getDefaultChannelOptions().connect,...t},{offer:i,rtc:r}=await Gt(this,Lt,"f").createClientOffer(n);let o;(this.fin.me.isFrame||this.fin.me.isView||this.fin.me.isWindow)&&(o=(await this.fin.me.getInfo()).url);const s={channelName:e,...n,offer:i,connectionUrl:o},a=await this.safeConnect(e,n.wait,s),c=await Gt(this,Lt,"f").createClientStrategy(r,a),d=new Dt.ChannelClient(a,(()=>Dt.ChannelClient.wireClose(this.wire,a,a.endpointId)),c);return c.onEndpointDisconnect(a.channelId,(async()=>{try{await d.sendDisconnectAction()}catch(e){console.warn(`Something went wrong during disconnect for client with uuid: ${a.uuid} / name: ${a.name} / endpointId: ${a.endpointId}.`)}finally{Dt.ChannelClient.handleProviderDisconnect(a)}})),d}async create(e,t){if(!e)throw new Error("Please provide a channelName to create a channel");const{payload:{data:n}}=await this.wire.sendAction("create-channel",{channelName:e}),i=Gt(this,Lt,"f").createProvider(t,n);return this.on("client-disconnected",(t=>{t.channelName===e&&Vt.ChannelProvider.handleClientDisconnection(i,t)})),i}}le.Channel=Kt,Lt=new WeakMap,Tt=new WeakMap,$t=new WeakMap,Object.defineProperty(de,"__esModule",{value:!0}),de.InterAppPayload=de.InterApplicationBus=void 0;const qt=t,Jt=d,Yt=he,Zt=le,Qt=O;class Xt extends Jt.Base{constructor(e){super(e),this.events={subscriberAdded:"subscriber-added",subscriberRemoved:"subscriber-removed"},this.refCounter=new Yt.RefCounter,this.Channel=new Zt.Channel(e),this.emitter=new qt.EventEmitter,e.registerMessageHandler(this.onmessage.bind(this)),this.on=this.emitter.on.bind(this.emitter),this.removeAllListeners=this.emitter.removeAllListeners.bind(this.emitter)}async publish(e,t){await this.wire.sendAction("publish-message",{topic:e,message:t,sourceWindowName:this.me.name})}async send(e,t,n){const i=(0,Qt.validateIdentity)(e);if(i)throw new Error(i);await this.wire.sendAction("send-message",{destinationUuid:e.uuid,destinationWindowName:e.name,topic:t,message:n,sourceWindowName:this.me.name})}subscribe(e,t,n){const i=this.createSubscriptionKey(e.uuid,e.name||"*",t);return this.emitter.on(i,n),this.refCounter.actOnFirst(i,(async()=>{await this.wire.sendAction("subscribe",{sourceUuid:e.uuid,sourceWindowName:e.name||"*",topic:t,destinationWindowName:this.me.name})}),(()=>Promise.resolve()))}unsubscribe(e,t,n){const i=e.name||"*",r=this.createSubscriptionKey(e.uuid,i,t);return this.emitter.removeListener(r,n),this.refCounter.actOnLast(r,(async()=>{await this.wire.sendAction("unsubscribe",{sourceUuid:e.uuid,sourceWindowName:i,topic:t,destinationWindowName:this.me.name})}),(()=>new Promise((e=>e)).then((()=>{}))))}processMessage(e){const{payload:{message:t,sourceWindowName:n,sourceUuid:i,topic:r}}=e,o=[this.createSubscriptionKey(i,n,r),this.createSubscriptionKey(i,"*",r),this.createSubscriptionKey("*","*",r)],s={uuid:i,name:n};o.forEach((e=>{this.emitter.emit(e,t,s)}))}emitSubscriverEvent(e,t){const{payload:{targetName:n,uuid:i,topic:r}}=t,o={name:n,uuid:i,topic:r};this.emitter.emit(e,o)}createSubscriptionKey(e,t,n){const i=t||"*";if(!(e&&i&&n))throw new Error("Missing uuid, name, or topic string");return function(...e){return e.map((e=>Buffer.from(`${e}`).toString("base64"))).join("/")}(e,i,n)}onmessage(e){const{action:t}=e;switch(t){case"process-message":this.processMessage(e);break;case this.events.subscriberAdded:this.emitSubscriverEvent(this.events.subscriberAdded,e);break;case this.events.subscriberRemoved:this.emitSubscriverEvent(this.events.subscriberRemoved,e)}return!0}}de.InterApplicationBus=Xt;de.InterAppPayload=class{};var en={};Object.defineProperty(en,"__esModule",{value:!0}),en.Clipboard=void 0;const tn=d;class nn extends tn.Base{async writeText(e){await this.wire.sendAction("clipboard-write-text",e)}async readText(e){const{payload:t}=await this.wire.sendAction("clipboard-read-text",{type:e});return t.data}async writeImage(e){await this.wire.sendAction("clipboard-write-image",e)}async readImage(e={format:"dataURL"}){const{payload:t}=await this.wire.sendAction("clipboard-read-image",e);return t.data}async writeHtml(e){await this.wire.sendAction("clipboard-write-html",e)}async readHtml(e){const{payload:t}=await this.wire.sendAction("clipboard-read-html",{type:e});return t.data}async writeRtf(e){await this.wire.sendAction("clipboard-write-rtf",e)}async readRtf(e){const{payload:t}=await this.wire.sendAction("clipboard-read-rtf",{type:e});return t.data}async write(e){await this.wire.sendAction("clipboard-write",e)}async getAvailableFormats(e){const{payload:t}=await this.wire.sendAction("clipboard-read-formats",{type:e});return t.data}}en.Clipboard=nn;var rn={},on={},sn={};Object.defineProperty(sn,"__esModule",{value:!0}),sn.ExternalApplication=void 0;const an=d;class cn extends an.EmitterBase{constructor(e,t){super(e,"external-application",t.uuid),this.identity=t}getInfo(){return this.wire.sendAction("get-external-application-info",this.identity).then((({payload:e})=>e.data))}}sn.ExternalApplication=cn,Object.defineProperty(on,"__esModule",{value:!0}),on.ExternalApplicationModule=void 0;const dn=d,hn=sn;class ln extends dn.Base{wrap(e){return this.wire.sendAction("external-application-wrap").catch((e=>{})),Promise.resolve(new hn.ExternalApplication(this.wire,{uuid:e}))}wrapSync(e){return this.wire.sendAction("external-application-wrap-sync").catch((e=>{})),new hn.ExternalApplication(this.wire,{uuid:e})}}on.ExternalApplicationModule=ln,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(on,e),n(sn,e)}(rn);var un={},pn={},wn={};Object.defineProperty(wn,"__esModule",{value:!0}),wn._Frame=void 0;const yn=d;class fn extends yn.EmitterBase{constructor(e,t){super(e,"frame",t.uuid,t.name),this.identity=t}getInfo(){return this.wire.sendAction("get-frame-info",this.identity).then((({payload:e})=>e.data))}getParentWindow(){return this.wire.sendAction("get-parent-window",this.identity).then((({payload:e})=>e.data))}}wn._Frame=fn,Object.defineProperty(pn,"__esModule",{value:!0}),pn._FrameModule=void 0;const gn=d,mn=O,vn=wn;class Cn extends gn.Base{async wrap(e){this.wire.sendAction("frame-wrap").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}wrapSync(e){this.wire.sendAction("frame-wrap-sync").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}getCurrent(){return this.wire.sendAction("frame-get-current").catch((e=>{})),Promise.resolve(new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity()))}getCurrentSync(){return this.wire.sendAction("frame-get-current-sync").catch((e=>{})),new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity())}}pn._FrameModule=Cn,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(pn,e),n(wn,e)}(un);var bn={};Object.defineProperty(bn,"__esModule",{value:!0}),bn.GlobalHotkey=void 0;const In=d;class En extends In.EmitterBase{constructor(e){super(e,"global-hotkey")}async register(e,t){await this.on(e,t),await this.wire.sendAction("global-hotkey-register",{hotkey:e})}async unregister(e){await this.removeAllListeners(e),await this.wire.sendAction("global-hotkey-unregister",{hotkey:e})}async unregisterAll(){await Promise.all(this.eventNames().filter((e=>!("registered"===e||"unregistered"===e))).map((e=>this.removeAllListeners(e)))),await this.wire.sendAction("global-hotkey-unregister-all",{})}async isRegistered(e){const{payload:{data:t}}=await this.wire.sendAction("global-hotkey-is-registered",{hotkey:e});return t}}bn.GlobalHotkey=En;var xn,An={},Pn={},Mn={},_n=s&&s.__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)};Object.defineProperty(Mn,"__esModule",{value:!0}),Mn.Platform=void 0;const On=d,Sn=O,Rn=new Map;class Fn extends On.EmitterBase{constructor(e,t){super(t.wire,"application",e.uuid),this.getClient=e=>{this.wire.sendAction("platform-get-client",this.identity).catch((e=>{}));const t=e||this.identity,{uuid:n}=t;if(!Rn.has(n)){const e=_n(this,xn,"f").call(this,n);Rn.set(n,e)}return Rn.get(n)},xn.set(this,(async e=>{try{const t=`custom-frame-${e}`,n=await this._channel.connect(t,{wait:!1});return n.onDisconnection((()=>{Rn.delete(e)})),n}catch(t){throw Rn.delete(e),new Error("The targeted Platform is not currently running. Listen for application-started event for the given Uuid.")}})),this.launchLegacyManifest=this.launchContentManifest;const n=(0,Sn.validateIdentity)(e);if(n)throw new Error(n);this._channel=t,this.identity={uuid:e.uuid},this.Layout=this.fin.Platform.Layout,this.Application=this.fin.Application.wrapSync(this.identity)}async createView(e,t,n){this.wire.sendAction("platform-create-view",this.identity).catch((e=>{}));const i=await this.getClient(),r=await i.dispatch("create-view",{target:t,opts:e,targetView:n});if(!r||(0,Sn.validateIdentity)(r.identity))throw new Error(`When overwriting the createView call, please return an object that has a valid 'identity' property: ${JSON.stringify(r)}`);return this.fin.View.wrapSync(r.identity)}async createWindow(e){this.wire.sendAction("platform-create-window",this.identity).catch((e=>{}));const t=await this.getClient();e.reason||(e.reason="api-call");const n=await t.dispatch("create-view-container",e);if(!n||(0,Sn.validateIdentity)(n.identity))throw new Error(`When overwriting the createWindow call, please return an object that has a valid 'identity' property: ${JSON.stringify(n)}`);const{identity:i}=n,r=this.fin.Window.wrapSync(i);return r.name=i.name,r.uuid=i.uuid,r}async quit(){this.wire.sendAction("platform-quit",this.identity).catch((e=>{}));return(await this.getClient()).dispatch("quit")}async closeView(e){this.wire.sendAction("platform-close-view",this.identity).catch((e=>{}));const t=await this.getClient();await t.dispatch("close-view",{view:e})}async reparentView(e,t){console.warn("Platform.reparentView has been deprecated, please use Platform.createView"),this.wire.sendAction("platform-reparent-view",this.identity).catch((e=>{}));const n={...e,uuid:e.uuid??this.identity.uuid},i=await this.fin.View.wrap(n),r=await i.getOptions();return this.createView(r,t)}async getSnapshot(){this.wire.sendAction("platform-get-snapshot",this.identity).catch((e=>{}));return(await this.getClient()).dispatch("get-snapshot")}async getViewSnapshot(e){return(await this.getClient()).dispatch("get-view-snapshot",{viewIdentity:e})}async applySnapshot(e,t){this.wire.sendAction("platform-apply-snapshot",this.identity).catch((e=>{}));const n="Requested snapshot must be a valid Snapshot object, or a url or filepath to such an object.";let i;if("string"==typeof e)try{i=(await this._channel.wire.sendAction("get-application-manifest",{manifestUrl:e})).payload.data}catch(e){throw new Error(`${n}: ${e}`)}else i=e;if(!i.windows)throw new Error(n);const r=await this.getClient();return await r.dispatch("apply-snapshot",{snapshot:i,options:t}),this}async fetchManifest(e){return(await this.getClient()).dispatch("platform-fetch-manifest",{manifestUrl:e})}async launchContentManifest(e){this.wire.sendAction("platform-launch-content-manifest",this.identity).catch((()=>{}));const t=await this.getClient(),n=await this.fetchManifest(e);return t.dispatch("launch-into-platform",{manifest:n,manifestUrl:e}),this}async setWindowContext(e={},t){if(this.wire.sendAction("platform-set-window-context",this.identity).catch((e=>{})),!e)throw new Error("Please provide a serializable object or string to set the context.");const n=await this.getClient(),{entityType:i}=t?await this.fin.System.getEntityInfo(t.uuid,t.name):this.fin.me;await n.dispatch("set-window-context",{context:e,entityType:i,target:t||{uuid:this.fin.me.uuid,name:this.fin.me.name}})}async getWindowContext(e){this.wire.sendAction("platform-get-window-context",this.identity).catch((e=>{}));const t=await this.getClient(),{entityType:n}=e?await this.fin.System.getEntityInfo(e.uuid,e.name):this.fin.me;return t.dispatch("get-window-context",{target:e||{uuid:this.fin.me.uuid,name:this.fin.me.name},entityType:n})}async closeWindow(e,t={skipBeforeUnload:!1}){this.wire.sendAction("platform-close-window",this.identity).catch((e=>{}));return(await this.getClient()).dispatch("close-window",{windowId:e,options:t})}}Mn.Platform=Fn,xn=new WeakMap;var jn={},kn={},Ln={},Tn={};function $n(e){switch(e){case"columns":case"grid":case"rows":case"tabs":return!0;default:return!1}}Object.defineProperty(Tn,"__esModule",{value:!0}),Tn.overrideFromComposables=Tn.isValidPresetType=void 0,Tn.isValidPresetType=$n,Tn.overrideFromComposables=function(...e){return t=>e.reduceRight(((e,t)=>n=>t(e(n))),(e=>e))(t)},Tn.default={isValidPresetType:$n};var Bn={},Gn={},Wn={};Object.defineProperty(Wn,"__esModule",{value:!0}),Wn.ApiConsumer=void 0;Wn.ApiConsumer=class{constructor(e){this.strategy=e,this.consume=async e=>(await this.strategy.getExposedFunctions(e)).reduce(((t,n)=>({...t,[n.key]:this.strategy.createFunction(n,e)})),{})}};var Hn={},Nn={};Object.defineProperty(Nn,"__esModule",{value:!0}),Nn.expose=Nn.getExposedProperties=void 0;const Dn=Symbol("exposedProperties");Nn.getExposedProperties=e=>e[Dn]||e.prototype[Dn]||[];Nn.expose=e=>(t,n,i)=>{t[Dn]=t[Dn]||[],t[Dn].push({key:n,descriptor:i,options:e})},Object.defineProperty(Hn,"__esModule",{value:!0}),Hn.ApiExposer=void 0;const Un=Nn;Hn.ApiExposer=class{constructor(e){this.strategy=e,this.exposeInstance=async(e,t)=>{const n=(0,Un.getExposedProperties)(e),i=await Promise.all(n.map((async({key:n,options:i})=>({key:n,options:await this.strategy.exposeFunction(e[n].bind(e),{key:n,options:i,meta:t})}))));await this.strategy.exposeMeta(t,i)}}};var Vn={},zn={},Kn={};Object.defineProperty(Kn,"__esModule",{value:!0}),Kn.ChannelsConsumer=void 0;Kn.ChannelsConsumer=class{constructor(e){this.channel=e,this.getExposedFunctions=async e=>{const{id:t}=e,{props:n}=await this.channel.dispatch(`api-meta:${t}`);return n},this.createFunction=e=>(...t)=>{const{action:n}=e.options;return this.channel.dispatch(n,{args:t})}}};var qn={};Object.defineProperty(qn,"__esModule",{value:!0}),qn.ChannelsExposer=void 0;qn.ChannelsExposer=class{constructor(e){this.channelProviderOrClient=e,this.exposeFunction=async(e,t)=>{const{key:n,options:i,meta:r}=t,{id:o}=r,s=`${o}.${i?.action||n}`;return await this.channelProviderOrClient.register(s,(async({args:t})=>e(...t))),{action:s}},this.exposeMeta=async({id:e},t)=>{const n=`api-meta:${e}`;await this.channelProviderOrClient.register(n,(()=>({props:t})))}}},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Kn,e),n(qn,e)}(zn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(zn,e)}(Vn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Wn,e),n(Hn,e),n(Vn,e),n(Nn,e)}(Gn);var Jn={};Object.defineProperty(Jn,"__esModule",{value:!0}),Jn.createRelayedDispatch=exports.relayChannelClientApi_1=Jn.relayChannelClientApi=void 0;const Yn=["no longer connected","RTCDataChannel closed unexpectedly","The client you are trying to dispatch from is disconnected from the target provider"];exports.relayChannelClientApi_1=Jn.relayChannelClientApi=async(e,t)=>{e.register(`relay:${t}`,(({action:t,target:n,payload:i})=>e.dispatch(n,t,i))),await Promise.resolve()};Jn.createRelayedDispatch=(e,t,n,i)=>async(r,o)=>{try{return await e.dispatch(`relay:${n}`,{action:r,payload:o,target:t})}catch(e){if(s=e.message,Yn.some((e=>s.includes(e)))&&i)throw new Error(i);throw e}var s};var Zn,Qn,Xn,ei=s&&s.__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},ti=s&&s.__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)};Object.defineProperty(Bn,"__esModule",{value:!0}),Bn.ColumnOrRow=Bn.TabStack=Bn.LayoutNode=void 0;const ni=Gn,ii=Jn;class ri{constructor(e,t){Zn.set(this,void 0),this.isRoot=()=>ti(this,Zn,"f").isRoot(this.entityId),this.exists=()=>ti(this,Zn,"f").exists(this.entityId),this.getParent=async()=>{const e=await ti(this,Zn,"f").getParent(this.entityId);if(e)return ri.getEntity(e,ti(this,Zn,"f"))},this.createAdjacentStack=async(e,t)=>{const n=await ti(this,Zn,"f").createAdjacentStack(this.entityId,e,t);return ri.getEntity({entityId:n,type:"stack"},ti(this,Zn,"f"))},this.getAdjacentStacks=async e=>(await ti(this,Zn,"f").getAdjacentStacks({targetId:this.entityId,edge:e})).map((e=>ri.getEntity({type:"stack",entityId:e.entityId},ti(this,Zn,"f")))),ei(this,Zn,e,"f"),this.entityId=t}}Bn.LayoutNode=ri,Zn=new WeakMap,ri.newLayoutEntitiesClient=async(e,t,n)=>{const i=(0,ii.createRelayedDispatch)(e,n,"layout-relay","You are trying to interact with a layout component on a window that does not exist or has been destroyed.");return new ni.ApiConsumer(new ni.ChannelsConsumer({dispatch:i})).consume({id:t})},ri.getEntity=(e,t)=>{const{entityId:n,type:i}=e;switch(i){case"column":case"row":return new si(t,n,i);case"stack":return new oi(t,n);default:throw new Error(`Unrecognised Layout Entity encountered ('${JSON.stringify(e)})`)}};class oi extends ri{constructor(e,t){super(e,t),Qn.set(this,void 0),this.type="stack",this.getViews=()=>ti(this,Qn,"f").getStackViews(this.entityId),this.addView=async(e,t={index:0})=>ti(this,Qn,"f").addViewToStack(this.entityId,e,t),this.removeView=async e=>{await ti(this,Qn,"f").removeViewFromStack(this.entityId,e)},this.setActiveView=async e=>{await ti(this,Qn,"f").setStackActiveView(this.entityId,e)},ei(this,Qn,e,"f")}}Bn.TabStack=oi,Qn=new WeakMap;class si extends ri{constructor(e,t,n){super(e,t),Xn.set(this,void 0),this.getContent=async()=>(await ti(this,Xn,"f").getContent(this.entityId)).map((e=>ri.getEntity(e,ti(this,Xn,"f")))),ei(this,Xn,e,"f"),this.type=n}}Bn.ColumnOrRow=si,Xn=new WeakMap;var ai={};Object.defineProperty(ai,"__esModule",{value:!0}),ai.DEFAULT_LAYOUT_KEY=ai.LAYOUT_CONTROLLER_ID=void 0,ai.LAYOUT_CONTROLLER_ID="layout-entities",ai.DEFAULT_LAYOUT_KEY="__default__";var ci,di,hi,li=s&&s.__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)};Object.defineProperty(Ln,"__esModule",{value:!0}),Ln.Layout=void 0;const ui=G,pi=O,wi=d,yi=Tn,fi=Bn,gi=ai;class mi extends wi.Base{static getClient(e){return li(e,di,"f").getValue()}constructor(e,t){super(t),ci.add(this),di.set(this,new ui.Lazy((async()=>fi.LayoutNode.newLayoutEntitiesClient(await this.platform.getClient(),gi.LAYOUT_CONTROLLER_ID,this.identity)))),this.replace=async e=>{this.wire.sendAction("layout-replace").catch((e=>{}));const t=await this.platform.getClient();await t.dispatch("replace-layout",{target:this.identity,opts:{layout:e}})},this.replaceView=async(e,t)=>{this.wire.sendAction("layout-replace-view").catch((e=>{}));const n=await this.platform.getClient();await n.dispatch("replace-view",{target:this.identity,opts:{viewToReplace:e,newView:t}})},this.applyPreset=async e=>{this.wire.sendAction("layout-apply-preset").catch((e=>{}));const t=await this.platform.getClient(),{presetType:n}=e;if(!n||!(0,yi.isValidPresetType)(n))throw new Error("Cannot apply preset layout, please include an applicable presetType property in the PresetLayoutOptions.");await t.dispatch("apply-preset-layout",{target:this.identity,opts:{presetType:n}})};const n=(0,pi.validateIdentity)(e);if(n)throw new Error(n);this.identity=e,this.platform=this.fin.Platform.wrapSync({uuid:e.uuid}),e.uuid===this.fin.me.uuid&&e.name===this.fin.me.name&&(this.init=this.fin.Platform.Layout.init)}async getConfig(){this.wire.sendAction("layout-get-config").catch((e=>{}));return(await this.platform.getClient()).dispatch("get-frame-snapshot",{target:this.identity})}async getCurrentViews(){this.wire.sendAction("layout-get-views").catch((e=>{}));const e=await this.platform.getClient();return(await e.dispatch("get-layout-views",{target:this.identity})).map((e=>this.fin.View.wrapSync(e)))}async getRootItem(){this.wire.sendAction("layout-get-root-item").catch((()=>{}));const e=await li(this,di,"f").getValue(),t=await e.getRoot("layoutName"in this.identity?this.identity:void 0);return fi.LayoutNode.getEntity(t,e)}async getStackByViewIdentity(e){this.wire.sendAction("layout-get-stack-by-view").catch((()=>{}));const t=await li(this,di,"f").getValue(),n=await t.getStackByView(e);if(!n)throw new Error(`No stack found for view: ${e.uuid}/${e.name}`);return fi.LayoutNode.getEntity(n,t)}async addView(e,{location:t,targetView:n}={}){this.wire.sendAction("layout-add-view").catch((e=>{}));const{identity:i}=await li(this,ci,"m",hi).call(this,"layout-add-view",{viewOptions:e,location:t,targetView:n});return{identity:i}}async closeView(e){this.wire.sendAction("layout-close-view").catch((e=>{})),await li(this,ci,"m",hi).call(this,"layout-close-view",{viewIdentity:e})}}Ln.Layout=mi,di=new WeakMap,ci=new WeakSet,hi=async function(e,t){return(await this.platform.getClient()).dispatch(e,{target:this.identity,opts:t})};var vi,Ci,bi,Ii,Ei,xi=s&&s.__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)},Ai=s&&s.__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};Object.defineProperty(kn,"__esModule",{value:!0}),kn.LayoutModule=void 0;const Pi=d,Mi=Ln,_i=ai;class Oi extends Pi.Base{constructor(){super(...arguments),vi.add(this),Ci.set(this,!1),bi.set(this,null),this.init=async(e={})=>{if(this.wire.sendAction("layout-init").catch((e=>{})),!this.wire.environment.layoutAllowedInContext(this.fin))throw new Error("Layout.init can only be called from a Window context.");if(xi(this,Ci,"f"))throw new Error("Layout.init was already called, please use Layout.create to add additional layouts.");"openfin"===this.wire.environment.type&&await this.fin.Platform.getCurrentSync().getClient(),Ai(this,Ci,!0,"f"),Ai(this,bi,await this.wire.environment.initLayoutManager(this.fin,this.wire,e),"f"),await this.wire.environment.applyLayoutSnapshot(this.fin,xi(this,bi,"f"),e);const t={name:this.fin.me.name,uuid:this.fin.me.uuid};if(!e.layoutManagerOverride){const e={layoutName:_i.DEFAULT_LAYOUT_KEY,...t};return xi(this,Ii,"f").call(this,e)}return this.wrapSync(t)},Ii.set(this,(e=>{const t="[Layout] You are using a deprecated property `layoutManager` - it will throw if you access it starting in v37.",n=new Proxy({},{get(e,n){throw console.warn(`[Layout-mgr-proxy] accessing ${n.toString()}`),new Error(t)}}),i=Object.assign(this.wrapSync(e),{layoutManager:n});return new Proxy(i,{get(e,n){if("layoutManager"===n)throw console.warn(`[Layout-proxy] accessing ${n.toString()}`),new Error(t);return e[n]}})})),this.getCurrentLayoutManagerSync=()=>xi(this,vi,"m",Ei).call(this,"fin.Platform.Layout.getCurrentLayoutManagerSync()"),this.create=async e=>this.wire.environment.createLayout(xi(this,vi,"m",Ei).call(this,"fin.Platform.Layout.create()"),e),this.destroy=async e=>this.wire.environment.destroyLayout(xi(this,vi,"m",Ei).call(this,"fin.Platform.Layout.destroy()"),e)}async wrap(e){return this.wire.sendAction("layout-wrap").catch((e=>{})),new Mi.Layout(e,this.wire)}wrapSync(e){return this.wire.sendAction("layout-wrap-sync").catch((e=>{})),new Mi.Layout(e,this.wire)}async getCurrent(){if(this.wire.sendAction("layout-get-current").catch((e=>{})),"openfin"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error("You are not in a Window context. Only Windows can have a Layout.");const{uuid:e,name:t}=this.fin.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction("layout-get-current-sync").catch((e=>{})),"openfin"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error("You are not in a Window context. Only Windows can have a Layout.");const{uuid:e,name:t}=this.fin.me;return this.wrapSync({uuid:e,name:t})}async getLayoutByViewIdentity(e){this.wire.sendAction("layout-get-by-view-identity").catch((()=>{}));let t=await this.wire.environment.getViewWindowIdentity(this.fin,e);t.identity&&(t=t.identity);try{const n=this.wrapSync(t),i=await Mi.Layout.getClient(n),r=await i.getLayoutIdentityForViewOrThrow(e);return this.wrapSync(r)}catch(n){if(!["No action registered at target for","getLayoutIdentityForViewOrThrow is not a function"].some((e=>n.message.includes(e))))throw n;if(t.uuid===t.name)throw new Error(`View identity ${JSON.stringify(e)} is not attached to any layout in provider window ${JSON.stringify(t)}.`);return this.wrapSync(t)}}}kn.LayoutModule=Oi,Ci=new WeakMap,bi=new WeakMap,Ii=new WeakMap,vi=new WeakSet,Ei=function(e){if(!xi(this,bi,"f"))throw new Error(`You must call init before using the API ${e}`);return xi(this,bi,"f")},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(kn,e),n(Ln,e)}(jn),Object.defineProperty(Pn,"__esModule",{value:!0}),Pn.PlatformModule=void 0;const Si=d,Ri=Mn,Fi=jn;class ji extends Si.Base{constructor(e,t){super(e),this._channel=t,this.Layout=new Fi.LayoutModule(this.wire)}async init(e){if(!fin.__internal_.isPlatform||fin.me.name!==fin.me.uuid)throw new Error("fin.Platform.init should only be called from a custom platform provider running in the main window of the application.");return this.wire.environment.initPlatform(this.fin,e)}async wrap(e){return this.wire.sendAction("platform-wrap").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}wrapSync(e){return this.wire.sendAction("platform-wrap-sync").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}async getCurrent(){return this.wire.sendAction("platform-get-current").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction("platform-get-current-sync").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}start(e){return this.wire.sendAction("platform-start").catch((e=>{})),new Promise((async(t,n)=>{try{const{uuid:n}=e,i=await this.fin.Application._create({...e,isPlatformController:!0});i.once("platform-api-ready",(()=>t(this.wrapSync({uuid:n})))),i._run({uuid:n})}catch(e){n(e)}}))}startFromManifest(e,t){return this.wire.sendAction("platform-start-from-manifest").catch((e=>{})),new Promise((async(n,i)=>{try{const i=await this.fin.Application._createFromManifest(e);i.once("platform-api-ready",(()=>n(this.wrapSync({uuid:i.identity.uuid})))),i._run(t)}catch(e){i(e)}}))}}Pn.PlatformModule=ji,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Pn,e),n(Mn,e)}(An);var ki={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getMe=e.getBaseMe=e.environmentUnsupportedMessage=void 0;const t=J(),n=un,i=ie(),r=rn;function o(e,t,n){return{...{isView:"view"===e,isWindow:"window"===e,isFrame:"iframe"===e,isExternal:"external connection"===e},uuid:t,name:n,entityType:e}}e.environmentUnsupportedMessage="You are not running in OpenFin.",e.getBaseMe=o,e.getMe=function(s){const{uuid:a,name:c,entityType:d}=s.me,h={setContext(){throw new Error(e.environmentUnsupportedMessage)},addContextHandler(){throw new Error(e.environmentUnsupportedMessage)},getContextGroups(){throw new Error(e.environmentUnsupportedMessage)},joinContextGroup(){throw new Error(e.environmentUnsupportedMessage)},removeFromContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getAllClientsInContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getInfoForContextGroup(){throw new Error(e.environmentUnsupportedMessage)}},l="Interop API has not been instantiated. Either connection has failed or you have not declared interop in your config.",u={setContext(){throw new Error(l)},addContextHandler(){throw new Error(l)},getContextGroups(){throw new Error(l)},joinContextGroup(){throw new Error(l)},removeFromContextGroup(){throw new Error(l)},getAllClientsInContextGroup(){throw new Error(l)},getInfoForContextGroup(){throw new Error(l)}},p={eventNames:()=>{throw new Error(e.environmentUnsupportedMessage)},emit:()=>{throw new Error(e.environmentUnsupportedMessage)},listeners:()=>{throw new Error(e.environmentUnsupportedMessage)},listenerCount:()=>{throw new Error(e.environmentUnsupportedMessage)},on:()=>{throw new Error(e.environmentUnsupportedMessage)},addListener:()=>{throw new Error(e.environmentUnsupportedMessage)},once:()=>{throw new Error(e.environmentUnsupportedMessage)},prependListener:()=>{throw new Error(e.environmentUnsupportedMessage)},prependOnceListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeAllListeners:()=>{throw new Error(e.environmentUnsupportedMessage)}};switch(d){case"view":return Object.assign(new t.View(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case"window":return Object.assign(new i._Window(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case"iframe":return Object.assign(new n._Frame(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case"external connection":return Object.assign(new r.ExternalApplication(s,{uuid:a}),o(d,a,c),{interop:u,isOpenFin:!1});default:return{...o(d,a,c),...p,interop:h,isOpenFin:!1}}}}(ki);var Li={},Ti={},$i={};Object.defineProperty($i,"__esModule",{value:!0}),$i.createWarningObject=$i.createUnusableObject=void 0,$i.createUnusableObject=function(e){const t=()=>{throw new Error(e)};return new Proxy({},{apply:t,construct:t,defineProperty:t,deleteProperty:t,get:t,getOwnPropertyDescriptor:t,getPrototypeOf:t,has:t,isExtensible:t,ownKeys:t,preventExtensions:t,set:t,setPrototypeOf:t})},$i.createWarningObject=function(e,t){return new Proxy(t,{get:(...t)=>(console.warn(e),Reflect.get(...t)),set:(...t)=>(console.warn(e),Reflect.set(...t)),getOwnPropertyDescriptor:(...t)=>(console.warn(e),Reflect.getOwnPropertyDescriptor(...t)),ownKeys:(...t)=>(console.warn(e),Reflect.ownKeys(...t))})};var Bi,Gi={},Wi={};var Hi={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.wrapIntentHandler=e.BROKER_ERRORS=e.generateOverrideWarning=e.generateOverrideError=e.wrapContextHandler=e.wrapInTryCatch=e.generateId=void 0;e.generateId=()=>`${Math.random()}${Date.now()}`;e.wrapInTryCatch=(e,t)=>(...n)=>{try{return e(...n)}catch(e){throw new Error((t||"")+e)}};e.wrapContextHandler=(e,t)=>async n=>{try{await e(n)}catch(e){throw console.error(`Error thrown by handler ${t} for context type ${n.type}: ${e}`),e}};e.generateOverrideError=(e,t)=>`You have tried to to use ${e} but ${t} has not been overridden in the Interop Broker. Please override this function. Refer to our documentation for more info.`;e.generateOverrideWarning=(e,t,n,i)=>{const{uuid:r,name:o}=n;return i?`Entity with identity: ${r}/${o} has called ${i} or ${e} but ${t} has not been overridden.`:`Entity with identity: ${r}/${o} has called ${e} but ${t} has not been overridden.`},e.BROKER_ERRORS={fireIntent:(0,e.generateOverrideError)("fireIntent","handleFiredIntent"),fireIntentForContext:(0,e.generateOverrideError)("fireIntentForContext","handleFiredIntentForContext"),getInfoForIntent:(0,e.generateOverrideError)("getInfoForIntent","handleInfoForIntent"),getInfoForIntentsByContext:(0,e.generateOverrideError)("getInfoForIntentsByContext","handleInfoForIntentsByContext"),joinSessionContextGroupWithJoinContextGroup:"The Context Group you have tried to join is a Session Context Group. Custom Context Groups can only be defined by the Interop Broker through code or manifest configuration. Please use joinSessionContextGroup.",fdc3Open:(0,e.generateOverrideError)("fdc3.open","fdc3HandleOpen"),fdc3FindInstances:(0,e.generateOverrideError)("fdc3.findInstances","fdc3HandleFindInstances"),fdc3GetAppMetadata:(0,e.generateOverrideError)("fdc3.getAppMetadata","fdc3HandleGetAppMetadata"),fdc3GetInfo:(0,e.generateOverrideError)("fdc3.getInfo","fdc3HandleGetInfo")};e.wrapIntentHandler=(e,t)=>async n=>{try{return e(n)}catch(e){throw console.error(`Error thrown by handler ${t}: ${e}`),e}}}(Hi);var Ni,Di,Ui={};function Vi(){if(Di)return Gi;Di=1;var e,t,n,r=s&&s.__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},o=s&&s.__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)},a=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Gi,"__esModule",{value:!0}),Gi.InteropBroker=void 0;const c=d,h=a(function(){if(Bi)return Wi;Bi=1,Object.defineProperty(Wi,"__esModule",{value:!0});const e=Cr();return Wi.default=class{constructor(e,t){this.provider=e,this.id=t,this.lastContext=void 0,this.contextGroupMap=new Map,this.clients=new Map,this.registerListeners()}registerListeners(){this.provider.register(`sessionContextGroup:getContext-${this.id}`,this.getCurrentContext.bind(this)),this.provider.register(`sessionContextGroup:setContext-${this.id}`,this.setContext.bind(this)),this.provider.register(`sessionContextGroup:handlerAdded-${this.id}`,this.handlerAdded.bind(this)),this.provider.register(`sessionContextGroup:handlerRemoved-${this.id}`,this.handlerRemoved.bind(this))}getCurrentContext(e){return e.type?this.contextGroupMap.get(e.type):this.lastContext}setContext(t,n){const{context:i}=t,r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name} not in Session Client State Map`);this.contextGroupMap.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{e.contextHandlers.get(i.type)?.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getClientState(e){return this.clients.get(e.endpointId)}async handlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(i){const e=r.contextHandlers.get(i)||[];r.contextHandlers.set(i,[...e,n]);const o=this.contextGroupMap.get(i);o&&await this.provider.dispatch(t,n,o)}else{r.globalHandler=n;const e=[...this.contextGroupMap.keys()].map((async e=>{const i=this.contextGroupMap.get(e);i&&await this.provider.dispatch(t,n,i)}));await Promise.all(e)}}handlerRemoved(e,t){const{handlerId:n}=e,i=this.clients.get(t.endpointId);i?(Array.from(i.contextHandlers).forEach((([,e])=>{const t=e.indexOf(n);t>-1&&e.splice(t,1)})),i.globalHandler===n&&(i.globalHandler=void 0)):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={contextHandlers:new Map,clientIdentity:e,globalHandler:void 0};this.clients.set(e.endpointId,t)}}onDisconnection(e){this.clients.delete(e.endpointId)}},Wi}()),l=Hi,u=a(i),p=function(){if(Ni)return Ui;Ni=1,Object.defineProperty(Ui,"__esModule",{value:!0}),Ui.PrivateChannelProvider=void 0;const e=Vi();return Ui.PrivateChannelProvider=class t{constructor(e,t){this.provider=e,this.id=t,this.clients=new Map,this.registerListeners(),this.contextByContextType=new Map,this.lastContext=void 0,this.provider.onConnection((e=>this.registerNewClient(e))),this.provider.onDisconnection((async e=>{const{endpointId:t}=e;this.clients.has(t)&&await this.handleClientDisconnecting(e),0===(await this.provider.getAllClientInfo()).length&&this.provider.destroy()}))}getClientState(e){return this.clients.get(e.endpointId)}registerListeners(){this.provider.register("broadcast",this.broadcast.bind(this)),this.provider.register("getCurrentContext",this.getCurrentContext.bind(this)),this.provider.register("contextHandlerAdded",this.contextHandlerAdded.bind(this)),this.provider.register("contextHandlerRemoved",this.contextHandlerRemoved.bind(this)),this.provider.register("nonStandardHandlerRemoved",this.nonStandardHandlerRemoved.bind(this)),this.provider.register("onAddContextHandlerAdded",this.onAddContextHandlerAdded.bind(this)),this.provider.register("onDisconnectHandlerAdded",this.onDisconnectHandlerAdded.bind(this)),this.provider.register("onUnsubscribeHandlerAdded",this.onUnsubscribeHandlerAdded.bind(this)),this.provider.register("clientDisconnecting",((e,t)=>{this.handleClientDisconnecting(t)}))}broadcast(t,n){const{context:i}=t;if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name}, tried to call broadcast, is not connected to this Private Channel`);const r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to broadcast - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);this.contextByContextType.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{const t=e.handlerIdsByContextTypes.get(i.type);t&&t.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getCurrentContext(e,t){const{contextType:n}=e;if(!this.getClientState(t))throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call getCurrentContext, is not connected to this Private Channel`);if(void 0!==n){return this.contextByContextType.get(n)||null}return this.lastContext?this.lastContext:null}contextHandlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call addContextListener, is not connected to this Private Channel`);if(i){const e=r.handlerIdsByContextTypes.get(i)||[];r.handlerIdsByContextTypes.set(i,[...e,n])}else r.globalHandler=n;Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&e.onAddContextListenerHandlerId&&this.provider.dispatch(e.clientIdentity,e.onAddContextListenerHandlerId,i)}))}async contextHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);if(i){let e;if(i.globalHandler===n)i.globalHandler=void 0;else for(const[t,r]of i.handlerIdsByContextTypes){const i=r.indexOf(n);i>-1&&(r.splice(i,1),e=t)}const r=(await this.getConnectedClients()).map((async n=>{const{clientIdentity:i,clientIdentity:{endpointId:r},onUnsubscribeHandlerId:o}=n;r!==t.endpointId&&o&&await this.provider.dispatch(i,o,e)}));try{await Promise.all(r)}catch(e){throw console.error(`Problem when attempting to dispatch to onUnsubscribeHandlers. Error: ${e} Removing Client: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}`),new Error(e)}}else console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}.`)}nonStandardHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);i?i.onDisconnectHandlerId===n?i.onDisconnectHandlerId=void 0:i.onAddContextListenerHandlerId===n?i.onAddContextListenerHandlerId=void 0:i.onUnsubscribeHandlerId===n&&(i.onUnsubscribeHandlerId=void 0):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}onAddContextHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onAddContextListener, is not connected to this Private Channel`);n.onAddContextListenerHandlerId=i,Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&Array.from(e.handlerIdsByContextTypes.keys()).forEach((e=>{this.provider.dispatch(t,i,e)}))}))}onDisconnectHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onDisconnect, is not connected to this Private Channel`);n.onDisconnectHandlerId=i}onUnsubscribeHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onUnsubscribe, is not connected to this Private Channel`);n.onUnsubscribeHandlerId=i}removeClient(e){const t=this.getClientState(e);if(!t)throw new Error(`Client with Identity: ${e.uuid} ${e.name}, tried to call disconnect, is not connected to this Private Channel`);t.handlerIdsByContextTypes.clear(),this.clients.delete(e.endpointId)}async fireOnDisconnectForOtherClients(e){const{endpointId:t}=e,n=(await this.getConnectedClients()).map((async e=>{const{clientIdentity:{endpointId:n},onDisconnectHandlerId:i}=e;n!==t&&i&&await this.provider.dispatch(e.clientIdentity,i)}));try{await Promise.all(n)}catch(t){throw console.error(`Problem when attempting to dispatch to onDisconnectHandlers. Error: ${t} Disconnecting Client: uuid: ${e.uuid}. name: ${e.name}. endpointId: ${e.endpointId}`),new Error(t)}}async unsubscribeAll(e){const{endpointId:t}=e,n=this.clients.get(t);if(n){const t=Array.from(n.handlerIdsByContextTypes.values()).flat(),i=n.globalHandler;if(t.length>0){const n=t.map((async t=>this.contextHandlerRemoved({handlerId:t},e)));try{await Promise.all(n)}catch(e){console.error(e.message)}}if(i)try{await this.contextHandlerRemoved({handlerId:i},e)}catch(e){console.error(e.message)}}}async handleClientDisconnecting(e){await this.unsubscribeAll(e),this.removeClient(e),await this.fireOnDisconnectForOtherClients(e)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={clientIdentity:e,handlerIdsByContextTypes:new Map,globalHandler:void 0,onAddContextListenerHandlerId:void 0,onUnsubscribeHandlerId:void 0,onDisconnectHandlerId:void 0};this.clients.set(e.endpointId,t)}}async getConnectedClients(){const e=await this.provider.getAllClientInfo();return Array.from(this.clients.values()).filter((t=>{const{uuid:n,name:i}=t.clientIdentity;return e.some((e=>i===e.name&&n===e.uuid))}))}static init(e,n){return new t(e,n)}},Ui}(),w=G,y=[{id:"green",displayMetadata:{color:"#00CC88",name:"green"}},{id:"purple",displayMetadata:{color:"#8C61FF",name:"purple"}},{id:"orange",displayMetadata:{color:"#FF8C4C",name:"orange"}},{id:"red",displayMetadata:{color:"#FF5E60",name:"red"}},{id:"pink",displayMetadata:{color:"#FF8FB8",name:"pink"}},{id:"yellow",displayMetadata:{color:"#E9FF8F",name:"yellow"}}];let f=class i extends c.Base{constructor(i,s,a){super(i),e.set(this,void 0),t.set(this,void 0),n.set(this,void 0),this.getProvider=()=>o(this,n,"f").getValue(),this.interopClients=new Map,this.contextGroupsById=new Map,r(this,t,a.contextGroups??[...y],"f"),r(this,e,a.fdc3Info,"f"),a?.logging&&(this.logging=a.logging),this.intentClientMap=new Map,this.lastContextMap=new Map,this.sessionContextGroupMap=new Map,r(this,n,new w.Lazy(s),"f"),this.setContextGroupMap(),this.setupChannelProvider()}static createClosedConstructor(...e){return class extends i{constructor(...t){if(t.length){const[n,i,r]=t;if(r&&"object"==typeof r&&!(0,u.default)(r,e[2]))return console.warn("You have modified the parameters of the InteropOverride constructor. This behavior is deprecated and will be removed in a future version. You can modify these options in your manifest. Please consult our Interop docs for guidance on migrating to the new override scheme."),void super(e[0],e[1],r);console.warn("You are attempting to pass arguments to the InteropOverride constructor. This is not necessary, and these passed arguments will be ignored. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.")}super(...e)}}}setContext({context:e},t){this.wire.sendAction("interop-broker-set-context").catch((e=>{}));const n=this.getClientState(t);if(!n||!n.contextGroupId)throw n?new Error("You must join a context group before you can set context."):new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);{const{contextGroupId:t}=n;this.setContextForGroup({context:e},t)}}setContextForGroup({context:e},t){this.wire.sendAction("interop-broker-set-context-for-group").catch((e=>{}));const n=this.contextGroupsById.get(t);if(!n)throw new Error(`Unable to set context for context group that isn't in the context group mapping: ${t}.`);const r=i.checkContextIntegrity(e);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(e)}`);const o=e.type;n.set(o,e),this.lastContextMap.set(t,o);Array.from(this.interopClients.values()).filter((e=>e.contextGroupId===t)).forEach((t=>{for(const[,n]of t.contextHandlers)i.isContextTypeCompatible(o,n.contextType)&&this.invokeContextHandler(t.clientIdentity,n.handlerId,e)}))}getCurrentContext(e,t){this.wire.sendAction("interop-broker-get-current-context").catch((e=>{}));const n=this.getClientState(t);if(!n?.contextGroupId)throw new Error("You must be a member of a context group to call getCurrentContext");const{contextGroupId:i}=n,r=this.contextGroupsById.get(i),o=this.lastContextMap.get(i),s=e?.contextType??o;return r&&s?r.get(s):void 0}async joinContextGroup({contextGroupId:e,target:t},n){if(this.wire.sendAction("interop-broker-join-context-group").catch((e=>{})),this.sessionContextGroupMap.has(e))throw new Error(l.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup);if(t){i.hasEndpointId(t)&&await this.addClientToContextGroup({contextGroupId:e},t);try{const n=this.channel.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name));if(!n.length)throw new Error(`Given Identity ${t.uuid} ${t.name} is not connected to the Interop Broker.`);n.length>1&&console.warn(`More than one connection found for identity ${t.uuid} ${t.name}`);const i=[];for(const t of n)i.push(this.addClientToContextGroup({contextGroupId:e},t));await Promise.all(i)}catch(e){throw new Error(e)}}else await this.addClientToContextGroup({contextGroupId:e},n)}async addClientToContextGroup({contextGroupId:e},t){this.wire.sendAction("interop-broker-add-client-to-context-group").catch((e=>{}));const n=this.getClientState(t);if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(!this.getContextGroups().find((t=>t.id===e)))throw new Error(`Attempting to join a context group that does not exist: ${e}. You may only join existing context groups.`);if(n.contextGroupId!==e){n.contextGroupId=e,await this.setCurrentContextGroupInClientOptions(t,e);const i=this.contextGroupsById.get(e);for(const[,e]of n.contextHandlers){const{contextType:n,handlerId:r}=e;if(void 0===n)i.forEach(((e,n)=>{this.invokeContextHandler(t,r,e)}));else if(i.has(n)){const e=i.get(n);e&&this.invokeContextHandler(t,r,e)}}}}async removeFromContextGroup({target:e},t){if(this.wire.sendAction("interop-broker-remove-from-context-group").catch((e=>{})),e){i.hasEndpointId(e)&&await this.removeClientFromContextGroup(e);try{const t=this.channel.connections.filter((t=>t.uuid===e.uuid&&t.name===e.name));if(!t.length)throw new Error(`No connection found for given Identity ${e.uuid} ${e.name}`);t.length>1&&console.warn(`More than one connection found for identity ${e.uuid} ${e.name}`);const n=[];for(const e of t)n.push(this.removeClientFromContextGroup(e));await Promise.all(n)}catch(e){throw new Error(e)}}else await this.removeClientFromContextGroup(t)}async removeClientFromContextGroup(e){this.wire.sendAction("interop-broker-remove-client-from-context-group").catch((e=>{}));const t=this.getClientState(e);t&&(t.contextGroupId=void 0),await this.setCurrentContextGroupInClientOptions(e,null)}getContextGroups(){return this.wire.sendAction("interop-broker-get-context-groups").catch((e=>{})),o(this,t,"f").map((e=>({...e})))}getInfoForContextGroup({contextGroupId:e}){return this.wire.sendAction("interop-broker-get-info-for-context-group").catch((e=>{})),this.getContextGroups().find((t=>t.id===e))}getAllClientsInContextGroup({contextGroupId:e}){this.wire.sendAction("interop-broker-get-all-clients-in-context-group").catch((e=>{}));return Array.from(this.interopClients.values()).filter((t=>t.contextGroupId===e)).map((e=>e.clientIdentity))}async handleFiredIntent(e,t){const n=(0,l.generateOverrideWarning)("fdc3.raiseIntent","InteropBroker.handleFiredIntent",t,"interopClient.fireIntent");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntent)}async setIntentTarget(e,t){this.wire.sendAction("interop-broker-set-intent-target").catch((e=>{}));const n=this.intentClientMap.get(t.name),i=`intent-handler-${e.name}`;if(n){const t=n.get(i);if(t){if(t.pendingIntents.push(e),t.clientIdentity&&t.isReady){const{clientIdentity:e,pendingIntents:n}=t;try{const r=n[n.length-1];await this.invokeIntentHandler(e,i,r),t.pendingIntents=[]}catch(n){console.error(`Error invoking intent handler for client ${e.uuid}/${e.name}/${e.endpointId}`),t.isReady=!1}}}else n.set(i,{isReady:!1,pendingIntents:[e]})}else{this.intentClientMap.set(t.name,new Map);const n=this.intentClientMap.get(t.name);n&&n.set(i,{isReady:!1,pendingIntents:[e]})}}async handleInfoForIntent(e,t){const n=(0,l.generateOverrideWarning)("fdc3.findIntent","InteropBroker.handleInfoForIntent",t,"interopClient.getInfoForIntent");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntent)}async handleInfoForIntentsByContext(e,t){const n=(0,l.generateOverrideWarning)("fdc3.findIntentsByContext","InteropBroker.handleInfoForIntentsByContext",t,"interopClient.getInfoForIntentsByContext");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntentsByContext)}async handleFiredIntentForContext(e,t){const n=(0,l.generateOverrideWarning)("fdc3.raiseIntentForContext","InteropBroker.handleFiredIntentForContext",t,"interopClient.fireIntentForContext");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntentForContext)}async clientDisconnected(e){}async fdc3HandleOpen({app:e,context:t},n){const i=(0,l.generateOverrideWarning)("fdc3.open","InteropBroker.fdc3HandleOpen",n);throw console.warn(i),new Error(l.BROKER_ERRORS.fdc3Open)}async fdc3HandleFindInstances(e,t){const n=(0,l.generateOverrideWarning)("fdc3.open","InteropBroker.fdc3HandleFindInstances",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3FindInstances)}async fdc3HandleGetAppMetadata(e,t){const n=(0,l.generateOverrideWarning)("fdc3.getAppMetadata","InteropBroker.fdc3HandleGetAppMetadata",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3GetAppMetadata)}async invokeContextHandler(e,t,n){const i=await this.getProvider();try{await i.dispatch(e,t,n)}catch(i){console.error(`Error invoking context handler ${t} for context type ${n.type} in client ${e.uuid}/${e.name}/${e.endpointId}`,i)}}async invokeIntentHandler(e,t,n){const i=await this.getProvider();await i.dispatch(e,t,n)}async fdc3HandleGetInfo(t,n){const{fdc3Version:i}=t;return{fdc3Version:i,...o(this,e,"f"),optionalFeatures:{OriginatingAppMetadata:!1,UserChannelMembershipAPIs:!0},appMetadata:{appId:"",instanceId:""}}}async getAllClientInfo(){return(await this.getProvider()).getAllClientInfo()}decorateSnapshot(e){return{...e,interopSnapshotDetails:{contextGroupStates:this.getContextGroupStates()}}}applySnapshot(e,t){const n=e?.interopSnapshotDetails?.contextGroupStates;n&&(t?.closeExistingWindows||this.updateExistingClients(n),this.rehydrateContextGroupStates(n))}updateExistingClients(e){this.interopClients.forEach((t=>{const{clientIdentity:n,contextGroupId:r,contextHandlers:o}=t;if(r){const t=e[r];for(const[,e]of Object.entries(t))o.forEach((t=>{const{handlerId:r,contextType:o}=t;i.isContextTypeCompatible(e.type,o)&&this.invokeContextHandler(n,r,e)}))}}))}getContextGroupStates(){return i.toObject(this.contextGroupsById)}rehydrateContextGroupStates(e){const t=Object.entries(e);for(const[e,n]of t){const t=Object.entries(n);for(const[n,i]of t)if(this.contextGroupsById.has(e)){this.contextGroupsById.get(e).set(n,i)}else console.warn(`Attempting to set a context group that isn't in the context group mapping. Skipping context group rehydration for: ${e}`)}}contextHandlerRegistered({contextType:e,handlerId:t},n){const i={contextType:e,handlerId:t},r=this.getClientState(n);if(r?.contextHandlers.set(t,i),r&&r.contextGroupId){const{contextGroupId:i}=r,o=this.contextGroupsById.get(i);if(void 0===e)o.forEach(((e,i)=>{this.invokeContextHandler(n,t,e)}));else if(o.has(e)){const i=o.get(e);i&&this.invokeContextHandler(n,t,i)}}}async intentHandlerRegistered(e,t){const{handlerId:n}=e,i=this.intentClientMap.get(t.name),r=i?.get(n);if(i)if(r){const{pendingIntents:e}=r;r.clientIdentity=t,r.isReady=!0;try{if(e.length>0){const i=e[e.length-1];await this.invokeIntentHandler(t,n,i),r.pendingIntents=[]}}catch(e){console.error(`Error invoking intent handler: ${n} for client ${t.uuid}/${t.name}/${t.endpointId}`)}}else i.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t});else{this.intentClientMap.set(t.name,new Map);const e=this.intentClientMap.get(t.name);e&&e.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t})}}removeContextHandler({handlerId:e},t){const n=this.getClientState(t);n&&n.contextHandlers.delete(e)}handleJoinSessionContextGroup({sessionContextGroupId:e},t){try{if(!e)throw new Error("Failed to join session context group: must specify group id.");const n=this.sessionContextGroupMap.get(e);if(n)n.registerNewClient(t);else{const n=new h.default(this.channel,e);n.registerNewClient(t),this.sessionContextGroupMap.set(e,n)}return{hasConflict:this.contextGroupsById.has(e)}}catch(e){throw new Error(e)}}getClientState(e){return this.interopClients.get(e.endpointId)}static toObject(e){const t=Object.fromEntries(e),n={};return Object.entries(t).forEach((([e,t])=>{const i=Object.fromEntries(t);n[e]=i})),n}static checkContextIntegrity(e){if(!e)return{isValid:!1,reason:"No context supplied"};if("object"!=typeof e)return{isValid:!1,reason:"Context must be an Object"};if(!e.type)return{isValid:!1,reason:"Context must have a type property"};if(e.id&&"object"!=typeof e.id)return{isValid:!1,reason:"Context id must be an Object populated with key-value identifiers (if set)"};if(e.id){const{id:t}=e,n=Object.keys(t);let i=!1;if(!n.length)return{isValid:!1,reason:"Context id must have at least one key-value identifier"};if(n.forEach((e=>{"string"==typeof e&&"string"==typeof t[e]||(i=!0)})),i)return{isValid:!1,reason:"Context id key-value identifiers must be of type string"}}return e.name&&"string"!=typeof e.name?{isValid:!1,reason:"Context name must be of string type (if set)"}:{isValid:!0}}static hasEndpointId(e){return void 0!==e.endpointId}static isContextTypeCompatible(e,t){return void 0===t||e===t}setContextGroupMap(){for(const e of this.getContextGroups())this.contextGroupsById.set(e.id,new Map)}async setCurrentContextGroupInClientOptions(e,t){try{const n=await this.fin.System.getEntityInfo(e.uuid,e.name);let i;"view"===n.entityType?i=await this.fin.View.wrap(e):"window"===n.entityType&&(i=await this.fin.Window.wrap(e)),i&&await i.updateOptions({interop:{currentContextGroup:t}})}catch(e){}}async setupChannelProvider(){try{const e=await this.getProvider();this.channel=e,this.wireChannel(e)}catch(e){throw new Error(`Error setting up Interop Broker Channel Provider: ${e}`)}}wireChannel(e){e.onConnection((async(e,t)=>{if(!await this.isConnectionAuthorized(e,t))throw new Error(`Connection not authorized for ${e.uuid}, ${e.name}`);if(!e.endpointId)throw new Error("Version too old to be compatible with Interop. Please upgrade your runtime to a more recent version.");const n={contextGroupId:void 0,contextHandlers:new Map,clientIdentity:e};t?.currentContextGroup&&this.contextGroupsById.has(t.currentContextGroup)&&(n.contextGroupId=t?.currentContextGroup),this.interopClients.set(e.endpointId,n)})),e.onDisconnection((e=>{this.interopClients.delete(e.endpointId);const t=this.intentClientMap.get(e.name);t&&e.uuid===this.fin.me.uuid&&t.forEach((e=>{e.isReady=!1})),this.sessionContextGroupMap.forEach((t=>{t.onDisconnection(e)})),this.clientDisconnected(e)})),e.beforeAction((async(e,t,n)=>{if(!await this.isActionAuthorized(e,t,n))throw new Error(`Action (${e}) not authorized for ${n.uuid}, ${n.name}`);this.logging?.beforeAction?.enabled&&console.log(e,t,n)})),e.afterAction(((e,t,n)=>{this.logging?.afterAction?.enabled&&console.log(e,t,n)})),e.register("setContext",this.setContext.bind(this)),e.register("fireIntent",this.handleFiredIntent.bind(this)),e.register("getCurrentContext",this.getCurrentContext.bind(this)),e.register("getInfoForIntent",this.handleInfoForIntent.bind(this)),e.register("getInfoForIntentsByContext",this.handleInfoForIntentsByContext.bind(this)),e.register("fireIntentForContext",this.handleFiredIntentForContext.bind(this)),e.register("getContextGroups",this.getContextGroups.bind(this)),e.register("joinContextGroup",this.joinContextGroup.bind(this)),e.register("removeFromContextGroup",this.removeFromContextGroup.bind(this)),e.register("getAllClientsInContextGroup",this.getAllClientsInContextGroup.bind(this)),e.register("getInfoForContextGroup",this.getInfoForContextGroup.bind(this)),e.register("contextHandlerRegistered",this.contextHandlerRegistered.bind(this)),e.register("intentHandlerRegistered",this.intentHandlerRegistered.bind(this)),e.register("removeContextHandler",this.removeContextHandler.bind(this)),e.register("sessionContextGroup:createIfNeeded",this.handleJoinSessionContextGroup.bind(this)),e.register("fdc3Open",this.fdc3HandleOpen.bind(this)),e.register("fdc3v2FindIntentsByContext",this.handleInfoForIntentsByContext.bind(this)),e.register("fdc3FindInstances",this.fdc3HandleFindInstances.bind(this)),e.register("fdc3GetAppMetadata",this.fdc3HandleGetAppMetadata.bind(this)),e.register("fdc3v2GetInfo",(async(e,t)=>this.fdc3HandleGetInfo.bind(this)(e,t))),e.register("createPrivateChannelProvider",(async e=>{const{channelId:t}=e,n=await this.fin.InterApplicationBus.Channel.create(t);p.PrivateChannelProvider.init(n,t)}))}isConnectionAuthorized(e,t){return this.wire.sendAction("interop-broker-is-connection-authorized").catch((e=>{})),Promise.resolve(!0)}isActionAuthorized(e,t,n){return this.wire.sendAction("interop-broker-is-action-authorized").catch((e=>{})),Promise.resolve(!0)}};return Gi.InteropBroker=f,e=new WeakMap,t=new WeakMap,n=new WeakMap,Gi}var zi,Ki={},qi={},Ji=s&&s.__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},Yi=s&&s.__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)};Object.defineProperty(qi,"__esModule",{value:!0});const Zi=d,Qi=Hi;class Xi extends Zi.Base{constructor(e,t,n){super(e),zi.set(this,void 0),this.id=n,Ji(this,zi,t,"f")}async setContext(e){this.wire.sendAction("interop-session-context-group-set-context").catch((e=>{}));return(await Yi(this,zi,"f")).dispatch(`sessionContextGroup:setContext-${this.id}`,{sessionContextGroupId:this.id,context:e})}async getCurrentContext(e){this.wire.sendAction("interop-session-context-group-get-context").catch((e=>{}));return(await Yi(this,zi,"f")).dispatch(`sessionContextGroup:getContext-${this.id}`,{sessionContextGroupId:this.id,type:e})}async addContextHandler(e,t){if(this.wire.sendAction("interop-session-context-group-add-handler").catch((e=>{})),"function"!=typeof e)throw new Error("Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");const n=await Yi(this,zi,"f");let i;return i=t?`sessionContextHandler:invoke-${this.id}-${t}-${(0,Qi.generateId)()}`:`sessionContextHandler:invoke-${this.id}`,n.register(i,(0,Qi.wrapContextHandler)(e,i)),await n.dispatch(`sessionContextGroup:handlerAdded-${this.id}`,{handlerId:i,contextType:t}),{unsubscribe:await this.createUnsubscribeCb(i)}}async createUnsubscribeCb(e){const t=await Yi(this,zi,"f");return async()=>{t.remove(e),await t.dispatch(`sessionContextGroup:handlerRemoved-${this.id}`,{handlerId:e})}}getUserInstance(){return{id:this.id,setContext:(0,Qi.wrapInTryCatch)(this.setContext.bind(this),"Failed to set context: "),getCurrentContext:(0,Qi.wrapInTryCatch)(this.getCurrentContext.bind(this),"Failed to get context: "),addContextHandler:(0,Qi.wrapInTryCatch)(this.addContextHandler.bind(this),"Failed to add context handler: ")}}}qi.default=Xi,zi=new WeakMap;var er={},tr={},nr={},ir={},rr=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),or=s&&s.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),sr=s&&s.__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)&&rr(t,e,n);return or(t,e),t};Object.defineProperty(ir,"__esModule",{value:!0}),ir.PrivateChannelClient=void 0;const ar=sr(Hi);var cr,dr;function hr(){if(cr)return tr;cr=1;var e,t=s&&s.__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)},n=s&&s.__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},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(tr,"__esModule",{value:!0}),tr.FDC3ModuleBase=void 0;const o=nr,a=Hi,c=wr(),d=r(i);return tr.FDC3ModuleBase=class{get client(){return t(this,e,"f").call(this)}get fin(){return this.wire.getFin()}constructor(t,i){this.wire=i,e.set(this,void 0),n(this,e,t,"f")}async broadcast(e){return this.wire.sendAction("fdc3-broadcast").catch((e=>{})),this.client.setContext(e)}async _open(e,t){this.wire.sendAction("fdc3-open").catch((e=>{}));try{return await c.InteropClient.ferryFdc3Call(this.client,"fdc3Open",{app:e,context:t})}catch(e){const t=e.message===a.BROKER_ERRORS.fdc3Open?"ResolverUnavailable":e.message;throw new Error(t)}}async _getChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:"system",...(0,o.getUnsupportedChannelApis)()})))}async getOrCreateChannel(e){this.wire.sendAction("fdc3-get-or-create-channel").catch((e=>{}));const t=(await this._getChannels()).find((t=>t.id===e));if(t)return{...t,type:"system",...(0,o.getUnsupportedChannelApis)()};try{const t=await this.client.joinSessionContextGroup(e);return(0,o.buildAppChannelObject)(t)}catch(e){throw console.error(e.message),new Error(o.ChannelError.CreationFailed)}}async getSystemChannels(){return this.wire.sendAction("fdc3-get-system-channels").catch((e=>{})),this._getChannels()}async joinChannel(e){this.wire.sendAction("fdc3-join-channel").catch((e=>{}));try{return await this.client.joinContextGroup(e)}catch(e){if(e.message===a.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup?console.error("The Channel you have tried to join is an App Channel. Custom Channels can only be defined by the Interop Broker through code or manifest configuration. Please use getOrCreateChannel."):console.error(e.message),e.message.startsWith("Attempting to join a context group that does not exist"))throw new Error(o.ChannelError.NoChannelFound);throw new Error(o.ChannelError.AccessDenied)}}async getCurrentChannel(){this.wire.sendAction("fdc3-get-current-channel").catch((e=>{}));const e=await this.getCurrentContextGroupInfo();return e?this.buildChannelObject(e):null}async leaveCurrentChannel(){return this.wire.sendAction("fdc3-leave-current-channel").catch((e=>{})),this.client.removeFromContextGroup()}async getCurrentContextGroupInfo(){const e=await this.client.getContextGroups(),t=e.map((async e=>this.client.getAllClientsInContextGroup(e.id))),n=(await Promise.all(t)).findIndex((e=>e.some((e=>{const{uuid:t,name:n}=e;return this.wire.me.uuid===t&&this.wire.me.name===n}))));return e[n]}async buildChannelObject(e){return{...e,type:"system",addContextListener:(...[e,t])=>{let n,i;"function"==typeof e?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),n=e):(n=t,"string"==typeof e&&(i=e));const r=(async()=>{let e=!0;const t=await this.client.getCurrentContext(i);return this.client.addContextHandler(((i,r)=>{if(!e||(e=!1,!(0,d.default)(t,i)))return n(i,r)}),i)})();return{...r,unsubscribe:()=>r.then((e=>e.unsubscribe()))}},broadcast:this.broadcast.bind(this),getCurrentContext:async e=>{const t=await this.client.getCurrentContext(e);return void 0===t?null:t}}}},e=new WeakMap,tr}ir.PrivateChannelClient=class{constructor(e,t){this.id=t,this.client=e,this.listeners=new Map}async broadcast(e){return this.client.dispatch("broadcast",{context:e})}async getCurrentContext(e){return this.client.dispatch("getCurrentContext",{contextType:e})}async addContextListener(e,t){if("function"!=typeof t)throw new Error("Non-function argument passed to the second parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");let n;n=e?`contextHandler:invoke-${this.id}-${e}-${ar.generateId()}`:`contextHandler:invoke-${this.id}-${ar.generateId()}`,this.client.register(n,ar.wrapContextHandler(t,n));const i={unsubscribe:await this.createContextUnsubscribeCb(n)};return this.listeners.set(n,i),await this.client.dispatch("contextHandlerAdded",{handlerId:n,contextType:e}),i}createNonStandardUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch("nonStandardHandlerRemoved",{handlerId:e})}}createContextUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch("contextHandlerRemoved",{handlerId:e})}}onAddContextListener(e){const t=`onContextHandlerAdded:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch("onAddContextHandlerAdded",{handlerId:t}),n}onDisconnect(e){const t=`onDisconnect:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch("onDisconnectHandlerAdded",{handlerId:t}),n}onUnsubscribe(e){const t=`onUnsubscribe:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch("onUnsubscribeHandlerAdded",{handlerId:t}),n}async cleanUpAllSubs(){Array.from(this.listeners.keys()).forEach((e=>{this.client.remove(e),this.listeners.delete(e)}))}async disconnect(){try{await this.client.dispatch("clientDisconnecting"),await this.cleanUpAllSubs(),await this.client.disconnect()}catch(e){throw new Error(e.message)}}},function(e){var t=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.getIntentResolution=e.isChannel=e.isContext=e.connectPrivateChannel=e.buildAppChannelObject=e.buildPrivateChannelObject=e.ChannelError=e.ResultError=e.UnsupportedChannelApiError=e.getUnsupportedChannelApis=void 0;const n=Hi,r=ir,o=t(i);e.getUnsupportedChannelApis=e=>({addContextListener:()=>{throw new a("Channel.addContextListener",e)},broadcast:()=>{throw new a("Channel.broadcast",e)},getCurrentContext:()=>{throw new a("Channel.getCurrentContext",e)}});class a extends Error{constructor(e,t="System"){super(e),this.message=`Calling ${e} on an instance of a ${t} Channel returned by fdc3.get${t}Channels is not supported. If you would like to use a ${t} Channel, please use fdc3.joinChannel, fdc3.addContextListener, and fdc3.broadcast instead.`}}var c,d;e.UnsupportedChannelApiError=a,function(e){e.NoResultReturned="NoResultReturned",e.IntentHandlerRejected="IntentHandlerRejected"}(c=e.ResultError||(e.ResultError={})),(d=e.ChannelError||(e.ChannelError={})).NoChannelFound="NoChannelFound",d.AccessDenied="AccessDenied",d.CreationFailed="CreationFailed";e.buildPrivateChannelObject=e=>{let t=!1;const n=()=>{if(t)throw new Error("Private Channel Client has been disconnected from the Private Channel")};return{id:e.id,type:"private",broadcast:async t=>(n(),e.broadcast(t)),getCurrentContext:async t=>(n(),e.getCurrentContext(t)),addContextListener:async(t,i)=>{n();let r=i,o=t;"function"==typeof t&&(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),r=t,o=null);return e.addContextListener(o,r)},onAddContextListener:t=>(n(),e.onAddContextListener(t)),disconnect:async()=>(n(),t=!0,e.disconnect()),onDisconnect:t=>(n(),e.onDisconnect(t)),onUnsubscribe:t=>(n(),e.onUnsubscribe(t))}};e.buildAppChannelObject=e=>({id:e.id,type:"app",broadcast:e.setContext,getCurrentContext:async t=>{const n=await e.getCurrentContext(t);return void 0===n?null:n},addContextListener:(t,n)=>{let i,r;"function"==typeof t?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),i=t):(i=n,"string"==typeof t&&(r=t));const s=(async()=>{let t=!0;const n=await e.getCurrentContext(r);return e.addContextHandler(((e,r)=>{if(!t||(t=!1,!(0,o.default)(n,e)))return i(e,r)}),r)})();return{...s,unsubscribe:()=>s.then((e=>e.unsubscribe()))}}});e.connectPrivateChannel=async t=>{try{const n=await fin.InterApplicationBus.Channel.connect(t),i=new r.PrivateChannelClient(n,t);return(0,e.buildPrivateChannelObject)(i)}catch(e){throw new Error(`Private Channel with id: ${t} doesn't exist`)}};e.isContext=e=>{if(e&&"object"==typeof e&&"type"in e){const{type:t}=e;return"string"==typeof t}return!1};e.isChannel=e=>{if(e&&"object"==typeof e&&"type"in e&&"id"in e){const{type:t,id:n}=e;return"string"==typeof t&&"string"==typeof n&&("app"===t||"private"===t)}return!1};e.getIntentResolution=async(t,i,r,o)=>{const s=(0,n.generateId)(),a=new Promise(((e,t)=>{fin.InterApplicationBus.subscribe({uuid:"*"},s,(t=>{e(t)})).catch((()=>t(new Error("getResult is not supported in this environment"))))})),d=r?{target:r,intentResolutionResultId:s}:{intentResolutionResultId:s},h=o?{name:o,context:i,metadata:d}:{...i,metadata:d},l=async()=>{let n=await a;if(!n||"object"!=typeof n)throw new Error(c.NoResultReturned);const{error:i}=n;if(i)throw new Error(c.IntentHandlerRejected);if((0,e.isChannel)(n)){const{id:i,type:r}=n;switch(r){case"private":n=await(0,e.connectPrivateChannel)(i);break;case"app":{const r=await t.joinSessionContextGroup(i);n=(0,e.buildAppChannelObject)(r);break}}}else if(!(0,e.isContext)(n))throw new Error(c.NoResultReturned);return n},u=o?await t.fireIntent(h):await t.fireIntentForContext(h);return"object"!=typeof u?{source:{appId:"",instanceId:""},intent:"",version:"2.0",getResult:l}:{...u,getResult:l}}}(nr);var lr,ur,pr={};function wr(){if(ur)return Ki;ur=1;var e,t,n=s&&s.__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},i=s&&s.__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)},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ki,"__esModule",{value:!0}),Ki.InteropClient=void 0;const o=d,a=r(qi),c=function(){if(dr)return er;dr=1,Object.defineProperty(er,"__esModule",{value:!0}),er.Fdc3Module=void 0;const e=Hi,t=hr();class n extends t.FDC3ModuleBase{async open(e,t){await super._open(e,t)}addContextListener(e,t){let n;return this.wire.sendAction("fdc3-add-context-listener").catch((e=>{})),"function"==typeof e?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),n=this.client.addContextHandler(e)):n=this.client.addContextHandler(t,null===e?void 0:e),{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}addIntentListener(e,t){this.wire.sendAction("fdc3-add-intent-listener").catch((e=>{}));const n=this.client.registerIntentHandler((e=>{const{context:n,metadata:i}=e,{metadata:r}=n,o=i?.intentResolutionResultId||r?.intentResolutionResultId;o&&this.fin.InterApplicationBus.publish(o,null).catch((()=>null)),t(e.context)}),e,{fdc3Version:"1.2"});return{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}async raiseIntent(t,n,i){this.wire.sendAction("fdc3-raise-intent").catch((e=>{}));const r=i?{name:t,context:n,metadata:{target:i}}:{name:t,context:n};try{return await this.client.fireIntent(r)}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntent?"ResolverUnavailable":t.message;throw new Error(n)}}async findIntent(t,n){this.wire.sendAction("fdc3-find-intent").catch((e=>{}));try{return await this.client.getInfoForIntent({name:t,context:n})}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntent?"ResolverUnavailable":t.message;throw new Error(n)}}async findIntentsByContext(t){this.wire.sendAction("fdc3-find-intents-by-context").catch((e=>{}));try{return await this.client.getInfoForIntentsByContext(t)}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntentsByContext?"ResolverUnavailable":t.message;throw new Error(n)}}async raiseIntentForContext(t,n){this.wire.sendAction("fdc3-raise-intent-for-context").catch((e=>{}));try{return await this.client.fireIntentForContext({...t,metadata:{target:n}})}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntentForContext?"ResolverUnavailable":t.message;throw new Error(n)}}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}getInfo(){return this.wire.sendAction("fdc3-get-info").catch((e=>{})),{providerVersion:this.wire.environment.getAdapterVersionSync(),provider:`openfin-${this.wire.me.uuid}`,fdc3Version:"1.2"}}}return er.Fdc3Module=n,er}(),h=function(){if(lr)return pr;lr=1,Object.defineProperty(pr,"__esModule",{value:!0}),pr.Fdc3Module2=void 0;const e=hr(),t=Hi,n=wr(),i=nr,r=ir;class o extends e.FDC3ModuleBase{async open(e,t){return"string"==typeof e&&console.warn("Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string })."),super._open(e,t)}async findInstances(e){this.wire.sendAction("fdc3-find-instances").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,"fdc3FindInstances",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3FindInstances?"ResolverUnavailable":e.message;throw new Error(n)}}async getAppMetadata(e){this.wire.sendAction("fdc3-get-app-metadata").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,"fdc3GetAppMetadata",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3GetAppMetadata?"ResolverUnavailable":e.message;throw new Error(n)}}async addContextListener(e,t){this.wire.sendAction("fdc3-add-context-listener").catch((e=>{}));const n=e=>t=>{const{contextMetadata:n,...i}=t,r=n?[{...i},n]:[t,null];e(...r)};let i=t,r=n(i);return"function"==typeof e?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),i=e,r=n(i),this.client.addContextHandler(r)):this.client.addContextHandler(r,null===e?void 0:e)}async findIntent(e,n,i){this.wire.sendAction("fdc3-find-intent").catch((e=>{}));try{return await this.client.getInfoForIntent({name:e,context:n,metadata:{resultType:i}})}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntent?"ResolverUnavailable":e.message;throw new Error(n)}}async findIntentsByContext(e,i){this.wire.sendAction("fdc3-find-intents-by-context").catch((e=>{}));const r=i?{context:e,metadata:{resultType:i}}:e;try{return await n.InteropClient.ferryFdc3Call(this.client,"fdc3v2FindIntentsByContext",r)}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntentsByContext?"ResolverUnavailable":e.message;throw new Error(n)}}async raiseIntent(e,n,r){this.wire.sendAction("fdc3-raise-intent").catch((e=>{}));try{return"string"==typeof r&&console.warn("Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string })."),(0,i.getIntentResolution)(this.client,n,r,e)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?"ResolverUnavailable":e.message;throw new Error(n)}}async raiseIntentForContext(e,n){this.wire.sendAction("fdc3-raise-intent-for-context").catch((e=>{}));try{return"string"==typeof n&&console.warn("Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string })."),(0,i.getIntentResolution)(this.client,e,n)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?"ResolverUnavailable":e.message;throw new Error(n)}}async addIntentListener(e,t){if(this.wire.sendAction("fdc3-add-intent-listener").catch((e=>{})),"string"!=typeof e)throw new Error("First argument must be an Intent name");return this.client.registerIntentHandler((async e=>{let n,i;const{context:r,metadata:o}=e,{contextMetadata:s,metadata:a,...c}=r,d=o?.intentResolutionResultId||a?.intentResolutionResultId;try{const e=a?{metadata:a,...c}:{...c};n=await t(e,s),i=n}catch(e){n=e,i={error:!0}}if(d&&this.fin.InterApplicationBus.publish(d,i).catch((()=>null)),n instanceof Error)throw new Error(n.message);return n}),e,{fdc3Version:"2.0"})}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}async createPrivateChannel(){const e=(0,t.generateId)();await n.InteropClient.ferryFdc3Call(this.client,"createPrivateChannelProvider",{channelId:e});const o=await this.fin.InterApplicationBus.Channel.connect(e),s=new r.PrivateChannelClient(o,e);return(0,i.buildPrivateChannelObject)(s)}async getUserChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:"user",...(0,i.getUnsupportedChannelApis)("User")})))}async getSystemChannels(){return console.warn("This API has been deprecated. Please use fdc3.getUserChannels instead."),super.getSystemChannels()}async joinUserChannel(e){return super.joinChannel(e)}async joinChannel(e){return console.warn("This API has been deprecated. Please use fdc3.joinUserChannel instead."),super.joinChannel(e)}async getCurrentChannel(){const e=await super.getCurrentChannel();return e?{...e,type:"user",broadcast:this.broadcast.bind(this)}:null}async getInfo(){return n.InteropClient.ferryFdc3Call(this.client,"fdc3v2GetInfo",{fdc3Version:"2.0"})}}return pr.Fdc3Module2=o,pr}(),l=Hi;let u=class extends o.Base{constructor(i,r){super(i),e.set(this,void 0),t.set(this,void 0),n(this,t,new Map,"f"),n(this,e,r,"f")}async setContext(t){this.wire.sendAction("interop-client-set-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("setContext",{context:t})}async addContextHandler(t,n){if(this.wire.sendAction("interop-client-add-context-handler").catch((e=>{})),"function"!=typeof t)throw new Error("Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");const r=await i(this,e,"f");let o;o=n?`invokeContextHandler-${n}-${(0,l.generateId)()}`:"invokeContextHandler";const s=(0,l.wrapContextHandler)(t,o);return r.register(o,s),await r.dispatch("contextHandlerRegistered",{handlerId:o,contextType:n}),{unsubscribe:async()=>{r.remove(o),await r.dispatch("removeContextHandler",{handlerId:o})}}}async getContextGroups(){this.wire.sendAction("interop-client-get-context-groups").catch((e=>{}));return(await i(this,e,"f")).dispatch("getContextGroups")}async joinContextGroup(t,n){this.wire.sendAction("interop-client-join-context-group").catch((e=>{}));const r=await i(this,e,"f");if(!t)throw new Error("No contextGroupId specified for joinContextGroup.");return r.dispatch("joinContextGroup",{contextGroupId:t,target:n})}async removeFromContextGroup(t){this.wire.sendAction("interop-client-remove-from-context-group").catch((e=>{}));return(await i(this,e,"f")).dispatch("removeFromContextGroup",{target:t})}async getAllClientsInContextGroup(t){this.wire.sendAction("interop-client-get-all-clients-in-context-group").catch((e=>{}));const n=await i(this,e,"f");if(!t)throw new Error("No contextGroupId specified for getAllClientsInContextGroup.");return n.dispatch("getAllClientsInContextGroup",{contextGroupId:t})}async getInfoForContextGroup(t){this.wire.sendAction("interop-client-get-info-for-context-group").catch((e=>{}));const n=await i(this,e,"f");if(!t)throw new Error("No contextGroupId specified for getInfoForContextGroup.");return n.dispatch("getInfoForContextGroup",{contextGroupId:t})}async fireIntent(t){this.wire.sendAction("interop-client-fire-intent").catch((e=>{}));return(await i(this,e,"f")).dispatch("fireIntent",t)}async registerIntentHandler(t,n,r){this.wire.sendAction("interop-client-register-intent-handler").catch((e=>{}));const o=await i(this,e,"f"),s=`intent-handler-${n}`,a=(0,l.wrapIntentHandler)(t,s);try{await o.register(s,a),await o.dispatch("intentHandlerRegistered",{handlerId:s,...r})}catch(e){throw new Error("Unable to register intent handler")}return{unsubscribe:async()=>{o.remove(s)}}}async getCurrentContext(t){this.wire.sendAction("interop-client-get-current-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("getCurrentContext",{contextType:t})}async getInfoForIntent(t){this.wire.sendAction("interop-client-get-info-for-intent").catch((e=>{}));return(await i(this,e,"f")).dispatch("getInfoForIntent",t)}async getInfoForIntentsByContext(t){this.wire.sendAction("interop-client-get-info-for-intents-by-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("getInfoForIntentsByContext",t)}async fireIntentForContext(t){this.wire.sendAction("interop-client-fire-intent-for-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("fireIntentForContext",t)}async joinSessionContextGroup(n){try{const r=i(this,t,"f").get(n);if(r)return r.getUserInstance();const o=await i(this,e,"f"),{hasConflict:s}=await o.dispatch("sessionContextGroup:createIfNeeded",{sessionContextGroupId:n});s&&console.warn(`A (non-session) context group with the name "${n}" already exists. If you are trying to join a Context Group, call joinContextGroup instead.`);const c=new a.default(this.wire,i(this,e,"f"),n);return i(this,t,"f").set(n,c),c.getUserInstance()}catch(e){throw console.error(`Error thrown trying to create Session Context Group with id "${n}": ${e}`),e}}async onDisconnection(t){this.wire.sendAction("interop-client-add-ondisconnection-listener").catch((e=>{}));return(await i(this,e,"f")).onDisconnection((e=>{const{uuid:n}=e;t({type:"interop-broker",topic:"disconnected",brokerName:n})}))}getFDC3Sync(e){switch(e){case"1.2":return new c.Fdc3Module((()=>this),this.wire);case"2.0":return new h.Fdc3Module2((()=>this),this.wire);default:throw new Error(`Invalid FDC3 version provided: ${e}. Must be '1.2' or '2.0'`)}}async getFDC3(e){return this.getFDC3Sync(e)}static async ferryFdc3Call(t,n,r){return(await i(t,e,"f")).dispatch(n,r||null)}};return Ki.InteropClient=u,e=new WeakMap,t=new WeakMap,Ki}var yr,fr,gr,mr={};function vr(){if(yr)return mr;yr=1,Object.defineProperty(mr,"__esModule",{value:!0}),mr.overrideCheck=mr.checkFDC32Overrides=mr.getDefaultViewFdc3VersionFromAppInfo=void 0;const e=Vi();function t(t){return["fdc3HandleFindInstances","handleInfoForIntent","handleInfoForIntentsByContext","fdc3HandleGetAppMetadata","fdc3HandleGetInfo","fdc3HandleOpen","handleFiredIntent","handleFiredIntentForContext"].filter((n=>t[n]===e.InteropBroker.prototype[n]))}return mr.getDefaultViewFdc3VersionFromAppInfo=function({manifest:e,initialOptions:t}){const n=e?.platform?.defaultViewOptions?.fdc3InteropApi??t.defaultViewOptions?.fdc3InteropApi;return["1.2","2.0"].includes(n??"")?n:void 0},mr.checkFDC32Overrides=t,mr.overrideCheck=function(e,n){if(n&&"2.0"===n){const n=t(e);n.length>0&&console.warn(`WARNING: FDC3 2.0 has been set as a default option for Views in this Platform, but the required InteropBroker APIs for FDC3 2.0 compliance have not all been overridden.\nThe following APIs need to be overridden:\n${n.join("\n")}`)}},mr}function Cr(){return gr||(gr=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),i=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),i(function(){if(fr)return Ti;fr=1;var e=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ti,"__esModule",{value:!0}),Ti.InteropModule=void 0;const t=e(n),i=$i,r=d,o=Vi(),a=wr(),c=vr(),h=Tn,l=e=>new e,u="You have attempted to use or modify InteropBroker parameters, which is not allowed. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.";class p extends r.Base{async init(e,n=l){this.wire.sendAction("interop-init").catch((()=>{}));const r=await this.wire.environment.getInteropInfo(this.wire.getFin()),s=(0,i.createUnusableObject)(u),a=(0,i.createWarningObject)(u,(0,t.default)(r)),d=async()=>{throw new Error(u)},p=o.InteropBroker.createClosedConstructor(this.wire,(()=>this.fin.InterApplicationBus.Channel.create(`interop-broker-${e}`)),r);let w;return w=Array.isArray(n)?new((0,h.overrideFromComposables)(...n)(p))(s,d,a):await n(p,s,d,a),(0,c.overrideCheck)(w,r.fdc3Version),w}connectSync(e,t){return this.wire.sendAction("interop-connect-sync").catch((()=>{})),new a.InteropClient(this.wire,this.wire.environment.whenReady().then((()=>this.fin.InterApplicationBus.Channel.connect(`interop-broker-${e}`,{payload:t}))))}}return Ti.InteropModule=p,Ti}(),e),i(wr(),e),i(Vi(),e)}(Li)),Li}var br={},Ir={},Er={},xr={};Object.defineProperty(xr,"__esModule",{value:!0}),xr.getSnapshotSourceChannelName=void 0;xr.getSnapshotSourceChannelName=e=>`snapshot-source-provider-${e.uuid}`;var Ar,Pr,Mr,_r,Or,Sr=s&&s.__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},Rr=s&&s.__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)};Object.defineProperty(Er,"__esModule",{value:!0}),Er.SnapshotSource=void 0;const Fr=d,jr=xr,kr=new Map;class Lr extends Fr.Base{constructor(e,t){super(e),Ar.set(this,void 0),Pr.set(this,(()=>(kr.has(this.identity.uuid)||kr.set(this.identity.uuid,{eventFired:null,clientPromise:null}),kr.get(this.identity.uuid)))),Mr.set(this,(()=>(Rr(this,Pr,"f").call(this).clientPromise||(Rr(this,Pr,"f").call(this).clientPromise=Rr(this,_r,"f").call(this)),Rr(this,Pr,"f").call(this).clientPromise))),_r.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);try{Rr(this,Pr,"f").call(this).eventFired||await Rr(this,Or,"f").call(this);const t=await this.fin.InterApplicationBus.Channel.connect(e,{wait:!1});return t.onDisconnection((()=>{Rr(this,Pr,"f").call(this).clientPromise=null,Rr(this,Pr,"f").call(this).eventFired=null})),t}catch(e){throw Rr(this,Pr,"f").call(this).clientPromise=null,new Error("The targeted SnapshotSource is not currently initialized. Await this object's ready() method.")}})),Or.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);let t,n;const i=new Promise(((e,i)=>{t=e,n=i}));Rr(this,Pr,"f").call(this).eventFired=i;const r=async i=>{try{i.channelName===e&&(t(),await this.fin.InterApplicationBus.Channel.removeListener("connected",r))}catch(e){n(e)}};await this.fin.InterApplicationBus.Channel.on("connected",r)})),Sr(this,Ar,t,"f")}get identity(){return Rr(this,Ar,"f")}async ready(){this.wire.sendAction("snapshot-source-ready").catch((e=>{}));try{await Rr(this,Mr,"f").call(this)}catch(e){await Rr(this,Pr,"f").call(this).eventFired}}async getSnapshot(){this.wire.sendAction("snapshot-source-get-snapshot").catch((e=>{}));const e=await Rr(this,Mr,"f").call(this),t=await e.dispatch("get-snapshot");return(await t).snapshot}async applySnapshot(e){this.wire.sendAction("snapshot-source-apply-snapshot").catch((e=>{}));return(await Rr(this,Mr,"f").call(this)).dispatch("apply-snapshot",{snapshot:e})}}Er.SnapshotSource=Lr,Ar=new WeakMap,Pr=new WeakMap,Mr=new WeakMap,_r=new WeakMap,Or=new WeakMap,Object.defineProperty(Ir,"__esModule",{value:!0}),Ir.SnapshotSourceModule=void 0;const Tr=d,$r=Er,Br=xr;class Gr extends Tr.Base{async init(e){if(this.wire.sendAction("snapshot-source-init").catch((e=>{})),"object"!=typeof e||"function"!=typeof e.getSnapshot||"function"!=typeof e.applySnapshot)throw new Error("you must pass in a valid SnapshotProvider");const t=await this.fin.InterApplicationBus.Channel.create((0,Br.getSnapshotSourceChannelName)(this.fin.me));t.register("get-snapshot",(async()=>({snapshot:await e.getSnapshot()}))),t.register("apply-snapshot",(({snapshot:t})=>e.applySnapshot(t)))}wrapSync(e){return this.wire.sendAction("snapshot-source-wrap-sync").catch((e=>{})),new $r.SnapshotSource(this.wire,e)}async wrap(e){return this.wire.sendAction("snapshot-source-wrap").catch((e=>{})),this.wrapSync(e)}}Ir.SnapshotSourceModule=Gr,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Ir,e),n(Er,e)}(br),Object.defineProperty(a,"__esModule",{value:!0});var Wr=a.Fin=void 0;const Hr=t,Nr=c,Dr=ie(),Ur=Z(),Vr=de,zr=en,Kr=rn,qr=un,Jr=bn,Yr=J(),Zr=An,Qr=ki,Xr=Cr(),eo=br;class to extends Hr.EventEmitter{constructor(e){super(),this.wire=e,this.System=new Nr.System(e),this.Window=new Dr._WindowModule(e),this.Application=new Ur.ApplicationModule(e),this.InterApplicationBus=new Vr.InterApplicationBus(e),this.Clipboard=new zr.Clipboard(e),this.ExternalApplication=new Kr.ExternalApplicationModule(e),this.Frame=new qr._FrameModule(e),this.GlobalHotkey=new Jr.GlobalHotkey(e),this.Platform=new Zr.PlatformModule(e,this.InterApplicationBus.Channel),this.View=new Yr.ViewModule(e),this.Interop=new Xr.InteropModule(e),this.SnapshotSource=new eo.SnapshotSourceModule(e),e.registerFin(this),this.me=(0,Qr.getMe)(e),e.on("disconnected",(()=>{this.emit("disconnected")}))}}Wr=a.Fin=to;var no={},io={};function ro(e){return"string"==typeof e.manifestUrl}function oo(e){return ao(e)&&"string"==typeof e.address}function so(e){return oo(e)&&"string"==typeof e.token}function ao(e){return"string"==typeof e.uuid}function co(e){return e.runtime&&"string"==typeof e.runtime.version}function ho(e){return ao(e)&&co(e)}Object.defineProperty(io,"__esModule",{value:!0}),io.isInternalConnectConfig=io.isPortDiscoveryConfig=io.isNewConnectConfig=io.isConfigWithReceiver=io.isRemoteConfig=io.isExistingConnectConfig=io.isExternalConfig=void 0,io.isExternalConfig=ro,io.isExistingConnectConfig=oo,io.isRemoteConfig=so,io.isConfigWithReceiver=function(e){return"object"==typeof e.receiver&&so({...e,address:""})},io.isNewConnectConfig=ho,io.isPortDiscoveryConfig=function(e){return ro(e)&&co(e)||ho(e)},io.isInternalConnectConfig=function(e){return oo(e)||ho(e)};var lo={},uo={};Object.defineProperty(uo,"__esModule",{value:!0}),uo.EmitterMap=void 0;const po=t;function wo(e){return Buffer.from(e).toString("base64")}uo.EmitterMap=class{constructor(){this.storage=new Map}hashKeys(e){return e.map(wo).join("/")}getOrCreate(e){const t=this.hashKeys(e);return this.storage.has(t)||this.storage.set(t,new po.EventEmitter),this.storage.get(t)}has(e){return this.storage.has(this.hashKeys(e))}delete(e){const t=this.hashKeys(e);return this.storage.delete(t)}},Object.defineProperty(lo,"__esModule",{value:!0});const yo=uo;class fo extends yo.EmitterMap{constructor(){super(...arguments),this.dispatchEvent=e=>{if(function(e){return"process-desktop-event"===e.action}(e)){const{payload:t}=e,n=function(e){const{topic:t}=e;if("frame"===t||"window"===t||"view"===t){const{uuid:n,name:i}=e;return[t,n,i]}if("application"===t){const{uuid:n}=e;return[t,n]}return[t]}(t);if(this.has(n))return this.getOrCreate(n).emit(t.type,t),!0}return!1}}}lo.default=fo;var go,mo,vo=s&&s.__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},Co=s&&s.__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)},bo=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(no,"__esModule",{value:!0});var Io=no.Transport=void 0;const Eo=t,xo=io,Ao=g,Po=bo(lo),Mo=ki,_o=ke;class Oo extends Eo.EventEmitter{constructor(e,t,n){super(),this.wireListeners=new Map,this.topicRefMap=new Map,this.eventAggregator=new Po.default,this.messageHandlers=[this.eventAggregator.dispatchEvent],go.set(this,void 0),mo.set(this,void 0),this.connectSync=()=>{Co(this,go,"f").connectSync()},this.getPort=()=>Co(this,go,"f").getPort(),vo(this,go,new e(this.onmessage.bind(this)),"f"),this.environment=t,this.sendRaw=Co(this,go,"f").send.bind(Co(this,go,"f")),this.registerMessageHandler(this.handleMessage.bind(this)),Co(this,go,"f").on("disconnected",(()=>{for(const[,{handleNack:e}]of this.wireListeners)e({reason:"Remote connection has closed"});this.wireListeners.clear(),this.emit("disconnected")}));const{uuid:i,name:r}=n,o=this.environment.getCurrentEntityType();this.me=(0,Mo.getBaseMe)(o,i,r)}getFin(){if(!Co(this,mo,"f"))throw new Error("No Fin object registered for this transport");return Co(this,mo,"f")}registerFin(e){if(Co(this,mo,"f"))throw new Error("Fin object has already been registered for this transport");vo(this,mo,e,"f")}shutdown(){return Co(this,go,"f").shutdown()}async connect(e){if((0,xo.isConfigWithReceiver)(e))return await Co(this,go,"f").connect(e.receiver),this.authorize(e);if((0,xo.isRemoteConfig)(e))return this.connectRemote(e);if((0,xo.isExistingConnectConfig)(e))return this.connectByPort(e);if((0,xo.isNewConnectConfig)(e)){const t=await this.environment.retrievePort(e);return this.connectByPort({...e,address:`ws://localhost:${t}`})}}async connectRemote(e){return await Co(this,go,"f").connect(new(this.environment.getWsConstructor())(e.address)),this.authorize(e)}async connectByPort(e){const{address:t,uuid:n}=e,i={...e,type:"file-token"},r=Co(this,go,"f");await r.connect(new(this.environment.getWsConstructor())(e.address));const o=await this.sendAction("request-external-authorization",{uuid:n,type:"file-token"},!0);if("external-authorization-response"!==o.action)throw new Ao.UnexpectedActionError(o.action);return await this.environment.writeToken(o.payload.file,o.payload.token),this.authorize(i)}async authorize(e){const t=await this.sendAction("request-authorization",e,!0);if("authorization-response"!==t.action)throw new Ao.UnexpectedActionError(t.action);if(!0!==t.payload.success)throw new Ao.RuntimeError(t.payload)}sendAction(e,t={},n=!1){let i=()=>{};const r=Ao.RuntimeError.getCallSite(1),o=this.environment.getNextMessageId(),s=new Promise(((s,a)=>{i=a;const c={action:e,payload:t,messageId:o},d=Co(this,go,"f");return this.addWireListener(o,s,(e=>this.nackHandler(e,a,r)),n),d.send(c).catch(a)}));return Object.assign(s,{cancel:i,messageId:o})}nackHandler(e,t,n){t("string"==typeof e?e:new Ao.RuntimeError(e,n))}ferryAction(e){return new Promise(((t,n)=>{const i=this.environment.getNextMessageId();e.messageId=i;const r=e=>{t(e.payload)};return Co(this,go,"f").send(e).then((()=>this.addWireListener(i,r,(e=>this.nackHandler(e,n)),!1))).catch(n)}))}registerMessageHandler(e){this.messageHandlers.push(e)}addWireListener(e,t,n,i){i?this.uncorrelatedListener=t:this.wireListeners.has(e)?n({reason:"Duplicate handler id",error:(0,_o.errorToPOJO)(new Ao.DuplicateCorrelationError(String(e)))}):this.wireListeners.set(e,{resolve:t,handleNack:n})}onmessage(e){for(const t of this.messageHandlers)t.call(null,e)}handleMessage(e){const t=e.correlationId||NaN;if("correlationId"in e){if(!this.wireListeners.has(t))return!1;{const{resolve:n,handleNack:i}=this.wireListeners.get(t);"ack"!==e.action?i({reason:"Did not receive ack action",error:(0,_o.errorToPOJO)(new Ao.NoAckError(e.action))}):"payload"in e?e.payload.success?n.call(null,e):i(e.payload):"string"==typeof e.reason?i(e):(console.warn("Received invalid response from core",e),i({reason:"invalid response shape"})),this.wireListeners.delete(t)}}else this.uncorrelatedListener&&this.uncorrelatedListener.call(null,e),this.uncorrelatedListener=()=>{};return!0}}Io=no.Transport=Oo,go=new WeakMap,mo=new WeakMap;const So=(...e)=>({log:(...t)=>console.debug(`[${(new Date).toISOString()}]`,...(e=>e.map((e=>`[${e}]`)))(e),...t),getLogger:(...t)=>So(...e,...t)}),Ro=So("@openfin/core-web/client");function Fo(e,t){if(!function(e){return"string"==typeof e}(e))throw new Error(`Property ${t} has invalid type. Expected string, got ${typeof e}.`)}const jo="web-broker-ports-ready",ko=Ro.getLogger("get-web-interop-ports");function Lo(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)}function To(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}"function"==typeof SuppressedError&&SuppressedError;const $o=e=>{var n,i,r;return r=class extends t.EventEmitter{constructor(t){super(),n.set(this,void 0),i.set(this,!1),this.connectSync=()=>{Lo(this,i,"f")||(e.addEventListener("message",(e=>{e.data?.topic?.startsWith("wire-message")&&e.data.message&&Lo(this,n,"f").call(this,{...JSON.parse(e.data.message),ports:e.ports})})),e.start())},this.connect=async()=>{this.connectSync()},this.send=t=>(e.postMessage({topic:"wire-message",message:JSON.stringify(t)}),Promise.resolve()),this.shutdown=async()=>{e.close()},To(this,n,t,"f")}getPort(){return e}},n=new WeakMap,i=new WeakMap,r};var Bo={},Go={};Object.defineProperty(Go,"__esModule",{value:!0}),Go.BaseEnvironment=void 0;const Wo=vr();Go.BaseEnvironment=class{async getViewWindowIdentity(e,t){const{identity:n}=await e.View.wrapSync(t).getCurrentWindow();return n}async getInteropInfo(e){const t=await e.Application.getCurrentSync().getInfo().catch((()=>null)),n=t?.initialOptions?.interopBrokerConfiguration??{};return{fdc3Version:t?(0,Wo.getDefaultViewFdc3VersionFromAppInfo)(t):void 0,...n,fdc3Info:{providerVersion:await e.System.getVersion(),provider:"OpenFin"}}}},Object.defineProperty(Bo,"__esModule",{value:!0});var Ho=Bo.BrowserEnvironment=void 0;const No=Go;class Do extends No.BaseEnvironment{constructor(){super(...arguments),this.type="other",this.getRandomId=()=>{const e=new Uint32Array(1);return window.crypto.getRandomValues(e)[0].toString(32)}}getAdapterVersionSync(){return""}observeBounds(e,t){throw new Error("Method not implemented.")}layoutAllowedInContext(e){return!1}initLayoutManager(e,t,n){throw new Error("Method not implemented.")}applyLayoutSnapshot(e,t,n){throw new Error("Method not implemented.")}createLayout(e,t){throw new Error("Method not implemented.")}destroyLayout(e,t){throw new Error("Method not implemented.")}resolveLayout(e,t){throw new Error("Method not implemented.")}initPlatform(...e){throw new Error("Method not implemented.")}writeToken(e,t){return Promise.resolve("")}retrievePort(e){throw new Error("Method not implemented.")}getNextMessageId(){return this.getRandomId()}createChildContent(e){throw new Error("Method not implemented.")}getWebWindow(e){throw new Error("Method not implemented.")}getCurrentEntityIdentity(){throw new Error("Method not implemented.")}getCurrentEntityType(){return"external connection"}raiseEvent(e,t){throw new Error("Method not implemented.")}getUrl(){return location.href}getDefaultChannelOptions(){return{create:{},connect:{}}}getRtcPeer(){return new RTCPeerConnection}getWsConstructor(){return WebSocket}whenReady(){return Promise.resolve()}}Ho=Bo.BrowserEnvironment=Do;const Uo=e=>"platform"in e&&void 0!==e.platform;var Vo,zo;class Ko extends Ho{constructor(e){super(),this.connectConfig=e,Vo.set(this,void 0),zo.set(this,new W((async()=>Promise.resolve().then((function(){return __webpack_require__(/*! ./main-b14f67c9.js */ "../../node_modules/@openfin/core-web/out/main-b14f67c9.js")}))))),Uo(e)&&this.validatePlatformOptions(e)}getAdapterVersionSync(){return"0.39.21"}validatePlatformOptions({platform:e}){if(!("layoutSnapshot"in e))throw new Error("Platform options are missing layoutSnapshot. Please provide a layoutSnapshot in the platform options.");if("windows"in e||"windows"in e.layoutSnapshot)throw new Error("It appears you tried to call connect() with a snapshot object from an OpenFin desktop environment. Note that connect() expects to be called with a platform property with this structure: { platform: { layoutSnapshot } }. To get a layoutSnapshot of the expected structure, use fin.Platform.Layout.getCurrentLayoutManagerSync().getLayoutSnapshot() in v34+ in your desktop environment.");const{layouts:t}=e.layoutSnapshot;Object.entries(t).map((([e,t])=>{if("object"!=typeof t||null===t)throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must be an object.`);if(!("content"in t))throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must contain a 'content' property.`)}))}async getInteropInfo(e){return{...{contextGroups:void 0,logging:{beforeAction:{enabled:!1},afterAction:{enabled:!1}}},fdc3Version:void 0,fdc3Info:{providerVersion:"0.39.21",provider:"OpenFin Web"}}}layoutAllowedInContext(e){return!0}async initLayoutManager(e,t,n){if(Lo(this,Vo,"f"))throw new Error("Layout already initialized.");if(!Uo(this.connectConfig))throw new Error("Platform options are missing from connection config.");const{WebLayoutEntryPoint:i}=await Lo(this,zo,"f").getValue();return To(this,Vo,new i(this.connectConfig),"f"),await Lo(this,Vo,"f").initLayoutManager(e,t,n)}async applyLayoutSnapshot(e,t,n){Lo(this,Vo,"f")?.applyLayoutSnapshot(e,t,n)}async createLayout(e,t){return Lo(this,Vo,"f")?.createLayout(e,t)}async destroyLayout(e,t){return Lo(this,Vo,"f")?.destroyLayout(e,t)}async getViewWindowIdentity(e,t){return Promise.resolve({uuid:t.uuid,name:t.uuid})}}Vo=new WeakMap,zo=new WeakMap;const qo=()=>{const e=((e,t)=>{const n=new RegExp(`^${t}<(?.*)>$`).exec(e)?.groups?.meta;if(n)try{return JSON.parse(atob(n))}catch(e){throw new Error(`Failed to decode JSON from ${n}.`)}})(window.name,"of-frame");if(e)try{const{name:t,uuid:n,brokerUrl:i,providerId:r,contextGroup:o}=e;return Fo(i,"brokerUrl"),Fo(n,"uuid"),Fo(t,"name"),{identity:{name:t,uuid:n},brokerUrl:i,interopConfig:{providerId:r,currentContextGroup:o}}}catch(e){throw new Error(`Unexpected error occurred when inferring platform information: ${e.stack}`)}},Jo=()=>{const e=r.v4();return{uuid:e,name:e}},Yo=async e=>{if("enabled"===e.connectionInheritance){const t=await(async e=>{const t=qo();if(t){const{validateOptions:n=(()=>!0)}=e,{identity:i,...r}=t;if(!await n(r))throw new Error("Parent options were rejected by validateOptions.");return t}})(e);if(t)return t}if(!e.options){const t="enabled"===e.connectionInheritance?"Broker URL was not specified nor provided by a platform container.":"Connection inheritance is disabled but no options were provided.";throw new Error(t)}return{...e.options,identity:Jo()}};exports.__classPrivateFieldGet=Lo,exports.__classPrivateFieldSet=To,exports.apiExposer=Gn,exports.commonjsGlobal=s,exports.connect=async t=>{try{Ro.log("Establishing connection",t);const{brokerUrl:n,identity:i,timeout:r,interopConfig:s}=await Yo(t),{workerPort:a,iframeBrokerPort:c}=await(async(e,t,n)=>{const{origin:i}=new URL(e),r=document.createElement("IFRAME");let s;r.style.display="none";try{return await new Promise(((a,c)=>{const d=e=>{if(e.source===r.contentWindow&&e.data?.topic===`ack-${jo}`){if(e.origin!==i)c(new Error(`Broker redirected to unexpected origin ${e.origin}, expected ${i}.`));else if(e.data.success){const[t,n]=e.ports;a({iframeBrokerPort:t,workerPort:n})}else c(new m(e.data));window.removeEventListener("message",d),clearTimeout(s)}};window.addEventListener("message",d),ko.log(`Connecting to broker ${e}`),r.setAttribute("src",e),r.setAttribute("name",o(t,"of-broker")),document.body.appendChild(r),ko.log("Iframe loaded, awaiting init message from iframe"),n&&(s=setTimeout((()=>{window.removeEventListener("message",d),document.body.removeChild(r),c(new Error("Worker did not initialize in time"))}),n))}))}catch(e){throw new Error(`Failed to initialise Fin Web Client. ${e.message}`,{cause:e})}})(n,i,r);Ro.log("Successfully established connection to shared worker");const d={entityType:"external connection",...i};a.start(),c.start();const h=((t,n,i)=>{const r=$o(n),o=new Ko(t),s=new Io(r,o,i);return s.connectSync(),window.Buffer=e.Buffer,new Wr(s)})(t,a,d);return s?.providerId&&(h.me.interop=h.Interop.connectSync(s.providerId),s?.currentContextGroup&&h.me.interop.joinContextGroup(s.currentContextGroup).catch((e=>{console.warn(`Error joining specified context group: ${s?.currentContextGroup}, continuing`,e)}))),{...h,me:{...h.me,identity:{uuid:h.me.uuid,name:h.me.name}}}}catch(e){throw new Error(`An error occured during web-interop connection: ${e.message}`)}},exports.decorators=Nn,exports.encodeOptions=o,exports.layout_constants=ai,exports.lazy=G; /***/ }), -/***/ "./node_modules/@openfin/core-web/out/main-b14f67c9.js": -/*!*************************************************************!*\ - !*** ./node_modules/@openfin/core-web/out/main-b14f67c9.js ***! - \*************************************************************/ +/***/ "../../node_modules/@openfin/core-web/out/main-b14f67c9.js": +/*!*****************************************************************!*\ + !*** ../../node_modules/@openfin/core-web/out/main-b14f67c9.js ***! + \*****************************************************************/ /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; -var t=__webpack_require__(/*! ./main-8cad4070.js */ "./node_modules/@openfin/core-web/out/main-8cad4070.js"),e=__webpack_require__(/*! uuid */ "../../node_modules/uuid/dist/esm-browser/index.js");__webpack_require__(/*! buffer/ */ "../../node_modules/buffer/index.js"),__webpack_require__(/*! events */ "../../node_modules/events/events.js"),__webpack_require__(/*! lodash/cloneDeep */ "../../node_modules/lodash/cloneDeep.js"),__webpack_require__(/*! lodash/isEqual */ "../../node_modules/lodash/isEqual.js");var i={},n={};Object.defineProperty(n,"__esModule",{value:!0}),n.mapValuesAsync=n.mapEntriesAsync=void 0;const o=(t,[e,i])=>({...t,[e]:i});async function s(t,e){return(await Promise.all(e.map((async([e,i])=>[e,await t(i,e)])))).reduce(o,{})}n.mapEntriesAsync=s,n.mapValuesAsync=async function(t,e){let i;return i=e instanceof Map?[...e.entries()]:Object.entries(e),s(t,i)};var r,a,l,h,d=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldSet||function(t,e,i,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(t,i):o?o.value=i:e.set(t,i),i},c=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldGet||function(t,e,i,n){if("a"===i&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?n:"a"===i?n.call(t):n?n.value:e.get(t)};Object.defineProperty(i,"__esModule",{value:!0});var m=i.DefaultLayoutManager=void 0;const u=n;class p{constructor(t){a.set(this,void 0),l.set(this,new Map),d(this,a,t,"f")}size(){return c(this,l,"f").size}async applyLayoutSnapshot({layouts:t}){if(Object.keys(t).length>1)throw new Error("[LayoutManager] Tried to call applyLayoutSnapshot with more than 1 layout. When implementing multiple layouts via overridden LayoutManager class, you must override and fully implement the applyLayoutSnapshot method without calling super.applyLayoutSnapshot().");const[[e,i]]=Object.entries(t);await p.createLayout(this,{layoutName:e,layout:i})}async showLayout({layoutName:t}){}async getLayoutSnapshot(){return{layouts:await(0,u.mapValuesAsync)((t=>t.getFrameSnapshot()),c(this,l,"f"))}}async removeLayout({layoutName:t}){}getLayoutIdentityForView(t){const e=[...c(this,l,"f").values()].find((e=>e.getCurrentViews().some((e=>e.name===t.name&&e.uuid===t.uuid))));return e?.identity??void 0}isLayoutVisible({layoutName:t}){return c(p,r,"m",h).call(p,this,t).isVisible()}resolveLayoutIdentity(t){if(t&&"layoutName"in t)return t;const e=[...c(this,l,"f").values()];if(1===e.length)return e[0].identity;const i=e.find((t=>t.isVisible()));return i?.identity??void 0}static async resolveLayout(t,e){const i=t.resolveLayoutIdentity(e);if(void 0===i||!("layoutName"in i))throw new Error("[layout-manager] resolveLayout: Could not resolve the layout identity. Make sure you include 'layoutName' in the identity object.");return c(p,r,"m",h).call(p,t,i.layoutName)}static async handleSharedView(t,e,i){await(0,u.mapValuesAsync)((async t=>{if(t.identity.layoutName!==e.layoutName){const e=t.getCurrentViews().find((t=>t.name===i.name));e&&await t.onViewDetached({viewIdentity:e,target:null}).catch(console.error)}}),c(t,l,"f"))}static async handleLastViewRemoved(t,e){await t.removeLayout(e),await c(t,a,"f").handleLastViewRemoved(t)}static async destroyLayout(t,{layoutName:e}){await c(p,r,"m",h).call(p,t,e).destroy(),c(t,l,"f").delete(e)}static async createLayout(t,e){const{layoutName:i}=e;if(c(t,l,"f").has(i))throw new Error(`Layout name ${i} already exists`);await c(t,a,"f").createLayout(e,t)}static registerLayout(t,e,i){c(t,l,"f").set(e,i)}static getAllLayouts(t){return[...c(t,l,"f").values()]}static setInitialSnapshot(t,e){c(t,a,"f").setInitialSnapshot(e)}static createClosedConstructor(...t){return class extends p{constructor(){super(...t)}}}}m=i.DefaultLayoutManager=p,r=p,a=new WeakMap,l=new WeakMap,h=function(t,e){const i=c(t,l,"f").get(e);if(!i)throw new Error(`[layout-manager] getLayoutByName: Could not locate layout with name '${e}'`);return i};var g={},f={},v={};Object.defineProperty(v,"__esModule",{value:!0}),v.ReversibleMap=void 0;v.ReversibleMap=class{constructor(){this.valueToKey=new Map,this.keyToValue=new Map,this.setUnique=(t,e)=>{if(this.hasKey(t)||this.hasValue(e))throw new Error("Key or value already in the map.");this.keyToValue.set(t,e),this.valueToKey.set(e,t)},this.getKey=t=>{const e=this.valueToKey.get(t);if(!e)throw new Error("Value not found in the map.");return e},this.deleteKey=t=>{const e=this.getValue(t);return this.keyToValue.delete(t),this.valueToKey.delete(e),e},this.deleteValue=t=>{const e=this.getKey(t);return this.keyToValue.delete(e),this.valueToKey.delete(t),e},this.hasKey=t=>this.keyToValue.has(t),this.hasValue=t=>this.valueToKey.has(t)}getValue(t){const e=this.keyToValue.get(t);if(!e)throw new Error("Key not found in the map.");return e}},Object.defineProperty(f,"__esModule",{value:!0});var _=f.LayoutContentCache=void 0;const y=t.lazy,C=v;class w{constructor(){this.contentItemCache=new C.ReversibleMap,this.contentItemCacheId=0,this.createCacheKey=()=>{const t=`entity-${this.contentItemCacheId.toString()}`;return this.contentItemCacheId+=1,t},this.hasKey=t=>this.contentItemCache.hasKey(t),this.getItemOrUndefined=t=>{try{return this.getContentItemOrThrow(t)}catch(t){return}},this.getContentItemOrThrow=(t,e)=>{if(!this.contentItemCache.hasKey(t))throw new Error("Layout component has been destroyed or detached from the current layout.");const i=this.contentItemCache.getValue(t);if(e&&!e.includes(i.type))throw new Error(`Layout item is not the expected type. Expected ${e.join(", ")}, got ${i.type}.`);return i},this.getOrCreateEntityId=t=>{if(this.contentItemCache.hasValue(t))return this.contentItemCache.getKey(t);t.onDestroyed((()=>{this.contentItemCache.deleteValue(t)}));const e=this.createCacheKey();return this.contentItemCache.setUnique(e,t),e}}static getSingleInstance(){return w.singleton.getValue()}}_=f.LayoutContentCache=w,w.singleton=new y.Lazy((()=>new w));var I={},b={};!function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.getAdjacentStacks=t.doShareEdge=t.getAdjacentItem=void 0;t.getAdjacentItem=(e,i)=>{const{parent:n}=e;if(e.isRoot()||!n)return;const o=["top","bottom"].includes(i)?"column":"row",s=["top","left"].includes(i)?-1:1;if(n.type===o){const t=n.contentItems.indexOf(e)+s;if(t>=0&&t{const n=t.getBounds(),o=e.getBounds();if(!n||!o)return!1;if(["top","bottom"].includes(i)){return!(n.righto.right)}return!(n.bottomo.bottom)};t.getAdjacentStacks=(e,i)=>{const n=["top","bottom"].includes(i)?"row":"column",o=s=>"stack"===s.type?(0,t.doShareEdge)(e,s,i)?[s]:[]:"root"===s.type||"ground"===s.type?[]:s.type===n?s.contentItems.map((t=>o(t))).flat():s.type!==n?["top","right"].includes(i)?o(s.contentItems[s.contentItems.length-1]):o(s.contentItems[0]):[],s=(0,t.getAdjacentItem)(e,i);return s?o(s):[]}}(b);var S=t.commonjsGlobal&&t.commonjsGlobal.__decorate||function(t,e,i,n){var o,s=arguments.length,r=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(s<3?o(r):s>3?o(e,i,r):o(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};Object.defineProperty(I,"__esModule",{value:!0}),I.LayoutEntitiesController=void 0;const E=t.decorators,x=b,L=i;class z{constructor(t,e,i){this.wire=t,this.layoutManager=e,this.layoutContentCache=i,this.analytics=t=>{this.wire.sendAction(`layout-controller-${t}`).catch((()=>{}))},this.getLayoutIdentityForViewOrThrow=async t=>{const e=this.layoutManager.getLayoutIdentityForView(t);if(!e)throw new Error(`View identity ${t.name} is not attached to any layouts.`);return e},this.getRoot=async t=>{this.analytics("get-root");const e=(await this.getLayout(t)).getRoot();return{type:e.type,entityId:this.layoutContentCache.getOrCreateEntityId(e)}},this.getStackByView=async t=>{this.analytics("get-stack-by-view");const e=await this.getLayoutIdentityForViewOrThrow(t),i=(await this.getLayout(e)).getStackByView(t);if("stack"===i?.type)return{entityId:this.layoutContentCache.getOrCreateEntityId(i),type:"stack"}},this.getStackViews=t=>{this.analytics("get-stack-views");return this.layoutContentCache.getContentItemOrThrow(t,["stack"]).contentItems.map((t=>({name:t.viewName,uuid:this.wire.me.uuid})))},this.isRoot=t=>{this.analytics("is-root");return this.layoutContentCache.getContentItemOrThrow(t).isRoot()},this.exists=t=>(this.analytics("exists"),this.layoutContentCache.hasKey(t)),this.addViewToStack=async(t,e,{index:i}={index:0})=>{this.analytics("add-view-to-stack");const n=this.layoutContentCache.getContentItemOrThrow(t);if(i&&i>n.contentItems.length+1)throw new Error(`Index '${i}' out of range, please exclude the index or specify a number between 0 and ${n.contentItems.length}`);const o={id:t,index:i},{identity:s}=await n.layout.platformCreateView(e,{location:o});return s},this.findViewInStack=(t,e)=>t.contentItems.find((t=>t.viewName===e.name)),this.removeViewFromStack=async(t,e)=>{this.analytics("remove-view-from-stack");const i=this.layoutContentCache.getContentItemOrThrow(t,["stack"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to remove a view ('${e.name}') which does not belong to the stack.`);await n.layout.platformCloseView(e)},this.createAdjacentStack=async(t,e,{position:i="right"}={})=>{if(this.analytics("create-adjacent-stack"),!Array.isArray(e)||0===e.length)throw new Error('The parameter "views" must be an array with at least 1 element.');if(!["top","bottom","left","right"].includes(i))throw new Error(`Invalid position '${i}' specified.`);const n=this.layoutContentCache.getContentItemOrThrow(t).createAdjacentStack({position:i}),o=this.layoutContentCache.getOrCreateEntityId(n);return await Promise.all(e.reverse().map((t=>this.addViewToStack(o,t)))),o},this.getAdjacentStacks=async({targetId:t,edge:e})=>{this.analytics("get-adjacent-stacks");const i=this.layoutContentCache.getContentItemOrThrow(t);return(0,x.getAdjacentStacks)(i,e).map((t=>({entityId:this.layoutContentCache.getOrCreateEntityId(t)})))},this.setStackActiveView=async(t,e)=>{this.analytics("set-stack-active-view");const i=this.layoutContentCache.getContentItemOrThrow(t,["stack"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to set a view ('${e.name}') as active when it does not belong to the stack.`);i.setActiveContentItem(n,!0)}}async getLayout(t){const e=await L.DefaultLayoutManager.resolveLayout(this.layoutManager,t);if(!e)throw new Error(`Could not resolve target layout identity ${JSON.stringify(t)}`);return e}getContent(t){this.analytics("get-content");return this.layoutContentCache.getContentItemOrThrow(t,["column","row"]).contentItems.map((t=>({type:t.type,entityId:this.layoutContentCache.getOrCreateEntityId(t)})))}getParent(t){this.analytics("get-parent");const e=this.layoutContentCache.getContentItemOrThrow(t);if(!e.isRoot())return e.parent?.contentItems.includes(e)?{type:e.parent.type,entityId:this.layoutContentCache.getOrCreateEntityId(e.parent)}:void 0}}S([(0,E.expose)()],z.prototype,"getLayoutIdentityForViewOrThrow",void 0),S([(0,E.expose)()],z.prototype,"getRoot",void 0),S([(0,E.expose)()],z.prototype,"getStackByView",void 0),S([(0,E.expose)()],z.prototype,"getStackViews",void 0),S([(0,E.expose)()],z.prototype,"getContent",null),S([(0,E.expose)()],z.prototype,"getParent",null),S([(0,E.expose)()],z.prototype,"isRoot",void 0),S([(0,E.expose)()],z.prototype,"exists",void 0),S([(0,E.expose)()],z.prototype,"addViewToStack",void 0),S([(0,E.expose)()],z.prototype,"removeViewFromStack",void 0),S([(0,E.expose)()],z.prototype,"createAdjacentStack",void 0),S([(0,E.expose)()],z.prototype,"getAdjacentStacks",void 0),S([(0,E.expose)()],z.prototype,"setStackActiveView",void 0),I.LayoutEntitiesController=z,Object.defineProperty(g,"__esModule",{value:!0});var M=g.initLayoutEndpoints=void 0;const P=t.apiExposer,T=t.layout_constants,A=f,k=I,D=i;M=g.initLayoutEndpoints=async function(t,e){const i=t.getFin(),n=await i.Platform.getCurrentSync().getClient(),o=new P.ChannelsExposer(n);await new P.ApiExposer(o).exposeInstance(new k.LayoutEntitiesController(t,e,A.LayoutContentCache.getSingleInstance()),{id:T.LAYOUT_CONTROLLER_ID}),await async function(t,e){const i=t=>async i=>{const n=await D.DefaultLayoutManager.resolveLayout(e,i.target);if(!n)throw new Error(`Could not resolve the layout target from payload ${JSON.stringify(i)}`);return t(n,i)},n=(e,n)=>{t.register(e,i(n))},o=(t,e)=>{n(t,e)};n("replace-view",((t,e)=>t.replaceView(e))),n("replace-layout",((t,{layout:e})=>t.replaceLayout(e))),n("add-view",((t,e)=>t.insertView(e))),o("layout-add-view",((t,{viewOptions:e,location:i,targetView:n})=>t.platformCreateView(e,{location:i,targetView:n}))),n("close-view",((t,e)=>t.cleanupView(e.viewIdentity))),o("layout-close-view",((t,e)=>t.platformCloseView(e.viewIdentity))),n("apply-preset-layout",((t,e)=>t.applyPreset(e))),n("get-layout-views",(t=>t.getCurrentViews())),n("get-frame-snapshot",(t=>t.getFrameSnapshot())),n("is-visible",(t=>t.isVisible())),n("destroy",(t=>t.destroy())),t.register("get-layout-snapshot",(()=>e.getLayoutSnapshot()))}(n,e)};var R={};Object.defineProperty(R,"__esModule",{value:!0});var U=R.BaseLayout=void 0;U=R.BaseLayout=class{};var O={};Object.defineProperty(O,"__esModule",{value:!0});var V=O.DOMEmitter=void 0;V=O.DOMEmitter=class{constructor(t){this.container=t}dispatchLocalEvent(t,e){const i={...e,type:t,tabSelector:`tab-${e.name}`,containerSelector:`container-${e.name}`,topic:"openfin-DOM-event"};this.container.dispatchEvent(new CustomEvent(t,{detail:i}))}};var B={};Object.defineProperty(B,"__esModule",{value:!0});var H=B.mapLayoutContentItemsImmutableSync=B.mapLayoutContentItemsImmutable=W=B.isVisible=void 0;var W=B.isVisible=t=>(0!==t.offsetWidth||0!==t.offsetHeight)&&"hidden"!==window.getComputedStyle(t).visibility&&t.offsetTop>=0&&t.offsetLeft>=0&&t.offsetTop<=window.innerHeight&&t.offsetLeft<=window.innerWidth;const F=t=>"type"in t&&"component"===t.type;B.mapLayoutContentItemsImmutable=async function t(e,i){return F(i)?e(i):{...i,content:await Promise.all(i.content?.map((i=>t(e,i))))}},H=B.mapLayoutContentItemsImmutableSync=function t(e,i){return F(i)?e(i):{...i,content:i.content?.map((i=>t(e,i)))}};class N extends Error{constructor(t,e){super(e),this.type=t}}class G extends N{constructor(t,e){super("Configuration",t),this.node=e}}class j extends N{constructor(t){super("PopoutBlocked",t)}}class $ extends N{constructor(t){super("API",t)}}class Z extends N{constructor(t){super("Bind",t)}}class q extends Error{constructor(t,e,i){super(`${t}: ${e}${void 0===i?"":": "+i}`)}}class X extends q{constructor(t,e){super("Assert",t,e)}}class Y extends q{constructor(t,e,i){super("UnreachableCase",t,`${e}${void 0===i?"":": "+i}`)}}class K extends q{constructor(t,e){super("UnexpectedNull",t,e)}}class J extends q{constructor(t,e){super("UnexpectedUndefined",t,e)}}var Q;!function(t){let e=!1;const i={PopoutCannotBeCreatedWithGroundItemConfig:{id:0,default:"Popout cannot be created with ground ItemConfig"},PleaseRegisterAConstructorFunction:{id:1,default:"Please register a constructor function"},ComponentTypeNotRegisteredAndBindComponentEventHandlerNotAssigned:{id:2,default:"Component type not registered and BindComponentEvent handler not assigned"},ComponentIsAlreadyRegistered:{id:3,default:"Component is already registered"},ComponentIsNotVirtuable:{id:4,default:"Component is not virtuable. Requires rootHtmlElement field/getter"},VirtualComponentDoesNotHaveRootHtmlElement:{id:5,default:'Virtual component does not have getter "rootHtmlElement"'},ItemConfigIsNotTypeComponent:{id:6,default:"ItemConfig is not of type component"},InvalidNumberPartInSizeString:{id:7,default:"Invalid number part in size string"},UnknownUnitInSizeString:{id:8,default:"Unknown unit in size string"},UnsupportedUnitInSizeString:{id:9,default:"Unsupported unit in size string"}};t.idCount=Object.keys(i).length;const n=Object.values(i);t.checkInitialise=function(){if(!e)for(let e=0;e="0"&&t<="9"}function Tt(t,e){const i=zt(e);t.style.width=i}function At(t,e){const i=zt(e);t.style.height=i}function kt(t){return{width:t.offsetWidth,height:t.offsetHeight}}function Dt(t,e){t.style.display=e?"":"none"}function Rt(t,e){if(void 0!==e)for(const i in e)if(e.hasOwnProperty(i)){const n=e[i],o=t[i];t[i]=Ut(o,n)}return t}function Ut(t,e){if("object"!=typeof e)return e;if(Array.isArray(e)){const t=e.length,i=new Array(t);for(let n=0;n36)throw new Error("Too many keys in config minifier map")},t.translateObject=n}(dt||(dt={})),function(t){t.defaults={type:at.ground,content:[],size:1,sizeUnit:ht.Fractional,minSize:void 0,minSizeUnit:ht.Pixel,id:"",isClosable:!0},t.createCopy=function(t,e){switch(t.type){case at.ground:case at.row:case at.column:return gt.createCopy(t,e);case at.stack:return ut.createCopy(t,e);case at.component:return pt.createCopy(t);default:throw new Y("CICC91354",t.type,"Invalid Config Item type specified")}},t.createDefault=function(t){switch(t){case at.ground:throw new X("CICCDR91562");case at.row:case at.column:return gt.createDefault(t);case at.stack:return ut.createDefault();case at.component:return pt.createDefault();default:throw new Y("CICCDD91563",t,"Invalid Config Item type specified")}},t.isComponentItem=function(t){return t.type===at.component},t.isStackItem=function(t){return t.type===at.stack},t.isGroundItem=function(t){return t.type===at.ground}}(ct||(ct={})),function(t){t.defaultMaximised=!1,function(t){t.createCopy=function(t,e){return void 0===t?void 0:{show:null!=e?e:t.show,popout:t.popout,close:t.close,maximise:t.maximise,minimise:t.minimise,tabDropdown:t.tabDropdown}}}(t.Header||(t.Header={}))}(mt||(mt={})),function(t){function e(t){const e=t.length,i=new Array(e);for(let n=0;n"__glMaximised"===t));t>0&&(o=!0,n=n.splice(t,1)),e=n.length>0?n[0]:ct.defaults.id}else e=n;return i=void 0!==t.maximised?t.maximised:o,{id:e,maximised:i}}}(wt||(wt={})),function(t){function e(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0;return{resolved:!0,root:Et.resolve(i),openPopouts:t.resolveOpenPopouts(e.openPopouts),dimensions:t.Dimensions.resolve(e.dimensions),settings:t.Settings.resolve(e.settings),header:t.Header.resolve(e.header,e.settings,e.labels)}}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:Lt.fromResolvedArray(e.openPopouts),settings:_t.Settings.createCopy(e.settings),dimensions:t.Dimensions.fromResolved(e.dimensions),header:_t.Header.createCopy(e.header)}},t.isResolved=function(t){const e=t;return void 0!==e.resolved&&!0===e.resolved},t.resolveOpenPopouts=function(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0,{root:Et.resolve(o),openPopouts:xt.resolveOpenPopouts(e.openPopouts),dimensions:xt.Dimensions.resolve(e.dimensions),settings:xt.Settings.resolve(e.settings),header:xt.Header.resolve(e.header,e.settings,e.labels),parentId:null!==(i=e.parentId)&&void 0!==i?i:null,indexInParent:null!==(n=e.indexInParent)&&void 0!==n?n:null,window:t.Window.resolve(e.window,e.dimensions),resolved:!0}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:i(e.openPopouts),dimensions:xt.Dimensions.fromResolved(e.dimensions),settings:_t.Settings.createCopy(e.settings),header:_t.Header.createCopy(e.header),parentId:e.parentId,indexInParent:e.indexInParent,window:t.Window.fromResolved(e.window)}},t.fromResolvedArray=i}(Lt||(Lt={}));class Wt{constructor(){this._allEventSubscriptions=[],this._subscriptionsMap=new Map,this.unbind=this.removeEventListener,this.trigger=this.emit}tryBubbleEvent(t,e){}emit(t,...e){let i=this._subscriptionsMap.get(t);if(void 0!==i){i=i.slice();for(let t=0;t0){const n=e.slice();n.unshift(t);const o=this._allEventSubscriptions.slice();for(let t=0;t0?n.contentItems[0]:n,e=0);const o=this._layoutManager.createAndInitContentItem(i,t);t.addChild(o,e),this._layoutManager.layoutConfig.settings.popInOnClose?this._onClose():this.close()}createWindow(){const t=this.createUrl(),e=Math.floor(1e6*Math.random()).toString(36),i=this.serializeWindowFeatures({width:this._initialWindowSize.width,height:this._initialWindowSize.height,innerWidth:this._initialWindowSize.width,innerHeight:this._initialWindowSize.height,menubar:"no",toolbar:"no",location:"no",personalbar:"no",resizable:"yes",scrollbars:"no",status:"no"});if(this._popoutWindow=globalThis.open(t,e,i),this._popoutWindow)this._popoutWindow.addEventListener("load",(()=>this.positionWindow()),{passive:!0}),this._popoutWindow.addEventListener("beforeunload",(()=>{this._layoutManager.layoutConfig.settings.popInOnClose?this.popIn():this._onClose()}),{passive:!0}),this._checkReadyInterval=setInterval((()=>this.checkReady()),10);else if(!0===this._layoutManager.layoutConfig.settings.blockedPopoutsThrowError){throw new j("Popout blocked")}}checkReady(){if(null===this._popoutWindow)throw new K("BPCR01844");this._popoutWindow.__glInstance&&this._popoutWindow.__glInstance.isInitialised&&(this.onInitialised(),void 0!==this._checkReadyInterval&&(clearInterval(this._checkReadyInterval),this._checkReadyInterval=void 0))}serializeWindowFeatures(t){const e=[];for(const i in t)e.push(i+"="+t[i].toString());return e.join(",")}createUrl(){const t="gl-window-config-"+Ot(),e=_t.minifyConfig(this._config);try{localStorage.setItem(t,JSON.stringify(e))}catch(t){throw new Error("Error while writing to localStorage "+function(t){return t instanceof Error?t.message:"string"==typeof t?t:"Unknown Error"}(t))}const i=new URL(location.href);return i.searchParams.set("gl-window",t),i.toString()}positionWindow(){if(null===this._popoutWindow)throw new Error("BrowserPopout.positionWindow: null popoutWindow");this._popoutWindow.moveTo(this._initialWindowSize.left,this._initialWindowSize.top),this._popoutWindow.focus()}onInitialised(){this._isInitialised=!0,this.getGlInstance().on("popIn",(()=>this.popIn())),this.emit("initialised")}_onClose(){setTimeout((()=>this.emit("closed")),50)}}class Gt extends Wt{constructor(t,e,i,n){super(),this.layoutManager=t,this._parent=i,this._element=n,this._popInParentIds=[],this._type=e.type,this._id=e.id,this._isInitialised=!1,this.isGround=!1,this.isRow=!1,this.isColumn=!1,this.isStack=!1,this.isComponent=!1,this.size=e.size,this.sizeUnit=e.sizeUnit,this.minSize=e.minSize,this.minSizeUnit=e.minSizeUnit,this._isClosable=e.isClosable,this._pendingEventPropagations={},this._throttledEvents=["stateChanged"],this._contentItems=this.createContentItems(e.content)}get type(){return this._type}get id(){return this._id}set id(t){this._id=t}get popInParentIds(){return this._popInParentIds}get parent(){return this._parent}get contentItems(){return this._contentItems}get isClosable(){return this._isClosable}get element(){return this._element}get isInitialised(){return this._isInitialised}static isStack(t){return t.isStack}static isComponentItem(t){return t.isComponent}static isComponentParentableItem(t){return t.isStack||t.isGround}removeChild(t,e=!1){const i=this._contentItems.indexOf(t);if(-1===i)throw new Error("Can't remove child item. Unknown content item");if(e||this._contentItems[i].destroy(),this._contentItems.splice(i,1),this._contentItems.length>0)this.updateSize(!1);else if(!this.isGround&&!0===this._isClosable){if(null===this._parent)throw new K("CIUC00874");this._parent.removeChild(this)}}addChild(t,e,i){return null!=e||(e=this._contentItems.length),this._contentItems.splice(e,0,t),t.setParent(this),!0===this._isInitialised&&!1===t._isInitialised&&t.init(),e}replaceChild(t,e,i=!1){const n=this._contentItems.indexOf(t),o=t._element.parentNode;if(-1===n)throw new X("CIRCI23232","Can't replace child. oldChild is not child of this");if(null===o)throw new K("CIRCP23232");if(o.replaceChild(e._element,t._element),!0===i&&(t._parent=null,t.destroy()),this._contentItems[n]=e,e.setParent(this),e.size=t.size,e.sizeUnit=t.sizeUnit,e.minSize=t.minSize,e.minSizeUnit=t.minSizeUnit,null===e._parent)throw new K("CIRCNC45699");!0===e._parent._isInitialised&&!1===e._isInitialised&&e.init(),this.updateSize(!1)}remove(){if(null===this._parent)throw new K("CIR11110");this._parent.removeChild(this)}popout(){const t=Ot(),e=this.layoutManager.createPopoutFromContentItem(this,void 0,t,void 0);return this.emitBaseBubblingEvent("stateChanged"),e}calculateConfigContent(){const t=this._contentItems,e=t.length,i=new Array(e);for(let n=0;nthis.propagateEventToLayoutManager(t,e))))}propagateEventToLayoutManager(t,e){this._pendingEventPropagations[t]=!1,this.layoutManager.emitUnknown(t,e)}}class jt extends Gt{constructor(t,e,i){super(t,e,i,document.createElement("div")),this._parentItem=i,this._focused=!1,this.isComponent=!0,this._reorderEnabled=e.reorderEnabled,this.applyUpdatableConfig(e),this._initialWantMaximise=e.maximised;const n=document.createElement("div");n.classList.add("lm_content"),this.element.appendChild(n),this._container=new Ft(e,this,t,n,(t=>this.handleUpdateItemConfigEvent(t)),(()=>this.show()),(()=>this.hide()),(t=>this.focus(t)),(t=>this.blur(t)))}get componentName(){return this._container.componentType}get componentType(){return this._container.componentType}get reorderEnabled(){return this._reorderEnabled}get initialWantMaximise(){return this._initialWantMaximise}get component(){return this._container.component}get container(){return this._container}get parentItem(){return this._parentItem}get headerConfig(){return this._headerConfig}get title(){return this._title}get tab(){return this._tab}get focused(){return this._focused}destroy(){this._container.destroy(),super.destroy()}applyUpdatableConfig(t){this.setTitle(t.title),this._headerConfig=t.header}toConfig(){const t=this._container.stateRequestEvent,e=void 0===t?this._container.state:t();return{type:at.component,content:[],size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,maximised:!1,isClosable:this.isClosable,reorderEnabled:this._reorderEnabled,title:this._title,header:mt.Header.createCopy(this._headerConfig),componentType:pt.copyComponentType(this.componentType),componentState:e}}close(){if(null===this.parent)throw new K("CIC68883");this.parent.removeChild(this,!1)}enterDragMode(t,e){Tt(this.element,t),At(this.element,e),this._container.enterDragMode(t,e)}exitDragMode(){this._container.exitDragMode()}enterStackMaximised(){this._container.enterStackMaximised()}exitStackMaximised(){this._container.exitStackMaximised()}drag(){this._container.drag()}updateSize(t){this.updateNodeSize(t)}init(){this.updateNodeSize(!1),super.init(),this._container.emit("open"),this.initContentItems()}setTitle(t){this._title=t,this.emit("titleChanged",t),this.emit("stateChanged")}setTab(t){this._tab=t,this.emit("tab",t),this._container.setTab(t)}hide(){super.hide(),this._container.setVisibility(!1)}show(){super.show(),this._container.setVisibility(!0)}focus(t=!1){this.parentItem.setActiveComponentItem(this,!0,t)}setFocused(t){this._focused=!0,this.tab.setFocused(),t||this.emitBaseBubblingEvent("focus")}blur(t=!1){this._focused&&this.layoutManager.setFocusedComponentItem(void 0,t)}setBlurred(t){this._focused=!1,this.tab.setBlurred(),t||this.emitBaseBubblingEvent("blur")}setParent(t){this._parentItem=t,super.setParent(t)}handleUpdateItemConfigEvent(t){this.applyUpdatableConfig(t)}updateNodeSize(t){if("none"!==this.element.style.display){const{width:e,height:i}=kt(this.element);this._container.setSizeToNodeSize(e,i,t)}}}class $t extends Gt{constructor(){super(...arguments),this._focused=!1}get focused(){return this._focused}setFocusedValue(t){this._focused=t}}class Zt extends Wt{constructor(t,e){super(),this._eElement=t,this._pointerTracking=!1,this._pointerDownEventListener=t=>this.onPointerDown(t),this._pointerMoveEventListener=t=>this.onPointerMove(t),this._pointerUpEventListener=t=>this.onPointerUp(t),this._timeout=void 0,this._allowableTargets=[t,...e],this._oDocument=document,this._eBody=document.body,this._nDelay=1800,this._nDistance=10,this._nX=0,this._nY=0,this._nOriginalX=0,this._nOriginalY=0,this._dragging=!1,this._eElement.addEventListener("pointerdown",this._pointerDownEventListener,{passive:!0})}destroy(){this.checkRemovePointerTrackingEventListeners(),this._eElement.removeEventListener("pointerdown",this._pointerDownEventListener)}cancelDrag(){this.processDragStop(void 0)}onPointerDown(t){if(this._allowableTargets.includes(t.target)&&t.isPrimary){const e=this.getPointerCoordinates(t);this.processPointerDown(e)}}processPointerDown(t){this._nOriginalX=t.x,this._nOriginalY=t.y,this._oDocument.addEventListener("pointermove",this._pointerMoveEventListener),this._oDocument.addEventListener("pointerup",this._pointerUpEventListener,{passive:!0}),this._pointerTracking=!0,this._timeout=setTimeout((()=>{try{this.startDrag()}catch(t){throw console.error(t),t}}),this._nDelay)}onPointerMove(t){this._pointerTracking&&(this.processDragMove(t),t.preventDefault())}processDragMove(t){this._nX=t.pageX-this._nOriginalX,this._nY=t.pageY-this._nOriginalY,!1===this._dragging&&(Math.abs(this._nX)>this._nDistance||Math.abs(this._nY)>this._nDistance)&&this.startDrag(),this._dragging&&this.emit("drag",this._nX,this._nY,t)}onPointerUp(t){this.processDragStop(t)}processDragStop(t){var e;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this.checkRemovePointerTrackingEventListeners(),!0===this._dragging&&(this._eBody.classList.remove("lm_dragging"),this._eElement.classList.remove("lm_dragging"),null===(e=this._oDocument.querySelector("iframe"))||void 0===e||e.style.setProperty("pointer-events",""),this._dragging=!1,this.emit("dragStop",t))}checkRemovePointerTrackingEventListeners(){this._pointerTracking&&(this._oDocument.removeEventListener("pointermove",this._pointerMoveEventListener),this._oDocument.removeEventListener("pointerup",this._pointerUpEventListener),this._pointerTracking=!1)}startDrag(){var t;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this._dragging=!0,this._eBody.classList.add("lm_dragging"),this._eElement.classList.add("lm_dragging"),null===(t=this._oDocument.querySelector("iframe"))||void 0===t||t.style.setProperty("pointer-events","none"),this.emit("dragStart",this._nOriginalX,this._nOriginalY)}getPointerCoordinates(t){return{x:t.pageX,y:t.pageY}}}class qt{constructor(t,e,i){this._isVertical=t,this._size=e,this._grabSize=i0){const i=this.createSplitter(Math.max(0,e-1)).element;e>0?(this.contentItems[e-1].element.insertAdjacentElement("afterend",i),i.insertAdjacentElement("afterend",t.element)):(this.contentItems[0].element.insertAdjacentElement("beforebegin",i),i.insertAdjacentElement("beforebegin",t.element))}else this._childElementContainer.appendChild(t.element);super.addChild(t,e);const n=1/this.contentItems.length*100;if(!0===i)return this.emitBaseBubblingEvent("stateChanged"),e;for(let e=0;e0&&(this.calculateRelativeSizes(),this.setAbsoluteSizes()),this.emitBaseBubblingEvent("stateChanged"),this.emit("resize")}setAbsoluteSizes(){const t=this.calculateAbsoluteSizes();for(let e=0;e0&&t.itemSizes[e]++,this._isColumn?(Tt(this.contentItems[e].element,t.crossAxisSize),At(this.contentItems[e].element,t.itemSizes[e])):(Tt(this.contentItems[e].element,t.itemSizes[e]),At(this.contentItems[e].element,t.crossAxisSize))}calculateAbsoluteSizes(){const t=(this.contentItems.length-1)*this._splitterSize,{width:e,height:i}=kt(this.element);let n,o;this._isColumn?(n=i-t,o=e):(n=e-t,o=i);let s=0;const r=[];for(let t=0;t0){const n=100-t;for(let t=0;t100&&e.length>0){for(let t=0;te)return;{const r=i/e;let a=i;for(let e=0;ethis.onSplitterDrag(e,t,i))),e.on("dragStop",(()=>this.onSplitterDragStop(e))),e.on("dragStart",(()=>this.onSplitterDragStart(e))),this._splitter.splice(t,0,e),e}getSplitItems(t){const e=this._splitter.indexOf(t);return{before:this.contentItems[e],after:this.contentItems[e+1]}}calculateContentItemMinSize(t){const e=t.minSize;if(void 0!==e){if(t.minSizeUnit===ht.Pixel)return e;throw new X("ROCGMD98831",JSON.stringify(t))}{const t=this.layoutManager.layoutConfig.dimensions;return this._isColumn?t.defaultMinItemHeight:t.defaultMinItemWidth}}calculateContentItemsTotalMinSize(t){let e=0;for(const i of t)e+=this.calculateContentItemMinSize(i);return e}onSplitterDragStart(t){const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=this.calculateContentItemsTotalMinSize(e.before.contentItems),s=this.calculateContentItemsTotalMinSize(e.after.contentItems);this._splitterPosition=0,this._splitterMinPosition=-1*(i-o),this._splitterMaxPosition=n-s}onSplitterDrag(t,e,i){let n=this._isColumn?i:e;if(null===this._splitterMinPosition||null===this._splitterMaxPosition)throw new K("ROCOSD59226");n=Math.max(n,this._splitterMinPosition),n=Math.min(n,this._splitterMaxPosition),this._splitterPosition=n;const o=zt(n);this._isColumn?t.element.style.top=o:t.element.style.left=o}onSplitterDragStop(t){if(null===this._splitterPosition)throw new K("ROCOSDS66932");{const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=(this._splitterPosition+i)/(i+n),s=e.before.size+e.after.size;e.before.size=o*s,e.after.size=(1-o)*s,t.element.style.top=zt(0),t.element.style.left=zt(0),globalThis.requestAnimationFrame((()=>this.updateSize(!1)))}}}!function(t){t.getElementDimensionSize=function(t,e){return"width"===e?function(t){return t.offsetWidth}(t):function(t){return t.offsetHeight}(t)},t.setElementDimensionSize=function(t,e,i){return"width"===e?Tt(t,i):At(t,i)},t.createElement=function(t,e){const i=t.createElement("div");return i.classList.add("lm_item"),e?i.classList.add("lm_column"):i.classList.add("lm_row"),i}}(Xt||(Xt={}));class Yt extends $t{constructor(t,e,i){super(t,vt.create(e),null,Yt.createElement(document)),this.isGround=!0,this._childElementContainer=this.element,this._containerElement=i;let n=null;for(;;){const t=n?n.previousSibling:this._containerElement.lastChild;if(!(t instanceof Element&&t.classList.contains("lm_content")))break;n=t}this._containerElement.insertBefore(this.element,n)}init(){if(!0!==this.isInitialised){this.updateNodeSize();for(let t=0;t0?this.contentItems[0]:this,n.isComponent)throw new Error("Cannot add item as child to ComponentItem");{const t=this.layoutManager.createAndInitContentItem(i,n);return e=n.addChild(t,e),n===this?-1:e}}loadComponentAsRoot(t){this.clearRoot();const e=Ct.resolve(t,!1);if(e.maximised)throw new Error("Root Component cannot be maximised");{const t=new jt(this.layoutManager,e,this);t.init(),this.addChild(t,0)}}addChild(t,e){if(this.contentItems.length>0)throw new Error("Ground node can only have a single child");return this._childElementContainer.appendChild(t.element),e=super.addChild(t,e),this.updateSize(!1),this.emitBaseBubblingEvent("stateChanged"),e}calculateConfigContent(){const t=this.contentItems,e=t.length,i=new Array(e);for(let n=0;n0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e)),this.updateContentItemsSize(!1))}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}createSideAreas(){const t=Yt.Area.oppositeSides,e=new Array(Object.keys(t).length);let i=0;for(const n in t){const o=n,s=this.getElementArea();if(null===s)throw new K("RCSA77553");s.side=o,"2"===t[o][1]?s[o]=s[t[o]]-50:s[o]=s[t[o]]+50,s.surface=(s.x2-s.x1)*(s.y2-s.y1),e[i++]=s}return e}highlightDropZone(t,e,i){this.layoutManager.tabDropPlaceholder.remove(),super.highlightDropZone(t,e,i)}onDrop(t,e){if(t.isComponent){const e=ut.createDefault(),i=t;e.header=mt.Header.createCopy(i.headerConfig);const n=this.layoutManager.createAndInitContentItem(e,this);n.addChild(t),t=n}if(0===this.contentItems.length)this.addChild(t);else{if(t.type===at.row||t.type===at.column){const e=ut.createDefault(),i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}const i="x"==e.side[0]?at.row:at.column,n="2"==e.side[1],o=this.contentItems[0];if(o instanceof Xt&&o.type===i){const e=o.contentItems[n?0:o.contentItems.length-1];o.addChild(t,n?0:void 0,!0),e.size*=.5,t.size=e.size,t.sizeUnit=ht.Percent,o.updateSize(!1)}else{const e=ct.createDefault(i),s=this.layoutManager.createContentItem(e,this);this.replaceChild(o,s),s.addChild(t,n?0:void 0,!0),s.addChild(o,n?void 0:0,!0),o.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}}dock(){throw new X("GID87731")}validateDocking(){throw new X("GIVD87732")}getAllContentItems(){const t=[this];return this.deepGetAllContentItems(this.contentItems,t),t}getConfigMaximisedItems(){const t=[];return this.deepFilterContentItems(this.contentItems,t,(t=>!(!Gt.isStack(t)||!t.initialWantMaximise)||!(!Gt.isComponentItem(t)||!t.initialWantMaximise))),t}getItemsByPopInParentId(t){const e=[];return this.deepFilterContentItems(this.contentItems,e,(e=>e.popInParentIds.includes(t))),e}toConfig(){throw new Error("Cannot generate GroundItem config")}setActiveComponentItem(t,e,i){}updateNodeSize(){const{width:t,height:e}=kt(this._containerElement);Tt(this.element,t),At(this.element,e),this.contentItems.length>0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e))}deepGetAllContentItems(t,e){for(let i=0;ithis.onClick(t),this._touchStartEventListener=t=>this.onTouchStart(t),this._element=document.createElement("div"),this._element.classList.add(i),this._element.title=e,this._header.on("destroy",(()=>this.destroy())),this._element.addEventListener("click",this._clickEventListener,{passive:!0}),this._element.addEventListener("touchstart",this._touchStartEventListener,{passive:!0}),this._header.controlsContainerElement.appendChild(this._element)}get element(){return this._element}destroy(){var t;this._element.removeEventListener("click",this._clickEventListener),this._element.removeEventListener("touchstart",this._touchStartEventListener),null===(t=this._element.parentNode)||void 0===t||t.removeChild(this._element)}onClick(t){this._pushEvent(t)}onTouchStart(t){this._pushEvent(t)}}class Jt{constructor(t,e,i,n,o){var s;this._layoutManager=t,this._componentItem=e,this._closeEvent=i,this._focusEvent=n,this._dragStartEvent=o,this._isActive=!1,this._tabClickListener=t=>this.onTabClickDown(t),this._tabTouchStartListener=t=>this.onTabTouchStart(t),this._closeClickListener=()=>this.onCloseClick(),this._closeTouchStartListener=()=>this.onCloseTouchStart(),this._dragStartListener=(t,e)=>this.onDragStart(t,e),this._contentItemDestroyListener=()=>this.onContentItemDestroy(),this._tabTitleChangedListener=t=>this.setTitle(t),this._element=document.createElement("div"),this._element.classList.add("lm_tab"),this._titleElement=document.createElement("span"),this._titleElement.classList.add("lm_title"),this._closeElement=document.createElement("div"),this._closeElement.classList.add("lm_close_tab"),this._element.appendChild(this._titleElement),this._element.appendChild(this._closeElement),e.isClosable?this._closeElement.style.display="":this._closeElement.style.display="none",this.setTitle(e.title),this._componentItem.on("titleChanged",this._tabTitleChangedListener);(null!==(s=e.reorderEnabled)&&void 0!==s?s:this._layoutManager.layoutConfig.settings.reorderEnabled)&&this.enableReorder(),this._element.addEventListener("click",this._tabClickListener,{passive:!0}),this._element.addEventListener("touchstart",this._tabTouchStartListener,{passive:!0}),this._componentItem.isClosable?(this._closeElement.addEventListener("click",this._closeClickListener,{passive:!0}),this._closeElement.addEventListener("touchstart",this._closeTouchStartListener,{passive:!0})):(this._closeElement.remove(),this._closeElement=void 0),this._componentItem.setTab(this),this._layoutManager.emit("tabCreated",this)}get isActive(){return this._isActive}get componentItem(){return this._componentItem}get contentItem(){return this._componentItem}get element(){return this._element}get titleElement(){return this._titleElement}get closeElement(){return this._closeElement}get reorderEnabled(){return void 0!==this._dragListener}set reorderEnabled(t){t!==this.reorderEnabled&&(t?this.enableReorder():this.disableReorder())}setTitle(t){this._titleElement.innerText=t,this._element.title=t}setActive(t){t!==this._isActive&&(this._isActive=t,t?this._element.classList.add("lm_active"):this._element.classList.remove("lm_active"))}destroy(){var t,e;this._closeEvent=void 0,this._focusEvent=void 0,this._dragStartEvent=void 0,this._element.removeEventListener("click",this._tabClickListener),this._element.removeEventListener("touchstart",this._tabTouchStartListener),null===(t=this._closeElement)||void 0===t||t.removeEventListener("click",this._closeClickListener),null===(e=this._closeElement)||void 0===e||e.removeEventListener("touchstart",this._closeTouchStartListener),this._componentItem.off("titleChanged",this._tabTitleChangedListener),this.reorderEnabled&&this.disableReorder(),this._element.remove()}setBlurred(){this._element.classList.remove("lm_focused"),this._titleElement.classList.remove("lm_focused")}setFocused(){this._element.classList.add("lm_focused"),this._titleElement.classList.add("lm_focused")}onDragStart(t,e){if(void 0===this._dragListener)throw new J("TODSDLU10093");if(void 0===this._dragStartEvent)throw new J("TODS23309");this._dragStartEvent(t,e,this._dragListener,this.componentItem)}onContentItemDestroy(){void 0!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=void 0)}onTabClickDown(t){const e=t.target;e!==this._element&&e!==this._titleElement||(0===t.button?this.notifyFocus():1===t.button&&this._componentItem.isClosable&&this.notifyClose())}onTabTouchStart(t){t.target===this._element&&this.notifyFocus()}onCloseClick(){this.notifyClose()}onCloseTouchStart(){this.notifyClose()}notifyClose(){if(void 0===this._closeEvent)throw new J("TNC15007");this._closeEvent(this._componentItem)}notifyFocus(){if(void 0===this._focusEvent)throw new J("TNA15007");this._focusEvent(this._componentItem)}enableReorder(){this._dragListener=new Zt(this._element,[this._titleElement]),this._dragListener.on("dragStart",this._dragStartListener),this._componentItem.on("destroy",this._contentItemDestroyListener)}disableReorder(){if(void 0===this._dragListener)throw new J("TDR87745");this._componentItem.off("destroy",this._contentItemDestroyListener),this._dragListener.off("dragStart",this._dragStartListener),this._dragListener=void 0}}class Qt{constructor(t,e,i,n,o){this._layoutManager=t,this._componentRemoveEvent=e,this._componentFocusEvent=i,this._componentDragStartEvent=n,this._dropdownActiveChangedEvent=o,this._tabs=[],this._lastVisibleTabIndex=-1,this._dropdownActive=!1,this._element=document.createElement("section"),this._element.classList.add("lm_tabs"),this._dropdownElement=document.createElement("section"),this._dropdownElement.classList.add("lm_tabdropdown_list"),this._dropdownElement.style.display="none"}get tabs(){return this._tabs}get tabCount(){return this._tabs.length}get lastVisibleTabIndex(){return this._lastVisibleTabIndex}get element(){return this._element}get dropdownElement(){return this._dropdownElement}get dropdownActive(){return this._dropdownActive}destroy(){for(let t=0;tthis.handleTabCloseEvent(t)),(t=>this.handleTabFocusEvent(t)),((t,e,i,n)=>this.handleTabDragStartEvent(t,e,i,n)));void 0===e&&(e=this._tabs.length),this._tabs.splice(e,0,i),ethis._lastVisibleTabIndex){const t=this._tabs[e];for(let t=e;t>0;t--)this._tabs[t]=this._tabs[t-1];this._tabs[0]=t}}updateTabSizes(t,e){let i=!1;this.tryUpdateTabSizes(i,t,e)||(i=!0,this.tryUpdateTabSizes(i,t,e)),i!==this._dropdownActive&&(this._dropdownActive=i,this._dropdownActiveChangedEvent())}tryUpdateTabSizes(t,e,i){if(this._tabs.length>0){if(void 0===i)throw new Error("non-empty tabs must have active component item");let n=0,o=!1;const s=this._layoutManager.layoutConfig.settings.tabOverlapAllowance,r=this._tabs.indexOf(i.tab),a=this._tabs[r];this._lastVisibleTabIndex=-1;for(let i=0;ie){if(o)i===r&&(l.style.zIndex="auto",l.style.marginLeft="",l.parentElement!==this._element&&this._element.appendChild(l));else{let t;if(t=r>0&&r<=i?(d-e)/(i-1):(d-e)/i,tthis.onClick(t),this._touchStartListener=t=>this.onTouchStart(t),this._rowColumnClosable=!0,this._closeButton=null,this._popoutButton=null,this._tabsContainer=new Qt(this._layoutManager,(t=>this.handleTabInitiatedComponentRemoveEvent(t)),(t=>this.handleTabInitiatedComponentFocusEvent(t)),((t,e,i,n)=>this.handleTabInitiatedDragStartEvent(t,e,i,n)),(()=>this.processTabDropdownActiveChanged())),this._show=i.show,this._popoutEnabled=i.popoutEnabled,this._popoutLabel=i.popoutLabel,this._maximiseEnabled=i.maximiseEnabled,this._maximiseLabel=i.maximiseLabel,this._minimiseEnabled=i.minimiseEnabled,this._minimiseLabel=i.minimiseLabel,this._closeEnabled=i.closeEnabled,this._closeLabel=i.closeLabel,this._tabDropdownEnabled=i.tabDropdownEnabled,this._tabDropdownLabel=i.tabDropdownLabel,this.setSide(i.side),this._canRemoveComponent=this._configClosable,this._element=document.createElement("section"),this._element.classList.add("lm_header"),this._controlsContainerElement=document.createElement("section"),this._controlsContainerElement.classList.add("lm_controls"),this._element.appendChild(this._tabsContainer.element),this._element.appendChild(this._controlsContainerElement),this._element.appendChild(this._tabsContainer.dropdownElement),this._element.addEventListener("click",this._clickListener,{passive:!0}),this._element.addEventListener("touchstart",this._touchStartListener,{passive:!0}),this._documentMouseUpListener=()=>this._tabsContainer.hideAdditionalTabsDropdown(),globalThis.document.addEventListener("mouseup",this._documentMouseUpListener,{passive:!0}),this._tabControlOffset=this._layoutManager.layoutConfig.settings.tabControlOffset,this._tabDropdownEnabled&&(this._tabDropdownButton=new Kt(this,this._tabDropdownLabel,"lm_tabdropdown",(()=>this._tabsContainer.showAdditionalTabsDropdown()))),this._popoutEnabled&&(this._popoutButton=new Kt(this,this._popoutLabel,"lm_popout",(()=>this.handleButtonPopoutEvent()))),this._maximiseEnabled&&(this._maximiseButton=new Kt(this,this._maximiseLabel,"lm_maximise",(t=>this.handleButtonMaximiseToggleEvent(t)))),this._configClosable&&(this._closeButton=new Kt(this,this._closeLabel,"lm_close",(()=>s()))),this.processTabDropdownActiveChanged()}get show(){return this._show}get side(){return this._side}get leftRightSided(){return this._leftRightSided}get layoutManager(){return this._layoutManager}get parent(){return this._parent}get tabs(){return this._tabsContainer.tabs}get lastVisibleTabIndex(){return this._tabsContainer.lastVisibleTabIndex}get element(){return this._element}get tabsContainerElement(){return this._tabsContainer.element}get controlsContainerElement(){return this._controlsContainerElement}destroy(){this.emit("destroy"),this._popoutEvent=void 0,this._maximiseToggleEvent=void 0,this._clickEvent=void 0,this._touchStartEvent=void 0,this._componentRemoveEvent=void 0,this._componentFocusEvent=void 0,this._componentDragStartEvent=void 0,this._tabsContainer.destroy(),globalThis.document.removeEventListener("mouseup",this._documentMouseUpListener),this._element.remove()}createTab(t,e){this._tabsContainer.createTab(t,e)}removeTab(t){this._tabsContainer.removeTab(t)}processActiveComponentChanged(t){this._tabsContainer.processActiveComponentChanged(t),this.updateTabSizes()}setSide(t){this._side=t,this._leftRightSided=[nt.right,nt.left].includes(this._side)}setRowColumnClosable(t){this._rowColumnClosable=t,this.updateClosability()}updateClosability(){let t;if(this._configClosable)if(this._rowColumnClosable){t=!0;const e=this.tabs.length;for(let i=0;i1}applyFocusedValue(t){t?this._element.classList.add("lm_focused"):this._element.classList.remove("lm_focused")}processMaximised(){if(void 0===this._maximiseButton)throw new J("HPMAX16997");this._maximiseButton.element.setAttribute("title",this._minimiseLabel)}processMinimised(){if(void 0===this._maximiseButton)throw new J("HPMIN16997");this._maximiseButton.element.setAttribute("title",this._maximiseLabel)}updateTabSizes(){if(this._tabsContainer.tabCount>0){const t=this._show?this._layoutManager.layoutConfig.dimensions.headerHeight:0;let e;this._leftRightSided?(this._element.style.height="",this._element.style.width=zt(t)):(this._element.style.width="",this._element.style.height=zt(t)),e=this._leftRightSided?this._element.offsetHeight-this._controlsContainerElement.offsetHeight-this._tabControlOffset:this._element.offsetWidth-this._controlsContainerElement.offsetWidth-this._tabControlOffset,this._tabsContainer.updateTabSizes(e,this._getActiveComponentItemEvent())}}handleTabInitiatedComponentRemoveEvent(t){if(this._canRemoveComponent){if(void 0===this._componentRemoveEvent)throw new J("HHTCE22294");this._componentRemoveEvent(t)}}handleTabInitiatedComponentFocusEvent(t){if(void 0===this._componentFocusEvent)throw new J("HHTAE22294");this._componentFocusEvent(t)}handleTabInitiatedDragStartEvent(t,e,i,n){if(this._canRemoveComponent){if(void 0===this._componentDragStartEvent)throw new J("HHTDSE22294");this._componentDragStartEvent(t,e,i,n)}else i.cancelDrag()}processTabDropdownActiveChanged(){void 0!==this._tabDropdownButton&&Dt(this._tabDropdownButton.element,this._tabsContainer.dropdownActive)}handleButtonPopoutEvent(){if(this._layoutManager.layoutConfig.settings.popoutWholeStack){if(void 0===this._popoutEvent)throw new J("HHBPOE17834");this._popoutEvent()}else{const t=this._getActiveComponentItemEvent();t&&t.popout()}}handleButtonMaximiseToggleEvent(t){if(void 0===this._maximiseToggleEvent)throw new J("HHBMTE16834");this._maximiseToggleEvent()}onClick(t){t.target===this._element&&this.notifyClick(t)}onTouchStart(t){t.target===this._element&&this.notifyTouchStart(t)}notifyClick(t){if(void 0===this._clickEvent)throw new J("HNHC46834");this._clickEvent(t)}notifyTouchStart(t){if(void 0===this._touchStartEvent)throw new J("HNHTS46834");this._touchStartEvent(t)}}class ee extends $t{constructor(t,e,i){var n,o,s,r,a,l,h,d,c,m,u,p,g,f,v,_,y,C,w;super(t,e,i,ee.createElement(document)),this._headerSideChanged=!1,this._resizeListener=()=>this.handleResize(),this._maximisedListener=()=>this.handleMaximised(),this._minimisedListener=()=>this.handleMinimised(),this._headerConfig=e.header;const I=t.layoutConfig.header,b=e.content;let S;if(1!==b.length)S=void 0;else{S=b[0].header}this._initialWantMaximise=e.maximised,this._initialActiveItemIndex=null!==(n=e.activeItemIndex)&&void 0!==n?n:0;const E=null!==(r=null!==(s=null===(o=this._headerConfig)||void 0===o?void 0:o.show)&&void 0!==s?s:null==S?void 0:S.show)&&void 0!==r?r:I.show,x=null!==(h=null!==(l=null===(a=this._headerConfig)||void 0===a?void 0:a.popout)&&void 0!==l?l:null==S?void 0:S.popout)&&void 0!==h?h:I.popout,L=null!==(m=null!==(c=null===(d=this._headerConfig)||void 0===d?void 0:d.maximise)&&void 0!==c?c:null==S?void 0:S.maximise)&&void 0!==m?m:I.maximise,z=null!==(g=null!==(p=null===(u=this._headerConfig)||void 0===u?void 0:u.close)&&void 0!==p?p:null==S?void 0:S.close)&&void 0!==g?g:I.close,M=null!==(_=null!==(v=null===(f=this._headerConfig)||void 0===f?void 0:f.minimise)&&void 0!==v?v:null==S?void 0:S.minimise)&&void 0!==_?_:I.minimise,P=null!==(w=null!==(C=null===(y=this._headerConfig)||void 0===y?void 0:y.tabDropdown)&&void 0!==C?C:null==S?void 0:S.tabDropdown)&&void 0!==w?w:I.tabDropdown;this._maximisedEnabled=!1!==L;const T={show:!1!==E,side:!1===E?nt.top:E,popoutEnabled:!1!==x,popoutLabel:!1===x?"":x,maximiseEnabled:this._maximisedEnabled,maximiseLabel:!1===L?"":L,closeEnabled:!1!==z,closeLabel:!1===z?"":z,minimiseEnabled:!0,minimiseLabel:M,tabDropdownEnabled:!1!==P,tabDropdownLabel:!1===P?"":P};this._header=new te(t,this,T,e.isClosable&&!1!==z,(()=>this.getActiveComponentItem()),(()=>this.remove()),(()=>this.handlePopoutEvent()),(()=>this.toggleMaximise()),(t=>this.handleHeaderClickEvent(t)),(t=>this.handleHeaderTouchStartEvent(t)),(t=>this.handleHeaderComponentRemoveEvent(t)),(t=>this.handleHeaderComponentFocusEvent(t)),((t,e,i,n)=>this.handleHeaderComponentStartDragEvent(t,e,i,n))),this.isStack=!0,this._childElementContainer=document.createElement("section"),this._childElementContainer.classList.add("lm_items"),this.on("resize",this._resizeListener),this._maximisedEnabled&&(this.on("maximised",this._maximisedListener),this.on("minimised",this._minimisedListener)),this.element.appendChild(this._header.element),this.element.appendChild(this._childElementContainer),this.setupHeaderPosition(),this._header.updateClosability()}get childElementContainer(){return this._childElementContainer}get header(){return this._header}get headerShow(){return this._header.show}get headerSide(){return this._header.side}get headerLeftRightSided(){return this._header.leftRightSided}get contentAreaDimensions(){return this._contentAreaDimensions}get initialWantMaximise(){return this._initialWantMaximise}get isMaximised(){return this===this.layoutManager.maximisedStack}get stackParent(){if(!this.parent)throw new Error("Stack should always have a parent");return this.parent}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}init(){if(!0===this.isInitialised)return;this.updateNodeSize();for(let t=0;t0){if(this._initialActiveItemIndex<0||this._initialActiveItemIndex>=e)throw new Error(`ActiveItemIndex out of range: ${this._initialActiveItemIndex} id: ${this.id}`);for(let i=0;ithis.contentItems.length)throw e-=1,new X("SAC99728");if(t instanceof jt)return e=super.addChild(t,e),this._childElementContainer.appendChild(t.element),this._header.createTab(t,e),this.setActiveComponentItem(t,i),this._header.updateTabSizes(),this.updateSize(!1),t.container.setBaseLogicalZIndex(),this._header.updateClosability(),this.emitStateChangedEvent(),e;throw new X("SACC88532")}removeChild(t,e){const i=t,n=this.contentItems.indexOf(i),o=1===this.contentItems.length;if(this._activeComponentItem===i&&(i.focused&&i.blur(),!o)){const t=0===n?1:n-1;this.setActiveComponentItem(this.contentItems[t],!1)}this._header.removeTab(i),super.removeChild(i,e),o||this._header.updateClosability(),this.emitStateChangedEvent()}toggleMaximise(){this.isMaximised?this.minimise():this.maximise()}maximise(){if(!this.isMaximised){this.layoutManager.setMaximisedStack(this);const t=this.contentItems,e=t.length;for(let i=0;i0&&void 0===t)throw new Error("expected non-empty stack to have an active component item");return{type:"stack",content:this.calculateConfigContent(),size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,isClosable:this.isClosable,maximised:this.isMaximised,header:this.createHeaderConfig(),activeItemIndex:t}}onDrop(t,e){if("header"===this._dropSegment){if(this.resetHeaderDropZone(),void 0===this._dropIndex)throw new J("SODDI68990");return void this.addChild(t,this._dropIndex)}if("body"===this._dropSegment)return void this.addChild(t,0,!0);const i="top"===this._dropSegment||"bottom"===this._dropSegment,n="left"===this._dropSegment||"right"===this._dropSegment,o="top"===this._dropSegment||"left"===this._dropSegment,s=i&&this.stackParent.isColumn||n&&this.stackParent.isRow;if(t.isComponent){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createAndInitContentItem(e,this);i.addChild(t),t=i}if(t.type===at.row||t.type===at.column){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}if(s){const e=this.stackParent.contentItems.indexOf(this);this.stackParent.addChild(t,o?e:e+1,!0),this.size*=.5,t.size=this.size,t.sizeUnit=this.sizeUnit,this.stackParent.updateSize(!1)}else{const e=i?at.column:at.row,n=ct.createDefault(e),s=this.layoutManager.createContentItem(n,this);this.stackParent.replaceChild(this,s),s.addChild(t,o?0:void 0,!0),s.addChild(this,o?void 0:0,!0),this.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}highlightDropZone(t,e){for(const i in this._contentAreaDimensions){const n=i,o=this._contentAreaDimensions[n].hoverArea;if(o.x1t&&o.y1e)return void("header"===n?(this._dropSegment="header",this.highlightHeaderDropZone(this._header.leftRightSided?e:t)):(this.resetHeaderDropZone(),this.highlightBodyDropZone(n)))}}getArea(){if("none"===this.element.style.display)return null;const t=super.getElementArea(this._header.element),e=super.getElementArea(this._childElementContainer);if(null===t||null===e)throw new K("SGAHC13086");const i=e.x2-e.x1,n=e.y2-e.y1;return this._contentAreaDimensions={header:{hoverArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2},highlightArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2}}},0===this.contentItems.length?(this._contentAreaDimensions.body={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2}},super.getElementArea(this.element)):(this._contentAreaDimensions.left={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x1+.25*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x1+.5*i,y2:e.y2}},this._contentAreaDimensions.top={hoverArea:{x1:e.x1+.25*i,y1:e.y1,x2:e.x1+.75*i,y2:e.y1+.5*n},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y1+.5*n}},this._contentAreaDimensions.right={hoverArea:{x1:e.x1+.75*i,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1+.5*i,y1:e.y1,x2:e.x2,y2:e.y2}},this._contentAreaDimensions.bottom={hoverArea:{x1:e.x1+.25*i,y1:e.y1+.5*n,x2:e.x1+.75*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1+.5*n,x2:e.x2,y2:e.y2}},super.getElementArea(this.element))}positionHeader(t){this._header.side!==t&&(this._header.setSide(t),this._headerSideChanged=!0,this.setupHeaderPosition())}updateNodeSize(){if("none"!==this.element.style.display){const t=kt(this.element);if(this._header.show){t[this._header.leftRightSided?it.width:it.height]-=this.layoutManager.layoutConfig.dimensions.headerHeight}this._childElementContainer.style.width=zt(t.width),this._childElementContainer.style.height=zt(t.height);for(let e=0;e=o&&t({...t,[e]:i});async function s(t,e){return(await Promise.all(e.map((async([e,i])=>[e,await t(i,e)])))).reduce(o,{})}n.mapEntriesAsync=s,n.mapValuesAsync=async function(t,e){let i;return i=e instanceof Map?[...e.entries()]:Object.entries(e),s(t,i)};var r,a,l,h,d=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldSet||function(t,e,i,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(t,i):o?o.value=i:e.set(t,i),i},c=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldGet||function(t,e,i,n){if("a"===i&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?n:"a"===i?n.call(t):n?n.value:e.get(t)};Object.defineProperty(i,"__esModule",{value:!0});var m=i.DefaultLayoutManager=void 0;const u=n;class p{constructor(t){a.set(this,void 0),l.set(this,new Map),d(this,a,t,"f")}size(){return c(this,l,"f").size}async applyLayoutSnapshot({layouts:t}){if(Object.keys(t).length>1)throw new Error("[LayoutManager] Tried to call applyLayoutSnapshot with more than 1 layout. When implementing multiple layouts via overridden LayoutManager class, you must override and fully implement the applyLayoutSnapshot method without calling super.applyLayoutSnapshot().");const[[e,i]]=Object.entries(t);await p.createLayout(this,{layoutName:e,layout:i})}async showLayout({layoutName:t}){}async getLayoutSnapshot(){return{layouts:await(0,u.mapValuesAsync)((t=>t.getFrameSnapshot()),c(this,l,"f"))}}async removeLayout({layoutName:t}){}getLayoutIdentityForView(t){const e=[...c(this,l,"f").values()].find((e=>e.getCurrentViews().some((e=>e.name===t.name&&e.uuid===t.uuid))));return e?.identity??void 0}isLayoutVisible({layoutName:t}){return c(p,r,"m",h).call(p,this,t).isVisible()}resolveLayoutIdentity(t){if(t&&"layoutName"in t)return t;const e=[...c(this,l,"f").values()];if(1===e.length)return e[0].identity;const i=e.find((t=>t.isVisible()));return i?.identity??void 0}static async resolveLayout(t,e){const i=t.resolveLayoutIdentity(e);if(void 0===i||!("layoutName"in i))throw new Error("[layout-manager] resolveLayout: Could not resolve the layout identity. Make sure you include 'layoutName' in the identity object.");return c(p,r,"m",h).call(p,t,i.layoutName)}static async handleSharedView(t,e,i){await(0,u.mapValuesAsync)((async t=>{if(t.identity.layoutName!==e.layoutName){const e=t.getCurrentViews().find((t=>t.name===i.name));e&&await t.onViewDetached({viewIdentity:e,target:null}).catch(console.error)}}),c(t,l,"f"))}static async handleLastViewRemoved(t,e){await t.removeLayout(e),await c(t,a,"f").handleLastViewRemoved(t)}static async destroyLayout(t,{layoutName:e}){await c(p,r,"m",h).call(p,t,e).destroy(),c(t,l,"f").delete(e)}static async createLayout(t,e){const{layoutName:i}=e;if(c(t,l,"f").has(i))throw new Error(`Layout name ${i} already exists`);await c(t,a,"f").createLayout(e,t)}static registerLayout(t,e,i){c(t,l,"f").set(e,i)}static getAllLayouts(t){return[...c(t,l,"f").values()]}static setInitialSnapshot(t,e){c(t,a,"f").setInitialSnapshot(e)}static createClosedConstructor(...t){return class extends p{constructor(){super(...t)}}}}m=i.DefaultLayoutManager=p,r=p,a=new WeakMap,l=new WeakMap,h=function(t,e){const i=c(t,l,"f").get(e);if(!i)throw new Error(`[layout-manager] getLayoutByName: Could not locate layout with name '${e}'`);return i};var g={},f={},v={};Object.defineProperty(v,"__esModule",{value:!0}),v.ReversibleMap=void 0;v.ReversibleMap=class{constructor(){this.valueToKey=new Map,this.keyToValue=new Map,this.setUnique=(t,e)=>{if(this.hasKey(t)||this.hasValue(e))throw new Error("Key or value already in the map.");this.keyToValue.set(t,e),this.valueToKey.set(e,t)},this.getKey=t=>{const e=this.valueToKey.get(t);if(!e)throw new Error("Value not found in the map.");return e},this.deleteKey=t=>{const e=this.getValue(t);return this.keyToValue.delete(t),this.valueToKey.delete(e),e},this.deleteValue=t=>{const e=this.getKey(t);return this.keyToValue.delete(e),this.valueToKey.delete(t),e},this.hasKey=t=>this.keyToValue.has(t),this.hasValue=t=>this.valueToKey.has(t)}getValue(t){const e=this.keyToValue.get(t);if(!e)throw new Error("Key not found in the map.");return e}},Object.defineProperty(f,"__esModule",{value:!0});var _=f.LayoutContentCache=void 0;const y=t.lazy,C=v;class w{constructor(){this.contentItemCache=new C.ReversibleMap,this.contentItemCacheId=0,this.createCacheKey=()=>{const t=`entity-${this.contentItemCacheId.toString()}`;return this.contentItemCacheId+=1,t},this.hasKey=t=>this.contentItemCache.hasKey(t),this.getItemOrUndefined=t=>{try{return this.getContentItemOrThrow(t)}catch(t){return}},this.getContentItemOrThrow=(t,e)=>{if(!this.contentItemCache.hasKey(t))throw new Error("Layout component has been destroyed or detached from the current layout.");const i=this.contentItemCache.getValue(t);if(e&&!e.includes(i.type))throw new Error(`Layout item is not the expected type. Expected ${e.join(", ")}, got ${i.type}.`);return i},this.getOrCreateEntityId=t=>{if(this.contentItemCache.hasValue(t))return this.contentItemCache.getKey(t);t.onDestroyed((()=>{this.contentItemCache.deleteValue(t)}));const e=this.createCacheKey();return this.contentItemCache.setUnique(e,t),e}}static getSingleInstance(){return w.singleton.getValue()}}_=f.LayoutContentCache=w,w.singleton=new y.Lazy((()=>new w));var I={},b={};!function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.getAdjacentStacks=t.doShareEdge=t.getAdjacentItem=void 0;t.getAdjacentItem=(e,i)=>{const{parent:n}=e;if(e.isRoot()||!n)return;const o=["top","bottom"].includes(i)?"column":"row",s=["top","left"].includes(i)?-1:1;if(n.type===o){const t=n.contentItems.indexOf(e)+s;if(t>=0&&t{const n=t.getBounds(),o=e.getBounds();if(!n||!o)return!1;if(["top","bottom"].includes(i)){return!(n.righto.right)}return!(n.bottomo.bottom)};t.getAdjacentStacks=(e,i)=>{const n=["top","bottom"].includes(i)?"row":"column",o=s=>"stack"===s.type?(0,t.doShareEdge)(e,s,i)?[s]:[]:"root"===s.type||"ground"===s.type?[]:s.type===n?s.contentItems.map((t=>o(t))).flat():s.type!==n?["top","right"].includes(i)?o(s.contentItems[s.contentItems.length-1]):o(s.contentItems[0]):[],s=(0,t.getAdjacentItem)(e,i);return s?o(s):[]}}(b);var S=t.commonjsGlobal&&t.commonjsGlobal.__decorate||function(t,e,i,n){var o,s=arguments.length,r=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(s<3?o(r):s>3?o(e,i,r):o(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};Object.defineProperty(I,"__esModule",{value:!0}),I.LayoutEntitiesController=void 0;const E=t.decorators,x=b,L=i;class z{constructor(t,e,i){this.wire=t,this.layoutManager=e,this.layoutContentCache=i,this.analytics=t=>{this.wire.sendAction(`layout-controller-${t}`).catch((()=>{}))},this.getLayoutIdentityForViewOrThrow=async t=>{const e=this.layoutManager.getLayoutIdentityForView(t);if(!e)throw new Error(`View identity ${t.name} is not attached to any layouts.`);return e},this.getRoot=async t=>{this.analytics("get-root");const e=(await this.getLayout(t)).getRoot();return{type:e.type,entityId:this.layoutContentCache.getOrCreateEntityId(e)}},this.getStackByView=async t=>{this.analytics("get-stack-by-view");const e=await this.getLayoutIdentityForViewOrThrow(t),i=(await this.getLayout(e)).getStackByView(t);if("stack"===i?.type)return{entityId:this.layoutContentCache.getOrCreateEntityId(i),type:"stack"}},this.getStackViews=t=>{this.analytics("get-stack-views");return this.layoutContentCache.getContentItemOrThrow(t,["stack"]).contentItems.map((t=>({name:t.viewName,uuid:this.wire.me.uuid})))},this.isRoot=t=>{this.analytics("is-root");return this.layoutContentCache.getContentItemOrThrow(t).isRoot()},this.exists=t=>(this.analytics("exists"),this.layoutContentCache.hasKey(t)),this.addViewToStack=async(t,e,{index:i}={index:0})=>{this.analytics("add-view-to-stack");const n=this.layoutContentCache.getContentItemOrThrow(t);if(i&&i>n.contentItems.length+1)throw new Error(`Index '${i}' out of range, please exclude the index or specify a number between 0 and ${n.contentItems.length}`);const o={id:t,index:i},{identity:s}=await n.layout.platformCreateView(e,{location:o});return s},this.findViewInStack=(t,e)=>t.contentItems.find((t=>t.viewName===e.name)),this.removeViewFromStack=async(t,e)=>{this.analytics("remove-view-from-stack");const i=this.layoutContentCache.getContentItemOrThrow(t,["stack"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to remove a view ('${e.name}') which does not belong to the stack.`);await n.layout.platformCloseView(e)},this.createAdjacentStack=async(t,e,{position:i="right"}={})=>{if(this.analytics("create-adjacent-stack"),!Array.isArray(e)||0===e.length)throw new Error('The parameter "views" must be an array with at least 1 element.');if(!["top","bottom","left","right"].includes(i))throw new Error(`Invalid position '${i}' specified.`);const n=this.layoutContentCache.getContentItemOrThrow(t).createAdjacentStack({position:i}),o=this.layoutContentCache.getOrCreateEntityId(n);return await Promise.all(e.reverse().map((t=>this.addViewToStack(o,t)))),o},this.getAdjacentStacks=async({targetId:t,edge:e})=>{this.analytics("get-adjacent-stacks");const i=this.layoutContentCache.getContentItemOrThrow(t);return(0,x.getAdjacentStacks)(i,e).map((t=>({entityId:this.layoutContentCache.getOrCreateEntityId(t)})))},this.setStackActiveView=async(t,e)=>{this.analytics("set-stack-active-view");const i=this.layoutContentCache.getContentItemOrThrow(t,["stack"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to set a view ('${e.name}') as active when it does not belong to the stack.`);i.setActiveContentItem(n,!0)}}async getLayout(t){const e=await L.DefaultLayoutManager.resolveLayout(this.layoutManager,t);if(!e)throw new Error(`Could not resolve target layout identity ${JSON.stringify(t)}`);return e}getContent(t){this.analytics("get-content");return this.layoutContentCache.getContentItemOrThrow(t,["column","row"]).contentItems.map((t=>({type:t.type,entityId:this.layoutContentCache.getOrCreateEntityId(t)})))}getParent(t){this.analytics("get-parent");const e=this.layoutContentCache.getContentItemOrThrow(t);if(!e.isRoot())return e.parent?.contentItems.includes(e)?{type:e.parent.type,entityId:this.layoutContentCache.getOrCreateEntityId(e.parent)}:void 0}}S([(0,E.expose)()],z.prototype,"getLayoutIdentityForViewOrThrow",void 0),S([(0,E.expose)()],z.prototype,"getRoot",void 0),S([(0,E.expose)()],z.prototype,"getStackByView",void 0),S([(0,E.expose)()],z.prototype,"getStackViews",void 0),S([(0,E.expose)()],z.prototype,"getContent",null),S([(0,E.expose)()],z.prototype,"getParent",null),S([(0,E.expose)()],z.prototype,"isRoot",void 0),S([(0,E.expose)()],z.prototype,"exists",void 0),S([(0,E.expose)()],z.prototype,"addViewToStack",void 0),S([(0,E.expose)()],z.prototype,"removeViewFromStack",void 0),S([(0,E.expose)()],z.prototype,"createAdjacentStack",void 0),S([(0,E.expose)()],z.prototype,"getAdjacentStacks",void 0),S([(0,E.expose)()],z.prototype,"setStackActiveView",void 0),I.LayoutEntitiesController=z,Object.defineProperty(g,"__esModule",{value:!0});var M=g.initLayoutEndpoints=void 0;const P=t.apiExposer,T=t.layout_constants,A=f,k=I,D=i;M=g.initLayoutEndpoints=async function(t,e){const i=t.getFin(),n=await i.Platform.getCurrentSync().getClient(),o=new P.ChannelsExposer(n);await new P.ApiExposer(o).exposeInstance(new k.LayoutEntitiesController(t,e,A.LayoutContentCache.getSingleInstance()),{id:T.LAYOUT_CONTROLLER_ID}),await async function(t,e){const i=t=>async i=>{const n=await D.DefaultLayoutManager.resolveLayout(e,i.target);if(!n)throw new Error(`Could not resolve the layout target from payload ${JSON.stringify(i)}`);return t(n,i)},n=(e,n)=>{t.register(e,i(n))},o=(t,e)=>{n(t,e)};n("replace-view",((t,e)=>t.replaceView(e))),n("replace-layout",((t,{layout:e})=>t.replaceLayout(e))),n("add-view",((t,e)=>t.insertView(e))),o("layout-add-view",((t,{viewOptions:e,location:i,targetView:n})=>t.platformCreateView(e,{location:i,targetView:n}))),n("close-view",((t,e)=>t.cleanupView(e.viewIdentity))),o("layout-close-view",((t,e)=>t.platformCloseView(e.viewIdentity))),n("apply-preset-layout",((t,e)=>t.applyPreset(e))),n("get-layout-views",(t=>t.getCurrentViews())),n("get-frame-snapshot",(t=>t.getFrameSnapshot())),n("is-visible",(t=>t.isVisible())),n("destroy",(t=>t.destroy())),t.register("get-layout-snapshot",(()=>e.getLayoutSnapshot()))}(n,e)};var R={};Object.defineProperty(R,"__esModule",{value:!0});var U=R.BaseLayout=void 0;U=R.BaseLayout=class{};var O={};Object.defineProperty(O,"__esModule",{value:!0});var V=O.DOMEmitter=void 0;V=O.DOMEmitter=class{constructor(t){this.container=t}dispatchLocalEvent(t,e){const i={...e,type:t,tabSelector:`tab-${e.name}`,containerSelector:`container-${e.name}`,topic:"openfin-DOM-event"};this.container.dispatchEvent(new CustomEvent(t,{detail:i}))}};var B={};Object.defineProperty(B,"__esModule",{value:!0});var H=B.mapLayoutContentItemsImmutableSync=B.mapLayoutContentItemsImmutable=W=B.isVisible=void 0;var W=B.isVisible=t=>(0!==t.offsetWidth||0!==t.offsetHeight)&&"hidden"!==window.getComputedStyle(t).visibility&&t.offsetTop>=0&&t.offsetLeft>=0&&t.offsetTop<=window.innerHeight&&t.offsetLeft<=window.innerWidth;const F=t=>"type"in t&&"component"===t.type;B.mapLayoutContentItemsImmutable=async function t(e,i){return F(i)?e(i):{...i,content:await Promise.all(i.content?.map((i=>t(e,i))))}},H=B.mapLayoutContentItemsImmutableSync=function t(e,i){return F(i)?e(i):{...i,content:i.content?.map((i=>t(e,i)))}};class N extends Error{constructor(t,e){super(e),this.type=t}}class G extends N{constructor(t,e){super("Configuration",t),this.node=e}}class j extends N{constructor(t){super("PopoutBlocked",t)}}class $ extends N{constructor(t){super("API",t)}}class Z extends N{constructor(t){super("Bind",t)}}class q extends Error{constructor(t,e,i){super(`${t}: ${e}${void 0===i?"":": "+i}`)}}class X extends q{constructor(t,e){super("Assert",t,e)}}class Y extends q{constructor(t,e,i){super("UnreachableCase",t,`${e}${void 0===i?"":": "+i}`)}}class K extends q{constructor(t,e){super("UnexpectedNull",t,e)}}class J extends q{constructor(t,e){super("UnexpectedUndefined",t,e)}}var Q;!function(t){let e=!1;const i={PopoutCannotBeCreatedWithGroundItemConfig:{id:0,default:"Popout cannot be created with ground ItemConfig"},PleaseRegisterAConstructorFunction:{id:1,default:"Please register a constructor function"},ComponentTypeNotRegisteredAndBindComponentEventHandlerNotAssigned:{id:2,default:"Component type not registered and BindComponentEvent handler not assigned"},ComponentIsAlreadyRegistered:{id:3,default:"Component is already registered"},ComponentIsNotVirtuable:{id:4,default:"Component is not virtuable. Requires rootHtmlElement field/getter"},VirtualComponentDoesNotHaveRootHtmlElement:{id:5,default:'Virtual component does not have getter "rootHtmlElement"'},ItemConfigIsNotTypeComponent:{id:6,default:"ItemConfig is not of type component"},InvalidNumberPartInSizeString:{id:7,default:"Invalid number part in size string"},UnknownUnitInSizeString:{id:8,default:"Unknown unit in size string"},UnsupportedUnitInSizeString:{id:9,default:"Unsupported unit in size string"}};t.idCount=Object.keys(i).length;const n=Object.values(i);t.checkInitialise=function(){if(!e)for(let e=0;e="0"&&t<="9"}function Tt(t,e){const i=zt(e);t.style.width=i}function At(t,e){const i=zt(e);t.style.height=i}function kt(t){return{width:t.offsetWidth,height:t.offsetHeight}}function Dt(t,e){t.style.display=e?"":"none"}function Rt(t,e){if(void 0!==e)for(const i in e)if(e.hasOwnProperty(i)){const n=e[i],o=t[i];t[i]=Ut(o,n)}return t}function Ut(t,e){if("object"!=typeof e)return e;if(Array.isArray(e)){const t=e.length,i=new Array(t);for(let n=0;n36)throw new Error("Too many keys in config minifier map")},t.translateObject=n}(dt||(dt={})),function(t){t.defaults={type:at.ground,content:[],size:1,sizeUnit:ht.Fractional,minSize:void 0,minSizeUnit:ht.Pixel,id:"",isClosable:!0},t.createCopy=function(t,e){switch(t.type){case at.ground:case at.row:case at.column:return gt.createCopy(t,e);case at.stack:return ut.createCopy(t,e);case at.component:return pt.createCopy(t);default:throw new Y("CICC91354",t.type,"Invalid Config Item type specified")}},t.createDefault=function(t){switch(t){case at.ground:throw new X("CICCDR91562");case at.row:case at.column:return gt.createDefault(t);case at.stack:return ut.createDefault();case at.component:return pt.createDefault();default:throw new Y("CICCDD91563",t,"Invalid Config Item type specified")}},t.isComponentItem=function(t){return t.type===at.component},t.isStackItem=function(t){return t.type===at.stack},t.isGroundItem=function(t){return t.type===at.ground}}(ct||(ct={})),function(t){t.defaultMaximised=!1,function(t){t.createCopy=function(t,e){return void 0===t?void 0:{show:null!=e?e:t.show,popout:t.popout,close:t.close,maximise:t.maximise,minimise:t.minimise,tabDropdown:t.tabDropdown}}}(t.Header||(t.Header={}))}(mt||(mt={})),function(t){function e(t){const e=t.length,i=new Array(e);for(let n=0;n"__glMaximised"===t));t>0&&(o=!0,n=n.splice(t,1)),e=n.length>0?n[0]:ct.defaults.id}else e=n;return i=void 0!==t.maximised?t.maximised:o,{id:e,maximised:i}}}(wt||(wt={})),function(t){function e(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0;return{resolved:!0,root:Et.resolve(i),openPopouts:t.resolveOpenPopouts(e.openPopouts),dimensions:t.Dimensions.resolve(e.dimensions),settings:t.Settings.resolve(e.settings),header:t.Header.resolve(e.header,e.settings,e.labels)}}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:Lt.fromResolvedArray(e.openPopouts),settings:_t.Settings.createCopy(e.settings),dimensions:t.Dimensions.fromResolved(e.dimensions),header:_t.Header.createCopy(e.header)}},t.isResolved=function(t){const e=t;return void 0!==e.resolved&&!0===e.resolved},t.resolveOpenPopouts=function(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0,{root:Et.resolve(o),openPopouts:xt.resolveOpenPopouts(e.openPopouts),dimensions:xt.Dimensions.resolve(e.dimensions),settings:xt.Settings.resolve(e.settings),header:xt.Header.resolve(e.header,e.settings,e.labels),parentId:null!==(i=e.parentId)&&void 0!==i?i:null,indexInParent:null!==(n=e.indexInParent)&&void 0!==n?n:null,window:t.Window.resolve(e.window,e.dimensions),resolved:!0}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:i(e.openPopouts),dimensions:xt.Dimensions.fromResolved(e.dimensions),settings:_t.Settings.createCopy(e.settings),header:_t.Header.createCopy(e.header),parentId:e.parentId,indexInParent:e.indexInParent,window:t.Window.fromResolved(e.window)}},t.fromResolvedArray=i}(Lt||(Lt={}));class Wt{constructor(){this._allEventSubscriptions=[],this._subscriptionsMap=new Map,this.unbind=this.removeEventListener,this.trigger=this.emit}tryBubbleEvent(t,e){}emit(t,...e){let i=this._subscriptionsMap.get(t);if(void 0!==i){i=i.slice();for(let t=0;t0){const n=e.slice();n.unshift(t);const o=this._allEventSubscriptions.slice();for(let t=0;t0?n.contentItems[0]:n,e=0);const o=this._layoutManager.createAndInitContentItem(i,t);t.addChild(o,e),this._layoutManager.layoutConfig.settings.popInOnClose?this._onClose():this.close()}createWindow(){const t=this.createUrl(),e=Math.floor(1e6*Math.random()).toString(36),i=this.serializeWindowFeatures({width:this._initialWindowSize.width,height:this._initialWindowSize.height,innerWidth:this._initialWindowSize.width,innerHeight:this._initialWindowSize.height,menubar:"no",toolbar:"no",location:"no",personalbar:"no",resizable:"yes",scrollbars:"no",status:"no"});if(this._popoutWindow=globalThis.open(t,e,i),this._popoutWindow)this._popoutWindow.addEventListener("load",(()=>this.positionWindow()),{passive:!0}),this._popoutWindow.addEventListener("beforeunload",(()=>{this._layoutManager.layoutConfig.settings.popInOnClose?this.popIn():this._onClose()}),{passive:!0}),this._checkReadyInterval=setInterval((()=>this.checkReady()),10);else if(!0===this._layoutManager.layoutConfig.settings.blockedPopoutsThrowError){throw new j("Popout blocked")}}checkReady(){if(null===this._popoutWindow)throw new K("BPCR01844");this._popoutWindow.__glInstance&&this._popoutWindow.__glInstance.isInitialised&&(this.onInitialised(),void 0!==this._checkReadyInterval&&(clearInterval(this._checkReadyInterval),this._checkReadyInterval=void 0))}serializeWindowFeatures(t){const e=[];for(const i in t)e.push(i+"="+t[i].toString());return e.join(",")}createUrl(){const t="gl-window-config-"+Ot(),e=_t.minifyConfig(this._config);try{localStorage.setItem(t,JSON.stringify(e))}catch(t){throw new Error("Error while writing to localStorage "+function(t){return t instanceof Error?t.message:"string"==typeof t?t:"Unknown Error"}(t))}const i=new URL(location.href);return i.searchParams.set("gl-window",t),i.toString()}positionWindow(){if(null===this._popoutWindow)throw new Error("BrowserPopout.positionWindow: null popoutWindow");this._popoutWindow.moveTo(this._initialWindowSize.left,this._initialWindowSize.top),this._popoutWindow.focus()}onInitialised(){this._isInitialised=!0,this.getGlInstance().on("popIn",(()=>this.popIn())),this.emit("initialised")}_onClose(){setTimeout((()=>this.emit("closed")),50)}}class Gt extends Wt{constructor(t,e,i,n){super(),this.layoutManager=t,this._parent=i,this._element=n,this._popInParentIds=[],this._type=e.type,this._id=e.id,this._isInitialised=!1,this.isGround=!1,this.isRow=!1,this.isColumn=!1,this.isStack=!1,this.isComponent=!1,this.size=e.size,this.sizeUnit=e.sizeUnit,this.minSize=e.minSize,this.minSizeUnit=e.minSizeUnit,this._isClosable=e.isClosable,this._pendingEventPropagations={},this._throttledEvents=["stateChanged"],this._contentItems=this.createContentItems(e.content)}get type(){return this._type}get id(){return this._id}set id(t){this._id=t}get popInParentIds(){return this._popInParentIds}get parent(){return this._parent}get contentItems(){return this._contentItems}get isClosable(){return this._isClosable}get element(){return this._element}get isInitialised(){return this._isInitialised}static isStack(t){return t.isStack}static isComponentItem(t){return t.isComponent}static isComponentParentableItem(t){return t.isStack||t.isGround}removeChild(t,e=!1){const i=this._contentItems.indexOf(t);if(-1===i)throw new Error("Can't remove child item. Unknown content item");if(e||this._contentItems[i].destroy(),this._contentItems.splice(i,1),this._contentItems.length>0)this.updateSize(!1);else if(!this.isGround&&!0===this._isClosable){if(null===this._parent)throw new K("CIUC00874");this._parent.removeChild(this)}}addChild(t,e,i){return null!=e||(e=this._contentItems.length),this._contentItems.splice(e,0,t),t.setParent(this),!0===this._isInitialised&&!1===t._isInitialised&&t.init(),e}replaceChild(t,e,i=!1){const n=this._contentItems.indexOf(t),o=t._element.parentNode;if(-1===n)throw new X("CIRCI23232","Can't replace child. oldChild is not child of this");if(null===o)throw new K("CIRCP23232");if(o.replaceChild(e._element,t._element),!0===i&&(t._parent=null,t.destroy()),this._contentItems[n]=e,e.setParent(this),e.size=t.size,e.sizeUnit=t.sizeUnit,e.minSize=t.minSize,e.minSizeUnit=t.minSizeUnit,null===e._parent)throw new K("CIRCNC45699");!0===e._parent._isInitialised&&!1===e._isInitialised&&e.init(),this.updateSize(!1)}remove(){if(null===this._parent)throw new K("CIR11110");this._parent.removeChild(this)}popout(){const t=Ot(),e=this.layoutManager.createPopoutFromContentItem(this,void 0,t,void 0);return this.emitBaseBubblingEvent("stateChanged"),e}calculateConfigContent(){const t=this._contentItems,e=t.length,i=new Array(e);for(let n=0;nthis.propagateEventToLayoutManager(t,e))))}propagateEventToLayoutManager(t,e){this._pendingEventPropagations[t]=!1,this.layoutManager.emitUnknown(t,e)}}class jt extends Gt{constructor(t,e,i){super(t,e,i,document.createElement("div")),this._parentItem=i,this._focused=!1,this.isComponent=!0,this._reorderEnabled=e.reorderEnabled,this.applyUpdatableConfig(e),this._initialWantMaximise=e.maximised;const n=document.createElement("div");n.classList.add("lm_content"),this.element.appendChild(n),this._container=new Ft(e,this,t,n,(t=>this.handleUpdateItemConfigEvent(t)),(()=>this.show()),(()=>this.hide()),(t=>this.focus(t)),(t=>this.blur(t)))}get componentName(){return this._container.componentType}get componentType(){return this._container.componentType}get reorderEnabled(){return this._reorderEnabled}get initialWantMaximise(){return this._initialWantMaximise}get component(){return this._container.component}get container(){return this._container}get parentItem(){return this._parentItem}get headerConfig(){return this._headerConfig}get title(){return this._title}get tab(){return this._tab}get focused(){return this._focused}destroy(){this._container.destroy(),super.destroy()}applyUpdatableConfig(t){this.setTitle(t.title),this._headerConfig=t.header}toConfig(){const t=this._container.stateRequestEvent,e=void 0===t?this._container.state:t();return{type:at.component,content:[],size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,maximised:!1,isClosable:this.isClosable,reorderEnabled:this._reorderEnabled,title:this._title,header:mt.Header.createCopy(this._headerConfig),componentType:pt.copyComponentType(this.componentType),componentState:e}}close(){if(null===this.parent)throw new K("CIC68883");this.parent.removeChild(this,!1)}enterDragMode(t,e){Tt(this.element,t),At(this.element,e),this._container.enterDragMode(t,e)}exitDragMode(){this._container.exitDragMode()}enterStackMaximised(){this._container.enterStackMaximised()}exitStackMaximised(){this._container.exitStackMaximised()}drag(){this._container.drag()}updateSize(t){this.updateNodeSize(t)}init(){this.updateNodeSize(!1),super.init(),this._container.emit("open"),this.initContentItems()}setTitle(t){this._title=t,this.emit("titleChanged",t),this.emit("stateChanged")}setTab(t){this._tab=t,this.emit("tab",t),this._container.setTab(t)}hide(){super.hide(),this._container.setVisibility(!1)}show(){super.show(),this._container.setVisibility(!0)}focus(t=!1){this.parentItem.setActiveComponentItem(this,!0,t)}setFocused(t){this._focused=!0,this.tab.setFocused(),t||this.emitBaseBubblingEvent("focus")}blur(t=!1){this._focused&&this.layoutManager.setFocusedComponentItem(void 0,t)}setBlurred(t){this._focused=!1,this.tab.setBlurred(),t||this.emitBaseBubblingEvent("blur")}setParent(t){this._parentItem=t,super.setParent(t)}handleUpdateItemConfigEvent(t){this.applyUpdatableConfig(t)}updateNodeSize(t){if("none"!==this.element.style.display){const{width:e,height:i}=kt(this.element);this._container.setSizeToNodeSize(e,i,t)}}}class $t extends Gt{constructor(){super(...arguments),this._focused=!1}get focused(){return this._focused}setFocusedValue(t){this._focused=t}}class Zt extends Wt{constructor(t,e){super(),this._eElement=t,this._pointerTracking=!1,this._pointerDownEventListener=t=>this.onPointerDown(t),this._pointerMoveEventListener=t=>this.onPointerMove(t),this._pointerUpEventListener=t=>this.onPointerUp(t),this._timeout=void 0,this._allowableTargets=[t,...e],this._oDocument=document,this._eBody=document.body,this._nDelay=1800,this._nDistance=10,this._nX=0,this._nY=0,this._nOriginalX=0,this._nOriginalY=0,this._dragging=!1,this._eElement.addEventListener("pointerdown",this._pointerDownEventListener,{passive:!0})}destroy(){this.checkRemovePointerTrackingEventListeners(),this._eElement.removeEventListener("pointerdown",this._pointerDownEventListener)}cancelDrag(){this.processDragStop(void 0)}onPointerDown(t){if(this._allowableTargets.includes(t.target)&&t.isPrimary){const e=this.getPointerCoordinates(t);this.processPointerDown(e)}}processPointerDown(t){this._nOriginalX=t.x,this._nOriginalY=t.y,this._oDocument.addEventListener("pointermove",this._pointerMoveEventListener),this._oDocument.addEventListener("pointerup",this._pointerUpEventListener,{passive:!0}),this._pointerTracking=!0,this._timeout=setTimeout((()=>{try{this.startDrag()}catch(t){throw console.error(t),t}}),this._nDelay)}onPointerMove(t){this._pointerTracking&&(this.processDragMove(t),t.preventDefault())}processDragMove(t){this._nX=t.pageX-this._nOriginalX,this._nY=t.pageY-this._nOriginalY,!1===this._dragging&&(Math.abs(this._nX)>this._nDistance||Math.abs(this._nY)>this._nDistance)&&this.startDrag(),this._dragging&&this.emit("drag",this._nX,this._nY,t)}onPointerUp(t){this.processDragStop(t)}processDragStop(t){var e;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this.checkRemovePointerTrackingEventListeners(),!0===this._dragging&&(this._eBody.classList.remove("lm_dragging"),this._eElement.classList.remove("lm_dragging"),null===(e=this._oDocument.querySelector("iframe"))||void 0===e||e.style.setProperty("pointer-events",""),this._dragging=!1,this.emit("dragStop",t))}checkRemovePointerTrackingEventListeners(){this._pointerTracking&&(this._oDocument.removeEventListener("pointermove",this._pointerMoveEventListener),this._oDocument.removeEventListener("pointerup",this._pointerUpEventListener),this._pointerTracking=!1)}startDrag(){var t;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this._dragging=!0,this._eBody.classList.add("lm_dragging"),this._eElement.classList.add("lm_dragging"),null===(t=this._oDocument.querySelector("iframe"))||void 0===t||t.style.setProperty("pointer-events","none"),this.emit("dragStart",this._nOriginalX,this._nOriginalY)}getPointerCoordinates(t){return{x:t.pageX,y:t.pageY}}}class qt{constructor(t,e,i){this._isVertical=t,this._size=e,this._grabSize=i0){const i=this.createSplitter(Math.max(0,e-1)).element;e>0?(this.contentItems[e-1].element.insertAdjacentElement("afterend",i),i.insertAdjacentElement("afterend",t.element)):(this.contentItems[0].element.insertAdjacentElement("beforebegin",i),i.insertAdjacentElement("beforebegin",t.element))}else this._childElementContainer.appendChild(t.element);super.addChild(t,e);const n=1/this.contentItems.length*100;if(!0===i)return this.emitBaseBubblingEvent("stateChanged"),e;for(let e=0;e0&&(this.calculateRelativeSizes(),this.setAbsoluteSizes()),this.emitBaseBubblingEvent("stateChanged"),this.emit("resize")}setAbsoluteSizes(){const t=this.calculateAbsoluteSizes();for(let e=0;e0&&t.itemSizes[e]++,this._isColumn?(Tt(this.contentItems[e].element,t.crossAxisSize),At(this.contentItems[e].element,t.itemSizes[e])):(Tt(this.contentItems[e].element,t.itemSizes[e]),At(this.contentItems[e].element,t.crossAxisSize))}calculateAbsoluteSizes(){const t=(this.contentItems.length-1)*this._splitterSize,{width:e,height:i}=kt(this.element);let n,o;this._isColumn?(n=i-t,o=e):(n=e-t,o=i);let s=0;const r=[];for(let t=0;t0){const n=100-t;for(let t=0;t100&&e.length>0){for(let t=0;te)return;{const r=i/e;let a=i;for(let e=0;ethis.onSplitterDrag(e,t,i))),e.on("dragStop",(()=>this.onSplitterDragStop(e))),e.on("dragStart",(()=>this.onSplitterDragStart(e))),this._splitter.splice(t,0,e),e}getSplitItems(t){const e=this._splitter.indexOf(t);return{before:this.contentItems[e],after:this.contentItems[e+1]}}calculateContentItemMinSize(t){const e=t.minSize;if(void 0!==e){if(t.minSizeUnit===ht.Pixel)return e;throw new X("ROCGMD98831",JSON.stringify(t))}{const t=this.layoutManager.layoutConfig.dimensions;return this._isColumn?t.defaultMinItemHeight:t.defaultMinItemWidth}}calculateContentItemsTotalMinSize(t){let e=0;for(const i of t)e+=this.calculateContentItemMinSize(i);return e}onSplitterDragStart(t){const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=this.calculateContentItemsTotalMinSize(e.before.contentItems),s=this.calculateContentItemsTotalMinSize(e.after.contentItems);this._splitterPosition=0,this._splitterMinPosition=-1*(i-o),this._splitterMaxPosition=n-s}onSplitterDrag(t,e,i){let n=this._isColumn?i:e;if(null===this._splitterMinPosition||null===this._splitterMaxPosition)throw new K("ROCOSD59226");n=Math.max(n,this._splitterMinPosition),n=Math.min(n,this._splitterMaxPosition),this._splitterPosition=n;const o=zt(n);this._isColumn?t.element.style.top=o:t.element.style.left=o}onSplitterDragStop(t){if(null===this._splitterPosition)throw new K("ROCOSDS66932");{const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=(this._splitterPosition+i)/(i+n),s=e.before.size+e.after.size;e.before.size=o*s,e.after.size=(1-o)*s,t.element.style.top=zt(0),t.element.style.left=zt(0),globalThis.requestAnimationFrame((()=>this.updateSize(!1)))}}}!function(t){t.getElementDimensionSize=function(t,e){return"width"===e?function(t){return t.offsetWidth}(t):function(t){return t.offsetHeight}(t)},t.setElementDimensionSize=function(t,e,i){return"width"===e?Tt(t,i):At(t,i)},t.createElement=function(t,e){const i=t.createElement("div");return i.classList.add("lm_item"),e?i.classList.add("lm_column"):i.classList.add("lm_row"),i}}(Xt||(Xt={}));class Yt extends $t{constructor(t,e,i){super(t,vt.create(e),null,Yt.createElement(document)),this.isGround=!0,this._childElementContainer=this.element,this._containerElement=i;let n=null;for(;;){const t=n?n.previousSibling:this._containerElement.lastChild;if(!(t instanceof Element&&t.classList.contains("lm_content")))break;n=t}this._containerElement.insertBefore(this.element,n)}init(){if(!0!==this.isInitialised){this.updateNodeSize();for(let t=0;t0?this.contentItems[0]:this,n.isComponent)throw new Error("Cannot add item as child to ComponentItem");{const t=this.layoutManager.createAndInitContentItem(i,n);return e=n.addChild(t,e),n===this?-1:e}}loadComponentAsRoot(t){this.clearRoot();const e=Ct.resolve(t,!1);if(e.maximised)throw new Error("Root Component cannot be maximised");{const t=new jt(this.layoutManager,e,this);t.init(),this.addChild(t,0)}}addChild(t,e){if(this.contentItems.length>0)throw new Error("Ground node can only have a single child");return this._childElementContainer.appendChild(t.element),e=super.addChild(t,e),this.updateSize(!1),this.emitBaseBubblingEvent("stateChanged"),e}calculateConfigContent(){const t=this.contentItems,e=t.length,i=new Array(e);for(let n=0;n0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e)),this.updateContentItemsSize(!1))}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}createSideAreas(){const t=Yt.Area.oppositeSides,e=new Array(Object.keys(t).length);let i=0;for(const n in t){const o=n,s=this.getElementArea();if(null===s)throw new K("RCSA77553");s.side=o,"2"===t[o][1]?s[o]=s[t[o]]-50:s[o]=s[t[o]]+50,s.surface=(s.x2-s.x1)*(s.y2-s.y1),e[i++]=s}return e}highlightDropZone(t,e,i){this.layoutManager.tabDropPlaceholder.remove(),super.highlightDropZone(t,e,i)}onDrop(t,e){if(t.isComponent){const e=ut.createDefault(),i=t;e.header=mt.Header.createCopy(i.headerConfig);const n=this.layoutManager.createAndInitContentItem(e,this);n.addChild(t),t=n}if(0===this.contentItems.length)this.addChild(t);else{if(t.type===at.row||t.type===at.column){const e=ut.createDefault(),i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}const i="x"==e.side[0]?at.row:at.column,n="2"==e.side[1],o=this.contentItems[0];if(o instanceof Xt&&o.type===i){const e=o.contentItems[n?0:o.contentItems.length-1];o.addChild(t,n?0:void 0,!0),e.size*=.5,t.size=e.size,t.sizeUnit=ht.Percent,o.updateSize(!1)}else{const e=ct.createDefault(i),s=this.layoutManager.createContentItem(e,this);this.replaceChild(o,s),s.addChild(t,n?0:void 0,!0),s.addChild(o,n?void 0:0,!0),o.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}}dock(){throw new X("GID87731")}validateDocking(){throw new X("GIVD87732")}getAllContentItems(){const t=[this];return this.deepGetAllContentItems(this.contentItems,t),t}getConfigMaximisedItems(){const t=[];return this.deepFilterContentItems(this.contentItems,t,(t=>!(!Gt.isStack(t)||!t.initialWantMaximise)||!(!Gt.isComponentItem(t)||!t.initialWantMaximise))),t}getItemsByPopInParentId(t){const e=[];return this.deepFilterContentItems(this.contentItems,e,(e=>e.popInParentIds.includes(t))),e}toConfig(){throw new Error("Cannot generate GroundItem config")}setActiveComponentItem(t,e,i){}updateNodeSize(){const{width:t,height:e}=kt(this._containerElement);Tt(this.element,t),At(this.element,e),this.contentItems.length>0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e))}deepGetAllContentItems(t,e){for(let i=0;ithis.onClick(t),this._touchStartEventListener=t=>this.onTouchStart(t),this._element=document.createElement("div"),this._element.classList.add(i),this._element.title=e,this._header.on("destroy",(()=>this.destroy())),this._element.addEventListener("click",this._clickEventListener,{passive:!0}),this._element.addEventListener("touchstart",this._touchStartEventListener,{passive:!0}),this._header.controlsContainerElement.appendChild(this._element)}get element(){return this._element}destroy(){var t;this._element.removeEventListener("click",this._clickEventListener),this._element.removeEventListener("touchstart",this._touchStartEventListener),null===(t=this._element.parentNode)||void 0===t||t.removeChild(this._element)}onClick(t){this._pushEvent(t)}onTouchStart(t){this._pushEvent(t)}}class Jt{constructor(t,e,i,n,o){var s;this._layoutManager=t,this._componentItem=e,this._closeEvent=i,this._focusEvent=n,this._dragStartEvent=o,this._isActive=!1,this._tabClickListener=t=>this.onTabClickDown(t),this._tabTouchStartListener=t=>this.onTabTouchStart(t),this._closeClickListener=()=>this.onCloseClick(),this._closeTouchStartListener=()=>this.onCloseTouchStart(),this._dragStartListener=(t,e)=>this.onDragStart(t,e),this._contentItemDestroyListener=()=>this.onContentItemDestroy(),this._tabTitleChangedListener=t=>this.setTitle(t),this._element=document.createElement("div"),this._element.classList.add("lm_tab"),this._titleElement=document.createElement("span"),this._titleElement.classList.add("lm_title"),this._closeElement=document.createElement("div"),this._closeElement.classList.add("lm_close_tab"),this._element.appendChild(this._titleElement),this._element.appendChild(this._closeElement),e.isClosable?this._closeElement.style.display="":this._closeElement.style.display="none",this.setTitle(e.title),this._componentItem.on("titleChanged",this._tabTitleChangedListener);(null!==(s=e.reorderEnabled)&&void 0!==s?s:this._layoutManager.layoutConfig.settings.reorderEnabled)&&this.enableReorder(),this._element.addEventListener("click",this._tabClickListener,{passive:!0}),this._element.addEventListener("touchstart",this._tabTouchStartListener,{passive:!0}),this._componentItem.isClosable?(this._closeElement.addEventListener("click",this._closeClickListener,{passive:!0}),this._closeElement.addEventListener("touchstart",this._closeTouchStartListener,{passive:!0})):(this._closeElement.remove(),this._closeElement=void 0),this._componentItem.setTab(this),this._layoutManager.emit("tabCreated",this)}get isActive(){return this._isActive}get componentItem(){return this._componentItem}get contentItem(){return this._componentItem}get element(){return this._element}get titleElement(){return this._titleElement}get closeElement(){return this._closeElement}get reorderEnabled(){return void 0!==this._dragListener}set reorderEnabled(t){t!==this.reorderEnabled&&(t?this.enableReorder():this.disableReorder())}setTitle(t){this._titleElement.innerText=t,this._element.title=t}setActive(t){t!==this._isActive&&(this._isActive=t,t?this._element.classList.add("lm_active"):this._element.classList.remove("lm_active"))}destroy(){var t,e;this._closeEvent=void 0,this._focusEvent=void 0,this._dragStartEvent=void 0,this._element.removeEventListener("click",this._tabClickListener),this._element.removeEventListener("touchstart",this._tabTouchStartListener),null===(t=this._closeElement)||void 0===t||t.removeEventListener("click",this._closeClickListener),null===(e=this._closeElement)||void 0===e||e.removeEventListener("touchstart",this._closeTouchStartListener),this._componentItem.off("titleChanged",this._tabTitleChangedListener),this.reorderEnabled&&this.disableReorder(),this._element.remove()}setBlurred(){this._element.classList.remove("lm_focused"),this._titleElement.classList.remove("lm_focused")}setFocused(){this._element.classList.add("lm_focused"),this._titleElement.classList.add("lm_focused")}onDragStart(t,e){if(void 0===this._dragListener)throw new J("TODSDLU10093");if(void 0===this._dragStartEvent)throw new J("TODS23309");this._dragStartEvent(t,e,this._dragListener,this.componentItem)}onContentItemDestroy(){void 0!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=void 0)}onTabClickDown(t){const e=t.target;e!==this._element&&e!==this._titleElement||(0===t.button?this.notifyFocus():1===t.button&&this._componentItem.isClosable&&this.notifyClose())}onTabTouchStart(t){t.target===this._element&&this.notifyFocus()}onCloseClick(){this.notifyClose()}onCloseTouchStart(){this.notifyClose()}notifyClose(){if(void 0===this._closeEvent)throw new J("TNC15007");this._closeEvent(this._componentItem)}notifyFocus(){if(void 0===this._focusEvent)throw new J("TNA15007");this._focusEvent(this._componentItem)}enableReorder(){this._dragListener=new Zt(this._element,[this._titleElement]),this._dragListener.on("dragStart",this._dragStartListener),this._componentItem.on("destroy",this._contentItemDestroyListener)}disableReorder(){if(void 0===this._dragListener)throw new J("TDR87745");this._componentItem.off("destroy",this._contentItemDestroyListener),this._dragListener.off("dragStart",this._dragStartListener),this._dragListener=void 0}}class Qt{constructor(t,e,i,n,o){this._layoutManager=t,this._componentRemoveEvent=e,this._componentFocusEvent=i,this._componentDragStartEvent=n,this._dropdownActiveChangedEvent=o,this._tabs=[],this._lastVisibleTabIndex=-1,this._dropdownActive=!1,this._element=document.createElement("section"),this._element.classList.add("lm_tabs"),this._dropdownElement=document.createElement("section"),this._dropdownElement.classList.add("lm_tabdropdown_list"),this._dropdownElement.style.display="none"}get tabs(){return this._tabs}get tabCount(){return this._tabs.length}get lastVisibleTabIndex(){return this._lastVisibleTabIndex}get element(){return this._element}get dropdownElement(){return this._dropdownElement}get dropdownActive(){return this._dropdownActive}destroy(){for(let t=0;tthis.handleTabCloseEvent(t)),(t=>this.handleTabFocusEvent(t)),((t,e,i,n)=>this.handleTabDragStartEvent(t,e,i,n)));void 0===e&&(e=this._tabs.length),this._tabs.splice(e,0,i),ethis._lastVisibleTabIndex){const t=this._tabs[e];for(let t=e;t>0;t--)this._tabs[t]=this._tabs[t-1];this._tabs[0]=t}}updateTabSizes(t,e){let i=!1;this.tryUpdateTabSizes(i,t,e)||(i=!0,this.tryUpdateTabSizes(i,t,e)),i!==this._dropdownActive&&(this._dropdownActive=i,this._dropdownActiveChangedEvent())}tryUpdateTabSizes(t,e,i){if(this._tabs.length>0){if(void 0===i)throw new Error("non-empty tabs must have active component item");let n=0,o=!1;const s=this._layoutManager.layoutConfig.settings.tabOverlapAllowance,r=this._tabs.indexOf(i.tab),a=this._tabs[r];this._lastVisibleTabIndex=-1;for(let i=0;ie){if(o)i===r&&(l.style.zIndex="auto",l.style.marginLeft="",l.parentElement!==this._element&&this._element.appendChild(l));else{let t;if(t=r>0&&r<=i?(d-e)/(i-1):(d-e)/i,tthis.onClick(t),this._touchStartListener=t=>this.onTouchStart(t),this._rowColumnClosable=!0,this._closeButton=null,this._popoutButton=null,this._tabsContainer=new Qt(this._layoutManager,(t=>this.handleTabInitiatedComponentRemoveEvent(t)),(t=>this.handleTabInitiatedComponentFocusEvent(t)),((t,e,i,n)=>this.handleTabInitiatedDragStartEvent(t,e,i,n)),(()=>this.processTabDropdownActiveChanged())),this._show=i.show,this._popoutEnabled=i.popoutEnabled,this._popoutLabel=i.popoutLabel,this._maximiseEnabled=i.maximiseEnabled,this._maximiseLabel=i.maximiseLabel,this._minimiseEnabled=i.minimiseEnabled,this._minimiseLabel=i.minimiseLabel,this._closeEnabled=i.closeEnabled,this._closeLabel=i.closeLabel,this._tabDropdownEnabled=i.tabDropdownEnabled,this._tabDropdownLabel=i.tabDropdownLabel,this.setSide(i.side),this._canRemoveComponent=this._configClosable,this._element=document.createElement("section"),this._element.classList.add("lm_header"),this._controlsContainerElement=document.createElement("section"),this._controlsContainerElement.classList.add("lm_controls"),this._element.appendChild(this._tabsContainer.element),this._element.appendChild(this._controlsContainerElement),this._element.appendChild(this._tabsContainer.dropdownElement),this._element.addEventListener("click",this._clickListener,{passive:!0}),this._element.addEventListener("touchstart",this._touchStartListener,{passive:!0}),this._documentMouseUpListener=()=>this._tabsContainer.hideAdditionalTabsDropdown(),globalThis.document.addEventListener("mouseup",this._documentMouseUpListener,{passive:!0}),this._tabControlOffset=this._layoutManager.layoutConfig.settings.tabControlOffset,this._tabDropdownEnabled&&(this._tabDropdownButton=new Kt(this,this._tabDropdownLabel,"lm_tabdropdown",(()=>this._tabsContainer.showAdditionalTabsDropdown()))),this._popoutEnabled&&(this._popoutButton=new Kt(this,this._popoutLabel,"lm_popout",(()=>this.handleButtonPopoutEvent()))),this._maximiseEnabled&&(this._maximiseButton=new Kt(this,this._maximiseLabel,"lm_maximise",(t=>this.handleButtonMaximiseToggleEvent(t)))),this._configClosable&&(this._closeButton=new Kt(this,this._closeLabel,"lm_close",(()=>s()))),this.processTabDropdownActiveChanged()}get show(){return this._show}get side(){return this._side}get leftRightSided(){return this._leftRightSided}get layoutManager(){return this._layoutManager}get parent(){return this._parent}get tabs(){return this._tabsContainer.tabs}get lastVisibleTabIndex(){return this._tabsContainer.lastVisibleTabIndex}get element(){return this._element}get tabsContainerElement(){return this._tabsContainer.element}get controlsContainerElement(){return this._controlsContainerElement}destroy(){this.emit("destroy"),this._popoutEvent=void 0,this._maximiseToggleEvent=void 0,this._clickEvent=void 0,this._touchStartEvent=void 0,this._componentRemoveEvent=void 0,this._componentFocusEvent=void 0,this._componentDragStartEvent=void 0,this._tabsContainer.destroy(),globalThis.document.removeEventListener("mouseup",this._documentMouseUpListener),this._element.remove()}createTab(t,e){this._tabsContainer.createTab(t,e)}removeTab(t){this._tabsContainer.removeTab(t)}processActiveComponentChanged(t){this._tabsContainer.processActiveComponentChanged(t),this.updateTabSizes()}setSide(t){this._side=t,this._leftRightSided=[nt.right,nt.left].includes(this._side)}setRowColumnClosable(t){this._rowColumnClosable=t,this.updateClosability()}updateClosability(){let t;if(this._configClosable)if(this._rowColumnClosable){t=!0;const e=this.tabs.length;for(let i=0;i1}applyFocusedValue(t){t?this._element.classList.add("lm_focused"):this._element.classList.remove("lm_focused")}processMaximised(){if(void 0===this._maximiseButton)throw new J("HPMAX16997");this._maximiseButton.element.setAttribute("title",this._minimiseLabel)}processMinimised(){if(void 0===this._maximiseButton)throw new J("HPMIN16997");this._maximiseButton.element.setAttribute("title",this._maximiseLabel)}updateTabSizes(){if(this._tabsContainer.tabCount>0){const t=this._show?this._layoutManager.layoutConfig.dimensions.headerHeight:0;let e;this._leftRightSided?(this._element.style.height="",this._element.style.width=zt(t)):(this._element.style.width="",this._element.style.height=zt(t)),e=this._leftRightSided?this._element.offsetHeight-this._controlsContainerElement.offsetHeight-this._tabControlOffset:this._element.offsetWidth-this._controlsContainerElement.offsetWidth-this._tabControlOffset,this._tabsContainer.updateTabSizes(e,this._getActiveComponentItemEvent())}}handleTabInitiatedComponentRemoveEvent(t){if(this._canRemoveComponent){if(void 0===this._componentRemoveEvent)throw new J("HHTCE22294");this._componentRemoveEvent(t)}}handleTabInitiatedComponentFocusEvent(t){if(void 0===this._componentFocusEvent)throw new J("HHTAE22294");this._componentFocusEvent(t)}handleTabInitiatedDragStartEvent(t,e,i,n){if(this._canRemoveComponent){if(void 0===this._componentDragStartEvent)throw new J("HHTDSE22294");this._componentDragStartEvent(t,e,i,n)}else i.cancelDrag()}processTabDropdownActiveChanged(){void 0!==this._tabDropdownButton&&Dt(this._tabDropdownButton.element,this._tabsContainer.dropdownActive)}handleButtonPopoutEvent(){if(this._layoutManager.layoutConfig.settings.popoutWholeStack){if(void 0===this._popoutEvent)throw new J("HHBPOE17834");this._popoutEvent()}else{const t=this._getActiveComponentItemEvent();t&&t.popout()}}handleButtonMaximiseToggleEvent(t){if(void 0===this._maximiseToggleEvent)throw new J("HHBMTE16834");this._maximiseToggleEvent()}onClick(t){t.target===this._element&&this.notifyClick(t)}onTouchStart(t){t.target===this._element&&this.notifyTouchStart(t)}notifyClick(t){if(void 0===this._clickEvent)throw new J("HNHC46834");this._clickEvent(t)}notifyTouchStart(t){if(void 0===this._touchStartEvent)throw new J("HNHTS46834");this._touchStartEvent(t)}}class ee extends $t{constructor(t,e,i){var n,o,s,r,a,l,h,d,c,m,u,p,g,f,v,_,y,C,w;super(t,e,i,ee.createElement(document)),this._headerSideChanged=!1,this._resizeListener=()=>this.handleResize(),this._maximisedListener=()=>this.handleMaximised(),this._minimisedListener=()=>this.handleMinimised(),this._headerConfig=e.header;const I=t.layoutConfig.header,b=e.content;let S;if(1!==b.length)S=void 0;else{S=b[0].header}this._initialWantMaximise=e.maximised,this._initialActiveItemIndex=null!==(n=e.activeItemIndex)&&void 0!==n?n:0;const E=null!==(r=null!==(s=null===(o=this._headerConfig)||void 0===o?void 0:o.show)&&void 0!==s?s:null==S?void 0:S.show)&&void 0!==r?r:I.show,x=null!==(h=null!==(l=null===(a=this._headerConfig)||void 0===a?void 0:a.popout)&&void 0!==l?l:null==S?void 0:S.popout)&&void 0!==h?h:I.popout,L=null!==(m=null!==(c=null===(d=this._headerConfig)||void 0===d?void 0:d.maximise)&&void 0!==c?c:null==S?void 0:S.maximise)&&void 0!==m?m:I.maximise,z=null!==(g=null!==(p=null===(u=this._headerConfig)||void 0===u?void 0:u.close)&&void 0!==p?p:null==S?void 0:S.close)&&void 0!==g?g:I.close,M=null!==(_=null!==(v=null===(f=this._headerConfig)||void 0===f?void 0:f.minimise)&&void 0!==v?v:null==S?void 0:S.minimise)&&void 0!==_?_:I.minimise,P=null!==(w=null!==(C=null===(y=this._headerConfig)||void 0===y?void 0:y.tabDropdown)&&void 0!==C?C:null==S?void 0:S.tabDropdown)&&void 0!==w?w:I.tabDropdown;this._maximisedEnabled=!1!==L;const T={show:!1!==E,side:!1===E?nt.top:E,popoutEnabled:!1!==x,popoutLabel:!1===x?"":x,maximiseEnabled:this._maximisedEnabled,maximiseLabel:!1===L?"":L,closeEnabled:!1!==z,closeLabel:!1===z?"":z,minimiseEnabled:!0,minimiseLabel:M,tabDropdownEnabled:!1!==P,tabDropdownLabel:!1===P?"":P};this._header=new te(t,this,T,e.isClosable&&!1!==z,(()=>this.getActiveComponentItem()),(()=>this.remove()),(()=>this.handlePopoutEvent()),(()=>this.toggleMaximise()),(t=>this.handleHeaderClickEvent(t)),(t=>this.handleHeaderTouchStartEvent(t)),(t=>this.handleHeaderComponentRemoveEvent(t)),(t=>this.handleHeaderComponentFocusEvent(t)),((t,e,i,n)=>this.handleHeaderComponentStartDragEvent(t,e,i,n))),this.isStack=!0,this._childElementContainer=document.createElement("section"),this._childElementContainer.classList.add("lm_items"),this.on("resize",this._resizeListener),this._maximisedEnabled&&(this.on("maximised",this._maximisedListener),this.on("minimised",this._minimisedListener)),this.element.appendChild(this._header.element),this.element.appendChild(this._childElementContainer),this.setupHeaderPosition(),this._header.updateClosability()}get childElementContainer(){return this._childElementContainer}get header(){return this._header}get headerShow(){return this._header.show}get headerSide(){return this._header.side}get headerLeftRightSided(){return this._header.leftRightSided}get contentAreaDimensions(){return this._contentAreaDimensions}get initialWantMaximise(){return this._initialWantMaximise}get isMaximised(){return this===this.layoutManager.maximisedStack}get stackParent(){if(!this.parent)throw new Error("Stack should always have a parent");return this.parent}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}init(){if(!0===this.isInitialised)return;this.updateNodeSize();for(let t=0;t0){if(this._initialActiveItemIndex<0||this._initialActiveItemIndex>=e)throw new Error(`ActiveItemIndex out of range: ${this._initialActiveItemIndex} id: ${this.id}`);for(let i=0;ithis.contentItems.length)throw e-=1,new X("SAC99728");if(t instanceof jt)return e=super.addChild(t,e),this._childElementContainer.appendChild(t.element),this._header.createTab(t,e),this.setActiveComponentItem(t,i),this._header.updateTabSizes(),this.updateSize(!1),t.container.setBaseLogicalZIndex(),this._header.updateClosability(),this.emitStateChangedEvent(),e;throw new X("SACC88532")}removeChild(t,e){const i=t,n=this.contentItems.indexOf(i),o=1===this.contentItems.length;if(this._activeComponentItem===i&&(i.focused&&i.blur(),!o)){const t=0===n?1:n-1;this.setActiveComponentItem(this.contentItems[t],!1)}this._header.removeTab(i),super.removeChild(i,e),o||this._header.updateClosability(),this.emitStateChangedEvent()}toggleMaximise(){this.isMaximised?this.minimise():this.maximise()}maximise(){if(!this.isMaximised){this.layoutManager.setMaximisedStack(this);const t=this.contentItems,e=t.length;for(let i=0;i0&&void 0===t)throw new Error("expected non-empty stack to have an active component item");return{type:"stack",content:this.calculateConfigContent(),size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,isClosable:this.isClosable,maximised:this.isMaximised,header:this.createHeaderConfig(),activeItemIndex:t}}onDrop(t,e){if("header"===this._dropSegment){if(this.resetHeaderDropZone(),void 0===this._dropIndex)throw new J("SODDI68990");return void this.addChild(t,this._dropIndex)}if("body"===this._dropSegment)return void this.addChild(t,0,!0);const i="top"===this._dropSegment||"bottom"===this._dropSegment,n="left"===this._dropSegment||"right"===this._dropSegment,o="top"===this._dropSegment||"left"===this._dropSegment,s=i&&this.stackParent.isColumn||n&&this.stackParent.isRow;if(t.isComponent){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createAndInitContentItem(e,this);i.addChild(t),t=i}if(t.type===at.row||t.type===at.column){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}if(s){const e=this.stackParent.contentItems.indexOf(this);this.stackParent.addChild(t,o?e:e+1,!0),this.size*=.5,t.size=this.size,t.sizeUnit=this.sizeUnit,this.stackParent.updateSize(!1)}else{const e=i?at.column:at.row,n=ct.createDefault(e),s=this.layoutManager.createContentItem(n,this);this.stackParent.replaceChild(this,s),s.addChild(t,o?0:void 0,!0),s.addChild(this,o?void 0:0,!0),this.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}highlightDropZone(t,e){for(const i in this._contentAreaDimensions){const n=i,o=this._contentAreaDimensions[n].hoverArea;if(o.x1t&&o.y1e)return void("header"===n?(this._dropSegment="header",this.highlightHeaderDropZone(this._header.leftRightSided?e:t)):(this.resetHeaderDropZone(),this.highlightBodyDropZone(n)))}}getArea(){if("none"===this.element.style.display)return null;const t=super.getElementArea(this._header.element),e=super.getElementArea(this._childElementContainer);if(null===t||null===e)throw new K("SGAHC13086");const i=e.x2-e.x1,n=e.y2-e.y1;return this._contentAreaDimensions={header:{hoverArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2},highlightArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2}}},0===this.contentItems.length?(this._contentAreaDimensions.body={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2}},super.getElementArea(this.element)):(this._contentAreaDimensions.left={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x1+.25*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x1+.5*i,y2:e.y2}},this._contentAreaDimensions.top={hoverArea:{x1:e.x1+.25*i,y1:e.y1,x2:e.x1+.75*i,y2:e.y1+.5*n},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y1+.5*n}},this._contentAreaDimensions.right={hoverArea:{x1:e.x1+.75*i,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1+.5*i,y1:e.y1,x2:e.x2,y2:e.y2}},this._contentAreaDimensions.bottom={hoverArea:{x1:e.x1+.25*i,y1:e.y1+.5*n,x2:e.x1+.75*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1+.5*n,x2:e.x2,y2:e.y2}},super.getElementArea(this.element))}positionHeader(t){this._header.side!==t&&(this._header.setSide(t),this._headerSideChanged=!0,this.setupHeaderPosition())}updateNodeSize(){if("none"!==this.element.style.display){const t=kt(this.element);if(this._header.show){t[this._header.leftRightSided?it.width:it.height]-=this.layoutManager.layoutConfig.dimensions.headerHeight}this._childElementContainer.style.width=zt(t.width),this._childElementContainer.style.height=zt(t.height);for(let e=0;e=o&&tthis.onDrag(t,e,i))),this._dragListener.on("dragStop",(()=>this.onDrop())),this.createDragProxyElements(t,e),null===this._componentItem.parent)throw new K("DPC10097");this._componentItemFocused=this._componentItem.focused,this._componentItemFocused&&this._componentItem.blur(),this._componentItem.parent.removeChild(this._componentItem,!0),this.setDimensions(),document.body.appendChild(this._element),this.determineMinMaxXY(),this._layoutManager.calculateItemAreas(),this.setDropPosition(t,e)}get element(){return this._element}createDragProxyElements(t,e){this._element=document.createElement("div"),this._element.classList.add("lm_dragProxy");const i=document.createElement("div");i.classList.add("lm_header");const n=document.createElement("div");n.classList.add("lm_tabs");const o=document.createElement("div");o.classList.add("lm_tab");const s=document.createElement("span");s.classList.add("lm_title"),o.appendChild(s),n.appendChild(o),i.appendChild(n),this._proxyContainerElement=document.createElement("div"),this._proxyContainerElement.classList.add("lm_content"),this._element.appendChild(i),this._element.appendChild(this._proxyContainerElement),this._originalParent instanceof ee&&this._originalParent.headerShow&&(this._sided=this._originalParent.headerLeftRightSided,this._element.classList.add("lm_"+this._originalParent.headerSide),[nt.right,nt.bottom].indexOf(this._originalParent.headerSide)>=0&&this._proxyContainerElement.insertAdjacentElement("afterend",i)),this._element.style.left=zt(t),this._element.style.top=zt(e),o.setAttribute("title",this._componentItem.title),s.insertAdjacentText("afterbegin",this._componentItem.title),this._proxyContainerElement.appendChild(this._componentItem.element)}determineMinMaxXY(){const t=this._layoutManager.groundItem;if(void 0===t)throw new J("DPDMMXY73109");{const e=t.element.getBoundingClientRect();this._minX=e.left+document.body.scrollLeft,this._minY=e.top+document.body.scrollTop,this._maxX=this._minX+e.width,this._maxY=this._minY+e.height}}onDrag(t,e,i){const n=i.pageX,o=i.pageY;this.setDropPosition(n,o),this._componentItem.drag()}setDropPosition(t,e){this._layoutManager.layoutConfig.settings.constrainDragToContainer&&(t<=this._minX?t=Math.ceil(this._minX):t>=this._maxX&&(t=Math.floor(this._maxX)),e<=this._minY?e=Math.ceil(this._minY):e>=this._maxY&&(e=Math.floor(this._maxY))),this._element.style.left=zt(t),this._element.style.top=zt(e),this._area=this._layoutManager.getArea(t,e),null!==this._area&&(this._lastValidArea=this._area,this._area.contentItem.highlightDropZone(t,e,this._area))}onDrop(){const t=this._layoutManager.dropTargetIndicator;if(null===t)throw new K("DPOD30011");let e;if(t.hide(),this._componentItem.exitDragMode(),null!==this._area)e=this._componentItem,this._area.contentItem.onDrop(e,this._area);else if(null!==this._lastValidArea){e=this._componentItem;this._lastValidArea.contentItem.onDrop(e,this._lastValidArea)}else this._originalParent?(e=this._componentItem,this._originalParent.addChild(e)):this._componentItem.destroy();this._element.remove(),this._layoutManager.emit("itemDropped",this._componentItem),this._componentItemFocused&&void 0!==e&&e.focus()}setDimensions(){const t=this._layoutManager.layoutConfig.dimensions;if(void 0===t)throw new Error("DragProxy.setDimensions: dimensions undefined");let e=t.dragProxyWidth,i=t.dragProxyHeight;if(void 0===e||void 0===i)throw new Error("DragProxy.setDimensions: width and/or height undefined");const n=!1===this._layoutManager.layoutConfig.header.show?0:t.headerHeight;this._element.style.width=zt(e),this._element.style.height=zt(i),e-=this._sided?n:0,i-=this._sided?0:n,this._proxyContainerElement.style.width=zt(e),this._proxyContainerElement.style.height=zt(i),this._componentItem.enterDragMode(e,i),this._componentItem.show()}}class ne{constructor(t,e,i,n,o,s,r){this._layoutManager=t,this._element=e,this._extraAllowableChildTargets=i,this._componentTypeOrFtn=n,this._componentState=o,this._title=s,this._id=r,this._dragListener=null,this._dummyGroundContainer=document.createElement("div");const a=gt.createDefault("row");this._dummyGroundContentItem=new Yt(this._layoutManager,a,this._dummyGroundContainer),this.createDragListener()}destroy(){this.removeDragListener()}createDragListener(){this.removeDragListener(),this._dragListener=new Zt(this._element,this._extraAllowableChildTargets),this._dragListener.on("dragStart",((t,e)=>this.onDragStart(t,e))),this._dragListener.on("dragStop",(()=>this.onDragStop()))}onDragStart(t,e){var i;const n="component";let o;if("function"==typeof this._componentTypeOrFtn){const t=this._componentTypeOrFtn();o=ne.isDragSourceComponentItemConfig(t)?{type:n,componentState:t.state,componentType:t.type,title:null!==(i=t.title)&&void 0!==i?i:this._title}:t}else o={type:n,componentState:this._componentState,componentType:this._componentTypeOrFtn,title:this._title,id:this._id};const s=bt.resolve(o,!1),r=new jt(this._layoutManager,s,this._dummyGroundContentItem);if(this._dummyGroundContentItem.contentItems.push(r),null===this._dragListener)throw new K("DSODSD66746");{const i=new ie(t,e,this._dragListener,this._layoutManager,r,this._dummyGroundContentItem),n=this._layoutManager.transitionIndicator;if(null===n)throw new K("DSODST66746");n.transitionElements(this._element,i.element)}}onDragStop(){this.createDragListener()}removeDragListener(){null!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=null)}}!function(t){t.isDragSourceComponentItemConfig=function(t){return!("componentType"in t)}}(ne||(ne={}));class oe{constructor(){this._element=document.createElement("div"),this._element.classList.add("lm_dropTargetIndicator");const t=document.createElement("div");t.classList.add("lm_inner"),this._element.appendChild(t),document.body.appendChild(this._element)}destroy(){this._element.remove()}highlightArea(t,e){this._element.style.left=zt(t.x1+e),this._element.style.top=zt(t.y1+e),this._element.style.width=zt(t.x2-t.x1-e),this._element.style.height=zt(t.y2-t.y1-e),this._element.style.display="block"}hide(){Dt(this._element,!1)}}class se{constructor(){this._element=document.createElement("div"),this._element.classList.add("lm_transition_indicator"),document.body.appendChild(this._element),this._toElement=null,this._fromDimensions=null,this._totalAnimationDuration=200,this._animationStartTime=null}destroy(){this._element.remove()}transitionElements(t,e){}nextAnimationFrame(){}measure(t){const e=t.getBoundingClientRect();return{left:e.left,top:e.top,width:t.offsetWidth,height:t.offsetHeight}}}class re extends Wt{constructor(t){super(),this._layoutManager=t,this._childEventListener=t=>this.onEventFromChild(t),globalThis.addEventListener(re.ChildEventName,this._childEventListener,{passive:!0})}emit(t,...e){"userBroadcast"===t?this.emitUserBroadcast(...e):super.emit(t,...e)}emitUserBroadcast(...t){this.handleUserBroadcastEvent("userBroadcast",t)}destroy(){globalThis.removeEventListener(re.ChildEventName,this._childEventListener)}handleUserBroadcastEvent(t,e){this._layoutManager.isSubWindow?this.propagateToParent(t,e):this.propagateToThisAndSubtree(t,e)}onEventFromChild(t){const e=t.detail;this.handleUserBroadcastEvent(e.eventName,e.args)}propagateToParent(t,e){const i={bubbles:!0,cancelable:!0,detail:{layoutManager:this._layoutManager,eventName:t,args:e}},n=new CustomEvent(re.ChildEventName,i),o=globalThis.opener;if(null===o)throw new K("EHPTP15778");o.dispatchEvent(n)}propagateToThisAndSubtree(t,e){this.emitUnknown(t,...e);for(let i=0;ithis.handleContainerResize())),this._windowBeforeUnloadListener=()=>this.onBeforeUnload(),this._windowBeforeUnloadListening=!1,this._maximisedStackBeforeDestroyedListener=t=>this.cleanupBeforeMaximisedStackDestroyed(t),this.isSubWindow=t.isSubWindow,this._constructorOrSubWindowLayoutConfig=t.constructorOrSubWindowLayoutConfig,Q.checkInitialise(),dt.checkInitialise(),void 0!==t.containerElement&&(this._containerElement=t.containerElement)}get container(){return this._containerElement}get isInitialised(){return this._isInitialised}get groundItem(){return this._groundItem}get root(){return this._groundItem}get openPopouts(){return this._openPopouts}get dropTargetIndicator(){return this._dropTargetIndicator}get transitionIndicator(){return this._transitionIndicator}get width(){return this._width}get height(){return this._height}get eventHub(){return this._eventHub}get rootItem(){if(void 0===this._groundItem)throw new Error("Cannot access rootItem before init");return 0===this._groundItem.contentItems.length?void 0:this._groundItem.contentItems[0]}get focusedComponentItem(){return this._focusedComponentItem}get tabDropPlaceholder(){return this._tabDropPlaceholder}get maximisedStack(){return this._maximisedStack}get deprecatedConstructor(){return!this.isSubWindow&&void 0!==this._constructorOrSubWindowLayoutConfig}destroy(){if(this._isInitialised){this._windowBeforeUnloadListening&&(globalThis.removeEventListener("beforeunload",this._windowBeforeUnloadListener),this._windowBeforeUnloadListening=!1),!0===this.layoutConfig.settings.closePopoutsOnUnload&&this.closeAllOpenPopouts(),this._resizeObserver.disconnect(),this.checkClearResizeTimeout(),void 0!==this._groundItem&&this._groundItem.destroy(),this._tabDropPlaceholder.remove(),null!==this._dropTargetIndicator&&this._dropTargetIndicator.destroy(),null!==this._transitionIndicator&&this._transitionIndicator.destroy(),this._eventHub.destroy();for(const t of this._dragSources)t.destroy();this._dragSources=[],this._isInitialised=!1}}minifyConfig(t){return _t.minifyConfig(t)}unminifyConfig(t){return _t.unminifyConfig(t)}init(){let t;if(this.setContainer(),this._dropTargetIndicator=new oe,this._transitionIndicator=new se,this.updateSizeFromContainer(),this.isSubWindow){if(void 0===this._constructorOrSubWindowLayoutConfig)throw new J("LMIU07155");{const e=this._constructorOrSubWindowLayoutConfig.root;if(void 0===e)throw new X("LMIC07156");if(!Ct.isComponent(e))throw new X("LMIC07157");t=e;const i=xt.resolve(this._constructorOrSubWindowLayoutConfig);this.layoutConfig=Object.assign(Object.assign({},i),{root:void 0})}}else void 0===this._constructorOrSubWindowLayoutConfig?this.layoutConfig=_t.createDefault():this.layoutConfig=xt.resolve(this._constructorOrSubWindowLayoutConfig);const e=this.layoutConfig;this._groundItem=new Yt(this,e.root,this._containerElement),this._groundItem.init(),this.checkLoadedLayoutMaximiseItem(),this._resizeObserver.observe(this._containerElement),this._isInitialised=!0,this.adjustColumnsResponsive(),this.emit("initialised"),void 0!==t&&this.loadComponentAsRoot(t)}loadLayout(t){if(!this.isInitialised)throw new Error("GoldenLayout: Need to call init() if LayoutConfig with defined root passed to constructor");if(void 0===this._groundItem)throw new J("LMLL11119");this.createSubWindows(),this.layoutConfig=xt.resolve(t),this._groundItem.loadRoot(this.layoutConfig.root),this.checkLoadedLayoutMaximiseItem(),this.adjustColumnsResponsive()}saveLayout(){if(!1===this._isInitialised)throw new Error("Can't create config, layout not yet initialised");if(void 0===this._groundItem)throw new J("LMTC18244");{const t=this._groundItem.calculateConfigContent();let e;e=1!==t.length?void 0:t[0],this.reconcilePopoutWindows();const i=[];for(let t=0;t=0?n=this._groundItem.contentItems[0]:e=0;break;case at.row:case at.column:e=n.addItem(t,i.index);break;case at.stack:if(Ct.isComponent(t)){e=n.addItem(t,i.index);break}throw Error(tt[6]);case at.component:throw new X("LMAIALC87444602");default:throw new Y("LMAIALU98881733",n.type)}if(Ct.isComponent(t)){const t=n.contentItems[e];Gt.isStack(t)&&(n=t,e=0)}return i.parentItem=n,i.index=e,i}}}loadComponentAsRoot(t){if(void 0===this._groundItem)throw new Error("Cannot add item before init");this._groundItem.loadComponentAsRoot(t)}updateSize(t,e){this.setSize(t,e)}setSize(t,e){if(this._width=t,this._height=e,!0===this._isInitialised){if(void 0===this._groundItem)throw new J("LMUS18881");if(this._groundItem.setSize(this._width,this._height),this._maximisedStack){const{width:t,height:e}=kt(this._containerElement);Tt(this._maximisedStack.element,t),At(this._maximisedStack.element,e),this._maximisedStack.updateSize(!1)}this.adjustColumnsResponsive()}}beginSizeInvalidation(){this._sizeInvalidationBeginCount++}endSizeInvalidation(){0==--this._sizeInvalidationBeginCount&&this.updateSizeFromContainer()}updateSizeFromContainer(){const{width:t,height:e}=kt(this._containerElement);this.setSize(t,e)}updateRootSize(t=!1){if(void 0===this._groundItem)throw new J("LMURS28881");this._groundItem.updateSize(t)}createAndInitContentItem(t,e){const i=this.createContentItem(t,e);return i.init(),i}createContentItem(t,e){if("string"!=typeof t.type)throw new G("Missing parameter 'type'",JSON.stringify(t));if(ct.isComponentItem(t)&&!(e instanceof ee)&&e&&!(!0===this.isSubWindow&&e instanceof Yt)){t={type:at.stack,content:[t],size:t.size,sizeUnit:t.sizeUnit,minSize:t.minSize,minSizeUnit:t.minSizeUnit,id:t.id,maximised:t.maximised,isClosable:t.isClosable,activeItemIndex:0,header:void 0}}return this.createContentItemFromConfig(t,e)}findFirstComponentItemById(t){if(void 0===this._groundItem)throw new J("LMFFCIBI82446");return this.findFirstContentItemTypeByIdRecursive(at.component,t,this._groundItem)}createPopout(t,e,i,n){return t instanceof Gt?this.createPopoutFromContentItem(t,e,i,n):this.createPopoutFromItemConfig(t,e,i,n)}createPopoutFromContentItem(t,e,i,n){let o=t.parent,s=t;for(;null!==o&&1===o.contentItems.length&&!o.isGround;)s=o,o=o.parent;if(null===o)throw new K("LMCPFCI00834");{if(void 0===n&&(n=o.contentItems.indexOf(s)),null!==i&&o.addPopInParentId(i),void 0===e){const i=globalThis.screenX||globalThis.screenLeft,n=globalThis.screenY||globalThis.screenTop,o=t.element.offsetLeft,s=t.element.offsetTop,{width:r,height:a}=kt(t.element);e={left:i+o,top:n+s,width:r,height:a}}const r=t.toConfig();if(t.remove(),ft.isRootItemConfig(r))return this.createPopoutFromItemConfig(r,e,i,n);throw new Error(`${tt[0]}`)}}beginVirtualSizedContainerAdding(){0==++this._virtualSizedContainerAddingBeginCount&&(this._virtualSizedContainers.length=0)}addVirtualSizedContainer(t){this._virtualSizedContainers.push(t)}endVirtualSizedContainerAdding(){if(0==--this._virtualSizedContainerAddingBeginCount){const t=this._virtualSizedContainers.length;if(t>0){this.fireBeforeVirtualRectingEvent(t);for(let e=0;ethis.emit("windowOpened",a))),a.on("closed",(()=>this.reconcilePopoutWindows())),this._openPopouts.push(a),this.layoutConfig.settings.closePopoutsOnUnload&&!this._windowBeforeUnloadListening&&(globalThis.addEventListener("beforeunload",this._windowBeforeUnloadListener,{passive:!0}),this._windowBeforeUnloadListening=!0),a}closeAllOpenPopouts(){for(let t=0;tglobalThis.close()),1)}getArea(t,e){let i=null,n=1/0;for(let o=0;o=s.x1&&t=s.y1&&es.surface&&(n=s.surface,i=s)}return i}calculateItemAreas(){const t=this.getAllContentItems(),e=this._groundItem;if(void 0===e)throw new J("LMCIAR44365");if(1!==t.length){e.contentItems[0].isStack?this._itemAreas=[]:this._itemAreas=e.createSideAreas();for(let e=0;e0){let e=t[0];if(Gt.isComponentItem(e)){const t=e.parent;if(null===t)throw new K("LMXLLMI69999");e=t}if(!Gt.isStack(e))throw new X("LMCLLMI19993");e.maximise()}}}processMaximiseStack(t){if(this._maximisedStack=t,t.on("beforeItemDestroyed",this._maximisedStackBeforeDestroyedListener),t.element.classList.add("lm_maximised"),t.element.insertAdjacentElement("afterend",this._maximisePlaceholder),void 0===this._groundItem)throw new J("LMMXI19993");{this._groundItem.element.prepend(t.element);const{width:e,height:i}=kt(this._containerElement);Tt(t.element,e),At(t.element,i),t.updateSize(!0),t.focusActiveContentItem(),this._maximisedStack.emit("maximised"),this.emit("stateChanged")}}processMinimiseMaximisedStack(){if(void 0===this._maximisedStack)throw new X("LMMMS74422");{const t=this._maximisedStack;if(null===t.parent)throw new K("LMMI13668");t.element.classList.remove("lm_maximised"),this._maximisePlaceholder.insertAdjacentElement("afterend",t.element),this._maximisePlaceholder.remove(),this.updateRootSize(!0),this._maximisedStack=void 0,t.off("beforeItemDestroyed",this._maximisedStackBeforeDestroyedListener),t.emit("minimised"),this.emit("stateChanged")}}reconcilePopoutWindows(){const t=[];for(let e=0;e{this._resizeTimeoutId=void 0,this.beginSizeInvalidation(),this.endSizeInvalidation()}),this.resizeDebounceInterval))}checkClearResizeTimeout(){void 0!==this._resizeTimeoutId&&(clearTimeout(this._resizeTimeoutId),this._resizeTimeoutId=void 0)}setContainer(){var t;const e=document.body,i=null!==(t=this._containerElement)&&void 0!==t?t:e;if(i===e){this.resizeWithContainerAutomatically=!0;const t=document.documentElement;t.style.height="100%",t.style.margin="0",t.style.padding="0",t.style.overflow="clip",e.style.height="100%",e.style.margin="0",e.style.padding="0",e.style.overflow="clip"}this._containerElement=i}onBeforeUnload(){this.destroy()}adjustColumnsResponsive(){if(void 0===this._groundItem)throw new J("LMACR20883");if(this._firstLoad=!1,this.useResponsiveLayout()&&!this._updatingColumnsResponsive&&this._groundItem.contentItems.length>0&&this._groundItem.contentItems[0].isRow){if(void 0===this._groundItem||null===this._width)throw new J("LMACR77412");{const t=this._groundItem.contentItems[0].contentItems.length;if(t<=1)return;{const e=this.layoutConfig.dimensions.defaultMinItemWidth;if(t*e<=this._width)return;{this._updatingColumnsResponsive=!0;const i=t-Math.max(Math.floor(this._width/e),1),n=this._groundItem.contentItems[0],o=this.getAllStacks();if(0===o.length)throw new X("LMACRS77413");{const t=o[0];for(let e=0;en?void 0:{parentItem:t,index:o}}}case 1:if(void 0===this._focusedComponentItem)return;{const t=this._focusedComponentItem.parentItem;return this.tryCreateLocationFromParentItem(t,e)}case 2:{const t=this.findFirstContentItemType(at.stack);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 3:{let t=this.findFirstContentItemType(at.row);return void 0!==t?this.tryCreateLocationFromParentItem(t,e):(t=this.findFirstContentItemType(at.column),void 0!==t?this.tryCreateLocationFromParentItem(t,e):void 0)}case 4:{const t=this.findFirstContentItemType(at.row);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 5:{const t=this.findFirstContentItemType(at.column);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 6:if(void 0===this._groundItem)throw new J("LMFLRIF18244");return void 0!==this.rootItem?void 0:void 0===e||0===e?{parentItem:this._groundItem,index:0}:void 0;case 7:if(void 0===this._groundItem)throw new J("LMFLF18244");{const t=this._groundItem.contentItems;if(0===t.length)return void 0===e||0===e?{parentItem:this._groundItem,index:0}:void 0;{const i=t[0];return this.tryCreateLocationFromParentItem(i,e)}}}}tryCreateLocationFromParentItem(t,e){const i=t.contentItems.length;return void 0===e?{parentItem:t,index:i}:e<0||e>i?void 0:{parentItem:t,index:e}}}!function(t){t.createMaximisePlaceElement=function(t){const e=t.createElement("div");return e.classList.add("lm_maximise_place"),e},t.createTabDropPlaceholderElement=function(t){const e=t.createElement("div");return e.classList.add("lm_drop_tab_placeholder"),e},t.defaultLocationSelectors=[{typeId:1,index:void 0},{typeId:2,index:void 0},{typeId:3,index:void 0},{typeId:7,index:void 0}],t.afterFocusedItemIfPossibleLocationSelectors=[{typeId:0,index:1},{typeId:2,index:void 0},{typeId:3,index:void 0},{typeId:7,index:void 0}]}(ae||(ae={}));class le extends ae{constructor(t,e,i,n){if(super(le.createLayoutManagerConstructorParameters(t,e)),this._bindComponentEventHanlderPassedInConstructor=!1,this._creationTimeoutPassed=!1,void 0!==e&&"function"==typeof e&&(this.bindComponentEvent=e,this._bindComponentEventHanlderPassedInConstructor=!0,void 0!==i&&(this.unbindComponentEvent=i)),!this._bindComponentEventHanlderPassedInConstructor&&this.isSubWindow){if(void 0===this._constructorOrSubWindowLayoutConfig)throw new J("VLC98823");{const t=xt.resolve(this._constructorOrSubWindowLayoutConfig);this.layoutConfig=Object.assign(Object.assign({},t),{root:void 0})}}!0!==n&&(this.deprecatedConstructor||this.init())}destroy(){this.bindComponentEvent=void 0,this.unbindComponentEvent=void 0,super.destroy()}init(){if(this._bindComponentEventHanlderPassedInConstructor||"loading"!==document.readyState&&null!==document.body){if(!this._bindComponentEventHanlderPassedInConstructor&&!0===this.isSubWindow&&!this._creationTimeoutPassed)return setTimeout((()=>this.init()),7),void(this._creationTimeoutPassed=!0);!0===this.isSubWindow&&(this._bindComponentEventHanlderPassedInConstructor||this.clearHtmlAndAdjustStylesForSubWindow(),window.__glInstance=this),super.init()}else document.addEventListener("DOMContentLoaded",(()=>this.init()),{passive:!0})}clearHtmlAndAdjustStylesForSubWindow(){const t=document.head,e=new Array(4);e[0]=document.querySelectorAll("body link"),e[1]=document.querySelectorAll("body style"),e[2]=document.querySelectorAll("template"),e[3]=document.querySelectorAll(".gl_keep");for(let i=0;ithis.emit("popIn"))),document.body.appendChild(t),!0}}bindComponent(t,e){if(void 0!==this.bindComponentEvent){return this.bindComponentEvent(t,e)}if(void 0!==this.getComponentEvent)return{virtual:!1,component:this.getComponentEvent(t,e)};{const t=`${tt[2]}: ${JSON.stringify(e)}`;throw new Z(t)}}unbindComponent(t,e,i){if(void 0!==this.unbindComponentEvent)this.unbindComponentEvent(t);else if(!e&&void 0!==this.releaseComponentEvent){if(void 0===i)throw new J("VCUCRCU333998");this.releaseComponentEvent(t,i)}}}!function(t){let e=!1;t.createLayoutManagerConstructorParameters=function(t,i){const n=e?null:new URL(document.location.href).searchParams.get("gl-window");e=!0;const o=null!==n;let s,r;if(null!==n){const e=localStorage.getItem(n);if(null===e)throw new Error("Null gl-window Config");localStorage.removeItem(n);const i=JSON.parse(e),o=_t.unminifyConfig(i);r=xt.fromResolved(o),t instanceof HTMLElement&&(s=t)}else void 0===t?r=void 0:t instanceof HTMLElement?(r=void 0,s=t):r=t,void 0===s&&i instanceof HTMLElement&&(s=i);return{constructorOrSubWindowLayoutConfig:r,isSubWindow:o,containerElement:s}}}(le||(le={}));class he extends le{constructor(t,e,i){super(t,e,i,!0),this._componentTypesMap=new Map,this._registeredComponentMap=new Map,this._virtuableComponentMap=new Map,this._containerVirtualRectingRequiredEventListener=(t,e,i)=>this.handleContainerVirtualRectingRequiredEvent(t,e,i),this._containerVirtualVisibilityChangeRequiredEventListener=(t,e)=>this.handleContainerVirtualVisibilityChangeRequiredEvent(t,e),this._containerVirtualZIndexChangeRequiredEventListener=(t,e,i)=>this.handleContainerVirtualZIndexChangeRequiredEvent(t,e,i),this.deprecatedConstructor||this.init()}registerComponent(t,e,i=!1){if("function"!=typeof e)throw new $("registerComponent() componentConstructorOrFactoryFtn parameter is not a function");if(e.hasOwnProperty("prototype")){const n=e;this.registerComponentConstructor(t,n,i)}else{const n=e;this.registerComponentFactoryFunction(t,n,i)}}registerComponentConstructor(t,e,i=!1){if("function"!=typeof e)throw new Error(tt[1]);if(void 0!==this._componentTypesMap.get(t))throw new Z(`${tt[3]}: ${t}`);this._componentTypesMap.set(t,{constructor:e,factoryFunction:void 0,virtual:i})}registerComponentFactoryFunction(t,e,i=!1){if("function"!=typeof e)throw new Z("Please register a constructor function");if(void 0!==this._componentTypesMap.get(t))throw new Z(`${tt[3]}: ${t}`);this._componentTypesMap.set(t,{constructor:void 0,factoryFunction:e,virtual:i})}registerComponentFunction(t){this.registerGetComponentConstructorCallback(t)}registerGetComponentConstructorCallback(t){if("function"!=typeof t)throw new Error("Please register a callback function");void 0!==this._getComponentConstructorFtn&&console.warn("Multiple component functions are being registered. Only the final registered function will be used."),this._getComponentConstructorFtn=t}getRegisteredComponentTypeNames(){const t=this._componentTypesMap.keys();return Array.from(t)}getComponentInstantiator(t){let e;const i=pt.resolveComponentTypeName(t);return void 0!==i&&(e=this._componentTypesMap.get(i)),void 0===e&&void 0!==this._getComponentConstructorFtn&&(e={constructor:this._getComponentConstructorFtn(t),factoryFunction:void 0,virtual:!1}),e}bindComponent(t,e){let i;const n=pt.resolveComponentTypeName(e);let o;if(void 0!==n&&(i=this._componentTypesMap.get(n)),void 0===i&&void 0!==this._getComponentConstructorFtn&&(i={constructor:this._getComponentConstructorFtn(e),factoryFunction:void 0,virtual:!1}),void 0!==i){const s=i.virtual;let r,a;r=void 0===e.componentState?void 0:Ut({},e.componentState);const l=i.constructor;if(void 0!==l)a=new l(t,r,s);else{const e=i.factoryFunction;if(void 0===e)throw new X("LMBCFFU10008");a=e(t,r,s)}if(s){if(void 0===a)throw new J("GLBCVCU988774");{const e=a,i=e.rootHtmlElement;if(void 0===i)throw new Z(`${tt[5]}: ${n}`);!function(t){const e="absolute";t.style.position!==e&&(t.style.position=e)}(i),this.container.appendChild(i),this._virtuableComponentMap.set(t,e),t.virtualRectingRequiredEvent=this._containerVirtualRectingRequiredEventListener,t.virtualVisibilityChangeRequiredEvent=this._containerVirtualVisibilityChangeRequiredEventListener,t.virtualZIndexChangeRequiredEvent=this._containerVirtualZIndexChangeRequiredEventListener}}this._registeredComponentMap.set(t,a),o={virtual:i.virtual,component:a}}else o=super.bindComponent(t,e);return o}unbindComponent(t,e,i){if(void 0===this._registeredComponentMap.get(t))super.unbindComponent(t,e,i);else{const e=this._virtuableComponentMap.get(t);if(void 0!==e){const i=e.rootHtmlElement;if(void 0===i)throw new X("GLUC77743",t.title);this.container.removeChild(i),this._virtuableComponentMap.delete(t)}}}fireBeforeVirtualRectingEvent(t){this._goldenLayoutBoundingClientRect=this.container.getBoundingClientRect(),super.fireBeforeVirtualRectingEvent(t)}handleContainerVirtualRectingRequiredEvent(t,e,i){const n=this._virtuableComponentMap.get(t);if(void 0===n)throw new J("GLHCSCE55933");{const o=n.rootHtmlElement;if(void 0===o)throw new Z(tt[4]+" "+t.title);{const n=t.element.getBoundingClientRect(),s=n.left-this._goldenLayoutBoundingClientRect.left;o.style.left=zt(s);const r=n.top-this._goldenLayoutBoundingClientRect.top;o.style.top=zt(r),Tt(o,e),At(o,i)}}}handleContainerVirtualVisibilityChangeRequiredEvent(t,e){const i=this._virtuableComponentMap.get(t);if(void 0===i)throw new J("GLHCVVCRE55934");{const n=i.rootHtmlElement;if(void 0===n)throw new Z(tt[4]+" "+t.title);Dt(n,e)}}handleContainerVirtualZIndexChangeRequiredEvent(t,e,i){const n=this._virtuableComponentMap.get(t);if(void 0===n)throw new J("GLHCVZICRE55935");{const e=n.rootHtmlElement;if(void 0===e)throw new Z(tt[4]+" "+t.title);e.style.zIndex=i}}}const de="initial_",ce={show:"top",popout:!1,maximise:!1,close:"close-tab-unused"},me={headerHeight:31},ue={hasHeaders:!0,reorderEnabled:!0},pe={popoutWholeStack:!1,constrainDragToContainer:!1,constrainDragToHeaders:!1,preventDragout:!1,showMaximiseIcon:!1,showPopoutIcon:!1,showCloseIcon:!1,blockedPopoutsThrowError:!0,closePopoutsOnUnload:!0,selectionEnabled:!1};var ge,fe;class ve{constructor(e){this.layout=e,ge.set(this,void 0),fe.set(this,void 0),this.handleResize=t=>{t.forEach((t=>this.resizeElement(t.target)))},this.handleMutation=()=>{this.layout.viewComponentsByContainerElement.forEach((t=>{this.resizeElement(t.container.element)}))},t.__classPrivateFieldSet(this,ge,new ResizeObserver(this.handleResize),"f"),t.__classPrivateFieldSet(this,fe,new MutationObserver(this.handleMutation),"f")}observeMutations(e){t.__classPrivateFieldGet(this,fe,"f")?.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["class"]})}destroy(){t.__classPrivateFieldGet(this,ge,"f").disconnect(),t.__classPrivateFieldGet(this,fe,"f").disconnect()}observeContainer(e){t.__classPrivateFieldGet(this,ge,"f").observe(e)}unobserveContainer(e){t.__classPrivateFieldGet(this,ge,"f").unobserve(e)}resizeElement(t){const e=this.layout.viewComponentsByContainerElement.get(t);e&&e.resize()}}ge=new WeakMap,fe=new WeakMap;var _e={};Object.defineProperty(_e,"__esModule",{value:!0});var ye=_e.BaseItem=void 0;class Ce{constructor(t,e,i){this._item=t,this._layout=e,this._wrap=i}get raw(){return this._item}get layout(){return this._layout}get type(){return this._item.type}get contentItems(){return(this._item.contentItems??[]).map((t=>this._wrap(t)))}get parent(){const t=this._item.parent;return t?this._wrap(t):null}setActiveContentItem(t,e){if("stack"!==this.type)throw new Error(`Cannot call setActiveContentItem from a non-stack item: ${this.type}`);this._item.setActiveContentItem(t.raw,e)}static wrapInternal(t,e,i){const n=Ce.wrapCache.get(e);if(n)return n;const o=new t(e,i,(e=>Ce.wrapInternal(t,e,i)));return Ce.wrapCache.set(e,o),o}}ye=_e.BaseItem=Ce,Ce.wrapCache=new WeakMap;const we=t=>!!t&&"contentItems"in t&&(t.isRow||t.isColumn);class Ie extends ye{isRoot(){return!!this._item.parent?.isGround}getBounds(){return this._item.element.getBoundingClientRect()}get viewName(){if(this._item.isComponent){const{component:t}=this._item;return t.identity.name}throw new Error("View name not found")}onDestroyed(t){const e=({target:i})=>{i===this._item&&(t(),this._item.off("itemDestroyed",e))};this._item.on("itemDestroyed",e)}createAdjacentStack({position:t="right"}={}){const e=this.raw;if(ee.isStack(e)&&e.parent){const i=["top","bottom"].includes(t)?"column":"row",n=["left","top"].includes(t)?1:0,o=we(e.parent)?e.parent:e.layoutManager,s=o,r=e.parent.contentItems.indexOf(e);e.parent.isGround&&e.parent.removeChild(e,!0);const a=o.newItem({type:i,content:[{type:"stack",content:[]}]},r);if(!a)throw new Error("createAdjacentStack: Failed to create new container");const l=a.contentItems[0];return a.addChild(this.raw,n),we(s)&&s.removeChild(e,!0),this._wrap(l)}throw new Error(`Cannot creat adjacent stacks for type: ${e.type}, must be type 'stack'`)}setActiveContentItem(t,e=!0){if(!ee.isStack(this._item))throw new Error(`Cannot call setActiveContentItem from a non-stack item: ${this.type}`);this._item.setActiveComponentItem(t.raw,!e)}static wrap(t,e){return ye.wrapInternal(Ie,t,e)}}function be(t=[],e){for(const i of t)"component"===i.type?Object.keys(e).forEach((t=>{t in i&&(i.componentState={[`${de}${t}`]:i[t],...i.componentState}),i[t]=e[t]})):be(i.content,e)}function Se(t=[],e,i){for(const n of t)if("component"===n.type)Object.keys(e).forEach((t=>{if(`${de}${t}`in n.componentState)return n[t]=n.componentState[`${de}${t}`],void delete n.componentState[`${de}${t}`];n[t]=e[t]}));else{if(n.size&&("row"===i||"column"===i)){n["row"===i?"width":"height"]=n.size?.includes(".")?parseFloat(n.size):parseInt(n.size)}Se(n.content,e,n.type)}}function Ee(t){if(t.root){t.root.content&&Se([t.root],{componentName:"view",isClosable:!0});const e=t.root;t.content=[e],delete t.root}return t}const xe=e=>class extends e{connectedCallback(){if(!this.name||!this.uuid)throw new Error(" Name or uuid attribute missing");if(!this.src)throw new Error(" missing 'src' attribute.");this.#t||(this.#t=document.createElement("iframe"),this.#t.src=this.src,this.#t.style.height="100%",this.#t.style.width="100%",this.#t.style.border="none",this.forceFrameName?this.#t.setAttribute("name",this.forceFrameName):this.#t.setAttribute("name",t.encodeOptions({brokerUrl:this.brokerUrl,name:this.name,uuid:this.uuid,providerId:this.providerId,contextGroup:this.contextGroup},"of-frame")),this.#t.setAttribute("id",this.name),this.appendChild(this.#t))}#t;get brokerUrl(){return this.getAttribute("of-broker")}set brokerUrl(t){t&&this.setAttribute("of-broker",t)}get name(){return this.getAttribute("of-name")}set name(t){t&&this.setAttribute("of-name",t)}get forceFrameName(){return this.getAttribute("forceFrameName")}set forceFrameName(t){t&&this.setAttribute("forceFrameName",t)}get uuid(){return this.getAttribute("of-uuid")}set uuid(t){t&&this.setAttribute("of-uuid",t)}get src(){return this.getAttribute("src")}set src(t){t&&this.setAttribute("src",t)}get providerId(){return this.getAttribute("of-provider-id")}set providerId(t){t&&this.setAttribute("of-provider-id",t)}get contextGroup(){return this.getAttribute("of-context-group")}set contextGroup(t){t&&this.setAttribute("of-context-group",t)}static get observedAttributes(){return["name"]}};class Le{static create(t){const e=document.createElement("of-view");return Object.entries(t).forEach((([t,i])=>{e.setAttribute(t,i)})),e}}customElements.define("of-view",xe(HTMLElement));class ze{constructor(t,i,n,{brokerUrl:o,interopConfig:s},r){this.container=t,this.config=i,this.ofView=null,this.isDragging=()=>this.container.tab.element?.className.includes("lm_dragging")??!1;const{url:a,web:l,interop:h,name:d}=i||{},c=d??`internal-generated-view-${e.v4()}`;if(this.identity={uuid:n,name:c},this.container.element.setAttribute("of-name",c),this.container.element.id=`container-${c}`,this.container.parent.id=c,void 0===a)return void this.handleUrlMissing();const m=this.updateTitleIfNotSet(a),u={"of-broker":o,"of-uuid":n,"of-name":c,src:a};l?.frameName&&(u.forceFrameName=l.frameName);const p=h?.currentContextGroup??s?.currentContextGroup;p&&(u["of-context-group"]=p),s?.providerId&&(u["of-provider-id"]=s?.providerId),this.ofView=Le.create(u),this.ofView.title=m??`Iframe: ${a}`,r.appendChild(this.ofView),this.ofView.style.position="absolute"}updateTitleIfNotSet(t){return"view"===this.container.parent.title&&this.container.parent.setTitle(t),this.container.parent.title}handleUrlMissing(){const t=document.createElement("div");t.setAttribute("style","padding: 20px");t.innerText="No URL provided",this.container.element.appendChild(t)}destroy(){this.ofView?.remove(),this.ofView=null}closeView(){this.container.close()}resize(){if(this.ofView){if(this.isDragging())return void(this.ofView.style.display="none");const t=this.container.element.getBoundingClientRect();this.ofView.style.position="absolute",this.ofView.style.height=`${t.height}px`,this.ofView.style.width=`${t.width}px`,this.ofView.style.inset=`${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`,this.ofView.style.display="block"}}}class Me extends U{static overrideConfig(t){const e={...ue,...t.settings,...pe};return e.reorderEnabled?be(t.content,{isClosable:!0}):be(t.content,{reorderEnabled:!1}),{dimensions:me,...t,settings:e,header:{...ce,show:!1!==t.settings?.hasHeaders&&ce.show}}}constructor(t,e,i,{options:n},o,s){super(),this.identity=t,this.container=e,this.initialConfig=i,this.layoutManager=o,this.platformProvider=s,this.viewComponentsByContainerElement=new Map,this.layoutContentCache=_.getSingleInstance(),this.reparentingViews=new Set,this.goldenLayoutDestroyed=!1,this.createViewComponent=(t,e)=>{m.handleSharedView(this.layoutManager,this.identity,e);const i=new ze(t,e,this.identity.uuid,this.options,this.iframeContainer);return e&&!1===e[`${de}isClosable`]&&this.stylesheet.insertRule(`#tab-${i.identity.name} .lm_close_tab { display: none; }`),this.viewComponentsByContainerElement.set(t.element,i),this.resizeController.observeContainer(t.element),i},this.iframeContainer=document.createElement("div"),this.iframeContainer.id=`openfin-layout-iframe-container-${this.identity.layoutName}`,this.domEmitter=new V(e),this.setupStylesheets(),this.layout=new he(this.container),this.layout.resizeWithContainerAutomatically=!0,this.options=n,this.layout.registerComponent("view",this.createViewComponent),this.setupListeners(),this.resizeController=new ve(this),this.layout.loadLayout(Me.overrideConfig(i));const r=document.createElement("div");r.id=`openfin-layout-shadow-container-${this.identity.layoutName}`,r.attachShadow({mode:"open",delegatesFocus:!1}).appendChild(this.iframeContainer),this.container.appendChild(r),this.resizeController.observeMutations(this.container)}getStackByView({name:t}){const e=this.layout.findFirstComponentItemById(t);if(e?.parent&&e?.parent?.isStack)return Ie.wrap(e.parent,this)}getRoot(){return Ie.wrap(this.layout.rootItem,this)}async platformCloseView(t){const e=[...this.viewComponentsByContainerElement.values()].find((e=>e.identity.name===t.name));if(!e)throw new Error(`View with name: ${t.name} not found in layout.`);e.closeView()}async platformCreateView(t,{location:e,targetView:i}={}){if(i)throw new Error("TargetView not supported in web");const n={options:this.platformProvider.normalizeOptions(t),target:this.identity,location:e};return this.insertView(n)}setupStylesheets(){if(this.container.setAttribute("data-openfin-layout-name",this.identity.layoutName),this.stylesheet=new CSSStyleSheet,this.stylesheet.insertRule(".lm_close { display: none; }"),document.adoptedStyleSheets.push(this.stylesheet),this.initialConfig.settings?.preventSplitterResize){const t=`\n [data-openfin-layout-name='${this.identity.layoutName}'] .lm_splitter {\n pointer-events: none;\n }`;this.stylesheet.insertRule(t)}}insertView({options:t,location:e,targetView:i}){const n=e?this.layoutContentCache.getItemOrUndefined(e.id):void 0,o=i?this.layoutContentCache.getItemOrUndefined(i.name):void 0,s=n??o??Ie.wrap(this.layout.rootItem,this);let r;if(ee.isStack(s.raw))r=s.raw;else{if(!we(s.raw))throw new Error("Cannot add a view at the requested location");r=s.raw.newItem({type:"stack",content:[]})}const a=Math.min(r.contentItems.length,e?.index??r.contentItems.length);let l=this.layout.findFirstComponentItemById(t.name);l?(l.parent&&l.parent.removeChild(l,!0),r.addChild(l,a)):l=r.newComponent("view",t,t.title??t.url??"Default Title",a);const h=l.component.identity;return Promise.resolve({identity:h})}replaceView({viewToReplace:t,newView:e}){throw new Error("Method not implemented.")}replaceLayout(t){throw new Error("Method not implemented.")}async cleanupView(t){}applyPreset(t){throw new Error("Method not implemented.")}getCurrentViews(){return[...this.viewComponentsByContainerElement.values()].map((t=>t.identity))}async getFrameSnapshot(){return Ee(xt.fromResolved(this.layout.toConfig()))}isVisible(){return W(this.container)}async onViewDetached({viewIdentity:t}){this.reparentingViews.add(t.name),this.platformCloseView(t)}async destroy(){this.goldenLayoutDestroyed||(this.goldenLayoutDestroyed=!0,this.layout.destroy()),this.iframeContainer.remove(),this.resizeController.destroy(),document.adoptedStyleSheets=document.adoptedStyleSheets.filter((t=>t!==this.stylesheet)),this.viewComponentsByContainerElement.clear()}setupListeners(){this.container.addEventListener("pointerdown",(t=>{if(t.target instanceof HTMLElement){const e=t.target.classList;["lm_tab","lm_title","lm_splitter","lm_drag_handle"].some((t=>e.contains(t)))&&(this.handleDragStart(),2===t.button&&t.stopPropagation())}}),!0),document.addEventListener("pointerup",(()=>this.handleDragEnd()),!0),this.layout.on("tabCreated",(t=>{const e=t.componentItem.component;t.element.id=`tab-${e.identity.name}`,this.domEmitter.dispatchLocalEvent("tab-created",e.identity)})),this.layout.on("itemCreated",(({target:t})=>{const e=t;if(Gt.isComponentItem(e)){const t=e.component;this.domEmitter.dispatchLocalEvent("container-created",t.identity)}})),this.layout.on("itemDestroyed",(t=>{const e=t.target;if(Gt.isComponentItem(e)){const t=e.component;this.removeViewComponent(t)}})),this.layout.on("itemDropped",(()=>{this.handleDragEnd()}))}handleDragStart(){this.iframeContainer.style.pointerEvents="none"}handleDragEnd(){this.iframeContainer.style.pointerEvents=""}removeViewComponent(t){if(t.config&&!1===t.config[`${de}isClosable`]){const e=[...this.stylesheet.cssRules].findIndex((e=>e.cssText.includes(`#tab-${t.identity.name}`)));this.stylesheet.deleteRule(e)}t.destroy(),this.viewComponentsByContainerElement.delete(t.container.element),this.resizeController.unobserveContainer(t.container.element),this.reparentingViews.has(t.identity.name)?this.reparentingViews.delete(t.identity.name):this.platformProvider.closeView(t.identity.name);0===this.getCurrentViews().length&&(this.goldenLayoutDestroyed||(this.goldenLayoutDestroyed=!0,m.handleLastViewRemoved(this.layoutManager,this.identity)))}}class Pe{constructor(t,e,i,n){this.windowIdentity=t,this.connectConfig=e,this.provider=i,this.fallbackContainer=n}async createLayout(t,e){if(!("container"in t)&&!this.fallbackContainer)throw new Error("Container property is not optional in web");const{layoutName:i}=t,n=t,o=this.provider.initLayoutViews(n),s=n.container??this.fallbackContainer,r={...this.windowIdentity,layoutName:i},a=new Me(r,s,o,this.connectConfig,e,this.provider);m.registerLayout(e,i,a),this.fallbackContainer=null}async getLayoutSnapshot(t){return t.getLayoutSnapshot()}async handleLastViewRemoved(t){}}class Te{static async init(e){const i=e.getFin().InterApplicationBus.Channel,n=await i.create(`custom-frame-${e.me.uuid}`);return n.setDefaultAction((async(t,{target:e,opts:i},o)=>{const s=n.connections.find((t=>t.name===e.name));if(s)return n.dispatch(s,t,{...i,target:e});throw new Error(`Client with name ${e.name} not found`)})),await t.relayChannelClientApi_1(n,"layout-relay"),new Te(e)}constructor(t){this.wire=t,this.viewNames=new Set}normalizeOptions(t,i="default"){const n=this.wire.me.uuid;let{name:o=`internal-generated-view-${e.v4()}`}=t;return o.match(/^internal-generated-view-/)&&this.viewNames.has(o)&&"duplicate"===i&&(o=`internal-generated-view-${e.v4()}`),this.viewNames.add(o),{...t,name:o,uuid:n}}closeView(t){this.viewNames.delete(t)}initLayoutViews({layout:t,multiInstanceViewBehavior:e}){return H((t=>{if("component"===t.type&&t.componentState){const i=this.normalizeOptions(t.componentState,e);return{...t,componentState:i}}return t}),t)}}var Ae;const ke=t=>t;Ae=new WeakMap,exports.WebLayoutEntryPoint=class{constructor(e){Ae.set(this,void 0),this.initLayoutManager=async(e,i,{container:n,layoutManagerOverride:o})=>{const s=await Te.init(i),r=o??ke,a=new Pe(i.me,t.__classPrivateFieldGet(this,Ae,"f"),s,n),l=new(r(m.createClosedConstructor(a)));return await M(i,l),l},this.applyLayoutSnapshot=async(e,i,n)=>{await i.applyLayoutSnapshot(t.__classPrivateFieldGet(this,Ae,"f").platform.layoutSnapshot)},this.createLayout=async(t,e)=>m.createLayout(t,e),this.destroyLayout=async(t,e)=>m.destroyLayout(t,e),t.__classPrivateFieldSet(this,Ae,e,"f")}}; @@ -7340,7 +7340,7 @@ module.exports = stubFalse; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.init = init; -const core_web_1 = __webpack_require__(/*! @openfin/core-web */ "./node_modules/@openfin/core-web/out/api-client.js"); +const core_web_1 = __webpack_require__(/*! @openfin/core-web */ "../../node_modules/@openfin/core-web/out/api-client.js"); const settings_1 = __webpack_require__(/*! ./settings */ "./client/src/platform/settings.ts"); /** * Initializes the OpenFin Web Broker connection. @@ -8387,7 +8387,7 @@ function version(uuid) { /******/ /************************************************************************/ var __webpack_exports__ = {}; -// This entry need to be wrapped in an IIFE because it need to be in strict mode. +// This entry needs to be wrapped in an IIFE because it needs to be in strict mode. (() => { "use strict"; var exports = __webpack_exports__; diff --git a/web/v19.2.0/cloud-interop/js/interop-view.bundle.js.map b/web/v19.2.0/cloud-interop/js/interop-view.bundle.js.map index d523e45..df279e7 100644 --- a/web/v19.2.0/cloud-interop/js/interop-view.bundle.js.map +++ b/web/v19.2.0/cloud-interop/js/interop-view.bundle.js.map @@ -1 +1 @@ -{"version":3,"file":"interop-view.bundle.js","mappings":";;;;;;;;;;AAAa,MAAM,mBAAO,CAAC,iFAAoB,EAAE,mBAAO,CAAC,mDAAS,EAAE,mBAAO,CAAC,+DAAM,EAAE,mBAAO,CAAC,mDAAQ,EAAE,mBAAO,CAAC,gEAAkB,EAAE,mBAAO,CAAC,4DAAgB,EAAE,eAAe;;;;;;;;;;;;ACA9J,MAAM,mBAAO,CAAC,mDAAS,IAAI,mBAAO,CAAC,mDAAQ,IAAI,mBAAO,CAAC,gEAAkB,IAAI,mBAAO,CAAC,4DAAgB,IAAI,mBAAO,CAAC,+DAAM,EAAE,kBAAkB,EAAE,GAAG,wBAAwB,GAAG,sGAAsG,qBAAM,CAAC,qBAAM,iCAAiC,KAAK,KAAK,KAAK,MAAM,oBAAoB,WAAW,kBAAkB,kBAAkB,UAAU,SAAS,sCAAsC,SAAS,sFAAsF,mCAAmC,6BAA6B,GAAG,kCAAkC,6BAA6B,mDAAmD,0CAA0C,yDAAyD,iEAAiE,oFAAoF,2IAA2I,mDAAmD,kDAAkD,oFAAoF,4IAA4I,sDAAsD,sCAAsC,SAAS,sCAAsC,UAAU,QAAQ,eAAe,mNAAmN,UAAU,0BAA0B,SAAS,qBAAqB,SAAS,8BAA8B,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AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,cAAc,SAAS;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,2CAA2C,UAAU;AACrD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;ACrJA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEY;;AAEZ,eAAe,mBAAO,CAAC,wDAAW;AAClC,gBAAgB,mBAAO,CAAC,oDAAS;AACjC;AACA;AACA;AACA;;AAEA,cAAc;AACd,kBAAkB;AAClB,yBAAyB;;AAEzB;AACA,kBAAkB;;AAElB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,kBAAkB,YAAY;AAC9B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA,wCAAwC,SAAS;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;;AAEA;AACA;AACA,cAAc,iBAAiB;AAC/B;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,iDAAiD,EAAE;AACnD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C;AAC1C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA,yBAAyB,eAAe;AACxC;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,yBAAyB,QAAQ;AACjC;AACA,sBAAsB,eAAe;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc,YAAY;AAC1B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB,sBAAsB;AACxC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,mBAAmB;AACnB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA,oBAAoB,SAAS;AAC7B;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA,qBAAqB,WAAW,GAAG,IAAI;AACvC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA,gBAAgB,WAAW,GAAG,IAAI,KAAK,aAAa;AACpD;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;;AAEA;AACA,GAAG;AACH;AACA;AACA,mBAAmB,KAAK,mDAAmD,cAAc;AACzF,GAAG;AACH;AACA;AACA,+BAA+B,IAAI;AACnC;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,MAAM,aAAa,SAAS;AACtD;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,SAAS,gBAAgB;AACzB,cAAc,oBAAoB,EAAE,IAAI;AACxC;AACA,YAAY,gBAAgB,EAAE,IAAI;AAClC;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,GAAG,SAAS,GAAG,KAAK,qBAAqB,EAAE,EAAE;AACpE,QAAQ;AACR,yBAAyB,GAAG,KAAK,yBAAyB,EAAE,EAAE;AAC9D,mBAAmB,yBAAyB,EAAE,EAAE;AAChD;AACA,MAAM;AACN,oBAAoB,IAAI,EAAE,GAAG,SAAS,IAAI,EAAE,EAAE;AAC9C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,0CAA0C,cAAc,SAAS,OAAO;AACxE;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,kBAAkB,YAAY;AAC9B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,kBAAkB,gBAAgB;AAClC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,kBAAkB,gBAAgB;AAClC;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,cAAc,YAAY;AAC1B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,QAAQ;AAC1B;AACA,oBAAoB,QAAQ;AAC5B;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;;;;;ACzjEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEa;;AAEb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB;;AAEnB;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,sBAAsB;AACxC;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA,eAAe;AACf;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA,oBAAoB,SAAS;AAC7B;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;;AAEA,kCAAkC,QAAQ;AAC1C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oBAAoB,iBAAiB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,QAAQ;AACR;AACA,uCAAuC,QAAQ;AAC/C;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,OAAO;AACzB;AACA;AACA;;AAEA;AACA,SAAS,yBAAyB;AAClC;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,gBAAgB;AAClC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,8DAA8D,YAAY;AAC1E;AACA,8DAA8D,YAAY;AAC1E;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,qCAAqC,YAAY;AACjD;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;AACA;;;;;;;;;;;AChfA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,SAAS,WAAW;;AAEpB;AACA;AACA;AACA,SAAS,WAAW;;AAEpB;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA,SAAS,WAAW;;AAEpB;AACA;AACA,SAAS,UAAU;;AAEnB;AACA;;;;;;;;;;;ACpFA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,WAAW,mBAAO,CAAC,mDAAS;;AAE5B;AACA;;AAEA;;;;;;;;;;;ACNA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,cAAc,mBAAO,CAAC,yDAAY;AAClC,cAAc,mBAAO,CAAC,yDAAY;AAClC,cAAc,mBAAO,CAAC,yDAAY;;AAElC;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAE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A;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AChDA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACnBA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,UAAU;AACrB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACtBA,sBAAsB,mBAAO,CAAC,yEAAoB;AAClD,SAAS,mBAAO,CAAC,6CAAM;;AAEvB;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC3BA,SAAS,mBAAO,CAAC,6CAAM;;AAEvB;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpBA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,WAAW,mBAAO,CAAC,iDAAQ;;AAE3B;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AChBA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,aAAa,mBAAO,CAAC,qDAAU;;AAE/B;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AChBA,qBA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A;AACA,WAAW,GAAG;AACd,WAAW,SAAS;AACpB;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa,GAAG;AAChB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;AACA,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;;;;;;;;;;ACrKA,eAAe,mBAAO,CAAC,yDAAY;;AAEnC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;;;;;;;;;;AC7BA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,cAAc,mBAAO,CAAC,uDAAW;;AAEjC;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACnBA,aAAa,mBAAO,CAAC,uDAAW;AAChC,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,qBAAqB,mBAAO,CAAC,uEAAmB;;AAEhD;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA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C,uDAAW;AAChC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA,iBAAiB,mBAAO,CAAC,6DAAc;AACvC,eAAe,mBAAO,CAAC,2DAAa;AACpC,eAAe,mBAAO,CAAC,yDAAY;AACnC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;AACA;AACA;AACA,oCAAoC;;AAEpC;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC9CA,aAAa,mBAAO,CAAC,uDAAW;AAChC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,eAAe,mBAAO,CAAC,yDAAY;AACnC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC3DA,kBAAkB,mBAAO,CAAC,iEAAgB;AAC1C,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,W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AEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC/GA,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACzFA;AACA,wBAAwB,qBAAM,gBAAgB,qBAAM,IAAI,qBAAM,sBAAsB,qBAAM;;AAE1F;;;;;;;;;;;ACHA,qBAAqB,mBAAO,CAAC,uEAAmB;AAChD,iBAAiB,mBAAO,C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AAO,CAAC,mEAAiB;;AAE5C;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,GAAG;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC7BA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACtBA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACtBA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACzBA,uBAAuB,mBAAO,CAAC,2EAAqB;AACpD,oBAAoB,mBAAO,CAAC,qEAAkB;AAC9C,kBAAkB,mBAAO,CAAC,iEAAgB;AAC1C,kBAAkB,mBAAO,CAAC,iEAAgB;AAC1C,sBAAsB,mBAAO,CAAC,yEAAoB;;AAElD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC5EA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,mBAAmB,mBAAO,CAAC,mEAAiB;AAC5C,kBAAkB,mBAAO,CAAC,iEAAgB;;AAE1C;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACxBA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACdA,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACnBA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACZA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClCA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,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ACrBA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;;;;;;;;;;ACjBA,gBAAgB,mBAAO,CAAC,6DAAc;;AAEtC;AACA;;AAEA;;;;;;;;;;;ACLA,cAAc,mBAAO,CAAC,yDAAY;;AAElC;AACA;;AAEA;;;;;;;;;;;ACLA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACnBA,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA,kBAAkB,KAA0B;;AAE5C;AACA,gCAAgC,QAAa;;AAE7C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ,CAAC;;AAED;;;;;;;;;;;AC7BA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACrBA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,aAAa,UAAU;AACvB;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACdA,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;ACRA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACbA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;;;;;;;;;;ACjBA,gBAAgB,mBAAO,CAAC,6DAAc;;AAEtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACdA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,GAAG;AAChB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACbA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACbA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,UAAU,mBAAO,CAAC,iDAAQ;AAC1B,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjCA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;;;;;;;;;;;ACzBA,gBAAgB,mBAAO,CAAC,6DAAc;;AAEtC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,GAAG;AAChB;AACA;AACA;AACA,oBAAoB,QAAQ,IAAI,QAAQ;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,kBAAkB;AAClB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpCA,sBAAsB,mBAAO,CAAC,yEAAoB;AAClD,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA,8BAA8B,mBAAmB;AACjD;AACA;AACA;AACA;AACA;AACA,+CAA+C,mBAAmB;AAClE;AACA;AACA;;AAEA;;;;;;;;;;;ACnCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACzBA,iBAAiB,mBAAO,CAAC,6DAAc;AACvC,eAAe,mBAAO,CAAC,yDAAY;;AAEnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AChCA,WAAW,mBAAO,CAAC,mDAAS;AAC5B,gBAAgB,mBAAO,CAAC,2DAAa;;AAErC;AACA,kBAAkB,KAA0B;;AAE5C;AACA,gCAAgC,QAAa;;AAE7C;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACrCA,kBAAkB,mBAAO,CAAC,iEAAgB;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,kBAAkB;AAClB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClCA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,eAAe,mBAAO,CAAC,yDAAY;;AAEnC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpCA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClCA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC1BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC9BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC5BA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC1BA,uBAAuB,mBAAO,CAAC,2EAAqB;AACpD,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC1BA,oBAAoB,mBAAO,CAAC,qEAAkB;AAC9C,eAAe,mBAAO,CAAC,2DAAa;AACpC,kBAAkB,mBAAO,CAAC,+DAAe;;AAEzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpCA,oBAAoB,mBAAO,CAAC,qEAAkB;AAC9C,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,kBAAkB,mBAAO,CAAC,+DAAe;;AAEzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;A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A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,kBAAkB,aAAa;AAC/B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,iEAAe,GAAG;;;;;;;;;;;;;;;ACtNlB,iEAAe,sCAAsC;;;;;;;;;;;;;;;;ACAhB;;AAErC;AACA,OAAO,wDAAQ;AACf;AACA;;AAEA;AACA,gCAAgC;;AAEhC;AACA;AACA;AACA,qBAAqB;;AAErB;AACA,qBAAqB;;AAErB;AACA,qBAAqB;;AAErB;AACA,qBAAqB;AACrB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,iEAAe,KAAK;;;;;;;;;;;;;;;AClCpB,iEAAe,cAAc,EAAE,UAAU,EAAE,eAAe,EAAE,gBAAgB,EAAE,UAAU,GAAG,yCAAyC;;;;;;;;;;;;;;;ACApI;AACA;AACA;AACA;AACA;AACe;AACf;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;AClBA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,mDAAmD;;AAEnD;;AAEA,oBAAoB,gBAAgB;AACpC;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AAC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K,IAAI,EAAE;YACrD,MAAM,UAAU,EAAE,CAAC;QACpB,CAAC,CAAC,CAAC;IACJ,CAAC;IAED,MAAM,kBAAkB,EAAE,CAAC;AAC5B,CAAC","sources":["webpack://openfin-web--cloud-interop/./node_modules/@openfin/core-web/out/api-client.js","webpack://openfin-web--cloud-interop/./node_modules/@openfin/core-web/out/main-8cad4070.js","webpack://openfin-web--cloud-interop/./node_modules/@openfin/core-web/out/main-b14f67c9.js","webpack://openfin-web--cloud-interop/../../node_modules/base64-js/index.js","webpack://openfin-web--cloud-interop/../../node_modules/buffer/index.js","webpack://openfin-web--cloud-interop/../../node_modules/events/events.js","webpack://openfin-web--cloud-interop/../../node_modules/ieee754/index.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_DataView.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_Hash.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_ListCache.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_Map.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_MapCache.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_Promise.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_Set.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_SetCache.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_Stack.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_Symbol.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_Uint8Array.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_WeakMap.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_arrayEach.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_arrayFilter.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_arrayLikeKeys.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_arrayPush.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_arraySome.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_assignValue.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_assocIndexOf.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseAssign.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseAssignIn.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseAssignValue.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseClone.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseCreate.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseGetAllKeys.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseGetTag.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseIsArguments.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseIsEqual.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseIsEqualDeep.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseIsMap.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseIsNative.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseIsSet.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseIsTypedArray.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseKeys.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseKeysIn.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseTimes.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseUnary.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_cacheHas.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_cloneArrayBuffer.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_cloneBuffer.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_cloneDataView.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_cloneRegExp.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_cloneSymbol.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_cloneTypedArray.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_copyArray.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_copyObject.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_copySymbols.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_copySymbolsIn.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_coreJsData.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_defineProperty.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_equalArrays.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_equalByTag.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_equalObjects.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_freeGlobal.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_getAllKeys.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_getAllKeysIn.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_getMapData.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_getNative.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_getPrototype.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_getRawTag.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_getSymbols.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_getSymbolsIn.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_getTag.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_getValue.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_hashClear.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_hashDelete.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_hashGet.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_hashHas.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_hashSet.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_initCloneArray.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_initCloneByTag.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_initCloneObject.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_isIndex.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_isKeyable.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_isMasked.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_isPrototype.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_listCacheClear.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_listCacheDelete.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_listCacheGet.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_listCacheHas.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_listCacheSet.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_mapCacheClear.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_mapCacheDelete.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_mapCacheGet.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_mapCacheHas.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_mapCacheSet.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_mapToArray.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_nativeCreate.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_nativeKeys.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_nativeKeysIn.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_nodeUtil.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_objectToString.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_overArg.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_root.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_setCacheAdd.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_setCacheHas.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_setToArray.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_stackClear.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_stackDelete.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_stackGet.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_stackHas.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_stackSet.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_toSource.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/cloneDeep.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/eq.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/isArguments.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/isArray.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/isArrayLike.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/isBuffer.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/isEqual.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/isFunction.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/isLength.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/isMap.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/isObject.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/isObjectLike.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/isSet.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/isTypedArray.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/keys.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/keysIn.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/stubArray.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/stubFalse.js","webpack://openfin-web--cloud-interop/./client/src/platform/api.ts","webpack://openfin-web--cloud-interop/./client/src/platform/settings.ts","webpack://openfin-web--cloud-interop/../../node_modules/uuid/dist/esm-browser/index.js","webpack://openfin-web--cloud-interop/../../node_modules/uuid/dist/esm-browser/md5.js","webpack://openfin-web--cloud-interop/../../node_modules/uuid/dist/esm-browser/nil.js","webpack://openfin-web--cloud-interop/../../node_modules/uuid/dist/esm-browser/parse.js","webpack://openfin-web--cloud-interop/../../node_modules/uuid/dist/esm-browser/regex.js","webpack://openfin-web--cloud-interop/../../node_modules/uuid/dist/esm-browser/rng.js","webpack://openfin-web--cloud-interop/../../node_modules/uuid/dist/esm-browser/sha1.js","webpack://openfin-web--cloud-interop/../../node_modules/uuid/dist/esm-browser/stringify.js","webpack://openfin-web--cloud-interop/../../node_modules/uuid/dist/esm-browser/v1.js","webpack://openfin-web--cloud-interop/../../node_modules/uuid/dist/esm-browser/v3.js","webpack://openfin-web--cloud-interop/../../node_modules/uuid/dist/esm-browser/v35.js","webpack://openfin-web--cloud-interop/../../node_modules/uuid/dist/esm-browser/v4.js","webpack://openfin-web--cloud-interop/../../node_modules/uuid/dist/esm-browser/v5.js","webpack://openfin-web--cloud-interop/../../node_modules/uuid/dist/esm-browser/validate.js","webpack://openfin-web--cloud-interop/../../node_modules/uuid/dist/esm-browser/version.js","webpack://openfin-web--cloud-interop/webpack/bootstrap","webpack://openfin-web--cloud-interop/webpack/runtime/define property getters","webpack://openfin-web--cloud-interop/webpack/runtime/global","webpack://openfin-web--cloud-interop/webpack/runtime/hasOwnProperty shorthand","webpack://openfin-web--cloud-interop/webpack/runtime/make namespace object","webpack://openfin-web--cloud-interop/webpack/runtime/node module decorator","webpack://openfin-web--cloud-interop/./client/src/content/interop-view.ts"],"sourcesContent":["\"use strict\";var e=require(\"./main-8cad4070.js\");require(\"buffer/\"),require(\"uuid\"),require(\"events\"),require(\"lodash/cloneDeep\"),require(\"lodash/isEqual\"),exports.connect=e.connect;\n","\"use strict\";var e=require(\"buffer/\"),t=require(\"events\"),n=require(\"lodash/cloneDeep\"),i=require(\"lodash/isEqual\"),r=require(\"uuid\");const o=(e,t)=>`${t}<${btoa(JSON.stringify(e))}>`;var s=\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof window?window:\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:{},a={},c={},d={},h={};async function l(e){const t=[];for(const n of e){const e=await n();t.push(e)}return t}Object.defineProperty(h,\"__esModule\",{value:!0}),h.promiseMapSerial=h.serial=h.promiseMap=h.promisify=void 0,h.promisify=function(e){return(...t)=>new Promise(((n,i)=>{e(...t,((e,t)=>e?i(e):n(t)))}))},h.promiseMap=async function(e,t){return Promise.all(e.map(t))},h.serial=l,h.promiseMapSerial=async function(e,t){return l(e.map(((e,n,i)=>()=>t(e,n,i))))};var u,p=s&&s.__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},w=s&&s.__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)};Object.defineProperty(d,\"__esModule\",{value:!0}),d.Reply=d.EmitterBase=d.Base=void 0;const y=h;class f{constructor(e){this.isNodeEnvironment=()=>\"node\"===this.wire.environment.type,this.isOpenFinEnvironment=()=>\"openfin\"===this.wire.environment.type,this.isBrowserEnvironment=()=>\"other\"===this.wire.environment.type,this.wire=e}get fin(){return this.wire.getFin()}get me(){return this.wire.me}}d.Base=f;d.EmitterBase=class extends f{constructor(e,t,...n){super(e),this.topic=t,u.set(this,void 0),this.eventNames=()=>this.hasEmitter()?this.getOrCreateEmitter().eventNames():[],this.emit=(e,t,...n)=>!!this.hasEmitter()&&this.getOrCreateEmitter().emit(e,t,...n),this.hasEmitter=()=>this.wire.eventAggregator.has(w(this,u,\"f\")),this.getOrCreateEmitter=()=>this.wire.eventAggregator.getOrCreate(w(this,u,\"f\")),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[],this.listenerCount=e=>this.hasEmitter()?this.getOrCreateEmitter().listenerCount(e):0,this.registerEventListener=async(e,t={},n,i)=>{const r={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e},o=this.getOrCreateEmitter();n(o);try{await this.wire.sendAction(\"subscribe-to-desktop-event\",r)}catch(e){throw i(o),this.deleteEmitterIfNothingRegistered(o),e}},this.deregisterEventListener=async(e,t={})=>{if(this.hasEmitter()){const n={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e};await this.wire.sendAction(\"unsubscribe-to-desktop-event\",n).catch((()=>null));return this.getOrCreateEmitter()}return Promise.resolve()},p(this,u,[t,...n],\"f\"),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[]}async on(e,t,n){return await this.registerEventListener(e,n,(n=>{n.on(e,t)}),(n=>{n.removeListener(e,t)})),this}async addListener(e,t,n){return this.on(e,t,n)}async once(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.once(e,i),n.once(e,t)}),(n=>{n.removeListener(e,i),n.removeListener(e,t)})),this}async prependListener(e,t,n){return await this.registerEventListener(e,n,(n=>{n.prependListener(e,t)}),(n=>{n.removeListener(e,t)})),this}async prependOnceListener(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.prependOnceListener(e,t),n.once(e,i)}),(n=>{n.removeListener(e,t),n.removeListener(e,i)})),this}async removeListener(e,t,n){const i=await this.deregisterEventListener(e,n);return i&&(i.removeListener(e,t),this.deleteEmitterIfNothingRegistered(i)),this}async deregisterAllListeners(e){const t={...this.identity,type:e,topic:this.topic};if(this.hasEmitter()){const e=this.getOrCreateEmitter(),n=e.listenerCount(t.type),i=[];for(let e=0;enull)));return await Promise.all(i),e}}async removeAllListeners(e){const t=async e=>{const t=await this.deregisterAllListeners(e);t&&(t.removeAllListeners(e),this.deleteEmitterIfNothingRegistered(t))};if(e)await t(e);else if(this.hasEmitter()){const e=this.getOrCreateEmitter().eventNames();await(0,y.promiseMap)(e,t)}return this}deleteEmitterIfNothingRegistered(e){0===e.eventNames().length&&this.wire.eventAggregator.delete(w(this,u,\"f\"))}},u=new WeakMap;d.Reply=class{};var g={};Object.defineProperty(g,\"__esModule\",{value:!0});var m=g.RuntimeError=g.NotSupportedError=g.NotImplementedError=g.NoAckError=g.DuplicateCorrelationError=g.UnexpectedActionError=g.DisconnectedError=void 0;class v extends Error{constructor(e){super(`Expected websocket state OPEN but found ${e}`),this.readyState=e}}g.DisconnectedError=v;class C extends Error{}g.UnexpectedActionError=C;class b extends Error{}g.DuplicateCorrelationError=b;class I extends Error{}g.NoAckError=I;class E extends Error{}g.NotImplementedError=E;class x extends Error{}g.NotSupportedError=x;class A extends Error{constructor(e){const{message:t,name:n,stack:i,...r}=e;super(t),this.name=n||\"Error\",this.stack=i??this.toString(),Object.keys(r).forEach((e=>{this[e]=r[e]}))}}class P extends Error{static getCallSite(e=0){const t=Error.stackTraceLimit,n=e+1;Error.stackTraceLimit=t+n;const i=Error.prepareStackTrace;Error.prepareStackTrace=(e,t)=>t;const r=(new Error).stack?.slice(n)??[];return Error.prepareStackTrace=i,Error.stackTraceLimit=t,r}static prepareStackTrace(e,t){if(\"function\"==typeof Error.prepareStackTrace)return Error.prepareStackTrace(e,t);let n=\"\";n+=e.name||\"Error\",n+=`: ${e.message||\"\"}`;for(const e of t)n+=`\\n at ${e.toString()}`;return n}constructor(e,t){const{reason:n,error:i}=e;super(n),this.name=\"RuntimeError\",i?.stack&&(this.cause=new A(i)),t&&(this.stack=P.prepareStackTrace(this,t))}}m=g.RuntimeError=P;var M={},_={},O={};Object.defineProperty(O,\"__esModule\",{value:!0}),O.validateIdentity=void 0,O.validateIdentity=function(e){let t;return\"object\"==typeof e&&\"string\"==typeof e.uuid||(t=\"Not a valid identity object\"),t};var S={},R={},F={},j={},k={},L={},T={};Object.defineProperty(T,\"__esModule\",{value:!0}),T.handleDeprecatedWarnings=void 0;var $;T.handleDeprecatedWarnings=e=>{(e.contentNavigation?.whitelist||e.contentNavigation?.blacklist||e.contentRedirect?.whitelist||e.contentRedirect?.blacklist)&&console.warn(\"The properties 'whitelist' and 'blacklist' have been marked as deprecated and will be removed in a future version. Please use 'allowlist' and 'denylist'.\")};var B={},G={};Object.defineProperty(G,\"__esModule\",{value:!0}),G.AsyncRetryableLazy=W=G.Lazy=void 0;var W=G.Lazy=class{constructor(e){this.producerFn=e}getValue(){return this.value||(this.value=this.producerFn()),this.value}};G.AsyncRetryableLazy=class{constructor(e){this.producerFn=e}async getValue(){return this.promise||(this.promise=this.producerFn().catch((e=>{throw delete this.promise,e}))),this.promise}};var H={};Object.defineProperty(H,\"__esModule\",{value:!0}),H.WebContents=void 0;const N=d;class D extends N.EmitterBase{constructor(e,t,n){super(e,n,t.uuid,t.name),this.identity=t,this.entityType=n}capturePage(e){return this.wire.sendAction(\"capture-page\",{options:e,...this.identity}).then((({payload:e})=>e.data))}executeJavaScript(e){return this.wire.sendAction(\"execute-javascript-in-window\",{...this.identity,code:e}).then((({payload:e})=>e.data))}getZoomLevel(){return this.wire.sendAction(\"get-zoom-level\",this.identity).then((({payload:e})=>e.data))}setZoomLevel(e){return this.wire.sendAction(\"set-zoom-level\",{...this.identity,level:e}).then((()=>{}))}navigate(e){return this.wire.sendAction(\"navigate-window\",{...this.identity,url:e}).then((()=>{}))}navigateBack(){return this.wire.sendAction(\"navigate-window-back\",{...this.identity}).then((()=>{}))}async navigateForward(){await this.wire.sendAction(\"navigate-window-forward\",{...this.identity})}stopNavigation(){return this.wire.sendAction(\"stop-window-navigation\",{...this.identity}).then((()=>{}))}reload(e=!1){return this.wire.sendAction(\"reload-window\",{ignoreCache:e,...this.identity}).then((()=>{}))}print(e={}){return this.wire.sendAction(\"print\",{...this.identity,options:e}).then((()=>{}))}findInPage(e,t){return this.wire.sendAction(\"find-in-page\",{...this.identity,searchTerm:e,options:t}).then((({payload:e})=>e.data))}stopFindInPage(e){return this.wire.sendAction(\"stop-find-in-page\",{...this.identity,action:e}).then((()=>{}))}getPrinters(){return this.wire.sendAction(\"get-printers\",{...this.identity}).then((({payload:e})=>e.data))}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){await this.wire.sendAction(\"focus-window\",{emitSynthFocused:e,...this.identity})}async showDeveloperTools(){await this.wire.sendAction(\"show-developer-tools\",this.identity)}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction(\"get-process-info\",this.identity);return e}async getSharedWorkers(){return this.wire.sendAction(\"get-shared-workers\",this.identity).then((({payload:e})=>e.data))}async inspectSharedWorker(){await this.wire.sendAction(\"inspect-shared-worker\",{...this.identity})}async inspectSharedWorkerById(e){await this.wire.sendAction(\"inspect-shared-worker-by-id\",{...this.identity,workerId:e})}async inspectServiceWorker(){await this.wire.sendAction(\"inspect-service-worker\",{...this.identity})}async showPopupWindow(e){if(this.wire.sendAction(`${this.entityType}-show-popup-window`,this.identity).catch((()=>{})),e?.onPopupReady){const t=async({popupName:t})=>{try{const n=this.fin.Window.wrapSync({uuid:this.fin.me.uuid,name:t});await e.onPopupReady(n)}catch(e){throw new Error(`Something went wrong during onPopupReady execution: ${e}`)}};await this.once(\"popup-ready\",t)}const{payload:t}=await this.wire.sendAction(\"try-create-popup-window\",{options:{...e,hasResultCallback:!!e?.onPopupResult,hasReadyCallback:!!e?.onPopupReady},...this.identity}),{data:{willOpen:n,options:i}}=t;n&&await this.fin.Window.create(i.initialOptions);if(e?.onPopupResult){const t=async t=>{await e.onPopupResult((e=>{const{name:t,uuid:n,result:i,data:r}=e,o={identity:{name:t,uuid:n},result:i};return r&&(o.data=r),o})(t))},n=async()=>{await this.removeListener(\"popup-result\",t)};await this.on(\"popup-result\",t),await this.once(\"popup-teardown\",n)}const{payload:r}=await this.wire.sendAction(\"show-popup-window\",{options:i,...this.identity});return r.data}}var U,V,z,K,q;function J(){return V||(V=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(function(){if($)return L;$=1,Object.defineProperty(L,\"__esModule\",{value:!0}),L.ViewModule=void 0;const e=d,t=O,n=J(),i=T;class r extends e.Base{async create(e){const{uuid:t}=this.wire.me;if(!e.name||\"string\"!=typeof e.name)throw new Error(\"Please provide a name property as a string in order to create a View.\");return(0,i.handleDeprecatedWarnings)(e),this.wire.environment.childViews?await this.wire.environment.createChildContent({entityType:\"view\",options:{...e,uuid:t}}):await this.wire.sendAction(\"create-view\",{...e,uuid:t}),this.wrapSync({uuid:t,name:e.name})}async wrap(e){this.wire.sendAction(\"view-wrap\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}wrapSync(e){this.wire.sendAction(\"view-wrap-sync\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}getCurrent(){if(this.wire.sendAction(\"view-get-current\").catch((e=>{})),!this.wire.me.isView)throw new Error(\"You are not in a View context\");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction(\"view-get-current-sync\").catch((e=>{})),!this.wire.me.isView)throw new Error(\"You are not in a View context\");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return L.ViewModule=r,L}(),e),n(function(){if(U)return B;var e;U=1,Object.defineProperty(B,\"__esModule\",{value:!0}),B.View=void 0;const t=g,n=G,i=H,r=ie();class o extends i.WebContents{constructor(i,o){super(i,o,\"view\"),this.identity=o,e.set(this,new n.Lazy((()=>this.fin.Platform.wrapSync(this.identity).getClient()))),this.attach=async e=>{await this.wire.sendAction(\"attach-view\",{target:e,...this.identity})},this.destroy=async()=>{await this.wire.sendAction(\"destroy-view\",{...this.identity})},this.show=async()=>{await this.wire.sendAction(\"show-view\",{...this.identity})},this.showAt=async(e,t={})=>{await this.wire.sendAction(\"show-view-at\",{bounds:e,...this.identity,options:t})},this.bringToFront=async()=>{await this.wire.sendAction(\"bring-view-to-front\",{...this.identity})},this.hide=async()=>{await this.wire.sendAction(\"hide-view\",{...this.identity})},this.setBounds=async e=>{await this.wire.sendAction(\"set-view-bounds\",{bounds:e,...this.identity})},this.getBounds=async()=>(await this.wire.sendAction(\"get-view-bounds\",{...this.identity})).payload.data,this.getInfo=async()=>(await this.wire.sendAction(\"get-view-info\",{...this.identity})).payload.data,this.getParentLayout=async()=>(this.wire.sendAction(\"view-get-parent-layout\",{...this.identity}).catch((()=>{})),this.fin.Platform.Layout.getLayoutByViewIdentity(this.identity)),this.getOptions=async()=>this.wire.sendAction(\"get-view-options\",{...this.identity}).then((({payload:e})=>e.data)),this.updateOptions=async e=>this.wire.sendAction(\"update-view-options\",{options:e,...this.identity}).then((()=>{})),this.getCurrentWindow=async()=>{const{payload:{data:e}}=await this.wire.sendAction(\"get-view-window\",{...this.identity});return new r._Window(this.wire,e)},this.getCurrentStack=async()=>{this.wire.sendAction(\"view-get-current-stack\").catch((()=>{}));try{return(await this.getParentLayout()).getStackByViewIdentity(this.identity)}catch(e){throw new t.RuntimeError({reason:\"This view does not belong to a stack.\",error:e})}},this.triggerBeforeUnload=async()=>(await this.wire.sendAction(\"trigger-before-unload\",{...this.identity})).payload.data,this.bindToElement=async e=>{if(!e)throw new Error(\"Element not found.\");return this.wire.environment.observeBounds(e,(async e=>this.setBounds(e)))}}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){const t=await this.getCurrentWindow();await t.focusedWebViewWasChanged(),await super.focus({emitSynthFocused:e})}}return B.View=o,e=new WeakMap,B}(),e)}(k)),k}function Y(){if(z)return j;z=1,Object.defineProperty(j,\"__esModule\",{value:!0}),j.Application=void 0;const e=d,t=ie(),n=J();class i extends e.EmitterBase{constructor(e,n){super(e,\"application\",n.uuid),this.identity=n,this.window=new t._Window(this.wire,{uuid:this.identity.uuid,name:this.identity.uuid})}windowListFromIdentityList(e){const n=[];return e.forEach((e=>{n.push(new t._Window(this.wire,{uuid:e.uuid,name:e.name}))})),n}isRunning(){return this.wire.sendAction(\"is-application-running\",this.identity).then((({payload:e})=>e.data))}async quit(e=!1){try{await this._close(e),await this.wire.sendAction(\"destroy-application\",{force:e,...this.identity})}catch(e){if(![\"Remote connection has closed\",\"Could not locate the requested application\"].some((t=>e.message.includes(t))))throw e}}async _close(e=!1){try{await this.wire.sendAction(\"close-application\",{force:e,...this.identity})}catch(e){if(!e.message.includes(\"Remote connection has closed\"))throw e}}close(e=!1){return console.warn(\"Deprecation Warning: Application.close is deprecated Please use Application.quit\"),this.wire.sendAction(\"application-close\",this.identity).catch((e=>{})),this._close(e)}getChildWindows(){return this.wire.sendAction(\"get-child-windows\",this.identity).then((({payload:e})=>{const t=[];return e.data.forEach((e=>{t.push({uuid:this.identity.uuid,name:e})})),this.windowListFromIdentityList(t)}))}getManifest(){return this.wire.sendAction(\"get-application-manifest\",this.identity).then((({payload:e})=>e.data))}getParentUuid(){return this.wire.sendAction(\"get-parent-application\",this.identity).then((({payload:e})=>e.data))}getShortcuts(){return this.wire.sendAction(\"get-shortcuts\",this.identity).then((({payload:e})=>e.data))}async getViews(){const{payload:e}=await this.wire.sendAction(\"application-get-views\",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}getZoomLevel(){return this.wire.sendAction(\"get-application-zoom-level\",this.identity).then((({payload:e})=>e.data))}getWindow(){return this.wire.sendAction(\"application-get-window\",this.identity).catch((e=>{})),Promise.resolve(this.window)}registerUser(e,t){return this.wire.sendAction(\"register-user\",{userName:e,appName:t,...this.identity}).then((()=>{}))}removeTrayIcon(){return this.wire.sendAction(\"remove-tray-icon\",this.identity).then((()=>{}))}restart(){return this.wire.sendAction(\"restart-application\",this.identity).then((()=>{}))}run(){return console.warn(\"Deprecation Warning: Application.run is deprecated Please use fin.Application.start\"),this.wire.sendAction(\"application-run\",this.identity).catch((e=>{})),this._run()}_run(e={}){return this.wire.sendAction(\"run-application\",{manifestUrl:this._manifestUrl,opts:e,...this.identity}).then((()=>{}))}scheduleRestart(){return this.wire.sendAction(\"relaunch-on-close\",this.identity).then((()=>{}))}async sendApplicationLog(){const{payload:e}=await this.wire.sendAction(\"send-application-log\",this.identity);return e.data}async setJumpList(e){await this.wire.sendAction(\"set-jump-list\",{config:e,...this.identity})}setTrayIcon(e){return this.wire.sendAction(\"set-tray-icon\",{enabledIcon:e,...this.identity}).then((()=>{}))}setShortcuts(e){return this.wire.sendAction(\"set-shortcuts\",{data:e,...this.identity}).then((()=>{}))}async setShortcutQueryParams(e){await this.wire.sendAction(\"set-shortcut-query-args\",{data:e,...this.identity})}setZoomLevel(e){return this.wire.sendAction(\"set-application-zoom-level\",{level:e,...this.identity}).then((()=>{}))}async setAppLogUsername(e){await this.wire.sendAction(\"set-app-log-username\",{data:e,...this.identity})}getTrayIconInfo(){return this.wire.sendAction(\"get-tray-icon-info\",this.identity).then((({payload:e})=>e.data))}hasTrayIcon(){return this.wire.sendAction(\"has-tray-icon\",this.identity).then((({payload:e})=>e.data))}terminate(){return this.wire.sendAction(\"terminate-application\",this.identity).then((()=>{}))}wait(){return this.wire.sendAction(\"wait-for-hung-application\",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction(\"get-info\",this.identity).then((({payload:e})=>e.data))}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction(\"application-get-process-info\",this.identity);return e}async setFileDownloadLocation(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t};await this.wire.sendAction(\"set-file-download-location\",{...n,downloadLocation:e})}async getFileDownloadLocation(){const{payload:{data:e}}=await this.wire.sendAction(\"get-file-download-location\",this.identity);return e}async showTrayIconPopupMenu(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t},{payload:i}=await this.wire.sendAction(\"show-tray-icon-popup-menu\",{...n,options:e});return i.data}async closeTrayIconPopupMenu(){const{name:e}=this.wire.me,t={uuid:this.identity.uuid,name:e};await this.wire.sendAction(\"close-tray-icon-popup-menu\",{...t})}}return j.Application=i,j}function Z(){return q||(q=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(function(){if(K)return F;K=1,Object.defineProperty(F,\"__esModule\",{value:!0}),F.ApplicationModule=void 0;const e=d,t=O,n=Y();class i extends e.Base{async wrap(e){this.wire.sendAction(\"wrap-application\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}wrapSync(e){this.wire.sendAction(\"wrap-application-sync\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}async _create(e){return void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&void 0===e.isPlatformController&&(e.autoShow=!0),await this.wire.sendAction(\"create-application\",e),this.wrap({uuid:e.uuid})}create(e){return console.warn(\"Deprecation Warning: fin.Application.create is deprecated. Please use fin.Application.start\"),this.wire.sendAction(\"application-create\").catch((e=>{})),this._create(e)}async start(e){this.wire.sendAction(\"start-application\").catch((e=>{}));const t=await this._create(e);return await this.wire.sendAction(\"run-application\",{uuid:e.uuid}),t}async startManyManifests(e,t){return this.wire.sendAction(\"run-applications\",{applications:e,opts:t}).then((()=>{}))}getCurrent(){return this.wire.sendAction(\"get-current-application\").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction(\"get-current-application-sync\").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}async startFromManifest(e,t){this.wire.sendAction(\"application-start-from-manifest\").catch((e=>{}));const n=await this._createFromManifest(e);return await n._run(t),n}createFromManifest(e){return console.warn(\"Deprecation Warning: fin.Application.createFromManifest is deprecated. Please use fin.Application.startFromManifest\"),this.wire.sendAction(\"application-create-from-manifest\").catch((e=>{})),this._createFromManifest(e)}_createFromManifest(e){return this.wire.sendAction(\"get-application-manifest\",{manifestUrl:e}).then((({payload:e})=>{const t=e.data.platform?e.data.platform.uuid:e.data.startup_app.uuid;return this.wrap({uuid:t})})).then((t=>(t._manifestUrl=e,t)))}}return F.ApplicationModule=i,F}(),e),n(Y(),e)}(R)),R}H.WebContents=D;var Q={};Object.defineProperty(Q,\"__esModule\",{value:!0}),Q.promisifySubscription=void 0;var X,ee,te;function ne(){if(X)return S;X=1,Object.defineProperty(S,\"__esModule\",{value:!0}),S._Window=void 0;const e=Z(),t=H,n=J(),i=T,r=Q;class o extends t.WebContents{constructor(e,t){super(e,t,\"window\")}async createWindow(e){this.wire.sendAction(\"window-create-window\",this.identity).catch((e=>{}));const t=await(0,r.promisifySubscription)(this,\"fire-constructor-callback\");void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&(e.autoShow=!0),(0,i.handleDeprecatedWarnings)(e);const n=this.wire.environment.createChildContent({entityType:\"window\",options:e}),[o]=await Promise.all([t.getValue(),n]);let s;const{success:a}=o,c=o.data,{message:d}=c;s=a?{httpResponseCode:c.httpResponseCode,apiInjected:c.apiInjected}:{message:c.message,networkErrorCode:c.networkErrorCode,stack:c.stack};const h={message:d,cbPayload:s,success:a};try{this.getWebWindow().fin.__internal_.openerSuccessCBCalled()}catch(e){}return h.success?this:Promise.reject(h)}getAllFrames(){return this.wire.sendAction(\"get-all-frames\",this.identity).then((({payload:e})=>e.data))}getBounds(){return this.wire.sendAction(\"get-window-bounds\",this.identity).then((({payload:e})=>e.data))}center(){return this.wire.sendAction(\"center-window\",this.identity).then((()=>{}))}blur(){return this.wire.sendAction(\"blur-window\",this.identity).then((()=>{}))}bringToFront(){return this.wire.sendAction(\"bring-window-to-front\",this.identity).then((()=>{}))}animate(e,t){return this.wire.sendAction(\"animate-window\",{transitions:e,options:t,...this.identity}).then((()=>{}))}hide(){return this.wire.sendAction(\"hide-window\",this.identity).then((()=>{}))}close(e=!1){return this.wire.sendAction(\"close-window\",{force:e,...this.identity}).then((()=>{Object.setPrototypeOf(this,null)}))}focusedWebViewWasChanged(){return this.wire.sendAction(\"focused-webview-changed\",this.identity).then((()=>{}))}getNativeId(){return this.wire.sendAction(\"get-window-native-id\",this.identity).then((({payload:e})=>e.data))}async getCurrentViews(){const{payload:e}=await this.wire.sendAction(\"window-get-views\",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}disableFrame(){return console.warn(\"Function is deprecated; use disableUserMovement instead.\"),this.wire.sendAction(\"disable-window-frame\",this.identity).then((()=>{}))}disableUserMovement(){return this.wire.sendAction(\"disable-window-frame\",this.identity).then((()=>{}))}enableFrame(){return console.warn(\"Function is deprecated; use enableUserMovement instead.\"),this.wire.sendAction(\"enable-window-frame\",this.identity).then((()=>{}))}enableUserMovement(){return this.wire.sendAction(\"enable-window-frame\",this.identity).then((()=>{}))}flash(){return this.wire.sendAction(\"flash-window\",this.identity).then((()=>{}))}stopFlashing(){return this.wire.sendAction(\"stop-flash-window\",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction(\"get-window-info\",this.identity).then((({payload:e})=>e.data))}async getLayout(e){this.wire.sendAction(\"window-get-layout\",this.identity).catch((e=>{}));const t=await this.getOptions();if(!t.layout&&!t.layoutSnapshot)throw new Error(\"Window does not have a Layout\");return this.fin.Platform.Layout.wrap(e??this.identity)}getOptions(){return this.wire.sendAction(\"get-window-options\",this.identity).then((({payload:e})=>e.data))}getParentApplication(){return this.wire.sendAction(\"window-get-parent-application\",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity))}getParentWindow(){return this.wire.sendAction(\"window-get-parent-window\",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity)).then((e=>e.getWindow()))}async getSnapshot(e){const t={area:e,...this.identity};console.warn(\"Window.getSnapshot has been deprecated, please use Window.capturePage\");return(await this.wire.sendAction(\"get-window-snapshot\",t)).payload.data}getState(){return this.wire.sendAction(\"get-window-state\",this.identity).then((({payload:e})=>e.data))}getWebWindow(){return this.wire.sendAction(\"window-get-web-window\",this.identity).catch((e=>{})),this.wire.environment.getWebWindow(this.identity)}isMainWindow(){return this.wire.sendAction(\"window-is-main-window\",this.identity).catch((e=>{})),this.me.uuid===this.me.name}isShowing(){return this.wire.sendAction(\"is-window-showing\",this.identity).then((({payload:e})=>e.data))}maximize(){return this.wire.sendAction(\"maximize-window\",this.identity).then((()=>{}))}minimize(){return this.wire.sendAction(\"minimize-window\",this.identity).then((()=>{}))}moveBy(e,t,n){return this.wire.sendAction(\"move-window-by\",{deltaLeft:e,deltaTop:t,positioningOptions:n,...this.identity}).then((()=>{}))}moveTo(e,t,n){return this.wire.sendAction(\"move-window\",{left:e,top:t,positioningOptions:n,...this.identity}).then((()=>{}))}resizeBy(e,t,n,i){return this.wire.sendAction(\"resize-window-by\",{deltaWidth:Math.floor(e),deltaHeight:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}resizeTo(e,t,n,i){return this.wire.sendAction(\"resize-window\",{width:Math.floor(e),height:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}restore(){return this.wire.sendAction(\"restore-window\",this.identity).then((()=>{}))}setAsForeground(){return this.wire.sendAction(\"set-foreground-window\",this.identity).then((()=>{}))}setBounds(e,t){return this.wire.sendAction(\"set-window-bounds\",{...e,...this.identity,positioningOptions:t}).then((()=>{}))}show(e=!1){return this.wire.sendAction(\"show-window\",{force:e,...this.identity}).then((()=>{}))}showAt(e,t,n=!1){return this.wire.sendAction(\"show-at-window\",{force:n,left:Math.floor(e),top:Math.floor(t),...this.identity}).then((()=>{}))}updateOptions(e){return this.wire.sendAction(\"update-window-options\",{options:e,...this.identity}).then((()=>{}))}authenticate(e,t){return this.wire.sendAction(\"window-authenticate\",{userName:e,password:t,...this.identity}).then((()=>{}))}async showPopupMenu(e){const{payload:t}=await this.wire.sendAction(\"show-popup-menu\",{options:e,...this.identity});return t.data}async closePopupMenu(){return this.wire.sendAction(\"close-popup-menu\",{...this.identity}).then((()=>{}))}async dispatchPopupResult(e){this.wire.sendAction(\"window-dispatch-popup-result\",this.identity).catch((e=>{})),await this.wire.sendAction(\"dispatch-popup-result\",{data:e,...this.identity})}async print(e={content:\"self\"}){switch(e.content){case void 0:case\"self\":return super.print(e);case\"screenshot\":return this.wire.sendAction(\"print-screenshot\",this.identity).then((()=>{}));case\"views\":return this.wire.sendAction(\"print-views\",{...this.identity,options:e}).then((()=>{}));default:return}}}return S._Window=o,S}function ie(){return te||(te=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(function(){if(ee)return _;ee=1,Object.defineProperty(_,\"__esModule\",{value:!0}),_._WindowModule=void 0;const e=d,t=O,n=ne();class i extends e.Base{async wrap(e){this.wire.sendAction(\"window-wrap\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}wrapSync(e){this.wire.sendAction(\"window-wrap-sync\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}create(e){return this.wire.sendAction(\"create-window\").catch((e=>{})),new n._Window(this.wire,{uuid:this.me.uuid,name:e.name}).createWindow(e)}getCurrent(){if(this.wire.sendAction(\"get-current-window\").catch((e=>{})),!this.wire.me.isWindow)throw new Error(\"You are not in a Window context\");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction(\"get-current-window-sync\").catch((e=>{})),!this.wire.me.isWindow)throw new Error(\"You are not in a Window context\");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return _._WindowModule=i,_}(),e),n(ne(),e)}(M)),M}Q.promisifySubscription=async(e,t,n=(()=>!0),i)=>{let r,o,s;const a=new Promise(((e,t)=>{r=e,o=t})),c=e=>{n(e)&&(clearTimeout(s),r(e))};return await e.on(t,c),i&&(s=setTimeout((()=>o(new Error(\"event timed out\"))),i)),a.finally((()=>{e.removeListener(t,c).catch((()=>null))})),{getValue:()=>a}},Object.defineProperty(c,\"__esModule\",{value:!0}),c.System=void 0;const re=d,oe=g,se=ie(),ae=t;class ce extends re.EmitterBase{constructor(e){super(e,\"system\")}sendExternalProcessRequest(e,t){return new Promise(((n,i)=>{const r=\"external-process-exited\";let o,s,a,c;\"function\"==typeof t.listener&&(a=e=>{const n=e||{};s={topic:\"exited\",uuid:n.processUuid||\"\",exitCode:n.exitCode||0},o===e.processUuid&&(t.listener(s),c.removeListener(r,a))},this.wire.me.name||(this.wire.me.name=this.wire.me.uuid),c=new se._Window(this.wire,this.wire.me),c.on(r,a)),this.wire.sendAction(e,t).then((({payload:e})=>{o=e.data.uuid,n(e.data),s&&o===s.uuid&&(t.listener(s),c.removeListener(r,a))})).catch((e=>{c&&c.removeListener(r,a),i(e)}))}))}getVersion(){return this.wire.sendAction(\"get-version\").then((({payload:e})=>e.data))}clearCache(e){return this.wire.sendAction(\"clear-cache\",e).then((()=>{}))}deleteCacheOnExit(){return this.wire.sendAction(\"delete-cache-request\").then((()=>{}))}exit(){return this.wire.sendAction(\"exit-desktop\").then((()=>{}))}async fetchManifest(e){const{payload:{data:t}}=await this.wire.sendAction(\"fetch-manifest\",{manifestUrl:e});return t}flushCookieStore(){return this.wire.sendAction(\"flush-cookie-store\").then((()=>{}))}getAllWindows(){return this.wire.sendAction(\"get-all-windows\").then((({payload:e})=>e.data))}getAllApplications(){return this.wire.sendAction(\"get-all-applications\").then((({payload:e})=>e.data))}getCommandLineArguments(){return this.wire.sendAction(\"get-command-line-arguments\").then((({payload:e})=>e.data))}async getCrashReporterState(){const{payload:{data:{diagnosticMode:e,isRunning:t}}}=await this.wire.sendAction(\"get-crash-reporter-state\");return console.warn(\"diagnosticMode property is deprecated. It will be removed in a future version\"),{diagnosticMode:e,diagnosticsMode:e,isRunning:t}}async startCrashReporter(e){const t=e,n={...t,diagnosticMode:t.diagnosticsMode||t.diagnosticMode},{payload:{data:{diagnosticMode:i,isRunning:r}}}=await this.wire.sendAction(\"start-crash-reporter\",n);return{diagnosticMode:i,diagnosticsMode:i,isRunning:r}}getUniqueUserId(){return this.wire.sendAction(\"get-unique-user-id\").then((({payload:e})=>e.data))}getEntityInfo(e,t){return this.wire.sendAction(\"get-entity-info\",{uuid:e,name:t}).then((({payload:e})=>e.data))}getEnvironmentVariable(e){return this.wire.sendAction(\"get-environment-variable\",{environmentVariables:e}).then((({payload:e})=>e.data))}getFocusedWindow(){return this.wire.sendAction(\"get-focused-window\").then((({payload:e})=>e.data))}async isAppCertified(e){const{payload:{data:{certifiedInfo:t}}}=await this.wire.sendAction(\"is-app-certified\",{manifestUrl:e});return t}getInstalledRuntimes(){return this.wire.sendAction(\"get-installed-runtimes\").then((({payload:e})=>e.data.runtimes))}async getInstalledApps(){const{payload:{data:{installedApps:e}}}=await this.wire.sendAction(\"get-installed-apps\");return e}getLog(e){return this.wire.sendAction(\"view-log\",e).then((({payload:e})=>e.data))}getMachineId(){return this.wire.sendAction(\"get-machine-id\").then((({payload:e})=>e.data))}getMinLogLevel(){return this.wire.sendAction(\"get-min-log-level\").then((({payload:e})=>e.data))}getLogList(){return this.wire.sendAction(\"list-logs\").then((({payload:e})=>e.data))}getMonitorInfo(){return this.wire.sendAction(\"get-monitor-info\").then((({payload:e})=>e.data))}getMousePosition(){return this.wire.sendAction(\"get-mouse-position\").then((({payload:e})=>e.data))}getProcessList(){return console.warn(\"System.getProcessList has been deprecated. Please consider using our new process APIs: Window.getProcessInfo, View.getProcessInfo, Application.getProcessInfo, System.getAllProcessInfo\"),this.wire.sendAction(\"process-snapshot\").then((({payload:e})=>e.data))}async getAllProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction(\"get-all-process-info\",this.identity);return e}getProxySettings(){return this.wire.sendAction(\"get-proxy-settings\").then((({payload:e})=>e.data))}getRuntimeInfo(){return this.wire.sendAction(\"get-runtime-info\").then((({payload:e})=>e.data))}getRvmInfo(){return this.wire.sendAction(\"get-rvm-info\").then((({payload:e})=>e.data))}getHostSpecs(){return this.wire.sendAction(\"get-host-specs\").then((({payload:e})=>e.data))}getOSInfo(){return this.wire.sendAction(\"get-os-info\").then((({payload:e})=>e.data))}launchExternalProcess(e){return this.sendExternalProcessRequest(\"launch-external-process\",e)}monitorExternalProcess(e){return this.sendExternalProcessRequest(\"monitor-external-process\",e)}log(e,t){return this.wire.sendAction(\"write-to-log\",{level:e,message:t}).then((()=>{}))}openUrlWithBrowser(e){return this.wire.sendAction(\"open-url-with-browser\",{url:e}).then((()=>{}))}async registerCustomProtocol(e){if(\"object\"!=typeof e)throw new Error(\"Must provide an object with a `protocolName` property having a string value.\");await this.wire.sendAction(\"register-custom-protocol\",e)}async unregisterCustomProtocol(e){await this.wire.sendAction(\"unregister-custom-protocol\",{protocolName:e})}async getCustomProtocolState(e){return this.wire.sendAction(\"get-custom-protocol-state\",{protocolName:e}).then((({payload:e})=>e.data))}releaseExternalProcess(e){return this.wire.sendAction(\"release-external-process\",{uuid:e}).then((()=>{}))}showDeveloperTools(e){return this.wire.sendAction(\"show-developer-tools\",e).then((()=>{}))}terminateExternalProcess(e){return this.wire.sendAction(\"terminate-external-process\",e).then((()=>{}))}updateProxySettings(e){return this.wire.sendAction(\"update-proxy\",e).then((()=>{}))}async downloadAsset(e,t){const n=()=>{};let i=n,r=n;const o=new Promise(((e,t)=>{i=e,r=t}));if(\"openfin\"!==this.wire.environment.type)throw new oe.NotSupportedError(\"downloadAsset only supported in an OpenFin Render process\");const s=oe.RuntimeError.getCallSite(),a=this.wire.environment.getNextMessageId().toString(),c=`asset-download-progress-${a}`,d=`asset-download-error-${a}`,h=`asset-download-complete-${a}`,l=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},u=()=>{this.removeListener(c,l)};await Promise.all([this.on(c,l),this.once(d,(e=>{u();const{reason:t,err:n}=e;r(new oe.RuntimeError({reason:t,error:n},s))})),this.once(h,(()=>{u(),i()}))]);const p=Object.assign(e,{downloadId:a});return await this.wire.sendAction(\"download-asset\",p).catch((e=>{throw u(),e})),o}downloadRuntime(e,t){const n=oe.RuntimeError.getCallSite();return new Promise(((i,r)=>{if(\"openfin\"!==this.wire.environment.type)return void r(new oe.NotSupportedError(\"downloadRuntime only supported in an OpenFin Render process\"));const o=this.wire.environment.getNextMessageId().toString(),s=`runtime-download-progress-${o}`,a=`runtime-download-error-${o}`,c=`runtime-download-complete-${o}`,d=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},h=()=>{this.removeListener(s,d)};this.on(s,d),this.once(a,(e=>{h();const{reason:t,err:i}=e;r(new oe.RuntimeError({reason:t,error:i},n))})),this.once(c,(()=>{h(),i()}));const l=Object.assign(e,{downloadId:o});this.wire.sendAction(\"download-runtime\",l).catch((e=>{h(),r(e)}))}))}downloadPreloadScripts(e){return this.wire.sendAction(\"download-preload-scripts\",{scripts:e}).then((({payload:e})=>e.data))}getAllExternalApplications(){return this.wire.sendAction(\"get-all-external-applications\").then((({payload:e})=>e.data))}getAppAssetInfo(e){return this.wire.sendAction(\"get-app-asset-info\",e).then((({payload:e})=>e.data))}getCookies(e){const t=this.wire.environment.getUrl(),n=Object.assign(e,{url:t});return this.wire.sendAction(\"get-cookies\",n).then((({payload:e})=>e.data))}setMinLogLevel(e){return this.wire.sendAction(\"set-min-log-level\",{level:e}).then((()=>{}))}resolveUuid(e){return this.wire.sendAction(\"resolve-uuid\",{entityKey:e}).then((({payload:e})=>e.data))}executeOnRemote(e,t){return t.requestingIdentity=e,this.wire.ferryAction(t)}readRegistryValue(e,t,n){return this.wire.sendAction(\"read-registry-value\",{rootKey:e,subkey:t,value:n}).then((({payload:e})=>e.data))}registerExternalConnection(e){return this.wire.sendAction(\"register-external-connection\",{uuid:e}).then((({payload:e})=>e.data))}async getServiceConfiguration(e){if(\"string\"!=typeof e.name)throw new Error(\"Must provide an object with a `name` property having a string value\");const{name:t}=e;return this.wire.sendAction(\"get-service-configuration\",{name:t}).then((({payload:e})=>e.data))}async getSystemAppConfig(e){if(\"string\"!=typeof e)throw new Error(\"Must provide a string value for name of system app\");return this.wire.sendAction(\"get-system-app-configuration\",{name:e}).then((({payload:e})=>e.data))}async registerShutdownHandler(e){this.wire.sendAction(\"system-register-shutdown-handler\").catch((e=>{}));const{uuid:t,name:n}=this.wire.me;this.on(\"system-shutdown\",(i=>{e({proceed:()=>{this.wire.environment.raiseEvent(\"application/system-shutdown-handled\",{uuid:t,name:n,topic:\"application\"})}})}))}runRvmHealthCheck(){return this.wire.sendAction(\"run-rvm-health-check\").then((({payload:e})=>e.data))}async launchManifest(e,t={}){const{subscribe:n,...i}=t,r=i;if(n){const e=new ae.EventEmitter;n(e);const t=\"app-version-progress\",i=\"runtime-status\",o=\"app-version-complete\",s=\"app-version-error\",a=this.wire.environment.getNextMessageId().toString();r.appVersionId=a;const c=[o,t,i,s],d=e=>{const{appVersionId:t,topic:n,type:i,...r}=e;return{...r,type:c.find((e=>i.includes(e)))}},h=t=>{const n=d(t);e.emit(n.type,n)},l=()=>{this.removeListener(`${t}.${a}`,h),this.removeListener(`${i}.${a}`,h),this.removeListener(`${o}.${a}`,h),this.removeListener(`${s}.${a}`,h),this.removeListener(`${o}.${a}`,l),this.removeListener(`${s}.${a}`,l)};await Promise.all([this.on(`${t}.${a}`,h),this.on(`${i}.${a}`,h),this.once(`${o}.${a}`,h),this.once(`${s}.${a}`,h),this.once(`${o}.${a}`,l),this.once(`${s}.${a}`,l)])}return(await this.wire.sendAction(\"launch-manifest\",{manifestUrl:e,opts:r})).payload.data.manifest}async queryPermissionForCurrentContext(e){const t={uuid:this.wire.me.uuid,name:this.wire.me.name};return(await this.wire.sendAction(\"query-permission-for-current-context\",{apiName:e,identity:t})).payload.data}async enableNativeWindowIntegrationProvider(e){const{payload:t}=await this.wire.sendAction(\"enable-native-window-integration-provider\",{permissions:e});return t.data}async registerUsage({data:e,type:t}){await this.wire.sendAction(\"register-usage\",{data:e,type:t})}async getPrinters(){const{payload:e}=await this.wire.sendAction(\"system-get-printers\");return e.data}async updateProcessLoggingOptions(e){await this.wire.sendAction(\"system-update-process-logging-options\",{options:e})}async getDomainSettings(){const{payload:{data:e}}=await this.wire.sendAction(\"get-domain-settings\",this.identity);return e}async setDomainSettings(e){await this.wire.sendAction(\"set-domain-settings\",{domainSettings:e,...this.identity})}async refreshExtensions(){const{payload:e}=await this.wire.sendAction(\"refresh-extensions\");return e.data}async getInstalledExtensions(){const{payload:e}=await this.wire.sendAction(\"get-installed-extensions\");return e.data}}c.System=ce;var de={},he={};Object.defineProperty(he,\"__esModule\",{value:!0}),he.RefCounter=void 0;he.RefCounter=class{constructor(){this.topicRefMap=new Map}incRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t+1;n=i,this.topicRefMap.set(e,i)}else this.topicRefMap.set(e,1),n=1;return n}decRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t-1;this.topicRefMap.set(e,i),n=i}else n=-1;return n}actOnFirst(e,t,n){return 1===this.incRefCount(e)?t():n()}actOnLast(e,t,n){return 0===this.decRefCount(e)?t():n()}};var le={},ue={},pe={};Object.defineProperty(pe,\"__esModule\",{value:!0}),pe.ChannelBase=pe.ProtectedItems=void 0;const we=e=>async(t,n,i)=>{const r=await e(t,n,i);return void 0===r?n:r};pe.ProtectedItems=class{constructor(e,t){this.providerIdentity=e,this.close=t}};class ye{static defaultAction(e){throw new Error(`No action registered at target for ${e}`)}constructor(){this.subscriptions=new Map}async processAction(e,t,n){try{const i=this.subscriptions.has(e)?this.subscriptions.get(e):(t,n)=>(this.defaultAction??ye.defaultAction)(e,t,n),r=this.preAction?await this.preAction(e,t,n):t,o=await i(r,n);return this.postAction?await this.postAction(e,o,n):o}catch(t){if(this.errorMiddleware)return this.errorMiddleware(e,t,n);throw t}}beforeAction(e){if(this.preAction)throw new Error(\"Already registered beforeAction middleware\");this.preAction=we(e)}onError(e){if(this.errorMiddleware)throw new Error(\"Already registered error middleware\");this.errorMiddleware=e}afterAction(e){if(this.postAction)throw new Error(\"Already registered afterAction middleware\");this.postAction=we(e)}remove(e){this.subscriptions.delete(e)}setDefaultAction(e){if(this.defaultAction)throw new Error(\"default action can only be set once\");this.defaultAction=e}register(e,t){if(this.subscriptions.has(e))throw new Error(`Subscription already registered for action: ${e}. Unsubscribe before adding new subscription`);return this.subscriptions.set(e,t),!0}}pe.ChannelBase=ye;var fe,ge,me,ve=s&&s.__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)},Ce=s&&s.__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};Object.defineProperty(ue,\"__esModule\",{value:!0}),ue.ChannelClient=void 0;const be=pe,Ie=new Map;class Ee extends be.ChannelBase{static closeChannelByEndpointId(e){const t=Ie.get(e);t&&ve(t,me,\"f\").call(t)}static handleProviderDisconnect(e){for(const t of Ie.values())t.providerIdentity.channelId===e.channelId&&(t.disconnectListener(e),ve(t,me,\"f\").call(t))}constructor(e,t,n){super(),fe.set(this,void 0),ge.set(this,void 0),this.processAction=(e,t,n)=>super.processAction(e,t,n),me.set(this,(()=>{Ie.delete(this.endpointId),ve(this,ge,\"f\").close()})),Ce(this,fe,new be.ProtectedItems(e,t),\"f\"),this.disconnectListener=()=>{},this.endpointId=e.endpointId,Ce(this,ge,n,\"f\"),Ie.set(this.endpointId,this),n.receive(this.processAction)}get providerIdentity(){return ve(this,fe,\"f\").providerIdentity}async dispatch(e,t){if(ve(this,ge,\"f\").isEndpointConnected(this.providerIdentity.channelId))return ve(this,ge,\"f\").send(this.providerIdentity.channelId,e,t);throw new Error(\"The client you are trying to dispatch from is disconnected from the target provider.\")}onDisconnection(e){this.disconnectListener=t=>{try{e(t)}catch(e){throw new Error(`Error while calling the onDisconnection callback: ${e.message}`)}finally{this.disconnectListener=()=>{}}}}async disconnect(){await this.sendDisconnectAction(),ve(this,me,\"f\").call(this)}async sendDisconnectAction(){const e=ve(this,fe,\"f\");await e.close()}static async wireClose(e,t,n){const{channelName:i,uuid:r,name:o}=t;await e.sendAction(\"disconnect-from-channel\",{channelName:i,uuid:r,name:o,endpointId:n})}}ue.ChannelClient=Ee,fe=new WeakMap,ge=new WeakMap,me=new WeakMap;var xe={},Ae={};Object.defineProperty(Ae,\"__esModule\",{value:!0}),Ae.exhaustiveCheck=void 0,Ae.exhaustiveCheck=function(e,t){throw new Error(`Unsupported value: ${e}${t?`\\n Supported values are: ${t.join(\"\")}`:\"\"}`)};var Pe,Me,_e,Oe={},Se=s&&s.__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},Re=s&&s.__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)};Object.defineProperty(Oe,\"__esModule\",{value:!0}),Oe.ClassicInfo=Oe.ClassicStrategy=void 0;Oe.ClassicStrategy=class{constructor(e,t,n,i){this.messageReceiver=t,this.endpointId=n,this.providerIdentity=i,Pe.set(this,void 0),Me.set(this,new Map),_e.set(this,new Map),this.send=async(e,t,n)=>{const i=Re(this,Me,\"f\").get(e);if(!i)throw new Error(`Could not locate routing info for endpoint ${e}`);const r={...i};r.isLocalEndpointId&&delete r.endpointId,delete r.isLocalEndpointId;const o=Re(this,Pe,\"f\").sendAction(\"send-channel-message\",{...r,providerIdentity:this.providerIdentity,action:t,payload:n});Re(this,_e,\"f\").get(e)?.add(o);return(await o.catch((e=>{throw new Error(e.message)})).finally((()=>{Re(this,_e,\"f\").get(e)?.delete(o)}))).payload.data.result},this.close=async()=>{this.messageReceiver.removeEndpoint(this.providerIdentity.channelId,this.endpointId),[...Re(this,Me,\"f\").keys()].forEach((e=>this.closeEndpoint(e))),Se(this,Me,new Map,\"f\")},Se(this,Pe,e,\"f\")}onEndpointDisconnect(e,t){}receive(e){this.messageReceiver.addEndpoint(e,this.providerIdentity.channelId,this.endpointId)}async closeEndpoint(e){const t=Re(this,Me,\"f\").get(e);Re(this,Me,\"f\").delete(e);const n=Re(this,_e,\"f\").get(e);n?.forEach((n=>{const i=`Channel connection with identity uuid: ${t?.uuid} / name: ${t?.name} / endpointId: ${e} no longer connected.`;n.cancel(new Error(i))}))}isEndpointConnected(e){return Re(this,Me,\"f\").has(e)}addEndpoint(e,t){Re(this,Me,\"f\").set(e,t.endpointIdentity),Re(this,_e,\"f\").set(e,new Set)}isValidEndpointPayload(e){return\"string\"==typeof e?.endpointIdentity?.endpointId||\"string\"==typeof e?.endpointIdentity?.channelId}},Pe=new WeakMap,Me=new WeakMap,_e=new WeakMap,Oe.ClassicInfo={version:5,minimumVersion:0,type:\"classic\"};var Fe={},je={},ke={};Object.defineProperty(ke,\"__esModule\",{value:!0}),ke.errorToPOJO=void 0,ke.errorToPOJO=function(e){return{stack:e.stack,name:e.name,message:e.message,toString:()=>e.stack||e.toString()}};var Le,Te,$e=s&&s.__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)},Be=s&&s.__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};Object.defineProperty(je,\"__esModule\",{value:!0}),je.RTCEndpoint=void 0;const Ge=ke;je.RTCEndpoint=class{static isValidEndpointPayload(e){const t=e=>\"object\"==typeof e&&null!==e;return t(e)&&t(e.endpointIdentity)&&t(e.rtc)&&\"string\"==typeof e.endpointIdentity.endpointId}constructor({rtc:e,endpointIdentity:t}){this.responseMap=new Map,Le.set(this,null),Te.set(this,void 0),this.connectionStateChangeHandler=e=>{\"connected\"!==this.rtc.rtcClient.connectionState&&(this.rtc.rtcClient.removeEventListener(\"connectionstatechange\",this.connectionStateChangeHandler),this.close(),$e(this,Te,\"f\")&&$e(this,Te,\"f\").call(this))},this.send=async(e,t)=>{const n=`message-${Math.random()}`,i=new Promise(((e,t)=>{this.responseMap.set(n,{resolve:e,reject:t})}));return this.rtc.channels.request.send(JSON.stringify({action:e,payload:t,messageId:n})),i},this.close=()=>{this.responseMap.forEach((e=>e.reject(\"Connection has closed.\"))),this.responseMap=new Map,this.rtc.channels.request.close(),this.rtc.channels.response.close(),this.rtc.rtcClient.close()},this.rtc=e,this.endpointIdentity=t,this.rtc.channels.response.addEventListener(\"message\",(e=>{let{data:t}=e;e.data instanceof ArrayBuffer&&(t=(new TextDecoder).decode(e.data));const{messageId:n,payload:i,success:r,error:o}=JSON.parse(t),{resolve:s,reject:a}=this.responseMap.get(n)??{};s&&a?(this.responseMap.delete(n),r?s(i):a(o)):(console.log(\"Could not find id in responseMap.\"),console.log(e))})),this.rtc.channels.request.addEventListener(\"message\",(async e=>{let{data:n}=e;e.data instanceof ArrayBuffer&&(n=(new TextDecoder).decode(e.data));const{messageId:i,action:r,payload:o}=JSON.parse(n);if($e(this,Le,\"f\"))try{const e=await $e(this,Le,\"f\").call(this,r,o,t);this.rtc.channels.response.send(JSON.stringify({messageId:i,payload:e,success:!0}))}catch(e){\"open\"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,error:(0,Ge.errorToPOJO)(e),success:!1}))}else\"open\"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,success:!1,error:\"Connection not ready.\"}))})),this.rtc.rtcClient.addEventListener(\"connectionstatechange\",this.connectionStateChangeHandler),Object.values(this.rtc.channels).forEach((e=>{e.onclose=e=>{[...this.responseMap.values()].forEach((e=>e.reject(new Error(\"RTCDataChannel closed unexpectedly, this is most commonly caused by message size. Note: RTC Channels have a message size limit of ~255kB.\")))),this.close(),$e(this,Te,\"f\")&&$e(this,Te,\"f\").call(this)}}))}onDisconnect(e){if($e(this,Te,\"f\"))throw new Error(\"RTCEndpoint disconnectListener cannot be set twice.\");Be(this,Te,e,\"f\")}receive(e){if($e(this,Le,\"f\"))throw new Error(\"You have already set a listener for this RTC Endpoint.\");Be(this,Le,e,\"f\")}get connected(){return\"connected\"===this.rtc.rtcClient.connectionState}},Le=new WeakMap,Te=new WeakMap;var We,He,Ne,De={},Ue=s&&s.__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)},Ve=s&&s.__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};Object.defineProperty(De,\"__esModule\",{value:!0}),De.EndpointStrategy=void 0;De.EndpointStrategy=class{constructor(e,t,n){this.EndpointType=e,this.StrategyName=n,We.set(this,null),He.set(this,new Map),Ne.set(this,!0),this.send=async(e,t,n)=>this.getEndpointById(e).send(t,n),this.close=async()=>{Ue(this,Ne,\"f\")&&(Ue(this,He,\"f\").forEach((e=>e.close())),Ve(this,He,new Map,\"f\")),Ve(this,Ne,!1,\"f\")},this.isValidEndpointPayload=t}onEndpointDisconnect(e,t){this.getEndpointById(e).onDisconnect(t)}receive(e){if(Ue(this,We,\"f\"))throw new Error(`You have already set a listener for this ${this.StrategyName} Strategy`);Ve(this,We,e,\"f\"),Ue(this,He,\"f\").forEach((e=>e.receive(Ue(this,We,\"f\"))))}getEndpointById(e){const t=Ue(this,He,\"f\").get(e);if(!t)throw new Error(`Client with endpoint id ${e} is not connected`);return t}get connected(){return Ue(this,Ne,\"f\")}isEndpointConnected(e){return Ue(this,He,\"f\").has(e)}addEndpoint(e,t){if(!Ue(this,Ne,\"f\"))return void console.warn(`Adding endpoint to disconnected ${this.StrategyName} Strategy`);const n=new this.EndpointType(t);Ue(this,We,\"f\")&&n.receive(Ue(this,We,\"f\")),Ue(this,He,\"f\").set(e,n)}async closeEndpoint(e){Ue(this,He,\"f\").delete(e)}},We=new WeakMap,He=new WeakMap,Ne=new WeakMap,Object.defineProperty(Fe,\"__esModule\",{value:!0}),Fe.RTCInfo=Fe.RTCStrategy=void 0;const ze=je,Ke=De;class qe extends Ke.EndpointStrategy{constructor(){super(ze.RTCEndpoint,ze.RTCEndpoint.isValidEndpointPayload,\"RTC\")}}Fe.RTCStrategy=qe,Fe.RTCInfo={version:2,minimumVersion:0,type:\"rtc\"};var Je={};Object.defineProperty(Je,\"__esModule\",{value:!0}),Je.RTCICEManager=void 0;const Ye=d;class Ze extends Ye.EmitterBase{constructor(e){super(e,\"channel\"),this.ensureChannelOpened=e=>new Promise(((t,n)=>{if(\"open\"===e.readyState)t();else if(\"connecting\"===e.readyState){const n=()=>{e.removeEventListener(\"open\",n),t()};e.addEventListener(\"open\",n)}else n(new Error(\"This Channel has already closed\"))}))}static createDataChannelPromise(e,t){let n;const i=new Promise((e=>{n=e})),r=i=>{const o=()=>{i.channel.removeEventListener(\"open\",o),n(i.channel)};i.channel.label===e&&(i.channel.addEventListener(\"open\",o),t.removeEventListener(\"datachannel\",r))};return t.addEventListener(\"datachannel\",r),i}async listenForProviderIce(e,t){await this.on(this.createProviderEventName(e),t,{timestamp:Date.now()})}async raiseProviderIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createProviderEventName(e)),t)}async listenForClientIce(e,t){await this.on(this.createClientEventName(e),t,{timestamp:Date.now()})}async raiseClientIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createClientEventName(e)),t)}cleanupIceListeners(e){this.removeAllListeners(this.createClientEventName(e)),this.removeAllListeners(this.createProviderEventName(e))}createClientEventName(e){return`ice-client-${e}`}createProviderEventName(e){return`ice-provider-${e}`}createRouteString(e){return`channel/${e}`}createRtcPeer(){return this.wire.environment.getRtcPeer()}async startClientOffer(){const e=Math.random().toString(),t=this.createRtcPeer();t.addEventListener(\"icecandidate\",(async t=>{t.candidate&&await this.raiseClientIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForProviderIce(e,(async e=>{await t.addIceCandidate(e.candidate)}));const n={request:t.createDataChannel(\"request\"),response:t.createDataChannel(\"response\")},i=await t.createOffer();await t.setLocalDescription(i);const r=Promise.all([n.request,n.response].map(this.ensureChannelOpened)).then((()=>{}));return{rtcClient:t,channels:n,offer:i,rtcConnectionId:e,channelsOpened:r}}async finishClientOffer(e,t,n){return await e.setRemoteDescription(t),await n,!0}async createProviderAnswer(e,t){const n=this.createRtcPeer(),i=Ze.createDataChannelPromise(\"request\",n),r=Ze.createDataChannelPromise(\"response\",n);n.addEventListener(\"icecandidate\",(async t=>{t.candidate&&await this.raiseProviderIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForClientIce(e,(async e=>{await n.addIceCandidate(e.candidate)})),await n.setRemoteDescription(t);const o=await n.createAnswer();await n.setLocalDescription(o);const s=Promise.all([i,r]).then((([t,n])=>(this.cleanupIceListeners(e),{request:t,response:n})));return{rtcClient:n,answer:o,channels:s}}}Je.RTCICEManager=Ze;var Qe={},Xe={};function et(e){return[...e.split(\".\").reverse().entries()].reduce(((e,[t,n])=>e+ +n*1e4**t),0)}function tt(e,t){return et(e)>=et(t)}function nt(e){return e.split(\"/\")[0]}Object.defineProperty(Xe,\"__esModule\",{value:!0}),Xe.runtimeUuidMeetsMinimumRuntimeVersion=Xe.parseRuntimeUuid=Xe.meetsMinimumRuntimeVersion=void 0,Xe.meetsMinimumRuntimeVersion=tt,Xe.parseRuntimeUuid=nt,Xe.runtimeUuidMeetsMinimumRuntimeVersion=function(e,t){return tt(nt(e),t)};var it,rt,ot,st,at,ct=s&&s.__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)},dt=s&&s.__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};Object.defineProperty(Qe,\"__esModule\",{value:!0}),Qe.ChannelProvider=void 0;const ht=pe,lt=Xe;class ut extends ht.ChannelBase{get connections(){return[...ct(this,it,\"f\")]}static handleClientDisconnection(e,t){const n=e.connections.find((e=>e.endpointId===t.endpointId));if(n)ct(e,st,\"f\").call(e,n);else{e.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name)).forEach(ct(e,st,\"f\"))}e.disconnectListener(t)}static setProviderRemoval(e,t){ut.removalMap.set(e,t)}constructor(e,t,n){super(),it.set(this,void 0),rt.set(this,void 0),ot.set(this,void 0),st.set(this,(e=>{const t=this.connections.filter((t=>t.endpointId!==e.endpointId));ct(this,ot,\"f\").closeEndpoint(e.endpointId),dt(this,it,t,\"f\")})),this.processAction=async(e,t,n)=>(ut.clientIsMultiRuntime(n)&&!(0,lt.runtimeUuidMeetsMinimumRuntimeVersion)(n.runtimeUuid,\"18.87.56.0\")?this.handleMultiRuntimeLegacyClient(n):this.checkForClientConnection(n),super.processAction(e,t,n)),at.set(this,(()=>{ct(this,ot,\"f\").close();const e=ut.removalMap.get(this);e&&e()})),dt(this,rt,new ht.ProtectedItems(e,t),\"f\"),this.connectListener=()=>{},this.disconnectListener=()=>{},dt(this,it,[],\"f\"),dt(this,ot,n,\"f\"),n.receive(this.processAction)}dispatch(e,t,n){const i=e.endpointId??this.getEndpointIdForOpenFinId(e,t);return i&&ct(this,ot,\"f\").isEndpointConnected(i)?ct(this,ot,\"f\").send(i,t,n):Promise.reject(new Error(`Client connection with identity uuid: ${e.uuid} / name: ${e.name} / endpointId: ${i} no longer connected.`))}async processConnection(e,t){return ct(this,it,\"f\").push(e),this.connectListener(e,t)}publish(e,t){return this.connections.map((n=>ct(this,ot,\"f\").send(n.endpointId,e,t)))}onConnection(e){this.connectListener=e}onDisconnection(e){this.disconnectListener=e}async destroy(){const e=ct(this,rt,\"f\");e.providerIdentity,dt(this,it,[],\"f\"),await e.close(),ct(this,at,\"f\").call(this)}async getAllClientInfo(){return this.connections.map((e=>{const{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}=e;return{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}}))}checkForClientConnection(e){if(!this.isClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider.\\n Client Identity: {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}isClientConnected(e){return ut.clientIdentityIncludesEndpointId(e)?this.connections.some((t=>t.endpointId===e.endpointId&&t.uuid===e.uuid&&t.name===e.name)):this.isLegacyClientConnected(e)}isLegacyClientConnected(e){return this.connections.some((t=>t.uuid===e.uuid&&t.name===e.name))}handleMultiRuntimeLegacyClient(e){if(!this.isLegacyClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider. Client Identity:\\n {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}getEndpointIdForOpenFinId(e,t){const n=this.connections.filter((t=>t.name===e.name&&t.uuid===e.uuid));if(n.length>=2){const n=ct(this,rt,\"f\"),{uuid:i,name:r}=e,o=n?.providerIdentity.uuid,s=n?.providerIdentity.name;console.warn(`WARNING: Dispatch call may have unintended results. The \"to\" argument of your dispatch call is missing the\\n \"endpointId\" parameter. The identity you are dispatching to ({uuid: ${i}, name: ${r}})\\n has multiple channelClients for this channel. Your dispatched action: (${t}) from the provider:\\n ({uuid: ${o}, name: ${s}}) will only be processed by the most recently-created client.`)}return n.pop()?.endpointId}static clientIdentityIncludesEndpointId(e){return void 0!==e.endpointId}static clientIsMultiRuntime(e){return void 0!==e.runtimeUuid}static async wireClose(e,t){await e.sendAction(\"destroy-channel\",{channelName:t})}}Qe.ChannelProvider=ut,it=new WeakMap,rt=new WeakMap,ot=new WeakMap,st=new WeakMap,at=new WeakMap,ut.removalMap=new WeakMap;var pt={};Object.defineProperty(pt,\"__esModule\",{value:!0}),pt.MessageReceiver=void 0;const wt=ue,yt=d;class ft extends yt.Base{constructor(e){super(e),this.onmessage=e=>\"process-channel-message\"===e.action&&(this.processChannelMessage(e),!0),this.endpointMap=new Map,this.latestEndpointIdByChannelId=new Map,e.registerMessageHandler(this.onmessage.bind(this))}async processChannelMessage(e){const{senderIdentity:t,providerIdentity:n,action:i,ackToSender:r,payload:o,intendedTargetIdentity:s}=e.payload,a=s.channelId??s.endpointId??this.latestEndpointIdByChannelId.get(n.channelId),c=this.endpointMap.get(a);if(!c)return r.payload.success=!1,r.payload.reason=`Client connection with identity uuid: ${this.wire.me.uuid} / name: ${this.wire.me.name} / endpointId: ${a} no longer connected.`,this.wire.sendRaw(r);try{const e=await c(i,o,t);return r.payload.payload=r.payload.payload||{},r.payload.payload.result=e,this.wire.sendRaw(r)}catch(e){return r.payload.success=!1,r.payload.reason=e.message,this.wire.sendRaw(r)}}addEndpoint(e,t,n){this.endpointMap.set(n,e),t!==n&&this.latestEndpointIdByChannelId.set(t,n)}removeEndpoint(e,t){this.endpointMap.delete(t),this.latestEndpointIdByChannelId.get(e)===t&&this.latestEndpointIdByChannelId.delete(e)}checkForPreviousClientConnection(e){const t=this.latestEndpointIdByChannelId.get(e);t&&(wt.ChannelClient.closeChannelByEndpointId(t),console.warn(\"You have created a second connection to an older provider. First connection has been removed from the clientMap\"),console.warn(\"If the provider calls publish(), you may receive multiple messages.\"))}}pt.MessageReceiver=ft;var gt={};Object.defineProperty(gt,\"__esModule\",{value:!0}),gt.ProtocolManager=void 0;gt.ProtocolManager=class{constructor(e){this.ProtocolsInPreferenceOrder=e,this.DefaultClientProtocols=[\"classic\"],this.DefaultProviderProtocols=[\"classic\"],this.getClientProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultClientProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(\", \")}.`);return t},this.getProviderProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultProviderProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(\", \")}.`);return t},this.getCompatibleProtocols=(e,t)=>t.supportedProtocols.filter((t=>e.some((e=>e.type===t.type&&t.version>=e.minimumVersion&&e.version>=(t.minimumVersion??0))))).slice(0,t.maxProtocols)}};var mt={};Object.defineProperty(mt,\"__esModule\",{value:!0});class vt{static combine(e,t){return new vt(e,t)}constructor(e,t){this.primary=e,this.secondary=t}onEndpointDisconnect(e,t){this.primary.onEndpointDisconnect(e,(()=>{this.secondary.isEndpointConnected(e)||t()})),this.secondary.onEndpointDisconnect(e,(()=>{this.primary.isEndpointConnected(e)||t()}))}isValidEndpointPayload(e){return this.primary.isValidEndpointPayload(e)||this.secondary.isValidEndpointPayload(e)}async closeEndpoint(e){await this.primary.closeEndpoint(e),await this.secondary.closeEndpoint(e)}isEndpointConnected(e){return this.primary.isEndpointConnected(e)||this.secondary.isEndpointConnected(e)}async addEndpoint(e,t){this.primary.isValidEndpointPayload(t)&&await this.primary.addEndpoint(e,t),this.secondary.isValidEndpointPayload(t)&&await this.secondary.addEndpoint(e,t)}receive(e){this.primary.receive(e),this.secondary.receive(e)}send(e,t,n){return this.primary.isEndpointConnected(e)?this.primary.send(e,t,n):this.secondary.send(e,t,n)}async close(){await Promise.all([this.primary.close(),this.secondary.close()])}}mt.default=vt;var Ct,bt,It=s&&s.__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},Et=s&&s.__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)},xt=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(xe,\"__esModule\",{value:!0}),xe.ConnectionManager=void 0;const At=Ae,Pt=d,Mt=Oe,_t=Fe,Ot=Je,St=Qe,Rt=pt,Ft=gt,jt=xt(mt);class kt extends Pt.Base{static getProtocolOptionsFromStrings(e){return e.map((e=>{switch(e){case\"rtc\":return _t.RTCInfo;case\"classic\":return Mt.ClassicInfo;default:return(0,At.exhaustiveCheck)(e,[\"rtc\",\"classic\"])}}))}constructor(e){super(e),Ct.set(this,void 0),bt.set(this,void 0),this.removeChannelFromProviderMap=e=>{this.providerMap.delete(e)},this.onmessage=e=>\"process-channel-connection\"===e.action&&(this.processChannelConnection(e),!0),this.providerMap=new Map,this.protocolManager=new Ft.ProtocolManager(\"node\"===this.wire.environment.type?[\"classic\"]:[\"rtc\",\"classic\"]),It(this,Ct,new Rt.MessageReceiver(e),\"f\"),It(this,bt,new Ot.RTCICEManager(e),\"f\"),e.registerMessageHandler(this.onmessage.bind(this))}createProvider(e,t){const n=Object.assign(this.wire.environment.getDefaultChannelOptions().create,e||{}),i=this.protocolManager.getProviderProtocols(n?.protocols),r=i.map((e=>{switch(e){case\"rtc\":return new _t.RTCStrategy;case\"classic\":return new Mt.ClassicStrategy(this.wire,Et(this,Ct,\"f\"),t.channelId,t);default:return(0,At.exhaustiveCheck)(e,[\"rtc\",\"classic\"])}}));let o;if(2===r.length){const[e,t]=r;o=jt.default.combine(e,t)}else{if(1!==r.length)throw new Error(\"failed to combine strategies\");[o]=r}const s=new St.ChannelProvider(t,(()=>St.ChannelProvider.wireClose(this.wire,t.channelName)),o),a=t.channelId;return this.providerMap.set(a,{provider:s,strategy:o,supportedProtocols:kt.getProtocolOptionsFromStrings(i)}),St.ChannelProvider.setProviderRemoval(s,this.removeChannelFromProviderMap.bind(this)),s}async createClientOffer(e){const t=this.protocolManager.getClientProtocols(e?.protocols);let n;return{offer:{supportedProtocols:await Promise.all(t.map((async e=>{switch(e){case\"rtc\":{const{rtcClient:e,channels:t,offer:i,rtcConnectionId:r,channelsOpened:o}=await Et(this,bt,\"f\").startClientOffer();return n={rtcClient:e,channels:t,channelsOpened:o},{type:\"rtc\",version:_t.RTCInfo.version,payload:{offer:i,rtcConnectionId:r}}}case\"classic\":return{type:\"classic\",version:Mt.ClassicInfo.version};default:return(0,At.exhaustiveCheck)(e,[\"rtc\",\"classic\"])}}))),maxProtocols:2},rtc:n}}async createClientStrategy(e,t){t.endpointId||(t.endpointId=this.wire.environment.getNextMessageId(),Et(this,Ct,\"f\").checkForPreviousClientConnection(t.channelId));const n=t.answer??{supportedProtocols:[{type:\"classic\",version:1}]},i=(await Promise.all(n.supportedProtocols.map((async n=>\"rtc\"===n.type&&e?(await Et(this,bt,\"f\").finishClientOffer(e.rtcClient,n.payload.answer,e.channelsOpened),new _t.RTCStrategy):\"classic\"===n.type?new Mt.ClassicStrategy(this.wire,Et(this,Ct,\"f\"),t.endpointId,t):null)))).filter((e=>null!==e));let r;if(e&&!i.some((e=>e instanceof _t.RTCStrategy))&&e&&e.rtcClient.close(),i.length>=2)r=jt.default.combine(i[0],i[1]);else{if(!i.length)throw new Error(\"No compatible protocols\");[r]=i}const o={endpointIdentity:t,rtc:e};return r.addEndpoint(t.channelId,o),r}async processChannelConnection(e){const{clientIdentity:t,providerIdentity:n,ackToSender:i,payload:r,offer:o}=e.payload;t.endpointId?t.isLocalEndpointId=!1:(t.endpointId=this.wire.environment.getNextMessageId(),t.isLocalEndpointId=!0);const s=n.channelId,a=this.providerMap.get(s);if(!a)return i.payload.success=!1,i.payload.reason=`Channel \"${n.channelName}\" has been destroyed.`,this.wire.sendRaw(i);const{provider:c,strategy:d,supportedProtocols:h}=a;try{if(!(c instanceof St.ChannelProvider))throw Error(\"Cannot connect to a channel client\");const e=o??{supportedProtocols:[{type:\"classic\",version:1}],maxProtocols:1},n=this.protocolManager.getCompatibleProtocols(h,e);if(!n.length)throw new Error(\"This provider does not support any of the offered protocols.\");const s=await c.processConnection(t,r);i.payload.payload=i.payload.payload||{};let a={supportedProtocols:[],endpointPayloadPromise:Promise.resolve({endpointIdentity:t})};return a=await n.reduce((async(e,t)=>{const n=await e;if(\"rtc\"===t.type){const{answer:e,rtcClient:i,channels:r}=await Et(this,bt,\"f\").createProviderAnswer(t.payload.rtcConnectionId,t.payload.offer);n.supportedProtocols.push({type:\"rtc\",version:_t.RTCInfo.version,payload:{answer:e}}),n.endpointPayloadPromise=n.endpointPayloadPromise.then((e=>r.then((t=>({...e,rtc:{rtcClient:i,channels:t}})))))}else n.supportedProtocols.push({type:\"classic\",version:Mt.ClassicInfo.version});return n}),Promise.resolve(a)),a.endpointPayloadPromise.then((e=>d.addEndpoint(t.endpointId,e))),i.payload.payload.result=s,i.payload.payload.answer=a,this.wire.sendRaw(i)}catch(e){return i.payload.success=!1,i.payload.reason=e.message,this.wire.sendRaw(i)}}}xe.ConnectionManager=kt,Ct=new WeakMap,bt=new WeakMap;var Lt,Tt,$t,Bt=s&&s.__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},Gt=s&&s.__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)};Object.defineProperty(le,\"__esModule\",{value:!0}),le.Channel=void 0;const Wt=t,Ht=G,Nt=d,Dt=ue,Ut=xe,Vt=Qe;function zt(e){const t=Math.floor(e/10),n=Math.min(3e4,500*2**t);return new Promise((e=>{setTimeout((()=>{e(!1)}),n)}))}class Kt extends Nt.EmitterBase{constructor(e){super(e,\"channel\"),Lt.set(this,void 0),Tt.set(this,new Wt.EventEmitter),$t.set(this,new Ht.AsyncRetryableLazy((async()=>{await Promise.all([this.on(\"disconnected\",(e=>{Dt.ChannelClient.handleProviderDisconnect(e)})),this.on(\"connected\",((...e)=>{Gt(this,Tt,\"f\").emit(\"connected\",...e)}))]).catch((()=>new Error(\"error setting up channel connection listeners\")))}))),Bt(this,Lt,new Ut.ConnectionManager(e),\"f\")}async getAllChannels(){return this.wire.sendAction(\"get-all-channels\").then((({payload:e})=>e.data))}async onChannelConnect(e){await this.on(\"connected\",e)}async onChannelDisconnect(e){await this.on(\"disconnected\",e)}async safeConnect(e,t,n){const i={count:0};do{let r=()=>{};const o=new Promise((t=>{r=n=>{e===n.channelName&&t(!0)},Gt(this,Tt,\"f\").on(\"connected\",r)}));try{if(i.count>0){i.gotConnectedEvent=await Promise.race([zt(i.count),o]);const t=await this.wire.sendAction(\"connect-to-channel\",{...n,retryInfo:i});return console.log(`Successfully connected to channelName: ${e}`),t.payload.data}const t=this.wire.sendAction(\"connect-to-channel\",n);i.originalMessageId=t.messageId;return(await t).payload.data}catch(n){if(!n.message.includes(\"internal-nack\"))throw n;t&&0===i.count&&console.warn(`No channel found for channelName: ${e}. Waiting for connection...`)}finally{i.count+=1,Gt(this,Tt,\"f\").removeListener(\"connected\",r)}}while(t);throw new Error(`No channel found for channelName: ${e}.`)}async connect(e,t={}){if(await Gt(this,$t,\"f\").getValue(),!e||\"string\"!=typeof e)throw new Error(\"Please provide a channelName string to connect to a channel.\");const n={wait:!0,...this.wire.environment.getDefaultChannelOptions().connect,...t},{offer:i,rtc:r}=await Gt(this,Lt,\"f\").createClientOffer(n);let o;(this.fin.me.isFrame||this.fin.me.isView||this.fin.me.isWindow)&&(o=(await this.fin.me.getInfo()).url);const s={channelName:e,...n,offer:i,connectionUrl:o},a=await this.safeConnect(e,n.wait,s),c=await Gt(this,Lt,\"f\").createClientStrategy(r,a),d=new Dt.ChannelClient(a,(()=>Dt.ChannelClient.wireClose(this.wire,a,a.endpointId)),c);return c.onEndpointDisconnect(a.channelId,(async()=>{try{await d.sendDisconnectAction()}catch(e){console.warn(`Something went wrong during disconnect for client with uuid: ${a.uuid} / name: ${a.name} / endpointId: ${a.endpointId}.`)}finally{Dt.ChannelClient.handleProviderDisconnect(a)}})),d}async create(e,t){if(!e)throw new Error(\"Please provide a channelName to create a channel\");const{payload:{data:n}}=await this.wire.sendAction(\"create-channel\",{channelName:e}),i=Gt(this,Lt,\"f\").createProvider(t,n);return this.on(\"client-disconnected\",(t=>{t.channelName===e&&Vt.ChannelProvider.handleClientDisconnection(i,t)})),i}}le.Channel=Kt,Lt=new WeakMap,Tt=new WeakMap,$t=new WeakMap,Object.defineProperty(de,\"__esModule\",{value:!0}),de.InterAppPayload=de.InterApplicationBus=void 0;const qt=t,Jt=d,Yt=he,Zt=le,Qt=O;class Xt extends Jt.Base{constructor(e){super(e),this.events={subscriberAdded:\"subscriber-added\",subscriberRemoved:\"subscriber-removed\"},this.refCounter=new Yt.RefCounter,this.Channel=new Zt.Channel(e),this.emitter=new qt.EventEmitter,e.registerMessageHandler(this.onmessage.bind(this)),this.on=this.emitter.on.bind(this.emitter),this.removeAllListeners=this.emitter.removeAllListeners.bind(this.emitter)}async publish(e,t){await this.wire.sendAction(\"publish-message\",{topic:e,message:t,sourceWindowName:this.me.name})}async send(e,t,n){const i=(0,Qt.validateIdentity)(e);if(i)throw new Error(i);await this.wire.sendAction(\"send-message\",{destinationUuid:e.uuid,destinationWindowName:e.name,topic:t,message:n,sourceWindowName:this.me.name})}subscribe(e,t,n){const i=this.createSubscriptionKey(e.uuid,e.name||\"*\",t);return this.emitter.on(i,n),this.refCounter.actOnFirst(i,(async()=>{await this.wire.sendAction(\"subscribe\",{sourceUuid:e.uuid,sourceWindowName:e.name||\"*\",topic:t,destinationWindowName:this.me.name})}),(()=>Promise.resolve()))}unsubscribe(e,t,n){const i=e.name||\"*\",r=this.createSubscriptionKey(e.uuid,i,t);return this.emitter.removeListener(r,n),this.refCounter.actOnLast(r,(async()=>{await this.wire.sendAction(\"unsubscribe\",{sourceUuid:e.uuid,sourceWindowName:i,topic:t,destinationWindowName:this.me.name})}),(()=>new Promise((e=>e)).then((()=>{}))))}processMessage(e){const{payload:{message:t,sourceWindowName:n,sourceUuid:i,topic:r}}=e,o=[this.createSubscriptionKey(i,n,r),this.createSubscriptionKey(i,\"*\",r),this.createSubscriptionKey(\"*\",\"*\",r)],s={uuid:i,name:n};o.forEach((e=>{this.emitter.emit(e,t,s)}))}emitSubscriverEvent(e,t){const{payload:{targetName:n,uuid:i,topic:r}}=t,o={name:n,uuid:i,topic:r};this.emitter.emit(e,o)}createSubscriptionKey(e,t,n){const i=t||\"*\";if(!(e&&i&&n))throw new Error(\"Missing uuid, name, or topic string\");return function(...e){return e.map((e=>Buffer.from(`${e}`).toString(\"base64\"))).join(\"/\")}(e,i,n)}onmessage(e){const{action:t}=e;switch(t){case\"process-message\":this.processMessage(e);break;case this.events.subscriberAdded:this.emitSubscriverEvent(this.events.subscriberAdded,e);break;case this.events.subscriberRemoved:this.emitSubscriverEvent(this.events.subscriberRemoved,e)}return!0}}de.InterApplicationBus=Xt;de.InterAppPayload=class{};var en={};Object.defineProperty(en,\"__esModule\",{value:!0}),en.Clipboard=void 0;const tn=d;class nn extends tn.Base{async writeText(e){await this.wire.sendAction(\"clipboard-write-text\",e)}async readText(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-text\",{type:e});return t.data}async writeImage(e){await this.wire.sendAction(\"clipboard-write-image\",e)}async readImage(e={format:\"dataURL\"}){const{payload:t}=await this.wire.sendAction(\"clipboard-read-image\",e);return t.data}async writeHtml(e){await this.wire.sendAction(\"clipboard-write-html\",e)}async readHtml(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-html\",{type:e});return t.data}async writeRtf(e){await this.wire.sendAction(\"clipboard-write-rtf\",e)}async readRtf(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-rtf\",{type:e});return t.data}async write(e){await this.wire.sendAction(\"clipboard-write\",e)}async getAvailableFormats(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-formats\",{type:e});return t.data}}en.Clipboard=nn;var rn={},on={},sn={};Object.defineProperty(sn,\"__esModule\",{value:!0}),sn.ExternalApplication=void 0;const an=d;class cn extends an.EmitterBase{constructor(e,t){super(e,\"external-application\",t.uuid),this.identity=t}getInfo(){return this.wire.sendAction(\"get-external-application-info\",this.identity).then((({payload:e})=>e.data))}}sn.ExternalApplication=cn,Object.defineProperty(on,\"__esModule\",{value:!0}),on.ExternalApplicationModule=void 0;const dn=d,hn=sn;class ln extends dn.Base{wrap(e){return this.wire.sendAction(\"external-application-wrap\").catch((e=>{})),Promise.resolve(new hn.ExternalApplication(this.wire,{uuid:e}))}wrapSync(e){return this.wire.sendAction(\"external-application-wrap-sync\").catch((e=>{})),new hn.ExternalApplication(this.wire,{uuid:e})}}on.ExternalApplicationModule=ln,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(on,e),n(sn,e)}(rn);var un={},pn={},wn={};Object.defineProperty(wn,\"__esModule\",{value:!0}),wn._Frame=void 0;const yn=d;class fn extends yn.EmitterBase{constructor(e,t){super(e,\"frame\",t.uuid,t.name),this.identity=t}getInfo(){return this.wire.sendAction(\"get-frame-info\",this.identity).then((({payload:e})=>e.data))}getParentWindow(){return this.wire.sendAction(\"get-parent-window\",this.identity).then((({payload:e})=>e.data))}}wn._Frame=fn,Object.defineProperty(pn,\"__esModule\",{value:!0}),pn._FrameModule=void 0;const gn=d,mn=O,vn=wn;class Cn extends gn.Base{async wrap(e){this.wire.sendAction(\"frame-wrap\").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}wrapSync(e){this.wire.sendAction(\"frame-wrap-sync\").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}getCurrent(){return this.wire.sendAction(\"frame-get-current\").catch((e=>{})),Promise.resolve(new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity()))}getCurrentSync(){return this.wire.sendAction(\"frame-get-current-sync\").catch((e=>{})),new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity())}}pn._FrameModule=Cn,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(pn,e),n(wn,e)}(un);var bn={};Object.defineProperty(bn,\"__esModule\",{value:!0}),bn.GlobalHotkey=void 0;const In=d;class En extends In.EmitterBase{constructor(e){super(e,\"global-hotkey\")}async register(e,t){await this.on(e,t),await this.wire.sendAction(\"global-hotkey-register\",{hotkey:e})}async unregister(e){await this.removeAllListeners(e),await this.wire.sendAction(\"global-hotkey-unregister\",{hotkey:e})}async unregisterAll(){await Promise.all(this.eventNames().filter((e=>!(\"registered\"===e||\"unregistered\"===e))).map((e=>this.removeAllListeners(e)))),await this.wire.sendAction(\"global-hotkey-unregister-all\",{})}async isRegistered(e){const{payload:{data:t}}=await this.wire.sendAction(\"global-hotkey-is-registered\",{hotkey:e});return t}}bn.GlobalHotkey=En;var xn,An={},Pn={},Mn={},_n=s&&s.__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)};Object.defineProperty(Mn,\"__esModule\",{value:!0}),Mn.Platform=void 0;const On=d,Sn=O,Rn=new Map;class Fn extends On.EmitterBase{constructor(e,t){super(t.wire,\"application\",e.uuid),this.getClient=e=>{this.wire.sendAction(\"platform-get-client\",this.identity).catch((e=>{}));const t=e||this.identity,{uuid:n}=t;if(!Rn.has(n)){const e=_n(this,xn,\"f\").call(this,n);Rn.set(n,e)}return Rn.get(n)},xn.set(this,(async e=>{try{const t=`custom-frame-${e}`,n=await this._channel.connect(t,{wait:!1});return n.onDisconnection((()=>{Rn.delete(e)})),n}catch(t){throw Rn.delete(e),new Error(\"The targeted Platform is not currently running. Listen for application-started event for the given Uuid.\")}})),this.launchLegacyManifest=this.launchContentManifest;const n=(0,Sn.validateIdentity)(e);if(n)throw new Error(n);this._channel=t,this.identity={uuid:e.uuid},this.Layout=this.fin.Platform.Layout,this.Application=this.fin.Application.wrapSync(this.identity)}async createView(e,t,n){this.wire.sendAction(\"platform-create-view\",this.identity).catch((e=>{}));const i=await this.getClient(),r=await i.dispatch(\"create-view\",{target:t,opts:e,targetView:n});if(!r||(0,Sn.validateIdentity)(r.identity))throw new Error(`When overwriting the createView call, please return an object that has a valid 'identity' property: ${JSON.stringify(r)}`);return this.fin.View.wrapSync(r.identity)}async createWindow(e){this.wire.sendAction(\"platform-create-window\",this.identity).catch((e=>{}));const t=await this.getClient();e.reason||(e.reason=\"api-call\");const n=await t.dispatch(\"create-view-container\",e);if(!n||(0,Sn.validateIdentity)(n.identity))throw new Error(`When overwriting the createWindow call, please return an object that has a valid 'identity' property: ${JSON.stringify(n)}`);const{identity:i}=n,r=this.fin.Window.wrapSync(i);return r.name=i.name,r.uuid=i.uuid,r}async quit(){this.wire.sendAction(\"platform-quit\",this.identity).catch((e=>{}));return(await this.getClient()).dispatch(\"quit\")}async closeView(e){this.wire.sendAction(\"platform-close-view\",this.identity).catch((e=>{}));const t=await this.getClient();await t.dispatch(\"close-view\",{view:e})}async reparentView(e,t){console.warn(\"Platform.reparentView has been deprecated, please use Platform.createView\"),this.wire.sendAction(\"platform-reparent-view\",this.identity).catch((e=>{}));const n={...e,uuid:e.uuid??this.identity.uuid},i=await this.fin.View.wrap(n),r=await i.getOptions();return this.createView(r,t)}async getSnapshot(){this.wire.sendAction(\"platform-get-snapshot\",this.identity).catch((e=>{}));return(await this.getClient()).dispatch(\"get-snapshot\")}async getViewSnapshot(e){return(await this.getClient()).dispatch(\"get-view-snapshot\",{viewIdentity:e})}async applySnapshot(e,t){this.wire.sendAction(\"platform-apply-snapshot\",this.identity).catch((e=>{}));const n=\"Requested snapshot must be a valid Snapshot object, or a url or filepath to such an object.\";let i;if(\"string\"==typeof e)try{i=(await this._channel.wire.sendAction(\"get-application-manifest\",{manifestUrl:e})).payload.data}catch(e){throw new Error(`${n}: ${e}`)}else i=e;if(!i.windows)throw new Error(n);const r=await this.getClient();return await r.dispatch(\"apply-snapshot\",{snapshot:i,options:t}),this}async fetchManifest(e){return(await this.getClient()).dispatch(\"platform-fetch-manifest\",{manifestUrl:e})}async launchContentManifest(e){this.wire.sendAction(\"platform-launch-content-manifest\",this.identity).catch((()=>{}));const t=await this.getClient(),n=await this.fetchManifest(e);return t.dispatch(\"launch-into-platform\",{manifest:n,manifestUrl:e}),this}async setWindowContext(e={},t){if(this.wire.sendAction(\"platform-set-window-context\",this.identity).catch((e=>{})),!e)throw new Error(\"Please provide a serializable object or string to set the context.\");const n=await this.getClient(),{entityType:i}=t?await this.fin.System.getEntityInfo(t.uuid,t.name):this.fin.me;await n.dispatch(\"set-window-context\",{context:e,entityType:i,target:t||{uuid:this.fin.me.uuid,name:this.fin.me.name}})}async getWindowContext(e){this.wire.sendAction(\"platform-get-window-context\",this.identity).catch((e=>{}));const t=await this.getClient(),{entityType:n}=e?await this.fin.System.getEntityInfo(e.uuid,e.name):this.fin.me;return t.dispatch(\"get-window-context\",{target:e||{uuid:this.fin.me.uuid,name:this.fin.me.name},entityType:n})}async closeWindow(e,t={skipBeforeUnload:!1}){this.wire.sendAction(\"platform-close-window\",this.identity).catch((e=>{}));return(await this.getClient()).dispatch(\"close-window\",{windowId:e,options:t})}}Mn.Platform=Fn,xn=new WeakMap;var jn={},kn={},Ln={},Tn={};function $n(e){switch(e){case\"columns\":case\"grid\":case\"rows\":case\"tabs\":return!0;default:return!1}}Object.defineProperty(Tn,\"__esModule\",{value:!0}),Tn.overrideFromComposables=Tn.isValidPresetType=void 0,Tn.isValidPresetType=$n,Tn.overrideFromComposables=function(...e){return t=>e.reduceRight(((e,t)=>n=>t(e(n))),(e=>e))(t)},Tn.default={isValidPresetType:$n};var Bn={},Gn={},Wn={};Object.defineProperty(Wn,\"__esModule\",{value:!0}),Wn.ApiConsumer=void 0;Wn.ApiConsumer=class{constructor(e){this.strategy=e,this.consume=async e=>(await this.strategy.getExposedFunctions(e)).reduce(((t,n)=>({...t,[n.key]:this.strategy.createFunction(n,e)})),{})}};var Hn={},Nn={};Object.defineProperty(Nn,\"__esModule\",{value:!0}),Nn.expose=Nn.getExposedProperties=void 0;const Dn=Symbol(\"exposedProperties\");Nn.getExposedProperties=e=>e[Dn]||e.prototype[Dn]||[];Nn.expose=e=>(t,n,i)=>{t[Dn]=t[Dn]||[],t[Dn].push({key:n,descriptor:i,options:e})},Object.defineProperty(Hn,\"__esModule\",{value:!0}),Hn.ApiExposer=void 0;const Un=Nn;Hn.ApiExposer=class{constructor(e){this.strategy=e,this.exposeInstance=async(e,t)=>{const n=(0,Un.getExposedProperties)(e),i=await Promise.all(n.map((async({key:n,options:i})=>({key:n,options:await this.strategy.exposeFunction(e[n].bind(e),{key:n,options:i,meta:t})}))));await this.strategy.exposeMeta(t,i)}}};var Vn={},zn={},Kn={};Object.defineProperty(Kn,\"__esModule\",{value:!0}),Kn.ChannelsConsumer=void 0;Kn.ChannelsConsumer=class{constructor(e){this.channel=e,this.getExposedFunctions=async e=>{const{id:t}=e,{props:n}=await this.channel.dispatch(`api-meta:${t}`);return n},this.createFunction=e=>(...t)=>{const{action:n}=e.options;return this.channel.dispatch(n,{args:t})}}};var qn={};Object.defineProperty(qn,\"__esModule\",{value:!0}),qn.ChannelsExposer=void 0;qn.ChannelsExposer=class{constructor(e){this.channelProviderOrClient=e,this.exposeFunction=async(e,t)=>{const{key:n,options:i,meta:r}=t,{id:o}=r,s=`${o}.${i?.action||n}`;return await this.channelProviderOrClient.register(s,(async({args:t})=>e(...t))),{action:s}},this.exposeMeta=async({id:e},t)=>{const n=`api-meta:${e}`;await this.channelProviderOrClient.register(n,(()=>({props:t})))}}},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Kn,e),n(qn,e)}(zn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(zn,e)}(Vn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Wn,e),n(Hn,e),n(Vn,e),n(Nn,e)}(Gn);var Jn={};Object.defineProperty(Jn,\"__esModule\",{value:!0}),Jn.createRelayedDispatch=exports.relayChannelClientApi_1=Jn.relayChannelClientApi=void 0;const Yn=[\"no longer connected\",\"RTCDataChannel closed unexpectedly\",\"The client you are trying to dispatch from is disconnected from the target provider\"];exports.relayChannelClientApi_1=Jn.relayChannelClientApi=async(e,t)=>{e.register(`relay:${t}`,(({action:t,target:n,payload:i})=>e.dispatch(n,t,i))),await Promise.resolve()};Jn.createRelayedDispatch=(e,t,n,i)=>async(r,o)=>{try{return await e.dispatch(`relay:${n}`,{action:r,payload:o,target:t})}catch(e){if(s=e.message,Yn.some((e=>s.includes(e)))&&i)throw new Error(i);throw e}var s};var Zn,Qn,Xn,ei=s&&s.__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},ti=s&&s.__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)};Object.defineProperty(Bn,\"__esModule\",{value:!0}),Bn.ColumnOrRow=Bn.TabStack=Bn.LayoutNode=void 0;const ni=Gn,ii=Jn;class ri{constructor(e,t){Zn.set(this,void 0),this.isRoot=()=>ti(this,Zn,\"f\").isRoot(this.entityId),this.exists=()=>ti(this,Zn,\"f\").exists(this.entityId),this.getParent=async()=>{const e=await ti(this,Zn,\"f\").getParent(this.entityId);if(e)return ri.getEntity(e,ti(this,Zn,\"f\"))},this.createAdjacentStack=async(e,t)=>{const n=await ti(this,Zn,\"f\").createAdjacentStack(this.entityId,e,t);return ri.getEntity({entityId:n,type:\"stack\"},ti(this,Zn,\"f\"))},this.getAdjacentStacks=async e=>(await ti(this,Zn,\"f\").getAdjacentStacks({targetId:this.entityId,edge:e})).map((e=>ri.getEntity({type:\"stack\",entityId:e.entityId},ti(this,Zn,\"f\")))),ei(this,Zn,e,\"f\"),this.entityId=t}}Bn.LayoutNode=ri,Zn=new WeakMap,ri.newLayoutEntitiesClient=async(e,t,n)=>{const i=(0,ii.createRelayedDispatch)(e,n,\"layout-relay\",\"You are trying to interact with a layout component on a window that does not exist or has been destroyed.\");return new ni.ApiConsumer(new ni.ChannelsConsumer({dispatch:i})).consume({id:t})},ri.getEntity=(e,t)=>{const{entityId:n,type:i}=e;switch(i){case\"column\":case\"row\":return new si(t,n,i);case\"stack\":return new oi(t,n);default:throw new Error(`Unrecognised Layout Entity encountered ('${JSON.stringify(e)})`)}};class oi extends ri{constructor(e,t){super(e,t),Qn.set(this,void 0),this.type=\"stack\",this.getViews=()=>ti(this,Qn,\"f\").getStackViews(this.entityId),this.addView=async(e,t={index:0})=>ti(this,Qn,\"f\").addViewToStack(this.entityId,e,t),this.removeView=async e=>{await ti(this,Qn,\"f\").removeViewFromStack(this.entityId,e)},this.setActiveView=async e=>{await ti(this,Qn,\"f\").setStackActiveView(this.entityId,e)},ei(this,Qn,e,\"f\")}}Bn.TabStack=oi,Qn=new WeakMap;class si extends ri{constructor(e,t,n){super(e,t),Xn.set(this,void 0),this.getContent=async()=>(await ti(this,Xn,\"f\").getContent(this.entityId)).map((e=>ri.getEntity(e,ti(this,Xn,\"f\")))),ei(this,Xn,e,\"f\"),this.type=n}}Bn.ColumnOrRow=si,Xn=new WeakMap;var ai={};Object.defineProperty(ai,\"__esModule\",{value:!0}),ai.DEFAULT_LAYOUT_KEY=ai.LAYOUT_CONTROLLER_ID=void 0,ai.LAYOUT_CONTROLLER_ID=\"layout-entities\",ai.DEFAULT_LAYOUT_KEY=\"__default__\";var ci,di,hi,li=s&&s.__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)};Object.defineProperty(Ln,\"__esModule\",{value:!0}),Ln.Layout=void 0;const ui=G,pi=O,wi=d,yi=Tn,fi=Bn,gi=ai;class mi extends wi.Base{static getClient(e){return li(e,di,\"f\").getValue()}constructor(e,t){super(t),ci.add(this),di.set(this,new ui.Lazy((async()=>fi.LayoutNode.newLayoutEntitiesClient(await this.platform.getClient(),gi.LAYOUT_CONTROLLER_ID,this.identity)))),this.replace=async e=>{this.wire.sendAction(\"layout-replace\").catch((e=>{}));const t=await this.platform.getClient();await t.dispatch(\"replace-layout\",{target:this.identity,opts:{layout:e}})},this.replaceView=async(e,t)=>{this.wire.sendAction(\"layout-replace-view\").catch((e=>{}));const n=await this.platform.getClient();await n.dispatch(\"replace-view\",{target:this.identity,opts:{viewToReplace:e,newView:t}})},this.applyPreset=async e=>{this.wire.sendAction(\"layout-apply-preset\").catch((e=>{}));const t=await this.platform.getClient(),{presetType:n}=e;if(!n||!(0,yi.isValidPresetType)(n))throw new Error(\"Cannot apply preset layout, please include an applicable presetType property in the PresetLayoutOptions.\");await t.dispatch(\"apply-preset-layout\",{target:this.identity,opts:{presetType:n}})};const n=(0,pi.validateIdentity)(e);if(n)throw new Error(n);this.identity=e,this.platform=this.fin.Platform.wrapSync({uuid:e.uuid}),e.uuid===this.fin.me.uuid&&e.name===this.fin.me.name&&(this.init=this.fin.Platform.Layout.init)}async getConfig(){this.wire.sendAction(\"layout-get-config\").catch((e=>{}));return(await this.platform.getClient()).dispatch(\"get-frame-snapshot\",{target:this.identity})}async getCurrentViews(){this.wire.sendAction(\"layout-get-views\").catch((e=>{}));const e=await this.platform.getClient();return(await e.dispatch(\"get-layout-views\",{target:this.identity})).map((e=>this.fin.View.wrapSync(e)))}async getRootItem(){this.wire.sendAction(\"layout-get-root-item\").catch((()=>{}));const e=await li(this,di,\"f\").getValue(),t=await e.getRoot(\"layoutName\"in this.identity?this.identity:void 0);return fi.LayoutNode.getEntity(t,e)}async getStackByViewIdentity(e){this.wire.sendAction(\"layout-get-stack-by-view\").catch((()=>{}));const t=await li(this,di,\"f\").getValue(),n=await t.getStackByView(e);if(!n)throw new Error(`No stack found for view: ${e.uuid}/${e.name}`);return fi.LayoutNode.getEntity(n,t)}async addView(e,{location:t,targetView:n}={}){this.wire.sendAction(\"layout-add-view\").catch((e=>{}));const{identity:i}=await li(this,ci,\"m\",hi).call(this,\"layout-add-view\",{viewOptions:e,location:t,targetView:n});return{identity:i}}async closeView(e){this.wire.sendAction(\"layout-close-view\").catch((e=>{})),await li(this,ci,\"m\",hi).call(this,\"layout-close-view\",{viewIdentity:e})}}Ln.Layout=mi,di=new WeakMap,ci=new WeakSet,hi=async function(e,t){return(await this.platform.getClient()).dispatch(e,{target:this.identity,opts:t})};var vi,Ci,bi,Ii,Ei,xi=s&&s.__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)},Ai=s&&s.__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};Object.defineProperty(kn,\"__esModule\",{value:!0}),kn.LayoutModule=void 0;const Pi=d,Mi=Ln,_i=ai;class Oi extends Pi.Base{constructor(){super(...arguments),vi.add(this),Ci.set(this,!1),bi.set(this,null),this.init=async(e={})=>{if(this.wire.sendAction(\"layout-init\").catch((e=>{})),!this.wire.environment.layoutAllowedInContext(this.fin))throw new Error(\"Layout.init can only be called from a Window context.\");if(xi(this,Ci,\"f\"))throw new Error(\"Layout.init was already called, please use Layout.create to add additional layouts.\");\"openfin\"===this.wire.environment.type&&await this.fin.Platform.getCurrentSync().getClient(),Ai(this,Ci,!0,\"f\"),Ai(this,bi,await this.wire.environment.initLayoutManager(this.fin,this.wire,e),\"f\"),await this.wire.environment.applyLayoutSnapshot(this.fin,xi(this,bi,\"f\"),e);const t={name:this.fin.me.name,uuid:this.fin.me.uuid};if(!e.layoutManagerOverride){const e={layoutName:_i.DEFAULT_LAYOUT_KEY,...t};return xi(this,Ii,\"f\").call(this,e)}return this.wrapSync(t)},Ii.set(this,(e=>{const t=\"[Layout] You are using a deprecated property `layoutManager` - it will throw if you access it starting in v37.\",n=new Proxy({},{get(e,n){throw console.warn(`[Layout-mgr-proxy] accessing ${n.toString()}`),new Error(t)}}),i=Object.assign(this.wrapSync(e),{layoutManager:n});return new Proxy(i,{get(e,n){if(\"layoutManager\"===n)throw console.warn(`[Layout-proxy] accessing ${n.toString()}`),new Error(t);return e[n]}})})),this.getCurrentLayoutManagerSync=()=>xi(this,vi,\"m\",Ei).call(this,\"fin.Platform.Layout.getCurrentLayoutManagerSync()\"),this.create=async e=>this.wire.environment.createLayout(xi(this,vi,\"m\",Ei).call(this,\"fin.Platform.Layout.create()\"),e),this.destroy=async e=>this.wire.environment.destroyLayout(xi(this,vi,\"m\",Ei).call(this,\"fin.Platform.Layout.destroy()\"),e)}async wrap(e){return this.wire.sendAction(\"layout-wrap\").catch((e=>{})),new Mi.Layout(e,this.wire)}wrapSync(e){return this.wire.sendAction(\"layout-wrap-sync\").catch((e=>{})),new Mi.Layout(e,this.wire)}async getCurrent(){if(this.wire.sendAction(\"layout-get-current\").catch((e=>{})),\"openfin\"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error(\"You are not in a Window context. Only Windows can have a Layout.\");const{uuid:e,name:t}=this.fin.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction(\"layout-get-current-sync\").catch((e=>{})),\"openfin\"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error(\"You are not in a Window context. Only Windows can have a Layout.\");const{uuid:e,name:t}=this.fin.me;return this.wrapSync({uuid:e,name:t})}async getLayoutByViewIdentity(e){this.wire.sendAction(\"layout-get-by-view-identity\").catch((()=>{}));let t=await this.wire.environment.getViewWindowIdentity(this.fin,e);t.identity&&(t=t.identity);try{const n=this.wrapSync(t),i=await Mi.Layout.getClient(n),r=await i.getLayoutIdentityForViewOrThrow(e);return this.wrapSync(r)}catch(n){if(![\"No action registered at target for\",\"getLayoutIdentityForViewOrThrow is not a function\"].some((e=>n.message.includes(e))))throw n;if(t.uuid===t.name)throw new Error(`View identity ${JSON.stringify(e)} is not attached to any layout in provider window ${JSON.stringify(t)}.`);return this.wrapSync(t)}}}kn.LayoutModule=Oi,Ci=new WeakMap,bi=new WeakMap,Ii=new WeakMap,vi=new WeakSet,Ei=function(e){if(!xi(this,bi,\"f\"))throw new Error(`You must call init before using the API ${e}`);return xi(this,bi,\"f\")},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(kn,e),n(Ln,e)}(jn),Object.defineProperty(Pn,\"__esModule\",{value:!0}),Pn.PlatformModule=void 0;const Si=d,Ri=Mn,Fi=jn;class ji extends Si.Base{constructor(e,t){super(e),this._channel=t,this.Layout=new Fi.LayoutModule(this.wire)}async init(e){if(!fin.__internal_.isPlatform||fin.me.name!==fin.me.uuid)throw new Error(\"fin.Platform.init should only be called from a custom platform provider running in the main window of the application.\");return this.wire.environment.initPlatform(this.fin,e)}async wrap(e){return this.wire.sendAction(\"platform-wrap\").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}wrapSync(e){return this.wire.sendAction(\"platform-wrap-sync\").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}async getCurrent(){return this.wire.sendAction(\"platform-get-current\").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction(\"platform-get-current-sync\").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}start(e){return this.wire.sendAction(\"platform-start\").catch((e=>{})),new Promise((async(t,n)=>{try{const{uuid:n}=e,i=await this.fin.Application._create({...e,isPlatformController:!0});i.once(\"platform-api-ready\",(()=>t(this.wrapSync({uuid:n})))),i._run({uuid:n})}catch(e){n(e)}}))}startFromManifest(e,t){return this.wire.sendAction(\"platform-start-from-manifest\").catch((e=>{})),new Promise((async(n,i)=>{try{const i=await this.fin.Application._createFromManifest(e);i.once(\"platform-api-ready\",(()=>n(this.wrapSync({uuid:i.identity.uuid})))),i._run(t)}catch(e){i(e)}}))}}Pn.PlatformModule=ji,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Pn,e),n(Mn,e)}(An);var ki={};!function(e){Object.defineProperty(e,\"__esModule\",{value:!0}),e.getMe=e.getBaseMe=e.environmentUnsupportedMessage=void 0;const t=J(),n=un,i=ie(),r=rn;function o(e,t,n){return{...{isView:\"view\"===e,isWindow:\"window\"===e,isFrame:\"iframe\"===e,isExternal:\"external connection\"===e},uuid:t,name:n,entityType:e}}e.environmentUnsupportedMessage=\"You are not running in OpenFin.\",e.getBaseMe=o,e.getMe=function(s){const{uuid:a,name:c,entityType:d}=s.me,h={setContext(){throw new Error(e.environmentUnsupportedMessage)},addContextHandler(){throw new Error(e.environmentUnsupportedMessage)},getContextGroups(){throw new Error(e.environmentUnsupportedMessage)},joinContextGroup(){throw new Error(e.environmentUnsupportedMessage)},removeFromContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getAllClientsInContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getInfoForContextGroup(){throw new Error(e.environmentUnsupportedMessage)}},l=\"Interop API has not been instantiated. Either connection has failed or you have not declared interop in your config.\",u={setContext(){throw new Error(l)},addContextHandler(){throw new Error(l)},getContextGroups(){throw new Error(l)},joinContextGroup(){throw new Error(l)},removeFromContextGroup(){throw new Error(l)},getAllClientsInContextGroup(){throw new Error(l)},getInfoForContextGroup(){throw new Error(l)}},p={eventNames:()=>{throw new Error(e.environmentUnsupportedMessage)},emit:()=>{throw new Error(e.environmentUnsupportedMessage)},listeners:()=>{throw new Error(e.environmentUnsupportedMessage)},listenerCount:()=>{throw new Error(e.environmentUnsupportedMessage)},on:()=>{throw new Error(e.environmentUnsupportedMessage)},addListener:()=>{throw new Error(e.environmentUnsupportedMessage)},once:()=>{throw new Error(e.environmentUnsupportedMessage)},prependListener:()=>{throw new Error(e.environmentUnsupportedMessage)},prependOnceListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeAllListeners:()=>{throw new Error(e.environmentUnsupportedMessage)}};switch(d){case\"view\":return Object.assign(new t.View(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case\"window\":return Object.assign(new i._Window(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case\"iframe\":return Object.assign(new n._Frame(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case\"external connection\":return Object.assign(new r.ExternalApplication(s,{uuid:a}),o(d,a,c),{interop:u,isOpenFin:!1});default:return{...o(d,a,c),...p,interop:h,isOpenFin:!1}}}}(ki);var Li={},Ti={},$i={};Object.defineProperty($i,\"__esModule\",{value:!0}),$i.createWarningObject=$i.createUnusableObject=void 0,$i.createUnusableObject=function(e){const t=()=>{throw new Error(e)};return new Proxy({},{apply:t,construct:t,defineProperty:t,deleteProperty:t,get:t,getOwnPropertyDescriptor:t,getPrototypeOf:t,has:t,isExtensible:t,ownKeys:t,preventExtensions:t,set:t,setPrototypeOf:t})},$i.createWarningObject=function(e,t){return new Proxy(t,{get:(...t)=>(console.warn(e),Reflect.get(...t)),set:(...t)=>(console.warn(e),Reflect.set(...t)),getOwnPropertyDescriptor:(...t)=>(console.warn(e),Reflect.getOwnPropertyDescriptor(...t)),ownKeys:(...t)=>(console.warn(e),Reflect.ownKeys(...t))})};var Bi,Gi={},Wi={};var Hi={};!function(e){Object.defineProperty(e,\"__esModule\",{value:!0}),e.wrapIntentHandler=e.BROKER_ERRORS=e.generateOverrideWarning=e.generateOverrideError=e.wrapContextHandler=e.wrapInTryCatch=e.generateId=void 0;e.generateId=()=>`${Math.random()}${Date.now()}`;e.wrapInTryCatch=(e,t)=>(...n)=>{try{return e(...n)}catch(e){throw new Error((t||\"\")+e)}};e.wrapContextHandler=(e,t)=>async n=>{try{await e(n)}catch(e){throw console.error(`Error thrown by handler ${t} for context type ${n.type}: ${e}`),e}};e.generateOverrideError=(e,t)=>`You have tried to to use ${e} but ${t} has not been overridden in the Interop Broker. Please override this function. Refer to our documentation for more info.`;e.generateOverrideWarning=(e,t,n,i)=>{const{uuid:r,name:o}=n;return i?`Entity with identity: ${r}/${o} has called ${i} or ${e} but ${t} has not been overridden.`:`Entity with identity: ${r}/${o} has called ${e} but ${t} has not been overridden.`},e.BROKER_ERRORS={fireIntent:(0,e.generateOverrideError)(\"fireIntent\",\"handleFiredIntent\"),fireIntentForContext:(0,e.generateOverrideError)(\"fireIntentForContext\",\"handleFiredIntentForContext\"),getInfoForIntent:(0,e.generateOverrideError)(\"getInfoForIntent\",\"handleInfoForIntent\"),getInfoForIntentsByContext:(0,e.generateOverrideError)(\"getInfoForIntentsByContext\",\"handleInfoForIntentsByContext\"),joinSessionContextGroupWithJoinContextGroup:\"The Context Group you have tried to join is a Session Context Group. Custom Context Groups can only be defined by the Interop Broker through code or manifest configuration. Please use joinSessionContextGroup.\",fdc3Open:(0,e.generateOverrideError)(\"fdc3.open\",\"fdc3HandleOpen\"),fdc3FindInstances:(0,e.generateOverrideError)(\"fdc3.findInstances\",\"fdc3HandleFindInstances\"),fdc3GetAppMetadata:(0,e.generateOverrideError)(\"fdc3.getAppMetadata\",\"fdc3HandleGetAppMetadata\"),fdc3GetInfo:(0,e.generateOverrideError)(\"fdc3.getInfo\",\"fdc3HandleGetInfo\")};e.wrapIntentHandler=(e,t)=>async n=>{try{return e(n)}catch(e){throw console.error(`Error thrown by handler ${t}: ${e}`),e}}}(Hi);var Ni,Di,Ui={};function Vi(){if(Di)return Gi;Di=1;var e,t,n,r=s&&s.__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},o=s&&s.__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)},a=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Gi,\"__esModule\",{value:!0}),Gi.InteropBroker=void 0;const c=d,h=a(function(){if(Bi)return Wi;Bi=1,Object.defineProperty(Wi,\"__esModule\",{value:!0});const e=Cr();return Wi.default=class{constructor(e,t){this.provider=e,this.id=t,this.lastContext=void 0,this.contextGroupMap=new Map,this.clients=new Map,this.registerListeners()}registerListeners(){this.provider.register(`sessionContextGroup:getContext-${this.id}`,this.getCurrentContext.bind(this)),this.provider.register(`sessionContextGroup:setContext-${this.id}`,this.setContext.bind(this)),this.provider.register(`sessionContextGroup:handlerAdded-${this.id}`,this.handlerAdded.bind(this)),this.provider.register(`sessionContextGroup:handlerRemoved-${this.id}`,this.handlerRemoved.bind(this))}getCurrentContext(e){return e.type?this.contextGroupMap.get(e.type):this.lastContext}setContext(t,n){const{context:i}=t,r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name} not in Session Client State Map`);this.contextGroupMap.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{e.contextHandlers.get(i.type)?.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getClientState(e){return this.clients.get(e.endpointId)}async handlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(i){const e=r.contextHandlers.get(i)||[];r.contextHandlers.set(i,[...e,n]);const o=this.contextGroupMap.get(i);o&&await this.provider.dispatch(t,n,o)}else{r.globalHandler=n;const e=[...this.contextGroupMap.keys()].map((async e=>{const i=this.contextGroupMap.get(e);i&&await this.provider.dispatch(t,n,i)}));await Promise.all(e)}}handlerRemoved(e,t){const{handlerId:n}=e,i=this.clients.get(t.endpointId);i?(Array.from(i.contextHandlers).forEach((([,e])=>{const t=e.indexOf(n);t>-1&&e.splice(t,1)})),i.globalHandler===n&&(i.globalHandler=void 0)):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={contextHandlers:new Map,clientIdentity:e,globalHandler:void 0};this.clients.set(e.endpointId,t)}}onDisconnection(e){this.clients.delete(e.endpointId)}},Wi}()),l=Hi,u=a(i),p=function(){if(Ni)return Ui;Ni=1,Object.defineProperty(Ui,\"__esModule\",{value:!0}),Ui.PrivateChannelProvider=void 0;const e=Vi();return Ui.PrivateChannelProvider=class t{constructor(e,t){this.provider=e,this.id=t,this.clients=new Map,this.registerListeners(),this.contextByContextType=new Map,this.lastContext=void 0,this.provider.onConnection((e=>this.registerNewClient(e))),this.provider.onDisconnection((async e=>{const{endpointId:t}=e;this.clients.has(t)&&await this.handleClientDisconnecting(e),0===(await this.provider.getAllClientInfo()).length&&this.provider.destroy()}))}getClientState(e){return this.clients.get(e.endpointId)}registerListeners(){this.provider.register(\"broadcast\",this.broadcast.bind(this)),this.provider.register(\"getCurrentContext\",this.getCurrentContext.bind(this)),this.provider.register(\"contextHandlerAdded\",this.contextHandlerAdded.bind(this)),this.provider.register(\"contextHandlerRemoved\",this.contextHandlerRemoved.bind(this)),this.provider.register(\"nonStandardHandlerRemoved\",this.nonStandardHandlerRemoved.bind(this)),this.provider.register(\"onAddContextHandlerAdded\",this.onAddContextHandlerAdded.bind(this)),this.provider.register(\"onDisconnectHandlerAdded\",this.onDisconnectHandlerAdded.bind(this)),this.provider.register(\"onUnsubscribeHandlerAdded\",this.onUnsubscribeHandlerAdded.bind(this)),this.provider.register(\"clientDisconnecting\",((e,t)=>{this.handleClientDisconnecting(t)}))}broadcast(t,n){const{context:i}=t;if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name}, tried to call broadcast, is not connected to this Private Channel`);const r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to broadcast - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);this.contextByContextType.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{const t=e.handlerIdsByContextTypes.get(i.type);t&&t.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getCurrentContext(e,t){const{contextType:n}=e;if(!this.getClientState(t))throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call getCurrentContext, is not connected to this Private Channel`);if(void 0!==n){return this.contextByContextType.get(n)||null}return this.lastContext?this.lastContext:null}contextHandlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call addContextListener, is not connected to this Private Channel`);if(i){const e=r.handlerIdsByContextTypes.get(i)||[];r.handlerIdsByContextTypes.set(i,[...e,n])}else r.globalHandler=n;Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&e.onAddContextListenerHandlerId&&this.provider.dispatch(e.clientIdentity,e.onAddContextListenerHandlerId,i)}))}async contextHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);if(i){let e;if(i.globalHandler===n)i.globalHandler=void 0;else for(const[t,r]of i.handlerIdsByContextTypes){const i=r.indexOf(n);i>-1&&(r.splice(i,1),e=t)}const r=(await this.getConnectedClients()).map((async n=>{const{clientIdentity:i,clientIdentity:{endpointId:r},onUnsubscribeHandlerId:o}=n;r!==t.endpointId&&o&&await this.provider.dispatch(i,o,e)}));try{await Promise.all(r)}catch(e){throw console.error(`Problem when attempting to dispatch to onUnsubscribeHandlers. Error: ${e} Removing Client: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}`),new Error(e)}}else console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}.`)}nonStandardHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);i?i.onDisconnectHandlerId===n?i.onDisconnectHandlerId=void 0:i.onAddContextListenerHandlerId===n?i.onAddContextListenerHandlerId=void 0:i.onUnsubscribeHandlerId===n&&(i.onUnsubscribeHandlerId=void 0):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}onAddContextHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onAddContextListener, is not connected to this Private Channel`);n.onAddContextListenerHandlerId=i,Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&Array.from(e.handlerIdsByContextTypes.keys()).forEach((e=>{this.provider.dispatch(t,i,e)}))}))}onDisconnectHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onDisconnect, is not connected to this Private Channel`);n.onDisconnectHandlerId=i}onUnsubscribeHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onUnsubscribe, is not connected to this Private Channel`);n.onUnsubscribeHandlerId=i}removeClient(e){const t=this.getClientState(e);if(!t)throw new Error(`Client with Identity: ${e.uuid} ${e.name}, tried to call disconnect, is not connected to this Private Channel`);t.handlerIdsByContextTypes.clear(),this.clients.delete(e.endpointId)}async fireOnDisconnectForOtherClients(e){const{endpointId:t}=e,n=(await this.getConnectedClients()).map((async e=>{const{clientIdentity:{endpointId:n},onDisconnectHandlerId:i}=e;n!==t&&i&&await this.provider.dispatch(e.clientIdentity,i)}));try{await Promise.all(n)}catch(t){throw console.error(`Problem when attempting to dispatch to onDisconnectHandlers. Error: ${t} Disconnecting Client: uuid: ${e.uuid}. name: ${e.name}. endpointId: ${e.endpointId}`),new Error(t)}}async unsubscribeAll(e){const{endpointId:t}=e,n=this.clients.get(t);if(n){const t=Array.from(n.handlerIdsByContextTypes.values()).flat(),i=n.globalHandler;if(t.length>0){const n=t.map((async t=>this.contextHandlerRemoved({handlerId:t},e)));try{await Promise.all(n)}catch(e){console.error(e.message)}}if(i)try{await this.contextHandlerRemoved({handlerId:i},e)}catch(e){console.error(e.message)}}}async handleClientDisconnecting(e){await this.unsubscribeAll(e),this.removeClient(e),await this.fireOnDisconnectForOtherClients(e)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={clientIdentity:e,handlerIdsByContextTypes:new Map,globalHandler:void 0,onAddContextListenerHandlerId:void 0,onUnsubscribeHandlerId:void 0,onDisconnectHandlerId:void 0};this.clients.set(e.endpointId,t)}}async getConnectedClients(){const e=await this.provider.getAllClientInfo();return Array.from(this.clients.values()).filter((t=>{const{uuid:n,name:i}=t.clientIdentity;return e.some((e=>i===e.name&&n===e.uuid))}))}static init(e,n){return new t(e,n)}},Ui}(),w=G,y=[{id:\"green\",displayMetadata:{color:\"#00CC88\",name:\"green\"}},{id:\"purple\",displayMetadata:{color:\"#8C61FF\",name:\"purple\"}},{id:\"orange\",displayMetadata:{color:\"#FF8C4C\",name:\"orange\"}},{id:\"red\",displayMetadata:{color:\"#FF5E60\",name:\"red\"}},{id:\"pink\",displayMetadata:{color:\"#FF8FB8\",name:\"pink\"}},{id:\"yellow\",displayMetadata:{color:\"#E9FF8F\",name:\"yellow\"}}];let f=class i extends c.Base{constructor(i,s,a){super(i),e.set(this,void 0),t.set(this,void 0),n.set(this,void 0),this.getProvider=()=>o(this,n,\"f\").getValue(),this.interopClients=new Map,this.contextGroupsById=new Map,r(this,t,a.contextGroups??[...y],\"f\"),r(this,e,a.fdc3Info,\"f\"),a?.logging&&(this.logging=a.logging),this.intentClientMap=new Map,this.lastContextMap=new Map,this.sessionContextGroupMap=new Map,r(this,n,new w.Lazy(s),\"f\"),this.setContextGroupMap(),this.setupChannelProvider()}static createClosedConstructor(...e){return class extends i{constructor(...t){if(t.length){const[n,i,r]=t;if(r&&\"object\"==typeof r&&!(0,u.default)(r,e[2]))return console.warn(\"You have modified the parameters of the InteropOverride constructor. This behavior is deprecated and will be removed in a future version. You can modify these options in your manifest. Please consult our Interop docs for guidance on migrating to the new override scheme.\"),void super(e[0],e[1],r);console.warn(\"You are attempting to pass arguments to the InteropOverride constructor. This is not necessary, and these passed arguments will be ignored. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.\")}super(...e)}}}setContext({context:e},t){this.wire.sendAction(\"interop-broker-set-context\").catch((e=>{}));const n=this.getClientState(t);if(!n||!n.contextGroupId)throw n?new Error(\"You must join a context group before you can set context.\"):new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);{const{contextGroupId:t}=n;this.setContextForGroup({context:e},t)}}setContextForGroup({context:e},t){this.wire.sendAction(\"interop-broker-set-context-for-group\").catch((e=>{}));const n=this.contextGroupsById.get(t);if(!n)throw new Error(`Unable to set context for context group that isn't in the context group mapping: ${t}.`);const r=i.checkContextIntegrity(e);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(e)}`);const o=e.type;n.set(o,e),this.lastContextMap.set(t,o);Array.from(this.interopClients.values()).filter((e=>e.contextGroupId===t)).forEach((t=>{for(const[,n]of t.contextHandlers)i.isContextTypeCompatible(o,n.contextType)&&this.invokeContextHandler(t.clientIdentity,n.handlerId,e)}))}getCurrentContext(e,t){this.wire.sendAction(\"interop-broker-get-current-context\").catch((e=>{}));const n=this.getClientState(t);if(!n?.contextGroupId)throw new Error(\"You must be a member of a context group to call getCurrentContext\");const{contextGroupId:i}=n,r=this.contextGroupsById.get(i),o=this.lastContextMap.get(i),s=e?.contextType??o;return r&&s?r.get(s):void 0}async joinContextGroup({contextGroupId:e,target:t},n){if(this.wire.sendAction(\"interop-broker-join-context-group\").catch((e=>{})),this.sessionContextGroupMap.has(e))throw new Error(l.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup);if(t){i.hasEndpointId(t)&&await this.addClientToContextGroup({contextGroupId:e},t);try{const n=this.channel.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name));if(!n.length)throw new Error(`Given Identity ${t.uuid} ${t.name} is not connected to the Interop Broker.`);n.length>1&&console.warn(`More than one connection found for identity ${t.uuid} ${t.name}`);const i=[];for(const t of n)i.push(this.addClientToContextGroup({contextGroupId:e},t));await Promise.all(i)}catch(e){throw new Error(e)}}else await this.addClientToContextGroup({contextGroupId:e},n)}async addClientToContextGroup({contextGroupId:e},t){this.wire.sendAction(\"interop-broker-add-client-to-context-group\").catch((e=>{}));const n=this.getClientState(t);if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(!this.getContextGroups().find((t=>t.id===e)))throw new Error(`Attempting to join a context group that does not exist: ${e}. You may only join existing context groups.`);if(n.contextGroupId!==e){n.contextGroupId=e,await this.setCurrentContextGroupInClientOptions(t,e);const i=this.contextGroupsById.get(e);for(const[,e]of n.contextHandlers){const{contextType:n,handlerId:r}=e;if(void 0===n)i.forEach(((e,n)=>{this.invokeContextHandler(t,r,e)}));else if(i.has(n)){const e=i.get(n);e&&this.invokeContextHandler(t,r,e)}}}}async removeFromContextGroup({target:e},t){if(this.wire.sendAction(\"interop-broker-remove-from-context-group\").catch((e=>{})),e){i.hasEndpointId(e)&&await this.removeClientFromContextGroup(e);try{const t=this.channel.connections.filter((t=>t.uuid===e.uuid&&t.name===e.name));if(!t.length)throw new Error(`No connection found for given Identity ${e.uuid} ${e.name}`);t.length>1&&console.warn(`More than one connection found for identity ${e.uuid} ${e.name}`);const n=[];for(const e of t)n.push(this.removeClientFromContextGroup(e));await Promise.all(n)}catch(e){throw new Error(e)}}else await this.removeClientFromContextGroup(t)}async removeClientFromContextGroup(e){this.wire.sendAction(\"interop-broker-remove-client-from-context-group\").catch((e=>{}));const t=this.getClientState(e);t&&(t.contextGroupId=void 0),await this.setCurrentContextGroupInClientOptions(e,null)}getContextGroups(){return this.wire.sendAction(\"interop-broker-get-context-groups\").catch((e=>{})),o(this,t,\"f\").map((e=>({...e})))}getInfoForContextGroup({contextGroupId:e}){return this.wire.sendAction(\"interop-broker-get-info-for-context-group\").catch((e=>{})),this.getContextGroups().find((t=>t.id===e))}getAllClientsInContextGroup({contextGroupId:e}){this.wire.sendAction(\"interop-broker-get-all-clients-in-context-group\").catch((e=>{}));return Array.from(this.interopClients.values()).filter((t=>t.contextGroupId===e)).map((e=>e.clientIdentity))}async handleFiredIntent(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.raiseIntent\",\"InteropBroker.handleFiredIntent\",t,\"interopClient.fireIntent\");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntent)}async setIntentTarget(e,t){this.wire.sendAction(\"interop-broker-set-intent-target\").catch((e=>{}));const n=this.intentClientMap.get(t.name),i=`intent-handler-${e.name}`;if(n){const t=n.get(i);if(t){if(t.pendingIntents.push(e),t.clientIdentity&&t.isReady){const{clientIdentity:e,pendingIntents:n}=t;try{const r=n[n.length-1];await this.invokeIntentHandler(e,i,r),t.pendingIntents=[]}catch(n){console.error(`Error invoking intent handler for client ${e.uuid}/${e.name}/${e.endpointId}`),t.isReady=!1}}}else n.set(i,{isReady:!1,pendingIntents:[e]})}else{this.intentClientMap.set(t.name,new Map);const n=this.intentClientMap.get(t.name);n&&n.set(i,{isReady:!1,pendingIntents:[e]})}}async handleInfoForIntent(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.findIntent\",\"InteropBroker.handleInfoForIntent\",t,\"interopClient.getInfoForIntent\");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntent)}async handleInfoForIntentsByContext(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.findIntentsByContext\",\"InteropBroker.handleInfoForIntentsByContext\",t,\"interopClient.getInfoForIntentsByContext\");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntentsByContext)}async handleFiredIntentForContext(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.raiseIntentForContext\",\"InteropBroker.handleFiredIntentForContext\",t,\"interopClient.fireIntentForContext\");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntentForContext)}async clientDisconnected(e){}async fdc3HandleOpen({app:e,context:t},n){const i=(0,l.generateOverrideWarning)(\"fdc3.open\",\"InteropBroker.fdc3HandleOpen\",n);throw console.warn(i),new Error(l.BROKER_ERRORS.fdc3Open)}async fdc3HandleFindInstances(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.open\",\"InteropBroker.fdc3HandleFindInstances\",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3FindInstances)}async fdc3HandleGetAppMetadata(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.getAppMetadata\",\"InteropBroker.fdc3HandleGetAppMetadata\",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3GetAppMetadata)}async invokeContextHandler(e,t,n){const i=await this.getProvider();try{await i.dispatch(e,t,n)}catch(i){console.error(`Error invoking context handler ${t} for context type ${n.type} in client ${e.uuid}/${e.name}/${e.endpointId}`,i)}}async invokeIntentHandler(e,t,n){const i=await this.getProvider();await i.dispatch(e,t,n)}async fdc3HandleGetInfo(t,n){const{fdc3Version:i}=t;return{fdc3Version:i,...o(this,e,\"f\"),optionalFeatures:{OriginatingAppMetadata:!1,UserChannelMembershipAPIs:!0},appMetadata:{appId:\"\",instanceId:\"\"}}}async getAllClientInfo(){return(await this.getProvider()).getAllClientInfo()}decorateSnapshot(e){return{...e,interopSnapshotDetails:{contextGroupStates:this.getContextGroupStates()}}}applySnapshot(e,t){const n=e?.interopSnapshotDetails?.contextGroupStates;n&&(t?.closeExistingWindows||this.updateExistingClients(n),this.rehydrateContextGroupStates(n))}updateExistingClients(e){this.interopClients.forEach((t=>{const{clientIdentity:n,contextGroupId:r,contextHandlers:o}=t;if(r){const t=e[r];for(const[,e]of Object.entries(t))o.forEach((t=>{const{handlerId:r,contextType:o}=t;i.isContextTypeCompatible(e.type,o)&&this.invokeContextHandler(n,r,e)}))}}))}getContextGroupStates(){return i.toObject(this.contextGroupsById)}rehydrateContextGroupStates(e){const t=Object.entries(e);for(const[e,n]of t){const t=Object.entries(n);for(const[n,i]of t)if(this.contextGroupsById.has(e)){this.contextGroupsById.get(e).set(n,i)}else console.warn(`Attempting to set a context group that isn't in the context group mapping. Skipping context group rehydration for: ${e}`)}}contextHandlerRegistered({contextType:e,handlerId:t},n){const i={contextType:e,handlerId:t},r=this.getClientState(n);if(r?.contextHandlers.set(t,i),r&&r.contextGroupId){const{contextGroupId:i}=r,o=this.contextGroupsById.get(i);if(void 0===e)o.forEach(((e,i)=>{this.invokeContextHandler(n,t,e)}));else if(o.has(e)){const i=o.get(e);i&&this.invokeContextHandler(n,t,i)}}}async intentHandlerRegistered(e,t){const{handlerId:n}=e,i=this.intentClientMap.get(t.name),r=i?.get(n);if(i)if(r){const{pendingIntents:e}=r;r.clientIdentity=t,r.isReady=!0;try{if(e.length>0){const i=e[e.length-1];await this.invokeIntentHandler(t,n,i),r.pendingIntents=[]}}catch(e){console.error(`Error invoking intent handler: ${n} for client ${t.uuid}/${t.name}/${t.endpointId}`)}}else i.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t});else{this.intentClientMap.set(t.name,new Map);const e=this.intentClientMap.get(t.name);e&&e.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t})}}removeContextHandler({handlerId:e},t){const n=this.getClientState(t);n&&n.contextHandlers.delete(e)}handleJoinSessionContextGroup({sessionContextGroupId:e},t){try{if(!e)throw new Error(\"Failed to join session context group: must specify group id.\");const n=this.sessionContextGroupMap.get(e);if(n)n.registerNewClient(t);else{const n=new h.default(this.channel,e);n.registerNewClient(t),this.sessionContextGroupMap.set(e,n)}return{hasConflict:this.contextGroupsById.has(e)}}catch(e){throw new Error(e)}}getClientState(e){return this.interopClients.get(e.endpointId)}static toObject(e){const t=Object.fromEntries(e),n={};return Object.entries(t).forEach((([e,t])=>{const i=Object.fromEntries(t);n[e]=i})),n}static checkContextIntegrity(e){if(!e)return{isValid:!1,reason:\"No context supplied\"};if(\"object\"!=typeof e)return{isValid:!1,reason:\"Context must be an Object\"};if(!e.type)return{isValid:!1,reason:\"Context must have a type property\"};if(e.id&&\"object\"!=typeof e.id)return{isValid:!1,reason:\"Context id must be an Object populated with key-value identifiers (if set)\"};if(e.id){const{id:t}=e,n=Object.keys(t);let i=!1;if(!n.length)return{isValid:!1,reason:\"Context id must have at least one key-value identifier\"};if(n.forEach((e=>{\"string\"==typeof e&&\"string\"==typeof t[e]||(i=!0)})),i)return{isValid:!1,reason:\"Context id key-value identifiers must be of type string\"}}return e.name&&\"string\"!=typeof e.name?{isValid:!1,reason:\"Context name must be of string type (if set)\"}:{isValid:!0}}static hasEndpointId(e){return void 0!==e.endpointId}static isContextTypeCompatible(e,t){return void 0===t||e===t}setContextGroupMap(){for(const e of this.getContextGroups())this.contextGroupsById.set(e.id,new Map)}async setCurrentContextGroupInClientOptions(e,t){try{const n=await this.fin.System.getEntityInfo(e.uuid,e.name);let i;\"view\"===n.entityType?i=await this.fin.View.wrap(e):\"window\"===n.entityType&&(i=await this.fin.Window.wrap(e)),i&&await i.updateOptions({interop:{currentContextGroup:t}})}catch(e){}}async setupChannelProvider(){try{const e=await this.getProvider();this.channel=e,this.wireChannel(e)}catch(e){throw new Error(`Error setting up Interop Broker Channel Provider: ${e}`)}}wireChannel(e){e.onConnection((async(e,t)=>{if(!await this.isConnectionAuthorized(e,t))throw new Error(`Connection not authorized for ${e.uuid}, ${e.name}`);if(!e.endpointId)throw new Error(\"Version too old to be compatible with Interop. Please upgrade your runtime to a more recent version.\");const n={contextGroupId:void 0,contextHandlers:new Map,clientIdentity:e};t?.currentContextGroup&&this.contextGroupsById.has(t.currentContextGroup)&&(n.contextGroupId=t?.currentContextGroup),this.interopClients.set(e.endpointId,n)})),e.onDisconnection((e=>{this.interopClients.delete(e.endpointId);const t=this.intentClientMap.get(e.name);t&&e.uuid===this.fin.me.uuid&&t.forEach((e=>{e.isReady=!1})),this.sessionContextGroupMap.forEach((t=>{t.onDisconnection(e)})),this.clientDisconnected(e)})),e.beforeAction((async(e,t,n)=>{if(!await this.isActionAuthorized(e,t,n))throw new Error(`Action (${e}) not authorized for ${n.uuid}, ${n.name}`);this.logging?.beforeAction?.enabled&&console.log(e,t,n)})),e.afterAction(((e,t,n)=>{this.logging?.afterAction?.enabled&&console.log(e,t,n)})),e.register(\"setContext\",this.setContext.bind(this)),e.register(\"fireIntent\",this.handleFiredIntent.bind(this)),e.register(\"getCurrentContext\",this.getCurrentContext.bind(this)),e.register(\"getInfoForIntent\",this.handleInfoForIntent.bind(this)),e.register(\"getInfoForIntentsByContext\",this.handleInfoForIntentsByContext.bind(this)),e.register(\"fireIntentForContext\",this.handleFiredIntentForContext.bind(this)),e.register(\"getContextGroups\",this.getContextGroups.bind(this)),e.register(\"joinContextGroup\",this.joinContextGroup.bind(this)),e.register(\"removeFromContextGroup\",this.removeFromContextGroup.bind(this)),e.register(\"getAllClientsInContextGroup\",this.getAllClientsInContextGroup.bind(this)),e.register(\"getInfoForContextGroup\",this.getInfoForContextGroup.bind(this)),e.register(\"contextHandlerRegistered\",this.contextHandlerRegistered.bind(this)),e.register(\"intentHandlerRegistered\",this.intentHandlerRegistered.bind(this)),e.register(\"removeContextHandler\",this.removeContextHandler.bind(this)),e.register(\"sessionContextGroup:createIfNeeded\",this.handleJoinSessionContextGroup.bind(this)),e.register(\"fdc3Open\",this.fdc3HandleOpen.bind(this)),e.register(\"fdc3v2FindIntentsByContext\",this.handleInfoForIntentsByContext.bind(this)),e.register(\"fdc3FindInstances\",this.fdc3HandleFindInstances.bind(this)),e.register(\"fdc3GetAppMetadata\",this.fdc3HandleGetAppMetadata.bind(this)),e.register(\"fdc3v2GetInfo\",(async(e,t)=>this.fdc3HandleGetInfo.bind(this)(e,t))),e.register(\"createPrivateChannelProvider\",(async e=>{const{channelId:t}=e,n=await this.fin.InterApplicationBus.Channel.create(t);p.PrivateChannelProvider.init(n,t)}))}isConnectionAuthorized(e,t){return this.wire.sendAction(\"interop-broker-is-connection-authorized\").catch((e=>{})),Promise.resolve(!0)}isActionAuthorized(e,t,n){return this.wire.sendAction(\"interop-broker-is-action-authorized\").catch((e=>{})),Promise.resolve(!0)}};return Gi.InteropBroker=f,e=new WeakMap,t=new WeakMap,n=new WeakMap,Gi}var zi,Ki={},qi={},Ji=s&&s.__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},Yi=s&&s.__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)};Object.defineProperty(qi,\"__esModule\",{value:!0});const Zi=d,Qi=Hi;class Xi extends Zi.Base{constructor(e,t,n){super(e),zi.set(this,void 0),this.id=n,Ji(this,zi,t,\"f\")}async setContext(e){this.wire.sendAction(\"interop-session-context-group-set-context\").catch((e=>{}));return(await Yi(this,zi,\"f\")).dispatch(`sessionContextGroup:setContext-${this.id}`,{sessionContextGroupId:this.id,context:e})}async getCurrentContext(e){this.wire.sendAction(\"interop-session-context-group-get-context\").catch((e=>{}));return(await Yi(this,zi,\"f\")).dispatch(`sessionContextGroup:getContext-${this.id}`,{sessionContextGroupId:this.id,type:e})}async addContextHandler(e,t){if(this.wire.sendAction(\"interop-session-context-group-add-handler\").catch((e=>{})),\"function\"!=typeof e)throw new Error(\"Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.\");const n=await Yi(this,zi,\"f\");let i;return i=t?`sessionContextHandler:invoke-${this.id}-${t}-${(0,Qi.generateId)()}`:`sessionContextHandler:invoke-${this.id}`,n.register(i,(0,Qi.wrapContextHandler)(e,i)),await n.dispatch(`sessionContextGroup:handlerAdded-${this.id}`,{handlerId:i,contextType:t}),{unsubscribe:await this.createUnsubscribeCb(i)}}async createUnsubscribeCb(e){const t=await Yi(this,zi,\"f\");return async()=>{t.remove(e),await t.dispatch(`sessionContextGroup:handlerRemoved-${this.id}`,{handlerId:e})}}getUserInstance(){return{id:this.id,setContext:(0,Qi.wrapInTryCatch)(this.setContext.bind(this),\"Failed to set context: \"),getCurrentContext:(0,Qi.wrapInTryCatch)(this.getCurrentContext.bind(this),\"Failed to get context: \"),addContextHandler:(0,Qi.wrapInTryCatch)(this.addContextHandler.bind(this),\"Failed to add context handler: \")}}}qi.default=Xi,zi=new WeakMap;var er={},tr={},nr={},ir={},rr=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),or=s&&s.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,\"default\",{enumerable:!0,value:t})}:function(e,t){e.default=t}),sr=s&&s.__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)&&rr(t,e,n);return or(t,e),t};Object.defineProperty(ir,\"__esModule\",{value:!0}),ir.PrivateChannelClient=void 0;const ar=sr(Hi);var cr,dr;function hr(){if(cr)return tr;cr=1;var e,t=s&&s.__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)},n=s&&s.__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},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(tr,\"__esModule\",{value:!0}),tr.FDC3ModuleBase=void 0;const o=nr,a=Hi,c=wr(),d=r(i);return tr.FDC3ModuleBase=class{get client(){return t(this,e,\"f\").call(this)}get fin(){return this.wire.getFin()}constructor(t,i){this.wire=i,e.set(this,void 0),n(this,e,t,\"f\")}async broadcast(e){return this.wire.sendAction(\"fdc3-broadcast\").catch((e=>{})),this.client.setContext(e)}async _open(e,t){this.wire.sendAction(\"fdc3-open\").catch((e=>{}));try{return await c.InteropClient.ferryFdc3Call(this.client,\"fdc3Open\",{app:e,context:t})}catch(e){const t=e.message===a.BROKER_ERRORS.fdc3Open?\"ResolverUnavailable\":e.message;throw new Error(t)}}async _getChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:\"system\",...(0,o.getUnsupportedChannelApis)()})))}async getOrCreateChannel(e){this.wire.sendAction(\"fdc3-get-or-create-channel\").catch((e=>{}));const t=(await this._getChannels()).find((t=>t.id===e));if(t)return{...t,type:\"system\",...(0,o.getUnsupportedChannelApis)()};try{const t=await this.client.joinSessionContextGroup(e);return(0,o.buildAppChannelObject)(t)}catch(e){throw console.error(e.message),new Error(o.ChannelError.CreationFailed)}}async getSystemChannels(){return this.wire.sendAction(\"fdc3-get-system-channels\").catch((e=>{})),this._getChannels()}async joinChannel(e){this.wire.sendAction(\"fdc3-join-channel\").catch((e=>{}));try{return await this.client.joinContextGroup(e)}catch(e){if(e.message===a.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup?console.error(\"The Channel you have tried to join is an App Channel. Custom Channels can only be defined by the Interop Broker through code or manifest configuration. Please use getOrCreateChannel.\"):console.error(e.message),e.message.startsWith(\"Attempting to join a context group that does not exist\"))throw new Error(o.ChannelError.NoChannelFound);throw new Error(o.ChannelError.AccessDenied)}}async getCurrentChannel(){this.wire.sendAction(\"fdc3-get-current-channel\").catch((e=>{}));const e=await this.getCurrentContextGroupInfo();return e?this.buildChannelObject(e):null}async leaveCurrentChannel(){return this.wire.sendAction(\"fdc3-leave-current-channel\").catch((e=>{})),this.client.removeFromContextGroup()}async getCurrentContextGroupInfo(){const e=await this.client.getContextGroups(),t=e.map((async e=>this.client.getAllClientsInContextGroup(e.id))),n=(await Promise.all(t)).findIndex((e=>e.some((e=>{const{uuid:t,name:n}=e;return this.wire.me.uuid===t&&this.wire.me.name===n}))));return e[n]}async buildChannelObject(e){return{...e,type:\"system\",addContextListener:(...[e,t])=>{let n,i;\"function\"==typeof e?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),n=e):(n=t,\"string\"==typeof e&&(i=e));const r=(async()=>{let e=!0;const t=await this.client.getCurrentContext(i);return this.client.addContextHandler(((i,r)=>{if(!e||(e=!1,!(0,d.default)(t,i)))return n(i,r)}),i)})();return{...r,unsubscribe:()=>r.then((e=>e.unsubscribe()))}},broadcast:this.broadcast.bind(this),getCurrentContext:async e=>{const t=await this.client.getCurrentContext(e);return void 0===t?null:t}}}},e=new WeakMap,tr}ir.PrivateChannelClient=class{constructor(e,t){this.id=t,this.client=e,this.listeners=new Map}async broadcast(e){return this.client.dispatch(\"broadcast\",{context:e})}async getCurrentContext(e){return this.client.dispatch(\"getCurrentContext\",{contextType:e})}async addContextListener(e,t){if(\"function\"!=typeof t)throw new Error(\"Non-function argument passed to the second parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.\");let n;n=e?`contextHandler:invoke-${this.id}-${e}-${ar.generateId()}`:`contextHandler:invoke-${this.id}-${ar.generateId()}`,this.client.register(n,ar.wrapContextHandler(t,n));const i={unsubscribe:await this.createContextUnsubscribeCb(n)};return this.listeners.set(n,i),await this.client.dispatch(\"contextHandlerAdded\",{handlerId:n,contextType:e}),i}createNonStandardUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch(\"nonStandardHandlerRemoved\",{handlerId:e})}}createContextUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch(\"contextHandlerRemoved\",{handlerId:e})}}onAddContextListener(e){const t=`onContextHandlerAdded:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch(\"onAddContextHandlerAdded\",{handlerId:t}),n}onDisconnect(e){const t=`onDisconnect:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch(\"onDisconnectHandlerAdded\",{handlerId:t}),n}onUnsubscribe(e){const t=`onUnsubscribe:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch(\"onUnsubscribeHandlerAdded\",{handlerId:t}),n}async cleanUpAllSubs(){Array.from(this.listeners.keys()).forEach((e=>{this.client.remove(e),this.listeners.delete(e)}))}async disconnect(){try{await this.client.dispatch(\"clientDisconnecting\"),await this.cleanUpAllSubs(),await this.client.disconnect()}catch(e){throw new Error(e.message)}}},function(e){var t=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,\"__esModule\",{value:!0}),e.getIntentResolution=e.isChannel=e.isContext=e.connectPrivateChannel=e.buildAppChannelObject=e.buildPrivateChannelObject=e.ChannelError=e.ResultError=e.UnsupportedChannelApiError=e.getUnsupportedChannelApis=void 0;const n=Hi,r=ir,o=t(i);e.getUnsupportedChannelApis=e=>({addContextListener:()=>{throw new a(\"Channel.addContextListener\",e)},broadcast:()=>{throw new a(\"Channel.broadcast\",e)},getCurrentContext:()=>{throw new a(\"Channel.getCurrentContext\",e)}});class a extends Error{constructor(e,t=\"System\"){super(e),this.message=`Calling ${e} on an instance of a ${t} Channel returned by fdc3.get${t}Channels is not supported. If you would like to use a ${t} Channel, please use fdc3.joinChannel, fdc3.addContextListener, and fdc3.broadcast instead.`}}var c,d;e.UnsupportedChannelApiError=a,function(e){e.NoResultReturned=\"NoResultReturned\",e.IntentHandlerRejected=\"IntentHandlerRejected\"}(c=e.ResultError||(e.ResultError={})),(d=e.ChannelError||(e.ChannelError={})).NoChannelFound=\"NoChannelFound\",d.AccessDenied=\"AccessDenied\",d.CreationFailed=\"CreationFailed\";e.buildPrivateChannelObject=e=>{let t=!1;const n=()=>{if(t)throw new Error(\"Private Channel Client has been disconnected from the Private Channel\")};return{id:e.id,type:\"private\",broadcast:async t=>(n(),e.broadcast(t)),getCurrentContext:async t=>(n(),e.getCurrentContext(t)),addContextListener:async(t,i)=>{n();let r=i,o=t;\"function\"==typeof t&&(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),r=t,o=null);return e.addContextListener(o,r)},onAddContextListener:t=>(n(),e.onAddContextListener(t)),disconnect:async()=>(n(),t=!0,e.disconnect()),onDisconnect:t=>(n(),e.onDisconnect(t)),onUnsubscribe:t=>(n(),e.onUnsubscribe(t))}};e.buildAppChannelObject=e=>({id:e.id,type:\"app\",broadcast:e.setContext,getCurrentContext:async t=>{const n=await e.getCurrentContext(t);return void 0===n?null:n},addContextListener:(t,n)=>{let i,r;\"function\"==typeof t?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),i=t):(i=n,\"string\"==typeof t&&(r=t));const s=(async()=>{let t=!0;const n=await e.getCurrentContext(r);return e.addContextHandler(((e,r)=>{if(!t||(t=!1,!(0,o.default)(n,e)))return i(e,r)}),r)})();return{...s,unsubscribe:()=>s.then((e=>e.unsubscribe()))}}});e.connectPrivateChannel=async t=>{try{const n=await fin.InterApplicationBus.Channel.connect(t),i=new r.PrivateChannelClient(n,t);return(0,e.buildPrivateChannelObject)(i)}catch(e){throw new Error(`Private Channel with id: ${t} doesn't exist`)}};e.isContext=e=>{if(e&&\"object\"==typeof e&&\"type\"in e){const{type:t}=e;return\"string\"==typeof t}return!1};e.isChannel=e=>{if(e&&\"object\"==typeof e&&\"type\"in e&&\"id\"in e){const{type:t,id:n}=e;return\"string\"==typeof t&&\"string\"==typeof n&&(\"app\"===t||\"private\"===t)}return!1};e.getIntentResolution=async(t,i,r,o)=>{const s=(0,n.generateId)(),a=new Promise(((e,t)=>{fin.InterApplicationBus.subscribe({uuid:\"*\"},s,(t=>{e(t)})).catch((()=>t(new Error(\"getResult is not supported in this environment\"))))})),d=r?{target:r,intentResolutionResultId:s}:{intentResolutionResultId:s},h=o?{name:o,context:i,metadata:d}:{...i,metadata:d},l=async()=>{let n=await a;if(!n||\"object\"!=typeof n)throw new Error(c.NoResultReturned);const{error:i}=n;if(i)throw new Error(c.IntentHandlerRejected);if((0,e.isChannel)(n)){const{id:i,type:r}=n;switch(r){case\"private\":n=await(0,e.connectPrivateChannel)(i);break;case\"app\":{const r=await t.joinSessionContextGroup(i);n=(0,e.buildAppChannelObject)(r);break}}}else if(!(0,e.isContext)(n))throw new Error(c.NoResultReturned);return n},u=o?await t.fireIntent(h):await t.fireIntentForContext(h);return\"object\"!=typeof u?{source:{appId:\"\",instanceId:\"\"},intent:\"\",version:\"2.0\",getResult:l}:{...u,getResult:l}}}(nr);var lr,ur,pr={};function wr(){if(ur)return Ki;ur=1;var e,t,n=s&&s.__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},i=s&&s.__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)},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ki,\"__esModule\",{value:!0}),Ki.InteropClient=void 0;const o=d,a=r(qi),c=function(){if(dr)return er;dr=1,Object.defineProperty(er,\"__esModule\",{value:!0}),er.Fdc3Module=void 0;const e=Hi,t=hr();class n extends t.FDC3ModuleBase{async open(e,t){await super._open(e,t)}addContextListener(e,t){let n;return this.wire.sendAction(\"fdc3-add-context-listener\").catch((e=>{})),\"function\"==typeof e?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),n=this.client.addContextHandler(e)):n=this.client.addContextHandler(t,null===e?void 0:e),{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}addIntentListener(e,t){this.wire.sendAction(\"fdc3-add-intent-listener\").catch((e=>{}));const n=this.client.registerIntentHandler((e=>{const{context:n,metadata:i}=e,{metadata:r}=n,o=i?.intentResolutionResultId||r?.intentResolutionResultId;o&&this.fin.InterApplicationBus.publish(o,null).catch((()=>null)),t(e.context)}),e,{fdc3Version:\"1.2\"});return{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}async raiseIntent(t,n,i){this.wire.sendAction(\"fdc3-raise-intent\").catch((e=>{}));const r=i?{name:t,context:n,metadata:{target:i}}:{name:t,context:n};try{return await this.client.fireIntent(r)}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntent?\"ResolverUnavailable\":t.message;throw new Error(n)}}async findIntent(t,n){this.wire.sendAction(\"fdc3-find-intent\").catch((e=>{}));try{return await this.client.getInfoForIntent({name:t,context:n})}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntent?\"ResolverUnavailable\":t.message;throw new Error(n)}}async findIntentsByContext(t){this.wire.sendAction(\"fdc3-find-intents-by-context\").catch((e=>{}));try{return await this.client.getInfoForIntentsByContext(t)}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntentsByContext?\"ResolverUnavailable\":t.message;throw new Error(n)}}async raiseIntentForContext(t,n){this.wire.sendAction(\"fdc3-raise-intent-for-context\").catch((e=>{}));try{return await this.client.fireIntentForContext({...t,metadata:{target:n}})}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntentForContext?\"ResolverUnavailable\":t.message;throw new Error(n)}}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}getInfo(){return this.wire.sendAction(\"fdc3-get-info\").catch((e=>{})),{providerVersion:this.wire.environment.getAdapterVersionSync(),provider:`openfin-${this.wire.me.uuid}`,fdc3Version:\"1.2\"}}}return er.Fdc3Module=n,er}(),h=function(){if(lr)return pr;lr=1,Object.defineProperty(pr,\"__esModule\",{value:!0}),pr.Fdc3Module2=void 0;const e=hr(),t=Hi,n=wr(),i=nr,r=ir;class o extends e.FDC3ModuleBase{async open(e,t){return\"string\"==typeof e&&console.warn(\"Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).\"),super._open(e,t)}async findInstances(e){this.wire.sendAction(\"fdc3-find-instances\").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,\"fdc3FindInstances\",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3FindInstances?\"ResolverUnavailable\":e.message;throw new Error(n)}}async getAppMetadata(e){this.wire.sendAction(\"fdc3-get-app-metadata\").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,\"fdc3GetAppMetadata\",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3GetAppMetadata?\"ResolverUnavailable\":e.message;throw new Error(n)}}async addContextListener(e,t){this.wire.sendAction(\"fdc3-add-context-listener\").catch((e=>{}));const n=e=>t=>{const{contextMetadata:n,...i}=t,r=n?[{...i},n]:[t,null];e(...r)};let i=t,r=n(i);return\"function\"==typeof e?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),i=e,r=n(i),this.client.addContextHandler(r)):this.client.addContextHandler(r,null===e?void 0:e)}async findIntent(e,n,i){this.wire.sendAction(\"fdc3-find-intent\").catch((e=>{}));try{return await this.client.getInfoForIntent({name:e,context:n,metadata:{resultType:i}})}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntent?\"ResolverUnavailable\":e.message;throw new Error(n)}}async findIntentsByContext(e,i){this.wire.sendAction(\"fdc3-find-intents-by-context\").catch((e=>{}));const r=i?{context:e,metadata:{resultType:i}}:e;try{return await n.InteropClient.ferryFdc3Call(this.client,\"fdc3v2FindIntentsByContext\",r)}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntentsByContext?\"ResolverUnavailable\":e.message;throw new Error(n)}}async raiseIntent(e,n,r){this.wire.sendAction(\"fdc3-raise-intent\").catch((e=>{}));try{return\"string\"==typeof r&&console.warn(\"Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).\"),(0,i.getIntentResolution)(this.client,n,r,e)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?\"ResolverUnavailable\":e.message;throw new Error(n)}}async raiseIntentForContext(e,n){this.wire.sendAction(\"fdc3-raise-intent-for-context\").catch((e=>{}));try{return\"string\"==typeof n&&console.warn(\"Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).\"),(0,i.getIntentResolution)(this.client,e,n)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?\"ResolverUnavailable\":e.message;throw new Error(n)}}async addIntentListener(e,t){if(this.wire.sendAction(\"fdc3-add-intent-listener\").catch((e=>{})),\"string\"!=typeof e)throw new Error(\"First argument must be an Intent name\");return this.client.registerIntentHandler((async e=>{let n,i;const{context:r,metadata:o}=e,{contextMetadata:s,metadata:a,...c}=r,d=o?.intentResolutionResultId||a?.intentResolutionResultId;try{const e=a?{metadata:a,...c}:{...c};n=await t(e,s),i=n}catch(e){n=e,i={error:!0}}if(d&&this.fin.InterApplicationBus.publish(d,i).catch((()=>null)),n instanceof Error)throw new Error(n.message);return n}),e,{fdc3Version:\"2.0\"})}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}async createPrivateChannel(){const e=(0,t.generateId)();await n.InteropClient.ferryFdc3Call(this.client,\"createPrivateChannelProvider\",{channelId:e});const o=await this.fin.InterApplicationBus.Channel.connect(e),s=new r.PrivateChannelClient(o,e);return(0,i.buildPrivateChannelObject)(s)}async getUserChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:\"user\",...(0,i.getUnsupportedChannelApis)(\"User\")})))}async getSystemChannels(){return console.warn(\"This API has been deprecated. Please use fdc3.getUserChannels instead.\"),super.getSystemChannels()}async joinUserChannel(e){return super.joinChannel(e)}async joinChannel(e){return console.warn(\"This API has been deprecated. Please use fdc3.joinUserChannel instead.\"),super.joinChannel(e)}async getCurrentChannel(){const e=await super.getCurrentChannel();return e?{...e,type:\"user\",broadcast:this.broadcast.bind(this)}:null}async getInfo(){return n.InteropClient.ferryFdc3Call(this.client,\"fdc3v2GetInfo\",{fdc3Version:\"2.0\"})}}return pr.Fdc3Module2=o,pr}(),l=Hi;let u=class extends o.Base{constructor(i,r){super(i),e.set(this,void 0),t.set(this,void 0),n(this,t,new Map,\"f\"),n(this,e,r,\"f\")}async setContext(t){this.wire.sendAction(\"interop-client-set-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"setContext\",{context:t})}async addContextHandler(t,n){if(this.wire.sendAction(\"interop-client-add-context-handler\").catch((e=>{})),\"function\"!=typeof t)throw new Error(\"Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.\");const r=await i(this,e,\"f\");let o;o=n?`invokeContextHandler-${n}-${(0,l.generateId)()}`:\"invokeContextHandler\";const s=(0,l.wrapContextHandler)(t,o);return r.register(o,s),await r.dispatch(\"contextHandlerRegistered\",{handlerId:o,contextType:n}),{unsubscribe:async()=>{r.remove(o),await r.dispatch(\"removeContextHandler\",{handlerId:o})}}}async getContextGroups(){this.wire.sendAction(\"interop-client-get-context-groups\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getContextGroups\")}async joinContextGroup(t,n){this.wire.sendAction(\"interop-client-join-context-group\").catch((e=>{}));const r=await i(this,e,\"f\");if(!t)throw new Error(\"No contextGroupId specified for joinContextGroup.\");return r.dispatch(\"joinContextGroup\",{contextGroupId:t,target:n})}async removeFromContextGroup(t){this.wire.sendAction(\"interop-client-remove-from-context-group\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"removeFromContextGroup\",{target:t})}async getAllClientsInContextGroup(t){this.wire.sendAction(\"interop-client-get-all-clients-in-context-group\").catch((e=>{}));const n=await i(this,e,\"f\");if(!t)throw new Error(\"No contextGroupId specified for getAllClientsInContextGroup.\");return n.dispatch(\"getAllClientsInContextGroup\",{contextGroupId:t})}async getInfoForContextGroup(t){this.wire.sendAction(\"interop-client-get-info-for-context-group\").catch((e=>{}));const n=await i(this,e,\"f\");if(!t)throw new Error(\"No contextGroupId specified for getInfoForContextGroup.\");return n.dispatch(\"getInfoForContextGroup\",{contextGroupId:t})}async fireIntent(t){this.wire.sendAction(\"interop-client-fire-intent\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"fireIntent\",t)}async registerIntentHandler(t,n,r){this.wire.sendAction(\"interop-client-register-intent-handler\").catch((e=>{}));const o=await i(this,e,\"f\"),s=`intent-handler-${n}`,a=(0,l.wrapIntentHandler)(t,s);try{await o.register(s,a),await o.dispatch(\"intentHandlerRegistered\",{handlerId:s,...r})}catch(e){throw new Error(\"Unable to register intent handler\")}return{unsubscribe:async()=>{o.remove(s)}}}async getCurrentContext(t){this.wire.sendAction(\"interop-client-get-current-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getCurrentContext\",{contextType:t})}async getInfoForIntent(t){this.wire.sendAction(\"interop-client-get-info-for-intent\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getInfoForIntent\",t)}async getInfoForIntentsByContext(t){this.wire.sendAction(\"interop-client-get-info-for-intents-by-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getInfoForIntentsByContext\",t)}async fireIntentForContext(t){this.wire.sendAction(\"interop-client-fire-intent-for-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"fireIntentForContext\",t)}async joinSessionContextGroup(n){try{const r=i(this,t,\"f\").get(n);if(r)return r.getUserInstance();const o=await i(this,e,\"f\"),{hasConflict:s}=await o.dispatch(\"sessionContextGroup:createIfNeeded\",{sessionContextGroupId:n});s&&console.warn(`A (non-session) context group with the name \"${n}\" already exists. If you are trying to join a Context Group, call joinContextGroup instead.`);const c=new a.default(this.wire,i(this,e,\"f\"),n);return i(this,t,\"f\").set(n,c),c.getUserInstance()}catch(e){throw console.error(`Error thrown trying to create Session Context Group with id \"${n}\": ${e}`),e}}async onDisconnection(t){this.wire.sendAction(\"interop-client-add-ondisconnection-listener\").catch((e=>{}));return(await i(this,e,\"f\")).onDisconnection((e=>{const{uuid:n}=e;t({type:\"interop-broker\",topic:\"disconnected\",brokerName:n})}))}getFDC3Sync(e){switch(e){case\"1.2\":return new c.Fdc3Module((()=>this),this.wire);case\"2.0\":return new h.Fdc3Module2((()=>this),this.wire);default:throw new Error(`Invalid FDC3 version provided: ${e}. Must be '1.2' or '2.0'`)}}async getFDC3(e){return this.getFDC3Sync(e)}static async ferryFdc3Call(t,n,r){return(await i(t,e,\"f\")).dispatch(n,r||null)}};return Ki.InteropClient=u,e=new WeakMap,t=new WeakMap,Ki}var yr,fr,gr,mr={};function vr(){if(yr)return mr;yr=1,Object.defineProperty(mr,\"__esModule\",{value:!0}),mr.overrideCheck=mr.checkFDC32Overrides=mr.getDefaultViewFdc3VersionFromAppInfo=void 0;const e=Vi();function t(t){return[\"fdc3HandleFindInstances\",\"handleInfoForIntent\",\"handleInfoForIntentsByContext\",\"fdc3HandleGetAppMetadata\",\"fdc3HandleGetInfo\",\"fdc3HandleOpen\",\"handleFiredIntent\",\"handleFiredIntentForContext\"].filter((n=>t[n]===e.InteropBroker.prototype[n]))}return mr.getDefaultViewFdc3VersionFromAppInfo=function({manifest:e,initialOptions:t}){const n=e?.platform?.defaultViewOptions?.fdc3InteropApi??t.defaultViewOptions?.fdc3InteropApi;return[\"1.2\",\"2.0\"].includes(n??\"\")?n:void 0},mr.checkFDC32Overrides=t,mr.overrideCheck=function(e,n){if(n&&\"2.0\"===n){const n=t(e);n.length>0&&console.warn(`WARNING: FDC3 2.0 has been set as a default option for Views in this Platform, but the required InteropBroker APIs for FDC3 2.0 compliance have not all been overridden.\\nThe following APIs need to be overridden:\\n${n.join(\"\\n\")}`)}},mr}function Cr(){return gr||(gr=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),i=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),i(function(){if(fr)return Ti;fr=1;var e=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ti,\"__esModule\",{value:!0}),Ti.InteropModule=void 0;const t=e(n),i=$i,r=d,o=Vi(),a=wr(),c=vr(),h=Tn,l=e=>new e,u=\"You have attempted to use or modify InteropBroker parameters, which is not allowed. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.\";class p extends r.Base{async init(e,n=l){this.wire.sendAction(\"interop-init\").catch((()=>{}));const r=await this.wire.environment.getInteropInfo(this.wire.getFin()),s=(0,i.createUnusableObject)(u),a=(0,i.createWarningObject)(u,(0,t.default)(r)),d=async()=>{throw new Error(u)},p=o.InteropBroker.createClosedConstructor(this.wire,(()=>this.fin.InterApplicationBus.Channel.create(`interop-broker-${e}`)),r);let w;return w=Array.isArray(n)?new((0,h.overrideFromComposables)(...n)(p))(s,d,a):await n(p,s,d,a),(0,c.overrideCheck)(w,r.fdc3Version),w}connectSync(e,t){return this.wire.sendAction(\"interop-connect-sync\").catch((()=>{})),new a.InteropClient(this.wire,this.wire.environment.whenReady().then((()=>this.fin.InterApplicationBus.Channel.connect(`interop-broker-${e}`,{payload:t}))))}}return Ti.InteropModule=p,Ti}(),e),i(wr(),e),i(Vi(),e)}(Li)),Li}var br={},Ir={},Er={},xr={};Object.defineProperty(xr,\"__esModule\",{value:!0}),xr.getSnapshotSourceChannelName=void 0;xr.getSnapshotSourceChannelName=e=>`snapshot-source-provider-${e.uuid}`;var Ar,Pr,Mr,_r,Or,Sr=s&&s.__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},Rr=s&&s.__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)};Object.defineProperty(Er,\"__esModule\",{value:!0}),Er.SnapshotSource=void 0;const Fr=d,jr=xr,kr=new Map;class Lr extends Fr.Base{constructor(e,t){super(e),Ar.set(this,void 0),Pr.set(this,(()=>(kr.has(this.identity.uuid)||kr.set(this.identity.uuid,{eventFired:null,clientPromise:null}),kr.get(this.identity.uuid)))),Mr.set(this,(()=>(Rr(this,Pr,\"f\").call(this).clientPromise||(Rr(this,Pr,\"f\").call(this).clientPromise=Rr(this,_r,\"f\").call(this)),Rr(this,Pr,\"f\").call(this).clientPromise))),_r.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);try{Rr(this,Pr,\"f\").call(this).eventFired||await Rr(this,Or,\"f\").call(this);const t=await this.fin.InterApplicationBus.Channel.connect(e,{wait:!1});return t.onDisconnection((()=>{Rr(this,Pr,\"f\").call(this).clientPromise=null,Rr(this,Pr,\"f\").call(this).eventFired=null})),t}catch(e){throw Rr(this,Pr,\"f\").call(this).clientPromise=null,new Error(\"The targeted SnapshotSource is not currently initialized. Await this object's ready() method.\")}})),Or.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);let t,n;const i=new Promise(((e,i)=>{t=e,n=i}));Rr(this,Pr,\"f\").call(this).eventFired=i;const r=async i=>{try{i.channelName===e&&(t(),await this.fin.InterApplicationBus.Channel.removeListener(\"connected\",r))}catch(e){n(e)}};await this.fin.InterApplicationBus.Channel.on(\"connected\",r)})),Sr(this,Ar,t,\"f\")}get identity(){return Rr(this,Ar,\"f\")}async ready(){this.wire.sendAction(\"snapshot-source-ready\").catch((e=>{}));try{await Rr(this,Mr,\"f\").call(this)}catch(e){await Rr(this,Pr,\"f\").call(this).eventFired}}async getSnapshot(){this.wire.sendAction(\"snapshot-source-get-snapshot\").catch((e=>{}));const e=await Rr(this,Mr,\"f\").call(this),t=await e.dispatch(\"get-snapshot\");return(await t).snapshot}async applySnapshot(e){this.wire.sendAction(\"snapshot-source-apply-snapshot\").catch((e=>{}));return(await Rr(this,Mr,\"f\").call(this)).dispatch(\"apply-snapshot\",{snapshot:e})}}Er.SnapshotSource=Lr,Ar=new WeakMap,Pr=new WeakMap,Mr=new WeakMap,_r=new WeakMap,Or=new WeakMap,Object.defineProperty(Ir,\"__esModule\",{value:!0}),Ir.SnapshotSourceModule=void 0;const Tr=d,$r=Er,Br=xr;class Gr extends Tr.Base{async init(e){if(this.wire.sendAction(\"snapshot-source-init\").catch((e=>{})),\"object\"!=typeof e||\"function\"!=typeof e.getSnapshot||\"function\"!=typeof e.applySnapshot)throw new Error(\"you must pass in a valid SnapshotProvider\");const t=await this.fin.InterApplicationBus.Channel.create((0,Br.getSnapshotSourceChannelName)(this.fin.me));t.register(\"get-snapshot\",(async()=>({snapshot:await e.getSnapshot()}))),t.register(\"apply-snapshot\",(({snapshot:t})=>e.applySnapshot(t)))}wrapSync(e){return this.wire.sendAction(\"snapshot-source-wrap-sync\").catch((e=>{})),new $r.SnapshotSource(this.wire,e)}async wrap(e){return this.wire.sendAction(\"snapshot-source-wrap\").catch((e=>{})),this.wrapSync(e)}}Ir.SnapshotSourceModule=Gr,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Ir,e),n(Er,e)}(br),Object.defineProperty(a,\"__esModule\",{value:!0});var Wr=a.Fin=void 0;const Hr=t,Nr=c,Dr=ie(),Ur=Z(),Vr=de,zr=en,Kr=rn,qr=un,Jr=bn,Yr=J(),Zr=An,Qr=ki,Xr=Cr(),eo=br;class to extends Hr.EventEmitter{constructor(e){super(),this.wire=e,this.System=new Nr.System(e),this.Window=new Dr._WindowModule(e),this.Application=new Ur.ApplicationModule(e),this.InterApplicationBus=new Vr.InterApplicationBus(e),this.Clipboard=new zr.Clipboard(e),this.ExternalApplication=new Kr.ExternalApplicationModule(e),this.Frame=new qr._FrameModule(e),this.GlobalHotkey=new Jr.GlobalHotkey(e),this.Platform=new Zr.PlatformModule(e,this.InterApplicationBus.Channel),this.View=new Yr.ViewModule(e),this.Interop=new Xr.InteropModule(e),this.SnapshotSource=new eo.SnapshotSourceModule(e),e.registerFin(this),this.me=(0,Qr.getMe)(e),e.on(\"disconnected\",(()=>{this.emit(\"disconnected\")}))}}Wr=a.Fin=to;var no={},io={};function ro(e){return\"string\"==typeof e.manifestUrl}function oo(e){return ao(e)&&\"string\"==typeof e.address}function so(e){return oo(e)&&\"string\"==typeof e.token}function ao(e){return\"string\"==typeof e.uuid}function co(e){return e.runtime&&\"string\"==typeof e.runtime.version}function ho(e){return ao(e)&&co(e)}Object.defineProperty(io,\"__esModule\",{value:!0}),io.isInternalConnectConfig=io.isPortDiscoveryConfig=io.isNewConnectConfig=io.isConfigWithReceiver=io.isRemoteConfig=io.isExistingConnectConfig=io.isExternalConfig=void 0,io.isExternalConfig=ro,io.isExistingConnectConfig=oo,io.isRemoteConfig=so,io.isConfigWithReceiver=function(e){return\"object\"==typeof e.receiver&&so({...e,address:\"\"})},io.isNewConnectConfig=ho,io.isPortDiscoveryConfig=function(e){return ro(e)&&co(e)||ho(e)},io.isInternalConnectConfig=function(e){return oo(e)||ho(e)};var lo={},uo={};Object.defineProperty(uo,\"__esModule\",{value:!0}),uo.EmitterMap=void 0;const po=t;function wo(e){return Buffer.from(e).toString(\"base64\")}uo.EmitterMap=class{constructor(){this.storage=new Map}hashKeys(e){return e.map(wo).join(\"/\")}getOrCreate(e){const t=this.hashKeys(e);return this.storage.has(t)||this.storage.set(t,new po.EventEmitter),this.storage.get(t)}has(e){return this.storage.has(this.hashKeys(e))}delete(e){const t=this.hashKeys(e);return this.storage.delete(t)}},Object.defineProperty(lo,\"__esModule\",{value:!0});const yo=uo;class fo extends yo.EmitterMap{constructor(){super(...arguments),this.dispatchEvent=e=>{if(function(e){return\"process-desktop-event\"===e.action}(e)){const{payload:t}=e,n=function(e){const{topic:t}=e;if(\"frame\"===t||\"window\"===t||\"view\"===t){const{uuid:n,name:i}=e;return[t,n,i]}if(\"application\"===t){const{uuid:n}=e;return[t,n]}return[t]}(t);if(this.has(n))return this.getOrCreate(n).emit(t.type,t),!0}return!1}}}lo.default=fo;var go,mo,vo=s&&s.__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},Co=s&&s.__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)},bo=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(no,\"__esModule\",{value:!0});var Io=no.Transport=void 0;const Eo=t,xo=io,Ao=g,Po=bo(lo),Mo=ki,_o=ke;class Oo extends Eo.EventEmitter{constructor(e,t,n){super(),this.wireListeners=new Map,this.topicRefMap=new Map,this.eventAggregator=new Po.default,this.messageHandlers=[this.eventAggregator.dispatchEvent],go.set(this,void 0),mo.set(this,void 0),this.connectSync=()=>{Co(this,go,\"f\").connectSync()},this.getPort=()=>Co(this,go,\"f\").getPort(),vo(this,go,new e(this.onmessage.bind(this)),\"f\"),this.environment=t,this.sendRaw=Co(this,go,\"f\").send.bind(Co(this,go,\"f\")),this.registerMessageHandler(this.handleMessage.bind(this)),Co(this,go,\"f\").on(\"disconnected\",(()=>{for(const[,{handleNack:e}]of this.wireListeners)e({reason:\"Remote connection has closed\"});this.wireListeners.clear(),this.emit(\"disconnected\")}));const{uuid:i,name:r}=n,o=this.environment.getCurrentEntityType();this.me=(0,Mo.getBaseMe)(o,i,r)}getFin(){if(!Co(this,mo,\"f\"))throw new Error(\"No Fin object registered for this transport\");return Co(this,mo,\"f\")}registerFin(e){if(Co(this,mo,\"f\"))throw new Error(\"Fin object has already been registered for this transport\");vo(this,mo,e,\"f\")}shutdown(){return Co(this,go,\"f\").shutdown()}async connect(e){if((0,xo.isConfigWithReceiver)(e))return await Co(this,go,\"f\").connect(e.receiver),this.authorize(e);if((0,xo.isRemoteConfig)(e))return this.connectRemote(e);if((0,xo.isExistingConnectConfig)(e))return this.connectByPort(e);if((0,xo.isNewConnectConfig)(e)){const t=await this.environment.retrievePort(e);return this.connectByPort({...e,address:`ws://localhost:${t}`})}}async connectRemote(e){return await Co(this,go,\"f\").connect(new(this.environment.getWsConstructor())(e.address)),this.authorize(e)}async connectByPort(e){const{address:t,uuid:n}=e,i={...e,type:\"file-token\"},r=Co(this,go,\"f\");await r.connect(new(this.environment.getWsConstructor())(e.address));const o=await this.sendAction(\"request-external-authorization\",{uuid:n,type:\"file-token\"},!0);if(\"external-authorization-response\"!==o.action)throw new Ao.UnexpectedActionError(o.action);return await this.environment.writeToken(o.payload.file,o.payload.token),this.authorize(i)}async authorize(e){const t=await this.sendAction(\"request-authorization\",e,!0);if(\"authorization-response\"!==t.action)throw new Ao.UnexpectedActionError(t.action);if(!0!==t.payload.success)throw new Ao.RuntimeError(t.payload)}sendAction(e,t={},n=!1){let i=()=>{};const r=Ao.RuntimeError.getCallSite(1),o=this.environment.getNextMessageId(),s=new Promise(((s,a)=>{i=a;const c={action:e,payload:t,messageId:o},d=Co(this,go,\"f\");return this.addWireListener(o,s,(e=>this.nackHandler(e,a,r)),n),d.send(c).catch(a)}));return Object.assign(s,{cancel:i,messageId:o})}nackHandler(e,t,n){t(\"string\"==typeof e?e:new Ao.RuntimeError(e,n))}ferryAction(e){return new Promise(((t,n)=>{const i=this.environment.getNextMessageId();e.messageId=i;const r=e=>{t(e.payload)};return Co(this,go,\"f\").send(e).then((()=>this.addWireListener(i,r,(e=>this.nackHandler(e,n)),!1))).catch(n)}))}registerMessageHandler(e){this.messageHandlers.push(e)}addWireListener(e,t,n,i){i?this.uncorrelatedListener=t:this.wireListeners.has(e)?n({reason:\"Duplicate handler id\",error:(0,_o.errorToPOJO)(new Ao.DuplicateCorrelationError(String(e)))}):this.wireListeners.set(e,{resolve:t,handleNack:n})}onmessage(e){for(const t of this.messageHandlers)t.call(null,e)}handleMessage(e){const t=e.correlationId||NaN;if(\"correlationId\"in e){if(!this.wireListeners.has(t))return!1;{const{resolve:n,handleNack:i}=this.wireListeners.get(t);\"ack\"!==e.action?i({reason:\"Did not receive ack action\",error:(0,_o.errorToPOJO)(new Ao.NoAckError(e.action))}):\"payload\"in e?e.payload.success?n.call(null,e):i(e.payload):\"string\"==typeof e.reason?i(e):(console.warn(\"Received invalid response from core\",e),i({reason:\"invalid response shape\"})),this.wireListeners.delete(t)}}else this.uncorrelatedListener&&this.uncorrelatedListener.call(null,e),this.uncorrelatedListener=()=>{};return!0}}Io=no.Transport=Oo,go=new WeakMap,mo=new WeakMap;const So=(...e)=>({log:(...t)=>console.debug(`[${(new Date).toISOString()}]`,...(e=>e.map((e=>`[${e}]`)))(e),...t),getLogger:(...t)=>So(...e,...t)}),Ro=So(\"@openfin/core-web/client\");function Fo(e,t){if(!function(e){return\"string\"==typeof e}(e))throw new Error(`Property ${t} has invalid type. Expected string, got ${typeof e}.`)}const jo=\"web-broker-ports-ready\",ko=Ro.getLogger(\"get-web-interop-ports\");function Lo(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)}function To(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}\"function\"==typeof SuppressedError&&SuppressedError;const $o=e=>{var n,i,r;return r=class extends t.EventEmitter{constructor(t){super(),n.set(this,void 0),i.set(this,!1),this.connectSync=()=>{Lo(this,i,\"f\")||(e.addEventListener(\"message\",(e=>{e.data?.topic?.startsWith(\"wire-message\")&&e.data.message&&Lo(this,n,\"f\").call(this,{...JSON.parse(e.data.message),ports:e.ports})})),e.start())},this.connect=async()=>{this.connectSync()},this.send=t=>(e.postMessage({topic:\"wire-message\",message:JSON.stringify(t)}),Promise.resolve()),this.shutdown=async()=>{e.close()},To(this,n,t,\"f\")}getPort(){return e}},n=new WeakMap,i=new WeakMap,r};var Bo={},Go={};Object.defineProperty(Go,\"__esModule\",{value:!0}),Go.BaseEnvironment=void 0;const Wo=vr();Go.BaseEnvironment=class{async getViewWindowIdentity(e,t){const{identity:n}=await e.View.wrapSync(t).getCurrentWindow();return n}async getInteropInfo(e){const t=await e.Application.getCurrentSync().getInfo().catch((()=>null)),n=t?.initialOptions?.interopBrokerConfiguration??{};return{fdc3Version:t?(0,Wo.getDefaultViewFdc3VersionFromAppInfo)(t):void 0,...n,fdc3Info:{providerVersion:await e.System.getVersion(),provider:\"OpenFin\"}}}},Object.defineProperty(Bo,\"__esModule\",{value:!0});var Ho=Bo.BrowserEnvironment=void 0;const No=Go;class Do extends No.BaseEnvironment{constructor(){super(...arguments),this.type=\"other\",this.getRandomId=()=>{const e=new Uint32Array(1);return window.crypto.getRandomValues(e)[0].toString(32)}}getAdapterVersionSync(){return\"\"}observeBounds(e,t){throw new Error(\"Method not implemented.\")}layoutAllowedInContext(e){return!1}initLayoutManager(e,t,n){throw new Error(\"Method not implemented.\")}applyLayoutSnapshot(e,t,n){throw new Error(\"Method not implemented.\")}createLayout(e,t){throw new Error(\"Method not implemented.\")}destroyLayout(e,t){throw new Error(\"Method not implemented.\")}resolveLayout(e,t){throw new Error(\"Method not implemented.\")}initPlatform(...e){throw new Error(\"Method not implemented.\")}writeToken(e,t){return Promise.resolve(\"\")}retrievePort(e){throw new Error(\"Method not implemented.\")}getNextMessageId(){return this.getRandomId()}createChildContent(e){throw new Error(\"Method not implemented.\")}getWebWindow(e){throw new Error(\"Method not implemented.\")}getCurrentEntityIdentity(){throw new Error(\"Method not implemented.\")}getCurrentEntityType(){return\"external connection\"}raiseEvent(e,t){throw new Error(\"Method not implemented.\")}getUrl(){return location.href}getDefaultChannelOptions(){return{create:{},connect:{}}}getRtcPeer(){return new RTCPeerConnection}getWsConstructor(){return WebSocket}whenReady(){return Promise.resolve()}}Ho=Bo.BrowserEnvironment=Do;const Uo=e=>\"platform\"in e&&void 0!==e.platform;var Vo,zo;class Ko extends Ho{constructor(e){super(),this.connectConfig=e,Vo.set(this,void 0),zo.set(this,new W((async()=>Promise.resolve().then((function(){return require(\"./main-b14f67c9.js\")}))))),Uo(e)&&this.validatePlatformOptions(e)}getAdapterVersionSync(){return\"0.39.21\"}validatePlatformOptions({platform:e}){if(!(\"layoutSnapshot\"in e))throw new Error(\"Platform options are missing layoutSnapshot. Please provide a layoutSnapshot in the platform options.\");if(\"windows\"in e||\"windows\"in e.layoutSnapshot)throw new Error(\"It appears you tried to call connect() with a snapshot object from an OpenFin desktop environment. Note that connect() expects to be called with a platform property with this structure: { platform: { layoutSnapshot } }. To get a layoutSnapshot of the expected structure, use fin.Platform.Layout.getCurrentLayoutManagerSync().getLayoutSnapshot() in v34+ in your desktop environment.\");const{layouts:t}=e.layoutSnapshot;Object.entries(t).map((([e,t])=>{if(\"object\"!=typeof t||null===t)throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must be an object.`);if(!(\"content\"in t))throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must contain a 'content' property.`)}))}async getInteropInfo(e){return{...{contextGroups:void 0,logging:{beforeAction:{enabled:!1},afterAction:{enabled:!1}}},fdc3Version:void 0,fdc3Info:{providerVersion:\"0.39.21\",provider:\"OpenFin Web\"}}}layoutAllowedInContext(e){return!0}async initLayoutManager(e,t,n){if(Lo(this,Vo,\"f\"))throw new Error(\"Layout already initialized.\");if(!Uo(this.connectConfig))throw new Error(\"Platform options are missing from connection config.\");const{WebLayoutEntryPoint:i}=await Lo(this,zo,\"f\").getValue();return To(this,Vo,new i(this.connectConfig),\"f\"),await Lo(this,Vo,\"f\").initLayoutManager(e,t,n)}async applyLayoutSnapshot(e,t,n){Lo(this,Vo,\"f\")?.applyLayoutSnapshot(e,t,n)}async createLayout(e,t){return Lo(this,Vo,\"f\")?.createLayout(e,t)}async destroyLayout(e,t){return Lo(this,Vo,\"f\")?.destroyLayout(e,t)}async getViewWindowIdentity(e,t){return Promise.resolve({uuid:t.uuid,name:t.uuid})}}Vo=new WeakMap,zo=new WeakMap;const qo=()=>{const e=((e,t)=>{const n=new RegExp(`^${t}<(?.*)>$`).exec(e)?.groups?.meta;if(n)try{return JSON.parse(atob(n))}catch(e){throw new Error(`Failed to decode JSON from ${n}.`)}})(window.name,\"of-frame\");if(e)try{const{name:t,uuid:n,brokerUrl:i,providerId:r,contextGroup:o}=e;return Fo(i,\"brokerUrl\"),Fo(n,\"uuid\"),Fo(t,\"name\"),{identity:{name:t,uuid:n},brokerUrl:i,interopConfig:{providerId:r,currentContextGroup:o}}}catch(e){throw new Error(`Unexpected error occurred when inferring platform information: ${e.stack}`)}},Jo=()=>{const e=r.v4();return{uuid:e,name:e}},Yo=async e=>{if(\"enabled\"===e.connectionInheritance){const t=await(async e=>{const t=qo();if(t){const{validateOptions:n=(()=>!0)}=e,{identity:i,...r}=t;if(!await n(r))throw new Error(\"Parent options were rejected by validateOptions.\");return t}})(e);if(t)return t}if(!e.options){const t=\"enabled\"===e.connectionInheritance?\"Broker URL was not specified nor provided by a platform container.\":\"Connection inheritance is disabled but no options were provided.\";throw new Error(t)}return{...e.options,identity:Jo()}};exports.__classPrivateFieldGet=Lo,exports.__classPrivateFieldSet=To,exports.apiExposer=Gn,exports.commonjsGlobal=s,exports.connect=async t=>{try{Ro.log(\"Establishing connection\",t);const{brokerUrl:n,identity:i,timeout:r,interopConfig:s}=await Yo(t),{workerPort:a,iframeBrokerPort:c}=await(async(e,t,n)=>{const{origin:i}=new URL(e),r=document.createElement(\"IFRAME\");let s;r.style.display=\"none\";try{return await new Promise(((a,c)=>{const d=e=>{if(e.source===r.contentWindow&&e.data?.topic===`ack-${jo}`){if(e.origin!==i)c(new Error(`Broker redirected to unexpected origin ${e.origin}, expected ${i}.`));else if(e.data.success){const[t,n]=e.ports;a({iframeBrokerPort:t,workerPort:n})}else c(new m(e.data));window.removeEventListener(\"message\",d),clearTimeout(s)}};window.addEventListener(\"message\",d),ko.log(`Connecting to broker ${e}`),r.setAttribute(\"src\",e),r.setAttribute(\"name\",o(t,\"of-broker\")),document.body.appendChild(r),ko.log(\"Iframe loaded, awaiting init message from iframe\"),n&&(s=setTimeout((()=>{window.removeEventListener(\"message\",d),document.body.removeChild(r),c(new Error(\"Worker did not initialize in time\"))}),n))}))}catch(e){throw new Error(`Failed to initialise Fin Web Client. ${e.message}`,{cause:e})}})(n,i,r);Ro.log(\"Successfully established connection to shared worker\");const d={entityType:\"external connection\",...i};a.start(),c.start();const h=((t,n,i)=>{const r=$o(n),o=new Ko(t),s=new Io(r,o,i);return s.connectSync(),window.Buffer=e.Buffer,new Wr(s)})(t,a,d);return s?.providerId&&(h.me.interop=h.Interop.connectSync(s.providerId),s?.currentContextGroup&&h.me.interop.joinContextGroup(s.currentContextGroup).catch((e=>{console.warn(`Error joining specified context group: ${s?.currentContextGroup}, continuing`,e)}))),{...h,me:{...h.me,identity:{uuid:h.me.uuid,name:h.me.name}}}}catch(e){throw new Error(`An error occured during web-interop connection: ${e.message}`)}},exports.decorators=Nn,exports.encodeOptions=o,exports.layout_constants=ai,exports.lazy=G;\n","\"use strict\";var t=require(\"./main-8cad4070.js\"),e=require(\"uuid\");require(\"buffer/\"),require(\"events\"),require(\"lodash/cloneDeep\"),require(\"lodash/isEqual\");var i={},n={};Object.defineProperty(n,\"__esModule\",{value:!0}),n.mapValuesAsync=n.mapEntriesAsync=void 0;const o=(t,[e,i])=>({...t,[e]:i});async function s(t,e){return(await Promise.all(e.map((async([e,i])=>[e,await t(i,e)])))).reduce(o,{})}n.mapEntriesAsync=s,n.mapValuesAsync=async function(t,e){let i;return i=e instanceof Map?[...e.entries()]:Object.entries(e),s(t,i)};var r,a,l,h,d=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldSet||function(t,e,i,n,o){if(\"m\"===n)throw new TypeError(\"Private method is not writable\");if(\"a\"===n&&!o)throw new TypeError(\"Private accessor was defined without a setter\");if(\"function\"==typeof e?t!==e||!o:!e.has(t))throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");return\"a\"===n?o.call(t,i):o?o.value=i:e.set(t,i),i},c=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldGet||function(t,e,i,n){if(\"a\"===i&&!n)throw new TypeError(\"Private accessor was defined without a getter\");if(\"function\"==typeof e?t!==e||!n:!e.has(t))throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");return\"m\"===i?n:\"a\"===i?n.call(t):n?n.value:e.get(t)};Object.defineProperty(i,\"__esModule\",{value:!0});var m=i.DefaultLayoutManager=void 0;const u=n;class p{constructor(t){a.set(this,void 0),l.set(this,new Map),d(this,a,t,\"f\")}size(){return c(this,l,\"f\").size}async applyLayoutSnapshot({layouts:t}){if(Object.keys(t).length>1)throw new Error(\"[LayoutManager] Tried to call applyLayoutSnapshot with more than 1 layout. When implementing multiple layouts via overridden LayoutManager class, you must override and fully implement the applyLayoutSnapshot method without calling super.applyLayoutSnapshot().\");const[[e,i]]=Object.entries(t);await p.createLayout(this,{layoutName:e,layout:i})}async showLayout({layoutName:t}){}async getLayoutSnapshot(){return{layouts:await(0,u.mapValuesAsync)((t=>t.getFrameSnapshot()),c(this,l,\"f\"))}}async removeLayout({layoutName:t}){}getLayoutIdentityForView(t){const e=[...c(this,l,\"f\").values()].find((e=>e.getCurrentViews().some((e=>e.name===t.name&&e.uuid===t.uuid))));return e?.identity??void 0}isLayoutVisible({layoutName:t}){return c(p,r,\"m\",h).call(p,this,t).isVisible()}resolveLayoutIdentity(t){if(t&&\"layoutName\"in t)return t;const e=[...c(this,l,\"f\").values()];if(1===e.length)return e[0].identity;const i=e.find((t=>t.isVisible()));return i?.identity??void 0}static async resolveLayout(t,e){const i=t.resolveLayoutIdentity(e);if(void 0===i||!(\"layoutName\"in i))throw new Error(\"[layout-manager] resolveLayout: Could not resolve the layout identity. Make sure you include 'layoutName' in the identity object.\");return c(p,r,\"m\",h).call(p,t,i.layoutName)}static async handleSharedView(t,e,i){await(0,u.mapValuesAsync)((async t=>{if(t.identity.layoutName!==e.layoutName){const e=t.getCurrentViews().find((t=>t.name===i.name));e&&await t.onViewDetached({viewIdentity:e,target:null}).catch(console.error)}}),c(t,l,\"f\"))}static async handleLastViewRemoved(t,e){await t.removeLayout(e),await c(t,a,\"f\").handleLastViewRemoved(t)}static async destroyLayout(t,{layoutName:e}){await c(p,r,\"m\",h).call(p,t,e).destroy(),c(t,l,\"f\").delete(e)}static async createLayout(t,e){const{layoutName:i}=e;if(c(t,l,\"f\").has(i))throw new Error(`Layout name ${i} already exists`);await c(t,a,\"f\").createLayout(e,t)}static registerLayout(t,e,i){c(t,l,\"f\").set(e,i)}static getAllLayouts(t){return[...c(t,l,\"f\").values()]}static setInitialSnapshot(t,e){c(t,a,\"f\").setInitialSnapshot(e)}static createClosedConstructor(...t){return class extends p{constructor(){super(...t)}}}}m=i.DefaultLayoutManager=p,r=p,a=new WeakMap,l=new WeakMap,h=function(t,e){const i=c(t,l,\"f\").get(e);if(!i)throw new Error(`[layout-manager] getLayoutByName: Could not locate layout with name '${e}'`);return i};var g={},f={},v={};Object.defineProperty(v,\"__esModule\",{value:!0}),v.ReversibleMap=void 0;v.ReversibleMap=class{constructor(){this.valueToKey=new Map,this.keyToValue=new Map,this.setUnique=(t,e)=>{if(this.hasKey(t)||this.hasValue(e))throw new Error(\"Key or value already in the map.\");this.keyToValue.set(t,e),this.valueToKey.set(e,t)},this.getKey=t=>{const e=this.valueToKey.get(t);if(!e)throw new Error(\"Value not found in the map.\");return e},this.deleteKey=t=>{const e=this.getValue(t);return this.keyToValue.delete(t),this.valueToKey.delete(e),e},this.deleteValue=t=>{const e=this.getKey(t);return this.keyToValue.delete(e),this.valueToKey.delete(t),e},this.hasKey=t=>this.keyToValue.has(t),this.hasValue=t=>this.valueToKey.has(t)}getValue(t){const e=this.keyToValue.get(t);if(!e)throw new Error(\"Key not found in the map.\");return e}},Object.defineProperty(f,\"__esModule\",{value:!0});var _=f.LayoutContentCache=void 0;const y=t.lazy,C=v;class w{constructor(){this.contentItemCache=new C.ReversibleMap,this.contentItemCacheId=0,this.createCacheKey=()=>{const t=`entity-${this.contentItemCacheId.toString()}`;return this.contentItemCacheId+=1,t},this.hasKey=t=>this.contentItemCache.hasKey(t),this.getItemOrUndefined=t=>{try{return this.getContentItemOrThrow(t)}catch(t){return}},this.getContentItemOrThrow=(t,e)=>{if(!this.contentItemCache.hasKey(t))throw new Error(\"Layout component has been destroyed or detached from the current layout.\");const i=this.contentItemCache.getValue(t);if(e&&!e.includes(i.type))throw new Error(`Layout item is not the expected type. Expected ${e.join(\", \")}, got ${i.type}.`);return i},this.getOrCreateEntityId=t=>{if(this.contentItemCache.hasValue(t))return this.contentItemCache.getKey(t);t.onDestroyed((()=>{this.contentItemCache.deleteValue(t)}));const e=this.createCacheKey();return this.contentItemCache.setUnique(e,t),e}}static getSingleInstance(){return w.singleton.getValue()}}_=f.LayoutContentCache=w,w.singleton=new y.Lazy((()=>new w));var I={},b={};!function(t){Object.defineProperty(t,\"__esModule\",{value:!0}),t.getAdjacentStacks=t.doShareEdge=t.getAdjacentItem=void 0;t.getAdjacentItem=(e,i)=>{const{parent:n}=e;if(e.isRoot()||!n)return;const o=[\"top\",\"bottom\"].includes(i)?\"column\":\"row\",s=[\"top\",\"left\"].includes(i)?-1:1;if(n.type===o){const t=n.contentItems.indexOf(e)+s;if(t>=0&&t{const n=t.getBounds(),o=e.getBounds();if(!n||!o)return!1;if([\"top\",\"bottom\"].includes(i)){return!(n.righto.right)}return!(n.bottomo.bottom)};t.getAdjacentStacks=(e,i)=>{const n=[\"top\",\"bottom\"].includes(i)?\"row\":\"column\",o=s=>\"stack\"===s.type?(0,t.doShareEdge)(e,s,i)?[s]:[]:\"root\"===s.type||\"ground\"===s.type?[]:s.type===n?s.contentItems.map((t=>o(t))).flat():s.type!==n?[\"top\",\"right\"].includes(i)?o(s.contentItems[s.contentItems.length-1]):o(s.contentItems[0]):[],s=(0,t.getAdjacentItem)(e,i);return s?o(s):[]}}(b);var S=t.commonjsGlobal&&t.commonjsGlobal.__decorate||function(t,e,i,n){var o,s=arguments.length,r=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if(\"object\"==typeof Reflect&&\"function\"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(s<3?o(r):s>3?o(e,i,r):o(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};Object.defineProperty(I,\"__esModule\",{value:!0}),I.LayoutEntitiesController=void 0;const E=t.decorators,x=b,L=i;class z{constructor(t,e,i){this.wire=t,this.layoutManager=e,this.layoutContentCache=i,this.analytics=t=>{this.wire.sendAction(`layout-controller-${t}`).catch((()=>{}))},this.getLayoutIdentityForViewOrThrow=async t=>{const e=this.layoutManager.getLayoutIdentityForView(t);if(!e)throw new Error(`View identity ${t.name} is not attached to any layouts.`);return e},this.getRoot=async t=>{this.analytics(\"get-root\");const e=(await this.getLayout(t)).getRoot();return{type:e.type,entityId:this.layoutContentCache.getOrCreateEntityId(e)}},this.getStackByView=async t=>{this.analytics(\"get-stack-by-view\");const e=await this.getLayoutIdentityForViewOrThrow(t),i=(await this.getLayout(e)).getStackByView(t);if(\"stack\"===i?.type)return{entityId:this.layoutContentCache.getOrCreateEntityId(i),type:\"stack\"}},this.getStackViews=t=>{this.analytics(\"get-stack-views\");return this.layoutContentCache.getContentItemOrThrow(t,[\"stack\"]).contentItems.map((t=>({name:t.viewName,uuid:this.wire.me.uuid})))},this.isRoot=t=>{this.analytics(\"is-root\");return this.layoutContentCache.getContentItemOrThrow(t).isRoot()},this.exists=t=>(this.analytics(\"exists\"),this.layoutContentCache.hasKey(t)),this.addViewToStack=async(t,e,{index:i}={index:0})=>{this.analytics(\"add-view-to-stack\");const n=this.layoutContentCache.getContentItemOrThrow(t);if(i&&i>n.contentItems.length+1)throw new Error(`Index '${i}' out of range, please exclude the index or specify a number between 0 and ${n.contentItems.length}`);const o={id:t,index:i},{identity:s}=await n.layout.platformCreateView(e,{location:o});return s},this.findViewInStack=(t,e)=>t.contentItems.find((t=>t.viewName===e.name)),this.removeViewFromStack=async(t,e)=>{this.analytics(\"remove-view-from-stack\");const i=this.layoutContentCache.getContentItemOrThrow(t,[\"stack\"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to remove a view ('${e.name}') which does not belong to the stack.`);await n.layout.platformCloseView(e)},this.createAdjacentStack=async(t,e,{position:i=\"right\"}={})=>{if(this.analytics(\"create-adjacent-stack\"),!Array.isArray(e)||0===e.length)throw new Error('The parameter \"views\" must be an array with at least 1 element.');if(![\"top\",\"bottom\",\"left\",\"right\"].includes(i))throw new Error(`Invalid position '${i}' specified.`);const n=this.layoutContentCache.getContentItemOrThrow(t).createAdjacentStack({position:i}),o=this.layoutContentCache.getOrCreateEntityId(n);return await Promise.all(e.reverse().map((t=>this.addViewToStack(o,t)))),o},this.getAdjacentStacks=async({targetId:t,edge:e})=>{this.analytics(\"get-adjacent-stacks\");const i=this.layoutContentCache.getContentItemOrThrow(t);return(0,x.getAdjacentStacks)(i,e).map((t=>({entityId:this.layoutContentCache.getOrCreateEntityId(t)})))},this.setStackActiveView=async(t,e)=>{this.analytics(\"set-stack-active-view\");const i=this.layoutContentCache.getContentItemOrThrow(t,[\"stack\"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to set a view ('${e.name}') as active when it does not belong to the stack.`);i.setActiveContentItem(n,!0)}}async getLayout(t){const e=await L.DefaultLayoutManager.resolveLayout(this.layoutManager,t);if(!e)throw new Error(`Could not resolve target layout identity ${JSON.stringify(t)}`);return e}getContent(t){this.analytics(\"get-content\");return this.layoutContentCache.getContentItemOrThrow(t,[\"column\",\"row\"]).contentItems.map((t=>({type:t.type,entityId:this.layoutContentCache.getOrCreateEntityId(t)})))}getParent(t){this.analytics(\"get-parent\");const e=this.layoutContentCache.getContentItemOrThrow(t);if(!e.isRoot())return e.parent?.contentItems.includes(e)?{type:e.parent.type,entityId:this.layoutContentCache.getOrCreateEntityId(e.parent)}:void 0}}S([(0,E.expose)()],z.prototype,\"getLayoutIdentityForViewOrThrow\",void 0),S([(0,E.expose)()],z.prototype,\"getRoot\",void 0),S([(0,E.expose)()],z.prototype,\"getStackByView\",void 0),S([(0,E.expose)()],z.prototype,\"getStackViews\",void 0),S([(0,E.expose)()],z.prototype,\"getContent\",null),S([(0,E.expose)()],z.prototype,\"getParent\",null),S([(0,E.expose)()],z.prototype,\"isRoot\",void 0),S([(0,E.expose)()],z.prototype,\"exists\",void 0),S([(0,E.expose)()],z.prototype,\"addViewToStack\",void 0),S([(0,E.expose)()],z.prototype,\"removeViewFromStack\",void 0),S([(0,E.expose)()],z.prototype,\"createAdjacentStack\",void 0),S([(0,E.expose)()],z.prototype,\"getAdjacentStacks\",void 0),S([(0,E.expose)()],z.prototype,\"setStackActiveView\",void 0),I.LayoutEntitiesController=z,Object.defineProperty(g,\"__esModule\",{value:!0});var M=g.initLayoutEndpoints=void 0;const P=t.apiExposer,T=t.layout_constants,A=f,k=I,D=i;M=g.initLayoutEndpoints=async function(t,e){const i=t.getFin(),n=await i.Platform.getCurrentSync().getClient(),o=new P.ChannelsExposer(n);await new P.ApiExposer(o).exposeInstance(new k.LayoutEntitiesController(t,e,A.LayoutContentCache.getSingleInstance()),{id:T.LAYOUT_CONTROLLER_ID}),await async function(t,e){const i=t=>async i=>{const n=await D.DefaultLayoutManager.resolveLayout(e,i.target);if(!n)throw new Error(`Could not resolve the layout target from payload ${JSON.stringify(i)}`);return t(n,i)},n=(e,n)=>{t.register(e,i(n))},o=(t,e)=>{n(t,e)};n(\"replace-view\",((t,e)=>t.replaceView(e))),n(\"replace-layout\",((t,{layout:e})=>t.replaceLayout(e))),n(\"add-view\",((t,e)=>t.insertView(e))),o(\"layout-add-view\",((t,{viewOptions:e,location:i,targetView:n})=>t.platformCreateView(e,{location:i,targetView:n}))),n(\"close-view\",((t,e)=>t.cleanupView(e.viewIdentity))),o(\"layout-close-view\",((t,e)=>t.platformCloseView(e.viewIdentity))),n(\"apply-preset-layout\",((t,e)=>t.applyPreset(e))),n(\"get-layout-views\",(t=>t.getCurrentViews())),n(\"get-frame-snapshot\",(t=>t.getFrameSnapshot())),n(\"is-visible\",(t=>t.isVisible())),n(\"destroy\",(t=>t.destroy())),t.register(\"get-layout-snapshot\",(()=>e.getLayoutSnapshot()))}(n,e)};var R={};Object.defineProperty(R,\"__esModule\",{value:!0});var U=R.BaseLayout=void 0;U=R.BaseLayout=class{};var O={};Object.defineProperty(O,\"__esModule\",{value:!0});var V=O.DOMEmitter=void 0;V=O.DOMEmitter=class{constructor(t){this.container=t}dispatchLocalEvent(t,e){const i={...e,type:t,tabSelector:`tab-${e.name}`,containerSelector:`container-${e.name}`,topic:\"openfin-DOM-event\"};this.container.dispatchEvent(new CustomEvent(t,{detail:i}))}};var B={};Object.defineProperty(B,\"__esModule\",{value:!0});var H=B.mapLayoutContentItemsImmutableSync=B.mapLayoutContentItemsImmutable=W=B.isVisible=void 0;var W=B.isVisible=t=>(0!==t.offsetWidth||0!==t.offsetHeight)&&\"hidden\"!==window.getComputedStyle(t).visibility&&t.offsetTop>=0&&t.offsetLeft>=0&&t.offsetTop<=window.innerHeight&&t.offsetLeft<=window.innerWidth;const F=t=>\"type\"in t&&\"component\"===t.type;B.mapLayoutContentItemsImmutable=async function t(e,i){return F(i)?e(i):{...i,content:await Promise.all(i.content?.map((i=>t(e,i))))}},H=B.mapLayoutContentItemsImmutableSync=function t(e,i){return F(i)?e(i):{...i,content:i.content?.map((i=>t(e,i)))}};class N extends Error{constructor(t,e){super(e),this.type=t}}class G extends N{constructor(t,e){super(\"Configuration\",t),this.node=e}}class j extends N{constructor(t){super(\"PopoutBlocked\",t)}}class $ extends N{constructor(t){super(\"API\",t)}}class Z extends N{constructor(t){super(\"Bind\",t)}}class q extends Error{constructor(t,e,i){super(`${t}: ${e}${void 0===i?\"\":\": \"+i}`)}}class X extends q{constructor(t,e){super(\"Assert\",t,e)}}class Y extends q{constructor(t,e,i){super(\"UnreachableCase\",t,`${e}${void 0===i?\"\":\": \"+i}`)}}class K extends q{constructor(t,e){super(\"UnexpectedNull\",t,e)}}class J extends q{constructor(t,e){super(\"UnexpectedUndefined\",t,e)}}var Q;!function(t){let e=!1;const i={PopoutCannotBeCreatedWithGroundItemConfig:{id:0,default:\"Popout cannot be created with ground ItemConfig\"},PleaseRegisterAConstructorFunction:{id:1,default:\"Please register a constructor function\"},ComponentTypeNotRegisteredAndBindComponentEventHandlerNotAssigned:{id:2,default:\"Component type not registered and BindComponentEvent handler not assigned\"},ComponentIsAlreadyRegistered:{id:3,default:\"Component is already registered\"},ComponentIsNotVirtuable:{id:4,default:\"Component is not virtuable. Requires rootHtmlElement field/getter\"},VirtualComponentDoesNotHaveRootHtmlElement:{id:5,default:'Virtual component does not have getter \"rootHtmlElement\"'},ItemConfigIsNotTypeComponent:{id:6,default:\"ItemConfig is not of type component\"},InvalidNumberPartInSizeString:{id:7,default:\"Invalid number part in size string\"},UnknownUnitInSizeString:{id:8,default:\"Unknown unit in size string\"},UnsupportedUnitInSizeString:{id:9,default:\"Unsupported unit in size string\"}};t.idCount=Object.keys(i).length;const n=Object.values(i);t.checkInitialise=function(){if(!e)for(let e=0;e=\"0\"&&t<=\"9\"}function Tt(t,e){const i=zt(e);t.style.width=i}function At(t,e){const i=zt(e);t.style.height=i}function kt(t){return{width:t.offsetWidth,height:t.offsetHeight}}function Dt(t,e){t.style.display=e?\"\":\"none\"}function Rt(t,e){if(void 0!==e)for(const i in e)if(e.hasOwnProperty(i)){const n=e[i],o=t[i];t[i]=Ut(o,n)}return t}function Ut(t,e){if(\"object\"!=typeof e)return e;if(Array.isArray(e)){const t=e.length,i=new Array(t);for(let n=0;n36)throw new Error(\"Too many keys in config minifier map\")},t.translateObject=n}(dt||(dt={})),function(t){t.defaults={type:at.ground,content:[],size:1,sizeUnit:ht.Fractional,minSize:void 0,minSizeUnit:ht.Pixel,id:\"\",isClosable:!0},t.createCopy=function(t,e){switch(t.type){case at.ground:case at.row:case at.column:return gt.createCopy(t,e);case at.stack:return ut.createCopy(t,e);case at.component:return pt.createCopy(t);default:throw new Y(\"CICC91354\",t.type,\"Invalid Config Item type specified\")}},t.createDefault=function(t){switch(t){case at.ground:throw new X(\"CICCDR91562\");case at.row:case at.column:return gt.createDefault(t);case at.stack:return ut.createDefault();case at.component:return pt.createDefault();default:throw new Y(\"CICCDD91563\",t,\"Invalid Config Item type specified\")}},t.isComponentItem=function(t){return t.type===at.component},t.isStackItem=function(t){return t.type===at.stack},t.isGroundItem=function(t){return t.type===at.ground}}(ct||(ct={})),function(t){t.defaultMaximised=!1,function(t){t.createCopy=function(t,e){return void 0===t?void 0:{show:null!=e?e:t.show,popout:t.popout,close:t.close,maximise:t.maximise,minimise:t.minimise,tabDropdown:t.tabDropdown}}}(t.Header||(t.Header={}))}(mt||(mt={})),function(t){function e(t){const e=t.length,i=new Array(e);for(let n=0;n\"__glMaximised\"===t));t>0&&(o=!0,n=n.splice(t,1)),e=n.length>0?n[0]:ct.defaults.id}else e=n;return i=void 0!==t.maximised?t.maximised:o,{id:e,maximised:i}}}(wt||(wt={})),function(t){function e(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0;return{resolved:!0,root:Et.resolve(i),openPopouts:t.resolveOpenPopouts(e.openPopouts),dimensions:t.Dimensions.resolve(e.dimensions),settings:t.Settings.resolve(e.settings),header:t.Header.resolve(e.header,e.settings,e.labels)}}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:Lt.fromResolvedArray(e.openPopouts),settings:_t.Settings.createCopy(e.settings),dimensions:t.Dimensions.fromResolved(e.dimensions),header:_t.Header.createCopy(e.header)}},t.isResolved=function(t){const e=t;return void 0!==e.resolved&&!0===e.resolved},t.resolveOpenPopouts=function(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0,{root:Et.resolve(o),openPopouts:xt.resolveOpenPopouts(e.openPopouts),dimensions:xt.Dimensions.resolve(e.dimensions),settings:xt.Settings.resolve(e.settings),header:xt.Header.resolve(e.header,e.settings,e.labels),parentId:null!==(i=e.parentId)&&void 0!==i?i:null,indexInParent:null!==(n=e.indexInParent)&&void 0!==n?n:null,window:t.Window.resolve(e.window,e.dimensions),resolved:!0}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:i(e.openPopouts),dimensions:xt.Dimensions.fromResolved(e.dimensions),settings:_t.Settings.createCopy(e.settings),header:_t.Header.createCopy(e.header),parentId:e.parentId,indexInParent:e.indexInParent,window:t.Window.fromResolved(e.window)}},t.fromResolvedArray=i}(Lt||(Lt={}));class Wt{constructor(){this._allEventSubscriptions=[],this._subscriptionsMap=new Map,this.unbind=this.removeEventListener,this.trigger=this.emit}tryBubbleEvent(t,e){}emit(t,...e){let i=this._subscriptionsMap.get(t);if(void 0!==i){i=i.slice();for(let t=0;t0){const n=e.slice();n.unshift(t);const o=this._allEventSubscriptions.slice();for(let t=0;t0?n.contentItems[0]:n,e=0);const o=this._layoutManager.createAndInitContentItem(i,t);t.addChild(o,e),this._layoutManager.layoutConfig.settings.popInOnClose?this._onClose():this.close()}createWindow(){const t=this.createUrl(),e=Math.floor(1e6*Math.random()).toString(36),i=this.serializeWindowFeatures({width:this._initialWindowSize.width,height:this._initialWindowSize.height,innerWidth:this._initialWindowSize.width,innerHeight:this._initialWindowSize.height,menubar:\"no\",toolbar:\"no\",location:\"no\",personalbar:\"no\",resizable:\"yes\",scrollbars:\"no\",status:\"no\"});if(this._popoutWindow=globalThis.open(t,e,i),this._popoutWindow)this._popoutWindow.addEventListener(\"load\",(()=>this.positionWindow()),{passive:!0}),this._popoutWindow.addEventListener(\"beforeunload\",(()=>{this._layoutManager.layoutConfig.settings.popInOnClose?this.popIn():this._onClose()}),{passive:!0}),this._checkReadyInterval=setInterval((()=>this.checkReady()),10);else if(!0===this._layoutManager.layoutConfig.settings.blockedPopoutsThrowError){throw new j(\"Popout blocked\")}}checkReady(){if(null===this._popoutWindow)throw new K(\"BPCR01844\");this._popoutWindow.__glInstance&&this._popoutWindow.__glInstance.isInitialised&&(this.onInitialised(),void 0!==this._checkReadyInterval&&(clearInterval(this._checkReadyInterval),this._checkReadyInterval=void 0))}serializeWindowFeatures(t){const e=[];for(const i in t)e.push(i+\"=\"+t[i].toString());return e.join(\",\")}createUrl(){const t=\"gl-window-config-\"+Ot(),e=_t.minifyConfig(this._config);try{localStorage.setItem(t,JSON.stringify(e))}catch(t){throw new Error(\"Error while writing to localStorage \"+function(t){return t instanceof Error?t.message:\"string\"==typeof t?t:\"Unknown Error\"}(t))}const i=new URL(location.href);return i.searchParams.set(\"gl-window\",t),i.toString()}positionWindow(){if(null===this._popoutWindow)throw new Error(\"BrowserPopout.positionWindow: null popoutWindow\");this._popoutWindow.moveTo(this._initialWindowSize.left,this._initialWindowSize.top),this._popoutWindow.focus()}onInitialised(){this._isInitialised=!0,this.getGlInstance().on(\"popIn\",(()=>this.popIn())),this.emit(\"initialised\")}_onClose(){setTimeout((()=>this.emit(\"closed\")),50)}}class Gt extends Wt{constructor(t,e,i,n){super(),this.layoutManager=t,this._parent=i,this._element=n,this._popInParentIds=[],this._type=e.type,this._id=e.id,this._isInitialised=!1,this.isGround=!1,this.isRow=!1,this.isColumn=!1,this.isStack=!1,this.isComponent=!1,this.size=e.size,this.sizeUnit=e.sizeUnit,this.minSize=e.minSize,this.minSizeUnit=e.minSizeUnit,this._isClosable=e.isClosable,this._pendingEventPropagations={},this._throttledEvents=[\"stateChanged\"],this._contentItems=this.createContentItems(e.content)}get type(){return this._type}get id(){return this._id}set id(t){this._id=t}get popInParentIds(){return this._popInParentIds}get parent(){return this._parent}get contentItems(){return this._contentItems}get isClosable(){return this._isClosable}get element(){return this._element}get isInitialised(){return this._isInitialised}static isStack(t){return t.isStack}static isComponentItem(t){return t.isComponent}static isComponentParentableItem(t){return t.isStack||t.isGround}removeChild(t,e=!1){const i=this._contentItems.indexOf(t);if(-1===i)throw new Error(\"Can't remove child item. Unknown content item\");if(e||this._contentItems[i].destroy(),this._contentItems.splice(i,1),this._contentItems.length>0)this.updateSize(!1);else if(!this.isGround&&!0===this._isClosable){if(null===this._parent)throw new K(\"CIUC00874\");this._parent.removeChild(this)}}addChild(t,e,i){return null!=e||(e=this._contentItems.length),this._contentItems.splice(e,0,t),t.setParent(this),!0===this._isInitialised&&!1===t._isInitialised&&t.init(),e}replaceChild(t,e,i=!1){const n=this._contentItems.indexOf(t),o=t._element.parentNode;if(-1===n)throw new X(\"CIRCI23232\",\"Can't replace child. oldChild is not child of this\");if(null===o)throw new K(\"CIRCP23232\");if(o.replaceChild(e._element,t._element),!0===i&&(t._parent=null,t.destroy()),this._contentItems[n]=e,e.setParent(this),e.size=t.size,e.sizeUnit=t.sizeUnit,e.minSize=t.minSize,e.minSizeUnit=t.minSizeUnit,null===e._parent)throw new K(\"CIRCNC45699\");!0===e._parent._isInitialised&&!1===e._isInitialised&&e.init(),this.updateSize(!1)}remove(){if(null===this._parent)throw new K(\"CIR11110\");this._parent.removeChild(this)}popout(){const t=Ot(),e=this.layoutManager.createPopoutFromContentItem(this,void 0,t,void 0);return this.emitBaseBubblingEvent(\"stateChanged\"),e}calculateConfigContent(){const t=this._contentItems,e=t.length,i=new Array(e);for(let n=0;nthis.propagateEventToLayoutManager(t,e))))}propagateEventToLayoutManager(t,e){this._pendingEventPropagations[t]=!1,this.layoutManager.emitUnknown(t,e)}}class jt extends Gt{constructor(t,e,i){super(t,e,i,document.createElement(\"div\")),this._parentItem=i,this._focused=!1,this.isComponent=!0,this._reorderEnabled=e.reorderEnabled,this.applyUpdatableConfig(e),this._initialWantMaximise=e.maximised;const n=document.createElement(\"div\");n.classList.add(\"lm_content\"),this.element.appendChild(n),this._container=new Ft(e,this,t,n,(t=>this.handleUpdateItemConfigEvent(t)),(()=>this.show()),(()=>this.hide()),(t=>this.focus(t)),(t=>this.blur(t)))}get componentName(){return this._container.componentType}get componentType(){return this._container.componentType}get reorderEnabled(){return this._reorderEnabled}get initialWantMaximise(){return this._initialWantMaximise}get component(){return this._container.component}get container(){return this._container}get parentItem(){return this._parentItem}get headerConfig(){return this._headerConfig}get title(){return this._title}get tab(){return this._tab}get focused(){return this._focused}destroy(){this._container.destroy(),super.destroy()}applyUpdatableConfig(t){this.setTitle(t.title),this._headerConfig=t.header}toConfig(){const t=this._container.stateRequestEvent,e=void 0===t?this._container.state:t();return{type:at.component,content:[],size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,maximised:!1,isClosable:this.isClosable,reorderEnabled:this._reorderEnabled,title:this._title,header:mt.Header.createCopy(this._headerConfig),componentType:pt.copyComponentType(this.componentType),componentState:e}}close(){if(null===this.parent)throw new K(\"CIC68883\");this.parent.removeChild(this,!1)}enterDragMode(t,e){Tt(this.element,t),At(this.element,e),this._container.enterDragMode(t,e)}exitDragMode(){this._container.exitDragMode()}enterStackMaximised(){this._container.enterStackMaximised()}exitStackMaximised(){this._container.exitStackMaximised()}drag(){this._container.drag()}updateSize(t){this.updateNodeSize(t)}init(){this.updateNodeSize(!1),super.init(),this._container.emit(\"open\"),this.initContentItems()}setTitle(t){this._title=t,this.emit(\"titleChanged\",t),this.emit(\"stateChanged\")}setTab(t){this._tab=t,this.emit(\"tab\",t),this._container.setTab(t)}hide(){super.hide(),this._container.setVisibility(!1)}show(){super.show(),this._container.setVisibility(!0)}focus(t=!1){this.parentItem.setActiveComponentItem(this,!0,t)}setFocused(t){this._focused=!0,this.tab.setFocused(),t||this.emitBaseBubblingEvent(\"focus\")}blur(t=!1){this._focused&&this.layoutManager.setFocusedComponentItem(void 0,t)}setBlurred(t){this._focused=!1,this.tab.setBlurred(),t||this.emitBaseBubblingEvent(\"blur\")}setParent(t){this._parentItem=t,super.setParent(t)}handleUpdateItemConfigEvent(t){this.applyUpdatableConfig(t)}updateNodeSize(t){if(\"none\"!==this.element.style.display){const{width:e,height:i}=kt(this.element);this._container.setSizeToNodeSize(e,i,t)}}}class $t extends Gt{constructor(){super(...arguments),this._focused=!1}get focused(){return this._focused}setFocusedValue(t){this._focused=t}}class Zt extends Wt{constructor(t,e){super(),this._eElement=t,this._pointerTracking=!1,this._pointerDownEventListener=t=>this.onPointerDown(t),this._pointerMoveEventListener=t=>this.onPointerMove(t),this._pointerUpEventListener=t=>this.onPointerUp(t),this._timeout=void 0,this._allowableTargets=[t,...e],this._oDocument=document,this._eBody=document.body,this._nDelay=1800,this._nDistance=10,this._nX=0,this._nY=0,this._nOriginalX=0,this._nOriginalY=0,this._dragging=!1,this._eElement.addEventListener(\"pointerdown\",this._pointerDownEventListener,{passive:!0})}destroy(){this.checkRemovePointerTrackingEventListeners(),this._eElement.removeEventListener(\"pointerdown\",this._pointerDownEventListener)}cancelDrag(){this.processDragStop(void 0)}onPointerDown(t){if(this._allowableTargets.includes(t.target)&&t.isPrimary){const e=this.getPointerCoordinates(t);this.processPointerDown(e)}}processPointerDown(t){this._nOriginalX=t.x,this._nOriginalY=t.y,this._oDocument.addEventListener(\"pointermove\",this._pointerMoveEventListener),this._oDocument.addEventListener(\"pointerup\",this._pointerUpEventListener,{passive:!0}),this._pointerTracking=!0,this._timeout=setTimeout((()=>{try{this.startDrag()}catch(t){throw console.error(t),t}}),this._nDelay)}onPointerMove(t){this._pointerTracking&&(this.processDragMove(t),t.preventDefault())}processDragMove(t){this._nX=t.pageX-this._nOriginalX,this._nY=t.pageY-this._nOriginalY,!1===this._dragging&&(Math.abs(this._nX)>this._nDistance||Math.abs(this._nY)>this._nDistance)&&this.startDrag(),this._dragging&&this.emit(\"drag\",this._nX,this._nY,t)}onPointerUp(t){this.processDragStop(t)}processDragStop(t){var e;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this.checkRemovePointerTrackingEventListeners(),!0===this._dragging&&(this._eBody.classList.remove(\"lm_dragging\"),this._eElement.classList.remove(\"lm_dragging\"),null===(e=this._oDocument.querySelector(\"iframe\"))||void 0===e||e.style.setProperty(\"pointer-events\",\"\"),this._dragging=!1,this.emit(\"dragStop\",t))}checkRemovePointerTrackingEventListeners(){this._pointerTracking&&(this._oDocument.removeEventListener(\"pointermove\",this._pointerMoveEventListener),this._oDocument.removeEventListener(\"pointerup\",this._pointerUpEventListener),this._pointerTracking=!1)}startDrag(){var t;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this._dragging=!0,this._eBody.classList.add(\"lm_dragging\"),this._eElement.classList.add(\"lm_dragging\"),null===(t=this._oDocument.querySelector(\"iframe\"))||void 0===t||t.style.setProperty(\"pointer-events\",\"none\"),this.emit(\"dragStart\",this._nOriginalX,this._nOriginalY)}getPointerCoordinates(t){return{x:t.pageX,y:t.pageY}}}class qt{constructor(t,e,i){this._isVertical=t,this._size=e,this._grabSize=i0){const i=this.createSplitter(Math.max(0,e-1)).element;e>0?(this.contentItems[e-1].element.insertAdjacentElement(\"afterend\",i),i.insertAdjacentElement(\"afterend\",t.element)):(this.contentItems[0].element.insertAdjacentElement(\"beforebegin\",i),i.insertAdjacentElement(\"beforebegin\",t.element))}else this._childElementContainer.appendChild(t.element);super.addChild(t,e);const n=1/this.contentItems.length*100;if(!0===i)return this.emitBaseBubblingEvent(\"stateChanged\"),e;for(let e=0;e0&&(this.calculateRelativeSizes(),this.setAbsoluteSizes()),this.emitBaseBubblingEvent(\"stateChanged\"),this.emit(\"resize\")}setAbsoluteSizes(){const t=this.calculateAbsoluteSizes();for(let e=0;e0&&t.itemSizes[e]++,this._isColumn?(Tt(this.contentItems[e].element,t.crossAxisSize),At(this.contentItems[e].element,t.itemSizes[e])):(Tt(this.contentItems[e].element,t.itemSizes[e]),At(this.contentItems[e].element,t.crossAxisSize))}calculateAbsoluteSizes(){const t=(this.contentItems.length-1)*this._splitterSize,{width:e,height:i}=kt(this.element);let n,o;this._isColumn?(n=i-t,o=e):(n=e-t,o=i);let s=0;const r=[];for(let t=0;t0){const n=100-t;for(let t=0;t100&&e.length>0){for(let t=0;te)return;{const r=i/e;let a=i;for(let e=0;ethis.onSplitterDrag(e,t,i))),e.on(\"dragStop\",(()=>this.onSplitterDragStop(e))),e.on(\"dragStart\",(()=>this.onSplitterDragStart(e))),this._splitter.splice(t,0,e),e}getSplitItems(t){const e=this._splitter.indexOf(t);return{before:this.contentItems[e],after:this.contentItems[e+1]}}calculateContentItemMinSize(t){const e=t.minSize;if(void 0!==e){if(t.minSizeUnit===ht.Pixel)return e;throw new X(\"ROCGMD98831\",JSON.stringify(t))}{const t=this.layoutManager.layoutConfig.dimensions;return this._isColumn?t.defaultMinItemHeight:t.defaultMinItemWidth}}calculateContentItemsTotalMinSize(t){let e=0;for(const i of t)e+=this.calculateContentItemMinSize(i);return e}onSplitterDragStart(t){const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=this.calculateContentItemsTotalMinSize(e.before.contentItems),s=this.calculateContentItemsTotalMinSize(e.after.contentItems);this._splitterPosition=0,this._splitterMinPosition=-1*(i-o),this._splitterMaxPosition=n-s}onSplitterDrag(t,e,i){let n=this._isColumn?i:e;if(null===this._splitterMinPosition||null===this._splitterMaxPosition)throw new K(\"ROCOSD59226\");n=Math.max(n,this._splitterMinPosition),n=Math.min(n,this._splitterMaxPosition),this._splitterPosition=n;const o=zt(n);this._isColumn?t.element.style.top=o:t.element.style.left=o}onSplitterDragStop(t){if(null===this._splitterPosition)throw new K(\"ROCOSDS66932\");{const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=(this._splitterPosition+i)/(i+n),s=e.before.size+e.after.size;e.before.size=o*s,e.after.size=(1-o)*s,t.element.style.top=zt(0),t.element.style.left=zt(0),globalThis.requestAnimationFrame((()=>this.updateSize(!1)))}}}!function(t){t.getElementDimensionSize=function(t,e){return\"width\"===e?function(t){return t.offsetWidth}(t):function(t){return t.offsetHeight}(t)},t.setElementDimensionSize=function(t,e,i){return\"width\"===e?Tt(t,i):At(t,i)},t.createElement=function(t,e){const i=t.createElement(\"div\");return i.classList.add(\"lm_item\"),e?i.classList.add(\"lm_column\"):i.classList.add(\"lm_row\"),i}}(Xt||(Xt={}));class Yt extends $t{constructor(t,e,i){super(t,vt.create(e),null,Yt.createElement(document)),this.isGround=!0,this._childElementContainer=this.element,this._containerElement=i;let n=null;for(;;){const t=n?n.previousSibling:this._containerElement.lastChild;if(!(t instanceof Element&&t.classList.contains(\"lm_content\")))break;n=t}this._containerElement.insertBefore(this.element,n)}init(){if(!0!==this.isInitialised){this.updateNodeSize();for(let t=0;t0?this.contentItems[0]:this,n.isComponent)throw new Error(\"Cannot add item as child to ComponentItem\");{const t=this.layoutManager.createAndInitContentItem(i,n);return e=n.addChild(t,e),n===this?-1:e}}loadComponentAsRoot(t){this.clearRoot();const e=Ct.resolve(t,!1);if(e.maximised)throw new Error(\"Root Component cannot be maximised\");{const t=new jt(this.layoutManager,e,this);t.init(),this.addChild(t,0)}}addChild(t,e){if(this.contentItems.length>0)throw new Error(\"Ground node can only have a single child\");return this._childElementContainer.appendChild(t.element),e=super.addChild(t,e),this.updateSize(!1),this.emitBaseBubblingEvent(\"stateChanged\"),e}calculateConfigContent(){const t=this.contentItems,e=t.length,i=new Array(e);for(let n=0;n0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e)),this.updateContentItemsSize(!1))}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}createSideAreas(){const t=Yt.Area.oppositeSides,e=new Array(Object.keys(t).length);let i=0;for(const n in t){const o=n,s=this.getElementArea();if(null===s)throw new K(\"RCSA77553\");s.side=o,\"2\"===t[o][1]?s[o]=s[t[o]]-50:s[o]=s[t[o]]+50,s.surface=(s.x2-s.x1)*(s.y2-s.y1),e[i++]=s}return e}highlightDropZone(t,e,i){this.layoutManager.tabDropPlaceholder.remove(),super.highlightDropZone(t,e,i)}onDrop(t,e){if(t.isComponent){const e=ut.createDefault(),i=t;e.header=mt.Header.createCopy(i.headerConfig);const n=this.layoutManager.createAndInitContentItem(e,this);n.addChild(t),t=n}if(0===this.contentItems.length)this.addChild(t);else{if(t.type===at.row||t.type===at.column){const e=ut.createDefault(),i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}const i=\"x\"==e.side[0]?at.row:at.column,n=\"2\"==e.side[1],o=this.contentItems[0];if(o instanceof Xt&&o.type===i){const e=o.contentItems[n?0:o.contentItems.length-1];o.addChild(t,n?0:void 0,!0),e.size*=.5,t.size=e.size,t.sizeUnit=ht.Percent,o.updateSize(!1)}else{const e=ct.createDefault(i),s=this.layoutManager.createContentItem(e,this);this.replaceChild(o,s),s.addChild(t,n?0:void 0,!0),s.addChild(o,n?void 0:0,!0),o.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}}dock(){throw new X(\"GID87731\")}validateDocking(){throw new X(\"GIVD87732\")}getAllContentItems(){const t=[this];return this.deepGetAllContentItems(this.contentItems,t),t}getConfigMaximisedItems(){const t=[];return this.deepFilterContentItems(this.contentItems,t,(t=>!(!Gt.isStack(t)||!t.initialWantMaximise)||!(!Gt.isComponentItem(t)||!t.initialWantMaximise))),t}getItemsByPopInParentId(t){const e=[];return this.deepFilterContentItems(this.contentItems,e,(e=>e.popInParentIds.includes(t))),e}toConfig(){throw new Error(\"Cannot generate GroundItem config\")}setActiveComponentItem(t,e,i){}updateNodeSize(){const{width:t,height:e}=kt(this._containerElement);Tt(this.element,t),At(this.element,e),this.contentItems.length>0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e))}deepGetAllContentItems(t,e){for(let i=0;ithis.onClick(t),this._touchStartEventListener=t=>this.onTouchStart(t),this._element=document.createElement(\"div\"),this._element.classList.add(i),this._element.title=e,this._header.on(\"destroy\",(()=>this.destroy())),this._element.addEventListener(\"click\",this._clickEventListener,{passive:!0}),this._element.addEventListener(\"touchstart\",this._touchStartEventListener,{passive:!0}),this._header.controlsContainerElement.appendChild(this._element)}get element(){return this._element}destroy(){var t;this._element.removeEventListener(\"click\",this._clickEventListener),this._element.removeEventListener(\"touchstart\",this._touchStartEventListener),null===(t=this._element.parentNode)||void 0===t||t.removeChild(this._element)}onClick(t){this._pushEvent(t)}onTouchStart(t){this._pushEvent(t)}}class Jt{constructor(t,e,i,n,o){var s;this._layoutManager=t,this._componentItem=e,this._closeEvent=i,this._focusEvent=n,this._dragStartEvent=o,this._isActive=!1,this._tabClickListener=t=>this.onTabClickDown(t),this._tabTouchStartListener=t=>this.onTabTouchStart(t),this._closeClickListener=()=>this.onCloseClick(),this._closeTouchStartListener=()=>this.onCloseTouchStart(),this._dragStartListener=(t,e)=>this.onDragStart(t,e),this._contentItemDestroyListener=()=>this.onContentItemDestroy(),this._tabTitleChangedListener=t=>this.setTitle(t),this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_tab\"),this._titleElement=document.createElement(\"span\"),this._titleElement.classList.add(\"lm_title\"),this._closeElement=document.createElement(\"div\"),this._closeElement.classList.add(\"lm_close_tab\"),this._element.appendChild(this._titleElement),this._element.appendChild(this._closeElement),e.isClosable?this._closeElement.style.display=\"\":this._closeElement.style.display=\"none\",this.setTitle(e.title),this._componentItem.on(\"titleChanged\",this._tabTitleChangedListener);(null!==(s=e.reorderEnabled)&&void 0!==s?s:this._layoutManager.layoutConfig.settings.reorderEnabled)&&this.enableReorder(),this._element.addEventListener(\"click\",this._tabClickListener,{passive:!0}),this._element.addEventListener(\"touchstart\",this._tabTouchStartListener,{passive:!0}),this._componentItem.isClosable?(this._closeElement.addEventListener(\"click\",this._closeClickListener,{passive:!0}),this._closeElement.addEventListener(\"touchstart\",this._closeTouchStartListener,{passive:!0})):(this._closeElement.remove(),this._closeElement=void 0),this._componentItem.setTab(this),this._layoutManager.emit(\"tabCreated\",this)}get isActive(){return this._isActive}get componentItem(){return this._componentItem}get contentItem(){return this._componentItem}get element(){return this._element}get titleElement(){return this._titleElement}get closeElement(){return this._closeElement}get reorderEnabled(){return void 0!==this._dragListener}set reorderEnabled(t){t!==this.reorderEnabled&&(t?this.enableReorder():this.disableReorder())}setTitle(t){this._titleElement.innerText=t,this._element.title=t}setActive(t){t!==this._isActive&&(this._isActive=t,t?this._element.classList.add(\"lm_active\"):this._element.classList.remove(\"lm_active\"))}destroy(){var t,e;this._closeEvent=void 0,this._focusEvent=void 0,this._dragStartEvent=void 0,this._element.removeEventListener(\"click\",this._tabClickListener),this._element.removeEventListener(\"touchstart\",this._tabTouchStartListener),null===(t=this._closeElement)||void 0===t||t.removeEventListener(\"click\",this._closeClickListener),null===(e=this._closeElement)||void 0===e||e.removeEventListener(\"touchstart\",this._closeTouchStartListener),this._componentItem.off(\"titleChanged\",this._tabTitleChangedListener),this.reorderEnabled&&this.disableReorder(),this._element.remove()}setBlurred(){this._element.classList.remove(\"lm_focused\"),this._titleElement.classList.remove(\"lm_focused\")}setFocused(){this._element.classList.add(\"lm_focused\"),this._titleElement.classList.add(\"lm_focused\")}onDragStart(t,e){if(void 0===this._dragListener)throw new J(\"TODSDLU10093\");if(void 0===this._dragStartEvent)throw new J(\"TODS23309\");this._dragStartEvent(t,e,this._dragListener,this.componentItem)}onContentItemDestroy(){void 0!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=void 0)}onTabClickDown(t){const e=t.target;e!==this._element&&e!==this._titleElement||(0===t.button?this.notifyFocus():1===t.button&&this._componentItem.isClosable&&this.notifyClose())}onTabTouchStart(t){t.target===this._element&&this.notifyFocus()}onCloseClick(){this.notifyClose()}onCloseTouchStart(){this.notifyClose()}notifyClose(){if(void 0===this._closeEvent)throw new J(\"TNC15007\");this._closeEvent(this._componentItem)}notifyFocus(){if(void 0===this._focusEvent)throw new J(\"TNA15007\");this._focusEvent(this._componentItem)}enableReorder(){this._dragListener=new Zt(this._element,[this._titleElement]),this._dragListener.on(\"dragStart\",this._dragStartListener),this._componentItem.on(\"destroy\",this._contentItemDestroyListener)}disableReorder(){if(void 0===this._dragListener)throw new J(\"TDR87745\");this._componentItem.off(\"destroy\",this._contentItemDestroyListener),this._dragListener.off(\"dragStart\",this._dragStartListener),this._dragListener=void 0}}class Qt{constructor(t,e,i,n,o){this._layoutManager=t,this._componentRemoveEvent=e,this._componentFocusEvent=i,this._componentDragStartEvent=n,this._dropdownActiveChangedEvent=o,this._tabs=[],this._lastVisibleTabIndex=-1,this._dropdownActive=!1,this._element=document.createElement(\"section\"),this._element.classList.add(\"lm_tabs\"),this._dropdownElement=document.createElement(\"section\"),this._dropdownElement.classList.add(\"lm_tabdropdown_list\"),this._dropdownElement.style.display=\"none\"}get tabs(){return this._tabs}get tabCount(){return this._tabs.length}get lastVisibleTabIndex(){return this._lastVisibleTabIndex}get element(){return this._element}get dropdownElement(){return this._dropdownElement}get dropdownActive(){return this._dropdownActive}destroy(){for(let t=0;tthis.handleTabCloseEvent(t)),(t=>this.handleTabFocusEvent(t)),((t,e,i,n)=>this.handleTabDragStartEvent(t,e,i,n)));void 0===e&&(e=this._tabs.length),this._tabs.splice(e,0,i),ethis._lastVisibleTabIndex){const t=this._tabs[e];for(let t=e;t>0;t--)this._tabs[t]=this._tabs[t-1];this._tabs[0]=t}}updateTabSizes(t,e){let i=!1;this.tryUpdateTabSizes(i,t,e)||(i=!0,this.tryUpdateTabSizes(i,t,e)),i!==this._dropdownActive&&(this._dropdownActive=i,this._dropdownActiveChangedEvent())}tryUpdateTabSizes(t,e,i){if(this._tabs.length>0){if(void 0===i)throw new Error(\"non-empty tabs must have active component item\");let n=0,o=!1;const s=this._layoutManager.layoutConfig.settings.tabOverlapAllowance,r=this._tabs.indexOf(i.tab),a=this._tabs[r];this._lastVisibleTabIndex=-1;for(let i=0;ie){if(o)i===r&&(l.style.zIndex=\"auto\",l.style.marginLeft=\"\",l.parentElement!==this._element&&this._element.appendChild(l));else{let t;if(t=r>0&&r<=i?(d-e)/(i-1):(d-e)/i,tthis.onClick(t),this._touchStartListener=t=>this.onTouchStart(t),this._rowColumnClosable=!0,this._closeButton=null,this._popoutButton=null,this._tabsContainer=new Qt(this._layoutManager,(t=>this.handleTabInitiatedComponentRemoveEvent(t)),(t=>this.handleTabInitiatedComponentFocusEvent(t)),((t,e,i,n)=>this.handleTabInitiatedDragStartEvent(t,e,i,n)),(()=>this.processTabDropdownActiveChanged())),this._show=i.show,this._popoutEnabled=i.popoutEnabled,this._popoutLabel=i.popoutLabel,this._maximiseEnabled=i.maximiseEnabled,this._maximiseLabel=i.maximiseLabel,this._minimiseEnabled=i.minimiseEnabled,this._minimiseLabel=i.minimiseLabel,this._closeEnabled=i.closeEnabled,this._closeLabel=i.closeLabel,this._tabDropdownEnabled=i.tabDropdownEnabled,this._tabDropdownLabel=i.tabDropdownLabel,this.setSide(i.side),this._canRemoveComponent=this._configClosable,this._element=document.createElement(\"section\"),this._element.classList.add(\"lm_header\"),this._controlsContainerElement=document.createElement(\"section\"),this._controlsContainerElement.classList.add(\"lm_controls\"),this._element.appendChild(this._tabsContainer.element),this._element.appendChild(this._controlsContainerElement),this._element.appendChild(this._tabsContainer.dropdownElement),this._element.addEventListener(\"click\",this._clickListener,{passive:!0}),this._element.addEventListener(\"touchstart\",this._touchStartListener,{passive:!0}),this._documentMouseUpListener=()=>this._tabsContainer.hideAdditionalTabsDropdown(),globalThis.document.addEventListener(\"mouseup\",this._documentMouseUpListener,{passive:!0}),this._tabControlOffset=this._layoutManager.layoutConfig.settings.tabControlOffset,this._tabDropdownEnabled&&(this._tabDropdownButton=new Kt(this,this._tabDropdownLabel,\"lm_tabdropdown\",(()=>this._tabsContainer.showAdditionalTabsDropdown()))),this._popoutEnabled&&(this._popoutButton=new Kt(this,this._popoutLabel,\"lm_popout\",(()=>this.handleButtonPopoutEvent()))),this._maximiseEnabled&&(this._maximiseButton=new Kt(this,this._maximiseLabel,\"lm_maximise\",(t=>this.handleButtonMaximiseToggleEvent(t)))),this._configClosable&&(this._closeButton=new Kt(this,this._closeLabel,\"lm_close\",(()=>s()))),this.processTabDropdownActiveChanged()}get show(){return this._show}get side(){return this._side}get leftRightSided(){return this._leftRightSided}get layoutManager(){return this._layoutManager}get parent(){return this._parent}get tabs(){return this._tabsContainer.tabs}get lastVisibleTabIndex(){return this._tabsContainer.lastVisibleTabIndex}get element(){return this._element}get tabsContainerElement(){return this._tabsContainer.element}get controlsContainerElement(){return this._controlsContainerElement}destroy(){this.emit(\"destroy\"),this._popoutEvent=void 0,this._maximiseToggleEvent=void 0,this._clickEvent=void 0,this._touchStartEvent=void 0,this._componentRemoveEvent=void 0,this._componentFocusEvent=void 0,this._componentDragStartEvent=void 0,this._tabsContainer.destroy(),globalThis.document.removeEventListener(\"mouseup\",this._documentMouseUpListener),this._element.remove()}createTab(t,e){this._tabsContainer.createTab(t,e)}removeTab(t){this._tabsContainer.removeTab(t)}processActiveComponentChanged(t){this._tabsContainer.processActiveComponentChanged(t),this.updateTabSizes()}setSide(t){this._side=t,this._leftRightSided=[nt.right,nt.left].includes(this._side)}setRowColumnClosable(t){this._rowColumnClosable=t,this.updateClosability()}updateClosability(){let t;if(this._configClosable)if(this._rowColumnClosable){t=!0;const e=this.tabs.length;for(let i=0;i1}applyFocusedValue(t){t?this._element.classList.add(\"lm_focused\"):this._element.classList.remove(\"lm_focused\")}processMaximised(){if(void 0===this._maximiseButton)throw new J(\"HPMAX16997\");this._maximiseButton.element.setAttribute(\"title\",this._minimiseLabel)}processMinimised(){if(void 0===this._maximiseButton)throw new J(\"HPMIN16997\");this._maximiseButton.element.setAttribute(\"title\",this._maximiseLabel)}updateTabSizes(){if(this._tabsContainer.tabCount>0){const t=this._show?this._layoutManager.layoutConfig.dimensions.headerHeight:0;let e;this._leftRightSided?(this._element.style.height=\"\",this._element.style.width=zt(t)):(this._element.style.width=\"\",this._element.style.height=zt(t)),e=this._leftRightSided?this._element.offsetHeight-this._controlsContainerElement.offsetHeight-this._tabControlOffset:this._element.offsetWidth-this._controlsContainerElement.offsetWidth-this._tabControlOffset,this._tabsContainer.updateTabSizes(e,this._getActiveComponentItemEvent())}}handleTabInitiatedComponentRemoveEvent(t){if(this._canRemoveComponent){if(void 0===this._componentRemoveEvent)throw new J(\"HHTCE22294\");this._componentRemoveEvent(t)}}handleTabInitiatedComponentFocusEvent(t){if(void 0===this._componentFocusEvent)throw new J(\"HHTAE22294\");this._componentFocusEvent(t)}handleTabInitiatedDragStartEvent(t,e,i,n){if(this._canRemoveComponent){if(void 0===this._componentDragStartEvent)throw new J(\"HHTDSE22294\");this._componentDragStartEvent(t,e,i,n)}else i.cancelDrag()}processTabDropdownActiveChanged(){void 0!==this._tabDropdownButton&&Dt(this._tabDropdownButton.element,this._tabsContainer.dropdownActive)}handleButtonPopoutEvent(){if(this._layoutManager.layoutConfig.settings.popoutWholeStack){if(void 0===this._popoutEvent)throw new J(\"HHBPOE17834\");this._popoutEvent()}else{const t=this._getActiveComponentItemEvent();t&&t.popout()}}handleButtonMaximiseToggleEvent(t){if(void 0===this._maximiseToggleEvent)throw new J(\"HHBMTE16834\");this._maximiseToggleEvent()}onClick(t){t.target===this._element&&this.notifyClick(t)}onTouchStart(t){t.target===this._element&&this.notifyTouchStart(t)}notifyClick(t){if(void 0===this._clickEvent)throw new J(\"HNHC46834\");this._clickEvent(t)}notifyTouchStart(t){if(void 0===this._touchStartEvent)throw new J(\"HNHTS46834\");this._touchStartEvent(t)}}class ee extends $t{constructor(t,e,i){var n,o,s,r,a,l,h,d,c,m,u,p,g,f,v,_,y,C,w;super(t,e,i,ee.createElement(document)),this._headerSideChanged=!1,this._resizeListener=()=>this.handleResize(),this._maximisedListener=()=>this.handleMaximised(),this._minimisedListener=()=>this.handleMinimised(),this._headerConfig=e.header;const I=t.layoutConfig.header,b=e.content;let S;if(1!==b.length)S=void 0;else{S=b[0].header}this._initialWantMaximise=e.maximised,this._initialActiveItemIndex=null!==(n=e.activeItemIndex)&&void 0!==n?n:0;const E=null!==(r=null!==(s=null===(o=this._headerConfig)||void 0===o?void 0:o.show)&&void 0!==s?s:null==S?void 0:S.show)&&void 0!==r?r:I.show,x=null!==(h=null!==(l=null===(a=this._headerConfig)||void 0===a?void 0:a.popout)&&void 0!==l?l:null==S?void 0:S.popout)&&void 0!==h?h:I.popout,L=null!==(m=null!==(c=null===(d=this._headerConfig)||void 0===d?void 0:d.maximise)&&void 0!==c?c:null==S?void 0:S.maximise)&&void 0!==m?m:I.maximise,z=null!==(g=null!==(p=null===(u=this._headerConfig)||void 0===u?void 0:u.close)&&void 0!==p?p:null==S?void 0:S.close)&&void 0!==g?g:I.close,M=null!==(_=null!==(v=null===(f=this._headerConfig)||void 0===f?void 0:f.minimise)&&void 0!==v?v:null==S?void 0:S.minimise)&&void 0!==_?_:I.minimise,P=null!==(w=null!==(C=null===(y=this._headerConfig)||void 0===y?void 0:y.tabDropdown)&&void 0!==C?C:null==S?void 0:S.tabDropdown)&&void 0!==w?w:I.tabDropdown;this._maximisedEnabled=!1!==L;const T={show:!1!==E,side:!1===E?nt.top:E,popoutEnabled:!1!==x,popoutLabel:!1===x?\"\":x,maximiseEnabled:this._maximisedEnabled,maximiseLabel:!1===L?\"\":L,closeEnabled:!1!==z,closeLabel:!1===z?\"\":z,minimiseEnabled:!0,minimiseLabel:M,tabDropdownEnabled:!1!==P,tabDropdownLabel:!1===P?\"\":P};this._header=new te(t,this,T,e.isClosable&&!1!==z,(()=>this.getActiveComponentItem()),(()=>this.remove()),(()=>this.handlePopoutEvent()),(()=>this.toggleMaximise()),(t=>this.handleHeaderClickEvent(t)),(t=>this.handleHeaderTouchStartEvent(t)),(t=>this.handleHeaderComponentRemoveEvent(t)),(t=>this.handleHeaderComponentFocusEvent(t)),((t,e,i,n)=>this.handleHeaderComponentStartDragEvent(t,e,i,n))),this.isStack=!0,this._childElementContainer=document.createElement(\"section\"),this._childElementContainer.classList.add(\"lm_items\"),this.on(\"resize\",this._resizeListener),this._maximisedEnabled&&(this.on(\"maximised\",this._maximisedListener),this.on(\"minimised\",this._minimisedListener)),this.element.appendChild(this._header.element),this.element.appendChild(this._childElementContainer),this.setupHeaderPosition(),this._header.updateClosability()}get childElementContainer(){return this._childElementContainer}get header(){return this._header}get headerShow(){return this._header.show}get headerSide(){return this._header.side}get headerLeftRightSided(){return this._header.leftRightSided}get contentAreaDimensions(){return this._contentAreaDimensions}get initialWantMaximise(){return this._initialWantMaximise}get isMaximised(){return this===this.layoutManager.maximisedStack}get stackParent(){if(!this.parent)throw new Error(\"Stack should always have a parent\");return this.parent}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}init(){if(!0===this.isInitialised)return;this.updateNodeSize();for(let t=0;t0){if(this._initialActiveItemIndex<0||this._initialActiveItemIndex>=e)throw new Error(`ActiveItemIndex out of range: ${this._initialActiveItemIndex} id: ${this.id}`);for(let i=0;ithis.contentItems.length)throw e-=1,new X(\"SAC99728\");if(t instanceof jt)return e=super.addChild(t,e),this._childElementContainer.appendChild(t.element),this._header.createTab(t,e),this.setActiveComponentItem(t,i),this._header.updateTabSizes(),this.updateSize(!1),t.container.setBaseLogicalZIndex(),this._header.updateClosability(),this.emitStateChangedEvent(),e;throw new X(\"SACC88532\")}removeChild(t,e){const i=t,n=this.contentItems.indexOf(i),o=1===this.contentItems.length;if(this._activeComponentItem===i&&(i.focused&&i.blur(),!o)){const t=0===n?1:n-1;this.setActiveComponentItem(this.contentItems[t],!1)}this._header.removeTab(i),super.removeChild(i,e),o||this._header.updateClosability(),this.emitStateChangedEvent()}toggleMaximise(){this.isMaximised?this.minimise():this.maximise()}maximise(){if(!this.isMaximised){this.layoutManager.setMaximisedStack(this);const t=this.contentItems,e=t.length;for(let i=0;i0&&void 0===t)throw new Error(\"expected non-empty stack to have an active component item\");return{type:\"stack\",content:this.calculateConfigContent(),size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,isClosable:this.isClosable,maximised:this.isMaximised,header:this.createHeaderConfig(),activeItemIndex:t}}onDrop(t,e){if(\"header\"===this._dropSegment){if(this.resetHeaderDropZone(),void 0===this._dropIndex)throw new J(\"SODDI68990\");return void this.addChild(t,this._dropIndex)}if(\"body\"===this._dropSegment)return void this.addChild(t,0,!0);const i=\"top\"===this._dropSegment||\"bottom\"===this._dropSegment,n=\"left\"===this._dropSegment||\"right\"===this._dropSegment,o=\"top\"===this._dropSegment||\"left\"===this._dropSegment,s=i&&this.stackParent.isColumn||n&&this.stackParent.isRow;if(t.isComponent){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createAndInitContentItem(e,this);i.addChild(t),t=i}if(t.type===at.row||t.type===at.column){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}if(s){const e=this.stackParent.contentItems.indexOf(this);this.stackParent.addChild(t,o?e:e+1,!0),this.size*=.5,t.size=this.size,t.sizeUnit=this.sizeUnit,this.stackParent.updateSize(!1)}else{const e=i?at.column:at.row,n=ct.createDefault(e),s=this.layoutManager.createContentItem(n,this);this.stackParent.replaceChild(this,s),s.addChild(t,o?0:void 0,!0),s.addChild(this,o?void 0:0,!0),this.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}highlightDropZone(t,e){for(const i in this._contentAreaDimensions){const n=i,o=this._contentAreaDimensions[n].hoverArea;if(o.x1t&&o.y1e)return void(\"header\"===n?(this._dropSegment=\"header\",this.highlightHeaderDropZone(this._header.leftRightSided?e:t)):(this.resetHeaderDropZone(),this.highlightBodyDropZone(n)))}}getArea(){if(\"none\"===this.element.style.display)return null;const t=super.getElementArea(this._header.element),e=super.getElementArea(this._childElementContainer);if(null===t||null===e)throw new K(\"SGAHC13086\");const i=e.x2-e.x1,n=e.y2-e.y1;return this._contentAreaDimensions={header:{hoverArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2},highlightArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2}}},0===this.contentItems.length?(this._contentAreaDimensions.body={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2}},super.getElementArea(this.element)):(this._contentAreaDimensions.left={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x1+.25*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x1+.5*i,y2:e.y2}},this._contentAreaDimensions.top={hoverArea:{x1:e.x1+.25*i,y1:e.y1,x2:e.x1+.75*i,y2:e.y1+.5*n},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y1+.5*n}},this._contentAreaDimensions.right={hoverArea:{x1:e.x1+.75*i,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1+.5*i,y1:e.y1,x2:e.x2,y2:e.y2}},this._contentAreaDimensions.bottom={hoverArea:{x1:e.x1+.25*i,y1:e.y1+.5*n,x2:e.x1+.75*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1+.5*n,x2:e.x2,y2:e.y2}},super.getElementArea(this.element))}positionHeader(t){this._header.side!==t&&(this._header.setSide(t),this._headerSideChanged=!0,this.setupHeaderPosition())}updateNodeSize(){if(\"none\"!==this.element.style.display){const t=kt(this.element);if(this._header.show){t[this._header.leftRightSided?it.width:it.height]-=this.layoutManager.layoutConfig.dimensions.headerHeight}this._childElementContainer.style.width=zt(t.width),this._childElementContainer.style.height=zt(t.height);for(let e=0;e=o&&tthis.onDrag(t,e,i))),this._dragListener.on(\"dragStop\",(()=>this.onDrop())),this.createDragProxyElements(t,e),null===this._componentItem.parent)throw new K(\"DPC10097\");this._componentItemFocused=this._componentItem.focused,this._componentItemFocused&&this._componentItem.blur(),this._componentItem.parent.removeChild(this._componentItem,!0),this.setDimensions(),document.body.appendChild(this._element),this.determineMinMaxXY(),this._layoutManager.calculateItemAreas(),this.setDropPosition(t,e)}get element(){return this._element}createDragProxyElements(t,e){this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_dragProxy\");const i=document.createElement(\"div\");i.classList.add(\"lm_header\");const n=document.createElement(\"div\");n.classList.add(\"lm_tabs\");const o=document.createElement(\"div\");o.classList.add(\"lm_tab\");const s=document.createElement(\"span\");s.classList.add(\"lm_title\"),o.appendChild(s),n.appendChild(o),i.appendChild(n),this._proxyContainerElement=document.createElement(\"div\"),this._proxyContainerElement.classList.add(\"lm_content\"),this._element.appendChild(i),this._element.appendChild(this._proxyContainerElement),this._originalParent instanceof ee&&this._originalParent.headerShow&&(this._sided=this._originalParent.headerLeftRightSided,this._element.classList.add(\"lm_\"+this._originalParent.headerSide),[nt.right,nt.bottom].indexOf(this._originalParent.headerSide)>=0&&this._proxyContainerElement.insertAdjacentElement(\"afterend\",i)),this._element.style.left=zt(t),this._element.style.top=zt(e),o.setAttribute(\"title\",this._componentItem.title),s.insertAdjacentText(\"afterbegin\",this._componentItem.title),this._proxyContainerElement.appendChild(this._componentItem.element)}determineMinMaxXY(){const t=this._layoutManager.groundItem;if(void 0===t)throw new J(\"DPDMMXY73109\");{const e=t.element.getBoundingClientRect();this._minX=e.left+document.body.scrollLeft,this._minY=e.top+document.body.scrollTop,this._maxX=this._minX+e.width,this._maxY=this._minY+e.height}}onDrag(t,e,i){const n=i.pageX,o=i.pageY;this.setDropPosition(n,o),this._componentItem.drag()}setDropPosition(t,e){this._layoutManager.layoutConfig.settings.constrainDragToContainer&&(t<=this._minX?t=Math.ceil(this._minX):t>=this._maxX&&(t=Math.floor(this._maxX)),e<=this._minY?e=Math.ceil(this._minY):e>=this._maxY&&(e=Math.floor(this._maxY))),this._element.style.left=zt(t),this._element.style.top=zt(e),this._area=this._layoutManager.getArea(t,e),null!==this._area&&(this._lastValidArea=this._area,this._area.contentItem.highlightDropZone(t,e,this._area))}onDrop(){const t=this._layoutManager.dropTargetIndicator;if(null===t)throw new K(\"DPOD30011\");let e;if(t.hide(),this._componentItem.exitDragMode(),null!==this._area)e=this._componentItem,this._area.contentItem.onDrop(e,this._area);else if(null!==this._lastValidArea){e=this._componentItem;this._lastValidArea.contentItem.onDrop(e,this._lastValidArea)}else this._originalParent?(e=this._componentItem,this._originalParent.addChild(e)):this._componentItem.destroy();this._element.remove(),this._layoutManager.emit(\"itemDropped\",this._componentItem),this._componentItemFocused&&void 0!==e&&e.focus()}setDimensions(){const t=this._layoutManager.layoutConfig.dimensions;if(void 0===t)throw new Error(\"DragProxy.setDimensions: dimensions undefined\");let e=t.dragProxyWidth,i=t.dragProxyHeight;if(void 0===e||void 0===i)throw new Error(\"DragProxy.setDimensions: width and/or height undefined\");const n=!1===this._layoutManager.layoutConfig.header.show?0:t.headerHeight;this._element.style.width=zt(e),this._element.style.height=zt(i),e-=this._sided?n:0,i-=this._sided?0:n,this._proxyContainerElement.style.width=zt(e),this._proxyContainerElement.style.height=zt(i),this._componentItem.enterDragMode(e,i),this._componentItem.show()}}class ne{constructor(t,e,i,n,o,s,r){this._layoutManager=t,this._element=e,this._extraAllowableChildTargets=i,this._componentTypeOrFtn=n,this._componentState=o,this._title=s,this._id=r,this._dragListener=null,this._dummyGroundContainer=document.createElement(\"div\");const a=gt.createDefault(\"row\");this._dummyGroundContentItem=new Yt(this._layoutManager,a,this._dummyGroundContainer),this.createDragListener()}destroy(){this.removeDragListener()}createDragListener(){this.removeDragListener(),this._dragListener=new Zt(this._element,this._extraAllowableChildTargets),this._dragListener.on(\"dragStart\",((t,e)=>this.onDragStart(t,e))),this._dragListener.on(\"dragStop\",(()=>this.onDragStop()))}onDragStart(t,e){var i;const n=\"component\";let o;if(\"function\"==typeof this._componentTypeOrFtn){const t=this._componentTypeOrFtn();o=ne.isDragSourceComponentItemConfig(t)?{type:n,componentState:t.state,componentType:t.type,title:null!==(i=t.title)&&void 0!==i?i:this._title}:t}else o={type:n,componentState:this._componentState,componentType:this._componentTypeOrFtn,title:this._title,id:this._id};const s=bt.resolve(o,!1),r=new jt(this._layoutManager,s,this._dummyGroundContentItem);if(this._dummyGroundContentItem.contentItems.push(r),null===this._dragListener)throw new K(\"DSODSD66746\");{const i=new ie(t,e,this._dragListener,this._layoutManager,r,this._dummyGroundContentItem),n=this._layoutManager.transitionIndicator;if(null===n)throw new K(\"DSODST66746\");n.transitionElements(this._element,i.element)}}onDragStop(){this.createDragListener()}removeDragListener(){null!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=null)}}!function(t){t.isDragSourceComponentItemConfig=function(t){return!(\"componentType\"in t)}}(ne||(ne={}));class oe{constructor(){this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_dropTargetIndicator\");const t=document.createElement(\"div\");t.classList.add(\"lm_inner\"),this._element.appendChild(t),document.body.appendChild(this._element)}destroy(){this._element.remove()}highlightArea(t,e){this._element.style.left=zt(t.x1+e),this._element.style.top=zt(t.y1+e),this._element.style.width=zt(t.x2-t.x1-e),this._element.style.height=zt(t.y2-t.y1-e),this._element.style.display=\"block\"}hide(){Dt(this._element,!1)}}class se{constructor(){this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_transition_indicator\"),document.body.appendChild(this._element),this._toElement=null,this._fromDimensions=null,this._totalAnimationDuration=200,this._animationStartTime=null}destroy(){this._element.remove()}transitionElements(t,e){}nextAnimationFrame(){}measure(t){const e=t.getBoundingClientRect();return{left:e.left,top:e.top,width:t.offsetWidth,height:t.offsetHeight}}}class re extends Wt{constructor(t){super(),this._layoutManager=t,this._childEventListener=t=>this.onEventFromChild(t),globalThis.addEventListener(re.ChildEventName,this._childEventListener,{passive:!0})}emit(t,...e){\"userBroadcast\"===t?this.emitUserBroadcast(...e):super.emit(t,...e)}emitUserBroadcast(...t){this.handleUserBroadcastEvent(\"userBroadcast\",t)}destroy(){globalThis.removeEventListener(re.ChildEventName,this._childEventListener)}handleUserBroadcastEvent(t,e){this._layoutManager.isSubWindow?this.propagateToParent(t,e):this.propagateToThisAndSubtree(t,e)}onEventFromChild(t){const e=t.detail;this.handleUserBroadcastEvent(e.eventName,e.args)}propagateToParent(t,e){const i={bubbles:!0,cancelable:!0,detail:{layoutManager:this._layoutManager,eventName:t,args:e}},n=new CustomEvent(re.ChildEventName,i),o=globalThis.opener;if(null===o)throw new K(\"EHPTP15778\");o.dispatchEvent(n)}propagateToThisAndSubtree(t,e){this.emitUnknown(t,...e);for(let i=0;ithis.handleContainerResize())),this._windowBeforeUnloadListener=()=>this.onBeforeUnload(),this._windowBeforeUnloadListening=!1,this._maximisedStackBeforeDestroyedListener=t=>this.cleanupBeforeMaximisedStackDestroyed(t),this.isSubWindow=t.isSubWindow,this._constructorOrSubWindowLayoutConfig=t.constructorOrSubWindowLayoutConfig,Q.checkInitialise(),dt.checkInitialise(),void 0!==t.containerElement&&(this._containerElement=t.containerElement)}get container(){return this._containerElement}get isInitialised(){return this._isInitialised}get groundItem(){return this._groundItem}get root(){return this._groundItem}get openPopouts(){return this._openPopouts}get dropTargetIndicator(){return this._dropTargetIndicator}get transitionIndicator(){return this._transitionIndicator}get width(){return this._width}get height(){return this._height}get eventHub(){return this._eventHub}get rootItem(){if(void 0===this._groundItem)throw new Error(\"Cannot access rootItem before init\");return 0===this._groundItem.contentItems.length?void 0:this._groundItem.contentItems[0]}get focusedComponentItem(){return this._focusedComponentItem}get tabDropPlaceholder(){return this._tabDropPlaceholder}get maximisedStack(){return this._maximisedStack}get deprecatedConstructor(){return!this.isSubWindow&&void 0!==this._constructorOrSubWindowLayoutConfig}destroy(){if(this._isInitialised){this._windowBeforeUnloadListening&&(globalThis.removeEventListener(\"beforeunload\",this._windowBeforeUnloadListener),this._windowBeforeUnloadListening=!1),!0===this.layoutConfig.settings.closePopoutsOnUnload&&this.closeAllOpenPopouts(),this._resizeObserver.disconnect(),this.checkClearResizeTimeout(),void 0!==this._groundItem&&this._groundItem.destroy(),this._tabDropPlaceholder.remove(),null!==this._dropTargetIndicator&&this._dropTargetIndicator.destroy(),null!==this._transitionIndicator&&this._transitionIndicator.destroy(),this._eventHub.destroy();for(const t of this._dragSources)t.destroy();this._dragSources=[],this._isInitialised=!1}}minifyConfig(t){return _t.minifyConfig(t)}unminifyConfig(t){return _t.unminifyConfig(t)}init(){let t;if(this.setContainer(),this._dropTargetIndicator=new oe,this._transitionIndicator=new se,this.updateSizeFromContainer(),this.isSubWindow){if(void 0===this._constructorOrSubWindowLayoutConfig)throw new J(\"LMIU07155\");{const e=this._constructorOrSubWindowLayoutConfig.root;if(void 0===e)throw new X(\"LMIC07156\");if(!Ct.isComponent(e))throw new X(\"LMIC07157\");t=e;const i=xt.resolve(this._constructorOrSubWindowLayoutConfig);this.layoutConfig=Object.assign(Object.assign({},i),{root:void 0})}}else void 0===this._constructorOrSubWindowLayoutConfig?this.layoutConfig=_t.createDefault():this.layoutConfig=xt.resolve(this._constructorOrSubWindowLayoutConfig);const e=this.layoutConfig;this._groundItem=new Yt(this,e.root,this._containerElement),this._groundItem.init(),this.checkLoadedLayoutMaximiseItem(),this._resizeObserver.observe(this._containerElement),this._isInitialised=!0,this.adjustColumnsResponsive(),this.emit(\"initialised\"),void 0!==t&&this.loadComponentAsRoot(t)}loadLayout(t){if(!this.isInitialised)throw new Error(\"GoldenLayout: Need to call init() if LayoutConfig with defined root passed to constructor\");if(void 0===this._groundItem)throw new J(\"LMLL11119\");this.createSubWindows(),this.layoutConfig=xt.resolve(t),this._groundItem.loadRoot(this.layoutConfig.root),this.checkLoadedLayoutMaximiseItem(),this.adjustColumnsResponsive()}saveLayout(){if(!1===this._isInitialised)throw new Error(\"Can't create config, layout not yet initialised\");if(void 0===this._groundItem)throw new J(\"LMTC18244\");{const t=this._groundItem.calculateConfigContent();let e;e=1!==t.length?void 0:t[0],this.reconcilePopoutWindows();const i=[];for(let t=0;t=0?n=this._groundItem.contentItems[0]:e=0;break;case at.row:case at.column:e=n.addItem(t,i.index);break;case at.stack:if(Ct.isComponent(t)){e=n.addItem(t,i.index);break}throw Error(tt[6]);case at.component:throw new X(\"LMAIALC87444602\");default:throw new Y(\"LMAIALU98881733\",n.type)}if(Ct.isComponent(t)){const t=n.contentItems[e];Gt.isStack(t)&&(n=t,e=0)}return i.parentItem=n,i.index=e,i}}}loadComponentAsRoot(t){if(void 0===this._groundItem)throw new Error(\"Cannot add item before init\");this._groundItem.loadComponentAsRoot(t)}updateSize(t,e){this.setSize(t,e)}setSize(t,e){if(this._width=t,this._height=e,!0===this._isInitialised){if(void 0===this._groundItem)throw new J(\"LMUS18881\");if(this._groundItem.setSize(this._width,this._height),this._maximisedStack){const{width:t,height:e}=kt(this._containerElement);Tt(this._maximisedStack.element,t),At(this._maximisedStack.element,e),this._maximisedStack.updateSize(!1)}this.adjustColumnsResponsive()}}beginSizeInvalidation(){this._sizeInvalidationBeginCount++}endSizeInvalidation(){0==--this._sizeInvalidationBeginCount&&this.updateSizeFromContainer()}updateSizeFromContainer(){const{width:t,height:e}=kt(this._containerElement);this.setSize(t,e)}updateRootSize(t=!1){if(void 0===this._groundItem)throw new J(\"LMURS28881\");this._groundItem.updateSize(t)}createAndInitContentItem(t,e){const i=this.createContentItem(t,e);return i.init(),i}createContentItem(t,e){if(\"string\"!=typeof t.type)throw new G(\"Missing parameter 'type'\",JSON.stringify(t));if(ct.isComponentItem(t)&&!(e instanceof ee)&&e&&!(!0===this.isSubWindow&&e instanceof Yt)){t={type:at.stack,content:[t],size:t.size,sizeUnit:t.sizeUnit,minSize:t.minSize,minSizeUnit:t.minSizeUnit,id:t.id,maximised:t.maximised,isClosable:t.isClosable,activeItemIndex:0,header:void 0}}return this.createContentItemFromConfig(t,e)}findFirstComponentItemById(t){if(void 0===this._groundItem)throw new J(\"LMFFCIBI82446\");return this.findFirstContentItemTypeByIdRecursive(at.component,t,this._groundItem)}createPopout(t,e,i,n){return t instanceof Gt?this.createPopoutFromContentItem(t,e,i,n):this.createPopoutFromItemConfig(t,e,i,n)}createPopoutFromContentItem(t,e,i,n){let o=t.parent,s=t;for(;null!==o&&1===o.contentItems.length&&!o.isGround;)s=o,o=o.parent;if(null===o)throw new K(\"LMCPFCI00834\");{if(void 0===n&&(n=o.contentItems.indexOf(s)),null!==i&&o.addPopInParentId(i),void 0===e){const i=globalThis.screenX||globalThis.screenLeft,n=globalThis.screenY||globalThis.screenTop,o=t.element.offsetLeft,s=t.element.offsetTop,{width:r,height:a}=kt(t.element);e={left:i+o,top:n+s,width:r,height:a}}const r=t.toConfig();if(t.remove(),ft.isRootItemConfig(r))return this.createPopoutFromItemConfig(r,e,i,n);throw new Error(`${tt[0]}`)}}beginVirtualSizedContainerAdding(){0==++this._virtualSizedContainerAddingBeginCount&&(this._virtualSizedContainers.length=0)}addVirtualSizedContainer(t){this._virtualSizedContainers.push(t)}endVirtualSizedContainerAdding(){if(0==--this._virtualSizedContainerAddingBeginCount){const t=this._virtualSizedContainers.length;if(t>0){this.fireBeforeVirtualRectingEvent(t);for(let e=0;ethis.emit(\"windowOpened\",a))),a.on(\"closed\",(()=>this.reconcilePopoutWindows())),this._openPopouts.push(a),this.layoutConfig.settings.closePopoutsOnUnload&&!this._windowBeforeUnloadListening&&(globalThis.addEventListener(\"beforeunload\",this._windowBeforeUnloadListener,{passive:!0}),this._windowBeforeUnloadListening=!0),a}closeAllOpenPopouts(){for(let t=0;tglobalThis.close()),1)}getArea(t,e){let i=null,n=1/0;for(let o=0;o=s.x1&&t=s.y1&&es.surface&&(n=s.surface,i=s)}return i}calculateItemAreas(){const t=this.getAllContentItems(),e=this._groundItem;if(void 0===e)throw new J(\"LMCIAR44365\");if(1!==t.length){e.contentItems[0].isStack?this._itemAreas=[]:this._itemAreas=e.createSideAreas();for(let e=0;e0){let e=t[0];if(Gt.isComponentItem(e)){const t=e.parent;if(null===t)throw new K(\"LMXLLMI69999\");e=t}if(!Gt.isStack(e))throw new X(\"LMCLLMI19993\");e.maximise()}}}processMaximiseStack(t){if(this._maximisedStack=t,t.on(\"beforeItemDestroyed\",this._maximisedStackBeforeDestroyedListener),t.element.classList.add(\"lm_maximised\"),t.element.insertAdjacentElement(\"afterend\",this._maximisePlaceholder),void 0===this._groundItem)throw new J(\"LMMXI19993\");{this._groundItem.element.prepend(t.element);const{width:e,height:i}=kt(this._containerElement);Tt(t.element,e),At(t.element,i),t.updateSize(!0),t.focusActiveContentItem(),this._maximisedStack.emit(\"maximised\"),this.emit(\"stateChanged\")}}processMinimiseMaximisedStack(){if(void 0===this._maximisedStack)throw new X(\"LMMMS74422\");{const t=this._maximisedStack;if(null===t.parent)throw new K(\"LMMI13668\");t.element.classList.remove(\"lm_maximised\"),this._maximisePlaceholder.insertAdjacentElement(\"afterend\",t.element),this._maximisePlaceholder.remove(),this.updateRootSize(!0),this._maximisedStack=void 0,t.off(\"beforeItemDestroyed\",this._maximisedStackBeforeDestroyedListener),t.emit(\"minimised\"),this.emit(\"stateChanged\")}}reconcilePopoutWindows(){const t=[];for(let e=0;e{this._resizeTimeoutId=void 0,this.beginSizeInvalidation(),this.endSizeInvalidation()}),this.resizeDebounceInterval))}checkClearResizeTimeout(){void 0!==this._resizeTimeoutId&&(clearTimeout(this._resizeTimeoutId),this._resizeTimeoutId=void 0)}setContainer(){var t;const e=document.body,i=null!==(t=this._containerElement)&&void 0!==t?t:e;if(i===e){this.resizeWithContainerAutomatically=!0;const t=document.documentElement;t.style.height=\"100%\",t.style.margin=\"0\",t.style.padding=\"0\",t.style.overflow=\"clip\",e.style.height=\"100%\",e.style.margin=\"0\",e.style.padding=\"0\",e.style.overflow=\"clip\"}this._containerElement=i}onBeforeUnload(){this.destroy()}adjustColumnsResponsive(){if(void 0===this._groundItem)throw new J(\"LMACR20883\");if(this._firstLoad=!1,this.useResponsiveLayout()&&!this._updatingColumnsResponsive&&this._groundItem.contentItems.length>0&&this._groundItem.contentItems[0].isRow){if(void 0===this._groundItem||null===this._width)throw new J(\"LMACR77412\");{const t=this._groundItem.contentItems[0].contentItems.length;if(t<=1)return;{const e=this.layoutConfig.dimensions.defaultMinItemWidth;if(t*e<=this._width)return;{this._updatingColumnsResponsive=!0;const i=t-Math.max(Math.floor(this._width/e),1),n=this._groundItem.contentItems[0],o=this.getAllStacks();if(0===o.length)throw new X(\"LMACRS77413\");{const t=o[0];for(let e=0;en?void 0:{parentItem:t,index:o}}}case 1:if(void 0===this._focusedComponentItem)return;{const t=this._focusedComponentItem.parentItem;return this.tryCreateLocationFromParentItem(t,e)}case 2:{const t=this.findFirstContentItemType(at.stack);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 3:{let t=this.findFirstContentItemType(at.row);return void 0!==t?this.tryCreateLocationFromParentItem(t,e):(t=this.findFirstContentItemType(at.column),void 0!==t?this.tryCreateLocationFromParentItem(t,e):void 0)}case 4:{const t=this.findFirstContentItemType(at.row);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 5:{const t=this.findFirstContentItemType(at.column);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 6:if(void 0===this._groundItem)throw new J(\"LMFLRIF18244\");return void 0!==this.rootItem?void 0:void 0===e||0===e?{parentItem:this._groundItem,index:0}:void 0;case 7:if(void 0===this._groundItem)throw new J(\"LMFLF18244\");{const t=this._groundItem.contentItems;if(0===t.length)return void 0===e||0===e?{parentItem:this._groundItem,index:0}:void 0;{const i=t[0];return this.tryCreateLocationFromParentItem(i,e)}}}}tryCreateLocationFromParentItem(t,e){const i=t.contentItems.length;return void 0===e?{parentItem:t,index:i}:e<0||e>i?void 0:{parentItem:t,index:e}}}!function(t){t.createMaximisePlaceElement=function(t){const e=t.createElement(\"div\");return e.classList.add(\"lm_maximise_place\"),e},t.createTabDropPlaceholderElement=function(t){const e=t.createElement(\"div\");return e.classList.add(\"lm_drop_tab_placeholder\"),e},t.defaultLocationSelectors=[{typeId:1,index:void 0},{typeId:2,index:void 0},{typeId:3,index:void 0},{typeId:7,index:void 0}],t.afterFocusedItemIfPossibleLocationSelectors=[{typeId:0,index:1},{typeId:2,index:void 0},{typeId:3,index:void 0},{typeId:7,index:void 0}]}(ae||(ae={}));class le extends ae{constructor(t,e,i,n){if(super(le.createLayoutManagerConstructorParameters(t,e)),this._bindComponentEventHanlderPassedInConstructor=!1,this._creationTimeoutPassed=!1,void 0!==e&&\"function\"==typeof e&&(this.bindComponentEvent=e,this._bindComponentEventHanlderPassedInConstructor=!0,void 0!==i&&(this.unbindComponentEvent=i)),!this._bindComponentEventHanlderPassedInConstructor&&this.isSubWindow){if(void 0===this._constructorOrSubWindowLayoutConfig)throw new J(\"VLC98823\");{const t=xt.resolve(this._constructorOrSubWindowLayoutConfig);this.layoutConfig=Object.assign(Object.assign({},t),{root:void 0})}}!0!==n&&(this.deprecatedConstructor||this.init())}destroy(){this.bindComponentEvent=void 0,this.unbindComponentEvent=void 0,super.destroy()}init(){if(this._bindComponentEventHanlderPassedInConstructor||\"loading\"!==document.readyState&&null!==document.body){if(!this._bindComponentEventHanlderPassedInConstructor&&!0===this.isSubWindow&&!this._creationTimeoutPassed)return setTimeout((()=>this.init()),7),void(this._creationTimeoutPassed=!0);!0===this.isSubWindow&&(this._bindComponentEventHanlderPassedInConstructor||this.clearHtmlAndAdjustStylesForSubWindow(),window.__glInstance=this),super.init()}else document.addEventListener(\"DOMContentLoaded\",(()=>this.init()),{passive:!0})}clearHtmlAndAdjustStylesForSubWindow(){const t=document.head,e=new Array(4);e[0]=document.querySelectorAll(\"body link\"),e[1]=document.querySelectorAll(\"body style\"),e[2]=document.querySelectorAll(\"template\"),e[3]=document.querySelectorAll(\".gl_keep\");for(let i=0;ithis.emit(\"popIn\"))),document.body.appendChild(t),!0}}bindComponent(t,e){if(void 0!==this.bindComponentEvent){return this.bindComponentEvent(t,e)}if(void 0!==this.getComponentEvent)return{virtual:!1,component:this.getComponentEvent(t,e)};{const t=`${tt[2]}: ${JSON.stringify(e)}`;throw new Z(t)}}unbindComponent(t,e,i){if(void 0!==this.unbindComponentEvent)this.unbindComponentEvent(t);else if(!e&&void 0!==this.releaseComponentEvent){if(void 0===i)throw new J(\"VCUCRCU333998\");this.releaseComponentEvent(t,i)}}}!function(t){let e=!1;t.createLayoutManagerConstructorParameters=function(t,i){const n=e?null:new URL(document.location.href).searchParams.get(\"gl-window\");e=!0;const o=null!==n;let s,r;if(null!==n){const e=localStorage.getItem(n);if(null===e)throw new Error(\"Null gl-window Config\");localStorage.removeItem(n);const i=JSON.parse(e),o=_t.unminifyConfig(i);r=xt.fromResolved(o),t instanceof HTMLElement&&(s=t)}else void 0===t?r=void 0:t instanceof HTMLElement?(r=void 0,s=t):r=t,void 0===s&&i instanceof HTMLElement&&(s=i);return{constructorOrSubWindowLayoutConfig:r,isSubWindow:o,containerElement:s}}}(le||(le={}));class he extends le{constructor(t,e,i){super(t,e,i,!0),this._componentTypesMap=new Map,this._registeredComponentMap=new Map,this._virtuableComponentMap=new Map,this._containerVirtualRectingRequiredEventListener=(t,e,i)=>this.handleContainerVirtualRectingRequiredEvent(t,e,i),this._containerVirtualVisibilityChangeRequiredEventListener=(t,e)=>this.handleContainerVirtualVisibilityChangeRequiredEvent(t,e),this._containerVirtualZIndexChangeRequiredEventListener=(t,e,i)=>this.handleContainerVirtualZIndexChangeRequiredEvent(t,e,i),this.deprecatedConstructor||this.init()}registerComponent(t,e,i=!1){if(\"function\"!=typeof e)throw new $(\"registerComponent() componentConstructorOrFactoryFtn parameter is not a function\");if(e.hasOwnProperty(\"prototype\")){const n=e;this.registerComponentConstructor(t,n,i)}else{const n=e;this.registerComponentFactoryFunction(t,n,i)}}registerComponentConstructor(t,e,i=!1){if(\"function\"!=typeof e)throw new Error(tt[1]);if(void 0!==this._componentTypesMap.get(t))throw new Z(`${tt[3]}: ${t}`);this._componentTypesMap.set(t,{constructor:e,factoryFunction:void 0,virtual:i})}registerComponentFactoryFunction(t,e,i=!1){if(\"function\"!=typeof e)throw new Z(\"Please register a constructor function\");if(void 0!==this._componentTypesMap.get(t))throw new Z(`${tt[3]}: ${t}`);this._componentTypesMap.set(t,{constructor:void 0,factoryFunction:e,virtual:i})}registerComponentFunction(t){this.registerGetComponentConstructorCallback(t)}registerGetComponentConstructorCallback(t){if(\"function\"!=typeof t)throw new Error(\"Please register a callback function\");void 0!==this._getComponentConstructorFtn&&console.warn(\"Multiple component functions are being registered. Only the final registered function will be used.\"),this._getComponentConstructorFtn=t}getRegisteredComponentTypeNames(){const t=this._componentTypesMap.keys();return Array.from(t)}getComponentInstantiator(t){let e;const i=pt.resolveComponentTypeName(t);return void 0!==i&&(e=this._componentTypesMap.get(i)),void 0===e&&void 0!==this._getComponentConstructorFtn&&(e={constructor:this._getComponentConstructorFtn(t),factoryFunction:void 0,virtual:!1}),e}bindComponent(t,e){let i;const n=pt.resolveComponentTypeName(e);let o;if(void 0!==n&&(i=this._componentTypesMap.get(n)),void 0===i&&void 0!==this._getComponentConstructorFtn&&(i={constructor:this._getComponentConstructorFtn(e),factoryFunction:void 0,virtual:!1}),void 0!==i){const s=i.virtual;let r,a;r=void 0===e.componentState?void 0:Ut({},e.componentState);const l=i.constructor;if(void 0!==l)a=new l(t,r,s);else{const e=i.factoryFunction;if(void 0===e)throw new X(\"LMBCFFU10008\");a=e(t,r,s)}if(s){if(void 0===a)throw new J(\"GLBCVCU988774\");{const e=a,i=e.rootHtmlElement;if(void 0===i)throw new Z(`${tt[5]}: ${n}`);!function(t){const e=\"absolute\";t.style.position!==e&&(t.style.position=e)}(i),this.container.appendChild(i),this._virtuableComponentMap.set(t,e),t.virtualRectingRequiredEvent=this._containerVirtualRectingRequiredEventListener,t.virtualVisibilityChangeRequiredEvent=this._containerVirtualVisibilityChangeRequiredEventListener,t.virtualZIndexChangeRequiredEvent=this._containerVirtualZIndexChangeRequiredEventListener}}this._registeredComponentMap.set(t,a),o={virtual:i.virtual,component:a}}else o=super.bindComponent(t,e);return o}unbindComponent(t,e,i){if(void 0===this._registeredComponentMap.get(t))super.unbindComponent(t,e,i);else{const e=this._virtuableComponentMap.get(t);if(void 0!==e){const i=e.rootHtmlElement;if(void 0===i)throw new X(\"GLUC77743\",t.title);this.container.removeChild(i),this._virtuableComponentMap.delete(t)}}}fireBeforeVirtualRectingEvent(t){this._goldenLayoutBoundingClientRect=this.container.getBoundingClientRect(),super.fireBeforeVirtualRectingEvent(t)}handleContainerVirtualRectingRequiredEvent(t,e,i){const n=this._virtuableComponentMap.get(t);if(void 0===n)throw new J(\"GLHCSCE55933\");{const o=n.rootHtmlElement;if(void 0===o)throw new Z(tt[4]+\" \"+t.title);{const n=t.element.getBoundingClientRect(),s=n.left-this._goldenLayoutBoundingClientRect.left;o.style.left=zt(s);const r=n.top-this._goldenLayoutBoundingClientRect.top;o.style.top=zt(r),Tt(o,e),At(o,i)}}}handleContainerVirtualVisibilityChangeRequiredEvent(t,e){const i=this._virtuableComponentMap.get(t);if(void 0===i)throw new J(\"GLHCVVCRE55934\");{const n=i.rootHtmlElement;if(void 0===n)throw new Z(tt[4]+\" \"+t.title);Dt(n,e)}}handleContainerVirtualZIndexChangeRequiredEvent(t,e,i){const n=this._virtuableComponentMap.get(t);if(void 0===n)throw new J(\"GLHCVZICRE55935\");{const e=n.rootHtmlElement;if(void 0===e)throw new Z(tt[4]+\" \"+t.title);e.style.zIndex=i}}}const de=\"initial_\",ce={show:\"top\",popout:!1,maximise:!1,close:\"close-tab-unused\"},me={headerHeight:31},ue={hasHeaders:!0,reorderEnabled:!0},pe={popoutWholeStack:!1,constrainDragToContainer:!1,constrainDragToHeaders:!1,preventDragout:!1,showMaximiseIcon:!1,showPopoutIcon:!1,showCloseIcon:!1,blockedPopoutsThrowError:!0,closePopoutsOnUnload:!0,selectionEnabled:!1};var ge,fe;class ve{constructor(e){this.layout=e,ge.set(this,void 0),fe.set(this,void 0),this.handleResize=t=>{t.forEach((t=>this.resizeElement(t.target)))},this.handleMutation=()=>{this.layout.viewComponentsByContainerElement.forEach((t=>{this.resizeElement(t.container.element)}))},t.__classPrivateFieldSet(this,ge,new ResizeObserver(this.handleResize),\"f\"),t.__classPrivateFieldSet(this,fe,new MutationObserver(this.handleMutation),\"f\")}observeMutations(e){t.__classPrivateFieldGet(this,fe,\"f\")?.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[\"class\"]})}destroy(){t.__classPrivateFieldGet(this,ge,\"f\").disconnect(),t.__classPrivateFieldGet(this,fe,\"f\").disconnect()}observeContainer(e){t.__classPrivateFieldGet(this,ge,\"f\").observe(e)}unobserveContainer(e){t.__classPrivateFieldGet(this,ge,\"f\").unobserve(e)}resizeElement(t){const e=this.layout.viewComponentsByContainerElement.get(t);e&&e.resize()}}ge=new WeakMap,fe=new WeakMap;var _e={};Object.defineProperty(_e,\"__esModule\",{value:!0});var ye=_e.BaseItem=void 0;class Ce{constructor(t,e,i){this._item=t,this._layout=e,this._wrap=i}get raw(){return this._item}get layout(){return this._layout}get type(){return this._item.type}get contentItems(){return(this._item.contentItems??[]).map((t=>this._wrap(t)))}get parent(){const t=this._item.parent;return t?this._wrap(t):null}setActiveContentItem(t,e){if(\"stack\"!==this.type)throw new Error(`Cannot call setActiveContentItem from a non-stack item: ${this.type}`);this._item.setActiveContentItem(t.raw,e)}static wrapInternal(t,e,i){const n=Ce.wrapCache.get(e);if(n)return n;const o=new t(e,i,(e=>Ce.wrapInternal(t,e,i)));return Ce.wrapCache.set(e,o),o}}ye=_e.BaseItem=Ce,Ce.wrapCache=new WeakMap;const we=t=>!!t&&\"contentItems\"in t&&(t.isRow||t.isColumn);class Ie extends ye{isRoot(){return!!this._item.parent?.isGround}getBounds(){return this._item.element.getBoundingClientRect()}get viewName(){if(this._item.isComponent){const{component:t}=this._item;return t.identity.name}throw new Error(\"View name not found\")}onDestroyed(t){const e=({target:i})=>{i===this._item&&(t(),this._item.off(\"itemDestroyed\",e))};this._item.on(\"itemDestroyed\",e)}createAdjacentStack({position:t=\"right\"}={}){const e=this.raw;if(ee.isStack(e)&&e.parent){const i=[\"top\",\"bottom\"].includes(t)?\"column\":\"row\",n=[\"left\",\"top\"].includes(t)?1:0,o=we(e.parent)?e.parent:e.layoutManager,s=o,r=e.parent.contentItems.indexOf(e);e.parent.isGround&&e.parent.removeChild(e,!0);const a=o.newItem({type:i,content:[{type:\"stack\",content:[]}]},r);if(!a)throw new Error(\"createAdjacentStack: Failed to create new container\");const l=a.contentItems[0];return a.addChild(this.raw,n),we(s)&&s.removeChild(e,!0),this._wrap(l)}throw new Error(`Cannot creat adjacent stacks for type: ${e.type}, must be type 'stack'`)}setActiveContentItem(t,e=!0){if(!ee.isStack(this._item))throw new Error(`Cannot call setActiveContentItem from a non-stack item: ${this.type}`);this._item.setActiveComponentItem(t.raw,!e)}static wrap(t,e){return ye.wrapInternal(Ie,t,e)}}function be(t=[],e){for(const i of t)\"component\"===i.type?Object.keys(e).forEach((t=>{t in i&&(i.componentState={[`${de}${t}`]:i[t],...i.componentState}),i[t]=e[t]})):be(i.content,e)}function Se(t=[],e,i){for(const n of t)if(\"component\"===n.type)Object.keys(e).forEach((t=>{if(`${de}${t}`in n.componentState)return n[t]=n.componentState[`${de}${t}`],void delete n.componentState[`${de}${t}`];n[t]=e[t]}));else{if(n.size&&(\"row\"===i||\"column\"===i)){n[\"row\"===i?\"width\":\"height\"]=n.size?.includes(\".\")?parseFloat(n.size):parseInt(n.size)}Se(n.content,e,n.type)}}function Ee(t){if(t.root){t.root.content&&Se([t.root],{componentName:\"view\",isClosable:!0});const e=t.root;t.content=[e],delete t.root}return t}const xe=e=>class extends e{connectedCallback(){if(!this.name||!this.uuid)throw new Error(\" Name or uuid attribute missing\");if(!this.src)throw new Error(\" missing 'src' attribute.\");this.#t||(this.#t=document.createElement(\"iframe\"),this.#t.src=this.src,this.#t.style.height=\"100%\",this.#t.style.width=\"100%\",this.#t.style.border=\"none\",this.forceFrameName?this.#t.setAttribute(\"name\",this.forceFrameName):this.#t.setAttribute(\"name\",t.encodeOptions({brokerUrl:this.brokerUrl,name:this.name,uuid:this.uuid,providerId:this.providerId,contextGroup:this.contextGroup},\"of-frame\")),this.#t.setAttribute(\"id\",this.name),this.appendChild(this.#t))}#t;get brokerUrl(){return this.getAttribute(\"of-broker\")}set brokerUrl(t){t&&this.setAttribute(\"of-broker\",t)}get name(){return this.getAttribute(\"of-name\")}set name(t){t&&this.setAttribute(\"of-name\",t)}get forceFrameName(){return this.getAttribute(\"forceFrameName\")}set forceFrameName(t){t&&this.setAttribute(\"forceFrameName\",t)}get uuid(){return this.getAttribute(\"of-uuid\")}set uuid(t){t&&this.setAttribute(\"of-uuid\",t)}get src(){return this.getAttribute(\"src\")}set src(t){t&&this.setAttribute(\"src\",t)}get providerId(){return this.getAttribute(\"of-provider-id\")}set providerId(t){t&&this.setAttribute(\"of-provider-id\",t)}get contextGroup(){return this.getAttribute(\"of-context-group\")}set contextGroup(t){t&&this.setAttribute(\"of-context-group\",t)}static get observedAttributes(){return[\"name\"]}};class Le{static create(t){const e=document.createElement(\"of-view\");return Object.entries(t).forEach((([t,i])=>{e.setAttribute(t,i)})),e}}customElements.define(\"of-view\",xe(HTMLElement));class ze{constructor(t,i,n,{brokerUrl:o,interopConfig:s},r){this.container=t,this.config=i,this.ofView=null,this.isDragging=()=>this.container.tab.element?.className.includes(\"lm_dragging\")??!1;const{url:a,web:l,interop:h,name:d}=i||{},c=d??`internal-generated-view-${e.v4()}`;if(this.identity={uuid:n,name:c},this.container.element.setAttribute(\"of-name\",c),this.container.element.id=`container-${c}`,this.container.parent.id=c,void 0===a)return void this.handleUrlMissing();const m=this.updateTitleIfNotSet(a),u={\"of-broker\":o,\"of-uuid\":n,\"of-name\":c,src:a};l?.frameName&&(u.forceFrameName=l.frameName);const p=h?.currentContextGroup??s?.currentContextGroup;p&&(u[\"of-context-group\"]=p),s?.providerId&&(u[\"of-provider-id\"]=s?.providerId),this.ofView=Le.create(u),this.ofView.title=m??`Iframe: ${a}`,r.appendChild(this.ofView),this.ofView.style.position=\"absolute\"}updateTitleIfNotSet(t){return\"view\"===this.container.parent.title&&this.container.parent.setTitle(t),this.container.parent.title}handleUrlMissing(){const t=document.createElement(\"div\");t.setAttribute(\"style\",\"padding: 20px\");t.innerText=\"No URL provided\",this.container.element.appendChild(t)}destroy(){this.ofView?.remove(),this.ofView=null}closeView(){this.container.close()}resize(){if(this.ofView){if(this.isDragging())return void(this.ofView.style.display=\"none\");const t=this.container.element.getBoundingClientRect();this.ofView.style.position=\"absolute\",this.ofView.style.height=`${t.height}px`,this.ofView.style.width=`${t.width}px`,this.ofView.style.inset=`${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`,this.ofView.style.display=\"block\"}}}class Me extends U{static overrideConfig(t){const e={...ue,...t.settings,...pe};return e.reorderEnabled?be(t.content,{isClosable:!0}):be(t.content,{reorderEnabled:!1}),{dimensions:me,...t,settings:e,header:{...ce,show:!1!==t.settings?.hasHeaders&&ce.show}}}constructor(t,e,i,{options:n},o,s){super(),this.identity=t,this.container=e,this.initialConfig=i,this.layoutManager=o,this.platformProvider=s,this.viewComponentsByContainerElement=new Map,this.layoutContentCache=_.getSingleInstance(),this.reparentingViews=new Set,this.goldenLayoutDestroyed=!1,this.createViewComponent=(t,e)=>{m.handleSharedView(this.layoutManager,this.identity,e);const i=new ze(t,e,this.identity.uuid,this.options,this.iframeContainer);return e&&!1===e[`${de}isClosable`]&&this.stylesheet.insertRule(`#tab-${i.identity.name} .lm_close_tab { display: none; }`),this.viewComponentsByContainerElement.set(t.element,i),this.resizeController.observeContainer(t.element),i},this.iframeContainer=document.createElement(\"div\"),this.iframeContainer.id=`openfin-layout-iframe-container-${this.identity.layoutName}`,this.domEmitter=new V(e),this.setupStylesheets(),this.layout=new he(this.container),this.layout.resizeWithContainerAutomatically=!0,this.options=n,this.layout.registerComponent(\"view\",this.createViewComponent),this.setupListeners(),this.resizeController=new ve(this),this.layout.loadLayout(Me.overrideConfig(i));const r=document.createElement(\"div\");r.id=`openfin-layout-shadow-container-${this.identity.layoutName}`,r.attachShadow({mode:\"open\",delegatesFocus:!1}).appendChild(this.iframeContainer),this.container.appendChild(r),this.resizeController.observeMutations(this.container)}getStackByView({name:t}){const e=this.layout.findFirstComponentItemById(t);if(e?.parent&&e?.parent?.isStack)return Ie.wrap(e.parent,this)}getRoot(){return Ie.wrap(this.layout.rootItem,this)}async platformCloseView(t){const e=[...this.viewComponentsByContainerElement.values()].find((e=>e.identity.name===t.name));if(!e)throw new Error(`View with name: ${t.name} not found in layout.`);e.closeView()}async platformCreateView(t,{location:e,targetView:i}={}){if(i)throw new Error(\"TargetView not supported in web\");const n={options:this.platformProvider.normalizeOptions(t),target:this.identity,location:e};return this.insertView(n)}setupStylesheets(){if(this.container.setAttribute(\"data-openfin-layout-name\",this.identity.layoutName),this.stylesheet=new CSSStyleSheet,this.stylesheet.insertRule(\".lm_close { display: none; }\"),document.adoptedStyleSheets.push(this.stylesheet),this.initialConfig.settings?.preventSplitterResize){const t=`\\n [data-openfin-layout-name='${this.identity.layoutName}'] .lm_splitter {\\n pointer-events: none;\\n }`;this.stylesheet.insertRule(t)}}insertView({options:t,location:e,targetView:i}){const n=e?this.layoutContentCache.getItemOrUndefined(e.id):void 0,o=i?this.layoutContentCache.getItemOrUndefined(i.name):void 0,s=n??o??Ie.wrap(this.layout.rootItem,this);let r;if(ee.isStack(s.raw))r=s.raw;else{if(!we(s.raw))throw new Error(\"Cannot add a view at the requested location\");r=s.raw.newItem({type:\"stack\",content:[]})}const a=Math.min(r.contentItems.length,e?.index??r.contentItems.length);let l=this.layout.findFirstComponentItemById(t.name);l?(l.parent&&l.parent.removeChild(l,!0),r.addChild(l,a)):l=r.newComponent(\"view\",t,t.title??t.url??\"Default Title\",a);const h=l.component.identity;return Promise.resolve({identity:h})}replaceView({viewToReplace:t,newView:e}){throw new Error(\"Method not implemented.\")}replaceLayout(t){throw new Error(\"Method not implemented.\")}async cleanupView(t){}applyPreset(t){throw new Error(\"Method not implemented.\")}getCurrentViews(){return[...this.viewComponentsByContainerElement.values()].map((t=>t.identity))}async getFrameSnapshot(){return Ee(xt.fromResolved(this.layout.toConfig()))}isVisible(){return W(this.container)}async onViewDetached({viewIdentity:t}){this.reparentingViews.add(t.name),this.platformCloseView(t)}async destroy(){this.goldenLayoutDestroyed||(this.goldenLayoutDestroyed=!0,this.layout.destroy()),this.iframeContainer.remove(),this.resizeController.destroy(),document.adoptedStyleSheets=document.adoptedStyleSheets.filter((t=>t!==this.stylesheet)),this.viewComponentsByContainerElement.clear()}setupListeners(){this.container.addEventListener(\"pointerdown\",(t=>{if(t.target instanceof HTMLElement){const e=t.target.classList;[\"lm_tab\",\"lm_title\",\"lm_splitter\",\"lm_drag_handle\"].some((t=>e.contains(t)))&&(this.handleDragStart(),2===t.button&&t.stopPropagation())}}),!0),document.addEventListener(\"pointerup\",(()=>this.handleDragEnd()),!0),this.layout.on(\"tabCreated\",(t=>{const e=t.componentItem.component;t.element.id=`tab-${e.identity.name}`,this.domEmitter.dispatchLocalEvent(\"tab-created\",e.identity)})),this.layout.on(\"itemCreated\",(({target:t})=>{const e=t;if(Gt.isComponentItem(e)){const t=e.component;this.domEmitter.dispatchLocalEvent(\"container-created\",t.identity)}})),this.layout.on(\"itemDestroyed\",(t=>{const e=t.target;if(Gt.isComponentItem(e)){const t=e.component;this.removeViewComponent(t)}})),this.layout.on(\"itemDropped\",(()=>{this.handleDragEnd()}))}handleDragStart(){this.iframeContainer.style.pointerEvents=\"none\"}handleDragEnd(){this.iframeContainer.style.pointerEvents=\"\"}removeViewComponent(t){if(t.config&&!1===t.config[`${de}isClosable`]){const e=[...this.stylesheet.cssRules].findIndex((e=>e.cssText.includes(`#tab-${t.identity.name}`)));this.stylesheet.deleteRule(e)}t.destroy(),this.viewComponentsByContainerElement.delete(t.container.element),this.resizeController.unobserveContainer(t.container.element),this.reparentingViews.has(t.identity.name)?this.reparentingViews.delete(t.identity.name):this.platformProvider.closeView(t.identity.name);0===this.getCurrentViews().length&&(this.goldenLayoutDestroyed||(this.goldenLayoutDestroyed=!0,m.handleLastViewRemoved(this.layoutManager,this.identity)))}}class Pe{constructor(t,e,i,n){this.windowIdentity=t,this.connectConfig=e,this.provider=i,this.fallbackContainer=n}async createLayout(t,e){if(!(\"container\"in t)&&!this.fallbackContainer)throw new Error(\"Container property is not optional in web\");const{layoutName:i}=t,n=t,o=this.provider.initLayoutViews(n),s=n.container??this.fallbackContainer,r={...this.windowIdentity,layoutName:i},a=new Me(r,s,o,this.connectConfig,e,this.provider);m.registerLayout(e,i,a),this.fallbackContainer=null}async getLayoutSnapshot(t){return t.getLayoutSnapshot()}async handleLastViewRemoved(t){}}class Te{static async init(e){const i=e.getFin().InterApplicationBus.Channel,n=await i.create(`custom-frame-${e.me.uuid}`);return n.setDefaultAction((async(t,{target:e,opts:i},o)=>{const s=n.connections.find((t=>t.name===e.name));if(s)return n.dispatch(s,t,{...i,target:e});throw new Error(`Client with name ${e.name} not found`)})),await t.relayChannelClientApi_1(n,\"layout-relay\"),new Te(e)}constructor(t){this.wire=t,this.viewNames=new Set}normalizeOptions(t,i=\"default\"){const n=this.wire.me.uuid;let{name:o=`internal-generated-view-${e.v4()}`}=t;return o.match(/^internal-generated-view-/)&&this.viewNames.has(o)&&\"duplicate\"===i&&(o=`internal-generated-view-${e.v4()}`),this.viewNames.add(o),{...t,name:o,uuid:n}}closeView(t){this.viewNames.delete(t)}initLayoutViews({layout:t,multiInstanceViewBehavior:e}){return H((t=>{if(\"component\"===t.type&&t.componentState){const i=this.normalizeOptions(t.componentState,e);return{...t,componentState:i}}return t}),t)}}var Ae;const ke=t=>t;Ae=new WeakMap,exports.WebLayoutEntryPoint=class{constructor(e){Ae.set(this,void 0),this.initLayoutManager=async(e,i,{container:n,layoutManagerOverride:o})=>{const s=await Te.init(i),r=o??ke,a=new Pe(i.me,t.__classPrivateFieldGet(this,Ae,\"f\"),s,n),l=new(r(m.createClosedConstructor(a)));return await M(i,l),l},this.applyLayoutSnapshot=async(e,i,n)=>{await i.applyLayoutSnapshot(t.__classPrivateFieldGet(this,Ae,\"f\").platform.layoutSnapshot)},this.createLayout=async(t,e)=>m.createLayout(t,e),this.destroyLayout=async(t,e)=>m.destroyLayout(t,e),t.__classPrivateFieldSet(this,Ae,e,\"f\")}};\n","'use strict'\n\nexports.byteLength = byteLength\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\nfor (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i]\n revLookup[code.charCodeAt(i)] = i\n}\n\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction getLens (b64) {\n var len = b64.length\n\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // Trim off extra bytes after placeholder bytes are found\n // See: https://github.com/beatgammit/base64-js/issues/42\n var validLen = b64.indexOf('=')\n if (validLen === -1) validLen = len\n\n var placeHoldersLen = validLen === len\n ? 0\n : 4 - (validLen % 4)\n\n return [validLen, placeHoldersLen]\n}\n\n// base64 is 4/3 + up to two characters of the original data\nfunction byteLength (b64) {\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction _byteLength (b64, validLen, placeHoldersLen) {\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction toByteArray (b64) {\n var tmp\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n\n var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))\n\n var curByte = 0\n\n // if there are placeholders, only get up to the last complete 4 chars\n var len = placeHoldersLen > 0\n ? validLen - 4\n : validLen\n\n var i\n for (i = 0; i < len; i += 4) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 18) |\n (revLookup[b64.charCodeAt(i + 1)] << 12) |\n (revLookup[b64.charCodeAt(i + 2)] << 6) |\n revLookup[b64.charCodeAt(i + 3)]\n arr[curByte++] = (tmp >> 16) & 0xFF\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 2) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 2) |\n (revLookup[b64.charCodeAt(i + 1)] >> 4)\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 1) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 10) |\n (revLookup[b64.charCodeAt(i + 1)] << 4) |\n (revLookup[b64.charCodeAt(i + 2)] >> 2)\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] +\n lookup[num >> 12 & 0x3F] +\n lookup[num >> 6 & 0x3F] +\n lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n var tmp\n var output = []\n for (var i = start; i < end; i += 3) {\n tmp =\n ((uint8[i] << 16) & 0xFF0000) +\n ((uint8[i + 1] << 8) & 0xFF00) +\n (uint8[i + 2] & 0xFF)\n output.push(tripletToBase64(tmp))\n }\n return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n var tmp\n var len = uint8.length\n var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n var parts = []\n var maxChunkLength = 16383 // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1]\n parts.push(\n lookup[tmp >> 2] +\n lookup[(tmp << 4) & 0x3F] +\n '=='\n )\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + uint8[len - 1]\n parts.push(\n lookup[tmp >> 10] +\n lookup[(tmp >> 4) & 0x3F] +\n lookup[(tmp << 2) & 0x3F] +\n '='\n )\n }\n\n return parts.join('')\n}\n","/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n/* eslint-disable no-proto */\n\n'use strict'\n\nconst base64 = require('base64-js')\nconst ieee754 = require('ieee754')\nconst customInspectSymbol =\n (typeof Symbol === 'function' && typeof Symbol['for'] === 'function') // eslint-disable-line dot-notation\n ? Symbol['for']('nodejs.util.inspect.custom') // eslint-disable-line dot-notation\n : null\n\nexports.Buffer = Buffer\nexports.SlowBuffer = SlowBuffer\nexports.INSPECT_MAX_BYTES = 50\n\nconst K_MAX_LENGTH = 0x7fffffff\nexports.kMaxLength = K_MAX_LENGTH\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Print warning and recommend using `buffer` v4.x which has an Object\n * implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * We report that the browser does not support typed arrays if the are not subclassable\n * using __proto__. Firefox 4-29 lacks support for adding new properties to `Uint8Array`\n * (See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438). IE 10 lacks support\n * for __proto__ and has a buggy typed array implementation.\n */\nBuffer.TYPED_ARRAY_SUPPORT = typedArraySupport()\n\nif (!Buffer.TYPED_ARRAY_SUPPORT && typeof console !== 'undefined' &&\n typeof console.error === 'function') {\n console.error(\n 'This browser lacks typed array (Uint8Array) support which is required by ' +\n '`buffer` v5.x. Use `buffer` v4.x if you require old browser support.'\n )\n}\n\nfunction typedArraySupport () {\n // Can typed array instances can be augmented?\n try {\n const arr = new Uint8Array(1)\n const proto = { foo: function () { return 42 } }\n Object.setPrototypeOf(proto, Uint8Array.prototype)\n Object.setPrototypeOf(arr, proto)\n return arr.foo() === 42\n } catch (e) {\n return false\n }\n}\n\nObject.defineProperty(Buffer.prototype, 'parent', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.buffer\n }\n})\n\nObject.defineProperty(Buffer.prototype, 'offset', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.byteOffset\n }\n})\n\nfunction createBuffer (length) {\n if (length > K_MAX_LENGTH) {\n throw new RangeError('The value \"' + length + '\" is invalid for option \"size\"')\n }\n // Return an augmented `Uint8Array` instance\n const buf = new Uint8Array(length)\n Object.setPrototypeOf(buf, Buffer.prototype)\n return buf\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new TypeError(\n 'The \"string\" argument must be of type string. Received type number'\n )\n }\n return allocUnsafe(arg)\n }\n return from(arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\nfunction from (value, encodingOrOffset, length) {\n if (typeof value === 'string') {\n return fromString(value, encodingOrOffset)\n }\n\n if (ArrayBuffer.isView(value)) {\n return fromArrayView(value)\n }\n\n if (value == null) {\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n }\n\n if (isInstance(value, ArrayBuffer) ||\n (value && isInstance(value.buffer, ArrayBuffer))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof SharedArrayBuffer !== 'undefined' &&\n (isInstance(value, SharedArrayBuffer) ||\n (value && isInstance(value.buffer, SharedArrayBuffer)))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof value === 'number') {\n throw new TypeError(\n 'The \"value\" argument must not be of type number. Received type number'\n )\n }\n\n const valueOf = value.valueOf && value.valueOf()\n if (valueOf != null && valueOf !== value) {\n return Buffer.from(valueOf, encodingOrOffset, length)\n }\n\n const b = fromObject(value)\n if (b) return b\n\n if (typeof Symbol !== 'undefined' && Symbol.toPrimitive != null &&\n typeof value[Symbol.toPrimitive] === 'function') {\n return Buffer.from(value[Symbol.toPrimitive]('string'), encodingOrOffset, length)\n }\n\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n return from(value, encodingOrOffset, length)\n}\n\n// Note: Change prototype *after* Buffer.from is defined to workaround Chrome bug:\n// https://github.com/feross/buffer/pull/148\nObject.setPrototypeOf(Buffer.prototype, Uint8Array.prototype)\nObject.setPrototypeOf(Buffer, Uint8Array)\n\nfunction assertSize (size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be of type number')\n } else if (size < 0) {\n throw new RangeError('The value \"' + size + '\" is invalid for option \"size\"')\n }\n}\n\nfunction alloc (size, fill, encoding) {\n assertSize(size)\n if (size <= 0) {\n return createBuffer(size)\n }\n if (fill !== undefined) {\n // Only pay attention to encoding if it's a string. This\n // prevents accidentally sending in a number that would\n // be interpreted as a start offset.\n return typeof encoding === 'string'\n ? createBuffer(size).fill(fill, encoding)\n : createBuffer(size).fill(fill)\n }\n return createBuffer(size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n return alloc(size, fill, encoding)\n}\n\nfunction allocUnsafe (size) {\n assertSize(size)\n return createBuffer(size < 0 ? 0 : checked(size) | 0)\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n return allocUnsafe(size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n return allocUnsafe(size)\n}\n\nfunction fromString (string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8'\n }\n\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n\n const length = byteLength(string, encoding) | 0\n let buf = createBuffer(length)\n\n const actual = buf.write(string, encoding)\n\n if (actual !== length) {\n // Writing a hex string, for example, that contains invalid characters will\n // cause everything after the first invalid character to be ignored. (e.g.\n // 'abxxcd' will be treated as 'ab')\n buf = buf.slice(0, actual)\n }\n\n return buf\n}\n\nfunction fromArrayLike (array) {\n const length = array.length < 0 ? 0 : checked(array.length) | 0\n const buf = createBuffer(length)\n for (let i = 0; i < length; i += 1) {\n buf[i] = array[i] & 255\n }\n return buf\n}\n\nfunction fromArrayView (arrayView) {\n if (isInstance(arrayView, Uint8Array)) {\n const copy = new Uint8Array(arrayView)\n return fromArrayBuffer(copy.buffer, copy.byteOffset, copy.byteLength)\n }\n return fromArrayLike(arrayView)\n}\n\nfunction fromArrayBuffer (array, byteOffset, length) {\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\"offset\" is outside of buffer bounds')\n }\n\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\"length\" is outside of buffer bounds')\n }\n\n let buf\n if (byteOffset === undefined && length === undefined) {\n buf = new Uint8Array(array)\n } else if (length === undefined) {\n buf = new Uint8Array(array, byteOffset)\n } else {\n buf = new Uint8Array(array, byteOffset, length)\n }\n\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(buf, Buffer.prototype)\n\n return buf\n}\n\nfunction fromObject (obj) {\n if (Buffer.isBuffer(obj)) {\n const len = checked(obj.length) | 0\n const buf = createBuffer(len)\n\n if (buf.length === 0) {\n return buf\n }\n\n obj.copy(buf, 0, 0, len)\n return buf\n }\n\n if (obj.length !== undefined) {\n if (typeof obj.length !== 'number' || numberIsNaN(obj.length)) {\n return createBuffer(0)\n }\n return fromArrayLike(obj)\n }\n\n if (obj.type === 'Buffer' && Array.isArray(obj.data)) {\n return fromArrayLike(obj.data)\n }\n}\n\nfunction checked (length) {\n // Note: cannot use `length < K_MAX_LENGTH` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= K_MAX_LENGTH) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + K_MAX_LENGTH.toString(16) + ' bytes')\n }\n return length | 0\n}\n\nfunction SlowBuffer (length) {\n if (+length != length) { // eslint-disable-line eqeqeq\n length = 0\n }\n return Buffer.alloc(+length)\n}\n\nBuffer.isBuffer = function isBuffer (b) {\n return b != null && b._isBuffer === true &&\n b !== Buffer.prototype // so Buffer.isBuffer(Buffer.prototype) will be false\n}\n\nBuffer.compare = function compare (a, b) {\n if (isInstance(a, Uint8Array)) a = Buffer.from(a, a.offset, a.byteLength)\n if (isInstance(b, Uint8Array)) b = Buffer.from(b, b.offset, b.byteLength)\n if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n throw new TypeError(\n 'The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array'\n )\n }\n\n if (a === b) return 0\n\n let x = a.length\n let y = b.length\n\n for (let i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i]\n y = b[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n switch (String(encoding).toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'latin1':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return true\n default:\n return false\n }\n}\n\nBuffer.concat = function concat (list, length) {\n if (!Array.isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n\n if (list.length === 0) {\n return Buffer.alloc(0)\n }\n\n let i\n if (length === undefined) {\n length = 0\n for (i = 0; i < list.length; ++i) {\n length += list[i].length\n }\n }\n\n const buffer = Buffer.allocUnsafe(length)\n let pos = 0\n for (i = 0; i < list.length; ++i) {\n let buf = list[i]\n if (isInstance(buf, Uint8Array)) {\n if (pos + buf.length > buffer.length) {\n if (!Buffer.isBuffer(buf)) buf = Buffer.from(buf)\n buf.copy(buffer, pos)\n } else {\n Uint8Array.prototype.set.call(\n buffer,\n buf,\n pos\n )\n }\n } else if (!Buffer.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n } else {\n buf.copy(buffer, pos)\n }\n pos += buf.length\n }\n return buffer\n}\n\nfunction byteLength (string, encoding) {\n if (Buffer.isBuffer(string)) {\n return string.length\n }\n if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) {\n return string.byteLength\n }\n if (typeof string !== 'string') {\n throw new TypeError(\n 'The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. ' +\n 'Received type ' + typeof string\n )\n }\n\n const len = string.length\n const mustMatch = (arguments.length > 2 && arguments[2] === true)\n if (!mustMatch && len === 0) return 0\n\n // Use a for loop to avoid recursion\n let loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'ascii':\n case 'latin1':\n case 'binary':\n return len\n case 'utf8':\n case 'utf-8':\n return utf8ToBytes(string).length\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return len * 2\n case 'hex':\n return len >>> 1\n case 'base64':\n return base64ToBytes(string).length\n default:\n if (loweredCase) {\n return mustMatch ? -1 : utf8ToBytes(string).length // assume utf8\n }\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n let loweredCase = false\n\n // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n // property of a typed array.\n\n // This behaves neither like String nor Uint8Array in that we set start/end\n // to their upper/lower bounds if the value passed is out of range.\n // undefined is handled specially as per ECMA-262 6th Edition,\n // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n if (start === undefined || start < 0) {\n start = 0\n }\n // Return early if start > this.length. Done here to prevent potential uint32\n // coercion fail below.\n if (start > this.length) {\n return ''\n }\n\n if (end === undefined || end > this.length) {\n end = this.length\n }\n\n if (end <= 0) {\n return ''\n }\n\n // Force coercion to uint32. This will also coerce falsey/NaN values to 0.\n end >>>= 0\n start >>>= 0\n\n if (end <= start) {\n return ''\n }\n\n if (!encoding) encoding = 'utf8'\n\n while (true) {\n switch (encoding) {\n case 'hex':\n return hexSlice(this, start, end)\n\n case 'utf8':\n case 'utf-8':\n return utf8Slice(this, start, end)\n\n case 'ascii':\n return asciiSlice(this, start, end)\n\n case 'latin1':\n case 'binary':\n return latin1Slice(this, start, end)\n\n case 'base64':\n return base64Slice(this, start, end)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return utf16leSlice(this, start, end)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = (encoding + '').toLowerCase()\n loweredCase = true\n }\n }\n}\n\n// This property is used by `Buffer.isBuffer` (and the `is-buffer` npm package)\n// to detect a Buffer instance. It's not possible to use `instanceof Buffer`\n// reliably in a browserify context because there could be multiple different\n// copies of the 'buffer' package in use. This method works even for Buffer\n// instances that were created from another copy of the `buffer` package.\n// See: https://github.com/feross/buffer/issues/154\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n const i = b[n]\n b[n] = b[m]\n b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n const len = this.length\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits')\n }\n for (let i = 0; i < len; i += 2) {\n swap(this, i, i + 1)\n }\n return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n const len = this.length\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits')\n }\n for (let i = 0; i < len; i += 4) {\n swap(this, i, i + 3)\n swap(this, i + 1, i + 2)\n }\n return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n const len = this.length\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits')\n }\n for (let i = 0; i < len; i += 8) {\n swap(this, i, i + 7)\n swap(this, i + 1, i + 6)\n swap(this, i + 2, i + 5)\n swap(this, i + 3, i + 4)\n }\n return this\n}\n\nBuffer.prototype.toString = function toString () {\n const length = this.length\n if (length === 0) return ''\n if (arguments.length === 0) return utf8Slice(this, 0, length)\n return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.toLocaleString = Buffer.prototype.toString\n\nBuffer.prototype.equals = function equals (b) {\n if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n if (this === b) return true\n return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n let str = ''\n const max = exports.INSPECT_MAX_BYTES\n str = this.toString('hex', 0, max).replace(/(.{2})/g, '$1 ').trim()\n if (this.length > max) str += ' ... '\n return ''\n}\nif (customInspectSymbol) {\n Buffer.prototype[customInspectSymbol] = Buffer.prototype.inspect\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n if (isInstance(target, Uint8Array)) {\n target = Buffer.from(target, target.offset, target.byteLength)\n }\n if (!Buffer.isBuffer(target)) {\n throw new TypeError(\n 'The \"target\" argument must be one of type Buffer or Uint8Array. ' +\n 'Received type ' + (typeof target)\n )\n }\n\n if (start === undefined) {\n start = 0\n }\n if (end === undefined) {\n end = target ? target.length : 0\n }\n if (thisStart === undefined) {\n thisStart = 0\n }\n if (thisEnd === undefined) {\n thisEnd = this.length\n }\n\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError('out of range index')\n }\n\n if (thisStart >= thisEnd && start >= end) {\n return 0\n }\n if (thisStart >= thisEnd) {\n return -1\n }\n if (start >= end) {\n return 1\n }\n\n start >>>= 0\n end >>>= 0\n thisStart >>>= 0\n thisEnd >>>= 0\n\n if (this === target) return 0\n\n let x = thisEnd - thisStart\n let y = end - start\n const len = Math.min(x, y)\n\n const thisCopy = this.slice(thisStart, thisEnd)\n const targetCopy = target.slice(start, end)\n\n for (let i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i]\n y = targetCopy[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (numberIsNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [val], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n let indexSize = 1\n let arrLength = arr.length\n let valLength = val.length\n\n if (encoding !== undefined) {\n encoding = String(encoding).toLowerCase()\n if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n encoding === 'utf16le' || encoding === 'utf-16le') {\n if (arr.length < 2 || val.length < 2) {\n return -1\n }\n indexSize = 2\n arrLength /= 2\n valLength /= 2\n byteOffset /= 2\n }\n }\n\n function read (buf, i) {\n if (indexSize === 1) {\n return buf[i]\n } else {\n return buf.readUInt16BE(i * indexSize)\n }\n }\n\n let i\n if (dir) {\n let foundIndex = -1\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1) foundIndex = i\n if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n } else {\n if (foundIndex !== -1) i -= i - foundIndex\n foundIndex = -1\n }\n }\n } else {\n if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n for (i = byteOffset; i >= 0; i--) {\n let found = true\n for (let j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false\n break\n }\n }\n if (found) return i\n }\n }\n\n return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n offset = Number(offset) || 0\n const remaining = buf.length - offset\n if (!length) {\n length = remaining\n } else {\n length = Number(length)\n if (length > remaining) {\n length = remaining\n }\n }\n\n const strLen = string.length\n\n if (length > strLen / 2) {\n length = strLen / 2\n }\n let i\n for (i = 0; i < length; ++i) {\n const parsed = parseInt(string.substr(i * 2, 2), 16)\n if (numberIsNaN(parsed)) return i\n buf[offset + i] = parsed\n }\n return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n // Buffer#write(string)\n if (offset === undefined) {\n encoding = 'utf8'\n length = this.length\n offset = 0\n // Buffer#write(string, encoding)\n } else if (length === undefined && typeof offset === 'string') {\n encoding = offset\n length = this.length\n offset = 0\n // Buffer#write(string, offset[, length][, encoding])\n } else if (isFinite(offset)) {\n offset = offset >>> 0\n if (isFinite(length)) {\n length = length >>> 0\n if (encoding === undefined) encoding = 'utf8'\n } else {\n encoding = length\n length = undefined\n }\n } else {\n throw new Error(\n 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n )\n }\n\n const remaining = this.length - offset\n if (length === undefined || length > remaining) length = remaining\n\n if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n throw new RangeError('Attempt to write outside buffer bounds')\n }\n\n if (!encoding) encoding = 'utf8'\n\n let loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'hex':\n return hexWrite(this, string, offset, length)\n\n case 'utf8':\n case 'utf-8':\n return utf8Write(this, string, offset, length)\n\n case 'ascii':\n case 'latin1':\n case 'binary':\n return asciiWrite(this, string, offset, length)\n\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return base64Write(this, string, offset, length)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return ucs2Write(this, string, offset, length)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0)\n }\n}\n\nfunction base64Slice (buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf)\n } else {\n return base64.fromByteArray(buf.slice(start, end))\n }\n}\n\nfunction utf8Slice (buf, start, end) {\n end = Math.min(buf.length, end)\n const res = []\n\n let i = start\n while (i < end) {\n const firstByte = buf[i]\n let codePoint = null\n let bytesPerSequence = (firstByte > 0xEF)\n ? 4\n : (firstByte > 0xDF)\n ? 3\n : (firstByte > 0xBF)\n ? 2\n : 1\n\n if (i + bytesPerSequence <= end) {\n let secondByte, thirdByte, fourthByte, tempCodePoint\n\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 0x80) {\n codePoint = firstByte\n }\n break\n case 2:\n secondByte = buf[i + 1]\n if ((secondByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n if (tempCodePoint > 0x7F) {\n codePoint = tempCodePoint\n }\n }\n break\n case 3:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n codePoint = tempCodePoint\n }\n }\n break\n case 4:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n fourthByte = buf[i + 3]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n codePoint = tempCodePoint\n }\n }\n }\n }\n\n if (codePoint === null) {\n // we did not generate a valid codePoint so insert a\n // replacement char (U+FFFD) and advance only 1 byte\n codePoint = 0xFFFD\n bytesPerSequence = 1\n } else if (codePoint > 0xFFFF) {\n // encode to utf16 (surrogate pair dance)\n codePoint -= 0x10000\n res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n codePoint = 0xDC00 | codePoint & 0x3FF\n }\n\n res.push(codePoint)\n i += bytesPerSequence\n }\n\n return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nconst MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n const len = codePoints.length\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n }\n\n // Decode in chunks to avoid \"call stack size exceeded\".\n let res = ''\n let i = 0\n while (i < len) {\n res += String.fromCharCode.apply(\n String,\n codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n )\n }\n return res\n}\n\nfunction asciiSlice (buf, start, end) {\n let ret = ''\n end = Math.min(buf.length, end)\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F)\n }\n return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n let ret = ''\n end = Math.min(buf.length, end)\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i])\n }\n return ret\n}\n\nfunction hexSlice (buf, start, end) {\n const len = buf.length\n\n if (!start || start < 0) start = 0\n if (!end || end < 0 || end > len) end = len\n\n let out = ''\n for (let i = start; i < end; ++i) {\n out += hexSliceLookupTable[buf[i]]\n }\n return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n const bytes = buf.slice(start, end)\n let res = ''\n // If bytes.length is odd, the last 8 bits must be ignored (same as node.js)\n for (let i = 0; i < bytes.length - 1; i += 2) {\n res += String.fromCharCode(bytes[i] + (bytes[i + 1] * 256))\n }\n return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n const len = this.length\n start = ~~start\n end = end === undefined ? len : ~~end\n\n if (start < 0) {\n start += len\n if (start < 0) start = 0\n } else if (start > len) {\n start = len\n }\n\n if (end < 0) {\n end += len\n if (end < 0) end = 0\n } else if (end > len) {\n end = len\n }\n\n if (end < start) end = start\n\n const newBuf = this.subarray(start, end)\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(newBuf, Buffer.prototype)\n\n return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUintLE =\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let val = this[offset]\n let mul = 1\n let i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUintBE =\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n checkOffset(offset, byteLength, this.length)\n }\n\n let val = this[offset + --byteLength]\n let mul = 1\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUint8 =\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n return this[offset]\n}\n\nBuffer.prototype.readUint16LE =\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUint16BE =\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUint32LE =\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return ((this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16)) +\n (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUint32BE =\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] * 0x1000000) +\n ((this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n this[offset + 3])\n}\n\nBuffer.prototype.readBigUInt64LE = defineBigIntMethod(function readBigUInt64LE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const lo = first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24\n\n const hi = this[++offset] +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n last * 2 ** 24\n\n return BigInt(lo) + (BigInt(hi) << BigInt(32))\n})\n\nBuffer.prototype.readBigUInt64BE = defineBigIntMethod(function readBigUInt64BE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const hi = first * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset]\n\n const lo = this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last\n\n return (BigInt(hi) << BigInt(32)) + BigInt(lo)\n})\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let val = this[offset]\n let mul = 1\n let i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let i = byteLength\n let mul = 1\n let val = this[offset + --i]\n while (i > 0 && (mul *= 0x100)) {\n val += this[offset + --i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n if (!(this[offset] & 0x80)) return (this[offset])\n return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n const val = this[offset] | (this[offset + 1] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n const val = this[offset + 1] | (this[offset] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16) |\n (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] << 24) |\n (this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n (this[offset + 3])\n}\n\nBuffer.prototype.readBigInt64LE = defineBigIntMethod(function readBigInt64LE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const val = this[offset + 4] +\n this[offset + 5] * 2 ** 8 +\n this[offset + 6] * 2 ** 16 +\n (last << 24) // Overflow\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24)\n})\n\nBuffer.prototype.readBigInt64BE = defineBigIntMethod(function readBigInt64BE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const val = (first << 24) + // Overflow\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset]\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last)\n})\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUintLE =\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n let mul = 1\n let i = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUintBE =\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n let i = byteLength - 1\n let mul = 1\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUint8 =\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeUint16LE =\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeUint16BE =\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeUint32LE =\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset + 3] = (value >>> 24)\n this[offset + 2] = (value >>> 16)\n this[offset + 1] = (value >>> 8)\n this[offset] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeUint32BE =\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nfunction wrtBigUInt64LE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7)\n\n let lo = Number(value & BigInt(0xffffffff))\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n return offset\n}\n\nfunction wrtBigUInt64BE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7)\n\n let lo = Number(value & BigInt(0xffffffff))\n buf[offset + 7] = lo\n lo = lo >> 8\n buf[offset + 6] = lo\n lo = lo >> 8\n buf[offset + 5] = lo\n lo = lo >> 8\n buf[offset + 4] = lo\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n buf[offset + 3] = hi\n hi = hi >> 8\n buf[offset + 2] = hi\n hi = hi >> 8\n buf[offset + 1] = hi\n hi = hi >> 8\n buf[offset] = hi\n return offset + 8\n}\n\nBuffer.prototype.writeBigUInt64LE = defineBigIntMethod(function writeBigUInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeBigUInt64BE = defineBigIntMethod(function writeBigUInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n let i = 0\n let mul = 1\n let sub = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n let i = byteLength - 1\n let mul = 1\n let sub = 0\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n if (value < 0) value = 0xff + value + 1\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n this[offset + 2] = (value >>> 16)\n this[offset + 3] = (value >>> 24)\n return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (value < 0) value = 0xffffffff + value + 1\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeBigInt64LE = defineBigIntMethod(function writeBigInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nBuffer.prototype.writeBigInt64BE = defineBigIntMethod(function writeBigInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n }\n ieee754.write(buf, value, offset, littleEndian, 23, 4)\n return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n }\n ieee754.write(buf, value, offset, littleEndian, 52, 8)\n return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n if (!Buffer.isBuffer(target)) throw new TypeError('argument should be a Buffer')\n if (!start) start = 0\n if (!end && end !== 0) end = this.length\n if (targetStart >= target.length) targetStart = target.length\n if (!targetStart) targetStart = 0\n if (end > 0 && end < start) end = start\n\n // Copy 0 bytes; we're done\n if (end === start) return 0\n if (target.length === 0 || this.length === 0) return 0\n\n // Fatal error conditions\n if (targetStart < 0) {\n throw new RangeError('targetStart out of bounds')\n }\n if (start < 0 || start >= this.length) throw new RangeError('Index out of range')\n if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n // Are we oob?\n if (end > this.length) end = this.length\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start\n }\n\n const len = end - start\n\n if (this === target && typeof Uint8Array.prototype.copyWithin === 'function') {\n // Use built-in when available, missing from IE11\n this.copyWithin(targetStart, start, end)\n } else {\n Uint8Array.prototype.set.call(\n target,\n this.subarray(start, end),\n targetStart\n )\n }\n\n return len\n}\n\n// Usage:\n// buffer.fill(number[, offset[, end]])\n// buffer.fill(buffer[, offset[, end]])\n// buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n // Handle string cases:\n if (typeof val === 'string') {\n if (typeof start === 'string') {\n encoding = start\n start = 0\n end = this.length\n } else if (typeof end === 'string') {\n encoding = end\n end = this.length\n }\n if (encoding !== undefined && typeof encoding !== 'string') {\n throw new TypeError('encoding must be a string')\n }\n if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n if (val.length === 1) {\n const code = val.charCodeAt(0)\n if ((encoding === 'utf8' && code < 128) ||\n encoding === 'latin1') {\n // Fast path: If `val` fits into a single byte, use that numeric value.\n val = code\n }\n }\n } else if (typeof val === 'number') {\n val = val & 255\n } else if (typeof val === 'boolean') {\n val = Number(val)\n }\n\n // Invalid ranges are not set to a default, so can range check early.\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError('Out of range index')\n }\n\n if (end <= start) {\n return this\n }\n\n start = start >>> 0\n end = end === undefined ? this.length : end >>> 0\n\n if (!val) val = 0\n\n let i\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val\n }\n } else {\n const bytes = Buffer.isBuffer(val)\n ? val\n : Buffer.from(val, encoding)\n const len = bytes.length\n if (len === 0) {\n throw new TypeError('The value \"' + val +\n '\" is invalid for argument \"value\"')\n }\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len]\n }\n }\n\n return this\n}\n\n// CUSTOM ERRORS\n// =============\n\n// Simplified versions from Node, changed for Buffer-only usage\nconst errors = {}\nfunction E (sym, getMessage, Base) {\n errors[sym] = class NodeError extends Base {\n constructor () {\n super()\n\n Object.defineProperty(this, 'message', {\n value: getMessage.apply(this, arguments),\n writable: true,\n configurable: true\n })\n\n // Add the error code to the name to include it in the stack trace.\n this.name = `${this.name} [${sym}]`\n // Access the stack to generate the error message including the error code\n // from the name.\n this.stack // eslint-disable-line no-unused-expressions\n // Reset the name to the actual name.\n delete this.name\n }\n\n get code () {\n return sym\n }\n\n set code (value) {\n Object.defineProperty(this, 'code', {\n configurable: true,\n enumerable: true,\n value,\n writable: true\n })\n }\n\n toString () {\n return `${this.name} [${sym}]: ${this.message}`\n }\n }\n}\n\nE('ERR_BUFFER_OUT_OF_BOUNDS',\n function (name) {\n if (name) {\n return `${name} is outside of buffer bounds`\n }\n\n return 'Attempt to access memory outside buffer bounds'\n }, RangeError)\nE('ERR_INVALID_ARG_TYPE',\n function (name, actual) {\n return `The \"${name}\" argument must be of type number. Received type ${typeof actual}`\n }, TypeError)\nE('ERR_OUT_OF_RANGE',\n function (str, range, input) {\n let msg = `The value of \"${str}\" is out of range.`\n let received = input\n if (Number.isInteger(input) && Math.abs(input) > 2 ** 32) {\n received = addNumericalSeparator(String(input))\n } else if (typeof input === 'bigint') {\n received = String(input)\n if (input > BigInt(2) ** BigInt(32) || input < -(BigInt(2) ** BigInt(32))) {\n received = addNumericalSeparator(received)\n }\n received += 'n'\n }\n msg += ` It must be ${range}. Received ${received}`\n return msg\n }, RangeError)\n\nfunction addNumericalSeparator (val) {\n let res = ''\n let i = val.length\n const start = val[0] === '-' ? 1 : 0\n for (; i >= start + 4; i -= 3) {\n res = `_${val.slice(i - 3, i)}${res}`\n }\n return `${val.slice(0, i)}${res}`\n}\n\n// CHECK FUNCTIONS\n// ===============\n\nfunction checkBounds (buf, offset, byteLength) {\n validateNumber(offset, 'offset')\n if (buf[offset] === undefined || buf[offset + byteLength] === undefined) {\n boundsError(offset, buf.length - (byteLength + 1))\n }\n}\n\nfunction checkIntBI (value, min, max, buf, offset, byteLength) {\n if (value > max || value < min) {\n const n = typeof min === 'bigint' ? 'n' : ''\n let range\n if (byteLength > 3) {\n if (min === 0 || min === BigInt(0)) {\n range = `>= 0${n} and < 2${n} ** ${(byteLength + 1) * 8}${n}`\n } else {\n range = `>= -(2${n} ** ${(byteLength + 1) * 8 - 1}${n}) and < 2 ** ` +\n `${(byteLength + 1) * 8 - 1}${n}`\n }\n } else {\n range = `>= ${min}${n} and <= ${max}${n}`\n }\n throw new errors.ERR_OUT_OF_RANGE('value', range, value)\n }\n checkBounds(buf, offset, byteLength)\n}\n\nfunction validateNumber (value, name) {\n if (typeof value !== 'number') {\n throw new errors.ERR_INVALID_ARG_TYPE(name, 'number', value)\n }\n}\n\nfunction boundsError (value, length, type) {\n if (Math.floor(value) !== value) {\n validateNumber(value, type)\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset', 'an integer', value)\n }\n\n if (length < 0) {\n throw new errors.ERR_BUFFER_OUT_OF_BOUNDS()\n }\n\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset',\n `>= ${type ? 1 : 0} and <= ${length}`,\n value)\n}\n\n// HELPER FUNCTIONS\n// ================\n\nconst INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n // Node takes equal signs as end of the Base64 encoding\n str = str.split('=')[0]\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = str.trim().replace(INVALID_BASE64_RE, '')\n // Node converts strings with length < 2 to ''\n if (str.length < 2) return ''\n // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n while (str.length % 4 !== 0) {\n str = str + '='\n }\n return str\n}\n\nfunction utf8ToBytes (string, units) {\n units = units || Infinity\n let codePoint\n const length = string.length\n let leadSurrogate = null\n const bytes = []\n\n for (let i = 0; i < length; ++i) {\n codePoint = string.charCodeAt(i)\n\n // is surrogate component\n if (codePoint > 0xD7FF && codePoint < 0xE000) {\n // last char was a lead\n if (!leadSurrogate) {\n // no lead yet\n if (codePoint > 0xDBFF) {\n // unexpected trail\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n } else if (i + 1 === length) {\n // unpaired lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n }\n\n // valid lead\n leadSurrogate = codePoint\n\n continue\n }\n\n // 2 leads in a row\n if (codePoint < 0xDC00) {\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n leadSurrogate = codePoint\n continue\n }\n\n // valid surrogate pair\n codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n } else if (leadSurrogate) {\n // valid bmp char, but last char was a lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n }\n\n leadSurrogate = null\n\n // encode utf8\n if (codePoint < 0x80) {\n if ((units -= 1) < 0) break\n bytes.push(codePoint)\n } else if (codePoint < 0x800) {\n if ((units -= 2) < 0) break\n bytes.push(\n codePoint >> 0x6 | 0xC0,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x10000) {\n if ((units -= 3) < 0) break\n bytes.push(\n codePoint >> 0xC | 0xE0,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x110000) {\n if ((units -= 4) < 0) break\n bytes.push(\n codePoint >> 0x12 | 0xF0,\n codePoint >> 0xC & 0x3F | 0x80,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else {\n throw new Error('Invalid code point')\n }\n }\n\n return bytes\n}\n\nfunction asciiToBytes (str) {\n const byteArray = []\n for (let i = 0; i < str.length; ++i) {\n // Node's code seems to be doing this and not & 0x7F..\n byteArray.push(str.charCodeAt(i) & 0xFF)\n }\n return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n let c, hi, lo\n const byteArray = []\n for (let i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0) break\n\n c = str.charCodeAt(i)\n hi = c >> 8\n lo = c % 256\n byteArray.push(lo)\n byteArray.push(hi)\n }\n\n return byteArray\n}\n\nfunction base64ToBytes (str) {\n return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n let i\n for (i = 0; i < length; ++i) {\n if ((i + offset >= dst.length) || (i >= src.length)) break\n dst[i + offset] = src[i]\n }\n return i\n}\n\n// ArrayBuffer or Uint8Array objects from other contexts (i.e. iframes) do not pass\n// the `instanceof` check but they should be treated as of that type.\n// See: https://github.com/feross/buffer/issues/166\nfunction isInstance (obj, type) {\n return obj instanceof type ||\n (obj != null && obj.constructor != null && obj.constructor.name != null &&\n obj.constructor.name === type.name)\n}\nfunction numberIsNaN (obj) {\n // For IE11 support\n return obj !== obj // eslint-disable-line no-self-compare\n}\n\n// Create lookup table for `toString('hex')`\n// See: https://github.com/feross/buffer/issues/219\nconst hexSliceLookupTable = (function () {\n const alphabet = '0123456789abcdef'\n const table = new Array(256)\n for (let i = 0; i < 16; ++i) {\n const i16 = i * 16\n for (let j = 0; j < 16; ++j) {\n table[i16 + j] = alphabet[i] + alphabet[j]\n }\n }\n return table\n})()\n\n// Return not function with Error if BigInt not supported\nfunction defineBigIntMethod (fn) {\n return typeof BigInt === 'undefined' ? BufferBigIntNotDefined : fn\n}\n\nfunction BufferBigIntNotDefined () {\n throw new Error('BigInt not supported')\n}\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\nvar R = typeof Reflect === 'object' ? Reflect : null\nvar ReflectApply = R && typeof R.apply === 'function'\n ? R.apply\n : function ReflectApply(target, receiver, args) {\n return Function.prototype.apply.call(target, receiver, args);\n }\n\nvar ReflectOwnKeys\nif (R && typeof R.ownKeys === 'function') {\n ReflectOwnKeys = R.ownKeys\n} else if (Object.getOwnPropertySymbols) {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target)\n .concat(Object.getOwnPropertySymbols(target));\n };\n} else {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target);\n };\n}\n\nfunction ProcessEmitWarning(warning) {\n if (console && console.warn) console.warn(warning);\n}\n\nvar NumberIsNaN = Number.isNaN || function NumberIsNaN(value) {\n return value !== value;\n}\n\nfunction EventEmitter() {\n EventEmitter.init.call(this);\n}\nmodule.exports = EventEmitter;\nmodule.exports.once = once;\n\n// Backwards-compat with node 0.10.x\nEventEmitter.EventEmitter = EventEmitter;\n\nEventEmitter.prototype._events = undefined;\nEventEmitter.prototype._eventsCount = 0;\nEventEmitter.prototype._maxListeners = undefined;\n\n// By default EventEmitters will print a warning if more than 10 listeners are\n// added to it. This is a useful default which helps finding memory leaks.\nvar defaultMaxListeners = 10;\n\nfunction checkListener(listener) {\n if (typeof listener !== 'function') {\n throw new TypeError('The \"listener\" argument must be of type Function. Received type ' + typeof listener);\n }\n}\n\nObject.defineProperty(EventEmitter, 'defaultMaxListeners', {\n enumerable: true,\n get: function() {\n return defaultMaxListeners;\n },\n set: function(arg) {\n if (typeof arg !== 'number' || arg < 0 || NumberIsNaN(arg)) {\n throw new RangeError('The value of \"defaultMaxListeners\" is out of range. It must be a non-negative number. Received ' + arg + '.');\n }\n defaultMaxListeners = arg;\n }\n});\n\nEventEmitter.init = function() {\n\n if (this._events === undefined ||\n this._events === Object.getPrototypeOf(this)._events) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n }\n\n this._maxListeners = this._maxListeners || undefined;\n};\n\n// Obviously not all Emitters should be limited to 10. This function allows\n// that to be increased. Set to zero for unlimited.\nEventEmitter.prototype.setMaxListeners = function setMaxListeners(n) {\n if (typeof n !== 'number' || n < 0 || NumberIsNaN(n)) {\n throw new RangeError('The value of \"n\" is out of range. It must be a non-negative number. Received ' + n + '.');\n }\n this._maxListeners = n;\n return this;\n};\n\nfunction _getMaxListeners(that) {\n if (that._maxListeners === undefined)\n return EventEmitter.defaultMaxListeners;\n return that._maxListeners;\n}\n\nEventEmitter.prototype.getMaxListeners = function getMaxListeners() {\n return _getMaxListeners(this);\n};\n\nEventEmitter.prototype.emit = function emit(type) {\n var args = [];\n for (var i = 1; i < arguments.length; i++) args.push(arguments[i]);\n var doError = (type === 'error');\n\n var events = this._events;\n if (events !== undefined)\n doError = (doError && events.error === undefined);\n else if (!doError)\n return false;\n\n // If there is no 'error' event listener then throw.\n if (doError) {\n var er;\n if (args.length > 0)\n er = args[0];\n if (er instanceof Error) {\n // Note: The comments on the `throw` lines are intentional, they show\n // up in Node's output if this results in an unhandled exception.\n throw er; // Unhandled 'error' event\n }\n // At least give some kind of context to the user\n var err = new Error('Unhandled error.' + (er ? ' (' + er.message + ')' : ''));\n err.context = er;\n throw err; // Unhandled 'error' event\n }\n\n var handler = events[type];\n\n if (handler === undefined)\n return false;\n\n if (typeof handler === 'function') {\n ReflectApply(handler, this, args);\n } else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n ReflectApply(listeners[i], this, args);\n }\n\n return true;\n};\n\nfunction _addListener(target, type, listener, prepend) {\n var m;\n var events;\n var existing;\n\n checkListener(listener);\n\n events = target._events;\n if (events === undefined) {\n events = target._events = Object.create(null);\n target._eventsCount = 0;\n } else {\n // To avoid recursion in the case that type === \"newListener\"! Before\n // adding it to the listeners, first emit \"newListener\".\n if (events.newListener !== undefined) {\n target.emit('newListener', type,\n listener.listener ? listener.listener : listener);\n\n // Re-assign `events` because a newListener handler could have caused the\n // this._events to be assigned to a new object\n events = target._events;\n }\n existing = events[type];\n }\n\n if (existing === undefined) {\n // Optimize the case of one listener. Don't need the extra array object.\n existing = events[type] = listener;\n ++target._eventsCount;\n } else {\n if (typeof existing === 'function') {\n // Adding the second element, need to change to array.\n existing = events[type] =\n prepend ? [listener, existing] : [existing, listener];\n // If we've already got an array, just append.\n } else if (prepend) {\n existing.unshift(listener);\n } else {\n existing.push(listener);\n }\n\n // Check for listener leak\n m = _getMaxListeners(target);\n if (m > 0 && existing.length > m && !existing.warned) {\n existing.warned = true;\n // No error code for this since it is a Warning\n // eslint-disable-next-line no-restricted-syntax\n var w = new Error('Possible EventEmitter memory leak detected. ' +\n existing.length + ' ' + String(type) + ' listeners ' +\n 'added. Use emitter.setMaxListeners() to ' +\n 'increase limit');\n w.name = 'MaxListenersExceededWarning';\n w.emitter = target;\n w.type = type;\n w.count = existing.length;\n ProcessEmitWarning(w);\n }\n }\n\n return target;\n}\n\nEventEmitter.prototype.addListener = function addListener(type, listener) {\n return _addListener(this, type, listener, false);\n};\n\nEventEmitter.prototype.on = EventEmitter.prototype.addListener;\n\nEventEmitter.prototype.prependListener =\n function prependListener(type, listener) {\n return _addListener(this, type, listener, true);\n };\n\nfunction onceWrapper() {\n if (!this.fired) {\n this.target.removeListener(this.type, this.wrapFn);\n this.fired = true;\n if (arguments.length === 0)\n return this.listener.call(this.target);\n return this.listener.apply(this.target, arguments);\n }\n}\n\nfunction _onceWrap(target, type, listener) {\n var state = { fired: false, wrapFn: undefined, target: target, type: type, listener: listener };\n var wrapped = onceWrapper.bind(state);\n wrapped.listener = listener;\n state.wrapFn = wrapped;\n return wrapped;\n}\n\nEventEmitter.prototype.once = function once(type, listener) {\n checkListener(listener);\n this.on(type, _onceWrap(this, type, listener));\n return this;\n};\n\nEventEmitter.prototype.prependOnceListener =\n function prependOnceListener(type, listener) {\n checkListener(listener);\n this.prependListener(type, _onceWrap(this, type, listener));\n return this;\n };\n\n// Emits a 'removeListener' event if and only if the listener was removed.\nEventEmitter.prototype.removeListener =\n function removeListener(type, listener) {\n var list, events, position, i, originalListener;\n\n checkListener(listener);\n\n events = this._events;\n if (events === undefined)\n return this;\n\n list = events[type];\n if (list === undefined)\n return this;\n\n if (list === listener || list.listener === listener) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else {\n delete events[type];\n if (events.removeListener)\n this.emit('removeListener', type, list.listener || listener);\n }\n } else if (typeof list !== 'function') {\n position = -1;\n\n for (i = list.length - 1; i >= 0; i--) {\n if (list[i] === listener || list[i].listener === listener) {\n originalListener = list[i].listener;\n position = i;\n break;\n }\n }\n\n if (position < 0)\n return this;\n\n if (position === 0)\n list.shift();\n else {\n spliceOne(list, position);\n }\n\n if (list.length === 1)\n events[type] = list[0];\n\n if (events.removeListener !== undefined)\n this.emit('removeListener', type, originalListener || listener);\n }\n\n return this;\n };\n\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\n\nEventEmitter.prototype.removeAllListeners =\n function removeAllListeners(type) {\n var listeners, events, i;\n\n events = this._events;\n if (events === undefined)\n return this;\n\n // not listening for removeListener, no need to emit\n if (events.removeListener === undefined) {\n if (arguments.length === 0) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n } else if (events[type] !== undefined) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else\n delete events[type];\n }\n return this;\n }\n\n // emit removeListener for all listeners on all events\n if (arguments.length === 0) {\n var keys = Object.keys(events);\n var key;\n for (i = 0; i < keys.length; ++i) {\n key = keys[i];\n if (key === 'removeListener') continue;\n this.removeAllListeners(key);\n }\n this.removeAllListeners('removeListener');\n this._events = Object.create(null);\n this._eventsCount = 0;\n return this;\n }\n\n listeners = events[type];\n\n if (typeof listeners === 'function') {\n this.removeListener(type, listeners);\n } else if (listeners !== undefined) {\n // LIFO order\n for (i = listeners.length - 1; i >= 0; i--) {\n this.removeListener(type, listeners[i]);\n }\n }\n\n return this;\n };\n\nfunction _listeners(target, type, unwrap) {\n var events = target._events;\n\n if (events === undefined)\n return [];\n\n var evlistener = events[type];\n if (evlistener === undefined)\n return [];\n\n if (typeof evlistener === 'function')\n return unwrap ? [evlistener.listener || evlistener] : [evlistener];\n\n return unwrap ?\n unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length);\n}\n\nEventEmitter.prototype.listeners = function listeners(type) {\n return _listeners(this, type, true);\n};\n\nEventEmitter.prototype.rawListeners = function rawListeners(type) {\n return _listeners(this, type, false);\n};\n\nEventEmitter.listenerCount = function(emitter, type) {\n if (typeof emitter.listenerCount === 'function') {\n return emitter.listenerCount(type);\n } else {\n return listenerCount.call(emitter, type);\n }\n};\n\nEventEmitter.prototype.listenerCount = listenerCount;\nfunction listenerCount(type) {\n var events = this._events;\n\n if (events !== undefined) {\n var evlistener = events[type];\n\n if (typeof evlistener === 'function') {\n return 1;\n } else if (evlistener !== undefined) {\n return evlistener.length;\n }\n }\n\n return 0;\n}\n\nEventEmitter.prototype.eventNames = function eventNames() {\n return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : [];\n};\n\nfunction arrayClone(arr, n) {\n var copy = new Array(n);\n for (var i = 0; i < n; ++i)\n copy[i] = arr[i];\n return copy;\n}\n\nfunction spliceOne(list, index) {\n for (; index + 1 < list.length; index++)\n list[index] = list[index + 1];\n list.pop();\n}\n\nfunction unwrapListeners(arr) {\n var ret = new Array(arr.length);\n for (var i = 0; i < ret.length; ++i) {\n ret[i] = arr[i].listener || arr[i];\n }\n return ret;\n}\n\nfunction once(emitter, name) {\n return new Promise(function (resolve, reject) {\n function errorListener(err) {\n emitter.removeListener(name, resolver);\n reject(err);\n }\n\n function resolver() {\n if (typeof emitter.removeListener === 'function') {\n emitter.removeListener('error', errorListener);\n }\n resolve([].slice.call(arguments));\n };\n\n eventTargetAgnosticAddListener(emitter, name, resolver, { once: true });\n if (name !== 'error') {\n addErrorHandlerIfEventEmitter(emitter, errorListener, { once: true });\n }\n });\n}\n\nfunction addErrorHandlerIfEventEmitter(emitter, handler, flags) {\n if (typeof emitter.on === 'function') {\n eventTargetAgnosticAddListener(emitter, 'error', handler, flags);\n }\n}\n\nfunction eventTargetAgnosticAddListener(emitter, name, listener, flags) {\n if (typeof emitter.on === 'function') {\n if (flags.once) {\n emitter.once(name, listener);\n } else {\n emitter.on(name, listener);\n }\n } else if (typeof emitter.addEventListener === 'function') {\n // EventTarget does not have `error` event semantics like Node\n // EventEmitters, we do not listen for `error` events here.\n emitter.addEventListener(name, function wrapListener(arg) {\n // IE does not have builtin `{ once: true }` support so we\n // have to do it manually.\n if (flags.once) {\n emitter.removeEventListener(name, wrapListener);\n }\n listener(arg);\n });\n } else {\n throw new TypeError('The \"emitter\" argument must be of type EventEmitter. Received type ' + typeof emitter);\n }\n}\n","/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */\nexports.read = function (buffer, offset, isLE, mLen, nBytes) {\n var e, m\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var nBits = -7\n var i = isLE ? (nBytes - 1) : 0\n var d = isLE ? -1 : 1\n var s = buffer[offset + i]\n\n i += d\n\n e = s & ((1 << (-nBits)) - 1)\n s >>= (-nBits)\n nBits += eLen\n for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & ((1 << (-nBits)) - 1)\n e >>= (-nBits)\n nBits += mLen\n for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias\n } else if (e === eMax) {\n return m ? NaN : ((s ? -1 : 1) * Infinity)\n } else {\n m = m + Math.pow(2, mLen)\n e = e - eBias\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n var i = isLE ? 0 : (nBytes - 1)\n var d = isLE ? 1 : -1\n var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n value = Math.abs(value)\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0\n e = eMax\n } else {\n e = Math.floor(Math.log(value) / Math.LN2)\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--\n c *= 2\n }\n if (e + eBias >= 1) {\n value += rt / c\n } else {\n value += rt * Math.pow(2, 1 - eBias)\n }\n if (value * c >= 2) {\n e++\n c /= 2\n }\n\n if (e + eBias >= eMax) {\n m = 0\n e = eMax\n } else if (e + eBias >= 1) {\n m = ((value * c) - 1) * Math.pow(2, mLen)\n e = e + eBias\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n e = 0\n }\n }\n\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n e = (e << mLen) | m\n eLen += mLen\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128\n}\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView');\n\nmodule.exports = DataView;\n","var hashClear = require('./_hashClear'),\n hashDelete = require('./_hashDelete'),\n hashGet = require('./_hashGet'),\n hashHas = require('./_hashHas'),\n hashSet = require('./_hashSet');\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\nmodule.exports = Hash;\n","var listCacheClear = require('./_listCacheClear'),\n listCacheDelete = require('./_listCacheDelete'),\n listCacheGet = require('./_listCacheGet'),\n listCacheHas = require('./_listCacheHas'),\n listCacheSet = require('./_listCacheSet');\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\nmodule.exports = ListCache;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map');\n\nmodule.exports = Map;\n","var mapCacheClear = require('./_mapCacheClear'),\n mapCacheDelete = require('./_mapCacheDelete'),\n mapCacheGet = require('./_mapCacheGet'),\n mapCacheHas = require('./_mapCacheHas'),\n mapCacheSet = require('./_mapCacheSet');\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\nmodule.exports = MapCache;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Promise = getNative(root, 'Promise');\n\nmodule.exports = Promise;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Set = getNative(root, 'Set');\n\nmodule.exports = Set;\n","var MapCache = require('./_MapCache'),\n setCacheAdd = require('./_setCacheAdd'),\n setCacheHas = require('./_setCacheHas');\n\n/**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\nfunction SetCache(values) {\n var index = -1,\n length = values == null ? 0 : values.length;\n\n this.__data__ = new MapCache;\n while (++index < length) {\n this.add(values[index]);\n }\n}\n\n// Add methods to `SetCache`.\nSetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\nSetCache.prototype.has = setCacheHas;\n\nmodule.exports = SetCache;\n","var ListCache = require('./_ListCache'),\n stackClear = require('./_stackClear'),\n stackDelete = require('./_stackDelete'),\n stackGet = require('./_stackGet'),\n stackHas = require('./_stackHas'),\n stackSet = require('./_stackSet');\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\nmodule.exports = Stack;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Uint8Array = root.Uint8Array;\n\nmodule.exports = Uint8Array;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar WeakMap = getNative(root, 'WeakMap');\n\nmodule.exports = WeakMap;\n","/**\n * A specialized version of `_.forEach` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\nfunction arrayEach(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (iteratee(array[index], index, array) === false) {\n break;\n }\n }\n return array;\n}\n\nmodule.exports = arrayEach;\n","/**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\nfunction arrayFilter(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result[resIndex++] = value;\n }\n }\n return result;\n}\n\nmodule.exports = arrayFilter;\n","var baseTimes = require('./_baseTimes'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isIndex = require('./_isIndex'),\n isTypedArray = require('./isTypedArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = arrayLikeKeys;\n","/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n}\n\nmodule.exports = arrayPush;\n","/**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\nfunction arraySome(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (predicate(array[index], index, array)) {\n return true;\n }\n }\n return false;\n}\n\nmodule.exports = arraySome;\n","var baseAssignValue = require('./_baseAssignValue'),\n eq = require('./eq');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\nmodule.exports = assignValue;\n","var eq = require('./eq');\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\nmodule.exports = assocIndexOf;\n","var copyObject = require('./_copyObject'),\n keys = require('./keys');\n\n/**\n * The base implementation of `_.assign` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssign(object, source) {\n return object && copyObject(source, keys(source), object);\n}\n\nmodule.exports = baseAssign;\n","var copyObject = require('./_copyObject'),\n keysIn = require('./keysIn');\n\n/**\n * The base implementation of `_.assignIn` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssignIn(object, source) {\n return object && copyObject(source, keysIn(source), object);\n}\n\nmodule.exports = baseAssignIn;\n","var defineProperty = require('./_defineProperty');\n\n/**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction baseAssignValue(object, key, value) {\n if (key == '__proto__' && defineProperty) {\n defineProperty(object, key, {\n 'configurable': true,\n 'enumerable': true,\n 'value': value,\n 'writable': true\n });\n } else {\n object[key] = value;\n }\n}\n\nmodule.exports = baseAssignValue;\n","var Stack = require('./_Stack'),\n arrayEach = require('./_arrayEach'),\n assignValue = require('./_assignValue'),\n baseAssign = require('./_baseAssign'),\n baseAssignIn = require('./_baseAssignIn'),\n cloneBuffer = require('./_cloneBuffer'),\n copyArray = require('./_copyArray'),\n copySymbols = require('./_copySymbols'),\n copySymbolsIn = require('./_copySymbolsIn'),\n getAllKeys = require('./_getAllKeys'),\n getAllKeysIn = require('./_getAllKeysIn'),\n getTag = require('./_getTag'),\n initCloneArray = require('./_initCloneArray'),\n initCloneByTag = require('./_initCloneByTag'),\n initCloneObject = require('./_initCloneObject'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isMap = require('./isMap'),\n isObject = require('./isObject'),\n isSet = require('./isSet'),\n keys = require('./keys'),\n keysIn = require('./keysIn');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_FLAT_FLAG = 2,\n CLONE_SYMBOLS_FLAG = 4;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values supported by `_.clone`. */\nvar cloneableTags = {};\ncloneableTags[argsTag] = cloneableTags[arrayTag] =\ncloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =\ncloneableTags[boolTag] = cloneableTags[dateTag] =\ncloneableTags[float32Tag] = cloneableTags[float64Tag] =\ncloneableTags[int8Tag] = cloneableTags[int16Tag] =\ncloneableTags[int32Tag] = cloneableTags[mapTag] =\ncloneableTags[numberTag] = cloneableTags[objectTag] =\ncloneableTags[regexpTag] = cloneableTags[setTag] =\ncloneableTags[stringTag] = cloneableTags[symbolTag] =\ncloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =\ncloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;\ncloneableTags[errorTag] = cloneableTags[funcTag] =\ncloneableTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.clone` and `_.cloneDeep` which tracks\n * traversed objects.\n *\n * @private\n * @param {*} value The value to clone.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Deep clone\n * 2 - Flatten inherited properties\n * 4 - Clone symbols\n * @param {Function} [customizer] The function to customize cloning.\n * @param {string} [key] The key of `value`.\n * @param {Object} [object] The parent object of `value`.\n * @param {Object} [stack] Tracks traversed objects and their clone counterparts.\n * @returns {*} Returns the cloned value.\n */\nfunction baseClone(value, bitmask, customizer, key, object, stack) {\n var result,\n isDeep = bitmask & CLONE_DEEP_FLAG,\n isFlat = bitmask & CLONE_FLAT_FLAG,\n isFull = bitmask & CLONE_SYMBOLS_FLAG;\n\n if (customizer) {\n result = object ? customizer(value, key, object, stack) : customizer(value);\n }\n if (result !== undefined) {\n return result;\n }\n if (!isObject(value)) {\n return value;\n }\n var isArr = isArray(value);\n if (isArr) {\n result = initCloneArray(value);\n if (!isDeep) {\n return copyArray(value, result);\n }\n } else {\n var tag = getTag(value),\n isFunc = tag == funcTag || tag == genTag;\n\n if (isBuffer(value)) {\n return cloneBuffer(value, isDeep);\n }\n if (tag == objectTag || tag == argsTag || (isFunc && !object)) {\n result = (isFlat || isFunc) ? {} : initCloneObject(value);\n if (!isDeep) {\n return isFlat\n ? copySymbolsIn(value, baseAssignIn(result, value))\n : copySymbols(value, baseAssign(result, value));\n }\n } else {\n if (!cloneableTags[tag]) {\n return object ? value : {};\n }\n result = initCloneByTag(value, tag, isDeep);\n }\n }\n // Check for circular references and return its corresponding clone.\n stack || (stack = new Stack);\n var stacked = stack.get(value);\n if (stacked) {\n return stacked;\n }\n stack.set(value, result);\n\n if (isSet(value)) {\n value.forEach(function(subValue) {\n result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));\n });\n } else if (isMap(value)) {\n value.forEach(function(subValue, key) {\n result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n }\n\n var keysFunc = isFull\n ? (isFlat ? getAllKeysIn : getAllKeys)\n : (isFlat ? keysIn : keys);\n\n var props = isArr ? undefined : keysFunc(value);\n arrayEach(props || value, function(subValue, key) {\n if (props) {\n key = subValue;\n subValue = value[key];\n }\n // Recursively populate clone (susceptible to call stack limits).\n assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n return result;\n}\n\nmodule.exports = baseClone;\n","var isObject = require('./isObject');\n\n/** Built-in value references. */\nvar objectCreate = Object.create;\n\n/**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} proto The object to inherit from.\n * @returns {Object} Returns the new object.\n */\nvar baseCreate = (function() {\n function object() {}\n return function(proto) {\n if (!isObject(proto)) {\n return {};\n }\n if (objectCreate) {\n return objectCreate(proto);\n }\n object.prototype = proto;\n var result = new object;\n object.prototype = undefined;\n return result;\n };\n}());\n\nmodule.exports = baseCreate;\n","var arrayPush = require('./_arrayPush'),\n isArray = require('./isArray');\n\n/**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction baseGetAllKeys(object, keysFunc, symbolsFunc) {\n var result = keysFunc(object);\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n}\n\nmodule.exports = baseGetAllKeys;\n","var Symbol = require('./_Symbol'),\n getRawTag = require('./_getRawTag'),\n objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]';\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\nmodule.exports = baseIsArguments;\n","var baseIsEqualDeep = require('./_baseIsEqualDeep'),\n isObjectLike = require('./isObjectLike');\n\n/**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Unordered comparison\n * 2 - Partial comparison\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\nfunction baseIsEqual(value, other, bitmask, customizer, stack) {\n if (value === other) {\n return true;\n }\n if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\n return value !== value && other !== other;\n }\n return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n}\n\nmodule.exports = baseIsEqual;\n","var Stack = require('./_Stack'),\n equalArrays = require('./_equalArrays'),\n equalByTag = require('./_equalByTag'),\n equalObjects = require('./_equalObjects'),\n getTag = require('./_getTag'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isTypedArray = require('./isTypedArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n var objIsArr = isArray(object),\n othIsArr = isArray(other),\n objTag = objIsArr ? arrayTag : getTag(object),\n othTag = othIsArr ? arrayTag : getTag(other);\n\n objTag = objTag == argsTag ? objectTag : objTag;\n othTag = othTag == argsTag ? objectTag : othTag;\n\n var objIsObj = objTag == objectTag,\n othIsObj = othTag == objectTag,\n isSameTag = objTag == othTag;\n\n if (isSameTag && isBuffer(object)) {\n if (!isBuffer(other)) {\n return false;\n }\n objIsArr = true;\n objIsObj = false;\n }\n if (isSameTag && !objIsObj) {\n stack || (stack = new Stack);\n return (objIsArr || isTypedArray(object))\n ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n }\n if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n if (objIsWrapped || othIsWrapped) {\n var objUnwrapped = objIsWrapped ? object.value() : object,\n othUnwrapped = othIsWrapped ? other.value() : other;\n\n stack || (stack = new Stack);\n return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n }\n }\n if (!isSameTag) {\n return false;\n }\n stack || (stack = new Stack);\n return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n}\n\nmodule.exports = baseIsEqualDeep;\n","var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]';\n\n/**\n * The base implementation of `_.isMap` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n */\nfunction baseIsMap(value) {\n return isObjectLike(value) && getTag(value) == mapTag;\n}\n\nmodule.exports = baseIsMap;\n","var isFunction = require('./isFunction'),\n isMasked = require('./_isMasked'),\n isObject = require('./isObject'),\n toSource = require('./_toSource');\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\nmodule.exports = baseIsNative;\n","var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar setTag = '[object Set]';\n\n/**\n * The base implementation of `_.isSet` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n */\nfunction baseIsSet(value) {\n return isObjectLike(value) && getTag(value) == setTag;\n}\n\nmodule.exports = baseIsSet;\n","var baseGetTag = require('./_baseGetTag'),\n isLength = require('./isLength'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n\nmodule.exports = baseIsTypedArray;\n","var isPrototype = require('./_isPrototype'),\n nativeKeys = require('./_nativeKeys');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeys;\n","var isObject = require('./isObject'),\n isPrototype = require('./_isPrototype'),\n nativeKeysIn = require('./_nativeKeysIn');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeysIn(object) {\n if (!isObject(object)) {\n return nativeKeysIn(object);\n }\n var isProto = isPrototype(object),\n result = [];\n\n for (var key in object) {\n if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeysIn;\n","/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\nmodule.exports = baseTimes;\n","/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n return function(value) {\n return func(value);\n };\n}\n\nmodule.exports = baseUnary;\n","/**\n * Checks if a `cache` value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction cacheHas(cache, key) {\n return cache.has(key);\n}\n\nmodule.exports = cacheHas;\n","var Uint8Array = require('./_Uint8Array');\n\n/**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\nfunction cloneArrayBuffer(arrayBuffer) {\n var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n return result;\n}\n\nmodule.exports = cloneArrayBuffer;\n","var root = require('./_root');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined,\n allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;\n\n/**\n * Creates a clone of `buffer`.\n *\n * @private\n * @param {Buffer} buffer The buffer to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Buffer} Returns the cloned buffer.\n */\nfunction cloneBuffer(buffer, isDeep) {\n if (isDeep) {\n return buffer.slice();\n }\n var length = buffer.length,\n result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\n\n buffer.copy(result);\n return result;\n}\n\nmodule.exports = cloneBuffer;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer');\n\n/**\n * Creates a clone of `dataView`.\n *\n * @private\n * @param {Object} dataView The data view to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned data view.\n */\nfunction cloneDataView(dataView, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;\n return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);\n}\n\nmodule.exports = cloneDataView;\n","/** Used to match `RegExp` flags from their coerced string values. */\nvar reFlags = /\\w*$/;\n\n/**\n * Creates a clone of `regexp`.\n *\n * @private\n * @param {Object} regexp The regexp to clone.\n * @returns {Object} Returns the cloned regexp.\n */\nfunction cloneRegExp(regexp) {\n var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));\n result.lastIndex = regexp.lastIndex;\n return result;\n}\n\nmodule.exports = cloneRegExp;\n","var Symbol = require('./_Symbol');\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * Creates a clone of the `symbol` object.\n *\n * @private\n * @param {Object} symbol The symbol object to clone.\n * @returns {Object} Returns the cloned symbol object.\n */\nfunction cloneSymbol(symbol) {\n return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};\n}\n\nmodule.exports = cloneSymbol;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer');\n\n/**\n * Creates a clone of `typedArray`.\n *\n * @private\n * @param {Object} typedArray The typed array to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned typed array.\n */\nfunction cloneTypedArray(typedArray, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n}\n\nmodule.exports = cloneTypedArray;\n","/**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\nfunction copyArray(source, array) {\n var index = -1,\n length = source.length;\n\n array || (array = Array(length));\n while (++index < length) {\n array[index] = source[index];\n }\n return array;\n}\n\nmodule.exports = copyArray;\n","var assignValue = require('./_assignValue'),\n baseAssignValue = require('./_baseAssignValue');\n\n/**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\nfunction copyObject(source, props, object, customizer) {\n var isNew = !object;\n object || (object = {});\n\n var index = -1,\n length = props.length;\n\n while (++index < length) {\n var key = props[index];\n\n var newValue = customizer\n ? customizer(object[key], source[key], key, object, source)\n : undefined;\n\n if (newValue === undefined) {\n newValue = source[key];\n }\n if (isNew) {\n baseAssignValue(object, key, newValue);\n } else {\n assignValue(object, key, newValue);\n }\n }\n return object;\n}\n\nmodule.exports = copyObject;\n","var copyObject = require('./_copyObject'),\n getSymbols = require('./_getSymbols');\n\n/**\n * Copies own symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbols(source, object) {\n return copyObject(source, getSymbols(source), object);\n}\n\nmodule.exports = copySymbols;\n","var copyObject = require('./_copyObject'),\n getSymbolsIn = require('./_getSymbolsIn');\n\n/**\n * Copies own and inherited symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbolsIn(source, object) {\n return copyObject(source, getSymbolsIn(source), object);\n}\n\nmodule.exports = copySymbolsIn;\n","var root = require('./_root');\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\nmodule.exports = coreJsData;\n","var getNative = require('./_getNative');\n\nvar defineProperty = (function() {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n}());\n\nmodule.exports = defineProperty;\n","var SetCache = require('./_SetCache'),\n arraySome = require('./_arraySome'),\n cacheHas = require('./_cacheHas');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\nfunction equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n arrLength = array.length,\n othLength = other.length;\n\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n return false;\n }\n // Check that cyclic values are equal.\n var arrStacked = stack.get(array);\n var othStacked = stack.get(other);\n if (arrStacked && othStacked) {\n return arrStacked == other && othStacked == array;\n }\n var index = -1,\n result = true,\n seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n stack.set(array, other);\n stack.set(other, array);\n\n // Ignore non-index properties.\n while (++index < arrLength) {\n var arrValue = array[index],\n othValue = other[index];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, arrValue, index, other, array, stack)\n : customizer(arrValue, othValue, index, array, other, stack);\n }\n if (compared !== undefined) {\n if (compared) {\n continue;\n }\n result = false;\n break;\n }\n // Recursively compare arrays (susceptible to call stack limits).\n if (seen) {\n if (!arraySome(other, function(othValue, othIndex) {\n if (!cacheHas(seen, othIndex) &&\n (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n return seen.push(othIndex);\n }\n })) {\n result = false;\n break;\n }\n } else if (!(\n arrValue === othValue ||\n equalFunc(arrValue, othValue, bitmask, customizer, stack)\n )) {\n result = false;\n break;\n }\n }\n stack['delete'](array);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalArrays;\n","var Symbol = require('./_Symbol'),\n Uint8Array = require('./_Uint8Array'),\n eq = require('./eq'),\n equalArrays = require('./_equalArrays'),\n mapToArray = require('./_mapToArray'),\n setToArray = require('./_setToArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]';\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n switch (tag) {\n case dataViewTag:\n if ((object.byteLength != other.byteLength) ||\n (object.byteOffset != other.byteOffset)) {\n return false;\n }\n object = object.buffer;\n other = other.buffer;\n\n case arrayBufferTag:\n if ((object.byteLength != other.byteLength) ||\n !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n return false;\n }\n return true;\n\n case boolTag:\n case dateTag:\n case numberTag:\n // Coerce booleans to `1` or `0` and dates to milliseconds.\n // Invalid dates are coerced to `NaN`.\n return eq(+object, +other);\n\n case errorTag:\n return object.name == other.name && object.message == other.message;\n\n case regexpTag:\n case stringTag:\n // Coerce regexes to strings and treat strings, primitives and objects,\n // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n // for more details.\n return object == (other + '');\n\n case mapTag:\n var convert = mapToArray;\n\n case setTag:\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n convert || (convert = setToArray);\n\n if (object.size != other.size && !isPartial) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked) {\n return stacked == other;\n }\n bitmask |= COMPARE_UNORDERED_FLAG;\n\n // Recursively compare objects (susceptible to call stack limits).\n stack.set(object, other);\n var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n stack['delete'](object);\n return result;\n\n case symbolTag:\n if (symbolValueOf) {\n return symbolValueOf.call(object) == symbolValueOf.call(other);\n }\n }\n return false;\n}\n\nmodule.exports = equalByTag;\n","var getAllKeys = require('./_getAllKeys');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n objProps = getAllKeys(object),\n objLength = objProps.length,\n othProps = getAllKeys(other),\n othLength = othProps.length;\n\n if (objLength != othLength && !isPartial) {\n return false;\n }\n var index = objLength;\n while (index--) {\n var key = objProps[index];\n if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n return false;\n }\n }\n // Check that cyclic values are equal.\n var objStacked = stack.get(object);\n var othStacked = stack.get(other);\n if (objStacked && othStacked) {\n return objStacked == other && othStacked == object;\n }\n var result = true;\n stack.set(object, other);\n stack.set(other, object);\n\n var skipCtor = isPartial;\n while (++index < objLength) {\n key = objProps[index];\n var objValue = object[key],\n othValue = other[key];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, objValue, key, other, object, stack)\n : customizer(objValue, othValue, key, object, other, stack);\n }\n // Recursively compare objects (susceptible to call stack limits).\n if (!(compared === undefined\n ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n : compared\n )) {\n result = false;\n break;\n }\n skipCtor || (skipCtor = key == 'constructor');\n }\n if (result && !skipCtor) {\n var objCtor = object.constructor,\n othCtor = other.constructor;\n\n // Non `Object` object instances with different constructors are not equal.\n if (objCtor != othCtor &&\n ('constructor' in object && 'constructor' in other) &&\n !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n result = false;\n }\n }\n stack['delete'](object);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalObjects;\n","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n","var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbols = require('./_getSymbols'),\n keys = require('./keys');\n\n/**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeys(object) {\n return baseGetAllKeys(object, keys, getSymbols);\n}\n\nmodule.exports = getAllKeys;\n","var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbolsIn = require('./_getSymbolsIn'),\n keysIn = require('./keysIn');\n\n/**\n * Creates an array of own and inherited enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeysIn(object) {\n return baseGetAllKeys(object, keysIn, getSymbolsIn);\n}\n\nmodule.exports = getAllKeysIn;\n","var isKeyable = require('./_isKeyable');\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\nmodule.exports = getMapData;\n","var baseIsNative = require('./_baseIsNative'),\n getValue = require('./_getValue');\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\nmodule.exports = getNative;\n","var overArg = require('./_overArg');\n\n/** Built-in value references. */\nvar getPrototype = overArg(Object.getPrototypeOf, Object);\n\nmodule.exports = getPrototype;\n","var Symbol = require('./_Symbol');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nmodule.exports = getRawTag;\n","var arrayFilter = require('./_arrayFilter'),\n stubArray = require('./stubArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n if (object == null) {\n return [];\n }\n object = Object(object);\n return arrayFilter(nativeGetSymbols(object), function(symbol) {\n return propertyIsEnumerable.call(object, symbol);\n });\n};\n\nmodule.exports = getSymbols;\n","var arrayPush = require('./_arrayPush'),\n getPrototype = require('./_getPrototype'),\n getSymbols = require('./_getSymbols'),\n stubArray = require('./stubArray');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own and inherited enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {\n var result = [];\n while (object) {\n arrayPush(result, getSymbols(object));\n object = getPrototype(object);\n }\n return result;\n};\n\nmodule.exports = getSymbolsIn;\n","var DataView = require('./_DataView'),\n Map = require('./_Map'),\n Promise = require('./_Promise'),\n Set = require('./_Set'),\n WeakMap = require('./_WeakMap'),\n baseGetTag = require('./_baseGetTag'),\n toSource = require('./_toSource');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n setTag = '[object Set]',\n weakMapTag = '[object WeakMap]';\n\nvar dataViewTag = '[object DataView]';\n\n/** Used to detect maps, sets, and weakmaps. */\nvar dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nvar getTag = baseGetTag;\n\n// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\nif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = baseGetTag(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : '';\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n}\n\nmodule.exports = getTag;\n","/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\nmodule.exports = getValue;\n","var nativeCreate = require('./_nativeCreate');\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n}\n\nmodule.exports = hashClear;\n","/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = hashDelete;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\nmodule.exports = hashGet;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\nmodule.exports = hashHas;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\nmodule.exports = hashSet;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Initializes an array clone.\n *\n * @private\n * @param {Array} array The array to clone.\n * @returns {Array} Returns the initialized clone.\n */\nfunction initCloneArray(array) {\n var length = array.length,\n result = new array.constructor(length);\n\n // Add properties assigned by `RegExp#exec`.\n if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {\n result.index = array.index;\n result.input = array.input;\n }\n return result;\n}\n\nmodule.exports = initCloneArray;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer'),\n cloneDataView = require('./_cloneDataView'),\n cloneRegExp = require('./_cloneRegExp'),\n cloneSymbol = require('./_cloneSymbol'),\n cloneTypedArray = require('./_cloneTypedArray');\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/**\n * Initializes an object clone based on its `toStringTag`.\n *\n * **Note:** This function only supports cloning values with tags of\n * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.\n *\n * @private\n * @param {Object} object The object to clone.\n * @param {string} tag The `toStringTag` of the object to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneByTag(object, tag, isDeep) {\n var Ctor = object.constructor;\n switch (tag) {\n case arrayBufferTag:\n return cloneArrayBuffer(object);\n\n case boolTag:\n case dateTag:\n return new Ctor(+object);\n\n case dataViewTag:\n return cloneDataView(object, isDeep);\n\n case float32Tag: case float64Tag:\n case int8Tag: case int16Tag: case int32Tag:\n case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:\n return cloneTypedArray(object, isDeep);\n\n case mapTag:\n return new Ctor;\n\n case numberTag:\n case stringTag:\n return new Ctor(object);\n\n case regexpTag:\n return cloneRegExp(object);\n\n case setTag:\n return new Ctor;\n\n case symbolTag:\n return cloneSymbol(object);\n }\n}\n\nmodule.exports = initCloneByTag;\n","var baseCreate = require('./_baseCreate'),\n getPrototype = require('./_getPrototype'),\n isPrototype = require('./_isPrototype');\n\n/**\n * Initializes an object clone.\n *\n * @private\n * @param {Object} object The object to clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneObject(object) {\n return (typeof object.constructor == 'function' && !isPrototype(object))\n ? baseCreate(getPrototype(object))\n : {};\n}\n\nmodule.exports = initCloneObject;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n var type = typeof value;\n length = length == null ? MAX_SAFE_INTEGER : length;\n\n return !!length &&\n (type == 'number' ||\n (type != 'symbol' && reIsUint.test(value))) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\nmodule.exports = isIndex;\n","/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\nmodule.exports = isKeyable;\n","var coreJsData = require('./_coreJsData');\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\nmodule.exports = isMasked;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\nmodule.exports = isPrototype;\n","/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n}\n\nmodule.exports = listCacheClear;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype;\n\n/** Built-in value references. */\nvar splice = arrayProto.splice;\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n}\n\nmodule.exports = listCacheDelete;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\nmodule.exports = listCacheGet;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\nmodule.exports = listCacheHas;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\nmodule.exports = listCacheSet;\n","var Hash = require('./_Hash'),\n ListCache = require('./_ListCache'),\n Map = require('./_Map');\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\nmodule.exports = mapCacheClear;\n","var getMapData = require('./_getMapData');\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = mapCacheDelete;\n","var getMapData = require('./_getMapData');\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\nmodule.exports = mapCacheGet;\n","var getMapData = require('./_getMapData');\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\nmodule.exports = mapCacheHas;\n","var getMapData = require('./_getMapData');\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n}\n\nmodule.exports = mapCacheSet;\n","/**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\nfunction mapToArray(map) {\n var index = -1,\n result = Array(map.size);\n\n map.forEach(function(value, key) {\n result[++index] = [key, value];\n });\n return result;\n}\n\nmodule.exports = mapToArray;\n","var getNative = require('./_getNative');\n\n/* Built-in method references that are verified to be native. */\nvar nativeCreate = getNative(Object, 'create');\n\nmodule.exports = nativeCreate;\n","var overArg = require('./_overArg');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeKeys = overArg(Object.keys, Object);\n\nmodule.exports = nativeKeys;\n","/**\n * This function is like\n * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * except that it includes inherited enumerable properties.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction nativeKeysIn(object) {\n var result = [];\n if (object != null) {\n for (var key in Object(object)) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = nativeKeysIn;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n try {\n // Use `util.types` for Node.js 10+.\n var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n if (types) {\n return types;\n }\n\n // Legacy `process.binding('util')` for Node.js < 10.\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n}());\n\nmodule.exports = nodeUtil;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n","/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\nmodule.exports = overArg;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n","/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\nfunction setCacheAdd(value) {\n this.__data__.set(value, HASH_UNDEFINED);\n return this;\n}\n\nmodule.exports = setCacheAdd;\n","/**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\nfunction setCacheHas(value) {\n return this.__data__.has(value);\n}\n\nmodule.exports = setCacheHas;\n","/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\nfunction setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n}\n\nmodule.exports = setToArray;\n","var ListCache = require('./_ListCache');\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}\n\nmodule.exports = stackClear;\n","/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n var data = this.__data__,\n result = data['delete'](key);\n\n this.size = data.size;\n return result;\n}\n\nmodule.exports = stackDelete;\n","/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n return this.__data__.get(key);\n}\n\nmodule.exports = stackGet;\n","/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n return this.__data__.has(key);\n}\n\nmodule.exports = stackHas;\n","var ListCache = require('./_ListCache'),\n Map = require('./_Map'),\n MapCache = require('./_MapCache');\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n var data = this.__data__;\n if (data instanceof ListCache) {\n var pairs = data.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n this.size = ++data.size;\n return this;\n }\n data = this.__data__ = new MapCache(pairs);\n }\n data.set(key, value);\n this.size = data.size;\n return this;\n}\n\nmodule.exports = stackSet;\n","/** Used for built-in method references. */\nvar funcProto = Function.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\nmodule.exports = toSource;\n","var baseClone = require('./_baseClone');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_SYMBOLS_FLAG = 4;\n\n/**\n * This method is like `_.clone` except that it recursively clones `value`.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Lang\n * @param {*} value The value to recursively clone.\n * @returns {*} Returns the deep cloned value.\n * @see _.clone\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var deep = _.cloneDeep(objects);\n * console.log(deep[0] === objects[0]);\n * // => false\n */\nfunction cloneDeep(value) {\n return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);\n}\n\nmodule.exports = cloneDeep;\n","/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\nmodule.exports = eq;\n","var baseIsArguments = require('./_baseIsArguments'),\n isObjectLike = require('./isObjectLike');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n};\n\nmodule.exports = isArguments;\n","/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\nmodule.exports = isArray;\n","var isFunction = require('./isFunction'),\n isLength = require('./isLength');\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\nmodule.exports = isArrayLike;\n","var root = require('./_root'),\n stubFalse = require('./stubFalse');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\nmodule.exports = isBuffer;\n","var baseIsEqual = require('./_baseIsEqual');\n\n/**\n * Performs a deep comparison between two values to determine if they are\n * equivalent.\n *\n * **Note:** This method supports comparing arrays, array buffers, booleans,\n * date objects, error objects, maps, numbers, `Object` objects, regexes,\n * sets, strings, symbols, and typed arrays. `Object` objects are compared\n * by their own, not inherited, enumerable properties. Functions and DOM\n * nodes are compared by strict equality, i.e. `===`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.isEqual(object, other);\n * // => true\n *\n * object === other;\n * // => false\n */\nfunction isEqual(value, other) {\n return baseIsEqual(value, other);\n}\n\nmodule.exports = isEqual;\n","var baseGetTag = require('./_baseGetTag'),\n isObject = require('./isObject');\n\n/** `Object#toString` result references. */\nvar asyncTag = '[object AsyncFunction]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n proxyTag = '[object Proxy]';\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\nmodule.exports = isFunction;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\nmodule.exports = isLength;\n","var baseIsMap = require('./_baseIsMap'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsMap = nodeUtil && nodeUtil.isMap;\n\n/**\n * Checks if `value` is classified as a `Map` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n * @example\n *\n * _.isMap(new Map);\n * // => true\n *\n * _.isMap(new WeakMap);\n * // => false\n */\nvar isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;\n\nmodule.exports = isMap;\n","/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n","var baseIsSet = require('./_baseIsSet'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsSet = nodeUtil && nodeUtil.isSet;\n\n/**\n * Checks if `value` is classified as a `Set` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n * @example\n *\n * _.isSet(new Set);\n * // => true\n *\n * _.isSet(new WeakSet);\n * // => false\n */\nvar isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;\n\nmodule.exports = isSet;\n","var baseIsTypedArray = require('./_baseIsTypedArray'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\nmodule.exports = isTypedArray;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeys = require('./_baseKeys'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\nmodule.exports = keys;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeysIn = require('./_baseKeysIn'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\nfunction keysIn(object) {\n return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n}\n\nmodule.exports = keysIn;\n","/**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\nfunction stubArray() {\n return [];\n}\n\nmodule.exports = stubArray;\n","/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n return false;\n}\n\nmodule.exports = stubFalse;\n","import { connect, type BaseConnectionOptions } from \"@openfin/core-web\";\nimport { getSettings } from \"./settings\";\n\n/**\n * Initializes the OpenFin Web Broker connection.\n * @param inherit Should we inherit settings from the host (available in the OpenFin layout system) or use settings? Default is true.\n */\nexport async function init(inherit: boolean = true): Promise {\n\t// Set window.fin to the `fin` object.\n\tlet options: BaseConnectionOptions | undefined;\n\tif (window.fin === undefined) {\n\t\tif (!inherit) {\n\t\t\tconst settings = await getSettings();\n\t\t\tif (settings === undefined) {\n\t\t\t\tconsole.error(\n\t\t\t\t\t\"Unable to run the sample as we have been unable to load the web manifest and it's settings from the currently running html page. Please ensure that the web manifest is being served and that it contains the custom_settings section.\"\n\t\t\t\t);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\toptions = {\n\t\t\t\tbrokerUrl: settings.platform.interop.brokerUrl,\n\t\t\t\tinteropConfig: {\n\t\t\t\t\tproviderId: settings.platform.interop.providerId,\n\t\t\t\t\tcurrentContextGroup: settings.platform.interop.defaultContextGroup\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t\t// Specify an interopConfig with a specific provider ID and a context group to initialize the `fin.me.interop` client on connection.\n\t\tif (options) {\n\t\t\twindow.fin = await connect({\n\t\t\t\toptions\n\t\t\t});\n\t\t} else {\n\t\t\twindow.fin = await connect({\n\t\t\t\tconnectionInheritance: \"enabled\"\n\t\t\t});\n\t\t}\n\t\tconsole.log(\"Finished initializing the fin API.\");\n\t\t// Create and dispatch the finReady event\n\t\tconst event = new CustomEvent(\"finReady\");\n\t\twindow.dispatchEvent(event);\n\t}\n\n\tif (window.fdc3 === undefined && window?.fin?.me.interop?.getFDC3Sync !== undefined) {\n\t\twindow.fdc3 = fin.me.interop.getFDC3Sync(\"2.0\");\n\t\tconsole.log(\"Finished initializing the fdc3 API.\");\n\t\t// Create and dispatch the FDC3Ready event\n\t\tconst event = new CustomEvent(\"fdc3Ready\");\n\t\twindow.dispatchEvent(event);\n\t}\n}\n","import type { WebLayoutSnapshot } from \"@openfin/core-web\";\nimport type { Settings } from \"../shapes/setting-shapes\";\n\n/**\n * Fetches the settings for the application.\n * @returns The settings for the application.\n */\nexport async function getSettings(): Promise {\n\tconst settings = await getManifestSettings();\n\tif (settings === undefined) {\n\t\tconsole.error(\n\t\t\t\"Unable to run the example as settings are required and we fetch them from the link web manifest from the html page that is being served. It should exist in the customSettings section of the web manifest.\"\n\t\t);\n\t}\n\treturn settings;\n}\n\n/**\n * Returns a default layout from the settings if provided.\n * @returns The default layout from the settings.\n */\nexport async function getDefaultLayout(): Promise {\n\tconst settings = await getSettings();\n\tif (settings?.platform?.layout?.defaultLayout === undefined) {\n\t\tconsole.error(\n\t\t\t\"Unable to run the example as without a layout being defined. Please ensure that settings have been provided in the web manifest.\"\n\t\t);\n\t\treturn;\n\t}\n\tif (typeof settings.platform.layout.defaultLayout === \"string\") {\n\t\tconst layoutResponse = await fetch(settings.platform.layout.defaultLayout);\n\t\tconst layoutJson = (await layoutResponse.json()) as WebLayoutSnapshot;\n\t\treturn layoutJson;\n\t}\n\treturn settings.platform.layout.defaultLayout;\n}\n\n/**\n * Returns the settings from the manifest file.\n * @returns customSettings for this example\n */\nasync function getManifestSettings(): Promise {\n\t// Get the manifest link\n\tconst link = document.querySelector('link[rel=\"manifest\"]');\n\tif (link !== null) {\n\t\tconst manifestResponse = await fetch(link.href);\n\t\tconst manifestJson = (await manifestResponse.json()) as { custom_settings: Settings };\n\t\treturn manifestJson.custom_settings;\n\t}\n}\n","export { default as v1 } from './v1.js';\nexport { default as v3 } from './v3.js';\nexport { default as v4 } from './v4.js';\nexport { default as v5 } from './v5.js';\nexport { default as NIL } from './nil.js';\nexport { default as version } from './version.js';\nexport { default as validate } from './validate.js';\nexport { default as stringify } from './stringify.js';\nexport { default as parse } from './parse.js';","/*\n * Browser-compatible JavaScript MD5\n *\n * Modification of JavaScript MD5\n * https://github.com/blueimp/JavaScript-MD5\n *\n * Copyright 2011, Sebastian Tschan\n * https://blueimp.net\n *\n * Licensed under the MIT license:\n * https://opensource.org/licenses/MIT\n *\n * Based on\n * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message\n * Digest Algorithm, as defined in RFC 1321.\n * Version 2.2 Copyright (C) Paul Johnston 1999 - 2009\n * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet\n * Distributed under the BSD License\n * See http://pajhome.org.uk/crypt/md5 for more info.\n */\nfunction md5(bytes) {\n if (typeof bytes === 'string') {\n var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape\n\n bytes = new Uint8Array(msg.length);\n\n for (var i = 0; i < msg.length; ++i) {\n bytes[i] = msg.charCodeAt(i);\n }\n }\n\n return md5ToHexEncodedArray(wordsToMd5(bytesToWords(bytes), bytes.length * 8));\n}\n/*\n * Convert an array of little-endian words to an array of bytes\n */\n\n\nfunction md5ToHexEncodedArray(input) {\n var output = [];\n var length32 = input.length * 32;\n var hexTab = '0123456789abcdef';\n\n for (var i = 0; i < length32; i += 8) {\n var x = input[i >> 5] >>> i % 32 & 0xff;\n var hex = parseInt(hexTab.charAt(x >>> 4 & 0x0f) + hexTab.charAt(x & 0x0f), 16);\n output.push(hex);\n }\n\n return output;\n}\n/**\n * Calculate output length with padding and bit length\n */\n\n\nfunction getOutputLength(inputLength8) {\n return (inputLength8 + 64 >>> 9 << 4) + 14 + 1;\n}\n/*\n * Calculate the MD5 of an array of little-endian words, and a bit length.\n */\n\n\nfunction wordsToMd5(x, len) {\n /* append padding */\n x[len >> 5] |= 0x80 << len % 32;\n x[getOutputLength(len) - 1] = len;\n var a = 1732584193;\n var b = -271733879;\n var c = -1732584194;\n var d = 271733878;\n\n for (var i = 0; i < x.length; i += 16) {\n var olda = a;\n var oldb = b;\n var oldc = c;\n var oldd = d;\n a = md5ff(a, b, c, d, x[i], 7, -680876936);\n d = md5ff(d, a, b, c, x[i + 1], 12, -389564586);\n c = md5ff(c, d, a, b, x[i + 2], 17, 606105819);\n b = md5ff(b, c, d, a, x[i + 3], 22, -1044525330);\n a = md5ff(a, b, c, d, x[i + 4], 7, -176418897);\n d = md5ff(d, a, b, c, x[i + 5], 12, 1200080426);\n c = md5ff(c, d, a, b, x[i + 6], 17, -1473231341);\n b = md5ff(b, c, d, a, x[i + 7], 22, -45705983);\n a = md5ff(a, b, c, d, x[i + 8], 7, 1770035416);\n d = md5ff(d, a, b, c, x[i + 9], 12, -1958414417);\n c = md5ff(c, d, a, b, x[i + 10], 17, -42063);\n b = md5ff(b, c, d, a, x[i + 11], 22, -1990404162);\n a = md5ff(a, b, c, d, x[i + 12], 7, 1804603682);\n d = md5ff(d, a, b, c, x[i + 13], 12, -40341101);\n c = md5ff(c, d, a, b, x[i + 14], 17, -1502002290);\n b = md5ff(b, c, d, a, x[i + 15], 22, 1236535329);\n a = md5gg(a, b, c, d, x[i + 1], 5, -165796510);\n d = md5gg(d, a, b, c, x[i + 6], 9, -1069501632);\n c = md5gg(c, d, a, b, x[i + 11], 14, 643717713);\n b = md5gg(b, c, d, a, x[i], 20, -373897302);\n a = md5gg(a, b, c, d, x[i + 5], 5, -701558691);\n d = md5gg(d, a, b, c, x[i + 10], 9, 38016083);\n c = md5gg(c, d, a, b, x[i + 15], 14, -660478335);\n b = md5gg(b, c, d, a, x[i + 4], 20, -405537848);\n a = md5gg(a, b, c, d, x[i + 9], 5, 568446438);\n d = md5gg(d, a, b, c, x[i + 14], 9, -1019803690);\n c = md5gg(c, d, a, b, x[i + 3], 14, -187363961);\n b = md5gg(b, c, d, a, x[i + 8], 20, 1163531501);\n a = md5gg(a, b, c, d, x[i + 13], 5, -1444681467);\n d = md5gg(d, a, b, c, x[i + 2], 9, -51403784);\n c = md5gg(c, d, a, b, x[i + 7], 14, 1735328473);\n b = md5gg(b, c, d, a, x[i + 12], 20, -1926607734);\n a = md5hh(a, b, c, d, x[i + 5], 4, -378558);\n d = md5hh(d, a, b, c, x[i + 8], 11, -2022574463);\n c = md5hh(c, d, a, b, x[i + 11], 16, 1839030562);\n b = md5hh(b, c, d, a, x[i + 14], 23, -35309556);\n a = md5hh(a, b, c, d, x[i + 1], 4, -1530992060);\n d = md5hh(d, a, b, c, x[i + 4], 11, 1272893353);\n c = md5hh(c, d, a, b, x[i + 7], 16, -155497632);\n b = md5hh(b, c, d, a, x[i + 10], 23, -1094730640);\n a = md5hh(a, b, c, d, x[i + 13], 4, 681279174);\n d = md5hh(d, a, b, c, x[i], 11, -358537222);\n c = md5hh(c, d, a, b, x[i + 3], 16, -722521979);\n b = md5hh(b, c, d, a, x[i + 6], 23, 76029189);\n a = md5hh(a, b, c, d, x[i + 9], 4, -640364487);\n d = md5hh(d, a, b, c, x[i + 12], 11, -421815835);\n c = md5hh(c, d, a, b, x[i + 15], 16, 530742520);\n b = md5hh(b, c, d, a, x[i + 2], 23, -995338651);\n a = md5ii(a, b, c, d, x[i], 6, -198630844);\n d = md5ii(d, a, b, c, x[i + 7], 10, 1126891415);\n c = md5ii(c, d, a, b, x[i + 14], 15, -1416354905);\n b = md5ii(b, c, d, a, x[i + 5], 21, -57434055);\n a = md5ii(a, b, c, d, x[i + 12], 6, 1700485571);\n d = md5ii(d, a, b, c, x[i + 3], 10, -1894986606);\n c = md5ii(c, d, a, b, x[i + 10], 15, -1051523);\n b = md5ii(b, c, d, a, x[i + 1], 21, -2054922799);\n a = md5ii(a, b, c, d, x[i + 8], 6, 1873313359);\n d = md5ii(d, a, b, c, x[i + 15], 10, -30611744);\n c = md5ii(c, d, a, b, x[i + 6], 15, -1560198380);\n b = md5ii(b, c, d, a, x[i + 13], 21, 1309151649);\n a = md5ii(a, b, c, d, x[i + 4], 6, -145523070);\n d = md5ii(d, a, b, c, x[i + 11], 10, -1120210379);\n c = md5ii(c, d, a, b, x[i + 2], 15, 718787259);\n b = md5ii(b, c, d, a, x[i + 9], 21, -343485551);\n a = safeAdd(a, olda);\n b = safeAdd(b, oldb);\n c = safeAdd(c, oldc);\n d = safeAdd(d, oldd);\n }\n\n return [a, b, c, d];\n}\n/*\n * Convert an array bytes to an array of little-endian words\n * Characters >255 have their high-byte silently ignored.\n */\n\n\nfunction bytesToWords(input) {\n if (input.length === 0) {\n return [];\n }\n\n var length8 = input.length * 8;\n var output = new Uint32Array(getOutputLength(length8));\n\n for (var i = 0; i < length8; i += 8) {\n output[i >> 5] |= (input[i / 8] & 0xff) << i % 32;\n }\n\n return output;\n}\n/*\n * Add integers, wrapping at 2^32. This uses 16-bit operations internally\n * to work around bugs in some JS interpreters.\n */\n\n\nfunction safeAdd(x, y) {\n var lsw = (x & 0xffff) + (y & 0xffff);\n var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n return msw << 16 | lsw & 0xffff;\n}\n/*\n * Bitwise rotate a 32-bit number to the left.\n */\n\n\nfunction bitRotateLeft(num, cnt) {\n return num << cnt | num >>> 32 - cnt;\n}\n/*\n * These functions implement the four basic operations the algorithm uses.\n */\n\n\nfunction md5cmn(q, a, b, x, s, t) {\n return safeAdd(bitRotateLeft(safeAdd(safeAdd(a, q), safeAdd(x, t)), s), b);\n}\n\nfunction md5ff(a, b, c, d, x, s, t) {\n return md5cmn(b & c | ~b & d, a, b, x, s, t);\n}\n\nfunction md5gg(a, b, c, d, x, s, t) {\n return md5cmn(b & d | c & ~d, a, b, x, s, t);\n}\n\nfunction md5hh(a, b, c, d, x, s, t) {\n return md5cmn(b ^ c ^ d, a, b, x, s, t);\n}\n\nfunction md5ii(a, b, c, d, x, s, t) {\n return md5cmn(c ^ (b | ~d), a, b, x, s, t);\n}\n\nexport default md5;","export default '00000000-0000-0000-0000-000000000000';","import validate from './validate.js';\n\nfunction parse(uuid) {\n if (!validate(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n var v;\n var arr = new Uint8Array(16); // Parse ########-....-....-....-............\n\n arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24;\n arr[1] = v >>> 16 & 0xff;\n arr[2] = v >>> 8 & 0xff;\n arr[3] = v & 0xff; // Parse ........-####-....-....-............\n\n arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8;\n arr[5] = v & 0xff; // Parse ........-....-####-....-............\n\n arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8;\n arr[7] = v & 0xff; // Parse ........-....-....-####-............\n\n arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8;\n arr[9] = v & 0xff; // Parse ........-....-....-....-############\n // (Use \"/\" to avoid 32-bit truncation when bit-shifting high-order bytes)\n\n arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff;\n arr[11] = v / 0x100000000 & 0xff;\n arr[12] = v >>> 24 & 0xff;\n arr[13] = v >>> 16 & 0xff;\n arr[14] = v >>> 8 & 0xff;\n arr[15] = v & 0xff;\n return arr;\n}\n\nexport default parse;","export default /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;","// Unique ID creation requires a high quality random # generator. In the browser we therefore\n// require the crypto API and do not support built-in fallback to lower quality random number\n// generators (like Math.random()).\nvar getRandomValues;\nvar rnds8 = new Uint8Array(16);\nexport default function rng() {\n // lazy load so that environments that need to polyfill have a chance to do so\n if (!getRandomValues) {\n // getRandomValues needs to be invoked in a context where \"this\" is a Crypto implementation. Also,\n // find the complete implementation of crypto (msCrypto) on IE11.\n getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto !== 'undefined' && typeof msCrypto.getRandomValues === 'function' && msCrypto.getRandomValues.bind(msCrypto);\n\n if (!getRandomValues) {\n throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');\n }\n }\n\n return getRandomValues(rnds8);\n}","// Adapted from Chris Veness' SHA1 code at\n// http://www.movable-type.co.uk/scripts/sha1.html\nfunction f(s, x, y, z) {\n switch (s) {\n case 0:\n return x & y ^ ~x & z;\n\n case 1:\n return x ^ y ^ z;\n\n case 2:\n return x & y ^ x & z ^ y & z;\n\n case 3:\n return x ^ y ^ z;\n }\n}\n\nfunction ROTL(x, n) {\n return x << n | x >>> 32 - n;\n}\n\nfunction sha1(bytes) {\n var K = [0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xca62c1d6];\n var H = [0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0];\n\n if (typeof bytes === 'string') {\n var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape\n\n bytes = [];\n\n for (var i = 0; i < msg.length; ++i) {\n bytes.push(msg.charCodeAt(i));\n }\n } else if (!Array.isArray(bytes)) {\n // Convert Array-like to Array\n bytes = Array.prototype.slice.call(bytes);\n }\n\n bytes.push(0x80);\n var l = bytes.length / 4 + 2;\n var N = Math.ceil(l / 16);\n var M = new Array(N);\n\n for (var _i = 0; _i < N; ++_i) {\n var arr = new Uint32Array(16);\n\n for (var j = 0; j < 16; ++j) {\n arr[j] = bytes[_i * 64 + j * 4] << 24 | bytes[_i * 64 + j * 4 + 1] << 16 | bytes[_i * 64 + j * 4 + 2] << 8 | bytes[_i * 64 + j * 4 + 3];\n }\n\n M[_i] = arr;\n }\n\n M[N - 1][14] = (bytes.length - 1) * 8 / Math.pow(2, 32);\n M[N - 1][14] = Math.floor(M[N - 1][14]);\n M[N - 1][15] = (bytes.length - 1) * 8 & 0xffffffff;\n\n for (var _i2 = 0; _i2 < N; ++_i2) {\n var W = new Uint32Array(80);\n\n for (var t = 0; t < 16; ++t) {\n W[t] = M[_i2][t];\n }\n\n for (var _t = 16; _t < 80; ++_t) {\n W[_t] = ROTL(W[_t - 3] ^ W[_t - 8] ^ W[_t - 14] ^ W[_t - 16], 1);\n }\n\n var a = H[0];\n var b = H[1];\n var c = H[2];\n var d = H[3];\n var e = H[4];\n\n for (var _t2 = 0; _t2 < 80; ++_t2) {\n var s = Math.floor(_t2 / 20);\n var T = ROTL(a, 5) + f(s, b, c, d) + e + K[s] + W[_t2] >>> 0;\n e = d;\n d = c;\n c = ROTL(b, 30) >>> 0;\n b = a;\n a = T;\n }\n\n H[0] = H[0] + a >>> 0;\n H[1] = H[1] + b >>> 0;\n H[2] = H[2] + c >>> 0;\n H[3] = H[3] + d >>> 0;\n H[4] = H[4] + e >>> 0;\n }\n\n return [H[0] >> 24 & 0xff, H[0] >> 16 & 0xff, H[0] >> 8 & 0xff, H[0] & 0xff, H[1] >> 24 & 0xff, H[1] >> 16 & 0xff, H[1] >> 8 & 0xff, H[1] & 0xff, H[2] >> 24 & 0xff, H[2] >> 16 & 0xff, H[2] >> 8 & 0xff, H[2] & 0xff, H[3] >> 24 & 0xff, H[3] >> 16 & 0xff, H[3] >> 8 & 0xff, H[3] & 0xff, H[4] >> 24 & 0xff, H[4] >> 16 & 0xff, H[4] >> 8 & 0xff, H[4] & 0xff];\n}\n\nexport default sha1;","import validate from './validate.js';\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\n\nvar byteToHex = [];\n\nfor (var i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).substr(1));\n}\n\nfunction stringify(arr) {\n var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n var uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!validate(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n\n return uuid;\n}\n\nexport default stringify;","import rng from './rng.js';\nimport stringify from './stringify.js'; // **`v1()` - Generate time-based UUID**\n//\n// Inspired by https://github.com/LiosK/UUID.js\n// and http://docs.python.org/library/uuid.html\n\nvar _nodeId;\n\nvar _clockseq; // Previous uuid creation time\n\n\nvar _lastMSecs = 0;\nvar _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details\n\nfunction v1(options, buf, offset) {\n var i = buf && offset || 0;\n var b = buf || new Array(16);\n options = options || {};\n var node = options.node || _nodeId;\n var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not\n // specified. We do this lazily to minimize issues related to insufficient\n // system entropy. See #189\n\n if (node == null || clockseq == null) {\n var seedBytes = options.random || (options.rng || rng)();\n\n if (node == null) {\n // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)\n node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]];\n }\n\n if (clockseq == null) {\n // Per 4.2.2, randomize (14 bit) clockseq\n clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;\n }\n } // UUID timestamps are 100 nano-second units since the Gregorian epoch,\n // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so\n // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'\n // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.\n\n\n var msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock\n // cycle to simulate higher resolution clock\n\n var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs)\n\n var dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression\n\n if (dt < 0 && options.clockseq === undefined) {\n clockseq = clockseq + 1 & 0x3fff;\n } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new\n // time interval\n\n\n if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {\n nsecs = 0;\n } // Per 4.2.1.2 Throw error if too many uuids are requested\n\n\n if (nsecs >= 10000) {\n throw new Error(\"uuid.v1(): Can't create more than 10M uuids/sec\");\n }\n\n _lastMSecs = msecs;\n _lastNSecs = nsecs;\n _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch\n\n msecs += 12219292800000; // `time_low`\n\n var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;\n b[i++] = tl >>> 24 & 0xff;\n b[i++] = tl >>> 16 & 0xff;\n b[i++] = tl >>> 8 & 0xff;\n b[i++] = tl & 0xff; // `time_mid`\n\n var tmh = msecs / 0x100000000 * 10000 & 0xfffffff;\n b[i++] = tmh >>> 8 & 0xff;\n b[i++] = tmh & 0xff; // `time_high_and_version`\n\n b[i++] = tmh >>> 24 & 0xf | 0x10; // include version\n\n b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)\n\n b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low`\n\n b[i++] = clockseq & 0xff; // `node`\n\n for (var n = 0; n < 6; ++n) {\n b[i + n] = node[n];\n }\n\n return buf || stringify(b);\n}\n\nexport default v1;","import v35 from './v35.js';\nimport md5 from './md5.js';\nvar v3 = v35('v3', 0x30, md5);\nexport default v3;","import stringify from './stringify.js';\nimport parse from './parse.js';\n\nfunction stringToBytes(str) {\n str = unescape(encodeURIComponent(str)); // UTF8 escape\n\n var bytes = [];\n\n for (var i = 0; i < str.length; ++i) {\n bytes.push(str.charCodeAt(i));\n }\n\n return bytes;\n}\n\nexport var DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8';\nexport var URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8';\nexport default function (name, version, hashfunc) {\n function generateUUID(value, namespace, buf, offset) {\n if (typeof value === 'string') {\n value = stringToBytes(value);\n }\n\n if (typeof namespace === 'string') {\n namespace = parse(namespace);\n }\n\n if (namespace.length !== 16) {\n throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)');\n } // Compute hash of namespace and value, Per 4.3\n // Future: Use spread syntax when supported on all platforms, e.g. `bytes =\n // hashfunc([...namespace, ... value])`\n\n\n var bytes = new Uint8Array(16 + value.length);\n bytes.set(namespace);\n bytes.set(value, namespace.length);\n bytes = hashfunc(bytes);\n bytes[6] = bytes[6] & 0x0f | version;\n bytes[8] = bytes[8] & 0x3f | 0x80;\n\n if (buf) {\n offset = offset || 0;\n\n for (var i = 0; i < 16; ++i) {\n buf[offset + i] = bytes[i];\n }\n\n return buf;\n }\n\n return stringify(bytes);\n } // Function#name is not settable on some platforms (#270)\n\n\n try {\n generateUUID.name = name; // eslint-disable-next-line no-empty\n } catch (err) {} // For CommonJS default export support\n\n\n generateUUID.DNS = DNS;\n generateUUID.URL = URL;\n return generateUUID;\n}","import rng from './rng.js';\nimport stringify from './stringify.js';\n\nfunction v4(options, buf, offset) {\n options = options || {};\n var rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n offset = offset || 0;\n\n for (var i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n\n return buf;\n }\n\n return stringify(rnds);\n}\n\nexport default v4;","import v35 from './v35.js';\nimport sha1 from './sha1.js';\nvar v5 = v35('v5', 0x50, sha1);\nexport default v5;","import REGEX from './regex.js';\n\nfunction validate(uuid) {\n return typeof uuid === 'string' && REGEX.test(uuid);\n}\n\nexport default validate;","import validate from './validate.js';\n\nfunction version(uuid) {\n if (!validate(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n return parseInt(uuid.substr(14, 1), 16);\n}\n\nexport default version;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = (module) => {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","import type { Context } from \"@finos/fdc3\";\nimport { init } from \"../platform/api\";\n\nwindow.addEventListener(\"DOMContentLoaded\", async () => {\n\tawait init(true);\n\tawait initializeDOM();\n});\n\n/**\n * Broadcasts a context using FDC3.\n */\nasync function setContext(): Promise {\n\tconst contextType = \"fdc3.instrument\";\n\tconst contextName = \"Tesla Inc.\";\n\tconst idData = {\n\t\tticker: \"TSLA\"\n\t};\n\tconst context = {\n\t\ttype: contextType,\n\t\tname: contextName,\n\t\tid: idData\n\t};\n\tif (window.fin) {\n\t\tawait window.fin.me.interop.setContext(context);\n\t\tconsole.log(`Set context: ${contextType} - ${contextName}`);\n\t} else {\n\t\twindow.addEventListener(\"finReady\", async () => {\n\t\t\tif (window.fin) {\n\t\t\t\tawait window.fin.me.interop.setContext(context);\n\t\t\t\tconsole.log(`Set context: ${contextType} - ${contextName}`);\n\t\t\t}\n\t\t});\n\t}\n}\n\n/**\n * Adds an interop context listener to the window.\n */\nasync function addContextListener(): Promise {\n\tif (window.fin) {\n\t\tawait window.fin.me.interop.addContextHandler((context: Context) => {\n\t\t\tupdateDOMElements(context);\n\t\t});\n\t} else {\n\t\twindow.addEventListener(\"finReady\", async () => {\n\t\t\tif (window.fin) {\n\t\t\t\tawait window.fin.me.interop.addContextHandler((context: Context) => {\n\t\t\t\t\tupdateDOMElements(context);\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t}\n}\n\n/**\n * Updates the DOM elements with the provided context.\n * @param context The context to update the DOM elements with.\n */\nfunction updateDOMElements(context: Context): void {\n\tconst contextTypeSpan = document.querySelector(\"#contextType\");\n\tconst contextNameSpan = document.querySelector(\"#contextName\");\n\tconst contextBodyPre = document.querySelector(\"#contextBody\");\n\n\tif (contextTypeSpan !== null && contextNameSpan !== null && contextBodyPre !== null) {\n\t\tcontextTypeSpan.textContent = context.type;\n\t\tcontextNameSpan.textContent = context.name ?? \"No name provided.\";\n\t\tcontextBodyPre.textContent = JSON.stringify(context, null, 2);\n\t}\n}\n\n/**\n * Initialize the DOM elements.\n */\nasync function initializeDOM(): Promise {\n\tconst setContextButton = document.querySelector(\"#setContext\");\n\n\tif (setContextButton !== null) {\n\t\tsetContextButton.addEventListener(\"click\", async () => {\n\t\t\tawait setContext();\n\t\t});\n\t}\n\n\tawait addContextListener();\n}\n"],"names":[],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"interop-view.bundle.js","mappings":";;;;;;;;;;AAAa,MAAM,mBAAO,CAAC,qFAAoB,EAAE,mBAAO,CAAC,mDAAS,EAAE,mBAAO,CAAC,+DAAM,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;AACA;AACA;;AAEY;;AAEZ,eAAe,mBAAO,CAAC,wDAAW;AAClC,gBAAgB,mBAAO,CAAC,oDAAS;AACjC;AACA;AACA;AACA;;AAEA,cAAc;AACd,kBAAkB;AAClB,yBAAyB;;AAEzB;AACA,kBAAkB;;AAElB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,kBAAkB,YAAY;AAC9B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA,wCAAwC,SAAS;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;;AAEA;AACA;AACA,cAAc,iBAAiB;AAC/B;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,iDAAiD,EAAE;AACnD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C;AAC1C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA,yBAAyB,eAAe;AACxC;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,yBAAyB,QAAQ;AACjC;AACA,sBAAsB,eAAe;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc,YAAY;AAC1B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB,sBAAsB;AACxC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,mBAAmB;AACnB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA,oBAAoB,SAAS;AAC7B;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA,qBAAqB,WAAW,GAAG,IAAI;AACvC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA,gBAAgB,WAAW,GAAG,IAAI,KAAK,aAAa;AACpD;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;;AAEA;AACA,GAAG;AACH;AACA;AACA,mBAAmB,KAAK,mDAAmD,cAAc;AACzF,GAAG;AACH;AACA;AACA,+BAA+B,IAAI;AACnC;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,MAAM,aAAa,SAAS;AACtD;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,SAAS,gBAAgB;AACzB,cAAc,oBAAoB,EAAE,IAAI;AACxC;AACA,YAAY,gBAAgB,EAAE,IAAI;AAClC;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,GAAG,SAAS,GAAG,KAAK,qBAAqB,EAAE,EAAE;AACpE,QAAQ;AACR,yBAAyB,GAAG,KAAK,yBAAyB,EAAE,EAAE;AAC9D,mBAAmB,yBAAyB,EAAE,EAAE;AAChD;AACA,MAAM;AACN,oBAAoB,IAAI,EAAE,GAAG,SAAS,IAAI,EAAE,EAAE;AAC9C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,0CAA0C,cAAc,SAAS,OAAO;AACxE;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,kBAAkB,YAAY;AAC9B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,kBAAkB,gBAAgB;AAClC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,kBAAkB,gBAAgB;AAClC;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,cAAc,YAAY;AAC1B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,QAAQ;AAC1B;AACA,oBAAoB,QAAQ;AAC5B;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;;;;;ACzjEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEa;;AAEb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB;;AAEnB;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,sBAAsB;AACxC;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA,eAAe;AACf;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA,oBAAoB,SAAS;AAC7B;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;;AAEA,kCAAkC,QAAQ;AAC1C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oBAAoB,iBAAiB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,QAAQ;AACR;AACA,uCAAuC,QAAQ;AAC/C;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,OAAO;AACzB;AACA;AACA;;AAEA;AACA,SAAS,yBAAyB;AAClC;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,gBAAgB;AAClC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,8DAA8D,YAAY;AAC1E;AACA,8DAA8D,YAAY;AAC1E;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,qCAAqC,YAAY;AACjD;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;AACA;;;;;;;;;;;AChfA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,SAAS,WAAW;;AAEpB;AACA;AACA;AACA,SAAS,WAAW;;AAEpB;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA,aAAa;AACb;AACA;AAC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A;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,UAAU;AACrB,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACrBA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,UAAU;AACrB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACxBA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,kBAAkB,mBAAO,CAAC,+DAAe;AACzC,cAAc,mBAAO,CAAC,uDAAW;AACjC,eAAe,mBAAO,CAAC,yDAAY;AACnC,cAAc,mBAAO,CAAC,yDAAY;AAClC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,SAAS;AACpB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AChDA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACnBA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,UAAU;AACrB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACtBA,sBAAsB,mBAAO,CAAC,yEAAoB;AAClD,SAAS,mBAAO,CAAC,6CAAM;;AAEvB;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AAC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,CAAC,mEAAiB;AAC5C,aAAa,mBAAO,CAAC,uDAAW;AAChC,qBAAqB,mBAAO,CAAC,uEAAmB;AAChD,qBAAqB,mBAAO,CAAC,uEAAmB;AAChD,sBAAsB,mBAAO,CAAC,yEAAoB;AAClD,cAAc,mBAAO,CAAC,uDAAW;AACjC,eAAe,mBAAO,CAAC,yDAAY;AACnC,YAAY,mBAAO,CAAC,mDAAS;AAC7B,eAAe,mBAAO,CAAC,yDAAY;AACnC,YAAY,mBAAO,CAAC,mDAAS;AAC7B,WAAW,mBAAO,CAAC,iDAAQ;AAC3B,aAAa,mBAAO,CAAC,qDAAU;;AAE/B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,SAAS;AACpB;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa,GAAG;AAChB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;AACA,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;;;;;;;;;;ACrKA,eAAe,mBAAO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EAAgB;;AAE3C;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,eAAe,mBAAO,CAAC,yDAAY;AACnC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC3DA,kBAAkB,mBAAO,CAAC,iEAAgB;AAC1C,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC7BA,eAAe,mBAAO,CAAC,yDAAY;AACnC,kBAAkB,mBAAO,CAAC,iEAAgB;AAC1C,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AChCA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACnBA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,aA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AW,UAAU;AACrB,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACnFA,aAAa,mBAAO,CAAC,uDAAW;AAChC,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,SAAS,mBAAO,CAAC,6CAAM;AACvB,kBAAkB,mBAAO,CAAC,iEAAgB;AAC1C,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC/GA,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;;AAEA;AAC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AEpC;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACzDA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa,GAAG;AAChB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACZA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACdA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AChBA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,GAAG;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC7BA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACtBA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACtBA;AACA;;AAEA;AACA;;AAEA;AAC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A;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACnBA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACZA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClCA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,GAAG;AAChB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;AClBA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACfA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACzBA,WAAW,mBAAO,CAAC,mDAAS;AAC5B,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,UAAU,mBAAO,CAAC,iDAAQ;;AAE1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA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CAAC;;AAED;;;;;;;;;;;AC7BA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACrBA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,aAAa,UAAU;AACvB;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACdA,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;ACRA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACbA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;;;;;;;;;;ACjBA,gBAAgB,mBAAO,CAAC,6DAAc;;AAEtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACdA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,GAAG;AAChB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACbA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACbA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,UAAU,mBAAO,CAAC,iDAAQ;AAC1B,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjCA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;;;;;;;;;;;ACzBA,gBAAgB,mBAAO,CAAC,6DAAc;;AAEtC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,GAAG;AAChB;AACA;AACA;AACA,oBAAoB,QAAQ,IAAI,QAAQ;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,kBAAkB;AAClB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpCA,sBAAsB,mBAAO,CAAC,yEAAoB;AAClD,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA,8BAA8B,mBAAmB;AACjD;AACA;AACA;AACA;AACA;AACA,+CAA+C,mBAAmB;AAClE;AACA;AACA;;AAEA;;;;;;;;;;;ACnCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACzBA,iBAAiB,mBAAO,CAAC,6DAAc;AACvC,eAAe,mBAAO,CAAC,yDAAY;;AAEnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AChCA,WAAW,mBAAO,CAAC,mDAAS;AAC5B,gBAAgB,mBAAO,CAAC,2DAAa;;AAErC;AACA,kBAAkB,KAA0B;;AAE5C;AACA,gCAAgC,QAAa;;AAE7C;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACrCA,kBAAkB,mBAAO,CAAC,iEAAgB;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,kBAAkB;AAClB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClCA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,eAAe,mBAAO,CAAC,yDAAY;;AAEnC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpCA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClCA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC1BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC9BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC5BA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC1BA,uBAAuB,mBAAO,CAAC,2EAAqB;AACpD,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC1BA,oBAAoB,mBAAO,CAAC,qEAAkB;AAC9C,eAAe,mBAAO,CAAC,2DAAa;AACpC,kBAAkB,mBAAO,CAAC,+DAAe;;AAEzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpCA,oBAAoB,mBAAO,CAAC,qEAAkB;AAC9C,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,kBAAkB,mBAAO,CAAC,+DAAe;;AAEzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC/BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;;;ACVA,oBA2CC;AAlDD,0HAAwE;AACxE,8FAAyC;AAEzC;;;GAGG;AACI,KAAK,UAAU,IAAI,CAAC,UAAmB,IAAI;IACjD,sCAAsC;IACtC,IAAI,OAA0C,CAAC;IAC/C,IAAI,MAAM,CAAC,GAAG,KAAK,SAAS,EAAE,CAAC;QAC9B,IAAI,CAAC,OAAO,EAAE,CAAC;YACd,MAAM,QAAQ,GAAG,MAAM,0BAAW,GAAE,CAAC;YACrC,IAAI,QAAQ,KAAK,SAAS,EA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ACF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACjDuC;AACA;AACA;AACA;AACE;AACQ;AACE;AACE;;;;;;;;;;;;;;;;ACPtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD;;AAEnD;;AAEA,oBAAoB,gBAAgB;AACpC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA,kBAAkB,cAAc;AAChC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,kBAAkB,cAAc;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,kBAAkB,aAAa;AAC/B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,iEAAe,GAAG;;;;;;;;;;;;;;;ACtNlB,iEAAe,sCAAsC;;;;;;;;;;;;;;;;ACAhB;;AAErC;A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,CAAC,aAAa,CAAkB,cAAc,CAAC,CAAC;IAChF,MAAM,cAAc,GAAG,QAAQ,CAAC,aAAa,CAAiB,cAAc,CAAC,CAAC;IAE9E,IAAI,eAAe,KAAK,IAAI,IAAI,eAAe,KAAK,IAAI,IAAI,cAAc,KAAK,IAAI,EAAE,CAAC;QACrF,eAAe,CAAC,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;QAC3C,eAAe,CAAC,WAAW,GAAG,OAAO,CAAC,IAAI,IAAI,mBAAmB,CAAC;QAClE,cAAc,CAAC,WAAW,GAAG,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;IAC/D,CAAC;AACF,CAAC;AAED;;GAEG;AACH,KAAK,UAAU,aAAa;IAC3B,MAAM,gBAAgB,GAAG,QAAQ,CAAC,aAAa,CAAoB,aAAa,CAAC,CAAC;IAElF,IAAI,gBAAgB,KAAK,IAAI,EAAE,CAAC;QAC/B,gBAAgB,CAAC,gBAAgB,CAAC,OAAO,EAAE,KAAK,IAAI,EAAE;YACrD,MAAM,UAAU,EAAE,CAAC;QACpB,CAAC,CAAC,CAAC;IACJ,CAAC;IAED,MAAM,kBAAkB,EAAE,CAAC;AAC5B,CAAC","sources":["webpack://openfin-web--cloud-interop/../../node_modules/@openfin/core-web/out/api-client.js","webpack://openfin-web--cloud-interop/../../node_modules/@openfin/core-web/out/main-8cad4070.js","webpack://openfin-web--cloud-interop/../../node_modules/@openfin/core-web/out/main-b14f67c9.js","webpack://openfin-web--cloud-interop/../../node_modules/base64-js/index.js","webpack://openfin-web--cloud-interop/../../node_modules/buffer/index.js","webpack://openfin-web--cloud-interop/../../node_modules/events/events.js","webpack://openfin-web--cloud-interop/../../node_modules/ieee754/index.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_DataView.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_Hash.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_ListCache.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_Map.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_MapCache.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_Promise.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_Set.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_SetCache.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_Stack.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_Symbol.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_Uint8Array.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_WeakMap.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_arrayEach.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_arrayFilter.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_arrayLikeKeys.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_arrayPush.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_arraySome.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_assignValue.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_assocIndexOf.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseAssign.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseAssignIn.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseAssignValue.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseClone.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseCreate.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseGetAllKeys.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseGetTag.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseIsArguments.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseIsEqual.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseIsEqualDeep.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseIsMap.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseIsNative.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseIsSet.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseIsTypedArray.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseKeys.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseKeysIn.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseTimes.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseUnary.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_cacheHas.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_cloneArrayBuffer.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_cloneBuffer.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_cloneDataView.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_cloneRegExp.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_cloneSymbol.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_cloneTypedArray.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_copyArray.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_copyObject.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_copySymbols.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_copySymbolsIn.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_coreJsData.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_defineProperty.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_equalArrays.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_equalByTag.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_equalObjects.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_freeGlobal.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_getAllKeys.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_getAllKeysIn.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_getMapData.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_getNative.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_getPrototype.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_getRawTag.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_getSymbols.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_getSymbolsIn.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_getTag.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_getValue.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_hashClear.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_hashDelete.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_hashGet.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_hashHas.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_hashSet.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_initCloneArray.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_initCloneByTag.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_initCloneObject.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_isIndex.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_isKeyable.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_isMasked.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_isPrototype.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_listCacheClear.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_listCacheDelete.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_listCacheGet.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_listCacheHas.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_listCacheSet.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_mapCacheClear.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_mapCacheDelete.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_mapCacheGet.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_mapCacheHas.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_mapCacheSet.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_mapToArray.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_nativeCreate.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_nativeKeys.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_nativeKeysIn.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_nodeUtil.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_objectToString.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_overArg.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_root.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_setCacheAdd.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_setCacheHas.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_setToArray.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_stackClear.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_stackDelete.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_stackGet.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_stackHas.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_stackSet.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_toSource.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/cloneDeep.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/eq.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/isArguments.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/isArray.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/isArrayLike.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/isBuffer.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/isEqual.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/isFunction.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/isLength.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/isMap.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/isObject.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/isObjectLike.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/isSet.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/isTypedArray.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/keys.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/keysIn.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/stubArray.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/stubFalse.js","webpack://openfin-web--cloud-interop/./client/src/platform/api.ts","webpack://openfin-web--cloud-interop/./client/src/platform/settings.ts","webpack://openfin-web--cloud-interop/../../node_modules/uuid/dist/esm-browser/index.js","webpack://openfin-web--cloud-interop/../../node_modules/uuid/dist/esm-browser/md5.js","webpack://openfin-web--cloud-interop/../../node_modules/uuid/dist/esm-browser/nil.js","webpack://openfin-web--cloud-interop/../../node_modules/uuid/dist/esm-browser/parse.js","webpack://openfin-web--cloud-interop/../../node_modules/uuid/dist/esm-browser/regex.js","webpack://openfin-web--cloud-interop/../../node_modules/uuid/dist/esm-browser/rng.js","webpack://openfin-web--cloud-interop/../../node_modules/uuid/dist/esm-browser/sha1.js","webpack://openfin-web--cloud-interop/../../node_modules/uuid/dist/esm-browser/stringify.js","webpack://openfin-web--cloud-interop/../../node_modules/uuid/dist/esm-browser/v1.js","webpack://openfin-web--cloud-interop/../../node_modules/uuid/dist/esm-browser/v3.js","webpack://openfin-web--cloud-interop/../../node_modules/uuid/dist/esm-browser/v35.js","webpack://openfin-web--cloud-interop/../../node_modules/uuid/dist/esm-browser/v4.js","webpack://openfin-web--cloud-interop/../../node_modules/uuid/dist/esm-browser/v5.js","webpack://openfin-web--cloud-interop/../../node_modules/uuid/dist/esm-browser/validate.js","webpack://openfin-web--cloud-interop/../../node_modules/uuid/dist/esm-browser/version.js","webpack://openfin-web--cloud-interop/webpack/bootstrap","webpack://openfin-web--cloud-interop/webpack/runtime/define property getters","webpack://openfin-web--cloud-interop/webpack/runtime/global","webpack://openfin-web--cloud-interop/webpack/runtime/hasOwnProperty shorthand","webpack://openfin-web--cloud-interop/webpack/runtime/make namespace object","webpack://openfin-web--cloud-interop/webpack/runtime/node module decorator","webpack://openfin-web--cloud-interop/./client/src/content/interop-view.ts"],"sourcesContent":["\"use strict\";var e=require(\"./main-8cad4070.js\");require(\"buffer/\"),require(\"uuid\"),require(\"events\"),require(\"lodash/cloneDeep\"),require(\"lodash/isEqual\"),exports.connect=e.connect;\n","\"use strict\";var e=require(\"buffer/\"),t=require(\"events\"),n=require(\"lodash/cloneDeep\"),i=require(\"lodash/isEqual\"),r=require(\"uuid\");const o=(e,t)=>`${t}<${btoa(JSON.stringify(e))}>`;var s=\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof window?window:\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:{},a={},c={},d={},h={};async function l(e){const t=[];for(const n of e){const e=await n();t.push(e)}return t}Object.defineProperty(h,\"__esModule\",{value:!0}),h.promiseMapSerial=h.serial=h.promiseMap=h.promisify=void 0,h.promisify=function(e){return(...t)=>new Promise(((n,i)=>{e(...t,((e,t)=>e?i(e):n(t)))}))},h.promiseMap=async function(e,t){return Promise.all(e.map(t))},h.serial=l,h.promiseMapSerial=async function(e,t){return l(e.map(((e,n,i)=>()=>t(e,n,i))))};var u,p=s&&s.__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},w=s&&s.__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)};Object.defineProperty(d,\"__esModule\",{value:!0}),d.Reply=d.EmitterBase=d.Base=void 0;const y=h;class f{constructor(e){this.isNodeEnvironment=()=>\"node\"===this.wire.environment.type,this.isOpenFinEnvironment=()=>\"openfin\"===this.wire.environment.type,this.isBrowserEnvironment=()=>\"other\"===this.wire.environment.type,this.wire=e}get fin(){return this.wire.getFin()}get me(){return this.wire.me}}d.Base=f;d.EmitterBase=class extends f{constructor(e,t,...n){super(e),this.topic=t,u.set(this,void 0),this.eventNames=()=>this.hasEmitter()?this.getOrCreateEmitter().eventNames():[],this.emit=(e,t,...n)=>!!this.hasEmitter()&&this.getOrCreateEmitter().emit(e,t,...n),this.hasEmitter=()=>this.wire.eventAggregator.has(w(this,u,\"f\")),this.getOrCreateEmitter=()=>this.wire.eventAggregator.getOrCreate(w(this,u,\"f\")),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[],this.listenerCount=e=>this.hasEmitter()?this.getOrCreateEmitter().listenerCount(e):0,this.registerEventListener=async(e,t={},n,i)=>{const r={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e},o=this.getOrCreateEmitter();n(o);try{await this.wire.sendAction(\"subscribe-to-desktop-event\",r)}catch(e){throw i(o),this.deleteEmitterIfNothingRegistered(o),e}},this.deregisterEventListener=async(e,t={})=>{if(this.hasEmitter()){const n={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e};await this.wire.sendAction(\"unsubscribe-to-desktop-event\",n).catch((()=>null));return this.getOrCreateEmitter()}return Promise.resolve()},p(this,u,[t,...n],\"f\"),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[]}async on(e,t,n){return await this.registerEventListener(e,n,(n=>{n.on(e,t)}),(n=>{n.removeListener(e,t)})),this}async addListener(e,t,n){return this.on(e,t,n)}async once(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.once(e,i),n.once(e,t)}),(n=>{n.removeListener(e,i),n.removeListener(e,t)})),this}async prependListener(e,t,n){return await this.registerEventListener(e,n,(n=>{n.prependListener(e,t)}),(n=>{n.removeListener(e,t)})),this}async prependOnceListener(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.prependOnceListener(e,t),n.once(e,i)}),(n=>{n.removeListener(e,t),n.removeListener(e,i)})),this}async removeListener(e,t,n){const i=await this.deregisterEventListener(e,n);return i&&(i.removeListener(e,t),this.deleteEmitterIfNothingRegistered(i)),this}async deregisterAllListeners(e){const t={...this.identity,type:e,topic:this.topic};if(this.hasEmitter()){const e=this.getOrCreateEmitter(),n=e.listenerCount(t.type),i=[];for(let e=0;enull)));return await Promise.all(i),e}}async removeAllListeners(e){const t=async e=>{const t=await this.deregisterAllListeners(e);t&&(t.removeAllListeners(e),this.deleteEmitterIfNothingRegistered(t))};if(e)await t(e);else if(this.hasEmitter()){const e=this.getOrCreateEmitter().eventNames();await(0,y.promiseMap)(e,t)}return this}deleteEmitterIfNothingRegistered(e){0===e.eventNames().length&&this.wire.eventAggregator.delete(w(this,u,\"f\"))}},u=new WeakMap;d.Reply=class{};var g={};Object.defineProperty(g,\"__esModule\",{value:!0});var m=g.RuntimeError=g.NotSupportedError=g.NotImplementedError=g.NoAckError=g.DuplicateCorrelationError=g.UnexpectedActionError=g.DisconnectedError=void 0;class v extends Error{constructor(e){super(`Expected websocket state OPEN but found ${e}`),this.readyState=e}}g.DisconnectedError=v;class C extends Error{}g.UnexpectedActionError=C;class b extends Error{}g.DuplicateCorrelationError=b;class I extends Error{}g.NoAckError=I;class E extends Error{}g.NotImplementedError=E;class x extends Error{}g.NotSupportedError=x;class A extends Error{constructor(e){const{message:t,name:n,stack:i,...r}=e;super(t),this.name=n||\"Error\",this.stack=i??this.toString(),Object.keys(r).forEach((e=>{this[e]=r[e]}))}}class P extends Error{static getCallSite(e=0){const t=Error.stackTraceLimit,n=e+1;Error.stackTraceLimit=t+n;const i=Error.prepareStackTrace;Error.prepareStackTrace=(e,t)=>t;const r=(new Error).stack?.slice(n)??[];return Error.prepareStackTrace=i,Error.stackTraceLimit=t,r}static prepareStackTrace(e,t){if(\"function\"==typeof Error.prepareStackTrace)return Error.prepareStackTrace(e,t);let n=\"\";n+=e.name||\"Error\",n+=`: ${e.message||\"\"}`;for(const e of t)n+=`\\n at ${e.toString()}`;return n}constructor(e,t){const{reason:n,error:i}=e;super(n),this.name=\"RuntimeError\",i?.stack&&(this.cause=new A(i)),t&&(this.stack=P.prepareStackTrace(this,t))}}m=g.RuntimeError=P;var M={},_={},O={};Object.defineProperty(O,\"__esModule\",{value:!0}),O.validateIdentity=void 0,O.validateIdentity=function(e){let t;return\"object\"==typeof e&&\"string\"==typeof e.uuid||(t=\"Not a valid identity object\"),t};var S={},R={},F={},j={},k={},L={},T={};Object.defineProperty(T,\"__esModule\",{value:!0}),T.handleDeprecatedWarnings=void 0;var $;T.handleDeprecatedWarnings=e=>{(e.contentNavigation?.whitelist||e.contentNavigation?.blacklist||e.contentRedirect?.whitelist||e.contentRedirect?.blacklist)&&console.warn(\"The properties 'whitelist' and 'blacklist' have been marked as deprecated and will be removed in a future version. Please use 'allowlist' and 'denylist'.\")};var B={},G={};Object.defineProperty(G,\"__esModule\",{value:!0}),G.AsyncRetryableLazy=W=G.Lazy=void 0;var W=G.Lazy=class{constructor(e){this.producerFn=e}getValue(){return this.value||(this.value=this.producerFn()),this.value}};G.AsyncRetryableLazy=class{constructor(e){this.producerFn=e}async getValue(){return this.promise||(this.promise=this.producerFn().catch((e=>{throw delete this.promise,e}))),this.promise}};var H={};Object.defineProperty(H,\"__esModule\",{value:!0}),H.WebContents=void 0;const N=d;class D extends N.EmitterBase{constructor(e,t,n){super(e,n,t.uuid,t.name),this.identity=t,this.entityType=n}capturePage(e){return this.wire.sendAction(\"capture-page\",{options:e,...this.identity}).then((({payload:e})=>e.data))}executeJavaScript(e){return this.wire.sendAction(\"execute-javascript-in-window\",{...this.identity,code:e}).then((({payload:e})=>e.data))}getZoomLevel(){return this.wire.sendAction(\"get-zoom-level\",this.identity).then((({payload:e})=>e.data))}setZoomLevel(e){return this.wire.sendAction(\"set-zoom-level\",{...this.identity,level:e}).then((()=>{}))}navigate(e){return this.wire.sendAction(\"navigate-window\",{...this.identity,url:e}).then((()=>{}))}navigateBack(){return this.wire.sendAction(\"navigate-window-back\",{...this.identity}).then((()=>{}))}async navigateForward(){await this.wire.sendAction(\"navigate-window-forward\",{...this.identity})}stopNavigation(){return this.wire.sendAction(\"stop-window-navigation\",{...this.identity}).then((()=>{}))}reload(e=!1){return this.wire.sendAction(\"reload-window\",{ignoreCache:e,...this.identity}).then((()=>{}))}print(e={}){return this.wire.sendAction(\"print\",{...this.identity,options:e}).then((()=>{}))}findInPage(e,t){return this.wire.sendAction(\"find-in-page\",{...this.identity,searchTerm:e,options:t}).then((({payload:e})=>e.data))}stopFindInPage(e){return this.wire.sendAction(\"stop-find-in-page\",{...this.identity,action:e}).then((()=>{}))}getPrinters(){return this.wire.sendAction(\"get-printers\",{...this.identity}).then((({payload:e})=>e.data))}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){await this.wire.sendAction(\"focus-window\",{emitSynthFocused:e,...this.identity})}async showDeveloperTools(){await this.wire.sendAction(\"show-developer-tools\",this.identity)}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction(\"get-process-info\",this.identity);return e}async getSharedWorkers(){return this.wire.sendAction(\"get-shared-workers\",this.identity).then((({payload:e})=>e.data))}async inspectSharedWorker(){await this.wire.sendAction(\"inspect-shared-worker\",{...this.identity})}async inspectSharedWorkerById(e){await this.wire.sendAction(\"inspect-shared-worker-by-id\",{...this.identity,workerId:e})}async inspectServiceWorker(){await this.wire.sendAction(\"inspect-service-worker\",{...this.identity})}async showPopupWindow(e){if(this.wire.sendAction(`${this.entityType}-show-popup-window`,this.identity).catch((()=>{})),e?.onPopupReady){const t=async({popupName:t})=>{try{const n=this.fin.Window.wrapSync({uuid:this.fin.me.uuid,name:t});await e.onPopupReady(n)}catch(e){throw new Error(`Something went wrong during onPopupReady execution: ${e}`)}};await this.once(\"popup-ready\",t)}const{payload:t}=await this.wire.sendAction(\"try-create-popup-window\",{options:{...e,hasResultCallback:!!e?.onPopupResult,hasReadyCallback:!!e?.onPopupReady},...this.identity}),{data:{willOpen:n,options:i}}=t;n&&await this.fin.Window.create(i.initialOptions);if(e?.onPopupResult){const t=async t=>{await e.onPopupResult((e=>{const{name:t,uuid:n,result:i,data:r}=e,o={identity:{name:t,uuid:n},result:i};return r&&(o.data=r),o})(t))},n=async()=>{await this.removeListener(\"popup-result\",t)};await this.on(\"popup-result\",t),await this.once(\"popup-teardown\",n)}const{payload:r}=await this.wire.sendAction(\"show-popup-window\",{options:i,...this.identity});return r.data}}var U,V,z,K,q;function J(){return V||(V=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(function(){if($)return L;$=1,Object.defineProperty(L,\"__esModule\",{value:!0}),L.ViewModule=void 0;const e=d,t=O,n=J(),i=T;class r extends e.Base{async create(e){const{uuid:t}=this.wire.me;if(!e.name||\"string\"!=typeof e.name)throw new Error(\"Please provide a name property as a string in order to create a View.\");return(0,i.handleDeprecatedWarnings)(e),this.wire.environment.childViews?await this.wire.environment.createChildContent({entityType:\"view\",options:{...e,uuid:t}}):await this.wire.sendAction(\"create-view\",{...e,uuid:t}),this.wrapSync({uuid:t,name:e.name})}async wrap(e){this.wire.sendAction(\"view-wrap\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}wrapSync(e){this.wire.sendAction(\"view-wrap-sync\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}getCurrent(){if(this.wire.sendAction(\"view-get-current\").catch((e=>{})),!this.wire.me.isView)throw new Error(\"You are not in a View context\");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction(\"view-get-current-sync\").catch((e=>{})),!this.wire.me.isView)throw new Error(\"You are not in a View context\");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return L.ViewModule=r,L}(),e),n(function(){if(U)return B;var e;U=1,Object.defineProperty(B,\"__esModule\",{value:!0}),B.View=void 0;const t=g,n=G,i=H,r=ie();class o extends i.WebContents{constructor(i,o){super(i,o,\"view\"),this.identity=o,e.set(this,new n.Lazy((()=>this.fin.Platform.wrapSync(this.identity).getClient()))),this.attach=async e=>{await this.wire.sendAction(\"attach-view\",{target:e,...this.identity})},this.destroy=async()=>{await this.wire.sendAction(\"destroy-view\",{...this.identity})},this.show=async()=>{await this.wire.sendAction(\"show-view\",{...this.identity})},this.showAt=async(e,t={})=>{await this.wire.sendAction(\"show-view-at\",{bounds:e,...this.identity,options:t})},this.bringToFront=async()=>{await this.wire.sendAction(\"bring-view-to-front\",{...this.identity})},this.hide=async()=>{await this.wire.sendAction(\"hide-view\",{...this.identity})},this.setBounds=async e=>{await this.wire.sendAction(\"set-view-bounds\",{bounds:e,...this.identity})},this.getBounds=async()=>(await this.wire.sendAction(\"get-view-bounds\",{...this.identity})).payload.data,this.getInfo=async()=>(await this.wire.sendAction(\"get-view-info\",{...this.identity})).payload.data,this.getParentLayout=async()=>(this.wire.sendAction(\"view-get-parent-layout\",{...this.identity}).catch((()=>{})),this.fin.Platform.Layout.getLayoutByViewIdentity(this.identity)),this.getOptions=async()=>this.wire.sendAction(\"get-view-options\",{...this.identity}).then((({payload:e})=>e.data)),this.updateOptions=async e=>this.wire.sendAction(\"update-view-options\",{options:e,...this.identity}).then((()=>{})),this.getCurrentWindow=async()=>{const{payload:{data:e}}=await this.wire.sendAction(\"get-view-window\",{...this.identity});return new r._Window(this.wire,e)},this.getCurrentStack=async()=>{this.wire.sendAction(\"view-get-current-stack\").catch((()=>{}));try{return(await this.getParentLayout()).getStackByViewIdentity(this.identity)}catch(e){throw new t.RuntimeError({reason:\"This view does not belong to a stack.\",error:e})}},this.triggerBeforeUnload=async()=>(await this.wire.sendAction(\"trigger-before-unload\",{...this.identity})).payload.data,this.bindToElement=async e=>{if(!e)throw new Error(\"Element not found.\");return this.wire.environment.observeBounds(e,(async e=>this.setBounds(e)))}}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){const t=await this.getCurrentWindow();await t.focusedWebViewWasChanged(),await super.focus({emitSynthFocused:e})}}return B.View=o,e=new WeakMap,B}(),e)}(k)),k}function Y(){if(z)return j;z=1,Object.defineProperty(j,\"__esModule\",{value:!0}),j.Application=void 0;const e=d,t=ie(),n=J();class i extends e.EmitterBase{constructor(e,n){super(e,\"application\",n.uuid),this.identity=n,this.window=new t._Window(this.wire,{uuid:this.identity.uuid,name:this.identity.uuid})}windowListFromIdentityList(e){const n=[];return e.forEach((e=>{n.push(new t._Window(this.wire,{uuid:e.uuid,name:e.name}))})),n}isRunning(){return this.wire.sendAction(\"is-application-running\",this.identity).then((({payload:e})=>e.data))}async quit(e=!1){try{await this._close(e),await this.wire.sendAction(\"destroy-application\",{force:e,...this.identity})}catch(e){if(![\"Remote connection has closed\",\"Could not locate the requested application\"].some((t=>e.message.includes(t))))throw e}}async _close(e=!1){try{await this.wire.sendAction(\"close-application\",{force:e,...this.identity})}catch(e){if(!e.message.includes(\"Remote connection has closed\"))throw e}}close(e=!1){return console.warn(\"Deprecation Warning: Application.close is deprecated Please use Application.quit\"),this.wire.sendAction(\"application-close\",this.identity).catch((e=>{})),this._close(e)}getChildWindows(){return this.wire.sendAction(\"get-child-windows\",this.identity).then((({payload:e})=>{const t=[];return e.data.forEach((e=>{t.push({uuid:this.identity.uuid,name:e})})),this.windowListFromIdentityList(t)}))}getManifest(){return this.wire.sendAction(\"get-application-manifest\",this.identity).then((({payload:e})=>e.data))}getParentUuid(){return this.wire.sendAction(\"get-parent-application\",this.identity).then((({payload:e})=>e.data))}getShortcuts(){return this.wire.sendAction(\"get-shortcuts\",this.identity).then((({payload:e})=>e.data))}async getViews(){const{payload:e}=await this.wire.sendAction(\"application-get-views\",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}getZoomLevel(){return this.wire.sendAction(\"get-application-zoom-level\",this.identity).then((({payload:e})=>e.data))}getWindow(){return this.wire.sendAction(\"application-get-window\",this.identity).catch((e=>{})),Promise.resolve(this.window)}registerUser(e,t){return this.wire.sendAction(\"register-user\",{userName:e,appName:t,...this.identity}).then((()=>{}))}removeTrayIcon(){return this.wire.sendAction(\"remove-tray-icon\",this.identity).then((()=>{}))}restart(){return this.wire.sendAction(\"restart-application\",this.identity).then((()=>{}))}run(){return console.warn(\"Deprecation Warning: Application.run is deprecated Please use fin.Application.start\"),this.wire.sendAction(\"application-run\",this.identity).catch((e=>{})),this._run()}_run(e={}){return this.wire.sendAction(\"run-application\",{manifestUrl:this._manifestUrl,opts:e,...this.identity}).then((()=>{}))}scheduleRestart(){return this.wire.sendAction(\"relaunch-on-close\",this.identity).then((()=>{}))}async sendApplicationLog(){const{payload:e}=await this.wire.sendAction(\"send-application-log\",this.identity);return e.data}async setJumpList(e){await this.wire.sendAction(\"set-jump-list\",{config:e,...this.identity})}setTrayIcon(e){return this.wire.sendAction(\"set-tray-icon\",{enabledIcon:e,...this.identity}).then((()=>{}))}setShortcuts(e){return this.wire.sendAction(\"set-shortcuts\",{data:e,...this.identity}).then((()=>{}))}async setShortcutQueryParams(e){await this.wire.sendAction(\"set-shortcut-query-args\",{data:e,...this.identity})}setZoomLevel(e){return this.wire.sendAction(\"set-application-zoom-level\",{level:e,...this.identity}).then((()=>{}))}async setAppLogUsername(e){await this.wire.sendAction(\"set-app-log-username\",{data:e,...this.identity})}getTrayIconInfo(){return this.wire.sendAction(\"get-tray-icon-info\",this.identity).then((({payload:e})=>e.data))}hasTrayIcon(){return this.wire.sendAction(\"has-tray-icon\",this.identity).then((({payload:e})=>e.data))}terminate(){return this.wire.sendAction(\"terminate-application\",this.identity).then((()=>{}))}wait(){return this.wire.sendAction(\"wait-for-hung-application\",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction(\"get-info\",this.identity).then((({payload:e})=>e.data))}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction(\"application-get-process-info\",this.identity);return e}async setFileDownloadLocation(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t};await this.wire.sendAction(\"set-file-download-location\",{...n,downloadLocation:e})}async getFileDownloadLocation(){const{payload:{data:e}}=await this.wire.sendAction(\"get-file-download-location\",this.identity);return e}async showTrayIconPopupMenu(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t},{payload:i}=await this.wire.sendAction(\"show-tray-icon-popup-menu\",{...n,options:e});return i.data}async closeTrayIconPopupMenu(){const{name:e}=this.wire.me,t={uuid:this.identity.uuid,name:e};await this.wire.sendAction(\"close-tray-icon-popup-menu\",{...t})}}return j.Application=i,j}function Z(){return q||(q=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(function(){if(K)return F;K=1,Object.defineProperty(F,\"__esModule\",{value:!0}),F.ApplicationModule=void 0;const e=d,t=O,n=Y();class i extends e.Base{async wrap(e){this.wire.sendAction(\"wrap-application\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}wrapSync(e){this.wire.sendAction(\"wrap-application-sync\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}async _create(e){return void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&void 0===e.isPlatformController&&(e.autoShow=!0),await this.wire.sendAction(\"create-application\",e),this.wrap({uuid:e.uuid})}create(e){return console.warn(\"Deprecation Warning: fin.Application.create is deprecated. Please use fin.Application.start\"),this.wire.sendAction(\"application-create\").catch((e=>{})),this._create(e)}async start(e){this.wire.sendAction(\"start-application\").catch((e=>{}));const t=await this._create(e);return await this.wire.sendAction(\"run-application\",{uuid:e.uuid}),t}async startManyManifests(e,t){return this.wire.sendAction(\"run-applications\",{applications:e,opts:t}).then((()=>{}))}getCurrent(){return this.wire.sendAction(\"get-current-application\").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction(\"get-current-application-sync\").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}async startFromManifest(e,t){this.wire.sendAction(\"application-start-from-manifest\").catch((e=>{}));const n=await this._createFromManifest(e);return await n._run(t),n}createFromManifest(e){return console.warn(\"Deprecation Warning: fin.Application.createFromManifest is deprecated. Please use fin.Application.startFromManifest\"),this.wire.sendAction(\"application-create-from-manifest\").catch((e=>{})),this._createFromManifest(e)}_createFromManifest(e){return this.wire.sendAction(\"get-application-manifest\",{manifestUrl:e}).then((({payload:e})=>{const t=e.data.platform?e.data.platform.uuid:e.data.startup_app.uuid;return this.wrap({uuid:t})})).then((t=>(t._manifestUrl=e,t)))}}return F.ApplicationModule=i,F}(),e),n(Y(),e)}(R)),R}H.WebContents=D;var Q={};Object.defineProperty(Q,\"__esModule\",{value:!0}),Q.promisifySubscription=void 0;var X,ee,te;function ne(){if(X)return S;X=1,Object.defineProperty(S,\"__esModule\",{value:!0}),S._Window=void 0;const e=Z(),t=H,n=J(),i=T,r=Q;class o extends t.WebContents{constructor(e,t){super(e,t,\"window\")}async createWindow(e){this.wire.sendAction(\"window-create-window\",this.identity).catch((e=>{}));const t=await(0,r.promisifySubscription)(this,\"fire-constructor-callback\");void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&(e.autoShow=!0),(0,i.handleDeprecatedWarnings)(e);const n=this.wire.environment.createChildContent({entityType:\"window\",options:e}),[o]=await Promise.all([t.getValue(),n]);let s;const{success:a}=o,c=o.data,{message:d}=c;s=a?{httpResponseCode:c.httpResponseCode,apiInjected:c.apiInjected}:{message:c.message,networkErrorCode:c.networkErrorCode,stack:c.stack};const h={message:d,cbPayload:s,success:a};try{this.getWebWindow().fin.__internal_.openerSuccessCBCalled()}catch(e){}return h.success?this:Promise.reject(h)}getAllFrames(){return this.wire.sendAction(\"get-all-frames\",this.identity).then((({payload:e})=>e.data))}getBounds(){return this.wire.sendAction(\"get-window-bounds\",this.identity).then((({payload:e})=>e.data))}center(){return this.wire.sendAction(\"center-window\",this.identity).then((()=>{}))}blur(){return this.wire.sendAction(\"blur-window\",this.identity).then((()=>{}))}bringToFront(){return this.wire.sendAction(\"bring-window-to-front\",this.identity).then((()=>{}))}animate(e,t){return this.wire.sendAction(\"animate-window\",{transitions:e,options:t,...this.identity}).then((()=>{}))}hide(){return this.wire.sendAction(\"hide-window\",this.identity).then((()=>{}))}close(e=!1){return this.wire.sendAction(\"close-window\",{force:e,...this.identity}).then((()=>{Object.setPrototypeOf(this,null)}))}focusedWebViewWasChanged(){return this.wire.sendAction(\"focused-webview-changed\",this.identity).then((()=>{}))}getNativeId(){return this.wire.sendAction(\"get-window-native-id\",this.identity).then((({payload:e})=>e.data))}async getCurrentViews(){const{payload:e}=await this.wire.sendAction(\"window-get-views\",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}disableFrame(){return console.warn(\"Function is deprecated; use disableUserMovement instead.\"),this.wire.sendAction(\"disable-window-frame\",this.identity).then((()=>{}))}disableUserMovement(){return this.wire.sendAction(\"disable-window-frame\",this.identity).then((()=>{}))}enableFrame(){return console.warn(\"Function is deprecated; use enableUserMovement instead.\"),this.wire.sendAction(\"enable-window-frame\",this.identity).then((()=>{}))}enableUserMovement(){return this.wire.sendAction(\"enable-window-frame\",this.identity).then((()=>{}))}flash(){return this.wire.sendAction(\"flash-window\",this.identity).then((()=>{}))}stopFlashing(){return this.wire.sendAction(\"stop-flash-window\",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction(\"get-window-info\",this.identity).then((({payload:e})=>e.data))}async getLayout(e){this.wire.sendAction(\"window-get-layout\",this.identity).catch((e=>{}));const t=await this.getOptions();if(!t.layout&&!t.layoutSnapshot)throw new Error(\"Window does not have a Layout\");return this.fin.Platform.Layout.wrap(e??this.identity)}getOptions(){return this.wire.sendAction(\"get-window-options\",this.identity).then((({payload:e})=>e.data))}getParentApplication(){return this.wire.sendAction(\"window-get-parent-application\",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity))}getParentWindow(){return this.wire.sendAction(\"window-get-parent-window\",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity)).then((e=>e.getWindow()))}async getSnapshot(e){const t={area:e,...this.identity};console.warn(\"Window.getSnapshot has been deprecated, please use Window.capturePage\");return(await this.wire.sendAction(\"get-window-snapshot\",t)).payload.data}getState(){return this.wire.sendAction(\"get-window-state\",this.identity).then((({payload:e})=>e.data))}getWebWindow(){return this.wire.sendAction(\"window-get-web-window\",this.identity).catch((e=>{})),this.wire.environment.getWebWindow(this.identity)}isMainWindow(){return this.wire.sendAction(\"window-is-main-window\",this.identity).catch((e=>{})),this.me.uuid===this.me.name}isShowing(){return this.wire.sendAction(\"is-window-showing\",this.identity).then((({payload:e})=>e.data))}maximize(){return this.wire.sendAction(\"maximize-window\",this.identity).then((()=>{}))}minimize(){return this.wire.sendAction(\"minimize-window\",this.identity).then((()=>{}))}moveBy(e,t,n){return this.wire.sendAction(\"move-window-by\",{deltaLeft:e,deltaTop:t,positioningOptions:n,...this.identity}).then((()=>{}))}moveTo(e,t,n){return this.wire.sendAction(\"move-window\",{left:e,top:t,positioningOptions:n,...this.identity}).then((()=>{}))}resizeBy(e,t,n,i){return this.wire.sendAction(\"resize-window-by\",{deltaWidth:Math.floor(e),deltaHeight:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}resizeTo(e,t,n,i){return this.wire.sendAction(\"resize-window\",{width:Math.floor(e),height:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}restore(){return this.wire.sendAction(\"restore-window\",this.identity).then((()=>{}))}setAsForeground(){return this.wire.sendAction(\"set-foreground-window\",this.identity).then((()=>{}))}setBounds(e,t){return this.wire.sendAction(\"set-window-bounds\",{...e,...this.identity,positioningOptions:t}).then((()=>{}))}show(e=!1){return this.wire.sendAction(\"show-window\",{force:e,...this.identity}).then((()=>{}))}showAt(e,t,n=!1){return this.wire.sendAction(\"show-at-window\",{force:n,left:Math.floor(e),top:Math.floor(t),...this.identity}).then((()=>{}))}updateOptions(e){return this.wire.sendAction(\"update-window-options\",{options:e,...this.identity}).then((()=>{}))}authenticate(e,t){return this.wire.sendAction(\"window-authenticate\",{userName:e,password:t,...this.identity}).then((()=>{}))}async showPopupMenu(e){const{payload:t}=await this.wire.sendAction(\"show-popup-menu\",{options:e,...this.identity});return t.data}async closePopupMenu(){return this.wire.sendAction(\"close-popup-menu\",{...this.identity}).then((()=>{}))}async dispatchPopupResult(e){this.wire.sendAction(\"window-dispatch-popup-result\",this.identity).catch((e=>{})),await this.wire.sendAction(\"dispatch-popup-result\",{data:e,...this.identity})}async print(e={content:\"self\"}){switch(e.content){case void 0:case\"self\":return super.print(e);case\"screenshot\":return this.wire.sendAction(\"print-screenshot\",this.identity).then((()=>{}));case\"views\":return this.wire.sendAction(\"print-views\",{...this.identity,options:e}).then((()=>{}));default:return}}}return S._Window=o,S}function ie(){return te||(te=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(function(){if(ee)return _;ee=1,Object.defineProperty(_,\"__esModule\",{value:!0}),_._WindowModule=void 0;const e=d,t=O,n=ne();class i extends e.Base{async wrap(e){this.wire.sendAction(\"window-wrap\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}wrapSync(e){this.wire.sendAction(\"window-wrap-sync\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}create(e){return this.wire.sendAction(\"create-window\").catch((e=>{})),new n._Window(this.wire,{uuid:this.me.uuid,name:e.name}).createWindow(e)}getCurrent(){if(this.wire.sendAction(\"get-current-window\").catch((e=>{})),!this.wire.me.isWindow)throw new Error(\"You are not in a Window context\");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction(\"get-current-window-sync\").catch((e=>{})),!this.wire.me.isWindow)throw new Error(\"You are not in a Window context\");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return _._WindowModule=i,_}(),e),n(ne(),e)}(M)),M}Q.promisifySubscription=async(e,t,n=(()=>!0),i)=>{let r,o,s;const a=new Promise(((e,t)=>{r=e,o=t})),c=e=>{n(e)&&(clearTimeout(s),r(e))};return await e.on(t,c),i&&(s=setTimeout((()=>o(new Error(\"event timed out\"))),i)),a.finally((()=>{e.removeListener(t,c).catch((()=>null))})),{getValue:()=>a}},Object.defineProperty(c,\"__esModule\",{value:!0}),c.System=void 0;const re=d,oe=g,se=ie(),ae=t;class ce extends re.EmitterBase{constructor(e){super(e,\"system\")}sendExternalProcessRequest(e,t){return new Promise(((n,i)=>{const r=\"external-process-exited\";let o,s,a,c;\"function\"==typeof t.listener&&(a=e=>{const n=e||{};s={topic:\"exited\",uuid:n.processUuid||\"\",exitCode:n.exitCode||0},o===e.processUuid&&(t.listener(s),c.removeListener(r,a))},this.wire.me.name||(this.wire.me.name=this.wire.me.uuid),c=new se._Window(this.wire,this.wire.me),c.on(r,a)),this.wire.sendAction(e,t).then((({payload:e})=>{o=e.data.uuid,n(e.data),s&&o===s.uuid&&(t.listener(s),c.removeListener(r,a))})).catch((e=>{c&&c.removeListener(r,a),i(e)}))}))}getVersion(){return this.wire.sendAction(\"get-version\").then((({payload:e})=>e.data))}clearCache(e){return this.wire.sendAction(\"clear-cache\",e).then((()=>{}))}deleteCacheOnExit(){return this.wire.sendAction(\"delete-cache-request\").then((()=>{}))}exit(){return this.wire.sendAction(\"exit-desktop\").then((()=>{}))}async fetchManifest(e){const{payload:{data:t}}=await this.wire.sendAction(\"fetch-manifest\",{manifestUrl:e});return t}flushCookieStore(){return this.wire.sendAction(\"flush-cookie-store\").then((()=>{}))}getAllWindows(){return this.wire.sendAction(\"get-all-windows\").then((({payload:e})=>e.data))}getAllApplications(){return this.wire.sendAction(\"get-all-applications\").then((({payload:e})=>e.data))}getCommandLineArguments(){return this.wire.sendAction(\"get-command-line-arguments\").then((({payload:e})=>e.data))}async getCrashReporterState(){const{payload:{data:{diagnosticMode:e,isRunning:t}}}=await this.wire.sendAction(\"get-crash-reporter-state\");return console.warn(\"diagnosticMode property is deprecated. It will be removed in a future version\"),{diagnosticMode:e,diagnosticsMode:e,isRunning:t}}async startCrashReporter(e){const t=e,n={...t,diagnosticMode:t.diagnosticsMode||t.diagnosticMode},{payload:{data:{diagnosticMode:i,isRunning:r}}}=await this.wire.sendAction(\"start-crash-reporter\",n);return{diagnosticMode:i,diagnosticsMode:i,isRunning:r}}getUniqueUserId(){return this.wire.sendAction(\"get-unique-user-id\").then((({payload:e})=>e.data))}getEntityInfo(e,t){return this.wire.sendAction(\"get-entity-info\",{uuid:e,name:t}).then((({payload:e})=>e.data))}getEnvironmentVariable(e){return this.wire.sendAction(\"get-environment-variable\",{environmentVariables:e}).then((({payload:e})=>e.data))}getFocusedWindow(){return this.wire.sendAction(\"get-focused-window\").then((({payload:e})=>e.data))}async isAppCertified(e){const{payload:{data:{certifiedInfo:t}}}=await this.wire.sendAction(\"is-app-certified\",{manifestUrl:e});return t}getInstalledRuntimes(){return this.wire.sendAction(\"get-installed-runtimes\").then((({payload:e})=>e.data.runtimes))}async getInstalledApps(){const{payload:{data:{installedApps:e}}}=await this.wire.sendAction(\"get-installed-apps\");return e}getLog(e){return this.wire.sendAction(\"view-log\",e).then((({payload:e})=>e.data))}getMachineId(){return this.wire.sendAction(\"get-machine-id\").then((({payload:e})=>e.data))}getMinLogLevel(){return this.wire.sendAction(\"get-min-log-level\").then((({payload:e})=>e.data))}getLogList(){return this.wire.sendAction(\"list-logs\").then((({payload:e})=>e.data))}getMonitorInfo(){return this.wire.sendAction(\"get-monitor-info\").then((({payload:e})=>e.data))}getMousePosition(){return this.wire.sendAction(\"get-mouse-position\").then((({payload:e})=>e.data))}getProcessList(){return console.warn(\"System.getProcessList has been deprecated. Please consider using our new process APIs: Window.getProcessInfo, View.getProcessInfo, Application.getProcessInfo, System.getAllProcessInfo\"),this.wire.sendAction(\"process-snapshot\").then((({payload:e})=>e.data))}async getAllProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction(\"get-all-process-info\",this.identity);return e}getProxySettings(){return this.wire.sendAction(\"get-proxy-settings\").then((({payload:e})=>e.data))}getRuntimeInfo(){return this.wire.sendAction(\"get-runtime-info\").then((({payload:e})=>e.data))}getRvmInfo(){return this.wire.sendAction(\"get-rvm-info\").then((({payload:e})=>e.data))}getHostSpecs(){return this.wire.sendAction(\"get-host-specs\").then((({payload:e})=>e.data))}getOSInfo(){return this.wire.sendAction(\"get-os-info\").then((({payload:e})=>e.data))}launchExternalProcess(e){return this.sendExternalProcessRequest(\"launch-external-process\",e)}monitorExternalProcess(e){return this.sendExternalProcessRequest(\"monitor-external-process\",e)}log(e,t){return this.wire.sendAction(\"write-to-log\",{level:e,message:t}).then((()=>{}))}openUrlWithBrowser(e){return this.wire.sendAction(\"open-url-with-browser\",{url:e}).then((()=>{}))}async registerCustomProtocol(e){if(\"object\"!=typeof e)throw new Error(\"Must provide an object with a `protocolName` property having a string value.\");await this.wire.sendAction(\"register-custom-protocol\",e)}async unregisterCustomProtocol(e){await this.wire.sendAction(\"unregister-custom-protocol\",{protocolName:e})}async getCustomProtocolState(e){return this.wire.sendAction(\"get-custom-protocol-state\",{protocolName:e}).then((({payload:e})=>e.data))}releaseExternalProcess(e){return this.wire.sendAction(\"release-external-process\",{uuid:e}).then((()=>{}))}showDeveloperTools(e){return this.wire.sendAction(\"show-developer-tools\",e).then((()=>{}))}terminateExternalProcess(e){return this.wire.sendAction(\"terminate-external-process\",e).then((()=>{}))}updateProxySettings(e){return this.wire.sendAction(\"update-proxy\",e).then((()=>{}))}async downloadAsset(e,t){const n=()=>{};let i=n,r=n;const o=new Promise(((e,t)=>{i=e,r=t}));if(\"openfin\"!==this.wire.environment.type)throw new oe.NotSupportedError(\"downloadAsset only supported in an OpenFin Render process\");const s=oe.RuntimeError.getCallSite(),a=this.wire.environment.getNextMessageId().toString(),c=`asset-download-progress-${a}`,d=`asset-download-error-${a}`,h=`asset-download-complete-${a}`,l=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},u=()=>{this.removeListener(c,l)};await Promise.all([this.on(c,l),this.once(d,(e=>{u();const{reason:t,err:n}=e;r(new oe.RuntimeError({reason:t,error:n},s))})),this.once(h,(()=>{u(),i()}))]);const p=Object.assign(e,{downloadId:a});return await this.wire.sendAction(\"download-asset\",p).catch((e=>{throw u(),e})),o}downloadRuntime(e,t){const n=oe.RuntimeError.getCallSite();return new Promise(((i,r)=>{if(\"openfin\"!==this.wire.environment.type)return void r(new oe.NotSupportedError(\"downloadRuntime only supported in an OpenFin Render process\"));const o=this.wire.environment.getNextMessageId().toString(),s=`runtime-download-progress-${o}`,a=`runtime-download-error-${o}`,c=`runtime-download-complete-${o}`,d=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},h=()=>{this.removeListener(s,d)};this.on(s,d),this.once(a,(e=>{h();const{reason:t,err:i}=e;r(new oe.RuntimeError({reason:t,error:i},n))})),this.once(c,(()=>{h(),i()}));const l=Object.assign(e,{downloadId:o});this.wire.sendAction(\"download-runtime\",l).catch((e=>{h(),r(e)}))}))}downloadPreloadScripts(e){return this.wire.sendAction(\"download-preload-scripts\",{scripts:e}).then((({payload:e})=>e.data))}getAllExternalApplications(){return this.wire.sendAction(\"get-all-external-applications\").then((({payload:e})=>e.data))}getAppAssetInfo(e){return this.wire.sendAction(\"get-app-asset-info\",e).then((({payload:e})=>e.data))}getCookies(e){const t=this.wire.environment.getUrl(),n=Object.assign(e,{url:t});return this.wire.sendAction(\"get-cookies\",n).then((({payload:e})=>e.data))}setMinLogLevel(e){return this.wire.sendAction(\"set-min-log-level\",{level:e}).then((()=>{}))}resolveUuid(e){return this.wire.sendAction(\"resolve-uuid\",{entityKey:e}).then((({payload:e})=>e.data))}executeOnRemote(e,t){return t.requestingIdentity=e,this.wire.ferryAction(t)}readRegistryValue(e,t,n){return this.wire.sendAction(\"read-registry-value\",{rootKey:e,subkey:t,value:n}).then((({payload:e})=>e.data))}registerExternalConnection(e){return this.wire.sendAction(\"register-external-connection\",{uuid:e}).then((({payload:e})=>e.data))}async getServiceConfiguration(e){if(\"string\"!=typeof e.name)throw new Error(\"Must provide an object with a `name` property having a string value\");const{name:t}=e;return this.wire.sendAction(\"get-service-configuration\",{name:t}).then((({payload:e})=>e.data))}async getSystemAppConfig(e){if(\"string\"!=typeof e)throw new Error(\"Must provide a string value for name of system app\");return this.wire.sendAction(\"get-system-app-configuration\",{name:e}).then((({payload:e})=>e.data))}async registerShutdownHandler(e){this.wire.sendAction(\"system-register-shutdown-handler\").catch((e=>{}));const{uuid:t,name:n}=this.wire.me;this.on(\"system-shutdown\",(i=>{e({proceed:()=>{this.wire.environment.raiseEvent(\"application/system-shutdown-handled\",{uuid:t,name:n,topic:\"application\"})}})}))}runRvmHealthCheck(){return this.wire.sendAction(\"run-rvm-health-check\").then((({payload:e})=>e.data))}async launchManifest(e,t={}){const{subscribe:n,...i}=t,r=i;if(n){const e=new ae.EventEmitter;n(e);const t=\"app-version-progress\",i=\"runtime-status\",o=\"app-version-complete\",s=\"app-version-error\",a=this.wire.environment.getNextMessageId().toString();r.appVersionId=a;const c=[o,t,i,s],d=e=>{const{appVersionId:t,topic:n,type:i,...r}=e;return{...r,type:c.find((e=>i.includes(e)))}},h=t=>{const n=d(t);e.emit(n.type,n)},l=()=>{this.removeListener(`${t}.${a}`,h),this.removeListener(`${i}.${a}`,h),this.removeListener(`${o}.${a}`,h),this.removeListener(`${s}.${a}`,h),this.removeListener(`${o}.${a}`,l),this.removeListener(`${s}.${a}`,l)};await Promise.all([this.on(`${t}.${a}`,h),this.on(`${i}.${a}`,h),this.once(`${o}.${a}`,h),this.once(`${s}.${a}`,h),this.once(`${o}.${a}`,l),this.once(`${s}.${a}`,l)])}return(await this.wire.sendAction(\"launch-manifest\",{manifestUrl:e,opts:r})).payload.data.manifest}async queryPermissionForCurrentContext(e){const t={uuid:this.wire.me.uuid,name:this.wire.me.name};return(await this.wire.sendAction(\"query-permission-for-current-context\",{apiName:e,identity:t})).payload.data}async enableNativeWindowIntegrationProvider(e){const{payload:t}=await this.wire.sendAction(\"enable-native-window-integration-provider\",{permissions:e});return t.data}async registerUsage({data:e,type:t}){await this.wire.sendAction(\"register-usage\",{data:e,type:t})}async getPrinters(){const{payload:e}=await this.wire.sendAction(\"system-get-printers\");return e.data}async updateProcessLoggingOptions(e){await this.wire.sendAction(\"system-update-process-logging-options\",{options:e})}async getDomainSettings(){const{payload:{data:e}}=await this.wire.sendAction(\"get-domain-settings\",this.identity);return e}async setDomainSettings(e){await this.wire.sendAction(\"set-domain-settings\",{domainSettings:e,...this.identity})}async refreshExtensions(){const{payload:e}=await this.wire.sendAction(\"refresh-extensions\");return e.data}async getInstalledExtensions(){const{payload:e}=await this.wire.sendAction(\"get-installed-extensions\");return e.data}}c.System=ce;var de={},he={};Object.defineProperty(he,\"__esModule\",{value:!0}),he.RefCounter=void 0;he.RefCounter=class{constructor(){this.topicRefMap=new Map}incRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t+1;n=i,this.topicRefMap.set(e,i)}else this.topicRefMap.set(e,1),n=1;return n}decRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t-1;this.topicRefMap.set(e,i),n=i}else n=-1;return n}actOnFirst(e,t,n){return 1===this.incRefCount(e)?t():n()}actOnLast(e,t,n){return 0===this.decRefCount(e)?t():n()}};var le={},ue={},pe={};Object.defineProperty(pe,\"__esModule\",{value:!0}),pe.ChannelBase=pe.ProtectedItems=void 0;const we=e=>async(t,n,i)=>{const r=await e(t,n,i);return void 0===r?n:r};pe.ProtectedItems=class{constructor(e,t){this.providerIdentity=e,this.close=t}};class ye{static defaultAction(e){throw new Error(`No action registered at target for ${e}`)}constructor(){this.subscriptions=new Map}async processAction(e,t,n){try{const i=this.subscriptions.has(e)?this.subscriptions.get(e):(t,n)=>(this.defaultAction??ye.defaultAction)(e,t,n),r=this.preAction?await this.preAction(e,t,n):t,o=await i(r,n);return this.postAction?await this.postAction(e,o,n):o}catch(t){if(this.errorMiddleware)return this.errorMiddleware(e,t,n);throw t}}beforeAction(e){if(this.preAction)throw new Error(\"Already registered beforeAction middleware\");this.preAction=we(e)}onError(e){if(this.errorMiddleware)throw new Error(\"Already registered error middleware\");this.errorMiddleware=e}afterAction(e){if(this.postAction)throw new Error(\"Already registered afterAction middleware\");this.postAction=we(e)}remove(e){this.subscriptions.delete(e)}setDefaultAction(e){if(this.defaultAction)throw new Error(\"default action can only be set once\");this.defaultAction=e}register(e,t){if(this.subscriptions.has(e))throw new Error(`Subscription already registered for action: ${e}. Unsubscribe before adding new subscription`);return this.subscriptions.set(e,t),!0}}pe.ChannelBase=ye;var fe,ge,me,ve=s&&s.__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)},Ce=s&&s.__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};Object.defineProperty(ue,\"__esModule\",{value:!0}),ue.ChannelClient=void 0;const be=pe,Ie=new Map;class Ee extends be.ChannelBase{static closeChannelByEndpointId(e){const t=Ie.get(e);t&&ve(t,me,\"f\").call(t)}static handleProviderDisconnect(e){for(const t of Ie.values())t.providerIdentity.channelId===e.channelId&&(t.disconnectListener(e),ve(t,me,\"f\").call(t))}constructor(e,t,n){super(),fe.set(this,void 0),ge.set(this,void 0),this.processAction=(e,t,n)=>super.processAction(e,t,n),me.set(this,(()=>{Ie.delete(this.endpointId),ve(this,ge,\"f\").close()})),Ce(this,fe,new be.ProtectedItems(e,t),\"f\"),this.disconnectListener=()=>{},this.endpointId=e.endpointId,Ce(this,ge,n,\"f\"),Ie.set(this.endpointId,this),n.receive(this.processAction)}get providerIdentity(){return ve(this,fe,\"f\").providerIdentity}async dispatch(e,t){if(ve(this,ge,\"f\").isEndpointConnected(this.providerIdentity.channelId))return ve(this,ge,\"f\").send(this.providerIdentity.channelId,e,t);throw new Error(\"The client you are trying to dispatch from is disconnected from the target provider.\")}onDisconnection(e){this.disconnectListener=t=>{try{e(t)}catch(e){throw new Error(`Error while calling the onDisconnection callback: ${e.message}`)}finally{this.disconnectListener=()=>{}}}}async disconnect(){await this.sendDisconnectAction(),ve(this,me,\"f\").call(this)}async sendDisconnectAction(){const e=ve(this,fe,\"f\");await e.close()}static async wireClose(e,t,n){const{channelName:i,uuid:r,name:o}=t;await e.sendAction(\"disconnect-from-channel\",{channelName:i,uuid:r,name:o,endpointId:n})}}ue.ChannelClient=Ee,fe=new WeakMap,ge=new WeakMap,me=new WeakMap;var xe={},Ae={};Object.defineProperty(Ae,\"__esModule\",{value:!0}),Ae.exhaustiveCheck=void 0,Ae.exhaustiveCheck=function(e,t){throw new Error(`Unsupported value: ${e}${t?`\\n Supported values are: ${t.join(\"\")}`:\"\"}`)};var Pe,Me,_e,Oe={},Se=s&&s.__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},Re=s&&s.__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)};Object.defineProperty(Oe,\"__esModule\",{value:!0}),Oe.ClassicInfo=Oe.ClassicStrategy=void 0;Oe.ClassicStrategy=class{constructor(e,t,n,i){this.messageReceiver=t,this.endpointId=n,this.providerIdentity=i,Pe.set(this,void 0),Me.set(this,new Map),_e.set(this,new Map),this.send=async(e,t,n)=>{const i=Re(this,Me,\"f\").get(e);if(!i)throw new Error(`Could not locate routing info for endpoint ${e}`);const r={...i};r.isLocalEndpointId&&delete r.endpointId,delete r.isLocalEndpointId;const o=Re(this,Pe,\"f\").sendAction(\"send-channel-message\",{...r,providerIdentity:this.providerIdentity,action:t,payload:n});Re(this,_e,\"f\").get(e)?.add(o);return(await o.catch((e=>{throw new Error(e.message)})).finally((()=>{Re(this,_e,\"f\").get(e)?.delete(o)}))).payload.data.result},this.close=async()=>{this.messageReceiver.removeEndpoint(this.providerIdentity.channelId,this.endpointId),[...Re(this,Me,\"f\").keys()].forEach((e=>this.closeEndpoint(e))),Se(this,Me,new Map,\"f\")},Se(this,Pe,e,\"f\")}onEndpointDisconnect(e,t){}receive(e){this.messageReceiver.addEndpoint(e,this.providerIdentity.channelId,this.endpointId)}async closeEndpoint(e){const t=Re(this,Me,\"f\").get(e);Re(this,Me,\"f\").delete(e);const n=Re(this,_e,\"f\").get(e);n?.forEach((n=>{const i=`Channel connection with identity uuid: ${t?.uuid} / name: ${t?.name} / endpointId: ${e} no longer connected.`;n.cancel(new Error(i))}))}isEndpointConnected(e){return Re(this,Me,\"f\").has(e)}addEndpoint(e,t){Re(this,Me,\"f\").set(e,t.endpointIdentity),Re(this,_e,\"f\").set(e,new Set)}isValidEndpointPayload(e){return\"string\"==typeof e?.endpointIdentity?.endpointId||\"string\"==typeof e?.endpointIdentity?.channelId}},Pe=new WeakMap,Me=new WeakMap,_e=new WeakMap,Oe.ClassicInfo={version:5,minimumVersion:0,type:\"classic\"};var Fe={},je={},ke={};Object.defineProperty(ke,\"__esModule\",{value:!0}),ke.errorToPOJO=void 0,ke.errorToPOJO=function(e){return{stack:e.stack,name:e.name,message:e.message,toString:()=>e.stack||e.toString()}};var Le,Te,$e=s&&s.__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)},Be=s&&s.__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};Object.defineProperty(je,\"__esModule\",{value:!0}),je.RTCEndpoint=void 0;const Ge=ke;je.RTCEndpoint=class{static isValidEndpointPayload(e){const t=e=>\"object\"==typeof e&&null!==e;return t(e)&&t(e.endpointIdentity)&&t(e.rtc)&&\"string\"==typeof e.endpointIdentity.endpointId}constructor({rtc:e,endpointIdentity:t}){this.responseMap=new Map,Le.set(this,null),Te.set(this,void 0),this.connectionStateChangeHandler=e=>{\"connected\"!==this.rtc.rtcClient.connectionState&&(this.rtc.rtcClient.removeEventListener(\"connectionstatechange\",this.connectionStateChangeHandler),this.close(),$e(this,Te,\"f\")&&$e(this,Te,\"f\").call(this))},this.send=async(e,t)=>{const n=`message-${Math.random()}`,i=new Promise(((e,t)=>{this.responseMap.set(n,{resolve:e,reject:t})}));return this.rtc.channels.request.send(JSON.stringify({action:e,payload:t,messageId:n})),i},this.close=()=>{this.responseMap.forEach((e=>e.reject(\"Connection has closed.\"))),this.responseMap=new Map,this.rtc.channels.request.close(),this.rtc.channels.response.close(),this.rtc.rtcClient.close()},this.rtc=e,this.endpointIdentity=t,this.rtc.channels.response.addEventListener(\"message\",(e=>{let{data:t}=e;e.data instanceof ArrayBuffer&&(t=(new TextDecoder).decode(e.data));const{messageId:n,payload:i,success:r,error:o}=JSON.parse(t),{resolve:s,reject:a}=this.responseMap.get(n)??{};s&&a?(this.responseMap.delete(n),r?s(i):a(o)):(console.log(\"Could not find id in responseMap.\"),console.log(e))})),this.rtc.channels.request.addEventListener(\"message\",(async e=>{let{data:n}=e;e.data instanceof ArrayBuffer&&(n=(new TextDecoder).decode(e.data));const{messageId:i,action:r,payload:o}=JSON.parse(n);if($e(this,Le,\"f\"))try{const e=await $e(this,Le,\"f\").call(this,r,o,t);this.rtc.channels.response.send(JSON.stringify({messageId:i,payload:e,success:!0}))}catch(e){\"open\"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,error:(0,Ge.errorToPOJO)(e),success:!1}))}else\"open\"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,success:!1,error:\"Connection not ready.\"}))})),this.rtc.rtcClient.addEventListener(\"connectionstatechange\",this.connectionStateChangeHandler),Object.values(this.rtc.channels).forEach((e=>{e.onclose=e=>{[...this.responseMap.values()].forEach((e=>e.reject(new Error(\"RTCDataChannel closed unexpectedly, this is most commonly caused by message size. Note: RTC Channels have a message size limit of ~255kB.\")))),this.close(),$e(this,Te,\"f\")&&$e(this,Te,\"f\").call(this)}}))}onDisconnect(e){if($e(this,Te,\"f\"))throw new Error(\"RTCEndpoint disconnectListener cannot be set twice.\");Be(this,Te,e,\"f\")}receive(e){if($e(this,Le,\"f\"))throw new Error(\"You have already set a listener for this RTC Endpoint.\");Be(this,Le,e,\"f\")}get connected(){return\"connected\"===this.rtc.rtcClient.connectionState}},Le=new WeakMap,Te=new WeakMap;var We,He,Ne,De={},Ue=s&&s.__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)},Ve=s&&s.__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};Object.defineProperty(De,\"__esModule\",{value:!0}),De.EndpointStrategy=void 0;De.EndpointStrategy=class{constructor(e,t,n){this.EndpointType=e,this.StrategyName=n,We.set(this,null),He.set(this,new Map),Ne.set(this,!0),this.send=async(e,t,n)=>this.getEndpointById(e).send(t,n),this.close=async()=>{Ue(this,Ne,\"f\")&&(Ue(this,He,\"f\").forEach((e=>e.close())),Ve(this,He,new Map,\"f\")),Ve(this,Ne,!1,\"f\")},this.isValidEndpointPayload=t}onEndpointDisconnect(e,t){this.getEndpointById(e).onDisconnect(t)}receive(e){if(Ue(this,We,\"f\"))throw new Error(`You have already set a listener for this ${this.StrategyName} Strategy`);Ve(this,We,e,\"f\"),Ue(this,He,\"f\").forEach((e=>e.receive(Ue(this,We,\"f\"))))}getEndpointById(e){const t=Ue(this,He,\"f\").get(e);if(!t)throw new Error(`Client with endpoint id ${e} is not connected`);return t}get connected(){return Ue(this,Ne,\"f\")}isEndpointConnected(e){return Ue(this,He,\"f\").has(e)}addEndpoint(e,t){if(!Ue(this,Ne,\"f\"))return void console.warn(`Adding endpoint to disconnected ${this.StrategyName} Strategy`);const n=new this.EndpointType(t);Ue(this,We,\"f\")&&n.receive(Ue(this,We,\"f\")),Ue(this,He,\"f\").set(e,n)}async closeEndpoint(e){Ue(this,He,\"f\").delete(e)}},We=new WeakMap,He=new WeakMap,Ne=new WeakMap,Object.defineProperty(Fe,\"__esModule\",{value:!0}),Fe.RTCInfo=Fe.RTCStrategy=void 0;const ze=je,Ke=De;class qe extends Ke.EndpointStrategy{constructor(){super(ze.RTCEndpoint,ze.RTCEndpoint.isValidEndpointPayload,\"RTC\")}}Fe.RTCStrategy=qe,Fe.RTCInfo={version:2,minimumVersion:0,type:\"rtc\"};var Je={};Object.defineProperty(Je,\"__esModule\",{value:!0}),Je.RTCICEManager=void 0;const Ye=d;class Ze extends Ye.EmitterBase{constructor(e){super(e,\"channel\"),this.ensureChannelOpened=e=>new Promise(((t,n)=>{if(\"open\"===e.readyState)t();else if(\"connecting\"===e.readyState){const n=()=>{e.removeEventListener(\"open\",n),t()};e.addEventListener(\"open\",n)}else n(new Error(\"This Channel has already closed\"))}))}static createDataChannelPromise(e,t){let n;const i=new Promise((e=>{n=e})),r=i=>{const o=()=>{i.channel.removeEventListener(\"open\",o),n(i.channel)};i.channel.label===e&&(i.channel.addEventListener(\"open\",o),t.removeEventListener(\"datachannel\",r))};return t.addEventListener(\"datachannel\",r),i}async listenForProviderIce(e,t){await this.on(this.createProviderEventName(e),t,{timestamp:Date.now()})}async raiseProviderIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createProviderEventName(e)),t)}async listenForClientIce(e,t){await this.on(this.createClientEventName(e),t,{timestamp:Date.now()})}async raiseClientIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createClientEventName(e)),t)}cleanupIceListeners(e){this.removeAllListeners(this.createClientEventName(e)),this.removeAllListeners(this.createProviderEventName(e))}createClientEventName(e){return`ice-client-${e}`}createProviderEventName(e){return`ice-provider-${e}`}createRouteString(e){return`channel/${e}`}createRtcPeer(){return this.wire.environment.getRtcPeer()}async startClientOffer(){const e=Math.random().toString(),t=this.createRtcPeer();t.addEventListener(\"icecandidate\",(async t=>{t.candidate&&await this.raiseClientIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForProviderIce(e,(async e=>{await t.addIceCandidate(e.candidate)}));const n={request:t.createDataChannel(\"request\"),response:t.createDataChannel(\"response\")},i=await t.createOffer();await t.setLocalDescription(i);const r=Promise.all([n.request,n.response].map(this.ensureChannelOpened)).then((()=>{}));return{rtcClient:t,channels:n,offer:i,rtcConnectionId:e,channelsOpened:r}}async finishClientOffer(e,t,n){return await e.setRemoteDescription(t),await n,!0}async createProviderAnswer(e,t){const n=this.createRtcPeer(),i=Ze.createDataChannelPromise(\"request\",n),r=Ze.createDataChannelPromise(\"response\",n);n.addEventListener(\"icecandidate\",(async t=>{t.candidate&&await this.raiseProviderIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForClientIce(e,(async e=>{await n.addIceCandidate(e.candidate)})),await n.setRemoteDescription(t);const o=await n.createAnswer();await n.setLocalDescription(o);const s=Promise.all([i,r]).then((([t,n])=>(this.cleanupIceListeners(e),{request:t,response:n})));return{rtcClient:n,answer:o,channels:s}}}Je.RTCICEManager=Ze;var Qe={},Xe={};function et(e){return[...e.split(\".\").reverse().entries()].reduce(((e,[t,n])=>e+ +n*1e4**t),0)}function tt(e,t){return et(e)>=et(t)}function nt(e){return e.split(\"/\")[0]}Object.defineProperty(Xe,\"__esModule\",{value:!0}),Xe.runtimeUuidMeetsMinimumRuntimeVersion=Xe.parseRuntimeUuid=Xe.meetsMinimumRuntimeVersion=void 0,Xe.meetsMinimumRuntimeVersion=tt,Xe.parseRuntimeUuid=nt,Xe.runtimeUuidMeetsMinimumRuntimeVersion=function(e,t){return tt(nt(e),t)};var it,rt,ot,st,at,ct=s&&s.__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)},dt=s&&s.__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};Object.defineProperty(Qe,\"__esModule\",{value:!0}),Qe.ChannelProvider=void 0;const ht=pe,lt=Xe;class ut extends ht.ChannelBase{get connections(){return[...ct(this,it,\"f\")]}static handleClientDisconnection(e,t){const n=e.connections.find((e=>e.endpointId===t.endpointId));if(n)ct(e,st,\"f\").call(e,n);else{e.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name)).forEach(ct(e,st,\"f\"))}e.disconnectListener(t)}static setProviderRemoval(e,t){ut.removalMap.set(e,t)}constructor(e,t,n){super(),it.set(this,void 0),rt.set(this,void 0),ot.set(this,void 0),st.set(this,(e=>{const t=this.connections.filter((t=>t.endpointId!==e.endpointId));ct(this,ot,\"f\").closeEndpoint(e.endpointId),dt(this,it,t,\"f\")})),this.processAction=async(e,t,n)=>(ut.clientIsMultiRuntime(n)&&!(0,lt.runtimeUuidMeetsMinimumRuntimeVersion)(n.runtimeUuid,\"18.87.56.0\")?this.handleMultiRuntimeLegacyClient(n):this.checkForClientConnection(n),super.processAction(e,t,n)),at.set(this,(()=>{ct(this,ot,\"f\").close();const e=ut.removalMap.get(this);e&&e()})),dt(this,rt,new ht.ProtectedItems(e,t),\"f\"),this.connectListener=()=>{},this.disconnectListener=()=>{},dt(this,it,[],\"f\"),dt(this,ot,n,\"f\"),n.receive(this.processAction)}dispatch(e,t,n){const i=e.endpointId??this.getEndpointIdForOpenFinId(e,t);return i&&ct(this,ot,\"f\").isEndpointConnected(i)?ct(this,ot,\"f\").send(i,t,n):Promise.reject(new Error(`Client connection with identity uuid: ${e.uuid} / name: ${e.name} / endpointId: ${i} no longer connected.`))}async processConnection(e,t){return ct(this,it,\"f\").push(e),this.connectListener(e,t)}publish(e,t){return this.connections.map((n=>ct(this,ot,\"f\").send(n.endpointId,e,t)))}onConnection(e){this.connectListener=e}onDisconnection(e){this.disconnectListener=e}async destroy(){const e=ct(this,rt,\"f\");e.providerIdentity,dt(this,it,[],\"f\"),await e.close(),ct(this,at,\"f\").call(this)}async getAllClientInfo(){return this.connections.map((e=>{const{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}=e;return{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}}))}checkForClientConnection(e){if(!this.isClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider.\\n Client Identity: {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}isClientConnected(e){return ut.clientIdentityIncludesEndpointId(e)?this.connections.some((t=>t.endpointId===e.endpointId&&t.uuid===e.uuid&&t.name===e.name)):this.isLegacyClientConnected(e)}isLegacyClientConnected(e){return this.connections.some((t=>t.uuid===e.uuid&&t.name===e.name))}handleMultiRuntimeLegacyClient(e){if(!this.isLegacyClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider. Client Identity:\\n {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}getEndpointIdForOpenFinId(e,t){const n=this.connections.filter((t=>t.name===e.name&&t.uuid===e.uuid));if(n.length>=2){const n=ct(this,rt,\"f\"),{uuid:i,name:r}=e,o=n?.providerIdentity.uuid,s=n?.providerIdentity.name;console.warn(`WARNING: Dispatch call may have unintended results. The \"to\" argument of your dispatch call is missing the\\n \"endpointId\" parameter. The identity you are dispatching to ({uuid: ${i}, name: ${r}})\\n has multiple channelClients for this channel. Your dispatched action: (${t}) from the provider:\\n ({uuid: ${o}, name: ${s}}) will only be processed by the most recently-created client.`)}return n.pop()?.endpointId}static clientIdentityIncludesEndpointId(e){return void 0!==e.endpointId}static clientIsMultiRuntime(e){return void 0!==e.runtimeUuid}static async wireClose(e,t){await e.sendAction(\"destroy-channel\",{channelName:t})}}Qe.ChannelProvider=ut,it=new WeakMap,rt=new WeakMap,ot=new WeakMap,st=new WeakMap,at=new WeakMap,ut.removalMap=new WeakMap;var pt={};Object.defineProperty(pt,\"__esModule\",{value:!0}),pt.MessageReceiver=void 0;const wt=ue,yt=d;class ft extends yt.Base{constructor(e){super(e),this.onmessage=e=>\"process-channel-message\"===e.action&&(this.processChannelMessage(e),!0),this.endpointMap=new Map,this.latestEndpointIdByChannelId=new Map,e.registerMessageHandler(this.onmessage.bind(this))}async processChannelMessage(e){const{senderIdentity:t,providerIdentity:n,action:i,ackToSender:r,payload:o,intendedTargetIdentity:s}=e.payload,a=s.channelId??s.endpointId??this.latestEndpointIdByChannelId.get(n.channelId),c=this.endpointMap.get(a);if(!c)return r.payload.success=!1,r.payload.reason=`Client connection with identity uuid: ${this.wire.me.uuid} / name: ${this.wire.me.name} / endpointId: ${a} no longer connected.`,this.wire.sendRaw(r);try{const e=await c(i,o,t);return r.payload.payload=r.payload.payload||{},r.payload.payload.result=e,this.wire.sendRaw(r)}catch(e){return r.payload.success=!1,r.payload.reason=e.message,this.wire.sendRaw(r)}}addEndpoint(e,t,n){this.endpointMap.set(n,e),t!==n&&this.latestEndpointIdByChannelId.set(t,n)}removeEndpoint(e,t){this.endpointMap.delete(t),this.latestEndpointIdByChannelId.get(e)===t&&this.latestEndpointIdByChannelId.delete(e)}checkForPreviousClientConnection(e){const t=this.latestEndpointIdByChannelId.get(e);t&&(wt.ChannelClient.closeChannelByEndpointId(t),console.warn(\"You have created a second connection to an older provider. First connection has been removed from the clientMap\"),console.warn(\"If the provider calls publish(), you may receive multiple messages.\"))}}pt.MessageReceiver=ft;var gt={};Object.defineProperty(gt,\"__esModule\",{value:!0}),gt.ProtocolManager=void 0;gt.ProtocolManager=class{constructor(e){this.ProtocolsInPreferenceOrder=e,this.DefaultClientProtocols=[\"classic\"],this.DefaultProviderProtocols=[\"classic\"],this.getClientProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultClientProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(\", \")}.`);return t},this.getProviderProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultProviderProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(\", \")}.`);return t},this.getCompatibleProtocols=(e,t)=>t.supportedProtocols.filter((t=>e.some((e=>e.type===t.type&&t.version>=e.minimumVersion&&e.version>=(t.minimumVersion??0))))).slice(0,t.maxProtocols)}};var mt={};Object.defineProperty(mt,\"__esModule\",{value:!0});class vt{static combine(e,t){return new vt(e,t)}constructor(e,t){this.primary=e,this.secondary=t}onEndpointDisconnect(e,t){this.primary.onEndpointDisconnect(e,(()=>{this.secondary.isEndpointConnected(e)||t()})),this.secondary.onEndpointDisconnect(e,(()=>{this.primary.isEndpointConnected(e)||t()}))}isValidEndpointPayload(e){return this.primary.isValidEndpointPayload(e)||this.secondary.isValidEndpointPayload(e)}async closeEndpoint(e){await this.primary.closeEndpoint(e),await this.secondary.closeEndpoint(e)}isEndpointConnected(e){return this.primary.isEndpointConnected(e)||this.secondary.isEndpointConnected(e)}async addEndpoint(e,t){this.primary.isValidEndpointPayload(t)&&await this.primary.addEndpoint(e,t),this.secondary.isValidEndpointPayload(t)&&await this.secondary.addEndpoint(e,t)}receive(e){this.primary.receive(e),this.secondary.receive(e)}send(e,t,n){return this.primary.isEndpointConnected(e)?this.primary.send(e,t,n):this.secondary.send(e,t,n)}async close(){await Promise.all([this.primary.close(),this.secondary.close()])}}mt.default=vt;var Ct,bt,It=s&&s.__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},Et=s&&s.__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)},xt=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(xe,\"__esModule\",{value:!0}),xe.ConnectionManager=void 0;const At=Ae,Pt=d,Mt=Oe,_t=Fe,Ot=Je,St=Qe,Rt=pt,Ft=gt,jt=xt(mt);class kt extends Pt.Base{static getProtocolOptionsFromStrings(e){return e.map((e=>{switch(e){case\"rtc\":return _t.RTCInfo;case\"classic\":return Mt.ClassicInfo;default:return(0,At.exhaustiveCheck)(e,[\"rtc\",\"classic\"])}}))}constructor(e){super(e),Ct.set(this,void 0),bt.set(this,void 0),this.removeChannelFromProviderMap=e=>{this.providerMap.delete(e)},this.onmessage=e=>\"process-channel-connection\"===e.action&&(this.processChannelConnection(e),!0),this.providerMap=new Map,this.protocolManager=new Ft.ProtocolManager(\"node\"===this.wire.environment.type?[\"classic\"]:[\"rtc\",\"classic\"]),It(this,Ct,new Rt.MessageReceiver(e),\"f\"),It(this,bt,new Ot.RTCICEManager(e),\"f\"),e.registerMessageHandler(this.onmessage.bind(this))}createProvider(e,t){const n=Object.assign(this.wire.environment.getDefaultChannelOptions().create,e||{}),i=this.protocolManager.getProviderProtocols(n?.protocols),r=i.map((e=>{switch(e){case\"rtc\":return new _t.RTCStrategy;case\"classic\":return new Mt.ClassicStrategy(this.wire,Et(this,Ct,\"f\"),t.channelId,t);default:return(0,At.exhaustiveCheck)(e,[\"rtc\",\"classic\"])}}));let o;if(2===r.length){const[e,t]=r;o=jt.default.combine(e,t)}else{if(1!==r.length)throw new Error(\"failed to combine strategies\");[o]=r}const s=new St.ChannelProvider(t,(()=>St.ChannelProvider.wireClose(this.wire,t.channelName)),o),a=t.channelId;return this.providerMap.set(a,{provider:s,strategy:o,supportedProtocols:kt.getProtocolOptionsFromStrings(i)}),St.ChannelProvider.setProviderRemoval(s,this.removeChannelFromProviderMap.bind(this)),s}async createClientOffer(e){const t=this.protocolManager.getClientProtocols(e?.protocols);let n;return{offer:{supportedProtocols:await Promise.all(t.map((async e=>{switch(e){case\"rtc\":{const{rtcClient:e,channels:t,offer:i,rtcConnectionId:r,channelsOpened:o}=await Et(this,bt,\"f\").startClientOffer();return n={rtcClient:e,channels:t,channelsOpened:o},{type:\"rtc\",version:_t.RTCInfo.version,payload:{offer:i,rtcConnectionId:r}}}case\"classic\":return{type:\"classic\",version:Mt.ClassicInfo.version};default:return(0,At.exhaustiveCheck)(e,[\"rtc\",\"classic\"])}}))),maxProtocols:2},rtc:n}}async createClientStrategy(e,t){t.endpointId||(t.endpointId=this.wire.environment.getNextMessageId(),Et(this,Ct,\"f\").checkForPreviousClientConnection(t.channelId));const n=t.answer??{supportedProtocols:[{type:\"classic\",version:1}]},i=(await Promise.all(n.supportedProtocols.map((async n=>\"rtc\"===n.type&&e?(await Et(this,bt,\"f\").finishClientOffer(e.rtcClient,n.payload.answer,e.channelsOpened),new _t.RTCStrategy):\"classic\"===n.type?new Mt.ClassicStrategy(this.wire,Et(this,Ct,\"f\"),t.endpointId,t):null)))).filter((e=>null!==e));let r;if(e&&!i.some((e=>e instanceof _t.RTCStrategy))&&e&&e.rtcClient.close(),i.length>=2)r=jt.default.combine(i[0],i[1]);else{if(!i.length)throw new Error(\"No compatible protocols\");[r]=i}const o={endpointIdentity:t,rtc:e};return r.addEndpoint(t.channelId,o),r}async processChannelConnection(e){const{clientIdentity:t,providerIdentity:n,ackToSender:i,payload:r,offer:o}=e.payload;t.endpointId?t.isLocalEndpointId=!1:(t.endpointId=this.wire.environment.getNextMessageId(),t.isLocalEndpointId=!0);const s=n.channelId,a=this.providerMap.get(s);if(!a)return i.payload.success=!1,i.payload.reason=`Channel \"${n.channelName}\" has been destroyed.`,this.wire.sendRaw(i);const{provider:c,strategy:d,supportedProtocols:h}=a;try{if(!(c instanceof St.ChannelProvider))throw Error(\"Cannot connect to a channel client\");const e=o??{supportedProtocols:[{type:\"classic\",version:1}],maxProtocols:1},n=this.protocolManager.getCompatibleProtocols(h,e);if(!n.length)throw new Error(\"This provider does not support any of the offered protocols.\");const s=await c.processConnection(t,r);i.payload.payload=i.payload.payload||{};let a={supportedProtocols:[],endpointPayloadPromise:Promise.resolve({endpointIdentity:t})};return a=await n.reduce((async(e,t)=>{const n=await e;if(\"rtc\"===t.type){const{answer:e,rtcClient:i,channels:r}=await Et(this,bt,\"f\").createProviderAnswer(t.payload.rtcConnectionId,t.payload.offer);n.supportedProtocols.push({type:\"rtc\",version:_t.RTCInfo.version,payload:{answer:e}}),n.endpointPayloadPromise=n.endpointPayloadPromise.then((e=>r.then((t=>({...e,rtc:{rtcClient:i,channels:t}})))))}else n.supportedProtocols.push({type:\"classic\",version:Mt.ClassicInfo.version});return n}),Promise.resolve(a)),a.endpointPayloadPromise.then((e=>d.addEndpoint(t.endpointId,e))),i.payload.payload.result=s,i.payload.payload.answer=a,this.wire.sendRaw(i)}catch(e){return i.payload.success=!1,i.payload.reason=e.message,this.wire.sendRaw(i)}}}xe.ConnectionManager=kt,Ct=new WeakMap,bt=new WeakMap;var Lt,Tt,$t,Bt=s&&s.__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},Gt=s&&s.__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)};Object.defineProperty(le,\"__esModule\",{value:!0}),le.Channel=void 0;const Wt=t,Ht=G,Nt=d,Dt=ue,Ut=xe,Vt=Qe;function zt(e){const t=Math.floor(e/10),n=Math.min(3e4,500*2**t);return new Promise((e=>{setTimeout((()=>{e(!1)}),n)}))}class Kt extends Nt.EmitterBase{constructor(e){super(e,\"channel\"),Lt.set(this,void 0),Tt.set(this,new Wt.EventEmitter),$t.set(this,new Ht.AsyncRetryableLazy((async()=>{await Promise.all([this.on(\"disconnected\",(e=>{Dt.ChannelClient.handleProviderDisconnect(e)})),this.on(\"connected\",((...e)=>{Gt(this,Tt,\"f\").emit(\"connected\",...e)}))]).catch((()=>new Error(\"error setting up channel connection listeners\")))}))),Bt(this,Lt,new Ut.ConnectionManager(e),\"f\")}async getAllChannels(){return this.wire.sendAction(\"get-all-channels\").then((({payload:e})=>e.data))}async onChannelConnect(e){await this.on(\"connected\",e)}async onChannelDisconnect(e){await this.on(\"disconnected\",e)}async safeConnect(e,t,n){const i={count:0};do{let r=()=>{};const o=new Promise((t=>{r=n=>{e===n.channelName&&t(!0)},Gt(this,Tt,\"f\").on(\"connected\",r)}));try{if(i.count>0){i.gotConnectedEvent=await Promise.race([zt(i.count),o]);const t=await this.wire.sendAction(\"connect-to-channel\",{...n,retryInfo:i});return console.log(`Successfully connected to channelName: ${e}`),t.payload.data}const t=this.wire.sendAction(\"connect-to-channel\",n);i.originalMessageId=t.messageId;return(await t).payload.data}catch(n){if(!n.message.includes(\"internal-nack\"))throw n;t&&0===i.count&&console.warn(`No channel found for channelName: ${e}. Waiting for connection...`)}finally{i.count+=1,Gt(this,Tt,\"f\").removeListener(\"connected\",r)}}while(t);throw new Error(`No channel found for channelName: ${e}.`)}async connect(e,t={}){if(await Gt(this,$t,\"f\").getValue(),!e||\"string\"!=typeof e)throw new Error(\"Please provide a channelName string to connect to a channel.\");const n={wait:!0,...this.wire.environment.getDefaultChannelOptions().connect,...t},{offer:i,rtc:r}=await Gt(this,Lt,\"f\").createClientOffer(n);let o;(this.fin.me.isFrame||this.fin.me.isView||this.fin.me.isWindow)&&(o=(await this.fin.me.getInfo()).url);const s={channelName:e,...n,offer:i,connectionUrl:o},a=await this.safeConnect(e,n.wait,s),c=await Gt(this,Lt,\"f\").createClientStrategy(r,a),d=new Dt.ChannelClient(a,(()=>Dt.ChannelClient.wireClose(this.wire,a,a.endpointId)),c);return c.onEndpointDisconnect(a.channelId,(async()=>{try{await d.sendDisconnectAction()}catch(e){console.warn(`Something went wrong during disconnect for client with uuid: ${a.uuid} / name: ${a.name} / endpointId: ${a.endpointId}.`)}finally{Dt.ChannelClient.handleProviderDisconnect(a)}})),d}async create(e,t){if(!e)throw new Error(\"Please provide a channelName to create a channel\");const{payload:{data:n}}=await this.wire.sendAction(\"create-channel\",{channelName:e}),i=Gt(this,Lt,\"f\").createProvider(t,n);return this.on(\"client-disconnected\",(t=>{t.channelName===e&&Vt.ChannelProvider.handleClientDisconnection(i,t)})),i}}le.Channel=Kt,Lt=new WeakMap,Tt=new WeakMap,$t=new WeakMap,Object.defineProperty(de,\"__esModule\",{value:!0}),de.InterAppPayload=de.InterApplicationBus=void 0;const qt=t,Jt=d,Yt=he,Zt=le,Qt=O;class Xt extends Jt.Base{constructor(e){super(e),this.events={subscriberAdded:\"subscriber-added\",subscriberRemoved:\"subscriber-removed\"},this.refCounter=new Yt.RefCounter,this.Channel=new Zt.Channel(e),this.emitter=new qt.EventEmitter,e.registerMessageHandler(this.onmessage.bind(this)),this.on=this.emitter.on.bind(this.emitter),this.removeAllListeners=this.emitter.removeAllListeners.bind(this.emitter)}async publish(e,t){await this.wire.sendAction(\"publish-message\",{topic:e,message:t,sourceWindowName:this.me.name})}async send(e,t,n){const i=(0,Qt.validateIdentity)(e);if(i)throw new Error(i);await this.wire.sendAction(\"send-message\",{destinationUuid:e.uuid,destinationWindowName:e.name,topic:t,message:n,sourceWindowName:this.me.name})}subscribe(e,t,n){const i=this.createSubscriptionKey(e.uuid,e.name||\"*\",t);return this.emitter.on(i,n),this.refCounter.actOnFirst(i,(async()=>{await this.wire.sendAction(\"subscribe\",{sourceUuid:e.uuid,sourceWindowName:e.name||\"*\",topic:t,destinationWindowName:this.me.name})}),(()=>Promise.resolve()))}unsubscribe(e,t,n){const i=e.name||\"*\",r=this.createSubscriptionKey(e.uuid,i,t);return this.emitter.removeListener(r,n),this.refCounter.actOnLast(r,(async()=>{await this.wire.sendAction(\"unsubscribe\",{sourceUuid:e.uuid,sourceWindowName:i,topic:t,destinationWindowName:this.me.name})}),(()=>new Promise((e=>e)).then((()=>{}))))}processMessage(e){const{payload:{message:t,sourceWindowName:n,sourceUuid:i,topic:r}}=e,o=[this.createSubscriptionKey(i,n,r),this.createSubscriptionKey(i,\"*\",r),this.createSubscriptionKey(\"*\",\"*\",r)],s={uuid:i,name:n};o.forEach((e=>{this.emitter.emit(e,t,s)}))}emitSubscriverEvent(e,t){const{payload:{targetName:n,uuid:i,topic:r}}=t,o={name:n,uuid:i,topic:r};this.emitter.emit(e,o)}createSubscriptionKey(e,t,n){const i=t||\"*\";if(!(e&&i&&n))throw new Error(\"Missing uuid, name, or topic string\");return function(...e){return e.map((e=>Buffer.from(`${e}`).toString(\"base64\"))).join(\"/\")}(e,i,n)}onmessage(e){const{action:t}=e;switch(t){case\"process-message\":this.processMessage(e);break;case this.events.subscriberAdded:this.emitSubscriverEvent(this.events.subscriberAdded,e);break;case this.events.subscriberRemoved:this.emitSubscriverEvent(this.events.subscriberRemoved,e)}return!0}}de.InterApplicationBus=Xt;de.InterAppPayload=class{};var en={};Object.defineProperty(en,\"__esModule\",{value:!0}),en.Clipboard=void 0;const tn=d;class nn extends tn.Base{async writeText(e){await this.wire.sendAction(\"clipboard-write-text\",e)}async readText(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-text\",{type:e});return t.data}async writeImage(e){await this.wire.sendAction(\"clipboard-write-image\",e)}async readImage(e={format:\"dataURL\"}){const{payload:t}=await this.wire.sendAction(\"clipboard-read-image\",e);return t.data}async writeHtml(e){await this.wire.sendAction(\"clipboard-write-html\",e)}async readHtml(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-html\",{type:e});return t.data}async writeRtf(e){await this.wire.sendAction(\"clipboard-write-rtf\",e)}async readRtf(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-rtf\",{type:e});return t.data}async write(e){await this.wire.sendAction(\"clipboard-write\",e)}async getAvailableFormats(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-formats\",{type:e});return t.data}}en.Clipboard=nn;var rn={},on={},sn={};Object.defineProperty(sn,\"__esModule\",{value:!0}),sn.ExternalApplication=void 0;const an=d;class cn extends an.EmitterBase{constructor(e,t){super(e,\"external-application\",t.uuid),this.identity=t}getInfo(){return this.wire.sendAction(\"get-external-application-info\",this.identity).then((({payload:e})=>e.data))}}sn.ExternalApplication=cn,Object.defineProperty(on,\"__esModule\",{value:!0}),on.ExternalApplicationModule=void 0;const dn=d,hn=sn;class ln extends dn.Base{wrap(e){return this.wire.sendAction(\"external-application-wrap\").catch((e=>{})),Promise.resolve(new hn.ExternalApplication(this.wire,{uuid:e}))}wrapSync(e){return this.wire.sendAction(\"external-application-wrap-sync\").catch((e=>{})),new hn.ExternalApplication(this.wire,{uuid:e})}}on.ExternalApplicationModule=ln,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(on,e),n(sn,e)}(rn);var un={},pn={},wn={};Object.defineProperty(wn,\"__esModule\",{value:!0}),wn._Frame=void 0;const yn=d;class fn extends yn.EmitterBase{constructor(e,t){super(e,\"frame\",t.uuid,t.name),this.identity=t}getInfo(){return this.wire.sendAction(\"get-frame-info\",this.identity).then((({payload:e})=>e.data))}getParentWindow(){return this.wire.sendAction(\"get-parent-window\",this.identity).then((({payload:e})=>e.data))}}wn._Frame=fn,Object.defineProperty(pn,\"__esModule\",{value:!0}),pn._FrameModule=void 0;const gn=d,mn=O,vn=wn;class Cn extends gn.Base{async wrap(e){this.wire.sendAction(\"frame-wrap\").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}wrapSync(e){this.wire.sendAction(\"frame-wrap-sync\").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}getCurrent(){return this.wire.sendAction(\"frame-get-current\").catch((e=>{})),Promise.resolve(new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity()))}getCurrentSync(){return this.wire.sendAction(\"frame-get-current-sync\").catch((e=>{})),new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity())}}pn._FrameModule=Cn,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(pn,e),n(wn,e)}(un);var bn={};Object.defineProperty(bn,\"__esModule\",{value:!0}),bn.GlobalHotkey=void 0;const In=d;class En extends In.EmitterBase{constructor(e){super(e,\"global-hotkey\")}async register(e,t){await this.on(e,t),await this.wire.sendAction(\"global-hotkey-register\",{hotkey:e})}async unregister(e){await this.removeAllListeners(e),await this.wire.sendAction(\"global-hotkey-unregister\",{hotkey:e})}async unregisterAll(){await Promise.all(this.eventNames().filter((e=>!(\"registered\"===e||\"unregistered\"===e))).map((e=>this.removeAllListeners(e)))),await this.wire.sendAction(\"global-hotkey-unregister-all\",{})}async isRegistered(e){const{payload:{data:t}}=await this.wire.sendAction(\"global-hotkey-is-registered\",{hotkey:e});return t}}bn.GlobalHotkey=En;var xn,An={},Pn={},Mn={},_n=s&&s.__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)};Object.defineProperty(Mn,\"__esModule\",{value:!0}),Mn.Platform=void 0;const On=d,Sn=O,Rn=new Map;class Fn extends On.EmitterBase{constructor(e,t){super(t.wire,\"application\",e.uuid),this.getClient=e=>{this.wire.sendAction(\"platform-get-client\",this.identity).catch((e=>{}));const t=e||this.identity,{uuid:n}=t;if(!Rn.has(n)){const e=_n(this,xn,\"f\").call(this,n);Rn.set(n,e)}return Rn.get(n)},xn.set(this,(async e=>{try{const t=`custom-frame-${e}`,n=await this._channel.connect(t,{wait:!1});return n.onDisconnection((()=>{Rn.delete(e)})),n}catch(t){throw Rn.delete(e),new Error(\"The targeted Platform is not currently running. Listen for application-started event for the given Uuid.\")}})),this.launchLegacyManifest=this.launchContentManifest;const n=(0,Sn.validateIdentity)(e);if(n)throw new Error(n);this._channel=t,this.identity={uuid:e.uuid},this.Layout=this.fin.Platform.Layout,this.Application=this.fin.Application.wrapSync(this.identity)}async createView(e,t,n){this.wire.sendAction(\"platform-create-view\",this.identity).catch((e=>{}));const i=await this.getClient(),r=await i.dispatch(\"create-view\",{target:t,opts:e,targetView:n});if(!r||(0,Sn.validateIdentity)(r.identity))throw new Error(`When overwriting the createView call, please return an object that has a valid 'identity' property: ${JSON.stringify(r)}`);return this.fin.View.wrapSync(r.identity)}async createWindow(e){this.wire.sendAction(\"platform-create-window\",this.identity).catch((e=>{}));const t=await this.getClient();e.reason||(e.reason=\"api-call\");const n=await t.dispatch(\"create-view-container\",e);if(!n||(0,Sn.validateIdentity)(n.identity))throw new Error(`When overwriting the createWindow call, please return an object that has a valid 'identity' property: ${JSON.stringify(n)}`);const{identity:i}=n,r=this.fin.Window.wrapSync(i);return r.name=i.name,r.uuid=i.uuid,r}async quit(){this.wire.sendAction(\"platform-quit\",this.identity).catch((e=>{}));return(await this.getClient()).dispatch(\"quit\")}async closeView(e){this.wire.sendAction(\"platform-close-view\",this.identity).catch((e=>{}));const t=await this.getClient();await t.dispatch(\"close-view\",{view:e})}async reparentView(e,t){console.warn(\"Platform.reparentView has been deprecated, please use Platform.createView\"),this.wire.sendAction(\"platform-reparent-view\",this.identity).catch((e=>{}));const n={...e,uuid:e.uuid??this.identity.uuid},i=await this.fin.View.wrap(n),r=await i.getOptions();return this.createView(r,t)}async getSnapshot(){this.wire.sendAction(\"platform-get-snapshot\",this.identity).catch((e=>{}));return(await this.getClient()).dispatch(\"get-snapshot\")}async getViewSnapshot(e){return(await this.getClient()).dispatch(\"get-view-snapshot\",{viewIdentity:e})}async applySnapshot(e,t){this.wire.sendAction(\"platform-apply-snapshot\",this.identity).catch((e=>{}));const n=\"Requested snapshot must be a valid Snapshot object, or a url or filepath to such an object.\";let i;if(\"string\"==typeof e)try{i=(await this._channel.wire.sendAction(\"get-application-manifest\",{manifestUrl:e})).payload.data}catch(e){throw new Error(`${n}: ${e}`)}else i=e;if(!i.windows)throw new Error(n);const r=await this.getClient();return await r.dispatch(\"apply-snapshot\",{snapshot:i,options:t}),this}async fetchManifest(e){return(await this.getClient()).dispatch(\"platform-fetch-manifest\",{manifestUrl:e})}async launchContentManifest(e){this.wire.sendAction(\"platform-launch-content-manifest\",this.identity).catch((()=>{}));const t=await this.getClient(),n=await this.fetchManifest(e);return t.dispatch(\"launch-into-platform\",{manifest:n,manifestUrl:e}),this}async setWindowContext(e={},t){if(this.wire.sendAction(\"platform-set-window-context\",this.identity).catch((e=>{})),!e)throw new Error(\"Please provide a serializable object or string to set the context.\");const n=await this.getClient(),{entityType:i}=t?await this.fin.System.getEntityInfo(t.uuid,t.name):this.fin.me;await n.dispatch(\"set-window-context\",{context:e,entityType:i,target:t||{uuid:this.fin.me.uuid,name:this.fin.me.name}})}async getWindowContext(e){this.wire.sendAction(\"platform-get-window-context\",this.identity).catch((e=>{}));const t=await this.getClient(),{entityType:n}=e?await this.fin.System.getEntityInfo(e.uuid,e.name):this.fin.me;return t.dispatch(\"get-window-context\",{target:e||{uuid:this.fin.me.uuid,name:this.fin.me.name},entityType:n})}async closeWindow(e,t={skipBeforeUnload:!1}){this.wire.sendAction(\"platform-close-window\",this.identity).catch((e=>{}));return(await this.getClient()).dispatch(\"close-window\",{windowId:e,options:t})}}Mn.Platform=Fn,xn=new WeakMap;var jn={},kn={},Ln={},Tn={};function $n(e){switch(e){case\"columns\":case\"grid\":case\"rows\":case\"tabs\":return!0;default:return!1}}Object.defineProperty(Tn,\"__esModule\",{value:!0}),Tn.overrideFromComposables=Tn.isValidPresetType=void 0,Tn.isValidPresetType=$n,Tn.overrideFromComposables=function(...e){return t=>e.reduceRight(((e,t)=>n=>t(e(n))),(e=>e))(t)},Tn.default={isValidPresetType:$n};var Bn={},Gn={},Wn={};Object.defineProperty(Wn,\"__esModule\",{value:!0}),Wn.ApiConsumer=void 0;Wn.ApiConsumer=class{constructor(e){this.strategy=e,this.consume=async e=>(await this.strategy.getExposedFunctions(e)).reduce(((t,n)=>({...t,[n.key]:this.strategy.createFunction(n,e)})),{})}};var Hn={},Nn={};Object.defineProperty(Nn,\"__esModule\",{value:!0}),Nn.expose=Nn.getExposedProperties=void 0;const Dn=Symbol(\"exposedProperties\");Nn.getExposedProperties=e=>e[Dn]||e.prototype[Dn]||[];Nn.expose=e=>(t,n,i)=>{t[Dn]=t[Dn]||[],t[Dn].push({key:n,descriptor:i,options:e})},Object.defineProperty(Hn,\"__esModule\",{value:!0}),Hn.ApiExposer=void 0;const Un=Nn;Hn.ApiExposer=class{constructor(e){this.strategy=e,this.exposeInstance=async(e,t)=>{const n=(0,Un.getExposedProperties)(e),i=await Promise.all(n.map((async({key:n,options:i})=>({key:n,options:await this.strategy.exposeFunction(e[n].bind(e),{key:n,options:i,meta:t})}))));await this.strategy.exposeMeta(t,i)}}};var Vn={},zn={},Kn={};Object.defineProperty(Kn,\"__esModule\",{value:!0}),Kn.ChannelsConsumer=void 0;Kn.ChannelsConsumer=class{constructor(e){this.channel=e,this.getExposedFunctions=async e=>{const{id:t}=e,{props:n}=await this.channel.dispatch(`api-meta:${t}`);return n},this.createFunction=e=>(...t)=>{const{action:n}=e.options;return this.channel.dispatch(n,{args:t})}}};var qn={};Object.defineProperty(qn,\"__esModule\",{value:!0}),qn.ChannelsExposer=void 0;qn.ChannelsExposer=class{constructor(e){this.channelProviderOrClient=e,this.exposeFunction=async(e,t)=>{const{key:n,options:i,meta:r}=t,{id:o}=r,s=`${o}.${i?.action||n}`;return await this.channelProviderOrClient.register(s,(async({args:t})=>e(...t))),{action:s}},this.exposeMeta=async({id:e},t)=>{const n=`api-meta:${e}`;await this.channelProviderOrClient.register(n,(()=>({props:t})))}}},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Kn,e),n(qn,e)}(zn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(zn,e)}(Vn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Wn,e),n(Hn,e),n(Vn,e),n(Nn,e)}(Gn);var Jn={};Object.defineProperty(Jn,\"__esModule\",{value:!0}),Jn.createRelayedDispatch=exports.relayChannelClientApi_1=Jn.relayChannelClientApi=void 0;const Yn=[\"no longer connected\",\"RTCDataChannel closed unexpectedly\",\"The client you are trying to dispatch from is disconnected from the target provider\"];exports.relayChannelClientApi_1=Jn.relayChannelClientApi=async(e,t)=>{e.register(`relay:${t}`,(({action:t,target:n,payload:i})=>e.dispatch(n,t,i))),await Promise.resolve()};Jn.createRelayedDispatch=(e,t,n,i)=>async(r,o)=>{try{return await e.dispatch(`relay:${n}`,{action:r,payload:o,target:t})}catch(e){if(s=e.message,Yn.some((e=>s.includes(e)))&&i)throw new Error(i);throw e}var s};var Zn,Qn,Xn,ei=s&&s.__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},ti=s&&s.__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)};Object.defineProperty(Bn,\"__esModule\",{value:!0}),Bn.ColumnOrRow=Bn.TabStack=Bn.LayoutNode=void 0;const ni=Gn,ii=Jn;class ri{constructor(e,t){Zn.set(this,void 0),this.isRoot=()=>ti(this,Zn,\"f\").isRoot(this.entityId),this.exists=()=>ti(this,Zn,\"f\").exists(this.entityId),this.getParent=async()=>{const e=await ti(this,Zn,\"f\").getParent(this.entityId);if(e)return ri.getEntity(e,ti(this,Zn,\"f\"))},this.createAdjacentStack=async(e,t)=>{const n=await ti(this,Zn,\"f\").createAdjacentStack(this.entityId,e,t);return ri.getEntity({entityId:n,type:\"stack\"},ti(this,Zn,\"f\"))},this.getAdjacentStacks=async e=>(await ti(this,Zn,\"f\").getAdjacentStacks({targetId:this.entityId,edge:e})).map((e=>ri.getEntity({type:\"stack\",entityId:e.entityId},ti(this,Zn,\"f\")))),ei(this,Zn,e,\"f\"),this.entityId=t}}Bn.LayoutNode=ri,Zn=new WeakMap,ri.newLayoutEntitiesClient=async(e,t,n)=>{const i=(0,ii.createRelayedDispatch)(e,n,\"layout-relay\",\"You are trying to interact with a layout component on a window that does not exist or has been destroyed.\");return new ni.ApiConsumer(new ni.ChannelsConsumer({dispatch:i})).consume({id:t})},ri.getEntity=(e,t)=>{const{entityId:n,type:i}=e;switch(i){case\"column\":case\"row\":return new si(t,n,i);case\"stack\":return new oi(t,n);default:throw new Error(`Unrecognised Layout Entity encountered ('${JSON.stringify(e)})`)}};class oi extends ri{constructor(e,t){super(e,t),Qn.set(this,void 0),this.type=\"stack\",this.getViews=()=>ti(this,Qn,\"f\").getStackViews(this.entityId),this.addView=async(e,t={index:0})=>ti(this,Qn,\"f\").addViewToStack(this.entityId,e,t),this.removeView=async e=>{await ti(this,Qn,\"f\").removeViewFromStack(this.entityId,e)},this.setActiveView=async e=>{await ti(this,Qn,\"f\").setStackActiveView(this.entityId,e)},ei(this,Qn,e,\"f\")}}Bn.TabStack=oi,Qn=new WeakMap;class si extends ri{constructor(e,t,n){super(e,t),Xn.set(this,void 0),this.getContent=async()=>(await ti(this,Xn,\"f\").getContent(this.entityId)).map((e=>ri.getEntity(e,ti(this,Xn,\"f\")))),ei(this,Xn,e,\"f\"),this.type=n}}Bn.ColumnOrRow=si,Xn=new WeakMap;var ai={};Object.defineProperty(ai,\"__esModule\",{value:!0}),ai.DEFAULT_LAYOUT_KEY=ai.LAYOUT_CONTROLLER_ID=void 0,ai.LAYOUT_CONTROLLER_ID=\"layout-entities\",ai.DEFAULT_LAYOUT_KEY=\"__default__\";var ci,di,hi,li=s&&s.__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)};Object.defineProperty(Ln,\"__esModule\",{value:!0}),Ln.Layout=void 0;const ui=G,pi=O,wi=d,yi=Tn,fi=Bn,gi=ai;class mi extends wi.Base{static getClient(e){return li(e,di,\"f\").getValue()}constructor(e,t){super(t),ci.add(this),di.set(this,new ui.Lazy((async()=>fi.LayoutNode.newLayoutEntitiesClient(await this.platform.getClient(),gi.LAYOUT_CONTROLLER_ID,this.identity)))),this.replace=async e=>{this.wire.sendAction(\"layout-replace\").catch((e=>{}));const t=await this.platform.getClient();await t.dispatch(\"replace-layout\",{target:this.identity,opts:{layout:e}})},this.replaceView=async(e,t)=>{this.wire.sendAction(\"layout-replace-view\").catch((e=>{}));const n=await this.platform.getClient();await n.dispatch(\"replace-view\",{target:this.identity,opts:{viewToReplace:e,newView:t}})},this.applyPreset=async e=>{this.wire.sendAction(\"layout-apply-preset\").catch((e=>{}));const t=await this.platform.getClient(),{presetType:n}=e;if(!n||!(0,yi.isValidPresetType)(n))throw new Error(\"Cannot apply preset layout, please include an applicable presetType property in the PresetLayoutOptions.\");await t.dispatch(\"apply-preset-layout\",{target:this.identity,opts:{presetType:n}})};const n=(0,pi.validateIdentity)(e);if(n)throw new Error(n);this.identity=e,this.platform=this.fin.Platform.wrapSync({uuid:e.uuid}),e.uuid===this.fin.me.uuid&&e.name===this.fin.me.name&&(this.init=this.fin.Platform.Layout.init)}async getConfig(){this.wire.sendAction(\"layout-get-config\").catch((e=>{}));return(await this.platform.getClient()).dispatch(\"get-frame-snapshot\",{target:this.identity})}async getCurrentViews(){this.wire.sendAction(\"layout-get-views\").catch((e=>{}));const e=await this.platform.getClient();return(await e.dispatch(\"get-layout-views\",{target:this.identity})).map((e=>this.fin.View.wrapSync(e)))}async getRootItem(){this.wire.sendAction(\"layout-get-root-item\").catch((()=>{}));const e=await li(this,di,\"f\").getValue(),t=await e.getRoot(\"layoutName\"in this.identity?this.identity:void 0);return fi.LayoutNode.getEntity(t,e)}async getStackByViewIdentity(e){this.wire.sendAction(\"layout-get-stack-by-view\").catch((()=>{}));const t=await li(this,di,\"f\").getValue(),n=await t.getStackByView(e);if(!n)throw new Error(`No stack found for view: ${e.uuid}/${e.name}`);return fi.LayoutNode.getEntity(n,t)}async addView(e,{location:t,targetView:n}={}){this.wire.sendAction(\"layout-add-view\").catch((e=>{}));const{identity:i}=await li(this,ci,\"m\",hi).call(this,\"layout-add-view\",{viewOptions:e,location:t,targetView:n});return{identity:i}}async closeView(e){this.wire.sendAction(\"layout-close-view\").catch((e=>{})),await li(this,ci,\"m\",hi).call(this,\"layout-close-view\",{viewIdentity:e})}}Ln.Layout=mi,di=new WeakMap,ci=new WeakSet,hi=async function(e,t){return(await this.platform.getClient()).dispatch(e,{target:this.identity,opts:t})};var vi,Ci,bi,Ii,Ei,xi=s&&s.__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)},Ai=s&&s.__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};Object.defineProperty(kn,\"__esModule\",{value:!0}),kn.LayoutModule=void 0;const Pi=d,Mi=Ln,_i=ai;class Oi extends Pi.Base{constructor(){super(...arguments),vi.add(this),Ci.set(this,!1),bi.set(this,null),this.init=async(e={})=>{if(this.wire.sendAction(\"layout-init\").catch((e=>{})),!this.wire.environment.layoutAllowedInContext(this.fin))throw new Error(\"Layout.init can only be called from a Window context.\");if(xi(this,Ci,\"f\"))throw new Error(\"Layout.init was already called, please use Layout.create to add additional layouts.\");\"openfin\"===this.wire.environment.type&&await this.fin.Platform.getCurrentSync().getClient(),Ai(this,Ci,!0,\"f\"),Ai(this,bi,await this.wire.environment.initLayoutManager(this.fin,this.wire,e),\"f\"),await this.wire.environment.applyLayoutSnapshot(this.fin,xi(this,bi,\"f\"),e);const t={name:this.fin.me.name,uuid:this.fin.me.uuid};if(!e.layoutManagerOverride){const e={layoutName:_i.DEFAULT_LAYOUT_KEY,...t};return xi(this,Ii,\"f\").call(this,e)}return this.wrapSync(t)},Ii.set(this,(e=>{const t=\"[Layout] You are using a deprecated property `layoutManager` - it will throw if you access it starting in v37.\",n=new Proxy({},{get(e,n){throw console.warn(`[Layout-mgr-proxy] accessing ${n.toString()}`),new Error(t)}}),i=Object.assign(this.wrapSync(e),{layoutManager:n});return new Proxy(i,{get(e,n){if(\"layoutManager\"===n)throw console.warn(`[Layout-proxy] accessing ${n.toString()}`),new Error(t);return e[n]}})})),this.getCurrentLayoutManagerSync=()=>xi(this,vi,\"m\",Ei).call(this,\"fin.Platform.Layout.getCurrentLayoutManagerSync()\"),this.create=async e=>this.wire.environment.createLayout(xi(this,vi,\"m\",Ei).call(this,\"fin.Platform.Layout.create()\"),e),this.destroy=async e=>this.wire.environment.destroyLayout(xi(this,vi,\"m\",Ei).call(this,\"fin.Platform.Layout.destroy()\"),e)}async wrap(e){return this.wire.sendAction(\"layout-wrap\").catch((e=>{})),new Mi.Layout(e,this.wire)}wrapSync(e){return this.wire.sendAction(\"layout-wrap-sync\").catch((e=>{})),new Mi.Layout(e,this.wire)}async getCurrent(){if(this.wire.sendAction(\"layout-get-current\").catch((e=>{})),\"openfin\"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error(\"You are not in a Window context. Only Windows can have a Layout.\");const{uuid:e,name:t}=this.fin.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction(\"layout-get-current-sync\").catch((e=>{})),\"openfin\"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error(\"You are not in a Window context. Only Windows can have a Layout.\");const{uuid:e,name:t}=this.fin.me;return this.wrapSync({uuid:e,name:t})}async getLayoutByViewIdentity(e){this.wire.sendAction(\"layout-get-by-view-identity\").catch((()=>{}));let t=await this.wire.environment.getViewWindowIdentity(this.fin,e);t.identity&&(t=t.identity);try{const n=this.wrapSync(t),i=await Mi.Layout.getClient(n),r=await i.getLayoutIdentityForViewOrThrow(e);return this.wrapSync(r)}catch(n){if(![\"No action registered at target for\",\"getLayoutIdentityForViewOrThrow is not a function\"].some((e=>n.message.includes(e))))throw n;if(t.uuid===t.name)throw new Error(`View identity ${JSON.stringify(e)} is not attached to any layout in provider window ${JSON.stringify(t)}.`);return this.wrapSync(t)}}}kn.LayoutModule=Oi,Ci=new WeakMap,bi=new WeakMap,Ii=new WeakMap,vi=new WeakSet,Ei=function(e){if(!xi(this,bi,\"f\"))throw new Error(`You must call init before using the API ${e}`);return xi(this,bi,\"f\")},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(kn,e),n(Ln,e)}(jn),Object.defineProperty(Pn,\"__esModule\",{value:!0}),Pn.PlatformModule=void 0;const Si=d,Ri=Mn,Fi=jn;class ji extends Si.Base{constructor(e,t){super(e),this._channel=t,this.Layout=new Fi.LayoutModule(this.wire)}async init(e){if(!fin.__internal_.isPlatform||fin.me.name!==fin.me.uuid)throw new Error(\"fin.Platform.init should only be called from a custom platform provider running in the main window of the application.\");return this.wire.environment.initPlatform(this.fin,e)}async wrap(e){return this.wire.sendAction(\"platform-wrap\").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}wrapSync(e){return this.wire.sendAction(\"platform-wrap-sync\").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}async getCurrent(){return this.wire.sendAction(\"platform-get-current\").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction(\"platform-get-current-sync\").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}start(e){return this.wire.sendAction(\"platform-start\").catch((e=>{})),new Promise((async(t,n)=>{try{const{uuid:n}=e,i=await this.fin.Application._create({...e,isPlatformController:!0});i.once(\"platform-api-ready\",(()=>t(this.wrapSync({uuid:n})))),i._run({uuid:n})}catch(e){n(e)}}))}startFromManifest(e,t){return this.wire.sendAction(\"platform-start-from-manifest\").catch((e=>{})),new Promise((async(n,i)=>{try{const i=await this.fin.Application._createFromManifest(e);i.once(\"platform-api-ready\",(()=>n(this.wrapSync({uuid:i.identity.uuid})))),i._run(t)}catch(e){i(e)}}))}}Pn.PlatformModule=ji,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Pn,e),n(Mn,e)}(An);var ki={};!function(e){Object.defineProperty(e,\"__esModule\",{value:!0}),e.getMe=e.getBaseMe=e.environmentUnsupportedMessage=void 0;const t=J(),n=un,i=ie(),r=rn;function o(e,t,n){return{...{isView:\"view\"===e,isWindow:\"window\"===e,isFrame:\"iframe\"===e,isExternal:\"external connection\"===e},uuid:t,name:n,entityType:e}}e.environmentUnsupportedMessage=\"You are not running in OpenFin.\",e.getBaseMe=o,e.getMe=function(s){const{uuid:a,name:c,entityType:d}=s.me,h={setContext(){throw new Error(e.environmentUnsupportedMessage)},addContextHandler(){throw new Error(e.environmentUnsupportedMessage)},getContextGroups(){throw new Error(e.environmentUnsupportedMessage)},joinContextGroup(){throw new Error(e.environmentUnsupportedMessage)},removeFromContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getAllClientsInContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getInfoForContextGroup(){throw new Error(e.environmentUnsupportedMessage)}},l=\"Interop API has not been instantiated. Either connection has failed or you have not declared interop in your config.\",u={setContext(){throw new Error(l)},addContextHandler(){throw new Error(l)},getContextGroups(){throw new Error(l)},joinContextGroup(){throw new Error(l)},removeFromContextGroup(){throw new Error(l)},getAllClientsInContextGroup(){throw new Error(l)},getInfoForContextGroup(){throw new Error(l)}},p={eventNames:()=>{throw new Error(e.environmentUnsupportedMessage)},emit:()=>{throw new Error(e.environmentUnsupportedMessage)},listeners:()=>{throw new Error(e.environmentUnsupportedMessage)},listenerCount:()=>{throw new Error(e.environmentUnsupportedMessage)},on:()=>{throw new Error(e.environmentUnsupportedMessage)},addListener:()=>{throw new Error(e.environmentUnsupportedMessage)},once:()=>{throw new Error(e.environmentUnsupportedMessage)},prependListener:()=>{throw new Error(e.environmentUnsupportedMessage)},prependOnceListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeAllListeners:()=>{throw new Error(e.environmentUnsupportedMessage)}};switch(d){case\"view\":return Object.assign(new t.View(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case\"window\":return Object.assign(new i._Window(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case\"iframe\":return Object.assign(new n._Frame(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case\"external connection\":return Object.assign(new r.ExternalApplication(s,{uuid:a}),o(d,a,c),{interop:u,isOpenFin:!1});default:return{...o(d,a,c),...p,interop:h,isOpenFin:!1}}}}(ki);var Li={},Ti={},$i={};Object.defineProperty($i,\"__esModule\",{value:!0}),$i.createWarningObject=$i.createUnusableObject=void 0,$i.createUnusableObject=function(e){const t=()=>{throw new Error(e)};return new Proxy({},{apply:t,construct:t,defineProperty:t,deleteProperty:t,get:t,getOwnPropertyDescriptor:t,getPrototypeOf:t,has:t,isExtensible:t,ownKeys:t,preventExtensions:t,set:t,setPrototypeOf:t})},$i.createWarningObject=function(e,t){return new Proxy(t,{get:(...t)=>(console.warn(e),Reflect.get(...t)),set:(...t)=>(console.warn(e),Reflect.set(...t)),getOwnPropertyDescriptor:(...t)=>(console.warn(e),Reflect.getOwnPropertyDescriptor(...t)),ownKeys:(...t)=>(console.warn(e),Reflect.ownKeys(...t))})};var Bi,Gi={},Wi={};var Hi={};!function(e){Object.defineProperty(e,\"__esModule\",{value:!0}),e.wrapIntentHandler=e.BROKER_ERRORS=e.generateOverrideWarning=e.generateOverrideError=e.wrapContextHandler=e.wrapInTryCatch=e.generateId=void 0;e.generateId=()=>`${Math.random()}${Date.now()}`;e.wrapInTryCatch=(e,t)=>(...n)=>{try{return e(...n)}catch(e){throw new Error((t||\"\")+e)}};e.wrapContextHandler=(e,t)=>async n=>{try{await e(n)}catch(e){throw console.error(`Error thrown by handler ${t} for context type ${n.type}: ${e}`),e}};e.generateOverrideError=(e,t)=>`You have tried to to use ${e} but ${t} has not been overridden in the Interop Broker. Please override this function. Refer to our documentation for more info.`;e.generateOverrideWarning=(e,t,n,i)=>{const{uuid:r,name:o}=n;return i?`Entity with identity: ${r}/${o} has called ${i} or ${e} but ${t} has not been overridden.`:`Entity with identity: ${r}/${o} has called ${e} but ${t} has not been overridden.`},e.BROKER_ERRORS={fireIntent:(0,e.generateOverrideError)(\"fireIntent\",\"handleFiredIntent\"),fireIntentForContext:(0,e.generateOverrideError)(\"fireIntentForContext\",\"handleFiredIntentForContext\"),getInfoForIntent:(0,e.generateOverrideError)(\"getInfoForIntent\",\"handleInfoForIntent\"),getInfoForIntentsByContext:(0,e.generateOverrideError)(\"getInfoForIntentsByContext\",\"handleInfoForIntentsByContext\"),joinSessionContextGroupWithJoinContextGroup:\"The Context Group you have tried to join is a Session Context Group. Custom Context Groups can only be defined by the Interop Broker through code or manifest configuration. Please use joinSessionContextGroup.\",fdc3Open:(0,e.generateOverrideError)(\"fdc3.open\",\"fdc3HandleOpen\"),fdc3FindInstances:(0,e.generateOverrideError)(\"fdc3.findInstances\",\"fdc3HandleFindInstances\"),fdc3GetAppMetadata:(0,e.generateOverrideError)(\"fdc3.getAppMetadata\",\"fdc3HandleGetAppMetadata\"),fdc3GetInfo:(0,e.generateOverrideError)(\"fdc3.getInfo\",\"fdc3HandleGetInfo\")};e.wrapIntentHandler=(e,t)=>async n=>{try{return e(n)}catch(e){throw console.error(`Error thrown by handler ${t}: ${e}`),e}}}(Hi);var Ni,Di,Ui={};function Vi(){if(Di)return Gi;Di=1;var e,t,n,r=s&&s.__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},o=s&&s.__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)},a=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Gi,\"__esModule\",{value:!0}),Gi.InteropBroker=void 0;const c=d,h=a(function(){if(Bi)return Wi;Bi=1,Object.defineProperty(Wi,\"__esModule\",{value:!0});const e=Cr();return Wi.default=class{constructor(e,t){this.provider=e,this.id=t,this.lastContext=void 0,this.contextGroupMap=new Map,this.clients=new Map,this.registerListeners()}registerListeners(){this.provider.register(`sessionContextGroup:getContext-${this.id}`,this.getCurrentContext.bind(this)),this.provider.register(`sessionContextGroup:setContext-${this.id}`,this.setContext.bind(this)),this.provider.register(`sessionContextGroup:handlerAdded-${this.id}`,this.handlerAdded.bind(this)),this.provider.register(`sessionContextGroup:handlerRemoved-${this.id}`,this.handlerRemoved.bind(this))}getCurrentContext(e){return e.type?this.contextGroupMap.get(e.type):this.lastContext}setContext(t,n){const{context:i}=t,r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name} not in Session Client State Map`);this.contextGroupMap.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{e.contextHandlers.get(i.type)?.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getClientState(e){return this.clients.get(e.endpointId)}async handlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(i){const e=r.contextHandlers.get(i)||[];r.contextHandlers.set(i,[...e,n]);const o=this.contextGroupMap.get(i);o&&await this.provider.dispatch(t,n,o)}else{r.globalHandler=n;const e=[...this.contextGroupMap.keys()].map((async e=>{const i=this.contextGroupMap.get(e);i&&await this.provider.dispatch(t,n,i)}));await Promise.all(e)}}handlerRemoved(e,t){const{handlerId:n}=e,i=this.clients.get(t.endpointId);i?(Array.from(i.contextHandlers).forEach((([,e])=>{const t=e.indexOf(n);t>-1&&e.splice(t,1)})),i.globalHandler===n&&(i.globalHandler=void 0)):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={contextHandlers:new Map,clientIdentity:e,globalHandler:void 0};this.clients.set(e.endpointId,t)}}onDisconnection(e){this.clients.delete(e.endpointId)}},Wi}()),l=Hi,u=a(i),p=function(){if(Ni)return Ui;Ni=1,Object.defineProperty(Ui,\"__esModule\",{value:!0}),Ui.PrivateChannelProvider=void 0;const e=Vi();return Ui.PrivateChannelProvider=class t{constructor(e,t){this.provider=e,this.id=t,this.clients=new Map,this.registerListeners(),this.contextByContextType=new Map,this.lastContext=void 0,this.provider.onConnection((e=>this.registerNewClient(e))),this.provider.onDisconnection((async e=>{const{endpointId:t}=e;this.clients.has(t)&&await this.handleClientDisconnecting(e),0===(await this.provider.getAllClientInfo()).length&&this.provider.destroy()}))}getClientState(e){return this.clients.get(e.endpointId)}registerListeners(){this.provider.register(\"broadcast\",this.broadcast.bind(this)),this.provider.register(\"getCurrentContext\",this.getCurrentContext.bind(this)),this.provider.register(\"contextHandlerAdded\",this.contextHandlerAdded.bind(this)),this.provider.register(\"contextHandlerRemoved\",this.contextHandlerRemoved.bind(this)),this.provider.register(\"nonStandardHandlerRemoved\",this.nonStandardHandlerRemoved.bind(this)),this.provider.register(\"onAddContextHandlerAdded\",this.onAddContextHandlerAdded.bind(this)),this.provider.register(\"onDisconnectHandlerAdded\",this.onDisconnectHandlerAdded.bind(this)),this.provider.register(\"onUnsubscribeHandlerAdded\",this.onUnsubscribeHandlerAdded.bind(this)),this.provider.register(\"clientDisconnecting\",((e,t)=>{this.handleClientDisconnecting(t)}))}broadcast(t,n){const{context:i}=t;if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name}, tried to call broadcast, is not connected to this Private Channel`);const r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to broadcast - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);this.contextByContextType.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{const t=e.handlerIdsByContextTypes.get(i.type);t&&t.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getCurrentContext(e,t){const{contextType:n}=e;if(!this.getClientState(t))throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call getCurrentContext, is not connected to this Private Channel`);if(void 0!==n){return this.contextByContextType.get(n)||null}return this.lastContext?this.lastContext:null}contextHandlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call addContextListener, is not connected to this Private Channel`);if(i){const e=r.handlerIdsByContextTypes.get(i)||[];r.handlerIdsByContextTypes.set(i,[...e,n])}else r.globalHandler=n;Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&e.onAddContextListenerHandlerId&&this.provider.dispatch(e.clientIdentity,e.onAddContextListenerHandlerId,i)}))}async contextHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);if(i){let e;if(i.globalHandler===n)i.globalHandler=void 0;else for(const[t,r]of i.handlerIdsByContextTypes){const i=r.indexOf(n);i>-1&&(r.splice(i,1),e=t)}const r=(await this.getConnectedClients()).map((async n=>{const{clientIdentity:i,clientIdentity:{endpointId:r},onUnsubscribeHandlerId:o}=n;r!==t.endpointId&&o&&await this.provider.dispatch(i,o,e)}));try{await Promise.all(r)}catch(e){throw console.error(`Problem when attempting to dispatch to onUnsubscribeHandlers. Error: ${e} Removing Client: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}`),new Error(e)}}else console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}.`)}nonStandardHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);i?i.onDisconnectHandlerId===n?i.onDisconnectHandlerId=void 0:i.onAddContextListenerHandlerId===n?i.onAddContextListenerHandlerId=void 0:i.onUnsubscribeHandlerId===n&&(i.onUnsubscribeHandlerId=void 0):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}onAddContextHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onAddContextListener, is not connected to this Private Channel`);n.onAddContextListenerHandlerId=i,Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&Array.from(e.handlerIdsByContextTypes.keys()).forEach((e=>{this.provider.dispatch(t,i,e)}))}))}onDisconnectHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onDisconnect, is not connected to this Private Channel`);n.onDisconnectHandlerId=i}onUnsubscribeHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onUnsubscribe, is not connected to this Private Channel`);n.onUnsubscribeHandlerId=i}removeClient(e){const t=this.getClientState(e);if(!t)throw new Error(`Client with Identity: ${e.uuid} ${e.name}, tried to call disconnect, is not connected to this Private Channel`);t.handlerIdsByContextTypes.clear(),this.clients.delete(e.endpointId)}async fireOnDisconnectForOtherClients(e){const{endpointId:t}=e,n=(await this.getConnectedClients()).map((async e=>{const{clientIdentity:{endpointId:n},onDisconnectHandlerId:i}=e;n!==t&&i&&await this.provider.dispatch(e.clientIdentity,i)}));try{await Promise.all(n)}catch(t){throw console.error(`Problem when attempting to dispatch to onDisconnectHandlers. Error: ${t} Disconnecting Client: uuid: ${e.uuid}. name: ${e.name}. endpointId: ${e.endpointId}`),new Error(t)}}async unsubscribeAll(e){const{endpointId:t}=e,n=this.clients.get(t);if(n){const t=Array.from(n.handlerIdsByContextTypes.values()).flat(),i=n.globalHandler;if(t.length>0){const n=t.map((async t=>this.contextHandlerRemoved({handlerId:t},e)));try{await Promise.all(n)}catch(e){console.error(e.message)}}if(i)try{await this.contextHandlerRemoved({handlerId:i},e)}catch(e){console.error(e.message)}}}async handleClientDisconnecting(e){await this.unsubscribeAll(e),this.removeClient(e),await this.fireOnDisconnectForOtherClients(e)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={clientIdentity:e,handlerIdsByContextTypes:new Map,globalHandler:void 0,onAddContextListenerHandlerId:void 0,onUnsubscribeHandlerId:void 0,onDisconnectHandlerId:void 0};this.clients.set(e.endpointId,t)}}async getConnectedClients(){const e=await this.provider.getAllClientInfo();return Array.from(this.clients.values()).filter((t=>{const{uuid:n,name:i}=t.clientIdentity;return e.some((e=>i===e.name&&n===e.uuid))}))}static init(e,n){return new t(e,n)}},Ui}(),w=G,y=[{id:\"green\",displayMetadata:{color:\"#00CC88\",name:\"green\"}},{id:\"purple\",displayMetadata:{color:\"#8C61FF\",name:\"purple\"}},{id:\"orange\",displayMetadata:{color:\"#FF8C4C\",name:\"orange\"}},{id:\"red\",displayMetadata:{color:\"#FF5E60\",name:\"red\"}},{id:\"pink\",displayMetadata:{color:\"#FF8FB8\",name:\"pink\"}},{id:\"yellow\",displayMetadata:{color:\"#E9FF8F\",name:\"yellow\"}}];let f=class i extends c.Base{constructor(i,s,a){super(i),e.set(this,void 0),t.set(this,void 0),n.set(this,void 0),this.getProvider=()=>o(this,n,\"f\").getValue(),this.interopClients=new Map,this.contextGroupsById=new Map,r(this,t,a.contextGroups??[...y],\"f\"),r(this,e,a.fdc3Info,\"f\"),a?.logging&&(this.logging=a.logging),this.intentClientMap=new Map,this.lastContextMap=new Map,this.sessionContextGroupMap=new Map,r(this,n,new w.Lazy(s),\"f\"),this.setContextGroupMap(),this.setupChannelProvider()}static createClosedConstructor(...e){return class extends i{constructor(...t){if(t.length){const[n,i,r]=t;if(r&&\"object\"==typeof r&&!(0,u.default)(r,e[2]))return console.warn(\"You have modified the parameters of the InteropOverride constructor. This behavior is deprecated and will be removed in a future version. You can modify these options in your manifest. Please consult our Interop docs for guidance on migrating to the new override scheme.\"),void super(e[0],e[1],r);console.warn(\"You are attempting to pass arguments to the InteropOverride constructor. This is not necessary, and these passed arguments will be ignored. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.\")}super(...e)}}}setContext({context:e},t){this.wire.sendAction(\"interop-broker-set-context\").catch((e=>{}));const n=this.getClientState(t);if(!n||!n.contextGroupId)throw n?new Error(\"You must join a context group before you can set context.\"):new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);{const{contextGroupId:t}=n;this.setContextForGroup({context:e},t)}}setContextForGroup({context:e},t){this.wire.sendAction(\"interop-broker-set-context-for-group\").catch((e=>{}));const n=this.contextGroupsById.get(t);if(!n)throw new Error(`Unable to set context for context group that isn't in the context group mapping: ${t}.`);const r=i.checkContextIntegrity(e);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(e)}`);const o=e.type;n.set(o,e),this.lastContextMap.set(t,o);Array.from(this.interopClients.values()).filter((e=>e.contextGroupId===t)).forEach((t=>{for(const[,n]of t.contextHandlers)i.isContextTypeCompatible(o,n.contextType)&&this.invokeContextHandler(t.clientIdentity,n.handlerId,e)}))}getCurrentContext(e,t){this.wire.sendAction(\"interop-broker-get-current-context\").catch((e=>{}));const n=this.getClientState(t);if(!n?.contextGroupId)throw new Error(\"You must be a member of a context group to call getCurrentContext\");const{contextGroupId:i}=n,r=this.contextGroupsById.get(i),o=this.lastContextMap.get(i),s=e?.contextType??o;return r&&s?r.get(s):void 0}async joinContextGroup({contextGroupId:e,target:t},n){if(this.wire.sendAction(\"interop-broker-join-context-group\").catch((e=>{})),this.sessionContextGroupMap.has(e))throw new Error(l.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup);if(t){i.hasEndpointId(t)&&await this.addClientToContextGroup({contextGroupId:e},t);try{const n=this.channel.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name));if(!n.length)throw new Error(`Given Identity ${t.uuid} ${t.name} is not connected to the Interop Broker.`);n.length>1&&console.warn(`More than one connection found for identity ${t.uuid} ${t.name}`);const i=[];for(const t of n)i.push(this.addClientToContextGroup({contextGroupId:e},t));await Promise.all(i)}catch(e){throw new Error(e)}}else await this.addClientToContextGroup({contextGroupId:e},n)}async addClientToContextGroup({contextGroupId:e},t){this.wire.sendAction(\"interop-broker-add-client-to-context-group\").catch((e=>{}));const n=this.getClientState(t);if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(!this.getContextGroups().find((t=>t.id===e)))throw new Error(`Attempting to join a context group that does not exist: ${e}. You may only join existing context groups.`);if(n.contextGroupId!==e){n.contextGroupId=e,await this.setCurrentContextGroupInClientOptions(t,e);const i=this.contextGroupsById.get(e);for(const[,e]of n.contextHandlers){const{contextType:n,handlerId:r}=e;if(void 0===n)i.forEach(((e,n)=>{this.invokeContextHandler(t,r,e)}));else if(i.has(n)){const e=i.get(n);e&&this.invokeContextHandler(t,r,e)}}}}async removeFromContextGroup({target:e},t){if(this.wire.sendAction(\"interop-broker-remove-from-context-group\").catch((e=>{})),e){i.hasEndpointId(e)&&await this.removeClientFromContextGroup(e);try{const t=this.channel.connections.filter((t=>t.uuid===e.uuid&&t.name===e.name));if(!t.length)throw new Error(`No connection found for given Identity ${e.uuid} ${e.name}`);t.length>1&&console.warn(`More than one connection found for identity ${e.uuid} ${e.name}`);const n=[];for(const e of t)n.push(this.removeClientFromContextGroup(e));await Promise.all(n)}catch(e){throw new Error(e)}}else await this.removeClientFromContextGroup(t)}async removeClientFromContextGroup(e){this.wire.sendAction(\"interop-broker-remove-client-from-context-group\").catch((e=>{}));const t=this.getClientState(e);t&&(t.contextGroupId=void 0),await this.setCurrentContextGroupInClientOptions(e,null)}getContextGroups(){return this.wire.sendAction(\"interop-broker-get-context-groups\").catch((e=>{})),o(this,t,\"f\").map((e=>({...e})))}getInfoForContextGroup({contextGroupId:e}){return this.wire.sendAction(\"interop-broker-get-info-for-context-group\").catch((e=>{})),this.getContextGroups().find((t=>t.id===e))}getAllClientsInContextGroup({contextGroupId:e}){this.wire.sendAction(\"interop-broker-get-all-clients-in-context-group\").catch((e=>{}));return Array.from(this.interopClients.values()).filter((t=>t.contextGroupId===e)).map((e=>e.clientIdentity))}async handleFiredIntent(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.raiseIntent\",\"InteropBroker.handleFiredIntent\",t,\"interopClient.fireIntent\");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntent)}async setIntentTarget(e,t){this.wire.sendAction(\"interop-broker-set-intent-target\").catch((e=>{}));const n=this.intentClientMap.get(t.name),i=`intent-handler-${e.name}`;if(n){const t=n.get(i);if(t){if(t.pendingIntents.push(e),t.clientIdentity&&t.isReady){const{clientIdentity:e,pendingIntents:n}=t;try{const r=n[n.length-1];await this.invokeIntentHandler(e,i,r),t.pendingIntents=[]}catch(n){console.error(`Error invoking intent handler for client ${e.uuid}/${e.name}/${e.endpointId}`),t.isReady=!1}}}else n.set(i,{isReady:!1,pendingIntents:[e]})}else{this.intentClientMap.set(t.name,new Map);const n=this.intentClientMap.get(t.name);n&&n.set(i,{isReady:!1,pendingIntents:[e]})}}async handleInfoForIntent(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.findIntent\",\"InteropBroker.handleInfoForIntent\",t,\"interopClient.getInfoForIntent\");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntent)}async handleInfoForIntentsByContext(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.findIntentsByContext\",\"InteropBroker.handleInfoForIntentsByContext\",t,\"interopClient.getInfoForIntentsByContext\");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntentsByContext)}async handleFiredIntentForContext(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.raiseIntentForContext\",\"InteropBroker.handleFiredIntentForContext\",t,\"interopClient.fireIntentForContext\");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntentForContext)}async clientDisconnected(e){}async fdc3HandleOpen({app:e,context:t},n){const i=(0,l.generateOverrideWarning)(\"fdc3.open\",\"InteropBroker.fdc3HandleOpen\",n);throw console.warn(i),new Error(l.BROKER_ERRORS.fdc3Open)}async fdc3HandleFindInstances(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.open\",\"InteropBroker.fdc3HandleFindInstances\",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3FindInstances)}async fdc3HandleGetAppMetadata(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.getAppMetadata\",\"InteropBroker.fdc3HandleGetAppMetadata\",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3GetAppMetadata)}async invokeContextHandler(e,t,n){const i=await this.getProvider();try{await i.dispatch(e,t,n)}catch(i){console.error(`Error invoking context handler ${t} for context type ${n.type} in client ${e.uuid}/${e.name}/${e.endpointId}`,i)}}async invokeIntentHandler(e,t,n){const i=await this.getProvider();await i.dispatch(e,t,n)}async fdc3HandleGetInfo(t,n){const{fdc3Version:i}=t;return{fdc3Version:i,...o(this,e,\"f\"),optionalFeatures:{OriginatingAppMetadata:!1,UserChannelMembershipAPIs:!0},appMetadata:{appId:\"\",instanceId:\"\"}}}async getAllClientInfo(){return(await this.getProvider()).getAllClientInfo()}decorateSnapshot(e){return{...e,interopSnapshotDetails:{contextGroupStates:this.getContextGroupStates()}}}applySnapshot(e,t){const n=e?.interopSnapshotDetails?.contextGroupStates;n&&(t?.closeExistingWindows||this.updateExistingClients(n),this.rehydrateContextGroupStates(n))}updateExistingClients(e){this.interopClients.forEach((t=>{const{clientIdentity:n,contextGroupId:r,contextHandlers:o}=t;if(r){const t=e[r];for(const[,e]of Object.entries(t))o.forEach((t=>{const{handlerId:r,contextType:o}=t;i.isContextTypeCompatible(e.type,o)&&this.invokeContextHandler(n,r,e)}))}}))}getContextGroupStates(){return i.toObject(this.contextGroupsById)}rehydrateContextGroupStates(e){const t=Object.entries(e);for(const[e,n]of t){const t=Object.entries(n);for(const[n,i]of t)if(this.contextGroupsById.has(e)){this.contextGroupsById.get(e).set(n,i)}else console.warn(`Attempting to set a context group that isn't in the context group mapping. Skipping context group rehydration for: ${e}`)}}contextHandlerRegistered({contextType:e,handlerId:t},n){const i={contextType:e,handlerId:t},r=this.getClientState(n);if(r?.contextHandlers.set(t,i),r&&r.contextGroupId){const{contextGroupId:i}=r,o=this.contextGroupsById.get(i);if(void 0===e)o.forEach(((e,i)=>{this.invokeContextHandler(n,t,e)}));else if(o.has(e)){const i=o.get(e);i&&this.invokeContextHandler(n,t,i)}}}async intentHandlerRegistered(e,t){const{handlerId:n}=e,i=this.intentClientMap.get(t.name),r=i?.get(n);if(i)if(r){const{pendingIntents:e}=r;r.clientIdentity=t,r.isReady=!0;try{if(e.length>0){const i=e[e.length-1];await this.invokeIntentHandler(t,n,i),r.pendingIntents=[]}}catch(e){console.error(`Error invoking intent handler: ${n} for client ${t.uuid}/${t.name}/${t.endpointId}`)}}else i.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t});else{this.intentClientMap.set(t.name,new Map);const e=this.intentClientMap.get(t.name);e&&e.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t})}}removeContextHandler({handlerId:e},t){const n=this.getClientState(t);n&&n.contextHandlers.delete(e)}handleJoinSessionContextGroup({sessionContextGroupId:e},t){try{if(!e)throw new Error(\"Failed to join session context group: must specify group id.\");const n=this.sessionContextGroupMap.get(e);if(n)n.registerNewClient(t);else{const n=new h.default(this.channel,e);n.registerNewClient(t),this.sessionContextGroupMap.set(e,n)}return{hasConflict:this.contextGroupsById.has(e)}}catch(e){throw new Error(e)}}getClientState(e){return this.interopClients.get(e.endpointId)}static toObject(e){const t=Object.fromEntries(e),n={};return Object.entries(t).forEach((([e,t])=>{const i=Object.fromEntries(t);n[e]=i})),n}static checkContextIntegrity(e){if(!e)return{isValid:!1,reason:\"No context supplied\"};if(\"object\"!=typeof e)return{isValid:!1,reason:\"Context must be an Object\"};if(!e.type)return{isValid:!1,reason:\"Context must have a type property\"};if(e.id&&\"object\"!=typeof e.id)return{isValid:!1,reason:\"Context id must be an Object populated with key-value identifiers (if set)\"};if(e.id){const{id:t}=e,n=Object.keys(t);let i=!1;if(!n.length)return{isValid:!1,reason:\"Context id must have at least one key-value identifier\"};if(n.forEach((e=>{\"string\"==typeof e&&\"string\"==typeof t[e]||(i=!0)})),i)return{isValid:!1,reason:\"Context id key-value identifiers must be of type string\"}}return e.name&&\"string\"!=typeof e.name?{isValid:!1,reason:\"Context name must be of string type (if set)\"}:{isValid:!0}}static hasEndpointId(e){return void 0!==e.endpointId}static isContextTypeCompatible(e,t){return void 0===t||e===t}setContextGroupMap(){for(const e of this.getContextGroups())this.contextGroupsById.set(e.id,new Map)}async setCurrentContextGroupInClientOptions(e,t){try{const n=await this.fin.System.getEntityInfo(e.uuid,e.name);let i;\"view\"===n.entityType?i=await this.fin.View.wrap(e):\"window\"===n.entityType&&(i=await this.fin.Window.wrap(e)),i&&await i.updateOptions({interop:{currentContextGroup:t}})}catch(e){}}async setupChannelProvider(){try{const e=await this.getProvider();this.channel=e,this.wireChannel(e)}catch(e){throw new Error(`Error setting up Interop Broker Channel Provider: ${e}`)}}wireChannel(e){e.onConnection((async(e,t)=>{if(!await this.isConnectionAuthorized(e,t))throw new Error(`Connection not authorized for ${e.uuid}, ${e.name}`);if(!e.endpointId)throw new Error(\"Version too old to be compatible with Interop. Please upgrade your runtime to a more recent version.\");const n={contextGroupId:void 0,contextHandlers:new Map,clientIdentity:e};t?.currentContextGroup&&this.contextGroupsById.has(t.currentContextGroup)&&(n.contextGroupId=t?.currentContextGroup),this.interopClients.set(e.endpointId,n)})),e.onDisconnection((e=>{this.interopClients.delete(e.endpointId);const t=this.intentClientMap.get(e.name);t&&e.uuid===this.fin.me.uuid&&t.forEach((e=>{e.isReady=!1})),this.sessionContextGroupMap.forEach((t=>{t.onDisconnection(e)})),this.clientDisconnected(e)})),e.beforeAction((async(e,t,n)=>{if(!await this.isActionAuthorized(e,t,n))throw new Error(`Action (${e}) not authorized for ${n.uuid}, ${n.name}`);this.logging?.beforeAction?.enabled&&console.log(e,t,n)})),e.afterAction(((e,t,n)=>{this.logging?.afterAction?.enabled&&console.log(e,t,n)})),e.register(\"setContext\",this.setContext.bind(this)),e.register(\"fireIntent\",this.handleFiredIntent.bind(this)),e.register(\"getCurrentContext\",this.getCurrentContext.bind(this)),e.register(\"getInfoForIntent\",this.handleInfoForIntent.bind(this)),e.register(\"getInfoForIntentsByContext\",this.handleInfoForIntentsByContext.bind(this)),e.register(\"fireIntentForContext\",this.handleFiredIntentForContext.bind(this)),e.register(\"getContextGroups\",this.getContextGroups.bind(this)),e.register(\"joinContextGroup\",this.joinContextGroup.bind(this)),e.register(\"removeFromContextGroup\",this.removeFromContextGroup.bind(this)),e.register(\"getAllClientsInContextGroup\",this.getAllClientsInContextGroup.bind(this)),e.register(\"getInfoForContextGroup\",this.getInfoForContextGroup.bind(this)),e.register(\"contextHandlerRegistered\",this.contextHandlerRegistered.bind(this)),e.register(\"intentHandlerRegistered\",this.intentHandlerRegistered.bind(this)),e.register(\"removeContextHandler\",this.removeContextHandler.bind(this)),e.register(\"sessionContextGroup:createIfNeeded\",this.handleJoinSessionContextGroup.bind(this)),e.register(\"fdc3Open\",this.fdc3HandleOpen.bind(this)),e.register(\"fdc3v2FindIntentsByContext\",this.handleInfoForIntentsByContext.bind(this)),e.register(\"fdc3FindInstances\",this.fdc3HandleFindInstances.bind(this)),e.register(\"fdc3GetAppMetadata\",this.fdc3HandleGetAppMetadata.bind(this)),e.register(\"fdc3v2GetInfo\",(async(e,t)=>this.fdc3HandleGetInfo.bind(this)(e,t))),e.register(\"createPrivateChannelProvider\",(async e=>{const{channelId:t}=e,n=await this.fin.InterApplicationBus.Channel.create(t);p.PrivateChannelProvider.init(n,t)}))}isConnectionAuthorized(e,t){return this.wire.sendAction(\"interop-broker-is-connection-authorized\").catch((e=>{})),Promise.resolve(!0)}isActionAuthorized(e,t,n){return this.wire.sendAction(\"interop-broker-is-action-authorized\").catch((e=>{})),Promise.resolve(!0)}};return Gi.InteropBroker=f,e=new WeakMap,t=new WeakMap,n=new WeakMap,Gi}var zi,Ki={},qi={},Ji=s&&s.__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},Yi=s&&s.__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)};Object.defineProperty(qi,\"__esModule\",{value:!0});const Zi=d,Qi=Hi;class Xi extends Zi.Base{constructor(e,t,n){super(e),zi.set(this,void 0),this.id=n,Ji(this,zi,t,\"f\")}async setContext(e){this.wire.sendAction(\"interop-session-context-group-set-context\").catch((e=>{}));return(await Yi(this,zi,\"f\")).dispatch(`sessionContextGroup:setContext-${this.id}`,{sessionContextGroupId:this.id,context:e})}async getCurrentContext(e){this.wire.sendAction(\"interop-session-context-group-get-context\").catch((e=>{}));return(await Yi(this,zi,\"f\")).dispatch(`sessionContextGroup:getContext-${this.id}`,{sessionContextGroupId:this.id,type:e})}async addContextHandler(e,t){if(this.wire.sendAction(\"interop-session-context-group-add-handler\").catch((e=>{})),\"function\"!=typeof e)throw new Error(\"Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.\");const n=await Yi(this,zi,\"f\");let i;return i=t?`sessionContextHandler:invoke-${this.id}-${t}-${(0,Qi.generateId)()}`:`sessionContextHandler:invoke-${this.id}`,n.register(i,(0,Qi.wrapContextHandler)(e,i)),await n.dispatch(`sessionContextGroup:handlerAdded-${this.id}`,{handlerId:i,contextType:t}),{unsubscribe:await this.createUnsubscribeCb(i)}}async createUnsubscribeCb(e){const t=await Yi(this,zi,\"f\");return async()=>{t.remove(e),await t.dispatch(`sessionContextGroup:handlerRemoved-${this.id}`,{handlerId:e})}}getUserInstance(){return{id:this.id,setContext:(0,Qi.wrapInTryCatch)(this.setContext.bind(this),\"Failed to set context: \"),getCurrentContext:(0,Qi.wrapInTryCatch)(this.getCurrentContext.bind(this),\"Failed to get context: \"),addContextHandler:(0,Qi.wrapInTryCatch)(this.addContextHandler.bind(this),\"Failed to add context handler: \")}}}qi.default=Xi,zi=new WeakMap;var er={},tr={},nr={},ir={},rr=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),or=s&&s.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,\"default\",{enumerable:!0,value:t})}:function(e,t){e.default=t}),sr=s&&s.__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)&&rr(t,e,n);return or(t,e),t};Object.defineProperty(ir,\"__esModule\",{value:!0}),ir.PrivateChannelClient=void 0;const ar=sr(Hi);var cr,dr;function hr(){if(cr)return tr;cr=1;var e,t=s&&s.__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)},n=s&&s.__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},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(tr,\"__esModule\",{value:!0}),tr.FDC3ModuleBase=void 0;const o=nr,a=Hi,c=wr(),d=r(i);return tr.FDC3ModuleBase=class{get client(){return t(this,e,\"f\").call(this)}get fin(){return this.wire.getFin()}constructor(t,i){this.wire=i,e.set(this,void 0),n(this,e,t,\"f\")}async broadcast(e){return this.wire.sendAction(\"fdc3-broadcast\").catch((e=>{})),this.client.setContext(e)}async _open(e,t){this.wire.sendAction(\"fdc3-open\").catch((e=>{}));try{return await c.InteropClient.ferryFdc3Call(this.client,\"fdc3Open\",{app:e,context:t})}catch(e){const t=e.message===a.BROKER_ERRORS.fdc3Open?\"ResolverUnavailable\":e.message;throw new Error(t)}}async _getChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:\"system\",...(0,o.getUnsupportedChannelApis)()})))}async getOrCreateChannel(e){this.wire.sendAction(\"fdc3-get-or-create-channel\").catch((e=>{}));const t=(await this._getChannels()).find((t=>t.id===e));if(t)return{...t,type:\"system\",...(0,o.getUnsupportedChannelApis)()};try{const t=await this.client.joinSessionContextGroup(e);return(0,o.buildAppChannelObject)(t)}catch(e){throw console.error(e.message),new Error(o.ChannelError.CreationFailed)}}async getSystemChannels(){return this.wire.sendAction(\"fdc3-get-system-channels\").catch((e=>{})),this._getChannels()}async joinChannel(e){this.wire.sendAction(\"fdc3-join-channel\").catch((e=>{}));try{return await this.client.joinContextGroup(e)}catch(e){if(e.message===a.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup?console.error(\"The Channel you have tried to join is an App Channel. Custom Channels can only be defined by the Interop Broker through code or manifest configuration. Please use getOrCreateChannel.\"):console.error(e.message),e.message.startsWith(\"Attempting to join a context group that does not exist\"))throw new Error(o.ChannelError.NoChannelFound);throw new Error(o.ChannelError.AccessDenied)}}async getCurrentChannel(){this.wire.sendAction(\"fdc3-get-current-channel\").catch((e=>{}));const e=await this.getCurrentContextGroupInfo();return e?this.buildChannelObject(e):null}async leaveCurrentChannel(){return this.wire.sendAction(\"fdc3-leave-current-channel\").catch((e=>{})),this.client.removeFromContextGroup()}async getCurrentContextGroupInfo(){const e=await this.client.getContextGroups(),t=e.map((async e=>this.client.getAllClientsInContextGroup(e.id))),n=(await Promise.all(t)).findIndex((e=>e.some((e=>{const{uuid:t,name:n}=e;return this.wire.me.uuid===t&&this.wire.me.name===n}))));return e[n]}async buildChannelObject(e){return{...e,type:\"system\",addContextListener:(...[e,t])=>{let n,i;\"function\"==typeof e?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),n=e):(n=t,\"string\"==typeof e&&(i=e));const r=(async()=>{let e=!0;const t=await this.client.getCurrentContext(i);return this.client.addContextHandler(((i,r)=>{if(!e||(e=!1,!(0,d.default)(t,i)))return n(i,r)}),i)})();return{...r,unsubscribe:()=>r.then((e=>e.unsubscribe()))}},broadcast:this.broadcast.bind(this),getCurrentContext:async e=>{const t=await this.client.getCurrentContext(e);return void 0===t?null:t}}}},e=new WeakMap,tr}ir.PrivateChannelClient=class{constructor(e,t){this.id=t,this.client=e,this.listeners=new Map}async broadcast(e){return this.client.dispatch(\"broadcast\",{context:e})}async getCurrentContext(e){return this.client.dispatch(\"getCurrentContext\",{contextType:e})}async addContextListener(e,t){if(\"function\"!=typeof t)throw new Error(\"Non-function argument passed to the second parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.\");let n;n=e?`contextHandler:invoke-${this.id}-${e}-${ar.generateId()}`:`contextHandler:invoke-${this.id}-${ar.generateId()}`,this.client.register(n,ar.wrapContextHandler(t,n));const i={unsubscribe:await this.createContextUnsubscribeCb(n)};return this.listeners.set(n,i),await this.client.dispatch(\"contextHandlerAdded\",{handlerId:n,contextType:e}),i}createNonStandardUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch(\"nonStandardHandlerRemoved\",{handlerId:e})}}createContextUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch(\"contextHandlerRemoved\",{handlerId:e})}}onAddContextListener(e){const t=`onContextHandlerAdded:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch(\"onAddContextHandlerAdded\",{handlerId:t}),n}onDisconnect(e){const t=`onDisconnect:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch(\"onDisconnectHandlerAdded\",{handlerId:t}),n}onUnsubscribe(e){const t=`onUnsubscribe:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch(\"onUnsubscribeHandlerAdded\",{handlerId:t}),n}async cleanUpAllSubs(){Array.from(this.listeners.keys()).forEach((e=>{this.client.remove(e),this.listeners.delete(e)}))}async disconnect(){try{await this.client.dispatch(\"clientDisconnecting\"),await this.cleanUpAllSubs(),await this.client.disconnect()}catch(e){throw new Error(e.message)}}},function(e){var t=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,\"__esModule\",{value:!0}),e.getIntentResolution=e.isChannel=e.isContext=e.connectPrivateChannel=e.buildAppChannelObject=e.buildPrivateChannelObject=e.ChannelError=e.ResultError=e.UnsupportedChannelApiError=e.getUnsupportedChannelApis=void 0;const n=Hi,r=ir,o=t(i);e.getUnsupportedChannelApis=e=>({addContextListener:()=>{throw new a(\"Channel.addContextListener\",e)},broadcast:()=>{throw new a(\"Channel.broadcast\",e)},getCurrentContext:()=>{throw new a(\"Channel.getCurrentContext\",e)}});class a extends Error{constructor(e,t=\"System\"){super(e),this.message=`Calling ${e} on an instance of a ${t} Channel returned by fdc3.get${t}Channels is not supported. If you would like to use a ${t} Channel, please use fdc3.joinChannel, fdc3.addContextListener, and fdc3.broadcast instead.`}}var c,d;e.UnsupportedChannelApiError=a,function(e){e.NoResultReturned=\"NoResultReturned\",e.IntentHandlerRejected=\"IntentHandlerRejected\"}(c=e.ResultError||(e.ResultError={})),(d=e.ChannelError||(e.ChannelError={})).NoChannelFound=\"NoChannelFound\",d.AccessDenied=\"AccessDenied\",d.CreationFailed=\"CreationFailed\";e.buildPrivateChannelObject=e=>{let t=!1;const n=()=>{if(t)throw new Error(\"Private Channel Client has been disconnected from the Private Channel\")};return{id:e.id,type:\"private\",broadcast:async t=>(n(),e.broadcast(t)),getCurrentContext:async t=>(n(),e.getCurrentContext(t)),addContextListener:async(t,i)=>{n();let r=i,o=t;\"function\"==typeof t&&(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),r=t,o=null);return e.addContextListener(o,r)},onAddContextListener:t=>(n(),e.onAddContextListener(t)),disconnect:async()=>(n(),t=!0,e.disconnect()),onDisconnect:t=>(n(),e.onDisconnect(t)),onUnsubscribe:t=>(n(),e.onUnsubscribe(t))}};e.buildAppChannelObject=e=>({id:e.id,type:\"app\",broadcast:e.setContext,getCurrentContext:async t=>{const n=await e.getCurrentContext(t);return void 0===n?null:n},addContextListener:(t,n)=>{let i,r;\"function\"==typeof t?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),i=t):(i=n,\"string\"==typeof t&&(r=t));const s=(async()=>{let t=!0;const n=await e.getCurrentContext(r);return e.addContextHandler(((e,r)=>{if(!t||(t=!1,!(0,o.default)(n,e)))return i(e,r)}),r)})();return{...s,unsubscribe:()=>s.then((e=>e.unsubscribe()))}}});e.connectPrivateChannel=async t=>{try{const n=await fin.InterApplicationBus.Channel.connect(t),i=new r.PrivateChannelClient(n,t);return(0,e.buildPrivateChannelObject)(i)}catch(e){throw new Error(`Private Channel with id: ${t} doesn't exist`)}};e.isContext=e=>{if(e&&\"object\"==typeof e&&\"type\"in e){const{type:t}=e;return\"string\"==typeof t}return!1};e.isChannel=e=>{if(e&&\"object\"==typeof e&&\"type\"in e&&\"id\"in e){const{type:t,id:n}=e;return\"string\"==typeof t&&\"string\"==typeof n&&(\"app\"===t||\"private\"===t)}return!1};e.getIntentResolution=async(t,i,r,o)=>{const s=(0,n.generateId)(),a=new Promise(((e,t)=>{fin.InterApplicationBus.subscribe({uuid:\"*\"},s,(t=>{e(t)})).catch((()=>t(new Error(\"getResult is not supported in this environment\"))))})),d=r?{target:r,intentResolutionResultId:s}:{intentResolutionResultId:s},h=o?{name:o,context:i,metadata:d}:{...i,metadata:d},l=async()=>{let n=await a;if(!n||\"object\"!=typeof n)throw new Error(c.NoResultReturned);const{error:i}=n;if(i)throw new Error(c.IntentHandlerRejected);if((0,e.isChannel)(n)){const{id:i,type:r}=n;switch(r){case\"private\":n=await(0,e.connectPrivateChannel)(i);break;case\"app\":{const r=await t.joinSessionContextGroup(i);n=(0,e.buildAppChannelObject)(r);break}}}else if(!(0,e.isContext)(n))throw new Error(c.NoResultReturned);return n},u=o?await t.fireIntent(h):await t.fireIntentForContext(h);return\"object\"!=typeof u?{source:{appId:\"\",instanceId:\"\"},intent:\"\",version:\"2.0\",getResult:l}:{...u,getResult:l}}}(nr);var lr,ur,pr={};function wr(){if(ur)return Ki;ur=1;var e,t,n=s&&s.__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},i=s&&s.__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)},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ki,\"__esModule\",{value:!0}),Ki.InteropClient=void 0;const o=d,a=r(qi),c=function(){if(dr)return er;dr=1,Object.defineProperty(er,\"__esModule\",{value:!0}),er.Fdc3Module=void 0;const e=Hi,t=hr();class n extends t.FDC3ModuleBase{async open(e,t){await super._open(e,t)}addContextListener(e,t){let n;return this.wire.sendAction(\"fdc3-add-context-listener\").catch((e=>{})),\"function\"==typeof e?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),n=this.client.addContextHandler(e)):n=this.client.addContextHandler(t,null===e?void 0:e),{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}addIntentListener(e,t){this.wire.sendAction(\"fdc3-add-intent-listener\").catch((e=>{}));const n=this.client.registerIntentHandler((e=>{const{context:n,metadata:i}=e,{metadata:r}=n,o=i?.intentResolutionResultId||r?.intentResolutionResultId;o&&this.fin.InterApplicationBus.publish(o,null).catch((()=>null)),t(e.context)}),e,{fdc3Version:\"1.2\"});return{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}async raiseIntent(t,n,i){this.wire.sendAction(\"fdc3-raise-intent\").catch((e=>{}));const r=i?{name:t,context:n,metadata:{target:i}}:{name:t,context:n};try{return await this.client.fireIntent(r)}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntent?\"ResolverUnavailable\":t.message;throw new Error(n)}}async findIntent(t,n){this.wire.sendAction(\"fdc3-find-intent\").catch((e=>{}));try{return await this.client.getInfoForIntent({name:t,context:n})}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntent?\"ResolverUnavailable\":t.message;throw new Error(n)}}async findIntentsByContext(t){this.wire.sendAction(\"fdc3-find-intents-by-context\").catch((e=>{}));try{return await this.client.getInfoForIntentsByContext(t)}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntentsByContext?\"ResolverUnavailable\":t.message;throw new Error(n)}}async raiseIntentForContext(t,n){this.wire.sendAction(\"fdc3-raise-intent-for-context\").catch((e=>{}));try{return await this.client.fireIntentForContext({...t,metadata:{target:n}})}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntentForContext?\"ResolverUnavailable\":t.message;throw new Error(n)}}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}getInfo(){return this.wire.sendAction(\"fdc3-get-info\").catch((e=>{})),{providerVersion:this.wire.environment.getAdapterVersionSync(),provider:`openfin-${this.wire.me.uuid}`,fdc3Version:\"1.2\"}}}return er.Fdc3Module=n,er}(),h=function(){if(lr)return pr;lr=1,Object.defineProperty(pr,\"__esModule\",{value:!0}),pr.Fdc3Module2=void 0;const e=hr(),t=Hi,n=wr(),i=nr,r=ir;class o extends e.FDC3ModuleBase{async open(e,t){return\"string\"==typeof e&&console.warn(\"Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).\"),super._open(e,t)}async findInstances(e){this.wire.sendAction(\"fdc3-find-instances\").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,\"fdc3FindInstances\",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3FindInstances?\"ResolverUnavailable\":e.message;throw new Error(n)}}async getAppMetadata(e){this.wire.sendAction(\"fdc3-get-app-metadata\").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,\"fdc3GetAppMetadata\",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3GetAppMetadata?\"ResolverUnavailable\":e.message;throw new Error(n)}}async addContextListener(e,t){this.wire.sendAction(\"fdc3-add-context-listener\").catch((e=>{}));const n=e=>t=>{const{contextMetadata:n,...i}=t,r=n?[{...i},n]:[t,null];e(...r)};let i=t,r=n(i);return\"function\"==typeof e?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),i=e,r=n(i),this.client.addContextHandler(r)):this.client.addContextHandler(r,null===e?void 0:e)}async findIntent(e,n,i){this.wire.sendAction(\"fdc3-find-intent\").catch((e=>{}));try{return await this.client.getInfoForIntent({name:e,context:n,metadata:{resultType:i}})}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntent?\"ResolverUnavailable\":e.message;throw new Error(n)}}async findIntentsByContext(e,i){this.wire.sendAction(\"fdc3-find-intents-by-context\").catch((e=>{}));const r=i?{context:e,metadata:{resultType:i}}:e;try{return await n.InteropClient.ferryFdc3Call(this.client,\"fdc3v2FindIntentsByContext\",r)}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntentsByContext?\"ResolverUnavailable\":e.message;throw new Error(n)}}async raiseIntent(e,n,r){this.wire.sendAction(\"fdc3-raise-intent\").catch((e=>{}));try{return\"string\"==typeof r&&console.warn(\"Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).\"),(0,i.getIntentResolution)(this.client,n,r,e)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?\"ResolverUnavailable\":e.message;throw new Error(n)}}async raiseIntentForContext(e,n){this.wire.sendAction(\"fdc3-raise-intent-for-context\").catch((e=>{}));try{return\"string\"==typeof n&&console.warn(\"Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).\"),(0,i.getIntentResolution)(this.client,e,n)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?\"ResolverUnavailable\":e.message;throw new Error(n)}}async addIntentListener(e,t){if(this.wire.sendAction(\"fdc3-add-intent-listener\").catch((e=>{})),\"string\"!=typeof e)throw new Error(\"First argument must be an Intent name\");return this.client.registerIntentHandler((async e=>{let n,i;const{context:r,metadata:o}=e,{contextMetadata:s,metadata:a,...c}=r,d=o?.intentResolutionResultId||a?.intentResolutionResultId;try{const e=a?{metadata:a,...c}:{...c};n=await t(e,s),i=n}catch(e){n=e,i={error:!0}}if(d&&this.fin.InterApplicationBus.publish(d,i).catch((()=>null)),n instanceof Error)throw new Error(n.message);return n}),e,{fdc3Version:\"2.0\"})}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}async createPrivateChannel(){const e=(0,t.generateId)();await n.InteropClient.ferryFdc3Call(this.client,\"createPrivateChannelProvider\",{channelId:e});const o=await this.fin.InterApplicationBus.Channel.connect(e),s=new r.PrivateChannelClient(o,e);return(0,i.buildPrivateChannelObject)(s)}async getUserChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:\"user\",...(0,i.getUnsupportedChannelApis)(\"User\")})))}async getSystemChannels(){return console.warn(\"This API has been deprecated. Please use fdc3.getUserChannels instead.\"),super.getSystemChannels()}async joinUserChannel(e){return super.joinChannel(e)}async joinChannel(e){return console.warn(\"This API has been deprecated. Please use fdc3.joinUserChannel instead.\"),super.joinChannel(e)}async getCurrentChannel(){const e=await super.getCurrentChannel();return e?{...e,type:\"user\",broadcast:this.broadcast.bind(this)}:null}async getInfo(){return n.InteropClient.ferryFdc3Call(this.client,\"fdc3v2GetInfo\",{fdc3Version:\"2.0\"})}}return pr.Fdc3Module2=o,pr}(),l=Hi;let u=class extends o.Base{constructor(i,r){super(i),e.set(this,void 0),t.set(this,void 0),n(this,t,new Map,\"f\"),n(this,e,r,\"f\")}async setContext(t){this.wire.sendAction(\"interop-client-set-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"setContext\",{context:t})}async addContextHandler(t,n){if(this.wire.sendAction(\"interop-client-add-context-handler\").catch((e=>{})),\"function\"!=typeof t)throw new Error(\"Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.\");const r=await i(this,e,\"f\");let o;o=n?`invokeContextHandler-${n}-${(0,l.generateId)()}`:\"invokeContextHandler\";const s=(0,l.wrapContextHandler)(t,o);return r.register(o,s),await r.dispatch(\"contextHandlerRegistered\",{handlerId:o,contextType:n}),{unsubscribe:async()=>{r.remove(o),await r.dispatch(\"removeContextHandler\",{handlerId:o})}}}async getContextGroups(){this.wire.sendAction(\"interop-client-get-context-groups\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getContextGroups\")}async joinContextGroup(t,n){this.wire.sendAction(\"interop-client-join-context-group\").catch((e=>{}));const r=await i(this,e,\"f\");if(!t)throw new Error(\"No contextGroupId specified for joinContextGroup.\");return r.dispatch(\"joinContextGroup\",{contextGroupId:t,target:n})}async removeFromContextGroup(t){this.wire.sendAction(\"interop-client-remove-from-context-group\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"removeFromContextGroup\",{target:t})}async getAllClientsInContextGroup(t){this.wire.sendAction(\"interop-client-get-all-clients-in-context-group\").catch((e=>{}));const n=await i(this,e,\"f\");if(!t)throw new Error(\"No contextGroupId specified for getAllClientsInContextGroup.\");return n.dispatch(\"getAllClientsInContextGroup\",{contextGroupId:t})}async getInfoForContextGroup(t){this.wire.sendAction(\"interop-client-get-info-for-context-group\").catch((e=>{}));const n=await i(this,e,\"f\");if(!t)throw new Error(\"No contextGroupId specified for getInfoForContextGroup.\");return n.dispatch(\"getInfoForContextGroup\",{contextGroupId:t})}async fireIntent(t){this.wire.sendAction(\"interop-client-fire-intent\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"fireIntent\",t)}async registerIntentHandler(t,n,r){this.wire.sendAction(\"interop-client-register-intent-handler\").catch((e=>{}));const o=await i(this,e,\"f\"),s=`intent-handler-${n}`,a=(0,l.wrapIntentHandler)(t,s);try{await o.register(s,a),await o.dispatch(\"intentHandlerRegistered\",{handlerId:s,...r})}catch(e){throw new Error(\"Unable to register intent handler\")}return{unsubscribe:async()=>{o.remove(s)}}}async getCurrentContext(t){this.wire.sendAction(\"interop-client-get-current-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getCurrentContext\",{contextType:t})}async getInfoForIntent(t){this.wire.sendAction(\"interop-client-get-info-for-intent\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getInfoForIntent\",t)}async getInfoForIntentsByContext(t){this.wire.sendAction(\"interop-client-get-info-for-intents-by-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getInfoForIntentsByContext\",t)}async fireIntentForContext(t){this.wire.sendAction(\"interop-client-fire-intent-for-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"fireIntentForContext\",t)}async joinSessionContextGroup(n){try{const r=i(this,t,\"f\").get(n);if(r)return r.getUserInstance();const o=await i(this,e,\"f\"),{hasConflict:s}=await o.dispatch(\"sessionContextGroup:createIfNeeded\",{sessionContextGroupId:n});s&&console.warn(`A (non-session) context group with the name \"${n}\" already exists. If you are trying to join a Context Group, call joinContextGroup instead.`);const c=new a.default(this.wire,i(this,e,\"f\"),n);return i(this,t,\"f\").set(n,c),c.getUserInstance()}catch(e){throw console.error(`Error thrown trying to create Session Context Group with id \"${n}\": ${e}`),e}}async onDisconnection(t){this.wire.sendAction(\"interop-client-add-ondisconnection-listener\").catch((e=>{}));return(await i(this,e,\"f\")).onDisconnection((e=>{const{uuid:n}=e;t({type:\"interop-broker\",topic:\"disconnected\",brokerName:n})}))}getFDC3Sync(e){switch(e){case\"1.2\":return new c.Fdc3Module((()=>this),this.wire);case\"2.0\":return new h.Fdc3Module2((()=>this),this.wire);default:throw new Error(`Invalid FDC3 version provided: ${e}. Must be '1.2' or '2.0'`)}}async getFDC3(e){return this.getFDC3Sync(e)}static async ferryFdc3Call(t,n,r){return(await i(t,e,\"f\")).dispatch(n,r||null)}};return Ki.InteropClient=u,e=new WeakMap,t=new WeakMap,Ki}var yr,fr,gr,mr={};function vr(){if(yr)return mr;yr=1,Object.defineProperty(mr,\"__esModule\",{value:!0}),mr.overrideCheck=mr.checkFDC32Overrides=mr.getDefaultViewFdc3VersionFromAppInfo=void 0;const e=Vi();function t(t){return[\"fdc3HandleFindInstances\",\"handleInfoForIntent\",\"handleInfoForIntentsByContext\",\"fdc3HandleGetAppMetadata\",\"fdc3HandleGetInfo\",\"fdc3HandleOpen\",\"handleFiredIntent\",\"handleFiredIntentForContext\"].filter((n=>t[n]===e.InteropBroker.prototype[n]))}return mr.getDefaultViewFdc3VersionFromAppInfo=function({manifest:e,initialOptions:t}){const n=e?.platform?.defaultViewOptions?.fdc3InteropApi??t.defaultViewOptions?.fdc3InteropApi;return[\"1.2\",\"2.0\"].includes(n??\"\")?n:void 0},mr.checkFDC32Overrides=t,mr.overrideCheck=function(e,n){if(n&&\"2.0\"===n){const n=t(e);n.length>0&&console.warn(`WARNING: FDC3 2.0 has been set as a default option for Views in this Platform, but the required InteropBroker APIs for FDC3 2.0 compliance have not all been overridden.\\nThe following APIs need to be overridden:\\n${n.join(\"\\n\")}`)}},mr}function Cr(){return gr||(gr=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),i=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),i(function(){if(fr)return Ti;fr=1;var e=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ti,\"__esModule\",{value:!0}),Ti.InteropModule=void 0;const t=e(n),i=$i,r=d,o=Vi(),a=wr(),c=vr(),h=Tn,l=e=>new e,u=\"You have attempted to use or modify InteropBroker parameters, which is not allowed. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.\";class p extends r.Base{async init(e,n=l){this.wire.sendAction(\"interop-init\").catch((()=>{}));const r=await this.wire.environment.getInteropInfo(this.wire.getFin()),s=(0,i.createUnusableObject)(u),a=(0,i.createWarningObject)(u,(0,t.default)(r)),d=async()=>{throw new Error(u)},p=o.InteropBroker.createClosedConstructor(this.wire,(()=>this.fin.InterApplicationBus.Channel.create(`interop-broker-${e}`)),r);let w;return w=Array.isArray(n)?new((0,h.overrideFromComposables)(...n)(p))(s,d,a):await n(p,s,d,a),(0,c.overrideCheck)(w,r.fdc3Version),w}connectSync(e,t){return this.wire.sendAction(\"interop-connect-sync\").catch((()=>{})),new a.InteropClient(this.wire,this.wire.environment.whenReady().then((()=>this.fin.InterApplicationBus.Channel.connect(`interop-broker-${e}`,{payload:t}))))}}return Ti.InteropModule=p,Ti}(),e),i(wr(),e),i(Vi(),e)}(Li)),Li}var br={},Ir={},Er={},xr={};Object.defineProperty(xr,\"__esModule\",{value:!0}),xr.getSnapshotSourceChannelName=void 0;xr.getSnapshotSourceChannelName=e=>`snapshot-source-provider-${e.uuid}`;var Ar,Pr,Mr,_r,Or,Sr=s&&s.__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},Rr=s&&s.__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)};Object.defineProperty(Er,\"__esModule\",{value:!0}),Er.SnapshotSource=void 0;const Fr=d,jr=xr,kr=new Map;class Lr extends Fr.Base{constructor(e,t){super(e),Ar.set(this,void 0),Pr.set(this,(()=>(kr.has(this.identity.uuid)||kr.set(this.identity.uuid,{eventFired:null,clientPromise:null}),kr.get(this.identity.uuid)))),Mr.set(this,(()=>(Rr(this,Pr,\"f\").call(this).clientPromise||(Rr(this,Pr,\"f\").call(this).clientPromise=Rr(this,_r,\"f\").call(this)),Rr(this,Pr,\"f\").call(this).clientPromise))),_r.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);try{Rr(this,Pr,\"f\").call(this).eventFired||await Rr(this,Or,\"f\").call(this);const t=await this.fin.InterApplicationBus.Channel.connect(e,{wait:!1});return t.onDisconnection((()=>{Rr(this,Pr,\"f\").call(this).clientPromise=null,Rr(this,Pr,\"f\").call(this).eventFired=null})),t}catch(e){throw Rr(this,Pr,\"f\").call(this).clientPromise=null,new Error(\"The targeted SnapshotSource is not currently initialized. Await this object's ready() method.\")}})),Or.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);let t,n;const i=new Promise(((e,i)=>{t=e,n=i}));Rr(this,Pr,\"f\").call(this).eventFired=i;const r=async i=>{try{i.channelName===e&&(t(),await this.fin.InterApplicationBus.Channel.removeListener(\"connected\",r))}catch(e){n(e)}};await this.fin.InterApplicationBus.Channel.on(\"connected\",r)})),Sr(this,Ar,t,\"f\")}get identity(){return Rr(this,Ar,\"f\")}async ready(){this.wire.sendAction(\"snapshot-source-ready\").catch((e=>{}));try{await Rr(this,Mr,\"f\").call(this)}catch(e){await Rr(this,Pr,\"f\").call(this).eventFired}}async getSnapshot(){this.wire.sendAction(\"snapshot-source-get-snapshot\").catch((e=>{}));const e=await Rr(this,Mr,\"f\").call(this),t=await e.dispatch(\"get-snapshot\");return(await t).snapshot}async applySnapshot(e){this.wire.sendAction(\"snapshot-source-apply-snapshot\").catch((e=>{}));return(await Rr(this,Mr,\"f\").call(this)).dispatch(\"apply-snapshot\",{snapshot:e})}}Er.SnapshotSource=Lr,Ar=new WeakMap,Pr=new WeakMap,Mr=new WeakMap,_r=new WeakMap,Or=new WeakMap,Object.defineProperty(Ir,\"__esModule\",{value:!0}),Ir.SnapshotSourceModule=void 0;const Tr=d,$r=Er,Br=xr;class Gr extends Tr.Base{async init(e){if(this.wire.sendAction(\"snapshot-source-init\").catch((e=>{})),\"object\"!=typeof e||\"function\"!=typeof e.getSnapshot||\"function\"!=typeof e.applySnapshot)throw new Error(\"you must pass in a valid SnapshotProvider\");const t=await this.fin.InterApplicationBus.Channel.create((0,Br.getSnapshotSourceChannelName)(this.fin.me));t.register(\"get-snapshot\",(async()=>({snapshot:await e.getSnapshot()}))),t.register(\"apply-snapshot\",(({snapshot:t})=>e.applySnapshot(t)))}wrapSync(e){return this.wire.sendAction(\"snapshot-source-wrap-sync\").catch((e=>{})),new $r.SnapshotSource(this.wire,e)}async wrap(e){return this.wire.sendAction(\"snapshot-source-wrap\").catch((e=>{})),this.wrapSync(e)}}Ir.SnapshotSourceModule=Gr,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Ir,e),n(Er,e)}(br),Object.defineProperty(a,\"__esModule\",{value:!0});var Wr=a.Fin=void 0;const Hr=t,Nr=c,Dr=ie(),Ur=Z(),Vr=de,zr=en,Kr=rn,qr=un,Jr=bn,Yr=J(),Zr=An,Qr=ki,Xr=Cr(),eo=br;class to extends Hr.EventEmitter{constructor(e){super(),this.wire=e,this.System=new Nr.System(e),this.Window=new Dr._WindowModule(e),this.Application=new Ur.ApplicationModule(e),this.InterApplicationBus=new Vr.InterApplicationBus(e),this.Clipboard=new zr.Clipboard(e),this.ExternalApplication=new Kr.ExternalApplicationModule(e),this.Frame=new qr._FrameModule(e),this.GlobalHotkey=new Jr.GlobalHotkey(e),this.Platform=new Zr.PlatformModule(e,this.InterApplicationBus.Channel),this.View=new Yr.ViewModule(e),this.Interop=new Xr.InteropModule(e),this.SnapshotSource=new eo.SnapshotSourceModule(e),e.registerFin(this),this.me=(0,Qr.getMe)(e),e.on(\"disconnected\",(()=>{this.emit(\"disconnected\")}))}}Wr=a.Fin=to;var no={},io={};function ro(e){return\"string\"==typeof e.manifestUrl}function oo(e){return ao(e)&&\"string\"==typeof e.address}function so(e){return oo(e)&&\"string\"==typeof e.token}function ao(e){return\"string\"==typeof e.uuid}function co(e){return e.runtime&&\"string\"==typeof e.runtime.version}function ho(e){return ao(e)&&co(e)}Object.defineProperty(io,\"__esModule\",{value:!0}),io.isInternalConnectConfig=io.isPortDiscoveryConfig=io.isNewConnectConfig=io.isConfigWithReceiver=io.isRemoteConfig=io.isExistingConnectConfig=io.isExternalConfig=void 0,io.isExternalConfig=ro,io.isExistingConnectConfig=oo,io.isRemoteConfig=so,io.isConfigWithReceiver=function(e){return\"object\"==typeof e.receiver&&so({...e,address:\"\"})},io.isNewConnectConfig=ho,io.isPortDiscoveryConfig=function(e){return ro(e)&&co(e)||ho(e)},io.isInternalConnectConfig=function(e){return oo(e)||ho(e)};var lo={},uo={};Object.defineProperty(uo,\"__esModule\",{value:!0}),uo.EmitterMap=void 0;const po=t;function wo(e){return Buffer.from(e).toString(\"base64\")}uo.EmitterMap=class{constructor(){this.storage=new Map}hashKeys(e){return e.map(wo).join(\"/\")}getOrCreate(e){const t=this.hashKeys(e);return this.storage.has(t)||this.storage.set(t,new po.EventEmitter),this.storage.get(t)}has(e){return this.storage.has(this.hashKeys(e))}delete(e){const t=this.hashKeys(e);return this.storage.delete(t)}},Object.defineProperty(lo,\"__esModule\",{value:!0});const yo=uo;class fo extends yo.EmitterMap{constructor(){super(...arguments),this.dispatchEvent=e=>{if(function(e){return\"process-desktop-event\"===e.action}(e)){const{payload:t}=e,n=function(e){const{topic:t}=e;if(\"frame\"===t||\"window\"===t||\"view\"===t){const{uuid:n,name:i}=e;return[t,n,i]}if(\"application\"===t){const{uuid:n}=e;return[t,n]}return[t]}(t);if(this.has(n))return this.getOrCreate(n).emit(t.type,t),!0}return!1}}}lo.default=fo;var go,mo,vo=s&&s.__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},Co=s&&s.__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)},bo=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(no,\"__esModule\",{value:!0});var Io=no.Transport=void 0;const Eo=t,xo=io,Ao=g,Po=bo(lo),Mo=ki,_o=ke;class Oo extends Eo.EventEmitter{constructor(e,t,n){super(),this.wireListeners=new Map,this.topicRefMap=new Map,this.eventAggregator=new Po.default,this.messageHandlers=[this.eventAggregator.dispatchEvent],go.set(this,void 0),mo.set(this,void 0),this.connectSync=()=>{Co(this,go,\"f\").connectSync()},this.getPort=()=>Co(this,go,\"f\").getPort(),vo(this,go,new e(this.onmessage.bind(this)),\"f\"),this.environment=t,this.sendRaw=Co(this,go,\"f\").send.bind(Co(this,go,\"f\")),this.registerMessageHandler(this.handleMessage.bind(this)),Co(this,go,\"f\").on(\"disconnected\",(()=>{for(const[,{handleNack:e}]of this.wireListeners)e({reason:\"Remote connection has closed\"});this.wireListeners.clear(),this.emit(\"disconnected\")}));const{uuid:i,name:r}=n,o=this.environment.getCurrentEntityType();this.me=(0,Mo.getBaseMe)(o,i,r)}getFin(){if(!Co(this,mo,\"f\"))throw new Error(\"No Fin object registered for this transport\");return Co(this,mo,\"f\")}registerFin(e){if(Co(this,mo,\"f\"))throw new Error(\"Fin object has already been registered for this transport\");vo(this,mo,e,\"f\")}shutdown(){return Co(this,go,\"f\").shutdown()}async connect(e){if((0,xo.isConfigWithReceiver)(e))return await Co(this,go,\"f\").connect(e.receiver),this.authorize(e);if((0,xo.isRemoteConfig)(e))return this.connectRemote(e);if((0,xo.isExistingConnectConfig)(e))return this.connectByPort(e);if((0,xo.isNewConnectConfig)(e)){const t=await this.environment.retrievePort(e);return this.connectByPort({...e,address:`ws://localhost:${t}`})}}async connectRemote(e){return await Co(this,go,\"f\").connect(new(this.environment.getWsConstructor())(e.address)),this.authorize(e)}async connectByPort(e){const{address:t,uuid:n}=e,i={...e,type:\"file-token\"},r=Co(this,go,\"f\");await r.connect(new(this.environment.getWsConstructor())(e.address));const o=await this.sendAction(\"request-external-authorization\",{uuid:n,type:\"file-token\"},!0);if(\"external-authorization-response\"!==o.action)throw new Ao.UnexpectedActionError(o.action);return await this.environment.writeToken(o.payload.file,o.payload.token),this.authorize(i)}async authorize(e){const t=await this.sendAction(\"request-authorization\",e,!0);if(\"authorization-response\"!==t.action)throw new Ao.UnexpectedActionError(t.action);if(!0!==t.payload.success)throw new Ao.RuntimeError(t.payload)}sendAction(e,t={},n=!1){let i=()=>{};const r=Ao.RuntimeError.getCallSite(1),o=this.environment.getNextMessageId(),s=new Promise(((s,a)=>{i=a;const c={action:e,payload:t,messageId:o},d=Co(this,go,\"f\");return this.addWireListener(o,s,(e=>this.nackHandler(e,a,r)),n),d.send(c).catch(a)}));return Object.assign(s,{cancel:i,messageId:o})}nackHandler(e,t,n){t(\"string\"==typeof e?e:new Ao.RuntimeError(e,n))}ferryAction(e){return new Promise(((t,n)=>{const i=this.environment.getNextMessageId();e.messageId=i;const r=e=>{t(e.payload)};return Co(this,go,\"f\").send(e).then((()=>this.addWireListener(i,r,(e=>this.nackHandler(e,n)),!1))).catch(n)}))}registerMessageHandler(e){this.messageHandlers.push(e)}addWireListener(e,t,n,i){i?this.uncorrelatedListener=t:this.wireListeners.has(e)?n({reason:\"Duplicate handler id\",error:(0,_o.errorToPOJO)(new Ao.DuplicateCorrelationError(String(e)))}):this.wireListeners.set(e,{resolve:t,handleNack:n})}onmessage(e){for(const t of this.messageHandlers)t.call(null,e)}handleMessage(e){const t=e.correlationId||NaN;if(\"correlationId\"in e){if(!this.wireListeners.has(t))return!1;{const{resolve:n,handleNack:i}=this.wireListeners.get(t);\"ack\"!==e.action?i({reason:\"Did not receive ack action\",error:(0,_o.errorToPOJO)(new Ao.NoAckError(e.action))}):\"payload\"in e?e.payload.success?n.call(null,e):i(e.payload):\"string\"==typeof e.reason?i(e):(console.warn(\"Received invalid response from core\",e),i({reason:\"invalid response shape\"})),this.wireListeners.delete(t)}}else this.uncorrelatedListener&&this.uncorrelatedListener.call(null,e),this.uncorrelatedListener=()=>{};return!0}}Io=no.Transport=Oo,go=new WeakMap,mo=new WeakMap;const So=(...e)=>({log:(...t)=>console.debug(`[${(new Date).toISOString()}]`,...(e=>e.map((e=>`[${e}]`)))(e),...t),getLogger:(...t)=>So(...e,...t)}),Ro=So(\"@openfin/core-web/client\");function Fo(e,t){if(!function(e){return\"string\"==typeof e}(e))throw new Error(`Property ${t} has invalid type. Expected string, got ${typeof e}.`)}const jo=\"web-broker-ports-ready\",ko=Ro.getLogger(\"get-web-interop-ports\");function Lo(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)}function To(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}\"function\"==typeof SuppressedError&&SuppressedError;const $o=e=>{var n,i,r;return r=class extends t.EventEmitter{constructor(t){super(),n.set(this,void 0),i.set(this,!1),this.connectSync=()=>{Lo(this,i,\"f\")||(e.addEventListener(\"message\",(e=>{e.data?.topic?.startsWith(\"wire-message\")&&e.data.message&&Lo(this,n,\"f\").call(this,{...JSON.parse(e.data.message),ports:e.ports})})),e.start())},this.connect=async()=>{this.connectSync()},this.send=t=>(e.postMessage({topic:\"wire-message\",message:JSON.stringify(t)}),Promise.resolve()),this.shutdown=async()=>{e.close()},To(this,n,t,\"f\")}getPort(){return e}},n=new WeakMap,i=new WeakMap,r};var Bo={},Go={};Object.defineProperty(Go,\"__esModule\",{value:!0}),Go.BaseEnvironment=void 0;const Wo=vr();Go.BaseEnvironment=class{async getViewWindowIdentity(e,t){const{identity:n}=await e.View.wrapSync(t).getCurrentWindow();return n}async getInteropInfo(e){const t=await e.Application.getCurrentSync().getInfo().catch((()=>null)),n=t?.initialOptions?.interopBrokerConfiguration??{};return{fdc3Version:t?(0,Wo.getDefaultViewFdc3VersionFromAppInfo)(t):void 0,...n,fdc3Info:{providerVersion:await e.System.getVersion(),provider:\"OpenFin\"}}}},Object.defineProperty(Bo,\"__esModule\",{value:!0});var Ho=Bo.BrowserEnvironment=void 0;const No=Go;class Do extends No.BaseEnvironment{constructor(){super(...arguments),this.type=\"other\",this.getRandomId=()=>{const e=new Uint32Array(1);return window.crypto.getRandomValues(e)[0].toString(32)}}getAdapterVersionSync(){return\"\"}observeBounds(e,t){throw new Error(\"Method not implemented.\")}layoutAllowedInContext(e){return!1}initLayoutManager(e,t,n){throw new Error(\"Method not implemented.\")}applyLayoutSnapshot(e,t,n){throw new Error(\"Method not implemented.\")}createLayout(e,t){throw new Error(\"Method not implemented.\")}destroyLayout(e,t){throw new Error(\"Method not implemented.\")}resolveLayout(e,t){throw new Error(\"Method not implemented.\")}initPlatform(...e){throw new Error(\"Method not implemented.\")}writeToken(e,t){return Promise.resolve(\"\")}retrievePort(e){throw new Error(\"Method not implemented.\")}getNextMessageId(){return this.getRandomId()}createChildContent(e){throw new Error(\"Method not implemented.\")}getWebWindow(e){throw new Error(\"Method not implemented.\")}getCurrentEntityIdentity(){throw new Error(\"Method not implemented.\")}getCurrentEntityType(){return\"external connection\"}raiseEvent(e,t){throw new Error(\"Method not implemented.\")}getUrl(){return location.href}getDefaultChannelOptions(){return{create:{},connect:{}}}getRtcPeer(){return new RTCPeerConnection}getWsConstructor(){return WebSocket}whenReady(){return Promise.resolve()}}Ho=Bo.BrowserEnvironment=Do;const Uo=e=>\"platform\"in e&&void 0!==e.platform;var Vo,zo;class Ko extends Ho{constructor(e){super(),this.connectConfig=e,Vo.set(this,void 0),zo.set(this,new W((async()=>Promise.resolve().then((function(){return require(\"./main-b14f67c9.js\")}))))),Uo(e)&&this.validatePlatformOptions(e)}getAdapterVersionSync(){return\"0.39.21\"}validatePlatformOptions({platform:e}){if(!(\"layoutSnapshot\"in e))throw new Error(\"Platform options are missing layoutSnapshot. Please provide a layoutSnapshot in the platform options.\");if(\"windows\"in e||\"windows\"in e.layoutSnapshot)throw new Error(\"It appears you tried to call connect() with a snapshot object from an OpenFin desktop environment. Note that connect() expects to be called with a platform property with this structure: { platform: { layoutSnapshot } }. To get a layoutSnapshot of the expected structure, use fin.Platform.Layout.getCurrentLayoutManagerSync().getLayoutSnapshot() in v34+ in your desktop environment.\");const{layouts:t}=e.layoutSnapshot;Object.entries(t).map((([e,t])=>{if(\"object\"!=typeof t||null===t)throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must be an object.`);if(!(\"content\"in t))throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must contain a 'content' property.`)}))}async getInteropInfo(e){return{...{contextGroups:void 0,logging:{beforeAction:{enabled:!1},afterAction:{enabled:!1}}},fdc3Version:void 0,fdc3Info:{providerVersion:\"0.39.21\",provider:\"OpenFin Web\"}}}layoutAllowedInContext(e){return!0}async initLayoutManager(e,t,n){if(Lo(this,Vo,\"f\"))throw new Error(\"Layout already initialized.\");if(!Uo(this.connectConfig))throw new Error(\"Platform options are missing from connection config.\");const{WebLayoutEntryPoint:i}=await Lo(this,zo,\"f\").getValue();return To(this,Vo,new i(this.connectConfig),\"f\"),await Lo(this,Vo,\"f\").initLayoutManager(e,t,n)}async applyLayoutSnapshot(e,t,n){Lo(this,Vo,\"f\")?.applyLayoutSnapshot(e,t,n)}async createLayout(e,t){return Lo(this,Vo,\"f\")?.createLayout(e,t)}async destroyLayout(e,t){return Lo(this,Vo,\"f\")?.destroyLayout(e,t)}async getViewWindowIdentity(e,t){return Promise.resolve({uuid:t.uuid,name:t.uuid})}}Vo=new WeakMap,zo=new WeakMap;const qo=()=>{const e=((e,t)=>{const n=new RegExp(`^${t}<(?.*)>$`).exec(e)?.groups?.meta;if(n)try{return JSON.parse(atob(n))}catch(e){throw new Error(`Failed to decode JSON from ${n}.`)}})(window.name,\"of-frame\");if(e)try{const{name:t,uuid:n,brokerUrl:i,providerId:r,contextGroup:o}=e;return Fo(i,\"brokerUrl\"),Fo(n,\"uuid\"),Fo(t,\"name\"),{identity:{name:t,uuid:n},brokerUrl:i,interopConfig:{providerId:r,currentContextGroup:o}}}catch(e){throw new Error(`Unexpected error occurred when inferring platform information: ${e.stack}`)}},Jo=()=>{const e=r.v4();return{uuid:e,name:e}},Yo=async e=>{if(\"enabled\"===e.connectionInheritance){const t=await(async e=>{const t=qo();if(t){const{validateOptions:n=(()=>!0)}=e,{identity:i,...r}=t;if(!await n(r))throw new Error(\"Parent options were rejected by validateOptions.\");return t}})(e);if(t)return t}if(!e.options){const t=\"enabled\"===e.connectionInheritance?\"Broker URL was not specified nor provided by a platform container.\":\"Connection inheritance is disabled but no options were provided.\";throw new Error(t)}return{...e.options,identity:Jo()}};exports.__classPrivateFieldGet=Lo,exports.__classPrivateFieldSet=To,exports.apiExposer=Gn,exports.commonjsGlobal=s,exports.connect=async t=>{try{Ro.log(\"Establishing connection\",t);const{brokerUrl:n,identity:i,timeout:r,interopConfig:s}=await Yo(t),{workerPort:a,iframeBrokerPort:c}=await(async(e,t,n)=>{const{origin:i}=new URL(e),r=document.createElement(\"IFRAME\");let s;r.style.display=\"none\";try{return await new Promise(((a,c)=>{const d=e=>{if(e.source===r.contentWindow&&e.data?.topic===`ack-${jo}`){if(e.origin!==i)c(new Error(`Broker redirected to unexpected origin ${e.origin}, expected ${i}.`));else if(e.data.success){const[t,n]=e.ports;a({iframeBrokerPort:t,workerPort:n})}else c(new m(e.data));window.removeEventListener(\"message\",d),clearTimeout(s)}};window.addEventListener(\"message\",d),ko.log(`Connecting to broker ${e}`),r.setAttribute(\"src\",e),r.setAttribute(\"name\",o(t,\"of-broker\")),document.body.appendChild(r),ko.log(\"Iframe loaded, awaiting init message from iframe\"),n&&(s=setTimeout((()=>{window.removeEventListener(\"message\",d),document.body.removeChild(r),c(new Error(\"Worker did not initialize in time\"))}),n))}))}catch(e){throw new Error(`Failed to initialise Fin Web Client. ${e.message}`,{cause:e})}})(n,i,r);Ro.log(\"Successfully established connection to shared worker\");const d={entityType:\"external connection\",...i};a.start(),c.start();const h=((t,n,i)=>{const r=$o(n),o=new Ko(t),s=new Io(r,o,i);return s.connectSync(),window.Buffer=e.Buffer,new Wr(s)})(t,a,d);return s?.providerId&&(h.me.interop=h.Interop.connectSync(s.providerId),s?.currentContextGroup&&h.me.interop.joinContextGroup(s.currentContextGroup).catch((e=>{console.warn(`Error joining specified context group: ${s?.currentContextGroup}, continuing`,e)}))),{...h,me:{...h.me,identity:{uuid:h.me.uuid,name:h.me.name}}}}catch(e){throw new Error(`An error occured during web-interop connection: ${e.message}`)}},exports.decorators=Nn,exports.encodeOptions=o,exports.layout_constants=ai,exports.lazy=G;\n","\"use strict\";var t=require(\"./main-8cad4070.js\"),e=require(\"uuid\");require(\"buffer/\"),require(\"events\"),require(\"lodash/cloneDeep\"),require(\"lodash/isEqual\");var i={},n={};Object.defineProperty(n,\"__esModule\",{value:!0}),n.mapValuesAsync=n.mapEntriesAsync=void 0;const o=(t,[e,i])=>({...t,[e]:i});async function s(t,e){return(await Promise.all(e.map((async([e,i])=>[e,await t(i,e)])))).reduce(o,{})}n.mapEntriesAsync=s,n.mapValuesAsync=async function(t,e){let i;return i=e instanceof Map?[...e.entries()]:Object.entries(e),s(t,i)};var r,a,l,h,d=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldSet||function(t,e,i,n,o){if(\"m\"===n)throw new TypeError(\"Private method is not writable\");if(\"a\"===n&&!o)throw new TypeError(\"Private accessor was defined without a setter\");if(\"function\"==typeof e?t!==e||!o:!e.has(t))throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");return\"a\"===n?o.call(t,i):o?o.value=i:e.set(t,i),i},c=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldGet||function(t,e,i,n){if(\"a\"===i&&!n)throw new TypeError(\"Private accessor was defined without a getter\");if(\"function\"==typeof e?t!==e||!n:!e.has(t))throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");return\"m\"===i?n:\"a\"===i?n.call(t):n?n.value:e.get(t)};Object.defineProperty(i,\"__esModule\",{value:!0});var m=i.DefaultLayoutManager=void 0;const u=n;class p{constructor(t){a.set(this,void 0),l.set(this,new Map),d(this,a,t,\"f\")}size(){return c(this,l,\"f\").size}async applyLayoutSnapshot({layouts:t}){if(Object.keys(t).length>1)throw new Error(\"[LayoutManager] Tried to call applyLayoutSnapshot with more than 1 layout. When implementing multiple layouts via overridden LayoutManager class, you must override and fully implement the applyLayoutSnapshot method without calling super.applyLayoutSnapshot().\");const[[e,i]]=Object.entries(t);await p.createLayout(this,{layoutName:e,layout:i})}async showLayout({layoutName:t}){}async getLayoutSnapshot(){return{layouts:await(0,u.mapValuesAsync)((t=>t.getFrameSnapshot()),c(this,l,\"f\"))}}async removeLayout({layoutName:t}){}getLayoutIdentityForView(t){const e=[...c(this,l,\"f\").values()].find((e=>e.getCurrentViews().some((e=>e.name===t.name&&e.uuid===t.uuid))));return e?.identity??void 0}isLayoutVisible({layoutName:t}){return c(p,r,\"m\",h).call(p,this,t).isVisible()}resolveLayoutIdentity(t){if(t&&\"layoutName\"in t)return t;const e=[...c(this,l,\"f\").values()];if(1===e.length)return e[0].identity;const i=e.find((t=>t.isVisible()));return i?.identity??void 0}static async resolveLayout(t,e){const i=t.resolveLayoutIdentity(e);if(void 0===i||!(\"layoutName\"in i))throw new Error(\"[layout-manager] resolveLayout: Could not resolve the layout identity. Make sure you include 'layoutName' in the identity object.\");return c(p,r,\"m\",h).call(p,t,i.layoutName)}static async handleSharedView(t,e,i){await(0,u.mapValuesAsync)((async t=>{if(t.identity.layoutName!==e.layoutName){const e=t.getCurrentViews().find((t=>t.name===i.name));e&&await t.onViewDetached({viewIdentity:e,target:null}).catch(console.error)}}),c(t,l,\"f\"))}static async handleLastViewRemoved(t,e){await t.removeLayout(e),await c(t,a,\"f\").handleLastViewRemoved(t)}static async destroyLayout(t,{layoutName:e}){await c(p,r,\"m\",h).call(p,t,e).destroy(),c(t,l,\"f\").delete(e)}static async createLayout(t,e){const{layoutName:i}=e;if(c(t,l,\"f\").has(i))throw new Error(`Layout name ${i} already exists`);await c(t,a,\"f\").createLayout(e,t)}static registerLayout(t,e,i){c(t,l,\"f\").set(e,i)}static getAllLayouts(t){return[...c(t,l,\"f\").values()]}static setInitialSnapshot(t,e){c(t,a,\"f\").setInitialSnapshot(e)}static createClosedConstructor(...t){return class extends p{constructor(){super(...t)}}}}m=i.DefaultLayoutManager=p,r=p,a=new WeakMap,l=new WeakMap,h=function(t,e){const i=c(t,l,\"f\").get(e);if(!i)throw new Error(`[layout-manager] getLayoutByName: Could not locate layout with name '${e}'`);return i};var g={},f={},v={};Object.defineProperty(v,\"__esModule\",{value:!0}),v.ReversibleMap=void 0;v.ReversibleMap=class{constructor(){this.valueToKey=new Map,this.keyToValue=new Map,this.setUnique=(t,e)=>{if(this.hasKey(t)||this.hasValue(e))throw new Error(\"Key or value already in the map.\");this.keyToValue.set(t,e),this.valueToKey.set(e,t)},this.getKey=t=>{const e=this.valueToKey.get(t);if(!e)throw new Error(\"Value not found in the map.\");return e},this.deleteKey=t=>{const e=this.getValue(t);return this.keyToValue.delete(t),this.valueToKey.delete(e),e},this.deleteValue=t=>{const e=this.getKey(t);return this.keyToValue.delete(e),this.valueToKey.delete(t),e},this.hasKey=t=>this.keyToValue.has(t),this.hasValue=t=>this.valueToKey.has(t)}getValue(t){const e=this.keyToValue.get(t);if(!e)throw new Error(\"Key not found in the map.\");return e}},Object.defineProperty(f,\"__esModule\",{value:!0});var _=f.LayoutContentCache=void 0;const y=t.lazy,C=v;class w{constructor(){this.contentItemCache=new C.ReversibleMap,this.contentItemCacheId=0,this.createCacheKey=()=>{const t=`entity-${this.contentItemCacheId.toString()}`;return this.contentItemCacheId+=1,t},this.hasKey=t=>this.contentItemCache.hasKey(t),this.getItemOrUndefined=t=>{try{return this.getContentItemOrThrow(t)}catch(t){return}},this.getContentItemOrThrow=(t,e)=>{if(!this.contentItemCache.hasKey(t))throw new Error(\"Layout component has been destroyed or detached from the current layout.\");const i=this.contentItemCache.getValue(t);if(e&&!e.includes(i.type))throw new Error(`Layout item is not the expected type. Expected ${e.join(\", \")}, got ${i.type}.`);return i},this.getOrCreateEntityId=t=>{if(this.contentItemCache.hasValue(t))return this.contentItemCache.getKey(t);t.onDestroyed((()=>{this.contentItemCache.deleteValue(t)}));const e=this.createCacheKey();return this.contentItemCache.setUnique(e,t),e}}static getSingleInstance(){return w.singleton.getValue()}}_=f.LayoutContentCache=w,w.singleton=new y.Lazy((()=>new w));var I={},b={};!function(t){Object.defineProperty(t,\"__esModule\",{value:!0}),t.getAdjacentStacks=t.doShareEdge=t.getAdjacentItem=void 0;t.getAdjacentItem=(e,i)=>{const{parent:n}=e;if(e.isRoot()||!n)return;const o=[\"top\",\"bottom\"].includes(i)?\"column\":\"row\",s=[\"top\",\"left\"].includes(i)?-1:1;if(n.type===o){const t=n.contentItems.indexOf(e)+s;if(t>=0&&t{const n=t.getBounds(),o=e.getBounds();if(!n||!o)return!1;if([\"top\",\"bottom\"].includes(i)){return!(n.righto.right)}return!(n.bottomo.bottom)};t.getAdjacentStacks=(e,i)=>{const n=[\"top\",\"bottom\"].includes(i)?\"row\":\"column\",o=s=>\"stack\"===s.type?(0,t.doShareEdge)(e,s,i)?[s]:[]:\"root\"===s.type||\"ground\"===s.type?[]:s.type===n?s.contentItems.map((t=>o(t))).flat():s.type!==n?[\"top\",\"right\"].includes(i)?o(s.contentItems[s.contentItems.length-1]):o(s.contentItems[0]):[],s=(0,t.getAdjacentItem)(e,i);return s?o(s):[]}}(b);var S=t.commonjsGlobal&&t.commonjsGlobal.__decorate||function(t,e,i,n){var o,s=arguments.length,r=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if(\"object\"==typeof Reflect&&\"function\"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(s<3?o(r):s>3?o(e,i,r):o(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};Object.defineProperty(I,\"__esModule\",{value:!0}),I.LayoutEntitiesController=void 0;const E=t.decorators,x=b,L=i;class z{constructor(t,e,i){this.wire=t,this.layoutManager=e,this.layoutContentCache=i,this.analytics=t=>{this.wire.sendAction(`layout-controller-${t}`).catch((()=>{}))},this.getLayoutIdentityForViewOrThrow=async t=>{const e=this.layoutManager.getLayoutIdentityForView(t);if(!e)throw new Error(`View identity ${t.name} is not attached to any layouts.`);return e},this.getRoot=async t=>{this.analytics(\"get-root\");const e=(await this.getLayout(t)).getRoot();return{type:e.type,entityId:this.layoutContentCache.getOrCreateEntityId(e)}},this.getStackByView=async t=>{this.analytics(\"get-stack-by-view\");const e=await this.getLayoutIdentityForViewOrThrow(t),i=(await this.getLayout(e)).getStackByView(t);if(\"stack\"===i?.type)return{entityId:this.layoutContentCache.getOrCreateEntityId(i),type:\"stack\"}},this.getStackViews=t=>{this.analytics(\"get-stack-views\");return this.layoutContentCache.getContentItemOrThrow(t,[\"stack\"]).contentItems.map((t=>({name:t.viewName,uuid:this.wire.me.uuid})))},this.isRoot=t=>{this.analytics(\"is-root\");return this.layoutContentCache.getContentItemOrThrow(t).isRoot()},this.exists=t=>(this.analytics(\"exists\"),this.layoutContentCache.hasKey(t)),this.addViewToStack=async(t,e,{index:i}={index:0})=>{this.analytics(\"add-view-to-stack\");const n=this.layoutContentCache.getContentItemOrThrow(t);if(i&&i>n.contentItems.length+1)throw new Error(`Index '${i}' out of range, please exclude the index or specify a number between 0 and ${n.contentItems.length}`);const o={id:t,index:i},{identity:s}=await n.layout.platformCreateView(e,{location:o});return s},this.findViewInStack=(t,e)=>t.contentItems.find((t=>t.viewName===e.name)),this.removeViewFromStack=async(t,e)=>{this.analytics(\"remove-view-from-stack\");const i=this.layoutContentCache.getContentItemOrThrow(t,[\"stack\"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to remove a view ('${e.name}') which does not belong to the stack.`);await n.layout.platformCloseView(e)},this.createAdjacentStack=async(t,e,{position:i=\"right\"}={})=>{if(this.analytics(\"create-adjacent-stack\"),!Array.isArray(e)||0===e.length)throw new Error('The parameter \"views\" must be an array with at least 1 element.');if(![\"top\",\"bottom\",\"left\",\"right\"].includes(i))throw new Error(`Invalid position '${i}' specified.`);const n=this.layoutContentCache.getContentItemOrThrow(t).createAdjacentStack({position:i}),o=this.layoutContentCache.getOrCreateEntityId(n);return await Promise.all(e.reverse().map((t=>this.addViewToStack(o,t)))),o},this.getAdjacentStacks=async({targetId:t,edge:e})=>{this.analytics(\"get-adjacent-stacks\");const i=this.layoutContentCache.getContentItemOrThrow(t);return(0,x.getAdjacentStacks)(i,e).map((t=>({entityId:this.layoutContentCache.getOrCreateEntityId(t)})))},this.setStackActiveView=async(t,e)=>{this.analytics(\"set-stack-active-view\");const i=this.layoutContentCache.getContentItemOrThrow(t,[\"stack\"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to set a view ('${e.name}') as active when it does not belong to the stack.`);i.setActiveContentItem(n,!0)}}async getLayout(t){const e=await L.DefaultLayoutManager.resolveLayout(this.layoutManager,t);if(!e)throw new Error(`Could not resolve target layout identity ${JSON.stringify(t)}`);return e}getContent(t){this.analytics(\"get-content\");return this.layoutContentCache.getContentItemOrThrow(t,[\"column\",\"row\"]).contentItems.map((t=>({type:t.type,entityId:this.layoutContentCache.getOrCreateEntityId(t)})))}getParent(t){this.analytics(\"get-parent\");const e=this.layoutContentCache.getContentItemOrThrow(t);if(!e.isRoot())return e.parent?.contentItems.includes(e)?{type:e.parent.type,entityId:this.layoutContentCache.getOrCreateEntityId(e.parent)}:void 0}}S([(0,E.expose)()],z.prototype,\"getLayoutIdentityForViewOrThrow\",void 0),S([(0,E.expose)()],z.prototype,\"getRoot\",void 0),S([(0,E.expose)()],z.prototype,\"getStackByView\",void 0),S([(0,E.expose)()],z.prototype,\"getStackViews\",void 0),S([(0,E.expose)()],z.prototype,\"getContent\",null),S([(0,E.expose)()],z.prototype,\"getParent\",null),S([(0,E.expose)()],z.prototype,\"isRoot\",void 0),S([(0,E.expose)()],z.prototype,\"exists\",void 0),S([(0,E.expose)()],z.prototype,\"addViewToStack\",void 0),S([(0,E.expose)()],z.prototype,\"removeViewFromStack\",void 0),S([(0,E.expose)()],z.prototype,\"createAdjacentStack\",void 0),S([(0,E.expose)()],z.prototype,\"getAdjacentStacks\",void 0),S([(0,E.expose)()],z.prototype,\"setStackActiveView\",void 0),I.LayoutEntitiesController=z,Object.defineProperty(g,\"__esModule\",{value:!0});var M=g.initLayoutEndpoints=void 0;const P=t.apiExposer,T=t.layout_constants,A=f,k=I,D=i;M=g.initLayoutEndpoints=async function(t,e){const i=t.getFin(),n=await i.Platform.getCurrentSync().getClient(),o=new P.ChannelsExposer(n);await new P.ApiExposer(o).exposeInstance(new k.LayoutEntitiesController(t,e,A.LayoutContentCache.getSingleInstance()),{id:T.LAYOUT_CONTROLLER_ID}),await async function(t,e){const i=t=>async i=>{const n=await D.DefaultLayoutManager.resolveLayout(e,i.target);if(!n)throw new Error(`Could not resolve the layout target from payload ${JSON.stringify(i)}`);return t(n,i)},n=(e,n)=>{t.register(e,i(n))},o=(t,e)=>{n(t,e)};n(\"replace-view\",((t,e)=>t.replaceView(e))),n(\"replace-layout\",((t,{layout:e})=>t.replaceLayout(e))),n(\"add-view\",((t,e)=>t.insertView(e))),o(\"layout-add-view\",((t,{viewOptions:e,location:i,targetView:n})=>t.platformCreateView(e,{location:i,targetView:n}))),n(\"close-view\",((t,e)=>t.cleanupView(e.viewIdentity))),o(\"layout-close-view\",((t,e)=>t.platformCloseView(e.viewIdentity))),n(\"apply-preset-layout\",((t,e)=>t.applyPreset(e))),n(\"get-layout-views\",(t=>t.getCurrentViews())),n(\"get-frame-snapshot\",(t=>t.getFrameSnapshot())),n(\"is-visible\",(t=>t.isVisible())),n(\"destroy\",(t=>t.destroy())),t.register(\"get-layout-snapshot\",(()=>e.getLayoutSnapshot()))}(n,e)};var R={};Object.defineProperty(R,\"__esModule\",{value:!0});var U=R.BaseLayout=void 0;U=R.BaseLayout=class{};var O={};Object.defineProperty(O,\"__esModule\",{value:!0});var V=O.DOMEmitter=void 0;V=O.DOMEmitter=class{constructor(t){this.container=t}dispatchLocalEvent(t,e){const i={...e,type:t,tabSelector:`tab-${e.name}`,containerSelector:`container-${e.name}`,topic:\"openfin-DOM-event\"};this.container.dispatchEvent(new CustomEvent(t,{detail:i}))}};var B={};Object.defineProperty(B,\"__esModule\",{value:!0});var H=B.mapLayoutContentItemsImmutableSync=B.mapLayoutContentItemsImmutable=W=B.isVisible=void 0;var W=B.isVisible=t=>(0!==t.offsetWidth||0!==t.offsetHeight)&&\"hidden\"!==window.getComputedStyle(t).visibility&&t.offsetTop>=0&&t.offsetLeft>=0&&t.offsetTop<=window.innerHeight&&t.offsetLeft<=window.innerWidth;const F=t=>\"type\"in t&&\"component\"===t.type;B.mapLayoutContentItemsImmutable=async function t(e,i){return F(i)?e(i):{...i,content:await Promise.all(i.content?.map((i=>t(e,i))))}},H=B.mapLayoutContentItemsImmutableSync=function t(e,i){return F(i)?e(i):{...i,content:i.content?.map((i=>t(e,i)))}};class N extends Error{constructor(t,e){super(e),this.type=t}}class G extends N{constructor(t,e){super(\"Configuration\",t),this.node=e}}class j extends N{constructor(t){super(\"PopoutBlocked\",t)}}class $ extends N{constructor(t){super(\"API\",t)}}class Z extends N{constructor(t){super(\"Bind\",t)}}class q extends Error{constructor(t,e,i){super(`${t}: ${e}${void 0===i?\"\":\": \"+i}`)}}class X extends q{constructor(t,e){super(\"Assert\",t,e)}}class Y extends q{constructor(t,e,i){super(\"UnreachableCase\",t,`${e}${void 0===i?\"\":\": \"+i}`)}}class K extends q{constructor(t,e){super(\"UnexpectedNull\",t,e)}}class J extends q{constructor(t,e){super(\"UnexpectedUndefined\",t,e)}}var Q;!function(t){let e=!1;const i={PopoutCannotBeCreatedWithGroundItemConfig:{id:0,default:\"Popout cannot be created with ground ItemConfig\"},PleaseRegisterAConstructorFunction:{id:1,default:\"Please register a constructor function\"},ComponentTypeNotRegisteredAndBindComponentEventHandlerNotAssigned:{id:2,default:\"Component type not registered and BindComponentEvent handler not assigned\"},ComponentIsAlreadyRegistered:{id:3,default:\"Component is already registered\"},ComponentIsNotVirtuable:{id:4,default:\"Component is not virtuable. Requires rootHtmlElement field/getter\"},VirtualComponentDoesNotHaveRootHtmlElement:{id:5,default:'Virtual component does not have getter \"rootHtmlElement\"'},ItemConfigIsNotTypeComponent:{id:6,default:\"ItemConfig is not of type component\"},InvalidNumberPartInSizeString:{id:7,default:\"Invalid number part in size string\"},UnknownUnitInSizeString:{id:8,default:\"Unknown unit in size string\"},UnsupportedUnitInSizeString:{id:9,default:\"Unsupported unit in size string\"}};t.idCount=Object.keys(i).length;const n=Object.values(i);t.checkInitialise=function(){if(!e)for(let e=0;e=\"0\"&&t<=\"9\"}function Tt(t,e){const i=zt(e);t.style.width=i}function At(t,e){const i=zt(e);t.style.height=i}function kt(t){return{width:t.offsetWidth,height:t.offsetHeight}}function Dt(t,e){t.style.display=e?\"\":\"none\"}function Rt(t,e){if(void 0!==e)for(const i in e)if(e.hasOwnProperty(i)){const n=e[i],o=t[i];t[i]=Ut(o,n)}return t}function Ut(t,e){if(\"object\"!=typeof e)return e;if(Array.isArray(e)){const t=e.length,i=new Array(t);for(let n=0;n36)throw new Error(\"Too many keys in config minifier map\")},t.translateObject=n}(dt||(dt={})),function(t){t.defaults={type:at.ground,content:[],size:1,sizeUnit:ht.Fractional,minSize:void 0,minSizeUnit:ht.Pixel,id:\"\",isClosable:!0},t.createCopy=function(t,e){switch(t.type){case at.ground:case at.row:case at.column:return gt.createCopy(t,e);case at.stack:return ut.createCopy(t,e);case at.component:return pt.createCopy(t);default:throw new Y(\"CICC91354\",t.type,\"Invalid Config Item type specified\")}},t.createDefault=function(t){switch(t){case at.ground:throw new X(\"CICCDR91562\");case at.row:case at.column:return gt.createDefault(t);case at.stack:return ut.createDefault();case at.component:return pt.createDefault();default:throw new Y(\"CICCDD91563\",t,\"Invalid Config Item type specified\")}},t.isComponentItem=function(t){return t.type===at.component},t.isStackItem=function(t){return t.type===at.stack},t.isGroundItem=function(t){return t.type===at.ground}}(ct||(ct={})),function(t){t.defaultMaximised=!1,function(t){t.createCopy=function(t,e){return void 0===t?void 0:{show:null!=e?e:t.show,popout:t.popout,close:t.close,maximise:t.maximise,minimise:t.minimise,tabDropdown:t.tabDropdown}}}(t.Header||(t.Header={}))}(mt||(mt={})),function(t){function e(t){const e=t.length,i=new Array(e);for(let n=0;n\"__glMaximised\"===t));t>0&&(o=!0,n=n.splice(t,1)),e=n.length>0?n[0]:ct.defaults.id}else e=n;return i=void 0!==t.maximised?t.maximised:o,{id:e,maximised:i}}}(wt||(wt={})),function(t){function e(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0;return{resolved:!0,root:Et.resolve(i),openPopouts:t.resolveOpenPopouts(e.openPopouts),dimensions:t.Dimensions.resolve(e.dimensions),settings:t.Settings.resolve(e.settings),header:t.Header.resolve(e.header,e.settings,e.labels)}}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:Lt.fromResolvedArray(e.openPopouts),settings:_t.Settings.createCopy(e.settings),dimensions:t.Dimensions.fromResolved(e.dimensions),header:_t.Header.createCopy(e.header)}},t.isResolved=function(t){const e=t;return void 0!==e.resolved&&!0===e.resolved},t.resolveOpenPopouts=function(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0,{root:Et.resolve(o),openPopouts:xt.resolveOpenPopouts(e.openPopouts),dimensions:xt.Dimensions.resolve(e.dimensions),settings:xt.Settings.resolve(e.settings),header:xt.Header.resolve(e.header,e.settings,e.labels),parentId:null!==(i=e.parentId)&&void 0!==i?i:null,indexInParent:null!==(n=e.indexInParent)&&void 0!==n?n:null,window:t.Window.resolve(e.window,e.dimensions),resolved:!0}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:i(e.openPopouts),dimensions:xt.Dimensions.fromResolved(e.dimensions),settings:_t.Settings.createCopy(e.settings),header:_t.Header.createCopy(e.header),parentId:e.parentId,indexInParent:e.indexInParent,window:t.Window.fromResolved(e.window)}},t.fromResolvedArray=i}(Lt||(Lt={}));class Wt{constructor(){this._allEventSubscriptions=[],this._subscriptionsMap=new Map,this.unbind=this.removeEventListener,this.trigger=this.emit}tryBubbleEvent(t,e){}emit(t,...e){let i=this._subscriptionsMap.get(t);if(void 0!==i){i=i.slice();for(let t=0;t0){const n=e.slice();n.unshift(t);const o=this._allEventSubscriptions.slice();for(let t=0;t0?n.contentItems[0]:n,e=0);const o=this._layoutManager.createAndInitContentItem(i,t);t.addChild(o,e),this._layoutManager.layoutConfig.settings.popInOnClose?this._onClose():this.close()}createWindow(){const t=this.createUrl(),e=Math.floor(1e6*Math.random()).toString(36),i=this.serializeWindowFeatures({width:this._initialWindowSize.width,height:this._initialWindowSize.height,innerWidth:this._initialWindowSize.width,innerHeight:this._initialWindowSize.height,menubar:\"no\",toolbar:\"no\",location:\"no\",personalbar:\"no\",resizable:\"yes\",scrollbars:\"no\",status:\"no\"});if(this._popoutWindow=globalThis.open(t,e,i),this._popoutWindow)this._popoutWindow.addEventListener(\"load\",(()=>this.positionWindow()),{passive:!0}),this._popoutWindow.addEventListener(\"beforeunload\",(()=>{this._layoutManager.layoutConfig.settings.popInOnClose?this.popIn():this._onClose()}),{passive:!0}),this._checkReadyInterval=setInterval((()=>this.checkReady()),10);else if(!0===this._layoutManager.layoutConfig.settings.blockedPopoutsThrowError){throw new j(\"Popout blocked\")}}checkReady(){if(null===this._popoutWindow)throw new K(\"BPCR01844\");this._popoutWindow.__glInstance&&this._popoutWindow.__glInstance.isInitialised&&(this.onInitialised(),void 0!==this._checkReadyInterval&&(clearInterval(this._checkReadyInterval),this._checkReadyInterval=void 0))}serializeWindowFeatures(t){const e=[];for(const i in t)e.push(i+\"=\"+t[i].toString());return e.join(\",\")}createUrl(){const t=\"gl-window-config-\"+Ot(),e=_t.minifyConfig(this._config);try{localStorage.setItem(t,JSON.stringify(e))}catch(t){throw new Error(\"Error while writing to localStorage \"+function(t){return t instanceof Error?t.message:\"string\"==typeof t?t:\"Unknown Error\"}(t))}const i=new URL(location.href);return i.searchParams.set(\"gl-window\",t),i.toString()}positionWindow(){if(null===this._popoutWindow)throw new Error(\"BrowserPopout.positionWindow: null popoutWindow\");this._popoutWindow.moveTo(this._initialWindowSize.left,this._initialWindowSize.top),this._popoutWindow.focus()}onInitialised(){this._isInitialised=!0,this.getGlInstance().on(\"popIn\",(()=>this.popIn())),this.emit(\"initialised\")}_onClose(){setTimeout((()=>this.emit(\"closed\")),50)}}class Gt extends Wt{constructor(t,e,i,n){super(),this.layoutManager=t,this._parent=i,this._element=n,this._popInParentIds=[],this._type=e.type,this._id=e.id,this._isInitialised=!1,this.isGround=!1,this.isRow=!1,this.isColumn=!1,this.isStack=!1,this.isComponent=!1,this.size=e.size,this.sizeUnit=e.sizeUnit,this.minSize=e.minSize,this.minSizeUnit=e.minSizeUnit,this._isClosable=e.isClosable,this._pendingEventPropagations={},this._throttledEvents=[\"stateChanged\"],this._contentItems=this.createContentItems(e.content)}get type(){return this._type}get id(){return this._id}set id(t){this._id=t}get popInParentIds(){return this._popInParentIds}get parent(){return this._parent}get contentItems(){return this._contentItems}get isClosable(){return this._isClosable}get element(){return this._element}get isInitialised(){return this._isInitialised}static isStack(t){return t.isStack}static isComponentItem(t){return t.isComponent}static isComponentParentableItem(t){return t.isStack||t.isGround}removeChild(t,e=!1){const i=this._contentItems.indexOf(t);if(-1===i)throw new Error(\"Can't remove child item. Unknown content item\");if(e||this._contentItems[i].destroy(),this._contentItems.splice(i,1),this._contentItems.length>0)this.updateSize(!1);else if(!this.isGround&&!0===this._isClosable){if(null===this._parent)throw new K(\"CIUC00874\");this._parent.removeChild(this)}}addChild(t,e,i){return null!=e||(e=this._contentItems.length),this._contentItems.splice(e,0,t),t.setParent(this),!0===this._isInitialised&&!1===t._isInitialised&&t.init(),e}replaceChild(t,e,i=!1){const n=this._contentItems.indexOf(t),o=t._element.parentNode;if(-1===n)throw new X(\"CIRCI23232\",\"Can't replace child. oldChild is not child of this\");if(null===o)throw new K(\"CIRCP23232\");if(o.replaceChild(e._element,t._element),!0===i&&(t._parent=null,t.destroy()),this._contentItems[n]=e,e.setParent(this),e.size=t.size,e.sizeUnit=t.sizeUnit,e.minSize=t.minSize,e.minSizeUnit=t.minSizeUnit,null===e._parent)throw new K(\"CIRCNC45699\");!0===e._parent._isInitialised&&!1===e._isInitialised&&e.init(),this.updateSize(!1)}remove(){if(null===this._parent)throw new K(\"CIR11110\");this._parent.removeChild(this)}popout(){const t=Ot(),e=this.layoutManager.createPopoutFromContentItem(this,void 0,t,void 0);return this.emitBaseBubblingEvent(\"stateChanged\"),e}calculateConfigContent(){const t=this._contentItems,e=t.length,i=new Array(e);for(let n=0;nthis.propagateEventToLayoutManager(t,e))))}propagateEventToLayoutManager(t,e){this._pendingEventPropagations[t]=!1,this.layoutManager.emitUnknown(t,e)}}class jt extends Gt{constructor(t,e,i){super(t,e,i,document.createElement(\"div\")),this._parentItem=i,this._focused=!1,this.isComponent=!0,this._reorderEnabled=e.reorderEnabled,this.applyUpdatableConfig(e),this._initialWantMaximise=e.maximised;const n=document.createElement(\"div\");n.classList.add(\"lm_content\"),this.element.appendChild(n),this._container=new Ft(e,this,t,n,(t=>this.handleUpdateItemConfigEvent(t)),(()=>this.show()),(()=>this.hide()),(t=>this.focus(t)),(t=>this.blur(t)))}get componentName(){return this._container.componentType}get componentType(){return this._container.componentType}get reorderEnabled(){return this._reorderEnabled}get initialWantMaximise(){return this._initialWantMaximise}get component(){return this._container.component}get container(){return this._container}get parentItem(){return this._parentItem}get headerConfig(){return this._headerConfig}get title(){return this._title}get tab(){return this._tab}get focused(){return this._focused}destroy(){this._container.destroy(),super.destroy()}applyUpdatableConfig(t){this.setTitle(t.title),this._headerConfig=t.header}toConfig(){const t=this._container.stateRequestEvent,e=void 0===t?this._container.state:t();return{type:at.component,content:[],size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,maximised:!1,isClosable:this.isClosable,reorderEnabled:this._reorderEnabled,title:this._title,header:mt.Header.createCopy(this._headerConfig),componentType:pt.copyComponentType(this.componentType),componentState:e}}close(){if(null===this.parent)throw new K(\"CIC68883\");this.parent.removeChild(this,!1)}enterDragMode(t,e){Tt(this.element,t),At(this.element,e),this._container.enterDragMode(t,e)}exitDragMode(){this._container.exitDragMode()}enterStackMaximised(){this._container.enterStackMaximised()}exitStackMaximised(){this._container.exitStackMaximised()}drag(){this._container.drag()}updateSize(t){this.updateNodeSize(t)}init(){this.updateNodeSize(!1),super.init(),this._container.emit(\"open\"),this.initContentItems()}setTitle(t){this._title=t,this.emit(\"titleChanged\",t),this.emit(\"stateChanged\")}setTab(t){this._tab=t,this.emit(\"tab\",t),this._container.setTab(t)}hide(){super.hide(),this._container.setVisibility(!1)}show(){super.show(),this._container.setVisibility(!0)}focus(t=!1){this.parentItem.setActiveComponentItem(this,!0,t)}setFocused(t){this._focused=!0,this.tab.setFocused(),t||this.emitBaseBubblingEvent(\"focus\")}blur(t=!1){this._focused&&this.layoutManager.setFocusedComponentItem(void 0,t)}setBlurred(t){this._focused=!1,this.tab.setBlurred(),t||this.emitBaseBubblingEvent(\"blur\")}setParent(t){this._parentItem=t,super.setParent(t)}handleUpdateItemConfigEvent(t){this.applyUpdatableConfig(t)}updateNodeSize(t){if(\"none\"!==this.element.style.display){const{width:e,height:i}=kt(this.element);this._container.setSizeToNodeSize(e,i,t)}}}class $t extends Gt{constructor(){super(...arguments),this._focused=!1}get focused(){return this._focused}setFocusedValue(t){this._focused=t}}class Zt extends Wt{constructor(t,e){super(),this._eElement=t,this._pointerTracking=!1,this._pointerDownEventListener=t=>this.onPointerDown(t),this._pointerMoveEventListener=t=>this.onPointerMove(t),this._pointerUpEventListener=t=>this.onPointerUp(t),this._timeout=void 0,this._allowableTargets=[t,...e],this._oDocument=document,this._eBody=document.body,this._nDelay=1800,this._nDistance=10,this._nX=0,this._nY=0,this._nOriginalX=0,this._nOriginalY=0,this._dragging=!1,this._eElement.addEventListener(\"pointerdown\",this._pointerDownEventListener,{passive:!0})}destroy(){this.checkRemovePointerTrackingEventListeners(),this._eElement.removeEventListener(\"pointerdown\",this._pointerDownEventListener)}cancelDrag(){this.processDragStop(void 0)}onPointerDown(t){if(this._allowableTargets.includes(t.target)&&t.isPrimary){const e=this.getPointerCoordinates(t);this.processPointerDown(e)}}processPointerDown(t){this._nOriginalX=t.x,this._nOriginalY=t.y,this._oDocument.addEventListener(\"pointermove\",this._pointerMoveEventListener),this._oDocument.addEventListener(\"pointerup\",this._pointerUpEventListener,{passive:!0}),this._pointerTracking=!0,this._timeout=setTimeout((()=>{try{this.startDrag()}catch(t){throw console.error(t),t}}),this._nDelay)}onPointerMove(t){this._pointerTracking&&(this.processDragMove(t),t.preventDefault())}processDragMove(t){this._nX=t.pageX-this._nOriginalX,this._nY=t.pageY-this._nOriginalY,!1===this._dragging&&(Math.abs(this._nX)>this._nDistance||Math.abs(this._nY)>this._nDistance)&&this.startDrag(),this._dragging&&this.emit(\"drag\",this._nX,this._nY,t)}onPointerUp(t){this.processDragStop(t)}processDragStop(t){var e;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this.checkRemovePointerTrackingEventListeners(),!0===this._dragging&&(this._eBody.classList.remove(\"lm_dragging\"),this._eElement.classList.remove(\"lm_dragging\"),null===(e=this._oDocument.querySelector(\"iframe\"))||void 0===e||e.style.setProperty(\"pointer-events\",\"\"),this._dragging=!1,this.emit(\"dragStop\",t))}checkRemovePointerTrackingEventListeners(){this._pointerTracking&&(this._oDocument.removeEventListener(\"pointermove\",this._pointerMoveEventListener),this._oDocument.removeEventListener(\"pointerup\",this._pointerUpEventListener),this._pointerTracking=!1)}startDrag(){var t;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this._dragging=!0,this._eBody.classList.add(\"lm_dragging\"),this._eElement.classList.add(\"lm_dragging\"),null===(t=this._oDocument.querySelector(\"iframe\"))||void 0===t||t.style.setProperty(\"pointer-events\",\"none\"),this.emit(\"dragStart\",this._nOriginalX,this._nOriginalY)}getPointerCoordinates(t){return{x:t.pageX,y:t.pageY}}}class qt{constructor(t,e,i){this._isVertical=t,this._size=e,this._grabSize=i0){const i=this.createSplitter(Math.max(0,e-1)).element;e>0?(this.contentItems[e-1].element.insertAdjacentElement(\"afterend\",i),i.insertAdjacentElement(\"afterend\",t.element)):(this.contentItems[0].element.insertAdjacentElement(\"beforebegin\",i),i.insertAdjacentElement(\"beforebegin\",t.element))}else this._childElementContainer.appendChild(t.element);super.addChild(t,e);const n=1/this.contentItems.length*100;if(!0===i)return this.emitBaseBubblingEvent(\"stateChanged\"),e;for(let e=0;e0&&(this.calculateRelativeSizes(),this.setAbsoluteSizes()),this.emitBaseBubblingEvent(\"stateChanged\"),this.emit(\"resize\")}setAbsoluteSizes(){const t=this.calculateAbsoluteSizes();for(let e=0;e0&&t.itemSizes[e]++,this._isColumn?(Tt(this.contentItems[e].element,t.crossAxisSize),At(this.contentItems[e].element,t.itemSizes[e])):(Tt(this.contentItems[e].element,t.itemSizes[e]),At(this.contentItems[e].element,t.crossAxisSize))}calculateAbsoluteSizes(){const t=(this.contentItems.length-1)*this._splitterSize,{width:e,height:i}=kt(this.element);let n,o;this._isColumn?(n=i-t,o=e):(n=e-t,o=i);let s=0;const r=[];for(let t=0;t0){const n=100-t;for(let t=0;t100&&e.length>0){for(let t=0;te)return;{const r=i/e;let a=i;for(let e=0;ethis.onSplitterDrag(e,t,i))),e.on(\"dragStop\",(()=>this.onSplitterDragStop(e))),e.on(\"dragStart\",(()=>this.onSplitterDragStart(e))),this._splitter.splice(t,0,e),e}getSplitItems(t){const e=this._splitter.indexOf(t);return{before:this.contentItems[e],after:this.contentItems[e+1]}}calculateContentItemMinSize(t){const e=t.minSize;if(void 0!==e){if(t.minSizeUnit===ht.Pixel)return e;throw new X(\"ROCGMD98831\",JSON.stringify(t))}{const t=this.layoutManager.layoutConfig.dimensions;return this._isColumn?t.defaultMinItemHeight:t.defaultMinItemWidth}}calculateContentItemsTotalMinSize(t){let e=0;for(const i of t)e+=this.calculateContentItemMinSize(i);return e}onSplitterDragStart(t){const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=this.calculateContentItemsTotalMinSize(e.before.contentItems),s=this.calculateContentItemsTotalMinSize(e.after.contentItems);this._splitterPosition=0,this._splitterMinPosition=-1*(i-o),this._splitterMaxPosition=n-s}onSplitterDrag(t,e,i){let n=this._isColumn?i:e;if(null===this._splitterMinPosition||null===this._splitterMaxPosition)throw new K(\"ROCOSD59226\");n=Math.max(n,this._splitterMinPosition),n=Math.min(n,this._splitterMaxPosition),this._splitterPosition=n;const o=zt(n);this._isColumn?t.element.style.top=o:t.element.style.left=o}onSplitterDragStop(t){if(null===this._splitterPosition)throw new K(\"ROCOSDS66932\");{const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=(this._splitterPosition+i)/(i+n),s=e.before.size+e.after.size;e.before.size=o*s,e.after.size=(1-o)*s,t.element.style.top=zt(0),t.element.style.left=zt(0),globalThis.requestAnimationFrame((()=>this.updateSize(!1)))}}}!function(t){t.getElementDimensionSize=function(t,e){return\"width\"===e?function(t){return t.offsetWidth}(t):function(t){return t.offsetHeight}(t)},t.setElementDimensionSize=function(t,e,i){return\"width\"===e?Tt(t,i):At(t,i)},t.createElement=function(t,e){const i=t.createElement(\"div\");return i.classList.add(\"lm_item\"),e?i.classList.add(\"lm_column\"):i.classList.add(\"lm_row\"),i}}(Xt||(Xt={}));class Yt extends $t{constructor(t,e,i){super(t,vt.create(e),null,Yt.createElement(document)),this.isGround=!0,this._childElementContainer=this.element,this._containerElement=i;let n=null;for(;;){const t=n?n.previousSibling:this._containerElement.lastChild;if(!(t instanceof Element&&t.classList.contains(\"lm_content\")))break;n=t}this._containerElement.insertBefore(this.element,n)}init(){if(!0!==this.isInitialised){this.updateNodeSize();for(let t=0;t0?this.contentItems[0]:this,n.isComponent)throw new Error(\"Cannot add item as child to ComponentItem\");{const t=this.layoutManager.createAndInitContentItem(i,n);return e=n.addChild(t,e),n===this?-1:e}}loadComponentAsRoot(t){this.clearRoot();const e=Ct.resolve(t,!1);if(e.maximised)throw new Error(\"Root Component cannot be maximised\");{const t=new jt(this.layoutManager,e,this);t.init(),this.addChild(t,0)}}addChild(t,e){if(this.contentItems.length>0)throw new Error(\"Ground node can only have a single child\");return this._childElementContainer.appendChild(t.element),e=super.addChild(t,e),this.updateSize(!1),this.emitBaseBubblingEvent(\"stateChanged\"),e}calculateConfigContent(){const t=this.contentItems,e=t.length,i=new Array(e);for(let n=0;n0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e)),this.updateContentItemsSize(!1))}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}createSideAreas(){const t=Yt.Area.oppositeSides,e=new Array(Object.keys(t).length);let i=0;for(const n in t){const o=n,s=this.getElementArea();if(null===s)throw new K(\"RCSA77553\");s.side=o,\"2\"===t[o][1]?s[o]=s[t[o]]-50:s[o]=s[t[o]]+50,s.surface=(s.x2-s.x1)*(s.y2-s.y1),e[i++]=s}return e}highlightDropZone(t,e,i){this.layoutManager.tabDropPlaceholder.remove(),super.highlightDropZone(t,e,i)}onDrop(t,e){if(t.isComponent){const e=ut.createDefault(),i=t;e.header=mt.Header.createCopy(i.headerConfig);const n=this.layoutManager.createAndInitContentItem(e,this);n.addChild(t),t=n}if(0===this.contentItems.length)this.addChild(t);else{if(t.type===at.row||t.type===at.column){const e=ut.createDefault(),i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}const i=\"x\"==e.side[0]?at.row:at.column,n=\"2\"==e.side[1],o=this.contentItems[0];if(o instanceof Xt&&o.type===i){const e=o.contentItems[n?0:o.contentItems.length-1];o.addChild(t,n?0:void 0,!0),e.size*=.5,t.size=e.size,t.sizeUnit=ht.Percent,o.updateSize(!1)}else{const e=ct.createDefault(i),s=this.layoutManager.createContentItem(e,this);this.replaceChild(o,s),s.addChild(t,n?0:void 0,!0),s.addChild(o,n?void 0:0,!0),o.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}}dock(){throw new X(\"GID87731\")}validateDocking(){throw new X(\"GIVD87732\")}getAllContentItems(){const t=[this];return this.deepGetAllContentItems(this.contentItems,t),t}getConfigMaximisedItems(){const t=[];return this.deepFilterContentItems(this.contentItems,t,(t=>!(!Gt.isStack(t)||!t.initialWantMaximise)||!(!Gt.isComponentItem(t)||!t.initialWantMaximise))),t}getItemsByPopInParentId(t){const e=[];return this.deepFilterContentItems(this.contentItems,e,(e=>e.popInParentIds.includes(t))),e}toConfig(){throw new Error(\"Cannot generate GroundItem config\")}setActiveComponentItem(t,e,i){}updateNodeSize(){const{width:t,height:e}=kt(this._containerElement);Tt(this.element,t),At(this.element,e),this.contentItems.length>0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e))}deepGetAllContentItems(t,e){for(let i=0;ithis.onClick(t),this._touchStartEventListener=t=>this.onTouchStart(t),this._element=document.createElement(\"div\"),this._element.classList.add(i),this._element.title=e,this._header.on(\"destroy\",(()=>this.destroy())),this._element.addEventListener(\"click\",this._clickEventListener,{passive:!0}),this._element.addEventListener(\"touchstart\",this._touchStartEventListener,{passive:!0}),this._header.controlsContainerElement.appendChild(this._element)}get element(){return this._element}destroy(){var t;this._element.removeEventListener(\"click\",this._clickEventListener),this._element.removeEventListener(\"touchstart\",this._touchStartEventListener),null===(t=this._element.parentNode)||void 0===t||t.removeChild(this._element)}onClick(t){this._pushEvent(t)}onTouchStart(t){this._pushEvent(t)}}class Jt{constructor(t,e,i,n,o){var s;this._layoutManager=t,this._componentItem=e,this._closeEvent=i,this._focusEvent=n,this._dragStartEvent=o,this._isActive=!1,this._tabClickListener=t=>this.onTabClickDown(t),this._tabTouchStartListener=t=>this.onTabTouchStart(t),this._closeClickListener=()=>this.onCloseClick(),this._closeTouchStartListener=()=>this.onCloseTouchStart(),this._dragStartListener=(t,e)=>this.onDragStart(t,e),this._contentItemDestroyListener=()=>this.onContentItemDestroy(),this._tabTitleChangedListener=t=>this.setTitle(t),this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_tab\"),this._titleElement=document.createElement(\"span\"),this._titleElement.classList.add(\"lm_title\"),this._closeElement=document.createElement(\"div\"),this._closeElement.classList.add(\"lm_close_tab\"),this._element.appendChild(this._titleElement),this._element.appendChild(this._closeElement),e.isClosable?this._closeElement.style.display=\"\":this._closeElement.style.display=\"none\",this.setTitle(e.title),this._componentItem.on(\"titleChanged\",this._tabTitleChangedListener);(null!==(s=e.reorderEnabled)&&void 0!==s?s:this._layoutManager.layoutConfig.settings.reorderEnabled)&&this.enableReorder(),this._element.addEventListener(\"click\",this._tabClickListener,{passive:!0}),this._element.addEventListener(\"touchstart\",this._tabTouchStartListener,{passive:!0}),this._componentItem.isClosable?(this._closeElement.addEventListener(\"click\",this._closeClickListener,{passive:!0}),this._closeElement.addEventListener(\"touchstart\",this._closeTouchStartListener,{passive:!0})):(this._closeElement.remove(),this._closeElement=void 0),this._componentItem.setTab(this),this._layoutManager.emit(\"tabCreated\",this)}get isActive(){return this._isActive}get componentItem(){return this._componentItem}get contentItem(){return this._componentItem}get element(){return this._element}get titleElement(){return this._titleElement}get closeElement(){return this._closeElement}get reorderEnabled(){return void 0!==this._dragListener}set reorderEnabled(t){t!==this.reorderEnabled&&(t?this.enableReorder():this.disableReorder())}setTitle(t){this._titleElement.innerText=t,this._element.title=t}setActive(t){t!==this._isActive&&(this._isActive=t,t?this._element.classList.add(\"lm_active\"):this._element.classList.remove(\"lm_active\"))}destroy(){var t,e;this._closeEvent=void 0,this._focusEvent=void 0,this._dragStartEvent=void 0,this._element.removeEventListener(\"click\",this._tabClickListener),this._element.removeEventListener(\"touchstart\",this._tabTouchStartListener),null===(t=this._closeElement)||void 0===t||t.removeEventListener(\"click\",this._closeClickListener),null===(e=this._closeElement)||void 0===e||e.removeEventListener(\"touchstart\",this._closeTouchStartListener),this._componentItem.off(\"titleChanged\",this._tabTitleChangedListener),this.reorderEnabled&&this.disableReorder(),this._element.remove()}setBlurred(){this._element.classList.remove(\"lm_focused\"),this._titleElement.classList.remove(\"lm_focused\")}setFocused(){this._element.classList.add(\"lm_focused\"),this._titleElement.classList.add(\"lm_focused\")}onDragStart(t,e){if(void 0===this._dragListener)throw new J(\"TODSDLU10093\");if(void 0===this._dragStartEvent)throw new J(\"TODS23309\");this._dragStartEvent(t,e,this._dragListener,this.componentItem)}onContentItemDestroy(){void 0!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=void 0)}onTabClickDown(t){const e=t.target;e!==this._element&&e!==this._titleElement||(0===t.button?this.notifyFocus():1===t.button&&this._componentItem.isClosable&&this.notifyClose())}onTabTouchStart(t){t.target===this._element&&this.notifyFocus()}onCloseClick(){this.notifyClose()}onCloseTouchStart(){this.notifyClose()}notifyClose(){if(void 0===this._closeEvent)throw new J(\"TNC15007\");this._closeEvent(this._componentItem)}notifyFocus(){if(void 0===this._focusEvent)throw new J(\"TNA15007\");this._focusEvent(this._componentItem)}enableReorder(){this._dragListener=new Zt(this._element,[this._titleElement]),this._dragListener.on(\"dragStart\",this._dragStartListener),this._componentItem.on(\"destroy\",this._contentItemDestroyListener)}disableReorder(){if(void 0===this._dragListener)throw new J(\"TDR87745\");this._componentItem.off(\"destroy\",this._contentItemDestroyListener),this._dragListener.off(\"dragStart\",this._dragStartListener),this._dragListener=void 0}}class Qt{constructor(t,e,i,n,o){this._layoutManager=t,this._componentRemoveEvent=e,this._componentFocusEvent=i,this._componentDragStartEvent=n,this._dropdownActiveChangedEvent=o,this._tabs=[],this._lastVisibleTabIndex=-1,this._dropdownActive=!1,this._element=document.createElement(\"section\"),this._element.classList.add(\"lm_tabs\"),this._dropdownElement=document.createElement(\"section\"),this._dropdownElement.classList.add(\"lm_tabdropdown_list\"),this._dropdownElement.style.display=\"none\"}get tabs(){return this._tabs}get tabCount(){return this._tabs.length}get lastVisibleTabIndex(){return this._lastVisibleTabIndex}get element(){return this._element}get dropdownElement(){return this._dropdownElement}get dropdownActive(){return this._dropdownActive}destroy(){for(let t=0;tthis.handleTabCloseEvent(t)),(t=>this.handleTabFocusEvent(t)),((t,e,i,n)=>this.handleTabDragStartEvent(t,e,i,n)));void 0===e&&(e=this._tabs.length),this._tabs.splice(e,0,i),ethis._lastVisibleTabIndex){const t=this._tabs[e];for(let t=e;t>0;t--)this._tabs[t]=this._tabs[t-1];this._tabs[0]=t}}updateTabSizes(t,e){let i=!1;this.tryUpdateTabSizes(i,t,e)||(i=!0,this.tryUpdateTabSizes(i,t,e)),i!==this._dropdownActive&&(this._dropdownActive=i,this._dropdownActiveChangedEvent())}tryUpdateTabSizes(t,e,i){if(this._tabs.length>0){if(void 0===i)throw new Error(\"non-empty tabs must have active component item\");let n=0,o=!1;const s=this._layoutManager.layoutConfig.settings.tabOverlapAllowance,r=this._tabs.indexOf(i.tab),a=this._tabs[r];this._lastVisibleTabIndex=-1;for(let i=0;ie){if(o)i===r&&(l.style.zIndex=\"auto\",l.style.marginLeft=\"\",l.parentElement!==this._element&&this._element.appendChild(l));else{let t;if(t=r>0&&r<=i?(d-e)/(i-1):(d-e)/i,tthis.onClick(t),this._touchStartListener=t=>this.onTouchStart(t),this._rowColumnClosable=!0,this._closeButton=null,this._popoutButton=null,this._tabsContainer=new Qt(this._layoutManager,(t=>this.handleTabInitiatedComponentRemoveEvent(t)),(t=>this.handleTabInitiatedComponentFocusEvent(t)),((t,e,i,n)=>this.handleTabInitiatedDragStartEvent(t,e,i,n)),(()=>this.processTabDropdownActiveChanged())),this._show=i.show,this._popoutEnabled=i.popoutEnabled,this._popoutLabel=i.popoutLabel,this._maximiseEnabled=i.maximiseEnabled,this._maximiseLabel=i.maximiseLabel,this._minimiseEnabled=i.minimiseEnabled,this._minimiseLabel=i.minimiseLabel,this._closeEnabled=i.closeEnabled,this._closeLabel=i.closeLabel,this._tabDropdownEnabled=i.tabDropdownEnabled,this._tabDropdownLabel=i.tabDropdownLabel,this.setSide(i.side),this._canRemoveComponent=this._configClosable,this._element=document.createElement(\"section\"),this._element.classList.add(\"lm_header\"),this._controlsContainerElement=document.createElement(\"section\"),this._controlsContainerElement.classList.add(\"lm_controls\"),this._element.appendChild(this._tabsContainer.element),this._element.appendChild(this._controlsContainerElement),this._element.appendChild(this._tabsContainer.dropdownElement),this._element.addEventListener(\"click\",this._clickListener,{passive:!0}),this._element.addEventListener(\"touchstart\",this._touchStartListener,{passive:!0}),this._documentMouseUpListener=()=>this._tabsContainer.hideAdditionalTabsDropdown(),globalThis.document.addEventListener(\"mouseup\",this._documentMouseUpListener,{passive:!0}),this._tabControlOffset=this._layoutManager.layoutConfig.settings.tabControlOffset,this._tabDropdownEnabled&&(this._tabDropdownButton=new Kt(this,this._tabDropdownLabel,\"lm_tabdropdown\",(()=>this._tabsContainer.showAdditionalTabsDropdown()))),this._popoutEnabled&&(this._popoutButton=new Kt(this,this._popoutLabel,\"lm_popout\",(()=>this.handleButtonPopoutEvent()))),this._maximiseEnabled&&(this._maximiseButton=new Kt(this,this._maximiseLabel,\"lm_maximise\",(t=>this.handleButtonMaximiseToggleEvent(t)))),this._configClosable&&(this._closeButton=new Kt(this,this._closeLabel,\"lm_close\",(()=>s()))),this.processTabDropdownActiveChanged()}get show(){return this._show}get side(){return this._side}get leftRightSided(){return this._leftRightSided}get layoutManager(){return this._layoutManager}get parent(){return this._parent}get tabs(){return this._tabsContainer.tabs}get lastVisibleTabIndex(){return this._tabsContainer.lastVisibleTabIndex}get element(){return this._element}get tabsContainerElement(){return this._tabsContainer.element}get controlsContainerElement(){return this._controlsContainerElement}destroy(){this.emit(\"destroy\"),this._popoutEvent=void 0,this._maximiseToggleEvent=void 0,this._clickEvent=void 0,this._touchStartEvent=void 0,this._componentRemoveEvent=void 0,this._componentFocusEvent=void 0,this._componentDragStartEvent=void 0,this._tabsContainer.destroy(),globalThis.document.removeEventListener(\"mouseup\",this._documentMouseUpListener),this._element.remove()}createTab(t,e){this._tabsContainer.createTab(t,e)}removeTab(t){this._tabsContainer.removeTab(t)}processActiveComponentChanged(t){this._tabsContainer.processActiveComponentChanged(t),this.updateTabSizes()}setSide(t){this._side=t,this._leftRightSided=[nt.right,nt.left].includes(this._side)}setRowColumnClosable(t){this._rowColumnClosable=t,this.updateClosability()}updateClosability(){let t;if(this._configClosable)if(this._rowColumnClosable){t=!0;const e=this.tabs.length;for(let i=0;i1}applyFocusedValue(t){t?this._element.classList.add(\"lm_focused\"):this._element.classList.remove(\"lm_focused\")}processMaximised(){if(void 0===this._maximiseButton)throw new J(\"HPMAX16997\");this._maximiseButton.element.setAttribute(\"title\",this._minimiseLabel)}processMinimised(){if(void 0===this._maximiseButton)throw new J(\"HPMIN16997\");this._maximiseButton.element.setAttribute(\"title\",this._maximiseLabel)}updateTabSizes(){if(this._tabsContainer.tabCount>0){const t=this._show?this._layoutManager.layoutConfig.dimensions.headerHeight:0;let e;this._leftRightSided?(this._element.style.height=\"\",this._element.style.width=zt(t)):(this._element.style.width=\"\",this._element.style.height=zt(t)),e=this._leftRightSided?this._element.offsetHeight-this._controlsContainerElement.offsetHeight-this._tabControlOffset:this._element.offsetWidth-this._controlsContainerElement.offsetWidth-this._tabControlOffset,this._tabsContainer.updateTabSizes(e,this._getActiveComponentItemEvent())}}handleTabInitiatedComponentRemoveEvent(t){if(this._canRemoveComponent){if(void 0===this._componentRemoveEvent)throw new J(\"HHTCE22294\");this._componentRemoveEvent(t)}}handleTabInitiatedComponentFocusEvent(t){if(void 0===this._componentFocusEvent)throw new J(\"HHTAE22294\");this._componentFocusEvent(t)}handleTabInitiatedDragStartEvent(t,e,i,n){if(this._canRemoveComponent){if(void 0===this._componentDragStartEvent)throw new J(\"HHTDSE22294\");this._componentDragStartEvent(t,e,i,n)}else i.cancelDrag()}processTabDropdownActiveChanged(){void 0!==this._tabDropdownButton&&Dt(this._tabDropdownButton.element,this._tabsContainer.dropdownActive)}handleButtonPopoutEvent(){if(this._layoutManager.layoutConfig.settings.popoutWholeStack){if(void 0===this._popoutEvent)throw new J(\"HHBPOE17834\");this._popoutEvent()}else{const t=this._getActiveComponentItemEvent();t&&t.popout()}}handleButtonMaximiseToggleEvent(t){if(void 0===this._maximiseToggleEvent)throw new J(\"HHBMTE16834\");this._maximiseToggleEvent()}onClick(t){t.target===this._element&&this.notifyClick(t)}onTouchStart(t){t.target===this._element&&this.notifyTouchStart(t)}notifyClick(t){if(void 0===this._clickEvent)throw new J(\"HNHC46834\");this._clickEvent(t)}notifyTouchStart(t){if(void 0===this._touchStartEvent)throw new J(\"HNHTS46834\");this._touchStartEvent(t)}}class ee extends $t{constructor(t,e,i){var n,o,s,r,a,l,h,d,c,m,u,p,g,f,v,_,y,C,w;super(t,e,i,ee.createElement(document)),this._headerSideChanged=!1,this._resizeListener=()=>this.handleResize(),this._maximisedListener=()=>this.handleMaximised(),this._minimisedListener=()=>this.handleMinimised(),this._headerConfig=e.header;const I=t.layoutConfig.header,b=e.content;let S;if(1!==b.length)S=void 0;else{S=b[0].header}this._initialWantMaximise=e.maximised,this._initialActiveItemIndex=null!==(n=e.activeItemIndex)&&void 0!==n?n:0;const E=null!==(r=null!==(s=null===(o=this._headerConfig)||void 0===o?void 0:o.show)&&void 0!==s?s:null==S?void 0:S.show)&&void 0!==r?r:I.show,x=null!==(h=null!==(l=null===(a=this._headerConfig)||void 0===a?void 0:a.popout)&&void 0!==l?l:null==S?void 0:S.popout)&&void 0!==h?h:I.popout,L=null!==(m=null!==(c=null===(d=this._headerConfig)||void 0===d?void 0:d.maximise)&&void 0!==c?c:null==S?void 0:S.maximise)&&void 0!==m?m:I.maximise,z=null!==(g=null!==(p=null===(u=this._headerConfig)||void 0===u?void 0:u.close)&&void 0!==p?p:null==S?void 0:S.close)&&void 0!==g?g:I.close,M=null!==(_=null!==(v=null===(f=this._headerConfig)||void 0===f?void 0:f.minimise)&&void 0!==v?v:null==S?void 0:S.minimise)&&void 0!==_?_:I.minimise,P=null!==(w=null!==(C=null===(y=this._headerConfig)||void 0===y?void 0:y.tabDropdown)&&void 0!==C?C:null==S?void 0:S.tabDropdown)&&void 0!==w?w:I.tabDropdown;this._maximisedEnabled=!1!==L;const T={show:!1!==E,side:!1===E?nt.top:E,popoutEnabled:!1!==x,popoutLabel:!1===x?\"\":x,maximiseEnabled:this._maximisedEnabled,maximiseLabel:!1===L?\"\":L,closeEnabled:!1!==z,closeLabel:!1===z?\"\":z,minimiseEnabled:!0,minimiseLabel:M,tabDropdownEnabled:!1!==P,tabDropdownLabel:!1===P?\"\":P};this._header=new te(t,this,T,e.isClosable&&!1!==z,(()=>this.getActiveComponentItem()),(()=>this.remove()),(()=>this.handlePopoutEvent()),(()=>this.toggleMaximise()),(t=>this.handleHeaderClickEvent(t)),(t=>this.handleHeaderTouchStartEvent(t)),(t=>this.handleHeaderComponentRemoveEvent(t)),(t=>this.handleHeaderComponentFocusEvent(t)),((t,e,i,n)=>this.handleHeaderComponentStartDragEvent(t,e,i,n))),this.isStack=!0,this._childElementContainer=document.createElement(\"section\"),this._childElementContainer.classList.add(\"lm_items\"),this.on(\"resize\",this._resizeListener),this._maximisedEnabled&&(this.on(\"maximised\",this._maximisedListener),this.on(\"minimised\",this._minimisedListener)),this.element.appendChild(this._header.element),this.element.appendChild(this._childElementContainer),this.setupHeaderPosition(),this._header.updateClosability()}get childElementContainer(){return this._childElementContainer}get header(){return this._header}get headerShow(){return this._header.show}get headerSide(){return this._header.side}get headerLeftRightSided(){return this._header.leftRightSided}get contentAreaDimensions(){return this._contentAreaDimensions}get initialWantMaximise(){return this._initialWantMaximise}get isMaximised(){return this===this.layoutManager.maximisedStack}get stackParent(){if(!this.parent)throw new Error(\"Stack should always have a parent\");return this.parent}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}init(){if(!0===this.isInitialised)return;this.updateNodeSize();for(let t=0;t0){if(this._initialActiveItemIndex<0||this._initialActiveItemIndex>=e)throw new Error(`ActiveItemIndex out of range: ${this._initialActiveItemIndex} id: ${this.id}`);for(let i=0;ithis.contentItems.length)throw e-=1,new X(\"SAC99728\");if(t instanceof jt)return e=super.addChild(t,e),this._childElementContainer.appendChild(t.element),this._header.createTab(t,e),this.setActiveComponentItem(t,i),this._header.updateTabSizes(),this.updateSize(!1),t.container.setBaseLogicalZIndex(),this._header.updateClosability(),this.emitStateChangedEvent(),e;throw new X(\"SACC88532\")}removeChild(t,e){const i=t,n=this.contentItems.indexOf(i),o=1===this.contentItems.length;if(this._activeComponentItem===i&&(i.focused&&i.blur(),!o)){const t=0===n?1:n-1;this.setActiveComponentItem(this.contentItems[t],!1)}this._header.removeTab(i),super.removeChild(i,e),o||this._header.updateClosability(),this.emitStateChangedEvent()}toggleMaximise(){this.isMaximised?this.minimise():this.maximise()}maximise(){if(!this.isMaximised){this.layoutManager.setMaximisedStack(this);const t=this.contentItems,e=t.length;for(let i=0;i0&&void 0===t)throw new Error(\"expected non-empty stack to have an active component item\");return{type:\"stack\",content:this.calculateConfigContent(),size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,isClosable:this.isClosable,maximised:this.isMaximised,header:this.createHeaderConfig(),activeItemIndex:t}}onDrop(t,e){if(\"header\"===this._dropSegment){if(this.resetHeaderDropZone(),void 0===this._dropIndex)throw new J(\"SODDI68990\");return void this.addChild(t,this._dropIndex)}if(\"body\"===this._dropSegment)return void this.addChild(t,0,!0);const i=\"top\"===this._dropSegment||\"bottom\"===this._dropSegment,n=\"left\"===this._dropSegment||\"right\"===this._dropSegment,o=\"top\"===this._dropSegment||\"left\"===this._dropSegment,s=i&&this.stackParent.isColumn||n&&this.stackParent.isRow;if(t.isComponent){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createAndInitContentItem(e,this);i.addChild(t),t=i}if(t.type===at.row||t.type===at.column){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}if(s){const e=this.stackParent.contentItems.indexOf(this);this.stackParent.addChild(t,o?e:e+1,!0),this.size*=.5,t.size=this.size,t.sizeUnit=this.sizeUnit,this.stackParent.updateSize(!1)}else{const e=i?at.column:at.row,n=ct.createDefault(e),s=this.layoutManager.createContentItem(n,this);this.stackParent.replaceChild(this,s),s.addChild(t,o?0:void 0,!0),s.addChild(this,o?void 0:0,!0),this.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}highlightDropZone(t,e){for(const i in this._contentAreaDimensions){const n=i,o=this._contentAreaDimensions[n].hoverArea;if(o.x1t&&o.y1e)return void(\"header\"===n?(this._dropSegment=\"header\",this.highlightHeaderDropZone(this._header.leftRightSided?e:t)):(this.resetHeaderDropZone(),this.highlightBodyDropZone(n)))}}getArea(){if(\"none\"===this.element.style.display)return null;const t=super.getElementArea(this._header.element),e=super.getElementArea(this._childElementContainer);if(null===t||null===e)throw new K(\"SGAHC13086\");const i=e.x2-e.x1,n=e.y2-e.y1;return this._contentAreaDimensions={header:{hoverArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2},highlightArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2}}},0===this.contentItems.length?(this._contentAreaDimensions.body={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2}},super.getElementArea(this.element)):(this._contentAreaDimensions.left={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x1+.25*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x1+.5*i,y2:e.y2}},this._contentAreaDimensions.top={hoverArea:{x1:e.x1+.25*i,y1:e.y1,x2:e.x1+.75*i,y2:e.y1+.5*n},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y1+.5*n}},this._contentAreaDimensions.right={hoverArea:{x1:e.x1+.75*i,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1+.5*i,y1:e.y1,x2:e.x2,y2:e.y2}},this._contentAreaDimensions.bottom={hoverArea:{x1:e.x1+.25*i,y1:e.y1+.5*n,x2:e.x1+.75*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1+.5*n,x2:e.x2,y2:e.y2}},super.getElementArea(this.element))}positionHeader(t){this._header.side!==t&&(this._header.setSide(t),this._headerSideChanged=!0,this.setupHeaderPosition())}updateNodeSize(){if(\"none\"!==this.element.style.display){const t=kt(this.element);if(this._header.show){t[this._header.leftRightSided?it.width:it.height]-=this.layoutManager.layoutConfig.dimensions.headerHeight}this._childElementContainer.style.width=zt(t.width),this._childElementContainer.style.height=zt(t.height);for(let e=0;e=o&&tthis.onDrag(t,e,i))),this._dragListener.on(\"dragStop\",(()=>this.onDrop())),this.createDragProxyElements(t,e),null===this._componentItem.parent)throw new K(\"DPC10097\");this._componentItemFocused=this._componentItem.focused,this._componentItemFocused&&this._componentItem.blur(),this._componentItem.parent.removeChild(this._componentItem,!0),this.setDimensions(),document.body.appendChild(this._element),this.determineMinMaxXY(),this._layoutManager.calculateItemAreas(),this.setDropPosition(t,e)}get element(){return this._element}createDragProxyElements(t,e){this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_dragProxy\");const i=document.createElement(\"div\");i.classList.add(\"lm_header\");const n=document.createElement(\"div\");n.classList.add(\"lm_tabs\");const o=document.createElement(\"div\");o.classList.add(\"lm_tab\");const s=document.createElement(\"span\");s.classList.add(\"lm_title\"),o.appendChild(s),n.appendChild(o),i.appendChild(n),this._proxyContainerElement=document.createElement(\"div\"),this._proxyContainerElement.classList.add(\"lm_content\"),this._element.appendChild(i),this._element.appendChild(this._proxyContainerElement),this._originalParent instanceof ee&&this._originalParent.headerShow&&(this._sided=this._originalParent.headerLeftRightSided,this._element.classList.add(\"lm_\"+this._originalParent.headerSide),[nt.right,nt.bottom].indexOf(this._originalParent.headerSide)>=0&&this._proxyContainerElement.insertAdjacentElement(\"afterend\",i)),this._element.style.left=zt(t),this._element.style.top=zt(e),o.setAttribute(\"title\",this._componentItem.title),s.insertAdjacentText(\"afterbegin\",this._componentItem.title),this._proxyContainerElement.appendChild(this._componentItem.element)}determineMinMaxXY(){const t=this._layoutManager.groundItem;if(void 0===t)throw new J(\"DPDMMXY73109\");{const e=t.element.getBoundingClientRect();this._minX=e.left+document.body.scrollLeft,this._minY=e.top+document.body.scrollTop,this._maxX=this._minX+e.width,this._maxY=this._minY+e.height}}onDrag(t,e,i){const n=i.pageX,o=i.pageY;this.setDropPosition(n,o),this._componentItem.drag()}setDropPosition(t,e){this._layoutManager.layoutConfig.settings.constrainDragToContainer&&(t<=this._minX?t=Math.ceil(this._minX):t>=this._maxX&&(t=Math.floor(this._maxX)),e<=this._minY?e=Math.ceil(this._minY):e>=this._maxY&&(e=Math.floor(this._maxY))),this._element.style.left=zt(t),this._element.style.top=zt(e),this._area=this._layoutManager.getArea(t,e),null!==this._area&&(this._lastValidArea=this._area,this._area.contentItem.highlightDropZone(t,e,this._area))}onDrop(){const t=this._layoutManager.dropTargetIndicator;if(null===t)throw new K(\"DPOD30011\");let e;if(t.hide(),this._componentItem.exitDragMode(),null!==this._area)e=this._componentItem,this._area.contentItem.onDrop(e,this._area);else if(null!==this._lastValidArea){e=this._componentItem;this._lastValidArea.contentItem.onDrop(e,this._lastValidArea)}else this._originalParent?(e=this._componentItem,this._originalParent.addChild(e)):this._componentItem.destroy();this._element.remove(),this._layoutManager.emit(\"itemDropped\",this._componentItem),this._componentItemFocused&&void 0!==e&&e.focus()}setDimensions(){const t=this._layoutManager.layoutConfig.dimensions;if(void 0===t)throw new Error(\"DragProxy.setDimensions: dimensions undefined\");let e=t.dragProxyWidth,i=t.dragProxyHeight;if(void 0===e||void 0===i)throw new Error(\"DragProxy.setDimensions: width and/or height undefined\");const n=!1===this._layoutManager.layoutConfig.header.show?0:t.headerHeight;this._element.style.width=zt(e),this._element.style.height=zt(i),e-=this._sided?n:0,i-=this._sided?0:n,this._proxyContainerElement.style.width=zt(e),this._proxyContainerElement.style.height=zt(i),this._componentItem.enterDragMode(e,i),this._componentItem.show()}}class ne{constructor(t,e,i,n,o,s,r){this._layoutManager=t,this._element=e,this._extraAllowableChildTargets=i,this._componentTypeOrFtn=n,this._componentState=o,this._title=s,this._id=r,this._dragListener=null,this._dummyGroundContainer=document.createElement(\"div\");const a=gt.createDefault(\"row\");this._dummyGroundContentItem=new Yt(this._layoutManager,a,this._dummyGroundContainer),this.createDragListener()}destroy(){this.removeDragListener()}createDragListener(){this.removeDragListener(),this._dragListener=new Zt(this._element,this._extraAllowableChildTargets),this._dragListener.on(\"dragStart\",((t,e)=>this.onDragStart(t,e))),this._dragListener.on(\"dragStop\",(()=>this.onDragStop()))}onDragStart(t,e){var i;const n=\"component\";let o;if(\"function\"==typeof this._componentTypeOrFtn){const t=this._componentTypeOrFtn();o=ne.isDragSourceComponentItemConfig(t)?{type:n,componentState:t.state,componentType:t.type,title:null!==(i=t.title)&&void 0!==i?i:this._title}:t}else o={type:n,componentState:this._componentState,componentType:this._componentTypeOrFtn,title:this._title,id:this._id};const s=bt.resolve(o,!1),r=new jt(this._layoutManager,s,this._dummyGroundContentItem);if(this._dummyGroundContentItem.contentItems.push(r),null===this._dragListener)throw new K(\"DSODSD66746\");{const i=new ie(t,e,this._dragListener,this._layoutManager,r,this._dummyGroundContentItem),n=this._layoutManager.transitionIndicator;if(null===n)throw new K(\"DSODST66746\");n.transitionElements(this._element,i.element)}}onDragStop(){this.createDragListener()}removeDragListener(){null!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=null)}}!function(t){t.isDragSourceComponentItemConfig=function(t){return!(\"componentType\"in t)}}(ne||(ne={}));class oe{constructor(){this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_dropTargetIndicator\");const t=document.createElement(\"div\");t.classList.add(\"lm_inner\"),this._element.appendChild(t),document.body.appendChild(this._element)}destroy(){this._element.remove()}highlightArea(t,e){this._element.style.left=zt(t.x1+e),this._element.style.top=zt(t.y1+e),this._element.style.width=zt(t.x2-t.x1-e),this._element.style.height=zt(t.y2-t.y1-e),this._element.style.display=\"block\"}hide(){Dt(this._element,!1)}}class se{constructor(){this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_transition_indicator\"),document.body.appendChild(this._element),this._toElement=null,this._fromDimensions=null,this._totalAnimationDuration=200,this._animationStartTime=null}destroy(){this._element.remove()}transitionElements(t,e){}nextAnimationFrame(){}measure(t){const e=t.getBoundingClientRect();return{left:e.left,top:e.top,width:t.offsetWidth,height:t.offsetHeight}}}class re extends Wt{constructor(t){super(),this._layoutManager=t,this._childEventListener=t=>this.onEventFromChild(t),globalThis.addEventListener(re.ChildEventName,this._childEventListener,{passive:!0})}emit(t,...e){\"userBroadcast\"===t?this.emitUserBroadcast(...e):super.emit(t,...e)}emitUserBroadcast(...t){this.handleUserBroadcastEvent(\"userBroadcast\",t)}destroy(){globalThis.removeEventListener(re.ChildEventName,this._childEventListener)}handleUserBroadcastEvent(t,e){this._layoutManager.isSubWindow?this.propagateToParent(t,e):this.propagateToThisAndSubtree(t,e)}onEventFromChild(t){const e=t.detail;this.handleUserBroadcastEvent(e.eventName,e.args)}propagateToParent(t,e){const i={bubbles:!0,cancelable:!0,detail:{layoutManager:this._layoutManager,eventName:t,args:e}},n=new CustomEvent(re.ChildEventName,i),o=globalThis.opener;if(null===o)throw new K(\"EHPTP15778\");o.dispatchEvent(n)}propagateToThisAndSubtree(t,e){this.emitUnknown(t,...e);for(let i=0;ithis.handleContainerResize())),this._windowBeforeUnloadListener=()=>this.onBeforeUnload(),this._windowBeforeUnloadListening=!1,this._maximisedStackBeforeDestroyedListener=t=>this.cleanupBeforeMaximisedStackDestroyed(t),this.isSubWindow=t.isSubWindow,this._constructorOrSubWindowLayoutConfig=t.constructorOrSubWindowLayoutConfig,Q.checkInitialise(),dt.checkInitialise(),void 0!==t.containerElement&&(this._containerElement=t.containerElement)}get container(){return this._containerElement}get isInitialised(){return this._isInitialised}get groundItem(){return this._groundItem}get root(){return this._groundItem}get openPopouts(){return this._openPopouts}get dropTargetIndicator(){return this._dropTargetIndicator}get transitionIndicator(){return this._transitionIndicator}get width(){return this._width}get height(){return this._height}get eventHub(){return this._eventHub}get rootItem(){if(void 0===this._groundItem)throw new Error(\"Cannot access rootItem before init\");return 0===this._groundItem.contentItems.length?void 0:this._groundItem.contentItems[0]}get focusedComponentItem(){return this._focusedComponentItem}get tabDropPlaceholder(){return this._tabDropPlaceholder}get maximisedStack(){return this._maximisedStack}get deprecatedConstructor(){return!this.isSubWindow&&void 0!==this._constructorOrSubWindowLayoutConfig}destroy(){if(this._isInitialised){this._windowBeforeUnloadListening&&(globalThis.removeEventListener(\"beforeunload\",this._windowBeforeUnloadListener),this._windowBeforeUnloadListening=!1),!0===this.layoutConfig.settings.closePopoutsOnUnload&&this.closeAllOpenPopouts(),this._resizeObserver.disconnect(),this.checkClearResizeTimeout(),void 0!==this._groundItem&&this._groundItem.destroy(),this._tabDropPlaceholder.remove(),null!==this._dropTargetIndicator&&this._dropTargetIndicator.destroy(),null!==this._transitionIndicator&&this._transitionIndicator.destroy(),this._eventHub.destroy();for(const t of this._dragSources)t.destroy();this._dragSources=[],this._isInitialised=!1}}minifyConfig(t){return _t.minifyConfig(t)}unminifyConfig(t){return _t.unminifyConfig(t)}init(){let t;if(this.setContainer(),this._dropTargetIndicator=new oe,this._transitionIndicator=new se,this.updateSizeFromContainer(),this.isSubWindow){if(void 0===this._constructorOrSubWindowLayoutConfig)throw new J(\"LMIU07155\");{const e=this._constructorOrSubWindowLayoutConfig.root;if(void 0===e)throw new X(\"LMIC07156\");if(!Ct.isComponent(e))throw new X(\"LMIC07157\");t=e;const i=xt.resolve(this._constructorOrSubWindowLayoutConfig);this.layoutConfig=Object.assign(Object.assign({},i),{root:void 0})}}else void 0===this._constructorOrSubWindowLayoutConfig?this.layoutConfig=_t.createDefault():this.layoutConfig=xt.resolve(this._constructorOrSubWindowLayoutConfig);const e=this.layoutConfig;this._groundItem=new Yt(this,e.root,this._containerElement),this._groundItem.init(),this.checkLoadedLayoutMaximiseItem(),this._resizeObserver.observe(this._containerElement),this._isInitialised=!0,this.adjustColumnsResponsive(),this.emit(\"initialised\"),void 0!==t&&this.loadComponentAsRoot(t)}loadLayout(t){if(!this.isInitialised)throw new Error(\"GoldenLayout: Need to call init() if LayoutConfig with defined root passed to constructor\");if(void 0===this._groundItem)throw new J(\"LMLL11119\");this.createSubWindows(),this.layoutConfig=xt.resolve(t),this._groundItem.loadRoot(this.layoutConfig.root),this.checkLoadedLayoutMaximiseItem(),this.adjustColumnsResponsive()}saveLayout(){if(!1===this._isInitialised)throw new Error(\"Can't create config, layout not yet initialised\");if(void 0===this._groundItem)throw new J(\"LMTC18244\");{const t=this._groundItem.calculateConfigContent();let e;e=1!==t.length?void 0:t[0],this.reconcilePopoutWindows();const i=[];for(let t=0;t=0?n=this._groundItem.contentItems[0]:e=0;break;case at.row:case at.column:e=n.addItem(t,i.index);break;case at.stack:if(Ct.isComponent(t)){e=n.addItem(t,i.index);break}throw Error(tt[6]);case at.component:throw new X(\"LMAIALC87444602\");default:throw new Y(\"LMAIALU98881733\",n.type)}if(Ct.isComponent(t)){const t=n.contentItems[e];Gt.isStack(t)&&(n=t,e=0)}return i.parentItem=n,i.index=e,i}}}loadComponentAsRoot(t){if(void 0===this._groundItem)throw new Error(\"Cannot add item before init\");this._groundItem.loadComponentAsRoot(t)}updateSize(t,e){this.setSize(t,e)}setSize(t,e){if(this._width=t,this._height=e,!0===this._isInitialised){if(void 0===this._groundItem)throw new J(\"LMUS18881\");if(this._groundItem.setSize(this._width,this._height),this._maximisedStack){const{width:t,height:e}=kt(this._containerElement);Tt(this._maximisedStack.element,t),At(this._maximisedStack.element,e),this._maximisedStack.updateSize(!1)}this.adjustColumnsResponsive()}}beginSizeInvalidation(){this._sizeInvalidationBeginCount++}endSizeInvalidation(){0==--this._sizeInvalidationBeginCount&&this.updateSizeFromContainer()}updateSizeFromContainer(){const{width:t,height:e}=kt(this._containerElement);this.setSize(t,e)}updateRootSize(t=!1){if(void 0===this._groundItem)throw new J(\"LMURS28881\");this._groundItem.updateSize(t)}createAndInitContentItem(t,e){const i=this.createContentItem(t,e);return i.init(),i}createContentItem(t,e){if(\"string\"!=typeof t.type)throw new G(\"Missing parameter 'type'\",JSON.stringify(t));if(ct.isComponentItem(t)&&!(e instanceof ee)&&e&&!(!0===this.isSubWindow&&e instanceof Yt)){t={type:at.stack,content:[t],size:t.size,sizeUnit:t.sizeUnit,minSize:t.minSize,minSizeUnit:t.minSizeUnit,id:t.id,maximised:t.maximised,isClosable:t.isClosable,activeItemIndex:0,header:void 0}}return this.createContentItemFromConfig(t,e)}findFirstComponentItemById(t){if(void 0===this._groundItem)throw new J(\"LMFFCIBI82446\");return this.findFirstContentItemTypeByIdRecursive(at.component,t,this._groundItem)}createPopout(t,e,i,n){return t instanceof Gt?this.createPopoutFromContentItem(t,e,i,n):this.createPopoutFromItemConfig(t,e,i,n)}createPopoutFromContentItem(t,e,i,n){let o=t.parent,s=t;for(;null!==o&&1===o.contentItems.length&&!o.isGround;)s=o,o=o.parent;if(null===o)throw new K(\"LMCPFCI00834\");{if(void 0===n&&(n=o.contentItems.indexOf(s)),null!==i&&o.addPopInParentId(i),void 0===e){const i=globalThis.screenX||globalThis.screenLeft,n=globalThis.screenY||globalThis.screenTop,o=t.element.offsetLeft,s=t.element.offsetTop,{width:r,height:a}=kt(t.element);e={left:i+o,top:n+s,width:r,height:a}}const r=t.toConfig();if(t.remove(),ft.isRootItemConfig(r))return this.createPopoutFromItemConfig(r,e,i,n);throw new Error(`${tt[0]}`)}}beginVirtualSizedContainerAdding(){0==++this._virtualSizedContainerAddingBeginCount&&(this._virtualSizedContainers.length=0)}addVirtualSizedContainer(t){this._virtualSizedContainers.push(t)}endVirtualSizedContainerAdding(){if(0==--this._virtualSizedContainerAddingBeginCount){const t=this._virtualSizedContainers.length;if(t>0){this.fireBeforeVirtualRectingEvent(t);for(let e=0;ethis.emit(\"windowOpened\",a))),a.on(\"closed\",(()=>this.reconcilePopoutWindows())),this._openPopouts.push(a),this.layoutConfig.settings.closePopoutsOnUnload&&!this._windowBeforeUnloadListening&&(globalThis.addEventListener(\"beforeunload\",this._windowBeforeUnloadListener,{passive:!0}),this._windowBeforeUnloadListening=!0),a}closeAllOpenPopouts(){for(let t=0;tglobalThis.close()),1)}getArea(t,e){let i=null,n=1/0;for(let o=0;o=s.x1&&t=s.y1&&es.surface&&(n=s.surface,i=s)}return i}calculateItemAreas(){const t=this.getAllContentItems(),e=this._groundItem;if(void 0===e)throw new J(\"LMCIAR44365\");if(1!==t.length){e.contentItems[0].isStack?this._itemAreas=[]:this._itemAreas=e.createSideAreas();for(let e=0;e0){let e=t[0];if(Gt.isComponentItem(e)){const t=e.parent;if(null===t)throw new K(\"LMXLLMI69999\");e=t}if(!Gt.isStack(e))throw new X(\"LMCLLMI19993\");e.maximise()}}}processMaximiseStack(t){if(this._maximisedStack=t,t.on(\"beforeItemDestroyed\",this._maximisedStackBeforeDestroyedListener),t.element.classList.add(\"lm_maximised\"),t.element.insertAdjacentElement(\"afterend\",this._maximisePlaceholder),void 0===this._groundItem)throw new J(\"LMMXI19993\");{this._groundItem.element.prepend(t.element);const{width:e,height:i}=kt(this._containerElement);Tt(t.element,e),At(t.element,i),t.updateSize(!0),t.focusActiveContentItem(),this._maximisedStack.emit(\"maximised\"),this.emit(\"stateChanged\")}}processMinimiseMaximisedStack(){if(void 0===this._maximisedStack)throw new X(\"LMMMS74422\");{const t=this._maximisedStack;if(null===t.parent)throw new K(\"LMMI13668\");t.element.classList.remove(\"lm_maximised\"),this._maximisePlaceholder.insertAdjacentElement(\"afterend\",t.element),this._maximisePlaceholder.remove(),this.updateRootSize(!0),this._maximisedStack=void 0,t.off(\"beforeItemDestroyed\",this._maximisedStackBeforeDestroyedListener),t.emit(\"minimised\"),this.emit(\"stateChanged\")}}reconcilePopoutWindows(){const t=[];for(let e=0;e{this._resizeTimeoutId=void 0,this.beginSizeInvalidation(),this.endSizeInvalidation()}),this.resizeDebounceInterval))}checkClearResizeTimeout(){void 0!==this._resizeTimeoutId&&(clearTimeout(this._resizeTimeoutId),this._resizeTimeoutId=void 0)}setContainer(){var t;const e=document.body,i=null!==(t=this._containerElement)&&void 0!==t?t:e;if(i===e){this.resizeWithContainerAutomatically=!0;const t=document.documentElement;t.style.height=\"100%\",t.style.margin=\"0\",t.style.padding=\"0\",t.style.overflow=\"clip\",e.style.height=\"100%\",e.style.margin=\"0\",e.style.padding=\"0\",e.style.overflow=\"clip\"}this._containerElement=i}onBeforeUnload(){this.destroy()}adjustColumnsResponsive(){if(void 0===this._groundItem)throw new J(\"LMACR20883\");if(this._firstLoad=!1,this.useResponsiveLayout()&&!this._updatingColumnsResponsive&&this._groundItem.contentItems.length>0&&this._groundItem.contentItems[0].isRow){if(void 0===this._groundItem||null===this._width)throw new J(\"LMACR77412\");{const t=this._groundItem.contentItems[0].contentItems.length;if(t<=1)return;{const e=this.layoutConfig.dimensions.defaultMinItemWidth;if(t*e<=this._width)return;{this._updatingColumnsResponsive=!0;const i=t-Math.max(Math.floor(this._width/e),1),n=this._groundItem.contentItems[0],o=this.getAllStacks();if(0===o.length)throw new X(\"LMACRS77413\");{const t=o[0];for(let e=0;en?void 0:{parentItem:t,index:o}}}case 1:if(void 0===this._focusedComponentItem)return;{const t=this._focusedComponentItem.parentItem;return this.tryCreateLocationFromParentItem(t,e)}case 2:{const t=this.findFirstContentItemType(at.stack);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 3:{let t=this.findFirstContentItemType(at.row);return void 0!==t?this.tryCreateLocationFromParentItem(t,e):(t=this.findFirstContentItemType(at.column),void 0!==t?this.tryCreateLocationFromParentItem(t,e):void 0)}case 4:{const t=this.findFirstContentItemType(at.row);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 5:{const t=this.findFirstContentItemType(at.column);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 6:if(void 0===this._groundItem)throw new J(\"LMFLRIF18244\");return void 0!==this.rootItem?void 0:void 0===e||0===e?{parentItem:this._groundItem,index:0}:void 0;case 7:if(void 0===this._groundItem)throw new J(\"LMFLF18244\");{const t=this._groundItem.contentItems;if(0===t.length)return void 0===e||0===e?{parentItem:this._groundItem,index:0}:void 0;{const i=t[0];return this.tryCreateLocationFromParentItem(i,e)}}}}tryCreateLocationFromParentItem(t,e){const i=t.contentItems.length;return void 0===e?{parentItem:t,index:i}:e<0||e>i?void 0:{parentItem:t,index:e}}}!function(t){t.createMaximisePlaceElement=function(t){const e=t.createElement(\"div\");return e.classList.add(\"lm_maximise_place\"),e},t.createTabDropPlaceholderElement=function(t){const e=t.createElement(\"div\");return e.classList.add(\"lm_drop_tab_placeholder\"),e},t.defaultLocationSelectors=[{typeId:1,index:void 0},{typeId:2,index:void 0},{typeId:3,index:void 0},{typeId:7,index:void 0}],t.afterFocusedItemIfPossibleLocationSelectors=[{typeId:0,index:1},{typeId:2,index:void 0},{typeId:3,index:void 0},{typeId:7,index:void 0}]}(ae||(ae={}));class le extends ae{constructor(t,e,i,n){if(super(le.createLayoutManagerConstructorParameters(t,e)),this._bindComponentEventHanlderPassedInConstructor=!1,this._creationTimeoutPassed=!1,void 0!==e&&\"function\"==typeof e&&(this.bindComponentEvent=e,this._bindComponentEventHanlderPassedInConstructor=!0,void 0!==i&&(this.unbindComponentEvent=i)),!this._bindComponentEventHanlderPassedInConstructor&&this.isSubWindow){if(void 0===this._constructorOrSubWindowLayoutConfig)throw new J(\"VLC98823\");{const t=xt.resolve(this._constructorOrSubWindowLayoutConfig);this.layoutConfig=Object.assign(Object.assign({},t),{root:void 0})}}!0!==n&&(this.deprecatedConstructor||this.init())}destroy(){this.bindComponentEvent=void 0,this.unbindComponentEvent=void 0,super.destroy()}init(){if(this._bindComponentEventHanlderPassedInConstructor||\"loading\"!==document.readyState&&null!==document.body){if(!this._bindComponentEventHanlderPassedInConstructor&&!0===this.isSubWindow&&!this._creationTimeoutPassed)return setTimeout((()=>this.init()),7),void(this._creationTimeoutPassed=!0);!0===this.isSubWindow&&(this._bindComponentEventHanlderPassedInConstructor||this.clearHtmlAndAdjustStylesForSubWindow(),window.__glInstance=this),super.init()}else document.addEventListener(\"DOMContentLoaded\",(()=>this.init()),{passive:!0})}clearHtmlAndAdjustStylesForSubWindow(){const t=document.head,e=new Array(4);e[0]=document.querySelectorAll(\"body link\"),e[1]=document.querySelectorAll(\"body style\"),e[2]=document.querySelectorAll(\"template\"),e[3]=document.querySelectorAll(\".gl_keep\");for(let i=0;ithis.emit(\"popIn\"))),document.body.appendChild(t),!0}}bindComponent(t,e){if(void 0!==this.bindComponentEvent){return this.bindComponentEvent(t,e)}if(void 0!==this.getComponentEvent)return{virtual:!1,component:this.getComponentEvent(t,e)};{const t=`${tt[2]}: ${JSON.stringify(e)}`;throw new Z(t)}}unbindComponent(t,e,i){if(void 0!==this.unbindComponentEvent)this.unbindComponentEvent(t);else if(!e&&void 0!==this.releaseComponentEvent){if(void 0===i)throw new J(\"VCUCRCU333998\");this.releaseComponentEvent(t,i)}}}!function(t){let e=!1;t.createLayoutManagerConstructorParameters=function(t,i){const n=e?null:new URL(document.location.href).searchParams.get(\"gl-window\");e=!0;const o=null!==n;let s,r;if(null!==n){const e=localStorage.getItem(n);if(null===e)throw new Error(\"Null gl-window Config\");localStorage.removeItem(n);const i=JSON.parse(e),o=_t.unminifyConfig(i);r=xt.fromResolved(o),t instanceof HTMLElement&&(s=t)}else void 0===t?r=void 0:t instanceof HTMLElement?(r=void 0,s=t):r=t,void 0===s&&i instanceof HTMLElement&&(s=i);return{constructorOrSubWindowLayoutConfig:r,isSubWindow:o,containerElement:s}}}(le||(le={}));class he extends le{constructor(t,e,i){super(t,e,i,!0),this._componentTypesMap=new Map,this._registeredComponentMap=new Map,this._virtuableComponentMap=new Map,this._containerVirtualRectingRequiredEventListener=(t,e,i)=>this.handleContainerVirtualRectingRequiredEvent(t,e,i),this._containerVirtualVisibilityChangeRequiredEventListener=(t,e)=>this.handleContainerVirtualVisibilityChangeRequiredEvent(t,e),this._containerVirtualZIndexChangeRequiredEventListener=(t,e,i)=>this.handleContainerVirtualZIndexChangeRequiredEvent(t,e,i),this.deprecatedConstructor||this.init()}registerComponent(t,e,i=!1){if(\"function\"!=typeof e)throw new $(\"registerComponent() componentConstructorOrFactoryFtn parameter is not a function\");if(e.hasOwnProperty(\"prototype\")){const n=e;this.registerComponentConstructor(t,n,i)}else{const n=e;this.registerComponentFactoryFunction(t,n,i)}}registerComponentConstructor(t,e,i=!1){if(\"function\"!=typeof e)throw new Error(tt[1]);if(void 0!==this._componentTypesMap.get(t))throw new Z(`${tt[3]}: ${t}`);this._componentTypesMap.set(t,{constructor:e,factoryFunction:void 0,virtual:i})}registerComponentFactoryFunction(t,e,i=!1){if(\"function\"!=typeof e)throw new Z(\"Please register a constructor function\");if(void 0!==this._componentTypesMap.get(t))throw new Z(`${tt[3]}: ${t}`);this._componentTypesMap.set(t,{constructor:void 0,factoryFunction:e,virtual:i})}registerComponentFunction(t){this.registerGetComponentConstructorCallback(t)}registerGetComponentConstructorCallback(t){if(\"function\"!=typeof t)throw new Error(\"Please register a callback function\");void 0!==this._getComponentConstructorFtn&&console.warn(\"Multiple component functions are being registered. Only the final registered function will be used.\"),this._getComponentConstructorFtn=t}getRegisteredComponentTypeNames(){const t=this._componentTypesMap.keys();return Array.from(t)}getComponentInstantiator(t){let e;const i=pt.resolveComponentTypeName(t);return void 0!==i&&(e=this._componentTypesMap.get(i)),void 0===e&&void 0!==this._getComponentConstructorFtn&&(e={constructor:this._getComponentConstructorFtn(t),factoryFunction:void 0,virtual:!1}),e}bindComponent(t,e){let i;const n=pt.resolveComponentTypeName(e);let o;if(void 0!==n&&(i=this._componentTypesMap.get(n)),void 0===i&&void 0!==this._getComponentConstructorFtn&&(i={constructor:this._getComponentConstructorFtn(e),factoryFunction:void 0,virtual:!1}),void 0!==i){const s=i.virtual;let r,a;r=void 0===e.componentState?void 0:Ut({},e.componentState);const l=i.constructor;if(void 0!==l)a=new l(t,r,s);else{const e=i.factoryFunction;if(void 0===e)throw new X(\"LMBCFFU10008\");a=e(t,r,s)}if(s){if(void 0===a)throw new J(\"GLBCVCU988774\");{const e=a,i=e.rootHtmlElement;if(void 0===i)throw new Z(`${tt[5]}: ${n}`);!function(t){const e=\"absolute\";t.style.position!==e&&(t.style.position=e)}(i),this.container.appendChild(i),this._virtuableComponentMap.set(t,e),t.virtualRectingRequiredEvent=this._containerVirtualRectingRequiredEventListener,t.virtualVisibilityChangeRequiredEvent=this._containerVirtualVisibilityChangeRequiredEventListener,t.virtualZIndexChangeRequiredEvent=this._containerVirtualZIndexChangeRequiredEventListener}}this._registeredComponentMap.set(t,a),o={virtual:i.virtual,component:a}}else o=super.bindComponent(t,e);return o}unbindComponent(t,e,i){if(void 0===this._registeredComponentMap.get(t))super.unbindComponent(t,e,i);else{const e=this._virtuableComponentMap.get(t);if(void 0!==e){const i=e.rootHtmlElement;if(void 0===i)throw new X(\"GLUC77743\",t.title);this.container.removeChild(i),this._virtuableComponentMap.delete(t)}}}fireBeforeVirtualRectingEvent(t){this._goldenLayoutBoundingClientRect=this.container.getBoundingClientRect(),super.fireBeforeVirtualRectingEvent(t)}handleContainerVirtualRectingRequiredEvent(t,e,i){const n=this._virtuableComponentMap.get(t);if(void 0===n)throw new J(\"GLHCSCE55933\");{const o=n.rootHtmlElement;if(void 0===o)throw new Z(tt[4]+\" \"+t.title);{const n=t.element.getBoundingClientRect(),s=n.left-this._goldenLayoutBoundingClientRect.left;o.style.left=zt(s);const r=n.top-this._goldenLayoutBoundingClientRect.top;o.style.top=zt(r),Tt(o,e),At(o,i)}}}handleContainerVirtualVisibilityChangeRequiredEvent(t,e){const i=this._virtuableComponentMap.get(t);if(void 0===i)throw new J(\"GLHCVVCRE55934\");{const n=i.rootHtmlElement;if(void 0===n)throw new Z(tt[4]+\" \"+t.title);Dt(n,e)}}handleContainerVirtualZIndexChangeRequiredEvent(t,e,i){const n=this._virtuableComponentMap.get(t);if(void 0===n)throw new J(\"GLHCVZICRE55935\");{const e=n.rootHtmlElement;if(void 0===e)throw new Z(tt[4]+\" \"+t.title);e.style.zIndex=i}}}const de=\"initial_\",ce={show:\"top\",popout:!1,maximise:!1,close:\"close-tab-unused\"},me={headerHeight:31},ue={hasHeaders:!0,reorderEnabled:!0},pe={popoutWholeStack:!1,constrainDragToContainer:!1,constrainDragToHeaders:!1,preventDragout:!1,showMaximiseIcon:!1,showPopoutIcon:!1,showCloseIcon:!1,blockedPopoutsThrowError:!0,closePopoutsOnUnload:!0,selectionEnabled:!1};var ge,fe;class ve{constructor(e){this.layout=e,ge.set(this,void 0),fe.set(this,void 0),this.handleResize=t=>{t.forEach((t=>this.resizeElement(t.target)))},this.handleMutation=()=>{this.layout.viewComponentsByContainerElement.forEach((t=>{this.resizeElement(t.container.element)}))},t.__classPrivateFieldSet(this,ge,new ResizeObserver(this.handleResize),\"f\"),t.__classPrivateFieldSet(this,fe,new MutationObserver(this.handleMutation),\"f\")}observeMutations(e){t.__classPrivateFieldGet(this,fe,\"f\")?.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[\"class\"]})}destroy(){t.__classPrivateFieldGet(this,ge,\"f\").disconnect(),t.__classPrivateFieldGet(this,fe,\"f\").disconnect()}observeContainer(e){t.__classPrivateFieldGet(this,ge,\"f\").observe(e)}unobserveContainer(e){t.__classPrivateFieldGet(this,ge,\"f\").unobserve(e)}resizeElement(t){const e=this.layout.viewComponentsByContainerElement.get(t);e&&e.resize()}}ge=new WeakMap,fe=new WeakMap;var _e={};Object.defineProperty(_e,\"__esModule\",{value:!0});var ye=_e.BaseItem=void 0;class Ce{constructor(t,e,i){this._item=t,this._layout=e,this._wrap=i}get raw(){return this._item}get layout(){return this._layout}get type(){return this._item.type}get contentItems(){return(this._item.contentItems??[]).map((t=>this._wrap(t)))}get parent(){const t=this._item.parent;return t?this._wrap(t):null}setActiveContentItem(t,e){if(\"stack\"!==this.type)throw new Error(`Cannot call setActiveContentItem from a non-stack item: ${this.type}`);this._item.setActiveContentItem(t.raw,e)}static wrapInternal(t,e,i){const n=Ce.wrapCache.get(e);if(n)return n;const o=new t(e,i,(e=>Ce.wrapInternal(t,e,i)));return Ce.wrapCache.set(e,o),o}}ye=_e.BaseItem=Ce,Ce.wrapCache=new WeakMap;const we=t=>!!t&&\"contentItems\"in t&&(t.isRow||t.isColumn);class Ie extends ye{isRoot(){return!!this._item.parent?.isGround}getBounds(){return this._item.element.getBoundingClientRect()}get viewName(){if(this._item.isComponent){const{component:t}=this._item;return t.identity.name}throw new Error(\"View name not found\")}onDestroyed(t){const e=({target:i})=>{i===this._item&&(t(),this._item.off(\"itemDestroyed\",e))};this._item.on(\"itemDestroyed\",e)}createAdjacentStack({position:t=\"right\"}={}){const e=this.raw;if(ee.isStack(e)&&e.parent){const i=[\"top\",\"bottom\"].includes(t)?\"column\":\"row\",n=[\"left\",\"top\"].includes(t)?1:0,o=we(e.parent)?e.parent:e.layoutManager,s=o,r=e.parent.contentItems.indexOf(e);e.parent.isGround&&e.parent.removeChild(e,!0);const a=o.newItem({type:i,content:[{type:\"stack\",content:[]}]},r);if(!a)throw new Error(\"createAdjacentStack: Failed to create new container\");const l=a.contentItems[0];return a.addChild(this.raw,n),we(s)&&s.removeChild(e,!0),this._wrap(l)}throw new Error(`Cannot creat adjacent stacks for type: ${e.type}, must be type 'stack'`)}setActiveContentItem(t,e=!0){if(!ee.isStack(this._item))throw new Error(`Cannot call setActiveContentItem from a non-stack item: ${this.type}`);this._item.setActiveComponentItem(t.raw,!e)}static wrap(t,e){return ye.wrapInternal(Ie,t,e)}}function be(t=[],e){for(const i of t)\"component\"===i.type?Object.keys(e).forEach((t=>{t in i&&(i.componentState={[`${de}${t}`]:i[t],...i.componentState}),i[t]=e[t]})):be(i.content,e)}function Se(t=[],e,i){for(const n of t)if(\"component\"===n.type)Object.keys(e).forEach((t=>{if(`${de}${t}`in n.componentState)return n[t]=n.componentState[`${de}${t}`],void delete n.componentState[`${de}${t}`];n[t]=e[t]}));else{if(n.size&&(\"row\"===i||\"column\"===i)){n[\"row\"===i?\"width\":\"height\"]=n.size?.includes(\".\")?parseFloat(n.size):parseInt(n.size)}Se(n.content,e,n.type)}}function Ee(t){if(t.root){t.root.content&&Se([t.root],{componentName:\"view\",isClosable:!0});const e=t.root;t.content=[e],delete t.root}return t}const xe=e=>class extends e{connectedCallback(){if(!this.name||!this.uuid)throw new Error(\" Name or uuid attribute missing\");if(!this.src)throw new Error(\" missing 'src' attribute.\");this.#t||(this.#t=document.createElement(\"iframe\"),this.#t.src=this.src,this.#t.style.height=\"100%\",this.#t.style.width=\"100%\",this.#t.style.border=\"none\",this.forceFrameName?this.#t.setAttribute(\"name\",this.forceFrameName):this.#t.setAttribute(\"name\",t.encodeOptions({brokerUrl:this.brokerUrl,name:this.name,uuid:this.uuid,providerId:this.providerId,contextGroup:this.contextGroup},\"of-frame\")),this.#t.setAttribute(\"id\",this.name),this.appendChild(this.#t))}#t;get brokerUrl(){return this.getAttribute(\"of-broker\")}set brokerUrl(t){t&&this.setAttribute(\"of-broker\",t)}get name(){return this.getAttribute(\"of-name\")}set name(t){t&&this.setAttribute(\"of-name\",t)}get forceFrameName(){return this.getAttribute(\"forceFrameName\")}set forceFrameName(t){t&&this.setAttribute(\"forceFrameName\",t)}get uuid(){return this.getAttribute(\"of-uuid\")}set uuid(t){t&&this.setAttribute(\"of-uuid\",t)}get src(){return this.getAttribute(\"src\")}set src(t){t&&this.setAttribute(\"src\",t)}get providerId(){return this.getAttribute(\"of-provider-id\")}set providerId(t){t&&this.setAttribute(\"of-provider-id\",t)}get contextGroup(){return this.getAttribute(\"of-context-group\")}set contextGroup(t){t&&this.setAttribute(\"of-context-group\",t)}static get observedAttributes(){return[\"name\"]}};class Le{static create(t){const e=document.createElement(\"of-view\");return Object.entries(t).forEach((([t,i])=>{e.setAttribute(t,i)})),e}}customElements.define(\"of-view\",xe(HTMLElement));class ze{constructor(t,i,n,{brokerUrl:o,interopConfig:s},r){this.container=t,this.config=i,this.ofView=null,this.isDragging=()=>this.container.tab.element?.className.includes(\"lm_dragging\")??!1;const{url:a,web:l,interop:h,name:d}=i||{},c=d??`internal-generated-view-${e.v4()}`;if(this.identity={uuid:n,name:c},this.container.element.setAttribute(\"of-name\",c),this.container.element.id=`container-${c}`,this.container.parent.id=c,void 0===a)return void this.handleUrlMissing();const m=this.updateTitleIfNotSet(a),u={\"of-broker\":o,\"of-uuid\":n,\"of-name\":c,src:a};l?.frameName&&(u.forceFrameName=l.frameName);const p=h?.currentContextGroup??s?.currentContextGroup;p&&(u[\"of-context-group\"]=p),s?.providerId&&(u[\"of-provider-id\"]=s?.providerId),this.ofView=Le.create(u),this.ofView.title=m??`Iframe: ${a}`,r.appendChild(this.ofView),this.ofView.style.position=\"absolute\"}updateTitleIfNotSet(t){return\"view\"===this.container.parent.title&&this.container.parent.setTitle(t),this.container.parent.title}handleUrlMissing(){const t=document.createElement(\"div\");t.setAttribute(\"style\",\"padding: 20px\");t.innerText=\"No URL provided\",this.container.element.appendChild(t)}destroy(){this.ofView?.remove(),this.ofView=null}closeView(){this.container.close()}resize(){if(this.ofView){if(this.isDragging())return void(this.ofView.style.display=\"none\");const t=this.container.element.getBoundingClientRect();this.ofView.style.position=\"absolute\",this.ofView.style.height=`${t.height}px`,this.ofView.style.width=`${t.width}px`,this.ofView.style.inset=`${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`,this.ofView.style.display=\"block\"}}}class Me extends U{static overrideConfig(t){const e={...ue,...t.settings,...pe};return e.reorderEnabled?be(t.content,{isClosable:!0}):be(t.content,{reorderEnabled:!1}),{dimensions:me,...t,settings:e,header:{...ce,show:!1!==t.settings?.hasHeaders&&ce.show}}}constructor(t,e,i,{options:n},o,s){super(),this.identity=t,this.container=e,this.initialConfig=i,this.layoutManager=o,this.platformProvider=s,this.viewComponentsByContainerElement=new Map,this.layoutContentCache=_.getSingleInstance(),this.reparentingViews=new Set,this.goldenLayoutDestroyed=!1,this.createViewComponent=(t,e)=>{m.handleSharedView(this.layoutManager,this.identity,e);const i=new ze(t,e,this.identity.uuid,this.options,this.iframeContainer);return e&&!1===e[`${de}isClosable`]&&this.stylesheet.insertRule(`#tab-${i.identity.name} .lm_close_tab { display: none; }`),this.viewComponentsByContainerElement.set(t.element,i),this.resizeController.observeContainer(t.element),i},this.iframeContainer=document.createElement(\"div\"),this.iframeContainer.id=`openfin-layout-iframe-container-${this.identity.layoutName}`,this.domEmitter=new V(e),this.setupStylesheets(),this.layout=new he(this.container),this.layout.resizeWithContainerAutomatically=!0,this.options=n,this.layout.registerComponent(\"view\",this.createViewComponent),this.setupListeners(),this.resizeController=new ve(this),this.layout.loadLayout(Me.overrideConfig(i));const r=document.createElement(\"div\");r.id=`openfin-layout-shadow-container-${this.identity.layoutName}`,r.attachShadow({mode:\"open\",delegatesFocus:!1}).appendChild(this.iframeContainer),this.container.appendChild(r),this.resizeController.observeMutations(this.container)}getStackByView({name:t}){const e=this.layout.findFirstComponentItemById(t);if(e?.parent&&e?.parent?.isStack)return Ie.wrap(e.parent,this)}getRoot(){return Ie.wrap(this.layout.rootItem,this)}async platformCloseView(t){const e=[...this.viewComponentsByContainerElement.values()].find((e=>e.identity.name===t.name));if(!e)throw new Error(`View with name: ${t.name} not found in layout.`);e.closeView()}async platformCreateView(t,{location:e,targetView:i}={}){if(i)throw new Error(\"TargetView not supported in web\");const n={options:this.platformProvider.normalizeOptions(t),target:this.identity,location:e};return this.insertView(n)}setupStylesheets(){if(this.container.setAttribute(\"data-openfin-layout-name\",this.identity.layoutName),this.stylesheet=new CSSStyleSheet,this.stylesheet.insertRule(\".lm_close { display: none; }\"),document.adoptedStyleSheets.push(this.stylesheet),this.initialConfig.settings?.preventSplitterResize){const t=`\\n [data-openfin-layout-name='${this.identity.layoutName}'] .lm_splitter {\\n pointer-events: none;\\n }`;this.stylesheet.insertRule(t)}}insertView({options:t,location:e,targetView:i}){const n=e?this.layoutContentCache.getItemOrUndefined(e.id):void 0,o=i?this.layoutContentCache.getItemOrUndefined(i.name):void 0,s=n??o??Ie.wrap(this.layout.rootItem,this);let r;if(ee.isStack(s.raw))r=s.raw;else{if(!we(s.raw))throw new Error(\"Cannot add a view at the requested location\");r=s.raw.newItem({type:\"stack\",content:[]})}const a=Math.min(r.contentItems.length,e?.index??r.contentItems.length);let l=this.layout.findFirstComponentItemById(t.name);l?(l.parent&&l.parent.removeChild(l,!0),r.addChild(l,a)):l=r.newComponent(\"view\",t,t.title??t.url??\"Default Title\",a);const h=l.component.identity;return Promise.resolve({identity:h})}replaceView({viewToReplace:t,newView:e}){throw new Error(\"Method not implemented.\")}replaceLayout(t){throw new Error(\"Method not implemented.\")}async cleanupView(t){}applyPreset(t){throw new Error(\"Method not implemented.\")}getCurrentViews(){return[...this.viewComponentsByContainerElement.values()].map((t=>t.identity))}async getFrameSnapshot(){return Ee(xt.fromResolved(this.layout.toConfig()))}isVisible(){return W(this.container)}async onViewDetached({viewIdentity:t}){this.reparentingViews.add(t.name),this.platformCloseView(t)}async destroy(){this.goldenLayoutDestroyed||(this.goldenLayoutDestroyed=!0,this.layout.destroy()),this.iframeContainer.remove(),this.resizeController.destroy(),document.adoptedStyleSheets=document.adoptedStyleSheets.filter((t=>t!==this.stylesheet)),this.viewComponentsByContainerElement.clear()}setupListeners(){this.container.addEventListener(\"pointerdown\",(t=>{if(t.target instanceof HTMLElement){const e=t.target.classList;[\"lm_tab\",\"lm_title\",\"lm_splitter\",\"lm_drag_handle\"].some((t=>e.contains(t)))&&(this.handleDragStart(),2===t.button&&t.stopPropagation())}}),!0),document.addEventListener(\"pointerup\",(()=>this.handleDragEnd()),!0),this.layout.on(\"tabCreated\",(t=>{const e=t.componentItem.component;t.element.id=`tab-${e.identity.name}`,this.domEmitter.dispatchLocalEvent(\"tab-created\",e.identity)})),this.layout.on(\"itemCreated\",(({target:t})=>{const e=t;if(Gt.isComponentItem(e)){const t=e.component;this.domEmitter.dispatchLocalEvent(\"container-created\",t.identity)}})),this.layout.on(\"itemDestroyed\",(t=>{const e=t.target;if(Gt.isComponentItem(e)){const t=e.component;this.removeViewComponent(t)}})),this.layout.on(\"itemDropped\",(()=>{this.handleDragEnd()}))}handleDragStart(){this.iframeContainer.style.pointerEvents=\"none\"}handleDragEnd(){this.iframeContainer.style.pointerEvents=\"\"}removeViewComponent(t){if(t.config&&!1===t.config[`${de}isClosable`]){const e=[...this.stylesheet.cssRules].findIndex((e=>e.cssText.includes(`#tab-${t.identity.name}`)));this.stylesheet.deleteRule(e)}t.destroy(),this.viewComponentsByContainerElement.delete(t.container.element),this.resizeController.unobserveContainer(t.container.element),this.reparentingViews.has(t.identity.name)?this.reparentingViews.delete(t.identity.name):this.platformProvider.closeView(t.identity.name);0===this.getCurrentViews().length&&(this.goldenLayoutDestroyed||(this.goldenLayoutDestroyed=!0,m.handleLastViewRemoved(this.layoutManager,this.identity)))}}class Pe{constructor(t,e,i,n){this.windowIdentity=t,this.connectConfig=e,this.provider=i,this.fallbackContainer=n}async createLayout(t,e){if(!(\"container\"in t)&&!this.fallbackContainer)throw new Error(\"Container property is not optional in web\");const{layoutName:i}=t,n=t,o=this.provider.initLayoutViews(n),s=n.container??this.fallbackContainer,r={...this.windowIdentity,layoutName:i},a=new Me(r,s,o,this.connectConfig,e,this.provider);m.registerLayout(e,i,a),this.fallbackContainer=null}async getLayoutSnapshot(t){return t.getLayoutSnapshot()}async handleLastViewRemoved(t){}}class Te{static async init(e){const i=e.getFin().InterApplicationBus.Channel,n=await i.create(`custom-frame-${e.me.uuid}`);return n.setDefaultAction((async(t,{target:e,opts:i},o)=>{const s=n.connections.find((t=>t.name===e.name));if(s)return n.dispatch(s,t,{...i,target:e});throw new Error(`Client with name ${e.name} not found`)})),await t.relayChannelClientApi_1(n,\"layout-relay\"),new Te(e)}constructor(t){this.wire=t,this.viewNames=new Set}normalizeOptions(t,i=\"default\"){const n=this.wire.me.uuid;let{name:o=`internal-generated-view-${e.v4()}`}=t;return o.match(/^internal-generated-view-/)&&this.viewNames.has(o)&&\"duplicate\"===i&&(o=`internal-generated-view-${e.v4()}`),this.viewNames.add(o),{...t,name:o,uuid:n}}closeView(t){this.viewNames.delete(t)}initLayoutViews({layout:t,multiInstanceViewBehavior:e}){return H((t=>{if(\"component\"===t.type&&t.componentState){const i=this.normalizeOptions(t.componentState,e);return{...t,componentState:i}}return t}),t)}}var Ae;const ke=t=>t;Ae=new WeakMap,exports.WebLayoutEntryPoint=class{constructor(e){Ae.set(this,void 0),this.initLayoutManager=async(e,i,{container:n,layoutManagerOverride:o})=>{const s=await Te.init(i),r=o??ke,a=new Pe(i.me,t.__classPrivateFieldGet(this,Ae,\"f\"),s,n),l=new(r(m.createClosedConstructor(a)));return await M(i,l),l},this.applyLayoutSnapshot=async(e,i,n)=>{await i.applyLayoutSnapshot(t.__classPrivateFieldGet(this,Ae,\"f\").platform.layoutSnapshot)},this.createLayout=async(t,e)=>m.createLayout(t,e),this.destroyLayout=async(t,e)=>m.destroyLayout(t,e),t.__classPrivateFieldSet(this,Ae,e,\"f\")}};\n","'use strict'\n\nexports.byteLength = byteLength\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\nfor (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i]\n revLookup[code.charCodeAt(i)] = i\n}\n\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction getLens (b64) {\n var len = b64.length\n\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // Trim off extra bytes after placeholder bytes are found\n // See: https://github.com/beatgammit/base64-js/issues/42\n var validLen = b64.indexOf('=')\n if (validLen === -1) validLen = len\n\n var placeHoldersLen = validLen === len\n ? 0\n : 4 - (validLen % 4)\n\n return [validLen, placeHoldersLen]\n}\n\n// base64 is 4/3 + up to two characters of the original data\nfunction byteLength (b64) {\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction _byteLength (b64, validLen, placeHoldersLen) {\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction toByteArray (b64) {\n var tmp\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n\n var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))\n\n var curByte = 0\n\n // if there are placeholders, only get up to the last complete 4 chars\n var len = placeHoldersLen > 0\n ? validLen - 4\n : validLen\n\n var i\n for (i = 0; i < len; i += 4) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 18) |\n (revLookup[b64.charCodeAt(i + 1)] << 12) |\n (revLookup[b64.charCodeAt(i + 2)] << 6) |\n revLookup[b64.charCodeAt(i + 3)]\n arr[curByte++] = (tmp >> 16) & 0xFF\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 2) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 2) |\n (revLookup[b64.charCodeAt(i + 1)] >> 4)\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 1) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 10) |\n (revLookup[b64.charCodeAt(i + 1)] << 4) |\n (revLookup[b64.charCodeAt(i + 2)] >> 2)\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] +\n lookup[num >> 12 & 0x3F] +\n lookup[num >> 6 & 0x3F] +\n lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n var tmp\n var output = []\n for (var i = start; i < end; i += 3) {\n tmp =\n ((uint8[i] << 16) & 0xFF0000) +\n ((uint8[i + 1] << 8) & 0xFF00) +\n (uint8[i + 2] & 0xFF)\n output.push(tripletToBase64(tmp))\n }\n return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n var tmp\n var len = uint8.length\n var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n var parts = []\n var maxChunkLength = 16383 // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1]\n parts.push(\n lookup[tmp >> 2] +\n lookup[(tmp << 4) & 0x3F] +\n '=='\n )\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + uint8[len - 1]\n parts.push(\n lookup[tmp >> 10] +\n lookup[(tmp >> 4) & 0x3F] +\n lookup[(tmp << 2) & 0x3F] +\n '='\n )\n }\n\n return parts.join('')\n}\n","/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n/* eslint-disable no-proto */\n\n'use strict'\n\nconst base64 = require('base64-js')\nconst ieee754 = require('ieee754')\nconst customInspectSymbol =\n (typeof Symbol === 'function' && typeof Symbol['for'] === 'function') // eslint-disable-line dot-notation\n ? Symbol['for']('nodejs.util.inspect.custom') // eslint-disable-line dot-notation\n : null\n\nexports.Buffer = Buffer\nexports.SlowBuffer = SlowBuffer\nexports.INSPECT_MAX_BYTES = 50\n\nconst K_MAX_LENGTH = 0x7fffffff\nexports.kMaxLength = K_MAX_LENGTH\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Print warning and recommend using `buffer` v4.x which has an Object\n * implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * We report that the browser does not support typed arrays if the are not subclassable\n * using __proto__. Firefox 4-29 lacks support for adding new properties to `Uint8Array`\n * (See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438). IE 10 lacks support\n * for __proto__ and has a buggy typed array implementation.\n */\nBuffer.TYPED_ARRAY_SUPPORT = typedArraySupport()\n\nif (!Buffer.TYPED_ARRAY_SUPPORT && typeof console !== 'undefined' &&\n typeof console.error === 'function') {\n console.error(\n 'This browser lacks typed array (Uint8Array) support which is required by ' +\n '`buffer` v5.x. Use `buffer` v4.x if you require old browser support.'\n )\n}\n\nfunction typedArraySupport () {\n // Can typed array instances can be augmented?\n try {\n const arr = new Uint8Array(1)\n const proto = { foo: function () { return 42 } }\n Object.setPrototypeOf(proto, Uint8Array.prototype)\n Object.setPrototypeOf(arr, proto)\n return arr.foo() === 42\n } catch (e) {\n return false\n }\n}\n\nObject.defineProperty(Buffer.prototype, 'parent', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.buffer\n }\n})\n\nObject.defineProperty(Buffer.prototype, 'offset', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.byteOffset\n }\n})\n\nfunction createBuffer (length) {\n if (length > K_MAX_LENGTH) {\n throw new RangeError('The value \"' + length + '\" is invalid for option \"size\"')\n }\n // Return an augmented `Uint8Array` instance\n const buf = new Uint8Array(length)\n Object.setPrototypeOf(buf, Buffer.prototype)\n return buf\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new TypeError(\n 'The \"string\" argument must be of type string. Received type number'\n )\n }\n return allocUnsafe(arg)\n }\n return from(arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\nfunction from (value, encodingOrOffset, length) {\n if (typeof value === 'string') {\n return fromString(value, encodingOrOffset)\n }\n\n if (ArrayBuffer.isView(value)) {\n return fromArrayView(value)\n }\n\n if (value == null) {\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n }\n\n if (isInstance(value, ArrayBuffer) ||\n (value && isInstance(value.buffer, ArrayBuffer))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof SharedArrayBuffer !== 'undefined' &&\n (isInstance(value, SharedArrayBuffer) ||\n (value && isInstance(value.buffer, SharedArrayBuffer)))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof value === 'number') {\n throw new TypeError(\n 'The \"value\" argument must not be of type number. Received type number'\n )\n }\n\n const valueOf = value.valueOf && value.valueOf()\n if (valueOf != null && valueOf !== value) {\n return Buffer.from(valueOf, encodingOrOffset, length)\n }\n\n const b = fromObject(value)\n if (b) return b\n\n if (typeof Symbol !== 'undefined' && Symbol.toPrimitive != null &&\n typeof value[Symbol.toPrimitive] === 'function') {\n return Buffer.from(value[Symbol.toPrimitive]('string'), encodingOrOffset, length)\n }\n\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n return from(value, encodingOrOffset, length)\n}\n\n// Note: Change prototype *after* Buffer.from is defined to workaround Chrome bug:\n// https://github.com/feross/buffer/pull/148\nObject.setPrototypeOf(Buffer.prototype, Uint8Array.prototype)\nObject.setPrototypeOf(Buffer, Uint8Array)\n\nfunction assertSize (size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be of type number')\n } else if (size < 0) {\n throw new RangeError('The value \"' + size + '\" is invalid for option \"size\"')\n }\n}\n\nfunction alloc (size, fill, encoding) {\n assertSize(size)\n if (size <= 0) {\n return createBuffer(size)\n }\n if (fill !== undefined) {\n // Only pay attention to encoding if it's a string. This\n // prevents accidentally sending in a number that would\n // be interpreted as a start offset.\n return typeof encoding === 'string'\n ? createBuffer(size).fill(fill, encoding)\n : createBuffer(size).fill(fill)\n }\n return createBuffer(size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n return alloc(size, fill, encoding)\n}\n\nfunction allocUnsafe (size) {\n assertSize(size)\n return createBuffer(size < 0 ? 0 : checked(size) | 0)\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n return allocUnsafe(size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n return allocUnsafe(size)\n}\n\nfunction fromString (string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8'\n }\n\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n\n const length = byteLength(string, encoding) | 0\n let buf = createBuffer(length)\n\n const actual = buf.write(string, encoding)\n\n if (actual !== length) {\n // Writing a hex string, for example, that contains invalid characters will\n // cause everything after the first invalid character to be ignored. (e.g.\n // 'abxxcd' will be treated as 'ab')\n buf = buf.slice(0, actual)\n }\n\n return buf\n}\n\nfunction fromArrayLike (array) {\n const length = array.length < 0 ? 0 : checked(array.length) | 0\n const buf = createBuffer(length)\n for (let i = 0; i < length; i += 1) {\n buf[i] = array[i] & 255\n }\n return buf\n}\n\nfunction fromArrayView (arrayView) {\n if (isInstance(arrayView, Uint8Array)) {\n const copy = new Uint8Array(arrayView)\n return fromArrayBuffer(copy.buffer, copy.byteOffset, copy.byteLength)\n }\n return fromArrayLike(arrayView)\n}\n\nfunction fromArrayBuffer (array, byteOffset, length) {\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\"offset\" is outside of buffer bounds')\n }\n\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\"length\" is outside of buffer bounds')\n }\n\n let buf\n if (byteOffset === undefined && length === undefined) {\n buf = new Uint8Array(array)\n } else if (length === undefined) {\n buf = new Uint8Array(array, byteOffset)\n } else {\n buf = new Uint8Array(array, byteOffset, length)\n }\n\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(buf, Buffer.prototype)\n\n return buf\n}\n\nfunction fromObject (obj) {\n if (Buffer.isBuffer(obj)) {\n const len = checked(obj.length) | 0\n const buf = createBuffer(len)\n\n if (buf.length === 0) {\n return buf\n }\n\n obj.copy(buf, 0, 0, len)\n return buf\n }\n\n if (obj.length !== undefined) {\n if (typeof obj.length !== 'number' || numberIsNaN(obj.length)) {\n return createBuffer(0)\n }\n return fromArrayLike(obj)\n }\n\n if (obj.type === 'Buffer' && Array.isArray(obj.data)) {\n return fromArrayLike(obj.data)\n }\n}\n\nfunction checked (length) {\n // Note: cannot use `length < K_MAX_LENGTH` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= K_MAX_LENGTH) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + K_MAX_LENGTH.toString(16) + ' bytes')\n }\n return length | 0\n}\n\nfunction SlowBuffer (length) {\n if (+length != length) { // eslint-disable-line eqeqeq\n length = 0\n }\n return Buffer.alloc(+length)\n}\n\nBuffer.isBuffer = function isBuffer (b) {\n return b != null && b._isBuffer === true &&\n b !== Buffer.prototype // so Buffer.isBuffer(Buffer.prototype) will be false\n}\n\nBuffer.compare = function compare (a, b) {\n if (isInstance(a, Uint8Array)) a = Buffer.from(a, a.offset, a.byteLength)\n if (isInstance(b, Uint8Array)) b = Buffer.from(b, b.offset, b.byteLength)\n if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n throw new TypeError(\n 'The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array'\n )\n }\n\n if (a === b) return 0\n\n let x = a.length\n let y = b.length\n\n for (let i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i]\n y = b[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n switch (String(encoding).toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'latin1':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return true\n default:\n return false\n }\n}\n\nBuffer.concat = function concat (list, length) {\n if (!Array.isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n\n if (list.length === 0) {\n return Buffer.alloc(0)\n }\n\n let i\n if (length === undefined) {\n length = 0\n for (i = 0; i < list.length; ++i) {\n length += list[i].length\n }\n }\n\n const buffer = Buffer.allocUnsafe(length)\n let pos = 0\n for (i = 0; i < list.length; ++i) {\n let buf = list[i]\n if (isInstance(buf, Uint8Array)) {\n if (pos + buf.length > buffer.length) {\n if (!Buffer.isBuffer(buf)) buf = Buffer.from(buf)\n buf.copy(buffer, pos)\n } else {\n Uint8Array.prototype.set.call(\n buffer,\n buf,\n pos\n )\n }\n } else if (!Buffer.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n } else {\n buf.copy(buffer, pos)\n }\n pos += buf.length\n }\n return buffer\n}\n\nfunction byteLength (string, encoding) {\n if (Buffer.isBuffer(string)) {\n return string.length\n }\n if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) {\n return string.byteLength\n }\n if (typeof string !== 'string') {\n throw new TypeError(\n 'The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. ' +\n 'Received type ' + typeof string\n )\n }\n\n const len = string.length\n const mustMatch = (arguments.length > 2 && arguments[2] === true)\n if (!mustMatch && len === 0) return 0\n\n // Use a for loop to avoid recursion\n let loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'ascii':\n case 'latin1':\n case 'binary':\n return len\n case 'utf8':\n case 'utf-8':\n return utf8ToBytes(string).length\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return len * 2\n case 'hex':\n return len >>> 1\n case 'base64':\n return base64ToBytes(string).length\n default:\n if (loweredCase) {\n return mustMatch ? -1 : utf8ToBytes(string).length // assume utf8\n }\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n let loweredCase = false\n\n // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n // property of a typed array.\n\n // This behaves neither like String nor Uint8Array in that we set start/end\n // to their upper/lower bounds if the value passed is out of range.\n // undefined is handled specially as per ECMA-262 6th Edition,\n // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n if (start === undefined || start < 0) {\n start = 0\n }\n // Return early if start > this.length. Done here to prevent potential uint32\n // coercion fail below.\n if (start > this.length) {\n return ''\n }\n\n if (end === undefined || end > this.length) {\n end = this.length\n }\n\n if (end <= 0) {\n return ''\n }\n\n // Force coercion to uint32. This will also coerce falsey/NaN values to 0.\n end >>>= 0\n start >>>= 0\n\n if (end <= start) {\n return ''\n }\n\n if (!encoding) encoding = 'utf8'\n\n while (true) {\n switch (encoding) {\n case 'hex':\n return hexSlice(this, start, end)\n\n case 'utf8':\n case 'utf-8':\n return utf8Slice(this, start, end)\n\n case 'ascii':\n return asciiSlice(this, start, end)\n\n case 'latin1':\n case 'binary':\n return latin1Slice(this, start, end)\n\n case 'base64':\n return base64Slice(this, start, end)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return utf16leSlice(this, start, end)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = (encoding + '').toLowerCase()\n loweredCase = true\n }\n }\n}\n\n// This property is used by `Buffer.isBuffer` (and the `is-buffer` npm package)\n// to detect a Buffer instance. It's not possible to use `instanceof Buffer`\n// reliably in a browserify context because there could be multiple different\n// copies of the 'buffer' package in use. This method works even for Buffer\n// instances that were created from another copy of the `buffer` package.\n// See: https://github.com/feross/buffer/issues/154\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n const i = b[n]\n b[n] = b[m]\n b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n const len = this.length\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits')\n }\n for (let i = 0; i < len; i += 2) {\n swap(this, i, i + 1)\n }\n return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n const len = this.length\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits')\n }\n for (let i = 0; i < len; i += 4) {\n swap(this, i, i + 3)\n swap(this, i + 1, i + 2)\n }\n return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n const len = this.length\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits')\n }\n for (let i = 0; i < len; i += 8) {\n swap(this, i, i + 7)\n swap(this, i + 1, i + 6)\n swap(this, i + 2, i + 5)\n swap(this, i + 3, i + 4)\n }\n return this\n}\n\nBuffer.prototype.toString = function toString () {\n const length = this.length\n if (length === 0) return ''\n if (arguments.length === 0) return utf8Slice(this, 0, length)\n return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.toLocaleString = Buffer.prototype.toString\n\nBuffer.prototype.equals = function equals (b) {\n if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n if (this === b) return true\n return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n let str = ''\n const max = exports.INSPECT_MAX_BYTES\n str = this.toString('hex', 0, max).replace(/(.{2})/g, '$1 ').trim()\n if (this.length > max) str += ' ... '\n return ''\n}\nif (customInspectSymbol) {\n Buffer.prototype[customInspectSymbol] = Buffer.prototype.inspect\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n if (isInstance(target, Uint8Array)) {\n target = Buffer.from(target, target.offset, target.byteLength)\n }\n if (!Buffer.isBuffer(target)) {\n throw new TypeError(\n 'The \"target\" argument must be one of type Buffer or Uint8Array. ' +\n 'Received type ' + (typeof target)\n )\n }\n\n if (start === undefined) {\n start = 0\n }\n if (end === undefined) {\n end = target ? target.length : 0\n }\n if (thisStart === undefined) {\n thisStart = 0\n }\n if (thisEnd === undefined) {\n thisEnd = this.length\n }\n\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError('out of range index')\n }\n\n if (thisStart >= thisEnd && start >= end) {\n return 0\n }\n if (thisStart >= thisEnd) {\n return -1\n }\n if (start >= end) {\n return 1\n }\n\n start >>>= 0\n end >>>= 0\n thisStart >>>= 0\n thisEnd >>>= 0\n\n if (this === target) return 0\n\n let x = thisEnd - thisStart\n let y = end - start\n const len = Math.min(x, y)\n\n const thisCopy = this.slice(thisStart, thisEnd)\n const targetCopy = target.slice(start, end)\n\n for (let i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i]\n y = targetCopy[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (numberIsNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [val], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n let indexSize = 1\n let arrLength = arr.length\n let valLength = val.length\n\n if (encoding !== undefined) {\n encoding = String(encoding).toLowerCase()\n if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n encoding === 'utf16le' || encoding === 'utf-16le') {\n if (arr.length < 2 || val.length < 2) {\n return -1\n }\n indexSize = 2\n arrLength /= 2\n valLength /= 2\n byteOffset /= 2\n }\n }\n\n function read (buf, i) {\n if (indexSize === 1) {\n return buf[i]\n } else {\n return buf.readUInt16BE(i * indexSize)\n }\n }\n\n let i\n if (dir) {\n let foundIndex = -1\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1) foundIndex = i\n if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n } else {\n if (foundIndex !== -1) i -= i - foundIndex\n foundIndex = -1\n }\n }\n } else {\n if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n for (i = byteOffset; i >= 0; i--) {\n let found = true\n for (let j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false\n break\n }\n }\n if (found) return i\n }\n }\n\n return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n offset = Number(offset) || 0\n const remaining = buf.length - offset\n if (!length) {\n length = remaining\n } else {\n length = Number(length)\n if (length > remaining) {\n length = remaining\n }\n }\n\n const strLen = string.length\n\n if (length > strLen / 2) {\n length = strLen / 2\n }\n let i\n for (i = 0; i < length; ++i) {\n const parsed = parseInt(string.substr(i * 2, 2), 16)\n if (numberIsNaN(parsed)) return i\n buf[offset + i] = parsed\n }\n return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n // Buffer#write(string)\n if (offset === undefined) {\n encoding = 'utf8'\n length = this.length\n offset = 0\n // Buffer#write(string, encoding)\n } else if (length === undefined && typeof offset === 'string') {\n encoding = offset\n length = this.length\n offset = 0\n // Buffer#write(string, offset[, length][, encoding])\n } else if (isFinite(offset)) {\n offset = offset >>> 0\n if (isFinite(length)) {\n length = length >>> 0\n if (encoding === undefined) encoding = 'utf8'\n } else {\n encoding = length\n length = undefined\n }\n } else {\n throw new Error(\n 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n )\n }\n\n const remaining = this.length - offset\n if (length === undefined || length > remaining) length = remaining\n\n if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n throw new RangeError('Attempt to write outside buffer bounds')\n }\n\n if (!encoding) encoding = 'utf8'\n\n let loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'hex':\n return hexWrite(this, string, offset, length)\n\n case 'utf8':\n case 'utf-8':\n return utf8Write(this, string, offset, length)\n\n case 'ascii':\n case 'latin1':\n case 'binary':\n return asciiWrite(this, string, offset, length)\n\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return base64Write(this, string, offset, length)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return ucs2Write(this, string, offset, length)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0)\n }\n}\n\nfunction base64Slice (buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf)\n } else {\n return base64.fromByteArray(buf.slice(start, end))\n }\n}\n\nfunction utf8Slice (buf, start, end) {\n end = Math.min(buf.length, end)\n const res = []\n\n let i = start\n while (i < end) {\n const firstByte = buf[i]\n let codePoint = null\n let bytesPerSequence = (firstByte > 0xEF)\n ? 4\n : (firstByte > 0xDF)\n ? 3\n : (firstByte > 0xBF)\n ? 2\n : 1\n\n if (i + bytesPerSequence <= end) {\n let secondByte, thirdByte, fourthByte, tempCodePoint\n\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 0x80) {\n codePoint = firstByte\n }\n break\n case 2:\n secondByte = buf[i + 1]\n if ((secondByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n if (tempCodePoint > 0x7F) {\n codePoint = tempCodePoint\n }\n }\n break\n case 3:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n codePoint = tempCodePoint\n }\n }\n break\n case 4:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n fourthByte = buf[i + 3]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n codePoint = tempCodePoint\n }\n }\n }\n }\n\n if (codePoint === null) {\n // we did not generate a valid codePoint so insert a\n // replacement char (U+FFFD) and advance only 1 byte\n codePoint = 0xFFFD\n bytesPerSequence = 1\n } else if (codePoint > 0xFFFF) {\n // encode to utf16 (surrogate pair dance)\n codePoint -= 0x10000\n res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n codePoint = 0xDC00 | codePoint & 0x3FF\n }\n\n res.push(codePoint)\n i += bytesPerSequence\n }\n\n return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nconst MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n const len = codePoints.length\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n }\n\n // Decode in chunks to avoid \"call stack size exceeded\".\n let res = ''\n let i = 0\n while (i < len) {\n res += String.fromCharCode.apply(\n String,\n codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n )\n }\n return res\n}\n\nfunction asciiSlice (buf, start, end) {\n let ret = ''\n end = Math.min(buf.length, end)\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F)\n }\n return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n let ret = ''\n end = Math.min(buf.length, end)\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i])\n }\n return ret\n}\n\nfunction hexSlice (buf, start, end) {\n const len = buf.length\n\n if (!start || start < 0) start = 0\n if (!end || end < 0 || end > len) end = len\n\n let out = ''\n for (let i = start; i < end; ++i) {\n out += hexSliceLookupTable[buf[i]]\n }\n return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n const bytes = buf.slice(start, end)\n let res = ''\n // If bytes.length is odd, the last 8 bits must be ignored (same as node.js)\n for (let i = 0; i < bytes.length - 1; i += 2) {\n res += String.fromCharCode(bytes[i] + (bytes[i + 1] * 256))\n }\n return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n const len = this.length\n start = ~~start\n end = end === undefined ? len : ~~end\n\n if (start < 0) {\n start += len\n if (start < 0) start = 0\n } else if (start > len) {\n start = len\n }\n\n if (end < 0) {\n end += len\n if (end < 0) end = 0\n } else if (end > len) {\n end = len\n }\n\n if (end < start) end = start\n\n const newBuf = this.subarray(start, end)\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(newBuf, Buffer.prototype)\n\n return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUintLE =\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let val = this[offset]\n let mul = 1\n let i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUintBE =\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n checkOffset(offset, byteLength, this.length)\n }\n\n let val = this[offset + --byteLength]\n let mul = 1\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUint8 =\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n return this[offset]\n}\n\nBuffer.prototype.readUint16LE =\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUint16BE =\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUint32LE =\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return ((this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16)) +\n (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUint32BE =\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] * 0x1000000) +\n ((this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n this[offset + 3])\n}\n\nBuffer.prototype.readBigUInt64LE = defineBigIntMethod(function readBigUInt64LE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const lo = first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24\n\n const hi = this[++offset] +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n last * 2 ** 24\n\n return BigInt(lo) + (BigInt(hi) << BigInt(32))\n})\n\nBuffer.prototype.readBigUInt64BE = defineBigIntMethod(function readBigUInt64BE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const hi = first * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset]\n\n const lo = this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last\n\n return (BigInt(hi) << BigInt(32)) + BigInt(lo)\n})\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let val = this[offset]\n let mul = 1\n let i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let i = byteLength\n let mul = 1\n let val = this[offset + --i]\n while (i > 0 && (mul *= 0x100)) {\n val += this[offset + --i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n if (!(this[offset] & 0x80)) return (this[offset])\n return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n const val = this[offset] | (this[offset + 1] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n const val = this[offset + 1] | (this[offset] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16) |\n (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] << 24) |\n (this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n (this[offset + 3])\n}\n\nBuffer.prototype.readBigInt64LE = defineBigIntMethod(function readBigInt64LE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const val = this[offset + 4] +\n this[offset + 5] * 2 ** 8 +\n this[offset + 6] * 2 ** 16 +\n (last << 24) // Overflow\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24)\n})\n\nBuffer.prototype.readBigInt64BE = defineBigIntMethod(function readBigInt64BE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const val = (first << 24) + // Overflow\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset]\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last)\n})\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUintLE =\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n let mul = 1\n let i = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUintBE =\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n let i = byteLength - 1\n let mul = 1\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUint8 =\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeUint16LE =\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeUint16BE =\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeUint32LE =\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset + 3] = (value >>> 24)\n this[offset + 2] = (value >>> 16)\n this[offset + 1] = (value >>> 8)\n this[offset] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeUint32BE =\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nfunction wrtBigUInt64LE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7)\n\n let lo = Number(value & BigInt(0xffffffff))\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n return offset\n}\n\nfunction wrtBigUInt64BE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7)\n\n let lo = Number(value & BigInt(0xffffffff))\n buf[offset + 7] = lo\n lo = lo >> 8\n buf[offset + 6] = lo\n lo = lo >> 8\n buf[offset + 5] = lo\n lo = lo >> 8\n buf[offset + 4] = lo\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n buf[offset + 3] = hi\n hi = hi >> 8\n buf[offset + 2] = hi\n hi = hi >> 8\n buf[offset + 1] = hi\n hi = hi >> 8\n buf[offset] = hi\n return offset + 8\n}\n\nBuffer.prototype.writeBigUInt64LE = defineBigIntMethod(function writeBigUInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeBigUInt64BE = defineBigIntMethod(function writeBigUInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n let i = 0\n let mul = 1\n let sub = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n let i = byteLength - 1\n let mul = 1\n let sub = 0\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n if (value < 0) value = 0xff + value + 1\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n this[offset + 2] = (value >>> 16)\n this[offset + 3] = (value >>> 24)\n return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (value < 0) value = 0xffffffff + value + 1\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeBigInt64LE = defineBigIntMethod(function writeBigInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nBuffer.prototype.writeBigInt64BE = defineBigIntMethod(function writeBigInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n }\n ieee754.write(buf, value, offset, littleEndian, 23, 4)\n return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n }\n ieee754.write(buf, value, offset, littleEndian, 52, 8)\n return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n if (!Buffer.isBuffer(target)) throw new TypeError('argument should be a Buffer')\n if (!start) start = 0\n if (!end && end !== 0) end = this.length\n if (targetStart >= target.length) targetStart = target.length\n if (!targetStart) targetStart = 0\n if (end > 0 && end < start) end = start\n\n // Copy 0 bytes; we're done\n if (end === start) return 0\n if (target.length === 0 || this.length === 0) return 0\n\n // Fatal error conditions\n if (targetStart < 0) {\n throw new RangeError('targetStart out of bounds')\n }\n if (start < 0 || start >= this.length) throw new RangeError('Index out of range')\n if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n // Are we oob?\n if (end > this.length) end = this.length\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start\n }\n\n const len = end - start\n\n if (this === target && typeof Uint8Array.prototype.copyWithin === 'function') {\n // Use built-in when available, missing from IE11\n this.copyWithin(targetStart, start, end)\n } else {\n Uint8Array.prototype.set.call(\n target,\n this.subarray(start, end),\n targetStart\n )\n }\n\n return len\n}\n\n// Usage:\n// buffer.fill(number[, offset[, end]])\n// buffer.fill(buffer[, offset[, end]])\n// buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n // Handle string cases:\n if (typeof val === 'string') {\n if (typeof start === 'string') {\n encoding = start\n start = 0\n end = this.length\n } else if (typeof end === 'string') {\n encoding = end\n end = this.length\n }\n if (encoding !== undefined && typeof encoding !== 'string') {\n throw new TypeError('encoding must be a string')\n }\n if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n if (val.length === 1) {\n const code = val.charCodeAt(0)\n if ((encoding === 'utf8' && code < 128) ||\n encoding === 'latin1') {\n // Fast path: If `val` fits into a single byte, use that numeric value.\n val = code\n }\n }\n } else if (typeof val === 'number') {\n val = val & 255\n } else if (typeof val === 'boolean') {\n val = Number(val)\n }\n\n // Invalid ranges are not set to a default, so can range check early.\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError('Out of range index')\n }\n\n if (end <= start) {\n return this\n }\n\n start = start >>> 0\n end = end === undefined ? this.length : end >>> 0\n\n if (!val) val = 0\n\n let i\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val\n }\n } else {\n const bytes = Buffer.isBuffer(val)\n ? val\n : Buffer.from(val, encoding)\n const len = bytes.length\n if (len === 0) {\n throw new TypeError('The value \"' + val +\n '\" is invalid for argument \"value\"')\n }\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len]\n }\n }\n\n return this\n}\n\n// CUSTOM ERRORS\n// =============\n\n// Simplified versions from Node, changed for Buffer-only usage\nconst errors = {}\nfunction E (sym, getMessage, Base) {\n errors[sym] = class NodeError extends Base {\n constructor () {\n super()\n\n Object.defineProperty(this, 'message', {\n value: getMessage.apply(this, arguments),\n writable: true,\n configurable: true\n })\n\n // Add the error code to the name to include it in the stack trace.\n this.name = `${this.name} [${sym}]`\n // Access the stack to generate the error message including the error code\n // from the name.\n this.stack // eslint-disable-line no-unused-expressions\n // Reset the name to the actual name.\n delete this.name\n }\n\n get code () {\n return sym\n }\n\n set code (value) {\n Object.defineProperty(this, 'code', {\n configurable: true,\n enumerable: true,\n value,\n writable: true\n })\n }\n\n toString () {\n return `${this.name} [${sym}]: ${this.message}`\n }\n }\n}\n\nE('ERR_BUFFER_OUT_OF_BOUNDS',\n function (name) {\n if (name) {\n return `${name} is outside of buffer bounds`\n }\n\n return 'Attempt to access memory outside buffer bounds'\n }, RangeError)\nE('ERR_INVALID_ARG_TYPE',\n function (name, actual) {\n return `The \"${name}\" argument must be of type number. Received type ${typeof actual}`\n }, TypeError)\nE('ERR_OUT_OF_RANGE',\n function (str, range, input) {\n let msg = `The value of \"${str}\" is out of range.`\n let received = input\n if (Number.isInteger(input) && Math.abs(input) > 2 ** 32) {\n received = addNumericalSeparator(String(input))\n } else if (typeof input === 'bigint') {\n received = String(input)\n if (input > BigInt(2) ** BigInt(32) || input < -(BigInt(2) ** BigInt(32))) {\n received = addNumericalSeparator(received)\n }\n received += 'n'\n }\n msg += ` It must be ${range}. Received ${received}`\n return msg\n }, RangeError)\n\nfunction addNumericalSeparator (val) {\n let res = ''\n let i = val.length\n const start = val[0] === '-' ? 1 : 0\n for (; i >= start + 4; i -= 3) {\n res = `_${val.slice(i - 3, i)}${res}`\n }\n return `${val.slice(0, i)}${res}`\n}\n\n// CHECK FUNCTIONS\n// ===============\n\nfunction checkBounds (buf, offset, byteLength) {\n validateNumber(offset, 'offset')\n if (buf[offset] === undefined || buf[offset + byteLength] === undefined) {\n boundsError(offset, buf.length - (byteLength + 1))\n }\n}\n\nfunction checkIntBI (value, min, max, buf, offset, byteLength) {\n if (value > max || value < min) {\n const n = typeof min === 'bigint' ? 'n' : ''\n let range\n if (byteLength > 3) {\n if (min === 0 || min === BigInt(0)) {\n range = `>= 0${n} and < 2${n} ** ${(byteLength + 1) * 8}${n}`\n } else {\n range = `>= -(2${n} ** ${(byteLength + 1) * 8 - 1}${n}) and < 2 ** ` +\n `${(byteLength + 1) * 8 - 1}${n}`\n }\n } else {\n range = `>= ${min}${n} and <= ${max}${n}`\n }\n throw new errors.ERR_OUT_OF_RANGE('value', range, value)\n }\n checkBounds(buf, offset, byteLength)\n}\n\nfunction validateNumber (value, name) {\n if (typeof value !== 'number') {\n throw new errors.ERR_INVALID_ARG_TYPE(name, 'number', value)\n }\n}\n\nfunction boundsError (value, length, type) {\n if (Math.floor(value) !== value) {\n validateNumber(value, type)\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset', 'an integer', value)\n }\n\n if (length < 0) {\n throw new errors.ERR_BUFFER_OUT_OF_BOUNDS()\n }\n\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset',\n `>= ${type ? 1 : 0} and <= ${length}`,\n value)\n}\n\n// HELPER FUNCTIONS\n// ================\n\nconst INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n // Node takes equal signs as end of the Base64 encoding\n str = str.split('=')[0]\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = str.trim().replace(INVALID_BASE64_RE, '')\n // Node converts strings with length < 2 to ''\n if (str.length < 2) return ''\n // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n while (str.length % 4 !== 0) {\n str = str + '='\n }\n return str\n}\n\nfunction utf8ToBytes (string, units) {\n units = units || Infinity\n let codePoint\n const length = string.length\n let leadSurrogate = null\n const bytes = []\n\n for (let i = 0; i < length; ++i) {\n codePoint = string.charCodeAt(i)\n\n // is surrogate component\n if (codePoint > 0xD7FF && codePoint < 0xE000) {\n // last char was a lead\n if (!leadSurrogate) {\n // no lead yet\n if (codePoint > 0xDBFF) {\n // unexpected trail\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n } else if (i + 1 === length) {\n // unpaired lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n }\n\n // valid lead\n leadSurrogate = codePoint\n\n continue\n }\n\n // 2 leads in a row\n if (codePoint < 0xDC00) {\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n leadSurrogate = codePoint\n continue\n }\n\n // valid surrogate pair\n codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n } else if (leadSurrogate) {\n // valid bmp char, but last char was a lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n }\n\n leadSurrogate = null\n\n // encode utf8\n if (codePoint < 0x80) {\n if ((units -= 1) < 0) break\n bytes.push(codePoint)\n } else if (codePoint < 0x800) {\n if ((units -= 2) < 0) break\n bytes.push(\n codePoint >> 0x6 | 0xC0,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x10000) {\n if ((units -= 3) < 0) break\n bytes.push(\n codePoint >> 0xC | 0xE0,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x110000) {\n if ((units -= 4) < 0) break\n bytes.push(\n codePoint >> 0x12 | 0xF0,\n codePoint >> 0xC & 0x3F | 0x80,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else {\n throw new Error('Invalid code point')\n }\n }\n\n return bytes\n}\n\nfunction asciiToBytes (str) {\n const byteArray = []\n for (let i = 0; i < str.length; ++i) {\n // Node's code seems to be doing this and not & 0x7F..\n byteArray.push(str.charCodeAt(i) & 0xFF)\n }\n return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n let c, hi, lo\n const byteArray = []\n for (let i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0) break\n\n c = str.charCodeAt(i)\n hi = c >> 8\n lo = c % 256\n byteArray.push(lo)\n byteArray.push(hi)\n }\n\n return byteArray\n}\n\nfunction base64ToBytes (str) {\n return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n let i\n for (i = 0; i < length; ++i) {\n if ((i + offset >= dst.length) || (i >= src.length)) break\n dst[i + offset] = src[i]\n }\n return i\n}\n\n// ArrayBuffer or Uint8Array objects from other contexts (i.e. iframes) do not pass\n// the `instanceof` check but they should be treated as of that type.\n// See: https://github.com/feross/buffer/issues/166\nfunction isInstance (obj, type) {\n return obj instanceof type ||\n (obj != null && obj.constructor != null && obj.constructor.name != null &&\n obj.constructor.name === type.name)\n}\nfunction numberIsNaN (obj) {\n // For IE11 support\n return obj !== obj // eslint-disable-line no-self-compare\n}\n\n// Create lookup table for `toString('hex')`\n// See: https://github.com/feross/buffer/issues/219\nconst hexSliceLookupTable = (function () {\n const alphabet = '0123456789abcdef'\n const table = new Array(256)\n for (let i = 0; i < 16; ++i) {\n const i16 = i * 16\n for (let j = 0; j < 16; ++j) {\n table[i16 + j] = alphabet[i] + alphabet[j]\n }\n }\n return table\n})()\n\n// Return not function with Error if BigInt not supported\nfunction defineBigIntMethod (fn) {\n return typeof BigInt === 'undefined' ? BufferBigIntNotDefined : fn\n}\n\nfunction BufferBigIntNotDefined () {\n throw new Error('BigInt not supported')\n}\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\nvar R = typeof Reflect === 'object' ? Reflect : null\nvar ReflectApply = R && typeof R.apply === 'function'\n ? R.apply\n : function ReflectApply(target, receiver, args) {\n return Function.prototype.apply.call(target, receiver, args);\n }\n\nvar ReflectOwnKeys\nif (R && typeof R.ownKeys === 'function') {\n ReflectOwnKeys = R.ownKeys\n} else if (Object.getOwnPropertySymbols) {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target)\n .concat(Object.getOwnPropertySymbols(target));\n };\n} else {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target);\n };\n}\n\nfunction ProcessEmitWarning(warning) {\n if (console && console.warn) console.warn(warning);\n}\n\nvar NumberIsNaN = Number.isNaN || function NumberIsNaN(value) {\n return value !== value;\n}\n\nfunction EventEmitter() {\n EventEmitter.init.call(this);\n}\nmodule.exports = EventEmitter;\nmodule.exports.once = once;\n\n// Backwards-compat with node 0.10.x\nEventEmitter.EventEmitter = EventEmitter;\n\nEventEmitter.prototype._events = undefined;\nEventEmitter.prototype._eventsCount = 0;\nEventEmitter.prototype._maxListeners = undefined;\n\n// By default EventEmitters will print a warning if more than 10 listeners are\n// added to it. This is a useful default which helps finding memory leaks.\nvar defaultMaxListeners = 10;\n\nfunction checkListener(listener) {\n if (typeof listener !== 'function') {\n throw new TypeError('The \"listener\" argument must be of type Function. Received type ' + typeof listener);\n }\n}\n\nObject.defineProperty(EventEmitter, 'defaultMaxListeners', {\n enumerable: true,\n get: function() {\n return defaultMaxListeners;\n },\n set: function(arg) {\n if (typeof arg !== 'number' || arg < 0 || NumberIsNaN(arg)) {\n throw new RangeError('The value of \"defaultMaxListeners\" is out of range. It must be a non-negative number. Received ' + arg + '.');\n }\n defaultMaxListeners = arg;\n }\n});\n\nEventEmitter.init = function() {\n\n if (this._events === undefined ||\n this._events === Object.getPrototypeOf(this)._events) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n }\n\n this._maxListeners = this._maxListeners || undefined;\n};\n\n// Obviously not all Emitters should be limited to 10. This function allows\n// that to be increased. Set to zero for unlimited.\nEventEmitter.prototype.setMaxListeners = function setMaxListeners(n) {\n if (typeof n !== 'number' || n < 0 || NumberIsNaN(n)) {\n throw new RangeError('The value of \"n\" is out of range. It must be a non-negative number. Received ' + n + '.');\n }\n this._maxListeners = n;\n return this;\n};\n\nfunction _getMaxListeners(that) {\n if (that._maxListeners === undefined)\n return EventEmitter.defaultMaxListeners;\n return that._maxListeners;\n}\n\nEventEmitter.prototype.getMaxListeners = function getMaxListeners() {\n return _getMaxListeners(this);\n};\n\nEventEmitter.prototype.emit = function emit(type) {\n var args = [];\n for (var i = 1; i < arguments.length; i++) args.push(arguments[i]);\n var doError = (type === 'error');\n\n var events = this._events;\n if (events !== undefined)\n doError = (doError && events.error === undefined);\n else if (!doError)\n return false;\n\n // If there is no 'error' event listener then throw.\n if (doError) {\n var er;\n if (args.length > 0)\n er = args[0];\n if (er instanceof Error) {\n // Note: The comments on the `throw` lines are intentional, they show\n // up in Node's output if this results in an unhandled exception.\n throw er; // Unhandled 'error' event\n }\n // At least give some kind of context to the user\n var err = new Error('Unhandled error.' + (er ? ' (' + er.message + ')' : ''));\n err.context = er;\n throw err; // Unhandled 'error' event\n }\n\n var handler = events[type];\n\n if (handler === undefined)\n return false;\n\n if (typeof handler === 'function') {\n ReflectApply(handler, this, args);\n } else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n ReflectApply(listeners[i], this, args);\n }\n\n return true;\n};\n\nfunction _addListener(target, type, listener, prepend) {\n var m;\n var events;\n var existing;\n\n checkListener(listener);\n\n events = target._events;\n if (events === undefined) {\n events = target._events = Object.create(null);\n target._eventsCount = 0;\n } else {\n // To avoid recursion in the case that type === \"newListener\"! Before\n // adding it to the listeners, first emit \"newListener\".\n if (events.newListener !== undefined) {\n target.emit('newListener', type,\n listener.listener ? listener.listener : listener);\n\n // Re-assign `events` because a newListener handler could have caused the\n // this._events to be assigned to a new object\n events = target._events;\n }\n existing = events[type];\n }\n\n if (existing === undefined) {\n // Optimize the case of one listener. Don't need the extra array object.\n existing = events[type] = listener;\n ++target._eventsCount;\n } else {\n if (typeof existing === 'function') {\n // Adding the second element, need to change to array.\n existing = events[type] =\n prepend ? [listener, existing] : [existing, listener];\n // If we've already got an array, just append.\n } else if (prepend) {\n existing.unshift(listener);\n } else {\n existing.push(listener);\n }\n\n // Check for listener leak\n m = _getMaxListeners(target);\n if (m > 0 && existing.length > m && !existing.warned) {\n existing.warned = true;\n // No error code for this since it is a Warning\n // eslint-disable-next-line no-restricted-syntax\n var w = new Error('Possible EventEmitter memory leak detected. ' +\n existing.length + ' ' + String(type) + ' listeners ' +\n 'added. Use emitter.setMaxListeners() to ' +\n 'increase limit');\n w.name = 'MaxListenersExceededWarning';\n w.emitter = target;\n w.type = type;\n w.count = existing.length;\n ProcessEmitWarning(w);\n }\n }\n\n return target;\n}\n\nEventEmitter.prototype.addListener = function addListener(type, listener) {\n return _addListener(this, type, listener, false);\n};\n\nEventEmitter.prototype.on = EventEmitter.prototype.addListener;\n\nEventEmitter.prototype.prependListener =\n function prependListener(type, listener) {\n return _addListener(this, type, listener, true);\n };\n\nfunction onceWrapper() {\n if (!this.fired) {\n this.target.removeListener(this.type, this.wrapFn);\n this.fired = true;\n if (arguments.length === 0)\n return this.listener.call(this.target);\n return this.listener.apply(this.target, arguments);\n }\n}\n\nfunction _onceWrap(target, type, listener) {\n var state = { fired: false, wrapFn: undefined, target: target, type: type, listener: listener };\n var wrapped = onceWrapper.bind(state);\n wrapped.listener = listener;\n state.wrapFn = wrapped;\n return wrapped;\n}\n\nEventEmitter.prototype.once = function once(type, listener) {\n checkListener(listener);\n this.on(type, _onceWrap(this, type, listener));\n return this;\n};\n\nEventEmitter.prototype.prependOnceListener =\n function prependOnceListener(type, listener) {\n checkListener(listener);\n this.prependListener(type, _onceWrap(this, type, listener));\n return this;\n };\n\n// Emits a 'removeListener' event if and only if the listener was removed.\nEventEmitter.prototype.removeListener =\n function removeListener(type, listener) {\n var list, events, position, i, originalListener;\n\n checkListener(listener);\n\n events = this._events;\n if (events === undefined)\n return this;\n\n list = events[type];\n if (list === undefined)\n return this;\n\n if (list === listener || list.listener === listener) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else {\n delete events[type];\n if (events.removeListener)\n this.emit('removeListener', type, list.listener || listener);\n }\n } else if (typeof list !== 'function') {\n position = -1;\n\n for (i = list.length - 1; i >= 0; i--) {\n if (list[i] === listener || list[i].listener === listener) {\n originalListener = list[i].listener;\n position = i;\n break;\n }\n }\n\n if (position < 0)\n return this;\n\n if (position === 0)\n list.shift();\n else {\n spliceOne(list, position);\n }\n\n if (list.length === 1)\n events[type] = list[0];\n\n if (events.removeListener !== undefined)\n this.emit('removeListener', type, originalListener || listener);\n }\n\n return this;\n };\n\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\n\nEventEmitter.prototype.removeAllListeners =\n function removeAllListeners(type) {\n var listeners, events, i;\n\n events = this._events;\n if (events === undefined)\n return this;\n\n // not listening for removeListener, no need to emit\n if (events.removeListener === undefined) {\n if (arguments.length === 0) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n } else if (events[type] !== undefined) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else\n delete events[type];\n }\n return this;\n }\n\n // emit removeListener for all listeners on all events\n if (arguments.length === 0) {\n var keys = Object.keys(events);\n var key;\n for (i = 0; i < keys.length; ++i) {\n key = keys[i];\n if (key === 'removeListener') continue;\n this.removeAllListeners(key);\n }\n this.removeAllListeners('removeListener');\n this._events = Object.create(null);\n this._eventsCount = 0;\n return this;\n }\n\n listeners = events[type];\n\n if (typeof listeners === 'function') {\n this.removeListener(type, listeners);\n } else if (listeners !== undefined) {\n // LIFO order\n for (i = listeners.length - 1; i >= 0; i--) {\n this.removeListener(type, listeners[i]);\n }\n }\n\n return this;\n };\n\nfunction _listeners(target, type, unwrap) {\n var events = target._events;\n\n if (events === undefined)\n return [];\n\n var evlistener = events[type];\n if (evlistener === undefined)\n return [];\n\n if (typeof evlistener === 'function')\n return unwrap ? [evlistener.listener || evlistener] : [evlistener];\n\n return unwrap ?\n unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length);\n}\n\nEventEmitter.prototype.listeners = function listeners(type) {\n return _listeners(this, type, true);\n};\n\nEventEmitter.prototype.rawListeners = function rawListeners(type) {\n return _listeners(this, type, false);\n};\n\nEventEmitter.listenerCount = function(emitter, type) {\n if (typeof emitter.listenerCount === 'function') {\n return emitter.listenerCount(type);\n } else {\n return listenerCount.call(emitter, type);\n }\n};\n\nEventEmitter.prototype.listenerCount = listenerCount;\nfunction listenerCount(type) {\n var events = this._events;\n\n if (events !== undefined) {\n var evlistener = events[type];\n\n if (typeof evlistener === 'function') {\n return 1;\n } else if (evlistener !== undefined) {\n return evlistener.length;\n }\n }\n\n return 0;\n}\n\nEventEmitter.prototype.eventNames = function eventNames() {\n return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : [];\n};\n\nfunction arrayClone(arr, n) {\n var copy = new Array(n);\n for (var i = 0; i < n; ++i)\n copy[i] = arr[i];\n return copy;\n}\n\nfunction spliceOne(list, index) {\n for (; index + 1 < list.length; index++)\n list[index] = list[index + 1];\n list.pop();\n}\n\nfunction unwrapListeners(arr) {\n var ret = new Array(arr.length);\n for (var i = 0; i < ret.length; ++i) {\n ret[i] = arr[i].listener || arr[i];\n }\n return ret;\n}\n\nfunction once(emitter, name) {\n return new Promise(function (resolve, reject) {\n function errorListener(err) {\n emitter.removeListener(name, resolver);\n reject(err);\n }\n\n function resolver() {\n if (typeof emitter.removeListener === 'function') {\n emitter.removeListener('error', errorListener);\n }\n resolve([].slice.call(arguments));\n };\n\n eventTargetAgnosticAddListener(emitter, name, resolver, { once: true });\n if (name !== 'error') {\n addErrorHandlerIfEventEmitter(emitter, errorListener, { once: true });\n }\n });\n}\n\nfunction addErrorHandlerIfEventEmitter(emitter, handler, flags) {\n if (typeof emitter.on === 'function') {\n eventTargetAgnosticAddListener(emitter, 'error', handler, flags);\n }\n}\n\nfunction eventTargetAgnosticAddListener(emitter, name, listener, flags) {\n if (typeof emitter.on === 'function') {\n if (flags.once) {\n emitter.once(name, listener);\n } else {\n emitter.on(name, listener);\n }\n } else if (typeof emitter.addEventListener === 'function') {\n // EventTarget does not have `error` event semantics like Node\n // EventEmitters, we do not listen for `error` events here.\n emitter.addEventListener(name, function wrapListener(arg) {\n // IE does not have builtin `{ once: true }` support so we\n // have to do it manually.\n if (flags.once) {\n emitter.removeEventListener(name, wrapListener);\n }\n listener(arg);\n });\n } else {\n throw new TypeError('The \"emitter\" argument must be of type EventEmitter. Received type ' + typeof emitter);\n }\n}\n","/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */\nexports.read = function (buffer, offset, isLE, mLen, nBytes) {\n var e, m\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var nBits = -7\n var i = isLE ? (nBytes - 1) : 0\n var d = isLE ? -1 : 1\n var s = buffer[offset + i]\n\n i += d\n\n e = s & ((1 << (-nBits)) - 1)\n s >>= (-nBits)\n nBits += eLen\n for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & ((1 << (-nBits)) - 1)\n e >>= (-nBits)\n nBits += mLen\n for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias\n } else if (e === eMax) {\n return m ? NaN : ((s ? -1 : 1) * Infinity)\n } else {\n m = m + Math.pow(2, mLen)\n e = e - eBias\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n var i = isLE ? 0 : (nBytes - 1)\n var d = isLE ? 1 : -1\n var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n value = Math.abs(value)\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0\n e = eMax\n } else {\n e = Math.floor(Math.log(value) / Math.LN2)\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--\n c *= 2\n }\n if (e + eBias >= 1) {\n value += rt / c\n } else {\n value += rt * Math.pow(2, 1 - eBias)\n }\n if (value * c >= 2) {\n e++\n c /= 2\n }\n\n if (e + eBias >= eMax) {\n m = 0\n e = eMax\n } else if (e + eBias >= 1) {\n m = ((value * c) - 1) * Math.pow(2, mLen)\n e = e + eBias\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n e = 0\n }\n }\n\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n e = (e << mLen) | m\n eLen += mLen\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128\n}\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView');\n\nmodule.exports = DataView;\n","var hashClear = require('./_hashClear'),\n hashDelete = require('./_hashDelete'),\n hashGet = require('./_hashGet'),\n hashHas = require('./_hashHas'),\n hashSet = require('./_hashSet');\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\nmodule.exports = Hash;\n","var listCacheClear = require('./_listCacheClear'),\n listCacheDelete = require('./_listCacheDelete'),\n listCacheGet = require('./_listCacheGet'),\n listCacheHas = require('./_listCacheHas'),\n listCacheSet = require('./_listCacheSet');\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\nmodule.exports = ListCache;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map');\n\nmodule.exports = Map;\n","var mapCacheClear = require('./_mapCacheClear'),\n mapCacheDelete = require('./_mapCacheDelete'),\n mapCacheGet = require('./_mapCacheGet'),\n mapCacheHas = require('./_mapCacheHas'),\n mapCacheSet = require('./_mapCacheSet');\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\nmodule.exports = MapCache;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Promise = getNative(root, 'Promise');\n\nmodule.exports = Promise;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Set = getNative(root, 'Set');\n\nmodule.exports = Set;\n","var MapCache = require('./_MapCache'),\n setCacheAdd = require('./_setCacheAdd'),\n setCacheHas = require('./_setCacheHas');\n\n/**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\nfunction SetCache(values) {\n var index = -1,\n length = values == null ? 0 : values.length;\n\n this.__data__ = new MapCache;\n while (++index < length) {\n this.add(values[index]);\n }\n}\n\n// Add methods to `SetCache`.\nSetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\nSetCache.prototype.has = setCacheHas;\n\nmodule.exports = SetCache;\n","var ListCache = require('./_ListCache'),\n stackClear = require('./_stackClear'),\n stackDelete = require('./_stackDelete'),\n stackGet = require('./_stackGet'),\n stackHas = require('./_stackHas'),\n stackSet = require('./_stackSet');\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\nmodule.exports = Stack;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Uint8Array = root.Uint8Array;\n\nmodule.exports = Uint8Array;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar WeakMap = getNative(root, 'WeakMap');\n\nmodule.exports = WeakMap;\n","/**\n * A specialized version of `_.forEach` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\nfunction arrayEach(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (iteratee(array[index], index, array) === false) {\n break;\n }\n }\n return array;\n}\n\nmodule.exports = arrayEach;\n","/**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\nfunction arrayFilter(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result[resIndex++] = value;\n }\n }\n return result;\n}\n\nmodule.exports = arrayFilter;\n","var baseTimes = require('./_baseTimes'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isIndex = require('./_isIndex'),\n isTypedArray = require('./isTypedArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = arrayLikeKeys;\n","/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n}\n\nmodule.exports = arrayPush;\n","/**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\nfunction arraySome(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (predicate(array[index], index, array)) {\n return true;\n }\n }\n return false;\n}\n\nmodule.exports = arraySome;\n","var baseAssignValue = require('./_baseAssignValue'),\n eq = require('./eq');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\nmodule.exports = assignValue;\n","var eq = require('./eq');\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\nmodule.exports = assocIndexOf;\n","var copyObject = require('./_copyObject'),\n keys = require('./keys');\n\n/**\n * The base implementation of `_.assign` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssign(object, source) {\n return object && copyObject(source, keys(source), object);\n}\n\nmodule.exports = baseAssign;\n","var copyObject = require('./_copyObject'),\n keysIn = require('./keysIn');\n\n/**\n * The base implementation of `_.assignIn` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssignIn(object, source) {\n return object && copyObject(source, keysIn(source), object);\n}\n\nmodule.exports = baseAssignIn;\n","var defineProperty = require('./_defineProperty');\n\n/**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction baseAssignValue(object, key, value) {\n if (key == '__proto__' && defineProperty) {\n defineProperty(object, key, {\n 'configurable': true,\n 'enumerable': true,\n 'value': value,\n 'writable': true\n });\n } else {\n object[key] = value;\n }\n}\n\nmodule.exports = baseAssignValue;\n","var Stack = require('./_Stack'),\n arrayEach = require('./_arrayEach'),\n assignValue = require('./_assignValue'),\n baseAssign = require('./_baseAssign'),\n baseAssignIn = require('./_baseAssignIn'),\n cloneBuffer = require('./_cloneBuffer'),\n copyArray = require('./_copyArray'),\n copySymbols = require('./_copySymbols'),\n copySymbolsIn = require('./_copySymbolsIn'),\n getAllKeys = require('./_getAllKeys'),\n getAllKeysIn = require('./_getAllKeysIn'),\n getTag = require('./_getTag'),\n initCloneArray = require('./_initCloneArray'),\n initCloneByTag = require('./_initCloneByTag'),\n initCloneObject = require('./_initCloneObject'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isMap = require('./isMap'),\n isObject = require('./isObject'),\n isSet = require('./isSet'),\n keys = require('./keys'),\n keysIn = require('./keysIn');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_FLAT_FLAG = 2,\n CLONE_SYMBOLS_FLAG = 4;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values supported by `_.clone`. */\nvar cloneableTags = {};\ncloneableTags[argsTag] = cloneableTags[arrayTag] =\ncloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =\ncloneableTags[boolTag] = cloneableTags[dateTag] =\ncloneableTags[float32Tag] = cloneableTags[float64Tag] =\ncloneableTags[int8Tag] = cloneableTags[int16Tag] =\ncloneableTags[int32Tag] = cloneableTags[mapTag] =\ncloneableTags[numberTag] = cloneableTags[objectTag] =\ncloneableTags[regexpTag] = cloneableTags[setTag] =\ncloneableTags[stringTag] = cloneableTags[symbolTag] =\ncloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =\ncloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;\ncloneableTags[errorTag] = cloneableTags[funcTag] =\ncloneableTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.clone` and `_.cloneDeep` which tracks\n * traversed objects.\n *\n * @private\n * @param {*} value The value to clone.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Deep clone\n * 2 - Flatten inherited properties\n * 4 - Clone symbols\n * @param {Function} [customizer] The function to customize cloning.\n * @param {string} [key] The key of `value`.\n * @param {Object} [object] The parent object of `value`.\n * @param {Object} [stack] Tracks traversed objects and their clone counterparts.\n * @returns {*} Returns the cloned value.\n */\nfunction baseClone(value, bitmask, customizer, key, object, stack) {\n var result,\n isDeep = bitmask & CLONE_DEEP_FLAG,\n isFlat = bitmask & CLONE_FLAT_FLAG,\n isFull = bitmask & CLONE_SYMBOLS_FLAG;\n\n if (customizer) {\n result = object ? customizer(value, key, object, stack) : customizer(value);\n }\n if (result !== undefined) {\n return result;\n }\n if (!isObject(value)) {\n return value;\n }\n var isArr = isArray(value);\n if (isArr) {\n result = initCloneArray(value);\n if (!isDeep) {\n return copyArray(value, result);\n }\n } else {\n var tag = getTag(value),\n isFunc = tag == funcTag || tag == genTag;\n\n if (isBuffer(value)) {\n return cloneBuffer(value, isDeep);\n }\n if (tag == objectTag || tag == argsTag || (isFunc && !object)) {\n result = (isFlat || isFunc) ? {} : initCloneObject(value);\n if (!isDeep) {\n return isFlat\n ? copySymbolsIn(value, baseAssignIn(result, value))\n : copySymbols(value, baseAssign(result, value));\n }\n } else {\n if (!cloneableTags[tag]) {\n return object ? value : {};\n }\n result = initCloneByTag(value, tag, isDeep);\n }\n }\n // Check for circular references and return its corresponding clone.\n stack || (stack = new Stack);\n var stacked = stack.get(value);\n if (stacked) {\n return stacked;\n }\n stack.set(value, result);\n\n if (isSet(value)) {\n value.forEach(function(subValue) {\n result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));\n });\n } else if (isMap(value)) {\n value.forEach(function(subValue, key) {\n result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n }\n\n var keysFunc = isFull\n ? (isFlat ? getAllKeysIn : getAllKeys)\n : (isFlat ? keysIn : keys);\n\n var props = isArr ? undefined : keysFunc(value);\n arrayEach(props || value, function(subValue, key) {\n if (props) {\n key = subValue;\n subValue = value[key];\n }\n // Recursively populate clone (susceptible to call stack limits).\n assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n return result;\n}\n\nmodule.exports = baseClone;\n","var isObject = require('./isObject');\n\n/** Built-in value references. */\nvar objectCreate = Object.create;\n\n/**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} proto The object to inherit from.\n * @returns {Object} Returns the new object.\n */\nvar baseCreate = (function() {\n function object() {}\n return function(proto) {\n if (!isObject(proto)) {\n return {};\n }\n if (objectCreate) {\n return objectCreate(proto);\n }\n object.prototype = proto;\n var result = new object;\n object.prototype = undefined;\n return result;\n };\n}());\n\nmodule.exports = baseCreate;\n","var arrayPush = require('./_arrayPush'),\n isArray = require('./isArray');\n\n/**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction baseGetAllKeys(object, keysFunc, symbolsFunc) {\n var result = keysFunc(object);\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n}\n\nmodule.exports = baseGetAllKeys;\n","var Symbol = require('./_Symbol'),\n getRawTag = require('./_getRawTag'),\n objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]';\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\nmodule.exports = baseIsArguments;\n","var baseIsEqualDeep = require('./_baseIsEqualDeep'),\n isObjectLike = require('./isObjectLike');\n\n/**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Unordered comparison\n * 2 - Partial comparison\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\nfunction baseIsEqual(value, other, bitmask, customizer, stack) {\n if (value === other) {\n return true;\n }\n if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\n return value !== value && other !== other;\n }\n return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n}\n\nmodule.exports = baseIsEqual;\n","var Stack = require('./_Stack'),\n equalArrays = require('./_equalArrays'),\n equalByTag = require('./_equalByTag'),\n equalObjects = require('./_equalObjects'),\n getTag = require('./_getTag'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isTypedArray = require('./isTypedArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n var objIsArr = isArray(object),\n othIsArr = isArray(other),\n objTag = objIsArr ? arrayTag : getTag(object),\n othTag = othIsArr ? arrayTag : getTag(other);\n\n objTag = objTag == argsTag ? objectTag : objTag;\n othTag = othTag == argsTag ? objectTag : othTag;\n\n var objIsObj = objTag == objectTag,\n othIsObj = othTag == objectTag,\n isSameTag = objTag == othTag;\n\n if (isSameTag && isBuffer(object)) {\n if (!isBuffer(other)) {\n return false;\n }\n objIsArr = true;\n objIsObj = false;\n }\n if (isSameTag && !objIsObj) {\n stack || (stack = new Stack);\n return (objIsArr || isTypedArray(object))\n ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n }\n if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n if (objIsWrapped || othIsWrapped) {\n var objUnwrapped = objIsWrapped ? object.value() : object,\n othUnwrapped = othIsWrapped ? other.value() : other;\n\n stack || (stack = new Stack);\n return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n }\n }\n if (!isSameTag) {\n return false;\n }\n stack || (stack = new Stack);\n return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n}\n\nmodule.exports = baseIsEqualDeep;\n","var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]';\n\n/**\n * The base implementation of `_.isMap` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n */\nfunction baseIsMap(value) {\n return isObjectLike(value) && getTag(value) == mapTag;\n}\n\nmodule.exports = baseIsMap;\n","var isFunction = require('./isFunction'),\n isMasked = require('./_isMasked'),\n isObject = require('./isObject'),\n toSource = require('./_toSource');\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\nmodule.exports = baseIsNative;\n","var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar setTag = '[object Set]';\n\n/**\n * The base implementation of `_.isSet` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n */\nfunction baseIsSet(value) {\n return isObjectLike(value) && getTag(value) == setTag;\n}\n\nmodule.exports = baseIsSet;\n","var baseGetTag = require('./_baseGetTag'),\n isLength = require('./isLength'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n\nmodule.exports = baseIsTypedArray;\n","var isPrototype = require('./_isPrototype'),\n nativeKeys = require('./_nativeKeys');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeys;\n","var isObject = require('./isObject'),\n isPrototype = require('./_isPrototype'),\n nativeKeysIn = require('./_nativeKeysIn');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeysIn(object) {\n if (!isObject(object)) {\n return nativeKeysIn(object);\n }\n var isProto = isPrototype(object),\n result = [];\n\n for (var key in object) {\n if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeysIn;\n","/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\nmodule.exports = baseTimes;\n","/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n return function(value) {\n return func(value);\n };\n}\n\nmodule.exports = baseUnary;\n","/**\n * Checks if a `cache` value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction cacheHas(cache, key) {\n return cache.has(key);\n}\n\nmodule.exports = cacheHas;\n","var Uint8Array = require('./_Uint8Array');\n\n/**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\nfunction cloneArrayBuffer(arrayBuffer) {\n var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n return result;\n}\n\nmodule.exports = cloneArrayBuffer;\n","var root = require('./_root');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined,\n allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;\n\n/**\n * Creates a clone of `buffer`.\n *\n * @private\n * @param {Buffer} buffer The buffer to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Buffer} Returns the cloned buffer.\n */\nfunction cloneBuffer(buffer, isDeep) {\n if (isDeep) {\n return buffer.slice();\n }\n var length = buffer.length,\n result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\n\n buffer.copy(result);\n return result;\n}\n\nmodule.exports = cloneBuffer;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer');\n\n/**\n * Creates a clone of `dataView`.\n *\n * @private\n * @param {Object} dataView The data view to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned data view.\n */\nfunction cloneDataView(dataView, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;\n return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);\n}\n\nmodule.exports = cloneDataView;\n","/** Used to match `RegExp` flags from their coerced string values. */\nvar reFlags = /\\w*$/;\n\n/**\n * Creates a clone of `regexp`.\n *\n * @private\n * @param {Object} regexp The regexp to clone.\n * @returns {Object} Returns the cloned regexp.\n */\nfunction cloneRegExp(regexp) {\n var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));\n result.lastIndex = regexp.lastIndex;\n return result;\n}\n\nmodule.exports = cloneRegExp;\n","var Symbol = require('./_Symbol');\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * Creates a clone of the `symbol` object.\n *\n * @private\n * @param {Object} symbol The symbol object to clone.\n * @returns {Object} Returns the cloned symbol object.\n */\nfunction cloneSymbol(symbol) {\n return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};\n}\n\nmodule.exports = cloneSymbol;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer');\n\n/**\n * Creates a clone of `typedArray`.\n *\n * @private\n * @param {Object} typedArray The typed array to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned typed array.\n */\nfunction cloneTypedArray(typedArray, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n}\n\nmodule.exports = cloneTypedArray;\n","/**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\nfunction copyArray(source, array) {\n var index = -1,\n length = source.length;\n\n array || (array = Array(length));\n while (++index < length) {\n array[index] = source[index];\n }\n return array;\n}\n\nmodule.exports = copyArray;\n","var assignValue = require('./_assignValue'),\n baseAssignValue = require('./_baseAssignValue');\n\n/**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\nfunction copyObject(source, props, object, customizer) {\n var isNew = !object;\n object || (object = {});\n\n var index = -1,\n length = props.length;\n\n while (++index < length) {\n var key = props[index];\n\n var newValue = customizer\n ? customizer(object[key], source[key], key, object, source)\n : undefined;\n\n if (newValue === undefined) {\n newValue = source[key];\n }\n if (isNew) {\n baseAssignValue(object, key, newValue);\n } else {\n assignValue(object, key, newValue);\n }\n }\n return object;\n}\n\nmodule.exports = copyObject;\n","var copyObject = require('./_copyObject'),\n getSymbols = require('./_getSymbols');\n\n/**\n * Copies own symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbols(source, object) {\n return copyObject(source, getSymbols(source), object);\n}\n\nmodule.exports = copySymbols;\n","var copyObject = require('./_copyObject'),\n getSymbolsIn = require('./_getSymbolsIn');\n\n/**\n * Copies own and inherited symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbolsIn(source, object) {\n return copyObject(source, getSymbolsIn(source), object);\n}\n\nmodule.exports = copySymbolsIn;\n","var root = require('./_root');\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\nmodule.exports = coreJsData;\n","var getNative = require('./_getNative');\n\nvar defineProperty = (function() {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n}());\n\nmodule.exports = defineProperty;\n","var SetCache = require('./_SetCache'),\n arraySome = require('./_arraySome'),\n cacheHas = require('./_cacheHas');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\nfunction equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n arrLength = array.length,\n othLength = other.length;\n\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n return false;\n }\n // Check that cyclic values are equal.\n var arrStacked = stack.get(array);\n var othStacked = stack.get(other);\n if (arrStacked && othStacked) {\n return arrStacked == other && othStacked == array;\n }\n var index = -1,\n result = true,\n seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n stack.set(array, other);\n stack.set(other, array);\n\n // Ignore non-index properties.\n while (++index < arrLength) {\n var arrValue = array[index],\n othValue = other[index];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, arrValue, index, other, array, stack)\n : customizer(arrValue, othValue, index, array, other, stack);\n }\n if (compared !== undefined) {\n if (compared) {\n continue;\n }\n result = false;\n break;\n }\n // Recursively compare arrays (susceptible to call stack limits).\n if (seen) {\n if (!arraySome(other, function(othValue, othIndex) {\n if (!cacheHas(seen, othIndex) &&\n (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n return seen.push(othIndex);\n }\n })) {\n result = false;\n break;\n }\n } else if (!(\n arrValue === othValue ||\n equalFunc(arrValue, othValue, bitmask, customizer, stack)\n )) {\n result = false;\n break;\n }\n }\n stack['delete'](array);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalArrays;\n","var Symbol = require('./_Symbol'),\n Uint8Array = require('./_Uint8Array'),\n eq = require('./eq'),\n equalArrays = require('./_equalArrays'),\n mapToArray = require('./_mapToArray'),\n setToArray = require('./_setToArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]';\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n switch (tag) {\n case dataViewTag:\n if ((object.byteLength != other.byteLength) ||\n (object.byteOffset != other.byteOffset)) {\n return false;\n }\n object = object.buffer;\n other = other.buffer;\n\n case arrayBufferTag:\n if ((object.byteLength != other.byteLength) ||\n !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n return false;\n }\n return true;\n\n case boolTag:\n case dateTag:\n case numberTag:\n // Coerce booleans to `1` or `0` and dates to milliseconds.\n // Invalid dates are coerced to `NaN`.\n return eq(+object, +other);\n\n case errorTag:\n return object.name == other.name && object.message == other.message;\n\n case regexpTag:\n case stringTag:\n // Coerce regexes to strings and treat strings, primitives and objects,\n // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n // for more details.\n return object == (other + '');\n\n case mapTag:\n var convert = mapToArray;\n\n case setTag:\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n convert || (convert = setToArray);\n\n if (object.size != other.size && !isPartial) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked) {\n return stacked == other;\n }\n bitmask |= COMPARE_UNORDERED_FLAG;\n\n // Recursively compare objects (susceptible to call stack limits).\n stack.set(object, other);\n var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n stack['delete'](object);\n return result;\n\n case symbolTag:\n if (symbolValueOf) {\n return symbolValueOf.call(object) == symbolValueOf.call(other);\n }\n }\n return false;\n}\n\nmodule.exports = equalByTag;\n","var getAllKeys = require('./_getAllKeys');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n objProps = getAllKeys(object),\n objLength = objProps.length,\n othProps = getAllKeys(other),\n othLength = othProps.length;\n\n if (objLength != othLength && !isPartial) {\n return false;\n }\n var index = objLength;\n while (index--) {\n var key = objProps[index];\n if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n return false;\n }\n }\n // Check that cyclic values are equal.\n var objStacked = stack.get(object);\n var othStacked = stack.get(other);\n if (objStacked && othStacked) {\n return objStacked == other && othStacked == object;\n }\n var result = true;\n stack.set(object, other);\n stack.set(other, object);\n\n var skipCtor = isPartial;\n while (++index < objLength) {\n key = objProps[index];\n var objValue = object[key],\n othValue = other[key];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, objValue, key, other, object, stack)\n : customizer(objValue, othValue, key, object, other, stack);\n }\n // Recursively compare objects (susceptible to call stack limits).\n if (!(compared === undefined\n ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n : compared\n )) {\n result = false;\n break;\n }\n skipCtor || (skipCtor = key == 'constructor');\n }\n if (result && !skipCtor) {\n var objCtor = object.constructor,\n othCtor = other.constructor;\n\n // Non `Object` object instances with different constructors are not equal.\n if (objCtor != othCtor &&\n ('constructor' in object && 'constructor' in other) &&\n !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n result = false;\n }\n }\n stack['delete'](object);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalObjects;\n","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n","var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbols = require('./_getSymbols'),\n keys = require('./keys');\n\n/**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeys(object) {\n return baseGetAllKeys(object, keys, getSymbols);\n}\n\nmodule.exports = getAllKeys;\n","var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbolsIn = require('./_getSymbolsIn'),\n keysIn = require('./keysIn');\n\n/**\n * Creates an array of own and inherited enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeysIn(object) {\n return baseGetAllKeys(object, keysIn, getSymbolsIn);\n}\n\nmodule.exports = getAllKeysIn;\n","var isKeyable = require('./_isKeyable');\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\nmodule.exports = getMapData;\n","var baseIsNative = require('./_baseIsNative'),\n getValue = require('./_getValue');\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\nmodule.exports = getNative;\n","var overArg = require('./_overArg');\n\n/** Built-in value references. */\nvar getPrototype = overArg(Object.getPrototypeOf, Object);\n\nmodule.exports = getPrototype;\n","var Symbol = require('./_Symbol');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nmodule.exports = getRawTag;\n","var arrayFilter = require('./_arrayFilter'),\n stubArray = require('./stubArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n if (object == null) {\n return [];\n }\n object = Object(object);\n return arrayFilter(nativeGetSymbols(object), function(symbol) {\n return propertyIsEnumerable.call(object, symbol);\n });\n};\n\nmodule.exports = getSymbols;\n","var arrayPush = require('./_arrayPush'),\n getPrototype = require('./_getPrototype'),\n getSymbols = require('./_getSymbols'),\n stubArray = require('./stubArray');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own and inherited enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {\n var result = [];\n while (object) {\n arrayPush(result, getSymbols(object));\n object = getPrototype(object);\n }\n return result;\n};\n\nmodule.exports = getSymbolsIn;\n","var DataView = require('./_DataView'),\n Map = require('./_Map'),\n Promise = require('./_Promise'),\n Set = require('./_Set'),\n WeakMap = require('./_WeakMap'),\n baseGetTag = require('./_baseGetTag'),\n toSource = require('./_toSource');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n setTag = '[object Set]',\n weakMapTag = '[object WeakMap]';\n\nvar dataViewTag = '[object DataView]';\n\n/** Used to detect maps, sets, and weakmaps. */\nvar dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nvar getTag = baseGetTag;\n\n// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\nif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = baseGetTag(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : '';\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n}\n\nmodule.exports = getTag;\n","/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\nmodule.exports = getValue;\n","var nativeCreate = require('./_nativeCreate');\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n}\n\nmodule.exports = hashClear;\n","/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = hashDelete;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\nmodule.exports = hashGet;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\nmodule.exports = hashHas;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\nmodule.exports = hashSet;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Initializes an array clone.\n *\n * @private\n * @param {Array} array The array to clone.\n * @returns {Array} Returns the initialized clone.\n */\nfunction initCloneArray(array) {\n var length = array.length,\n result = new array.constructor(length);\n\n // Add properties assigned by `RegExp#exec`.\n if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {\n result.index = array.index;\n result.input = array.input;\n }\n return result;\n}\n\nmodule.exports = initCloneArray;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer'),\n cloneDataView = require('./_cloneDataView'),\n cloneRegExp = require('./_cloneRegExp'),\n cloneSymbol = require('./_cloneSymbol'),\n cloneTypedArray = require('./_cloneTypedArray');\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/**\n * Initializes an object clone based on its `toStringTag`.\n *\n * **Note:** This function only supports cloning values with tags of\n * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.\n *\n * @private\n * @param {Object} object The object to clone.\n * @param {string} tag The `toStringTag` of the object to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneByTag(object, tag, isDeep) {\n var Ctor = object.constructor;\n switch (tag) {\n case arrayBufferTag:\n return cloneArrayBuffer(object);\n\n case boolTag:\n case dateTag:\n return new Ctor(+object);\n\n case dataViewTag:\n return cloneDataView(object, isDeep);\n\n case float32Tag: case float64Tag:\n case int8Tag: case int16Tag: case int32Tag:\n case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:\n return cloneTypedArray(object, isDeep);\n\n case mapTag:\n return new Ctor;\n\n case numberTag:\n case stringTag:\n return new Ctor(object);\n\n case regexpTag:\n return cloneRegExp(object);\n\n case setTag:\n return new Ctor;\n\n case symbolTag:\n return cloneSymbol(object);\n }\n}\n\nmodule.exports = initCloneByTag;\n","var baseCreate = require('./_baseCreate'),\n getPrototype = require('./_getPrototype'),\n isPrototype = require('./_isPrototype');\n\n/**\n * Initializes an object clone.\n *\n * @private\n * @param {Object} object The object to clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneObject(object) {\n return (typeof object.constructor == 'function' && !isPrototype(object))\n ? baseCreate(getPrototype(object))\n : {};\n}\n\nmodule.exports = initCloneObject;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n var type = typeof value;\n length = length == null ? MAX_SAFE_INTEGER : length;\n\n return !!length &&\n (type == 'number' ||\n (type != 'symbol' && reIsUint.test(value))) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\nmodule.exports = isIndex;\n","/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\nmodule.exports = isKeyable;\n","var coreJsData = require('./_coreJsData');\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\nmodule.exports = isMasked;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\nmodule.exports = isPrototype;\n","/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n}\n\nmodule.exports = listCacheClear;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype;\n\n/** Built-in value references. */\nvar splice = arrayProto.splice;\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n}\n\nmodule.exports = listCacheDelete;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\nmodule.exports = listCacheGet;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\nmodule.exports = listCacheHas;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\nmodule.exports = listCacheSet;\n","var Hash = require('./_Hash'),\n ListCache = require('./_ListCache'),\n Map = require('./_Map');\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\nmodule.exports = mapCacheClear;\n","var getMapData = require('./_getMapData');\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = mapCacheDelete;\n","var getMapData = require('./_getMapData');\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\nmodule.exports = mapCacheGet;\n","var getMapData = require('./_getMapData');\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\nmodule.exports = mapCacheHas;\n","var getMapData = require('./_getMapData');\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n}\n\nmodule.exports = mapCacheSet;\n","/**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\nfunction mapToArray(map) {\n var index = -1,\n result = Array(map.size);\n\n map.forEach(function(value, key) {\n result[++index] = [key, value];\n });\n return result;\n}\n\nmodule.exports = mapToArray;\n","var getNative = require('./_getNative');\n\n/* Built-in method references that are verified to be native. */\nvar nativeCreate = getNative(Object, 'create');\n\nmodule.exports = nativeCreate;\n","var overArg = require('./_overArg');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeKeys = overArg(Object.keys, Object);\n\nmodule.exports = nativeKeys;\n","/**\n * This function is like\n * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * except that it includes inherited enumerable properties.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction nativeKeysIn(object) {\n var result = [];\n if (object != null) {\n for (var key in Object(object)) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = nativeKeysIn;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n try {\n // Use `util.types` for Node.js 10+.\n var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n if (types) {\n return types;\n }\n\n // Legacy `process.binding('util')` for Node.js < 10.\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n}());\n\nmodule.exports = nodeUtil;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n","/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\nmodule.exports = overArg;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n","/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\nfunction setCacheAdd(value) {\n this.__data__.set(value, HASH_UNDEFINED);\n return this;\n}\n\nmodule.exports = setCacheAdd;\n","/**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\nfunction setCacheHas(value) {\n return this.__data__.has(value);\n}\n\nmodule.exports = setCacheHas;\n","/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\nfunction setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n}\n\nmodule.exports = setToArray;\n","var ListCache = require('./_ListCache');\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}\n\nmodule.exports = stackClear;\n","/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n var data = this.__data__,\n result = data['delete'](key);\n\n this.size = data.size;\n return result;\n}\n\nmodule.exports = stackDelete;\n","/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n return this.__data__.get(key);\n}\n\nmodule.exports = stackGet;\n","/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n return this.__data__.has(key);\n}\n\nmodule.exports = stackHas;\n","var ListCache = require('./_ListCache'),\n Map = require('./_Map'),\n MapCache = require('./_MapCache');\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n var data = this.__data__;\n if (data instanceof ListCache) {\n var pairs = data.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n this.size = ++data.size;\n return this;\n }\n data = this.__data__ = new MapCache(pairs);\n }\n data.set(key, value);\n this.size = data.size;\n return this;\n}\n\nmodule.exports = stackSet;\n","/** Used for built-in method references. */\nvar funcProto = Function.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\nmodule.exports = toSource;\n","var baseClone = require('./_baseClone');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_SYMBOLS_FLAG = 4;\n\n/**\n * This method is like `_.clone` except that it recursively clones `value`.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Lang\n * @param {*} value The value to recursively clone.\n * @returns {*} Returns the deep cloned value.\n * @see _.clone\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var deep = _.cloneDeep(objects);\n * console.log(deep[0] === objects[0]);\n * // => false\n */\nfunction cloneDeep(value) {\n return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);\n}\n\nmodule.exports = cloneDeep;\n","/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\nmodule.exports = eq;\n","var baseIsArguments = require('./_baseIsArguments'),\n isObjectLike = require('./isObjectLike');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n};\n\nmodule.exports = isArguments;\n","/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\nmodule.exports = isArray;\n","var isFunction = require('./isFunction'),\n isLength = require('./isLength');\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\nmodule.exports = isArrayLike;\n","var root = require('./_root'),\n stubFalse = require('./stubFalse');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\nmodule.exports = isBuffer;\n","var baseIsEqual = require('./_baseIsEqual');\n\n/**\n * Performs a deep comparison between two values to determine if they are\n * equivalent.\n *\n * **Note:** This method supports comparing arrays, array buffers, booleans,\n * date objects, error objects, maps, numbers, `Object` objects, regexes,\n * sets, strings, symbols, and typed arrays. `Object` objects are compared\n * by their own, not inherited, enumerable properties. Functions and DOM\n * nodes are compared by strict equality, i.e. `===`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.isEqual(object, other);\n * // => true\n *\n * object === other;\n * // => false\n */\nfunction isEqual(value, other) {\n return baseIsEqual(value, other);\n}\n\nmodule.exports = isEqual;\n","var baseGetTag = require('./_baseGetTag'),\n isObject = require('./isObject');\n\n/** `Object#toString` result references. */\nvar asyncTag = '[object AsyncFunction]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n proxyTag = '[object Proxy]';\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\nmodule.exports = isFunction;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\nmodule.exports = isLength;\n","var baseIsMap = require('./_baseIsMap'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsMap = nodeUtil && nodeUtil.isMap;\n\n/**\n * Checks if `value` is classified as a `Map` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n * @example\n *\n * _.isMap(new Map);\n * // => true\n *\n * _.isMap(new WeakMap);\n * // => false\n */\nvar isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;\n\nmodule.exports = isMap;\n","/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n","var baseIsSet = require('./_baseIsSet'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsSet = nodeUtil && nodeUtil.isSet;\n\n/**\n * Checks if `value` is classified as a `Set` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n * @example\n *\n * _.isSet(new Set);\n * // => true\n *\n * _.isSet(new WeakSet);\n * // => false\n */\nvar isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;\n\nmodule.exports = isSet;\n","var baseIsTypedArray = require('./_baseIsTypedArray'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\nmodule.exports = isTypedArray;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeys = require('./_baseKeys'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\nmodule.exports = keys;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeysIn = require('./_baseKeysIn'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\nfunction keysIn(object) {\n return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n}\n\nmodule.exports = keysIn;\n","/**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\nfunction stubArray() {\n return [];\n}\n\nmodule.exports = stubArray;\n","/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n return false;\n}\n\nmodule.exports = stubFalse;\n","import { connect, type BaseConnectionOptions } from \"@openfin/core-web\";\nimport { getSettings } from \"./settings\";\n\n/**\n * Initializes the OpenFin Web Broker connection.\n * @param inherit Should we inherit settings from the host (available in the OpenFin layout system) or use settings? Default is true.\n */\nexport async function init(inherit: boolean = true): Promise {\n\t// Set window.fin to the `fin` object.\n\tlet options: BaseConnectionOptions | undefined;\n\tif (window.fin === undefined) {\n\t\tif (!inherit) {\n\t\t\tconst settings = await getSettings();\n\t\t\tif (settings === undefined) {\n\t\t\t\tconsole.error(\n\t\t\t\t\t\"Unable to run the sample as we have been unable to load the web manifest and it's settings from the currently running html page. Please ensure that the web manifest is being served and that it contains the custom_settings section.\"\n\t\t\t\t);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\toptions = {\n\t\t\t\tbrokerUrl: settings.platform.interop.brokerUrl,\n\t\t\t\tinteropConfig: {\n\t\t\t\t\tproviderId: settings.platform.interop.providerId,\n\t\t\t\t\tcurrentContextGroup: settings.platform.interop.defaultContextGroup\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t\t// Specify an interopConfig with a specific provider ID and a context group to initialize the `fin.me.interop` client on connection.\n\t\tif (options) {\n\t\t\twindow.fin = await connect({\n\t\t\t\toptions\n\t\t\t});\n\t\t} else {\n\t\t\twindow.fin = await connect({\n\t\t\t\tconnectionInheritance: \"enabled\"\n\t\t\t});\n\t\t}\n\t\tconsole.log(\"Finished initializing the fin API.\");\n\t\t// Create and dispatch the finReady event\n\t\tconst event = new CustomEvent(\"finReady\");\n\t\twindow.dispatchEvent(event);\n\t}\n\n\tif (window.fdc3 === undefined && window?.fin?.me.interop?.getFDC3Sync !== undefined) {\n\t\twindow.fdc3 = fin.me.interop.getFDC3Sync(\"2.0\");\n\t\tconsole.log(\"Finished initializing the fdc3 API.\");\n\t\t// Create and dispatch the FDC3Ready event\n\t\tconst event = new CustomEvent(\"fdc3Ready\");\n\t\twindow.dispatchEvent(event);\n\t}\n}\n","import type { WebLayoutSnapshot } from \"@openfin/core-web\";\nimport type { Settings } from \"../shapes/setting-shapes\";\n\n/**\n * Fetches the settings for the application.\n * @returns The settings for the application.\n */\nexport async function getSettings(): Promise {\n\tconst settings = await getManifestSettings();\n\tif (settings === undefined) {\n\t\tconsole.error(\n\t\t\t\"Unable to run the example as settings are required and we fetch them from the link web manifest from the html page that is being served. It should exist in the customSettings section of the web manifest.\"\n\t\t);\n\t}\n\treturn settings;\n}\n\n/**\n * Returns a default layout from the settings if provided.\n * @returns The default layout from the settings.\n */\nexport async function getDefaultLayout(): Promise {\n\tconst settings = await getSettings();\n\tif (settings?.platform?.layout?.defaultLayout === undefined) {\n\t\tconsole.error(\n\t\t\t\"Unable to run the example as without a layout being defined. Please ensure that settings have been provided in the web manifest.\"\n\t\t);\n\t\treturn;\n\t}\n\tif (typeof settings.platform.layout.defaultLayout === \"string\") {\n\t\tconst layoutResponse = await fetch(settings.platform.layout.defaultLayout);\n\t\tconst layoutJson = (await layoutResponse.json()) as WebLayoutSnapshot;\n\t\treturn layoutJson;\n\t}\n\treturn settings.platform.layout.defaultLayout;\n}\n\n/**\n * Returns the settings from the manifest file.\n * @returns customSettings for this example\n */\nasync function getManifestSettings(): Promise {\n\t// Get the manifest link\n\tconst link = document.querySelector('link[rel=\"manifest\"]');\n\tif (link !== null) {\n\t\tconst manifestResponse = await fetch(link.href);\n\t\tconst manifestJson = (await manifestResponse.json()) as { custom_settings: Settings };\n\t\treturn manifestJson.custom_settings;\n\t}\n}\n","export { default as v1 } from './v1.js';\nexport { default as v3 } from './v3.js';\nexport { default as v4 } from './v4.js';\nexport { default as v5 } from './v5.js';\nexport { default as NIL } from './nil.js';\nexport { default as version } from './version.js';\nexport { default as validate } from './validate.js';\nexport { default as stringify } from './stringify.js';\nexport { default as parse } from './parse.js';","/*\n * Browser-compatible JavaScript MD5\n *\n * Modification of JavaScript MD5\n * https://github.com/blueimp/JavaScript-MD5\n *\n * Copyright 2011, Sebastian Tschan\n * https://blueimp.net\n *\n * Licensed under the MIT license:\n * https://opensource.org/licenses/MIT\n *\n * Based on\n * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message\n * Digest Algorithm, as defined in RFC 1321.\n * Version 2.2 Copyright (C) Paul Johnston 1999 - 2009\n * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet\n * Distributed under the BSD License\n * See http://pajhome.org.uk/crypt/md5 for more info.\n */\nfunction md5(bytes) {\n if (typeof bytes === 'string') {\n var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape\n\n bytes = new Uint8Array(msg.length);\n\n for (var i = 0; i < msg.length; ++i) {\n bytes[i] = msg.charCodeAt(i);\n }\n }\n\n return md5ToHexEncodedArray(wordsToMd5(bytesToWords(bytes), bytes.length * 8));\n}\n/*\n * Convert an array of little-endian words to an array of bytes\n */\n\n\nfunction md5ToHexEncodedArray(input) {\n var output = [];\n var length32 = input.length * 32;\n var hexTab = '0123456789abcdef';\n\n for (var i = 0; i < length32; i += 8) {\n var x = input[i >> 5] >>> i % 32 & 0xff;\n var hex = parseInt(hexTab.charAt(x >>> 4 & 0x0f) + hexTab.charAt(x & 0x0f), 16);\n output.push(hex);\n }\n\n return output;\n}\n/**\n * Calculate output length with padding and bit length\n */\n\n\nfunction getOutputLength(inputLength8) {\n return (inputLength8 + 64 >>> 9 << 4) + 14 + 1;\n}\n/*\n * Calculate the MD5 of an array of little-endian words, and a bit length.\n */\n\n\nfunction wordsToMd5(x, len) {\n /* append padding */\n x[len >> 5] |= 0x80 << len % 32;\n x[getOutputLength(len) - 1] = len;\n var a = 1732584193;\n var b = -271733879;\n var c = -1732584194;\n var d = 271733878;\n\n for (var i = 0; i < x.length; i += 16) {\n var olda = a;\n var oldb = b;\n var oldc = c;\n var oldd = d;\n a = md5ff(a, b, c, d, x[i], 7, -680876936);\n d = md5ff(d, a, b, c, x[i + 1], 12, -389564586);\n c = md5ff(c, d, a, b, x[i + 2], 17, 606105819);\n b = md5ff(b, c, d, a, x[i + 3], 22, -1044525330);\n a = md5ff(a, b, c, d, x[i + 4], 7, -176418897);\n d = md5ff(d, a, b, c, x[i + 5], 12, 1200080426);\n c = md5ff(c, d, a, b, x[i + 6], 17, -1473231341);\n b = md5ff(b, c, d, a, x[i + 7], 22, -45705983);\n a = md5ff(a, b, c, d, x[i + 8], 7, 1770035416);\n d = md5ff(d, a, b, c, x[i + 9], 12, -1958414417);\n c = md5ff(c, d, a, b, x[i + 10], 17, -42063);\n b = md5ff(b, c, d, a, x[i + 11], 22, -1990404162);\n a = md5ff(a, b, c, d, x[i + 12], 7, 1804603682);\n d = md5ff(d, a, b, c, x[i + 13], 12, -40341101);\n c = md5ff(c, d, a, b, x[i + 14], 17, -1502002290);\n b = md5ff(b, c, d, a, x[i + 15], 22, 1236535329);\n a = md5gg(a, b, c, d, x[i + 1], 5, -165796510);\n d = md5gg(d, a, b, c, x[i + 6], 9, -1069501632);\n c = md5gg(c, d, a, b, x[i + 11], 14, 643717713);\n b = md5gg(b, c, d, a, x[i], 20, -373897302);\n a = md5gg(a, b, c, d, x[i + 5], 5, -701558691);\n d = md5gg(d, a, b, c, x[i + 10], 9, 38016083);\n c = md5gg(c, d, a, b, x[i + 15], 14, -660478335);\n b = md5gg(b, c, d, a, x[i + 4], 20, -405537848);\n a = md5gg(a, b, c, d, x[i + 9], 5, 568446438);\n d = md5gg(d, a, b, c, x[i + 14], 9, -1019803690);\n c = md5gg(c, d, a, b, x[i + 3], 14, -187363961);\n b = md5gg(b, c, d, a, x[i + 8], 20, 1163531501);\n a = md5gg(a, b, c, d, x[i + 13], 5, -1444681467);\n d = md5gg(d, a, b, c, x[i + 2], 9, -51403784);\n c = md5gg(c, d, a, b, x[i + 7], 14, 1735328473);\n b = md5gg(b, c, d, a, x[i + 12], 20, -1926607734);\n a = md5hh(a, b, c, d, x[i + 5], 4, -378558);\n d = md5hh(d, a, b, c, x[i + 8], 11, -2022574463);\n c = md5hh(c, d, a, b, x[i + 11], 16, 1839030562);\n b = md5hh(b, c, d, a, x[i + 14], 23, -35309556);\n a = md5hh(a, b, c, d, x[i + 1], 4, -1530992060);\n d = md5hh(d, a, b, c, x[i + 4], 11, 1272893353);\n c = md5hh(c, d, a, b, x[i + 7], 16, -155497632);\n b = md5hh(b, c, d, a, x[i + 10], 23, -1094730640);\n a = md5hh(a, b, c, d, x[i + 13], 4, 681279174);\n d = md5hh(d, a, b, c, x[i], 11, -358537222);\n c = md5hh(c, d, a, b, x[i + 3], 16, -722521979);\n b = md5hh(b, c, d, a, x[i + 6], 23, 76029189);\n a = md5hh(a, b, c, d, x[i + 9], 4, -640364487);\n d = md5hh(d, a, b, c, x[i + 12], 11, -421815835);\n c = md5hh(c, d, a, b, x[i + 15], 16, 530742520);\n b = md5hh(b, c, d, a, x[i + 2], 23, -995338651);\n a = md5ii(a, b, c, d, x[i], 6, -198630844);\n d = md5ii(d, a, b, c, x[i + 7], 10, 1126891415);\n c = md5ii(c, d, a, b, x[i + 14], 15, -1416354905);\n b = md5ii(b, c, d, a, x[i + 5], 21, -57434055);\n a = md5ii(a, b, c, d, x[i + 12], 6, 1700485571);\n d = md5ii(d, a, b, c, x[i + 3], 10, -1894986606);\n c = md5ii(c, d, a, b, x[i + 10], 15, -1051523);\n b = md5ii(b, c, d, a, x[i + 1], 21, -2054922799);\n a = md5ii(a, b, c, d, x[i + 8], 6, 1873313359);\n d = md5ii(d, a, b, c, x[i + 15], 10, -30611744);\n c = md5ii(c, d, a, b, x[i + 6], 15, -1560198380);\n b = md5ii(b, c, d, a, x[i + 13], 21, 1309151649);\n a = md5ii(a, b, c, d, x[i + 4], 6, -145523070);\n d = md5ii(d, a, b, c, x[i + 11], 10, -1120210379);\n c = md5ii(c, d, a, b, x[i + 2], 15, 718787259);\n b = md5ii(b, c, d, a, x[i + 9], 21, -343485551);\n a = safeAdd(a, olda);\n b = safeAdd(b, oldb);\n c = safeAdd(c, oldc);\n d = safeAdd(d, oldd);\n }\n\n return [a, b, c, d];\n}\n/*\n * Convert an array bytes to an array of little-endian words\n * Characters >255 have their high-byte silently ignored.\n */\n\n\nfunction bytesToWords(input) {\n if (input.length === 0) {\n return [];\n }\n\n var length8 = input.length * 8;\n var output = new Uint32Array(getOutputLength(length8));\n\n for (var i = 0; i < length8; i += 8) {\n output[i >> 5] |= (input[i / 8] & 0xff) << i % 32;\n }\n\n return output;\n}\n/*\n * Add integers, wrapping at 2^32. This uses 16-bit operations internally\n * to work around bugs in some JS interpreters.\n */\n\n\nfunction safeAdd(x, y) {\n var lsw = (x & 0xffff) + (y & 0xffff);\n var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n return msw << 16 | lsw & 0xffff;\n}\n/*\n * Bitwise rotate a 32-bit number to the left.\n */\n\n\nfunction bitRotateLeft(num, cnt) {\n return num << cnt | num >>> 32 - cnt;\n}\n/*\n * These functions implement the four basic operations the algorithm uses.\n */\n\n\nfunction md5cmn(q, a, b, x, s, t) {\n return safeAdd(bitRotateLeft(safeAdd(safeAdd(a, q), safeAdd(x, t)), s), b);\n}\n\nfunction md5ff(a, b, c, d, x, s, t) {\n return md5cmn(b & c | ~b & d, a, b, x, s, t);\n}\n\nfunction md5gg(a, b, c, d, x, s, t) {\n return md5cmn(b & d | c & ~d, a, b, x, s, t);\n}\n\nfunction md5hh(a, b, c, d, x, s, t) {\n return md5cmn(b ^ c ^ d, a, b, x, s, t);\n}\n\nfunction md5ii(a, b, c, d, x, s, t) {\n return md5cmn(c ^ (b | ~d), a, b, x, s, t);\n}\n\nexport default md5;","export default '00000000-0000-0000-0000-000000000000';","import validate from './validate.js';\n\nfunction parse(uuid) {\n if (!validate(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n var v;\n var arr = new Uint8Array(16); // Parse ########-....-....-....-............\n\n arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24;\n arr[1] = v >>> 16 & 0xff;\n arr[2] = v >>> 8 & 0xff;\n arr[3] = v & 0xff; // Parse ........-####-....-....-............\n\n arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8;\n arr[5] = v & 0xff; // Parse ........-....-####-....-............\n\n arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8;\n arr[7] = v & 0xff; // Parse ........-....-....-####-............\n\n arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8;\n arr[9] = v & 0xff; // Parse ........-....-....-....-############\n // (Use \"/\" to avoid 32-bit truncation when bit-shifting high-order bytes)\n\n arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff;\n arr[11] = v / 0x100000000 & 0xff;\n arr[12] = v >>> 24 & 0xff;\n arr[13] = v >>> 16 & 0xff;\n arr[14] = v >>> 8 & 0xff;\n arr[15] = v & 0xff;\n return arr;\n}\n\nexport default parse;","export default /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;","// Unique ID creation requires a high quality random # generator. In the browser we therefore\n// require the crypto API and do not support built-in fallback to lower quality random number\n// generators (like Math.random()).\nvar getRandomValues;\nvar rnds8 = new Uint8Array(16);\nexport default function rng() {\n // lazy load so that environments that need to polyfill have a chance to do so\n if (!getRandomValues) {\n // getRandomValues needs to be invoked in a context where \"this\" is a Crypto implementation. Also,\n // find the complete implementation of crypto (msCrypto) on IE11.\n getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto !== 'undefined' && typeof msCrypto.getRandomValues === 'function' && msCrypto.getRandomValues.bind(msCrypto);\n\n if (!getRandomValues) {\n throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');\n }\n }\n\n return getRandomValues(rnds8);\n}","// Adapted from Chris Veness' SHA1 code at\n// http://www.movable-type.co.uk/scripts/sha1.html\nfunction f(s, x, y, z) {\n switch (s) {\n case 0:\n return x & y ^ ~x & z;\n\n case 1:\n return x ^ y ^ z;\n\n case 2:\n return x & y ^ x & z ^ y & z;\n\n case 3:\n return x ^ y ^ z;\n }\n}\n\nfunction ROTL(x, n) {\n return x << n | x >>> 32 - n;\n}\n\nfunction sha1(bytes) {\n var K = [0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xca62c1d6];\n var H = [0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0];\n\n if (typeof bytes === 'string') {\n var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape\n\n bytes = [];\n\n for (var i = 0; i < msg.length; ++i) {\n bytes.push(msg.charCodeAt(i));\n }\n } else if (!Array.isArray(bytes)) {\n // Convert Array-like to Array\n bytes = Array.prototype.slice.call(bytes);\n }\n\n bytes.push(0x80);\n var l = bytes.length / 4 + 2;\n var N = Math.ceil(l / 16);\n var M = new Array(N);\n\n for (var _i = 0; _i < N; ++_i) {\n var arr = new Uint32Array(16);\n\n for (var j = 0; j < 16; ++j) {\n arr[j] = bytes[_i * 64 + j * 4] << 24 | bytes[_i * 64 + j * 4 + 1] << 16 | bytes[_i * 64 + j * 4 + 2] << 8 | bytes[_i * 64 + j * 4 + 3];\n }\n\n M[_i] = arr;\n }\n\n M[N - 1][14] = (bytes.length - 1) * 8 / Math.pow(2, 32);\n M[N - 1][14] = Math.floor(M[N - 1][14]);\n M[N - 1][15] = (bytes.length - 1) * 8 & 0xffffffff;\n\n for (var _i2 = 0; _i2 < N; ++_i2) {\n var W = new Uint32Array(80);\n\n for (var t = 0; t < 16; ++t) {\n W[t] = M[_i2][t];\n }\n\n for (var _t = 16; _t < 80; ++_t) {\n W[_t] = ROTL(W[_t - 3] ^ W[_t - 8] ^ W[_t - 14] ^ W[_t - 16], 1);\n }\n\n var a = H[0];\n var b = H[1];\n var c = H[2];\n var d = H[3];\n var e = H[4];\n\n for (var _t2 = 0; _t2 < 80; ++_t2) {\n var s = Math.floor(_t2 / 20);\n var T = ROTL(a, 5) + f(s, b, c, d) + e + K[s] + W[_t2] >>> 0;\n e = d;\n d = c;\n c = ROTL(b, 30) >>> 0;\n b = a;\n a = T;\n }\n\n H[0] = H[0] + a >>> 0;\n H[1] = H[1] + b >>> 0;\n H[2] = H[2] + c >>> 0;\n H[3] = H[3] + d >>> 0;\n H[4] = H[4] + e >>> 0;\n }\n\n return [H[0] >> 24 & 0xff, H[0] >> 16 & 0xff, H[0] >> 8 & 0xff, H[0] & 0xff, H[1] >> 24 & 0xff, H[1] >> 16 & 0xff, H[1] >> 8 & 0xff, H[1] & 0xff, H[2] >> 24 & 0xff, H[2] >> 16 & 0xff, H[2] >> 8 & 0xff, H[2] & 0xff, H[3] >> 24 & 0xff, H[3] >> 16 & 0xff, H[3] >> 8 & 0xff, H[3] & 0xff, H[4] >> 24 & 0xff, H[4] >> 16 & 0xff, H[4] >> 8 & 0xff, H[4] & 0xff];\n}\n\nexport default sha1;","import validate from './validate.js';\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\n\nvar byteToHex = [];\n\nfor (var i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).substr(1));\n}\n\nfunction stringify(arr) {\n var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n var uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!validate(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n\n return uuid;\n}\n\nexport default stringify;","import rng from './rng.js';\nimport stringify from './stringify.js'; // **`v1()` - Generate time-based UUID**\n//\n// Inspired by https://github.com/LiosK/UUID.js\n// and http://docs.python.org/library/uuid.html\n\nvar _nodeId;\n\nvar _clockseq; // Previous uuid creation time\n\n\nvar _lastMSecs = 0;\nvar _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details\n\nfunction v1(options, buf, offset) {\n var i = buf && offset || 0;\n var b = buf || new Array(16);\n options = options || {};\n var node = options.node || _nodeId;\n var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not\n // specified. We do this lazily to minimize issues related to insufficient\n // system entropy. See #189\n\n if (node == null || clockseq == null) {\n var seedBytes = options.random || (options.rng || rng)();\n\n if (node == null) {\n // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)\n node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]];\n }\n\n if (clockseq == null) {\n // Per 4.2.2, randomize (14 bit) clockseq\n clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;\n }\n } // UUID timestamps are 100 nano-second units since the Gregorian epoch,\n // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so\n // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'\n // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.\n\n\n var msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock\n // cycle to simulate higher resolution clock\n\n var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs)\n\n var dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression\n\n if (dt < 0 && options.clockseq === undefined) {\n clockseq = clockseq + 1 & 0x3fff;\n } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new\n // time interval\n\n\n if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {\n nsecs = 0;\n } // Per 4.2.1.2 Throw error if too many uuids are requested\n\n\n if (nsecs >= 10000) {\n throw new Error(\"uuid.v1(): Can't create more than 10M uuids/sec\");\n }\n\n _lastMSecs = msecs;\n _lastNSecs = nsecs;\n _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch\n\n msecs += 12219292800000; // `time_low`\n\n var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;\n b[i++] = tl >>> 24 & 0xff;\n b[i++] = tl >>> 16 & 0xff;\n b[i++] = tl >>> 8 & 0xff;\n b[i++] = tl & 0xff; // `time_mid`\n\n var tmh = msecs / 0x100000000 * 10000 & 0xfffffff;\n b[i++] = tmh >>> 8 & 0xff;\n b[i++] = tmh & 0xff; // `time_high_and_version`\n\n b[i++] = tmh >>> 24 & 0xf | 0x10; // include version\n\n b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)\n\n b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low`\n\n b[i++] = clockseq & 0xff; // `node`\n\n for (var n = 0; n < 6; ++n) {\n b[i + n] = node[n];\n }\n\n return buf || stringify(b);\n}\n\nexport default v1;","import v35 from './v35.js';\nimport md5 from './md5.js';\nvar v3 = v35('v3', 0x30, md5);\nexport default v3;","import stringify from './stringify.js';\nimport parse from './parse.js';\n\nfunction stringToBytes(str) {\n str = unescape(encodeURIComponent(str)); // UTF8 escape\n\n var bytes = [];\n\n for (var i = 0; i < str.length; ++i) {\n bytes.push(str.charCodeAt(i));\n }\n\n return bytes;\n}\n\nexport var DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8';\nexport var URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8';\nexport default function (name, version, hashfunc) {\n function generateUUID(value, namespace, buf, offset) {\n if (typeof value === 'string') {\n value = stringToBytes(value);\n }\n\n if (typeof namespace === 'string') {\n namespace = parse(namespace);\n }\n\n if (namespace.length !== 16) {\n throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)');\n } // Compute hash of namespace and value, Per 4.3\n // Future: Use spread syntax when supported on all platforms, e.g. `bytes =\n // hashfunc([...namespace, ... value])`\n\n\n var bytes = new Uint8Array(16 + value.length);\n bytes.set(namespace);\n bytes.set(value, namespace.length);\n bytes = hashfunc(bytes);\n bytes[6] = bytes[6] & 0x0f | version;\n bytes[8] = bytes[8] & 0x3f | 0x80;\n\n if (buf) {\n offset = offset || 0;\n\n for (var i = 0; i < 16; ++i) {\n buf[offset + i] = bytes[i];\n }\n\n return buf;\n }\n\n return stringify(bytes);\n } // Function#name is not settable on some platforms (#270)\n\n\n try {\n generateUUID.name = name; // eslint-disable-next-line no-empty\n } catch (err) {} // For CommonJS default export support\n\n\n generateUUID.DNS = DNS;\n generateUUID.URL = URL;\n return generateUUID;\n}","import rng from './rng.js';\nimport stringify from './stringify.js';\n\nfunction v4(options, buf, offset) {\n options = options || {};\n var rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n offset = offset || 0;\n\n for (var i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n\n return buf;\n }\n\n return stringify(rnds);\n}\n\nexport default v4;","import v35 from './v35.js';\nimport sha1 from './sha1.js';\nvar v5 = v35('v5', 0x50, sha1);\nexport default v5;","import REGEX from './regex.js';\n\nfunction validate(uuid) {\n return typeof uuid === 'string' && REGEX.test(uuid);\n}\n\nexport default validate;","import validate from './validate.js';\n\nfunction version(uuid) {\n if (!validate(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n return parseInt(uuid.substr(14, 1), 16);\n}\n\nexport default version;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = (module) => {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","import type { Context } from \"@finos/fdc3\";\nimport { init } from \"../platform/api\";\n\nwindow.addEventListener(\"DOMContentLoaded\", async () => {\n\tawait init(true);\n\tawait initializeDOM();\n});\n\n/**\n * Broadcasts a context using FDC3.\n */\nasync function setContext(): Promise {\n\tconst contextType = \"fdc3.instrument\";\n\tconst contextName = \"Tesla Inc.\";\n\tconst idData = {\n\t\tticker: \"TSLA\"\n\t};\n\tconst context = {\n\t\ttype: contextType,\n\t\tname: contextName,\n\t\tid: idData\n\t};\n\tif (window.fin) {\n\t\tawait window.fin.me.interop.setContext(context);\n\t\tconsole.log(`Set context: ${contextType} - ${contextName}`);\n\t} else {\n\t\twindow.addEventListener(\"finReady\", async () => {\n\t\t\tif (window.fin) {\n\t\t\t\tawait window.fin.me.interop.setContext(context);\n\t\t\t\tconsole.log(`Set context: ${contextType} - ${contextName}`);\n\t\t\t}\n\t\t});\n\t}\n}\n\n/**\n * Adds an interop context listener to the window.\n */\nasync function addContextListener(): Promise {\n\tif (window.fin) {\n\t\tawait window.fin.me.interop.addContextHandler((context: Context) => {\n\t\t\tupdateDOMElements(context);\n\t\t});\n\t} else {\n\t\twindow.addEventListener(\"finReady\", async () => {\n\t\t\tif (window.fin) {\n\t\t\t\tawait window.fin.me.interop.addContextHandler((context: Context) => {\n\t\t\t\t\tupdateDOMElements(context);\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t}\n}\n\n/**\n * Updates the DOM elements with the provided context.\n * @param context The context to update the DOM elements with.\n */\nfunction updateDOMElements(context: Context): void {\n\tconst contextTypeSpan = document.querySelector(\"#contextType\");\n\tconst contextNameSpan = document.querySelector(\"#contextName\");\n\tconst contextBodyPre = document.querySelector(\"#contextBody\");\n\n\tif (contextTypeSpan !== null && contextNameSpan !== null && contextBodyPre !== null) {\n\t\tcontextTypeSpan.textContent = context.type;\n\t\tcontextNameSpan.textContent = context.name ?? \"No name provided.\";\n\t\tcontextBodyPre.textContent = JSON.stringify(context, null, 2);\n\t}\n}\n\n/**\n * Initialize the DOM elements.\n */\nasync function initializeDOM(): Promise {\n\tconst setContextButton = document.querySelector(\"#setContext\");\n\n\tif (setContextButton !== null) {\n\t\tsetContextButton.addEventListener(\"click\", async () => {\n\t\t\tawait setContext();\n\t\t});\n\t}\n\n\tawait addContextListener();\n}\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/web/v19.2.0/cloud-interop/js/provider.bundle.js b/web/v19.2.0/cloud-interop/js/provider.bundle.js index 1d1e798..a945838 100644 --- a/web/v19.2.0/cloud-interop/js/provider.bundle.js +++ b/web/v19.2.0/cloud-interop/js/provider.bundle.js @@ -1,10 +1,10 @@ /******/ (() => { // webpackBootstrap /******/ var __webpack_modules__ = ({ -/***/ "./node_modules/@openfin/cloud-interop/out/index.js": -/*!**********************************************************!*\ - !*** ./node_modules/@openfin/cloud-interop/out/index.js ***! - \**********************************************************/ +/***/ "../../node_modules/@openfin/cloud-interop/out/index.js": +/*!**************************************************************!*\ + !*** ../../node_modules/@openfin/cloud-interop/out/index.js ***! + \**************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; @@ -3483,38 +3483,38 @@ async function cloudInteropOverride(config) { /***/ }), -/***/ "./node_modules/@openfin/core-web/out/api-client.js": -/*!**********************************************************!*\ - !*** ./node_modules/@openfin/core-web/out/api-client.js ***! - \**********************************************************/ +/***/ "../../node_modules/@openfin/core-web/out/api-client.js": +/*!**************************************************************!*\ + !*** ../../node_modules/@openfin/core-web/out/api-client.js ***! + \**************************************************************/ /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; -var e=__webpack_require__(/*! ./main-8cad4070.js */ "./node_modules/@openfin/core-web/out/main-8cad4070.js");__webpack_require__(/*! buffer/ */ "../../node_modules/buffer/index.js"),__webpack_require__(/*! uuid */ "../../node_modules/uuid/dist/esm-browser/index.js"),__webpack_require__(/*! events */ "../../node_modules/events/events.js"),__webpack_require__(/*! lodash/cloneDeep */ "../../node_modules/lodash/cloneDeep.js"),__webpack_require__(/*! lodash/isEqual */ "../../node_modules/lodash/isEqual.js"),exports.connect=e.connect; +var e=__webpack_require__(/*! ./main-8cad4070.js */ "../../node_modules/@openfin/core-web/out/main-8cad4070.js");__webpack_require__(/*! buffer/ */ "../../node_modules/buffer/index.js"),__webpack_require__(/*! uuid */ "../../node_modules/uuid/dist/esm-browser/index.js"),__webpack_require__(/*! events */ "../../node_modules/events/events.js"),__webpack_require__(/*! lodash/cloneDeep */ "../../node_modules/lodash/cloneDeep.js"),__webpack_require__(/*! lodash/isEqual */ "../../node_modules/lodash/isEqual.js"),exports.connect=e.connect; /***/ }), -/***/ "./node_modules/@openfin/core-web/out/main-8cad4070.js": -/*!*************************************************************!*\ - !*** ./node_modules/@openfin/core-web/out/main-8cad4070.js ***! - \*************************************************************/ +/***/ "../../node_modules/@openfin/core-web/out/main-8cad4070.js": +/*!*****************************************************************!*\ + !*** ../../node_modules/@openfin/core-web/out/main-8cad4070.js ***! + \*****************************************************************/ /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; -var e=__webpack_require__(/*! buffer/ */ "../../node_modules/buffer/index.js"),t=__webpack_require__(/*! events */ "../../node_modules/events/events.js"),n=__webpack_require__(/*! lodash/cloneDeep */ "../../node_modules/lodash/cloneDeep.js"),i=__webpack_require__(/*! lodash/isEqual */ "../../node_modules/lodash/isEqual.js"),r=__webpack_require__(/*! uuid */ "../../node_modules/uuid/dist/esm-browser/index.js");const o=(e,t)=>`${t}<${btoa(JSON.stringify(e))}>`;var s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof __webpack_require__.g?__webpack_require__.g:"undefined"!=typeof self?self:{},a={},c={},d={},h={};async function l(e){const t=[];for(const n of e){const e=await n();t.push(e)}return t}Object.defineProperty(h,"__esModule",{value:!0}),h.promiseMapSerial=h.serial=h.promiseMap=h.promisify=void 0,h.promisify=function(e){return(...t)=>new Promise(((n,i)=>{e(...t,((e,t)=>e?i(e):n(t)))}))},h.promiseMap=async function(e,t){return Promise.all(e.map(t))},h.serial=l,h.promiseMapSerial=async function(e,t){return l(e.map(((e,n,i)=>()=>t(e,n,i))))};var u,p=s&&s.__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},w=s&&s.__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)};Object.defineProperty(d,"__esModule",{value:!0}),d.Reply=d.EmitterBase=d.Base=void 0;const y=h;class f{constructor(e){this.isNodeEnvironment=()=>"node"===this.wire.environment.type,this.isOpenFinEnvironment=()=>"openfin"===this.wire.environment.type,this.isBrowserEnvironment=()=>"other"===this.wire.environment.type,this.wire=e}get fin(){return this.wire.getFin()}get me(){return this.wire.me}}d.Base=f;d.EmitterBase=class extends f{constructor(e,t,...n){super(e),this.topic=t,u.set(this,void 0),this.eventNames=()=>this.hasEmitter()?this.getOrCreateEmitter().eventNames():[],this.emit=(e,t,...n)=>!!this.hasEmitter()&&this.getOrCreateEmitter().emit(e,t,...n),this.hasEmitter=()=>this.wire.eventAggregator.has(w(this,u,"f")),this.getOrCreateEmitter=()=>this.wire.eventAggregator.getOrCreate(w(this,u,"f")),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[],this.listenerCount=e=>this.hasEmitter()?this.getOrCreateEmitter().listenerCount(e):0,this.registerEventListener=async(e,t={},n,i)=>{const r={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e},o=this.getOrCreateEmitter();n(o);try{await this.wire.sendAction("subscribe-to-desktop-event",r)}catch(e){throw i(o),this.deleteEmitterIfNothingRegistered(o),e}},this.deregisterEventListener=async(e,t={})=>{if(this.hasEmitter()){const n={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e};await this.wire.sendAction("unsubscribe-to-desktop-event",n).catch((()=>null));return this.getOrCreateEmitter()}return Promise.resolve()},p(this,u,[t,...n],"f"),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[]}async on(e,t,n){return await this.registerEventListener(e,n,(n=>{n.on(e,t)}),(n=>{n.removeListener(e,t)})),this}async addListener(e,t,n){return this.on(e,t,n)}async once(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.once(e,i),n.once(e,t)}),(n=>{n.removeListener(e,i),n.removeListener(e,t)})),this}async prependListener(e,t,n){return await this.registerEventListener(e,n,(n=>{n.prependListener(e,t)}),(n=>{n.removeListener(e,t)})),this}async prependOnceListener(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.prependOnceListener(e,t),n.once(e,i)}),(n=>{n.removeListener(e,t),n.removeListener(e,i)})),this}async removeListener(e,t,n){const i=await this.deregisterEventListener(e,n);return i&&(i.removeListener(e,t),this.deleteEmitterIfNothingRegistered(i)),this}async deregisterAllListeners(e){const t={...this.identity,type:e,topic:this.topic};if(this.hasEmitter()){const e=this.getOrCreateEmitter(),n=e.listenerCount(t.type),i=[];for(let e=0;enull)));return await Promise.all(i),e}}async removeAllListeners(e){const t=async e=>{const t=await this.deregisterAllListeners(e);t&&(t.removeAllListeners(e),this.deleteEmitterIfNothingRegistered(t))};if(e)await t(e);else if(this.hasEmitter()){const e=this.getOrCreateEmitter().eventNames();await(0,y.promiseMap)(e,t)}return this}deleteEmitterIfNothingRegistered(e){0===e.eventNames().length&&this.wire.eventAggregator.delete(w(this,u,"f"))}},u=new WeakMap;d.Reply=class{};var g={};Object.defineProperty(g,"__esModule",{value:!0});var m=g.RuntimeError=g.NotSupportedError=g.NotImplementedError=g.NoAckError=g.DuplicateCorrelationError=g.UnexpectedActionError=g.DisconnectedError=void 0;class v extends Error{constructor(e){super(`Expected websocket state OPEN but found ${e}`),this.readyState=e}}g.DisconnectedError=v;class C extends Error{}g.UnexpectedActionError=C;class b extends Error{}g.DuplicateCorrelationError=b;class I extends Error{}g.NoAckError=I;class E extends Error{}g.NotImplementedError=E;class x extends Error{}g.NotSupportedError=x;class A extends Error{constructor(e){const{message:t,name:n,stack:i,...r}=e;super(t),this.name=n||"Error",this.stack=i??this.toString(),Object.keys(r).forEach((e=>{this[e]=r[e]}))}}class P extends Error{static getCallSite(e=0){const t=Error.stackTraceLimit,n=e+1;Error.stackTraceLimit=t+n;const i=Error.prepareStackTrace;Error.prepareStackTrace=(e,t)=>t;const r=(new Error).stack?.slice(n)??[];return Error.prepareStackTrace=i,Error.stackTraceLimit=t,r}static prepareStackTrace(e,t){if("function"==typeof Error.prepareStackTrace)return Error.prepareStackTrace(e,t);let n="";n+=e.name||"Error",n+=`: ${e.message||""}`;for(const e of t)n+=`\n at ${e.toString()}`;return n}constructor(e,t){const{reason:n,error:i}=e;super(n),this.name="RuntimeError",i?.stack&&(this.cause=new A(i)),t&&(this.stack=P.prepareStackTrace(this,t))}}m=g.RuntimeError=P;var M={},_={},O={};Object.defineProperty(O,"__esModule",{value:!0}),O.validateIdentity=void 0,O.validateIdentity=function(e){let t;return"object"==typeof e&&"string"==typeof e.uuid||(t="Not a valid identity object"),t};var S={},R={},F={},j={},k={},L={},T={};Object.defineProperty(T,"__esModule",{value:!0}),T.handleDeprecatedWarnings=void 0;var $;T.handleDeprecatedWarnings=e=>{(e.contentNavigation?.whitelist||e.contentNavigation?.blacklist||e.contentRedirect?.whitelist||e.contentRedirect?.blacklist)&&console.warn("The properties 'whitelist' and 'blacklist' have been marked as deprecated and will be removed in a future version. Please use 'allowlist' and 'denylist'.")};var B={},G={};Object.defineProperty(G,"__esModule",{value:!0}),G.AsyncRetryableLazy=W=G.Lazy=void 0;var W=G.Lazy=class{constructor(e){this.producerFn=e}getValue(){return this.value||(this.value=this.producerFn()),this.value}};G.AsyncRetryableLazy=class{constructor(e){this.producerFn=e}async getValue(){return this.promise||(this.promise=this.producerFn().catch((e=>{throw delete this.promise,e}))),this.promise}};var H={};Object.defineProperty(H,"__esModule",{value:!0}),H.WebContents=void 0;const N=d;class D extends N.EmitterBase{constructor(e,t,n){super(e,n,t.uuid,t.name),this.identity=t,this.entityType=n}capturePage(e){return this.wire.sendAction("capture-page",{options:e,...this.identity}).then((({payload:e})=>e.data))}executeJavaScript(e){return this.wire.sendAction("execute-javascript-in-window",{...this.identity,code:e}).then((({payload:e})=>e.data))}getZoomLevel(){return this.wire.sendAction("get-zoom-level",this.identity).then((({payload:e})=>e.data))}setZoomLevel(e){return this.wire.sendAction("set-zoom-level",{...this.identity,level:e}).then((()=>{}))}navigate(e){return this.wire.sendAction("navigate-window",{...this.identity,url:e}).then((()=>{}))}navigateBack(){return this.wire.sendAction("navigate-window-back",{...this.identity}).then((()=>{}))}async navigateForward(){await this.wire.sendAction("navigate-window-forward",{...this.identity})}stopNavigation(){return this.wire.sendAction("stop-window-navigation",{...this.identity}).then((()=>{}))}reload(e=!1){return this.wire.sendAction("reload-window",{ignoreCache:e,...this.identity}).then((()=>{}))}print(e={}){return this.wire.sendAction("print",{...this.identity,options:e}).then((()=>{}))}findInPage(e,t){return this.wire.sendAction("find-in-page",{...this.identity,searchTerm:e,options:t}).then((({payload:e})=>e.data))}stopFindInPage(e){return this.wire.sendAction("stop-find-in-page",{...this.identity,action:e}).then((()=>{}))}getPrinters(){return this.wire.sendAction("get-printers",{...this.identity}).then((({payload:e})=>e.data))}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){await this.wire.sendAction("focus-window",{emitSynthFocused:e,...this.identity})}async showDeveloperTools(){await this.wire.sendAction("show-developer-tools",this.identity)}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction("get-process-info",this.identity);return e}async getSharedWorkers(){return this.wire.sendAction("get-shared-workers",this.identity).then((({payload:e})=>e.data))}async inspectSharedWorker(){await this.wire.sendAction("inspect-shared-worker",{...this.identity})}async inspectSharedWorkerById(e){await this.wire.sendAction("inspect-shared-worker-by-id",{...this.identity,workerId:e})}async inspectServiceWorker(){await this.wire.sendAction("inspect-service-worker",{...this.identity})}async showPopupWindow(e){if(this.wire.sendAction(`${this.entityType}-show-popup-window`,this.identity).catch((()=>{})),e?.onPopupReady){const t=async({popupName:t})=>{try{const n=this.fin.Window.wrapSync({uuid:this.fin.me.uuid,name:t});await e.onPopupReady(n)}catch(e){throw new Error(`Something went wrong during onPopupReady execution: ${e}`)}};await this.once("popup-ready",t)}const{payload:t}=await this.wire.sendAction("try-create-popup-window",{options:{...e,hasResultCallback:!!e?.onPopupResult,hasReadyCallback:!!e?.onPopupReady},...this.identity}),{data:{willOpen:n,options:i}}=t;n&&await this.fin.Window.create(i.initialOptions);if(e?.onPopupResult){const t=async t=>{await e.onPopupResult((e=>{const{name:t,uuid:n,result:i,data:r}=e,o={identity:{name:t,uuid:n},result:i};return r&&(o.data=r),o})(t))},n=async()=>{await this.removeListener("popup-result",t)};await this.on("popup-result",t),await this.once("popup-teardown",n)}const{payload:r}=await this.wire.sendAction("show-popup-window",{options:i,...this.identity});return r.data}}var U,V,z,K,q;function J(){return V||(V=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(function(){if($)return L;$=1,Object.defineProperty(L,"__esModule",{value:!0}),L.ViewModule=void 0;const e=d,t=O,n=J(),i=T;class r extends e.Base{async create(e){const{uuid:t}=this.wire.me;if(!e.name||"string"!=typeof e.name)throw new Error("Please provide a name property as a string in order to create a View.");return(0,i.handleDeprecatedWarnings)(e),this.wire.environment.childViews?await this.wire.environment.createChildContent({entityType:"view",options:{...e,uuid:t}}):await this.wire.sendAction("create-view",{...e,uuid:t}),this.wrapSync({uuid:t,name:e.name})}async wrap(e){this.wire.sendAction("view-wrap").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}wrapSync(e){this.wire.sendAction("view-wrap-sync").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}getCurrent(){if(this.wire.sendAction("view-get-current").catch((e=>{})),!this.wire.me.isView)throw new Error("You are not in a View context");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction("view-get-current-sync").catch((e=>{})),!this.wire.me.isView)throw new Error("You are not in a View context");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return L.ViewModule=r,L}(),e),n(function(){if(U)return B;var e;U=1,Object.defineProperty(B,"__esModule",{value:!0}),B.View=void 0;const t=g,n=G,i=H,r=ie();class o extends i.WebContents{constructor(i,o){super(i,o,"view"),this.identity=o,e.set(this,new n.Lazy((()=>this.fin.Platform.wrapSync(this.identity).getClient()))),this.attach=async e=>{await this.wire.sendAction("attach-view",{target:e,...this.identity})},this.destroy=async()=>{await this.wire.sendAction("destroy-view",{...this.identity})},this.show=async()=>{await this.wire.sendAction("show-view",{...this.identity})},this.showAt=async(e,t={})=>{await this.wire.sendAction("show-view-at",{bounds:e,...this.identity,options:t})},this.bringToFront=async()=>{await this.wire.sendAction("bring-view-to-front",{...this.identity})},this.hide=async()=>{await this.wire.sendAction("hide-view",{...this.identity})},this.setBounds=async e=>{await this.wire.sendAction("set-view-bounds",{bounds:e,...this.identity})},this.getBounds=async()=>(await this.wire.sendAction("get-view-bounds",{...this.identity})).payload.data,this.getInfo=async()=>(await this.wire.sendAction("get-view-info",{...this.identity})).payload.data,this.getParentLayout=async()=>(this.wire.sendAction("view-get-parent-layout",{...this.identity}).catch((()=>{})),this.fin.Platform.Layout.getLayoutByViewIdentity(this.identity)),this.getOptions=async()=>this.wire.sendAction("get-view-options",{...this.identity}).then((({payload:e})=>e.data)),this.updateOptions=async e=>this.wire.sendAction("update-view-options",{options:e,...this.identity}).then((()=>{})),this.getCurrentWindow=async()=>{const{payload:{data:e}}=await this.wire.sendAction("get-view-window",{...this.identity});return new r._Window(this.wire,e)},this.getCurrentStack=async()=>{this.wire.sendAction("view-get-current-stack").catch((()=>{}));try{return(await this.getParentLayout()).getStackByViewIdentity(this.identity)}catch(e){throw new t.RuntimeError({reason:"This view does not belong to a stack.",error:e})}},this.triggerBeforeUnload=async()=>(await this.wire.sendAction("trigger-before-unload",{...this.identity})).payload.data,this.bindToElement=async e=>{if(!e)throw new Error("Element not found.");return this.wire.environment.observeBounds(e,(async e=>this.setBounds(e)))}}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){const t=await this.getCurrentWindow();await t.focusedWebViewWasChanged(),await super.focus({emitSynthFocused:e})}}return B.View=o,e=new WeakMap,B}(),e)}(k)),k}function Y(){if(z)return j;z=1,Object.defineProperty(j,"__esModule",{value:!0}),j.Application=void 0;const e=d,t=ie(),n=J();class i extends e.EmitterBase{constructor(e,n){super(e,"application",n.uuid),this.identity=n,this.window=new t._Window(this.wire,{uuid:this.identity.uuid,name:this.identity.uuid})}windowListFromIdentityList(e){const n=[];return e.forEach((e=>{n.push(new t._Window(this.wire,{uuid:e.uuid,name:e.name}))})),n}isRunning(){return this.wire.sendAction("is-application-running",this.identity).then((({payload:e})=>e.data))}async quit(e=!1){try{await this._close(e),await this.wire.sendAction("destroy-application",{force:e,...this.identity})}catch(e){if(!["Remote connection has closed","Could not locate the requested application"].some((t=>e.message.includes(t))))throw e}}async _close(e=!1){try{await this.wire.sendAction("close-application",{force:e,...this.identity})}catch(e){if(!e.message.includes("Remote connection has closed"))throw e}}close(e=!1){return console.warn("Deprecation Warning: Application.close is deprecated Please use Application.quit"),this.wire.sendAction("application-close",this.identity).catch((e=>{})),this._close(e)}getChildWindows(){return this.wire.sendAction("get-child-windows",this.identity).then((({payload:e})=>{const t=[];return e.data.forEach((e=>{t.push({uuid:this.identity.uuid,name:e})})),this.windowListFromIdentityList(t)}))}getManifest(){return this.wire.sendAction("get-application-manifest",this.identity).then((({payload:e})=>e.data))}getParentUuid(){return this.wire.sendAction("get-parent-application",this.identity).then((({payload:e})=>e.data))}getShortcuts(){return this.wire.sendAction("get-shortcuts",this.identity).then((({payload:e})=>e.data))}async getViews(){const{payload:e}=await this.wire.sendAction("application-get-views",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}getZoomLevel(){return this.wire.sendAction("get-application-zoom-level",this.identity).then((({payload:e})=>e.data))}getWindow(){return this.wire.sendAction("application-get-window",this.identity).catch((e=>{})),Promise.resolve(this.window)}registerUser(e,t){return this.wire.sendAction("register-user",{userName:e,appName:t,...this.identity}).then((()=>{}))}removeTrayIcon(){return this.wire.sendAction("remove-tray-icon",this.identity).then((()=>{}))}restart(){return this.wire.sendAction("restart-application",this.identity).then((()=>{}))}run(){return console.warn("Deprecation Warning: Application.run is deprecated Please use fin.Application.start"),this.wire.sendAction("application-run",this.identity).catch((e=>{})),this._run()}_run(e={}){return this.wire.sendAction("run-application",{manifestUrl:this._manifestUrl,opts:e,...this.identity}).then((()=>{}))}scheduleRestart(){return this.wire.sendAction("relaunch-on-close",this.identity).then((()=>{}))}async sendApplicationLog(){const{payload:e}=await this.wire.sendAction("send-application-log",this.identity);return e.data}async setJumpList(e){await this.wire.sendAction("set-jump-list",{config:e,...this.identity})}setTrayIcon(e){return this.wire.sendAction("set-tray-icon",{enabledIcon:e,...this.identity}).then((()=>{}))}setShortcuts(e){return this.wire.sendAction("set-shortcuts",{data:e,...this.identity}).then((()=>{}))}async setShortcutQueryParams(e){await this.wire.sendAction("set-shortcut-query-args",{data:e,...this.identity})}setZoomLevel(e){return this.wire.sendAction("set-application-zoom-level",{level:e,...this.identity}).then((()=>{}))}async setAppLogUsername(e){await this.wire.sendAction("set-app-log-username",{data:e,...this.identity})}getTrayIconInfo(){return this.wire.sendAction("get-tray-icon-info",this.identity).then((({payload:e})=>e.data))}hasTrayIcon(){return this.wire.sendAction("has-tray-icon",this.identity).then((({payload:e})=>e.data))}terminate(){return this.wire.sendAction("terminate-application",this.identity).then((()=>{}))}wait(){return this.wire.sendAction("wait-for-hung-application",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction("get-info",this.identity).then((({payload:e})=>e.data))}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction("application-get-process-info",this.identity);return e}async setFileDownloadLocation(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t};await this.wire.sendAction("set-file-download-location",{...n,downloadLocation:e})}async getFileDownloadLocation(){const{payload:{data:e}}=await this.wire.sendAction("get-file-download-location",this.identity);return e}async showTrayIconPopupMenu(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t},{payload:i}=await this.wire.sendAction("show-tray-icon-popup-menu",{...n,options:e});return i.data}async closeTrayIconPopupMenu(){const{name:e}=this.wire.me,t={uuid:this.identity.uuid,name:e};await this.wire.sendAction("close-tray-icon-popup-menu",{...t})}}return j.Application=i,j}function Z(){return q||(q=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(function(){if(K)return F;K=1,Object.defineProperty(F,"__esModule",{value:!0}),F.ApplicationModule=void 0;const e=d,t=O,n=Y();class i extends e.Base{async wrap(e){this.wire.sendAction("wrap-application").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}wrapSync(e){this.wire.sendAction("wrap-application-sync").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}async _create(e){return void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&void 0===e.isPlatformController&&(e.autoShow=!0),await this.wire.sendAction("create-application",e),this.wrap({uuid:e.uuid})}create(e){return console.warn("Deprecation Warning: fin.Application.create is deprecated. Please use fin.Application.start"),this.wire.sendAction("application-create").catch((e=>{})),this._create(e)}async start(e){this.wire.sendAction("start-application").catch((e=>{}));const t=await this._create(e);return await this.wire.sendAction("run-application",{uuid:e.uuid}),t}async startManyManifests(e,t){return this.wire.sendAction("run-applications",{applications:e,opts:t}).then((()=>{}))}getCurrent(){return this.wire.sendAction("get-current-application").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction("get-current-application-sync").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}async startFromManifest(e,t){this.wire.sendAction("application-start-from-manifest").catch((e=>{}));const n=await this._createFromManifest(e);return await n._run(t),n}createFromManifest(e){return console.warn("Deprecation Warning: fin.Application.createFromManifest is deprecated. Please use fin.Application.startFromManifest"),this.wire.sendAction("application-create-from-manifest").catch((e=>{})),this._createFromManifest(e)}_createFromManifest(e){return this.wire.sendAction("get-application-manifest",{manifestUrl:e}).then((({payload:e})=>{const t=e.data.platform?e.data.platform.uuid:e.data.startup_app.uuid;return this.wrap({uuid:t})})).then((t=>(t._manifestUrl=e,t)))}}return F.ApplicationModule=i,F}(),e),n(Y(),e)}(R)),R}H.WebContents=D;var Q={};Object.defineProperty(Q,"__esModule",{value:!0}),Q.promisifySubscription=void 0;var X,ee,te;function ne(){if(X)return S;X=1,Object.defineProperty(S,"__esModule",{value:!0}),S._Window=void 0;const e=Z(),t=H,n=J(),i=T,r=Q;class o extends t.WebContents{constructor(e,t){super(e,t,"window")}async createWindow(e){this.wire.sendAction("window-create-window",this.identity).catch((e=>{}));const t=await(0,r.promisifySubscription)(this,"fire-constructor-callback");void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&(e.autoShow=!0),(0,i.handleDeprecatedWarnings)(e);const n=this.wire.environment.createChildContent({entityType:"window",options:e}),[o]=await Promise.all([t.getValue(),n]);let s;const{success:a}=o,c=o.data,{message:d}=c;s=a?{httpResponseCode:c.httpResponseCode,apiInjected:c.apiInjected}:{message:c.message,networkErrorCode:c.networkErrorCode,stack:c.stack};const h={message:d,cbPayload:s,success:a};try{this.getWebWindow().fin.__internal_.openerSuccessCBCalled()}catch(e){}return h.success?this:Promise.reject(h)}getAllFrames(){return this.wire.sendAction("get-all-frames",this.identity).then((({payload:e})=>e.data))}getBounds(){return this.wire.sendAction("get-window-bounds",this.identity).then((({payload:e})=>e.data))}center(){return this.wire.sendAction("center-window",this.identity).then((()=>{}))}blur(){return this.wire.sendAction("blur-window",this.identity).then((()=>{}))}bringToFront(){return this.wire.sendAction("bring-window-to-front",this.identity).then((()=>{}))}animate(e,t){return this.wire.sendAction("animate-window",{transitions:e,options:t,...this.identity}).then((()=>{}))}hide(){return this.wire.sendAction("hide-window",this.identity).then((()=>{}))}close(e=!1){return this.wire.sendAction("close-window",{force:e,...this.identity}).then((()=>{Object.setPrototypeOf(this,null)}))}focusedWebViewWasChanged(){return this.wire.sendAction("focused-webview-changed",this.identity).then((()=>{}))}getNativeId(){return this.wire.sendAction("get-window-native-id",this.identity).then((({payload:e})=>e.data))}async getCurrentViews(){const{payload:e}=await this.wire.sendAction("window-get-views",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}disableFrame(){return console.warn("Function is deprecated; use disableUserMovement instead."),this.wire.sendAction("disable-window-frame",this.identity).then((()=>{}))}disableUserMovement(){return this.wire.sendAction("disable-window-frame",this.identity).then((()=>{}))}enableFrame(){return console.warn("Function is deprecated; use enableUserMovement instead."),this.wire.sendAction("enable-window-frame",this.identity).then((()=>{}))}enableUserMovement(){return this.wire.sendAction("enable-window-frame",this.identity).then((()=>{}))}flash(){return this.wire.sendAction("flash-window",this.identity).then((()=>{}))}stopFlashing(){return this.wire.sendAction("stop-flash-window",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction("get-window-info",this.identity).then((({payload:e})=>e.data))}async getLayout(e){this.wire.sendAction("window-get-layout",this.identity).catch((e=>{}));const t=await this.getOptions();if(!t.layout&&!t.layoutSnapshot)throw new Error("Window does not have a Layout");return this.fin.Platform.Layout.wrap(e??this.identity)}getOptions(){return this.wire.sendAction("get-window-options",this.identity).then((({payload:e})=>e.data))}getParentApplication(){return this.wire.sendAction("window-get-parent-application",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity))}getParentWindow(){return this.wire.sendAction("window-get-parent-window",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity)).then((e=>e.getWindow()))}async getSnapshot(e){const t={area:e,...this.identity};console.warn("Window.getSnapshot has been deprecated, please use Window.capturePage");return(await this.wire.sendAction("get-window-snapshot",t)).payload.data}getState(){return this.wire.sendAction("get-window-state",this.identity).then((({payload:e})=>e.data))}getWebWindow(){return this.wire.sendAction("window-get-web-window",this.identity).catch((e=>{})),this.wire.environment.getWebWindow(this.identity)}isMainWindow(){return this.wire.sendAction("window-is-main-window",this.identity).catch((e=>{})),this.me.uuid===this.me.name}isShowing(){return this.wire.sendAction("is-window-showing",this.identity).then((({payload:e})=>e.data))}maximize(){return this.wire.sendAction("maximize-window",this.identity).then((()=>{}))}minimize(){return this.wire.sendAction("minimize-window",this.identity).then((()=>{}))}moveBy(e,t,n){return this.wire.sendAction("move-window-by",{deltaLeft:e,deltaTop:t,positioningOptions:n,...this.identity}).then((()=>{}))}moveTo(e,t,n){return this.wire.sendAction("move-window",{left:e,top:t,positioningOptions:n,...this.identity}).then((()=>{}))}resizeBy(e,t,n,i){return this.wire.sendAction("resize-window-by",{deltaWidth:Math.floor(e),deltaHeight:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}resizeTo(e,t,n,i){return this.wire.sendAction("resize-window",{width:Math.floor(e),height:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}restore(){return this.wire.sendAction("restore-window",this.identity).then((()=>{}))}setAsForeground(){return this.wire.sendAction("set-foreground-window",this.identity).then((()=>{}))}setBounds(e,t){return this.wire.sendAction("set-window-bounds",{...e,...this.identity,positioningOptions:t}).then((()=>{}))}show(e=!1){return this.wire.sendAction("show-window",{force:e,...this.identity}).then((()=>{}))}showAt(e,t,n=!1){return this.wire.sendAction("show-at-window",{force:n,left:Math.floor(e),top:Math.floor(t),...this.identity}).then((()=>{}))}updateOptions(e){return this.wire.sendAction("update-window-options",{options:e,...this.identity}).then((()=>{}))}authenticate(e,t){return this.wire.sendAction("window-authenticate",{userName:e,password:t,...this.identity}).then((()=>{}))}async showPopupMenu(e){const{payload:t}=await this.wire.sendAction("show-popup-menu",{options:e,...this.identity});return t.data}async closePopupMenu(){return this.wire.sendAction("close-popup-menu",{...this.identity}).then((()=>{}))}async dispatchPopupResult(e){this.wire.sendAction("window-dispatch-popup-result",this.identity).catch((e=>{})),await this.wire.sendAction("dispatch-popup-result",{data:e,...this.identity})}async print(e={content:"self"}){switch(e.content){case void 0:case"self":return super.print(e);case"screenshot":return this.wire.sendAction("print-screenshot",this.identity).then((()=>{}));case"views":return this.wire.sendAction("print-views",{...this.identity,options:e}).then((()=>{}));default:return}}}return S._Window=o,S}function ie(){return te||(te=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(function(){if(ee)return _;ee=1,Object.defineProperty(_,"__esModule",{value:!0}),_._WindowModule=void 0;const e=d,t=O,n=ne();class i extends e.Base{async wrap(e){this.wire.sendAction("window-wrap").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}wrapSync(e){this.wire.sendAction("window-wrap-sync").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}create(e){return this.wire.sendAction("create-window").catch((e=>{})),new n._Window(this.wire,{uuid:this.me.uuid,name:e.name}).createWindow(e)}getCurrent(){if(this.wire.sendAction("get-current-window").catch((e=>{})),!this.wire.me.isWindow)throw new Error("You are not in a Window context");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction("get-current-window-sync").catch((e=>{})),!this.wire.me.isWindow)throw new Error("You are not in a Window context");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return _._WindowModule=i,_}(),e),n(ne(),e)}(M)),M}Q.promisifySubscription=async(e,t,n=(()=>!0),i)=>{let r,o,s;const a=new Promise(((e,t)=>{r=e,o=t})),c=e=>{n(e)&&(clearTimeout(s),r(e))};return await e.on(t,c),i&&(s=setTimeout((()=>o(new Error("event timed out"))),i)),a.finally((()=>{e.removeListener(t,c).catch((()=>null))})),{getValue:()=>a}},Object.defineProperty(c,"__esModule",{value:!0}),c.System=void 0;const re=d,oe=g,se=ie(),ae=t;class ce extends re.EmitterBase{constructor(e){super(e,"system")}sendExternalProcessRequest(e,t){return new Promise(((n,i)=>{const r="external-process-exited";let o,s,a,c;"function"==typeof t.listener&&(a=e=>{const n=e||{};s={topic:"exited",uuid:n.processUuid||"",exitCode:n.exitCode||0},o===e.processUuid&&(t.listener(s),c.removeListener(r,a))},this.wire.me.name||(this.wire.me.name=this.wire.me.uuid),c=new se._Window(this.wire,this.wire.me),c.on(r,a)),this.wire.sendAction(e,t).then((({payload:e})=>{o=e.data.uuid,n(e.data),s&&o===s.uuid&&(t.listener(s),c.removeListener(r,a))})).catch((e=>{c&&c.removeListener(r,a),i(e)}))}))}getVersion(){return this.wire.sendAction("get-version").then((({payload:e})=>e.data))}clearCache(e){return this.wire.sendAction("clear-cache",e).then((()=>{}))}deleteCacheOnExit(){return this.wire.sendAction("delete-cache-request").then((()=>{}))}exit(){return this.wire.sendAction("exit-desktop").then((()=>{}))}async fetchManifest(e){const{payload:{data:t}}=await this.wire.sendAction("fetch-manifest",{manifestUrl:e});return t}flushCookieStore(){return this.wire.sendAction("flush-cookie-store").then((()=>{}))}getAllWindows(){return this.wire.sendAction("get-all-windows").then((({payload:e})=>e.data))}getAllApplications(){return this.wire.sendAction("get-all-applications").then((({payload:e})=>e.data))}getCommandLineArguments(){return this.wire.sendAction("get-command-line-arguments").then((({payload:e})=>e.data))}async getCrashReporterState(){const{payload:{data:{diagnosticMode:e,isRunning:t}}}=await this.wire.sendAction("get-crash-reporter-state");return console.warn("diagnosticMode property is deprecated. It will be removed in a future version"),{diagnosticMode:e,diagnosticsMode:e,isRunning:t}}async startCrashReporter(e){const t=e,n={...t,diagnosticMode:t.diagnosticsMode||t.diagnosticMode},{payload:{data:{diagnosticMode:i,isRunning:r}}}=await this.wire.sendAction("start-crash-reporter",n);return{diagnosticMode:i,diagnosticsMode:i,isRunning:r}}getUniqueUserId(){return this.wire.sendAction("get-unique-user-id").then((({payload:e})=>e.data))}getEntityInfo(e,t){return this.wire.sendAction("get-entity-info",{uuid:e,name:t}).then((({payload:e})=>e.data))}getEnvironmentVariable(e){return this.wire.sendAction("get-environment-variable",{environmentVariables:e}).then((({payload:e})=>e.data))}getFocusedWindow(){return this.wire.sendAction("get-focused-window").then((({payload:e})=>e.data))}async isAppCertified(e){const{payload:{data:{certifiedInfo:t}}}=await this.wire.sendAction("is-app-certified",{manifestUrl:e});return t}getInstalledRuntimes(){return this.wire.sendAction("get-installed-runtimes").then((({payload:e})=>e.data.runtimes))}async getInstalledApps(){const{payload:{data:{installedApps:e}}}=await this.wire.sendAction("get-installed-apps");return e}getLog(e){return this.wire.sendAction("view-log",e).then((({payload:e})=>e.data))}getMachineId(){return this.wire.sendAction("get-machine-id").then((({payload:e})=>e.data))}getMinLogLevel(){return this.wire.sendAction("get-min-log-level").then((({payload:e})=>e.data))}getLogList(){return this.wire.sendAction("list-logs").then((({payload:e})=>e.data))}getMonitorInfo(){return this.wire.sendAction("get-monitor-info").then((({payload:e})=>e.data))}getMousePosition(){return this.wire.sendAction("get-mouse-position").then((({payload:e})=>e.data))}getProcessList(){return console.warn("System.getProcessList has been deprecated. Please consider using our new process APIs: Window.getProcessInfo, View.getProcessInfo, Application.getProcessInfo, System.getAllProcessInfo"),this.wire.sendAction("process-snapshot").then((({payload:e})=>e.data))}async getAllProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction("get-all-process-info",this.identity);return e}getProxySettings(){return this.wire.sendAction("get-proxy-settings").then((({payload:e})=>e.data))}getRuntimeInfo(){return this.wire.sendAction("get-runtime-info").then((({payload:e})=>e.data))}getRvmInfo(){return this.wire.sendAction("get-rvm-info").then((({payload:e})=>e.data))}getHostSpecs(){return this.wire.sendAction("get-host-specs").then((({payload:e})=>e.data))}getOSInfo(){return this.wire.sendAction("get-os-info").then((({payload:e})=>e.data))}launchExternalProcess(e){return this.sendExternalProcessRequest("launch-external-process",e)}monitorExternalProcess(e){return this.sendExternalProcessRequest("monitor-external-process",e)}log(e,t){return this.wire.sendAction("write-to-log",{level:e,message:t}).then((()=>{}))}openUrlWithBrowser(e){return this.wire.sendAction("open-url-with-browser",{url:e}).then((()=>{}))}async registerCustomProtocol(e){if("object"!=typeof e)throw new Error("Must provide an object with a `protocolName` property having a string value.");await this.wire.sendAction("register-custom-protocol",e)}async unregisterCustomProtocol(e){await this.wire.sendAction("unregister-custom-protocol",{protocolName:e})}async getCustomProtocolState(e){return this.wire.sendAction("get-custom-protocol-state",{protocolName:e}).then((({payload:e})=>e.data))}releaseExternalProcess(e){return this.wire.sendAction("release-external-process",{uuid:e}).then((()=>{}))}showDeveloperTools(e){return this.wire.sendAction("show-developer-tools",e).then((()=>{}))}terminateExternalProcess(e){return this.wire.sendAction("terminate-external-process",e).then((()=>{}))}updateProxySettings(e){return this.wire.sendAction("update-proxy",e).then((()=>{}))}async downloadAsset(e,t){const n=()=>{};let i=n,r=n;const o=new Promise(((e,t)=>{i=e,r=t}));if("openfin"!==this.wire.environment.type)throw new oe.NotSupportedError("downloadAsset only supported in an OpenFin Render process");const s=oe.RuntimeError.getCallSite(),a=this.wire.environment.getNextMessageId().toString(),c=`asset-download-progress-${a}`,d=`asset-download-error-${a}`,h=`asset-download-complete-${a}`,l=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},u=()=>{this.removeListener(c,l)};await Promise.all([this.on(c,l),this.once(d,(e=>{u();const{reason:t,err:n}=e;r(new oe.RuntimeError({reason:t,error:n},s))})),this.once(h,(()=>{u(),i()}))]);const p=Object.assign(e,{downloadId:a});return await this.wire.sendAction("download-asset",p).catch((e=>{throw u(),e})),o}downloadRuntime(e,t){const n=oe.RuntimeError.getCallSite();return new Promise(((i,r)=>{if("openfin"!==this.wire.environment.type)return void r(new oe.NotSupportedError("downloadRuntime only supported in an OpenFin Render process"));const o=this.wire.environment.getNextMessageId().toString(),s=`runtime-download-progress-${o}`,a=`runtime-download-error-${o}`,c=`runtime-download-complete-${o}`,d=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},h=()=>{this.removeListener(s,d)};this.on(s,d),this.once(a,(e=>{h();const{reason:t,err:i}=e;r(new oe.RuntimeError({reason:t,error:i},n))})),this.once(c,(()=>{h(),i()}));const l=Object.assign(e,{downloadId:o});this.wire.sendAction("download-runtime",l).catch((e=>{h(),r(e)}))}))}downloadPreloadScripts(e){return this.wire.sendAction("download-preload-scripts",{scripts:e}).then((({payload:e})=>e.data))}getAllExternalApplications(){return this.wire.sendAction("get-all-external-applications").then((({payload:e})=>e.data))}getAppAssetInfo(e){return this.wire.sendAction("get-app-asset-info",e).then((({payload:e})=>e.data))}getCookies(e){const t=this.wire.environment.getUrl(),n=Object.assign(e,{url:t});return this.wire.sendAction("get-cookies",n).then((({payload:e})=>e.data))}setMinLogLevel(e){return this.wire.sendAction("set-min-log-level",{level:e}).then((()=>{}))}resolveUuid(e){return this.wire.sendAction("resolve-uuid",{entityKey:e}).then((({payload:e})=>e.data))}executeOnRemote(e,t){return t.requestingIdentity=e,this.wire.ferryAction(t)}readRegistryValue(e,t,n){return this.wire.sendAction("read-registry-value",{rootKey:e,subkey:t,value:n}).then((({payload:e})=>e.data))}registerExternalConnection(e){return this.wire.sendAction("register-external-connection",{uuid:e}).then((({payload:e})=>e.data))}async getServiceConfiguration(e){if("string"!=typeof e.name)throw new Error("Must provide an object with a `name` property having a string value");const{name:t}=e;return this.wire.sendAction("get-service-configuration",{name:t}).then((({payload:e})=>e.data))}async getSystemAppConfig(e){if("string"!=typeof e)throw new Error("Must provide a string value for name of system app");return this.wire.sendAction("get-system-app-configuration",{name:e}).then((({payload:e})=>e.data))}async registerShutdownHandler(e){this.wire.sendAction("system-register-shutdown-handler").catch((e=>{}));const{uuid:t,name:n}=this.wire.me;this.on("system-shutdown",(i=>{e({proceed:()=>{this.wire.environment.raiseEvent("application/system-shutdown-handled",{uuid:t,name:n,topic:"application"})}})}))}runRvmHealthCheck(){return this.wire.sendAction("run-rvm-health-check").then((({payload:e})=>e.data))}async launchManifest(e,t={}){const{subscribe:n,...i}=t,r=i;if(n){const e=new ae.EventEmitter;n(e);const t="app-version-progress",i="runtime-status",o="app-version-complete",s="app-version-error",a=this.wire.environment.getNextMessageId().toString();r.appVersionId=a;const c=[o,t,i,s],d=e=>{const{appVersionId:t,topic:n,type:i,...r}=e;return{...r,type:c.find((e=>i.includes(e)))}},h=t=>{const n=d(t);e.emit(n.type,n)},l=()=>{this.removeListener(`${t}.${a}`,h),this.removeListener(`${i}.${a}`,h),this.removeListener(`${o}.${a}`,h),this.removeListener(`${s}.${a}`,h),this.removeListener(`${o}.${a}`,l),this.removeListener(`${s}.${a}`,l)};await Promise.all([this.on(`${t}.${a}`,h),this.on(`${i}.${a}`,h),this.once(`${o}.${a}`,h),this.once(`${s}.${a}`,h),this.once(`${o}.${a}`,l),this.once(`${s}.${a}`,l)])}return(await this.wire.sendAction("launch-manifest",{manifestUrl:e,opts:r})).payload.data.manifest}async queryPermissionForCurrentContext(e){const t={uuid:this.wire.me.uuid,name:this.wire.me.name};return(await this.wire.sendAction("query-permission-for-current-context",{apiName:e,identity:t})).payload.data}async enableNativeWindowIntegrationProvider(e){const{payload:t}=await this.wire.sendAction("enable-native-window-integration-provider",{permissions:e});return t.data}async registerUsage({data:e,type:t}){await this.wire.sendAction("register-usage",{data:e,type:t})}async getPrinters(){const{payload:e}=await this.wire.sendAction("system-get-printers");return e.data}async updateProcessLoggingOptions(e){await this.wire.sendAction("system-update-process-logging-options",{options:e})}async getDomainSettings(){const{payload:{data:e}}=await this.wire.sendAction("get-domain-settings",this.identity);return e}async setDomainSettings(e){await this.wire.sendAction("set-domain-settings",{domainSettings:e,...this.identity})}async refreshExtensions(){const{payload:e}=await this.wire.sendAction("refresh-extensions");return e.data}async getInstalledExtensions(){const{payload:e}=await this.wire.sendAction("get-installed-extensions");return e.data}}c.System=ce;var de={},he={};Object.defineProperty(he,"__esModule",{value:!0}),he.RefCounter=void 0;he.RefCounter=class{constructor(){this.topicRefMap=new Map}incRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t+1;n=i,this.topicRefMap.set(e,i)}else this.topicRefMap.set(e,1),n=1;return n}decRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t-1;this.topicRefMap.set(e,i),n=i}else n=-1;return n}actOnFirst(e,t,n){return 1===this.incRefCount(e)?t():n()}actOnLast(e,t,n){return 0===this.decRefCount(e)?t():n()}};var le={},ue={},pe={};Object.defineProperty(pe,"__esModule",{value:!0}),pe.ChannelBase=pe.ProtectedItems=void 0;const we=e=>async(t,n,i)=>{const r=await e(t,n,i);return void 0===r?n:r};pe.ProtectedItems=class{constructor(e,t){this.providerIdentity=e,this.close=t}};class ye{static defaultAction(e){throw new Error(`No action registered at target for ${e}`)}constructor(){this.subscriptions=new Map}async processAction(e,t,n){try{const i=this.subscriptions.has(e)?this.subscriptions.get(e):(t,n)=>(this.defaultAction??ye.defaultAction)(e,t,n),r=this.preAction?await this.preAction(e,t,n):t,o=await i(r,n);return this.postAction?await this.postAction(e,o,n):o}catch(t){if(this.errorMiddleware)return this.errorMiddleware(e,t,n);throw t}}beforeAction(e){if(this.preAction)throw new Error("Already registered beforeAction middleware");this.preAction=we(e)}onError(e){if(this.errorMiddleware)throw new Error("Already registered error middleware");this.errorMiddleware=e}afterAction(e){if(this.postAction)throw new Error("Already registered afterAction middleware");this.postAction=we(e)}remove(e){this.subscriptions.delete(e)}setDefaultAction(e){if(this.defaultAction)throw new Error("default action can only be set once");this.defaultAction=e}register(e,t){if(this.subscriptions.has(e))throw new Error(`Subscription already registered for action: ${e}. Unsubscribe before adding new subscription`);return this.subscriptions.set(e,t),!0}}pe.ChannelBase=ye;var fe,ge,me,ve=s&&s.__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)},Ce=s&&s.__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};Object.defineProperty(ue,"__esModule",{value:!0}),ue.ChannelClient=void 0;const be=pe,Ie=new Map;class Ee extends be.ChannelBase{static closeChannelByEndpointId(e){const t=Ie.get(e);t&&ve(t,me,"f").call(t)}static handleProviderDisconnect(e){for(const t of Ie.values())t.providerIdentity.channelId===e.channelId&&(t.disconnectListener(e),ve(t,me,"f").call(t))}constructor(e,t,n){super(),fe.set(this,void 0),ge.set(this,void 0),this.processAction=(e,t,n)=>super.processAction(e,t,n),me.set(this,(()=>{Ie.delete(this.endpointId),ve(this,ge,"f").close()})),Ce(this,fe,new be.ProtectedItems(e,t),"f"),this.disconnectListener=()=>{},this.endpointId=e.endpointId,Ce(this,ge,n,"f"),Ie.set(this.endpointId,this),n.receive(this.processAction)}get providerIdentity(){return ve(this,fe,"f").providerIdentity}async dispatch(e,t){if(ve(this,ge,"f").isEndpointConnected(this.providerIdentity.channelId))return ve(this,ge,"f").send(this.providerIdentity.channelId,e,t);throw new Error("The client you are trying to dispatch from is disconnected from the target provider.")}onDisconnection(e){this.disconnectListener=t=>{try{e(t)}catch(e){throw new Error(`Error while calling the onDisconnection callback: ${e.message}`)}finally{this.disconnectListener=()=>{}}}}async disconnect(){await this.sendDisconnectAction(),ve(this,me,"f").call(this)}async sendDisconnectAction(){const e=ve(this,fe,"f");await e.close()}static async wireClose(e,t,n){const{channelName:i,uuid:r,name:o}=t;await e.sendAction("disconnect-from-channel",{channelName:i,uuid:r,name:o,endpointId:n})}}ue.ChannelClient=Ee,fe=new WeakMap,ge=new WeakMap,me=new WeakMap;var xe={},Ae={};Object.defineProperty(Ae,"__esModule",{value:!0}),Ae.exhaustiveCheck=void 0,Ae.exhaustiveCheck=function(e,t){throw new Error(`Unsupported value: ${e}${t?`\n Supported values are: ${t.join("")}`:""}`)};var Pe,Me,_e,Oe={},Se=s&&s.__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},Re=s&&s.__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)};Object.defineProperty(Oe,"__esModule",{value:!0}),Oe.ClassicInfo=Oe.ClassicStrategy=void 0;Oe.ClassicStrategy=class{constructor(e,t,n,i){this.messageReceiver=t,this.endpointId=n,this.providerIdentity=i,Pe.set(this,void 0),Me.set(this,new Map),_e.set(this,new Map),this.send=async(e,t,n)=>{const i=Re(this,Me,"f").get(e);if(!i)throw new Error(`Could not locate routing info for endpoint ${e}`);const r={...i};r.isLocalEndpointId&&delete r.endpointId,delete r.isLocalEndpointId;const o=Re(this,Pe,"f").sendAction("send-channel-message",{...r,providerIdentity:this.providerIdentity,action:t,payload:n});Re(this,_e,"f").get(e)?.add(o);return(await o.catch((e=>{throw new Error(e.message)})).finally((()=>{Re(this,_e,"f").get(e)?.delete(o)}))).payload.data.result},this.close=async()=>{this.messageReceiver.removeEndpoint(this.providerIdentity.channelId,this.endpointId),[...Re(this,Me,"f").keys()].forEach((e=>this.closeEndpoint(e))),Se(this,Me,new Map,"f")},Se(this,Pe,e,"f")}onEndpointDisconnect(e,t){}receive(e){this.messageReceiver.addEndpoint(e,this.providerIdentity.channelId,this.endpointId)}async closeEndpoint(e){const t=Re(this,Me,"f").get(e);Re(this,Me,"f").delete(e);const n=Re(this,_e,"f").get(e);n?.forEach((n=>{const i=`Channel connection with identity uuid: ${t?.uuid} / name: ${t?.name} / endpointId: ${e} no longer connected.`;n.cancel(new Error(i))}))}isEndpointConnected(e){return Re(this,Me,"f").has(e)}addEndpoint(e,t){Re(this,Me,"f").set(e,t.endpointIdentity),Re(this,_e,"f").set(e,new Set)}isValidEndpointPayload(e){return"string"==typeof e?.endpointIdentity?.endpointId||"string"==typeof e?.endpointIdentity?.channelId}},Pe=new WeakMap,Me=new WeakMap,_e=new WeakMap,Oe.ClassicInfo={version:5,minimumVersion:0,type:"classic"};var Fe={},je={},ke={};Object.defineProperty(ke,"__esModule",{value:!0}),ke.errorToPOJO=void 0,ke.errorToPOJO=function(e){return{stack:e.stack,name:e.name,message:e.message,toString:()=>e.stack||e.toString()}};var Le,Te,$e=s&&s.__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)},Be=s&&s.__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};Object.defineProperty(je,"__esModule",{value:!0}),je.RTCEndpoint=void 0;const Ge=ke;je.RTCEndpoint=class{static isValidEndpointPayload(e){const t=e=>"object"==typeof e&&null!==e;return t(e)&&t(e.endpointIdentity)&&t(e.rtc)&&"string"==typeof e.endpointIdentity.endpointId}constructor({rtc:e,endpointIdentity:t}){this.responseMap=new Map,Le.set(this,null),Te.set(this,void 0),this.connectionStateChangeHandler=e=>{"connected"!==this.rtc.rtcClient.connectionState&&(this.rtc.rtcClient.removeEventListener("connectionstatechange",this.connectionStateChangeHandler),this.close(),$e(this,Te,"f")&&$e(this,Te,"f").call(this))},this.send=async(e,t)=>{const n=`message-${Math.random()}`,i=new Promise(((e,t)=>{this.responseMap.set(n,{resolve:e,reject:t})}));return this.rtc.channels.request.send(JSON.stringify({action:e,payload:t,messageId:n})),i},this.close=()=>{this.responseMap.forEach((e=>e.reject("Connection has closed."))),this.responseMap=new Map,this.rtc.channels.request.close(),this.rtc.channels.response.close(),this.rtc.rtcClient.close()},this.rtc=e,this.endpointIdentity=t,this.rtc.channels.response.addEventListener("message",(e=>{let{data:t}=e;e.data instanceof ArrayBuffer&&(t=(new TextDecoder).decode(e.data));const{messageId:n,payload:i,success:r,error:o}=JSON.parse(t),{resolve:s,reject:a}=this.responseMap.get(n)??{};s&&a?(this.responseMap.delete(n),r?s(i):a(o)):(console.log("Could not find id in responseMap."),console.log(e))})),this.rtc.channels.request.addEventListener("message",(async e=>{let{data:n}=e;e.data instanceof ArrayBuffer&&(n=(new TextDecoder).decode(e.data));const{messageId:i,action:r,payload:o}=JSON.parse(n);if($e(this,Le,"f"))try{const e=await $e(this,Le,"f").call(this,r,o,t);this.rtc.channels.response.send(JSON.stringify({messageId:i,payload:e,success:!0}))}catch(e){"open"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,error:(0,Ge.errorToPOJO)(e),success:!1}))}else"open"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,success:!1,error:"Connection not ready."}))})),this.rtc.rtcClient.addEventListener("connectionstatechange",this.connectionStateChangeHandler),Object.values(this.rtc.channels).forEach((e=>{e.onclose=e=>{[...this.responseMap.values()].forEach((e=>e.reject(new Error("RTCDataChannel closed unexpectedly, this is most commonly caused by message size. Note: RTC Channels have a message size limit of ~255kB.")))),this.close(),$e(this,Te,"f")&&$e(this,Te,"f").call(this)}}))}onDisconnect(e){if($e(this,Te,"f"))throw new Error("RTCEndpoint disconnectListener cannot be set twice.");Be(this,Te,e,"f")}receive(e){if($e(this,Le,"f"))throw new Error("You have already set a listener for this RTC Endpoint.");Be(this,Le,e,"f")}get connected(){return"connected"===this.rtc.rtcClient.connectionState}},Le=new WeakMap,Te=new WeakMap;var We,He,Ne,De={},Ue=s&&s.__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)},Ve=s&&s.__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};Object.defineProperty(De,"__esModule",{value:!0}),De.EndpointStrategy=void 0;De.EndpointStrategy=class{constructor(e,t,n){this.EndpointType=e,this.StrategyName=n,We.set(this,null),He.set(this,new Map),Ne.set(this,!0),this.send=async(e,t,n)=>this.getEndpointById(e).send(t,n),this.close=async()=>{Ue(this,Ne,"f")&&(Ue(this,He,"f").forEach((e=>e.close())),Ve(this,He,new Map,"f")),Ve(this,Ne,!1,"f")},this.isValidEndpointPayload=t}onEndpointDisconnect(e,t){this.getEndpointById(e).onDisconnect(t)}receive(e){if(Ue(this,We,"f"))throw new Error(`You have already set a listener for this ${this.StrategyName} Strategy`);Ve(this,We,e,"f"),Ue(this,He,"f").forEach((e=>e.receive(Ue(this,We,"f"))))}getEndpointById(e){const t=Ue(this,He,"f").get(e);if(!t)throw new Error(`Client with endpoint id ${e} is not connected`);return t}get connected(){return Ue(this,Ne,"f")}isEndpointConnected(e){return Ue(this,He,"f").has(e)}addEndpoint(e,t){if(!Ue(this,Ne,"f"))return void console.warn(`Adding endpoint to disconnected ${this.StrategyName} Strategy`);const n=new this.EndpointType(t);Ue(this,We,"f")&&n.receive(Ue(this,We,"f")),Ue(this,He,"f").set(e,n)}async closeEndpoint(e){Ue(this,He,"f").delete(e)}},We=new WeakMap,He=new WeakMap,Ne=new WeakMap,Object.defineProperty(Fe,"__esModule",{value:!0}),Fe.RTCInfo=Fe.RTCStrategy=void 0;const ze=je,Ke=De;class qe extends Ke.EndpointStrategy{constructor(){super(ze.RTCEndpoint,ze.RTCEndpoint.isValidEndpointPayload,"RTC")}}Fe.RTCStrategy=qe,Fe.RTCInfo={version:2,minimumVersion:0,type:"rtc"};var Je={};Object.defineProperty(Je,"__esModule",{value:!0}),Je.RTCICEManager=void 0;const Ye=d;class Ze extends Ye.EmitterBase{constructor(e){super(e,"channel"),this.ensureChannelOpened=e=>new Promise(((t,n)=>{if("open"===e.readyState)t();else if("connecting"===e.readyState){const n=()=>{e.removeEventListener("open",n),t()};e.addEventListener("open",n)}else n(new Error("This Channel has already closed"))}))}static createDataChannelPromise(e,t){let n;const i=new Promise((e=>{n=e})),r=i=>{const o=()=>{i.channel.removeEventListener("open",o),n(i.channel)};i.channel.label===e&&(i.channel.addEventListener("open",o),t.removeEventListener("datachannel",r))};return t.addEventListener("datachannel",r),i}async listenForProviderIce(e,t){await this.on(this.createProviderEventName(e),t,{timestamp:Date.now()})}async raiseProviderIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createProviderEventName(e)),t)}async listenForClientIce(e,t){await this.on(this.createClientEventName(e),t,{timestamp:Date.now()})}async raiseClientIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createClientEventName(e)),t)}cleanupIceListeners(e){this.removeAllListeners(this.createClientEventName(e)),this.removeAllListeners(this.createProviderEventName(e))}createClientEventName(e){return`ice-client-${e}`}createProviderEventName(e){return`ice-provider-${e}`}createRouteString(e){return`channel/${e}`}createRtcPeer(){return this.wire.environment.getRtcPeer()}async startClientOffer(){const e=Math.random().toString(),t=this.createRtcPeer();t.addEventListener("icecandidate",(async t=>{t.candidate&&await this.raiseClientIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForProviderIce(e,(async e=>{await t.addIceCandidate(e.candidate)}));const n={request:t.createDataChannel("request"),response:t.createDataChannel("response")},i=await t.createOffer();await t.setLocalDescription(i);const r=Promise.all([n.request,n.response].map(this.ensureChannelOpened)).then((()=>{}));return{rtcClient:t,channels:n,offer:i,rtcConnectionId:e,channelsOpened:r}}async finishClientOffer(e,t,n){return await e.setRemoteDescription(t),await n,!0}async createProviderAnswer(e,t){const n=this.createRtcPeer(),i=Ze.createDataChannelPromise("request",n),r=Ze.createDataChannelPromise("response",n);n.addEventListener("icecandidate",(async t=>{t.candidate&&await this.raiseProviderIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForClientIce(e,(async e=>{await n.addIceCandidate(e.candidate)})),await n.setRemoteDescription(t);const o=await n.createAnswer();await n.setLocalDescription(o);const s=Promise.all([i,r]).then((([t,n])=>(this.cleanupIceListeners(e),{request:t,response:n})));return{rtcClient:n,answer:o,channels:s}}}Je.RTCICEManager=Ze;var Qe={},Xe={};function et(e){return[...e.split(".").reverse().entries()].reduce(((e,[t,n])=>e+ +n*1e4**t),0)}function tt(e,t){return et(e)>=et(t)}function nt(e){return e.split("/")[0]}Object.defineProperty(Xe,"__esModule",{value:!0}),Xe.runtimeUuidMeetsMinimumRuntimeVersion=Xe.parseRuntimeUuid=Xe.meetsMinimumRuntimeVersion=void 0,Xe.meetsMinimumRuntimeVersion=tt,Xe.parseRuntimeUuid=nt,Xe.runtimeUuidMeetsMinimumRuntimeVersion=function(e,t){return tt(nt(e),t)};var it,rt,ot,st,at,ct=s&&s.__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)},dt=s&&s.__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};Object.defineProperty(Qe,"__esModule",{value:!0}),Qe.ChannelProvider=void 0;const ht=pe,lt=Xe;class ut extends ht.ChannelBase{get connections(){return[...ct(this,it,"f")]}static handleClientDisconnection(e,t){const n=e.connections.find((e=>e.endpointId===t.endpointId));if(n)ct(e,st,"f").call(e,n);else{e.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name)).forEach(ct(e,st,"f"))}e.disconnectListener(t)}static setProviderRemoval(e,t){ut.removalMap.set(e,t)}constructor(e,t,n){super(),it.set(this,void 0),rt.set(this,void 0),ot.set(this,void 0),st.set(this,(e=>{const t=this.connections.filter((t=>t.endpointId!==e.endpointId));ct(this,ot,"f").closeEndpoint(e.endpointId),dt(this,it,t,"f")})),this.processAction=async(e,t,n)=>(ut.clientIsMultiRuntime(n)&&!(0,lt.runtimeUuidMeetsMinimumRuntimeVersion)(n.runtimeUuid,"18.87.56.0")?this.handleMultiRuntimeLegacyClient(n):this.checkForClientConnection(n),super.processAction(e,t,n)),at.set(this,(()=>{ct(this,ot,"f").close();const e=ut.removalMap.get(this);e&&e()})),dt(this,rt,new ht.ProtectedItems(e,t),"f"),this.connectListener=()=>{},this.disconnectListener=()=>{},dt(this,it,[],"f"),dt(this,ot,n,"f"),n.receive(this.processAction)}dispatch(e,t,n){const i=e.endpointId??this.getEndpointIdForOpenFinId(e,t);return i&&ct(this,ot,"f").isEndpointConnected(i)?ct(this,ot,"f").send(i,t,n):Promise.reject(new Error(`Client connection with identity uuid: ${e.uuid} / name: ${e.name} / endpointId: ${i} no longer connected.`))}async processConnection(e,t){return ct(this,it,"f").push(e),this.connectListener(e,t)}publish(e,t){return this.connections.map((n=>ct(this,ot,"f").send(n.endpointId,e,t)))}onConnection(e){this.connectListener=e}onDisconnection(e){this.disconnectListener=e}async destroy(){const e=ct(this,rt,"f");e.providerIdentity,dt(this,it,[],"f"),await e.close(),ct(this,at,"f").call(this)}async getAllClientInfo(){return this.connections.map((e=>{const{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}=e;return{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}}))}checkForClientConnection(e){if(!this.isClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider.\n Client Identity: {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}isClientConnected(e){return ut.clientIdentityIncludesEndpointId(e)?this.connections.some((t=>t.endpointId===e.endpointId&&t.uuid===e.uuid&&t.name===e.name)):this.isLegacyClientConnected(e)}isLegacyClientConnected(e){return this.connections.some((t=>t.uuid===e.uuid&&t.name===e.name))}handleMultiRuntimeLegacyClient(e){if(!this.isLegacyClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider. Client Identity:\n {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}getEndpointIdForOpenFinId(e,t){const n=this.connections.filter((t=>t.name===e.name&&t.uuid===e.uuid));if(n.length>=2){const n=ct(this,rt,"f"),{uuid:i,name:r}=e,o=n?.providerIdentity.uuid,s=n?.providerIdentity.name;console.warn(`WARNING: Dispatch call may have unintended results. The "to" argument of your dispatch call is missing the\n "endpointId" parameter. The identity you are dispatching to ({uuid: ${i}, name: ${r}})\n has multiple channelClients for this channel. Your dispatched action: (${t}) from the provider:\n ({uuid: ${o}, name: ${s}}) will only be processed by the most recently-created client.`)}return n.pop()?.endpointId}static clientIdentityIncludesEndpointId(e){return void 0!==e.endpointId}static clientIsMultiRuntime(e){return void 0!==e.runtimeUuid}static async wireClose(e,t){await e.sendAction("destroy-channel",{channelName:t})}}Qe.ChannelProvider=ut,it=new WeakMap,rt=new WeakMap,ot=new WeakMap,st=new WeakMap,at=new WeakMap,ut.removalMap=new WeakMap;var pt={};Object.defineProperty(pt,"__esModule",{value:!0}),pt.MessageReceiver=void 0;const wt=ue,yt=d;class ft extends yt.Base{constructor(e){super(e),this.onmessage=e=>"process-channel-message"===e.action&&(this.processChannelMessage(e),!0),this.endpointMap=new Map,this.latestEndpointIdByChannelId=new Map,e.registerMessageHandler(this.onmessage.bind(this))}async processChannelMessage(e){const{senderIdentity:t,providerIdentity:n,action:i,ackToSender:r,payload:o,intendedTargetIdentity:s}=e.payload,a=s.channelId??s.endpointId??this.latestEndpointIdByChannelId.get(n.channelId),c=this.endpointMap.get(a);if(!c)return r.payload.success=!1,r.payload.reason=`Client connection with identity uuid: ${this.wire.me.uuid} / name: ${this.wire.me.name} / endpointId: ${a} no longer connected.`,this.wire.sendRaw(r);try{const e=await c(i,o,t);return r.payload.payload=r.payload.payload||{},r.payload.payload.result=e,this.wire.sendRaw(r)}catch(e){return r.payload.success=!1,r.payload.reason=e.message,this.wire.sendRaw(r)}}addEndpoint(e,t,n){this.endpointMap.set(n,e),t!==n&&this.latestEndpointIdByChannelId.set(t,n)}removeEndpoint(e,t){this.endpointMap.delete(t),this.latestEndpointIdByChannelId.get(e)===t&&this.latestEndpointIdByChannelId.delete(e)}checkForPreviousClientConnection(e){const t=this.latestEndpointIdByChannelId.get(e);t&&(wt.ChannelClient.closeChannelByEndpointId(t),console.warn("You have created a second connection to an older provider. First connection has been removed from the clientMap"),console.warn("If the provider calls publish(), you may receive multiple messages."))}}pt.MessageReceiver=ft;var gt={};Object.defineProperty(gt,"__esModule",{value:!0}),gt.ProtocolManager=void 0;gt.ProtocolManager=class{constructor(e){this.ProtocolsInPreferenceOrder=e,this.DefaultClientProtocols=["classic"],this.DefaultProviderProtocols=["classic"],this.getClientProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultClientProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(", ")}.`);return t},this.getProviderProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultProviderProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(", ")}.`);return t},this.getCompatibleProtocols=(e,t)=>t.supportedProtocols.filter((t=>e.some((e=>e.type===t.type&&t.version>=e.minimumVersion&&e.version>=(t.minimumVersion??0))))).slice(0,t.maxProtocols)}};var mt={};Object.defineProperty(mt,"__esModule",{value:!0});class vt{static combine(e,t){return new vt(e,t)}constructor(e,t){this.primary=e,this.secondary=t}onEndpointDisconnect(e,t){this.primary.onEndpointDisconnect(e,(()=>{this.secondary.isEndpointConnected(e)||t()})),this.secondary.onEndpointDisconnect(e,(()=>{this.primary.isEndpointConnected(e)||t()}))}isValidEndpointPayload(e){return this.primary.isValidEndpointPayload(e)||this.secondary.isValidEndpointPayload(e)}async closeEndpoint(e){await this.primary.closeEndpoint(e),await this.secondary.closeEndpoint(e)}isEndpointConnected(e){return this.primary.isEndpointConnected(e)||this.secondary.isEndpointConnected(e)}async addEndpoint(e,t){this.primary.isValidEndpointPayload(t)&&await this.primary.addEndpoint(e,t),this.secondary.isValidEndpointPayload(t)&&await this.secondary.addEndpoint(e,t)}receive(e){this.primary.receive(e),this.secondary.receive(e)}send(e,t,n){return this.primary.isEndpointConnected(e)?this.primary.send(e,t,n):this.secondary.send(e,t,n)}async close(){await Promise.all([this.primary.close(),this.secondary.close()])}}mt.default=vt;var Ct,bt,It=s&&s.__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},Et=s&&s.__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)},xt=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(xe,"__esModule",{value:!0}),xe.ConnectionManager=void 0;const At=Ae,Pt=d,Mt=Oe,_t=Fe,Ot=Je,St=Qe,Rt=pt,Ft=gt,jt=xt(mt);class kt extends Pt.Base{static getProtocolOptionsFromStrings(e){return e.map((e=>{switch(e){case"rtc":return _t.RTCInfo;case"classic":return Mt.ClassicInfo;default:return(0,At.exhaustiveCheck)(e,["rtc","classic"])}}))}constructor(e){super(e),Ct.set(this,void 0),bt.set(this,void 0),this.removeChannelFromProviderMap=e=>{this.providerMap.delete(e)},this.onmessage=e=>"process-channel-connection"===e.action&&(this.processChannelConnection(e),!0),this.providerMap=new Map,this.protocolManager=new Ft.ProtocolManager("node"===this.wire.environment.type?["classic"]:["rtc","classic"]),It(this,Ct,new Rt.MessageReceiver(e),"f"),It(this,bt,new Ot.RTCICEManager(e),"f"),e.registerMessageHandler(this.onmessage.bind(this))}createProvider(e,t){const n=Object.assign(this.wire.environment.getDefaultChannelOptions().create,e||{}),i=this.protocolManager.getProviderProtocols(n?.protocols),r=i.map((e=>{switch(e){case"rtc":return new _t.RTCStrategy;case"classic":return new Mt.ClassicStrategy(this.wire,Et(this,Ct,"f"),t.channelId,t);default:return(0,At.exhaustiveCheck)(e,["rtc","classic"])}}));let o;if(2===r.length){const[e,t]=r;o=jt.default.combine(e,t)}else{if(1!==r.length)throw new Error("failed to combine strategies");[o]=r}const s=new St.ChannelProvider(t,(()=>St.ChannelProvider.wireClose(this.wire,t.channelName)),o),a=t.channelId;return this.providerMap.set(a,{provider:s,strategy:o,supportedProtocols:kt.getProtocolOptionsFromStrings(i)}),St.ChannelProvider.setProviderRemoval(s,this.removeChannelFromProviderMap.bind(this)),s}async createClientOffer(e){const t=this.protocolManager.getClientProtocols(e?.protocols);let n;return{offer:{supportedProtocols:await Promise.all(t.map((async e=>{switch(e){case"rtc":{const{rtcClient:e,channels:t,offer:i,rtcConnectionId:r,channelsOpened:o}=await Et(this,bt,"f").startClientOffer();return n={rtcClient:e,channels:t,channelsOpened:o},{type:"rtc",version:_t.RTCInfo.version,payload:{offer:i,rtcConnectionId:r}}}case"classic":return{type:"classic",version:Mt.ClassicInfo.version};default:return(0,At.exhaustiveCheck)(e,["rtc","classic"])}}))),maxProtocols:2},rtc:n}}async createClientStrategy(e,t){t.endpointId||(t.endpointId=this.wire.environment.getNextMessageId(),Et(this,Ct,"f").checkForPreviousClientConnection(t.channelId));const n=t.answer??{supportedProtocols:[{type:"classic",version:1}]},i=(await Promise.all(n.supportedProtocols.map((async n=>"rtc"===n.type&&e?(await Et(this,bt,"f").finishClientOffer(e.rtcClient,n.payload.answer,e.channelsOpened),new _t.RTCStrategy):"classic"===n.type?new Mt.ClassicStrategy(this.wire,Et(this,Ct,"f"),t.endpointId,t):null)))).filter((e=>null!==e));let r;if(e&&!i.some((e=>e instanceof _t.RTCStrategy))&&e&&e.rtcClient.close(),i.length>=2)r=jt.default.combine(i[0],i[1]);else{if(!i.length)throw new Error("No compatible protocols");[r]=i}const o={endpointIdentity:t,rtc:e};return r.addEndpoint(t.channelId,o),r}async processChannelConnection(e){const{clientIdentity:t,providerIdentity:n,ackToSender:i,payload:r,offer:o}=e.payload;t.endpointId?t.isLocalEndpointId=!1:(t.endpointId=this.wire.environment.getNextMessageId(),t.isLocalEndpointId=!0);const s=n.channelId,a=this.providerMap.get(s);if(!a)return i.payload.success=!1,i.payload.reason=`Channel "${n.channelName}" has been destroyed.`,this.wire.sendRaw(i);const{provider:c,strategy:d,supportedProtocols:h}=a;try{if(!(c instanceof St.ChannelProvider))throw Error("Cannot connect to a channel client");const e=o??{supportedProtocols:[{type:"classic",version:1}],maxProtocols:1},n=this.protocolManager.getCompatibleProtocols(h,e);if(!n.length)throw new Error("This provider does not support any of the offered protocols.");const s=await c.processConnection(t,r);i.payload.payload=i.payload.payload||{};let a={supportedProtocols:[],endpointPayloadPromise:Promise.resolve({endpointIdentity:t})};return a=await n.reduce((async(e,t)=>{const n=await e;if("rtc"===t.type){const{answer:e,rtcClient:i,channels:r}=await Et(this,bt,"f").createProviderAnswer(t.payload.rtcConnectionId,t.payload.offer);n.supportedProtocols.push({type:"rtc",version:_t.RTCInfo.version,payload:{answer:e}}),n.endpointPayloadPromise=n.endpointPayloadPromise.then((e=>r.then((t=>({...e,rtc:{rtcClient:i,channels:t}})))))}else n.supportedProtocols.push({type:"classic",version:Mt.ClassicInfo.version});return n}),Promise.resolve(a)),a.endpointPayloadPromise.then((e=>d.addEndpoint(t.endpointId,e))),i.payload.payload.result=s,i.payload.payload.answer=a,this.wire.sendRaw(i)}catch(e){return i.payload.success=!1,i.payload.reason=e.message,this.wire.sendRaw(i)}}}xe.ConnectionManager=kt,Ct=new WeakMap,bt=new WeakMap;var Lt,Tt,$t,Bt=s&&s.__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},Gt=s&&s.__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)};Object.defineProperty(le,"__esModule",{value:!0}),le.Channel=void 0;const Wt=t,Ht=G,Nt=d,Dt=ue,Ut=xe,Vt=Qe;function zt(e){const t=Math.floor(e/10),n=Math.min(3e4,500*2**t);return new Promise((e=>{setTimeout((()=>{e(!1)}),n)}))}class Kt extends Nt.EmitterBase{constructor(e){super(e,"channel"),Lt.set(this,void 0),Tt.set(this,new Wt.EventEmitter),$t.set(this,new Ht.AsyncRetryableLazy((async()=>{await Promise.all([this.on("disconnected",(e=>{Dt.ChannelClient.handleProviderDisconnect(e)})),this.on("connected",((...e)=>{Gt(this,Tt,"f").emit("connected",...e)}))]).catch((()=>new Error("error setting up channel connection listeners")))}))),Bt(this,Lt,new Ut.ConnectionManager(e),"f")}async getAllChannels(){return this.wire.sendAction("get-all-channels").then((({payload:e})=>e.data))}async onChannelConnect(e){await this.on("connected",e)}async onChannelDisconnect(e){await this.on("disconnected",e)}async safeConnect(e,t,n){const i={count:0};do{let r=()=>{};const o=new Promise((t=>{r=n=>{e===n.channelName&&t(!0)},Gt(this,Tt,"f").on("connected",r)}));try{if(i.count>0){i.gotConnectedEvent=await Promise.race([zt(i.count),o]);const t=await this.wire.sendAction("connect-to-channel",{...n,retryInfo:i});return console.log(`Successfully connected to channelName: ${e}`),t.payload.data}const t=this.wire.sendAction("connect-to-channel",n);i.originalMessageId=t.messageId;return(await t).payload.data}catch(n){if(!n.message.includes("internal-nack"))throw n;t&&0===i.count&&console.warn(`No channel found for channelName: ${e}. Waiting for connection...`)}finally{i.count+=1,Gt(this,Tt,"f").removeListener("connected",r)}}while(t);throw new Error(`No channel found for channelName: ${e}.`)}async connect(e,t={}){if(await Gt(this,$t,"f").getValue(),!e||"string"!=typeof e)throw new Error("Please provide a channelName string to connect to a channel.");const n={wait:!0,...this.wire.environment.getDefaultChannelOptions().connect,...t},{offer:i,rtc:r}=await Gt(this,Lt,"f").createClientOffer(n);let o;(this.fin.me.isFrame||this.fin.me.isView||this.fin.me.isWindow)&&(o=(await this.fin.me.getInfo()).url);const s={channelName:e,...n,offer:i,connectionUrl:o},a=await this.safeConnect(e,n.wait,s),c=await Gt(this,Lt,"f").createClientStrategy(r,a),d=new Dt.ChannelClient(a,(()=>Dt.ChannelClient.wireClose(this.wire,a,a.endpointId)),c);return c.onEndpointDisconnect(a.channelId,(async()=>{try{await d.sendDisconnectAction()}catch(e){console.warn(`Something went wrong during disconnect for client with uuid: ${a.uuid} / name: ${a.name} / endpointId: ${a.endpointId}.`)}finally{Dt.ChannelClient.handleProviderDisconnect(a)}})),d}async create(e,t){if(!e)throw new Error("Please provide a channelName to create a channel");const{payload:{data:n}}=await this.wire.sendAction("create-channel",{channelName:e}),i=Gt(this,Lt,"f").createProvider(t,n);return this.on("client-disconnected",(t=>{t.channelName===e&&Vt.ChannelProvider.handleClientDisconnection(i,t)})),i}}le.Channel=Kt,Lt=new WeakMap,Tt=new WeakMap,$t=new WeakMap,Object.defineProperty(de,"__esModule",{value:!0}),de.InterAppPayload=de.InterApplicationBus=void 0;const qt=t,Jt=d,Yt=he,Zt=le,Qt=O;class Xt extends Jt.Base{constructor(e){super(e),this.events={subscriberAdded:"subscriber-added",subscriberRemoved:"subscriber-removed"},this.refCounter=new Yt.RefCounter,this.Channel=new Zt.Channel(e),this.emitter=new qt.EventEmitter,e.registerMessageHandler(this.onmessage.bind(this)),this.on=this.emitter.on.bind(this.emitter),this.removeAllListeners=this.emitter.removeAllListeners.bind(this.emitter)}async publish(e,t){await this.wire.sendAction("publish-message",{topic:e,message:t,sourceWindowName:this.me.name})}async send(e,t,n){const i=(0,Qt.validateIdentity)(e);if(i)throw new Error(i);await this.wire.sendAction("send-message",{destinationUuid:e.uuid,destinationWindowName:e.name,topic:t,message:n,sourceWindowName:this.me.name})}subscribe(e,t,n){const i=this.createSubscriptionKey(e.uuid,e.name||"*",t);return this.emitter.on(i,n),this.refCounter.actOnFirst(i,(async()=>{await this.wire.sendAction("subscribe",{sourceUuid:e.uuid,sourceWindowName:e.name||"*",topic:t,destinationWindowName:this.me.name})}),(()=>Promise.resolve()))}unsubscribe(e,t,n){const i=e.name||"*",r=this.createSubscriptionKey(e.uuid,i,t);return this.emitter.removeListener(r,n),this.refCounter.actOnLast(r,(async()=>{await this.wire.sendAction("unsubscribe",{sourceUuid:e.uuid,sourceWindowName:i,topic:t,destinationWindowName:this.me.name})}),(()=>new Promise((e=>e)).then((()=>{}))))}processMessage(e){const{payload:{message:t,sourceWindowName:n,sourceUuid:i,topic:r}}=e,o=[this.createSubscriptionKey(i,n,r),this.createSubscriptionKey(i,"*",r),this.createSubscriptionKey("*","*",r)],s={uuid:i,name:n};o.forEach((e=>{this.emitter.emit(e,t,s)}))}emitSubscriverEvent(e,t){const{payload:{targetName:n,uuid:i,topic:r}}=t,o={name:n,uuid:i,topic:r};this.emitter.emit(e,o)}createSubscriptionKey(e,t,n){const i=t||"*";if(!(e&&i&&n))throw new Error("Missing uuid, name, or topic string");return function(...e){return e.map((e=>Buffer.from(`${e}`).toString("base64"))).join("/")}(e,i,n)}onmessage(e){const{action:t}=e;switch(t){case"process-message":this.processMessage(e);break;case this.events.subscriberAdded:this.emitSubscriverEvent(this.events.subscriberAdded,e);break;case this.events.subscriberRemoved:this.emitSubscriverEvent(this.events.subscriberRemoved,e)}return!0}}de.InterApplicationBus=Xt;de.InterAppPayload=class{};var en={};Object.defineProperty(en,"__esModule",{value:!0}),en.Clipboard=void 0;const tn=d;class nn extends tn.Base{async writeText(e){await this.wire.sendAction("clipboard-write-text",e)}async readText(e){const{payload:t}=await this.wire.sendAction("clipboard-read-text",{type:e});return t.data}async writeImage(e){await this.wire.sendAction("clipboard-write-image",e)}async readImage(e={format:"dataURL"}){const{payload:t}=await this.wire.sendAction("clipboard-read-image",e);return t.data}async writeHtml(e){await this.wire.sendAction("clipboard-write-html",e)}async readHtml(e){const{payload:t}=await this.wire.sendAction("clipboard-read-html",{type:e});return t.data}async writeRtf(e){await this.wire.sendAction("clipboard-write-rtf",e)}async readRtf(e){const{payload:t}=await this.wire.sendAction("clipboard-read-rtf",{type:e});return t.data}async write(e){await this.wire.sendAction("clipboard-write",e)}async getAvailableFormats(e){const{payload:t}=await this.wire.sendAction("clipboard-read-formats",{type:e});return t.data}}en.Clipboard=nn;var rn={},on={},sn={};Object.defineProperty(sn,"__esModule",{value:!0}),sn.ExternalApplication=void 0;const an=d;class cn extends an.EmitterBase{constructor(e,t){super(e,"external-application",t.uuid),this.identity=t}getInfo(){return this.wire.sendAction("get-external-application-info",this.identity).then((({payload:e})=>e.data))}}sn.ExternalApplication=cn,Object.defineProperty(on,"__esModule",{value:!0}),on.ExternalApplicationModule=void 0;const dn=d,hn=sn;class ln extends dn.Base{wrap(e){return this.wire.sendAction("external-application-wrap").catch((e=>{})),Promise.resolve(new hn.ExternalApplication(this.wire,{uuid:e}))}wrapSync(e){return this.wire.sendAction("external-application-wrap-sync").catch((e=>{})),new hn.ExternalApplication(this.wire,{uuid:e})}}on.ExternalApplicationModule=ln,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(on,e),n(sn,e)}(rn);var un={},pn={},wn={};Object.defineProperty(wn,"__esModule",{value:!0}),wn._Frame=void 0;const yn=d;class fn extends yn.EmitterBase{constructor(e,t){super(e,"frame",t.uuid,t.name),this.identity=t}getInfo(){return this.wire.sendAction("get-frame-info",this.identity).then((({payload:e})=>e.data))}getParentWindow(){return this.wire.sendAction("get-parent-window",this.identity).then((({payload:e})=>e.data))}}wn._Frame=fn,Object.defineProperty(pn,"__esModule",{value:!0}),pn._FrameModule=void 0;const gn=d,mn=O,vn=wn;class Cn extends gn.Base{async wrap(e){this.wire.sendAction("frame-wrap").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}wrapSync(e){this.wire.sendAction("frame-wrap-sync").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}getCurrent(){return this.wire.sendAction("frame-get-current").catch((e=>{})),Promise.resolve(new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity()))}getCurrentSync(){return this.wire.sendAction("frame-get-current-sync").catch((e=>{})),new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity())}}pn._FrameModule=Cn,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(pn,e),n(wn,e)}(un);var bn={};Object.defineProperty(bn,"__esModule",{value:!0}),bn.GlobalHotkey=void 0;const In=d;class En extends In.EmitterBase{constructor(e){super(e,"global-hotkey")}async register(e,t){await this.on(e,t),await this.wire.sendAction("global-hotkey-register",{hotkey:e})}async unregister(e){await this.removeAllListeners(e),await this.wire.sendAction("global-hotkey-unregister",{hotkey:e})}async unregisterAll(){await Promise.all(this.eventNames().filter((e=>!("registered"===e||"unregistered"===e))).map((e=>this.removeAllListeners(e)))),await this.wire.sendAction("global-hotkey-unregister-all",{})}async isRegistered(e){const{payload:{data:t}}=await this.wire.sendAction("global-hotkey-is-registered",{hotkey:e});return t}}bn.GlobalHotkey=En;var xn,An={},Pn={},Mn={},_n=s&&s.__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)};Object.defineProperty(Mn,"__esModule",{value:!0}),Mn.Platform=void 0;const On=d,Sn=O,Rn=new Map;class Fn extends On.EmitterBase{constructor(e,t){super(t.wire,"application",e.uuid),this.getClient=e=>{this.wire.sendAction("platform-get-client",this.identity).catch((e=>{}));const t=e||this.identity,{uuid:n}=t;if(!Rn.has(n)){const e=_n(this,xn,"f").call(this,n);Rn.set(n,e)}return Rn.get(n)},xn.set(this,(async e=>{try{const t=`custom-frame-${e}`,n=await this._channel.connect(t,{wait:!1});return n.onDisconnection((()=>{Rn.delete(e)})),n}catch(t){throw Rn.delete(e),new Error("The targeted Platform is not currently running. Listen for application-started event for the given Uuid.")}})),this.launchLegacyManifest=this.launchContentManifest;const n=(0,Sn.validateIdentity)(e);if(n)throw new Error(n);this._channel=t,this.identity={uuid:e.uuid},this.Layout=this.fin.Platform.Layout,this.Application=this.fin.Application.wrapSync(this.identity)}async createView(e,t,n){this.wire.sendAction("platform-create-view",this.identity).catch((e=>{}));const i=await this.getClient(),r=await i.dispatch("create-view",{target:t,opts:e,targetView:n});if(!r||(0,Sn.validateIdentity)(r.identity))throw new Error(`When overwriting the createView call, please return an object that has a valid 'identity' property: ${JSON.stringify(r)}`);return this.fin.View.wrapSync(r.identity)}async createWindow(e){this.wire.sendAction("platform-create-window",this.identity).catch((e=>{}));const t=await this.getClient();e.reason||(e.reason="api-call");const n=await t.dispatch("create-view-container",e);if(!n||(0,Sn.validateIdentity)(n.identity))throw new Error(`When overwriting the createWindow call, please return an object that has a valid 'identity' property: ${JSON.stringify(n)}`);const{identity:i}=n,r=this.fin.Window.wrapSync(i);return r.name=i.name,r.uuid=i.uuid,r}async quit(){this.wire.sendAction("platform-quit",this.identity).catch((e=>{}));return(await this.getClient()).dispatch("quit")}async closeView(e){this.wire.sendAction("platform-close-view",this.identity).catch((e=>{}));const t=await this.getClient();await t.dispatch("close-view",{view:e})}async reparentView(e,t){console.warn("Platform.reparentView has been deprecated, please use Platform.createView"),this.wire.sendAction("platform-reparent-view",this.identity).catch((e=>{}));const n={...e,uuid:e.uuid??this.identity.uuid},i=await this.fin.View.wrap(n),r=await i.getOptions();return this.createView(r,t)}async getSnapshot(){this.wire.sendAction("platform-get-snapshot",this.identity).catch((e=>{}));return(await this.getClient()).dispatch("get-snapshot")}async getViewSnapshot(e){return(await this.getClient()).dispatch("get-view-snapshot",{viewIdentity:e})}async applySnapshot(e,t){this.wire.sendAction("platform-apply-snapshot",this.identity).catch((e=>{}));const n="Requested snapshot must be a valid Snapshot object, or a url or filepath to such an object.";let i;if("string"==typeof e)try{i=(await this._channel.wire.sendAction("get-application-manifest",{manifestUrl:e})).payload.data}catch(e){throw new Error(`${n}: ${e}`)}else i=e;if(!i.windows)throw new Error(n);const r=await this.getClient();return await r.dispatch("apply-snapshot",{snapshot:i,options:t}),this}async fetchManifest(e){return(await this.getClient()).dispatch("platform-fetch-manifest",{manifestUrl:e})}async launchContentManifest(e){this.wire.sendAction("platform-launch-content-manifest",this.identity).catch((()=>{}));const t=await this.getClient(),n=await this.fetchManifest(e);return t.dispatch("launch-into-platform",{manifest:n,manifestUrl:e}),this}async setWindowContext(e={},t){if(this.wire.sendAction("platform-set-window-context",this.identity).catch((e=>{})),!e)throw new Error("Please provide a serializable object or string to set the context.");const n=await this.getClient(),{entityType:i}=t?await this.fin.System.getEntityInfo(t.uuid,t.name):this.fin.me;await n.dispatch("set-window-context",{context:e,entityType:i,target:t||{uuid:this.fin.me.uuid,name:this.fin.me.name}})}async getWindowContext(e){this.wire.sendAction("platform-get-window-context",this.identity).catch((e=>{}));const t=await this.getClient(),{entityType:n}=e?await this.fin.System.getEntityInfo(e.uuid,e.name):this.fin.me;return t.dispatch("get-window-context",{target:e||{uuid:this.fin.me.uuid,name:this.fin.me.name},entityType:n})}async closeWindow(e,t={skipBeforeUnload:!1}){this.wire.sendAction("platform-close-window",this.identity).catch((e=>{}));return(await this.getClient()).dispatch("close-window",{windowId:e,options:t})}}Mn.Platform=Fn,xn=new WeakMap;var jn={},kn={},Ln={},Tn={};function $n(e){switch(e){case"columns":case"grid":case"rows":case"tabs":return!0;default:return!1}}Object.defineProperty(Tn,"__esModule",{value:!0}),Tn.overrideFromComposables=Tn.isValidPresetType=void 0,Tn.isValidPresetType=$n,Tn.overrideFromComposables=function(...e){return t=>e.reduceRight(((e,t)=>n=>t(e(n))),(e=>e))(t)},Tn.default={isValidPresetType:$n};var Bn={},Gn={},Wn={};Object.defineProperty(Wn,"__esModule",{value:!0}),Wn.ApiConsumer=void 0;Wn.ApiConsumer=class{constructor(e){this.strategy=e,this.consume=async e=>(await this.strategy.getExposedFunctions(e)).reduce(((t,n)=>({...t,[n.key]:this.strategy.createFunction(n,e)})),{})}};var Hn={},Nn={};Object.defineProperty(Nn,"__esModule",{value:!0}),Nn.expose=Nn.getExposedProperties=void 0;const Dn=Symbol("exposedProperties");Nn.getExposedProperties=e=>e[Dn]||e.prototype[Dn]||[];Nn.expose=e=>(t,n,i)=>{t[Dn]=t[Dn]||[],t[Dn].push({key:n,descriptor:i,options:e})},Object.defineProperty(Hn,"__esModule",{value:!0}),Hn.ApiExposer=void 0;const Un=Nn;Hn.ApiExposer=class{constructor(e){this.strategy=e,this.exposeInstance=async(e,t)=>{const n=(0,Un.getExposedProperties)(e),i=await Promise.all(n.map((async({key:n,options:i})=>({key:n,options:await this.strategy.exposeFunction(e[n].bind(e),{key:n,options:i,meta:t})}))));await this.strategy.exposeMeta(t,i)}}};var Vn={},zn={},Kn={};Object.defineProperty(Kn,"__esModule",{value:!0}),Kn.ChannelsConsumer=void 0;Kn.ChannelsConsumer=class{constructor(e){this.channel=e,this.getExposedFunctions=async e=>{const{id:t}=e,{props:n}=await this.channel.dispatch(`api-meta:${t}`);return n},this.createFunction=e=>(...t)=>{const{action:n}=e.options;return this.channel.dispatch(n,{args:t})}}};var qn={};Object.defineProperty(qn,"__esModule",{value:!0}),qn.ChannelsExposer=void 0;qn.ChannelsExposer=class{constructor(e){this.channelProviderOrClient=e,this.exposeFunction=async(e,t)=>{const{key:n,options:i,meta:r}=t,{id:o}=r,s=`${o}.${i?.action||n}`;return await this.channelProviderOrClient.register(s,(async({args:t})=>e(...t))),{action:s}},this.exposeMeta=async({id:e},t)=>{const n=`api-meta:${e}`;await this.channelProviderOrClient.register(n,(()=>({props:t})))}}},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Kn,e),n(qn,e)}(zn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(zn,e)}(Vn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Wn,e),n(Hn,e),n(Vn,e),n(Nn,e)}(Gn);var Jn={};Object.defineProperty(Jn,"__esModule",{value:!0}),Jn.createRelayedDispatch=exports.relayChannelClientApi_1=Jn.relayChannelClientApi=void 0;const Yn=["no longer connected","RTCDataChannel closed unexpectedly","The client you are trying to dispatch from is disconnected from the target provider"];exports.relayChannelClientApi_1=Jn.relayChannelClientApi=async(e,t)=>{e.register(`relay:${t}`,(({action:t,target:n,payload:i})=>e.dispatch(n,t,i))),await Promise.resolve()};Jn.createRelayedDispatch=(e,t,n,i)=>async(r,o)=>{try{return await e.dispatch(`relay:${n}`,{action:r,payload:o,target:t})}catch(e){if(s=e.message,Yn.some((e=>s.includes(e)))&&i)throw new Error(i);throw e}var s};var Zn,Qn,Xn,ei=s&&s.__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},ti=s&&s.__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)};Object.defineProperty(Bn,"__esModule",{value:!0}),Bn.ColumnOrRow=Bn.TabStack=Bn.LayoutNode=void 0;const ni=Gn,ii=Jn;class ri{constructor(e,t){Zn.set(this,void 0),this.isRoot=()=>ti(this,Zn,"f").isRoot(this.entityId),this.exists=()=>ti(this,Zn,"f").exists(this.entityId),this.getParent=async()=>{const e=await ti(this,Zn,"f").getParent(this.entityId);if(e)return ri.getEntity(e,ti(this,Zn,"f"))},this.createAdjacentStack=async(e,t)=>{const n=await ti(this,Zn,"f").createAdjacentStack(this.entityId,e,t);return ri.getEntity({entityId:n,type:"stack"},ti(this,Zn,"f"))},this.getAdjacentStacks=async e=>(await ti(this,Zn,"f").getAdjacentStacks({targetId:this.entityId,edge:e})).map((e=>ri.getEntity({type:"stack",entityId:e.entityId},ti(this,Zn,"f")))),ei(this,Zn,e,"f"),this.entityId=t}}Bn.LayoutNode=ri,Zn=new WeakMap,ri.newLayoutEntitiesClient=async(e,t,n)=>{const i=(0,ii.createRelayedDispatch)(e,n,"layout-relay","You are trying to interact with a layout component on a window that does not exist or has been destroyed.");return new ni.ApiConsumer(new ni.ChannelsConsumer({dispatch:i})).consume({id:t})},ri.getEntity=(e,t)=>{const{entityId:n,type:i}=e;switch(i){case"column":case"row":return new si(t,n,i);case"stack":return new oi(t,n);default:throw new Error(`Unrecognised Layout Entity encountered ('${JSON.stringify(e)})`)}};class oi extends ri{constructor(e,t){super(e,t),Qn.set(this,void 0),this.type="stack",this.getViews=()=>ti(this,Qn,"f").getStackViews(this.entityId),this.addView=async(e,t={index:0})=>ti(this,Qn,"f").addViewToStack(this.entityId,e,t),this.removeView=async e=>{await ti(this,Qn,"f").removeViewFromStack(this.entityId,e)},this.setActiveView=async e=>{await ti(this,Qn,"f").setStackActiveView(this.entityId,e)},ei(this,Qn,e,"f")}}Bn.TabStack=oi,Qn=new WeakMap;class si extends ri{constructor(e,t,n){super(e,t),Xn.set(this,void 0),this.getContent=async()=>(await ti(this,Xn,"f").getContent(this.entityId)).map((e=>ri.getEntity(e,ti(this,Xn,"f")))),ei(this,Xn,e,"f"),this.type=n}}Bn.ColumnOrRow=si,Xn=new WeakMap;var ai={};Object.defineProperty(ai,"__esModule",{value:!0}),ai.DEFAULT_LAYOUT_KEY=ai.LAYOUT_CONTROLLER_ID=void 0,ai.LAYOUT_CONTROLLER_ID="layout-entities",ai.DEFAULT_LAYOUT_KEY="__default__";var ci,di,hi,li=s&&s.__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)};Object.defineProperty(Ln,"__esModule",{value:!0}),Ln.Layout=void 0;const ui=G,pi=O,wi=d,yi=Tn,fi=Bn,gi=ai;class mi extends wi.Base{static getClient(e){return li(e,di,"f").getValue()}constructor(e,t){super(t),ci.add(this),di.set(this,new ui.Lazy((async()=>fi.LayoutNode.newLayoutEntitiesClient(await this.platform.getClient(),gi.LAYOUT_CONTROLLER_ID,this.identity)))),this.replace=async e=>{this.wire.sendAction("layout-replace").catch((e=>{}));const t=await this.platform.getClient();await t.dispatch("replace-layout",{target:this.identity,opts:{layout:e}})},this.replaceView=async(e,t)=>{this.wire.sendAction("layout-replace-view").catch((e=>{}));const n=await this.platform.getClient();await n.dispatch("replace-view",{target:this.identity,opts:{viewToReplace:e,newView:t}})},this.applyPreset=async e=>{this.wire.sendAction("layout-apply-preset").catch((e=>{}));const t=await this.platform.getClient(),{presetType:n}=e;if(!n||!(0,yi.isValidPresetType)(n))throw new Error("Cannot apply preset layout, please include an applicable presetType property in the PresetLayoutOptions.");await t.dispatch("apply-preset-layout",{target:this.identity,opts:{presetType:n}})};const n=(0,pi.validateIdentity)(e);if(n)throw new Error(n);this.identity=e,this.platform=this.fin.Platform.wrapSync({uuid:e.uuid}),e.uuid===this.fin.me.uuid&&e.name===this.fin.me.name&&(this.init=this.fin.Platform.Layout.init)}async getConfig(){this.wire.sendAction("layout-get-config").catch((e=>{}));return(await this.platform.getClient()).dispatch("get-frame-snapshot",{target:this.identity})}async getCurrentViews(){this.wire.sendAction("layout-get-views").catch((e=>{}));const e=await this.platform.getClient();return(await e.dispatch("get-layout-views",{target:this.identity})).map((e=>this.fin.View.wrapSync(e)))}async getRootItem(){this.wire.sendAction("layout-get-root-item").catch((()=>{}));const e=await li(this,di,"f").getValue(),t=await e.getRoot("layoutName"in this.identity?this.identity:void 0);return fi.LayoutNode.getEntity(t,e)}async getStackByViewIdentity(e){this.wire.sendAction("layout-get-stack-by-view").catch((()=>{}));const t=await li(this,di,"f").getValue(),n=await t.getStackByView(e);if(!n)throw new Error(`No stack found for view: ${e.uuid}/${e.name}`);return fi.LayoutNode.getEntity(n,t)}async addView(e,{location:t,targetView:n}={}){this.wire.sendAction("layout-add-view").catch((e=>{}));const{identity:i}=await li(this,ci,"m",hi).call(this,"layout-add-view",{viewOptions:e,location:t,targetView:n});return{identity:i}}async closeView(e){this.wire.sendAction("layout-close-view").catch((e=>{})),await li(this,ci,"m",hi).call(this,"layout-close-view",{viewIdentity:e})}}Ln.Layout=mi,di=new WeakMap,ci=new WeakSet,hi=async function(e,t){return(await this.platform.getClient()).dispatch(e,{target:this.identity,opts:t})};var vi,Ci,bi,Ii,Ei,xi=s&&s.__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)},Ai=s&&s.__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};Object.defineProperty(kn,"__esModule",{value:!0}),kn.LayoutModule=void 0;const Pi=d,Mi=Ln,_i=ai;class Oi extends Pi.Base{constructor(){super(...arguments),vi.add(this),Ci.set(this,!1),bi.set(this,null),this.init=async(e={})=>{if(this.wire.sendAction("layout-init").catch((e=>{})),!this.wire.environment.layoutAllowedInContext(this.fin))throw new Error("Layout.init can only be called from a Window context.");if(xi(this,Ci,"f"))throw new Error("Layout.init was already called, please use Layout.create to add additional layouts.");"openfin"===this.wire.environment.type&&await this.fin.Platform.getCurrentSync().getClient(),Ai(this,Ci,!0,"f"),Ai(this,bi,await this.wire.environment.initLayoutManager(this.fin,this.wire,e),"f"),await this.wire.environment.applyLayoutSnapshot(this.fin,xi(this,bi,"f"),e);const t={name:this.fin.me.name,uuid:this.fin.me.uuid};if(!e.layoutManagerOverride){const e={layoutName:_i.DEFAULT_LAYOUT_KEY,...t};return xi(this,Ii,"f").call(this,e)}return this.wrapSync(t)},Ii.set(this,(e=>{const t="[Layout] You are using a deprecated property `layoutManager` - it will throw if you access it starting in v37.",n=new Proxy({},{get(e,n){throw console.warn(`[Layout-mgr-proxy] accessing ${n.toString()}`),new Error(t)}}),i=Object.assign(this.wrapSync(e),{layoutManager:n});return new Proxy(i,{get(e,n){if("layoutManager"===n)throw console.warn(`[Layout-proxy] accessing ${n.toString()}`),new Error(t);return e[n]}})})),this.getCurrentLayoutManagerSync=()=>xi(this,vi,"m",Ei).call(this,"fin.Platform.Layout.getCurrentLayoutManagerSync()"),this.create=async e=>this.wire.environment.createLayout(xi(this,vi,"m",Ei).call(this,"fin.Platform.Layout.create()"),e),this.destroy=async e=>this.wire.environment.destroyLayout(xi(this,vi,"m",Ei).call(this,"fin.Platform.Layout.destroy()"),e)}async wrap(e){return this.wire.sendAction("layout-wrap").catch((e=>{})),new Mi.Layout(e,this.wire)}wrapSync(e){return this.wire.sendAction("layout-wrap-sync").catch((e=>{})),new Mi.Layout(e,this.wire)}async getCurrent(){if(this.wire.sendAction("layout-get-current").catch((e=>{})),"openfin"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error("You are not in a Window context. Only Windows can have a Layout.");const{uuid:e,name:t}=this.fin.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction("layout-get-current-sync").catch((e=>{})),"openfin"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error("You are not in a Window context. Only Windows can have a Layout.");const{uuid:e,name:t}=this.fin.me;return this.wrapSync({uuid:e,name:t})}async getLayoutByViewIdentity(e){this.wire.sendAction("layout-get-by-view-identity").catch((()=>{}));let t=await this.wire.environment.getViewWindowIdentity(this.fin,e);t.identity&&(t=t.identity);try{const n=this.wrapSync(t),i=await Mi.Layout.getClient(n),r=await i.getLayoutIdentityForViewOrThrow(e);return this.wrapSync(r)}catch(n){if(!["No action registered at target for","getLayoutIdentityForViewOrThrow is not a function"].some((e=>n.message.includes(e))))throw n;if(t.uuid===t.name)throw new Error(`View identity ${JSON.stringify(e)} is not attached to any layout in provider window ${JSON.stringify(t)}.`);return this.wrapSync(t)}}}kn.LayoutModule=Oi,Ci=new WeakMap,bi=new WeakMap,Ii=new WeakMap,vi=new WeakSet,Ei=function(e){if(!xi(this,bi,"f"))throw new Error(`You must call init before using the API ${e}`);return xi(this,bi,"f")},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(kn,e),n(Ln,e)}(jn),Object.defineProperty(Pn,"__esModule",{value:!0}),Pn.PlatformModule=void 0;const Si=d,Ri=Mn,Fi=jn;class ji extends Si.Base{constructor(e,t){super(e),this._channel=t,this.Layout=new Fi.LayoutModule(this.wire)}async init(e){if(!fin.__internal_.isPlatform||fin.me.name!==fin.me.uuid)throw new Error("fin.Platform.init should only be called from a custom platform provider running in the main window of the application.");return this.wire.environment.initPlatform(this.fin,e)}async wrap(e){return this.wire.sendAction("platform-wrap").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}wrapSync(e){return this.wire.sendAction("platform-wrap-sync").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}async getCurrent(){return this.wire.sendAction("platform-get-current").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction("platform-get-current-sync").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}start(e){return this.wire.sendAction("platform-start").catch((e=>{})),new Promise((async(t,n)=>{try{const{uuid:n}=e,i=await this.fin.Application._create({...e,isPlatformController:!0});i.once("platform-api-ready",(()=>t(this.wrapSync({uuid:n})))),i._run({uuid:n})}catch(e){n(e)}}))}startFromManifest(e,t){return this.wire.sendAction("platform-start-from-manifest").catch((e=>{})),new Promise((async(n,i)=>{try{const i=await this.fin.Application._createFromManifest(e);i.once("platform-api-ready",(()=>n(this.wrapSync({uuid:i.identity.uuid})))),i._run(t)}catch(e){i(e)}}))}}Pn.PlatformModule=ji,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Pn,e),n(Mn,e)}(An);var ki={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getMe=e.getBaseMe=e.environmentUnsupportedMessage=void 0;const t=J(),n=un,i=ie(),r=rn;function o(e,t,n){return{...{isView:"view"===e,isWindow:"window"===e,isFrame:"iframe"===e,isExternal:"external connection"===e},uuid:t,name:n,entityType:e}}e.environmentUnsupportedMessage="You are not running in OpenFin.",e.getBaseMe=o,e.getMe=function(s){const{uuid:a,name:c,entityType:d}=s.me,h={setContext(){throw new Error(e.environmentUnsupportedMessage)},addContextHandler(){throw new Error(e.environmentUnsupportedMessage)},getContextGroups(){throw new Error(e.environmentUnsupportedMessage)},joinContextGroup(){throw new Error(e.environmentUnsupportedMessage)},removeFromContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getAllClientsInContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getInfoForContextGroup(){throw new Error(e.environmentUnsupportedMessage)}},l="Interop API has not been instantiated. Either connection has failed or you have not declared interop in your config.",u={setContext(){throw new Error(l)},addContextHandler(){throw new Error(l)},getContextGroups(){throw new Error(l)},joinContextGroup(){throw new Error(l)},removeFromContextGroup(){throw new Error(l)},getAllClientsInContextGroup(){throw new Error(l)},getInfoForContextGroup(){throw new Error(l)}},p={eventNames:()=>{throw new Error(e.environmentUnsupportedMessage)},emit:()=>{throw new Error(e.environmentUnsupportedMessage)},listeners:()=>{throw new Error(e.environmentUnsupportedMessage)},listenerCount:()=>{throw new Error(e.environmentUnsupportedMessage)},on:()=>{throw new Error(e.environmentUnsupportedMessage)},addListener:()=>{throw new Error(e.environmentUnsupportedMessage)},once:()=>{throw new Error(e.environmentUnsupportedMessage)},prependListener:()=>{throw new Error(e.environmentUnsupportedMessage)},prependOnceListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeAllListeners:()=>{throw new Error(e.environmentUnsupportedMessage)}};switch(d){case"view":return Object.assign(new t.View(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case"window":return Object.assign(new i._Window(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case"iframe":return Object.assign(new n._Frame(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case"external connection":return Object.assign(new r.ExternalApplication(s,{uuid:a}),o(d,a,c),{interop:u,isOpenFin:!1});default:return{...o(d,a,c),...p,interop:h,isOpenFin:!1}}}}(ki);var Li={},Ti={},$i={};Object.defineProperty($i,"__esModule",{value:!0}),$i.createWarningObject=$i.createUnusableObject=void 0,$i.createUnusableObject=function(e){const t=()=>{throw new Error(e)};return new Proxy({},{apply:t,construct:t,defineProperty:t,deleteProperty:t,get:t,getOwnPropertyDescriptor:t,getPrototypeOf:t,has:t,isExtensible:t,ownKeys:t,preventExtensions:t,set:t,setPrototypeOf:t})},$i.createWarningObject=function(e,t){return new Proxy(t,{get:(...t)=>(console.warn(e),Reflect.get(...t)),set:(...t)=>(console.warn(e),Reflect.set(...t)),getOwnPropertyDescriptor:(...t)=>(console.warn(e),Reflect.getOwnPropertyDescriptor(...t)),ownKeys:(...t)=>(console.warn(e),Reflect.ownKeys(...t))})};var Bi,Gi={},Wi={};var Hi={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.wrapIntentHandler=e.BROKER_ERRORS=e.generateOverrideWarning=e.generateOverrideError=e.wrapContextHandler=e.wrapInTryCatch=e.generateId=void 0;e.generateId=()=>`${Math.random()}${Date.now()}`;e.wrapInTryCatch=(e,t)=>(...n)=>{try{return e(...n)}catch(e){throw new Error((t||"")+e)}};e.wrapContextHandler=(e,t)=>async n=>{try{await e(n)}catch(e){throw console.error(`Error thrown by handler ${t} for context type ${n.type}: ${e}`),e}};e.generateOverrideError=(e,t)=>`You have tried to to use ${e} but ${t} has not been overridden in the Interop Broker. Please override this function. Refer to our documentation for more info.`;e.generateOverrideWarning=(e,t,n,i)=>{const{uuid:r,name:o}=n;return i?`Entity with identity: ${r}/${o} has called ${i} or ${e} but ${t} has not been overridden.`:`Entity with identity: ${r}/${o} has called ${e} but ${t} has not been overridden.`},e.BROKER_ERRORS={fireIntent:(0,e.generateOverrideError)("fireIntent","handleFiredIntent"),fireIntentForContext:(0,e.generateOverrideError)("fireIntentForContext","handleFiredIntentForContext"),getInfoForIntent:(0,e.generateOverrideError)("getInfoForIntent","handleInfoForIntent"),getInfoForIntentsByContext:(0,e.generateOverrideError)("getInfoForIntentsByContext","handleInfoForIntentsByContext"),joinSessionContextGroupWithJoinContextGroup:"The Context Group you have tried to join is a Session Context Group. Custom Context Groups can only be defined by the Interop Broker through code or manifest configuration. Please use joinSessionContextGroup.",fdc3Open:(0,e.generateOverrideError)("fdc3.open","fdc3HandleOpen"),fdc3FindInstances:(0,e.generateOverrideError)("fdc3.findInstances","fdc3HandleFindInstances"),fdc3GetAppMetadata:(0,e.generateOverrideError)("fdc3.getAppMetadata","fdc3HandleGetAppMetadata"),fdc3GetInfo:(0,e.generateOverrideError)("fdc3.getInfo","fdc3HandleGetInfo")};e.wrapIntentHandler=(e,t)=>async n=>{try{return e(n)}catch(e){throw console.error(`Error thrown by handler ${t}: ${e}`),e}}}(Hi);var Ni,Di,Ui={};function Vi(){if(Di)return Gi;Di=1;var e,t,n,r=s&&s.__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},o=s&&s.__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)},a=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Gi,"__esModule",{value:!0}),Gi.InteropBroker=void 0;const c=d,h=a(function(){if(Bi)return Wi;Bi=1,Object.defineProperty(Wi,"__esModule",{value:!0});const e=Cr();return Wi.default=class{constructor(e,t){this.provider=e,this.id=t,this.lastContext=void 0,this.contextGroupMap=new Map,this.clients=new Map,this.registerListeners()}registerListeners(){this.provider.register(`sessionContextGroup:getContext-${this.id}`,this.getCurrentContext.bind(this)),this.provider.register(`sessionContextGroup:setContext-${this.id}`,this.setContext.bind(this)),this.provider.register(`sessionContextGroup:handlerAdded-${this.id}`,this.handlerAdded.bind(this)),this.provider.register(`sessionContextGroup:handlerRemoved-${this.id}`,this.handlerRemoved.bind(this))}getCurrentContext(e){return e.type?this.contextGroupMap.get(e.type):this.lastContext}setContext(t,n){const{context:i}=t,r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name} not in Session Client State Map`);this.contextGroupMap.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{e.contextHandlers.get(i.type)?.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getClientState(e){return this.clients.get(e.endpointId)}async handlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(i){const e=r.contextHandlers.get(i)||[];r.contextHandlers.set(i,[...e,n]);const o=this.contextGroupMap.get(i);o&&await this.provider.dispatch(t,n,o)}else{r.globalHandler=n;const e=[...this.contextGroupMap.keys()].map((async e=>{const i=this.contextGroupMap.get(e);i&&await this.provider.dispatch(t,n,i)}));await Promise.all(e)}}handlerRemoved(e,t){const{handlerId:n}=e,i=this.clients.get(t.endpointId);i?(Array.from(i.contextHandlers).forEach((([,e])=>{const t=e.indexOf(n);t>-1&&e.splice(t,1)})),i.globalHandler===n&&(i.globalHandler=void 0)):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={contextHandlers:new Map,clientIdentity:e,globalHandler:void 0};this.clients.set(e.endpointId,t)}}onDisconnection(e){this.clients.delete(e.endpointId)}},Wi}()),l=Hi,u=a(i),p=function(){if(Ni)return Ui;Ni=1,Object.defineProperty(Ui,"__esModule",{value:!0}),Ui.PrivateChannelProvider=void 0;const e=Vi();return Ui.PrivateChannelProvider=class t{constructor(e,t){this.provider=e,this.id=t,this.clients=new Map,this.registerListeners(),this.contextByContextType=new Map,this.lastContext=void 0,this.provider.onConnection((e=>this.registerNewClient(e))),this.provider.onDisconnection((async e=>{const{endpointId:t}=e;this.clients.has(t)&&await this.handleClientDisconnecting(e),0===(await this.provider.getAllClientInfo()).length&&this.provider.destroy()}))}getClientState(e){return this.clients.get(e.endpointId)}registerListeners(){this.provider.register("broadcast",this.broadcast.bind(this)),this.provider.register("getCurrentContext",this.getCurrentContext.bind(this)),this.provider.register("contextHandlerAdded",this.contextHandlerAdded.bind(this)),this.provider.register("contextHandlerRemoved",this.contextHandlerRemoved.bind(this)),this.provider.register("nonStandardHandlerRemoved",this.nonStandardHandlerRemoved.bind(this)),this.provider.register("onAddContextHandlerAdded",this.onAddContextHandlerAdded.bind(this)),this.provider.register("onDisconnectHandlerAdded",this.onDisconnectHandlerAdded.bind(this)),this.provider.register("onUnsubscribeHandlerAdded",this.onUnsubscribeHandlerAdded.bind(this)),this.provider.register("clientDisconnecting",((e,t)=>{this.handleClientDisconnecting(t)}))}broadcast(t,n){const{context:i}=t;if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name}, tried to call broadcast, is not connected to this Private Channel`);const r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to broadcast - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);this.contextByContextType.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{const t=e.handlerIdsByContextTypes.get(i.type);t&&t.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getCurrentContext(e,t){const{contextType:n}=e;if(!this.getClientState(t))throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call getCurrentContext, is not connected to this Private Channel`);if(void 0!==n){return this.contextByContextType.get(n)||null}return this.lastContext?this.lastContext:null}contextHandlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call addContextListener, is not connected to this Private Channel`);if(i){const e=r.handlerIdsByContextTypes.get(i)||[];r.handlerIdsByContextTypes.set(i,[...e,n])}else r.globalHandler=n;Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&e.onAddContextListenerHandlerId&&this.provider.dispatch(e.clientIdentity,e.onAddContextListenerHandlerId,i)}))}async contextHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);if(i){let e;if(i.globalHandler===n)i.globalHandler=void 0;else for(const[t,r]of i.handlerIdsByContextTypes){const i=r.indexOf(n);i>-1&&(r.splice(i,1),e=t)}const r=(await this.getConnectedClients()).map((async n=>{const{clientIdentity:i,clientIdentity:{endpointId:r},onUnsubscribeHandlerId:o}=n;r!==t.endpointId&&o&&await this.provider.dispatch(i,o,e)}));try{await Promise.all(r)}catch(e){throw console.error(`Problem when attempting to dispatch to onUnsubscribeHandlers. Error: ${e} Removing Client: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}`),new Error(e)}}else console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}.`)}nonStandardHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);i?i.onDisconnectHandlerId===n?i.onDisconnectHandlerId=void 0:i.onAddContextListenerHandlerId===n?i.onAddContextListenerHandlerId=void 0:i.onUnsubscribeHandlerId===n&&(i.onUnsubscribeHandlerId=void 0):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}onAddContextHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onAddContextListener, is not connected to this Private Channel`);n.onAddContextListenerHandlerId=i,Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&Array.from(e.handlerIdsByContextTypes.keys()).forEach((e=>{this.provider.dispatch(t,i,e)}))}))}onDisconnectHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onDisconnect, is not connected to this Private Channel`);n.onDisconnectHandlerId=i}onUnsubscribeHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onUnsubscribe, is not connected to this Private Channel`);n.onUnsubscribeHandlerId=i}removeClient(e){const t=this.getClientState(e);if(!t)throw new Error(`Client with Identity: ${e.uuid} ${e.name}, tried to call disconnect, is not connected to this Private Channel`);t.handlerIdsByContextTypes.clear(),this.clients.delete(e.endpointId)}async fireOnDisconnectForOtherClients(e){const{endpointId:t}=e,n=(await this.getConnectedClients()).map((async e=>{const{clientIdentity:{endpointId:n},onDisconnectHandlerId:i}=e;n!==t&&i&&await this.provider.dispatch(e.clientIdentity,i)}));try{await Promise.all(n)}catch(t){throw console.error(`Problem when attempting to dispatch to onDisconnectHandlers. Error: ${t} Disconnecting Client: uuid: ${e.uuid}. name: ${e.name}. endpointId: ${e.endpointId}`),new Error(t)}}async unsubscribeAll(e){const{endpointId:t}=e,n=this.clients.get(t);if(n){const t=Array.from(n.handlerIdsByContextTypes.values()).flat(),i=n.globalHandler;if(t.length>0){const n=t.map((async t=>this.contextHandlerRemoved({handlerId:t},e)));try{await Promise.all(n)}catch(e){console.error(e.message)}}if(i)try{await this.contextHandlerRemoved({handlerId:i},e)}catch(e){console.error(e.message)}}}async handleClientDisconnecting(e){await this.unsubscribeAll(e),this.removeClient(e),await this.fireOnDisconnectForOtherClients(e)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={clientIdentity:e,handlerIdsByContextTypes:new Map,globalHandler:void 0,onAddContextListenerHandlerId:void 0,onUnsubscribeHandlerId:void 0,onDisconnectHandlerId:void 0};this.clients.set(e.endpointId,t)}}async getConnectedClients(){const e=await this.provider.getAllClientInfo();return Array.from(this.clients.values()).filter((t=>{const{uuid:n,name:i}=t.clientIdentity;return e.some((e=>i===e.name&&n===e.uuid))}))}static init(e,n){return new t(e,n)}},Ui}(),w=G,y=[{id:"green",displayMetadata:{color:"#00CC88",name:"green"}},{id:"purple",displayMetadata:{color:"#8C61FF",name:"purple"}},{id:"orange",displayMetadata:{color:"#FF8C4C",name:"orange"}},{id:"red",displayMetadata:{color:"#FF5E60",name:"red"}},{id:"pink",displayMetadata:{color:"#FF8FB8",name:"pink"}},{id:"yellow",displayMetadata:{color:"#E9FF8F",name:"yellow"}}];let f=class i extends c.Base{constructor(i,s,a){super(i),e.set(this,void 0),t.set(this,void 0),n.set(this,void 0),this.getProvider=()=>o(this,n,"f").getValue(),this.interopClients=new Map,this.contextGroupsById=new Map,r(this,t,a.contextGroups??[...y],"f"),r(this,e,a.fdc3Info,"f"),a?.logging&&(this.logging=a.logging),this.intentClientMap=new Map,this.lastContextMap=new Map,this.sessionContextGroupMap=new Map,r(this,n,new w.Lazy(s),"f"),this.setContextGroupMap(),this.setupChannelProvider()}static createClosedConstructor(...e){return class extends i{constructor(...t){if(t.length){const[n,i,r]=t;if(r&&"object"==typeof r&&!(0,u.default)(r,e[2]))return console.warn("You have modified the parameters of the InteropOverride constructor. This behavior is deprecated and will be removed in a future version. You can modify these options in your manifest. Please consult our Interop docs for guidance on migrating to the new override scheme."),void super(e[0],e[1],r);console.warn("You are attempting to pass arguments to the InteropOverride constructor. This is not necessary, and these passed arguments will be ignored. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.")}super(...e)}}}setContext({context:e},t){this.wire.sendAction("interop-broker-set-context").catch((e=>{}));const n=this.getClientState(t);if(!n||!n.contextGroupId)throw n?new Error("You must join a context group before you can set context."):new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);{const{contextGroupId:t}=n;this.setContextForGroup({context:e},t)}}setContextForGroup({context:e},t){this.wire.sendAction("interop-broker-set-context-for-group").catch((e=>{}));const n=this.contextGroupsById.get(t);if(!n)throw new Error(`Unable to set context for context group that isn't in the context group mapping: ${t}.`);const r=i.checkContextIntegrity(e);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(e)}`);const o=e.type;n.set(o,e),this.lastContextMap.set(t,o);Array.from(this.interopClients.values()).filter((e=>e.contextGroupId===t)).forEach((t=>{for(const[,n]of t.contextHandlers)i.isContextTypeCompatible(o,n.contextType)&&this.invokeContextHandler(t.clientIdentity,n.handlerId,e)}))}getCurrentContext(e,t){this.wire.sendAction("interop-broker-get-current-context").catch((e=>{}));const n=this.getClientState(t);if(!n?.contextGroupId)throw new Error("You must be a member of a context group to call getCurrentContext");const{contextGroupId:i}=n,r=this.contextGroupsById.get(i),o=this.lastContextMap.get(i),s=e?.contextType??o;return r&&s?r.get(s):void 0}async joinContextGroup({contextGroupId:e,target:t},n){if(this.wire.sendAction("interop-broker-join-context-group").catch((e=>{})),this.sessionContextGroupMap.has(e))throw new Error(l.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup);if(t){i.hasEndpointId(t)&&await this.addClientToContextGroup({contextGroupId:e},t);try{const n=this.channel.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name));if(!n.length)throw new Error(`Given Identity ${t.uuid} ${t.name} is not connected to the Interop Broker.`);n.length>1&&console.warn(`More than one connection found for identity ${t.uuid} ${t.name}`);const i=[];for(const t of n)i.push(this.addClientToContextGroup({contextGroupId:e},t));await Promise.all(i)}catch(e){throw new Error(e)}}else await this.addClientToContextGroup({contextGroupId:e},n)}async addClientToContextGroup({contextGroupId:e},t){this.wire.sendAction("interop-broker-add-client-to-context-group").catch((e=>{}));const n=this.getClientState(t);if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(!this.getContextGroups().find((t=>t.id===e)))throw new Error(`Attempting to join a context group that does not exist: ${e}. You may only join existing context groups.`);if(n.contextGroupId!==e){n.contextGroupId=e,await this.setCurrentContextGroupInClientOptions(t,e);const i=this.contextGroupsById.get(e);for(const[,e]of n.contextHandlers){const{contextType:n,handlerId:r}=e;if(void 0===n)i.forEach(((e,n)=>{this.invokeContextHandler(t,r,e)}));else if(i.has(n)){const e=i.get(n);e&&this.invokeContextHandler(t,r,e)}}}}async removeFromContextGroup({target:e},t){if(this.wire.sendAction("interop-broker-remove-from-context-group").catch((e=>{})),e){i.hasEndpointId(e)&&await this.removeClientFromContextGroup(e);try{const t=this.channel.connections.filter((t=>t.uuid===e.uuid&&t.name===e.name));if(!t.length)throw new Error(`No connection found for given Identity ${e.uuid} ${e.name}`);t.length>1&&console.warn(`More than one connection found for identity ${e.uuid} ${e.name}`);const n=[];for(const e of t)n.push(this.removeClientFromContextGroup(e));await Promise.all(n)}catch(e){throw new Error(e)}}else await this.removeClientFromContextGroup(t)}async removeClientFromContextGroup(e){this.wire.sendAction("interop-broker-remove-client-from-context-group").catch((e=>{}));const t=this.getClientState(e);t&&(t.contextGroupId=void 0),await this.setCurrentContextGroupInClientOptions(e,null)}getContextGroups(){return this.wire.sendAction("interop-broker-get-context-groups").catch((e=>{})),o(this,t,"f").map((e=>({...e})))}getInfoForContextGroup({contextGroupId:e}){return this.wire.sendAction("interop-broker-get-info-for-context-group").catch((e=>{})),this.getContextGroups().find((t=>t.id===e))}getAllClientsInContextGroup({contextGroupId:e}){this.wire.sendAction("interop-broker-get-all-clients-in-context-group").catch((e=>{}));return Array.from(this.interopClients.values()).filter((t=>t.contextGroupId===e)).map((e=>e.clientIdentity))}async handleFiredIntent(e,t){const n=(0,l.generateOverrideWarning)("fdc3.raiseIntent","InteropBroker.handleFiredIntent",t,"interopClient.fireIntent");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntent)}async setIntentTarget(e,t){this.wire.sendAction("interop-broker-set-intent-target").catch((e=>{}));const n=this.intentClientMap.get(t.name),i=`intent-handler-${e.name}`;if(n){const t=n.get(i);if(t){if(t.pendingIntents.push(e),t.clientIdentity&&t.isReady){const{clientIdentity:e,pendingIntents:n}=t;try{const r=n[n.length-1];await this.invokeIntentHandler(e,i,r),t.pendingIntents=[]}catch(n){console.error(`Error invoking intent handler for client ${e.uuid}/${e.name}/${e.endpointId}`),t.isReady=!1}}}else n.set(i,{isReady:!1,pendingIntents:[e]})}else{this.intentClientMap.set(t.name,new Map);const n=this.intentClientMap.get(t.name);n&&n.set(i,{isReady:!1,pendingIntents:[e]})}}async handleInfoForIntent(e,t){const n=(0,l.generateOverrideWarning)("fdc3.findIntent","InteropBroker.handleInfoForIntent",t,"interopClient.getInfoForIntent");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntent)}async handleInfoForIntentsByContext(e,t){const n=(0,l.generateOverrideWarning)("fdc3.findIntentsByContext","InteropBroker.handleInfoForIntentsByContext",t,"interopClient.getInfoForIntentsByContext");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntentsByContext)}async handleFiredIntentForContext(e,t){const n=(0,l.generateOverrideWarning)("fdc3.raiseIntentForContext","InteropBroker.handleFiredIntentForContext",t,"interopClient.fireIntentForContext");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntentForContext)}async clientDisconnected(e){}async fdc3HandleOpen({app:e,context:t},n){const i=(0,l.generateOverrideWarning)("fdc3.open","InteropBroker.fdc3HandleOpen",n);throw console.warn(i),new Error(l.BROKER_ERRORS.fdc3Open)}async fdc3HandleFindInstances(e,t){const n=(0,l.generateOverrideWarning)("fdc3.open","InteropBroker.fdc3HandleFindInstances",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3FindInstances)}async fdc3HandleGetAppMetadata(e,t){const n=(0,l.generateOverrideWarning)("fdc3.getAppMetadata","InteropBroker.fdc3HandleGetAppMetadata",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3GetAppMetadata)}async invokeContextHandler(e,t,n){const i=await this.getProvider();try{await i.dispatch(e,t,n)}catch(i){console.error(`Error invoking context handler ${t} for context type ${n.type} in client ${e.uuid}/${e.name}/${e.endpointId}`,i)}}async invokeIntentHandler(e,t,n){const i=await this.getProvider();await i.dispatch(e,t,n)}async fdc3HandleGetInfo(t,n){const{fdc3Version:i}=t;return{fdc3Version:i,...o(this,e,"f"),optionalFeatures:{OriginatingAppMetadata:!1,UserChannelMembershipAPIs:!0},appMetadata:{appId:"",instanceId:""}}}async getAllClientInfo(){return(await this.getProvider()).getAllClientInfo()}decorateSnapshot(e){return{...e,interopSnapshotDetails:{contextGroupStates:this.getContextGroupStates()}}}applySnapshot(e,t){const n=e?.interopSnapshotDetails?.contextGroupStates;n&&(t?.closeExistingWindows||this.updateExistingClients(n),this.rehydrateContextGroupStates(n))}updateExistingClients(e){this.interopClients.forEach((t=>{const{clientIdentity:n,contextGroupId:r,contextHandlers:o}=t;if(r){const t=e[r];for(const[,e]of Object.entries(t))o.forEach((t=>{const{handlerId:r,contextType:o}=t;i.isContextTypeCompatible(e.type,o)&&this.invokeContextHandler(n,r,e)}))}}))}getContextGroupStates(){return i.toObject(this.contextGroupsById)}rehydrateContextGroupStates(e){const t=Object.entries(e);for(const[e,n]of t){const t=Object.entries(n);for(const[n,i]of t)if(this.contextGroupsById.has(e)){this.contextGroupsById.get(e).set(n,i)}else console.warn(`Attempting to set a context group that isn't in the context group mapping. Skipping context group rehydration for: ${e}`)}}contextHandlerRegistered({contextType:e,handlerId:t},n){const i={contextType:e,handlerId:t},r=this.getClientState(n);if(r?.contextHandlers.set(t,i),r&&r.contextGroupId){const{contextGroupId:i}=r,o=this.contextGroupsById.get(i);if(void 0===e)o.forEach(((e,i)=>{this.invokeContextHandler(n,t,e)}));else if(o.has(e)){const i=o.get(e);i&&this.invokeContextHandler(n,t,i)}}}async intentHandlerRegistered(e,t){const{handlerId:n}=e,i=this.intentClientMap.get(t.name),r=i?.get(n);if(i)if(r){const{pendingIntents:e}=r;r.clientIdentity=t,r.isReady=!0;try{if(e.length>0){const i=e[e.length-1];await this.invokeIntentHandler(t,n,i),r.pendingIntents=[]}}catch(e){console.error(`Error invoking intent handler: ${n} for client ${t.uuid}/${t.name}/${t.endpointId}`)}}else i.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t});else{this.intentClientMap.set(t.name,new Map);const e=this.intentClientMap.get(t.name);e&&e.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t})}}removeContextHandler({handlerId:e},t){const n=this.getClientState(t);n&&n.contextHandlers.delete(e)}handleJoinSessionContextGroup({sessionContextGroupId:e},t){try{if(!e)throw new Error("Failed to join session context group: must specify group id.");const n=this.sessionContextGroupMap.get(e);if(n)n.registerNewClient(t);else{const n=new h.default(this.channel,e);n.registerNewClient(t),this.sessionContextGroupMap.set(e,n)}return{hasConflict:this.contextGroupsById.has(e)}}catch(e){throw new Error(e)}}getClientState(e){return this.interopClients.get(e.endpointId)}static toObject(e){const t=Object.fromEntries(e),n={};return Object.entries(t).forEach((([e,t])=>{const i=Object.fromEntries(t);n[e]=i})),n}static checkContextIntegrity(e){if(!e)return{isValid:!1,reason:"No context supplied"};if("object"!=typeof e)return{isValid:!1,reason:"Context must be an Object"};if(!e.type)return{isValid:!1,reason:"Context must have a type property"};if(e.id&&"object"!=typeof e.id)return{isValid:!1,reason:"Context id must be an Object populated with key-value identifiers (if set)"};if(e.id){const{id:t}=e,n=Object.keys(t);let i=!1;if(!n.length)return{isValid:!1,reason:"Context id must have at least one key-value identifier"};if(n.forEach((e=>{"string"==typeof e&&"string"==typeof t[e]||(i=!0)})),i)return{isValid:!1,reason:"Context id key-value identifiers must be of type string"}}return e.name&&"string"!=typeof e.name?{isValid:!1,reason:"Context name must be of string type (if set)"}:{isValid:!0}}static hasEndpointId(e){return void 0!==e.endpointId}static isContextTypeCompatible(e,t){return void 0===t||e===t}setContextGroupMap(){for(const e of this.getContextGroups())this.contextGroupsById.set(e.id,new Map)}async setCurrentContextGroupInClientOptions(e,t){try{const n=await this.fin.System.getEntityInfo(e.uuid,e.name);let i;"view"===n.entityType?i=await this.fin.View.wrap(e):"window"===n.entityType&&(i=await this.fin.Window.wrap(e)),i&&await i.updateOptions({interop:{currentContextGroup:t}})}catch(e){}}async setupChannelProvider(){try{const e=await this.getProvider();this.channel=e,this.wireChannel(e)}catch(e){throw new Error(`Error setting up Interop Broker Channel Provider: ${e}`)}}wireChannel(e){e.onConnection((async(e,t)=>{if(!await this.isConnectionAuthorized(e,t))throw new Error(`Connection not authorized for ${e.uuid}, ${e.name}`);if(!e.endpointId)throw new Error("Version too old to be compatible with Interop. Please upgrade your runtime to a more recent version.");const n={contextGroupId:void 0,contextHandlers:new Map,clientIdentity:e};t?.currentContextGroup&&this.contextGroupsById.has(t.currentContextGroup)&&(n.contextGroupId=t?.currentContextGroup),this.interopClients.set(e.endpointId,n)})),e.onDisconnection((e=>{this.interopClients.delete(e.endpointId);const t=this.intentClientMap.get(e.name);t&&e.uuid===this.fin.me.uuid&&t.forEach((e=>{e.isReady=!1})),this.sessionContextGroupMap.forEach((t=>{t.onDisconnection(e)})),this.clientDisconnected(e)})),e.beforeAction((async(e,t,n)=>{if(!await this.isActionAuthorized(e,t,n))throw new Error(`Action (${e}) not authorized for ${n.uuid}, ${n.name}`);this.logging?.beforeAction?.enabled&&console.log(e,t,n)})),e.afterAction(((e,t,n)=>{this.logging?.afterAction?.enabled&&console.log(e,t,n)})),e.register("setContext",this.setContext.bind(this)),e.register("fireIntent",this.handleFiredIntent.bind(this)),e.register("getCurrentContext",this.getCurrentContext.bind(this)),e.register("getInfoForIntent",this.handleInfoForIntent.bind(this)),e.register("getInfoForIntentsByContext",this.handleInfoForIntentsByContext.bind(this)),e.register("fireIntentForContext",this.handleFiredIntentForContext.bind(this)),e.register("getContextGroups",this.getContextGroups.bind(this)),e.register("joinContextGroup",this.joinContextGroup.bind(this)),e.register("removeFromContextGroup",this.removeFromContextGroup.bind(this)),e.register("getAllClientsInContextGroup",this.getAllClientsInContextGroup.bind(this)),e.register("getInfoForContextGroup",this.getInfoForContextGroup.bind(this)),e.register("contextHandlerRegistered",this.contextHandlerRegistered.bind(this)),e.register("intentHandlerRegistered",this.intentHandlerRegistered.bind(this)),e.register("removeContextHandler",this.removeContextHandler.bind(this)),e.register("sessionContextGroup:createIfNeeded",this.handleJoinSessionContextGroup.bind(this)),e.register("fdc3Open",this.fdc3HandleOpen.bind(this)),e.register("fdc3v2FindIntentsByContext",this.handleInfoForIntentsByContext.bind(this)),e.register("fdc3FindInstances",this.fdc3HandleFindInstances.bind(this)),e.register("fdc3GetAppMetadata",this.fdc3HandleGetAppMetadata.bind(this)),e.register("fdc3v2GetInfo",(async(e,t)=>this.fdc3HandleGetInfo.bind(this)(e,t))),e.register("createPrivateChannelProvider",(async e=>{const{channelId:t}=e,n=await this.fin.InterApplicationBus.Channel.create(t);p.PrivateChannelProvider.init(n,t)}))}isConnectionAuthorized(e,t){return this.wire.sendAction("interop-broker-is-connection-authorized").catch((e=>{})),Promise.resolve(!0)}isActionAuthorized(e,t,n){return this.wire.sendAction("interop-broker-is-action-authorized").catch((e=>{})),Promise.resolve(!0)}};return Gi.InteropBroker=f,e=new WeakMap,t=new WeakMap,n=new WeakMap,Gi}var zi,Ki={},qi={},Ji=s&&s.__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},Yi=s&&s.__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)};Object.defineProperty(qi,"__esModule",{value:!0});const Zi=d,Qi=Hi;class Xi extends Zi.Base{constructor(e,t,n){super(e),zi.set(this,void 0),this.id=n,Ji(this,zi,t,"f")}async setContext(e){this.wire.sendAction("interop-session-context-group-set-context").catch((e=>{}));return(await Yi(this,zi,"f")).dispatch(`sessionContextGroup:setContext-${this.id}`,{sessionContextGroupId:this.id,context:e})}async getCurrentContext(e){this.wire.sendAction("interop-session-context-group-get-context").catch((e=>{}));return(await Yi(this,zi,"f")).dispatch(`sessionContextGroup:getContext-${this.id}`,{sessionContextGroupId:this.id,type:e})}async addContextHandler(e,t){if(this.wire.sendAction("interop-session-context-group-add-handler").catch((e=>{})),"function"!=typeof e)throw new Error("Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");const n=await Yi(this,zi,"f");let i;return i=t?`sessionContextHandler:invoke-${this.id}-${t}-${(0,Qi.generateId)()}`:`sessionContextHandler:invoke-${this.id}`,n.register(i,(0,Qi.wrapContextHandler)(e,i)),await n.dispatch(`sessionContextGroup:handlerAdded-${this.id}`,{handlerId:i,contextType:t}),{unsubscribe:await this.createUnsubscribeCb(i)}}async createUnsubscribeCb(e){const t=await Yi(this,zi,"f");return async()=>{t.remove(e),await t.dispatch(`sessionContextGroup:handlerRemoved-${this.id}`,{handlerId:e})}}getUserInstance(){return{id:this.id,setContext:(0,Qi.wrapInTryCatch)(this.setContext.bind(this),"Failed to set context: "),getCurrentContext:(0,Qi.wrapInTryCatch)(this.getCurrentContext.bind(this),"Failed to get context: "),addContextHandler:(0,Qi.wrapInTryCatch)(this.addContextHandler.bind(this),"Failed to add context handler: ")}}}qi.default=Xi,zi=new WeakMap;var er={},tr={},nr={},ir={},rr=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),or=s&&s.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),sr=s&&s.__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)&&rr(t,e,n);return or(t,e),t};Object.defineProperty(ir,"__esModule",{value:!0}),ir.PrivateChannelClient=void 0;const ar=sr(Hi);var cr,dr;function hr(){if(cr)return tr;cr=1;var e,t=s&&s.__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)},n=s&&s.__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},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(tr,"__esModule",{value:!0}),tr.FDC3ModuleBase=void 0;const o=nr,a=Hi,c=wr(),d=r(i);return tr.FDC3ModuleBase=class{get client(){return t(this,e,"f").call(this)}get fin(){return this.wire.getFin()}constructor(t,i){this.wire=i,e.set(this,void 0),n(this,e,t,"f")}async broadcast(e){return this.wire.sendAction("fdc3-broadcast").catch((e=>{})),this.client.setContext(e)}async _open(e,t){this.wire.sendAction("fdc3-open").catch((e=>{}));try{return await c.InteropClient.ferryFdc3Call(this.client,"fdc3Open",{app:e,context:t})}catch(e){const t=e.message===a.BROKER_ERRORS.fdc3Open?"ResolverUnavailable":e.message;throw new Error(t)}}async _getChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:"system",...(0,o.getUnsupportedChannelApis)()})))}async getOrCreateChannel(e){this.wire.sendAction("fdc3-get-or-create-channel").catch((e=>{}));const t=(await this._getChannels()).find((t=>t.id===e));if(t)return{...t,type:"system",...(0,o.getUnsupportedChannelApis)()};try{const t=await this.client.joinSessionContextGroup(e);return(0,o.buildAppChannelObject)(t)}catch(e){throw console.error(e.message),new Error(o.ChannelError.CreationFailed)}}async getSystemChannels(){return this.wire.sendAction("fdc3-get-system-channels").catch((e=>{})),this._getChannels()}async joinChannel(e){this.wire.sendAction("fdc3-join-channel").catch((e=>{}));try{return await this.client.joinContextGroup(e)}catch(e){if(e.message===a.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup?console.error("The Channel you have tried to join is an App Channel. Custom Channels can only be defined by the Interop Broker through code or manifest configuration. Please use getOrCreateChannel."):console.error(e.message),e.message.startsWith("Attempting to join a context group that does not exist"))throw new Error(o.ChannelError.NoChannelFound);throw new Error(o.ChannelError.AccessDenied)}}async getCurrentChannel(){this.wire.sendAction("fdc3-get-current-channel").catch((e=>{}));const e=await this.getCurrentContextGroupInfo();return e?this.buildChannelObject(e):null}async leaveCurrentChannel(){return this.wire.sendAction("fdc3-leave-current-channel").catch((e=>{})),this.client.removeFromContextGroup()}async getCurrentContextGroupInfo(){const e=await this.client.getContextGroups(),t=e.map((async e=>this.client.getAllClientsInContextGroup(e.id))),n=(await Promise.all(t)).findIndex((e=>e.some((e=>{const{uuid:t,name:n}=e;return this.wire.me.uuid===t&&this.wire.me.name===n}))));return e[n]}async buildChannelObject(e){return{...e,type:"system",addContextListener:(...[e,t])=>{let n,i;"function"==typeof e?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),n=e):(n=t,"string"==typeof e&&(i=e));const r=(async()=>{let e=!0;const t=await this.client.getCurrentContext(i);return this.client.addContextHandler(((i,r)=>{if(!e||(e=!1,!(0,d.default)(t,i)))return n(i,r)}),i)})();return{...r,unsubscribe:()=>r.then((e=>e.unsubscribe()))}},broadcast:this.broadcast.bind(this),getCurrentContext:async e=>{const t=await this.client.getCurrentContext(e);return void 0===t?null:t}}}},e=new WeakMap,tr}ir.PrivateChannelClient=class{constructor(e,t){this.id=t,this.client=e,this.listeners=new Map}async broadcast(e){return this.client.dispatch("broadcast",{context:e})}async getCurrentContext(e){return this.client.dispatch("getCurrentContext",{contextType:e})}async addContextListener(e,t){if("function"!=typeof t)throw new Error("Non-function argument passed to the second parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");let n;n=e?`contextHandler:invoke-${this.id}-${e}-${ar.generateId()}`:`contextHandler:invoke-${this.id}-${ar.generateId()}`,this.client.register(n,ar.wrapContextHandler(t,n));const i={unsubscribe:await this.createContextUnsubscribeCb(n)};return this.listeners.set(n,i),await this.client.dispatch("contextHandlerAdded",{handlerId:n,contextType:e}),i}createNonStandardUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch("nonStandardHandlerRemoved",{handlerId:e})}}createContextUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch("contextHandlerRemoved",{handlerId:e})}}onAddContextListener(e){const t=`onContextHandlerAdded:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch("onAddContextHandlerAdded",{handlerId:t}),n}onDisconnect(e){const t=`onDisconnect:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch("onDisconnectHandlerAdded",{handlerId:t}),n}onUnsubscribe(e){const t=`onUnsubscribe:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch("onUnsubscribeHandlerAdded",{handlerId:t}),n}async cleanUpAllSubs(){Array.from(this.listeners.keys()).forEach((e=>{this.client.remove(e),this.listeners.delete(e)}))}async disconnect(){try{await this.client.dispatch("clientDisconnecting"),await this.cleanUpAllSubs(),await this.client.disconnect()}catch(e){throw new Error(e.message)}}},function(e){var t=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.getIntentResolution=e.isChannel=e.isContext=e.connectPrivateChannel=e.buildAppChannelObject=e.buildPrivateChannelObject=e.ChannelError=e.ResultError=e.UnsupportedChannelApiError=e.getUnsupportedChannelApis=void 0;const n=Hi,r=ir,o=t(i);e.getUnsupportedChannelApis=e=>({addContextListener:()=>{throw new a("Channel.addContextListener",e)},broadcast:()=>{throw new a("Channel.broadcast",e)},getCurrentContext:()=>{throw new a("Channel.getCurrentContext",e)}});class a extends Error{constructor(e,t="System"){super(e),this.message=`Calling ${e} on an instance of a ${t} Channel returned by fdc3.get${t}Channels is not supported. If you would like to use a ${t} Channel, please use fdc3.joinChannel, fdc3.addContextListener, and fdc3.broadcast instead.`}}var c,d;e.UnsupportedChannelApiError=a,function(e){e.NoResultReturned="NoResultReturned",e.IntentHandlerRejected="IntentHandlerRejected"}(c=e.ResultError||(e.ResultError={})),(d=e.ChannelError||(e.ChannelError={})).NoChannelFound="NoChannelFound",d.AccessDenied="AccessDenied",d.CreationFailed="CreationFailed";e.buildPrivateChannelObject=e=>{let t=!1;const n=()=>{if(t)throw new Error("Private Channel Client has been disconnected from the Private Channel")};return{id:e.id,type:"private",broadcast:async t=>(n(),e.broadcast(t)),getCurrentContext:async t=>(n(),e.getCurrentContext(t)),addContextListener:async(t,i)=>{n();let r=i,o=t;"function"==typeof t&&(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),r=t,o=null);return e.addContextListener(o,r)},onAddContextListener:t=>(n(),e.onAddContextListener(t)),disconnect:async()=>(n(),t=!0,e.disconnect()),onDisconnect:t=>(n(),e.onDisconnect(t)),onUnsubscribe:t=>(n(),e.onUnsubscribe(t))}};e.buildAppChannelObject=e=>({id:e.id,type:"app",broadcast:e.setContext,getCurrentContext:async t=>{const n=await e.getCurrentContext(t);return void 0===n?null:n},addContextListener:(t,n)=>{let i,r;"function"==typeof t?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),i=t):(i=n,"string"==typeof t&&(r=t));const s=(async()=>{let t=!0;const n=await e.getCurrentContext(r);return e.addContextHandler(((e,r)=>{if(!t||(t=!1,!(0,o.default)(n,e)))return i(e,r)}),r)})();return{...s,unsubscribe:()=>s.then((e=>e.unsubscribe()))}}});e.connectPrivateChannel=async t=>{try{const n=await fin.InterApplicationBus.Channel.connect(t),i=new r.PrivateChannelClient(n,t);return(0,e.buildPrivateChannelObject)(i)}catch(e){throw new Error(`Private Channel with id: ${t} doesn't exist`)}};e.isContext=e=>{if(e&&"object"==typeof e&&"type"in e){const{type:t}=e;return"string"==typeof t}return!1};e.isChannel=e=>{if(e&&"object"==typeof e&&"type"in e&&"id"in e){const{type:t,id:n}=e;return"string"==typeof t&&"string"==typeof n&&("app"===t||"private"===t)}return!1};e.getIntentResolution=async(t,i,r,o)=>{const s=(0,n.generateId)(),a=new Promise(((e,t)=>{fin.InterApplicationBus.subscribe({uuid:"*"},s,(t=>{e(t)})).catch((()=>t(new Error("getResult is not supported in this environment"))))})),d=r?{target:r,intentResolutionResultId:s}:{intentResolutionResultId:s},h=o?{name:o,context:i,metadata:d}:{...i,metadata:d},l=async()=>{let n=await a;if(!n||"object"!=typeof n)throw new Error(c.NoResultReturned);const{error:i}=n;if(i)throw new Error(c.IntentHandlerRejected);if((0,e.isChannel)(n)){const{id:i,type:r}=n;switch(r){case"private":n=await(0,e.connectPrivateChannel)(i);break;case"app":{const r=await t.joinSessionContextGroup(i);n=(0,e.buildAppChannelObject)(r);break}}}else if(!(0,e.isContext)(n))throw new Error(c.NoResultReturned);return n},u=o?await t.fireIntent(h):await t.fireIntentForContext(h);return"object"!=typeof u?{source:{appId:"",instanceId:""},intent:"",version:"2.0",getResult:l}:{...u,getResult:l}}}(nr);var lr,ur,pr={};function wr(){if(ur)return Ki;ur=1;var e,t,n=s&&s.__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},i=s&&s.__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)},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ki,"__esModule",{value:!0}),Ki.InteropClient=void 0;const o=d,a=r(qi),c=function(){if(dr)return er;dr=1,Object.defineProperty(er,"__esModule",{value:!0}),er.Fdc3Module=void 0;const e=Hi,t=hr();class n extends t.FDC3ModuleBase{async open(e,t){await super._open(e,t)}addContextListener(e,t){let n;return this.wire.sendAction("fdc3-add-context-listener").catch((e=>{})),"function"==typeof e?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),n=this.client.addContextHandler(e)):n=this.client.addContextHandler(t,null===e?void 0:e),{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}addIntentListener(e,t){this.wire.sendAction("fdc3-add-intent-listener").catch((e=>{}));const n=this.client.registerIntentHandler((e=>{const{context:n,metadata:i}=e,{metadata:r}=n,o=i?.intentResolutionResultId||r?.intentResolutionResultId;o&&this.fin.InterApplicationBus.publish(o,null).catch((()=>null)),t(e.context)}),e,{fdc3Version:"1.2"});return{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}async raiseIntent(t,n,i){this.wire.sendAction("fdc3-raise-intent").catch((e=>{}));const r=i?{name:t,context:n,metadata:{target:i}}:{name:t,context:n};try{return await this.client.fireIntent(r)}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntent?"ResolverUnavailable":t.message;throw new Error(n)}}async findIntent(t,n){this.wire.sendAction("fdc3-find-intent").catch((e=>{}));try{return await this.client.getInfoForIntent({name:t,context:n})}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntent?"ResolverUnavailable":t.message;throw new Error(n)}}async findIntentsByContext(t){this.wire.sendAction("fdc3-find-intents-by-context").catch((e=>{}));try{return await this.client.getInfoForIntentsByContext(t)}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntentsByContext?"ResolverUnavailable":t.message;throw new Error(n)}}async raiseIntentForContext(t,n){this.wire.sendAction("fdc3-raise-intent-for-context").catch((e=>{}));try{return await this.client.fireIntentForContext({...t,metadata:{target:n}})}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntentForContext?"ResolverUnavailable":t.message;throw new Error(n)}}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}getInfo(){return this.wire.sendAction("fdc3-get-info").catch((e=>{})),{providerVersion:this.wire.environment.getAdapterVersionSync(),provider:`openfin-${this.wire.me.uuid}`,fdc3Version:"1.2"}}}return er.Fdc3Module=n,er}(),h=function(){if(lr)return pr;lr=1,Object.defineProperty(pr,"__esModule",{value:!0}),pr.Fdc3Module2=void 0;const e=hr(),t=Hi,n=wr(),i=nr,r=ir;class o extends e.FDC3ModuleBase{async open(e,t){return"string"==typeof e&&console.warn("Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string })."),super._open(e,t)}async findInstances(e){this.wire.sendAction("fdc3-find-instances").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,"fdc3FindInstances",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3FindInstances?"ResolverUnavailable":e.message;throw new Error(n)}}async getAppMetadata(e){this.wire.sendAction("fdc3-get-app-metadata").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,"fdc3GetAppMetadata",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3GetAppMetadata?"ResolverUnavailable":e.message;throw new Error(n)}}async addContextListener(e,t){this.wire.sendAction("fdc3-add-context-listener").catch((e=>{}));const n=e=>t=>{const{contextMetadata:n,...i}=t,r=n?[{...i},n]:[t,null];e(...r)};let i=t,r=n(i);return"function"==typeof e?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),i=e,r=n(i),this.client.addContextHandler(r)):this.client.addContextHandler(r,null===e?void 0:e)}async findIntent(e,n,i){this.wire.sendAction("fdc3-find-intent").catch((e=>{}));try{return await this.client.getInfoForIntent({name:e,context:n,metadata:{resultType:i}})}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntent?"ResolverUnavailable":e.message;throw new Error(n)}}async findIntentsByContext(e,i){this.wire.sendAction("fdc3-find-intents-by-context").catch((e=>{}));const r=i?{context:e,metadata:{resultType:i}}:e;try{return await n.InteropClient.ferryFdc3Call(this.client,"fdc3v2FindIntentsByContext",r)}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntentsByContext?"ResolverUnavailable":e.message;throw new Error(n)}}async raiseIntent(e,n,r){this.wire.sendAction("fdc3-raise-intent").catch((e=>{}));try{return"string"==typeof r&&console.warn("Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string })."),(0,i.getIntentResolution)(this.client,n,r,e)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?"ResolverUnavailable":e.message;throw new Error(n)}}async raiseIntentForContext(e,n){this.wire.sendAction("fdc3-raise-intent-for-context").catch((e=>{}));try{return"string"==typeof n&&console.warn("Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string })."),(0,i.getIntentResolution)(this.client,e,n)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?"ResolverUnavailable":e.message;throw new Error(n)}}async addIntentListener(e,t){if(this.wire.sendAction("fdc3-add-intent-listener").catch((e=>{})),"string"!=typeof e)throw new Error("First argument must be an Intent name");return this.client.registerIntentHandler((async e=>{let n,i;const{context:r,metadata:o}=e,{contextMetadata:s,metadata:a,...c}=r,d=o?.intentResolutionResultId||a?.intentResolutionResultId;try{const e=a?{metadata:a,...c}:{...c};n=await t(e,s),i=n}catch(e){n=e,i={error:!0}}if(d&&this.fin.InterApplicationBus.publish(d,i).catch((()=>null)),n instanceof Error)throw new Error(n.message);return n}),e,{fdc3Version:"2.0"})}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}async createPrivateChannel(){const e=(0,t.generateId)();await n.InteropClient.ferryFdc3Call(this.client,"createPrivateChannelProvider",{channelId:e});const o=await this.fin.InterApplicationBus.Channel.connect(e),s=new r.PrivateChannelClient(o,e);return(0,i.buildPrivateChannelObject)(s)}async getUserChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:"user",...(0,i.getUnsupportedChannelApis)("User")})))}async getSystemChannels(){return console.warn("This API has been deprecated. Please use fdc3.getUserChannels instead."),super.getSystemChannels()}async joinUserChannel(e){return super.joinChannel(e)}async joinChannel(e){return console.warn("This API has been deprecated. Please use fdc3.joinUserChannel instead."),super.joinChannel(e)}async getCurrentChannel(){const e=await super.getCurrentChannel();return e?{...e,type:"user",broadcast:this.broadcast.bind(this)}:null}async getInfo(){return n.InteropClient.ferryFdc3Call(this.client,"fdc3v2GetInfo",{fdc3Version:"2.0"})}}return pr.Fdc3Module2=o,pr}(),l=Hi;let u=class extends o.Base{constructor(i,r){super(i),e.set(this,void 0),t.set(this,void 0),n(this,t,new Map,"f"),n(this,e,r,"f")}async setContext(t){this.wire.sendAction("interop-client-set-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("setContext",{context:t})}async addContextHandler(t,n){if(this.wire.sendAction("interop-client-add-context-handler").catch((e=>{})),"function"!=typeof t)throw new Error("Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");const r=await i(this,e,"f");let o;o=n?`invokeContextHandler-${n}-${(0,l.generateId)()}`:"invokeContextHandler";const s=(0,l.wrapContextHandler)(t,o);return r.register(o,s),await r.dispatch("contextHandlerRegistered",{handlerId:o,contextType:n}),{unsubscribe:async()=>{r.remove(o),await r.dispatch("removeContextHandler",{handlerId:o})}}}async getContextGroups(){this.wire.sendAction("interop-client-get-context-groups").catch((e=>{}));return(await i(this,e,"f")).dispatch("getContextGroups")}async joinContextGroup(t,n){this.wire.sendAction("interop-client-join-context-group").catch((e=>{}));const r=await i(this,e,"f");if(!t)throw new Error("No contextGroupId specified for joinContextGroup.");return r.dispatch("joinContextGroup",{contextGroupId:t,target:n})}async removeFromContextGroup(t){this.wire.sendAction("interop-client-remove-from-context-group").catch((e=>{}));return(await i(this,e,"f")).dispatch("removeFromContextGroup",{target:t})}async getAllClientsInContextGroup(t){this.wire.sendAction("interop-client-get-all-clients-in-context-group").catch((e=>{}));const n=await i(this,e,"f");if(!t)throw new Error("No contextGroupId specified for getAllClientsInContextGroup.");return n.dispatch("getAllClientsInContextGroup",{contextGroupId:t})}async getInfoForContextGroup(t){this.wire.sendAction("interop-client-get-info-for-context-group").catch((e=>{}));const n=await i(this,e,"f");if(!t)throw new Error("No contextGroupId specified for getInfoForContextGroup.");return n.dispatch("getInfoForContextGroup",{contextGroupId:t})}async fireIntent(t){this.wire.sendAction("interop-client-fire-intent").catch((e=>{}));return(await i(this,e,"f")).dispatch("fireIntent",t)}async registerIntentHandler(t,n,r){this.wire.sendAction("interop-client-register-intent-handler").catch((e=>{}));const o=await i(this,e,"f"),s=`intent-handler-${n}`,a=(0,l.wrapIntentHandler)(t,s);try{await o.register(s,a),await o.dispatch("intentHandlerRegistered",{handlerId:s,...r})}catch(e){throw new Error("Unable to register intent handler")}return{unsubscribe:async()=>{o.remove(s)}}}async getCurrentContext(t){this.wire.sendAction("interop-client-get-current-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("getCurrentContext",{contextType:t})}async getInfoForIntent(t){this.wire.sendAction("interop-client-get-info-for-intent").catch((e=>{}));return(await i(this,e,"f")).dispatch("getInfoForIntent",t)}async getInfoForIntentsByContext(t){this.wire.sendAction("interop-client-get-info-for-intents-by-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("getInfoForIntentsByContext",t)}async fireIntentForContext(t){this.wire.sendAction("interop-client-fire-intent-for-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("fireIntentForContext",t)}async joinSessionContextGroup(n){try{const r=i(this,t,"f").get(n);if(r)return r.getUserInstance();const o=await i(this,e,"f"),{hasConflict:s}=await o.dispatch("sessionContextGroup:createIfNeeded",{sessionContextGroupId:n});s&&console.warn(`A (non-session) context group with the name "${n}" already exists. If you are trying to join a Context Group, call joinContextGroup instead.`);const c=new a.default(this.wire,i(this,e,"f"),n);return i(this,t,"f").set(n,c),c.getUserInstance()}catch(e){throw console.error(`Error thrown trying to create Session Context Group with id "${n}": ${e}`),e}}async onDisconnection(t){this.wire.sendAction("interop-client-add-ondisconnection-listener").catch((e=>{}));return(await i(this,e,"f")).onDisconnection((e=>{const{uuid:n}=e;t({type:"interop-broker",topic:"disconnected",brokerName:n})}))}getFDC3Sync(e){switch(e){case"1.2":return new c.Fdc3Module((()=>this),this.wire);case"2.0":return new h.Fdc3Module2((()=>this),this.wire);default:throw new Error(`Invalid FDC3 version provided: ${e}. Must be '1.2' or '2.0'`)}}async getFDC3(e){return this.getFDC3Sync(e)}static async ferryFdc3Call(t,n,r){return(await i(t,e,"f")).dispatch(n,r||null)}};return Ki.InteropClient=u,e=new WeakMap,t=new WeakMap,Ki}var yr,fr,gr,mr={};function vr(){if(yr)return mr;yr=1,Object.defineProperty(mr,"__esModule",{value:!0}),mr.overrideCheck=mr.checkFDC32Overrides=mr.getDefaultViewFdc3VersionFromAppInfo=void 0;const e=Vi();function t(t){return["fdc3HandleFindInstances","handleInfoForIntent","handleInfoForIntentsByContext","fdc3HandleGetAppMetadata","fdc3HandleGetInfo","fdc3HandleOpen","handleFiredIntent","handleFiredIntentForContext"].filter((n=>t[n]===e.InteropBroker.prototype[n]))}return mr.getDefaultViewFdc3VersionFromAppInfo=function({manifest:e,initialOptions:t}){const n=e?.platform?.defaultViewOptions?.fdc3InteropApi??t.defaultViewOptions?.fdc3InteropApi;return["1.2","2.0"].includes(n??"")?n:void 0},mr.checkFDC32Overrides=t,mr.overrideCheck=function(e,n){if(n&&"2.0"===n){const n=t(e);n.length>0&&console.warn(`WARNING: FDC3 2.0 has been set as a default option for Views in this Platform, but the required InteropBroker APIs for FDC3 2.0 compliance have not all been overridden.\nThe following APIs need to be overridden:\n${n.join("\n")}`)}},mr}function Cr(){return gr||(gr=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),i=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),i(function(){if(fr)return Ti;fr=1;var e=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ti,"__esModule",{value:!0}),Ti.InteropModule=void 0;const t=e(n),i=$i,r=d,o=Vi(),a=wr(),c=vr(),h=Tn,l=e=>new e,u="You have attempted to use or modify InteropBroker parameters, which is not allowed. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.";class p extends r.Base{async init(e,n=l){this.wire.sendAction("interop-init").catch((()=>{}));const r=await this.wire.environment.getInteropInfo(this.wire.getFin()),s=(0,i.createUnusableObject)(u),a=(0,i.createWarningObject)(u,(0,t.default)(r)),d=async()=>{throw new Error(u)},p=o.InteropBroker.createClosedConstructor(this.wire,(()=>this.fin.InterApplicationBus.Channel.create(`interop-broker-${e}`)),r);let w;return w=Array.isArray(n)?new((0,h.overrideFromComposables)(...n)(p))(s,d,a):await n(p,s,d,a),(0,c.overrideCheck)(w,r.fdc3Version),w}connectSync(e,t){return this.wire.sendAction("interop-connect-sync").catch((()=>{})),new a.InteropClient(this.wire,this.wire.environment.whenReady().then((()=>this.fin.InterApplicationBus.Channel.connect(`interop-broker-${e}`,{payload:t}))))}}return Ti.InteropModule=p,Ti}(),e),i(wr(),e),i(Vi(),e)}(Li)),Li}var br={},Ir={},Er={},xr={};Object.defineProperty(xr,"__esModule",{value:!0}),xr.getSnapshotSourceChannelName=void 0;xr.getSnapshotSourceChannelName=e=>`snapshot-source-provider-${e.uuid}`;var Ar,Pr,Mr,_r,Or,Sr=s&&s.__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},Rr=s&&s.__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)};Object.defineProperty(Er,"__esModule",{value:!0}),Er.SnapshotSource=void 0;const Fr=d,jr=xr,kr=new Map;class Lr extends Fr.Base{constructor(e,t){super(e),Ar.set(this,void 0),Pr.set(this,(()=>(kr.has(this.identity.uuid)||kr.set(this.identity.uuid,{eventFired:null,clientPromise:null}),kr.get(this.identity.uuid)))),Mr.set(this,(()=>(Rr(this,Pr,"f").call(this).clientPromise||(Rr(this,Pr,"f").call(this).clientPromise=Rr(this,_r,"f").call(this)),Rr(this,Pr,"f").call(this).clientPromise))),_r.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);try{Rr(this,Pr,"f").call(this).eventFired||await Rr(this,Or,"f").call(this);const t=await this.fin.InterApplicationBus.Channel.connect(e,{wait:!1});return t.onDisconnection((()=>{Rr(this,Pr,"f").call(this).clientPromise=null,Rr(this,Pr,"f").call(this).eventFired=null})),t}catch(e){throw Rr(this,Pr,"f").call(this).clientPromise=null,new Error("The targeted SnapshotSource is not currently initialized. Await this object's ready() method.")}})),Or.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);let t,n;const i=new Promise(((e,i)=>{t=e,n=i}));Rr(this,Pr,"f").call(this).eventFired=i;const r=async i=>{try{i.channelName===e&&(t(),await this.fin.InterApplicationBus.Channel.removeListener("connected",r))}catch(e){n(e)}};await this.fin.InterApplicationBus.Channel.on("connected",r)})),Sr(this,Ar,t,"f")}get identity(){return Rr(this,Ar,"f")}async ready(){this.wire.sendAction("snapshot-source-ready").catch((e=>{}));try{await Rr(this,Mr,"f").call(this)}catch(e){await Rr(this,Pr,"f").call(this).eventFired}}async getSnapshot(){this.wire.sendAction("snapshot-source-get-snapshot").catch((e=>{}));const e=await Rr(this,Mr,"f").call(this),t=await e.dispatch("get-snapshot");return(await t).snapshot}async applySnapshot(e){this.wire.sendAction("snapshot-source-apply-snapshot").catch((e=>{}));return(await Rr(this,Mr,"f").call(this)).dispatch("apply-snapshot",{snapshot:e})}}Er.SnapshotSource=Lr,Ar=new WeakMap,Pr=new WeakMap,Mr=new WeakMap,_r=new WeakMap,Or=new WeakMap,Object.defineProperty(Ir,"__esModule",{value:!0}),Ir.SnapshotSourceModule=void 0;const Tr=d,$r=Er,Br=xr;class Gr extends Tr.Base{async init(e){if(this.wire.sendAction("snapshot-source-init").catch((e=>{})),"object"!=typeof e||"function"!=typeof e.getSnapshot||"function"!=typeof e.applySnapshot)throw new Error("you must pass in a valid SnapshotProvider");const t=await this.fin.InterApplicationBus.Channel.create((0,Br.getSnapshotSourceChannelName)(this.fin.me));t.register("get-snapshot",(async()=>({snapshot:await e.getSnapshot()}))),t.register("apply-snapshot",(({snapshot:t})=>e.applySnapshot(t)))}wrapSync(e){return this.wire.sendAction("snapshot-source-wrap-sync").catch((e=>{})),new $r.SnapshotSource(this.wire,e)}async wrap(e){return this.wire.sendAction("snapshot-source-wrap").catch((e=>{})),this.wrapSync(e)}}Ir.SnapshotSourceModule=Gr,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Ir,e),n(Er,e)}(br),Object.defineProperty(a,"__esModule",{value:!0});var Wr=a.Fin=void 0;const Hr=t,Nr=c,Dr=ie(),Ur=Z(),Vr=de,zr=en,Kr=rn,qr=un,Jr=bn,Yr=J(),Zr=An,Qr=ki,Xr=Cr(),eo=br;class to extends Hr.EventEmitter{constructor(e){super(),this.wire=e,this.System=new Nr.System(e),this.Window=new Dr._WindowModule(e),this.Application=new Ur.ApplicationModule(e),this.InterApplicationBus=new Vr.InterApplicationBus(e),this.Clipboard=new zr.Clipboard(e),this.ExternalApplication=new Kr.ExternalApplicationModule(e),this.Frame=new qr._FrameModule(e),this.GlobalHotkey=new Jr.GlobalHotkey(e),this.Platform=new Zr.PlatformModule(e,this.InterApplicationBus.Channel),this.View=new Yr.ViewModule(e),this.Interop=new Xr.InteropModule(e),this.SnapshotSource=new eo.SnapshotSourceModule(e),e.registerFin(this),this.me=(0,Qr.getMe)(e),e.on("disconnected",(()=>{this.emit("disconnected")}))}}Wr=a.Fin=to;var no={},io={};function ro(e){return"string"==typeof e.manifestUrl}function oo(e){return ao(e)&&"string"==typeof e.address}function so(e){return oo(e)&&"string"==typeof e.token}function ao(e){return"string"==typeof e.uuid}function co(e){return e.runtime&&"string"==typeof e.runtime.version}function ho(e){return ao(e)&&co(e)}Object.defineProperty(io,"__esModule",{value:!0}),io.isInternalConnectConfig=io.isPortDiscoveryConfig=io.isNewConnectConfig=io.isConfigWithReceiver=io.isRemoteConfig=io.isExistingConnectConfig=io.isExternalConfig=void 0,io.isExternalConfig=ro,io.isExistingConnectConfig=oo,io.isRemoteConfig=so,io.isConfigWithReceiver=function(e){return"object"==typeof e.receiver&&so({...e,address:""})},io.isNewConnectConfig=ho,io.isPortDiscoveryConfig=function(e){return ro(e)&&co(e)||ho(e)},io.isInternalConnectConfig=function(e){return oo(e)||ho(e)};var lo={},uo={};Object.defineProperty(uo,"__esModule",{value:!0}),uo.EmitterMap=void 0;const po=t;function wo(e){return Buffer.from(e).toString("base64")}uo.EmitterMap=class{constructor(){this.storage=new Map}hashKeys(e){return e.map(wo).join("/")}getOrCreate(e){const t=this.hashKeys(e);return this.storage.has(t)||this.storage.set(t,new po.EventEmitter),this.storage.get(t)}has(e){return this.storage.has(this.hashKeys(e))}delete(e){const t=this.hashKeys(e);return this.storage.delete(t)}},Object.defineProperty(lo,"__esModule",{value:!0});const yo=uo;class fo extends yo.EmitterMap{constructor(){super(...arguments),this.dispatchEvent=e=>{if(function(e){return"process-desktop-event"===e.action}(e)){const{payload:t}=e,n=function(e){const{topic:t}=e;if("frame"===t||"window"===t||"view"===t){const{uuid:n,name:i}=e;return[t,n,i]}if("application"===t){const{uuid:n}=e;return[t,n]}return[t]}(t);if(this.has(n))return this.getOrCreate(n).emit(t.type,t),!0}return!1}}}lo.default=fo;var go,mo,vo=s&&s.__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},Co=s&&s.__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)},bo=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(no,"__esModule",{value:!0});var Io=no.Transport=void 0;const Eo=t,xo=io,Ao=g,Po=bo(lo),Mo=ki,_o=ke;class Oo extends Eo.EventEmitter{constructor(e,t,n){super(),this.wireListeners=new Map,this.topicRefMap=new Map,this.eventAggregator=new Po.default,this.messageHandlers=[this.eventAggregator.dispatchEvent],go.set(this,void 0),mo.set(this,void 0),this.connectSync=()=>{Co(this,go,"f").connectSync()},this.getPort=()=>Co(this,go,"f").getPort(),vo(this,go,new e(this.onmessage.bind(this)),"f"),this.environment=t,this.sendRaw=Co(this,go,"f").send.bind(Co(this,go,"f")),this.registerMessageHandler(this.handleMessage.bind(this)),Co(this,go,"f").on("disconnected",(()=>{for(const[,{handleNack:e}]of this.wireListeners)e({reason:"Remote connection has closed"});this.wireListeners.clear(),this.emit("disconnected")}));const{uuid:i,name:r}=n,o=this.environment.getCurrentEntityType();this.me=(0,Mo.getBaseMe)(o,i,r)}getFin(){if(!Co(this,mo,"f"))throw new Error("No Fin object registered for this transport");return Co(this,mo,"f")}registerFin(e){if(Co(this,mo,"f"))throw new Error("Fin object has already been registered for this transport");vo(this,mo,e,"f")}shutdown(){return Co(this,go,"f").shutdown()}async connect(e){if((0,xo.isConfigWithReceiver)(e))return await Co(this,go,"f").connect(e.receiver),this.authorize(e);if((0,xo.isRemoteConfig)(e))return this.connectRemote(e);if((0,xo.isExistingConnectConfig)(e))return this.connectByPort(e);if((0,xo.isNewConnectConfig)(e)){const t=await this.environment.retrievePort(e);return this.connectByPort({...e,address:`ws://localhost:${t}`})}}async connectRemote(e){return await Co(this,go,"f").connect(new(this.environment.getWsConstructor())(e.address)),this.authorize(e)}async connectByPort(e){const{address:t,uuid:n}=e,i={...e,type:"file-token"},r=Co(this,go,"f");await r.connect(new(this.environment.getWsConstructor())(e.address));const o=await this.sendAction("request-external-authorization",{uuid:n,type:"file-token"},!0);if("external-authorization-response"!==o.action)throw new Ao.UnexpectedActionError(o.action);return await this.environment.writeToken(o.payload.file,o.payload.token),this.authorize(i)}async authorize(e){const t=await this.sendAction("request-authorization",e,!0);if("authorization-response"!==t.action)throw new Ao.UnexpectedActionError(t.action);if(!0!==t.payload.success)throw new Ao.RuntimeError(t.payload)}sendAction(e,t={},n=!1){let i=()=>{};const r=Ao.RuntimeError.getCallSite(1),o=this.environment.getNextMessageId(),s=new Promise(((s,a)=>{i=a;const c={action:e,payload:t,messageId:o},d=Co(this,go,"f");return this.addWireListener(o,s,(e=>this.nackHandler(e,a,r)),n),d.send(c).catch(a)}));return Object.assign(s,{cancel:i,messageId:o})}nackHandler(e,t,n){t("string"==typeof e?e:new Ao.RuntimeError(e,n))}ferryAction(e){return new Promise(((t,n)=>{const i=this.environment.getNextMessageId();e.messageId=i;const r=e=>{t(e.payload)};return Co(this,go,"f").send(e).then((()=>this.addWireListener(i,r,(e=>this.nackHandler(e,n)),!1))).catch(n)}))}registerMessageHandler(e){this.messageHandlers.push(e)}addWireListener(e,t,n,i){i?this.uncorrelatedListener=t:this.wireListeners.has(e)?n({reason:"Duplicate handler id",error:(0,_o.errorToPOJO)(new Ao.DuplicateCorrelationError(String(e)))}):this.wireListeners.set(e,{resolve:t,handleNack:n})}onmessage(e){for(const t of this.messageHandlers)t.call(null,e)}handleMessage(e){const t=e.correlationId||NaN;if("correlationId"in e){if(!this.wireListeners.has(t))return!1;{const{resolve:n,handleNack:i}=this.wireListeners.get(t);"ack"!==e.action?i({reason:"Did not receive ack action",error:(0,_o.errorToPOJO)(new Ao.NoAckError(e.action))}):"payload"in e?e.payload.success?n.call(null,e):i(e.payload):"string"==typeof e.reason?i(e):(console.warn("Received invalid response from core",e),i({reason:"invalid response shape"})),this.wireListeners.delete(t)}}else this.uncorrelatedListener&&this.uncorrelatedListener.call(null,e),this.uncorrelatedListener=()=>{};return!0}}Io=no.Transport=Oo,go=new WeakMap,mo=new WeakMap;const So=(...e)=>({log:(...t)=>console.debug(`[${(new Date).toISOString()}]`,...(e=>e.map((e=>`[${e}]`)))(e),...t),getLogger:(...t)=>So(...e,...t)}),Ro=So("@openfin/core-web/client");function Fo(e,t){if(!function(e){return"string"==typeof e}(e))throw new Error(`Property ${t} has invalid type. Expected string, got ${typeof e}.`)}const jo="web-broker-ports-ready",ko=Ro.getLogger("get-web-interop-ports");function Lo(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)}function To(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}"function"==typeof SuppressedError&&SuppressedError;const $o=e=>{var n,i,r;return r=class extends t.EventEmitter{constructor(t){super(),n.set(this,void 0),i.set(this,!1),this.connectSync=()=>{Lo(this,i,"f")||(e.addEventListener("message",(e=>{e.data?.topic?.startsWith("wire-message")&&e.data.message&&Lo(this,n,"f").call(this,{...JSON.parse(e.data.message),ports:e.ports})})),e.start())},this.connect=async()=>{this.connectSync()},this.send=t=>(e.postMessage({topic:"wire-message",message:JSON.stringify(t)}),Promise.resolve()),this.shutdown=async()=>{e.close()},To(this,n,t,"f")}getPort(){return e}},n=new WeakMap,i=new WeakMap,r};var Bo={},Go={};Object.defineProperty(Go,"__esModule",{value:!0}),Go.BaseEnvironment=void 0;const Wo=vr();Go.BaseEnvironment=class{async getViewWindowIdentity(e,t){const{identity:n}=await e.View.wrapSync(t).getCurrentWindow();return n}async getInteropInfo(e){const t=await e.Application.getCurrentSync().getInfo().catch((()=>null)),n=t?.initialOptions?.interopBrokerConfiguration??{};return{fdc3Version:t?(0,Wo.getDefaultViewFdc3VersionFromAppInfo)(t):void 0,...n,fdc3Info:{providerVersion:await e.System.getVersion(),provider:"OpenFin"}}}},Object.defineProperty(Bo,"__esModule",{value:!0});var Ho=Bo.BrowserEnvironment=void 0;const No=Go;class Do extends No.BaseEnvironment{constructor(){super(...arguments),this.type="other",this.getRandomId=()=>{const e=new Uint32Array(1);return window.crypto.getRandomValues(e)[0].toString(32)}}getAdapterVersionSync(){return""}observeBounds(e,t){throw new Error("Method not implemented.")}layoutAllowedInContext(e){return!1}initLayoutManager(e,t,n){throw new Error("Method not implemented.")}applyLayoutSnapshot(e,t,n){throw new Error("Method not implemented.")}createLayout(e,t){throw new Error("Method not implemented.")}destroyLayout(e,t){throw new Error("Method not implemented.")}resolveLayout(e,t){throw new Error("Method not implemented.")}initPlatform(...e){throw new Error("Method not implemented.")}writeToken(e,t){return Promise.resolve("")}retrievePort(e){throw new Error("Method not implemented.")}getNextMessageId(){return this.getRandomId()}createChildContent(e){throw new Error("Method not implemented.")}getWebWindow(e){throw new Error("Method not implemented.")}getCurrentEntityIdentity(){throw new Error("Method not implemented.")}getCurrentEntityType(){return"external connection"}raiseEvent(e,t){throw new Error("Method not implemented.")}getUrl(){return location.href}getDefaultChannelOptions(){return{create:{},connect:{}}}getRtcPeer(){return new RTCPeerConnection}getWsConstructor(){return WebSocket}whenReady(){return Promise.resolve()}}Ho=Bo.BrowserEnvironment=Do;const Uo=e=>"platform"in e&&void 0!==e.platform;var Vo,zo;class Ko extends Ho{constructor(e){super(),this.connectConfig=e,Vo.set(this,void 0),zo.set(this,new W((async()=>Promise.resolve().then((function(){return __webpack_require__(/*! ./main-b14f67c9.js */ "./node_modules/@openfin/core-web/out/main-b14f67c9.js")}))))),Uo(e)&&this.validatePlatformOptions(e)}getAdapterVersionSync(){return"0.39.21"}validatePlatformOptions({platform:e}){if(!("layoutSnapshot"in e))throw new Error("Platform options are missing layoutSnapshot. Please provide a layoutSnapshot in the platform options.");if("windows"in e||"windows"in e.layoutSnapshot)throw new Error("It appears you tried to call connect() with a snapshot object from an OpenFin desktop environment. Note that connect() expects to be called with a platform property with this structure: { platform: { layoutSnapshot } }. To get a layoutSnapshot of the expected structure, use fin.Platform.Layout.getCurrentLayoutManagerSync().getLayoutSnapshot() in v34+ in your desktop environment.");const{layouts:t}=e.layoutSnapshot;Object.entries(t).map((([e,t])=>{if("object"!=typeof t||null===t)throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must be an object.`);if(!("content"in t))throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must contain a 'content' property.`)}))}async getInteropInfo(e){return{...{contextGroups:void 0,logging:{beforeAction:{enabled:!1},afterAction:{enabled:!1}}},fdc3Version:void 0,fdc3Info:{providerVersion:"0.39.21",provider:"OpenFin Web"}}}layoutAllowedInContext(e){return!0}async initLayoutManager(e,t,n){if(Lo(this,Vo,"f"))throw new Error("Layout already initialized.");if(!Uo(this.connectConfig))throw new Error("Platform options are missing from connection config.");const{WebLayoutEntryPoint:i}=await Lo(this,zo,"f").getValue();return To(this,Vo,new i(this.connectConfig),"f"),await Lo(this,Vo,"f").initLayoutManager(e,t,n)}async applyLayoutSnapshot(e,t,n){Lo(this,Vo,"f")?.applyLayoutSnapshot(e,t,n)}async createLayout(e,t){return Lo(this,Vo,"f")?.createLayout(e,t)}async destroyLayout(e,t){return Lo(this,Vo,"f")?.destroyLayout(e,t)}async getViewWindowIdentity(e,t){return Promise.resolve({uuid:t.uuid,name:t.uuid})}}Vo=new WeakMap,zo=new WeakMap;const qo=()=>{const e=((e,t)=>{const n=new RegExp(`^${t}<(?.*)>$`).exec(e)?.groups?.meta;if(n)try{return JSON.parse(atob(n))}catch(e){throw new Error(`Failed to decode JSON from ${n}.`)}})(window.name,"of-frame");if(e)try{const{name:t,uuid:n,brokerUrl:i,providerId:r,contextGroup:o}=e;return Fo(i,"brokerUrl"),Fo(n,"uuid"),Fo(t,"name"),{identity:{name:t,uuid:n},brokerUrl:i,interopConfig:{providerId:r,currentContextGroup:o}}}catch(e){throw new Error(`Unexpected error occurred when inferring platform information: ${e.stack}`)}},Jo=()=>{const e=r.v4();return{uuid:e,name:e}},Yo=async e=>{if("enabled"===e.connectionInheritance){const t=await(async e=>{const t=qo();if(t){const{validateOptions:n=(()=>!0)}=e,{identity:i,...r}=t;if(!await n(r))throw new Error("Parent options were rejected by validateOptions.");return t}})(e);if(t)return t}if(!e.options){const t="enabled"===e.connectionInheritance?"Broker URL was not specified nor provided by a platform container.":"Connection inheritance is disabled but no options were provided.";throw new Error(t)}return{...e.options,identity:Jo()}};exports.__classPrivateFieldGet=Lo,exports.__classPrivateFieldSet=To,exports.apiExposer=Gn,exports.commonjsGlobal=s,exports.connect=async t=>{try{Ro.log("Establishing connection",t);const{brokerUrl:n,identity:i,timeout:r,interopConfig:s}=await Yo(t),{workerPort:a,iframeBrokerPort:c}=await(async(e,t,n)=>{const{origin:i}=new URL(e),r=document.createElement("IFRAME");let s;r.style.display="none";try{return await new Promise(((a,c)=>{const d=e=>{if(e.source===r.contentWindow&&e.data?.topic===`ack-${jo}`){if(e.origin!==i)c(new Error(`Broker redirected to unexpected origin ${e.origin}, expected ${i}.`));else if(e.data.success){const[t,n]=e.ports;a({iframeBrokerPort:t,workerPort:n})}else c(new m(e.data));window.removeEventListener("message",d),clearTimeout(s)}};window.addEventListener("message",d),ko.log(`Connecting to broker ${e}`),r.setAttribute("src",e),r.setAttribute("name",o(t,"of-broker")),document.body.appendChild(r),ko.log("Iframe loaded, awaiting init message from iframe"),n&&(s=setTimeout((()=>{window.removeEventListener("message",d),document.body.removeChild(r),c(new Error("Worker did not initialize in time"))}),n))}))}catch(e){throw new Error(`Failed to initialise Fin Web Client. ${e.message}`,{cause:e})}})(n,i,r);Ro.log("Successfully established connection to shared worker");const d={entityType:"external connection",...i};a.start(),c.start();const h=((t,n,i)=>{const r=$o(n),o=new Ko(t),s=new Io(r,o,i);return s.connectSync(),window.Buffer=e.Buffer,new Wr(s)})(t,a,d);return s?.providerId&&(h.me.interop=h.Interop.connectSync(s.providerId),s?.currentContextGroup&&h.me.interop.joinContextGroup(s.currentContextGroup).catch((e=>{console.warn(`Error joining specified context group: ${s?.currentContextGroup}, continuing`,e)}))),{...h,me:{...h.me,identity:{uuid:h.me.uuid,name:h.me.name}}}}catch(e){throw new Error(`An error occured during web-interop connection: ${e.message}`)}},exports.decorators=Nn,exports.encodeOptions=o,exports.layout_constants=ai,exports.lazy=G; +var e=__webpack_require__(/*! buffer/ */ "../../node_modules/buffer/index.js"),t=__webpack_require__(/*! events */ "../../node_modules/events/events.js"),n=__webpack_require__(/*! lodash/cloneDeep */ "../../node_modules/lodash/cloneDeep.js"),i=__webpack_require__(/*! lodash/isEqual */ "../../node_modules/lodash/isEqual.js"),r=__webpack_require__(/*! uuid */ "../../node_modules/uuid/dist/esm-browser/index.js");const o=(e,t)=>`${t}<${btoa(JSON.stringify(e))}>`;var s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof __webpack_require__.g?__webpack_require__.g:"undefined"!=typeof self?self:{},a={},c={},d={},h={};async function l(e){const t=[];for(const n of e){const e=await n();t.push(e)}return t}Object.defineProperty(h,"__esModule",{value:!0}),h.promiseMapSerial=h.serial=h.promiseMap=h.promisify=void 0,h.promisify=function(e){return(...t)=>new Promise(((n,i)=>{e(...t,((e,t)=>e?i(e):n(t)))}))},h.promiseMap=async function(e,t){return Promise.all(e.map(t))},h.serial=l,h.promiseMapSerial=async function(e,t){return l(e.map(((e,n,i)=>()=>t(e,n,i))))};var u,p=s&&s.__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},w=s&&s.__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)};Object.defineProperty(d,"__esModule",{value:!0}),d.Reply=d.EmitterBase=d.Base=void 0;const y=h;class f{constructor(e){this.isNodeEnvironment=()=>"node"===this.wire.environment.type,this.isOpenFinEnvironment=()=>"openfin"===this.wire.environment.type,this.isBrowserEnvironment=()=>"other"===this.wire.environment.type,this.wire=e}get fin(){return this.wire.getFin()}get me(){return this.wire.me}}d.Base=f;d.EmitterBase=class extends f{constructor(e,t,...n){super(e),this.topic=t,u.set(this,void 0),this.eventNames=()=>this.hasEmitter()?this.getOrCreateEmitter().eventNames():[],this.emit=(e,t,...n)=>!!this.hasEmitter()&&this.getOrCreateEmitter().emit(e,t,...n),this.hasEmitter=()=>this.wire.eventAggregator.has(w(this,u,"f")),this.getOrCreateEmitter=()=>this.wire.eventAggregator.getOrCreate(w(this,u,"f")),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[],this.listenerCount=e=>this.hasEmitter()?this.getOrCreateEmitter().listenerCount(e):0,this.registerEventListener=async(e,t={},n,i)=>{const r={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e},o=this.getOrCreateEmitter();n(o);try{await this.wire.sendAction("subscribe-to-desktop-event",r)}catch(e){throw i(o),this.deleteEmitterIfNothingRegistered(o),e}},this.deregisterEventListener=async(e,t={})=>{if(this.hasEmitter()){const n={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e};await this.wire.sendAction("unsubscribe-to-desktop-event",n).catch((()=>null));return this.getOrCreateEmitter()}return Promise.resolve()},p(this,u,[t,...n],"f"),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[]}async on(e,t,n){return await this.registerEventListener(e,n,(n=>{n.on(e,t)}),(n=>{n.removeListener(e,t)})),this}async addListener(e,t,n){return this.on(e,t,n)}async once(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.once(e,i),n.once(e,t)}),(n=>{n.removeListener(e,i),n.removeListener(e,t)})),this}async prependListener(e,t,n){return await this.registerEventListener(e,n,(n=>{n.prependListener(e,t)}),(n=>{n.removeListener(e,t)})),this}async prependOnceListener(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.prependOnceListener(e,t),n.once(e,i)}),(n=>{n.removeListener(e,t),n.removeListener(e,i)})),this}async removeListener(e,t,n){const i=await this.deregisterEventListener(e,n);return i&&(i.removeListener(e,t),this.deleteEmitterIfNothingRegistered(i)),this}async deregisterAllListeners(e){const t={...this.identity,type:e,topic:this.topic};if(this.hasEmitter()){const e=this.getOrCreateEmitter(),n=e.listenerCount(t.type),i=[];for(let e=0;enull)));return await Promise.all(i),e}}async removeAllListeners(e){const t=async e=>{const t=await this.deregisterAllListeners(e);t&&(t.removeAllListeners(e),this.deleteEmitterIfNothingRegistered(t))};if(e)await t(e);else if(this.hasEmitter()){const e=this.getOrCreateEmitter().eventNames();await(0,y.promiseMap)(e,t)}return this}deleteEmitterIfNothingRegistered(e){0===e.eventNames().length&&this.wire.eventAggregator.delete(w(this,u,"f"))}},u=new WeakMap;d.Reply=class{};var g={};Object.defineProperty(g,"__esModule",{value:!0});var m=g.RuntimeError=g.NotSupportedError=g.NotImplementedError=g.NoAckError=g.DuplicateCorrelationError=g.UnexpectedActionError=g.DisconnectedError=void 0;class v extends Error{constructor(e){super(`Expected websocket state OPEN but found ${e}`),this.readyState=e}}g.DisconnectedError=v;class C extends Error{}g.UnexpectedActionError=C;class b extends Error{}g.DuplicateCorrelationError=b;class I extends Error{}g.NoAckError=I;class E extends Error{}g.NotImplementedError=E;class x extends Error{}g.NotSupportedError=x;class A extends Error{constructor(e){const{message:t,name:n,stack:i,...r}=e;super(t),this.name=n||"Error",this.stack=i??this.toString(),Object.keys(r).forEach((e=>{this[e]=r[e]}))}}class P extends Error{static getCallSite(e=0){const t=Error.stackTraceLimit,n=e+1;Error.stackTraceLimit=t+n;const i=Error.prepareStackTrace;Error.prepareStackTrace=(e,t)=>t;const r=(new Error).stack?.slice(n)??[];return Error.prepareStackTrace=i,Error.stackTraceLimit=t,r}static prepareStackTrace(e,t){if("function"==typeof Error.prepareStackTrace)return Error.prepareStackTrace(e,t);let n="";n+=e.name||"Error",n+=`: ${e.message||""}`;for(const e of t)n+=`\n at ${e.toString()}`;return n}constructor(e,t){const{reason:n,error:i}=e;super(n),this.name="RuntimeError",i?.stack&&(this.cause=new A(i)),t&&(this.stack=P.prepareStackTrace(this,t))}}m=g.RuntimeError=P;var M={},_={},O={};Object.defineProperty(O,"__esModule",{value:!0}),O.validateIdentity=void 0,O.validateIdentity=function(e){let t;return"object"==typeof e&&"string"==typeof e.uuid||(t="Not a valid identity object"),t};var S={},R={},F={},j={},k={},L={},T={};Object.defineProperty(T,"__esModule",{value:!0}),T.handleDeprecatedWarnings=void 0;var $;T.handleDeprecatedWarnings=e=>{(e.contentNavigation?.whitelist||e.contentNavigation?.blacklist||e.contentRedirect?.whitelist||e.contentRedirect?.blacklist)&&console.warn("The properties 'whitelist' and 'blacklist' have been marked as deprecated and will be removed in a future version. Please use 'allowlist' and 'denylist'.")};var B={},G={};Object.defineProperty(G,"__esModule",{value:!0}),G.AsyncRetryableLazy=W=G.Lazy=void 0;var W=G.Lazy=class{constructor(e){this.producerFn=e}getValue(){return this.value||(this.value=this.producerFn()),this.value}};G.AsyncRetryableLazy=class{constructor(e){this.producerFn=e}async getValue(){return this.promise||(this.promise=this.producerFn().catch((e=>{throw delete this.promise,e}))),this.promise}};var H={};Object.defineProperty(H,"__esModule",{value:!0}),H.WebContents=void 0;const N=d;class D extends N.EmitterBase{constructor(e,t,n){super(e,n,t.uuid,t.name),this.identity=t,this.entityType=n}capturePage(e){return this.wire.sendAction("capture-page",{options:e,...this.identity}).then((({payload:e})=>e.data))}executeJavaScript(e){return this.wire.sendAction("execute-javascript-in-window",{...this.identity,code:e}).then((({payload:e})=>e.data))}getZoomLevel(){return this.wire.sendAction("get-zoom-level",this.identity).then((({payload:e})=>e.data))}setZoomLevel(e){return this.wire.sendAction("set-zoom-level",{...this.identity,level:e}).then((()=>{}))}navigate(e){return this.wire.sendAction("navigate-window",{...this.identity,url:e}).then((()=>{}))}navigateBack(){return this.wire.sendAction("navigate-window-back",{...this.identity}).then((()=>{}))}async navigateForward(){await this.wire.sendAction("navigate-window-forward",{...this.identity})}stopNavigation(){return this.wire.sendAction("stop-window-navigation",{...this.identity}).then((()=>{}))}reload(e=!1){return this.wire.sendAction("reload-window",{ignoreCache:e,...this.identity}).then((()=>{}))}print(e={}){return this.wire.sendAction("print",{...this.identity,options:e}).then((()=>{}))}findInPage(e,t){return this.wire.sendAction("find-in-page",{...this.identity,searchTerm:e,options:t}).then((({payload:e})=>e.data))}stopFindInPage(e){return this.wire.sendAction("stop-find-in-page",{...this.identity,action:e}).then((()=>{}))}getPrinters(){return this.wire.sendAction("get-printers",{...this.identity}).then((({payload:e})=>e.data))}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){await this.wire.sendAction("focus-window",{emitSynthFocused:e,...this.identity})}async showDeveloperTools(){await this.wire.sendAction("show-developer-tools",this.identity)}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction("get-process-info",this.identity);return e}async getSharedWorkers(){return this.wire.sendAction("get-shared-workers",this.identity).then((({payload:e})=>e.data))}async inspectSharedWorker(){await this.wire.sendAction("inspect-shared-worker",{...this.identity})}async inspectSharedWorkerById(e){await this.wire.sendAction("inspect-shared-worker-by-id",{...this.identity,workerId:e})}async inspectServiceWorker(){await this.wire.sendAction("inspect-service-worker",{...this.identity})}async showPopupWindow(e){if(this.wire.sendAction(`${this.entityType}-show-popup-window`,this.identity).catch((()=>{})),e?.onPopupReady){const t=async({popupName:t})=>{try{const n=this.fin.Window.wrapSync({uuid:this.fin.me.uuid,name:t});await e.onPopupReady(n)}catch(e){throw new Error(`Something went wrong during onPopupReady execution: ${e}`)}};await this.once("popup-ready",t)}const{payload:t}=await this.wire.sendAction("try-create-popup-window",{options:{...e,hasResultCallback:!!e?.onPopupResult,hasReadyCallback:!!e?.onPopupReady},...this.identity}),{data:{willOpen:n,options:i}}=t;n&&await this.fin.Window.create(i.initialOptions);if(e?.onPopupResult){const t=async t=>{await e.onPopupResult((e=>{const{name:t,uuid:n,result:i,data:r}=e,o={identity:{name:t,uuid:n},result:i};return r&&(o.data=r),o})(t))},n=async()=>{await this.removeListener("popup-result",t)};await this.on("popup-result",t),await this.once("popup-teardown",n)}const{payload:r}=await this.wire.sendAction("show-popup-window",{options:i,...this.identity});return r.data}}var U,V,z,K,q;function J(){return V||(V=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(function(){if($)return L;$=1,Object.defineProperty(L,"__esModule",{value:!0}),L.ViewModule=void 0;const e=d,t=O,n=J(),i=T;class r extends e.Base{async create(e){const{uuid:t}=this.wire.me;if(!e.name||"string"!=typeof e.name)throw new Error("Please provide a name property as a string in order to create a View.");return(0,i.handleDeprecatedWarnings)(e),this.wire.environment.childViews?await this.wire.environment.createChildContent({entityType:"view",options:{...e,uuid:t}}):await this.wire.sendAction("create-view",{...e,uuid:t}),this.wrapSync({uuid:t,name:e.name})}async wrap(e){this.wire.sendAction("view-wrap").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}wrapSync(e){this.wire.sendAction("view-wrap-sync").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}getCurrent(){if(this.wire.sendAction("view-get-current").catch((e=>{})),!this.wire.me.isView)throw new Error("You are not in a View context");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction("view-get-current-sync").catch((e=>{})),!this.wire.me.isView)throw new Error("You are not in a View context");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return L.ViewModule=r,L}(),e),n(function(){if(U)return B;var e;U=1,Object.defineProperty(B,"__esModule",{value:!0}),B.View=void 0;const t=g,n=G,i=H,r=ie();class o extends i.WebContents{constructor(i,o){super(i,o,"view"),this.identity=o,e.set(this,new n.Lazy((()=>this.fin.Platform.wrapSync(this.identity).getClient()))),this.attach=async e=>{await this.wire.sendAction("attach-view",{target:e,...this.identity})},this.destroy=async()=>{await this.wire.sendAction("destroy-view",{...this.identity})},this.show=async()=>{await this.wire.sendAction("show-view",{...this.identity})},this.showAt=async(e,t={})=>{await this.wire.sendAction("show-view-at",{bounds:e,...this.identity,options:t})},this.bringToFront=async()=>{await this.wire.sendAction("bring-view-to-front",{...this.identity})},this.hide=async()=>{await this.wire.sendAction("hide-view",{...this.identity})},this.setBounds=async e=>{await this.wire.sendAction("set-view-bounds",{bounds:e,...this.identity})},this.getBounds=async()=>(await this.wire.sendAction("get-view-bounds",{...this.identity})).payload.data,this.getInfo=async()=>(await this.wire.sendAction("get-view-info",{...this.identity})).payload.data,this.getParentLayout=async()=>(this.wire.sendAction("view-get-parent-layout",{...this.identity}).catch((()=>{})),this.fin.Platform.Layout.getLayoutByViewIdentity(this.identity)),this.getOptions=async()=>this.wire.sendAction("get-view-options",{...this.identity}).then((({payload:e})=>e.data)),this.updateOptions=async e=>this.wire.sendAction("update-view-options",{options:e,...this.identity}).then((()=>{})),this.getCurrentWindow=async()=>{const{payload:{data:e}}=await this.wire.sendAction("get-view-window",{...this.identity});return new r._Window(this.wire,e)},this.getCurrentStack=async()=>{this.wire.sendAction("view-get-current-stack").catch((()=>{}));try{return(await this.getParentLayout()).getStackByViewIdentity(this.identity)}catch(e){throw new t.RuntimeError({reason:"This view does not belong to a stack.",error:e})}},this.triggerBeforeUnload=async()=>(await this.wire.sendAction("trigger-before-unload",{...this.identity})).payload.data,this.bindToElement=async e=>{if(!e)throw new Error("Element not found.");return this.wire.environment.observeBounds(e,(async e=>this.setBounds(e)))}}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){const t=await this.getCurrentWindow();await t.focusedWebViewWasChanged(),await super.focus({emitSynthFocused:e})}}return B.View=o,e=new WeakMap,B}(),e)}(k)),k}function Y(){if(z)return j;z=1,Object.defineProperty(j,"__esModule",{value:!0}),j.Application=void 0;const e=d,t=ie(),n=J();class i extends e.EmitterBase{constructor(e,n){super(e,"application",n.uuid),this.identity=n,this.window=new t._Window(this.wire,{uuid:this.identity.uuid,name:this.identity.uuid})}windowListFromIdentityList(e){const n=[];return e.forEach((e=>{n.push(new t._Window(this.wire,{uuid:e.uuid,name:e.name}))})),n}isRunning(){return this.wire.sendAction("is-application-running",this.identity).then((({payload:e})=>e.data))}async quit(e=!1){try{await this._close(e),await this.wire.sendAction("destroy-application",{force:e,...this.identity})}catch(e){if(!["Remote connection has closed","Could not locate the requested application"].some((t=>e.message.includes(t))))throw e}}async _close(e=!1){try{await this.wire.sendAction("close-application",{force:e,...this.identity})}catch(e){if(!e.message.includes("Remote connection has closed"))throw e}}close(e=!1){return console.warn("Deprecation Warning: Application.close is deprecated Please use Application.quit"),this.wire.sendAction("application-close",this.identity).catch((e=>{})),this._close(e)}getChildWindows(){return this.wire.sendAction("get-child-windows",this.identity).then((({payload:e})=>{const t=[];return e.data.forEach((e=>{t.push({uuid:this.identity.uuid,name:e})})),this.windowListFromIdentityList(t)}))}getManifest(){return this.wire.sendAction("get-application-manifest",this.identity).then((({payload:e})=>e.data))}getParentUuid(){return this.wire.sendAction("get-parent-application",this.identity).then((({payload:e})=>e.data))}getShortcuts(){return this.wire.sendAction("get-shortcuts",this.identity).then((({payload:e})=>e.data))}async getViews(){const{payload:e}=await this.wire.sendAction("application-get-views",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}getZoomLevel(){return this.wire.sendAction("get-application-zoom-level",this.identity).then((({payload:e})=>e.data))}getWindow(){return this.wire.sendAction("application-get-window",this.identity).catch((e=>{})),Promise.resolve(this.window)}registerUser(e,t){return this.wire.sendAction("register-user",{userName:e,appName:t,...this.identity}).then((()=>{}))}removeTrayIcon(){return this.wire.sendAction("remove-tray-icon",this.identity).then((()=>{}))}restart(){return this.wire.sendAction("restart-application",this.identity).then((()=>{}))}run(){return console.warn("Deprecation Warning: Application.run is deprecated Please use fin.Application.start"),this.wire.sendAction("application-run",this.identity).catch((e=>{})),this._run()}_run(e={}){return this.wire.sendAction("run-application",{manifestUrl:this._manifestUrl,opts:e,...this.identity}).then((()=>{}))}scheduleRestart(){return this.wire.sendAction("relaunch-on-close",this.identity).then((()=>{}))}async sendApplicationLog(){const{payload:e}=await this.wire.sendAction("send-application-log",this.identity);return e.data}async setJumpList(e){await this.wire.sendAction("set-jump-list",{config:e,...this.identity})}setTrayIcon(e){return this.wire.sendAction("set-tray-icon",{enabledIcon:e,...this.identity}).then((()=>{}))}setShortcuts(e){return this.wire.sendAction("set-shortcuts",{data:e,...this.identity}).then((()=>{}))}async setShortcutQueryParams(e){await this.wire.sendAction("set-shortcut-query-args",{data:e,...this.identity})}setZoomLevel(e){return this.wire.sendAction("set-application-zoom-level",{level:e,...this.identity}).then((()=>{}))}async setAppLogUsername(e){await this.wire.sendAction("set-app-log-username",{data:e,...this.identity})}getTrayIconInfo(){return this.wire.sendAction("get-tray-icon-info",this.identity).then((({payload:e})=>e.data))}hasTrayIcon(){return this.wire.sendAction("has-tray-icon",this.identity).then((({payload:e})=>e.data))}terminate(){return this.wire.sendAction("terminate-application",this.identity).then((()=>{}))}wait(){return this.wire.sendAction("wait-for-hung-application",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction("get-info",this.identity).then((({payload:e})=>e.data))}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction("application-get-process-info",this.identity);return e}async setFileDownloadLocation(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t};await this.wire.sendAction("set-file-download-location",{...n,downloadLocation:e})}async getFileDownloadLocation(){const{payload:{data:e}}=await this.wire.sendAction("get-file-download-location",this.identity);return e}async showTrayIconPopupMenu(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t},{payload:i}=await this.wire.sendAction("show-tray-icon-popup-menu",{...n,options:e});return i.data}async closeTrayIconPopupMenu(){const{name:e}=this.wire.me,t={uuid:this.identity.uuid,name:e};await this.wire.sendAction("close-tray-icon-popup-menu",{...t})}}return j.Application=i,j}function Z(){return q||(q=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(function(){if(K)return F;K=1,Object.defineProperty(F,"__esModule",{value:!0}),F.ApplicationModule=void 0;const e=d,t=O,n=Y();class i extends e.Base{async wrap(e){this.wire.sendAction("wrap-application").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}wrapSync(e){this.wire.sendAction("wrap-application-sync").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}async _create(e){return void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&void 0===e.isPlatformController&&(e.autoShow=!0),await this.wire.sendAction("create-application",e),this.wrap({uuid:e.uuid})}create(e){return console.warn("Deprecation Warning: fin.Application.create is deprecated. Please use fin.Application.start"),this.wire.sendAction("application-create").catch((e=>{})),this._create(e)}async start(e){this.wire.sendAction("start-application").catch((e=>{}));const t=await this._create(e);return await this.wire.sendAction("run-application",{uuid:e.uuid}),t}async startManyManifests(e,t){return this.wire.sendAction("run-applications",{applications:e,opts:t}).then((()=>{}))}getCurrent(){return this.wire.sendAction("get-current-application").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction("get-current-application-sync").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}async startFromManifest(e,t){this.wire.sendAction("application-start-from-manifest").catch((e=>{}));const n=await this._createFromManifest(e);return await n._run(t),n}createFromManifest(e){return console.warn("Deprecation Warning: fin.Application.createFromManifest is deprecated. Please use fin.Application.startFromManifest"),this.wire.sendAction("application-create-from-manifest").catch((e=>{})),this._createFromManifest(e)}_createFromManifest(e){return this.wire.sendAction("get-application-manifest",{manifestUrl:e}).then((({payload:e})=>{const t=e.data.platform?e.data.platform.uuid:e.data.startup_app.uuid;return this.wrap({uuid:t})})).then((t=>(t._manifestUrl=e,t)))}}return F.ApplicationModule=i,F}(),e),n(Y(),e)}(R)),R}H.WebContents=D;var Q={};Object.defineProperty(Q,"__esModule",{value:!0}),Q.promisifySubscription=void 0;var X,ee,te;function ne(){if(X)return S;X=1,Object.defineProperty(S,"__esModule",{value:!0}),S._Window=void 0;const e=Z(),t=H,n=J(),i=T,r=Q;class o extends t.WebContents{constructor(e,t){super(e,t,"window")}async createWindow(e){this.wire.sendAction("window-create-window",this.identity).catch((e=>{}));const t=await(0,r.promisifySubscription)(this,"fire-constructor-callback");void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&(e.autoShow=!0),(0,i.handleDeprecatedWarnings)(e);const n=this.wire.environment.createChildContent({entityType:"window",options:e}),[o]=await Promise.all([t.getValue(),n]);let s;const{success:a}=o,c=o.data,{message:d}=c;s=a?{httpResponseCode:c.httpResponseCode,apiInjected:c.apiInjected}:{message:c.message,networkErrorCode:c.networkErrorCode,stack:c.stack};const h={message:d,cbPayload:s,success:a};try{this.getWebWindow().fin.__internal_.openerSuccessCBCalled()}catch(e){}return h.success?this:Promise.reject(h)}getAllFrames(){return this.wire.sendAction("get-all-frames",this.identity).then((({payload:e})=>e.data))}getBounds(){return this.wire.sendAction("get-window-bounds",this.identity).then((({payload:e})=>e.data))}center(){return this.wire.sendAction("center-window",this.identity).then((()=>{}))}blur(){return this.wire.sendAction("blur-window",this.identity).then((()=>{}))}bringToFront(){return this.wire.sendAction("bring-window-to-front",this.identity).then((()=>{}))}animate(e,t){return this.wire.sendAction("animate-window",{transitions:e,options:t,...this.identity}).then((()=>{}))}hide(){return this.wire.sendAction("hide-window",this.identity).then((()=>{}))}close(e=!1){return this.wire.sendAction("close-window",{force:e,...this.identity}).then((()=>{Object.setPrototypeOf(this,null)}))}focusedWebViewWasChanged(){return this.wire.sendAction("focused-webview-changed",this.identity).then((()=>{}))}getNativeId(){return this.wire.sendAction("get-window-native-id",this.identity).then((({payload:e})=>e.data))}async getCurrentViews(){const{payload:e}=await this.wire.sendAction("window-get-views",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}disableFrame(){return console.warn("Function is deprecated; use disableUserMovement instead."),this.wire.sendAction("disable-window-frame",this.identity).then((()=>{}))}disableUserMovement(){return this.wire.sendAction("disable-window-frame",this.identity).then((()=>{}))}enableFrame(){return console.warn("Function is deprecated; use enableUserMovement instead."),this.wire.sendAction("enable-window-frame",this.identity).then((()=>{}))}enableUserMovement(){return this.wire.sendAction("enable-window-frame",this.identity).then((()=>{}))}flash(){return this.wire.sendAction("flash-window",this.identity).then((()=>{}))}stopFlashing(){return this.wire.sendAction("stop-flash-window",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction("get-window-info",this.identity).then((({payload:e})=>e.data))}async getLayout(e){this.wire.sendAction("window-get-layout",this.identity).catch((e=>{}));const t=await this.getOptions();if(!t.layout&&!t.layoutSnapshot)throw new Error("Window does not have a Layout");return this.fin.Platform.Layout.wrap(e??this.identity)}getOptions(){return this.wire.sendAction("get-window-options",this.identity).then((({payload:e})=>e.data))}getParentApplication(){return this.wire.sendAction("window-get-parent-application",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity))}getParentWindow(){return this.wire.sendAction("window-get-parent-window",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity)).then((e=>e.getWindow()))}async getSnapshot(e){const t={area:e,...this.identity};console.warn("Window.getSnapshot has been deprecated, please use Window.capturePage");return(await this.wire.sendAction("get-window-snapshot",t)).payload.data}getState(){return this.wire.sendAction("get-window-state",this.identity).then((({payload:e})=>e.data))}getWebWindow(){return this.wire.sendAction("window-get-web-window",this.identity).catch((e=>{})),this.wire.environment.getWebWindow(this.identity)}isMainWindow(){return this.wire.sendAction("window-is-main-window",this.identity).catch((e=>{})),this.me.uuid===this.me.name}isShowing(){return this.wire.sendAction("is-window-showing",this.identity).then((({payload:e})=>e.data))}maximize(){return this.wire.sendAction("maximize-window",this.identity).then((()=>{}))}minimize(){return this.wire.sendAction("minimize-window",this.identity).then((()=>{}))}moveBy(e,t,n){return this.wire.sendAction("move-window-by",{deltaLeft:e,deltaTop:t,positioningOptions:n,...this.identity}).then((()=>{}))}moveTo(e,t,n){return this.wire.sendAction("move-window",{left:e,top:t,positioningOptions:n,...this.identity}).then((()=>{}))}resizeBy(e,t,n,i){return this.wire.sendAction("resize-window-by",{deltaWidth:Math.floor(e),deltaHeight:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}resizeTo(e,t,n,i){return this.wire.sendAction("resize-window",{width:Math.floor(e),height:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}restore(){return this.wire.sendAction("restore-window",this.identity).then((()=>{}))}setAsForeground(){return this.wire.sendAction("set-foreground-window",this.identity).then((()=>{}))}setBounds(e,t){return this.wire.sendAction("set-window-bounds",{...e,...this.identity,positioningOptions:t}).then((()=>{}))}show(e=!1){return this.wire.sendAction("show-window",{force:e,...this.identity}).then((()=>{}))}showAt(e,t,n=!1){return this.wire.sendAction("show-at-window",{force:n,left:Math.floor(e),top:Math.floor(t),...this.identity}).then((()=>{}))}updateOptions(e){return this.wire.sendAction("update-window-options",{options:e,...this.identity}).then((()=>{}))}authenticate(e,t){return this.wire.sendAction("window-authenticate",{userName:e,password:t,...this.identity}).then((()=>{}))}async showPopupMenu(e){const{payload:t}=await this.wire.sendAction("show-popup-menu",{options:e,...this.identity});return t.data}async closePopupMenu(){return this.wire.sendAction("close-popup-menu",{...this.identity}).then((()=>{}))}async dispatchPopupResult(e){this.wire.sendAction("window-dispatch-popup-result",this.identity).catch((e=>{})),await this.wire.sendAction("dispatch-popup-result",{data:e,...this.identity})}async print(e={content:"self"}){switch(e.content){case void 0:case"self":return super.print(e);case"screenshot":return this.wire.sendAction("print-screenshot",this.identity).then((()=>{}));case"views":return this.wire.sendAction("print-views",{...this.identity,options:e}).then((()=>{}));default:return}}}return S._Window=o,S}function ie(){return te||(te=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(function(){if(ee)return _;ee=1,Object.defineProperty(_,"__esModule",{value:!0}),_._WindowModule=void 0;const e=d,t=O,n=ne();class i extends e.Base{async wrap(e){this.wire.sendAction("window-wrap").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}wrapSync(e){this.wire.sendAction("window-wrap-sync").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}create(e){return this.wire.sendAction("create-window").catch((e=>{})),new n._Window(this.wire,{uuid:this.me.uuid,name:e.name}).createWindow(e)}getCurrent(){if(this.wire.sendAction("get-current-window").catch((e=>{})),!this.wire.me.isWindow)throw new Error("You are not in a Window context");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction("get-current-window-sync").catch((e=>{})),!this.wire.me.isWindow)throw new Error("You are not in a Window context");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return _._WindowModule=i,_}(),e),n(ne(),e)}(M)),M}Q.promisifySubscription=async(e,t,n=(()=>!0),i)=>{let r,o,s;const a=new Promise(((e,t)=>{r=e,o=t})),c=e=>{n(e)&&(clearTimeout(s),r(e))};return await e.on(t,c),i&&(s=setTimeout((()=>o(new Error("event timed out"))),i)),a.finally((()=>{e.removeListener(t,c).catch((()=>null))})),{getValue:()=>a}},Object.defineProperty(c,"__esModule",{value:!0}),c.System=void 0;const re=d,oe=g,se=ie(),ae=t;class ce extends re.EmitterBase{constructor(e){super(e,"system")}sendExternalProcessRequest(e,t){return new Promise(((n,i)=>{const r="external-process-exited";let o,s,a,c;"function"==typeof t.listener&&(a=e=>{const n=e||{};s={topic:"exited",uuid:n.processUuid||"",exitCode:n.exitCode||0},o===e.processUuid&&(t.listener(s),c.removeListener(r,a))},this.wire.me.name||(this.wire.me.name=this.wire.me.uuid),c=new se._Window(this.wire,this.wire.me),c.on(r,a)),this.wire.sendAction(e,t).then((({payload:e})=>{o=e.data.uuid,n(e.data),s&&o===s.uuid&&(t.listener(s),c.removeListener(r,a))})).catch((e=>{c&&c.removeListener(r,a),i(e)}))}))}getVersion(){return this.wire.sendAction("get-version").then((({payload:e})=>e.data))}clearCache(e){return this.wire.sendAction("clear-cache",e).then((()=>{}))}deleteCacheOnExit(){return this.wire.sendAction("delete-cache-request").then((()=>{}))}exit(){return this.wire.sendAction("exit-desktop").then((()=>{}))}async fetchManifest(e){const{payload:{data:t}}=await this.wire.sendAction("fetch-manifest",{manifestUrl:e});return t}flushCookieStore(){return this.wire.sendAction("flush-cookie-store").then((()=>{}))}getAllWindows(){return this.wire.sendAction("get-all-windows").then((({payload:e})=>e.data))}getAllApplications(){return this.wire.sendAction("get-all-applications").then((({payload:e})=>e.data))}getCommandLineArguments(){return this.wire.sendAction("get-command-line-arguments").then((({payload:e})=>e.data))}async getCrashReporterState(){const{payload:{data:{diagnosticMode:e,isRunning:t}}}=await this.wire.sendAction("get-crash-reporter-state");return console.warn("diagnosticMode property is deprecated. It will be removed in a future version"),{diagnosticMode:e,diagnosticsMode:e,isRunning:t}}async startCrashReporter(e){const t=e,n={...t,diagnosticMode:t.diagnosticsMode||t.diagnosticMode},{payload:{data:{diagnosticMode:i,isRunning:r}}}=await this.wire.sendAction("start-crash-reporter",n);return{diagnosticMode:i,diagnosticsMode:i,isRunning:r}}getUniqueUserId(){return this.wire.sendAction("get-unique-user-id").then((({payload:e})=>e.data))}getEntityInfo(e,t){return this.wire.sendAction("get-entity-info",{uuid:e,name:t}).then((({payload:e})=>e.data))}getEnvironmentVariable(e){return this.wire.sendAction("get-environment-variable",{environmentVariables:e}).then((({payload:e})=>e.data))}getFocusedWindow(){return this.wire.sendAction("get-focused-window").then((({payload:e})=>e.data))}async isAppCertified(e){const{payload:{data:{certifiedInfo:t}}}=await this.wire.sendAction("is-app-certified",{manifestUrl:e});return t}getInstalledRuntimes(){return this.wire.sendAction("get-installed-runtimes").then((({payload:e})=>e.data.runtimes))}async getInstalledApps(){const{payload:{data:{installedApps:e}}}=await this.wire.sendAction("get-installed-apps");return e}getLog(e){return this.wire.sendAction("view-log",e).then((({payload:e})=>e.data))}getMachineId(){return this.wire.sendAction("get-machine-id").then((({payload:e})=>e.data))}getMinLogLevel(){return this.wire.sendAction("get-min-log-level").then((({payload:e})=>e.data))}getLogList(){return this.wire.sendAction("list-logs").then((({payload:e})=>e.data))}getMonitorInfo(){return this.wire.sendAction("get-monitor-info").then((({payload:e})=>e.data))}getMousePosition(){return this.wire.sendAction("get-mouse-position").then((({payload:e})=>e.data))}getProcessList(){return console.warn("System.getProcessList has been deprecated. Please consider using our new process APIs: Window.getProcessInfo, View.getProcessInfo, Application.getProcessInfo, System.getAllProcessInfo"),this.wire.sendAction("process-snapshot").then((({payload:e})=>e.data))}async getAllProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction("get-all-process-info",this.identity);return e}getProxySettings(){return this.wire.sendAction("get-proxy-settings").then((({payload:e})=>e.data))}getRuntimeInfo(){return this.wire.sendAction("get-runtime-info").then((({payload:e})=>e.data))}getRvmInfo(){return this.wire.sendAction("get-rvm-info").then((({payload:e})=>e.data))}getHostSpecs(){return this.wire.sendAction("get-host-specs").then((({payload:e})=>e.data))}getOSInfo(){return this.wire.sendAction("get-os-info").then((({payload:e})=>e.data))}launchExternalProcess(e){return this.sendExternalProcessRequest("launch-external-process",e)}monitorExternalProcess(e){return this.sendExternalProcessRequest("monitor-external-process",e)}log(e,t){return this.wire.sendAction("write-to-log",{level:e,message:t}).then((()=>{}))}openUrlWithBrowser(e){return this.wire.sendAction("open-url-with-browser",{url:e}).then((()=>{}))}async registerCustomProtocol(e){if("object"!=typeof e)throw new Error("Must provide an object with a `protocolName` property having a string value.");await this.wire.sendAction("register-custom-protocol",e)}async unregisterCustomProtocol(e){await this.wire.sendAction("unregister-custom-protocol",{protocolName:e})}async getCustomProtocolState(e){return this.wire.sendAction("get-custom-protocol-state",{protocolName:e}).then((({payload:e})=>e.data))}releaseExternalProcess(e){return this.wire.sendAction("release-external-process",{uuid:e}).then((()=>{}))}showDeveloperTools(e){return this.wire.sendAction("show-developer-tools",e).then((()=>{}))}terminateExternalProcess(e){return this.wire.sendAction("terminate-external-process",e).then((()=>{}))}updateProxySettings(e){return this.wire.sendAction("update-proxy",e).then((()=>{}))}async downloadAsset(e,t){const n=()=>{};let i=n,r=n;const o=new Promise(((e,t)=>{i=e,r=t}));if("openfin"!==this.wire.environment.type)throw new oe.NotSupportedError("downloadAsset only supported in an OpenFin Render process");const s=oe.RuntimeError.getCallSite(),a=this.wire.environment.getNextMessageId().toString(),c=`asset-download-progress-${a}`,d=`asset-download-error-${a}`,h=`asset-download-complete-${a}`,l=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},u=()=>{this.removeListener(c,l)};await Promise.all([this.on(c,l),this.once(d,(e=>{u();const{reason:t,err:n}=e;r(new oe.RuntimeError({reason:t,error:n},s))})),this.once(h,(()=>{u(),i()}))]);const p=Object.assign(e,{downloadId:a});return await this.wire.sendAction("download-asset",p).catch((e=>{throw u(),e})),o}downloadRuntime(e,t){const n=oe.RuntimeError.getCallSite();return new Promise(((i,r)=>{if("openfin"!==this.wire.environment.type)return void r(new oe.NotSupportedError("downloadRuntime only supported in an OpenFin Render process"));const o=this.wire.environment.getNextMessageId().toString(),s=`runtime-download-progress-${o}`,a=`runtime-download-error-${o}`,c=`runtime-download-complete-${o}`,d=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},h=()=>{this.removeListener(s,d)};this.on(s,d),this.once(a,(e=>{h();const{reason:t,err:i}=e;r(new oe.RuntimeError({reason:t,error:i},n))})),this.once(c,(()=>{h(),i()}));const l=Object.assign(e,{downloadId:o});this.wire.sendAction("download-runtime",l).catch((e=>{h(),r(e)}))}))}downloadPreloadScripts(e){return this.wire.sendAction("download-preload-scripts",{scripts:e}).then((({payload:e})=>e.data))}getAllExternalApplications(){return this.wire.sendAction("get-all-external-applications").then((({payload:e})=>e.data))}getAppAssetInfo(e){return this.wire.sendAction("get-app-asset-info",e).then((({payload:e})=>e.data))}getCookies(e){const t=this.wire.environment.getUrl(),n=Object.assign(e,{url:t});return this.wire.sendAction("get-cookies",n).then((({payload:e})=>e.data))}setMinLogLevel(e){return this.wire.sendAction("set-min-log-level",{level:e}).then((()=>{}))}resolveUuid(e){return this.wire.sendAction("resolve-uuid",{entityKey:e}).then((({payload:e})=>e.data))}executeOnRemote(e,t){return t.requestingIdentity=e,this.wire.ferryAction(t)}readRegistryValue(e,t,n){return this.wire.sendAction("read-registry-value",{rootKey:e,subkey:t,value:n}).then((({payload:e})=>e.data))}registerExternalConnection(e){return this.wire.sendAction("register-external-connection",{uuid:e}).then((({payload:e})=>e.data))}async getServiceConfiguration(e){if("string"!=typeof e.name)throw new Error("Must provide an object with a `name` property having a string value");const{name:t}=e;return this.wire.sendAction("get-service-configuration",{name:t}).then((({payload:e})=>e.data))}async getSystemAppConfig(e){if("string"!=typeof e)throw new Error("Must provide a string value for name of system app");return this.wire.sendAction("get-system-app-configuration",{name:e}).then((({payload:e})=>e.data))}async registerShutdownHandler(e){this.wire.sendAction("system-register-shutdown-handler").catch((e=>{}));const{uuid:t,name:n}=this.wire.me;this.on("system-shutdown",(i=>{e({proceed:()=>{this.wire.environment.raiseEvent("application/system-shutdown-handled",{uuid:t,name:n,topic:"application"})}})}))}runRvmHealthCheck(){return this.wire.sendAction("run-rvm-health-check").then((({payload:e})=>e.data))}async launchManifest(e,t={}){const{subscribe:n,...i}=t,r=i;if(n){const e=new ae.EventEmitter;n(e);const t="app-version-progress",i="runtime-status",o="app-version-complete",s="app-version-error",a=this.wire.environment.getNextMessageId().toString();r.appVersionId=a;const c=[o,t,i,s],d=e=>{const{appVersionId:t,topic:n,type:i,...r}=e;return{...r,type:c.find((e=>i.includes(e)))}},h=t=>{const n=d(t);e.emit(n.type,n)},l=()=>{this.removeListener(`${t}.${a}`,h),this.removeListener(`${i}.${a}`,h),this.removeListener(`${o}.${a}`,h),this.removeListener(`${s}.${a}`,h),this.removeListener(`${o}.${a}`,l),this.removeListener(`${s}.${a}`,l)};await Promise.all([this.on(`${t}.${a}`,h),this.on(`${i}.${a}`,h),this.once(`${o}.${a}`,h),this.once(`${s}.${a}`,h),this.once(`${o}.${a}`,l),this.once(`${s}.${a}`,l)])}return(await this.wire.sendAction("launch-manifest",{manifestUrl:e,opts:r})).payload.data.manifest}async queryPermissionForCurrentContext(e){const t={uuid:this.wire.me.uuid,name:this.wire.me.name};return(await this.wire.sendAction("query-permission-for-current-context",{apiName:e,identity:t})).payload.data}async enableNativeWindowIntegrationProvider(e){const{payload:t}=await this.wire.sendAction("enable-native-window-integration-provider",{permissions:e});return t.data}async registerUsage({data:e,type:t}){await this.wire.sendAction("register-usage",{data:e,type:t})}async getPrinters(){const{payload:e}=await this.wire.sendAction("system-get-printers");return e.data}async updateProcessLoggingOptions(e){await this.wire.sendAction("system-update-process-logging-options",{options:e})}async getDomainSettings(){const{payload:{data:e}}=await this.wire.sendAction("get-domain-settings",this.identity);return e}async setDomainSettings(e){await this.wire.sendAction("set-domain-settings",{domainSettings:e,...this.identity})}async refreshExtensions(){const{payload:e}=await this.wire.sendAction("refresh-extensions");return e.data}async getInstalledExtensions(){const{payload:e}=await this.wire.sendAction("get-installed-extensions");return e.data}}c.System=ce;var de={},he={};Object.defineProperty(he,"__esModule",{value:!0}),he.RefCounter=void 0;he.RefCounter=class{constructor(){this.topicRefMap=new Map}incRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t+1;n=i,this.topicRefMap.set(e,i)}else this.topicRefMap.set(e,1),n=1;return n}decRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t-1;this.topicRefMap.set(e,i),n=i}else n=-1;return n}actOnFirst(e,t,n){return 1===this.incRefCount(e)?t():n()}actOnLast(e,t,n){return 0===this.decRefCount(e)?t():n()}};var le={},ue={},pe={};Object.defineProperty(pe,"__esModule",{value:!0}),pe.ChannelBase=pe.ProtectedItems=void 0;const we=e=>async(t,n,i)=>{const r=await e(t,n,i);return void 0===r?n:r};pe.ProtectedItems=class{constructor(e,t){this.providerIdentity=e,this.close=t}};class ye{static defaultAction(e){throw new Error(`No action registered at target for ${e}`)}constructor(){this.subscriptions=new Map}async processAction(e,t,n){try{const i=this.subscriptions.has(e)?this.subscriptions.get(e):(t,n)=>(this.defaultAction??ye.defaultAction)(e,t,n),r=this.preAction?await this.preAction(e,t,n):t,o=await i(r,n);return this.postAction?await this.postAction(e,o,n):o}catch(t){if(this.errorMiddleware)return this.errorMiddleware(e,t,n);throw t}}beforeAction(e){if(this.preAction)throw new Error("Already registered beforeAction middleware");this.preAction=we(e)}onError(e){if(this.errorMiddleware)throw new Error("Already registered error middleware");this.errorMiddleware=e}afterAction(e){if(this.postAction)throw new Error("Already registered afterAction middleware");this.postAction=we(e)}remove(e){this.subscriptions.delete(e)}setDefaultAction(e){if(this.defaultAction)throw new Error("default action can only be set once");this.defaultAction=e}register(e,t){if(this.subscriptions.has(e))throw new Error(`Subscription already registered for action: ${e}. Unsubscribe before adding new subscription`);return this.subscriptions.set(e,t),!0}}pe.ChannelBase=ye;var fe,ge,me,ve=s&&s.__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)},Ce=s&&s.__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};Object.defineProperty(ue,"__esModule",{value:!0}),ue.ChannelClient=void 0;const be=pe,Ie=new Map;class Ee extends be.ChannelBase{static closeChannelByEndpointId(e){const t=Ie.get(e);t&&ve(t,me,"f").call(t)}static handleProviderDisconnect(e){for(const t of Ie.values())t.providerIdentity.channelId===e.channelId&&(t.disconnectListener(e),ve(t,me,"f").call(t))}constructor(e,t,n){super(),fe.set(this,void 0),ge.set(this,void 0),this.processAction=(e,t,n)=>super.processAction(e,t,n),me.set(this,(()=>{Ie.delete(this.endpointId),ve(this,ge,"f").close()})),Ce(this,fe,new be.ProtectedItems(e,t),"f"),this.disconnectListener=()=>{},this.endpointId=e.endpointId,Ce(this,ge,n,"f"),Ie.set(this.endpointId,this),n.receive(this.processAction)}get providerIdentity(){return ve(this,fe,"f").providerIdentity}async dispatch(e,t){if(ve(this,ge,"f").isEndpointConnected(this.providerIdentity.channelId))return ve(this,ge,"f").send(this.providerIdentity.channelId,e,t);throw new Error("The client you are trying to dispatch from is disconnected from the target provider.")}onDisconnection(e){this.disconnectListener=t=>{try{e(t)}catch(e){throw new Error(`Error while calling the onDisconnection callback: ${e.message}`)}finally{this.disconnectListener=()=>{}}}}async disconnect(){await this.sendDisconnectAction(),ve(this,me,"f").call(this)}async sendDisconnectAction(){const e=ve(this,fe,"f");await e.close()}static async wireClose(e,t,n){const{channelName:i,uuid:r,name:o}=t;await e.sendAction("disconnect-from-channel",{channelName:i,uuid:r,name:o,endpointId:n})}}ue.ChannelClient=Ee,fe=new WeakMap,ge=new WeakMap,me=new WeakMap;var xe={},Ae={};Object.defineProperty(Ae,"__esModule",{value:!0}),Ae.exhaustiveCheck=void 0,Ae.exhaustiveCheck=function(e,t){throw new Error(`Unsupported value: ${e}${t?`\n Supported values are: ${t.join("")}`:""}`)};var Pe,Me,_e,Oe={},Se=s&&s.__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},Re=s&&s.__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)};Object.defineProperty(Oe,"__esModule",{value:!0}),Oe.ClassicInfo=Oe.ClassicStrategy=void 0;Oe.ClassicStrategy=class{constructor(e,t,n,i){this.messageReceiver=t,this.endpointId=n,this.providerIdentity=i,Pe.set(this,void 0),Me.set(this,new Map),_e.set(this,new Map),this.send=async(e,t,n)=>{const i=Re(this,Me,"f").get(e);if(!i)throw new Error(`Could not locate routing info for endpoint ${e}`);const r={...i};r.isLocalEndpointId&&delete r.endpointId,delete r.isLocalEndpointId;const o=Re(this,Pe,"f").sendAction("send-channel-message",{...r,providerIdentity:this.providerIdentity,action:t,payload:n});Re(this,_e,"f").get(e)?.add(o);return(await o.catch((e=>{throw new Error(e.message)})).finally((()=>{Re(this,_e,"f").get(e)?.delete(o)}))).payload.data.result},this.close=async()=>{this.messageReceiver.removeEndpoint(this.providerIdentity.channelId,this.endpointId),[...Re(this,Me,"f").keys()].forEach((e=>this.closeEndpoint(e))),Se(this,Me,new Map,"f")},Se(this,Pe,e,"f")}onEndpointDisconnect(e,t){}receive(e){this.messageReceiver.addEndpoint(e,this.providerIdentity.channelId,this.endpointId)}async closeEndpoint(e){const t=Re(this,Me,"f").get(e);Re(this,Me,"f").delete(e);const n=Re(this,_e,"f").get(e);n?.forEach((n=>{const i=`Channel connection with identity uuid: ${t?.uuid} / name: ${t?.name} / endpointId: ${e} no longer connected.`;n.cancel(new Error(i))}))}isEndpointConnected(e){return Re(this,Me,"f").has(e)}addEndpoint(e,t){Re(this,Me,"f").set(e,t.endpointIdentity),Re(this,_e,"f").set(e,new Set)}isValidEndpointPayload(e){return"string"==typeof e?.endpointIdentity?.endpointId||"string"==typeof e?.endpointIdentity?.channelId}},Pe=new WeakMap,Me=new WeakMap,_e=new WeakMap,Oe.ClassicInfo={version:5,minimumVersion:0,type:"classic"};var Fe={},je={},ke={};Object.defineProperty(ke,"__esModule",{value:!0}),ke.errorToPOJO=void 0,ke.errorToPOJO=function(e){return{stack:e.stack,name:e.name,message:e.message,toString:()=>e.stack||e.toString()}};var Le,Te,$e=s&&s.__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)},Be=s&&s.__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};Object.defineProperty(je,"__esModule",{value:!0}),je.RTCEndpoint=void 0;const Ge=ke;je.RTCEndpoint=class{static isValidEndpointPayload(e){const t=e=>"object"==typeof e&&null!==e;return t(e)&&t(e.endpointIdentity)&&t(e.rtc)&&"string"==typeof e.endpointIdentity.endpointId}constructor({rtc:e,endpointIdentity:t}){this.responseMap=new Map,Le.set(this,null),Te.set(this,void 0),this.connectionStateChangeHandler=e=>{"connected"!==this.rtc.rtcClient.connectionState&&(this.rtc.rtcClient.removeEventListener("connectionstatechange",this.connectionStateChangeHandler),this.close(),$e(this,Te,"f")&&$e(this,Te,"f").call(this))},this.send=async(e,t)=>{const n=`message-${Math.random()}`,i=new Promise(((e,t)=>{this.responseMap.set(n,{resolve:e,reject:t})}));return this.rtc.channels.request.send(JSON.stringify({action:e,payload:t,messageId:n})),i},this.close=()=>{this.responseMap.forEach((e=>e.reject("Connection has closed."))),this.responseMap=new Map,this.rtc.channels.request.close(),this.rtc.channels.response.close(),this.rtc.rtcClient.close()},this.rtc=e,this.endpointIdentity=t,this.rtc.channels.response.addEventListener("message",(e=>{let{data:t}=e;e.data instanceof ArrayBuffer&&(t=(new TextDecoder).decode(e.data));const{messageId:n,payload:i,success:r,error:o}=JSON.parse(t),{resolve:s,reject:a}=this.responseMap.get(n)??{};s&&a?(this.responseMap.delete(n),r?s(i):a(o)):(console.log("Could not find id in responseMap."),console.log(e))})),this.rtc.channels.request.addEventListener("message",(async e=>{let{data:n}=e;e.data instanceof ArrayBuffer&&(n=(new TextDecoder).decode(e.data));const{messageId:i,action:r,payload:o}=JSON.parse(n);if($e(this,Le,"f"))try{const e=await $e(this,Le,"f").call(this,r,o,t);this.rtc.channels.response.send(JSON.stringify({messageId:i,payload:e,success:!0}))}catch(e){"open"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,error:(0,Ge.errorToPOJO)(e),success:!1}))}else"open"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,success:!1,error:"Connection not ready."}))})),this.rtc.rtcClient.addEventListener("connectionstatechange",this.connectionStateChangeHandler),Object.values(this.rtc.channels).forEach((e=>{e.onclose=e=>{[...this.responseMap.values()].forEach((e=>e.reject(new Error("RTCDataChannel closed unexpectedly, this is most commonly caused by message size. Note: RTC Channels have a message size limit of ~255kB.")))),this.close(),$e(this,Te,"f")&&$e(this,Te,"f").call(this)}}))}onDisconnect(e){if($e(this,Te,"f"))throw new Error("RTCEndpoint disconnectListener cannot be set twice.");Be(this,Te,e,"f")}receive(e){if($e(this,Le,"f"))throw new Error("You have already set a listener for this RTC Endpoint.");Be(this,Le,e,"f")}get connected(){return"connected"===this.rtc.rtcClient.connectionState}},Le=new WeakMap,Te=new WeakMap;var We,He,Ne,De={},Ue=s&&s.__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)},Ve=s&&s.__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};Object.defineProperty(De,"__esModule",{value:!0}),De.EndpointStrategy=void 0;De.EndpointStrategy=class{constructor(e,t,n){this.EndpointType=e,this.StrategyName=n,We.set(this,null),He.set(this,new Map),Ne.set(this,!0),this.send=async(e,t,n)=>this.getEndpointById(e).send(t,n),this.close=async()=>{Ue(this,Ne,"f")&&(Ue(this,He,"f").forEach((e=>e.close())),Ve(this,He,new Map,"f")),Ve(this,Ne,!1,"f")},this.isValidEndpointPayload=t}onEndpointDisconnect(e,t){this.getEndpointById(e).onDisconnect(t)}receive(e){if(Ue(this,We,"f"))throw new Error(`You have already set a listener for this ${this.StrategyName} Strategy`);Ve(this,We,e,"f"),Ue(this,He,"f").forEach((e=>e.receive(Ue(this,We,"f"))))}getEndpointById(e){const t=Ue(this,He,"f").get(e);if(!t)throw new Error(`Client with endpoint id ${e} is not connected`);return t}get connected(){return Ue(this,Ne,"f")}isEndpointConnected(e){return Ue(this,He,"f").has(e)}addEndpoint(e,t){if(!Ue(this,Ne,"f"))return void console.warn(`Adding endpoint to disconnected ${this.StrategyName} Strategy`);const n=new this.EndpointType(t);Ue(this,We,"f")&&n.receive(Ue(this,We,"f")),Ue(this,He,"f").set(e,n)}async closeEndpoint(e){Ue(this,He,"f").delete(e)}},We=new WeakMap,He=new WeakMap,Ne=new WeakMap,Object.defineProperty(Fe,"__esModule",{value:!0}),Fe.RTCInfo=Fe.RTCStrategy=void 0;const ze=je,Ke=De;class qe extends Ke.EndpointStrategy{constructor(){super(ze.RTCEndpoint,ze.RTCEndpoint.isValidEndpointPayload,"RTC")}}Fe.RTCStrategy=qe,Fe.RTCInfo={version:2,minimumVersion:0,type:"rtc"};var Je={};Object.defineProperty(Je,"__esModule",{value:!0}),Je.RTCICEManager=void 0;const Ye=d;class Ze extends Ye.EmitterBase{constructor(e){super(e,"channel"),this.ensureChannelOpened=e=>new Promise(((t,n)=>{if("open"===e.readyState)t();else if("connecting"===e.readyState){const n=()=>{e.removeEventListener("open",n),t()};e.addEventListener("open",n)}else n(new Error("This Channel has already closed"))}))}static createDataChannelPromise(e,t){let n;const i=new Promise((e=>{n=e})),r=i=>{const o=()=>{i.channel.removeEventListener("open",o),n(i.channel)};i.channel.label===e&&(i.channel.addEventListener("open",o),t.removeEventListener("datachannel",r))};return t.addEventListener("datachannel",r),i}async listenForProviderIce(e,t){await this.on(this.createProviderEventName(e),t,{timestamp:Date.now()})}async raiseProviderIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createProviderEventName(e)),t)}async listenForClientIce(e,t){await this.on(this.createClientEventName(e),t,{timestamp:Date.now()})}async raiseClientIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createClientEventName(e)),t)}cleanupIceListeners(e){this.removeAllListeners(this.createClientEventName(e)),this.removeAllListeners(this.createProviderEventName(e))}createClientEventName(e){return`ice-client-${e}`}createProviderEventName(e){return`ice-provider-${e}`}createRouteString(e){return`channel/${e}`}createRtcPeer(){return this.wire.environment.getRtcPeer()}async startClientOffer(){const e=Math.random().toString(),t=this.createRtcPeer();t.addEventListener("icecandidate",(async t=>{t.candidate&&await this.raiseClientIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForProviderIce(e,(async e=>{await t.addIceCandidate(e.candidate)}));const n={request:t.createDataChannel("request"),response:t.createDataChannel("response")},i=await t.createOffer();await t.setLocalDescription(i);const r=Promise.all([n.request,n.response].map(this.ensureChannelOpened)).then((()=>{}));return{rtcClient:t,channels:n,offer:i,rtcConnectionId:e,channelsOpened:r}}async finishClientOffer(e,t,n){return await e.setRemoteDescription(t),await n,!0}async createProviderAnswer(e,t){const n=this.createRtcPeer(),i=Ze.createDataChannelPromise("request",n),r=Ze.createDataChannelPromise("response",n);n.addEventListener("icecandidate",(async t=>{t.candidate&&await this.raiseProviderIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForClientIce(e,(async e=>{await n.addIceCandidate(e.candidate)})),await n.setRemoteDescription(t);const o=await n.createAnswer();await n.setLocalDescription(o);const s=Promise.all([i,r]).then((([t,n])=>(this.cleanupIceListeners(e),{request:t,response:n})));return{rtcClient:n,answer:o,channels:s}}}Je.RTCICEManager=Ze;var Qe={},Xe={};function et(e){return[...e.split(".").reverse().entries()].reduce(((e,[t,n])=>e+ +n*1e4**t),0)}function tt(e,t){return et(e)>=et(t)}function nt(e){return e.split("/")[0]}Object.defineProperty(Xe,"__esModule",{value:!0}),Xe.runtimeUuidMeetsMinimumRuntimeVersion=Xe.parseRuntimeUuid=Xe.meetsMinimumRuntimeVersion=void 0,Xe.meetsMinimumRuntimeVersion=tt,Xe.parseRuntimeUuid=nt,Xe.runtimeUuidMeetsMinimumRuntimeVersion=function(e,t){return tt(nt(e),t)};var it,rt,ot,st,at,ct=s&&s.__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)},dt=s&&s.__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};Object.defineProperty(Qe,"__esModule",{value:!0}),Qe.ChannelProvider=void 0;const ht=pe,lt=Xe;class ut extends ht.ChannelBase{get connections(){return[...ct(this,it,"f")]}static handleClientDisconnection(e,t){const n=e.connections.find((e=>e.endpointId===t.endpointId));if(n)ct(e,st,"f").call(e,n);else{e.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name)).forEach(ct(e,st,"f"))}e.disconnectListener(t)}static setProviderRemoval(e,t){ut.removalMap.set(e,t)}constructor(e,t,n){super(),it.set(this,void 0),rt.set(this,void 0),ot.set(this,void 0),st.set(this,(e=>{const t=this.connections.filter((t=>t.endpointId!==e.endpointId));ct(this,ot,"f").closeEndpoint(e.endpointId),dt(this,it,t,"f")})),this.processAction=async(e,t,n)=>(ut.clientIsMultiRuntime(n)&&!(0,lt.runtimeUuidMeetsMinimumRuntimeVersion)(n.runtimeUuid,"18.87.56.0")?this.handleMultiRuntimeLegacyClient(n):this.checkForClientConnection(n),super.processAction(e,t,n)),at.set(this,(()=>{ct(this,ot,"f").close();const e=ut.removalMap.get(this);e&&e()})),dt(this,rt,new ht.ProtectedItems(e,t),"f"),this.connectListener=()=>{},this.disconnectListener=()=>{},dt(this,it,[],"f"),dt(this,ot,n,"f"),n.receive(this.processAction)}dispatch(e,t,n){const i=e.endpointId??this.getEndpointIdForOpenFinId(e,t);return i&&ct(this,ot,"f").isEndpointConnected(i)?ct(this,ot,"f").send(i,t,n):Promise.reject(new Error(`Client connection with identity uuid: ${e.uuid} / name: ${e.name} / endpointId: ${i} no longer connected.`))}async processConnection(e,t){return ct(this,it,"f").push(e),this.connectListener(e,t)}publish(e,t){return this.connections.map((n=>ct(this,ot,"f").send(n.endpointId,e,t)))}onConnection(e){this.connectListener=e}onDisconnection(e){this.disconnectListener=e}async destroy(){const e=ct(this,rt,"f");e.providerIdentity,dt(this,it,[],"f"),await e.close(),ct(this,at,"f").call(this)}async getAllClientInfo(){return this.connections.map((e=>{const{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}=e;return{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}}))}checkForClientConnection(e){if(!this.isClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider.\n Client Identity: {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}isClientConnected(e){return ut.clientIdentityIncludesEndpointId(e)?this.connections.some((t=>t.endpointId===e.endpointId&&t.uuid===e.uuid&&t.name===e.name)):this.isLegacyClientConnected(e)}isLegacyClientConnected(e){return this.connections.some((t=>t.uuid===e.uuid&&t.name===e.name))}handleMultiRuntimeLegacyClient(e){if(!this.isLegacyClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider. Client Identity:\n {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}getEndpointIdForOpenFinId(e,t){const n=this.connections.filter((t=>t.name===e.name&&t.uuid===e.uuid));if(n.length>=2){const n=ct(this,rt,"f"),{uuid:i,name:r}=e,o=n?.providerIdentity.uuid,s=n?.providerIdentity.name;console.warn(`WARNING: Dispatch call may have unintended results. The "to" argument of your dispatch call is missing the\n "endpointId" parameter. The identity you are dispatching to ({uuid: ${i}, name: ${r}})\n has multiple channelClients for this channel. Your dispatched action: (${t}) from the provider:\n ({uuid: ${o}, name: ${s}}) will only be processed by the most recently-created client.`)}return n.pop()?.endpointId}static clientIdentityIncludesEndpointId(e){return void 0!==e.endpointId}static clientIsMultiRuntime(e){return void 0!==e.runtimeUuid}static async wireClose(e,t){await e.sendAction("destroy-channel",{channelName:t})}}Qe.ChannelProvider=ut,it=new WeakMap,rt=new WeakMap,ot=new WeakMap,st=new WeakMap,at=new WeakMap,ut.removalMap=new WeakMap;var pt={};Object.defineProperty(pt,"__esModule",{value:!0}),pt.MessageReceiver=void 0;const wt=ue,yt=d;class ft extends yt.Base{constructor(e){super(e),this.onmessage=e=>"process-channel-message"===e.action&&(this.processChannelMessage(e),!0),this.endpointMap=new Map,this.latestEndpointIdByChannelId=new Map,e.registerMessageHandler(this.onmessage.bind(this))}async processChannelMessage(e){const{senderIdentity:t,providerIdentity:n,action:i,ackToSender:r,payload:o,intendedTargetIdentity:s}=e.payload,a=s.channelId??s.endpointId??this.latestEndpointIdByChannelId.get(n.channelId),c=this.endpointMap.get(a);if(!c)return r.payload.success=!1,r.payload.reason=`Client connection with identity uuid: ${this.wire.me.uuid} / name: ${this.wire.me.name} / endpointId: ${a} no longer connected.`,this.wire.sendRaw(r);try{const e=await c(i,o,t);return r.payload.payload=r.payload.payload||{},r.payload.payload.result=e,this.wire.sendRaw(r)}catch(e){return r.payload.success=!1,r.payload.reason=e.message,this.wire.sendRaw(r)}}addEndpoint(e,t,n){this.endpointMap.set(n,e),t!==n&&this.latestEndpointIdByChannelId.set(t,n)}removeEndpoint(e,t){this.endpointMap.delete(t),this.latestEndpointIdByChannelId.get(e)===t&&this.latestEndpointIdByChannelId.delete(e)}checkForPreviousClientConnection(e){const t=this.latestEndpointIdByChannelId.get(e);t&&(wt.ChannelClient.closeChannelByEndpointId(t),console.warn("You have created a second connection to an older provider. First connection has been removed from the clientMap"),console.warn("If the provider calls publish(), you may receive multiple messages."))}}pt.MessageReceiver=ft;var gt={};Object.defineProperty(gt,"__esModule",{value:!0}),gt.ProtocolManager=void 0;gt.ProtocolManager=class{constructor(e){this.ProtocolsInPreferenceOrder=e,this.DefaultClientProtocols=["classic"],this.DefaultProviderProtocols=["classic"],this.getClientProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultClientProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(", ")}.`);return t},this.getProviderProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultProviderProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(", ")}.`);return t},this.getCompatibleProtocols=(e,t)=>t.supportedProtocols.filter((t=>e.some((e=>e.type===t.type&&t.version>=e.minimumVersion&&e.version>=(t.minimumVersion??0))))).slice(0,t.maxProtocols)}};var mt={};Object.defineProperty(mt,"__esModule",{value:!0});class vt{static combine(e,t){return new vt(e,t)}constructor(e,t){this.primary=e,this.secondary=t}onEndpointDisconnect(e,t){this.primary.onEndpointDisconnect(e,(()=>{this.secondary.isEndpointConnected(e)||t()})),this.secondary.onEndpointDisconnect(e,(()=>{this.primary.isEndpointConnected(e)||t()}))}isValidEndpointPayload(e){return this.primary.isValidEndpointPayload(e)||this.secondary.isValidEndpointPayload(e)}async closeEndpoint(e){await this.primary.closeEndpoint(e),await this.secondary.closeEndpoint(e)}isEndpointConnected(e){return this.primary.isEndpointConnected(e)||this.secondary.isEndpointConnected(e)}async addEndpoint(e,t){this.primary.isValidEndpointPayload(t)&&await this.primary.addEndpoint(e,t),this.secondary.isValidEndpointPayload(t)&&await this.secondary.addEndpoint(e,t)}receive(e){this.primary.receive(e),this.secondary.receive(e)}send(e,t,n){return this.primary.isEndpointConnected(e)?this.primary.send(e,t,n):this.secondary.send(e,t,n)}async close(){await Promise.all([this.primary.close(),this.secondary.close()])}}mt.default=vt;var Ct,bt,It=s&&s.__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},Et=s&&s.__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)},xt=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(xe,"__esModule",{value:!0}),xe.ConnectionManager=void 0;const At=Ae,Pt=d,Mt=Oe,_t=Fe,Ot=Je,St=Qe,Rt=pt,Ft=gt,jt=xt(mt);class kt extends Pt.Base{static getProtocolOptionsFromStrings(e){return e.map((e=>{switch(e){case"rtc":return _t.RTCInfo;case"classic":return Mt.ClassicInfo;default:return(0,At.exhaustiveCheck)(e,["rtc","classic"])}}))}constructor(e){super(e),Ct.set(this,void 0),bt.set(this,void 0),this.removeChannelFromProviderMap=e=>{this.providerMap.delete(e)},this.onmessage=e=>"process-channel-connection"===e.action&&(this.processChannelConnection(e),!0),this.providerMap=new Map,this.protocolManager=new Ft.ProtocolManager("node"===this.wire.environment.type?["classic"]:["rtc","classic"]),It(this,Ct,new Rt.MessageReceiver(e),"f"),It(this,bt,new Ot.RTCICEManager(e),"f"),e.registerMessageHandler(this.onmessage.bind(this))}createProvider(e,t){const n=Object.assign(this.wire.environment.getDefaultChannelOptions().create,e||{}),i=this.protocolManager.getProviderProtocols(n?.protocols),r=i.map((e=>{switch(e){case"rtc":return new _t.RTCStrategy;case"classic":return new Mt.ClassicStrategy(this.wire,Et(this,Ct,"f"),t.channelId,t);default:return(0,At.exhaustiveCheck)(e,["rtc","classic"])}}));let o;if(2===r.length){const[e,t]=r;o=jt.default.combine(e,t)}else{if(1!==r.length)throw new Error("failed to combine strategies");[o]=r}const s=new St.ChannelProvider(t,(()=>St.ChannelProvider.wireClose(this.wire,t.channelName)),o),a=t.channelId;return this.providerMap.set(a,{provider:s,strategy:o,supportedProtocols:kt.getProtocolOptionsFromStrings(i)}),St.ChannelProvider.setProviderRemoval(s,this.removeChannelFromProviderMap.bind(this)),s}async createClientOffer(e){const t=this.protocolManager.getClientProtocols(e?.protocols);let n;return{offer:{supportedProtocols:await Promise.all(t.map((async e=>{switch(e){case"rtc":{const{rtcClient:e,channels:t,offer:i,rtcConnectionId:r,channelsOpened:o}=await Et(this,bt,"f").startClientOffer();return n={rtcClient:e,channels:t,channelsOpened:o},{type:"rtc",version:_t.RTCInfo.version,payload:{offer:i,rtcConnectionId:r}}}case"classic":return{type:"classic",version:Mt.ClassicInfo.version};default:return(0,At.exhaustiveCheck)(e,["rtc","classic"])}}))),maxProtocols:2},rtc:n}}async createClientStrategy(e,t){t.endpointId||(t.endpointId=this.wire.environment.getNextMessageId(),Et(this,Ct,"f").checkForPreviousClientConnection(t.channelId));const n=t.answer??{supportedProtocols:[{type:"classic",version:1}]},i=(await Promise.all(n.supportedProtocols.map((async n=>"rtc"===n.type&&e?(await Et(this,bt,"f").finishClientOffer(e.rtcClient,n.payload.answer,e.channelsOpened),new _t.RTCStrategy):"classic"===n.type?new Mt.ClassicStrategy(this.wire,Et(this,Ct,"f"),t.endpointId,t):null)))).filter((e=>null!==e));let r;if(e&&!i.some((e=>e instanceof _t.RTCStrategy))&&e&&e.rtcClient.close(),i.length>=2)r=jt.default.combine(i[0],i[1]);else{if(!i.length)throw new Error("No compatible protocols");[r]=i}const o={endpointIdentity:t,rtc:e};return r.addEndpoint(t.channelId,o),r}async processChannelConnection(e){const{clientIdentity:t,providerIdentity:n,ackToSender:i,payload:r,offer:o}=e.payload;t.endpointId?t.isLocalEndpointId=!1:(t.endpointId=this.wire.environment.getNextMessageId(),t.isLocalEndpointId=!0);const s=n.channelId,a=this.providerMap.get(s);if(!a)return i.payload.success=!1,i.payload.reason=`Channel "${n.channelName}" has been destroyed.`,this.wire.sendRaw(i);const{provider:c,strategy:d,supportedProtocols:h}=a;try{if(!(c instanceof St.ChannelProvider))throw Error("Cannot connect to a channel client");const e=o??{supportedProtocols:[{type:"classic",version:1}],maxProtocols:1},n=this.protocolManager.getCompatibleProtocols(h,e);if(!n.length)throw new Error("This provider does not support any of the offered protocols.");const s=await c.processConnection(t,r);i.payload.payload=i.payload.payload||{};let a={supportedProtocols:[],endpointPayloadPromise:Promise.resolve({endpointIdentity:t})};return a=await n.reduce((async(e,t)=>{const n=await e;if("rtc"===t.type){const{answer:e,rtcClient:i,channels:r}=await Et(this,bt,"f").createProviderAnswer(t.payload.rtcConnectionId,t.payload.offer);n.supportedProtocols.push({type:"rtc",version:_t.RTCInfo.version,payload:{answer:e}}),n.endpointPayloadPromise=n.endpointPayloadPromise.then((e=>r.then((t=>({...e,rtc:{rtcClient:i,channels:t}})))))}else n.supportedProtocols.push({type:"classic",version:Mt.ClassicInfo.version});return n}),Promise.resolve(a)),a.endpointPayloadPromise.then((e=>d.addEndpoint(t.endpointId,e))),i.payload.payload.result=s,i.payload.payload.answer=a,this.wire.sendRaw(i)}catch(e){return i.payload.success=!1,i.payload.reason=e.message,this.wire.sendRaw(i)}}}xe.ConnectionManager=kt,Ct=new WeakMap,bt=new WeakMap;var Lt,Tt,$t,Bt=s&&s.__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},Gt=s&&s.__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)};Object.defineProperty(le,"__esModule",{value:!0}),le.Channel=void 0;const Wt=t,Ht=G,Nt=d,Dt=ue,Ut=xe,Vt=Qe;function zt(e){const t=Math.floor(e/10),n=Math.min(3e4,500*2**t);return new Promise((e=>{setTimeout((()=>{e(!1)}),n)}))}class Kt extends Nt.EmitterBase{constructor(e){super(e,"channel"),Lt.set(this,void 0),Tt.set(this,new Wt.EventEmitter),$t.set(this,new Ht.AsyncRetryableLazy((async()=>{await Promise.all([this.on("disconnected",(e=>{Dt.ChannelClient.handleProviderDisconnect(e)})),this.on("connected",((...e)=>{Gt(this,Tt,"f").emit("connected",...e)}))]).catch((()=>new Error("error setting up channel connection listeners")))}))),Bt(this,Lt,new Ut.ConnectionManager(e),"f")}async getAllChannels(){return this.wire.sendAction("get-all-channels").then((({payload:e})=>e.data))}async onChannelConnect(e){await this.on("connected",e)}async onChannelDisconnect(e){await this.on("disconnected",e)}async safeConnect(e,t,n){const i={count:0};do{let r=()=>{};const o=new Promise((t=>{r=n=>{e===n.channelName&&t(!0)},Gt(this,Tt,"f").on("connected",r)}));try{if(i.count>0){i.gotConnectedEvent=await Promise.race([zt(i.count),o]);const t=await this.wire.sendAction("connect-to-channel",{...n,retryInfo:i});return console.log(`Successfully connected to channelName: ${e}`),t.payload.data}const t=this.wire.sendAction("connect-to-channel",n);i.originalMessageId=t.messageId;return(await t).payload.data}catch(n){if(!n.message.includes("internal-nack"))throw n;t&&0===i.count&&console.warn(`No channel found for channelName: ${e}. Waiting for connection...`)}finally{i.count+=1,Gt(this,Tt,"f").removeListener("connected",r)}}while(t);throw new Error(`No channel found for channelName: ${e}.`)}async connect(e,t={}){if(await Gt(this,$t,"f").getValue(),!e||"string"!=typeof e)throw new Error("Please provide a channelName string to connect to a channel.");const n={wait:!0,...this.wire.environment.getDefaultChannelOptions().connect,...t},{offer:i,rtc:r}=await Gt(this,Lt,"f").createClientOffer(n);let o;(this.fin.me.isFrame||this.fin.me.isView||this.fin.me.isWindow)&&(o=(await this.fin.me.getInfo()).url);const s={channelName:e,...n,offer:i,connectionUrl:o},a=await this.safeConnect(e,n.wait,s),c=await Gt(this,Lt,"f").createClientStrategy(r,a),d=new Dt.ChannelClient(a,(()=>Dt.ChannelClient.wireClose(this.wire,a,a.endpointId)),c);return c.onEndpointDisconnect(a.channelId,(async()=>{try{await d.sendDisconnectAction()}catch(e){console.warn(`Something went wrong during disconnect for client with uuid: ${a.uuid} / name: ${a.name} / endpointId: ${a.endpointId}.`)}finally{Dt.ChannelClient.handleProviderDisconnect(a)}})),d}async create(e,t){if(!e)throw new Error("Please provide a channelName to create a channel");const{payload:{data:n}}=await this.wire.sendAction("create-channel",{channelName:e}),i=Gt(this,Lt,"f").createProvider(t,n);return this.on("client-disconnected",(t=>{t.channelName===e&&Vt.ChannelProvider.handleClientDisconnection(i,t)})),i}}le.Channel=Kt,Lt=new WeakMap,Tt=new WeakMap,$t=new WeakMap,Object.defineProperty(de,"__esModule",{value:!0}),de.InterAppPayload=de.InterApplicationBus=void 0;const qt=t,Jt=d,Yt=he,Zt=le,Qt=O;class Xt extends Jt.Base{constructor(e){super(e),this.events={subscriberAdded:"subscriber-added",subscriberRemoved:"subscriber-removed"},this.refCounter=new Yt.RefCounter,this.Channel=new Zt.Channel(e),this.emitter=new qt.EventEmitter,e.registerMessageHandler(this.onmessage.bind(this)),this.on=this.emitter.on.bind(this.emitter),this.removeAllListeners=this.emitter.removeAllListeners.bind(this.emitter)}async publish(e,t){await this.wire.sendAction("publish-message",{topic:e,message:t,sourceWindowName:this.me.name})}async send(e,t,n){const i=(0,Qt.validateIdentity)(e);if(i)throw new Error(i);await this.wire.sendAction("send-message",{destinationUuid:e.uuid,destinationWindowName:e.name,topic:t,message:n,sourceWindowName:this.me.name})}subscribe(e,t,n){const i=this.createSubscriptionKey(e.uuid,e.name||"*",t);return this.emitter.on(i,n),this.refCounter.actOnFirst(i,(async()=>{await this.wire.sendAction("subscribe",{sourceUuid:e.uuid,sourceWindowName:e.name||"*",topic:t,destinationWindowName:this.me.name})}),(()=>Promise.resolve()))}unsubscribe(e,t,n){const i=e.name||"*",r=this.createSubscriptionKey(e.uuid,i,t);return this.emitter.removeListener(r,n),this.refCounter.actOnLast(r,(async()=>{await this.wire.sendAction("unsubscribe",{sourceUuid:e.uuid,sourceWindowName:i,topic:t,destinationWindowName:this.me.name})}),(()=>new Promise((e=>e)).then((()=>{}))))}processMessage(e){const{payload:{message:t,sourceWindowName:n,sourceUuid:i,topic:r}}=e,o=[this.createSubscriptionKey(i,n,r),this.createSubscriptionKey(i,"*",r),this.createSubscriptionKey("*","*",r)],s={uuid:i,name:n};o.forEach((e=>{this.emitter.emit(e,t,s)}))}emitSubscriverEvent(e,t){const{payload:{targetName:n,uuid:i,topic:r}}=t,o={name:n,uuid:i,topic:r};this.emitter.emit(e,o)}createSubscriptionKey(e,t,n){const i=t||"*";if(!(e&&i&&n))throw new Error("Missing uuid, name, or topic string");return function(...e){return e.map((e=>Buffer.from(`${e}`).toString("base64"))).join("/")}(e,i,n)}onmessage(e){const{action:t}=e;switch(t){case"process-message":this.processMessage(e);break;case this.events.subscriberAdded:this.emitSubscriverEvent(this.events.subscriberAdded,e);break;case this.events.subscriberRemoved:this.emitSubscriverEvent(this.events.subscriberRemoved,e)}return!0}}de.InterApplicationBus=Xt;de.InterAppPayload=class{};var en={};Object.defineProperty(en,"__esModule",{value:!0}),en.Clipboard=void 0;const tn=d;class nn extends tn.Base{async writeText(e){await this.wire.sendAction("clipboard-write-text",e)}async readText(e){const{payload:t}=await this.wire.sendAction("clipboard-read-text",{type:e});return t.data}async writeImage(e){await this.wire.sendAction("clipboard-write-image",e)}async readImage(e={format:"dataURL"}){const{payload:t}=await this.wire.sendAction("clipboard-read-image",e);return t.data}async writeHtml(e){await this.wire.sendAction("clipboard-write-html",e)}async readHtml(e){const{payload:t}=await this.wire.sendAction("clipboard-read-html",{type:e});return t.data}async writeRtf(e){await this.wire.sendAction("clipboard-write-rtf",e)}async readRtf(e){const{payload:t}=await this.wire.sendAction("clipboard-read-rtf",{type:e});return t.data}async write(e){await this.wire.sendAction("clipboard-write",e)}async getAvailableFormats(e){const{payload:t}=await this.wire.sendAction("clipboard-read-formats",{type:e});return t.data}}en.Clipboard=nn;var rn={},on={},sn={};Object.defineProperty(sn,"__esModule",{value:!0}),sn.ExternalApplication=void 0;const an=d;class cn extends an.EmitterBase{constructor(e,t){super(e,"external-application",t.uuid),this.identity=t}getInfo(){return this.wire.sendAction("get-external-application-info",this.identity).then((({payload:e})=>e.data))}}sn.ExternalApplication=cn,Object.defineProperty(on,"__esModule",{value:!0}),on.ExternalApplicationModule=void 0;const dn=d,hn=sn;class ln extends dn.Base{wrap(e){return this.wire.sendAction("external-application-wrap").catch((e=>{})),Promise.resolve(new hn.ExternalApplication(this.wire,{uuid:e}))}wrapSync(e){return this.wire.sendAction("external-application-wrap-sync").catch((e=>{})),new hn.ExternalApplication(this.wire,{uuid:e})}}on.ExternalApplicationModule=ln,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(on,e),n(sn,e)}(rn);var un={},pn={},wn={};Object.defineProperty(wn,"__esModule",{value:!0}),wn._Frame=void 0;const yn=d;class fn extends yn.EmitterBase{constructor(e,t){super(e,"frame",t.uuid,t.name),this.identity=t}getInfo(){return this.wire.sendAction("get-frame-info",this.identity).then((({payload:e})=>e.data))}getParentWindow(){return this.wire.sendAction("get-parent-window",this.identity).then((({payload:e})=>e.data))}}wn._Frame=fn,Object.defineProperty(pn,"__esModule",{value:!0}),pn._FrameModule=void 0;const gn=d,mn=O,vn=wn;class Cn extends gn.Base{async wrap(e){this.wire.sendAction("frame-wrap").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}wrapSync(e){this.wire.sendAction("frame-wrap-sync").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}getCurrent(){return this.wire.sendAction("frame-get-current").catch((e=>{})),Promise.resolve(new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity()))}getCurrentSync(){return this.wire.sendAction("frame-get-current-sync").catch((e=>{})),new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity())}}pn._FrameModule=Cn,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(pn,e),n(wn,e)}(un);var bn={};Object.defineProperty(bn,"__esModule",{value:!0}),bn.GlobalHotkey=void 0;const In=d;class En extends In.EmitterBase{constructor(e){super(e,"global-hotkey")}async register(e,t){await this.on(e,t),await this.wire.sendAction("global-hotkey-register",{hotkey:e})}async unregister(e){await this.removeAllListeners(e),await this.wire.sendAction("global-hotkey-unregister",{hotkey:e})}async unregisterAll(){await Promise.all(this.eventNames().filter((e=>!("registered"===e||"unregistered"===e))).map((e=>this.removeAllListeners(e)))),await this.wire.sendAction("global-hotkey-unregister-all",{})}async isRegistered(e){const{payload:{data:t}}=await this.wire.sendAction("global-hotkey-is-registered",{hotkey:e});return t}}bn.GlobalHotkey=En;var xn,An={},Pn={},Mn={},_n=s&&s.__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)};Object.defineProperty(Mn,"__esModule",{value:!0}),Mn.Platform=void 0;const On=d,Sn=O,Rn=new Map;class Fn extends On.EmitterBase{constructor(e,t){super(t.wire,"application",e.uuid),this.getClient=e=>{this.wire.sendAction("platform-get-client",this.identity).catch((e=>{}));const t=e||this.identity,{uuid:n}=t;if(!Rn.has(n)){const e=_n(this,xn,"f").call(this,n);Rn.set(n,e)}return Rn.get(n)},xn.set(this,(async e=>{try{const t=`custom-frame-${e}`,n=await this._channel.connect(t,{wait:!1});return n.onDisconnection((()=>{Rn.delete(e)})),n}catch(t){throw Rn.delete(e),new Error("The targeted Platform is not currently running. Listen for application-started event for the given Uuid.")}})),this.launchLegacyManifest=this.launchContentManifest;const n=(0,Sn.validateIdentity)(e);if(n)throw new Error(n);this._channel=t,this.identity={uuid:e.uuid},this.Layout=this.fin.Platform.Layout,this.Application=this.fin.Application.wrapSync(this.identity)}async createView(e,t,n){this.wire.sendAction("platform-create-view",this.identity).catch((e=>{}));const i=await this.getClient(),r=await i.dispatch("create-view",{target:t,opts:e,targetView:n});if(!r||(0,Sn.validateIdentity)(r.identity))throw new Error(`When overwriting the createView call, please return an object that has a valid 'identity' property: ${JSON.stringify(r)}`);return this.fin.View.wrapSync(r.identity)}async createWindow(e){this.wire.sendAction("platform-create-window",this.identity).catch((e=>{}));const t=await this.getClient();e.reason||(e.reason="api-call");const n=await t.dispatch("create-view-container",e);if(!n||(0,Sn.validateIdentity)(n.identity))throw new Error(`When overwriting the createWindow call, please return an object that has a valid 'identity' property: ${JSON.stringify(n)}`);const{identity:i}=n,r=this.fin.Window.wrapSync(i);return r.name=i.name,r.uuid=i.uuid,r}async quit(){this.wire.sendAction("platform-quit",this.identity).catch((e=>{}));return(await this.getClient()).dispatch("quit")}async closeView(e){this.wire.sendAction("platform-close-view",this.identity).catch((e=>{}));const t=await this.getClient();await t.dispatch("close-view",{view:e})}async reparentView(e,t){console.warn("Platform.reparentView has been deprecated, please use Platform.createView"),this.wire.sendAction("platform-reparent-view",this.identity).catch((e=>{}));const n={...e,uuid:e.uuid??this.identity.uuid},i=await this.fin.View.wrap(n),r=await i.getOptions();return this.createView(r,t)}async getSnapshot(){this.wire.sendAction("platform-get-snapshot",this.identity).catch((e=>{}));return(await this.getClient()).dispatch("get-snapshot")}async getViewSnapshot(e){return(await this.getClient()).dispatch("get-view-snapshot",{viewIdentity:e})}async applySnapshot(e,t){this.wire.sendAction("platform-apply-snapshot",this.identity).catch((e=>{}));const n="Requested snapshot must be a valid Snapshot object, or a url or filepath to such an object.";let i;if("string"==typeof e)try{i=(await this._channel.wire.sendAction("get-application-manifest",{manifestUrl:e})).payload.data}catch(e){throw new Error(`${n}: ${e}`)}else i=e;if(!i.windows)throw new Error(n);const r=await this.getClient();return await r.dispatch("apply-snapshot",{snapshot:i,options:t}),this}async fetchManifest(e){return(await this.getClient()).dispatch("platform-fetch-manifest",{manifestUrl:e})}async launchContentManifest(e){this.wire.sendAction("platform-launch-content-manifest",this.identity).catch((()=>{}));const t=await this.getClient(),n=await this.fetchManifest(e);return t.dispatch("launch-into-platform",{manifest:n,manifestUrl:e}),this}async setWindowContext(e={},t){if(this.wire.sendAction("platform-set-window-context",this.identity).catch((e=>{})),!e)throw new Error("Please provide a serializable object or string to set the context.");const n=await this.getClient(),{entityType:i}=t?await this.fin.System.getEntityInfo(t.uuid,t.name):this.fin.me;await n.dispatch("set-window-context",{context:e,entityType:i,target:t||{uuid:this.fin.me.uuid,name:this.fin.me.name}})}async getWindowContext(e){this.wire.sendAction("platform-get-window-context",this.identity).catch((e=>{}));const t=await this.getClient(),{entityType:n}=e?await this.fin.System.getEntityInfo(e.uuid,e.name):this.fin.me;return t.dispatch("get-window-context",{target:e||{uuid:this.fin.me.uuid,name:this.fin.me.name},entityType:n})}async closeWindow(e,t={skipBeforeUnload:!1}){this.wire.sendAction("platform-close-window",this.identity).catch((e=>{}));return(await this.getClient()).dispatch("close-window",{windowId:e,options:t})}}Mn.Platform=Fn,xn=new WeakMap;var jn={},kn={},Ln={},Tn={};function $n(e){switch(e){case"columns":case"grid":case"rows":case"tabs":return!0;default:return!1}}Object.defineProperty(Tn,"__esModule",{value:!0}),Tn.overrideFromComposables=Tn.isValidPresetType=void 0,Tn.isValidPresetType=$n,Tn.overrideFromComposables=function(...e){return t=>e.reduceRight(((e,t)=>n=>t(e(n))),(e=>e))(t)},Tn.default={isValidPresetType:$n};var Bn={},Gn={},Wn={};Object.defineProperty(Wn,"__esModule",{value:!0}),Wn.ApiConsumer=void 0;Wn.ApiConsumer=class{constructor(e){this.strategy=e,this.consume=async e=>(await this.strategy.getExposedFunctions(e)).reduce(((t,n)=>({...t,[n.key]:this.strategy.createFunction(n,e)})),{})}};var Hn={},Nn={};Object.defineProperty(Nn,"__esModule",{value:!0}),Nn.expose=Nn.getExposedProperties=void 0;const Dn=Symbol("exposedProperties");Nn.getExposedProperties=e=>e[Dn]||e.prototype[Dn]||[];Nn.expose=e=>(t,n,i)=>{t[Dn]=t[Dn]||[],t[Dn].push({key:n,descriptor:i,options:e})},Object.defineProperty(Hn,"__esModule",{value:!0}),Hn.ApiExposer=void 0;const Un=Nn;Hn.ApiExposer=class{constructor(e){this.strategy=e,this.exposeInstance=async(e,t)=>{const n=(0,Un.getExposedProperties)(e),i=await Promise.all(n.map((async({key:n,options:i})=>({key:n,options:await this.strategy.exposeFunction(e[n].bind(e),{key:n,options:i,meta:t})}))));await this.strategy.exposeMeta(t,i)}}};var Vn={},zn={},Kn={};Object.defineProperty(Kn,"__esModule",{value:!0}),Kn.ChannelsConsumer=void 0;Kn.ChannelsConsumer=class{constructor(e){this.channel=e,this.getExposedFunctions=async e=>{const{id:t}=e,{props:n}=await this.channel.dispatch(`api-meta:${t}`);return n},this.createFunction=e=>(...t)=>{const{action:n}=e.options;return this.channel.dispatch(n,{args:t})}}};var qn={};Object.defineProperty(qn,"__esModule",{value:!0}),qn.ChannelsExposer=void 0;qn.ChannelsExposer=class{constructor(e){this.channelProviderOrClient=e,this.exposeFunction=async(e,t)=>{const{key:n,options:i,meta:r}=t,{id:o}=r,s=`${o}.${i?.action||n}`;return await this.channelProviderOrClient.register(s,(async({args:t})=>e(...t))),{action:s}},this.exposeMeta=async({id:e},t)=>{const n=`api-meta:${e}`;await this.channelProviderOrClient.register(n,(()=>({props:t})))}}},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Kn,e),n(qn,e)}(zn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(zn,e)}(Vn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Wn,e),n(Hn,e),n(Vn,e),n(Nn,e)}(Gn);var Jn={};Object.defineProperty(Jn,"__esModule",{value:!0}),Jn.createRelayedDispatch=exports.relayChannelClientApi_1=Jn.relayChannelClientApi=void 0;const Yn=["no longer connected","RTCDataChannel closed unexpectedly","The client you are trying to dispatch from is disconnected from the target provider"];exports.relayChannelClientApi_1=Jn.relayChannelClientApi=async(e,t)=>{e.register(`relay:${t}`,(({action:t,target:n,payload:i})=>e.dispatch(n,t,i))),await Promise.resolve()};Jn.createRelayedDispatch=(e,t,n,i)=>async(r,o)=>{try{return await e.dispatch(`relay:${n}`,{action:r,payload:o,target:t})}catch(e){if(s=e.message,Yn.some((e=>s.includes(e)))&&i)throw new Error(i);throw e}var s};var Zn,Qn,Xn,ei=s&&s.__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},ti=s&&s.__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)};Object.defineProperty(Bn,"__esModule",{value:!0}),Bn.ColumnOrRow=Bn.TabStack=Bn.LayoutNode=void 0;const ni=Gn,ii=Jn;class ri{constructor(e,t){Zn.set(this,void 0),this.isRoot=()=>ti(this,Zn,"f").isRoot(this.entityId),this.exists=()=>ti(this,Zn,"f").exists(this.entityId),this.getParent=async()=>{const e=await ti(this,Zn,"f").getParent(this.entityId);if(e)return ri.getEntity(e,ti(this,Zn,"f"))},this.createAdjacentStack=async(e,t)=>{const n=await ti(this,Zn,"f").createAdjacentStack(this.entityId,e,t);return ri.getEntity({entityId:n,type:"stack"},ti(this,Zn,"f"))},this.getAdjacentStacks=async e=>(await ti(this,Zn,"f").getAdjacentStacks({targetId:this.entityId,edge:e})).map((e=>ri.getEntity({type:"stack",entityId:e.entityId},ti(this,Zn,"f")))),ei(this,Zn,e,"f"),this.entityId=t}}Bn.LayoutNode=ri,Zn=new WeakMap,ri.newLayoutEntitiesClient=async(e,t,n)=>{const i=(0,ii.createRelayedDispatch)(e,n,"layout-relay","You are trying to interact with a layout component on a window that does not exist or has been destroyed.");return new ni.ApiConsumer(new ni.ChannelsConsumer({dispatch:i})).consume({id:t})},ri.getEntity=(e,t)=>{const{entityId:n,type:i}=e;switch(i){case"column":case"row":return new si(t,n,i);case"stack":return new oi(t,n);default:throw new Error(`Unrecognised Layout Entity encountered ('${JSON.stringify(e)})`)}};class oi extends ri{constructor(e,t){super(e,t),Qn.set(this,void 0),this.type="stack",this.getViews=()=>ti(this,Qn,"f").getStackViews(this.entityId),this.addView=async(e,t={index:0})=>ti(this,Qn,"f").addViewToStack(this.entityId,e,t),this.removeView=async e=>{await ti(this,Qn,"f").removeViewFromStack(this.entityId,e)},this.setActiveView=async e=>{await ti(this,Qn,"f").setStackActiveView(this.entityId,e)},ei(this,Qn,e,"f")}}Bn.TabStack=oi,Qn=new WeakMap;class si extends ri{constructor(e,t,n){super(e,t),Xn.set(this,void 0),this.getContent=async()=>(await ti(this,Xn,"f").getContent(this.entityId)).map((e=>ri.getEntity(e,ti(this,Xn,"f")))),ei(this,Xn,e,"f"),this.type=n}}Bn.ColumnOrRow=si,Xn=new WeakMap;var ai={};Object.defineProperty(ai,"__esModule",{value:!0}),ai.DEFAULT_LAYOUT_KEY=ai.LAYOUT_CONTROLLER_ID=void 0,ai.LAYOUT_CONTROLLER_ID="layout-entities",ai.DEFAULT_LAYOUT_KEY="__default__";var ci,di,hi,li=s&&s.__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)};Object.defineProperty(Ln,"__esModule",{value:!0}),Ln.Layout=void 0;const ui=G,pi=O,wi=d,yi=Tn,fi=Bn,gi=ai;class mi extends wi.Base{static getClient(e){return li(e,di,"f").getValue()}constructor(e,t){super(t),ci.add(this),di.set(this,new ui.Lazy((async()=>fi.LayoutNode.newLayoutEntitiesClient(await this.platform.getClient(),gi.LAYOUT_CONTROLLER_ID,this.identity)))),this.replace=async e=>{this.wire.sendAction("layout-replace").catch((e=>{}));const t=await this.platform.getClient();await t.dispatch("replace-layout",{target:this.identity,opts:{layout:e}})},this.replaceView=async(e,t)=>{this.wire.sendAction("layout-replace-view").catch((e=>{}));const n=await this.platform.getClient();await n.dispatch("replace-view",{target:this.identity,opts:{viewToReplace:e,newView:t}})},this.applyPreset=async e=>{this.wire.sendAction("layout-apply-preset").catch((e=>{}));const t=await this.platform.getClient(),{presetType:n}=e;if(!n||!(0,yi.isValidPresetType)(n))throw new Error("Cannot apply preset layout, please include an applicable presetType property in the PresetLayoutOptions.");await t.dispatch("apply-preset-layout",{target:this.identity,opts:{presetType:n}})};const n=(0,pi.validateIdentity)(e);if(n)throw new Error(n);this.identity=e,this.platform=this.fin.Platform.wrapSync({uuid:e.uuid}),e.uuid===this.fin.me.uuid&&e.name===this.fin.me.name&&(this.init=this.fin.Platform.Layout.init)}async getConfig(){this.wire.sendAction("layout-get-config").catch((e=>{}));return(await this.platform.getClient()).dispatch("get-frame-snapshot",{target:this.identity})}async getCurrentViews(){this.wire.sendAction("layout-get-views").catch((e=>{}));const e=await this.platform.getClient();return(await e.dispatch("get-layout-views",{target:this.identity})).map((e=>this.fin.View.wrapSync(e)))}async getRootItem(){this.wire.sendAction("layout-get-root-item").catch((()=>{}));const e=await li(this,di,"f").getValue(),t=await e.getRoot("layoutName"in this.identity?this.identity:void 0);return fi.LayoutNode.getEntity(t,e)}async getStackByViewIdentity(e){this.wire.sendAction("layout-get-stack-by-view").catch((()=>{}));const t=await li(this,di,"f").getValue(),n=await t.getStackByView(e);if(!n)throw new Error(`No stack found for view: ${e.uuid}/${e.name}`);return fi.LayoutNode.getEntity(n,t)}async addView(e,{location:t,targetView:n}={}){this.wire.sendAction("layout-add-view").catch((e=>{}));const{identity:i}=await li(this,ci,"m",hi).call(this,"layout-add-view",{viewOptions:e,location:t,targetView:n});return{identity:i}}async closeView(e){this.wire.sendAction("layout-close-view").catch((e=>{})),await li(this,ci,"m",hi).call(this,"layout-close-view",{viewIdentity:e})}}Ln.Layout=mi,di=new WeakMap,ci=new WeakSet,hi=async function(e,t){return(await this.platform.getClient()).dispatch(e,{target:this.identity,opts:t})};var vi,Ci,bi,Ii,Ei,xi=s&&s.__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)},Ai=s&&s.__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};Object.defineProperty(kn,"__esModule",{value:!0}),kn.LayoutModule=void 0;const Pi=d,Mi=Ln,_i=ai;class Oi extends Pi.Base{constructor(){super(...arguments),vi.add(this),Ci.set(this,!1),bi.set(this,null),this.init=async(e={})=>{if(this.wire.sendAction("layout-init").catch((e=>{})),!this.wire.environment.layoutAllowedInContext(this.fin))throw new Error("Layout.init can only be called from a Window context.");if(xi(this,Ci,"f"))throw new Error("Layout.init was already called, please use Layout.create to add additional layouts.");"openfin"===this.wire.environment.type&&await this.fin.Platform.getCurrentSync().getClient(),Ai(this,Ci,!0,"f"),Ai(this,bi,await this.wire.environment.initLayoutManager(this.fin,this.wire,e),"f"),await this.wire.environment.applyLayoutSnapshot(this.fin,xi(this,bi,"f"),e);const t={name:this.fin.me.name,uuid:this.fin.me.uuid};if(!e.layoutManagerOverride){const e={layoutName:_i.DEFAULT_LAYOUT_KEY,...t};return xi(this,Ii,"f").call(this,e)}return this.wrapSync(t)},Ii.set(this,(e=>{const t="[Layout] You are using a deprecated property `layoutManager` - it will throw if you access it starting in v37.",n=new Proxy({},{get(e,n){throw console.warn(`[Layout-mgr-proxy] accessing ${n.toString()}`),new Error(t)}}),i=Object.assign(this.wrapSync(e),{layoutManager:n});return new Proxy(i,{get(e,n){if("layoutManager"===n)throw console.warn(`[Layout-proxy] accessing ${n.toString()}`),new Error(t);return e[n]}})})),this.getCurrentLayoutManagerSync=()=>xi(this,vi,"m",Ei).call(this,"fin.Platform.Layout.getCurrentLayoutManagerSync()"),this.create=async e=>this.wire.environment.createLayout(xi(this,vi,"m",Ei).call(this,"fin.Platform.Layout.create()"),e),this.destroy=async e=>this.wire.environment.destroyLayout(xi(this,vi,"m",Ei).call(this,"fin.Platform.Layout.destroy()"),e)}async wrap(e){return this.wire.sendAction("layout-wrap").catch((e=>{})),new Mi.Layout(e,this.wire)}wrapSync(e){return this.wire.sendAction("layout-wrap-sync").catch((e=>{})),new Mi.Layout(e,this.wire)}async getCurrent(){if(this.wire.sendAction("layout-get-current").catch((e=>{})),"openfin"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error("You are not in a Window context. Only Windows can have a Layout.");const{uuid:e,name:t}=this.fin.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction("layout-get-current-sync").catch((e=>{})),"openfin"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error("You are not in a Window context. Only Windows can have a Layout.");const{uuid:e,name:t}=this.fin.me;return this.wrapSync({uuid:e,name:t})}async getLayoutByViewIdentity(e){this.wire.sendAction("layout-get-by-view-identity").catch((()=>{}));let t=await this.wire.environment.getViewWindowIdentity(this.fin,e);t.identity&&(t=t.identity);try{const n=this.wrapSync(t),i=await Mi.Layout.getClient(n),r=await i.getLayoutIdentityForViewOrThrow(e);return this.wrapSync(r)}catch(n){if(!["No action registered at target for","getLayoutIdentityForViewOrThrow is not a function"].some((e=>n.message.includes(e))))throw n;if(t.uuid===t.name)throw new Error(`View identity ${JSON.stringify(e)} is not attached to any layout in provider window ${JSON.stringify(t)}.`);return this.wrapSync(t)}}}kn.LayoutModule=Oi,Ci=new WeakMap,bi=new WeakMap,Ii=new WeakMap,vi=new WeakSet,Ei=function(e){if(!xi(this,bi,"f"))throw new Error(`You must call init before using the API ${e}`);return xi(this,bi,"f")},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(kn,e),n(Ln,e)}(jn),Object.defineProperty(Pn,"__esModule",{value:!0}),Pn.PlatformModule=void 0;const Si=d,Ri=Mn,Fi=jn;class ji extends Si.Base{constructor(e,t){super(e),this._channel=t,this.Layout=new Fi.LayoutModule(this.wire)}async init(e){if(!fin.__internal_.isPlatform||fin.me.name!==fin.me.uuid)throw new Error("fin.Platform.init should only be called from a custom platform provider running in the main window of the application.");return this.wire.environment.initPlatform(this.fin,e)}async wrap(e){return this.wire.sendAction("platform-wrap").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}wrapSync(e){return this.wire.sendAction("platform-wrap-sync").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}async getCurrent(){return this.wire.sendAction("platform-get-current").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction("platform-get-current-sync").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}start(e){return this.wire.sendAction("platform-start").catch((e=>{})),new Promise((async(t,n)=>{try{const{uuid:n}=e,i=await this.fin.Application._create({...e,isPlatformController:!0});i.once("platform-api-ready",(()=>t(this.wrapSync({uuid:n})))),i._run({uuid:n})}catch(e){n(e)}}))}startFromManifest(e,t){return this.wire.sendAction("platform-start-from-manifest").catch((e=>{})),new Promise((async(n,i)=>{try{const i=await this.fin.Application._createFromManifest(e);i.once("platform-api-ready",(()=>n(this.wrapSync({uuid:i.identity.uuid})))),i._run(t)}catch(e){i(e)}}))}}Pn.PlatformModule=ji,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Pn,e),n(Mn,e)}(An);var ki={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getMe=e.getBaseMe=e.environmentUnsupportedMessage=void 0;const t=J(),n=un,i=ie(),r=rn;function o(e,t,n){return{...{isView:"view"===e,isWindow:"window"===e,isFrame:"iframe"===e,isExternal:"external connection"===e},uuid:t,name:n,entityType:e}}e.environmentUnsupportedMessage="You are not running in OpenFin.",e.getBaseMe=o,e.getMe=function(s){const{uuid:a,name:c,entityType:d}=s.me,h={setContext(){throw new Error(e.environmentUnsupportedMessage)},addContextHandler(){throw new Error(e.environmentUnsupportedMessage)},getContextGroups(){throw new Error(e.environmentUnsupportedMessage)},joinContextGroup(){throw new Error(e.environmentUnsupportedMessage)},removeFromContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getAllClientsInContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getInfoForContextGroup(){throw new Error(e.environmentUnsupportedMessage)}},l="Interop API has not been instantiated. Either connection has failed or you have not declared interop in your config.",u={setContext(){throw new Error(l)},addContextHandler(){throw new Error(l)},getContextGroups(){throw new Error(l)},joinContextGroup(){throw new Error(l)},removeFromContextGroup(){throw new Error(l)},getAllClientsInContextGroup(){throw new Error(l)},getInfoForContextGroup(){throw new Error(l)}},p={eventNames:()=>{throw new Error(e.environmentUnsupportedMessage)},emit:()=>{throw new Error(e.environmentUnsupportedMessage)},listeners:()=>{throw new Error(e.environmentUnsupportedMessage)},listenerCount:()=>{throw new Error(e.environmentUnsupportedMessage)},on:()=>{throw new Error(e.environmentUnsupportedMessage)},addListener:()=>{throw new Error(e.environmentUnsupportedMessage)},once:()=>{throw new Error(e.environmentUnsupportedMessage)},prependListener:()=>{throw new Error(e.environmentUnsupportedMessage)},prependOnceListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeAllListeners:()=>{throw new Error(e.environmentUnsupportedMessage)}};switch(d){case"view":return Object.assign(new t.View(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case"window":return Object.assign(new i._Window(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case"iframe":return Object.assign(new n._Frame(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case"external connection":return Object.assign(new r.ExternalApplication(s,{uuid:a}),o(d,a,c),{interop:u,isOpenFin:!1});default:return{...o(d,a,c),...p,interop:h,isOpenFin:!1}}}}(ki);var Li={},Ti={},$i={};Object.defineProperty($i,"__esModule",{value:!0}),$i.createWarningObject=$i.createUnusableObject=void 0,$i.createUnusableObject=function(e){const t=()=>{throw new Error(e)};return new Proxy({},{apply:t,construct:t,defineProperty:t,deleteProperty:t,get:t,getOwnPropertyDescriptor:t,getPrototypeOf:t,has:t,isExtensible:t,ownKeys:t,preventExtensions:t,set:t,setPrototypeOf:t})},$i.createWarningObject=function(e,t){return new Proxy(t,{get:(...t)=>(console.warn(e),Reflect.get(...t)),set:(...t)=>(console.warn(e),Reflect.set(...t)),getOwnPropertyDescriptor:(...t)=>(console.warn(e),Reflect.getOwnPropertyDescriptor(...t)),ownKeys:(...t)=>(console.warn(e),Reflect.ownKeys(...t))})};var Bi,Gi={},Wi={};var Hi={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.wrapIntentHandler=e.BROKER_ERRORS=e.generateOverrideWarning=e.generateOverrideError=e.wrapContextHandler=e.wrapInTryCatch=e.generateId=void 0;e.generateId=()=>`${Math.random()}${Date.now()}`;e.wrapInTryCatch=(e,t)=>(...n)=>{try{return e(...n)}catch(e){throw new Error((t||"")+e)}};e.wrapContextHandler=(e,t)=>async n=>{try{await e(n)}catch(e){throw console.error(`Error thrown by handler ${t} for context type ${n.type}: ${e}`),e}};e.generateOverrideError=(e,t)=>`You have tried to to use ${e} but ${t} has not been overridden in the Interop Broker. Please override this function. Refer to our documentation for more info.`;e.generateOverrideWarning=(e,t,n,i)=>{const{uuid:r,name:o}=n;return i?`Entity with identity: ${r}/${o} has called ${i} or ${e} but ${t} has not been overridden.`:`Entity with identity: ${r}/${o} has called ${e} but ${t} has not been overridden.`},e.BROKER_ERRORS={fireIntent:(0,e.generateOverrideError)("fireIntent","handleFiredIntent"),fireIntentForContext:(0,e.generateOverrideError)("fireIntentForContext","handleFiredIntentForContext"),getInfoForIntent:(0,e.generateOverrideError)("getInfoForIntent","handleInfoForIntent"),getInfoForIntentsByContext:(0,e.generateOverrideError)("getInfoForIntentsByContext","handleInfoForIntentsByContext"),joinSessionContextGroupWithJoinContextGroup:"The Context Group you have tried to join is a Session Context Group. Custom Context Groups can only be defined by the Interop Broker through code or manifest configuration. Please use joinSessionContextGroup.",fdc3Open:(0,e.generateOverrideError)("fdc3.open","fdc3HandleOpen"),fdc3FindInstances:(0,e.generateOverrideError)("fdc3.findInstances","fdc3HandleFindInstances"),fdc3GetAppMetadata:(0,e.generateOverrideError)("fdc3.getAppMetadata","fdc3HandleGetAppMetadata"),fdc3GetInfo:(0,e.generateOverrideError)("fdc3.getInfo","fdc3HandleGetInfo")};e.wrapIntentHandler=(e,t)=>async n=>{try{return e(n)}catch(e){throw console.error(`Error thrown by handler ${t}: ${e}`),e}}}(Hi);var Ni,Di,Ui={};function Vi(){if(Di)return Gi;Di=1;var e,t,n,r=s&&s.__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},o=s&&s.__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)},a=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Gi,"__esModule",{value:!0}),Gi.InteropBroker=void 0;const c=d,h=a(function(){if(Bi)return Wi;Bi=1,Object.defineProperty(Wi,"__esModule",{value:!0});const e=Cr();return Wi.default=class{constructor(e,t){this.provider=e,this.id=t,this.lastContext=void 0,this.contextGroupMap=new Map,this.clients=new Map,this.registerListeners()}registerListeners(){this.provider.register(`sessionContextGroup:getContext-${this.id}`,this.getCurrentContext.bind(this)),this.provider.register(`sessionContextGroup:setContext-${this.id}`,this.setContext.bind(this)),this.provider.register(`sessionContextGroup:handlerAdded-${this.id}`,this.handlerAdded.bind(this)),this.provider.register(`sessionContextGroup:handlerRemoved-${this.id}`,this.handlerRemoved.bind(this))}getCurrentContext(e){return e.type?this.contextGroupMap.get(e.type):this.lastContext}setContext(t,n){const{context:i}=t,r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name} not in Session Client State Map`);this.contextGroupMap.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{e.contextHandlers.get(i.type)?.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getClientState(e){return this.clients.get(e.endpointId)}async handlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(i){const e=r.contextHandlers.get(i)||[];r.contextHandlers.set(i,[...e,n]);const o=this.contextGroupMap.get(i);o&&await this.provider.dispatch(t,n,o)}else{r.globalHandler=n;const e=[...this.contextGroupMap.keys()].map((async e=>{const i=this.contextGroupMap.get(e);i&&await this.provider.dispatch(t,n,i)}));await Promise.all(e)}}handlerRemoved(e,t){const{handlerId:n}=e,i=this.clients.get(t.endpointId);i?(Array.from(i.contextHandlers).forEach((([,e])=>{const t=e.indexOf(n);t>-1&&e.splice(t,1)})),i.globalHandler===n&&(i.globalHandler=void 0)):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={contextHandlers:new Map,clientIdentity:e,globalHandler:void 0};this.clients.set(e.endpointId,t)}}onDisconnection(e){this.clients.delete(e.endpointId)}},Wi}()),l=Hi,u=a(i),p=function(){if(Ni)return Ui;Ni=1,Object.defineProperty(Ui,"__esModule",{value:!0}),Ui.PrivateChannelProvider=void 0;const e=Vi();return Ui.PrivateChannelProvider=class t{constructor(e,t){this.provider=e,this.id=t,this.clients=new Map,this.registerListeners(),this.contextByContextType=new Map,this.lastContext=void 0,this.provider.onConnection((e=>this.registerNewClient(e))),this.provider.onDisconnection((async e=>{const{endpointId:t}=e;this.clients.has(t)&&await this.handleClientDisconnecting(e),0===(await this.provider.getAllClientInfo()).length&&this.provider.destroy()}))}getClientState(e){return this.clients.get(e.endpointId)}registerListeners(){this.provider.register("broadcast",this.broadcast.bind(this)),this.provider.register("getCurrentContext",this.getCurrentContext.bind(this)),this.provider.register("contextHandlerAdded",this.contextHandlerAdded.bind(this)),this.provider.register("contextHandlerRemoved",this.contextHandlerRemoved.bind(this)),this.provider.register("nonStandardHandlerRemoved",this.nonStandardHandlerRemoved.bind(this)),this.provider.register("onAddContextHandlerAdded",this.onAddContextHandlerAdded.bind(this)),this.provider.register("onDisconnectHandlerAdded",this.onDisconnectHandlerAdded.bind(this)),this.provider.register("onUnsubscribeHandlerAdded",this.onUnsubscribeHandlerAdded.bind(this)),this.provider.register("clientDisconnecting",((e,t)=>{this.handleClientDisconnecting(t)}))}broadcast(t,n){const{context:i}=t;if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name}, tried to call broadcast, is not connected to this Private Channel`);const r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to broadcast - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);this.contextByContextType.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{const t=e.handlerIdsByContextTypes.get(i.type);t&&t.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getCurrentContext(e,t){const{contextType:n}=e;if(!this.getClientState(t))throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call getCurrentContext, is not connected to this Private Channel`);if(void 0!==n){return this.contextByContextType.get(n)||null}return this.lastContext?this.lastContext:null}contextHandlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call addContextListener, is not connected to this Private Channel`);if(i){const e=r.handlerIdsByContextTypes.get(i)||[];r.handlerIdsByContextTypes.set(i,[...e,n])}else r.globalHandler=n;Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&e.onAddContextListenerHandlerId&&this.provider.dispatch(e.clientIdentity,e.onAddContextListenerHandlerId,i)}))}async contextHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);if(i){let e;if(i.globalHandler===n)i.globalHandler=void 0;else for(const[t,r]of i.handlerIdsByContextTypes){const i=r.indexOf(n);i>-1&&(r.splice(i,1),e=t)}const r=(await this.getConnectedClients()).map((async n=>{const{clientIdentity:i,clientIdentity:{endpointId:r},onUnsubscribeHandlerId:o}=n;r!==t.endpointId&&o&&await this.provider.dispatch(i,o,e)}));try{await Promise.all(r)}catch(e){throw console.error(`Problem when attempting to dispatch to onUnsubscribeHandlers. Error: ${e} Removing Client: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}`),new Error(e)}}else console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}.`)}nonStandardHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);i?i.onDisconnectHandlerId===n?i.onDisconnectHandlerId=void 0:i.onAddContextListenerHandlerId===n?i.onAddContextListenerHandlerId=void 0:i.onUnsubscribeHandlerId===n&&(i.onUnsubscribeHandlerId=void 0):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}onAddContextHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onAddContextListener, is not connected to this Private Channel`);n.onAddContextListenerHandlerId=i,Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&Array.from(e.handlerIdsByContextTypes.keys()).forEach((e=>{this.provider.dispatch(t,i,e)}))}))}onDisconnectHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onDisconnect, is not connected to this Private Channel`);n.onDisconnectHandlerId=i}onUnsubscribeHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onUnsubscribe, is not connected to this Private Channel`);n.onUnsubscribeHandlerId=i}removeClient(e){const t=this.getClientState(e);if(!t)throw new Error(`Client with Identity: ${e.uuid} ${e.name}, tried to call disconnect, is not connected to this Private Channel`);t.handlerIdsByContextTypes.clear(),this.clients.delete(e.endpointId)}async fireOnDisconnectForOtherClients(e){const{endpointId:t}=e,n=(await this.getConnectedClients()).map((async e=>{const{clientIdentity:{endpointId:n},onDisconnectHandlerId:i}=e;n!==t&&i&&await this.provider.dispatch(e.clientIdentity,i)}));try{await Promise.all(n)}catch(t){throw console.error(`Problem when attempting to dispatch to onDisconnectHandlers. Error: ${t} Disconnecting Client: uuid: ${e.uuid}. name: ${e.name}. endpointId: ${e.endpointId}`),new Error(t)}}async unsubscribeAll(e){const{endpointId:t}=e,n=this.clients.get(t);if(n){const t=Array.from(n.handlerIdsByContextTypes.values()).flat(),i=n.globalHandler;if(t.length>0){const n=t.map((async t=>this.contextHandlerRemoved({handlerId:t},e)));try{await Promise.all(n)}catch(e){console.error(e.message)}}if(i)try{await this.contextHandlerRemoved({handlerId:i},e)}catch(e){console.error(e.message)}}}async handleClientDisconnecting(e){await this.unsubscribeAll(e),this.removeClient(e),await this.fireOnDisconnectForOtherClients(e)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={clientIdentity:e,handlerIdsByContextTypes:new Map,globalHandler:void 0,onAddContextListenerHandlerId:void 0,onUnsubscribeHandlerId:void 0,onDisconnectHandlerId:void 0};this.clients.set(e.endpointId,t)}}async getConnectedClients(){const e=await this.provider.getAllClientInfo();return Array.from(this.clients.values()).filter((t=>{const{uuid:n,name:i}=t.clientIdentity;return e.some((e=>i===e.name&&n===e.uuid))}))}static init(e,n){return new t(e,n)}},Ui}(),w=G,y=[{id:"green",displayMetadata:{color:"#00CC88",name:"green"}},{id:"purple",displayMetadata:{color:"#8C61FF",name:"purple"}},{id:"orange",displayMetadata:{color:"#FF8C4C",name:"orange"}},{id:"red",displayMetadata:{color:"#FF5E60",name:"red"}},{id:"pink",displayMetadata:{color:"#FF8FB8",name:"pink"}},{id:"yellow",displayMetadata:{color:"#E9FF8F",name:"yellow"}}];let f=class i extends c.Base{constructor(i,s,a){super(i),e.set(this,void 0),t.set(this,void 0),n.set(this,void 0),this.getProvider=()=>o(this,n,"f").getValue(),this.interopClients=new Map,this.contextGroupsById=new Map,r(this,t,a.contextGroups??[...y],"f"),r(this,e,a.fdc3Info,"f"),a?.logging&&(this.logging=a.logging),this.intentClientMap=new Map,this.lastContextMap=new Map,this.sessionContextGroupMap=new Map,r(this,n,new w.Lazy(s),"f"),this.setContextGroupMap(),this.setupChannelProvider()}static createClosedConstructor(...e){return class extends i{constructor(...t){if(t.length){const[n,i,r]=t;if(r&&"object"==typeof r&&!(0,u.default)(r,e[2]))return console.warn("You have modified the parameters of the InteropOverride constructor. This behavior is deprecated and will be removed in a future version. You can modify these options in your manifest. Please consult our Interop docs for guidance on migrating to the new override scheme."),void super(e[0],e[1],r);console.warn("You are attempting to pass arguments to the InteropOverride constructor. This is not necessary, and these passed arguments will be ignored. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.")}super(...e)}}}setContext({context:e},t){this.wire.sendAction("interop-broker-set-context").catch((e=>{}));const n=this.getClientState(t);if(!n||!n.contextGroupId)throw n?new Error("You must join a context group before you can set context."):new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);{const{contextGroupId:t}=n;this.setContextForGroup({context:e},t)}}setContextForGroup({context:e},t){this.wire.sendAction("interop-broker-set-context-for-group").catch((e=>{}));const n=this.contextGroupsById.get(t);if(!n)throw new Error(`Unable to set context for context group that isn't in the context group mapping: ${t}.`);const r=i.checkContextIntegrity(e);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(e)}`);const o=e.type;n.set(o,e),this.lastContextMap.set(t,o);Array.from(this.interopClients.values()).filter((e=>e.contextGroupId===t)).forEach((t=>{for(const[,n]of t.contextHandlers)i.isContextTypeCompatible(o,n.contextType)&&this.invokeContextHandler(t.clientIdentity,n.handlerId,e)}))}getCurrentContext(e,t){this.wire.sendAction("interop-broker-get-current-context").catch((e=>{}));const n=this.getClientState(t);if(!n?.contextGroupId)throw new Error("You must be a member of a context group to call getCurrentContext");const{contextGroupId:i}=n,r=this.contextGroupsById.get(i),o=this.lastContextMap.get(i),s=e?.contextType??o;return r&&s?r.get(s):void 0}async joinContextGroup({contextGroupId:e,target:t},n){if(this.wire.sendAction("interop-broker-join-context-group").catch((e=>{})),this.sessionContextGroupMap.has(e))throw new Error(l.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup);if(t){i.hasEndpointId(t)&&await this.addClientToContextGroup({contextGroupId:e},t);try{const n=this.channel.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name));if(!n.length)throw new Error(`Given Identity ${t.uuid} ${t.name} is not connected to the Interop Broker.`);n.length>1&&console.warn(`More than one connection found for identity ${t.uuid} ${t.name}`);const i=[];for(const t of n)i.push(this.addClientToContextGroup({contextGroupId:e},t));await Promise.all(i)}catch(e){throw new Error(e)}}else await this.addClientToContextGroup({contextGroupId:e},n)}async addClientToContextGroup({contextGroupId:e},t){this.wire.sendAction("interop-broker-add-client-to-context-group").catch((e=>{}));const n=this.getClientState(t);if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(!this.getContextGroups().find((t=>t.id===e)))throw new Error(`Attempting to join a context group that does not exist: ${e}. You may only join existing context groups.`);if(n.contextGroupId!==e){n.contextGroupId=e,await this.setCurrentContextGroupInClientOptions(t,e);const i=this.contextGroupsById.get(e);for(const[,e]of n.contextHandlers){const{contextType:n,handlerId:r}=e;if(void 0===n)i.forEach(((e,n)=>{this.invokeContextHandler(t,r,e)}));else if(i.has(n)){const e=i.get(n);e&&this.invokeContextHandler(t,r,e)}}}}async removeFromContextGroup({target:e},t){if(this.wire.sendAction("interop-broker-remove-from-context-group").catch((e=>{})),e){i.hasEndpointId(e)&&await this.removeClientFromContextGroup(e);try{const t=this.channel.connections.filter((t=>t.uuid===e.uuid&&t.name===e.name));if(!t.length)throw new Error(`No connection found for given Identity ${e.uuid} ${e.name}`);t.length>1&&console.warn(`More than one connection found for identity ${e.uuid} ${e.name}`);const n=[];for(const e of t)n.push(this.removeClientFromContextGroup(e));await Promise.all(n)}catch(e){throw new Error(e)}}else await this.removeClientFromContextGroup(t)}async removeClientFromContextGroup(e){this.wire.sendAction("interop-broker-remove-client-from-context-group").catch((e=>{}));const t=this.getClientState(e);t&&(t.contextGroupId=void 0),await this.setCurrentContextGroupInClientOptions(e,null)}getContextGroups(){return this.wire.sendAction("interop-broker-get-context-groups").catch((e=>{})),o(this,t,"f").map((e=>({...e})))}getInfoForContextGroup({contextGroupId:e}){return this.wire.sendAction("interop-broker-get-info-for-context-group").catch((e=>{})),this.getContextGroups().find((t=>t.id===e))}getAllClientsInContextGroup({contextGroupId:e}){this.wire.sendAction("interop-broker-get-all-clients-in-context-group").catch((e=>{}));return Array.from(this.interopClients.values()).filter((t=>t.contextGroupId===e)).map((e=>e.clientIdentity))}async handleFiredIntent(e,t){const n=(0,l.generateOverrideWarning)("fdc3.raiseIntent","InteropBroker.handleFiredIntent",t,"interopClient.fireIntent");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntent)}async setIntentTarget(e,t){this.wire.sendAction("interop-broker-set-intent-target").catch((e=>{}));const n=this.intentClientMap.get(t.name),i=`intent-handler-${e.name}`;if(n){const t=n.get(i);if(t){if(t.pendingIntents.push(e),t.clientIdentity&&t.isReady){const{clientIdentity:e,pendingIntents:n}=t;try{const r=n[n.length-1];await this.invokeIntentHandler(e,i,r),t.pendingIntents=[]}catch(n){console.error(`Error invoking intent handler for client ${e.uuid}/${e.name}/${e.endpointId}`),t.isReady=!1}}}else n.set(i,{isReady:!1,pendingIntents:[e]})}else{this.intentClientMap.set(t.name,new Map);const n=this.intentClientMap.get(t.name);n&&n.set(i,{isReady:!1,pendingIntents:[e]})}}async handleInfoForIntent(e,t){const n=(0,l.generateOverrideWarning)("fdc3.findIntent","InteropBroker.handleInfoForIntent",t,"interopClient.getInfoForIntent");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntent)}async handleInfoForIntentsByContext(e,t){const n=(0,l.generateOverrideWarning)("fdc3.findIntentsByContext","InteropBroker.handleInfoForIntentsByContext",t,"interopClient.getInfoForIntentsByContext");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntentsByContext)}async handleFiredIntentForContext(e,t){const n=(0,l.generateOverrideWarning)("fdc3.raiseIntentForContext","InteropBroker.handleFiredIntentForContext",t,"interopClient.fireIntentForContext");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntentForContext)}async clientDisconnected(e){}async fdc3HandleOpen({app:e,context:t},n){const i=(0,l.generateOverrideWarning)("fdc3.open","InteropBroker.fdc3HandleOpen",n);throw console.warn(i),new Error(l.BROKER_ERRORS.fdc3Open)}async fdc3HandleFindInstances(e,t){const n=(0,l.generateOverrideWarning)("fdc3.open","InteropBroker.fdc3HandleFindInstances",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3FindInstances)}async fdc3HandleGetAppMetadata(e,t){const n=(0,l.generateOverrideWarning)("fdc3.getAppMetadata","InteropBroker.fdc3HandleGetAppMetadata",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3GetAppMetadata)}async invokeContextHandler(e,t,n){const i=await this.getProvider();try{await i.dispatch(e,t,n)}catch(i){console.error(`Error invoking context handler ${t} for context type ${n.type} in client ${e.uuid}/${e.name}/${e.endpointId}`,i)}}async invokeIntentHandler(e,t,n){const i=await this.getProvider();await i.dispatch(e,t,n)}async fdc3HandleGetInfo(t,n){const{fdc3Version:i}=t;return{fdc3Version:i,...o(this,e,"f"),optionalFeatures:{OriginatingAppMetadata:!1,UserChannelMembershipAPIs:!0},appMetadata:{appId:"",instanceId:""}}}async getAllClientInfo(){return(await this.getProvider()).getAllClientInfo()}decorateSnapshot(e){return{...e,interopSnapshotDetails:{contextGroupStates:this.getContextGroupStates()}}}applySnapshot(e,t){const n=e?.interopSnapshotDetails?.contextGroupStates;n&&(t?.closeExistingWindows||this.updateExistingClients(n),this.rehydrateContextGroupStates(n))}updateExistingClients(e){this.interopClients.forEach((t=>{const{clientIdentity:n,contextGroupId:r,contextHandlers:o}=t;if(r){const t=e[r];for(const[,e]of Object.entries(t))o.forEach((t=>{const{handlerId:r,contextType:o}=t;i.isContextTypeCompatible(e.type,o)&&this.invokeContextHandler(n,r,e)}))}}))}getContextGroupStates(){return i.toObject(this.contextGroupsById)}rehydrateContextGroupStates(e){const t=Object.entries(e);for(const[e,n]of t){const t=Object.entries(n);for(const[n,i]of t)if(this.contextGroupsById.has(e)){this.contextGroupsById.get(e).set(n,i)}else console.warn(`Attempting to set a context group that isn't in the context group mapping. Skipping context group rehydration for: ${e}`)}}contextHandlerRegistered({contextType:e,handlerId:t},n){const i={contextType:e,handlerId:t},r=this.getClientState(n);if(r?.contextHandlers.set(t,i),r&&r.contextGroupId){const{contextGroupId:i}=r,o=this.contextGroupsById.get(i);if(void 0===e)o.forEach(((e,i)=>{this.invokeContextHandler(n,t,e)}));else if(o.has(e)){const i=o.get(e);i&&this.invokeContextHandler(n,t,i)}}}async intentHandlerRegistered(e,t){const{handlerId:n}=e,i=this.intentClientMap.get(t.name),r=i?.get(n);if(i)if(r){const{pendingIntents:e}=r;r.clientIdentity=t,r.isReady=!0;try{if(e.length>0){const i=e[e.length-1];await this.invokeIntentHandler(t,n,i),r.pendingIntents=[]}}catch(e){console.error(`Error invoking intent handler: ${n} for client ${t.uuid}/${t.name}/${t.endpointId}`)}}else i.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t});else{this.intentClientMap.set(t.name,new Map);const e=this.intentClientMap.get(t.name);e&&e.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t})}}removeContextHandler({handlerId:e},t){const n=this.getClientState(t);n&&n.contextHandlers.delete(e)}handleJoinSessionContextGroup({sessionContextGroupId:e},t){try{if(!e)throw new Error("Failed to join session context group: must specify group id.");const n=this.sessionContextGroupMap.get(e);if(n)n.registerNewClient(t);else{const n=new h.default(this.channel,e);n.registerNewClient(t),this.sessionContextGroupMap.set(e,n)}return{hasConflict:this.contextGroupsById.has(e)}}catch(e){throw new Error(e)}}getClientState(e){return this.interopClients.get(e.endpointId)}static toObject(e){const t=Object.fromEntries(e),n={};return Object.entries(t).forEach((([e,t])=>{const i=Object.fromEntries(t);n[e]=i})),n}static checkContextIntegrity(e){if(!e)return{isValid:!1,reason:"No context supplied"};if("object"!=typeof e)return{isValid:!1,reason:"Context must be an Object"};if(!e.type)return{isValid:!1,reason:"Context must have a type property"};if(e.id&&"object"!=typeof e.id)return{isValid:!1,reason:"Context id must be an Object populated with key-value identifiers (if set)"};if(e.id){const{id:t}=e,n=Object.keys(t);let i=!1;if(!n.length)return{isValid:!1,reason:"Context id must have at least one key-value identifier"};if(n.forEach((e=>{"string"==typeof e&&"string"==typeof t[e]||(i=!0)})),i)return{isValid:!1,reason:"Context id key-value identifiers must be of type string"}}return e.name&&"string"!=typeof e.name?{isValid:!1,reason:"Context name must be of string type (if set)"}:{isValid:!0}}static hasEndpointId(e){return void 0!==e.endpointId}static isContextTypeCompatible(e,t){return void 0===t||e===t}setContextGroupMap(){for(const e of this.getContextGroups())this.contextGroupsById.set(e.id,new Map)}async setCurrentContextGroupInClientOptions(e,t){try{const n=await this.fin.System.getEntityInfo(e.uuid,e.name);let i;"view"===n.entityType?i=await this.fin.View.wrap(e):"window"===n.entityType&&(i=await this.fin.Window.wrap(e)),i&&await i.updateOptions({interop:{currentContextGroup:t}})}catch(e){}}async setupChannelProvider(){try{const e=await this.getProvider();this.channel=e,this.wireChannel(e)}catch(e){throw new Error(`Error setting up Interop Broker Channel Provider: ${e}`)}}wireChannel(e){e.onConnection((async(e,t)=>{if(!await this.isConnectionAuthorized(e,t))throw new Error(`Connection not authorized for ${e.uuid}, ${e.name}`);if(!e.endpointId)throw new Error("Version too old to be compatible with Interop. Please upgrade your runtime to a more recent version.");const n={contextGroupId:void 0,contextHandlers:new Map,clientIdentity:e};t?.currentContextGroup&&this.contextGroupsById.has(t.currentContextGroup)&&(n.contextGroupId=t?.currentContextGroup),this.interopClients.set(e.endpointId,n)})),e.onDisconnection((e=>{this.interopClients.delete(e.endpointId);const t=this.intentClientMap.get(e.name);t&&e.uuid===this.fin.me.uuid&&t.forEach((e=>{e.isReady=!1})),this.sessionContextGroupMap.forEach((t=>{t.onDisconnection(e)})),this.clientDisconnected(e)})),e.beforeAction((async(e,t,n)=>{if(!await this.isActionAuthorized(e,t,n))throw new Error(`Action (${e}) not authorized for ${n.uuid}, ${n.name}`);this.logging?.beforeAction?.enabled&&console.log(e,t,n)})),e.afterAction(((e,t,n)=>{this.logging?.afterAction?.enabled&&console.log(e,t,n)})),e.register("setContext",this.setContext.bind(this)),e.register("fireIntent",this.handleFiredIntent.bind(this)),e.register("getCurrentContext",this.getCurrentContext.bind(this)),e.register("getInfoForIntent",this.handleInfoForIntent.bind(this)),e.register("getInfoForIntentsByContext",this.handleInfoForIntentsByContext.bind(this)),e.register("fireIntentForContext",this.handleFiredIntentForContext.bind(this)),e.register("getContextGroups",this.getContextGroups.bind(this)),e.register("joinContextGroup",this.joinContextGroup.bind(this)),e.register("removeFromContextGroup",this.removeFromContextGroup.bind(this)),e.register("getAllClientsInContextGroup",this.getAllClientsInContextGroup.bind(this)),e.register("getInfoForContextGroup",this.getInfoForContextGroup.bind(this)),e.register("contextHandlerRegistered",this.contextHandlerRegistered.bind(this)),e.register("intentHandlerRegistered",this.intentHandlerRegistered.bind(this)),e.register("removeContextHandler",this.removeContextHandler.bind(this)),e.register("sessionContextGroup:createIfNeeded",this.handleJoinSessionContextGroup.bind(this)),e.register("fdc3Open",this.fdc3HandleOpen.bind(this)),e.register("fdc3v2FindIntentsByContext",this.handleInfoForIntentsByContext.bind(this)),e.register("fdc3FindInstances",this.fdc3HandleFindInstances.bind(this)),e.register("fdc3GetAppMetadata",this.fdc3HandleGetAppMetadata.bind(this)),e.register("fdc3v2GetInfo",(async(e,t)=>this.fdc3HandleGetInfo.bind(this)(e,t))),e.register("createPrivateChannelProvider",(async e=>{const{channelId:t}=e,n=await this.fin.InterApplicationBus.Channel.create(t);p.PrivateChannelProvider.init(n,t)}))}isConnectionAuthorized(e,t){return this.wire.sendAction("interop-broker-is-connection-authorized").catch((e=>{})),Promise.resolve(!0)}isActionAuthorized(e,t,n){return this.wire.sendAction("interop-broker-is-action-authorized").catch((e=>{})),Promise.resolve(!0)}};return Gi.InteropBroker=f,e=new WeakMap,t=new WeakMap,n=new WeakMap,Gi}var zi,Ki={},qi={},Ji=s&&s.__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},Yi=s&&s.__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)};Object.defineProperty(qi,"__esModule",{value:!0});const Zi=d,Qi=Hi;class Xi extends Zi.Base{constructor(e,t,n){super(e),zi.set(this,void 0),this.id=n,Ji(this,zi,t,"f")}async setContext(e){this.wire.sendAction("interop-session-context-group-set-context").catch((e=>{}));return(await Yi(this,zi,"f")).dispatch(`sessionContextGroup:setContext-${this.id}`,{sessionContextGroupId:this.id,context:e})}async getCurrentContext(e){this.wire.sendAction("interop-session-context-group-get-context").catch((e=>{}));return(await Yi(this,zi,"f")).dispatch(`sessionContextGroup:getContext-${this.id}`,{sessionContextGroupId:this.id,type:e})}async addContextHandler(e,t){if(this.wire.sendAction("interop-session-context-group-add-handler").catch((e=>{})),"function"!=typeof e)throw new Error("Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");const n=await Yi(this,zi,"f");let i;return i=t?`sessionContextHandler:invoke-${this.id}-${t}-${(0,Qi.generateId)()}`:`sessionContextHandler:invoke-${this.id}`,n.register(i,(0,Qi.wrapContextHandler)(e,i)),await n.dispatch(`sessionContextGroup:handlerAdded-${this.id}`,{handlerId:i,contextType:t}),{unsubscribe:await this.createUnsubscribeCb(i)}}async createUnsubscribeCb(e){const t=await Yi(this,zi,"f");return async()=>{t.remove(e),await t.dispatch(`sessionContextGroup:handlerRemoved-${this.id}`,{handlerId:e})}}getUserInstance(){return{id:this.id,setContext:(0,Qi.wrapInTryCatch)(this.setContext.bind(this),"Failed to set context: "),getCurrentContext:(0,Qi.wrapInTryCatch)(this.getCurrentContext.bind(this),"Failed to get context: "),addContextHandler:(0,Qi.wrapInTryCatch)(this.addContextHandler.bind(this),"Failed to add context handler: ")}}}qi.default=Xi,zi=new WeakMap;var er={},tr={},nr={},ir={},rr=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),or=s&&s.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),sr=s&&s.__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)&&rr(t,e,n);return or(t,e),t};Object.defineProperty(ir,"__esModule",{value:!0}),ir.PrivateChannelClient=void 0;const ar=sr(Hi);var cr,dr;function hr(){if(cr)return tr;cr=1;var e,t=s&&s.__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)},n=s&&s.__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},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(tr,"__esModule",{value:!0}),tr.FDC3ModuleBase=void 0;const o=nr,a=Hi,c=wr(),d=r(i);return tr.FDC3ModuleBase=class{get client(){return t(this,e,"f").call(this)}get fin(){return this.wire.getFin()}constructor(t,i){this.wire=i,e.set(this,void 0),n(this,e,t,"f")}async broadcast(e){return this.wire.sendAction("fdc3-broadcast").catch((e=>{})),this.client.setContext(e)}async _open(e,t){this.wire.sendAction("fdc3-open").catch((e=>{}));try{return await c.InteropClient.ferryFdc3Call(this.client,"fdc3Open",{app:e,context:t})}catch(e){const t=e.message===a.BROKER_ERRORS.fdc3Open?"ResolverUnavailable":e.message;throw new Error(t)}}async _getChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:"system",...(0,o.getUnsupportedChannelApis)()})))}async getOrCreateChannel(e){this.wire.sendAction("fdc3-get-or-create-channel").catch((e=>{}));const t=(await this._getChannels()).find((t=>t.id===e));if(t)return{...t,type:"system",...(0,o.getUnsupportedChannelApis)()};try{const t=await this.client.joinSessionContextGroup(e);return(0,o.buildAppChannelObject)(t)}catch(e){throw console.error(e.message),new Error(o.ChannelError.CreationFailed)}}async getSystemChannels(){return this.wire.sendAction("fdc3-get-system-channels").catch((e=>{})),this._getChannels()}async joinChannel(e){this.wire.sendAction("fdc3-join-channel").catch((e=>{}));try{return await this.client.joinContextGroup(e)}catch(e){if(e.message===a.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup?console.error("The Channel you have tried to join is an App Channel. Custom Channels can only be defined by the Interop Broker through code or manifest configuration. Please use getOrCreateChannel."):console.error(e.message),e.message.startsWith("Attempting to join a context group that does not exist"))throw new Error(o.ChannelError.NoChannelFound);throw new Error(o.ChannelError.AccessDenied)}}async getCurrentChannel(){this.wire.sendAction("fdc3-get-current-channel").catch((e=>{}));const e=await this.getCurrentContextGroupInfo();return e?this.buildChannelObject(e):null}async leaveCurrentChannel(){return this.wire.sendAction("fdc3-leave-current-channel").catch((e=>{})),this.client.removeFromContextGroup()}async getCurrentContextGroupInfo(){const e=await this.client.getContextGroups(),t=e.map((async e=>this.client.getAllClientsInContextGroup(e.id))),n=(await Promise.all(t)).findIndex((e=>e.some((e=>{const{uuid:t,name:n}=e;return this.wire.me.uuid===t&&this.wire.me.name===n}))));return e[n]}async buildChannelObject(e){return{...e,type:"system",addContextListener:(...[e,t])=>{let n,i;"function"==typeof e?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),n=e):(n=t,"string"==typeof e&&(i=e));const r=(async()=>{let e=!0;const t=await this.client.getCurrentContext(i);return this.client.addContextHandler(((i,r)=>{if(!e||(e=!1,!(0,d.default)(t,i)))return n(i,r)}),i)})();return{...r,unsubscribe:()=>r.then((e=>e.unsubscribe()))}},broadcast:this.broadcast.bind(this),getCurrentContext:async e=>{const t=await this.client.getCurrentContext(e);return void 0===t?null:t}}}},e=new WeakMap,tr}ir.PrivateChannelClient=class{constructor(e,t){this.id=t,this.client=e,this.listeners=new Map}async broadcast(e){return this.client.dispatch("broadcast",{context:e})}async getCurrentContext(e){return this.client.dispatch("getCurrentContext",{contextType:e})}async addContextListener(e,t){if("function"!=typeof t)throw new Error("Non-function argument passed to the second parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");let n;n=e?`contextHandler:invoke-${this.id}-${e}-${ar.generateId()}`:`contextHandler:invoke-${this.id}-${ar.generateId()}`,this.client.register(n,ar.wrapContextHandler(t,n));const i={unsubscribe:await this.createContextUnsubscribeCb(n)};return this.listeners.set(n,i),await this.client.dispatch("contextHandlerAdded",{handlerId:n,contextType:e}),i}createNonStandardUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch("nonStandardHandlerRemoved",{handlerId:e})}}createContextUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch("contextHandlerRemoved",{handlerId:e})}}onAddContextListener(e){const t=`onContextHandlerAdded:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch("onAddContextHandlerAdded",{handlerId:t}),n}onDisconnect(e){const t=`onDisconnect:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch("onDisconnectHandlerAdded",{handlerId:t}),n}onUnsubscribe(e){const t=`onUnsubscribe:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch("onUnsubscribeHandlerAdded",{handlerId:t}),n}async cleanUpAllSubs(){Array.from(this.listeners.keys()).forEach((e=>{this.client.remove(e),this.listeners.delete(e)}))}async disconnect(){try{await this.client.dispatch("clientDisconnecting"),await this.cleanUpAllSubs(),await this.client.disconnect()}catch(e){throw new Error(e.message)}}},function(e){var t=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.getIntentResolution=e.isChannel=e.isContext=e.connectPrivateChannel=e.buildAppChannelObject=e.buildPrivateChannelObject=e.ChannelError=e.ResultError=e.UnsupportedChannelApiError=e.getUnsupportedChannelApis=void 0;const n=Hi,r=ir,o=t(i);e.getUnsupportedChannelApis=e=>({addContextListener:()=>{throw new a("Channel.addContextListener",e)},broadcast:()=>{throw new a("Channel.broadcast",e)},getCurrentContext:()=>{throw new a("Channel.getCurrentContext",e)}});class a extends Error{constructor(e,t="System"){super(e),this.message=`Calling ${e} on an instance of a ${t} Channel returned by fdc3.get${t}Channels is not supported. If you would like to use a ${t} Channel, please use fdc3.joinChannel, fdc3.addContextListener, and fdc3.broadcast instead.`}}var c,d;e.UnsupportedChannelApiError=a,function(e){e.NoResultReturned="NoResultReturned",e.IntentHandlerRejected="IntentHandlerRejected"}(c=e.ResultError||(e.ResultError={})),(d=e.ChannelError||(e.ChannelError={})).NoChannelFound="NoChannelFound",d.AccessDenied="AccessDenied",d.CreationFailed="CreationFailed";e.buildPrivateChannelObject=e=>{let t=!1;const n=()=>{if(t)throw new Error("Private Channel Client has been disconnected from the Private Channel")};return{id:e.id,type:"private",broadcast:async t=>(n(),e.broadcast(t)),getCurrentContext:async t=>(n(),e.getCurrentContext(t)),addContextListener:async(t,i)=>{n();let r=i,o=t;"function"==typeof t&&(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),r=t,o=null);return e.addContextListener(o,r)},onAddContextListener:t=>(n(),e.onAddContextListener(t)),disconnect:async()=>(n(),t=!0,e.disconnect()),onDisconnect:t=>(n(),e.onDisconnect(t)),onUnsubscribe:t=>(n(),e.onUnsubscribe(t))}};e.buildAppChannelObject=e=>({id:e.id,type:"app",broadcast:e.setContext,getCurrentContext:async t=>{const n=await e.getCurrentContext(t);return void 0===n?null:n},addContextListener:(t,n)=>{let i,r;"function"==typeof t?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),i=t):(i=n,"string"==typeof t&&(r=t));const s=(async()=>{let t=!0;const n=await e.getCurrentContext(r);return e.addContextHandler(((e,r)=>{if(!t||(t=!1,!(0,o.default)(n,e)))return i(e,r)}),r)})();return{...s,unsubscribe:()=>s.then((e=>e.unsubscribe()))}}});e.connectPrivateChannel=async t=>{try{const n=await fin.InterApplicationBus.Channel.connect(t),i=new r.PrivateChannelClient(n,t);return(0,e.buildPrivateChannelObject)(i)}catch(e){throw new Error(`Private Channel with id: ${t} doesn't exist`)}};e.isContext=e=>{if(e&&"object"==typeof e&&"type"in e){const{type:t}=e;return"string"==typeof t}return!1};e.isChannel=e=>{if(e&&"object"==typeof e&&"type"in e&&"id"in e){const{type:t,id:n}=e;return"string"==typeof t&&"string"==typeof n&&("app"===t||"private"===t)}return!1};e.getIntentResolution=async(t,i,r,o)=>{const s=(0,n.generateId)(),a=new Promise(((e,t)=>{fin.InterApplicationBus.subscribe({uuid:"*"},s,(t=>{e(t)})).catch((()=>t(new Error("getResult is not supported in this environment"))))})),d=r?{target:r,intentResolutionResultId:s}:{intentResolutionResultId:s},h=o?{name:o,context:i,metadata:d}:{...i,metadata:d},l=async()=>{let n=await a;if(!n||"object"!=typeof n)throw new Error(c.NoResultReturned);const{error:i}=n;if(i)throw new Error(c.IntentHandlerRejected);if((0,e.isChannel)(n)){const{id:i,type:r}=n;switch(r){case"private":n=await(0,e.connectPrivateChannel)(i);break;case"app":{const r=await t.joinSessionContextGroup(i);n=(0,e.buildAppChannelObject)(r);break}}}else if(!(0,e.isContext)(n))throw new Error(c.NoResultReturned);return n},u=o?await t.fireIntent(h):await t.fireIntentForContext(h);return"object"!=typeof u?{source:{appId:"",instanceId:""},intent:"",version:"2.0",getResult:l}:{...u,getResult:l}}}(nr);var lr,ur,pr={};function wr(){if(ur)return Ki;ur=1;var e,t,n=s&&s.__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},i=s&&s.__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)},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ki,"__esModule",{value:!0}),Ki.InteropClient=void 0;const o=d,a=r(qi),c=function(){if(dr)return er;dr=1,Object.defineProperty(er,"__esModule",{value:!0}),er.Fdc3Module=void 0;const e=Hi,t=hr();class n extends t.FDC3ModuleBase{async open(e,t){await super._open(e,t)}addContextListener(e,t){let n;return this.wire.sendAction("fdc3-add-context-listener").catch((e=>{})),"function"==typeof e?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),n=this.client.addContextHandler(e)):n=this.client.addContextHandler(t,null===e?void 0:e),{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}addIntentListener(e,t){this.wire.sendAction("fdc3-add-intent-listener").catch((e=>{}));const n=this.client.registerIntentHandler((e=>{const{context:n,metadata:i}=e,{metadata:r}=n,o=i?.intentResolutionResultId||r?.intentResolutionResultId;o&&this.fin.InterApplicationBus.publish(o,null).catch((()=>null)),t(e.context)}),e,{fdc3Version:"1.2"});return{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}async raiseIntent(t,n,i){this.wire.sendAction("fdc3-raise-intent").catch((e=>{}));const r=i?{name:t,context:n,metadata:{target:i}}:{name:t,context:n};try{return await this.client.fireIntent(r)}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntent?"ResolverUnavailable":t.message;throw new Error(n)}}async findIntent(t,n){this.wire.sendAction("fdc3-find-intent").catch((e=>{}));try{return await this.client.getInfoForIntent({name:t,context:n})}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntent?"ResolverUnavailable":t.message;throw new Error(n)}}async findIntentsByContext(t){this.wire.sendAction("fdc3-find-intents-by-context").catch((e=>{}));try{return await this.client.getInfoForIntentsByContext(t)}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntentsByContext?"ResolverUnavailable":t.message;throw new Error(n)}}async raiseIntentForContext(t,n){this.wire.sendAction("fdc3-raise-intent-for-context").catch((e=>{}));try{return await this.client.fireIntentForContext({...t,metadata:{target:n}})}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntentForContext?"ResolverUnavailable":t.message;throw new Error(n)}}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}getInfo(){return this.wire.sendAction("fdc3-get-info").catch((e=>{})),{providerVersion:this.wire.environment.getAdapterVersionSync(),provider:`openfin-${this.wire.me.uuid}`,fdc3Version:"1.2"}}}return er.Fdc3Module=n,er}(),h=function(){if(lr)return pr;lr=1,Object.defineProperty(pr,"__esModule",{value:!0}),pr.Fdc3Module2=void 0;const e=hr(),t=Hi,n=wr(),i=nr,r=ir;class o extends e.FDC3ModuleBase{async open(e,t){return"string"==typeof e&&console.warn("Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string })."),super._open(e,t)}async findInstances(e){this.wire.sendAction("fdc3-find-instances").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,"fdc3FindInstances",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3FindInstances?"ResolverUnavailable":e.message;throw new Error(n)}}async getAppMetadata(e){this.wire.sendAction("fdc3-get-app-metadata").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,"fdc3GetAppMetadata",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3GetAppMetadata?"ResolverUnavailable":e.message;throw new Error(n)}}async addContextListener(e,t){this.wire.sendAction("fdc3-add-context-listener").catch((e=>{}));const n=e=>t=>{const{contextMetadata:n,...i}=t,r=n?[{...i},n]:[t,null];e(...r)};let i=t,r=n(i);return"function"==typeof e?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),i=e,r=n(i),this.client.addContextHandler(r)):this.client.addContextHandler(r,null===e?void 0:e)}async findIntent(e,n,i){this.wire.sendAction("fdc3-find-intent").catch((e=>{}));try{return await this.client.getInfoForIntent({name:e,context:n,metadata:{resultType:i}})}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntent?"ResolverUnavailable":e.message;throw new Error(n)}}async findIntentsByContext(e,i){this.wire.sendAction("fdc3-find-intents-by-context").catch((e=>{}));const r=i?{context:e,metadata:{resultType:i}}:e;try{return await n.InteropClient.ferryFdc3Call(this.client,"fdc3v2FindIntentsByContext",r)}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntentsByContext?"ResolverUnavailable":e.message;throw new Error(n)}}async raiseIntent(e,n,r){this.wire.sendAction("fdc3-raise-intent").catch((e=>{}));try{return"string"==typeof r&&console.warn("Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string })."),(0,i.getIntentResolution)(this.client,n,r,e)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?"ResolverUnavailable":e.message;throw new Error(n)}}async raiseIntentForContext(e,n){this.wire.sendAction("fdc3-raise-intent-for-context").catch((e=>{}));try{return"string"==typeof n&&console.warn("Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string })."),(0,i.getIntentResolution)(this.client,e,n)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?"ResolverUnavailable":e.message;throw new Error(n)}}async addIntentListener(e,t){if(this.wire.sendAction("fdc3-add-intent-listener").catch((e=>{})),"string"!=typeof e)throw new Error("First argument must be an Intent name");return this.client.registerIntentHandler((async e=>{let n,i;const{context:r,metadata:o}=e,{contextMetadata:s,metadata:a,...c}=r,d=o?.intentResolutionResultId||a?.intentResolutionResultId;try{const e=a?{metadata:a,...c}:{...c};n=await t(e,s),i=n}catch(e){n=e,i={error:!0}}if(d&&this.fin.InterApplicationBus.publish(d,i).catch((()=>null)),n instanceof Error)throw new Error(n.message);return n}),e,{fdc3Version:"2.0"})}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}async createPrivateChannel(){const e=(0,t.generateId)();await n.InteropClient.ferryFdc3Call(this.client,"createPrivateChannelProvider",{channelId:e});const o=await this.fin.InterApplicationBus.Channel.connect(e),s=new r.PrivateChannelClient(o,e);return(0,i.buildPrivateChannelObject)(s)}async getUserChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:"user",...(0,i.getUnsupportedChannelApis)("User")})))}async getSystemChannels(){return console.warn("This API has been deprecated. Please use fdc3.getUserChannels instead."),super.getSystemChannels()}async joinUserChannel(e){return super.joinChannel(e)}async joinChannel(e){return console.warn("This API has been deprecated. Please use fdc3.joinUserChannel instead."),super.joinChannel(e)}async getCurrentChannel(){const e=await super.getCurrentChannel();return e?{...e,type:"user",broadcast:this.broadcast.bind(this)}:null}async getInfo(){return n.InteropClient.ferryFdc3Call(this.client,"fdc3v2GetInfo",{fdc3Version:"2.0"})}}return pr.Fdc3Module2=o,pr}(),l=Hi;let u=class extends o.Base{constructor(i,r){super(i),e.set(this,void 0),t.set(this,void 0),n(this,t,new Map,"f"),n(this,e,r,"f")}async setContext(t){this.wire.sendAction("interop-client-set-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("setContext",{context:t})}async addContextHandler(t,n){if(this.wire.sendAction("interop-client-add-context-handler").catch((e=>{})),"function"!=typeof t)throw new Error("Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");const r=await i(this,e,"f");let o;o=n?`invokeContextHandler-${n}-${(0,l.generateId)()}`:"invokeContextHandler";const s=(0,l.wrapContextHandler)(t,o);return r.register(o,s),await r.dispatch("contextHandlerRegistered",{handlerId:o,contextType:n}),{unsubscribe:async()=>{r.remove(o),await r.dispatch("removeContextHandler",{handlerId:o})}}}async getContextGroups(){this.wire.sendAction("interop-client-get-context-groups").catch((e=>{}));return(await i(this,e,"f")).dispatch("getContextGroups")}async joinContextGroup(t,n){this.wire.sendAction("interop-client-join-context-group").catch((e=>{}));const r=await i(this,e,"f");if(!t)throw new Error("No contextGroupId specified for joinContextGroup.");return r.dispatch("joinContextGroup",{contextGroupId:t,target:n})}async removeFromContextGroup(t){this.wire.sendAction("interop-client-remove-from-context-group").catch((e=>{}));return(await i(this,e,"f")).dispatch("removeFromContextGroup",{target:t})}async getAllClientsInContextGroup(t){this.wire.sendAction("interop-client-get-all-clients-in-context-group").catch((e=>{}));const n=await i(this,e,"f");if(!t)throw new Error("No contextGroupId specified for getAllClientsInContextGroup.");return n.dispatch("getAllClientsInContextGroup",{contextGroupId:t})}async getInfoForContextGroup(t){this.wire.sendAction("interop-client-get-info-for-context-group").catch((e=>{}));const n=await i(this,e,"f");if(!t)throw new Error("No contextGroupId specified for getInfoForContextGroup.");return n.dispatch("getInfoForContextGroup",{contextGroupId:t})}async fireIntent(t){this.wire.sendAction("interop-client-fire-intent").catch((e=>{}));return(await i(this,e,"f")).dispatch("fireIntent",t)}async registerIntentHandler(t,n,r){this.wire.sendAction("interop-client-register-intent-handler").catch((e=>{}));const o=await i(this,e,"f"),s=`intent-handler-${n}`,a=(0,l.wrapIntentHandler)(t,s);try{await o.register(s,a),await o.dispatch("intentHandlerRegistered",{handlerId:s,...r})}catch(e){throw new Error("Unable to register intent handler")}return{unsubscribe:async()=>{o.remove(s)}}}async getCurrentContext(t){this.wire.sendAction("interop-client-get-current-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("getCurrentContext",{contextType:t})}async getInfoForIntent(t){this.wire.sendAction("interop-client-get-info-for-intent").catch((e=>{}));return(await i(this,e,"f")).dispatch("getInfoForIntent",t)}async getInfoForIntentsByContext(t){this.wire.sendAction("interop-client-get-info-for-intents-by-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("getInfoForIntentsByContext",t)}async fireIntentForContext(t){this.wire.sendAction("interop-client-fire-intent-for-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("fireIntentForContext",t)}async joinSessionContextGroup(n){try{const r=i(this,t,"f").get(n);if(r)return r.getUserInstance();const o=await i(this,e,"f"),{hasConflict:s}=await o.dispatch("sessionContextGroup:createIfNeeded",{sessionContextGroupId:n});s&&console.warn(`A (non-session) context group with the name "${n}" already exists. If you are trying to join a Context Group, call joinContextGroup instead.`);const c=new a.default(this.wire,i(this,e,"f"),n);return i(this,t,"f").set(n,c),c.getUserInstance()}catch(e){throw console.error(`Error thrown trying to create Session Context Group with id "${n}": ${e}`),e}}async onDisconnection(t){this.wire.sendAction("interop-client-add-ondisconnection-listener").catch((e=>{}));return(await i(this,e,"f")).onDisconnection((e=>{const{uuid:n}=e;t({type:"interop-broker",topic:"disconnected",brokerName:n})}))}getFDC3Sync(e){switch(e){case"1.2":return new c.Fdc3Module((()=>this),this.wire);case"2.0":return new h.Fdc3Module2((()=>this),this.wire);default:throw new Error(`Invalid FDC3 version provided: ${e}. Must be '1.2' or '2.0'`)}}async getFDC3(e){return this.getFDC3Sync(e)}static async ferryFdc3Call(t,n,r){return(await i(t,e,"f")).dispatch(n,r||null)}};return Ki.InteropClient=u,e=new WeakMap,t=new WeakMap,Ki}var yr,fr,gr,mr={};function vr(){if(yr)return mr;yr=1,Object.defineProperty(mr,"__esModule",{value:!0}),mr.overrideCheck=mr.checkFDC32Overrides=mr.getDefaultViewFdc3VersionFromAppInfo=void 0;const e=Vi();function t(t){return["fdc3HandleFindInstances","handleInfoForIntent","handleInfoForIntentsByContext","fdc3HandleGetAppMetadata","fdc3HandleGetInfo","fdc3HandleOpen","handleFiredIntent","handleFiredIntentForContext"].filter((n=>t[n]===e.InteropBroker.prototype[n]))}return mr.getDefaultViewFdc3VersionFromAppInfo=function({manifest:e,initialOptions:t}){const n=e?.platform?.defaultViewOptions?.fdc3InteropApi??t.defaultViewOptions?.fdc3InteropApi;return["1.2","2.0"].includes(n??"")?n:void 0},mr.checkFDC32Overrides=t,mr.overrideCheck=function(e,n){if(n&&"2.0"===n){const n=t(e);n.length>0&&console.warn(`WARNING: FDC3 2.0 has been set as a default option for Views in this Platform, but the required InteropBroker APIs for FDC3 2.0 compliance have not all been overridden.\nThe following APIs need to be overridden:\n${n.join("\n")}`)}},mr}function Cr(){return gr||(gr=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),i=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),i(function(){if(fr)return Ti;fr=1;var e=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ti,"__esModule",{value:!0}),Ti.InteropModule=void 0;const t=e(n),i=$i,r=d,o=Vi(),a=wr(),c=vr(),h=Tn,l=e=>new e,u="You have attempted to use or modify InteropBroker parameters, which is not allowed. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.";class p extends r.Base{async init(e,n=l){this.wire.sendAction("interop-init").catch((()=>{}));const r=await this.wire.environment.getInteropInfo(this.wire.getFin()),s=(0,i.createUnusableObject)(u),a=(0,i.createWarningObject)(u,(0,t.default)(r)),d=async()=>{throw new Error(u)},p=o.InteropBroker.createClosedConstructor(this.wire,(()=>this.fin.InterApplicationBus.Channel.create(`interop-broker-${e}`)),r);let w;return w=Array.isArray(n)?new((0,h.overrideFromComposables)(...n)(p))(s,d,a):await n(p,s,d,a),(0,c.overrideCheck)(w,r.fdc3Version),w}connectSync(e,t){return this.wire.sendAction("interop-connect-sync").catch((()=>{})),new a.InteropClient(this.wire,this.wire.environment.whenReady().then((()=>this.fin.InterApplicationBus.Channel.connect(`interop-broker-${e}`,{payload:t}))))}}return Ti.InteropModule=p,Ti}(),e),i(wr(),e),i(Vi(),e)}(Li)),Li}var br={},Ir={},Er={},xr={};Object.defineProperty(xr,"__esModule",{value:!0}),xr.getSnapshotSourceChannelName=void 0;xr.getSnapshotSourceChannelName=e=>`snapshot-source-provider-${e.uuid}`;var Ar,Pr,Mr,_r,Or,Sr=s&&s.__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},Rr=s&&s.__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)};Object.defineProperty(Er,"__esModule",{value:!0}),Er.SnapshotSource=void 0;const Fr=d,jr=xr,kr=new Map;class Lr extends Fr.Base{constructor(e,t){super(e),Ar.set(this,void 0),Pr.set(this,(()=>(kr.has(this.identity.uuid)||kr.set(this.identity.uuid,{eventFired:null,clientPromise:null}),kr.get(this.identity.uuid)))),Mr.set(this,(()=>(Rr(this,Pr,"f").call(this).clientPromise||(Rr(this,Pr,"f").call(this).clientPromise=Rr(this,_r,"f").call(this)),Rr(this,Pr,"f").call(this).clientPromise))),_r.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);try{Rr(this,Pr,"f").call(this).eventFired||await Rr(this,Or,"f").call(this);const t=await this.fin.InterApplicationBus.Channel.connect(e,{wait:!1});return t.onDisconnection((()=>{Rr(this,Pr,"f").call(this).clientPromise=null,Rr(this,Pr,"f").call(this).eventFired=null})),t}catch(e){throw Rr(this,Pr,"f").call(this).clientPromise=null,new Error("The targeted SnapshotSource is not currently initialized. Await this object's ready() method.")}})),Or.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);let t,n;const i=new Promise(((e,i)=>{t=e,n=i}));Rr(this,Pr,"f").call(this).eventFired=i;const r=async i=>{try{i.channelName===e&&(t(),await this.fin.InterApplicationBus.Channel.removeListener("connected",r))}catch(e){n(e)}};await this.fin.InterApplicationBus.Channel.on("connected",r)})),Sr(this,Ar,t,"f")}get identity(){return Rr(this,Ar,"f")}async ready(){this.wire.sendAction("snapshot-source-ready").catch((e=>{}));try{await Rr(this,Mr,"f").call(this)}catch(e){await Rr(this,Pr,"f").call(this).eventFired}}async getSnapshot(){this.wire.sendAction("snapshot-source-get-snapshot").catch((e=>{}));const e=await Rr(this,Mr,"f").call(this),t=await e.dispatch("get-snapshot");return(await t).snapshot}async applySnapshot(e){this.wire.sendAction("snapshot-source-apply-snapshot").catch((e=>{}));return(await Rr(this,Mr,"f").call(this)).dispatch("apply-snapshot",{snapshot:e})}}Er.SnapshotSource=Lr,Ar=new WeakMap,Pr=new WeakMap,Mr=new WeakMap,_r=new WeakMap,Or=new WeakMap,Object.defineProperty(Ir,"__esModule",{value:!0}),Ir.SnapshotSourceModule=void 0;const Tr=d,$r=Er,Br=xr;class Gr extends Tr.Base{async init(e){if(this.wire.sendAction("snapshot-source-init").catch((e=>{})),"object"!=typeof e||"function"!=typeof e.getSnapshot||"function"!=typeof e.applySnapshot)throw new Error("you must pass in a valid SnapshotProvider");const t=await this.fin.InterApplicationBus.Channel.create((0,Br.getSnapshotSourceChannelName)(this.fin.me));t.register("get-snapshot",(async()=>({snapshot:await e.getSnapshot()}))),t.register("apply-snapshot",(({snapshot:t})=>e.applySnapshot(t)))}wrapSync(e){return this.wire.sendAction("snapshot-source-wrap-sync").catch((e=>{})),new $r.SnapshotSource(this.wire,e)}async wrap(e){return this.wire.sendAction("snapshot-source-wrap").catch((e=>{})),this.wrapSync(e)}}Ir.SnapshotSourceModule=Gr,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Ir,e),n(Er,e)}(br),Object.defineProperty(a,"__esModule",{value:!0});var Wr=a.Fin=void 0;const Hr=t,Nr=c,Dr=ie(),Ur=Z(),Vr=de,zr=en,Kr=rn,qr=un,Jr=bn,Yr=J(),Zr=An,Qr=ki,Xr=Cr(),eo=br;class to extends Hr.EventEmitter{constructor(e){super(),this.wire=e,this.System=new Nr.System(e),this.Window=new Dr._WindowModule(e),this.Application=new Ur.ApplicationModule(e),this.InterApplicationBus=new Vr.InterApplicationBus(e),this.Clipboard=new zr.Clipboard(e),this.ExternalApplication=new Kr.ExternalApplicationModule(e),this.Frame=new qr._FrameModule(e),this.GlobalHotkey=new Jr.GlobalHotkey(e),this.Platform=new Zr.PlatformModule(e,this.InterApplicationBus.Channel),this.View=new Yr.ViewModule(e),this.Interop=new Xr.InteropModule(e),this.SnapshotSource=new eo.SnapshotSourceModule(e),e.registerFin(this),this.me=(0,Qr.getMe)(e),e.on("disconnected",(()=>{this.emit("disconnected")}))}}Wr=a.Fin=to;var no={},io={};function ro(e){return"string"==typeof e.manifestUrl}function oo(e){return ao(e)&&"string"==typeof e.address}function so(e){return oo(e)&&"string"==typeof e.token}function ao(e){return"string"==typeof e.uuid}function co(e){return e.runtime&&"string"==typeof e.runtime.version}function ho(e){return ao(e)&&co(e)}Object.defineProperty(io,"__esModule",{value:!0}),io.isInternalConnectConfig=io.isPortDiscoveryConfig=io.isNewConnectConfig=io.isConfigWithReceiver=io.isRemoteConfig=io.isExistingConnectConfig=io.isExternalConfig=void 0,io.isExternalConfig=ro,io.isExistingConnectConfig=oo,io.isRemoteConfig=so,io.isConfigWithReceiver=function(e){return"object"==typeof e.receiver&&so({...e,address:""})},io.isNewConnectConfig=ho,io.isPortDiscoveryConfig=function(e){return ro(e)&&co(e)||ho(e)},io.isInternalConnectConfig=function(e){return oo(e)||ho(e)};var lo={},uo={};Object.defineProperty(uo,"__esModule",{value:!0}),uo.EmitterMap=void 0;const po=t;function wo(e){return Buffer.from(e).toString("base64")}uo.EmitterMap=class{constructor(){this.storage=new Map}hashKeys(e){return e.map(wo).join("/")}getOrCreate(e){const t=this.hashKeys(e);return this.storage.has(t)||this.storage.set(t,new po.EventEmitter),this.storage.get(t)}has(e){return this.storage.has(this.hashKeys(e))}delete(e){const t=this.hashKeys(e);return this.storage.delete(t)}},Object.defineProperty(lo,"__esModule",{value:!0});const yo=uo;class fo extends yo.EmitterMap{constructor(){super(...arguments),this.dispatchEvent=e=>{if(function(e){return"process-desktop-event"===e.action}(e)){const{payload:t}=e,n=function(e){const{topic:t}=e;if("frame"===t||"window"===t||"view"===t){const{uuid:n,name:i}=e;return[t,n,i]}if("application"===t){const{uuid:n}=e;return[t,n]}return[t]}(t);if(this.has(n))return this.getOrCreate(n).emit(t.type,t),!0}return!1}}}lo.default=fo;var go,mo,vo=s&&s.__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},Co=s&&s.__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)},bo=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(no,"__esModule",{value:!0});var Io=no.Transport=void 0;const Eo=t,xo=io,Ao=g,Po=bo(lo),Mo=ki,_o=ke;class Oo extends Eo.EventEmitter{constructor(e,t,n){super(),this.wireListeners=new Map,this.topicRefMap=new Map,this.eventAggregator=new Po.default,this.messageHandlers=[this.eventAggregator.dispatchEvent],go.set(this,void 0),mo.set(this,void 0),this.connectSync=()=>{Co(this,go,"f").connectSync()},this.getPort=()=>Co(this,go,"f").getPort(),vo(this,go,new e(this.onmessage.bind(this)),"f"),this.environment=t,this.sendRaw=Co(this,go,"f").send.bind(Co(this,go,"f")),this.registerMessageHandler(this.handleMessage.bind(this)),Co(this,go,"f").on("disconnected",(()=>{for(const[,{handleNack:e}]of this.wireListeners)e({reason:"Remote connection has closed"});this.wireListeners.clear(),this.emit("disconnected")}));const{uuid:i,name:r}=n,o=this.environment.getCurrentEntityType();this.me=(0,Mo.getBaseMe)(o,i,r)}getFin(){if(!Co(this,mo,"f"))throw new Error("No Fin object registered for this transport");return Co(this,mo,"f")}registerFin(e){if(Co(this,mo,"f"))throw new Error("Fin object has already been registered for this transport");vo(this,mo,e,"f")}shutdown(){return Co(this,go,"f").shutdown()}async connect(e){if((0,xo.isConfigWithReceiver)(e))return await Co(this,go,"f").connect(e.receiver),this.authorize(e);if((0,xo.isRemoteConfig)(e))return this.connectRemote(e);if((0,xo.isExistingConnectConfig)(e))return this.connectByPort(e);if((0,xo.isNewConnectConfig)(e)){const t=await this.environment.retrievePort(e);return this.connectByPort({...e,address:`ws://localhost:${t}`})}}async connectRemote(e){return await Co(this,go,"f").connect(new(this.environment.getWsConstructor())(e.address)),this.authorize(e)}async connectByPort(e){const{address:t,uuid:n}=e,i={...e,type:"file-token"},r=Co(this,go,"f");await r.connect(new(this.environment.getWsConstructor())(e.address));const o=await this.sendAction("request-external-authorization",{uuid:n,type:"file-token"},!0);if("external-authorization-response"!==o.action)throw new Ao.UnexpectedActionError(o.action);return await this.environment.writeToken(o.payload.file,o.payload.token),this.authorize(i)}async authorize(e){const t=await this.sendAction("request-authorization",e,!0);if("authorization-response"!==t.action)throw new Ao.UnexpectedActionError(t.action);if(!0!==t.payload.success)throw new Ao.RuntimeError(t.payload)}sendAction(e,t={},n=!1){let i=()=>{};const r=Ao.RuntimeError.getCallSite(1),o=this.environment.getNextMessageId(),s=new Promise(((s,a)=>{i=a;const c={action:e,payload:t,messageId:o},d=Co(this,go,"f");return this.addWireListener(o,s,(e=>this.nackHandler(e,a,r)),n),d.send(c).catch(a)}));return Object.assign(s,{cancel:i,messageId:o})}nackHandler(e,t,n){t("string"==typeof e?e:new Ao.RuntimeError(e,n))}ferryAction(e){return new Promise(((t,n)=>{const i=this.environment.getNextMessageId();e.messageId=i;const r=e=>{t(e.payload)};return Co(this,go,"f").send(e).then((()=>this.addWireListener(i,r,(e=>this.nackHandler(e,n)),!1))).catch(n)}))}registerMessageHandler(e){this.messageHandlers.push(e)}addWireListener(e,t,n,i){i?this.uncorrelatedListener=t:this.wireListeners.has(e)?n({reason:"Duplicate handler id",error:(0,_o.errorToPOJO)(new Ao.DuplicateCorrelationError(String(e)))}):this.wireListeners.set(e,{resolve:t,handleNack:n})}onmessage(e){for(const t of this.messageHandlers)t.call(null,e)}handleMessage(e){const t=e.correlationId||NaN;if("correlationId"in e){if(!this.wireListeners.has(t))return!1;{const{resolve:n,handleNack:i}=this.wireListeners.get(t);"ack"!==e.action?i({reason:"Did not receive ack action",error:(0,_o.errorToPOJO)(new Ao.NoAckError(e.action))}):"payload"in e?e.payload.success?n.call(null,e):i(e.payload):"string"==typeof e.reason?i(e):(console.warn("Received invalid response from core",e),i({reason:"invalid response shape"})),this.wireListeners.delete(t)}}else this.uncorrelatedListener&&this.uncorrelatedListener.call(null,e),this.uncorrelatedListener=()=>{};return!0}}Io=no.Transport=Oo,go=new WeakMap,mo=new WeakMap;const So=(...e)=>({log:(...t)=>console.debug(`[${(new Date).toISOString()}]`,...(e=>e.map((e=>`[${e}]`)))(e),...t),getLogger:(...t)=>So(...e,...t)}),Ro=So("@openfin/core-web/client");function Fo(e,t){if(!function(e){return"string"==typeof e}(e))throw new Error(`Property ${t} has invalid type. Expected string, got ${typeof e}.`)}const jo="web-broker-ports-ready",ko=Ro.getLogger("get-web-interop-ports");function Lo(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)}function To(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}"function"==typeof SuppressedError&&SuppressedError;const $o=e=>{var n,i,r;return r=class extends t.EventEmitter{constructor(t){super(),n.set(this,void 0),i.set(this,!1),this.connectSync=()=>{Lo(this,i,"f")||(e.addEventListener("message",(e=>{e.data?.topic?.startsWith("wire-message")&&e.data.message&&Lo(this,n,"f").call(this,{...JSON.parse(e.data.message),ports:e.ports})})),e.start())},this.connect=async()=>{this.connectSync()},this.send=t=>(e.postMessage({topic:"wire-message",message:JSON.stringify(t)}),Promise.resolve()),this.shutdown=async()=>{e.close()},To(this,n,t,"f")}getPort(){return e}},n=new WeakMap,i=new WeakMap,r};var Bo={},Go={};Object.defineProperty(Go,"__esModule",{value:!0}),Go.BaseEnvironment=void 0;const Wo=vr();Go.BaseEnvironment=class{async getViewWindowIdentity(e,t){const{identity:n}=await e.View.wrapSync(t).getCurrentWindow();return n}async getInteropInfo(e){const t=await e.Application.getCurrentSync().getInfo().catch((()=>null)),n=t?.initialOptions?.interopBrokerConfiguration??{};return{fdc3Version:t?(0,Wo.getDefaultViewFdc3VersionFromAppInfo)(t):void 0,...n,fdc3Info:{providerVersion:await e.System.getVersion(),provider:"OpenFin"}}}},Object.defineProperty(Bo,"__esModule",{value:!0});var Ho=Bo.BrowserEnvironment=void 0;const No=Go;class Do extends No.BaseEnvironment{constructor(){super(...arguments),this.type="other",this.getRandomId=()=>{const e=new Uint32Array(1);return window.crypto.getRandomValues(e)[0].toString(32)}}getAdapterVersionSync(){return""}observeBounds(e,t){throw new Error("Method not implemented.")}layoutAllowedInContext(e){return!1}initLayoutManager(e,t,n){throw new Error("Method not implemented.")}applyLayoutSnapshot(e,t,n){throw new Error("Method not implemented.")}createLayout(e,t){throw new Error("Method not implemented.")}destroyLayout(e,t){throw new Error("Method not implemented.")}resolveLayout(e,t){throw new Error("Method not implemented.")}initPlatform(...e){throw new Error("Method not implemented.")}writeToken(e,t){return Promise.resolve("")}retrievePort(e){throw new Error("Method not implemented.")}getNextMessageId(){return this.getRandomId()}createChildContent(e){throw new Error("Method not implemented.")}getWebWindow(e){throw new Error("Method not implemented.")}getCurrentEntityIdentity(){throw new Error("Method not implemented.")}getCurrentEntityType(){return"external connection"}raiseEvent(e,t){throw new Error("Method not implemented.")}getUrl(){return location.href}getDefaultChannelOptions(){return{create:{},connect:{}}}getRtcPeer(){return new RTCPeerConnection}getWsConstructor(){return WebSocket}whenReady(){return Promise.resolve()}}Ho=Bo.BrowserEnvironment=Do;const Uo=e=>"platform"in e&&void 0!==e.platform;var Vo,zo;class Ko extends Ho{constructor(e){super(),this.connectConfig=e,Vo.set(this,void 0),zo.set(this,new W((async()=>Promise.resolve().then((function(){return __webpack_require__(/*! ./main-b14f67c9.js */ "../../node_modules/@openfin/core-web/out/main-b14f67c9.js")}))))),Uo(e)&&this.validatePlatformOptions(e)}getAdapterVersionSync(){return"0.39.21"}validatePlatformOptions({platform:e}){if(!("layoutSnapshot"in e))throw new Error("Platform options are missing layoutSnapshot. Please provide a layoutSnapshot in the platform options.");if("windows"in e||"windows"in e.layoutSnapshot)throw new Error("It appears you tried to call connect() with a snapshot object from an OpenFin desktop environment. Note that connect() expects to be called with a platform property with this structure: { platform: { layoutSnapshot } }. To get a layoutSnapshot of the expected structure, use fin.Platform.Layout.getCurrentLayoutManagerSync().getLayoutSnapshot() in v34+ in your desktop environment.");const{layouts:t}=e.layoutSnapshot;Object.entries(t).map((([e,t])=>{if("object"!=typeof t||null===t)throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must be an object.`);if(!("content"in t))throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must contain a 'content' property.`)}))}async getInteropInfo(e){return{...{contextGroups:void 0,logging:{beforeAction:{enabled:!1},afterAction:{enabled:!1}}},fdc3Version:void 0,fdc3Info:{providerVersion:"0.39.21",provider:"OpenFin Web"}}}layoutAllowedInContext(e){return!0}async initLayoutManager(e,t,n){if(Lo(this,Vo,"f"))throw new Error("Layout already initialized.");if(!Uo(this.connectConfig))throw new Error("Platform options are missing from connection config.");const{WebLayoutEntryPoint:i}=await Lo(this,zo,"f").getValue();return To(this,Vo,new i(this.connectConfig),"f"),await Lo(this,Vo,"f").initLayoutManager(e,t,n)}async applyLayoutSnapshot(e,t,n){Lo(this,Vo,"f")?.applyLayoutSnapshot(e,t,n)}async createLayout(e,t){return Lo(this,Vo,"f")?.createLayout(e,t)}async destroyLayout(e,t){return Lo(this,Vo,"f")?.destroyLayout(e,t)}async getViewWindowIdentity(e,t){return Promise.resolve({uuid:t.uuid,name:t.uuid})}}Vo=new WeakMap,zo=new WeakMap;const qo=()=>{const e=((e,t)=>{const n=new RegExp(`^${t}<(?.*)>$`).exec(e)?.groups?.meta;if(n)try{return JSON.parse(atob(n))}catch(e){throw new Error(`Failed to decode JSON from ${n}.`)}})(window.name,"of-frame");if(e)try{const{name:t,uuid:n,brokerUrl:i,providerId:r,contextGroup:o}=e;return Fo(i,"brokerUrl"),Fo(n,"uuid"),Fo(t,"name"),{identity:{name:t,uuid:n},brokerUrl:i,interopConfig:{providerId:r,currentContextGroup:o}}}catch(e){throw new Error(`Unexpected error occurred when inferring platform information: ${e.stack}`)}},Jo=()=>{const e=r.v4();return{uuid:e,name:e}},Yo=async e=>{if("enabled"===e.connectionInheritance){const t=await(async e=>{const t=qo();if(t){const{validateOptions:n=(()=>!0)}=e,{identity:i,...r}=t;if(!await n(r))throw new Error("Parent options were rejected by validateOptions.");return t}})(e);if(t)return t}if(!e.options){const t="enabled"===e.connectionInheritance?"Broker URL was not specified nor provided by a platform container.":"Connection inheritance is disabled but no options were provided.";throw new Error(t)}return{...e.options,identity:Jo()}};exports.__classPrivateFieldGet=Lo,exports.__classPrivateFieldSet=To,exports.apiExposer=Gn,exports.commonjsGlobal=s,exports.connect=async t=>{try{Ro.log("Establishing connection",t);const{brokerUrl:n,identity:i,timeout:r,interopConfig:s}=await Yo(t),{workerPort:a,iframeBrokerPort:c}=await(async(e,t,n)=>{const{origin:i}=new URL(e),r=document.createElement("IFRAME");let s;r.style.display="none";try{return await new Promise(((a,c)=>{const d=e=>{if(e.source===r.contentWindow&&e.data?.topic===`ack-${jo}`){if(e.origin!==i)c(new Error(`Broker redirected to unexpected origin ${e.origin}, expected ${i}.`));else if(e.data.success){const[t,n]=e.ports;a({iframeBrokerPort:t,workerPort:n})}else c(new m(e.data));window.removeEventListener("message",d),clearTimeout(s)}};window.addEventListener("message",d),ko.log(`Connecting to broker ${e}`),r.setAttribute("src",e),r.setAttribute("name",o(t,"of-broker")),document.body.appendChild(r),ko.log("Iframe loaded, awaiting init message from iframe"),n&&(s=setTimeout((()=>{window.removeEventListener("message",d),document.body.removeChild(r),c(new Error("Worker did not initialize in time"))}),n))}))}catch(e){throw new Error(`Failed to initialise Fin Web Client. ${e.message}`,{cause:e})}})(n,i,r);Ro.log("Successfully established connection to shared worker");const d={entityType:"external connection",...i};a.start(),c.start();const h=((t,n,i)=>{const r=$o(n),o=new Ko(t),s=new Io(r,o,i);return s.connectSync(),window.Buffer=e.Buffer,new Wr(s)})(t,a,d);return s?.providerId&&(h.me.interop=h.Interop.connectSync(s.providerId),s?.currentContextGroup&&h.me.interop.joinContextGroup(s.currentContextGroup).catch((e=>{console.warn(`Error joining specified context group: ${s?.currentContextGroup}, continuing`,e)}))),{...h,me:{...h.me,identity:{uuid:h.me.uuid,name:h.me.name}}}}catch(e){throw new Error(`An error occured during web-interop connection: ${e.message}`)}},exports.decorators=Nn,exports.encodeOptions=o,exports.layout_constants=ai,exports.lazy=G; /***/ }), -/***/ "./node_modules/@openfin/core-web/out/main-b14f67c9.js": -/*!*************************************************************!*\ - !*** ./node_modules/@openfin/core-web/out/main-b14f67c9.js ***! - \*************************************************************/ +/***/ "../../node_modules/@openfin/core-web/out/main-b14f67c9.js": +/*!*****************************************************************!*\ + !*** ../../node_modules/@openfin/core-web/out/main-b14f67c9.js ***! + \*****************************************************************/ /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; -var t=__webpack_require__(/*! ./main-8cad4070.js */ "./node_modules/@openfin/core-web/out/main-8cad4070.js"),e=__webpack_require__(/*! uuid */ "../../node_modules/uuid/dist/esm-browser/index.js");__webpack_require__(/*! buffer/ */ "../../node_modules/buffer/index.js"),__webpack_require__(/*! events */ "../../node_modules/events/events.js"),__webpack_require__(/*! lodash/cloneDeep */ "../../node_modules/lodash/cloneDeep.js"),__webpack_require__(/*! lodash/isEqual */ "../../node_modules/lodash/isEqual.js");var i={},n={};Object.defineProperty(n,"__esModule",{value:!0}),n.mapValuesAsync=n.mapEntriesAsync=void 0;const o=(t,[e,i])=>({...t,[e]:i});async function s(t,e){return(await Promise.all(e.map((async([e,i])=>[e,await t(i,e)])))).reduce(o,{})}n.mapEntriesAsync=s,n.mapValuesAsync=async function(t,e){let i;return i=e instanceof Map?[...e.entries()]:Object.entries(e),s(t,i)};var r,a,l,h,d=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldSet||function(t,e,i,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(t,i):o?o.value=i:e.set(t,i),i},c=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldGet||function(t,e,i,n){if("a"===i&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?n:"a"===i?n.call(t):n?n.value:e.get(t)};Object.defineProperty(i,"__esModule",{value:!0});var m=i.DefaultLayoutManager=void 0;const u=n;class p{constructor(t){a.set(this,void 0),l.set(this,new Map),d(this,a,t,"f")}size(){return c(this,l,"f").size}async applyLayoutSnapshot({layouts:t}){if(Object.keys(t).length>1)throw new Error("[LayoutManager] Tried to call applyLayoutSnapshot with more than 1 layout. When implementing multiple layouts via overridden LayoutManager class, you must override and fully implement the applyLayoutSnapshot method without calling super.applyLayoutSnapshot().");const[[e,i]]=Object.entries(t);await p.createLayout(this,{layoutName:e,layout:i})}async showLayout({layoutName:t}){}async getLayoutSnapshot(){return{layouts:await(0,u.mapValuesAsync)((t=>t.getFrameSnapshot()),c(this,l,"f"))}}async removeLayout({layoutName:t}){}getLayoutIdentityForView(t){const e=[...c(this,l,"f").values()].find((e=>e.getCurrentViews().some((e=>e.name===t.name&&e.uuid===t.uuid))));return e?.identity??void 0}isLayoutVisible({layoutName:t}){return c(p,r,"m",h).call(p,this,t).isVisible()}resolveLayoutIdentity(t){if(t&&"layoutName"in t)return t;const e=[...c(this,l,"f").values()];if(1===e.length)return e[0].identity;const i=e.find((t=>t.isVisible()));return i?.identity??void 0}static async resolveLayout(t,e){const i=t.resolveLayoutIdentity(e);if(void 0===i||!("layoutName"in i))throw new Error("[layout-manager] resolveLayout: Could not resolve the layout identity. Make sure you include 'layoutName' in the identity object.");return c(p,r,"m",h).call(p,t,i.layoutName)}static async handleSharedView(t,e,i){await(0,u.mapValuesAsync)((async t=>{if(t.identity.layoutName!==e.layoutName){const e=t.getCurrentViews().find((t=>t.name===i.name));e&&await t.onViewDetached({viewIdentity:e,target:null}).catch(console.error)}}),c(t,l,"f"))}static async handleLastViewRemoved(t,e){await t.removeLayout(e),await c(t,a,"f").handleLastViewRemoved(t)}static async destroyLayout(t,{layoutName:e}){await c(p,r,"m",h).call(p,t,e).destroy(),c(t,l,"f").delete(e)}static async createLayout(t,e){const{layoutName:i}=e;if(c(t,l,"f").has(i))throw new Error(`Layout name ${i} already exists`);await c(t,a,"f").createLayout(e,t)}static registerLayout(t,e,i){c(t,l,"f").set(e,i)}static getAllLayouts(t){return[...c(t,l,"f").values()]}static setInitialSnapshot(t,e){c(t,a,"f").setInitialSnapshot(e)}static createClosedConstructor(...t){return class extends p{constructor(){super(...t)}}}}m=i.DefaultLayoutManager=p,r=p,a=new WeakMap,l=new WeakMap,h=function(t,e){const i=c(t,l,"f").get(e);if(!i)throw new Error(`[layout-manager] getLayoutByName: Could not locate layout with name '${e}'`);return i};var g={},f={},v={};Object.defineProperty(v,"__esModule",{value:!0}),v.ReversibleMap=void 0;v.ReversibleMap=class{constructor(){this.valueToKey=new Map,this.keyToValue=new Map,this.setUnique=(t,e)=>{if(this.hasKey(t)||this.hasValue(e))throw new Error("Key or value already in the map.");this.keyToValue.set(t,e),this.valueToKey.set(e,t)},this.getKey=t=>{const e=this.valueToKey.get(t);if(!e)throw new Error("Value not found in the map.");return e},this.deleteKey=t=>{const e=this.getValue(t);return this.keyToValue.delete(t),this.valueToKey.delete(e),e},this.deleteValue=t=>{const e=this.getKey(t);return this.keyToValue.delete(e),this.valueToKey.delete(t),e},this.hasKey=t=>this.keyToValue.has(t),this.hasValue=t=>this.valueToKey.has(t)}getValue(t){const e=this.keyToValue.get(t);if(!e)throw new Error("Key not found in the map.");return e}},Object.defineProperty(f,"__esModule",{value:!0});var _=f.LayoutContentCache=void 0;const y=t.lazy,C=v;class w{constructor(){this.contentItemCache=new C.ReversibleMap,this.contentItemCacheId=0,this.createCacheKey=()=>{const t=`entity-${this.contentItemCacheId.toString()}`;return this.contentItemCacheId+=1,t},this.hasKey=t=>this.contentItemCache.hasKey(t),this.getItemOrUndefined=t=>{try{return this.getContentItemOrThrow(t)}catch(t){return}},this.getContentItemOrThrow=(t,e)=>{if(!this.contentItemCache.hasKey(t))throw new Error("Layout component has been destroyed or detached from the current layout.");const i=this.contentItemCache.getValue(t);if(e&&!e.includes(i.type))throw new Error(`Layout item is not the expected type. Expected ${e.join(", ")}, got ${i.type}.`);return i},this.getOrCreateEntityId=t=>{if(this.contentItemCache.hasValue(t))return this.contentItemCache.getKey(t);t.onDestroyed((()=>{this.contentItemCache.deleteValue(t)}));const e=this.createCacheKey();return this.contentItemCache.setUnique(e,t),e}}static getSingleInstance(){return w.singleton.getValue()}}_=f.LayoutContentCache=w,w.singleton=new y.Lazy((()=>new w));var I={},b={};!function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.getAdjacentStacks=t.doShareEdge=t.getAdjacentItem=void 0;t.getAdjacentItem=(e,i)=>{const{parent:n}=e;if(e.isRoot()||!n)return;const o=["top","bottom"].includes(i)?"column":"row",s=["top","left"].includes(i)?-1:1;if(n.type===o){const t=n.contentItems.indexOf(e)+s;if(t>=0&&t{const n=t.getBounds(),o=e.getBounds();if(!n||!o)return!1;if(["top","bottom"].includes(i)){return!(n.righto.right)}return!(n.bottomo.bottom)};t.getAdjacentStacks=(e,i)=>{const n=["top","bottom"].includes(i)?"row":"column",o=s=>"stack"===s.type?(0,t.doShareEdge)(e,s,i)?[s]:[]:"root"===s.type||"ground"===s.type?[]:s.type===n?s.contentItems.map((t=>o(t))).flat():s.type!==n?["top","right"].includes(i)?o(s.contentItems[s.contentItems.length-1]):o(s.contentItems[0]):[],s=(0,t.getAdjacentItem)(e,i);return s?o(s):[]}}(b);var S=t.commonjsGlobal&&t.commonjsGlobal.__decorate||function(t,e,i,n){var o,s=arguments.length,r=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(s<3?o(r):s>3?o(e,i,r):o(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};Object.defineProperty(I,"__esModule",{value:!0}),I.LayoutEntitiesController=void 0;const E=t.decorators,x=b,L=i;class z{constructor(t,e,i){this.wire=t,this.layoutManager=e,this.layoutContentCache=i,this.analytics=t=>{this.wire.sendAction(`layout-controller-${t}`).catch((()=>{}))},this.getLayoutIdentityForViewOrThrow=async t=>{const e=this.layoutManager.getLayoutIdentityForView(t);if(!e)throw new Error(`View identity ${t.name} is not attached to any layouts.`);return e},this.getRoot=async t=>{this.analytics("get-root");const e=(await this.getLayout(t)).getRoot();return{type:e.type,entityId:this.layoutContentCache.getOrCreateEntityId(e)}},this.getStackByView=async t=>{this.analytics("get-stack-by-view");const e=await this.getLayoutIdentityForViewOrThrow(t),i=(await this.getLayout(e)).getStackByView(t);if("stack"===i?.type)return{entityId:this.layoutContentCache.getOrCreateEntityId(i),type:"stack"}},this.getStackViews=t=>{this.analytics("get-stack-views");return this.layoutContentCache.getContentItemOrThrow(t,["stack"]).contentItems.map((t=>({name:t.viewName,uuid:this.wire.me.uuid})))},this.isRoot=t=>{this.analytics("is-root");return this.layoutContentCache.getContentItemOrThrow(t).isRoot()},this.exists=t=>(this.analytics("exists"),this.layoutContentCache.hasKey(t)),this.addViewToStack=async(t,e,{index:i}={index:0})=>{this.analytics("add-view-to-stack");const n=this.layoutContentCache.getContentItemOrThrow(t);if(i&&i>n.contentItems.length+1)throw new Error(`Index '${i}' out of range, please exclude the index or specify a number between 0 and ${n.contentItems.length}`);const o={id:t,index:i},{identity:s}=await n.layout.platformCreateView(e,{location:o});return s},this.findViewInStack=(t,e)=>t.contentItems.find((t=>t.viewName===e.name)),this.removeViewFromStack=async(t,e)=>{this.analytics("remove-view-from-stack");const i=this.layoutContentCache.getContentItemOrThrow(t,["stack"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to remove a view ('${e.name}') which does not belong to the stack.`);await n.layout.platformCloseView(e)},this.createAdjacentStack=async(t,e,{position:i="right"}={})=>{if(this.analytics("create-adjacent-stack"),!Array.isArray(e)||0===e.length)throw new Error('The parameter "views" must be an array with at least 1 element.');if(!["top","bottom","left","right"].includes(i))throw new Error(`Invalid position '${i}' specified.`);const n=this.layoutContentCache.getContentItemOrThrow(t).createAdjacentStack({position:i}),o=this.layoutContentCache.getOrCreateEntityId(n);return await Promise.all(e.reverse().map((t=>this.addViewToStack(o,t)))),o},this.getAdjacentStacks=async({targetId:t,edge:e})=>{this.analytics("get-adjacent-stacks");const i=this.layoutContentCache.getContentItemOrThrow(t);return(0,x.getAdjacentStacks)(i,e).map((t=>({entityId:this.layoutContentCache.getOrCreateEntityId(t)})))},this.setStackActiveView=async(t,e)=>{this.analytics("set-stack-active-view");const i=this.layoutContentCache.getContentItemOrThrow(t,["stack"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to set a view ('${e.name}') as active when it does not belong to the stack.`);i.setActiveContentItem(n,!0)}}async getLayout(t){const e=await L.DefaultLayoutManager.resolveLayout(this.layoutManager,t);if(!e)throw new Error(`Could not resolve target layout identity ${JSON.stringify(t)}`);return e}getContent(t){this.analytics("get-content");return this.layoutContentCache.getContentItemOrThrow(t,["column","row"]).contentItems.map((t=>({type:t.type,entityId:this.layoutContentCache.getOrCreateEntityId(t)})))}getParent(t){this.analytics("get-parent");const e=this.layoutContentCache.getContentItemOrThrow(t);if(!e.isRoot())return e.parent?.contentItems.includes(e)?{type:e.parent.type,entityId:this.layoutContentCache.getOrCreateEntityId(e.parent)}:void 0}}S([(0,E.expose)()],z.prototype,"getLayoutIdentityForViewOrThrow",void 0),S([(0,E.expose)()],z.prototype,"getRoot",void 0),S([(0,E.expose)()],z.prototype,"getStackByView",void 0),S([(0,E.expose)()],z.prototype,"getStackViews",void 0),S([(0,E.expose)()],z.prototype,"getContent",null),S([(0,E.expose)()],z.prototype,"getParent",null),S([(0,E.expose)()],z.prototype,"isRoot",void 0),S([(0,E.expose)()],z.prototype,"exists",void 0),S([(0,E.expose)()],z.prototype,"addViewToStack",void 0),S([(0,E.expose)()],z.prototype,"removeViewFromStack",void 0),S([(0,E.expose)()],z.prototype,"createAdjacentStack",void 0),S([(0,E.expose)()],z.prototype,"getAdjacentStacks",void 0),S([(0,E.expose)()],z.prototype,"setStackActiveView",void 0),I.LayoutEntitiesController=z,Object.defineProperty(g,"__esModule",{value:!0});var M=g.initLayoutEndpoints=void 0;const P=t.apiExposer,T=t.layout_constants,A=f,k=I,D=i;M=g.initLayoutEndpoints=async function(t,e){const i=t.getFin(),n=await i.Platform.getCurrentSync().getClient(),o=new P.ChannelsExposer(n);await new P.ApiExposer(o).exposeInstance(new k.LayoutEntitiesController(t,e,A.LayoutContentCache.getSingleInstance()),{id:T.LAYOUT_CONTROLLER_ID}),await async function(t,e){const i=t=>async i=>{const n=await D.DefaultLayoutManager.resolveLayout(e,i.target);if(!n)throw new Error(`Could not resolve the layout target from payload ${JSON.stringify(i)}`);return t(n,i)},n=(e,n)=>{t.register(e,i(n))},o=(t,e)=>{n(t,e)};n("replace-view",((t,e)=>t.replaceView(e))),n("replace-layout",((t,{layout:e})=>t.replaceLayout(e))),n("add-view",((t,e)=>t.insertView(e))),o("layout-add-view",((t,{viewOptions:e,location:i,targetView:n})=>t.platformCreateView(e,{location:i,targetView:n}))),n("close-view",((t,e)=>t.cleanupView(e.viewIdentity))),o("layout-close-view",((t,e)=>t.platformCloseView(e.viewIdentity))),n("apply-preset-layout",((t,e)=>t.applyPreset(e))),n("get-layout-views",(t=>t.getCurrentViews())),n("get-frame-snapshot",(t=>t.getFrameSnapshot())),n("is-visible",(t=>t.isVisible())),n("destroy",(t=>t.destroy())),t.register("get-layout-snapshot",(()=>e.getLayoutSnapshot()))}(n,e)};var R={};Object.defineProperty(R,"__esModule",{value:!0});var U=R.BaseLayout=void 0;U=R.BaseLayout=class{};var O={};Object.defineProperty(O,"__esModule",{value:!0});var V=O.DOMEmitter=void 0;V=O.DOMEmitter=class{constructor(t){this.container=t}dispatchLocalEvent(t,e){const i={...e,type:t,tabSelector:`tab-${e.name}`,containerSelector:`container-${e.name}`,topic:"openfin-DOM-event"};this.container.dispatchEvent(new CustomEvent(t,{detail:i}))}};var B={};Object.defineProperty(B,"__esModule",{value:!0});var H=B.mapLayoutContentItemsImmutableSync=B.mapLayoutContentItemsImmutable=W=B.isVisible=void 0;var W=B.isVisible=t=>(0!==t.offsetWidth||0!==t.offsetHeight)&&"hidden"!==window.getComputedStyle(t).visibility&&t.offsetTop>=0&&t.offsetLeft>=0&&t.offsetTop<=window.innerHeight&&t.offsetLeft<=window.innerWidth;const F=t=>"type"in t&&"component"===t.type;B.mapLayoutContentItemsImmutable=async function t(e,i){return F(i)?e(i):{...i,content:await Promise.all(i.content?.map((i=>t(e,i))))}},H=B.mapLayoutContentItemsImmutableSync=function t(e,i){return F(i)?e(i):{...i,content:i.content?.map((i=>t(e,i)))}};class N extends Error{constructor(t,e){super(e),this.type=t}}class G extends N{constructor(t,e){super("Configuration",t),this.node=e}}class j extends N{constructor(t){super("PopoutBlocked",t)}}class $ extends N{constructor(t){super("API",t)}}class Z extends N{constructor(t){super("Bind",t)}}class q extends Error{constructor(t,e,i){super(`${t}: ${e}${void 0===i?"":": "+i}`)}}class X extends q{constructor(t,e){super("Assert",t,e)}}class Y extends q{constructor(t,e,i){super("UnreachableCase",t,`${e}${void 0===i?"":": "+i}`)}}class K extends q{constructor(t,e){super("UnexpectedNull",t,e)}}class J extends q{constructor(t,e){super("UnexpectedUndefined",t,e)}}var Q;!function(t){let e=!1;const i={PopoutCannotBeCreatedWithGroundItemConfig:{id:0,default:"Popout cannot be created with ground ItemConfig"},PleaseRegisterAConstructorFunction:{id:1,default:"Please register a constructor function"},ComponentTypeNotRegisteredAndBindComponentEventHandlerNotAssigned:{id:2,default:"Component type not registered and BindComponentEvent handler not assigned"},ComponentIsAlreadyRegistered:{id:3,default:"Component is already registered"},ComponentIsNotVirtuable:{id:4,default:"Component is not virtuable. Requires rootHtmlElement field/getter"},VirtualComponentDoesNotHaveRootHtmlElement:{id:5,default:'Virtual component does not have getter "rootHtmlElement"'},ItemConfigIsNotTypeComponent:{id:6,default:"ItemConfig is not of type component"},InvalidNumberPartInSizeString:{id:7,default:"Invalid number part in size string"},UnknownUnitInSizeString:{id:8,default:"Unknown unit in size string"},UnsupportedUnitInSizeString:{id:9,default:"Unsupported unit in size string"}};t.idCount=Object.keys(i).length;const n=Object.values(i);t.checkInitialise=function(){if(!e)for(let e=0;e="0"&&t<="9"}function Tt(t,e){const i=zt(e);t.style.width=i}function At(t,e){const i=zt(e);t.style.height=i}function kt(t){return{width:t.offsetWidth,height:t.offsetHeight}}function Dt(t,e){t.style.display=e?"":"none"}function Rt(t,e){if(void 0!==e)for(const i in e)if(e.hasOwnProperty(i)){const n=e[i],o=t[i];t[i]=Ut(o,n)}return t}function Ut(t,e){if("object"!=typeof e)return e;if(Array.isArray(e)){const t=e.length,i=new Array(t);for(let n=0;n36)throw new Error("Too many keys in config minifier map")},t.translateObject=n}(dt||(dt={})),function(t){t.defaults={type:at.ground,content:[],size:1,sizeUnit:ht.Fractional,minSize:void 0,minSizeUnit:ht.Pixel,id:"",isClosable:!0},t.createCopy=function(t,e){switch(t.type){case at.ground:case at.row:case at.column:return gt.createCopy(t,e);case at.stack:return ut.createCopy(t,e);case at.component:return pt.createCopy(t);default:throw new Y("CICC91354",t.type,"Invalid Config Item type specified")}},t.createDefault=function(t){switch(t){case at.ground:throw new X("CICCDR91562");case at.row:case at.column:return gt.createDefault(t);case at.stack:return ut.createDefault();case at.component:return pt.createDefault();default:throw new Y("CICCDD91563",t,"Invalid Config Item type specified")}},t.isComponentItem=function(t){return t.type===at.component},t.isStackItem=function(t){return t.type===at.stack},t.isGroundItem=function(t){return t.type===at.ground}}(ct||(ct={})),function(t){t.defaultMaximised=!1,function(t){t.createCopy=function(t,e){return void 0===t?void 0:{show:null!=e?e:t.show,popout:t.popout,close:t.close,maximise:t.maximise,minimise:t.minimise,tabDropdown:t.tabDropdown}}}(t.Header||(t.Header={}))}(mt||(mt={})),function(t){function e(t){const e=t.length,i=new Array(e);for(let n=0;n"__glMaximised"===t));t>0&&(o=!0,n=n.splice(t,1)),e=n.length>0?n[0]:ct.defaults.id}else e=n;return i=void 0!==t.maximised?t.maximised:o,{id:e,maximised:i}}}(wt||(wt={})),function(t){function e(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0;return{resolved:!0,root:Et.resolve(i),openPopouts:t.resolveOpenPopouts(e.openPopouts),dimensions:t.Dimensions.resolve(e.dimensions),settings:t.Settings.resolve(e.settings),header:t.Header.resolve(e.header,e.settings,e.labels)}}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:Lt.fromResolvedArray(e.openPopouts),settings:_t.Settings.createCopy(e.settings),dimensions:t.Dimensions.fromResolved(e.dimensions),header:_t.Header.createCopy(e.header)}},t.isResolved=function(t){const e=t;return void 0!==e.resolved&&!0===e.resolved},t.resolveOpenPopouts=function(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0,{root:Et.resolve(o),openPopouts:xt.resolveOpenPopouts(e.openPopouts),dimensions:xt.Dimensions.resolve(e.dimensions),settings:xt.Settings.resolve(e.settings),header:xt.Header.resolve(e.header,e.settings,e.labels),parentId:null!==(i=e.parentId)&&void 0!==i?i:null,indexInParent:null!==(n=e.indexInParent)&&void 0!==n?n:null,window:t.Window.resolve(e.window,e.dimensions),resolved:!0}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:i(e.openPopouts),dimensions:xt.Dimensions.fromResolved(e.dimensions),settings:_t.Settings.createCopy(e.settings),header:_t.Header.createCopy(e.header),parentId:e.parentId,indexInParent:e.indexInParent,window:t.Window.fromResolved(e.window)}},t.fromResolvedArray=i}(Lt||(Lt={}));class Wt{constructor(){this._allEventSubscriptions=[],this._subscriptionsMap=new Map,this.unbind=this.removeEventListener,this.trigger=this.emit}tryBubbleEvent(t,e){}emit(t,...e){let i=this._subscriptionsMap.get(t);if(void 0!==i){i=i.slice();for(let t=0;t0){const n=e.slice();n.unshift(t);const o=this._allEventSubscriptions.slice();for(let t=0;t0?n.contentItems[0]:n,e=0);const o=this._layoutManager.createAndInitContentItem(i,t);t.addChild(o,e),this._layoutManager.layoutConfig.settings.popInOnClose?this._onClose():this.close()}createWindow(){const t=this.createUrl(),e=Math.floor(1e6*Math.random()).toString(36),i=this.serializeWindowFeatures({width:this._initialWindowSize.width,height:this._initialWindowSize.height,innerWidth:this._initialWindowSize.width,innerHeight:this._initialWindowSize.height,menubar:"no",toolbar:"no",location:"no",personalbar:"no",resizable:"yes",scrollbars:"no",status:"no"});if(this._popoutWindow=globalThis.open(t,e,i),this._popoutWindow)this._popoutWindow.addEventListener("load",(()=>this.positionWindow()),{passive:!0}),this._popoutWindow.addEventListener("beforeunload",(()=>{this._layoutManager.layoutConfig.settings.popInOnClose?this.popIn():this._onClose()}),{passive:!0}),this._checkReadyInterval=setInterval((()=>this.checkReady()),10);else if(!0===this._layoutManager.layoutConfig.settings.blockedPopoutsThrowError){throw new j("Popout blocked")}}checkReady(){if(null===this._popoutWindow)throw new K("BPCR01844");this._popoutWindow.__glInstance&&this._popoutWindow.__glInstance.isInitialised&&(this.onInitialised(),void 0!==this._checkReadyInterval&&(clearInterval(this._checkReadyInterval),this._checkReadyInterval=void 0))}serializeWindowFeatures(t){const e=[];for(const i in t)e.push(i+"="+t[i].toString());return e.join(",")}createUrl(){const t="gl-window-config-"+Ot(),e=_t.minifyConfig(this._config);try{localStorage.setItem(t,JSON.stringify(e))}catch(t){throw new Error("Error while writing to localStorage "+function(t){return t instanceof Error?t.message:"string"==typeof t?t:"Unknown Error"}(t))}const i=new URL(location.href);return i.searchParams.set("gl-window",t),i.toString()}positionWindow(){if(null===this._popoutWindow)throw new Error("BrowserPopout.positionWindow: null popoutWindow");this._popoutWindow.moveTo(this._initialWindowSize.left,this._initialWindowSize.top),this._popoutWindow.focus()}onInitialised(){this._isInitialised=!0,this.getGlInstance().on("popIn",(()=>this.popIn())),this.emit("initialised")}_onClose(){setTimeout((()=>this.emit("closed")),50)}}class Gt extends Wt{constructor(t,e,i,n){super(),this.layoutManager=t,this._parent=i,this._element=n,this._popInParentIds=[],this._type=e.type,this._id=e.id,this._isInitialised=!1,this.isGround=!1,this.isRow=!1,this.isColumn=!1,this.isStack=!1,this.isComponent=!1,this.size=e.size,this.sizeUnit=e.sizeUnit,this.minSize=e.minSize,this.minSizeUnit=e.minSizeUnit,this._isClosable=e.isClosable,this._pendingEventPropagations={},this._throttledEvents=["stateChanged"],this._contentItems=this.createContentItems(e.content)}get type(){return this._type}get id(){return this._id}set id(t){this._id=t}get popInParentIds(){return this._popInParentIds}get parent(){return this._parent}get contentItems(){return this._contentItems}get isClosable(){return this._isClosable}get element(){return this._element}get isInitialised(){return this._isInitialised}static isStack(t){return t.isStack}static isComponentItem(t){return t.isComponent}static isComponentParentableItem(t){return t.isStack||t.isGround}removeChild(t,e=!1){const i=this._contentItems.indexOf(t);if(-1===i)throw new Error("Can't remove child item. Unknown content item");if(e||this._contentItems[i].destroy(),this._contentItems.splice(i,1),this._contentItems.length>0)this.updateSize(!1);else if(!this.isGround&&!0===this._isClosable){if(null===this._parent)throw new K("CIUC00874");this._parent.removeChild(this)}}addChild(t,e,i){return null!=e||(e=this._contentItems.length),this._contentItems.splice(e,0,t),t.setParent(this),!0===this._isInitialised&&!1===t._isInitialised&&t.init(),e}replaceChild(t,e,i=!1){const n=this._contentItems.indexOf(t),o=t._element.parentNode;if(-1===n)throw new X("CIRCI23232","Can't replace child. oldChild is not child of this");if(null===o)throw new K("CIRCP23232");if(o.replaceChild(e._element,t._element),!0===i&&(t._parent=null,t.destroy()),this._contentItems[n]=e,e.setParent(this),e.size=t.size,e.sizeUnit=t.sizeUnit,e.minSize=t.minSize,e.minSizeUnit=t.minSizeUnit,null===e._parent)throw new K("CIRCNC45699");!0===e._parent._isInitialised&&!1===e._isInitialised&&e.init(),this.updateSize(!1)}remove(){if(null===this._parent)throw new K("CIR11110");this._parent.removeChild(this)}popout(){const t=Ot(),e=this.layoutManager.createPopoutFromContentItem(this,void 0,t,void 0);return this.emitBaseBubblingEvent("stateChanged"),e}calculateConfigContent(){const t=this._contentItems,e=t.length,i=new Array(e);for(let n=0;nthis.propagateEventToLayoutManager(t,e))))}propagateEventToLayoutManager(t,e){this._pendingEventPropagations[t]=!1,this.layoutManager.emitUnknown(t,e)}}class jt extends Gt{constructor(t,e,i){super(t,e,i,document.createElement("div")),this._parentItem=i,this._focused=!1,this.isComponent=!0,this._reorderEnabled=e.reorderEnabled,this.applyUpdatableConfig(e),this._initialWantMaximise=e.maximised;const n=document.createElement("div");n.classList.add("lm_content"),this.element.appendChild(n),this._container=new Ft(e,this,t,n,(t=>this.handleUpdateItemConfigEvent(t)),(()=>this.show()),(()=>this.hide()),(t=>this.focus(t)),(t=>this.blur(t)))}get componentName(){return this._container.componentType}get componentType(){return this._container.componentType}get reorderEnabled(){return this._reorderEnabled}get initialWantMaximise(){return this._initialWantMaximise}get component(){return this._container.component}get container(){return this._container}get parentItem(){return this._parentItem}get headerConfig(){return this._headerConfig}get title(){return this._title}get tab(){return this._tab}get focused(){return this._focused}destroy(){this._container.destroy(),super.destroy()}applyUpdatableConfig(t){this.setTitle(t.title),this._headerConfig=t.header}toConfig(){const t=this._container.stateRequestEvent,e=void 0===t?this._container.state:t();return{type:at.component,content:[],size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,maximised:!1,isClosable:this.isClosable,reorderEnabled:this._reorderEnabled,title:this._title,header:mt.Header.createCopy(this._headerConfig),componentType:pt.copyComponentType(this.componentType),componentState:e}}close(){if(null===this.parent)throw new K("CIC68883");this.parent.removeChild(this,!1)}enterDragMode(t,e){Tt(this.element,t),At(this.element,e),this._container.enterDragMode(t,e)}exitDragMode(){this._container.exitDragMode()}enterStackMaximised(){this._container.enterStackMaximised()}exitStackMaximised(){this._container.exitStackMaximised()}drag(){this._container.drag()}updateSize(t){this.updateNodeSize(t)}init(){this.updateNodeSize(!1),super.init(),this._container.emit("open"),this.initContentItems()}setTitle(t){this._title=t,this.emit("titleChanged",t),this.emit("stateChanged")}setTab(t){this._tab=t,this.emit("tab",t),this._container.setTab(t)}hide(){super.hide(),this._container.setVisibility(!1)}show(){super.show(),this._container.setVisibility(!0)}focus(t=!1){this.parentItem.setActiveComponentItem(this,!0,t)}setFocused(t){this._focused=!0,this.tab.setFocused(),t||this.emitBaseBubblingEvent("focus")}blur(t=!1){this._focused&&this.layoutManager.setFocusedComponentItem(void 0,t)}setBlurred(t){this._focused=!1,this.tab.setBlurred(),t||this.emitBaseBubblingEvent("blur")}setParent(t){this._parentItem=t,super.setParent(t)}handleUpdateItemConfigEvent(t){this.applyUpdatableConfig(t)}updateNodeSize(t){if("none"!==this.element.style.display){const{width:e,height:i}=kt(this.element);this._container.setSizeToNodeSize(e,i,t)}}}class $t extends Gt{constructor(){super(...arguments),this._focused=!1}get focused(){return this._focused}setFocusedValue(t){this._focused=t}}class Zt extends Wt{constructor(t,e){super(),this._eElement=t,this._pointerTracking=!1,this._pointerDownEventListener=t=>this.onPointerDown(t),this._pointerMoveEventListener=t=>this.onPointerMove(t),this._pointerUpEventListener=t=>this.onPointerUp(t),this._timeout=void 0,this._allowableTargets=[t,...e],this._oDocument=document,this._eBody=document.body,this._nDelay=1800,this._nDistance=10,this._nX=0,this._nY=0,this._nOriginalX=0,this._nOriginalY=0,this._dragging=!1,this._eElement.addEventListener("pointerdown",this._pointerDownEventListener,{passive:!0})}destroy(){this.checkRemovePointerTrackingEventListeners(),this._eElement.removeEventListener("pointerdown",this._pointerDownEventListener)}cancelDrag(){this.processDragStop(void 0)}onPointerDown(t){if(this._allowableTargets.includes(t.target)&&t.isPrimary){const e=this.getPointerCoordinates(t);this.processPointerDown(e)}}processPointerDown(t){this._nOriginalX=t.x,this._nOriginalY=t.y,this._oDocument.addEventListener("pointermove",this._pointerMoveEventListener),this._oDocument.addEventListener("pointerup",this._pointerUpEventListener,{passive:!0}),this._pointerTracking=!0,this._timeout=setTimeout((()=>{try{this.startDrag()}catch(t){throw console.error(t),t}}),this._nDelay)}onPointerMove(t){this._pointerTracking&&(this.processDragMove(t),t.preventDefault())}processDragMove(t){this._nX=t.pageX-this._nOriginalX,this._nY=t.pageY-this._nOriginalY,!1===this._dragging&&(Math.abs(this._nX)>this._nDistance||Math.abs(this._nY)>this._nDistance)&&this.startDrag(),this._dragging&&this.emit("drag",this._nX,this._nY,t)}onPointerUp(t){this.processDragStop(t)}processDragStop(t){var e;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this.checkRemovePointerTrackingEventListeners(),!0===this._dragging&&(this._eBody.classList.remove("lm_dragging"),this._eElement.classList.remove("lm_dragging"),null===(e=this._oDocument.querySelector("iframe"))||void 0===e||e.style.setProperty("pointer-events",""),this._dragging=!1,this.emit("dragStop",t))}checkRemovePointerTrackingEventListeners(){this._pointerTracking&&(this._oDocument.removeEventListener("pointermove",this._pointerMoveEventListener),this._oDocument.removeEventListener("pointerup",this._pointerUpEventListener),this._pointerTracking=!1)}startDrag(){var t;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this._dragging=!0,this._eBody.classList.add("lm_dragging"),this._eElement.classList.add("lm_dragging"),null===(t=this._oDocument.querySelector("iframe"))||void 0===t||t.style.setProperty("pointer-events","none"),this.emit("dragStart",this._nOriginalX,this._nOriginalY)}getPointerCoordinates(t){return{x:t.pageX,y:t.pageY}}}class qt{constructor(t,e,i){this._isVertical=t,this._size=e,this._grabSize=i0){const i=this.createSplitter(Math.max(0,e-1)).element;e>0?(this.contentItems[e-1].element.insertAdjacentElement("afterend",i),i.insertAdjacentElement("afterend",t.element)):(this.contentItems[0].element.insertAdjacentElement("beforebegin",i),i.insertAdjacentElement("beforebegin",t.element))}else this._childElementContainer.appendChild(t.element);super.addChild(t,e);const n=1/this.contentItems.length*100;if(!0===i)return this.emitBaseBubblingEvent("stateChanged"),e;for(let e=0;e0&&(this.calculateRelativeSizes(),this.setAbsoluteSizes()),this.emitBaseBubblingEvent("stateChanged"),this.emit("resize")}setAbsoluteSizes(){const t=this.calculateAbsoluteSizes();for(let e=0;e0&&t.itemSizes[e]++,this._isColumn?(Tt(this.contentItems[e].element,t.crossAxisSize),At(this.contentItems[e].element,t.itemSizes[e])):(Tt(this.contentItems[e].element,t.itemSizes[e]),At(this.contentItems[e].element,t.crossAxisSize))}calculateAbsoluteSizes(){const t=(this.contentItems.length-1)*this._splitterSize,{width:e,height:i}=kt(this.element);let n,o;this._isColumn?(n=i-t,o=e):(n=e-t,o=i);let s=0;const r=[];for(let t=0;t0){const n=100-t;for(let t=0;t100&&e.length>0){for(let t=0;te)return;{const r=i/e;let a=i;for(let e=0;ethis.onSplitterDrag(e,t,i))),e.on("dragStop",(()=>this.onSplitterDragStop(e))),e.on("dragStart",(()=>this.onSplitterDragStart(e))),this._splitter.splice(t,0,e),e}getSplitItems(t){const e=this._splitter.indexOf(t);return{before:this.contentItems[e],after:this.contentItems[e+1]}}calculateContentItemMinSize(t){const e=t.minSize;if(void 0!==e){if(t.minSizeUnit===ht.Pixel)return e;throw new X("ROCGMD98831",JSON.stringify(t))}{const t=this.layoutManager.layoutConfig.dimensions;return this._isColumn?t.defaultMinItemHeight:t.defaultMinItemWidth}}calculateContentItemsTotalMinSize(t){let e=0;for(const i of t)e+=this.calculateContentItemMinSize(i);return e}onSplitterDragStart(t){const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=this.calculateContentItemsTotalMinSize(e.before.contentItems),s=this.calculateContentItemsTotalMinSize(e.after.contentItems);this._splitterPosition=0,this._splitterMinPosition=-1*(i-o),this._splitterMaxPosition=n-s}onSplitterDrag(t,e,i){let n=this._isColumn?i:e;if(null===this._splitterMinPosition||null===this._splitterMaxPosition)throw new K("ROCOSD59226");n=Math.max(n,this._splitterMinPosition),n=Math.min(n,this._splitterMaxPosition),this._splitterPosition=n;const o=zt(n);this._isColumn?t.element.style.top=o:t.element.style.left=o}onSplitterDragStop(t){if(null===this._splitterPosition)throw new K("ROCOSDS66932");{const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=(this._splitterPosition+i)/(i+n),s=e.before.size+e.after.size;e.before.size=o*s,e.after.size=(1-o)*s,t.element.style.top=zt(0),t.element.style.left=zt(0),globalThis.requestAnimationFrame((()=>this.updateSize(!1)))}}}!function(t){t.getElementDimensionSize=function(t,e){return"width"===e?function(t){return t.offsetWidth}(t):function(t){return t.offsetHeight}(t)},t.setElementDimensionSize=function(t,e,i){return"width"===e?Tt(t,i):At(t,i)},t.createElement=function(t,e){const i=t.createElement("div");return i.classList.add("lm_item"),e?i.classList.add("lm_column"):i.classList.add("lm_row"),i}}(Xt||(Xt={}));class Yt extends $t{constructor(t,e,i){super(t,vt.create(e),null,Yt.createElement(document)),this.isGround=!0,this._childElementContainer=this.element,this._containerElement=i;let n=null;for(;;){const t=n?n.previousSibling:this._containerElement.lastChild;if(!(t instanceof Element&&t.classList.contains("lm_content")))break;n=t}this._containerElement.insertBefore(this.element,n)}init(){if(!0!==this.isInitialised){this.updateNodeSize();for(let t=0;t0?this.contentItems[0]:this,n.isComponent)throw new Error("Cannot add item as child to ComponentItem");{const t=this.layoutManager.createAndInitContentItem(i,n);return e=n.addChild(t,e),n===this?-1:e}}loadComponentAsRoot(t){this.clearRoot();const e=Ct.resolve(t,!1);if(e.maximised)throw new Error("Root Component cannot be maximised");{const t=new jt(this.layoutManager,e,this);t.init(),this.addChild(t,0)}}addChild(t,e){if(this.contentItems.length>0)throw new Error("Ground node can only have a single child");return this._childElementContainer.appendChild(t.element),e=super.addChild(t,e),this.updateSize(!1),this.emitBaseBubblingEvent("stateChanged"),e}calculateConfigContent(){const t=this.contentItems,e=t.length,i=new Array(e);for(let n=0;n0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e)),this.updateContentItemsSize(!1))}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}createSideAreas(){const t=Yt.Area.oppositeSides,e=new Array(Object.keys(t).length);let i=0;for(const n in t){const o=n,s=this.getElementArea();if(null===s)throw new K("RCSA77553");s.side=o,"2"===t[o][1]?s[o]=s[t[o]]-50:s[o]=s[t[o]]+50,s.surface=(s.x2-s.x1)*(s.y2-s.y1),e[i++]=s}return e}highlightDropZone(t,e,i){this.layoutManager.tabDropPlaceholder.remove(),super.highlightDropZone(t,e,i)}onDrop(t,e){if(t.isComponent){const e=ut.createDefault(),i=t;e.header=mt.Header.createCopy(i.headerConfig);const n=this.layoutManager.createAndInitContentItem(e,this);n.addChild(t),t=n}if(0===this.contentItems.length)this.addChild(t);else{if(t.type===at.row||t.type===at.column){const e=ut.createDefault(),i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}const i="x"==e.side[0]?at.row:at.column,n="2"==e.side[1],o=this.contentItems[0];if(o instanceof Xt&&o.type===i){const e=o.contentItems[n?0:o.contentItems.length-1];o.addChild(t,n?0:void 0,!0),e.size*=.5,t.size=e.size,t.sizeUnit=ht.Percent,o.updateSize(!1)}else{const e=ct.createDefault(i),s=this.layoutManager.createContentItem(e,this);this.replaceChild(o,s),s.addChild(t,n?0:void 0,!0),s.addChild(o,n?void 0:0,!0),o.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}}dock(){throw new X("GID87731")}validateDocking(){throw new X("GIVD87732")}getAllContentItems(){const t=[this];return this.deepGetAllContentItems(this.contentItems,t),t}getConfigMaximisedItems(){const t=[];return this.deepFilterContentItems(this.contentItems,t,(t=>!(!Gt.isStack(t)||!t.initialWantMaximise)||!(!Gt.isComponentItem(t)||!t.initialWantMaximise))),t}getItemsByPopInParentId(t){const e=[];return this.deepFilterContentItems(this.contentItems,e,(e=>e.popInParentIds.includes(t))),e}toConfig(){throw new Error("Cannot generate GroundItem config")}setActiveComponentItem(t,e,i){}updateNodeSize(){const{width:t,height:e}=kt(this._containerElement);Tt(this.element,t),At(this.element,e),this.contentItems.length>0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e))}deepGetAllContentItems(t,e){for(let i=0;ithis.onClick(t),this._touchStartEventListener=t=>this.onTouchStart(t),this._element=document.createElement("div"),this._element.classList.add(i),this._element.title=e,this._header.on("destroy",(()=>this.destroy())),this._element.addEventListener("click",this._clickEventListener,{passive:!0}),this._element.addEventListener("touchstart",this._touchStartEventListener,{passive:!0}),this._header.controlsContainerElement.appendChild(this._element)}get element(){return this._element}destroy(){var t;this._element.removeEventListener("click",this._clickEventListener),this._element.removeEventListener("touchstart",this._touchStartEventListener),null===(t=this._element.parentNode)||void 0===t||t.removeChild(this._element)}onClick(t){this._pushEvent(t)}onTouchStart(t){this._pushEvent(t)}}class Jt{constructor(t,e,i,n,o){var s;this._layoutManager=t,this._componentItem=e,this._closeEvent=i,this._focusEvent=n,this._dragStartEvent=o,this._isActive=!1,this._tabClickListener=t=>this.onTabClickDown(t),this._tabTouchStartListener=t=>this.onTabTouchStart(t),this._closeClickListener=()=>this.onCloseClick(),this._closeTouchStartListener=()=>this.onCloseTouchStart(),this._dragStartListener=(t,e)=>this.onDragStart(t,e),this._contentItemDestroyListener=()=>this.onContentItemDestroy(),this._tabTitleChangedListener=t=>this.setTitle(t),this._element=document.createElement("div"),this._element.classList.add("lm_tab"),this._titleElement=document.createElement("span"),this._titleElement.classList.add("lm_title"),this._closeElement=document.createElement("div"),this._closeElement.classList.add("lm_close_tab"),this._element.appendChild(this._titleElement),this._element.appendChild(this._closeElement),e.isClosable?this._closeElement.style.display="":this._closeElement.style.display="none",this.setTitle(e.title),this._componentItem.on("titleChanged",this._tabTitleChangedListener);(null!==(s=e.reorderEnabled)&&void 0!==s?s:this._layoutManager.layoutConfig.settings.reorderEnabled)&&this.enableReorder(),this._element.addEventListener("click",this._tabClickListener,{passive:!0}),this._element.addEventListener("touchstart",this._tabTouchStartListener,{passive:!0}),this._componentItem.isClosable?(this._closeElement.addEventListener("click",this._closeClickListener,{passive:!0}),this._closeElement.addEventListener("touchstart",this._closeTouchStartListener,{passive:!0})):(this._closeElement.remove(),this._closeElement=void 0),this._componentItem.setTab(this),this._layoutManager.emit("tabCreated",this)}get isActive(){return this._isActive}get componentItem(){return this._componentItem}get contentItem(){return this._componentItem}get element(){return this._element}get titleElement(){return this._titleElement}get closeElement(){return this._closeElement}get reorderEnabled(){return void 0!==this._dragListener}set reorderEnabled(t){t!==this.reorderEnabled&&(t?this.enableReorder():this.disableReorder())}setTitle(t){this._titleElement.innerText=t,this._element.title=t}setActive(t){t!==this._isActive&&(this._isActive=t,t?this._element.classList.add("lm_active"):this._element.classList.remove("lm_active"))}destroy(){var t,e;this._closeEvent=void 0,this._focusEvent=void 0,this._dragStartEvent=void 0,this._element.removeEventListener("click",this._tabClickListener),this._element.removeEventListener("touchstart",this._tabTouchStartListener),null===(t=this._closeElement)||void 0===t||t.removeEventListener("click",this._closeClickListener),null===(e=this._closeElement)||void 0===e||e.removeEventListener("touchstart",this._closeTouchStartListener),this._componentItem.off("titleChanged",this._tabTitleChangedListener),this.reorderEnabled&&this.disableReorder(),this._element.remove()}setBlurred(){this._element.classList.remove("lm_focused"),this._titleElement.classList.remove("lm_focused")}setFocused(){this._element.classList.add("lm_focused"),this._titleElement.classList.add("lm_focused")}onDragStart(t,e){if(void 0===this._dragListener)throw new J("TODSDLU10093");if(void 0===this._dragStartEvent)throw new J("TODS23309");this._dragStartEvent(t,e,this._dragListener,this.componentItem)}onContentItemDestroy(){void 0!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=void 0)}onTabClickDown(t){const e=t.target;e!==this._element&&e!==this._titleElement||(0===t.button?this.notifyFocus():1===t.button&&this._componentItem.isClosable&&this.notifyClose())}onTabTouchStart(t){t.target===this._element&&this.notifyFocus()}onCloseClick(){this.notifyClose()}onCloseTouchStart(){this.notifyClose()}notifyClose(){if(void 0===this._closeEvent)throw new J("TNC15007");this._closeEvent(this._componentItem)}notifyFocus(){if(void 0===this._focusEvent)throw new J("TNA15007");this._focusEvent(this._componentItem)}enableReorder(){this._dragListener=new Zt(this._element,[this._titleElement]),this._dragListener.on("dragStart",this._dragStartListener),this._componentItem.on("destroy",this._contentItemDestroyListener)}disableReorder(){if(void 0===this._dragListener)throw new J("TDR87745");this._componentItem.off("destroy",this._contentItemDestroyListener),this._dragListener.off("dragStart",this._dragStartListener),this._dragListener=void 0}}class Qt{constructor(t,e,i,n,o){this._layoutManager=t,this._componentRemoveEvent=e,this._componentFocusEvent=i,this._componentDragStartEvent=n,this._dropdownActiveChangedEvent=o,this._tabs=[],this._lastVisibleTabIndex=-1,this._dropdownActive=!1,this._element=document.createElement("section"),this._element.classList.add("lm_tabs"),this._dropdownElement=document.createElement("section"),this._dropdownElement.classList.add("lm_tabdropdown_list"),this._dropdownElement.style.display="none"}get tabs(){return this._tabs}get tabCount(){return this._tabs.length}get lastVisibleTabIndex(){return this._lastVisibleTabIndex}get element(){return this._element}get dropdownElement(){return this._dropdownElement}get dropdownActive(){return this._dropdownActive}destroy(){for(let t=0;tthis.handleTabCloseEvent(t)),(t=>this.handleTabFocusEvent(t)),((t,e,i,n)=>this.handleTabDragStartEvent(t,e,i,n)));void 0===e&&(e=this._tabs.length),this._tabs.splice(e,0,i),ethis._lastVisibleTabIndex){const t=this._tabs[e];for(let t=e;t>0;t--)this._tabs[t]=this._tabs[t-1];this._tabs[0]=t}}updateTabSizes(t,e){let i=!1;this.tryUpdateTabSizes(i,t,e)||(i=!0,this.tryUpdateTabSizes(i,t,e)),i!==this._dropdownActive&&(this._dropdownActive=i,this._dropdownActiveChangedEvent())}tryUpdateTabSizes(t,e,i){if(this._tabs.length>0){if(void 0===i)throw new Error("non-empty tabs must have active component item");let n=0,o=!1;const s=this._layoutManager.layoutConfig.settings.tabOverlapAllowance,r=this._tabs.indexOf(i.tab),a=this._tabs[r];this._lastVisibleTabIndex=-1;for(let i=0;ie){if(o)i===r&&(l.style.zIndex="auto",l.style.marginLeft="",l.parentElement!==this._element&&this._element.appendChild(l));else{let t;if(t=r>0&&r<=i?(d-e)/(i-1):(d-e)/i,tthis.onClick(t),this._touchStartListener=t=>this.onTouchStart(t),this._rowColumnClosable=!0,this._closeButton=null,this._popoutButton=null,this._tabsContainer=new Qt(this._layoutManager,(t=>this.handleTabInitiatedComponentRemoveEvent(t)),(t=>this.handleTabInitiatedComponentFocusEvent(t)),((t,e,i,n)=>this.handleTabInitiatedDragStartEvent(t,e,i,n)),(()=>this.processTabDropdownActiveChanged())),this._show=i.show,this._popoutEnabled=i.popoutEnabled,this._popoutLabel=i.popoutLabel,this._maximiseEnabled=i.maximiseEnabled,this._maximiseLabel=i.maximiseLabel,this._minimiseEnabled=i.minimiseEnabled,this._minimiseLabel=i.minimiseLabel,this._closeEnabled=i.closeEnabled,this._closeLabel=i.closeLabel,this._tabDropdownEnabled=i.tabDropdownEnabled,this._tabDropdownLabel=i.tabDropdownLabel,this.setSide(i.side),this._canRemoveComponent=this._configClosable,this._element=document.createElement("section"),this._element.classList.add("lm_header"),this._controlsContainerElement=document.createElement("section"),this._controlsContainerElement.classList.add("lm_controls"),this._element.appendChild(this._tabsContainer.element),this._element.appendChild(this._controlsContainerElement),this._element.appendChild(this._tabsContainer.dropdownElement),this._element.addEventListener("click",this._clickListener,{passive:!0}),this._element.addEventListener("touchstart",this._touchStartListener,{passive:!0}),this._documentMouseUpListener=()=>this._tabsContainer.hideAdditionalTabsDropdown(),globalThis.document.addEventListener("mouseup",this._documentMouseUpListener,{passive:!0}),this._tabControlOffset=this._layoutManager.layoutConfig.settings.tabControlOffset,this._tabDropdownEnabled&&(this._tabDropdownButton=new Kt(this,this._tabDropdownLabel,"lm_tabdropdown",(()=>this._tabsContainer.showAdditionalTabsDropdown()))),this._popoutEnabled&&(this._popoutButton=new Kt(this,this._popoutLabel,"lm_popout",(()=>this.handleButtonPopoutEvent()))),this._maximiseEnabled&&(this._maximiseButton=new Kt(this,this._maximiseLabel,"lm_maximise",(t=>this.handleButtonMaximiseToggleEvent(t)))),this._configClosable&&(this._closeButton=new Kt(this,this._closeLabel,"lm_close",(()=>s()))),this.processTabDropdownActiveChanged()}get show(){return this._show}get side(){return this._side}get leftRightSided(){return this._leftRightSided}get layoutManager(){return this._layoutManager}get parent(){return this._parent}get tabs(){return this._tabsContainer.tabs}get lastVisibleTabIndex(){return this._tabsContainer.lastVisibleTabIndex}get element(){return this._element}get tabsContainerElement(){return this._tabsContainer.element}get controlsContainerElement(){return this._controlsContainerElement}destroy(){this.emit("destroy"),this._popoutEvent=void 0,this._maximiseToggleEvent=void 0,this._clickEvent=void 0,this._touchStartEvent=void 0,this._componentRemoveEvent=void 0,this._componentFocusEvent=void 0,this._componentDragStartEvent=void 0,this._tabsContainer.destroy(),globalThis.document.removeEventListener("mouseup",this._documentMouseUpListener),this._element.remove()}createTab(t,e){this._tabsContainer.createTab(t,e)}removeTab(t){this._tabsContainer.removeTab(t)}processActiveComponentChanged(t){this._tabsContainer.processActiveComponentChanged(t),this.updateTabSizes()}setSide(t){this._side=t,this._leftRightSided=[nt.right,nt.left].includes(this._side)}setRowColumnClosable(t){this._rowColumnClosable=t,this.updateClosability()}updateClosability(){let t;if(this._configClosable)if(this._rowColumnClosable){t=!0;const e=this.tabs.length;for(let i=0;i1}applyFocusedValue(t){t?this._element.classList.add("lm_focused"):this._element.classList.remove("lm_focused")}processMaximised(){if(void 0===this._maximiseButton)throw new J("HPMAX16997");this._maximiseButton.element.setAttribute("title",this._minimiseLabel)}processMinimised(){if(void 0===this._maximiseButton)throw new J("HPMIN16997");this._maximiseButton.element.setAttribute("title",this._maximiseLabel)}updateTabSizes(){if(this._tabsContainer.tabCount>0){const t=this._show?this._layoutManager.layoutConfig.dimensions.headerHeight:0;let e;this._leftRightSided?(this._element.style.height="",this._element.style.width=zt(t)):(this._element.style.width="",this._element.style.height=zt(t)),e=this._leftRightSided?this._element.offsetHeight-this._controlsContainerElement.offsetHeight-this._tabControlOffset:this._element.offsetWidth-this._controlsContainerElement.offsetWidth-this._tabControlOffset,this._tabsContainer.updateTabSizes(e,this._getActiveComponentItemEvent())}}handleTabInitiatedComponentRemoveEvent(t){if(this._canRemoveComponent){if(void 0===this._componentRemoveEvent)throw new J("HHTCE22294");this._componentRemoveEvent(t)}}handleTabInitiatedComponentFocusEvent(t){if(void 0===this._componentFocusEvent)throw new J("HHTAE22294");this._componentFocusEvent(t)}handleTabInitiatedDragStartEvent(t,e,i,n){if(this._canRemoveComponent){if(void 0===this._componentDragStartEvent)throw new J("HHTDSE22294");this._componentDragStartEvent(t,e,i,n)}else i.cancelDrag()}processTabDropdownActiveChanged(){void 0!==this._tabDropdownButton&&Dt(this._tabDropdownButton.element,this._tabsContainer.dropdownActive)}handleButtonPopoutEvent(){if(this._layoutManager.layoutConfig.settings.popoutWholeStack){if(void 0===this._popoutEvent)throw new J("HHBPOE17834");this._popoutEvent()}else{const t=this._getActiveComponentItemEvent();t&&t.popout()}}handleButtonMaximiseToggleEvent(t){if(void 0===this._maximiseToggleEvent)throw new J("HHBMTE16834");this._maximiseToggleEvent()}onClick(t){t.target===this._element&&this.notifyClick(t)}onTouchStart(t){t.target===this._element&&this.notifyTouchStart(t)}notifyClick(t){if(void 0===this._clickEvent)throw new J("HNHC46834");this._clickEvent(t)}notifyTouchStart(t){if(void 0===this._touchStartEvent)throw new J("HNHTS46834");this._touchStartEvent(t)}}class ee extends $t{constructor(t,e,i){var n,o,s,r,a,l,h,d,c,m,u,p,g,f,v,_,y,C,w;super(t,e,i,ee.createElement(document)),this._headerSideChanged=!1,this._resizeListener=()=>this.handleResize(),this._maximisedListener=()=>this.handleMaximised(),this._minimisedListener=()=>this.handleMinimised(),this._headerConfig=e.header;const I=t.layoutConfig.header,b=e.content;let S;if(1!==b.length)S=void 0;else{S=b[0].header}this._initialWantMaximise=e.maximised,this._initialActiveItemIndex=null!==(n=e.activeItemIndex)&&void 0!==n?n:0;const E=null!==(r=null!==(s=null===(o=this._headerConfig)||void 0===o?void 0:o.show)&&void 0!==s?s:null==S?void 0:S.show)&&void 0!==r?r:I.show,x=null!==(h=null!==(l=null===(a=this._headerConfig)||void 0===a?void 0:a.popout)&&void 0!==l?l:null==S?void 0:S.popout)&&void 0!==h?h:I.popout,L=null!==(m=null!==(c=null===(d=this._headerConfig)||void 0===d?void 0:d.maximise)&&void 0!==c?c:null==S?void 0:S.maximise)&&void 0!==m?m:I.maximise,z=null!==(g=null!==(p=null===(u=this._headerConfig)||void 0===u?void 0:u.close)&&void 0!==p?p:null==S?void 0:S.close)&&void 0!==g?g:I.close,M=null!==(_=null!==(v=null===(f=this._headerConfig)||void 0===f?void 0:f.minimise)&&void 0!==v?v:null==S?void 0:S.minimise)&&void 0!==_?_:I.minimise,P=null!==(w=null!==(C=null===(y=this._headerConfig)||void 0===y?void 0:y.tabDropdown)&&void 0!==C?C:null==S?void 0:S.tabDropdown)&&void 0!==w?w:I.tabDropdown;this._maximisedEnabled=!1!==L;const T={show:!1!==E,side:!1===E?nt.top:E,popoutEnabled:!1!==x,popoutLabel:!1===x?"":x,maximiseEnabled:this._maximisedEnabled,maximiseLabel:!1===L?"":L,closeEnabled:!1!==z,closeLabel:!1===z?"":z,minimiseEnabled:!0,minimiseLabel:M,tabDropdownEnabled:!1!==P,tabDropdownLabel:!1===P?"":P};this._header=new te(t,this,T,e.isClosable&&!1!==z,(()=>this.getActiveComponentItem()),(()=>this.remove()),(()=>this.handlePopoutEvent()),(()=>this.toggleMaximise()),(t=>this.handleHeaderClickEvent(t)),(t=>this.handleHeaderTouchStartEvent(t)),(t=>this.handleHeaderComponentRemoveEvent(t)),(t=>this.handleHeaderComponentFocusEvent(t)),((t,e,i,n)=>this.handleHeaderComponentStartDragEvent(t,e,i,n))),this.isStack=!0,this._childElementContainer=document.createElement("section"),this._childElementContainer.classList.add("lm_items"),this.on("resize",this._resizeListener),this._maximisedEnabled&&(this.on("maximised",this._maximisedListener),this.on("minimised",this._minimisedListener)),this.element.appendChild(this._header.element),this.element.appendChild(this._childElementContainer),this.setupHeaderPosition(),this._header.updateClosability()}get childElementContainer(){return this._childElementContainer}get header(){return this._header}get headerShow(){return this._header.show}get headerSide(){return this._header.side}get headerLeftRightSided(){return this._header.leftRightSided}get contentAreaDimensions(){return this._contentAreaDimensions}get initialWantMaximise(){return this._initialWantMaximise}get isMaximised(){return this===this.layoutManager.maximisedStack}get stackParent(){if(!this.parent)throw new Error("Stack should always have a parent");return this.parent}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}init(){if(!0===this.isInitialised)return;this.updateNodeSize();for(let t=0;t0){if(this._initialActiveItemIndex<0||this._initialActiveItemIndex>=e)throw new Error(`ActiveItemIndex out of range: ${this._initialActiveItemIndex} id: ${this.id}`);for(let i=0;ithis.contentItems.length)throw e-=1,new X("SAC99728");if(t instanceof jt)return e=super.addChild(t,e),this._childElementContainer.appendChild(t.element),this._header.createTab(t,e),this.setActiveComponentItem(t,i),this._header.updateTabSizes(),this.updateSize(!1),t.container.setBaseLogicalZIndex(),this._header.updateClosability(),this.emitStateChangedEvent(),e;throw new X("SACC88532")}removeChild(t,e){const i=t,n=this.contentItems.indexOf(i),o=1===this.contentItems.length;if(this._activeComponentItem===i&&(i.focused&&i.blur(),!o)){const t=0===n?1:n-1;this.setActiveComponentItem(this.contentItems[t],!1)}this._header.removeTab(i),super.removeChild(i,e),o||this._header.updateClosability(),this.emitStateChangedEvent()}toggleMaximise(){this.isMaximised?this.minimise():this.maximise()}maximise(){if(!this.isMaximised){this.layoutManager.setMaximisedStack(this);const t=this.contentItems,e=t.length;for(let i=0;i0&&void 0===t)throw new Error("expected non-empty stack to have an active component item");return{type:"stack",content:this.calculateConfigContent(),size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,isClosable:this.isClosable,maximised:this.isMaximised,header:this.createHeaderConfig(),activeItemIndex:t}}onDrop(t,e){if("header"===this._dropSegment){if(this.resetHeaderDropZone(),void 0===this._dropIndex)throw new J("SODDI68990");return void this.addChild(t,this._dropIndex)}if("body"===this._dropSegment)return void this.addChild(t,0,!0);const i="top"===this._dropSegment||"bottom"===this._dropSegment,n="left"===this._dropSegment||"right"===this._dropSegment,o="top"===this._dropSegment||"left"===this._dropSegment,s=i&&this.stackParent.isColumn||n&&this.stackParent.isRow;if(t.isComponent){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createAndInitContentItem(e,this);i.addChild(t),t=i}if(t.type===at.row||t.type===at.column){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}if(s){const e=this.stackParent.contentItems.indexOf(this);this.stackParent.addChild(t,o?e:e+1,!0),this.size*=.5,t.size=this.size,t.sizeUnit=this.sizeUnit,this.stackParent.updateSize(!1)}else{const e=i?at.column:at.row,n=ct.createDefault(e),s=this.layoutManager.createContentItem(n,this);this.stackParent.replaceChild(this,s),s.addChild(t,o?0:void 0,!0),s.addChild(this,o?void 0:0,!0),this.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}highlightDropZone(t,e){for(const i in this._contentAreaDimensions){const n=i,o=this._contentAreaDimensions[n].hoverArea;if(o.x1t&&o.y1e)return void("header"===n?(this._dropSegment="header",this.highlightHeaderDropZone(this._header.leftRightSided?e:t)):(this.resetHeaderDropZone(),this.highlightBodyDropZone(n)))}}getArea(){if("none"===this.element.style.display)return null;const t=super.getElementArea(this._header.element),e=super.getElementArea(this._childElementContainer);if(null===t||null===e)throw new K("SGAHC13086");const i=e.x2-e.x1,n=e.y2-e.y1;return this._contentAreaDimensions={header:{hoverArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2},highlightArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2}}},0===this.contentItems.length?(this._contentAreaDimensions.body={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2}},super.getElementArea(this.element)):(this._contentAreaDimensions.left={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x1+.25*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x1+.5*i,y2:e.y2}},this._contentAreaDimensions.top={hoverArea:{x1:e.x1+.25*i,y1:e.y1,x2:e.x1+.75*i,y2:e.y1+.5*n},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y1+.5*n}},this._contentAreaDimensions.right={hoverArea:{x1:e.x1+.75*i,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1+.5*i,y1:e.y1,x2:e.x2,y2:e.y2}},this._contentAreaDimensions.bottom={hoverArea:{x1:e.x1+.25*i,y1:e.y1+.5*n,x2:e.x1+.75*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1+.5*n,x2:e.x2,y2:e.y2}},super.getElementArea(this.element))}positionHeader(t){this._header.side!==t&&(this._header.setSide(t),this._headerSideChanged=!0,this.setupHeaderPosition())}updateNodeSize(){if("none"!==this.element.style.display){const t=kt(this.element);if(this._header.show){t[this._header.leftRightSided?it.width:it.height]-=this.layoutManager.layoutConfig.dimensions.headerHeight}this._childElementContainer.style.width=zt(t.width),this._childElementContainer.style.height=zt(t.height);for(let e=0;e=o&&t({...t,[e]:i});async function s(t,e){return(await Promise.all(e.map((async([e,i])=>[e,await t(i,e)])))).reduce(o,{})}n.mapEntriesAsync=s,n.mapValuesAsync=async function(t,e){let i;return i=e instanceof Map?[...e.entries()]:Object.entries(e),s(t,i)};var r,a,l,h,d=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldSet||function(t,e,i,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(t,i):o?o.value=i:e.set(t,i),i},c=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldGet||function(t,e,i,n){if("a"===i&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?n:"a"===i?n.call(t):n?n.value:e.get(t)};Object.defineProperty(i,"__esModule",{value:!0});var m=i.DefaultLayoutManager=void 0;const u=n;class p{constructor(t){a.set(this,void 0),l.set(this,new Map),d(this,a,t,"f")}size(){return c(this,l,"f").size}async applyLayoutSnapshot({layouts:t}){if(Object.keys(t).length>1)throw new Error("[LayoutManager] Tried to call applyLayoutSnapshot with more than 1 layout. When implementing multiple layouts via overridden LayoutManager class, you must override and fully implement the applyLayoutSnapshot method without calling super.applyLayoutSnapshot().");const[[e,i]]=Object.entries(t);await p.createLayout(this,{layoutName:e,layout:i})}async showLayout({layoutName:t}){}async getLayoutSnapshot(){return{layouts:await(0,u.mapValuesAsync)((t=>t.getFrameSnapshot()),c(this,l,"f"))}}async removeLayout({layoutName:t}){}getLayoutIdentityForView(t){const e=[...c(this,l,"f").values()].find((e=>e.getCurrentViews().some((e=>e.name===t.name&&e.uuid===t.uuid))));return e?.identity??void 0}isLayoutVisible({layoutName:t}){return c(p,r,"m",h).call(p,this,t).isVisible()}resolveLayoutIdentity(t){if(t&&"layoutName"in t)return t;const e=[...c(this,l,"f").values()];if(1===e.length)return e[0].identity;const i=e.find((t=>t.isVisible()));return i?.identity??void 0}static async resolveLayout(t,e){const i=t.resolveLayoutIdentity(e);if(void 0===i||!("layoutName"in i))throw new Error("[layout-manager] resolveLayout: Could not resolve the layout identity. Make sure you include 'layoutName' in the identity object.");return c(p,r,"m",h).call(p,t,i.layoutName)}static async handleSharedView(t,e,i){await(0,u.mapValuesAsync)((async t=>{if(t.identity.layoutName!==e.layoutName){const e=t.getCurrentViews().find((t=>t.name===i.name));e&&await t.onViewDetached({viewIdentity:e,target:null}).catch(console.error)}}),c(t,l,"f"))}static async handleLastViewRemoved(t,e){await t.removeLayout(e),await c(t,a,"f").handleLastViewRemoved(t)}static async destroyLayout(t,{layoutName:e}){await c(p,r,"m",h).call(p,t,e).destroy(),c(t,l,"f").delete(e)}static async createLayout(t,e){const{layoutName:i}=e;if(c(t,l,"f").has(i))throw new Error(`Layout name ${i} already exists`);await c(t,a,"f").createLayout(e,t)}static registerLayout(t,e,i){c(t,l,"f").set(e,i)}static getAllLayouts(t){return[...c(t,l,"f").values()]}static setInitialSnapshot(t,e){c(t,a,"f").setInitialSnapshot(e)}static createClosedConstructor(...t){return class extends p{constructor(){super(...t)}}}}m=i.DefaultLayoutManager=p,r=p,a=new WeakMap,l=new WeakMap,h=function(t,e){const i=c(t,l,"f").get(e);if(!i)throw new Error(`[layout-manager] getLayoutByName: Could not locate layout with name '${e}'`);return i};var g={},f={},v={};Object.defineProperty(v,"__esModule",{value:!0}),v.ReversibleMap=void 0;v.ReversibleMap=class{constructor(){this.valueToKey=new Map,this.keyToValue=new Map,this.setUnique=(t,e)=>{if(this.hasKey(t)||this.hasValue(e))throw new Error("Key or value already in the map.");this.keyToValue.set(t,e),this.valueToKey.set(e,t)},this.getKey=t=>{const e=this.valueToKey.get(t);if(!e)throw new Error("Value not found in the map.");return e},this.deleteKey=t=>{const e=this.getValue(t);return this.keyToValue.delete(t),this.valueToKey.delete(e),e},this.deleteValue=t=>{const e=this.getKey(t);return this.keyToValue.delete(e),this.valueToKey.delete(t),e},this.hasKey=t=>this.keyToValue.has(t),this.hasValue=t=>this.valueToKey.has(t)}getValue(t){const e=this.keyToValue.get(t);if(!e)throw new Error("Key not found in the map.");return e}},Object.defineProperty(f,"__esModule",{value:!0});var _=f.LayoutContentCache=void 0;const y=t.lazy,C=v;class w{constructor(){this.contentItemCache=new C.ReversibleMap,this.contentItemCacheId=0,this.createCacheKey=()=>{const t=`entity-${this.contentItemCacheId.toString()}`;return this.contentItemCacheId+=1,t},this.hasKey=t=>this.contentItemCache.hasKey(t),this.getItemOrUndefined=t=>{try{return this.getContentItemOrThrow(t)}catch(t){return}},this.getContentItemOrThrow=(t,e)=>{if(!this.contentItemCache.hasKey(t))throw new Error("Layout component has been destroyed or detached from the current layout.");const i=this.contentItemCache.getValue(t);if(e&&!e.includes(i.type))throw new Error(`Layout item is not the expected type. Expected ${e.join(", ")}, got ${i.type}.`);return i},this.getOrCreateEntityId=t=>{if(this.contentItemCache.hasValue(t))return this.contentItemCache.getKey(t);t.onDestroyed((()=>{this.contentItemCache.deleteValue(t)}));const e=this.createCacheKey();return this.contentItemCache.setUnique(e,t),e}}static getSingleInstance(){return w.singleton.getValue()}}_=f.LayoutContentCache=w,w.singleton=new y.Lazy((()=>new w));var I={},b={};!function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.getAdjacentStacks=t.doShareEdge=t.getAdjacentItem=void 0;t.getAdjacentItem=(e,i)=>{const{parent:n}=e;if(e.isRoot()||!n)return;const o=["top","bottom"].includes(i)?"column":"row",s=["top","left"].includes(i)?-1:1;if(n.type===o){const t=n.contentItems.indexOf(e)+s;if(t>=0&&t{const n=t.getBounds(),o=e.getBounds();if(!n||!o)return!1;if(["top","bottom"].includes(i)){return!(n.righto.right)}return!(n.bottomo.bottom)};t.getAdjacentStacks=(e,i)=>{const n=["top","bottom"].includes(i)?"row":"column",o=s=>"stack"===s.type?(0,t.doShareEdge)(e,s,i)?[s]:[]:"root"===s.type||"ground"===s.type?[]:s.type===n?s.contentItems.map((t=>o(t))).flat():s.type!==n?["top","right"].includes(i)?o(s.contentItems[s.contentItems.length-1]):o(s.contentItems[0]):[],s=(0,t.getAdjacentItem)(e,i);return s?o(s):[]}}(b);var S=t.commonjsGlobal&&t.commonjsGlobal.__decorate||function(t,e,i,n){var o,s=arguments.length,r=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(s<3?o(r):s>3?o(e,i,r):o(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};Object.defineProperty(I,"__esModule",{value:!0}),I.LayoutEntitiesController=void 0;const E=t.decorators,x=b,L=i;class z{constructor(t,e,i){this.wire=t,this.layoutManager=e,this.layoutContentCache=i,this.analytics=t=>{this.wire.sendAction(`layout-controller-${t}`).catch((()=>{}))},this.getLayoutIdentityForViewOrThrow=async t=>{const e=this.layoutManager.getLayoutIdentityForView(t);if(!e)throw new Error(`View identity ${t.name} is not attached to any layouts.`);return e},this.getRoot=async t=>{this.analytics("get-root");const e=(await this.getLayout(t)).getRoot();return{type:e.type,entityId:this.layoutContentCache.getOrCreateEntityId(e)}},this.getStackByView=async t=>{this.analytics("get-stack-by-view");const e=await this.getLayoutIdentityForViewOrThrow(t),i=(await this.getLayout(e)).getStackByView(t);if("stack"===i?.type)return{entityId:this.layoutContentCache.getOrCreateEntityId(i),type:"stack"}},this.getStackViews=t=>{this.analytics("get-stack-views");return this.layoutContentCache.getContentItemOrThrow(t,["stack"]).contentItems.map((t=>({name:t.viewName,uuid:this.wire.me.uuid})))},this.isRoot=t=>{this.analytics("is-root");return this.layoutContentCache.getContentItemOrThrow(t).isRoot()},this.exists=t=>(this.analytics("exists"),this.layoutContentCache.hasKey(t)),this.addViewToStack=async(t,e,{index:i}={index:0})=>{this.analytics("add-view-to-stack");const n=this.layoutContentCache.getContentItemOrThrow(t);if(i&&i>n.contentItems.length+1)throw new Error(`Index '${i}' out of range, please exclude the index or specify a number between 0 and ${n.contentItems.length}`);const o={id:t,index:i},{identity:s}=await n.layout.platformCreateView(e,{location:o});return s},this.findViewInStack=(t,e)=>t.contentItems.find((t=>t.viewName===e.name)),this.removeViewFromStack=async(t,e)=>{this.analytics("remove-view-from-stack");const i=this.layoutContentCache.getContentItemOrThrow(t,["stack"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to remove a view ('${e.name}') which does not belong to the stack.`);await n.layout.platformCloseView(e)},this.createAdjacentStack=async(t,e,{position:i="right"}={})=>{if(this.analytics("create-adjacent-stack"),!Array.isArray(e)||0===e.length)throw new Error('The parameter "views" must be an array with at least 1 element.');if(!["top","bottom","left","right"].includes(i))throw new Error(`Invalid position '${i}' specified.`);const n=this.layoutContentCache.getContentItemOrThrow(t).createAdjacentStack({position:i}),o=this.layoutContentCache.getOrCreateEntityId(n);return await Promise.all(e.reverse().map((t=>this.addViewToStack(o,t)))),o},this.getAdjacentStacks=async({targetId:t,edge:e})=>{this.analytics("get-adjacent-stacks");const i=this.layoutContentCache.getContentItemOrThrow(t);return(0,x.getAdjacentStacks)(i,e).map((t=>({entityId:this.layoutContentCache.getOrCreateEntityId(t)})))},this.setStackActiveView=async(t,e)=>{this.analytics("set-stack-active-view");const i=this.layoutContentCache.getContentItemOrThrow(t,["stack"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to set a view ('${e.name}') as active when it does not belong to the stack.`);i.setActiveContentItem(n,!0)}}async getLayout(t){const e=await L.DefaultLayoutManager.resolveLayout(this.layoutManager,t);if(!e)throw new Error(`Could not resolve target layout identity ${JSON.stringify(t)}`);return e}getContent(t){this.analytics("get-content");return this.layoutContentCache.getContentItemOrThrow(t,["column","row"]).contentItems.map((t=>({type:t.type,entityId:this.layoutContentCache.getOrCreateEntityId(t)})))}getParent(t){this.analytics("get-parent");const e=this.layoutContentCache.getContentItemOrThrow(t);if(!e.isRoot())return e.parent?.contentItems.includes(e)?{type:e.parent.type,entityId:this.layoutContentCache.getOrCreateEntityId(e.parent)}:void 0}}S([(0,E.expose)()],z.prototype,"getLayoutIdentityForViewOrThrow",void 0),S([(0,E.expose)()],z.prototype,"getRoot",void 0),S([(0,E.expose)()],z.prototype,"getStackByView",void 0),S([(0,E.expose)()],z.prototype,"getStackViews",void 0),S([(0,E.expose)()],z.prototype,"getContent",null),S([(0,E.expose)()],z.prototype,"getParent",null),S([(0,E.expose)()],z.prototype,"isRoot",void 0),S([(0,E.expose)()],z.prototype,"exists",void 0),S([(0,E.expose)()],z.prototype,"addViewToStack",void 0),S([(0,E.expose)()],z.prototype,"removeViewFromStack",void 0),S([(0,E.expose)()],z.prototype,"createAdjacentStack",void 0),S([(0,E.expose)()],z.prototype,"getAdjacentStacks",void 0),S([(0,E.expose)()],z.prototype,"setStackActiveView",void 0),I.LayoutEntitiesController=z,Object.defineProperty(g,"__esModule",{value:!0});var M=g.initLayoutEndpoints=void 0;const P=t.apiExposer,T=t.layout_constants,A=f,k=I,D=i;M=g.initLayoutEndpoints=async function(t,e){const i=t.getFin(),n=await i.Platform.getCurrentSync().getClient(),o=new P.ChannelsExposer(n);await new P.ApiExposer(o).exposeInstance(new k.LayoutEntitiesController(t,e,A.LayoutContentCache.getSingleInstance()),{id:T.LAYOUT_CONTROLLER_ID}),await async function(t,e){const i=t=>async i=>{const n=await D.DefaultLayoutManager.resolveLayout(e,i.target);if(!n)throw new Error(`Could not resolve the layout target from payload ${JSON.stringify(i)}`);return t(n,i)},n=(e,n)=>{t.register(e,i(n))},o=(t,e)=>{n(t,e)};n("replace-view",((t,e)=>t.replaceView(e))),n("replace-layout",((t,{layout:e})=>t.replaceLayout(e))),n("add-view",((t,e)=>t.insertView(e))),o("layout-add-view",((t,{viewOptions:e,location:i,targetView:n})=>t.platformCreateView(e,{location:i,targetView:n}))),n("close-view",((t,e)=>t.cleanupView(e.viewIdentity))),o("layout-close-view",((t,e)=>t.platformCloseView(e.viewIdentity))),n("apply-preset-layout",((t,e)=>t.applyPreset(e))),n("get-layout-views",(t=>t.getCurrentViews())),n("get-frame-snapshot",(t=>t.getFrameSnapshot())),n("is-visible",(t=>t.isVisible())),n("destroy",(t=>t.destroy())),t.register("get-layout-snapshot",(()=>e.getLayoutSnapshot()))}(n,e)};var R={};Object.defineProperty(R,"__esModule",{value:!0});var U=R.BaseLayout=void 0;U=R.BaseLayout=class{};var O={};Object.defineProperty(O,"__esModule",{value:!0});var V=O.DOMEmitter=void 0;V=O.DOMEmitter=class{constructor(t){this.container=t}dispatchLocalEvent(t,e){const i={...e,type:t,tabSelector:`tab-${e.name}`,containerSelector:`container-${e.name}`,topic:"openfin-DOM-event"};this.container.dispatchEvent(new CustomEvent(t,{detail:i}))}};var B={};Object.defineProperty(B,"__esModule",{value:!0});var H=B.mapLayoutContentItemsImmutableSync=B.mapLayoutContentItemsImmutable=W=B.isVisible=void 0;var W=B.isVisible=t=>(0!==t.offsetWidth||0!==t.offsetHeight)&&"hidden"!==window.getComputedStyle(t).visibility&&t.offsetTop>=0&&t.offsetLeft>=0&&t.offsetTop<=window.innerHeight&&t.offsetLeft<=window.innerWidth;const F=t=>"type"in t&&"component"===t.type;B.mapLayoutContentItemsImmutable=async function t(e,i){return F(i)?e(i):{...i,content:await Promise.all(i.content?.map((i=>t(e,i))))}},H=B.mapLayoutContentItemsImmutableSync=function t(e,i){return F(i)?e(i):{...i,content:i.content?.map((i=>t(e,i)))}};class N extends Error{constructor(t,e){super(e),this.type=t}}class G extends N{constructor(t,e){super("Configuration",t),this.node=e}}class j extends N{constructor(t){super("PopoutBlocked",t)}}class $ extends N{constructor(t){super("API",t)}}class Z extends N{constructor(t){super("Bind",t)}}class q extends Error{constructor(t,e,i){super(`${t}: ${e}${void 0===i?"":": "+i}`)}}class X extends q{constructor(t,e){super("Assert",t,e)}}class Y extends q{constructor(t,e,i){super("UnreachableCase",t,`${e}${void 0===i?"":": "+i}`)}}class K extends q{constructor(t,e){super("UnexpectedNull",t,e)}}class J extends q{constructor(t,e){super("UnexpectedUndefined",t,e)}}var Q;!function(t){let e=!1;const i={PopoutCannotBeCreatedWithGroundItemConfig:{id:0,default:"Popout cannot be created with ground ItemConfig"},PleaseRegisterAConstructorFunction:{id:1,default:"Please register a constructor function"},ComponentTypeNotRegisteredAndBindComponentEventHandlerNotAssigned:{id:2,default:"Component type not registered and BindComponentEvent handler not assigned"},ComponentIsAlreadyRegistered:{id:3,default:"Component is already registered"},ComponentIsNotVirtuable:{id:4,default:"Component is not virtuable. Requires rootHtmlElement field/getter"},VirtualComponentDoesNotHaveRootHtmlElement:{id:5,default:'Virtual component does not have getter "rootHtmlElement"'},ItemConfigIsNotTypeComponent:{id:6,default:"ItemConfig is not of type component"},InvalidNumberPartInSizeString:{id:7,default:"Invalid number part in size string"},UnknownUnitInSizeString:{id:8,default:"Unknown unit in size string"},UnsupportedUnitInSizeString:{id:9,default:"Unsupported unit in size string"}};t.idCount=Object.keys(i).length;const n=Object.values(i);t.checkInitialise=function(){if(!e)for(let e=0;e="0"&&t<="9"}function Tt(t,e){const i=zt(e);t.style.width=i}function At(t,e){const i=zt(e);t.style.height=i}function kt(t){return{width:t.offsetWidth,height:t.offsetHeight}}function Dt(t,e){t.style.display=e?"":"none"}function Rt(t,e){if(void 0!==e)for(const i in e)if(e.hasOwnProperty(i)){const n=e[i],o=t[i];t[i]=Ut(o,n)}return t}function Ut(t,e){if("object"!=typeof e)return e;if(Array.isArray(e)){const t=e.length,i=new Array(t);for(let n=0;n36)throw new Error("Too many keys in config minifier map")},t.translateObject=n}(dt||(dt={})),function(t){t.defaults={type:at.ground,content:[],size:1,sizeUnit:ht.Fractional,minSize:void 0,minSizeUnit:ht.Pixel,id:"",isClosable:!0},t.createCopy=function(t,e){switch(t.type){case at.ground:case at.row:case at.column:return gt.createCopy(t,e);case at.stack:return ut.createCopy(t,e);case at.component:return pt.createCopy(t);default:throw new Y("CICC91354",t.type,"Invalid Config Item type specified")}},t.createDefault=function(t){switch(t){case at.ground:throw new X("CICCDR91562");case at.row:case at.column:return gt.createDefault(t);case at.stack:return ut.createDefault();case at.component:return pt.createDefault();default:throw new Y("CICCDD91563",t,"Invalid Config Item type specified")}},t.isComponentItem=function(t){return t.type===at.component},t.isStackItem=function(t){return t.type===at.stack},t.isGroundItem=function(t){return t.type===at.ground}}(ct||(ct={})),function(t){t.defaultMaximised=!1,function(t){t.createCopy=function(t,e){return void 0===t?void 0:{show:null!=e?e:t.show,popout:t.popout,close:t.close,maximise:t.maximise,minimise:t.minimise,tabDropdown:t.tabDropdown}}}(t.Header||(t.Header={}))}(mt||(mt={})),function(t){function e(t){const e=t.length,i=new Array(e);for(let n=0;n"__glMaximised"===t));t>0&&(o=!0,n=n.splice(t,1)),e=n.length>0?n[0]:ct.defaults.id}else e=n;return i=void 0!==t.maximised?t.maximised:o,{id:e,maximised:i}}}(wt||(wt={})),function(t){function e(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0;return{resolved:!0,root:Et.resolve(i),openPopouts:t.resolveOpenPopouts(e.openPopouts),dimensions:t.Dimensions.resolve(e.dimensions),settings:t.Settings.resolve(e.settings),header:t.Header.resolve(e.header,e.settings,e.labels)}}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:Lt.fromResolvedArray(e.openPopouts),settings:_t.Settings.createCopy(e.settings),dimensions:t.Dimensions.fromResolved(e.dimensions),header:_t.Header.createCopy(e.header)}},t.isResolved=function(t){const e=t;return void 0!==e.resolved&&!0===e.resolved},t.resolveOpenPopouts=function(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0,{root:Et.resolve(o),openPopouts:xt.resolveOpenPopouts(e.openPopouts),dimensions:xt.Dimensions.resolve(e.dimensions),settings:xt.Settings.resolve(e.settings),header:xt.Header.resolve(e.header,e.settings,e.labels),parentId:null!==(i=e.parentId)&&void 0!==i?i:null,indexInParent:null!==(n=e.indexInParent)&&void 0!==n?n:null,window:t.Window.resolve(e.window,e.dimensions),resolved:!0}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:i(e.openPopouts),dimensions:xt.Dimensions.fromResolved(e.dimensions),settings:_t.Settings.createCopy(e.settings),header:_t.Header.createCopy(e.header),parentId:e.parentId,indexInParent:e.indexInParent,window:t.Window.fromResolved(e.window)}},t.fromResolvedArray=i}(Lt||(Lt={}));class Wt{constructor(){this._allEventSubscriptions=[],this._subscriptionsMap=new Map,this.unbind=this.removeEventListener,this.trigger=this.emit}tryBubbleEvent(t,e){}emit(t,...e){let i=this._subscriptionsMap.get(t);if(void 0!==i){i=i.slice();for(let t=0;t0){const n=e.slice();n.unshift(t);const o=this._allEventSubscriptions.slice();for(let t=0;t0?n.contentItems[0]:n,e=0);const o=this._layoutManager.createAndInitContentItem(i,t);t.addChild(o,e),this._layoutManager.layoutConfig.settings.popInOnClose?this._onClose():this.close()}createWindow(){const t=this.createUrl(),e=Math.floor(1e6*Math.random()).toString(36),i=this.serializeWindowFeatures({width:this._initialWindowSize.width,height:this._initialWindowSize.height,innerWidth:this._initialWindowSize.width,innerHeight:this._initialWindowSize.height,menubar:"no",toolbar:"no",location:"no",personalbar:"no",resizable:"yes",scrollbars:"no",status:"no"});if(this._popoutWindow=globalThis.open(t,e,i),this._popoutWindow)this._popoutWindow.addEventListener("load",(()=>this.positionWindow()),{passive:!0}),this._popoutWindow.addEventListener("beforeunload",(()=>{this._layoutManager.layoutConfig.settings.popInOnClose?this.popIn():this._onClose()}),{passive:!0}),this._checkReadyInterval=setInterval((()=>this.checkReady()),10);else if(!0===this._layoutManager.layoutConfig.settings.blockedPopoutsThrowError){throw new j("Popout blocked")}}checkReady(){if(null===this._popoutWindow)throw new K("BPCR01844");this._popoutWindow.__glInstance&&this._popoutWindow.__glInstance.isInitialised&&(this.onInitialised(),void 0!==this._checkReadyInterval&&(clearInterval(this._checkReadyInterval),this._checkReadyInterval=void 0))}serializeWindowFeatures(t){const e=[];for(const i in t)e.push(i+"="+t[i].toString());return e.join(",")}createUrl(){const t="gl-window-config-"+Ot(),e=_t.minifyConfig(this._config);try{localStorage.setItem(t,JSON.stringify(e))}catch(t){throw new Error("Error while writing to localStorage "+function(t){return t instanceof Error?t.message:"string"==typeof t?t:"Unknown Error"}(t))}const i=new URL(location.href);return i.searchParams.set("gl-window",t),i.toString()}positionWindow(){if(null===this._popoutWindow)throw new Error("BrowserPopout.positionWindow: null popoutWindow");this._popoutWindow.moveTo(this._initialWindowSize.left,this._initialWindowSize.top),this._popoutWindow.focus()}onInitialised(){this._isInitialised=!0,this.getGlInstance().on("popIn",(()=>this.popIn())),this.emit("initialised")}_onClose(){setTimeout((()=>this.emit("closed")),50)}}class Gt extends Wt{constructor(t,e,i,n){super(),this.layoutManager=t,this._parent=i,this._element=n,this._popInParentIds=[],this._type=e.type,this._id=e.id,this._isInitialised=!1,this.isGround=!1,this.isRow=!1,this.isColumn=!1,this.isStack=!1,this.isComponent=!1,this.size=e.size,this.sizeUnit=e.sizeUnit,this.minSize=e.minSize,this.minSizeUnit=e.minSizeUnit,this._isClosable=e.isClosable,this._pendingEventPropagations={},this._throttledEvents=["stateChanged"],this._contentItems=this.createContentItems(e.content)}get type(){return this._type}get id(){return this._id}set id(t){this._id=t}get popInParentIds(){return this._popInParentIds}get parent(){return this._parent}get contentItems(){return this._contentItems}get isClosable(){return this._isClosable}get element(){return this._element}get isInitialised(){return this._isInitialised}static isStack(t){return t.isStack}static isComponentItem(t){return t.isComponent}static isComponentParentableItem(t){return t.isStack||t.isGround}removeChild(t,e=!1){const i=this._contentItems.indexOf(t);if(-1===i)throw new Error("Can't remove child item. Unknown content item");if(e||this._contentItems[i].destroy(),this._contentItems.splice(i,1),this._contentItems.length>0)this.updateSize(!1);else if(!this.isGround&&!0===this._isClosable){if(null===this._parent)throw new K("CIUC00874");this._parent.removeChild(this)}}addChild(t,e,i){return null!=e||(e=this._contentItems.length),this._contentItems.splice(e,0,t),t.setParent(this),!0===this._isInitialised&&!1===t._isInitialised&&t.init(),e}replaceChild(t,e,i=!1){const n=this._contentItems.indexOf(t),o=t._element.parentNode;if(-1===n)throw new X("CIRCI23232","Can't replace child. oldChild is not child of this");if(null===o)throw new K("CIRCP23232");if(o.replaceChild(e._element,t._element),!0===i&&(t._parent=null,t.destroy()),this._contentItems[n]=e,e.setParent(this),e.size=t.size,e.sizeUnit=t.sizeUnit,e.minSize=t.minSize,e.minSizeUnit=t.minSizeUnit,null===e._parent)throw new K("CIRCNC45699");!0===e._parent._isInitialised&&!1===e._isInitialised&&e.init(),this.updateSize(!1)}remove(){if(null===this._parent)throw new K("CIR11110");this._parent.removeChild(this)}popout(){const t=Ot(),e=this.layoutManager.createPopoutFromContentItem(this,void 0,t,void 0);return this.emitBaseBubblingEvent("stateChanged"),e}calculateConfigContent(){const t=this._contentItems,e=t.length,i=new Array(e);for(let n=0;nthis.propagateEventToLayoutManager(t,e))))}propagateEventToLayoutManager(t,e){this._pendingEventPropagations[t]=!1,this.layoutManager.emitUnknown(t,e)}}class jt extends Gt{constructor(t,e,i){super(t,e,i,document.createElement("div")),this._parentItem=i,this._focused=!1,this.isComponent=!0,this._reorderEnabled=e.reorderEnabled,this.applyUpdatableConfig(e),this._initialWantMaximise=e.maximised;const n=document.createElement("div");n.classList.add("lm_content"),this.element.appendChild(n),this._container=new Ft(e,this,t,n,(t=>this.handleUpdateItemConfigEvent(t)),(()=>this.show()),(()=>this.hide()),(t=>this.focus(t)),(t=>this.blur(t)))}get componentName(){return this._container.componentType}get componentType(){return this._container.componentType}get reorderEnabled(){return this._reorderEnabled}get initialWantMaximise(){return this._initialWantMaximise}get component(){return this._container.component}get container(){return this._container}get parentItem(){return this._parentItem}get headerConfig(){return this._headerConfig}get title(){return this._title}get tab(){return this._tab}get focused(){return this._focused}destroy(){this._container.destroy(),super.destroy()}applyUpdatableConfig(t){this.setTitle(t.title),this._headerConfig=t.header}toConfig(){const t=this._container.stateRequestEvent,e=void 0===t?this._container.state:t();return{type:at.component,content:[],size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,maximised:!1,isClosable:this.isClosable,reorderEnabled:this._reorderEnabled,title:this._title,header:mt.Header.createCopy(this._headerConfig),componentType:pt.copyComponentType(this.componentType),componentState:e}}close(){if(null===this.parent)throw new K("CIC68883");this.parent.removeChild(this,!1)}enterDragMode(t,e){Tt(this.element,t),At(this.element,e),this._container.enterDragMode(t,e)}exitDragMode(){this._container.exitDragMode()}enterStackMaximised(){this._container.enterStackMaximised()}exitStackMaximised(){this._container.exitStackMaximised()}drag(){this._container.drag()}updateSize(t){this.updateNodeSize(t)}init(){this.updateNodeSize(!1),super.init(),this._container.emit("open"),this.initContentItems()}setTitle(t){this._title=t,this.emit("titleChanged",t),this.emit("stateChanged")}setTab(t){this._tab=t,this.emit("tab",t),this._container.setTab(t)}hide(){super.hide(),this._container.setVisibility(!1)}show(){super.show(),this._container.setVisibility(!0)}focus(t=!1){this.parentItem.setActiveComponentItem(this,!0,t)}setFocused(t){this._focused=!0,this.tab.setFocused(),t||this.emitBaseBubblingEvent("focus")}blur(t=!1){this._focused&&this.layoutManager.setFocusedComponentItem(void 0,t)}setBlurred(t){this._focused=!1,this.tab.setBlurred(),t||this.emitBaseBubblingEvent("blur")}setParent(t){this._parentItem=t,super.setParent(t)}handleUpdateItemConfigEvent(t){this.applyUpdatableConfig(t)}updateNodeSize(t){if("none"!==this.element.style.display){const{width:e,height:i}=kt(this.element);this._container.setSizeToNodeSize(e,i,t)}}}class $t extends Gt{constructor(){super(...arguments),this._focused=!1}get focused(){return this._focused}setFocusedValue(t){this._focused=t}}class Zt extends Wt{constructor(t,e){super(),this._eElement=t,this._pointerTracking=!1,this._pointerDownEventListener=t=>this.onPointerDown(t),this._pointerMoveEventListener=t=>this.onPointerMove(t),this._pointerUpEventListener=t=>this.onPointerUp(t),this._timeout=void 0,this._allowableTargets=[t,...e],this._oDocument=document,this._eBody=document.body,this._nDelay=1800,this._nDistance=10,this._nX=0,this._nY=0,this._nOriginalX=0,this._nOriginalY=0,this._dragging=!1,this._eElement.addEventListener("pointerdown",this._pointerDownEventListener,{passive:!0})}destroy(){this.checkRemovePointerTrackingEventListeners(),this._eElement.removeEventListener("pointerdown",this._pointerDownEventListener)}cancelDrag(){this.processDragStop(void 0)}onPointerDown(t){if(this._allowableTargets.includes(t.target)&&t.isPrimary){const e=this.getPointerCoordinates(t);this.processPointerDown(e)}}processPointerDown(t){this._nOriginalX=t.x,this._nOriginalY=t.y,this._oDocument.addEventListener("pointermove",this._pointerMoveEventListener),this._oDocument.addEventListener("pointerup",this._pointerUpEventListener,{passive:!0}),this._pointerTracking=!0,this._timeout=setTimeout((()=>{try{this.startDrag()}catch(t){throw console.error(t),t}}),this._nDelay)}onPointerMove(t){this._pointerTracking&&(this.processDragMove(t),t.preventDefault())}processDragMove(t){this._nX=t.pageX-this._nOriginalX,this._nY=t.pageY-this._nOriginalY,!1===this._dragging&&(Math.abs(this._nX)>this._nDistance||Math.abs(this._nY)>this._nDistance)&&this.startDrag(),this._dragging&&this.emit("drag",this._nX,this._nY,t)}onPointerUp(t){this.processDragStop(t)}processDragStop(t){var e;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this.checkRemovePointerTrackingEventListeners(),!0===this._dragging&&(this._eBody.classList.remove("lm_dragging"),this._eElement.classList.remove("lm_dragging"),null===(e=this._oDocument.querySelector("iframe"))||void 0===e||e.style.setProperty("pointer-events",""),this._dragging=!1,this.emit("dragStop",t))}checkRemovePointerTrackingEventListeners(){this._pointerTracking&&(this._oDocument.removeEventListener("pointermove",this._pointerMoveEventListener),this._oDocument.removeEventListener("pointerup",this._pointerUpEventListener),this._pointerTracking=!1)}startDrag(){var t;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this._dragging=!0,this._eBody.classList.add("lm_dragging"),this._eElement.classList.add("lm_dragging"),null===(t=this._oDocument.querySelector("iframe"))||void 0===t||t.style.setProperty("pointer-events","none"),this.emit("dragStart",this._nOriginalX,this._nOriginalY)}getPointerCoordinates(t){return{x:t.pageX,y:t.pageY}}}class qt{constructor(t,e,i){this._isVertical=t,this._size=e,this._grabSize=i0){const i=this.createSplitter(Math.max(0,e-1)).element;e>0?(this.contentItems[e-1].element.insertAdjacentElement("afterend",i),i.insertAdjacentElement("afterend",t.element)):(this.contentItems[0].element.insertAdjacentElement("beforebegin",i),i.insertAdjacentElement("beforebegin",t.element))}else this._childElementContainer.appendChild(t.element);super.addChild(t,e);const n=1/this.contentItems.length*100;if(!0===i)return this.emitBaseBubblingEvent("stateChanged"),e;for(let e=0;e0&&(this.calculateRelativeSizes(),this.setAbsoluteSizes()),this.emitBaseBubblingEvent("stateChanged"),this.emit("resize")}setAbsoluteSizes(){const t=this.calculateAbsoluteSizes();for(let e=0;e0&&t.itemSizes[e]++,this._isColumn?(Tt(this.contentItems[e].element,t.crossAxisSize),At(this.contentItems[e].element,t.itemSizes[e])):(Tt(this.contentItems[e].element,t.itemSizes[e]),At(this.contentItems[e].element,t.crossAxisSize))}calculateAbsoluteSizes(){const t=(this.contentItems.length-1)*this._splitterSize,{width:e,height:i}=kt(this.element);let n,o;this._isColumn?(n=i-t,o=e):(n=e-t,o=i);let s=0;const r=[];for(let t=0;t0){const n=100-t;for(let t=0;t100&&e.length>0){for(let t=0;te)return;{const r=i/e;let a=i;for(let e=0;ethis.onSplitterDrag(e,t,i))),e.on("dragStop",(()=>this.onSplitterDragStop(e))),e.on("dragStart",(()=>this.onSplitterDragStart(e))),this._splitter.splice(t,0,e),e}getSplitItems(t){const e=this._splitter.indexOf(t);return{before:this.contentItems[e],after:this.contentItems[e+1]}}calculateContentItemMinSize(t){const e=t.minSize;if(void 0!==e){if(t.minSizeUnit===ht.Pixel)return e;throw new X("ROCGMD98831",JSON.stringify(t))}{const t=this.layoutManager.layoutConfig.dimensions;return this._isColumn?t.defaultMinItemHeight:t.defaultMinItemWidth}}calculateContentItemsTotalMinSize(t){let e=0;for(const i of t)e+=this.calculateContentItemMinSize(i);return e}onSplitterDragStart(t){const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=this.calculateContentItemsTotalMinSize(e.before.contentItems),s=this.calculateContentItemsTotalMinSize(e.after.contentItems);this._splitterPosition=0,this._splitterMinPosition=-1*(i-o),this._splitterMaxPosition=n-s}onSplitterDrag(t,e,i){let n=this._isColumn?i:e;if(null===this._splitterMinPosition||null===this._splitterMaxPosition)throw new K("ROCOSD59226");n=Math.max(n,this._splitterMinPosition),n=Math.min(n,this._splitterMaxPosition),this._splitterPosition=n;const o=zt(n);this._isColumn?t.element.style.top=o:t.element.style.left=o}onSplitterDragStop(t){if(null===this._splitterPosition)throw new K("ROCOSDS66932");{const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=(this._splitterPosition+i)/(i+n),s=e.before.size+e.after.size;e.before.size=o*s,e.after.size=(1-o)*s,t.element.style.top=zt(0),t.element.style.left=zt(0),globalThis.requestAnimationFrame((()=>this.updateSize(!1)))}}}!function(t){t.getElementDimensionSize=function(t,e){return"width"===e?function(t){return t.offsetWidth}(t):function(t){return t.offsetHeight}(t)},t.setElementDimensionSize=function(t,e,i){return"width"===e?Tt(t,i):At(t,i)},t.createElement=function(t,e){const i=t.createElement("div");return i.classList.add("lm_item"),e?i.classList.add("lm_column"):i.classList.add("lm_row"),i}}(Xt||(Xt={}));class Yt extends $t{constructor(t,e,i){super(t,vt.create(e),null,Yt.createElement(document)),this.isGround=!0,this._childElementContainer=this.element,this._containerElement=i;let n=null;for(;;){const t=n?n.previousSibling:this._containerElement.lastChild;if(!(t instanceof Element&&t.classList.contains("lm_content")))break;n=t}this._containerElement.insertBefore(this.element,n)}init(){if(!0!==this.isInitialised){this.updateNodeSize();for(let t=0;t0?this.contentItems[0]:this,n.isComponent)throw new Error("Cannot add item as child to ComponentItem");{const t=this.layoutManager.createAndInitContentItem(i,n);return e=n.addChild(t,e),n===this?-1:e}}loadComponentAsRoot(t){this.clearRoot();const e=Ct.resolve(t,!1);if(e.maximised)throw new Error("Root Component cannot be maximised");{const t=new jt(this.layoutManager,e,this);t.init(),this.addChild(t,0)}}addChild(t,e){if(this.contentItems.length>0)throw new Error("Ground node can only have a single child");return this._childElementContainer.appendChild(t.element),e=super.addChild(t,e),this.updateSize(!1),this.emitBaseBubblingEvent("stateChanged"),e}calculateConfigContent(){const t=this.contentItems,e=t.length,i=new Array(e);for(let n=0;n0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e)),this.updateContentItemsSize(!1))}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}createSideAreas(){const t=Yt.Area.oppositeSides,e=new Array(Object.keys(t).length);let i=0;for(const n in t){const o=n,s=this.getElementArea();if(null===s)throw new K("RCSA77553");s.side=o,"2"===t[o][1]?s[o]=s[t[o]]-50:s[o]=s[t[o]]+50,s.surface=(s.x2-s.x1)*(s.y2-s.y1),e[i++]=s}return e}highlightDropZone(t,e,i){this.layoutManager.tabDropPlaceholder.remove(),super.highlightDropZone(t,e,i)}onDrop(t,e){if(t.isComponent){const e=ut.createDefault(),i=t;e.header=mt.Header.createCopy(i.headerConfig);const n=this.layoutManager.createAndInitContentItem(e,this);n.addChild(t),t=n}if(0===this.contentItems.length)this.addChild(t);else{if(t.type===at.row||t.type===at.column){const e=ut.createDefault(),i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}const i="x"==e.side[0]?at.row:at.column,n="2"==e.side[1],o=this.contentItems[0];if(o instanceof Xt&&o.type===i){const e=o.contentItems[n?0:o.contentItems.length-1];o.addChild(t,n?0:void 0,!0),e.size*=.5,t.size=e.size,t.sizeUnit=ht.Percent,o.updateSize(!1)}else{const e=ct.createDefault(i),s=this.layoutManager.createContentItem(e,this);this.replaceChild(o,s),s.addChild(t,n?0:void 0,!0),s.addChild(o,n?void 0:0,!0),o.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}}dock(){throw new X("GID87731")}validateDocking(){throw new X("GIVD87732")}getAllContentItems(){const t=[this];return this.deepGetAllContentItems(this.contentItems,t),t}getConfigMaximisedItems(){const t=[];return this.deepFilterContentItems(this.contentItems,t,(t=>!(!Gt.isStack(t)||!t.initialWantMaximise)||!(!Gt.isComponentItem(t)||!t.initialWantMaximise))),t}getItemsByPopInParentId(t){const e=[];return this.deepFilterContentItems(this.contentItems,e,(e=>e.popInParentIds.includes(t))),e}toConfig(){throw new Error("Cannot generate GroundItem config")}setActiveComponentItem(t,e,i){}updateNodeSize(){const{width:t,height:e}=kt(this._containerElement);Tt(this.element,t),At(this.element,e),this.contentItems.length>0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e))}deepGetAllContentItems(t,e){for(let i=0;ithis.onClick(t),this._touchStartEventListener=t=>this.onTouchStart(t),this._element=document.createElement("div"),this._element.classList.add(i),this._element.title=e,this._header.on("destroy",(()=>this.destroy())),this._element.addEventListener("click",this._clickEventListener,{passive:!0}),this._element.addEventListener("touchstart",this._touchStartEventListener,{passive:!0}),this._header.controlsContainerElement.appendChild(this._element)}get element(){return this._element}destroy(){var t;this._element.removeEventListener("click",this._clickEventListener),this._element.removeEventListener("touchstart",this._touchStartEventListener),null===(t=this._element.parentNode)||void 0===t||t.removeChild(this._element)}onClick(t){this._pushEvent(t)}onTouchStart(t){this._pushEvent(t)}}class Jt{constructor(t,e,i,n,o){var s;this._layoutManager=t,this._componentItem=e,this._closeEvent=i,this._focusEvent=n,this._dragStartEvent=o,this._isActive=!1,this._tabClickListener=t=>this.onTabClickDown(t),this._tabTouchStartListener=t=>this.onTabTouchStart(t),this._closeClickListener=()=>this.onCloseClick(),this._closeTouchStartListener=()=>this.onCloseTouchStart(),this._dragStartListener=(t,e)=>this.onDragStart(t,e),this._contentItemDestroyListener=()=>this.onContentItemDestroy(),this._tabTitleChangedListener=t=>this.setTitle(t),this._element=document.createElement("div"),this._element.classList.add("lm_tab"),this._titleElement=document.createElement("span"),this._titleElement.classList.add("lm_title"),this._closeElement=document.createElement("div"),this._closeElement.classList.add("lm_close_tab"),this._element.appendChild(this._titleElement),this._element.appendChild(this._closeElement),e.isClosable?this._closeElement.style.display="":this._closeElement.style.display="none",this.setTitle(e.title),this._componentItem.on("titleChanged",this._tabTitleChangedListener);(null!==(s=e.reorderEnabled)&&void 0!==s?s:this._layoutManager.layoutConfig.settings.reorderEnabled)&&this.enableReorder(),this._element.addEventListener("click",this._tabClickListener,{passive:!0}),this._element.addEventListener("touchstart",this._tabTouchStartListener,{passive:!0}),this._componentItem.isClosable?(this._closeElement.addEventListener("click",this._closeClickListener,{passive:!0}),this._closeElement.addEventListener("touchstart",this._closeTouchStartListener,{passive:!0})):(this._closeElement.remove(),this._closeElement=void 0),this._componentItem.setTab(this),this._layoutManager.emit("tabCreated",this)}get isActive(){return this._isActive}get componentItem(){return this._componentItem}get contentItem(){return this._componentItem}get element(){return this._element}get titleElement(){return this._titleElement}get closeElement(){return this._closeElement}get reorderEnabled(){return void 0!==this._dragListener}set reorderEnabled(t){t!==this.reorderEnabled&&(t?this.enableReorder():this.disableReorder())}setTitle(t){this._titleElement.innerText=t,this._element.title=t}setActive(t){t!==this._isActive&&(this._isActive=t,t?this._element.classList.add("lm_active"):this._element.classList.remove("lm_active"))}destroy(){var t,e;this._closeEvent=void 0,this._focusEvent=void 0,this._dragStartEvent=void 0,this._element.removeEventListener("click",this._tabClickListener),this._element.removeEventListener("touchstart",this._tabTouchStartListener),null===(t=this._closeElement)||void 0===t||t.removeEventListener("click",this._closeClickListener),null===(e=this._closeElement)||void 0===e||e.removeEventListener("touchstart",this._closeTouchStartListener),this._componentItem.off("titleChanged",this._tabTitleChangedListener),this.reorderEnabled&&this.disableReorder(),this._element.remove()}setBlurred(){this._element.classList.remove("lm_focused"),this._titleElement.classList.remove("lm_focused")}setFocused(){this._element.classList.add("lm_focused"),this._titleElement.classList.add("lm_focused")}onDragStart(t,e){if(void 0===this._dragListener)throw new J("TODSDLU10093");if(void 0===this._dragStartEvent)throw new J("TODS23309");this._dragStartEvent(t,e,this._dragListener,this.componentItem)}onContentItemDestroy(){void 0!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=void 0)}onTabClickDown(t){const e=t.target;e!==this._element&&e!==this._titleElement||(0===t.button?this.notifyFocus():1===t.button&&this._componentItem.isClosable&&this.notifyClose())}onTabTouchStart(t){t.target===this._element&&this.notifyFocus()}onCloseClick(){this.notifyClose()}onCloseTouchStart(){this.notifyClose()}notifyClose(){if(void 0===this._closeEvent)throw new J("TNC15007");this._closeEvent(this._componentItem)}notifyFocus(){if(void 0===this._focusEvent)throw new J("TNA15007");this._focusEvent(this._componentItem)}enableReorder(){this._dragListener=new Zt(this._element,[this._titleElement]),this._dragListener.on("dragStart",this._dragStartListener),this._componentItem.on("destroy",this._contentItemDestroyListener)}disableReorder(){if(void 0===this._dragListener)throw new J("TDR87745");this._componentItem.off("destroy",this._contentItemDestroyListener),this._dragListener.off("dragStart",this._dragStartListener),this._dragListener=void 0}}class Qt{constructor(t,e,i,n,o){this._layoutManager=t,this._componentRemoveEvent=e,this._componentFocusEvent=i,this._componentDragStartEvent=n,this._dropdownActiveChangedEvent=o,this._tabs=[],this._lastVisibleTabIndex=-1,this._dropdownActive=!1,this._element=document.createElement("section"),this._element.classList.add("lm_tabs"),this._dropdownElement=document.createElement("section"),this._dropdownElement.classList.add("lm_tabdropdown_list"),this._dropdownElement.style.display="none"}get tabs(){return this._tabs}get tabCount(){return this._tabs.length}get lastVisibleTabIndex(){return this._lastVisibleTabIndex}get element(){return this._element}get dropdownElement(){return this._dropdownElement}get dropdownActive(){return this._dropdownActive}destroy(){for(let t=0;tthis.handleTabCloseEvent(t)),(t=>this.handleTabFocusEvent(t)),((t,e,i,n)=>this.handleTabDragStartEvent(t,e,i,n)));void 0===e&&(e=this._tabs.length),this._tabs.splice(e,0,i),ethis._lastVisibleTabIndex){const t=this._tabs[e];for(let t=e;t>0;t--)this._tabs[t]=this._tabs[t-1];this._tabs[0]=t}}updateTabSizes(t,e){let i=!1;this.tryUpdateTabSizes(i,t,e)||(i=!0,this.tryUpdateTabSizes(i,t,e)),i!==this._dropdownActive&&(this._dropdownActive=i,this._dropdownActiveChangedEvent())}tryUpdateTabSizes(t,e,i){if(this._tabs.length>0){if(void 0===i)throw new Error("non-empty tabs must have active component item");let n=0,o=!1;const s=this._layoutManager.layoutConfig.settings.tabOverlapAllowance,r=this._tabs.indexOf(i.tab),a=this._tabs[r];this._lastVisibleTabIndex=-1;for(let i=0;ie){if(o)i===r&&(l.style.zIndex="auto",l.style.marginLeft="",l.parentElement!==this._element&&this._element.appendChild(l));else{let t;if(t=r>0&&r<=i?(d-e)/(i-1):(d-e)/i,tthis.onClick(t),this._touchStartListener=t=>this.onTouchStart(t),this._rowColumnClosable=!0,this._closeButton=null,this._popoutButton=null,this._tabsContainer=new Qt(this._layoutManager,(t=>this.handleTabInitiatedComponentRemoveEvent(t)),(t=>this.handleTabInitiatedComponentFocusEvent(t)),((t,e,i,n)=>this.handleTabInitiatedDragStartEvent(t,e,i,n)),(()=>this.processTabDropdownActiveChanged())),this._show=i.show,this._popoutEnabled=i.popoutEnabled,this._popoutLabel=i.popoutLabel,this._maximiseEnabled=i.maximiseEnabled,this._maximiseLabel=i.maximiseLabel,this._minimiseEnabled=i.minimiseEnabled,this._minimiseLabel=i.minimiseLabel,this._closeEnabled=i.closeEnabled,this._closeLabel=i.closeLabel,this._tabDropdownEnabled=i.tabDropdownEnabled,this._tabDropdownLabel=i.tabDropdownLabel,this.setSide(i.side),this._canRemoveComponent=this._configClosable,this._element=document.createElement("section"),this._element.classList.add("lm_header"),this._controlsContainerElement=document.createElement("section"),this._controlsContainerElement.classList.add("lm_controls"),this._element.appendChild(this._tabsContainer.element),this._element.appendChild(this._controlsContainerElement),this._element.appendChild(this._tabsContainer.dropdownElement),this._element.addEventListener("click",this._clickListener,{passive:!0}),this._element.addEventListener("touchstart",this._touchStartListener,{passive:!0}),this._documentMouseUpListener=()=>this._tabsContainer.hideAdditionalTabsDropdown(),globalThis.document.addEventListener("mouseup",this._documentMouseUpListener,{passive:!0}),this._tabControlOffset=this._layoutManager.layoutConfig.settings.tabControlOffset,this._tabDropdownEnabled&&(this._tabDropdownButton=new Kt(this,this._tabDropdownLabel,"lm_tabdropdown",(()=>this._tabsContainer.showAdditionalTabsDropdown()))),this._popoutEnabled&&(this._popoutButton=new Kt(this,this._popoutLabel,"lm_popout",(()=>this.handleButtonPopoutEvent()))),this._maximiseEnabled&&(this._maximiseButton=new Kt(this,this._maximiseLabel,"lm_maximise",(t=>this.handleButtonMaximiseToggleEvent(t)))),this._configClosable&&(this._closeButton=new Kt(this,this._closeLabel,"lm_close",(()=>s()))),this.processTabDropdownActiveChanged()}get show(){return this._show}get side(){return this._side}get leftRightSided(){return this._leftRightSided}get layoutManager(){return this._layoutManager}get parent(){return this._parent}get tabs(){return this._tabsContainer.tabs}get lastVisibleTabIndex(){return this._tabsContainer.lastVisibleTabIndex}get element(){return this._element}get tabsContainerElement(){return this._tabsContainer.element}get controlsContainerElement(){return this._controlsContainerElement}destroy(){this.emit("destroy"),this._popoutEvent=void 0,this._maximiseToggleEvent=void 0,this._clickEvent=void 0,this._touchStartEvent=void 0,this._componentRemoveEvent=void 0,this._componentFocusEvent=void 0,this._componentDragStartEvent=void 0,this._tabsContainer.destroy(),globalThis.document.removeEventListener("mouseup",this._documentMouseUpListener),this._element.remove()}createTab(t,e){this._tabsContainer.createTab(t,e)}removeTab(t){this._tabsContainer.removeTab(t)}processActiveComponentChanged(t){this._tabsContainer.processActiveComponentChanged(t),this.updateTabSizes()}setSide(t){this._side=t,this._leftRightSided=[nt.right,nt.left].includes(this._side)}setRowColumnClosable(t){this._rowColumnClosable=t,this.updateClosability()}updateClosability(){let t;if(this._configClosable)if(this._rowColumnClosable){t=!0;const e=this.tabs.length;for(let i=0;i1}applyFocusedValue(t){t?this._element.classList.add("lm_focused"):this._element.classList.remove("lm_focused")}processMaximised(){if(void 0===this._maximiseButton)throw new J("HPMAX16997");this._maximiseButton.element.setAttribute("title",this._minimiseLabel)}processMinimised(){if(void 0===this._maximiseButton)throw new J("HPMIN16997");this._maximiseButton.element.setAttribute("title",this._maximiseLabel)}updateTabSizes(){if(this._tabsContainer.tabCount>0){const t=this._show?this._layoutManager.layoutConfig.dimensions.headerHeight:0;let e;this._leftRightSided?(this._element.style.height="",this._element.style.width=zt(t)):(this._element.style.width="",this._element.style.height=zt(t)),e=this._leftRightSided?this._element.offsetHeight-this._controlsContainerElement.offsetHeight-this._tabControlOffset:this._element.offsetWidth-this._controlsContainerElement.offsetWidth-this._tabControlOffset,this._tabsContainer.updateTabSizes(e,this._getActiveComponentItemEvent())}}handleTabInitiatedComponentRemoveEvent(t){if(this._canRemoveComponent){if(void 0===this._componentRemoveEvent)throw new J("HHTCE22294");this._componentRemoveEvent(t)}}handleTabInitiatedComponentFocusEvent(t){if(void 0===this._componentFocusEvent)throw new J("HHTAE22294");this._componentFocusEvent(t)}handleTabInitiatedDragStartEvent(t,e,i,n){if(this._canRemoveComponent){if(void 0===this._componentDragStartEvent)throw new J("HHTDSE22294");this._componentDragStartEvent(t,e,i,n)}else i.cancelDrag()}processTabDropdownActiveChanged(){void 0!==this._tabDropdownButton&&Dt(this._tabDropdownButton.element,this._tabsContainer.dropdownActive)}handleButtonPopoutEvent(){if(this._layoutManager.layoutConfig.settings.popoutWholeStack){if(void 0===this._popoutEvent)throw new J("HHBPOE17834");this._popoutEvent()}else{const t=this._getActiveComponentItemEvent();t&&t.popout()}}handleButtonMaximiseToggleEvent(t){if(void 0===this._maximiseToggleEvent)throw new J("HHBMTE16834");this._maximiseToggleEvent()}onClick(t){t.target===this._element&&this.notifyClick(t)}onTouchStart(t){t.target===this._element&&this.notifyTouchStart(t)}notifyClick(t){if(void 0===this._clickEvent)throw new J("HNHC46834");this._clickEvent(t)}notifyTouchStart(t){if(void 0===this._touchStartEvent)throw new J("HNHTS46834");this._touchStartEvent(t)}}class ee extends $t{constructor(t,e,i){var n,o,s,r,a,l,h,d,c,m,u,p,g,f,v,_,y,C,w;super(t,e,i,ee.createElement(document)),this._headerSideChanged=!1,this._resizeListener=()=>this.handleResize(),this._maximisedListener=()=>this.handleMaximised(),this._minimisedListener=()=>this.handleMinimised(),this._headerConfig=e.header;const I=t.layoutConfig.header,b=e.content;let S;if(1!==b.length)S=void 0;else{S=b[0].header}this._initialWantMaximise=e.maximised,this._initialActiveItemIndex=null!==(n=e.activeItemIndex)&&void 0!==n?n:0;const E=null!==(r=null!==(s=null===(o=this._headerConfig)||void 0===o?void 0:o.show)&&void 0!==s?s:null==S?void 0:S.show)&&void 0!==r?r:I.show,x=null!==(h=null!==(l=null===(a=this._headerConfig)||void 0===a?void 0:a.popout)&&void 0!==l?l:null==S?void 0:S.popout)&&void 0!==h?h:I.popout,L=null!==(m=null!==(c=null===(d=this._headerConfig)||void 0===d?void 0:d.maximise)&&void 0!==c?c:null==S?void 0:S.maximise)&&void 0!==m?m:I.maximise,z=null!==(g=null!==(p=null===(u=this._headerConfig)||void 0===u?void 0:u.close)&&void 0!==p?p:null==S?void 0:S.close)&&void 0!==g?g:I.close,M=null!==(_=null!==(v=null===(f=this._headerConfig)||void 0===f?void 0:f.minimise)&&void 0!==v?v:null==S?void 0:S.minimise)&&void 0!==_?_:I.minimise,P=null!==(w=null!==(C=null===(y=this._headerConfig)||void 0===y?void 0:y.tabDropdown)&&void 0!==C?C:null==S?void 0:S.tabDropdown)&&void 0!==w?w:I.tabDropdown;this._maximisedEnabled=!1!==L;const T={show:!1!==E,side:!1===E?nt.top:E,popoutEnabled:!1!==x,popoutLabel:!1===x?"":x,maximiseEnabled:this._maximisedEnabled,maximiseLabel:!1===L?"":L,closeEnabled:!1!==z,closeLabel:!1===z?"":z,minimiseEnabled:!0,minimiseLabel:M,tabDropdownEnabled:!1!==P,tabDropdownLabel:!1===P?"":P};this._header=new te(t,this,T,e.isClosable&&!1!==z,(()=>this.getActiveComponentItem()),(()=>this.remove()),(()=>this.handlePopoutEvent()),(()=>this.toggleMaximise()),(t=>this.handleHeaderClickEvent(t)),(t=>this.handleHeaderTouchStartEvent(t)),(t=>this.handleHeaderComponentRemoveEvent(t)),(t=>this.handleHeaderComponentFocusEvent(t)),((t,e,i,n)=>this.handleHeaderComponentStartDragEvent(t,e,i,n))),this.isStack=!0,this._childElementContainer=document.createElement("section"),this._childElementContainer.classList.add("lm_items"),this.on("resize",this._resizeListener),this._maximisedEnabled&&(this.on("maximised",this._maximisedListener),this.on("minimised",this._minimisedListener)),this.element.appendChild(this._header.element),this.element.appendChild(this._childElementContainer),this.setupHeaderPosition(),this._header.updateClosability()}get childElementContainer(){return this._childElementContainer}get header(){return this._header}get headerShow(){return this._header.show}get headerSide(){return this._header.side}get headerLeftRightSided(){return this._header.leftRightSided}get contentAreaDimensions(){return this._contentAreaDimensions}get initialWantMaximise(){return this._initialWantMaximise}get isMaximised(){return this===this.layoutManager.maximisedStack}get stackParent(){if(!this.parent)throw new Error("Stack should always have a parent");return this.parent}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}init(){if(!0===this.isInitialised)return;this.updateNodeSize();for(let t=0;t0){if(this._initialActiveItemIndex<0||this._initialActiveItemIndex>=e)throw new Error(`ActiveItemIndex out of range: ${this._initialActiveItemIndex} id: ${this.id}`);for(let i=0;ithis.contentItems.length)throw e-=1,new X("SAC99728");if(t instanceof jt)return e=super.addChild(t,e),this._childElementContainer.appendChild(t.element),this._header.createTab(t,e),this.setActiveComponentItem(t,i),this._header.updateTabSizes(),this.updateSize(!1),t.container.setBaseLogicalZIndex(),this._header.updateClosability(),this.emitStateChangedEvent(),e;throw new X("SACC88532")}removeChild(t,e){const i=t,n=this.contentItems.indexOf(i),o=1===this.contentItems.length;if(this._activeComponentItem===i&&(i.focused&&i.blur(),!o)){const t=0===n?1:n-1;this.setActiveComponentItem(this.contentItems[t],!1)}this._header.removeTab(i),super.removeChild(i,e),o||this._header.updateClosability(),this.emitStateChangedEvent()}toggleMaximise(){this.isMaximised?this.minimise():this.maximise()}maximise(){if(!this.isMaximised){this.layoutManager.setMaximisedStack(this);const t=this.contentItems,e=t.length;for(let i=0;i0&&void 0===t)throw new Error("expected non-empty stack to have an active component item");return{type:"stack",content:this.calculateConfigContent(),size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,isClosable:this.isClosable,maximised:this.isMaximised,header:this.createHeaderConfig(),activeItemIndex:t}}onDrop(t,e){if("header"===this._dropSegment){if(this.resetHeaderDropZone(),void 0===this._dropIndex)throw new J("SODDI68990");return void this.addChild(t,this._dropIndex)}if("body"===this._dropSegment)return void this.addChild(t,0,!0);const i="top"===this._dropSegment||"bottom"===this._dropSegment,n="left"===this._dropSegment||"right"===this._dropSegment,o="top"===this._dropSegment||"left"===this._dropSegment,s=i&&this.stackParent.isColumn||n&&this.stackParent.isRow;if(t.isComponent){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createAndInitContentItem(e,this);i.addChild(t),t=i}if(t.type===at.row||t.type===at.column){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}if(s){const e=this.stackParent.contentItems.indexOf(this);this.stackParent.addChild(t,o?e:e+1,!0),this.size*=.5,t.size=this.size,t.sizeUnit=this.sizeUnit,this.stackParent.updateSize(!1)}else{const e=i?at.column:at.row,n=ct.createDefault(e),s=this.layoutManager.createContentItem(n,this);this.stackParent.replaceChild(this,s),s.addChild(t,o?0:void 0,!0),s.addChild(this,o?void 0:0,!0),this.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}highlightDropZone(t,e){for(const i in this._contentAreaDimensions){const n=i,o=this._contentAreaDimensions[n].hoverArea;if(o.x1t&&o.y1e)return void("header"===n?(this._dropSegment="header",this.highlightHeaderDropZone(this._header.leftRightSided?e:t)):(this.resetHeaderDropZone(),this.highlightBodyDropZone(n)))}}getArea(){if("none"===this.element.style.display)return null;const t=super.getElementArea(this._header.element),e=super.getElementArea(this._childElementContainer);if(null===t||null===e)throw new K("SGAHC13086");const i=e.x2-e.x1,n=e.y2-e.y1;return this._contentAreaDimensions={header:{hoverArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2},highlightArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2}}},0===this.contentItems.length?(this._contentAreaDimensions.body={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2}},super.getElementArea(this.element)):(this._contentAreaDimensions.left={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x1+.25*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x1+.5*i,y2:e.y2}},this._contentAreaDimensions.top={hoverArea:{x1:e.x1+.25*i,y1:e.y1,x2:e.x1+.75*i,y2:e.y1+.5*n},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y1+.5*n}},this._contentAreaDimensions.right={hoverArea:{x1:e.x1+.75*i,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1+.5*i,y1:e.y1,x2:e.x2,y2:e.y2}},this._contentAreaDimensions.bottom={hoverArea:{x1:e.x1+.25*i,y1:e.y1+.5*n,x2:e.x1+.75*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1+.5*n,x2:e.x2,y2:e.y2}},super.getElementArea(this.element))}positionHeader(t){this._header.side!==t&&(this._header.setSide(t),this._headerSideChanged=!0,this.setupHeaderPosition())}updateNodeSize(){if("none"!==this.element.style.display){const t=kt(this.element);if(this._header.show){t[this._header.leftRightSided?it.width:it.height]-=this.layoutManager.layoutConfig.dimensions.headerHeight}this._childElementContainer.style.width=zt(t.width),this._childElementContainer.style.height=zt(t.height);for(let e=0;e=o&&tthis.onDrag(t,e,i))),this._dragListener.on("dragStop",(()=>this.onDrop())),this.createDragProxyElements(t,e),null===this._componentItem.parent)throw new K("DPC10097");this._componentItemFocused=this._componentItem.focused,this._componentItemFocused&&this._componentItem.blur(),this._componentItem.parent.removeChild(this._componentItem,!0),this.setDimensions(),document.body.appendChild(this._element),this.determineMinMaxXY(),this._layoutManager.calculateItemAreas(),this.setDropPosition(t,e)}get element(){return this._element}createDragProxyElements(t,e){this._element=document.createElement("div"),this._element.classList.add("lm_dragProxy");const i=document.createElement("div");i.classList.add("lm_header");const n=document.createElement("div");n.classList.add("lm_tabs");const o=document.createElement("div");o.classList.add("lm_tab");const s=document.createElement("span");s.classList.add("lm_title"),o.appendChild(s),n.appendChild(o),i.appendChild(n),this._proxyContainerElement=document.createElement("div"),this._proxyContainerElement.classList.add("lm_content"),this._element.appendChild(i),this._element.appendChild(this._proxyContainerElement),this._originalParent instanceof ee&&this._originalParent.headerShow&&(this._sided=this._originalParent.headerLeftRightSided,this._element.classList.add("lm_"+this._originalParent.headerSide),[nt.right,nt.bottom].indexOf(this._originalParent.headerSide)>=0&&this._proxyContainerElement.insertAdjacentElement("afterend",i)),this._element.style.left=zt(t),this._element.style.top=zt(e),o.setAttribute("title",this._componentItem.title),s.insertAdjacentText("afterbegin",this._componentItem.title),this._proxyContainerElement.appendChild(this._componentItem.element)}determineMinMaxXY(){const t=this._layoutManager.groundItem;if(void 0===t)throw new J("DPDMMXY73109");{const e=t.element.getBoundingClientRect();this._minX=e.left+document.body.scrollLeft,this._minY=e.top+document.body.scrollTop,this._maxX=this._minX+e.width,this._maxY=this._minY+e.height}}onDrag(t,e,i){const n=i.pageX,o=i.pageY;this.setDropPosition(n,o),this._componentItem.drag()}setDropPosition(t,e){this._layoutManager.layoutConfig.settings.constrainDragToContainer&&(t<=this._minX?t=Math.ceil(this._minX):t>=this._maxX&&(t=Math.floor(this._maxX)),e<=this._minY?e=Math.ceil(this._minY):e>=this._maxY&&(e=Math.floor(this._maxY))),this._element.style.left=zt(t),this._element.style.top=zt(e),this._area=this._layoutManager.getArea(t,e),null!==this._area&&(this._lastValidArea=this._area,this._area.contentItem.highlightDropZone(t,e,this._area))}onDrop(){const t=this._layoutManager.dropTargetIndicator;if(null===t)throw new K("DPOD30011");let e;if(t.hide(),this._componentItem.exitDragMode(),null!==this._area)e=this._componentItem,this._area.contentItem.onDrop(e,this._area);else if(null!==this._lastValidArea){e=this._componentItem;this._lastValidArea.contentItem.onDrop(e,this._lastValidArea)}else this._originalParent?(e=this._componentItem,this._originalParent.addChild(e)):this._componentItem.destroy();this._element.remove(),this._layoutManager.emit("itemDropped",this._componentItem),this._componentItemFocused&&void 0!==e&&e.focus()}setDimensions(){const t=this._layoutManager.layoutConfig.dimensions;if(void 0===t)throw new Error("DragProxy.setDimensions: dimensions undefined");let e=t.dragProxyWidth,i=t.dragProxyHeight;if(void 0===e||void 0===i)throw new Error("DragProxy.setDimensions: width and/or height undefined");const n=!1===this._layoutManager.layoutConfig.header.show?0:t.headerHeight;this._element.style.width=zt(e),this._element.style.height=zt(i),e-=this._sided?n:0,i-=this._sided?0:n,this._proxyContainerElement.style.width=zt(e),this._proxyContainerElement.style.height=zt(i),this._componentItem.enterDragMode(e,i),this._componentItem.show()}}class ne{constructor(t,e,i,n,o,s,r){this._layoutManager=t,this._element=e,this._extraAllowableChildTargets=i,this._componentTypeOrFtn=n,this._componentState=o,this._title=s,this._id=r,this._dragListener=null,this._dummyGroundContainer=document.createElement("div");const a=gt.createDefault("row");this._dummyGroundContentItem=new Yt(this._layoutManager,a,this._dummyGroundContainer),this.createDragListener()}destroy(){this.removeDragListener()}createDragListener(){this.removeDragListener(),this._dragListener=new Zt(this._element,this._extraAllowableChildTargets),this._dragListener.on("dragStart",((t,e)=>this.onDragStart(t,e))),this._dragListener.on("dragStop",(()=>this.onDragStop()))}onDragStart(t,e){var i;const n="component";let o;if("function"==typeof this._componentTypeOrFtn){const t=this._componentTypeOrFtn();o=ne.isDragSourceComponentItemConfig(t)?{type:n,componentState:t.state,componentType:t.type,title:null!==(i=t.title)&&void 0!==i?i:this._title}:t}else o={type:n,componentState:this._componentState,componentType:this._componentTypeOrFtn,title:this._title,id:this._id};const s=bt.resolve(o,!1),r=new jt(this._layoutManager,s,this._dummyGroundContentItem);if(this._dummyGroundContentItem.contentItems.push(r),null===this._dragListener)throw new K("DSODSD66746");{const i=new ie(t,e,this._dragListener,this._layoutManager,r,this._dummyGroundContentItem),n=this._layoutManager.transitionIndicator;if(null===n)throw new K("DSODST66746");n.transitionElements(this._element,i.element)}}onDragStop(){this.createDragListener()}removeDragListener(){null!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=null)}}!function(t){t.isDragSourceComponentItemConfig=function(t){return!("componentType"in t)}}(ne||(ne={}));class oe{constructor(){this._element=document.createElement("div"),this._element.classList.add("lm_dropTargetIndicator");const t=document.createElement("div");t.classList.add("lm_inner"),this._element.appendChild(t),document.body.appendChild(this._element)}destroy(){this._element.remove()}highlightArea(t,e){this._element.style.left=zt(t.x1+e),this._element.style.top=zt(t.y1+e),this._element.style.width=zt(t.x2-t.x1-e),this._element.style.height=zt(t.y2-t.y1-e),this._element.style.display="block"}hide(){Dt(this._element,!1)}}class se{constructor(){this._element=document.createElement("div"),this._element.classList.add("lm_transition_indicator"),document.body.appendChild(this._element),this._toElement=null,this._fromDimensions=null,this._totalAnimationDuration=200,this._animationStartTime=null}destroy(){this._element.remove()}transitionElements(t,e){}nextAnimationFrame(){}measure(t){const e=t.getBoundingClientRect();return{left:e.left,top:e.top,width:t.offsetWidth,height:t.offsetHeight}}}class re extends Wt{constructor(t){super(),this._layoutManager=t,this._childEventListener=t=>this.onEventFromChild(t),globalThis.addEventListener(re.ChildEventName,this._childEventListener,{passive:!0})}emit(t,...e){"userBroadcast"===t?this.emitUserBroadcast(...e):super.emit(t,...e)}emitUserBroadcast(...t){this.handleUserBroadcastEvent("userBroadcast",t)}destroy(){globalThis.removeEventListener(re.ChildEventName,this._childEventListener)}handleUserBroadcastEvent(t,e){this._layoutManager.isSubWindow?this.propagateToParent(t,e):this.propagateToThisAndSubtree(t,e)}onEventFromChild(t){const e=t.detail;this.handleUserBroadcastEvent(e.eventName,e.args)}propagateToParent(t,e){const i={bubbles:!0,cancelable:!0,detail:{layoutManager:this._layoutManager,eventName:t,args:e}},n=new CustomEvent(re.ChildEventName,i),o=globalThis.opener;if(null===o)throw new K("EHPTP15778");o.dispatchEvent(n)}propagateToThisAndSubtree(t,e){this.emitUnknown(t,...e);for(let i=0;ithis.handleContainerResize())),this._windowBeforeUnloadListener=()=>this.onBeforeUnload(),this._windowBeforeUnloadListening=!1,this._maximisedStackBeforeDestroyedListener=t=>this.cleanupBeforeMaximisedStackDestroyed(t),this.isSubWindow=t.isSubWindow,this._constructorOrSubWindowLayoutConfig=t.constructorOrSubWindowLayoutConfig,Q.checkInitialise(),dt.checkInitialise(),void 0!==t.containerElement&&(this._containerElement=t.containerElement)}get container(){return this._containerElement}get isInitialised(){return this._isInitialised}get groundItem(){return this._groundItem}get root(){return this._groundItem}get openPopouts(){return this._openPopouts}get dropTargetIndicator(){return this._dropTargetIndicator}get transitionIndicator(){return this._transitionIndicator}get width(){return this._width}get height(){return this._height}get eventHub(){return this._eventHub}get rootItem(){if(void 0===this._groundItem)throw new Error("Cannot access rootItem before init");return 0===this._groundItem.contentItems.length?void 0:this._groundItem.contentItems[0]}get focusedComponentItem(){return this._focusedComponentItem}get tabDropPlaceholder(){return this._tabDropPlaceholder}get maximisedStack(){return this._maximisedStack}get deprecatedConstructor(){return!this.isSubWindow&&void 0!==this._constructorOrSubWindowLayoutConfig}destroy(){if(this._isInitialised){this._windowBeforeUnloadListening&&(globalThis.removeEventListener("beforeunload",this._windowBeforeUnloadListener),this._windowBeforeUnloadListening=!1),!0===this.layoutConfig.settings.closePopoutsOnUnload&&this.closeAllOpenPopouts(),this._resizeObserver.disconnect(),this.checkClearResizeTimeout(),void 0!==this._groundItem&&this._groundItem.destroy(),this._tabDropPlaceholder.remove(),null!==this._dropTargetIndicator&&this._dropTargetIndicator.destroy(),null!==this._transitionIndicator&&this._transitionIndicator.destroy(),this._eventHub.destroy();for(const t of this._dragSources)t.destroy();this._dragSources=[],this._isInitialised=!1}}minifyConfig(t){return _t.minifyConfig(t)}unminifyConfig(t){return _t.unminifyConfig(t)}init(){let t;if(this.setContainer(),this._dropTargetIndicator=new oe,this._transitionIndicator=new se,this.updateSizeFromContainer(),this.isSubWindow){if(void 0===this._constructorOrSubWindowLayoutConfig)throw new J("LMIU07155");{const e=this._constructorOrSubWindowLayoutConfig.root;if(void 0===e)throw new X("LMIC07156");if(!Ct.isComponent(e))throw new X("LMIC07157");t=e;const i=xt.resolve(this._constructorOrSubWindowLayoutConfig);this.layoutConfig=Object.assign(Object.assign({},i),{root:void 0})}}else void 0===this._constructorOrSubWindowLayoutConfig?this.layoutConfig=_t.createDefault():this.layoutConfig=xt.resolve(this._constructorOrSubWindowLayoutConfig);const e=this.layoutConfig;this._groundItem=new Yt(this,e.root,this._containerElement),this._groundItem.init(),this.checkLoadedLayoutMaximiseItem(),this._resizeObserver.observe(this._containerElement),this._isInitialised=!0,this.adjustColumnsResponsive(),this.emit("initialised"),void 0!==t&&this.loadComponentAsRoot(t)}loadLayout(t){if(!this.isInitialised)throw new Error("GoldenLayout: Need to call init() if LayoutConfig with defined root passed to constructor");if(void 0===this._groundItem)throw new J("LMLL11119");this.createSubWindows(),this.layoutConfig=xt.resolve(t),this._groundItem.loadRoot(this.layoutConfig.root),this.checkLoadedLayoutMaximiseItem(),this.adjustColumnsResponsive()}saveLayout(){if(!1===this._isInitialised)throw new Error("Can't create config, layout not yet initialised");if(void 0===this._groundItem)throw new J("LMTC18244");{const t=this._groundItem.calculateConfigContent();let e;e=1!==t.length?void 0:t[0],this.reconcilePopoutWindows();const i=[];for(let t=0;t=0?n=this._groundItem.contentItems[0]:e=0;break;case at.row:case at.column:e=n.addItem(t,i.index);break;case at.stack:if(Ct.isComponent(t)){e=n.addItem(t,i.index);break}throw Error(tt[6]);case at.component:throw new X("LMAIALC87444602");default:throw new Y("LMAIALU98881733",n.type)}if(Ct.isComponent(t)){const t=n.contentItems[e];Gt.isStack(t)&&(n=t,e=0)}return i.parentItem=n,i.index=e,i}}}loadComponentAsRoot(t){if(void 0===this._groundItem)throw new Error("Cannot add item before init");this._groundItem.loadComponentAsRoot(t)}updateSize(t,e){this.setSize(t,e)}setSize(t,e){if(this._width=t,this._height=e,!0===this._isInitialised){if(void 0===this._groundItem)throw new J("LMUS18881");if(this._groundItem.setSize(this._width,this._height),this._maximisedStack){const{width:t,height:e}=kt(this._containerElement);Tt(this._maximisedStack.element,t),At(this._maximisedStack.element,e),this._maximisedStack.updateSize(!1)}this.adjustColumnsResponsive()}}beginSizeInvalidation(){this._sizeInvalidationBeginCount++}endSizeInvalidation(){0==--this._sizeInvalidationBeginCount&&this.updateSizeFromContainer()}updateSizeFromContainer(){const{width:t,height:e}=kt(this._containerElement);this.setSize(t,e)}updateRootSize(t=!1){if(void 0===this._groundItem)throw new J("LMURS28881");this._groundItem.updateSize(t)}createAndInitContentItem(t,e){const i=this.createContentItem(t,e);return i.init(),i}createContentItem(t,e){if("string"!=typeof t.type)throw new G("Missing parameter 'type'",JSON.stringify(t));if(ct.isComponentItem(t)&&!(e instanceof ee)&&e&&!(!0===this.isSubWindow&&e instanceof Yt)){t={type:at.stack,content:[t],size:t.size,sizeUnit:t.sizeUnit,minSize:t.minSize,minSizeUnit:t.minSizeUnit,id:t.id,maximised:t.maximised,isClosable:t.isClosable,activeItemIndex:0,header:void 0}}return this.createContentItemFromConfig(t,e)}findFirstComponentItemById(t){if(void 0===this._groundItem)throw new J("LMFFCIBI82446");return this.findFirstContentItemTypeByIdRecursive(at.component,t,this._groundItem)}createPopout(t,e,i,n){return t instanceof Gt?this.createPopoutFromContentItem(t,e,i,n):this.createPopoutFromItemConfig(t,e,i,n)}createPopoutFromContentItem(t,e,i,n){let o=t.parent,s=t;for(;null!==o&&1===o.contentItems.length&&!o.isGround;)s=o,o=o.parent;if(null===o)throw new K("LMCPFCI00834");{if(void 0===n&&(n=o.contentItems.indexOf(s)),null!==i&&o.addPopInParentId(i),void 0===e){const i=globalThis.screenX||globalThis.screenLeft,n=globalThis.screenY||globalThis.screenTop,o=t.element.offsetLeft,s=t.element.offsetTop,{width:r,height:a}=kt(t.element);e={left:i+o,top:n+s,width:r,height:a}}const r=t.toConfig();if(t.remove(),ft.isRootItemConfig(r))return this.createPopoutFromItemConfig(r,e,i,n);throw new Error(`${tt[0]}`)}}beginVirtualSizedContainerAdding(){0==++this._virtualSizedContainerAddingBeginCount&&(this._virtualSizedContainers.length=0)}addVirtualSizedContainer(t){this._virtualSizedContainers.push(t)}endVirtualSizedContainerAdding(){if(0==--this._virtualSizedContainerAddingBeginCount){const t=this._virtualSizedContainers.length;if(t>0){this.fireBeforeVirtualRectingEvent(t);for(let e=0;ethis.emit("windowOpened",a))),a.on("closed",(()=>this.reconcilePopoutWindows())),this._openPopouts.push(a),this.layoutConfig.settings.closePopoutsOnUnload&&!this._windowBeforeUnloadListening&&(globalThis.addEventListener("beforeunload",this._windowBeforeUnloadListener,{passive:!0}),this._windowBeforeUnloadListening=!0),a}closeAllOpenPopouts(){for(let t=0;tglobalThis.close()),1)}getArea(t,e){let i=null,n=1/0;for(let o=0;o=s.x1&&t=s.y1&&es.surface&&(n=s.surface,i=s)}return i}calculateItemAreas(){const t=this.getAllContentItems(),e=this._groundItem;if(void 0===e)throw new J("LMCIAR44365");if(1!==t.length){e.contentItems[0].isStack?this._itemAreas=[]:this._itemAreas=e.createSideAreas();for(let e=0;e0){let e=t[0];if(Gt.isComponentItem(e)){const t=e.parent;if(null===t)throw new K("LMXLLMI69999");e=t}if(!Gt.isStack(e))throw new X("LMCLLMI19993");e.maximise()}}}processMaximiseStack(t){if(this._maximisedStack=t,t.on("beforeItemDestroyed",this._maximisedStackBeforeDestroyedListener),t.element.classList.add("lm_maximised"),t.element.insertAdjacentElement("afterend",this._maximisePlaceholder),void 0===this._groundItem)throw new J("LMMXI19993");{this._groundItem.element.prepend(t.element);const{width:e,height:i}=kt(this._containerElement);Tt(t.element,e),At(t.element,i),t.updateSize(!0),t.focusActiveContentItem(),this._maximisedStack.emit("maximised"),this.emit("stateChanged")}}processMinimiseMaximisedStack(){if(void 0===this._maximisedStack)throw new X("LMMMS74422");{const t=this._maximisedStack;if(null===t.parent)throw new K("LMMI13668");t.element.classList.remove("lm_maximised"),this._maximisePlaceholder.insertAdjacentElement("afterend",t.element),this._maximisePlaceholder.remove(),this.updateRootSize(!0),this._maximisedStack=void 0,t.off("beforeItemDestroyed",this._maximisedStackBeforeDestroyedListener),t.emit("minimised"),this.emit("stateChanged")}}reconcilePopoutWindows(){const t=[];for(let e=0;e{this._resizeTimeoutId=void 0,this.beginSizeInvalidation(),this.endSizeInvalidation()}),this.resizeDebounceInterval))}checkClearResizeTimeout(){void 0!==this._resizeTimeoutId&&(clearTimeout(this._resizeTimeoutId),this._resizeTimeoutId=void 0)}setContainer(){var t;const e=document.body,i=null!==(t=this._containerElement)&&void 0!==t?t:e;if(i===e){this.resizeWithContainerAutomatically=!0;const t=document.documentElement;t.style.height="100%",t.style.margin="0",t.style.padding="0",t.style.overflow="clip",e.style.height="100%",e.style.margin="0",e.style.padding="0",e.style.overflow="clip"}this._containerElement=i}onBeforeUnload(){this.destroy()}adjustColumnsResponsive(){if(void 0===this._groundItem)throw new J("LMACR20883");if(this._firstLoad=!1,this.useResponsiveLayout()&&!this._updatingColumnsResponsive&&this._groundItem.contentItems.length>0&&this._groundItem.contentItems[0].isRow){if(void 0===this._groundItem||null===this._width)throw new J("LMACR77412");{const t=this._groundItem.contentItems[0].contentItems.length;if(t<=1)return;{const e=this.layoutConfig.dimensions.defaultMinItemWidth;if(t*e<=this._width)return;{this._updatingColumnsResponsive=!0;const i=t-Math.max(Math.floor(this._width/e),1),n=this._groundItem.contentItems[0],o=this.getAllStacks();if(0===o.length)throw new X("LMACRS77413");{const t=o[0];for(let e=0;en?void 0:{parentItem:t,index:o}}}case 1:if(void 0===this._focusedComponentItem)return;{const t=this._focusedComponentItem.parentItem;return this.tryCreateLocationFromParentItem(t,e)}case 2:{const t=this.findFirstContentItemType(at.stack);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 3:{let t=this.findFirstContentItemType(at.row);return void 0!==t?this.tryCreateLocationFromParentItem(t,e):(t=this.findFirstContentItemType(at.column),void 0!==t?this.tryCreateLocationFromParentItem(t,e):void 0)}case 4:{const t=this.findFirstContentItemType(at.row);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 5:{const t=this.findFirstContentItemType(at.column);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 6:if(void 0===this._groundItem)throw new J("LMFLRIF18244");return void 0!==this.rootItem?void 0:void 0===e||0===e?{parentItem:this._groundItem,index:0}:void 0;case 7:if(void 0===this._groundItem)throw new J("LMFLF18244");{const t=this._groundItem.contentItems;if(0===t.length)return void 0===e||0===e?{parentItem:this._groundItem,index:0}:void 0;{const i=t[0];return this.tryCreateLocationFromParentItem(i,e)}}}}tryCreateLocationFromParentItem(t,e){const i=t.contentItems.length;return void 0===e?{parentItem:t,index:i}:e<0||e>i?void 0:{parentItem:t,index:e}}}!function(t){t.createMaximisePlaceElement=function(t){const e=t.createElement("div");return e.classList.add("lm_maximise_place"),e},t.createTabDropPlaceholderElement=function(t){const e=t.createElement("div");return e.classList.add("lm_drop_tab_placeholder"),e},t.defaultLocationSelectors=[{typeId:1,index:void 0},{typeId:2,index:void 0},{typeId:3,index:void 0},{typeId:7,index:void 0}],t.afterFocusedItemIfPossibleLocationSelectors=[{typeId:0,index:1},{typeId:2,index:void 0},{typeId:3,index:void 0},{typeId:7,index:void 0}]}(ae||(ae={}));class le extends ae{constructor(t,e,i,n){if(super(le.createLayoutManagerConstructorParameters(t,e)),this._bindComponentEventHanlderPassedInConstructor=!1,this._creationTimeoutPassed=!1,void 0!==e&&"function"==typeof e&&(this.bindComponentEvent=e,this._bindComponentEventHanlderPassedInConstructor=!0,void 0!==i&&(this.unbindComponentEvent=i)),!this._bindComponentEventHanlderPassedInConstructor&&this.isSubWindow){if(void 0===this._constructorOrSubWindowLayoutConfig)throw new J("VLC98823");{const t=xt.resolve(this._constructorOrSubWindowLayoutConfig);this.layoutConfig=Object.assign(Object.assign({},t),{root:void 0})}}!0!==n&&(this.deprecatedConstructor||this.init())}destroy(){this.bindComponentEvent=void 0,this.unbindComponentEvent=void 0,super.destroy()}init(){if(this._bindComponentEventHanlderPassedInConstructor||"loading"!==document.readyState&&null!==document.body){if(!this._bindComponentEventHanlderPassedInConstructor&&!0===this.isSubWindow&&!this._creationTimeoutPassed)return setTimeout((()=>this.init()),7),void(this._creationTimeoutPassed=!0);!0===this.isSubWindow&&(this._bindComponentEventHanlderPassedInConstructor||this.clearHtmlAndAdjustStylesForSubWindow(),window.__glInstance=this),super.init()}else document.addEventListener("DOMContentLoaded",(()=>this.init()),{passive:!0})}clearHtmlAndAdjustStylesForSubWindow(){const t=document.head,e=new Array(4);e[0]=document.querySelectorAll("body link"),e[1]=document.querySelectorAll("body style"),e[2]=document.querySelectorAll("template"),e[3]=document.querySelectorAll(".gl_keep");for(let i=0;ithis.emit("popIn"))),document.body.appendChild(t),!0}}bindComponent(t,e){if(void 0!==this.bindComponentEvent){return this.bindComponentEvent(t,e)}if(void 0!==this.getComponentEvent)return{virtual:!1,component:this.getComponentEvent(t,e)};{const t=`${tt[2]}: ${JSON.stringify(e)}`;throw new Z(t)}}unbindComponent(t,e,i){if(void 0!==this.unbindComponentEvent)this.unbindComponentEvent(t);else if(!e&&void 0!==this.releaseComponentEvent){if(void 0===i)throw new J("VCUCRCU333998");this.releaseComponentEvent(t,i)}}}!function(t){let e=!1;t.createLayoutManagerConstructorParameters=function(t,i){const n=e?null:new URL(document.location.href).searchParams.get("gl-window");e=!0;const o=null!==n;let s,r;if(null!==n){const e=localStorage.getItem(n);if(null===e)throw new Error("Null gl-window Config");localStorage.removeItem(n);const i=JSON.parse(e),o=_t.unminifyConfig(i);r=xt.fromResolved(o),t instanceof HTMLElement&&(s=t)}else void 0===t?r=void 0:t instanceof HTMLElement?(r=void 0,s=t):r=t,void 0===s&&i instanceof HTMLElement&&(s=i);return{constructorOrSubWindowLayoutConfig:r,isSubWindow:o,containerElement:s}}}(le||(le={}));class he extends le{constructor(t,e,i){super(t,e,i,!0),this._componentTypesMap=new Map,this._registeredComponentMap=new Map,this._virtuableComponentMap=new Map,this._containerVirtualRectingRequiredEventListener=(t,e,i)=>this.handleContainerVirtualRectingRequiredEvent(t,e,i),this._containerVirtualVisibilityChangeRequiredEventListener=(t,e)=>this.handleContainerVirtualVisibilityChangeRequiredEvent(t,e),this._containerVirtualZIndexChangeRequiredEventListener=(t,e,i)=>this.handleContainerVirtualZIndexChangeRequiredEvent(t,e,i),this.deprecatedConstructor||this.init()}registerComponent(t,e,i=!1){if("function"!=typeof e)throw new $("registerComponent() componentConstructorOrFactoryFtn parameter is not a function");if(e.hasOwnProperty("prototype")){const n=e;this.registerComponentConstructor(t,n,i)}else{const n=e;this.registerComponentFactoryFunction(t,n,i)}}registerComponentConstructor(t,e,i=!1){if("function"!=typeof e)throw new Error(tt[1]);if(void 0!==this._componentTypesMap.get(t))throw new Z(`${tt[3]}: ${t}`);this._componentTypesMap.set(t,{constructor:e,factoryFunction:void 0,virtual:i})}registerComponentFactoryFunction(t,e,i=!1){if("function"!=typeof e)throw new Z("Please register a constructor function");if(void 0!==this._componentTypesMap.get(t))throw new Z(`${tt[3]}: ${t}`);this._componentTypesMap.set(t,{constructor:void 0,factoryFunction:e,virtual:i})}registerComponentFunction(t){this.registerGetComponentConstructorCallback(t)}registerGetComponentConstructorCallback(t){if("function"!=typeof t)throw new Error("Please register a callback function");void 0!==this._getComponentConstructorFtn&&console.warn("Multiple component functions are being registered. Only the final registered function will be used."),this._getComponentConstructorFtn=t}getRegisteredComponentTypeNames(){const t=this._componentTypesMap.keys();return Array.from(t)}getComponentInstantiator(t){let e;const i=pt.resolveComponentTypeName(t);return void 0!==i&&(e=this._componentTypesMap.get(i)),void 0===e&&void 0!==this._getComponentConstructorFtn&&(e={constructor:this._getComponentConstructorFtn(t),factoryFunction:void 0,virtual:!1}),e}bindComponent(t,e){let i;const n=pt.resolveComponentTypeName(e);let o;if(void 0!==n&&(i=this._componentTypesMap.get(n)),void 0===i&&void 0!==this._getComponentConstructorFtn&&(i={constructor:this._getComponentConstructorFtn(e),factoryFunction:void 0,virtual:!1}),void 0!==i){const s=i.virtual;let r,a;r=void 0===e.componentState?void 0:Ut({},e.componentState);const l=i.constructor;if(void 0!==l)a=new l(t,r,s);else{const e=i.factoryFunction;if(void 0===e)throw new X("LMBCFFU10008");a=e(t,r,s)}if(s){if(void 0===a)throw new J("GLBCVCU988774");{const e=a,i=e.rootHtmlElement;if(void 0===i)throw new Z(`${tt[5]}: ${n}`);!function(t){const e="absolute";t.style.position!==e&&(t.style.position=e)}(i),this.container.appendChild(i),this._virtuableComponentMap.set(t,e),t.virtualRectingRequiredEvent=this._containerVirtualRectingRequiredEventListener,t.virtualVisibilityChangeRequiredEvent=this._containerVirtualVisibilityChangeRequiredEventListener,t.virtualZIndexChangeRequiredEvent=this._containerVirtualZIndexChangeRequiredEventListener}}this._registeredComponentMap.set(t,a),o={virtual:i.virtual,component:a}}else o=super.bindComponent(t,e);return o}unbindComponent(t,e,i){if(void 0===this._registeredComponentMap.get(t))super.unbindComponent(t,e,i);else{const e=this._virtuableComponentMap.get(t);if(void 0!==e){const i=e.rootHtmlElement;if(void 0===i)throw new X("GLUC77743",t.title);this.container.removeChild(i),this._virtuableComponentMap.delete(t)}}}fireBeforeVirtualRectingEvent(t){this._goldenLayoutBoundingClientRect=this.container.getBoundingClientRect(),super.fireBeforeVirtualRectingEvent(t)}handleContainerVirtualRectingRequiredEvent(t,e,i){const n=this._virtuableComponentMap.get(t);if(void 0===n)throw new J("GLHCSCE55933");{const o=n.rootHtmlElement;if(void 0===o)throw new Z(tt[4]+" "+t.title);{const n=t.element.getBoundingClientRect(),s=n.left-this._goldenLayoutBoundingClientRect.left;o.style.left=zt(s);const r=n.top-this._goldenLayoutBoundingClientRect.top;o.style.top=zt(r),Tt(o,e),At(o,i)}}}handleContainerVirtualVisibilityChangeRequiredEvent(t,e){const i=this._virtuableComponentMap.get(t);if(void 0===i)throw new J("GLHCVVCRE55934");{const n=i.rootHtmlElement;if(void 0===n)throw new Z(tt[4]+" "+t.title);Dt(n,e)}}handleContainerVirtualZIndexChangeRequiredEvent(t,e,i){const n=this._virtuableComponentMap.get(t);if(void 0===n)throw new J("GLHCVZICRE55935");{const e=n.rootHtmlElement;if(void 0===e)throw new Z(tt[4]+" "+t.title);e.style.zIndex=i}}}const de="initial_",ce={show:"top",popout:!1,maximise:!1,close:"close-tab-unused"},me={headerHeight:31},ue={hasHeaders:!0,reorderEnabled:!0},pe={popoutWholeStack:!1,constrainDragToContainer:!1,constrainDragToHeaders:!1,preventDragout:!1,showMaximiseIcon:!1,showPopoutIcon:!1,showCloseIcon:!1,blockedPopoutsThrowError:!0,closePopoutsOnUnload:!0,selectionEnabled:!1};var ge,fe;class ve{constructor(e){this.layout=e,ge.set(this,void 0),fe.set(this,void 0),this.handleResize=t=>{t.forEach((t=>this.resizeElement(t.target)))},this.handleMutation=()=>{this.layout.viewComponentsByContainerElement.forEach((t=>{this.resizeElement(t.container.element)}))},t.__classPrivateFieldSet(this,ge,new ResizeObserver(this.handleResize),"f"),t.__classPrivateFieldSet(this,fe,new MutationObserver(this.handleMutation),"f")}observeMutations(e){t.__classPrivateFieldGet(this,fe,"f")?.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["class"]})}destroy(){t.__classPrivateFieldGet(this,ge,"f").disconnect(),t.__classPrivateFieldGet(this,fe,"f").disconnect()}observeContainer(e){t.__classPrivateFieldGet(this,ge,"f").observe(e)}unobserveContainer(e){t.__classPrivateFieldGet(this,ge,"f").unobserve(e)}resizeElement(t){const e=this.layout.viewComponentsByContainerElement.get(t);e&&e.resize()}}ge=new WeakMap,fe=new WeakMap;var _e={};Object.defineProperty(_e,"__esModule",{value:!0});var ye=_e.BaseItem=void 0;class Ce{constructor(t,e,i){this._item=t,this._layout=e,this._wrap=i}get raw(){return this._item}get layout(){return this._layout}get type(){return this._item.type}get contentItems(){return(this._item.contentItems??[]).map((t=>this._wrap(t)))}get parent(){const t=this._item.parent;return t?this._wrap(t):null}setActiveContentItem(t,e){if("stack"!==this.type)throw new Error(`Cannot call setActiveContentItem from a non-stack item: ${this.type}`);this._item.setActiveContentItem(t.raw,e)}static wrapInternal(t,e,i){const n=Ce.wrapCache.get(e);if(n)return n;const o=new t(e,i,(e=>Ce.wrapInternal(t,e,i)));return Ce.wrapCache.set(e,o),o}}ye=_e.BaseItem=Ce,Ce.wrapCache=new WeakMap;const we=t=>!!t&&"contentItems"in t&&(t.isRow||t.isColumn);class Ie extends ye{isRoot(){return!!this._item.parent?.isGround}getBounds(){return this._item.element.getBoundingClientRect()}get viewName(){if(this._item.isComponent){const{component:t}=this._item;return t.identity.name}throw new Error("View name not found")}onDestroyed(t){const e=({target:i})=>{i===this._item&&(t(),this._item.off("itemDestroyed",e))};this._item.on("itemDestroyed",e)}createAdjacentStack({position:t="right"}={}){const e=this.raw;if(ee.isStack(e)&&e.parent){const i=["top","bottom"].includes(t)?"column":"row",n=["left","top"].includes(t)?1:0,o=we(e.parent)?e.parent:e.layoutManager,s=o,r=e.parent.contentItems.indexOf(e);e.parent.isGround&&e.parent.removeChild(e,!0);const a=o.newItem({type:i,content:[{type:"stack",content:[]}]},r);if(!a)throw new Error("createAdjacentStack: Failed to create new container");const l=a.contentItems[0];return a.addChild(this.raw,n),we(s)&&s.removeChild(e,!0),this._wrap(l)}throw new Error(`Cannot creat adjacent stacks for type: ${e.type}, must be type 'stack'`)}setActiveContentItem(t,e=!0){if(!ee.isStack(this._item))throw new Error(`Cannot call setActiveContentItem from a non-stack item: ${this.type}`);this._item.setActiveComponentItem(t.raw,!e)}static wrap(t,e){return ye.wrapInternal(Ie,t,e)}}function be(t=[],e){for(const i of t)"component"===i.type?Object.keys(e).forEach((t=>{t in i&&(i.componentState={[`${de}${t}`]:i[t],...i.componentState}),i[t]=e[t]})):be(i.content,e)}function Se(t=[],e,i){for(const n of t)if("component"===n.type)Object.keys(e).forEach((t=>{if(`${de}${t}`in n.componentState)return n[t]=n.componentState[`${de}${t}`],void delete n.componentState[`${de}${t}`];n[t]=e[t]}));else{if(n.size&&("row"===i||"column"===i)){n["row"===i?"width":"height"]=n.size?.includes(".")?parseFloat(n.size):parseInt(n.size)}Se(n.content,e,n.type)}}function Ee(t){if(t.root){t.root.content&&Se([t.root],{componentName:"view",isClosable:!0});const e=t.root;t.content=[e],delete t.root}return t}const xe=e=>class extends e{connectedCallback(){if(!this.name||!this.uuid)throw new Error(" Name or uuid attribute missing");if(!this.src)throw new Error(" missing 'src' attribute.");this.#t||(this.#t=document.createElement("iframe"),this.#t.src=this.src,this.#t.style.height="100%",this.#t.style.width="100%",this.#t.style.border="none",this.forceFrameName?this.#t.setAttribute("name",this.forceFrameName):this.#t.setAttribute("name",t.encodeOptions({brokerUrl:this.brokerUrl,name:this.name,uuid:this.uuid,providerId:this.providerId,contextGroup:this.contextGroup},"of-frame")),this.#t.setAttribute("id",this.name),this.appendChild(this.#t))}#t;get brokerUrl(){return this.getAttribute("of-broker")}set brokerUrl(t){t&&this.setAttribute("of-broker",t)}get name(){return this.getAttribute("of-name")}set name(t){t&&this.setAttribute("of-name",t)}get forceFrameName(){return this.getAttribute("forceFrameName")}set forceFrameName(t){t&&this.setAttribute("forceFrameName",t)}get uuid(){return this.getAttribute("of-uuid")}set uuid(t){t&&this.setAttribute("of-uuid",t)}get src(){return this.getAttribute("src")}set src(t){t&&this.setAttribute("src",t)}get providerId(){return this.getAttribute("of-provider-id")}set providerId(t){t&&this.setAttribute("of-provider-id",t)}get contextGroup(){return this.getAttribute("of-context-group")}set contextGroup(t){t&&this.setAttribute("of-context-group",t)}static get observedAttributes(){return["name"]}};class Le{static create(t){const e=document.createElement("of-view");return Object.entries(t).forEach((([t,i])=>{e.setAttribute(t,i)})),e}}customElements.define("of-view",xe(HTMLElement));class ze{constructor(t,i,n,{brokerUrl:o,interopConfig:s},r){this.container=t,this.config=i,this.ofView=null,this.isDragging=()=>this.container.tab.element?.className.includes("lm_dragging")??!1;const{url:a,web:l,interop:h,name:d}=i||{},c=d??`internal-generated-view-${e.v4()}`;if(this.identity={uuid:n,name:c},this.container.element.setAttribute("of-name",c),this.container.element.id=`container-${c}`,this.container.parent.id=c,void 0===a)return void this.handleUrlMissing();const m=this.updateTitleIfNotSet(a),u={"of-broker":o,"of-uuid":n,"of-name":c,src:a};l?.frameName&&(u.forceFrameName=l.frameName);const p=h?.currentContextGroup??s?.currentContextGroup;p&&(u["of-context-group"]=p),s?.providerId&&(u["of-provider-id"]=s?.providerId),this.ofView=Le.create(u),this.ofView.title=m??`Iframe: ${a}`,r.appendChild(this.ofView),this.ofView.style.position="absolute"}updateTitleIfNotSet(t){return"view"===this.container.parent.title&&this.container.parent.setTitle(t),this.container.parent.title}handleUrlMissing(){const t=document.createElement("div");t.setAttribute("style","padding: 20px");t.innerText="No URL provided",this.container.element.appendChild(t)}destroy(){this.ofView?.remove(),this.ofView=null}closeView(){this.container.close()}resize(){if(this.ofView){if(this.isDragging())return void(this.ofView.style.display="none");const t=this.container.element.getBoundingClientRect();this.ofView.style.position="absolute",this.ofView.style.height=`${t.height}px`,this.ofView.style.width=`${t.width}px`,this.ofView.style.inset=`${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`,this.ofView.style.display="block"}}}class Me extends U{static overrideConfig(t){const e={...ue,...t.settings,...pe};return e.reorderEnabled?be(t.content,{isClosable:!0}):be(t.content,{reorderEnabled:!1}),{dimensions:me,...t,settings:e,header:{...ce,show:!1!==t.settings?.hasHeaders&&ce.show}}}constructor(t,e,i,{options:n},o,s){super(),this.identity=t,this.container=e,this.initialConfig=i,this.layoutManager=o,this.platformProvider=s,this.viewComponentsByContainerElement=new Map,this.layoutContentCache=_.getSingleInstance(),this.reparentingViews=new Set,this.goldenLayoutDestroyed=!1,this.createViewComponent=(t,e)=>{m.handleSharedView(this.layoutManager,this.identity,e);const i=new ze(t,e,this.identity.uuid,this.options,this.iframeContainer);return e&&!1===e[`${de}isClosable`]&&this.stylesheet.insertRule(`#tab-${i.identity.name} .lm_close_tab { display: none; }`),this.viewComponentsByContainerElement.set(t.element,i),this.resizeController.observeContainer(t.element),i},this.iframeContainer=document.createElement("div"),this.iframeContainer.id=`openfin-layout-iframe-container-${this.identity.layoutName}`,this.domEmitter=new V(e),this.setupStylesheets(),this.layout=new he(this.container),this.layout.resizeWithContainerAutomatically=!0,this.options=n,this.layout.registerComponent("view",this.createViewComponent),this.setupListeners(),this.resizeController=new ve(this),this.layout.loadLayout(Me.overrideConfig(i));const r=document.createElement("div");r.id=`openfin-layout-shadow-container-${this.identity.layoutName}`,r.attachShadow({mode:"open",delegatesFocus:!1}).appendChild(this.iframeContainer),this.container.appendChild(r),this.resizeController.observeMutations(this.container)}getStackByView({name:t}){const e=this.layout.findFirstComponentItemById(t);if(e?.parent&&e?.parent?.isStack)return Ie.wrap(e.parent,this)}getRoot(){return Ie.wrap(this.layout.rootItem,this)}async platformCloseView(t){const e=[...this.viewComponentsByContainerElement.values()].find((e=>e.identity.name===t.name));if(!e)throw new Error(`View with name: ${t.name} not found in layout.`);e.closeView()}async platformCreateView(t,{location:e,targetView:i}={}){if(i)throw new Error("TargetView not supported in web");const n={options:this.platformProvider.normalizeOptions(t),target:this.identity,location:e};return this.insertView(n)}setupStylesheets(){if(this.container.setAttribute("data-openfin-layout-name",this.identity.layoutName),this.stylesheet=new CSSStyleSheet,this.stylesheet.insertRule(".lm_close { display: none; }"),document.adoptedStyleSheets.push(this.stylesheet),this.initialConfig.settings?.preventSplitterResize){const t=`\n [data-openfin-layout-name='${this.identity.layoutName}'] .lm_splitter {\n pointer-events: none;\n }`;this.stylesheet.insertRule(t)}}insertView({options:t,location:e,targetView:i}){const n=e?this.layoutContentCache.getItemOrUndefined(e.id):void 0,o=i?this.layoutContentCache.getItemOrUndefined(i.name):void 0,s=n??o??Ie.wrap(this.layout.rootItem,this);let r;if(ee.isStack(s.raw))r=s.raw;else{if(!we(s.raw))throw new Error("Cannot add a view at the requested location");r=s.raw.newItem({type:"stack",content:[]})}const a=Math.min(r.contentItems.length,e?.index??r.contentItems.length);let l=this.layout.findFirstComponentItemById(t.name);l?(l.parent&&l.parent.removeChild(l,!0),r.addChild(l,a)):l=r.newComponent("view",t,t.title??t.url??"Default Title",a);const h=l.component.identity;return Promise.resolve({identity:h})}replaceView({viewToReplace:t,newView:e}){throw new Error("Method not implemented.")}replaceLayout(t){throw new Error("Method not implemented.")}async cleanupView(t){}applyPreset(t){throw new Error("Method not implemented.")}getCurrentViews(){return[...this.viewComponentsByContainerElement.values()].map((t=>t.identity))}async getFrameSnapshot(){return Ee(xt.fromResolved(this.layout.toConfig()))}isVisible(){return W(this.container)}async onViewDetached({viewIdentity:t}){this.reparentingViews.add(t.name),this.platformCloseView(t)}async destroy(){this.goldenLayoutDestroyed||(this.goldenLayoutDestroyed=!0,this.layout.destroy()),this.iframeContainer.remove(),this.resizeController.destroy(),document.adoptedStyleSheets=document.adoptedStyleSheets.filter((t=>t!==this.stylesheet)),this.viewComponentsByContainerElement.clear()}setupListeners(){this.container.addEventListener("pointerdown",(t=>{if(t.target instanceof HTMLElement){const e=t.target.classList;["lm_tab","lm_title","lm_splitter","lm_drag_handle"].some((t=>e.contains(t)))&&(this.handleDragStart(),2===t.button&&t.stopPropagation())}}),!0),document.addEventListener("pointerup",(()=>this.handleDragEnd()),!0),this.layout.on("tabCreated",(t=>{const e=t.componentItem.component;t.element.id=`tab-${e.identity.name}`,this.domEmitter.dispatchLocalEvent("tab-created",e.identity)})),this.layout.on("itemCreated",(({target:t})=>{const e=t;if(Gt.isComponentItem(e)){const t=e.component;this.domEmitter.dispatchLocalEvent("container-created",t.identity)}})),this.layout.on("itemDestroyed",(t=>{const e=t.target;if(Gt.isComponentItem(e)){const t=e.component;this.removeViewComponent(t)}})),this.layout.on("itemDropped",(()=>{this.handleDragEnd()}))}handleDragStart(){this.iframeContainer.style.pointerEvents="none"}handleDragEnd(){this.iframeContainer.style.pointerEvents=""}removeViewComponent(t){if(t.config&&!1===t.config[`${de}isClosable`]){const e=[...this.stylesheet.cssRules].findIndex((e=>e.cssText.includes(`#tab-${t.identity.name}`)));this.stylesheet.deleteRule(e)}t.destroy(),this.viewComponentsByContainerElement.delete(t.container.element),this.resizeController.unobserveContainer(t.container.element),this.reparentingViews.has(t.identity.name)?this.reparentingViews.delete(t.identity.name):this.platformProvider.closeView(t.identity.name);0===this.getCurrentViews().length&&(this.goldenLayoutDestroyed||(this.goldenLayoutDestroyed=!0,m.handleLastViewRemoved(this.layoutManager,this.identity)))}}class Pe{constructor(t,e,i,n){this.windowIdentity=t,this.connectConfig=e,this.provider=i,this.fallbackContainer=n}async createLayout(t,e){if(!("container"in t)&&!this.fallbackContainer)throw new Error("Container property is not optional in web");const{layoutName:i}=t,n=t,o=this.provider.initLayoutViews(n),s=n.container??this.fallbackContainer,r={...this.windowIdentity,layoutName:i},a=new Me(r,s,o,this.connectConfig,e,this.provider);m.registerLayout(e,i,a),this.fallbackContainer=null}async getLayoutSnapshot(t){return t.getLayoutSnapshot()}async handleLastViewRemoved(t){}}class Te{static async init(e){const i=e.getFin().InterApplicationBus.Channel,n=await i.create(`custom-frame-${e.me.uuid}`);return n.setDefaultAction((async(t,{target:e,opts:i},o)=>{const s=n.connections.find((t=>t.name===e.name));if(s)return n.dispatch(s,t,{...i,target:e});throw new Error(`Client with name ${e.name} not found`)})),await t.relayChannelClientApi_1(n,"layout-relay"),new Te(e)}constructor(t){this.wire=t,this.viewNames=new Set}normalizeOptions(t,i="default"){const n=this.wire.me.uuid;let{name:o=`internal-generated-view-${e.v4()}`}=t;return o.match(/^internal-generated-view-/)&&this.viewNames.has(o)&&"duplicate"===i&&(o=`internal-generated-view-${e.v4()}`),this.viewNames.add(o),{...t,name:o,uuid:n}}closeView(t){this.viewNames.delete(t)}initLayoutViews({layout:t,multiInstanceViewBehavior:e}){return H((t=>{if("component"===t.type&&t.componentState){const i=this.normalizeOptions(t.componentState,e);return{...t,componentState:i}}return t}),t)}}var Ae;const ke=t=>t;Ae=new WeakMap,exports.WebLayoutEntryPoint=class{constructor(e){Ae.set(this,void 0),this.initLayoutManager=async(e,i,{container:n,layoutManagerOverride:o})=>{const s=await Te.init(i),r=o??ke,a=new Pe(i.me,t.__classPrivateFieldGet(this,Ae,"f"),s,n),l=new(r(m.createClosedConstructor(a)));return await M(i,l),l},this.applyLayoutSnapshot=async(e,i,n)=>{await i.applyLayoutSnapshot(t.__classPrivateFieldGet(this,Ae,"f").platform.layoutSnapshot)},this.createLayout=async(t,e)=>m.createLayout(t,e),this.destroyLayout=async(t,e)=>m.destroyLayout(t,e),t.__classPrivateFieldSet(this,Ae,e,"f")}}; @@ -11812,7 +11812,7 @@ function version(uuid) { /******/ /************************************************************************/ var __webpack_exports__ = {}; -// This entry need to be wrapped in an IIFE because it need to be in strict mode. +// This entry needs to be wrapped in an IIFE because it needs to be in strict mode. (() => { "use strict"; var exports = __webpack_exports__; @@ -11821,8 +11821,8 @@ var exports = __webpack_exports__; \********************************/ Object.defineProperty(exports, "__esModule", ({ value: true })); -const cloud_interop_1 = __webpack_require__(/*! @openfin/cloud-interop */ "./node_modules/@openfin/cloud-interop/out/index.js"); -const core_web_1 = __webpack_require__(/*! @openfin/core-web */ "./node_modules/@openfin/core-web/out/api-client.js"); +const cloud_interop_1 = __webpack_require__(/*! @openfin/cloud-interop */ "../../node_modules/@openfin/cloud-interop/out/index.js"); +const core_web_1 = __webpack_require__(/*! @openfin/core-web */ "../../node_modules/@openfin/core-web/out/api-client.js"); const settings_1 = __webpack_require__(/*! ./platform/settings */ "./client/src/platform/settings.ts"); /** * Sets up panels if supported. diff --git a/web/v19.2.0/cloud-interop/js/provider.bundle.js.map b/web/v19.2.0/cloud-interop/js/provider.bundle.js.map index a9a4efa..dbfdc96 100644 --- a/web/v19.2.0/cloud-interop/js/provider.bundle.js.map +++ b/web/v19.2.0/cloud-interop/js/provider.bundle.js.map @@ -1 +1 @@ -{"version":3,"file":"provider.bundle.js","mappings":";;;;;;;;;;;;;;;AAAgC;;AAEhC;AACA;AACA;AACA;AACA;;AAEA;;AAEA,OAAO,UAAU;AACjB,OAAO,gBAAgB;;AAEvB;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,SAAS;AACtB;AACA,OAAO,SAAS;;AAEhB;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;;AAGA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,UAAU;AACrB;AACA,WAAW,SAAS;AACpB,aAAa;AACb;AACA,2BAA2B,oBAAoB,IAAI;AACnD;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,gCAAgC,OAAO;AACvC;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,wFAAwF,qBAAM;AAC9F,CAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,SAAS,GAAG,SAAS;AAC5C,4BAA4B;AAC5B;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA,SAAS,UAAU;AACnB;AACA;AACA;AACA;AACA;AACA,MAAM;AACN,kCAAkC;AAClC,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;;AAEA,wCAAwC,OAAO;AAC/C;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,WAAW,SAAS;AACpB,aAAa,QAAQ;AACrB;AACA,gCAAgC,WAAW,IAAI;AAC/C;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,GAAG,GAAG,WAAW;AACjB;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,kBAAkB;AAC7B,WAAW,UAAU;AACrB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B,WAAW,UAAU;AACrB;AACA,aAAa;AACb;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,0BAA0B,eAAe;;AAEzC;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;AACA;AACA,WAAW,QAAQ;AACnB;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,SAAS,QAAQ;AACjB;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,SAAS;AACpB;AACA,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,aAAa,OAAO;AACpB;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB,CAAC;;AAED;AACA,oDAAoD,YAAY;;AAEhE;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA,GAAG;;AAEH;;AAEA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA,WAAW,YAAY;AACvB;AACA,aAAa;AACb;AACA;AACA;AACA;;AAEA,mDAAmD;AACnD;AACA,CAAC;;AAED;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB,WAAW,SAAS;AACpB,WAAW,UAAU;AACrB,WAAW,SAAS;AACpB,WAAW,SAAS;AACpB,WAAW,UAAU;AACrB;AACA,aAAa;AACb;;AAEA;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B,WAAW,QAAQ;AACnB,WAAW,qBAAqB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,yEAAyE,0CAAM;AAC/E;;AAEA;AACA;;AAEA;AACA;AACA;AACA,aAAa,GAAG;AAChB,aAAa,eAAe;AAC5B,aAAa,sBAAsB;AACnC,YAAY;AACZ;AACA,eAAe,SAAS;AACxB;AACA;AACA;;AAEA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA,WAAW,qBAAqB;AAChC,WAAW,qBAAqB;AAChC;AACA,aAAa;AACb;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,UAAU;AACvB,aAAa,UAAU;AACvB;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,eAAe,SAAS;AACxB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,UAAU;AACvB;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA,WAAW,YAAY;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,4BAA4B;AACzC;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gEAAgE;AAChE;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,wBAAwB,iBAAiB;AACzC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,GAAG;;AAEH;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,MAAM;AACN;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,2BAA2B,mBAAmB;AAC9C;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,KAAK;AACL,GAAG;AACH;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,oDAAoD,MAAM;AAC1D,oDAAoD;AACpD;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;AAEA;;AAEA;AACA;AACA;AACA,WAAW,gBAAgB;AAC3B,WAAW,SAAS;AACpB;AACA,aAAa,GAAG;AAChB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;;AAEH;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,SAAS;AACpB,WAAW,SAAS;AACpB,WAAW,SAAS;AACpB;AACA,aAAa,eAAe;AAC5B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA,uCAAuC;AACvC,KAAK;;AAEL;AACA,0DAA0D,wBAAwB;AAClF;AACA,KAAK;;AAEL;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,cAAc;AACd;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc,QAAQ;AACtB,gBAAgB;AAChB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,cAAc,QAAQ;AACtB,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA,0BAA0B,KAAK;AAC/B;AACA;;AAEA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,SAAS,6BAA6B;AACtC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,8CAA8C;AAC9C,QAAQ;AACR;AACA,oEAAoE;AACpE,yFAAyF;AACzF;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;;AAEP;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;;AAGA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,yCAAyC,MAAM;AAC/C,MAAM;AACN;AACA;AACA,8CAA8C,MAAM;AACpD;AACA,CAAC;;AAED,sCAAsC,OAAO;;AAE7C;;AAEA;AACA;AACA;;AAEA,WAAW,QAAQ;AACnB;AACA;;AAEA;;AAEA,oBAAoB,YAAY;AAChC;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA,mDAAmD,GAAG;AACtD;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA,yCAAyC,IAAI;AAC7C;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,SAAS;AACtB;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAG;AACH;;AAEA,uEAAuE,WAAW;;AAElF;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,iCAAiC,SAAS;AAC1C,MAAM;AACN,6BAA6B;AAC7B,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,8CAA8C;AAC9C;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA,WAAW,mBAAmB;AAC9B,WAAW,SAAS;AACpB,WAAW,SAAS;AACpB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB;AACA,aAAa;AACb;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,eAAe;AAC5B,aAAa,SAAS;AACtB;AACA,eAAe,SAAS;AACxB;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA,oEAAoE;;AAEpE;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA;;AAEA,WAAW,yCAAyC;;AAEpD;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,gDAAgD;AAChD;AACA;AACA,yBAAyB;AACzB,KAAK;AACL;AACA,CAAC;;AAED;AACA;;AAEA;AACA;AACA,kDAAkD;AAClD;AACA;AACA;AACA,UAAU,IAAI;AACd;AACA;AACA,OAAO;AACP;AACA;;AAEA;;AAEA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA,WAAW,UAAU;AACrB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,KAAK;;AAEL;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA,WAAW,UAAU;AACrB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA,wDAAwD,iBAAiB;;AAEzE;AACA,2CAA2C,iBAAiB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,YAAY,uCAAuC,6BAA6B,uBAAuB,GAAG,EAAE,cAAc,IAAI,IAAI,IAAI,gEAAgE,kBAAkB,2CAA2C,gEAAgE,6BAA6B,aAAa,gCAAgC,mBAAmB,6BAA6B,6DAA6D,mCAAmC,sBAAsB,GAAG,eAAe,aAAa,sCAAsC,4BAA4B,SAAS,8FAA8F,iBAAiB,uCAAuC,sFAAsF,uCAAuC,SAAS,EAAE,gBAAgB,cAAc,aAAa,EAAE;AACjgqB;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,yCAAyC;AACzD;AACA;AACA,kDAAkD,uBAAuB;AACzE;AACA;AACA;AACA,aAAa;AACb;AACA,2EAA2E,uBAAuB;AAClG;AACA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,0CAAM;AACnC;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA,mEAAmE,uBAAuB;AAC1F;AACA,sDAAsD,MAAM;AAC5D,aAAa;AACb;AACA,iEAAiE,MAAM;AACvE,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA,0CAA0C,iBAAiB;AAC3D;AACA,0CAA0C,iBAAiB;AAC3D;AACA;AACA,kEAAkE,uBAAuB;AACzF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D,uBAAuB,YAAY,+BAA+B;AAC/H;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA;AACA;AACA,4BAA4B,uBAAuB,kBAAkB,+BAA+B,GAAG,aAAa;AACpH;AACA;AACA;A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;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,cAAc,SAAS;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,2CAA2C,UAAU;AACrD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;ACrJA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEY;;AAEZ,eAAe,mBAAO,CAAC,wDAAW;AAClC,gBAAgB,mBAAO,CAAC,oDAAS;AACjC;AACA;AACA;AACA;;AAEA,cAAc;AACd,kBAAkB;AAClB,yBAAyB;;AAEzB;AACA,kBAAkB;;AAElB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,kBAAkB,YAAY;AAC9B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA,wCAAwC,SAAS;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;;AAEA;AACA;AACA,cAAc,iBAAiB;AAC/B;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,iDAAiD,EAAE;AACnD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C;AAC1C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA,yBAAyB,eAAe;AACxC;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,yBAAyB,QAAQ;AACjC;AACA,sBAAsB,eAAe;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc,YAAY;AAC1B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB,sBAAsB;AACxC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,mBAAmB;AACnB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA,oBAAoB,SAAS;AAC7B;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA,qBAAqB,WAAW,GAAG,IAAI;AACvC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA,gBAAgB,WAAW,GAAG,IAAI,KAAK,aAAa;AACpD;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;;AAEA;AACA,GAAG;AACH;AACA;AACA,mBAAmB,KAAK,mDAAmD,cAAc;AACzF,GAAG;AACH;AACA;AACA,+BAA+B,IAAI;AACnC;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,MAAM,aAAa,SAAS;AACtD;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,SAAS,gBAAgB;AACzB,cAAc,oBAAoB,EAAE,IAAI;AACxC;AACA,YAAY,gBAAgB,EAAE,IAAI;AAClC;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,GAAG,SAAS,GAAG,KAAK,qBAAqB,EAAE,EAAE;AACpE,QAAQ;AACR,yBAAyB,GAAG,KAAK,yBAAyB,EAAE,EAAE;AAC9D,mBAAmB,yBAAyB,EAAE,EAAE;AAChD;AACA,MAAM;AACN,oBAAoB,IAAI,EAAE,GAAG,SAAS,IAAI,EAAE,EAAE;AAC9C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,0CAA0C,cAAc,SAAS,OAAO;AACxE;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,kBAAkB,YAAY;AAC9B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,kBAAkB,gBAAgB;AAClC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,kBAAkB,gBAAgB;AAClC;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,cAAc,YAAY;AAC1B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,QAAQ;AAC1B;AACA,oBAAoB,QAAQ;AAC5B;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;;;;;ACzjEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEa;;AAEb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB;;AAEnB;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,sBAAsB;AACxC;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA,eAAe;AACf;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA,oBAAoB,SAAS;AAC7B;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;;AAEA,kCAAkC,QAAQ;AAC1C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oBAAoB,iBAAiB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,QAAQ;AACR;AACA,uCAAuC,QAAQ;AAC/C;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,OAAO;AACzB;AACA;AACA;;AAEA;AACA,SAAS,yBAAyB;AAClC;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,gBAAgB;AAClC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,8DAA8D,YAAY;AAC1E;AACA,8DAA8D,YAAY;AAC1E;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,qCAAqC,YAAY;AACjD;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;AACA;;;;;;;;;;;AChfA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,SAAS,WAAW;;AAEpB;AACA;AACA;AACA,SAAS,WAAW;;AAEpB;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA,SAAS,WAAW;;AAEpB;AACA;AACA,SAAS,UAAU;;AAEnB;AACA;;;;;;;;;;;ACpFA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,WAAW,mBAAO,CAAC,mDAAS;;AAE5B;AACA;;AAEA;;;;;;;;;;;ACNA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,cAAc,mBAAO,CAAC,yDAAY;AAClC,cAAc,mBAAO,CAAC,yDAAY;AAClC,cAAc,mBAAO,CAAC,yDAAY;;AAElC;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA;AACA;AACA;;AAEA;AACA;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A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AChDA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACnBA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,UAAU;AACrB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACtBA,sBAAsB,mBAAO,CAAC,yEAAoB;AAClD,SAAS,mBAAO,CAAC,6CAAM;;AAEvB;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC3BA,SAAS,mBAAO,CAAC,6CAAM;;AAEvB;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpBA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,WAAW,mBAAO,CAAC,iDAAQ;;AAE3B;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AChBA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,aAAa,mBAAO,CAAC,qDAAU;;AAE/B;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAE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;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,SAAS;AACpB;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa,GAAG;AAChB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;AACA,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;;;;;;;;;;ACrKA,eAAe,mBAAO,CAAC,yDAAY;;AAEnC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;;;;;;;;;;AC7BA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,cAAc,mBAAO,CAAC,uDAAW;;AAEjC;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACnBA,aAAa,mBAAO,CAAC,uDAAW;AAChC,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,qBAAqB,mBAAO,CAAC,uEAAmB;;AAEhD;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA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;AClFA,aAAa,mBAAO,CAAC,uDAAW;AAChC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA,iBAAiB,mBAAO,CAAC,6DAAc;AACvC,eAAe,mBAAO,CAAC,2DAAa;AACpC,eAAe,mBAAO,CAAC,yDAAY;AACnC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;AACA;AACA;AACA,oCAAoC;;AAEpC;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC9CA,aAAa,mBAAO,CAAC,uDAAW;AAChC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,eAAe,mBAAO,CAAC,yDAAY;AACnC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC3DA,kBAAkB,mBAAO,CAAC,iEAAgB;AAC1C,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;;AAEA;AACA;;AA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A;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC/GA,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACzFA;AACA,wBAAwB,qBAAM,gBAAgB,qBAAM,IAAI,qBAAM,sBAAsB,qBAAM;;AAE1F;;;;;;;;;;;ACHA,qBAAqB,mBAAO,CAAC,uEAAmB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;;;;;;AChBA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,GAAG;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC7BA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACtBA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACtBA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACzBA,uBAAuB,mBAAO,CAAC,2EAAqB;AACpD,oBAAoB,mBAAO,CAAC,qEAAkB;AAC9C,kBAAkB,mBAAO,CAAC,iEAAgB;AAC1C,kBAAkB,mBAAO,CAAC,iEAAgB;AAC1C,sBAAsB,mBAAO,CAAC,yEAAoB;;AAElD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC5EA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,mBAAmB,mBAAO,CAAC,mEAAiB;AAC5C,kBAAkB,mBAAO,CAAC,iEAAgB;;AAE1C;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACxBA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACdA,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACnBA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACZA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClCA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA,W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ACA;;AAEA;;;;;;;;;;;ACrBA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;;;;;;;;;;ACjBA,gBAAgB,mBAAO,CAAC,6DAAc;;AAEtC;AACA;;AAEA;;;;;;;;;;;ACLA,cAAc,mBAAO,CAAC,yDAAY;;AAElC;AACA;;AAEA;;;;;;;;;;;ACLA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACnBA,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA,kBAAkB,KAA0B;;AAE5C;AACA,gCAAgC,QAAa;;AAE7C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ,CAAC;;AAED;;;;;;;;;;;AC7BA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACrBA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,aAAa,UAAU;AACvB;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACdA,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;ACRA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACbA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;;;;;;;;;;ACjBA,gBAAgB,mBAAO,CAAC,6DAAc;;AAEtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACdA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,GAAG;AAChB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACbA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACbA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,UAAU,mBAAO,CAAC,iDAAQ;AAC1B,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjCA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;;;;;;;;;;;ACzBA,gBAAgB,mBAAO,CAAC,6DAAc;;AAEtC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,GAAG;AAChB;AACA;AACA;AACA,oBAAoB,QAAQ,IAAI,QAAQ;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,kBAAkB;AAClB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpCA,sBAAsB,mBAAO,CAAC,yEAAoB;AAClD,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA,8BAA8B,mBAAmB;AACjD;AACA;AACA;AACA;AACA;AACA,+CAA+C,mBAAmB;AAClE;AACA;AACA;;AAEA;;;;;;;;;;;ACnCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACzBA,iBAAiB,mBAAO,CAAC,6DAAc;AACvC,eAAe,mBAAO,CAAC,yDAAY;;AAEnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AChCA,WAAW,mBAAO,CAAC,mDAAS;AAC5B,gBAAgB,mBAAO,CAAC,2DAAa;;AAErC;AACA,kBAAkB,KAA0B;;AAE5C;AACA,gCAAgC,QAAa;;AAE7C;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACrCA,kBAAkB,mBAAO,CAAC,iEAAgB;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,kBAAkB;AAClB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClCA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,eAAe,mBAAO,CAAC,yDAAY;;AAEnC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpCA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClCA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC1BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC9BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC5BA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC1BA,uBAAuB,mBAAO,CAAC,2EAAqB;AACpD,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC1BA,oBAAoB,mBAAO,CAAC,qEAAkB;AAC9C,eAAe,mBAAO,CAAC,2DAAa;AACpC,kBAAkB,mBAAO,CAAC,+DAAe;;AAEzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpCA,oBAAoB,mBAAO,CAAC,qEAAkB;AAC9C,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,kBAAkB,mBAAO,CAAC,+DAAe;;AAEzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC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AAI,GAAG,QAAQ,CAAC,aAAa,CAAkB,sBAAsB,CAAC,CAAC;IAC7E,IAAI,IAAI,KAAK,IAAI,EAAE,CAAC;QACnB,MAAM,gBAAgB,GAAG,MAAM,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAChD,MAAM,YAAY,GAAG,CAAC,MAAM,gBAAgB,CAAC,IAAI,EAAE,CAAkC,CAAC;QACtF,OAAO,YAAY,CAAC,eAAe,CAAC;IACrC,CAAC;AACF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACjDuC;AACA;AACA;AACA;AACE;AACQ;AACE;AACE;;;;;;;;;;;;;;;;ACPtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD;;AAEnD;;AAEA,oBAAoB,gBAAgB;AACpC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA,kBAAkB,cAAc;AAChC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,kBAAkB,cAAc;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,kBAAkB,aAAa;AAC/B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,iEAAe,GAAG;;;;;;;;;;;;;;;ACtNlB,iEAAe,sCAAsC;;;;;;;;;;;;;;;;ACAhB;;AAErC;AACA,OAAO,wDAAQ;AACf;AACA;;AAEA;AACA,gCAAgC;;AAEhC;AACA;AACA;AACA,qBAAqB;;AAErB;AACA,qBAAqB;;AAErB;AACA,qBAAqB;;AAErB;AACA,qBAAqB;AACrB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,iEAAe,KAAK;;;;;;;;;;;;;;;AClCpB,iEAAe,cAAc,EAAE,UAAU,EAAE,eAAe,EAAE,gBAAgB,EAAE,UAAU,GAAG,yCAAyC;;;;;;;;;;;;;;;ACApI;AACA;AACA;AACA;AACA;AACe;AACf;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;AClBA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,mDAAmD;;AAEnD;;AAEA,oBAAoB,gBAAgB;AACpC;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,mBAAmB,QAAQ;AAC3B;;AAEA,oBAAoB,QAAQ;AAC5B;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,oBAAoB,SAAS;AAC7B;;AAEA,oBAAoB,QAAQ;AAC5B;AACA;;AAEA,sBAAsB,SAAS;AAC/B;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,sBAAsB,UAAU;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA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;IAED,+DAA+D;IAC/D,MAAM,GAAG,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC;QAC9B,SAAS,EAAE,eAAe;KAC1B,CAAC,CAAC;IACH,wDAAwD;IACxD,WAAW,CAAC,QAAQ,CAAC,CAAC;AACvB,CAAC;AAED,IAAI,EAAE;KACJ,IAAI,CAAC,GAAG,EAAE;IACV,OAAO,CAAC,GAAG,CAAC,sCAAsC,CAAC,CAAC;IACpD,OAAO,IAAI,CAAC;AACb,CAAC,CAAC;KACD,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC","sources":["webpack://openfin-web--cloud-interop/./node_modules/@openfin/cloud-interop/out/index.js","webpack://openfin-web--cloud-interop/./node_modules/@openfin/core-web/out/api-client.js","webpack://openfin-web--cloud-interop/./node_modules/@openfin/core-web/out/main-8cad4070.js","webpack://openfin-web--cloud-interop/./node_modules/@openfin/core-web/out/main-b14f67c9.js","webpack://openfin-web--cloud-interop/../../node_modules/base64-js/index.js","webpack://openfin-web--cloud-interop/../../node_modules/buffer/index.js","webpack://openfin-web--cloud-interop/../../node_modules/events/events.js","webpack://openfin-web--cloud-interop/../../node_modules/ieee754/index.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_DataView.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_Hash.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_ListCache.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_Map.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_MapCache.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_Promise.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_Set.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_SetCache.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_Stack.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_Symbol.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_Uint8Array.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_WeakMap.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_arrayEach.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_arrayFilter.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_arrayLikeKeys.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_arrayPush.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_arraySome.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_assignValue.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_assocIndexOf.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseAssign.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseAssignIn.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseAssignValue.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseClone.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseCreate.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseGetAllKeys.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseGetTag.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseIsArguments.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseIsEqual.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseIsEqualDeep.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseIsMap.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseIsNative.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseIsSet.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseIsTypedArray.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseKeys.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseKeysIn.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseTimes.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseUnary.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_cacheHas.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_cloneArrayBuffer.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_cloneBuffer.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_cloneDataView.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_cloneRegExp.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_cloneSymbol.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_cloneTypedArray.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_copyArray.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_copyObject.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_copySymbols.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_copySymbolsIn.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_coreJsData.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_defineProperty.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_equalArrays.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_equalByTag.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_equalObjects.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_freeGlobal.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_getAllKeys.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_getAllKeysIn.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_getMapData.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_getNative.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_getPrototype.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_getRawTag.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_getSymbols.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_getSymbolsIn.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_getTag.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_getValue.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_hashClear.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_hashDelete.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_hashGet.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_hashHas.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_hashSet.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_initCloneArray.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_initCloneByTag.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_initCloneObject.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_isIndex.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_isKeyable.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_isMasked.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_isPrototype.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_listCacheClear.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_listCacheDelete.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_listCacheGet.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_listCacheHas.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_listCacheSet.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_mapCacheClear.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_mapCacheDelete.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_mapCacheGet.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_mapCacheHas.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_mapCacheSet.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_mapToArray.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_nativeCreate.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_nativeKeys.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_nativeKeysIn.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_nodeUtil.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_objectToString.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_overArg.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_root.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_setCacheAdd.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_setCacheHas.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_setToArray.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_stackClear.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_stackDelete.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_stackGet.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_stackHas.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_stackSet.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_toSource.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/cloneDeep.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/eq.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/isArguments.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/isArray.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/isArrayLike.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/isBuffer.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/isEqual.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/isFunction.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/isLength.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/isMap.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/isObject.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/isObjectLike.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/isSet.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/isTypedArray.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/keys.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/keysIn.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/stubArray.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/stubFalse.js","webpack://openfin-web--cloud-interop/./client/src/platform/settings.ts","webpack://openfin-web--cloud-interop/../../node_modules/uuid/dist/esm-browser/index.js","webpack://openfin-web--cloud-interop/../../node_modules/uuid/dist/esm-browser/md5.js","webpack://openfin-web--cloud-interop/../../node_modules/uuid/dist/esm-browser/nil.js","webpack://openfin-web--cloud-interop/../../node_modules/uuid/dist/esm-browser/parse.js","webpack://openfin-web--cloud-interop/../../node_modules/uuid/dist/esm-browser/regex.js","webpack://openfin-web--cloud-interop/../../node_modules/uuid/dist/esm-browser/rng.js","webpack://openfin-web--cloud-interop/../../node_modules/uuid/dist/esm-browser/sha1.js","webpack://openfin-web--cloud-interop/../../node_modules/uuid/dist/esm-browser/stringify.js","webpack://openfin-web--cloud-interop/../../node_modules/uuid/dist/esm-browser/v1.js","webpack://openfin-web--cloud-interop/../../node_modules/uuid/dist/esm-browser/v3.js","webpack://openfin-web--cloud-interop/../../node_modules/uuid/dist/esm-browser/v35.js","webpack://openfin-web--cloud-interop/../../node_modules/uuid/dist/esm-browser/v4.js","webpack://openfin-web--cloud-interop/../../node_modules/uuid/dist/esm-browser/v5.js","webpack://openfin-web--cloud-interop/../../node_modules/uuid/dist/esm-browser/validate.js","webpack://openfin-web--cloud-interop/../../node_modules/uuid/dist/esm-browser/version.js","webpack://openfin-web--cloud-interop/webpack/bootstrap","webpack://openfin-web--cloud-interop/webpack/runtime/amd options","webpack://openfin-web--cloud-interop/webpack/runtime/define property getters","webpack://openfin-web--cloud-interop/webpack/runtime/global","webpack://openfin-web--cloud-interop/webpack/runtime/hasOwnProperty shorthand","webpack://openfin-web--cloud-interop/webpack/runtime/make namespace object","webpack://openfin-web--cloud-interop/webpack/runtime/node module decorator","webpack://openfin-web--cloud-interop/./client/src/provider.ts"],"sourcesContent":["import { Buffer } from 'buffer';\n\nfunction bind(fn, thisArg) {\n return function wrap() {\n return fn.apply(thisArg, arguments);\n };\n}\n\n// utils is a library of generic helper functions non-specific to axios\n\nconst {toString} = Object.prototype;\nconst {getPrototypeOf} = Object;\n\nconst kindOf = (cache => thing => {\n const str = toString.call(thing);\n return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());\n})(Object.create(null));\n\nconst kindOfTest = (type) => {\n type = type.toLowerCase();\n return (thing) => kindOf(thing) === type\n};\n\nconst typeOfTest = type => thing => typeof thing === type;\n\n/**\n * Determine if a value is an Array\n *\n * @param {Object} val The value to test\n *\n * @returns {boolean} True if value is an Array, otherwise false\n */\nconst {isArray} = Array;\n\n/**\n * Determine if a value is undefined\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if the value is undefined, otherwise false\n */\nconst isUndefined = typeOfTest('undefined');\n\n/**\n * Determine if a value is a Buffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Buffer, otherwise false\n */\nfunction isBuffer(val) {\n return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)\n && isFunction(val.constructor.isBuffer) && val.constructor.isBuffer(val);\n}\n\n/**\n * Determine if a value is an ArrayBuffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is an ArrayBuffer, otherwise false\n */\nconst isArrayBuffer = kindOfTest('ArrayBuffer');\n\n\n/**\n * Determine if a value is a view on an ArrayBuffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false\n */\nfunction isArrayBufferView(val) {\n let result;\n if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {\n result = ArrayBuffer.isView(val);\n } else {\n result = (val) && (val.buffer) && (isArrayBuffer(val.buffer));\n }\n return result;\n}\n\n/**\n * Determine if a value is a String\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a String, otherwise false\n */\nconst isString = typeOfTest('string');\n\n/**\n * Determine if a value is a Function\n *\n * @param {*} val The value to test\n * @returns {boolean} True if value is a Function, otherwise false\n */\nconst isFunction = typeOfTest('function');\n\n/**\n * Determine if a value is a Number\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Number, otherwise false\n */\nconst isNumber = typeOfTest('number');\n\n/**\n * Determine if a value is an Object\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value is an Object, otherwise false\n */\nconst isObject = (thing) => thing !== null && typeof thing === 'object';\n\n/**\n * Determine if a value is a Boolean\n *\n * @param {*} thing The value to test\n * @returns {boolean} True if value is a Boolean, otherwise false\n */\nconst isBoolean = thing => thing === true || thing === false;\n\n/**\n * Determine if a value is a plain Object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a plain Object, otherwise false\n */\nconst isPlainObject = (val) => {\n if (kindOf(val) !== 'object') {\n return false;\n }\n\n const prototype = getPrototypeOf(val);\n return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in val) && !(Symbol.iterator in val);\n};\n\n/**\n * Determine if a value is a Date\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Date, otherwise false\n */\nconst isDate = kindOfTest('Date');\n\n/**\n * Determine if a value is a File\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a File, otherwise false\n */\nconst isFile = kindOfTest('File');\n\n/**\n * Determine if a value is a Blob\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Blob, otherwise false\n */\nconst isBlob = kindOfTest('Blob');\n\n/**\n * Determine if a value is a FileList\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a File, otherwise false\n */\nconst isFileList = kindOfTest('FileList');\n\n/**\n * Determine if a value is a Stream\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Stream, otherwise false\n */\nconst isStream = (val) => isObject(val) && isFunction(val.pipe);\n\n/**\n * Determine if a value is a FormData\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value is an FormData, otherwise false\n */\nconst isFormData = (thing) => {\n let kind;\n return thing && (\n (typeof FormData === 'function' && thing instanceof FormData) || (\n isFunction(thing.append) && (\n (kind = kindOf(thing)) === 'formdata' ||\n // detect form-data instance\n (kind === 'object' && isFunction(thing.toString) && thing.toString() === '[object FormData]')\n )\n )\n )\n};\n\n/**\n * Determine if a value is a URLSearchParams object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a URLSearchParams object, otherwise false\n */\nconst isURLSearchParams = kindOfTest('URLSearchParams');\n\n/**\n * Trim excess whitespace off the beginning and end of a string\n *\n * @param {String} str The String to trim\n *\n * @returns {String} The String freed of excess whitespace\n */\nconst trim = (str) => str.trim ?\n str.trim() : str.replace(/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g, '');\n\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n *\n * @param {Boolean} [allOwnKeys = false]\n * @returns {any}\n */\nfunction forEach(obj, fn, {allOwnKeys = false} = {}) {\n // Don't bother if no value provided\n if (obj === null || typeof obj === 'undefined') {\n return;\n }\n\n let i;\n let l;\n\n // Force an array if not already something iterable\n if (typeof obj !== 'object') {\n /*eslint no-param-reassign:0*/\n obj = [obj];\n }\n\n if (isArray(obj)) {\n // Iterate over array values\n for (i = 0, l = obj.length; i < l; i++) {\n fn.call(null, obj[i], i, obj);\n }\n } else {\n // Iterate over object keys\n const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);\n const len = keys.length;\n let key;\n\n for (i = 0; i < len; i++) {\n key = keys[i];\n fn.call(null, obj[key], key, obj);\n }\n }\n}\n\nfunction findKey(obj, key) {\n key = key.toLowerCase();\n const keys = Object.keys(obj);\n let i = keys.length;\n let _key;\n while (i-- > 0) {\n _key = keys[i];\n if (key === _key.toLowerCase()) {\n return _key;\n }\n }\n return null;\n}\n\nconst _global = (() => {\n /*eslint no-undef:0*/\n if (typeof globalThis !== \"undefined\") return globalThis;\n return typeof self !== \"undefined\" ? self : (typeof window !== 'undefined' ? window : global)\n})();\n\nconst isContextDefined = (context) => !isUndefined(context) && context !== _global;\n\n/**\n * Accepts varargs expecting each argument to be an object, then\n * immutably merges the properties of each object and returns result.\n *\n * When multiple objects contain the same key the later object in\n * the arguments list will take precedence.\n *\n * Example:\n *\n * ```js\n * var result = merge({foo: 123}, {foo: 456});\n * console.log(result.foo); // outputs 456\n * ```\n *\n * @param {Object} obj1 Object to merge\n *\n * @returns {Object} Result of all merge properties\n */\nfunction merge(/* obj1, obj2, obj3, ... */) {\n const {caseless} = isContextDefined(this) && this || {};\n const result = {};\n const assignValue = (val, key) => {\n const targetKey = caseless && findKey(result, key) || key;\n if (isPlainObject(result[targetKey]) && isPlainObject(val)) {\n result[targetKey] = merge(result[targetKey], val);\n } else if (isPlainObject(val)) {\n result[targetKey] = merge({}, val);\n } else if (isArray(val)) {\n result[targetKey] = val.slice();\n } else {\n result[targetKey] = val;\n }\n };\n\n for (let i = 0, l = arguments.length; i < l; i++) {\n arguments[i] && forEach(arguments[i], assignValue);\n }\n return result;\n}\n\n/**\n * Extends object a by mutably adding to it the properties of object b.\n *\n * @param {Object} a The object to be extended\n * @param {Object} b The object to copy properties from\n * @param {Object} thisArg The object to bind function to\n *\n * @param {Boolean} [allOwnKeys]\n * @returns {Object} The resulting value of object a\n */\nconst extend = (a, b, thisArg, {allOwnKeys}= {}) => {\n forEach(b, (val, key) => {\n if (thisArg && isFunction(val)) {\n a[key] = bind(val, thisArg);\n } else {\n a[key] = val;\n }\n }, {allOwnKeys});\n return a;\n};\n\n/**\n * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)\n *\n * @param {string} content with BOM\n *\n * @returns {string} content value without BOM\n */\nconst stripBOM = (content) => {\n if (content.charCodeAt(0) === 0xFEFF) {\n content = content.slice(1);\n }\n return content;\n};\n\n/**\n * Inherit the prototype methods from one constructor into another\n * @param {function} constructor\n * @param {function} superConstructor\n * @param {object} [props]\n * @param {object} [descriptors]\n *\n * @returns {void}\n */\nconst inherits = (constructor, superConstructor, props, descriptors) => {\n constructor.prototype = Object.create(superConstructor.prototype, descriptors);\n constructor.prototype.constructor = constructor;\n Object.defineProperty(constructor, 'super', {\n value: superConstructor.prototype\n });\n props && Object.assign(constructor.prototype, props);\n};\n\n/**\n * Resolve object with deep prototype chain to a flat object\n * @param {Object} sourceObj source object\n * @param {Object} [destObj]\n * @param {Function|Boolean} [filter]\n * @param {Function} [propFilter]\n *\n * @returns {Object}\n */\nconst toFlatObject = (sourceObj, destObj, filter, propFilter) => {\n let props;\n let i;\n let prop;\n const merged = {};\n\n destObj = destObj || {};\n // eslint-disable-next-line no-eq-null,eqeqeq\n if (sourceObj == null) return destObj;\n\n do {\n props = Object.getOwnPropertyNames(sourceObj);\n i = props.length;\n while (i-- > 0) {\n prop = props[i];\n if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) {\n destObj[prop] = sourceObj[prop];\n merged[prop] = true;\n }\n }\n sourceObj = filter !== false && getPrototypeOf(sourceObj);\n } while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype);\n\n return destObj;\n};\n\n/**\n * Determines whether a string ends with the characters of a specified string\n *\n * @param {String} str\n * @param {String} searchString\n * @param {Number} [position= 0]\n *\n * @returns {boolean}\n */\nconst endsWith = (str, searchString, position) => {\n str = String(str);\n if (position === undefined || position > str.length) {\n position = str.length;\n }\n position -= searchString.length;\n const lastIndex = str.indexOf(searchString, position);\n return lastIndex !== -1 && lastIndex === position;\n};\n\n\n/**\n * Returns new array from array like object or null if failed\n *\n * @param {*} [thing]\n *\n * @returns {?Array}\n */\nconst toArray = (thing) => {\n if (!thing) return null;\n if (isArray(thing)) return thing;\n let i = thing.length;\n if (!isNumber(i)) return null;\n const arr = new Array(i);\n while (i-- > 0) {\n arr[i] = thing[i];\n }\n return arr;\n};\n\n/**\n * Checking if the Uint8Array exists and if it does, it returns a function that checks if the\n * thing passed in is an instance of Uint8Array\n *\n * @param {TypedArray}\n *\n * @returns {Array}\n */\n// eslint-disable-next-line func-names\nconst isTypedArray = (TypedArray => {\n // eslint-disable-next-line func-names\n return thing => {\n return TypedArray && thing instanceof TypedArray;\n };\n})(typeof Uint8Array !== 'undefined' && getPrototypeOf(Uint8Array));\n\n/**\n * For each entry in the object, call the function with the key and value.\n *\n * @param {Object} obj - The object to iterate over.\n * @param {Function} fn - The function to call for each entry.\n *\n * @returns {void}\n */\nconst forEachEntry = (obj, fn) => {\n const generator = obj && obj[Symbol.iterator];\n\n const iterator = generator.call(obj);\n\n let result;\n\n while ((result = iterator.next()) && !result.done) {\n const pair = result.value;\n fn.call(obj, pair[0], pair[1]);\n }\n};\n\n/**\n * It takes a regular expression and a string, and returns an array of all the matches\n *\n * @param {string} regExp - The regular expression to match against.\n * @param {string} str - The string to search.\n *\n * @returns {Array}\n */\nconst matchAll = (regExp, str) => {\n let matches;\n const arr = [];\n\n while ((matches = regExp.exec(str)) !== null) {\n arr.push(matches);\n }\n\n return arr;\n};\n\n/* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */\nconst isHTMLForm = kindOfTest('HTMLFormElement');\n\nconst toCamelCase = str => {\n return str.toLowerCase().replace(/[-_\\s]([a-z\\d])(\\w*)/g,\n function replacer(m, p1, p2) {\n return p1.toUpperCase() + p2;\n }\n );\n};\n\n/* Creating a function that will check if an object has a property. */\nconst hasOwnProperty = (({hasOwnProperty}) => (obj, prop) => hasOwnProperty.call(obj, prop))(Object.prototype);\n\n/**\n * Determine if a value is a RegExp object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a RegExp object, otherwise false\n */\nconst isRegExp = kindOfTest('RegExp');\n\nconst reduceDescriptors = (obj, reducer) => {\n const descriptors = Object.getOwnPropertyDescriptors(obj);\n const reducedDescriptors = {};\n\n forEach(descriptors, (descriptor, name) => {\n let ret;\n if ((ret = reducer(descriptor, name, obj)) !== false) {\n reducedDescriptors[name] = ret || descriptor;\n }\n });\n\n Object.defineProperties(obj, reducedDescriptors);\n};\n\n/**\n * Makes all methods read-only\n * @param {Object} obj\n */\n\nconst freezeMethods = (obj) => {\n reduceDescriptors(obj, (descriptor, name) => {\n // skip restricted props in strict mode\n if (isFunction(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) {\n return false;\n }\n\n const value = obj[name];\n\n if (!isFunction(value)) return;\n\n descriptor.enumerable = false;\n\n if ('writable' in descriptor) {\n descriptor.writable = false;\n return;\n }\n\n if (!descriptor.set) {\n descriptor.set = () => {\n throw Error('Can not rewrite read-only method \\'' + name + '\\'');\n };\n }\n });\n};\n\nconst toObjectSet = (arrayOrString, delimiter) => {\n const obj = {};\n\n const define = (arr) => {\n arr.forEach(value => {\n obj[value] = true;\n });\n };\n\n isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter));\n\n return obj;\n};\n\nconst noop = () => {};\n\nconst toFiniteNumber = (value, defaultValue) => {\n value = +value;\n return Number.isFinite(value) ? value : defaultValue;\n};\n\nconst ALPHA = 'abcdefghijklmnopqrstuvwxyz';\n\nconst DIGIT = '0123456789';\n\nconst ALPHABET = {\n DIGIT,\n ALPHA,\n ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT\n};\n\nconst generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {\n let str = '';\n const {length} = alphabet;\n while (size--) {\n str += alphabet[Math.random() * length|0];\n }\n\n return str;\n};\n\n/**\n * If the thing is a FormData object, return true, otherwise return false.\n *\n * @param {unknown} thing - The thing to check.\n *\n * @returns {boolean}\n */\nfunction isSpecCompliantForm(thing) {\n return !!(thing && isFunction(thing.append) && thing[Symbol.toStringTag] === 'FormData' && thing[Symbol.iterator]);\n}\n\nconst toJSONObject = (obj) => {\n const stack = new Array(10);\n\n const visit = (source, i) => {\n\n if (isObject(source)) {\n if (stack.indexOf(source) >= 0) {\n return;\n }\n\n if(!('toJSON' in source)) {\n stack[i] = source;\n const target = isArray(source) ? [] : {};\n\n forEach(source, (value, key) => {\n const reducedValue = visit(value, i + 1);\n !isUndefined(reducedValue) && (target[key] = reducedValue);\n });\n\n stack[i] = undefined;\n\n return target;\n }\n }\n\n return source;\n };\n\n return visit(obj, 0);\n};\n\nconst isAsyncFn = kindOfTest('AsyncFunction');\n\nconst isThenable = (thing) =>\n thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch);\n\nvar utils$1 = {\n isArray,\n isArrayBuffer,\n isBuffer,\n isFormData,\n isArrayBufferView,\n isString,\n isNumber,\n isBoolean,\n isObject,\n isPlainObject,\n isUndefined,\n isDate,\n isFile,\n isBlob,\n isRegExp,\n isFunction,\n isStream,\n isURLSearchParams,\n isTypedArray,\n isFileList,\n forEach,\n merge,\n extend,\n trim,\n stripBOM,\n inherits,\n toFlatObject,\n kindOf,\n kindOfTest,\n endsWith,\n toArray,\n forEachEntry,\n matchAll,\n isHTMLForm,\n hasOwnProperty,\n hasOwnProp: hasOwnProperty, // an alias to avoid ESLint no-prototype-builtins detection\n reduceDescriptors,\n freezeMethods,\n toObjectSet,\n toCamelCase,\n noop,\n toFiniteNumber,\n findKey,\n global: _global,\n isContextDefined,\n ALPHABET,\n generateString,\n isSpecCompliantForm,\n toJSONObject,\n isAsyncFn,\n isThenable\n};\n\n/**\n * Create an Error with the specified message, config, error code, request and response.\n *\n * @param {string} message The error message.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [config] The config.\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n *\n * @returns {Error} The created error.\n */\nfunction AxiosError(message, code, config, request, response) {\n Error.call(this);\n\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n } else {\n this.stack = (new Error()).stack;\n }\n\n this.message = message;\n this.name = 'AxiosError';\n code && (this.code = code);\n config && (this.config = config);\n request && (this.request = request);\n response && (this.response = response);\n}\n\nutils$1.inherits(AxiosError, Error, {\n toJSON: function toJSON() {\n return {\n // Standard\n message: this.message,\n name: this.name,\n // Microsoft\n description: this.description,\n number: this.number,\n // Mozilla\n fileName: this.fileName,\n lineNumber: this.lineNumber,\n columnNumber: this.columnNumber,\n stack: this.stack,\n // Axios\n config: utils$1.toJSONObject(this.config),\n code: this.code,\n status: this.response && this.response.status ? this.response.status : null\n };\n }\n});\n\nconst prototype$1 = AxiosError.prototype;\nconst descriptors = {};\n\n[\n 'ERR_BAD_OPTION_VALUE',\n 'ERR_BAD_OPTION',\n 'ECONNABORTED',\n 'ETIMEDOUT',\n 'ERR_NETWORK',\n 'ERR_FR_TOO_MANY_REDIRECTS',\n 'ERR_DEPRECATED',\n 'ERR_BAD_RESPONSE',\n 'ERR_BAD_REQUEST',\n 'ERR_CANCELED',\n 'ERR_NOT_SUPPORT',\n 'ERR_INVALID_URL'\n// eslint-disable-next-line func-names\n].forEach(code => {\n descriptors[code] = {value: code};\n});\n\nObject.defineProperties(AxiosError, descriptors);\nObject.defineProperty(prototype$1, 'isAxiosError', {value: true});\n\n// eslint-disable-next-line func-names\nAxiosError.from = (error, code, config, request, response, customProps) => {\n const axiosError = Object.create(prototype$1);\n\n utils$1.toFlatObject(error, axiosError, function filter(obj) {\n return obj !== Error.prototype;\n }, prop => {\n return prop !== 'isAxiosError';\n });\n\n AxiosError.call(axiosError, error.message, code, config, request, response);\n\n axiosError.cause = error;\n\n axiosError.name = error.name;\n\n customProps && Object.assign(axiosError, customProps);\n\n return axiosError;\n};\n\n// eslint-disable-next-line strict\nvar httpAdapter = null;\n\n/**\n * Determines if the given thing is a array or js object.\n *\n * @param {string} thing - The object or array to be visited.\n *\n * @returns {boolean}\n */\nfunction isVisitable(thing) {\n return utils$1.isPlainObject(thing) || utils$1.isArray(thing);\n}\n\n/**\n * It removes the brackets from the end of a string\n *\n * @param {string} key - The key of the parameter.\n *\n * @returns {string} the key without the brackets.\n */\nfunction removeBrackets(key) {\n return utils$1.endsWith(key, '[]') ? key.slice(0, -2) : key;\n}\n\n/**\n * It takes a path, a key, and a boolean, and returns a string\n *\n * @param {string} path - The path to the current key.\n * @param {string} key - The key of the current object being iterated over.\n * @param {string} dots - If true, the key will be rendered with dots instead of brackets.\n *\n * @returns {string} The path to the current key.\n */\nfunction renderKey(path, key, dots) {\n if (!path) return key;\n return path.concat(key).map(function each(token, i) {\n // eslint-disable-next-line no-param-reassign\n token = removeBrackets(token);\n return !dots && i ? '[' + token + ']' : token;\n }).join(dots ? '.' : '');\n}\n\n/**\n * If the array is an array and none of its elements are visitable, then it's a flat array.\n *\n * @param {Array} arr - The array to check\n *\n * @returns {boolean}\n */\nfunction isFlatArray(arr) {\n return utils$1.isArray(arr) && !arr.some(isVisitable);\n}\n\nconst predicates = utils$1.toFlatObject(utils$1, {}, null, function filter(prop) {\n return /^is[A-Z]/.test(prop);\n});\n\n/**\n * Convert a data object to FormData\n *\n * @param {Object} obj\n * @param {?Object} [formData]\n * @param {?Object} [options]\n * @param {Function} [options.visitor]\n * @param {Boolean} [options.metaTokens = true]\n * @param {Boolean} [options.dots = false]\n * @param {?Boolean} [options.indexes = false]\n *\n * @returns {Object}\n **/\n\n/**\n * It converts an object into a FormData object\n *\n * @param {Object} obj - The object to convert to form data.\n * @param {string} formData - The FormData object to append to.\n * @param {Object} options\n *\n * @returns\n */\nfunction toFormData(obj, formData, options) {\n if (!utils$1.isObject(obj)) {\n throw new TypeError('target must be an object');\n }\n\n // eslint-disable-next-line no-param-reassign\n formData = formData || new (FormData)();\n\n // eslint-disable-next-line no-param-reassign\n options = utils$1.toFlatObject(options, {\n metaTokens: true,\n dots: false,\n indexes: false\n }, false, function defined(option, source) {\n // eslint-disable-next-line no-eq-null,eqeqeq\n return !utils$1.isUndefined(source[option]);\n });\n\n const metaTokens = options.metaTokens;\n // eslint-disable-next-line no-use-before-define\n const visitor = options.visitor || defaultVisitor;\n const dots = options.dots;\n const indexes = options.indexes;\n const _Blob = options.Blob || typeof Blob !== 'undefined' && Blob;\n const useBlob = _Blob && utils$1.isSpecCompliantForm(formData);\n\n if (!utils$1.isFunction(visitor)) {\n throw new TypeError('visitor must be a function');\n }\n\n function convertValue(value) {\n if (value === null) return '';\n\n if (utils$1.isDate(value)) {\n return value.toISOString();\n }\n\n if (!useBlob && utils$1.isBlob(value)) {\n throw new AxiosError('Blob is not supported. Use a Buffer instead.');\n }\n\n if (utils$1.isArrayBuffer(value) || utils$1.isTypedArray(value)) {\n return useBlob && typeof Blob === 'function' ? new Blob([value]) : Buffer.from(value);\n }\n\n return value;\n }\n\n /**\n * Default visitor.\n *\n * @param {*} value\n * @param {String|Number} key\n * @param {Array} path\n * @this {FormData}\n *\n * @returns {boolean} return true to visit the each prop of the value recursively\n */\n function defaultVisitor(value, key, path) {\n let arr = value;\n\n if (value && !path && typeof value === 'object') {\n if (utils$1.endsWith(key, '{}')) {\n // eslint-disable-next-line no-param-reassign\n key = metaTokens ? key : key.slice(0, -2);\n // eslint-disable-next-line no-param-reassign\n value = JSON.stringify(value);\n } else if (\n (utils$1.isArray(value) && isFlatArray(value)) ||\n ((utils$1.isFileList(value) || utils$1.endsWith(key, '[]')) && (arr = utils$1.toArray(value))\n )) {\n // eslint-disable-next-line no-param-reassign\n key = removeBrackets(key);\n\n arr.forEach(function each(el, index) {\n !(utils$1.isUndefined(el) || el === null) && formData.append(\n // eslint-disable-next-line no-nested-ternary\n indexes === true ? renderKey([key], index, dots) : (indexes === null ? key : key + '[]'),\n convertValue(el)\n );\n });\n return false;\n }\n }\n\n if (isVisitable(value)) {\n return true;\n }\n\n formData.append(renderKey(path, key, dots), convertValue(value));\n\n return false;\n }\n\n const stack = [];\n\n const exposedHelpers = Object.assign(predicates, {\n defaultVisitor,\n convertValue,\n isVisitable\n });\n\n function build(value, path) {\n if (utils$1.isUndefined(value)) return;\n\n if (stack.indexOf(value) !== -1) {\n throw Error('Circular reference detected in ' + path.join('.'));\n }\n\n stack.push(value);\n\n utils$1.forEach(value, function each(el, key) {\n const result = !(utils$1.isUndefined(el) || el === null) && visitor.call(\n formData, el, utils$1.isString(key) ? key.trim() : key, path, exposedHelpers\n );\n\n if (result === true) {\n build(el, path ? path.concat(key) : [key]);\n }\n });\n\n stack.pop();\n }\n\n if (!utils$1.isObject(obj)) {\n throw new TypeError('data must be an object');\n }\n\n build(obj);\n\n return formData;\n}\n\n/**\n * It encodes a string by replacing all characters that are not in the unreserved set with\n * their percent-encoded equivalents\n *\n * @param {string} str - The string to encode.\n *\n * @returns {string} The encoded string.\n */\nfunction encode$1(str) {\n const charMap = {\n '!': '%21',\n \"'\": '%27',\n '(': '%28',\n ')': '%29',\n '~': '%7E',\n '%20': '+',\n '%00': '\\x00'\n };\n return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) {\n return charMap[match];\n });\n}\n\n/**\n * It takes a params object and converts it to a FormData object\n *\n * @param {Object} params - The parameters to be converted to a FormData object.\n * @param {Object} options - The options object passed to the Axios constructor.\n *\n * @returns {void}\n */\nfunction AxiosURLSearchParams(params, options) {\n this._pairs = [];\n\n params && toFormData(params, this, options);\n}\n\nconst prototype = AxiosURLSearchParams.prototype;\n\nprototype.append = function append(name, value) {\n this._pairs.push([name, value]);\n};\n\nprototype.toString = function toString(encoder) {\n const _encode = encoder ? function(value) {\n return encoder.call(this, value, encode$1);\n } : encode$1;\n\n return this._pairs.map(function each(pair) {\n return _encode(pair[0]) + '=' + _encode(pair[1]);\n }, '').join('&');\n};\n\n/**\n * It replaces all instances of the characters `:`, `$`, `,`, `+`, `[`, and `]` with their\n * URI encoded counterparts\n *\n * @param {string} val The value to be encoded.\n *\n * @returns {string} The encoded value.\n */\nfunction encode(val) {\n return encodeURIComponent(val).\n replace(/%3A/gi, ':').\n replace(/%24/g, '$').\n replace(/%2C/gi, ',').\n replace(/%20/g, '+').\n replace(/%5B/gi, '[').\n replace(/%5D/gi, ']');\n}\n\n/**\n * Build a URL by appending params to the end\n *\n * @param {string} url The base of the url (e.g., http://www.google.com)\n * @param {object} [params] The params to be appended\n * @param {?object} options\n *\n * @returns {string} The formatted url\n */\nfunction buildURL(url, params, options) {\n /*eslint no-param-reassign:0*/\n if (!params) {\n return url;\n }\n \n const _encode = options && options.encode || encode;\n\n const serializeFn = options && options.serialize;\n\n let serializedParams;\n\n if (serializeFn) {\n serializedParams = serializeFn(params, options);\n } else {\n serializedParams = utils$1.isURLSearchParams(params) ?\n params.toString() :\n new AxiosURLSearchParams(params, options).toString(_encode);\n }\n\n if (serializedParams) {\n const hashmarkIndex = url.indexOf(\"#\");\n\n if (hashmarkIndex !== -1) {\n url = url.slice(0, hashmarkIndex);\n }\n url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n }\n\n return url;\n}\n\nclass InterceptorManager {\n constructor() {\n this.handlers = [];\n }\n\n /**\n * Add a new interceptor to the stack\n *\n * @param {Function} fulfilled The function to handle `then` for a `Promise`\n * @param {Function} rejected The function to handle `reject` for a `Promise`\n *\n * @return {Number} An ID used to remove interceptor later\n */\n use(fulfilled, rejected, options) {\n this.handlers.push({\n fulfilled,\n rejected,\n synchronous: options ? options.synchronous : false,\n runWhen: options ? options.runWhen : null\n });\n return this.handlers.length - 1;\n }\n\n /**\n * Remove an interceptor from the stack\n *\n * @param {Number} id The ID that was returned by `use`\n *\n * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise\n */\n eject(id) {\n if (this.handlers[id]) {\n this.handlers[id] = null;\n }\n }\n\n /**\n * Clear all interceptors from the stack\n *\n * @returns {void}\n */\n clear() {\n if (this.handlers) {\n this.handlers = [];\n }\n }\n\n /**\n * Iterate over all the registered interceptors\n *\n * This method is particularly useful for skipping over any\n * interceptors that may have become `null` calling `eject`.\n *\n * @param {Function} fn The function to call for each interceptor\n *\n * @returns {void}\n */\n forEach(fn) {\n utils$1.forEach(this.handlers, function forEachHandler(h) {\n if (h !== null) {\n fn(h);\n }\n });\n }\n}\n\nvar transitionalDefaults = {\n silentJSONParsing: true,\n forcedJSONParsing: true,\n clarifyTimeoutError: false\n};\n\nvar URLSearchParams$1 = typeof URLSearchParams !== 'undefined' ? URLSearchParams : AxiosURLSearchParams;\n\nvar FormData$1 = typeof FormData !== 'undefined' ? FormData : null;\n\nvar Blob$1 = typeof Blob !== 'undefined' ? Blob : null;\n\nvar platform$1 = {\n isBrowser: true,\n classes: {\n URLSearchParams: URLSearchParams$1,\n FormData: FormData$1,\n Blob: Blob$1\n },\n protocols: ['http', 'https', 'file', 'blob', 'url', 'data']\n};\n\nconst hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined';\n\n/**\n * Determine if we're running in a standard browser environment\n *\n * This allows axios to run in a web worker, and react-native.\n * Both environments support XMLHttpRequest, but not fully standard globals.\n *\n * web workers:\n * typeof window -> undefined\n * typeof document -> undefined\n *\n * react-native:\n * navigator.product -> 'ReactNative'\n * nativescript\n * navigator.product -> 'NativeScript' or 'NS'\n *\n * @returns {boolean}\n */\nconst hasStandardBrowserEnv = (\n (product) => {\n return hasBrowserEnv && ['ReactNative', 'NativeScript', 'NS'].indexOf(product) < 0\n })(typeof navigator !== 'undefined' && navigator.product);\n\n/**\n * Determine if we're running in a standard browser webWorker environment\n *\n * Although the `isStandardBrowserEnv` method indicates that\n * `allows axios to run in a web worker`, the WebWorker will still be\n * filtered out due to its judgment standard\n * `typeof window !== 'undefined' && typeof document !== 'undefined'`.\n * This leads to a problem when axios post `FormData` in webWorker\n */\nconst hasStandardBrowserWebWorkerEnv = (() => {\n return (\n typeof WorkerGlobalScope !== 'undefined' &&\n // eslint-disable-next-line no-undef\n self instanceof WorkerGlobalScope &&\n typeof self.importScripts === 'function'\n );\n})();\n\nvar utils = /*#__PURE__*/Object.freeze({\n __proto__: null,\n hasBrowserEnv: hasBrowserEnv,\n hasStandardBrowserEnv: hasStandardBrowserEnv,\n hasStandardBrowserWebWorkerEnv: hasStandardBrowserWebWorkerEnv\n});\n\nvar platform = {\n ...utils,\n ...platform$1\n};\n\nfunction toURLEncodedForm(data, options) {\n return toFormData(data, new platform.classes.URLSearchParams(), Object.assign({\n visitor: function(value, key, path, helpers) {\n if (platform.isNode && utils$1.isBuffer(value)) {\n this.append(key, value.toString('base64'));\n return false;\n }\n\n return helpers.defaultVisitor.apply(this, arguments);\n }\n }, options));\n}\n\n/**\n * It takes a string like `foo[x][y][z]` and returns an array like `['foo', 'x', 'y', 'z']\n *\n * @param {string} name - The name of the property to get.\n *\n * @returns An array of strings.\n */\nfunction parsePropPath(name) {\n // foo[x][y][z]\n // foo.x.y.z\n // foo-x-y-z\n // foo x y z\n return utils$1.matchAll(/\\w+|\\[(\\w*)]/g, name).map(match => {\n return match[0] === '[]' ? '' : match[1] || match[0];\n });\n}\n\n/**\n * Convert an array to an object.\n *\n * @param {Array} arr - The array to convert to an object.\n *\n * @returns An object with the same keys and values as the array.\n */\nfunction arrayToObject(arr) {\n const obj = {};\n const keys = Object.keys(arr);\n let i;\n const len = keys.length;\n let key;\n for (i = 0; i < len; i++) {\n key = keys[i];\n obj[key] = arr[key];\n }\n return obj;\n}\n\n/**\n * It takes a FormData object and returns a JavaScript object\n *\n * @param {string} formData The FormData object to convert to JSON.\n *\n * @returns {Object | null} The converted object.\n */\nfunction formDataToJSON(formData) {\n function buildPath(path, value, target, index) {\n let name = path[index++];\n\n if (name === '__proto__') return true;\n\n const isNumericKey = Number.isFinite(+name);\n const isLast = index >= path.length;\n name = !name && utils$1.isArray(target) ? target.length : name;\n\n if (isLast) {\n if (utils$1.hasOwnProp(target, name)) {\n target[name] = [target[name], value];\n } else {\n target[name] = value;\n }\n\n return !isNumericKey;\n }\n\n if (!target[name] || !utils$1.isObject(target[name])) {\n target[name] = [];\n }\n\n const result = buildPath(path, value, target[name], index);\n\n if (result && utils$1.isArray(target[name])) {\n target[name] = arrayToObject(target[name]);\n }\n\n return !isNumericKey;\n }\n\n if (utils$1.isFormData(formData) && utils$1.isFunction(formData.entries)) {\n const obj = {};\n\n utils$1.forEachEntry(formData, (name, value) => {\n buildPath(parsePropPath(name), value, obj, 0);\n });\n\n return obj;\n }\n\n return null;\n}\n\n/**\n * It takes a string, tries to parse it, and if it fails, it returns the stringified version\n * of the input\n *\n * @param {any} rawValue - The value to be stringified.\n * @param {Function} parser - A function that parses a string into a JavaScript object.\n * @param {Function} encoder - A function that takes a value and returns a string.\n *\n * @returns {string} A stringified version of the rawValue.\n */\nfunction stringifySafely(rawValue, parser, encoder) {\n if (utils$1.isString(rawValue)) {\n try {\n (parser || JSON.parse)(rawValue);\n return utils$1.trim(rawValue);\n } catch (e) {\n if (e.name !== 'SyntaxError') {\n throw e;\n }\n }\n }\n\n return (encoder || JSON.stringify)(rawValue);\n}\n\nconst defaults = {\n\n transitional: transitionalDefaults,\n\n adapter: ['xhr', 'http'],\n\n transformRequest: [function transformRequest(data, headers) {\n const contentType = headers.getContentType() || '';\n const hasJSONContentType = contentType.indexOf('application/json') > -1;\n const isObjectPayload = utils$1.isObject(data);\n\n if (isObjectPayload && utils$1.isHTMLForm(data)) {\n data = new FormData(data);\n }\n\n const isFormData = utils$1.isFormData(data);\n\n if (isFormData) {\n return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;\n }\n\n if (utils$1.isArrayBuffer(data) ||\n utils$1.isBuffer(data) ||\n utils$1.isStream(data) ||\n utils$1.isFile(data) ||\n utils$1.isBlob(data)\n ) {\n return data;\n }\n if (utils$1.isArrayBufferView(data)) {\n return data.buffer;\n }\n if (utils$1.isURLSearchParams(data)) {\n headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false);\n return data.toString();\n }\n\n let isFileList;\n\n if (isObjectPayload) {\n if (contentType.indexOf('application/x-www-form-urlencoded') > -1) {\n return toURLEncodedForm(data, this.formSerializer).toString();\n }\n\n if ((isFileList = utils$1.isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) {\n const _FormData = this.env && this.env.FormData;\n\n return toFormData(\n isFileList ? {'files[]': data} : data,\n _FormData && new _FormData(),\n this.formSerializer\n );\n }\n }\n\n if (isObjectPayload || hasJSONContentType ) {\n headers.setContentType('application/json', false);\n return stringifySafely(data);\n }\n\n return data;\n }],\n\n transformResponse: [function transformResponse(data) {\n const transitional = this.transitional || defaults.transitional;\n const forcedJSONParsing = transitional && transitional.forcedJSONParsing;\n const JSONRequested = this.responseType === 'json';\n\n if (data && utils$1.isString(data) && ((forcedJSONParsing && !this.responseType) || JSONRequested)) {\n const silentJSONParsing = transitional && transitional.silentJSONParsing;\n const strictJSONParsing = !silentJSONParsing && JSONRequested;\n\n try {\n return JSON.parse(data);\n } catch (e) {\n if (strictJSONParsing) {\n if (e.name === 'SyntaxError') {\n throw AxiosError.from(e, AxiosError.ERR_BAD_RESPONSE, this, null, this.response);\n }\n throw e;\n }\n }\n }\n\n return data;\n }],\n\n /**\n * A timeout in milliseconds to abort a request. If set to 0 (default) a\n * timeout is not created.\n */\n timeout: 0,\n\n xsrfCookieName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN',\n\n maxContentLength: -1,\n maxBodyLength: -1,\n\n env: {\n FormData: platform.classes.FormData,\n Blob: platform.classes.Blob\n },\n\n validateStatus: function validateStatus(status) {\n return status >= 200 && status < 300;\n },\n\n headers: {\n common: {\n 'Accept': 'application/json, text/plain, */*',\n 'Content-Type': undefined\n }\n }\n};\n\nutils$1.forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => {\n defaults.headers[method] = {};\n});\n\nvar defaults$1 = defaults;\n\n// RawAxiosHeaders whose duplicates are ignored by node\n// c.f. https://nodejs.org/api/http.html#http_message_headers\nconst ignoreDuplicateOf = utils$1.toObjectSet([\n 'age', 'authorization', 'content-length', 'content-type', 'etag',\n 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',\n 'last-modified', 'location', 'max-forwards', 'proxy-authorization',\n 'referer', 'retry-after', 'user-agent'\n]);\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} rawHeaders Headers needing to be parsed\n *\n * @returns {Object} Headers parsed into an object\n */\nvar parseHeaders = rawHeaders => {\n const parsed = {};\n let key;\n let val;\n let i;\n\n rawHeaders && rawHeaders.split('\\n').forEach(function parser(line) {\n i = line.indexOf(':');\n key = line.substring(0, i).trim().toLowerCase();\n val = line.substring(i + 1).trim();\n\n if (!key || (parsed[key] && ignoreDuplicateOf[key])) {\n return;\n }\n\n if (key === 'set-cookie') {\n if (parsed[key]) {\n parsed[key].push(val);\n } else {\n parsed[key] = [val];\n }\n } else {\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n }\n });\n\n return parsed;\n};\n\nconst $internals = Symbol('internals');\n\nfunction normalizeHeader(header) {\n return header && String(header).trim().toLowerCase();\n}\n\nfunction normalizeValue(value) {\n if (value === false || value == null) {\n return value;\n }\n\n return utils$1.isArray(value) ? value.map(normalizeValue) : String(value);\n}\n\nfunction parseTokens(str) {\n const tokens = Object.create(null);\n const tokensRE = /([^\\s,;=]+)\\s*(?:=\\s*([^,;]+))?/g;\n let match;\n\n while ((match = tokensRE.exec(str))) {\n tokens[match[1]] = match[2];\n }\n\n return tokens;\n}\n\nconst isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());\n\nfunction matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {\n if (utils$1.isFunction(filter)) {\n return filter.call(this, value, header);\n }\n\n if (isHeaderNameFilter) {\n value = header;\n }\n\n if (!utils$1.isString(value)) return;\n\n if (utils$1.isString(filter)) {\n return value.indexOf(filter) !== -1;\n }\n\n if (utils$1.isRegExp(filter)) {\n return filter.test(value);\n }\n}\n\nfunction formatHeader(header) {\n return header.trim()\n .toLowerCase().replace(/([a-z\\d])(\\w*)/g, (w, char, str) => {\n return char.toUpperCase() + str;\n });\n}\n\nfunction buildAccessors(obj, header) {\n const accessorName = utils$1.toCamelCase(' ' + header);\n\n ['get', 'set', 'has'].forEach(methodName => {\n Object.defineProperty(obj, methodName + accessorName, {\n value: function(arg1, arg2, arg3) {\n return this[methodName].call(this, header, arg1, arg2, arg3);\n },\n configurable: true\n });\n });\n}\n\nclass AxiosHeaders {\n constructor(headers) {\n headers && this.set(headers);\n }\n\n set(header, valueOrRewrite, rewrite) {\n const self = this;\n\n function setHeader(_value, _header, _rewrite) {\n const lHeader = normalizeHeader(_header);\n\n if (!lHeader) {\n throw new Error('header name must be a non-empty string');\n }\n\n const key = utils$1.findKey(self, lHeader);\n\n if(!key || self[key] === undefined || _rewrite === true || (_rewrite === undefined && self[key] !== false)) {\n self[key || _header] = normalizeValue(_value);\n }\n }\n\n const setHeaders = (headers, _rewrite) =>\n utils$1.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));\n\n if (utils$1.isPlainObject(header) || header instanceof this.constructor) {\n setHeaders(header, valueOrRewrite);\n } else if(utils$1.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {\n setHeaders(parseHeaders(header), valueOrRewrite);\n } else {\n header != null && setHeader(valueOrRewrite, header, rewrite);\n }\n\n return this;\n }\n\n get(header, parser) {\n header = normalizeHeader(header);\n\n if (header) {\n const key = utils$1.findKey(this, header);\n\n if (key) {\n const value = this[key];\n\n if (!parser) {\n return value;\n }\n\n if (parser === true) {\n return parseTokens(value);\n }\n\n if (utils$1.isFunction(parser)) {\n return parser.call(this, value, key);\n }\n\n if (utils$1.isRegExp(parser)) {\n return parser.exec(value);\n }\n\n throw new TypeError('parser must be boolean|regexp|function');\n }\n }\n }\n\n has(header, matcher) {\n header = normalizeHeader(header);\n\n if (header) {\n const key = utils$1.findKey(this, header);\n\n return !!(key && this[key] !== undefined && (!matcher || matchHeaderValue(this, this[key], key, matcher)));\n }\n\n return false;\n }\n\n delete(header, matcher) {\n const self = this;\n let deleted = false;\n\n function deleteHeader(_header) {\n _header = normalizeHeader(_header);\n\n if (_header) {\n const key = utils$1.findKey(self, _header);\n\n if (key && (!matcher || matchHeaderValue(self, self[key], key, matcher))) {\n delete self[key];\n\n deleted = true;\n }\n }\n }\n\n if (utils$1.isArray(header)) {\n header.forEach(deleteHeader);\n } else {\n deleteHeader(header);\n }\n\n return deleted;\n }\n\n clear(matcher) {\n const keys = Object.keys(this);\n let i = keys.length;\n let deleted = false;\n\n while (i--) {\n const key = keys[i];\n if(!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {\n delete this[key];\n deleted = true;\n }\n }\n\n return deleted;\n }\n\n normalize(format) {\n const self = this;\n const headers = {};\n\n utils$1.forEach(this, (value, header) => {\n const key = utils$1.findKey(headers, header);\n\n if (key) {\n self[key] = normalizeValue(value);\n delete self[header];\n return;\n }\n\n const normalized = format ? formatHeader(header) : String(header).trim();\n\n if (normalized !== header) {\n delete self[header];\n }\n\n self[normalized] = normalizeValue(value);\n\n headers[normalized] = true;\n });\n\n return this;\n }\n\n concat(...targets) {\n return this.constructor.concat(this, ...targets);\n }\n\n toJSON(asStrings) {\n const obj = Object.create(null);\n\n utils$1.forEach(this, (value, header) => {\n value != null && value !== false && (obj[header] = asStrings && utils$1.isArray(value) ? value.join(', ') : value);\n });\n\n return obj;\n }\n\n [Symbol.iterator]() {\n return Object.entries(this.toJSON())[Symbol.iterator]();\n }\n\n toString() {\n return Object.entries(this.toJSON()).map(([header, value]) => header + ': ' + value).join('\\n');\n }\n\n get [Symbol.toStringTag]() {\n return 'AxiosHeaders';\n }\n\n static from(thing) {\n return thing instanceof this ? thing : new this(thing);\n }\n\n static concat(first, ...targets) {\n const computed = new this(first);\n\n targets.forEach((target) => computed.set(target));\n\n return computed;\n }\n\n static accessor(header) {\n const internals = this[$internals] = (this[$internals] = {\n accessors: {}\n });\n\n const accessors = internals.accessors;\n const prototype = this.prototype;\n\n function defineAccessor(_header) {\n const lHeader = normalizeHeader(_header);\n\n if (!accessors[lHeader]) {\n buildAccessors(prototype, _header);\n accessors[lHeader] = true;\n }\n }\n\n utils$1.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);\n\n return this;\n }\n}\n\nAxiosHeaders.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']);\n\n// reserved names hotfix\nutils$1.reduceDescriptors(AxiosHeaders.prototype, ({value}, key) => {\n let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set`\n return {\n get: () => value,\n set(headerValue) {\n this[mapped] = headerValue;\n }\n }\n});\n\nutils$1.freezeMethods(AxiosHeaders);\n\nvar AxiosHeaders$1 = AxiosHeaders;\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Array|Function} fns A single function or Array of functions\n * @param {?Object} response The response object\n *\n * @returns {*} The resulting transformed data\n */\nfunction transformData(fns, response) {\n const config = this || defaults$1;\n const context = response || config;\n const headers = AxiosHeaders$1.from(context.headers);\n let data = context.data;\n\n utils$1.forEach(fns, function transform(fn) {\n data = fn.call(config, data, headers.normalize(), response ? response.status : undefined);\n });\n\n headers.normalize();\n\n return data;\n}\n\nfunction isCancel(value) {\n return !!(value && value.__CANCEL__);\n}\n\n/**\n * A `CanceledError` is an object that is thrown when an operation is canceled.\n *\n * @param {string=} message The message.\n * @param {Object=} config The config.\n * @param {Object=} request The request.\n *\n * @returns {CanceledError} The created error.\n */\nfunction CanceledError(message, config, request) {\n // eslint-disable-next-line no-eq-null,eqeqeq\n AxiosError.call(this, message == null ? 'canceled' : message, AxiosError.ERR_CANCELED, config, request);\n this.name = 'CanceledError';\n}\n\nutils$1.inherits(CanceledError, AxiosError, {\n __CANCEL__: true\n});\n\n/**\n * Resolve or reject a Promise based on response status.\n *\n * @param {Function} resolve A function that resolves the promise.\n * @param {Function} reject A function that rejects the promise.\n * @param {object} response The response.\n *\n * @returns {object} The response.\n */\nfunction settle(resolve, reject, response) {\n const validateStatus = response.config.validateStatus;\n if (!response.status || !validateStatus || validateStatus(response.status)) {\n resolve(response);\n } else {\n reject(new AxiosError(\n 'Request failed with status code ' + response.status,\n [AxiosError.ERR_BAD_REQUEST, AxiosError.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],\n response.config,\n response.request,\n response\n ));\n }\n}\n\nvar cookies = platform.hasStandardBrowserEnv ?\n\n // Standard browser envs support document.cookie\n {\n write(name, value, expires, path, domain, secure) {\n const cookie = [name + '=' + encodeURIComponent(value)];\n\n utils$1.isNumber(expires) && cookie.push('expires=' + new Date(expires).toGMTString());\n\n utils$1.isString(path) && cookie.push('path=' + path);\n\n utils$1.isString(domain) && cookie.push('domain=' + domain);\n\n secure === true && cookie.push('secure');\n\n document.cookie = cookie.join('; ');\n },\n\n read(name) {\n const match = document.cookie.match(new RegExp('(^|;\\\\s*)(' + name + ')=([^;]*)'));\n return (match ? decodeURIComponent(match[3]) : null);\n },\n\n remove(name) {\n this.write(name, '', Date.now() - 86400000);\n }\n }\n\n :\n\n // Non-standard browser env (web workers, react-native) lack needed support.\n {\n write() {},\n read() {\n return null;\n },\n remove() {}\n };\n\n/**\n * Determines whether the specified URL is absolute\n *\n * @param {string} url The URL to test\n *\n * @returns {boolean} True if the specified URL is absolute, otherwise false\n */\nfunction isAbsoluteURL(url) {\n // A URL is considered absolute if it begins with \"://\" or \"//\" (protocol-relative URL).\n // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n // by any combination of letters, digits, plus, period, or hyphen.\n return /^([a-z][a-z\\d+\\-.]*:)?\\/\\//i.test(url);\n}\n\n/**\n * Creates a new URL by combining the specified URLs\n *\n * @param {string} baseURL The base URL\n * @param {string} relativeURL The relative URL\n *\n * @returns {string} The combined URL\n */\nfunction combineURLs(baseURL, relativeURL) {\n return relativeURL\n ? baseURL.replace(/\\/?\\/$/, '') + '/' + relativeURL.replace(/^\\/+/, '')\n : baseURL;\n}\n\n/**\n * Creates a new URL by combining the baseURL with the requestedURL,\n * only when the requestedURL is not already an absolute URL.\n * If the requestURL is absolute, this function returns the requestedURL untouched.\n *\n * @param {string} baseURL The base URL\n * @param {string} requestedURL Absolute or relative URL to combine\n *\n * @returns {string} The combined full path\n */\nfunction buildFullPath(baseURL, requestedURL) {\n if (baseURL && !isAbsoluteURL(requestedURL)) {\n return combineURLs(baseURL, requestedURL);\n }\n return requestedURL;\n}\n\nvar isURLSameOrigin = platform.hasStandardBrowserEnv ?\n\n// Standard browser envs have full support of the APIs needed to test\n// whether the request URL is of the same origin as current location.\n (function standardBrowserEnv() {\n const msie = /(msie|trident)/i.test(navigator.userAgent);\n const urlParsingNode = document.createElement('a');\n let originURL;\n\n /**\n * Parse a URL to discover its components\n *\n * @param {String} url The URL to be parsed\n * @returns {Object}\n */\n function resolveURL(url) {\n let href = url;\n\n if (msie) {\n // IE needs attribute set twice to normalize properties\n urlParsingNode.setAttribute('href', href);\n href = urlParsingNode.href;\n }\n\n urlParsingNode.setAttribute('href', href);\n\n // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils\n return {\n href: urlParsingNode.href,\n protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',\n host: urlParsingNode.host,\n search: urlParsingNode.search ? urlParsingNode.search.replace(/^\\?/, '') : '',\n hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',\n hostname: urlParsingNode.hostname,\n port: urlParsingNode.port,\n pathname: (urlParsingNode.pathname.charAt(0) === '/') ?\n urlParsingNode.pathname :\n '/' + urlParsingNode.pathname\n };\n }\n\n originURL = resolveURL(window.location.href);\n\n /**\n * Determine if a URL shares the same origin as the current location\n *\n * @param {String} requestURL The URL to test\n * @returns {boolean} True if URL shares the same origin, otherwise false\n */\n return function isURLSameOrigin(requestURL) {\n const parsed = (utils$1.isString(requestURL)) ? resolveURL(requestURL) : requestURL;\n return (parsed.protocol === originURL.protocol &&\n parsed.host === originURL.host);\n };\n })() :\n\n // Non standard browser envs (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return function isURLSameOrigin() {\n return true;\n };\n })();\n\nfunction parseProtocol(url) {\n const match = /^([-+\\w]{1,25})(:?\\/\\/|:)/.exec(url);\n return match && match[1] || '';\n}\n\n/**\n * Calculate data maxRate\n * @param {Number} [samplesCount= 10]\n * @param {Number} [min= 1000]\n * @returns {Function}\n */\nfunction speedometer(samplesCount, min) {\n samplesCount = samplesCount || 10;\n const bytes = new Array(samplesCount);\n const timestamps = new Array(samplesCount);\n let head = 0;\n let tail = 0;\n let firstSampleTS;\n\n min = min !== undefined ? min : 1000;\n\n return function push(chunkLength) {\n const now = Date.now();\n\n const startedAt = timestamps[tail];\n\n if (!firstSampleTS) {\n firstSampleTS = now;\n }\n\n bytes[head] = chunkLength;\n timestamps[head] = now;\n\n let i = tail;\n let bytesCount = 0;\n\n while (i !== head) {\n bytesCount += bytes[i++];\n i = i % samplesCount;\n }\n\n head = (head + 1) % samplesCount;\n\n if (head === tail) {\n tail = (tail + 1) % samplesCount;\n }\n\n if (now - firstSampleTS < min) {\n return;\n }\n\n const passed = startedAt && now - startedAt;\n\n return passed ? Math.round(bytesCount * 1000 / passed) : undefined;\n };\n}\n\nfunction progressEventReducer(listener, isDownloadStream) {\n let bytesNotified = 0;\n const _speedometer = speedometer(50, 250);\n\n return e => {\n const loaded = e.loaded;\n const total = e.lengthComputable ? e.total : undefined;\n const progressBytes = loaded - bytesNotified;\n const rate = _speedometer(progressBytes);\n const inRange = loaded <= total;\n\n bytesNotified = loaded;\n\n const data = {\n loaded,\n total,\n progress: total ? (loaded / total) : undefined,\n bytes: progressBytes,\n rate: rate ? rate : undefined,\n estimated: rate && total && inRange ? (total - loaded) / rate : undefined,\n event: e\n };\n\n data[isDownloadStream ? 'download' : 'upload'] = true;\n\n listener(data);\n };\n}\n\nconst isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';\n\nvar xhrAdapter = isXHRAdapterSupported && function (config) {\n return new Promise(function dispatchXhrRequest(resolve, reject) {\n let requestData = config.data;\n const requestHeaders = AxiosHeaders$1.from(config.headers).normalize();\n let {responseType, withXSRFToken} = config;\n let onCanceled;\n function done() {\n if (config.cancelToken) {\n config.cancelToken.unsubscribe(onCanceled);\n }\n\n if (config.signal) {\n config.signal.removeEventListener('abort', onCanceled);\n }\n }\n\n let contentType;\n\n if (utils$1.isFormData(requestData)) {\n if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {\n requestHeaders.setContentType(false); // Let the browser set it\n } else if ((contentType = requestHeaders.getContentType()) !== false) {\n // fix semicolon duplication issue for ReactNative FormData implementation\n const [type, ...tokens] = contentType ? contentType.split(';').map(token => token.trim()).filter(Boolean) : [];\n requestHeaders.setContentType([type || 'multipart/form-data', ...tokens].join('; '));\n }\n }\n\n let request = new XMLHttpRequest();\n\n // HTTP basic authentication\n if (config.auth) {\n const username = config.auth.username || '';\n const password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : '';\n requestHeaders.set('Authorization', 'Basic ' + btoa(username + ':' + password));\n }\n\n const fullPath = buildFullPath(config.baseURL, config.url);\n\n request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);\n\n // Set the request timeout in MS\n request.timeout = config.timeout;\n\n function onloadend() {\n if (!request) {\n return;\n }\n // Prepare the response\n const responseHeaders = AxiosHeaders$1.from(\n 'getAllResponseHeaders' in request && request.getAllResponseHeaders()\n );\n const responseData = !responseType || responseType === 'text' || responseType === 'json' ?\n request.responseText : request.response;\n const response = {\n data: responseData,\n status: request.status,\n statusText: request.statusText,\n headers: responseHeaders,\n config,\n request\n };\n\n settle(function _resolve(value) {\n resolve(value);\n done();\n }, function _reject(err) {\n reject(err);\n done();\n }, response);\n\n // Clean up request\n request = null;\n }\n\n if ('onloadend' in request) {\n // Use onloadend if available\n request.onloadend = onloadend;\n } else {\n // Listen for ready state to emulate onloadend\n request.onreadystatechange = function handleLoad() {\n if (!request || request.readyState !== 4) {\n return;\n }\n\n // The request errored out and we didn't get a response, this will be\n // handled by onerror instead\n // With one exception: request that using file: protocol, most browsers\n // will return status as 0 even though it's a successful request\n if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {\n return;\n }\n // readystate handler is calling before onerror or ontimeout handlers,\n // so we should call onloadend on the next 'tick'\n setTimeout(onloadend);\n };\n }\n\n // Handle browser request cancellation (as opposed to a manual cancellation)\n request.onabort = function handleAbort() {\n if (!request) {\n return;\n }\n\n reject(new AxiosError('Request aborted', AxiosError.ECONNABORTED, config, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle low level network errors\n request.onerror = function handleError() {\n // Real errors are hidden from us by the browser\n // onerror should only fire if it's a network error\n reject(new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle timeout\n request.ontimeout = function handleTimeout() {\n let timeoutErrorMessage = config.timeout ? 'timeout of ' + config.timeout + 'ms exceeded' : 'timeout exceeded';\n const transitional = config.transitional || transitionalDefaults;\n if (config.timeoutErrorMessage) {\n timeoutErrorMessage = config.timeoutErrorMessage;\n }\n reject(new AxiosError(\n timeoutErrorMessage,\n transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED,\n config,\n request));\n\n // Clean up request\n request = null;\n };\n\n // Add xsrf header\n // This is only done if running in a standard browser environment.\n // Specifically not if we're in a web worker, or react-native.\n if(platform.hasStandardBrowserEnv) {\n withXSRFToken && utils$1.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(config));\n\n if (withXSRFToken || (withXSRFToken !== false && isURLSameOrigin(fullPath))) {\n // Add xsrf header\n const xsrfValue = config.xsrfHeaderName && config.xsrfCookieName && cookies.read(config.xsrfCookieName);\n\n if (xsrfValue) {\n requestHeaders.set(config.xsrfHeaderName, xsrfValue);\n }\n }\n }\n\n // Remove Content-Type if data is undefined\n requestData === undefined && requestHeaders.setContentType(null);\n\n // Add headers to the request\n if ('setRequestHeader' in request) {\n utils$1.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {\n request.setRequestHeader(key, val);\n });\n }\n\n // Add withCredentials to request if needed\n if (!utils$1.isUndefined(config.withCredentials)) {\n request.withCredentials = !!config.withCredentials;\n }\n\n // Add responseType to request if needed\n if (responseType && responseType !== 'json') {\n request.responseType = config.responseType;\n }\n\n // Handle progress if needed\n if (typeof config.onDownloadProgress === 'function') {\n request.addEventListener('progress', progressEventReducer(config.onDownloadProgress, true));\n }\n\n // Not all browsers support upload events\n if (typeof config.onUploadProgress === 'function' && request.upload) {\n request.upload.addEventListener('progress', progressEventReducer(config.onUploadProgress));\n }\n\n if (config.cancelToken || config.signal) {\n // Handle cancellation\n // eslint-disable-next-line func-names\n onCanceled = cancel => {\n if (!request) {\n return;\n }\n reject(!cancel || cancel.type ? new CanceledError(null, config, request) : cancel);\n request.abort();\n request = null;\n };\n\n config.cancelToken && config.cancelToken.subscribe(onCanceled);\n if (config.signal) {\n config.signal.aborted ? onCanceled() : config.signal.addEventListener('abort', onCanceled);\n }\n }\n\n const protocol = parseProtocol(fullPath);\n\n if (protocol && platform.protocols.indexOf(protocol) === -1) {\n reject(new AxiosError('Unsupported protocol ' + protocol + ':', AxiosError.ERR_BAD_REQUEST, config));\n return;\n }\n\n\n // Send the request\n request.send(requestData || null);\n });\n};\n\nconst knownAdapters = {\n http: httpAdapter,\n xhr: xhrAdapter\n};\n\nutils$1.forEach(knownAdapters, (fn, value) => {\n if (fn) {\n try {\n Object.defineProperty(fn, 'name', {value});\n } catch (e) {\n // eslint-disable-next-line no-empty\n }\n Object.defineProperty(fn, 'adapterName', {value});\n }\n});\n\nconst renderReason = (reason) => `- ${reason}`;\n\nconst isResolvedHandle = (adapter) => utils$1.isFunction(adapter) || adapter === null || adapter === false;\n\nvar adapters = {\n getAdapter: (adapters) => {\n adapters = utils$1.isArray(adapters) ? adapters : [adapters];\n\n const {length} = adapters;\n let nameOrAdapter;\n let adapter;\n\n const rejectedReasons = {};\n\n for (let i = 0; i < length; i++) {\n nameOrAdapter = adapters[i];\n let id;\n\n adapter = nameOrAdapter;\n\n if (!isResolvedHandle(nameOrAdapter)) {\n adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];\n\n if (adapter === undefined) {\n throw new AxiosError(`Unknown adapter '${id}'`);\n }\n }\n\n if (adapter) {\n break;\n }\n\n rejectedReasons[id || '#' + i] = adapter;\n }\n\n if (!adapter) {\n\n const reasons = Object.entries(rejectedReasons)\n .map(([id, state]) => `adapter ${id} ` +\n (state === false ? 'is not supported by the environment' : 'is not available in the build')\n );\n\n let s = length ?\n (reasons.length > 1 ? 'since :\\n' + reasons.map(renderReason).join('\\n') : ' ' + renderReason(reasons[0])) :\n 'as no adapter specified';\n\n throw new AxiosError(\n `There is no suitable adapter to dispatch the request ` + s,\n 'ERR_NOT_SUPPORT'\n );\n }\n\n return adapter;\n },\n adapters: knownAdapters\n};\n\n/**\n * Throws a `CanceledError` if cancellation has been requested.\n *\n * @param {Object} config The config that is to be used for the request\n *\n * @returns {void}\n */\nfunction throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n\n if (config.signal && config.signal.aborted) {\n throw new CanceledError(null, config);\n }\n}\n\n/**\n * Dispatch a request to the server using the configured adapter.\n *\n * @param {object} config The config that is to be used for the request\n *\n * @returns {Promise} The Promise to be fulfilled\n */\nfunction dispatchRequest(config) {\n throwIfCancellationRequested(config);\n\n config.headers = AxiosHeaders$1.from(config.headers);\n\n // Transform request data\n config.data = transformData.call(\n config,\n config.transformRequest\n );\n\n if (['post', 'put', 'patch'].indexOf(config.method) !== -1) {\n config.headers.setContentType('application/x-www-form-urlencoded', false);\n }\n\n const adapter = adapters.getAdapter(config.adapter || defaults$1.adapter);\n\n return adapter(config).then(function onAdapterResolution(response) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n response.data = transformData.call(\n config,\n config.transformResponse,\n response\n );\n\n response.headers = AxiosHeaders$1.from(response.headers);\n\n return response;\n }, function onAdapterRejection(reason) {\n if (!isCancel(reason)) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n if (reason && reason.response) {\n reason.response.data = transformData.call(\n config,\n config.transformResponse,\n reason.response\n );\n reason.response.headers = AxiosHeaders$1.from(reason.response.headers);\n }\n }\n\n return Promise.reject(reason);\n });\n}\n\nconst headersToObject = (thing) => thing instanceof AxiosHeaders$1 ? { ...thing } : thing;\n\n/**\n * Config-specific merge-function which creates a new config-object\n * by merging two configuration objects together.\n *\n * @param {Object} config1\n * @param {Object} config2\n *\n * @returns {Object} New object resulting from merging config2 to config1\n */\nfunction mergeConfig(config1, config2) {\n // eslint-disable-next-line no-param-reassign\n config2 = config2 || {};\n const config = {};\n\n function getMergedValue(target, source, caseless) {\n if (utils$1.isPlainObject(target) && utils$1.isPlainObject(source)) {\n return utils$1.merge.call({caseless}, target, source);\n } else if (utils$1.isPlainObject(source)) {\n return utils$1.merge({}, source);\n } else if (utils$1.isArray(source)) {\n return source.slice();\n }\n return source;\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDeepProperties(a, b, caseless) {\n if (!utils$1.isUndefined(b)) {\n return getMergedValue(a, b, caseless);\n } else if (!utils$1.isUndefined(a)) {\n return getMergedValue(undefined, a, caseless);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function valueFromConfig2(a, b) {\n if (!utils$1.isUndefined(b)) {\n return getMergedValue(undefined, b);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function defaultToConfig2(a, b) {\n if (!utils$1.isUndefined(b)) {\n return getMergedValue(undefined, b);\n } else if (!utils$1.isUndefined(a)) {\n return getMergedValue(undefined, a);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDirectKeys(a, b, prop) {\n if (prop in config2) {\n return getMergedValue(a, b);\n } else if (prop in config1) {\n return getMergedValue(undefined, a);\n }\n }\n\n const mergeMap = {\n url: valueFromConfig2,\n method: valueFromConfig2,\n data: valueFromConfig2,\n baseURL: defaultToConfig2,\n transformRequest: defaultToConfig2,\n transformResponse: defaultToConfig2,\n paramsSerializer: defaultToConfig2,\n timeout: defaultToConfig2,\n timeoutMessage: defaultToConfig2,\n withCredentials: defaultToConfig2,\n withXSRFToken: defaultToConfig2,\n adapter: defaultToConfig2,\n responseType: defaultToConfig2,\n xsrfCookieName: defaultToConfig2,\n xsrfHeaderName: defaultToConfig2,\n onUploadProgress: defaultToConfig2,\n onDownloadProgress: defaultToConfig2,\n decompress: defaultToConfig2,\n maxContentLength: defaultToConfig2,\n maxBodyLength: defaultToConfig2,\n beforeRedirect: defaultToConfig2,\n transport: defaultToConfig2,\n httpAgent: defaultToConfig2,\n httpsAgent: defaultToConfig2,\n cancelToken: defaultToConfig2,\n socketPath: defaultToConfig2,\n responseEncoding: defaultToConfig2,\n validateStatus: mergeDirectKeys,\n headers: (a, b) => mergeDeepProperties(headersToObject(a), headersToObject(b), true)\n };\n\n utils$1.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {\n const merge = mergeMap[prop] || mergeDeepProperties;\n const configValue = merge(config1[prop], config2[prop], prop);\n (utils$1.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);\n });\n\n return config;\n}\n\nconst VERSION = \"1.6.8\";\n\nconst validators$1 = {};\n\n// eslint-disable-next-line func-names\n['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach((type, i) => {\n validators$1[type] = function validator(thing) {\n return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type;\n };\n});\n\nconst deprecatedWarnings = {};\n\n/**\n * Transitional option validator\n *\n * @param {function|boolean?} validator - set to false if the transitional option has been removed\n * @param {string?} version - deprecated version / removed since version\n * @param {string?} message - some message with additional info\n *\n * @returns {function}\n */\nvalidators$1.transitional = function transitional(validator, version, message) {\n function formatMessage(opt, desc) {\n return '[Axios v' + VERSION + '] Transitional option \\'' + opt + '\\'' + desc + (message ? '. ' + message : '');\n }\n\n // eslint-disable-next-line func-names\n return (value, opt, opts) => {\n if (validator === false) {\n throw new AxiosError(\n formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')),\n AxiosError.ERR_DEPRECATED\n );\n }\n\n if (version && !deprecatedWarnings[opt]) {\n deprecatedWarnings[opt] = true;\n // eslint-disable-next-line no-console\n console.warn(\n formatMessage(\n opt,\n ' has been deprecated since v' + version + ' and will be removed in the near future'\n )\n );\n }\n\n return validator ? validator(value, opt, opts) : true;\n };\n};\n\n/**\n * Assert object's properties type\n *\n * @param {object} options\n * @param {object} schema\n * @param {boolean?} allowUnknown\n *\n * @returns {object}\n */\n\nfunction assertOptions(options, schema, allowUnknown) {\n if (typeof options !== 'object') {\n throw new AxiosError('options must be an object', AxiosError.ERR_BAD_OPTION_VALUE);\n }\n const keys = Object.keys(options);\n let i = keys.length;\n while (i-- > 0) {\n const opt = keys[i];\n const validator = schema[opt];\n if (validator) {\n const value = options[opt];\n const result = value === undefined || validator(value, opt, options);\n if (result !== true) {\n throw new AxiosError('option ' + opt + ' must be ' + result, AxiosError.ERR_BAD_OPTION_VALUE);\n }\n continue;\n }\n if (allowUnknown !== true) {\n throw new AxiosError('Unknown option ' + opt, AxiosError.ERR_BAD_OPTION);\n }\n }\n}\n\nvar validator = {\n assertOptions,\n validators: validators$1\n};\n\nconst validators = validator.validators;\n\n/**\n * Create a new instance of Axios\n *\n * @param {Object} instanceConfig The default config for the instance\n *\n * @return {Axios} A new instance of Axios\n */\nclass Axios {\n constructor(instanceConfig) {\n this.defaults = instanceConfig;\n this.interceptors = {\n request: new InterceptorManager(),\n response: new InterceptorManager()\n };\n }\n\n /**\n * Dispatch a request\n *\n * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)\n * @param {?Object} config\n *\n * @returns {Promise} The Promise to be fulfilled\n */\n async request(configOrUrl, config) {\n try {\n return await this._request(configOrUrl, config);\n } catch (err) {\n if (err instanceof Error) {\n let dummy;\n\n Error.captureStackTrace ? Error.captureStackTrace(dummy = {}) : (dummy = new Error());\n\n // slice off the Error: ... line\n const stack = dummy.stack ? dummy.stack.replace(/^.+\\n/, '') : '';\n\n if (!err.stack) {\n err.stack = stack;\n // match without the 2 top stack lines\n } else if (stack && !String(err.stack).endsWith(stack.replace(/^.+\\n.+\\n/, ''))) {\n err.stack += '\\n' + stack;\n }\n }\n\n throw err;\n }\n }\n\n _request(configOrUrl, config) {\n /*eslint no-param-reassign:0*/\n // Allow for axios('example/url'[, config]) a la fetch API\n if (typeof configOrUrl === 'string') {\n config = config || {};\n config.url = configOrUrl;\n } else {\n config = configOrUrl || {};\n }\n\n config = mergeConfig(this.defaults, config);\n\n const {transitional, paramsSerializer, headers} = config;\n\n if (transitional !== undefined) {\n validator.assertOptions(transitional, {\n silentJSONParsing: validators.transitional(validators.boolean),\n forcedJSONParsing: validators.transitional(validators.boolean),\n clarifyTimeoutError: validators.transitional(validators.boolean)\n }, false);\n }\n\n if (paramsSerializer != null) {\n if (utils$1.isFunction(paramsSerializer)) {\n config.paramsSerializer = {\n serialize: paramsSerializer\n };\n } else {\n validator.assertOptions(paramsSerializer, {\n encode: validators.function,\n serialize: validators.function\n }, true);\n }\n }\n\n // Set config.method\n config.method = (config.method || this.defaults.method || 'get').toLowerCase();\n\n // Flatten headers\n let contextHeaders = headers && utils$1.merge(\n headers.common,\n headers[config.method]\n );\n\n headers && utils$1.forEach(\n ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],\n (method) => {\n delete headers[method];\n }\n );\n\n config.headers = AxiosHeaders$1.concat(contextHeaders, headers);\n\n // filter out skipped interceptors\n const requestInterceptorChain = [];\n let synchronousRequestInterceptors = true;\n this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) {\n return;\n }\n\n synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;\n\n requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);\n });\n\n const responseInterceptorChain = [];\n this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);\n });\n\n let promise;\n let i = 0;\n let len;\n\n if (!synchronousRequestInterceptors) {\n const chain = [dispatchRequest.bind(this), undefined];\n chain.unshift.apply(chain, requestInterceptorChain);\n chain.push.apply(chain, responseInterceptorChain);\n len = chain.length;\n\n promise = Promise.resolve(config);\n\n while (i < len) {\n promise = promise.then(chain[i++], chain[i++]);\n }\n\n return promise;\n }\n\n len = requestInterceptorChain.length;\n\n let newConfig = config;\n\n i = 0;\n\n while (i < len) {\n const onFulfilled = requestInterceptorChain[i++];\n const onRejected = requestInterceptorChain[i++];\n try {\n newConfig = onFulfilled(newConfig);\n } catch (error) {\n onRejected.call(this, error);\n break;\n }\n }\n\n try {\n promise = dispatchRequest.call(this, newConfig);\n } catch (error) {\n return Promise.reject(error);\n }\n\n i = 0;\n len = responseInterceptorChain.length;\n\n while (i < len) {\n promise = promise.then(responseInterceptorChain[i++], responseInterceptorChain[i++]);\n }\n\n return promise;\n }\n\n getUri(config) {\n config = mergeConfig(this.defaults, config);\n const fullPath = buildFullPath(config.baseURL, config.url);\n return buildURL(fullPath, config.params, config.paramsSerializer);\n }\n}\n\n// Provide aliases for supported request methods\nutils$1.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, config) {\n return this.request(mergeConfig(config || {}, {\n method,\n url,\n data: (config || {}).data\n }));\n };\n});\n\nutils$1.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n /*eslint func-names:0*/\n\n function generateHTTPMethod(isForm) {\n return function httpMethod(url, data, config) {\n return this.request(mergeConfig(config || {}, {\n method,\n headers: isForm ? {\n 'Content-Type': 'multipart/form-data'\n } : {},\n url,\n data\n }));\n };\n }\n\n Axios.prototype[method] = generateHTTPMethod();\n\n Axios.prototype[method + 'Form'] = generateHTTPMethod(true);\n});\n\nvar Axios$1 = Axios;\n\n/**\n * A `CancelToken` is an object that can be used to request cancellation of an operation.\n *\n * @param {Function} executor The executor function.\n *\n * @returns {CancelToken}\n */\nclass CancelToken {\n constructor(executor) {\n if (typeof executor !== 'function') {\n throw new TypeError('executor must be a function.');\n }\n\n let resolvePromise;\n\n this.promise = new Promise(function promiseExecutor(resolve) {\n resolvePromise = resolve;\n });\n\n const token = this;\n\n // eslint-disable-next-line func-names\n this.promise.then(cancel => {\n if (!token._listeners) return;\n\n let i = token._listeners.length;\n\n while (i-- > 0) {\n token._listeners[i](cancel);\n }\n token._listeners = null;\n });\n\n // eslint-disable-next-line func-names\n this.promise.then = onfulfilled => {\n let _resolve;\n // eslint-disable-next-line func-names\n const promise = new Promise(resolve => {\n token.subscribe(resolve);\n _resolve = resolve;\n }).then(onfulfilled);\n\n promise.cancel = function reject() {\n token.unsubscribe(_resolve);\n };\n\n return promise;\n };\n\n executor(function cancel(message, config, request) {\n if (token.reason) {\n // Cancellation has already been requested\n return;\n }\n\n token.reason = new CanceledError(message, config, request);\n resolvePromise(token.reason);\n });\n }\n\n /**\n * Throws a `CanceledError` if cancellation has been requested.\n */\n throwIfRequested() {\n if (this.reason) {\n throw this.reason;\n }\n }\n\n /**\n * Subscribe to the cancel signal\n */\n\n subscribe(listener) {\n if (this.reason) {\n listener(this.reason);\n return;\n }\n\n if (this._listeners) {\n this._listeners.push(listener);\n } else {\n this._listeners = [listener];\n }\n }\n\n /**\n * Unsubscribe from the cancel signal\n */\n\n unsubscribe(listener) {\n if (!this._listeners) {\n return;\n }\n const index = this._listeners.indexOf(listener);\n if (index !== -1) {\n this._listeners.splice(index, 1);\n }\n }\n\n /**\n * Returns an object that contains a new `CancelToken` and a function that, when called,\n * cancels the `CancelToken`.\n */\n static source() {\n let cancel;\n const token = new CancelToken(function executor(c) {\n cancel = c;\n });\n return {\n token,\n cancel\n };\n }\n}\n\nvar CancelToken$1 = CancelToken;\n\n/**\n * Syntactic sugar for invoking a function and expanding an array for arguments.\n *\n * Common use case would be to use `Function.prototype.apply`.\n *\n * ```js\n * function f(x, y, z) {}\n * var args = [1, 2, 3];\n * f.apply(null, args);\n * ```\n *\n * With `spread` this example can be re-written.\n *\n * ```js\n * spread(function(x, y, z) {})([1, 2, 3]);\n * ```\n *\n * @param {Function} callback\n *\n * @returns {Function}\n */\nfunction spread(callback) {\n return function wrap(arr) {\n return callback.apply(null, arr);\n };\n}\n\n/**\n * Determines whether the payload is an error thrown by Axios\n *\n * @param {*} payload The value to test\n *\n * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false\n */\nfunction isAxiosError(payload) {\n return utils$1.isObject(payload) && (payload.isAxiosError === true);\n}\n\nconst HttpStatusCode = {\n Continue: 100,\n SwitchingProtocols: 101,\n Processing: 102,\n EarlyHints: 103,\n Ok: 200,\n Created: 201,\n Accepted: 202,\n NonAuthoritativeInformation: 203,\n NoContent: 204,\n ResetContent: 205,\n PartialContent: 206,\n MultiStatus: 207,\n AlreadyReported: 208,\n ImUsed: 226,\n MultipleChoices: 300,\n MovedPermanently: 301,\n Found: 302,\n SeeOther: 303,\n NotModified: 304,\n UseProxy: 305,\n Unused: 306,\n TemporaryRedirect: 307,\n PermanentRedirect: 308,\n BadRequest: 400,\n Unauthorized: 401,\n PaymentRequired: 402,\n Forbidden: 403,\n NotFound: 404,\n MethodNotAllowed: 405,\n NotAcceptable: 406,\n ProxyAuthenticationRequired: 407,\n RequestTimeout: 408,\n Conflict: 409,\n Gone: 410,\n LengthRequired: 411,\n PreconditionFailed: 412,\n PayloadTooLarge: 413,\n UriTooLong: 414,\n UnsupportedMediaType: 415,\n RangeNotSatisfiable: 416,\n ExpectationFailed: 417,\n ImATeapot: 418,\n MisdirectedRequest: 421,\n UnprocessableEntity: 422,\n Locked: 423,\n FailedDependency: 424,\n TooEarly: 425,\n UpgradeRequired: 426,\n PreconditionRequired: 428,\n TooManyRequests: 429,\n RequestHeaderFieldsTooLarge: 431,\n UnavailableForLegalReasons: 451,\n InternalServerError: 500,\n NotImplemented: 501,\n BadGateway: 502,\n ServiceUnavailable: 503,\n GatewayTimeout: 504,\n HttpVersionNotSupported: 505,\n VariantAlsoNegotiates: 506,\n InsufficientStorage: 507,\n LoopDetected: 508,\n NotExtended: 510,\n NetworkAuthenticationRequired: 511,\n};\n\nObject.entries(HttpStatusCode).forEach(([key, value]) => {\n HttpStatusCode[value] = key;\n});\n\nvar HttpStatusCode$1 = HttpStatusCode;\n\n/**\n * Create an instance of Axios\n *\n * @param {Object} defaultConfig The default config for the instance\n *\n * @returns {Axios} A new instance of Axios\n */\nfunction createInstance(defaultConfig) {\n const context = new Axios$1(defaultConfig);\n const instance = bind(Axios$1.prototype.request, context);\n\n // Copy axios.prototype to instance\n utils$1.extend(instance, Axios$1.prototype, context, {allOwnKeys: true});\n\n // Copy context to instance\n utils$1.extend(instance, context, null, {allOwnKeys: true});\n\n // Factory for creating new instances\n instance.create = function create(instanceConfig) {\n return createInstance(mergeConfig(defaultConfig, instanceConfig));\n };\n\n return instance;\n}\n\n// Create the default instance to be exported\nconst axios = createInstance(defaults$1);\n\n// Expose Axios class to allow class inheritance\naxios.Axios = Axios$1;\n\n// Expose Cancel & CancelToken\naxios.CanceledError = CanceledError;\naxios.CancelToken = CancelToken$1;\naxios.isCancel = isCancel;\naxios.VERSION = VERSION;\naxios.toFormData = toFormData;\n\n// Expose AxiosError class\naxios.AxiosError = AxiosError;\n\n// alias for CanceledError for backward compatibility\naxios.Cancel = axios.CanceledError;\n\n// Expose all/spread\naxios.all = function all(promises) {\n return Promise.all(promises);\n};\n\naxios.spread = spread;\n\n// Expose isAxiosError\naxios.isAxiosError = isAxiosError;\n\n// Expose mergeConfig\naxios.mergeConfig = mergeConfig;\n\naxios.AxiosHeaders = AxiosHeaders$1;\n\naxios.formToJSON = thing => formDataToJSON(utils$1.isHTMLForm(thing) ? new FormData(thing) : thing);\n\naxios.getAdapter = adapters.getAdapter;\n\naxios.HttpStatusCode = HttpStatusCode$1;\n\naxios.default = axios;\n\nvar ds=Object.defineProperty;var zg=Object.getOwnPropertyDescriptor;var Kg=Object.getOwnPropertyNames;var Gg=Object.prototype.hasOwnProperty;var we=(t,e)=>()=>(t&&(e=t(t=0)),e);var M=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Qt=(t,e)=>{for(var r in e)ds(t,r,{get:e[r],enumerable:!0});},Qg=(t,e,r,i)=>{if(e&&typeof e==\"object\"||typeof e==\"function\")for(let n of Kg(e))!Gg.call(t,n)&&n!==r&&ds(t,n,{get:()=>e[n],enumerable:!(i=zg(e,n))||i.enumerable});return t};var X=t=>Qg(ds({},\"__esModule\",{value:!0}),t);var B,_=we(()=>{B={deviceMemory:8,hardwareConcurrency:8,language:\"en-US\"};});var P={};Qt(P,{_debugEnd:()=>yu,_debugProcess:()=>gu,_events:()=>ku,_eventsCount:()=>xu,_exiting:()=>Yl,_fatalExceptions:()=>cu,_getActiveHandles:()=>eu,_getActiveRequests:()=>Zl,_kill:()=>ru,_linkedBinding:()=>Gl,_maxListeners:()=>Ou,_preload_modules:()=>Cu,_rawDebug:()=>zl,_startProfilerIdleNotifier:()=>bu,_stopProfilerIdleNotifier:()=>wu,_tickCallback:()=>pu,abort:()=>Eu,addListener:()=>Mu,allowedNodeEnvironmentFlags:()=>lu,arch:()=>xl,argv:()=>Ul,argv0:()=>Ru,assert:()=>uu,binding:()=>Fl,chdir:()=>Hl,config:()=>Jl,cpuUsage:()=>Fi,cwd:()=>$l,debugPort:()=>Tu,default:()=>$u,dlopen:()=>Xl,domain:()=>Ql,emit:()=>Du,emitWarning:()=>jl,env:()=>Ll,execArgv:()=>Nl,execPath:()=>Iu,exit:()=>ou,features:()=>fu,hasUncaughtExceptionCaptureCallback:()=>du,hrtime:()=>ji,kill:()=>su,listeners:()=>Wu,memoryUsage:()=>nu,moduleLoadList:()=>Kl,nextTick:()=>Pl,off:()=>Uu,on:()=>bt,once:()=>Lu,openStdin:()=>au,pid:()=>Su,platform:()=>Ml,ppid:()=>Au,prependListener:()=>ju,prependOnceListener:()=>Fu,reallyExit:()=>tu,release:()=>Vl,removeAllListeners:()=>qu,removeListener:()=>Nu,resourceUsage:()=>iu,setSourceMapsEnabled:()=>Bu,setUncaughtExceptionCaptureCallback:()=>hu,stderr:()=>mu,stdin:()=>vu,stdout:()=>_u,title:()=>kl,umask:()=>Wl,uptime:()=>Pu,version:()=>ql,versions:()=>Dl});function ys(t){throw new Error(\"Node.js process \"+t+\" is not supported by JSPM core outside of Node.js\")}function Yg(){!xr||!Yt||(xr=!1,Yt.length?yt=Yt.concat(yt):Di=-1,yt.length&&Bl());}function Bl(){if(!xr){var t=setTimeout(Yg,0);xr=!0;for(var e=yt.length;e;){for(Yt=yt,yt=[];++Di1)for(var r=1;r{v();m();_();yt=[],xr=!1,Di=-1;Ol.prototype.run=function(){this.fun.apply(null,this.array);};kl=\"browser\",xl=\"x64\",Ml=\"browser\",Ll={PATH:\"/usr/bin\",LANG:B.language+\".UTF-8\",PWD:\"/\",HOME:\"/home\",TMP:\"/tmp\"},Ul=[\"/usr/bin/node\"],Nl=[],ql=\"v16.8.0\",Dl={},jl=function(t,e){console.warn((e?e+\": \":\"\")+t);},Fl=function(t){ys(\"binding\");},Wl=function(t){return 0},$l=function(){return \"/\"},Hl=function(t){},Vl={name:\"node\",sourceUrl:\"\",headersUrl:\"\",libUrl:\"\"};zl=ve,Kl=[];Ql={},Yl=!1,Jl={};tu=ve,ru=ve,Fi=function(){return {}},iu=Fi,nu=Fi,su=ve,ou=ve,au=ve,lu={};fu={inspector:!1,debug:!1,uv:!1,ipv6:!1,tls_alpn:!1,tls_sni:!1,tls_ocsp:!1,tls:!1,cached_builtins:!0},cu=ve,hu=ve;pu=ve,gu=ve,yu=ve,bu=ve,wu=ve,_u=void 0,mu=void 0,vu=void 0,Eu=ve,Su=2,Au=1,Iu=\"/bin/usr/node\",Tu=9229,Ru=\"node\",Cu=[],Bu=ve,Mt={now:typeof performance<\"u\"?performance.now.bind(performance):void 0,timing:typeof performance<\"u\"?performance.timing:void 0};Mt.now===void 0&&(ps=Date.now(),Mt.timing&&Mt.timing.navigationStart&&(ps=Mt.timing.navigationStart),Mt.now=()=>Date.now()-ps);gs=1e9;ji.bigint=function(t){var e=ji(t);return typeof BigInt>\"u\"?e[0]*gs+e[1]:BigInt(e[0]*gs)+BigInt(e[1])};Ou=10,ku={},xu=0;Mu=bt,Lu=bt,Uu=bt,Nu=bt,qu=bt,Du=ve,ju=bt,Fu=bt;$u={version:ql,versions:Dl,arch:xl,platform:Ml,release:Vl,_rawDebug:zl,moduleLoadList:Kl,binding:Fl,_linkedBinding:Gl,_events:ku,_eventsCount:xu,_maxListeners:Ou,on:bt,addListener:Mu,once:Lu,off:Uu,removeListener:Nu,removeAllListeners:qu,emit:Du,prependListener:ju,prependOnceListener:Fu,listeners:Wu,domain:Ql,_exiting:Yl,config:Jl,dlopen:Xl,uptime:Pu,_getActiveRequests:Zl,_getActiveHandles:eu,reallyExit:tu,_kill:ru,cpuUsage:Fi,resourceUsage:iu,memoryUsage:nu,kill:su,exit:ou,openStdin:au,allowedNodeEnvironmentFlags:lu,assert:uu,features:fu,_fatalExceptions:cu,setUncaughtExceptionCaptureCallback:hu,hasUncaughtExceptionCaptureCallback:du,emitWarning:jl,nextTick:Pl,_tickCallback:pu,_debugProcess:gu,_debugEnd:yu,_startProfilerIdleNotifier:bu,_stopProfilerIdleNotifier:wu,stdout:_u,stdin:vu,stderr:mu,abort:Eu,umask:Wl,chdir:Hl,cwd:$l,env:Ll,title:kl,argv:Ul,execArgv:Nl,pid:Su,ppid:Au,execPath:Iu,debugPort:Tu,hrtime:ji,argv0:Ru,_preload_modules:Cu,setSourceMapsEnabled:Bu};});var m=we(()=>{Hu();});var _e={};Qt(_e,{Buffer:()=>x,INSPECT_MAX_BYTES:()=>ey,default:()=>Lt,kMaxLength:()=>ty});function Jg(){if(Vu)return ui;Vu=!0,ui.byteLength=a,ui.toByteArray=c,ui.fromByteArray=g;for(var t=[],e=[],r=typeof Uint8Array<\"u\"?Uint8Array:Array,i=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\",n=0,o=i.length;n0)throw new Error(\"Invalid string. Length must be a multiple of 4\");var E=y.indexOf(\"=\");E===-1&&(E=w);var S=E===w?0:4-E%4;return [E,S]}function a(y){var w=s(y),E=w[0],S=w[1];return (E+S)*3/4-S}function u(y,w,E){return (w+E)*3/4-E}function c(y){var w,E=s(y),S=E[0],I=E[1],C=new r(u(y,S,I)),R=0,U=I>0?S-4:S,N;for(N=0;N>16&255,C[R++]=w>>8&255,C[R++]=w&255;return I===2&&(w=e[y.charCodeAt(N)]<<2|e[y.charCodeAt(N+1)]>>4,C[R++]=w&255),I===1&&(w=e[y.charCodeAt(N)]<<10|e[y.charCodeAt(N+1)]<<4|e[y.charCodeAt(N+2)]>>2,C[R++]=w>>8&255,C[R++]=w&255),C}function h(y){return t[y>>18&63]+t[y>>12&63]+t[y>>6&63]+t[y&63]}function d(y,w,E){for(var S,I=[],C=w;CU?U:R+C));return S===1?(w=y[E-1],I.push(t[w>>2]+t[w<<4&63]+\"==\")):S===2&&(w=(y[E-2]<<8)+y[E-1],I.push(t[w>>10]+t[w>>4&63]+t[w<<2&63]+\"=\")),I.join(\"\")}return ui}function Xg(){if(zu)return Wi;zu=!0;return Wi.read=function(t,e,r,i,n){var o,s,a=n*8-i-1,u=(1<>1,h=-7,d=r?n-1:0,g=r?-1:1,y=t[e+d];for(d+=g,o=y&(1<<-h)-1,y>>=-h,h+=a;h>0;o=o*256+t[e+d],d+=g,h-=8);for(s=o&(1<<-h)-1,o>>=-h,h+=i;h>0;s=s*256+t[e+d],d+=g,h-=8);if(o===0)o=1-c;else {if(o===u)return s?NaN:(y?-1:1)*(1/0);s=s+Math.pow(2,i),o=o-c;}return (y?-1:1)*s*Math.pow(2,o-i)},Wi.write=function(t,e,r,i,n,o){var s,a,u,c=o*8-n-1,h=(1<>1,g=n===23?Math.pow(2,-24)-Math.pow(2,-77):0,y=i?0:o-1,w=i?1:-1,E=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=h):(s=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-s))<1&&(s--,u*=2),s+d>=1?e+=g/u:e+=g*Math.pow(2,1-d),e*u>=2&&(s++,u/=2),s+d>=h?(a=0,s=h):s+d>=1?(a=(e*u-1)*Math.pow(2,n),s=s+d):(a=e*Math.pow(2,d-1)*Math.pow(2,n),s=0));n>=8;t[r+y]=a&255,y+=w,a/=256,n-=8);for(s=s<0;t[r+y]=s&255,y+=w,s/=256,c-=8);t[r+y-w]|=E*128;},Wi}function Zg(){if(Ku)return Jt;Ku=!0;let t=Jg(),e=Xg(),r=typeof Symbol==\"function\"&&typeof Symbol.for==\"function\"?Symbol.for(\"nodejs.util.inspect.custom\"):null;Jt.Buffer=s,Jt.SlowBuffer=I,Jt.INSPECT_MAX_BYTES=50;let i=2147483647;Jt.kMaxLength=i,s.TYPED_ARRAY_SUPPORT=n(),!s.TYPED_ARRAY_SUPPORT&&typeof console<\"u\"&&typeof console.error==\"function\"&&console.error(\"This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.\");function n(){try{let p=new Uint8Array(1),l={foo:function(){return 42}};return Object.setPrototypeOf(l,Uint8Array.prototype),Object.setPrototypeOf(p,l),p.foo()===42}catch{return !1}}Object.defineProperty(s.prototype,\"parent\",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),Object.defineProperty(s.prototype,\"offset\",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}});function o(p){if(p>i)throw new RangeError('The value \"'+p+'\" is invalid for option \"size\"');let l=new Uint8Array(p);return Object.setPrototypeOf(l,s.prototype),l}function s(p,l,f){if(typeof p==\"number\"){if(typeof l==\"string\")throw new TypeError('The \"string\" argument must be of type string. Received type number');return h(p)}return a(p,l,f)}s.poolSize=8192;function a(p,l,f){if(typeof p==\"string\")return d(p,l);if(ArrayBuffer.isView(p))return y(p);if(p==null)throw new TypeError(\"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type \"+typeof p);if(Ye(p,ArrayBuffer)||p&&Ye(p.buffer,ArrayBuffer)||typeof SharedArrayBuffer<\"u\"&&(Ye(p,SharedArrayBuffer)||p&&Ye(p.buffer,SharedArrayBuffer)))return w(p,l,f);if(typeof p==\"number\")throw new TypeError('The \"value\" argument must not be of type number. Received type number');let b=p.valueOf&&p.valueOf();if(b!=null&&b!==p)return s.from(b,l,f);let A=E(p);if(A)return A;if(typeof Symbol<\"u\"&&Symbol.toPrimitive!=null&&typeof p[Symbol.toPrimitive]==\"function\")return s.from(p[Symbol.toPrimitive](\"string\"),l,f);throw new TypeError(\"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type \"+typeof p)}s.from=function(p,l,f){return a(p,l,f)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array);function u(p){if(typeof p!=\"number\")throw new TypeError('\"size\" argument must be of type number');if(p<0)throw new RangeError('The value \"'+p+'\" is invalid for option \"size\"')}function c(p,l,f){return u(p),p<=0?o(p):l!==void 0?typeof f==\"string\"?o(p).fill(l,f):o(p).fill(l):o(p)}s.alloc=function(p,l,f){return c(p,l,f)};function h(p){return u(p),o(p<0?0:S(p)|0)}s.allocUnsafe=function(p){return h(p)},s.allocUnsafeSlow=function(p){return h(p)};function d(p,l){if((typeof l!=\"string\"||l===\"\")&&(l=\"utf8\"),!s.isEncoding(l))throw new TypeError(\"Unknown encoding: \"+l);let f=C(p,l)|0,b=o(f),A=b.write(p,l);return A!==f&&(b=b.slice(0,A)),b}function g(p){let l=p.length<0?0:S(p.length)|0,f=o(l);for(let b=0;b=i)throw new RangeError(\"Attempt to allocate Buffer larger than maximum size: 0x\"+i.toString(16)+\" bytes\");return p|0}function I(p){return +p!=p&&(p=0),s.alloc(+p)}s.isBuffer=function(l){return l!=null&&l._isBuffer===!0&&l!==s.prototype},s.compare=function(l,f){if(Ye(l,Uint8Array)&&(l=s.from(l,l.offset,l.byteLength)),Ye(f,Uint8Array)&&(f=s.from(f,f.offset,f.byteLength)),!s.isBuffer(l)||!s.isBuffer(f))throw new TypeError('The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array');if(l===f)return 0;let b=l.length,A=f.length;for(let T=0,O=Math.min(b,A);TA.length?(s.isBuffer(O)||(O=s.from(O)),O.copy(A,T)):Uint8Array.prototype.set.call(A,O,T);else if(s.isBuffer(O))O.copy(A,T);else throw new TypeError('\"list\" argument must be an Array of Buffers');T+=O.length;}return A};function C(p,l){if(s.isBuffer(p))return p.length;if(ArrayBuffer.isView(p)||Ye(p,ArrayBuffer))return p.byteLength;if(typeof p!=\"string\")throw new TypeError('The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof p);let f=p.length,b=arguments.length>2&&arguments[2]===!0;if(!b&&f===0)return 0;let A=!1;for(;;)switch(l){case\"ascii\":case\"latin1\":case\"binary\":return f;case\"utf8\":case\"utf-8\":return cs(p).length;case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return f*2;case\"hex\":return f>>>1;case\"base64\":return Cl(p).length;default:if(A)return b?-1:cs(p).length;l=(\"\"+l).toLowerCase(),A=!0;}}s.byteLength=C;function R(p,l,f){let b=!1;if((l===void 0||l<0)&&(l=0),l>this.length||((f===void 0||f>this.length)&&(f=this.length),f<=0)||(f>>>=0,l>>>=0,f<=l))return \"\";for(p||(p=\"utf8\");;)switch(p){case\"hex\":return Ng(this,l,f);case\"utf8\":case\"utf-8\":return Cr(this,l,f);case\"ascii\":return us(this,l,f);case\"latin1\":case\"binary\":return Ug(this,l,f);case\"base64\":return pe(this,l,f);case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return qg(this,l,f);default:if(b)throw new TypeError(\"Unknown encoding: \"+p);p=(p+\"\").toLowerCase(),b=!0;}}s.prototype._isBuffer=!0;function U(p,l,f){let b=p[l];p[l]=p[f],p[f]=b;}s.prototype.swap16=function(){let l=this.length;if(l%2!==0)throw new RangeError(\"Buffer size must be a multiple of 16-bits\");for(let f=0;ff&&(l+=\" ... \"),\"\"},r&&(s.prototype[r]=s.prototype.inspect),s.prototype.compare=function(l,f,b,A,T){if(Ye(l,Uint8Array)&&(l=s.from(l,l.offset,l.byteLength)),!s.isBuffer(l))throw new TypeError('The \"target\" argument must be one of type Buffer or Uint8Array. Received type '+typeof l);if(f===void 0&&(f=0),b===void 0&&(b=l?l.length:0),A===void 0&&(A=0),T===void 0&&(T=this.length),f<0||b>l.length||A<0||T>this.length)throw new RangeError(\"out of range index\");if(A>=T&&f>=b)return 0;if(A>=T)return -1;if(f>=b)return 1;if(f>>>=0,b>>>=0,A>>>=0,T>>>=0,this===l)return 0;let O=T-A,$=b-f,se=Math.min(O,$),te=this.slice(A,T),oe=l.slice(f,b);for(let J=0;J2147483647?f=2147483647:f<-2147483648&&(f=-2147483648),f=+f,hs(f)&&(f=A?0:p.length-1),f<0&&(f=p.length+f),f>=p.length){if(A)return -1;f=p.length-1;}else if(f<0)if(A)f=0;else return -1;if(typeof l==\"string\"&&(l=s.from(l,b)),s.isBuffer(l))return l.length===0?-1:W(p,l,f,b,A);if(typeof l==\"number\")return l=l&255,typeof Uint8Array.prototype.indexOf==\"function\"?A?Uint8Array.prototype.indexOf.call(p,l,f):Uint8Array.prototype.lastIndexOf.call(p,l,f):W(p,[l],f,b,A);throw new TypeError(\"val must be string, number or Buffer\")}function W(p,l,f,b,A){let T=1,O=p.length,$=l.length;if(b!==void 0&&(b=String(b).toLowerCase(),b===\"ucs2\"||b===\"ucs-2\"||b===\"utf16le\"||b===\"utf-16le\")){if(p.length<2||l.length<2)return -1;T=2,O/=2,$/=2,f/=2;}function se(oe,J){return T===1?oe[J]:oe.readUInt16BE(J*T)}let te;if(A){let oe=-1;for(te=f;teO&&(f=O-$),te=f;te>=0;te--){let oe=!0;for(let J=0;J<$;J++)if(se(p,te+J)!==se(l,J)){oe=!1;break}if(oe)return te}return -1}s.prototype.includes=function(l,f,b){return this.indexOf(l,f,b)!==-1},s.prototype.indexOf=function(l,f,b){return N(this,l,f,b,!0)},s.prototype.lastIndexOf=function(l,f,b){return N(this,l,f,b,!1)};function K(p,l,f,b){f=Number(f)||0;let A=p.length-f;b?(b=Number(b),b>A&&(b=A)):b=A;let T=l.length;b>T/2&&(b=T/2);let O;for(O=0;O>>0,isFinite(b)?(b=b>>>0,A===void 0&&(A=\"utf8\")):(A=b,b=void 0);else throw new Error(\"Buffer.write(string, encoding, offset[, length]) is no longer supported\");let T=this.length-f;if((b===void 0||b>T)&&(b=T),l.length>0&&(b<0||f<0)||f>this.length)throw new RangeError(\"Attempt to write outside buffer bounds\");A||(A=\"utf8\");let O=!1;for(;;)switch(A){case\"hex\":return K(this,l,f,b);case\"utf8\":case\"utf-8\":return z(this,l,f,b);case\"ascii\":case\"latin1\":case\"binary\":return Q(this,l,f,b);case\"base64\":return de(this,l,f,b);case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return Gt(this,l,f,b);default:if(O)throw new TypeError(\"Unknown encoding: \"+A);A=(\"\"+A).toLowerCase(),O=!0;}},s.prototype.toJSON=function(){return {type:\"Buffer\",data:Array.prototype.slice.call(this._arr||this,0)}};function pe(p,l,f){return l===0&&f===p.length?t.fromByteArray(p):t.fromByteArray(p.slice(l,f))}function Cr(p,l,f){f=Math.min(p.length,f);let b=[],A=l;for(;A239?4:T>223?3:T>191?2:1;if(A+$<=f){let se,te,oe,J;switch($){case 1:T<128&&(O=T);break;case 2:se=p[A+1],(se&192)===128&&(J=(T&31)<<6|se&63,J>127&&(O=J));break;case 3:se=p[A+1],te=p[A+2],(se&192)===128&&(te&192)===128&&(J=(T&15)<<12|(se&63)<<6|te&63,J>2047&&(J<55296||J>57343)&&(O=J));break;case 4:se=p[A+1],te=p[A+2],oe=p[A+3],(se&192)===128&&(te&192)===128&&(oe&192)===128&&(J=(T&15)<<18|(se&63)<<12|(te&63)<<6|oe&63,J>65535&&J<1114112&&(O=J));}}O===null?(O=65533,$=1):O>65535&&(O-=65536,b.push(O>>>10&1023|55296),O=56320|O&1023),b.push(O),A+=$;}return Pr(b)}let Br=4096;function Pr(p){let l=p.length;if(l<=Br)return String.fromCharCode.apply(String,p);let f=\"\",b=0;for(;bb)&&(f=b);let A=\"\";for(let T=l;Tb&&(l=b),f<0?(f+=b,f<0&&(f=0)):f>b&&(f=b),ff)throw new RangeError(\"Trying to access beyond buffer length\")}s.prototype.readUintLE=s.prototype.readUIntLE=function(l,f,b){l=l>>>0,f=f>>>0,b||ge(l,f,this.length);let A=this[l],T=1,O=0;for(;++O>>0,f=f>>>0,b||ge(l,f,this.length);let A=this[l+--f],T=1;for(;f>0&&(T*=256);)A+=this[l+--f]*T;return A},s.prototype.readUint8=s.prototype.readUInt8=function(l,f){return l=l>>>0,f||ge(l,1,this.length),this[l]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(l,f){return l=l>>>0,f||ge(l,2,this.length),this[l]|this[l+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(l,f){return l=l>>>0,f||ge(l,2,this.length),this[l]<<8|this[l+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(l,f){return l=l>>>0,f||ge(l,4,this.length),(this[l]|this[l+1]<<8|this[l+2]<<16)+this[l+3]*16777216},s.prototype.readUint32BE=s.prototype.readUInt32BE=function(l,f){return l=l>>>0,f||ge(l,4,this.length),this[l]*16777216+(this[l+1]<<16|this[l+2]<<8|this[l+3])},s.prototype.readBigUInt64LE=xt(function(l){l=l>>>0,kr(l,\"offset\");let f=this[l],b=this[l+7];(f===void 0||b===void 0)&&li(l,this.length-8);let A=f+this[++l]*2**8+this[++l]*2**16+this[++l]*2**24,T=this[++l]+this[++l]*2**8+this[++l]*2**16+b*2**24;return BigInt(A)+(BigInt(T)<>>0,kr(l,\"offset\");let f=this[l],b=this[l+7];(f===void 0||b===void 0)&&li(l,this.length-8);let A=f*2**24+this[++l]*2**16+this[++l]*2**8+this[++l],T=this[++l]*2**24+this[++l]*2**16+this[++l]*2**8+b;return (BigInt(A)<>>0,f=f>>>0,b||ge(l,f,this.length);let A=this[l],T=1,O=0;for(;++O=T&&(A-=Math.pow(2,8*f)),A},s.prototype.readIntBE=function(l,f,b){l=l>>>0,f=f>>>0,b||ge(l,f,this.length);let A=f,T=1,O=this[l+--A];for(;A>0&&(T*=256);)O+=this[l+--A]*T;return T*=128,O>=T&&(O-=Math.pow(2,8*f)),O},s.prototype.readInt8=function(l,f){return l=l>>>0,f||ge(l,1,this.length),this[l]&128?(255-this[l]+1)*-1:this[l]},s.prototype.readInt16LE=function(l,f){l=l>>>0,f||ge(l,2,this.length);let b=this[l]|this[l+1]<<8;return b&32768?b|4294901760:b},s.prototype.readInt16BE=function(l,f){l=l>>>0,f||ge(l,2,this.length);let b=this[l+1]|this[l]<<8;return b&32768?b|4294901760:b},s.prototype.readInt32LE=function(l,f){return l=l>>>0,f||ge(l,4,this.length),this[l]|this[l+1]<<8|this[l+2]<<16|this[l+3]<<24},s.prototype.readInt32BE=function(l,f){return l=l>>>0,f||ge(l,4,this.length),this[l]<<24|this[l+1]<<16|this[l+2]<<8|this[l+3]},s.prototype.readBigInt64LE=xt(function(l){l=l>>>0,kr(l,\"offset\");let f=this[l],b=this[l+7];(f===void 0||b===void 0)&&li(l,this.length-8);let A=this[l+4]+this[l+5]*2**8+this[l+6]*2**16+(b<<24);return (BigInt(A)<>>0,kr(l,\"offset\");let f=this[l],b=this[l+7];(f===void 0||b===void 0)&&li(l,this.length-8);let A=(f<<24)+this[++l]*2**16+this[++l]*2**8+this[++l];return (BigInt(A)<>>0,f||ge(l,4,this.length),e.read(this,l,!0,23,4)},s.prototype.readFloatBE=function(l,f){return l=l>>>0,f||ge(l,4,this.length),e.read(this,l,!1,23,4)},s.prototype.readDoubleLE=function(l,f){return l=l>>>0,f||ge(l,8,this.length),e.read(this,l,!0,52,8)},s.prototype.readDoubleBE=function(l,f){return l=l>>>0,f||ge(l,8,this.length),e.read(this,l,!1,52,8)};function Ce(p,l,f,b,A,T){if(!s.isBuffer(p))throw new TypeError('\"buffer\" argument must be a Buffer instance');if(l>A||lp.length)throw new RangeError(\"Index out of range\")}s.prototype.writeUintLE=s.prototype.writeUIntLE=function(l,f,b,A){if(l=+l,f=f>>>0,b=b>>>0,!A){let $=Math.pow(2,8*b)-1;Ce(this,l,f,b,$,0);}let T=1,O=0;for(this[f]=l&255;++O>>0,b=b>>>0,!A){let $=Math.pow(2,8*b)-1;Ce(this,l,f,b,$,0);}let T=b-1,O=1;for(this[f+T]=l&255;--T>=0&&(O*=256);)this[f+T]=l/O&255;return f+b},s.prototype.writeUint8=s.prototype.writeUInt8=function(l,f,b){return l=+l,f=f>>>0,b||Ce(this,l,f,1,255,0),this[f]=l&255,f+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(l,f,b){return l=+l,f=f>>>0,b||Ce(this,l,f,2,65535,0),this[f]=l&255,this[f+1]=l>>>8,f+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function(l,f,b){return l=+l,f=f>>>0,b||Ce(this,l,f,2,65535,0),this[f]=l>>>8,this[f+1]=l&255,f+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function(l,f,b){return l=+l,f=f>>>0,b||Ce(this,l,f,4,4294967295,0),this[f+3]=l>>>24,this[f+2]=l>>>16,this[f+1]=l>>>8,this[f]=l&255,f+4},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function(l,f,b){return l=+l,f=f>>>0,b||Ce(this,l,f,4,4294967295,0),this[f]=l>>>24,this[f+1]=l>>>16,this[f+2]=l>>>8,this[f+3]=l&255,f+4};function vl(p,l,f,b,A){Rl(l,b,A,p,f,7);let T=Number(l&BigInt(4294967295));p[f++]=T,T=T>>8,p[f++]=T,T=T>>8,p[f++]=T,T=T>>8,p[f++]=T;let O=Number(l>>BigInt(32)&BigInt(4294967295));return p[f++]=O,O=O>>8,p[f++]=O,O=O>>8,p[f++]=O,O=O>>8,p[f++]=O,f}function El(p,l,f,b,A){Rl(l,b,A,p,f,7);let T=Number(l&BigInt(4294967295));p[f+7]=T,T=T>>8,p[f+6]=T,T=T>>8,p[f+5]=T,T=T>>8,p[f+4]=T;let O=Number(l>>BigInt(32)&BigInt(4294967295));return p[f+3]=O,O=O>>8,p[f+2]=O,O=O>>8,p[f+1]=O,O=O>>8,p[f]=O,f+8}s.prototype.writeBigUInt64LE=xt(function(l,f=0){return vl(this,l,f,BigInt(0),BigInt(\"0xffffffffffffffff\"))}),s.prototype.writeBigUInt64BE=xt(function(l,f=0){return El(this,l,f,BigInt(0),BigInt(\"0xffffffffffffffff\"))}),s.prototype.writeIntLE=function(l,f,b,A){if(l=+l,f=f>>>0,!A){let se=Math.pow(2,8*b-1);Ce(this,l,f,b,se-1,-se);}let T=0,O=1,$=0;for(this[f]=l&255;++T>0)-$&255;return f+b},s.prototype.writeIntBE=function(l,f,b,A){if(l=+l,f=f>>>0,!A){let se=Math.pow(2,8*b-1);Ce(this,l,f,b,se-1,-se);}let T=b-1,O=1,$=0;for(this[f+T]=l&255;--T>=0&&(O*=256);)l<0&&$===0&&this[f+T+1]!==0&&($=1),this[f+T]=(l/O>>0)-$&255;return f+b},s.prototype.writeInt8=function(l,f,b){return l=+l,f=f>>>0,b||Ce(this,l,f,1,127,-128),l<0&&(l=255+l+1),this[f]=l&255,f+1},s.prototype.writeInt16LE=function(l,f,b){return l=+l,f=f>>>0,b||Ce(this,l,f,2,32767,-32768),this[f]=l&255,this[f+1]=l>>>8,f+2},s.prototype.writeInt16BE=function(l,f,b){return l=+l,f=f>>>0,b||Ce(this,l,f,2,32767,-32768),this[f]=l>>>8,this[f+1]=l&255,f+2},s.prototype.writeInt32LE=function(l,f,b){return l=+l,f=f>>>0,b||Ce(this,l,f,4,2147483647,-2147483648),this[f]=l&255,this[f+1]=l>>>8,this[f+2]=l>>>16,this[f+3]=l>>>24,f+4},s.prototype.writeInt32BE=function(l,f,b){return l=+l,f=f>>>0,b||Ce(this,l,f,4,2147483647,-2147483648),l<0&&(l=4294967295+l+1),this[f]=l>>>24,this[f+1]=l>>>16,this[f+2]=l>>>8,this[f+3]=l&255,f+4},s.prototype.writeBigInt64LE=xt(function(l,f=0){return vl(this,l,f,-BigInt(\"0x8000000000000000\"),BigInt(\"0x7fffffffffffffff\"))}),s.prototype.writeBigInt64BE=xt(function(l,f=0){return El(this,l,f,-BigInt(\"0x8000000000000000\"),BigInt(\"0x7fffffffffffffff\"))});function Sl(p,l,f,b,A,T){if(f+b>p.length)throw new RangeError(\"Index out of range\");if(f<0)throw new RangeError(\"Index out of range\")}function Al(p,l,f,b,A){return l=+l,f=f>>>0,A||Sl(p,l,f,4),e.write(p,l,f,b,23,4),f+4}s.prototype.writeFloatLE=function(l,f,b){return Al(this,l,f,!0,b)},s.prototype.writeFloatBE=function(l,f,b){return Al(this,l,f,!1,b)};function Il(p,l,f,b,A){return l=+l,f=f>>>0,A||Sl(p,l,f,8),e.write(p,l,f,b,52,8),f+8}s.prototype.writeDoubleLE=function(l,f,b){return Il(this,l,f,!0,b)},s.prototype.writeDoubleBE=function(l,f,b){return Il(this,l,f,!1,b)},s.prototype.copy=function(l,f,b,A){if(!s.isBuffer(l))throw new TypeError(\"argument should be a Buffer\");if(b||(b=0),!A&&A!==0&&(A=this.length),f>=l.length&&(f=l.length),f||(f=0),A>0&&A=this.length)throw new RangeError(\"Index out of range\");if(A<0)throw new RangeError(\"sourceEnd out of bounds\");A>this.length&&(A=this.length),l.length-f>>0,b=b===void 0?this.length:b>>>0,l||(l=0);let T;if(typeof l==\"number\")for(T=f;T2**32?A=Tl(String(f)):typeof f==\"bigint\"&&(A=String(f),(f>BigInt(2)**BigInt(32)||f<-(BigInt(2)**BigInt(32)))&&(A=Tl(A)),A+=\"n\"),b+=` It must be ${l}. Received ${A}`,b},RangeError);function Tl(p){let l=\"\",f=p.length,b=p[0]===\"-\"?1:0;for(;f>=b+4;f-=3)l=`_${p.slice(f-3,f)}${l}`;return `${p.slice(0,f)}${l}`}function Dg(p,l,f){kr(l,\"offset\"),(p[l]===void 0||p[l+f]===void 0)&&li(l,p.length-(f+1));}function Rl(p,l,f,b,A,T){if(p>f||p3?l===0||l===BigInt(0)?$=`>= 0${O} and < 2${O} ** ${(T+1)*8}${O}`:$=`>= -(2${O} ** ${(T+1)*8-1}${O}) and < 2 ** ${(T+1)*8-1}${O}`:$=`>= ${l}${O} and <= ${f}${O}`,new Or.ERR_OUT_OF_RANGE(\"value\",$,p)}Dg(b,A,T);}function kr(p,l){if(typeof p!=\"number\")throw new Or.ERR_INVALID_ARG_TYPE(l,\"number\",p)}function li(p,l,f){throw Math.floor(p)!==p?(kr(p,f),new Or.ERR_OUT_OF_RANGE(f||\"offset\",\"an integer\",p)):l<0?new Or.ERR_BUFFER_OUT_OF_BOUNDS:new Or.ERR_OUT_OF_RANGE(f||\"offset\",`>= ${f?1:0} and <= ${l}`,p)}let jg=/[^+/0-9A-Za-z-_]/g;function Fg(p){if(p=p.split(\"=\")[0],p=p.trim().replace(jg,\"\"),p.length<2)return \"\";for(;p.length%4!==0;)p=p+\"=\";return p}function cs(p,l){l=l||1/0;let f,b=p.length,A=null,T=[];for(let O=0;O55295&&f<57344){if(!A){if(f>56319){(l-=3)>-1&&T.push(239,191,189);continue}else if(O+1===b){(l-=3)>-1&&T.push(239,191,189);continue}A=f;continue}if(f<56320){(l-=3)>-1&&T.push(239,191,189),A=f;continue}f=(A-55296<<10|f-56320)+65536;}else A&&(l-=3)>-1&&T.push(239,191,189);if(A=null,f<128){if((l-=1)<0)break;T.push(f);}else if(f<2048){if((l-=2)<0)break;T.push(f>>6|192,f&63|128);}else if(f<65536){if((l-=3)<0)break;T.push(f>>12|224,f>>6&63|128,f&63|128);}else if(f<1114112){if((l-=4)<0)break;T.push(f>>18|240,f>>12&63|128,f>>6&63|128,f&63|128);}else throw new Error(\"Invalid code point\")}return T}function Wg(p){let l=[];for(let f=0;f>8,A=f%256,T.push(A),T.push(b);return T}function Cl(p){return t.toByteArray(Fg(p))}function qi(p,l,f,b){let A;for(A=0;A=l.length||A>=p.length);++A)l[A+f]=p[A];return A}function Ye(p,l){return p instanceof l||p!=null&&p.constructor!=null&&p.constructor.name!=null&&p.constructor.name===l.name}function hs(p){return p!==p}let Hg=function(){let p=\"0123456789abcdef\",l=new Array(256);for(let f=0;f<16;++f){let b=f*16;for(let A=0;A<16;++A)l[b+A]=p[f]+p[A];}return l}();function xt(p){return typeof BigInt>\"u\"?Vg:p}function Vg(){throw new Error(\"BigInt not supported\")}return Jt}var ui,Vu,Wi,zu,Jt,Ku,Lt,x,ey,ty,ye=we(()=>{v();m();_();ui={},Vu=!1;Wi={},zu=!1;Jt={},Ku=!1;Lt=Zg();Lt.Buffer;Lt.SlowBuffer;Lt.INSPECT_MAX_BYTES;Lt.kMaxLength;x=Lt.Buffer,ey=Lt.INSPECT_MAX_BYTES,ty=Lt.kMaxLength;});var v=we(()=>{ye();});var Gu=M(ws=>{v();m();_();Object.defineProperty(ws,\"__esModule\",{value:!0});var bs=class{constructor(e){this.aliasToTopic={},this.max=e;}put(e,r){return r===0||r>this.max?!1:(this.aliasToTopic[r]=e,this.length=Object.keys(this.aliasToTopic).length,!0)}getTopicByAlias(e){return this.aliasToTopic[e]}clear(){this.aliasToTopic={};}};ws.default=bs;});var ce=M((PA,Qu)=>{v();m();_();Qu.exports={ArrayIsArray(t){return Array.isArray(t)},ArrayPrototypeIncludes(t,e){return t.includes(e)},ArrayPrototypeIndexOf(t,e){return t.indexOf(e)},ArrayPrototypeJoin(t,e){return t.join(e)},ArrayPrototypeMap(t,e){return t.map(e)},ArrayPrototypePop(t,e){return t.pop(e)},ArrayPrototypePush(t,e){return t.push(e)},ArrayPrototypeSlice(t,e,r){return t.slice(e,r)},Error,FunctionPrototypeCall(t,e,...r){return t.call(e,...r)},FunctionPrototypeSymbolHasInstance(t,e){return Function.prototype[Symbol.hasInstance].call(t,e)},MathFloor:Math.floor,Number,NumberIsInteger:Number.isInteger,NumberIsNaN:Number.isNaN,NumberMAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER,NumberMIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER,NumberParseInt:Number.parseInt,ObjectDefineProperties(t,e){return Object.defineProperties(t,e)},ObjectDefineProperty(t,e,r){return Object.defineProperty(t,e,r)},ObjectGetOwnPropertyDescriptor(t,e){return Object.getOwnPropertyDescriptor(t,e)},ObjectKeys(t){return Object.keys(t)},ObjectSetPrototypeOf(t,e){return Object.setPrototypeOf(t,e)},Promise,PromisePrototypeCatch(t,e){return t.catch(e)},PromisePrototypeThen(t,e,r){return t.then(e,r)},PromiseReject(t){return Promise.reject(t)},ReflectApply:Reflect.apply,RegExpPrototypeTest(t,e){return t.test(e)},SafeSet:Set,String,StringPrototypeSlice(t,e,r){return t.slice(e,r)},StringPrototypeToLowerCase(t){return t.toLowerCase()},StringPrototypeToUpperCase(t){return t.toUpperCase()},StringPrototypeTrim(t){return t.trim()},Symbol,SymbolFor:Symbol.for,SymbolAsyncIterator:Symbol.asyncIterator,SymbolHasInstance:Symbol.hasInstance,SymbolIterator:Symbol.iterator,TypedArrayPrototypeSet(t,e,r){return t.set(e,r)},Uint8Array};});var Je=M((jA,ms)=>{v();m();_();var ry=(ye(),X(_e)),iy=Object.getPrototypeOf(async function(){}).constructor,Yu=globalThis.Blob||ry.Blob,ny=typeof Yu<\"u\"?function(e){return e instanceof Yu}:function(e){return !1},_s=class extends Error{constructor(e){if(!Array.isArray(e))throw new TypeError(`Expected input to be an Array, got ${typeof e}`);let r=\"\";for(let i=0;i{t=i,e=n;}),resolve:t,reject:e}},promisify(t){return new Promise((e,r)=>{t((i,...n)=>i?r(i):e(...n));})},debuglog(){return function(){}},format(t,...e){return t.replace(/%([sdifj])/g,function(...[r,i]){let n=e.shift();return i===\"f\"?n.toFixed(6):i===\"j\"?JSON.stringify(n):i===\"s\"&&typeof n==\"object\"?`${n.constructor!==Object?n.constructor.name:\"\"} {}`.trim():n.toString()})},inspect(t){switch(typeof t){case\"string\":if(t.includes(\"'\"))if(t.includes('\"')){if(!t.includes(\"`\")&&!t.includes(\"${\"))return `\\`${t}\\``}else return `\"${t}\"`;return `'${t}'`;case\"number\":return isNaN(t)?\"NaN\":Object.is(t,-0)?String(t):t;case\"bigint\":return `${String(t)}n`;case\"boolean\":case\"undefined\":return String(t);case\"object\":return \"{}\"}},types:{isAsyncFunction(t){return t instanceof iy},isArrayBufferView(t){return ArrayBuffer.isView(t)}},isBlob:ny};ms.exports.promisify.custom=Symbol.for(\"nodejs.util.promisify.custom\");});var Hi=M((YA,$i)=>{v();m();_();var{AbortController:Ju,AbortSignal:sy}=typeof self<\"u\"?self:typeof window<\"u\"?window:void 0;$i.exports=Ju;$i.exports.AbortSignal=sy;$i.exports.default=Ju;});var Se=M((oI,ef)=>{v();m();_();var{format:oy,inspect:Vi,AggregateError:ay}=Je(),ly=globalThis.AggregateError||ay,uy=Symbol(\"kIsNodeError\"),fy=[\"string\",\"function\",\"number\",\"object\",\"Function\",\"Object\",\"boolean\",\"bigint\",\"symbol\"],cy=/^([A-Z][a-z0-9]*)+$/,hy=\"__node_internal_\",zi={};function Xt(t,e){if(!t)throw new zi.ERR_INTERNAL_ASSERTION(e)}function Xu(t){let e=\"\",r=t.length,i=t[0]===\"-\"?1:0;for(;r>=i+4;r-=3)e=`_${t.slice(r-3,r)}${e}`;return `${t.slice(0,r)}${e}`}function dy(t,e,r){if(typeof e==\"function\")return Xt(e.length<=r.length,`Code: ${t}; The provided arguments length (${r.length}) does not match the required ones (${e.length}).`),e(...r);let i=(e.match(/%[dfijoOs]/g)||[]).length;return Xt(i===r.length,`Code: ${t}; The provided arguments length (${r.length}) does not match the required ones (${i}).`),r.length===0?e:oy(e,...r)}function me(t,e,r){r||(r=Error);class i extends r{constructor(...o){super(dy(t,e,o));}toString(){return `${this.name} [${t}]: ${this.message}`}}Object.defineProperties(i.prototype,{name:{value:r.name,writable:!0,enumerable:!1,configurable:!0},toString:{value(){return `${this.name} [${t}]: ${this.message}`},writable:!0,enumerable:!1,configurable:!0}}),i.prototype.code=t,i.prototype[uy]=!0,zi[t]=i;}function Zu(t){let e=hy+t.name;return Object.defineProperty(t,\"name\",{value:e}),t}function py(t,e){if(t&&e&&t!==e){if(Array.isArray(e.errors))return e.errors.push(t),e;let r=new ly([e,t],e.message);return r.code=e.code,r}return t||e}var vs=class extends Error{constructor(e=\"The operation was aborted\",r=void 0){if(r!==void 0&&typeof r!=\"object\")throw new zi.ERR_INVALID_ARG_TYPE(\"options\",\"Object\",r);super(e,r),this.code=\"ABORT_ERR\",this.name=\"AbortError\";}};me(\"ERR_ASSERTION\",\"%s\",Error);me(\"ERR_INVALID_ARG_TYPE\",(t,e,r)=>{Xt(typeof t==\"string\",\"'name' must be a string\"),Array.isArray(e)||(e=[e]);let i=\"The \";t.endsWith(\" argument\")?i+=`${t} `:i+=`\"${t}\" ${t.includes(\".\")?\"property\":\"argument\"} `,i+=\"must be \";let n=[],o=[],s=[];for(let u of e)Xt(typeof u==\"string\",\"All expected entries have to be of type string\"),fy.includes(u)?n.push(u.toLowerCase()):cy.test(u)?o.push(u):(Xt(u!==\"object\",'The value \"object\" should be written as \"Object\"'),s.push(u));if(o.length>0){let u=n.indexOf(\"object\");u!==-1&&(n.splice(n,u,1),o.push(\"Object\"));}if(n.length>0){switch(n.length){case 1:i+=`of type ${n[0]}`;break;case 2:i+=`one of type ${n[0]} or ${n[1]}`;break;default:{let u=n.pop();i+=`one of type ${n.join(\", \")}, or ${u}`;}}(o.length>0||s.length>0)&&(i+=\" or \");}if(o.length>0){switch(o.length){case 1:i+=`an instance of ${o[0]}`;break;case 2:i+=`an instance of ${o[0]} or ${o[1]}`;break;default:{let u=o.pop();i+=`an instance of ${o.join(\", \")}, or ${u}`;}}s.length>0&&(i+=\" or \");}switch(s.length){case 0:break;case 1:s[0].toLowerCase()!==s[0]&&(i+=\"an \"),i+=`${s[0]}`;break;case 2:i+=`one of ${s[0]} or ${s[1]}`;break;default:{let u=s.pop();i+=`one of ${s.join(\", \")}, or ${u}`;}}if(r==null)i+=`. Received ${r}`;else if(typeof r==\"function\"&&r.name)i+=`. Received function ${r.name}`;else if(typeof r==\"object\"){var a;if((a=r.constructor)!==null&&a!==void 0&&a.name)i+=`. Received an instance of ${r.constructor.name}`;else {let u=Vi(r,{depth:-1});i+=`. Received ${u}`;}}else {let u=Vi(r,{colors:!1});u.length>25&&(u=`${u.slice(0,25)}...`),i+=`. Received type ${typeof r} (${u})`;}return i},TypeError);me(\"ERR_INVALID_ARG_VALUE\",(t,e,r=\"is invalid\")=>{let i=Vi(e);return i.length>128&&(i=i.slice(0,128)+\"...\"),`The ${t.includes(\".\")?\"property\":\"argument\"} '${t}' ${r}. Received ${i}`},TypeError);me(\"ERR_INVALID_RETURN_VALUE\",(t,e,r)=>{var i;let n=r!=null&&(i=r.constructor)!==null&&i!==void 0&&i.name?`instance of ${r.constructor.name}`:`type ${typeof r}`;return `Expected ${t} to be returned from the \"${e}\" function but got ${n}.`},TypeError);me(\"ERR_MISSING_ARGS\",(...t)=>{Xt(t.length>0,\"At least one arg needs to be specified\");let e,r=t.length;switch(t=(Array.isArray(t)?t:[t]).map(i=>`\"${i}\"`).join(\" or \"),r){case 1:e+=`The ${t[0]} argument`;break;case 2:e+=`The ${t[0]} and ${t[1]} arguments`;break;default:{let i=t.pop();e+=`The ${t.join(\", \")}, and ${i} arguments`;}break}return `${e} must be specified`},TypeError);me(\"ERR_OUT_OF_RANGE\",(t,e,r)=>{Xt(e,'Missing \"range\" argument');let i;return Number.isInteger(r)&&Math.abs(r)>2**32?i=Xu(String(r)):typeof r==\"bigint\"?(i=String(r),(r>2n**32n||r<-(2n**32n))&&(i=Xu(i)),i+=\"n\"):i=Vi(r),`The value of \"${t}\" is out of range. It must be ${e}. Received ${i}`},RangeError);me(\"ERR_MULTIPLE_CALLBACK\",\"Callback called multiple times\",Error);me(\"ERR_METHOD_NOT_IMPLEMENTED\",\"The %s method is not implemented\",Error);me(\"ERR_STREAM_ALREADY_FINISHED\",\"Cannot call %s after a stream was finished\",Error);me(\"ERR_STREAM_CANNOT_PIPE\",\"Cannot pipe, not readable\",Error);me(\"ERR_STREAM_DESTROYED\",\"Cannot call %s after a stream was destroyed\",Error);me(\"ERR_STREAM_NULL_VALUES\",\"May not write null values to stream\",TypeError);me(\"ERR_STREAM_PREMATURE_CLOSE\",\"Premature close\",Error);me(\"ERR_STREAM_PUSH_AFTER_EOF\",\"stream.push() after EOF\",Error);me(\"ERR_STREAM_UNSHIFT_AFTER_END_EVENT\",\"stream.unshift() after end event\",Error);me(\"ERR_STREAM_WRITE_AFTER_END\",\"write after end\",Error);me(\"ERR_UNKNOWN_ENCODING\",\"Unknown encoding: %s\",TypeError);ef.exports={AbortError:vs,aggregateTwoErrors:Zu(py),hideStackFrames:Zu,codes:zi};});var fi=M((yI,ff)=>{v();m();_();var{ArrayIsArray:Ss,ArrayPrototypeIncludes:sf,ArrayPrototypeJoin:of,ArrayPrototypeMap:gy,NumberIsInteger:As,NumberIsNaN:yy,NumberMAX_SAFE_INTEGER:by,NumberMIN_SAFE_INTEGER:wy,NumberParseInt:_y,ObjectPrototypeHasOwnProperty:my,RegExpPrototypeExec:af,String:vy,StringPrototypeToUpperCase:Ey,StringPrototypeTrim:Sy}=ce(),{hideStackFrames:Ue,codes:{ERR_SOCKET_BAD_PORT:Ay,ERR_INVALID_ARG_TYPE:Ae,ERR_INVALID_ARG_VALUE:Mr,ERR_OUT_OF_RANGE:Zt,ERR_UNKNOWN_SIGNAL:tf}}=Se(),{normalizeEncoding:Iy}=Je(),{isAsyncFunction:Ty,isArrayBufferView:Ry}=Je().types,rf={};function Cy(t){return t===(t|0)}function By(t){return t===t>>>0}var Py=/^[0-7]+$/,Oy=\"must be a 32-bit unsigned integer or an octal string\";function ky(t,e,r){if(typeof t>\"u\"&&(t=r),typeof t==\"string\"){if(af(Py,t)===null)throw new Mr(e,t,Oy);t=_y(t,8);}return lf(t,e),t}var xy=Ue((t,e,r=wy,i=by)=>{if(typeof t!=\"number\")throw new Ae(e,\"number\",t);if(!As(t))throw new Zt(e,\"an integer\",t);if(ti)throw new Zt(e,`>= ${r} && <= ${i}`,t)}),My=Ue((t,e,r=-2147483648,i=2147483647)=>{if(typeof t!=\"number\")throw new Ae(e,\"number\",t);if(!As(t))throw new Zt(e,\"an integer\",t);if(ti)throw new Zt(e,`>= ${r} && <= ${i}`,t)}),lf=Ue((t,e,r=!1)=>{if(typeof t!=\"number\")throw new Ae(e,\"number\",t);if(!As(t))throw new Zt(e,\"an integer\",t);let i=r?1:0,n=4294967295;if(tn)throw new Zt(e,`>= ${i} && <= ${n}`,t)});function Is(t,e){if(typeof t!=\"string\")throw new Ae(e,\"string\",t)}function Ly(t,e,r=void 0,i){if(typeof t!=\"number\")throw new Ae(e,\"number\",t);if(r!=null&&ti||(r!=null||i!=null)&&yy(t))throw new Zt(e,`${r!=null?`>= ${r}`:\"\"}${r!=null&&i!=null?\" && \":\"\"}${i!=null?`<= ${i}`:\"\"}`,t)}var Uy=Ue((t,e,r)=>{if(!sf(r,t)){let n=\"must be one of: \"+of(gy(r,o=>typeof o==\"string\"?`'${o}'`:vy(o)),\", \");throw new Mr(e,t,n)}});function uf(t,e){if(typeof t!=\"boolean\")throw new Ae(e,\"boolean\",t)}function Es(t,e,r){return t==null||!my(t,e)?r:t[e]}var Ny=Ue((t,e,r=null)=>{let i=Es(r,\"allowArray\",!1),n=Es(r,\"allowFunction\",!1);if(!Es(r,\"nullable\",!1)&&t===null||!i&&Ss(t)||typeof t!=\"object\"&&(!n||typeof t!=\"function\"))throw new Ae(e,\"Object\",t)}),qy=Ue((t,e)=>{if(t!=null&&typeof t!=\"object\"&&typeof t!=\"function\")throw new Ae(e,\"a dictionary\",t)}),Ts=Ue((t,e,r=0)=>{if(!Ss(t))throw new Ae(e,\"Array\",t);if(t.length{if(!Ry(t))throw new Ae(e,[\"Buffer\",\"TypedArray\",\"DataView\"],t)});function $y(t,e){let r=Iy(e),i=t.length;if(r===\"hex\"&&i%2!==0)throw new Mr(\"encoding\",e,`is invalid for data of length ${i}`)}function Hy(t,e=\"Port\",r=!0){if(typeof t!=\"number\"&&typeof t!=\"string\"||typeof t==\"string\"&&Sy(t).length===0||+t!==+t>>>0||t>65535||t===0&&!r)throw new Ay(e,t,r);return t|0}var Vy=Ue((t,e)=>{if(t!==void 0&&(t===null||typeof t!=\"object\"||!(\"aborted\"in t)))throw new Ae(e,\"AbortSignal\",t)}),zy=Ue((t,e)=>{if(typeof t!=\"function\")throw new Ae(e,\"Function\",t)}),Ky=Ue((t,e)=>{if(typeof t!=\"function\"||Ty(t))throw new Ae(e,\"Function\",t)}),Gy=Ue((t,e)=>{if(t!==void 0)throw new Ae(e,\"undefined\",t)});function Qy(t,e,r){if(!sf(r,t))throw new Ae(e,`('${of(r,\"|\")}')`,t)}var Yy=/^(?:<[^>]*>)(?:\\s*;\\s*[^;\"\\s]+(?:=(\")?[^;\"\\s]*\\1)?)*$/;function nf(t,e){if(typeof t>\"u\"||!af(Yy,t))throw new Mr(e,t,'must be an array or string of format \"; rel=preload; as=style\"')}function Jy(t){if(typeof t==\"string\")return nf(t,\"hints\"),t;if(Ss(t)){let e=t.length,r=\"\";if(e===0)return r;for(let i=0;i; rel=preload; as=style\"')}ff.exports={isInt32:Cy,isUint32:By,parseFileMode:ky,validateArray:Ts,validateStringArray:Dy,validateBooleanArray:jy,validateBoolean:uf,validateBuffer:Wy,validateDictionary:qy,validateEncoding:$y,validateFunction:zy,validateInt32:My,validateInteger:xy,validateNumber:Ly,validateObject:Ny,validateOneOf:Uy,validatePlainFunction:Ky,validatePort:Hy,validateSignalName:Fy,validateString:Is,validateUint32:lf,validateUndefined:Gy,validateUnion:Qy,validateAbortSignal:Vy,validateLinkHeaderValue:Jy};});var Ut=M((TI,pf)=>{v();m();_();var ae=pf.exports={},Xe,Ze;function Rs(){throw new Error(\"setTimeout has not been defined\")}function Cs(){throw new Error(\"clearTimeout has not been defined\")}(function(){try{typeof setTimeout==\"function\"?Xe=setTimeout:Xe=Rs;}catch{Xe=Rs;}try{typeof clearTimeout==\"function\"?Ze=clearTimeout:Ze=Cs;}catch{Ze=Cs;}})();function cf(t){if(Xe===setTimeout)return setTimeout(t,0);if((Xe===Rs||!Xe)&&setTimeout)return Xe=setTimeout,setTimeout(t,0);try{return Xe(t,0)}catch{try{return Xe.call(null,t,0)}catch{return Xe.call(this,t,0)}}}function Xy(t){if(Ze===clearTimeout)return clearTimeout(t);if((Ze===Cs||!Ze)&&clearTimeout)return Ze=clearTimeout,clearTimeout(t);try{return Ze(t)}catch{try{return Ze.call(null,t)}catch{return Ze.call(this,t)}}}var wt=[],Lr=!1,er,Ki=-1;function Zy(){!Lr||!er||(Lr=!1,er.length?wt=er.concat(wt):Ki=-1,wt.length&&hf());}function hf(){if(!Lr){var t=cf(Zy);Lr=!0;for(var e=wt.length;e;){for(er=wt,wt=[];++Ki1)for(var r=1;r{v();m();_();var{Symbol:Gi,SymbolAsyncIterator:gf,SymbolIterator:yf,SymbolFor:bf}=ce(),wf=Gi(\"kDestroyed\"),_f=Gi(\"kIsErrored\"),Bs=Gi(\"kIsReadable\"),mf=Gi(\"kIsDisturbed\"),eb=bf(\"nodejs.webstream.isClosedPromise\"),tb=bf(\"nodejs.webstream.controllerErrorFunction\");function Qi(t,e=!1){var r;return !!(t&&typeof t.pipe==\"function\"&&typeof t.on==\"function\"&&(!e||typeof t.pause==\"function\"&&typeof t.resume==\"function\")&&(!t._writableState||((r=t._readableState)===null||r===void 0?void 0:r.readable)!==!1)&&(!t._writableState||t._readableState))}function Yi(t){var e;return !!(t&&typeof t.write==\"function\"&&typeof t.on==\"function\"&&(!t._readableState||((e=t._writableState)===null||e===void 0?void 0:e.writable)!==!1))}function rb(t){return !!(t&&typeof t.pipe==\"function\"&&t._readableState&&typeof t.on==\"function\"&&typeof t.write==\"function\")}function et(t){return t&&(t._readableState||t._writableState||typeof t.write==\"function\"&&typeof t.on==\"function\"||typeof t.pipe==\"function\"&&typeof t.on==\"function\")}function vf(t){return !!(t&&!et(t)&&typeof t.pipeThrough==\"function\"&&typeof t.getReader==\"function\"&&typeof t.cancel==\"function\")}function Ef(t){return !!(t&&!et(t)&&typeof t.getWriter==\"function\"&&typeof t.abort==\"function\")}function Sf(t){return !!(t&&!et(t)&&typeof t.readable==\"object\"&&typeof t.writable==\"object\")}function ib(t){return vf(t)||Ef(t)||Sf(t)}function nb(t,e){return t==null?!1:e===!0?typeof t[gf]==\"function\":e===!1?typeof t[yf]==\"function\":typeof t[gf]==\"function\"||typeof t[yf]==\"function\"}function Ji(t){if(!et(t))return null;let e=t._writableState,r=t._readableState,i=e||r;return !!(t.destroyed||t[wf]||i!=null&&i.destroyed)}function Af(t){if(!Yi(t))return null;if(t.writableEnded===!0)return !0;let e=t._writableState;return e!=null&&e.errored?!1:typeof e?.ended!=\"boolean\"?null:e.ended}function sb(t,e){if(!Yi(t))return null;if(t.writableFinished===!0)return !0;let r=t._writableState;return r!=null&&r.errored?!1:typeof r?.finished!=\"boolean\"?null:!!(r.finished||e===!1&&r.ended===!0&&r.length===0)}function ob(t){if(!Qi(t))return null;if(t.readableEnded===!0)return !0;let e=t._readableState;return !e||e.errored?!1:typeof e?.ended!=\"boolean\"?null:e.ended}function If(t,e){if(!Qi(t))return null;let r=t._readableState;return r!=null&&r.errored?!1:typeof r?.endEmitted!=\"boolean\"?null:!!(r.endEmitted||e===!1&&r.ended===!0&&r.length===0)}function Tf(t){return t&&t[Bs]!=null?t[Bs]:typeof t?.readable!=\"boolean\"?null:Ji(t)?!1:Qi(t)&&t.readable&&!If(t)}function Rf(t){return typeof t?.writable!=\"boolean\"?null:Ji(t)?!1:Yi(t)&&t.writable&&!Af(t)}function ab(t,e){return et(t)?Ji(t)?!0:!(e?.readable!==!1&&Tf(t)||e?.writable!==!1&&Rf(t)):null}function lb(t){var e,r;return et(t)?t.writableErrored?t.writableErrored:(e=(r=t._writableState)===null||r===void 0?void 0:r.errored)!==null&&e!==void 0?e:null:null}function ub(t){var e,r;return et(t)?t.readableErrored?t.readableErrored:(e=(r=t._readableState)===null||r===void 0?void 0:r.errored)!==null&&e!==void 0?e:null:null}function fb(t){if(!et(t))return null;if(typeof t.closed==\"boolean\")return t.closed;let e=t._writableState,r=t._readableState;return typeof e?.closed==\"boolean\"||typeof r?.closed==\"boolean\"?e?.closed||r?.closed:typeof t._closed==\"boolean\"&&Cf(t)?t._closed:null}function Cf(t){return typeof t._closed==\"boolean\"&&typeof t._defaultKeepAlive==\"boolean\"&&typeof t._removedConnection==\"boolean\"&&typeof t._removedContLen==\"boolean\"}function Bf(t){return typeof t._sent100==\"boolean\"&&Cf(t)}function cb(t){var e;return typeof t._consuming==\"boolean\"&&typeof t._dumped==\"boolean\"&&((e=t.req)===null||e===void 0?void 0:e.upgradeOrConnect)===void 0}function hb(t){if(!et(t))return null;let e=t._writableState,r=t._readableState,i=e||r;return !i&&Bf(t)||!!(i&&i.autoDestroy&&i.emitClose&&i.closed===!1)}function db(t){var e;return !!(t&&((e=t[mf])!==null&&e!==void 0?e:t.readableDidRead||t.readableAborted))}function pb(t){var e,r,i,n,o,s,a,u,c,h;return !!(t&&((e=(r=(i=(n=(o=(s=t[_f])!==null&&s!==void 0?s:t.readableErrored)!==null&&o!==void 0?o:t.writableErrored)!==null&&n!==void 0?n:(a=t._readableState)===null||a===void 0?void 0:a.errorEmitted)!==null&&i!==void 0?i:(u=t._writableState)===null||u===void 0?void 0:u.errorEmitted)!==null&&r!==void 0?r:(c=t._readableState)===null||c===void 0?void 0:c.errored)!==null&&e!==void 0?e:!((h=t._writableState)===null||h===void 0)&&h.errored))}Pf.exports={kDestroyed:wf,isDisturbed:db,kIsDisturbed:mf,isErrored:pb,kIsErrored:_f,isReadable:Tf,kIsReadable:Bs,kIsClosedPromise:eb,kControllerErrorFunction:tb,isClosed:fb,isDestroyed:Ji,isDuplexNodeStream:rb,isFinished:ab,isIterable:nb,isReadableNodeStream:Qi,isReadableStream:vf,isReadableEnded:ob,isReadableFinished:If,isReadableErrored:ub,isNodeStream:et,isWebStream:ib,isWritable:Rf,isWritableNodeStream:Yi,isWritableStream:Ef,isWritableEnded:Af,isWritableFinished:sb,isWritableErrored:lb,isServerRequest:cb,isServerResponse:Bf,willEmitClose:hb,isTransformStream:Sf};});var mt=M((zI,Ms)=>{v();m();_();var Nt=Ut(),{AbortError:Df,codes:gb}=Se(),{ERR_INVALID_ARG_TYPE:yb,ERR_STREAM_PREMATURE_CLOSE:Of}=gb,{kEmptyObject:Os,once:ks}=Je(),{validateAbortSignal:bb,validateFunction:wb,validateObject:_b,validateBoolean:mb}=fi(),{Promise:vb,PromisePrototypeThen:Eb}=ce(),{isClosed:Sb,isReadable:kf,isReadableNodeStream:Ps,isReadableStream:Ab,isReadableFinished:xf,isReadableErrored:Mf,isWritable:Lf,isWritableNodeStream:Uf,isWritableStream:Ib,isWritableFinished:Nf,isWritableErrored:qf,isNodeStream:Tb,willEmitClose:Rb,kIsClosedPromise:Cb}=tt();function Bb(t){return t.setHeader&&typeof t.abort==\"function\"}var xs=()=>{};function jf(t,e,r){var i,n;if(arguments.length===2?(r=e,e=Os):e==null?e=Os:_b(e,\"options\"),wb(r,\"callback\"),bb(e.signal,\"options.signal\"),r=ks(r),Ab(t)||Ib(t))return Pb(t,e,r);if(!Tb(t))throw new yb(\"stream\",[\"ReadableStream\",\"WritableStream\",\"Stream\"],t);let o=(i=e.readable)!==null&&i!==void 0?i:Ps(t),s=(n=e.writable)!==null&&n!==void 0?n:Uf(t),a=t._writableState,u=t._readableState,c=()=>{t.writable||g();},h=Rb(t)&&Ps(t)===o&&Uf(t)===s,d=Nf(t,!1),g=()=>{d=!0,t.destroyed&&(h=!1),!(h&&(!t.readable||o))&&(!o||y)&&r.call(t);},y=xf(t,!1),w=()=>{y=!0,t.destroyed&&(h=!1),!(h&&(!t.writable||s))&&(!s||d)&&r.call(t);},E=N=>{r.call(t,N);},S=Sb(t),I=()=>{S=!0;let N=qf(t)||Mf(t);if(N&&typeof N!=\"boolean\")return r.call(t,N);if(o&&!y&&Ps(t,!0)&&!xf(t,!1))return r.call(t,new Of);if(s&&!d&&!Nf(t,!1))return r.call(t,new Of);r.call(t);},C=()=>{S=!0;let N=qf(t)||Mf(t);if(N&&typeof N!=\"boolean\")return r.call(t,N);r.call(t);},R=()=>{t.req.on(\"finish\",g);};Bb(t)?(t.on(\"complete\",g),h||t.on(\"abort\",I),t.req?R():t.on(\"request\",R)):s&&!a&&(t.on(\"end\",c),t.on(\"close\",c)),!h&&typeof t.aborted==\"boolean\"&&t.on(\"aborted\",I),t.on(\"end\",w),t.on(\"finish\",g),e.error!==!1&&t.on(\"error\",E),t.on(\"close\",I),S?Nt.nextTick(I):a!=null&&a.errorEmitted||u!=null&&u.errorEmitted?h||Nt.nextTick(C):(!o&&(!h||kf(t))&&(d||Lf(t)===!1)||!s&&(!h||Lf(t))&&(y||kf(t)===!1)||u&&t.req&&t.aborted)&&Nt.nextTick(C);let U=()=>{r=xs,t.removeListener(\"aborted\",I),t.removeListener(\"complete\",g),t.removeListener(\"abort\",I),t.removeListener(\"request\",R),t.req&&t.req.removeListener(\"finish\",g),t.removeListener(\"end\",c),t.removeListener(\"close\",c),t.removeListener(\"finish\",g),t.removeListener(\"end\",w),t.removeListener(\"error\",E),t.removeListener(\"close\",I);};if(e.signal&&!S){let N=()=>{let W=r;U(),W.call(t,new Df(void 0,{cause:e.signal.reason}));};if(e.signal.aborted)Nt.nextTick(N);else {let W=r;r=ks((...K)=>{e.signal.removeEventListener(\"abort\",N),W.apply(t,K);}),e.signal.addEventListener(\"abort\",N);}}return U}function Pb(t,e,r){let i=!1,n=xs;if(e.signal)if(n=()=>{i=!0,r.call(t,new Df(void 0,{cause:e.signal.reason}));},e.signal.aborted)Nt.nextTick(n);else {let s=r;r=ks((...a)=>{e.signal.removeEventListener(\"abort\",n),s.apply(t,a);}),e.signal.addEventListener(\"abort\",n);}let o=(...s)=>{i||Nt.nextTick(()=>r.apply(t,s));};return Eb(t[Cb].promise,o,o),xs}function Ob(t,e){var r;let i=!1;return e===null&&(e=Os),(r=e)!==null&&r!==void 0&&r.cleanup&&(mb(e.cleanup,\"cleanup\"),i=e.cleanup),new vb((n,o)=>{let s=jf(t,e,a=>{i&&s(),a?o(a):n();});})}Ms.exports=jf;Ms.exports.finished=Ob;});var tr=M((rT,Gf)=>{v();m();_();var rt=Ut(),{aggregateTwoErrors:kb,codes:{ERR_MULTIPLE_CALLBACK:xb},AbortError:Mb}=Se(),{Symbol:$f}=ce(),{kDestroyed:Lb,isDestroyed:Ub,isFinished:Nb,isServerRequest:qb}=tt(),Hf=$f(\"kDestroy\"),Ls=$f(\"kConstruct\");function Vf(t,e,r){t&&(t.stack,e&&!e.errored&&(e.errored=t),r&&!r.errored&&(r.errored=t));}function Db(t,e){let r=this._readableState,i=this._writableState,n=i||r;return i!=null&&i.destroyed||r!=null&&r.destroyed?(typeof e==\"function\"&&e(),this):(Vf(t,i,r),i&&(i.destroyed=!0),r&&(r.destroyed=!0),n.constructed?Ff(this,t,e):this.once(Hf,function(o){Ff(this,kb(o,t),e);}),this)}function Ff(t,e,r){let i=!1;function n(o){if(i)return;i=!0;let s=t._readableState,a=t._writableState;Vf(o,a,s),a&&(a.closed=!0),s&&(s.closed=!0),typeof r==\"function\"&&r(o),o?rt.nextTick(jb,t,o):rt.nextTick(zf,t);}try{t._destroy(e||null,n);}catch(o){n(o);}}function jb(t,e){Us(t,e),zf(t);}function zf(t){let e=t._readableState,r=t._writableState;r&&(r.closeEmitted=!0),e&&(e.closeEmitted=!0),(r!=null&&r.emitClose||e!=null&&e.emitClose)&&t.emit(\"close\");}function Us(t,e){let r=t._readableState,i=t._writableState;i!=null&&i.errorEmitted||r!=null&&r.errorEmitted||(i&&(i.errorEmitted=!0),r&&(r.errorEmitted=!0),t.emit(\"error\",e));}function Fb(){let t=this._readableState,e=this._writableState;t&&(t.constructed=!0,t.closed=!1,t.closeEmitted=!1,t.destroyed=!1,t.errored=null,t.errorEmitted=!1,t.reading=!1,t.ended=t.readable===!1,t.endEmitted=t.readable===!1),e&&(e.constructed=!0,e.destroyed=!1,e.closed=!1,e.closeEmitted=!1,e.errored=null,e.errorEmitted=!1,e.finalCalled=!1,e.prefinished=!1,e.ended=e.writable===!1,e.ending=e.writable===!1,e.finished=e.writable===!1);}function Ns(t,e,r){let i=t._readableState,n=t._writableState;if(n!=null&&n.destroyed||i!=null&&i.destroyed)return this;i!=null&&i.autoDestroy||n!=null&&n.autoDestroy?t.destroy(e):e&&(e.stack,n&&!n.errored&&(n.errored=e),i&&!i.errored&&(i.errored=e),r?rt.nextTick(Us,t,e):Us(t,e));}function Wb(t,e){if(typeof t._construct!=\"function\")return;let r=t._readableState,i=t._writableState;r&&(r.constructed=!1),i&&(i.constructed=!1),t.once(Ls,e),!(t.listenerCount(Ls)>1)&&rt.nextTick($b,t);}function $b(t){let e=!1;function r(i){if(e){Ns(t,i??new xb);return}e=!0;let n=t._readableState,o=t._writableState,s=o||n;n&&(n.constructed=!0),o&&(o.constructed=!0),s.destroyed?t.emit(Hf,i):i?Ns(t,i,!0):rt.nextTick(Hb,t);}try{t._construct(i=>{rt.nextTick(r,i);});}catch(i){rt.nextTick(r,i);}}function Hb(t){t.emit(Ls);}function Wf(t){return t?.setHeader&&typeof t.abort==\"function\"}function Kf(t){t.emit(\"close\");}function Vb(t,e){t.emit(\"error\",e),rt.nextTick(Kf,t);}function zb(t,e){!t||Ub(t)||(!e&&!Nb(t)&&(e=new Mb),qb(t)?(t.socket=null,t.destroy(e)):Wf(t)?t.abort():Wf(t.req)?t.req.abort():typeof t.destroy==\"function\"?t.destroy(e):typeof t.close==\"function\"?t.close():e?rt.nextTick(Vb,t,e):rt.nextTick(Kf,t),t.destroyed||(t[Lb]=!0));}Gf.exports={construct:Wb,destroyer:zb,destroy:Db,undestroy:Fb,errorOrDestroy:Ns};});function Y(){Y.init.call(this);}function Xi(t){if(typeof t!=\"function\")throw new TypeError('The \"listener\" argument must be of type Function. Received type '+typeof t)}function nc(t){return t._maxListeners===void 0?Y.defaultMaxListeners:t._maxListeners}function Xf(t,e,r,i){var n,o,s,a;if(Xi(r),(o=t._events)===void 0?(o=t._events=Object.create(null),t._eventsCount=0):(o.newListener!==void 0&&(t.emit(\"newListener\",e,r.listener?r.listener:r),o=t._events),s=o[e]),s===void 0)s=o[e]=r,++t._eventsCount;else if(typeof s==\"function\"?s=o[e]=i?[r,s]:[s,r]:i?s.unshift(r):s.push(r),(n=nc(t))>0&&s.length>n&&!s.warned){s.warned=!0;var u=new Error(\"Possible EventEmitter memory leak detected. \"+s.length+\" \"+String(e)+\" listeners added. Use emitter.setMaxListeners() to increase limit\");u.name=\"MaxListenersExceededWarning\",u.emitter=t,u.type=e,u.count=s.length,a=u,console&&console.warn&&console.warn(a);}return t}function Kb(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function Zf(t,e,r){var i={fired:!1,wrapFn:void 0,target:t,type:e,listener:r},n=Kb.bind(i);return n.listener=r,i.wrapFn=n,n}function ec(t,e,r){var i=t._events;if(i===void 0)return [];var n=i[e];return n===void 0?[]:typeof n==\"function\"?r?[n.listener||n]:[n]:r?function(o){for(var s=new Array(o.length),a=0;a{v();m();_();Ur=typeof Reflect==\"object\"?Reflect:null,Qf=Ur&&typeof Ur.apply==\"function\"?Ur.apply:function(t,e,r){return Function.prototype.apply.call(t,e,r)};ic=Ur&&typeof Ur.ownKeys==\"function\"?Ur.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)};Yf=Number.isNaN||function(t){return t!=t};rc=Y,Y.EventEmitter=Y,Y.prototype._events=void 0,Y.prototype._eventsCount=0,Y.prototype._maxListeners=void 0;Jf=10;Object.defineProperty(Y,\"defaultMaxListeners\",{enumerable:!0,get:function(){return Jf},set:function(t){if(typeof t!=\"number\"||t<0||Yf(t))throw new RangeError('The value of \"defaultMaxListeners\" is out of range. It must be a non-negative number. Received '+t+\".\");Jf=t;}}),Y.init=function(){this._events!==void 0&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0;},Y.prototype.setMaxListeners=function(t){if(typeof t!=\"number\"||t<0||Yf(t))throw new RangeError('The value of \"n\" is out of range. It must be a non-negative number. Received '+t+\".\");return this._maxListeners=t,this},Y.prototype.getMaxListeners=function(){return nc(this)},Y.prototype.emit=function(t){for(var e=[],r=1;r0&&(o=e[0]),o instanceof Error)throw o;var s=new Error(\"Unhandled error.\"+(o?\" (\"+o.message+\")\":\"\"));throw s.context=o,s}var a=n[t];if(a===void 0)return !1;if(typeof a==\"function\")Qf(a,this,e);else {var u=a.length,c=sc(a,u);for(r=0;r=0;o--)if(r[o]===e||r[o].listener===e){s=r[o].listener,n=o;break}if(n<0)return this;n===0?r.shift():function(a,u){for(;u+1=0;i--)this.removeListener(t,e[i]);return this},Y.prototype.listeners=function(t){return ec(this,t,!0)},Y.prototype.rawListeners=function(t){return ec(this,t,!1)},Y.listenerCount=function(t,e){return typeof t.listenerCount==\"function\"?t.listenerCount(e):tc.call(t,e)},Y.prototype.listenerCount=tc,Y.prototype.eventNames=function(){return this._eventsCount>0?ic(this._events):[]};Be=rc;Be.EventEmitter;Be.defaultMaxListeners;Be.init;Be.listenerCount;Be.EventEmitter;Be.defaultMaxListeners;Be.init;Be.listenerCount;});var rr={};Qt(rr,{EventEmitter:()=>Gb,default:()=>Be,defaultMaxListeners:()=>Qb,init:()=>Yb,listenerCount:()=>Jb,on:()=>Xb,once:()=>Zb});var Gb,Qb,Yb,Jb,Xb,Zb,ir=we(()=>{v();m();_();qs();qs();Be.once=function(t,e){return new Promise((r,i)=>{function n(...s){o!==void 0&&t.removeListener(\"error\",o),r(s);}let o;e!==\"error\"&&(o=s=>{t.removeListener(name,n),i(s);},t.once(\"error\",o)),t.once(e,n);})};Be.on=function(t,e){let r=[],i=[],n=null,o=!1,s={async next(){let c=r.shift();if(c)return createIterResult(c,!1);if(n){let h=Promise.reject(n);return n=null,h}return o?createIterResult(void 0,!0):new Promise((h,d)=>i.push({resolve:h,reject:d}))},async return(){t.removeListener(e,a),t.removeListener(\"error\",u),o=!0;for(let c of i)c.resolve(createIterResult(void 0,!0));return createIterResult(void 0,!0)},throw(c){n=c,t.removeListener(e,a),t.removeListener(\"error\",u);},[Symbol.asyncIterator](){return this}};return t.on(e,a),t.on(\"error\",u),s;function a(...c){let h=i.shift();h?h.resolve(createIterResult(c,!1)):r.push(c);}function u(c){o=!0;let h=i.shift();h?h.reject(c):n=c,s.return();}};({EventEmitter:Gb,defaultMaxListeners:Qb,init:Yb,listenerCount:Jb,on:Xb,once:Zb}=Be);});var tn=M((xT,ac)=>{v();m();_();var{ArrayIsArray:ew,ObjectSetPrototypeOf:oc}=ce(),{EventEmitter:Zi}=(ir(),X(rr));function en(t){Zi.call(this,t);}oc(en.prototype,Zi.prototype);oc(en,Zi);en.prototype.pipe=function(t,e){let r=this;function i(h){t.writable&&t.write(h)===!1&&r.pause&&r.pause();}r.on(\"data\",i);function n(){r.readable&&r.resume&&r.resume();}t.on(\"drain\",n),!t._isStdio&&(!e||e.end!==!1)&&(r.on(\"end\",s),r.on(\"close\",a));let o=!1;function s(){o||(o=!0,t.end());}function a(){o||(o=!0,typeof t.destroy==\"function\"&&t.destroy());}function u(h){c(),Zi.listenerCount(this,\"error\")===0&&this.emit(\"error\",h);}Ds(r,\"error\",u),Ds(t,\"error\",u);function c(){r.removeListener(\"data\",i),t.removeListener(\"drain\",n),r.removeListener(\"end\",s),r.removeListener(\"close\",a),r.removeListener(\"error\",u),t.removeListener(\"error\",u),r.removeListener(\"end\",c),r.removeListener(\"close\",c),t.removeListener(\"close\",c);}return r.on(\"end\",c),r.on(\"close\",c),t.on(\"close\",c),t.emit(\"pipe\",r),t};function Ds(t,e,r){if(typeof t.prependListener==\"function\")return t.prependListener(e,r);!t._events||!t._events[e]?t.on(e,r):ew(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]];}ac.exports={Stream:en,prependListener:Ds};});var ci=M(($T,rn)=>{v();m();_();var{AbortError:lc,codes:tw}=Se(),{isNodeStream:uc,isWebStream:rw,kControllerErrorFunction:iw}=tt(),nw=mt(),{ERR_INVALID_ARG_TYPE:fc}=tw,sw=(t,e)=>{if(typeof t!=\"object\"||!(\"aborted\"in t))throw new fc(e,\"AbortSignal\",t)};rn.exports.addAbortSignal=function(e,r){if(sw(e,\"signal\"),!uc(r)&&!rw(r))throw new fc(\"stream\",[\"ReadableStream\",\"WritableStream\",\"Stream\"],r);return rn.exports.addAbortSignalNoValidate(e,r)};rn.exports.addAbortSignalNoValidate=function(t,e){if(typeof t!=\"object\"||!(\"aborted\"in t))return e;let r=uc(e)?()=>{e.destroy(new lc(void 0,{cause:t.reason}));}:()=>{e[iw](new lc(void 0,{cause:t.reason}));};return t.aborted?r():(t.addEventListener(\"abort\",r),nw(e,()=>t.removeEventListener(\"abort\",r))),e};});var dc=M((e2,hc)=>{v();m();_();var{StringPrototypeSlice:cc,SymbolIterator:ow,TypedArrayPrototypeSet:nn,Uint8Array:aw}=ce(),{Buffer:js}=(ye(),X(_e)),{inspect:lw}=Je();hc.exports=class{constructor(){this.head=null,this.tail=null,this.length=0;}push(e){let r={data:e,next:null};this.length>0?this.tail.next=r:this.head=r,this.tail=r,++this.length;}unshift(e){let r={data:e,next:this.head};this.length===0&&(this.tail=r),this.head=r,++this.length;}shift(){if(this.length===0)return;let e=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,e}clear(){this.head=this.tail=null,this.length=0;}join(e){if(this.length===0)return \"\";let r=this.head,i=\"\"+r.data;for(;(r=r.next)!==null;)i+=e+r.data;return i}concat(e){if(this.length===0)return js.alloc(0);let r=js.allocUnsafe(e>>>0),i=this.head,n=0;for(;i;)nn(r,i.data,n),n+=i.data.length,i=i.next;return r}consume(e,r){let i=this.head.data;if(eo.length)r+=o,e-=o.length;else {e===o.length?(r+=o,++n,i.next?this.head=i.next:this.head=this.tail=null):(r+=cc(o,0,e),this.head=i,i.data=cc(o,e));break}++n;}while((i=i.next)!==null);return this.length-=n,r}_getBuffer(e){let r=js.allocUnsafe(e),i=e,n=this.head,o=0;do{let s=n.data;if(e>s.length)nn(r,s,i-e),e-=s.length;else {e===s.length?(nn(r,s,i-e),++o,n.next?this.head=n.next:this.head=this.tail=null):(nn(r,new aw(s.buffer,s.byteOffset,e),i-e),this.head=n,n.data=s.slice(e));break}++o;}while((n=n.next)!==null);return this.length-=o,r}[Symbol.for(\"nodejs.util.inspect.custom\")](e,r){return lw(this,{...r,depth:0,customInspect:!1})}};});var sn=M((f2,gc)=>{v();m();_();var{MathFloor:uw,NumberIsInteger:fw}=ce(),{ERR_INVALID_ARG_VALUE:cw}=Se().codes;function hw(t,e,r){return t.highWaterMark!=null?t.highWaterMark:e?t[r]:null}function pc(t){return t?16:16*1024}function dw(t,e,r,i){let n=hw(e,i,r);if(n!=null){if(!fw(n)||n<0){let o=i?`options.${r}`:\"options.highWaterMark\";throw new cw(o,n)}return uw(n)}return pc(t.objectMode)}gc.exports={getHighWaterMark:dw,getDefaultHighWaterMark:pc};});function wc(t){var e=t.length;if(e%4>0)throw new Error(\"Invalid string. Length must be a multiple of 4\");var r=t.indexOf(\"=\");return r===-1&&(r=e),[r,r===e?0:4-r%4]}function pw(t,e,r){for(var i,n,o=[],s=e;s>18&63]+$e[n>>12&63]+$e[n>>6&63]+$e[63&n]);return o.join(\"\")}function vt(t){if(t>2147483647)throw new RangeError('The value \"'+t+'\" is invalid for option \"size\"');var e=new Uint8Array(t);return Object.setPrototypeOf(e,k.prototype),e}function k(t,e,r){if(typeof t==\"number\"){if(typeof e==\"string\")throw new TypeError('The \"string\" argument must be of type string. Received type number');return Hs(t)}return Cc(t,e,r)}function Cc(t,e,r){if(typeof t==\"string\")return function(o,s){if(typeof s==\"string\"&&s!==\"\"||(s=\"utf8\"),!k.isEncoding(s))throw new TypeError(\"Unknown encoding: \"+s);var a=0|Pc(o,s),u=vt(a),c=u.write(o,s);return c!==a&&(u=u.slice(0,c)),u}(t,e);if(ArrayBuffer.isView(t))return Fs(t);if(t==null)throw new TypeError(\"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type \"+typeof t);if(Et(t,ArrayBuffer)||t&&Et(t.buffer,ArrayBuffer)||typeof SharedArrayBuffer<\"u\"&&(Et(t,SharedArrayBuffer)||t&&Et(t.buffer,SharedArrayBuffer)))return mc(t,e,r);if(typeof t==\"number\")throw new TypeError('The \"value\" argument must not be of type number. Received type number');var i=t.valueOf&&t.valueOf();if(i!=null&&i!==t)return k.from(i,e,r);var n=function(o){if(k.isBuffer(o)){var s=0|Ks(o.length),a=vt(s);return a.length===0||o.copy(a,0,0,s),a}if(o.length!==void 0)return typeof o.length!=\"number\"||Gs(o.length)?vt(0):Fs(o);if(o.type===\"Buffer\"&&Array.isArray(o.data))return Fs(o.data)}(t);if(n)return n;if(typeof Symbol<\"u\"&&Symbol.toPrimitive!=null&&typeof t[Symbol.toPrimitive]==\"function\")return k.from(t[Symbol.toPrimitive](\"string\"),e,r);throw new TypeError(\"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type \"+typeof t)}function Bc(t){if(typeof t!=\"number\")throw new TypeError('\"size\" argument must be of type number');if(t<0)throw new RangeError('The value \"'+t+'\" is invalid for option \"size\"')}function Hs(t){return Bc(t),vt(t<0?0:0|Ks(t))}function Fs(t){for(var e=t.length<0?0:0|Ks(t.length),r=vt(e),i=0;i=2147483647)throw new RangeError(\"Attempt to allocate Buffer larger than maximum size: 0x\"+2147483647 .toString(16)+\" bytes\");return 0|t}function Pc(t,e){if(k.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||Et(t,ArrayBuffer))return t.byteLength;if(typeof t!=\"string\")throw new TypeError('The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);var r=t.length,i=arguments.length>2&&arguments[2]===!0;if(!i&&r===0)return 0;for(var n=!1;;)switch(e){case\"ascii\":case\"latin1\":case\"binary\":return r;case\"utf8\":case\"utf-8\":return Vs(t).length;case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return 2*r;case\"hex\":return r>>>1;case\"base64\":return Mc(t).length;default:if(n)return i?-1:Vs(t).length;e=(\"\"+e).toLowerCase(),n=!0;}}function yw(t,e,r){var i=!1;if((e===void 0||e<0)&&(e=0),e>this.length||((r===void 0||r>this.length)&&(r=this.length),r<=0)||(r>>>=0)<=(e>>>=0))return \"\";for(t||(t=\"utf8\");;)switch(t){case\"hex\":return Iw(this,e,r);case\"utf8\":case\"utf-8\":return kc(this,e,r);case\"ascii\":return Sw(this,e,r);case\"latin1\":case\"binary\":return Aw(this,e,r);case\"base64\":return Ew(this,e,r);case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return Tw(this,e,r);default:if(i)throw new TypeError(\"Unknown encoding: \"+t);t=(t+\"\").toLowerCase(),i=!0;}}function sr(t,e,r){var i=t[e];t[e]=t[r],t[r]=i;}function vc(t,e,r,i,n){if(t.length===0)return -1;if(typeof r==\"string\"?(i=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),Gs(r=+r)&&(r=n?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(n)return -1;r=t.length-1;}else if(r<0){if(!n)return -1;r=0;}if(typeof e==\"string\"&&(e=k.from(e,i)),k.isBuffer(e))return e.length===0?-1:Ec(t,e,r,i,n);if(typeof e==\"number\")return e&=255,typeof Uint8Array.prototype.indexOf==\"function\"?n?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):Ec(t,[e],r,i,n);throw new TypeError(\"val must be string, number or Buffer\")}function Ec(t,e,r,i,n){var o,s=1,a=t.length,u=e.length;if(i!==void 0&&((i=String(i).toLowerCase())===\"ucs2\"||i===\"ucs-2\"||i===\"utf16le\"||i===\"utf-16le\")){if(t.length<2||e.length<2)return -1;s=2,a/=2,u/=2,r/=2;}function c(y,w){return s===1?y[w]:y.readUInt16BE(w*s)}if(n){var h=-1;for(o=r;oa&&(r=a-u),o=r;o>=0;o--){for(var d=!0,g=0;gn&&(i=n):i=n;var o=e.length;i>o/2&&(i=o/2);for(var s=0;s>8,u=s%256,c.push(u),c.push(a);return c}(e,t.length-r),t,r,i)}function Ew(t,e,r){return e===0&&r===t.length?$s.fromByteArray(t):$s.fromByteArray(t.slice(e,r))}function kc(t,e,r){r=Math.min(t.length,r);for(var i=[],n=e;n239?4:c>223?3:c>191?2:1;if(n+d<=r)switch(d){case 1:c<128&&(h=c);break;case 2:(192&(o=t[n+1]))==128&&(u=(31&c)<<6|63&o)>127&&(h=u);break;case 3:o=t[n+1],s=t[n+2],(192&o)==128&&(192&s)==128&&(u=(15&c)<<12|(63&o)<<6|63&s)>2047&&(u<55296||u>57343)&&(h=u);break;case 4:o=t[n+1],s=t[n+2],a=t[n+3],(192&o)==128&&(192&s)==128&&(192&a)==128&&(u=(15&c)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&u<1114112&&(h=u);}h===null?(h=65533,d=1):h>65535&&(h-=65536,i.push(h>>>10&1023|55296),h=56320|1023&h),i.push(h),n+=d;}return function(g){var y=g.length;if(y<=4096)return String.fromCharCode.apply(String,g);for(var w=\"\",E=0;Ei)&&(r=i);for(var n=\"\",o=e;or)throw new RangeError(\"Trying to access beyond buffer length\")}function Pe(t,e,r,i,n,o){if(!k.isBuffer(t))throw new TypeError('\"buffer\" argument must be a Buffer instance');if(e>n||et.length)throw new RangeError(\"Index out of range\")}function xc(t,e,r,i,n,o){if(r+i>t.length)throw new RangeError(\"Index out of range\");if(r<0)throw new RangeError(\"Index out of range\")}function Sc(t,e,r,i,n){return e=+e,r>>>=0,n||xc(t,0,r,4),Nr.write(t,e,r,i,23,4),r+4}function Ac(t,e,r,i,n){return e=+e,r>>>=0,n||xc(t,0,r,8),Nr.write(t,e,r,i,52,8),r+8}function Vs(t,e){var r;e=e||1/0;for(var i=t.length,n=null,o=[],s=0;s55295&&r<57344){if(!n){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(s+1===i){(e-=3)>-1&&o.push(239,191,189);continue}n=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),n=r;continue}r=65536+(n-55296<<10|r-56320);}else n&&(e-=3)>-1&&o.push(239,191,189);if(n=null,r<128){if((e-=1)<0)break;o.push(r);}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128);}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128);}else {if(!(r<1114112))throw new Error(\"Invalid code point\");if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128);}}return o}function Mc(t){return $s.toByteArray(function(e){if((e=(e=e.split(\"=\")[0]).trim().replace(Rw,\"\")).length<2)return \"\";for(;e.length%4!=0;)e+=\"=\";return e}(t))}function un(t,e,r,i){for(var n=0;n=e.length||n>=t.length);++n)e[n+r]=t[n];return n}function Et(t,e){return t instanceof e||t!=null&&t.constructor!=null&&t.constructor.name!=null&&t.constructor.name===e.name}function Gs(t){return t!=t}function Ic(t,e){for(var r in t)e[r]=t[r];}function or(t,e,r){return it(t,e,r)}function hi(t){var e;switch(this.encoding=function(r){var i=function(n){if(!n)return \"utf8\";for(var o;;)switch(n){case\"utf8\":case\"utf-8\":return \"utf8\";case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return \"utf16le\";case\"latin1\":case\"binary\":return \"latin1\";case\"base64\":case\"ascii\":case\"hex\":return n;default:if(o)return;n=(\"\"+n).toLowerCase(),o=!0;}}(r);if(typeof i!=\"string\"&&(zs.isEncoding===Tc||!Tc(r)))throw new Error(\"Unknown encoding: \"+r);return i||r}(t),this.encoding){case\"utf16le\":this.text=Ow,this.end=kw,e=4;break;case\"utf8\":this.fillLast=Pw,e=4;break;case\"base64\":this.text=xw,this.end=Mw,e=3;break;default:return this.write=Lw,this.end=Uw,void 0}this.lastNeed=0,this.lastTotal=0,this.lastChar=zs.allocUnsafe(e);}function Ws(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function Pw(t){var e=this.lastTotal-this.lastNeed,r=function(i,n,o){if((192&n[0])!=128)return i.lastNeed=0,\"\\uFFFD\";if(i.lastNeed>1&&n.length>1){if((192&n[1])!=128)return i.lastNeed=1,\"\\uFFFD\";if(i.lastNeed>2&&n.length>2&&(192&n[2])!=128)return i.lastNeed=2,\"\\uFFFD\"}}(this,t);return r!==void 0?r:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),this.lastNeed-=t.length,void 0)}function Ow(t,e){if((t.length-e)%2==0){var r=t.toString(\"utf16le\",e);if(r){var i=r.charCodeAt(r.length-1);if(i>=55296&&i<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString(\"utf16le\",e,t.length-1)}function kw(t){var e=t&&t.length?this.write(t):\"\";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString(\"utf16le\",0,r)}return e}function xw(t,e){var r=(t.length-e)%3;return r===0?t.toString(\"base64\",e):(this.lastNeed=3-r,this.lastTotal=3,r===1?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString(\"base64\",e,t.length-r))}function Mw(t){var e=t&&t.length?this.write(t):\"\";return this.lastNeed?e+this.lastChar.toString(\"base64\",0,3-this.lastNeed):e}function Lw(t){return t.toString(this.encoding)}function Uw(t){return t&&t.length?this.write(t):\"\"}var Rc,$e,ke,yc,on,nr,bc,gw,St,$s,Nr,_c,Rw,Cw,an,ln,it,Bw,ar,zs,Tc,Qs=we(()=>{v();m();_();for(Rc={byteLength:function(t){var e=wc(t),r=e[0],i=e[1];return 3*(r+i)/4-i},toByteArray:function(t){var e,r,i=wc(t),n=i[0],o=i[1],s=new yc(function(c,h,d){return 3*(h+d)/4-d}(0,n,o)),a=0,u=o>0?n-4:n;for(r=0;r>16&255,s[a++]=e>>8&255,s[a++]=255&e;return o===2&&(e=ke[t.charCodeAt(r)]<<2|ke[t.charCodeAt(r+1)]>>4,s[a++]=255&e),o===1&&(e=ke[t.charCodeAt(r)]<<10|ke[t.charCodeAt(r+1)]<<4|ke[t.charCodeAt(r+2)]>>2,s[a++]=e>>8&255,s[a++]=255&e),s},fromByteArray:function(t){for(var e,r=t.length,i=r%3,n=[],o=0,s=r-i;os?s:o+16383));return i===1?(e=t[r-1],n.push($e[e>>2]+$e[e<<4&63]+\"==\")):i===2&&(e=(t[r-2]<<8)+t[r-1],n.push($e[e>>10]+$e[e>>4&63]+$e[e<<2&63]+\"=\")),n.join(\"\")}},$e=[],ke=[],yc=typeof Uint8Array<\"u\"?Uint8Array:Array,on=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\",nr=0,bc=on.length;nr>1,h=-7,d=r?n-1:0,g=r?-1:1,y=t[e+d];for(d+=g,o=y&(1<<-h)-1,y>>=-h,h+=a;h>0;o=256*o+t[e+d],d+=g,h-=8);for(s=o&(1<<-h)-1,o>>=-h,h+=i;h>0;s=256*s+t[e+d],d+=g,h-=8);if(o===0)o=1-c;else {if(o===u)return s?NaN:1/0*(y?-1:1);s+=Math.pow(2,i),o-=c;}return (y?-1:1)*s*Math.pow(2,o-i)},write:function(t,e,r,i,n,o){var s,a,u,c=8*o-n-1,h=(1<>1,g=n===23?Math.pow(2,-24)-Math.pow(2,-77):0,y=i?0:o-1,w=i?1:-1,E=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=h):(s=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-s))<1&&(s--,u*=2),(e+=s+d>=1?g/u:g*Math.pow(2,1-d))*u>=2&&(s++,u/=2),s+d>=h?(a=0,s=h):s+d>=1?(a=(e*u-1)*Math.pow(2,n),s+=d):(a=e*Math.pow(2,d-1)*Math.pow(2,n),s=0));n>=8;t[r+y]=255&a,y+=w,a/=256,n-=8);for(s=s<0;t[r+y]=255&s,y+=w,s/=256,c-=8);t[r+y-w]|=128*E;}},St={},$s=Rc,Nr=gw,_c=typeof Symbol==\"function\"&&typeof Symbol.for==\"function\"?Symbol.for(\"nodejs.util.inspect.custom\"):null;St.Buffer=k,St.SlowBuffer=function(t){return +t!=t&&(t=0),k.alloc(+t)},St.INSPECT_MAX_BYTES=50;St.kMaxLength=2147483647,k.TYPED_ARRAY_SUPPORT=function(){try{var t=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(t,e),t.foo()===42}catch{return !1}}(),k.TYPED_ARRAY_SUPPORT||typeof console>\"u\"||typeof console.error!=\"function\"||console.error(\"This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.\"),Object.defineProperty(k.prototype,\"parent\",{enumerable:!0,get:function(){if(k.isBuffer(this))return this.buffer}}),Object.defineProperty(k.prototype,\"offset\",{enumerable:!0,get:function(){if(k.isBuffer(this))return this.byteOffset}}),k.poolSize=8192,k.from=function(t,e,r){return Cc(t,e,r)},Object.setPrototypeOf(k.prototype,Uint8Array.prototype),Object.setPrototypeOf(k,Uint8Array),k.alloc=function(t,e,r){return function(i,n,o){return Bc(i),i<=0?vt(i):n!==void 0?typeof o==\"string\"?vt(i).fill(n,o):vt(i).fill(n):vt(i)}(t,e,r)},k.allocUnsafe=function(t){return Hs(t)},k.allocUnsafeSlow=function(t){return Hs(t)},k.isBuffer=function(t){return t!=null&&t._isBuffer===!0&&t!==k.prototype},k.compare=function(t,e){if(Et(t,Uint8Array)&&(t=k.from(t,t.offset,t.byteLength)),Et(e,Uint8Array)&&(e=k.from(e,e.offset,e.byteLength)),!k.isBuffer(t)||!k.isBuffer(e))throw new TypeError('The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;for(var r=t.length,i=e.length,n=0,o=Math.min(r,i);ne&&(t+=\" ... \"),\"\"},_c&&(k.prototype[_c]=k.prototype.inspect),k.prototype.compare=function(t,e,r,i,n){if(Et(t,Uint8Array)&&(t=k.from(t,t.offset,t.byteLength)),!k.isBuffer(t))throw new TypeError('The \"target\" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(e===void 0&&(e=0),r===void 0&&(r=t?t.length:0),i===void 0&&(i=0),n===void 0&&(n=this.length),e<0||r>t.length||i<0||n>this.length)throw new RangeError(\"out of range index\");if(i>=n&&e>=r)return 0;if(i>=n)return -1;if(e>=r)return 1;if(this===t)return 0;for(var o=(n>>>=0)-(i>>>=0),s=(r>>>=0)-(e>>>=0),a=Math.min(o,s),u=this.slice(i,n),c=t.slice(e,r),h=0;h>>=0,isFinite(r)?(r>>>=0,i===void 0&&(i=\"utf8\")):(i=r,r=void 0);}var n=this.length-e;if((r===void 0||r>n)&&(r=n),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError(\"Attempt to write outside buffer bounds\");i||(i=\"utf8\");for(var o=!1;;)switch(i){case\"hex\":return bw(this,t,e,r);case\"utf8\":case\"utf-8\":return ww(this,t,e,r);case\"ascii\":return Oc(this,t,e,r);case\"latin1\":case\"binary\":return _w(this,t,e,r);case\"base64\":return mw(this,t,e,r);case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return vw(this,t,e,r);default:if(o)throw new TypeError(\"Unknown encoding: \"+i);i=(\"\"+i).toLowerCase(),o=!0;}},k.prototype.toJSON=function(){return {type:\"Buffer\",data:Array.prototype.slice.call(this._arr||this,0)}};k.prototype.slice=function(t,e){var r=this.length;(t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=e===void 0?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e>>=0,e>>>=0,r||be(t,e,this.length);for(var i=this[t],n=1,o=0;++o>>=0,e>>>=0,r||be(t,e,this.length);for(var i=this[t+--e],n=1;e>0&&(n*=256);)i+=this[t+--e]*n;return i},k.prototype.readUInt8=function(t,e){return t>>>=0,e||be(t,1,this.length),this[t]},k.prototype.readUInt16LE=function(t,e){return t>>>=0,e||be(t,2,this.length),this[t]|this[t+1]<<8},k.prototype.readUInt16BE=function(t,e){return t>>>=0,e||be(t,2,this.length),this[t]<<8|this[t+1]},k.prototype.readUInt32LE=function(t,e){return t>>>=0,e||be(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},k.prototype.readUInt32BE=function(t,e){return t>>>=0,e||be(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},k.prototype.readIntLE=function(t,e,r){t>>>=0,e>>>=0,r||be(t,e,this.length);for(var i=this[t],n=1,o=0;++o=(n*=128)&&(i-=Math.pow(2,8*e)),i},k.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||be(t,e,this.length);for(var i=e,n=1,o=this[t+--i];i>0&&(n*=256);)o+=this[t+--i]*n;return o>=(n*=128)&&(o-=Math.pow(2,8*e)),o},k.prototype.readInt8=function(t,e){return t>>>=0,e||be(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},k.prototype.readInt16LE=function(t,e){t>>>=0,e||be(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},k.prototype.readInt16BE=function(t,e){t>>>=0,e||be(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},k.prototype.readInt32LE=function(t,e){return t>>>=0,e||be(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},k.prototype.readInt32BE=function(t,e){return t>>>=0,e||be(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},k.prototype.readFloatLE=function(t,e){return t>>>=0,e||be(t,4,this.length),Nr.read(this,t,!0,23,4)},k.prototype.readFloatBE=function(t,e){return t>>>=0,e||be(t,4,this.length),Nr.read(this,t,!1,23,4)},k.prototype.readDoubleLE=function(t,e){return t>>>=0,e||be(t,8,this.length),Nr.read(this,t,!0,52,8)},k.prototype.readDoubleBE=function(t,e){return t>>>=0,e||be(t,8,this.length),Nr.read(this,t,!1,52,8)},k.prototype.writeUIntLE=function(t,e,r,i){t=+t,e>>>=0,r>>>=0,i||Pe(this,t,e,r,Math.pow(2,8*r)-1,0);var n=1,o=0;for(this[e]=255&t;++o>>=0,r>>>=0,i||Pe(this,t,e,r,Math.pow(2,8*r)-1,0);var n=r-1,o=1;for(this[e+n]=255&t;--n>=0&&(o*=256);)this[e+n]=t/o&255;return e+r},k.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||Pe(this,t,e,1,255,0),this[e]=255&t,e+1},k.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||Pe(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},k.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||Pe(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},k.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||Pe(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},k.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||Pe(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},k.prototype.writeIntLE=function(t,e,r,i){if(t=+t,e>>>=0,!i){var n=Math.pow(2,8*r-1);Pe(this,t,e,r,n-1,-n);}var o=0,s=1,a=0;for(this[e]=255&t;++o>0)-a&255;return e+r},k.prototype.writeIntBE=function(t,e,r,i){if(t=+t,e>>>=0,!i){var n=Math.pow(2,8*r-1);Pe(this,t,e,r,n-1,-n);}var o=r-1,s=1,a=0;for(this[e+o]=255&t;--o>=0&&(s*=256);)t<0&&a===0&&this[e+o+1]!==0&&(a=1),this[e+o]=(t/s>>0)-a&255;return e+r},k.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||Pe(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},k.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||Pe(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},k.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||Pe(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},k.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||Pe(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},k.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||Pe(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},k.prototype.writeFloatLE=function(t,e,r){return Sc(this,t,e,!0,r)},k.prototype.writeFloatBE=function(t,e,r){return Sc(this,t,e,!1,r)},k.prototype.writeDoubleLE=function(t,e,r){return Ac(this,t,e,!0,r)},k.prototype.writeDoubleBE=function(t,e,r){return Ac(this,t,e,!1,r)},k.prototype.copy=function(t,e,r,i){if(!k.isBuffer(t))throw new TypeError(\"argument should be a Buffer\");if(r||(r=0),i||i===0||(i=this.length),e>=t.length&&(e=t.length),e||(e=0),i>0&&i=this.length)throw new RangeError(\"Index out of range\");if(i<0)throw new RangeError(\"sourceEnd out of bounds\");i>this.length&&(i=this.length),t.length-e=0;--o)t[o+e]=this[o+r];else Uint8Array.prototype.set.call(t,this.subarray(r,i),e);return n},k.prototype.fill=function(t,e,r,i){if(typeof t==\"string\"){if(typeof e==\"string\"?(i=e,e=0,r=this.length):typeof r==\"string\"&&(i=r,r=this.length),i!==void 0&&typeof i!=\"string\")throw new TypeError(\"encoding must be a string\");if(typeof i==\"string\"&&!k.isEncoding(i))throw new TypeError(\"Unknown encoding: \"+i);if(t.length===1){var n=t.charCodeAt(0);(i===\"utf8\"&&n<128||i===\"latin1\")&&(t=n);}}else typeof t==\"number\"?t&=255:typeof t==\"boolean\"&&(t=Number(t));if(e<0||this.length>>=0,r=r===void 0?this.length:r>>>0,t||(t=0),typeof t==\"number\")for(o=e;o=0?(u>0&&(n.lastNeed=u-1),u):--a=0?(u>0&&(n.lastNeed=u-2),u):--a=0?(u>0&&(u===2?u=0:n.lastNeed=u-3),u):0}(this,t,e);if(!this.lastNeed)return t.toString(\"utf8\",e);this.lastTotal=r;var i=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,i),t.toString(\"utf8\",e,i)},hi.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length;};ar.StringDecoder;ar.StringDecoder;});var Lc={};Qt(Lc,{StringDecoder:()=>Nw,default:()=>ar});var Nw,Uc=we(()=>{v();m();_();Qs();Qs();Nw=ar.StringDecoder;});var Ys=M((F2,jc)=>{v();m();_();var Nc=Ut(),{PromisePrototypeThen:qw,SymbolAsyncIterator:qc,SymbolIterator:Dc}=ce(),{Buffer:Dw}=(ye(),X(_e)),{ERR_INVALID_ARG_TYPE:jw,ERR_STREAM_NULL_VALUES:Fw}=Se().codes;function Ww(t,e,r){let i;if(typeof e==\"string\"||e instanceof Dw)return new t({objectMode:!0,...r,read(){this.push(e),this.push(null);}});let n;if(e&&e[qc])n=!0,i=e[qc]();else if(e&&e[Dc])n=!1,i=e[Dc]();else throw new jw(\"iterable\",[\"Iterable\"],e);let o=new t({objectMode:!0,highWaterMark:1,...r}),s=!1;o._read=function(){s||(s=!0,u());},o._destroy=function(c,h){qw(a(c),()=>Nc.nextTick(h,c),d=>Nc.nextTick(h,d||c));};async function a(c){let h=c!=null,d=typeof i.throw==\"function\";if(h&&d){let{value:g,done:y}=await i.throw(c);if(await g,y)return}if(typeof i.return==\"function\"){let{value:g}=await i.return();await g;}}async function u(){for(;;){try{let{value:c,done:h}=n?await i.next():i.next();if(h)o.push(null);else {let d=c&&typeof c.then==\"function\"?await c:c;if(d===null)throw s=!1,new Fw;if(o.push(d))continue;s=!1;}}catch(c){o.destroy(c);}break}}return o}jc.exports=Ww;});var di=M((J2,Zc)=>{v();m();_();var He=Ut(),{ArrayPrototypeIndexOf:$w,NumberIsInteger:Hw,NumberIsNaN:Vw,NumberParseInt:zw,ObjectDefineProperties:$c,ObjectKeys:Kw,ObjectSetPrototypeOf:Hc,Promise:Gw,SafeSet:Qw,SymbolAsyncIterator:Yw,Symbol:Jw}=ce();Zc.exports=F;F.ReadableState=ro;var{EventEmitter:Xw}=(ir(),X(rr)),{Stream:qt,prependListener:Zw}=tn(),{Buffer:Js}=(ye(),X(_e)),{addAbortSignal:e_}=ci(),t_=mt(),H=Je().debuglog(\"stream\",t=>{H=t;}),r_=dc(),Dr=tr(),{getHighWaterMark:i_,getDefaultHighWaterMark:n_}=sn(),{aggregateTwoErrors:Fc,codes:{ERR_INVALID_ARG_TYPE:s_,ERR_METHOD_NOT_IMPLEMENTED:o_,ERR_OUT_OF_RANGE:a_,ERR_STREAM_PUSH_AFTER_EOF:l_,ERR_STREAM_UNSHIFT_AFTER_END_EVENT:u_}}=Se(),{validateObject:f_}=fi(),lr=Jw(\"kPaused\"),{StringDecoder:Vc}=(Uc(),X(Lc)),c_=Ys();Hc(F.prototype,qt.prototype);Hc(F,qt);var Xs=()=>{},{errorOrDestroy:qr}=Dr;function ro(t,e,r){typeof r!=\"boolean\"&&(r=e instanceof nt()),this.objectMode=!!(t&&t.objectMode),r&&(this.objectMode=this.objectMode||!!(t&&t.readableObjectMode)),this.highWaterMark=t?i_(this,t,\"readableHighWaterMark\",r):n_(!1),this.buffer=new r_,this.length=0,this.pipes=[],this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.constructed=!0,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this[lr]=null,this.errorEmitted=!1,this.emitClose=!t||t.emitClose!==!1,this.autoDestroy=!t||t.autoDestroy!==!1,this.destroyed=!1,this.errored=null,this.closed=!1,this.closeEmitted=!1,this.defaultEncoding=t&&t.defaultEncoding||\"utf8\",this.awaitDrainWriters=null,this.multiAwaitDrain=!1,this.readingMore=!1,this.dataEmitted=!1,this.decoder=null,this.encoding=null,t&&t.encoding&&(this.decoder=new Vc(t.encoding),this.encoding=t.encoding);}function F(t){if(!(this instanceof F))return new F(t);let e=this instanceof nt();this._readableState=new ro(t,this,e),t&&(typeof t.read==\"function\"&&(this._read=t.read),typeof t.destroy==\"function\"&&(this._destroy=t.destroy),typeof t.construct==\"function\"&&(this._construct=t.construct),t.signal&&!e&&e_(t.signal,this)),qt.call(this,t),Dr.construct(this,()=>{this._readableState.needReadable&&fn(this,this._readableState);});}F.prototype.destroy=Dr.destroy;F.prototype._undestroy=Dr.undestroy;F.prototype._destroy=function(t,e){e(t);};F.prototype[Xw.captureRejectionSymbol]=function(t){this.destroy(t);};F.prototype.push=function(t,e){return zc(this,t,e,!1)};F.prototype.unshift=function(t,e){return zc(this,t,e,!0)};function zc(t,e,r,i){H(\"readableAddChunk\",e);let n=t._readableState,o;if(n.objectMode||(typeof e==\"string\"?(r=r||n.defaultEncoding,n.encoding!==r&&(i&&n.encoding?e=Js.from(e,r).toString(n.encoding):(e=Js.from(e,r),r=\"\"))):e instanceof Js?r=\"\":qt._isUint8Array(e)?(e=qt._uint8ArrayToBuffer(e),r=\"\"):e!=null&&(o=new s_(\"chunk\",[\"string\",\"Buffer\",\"Uint8Array\"],e))),o)qr(t,o);else if(e===null)n.reading=!1,p_(t,n);else if(n.objectMode||e&&e.length>0)if(i)if(n.endEmitted)qr(t,new u_);else {if(n.destroyed||n.errored)return !1;Zs(t,n,e,!0);}else if(n.ended)qr(t,new l_);else {if(n.destroyed||n.errored)return !1;n.reading=!1,n.decoder&&!r?(e=n.decoder.write(e),n.objectMode||e.length!==0?Zs(t,n,e,!1):fn(t,n)):Zs(t,n,e,!1);}else i||(n.reading=!1,fn(t,n));return !n.ended&&(n.length0?(e.multiAwaitDrain?e.awaitDrainWriters.clear():e.awaitDrainWriters=null,e.dataEmitted=!0,t.emit(\"data\",r)):(e.length+=e.objectMode?1:r.length,i?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&cn(t)),fn(t,e);}F.prototype.isPaused=function(){let t=this._readableState;return t[lr]===!0||t.flowing===!1};F.prototype.setEncoding=function(t){let e=new Vc(t);this._readableState.decoder=e,this._readableState.encoding=this._readableState.decoder.encoding;let r=this._readableState.buffer,i=\"\";for(let n of r)i+=e.write(n);return r.clear(),i!==\"\"&&r.push(i),this._readableState.length=i.length,this};var h_=1073741824;function d_(t){if(t>h_)throw new a_(\"size\",\"<= 1GiB\",t);return t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++,t}function Wc(t,e){return t<=0||e.length===0&&e.ended?0:e.objectMode?1:Vw(t)?e.flowing&&e.length?e.buffer.first().length:e.length:t<=e.length?t:e.ended?e.length:0}F.prototype.read=function(t){H(\"read\",t),t===void 0?t=NaN:Hw(t)||(t=zw(t,10));let e=this._readableState,r=t;if(t>e.highWaterMark&&(e.highWaterMark=d_(t)),t!==0&&(e.emittedReadable=!1),t===0&&e.needReadable&&((e.highWaterMark!==0?e.length>=e.highWaterMark:e.length>0)||e.ended))return H(\"read: emitReadable\",e.length,e.ended),e.length===0&&e.ended?eo(this):cn(this),null;if(t=Wc(t,e),t===0&&e.ended)return e.length===0&&eo(this),null;let i=e.needReadable;if(H(\"need readable\",i),(e.length===0||e.length-t0?n=Jc(t,e):n=null,n===null?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.multiAwaitDrain?e.awaitDrainWriters.clear():e.awaitDrainWriters=null),e.length===0&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&eo(this)),n!==null&&!e.errorEmitted&&!e.closeEmitted&&(e.dataEmitted=!0,this.emit(\"data\",n)),n};function p_(t,e){if(H(\"onEofChunk\"),!e.ended){if(e.decoder){let r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length);}e.ended=!0,e.sync?cn(t):(e.needReadable=!1,e.emittedReadable=!0,Kc(t));}}function cn(t){let e=t._readableState;H(\"emitReadable\",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(H(\"emitReadable\",e.flowing),e.emittedReadable=!0,He.nextTick(Kc,t));}function Kc(t){let e=t._readableState;H(\"emitReadable_\",e.destroyed,e.length,e.ended),!e.destroyed&&!e.errored&&(e.length||e.ended)&&(t.emit(\"readable\"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,Qc(t);}function fn(t,e){!e.readingMore&&e.constructed&&(e.readingMore=!0,He.nextTick(g_,t,e));}function g_(t,e){for(;!e.reading&&!e.ended&&(e.length1&&i.pipes.includes(t)&&(H(\"false write response, pause\",i.awaitDrainWriters.size),i.awaitDrainWriters.add(t)),r.pause()),u||(u=y_(r,t),t.on(\"drain\",u));}r.on(\"data\",g);function g(I){H(\"ondata\");let C=t.write(I);H(\"dest.write\",C),C===!1&&d();}function y(I){if(H(\"onerror\",I),S(),t.removeListener(\"error\",y),t.listenerCount(\"error\")===0){let C=t._writableState||t._readableState;C&&!C.errorEmitted?qr(t,I):t.emit(\"error\",I);}}Zw(t,\"error\",y);function w(){t.removeListener(\"finish\",E),S();}t.once(\"close\",w);function E(){H(\"onfinish\"),t.removeListener(\"close\",w),S();}t.once(\"finish\",E);function S(){H(\"unpipe\"),r.unpipe(t);}return t.emit(\"pipe\",r),t.writableNeedDrain===!0?i.flowing&&d():i.flowing||(H(\"pipe resume\"),r.resume()),t};function y_(t,e){return function(){let i=t._readableState;i.awaitDrainWriters===e?(H(\"pipeOnDrain\",1),i.awaitDrainWriters=null):i.multiAwaitDrain&&(H(\"pipeOnDrain\",i.awaitDrainWriters.size),i.awaitDrainWriters.delete(e)),(!i.awaitDrainWriters||i.awaitDrainWriters.size===0)&&t.listenerCount(\"data\")&&t.resume();}}F.prototype.unpipe=function(t){let e=this._readableState,r={hasUnpiped:!1};if(e.pipes.length===0)return this;if(!t){let n=e.pipes;e.pipes=[],this.pause();for(let o=0;o0,i.flowing!==!1&&this.resume()):t===\"readable\"&&!i.endEmitted&&!i.readableListening&&(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,H(\"on readable\",i.length,i.reading),i.length?cn(this):i.reading||He.nextTick(b_,this)),r};F.prototype.addListener=F.prototype.on;F.prototype.removeListener=function(t,e){let r=qt.prototype.removeListener.call(this,t,e);return t===\"readable\"&&He.nextTick(Gc,this),r};F.prototype.off=F.prototype.removeListener;F.prototype.removeAllListeners=function(t){let e=qt.prototype.removeAllListeners.apply(this,arguments);return (t===\"readable\"||t===void 0)&&He.nextTick(Gc,this),e};function Gc(t){let e=t._readableState;e.readableListening=t.listenerCount(\"readable\")>0,e.resumeScheduled&&e[lr]===!1?e.flowing=!0:t.listenerCount(\"data\")>0?t.resume():e.readableListening||(e.flowing=null);}function b_(t){H(\"readable nexttick read 0\"),t.read(0);}F.prototype.resume=function(){let t=this._readableState;return t.flowing||(H(\"resume\"),t.flowing=!t.readableListening,w_(this,t)),t[lr]=!1,this};function w_(t,e){e.resumeScheduled||(e.resumeScheduled=!0,He.nextTick(__,t,e));}function __(t,e){H(\"resume\",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit(\"resume\"),Qc(t),e.flowing&&!e.reading&&t.read(0);}F.prototype.pause=function(){return H(\"call pause flowing=%j\",this._readableState.flowing),this._readableState.flowing!==!1&&(H(\"pause\"),this._readableState.flowing=!1,this.emit(\"pause\")),this._readableState[lr]=!0,this};function Qc(t){let e=t._readableState;for(H(\"flow\",e.flowing);e.flowing&&t.read()!==null;);}F.prototype.wrap=function(t){let e=!1;t.on(\"data\",i=>{!this.push(i)&&t.pause&&(e=!0,t.pause());}),t.on(\"end\",()=>{this.push(null);}),t.on(\"error\",i=>{qr(this,i);}),t.on(\"close\",()=>{this.destroy();}),t.on(\"destroy\",()=>{this.destroy();}),this._read=()=>{e&&t.resume&&(e=!1,t.resume());};let r=Kw(t);for(let i=1;i{n=s?Fc(n,s):null,r(),r=Xs;});try{for(;;){let s=t.destroyed?null:t.read();if(s!==null)yield s;else {if(n)throw n;if(n===null)return;await new Gw(i);}}}catch(s){throw n=Fc(n,s),n}finally{(n||e?.destroyOnReturn!==!1)&&(n===void 0||t._readableState.autoDestroy)?Dr.destroyer(t,null):(t.off(\"readable\",i),o());}}$c(F.prototype,{readable:{__proto__:null,get(){let t=this._readableState;return !!t&&t.readable!==!1&&!t.destroyed&&!t.errorEmitted&&!t.endEmitted},set(t){this._readableState&&(this._readableState.readable=!!t);}},readableDidRead:{__proto__:null,enumerable:!1,get:function(){return this._readableState.dataEmitted}},readableAborted:{__proto__:null,enumerable:!1,get:function(){return !!(this._readableState.readable!==!1&&(this._readableState.destroyed||this._readableState.errored)&&!this._readableState.endEmitted)}},readableHighWaterMark:{__proto__:null,enumerable:!1,get:function(){return this._readableState.highWaterMark}},readableBuffer:{__proto__:null,enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}},readableFlowing:{__proto__:null,enumerable:!1,get:function(){return this._readableState.flowing},set:function(t){this._readableState&&(this._readableState.flowing=t);}},readableLength:{__proto__:null,enumerable:!1,get(){return this._readableState.length}},readableObjectMode:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.objectMode:!1}},readableEncoding:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.encoding:null}},errored:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.errored:null}},closed:{__proto__:null,get(){return this._readableState?this._readableState.closed:!1}},destroyed:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.destroyed:!1},set(t){this._readableState&&(this._readableState.destroyed=t);}},readableEnded:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.endEmitted:!1}}});$c(ro.prototype,{pipesCount:{__proto__:null,get(){return this.pipes.length}},paused:{__proto__:null,get(){return this[lr]!==!1},set(t){this[lr]=!!t;}}});F._fromList=Jc;function Jc(t,e){if(e.length===0)return null;let r;return e.objectMode?r=e.buffer.shift():!t||t>=e.length?(e.decoder?r=e.buffer.join(\"\"):e.buffer.length===1?r=e.buffer.first():r=e.buffer.concat(e.length),e.buffer.clear()):r=e.buffer.consume(t,e.decoder),r}function eo(t){let e=t._readableState;H(\"endReadable\",e.endEmitted),e.endEmitted||(e.ended=!0,He.nextTick(v_,e,t));}function v_(t,e){if(H(\"endReadableNT\",t.endEmitted,t.length),!t.errored&&!t.closeEmitted&&!t.endEmitted&&t.length===0){if(t.endEmitted=!0,e.emit(\"end\"),e.writable&&e.allowHalfOpen===!1)He.nextTick(E_,e);else if(t.autoDestroy){let r=e._writableState;(!r||r.autoDestroy&&(r.finished||r.writable===!1))&&e.destroy();}}}function E_(t){t.writable&&!t.writableEnded&&!t.destroyed&&t.end();}F.from=function(t,e){return c_(F,t,e)};var to;function Xc(){return to===void 0&&(to={}),to}F.fromWeb=function(t,e){return Xc().newStreamReadableFromReadableStream(t,e)};F.toWeb=function(t,e){return Xc().newReadableStreamFromStreamReadable(t,e)};F.wrap=function(t,e){var r,i;return new F({objectMode:(r=(i=t.readableObjectMode)!==null&&i!==void 0?i:t.objectMode)!==null&&r!==void 0?r:!0,...e,destroy(n,o){Dr.destroyer(t,n),o(n);}}).wrap(t)};});var uo=M((aR,ch)=>{v();m();_();var ur=Ut(),{ArrayPrototypeSlice:rh,Error:S_,FunctionPrototypeSymbolHasInstance:ih,ObjectDefineProperty:nh,ObjectDefineProperties:A_,ObjectSetPrototypeOf:sh,StringPrototypeToLowerCase:I_,Symbol:T_,SymbolHasInstance:R_}=ce();ch.exports=ie;ie.WritableState=yi;var{EventEmitter:C_}=(ir(),X(rr)),pi=tn().Stream,{Buffer:hn}=(ye(),X(_e)),gn=tr(),{addAbortSignal:B_}=ci(),{getHighWaterMark:P_,getDefaultHighWaterMark:O_}=sn(),{ERR_INVALID_ARG_TYPE:k_,ERR_METHOD_NOT_IMPLEMENTED:x_,ERR_MULTIPLE_CALLBACK:oh,ERR_STREAM_CANNOT_PIPE:M_,ERR_STREAM_DESTROYED:gi,ERR_STREAM_ALREADY_FINISHED:L_,ERR_STREAM_NULL_VALUES:U_,ERR_STREAM_WRITE_AFTER_END:N_,ERR_UNKNOWN_ENCODING:ah}=Se().codes,{errorOrDestroy:jr}=gn;sh(ie.prototype,pi.prototype);sh(ie,pi);function so(){}var Fr=T_(\"kOnFinished\");function yi(t,e,r){typeof r!=\"boolean\"&&(r=e instanceof nt()),this.objectMode=!!(t&&t.objectMode),r&&(this.objectMode=this.objectMode||!!(t&&t.writableObjectMode)),this.highWaterMark=t?P_(this,t,\"writableHighWaterMark\",r):O_(!1),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;let i=!!(t&&t.decodeStrings===!1);this.decodeStrings=!i,this.defaultEncoding=t&&t.defaultEncoding||\"utf8\",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=D_.bind(void 0,e),this.writecb=null,this.writelen=0,this.afterWriteTickInfo=null,pn(this),this.pendingcb=0,this.constructed=!0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!t||t.emitClose!==!1,this.autoDestroy=!t||t.autoDestroy!==!1,this.errored=null,this.closed=!1,this.closeEmitted=!1,this[Fr]=[];}function pn(t){t.buffered=[],t.bufferedIndex=0,t.allBuffers=!0,t.allNoop=!0;}yi.prototype.getBuffer=function(){return rh(this.buffered,this.bufferedIndex)};nh(yi.prototype,\"bufferedRequestCount\",{__proto__:null,get(){return this.buffered.length-this.bufferedIndex}});function ie(t){let e=this instanceof nt();if(!e&&!ih(ie,this))return new ie(t);this._writableState=new yi(t,this,e),t&&(typeof t.write==\"function\"&&(this._write=t.write),typeof t.writev==\"function\"&&(this._writev=t.writev),typeof t.destroy==\"function\"&&(this._destroy=t.destroy),typeof t.final==\"function\"&&(this._final=t.final),typeof t.construct==\"function\"&&(this._construct=t.construct),t.signal&&B_(t.signal,this)),pi.call(this,t),gn.construct(this,()=>{let r=this._writableState;r.writing||ao(this,r),lo(this,r);});}nh(ie,R_,{__proto__:null,value:function(t){return ih(this,t)?!0:this!==ie?!1:t&&t._writableState instanceof yi}});ie.prototype.pipe=function(){jr(this,new M_);};function lh(t,e,r,i){let n=t._writableState;if(typeof r==\"function\")i=r,r=n.defaultEncoding;else {if(!r)r=n.defaultEncoding;else if(r!==\"buffer\"&&!hn.isEncoding(r))throw new ah(r);typeof i!=\"function\"&&(i=so);}if(e===null)throw new U_;if(!n.objectMode)if(typeof e==\"string\")n.decodeStrings!==!1&&(e=hn.from(e,r),r=\"buffer\");else if(e instanceof hn)r=\"buffer\";else if(pi._isUint8Array(e))e=pi._uint8ArrayToBuffer(e),r=\"buffer\";else throw new k_(\"chunk\",[\"string\",\"Buffer\",\"Uint8Array\"],e);let o;return n.ending?o=new N_:n.destroyed&&(o=new gi(\"write\")),o?(ur.nextTick(i,o),jr(t,o,!0),o):(n.pendingcb++,q_(t,n,e,r,i))}ie.prototype.write=function(t,e,r){return lh(this,t,e,r)===!0};ie.prototype.cork=function(){this._writableState.corked++;};ie.prototype.uncork=function(){let t=this._writableState;t.corked&&(t.corked--,t.writing||ao(this,t));};ie.prototype.setDefaultEncoding=function(e){if(typeof e==\"string\"&&(e=I_(e)),!hn.isEncoding(e))throw new ah(e);return this._writableState.defaultEncoding=e,this};function q_(t,e,r,i,n){let o=e.objectMode?1:r.length;e.length+=o;let s=e.lengthr.bufferedIndex&&ao(t,r),i?r.afterWriteTickInfo!==null&&r.afterWriteTickInfo.cb===n?r.afterWriteTickInfo.count++:(r.afterWriteTickInfo={count:1,cb:n,stream:t,state:r},ur.nextTick(j_,r.afterWriteTickInfo)):uh(t,r,1,n));}function j_({stream:t,state:e,count:r,cb:i}){return e.afterWriteTickInfo=null,uh(t,e,r,i)}function uh(t,e,r,i){for(!e.ending&&!t.destroyed&&e.length===0&&e.needDrain&&(e.needDrain=!1,t.emit(\"drain\"));r-- >0;)e.pendingcb--,i();e.destroyed&&oo(e),lo(t,e);}function oo(t){if(t.writing)return;for(let n=t.bufferedIndex;n1&&t._writev){e.pendingcb-=o-1;let a=e.allNoop?so:c=>{for(let h=s;h256?(r.splice(0,s),e.bufferedIndex=0):e.bufferedIndex=s;}e.bufferProcessing=!1;}ie.prototype._write=function(t,e,r){if(this._writev)this._writev([{chunk:t,encoding:e}],r);else throw new x_(\"_write()\")};ie.prototype._writev=null;ie.prototype.end=function(t,e,r){let i=this._writableState;typeof t==\"function\"?(r=t,t=null,e=null):typeof e==\"function\"&&(r=e,e=null);let n;if(t!=null){let o=lh(this,t,e);o instanceof S_&&(n=o);}return i.corked&&(i.corked=1,this.uncork()),n||(!i.errored&&!i.ending?(i.ending=!0,lo(this,i,!0),i.ended=!0):i.finished?n=new L_(\"end\"):i.destroyed&&(n=new gi(\"end\"))),typeof r==\"function\"&&(n||i.finished?ur.nextTick(r,n):i[Fr].push(r)),this};function dn(t){return t.ending&&!t.destroyed&&t.constructed&&t.length===0&&!t.errored&&t.buffered.length===0&&!t.finished&&!t.writing&&!t.errorEmitted&&!t.closeEmitted}function F_(t,e){let r=!1;function i(n){if(r){jr(t,n??oh());return}if(r=!0,e.pendingcb--,n){let o=e[Fr].splice(0);for(let s=0;s{dn(n)?no(i,n):n.pendingcb--;},t,e)):dn(e)&&(e.pendingcb++,no(t,e))));}function no(t,e){e.pendingcb--,e.finished=!0;let r=e[Fr].splice(0);for(let i=0;i{v();m();_();var fo=Ut(),H_=(ye(),X(_e)),{isReadable:V_,isWritable:z_,isIterable:hh,isNodeStream:K_,isReadableNodeStream:dh,isWritableNodeStream:ph,isDuplexNodeStream:G_}=tt(),gh=mt(),{AbortError:vh,codes:{ERR_INVALID_ARG_TYPE:Q_,ERR_INVALID_RETURN_VALUE:yh}}=Se(),{destroyer:Wr}=tr(),Y_=nt(),J_=di(),{createDeferredPromise:bh}=Je(),wh=Ys(),_h=globalThis.Blob||H_.Blob,X_=typeof _h<\"u\"?function(e){return e instanceof _h}:function(e){return !1},Z_=globalThis.AbortController||Hi().AbortController,{FunctionPrototypeCall:mh}=ce(),fr=class extends Y_{constructor(e){super(e),e?.readable===!1&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),e?.writable===!1&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0);}};Eh.exports=function t(e,r){if(G_(e))return e;if(dh(e))return yn({readable:e});if(ph(e))return yn({writable:e});if(K_(e))return yn({writable:!1,readable:!1});if(typeof e==\"function\"){let{value:n,write:o,final:s,destroy:a}=e0(e);if(hh(n))return wh(fr,n,{objectMode:!0,write:o,final:s,destroy:a});let u=n?.then;if(typeof u==\"function\"){let c,h=mh(u,n,d=>{if(d!=null)throw new yh(\"nully\",\"body\",d)},d=>{Wr(c,d);});return c=new fr({objectMode:!0,readable:!1,write:o,final(d){s(async()=>{try{await h,fo.nextTick(d,null);}catch(g){fo.nextTick(d,g);}});},destroy:a})}throw new yh(\"Iterable, AsyncIterable or AsyncFunction\",r,n)}if(X_(e))return t(e.arrayBuffer());if(hh(e))return wh(fr,e,{objectMode:!0,writable:!1});if(typeof e?.writable==\"object\"||typeof e?.readable==\"object\"){let n=e!=null&&e.readable?dh(e?.readable)?e?.readable:t(e.readable):void 0,o=e!=null&&e.writable?ph(e?.writable)?e?.writable:t(e.writable):void 0;return yn({readable:n,writable:o})}let i=e?.then;if(typeof i==\"function\"){let n;return mh(i,e,o=>{o!=null&&n.push(o),n.push(null);},o=>{Wr(n,o);}),n=new fr({objectMode:!0,writable:!1,read(){}})}throw new Q_(r,[\"Blob\",\"ReadableStream\",\"WritableStream\",\"Stream\",\"Iterable\",\"AsyncIterable\",\"Function\",\"{ readable, writable } pair\",\"Promise\"],e)};function e0(t){let{promise:e,resolve:r}=bh(),i=new Z_,n=i.signal;return {value:t(async function*(){for(;;){let s=e;e=null;let{chunk:a,done:u,cb:c}=await s;if(fo.nextTick(c),u)return;if(n.aborted)throw new vh(void 0,{cause:n.reason});(({promise:e,resolve:r}=bh())),yield a;}}(),{signal:n}),write(s,a,u){let c=r;r=null,c({chunk:s,done:!1,cb:u});},final(s){let a=r;r=null,a({done:!0,cb:s});},destroy(s,a){i.abort(),a(s);}}}function yn(t){let e=t.readable&&typeof t.readable.read!=\"function\"?J_.wrap(t.readable):t.readable,r=t.writable,i=!!V_(e),n=!!z_(r),o,s,a,u,c;function h(d){let g=u;u=null,g?g(d):d&&c.destroy(d);}return c=new fr({readableObjectMode:!!(e!=null&&e.readableObjectMode),writableObjectMode:!!(r!=null&&r.writableObjectMode),readable:i,writable:n}),n&&(gh(r,d=>{n=!1,d&&Wr(e,d),h(d);}),c._write=function(d,g,y){r.write(d,g)?y():o=y;},c._final=function(d){r.end(),s=d;},r.on(\"drain\",function(){if(o){let d=o;o=null,d();}}),r.on(\"finish\",function(){if(s){let d=s;s=null,d();}})),i&&(gh(e,d=>{i=!1,d&&Wr(e,d),h(d);}),e.on(\"readable\",function(){if(a){let d=a;a=null,d();}}),e.on(\"end\",function(){c.push(null);}),c._read=function(){for(;;){let d=e.read();if(d===null){a=c._read;return}if(!c.push(d))return}}),c._destroy=function(d,g){!d&&u!==null&&(d=new vh),a=null,o=null,s=null,u===null?g(d):(u=g,Wr(r,d),Wr(e,d));},c}});var nt=M((RR,Th)=>{v();m();_();var{ObjectDefineProperties:t0,ObjectGetOwnPropertyDescriptor:At,ObjectKeys:r0,ObjectSetPrototypeOf:Ah}=ce();Th.exports=Ve;var po=di(),Ne=uo();Ah(Ve.prototype,po.prototype);Ah(Ve,po);{let t=r0(Ne.prototype);for(let e=0;e{v();m();_();var{ObjectSetPrototypeOf:Rh,Symbol:i0}=ce();Ch.exports=It;var{ERR_METHOD_NOT_IMPLEMENTED:n0}=Se().codes,yo=nt(),{getHighWaterMark:s0}=sn();Rh(It.prototype,yo.prototype);Rh(It,yo);var bi=i0(\"kCallback\");function It(t){if(!(this instanceof It))return new It(t);let e=t?s0(this,t,\"readableHighWaterMark\",!0):null;e===0&&(t={...t,highWaterMark:null,readableHighWaterMark:e,writableHighWaterMark:t.writableHighWaterMark||0}),yo.call(this,t),this._readableState.sync=!1,this[bi]=null,t&&(typeof t.transform==\"function\"&&(this._transform=t.transform),typeof t.flush==\"function\"&&(this._flush=t.flush)),this.on(\"prefinish\",o0);}function go(t){typeof this._flush==\"function\"&&!this.destroyed?this._flush((e,r)=>{if(e){t?t(e):this.destroy(e);return}r!=null&&this.push(r),this.push(null),t&&t();}):(this.push(null),t&&t());}function o0(){this._final!==go&&go.call(this);}It.prototype._final=go;It.prototype._transform=function(t,e,r){throw new n0(\"_transform()\")};It.prototype._write=function(t,e,r){let i=this._readableState,n=this._writableState,o=i.length;this._transform(t,e,(s,a)=>{if(s){r(s);return}a!=null&&this.push(a),n.ended||o===i.length||i.length{v();m();_();var{ObjectSetPrototypeOf:Bh}=ce();Ph.exports=$r;var wo=bo();Bh($r.prototype,wo.prototype);Bh($r,wo);function $r(t){if(!(this instanceof $r))return new $r(t);wo.call(this,t);}$r.prototype._transform=function(t,e,r){r(null,t);};});var mn=M((iC,Lh)=>{v();m();_();var wi=Ut(),{ArrayIsArray:a0,Promise:l0,SymbolAsyncIterator:u0}=ce(),_n=mt(),{once:f0}=Je(),c0=tr(),Oh=nt(),{aggregateTwoErrors:h0,codes:{ERR_INVALID_ARG_TYPE:Ro,ERR_INVALID_RETURN_VALUE:mo,ERR_MISSING_ARGS:d0,ERR_STREAM_DESTROYED:p0,ERR_STREAM_PREMATURE_CLOSE:g0},AbortError:y0}=Se(),{validateFunction:b0,validateAbortSignal:w0}=fi(),{isIterable:cr,isReadable:vo,isReadableNodeStream:wn,isNodeStream:kh,isTransformStream:Hr,isWebStream:_0,isReadableStream:Eo,isReadableEnded:m0}=tt(),v0=globalThis.AbortController||Hi().AbortController,So,Ao;function xh(t,e,r){let i=!1;t.on(\"close\",()=>{i=!0;});let n=_n(t,{readable:e,writable:r},o=>{i=!o;});return {destroy:o=>{i||(i=!0,c0.destroyer(t,o||new p0(\"pipe\")));},cleanup:n}}function E0(t){return b0(t[t.length-1],\"streams[stream.length - 1]\"),t.pop()}function Io(t){if(cr(t))return t;if(wn(t))return S0(t);throw new Ro(\"val\",[\"Readable\",\"Iterable\",\"AsyncIterable\"],t)}async function*S0(t){Ao||(Ao=di()),yield*Ao.prototype[u0].call(t);}async function bn(t,e,r,{end:i}){let n,o=null,s=c=>{if(c&&(n=c),o){let h=o;o=null,h();}},a=()=>new l0((c,h)=>{n?h(n):o=()=>{n?h(n):c();};});e.on(\"drain\",s);let u=_n(e,{readable:!1},s);try{e.writableNeedDrain&&await a();for await(let c of t)e.write(c)||await a();i&&e.end(),await a(),r();}catch(c){r(n!==c?h0(n,c):c);}finally{u(),e.off(\"drain\",s);}}async function To(t,e,r,{end:i}){Hr(e)&&(e=e.writable);let n=e.getWriter();try{for await(let o of t)await n.ready,n.write(o).catch(()=>{});await n.ready,i&&await n.close(),r();}catch(o){try{await n.abort(o),r(o);}catch(s){r(s);}}}function A0(...t){return Mh(t,f0(E0(t)))}function Mh(t,e,r){if(t.length===1&&a0(t[0])&&(t=t[0]),t.length<2)throw new d0(\"streams\");let i=new v0,n=i.signal,o=r?.signal,s=[];w0(o,\"options.signal\");function a(){y(new y0);}o?.addEventListener(\"abort\",a);let u,c,h=[],d=0;function g(C){y(C,--d===0);}function y(C,R){if(C&&(!u||u.code===\"ERR_STREAM_PREMATURE_CLOSE\")&&(u=C),!(!u&&!R)){for(;h.length;)h.shift()(u);o?.removeEventListener(\"abort\",a),i.abort(),R&&(u||s.forEach(U=>U()),wi.nextTick(e,u,c));}}let w;for(let C=0;C0,W=U||r?.end!==!1,K=C===t.length-1;if(kh(R)){let z=function(Q){Q&&Q.name!==\"AbortError\"&&Q.code!==\"ERR_STREAM_PREMATURE_CLOSE\"&&g(Q);};if(W){let{destroy:Q,cleanup:de}=xh(R,U,N);h.push(Q),vo(R)&&K&&s.push(de);}R.on(\"error\",z),vo(R)&&K&&s.push(()=>{R.removeListener(\"error\",z);});}if(C===0)if(typeof R==\"function\"){if(w=R({signal:n}),!cr(w))throw new mo(\"Iterable, AsyncIterable or Stream\",\"source\",w)}else cr(R)||wn(R)||Hr(R)?w=R:w=Oh.from(R);else if(typeof R==\"function\"){if(Hr(w)){var E;w=Io((E=w)===null||E===void 0?void 0:E.readable);}else w=Io(w);if(w=R(w,{signal:n}),U){if(!cr(w,!0))throw new mo(\"AsyncIterable\",`transform[${C-1}]`,w)}else {var S;So||(So=_o());let z=new So({objectMode:!0}),Q=(S=w)===null||S===void 0?void 0:S.then;if(typeof Q==\"function\")d++,Q.call(w,pe=>{c=pe,pe!=null&&z.write(pe),W&&z.end(),wi.nextTick(g);},pe=>{z.destroy(pe),wi.nextTick(g,pe);});else if(cr(w,!0))d++,bn(w,z,g,{end:W});else if(Eo(w)||Hr(w)){let pe=w.readable||w;d++,bn(pe,z,g,{end:W});}else throw new mo(\"AsyncIterable or Promise\",\"destination\",w);w=z;let{destroy:de,cleanup:Gt}=xh(w,!1,!0);h.push(de),K&&s.push(Gt);}}else if(kh(R)){if(wn(w)){d+=2;let z=I0(w,R,g,{end:W});vo(R)&&K&&s.push(z);}else if(Hr(w)||Eo(w)){let z=w.readable||w;d++,bn(z,R,g,{end:W});}else if(cr(w))d++,bn(w,R,g,{end:W});else throw new Ro(\"val\",[\"Readable\",\"Iterable\",\"AsyncIterable\",\"ReadableStream\",\"TransformStream\"],w);w=R;}else if(_0(R)){if(wn(w))d++,To(Io(w),R,g,{end:W});else if(Eo(w)||cr(w))d++,To(w,R,g,{end:W});else if(Hr(w))d++,To(w.readable,R,g,{end:W});else throw new Ro(\"val\",[\"Readable\",\"Iterable\",\"AsyncIterable\",\"ReadableStream\",\"TransformStream\"],w);w=R;}else w=Oh.from(R);}return (n!=null&&n.aborted||o!=null&&o.aborted)&&wi.nextTick(a),w}function I0(t,e,r,{end:i}){let n=!1;if(e.on(\"close\",()=>{n||r(new g0);}),t.pipe(e,{end:!1}),i){let s=function(){n=!0,e.end();};m0(t)?wi.nextTick(s):t.once(\"end\",s);}else r();return _n(t,{readable:!0,writable:!1},s=>{let a=t._readableState;s&&s.code===\"ERR_STREAM_PREMATURE_CLOSE\"&&a&&a.ended&&!a.errored&&!a.errorEmitted?t.once(\"end\",r).once(\"error\",r):r(s);}),_n(e,{readable:!1,writable:!0},r)}Lh.exports={pipelineImpl:Mh,pipeline:A0};});var Bo=M((dC,Fh)=>{v();m();_();var{pipeline:T0}=mn(),vn=nt(),{destroyer:R0}=tr(),{isNodeStream:En,isReadable:Uh,isWritable:Nh,isWebStream:Co,isTransformStream:hr,isWritableStream:qh,isReadableStream:Dh}=tt(),{AbortError:C0,codes:{ERR_INVALID_ARG_VALUE:jh,ERR_MISSING_ARGS:B0}}=Se(),P0=mt();Fh.exports=function(...e){if(e.length===0)throw new B0(\"streams\");if(e.length===1)return vn.from(e[0]);let r=[...e];if(typeof e[0]==\"function\"&&(e[0]=vn.from(e[0])),typeof e[e.length-1]==\"function\"){let y=e.length-1;e[y]=vn.from(e[y]);}for(let y=0;y0&&!(Nh(e[y])||qh(e[y])||hr(e[y])))throw new jh(`streams[${y}]`,r[y],\"must be writable\")}let i,n,o,s,a;function u(y){let w=s;s=null,w?w(y):y?a.destroy(y):!g&&!d&&a.destroy();}let c=e[0],h=T0(e,u),d=!!(Nh(c)||qh(c)||hr(c)),g=!!(Uh(h)||Dh(h)||hr(h));if(a=new vn({writableObjectMode:!!(c!=null&&c.writableObjectMode),readableObjectMode:!!(h!=null&&h.writableObjectMode),writable:d,readable:g}),d){if(En(c))a._write=function(w,E,S){c.write(w,E)?S():i=S;},a._final=function(w){c.end(),n=w;},c.on(\"drain\",function(){if(i){let w=i;i=null,w();}});else if(Co(c)){let E=(hr(c)?c.writable:c).getWriter();a._write=async function(S,I,C){try{await E.ready,E.write(S).catch(()=>{}),C();}catch(R){C(R);}},a._final=async function(S){try{await E.ready,E.close().catch(()=>{}),n=S;}catch(I){S(I);}};}let y=hr(h)?h.readable:h;P0(y,()=>{if(n){let w=n;n=null,w();}});}if(g){if(En(h))h.on(\"readable\",function(){if(o){let y=o;o=null,y();}}),h.on(\"end\",function(){a.push(null);}),a._read=function(){for(;;){let y=h.read();if(y===null){o=a._read;return}if(!a.push(y))return}};else if(Co(h)){let w=(hr(h)?h.readable:h).getReader();a._read=async function(){for(;;)try{let{value:E,done:S}=await w.read();if(!a.push(E))return;if(S){a.push(null);return}}catch{return}};}}return a._destroy=function(y,w){!y&&s!==null&&(y=new C0),o=null,i=null,n=null,s===null?w(y):(s=w,En(h)&&R0(h,y));},a};});var Qh=M((SC,ko)=>{v();m();_();var Vh=globalThis.AbortController||Hi().AbortController,{codes:{ERR_INVALID_ARG_VALUE:O0,ERR_INVALID_ARG_TYPE:_i,ERR_MISSING_ARGS:k0,ERR_OUT_OF_RANGE:x0},AbortError:st}=Se(),{validateAbortSignal:dr,validateInteger:M0,validateObject:pr}=fi(),L0=ce().Symbol(\"kWeak\"),{finished:U0}=mt(),N0=Bo(),{addAbortSignalNoValidate:q0}=ci(),{isWritable:D0,isNodeStream:j0}=tt(),{ArrayPrototypePush:F0,MathFloor:W0,Number:$0,NumberIsNaN:H0,Promise:Wh,PromiseReject:$h,PromisePrototypeThen:V0,Symbol:zh}=ce(),Sn=zh(\"kEmpty\"),Hh=zh(\"kEof\");function z0(t,e){if(e!=null&&pr(e,\"options\"),e?.signal!=null&&dr(e.signal,\"options.signal\"),j0(t)&&!D0(t))throw new O0(\"stream\",t,\"must be writable\");let r=N0(this,t);return e!=null&&e.signal&&q0(e.signal,r),r}function An(t,e){if(typeof t!=\"function\")throw new _i(\"fn\",[\"Function\",\"AsyncFunction\"],t);e!=null&&pr(e,\"options\"),e?.signal!=null&&dr(e.signal,\"options.signal\");let r=1;return e?.concurrency!=null&&(r=W0(e.concurrency)),M0(r,\"concurrency\",1),async function*(){var n,o;let s=new Vh,a=this,u=[],c=s.signal,h={signal:c},d=()=>s.abort();e!=null&&(n=e.signal)!==null&&n!==void 0&&n.aborted&&d(),e==null||(o=e.signal)===null||o===void 0||o.addEventListener(\"abort\",d);let g,y,w=!1;function E(){w=!0;}async function S(){try{for await(let R of a){var I;if(w)return;if(c.aborted)throw new st;try{R=t(R,h);}catch(U){R=$h(U);}R!==Sn&&(typeof((I=R)===null||I===void 0?void 0:I.catch)==\"function\"&&R.catch(E),u.push(R),g&&(g(),g=null),!w&&u.length&&u.length>=r&&await new Wh(U=>{y=U;}));}u.push(Hh);}catch(R){let U=$h(R);V0(U,void 0,E),u.push(U);}finally{var C;w=!0,g&&(g(),g=null),e==null||(C=e.signal)===null||C===void 0||C.removeEventListener(\"abort\",d);}}S();try{for(;;){for(;u.length>0;){let I=await u[0];if(I===Hh)return;if(c.aborted)throw new st;I!==Sn&&(yield I),u.shift(),y&&(y(),y=null);}await new Wh(I=>{g=I;});}}finally{s.abort(),w=!0,y&&(y(),y=null);}}.call(this)}function K0(t=void 0){return t!=null&&pr(t,\"options\"),t?.signal!=null&&dr(t.signal,\"options.signal\"),async function*(){let r=0;for await(let n of this){var i;if(t!=null&&(i=t.signal)!==null&&i!==void 0&&i.aborted)throw new st({cause:t.signal.reason});yield [r++,n];}}.call(this)}async function Kh(t,e=void 0){for await(let r of Oo.call(this,t,e))return !0;return !1}async function G0(t,e=void 0){if(typeof t!=\"function\")throw new _i(\"fn\",[\"Function\",\"AsyncFunction\"],t);return !await Kh.call(this,async(...r)=>!await t(...r),e)}async function Q0(t,e){for await(let r of Oo.call(this,t,e))return r}async function Y0(t,e){if(typeof t!=\"function\")throw new _i(\"fn\",[\"Function\",\"AsyncFunction\"],t);async function r(i,n){return await t(i,n),Sn}for await(let i of An.call(this,r,e));}function Oo(t,e){if(typeof t!=\"function\")throw new _i(\"fn\",[\"Function\",\"AsyncFunction\"],t);async function r(i,n){return await t(i,n)?i:Sn}return An.call(this,r,e)}var Po=class extends k0{constructor(){super(\"reduce\"),this.message=\"Reduce of an empty stream requires an initial value\";}};async function J0(t,e,r){var i;if(typeof t!=\"function\")throw new _i(\"reducer\",[\"Function\",\"AsyncFunction\"],t);r!=null&&pr(r,\"options\"),r?.signal!=null&&dr(r.signal,\"options.signal\");let n=arguments.length>1;if(r!=null&&(i=r.signal)!==null&&i!==void 0&&i.aborted){let c=new st(void 0,{cause:r.signal.reason});throw this.once(\"error\",()=>{}),await U0(this.destroy(c)),c}let o=new Vh,s=o.signal;if(r!=null&&r.signal){let c={once:!0,[L0]:this};r.signal.addEventListener(\"abort\",()=>o.abort(),c);}let a=!1;try{for await(let c of this){var u;if(a=!0,r!=null&&(u=r.signal)!==null&&u!==void 0&&u.aborted)throw new st;n?e=await t(e,c,{signal:s}):(e=c,n=!0);}if(!a&&!n)throw new Po}finally{o.abort();}return e}async function X0(t){t!=null&&pr(t,\"options\"),t?.signal!=null&&dr(t.signal,\"options.signal\");let e=[];for await(let i of this){var r;if(t!=null&&(r=t.signal)!==null&&r!==void 0&&r.aborted)throw new st(void 0,{cause:t.signal.reason});F0(e,i);}return e}function Z0(t,e){let r=An.call(this,t,e);return async function*(){for await(let n of r)yield*n;}.call(this)}function Gh(t){if(t=$0(t),H0(t))return 0;if(t<0)throw new x0(\"number\",\">= 0\",t);return t}function em(t,e=void 0){return e!=null&&pr(e,\"options\"),e?.signal!=null&&dr(e.signal,\"options.signal\"),t=Gh(t),async function*(){var i;if(e!=null&&(i=e.signal)!==null&&i!==void 0&&i.aborted)throw new st;for await(let o of this){var n;if(e!=null&&(n=e.signal)!==null&&n!==void 0&&n.aborted)throw new st;t--<=0&&(yield o);}}.call(this)}function tm(t,e=void 0){return e!=null&&pr(e,\"options\"),e?.signal!=null&&dr(e.signal,\"options.signal\"),t=Gh(t),async function*(){var i;if(e!=null&&(i=e.signal)!==null&&i!==void 0&&i.aborted)throw new st;for await(let o of this){var n;if(e!=null&&(n=e.signal)!==null&&n!==void 0&&n.aborted)throw new st;if(t-- >0)yield o;else return}}.call(this)}ko.exports.streamReturningOperators={asIndexedPairs:K0,drop:em,filter:Oo,flatMap:Z0,map:An,take:tm,compose:z0};ko.exports.promiseReturningOperators={every:G0,forEach:Y0,reduce:J0,toArray:X0,some:Kh,find:Q0};});var xo=M((xC,Yh)=>{v();m();_();var{ArrayPrototypePop:rm,Promise:im}=ce(),{isIterable:nm,isNodeStream:sm,isWebStream:om}=tt(),{pipelineImpl:am}=mn(),{finished:lm}=mt();Mo();function um(...t){return new im((e,r)=>{let i,n,o=t[t.length-1];if(o&&typeof o==\"object\"&&!sm(o)&&!nm(o)&&!om(o)){let s=rm(t);i=s.signal,n=s.end;}am(t,(s,a)=>{s?r(s):e(a);},{signal:i,end:n});})}Yh.exports={finished:lm,pipeline:um};});var Mo=M(($C,sd)=>{v();m();_();var{Buffer:fm}=(ye(),X(_e)),{ObjectDefineProperty:Tt,ObjectKeys:Zh,ReflectApply:ed}=ce(),{promisify:{custom:td}}=Je(),{streamReturningOperators:Jh,promiseReturningOperators:Xh}=Qh(),{codes:{ERR_ILLEGAL_CONSTRUCTOR:rd}}=Se(),cm=Bo(),{pipeline:id}=mn(),{destroyer:hm}=tr(),nd=mt(),Lo=xo(),Uo=tt(),le=sd.exports=tn().Stream;le.isDisturbed=Uo.isDisturbed;le.isErrored=Uo.isErrored;le.isReadable=Uo.isReadable;le.Readable=di();for(let t of Zh(Jh)){let r=function(...i){if(new.target)throw rd();return le.Readable.from(ed(e,this,i))};let e=Jh[t];Tt(r,\"name\",{__proto__:null,value:e.name}),Tt(r,\"length\",{__proto__:null,value:e.length}),Tt(le.Readable.prototype,t,{__proto__:null,value:r,enumerable:!1,configurable:!0,writable:!0});}for(let t of Zh(Xh)){let r=function(...n){if(new.target)throw rd();return ed(e,this,n)};let e=Xh[t];Tt(r,\"name\",{__proto__:null,value:e.name}),Tt(r,\"length\",{__proto__:null,value:e.length}),Tt(le.Readable.prototype,t,{__proto__:null,value:r,enumerable:!1,configurable:!0,writable:!0});}le.Writable=uo();le.Duplex=nt();le.Transform=bo();le.PassThrough=_o();le.pipeline=id;var{addAbortSignal:dm}=ci();le.addAbortSignal=dm;le.finished=nd;le.destroy=hm;le.compose=cm;Tt(le,\"promises\",{__proto__:null,configurable:!0,enumerable:!0,get(){return Lo}});Tt(id,td,{__proto__:null,enumerable:!0,get(){return Lo.pipeline}});Tt(nd,td,{__proto__:null,enumerable:!0,get(){return Lo.finished}});le.Stream=le;le._isUint8Array=function(e){return e instanceof Uint8Array};le._uint8ArrayToBuffer=function(e){return fm.from(e.buffer,e.byteOffset,e.byteLength)};});var Dt=M((ZC,ue)=>{v();m();_();var he=Mo(),pm=xo(),gm=he.Readable.destroy;ue.exports=he.Readable;ue.exports._uint8ArrayToBuffer=he._uint8ArrayToBuffer;ue.exports._isUint8Array=he._isUint8Array;ue.exports.isDisturbed=he.isDisturbed;ue.exports.isErrored=he.isErrored;ue.exports.isReadable=he.isReadable;ue.exports.Readable=he.Readable;ue.exports.Writable=he.Writable;ue.exports.Duplex=he.Duplex;ue.exports.Transform=he.Transform;ue.exports.PassThrough=he.PassThrough;ue.exports.addAbortSignal=he.addAbortSignal;ue.exports.finished=he.finished;ue.exports.destroy=he.destroy;ue.exports.destroy=gm;ue.exports.pipeline=he.pipeline;ue.exports.compose=he.compose;Object.defineProperty(he,\"promises\",{configurable:!0,enumerable:!0,get(){return pm}});ue.exports.Stream=he.Stream;ue.exports.default=ue.exports;});var od=M((uB,qo)=>{v();m();_();typeof Object.create==\"function\"?qo.exports=function(e,r){r&&(e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}));}:qo.exports=function(e,r){if(r){e.super_=r;var i=function(){};i.prototype=r.prototype,e.prototype=new i,e.prototype.constructor=e;}};});var ud=M((_B,ld)=>{v();m();_();var{Buffer:ze}=(ye(),X(_e)),ad=Symbol.for(\"BufferList\");function ee(t){if(!(this instanceof ee))return new ee(t);ee._init.call(this,t);}ee._init=function(e){Object.defineProperty(this,ad,{value:!0}),this._bufs=[],this.length=0,e&&this.append(e);};ee.prototype._new=function(e){return new ee(e)};ee.prototype._offset=function(e){if(e===0)return [0,0];let r=0;for(let i=0;ithis.length||e<0)return;let r=this._offset(e);return this._bufs[r[0]][r[1]]};ee.prototype.slice=function(e,r){return typeof e==\"number\"&&e<0&&(e+=this.length),typeof r==\"number\"&&r<0&&(r+=this.length),this.copy(null,0,e,r)};ee.prototype.copy=function(e,r,i,n){if((typeof i!=\"number\"||i<0)&&(i=0),(typeof n!=\"number\"||n>this.length)&&(n=this.length),i>=this.length||n<=0)return e||ze.alloc(0);let o=!!e,s=this._offset(i),a=n-i,u=a,c=o&&r||0,h=s[1];if(i===0&&n===this.length){if(!o)return this._bufs.length===1?this._bufs[0]:ze.concat(this._bufs,this.length);for(let d=0;dg)this._bufs[d].copy(e,c,h),c+=g;else {this._bufs[d].copy(e,c,h,h+u),c+=g;break}u-=g,h&&(h=0);}return e.length>c?e.slice(0,c):e};ee.prototype.shallowSlice=function(e,r){if(e=e||0,r=typeof r!=\"number\"?this.length:r,e<0&&(e+=this.length),r<0&&(r+=this.length),e===r)return this._new();let i=this._offset(e),n=this._offset(r),o=this._bufs.slice(i[0],n[0]+1);return n[1]===0?o.pop():o[o.length-1]=o[o.length-1].slice(0,n[1]),i[1]!==0&&(o[0]=o[0].slice(i[1])),this._new(o)};ee.prototype.toString=function(e,r,i){return this.slice(r,i).toString(e)};ee.prototype.consume=function(e){if(e=Math.trunc(e),Number.isNaN(e)||e<=0)return this;for(;this._bufs.length;)if(e>=this._bufs[0].length)e-=this._bufs[0].length,this.length-=this._bufs[0].length,this._bufs.shift();else {this._bufs[0]=this._bufs[0].slice(e),this.length-=e;break}return this};ee.prototype.duplicate=function(){let e=this._new();for(let r=0;rthis.length?this.length:e;let i=this._offset(e),n=i[0],o=i[1];for(;n=t.length){let u=s.indexOf(t,o);if(u!==-1)return this._reverseOffset([n,u]);o=s.length-t.length+1;}else {let u=this._reverseOffset([n,o]);if(this._match(u,t))return u;o++;}o=0;}return -1};ee.prototype._match=function(t,e){if(this.length-t{v();m();_();var Do=Dt().Duplex,ym=od(),mi=ud();function Ee(t){if(!(this instanceof Ee))return new Ee(t);if(typeof t==\"function\"){this._callback=t;let e=function(i){this._callback&&(this._callback(i),this._callback=null);}.bind(this);this.on(\"pipe\",function(i){i.on(\"error\",e);}),this.on(\"unpipe\",function(i){i.removeListener(\"error\",e);}),t=null;}mi._init.call(this,t),Do.call(this);}ym(Ee,Do);Object.assign(Ee.prototype,mi.prototype);Ee.prototype._new=function(e){return new Ee(e)};Ee.prototype._write=function(e,r,i){this._appendBuffer(e),typeof i==\"function\"&&i();};Ee.prototype._read=function(e){if(!this.length)return this.push(null);e=Math.min(e,this.length),this.push(this.slice(0,e)),this.consume(e);};Ee.prototype.end=function(e){Do.prototype.end.call(this,e),this._callback&&(this._callback(null,this.slice()),this._callback=null);};Ee.prototype._destroy=function(e,r){this._bufs.length=0,this.length=0,r(e);};Ee.prototype._isBufferList=function(e){return e instanceof Ee||e instanceof mi||Ee.isBufferList(e)};Ee.isBufferList=mi.isBufferList;In.exports=Ee;In.exports.BufferListStream=Ee;In.exports.BufferList=mi;});var hd=M((DB,cd)=>{v();m();_();var jo=class{constructor(){this.cmd=null,this.retain=!1,this.qos=0,this.dup=!1,this.length=-1,this.topic=null,this.payload=null;}};cd.exports=jo;});var Fo=M((QB,dd)=>{v();m();_();var L=dd.exports,{Buffer:Oe}=(ye(),X(_e));L.types={0:\"reserved\",1:\"connect\",2:\"connack\",3:\"publish\",4:\"puback\",5:\"pubrec\",6:\"pubrel\",7:\"pubcomp\",8:\"subscribe\",9:\"suback\",10:\"unsubscribe\",11:\"unsuback\",12:\"pingreq\",13:\"pingresp\",14:\"disconnect\",15:\"auth\"};L.requiredHeaderFlags={1:0,2:0,4:0,5:0,6:2,7:0,8:2,9:0,10:2,11:0,12:0,13:0,14:0,15:0};L.requiredHeaderFlagsErrors={};for(let t in L.requiredHeaderFlags){let e=L.requiredHeaderFlags[t];L.requiredHeaderFlagsErrors[t]=\"Invalid header flag bits, must be 0x\"+e.toString(16)+\" for \"+L.types[t]+\" packet\";}L.codes={};for(let t in L.types){let e=L.types[t];L.codes[e]=t;}L.CMD_SHIFT=4;L.CMD_MASK=240;L.DUP_MASK=8;L.QOS_MASK=3;L.QOS_SHIFT=1;L.RETAIN_MASK=1;L.VARBYTEINT_MASK=127;L.VARBYTEINT_FIN_MASK=128;L.VARBYTEINT_MAX=268435455;L.SESSIONPRESENT_MASK=1;L.SESSIONPRESENT_HEADER=Oe.from([L.SESSIONPRESENT_MASK]);L.CONNACK_HEADER=Oe.from([L.codes.connack<[0,1].map(r=>[0,1].map(i=>{let n=Oe.alloc(1);return n.writeUInt8(L.codes[t]<Oe.from([t]));L.EMPTY={pingreq:Oe.from([L.codes.pingreq<<4,0]),pingresp:Oe.from([L.codes.pingresp<<4,0]),disconnect:Oe.from([L.codes.disconnect<<4,0])};L.MQTT5_PUBACK_PUBREC_CODES={0:\"Success\",16:\"No matching subscribers\",128:\"Unspecified error\",131:\"Implementation specific error\",135:\"Not authorized\",144:\"Topic Name invalid\",145:\"Packet identifier in use\",151:\"Quota exceeded\",153:\"Payload format invalid\"};L.MQTT5_PUBREL_PUBCOMP_CODES={0:\"Success\",146:\"Packet Identifier not found\"};L.MQTT5_SUBACK_CODES={0:\"Granted QoS 0\",1:\"Granted QoS 1\",2:\"Granted QoS 2\",128:\"Unspecified error\",131:\"Implementation specific error\",135:\"Not authorized\",143:\"Topic Filter invalid\",145:\"Packet Identifier in use\",151:\"Quota exceeded\",158:\"Shared Subscriptions not supported\",161:\"Subscription Identifiers not supported\",162:\"Wildcard Subscriptions not supported\"};L.MQTT5_UNSUBACK_CODES={0:\"Success\",17:\"No subscription existed\",128:\"Unspecified error\",131:\"Implementation specific error\",135:\"Not authorized\",143:\"Topic Filter invalid\",145:\"Packet Identifier in use\"};L.MQTT5_DISCONNECT_CODES={0:\"Normal disconnection\",4:\"Disconnect with Will Message\",128:\"Unspecified error\",129:\"Malformed Packet\",130:\"Protocol Error\",131:\"Implementation specific error\",135:\"Not authorized\",137:\"Server busy\",139:\"Server shutting down\",141:\"Keep Alive timeout\",142:\"Session taken over\",143:\"Topic Filter invalid\",144:\"Topic Name invalid\",147:\"Receive Maximum exceeded\",148:\"Topic Alias invalid\",149:\"Packet too large\",150:\"Message rate too high\",151:\"Quota exceeded\",152:\"Administrative action\",153:\"Payload format invalid\",154:\"Retain not supported\",155:\"QoS not supported\",156:\"Use another server\",157:\"Server moved\",158:\"Shared Subscriptions not supported\",159:\"Connection rate exceeded\",160:\"Maximum connect time\",161:\"Subscription Identifiers not supported\",162:\"Wildcard Subscriptions not supported\"};L.MQTT5_AUTH_CODES={0:\"Success\",24:\"Continue authentication\",25:\"Re-authenticate\"};});var gd=M((sP,pd)=>{v();m();_();var Vr=1e3,zr=Vr*60,Kr=zr*60,gr=Kr*24,bm=gr*7,wm=gr*365.25;pd.exports=function(t,e){e=e||{};var r=typeof t;if(r===\"string\"&&t.length>0)return _m(t);if(r===\"number\"&&isFinite(t))return e.long?vm(t):mm(t);throw new Error(\"val is not a non-empty string or a valid number. val=\"+JSON.stringify(t))};function _m(t){if(t=String(t),!(t.length>100)){var e=/^(-?(?:\\d+)?\\.?\\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(e){var r=parseFloat(e[1]),i=(e[2]||\"ms\").toLowerCase();switch(i){case\"years\":case\"year\":case\"yrs\":case\"yr\":case\"y\":return r*wm;case\"weeks\":case\"week\":case\"w\":return r*bm;case\"days\":case\"day\":case\"d\":return r*gr;case\"hours\":case\"hour\":case\"hrs\":case\"hr\":case\"h\":return r*Kr;case\"minutes\":case\"minute\":case\"mins\":case\"min\":case\"m\":return r*zr;case\"seconds\":case\"second\":case\"secs\":case\"sec\":case\"s\":return r*Vr;case\"milliseconds\":case\"millisecond\":case\"msecs\":case\"msec\":case\"ms\":return r;default:return}}}}function mm(t){var e=Math.abs(t);return e>=gr?Math.round(t/gr)+\"d\":e>=Kr?Math.round(t/Kr)+\"h\":e>=zr?Math.round(t/zr)+\"m\":e>=Vr?Math.round(t/Vr)+\"s\":t+\"ms\"}function vm(t){var e=Math.abs(t);return e>=gr?Tn(t,e,gr,\"day\"):e>=Kr?Tn(t,e,Kr,\"hour\"):e>=zr?Tn(t,e,zr,\"minute\"):e>=Vr?Tn(t,e,Vr,\"second\"):t+\" ms\"}function Tn(t,e,r,i){var n=e>=r*1.5;return Math.round(t/r)+\" \"+i+(n?\"s\":\"\")}});var bd=M((gP,yd)=>{v();m();_();function Em(t){r.debug=r,r.default=r,r.coerce=u,r.disable=o,r.enable=n,r.enabled=s,r.humanize=gd(),r.destroy=c,Object.keys(t).forEach(h=>{r[h]=t[h];}),r.names=[],r.skips=[],r.formatters={};function e(h){let d=0;for(let g=0;g{if(W===\"%%\")return \"%\";U++;let z=r.formatters[K];if(typeof z==\"function\"){let Q=S[U];W=z.call(I,Q),S.splice(U,1),U--;}return W}),r.formatArgs.call(I,S),(I.log||r.log).apply(I,S);}return E.namespace=h,E.useColors=r.useColors(),E.color=r.selectColor(h),E.extend=i,E.destroy=r.destroy,Object.defineProperty(E,\"enabled\",{enumerable:!0,configurable:!1,get:()=>g!==null?g:(y!==r.namespaces&&(y=r.namespaces,w=r.enabled(h)),w),set:S=>{g=S;}}),typeof r.init==\"function\"&&r.init(E),E}function i(h,d){let g=r(this.namespace+(typeof d>\"u\"?\":\":d)+h);return g.log=this.log,g}function n(h){r.save(h),r.namespaces=h,r.names=[],r.skips=[];let d,g=(typeof h==\"string\"?h:\"\").split(/[\\s,]+/),y=g.length;for(d=0;d\"-\"+d)].join(\",\");return r.enable(\"\"),h}function s(h){if(h[h.length-1]===\"*\")return !0;let d,g;for(d=0,g=r.skips.length;d{v();m();_();xe.formatArgs=Am;xe.save=Im;xe.load=Tm;xe.useColors=Sm;xe.storage=Rm();xe.destroy=(()=>{let t=!1;return ()=>{t||(t=!0,console.warn(\"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.\"));}})();xe.colors=[\"#0000CC\",\"#0000FF\",\"#0033CC\",\"#0033FF\",\"#0066CC\",\"#0066FF\",\"#0099CC\",\"#0099FF\",\"#00CC00\",\"#00CC33\",\"#00CC66\",\"#00CC99\",\"#00CCCC\",\"#00CCFF\",\"#3300CC\",\"#3300FF\",\"#3333CC\",\"#3333FF\",\"#3366CC\",\"#3366FF\",\"#3399CC\",\"#3399FF\",\"#33CC00\",\"#33CC33\",\"#33CC66\",\"#33CC99\",\"#33CCCC\",\"#33CCFF\",\"#6600CC\",\"#6600FF\",\"#6633CC\",\"#6633FF\",\"#66CC00\",\"#66CC33\",\"#9900CC\",\"#9900FF\",\"#9933CC\",\"#9933FF\",\"#99CC00\",\"#99CC33\",\"#CC0000\",\"#CC0033\",\"#CC0066\",\"#CC0099\",\"#CC00CC\",\"#CC00FF\",\"#CC3300\",\"#CC3333\",\"#CC3366\",\"#CC3399\",\"#CC33CC\",\"#CC33FF\",\"#CC6600\",\"#CC6633\",\"#CC9900\",\"#CC9933\",\"#CCCC00\",\"#CCCC33\",\"#FF0000\",\"#FF0033\",\"#FF0066\",\"#FF0099\",\"#FF00CC\",\"#FF00FF\",\"#FF3300\",\"#FF3333\",\"#FF3366\",\"#FF3399\",\"#FF33CC\",\"#FF33FF\",\"#FF6600\",\"#FF6633\",\"#FF9900\",\"#FF9933\",\"#FFCC00\",\"#FFCC33\"];function Sm(){return typeof window<\"u\"&&window.process&&(window.process.type===\"renderer\"||window.process.__nwjs)?!0:typeof B<\"u\"&&B.userAgent&&B.userAgent.toLowerCase().match(/(edge|trident)\\/(\\d+)/)?!1:typeof document<\"u\"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<\"u\"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof B<\"u\"&&B.userAgent&&B.userAgent.toLowerCase().match(/firefox\\/(\\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof B<\"u\"&&B.userAgent&&B.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/)}function Am(t){if(t[0]=(this.useColors?\"%c\":\"\")+this.namespace+(this.useColors?\" %c\":\" \")+t[0]+(this.useColors?\"%c \":\" \")+\"+\"+Rn.exports.humanize(this.diff),!this.useColors)return;let e=\"color: \"+this.color;t.splice(1,0,e,\"color: inherit\");let r=0,i=0;t[0].replace(/%[a-zA-Z%]/g,n=>{n!==\"%%\"&&(r++,n===\"%c\"&&(i=r));}),t.splice(i,0,e);}xe.log=console.debug||console.log||(()=>{});function Im(t){try{t?xe.storage.setItem(\"debug\",t):xe.storage.removeItem(\"debug\");}catch{}}function Tm(){let t;try{t=xe.storage.getItem(\"debug\");}catch{}return !t&&typeof P<\"u\"&&\"env\"in P&&(t=P.env.DEBUG),t}function Rm(){try{return localStorage}catch{}}Rn.exports=bd()(xe);var{formatters:Cm}=Rn.exports;Cm.j=function(t){try{return JSON.stringify(t)}catch(e){return \"[UnexpectedJSONParseError]: \"+e.message}};});var md=M((MP,_d)=>{v();m();_();var Bm=fd(),{EventEmitter:Pm}=(ir(),X(rr)),wd=hd(),V=Fo(),D=ot()(\"mqtt-packet:parser\"),Wo=class t extends Pm{constructor(){super(),this.parser=this.constructor.parser;}static parser(e){return this instanceof t?(this.settings=e||{},this._states=[\"_parseHeader\",\"_parseLength\",\"_parsePayload\",\"_newPacket\"],this._resetState(),this):new t().parser(e)}_resetState(){D(\"_resetState: resetting packet, error, _list, and _stateCounter\"),this.packet=new wd,this.error=null,this._list=Bm(),this._stateCounter=0;}parse(e){for(this.error&&this._resetState(),this._list.append(e),D(\"parse: current state: %s\",this._states[this._stateCounter]);(this.packet.length!==-1||this._list.length>0)&&this[this._states[this._stateCounter]]()&&!this.error;)this._stateCounter++,D(\"parse: state complete. _stateCounter is now: %d\",this._stateCounter),D(\"parse: packet.length: %d, buffer list length: %d\",this.packet.length,this._list.length),this._stateCounter>=this._states.length&&(this._stateCounter=0);return D(\"parse: exited while loop. packet: %d, buffer list length: %d\",this.packet.length,this._list.length),this._list.length}_parseHeader(){let e=this._list.readUInt8(0),r=e>>V.CMD_SHIFT;this.packet.cmd=V.types[r];let i=e&15,n=V.requiredHeaderFlags[r];return n!=null&&i!==n?this._emitError(new Error(V.requiredHeaderFlagsErrors[r])):(this.packet.retain=(e&V.RETAIN_MASK)!==0,this.packet.qos=e>>V.QOS_SHIFT&V.QOS_MASK,this.packet.qos>2?this._emitError(new Error(\"Packet must not have both QoS bits set to 1\")):(this.packet.dup=(e&V.DUP_MASK)!==0,D(\"_parseHeader: packet: %o\",this.packet),this._list.consume(1),!0))}_parseLength(){let e=this._parseVarByteNum(!0);return e&&(this.packet.length=e.value,this._list.consume(e.bytes)),D(\"_parseLength %d\",e.value),!!e}_parsePayload(){D(\"_parsePayload: payload %O\",this._list);let e=!1;if(this.packet.length===0||this._list.length>=this.packet.length){switch(this._pos=0,this.packet.cmd){case\"connect\":this._parseConnect();break;case\"connack\":this._parseConnack();break;case\"publish\":this._parsePublish();break;case\"puback\":case\"pubrec\":case\"pubrel\":case\"pubcomp\":this._parseConfirmation();break;case\"subscribe\":this._parseSubscribe();break;case\"suback\":this._parseSuback();break;case\"unsubscribe\":this._parseUnsubscribe();break;case\"unsuback\":this._parseUnsuback();break;case\"pingreq\":case\"pingresp\":break;case\"disconnect\":this._parseDisconnect();break;case\"auth\":this._parseAuth();break;default:this._emitError(new Error(\"Not supported\"));}e=!0;}return D(\"_parsePayload complete result: %s\",e),e}_parseConnect(){D(\"_parseConnect\");let e,r,i,n,o={},s=this.packet,a=this._parseString();if(a===null)return this._emitError(new Error(\"Cannot parse protocolId\"));if(a!==\"MQTT\"&&a!==\"MQIsdp\")return this._emitError(new Error(\"Invalid protocolId\"));if(s.protocolId=a,this._pos>=this._list.length)return this._emitError(new Error(\"Packet too short\"));if(s.protocolVersion=this._list.readUInt8(this._pos),s.protocolVersion>=128&&(s.bridgeMode=!0,s.protocolVersion=s.protocolVersion-128),s.protocolVersion!==3&&s.protocolVersion!==4&&s.protocolVersion!==5)return this._emitError(new Error(\"Invalid protocol version\"));if(this._pos++,this._pos>=this._list.length)return this._emitError(new Error(\"Packet too short\"));if(this._list.readUInt8(this._pos)&1)return this._emitError(new Error(\"Connect flag bit 0 must be 0, but got 1\"));o.username=this._list.readUInt8(this._pos)&V.USERNAME_MASK,o.password=this._list.readUInt8(this._pos)&V.PASSWORD_MASK,o.will=this._list.readUInt8(this._pos)&V.WILL_FLAG_MASK;let u=!!(this._list.readUInt8(this._pos)&V.WILL_RETAIN_MASK),c=(this._list.readUInt8(this._pos)&V.WILL_QOS_MASK)>>V.WILL_QOS_SHIFT;if(o.will)s.will={},s.will.retain=u,s.will.qos=c;else {if(u)return this._emitError(new Error(\"Will Retain Flag must be set to zero when Will Flag is set to 0\"));if(c)return this._emitError(new Error(\"Will QoS must be set to zero when Will Flag is set to 0\"))}if(s.clean=(this._list.readUInt8(this._pos)&V.CLEAN_SESSION_MASK)!==0,this._pos++,s.keepalive=this._parseNum(),s.keepalive===-1)return this._emitError(new Error(\"Packet too short\"));if(s.protocolVersion===5){let d=this._parseProperties();Object.getOwnPropertyNames(d).length&&(s.properties=d);}let h=this._parseString();if(h===null)return this._emitError(new Error(\"Packet too short\"));if(s.clientId=h,D(\"_parseConnect: packet.clientId: %s\",s.clientId),o.will){if(s.protocolVersion===5){let d=this._parseProperties();Object.getOwnPropertyNames(d).length&&(s.will.properties=d);}if(e=this._parseString(),e===null)return this._emitError(new Error(\"Cannot parse will topic\"));if(s.will.topic=e,D(\"_parseConnect: packet.will.topic: %s\",s.will.topic),r=this._parseBuffer(),r===null)return this._emitError(new Error(\"Cannot parse will payload\"));s.will.payload=r,D(\"_parseConnect: packet.will.paylaod: %s\",s.will.payload);}if(o.username){if(n=this._parseString(),n===null)return this._emitError(new Error(\"Cannot parse username\"));s.username=n,D(\"_parseConnect: packet.username: %s\",s.username);}if(o.password){if(i=this._parseBuffer(),i===null)return this._emitError(new Error(\"Cannot parse password\"));s.password=i;}return this.settings=s,D(\"_parseConnect: complete\"),s}_parseConnack(){D(\"_parseConnack\");let e=this.packet;if(this._list.length<1)return null;let r=this._list.readUInt8(this._pos++);if(r>1)return this._emitError(new Error(\"Invalid connack flags, bits 7-1 must be set to 0\"));if(e.sessionPresent=!!(r&V.SESSIONPRESENT_MASK),this.settings.protocolVersion===5)this._list.length>=2?e.reasonCode=this._list.readUInt8(this._pos++):e.reasonCode=0;else {if(this._list.length<2)return null;e.returnCode=this._list.readUInt8(this._pos++);}if(e.returnCode===-1||e.reasonCode===-1)return this._emitError(new Error(\"Cannot parse return code\"));if(this.settings.protocolVersion===5){let i=this._parseProperties();Object.getOwnPropertyNames(i).length&&(e.properties=i);}D(\"_parseConnack: complete\");}_parsePublish(){D(\"_parsePublish\");let e=this.packet;if(e.topic=this._parseString(),e.topic===null)return this._emitError(new Error(\"Cannot parse topic\"));if(!(e.qos>0&&!this._parseMessageId())){if(this.settings.protocolVersion===5){let r=this._parseProperties();Object.getOwnPropertyNames(r).length&&(e.properties=r);}e.payload=this._list.slice(this._pos,e.length),D(\"_parsePublish: payload from buffer list: %o\",e.payload);}}_parseSubscribe(){D(\"_parseSubscribe\");let e=this.packet,r,i,n,o,s,a,u;if(e.subscriptions=[],!!this._parseMessageId()){if(this.settings.protocolVersion===5){let c=this._parseProperties();Object.getOwnPropertyNames(c).length&&(e.properties=c);}if(e.length<=0)return this._emitError(new Error(\"Malformed subscribe, no payload specified\"));for(;this._pos=e.length)return this._emitError(new Error(\"Malformed Subscribe Payload\"));if(i=this._parseByte(),this.settings.protocolVersion===5){if(i&192)return this._emitError(new Error(\"Invalid subscribe topic flag bits, bits 7-6 must be 0\"))}else if(i&252)return this._emitError(new Error(\"Invalid subscribe topic flag bits, bits 7-2 must be 0\"));if(n=i&V.SUBSCRIBE_OPTIONS_QOS_MASK,n>2)return this._emitError(new Error(\"Invalid subscribe QoS, must be <= 2\"));if(a=(i>>V.SUBSCRIBE_OPTIONS_NL_SHIFT&V.SUBSCRIBE_OPTIONS_NL_MASK)!==0,s=(i>>V.SUBSCRIBE_OPTIONS_RAP_SHIFT&V.SUBSCRIBE_OPTIONS_RAP_MASK)!==0,o=i>>V.SUBSCRIBE_OPTIONS_RH_SHIFT&V.SUBSCRIBE_OPTIONS_RH_MASK,o>2)return this._emitError(new Error(\"Invalid retain handling, must be <= 2\"));u={topic:r,qos:n},this.settings.protocolVersion===5?(u.nl=a,u.rap=s,u.rh=o):this.settings.bridgeMode&&(u.rh=0,u.rap=!0,u.nl=!0),D(\"_parseSubscribe: push subscription `%s` to subscription\",u),e.subscriptions.push(u);}}}_parseSuback(){D(\"_parseSuback\");let e=this.packet;if(this.packet.granted=[],!!this._parseMessageId()){if(this.settings.protocolVersion===5){let r=this._parseProperties();Object.getOwnPropertyNames(r).length&&(e.properties=r);}if(e.length<=0)return this._emitError(new Error(\"Malformed suback, no payload specified\"));for(;this._pos2&&r!==128)return this._emitError(new Error(\"Invalid suback QoS, must be 0, 1, 2 or 128\"));this.packet.granted.push(r);}}}_parseUnsubscribe(){D(\"_parseUnsubscribe\");let e=this.packet;if(e.unsubscriptions=[],!!this._parseMessageId()){if(this.settings.protocolVersion===5){let r=this._parseProperties();Object.getOwnPropertyNames(r).length&&(e.properties=r);}if(e.length<=0)return this._emitError(new Error(\"Malformed unsubscribe, no payload specified\"));for(;this._pos2){switch(e.reasonCode=this._parseByte(),this.packet.cmd){case\"puback\":case\"pubrec\":if(!V.MQTT5_PUBACK_PUBREC_CODES[e.reasonCode])return this._emitError(new Error(\"Invalid \"+this.packet.cmd+\" reason code\"));break;case\"pubrel\":case\"pubcomp\":if(!V.MQTT5_PUBREL_PUBCOMP_CODES[e.reasonCode])return this._emitError(new Error(\"Invalid \"+this.packet.cmd+\" reason code\"));break}D(\"_parseConfirmation: packet.reasonCode `%d`\",e.reasonCode);}else e.reasonCode=0;if(e.length>3){let r=this._parseProperties();Object.getOwnPropertyNames(r).length&&(e.properties=r);}}return !0}_parseDisconnect(){let e=this.packet;if(D(\"_parseDisconnect\"),this.settings.protocolVersion===5){this._list.length>0?(e.reasonCode=this._parseByte(),V.MQTT5_DISCONNECT_CODES[e.reasonCode]||this._emitError(new Error(\"Invalid disconnect reason code\"))):e.reasonCode=0;let r=this._parseProperties();Object.getOwnPropertyNames(r).length&&(e.properties=r);}return D(\"_parseDisconnect result: true\"),!0}_parseAuth(){D(\"_parseAuth\");let e=this.packet;if(this.settings.protocolVersion!==5)return this._emitError(new Error(\"Not supported auth packet for this version MQTT\"));if(e.reasonCode=this._parseByte(),!V.MQTT5_AUTH_CODES[e.reasonCode])return this._emitError(new Error(\"Invalid auth reason code\"));let r=this._parseProperties();return Object.getOwnPropertyNames(r).length&&(e.properties=r),D(\"_parseAuth: result: true\"),!0}_parseMessageId(){let e=this.packet;return e.messageId=this._parseNum(),e.messageId===null?(this._emitError(new Error(\"Cannot parse messageId\")),!1):(D(\"_parseMessageId: packet.messageId %d\",e.messageId),!0)}_parseString(e){let r=this._parseNum(),i=r+this._pos;if(r===-1||i>this._list.length||i>this.packet.length)return null;let n=this._list.toString(\"utf8\",this._pos,i);return this._pos+=r,D(\"_parseString: result: %s\",n),n}_parseStringPair(){return D(\"_parseStringPair\"),{name:this._parseString(),value:this._parseString()}}_parseBuffer(){let e=this._parseNum(),r=e+this._pos;if(e===-1||r>this._list.length||r>this.packet.length)return null;let i=this._list.slice(this._pos,r);return this._pos+=e,D(\"_parseBuffer: result: %o\",i),i}_parseNum(){if(this._list.length-this._pos<2)return -1;let e=this._list.readUInt16BE(this._pos);return this._pos+=2,D(\"_parseNum: result: %s\",e),e}_parse4ByteNum(){if(this._list.length-this._pos<4)return -1;let e=this._list.readUInt32BE(this._pos);return this._pos+=4,D(\"_parse4ByteNum: result: %s\",e),e}_parseVarByteNum(e){D(\"_parseVarByteNum\");let r=4,i=0,n=1,o=0,s=!1,a,u=this._pos?this._pos:0;for(;i=i&&this._emitError(new Error(\"Invalid variable byte integer\")),u&&(this._pos+=i),s?e?s={bytes:i,value:o}:s=o:s=!1,D(\"_parseVarByteNum: result: %o\",s),s}_parseByte(){let e;return this._pos{v();m();_();var{Buffer:vi}=(ye(),X(_e)),Om=65536,vd={},km=vi.isBuffer(vi.from([1,2]).subarray(0,1));function Ed(t){let e=vi.allocUnsafe(2);return e.writeUInt8(t>>8,0),e.writeUInt8(t&255,0+1),e}function xm(){for(let t=0;t0&&(r=r|128),n.writeUInt8(r,i++);while(t>0&&i<4);return t>0&&(i=0),km?n.subarray(0,i):n.slice(0,i)}function Lm(t){let e=vi.allocUnsafe(4);return e.writeUInt32BE(t,0),e}Sd.exports={cache:vd,generateCache:xm,generateNumber:Ed,genBufVariableByteInt:Mm,generate4ByteBuffer:Lm};});var Id=M((eO,$o)=>{v();m();_();typeof P>\"u\"||!P.version||P.version.indexOf(\"v0.\")===0||P.version.indexOf(\"v1.\")===0&&P.version.indexOf(\"v1.8.\")!==0?$o.exports={nextTick:Um}:$o.exports=P;function Um(t,e,r,i){if(typeof t!=\"function\")throw new TypeError('\"callback\" argument must be a function');var n=arguments.length,o,s;switch(n){case 0:case 1:return P.nextTick(t);case 2:return P.nextTick(function(){t.call(null,e);});case 3:return P.nextTick(function(){t.call(null,e,r);});case 4:return P.nextTick(function(){t.call(null,e,r,i);});default:for(o=new Array(n-1),s=0;s{v();m();_();var j=Fo(),{Buffer:q}=(ye(),X(_e)),Nm=q.allocUnsafe(0),qm=q.from([0]),Ei=Ad(),Dm=Id().nextTick,qe=ot()(\"mqtt-packet:writeToStream\"),Cn=Ei.cache,jm=Ei.generateNumber,Fm=Ei.generateCache,Ho=Ei.genBufVariableByteInt,Wm=Ei.generate4ByteBuffer,Ie=Vo,Bn=!0;function Od(t,e,r){switch(qe(\"generate called\"),e.cork&&(e.cork(),Dm($m,e)),Bn&&(Bn=!1,Fm()),qe(\"generate: packet.cmd: %s\",t.cmd),t.cmd){case\"connect\":return Hm(t,e);case\"connack\":return Vm(t,e,r);case\"publish\":return zm(t,e,r);case\"puback\":case\"pubrec\":case\"pubrel\":case\"pubcomp\":return Km(t,e,r);case\"subscribe\":return Gm(t,e,r);case\"suback\":return Qm(t,e,r);case\"unsubscribe\":return Ym(t,e,r);case\"unsuback\":return Jm(t,e,r);case\"pingreq\":case\"pingresp\":return Xm(t,e);case\"disconnect\":return Zm(t,e,r);case\"auth\":return e1(t,e,r);default:return e.destroy(new Error(\"Unknown command\")),!1}}Object.defineProperty(Od,\"cacheNumbers\",{get(){return Ie===Vo},set(t){t?((!Cn||Object.keys(Cn).length===0)&&(Bn=!0),Ie=Vo):(Bn=!1,Ie=t1);}});function $m(t){t.uncork();}function Hm(t,e,r){let i=t||{},n=i.protocolId||\"MQTT\",o=i.protocolVersion||4,s=i.will,a=i.clean,u=i.keepalive||0,c=i.clientId||\"\",h=i.username,d=i.password,g=i.properties;a===void 0&&(a=!0);let y=0;if(!n||typeof n!=\"string\"&&!q.isBuffer(n))return e.destroy(new Error(\"Invalid protocolId\")),!1;if(y+=n.length+2,o!==3&&o!==4&&o!==5)return e.destroy(new Error(\"Invalid protocol version\")),!1;if(y+=1,(typeof c==\"string\"||q.isBuffer(c))&&(c||o>=4)&&(c||a))y+=q.byteLength(c)+2;else {if(o<4)return e.destroy(new Error(\"clientId must be supplied before 3.1.1\")),!1;if(a*1===0)return e.destroy(new Error(\"clientId must be given if cleanSession set to 0\")),!1}if(typeof u!=\"number\"||u<0||u>65535||u%1!==0)return e.destroy(new Error(\"Invalid keepalive\")),!1;y+=2,y+=1;let w,E;if(o===5){if(w=Ft(e,g),!w)return !1;y+=w.length;}if(s){if(typeof s!=\"object\")return e.destroy(new Error(\"Invalid will\")),!1;if(!s.topic||typeof s.topic!=\"string\")return e.destroy(new Error(\"Invalid will topic\")),!1;if(y+=q.byteLength(s.topic)+2,y+=2,s.payload)if(s.payload.length>=0)typeof s.payload==\"string\"?y+=q.byteLength(s.payload):y+=s.payload.length;else return e.destroy(new Error(\"Invalid will payload\")),!1;if(E={},o===5){if(E=Ft(e,s.properties),!E)return !1;y+=E.length;}}let S=!1;if(h!=null)if(Pd(h))S=!0,y+=q.byteLength(h)+2;else return e.destroy(new Error(\"Invalid username\")),!1;if(d!=null){if(!S)return e.destroy(new Error(\"Username is required to use password\")),!1;if(Pd(d))y+=kd(d)+2;else return e.destroy(new Error(\"Invalid password\")),!1}e.write(j.CONNECT_HEADER),De(e,y),Gr(e,n),i.bridgeMode&&(o+=128),e.write(o===131?j.VERSION131:o===132?j.VERSION132:o===4?j.VERSION4:o===5?j.VERSION5:j.VERSION3);let I=0;return I|=h!=null?j.USERNAME_MASK:0,I|=d!=null?j.PASSWORD_MASK:0,I|=s&&s.retain?j.WILL_RETAIN_MASK:0,I|=s&&s.qos?s.qos<0&&Ie(e,c),g?.write(),qe(\"publish: payload: %o\",u),e.write(u)}function Km(t,e,r){let i=r?r.protocolVersion:4,n=t||{},o=n.cmd||\"puback\",s=n.messageId,a=n.dup&&o===\"pubrel\"?j.DUP_MASK:0,u=0,c=n.reasonCode,h=n.properties,d=i===5?3:2;if(o===\"pubrel\"&&(u=1),typeof s!=\"number\")return e.destroy(new Error(\"Invalid messageId\")),!1;let g=null;if(i===5&&typeof h==\"object\"){if(g=Si(e,h,r,d),!g)return !1;d+=g.length;}return e.write(j.ACKS[o][u][a][0]),d===3&&(d+=c!==0?1:-1),De(e,d),Ie(e,s),i===5&&d!==2&&e.write(q.from([c])),g!==null?g.write():d===4&&e.write(q.from([0])),!0}function Gm(t,e,r){qe(\"subscribe: packet: \");let i=r?r.protocolVersion:4,n=t||{},o=n.dup?j.DUP_MASK:0,s=n.messageId,a=n.subscriptions,u=n.properties,c=0;if(typeof s!=\"number\")return e.destroy(new Error(\"Invalid messageId\")),!1;c+=2;let h=null;if(i===5){if(h=Ft(e,u),!h)return !1;c+=h.length;}if(typeof a==\"object\"&&a.length)for(let g=0;g2)return e.destroy(new Error(\"Invalid subscriptions - invalid Retain Handling\")),!1}c+=q.byteLength(y)+2+1;}else return e.destroy(new Error(\"Invalid subscriptions\")),!1;qe(\"subscribe: writing to stream: %o\",j.SUBSCRIBE_HEADER),e.write(j.SUBSCRIBE_HEADER[1][o?1:0][0]),De(e,c),Ie(e,s),h!==null&&h.write();let d=!0;for(let g of a){let y=g.topic,w=g.qos,E=+g.nl,S=+g.rap,I=g.rh,C;yr(e,y),C=j.SUBSCRIBE_OPTIONS_QOS[w],i===5&&(C|=E?j.SUBSCRIBE_OPTIONS_NL:0,C|=S?j.SUBSCRIBE_OPTIONS_RAP:0,C|=I?j.SUBSCRIBE_OPTIONS_RH[I]:0),d=e.write(q.from([C]));}return d}function Qm(t,e,r){let i=r?r.protocolVersion:4,n=t||{},o=n.messageId,s=n.granted,a=n.properties,u=0;if(typeof o!=\"number\")return e.destroy(new Error(\"Invalid messageId\")),!1;if(u+=2,typeof s==\"object\"&&s.length)for(let h=0;hj.VARBYTEINT_MAX)return t.destroy(new Error(`Invalid variable byte integer: ${e}`)),!1;let r=Td[e];return r||(r=Ho(e),e<16384&&(Td[e]=r)),qe(\"writeVarByteInt: writing to stream: %o\",r),t.write(r)}function yr(t,e){let r=q.byteLength(e);return Ie(t,r),qe(\"writeString: %s\",e),t.write(e,\"utf8\")}function Rd(t,e,r){yr(t,e),yr(t,r);}function Vo(t,e){return qe(\"writeNumberCached: number: %d\",e),qe(\"writeNumberCached: %o\",Cn[e]),t.write(Cn[e])}function t1(t,e){let r=jm(e);return qe(\"writeNumberGenerated: %o\",r),t.write(r)}function r1(t,e){let r=Wm(e);return qe(\"write4ByteNumber: %o\",r),t.write(r)}function Gr(t,e){typeof e==\"string\"?yr(t,e):e?(Ie(t,e.length),t.write(e)):Ie(t,0);}function Ft(t,e){if(typeof e!=\"object\"||e.length!=null)return {length:1,write(){Bd(t,{},0);}};let r=0;function i(o,s){let a=j.propertiesTypes[o],u=0;switch(a){case\"byte\":{if(typeof s!=\"boolean\")return t.destroy(new Error(`Invalid ${o}: ${s}`)),!1;u+=1+1;break}case\"int8\":{if(typeof s!=\"number\"||s<0||s>255)return t.destroy(new Error(`Invalid ${o}: ${s}`)),!1;u+=1+1;break}case\"binary\":{if(s&&s===null)return t.destroy(new Error(`Invalid ${o}: ${s}`)),!1;u+=1+q.byteLength(s)+2;break}case\"int16\":{if(typeof s!=\"number\"||s<0||s>65535)return t.destroy(new Error(`Invalid ${o}: ${s}`)),!1;u+=1+2;break}case\"int32\":{if(typeof s!=\"number\"||s<0||s>4294967295)return t.destroy(new Error(`Invalid ${o}: ${s}`)),!1;u+=1+4;break}case\"var\":{if(typeof s!=\"number\"||s<0||s>268435455)return t.destroy(new Error(`Invalid ${o}: ${s}`)),!1;u+=1+q.byteLength(Ho(s));break}case\"string\":{if(typeof s!=\"string\")return t.destroy(new Error(`Invalid ${o}: ${s}`)),!1;u+=1+2+q.byteLength(s.toString());break}case\"pair\":{if(typeof s!=\"object\")return t.destroy(new Error(`Invalid ${o}: ${s}`)),!1;u+=Object.getOwnPropertyNames(s).reduce((c,h)=>{let d=s[h];return Array.isArray(d)?c+=d.reduce((g,y)=>(g+=1+2+q.byteLength(h.toString())+2+q.byteLength(y.toString()),g),0):c+=1+2+q.byteLength(h.toString())+2+q.byteLength(s[h].toString()),c},0);break}default:return t.destroy(new Error(`Invalid property ${o}: ${s}`)),!1}return u}if(e)for(let o in e){let s=0,a=0,u=e[o];if(Array.isArray(u))for(let c=0;co;){let a=n.shift();if(a&&e[a])delete e[a],s=Ft(t,e);else return !1}return s}function Cd(t,e,r){switch(j.propertiesTypes[e]){case\"byte\":{t.write(q.from([j.properties[e]])),t.write(q.from([+r]));break}case\"int8\":{t.write(q.from([j.properties[e]])),t.write(q.from([r]));break}case\"binary\":{t.write(q.from([j.properties[e]])),Gr(t,r);break}case\"int16\":{t.write(q.from([j.properties[e]])),Ie(t,r);break}case\"int32\":{t.write(q.from([j.properties[e]])),r1(t,r);break}case\"var\":{t.write(q.from([j.properties[e]])),De(t,r);break}case\"string\":{t.write(q.from([j.properties[e]])),yr(t,r);break}case\"pair\":{Object.getOwnPropertyNames(r).forEach(n=>{let o=r[n];Array.isArray(o)?o.forEach(s=>{t.write(q.from([j.properties[e]])),Rd(t,n.toString(),s.toString());}):(t.write(q.from([j.properties[e]])),Rd(t,n.toString(),o.toString()));});break}default:return t.destroy(new Error(`Invalid property ${e} value: ${r}`)),!1}}function Bd(t,e,r){De(t,r);for(let i in e)if(Object.prototype.hasOwnProperty.call(e,i)&&e[i]!==null){let n=e[i];if(Array.isArray(n))for(let o=0;o{v();m();_();var i1=zo(),{EventEmitter:n1}=(ir(),X(rr)),{Buffer:Md}=(ye(),X(_e));function s1(t,e){let r=new Ko;return i1(t,r,e),r.concat()}var Ko=class extends n1{constructor(){super(),this._array=new Array(20),this._i=0;}write(e){return this._array[this._i++]=e,!0}concat(){let e=0,r=new Array(this._array.length),i=this._array,n=0,o;for(o=0;o{v();m();_();Pn.parser=md().parser;Pn.generate=Ud();Pn.writeToStream=zo();});var Yo=M(Qo=>{v();m();_();Object.defineProperty(Qo,\"__esModule\",{value:!0});var Go=class{constructor(){this.nextId=Math.max(1,Math.floor(Math.random()*65535));}allocate(){let e=this.nextId++;return this.nextId===65536&&(this.nextId=1),e}getLastAllocated(){return this.nextId===1?65535:this.nextId-1}register(e){return !0}deallocate(e){}clear(){}};Qo.default=Go;});var Dd=M((YO,qd)=>{v();m();_();qd.exports=o1;function Qr(t){return t instanceof x?x.from(t):new t.constructor(t.buffer.slice(),t.byteOffset,t.length)}function o1(t){if(t=t||{},t.circles)return a1(t);return t.proto?i:r;function e(n,o){for(var s=Object.keys(n),a=new Array(s.length),u=0;u{v();m();_();jd.exports=Dd()();});var $d=M(Yr=>{v();m();_();Object.defineProperty(Yr,\"__esModule\",{value:!0});Yr.validateTopics=Yr.validateTopic=void 0;function Wd(t){let e=t.split(\"/\");for(let r=0;r{v();m();_();Object.defineProperty(Xo,\"__esModule\",{value:!0});var u1=Dt(),f1={objectMode:!0},c1={clean:!0},Jo=class{constructor(e){this.options=e||{},this.options=Object.assign(Object.assign({},c1),e),this._inflights=new Map;}put(e,r){return this._inflights.set(e.messageId,e),r&&r(),this}createStream(){let e=new u1.Readable(f1),r=[],i=!1,n=0;return this._inflights.forEach((o,s)=>{r.push(o);}),e._read=()=>{!i&&n{if(!i)return i=!0,setTimeout(()=>{e.emit(\"close\");},0),e},e}del(e,r){let i=this._inflights.get(e.messageId);return i?(this._inflights.delete(e.messageId),r(null,i)):r&&r(new Error(\"missing packet\")),this}get(e,r){let i=this._inflights.get(e.messageId);return i?r(null,i):r&&r(new Error(\"missing packet\")),this}close(e){this.options.clean&&(this._inflights=null),e&&e();}};Xo.default=Jo;});var Vd=M(ea=>{v();m();_();Object.defineProperty(ea,\"__esModule\",{value:!0});var Hd=[0,16,128,131,135,144,145,151,153],h1=(t,e,r)=>{t.log(\"handlePublish: packet %o\",e),r=typeof r<\"u\"?r:t.noop;let i=e.topic.toString(),n=e.payload,{qos:o}=e,{messageId:s}=e,{options:a}=t;if(t.options.protocolVersion===5){let u;if(e.properties&&(u=e.properties.topicAlias),typeof u<\"u\")if(i.length===0)if(u>0&&u<=65535){let c=t.topicAliasRecv.getTopicByAlias(u);if(c)i=c,t.log(\"handlePublish :: topic complemented by alias. topic: %s - alias: %d\",i,u);else {t.log(\"handlePublish :: unregistered topic alias. alias: %d\",u),t.emit(\"error\",new Error(\"Received unregistered Topic Alias\"));return}}else {t.log(\"handlePublish :: topic alias out of range. alias: %d\",u),t.emit(\"error\",new Error(\"Received Topic Alias is out of range\"));return}else if(t.topicAliasRecv.put(i,u))t.log(\"handlePublish :: registered topic: %s - alias: %d\",i,u);else {t.log(\"handlePublish :: topic alias out of range. alias: %d\",u),t.emit(\"error\",new Error(\"Received Topic Alias is out of range\"));return}}switch(t.log(\"handlePublish: qos %d\",o),o){case 2:{a.customHandleAcks(i,n,e,(u,c)=>{if(typeof u==\"number\"&&(c=u,u=null),u)return t.emit(\"error\",u);if(Hd.indexOf(c)===-1)return t.emit(\"error\",new Error(\"Wrong reason code for pubrec\"));c?t._sendPacket({cmd:\"pubrec\",messageId:s,reasonCode:c},r):t.incomingStore.put(e,()=>{t._sendPacket({cmd:\"pubrec\",messageId:s},r);});});break}case 1:{a.customHandleAcks(i,n,e,(u,c)=>{if(typeof u==\"number\"&&(c=u,u=null),u)return t.emit(\"error\",u);if(Hd.indexOf(c)===-1)return t.emit(\"error\",new Error(\"Wrong reason code for puback\"));c||t.emit(\"message\",i,n,e),t.handleMessage(e,h=>{if(h)return r&&r(h);t._sendPacket({cmd:\"puback\",messageId:s,reasonCode:c},r);});});break}case 0:t.emit(\"message\",i,n,e),t.handleMessage(e,r);break;default:t.log(\"handlePublish: unknown QoS. Doing nothing.\");break}};ea.default=h1;});var Jr=M(Wt=>{v();m();_();Object.defineProperty(Wt,\"__esModule\",{value:!0});Wt.nextTick=Wt.applyMixin=Wt.ErrorWithReasonCode=void 0;var ta=class t extends Error{constructor(e,r){super(e),this.code=r,Object.setPrototypeOf(this,t.prototype),Object.getPrototypeOf(this).name=\"ErrorWithReasonCode\";}};Wt.ErrorWithReasonCode=ta;function d1(t,e,r=!1){var i;let n=[e];for(;;){let o=n[0],s=Object.getPrototypeOf(o);if(s?.prototype)n.unshift(s);else break}for(let o of n)for(let s of Object.getOwnPropertyNames(o.prototype))(r||s!==\"constructor\")&&Object.defineProperty(t.prototype,s,(i=Object.getOwnPropertyDescriptor(o.prototype,s))!==null&&i!==void 0?i:Object.create(null));}Wt.applyMixin=d1;Wt.nextTick=typeof(P===null||P===void 0?void 0:P.nextTick)==\"function\"?P.nextTick:t=>{setTimeout(t,0);};});var Ai=M(br=>{v();m();_();Object.defineProperty(br,\"__esModule\",{value:!0});br.ReasonCodes=void 0;br.ReasonCodes={0:\"\",1:\"Unacceptable protocol version\",2:\"Identifier rejected\",3:\"Server unavailable\",4:\"Bad username or password\",5:\"Not authorized\",16:\"No matching subscribers\",17:\"No subscription existed\",128:\"Unspecified error\",129:\"Malformed Packet\",130:\"Protocol Error\",131:\"Implementation specific error\",132:\"Unsupported Protocol Version\",133:\"Client Identifier not valid\",134:\"Bad User Name or Password\",135:\"Not authorized\",136:\"Server unavailable\",137:\"Server busy\",138:\"Banned\",139:\"Server shutting down\",140:\"Bad authentication method\",141:\"Keep Alive timeout\",142:\"Session taken over\",143:\"Topic Filter invalid\",144:\"Topic Name invalid\",145:\"Packet identifier in use\",146:\"Packet Identifier not found\",147:\"Receive Maximum exceeded\",148:\"Topic Alias invalid\",149:\"Packet too large\",150:\"Message rate too high\",151:\"Quota exceeded\",152:\"Administrative action\",153:\"Payload format invalid\",154:\"Retain not supported\",155:\"QoS not supported\",156:\"Use another server\",157:\"Server moved\",158:\"Shared Subscriptions not supported\",159:\"Connection rate exceeded\",160:\"Maximum connect time\",161:\"Subscription Identifiers not supported\",162:\"Wildcard Subscriptions not supported\"};var p1=(t,e)=>{let{messageId:r}=e,i=e.cmd,n=null,o=t.outgoing[r]?t.outgoing[r].cb:null,s;if(!o){t.log(\"_handleAck :: Server sent an ack in error. Ignoring.\");return}switch(t.log(\"_handleAck :: packet type\",i),i){case\"pubcomp\":case\"puback\":{let a=e.reasonCode;a&&a>0&&a!==16?(s=new Error(`Publish error: ${br.ReasonCodes[a]}`),s.code=a,t._removeOutgoingAndStoreMessage(r,()=>{o(s,e);})):t._removeOutgoingAndStoreMessage(r,o);break}case\"pubrec\":{n={cmd:\"pubrel\",qos:2,messageId:r};let a=e.reasonCode;a&&a>0&&a!==16?(s=new Error(`Publish error: ${br.ReasonCodes[a]}`),s.code=a,t._removeOutgoingAndStoreMessage(r,()=>{o(s,e);})):t._sendPacket(n);break}case\"suback\":{delete t.outgoing[r],t.messageIdProvider.deallocate(r);let a=e.granted;for(let u=0;u{delete t._resubscribeTopics[h];});}delete t.messageIdToTopic[r],t._invokeStoreProcessingQueue(),o(null,e);break}case\"unsuback\":{delete t.outgoing[r],t.messageIdProvider.deallocate(r),t._invokeStoreProcessingQueue(),o(null);break}default:t.emit(\"error\",new Error(\"unrecognized packet type\"));}t.disconnecting&&Object.keys(t.outgoing).length===0&&t.emit(\"outgoingEmpty\");};br.default=p1;});var Kd=M(ra=>{v();m();_();Object.defineProperty(ra,\"__esModule\",{value:!0});var zd=Jr(),g1=Ai(),y1=(t,e)=>{let{options:r}=t,i=r.protocolVersion,n=i===5?e.reasonCode:e.returnCode;if(i!==5){let o=new zd.ErrorWithReasonCode(`Protocol error: Auth packets are only supported in MQTT 5. Your version:${i}`,n);t.emit(\"error\",o);return}t.handleAuth(e,(o,s)=>{if(o){t.emit(\"error\",o);return}if(n===24)t.reconnecting=!1,t._sendPacket(s);else {let a=new zd.ErrorWithReasonCode(`Connection refused: ${g1.ReasonCodes[n]}`,n);t.emit(\"error\",a);}});};ra.default=y1;});var Xd=M(kn=>{v();m();_();Object.defineProperty(kn,\"__esModule\",{value:!0});kn.LRUCache=void 0;var Ii=typeof performance==\"object\"&&performance&&typeof performance.now==\"function\"?performance:Date,Qd=new Set,ia=typeof P==\"object\"&&P?P:{},Yd=(t,e,r,i)=>{typeof ia.emitWarning==\"function\"?ia.emitWarning(t,e,r,i):console.error(`[${r}] ${e}: ${t}`);},On=globalThis.AbortController,Gd=globalThis.AbortSignal;if(typeof On>\"u\"){Gd=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(i,n){this._onabort.push(n);}},On=class{constructor(){e();}signal=new Gd;abort(i){if(!this.signal.aborted){this.signal.reason=i,this.signal.aborted=!0;for(let n of this.signal._onabort)n(i);this.signal.onabort?.(i);}}};let t=ia.env?.LRU_CACHE_IGNORE_AC_WARNING!==\"1\",e=()=>{t&&(t=!1,Yd(\"AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.\",\"NO_ABORT_CONTROLLER\",\"ENOTSUP\",e));};}var b1=t=>!Qd.has(t),$t=t=>t&&t===Math.floor(t)&&t>0&&isFinite(t),Jd=t=>$t(t)?t<=Math.pow(2,8)?Uint8Array:t<=Math.pow(2,16)?Uint16Array:t<=Math.pow(2,32)?Uint32Array:t<=Number.MAX_SAFE_INTEGER?Xr:null:null,Xr=class extends Array{constructor(e){super(e),this.fill(0);}},na=class t{heap;length;static#l=!1;static create(e){let r=Jd(e);if(!r)return [];t.#l=!0;let i=new t(e,r);return t.#l=!1,i}constructor(e,r){if(!t.#l)throw new TypeError(\"instantiate Stack using Stack.create(n)\");this.heap=new r(e),this.length=0;}push(e){this.heap[this.length++]=e;}pop(){return this.heap[--this.length]}},sa=class t{#l;#c;#p;#g;#B;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#i;#y;#n;#r;#e;#u;#h;#a;#s;#b;#o;#E;#S;#w;#_;#I;#f;static unsafeExposeInternals(e){return {starts:e.#S,ttls:e.#w,sizes:e.#E,keyMap:e.#n,keyList:e.#r,valList:e.#e,next:e.#u,prev:e.#h,get head(){return e.#a},get tail(){return e.#s},free:e.#b,isBackgroundFetch:r=>e.#t(r),backgroundFetch:(r,i,n,o)=>e.#k(r,i,n,o),moveToTail:r=>e.#C(r),indexes:r=>e.#m(r),rindexes:r=>e.#v(r),isStale:r=>e.#d(r)}}get max(){return this.#l}get maxSize(){return this.#c}get calculatedSize(){return this.#y}get size(){return this.#i}get fetchMethod(){return this.#B}get dispose(){return this.#p}get disposeAfter(){return this.#g}constructor(e){let{max:r=0,ttl:i,ttlResolution:n=1,ttlAutopurge:o,updateAgeOnGet:s,updateAgeOnHas:a,allowStale:u,dispose:c,disposeAfter:h,noDisposeOnSet:d,noUpdateTTL:g,maxSize:y=0,maxEntrySize:w=0,sizeCalculation:E,fetchMethod:S,noDeleteOnFetchRejection:I,noDeleteOnStaleGet:C,allowStaleOnFetchRejection:R,allowStaleOnFetchAbort:U,ignoreFetchAbort:N}=e;if(r!==0&&!$t(r))throw new TypeError(\"max option must be a nonnegative integer\");let W=r?Jd(r):Array;if(!W)throw new Error(\"invalid max value: \"+r);if(this.#l=r,this.#c=y,this.maxEntrySize=w||this.#c,this.sizeCalculation=E,this.sizeCalculation){if(!this.#c&&!this.maxEntrySize)throw new TypeError(\"cannot set sizeCalculation without setting maxSize or maxEntrySize\");if(typeof this.sizeCalculation!=\"function\")throw new TypeError(\"sizeCalculation set to non-function\")}if(S!==void 0&&typeof S!=\"function\")throw new TypeError(\"fetchMethod must be a function if specified\");if(this.#B=S,this.#I=!!S,this.#n=new Map,this.#r=new Array(r).fill(void 0),this.#e=new Array(r).fill(void 0),this.#u=new W(r),this.#h=new W(r),this.#a=0,this.#s=0,this.#b=na.create(r),this.#i=0,this.#y=0,typeof c==\"function\"&&(this.#p=c),typeof h==\"function\"?(this.#g=h,this.#o=[]):(this.#g=void 0,this.#o=void 0),this.#_=!!this.#p,this.#f=!!this.#g,this.noDisposeOnSet=!!d,this.noUpdateTTL=!!g,this.noDeleteOnFetchRejection=!!I,this.allowStaleOnFetchRejection=!!R,this.allowStaleOnFetchAbort=!!U,this.ignoreFetchAbort=!!N,this.maxEntrySize!==0){if(this.#c!==0&&!$t(this.#c))throw new TypeError(\"maxSize must be a positive integer if specified\");if(!$t(this.maxEntrySize))throw new TypeError(\"maxEntrySize must be a positive integer if specified\");this.#q();}if(this.allowStale=!!u,this.noDeleteOnStaleGet=!!C,this.updateAgeOnGet=!!s,this.updateAgeOnHas=!!a,this.ttlResolution=$t(n)||n===0?n:1,this.ttlAutopurge=!!o,this.ttl=i||0,this.ttl){if(!$t(this.ttl))throw new TypeError(\"ttl must be a positive integer if specified\");this.#x();}if(this.#l===0&&this.ttl===0&&this.#c===0)throw new TypeError(\"At least one of max, maxSize, or ttl is required\");if(!this.ttlAutopurge&&!this.#l&&!this.#c){let K=\"LRU_CACHE_UNBOUNDED\";b1(K)&&(Qd.add(K),Yd(\"TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.\",\"UnboundedCacheWarning\",K,t));}}getRemainingTTL(e){return this.#n.has(e)?1/0:0}#x(){let e=new Xr(this.#l),r=new Xr(this.#l);this.#w=e,this.#S=r,this.#M=(o,s,a=Ii.now())=>{if(r[o]=s!==0?a:0,e[o]=s,s!==0&&this.ttlAutopurge){let u=setTimeout(()=>{this.#d(o)&&this.delete(this.#r[o]);},s+1);u.unref&&u.unref();}},this.#T=o=>{r[o]=e[o]!==0?Ii.now():0;},this.#A=(o,s)=>{if(e[s]){let a=e[s],u=r[s];o.ttl=a,o.start=u,o.now=i||n();let c=o.now-u;o.remainingTTL=a-c;}};let i=0,n=()=>{let o=Ii.now();if(this.ttlResolution>0){i=o;let s=setTimeout(()=>i=0,this.ttlResolution);s.unref&&s.unref();}return o};this.getRemainingTTL=o=>{let s=this.#n.get(o);if(s===void 0)return 0;let a=e[s],u=r[s];if(a===0||u===0)return 1/0;let c=(i||n())-u;return a-c},this.#d=o=>e[o]!==0&&r[o]!==0&&(i||n())-r[o]>e[o];}#T=()=>{};#A=()=>{};#M=()=>{};#d=()=>!1;#q(){let e=new Xr(this.#l);this.#y=0,this.#E=e,this.#R=r=>{this.#y-=e[r],e[r]=0;},this.#L=(r,i,n,o)=>{if(this.#t(i))return 0;if(!$t(n))if(o){if(typeof o!=\"function\")throw new TypeError(\"sizeCalculation must be a function\");if(n=o(i,r),!$t(n))throw new TypeError(\"sizeCalculation return invalid (expect positive integer)\")}else throw new TypeError(\"invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.\");return n},this.#P=(r,i,n)=>{if(e[r]=i,this.#c){let o=this.#c-e[r];for(;this.#y>o;)this.#O(!0);}this.#y+=e[r],n&&(n.entrySize=i,n.totalCalculatedSize=this.#y);};}#R=e=>{};#P=(e,r,i)=>{};#L=(e,r,i,n)=>{if(i||n)throw new TypeError(\"cannot set size without setting maxSize or maxEntrySize on cache\");return 0};*#m({allowStale:e=this.allowStale}={}){if(this.#i)for(let r=this.#s;!(!this.#U(r)||((e||!this.#d(r))&&(yield r),r===this.#a));)r=this.#h[r];}*#v({allowStale:e=this.allowStale}={}){if(this.#i)for(let r=this.#a;!(!this.#U(r)||((e||!this.#d(r))&&(yield r),r===this.#s));)r=this.#u[r];}#U(e){return e!==void 0&&this.#n.get(this.#r[e])===e}*entries(){for(let e of this.#m())this.#e[e]!==void 0&&this.#r[e]!==void 0&&!this.#t(this.#e[e])&&(yield [this.#r[e],this.#e[e]]);}*rentries(){for(let e of this.#v())this.#e[e]!==void 0&&this.#r[e]!==void 0&&!this.#t(this.#e[e])&&(yield [this.#r[e],this.#e[e]]);}*keys(){for(let e of this.#m()){let r=this.#r[e];r!==void 0&&!this.#t(this.#e[e])&&(yield r);}}*rkeys(){for(let e of this.#v()){let r=this.#r[e];r!==void 0&&!this.#t(this.#e[e])&&(yield r);}}*values(){for(let e of this.#m())this.#e[e]!==void 0&&!this.#t(this.#e[e])&&(yield this.#e[e]);}*rvalues(){for(let e of this.#v())this.#e[e]!==void 0&&!this.#t(this.#e[e])&&(yield this.#e[e]);}[Symbol.iterator](){return this.entries()}find(e,r={}){for(let i of this.#m()){let n=this.#e[i],o=this.#t(n)?n.__staleWhileFetching:n;if(o!==void 0&&e(o,this.#r[i],this))return this.get(this.#r[i],r)}}forEach(e,r=this){for(let i of this.#m()){let n=this.#e[i],o=this.#t(n)?n.__staleWhileFetching:n;o!==void 0&&e.call(r,o,this.#r[i],this);}}rforEach(e,r=this){for(let i of this.#v()){let n=this.#e[i],o=this.#t(n)?n.__staleWhileFetching:n;o!==void 0&&e.call(r,o,this.#r[i],this);}}purgeStale(){let e=!1;for(let r of this.#v({allowStale:!0}))this.#d(r)&&(this.delete(this.#r[r]),e=!0);return e}dump(){let e=[];for(let r of this.#m({allowStale:!0})){let i=this.#r[r],n=this.#e[r],o=this.#t(n)?n.__staleWhileFetching:n;if(o===void 0||i===void 0)continue;let s={value:o};if(this.#w&&this.#S){s.ttl=this.#w[r];let a=Ii.now()-this.#S[r];s.start=Math.floor(Date.now()-a);}this.#E&&(s.size=this.#E[r]),e.unshift([i,s]);}return e}load(e){this.clear();for(let[r,i]of e){if(i.start){let n=Date.now()-i.start;i.start=Ii.now()-n;}this.set(r,i.value,i);}}set(e,r,i={}){if(r===void 0)return this.delete(e),this;let{ttl:n=this.ttl,start:o,noDisposeOnSet:s=this.noDisposeOnSet,sizeCalculation:a=this.sizeCalculation,status:u}=i,{noUpdateTTL:c=this.noUpdateTTL}=i,h=this.#L(e,r,i.size||0,a);if(this.maxEntrySize&&h>this.maxEntrySize)return u&&(u.set=\"miss\",u.maxEntrySizeExceeded=!0),this.delete(e),this;let d=this.#i===0?void 0:this.#n.get(e);if(d===void 0)d=this.#i===0?this.#s:this.#b.length!==0?this.#b.pop():this.#i===this.#l?this.#O(!1):this.#i,this.#r[d]=e,this.#e[d]=r,this.#n.set(e,d),this.#u[this.#s]=d,this.#h[d]=this.#s,this.#s=d,this.#i++,this.#P(d,h,u),u&&(u.set=\"add\"),c=!1;else {this.#C(d);let g=this.#e[d];if(r!==g){if(this.#I&&this.#t(g)){g.__abortController.abort(new Error(\"replaced\"));let{__staleWhileFetching:y}=g;y!==void 0&&!s&&(this.#_&&this.#p?.(y,e,\"set\"),this.#f&&this.#o?.push([y,e,\"set\"]));}else s||(this.#_&&this.#p?.(g,e,\"set\"),this.#f&&this.#o?.push([g,e,\"set\"]));if(this.#R(d),this.#P(d,h,u),this.#e[d]=r,u){u.set=\"replace\";let y=g&&this.#t(g)?g.__staleWhileFetching:g;y!==void 0&&(u.oldValue=y);}}else u&&(u.set=\"update\");}if(n!==0&&!this.#w&&this.#x(),this.#w&&(c||this.#M(d,n,o),u&&this.#A(u,d)),!s&&this.#f&&this.#o){let g=this.#o,y;for(;y=g?.shift();)this.#g?.(...y);}return this}pop(){try{for(;this.#i;){let e=this.#e[this.#a];if(this.#O(!0),this.#t(e)){if(e.__staleWhileFetching)return e.__staleWhileFetching}else if(e!==void 0)return e}}finally{if(this.#f&&this.#o){let e=this.#o,r;for(;r=e?.shift();)this.#g?.(...r);}}}#O(e){let r=this.#a,i=this.#r[r],n=this.#e[r];return this.#I&&this.#t(n)?n.__abortController.abort(new Error(\"evicted\")):(this.#_||this.#f)&&(this.#_&&this.#p?.(n,i,\"evict\"),this.#f&&this.#o?.push([n,i,\"evict\"])),this.#R(r),e&&(this.#r[r]=void 0,this.#e[r]=void 0,this.#b.push(r)),this.#i===1?(this.#a=this.#s=0,this.#b.length=0):this.#a=this.#u[r],this.#n.delete(i),this.#i--,r}has(e,r={}){let{updateAgeOnHas:i=this.updateAgeOnHas,status:n}=r,o=this.#n.get(e);if(o!==void 0){let s=this.#e[o];if(this.#t(s)&&s.__staleWhileFetching===void 0)return !1;if(this.#d(o))n&&(n.has=\"stale\",this.#A(n,o));else return i&&this.#T(o),n&&(n.has=\"hit\",this.#A(n,o)),!0}else n&&(n.has=\"miss\");return !1}peek(e,r={}){let{allowStale:i=this.allowStale}=r,n=this.#n.get(e);if(n!==void 0&&(i||!this.#d(n))){let o=this.#e[n];return this.#t(o)?o.__staleWhileFetching:o}}#k(e,r,i,n){let o=r===void 0?void 0:this.#e[r];if(this.#t(o))return o;let s=new On,{signal:a}=i;a?.addEventListener(\"abort\",()=>s.abort(a.reason),{signal:s.signal});let u={signal:s.signal,options:i,context:n},c=(E,S=!1)=>{let{aborted:I}=s.signal,C=i.ignoreFetchAbort&&E!==void 0;if(i.status&&(I&&!S?(i.status.fetchAborted=!0,i.status.fetchError=s.signal.reason,C&&(i.status.fetchAbortIgnored=!0)):i.status.fetchResolved=!0),I&&!C&&!S)return d(s.signal.reason);let R=y;return this.#e[r]===y&&(E===void 0?R.__staleWhileFetching?this.#e[r]=R.__staleWhileFetching:this.delete(e):(i.status&&(i.status.fetchUpdated=!0),this.set(e,E,u.options))),E},h=E=>(i.status&&(i.status.fetchRejected=!0,i.status.fetchError=E),d(E)),d=E=>{let{aborted:S}=s.signal,I=S&&i.allowStaleOnFetchAbort,C=I||i.allowStaleOnFetchRejection,R=C||i.noDeleteOnFetchRejection,U=y;if(this.#e[r]===y&&(!R||U.__staleWhileFetching===void 0?this.delete(e):I||(this.#e[r]=U.__staleWhileFetching)),C)return i.status&&U.__staleWhileFetching!==void 0&&(i.status.returnedStale=!0),U.__staleWhileFetching;if(U.__returned===U)throw E},g=(E,S)=>{let I=this.#B?.(e,o,u);I&&I instanceof Promise&&I.then(C=>E(C===void 0?void 0:C),S),s.signal.addEventListener(\"abort\",()=>{(!i.ignoreFetchAbort||i.allowStaleOnFetchAbort)&&(E(void 0),i.allowStaleOnFetchAbort&&(E=C=>c(C,!0)));});};i.status&&(i.status.fetchDispatched=!0);let y=new Promise(g).then(c,h),w=Object.assign(y,{__abortController:s,__staleWhileFetching:o,__returned:void 0});return r===void 0?(this.set(e,w,{...u.options,status:void 0}),r=this.#n.get(e)):this.#e[r]=w,w}#t(e){if(!this.#I)return !1;let r=e;return !!r&&r instanceof Promise&&r.hasOwnProperty(\"__staleWhileFetching\")&&r.__abortController instanceof On}async fetch(e,r={}){let{allowStale:i=this.allowStale,updateAgeOnGet:n=this.updateAgeOnGet,noDeleteOnStaleGet:o=this.noDeleteOnStaleGet,ttl:s=this.ttl,noDisposeOnSet:a=this.noDisposeOnSet,size:u=0,sizeCalculation:c=this.sizeCalculation,noUpdateTTL:h=this.noUpdateTTL,noDeleteOnFetchRejection:d=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:g=this.allowStaleOnFetchRejection,ignoreFetchAbort:y=this.ignoreFetchAbort,allowStaleOnFetchAbort:w=this.allowStaleOnFetchAbort,context:E,forceRefresh:S=!1,status:I,signal:C}=r;if(!this.#I)return I&&(I.fetch=\"get\"),this.get(e,{allowStale:i,updateAgeOnGet:n,noDeleteOnStaleGet:o,status:I});let R={allowStale:i,updateAgeOnGet:n,noDeleteOnStaleGet:o,ttl:s,noDisposeOnSet:a,size:u,sizeCalculation:c,noUpdateTTL:h,noDeleteOnFetchRejection:d,allowStaleOnFetchRejection:g,allowStaleOnFetchAbort:w,ignoreFetchAbort:y,status:I,signal:C},U=this.#n.get(e);if(U===void 0){I&&(I.fetch=\"miss\");let N=this.#k(e,U,R,E);return N.__returned=N}else {let N=this.#e[U];if(this.#t(N)){let de=i&&N.__staleWhileFetching!==void 0;return I&&(I.fetch=\"inflight\",de&&(I.returnedStale=!0)),de?N.__staleWhileFetching:N.__returned=N}let W=this.#d(U);if(!S&&!W)return I&&(I.fetch=\"hit\"),this.#C(U),n&&this.#T(U),I&&this.#A(I,U),N;let K=this.#k(e,U,R,E),Q=K.__staleWhileFetching!==void 0&&i;return I&&(I.fetch=W?\"stale\":\"refresh\",Q&&W&&(I.returnedStale=!0)),Q?K.__staleWhileFetching:K.__returned=K}}get(e,r={}){let{allowStale:i=this.allowStale,updateAgeOnGet:n=this.updateAgeOnGet,noDeleteOnStaleGet:o=this.noDeleteOnStaleGet,status:s}=r,a=this.#n.get(e);if(a!==void 0){let u=this.#e[a],c=this.#t(u);return s&&this.#A(s,a),this.#d(a)?(s&&(s.get=\"stale\"),c?(s&&i&&u.__staleWhileFetching!==void 0&&(s.returnedStale=!0),i?u.__staleWhileFetching:void 0):(o||this.delete(e),s&&i&&(s.returnedStale=!0),i?u:void 0)):(s&&(s.get=\"hit\"),c?u.__staleWhileFetching:(this.#C(a),n&&this.#T(a),u))}else s&&(s.get=\"miss\");}#N(e,r){this.#h[r]=e,this.#u[e]=r;}#C(e){e!==this.#s&&(e===this.#a?this.#a=this.#u[e]:this.#N(this.#h[e],this.#u[e]),this.#N(this.#s,e),this.#s=e);}delete(e){let r=!1;if(this.#i!==0){let i=this.#n.get(e);if(i!==void 0)if(r=!0,this.#i===1)this.clear();else {this.#R(i);let n=this.#e[i];this.#t(n)?n.__abortController.abort(new Error(\"deleted\")):(this.#_||this.#f)&&(this.#_&&this.#p?.(n,e,\"delete\"),this.#f&&this.#o?.push([n,e,\"delete\"])),this.#n.delete(e),this.#r[i]=void 0,this.#e[i]=void 0,i===this.#s?this.#s=this.#h[i]:i===this.#a?this.#a=this.#u[i]:(this.#u[this.#h[i]]=this.#u[i],this.#h[this.#u[i]]=this.#h[i]),this.#i--,this.#b.push(i);}}if(this.#f&&this.#o?.length){let i=this.#o,n;for(;n=i?.shift();)this.#g?.(...n);}return r}clear(){for(let e of this.#v({allowStale:!0})){let r=this.#e[e];if(this.#t(r))r.__abortController.abort(new Error(\"deleted\"));else {let i=this.#r[e];this.#_&&this.#p?.(r,i,\"delete\"),this.#f&&this.#o?.push([r,i,\"delete\"]);}}if(this.#n.clear(),this.#e.fill(void 0),this.#r.fill(void 0),this.#w&&this.#S&&(this.#w.fill(0),this.#S.fill(0)),this.#E&&this.#E.fill(0),this.#a=0,this.#s=0,this.#b.length=0,this.#y=0,this.#i=0,this.#f&&this.#o){let e=this.#o,r;for(;r=e?.shift();)this.#g?.(...r);}}};kn.LRUCache=sa;});var at=M(Ht=>{v();m();_();Object.defineProperty(Ht,\"t\",{value:!0});Ht.ContainerIterator=Ht.Container=Ht.Base=void 0;var oa=class{constructor(e=0){this.iteratorType=e;}equals(e){return this.o===e.o}};Ht.ContainerIterator=oa;var xn=class{constructor(){this.i=0;}get length(){return this.i}size(){return this.i}empty(){return this.i===0}};Ht.Base=xn;var aa=class extends xn{};Ht.Container=aa;});var Zd=M(Mn=>{v();m();_();Object.defineProperty(Mn,\"t\",{value:!0});Mn.default=void 0;var w1=at(),la=class extends w1.Base{constructor(e=[]){super(),this.S=[];let r=this;e.forEach(function(i){r.push(i);});}clear(){this.i=0,this.S=[];}push(e){return this.S.push(e),this.i+=1,this.i}pop(){if(this.i!==0)return this.i-=1,this.S.pop()}top(){return this.S[this.i-1]}},_1=la;Mn.default=_1;});var ep=M(Ln=>{v();m();_();Object.defineProperty(Ln,\"t\",{value:!0});Ln.default=void 0;var m1=at(),ua=class extends m1.Base{constructor(e=[]){super(),this.j=0,this.q=[];let r=this;e.forEach(function(i){r.push(i);});}clear(){this.q=[],this.i=this.j=0;}push(e){let r=this.q.length;if(this.j/r>.5&&this.j+this.i>=r&&r>4096){let i=this.i;for(let n=0;n{v();m();_();Object.defineProperty(Un,\"t\",{value:!0});Un.default=void 0;var E1=at(),fa=class extends E1.Base{constructor(e=[],r=function(n,o){return n>o?-1:n>1;for(let o=this.i-1>>1;o>=0;--o)this.k(o,n);}m(e){let r=this.C[e];for(;e>0;){let i=e-1>>1,n=this.C[i];if(this.v(n,r)<=0)break;this.C[e]=n,e=i;}this.C[e]=r;}k(e,r){let i=this.C[e];for(;e0&&(n=o,s=this.C[o]),this.v(s,i)>=0)break;this.C[e]=s,e=n;}this.C[e]=i;}clear(){this.i=0,this.C.length=0;}push(e){this.C.push(e),this.m(this.i),this.i+=1;}pop(){if(this.i===0)return;let e=this.C[0],r=this.C.pop();return this.i-=1,this.i&&(this.C[0]=r,this.k(0,this.i>>1)),e}top(){return this.C[0]}find(e){return this.C.indexOf(e)>=0}remove(e){let r=this.C.indexOf(e);return r<0?!1:(r===0?this.pop():r===this.i-1?(this.C.pop(),this.i-=1):(this.C.splice(r,1,this.C.pop()),this.i-=1,this.m(r),this.k(r,this.i>>1)),!0)}updateItem(e){let r=this.C.indexOf(e);return r<0?!1:(this.m(r),this.k(r,this.i>>1),!0)}toArray(){return [...this.C]}},S1=fa;Un.default=S1;});var qn=M(Nn=>{v();m();_();Object.defineProperty(Nn,\"t\",{value:!0});Nn.default=void 0;var A1=at(),ca=class extends A1.Container{},I1=ca;Nn.default=I1;});var lt=M(ha=>{v();m();_();Object.defineProperty(ha,\"t\",{value:!0});ha.throwIteratorAccessError=T1;function T1(){throw new RangeError(\"Iterator access denied!\")}});var pa=M(jn=>{v();m();_();Object.defineProperty(jn,\"t\",{value:!0});jn.RandomIterator=void 0;var R1=at(),Dn=lt(),da=class extends R1.ContainerIterator{constructor(e,r){super(r),this.o=e,this.iteratorType===0?(this.pre=function(){return this.o===0&&(0, Dn.throwIteratorAccessError)(),this.o-=1,this},this.next=function(){return this.o===this.container.size()&&(0, Dn.throwIteratorAccessError)(),this.o+=1,this}):(this.pre=function(){return this.o===this.container.size()-1&&(0, Dn.throwIteratorAccessError)(),this.o+=1,this},this.next=function(){return this.o===-1&&(0, Dn.throwIteratorAccessError)(),this.o-=1,this});}get pointer(){return this.container.getElementByPos(this.o)}set pointer(e){this.container.setElementByPos(this.o,e);}};jn.RandomIterator=da;});var rp=M(Fn=>{v();m();_();Object.defineProperty(Fn,\"t\",{value:!0});Fn.default=void 0;var C1=P1(qn()),B1=pa();function P1(t){return t&&t.t?t:{default:t}}var wr=class t extends B1.RandomIterator{constructor(e,r,i){super(e,i),this.container=r;}copy(){return new t(this.o,this.container,this.iteratorType)}},ga=class extends C1.default{constructor(e=[],r=!0){if(super(),Array.isArray(e))this.J=r?[...e]:e,this.i=e.length;else {this.J=[];let i=this;e.forEach(function(n){i.pushBack(n);});}}clear(){this.i=0,this.J.length=0;}begin(){return new wr(0,this)}end(){return new wr(this.i,this)}rBegin(){return new wr(this.i-1,this,1)}rEnd(){return new wr(-1,this,1)}front(){return this.J[0]}back(){return this.J[this.i-1]}getElementByPos(e){if(e<0||e>this.i-1)throw new RangeError;return this.J[e]}eraseElementByPos(e){if(e<0||e>this.i-1)throw new RangeError;return this.J.splice(e,1),this.i-=1,this.i}eraseElementByValue(e){let r=0;for(let i=0;ithis.i-1)throw new RangeError;this.J[e]=r;}insert(e,r,i=1){if(e<0||e>this.i)throw new RangeError;return this.J.splice(e,0,...new Array(i).fill(r)),this.i+=i,this.i}find(e){for(let r=0;r{v();m();_();Object.defineProperty(Wn,\"t\",{value:!0});Wn.default=void 0;var k1=M1(qn()),x1=at(),_r=lt();function M1(t){return t&&t.t?t:{default:t}}var mr=class t extends x1.ContainerIterator{constructor(e,r,i,n){super(n),this.o=e,this.h=r,this.container=i,this.iteratorType===0?(this.pre=function(){return this.o.L===this.h&&(0, _r.throwIteratorAccessError)(),this.o=this.o.L,this},this.next=function(){return this.o===this.h&&(0, _r.throwIteratorAccessError)(),this.o=this.o.B,this}):(this.pre=function(){return this.o.B===this.h&&(0, _r.throwIteratorAccessError)(),this.o=this.o.B,this},this.next=function(){return this.o===this.h&&(0, _r.throwIteratorAccessError)(),this.o=this.o.L,this});}get pointer(){return this.o===this.h&&(0, _r.throwIteratorAccessError)(),this.o.l}set pointer(e){this.o===this.h&&(0, _r.throwIteratorAccessError)(),this.o.l=e;}copy(){return new t(this.o,this.h,this.container,this.iteratorType)}},ya=class extends k1.default{constructor(e=[]){super(),this.h={},this.p=this._=this.h.L=this.h.B=this.h;let r=this;e.forEach(function(i){r.pushBack(i);});}V(e){let{L:r,B:i}=e;r.B=i,i.L=r,e===this.p&&(this.p=i),e===this._&&(this._=r),this.i-=1;}G(e,r){let i=r.B,n={l:e,L:r,B:i};r.B=n,i.L=n,r===this.h&&(this.p=n),i===this.h&&(this._=n),this.i+=1;}clear(){this.i=0,this.p=this._=this.h.L=this.h.B=this.h;}begin(){return new mr(this.p,this.h,this)}end(){return new mr(this.h,this.h,this)}rBegin(){return new mr(this._,this.h,this,1)}rEnd(){return new mr(this.h,this.h,this,1)}front(){return this.p.l}back(){return this._.l}getElementByPos(e){if(e<0||e>this.i-1)throw new RangeError;let r=this.p;for(;e--;)r=r.B;return r.l}eraseElementByPos(e){if(e<0||e>this.i-1)throw new RangeError;let r=this.p;for(;e--;)r=r.B;return this.V(r),this.i}eraseElementByValue(e){let r=this.p;for(;r!==this.h;)r.l===e&&this.V(r),r=r.B;return this.i}eraseElementByIterator(e){let r=e.o;return r===this.h&&(0, _r.throwIteratorAccessError)(),e=e.next(),this.V(r),e}pushBack(e){return this.G(e,this._),this.i}popBack(){if(this.i===0)return;let e=this._.l;return this.V(this._),e}pushFront(e){return this.G(e,this.h),this.i}popFront(){if(this.i===0)return;let e=this.p.l;return this.V(this.p),e}setElementByPos(e,r){if(e<0||e>this.i-1)throw new RangeError;let i=this.p;for(;e--;)i=i.B;i.l=r;}insert(e,r,i=1){if(e<0||e>this.i)throw new RangeError;if(i<=0)return this.i;if(e===0)for(;i--;)this.pushFront(r);else if(e===this.i)for(;i--;)this.pushBack(r);else {let n=this.p;for(let s=1;s{v();m();_();Object.defineProperty($n,\"t\",{value:!0});$n.default=void 0;var U1=q1(qn()),N1=pa();function q1(t){return t&&t.t?t:{default:t}}var vr=class t extends N1.RandomIterator{constructor(e,r,i){super(e,i),this.container=r;}copy(){return new t(this.o,this.container,this.iteratorType)}},ba=class extends U1.default{constructor(e=[],r=4096){super(),this.j=0,this.D=0,this.R=0,this.N=0,this.P=0,this.A=[];let i=(()=>{if(typeof e.length==\"number\")return e.length;if(typeof e.size==\"number\")return e.size;if(typeof e.size==\"function\")return e.size();throw new TypeError(\"Cannot get the length or size of the container\")})();this.F=r,this.P=Math.max(Math.ceil(i/this.F),1);for(let s=0;s>1)-(n>>1),this.D=this.N=this.F-i%this.F>>1;let o=this;e.forEach(function(s){o.pushBack(s);});}T(){let e=[],r=Math.max(this.P>>1,1);for(let i=0;i>1;}begin(){return new vr(0,this)}end(){return new vr(this.i,this)}rBegin(){return new vr(this.i-1,this,1)}rEnd(){return new vr(-1,this,1)}front(){if(this.i!==0)return this.A[this.j][this.D]}back(){if(this.i!==0)return this.A[this.R][this.N]}pushBack(e){return this.i&&(this.N0?this.N-=1:this.R>0?(this.R-=1,this.N=this.F-1):(this.R=this.P-1,this.N=this.F-1)),this.i-=1,e}pushFront(e){return this.i&&(this.D>0?this.D-=1:this.j>0?(this.j-=1,this.D=this.F-1):(this.j=this.P-1,this.D=this.F-1),this.j===this.R&&this.D===this.N&&this.T()),this.i+=1,this.A[this.j][this.D]=e,this.i}popFront(){if(this.i===0)return;let e=this.A[this.j][this.D];return this.i!==1&&(this.Dthis.i-1)throw new RangeError;let{curNodeBucketIndex:r,curNodePointerIndex:i}=this.O(e);return this.A[r][i]}setElementByPos(e,r){if(e<0||e>this.i-1)throw new RangeError;let{curNodeBucketIndex:i,curNodePointerIndex:n}=this.O(e);this.A[i][n]=r;}insert(e,r,i=1){if(e<0||e>this.i)throw new RangeError;if(e===0)for(;i--;)this.pushFront(r);else if(e===this.i)for(;i--;)this.pushBack(r);else {let n=[];for(let o=e;othis.i-1)throw new RangeError;if(e===0)this.popFront();else if(e===this.i-1)this.popBack();else {let r=[];for(let n=e+1;ne;)this.popBack();return this.i}sort(e){let r=[];for(let i=0;i{v();m();_();Object.defineProperty(Zr,\"t\",{value:!0});Zr.TreeNodeEnableIndex=Zr.TreeNode=void 0;var Hn=class{constructor(e,r){this.ee=1,this.u=void 0,this.l=void 0,this.U=void 0,this.W=void 0,this.tt=void 0,this.u=e,this.l=r;}L(){let e=this;if(e.ee===1&&e.tt.tt===e)e=e.W;else if(e.U)for(e=e.U;e.W;)e=e.W;else {let r=e.tt;for(;r.U===e;)e=r,r=e.tt;e=r;}return e}B(){let e=this;if(e.W){for(e=e.W;e.U;)e=e.U;return e}else {let r=e.tt;for(;r.W===e;)e=r,r=e.tt;return e.W!==r?r:e}}te(){let e=this.tt,r=this.W,i=r.U;return e.tt===this?e.tt=r:e.U===this?e.U=r:e.W=r,r.tt=e,r.U=this,this.tt=r,this.W=i,i&&(i.tt=this),r}se(){let e=this.tt,r=this.U,i=r.W;return e.tt===this?e.tt=r:e.U===this?e.U=r:e.W=r,r.tt=e,r.W=this,this.tt=r,this.U=i,i&&(i.tt=this),r}};Zr.TreeNode=Hn;var wa=class extends Hn{constructor(){super(...arguments),this.rt=1;}te(){let e=super.te();return this.ie(),e.ie(),e}se(){let e=super.se();return this.ie(),e.ie(),e}ie(){this.rt=1,this.U&&(this.rt+=this.U.rt),this.W&&(this.rt+=this.W.rt);}};Zr.TreeNodeEnableIndex=wa;});var ma=M(Vn=>{v();m();_();Object.defineProperty(Vn,\"t\",{value:!0});Vn.default=void 0;var op=sp(),j1=at(),ap=lt(),_a=class extends j1.Container{constructor(e=function(i,n){return in?1:0},r=!1){super(),this.Y=void 0,this.v=e,r?(this.re=op.TreeNodeEnableIndex,this.M=function(i,n,o){let s=this.ne(i,n,o);if(s){let a=s.tt;for(;a!==this.h;)a.rt+=1,a=a.tt;let u=this.he(s);if(u){let{parentNode:c,grandParent:h,curNode:d}=u;c.ie(),h.ie(),d.ie();}}return this.i},this.V=function(i){let n=this.fe(i);for(;n!==this.h;)n.rt-=1,n=n.tt;}):(this.re=op.TreeNode,this.M=function(i,n,o){let s=this.ne(i,n,o);return s&&this.he(s),this.i},this.V=this.fe),this.h=new this.re;}X(e,r){let i=this.h;for(;e;){let n=this.v(e.u,r);if(n<0)e=e.W;else if(n>0)i=e,e=e.U;else return e}return i}Z(e,r){let i=this.h;for(;e;)this.v(e.u,r)<=0?e=e.W:(i=e,e=e.U);return i}$(e,r){let i=this.h;for(;e;){let n=this.v(e.u,r);if(n<0)i=e,e=e.W;else if(n>0)e=e.U;else return e}return i}rr(e,r){let i=this.h;for(;e;)this.v(e.u,r)<0?(i=e,e=e.W):e=e.U;return i}ue(e){for(;;){let r=e.tt;if(r===this.h)return;if(e.ee===1){e.ee=0;return}if(e===r.U){let i=r.W;if(i.ee===1)i.ee=0,r.ee=1,r===this.Y?this.Y=r.te():r.te();else if(i.W&&i.W.ee===1){i.ee=r.ee,r.ee=0,i.W.ee=0,r===this.Y?this.Y=r.te():r.te();return}else i.U&&i.U.ee===1?(i.ee=1,i.U.ee=0,i.se()):(i.ee=1,e=r);}else {let i=r.U;if(i.ee===1)i.ee=0,r.ee=1,r===this.Y?this.Y=r.se():r.se();else if(i.U&&i.U.ee===1){i.ee=r.ee,r.ee=0,i.U.ee=0,r===this.Y?this.Y=r.se():r.se();return}else i.W&&i.W.ee===1?(i.ee=1,i.W.ee=0,i.te()):(i.ee=1,e=r);}}}fe(e){if(this.i===1)return this.clear(),this.h;let r=e;for(;r.U||r.W;){if(r.W)for(r=r.W;r.U;)r=r.U;else r=r.U;[e.u,r.u]=[r.u,e.u],[e.l,r.l]=[r.l,e.l],e=r;}this.h.U===r?this.h.U=r.tt:this.h.W===r&&(this.h.W=r.tt),this.ue(r);let i=r.tt;return r===i.U?i.U=void 0:i.W=void 0,this.i-=1,this.Y.ee=0,i}oe(e,r){return e===void 0?!1:this.oe(e.U,r)||r(e)?!0:this.oe(e.W,r)}he(e){for(;;){let r=e.tt;if(r.ee===0)return;let i=r.tt;if(r===i.U){let n=i.W;if(n&&n.ee===1){if(n.ee=r.ee=0,i===this.Y)return;i.ee=1,e=i;continue}else if(e===r.W){if(e.ee=0,e.U&&(e.U.tt=r),e.W&&(e.W.tt=i),r.W=e.U,i.U=e.W,e.U=r,e.W=i,i===this.Y)this.Y=e,this.h.tt=e;else {let o=i.tt;o.U===i?o.U=e:o.W=e;}return e.tt=i.tt,r.tt=e,i.tt=e,i.ee=1,{parentNode:r,grandParent:i,curNode:e}}else r.ee=0,i===this.Y?this.Y=i.se():i.se(),i.ee=1;}else {let n=i.U;if(n&&n.ee===1){if(n.ee=r.ee=0,i===this.Y)return;i.ee=1,e=i;continue}else if(e===r.U){if(e.ee=0,e.U&&(e.U.tt=i),e.W&&(e.W.tt=r),i.W=e.U,r.U=e.W,e.U=i,e.W=r,i===this.Y)this.Y=e,this.h.tt=e;else {let o=i.tt;o.U===i?o.U=e:o.W=e;}return e.tt=i.tt,r.tt=e,i.tt=e,i.ee=1,{parentNode:r,grandParent:i,curNode:e}}else r.ee=0,i===this.Y?this.Y=i.te():i.te(),i.ee=1;}return}}ne(e,r,i){if(this.Y===void 0){this.i+=1,this.Y=new this.re(e,r),this.Y.ee=0,this.Y.tt=this.h,this.h.tt=this.Y,this.h.U=this.Y,this.h.W=this.Y;return}let n,o=this.h.U,s=this.v(o.u,e);if(s===0){o.l=r;return}else if(s>0)o.U=new this.re(e,r),o.U.tt=o,n=o.U,this.h.U=n;else {let a=this.h.W,u=this.v(a.u,e);if(u===0){a.l=r;return}else if(u<0)a.W=new this.re(e,r),a.W.tt=a,n=a.W,this.h.W=n;else {if(i!==void 0){let c=i.o;if(c!==this.h){let h=this.v(c.u,e);if(h===0){c.l=r;return}else if(h>0){let d=c.L(),g=this.v(d.u,e);if(g===0){d.l=r;return}else g<0&&(n=new this.re(e,r),d.W===void 0?(d.W=n,n.tt=d):(c.U=n,n.tt=c));}}}if(n===void 0)for(n=this.Y;;){let c=this.v(n.u,e);if(c>0){if(n.U===void 0){n.U=new this.re(e,r),n.U.tt=n,n=n.U;break}n=n.U;}else if(c<0){if(n.W===void 0){n.W=new this.re(e,r),n.W.tt=n,n=n.W;break}n=n.W;}else {n.l=r;return}}}}return this.i+=1,n}I(e,r){for(;e;){let i=this.v(e.u,r);if(i<0)e=e.W;else if(i>0)e=e.U;else return e}return e||this.h}clear(){this.i=0,this.Y=void 0,this.h.tt=void 0,this.h.U=this.h.W=void 0;}updateKeyByIterator(e,r){let i=e.o;if(i===this.h&&(0, ap.throwIteratorAccessError)(),this.i===1)return i.u=r,!0;if(i===this.h.U)return this.v(i.B().u,r)>0?(i.u=r,!0):!1;if(i===this.h.W)return this.v(i.L().u,r)<0?(i.u=r,!0):!1;let n=i.L().u;if(this.v(n,r)>=0)return !1;let o=i.B().u;return this.v(o,r)<=0?!1:(i.u=r,!0)}eraseElementByPos(e){if(e<0||e>this.i-1)throw new RangeError;let r=0,i=this;return this.oe(this.Y,function(n){return e===r?(i.V(n),!0):(r+=1,!1)}),this.i}eraseElementByKey(e){if(this.i===0)return !1;let r=this.I(this.Y,e);return r===this.h?!1:(this.V(r),!0)}eraseElementByIterator(e){let r=e.o;r===this.h&&(0, ap.throwIteratorAccessError)();let i=r.W===void 0;return e.iteratorType===0?i&&e.next():(!i||r.U===void 0)&&e.next(),this.V(r),e}forEach(e){let r=0;for(let i of this)e(i,r++,this);}getElementByPos(e){if(e<0||e>this.i-1)throw new RangeError;let r,i=0;for(let n of this){if(i===e){r=n;break}i+=1;}return r}getHeight(){if(this.i===0)return 0;let e=function(r){return r?Math.max(e(r.U),e(r.W))+1:0};return e(this.Y)}},F1=_a;Vn.default=F1;});var Ea=M(Kn=>{v();m();_();Object.defineProperty(Kn,\"t\",{value:!0});Kn.default=void 0;var W1=at(),zn=lt(),va=class extends W1.ContainerIterator{constructor(e,r,i){super(i),this.o=e,this.h=r,this.iteratorType===0?(this.pre=function(){return this.o===this.h.U&&(0, zn.throwIteratorAccessError)(),this.o=this.o.L(),this},this.next=function(){return this.o===this.h&&(0, zn.throwIteratorAccessError)(),this.o=this.o.B(),this}):(this.pre=function(){return this.o===this.h.W&&(0, zn.throwIteratorAccessError)(),this.o=this.o.B(),this},this.next=function(){return this.o===this.h&&(0, zn.throwIteratorAccessError)(),this.o=this.o.L(),this});}get index(){let e=this.o,r=this.h.tt;if(e===this.h)return r?r.rt-1:0;let i=0;for(e.U&&(i+=e.U.rt);e!==r;){let n=e.tt;e===n.W&&(i+=1,n.U&&(i+=n.U.rt)),e=n;}return i}},$1=va;Kn.default=$1;});var up=M(Gn=>{v();m();_();Object.defineProperty(Gn,\"t\",{value:!0});Gn.default=void 0;var H1=lp(ma()),V1=lp(Ea()),z1=lt();function lp(t){return t&&t.t?t:{default:t}}var Ke=class t extends V1.default{constructor(e,r,i,n){super(e,r,n),this.container=i;}get pointer(){return this.o===this.h&&(0, z1.throwIteratorAccessError)(),this.o.u}copy(){return new t(this.o,this.h,this.container,this.iteratorType)}},Sa=class extends H1.default{constructor(e=[],r,i){super(r,i);let n=this;e.forEach(function(o){n.insert(o);});}*K(e){e!==void 0&&(yield*this.K(e.U),yield e.u,yield*this.K(e.W));}begin(){return new Ke(this.h.U||this.h,this.h,this)}end(){return new Ke(this.h,this.h,this)}rBegin(){return new Ke(this.h.W||this.h,this.h,this,1)}rEnd(){return new Ke(this.h,this.h,this,1)}front(){return this.h.U?this.h.U.u:void 0}back(){return this.h.W?this.h.W.u:void 0}insert(e,r){return this.M(e,void 0,r)}find(e){let r=this.I(this.Y,e);return new Ke(r,this.h,this)}lowerBound(e){let r=this.X(this.Y,e);return new Ke(r,this.h,this)}upperBound(e){let r=this.Z(this.Y,e);return new Ke(r,this.h,this)}reverseLowerBound(e){let r=this.$(this.Y,e);return new Ke(r,this.h,this)}reverseUpperBound(e){let r=this.rr(this.Y,e);return new Ke(r,this.h,this)}union(e){let r=this;return e.forEach(function(i){r.insert(i);}),this.i}[Symbol.iterator](){return this.K(this.Y)}},K1=Sa;Gn.default=K1;});var cp=M(Qn=>{v();m();_();Object.defineProperty(Qn,\"t\",{value:!0});Qn.default=void 0;var G1=fp(ma()),Q1=fp(Ea()),Y1=lt();function fp(t){return t&&t.t?t:{default:t}}var Ge=class t extends Q1.default{constructor(e,r,i,n){super(e,r,n),this.container=i;}get pointer(){this.o===this.h&&(0, Y1.throwIteratorAccessError)();let e=this;return new Proxy([],{get(r,i){if(i===\"0\")return e.o.u;if(i===\"1\")return e.o.l},set(r,i,n){if(i!==\"1\")throw new TypeError(\"props must be 1\");return e.o.l=n,!0}})}copy(){return new t(this.o,this.h,this.container,this.iteratorType)}},Aa=class extends G1.default{constructor(e=[],r,i){super(r,i);let n=this;e.forEach(function(o){n.setElement(o[0],o[1]);});}*K(e){e!==void 0&&(yield*this.K(e.U),yield [e.u,e.l],yield*this.K(e.W));}begin(){return new Ge(this.h.U||this.h,this.h,this)}end(){return new Ge(this.h,this.h,this)}rBegin(){return new Ge(this.h.W||this.h,this.h,this,1)}rEnd(){return new Ge(this.h,this.h,this,1)}front(){if(this.i===0)return;let e=this.h.U;return [e.u,e.l]}back(){if(this.i===0)return;let e=this.h.W;return [e.u,e.l]}lowerBound(e){let r=this.X(this.Y,e);return new Ge(r,this.h,this)}upperBound(e){let r=this.Z(this.Y,e);return new Ge(r,this.h,this)}reverseLowerBound(e){let r=this.$(this.Y,e);return new Ge(r,this.h,this)}reverseUpperBound(e){let r=this.rr(this.Y,e);return new Ge(r,this.h,this)}setElement(e,r,i){return this.M(e,r,i)}find(e){let r=this.I(this.Y,e);return new Ge(r,this.h,this)}getElementByKey(e){return this.I(this.Y,e).l}union(e){let r=this;return e.forEach(function(i){r.setElement(i[0],i[1]);}),this.i}[Symbol.iterator](){return this.K(this.Y)}},J1=Aa;Qn.default=J1;});var Ta=M(Ia=>{v();m();_();Object.defineProperty(Ia,\"t\",{value:!0});Ia.default=X1;function X1(t){let e=typeof t;return e===\"object\"&&t!==null||e===\"function\"}});var Pa=M(ei=>{v();m();_();Object.defineProperty(ei,\"t\",{value:!0});ei.HashContainerIterator=ei.HashContainer=void 0;var hp=at(),Ra=Z1(Ta()),Ti=lt();function Z1(t){return t&&t.t?t:{default:t}}var Ca=class extends hp.ContainerIterator{constructor(e,r,i){super(i),this.o=e,this.h=r,this.iteratorType===0?(this.pre=function(){return this.o.L===this.h&&(0, Ti.throwIteratorAccessError)(),this.o=this.o.L,this},this.next=function(){return this.o===this.h&&(0, Ti.throwIteratorAccessError)(),this.o=this.o.B,this}):(this.pre=function(){return this.o.B===this.h&&(0, Ti.throwIteratorAccessError)(),this.o=this.o.B,this},this.next=function(){return this.o===this.h&&(0, Ti.throwIteratorAccessError)(),this.o=this.o.L,this});}};ei.HashContainerIterator=Ca;var Ba=class extends hp.Container{constructor(){super(),this.H=[],this.g={},this.HASH_TAG=Symbol(\"@@HASH_TAG\"),Object.setPrototypeOf(this.g,null),this.h={},this.h.L=this.h.B=this.p=this._=this.h;}V(e){let{L:r,B:i}=e;r.B=i,i.L=r,e===this.p&&(this.p=i),e===this._&&(this._=r),this.i-=1;}M(e,r,i){i===void 0&&(i=(0, Ra.default)(e));let n;if(i){let o=e[this.HASH_TAG];if(o!==void 0)return this.H[o].l=r,this.i;Object.defineProperty(e,this.HASH_TAG,{value:this.H.length,configurable:!0}),n={u:e,l:r,L:this._,B:this.h},this.H.push(n);}else {let o=this.g[e];if(o)return o.l=r,this.i;n={u:e,l:r,L:this._,B:this.h},this.g[e]=n;}return this.i===0?(this.p=n,this.h.B=n):this._.B=n,this._=n,this.h.L=n,++this.i}I(e,r){if(r===void 0&&(r=(0, Ra.default)(e)),r){let i=e[this.HASH_TAG];return i===void 0?this.h:this.H[i]}else return this.g[e]||this.h}clear(){let e=this.HASH_TAG;this.H.forEach(function(r){delete r.u[e];}),this.H=[],this.g={},Object.setPrototypeOf(this.g,null),this.i=0,this.p=this._=this.h.L=this.h.B=this.h;}eraseElementByKey(e,r){let i;if(r===void 0&&(r=(0, Ra.default)(e)),r){let n=e[this.HASH_TAG];if(n===void 0)return !1;delete e[this.HASH_TAG],i=this.H[n],delete this.H[n];}else {if(i=this.g[e],i===void 0)return !1;delete this.g[e];}return this.V(i),!0}eraseElementByIterator(e){let r=e.o;return r===this.h&&(0, Ti.throwIteratorAccessError)(),this.V(r),e.next()}eraseElementByPos(e){if(e<0||e>this.i-1)throw new RangeError;let r=this.p;for(;e--;)r=r.B;return this.V(r),this.i}};ei.HashContainer=Ba;});var pp=M(Yn=>{v();m();_();Object.defineProperty(Yn,\"t\",{value:!0});Yn.default=void 0;var dp=Pa(),ev=lt(),Er=class t extends dp.HashContainerIterator{constructor(e,r,i,n){super(e,r,n),this.container=i;}get pointer(){return this.o===this.h&&(0, ev.throwIteratorAccessError)(),this.o.u}copy(){return new t(this.o,this.h,this.container,this.iteratorType)}},Oa=class extends dp.HashContainer{constructor(e=[]){super();let r=this;e.forEach(function(i){r.insert(i);});}begin(){return new Er(this.p,this.h,this)}end(){return new Er(this.h,this.h,this)}rBegin(){return new Er(this._,this.h,this,1)}rEnd(){return new Er(this.h,this.h,this,1)}front(){return this.p.u}back(){return this._.u}insert(e,r){return this.M(e,void 0,r)}getElementByPos(e){if(e<0||e>this.i-1)throw new RangeError;let r=this.p;for(;e--;)r=r.B;return r.u}find(e,r){let i=this.I(e,r);return new Er(i,this.h,this)}forEach(e){let r=0,i=this.p;for(;i!==this.h;)e(i.u,r++,this),i=i.B;}[Symbol.iterator](){return function*(){let e=this.p;for(;e!==this.h;)yield e.u,e=e.B;}.bind(this)()}},tv=Oa;Yn.default=tv;});var yp=M(Jn=>{v();m();_();Object.defineProperty(Jn,\"t\",{value:!0});Jn.default=void 0;var gp=Pa(),rv=nv(Ta()),iv=lt();function nv(t){return t&&t.t?t:{default:t}}var Sr=class t extends gp.HashContainerIterator{constructor(e,r,i,n){super(e,r,n),this.container=i;}get pointer(){this.o===this.h&&(0, iv.throwIteratorAccessError)();let e=this;return new Proxy([],{get(r,i){if(i===\"0\")return e.o.u;if(i===\"1\")return e.o.l},set(r,i,n){if(i!==\"1\")throw new TypeError(\"props must be 1\");return e.o.l=n,!0}})}copy(){return new t(this.o,this.h,this.container,this.iteratorType)}},ka=class extends gp.HashContainer{constructor(e=[]){super();let r=this;e.forEach(function(i){r.setElement(i[0],i[1]);});}begin(){return new Sr(this.p,this.h,this)}end(){return new Sr(this.h,this.h,this)}rBegin(){return new Sr(this._,this.h,this,1)}rEnd(){return new Sr(this.h,this.h,this,1)}front(){if(this.i!==0)return [this.p.u,this.p.l]}back(){if(this.i!==0)return [this._.u,this._.l]}setElement(e,r,i){return this.M(e,r,i)}getElementByKey(e,r){if(r===void 0&&(r=(0, rv.default)(e)),r){let n=e[this.HASH_TAG];return n!==void 0?this.H[n].l:void 0}let i=this.g[e];return i?i.l:void 0}getElementByPos(e){if(e<0||e>this.i-1)throw new RangeError;let r=this.p;for(;e--;)r=r.B;return [r.u,r.l]}find(e,r){let i=this.I(e,r);return new Sr(i,this.h,this)}forEach(e){let r=0,i=this.p;for(;i!==this.h;)e([i.u,i.l],r++,this),i=i.B;}[Symbol.iterator](){return function*(){let e=this.p;for(;e!==this.h;)yield [e.u,e.l],e=e.B;}.bind(this)()}},sv=ka;Jn.default=sv;});var bp=M(je=>{v();m();_();Object.defineProperty(je,\"t\",{value:!0});Object.defineProperty(je,\"Deque\",{enumerable:!0,get:function(){return cv.default}});Object.defineProperty(je,\"HashMap\",{enumerable:!0,get:function(){return gv.default}});Object.defineProperty(je,\"HashSet\",{enumerable:!0,get:function(){return pv.default}});Object.defineProperty(je,\"LinkList\",{enumerable:!0,get:function(){return fv.default}});Object.defineProperty(je,\"OrderedMap\",{enumerable:!0,get:function(){return dv.default}});Object.defineProperty(je,\"OrderedSet\",{enumerable:!0,get:function(){return hv.default}});Object.defineProperty(je,\"PriorityQueue\",{enumerable:!0,get:function(){return lv.default}});Object.defineProperty(je,\"Queue\",{enumerable:!0,get:function(){return av.default}});Object.defineProperty(je,\"Stack\",{enumerable:!0,get:function(){return ov.default}});Object.defineProperty(je,\"Vector\",{enumerable:!0,get:function(){return uv.default}});var ov=ut(Zd()),av=ut(ep()),lv=ut(tp()),uv=ut(rp()),fv=ut(ip()),cv=ut(np()),hv=ut(up()),dv=ut(cp()),pv=ut(pp()),gv=ut(yp());function ut(t){return t&&t.t?t:{default:t}}});var _p=M((mN,wp)=>{v();m();_();var yv=bp().OrderedSet,ft=ot()(\"number-allocator:trace\"),bv=ot()(\"number-allocator:error\");function Te(t,e){this.low=t,this.high=e;}Te.prototype.equals=function(t){return this.low===t.low&&this.high===t.high};Te.prototype.compare=function(t){return this.lowr.compare(i)),ft(\"Create\"),this.clear();}ct.prototype.firstVacant=function(){return this.ss.size()===0?null:this.ss.front().low};ct.prototype.alloc=function(){if(this.ss.size()===0)return ft(\"alloc():empty\"),null;let t=this.ss.begin(),e=t.pointer.low,r=t.pointer.high,i=e;return i+1<=r?this.ss.updateKeyByIterator(t,new Te(e+1,r)):this.ss.eraseElementByPos(0),ft(\"alloc():\"+i),i};ct.prototype.use=function(t){let e=new Te(t,t),r=this.ss.lowerBound(e);if(!r.equals(this.ss.end())){let i=r.pointer.low,n=r.pointer.high;return r.pointer.equals(e)?(this.ss.eraseElementByIterator(r),ft(\"use():\"+t),!0):i>t?!1:i===t?(this.ss.updateKeyByIterator(r,new Te(i+1,n)),ft(\"use():\"+t),!0):n===t?(this.ss.updateKeyByIterator(r,new Te(i,n-1)),ft(\"use():\"+t),!0):(this.ss.updateKeyByIterator(r,new Te(t+1,n)),this.ss.insert(new Te(i,t-1)),ft(\"use():\"+t),!0)}return ft(\"use():failed\"),!1};ct.prototype.free=function(t){if(tthis.max){bv(\"free():\"+t+\" is out of range\");return}let e=new Te(t,t),r=this.ss.upperBound(e);if(r.equals(this.ss.end())){if(r.equals(this.ss.begin())){this.ss.insert(e);return}r.pre();let i=r.pointer.high;r.pointer.high+1===t?this.ss.updateKeyByIterator(r,new Te(i,t)):this.ss.insert(e);}else if(r.equals(this.ss.begin()))if(t+1===r.pointer.low){let i=r.pointer.high;this.ss.updateKeyByIterator(r,new Te(t,i));}else this.ss.insert(e);else {let i=r.pointer.low,n=r.pointer.high;r.pre();let o=r.pointer.low;r.pointer.high+1===t?t+1===i?(this.ss.eraseElementByIterator(r),this.ss.updateKeyByIterator(r,new Te(o,n))):this.ss.updateKeyByIterator(r,new Te(o,t)):t+1===i?(this.ss.eraseElementByIterator(r.next()),this.ss.insert(new Te(t,n))):this.ss.insert(e);}ft(\"free():\"+t);};ct.prototype.clear=function(){ft(\"clear()\"),this.ss.clear(),this.ss.insert(new Te(this.min,this.max));};ct.prototype.intervalCount=function(){return this.ss.size()};ct.prototype.dump=function(){console.log(\"length:\"+this.ss.size());for(let t of this.ss)console.log(t);};wp.exports=ct;});var xa=M((PN,mp)=>{v();m();_();var wv=_p();mp.exports.NumberAllocator=wv;});var vp=M(La=>{v();m();_();Object.defineProperty(La,\"__esModule\",{value:!0});var _v=Xd(),mv=xa(),Ma=class{constructor(e){e>0&&(this.aliasToTopic=new _v.LRUCache({max:e}),this.topicToAlias={},this.numberAllocator=new mv.NumberAllocator(1,e),this.max=e,this.length=0);}put(e,r){if(r===0||r>this.max)return !1;let i=this.aliasToTopic.get(r);return i&&delete this.topicToAlias[i],this.aliasToTopic.set(r,e),this.topicToAlias[e]=r,this.numberAllocator.use(r),this.length=this.aliasToTopic.size,!0}getTopicByAlias(e){return this.aliasToTopic.get(e)}getAliasByTopic(e){let r=this.topicToAlias[e];return typeof r<\"u\"&&this.aliasToTopic.get(r),r}clear(){this.aliasToTopic.clear(),this.topicToAlias={},this.numberAllocator.clear(),this.length=0;}getLruAlias(){let e=this.numberAllocator.firstVacant();return e||[...this.aliasToTopic.keys()][this.aliasToTopic.size-1]}};La.default=Ma;});var Ep=M(Ri=>{v();m();_();var vv=Ri&&Ri.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Ri,\"__esModule\",{value:!0});var Ev=Ai(),Sv=vv(vp()),Av=Jr(),Iv=(t,e)=>{t.log(\"_handleConnack\");let{options:r}=t,n=r.protocolVersion===5?e.reasonCode:e.returnCode;if(clearTimeout(t.connackTimer),delete t.topicAliasSend,e.properties){if(e.properties.topicAliasMaximum){if(e.properties.topicAliasMaximum>65535){t.emit(\"error\",new Error(\"topicAliasMaximum from broker is out of range\"));return}e.properties.topicAliasMaximum>0&&(t.topicAliasSend=new Sv.default(e.properties.topicAliasMaximum));}e.properties.serverKeepAlive&&r.keepalive&&(r.keepalive=e.properties.serverKeepAlive,t._shiftPingInterval()),e.properties.maximumPacketSize&&(r.properties||(r.properties={}),r.properties.maximumPacketSize=e.properties.maximumPacketSize);}if(n===0)t.reconnecting=!1,t._onConnect(e);else if(n>0){let o=new Av.ErrorWithReasonCode(`Connection refused: ${Ev.ReasonCodes[n]}`,n);t.emit(\"error\",o);}};Ri.default=Iv;});var Sp=M(Ua=>{v();m();_();Object.defineProperty(Ua,\"__esModule\",{value:!0});var Tv=(t,e,r)=>{t.log(\"handling pubrel packet\");let i=typeof r<\"u\"?r:t.noop,{messageId:n}=e,o={cmd:\"pubcomp\",messageId:n};t.incomingStore.get(e,(s,a)=>{s?t._sendPacket(o,i):(t.emit(\"message\",a.topic,a.payload,a),t.handleMessage(a,u=>{if(u)return i(u);t.incomingStore.del(a,t.noop),t._sendPacket(o,i);}));});};Ua.default=Tv;});var Ap=M(Ci=>{v();m();_();var Bi=Ci&&Ci.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Ci,\"__esModule\",{value:!0});var Rv=Bi(Vd()),Cv=Bi(Kd()),Bv=Bi(Ep()),Pv=Bi(Ai()),Ov=Bi(Sp()),kv=(t,e,r)=>{let{options:i}=t;if(i.protocolVersion===5&&i.properties&&i.properties.maximumPacketSize&&i.properties.maximumPacketSize{v();m();_();var xv=ti&&ti.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(ti,\"__esModule\",{value:!0});ti.TypedEventEmitter=void 0;var Mv=xv((ir(),X(rr))),Lv=Jr(),Xn=class{};ti.TypedEventEmitter=Xn;(0, Lv.applyMixin)(Xn,Mv.default);});var Pi=M(Ar=>{v();m();_();Object.defineProperty(Ar,\"__esModule\",{value:!0});Ar.isReactNativeBrowser=Ar.isWebWorker=void 0;var Uv=()=>typeof window<\"u\"&&typeof window.document<\"u\",Tp=()=>{var t,e;return !!(typeof self==\"object\"&&(!((e=(t=self?.constructor)===null||t===void 0?void 0:t.name)===null||e===void 0)&&e.includes(\"WorkerGlobalScope\")))},Rp=()=>typeof B<\"u\"&&B.product===\"ReactNative\",Nv=Uv()||Tp()||Rp();Ar.isWebWorker=Tp();Ar.isReactNativeBrowser=Rp();Ar.default=Nv;});var Bp=M((Zn,Cp)=>{v();m();_();(function(t,e){typeof Zn==\"object\"&&typeof Cp<\"u\"?e(Zn):typeof define==\"function\"&&define.amd?define([\"exports\"],e):(t=typeof globalThis<\"u\"?globalThis:t||self,e(t.fastUniqueNumbers={}));})(Zn,function(t){var e=function(g){return function(y){var w=g(y);return y.add(w),w}},r=function(g){return function(y,w){return g.set(y,w),w}},i=Number.MAX_SAFE_INTEGER===void 0?9007199254740991:Number.MAX_SAFE_INTEGER,n=536870912,o=n*2,s=function(g,y){return function(w){var E=y.get(w),S=E===void 0?w.size:Ei)throw new Error(\"Congratulations, you created a collection of unique numbers which uses all available integers!\");for(;w.has(S);)S=Math.floor(Math.random()*i);return g(w,S)}},a=new WeakMap,u=r(a),c=s(u,a),h=e(c);t.addUniqueNumber=h,t.generateUniqueNumber=c;});});var Op=M((es,Pp)=>{v();m();_();(function(t,e){typeof es==\"object\"&&typeof Pp<\"u\"?e(es,Bp()):typeof define==\"function\"&&define.amd?define([\"exports\",\"fast-unique-numbers\"],e):(t=typeof globalThis<\"u\"?globalThis:t||self,e(t.workerTimersBroker={},t.fastUniqueNumbers));})(es,function(t,e){var r=function(s){return s.method!==void 0&&s.method===\"call\"},i=function(s){return s.error===null&&typeof s.id==\"number\"},n=function(s){var a=new Map([[0,function(){}]]),u=new Map([[0,function(){}]]),c=new Map,h=new Worker(s);h.addEventListener(\"message\",function(E){var S=E.data;if(r(S)){var I=S.params,C=I.timerId,R=I.timerType;if(R===\"interval\"){var U=a.get(C);if(typeof U==\"number\"){var N=c.get(U);if(N===void 0||N.timerId!==C||N.timerType!==R)throw new Error(\"The timer is in an undefined state.\")}else if(typeof U<\"u\")U();else throw new Error(\"The timer is in an undefined state.\")}else if(R===\"timeout\"){var W=u.get(C);if(typeof W==\"number\"){var K=c.get(W);if(K===void 0||K.timerId!==C||K.timerType!==R)throw new Error(\"The timer is in an undefined state.\")}else if(typeof W<\"u\")W(),u.delete(C);else throw new Error(\"The timer is in an undefined state.\")}}else if(i(S)){var z=S.id,Q=c.get(z);if(Q===void 0)throw new Error(\"The timer is in an undefined state.\");var de=Q.timerId,Gt=Q.timerType;c.delete(z),Gt===\"interval\"?a.delete(de):u.delete(de);}else {var pe=S.error.message;throw new Error(pe)}});var d=function(S){var I=e.generateUniqueNumber(c);c.set(I,{timerId:S,timerType:\"interval\"}),a.set(S,I),h.postMessage({id:I,method:\"clear\",params:{timerId:S,timerType:\"interval\"}});},g=function(S){var I=e.generateUniqueNumber(c);c.set(I,{timerId:S,timerType:\"timeout\"}),u.set(S,I),h.postMessage({id:I,method:\"clear\",params:{timerId:S,timerType:\"timeout\"}});},y=function(S){var I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,C=e.generateUniqueNumber(a);return a.set(C,function(){S(),typeof a.get(C)==\"function\"&&h.postMessage({id:null,method:\"set\",params:{delay:I,now:performance.now(),timerId:C,timerType:\"interval\"}});}),h.postMessage({id:null,method:\"set\",params:{delay:I,now:performance.now(),timerId:C,timerType:\"interval\"}}),C},w=function(S){var I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,C=e.generateUniqueNumber(u);return u.set(C,S),h.postMessage({id:null,method:\"set\",params:{delay:I,now:performance.now(),timerId:C,timerType:\"timeout\"}}),C};return {clearInterval:d,clearTimeout:g,setInterval:y,setTimeout:w}};t.load=n;});});var xp=M((ts,kp)=>{v();m();_();(function(t,e){typeof ts==\"object\"&&typeof kp<\"u\"?e(ts,Op()):typeof define==\"function\"&&define.amd?define([\"exports\",\"worker-timers-broker\"],e):(t=typeof globalThis<\"u\"?globalThis:t||self,e(t.workerTimers={},t.workerTimersBroker));})(ts,function(t,e){var r=function(h,d){var g=null;return function(){if(g!==null)return g;var y=new Blob([d],{type:\"application/javascript; charset=utf-8\"}),w=URL.createObjectURL(y);return g=h(w),setTimeout(function(){return URL.revokeObjectURL(w)}),g}},i=`(()=>{var e={472:(e,t,r)=>{var o,i;void 0===(i=\"function\"==typeof(o=function(){\"use strict\";var e=new Map,t=new Map,r=function(t){var r=e.get(t);if(void 0===r)throw new Error('There is no interval scheduled with the given id \"'.concat(t,'\".'));clearTimeout(r),e.delete(t)},o=function(e){var r=t.get(e);if(void 0===r)throw new Error('There is no timeout scheduled with the given id \"'.concat(e,'\".'));clearTimeout(r),t.delete(e)},i=function(e,t){var r,o=performance.now();return{expected:o+(r=e-Math.max(0,o-t)),remainingDelay:r}},n=function e(t,r,o,i){var n=performance.now();n>o?postMessage({id:null,method:\"call\",params:{timerId:r,timerType:i}}):t.set(r,setTimeout(e,o-n,t,r,o,i))},a=function(t,r,o){var a=i(t,o),s=a.expected,d=a.remainingDelay;e.set(r,setTimeout(n,d,e,r,s,\"interval\"))},s=function(e,r,o){var a=i(e,o),s=a.expected,d=a.remainingDelay;t.set(r,setTimeout(n,d,t,r,s,\"timeout\"))};addEventListener(\"message\",(function(e){var t=e.data;try{if(\"clear\"===t.method){var i=t.id,n=t.params,d=n.timerId,c=n.timerType;if(\"interval\"===c)r(d),postMessage({error:null,id:i});else{if(\"timeout\"!==c)throw new Error('The given type \"'.concat(c,'\" is not supported'));o(d),postMessage({error:null,id:i})}}else{if(\"set\"!==t.method)throw new Error('The given method \"'.concat(t.method,'\" is not supported'));var u=t.params,l=u.delay,p=u.now,m=u.timerId,v=u.timerType;if(\"interval\"===v)a(l,m,p);else{if(\"timeout\"!==v)throw new Error('The given type \"'.concat(v,'\" is not supported'));s(l,m,p)}}}catch(e){postMessage({error:{message:e.message},id:t.id,result:null})}}))})?o.call(t,r,t,e):o)||(e.exports=i)}},t={};function r(o){var i=t[o];if(void 0!==i)return i.exports;var n=t[o]={exports:{}};return e[o](n,n.exports,r),n.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var o in t)r.o(t,o)&&!r.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{\"use strict\";r(472)})()})();`,n=r(e.load,i),o=function(h){return n().clearInterval(h)},s=function(h){return n().clearTimeout(h)},a=function(){var h;return (h=n()).setInterval.apply(h,arguments)},u=function(){var h;return (h=n()).setTimeout.apply(h,arguments)};t.clearInterval=o,t.clearTimeout=s,t.setInterval=a,t.setTimeout=u;});});var Np=M(Rt=>{v();m();_();var qv=Rt&&Rt.__createBinding||(Object.create?function(t,e,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(e,r);(!n||(\"get\"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,i,n);}:function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r];}),Dv=Rt&&Rt.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,\"default\",{enumerable:!0,value:e});}:function(t,e){t.default=e;}),jv=Rt&&Rt.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!==\"default\"&&Object.prototype.hasOwnProperty.call(t,r)&&qv(e,t,r);return Dv(e,t),e};Object.defineProperty(Rt,\"__esModule\",{value:!0});var Na=jv(Pi()),Mp=xp(),Lp={set:Mp.setTimeout,clear:Mp.clearTimeout},Up={set:(t,e)=>setTimeout(t,e),clear:t=>clearTimeout(t)},Fv=t=>{switch(t){case\"native\":return Up;case\"worker\":return Lp;case\"auto\":default:return Na.default&&!Na.isWebWorker&&!Na.isReactNativeBrowser?Lp:Up}};Rt.default=Fv;});var Da=M(Oi=>{v();m();_();var Wv=Oi&&Oi.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Oi,\"__esModule\",{value:!0});var $v=Wv(Np()),qa=class{constructor(e,r,i){this.keepalive=e*1e3,this.checkPing=r,this.timer=(0, $v.default)(i),this.reschedule();}clear(){this.timerId&&(this.timer.clear(this.timerId),this.timerId=null);}reschedule(){this.clear(),this.timerId=this.timer.set(()=>{this.checkPing(),this.timerId&&this.reschedule();},this.keepalive);}};Oi.default=qa;});var ns=M(Qe=>{v();m();_();var Hv=Qe&&Qe.__createBinding||(Object.create?function(t,e,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(e,r);(!n||(\"get\"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,i,n);}:function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r];}),Vv=Qe&&Qe.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,\"default\",{enumerable:!0,value:e});}:function(t,e){t.default=e;}),Wp=Qe&&Qe.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!==\"default\"&&Object.prototype.hasOwnProperty.call(t,r)&&Hv(e,t,r);return Vv(e,t),e},Vt=Qe&&Qe.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Qe,\"__esModule\",{value:!0});var zv=Vt(Gu()),ja=Vt(Nd()),Kv=Vt(Yo()),Gv=Dt(),qp=Vt(Fd()),Dp=Wp($d()),Qv=Vt(ot()),rs=Vt(Zo()),Yv=Vt(Ap()),Wa=Jr(),Jv=Ip(),Xv=Vt(Da()),jp=Wp(Pi()),Fa=globalThis.setImmediate||((...t)=>{let e=t.shift();(0, Wa.nextTick)(()=>{e(...t);});}),Fp={keepalive:60,reschedulePings:!0,protocolId:\"MQTT\",protocolVersion:4,reconnectPeriod:1e3,connectTimeout:30*1e3,clean:!0,resubscribe:!0,writeCache:!0,timerVariant:\"auto\"},is=class t extends Jv.TypedEventEmitter{static defaultId(){return `mqttjs_${Math.random().toString(16).substr(2,8)}`}constructor(e,r){super(),this.options=r||{};for(let i in Fp)typeof this.options[i]>\"u\"?this.options[i]=Fp[i]:this.options[i]=r[i];this.log=this.options.log||(0, Qv.default)(\"mqttjs:client\"),this.noop=this._noop.bind(this),this.log(\"MqttClient :: version:\",t.VERSION),jp.isWebWorker?this.log(\"MqttClient :: environment\",\"webworker\"):this.log(\"MqttClient :: environment\",jp.default?\"browser\":\"node\"),this.log(\"MqttClient :: options.protocol\",r.protocol),this.log(\"MqttClient :: options.protocolVersion\",r.protocolVersion),this.log(\"MqttClient :: options.username\",r.username),this.log(\"MqttClient :: options.keepalive\",r.keepalive),this.log(\"MqttClient :: options.reconnectPeriod\",r.reconnectPeriod),this.log(\"MqttClient :: options.rejectUnauthorized\",r.rejectUnauthorized),this.log(\"MqttClient :: options.properties.topicAliasMaximum\",r.properties?r.properties.topicAliasMaximum:void 0),this.options.clientId=typeof r.clientId==\"string\"?r.clientId:t.defaultId(),this.log(\"MqttClient :: clientId\",this.options.clientId),this.options.customHandleAcks=r.protocolVersion===5&&r.customHandleAcks?r.customHandleAcks:(...i)=>{i[3](null,0);},this.options.writeCache||(ja.default.writeToStream.cacheNumbers=!1),this.streamBuilder=e,this.messageIdProvider=typeof this.options.messageIdProvider>\"u\"?new Kv.default:this.options.messageIdProvider,this.outgoingStore=r.outgoingStore||new rs.default,this.incomingStore=r.incomingStore||new rs.default,this.queueQoSZero=r.queueQoSZero===void 0?!0:r.queueQoSZero,this._resubscribeTopics={},this.messageIdToTopic={},this.pingTimer=null,this.connected=!1,this.disconnecting=!1,this.reconnecting=!1,this.queue=[],this.connackTimer=null,this.reconnectTimer=null,this._storeProcessing=!1,this._packetIdsDuringStoreProcessing={},this._storeProcessingQueue=[],this.outgoing={},this._firstConnection=!0,r.properties&&r.properties.topicAliasMaximum>0&&(r.properties.topicAliasMaximum>65535?this.log(\"MqttClient :: options.properties.topicAliasMaximum is out of range\"):this.topicAliasRecv=new zv.default(r.properties.topicAliasMaximum)),this.on(\"connect\",()=>{let{queue:i}=this,n=()=>{let o=i.shift();this.log(\"deliver :: entry %o\",o);let s=null;if(!o){this._resubscribe();return}s=o.packet,this.log(\"deliver :: call _sendPacket for %o\",s);let a=!0;s.messageId&&s.messageId!==0&&(this.messageIdProvider.register(s.messageId)||(a=!1)),a?this._sendPacket(s,u=>{o.cb&&o.cb(u),n();}):(this.log(\"messageId: %d has already used. The message is skipped and removed.\",s.messageId),n());};this.log(\"connect :: sending queued packets\"),n();}),this.on(\"close\",()=>{this.log(\"close :: connected set to `false`\"),this.connected=!1,this.log(\"close :: clearing connackTimer\"),clearTimeout(this.connackTimer),this.log(\"close :: clearing ping timer\"),this.pingTimer&&(this.pingTimer.clear(),this.pingTimer=null),this.topicAliasRecv&&this.topicAliasRecv.clear(),this.log(\"close :: calling _setupReconnect\"),this._setupReconnect();}),this.options.manualConnect||(this.log(\"MqttClient :: setting up stream\"),this.connect());}handleAuth(e,r){r();}handleMessage(e,r){r();}_nextId(){return this.messageIdProvider.allocate()}getLastMessageId(){return this.messageIdProvider.getLastAllocated()}connect(){var e;let r=new Gv.Writable,i=ja.default.parser(this.options),n=null,o=[];this.log(\"connect :: calling method to clear reconnect\"),this._clearReconnect(),this.log(\"connect :: using streamBuilder provided to client to create stream\"),this.stream=this.streamBuilder(this),i.on(\"packet\",h=>{this.log(\"parser :: on packet push to packets array.\"),o.push(h);});let s=()=>{this.log(\"work :: getting next packet in queue\");let h=o.shift();if(h)this.log(\"work :: packet pulled from queue\"),(0, Yv.default)(this,h,a);else {this.log(\"work :: no packets in queue\");let d=n;n=null,this.log(\"work :: done flag is %s\",!!d),d&&d();}},a=()=>{if(o.length)(0, Wa.nextTick)(s);else {let h=n;n=null,h();}};r._write=(h,d,g)=>{n=g,this.log(\"writable stream :: parsing buffer\"),i.parse(h),s();};let u=h=>{this.log(\"streamErrorHandler :: error\",h.message),h.code?(this.log(\"streamErrorHandler :: emitting error\"),this.emit(\"error\",h)):this.noop(h);};this.log(\"connect :: pipe stream to writable stream\"),this.stream.pipe(r),this.stream.on(\"error\",u),this.stream.on(\"close\",()=>{this.log(\"(%s)stream :: on close\",this.options.clientId),this._flushVolatile(),this.log(\"stream: emit close to MqttClient\"),this.emit(\"close\");}),this.log(\"connect: sending packet `connect`\");let c={cmd:\"connect\",protocolId:this.options.protocolId,protocolVersion:this.options.protocolVersion,clean:this.options.clean,clientId:this.options.clientId,keepalive:this.options.keepalive,username:this.options.username,password:this.options.password,properties:this.options.properties};if(this.options.will&&(c.will=Object.assign(Object.assign({},this.options.will),{payload:(e=this.options.will)===null||e===void 0?void 0:e.payload})),this.topicAliasRecv&&(c.properties||(c.properties={}),this.topicAliasRecv&&(c.properties.topicAliasMaximum=this.topicAliasRecv.max)),this._writePacket(c),i.on(\"error\",this.emit.bind(this,\"error\")),this.options.properties){if(!this.options.properties.authenticationMethod&&this.options.properties.authenticationData)return this.end(()=>this.emit(\"error\",new Error(\"Packet has no Authentication Method\"))),this;if(this.options.properties.authenticationMethod&&this.options.authPacket&&typeof this.options.authPacket==\"object\"){let h=Object.assign({cmd:\"auth\",reasonCode:0},this.options.authPacket);this._writePacket(h);}}return this.stream.setMaxListeners(1e3),clearTimeout(this.connackTimer),this.connackTimer=setTimeout(()=>{this.log(\"!!connectTimeout hit!! Calling _cleanUp with force `true`\"),this.emit(\"error\",new Error(\"connack timeout\")),this._cleanUp(!0);},this.options.connectTimeout),this}publish(e,r,i,n){this.log(\"publish :: message `%s` to topic `%s`\",r,e);let{options:o}=this;typeof i==\"function\"&&(n=i,i=null),i=i||{},i=Object.assign(Object.assign({},{qos:0,retain:!1,dup:!1}),i);let{qos:a,retain:u,dup:c,properties:h,cbStorePut:d}=i;if(this._checkDisconnecting(n))return this;let g=()=>{let y=0;if((a===1||a===2)&&(y=this._nextId(),y===null))return this.log(\"No messageId left\"),!1;let w={cmd:\"publish\",topic:e,payload:r,qos:a,retain:u,messageId:y,dup:c};switch(o.protocolVersion===5&&(w.properties=h),this.log(\"publish :: qos\",a),a){case 1:case 2:this.outgoing[w.messageId]={volatile:!1,cb:n||this.noop},this.log(\"MqttClient:publish: packet cmd: %s\",w.cmd),this._sendPacket(w,void 0,d);break;default:this.log(\"MqttClient:publish: packet cmd: %s\",w.cmd),this._sendPacket(w,n,d);break}return !0};return (this._storeProcessing||this._storeProcessingQueue.length>0||!g())&&this._storeProcessingQueue.push({invoke:g,cbStorePut:i.cbStorePut,callback:n}),this}publishAsync(e,r,i){return new Promise((n,o)=>{this.publish(e,r,i,(s,a)=>{s?o(s):n(a);});})}subscribe(e,r,i){let n=this.options.protocolVersion;typeof r==\"function\"&&(i=r),i=i||this.noop;let o=!1,s=[];typeof e==\"string\"?(e=[e],s=e):Array.isArray(e)?s=e:typeof e==\"object\"&&(o=e.resubscribe,delete e.resubscribe,s=Object.keys(e));let a=Dp.validateTopics(s);if(a!==null)return Fa(i,new Error(`Invalid topic ${a}`)),this;if(this._checkDisconnecting(i))return this.log(\"subscribe: discconecting true\"),this;let u={qos:0};n===5&&(u.nl=!1,u.rap=!1,u.rh=0),r=Object.assign(Object.assign({},u),r);let c=r.properties,h=[],d=(y,w)=>{if(w=w||r,!Object.prototype.hasOwnProperty.call(this._resubscribeTopics,y)||this._resubscribeTopics[y].qos{this.log(\"subscribe: array topic %s\",y),d(y);}):Object.keys(e).forEach(y=>{this.log(\"subscribe: object topic %s, %o\",y,e[y]),d(y,e[y]);}),!h.length)return i(null,[]),this;let g=()=>{let y=this._nextId();if(y===null)return this.log(\"No messageId left\"),!1;let w={cmd:\"subscribe\",subscriptions:h,messageId:y};if(c&&(w.properties=c),this.options.resubscribe){this.log(\"subscribe :: resubscribe true\");let E=[];h.forEach(S=>{if(this.options.reconnectPeriod>0){let I={qos:S.qos};n===5&&(I.nl=S.nl||!1,I.rap=S.rap||!1,I.rh=S.rh||0,I.properties=S.properties),this._resubscribeTopics[S.topic]=I,E.push(S.topic);}}),this.messageIdToTopic[w.messageId]=E;}return this.outgoing[w.messageId]={volatile:!0,cb(E,S){if(!E){let{granted:I}=S;for(let C=0;C0||!g())&&this._storeProcessingQueue.push({invoke:g,callback:i}),this}subscribeAsync(e,r){return new Promise((i,n)=>{this.subscribe(e,r,(o,s)=>{o?n(o):i(s);});})}unsubscribe(e,r,i){typeof e==\"string\"&&(e=[e]),typeof r==\"function\"&&(i=r),i=i||this.noop;let n=Dp.validateTopics(e);if(n!==null)return Fa(i,new Error(`Invalid topic ${n}`)),this;if(this._checkDisconnecting(i))return this;let o=()=>{let s=this._nextId();if(s===null)return this.log(\"No messageId left\"),!1;let a={cmd:\"unsubscribe\",messageId:s,unsubscriptions:[]};return typeof e==\"string\"?a.unsubscriptions=[e]:Array.isArray(e)&&(a.unsubscriptions=e),this.options.resubscribe&&a.unsubscriptions.forEach(u=>{delete this._resubscribeTopics[u];}),typeof r==\"object\"&&r.properties&&(a.properties=r.properties),this.outgoing[a.messageId]={volatile:!0,cb:i},this.log(\"unsubscribe: call _sendPacket\"),this._sendPacket(a),!0};return (this._storeProcessing||this._storeProcessingQueue.length>0||!o())&&this._storeProcessingQueue.push({invoke:o,callback:i}),this}unsubscribeAsync(e,r){return new Promise((i,n)=>{this.unsubscribe(e,r,(o,s)=>{o?n(o):i(s);});})}end(e,r,i){this.log(\"end :: (%s)\",this.options.clientId),(e==null||typeof e!=\"boolean\")&&(i=i||r,r=e,e=!1),typeof r!=\"object\"&&(i=i||r,r=null),this.log(\"end :: cb? %s\",!!i),(!i||typeof i!=\"function\")&&(i=this.noop);let n=()=>{this.log(\"end :: closeStores: closing incoming and outgoing stores\"),this.disconnected=!0,this.incomingStore.close(s=>{this.outgoingStore.close(a=>{if(this.log(\"end :: closeStores: emitting end\"),this.emit(\"end\"),i){let u=s||a;this.log(\"end :: closeStores: invoking callback with args\"),i(u);}});}),this._deferredReconnect&&this._deferredReconnect();},o=()=>{this.log(\"end :: (%s) :: finish :: calling _cleanUp with force %s\",this.options.clientId,e),this._cleanUp(e,()=>{this.log(\"end :: finish :: calling process.nextTick on closeStores\"),(0, Wa.nextTick)(n);},r);};return this.disconnecting?(i(),this):(this._clearReconnect(),this.disconnecting=!0,!e&&Object.keys(this.outgoing).length>0?(this.log(\"end :: (%s) :: calling finish in 10ms once outgoing is empty\",this.options.clientId),this.once(\"outgoingEmpty\",setTimeout.bind(null,o,10))):(this.log(\"end :: (%s) :: immediately calling finish\",this.options.clientId),o()),this)}endAsync(e,r){return new Promise((i,n)=>{this.end(e,r,o=>{o?n(o):i();});})}removeOutgoingMessage(e){if(this.outgoing[e]){let{cb:r}=this.outgoing[e];this._removeOutgoingAndStoreMessage(e,()=>{r(new Error(\"Message removed\"));});}return this}reconnect(e){this.log(\"client reconnect\");let r=()=>{e?(this.options.incomingStore=e.incomingStore,this.options.outgoingStore=e.outgoingStore):(this.options.incomingStore=null,this.options.outgoingStore=null),this.incomingStore=this.options.incomingStore||new rs.default,this.outgoingStore=this.options.outgoingStore||new rs.default,this.disconnecting=!1,this.disconnected=!1,this._deferredReconnect=null,this._reconnect();};return this.disconnecting&&!this.disconnected?this._deferredReconnect=r:r(),this}_flushVolatile(){this.outgoing&&(this.log(\"_flushVolatile :: deleting volatile messages from the queue and setting their callbacks as error function\"),Object.keys(this.outgoing).forEach(e=>{this.outgoing[e].volatile&&typeof this.outgoing[e].cb==\"function\"&&(this.outgoing[e].cb(new Error(\"Connection closed\")),delete this.outgoing[e]);}));}_flush(){this.outgoing&&(this.log(\"_flush: queue exists? %b\",!!this.outgoing),Object.keys(this.outgoing).forEach(e=>{typeof this.outgoing[e].cb==\"function\"&&(this.outgoing[e].cb(new Error(\"Connection closed\")),delete this.outgoing[e]);}));}_removeTopicAliasAndRecoverTopicName(e){let r;e.properties&&(r=e.properties.topicAlias);let i=e.topic.toString();if(this.log(\"_removeTopicAliasAndRecoverTopicName :: alias %d, topic %o\",r,i),i.length===0){if(typeof r>\"u\")return new Error(\"Unregistered Topic Alias\");if(i=this.topicAliasSend.getTopicByAlias(r),typeof i>\"u\")return new Error(\"Unregistered Topic Alias\");e.topic=i;}r&&delete e.properties.topicAlias;}_checkDisconnecting(e){return this.disconnecting&&(e&&e!==this.noop?e(new Error(\"client disconnecting\")):this.emit(\"error\",new Error(\"client disconnecting\"))),this.disconnecting}_reconnect(){this.log(\"_reconnect: emitting reconnect to client\"),this.emit(\"reconnect\"),this.connected?(this.end(()=>{this.connect();}),this.log(\"client already connected. disconnecting first.\")):(this.log(\"_reconnect: calling connect\"),this.connect());}_setupReconnect(){!this.disconnecting&&!this.reconnectTimer&&this.options.reconnectPeriod>0?(this.reconnecting||(this.log(\"_setupReconnect :: emit `offline` state\"),this.emit(\"offline\"),this.log(\"_setupReconnect :: set `reconnecting` to `true`\"),this.reconnecting=!0),this.log(\"_setupReconnect :: setting reconnectTimer for %d ms\",this.options.reconnectPeriod),this.reconnectTimer=setInterval(()=>{this.log(\"reconnectTimer :: reconnect triggered!\"),this._reconnect();},this.options.reconnectPeriod)):this.log(\"_setupReconnect :: doing nothing...\");}_clearReconnect(){this.log(\"_clearReconnect : clearing reconnect timer\"),this.reconnectTimer&&(clearInterval(this.reconnectTimer),this.reconnectTimer=null);}_cleanUp(e,r,i={}){if(r&&(this.log(\"_cleanUp :: done callback provided for on stream close\"),this.stream.on(\"close\",r)),this.log(\"_cleanUp :: forced? %s\",e),e)this.options.reconnectPeriod===0&&this.options.clean&&this._flush(),this.log(\"_cleanUp :: (%s) :: destroying stream\",this.options.clientId),this.stream.destroy();else {let n=Object.assign({cmd:\"disconnect\"},i);this.log(\"_cleanUp :: (%s) :: call _sendPacket with disconnect packet\",this.options.clientId),this._sendPacket(n,()=>{this.log(\"_cleanUp :: (%s) :: destroying stream\",this.options.clientId),Fa(()=>{this.stream.end(()=>{this.log(\"_cleanUp :: (%s) :: stream destroyed\",this.options.clientId);});});});}!this.disconnecting&&!this.reconnecting&&(this.log(\"_cleanUp :: client not disconnecting/reconnecting. Clearing and resetting reconnect.\"),this._clearReconnect(),this._setupReconnect()),this.pingTimer&&(this.log(\"_cleanUp :: clearing pingTimer\"),this.pingTimer.clear(),this.pingTimer=null),r&&!this.connected&&(this.log(\"_cleanUp :: (%s) :: removing stream `done` callback `close` listener\",this.options.clientId),this.stream.removeListener(\"close\",r),r());}_storeAndSend(e,r,i){this.log(\"storeAndSend :: store packet with cmd %s to outgoingStore\",e.cmd);let n=e,o;if(n.cmd===\"publish\"&&(n=(0, qp.default)(e),o=this._removeTopicAliasAndRecoverTopicName(n),o))return r&&r(o);this.outgoingStore.put(n,s=>{if(s)return r&&r(s);i(),this._writePacket(e,r);});}_applyTopicAlias(e){if(this.options.protocolVersion===5&&e.cmd===\"publish\"){let r;e.properties&&(r=e.properties.topicAlias);let i=e.topic.toString();if(this.topicAliasSend)if(r){if(i.length!==0&&(this.log(\"applyTopicAlias :: register topic: %s - alias: %d\",i,r),!this.topicAliasSend.put(i,r)))return this.log(\"applyTopicAlias :: error out of range. topic: %s - alias: %d\",i,r),new Error(\"Sending Topic Alias out of range\")}else i.length!==0&&(this.options.autoAssignTopicAlias?(r=this.topicAliasSend.getAliasByTopic(i),r?(e.topic=\"\",e.properties=Object.assign(Object.assign({},e.properties),{topicAlias:r}),this.log(\"applyTopicAlias :: auto assign(use) topic: %s - alias: %d\",i,r)):(r=this.topicAliasSend.getLruAlias(),this.topicAliasSend.put(i,r),e.properties=Object.assign(Object.assign({},e.properties),{topicAlias:r}),this.log(\"applyTopicAlias :: auto assign topic: %s - alias: %d\",i,r))):this.options.autoUseTopicAlias&&(r=this.topicAliasSend.getAliasByTopic(i),r&&(e.topic=\"\",e.properties=Object.assign(Object.assign({},e.properties),{topicAlias:r}),this.log(\"applyTopicAlias :: auto use topic: %s - alias: %d\",i,r))));else if(r)return this.log(\"applyTopicAlias :: error out of range. topic: %s - alias: %d\",i,r),new Error(\"Sending Topic Alias out of range\")}}_noop(e){this.log(\"noop ::\",e);}_writePacket(e,r){this.log(\"_writePacket :: packet: %O\",e),this.log(\"_writePacket :: emitting `packetsend`\"),this.emit(\"packetsend\",e),this._shiftPingInterval(),this.log(\"_writePacket :: writing to stream\");let i=ja.default.writeToStream(e,this.stream,this.options);this.log(\"_writePacket :: writeToStream result %s\",i),!i&&r&&r!==this.noop?(this.log(\"_writePacket :: handle events on `drain` once through callback.\"),this.stream.once(\"drain\",r)):r&&(this.log(\"_writePacket :: invoking cb\"),r());}_sendPacket(e,r,i,n){this.log(\"_sendPacket :: (%s) :: start\",this.options.clientId),i=i||this.noop,r=r||this.noop;let o=this._applyTopicAlias(e);if(o){r(o);return}if(!this.connected){if(e.cmd===\"auth\"){this._writePacket(e,r);return}this.log(\"_sendPacket :: client not connected. Storing packet offline.\"),this._storePacket(e,r,i);return}if(n){this._writePacket(e,r);return}switch(e.cmd){case\"publish\":break;case\"pubrel\":this._storeAndSend(e,r,i);return;default:this._writePacket(e,r);return}switch(e.qos){case 2:case 1:this._storeAndSend(e,r,i);break;case 0:default:this._writePacket(e,r);break}this.log(\"_sendPacket :: (%s) :: end\",this.options.clientId);}_storePacket(e,r,i){this.log(\"_storePacket :: packet: %o\",e),this.log(\"_storePacket :: cb? %s\",!!r),i=i||this.noop;let n=e;if(n.cmd===\"publish\"){n=(0, qp.default)(e);let s=this._removeTopicAliasAndRecoverTopicName(n);if(s)return r&&r(s)}let o=n.qos||0;o===0&&this.queueQoSZero||n.cmd!==\"publish\"?this.queue.push({packet:n,cb:r}):o>0?(r=this.outgoing[n.messageId]?this.outgoing[n.messageId].cb:null,this.outgoingStore.put(n,s=>{if(s)return r&&r(s);i();})):r&&r(new Error(\"No connection to broker\"));}_setupPingTimer(){this.log(\"_setupPingTimer :: keepalive %d (seconds)\",this.options.keepalive),!this.pingTimer&&this.options.keepalive&&(this.pingResp=!0,this.pingTimer=new Xv.default(this.options.keepalive,()=>{this._checkPing();},this.options.timerVariant));}_shiftPingInterval(){this.pingTimer&&this.options.keepalive&&this.options.reschedulePings&&this.pingTimer.reschedule();}_checkPing(){this.log(\"_checkPing :: checking ping...\"),this.pingResp?(this.log(\"_checkPing :: ping response received. Clearing flag and sending `pingreq`\"),this.pingResp=!1,this._sendPacket({cmd:\"pingreq\"})):(this.emit(\"error\",new Error(\"Keepalive timeout\")),this.log(\"_checkPing :: calling _cleanUp with force true\"),this._cleanUp(!0));}_resubscribe(){this.log(\"_resubscribe\");let e=Object.keys(this._resubscribeTopics);if(!this._firstConnection&&(this.options.clean||this.options.protocolVersion>=4&&!this.connackPacket.sessionPresent)&&e.length>0)if(this.options.resubscribe)if(this.options.protocolVersion===5){this.log(\"_resubscribe: protocolVersion 5\");for(let r=0;r{let i=this.outgoingStore.createStream(),n=()=>{i.destroy(),i=null,this._flushStoreProcessingQueue(),o();},o=()=>{this._storeProcessing=!1,this._packetIdsDuringStoreProcessing={};};this.once(\"close\",n),i.on(\"error\",a=>{o(),this._flushStoreProcessingQueue(),this.removeListener(\"close\",n),this.emit(\"error\",a);});let s=()=>{if(!i)return;let a=i.read(1),u;if(!a){i.once(\"readable\",s);return}if(this._storeProcessing=!0,this._packetIdsDuringStoreProcessing[a.messageId]){s();return}!this.disconnecting&&!this.reconnectTimer?(u=this.outgoing[a.messageId]?this.outgoing[a.messageId].cb:null,this.outgoing[a.messageId]={volatile:!1,cb(c,h){u&&u(c,h),s();}},this._packetIdsDuringStoreProcessing[a.messageId]=!0,this.messageIdProvider.register(a.messageId)?this._sendPacket(a,void 0,void 0,!0):this.log(\"messageId: %d has already used.\",a.messageId)):i.destroy&&i.destroy();};i.on(\"end\",()=>{let a=!0;for(let u in this._packetIdsDuringStoreProcessing)if(!this._packetIdsDuringStoreProcessing[u]){a=!1;break}this.removeListener(\"close\",n),a?(o(),this._invokeAllStoreProcessingQueue(),this.emit(\"connect\",e)):r();}),s();};r();}_invokeStoreProcessingQueue(){if(!this._storeProcessing&&this._storeProcessingQueue.length>0){let e=this._storeProcessingQueue[0];if(e&&e.invoke())return this._storeProcessingQueue.shift(),!0}return !1}_invokeAllStoreProcessingQueue(){for(;this._invokeStoreProcessingQueue(););}_flushStoreProcessingQueue(){for(let e of this._storeProcessingQueue)e.cbStorePut&&e.cbStorePut(new Error(\"Connection closed\")),e.callback&&e.callback(new Error(\"Connection closed\"));this._storeProcessingQueue.splice(0);}_removeOutgoingAndStoreMessage(e,r){delete this.outgoing[e],this.outgoingStore.del({messageId:e},(i,n)=>{r(i,n),this.messageIdProvider.deallocate(e),this._invokeStoreProcessingQueue();});}};is.VERSION=\"5.5.2\";Qe.default=is;});var $p=M(Ha=>{v();m();_();Object.defineProperty(Ha,\"__esModule\",{value:!0});var Zv=xa(),$a=class{constructor(){this.numberAllocator=new Zv.NumberAllocator(1,65535);}allocate(){return this.lastId=this.numberAllocator.alloc(),this.lastId}getLastAllocated(){return this.lastId}register(e){return this.numberAllocator.use(e)}deallocate(e){this.numberAllocator.free(e);}clear(){this.numberAllocator.clear();}};Ha.default=$a;});function Ir(t){throw new RangeError(iE[t])}function Hp(t,e){let r=t.split(\"@\"),i=\"\";r.length>1&&(i=r[0]+\"@\",t=r[1]);let n=function(o,s){let a=[],u=o.length;for(;u--;)a[u]=s(o[u]);return a}((t=t.replace(rE,\".\")).split(\".\"),e).join(\".\");return i+n}function Gp(t){let e=[],r=0,i=t.length;for(;r=55296&&n<=56319&&r{v();m();_();eE=/^xn--/,tE=/[^\\0-\\x7E]/,rE=/[\\x2E\\u3002\\uFF0E\\uFF61]/g,iE={overflow:\"Overflow: input needs wider integers to process\",\"not-basic\":\"Illegal input >= 0x80 (not a basic code point)\",\"invalid-input\":\"Invalid input\"},ht=Math.floor,Va=String.fromCharCode;Vp=function(t,e){return t+22+75*(t<26)-((e!=0)<<5)},Qp=function(t,e,r){let i=0;for(t=r?ht(t/700):t>>1,t+=ht(t/e);t>455;i+=36)t=ht(t/35);return ht(i+36*t/(t+38))},zp=function(t){let e=[],r=t.length,i=0,n=128,o=72,s=t.lastIndexOf(\"-\");s<0&&(s=0);for(let u=0;u=128&&Ir(\"not-basic\"),e.push(t.charCodeAt(u));for(let u=s>0?s+1:0;u=r&&Ir(\"invalid-input\");let y=(a=t.charCodeAt(u++))-48<10?a-22:a-65<26?a-65:a-97<26?a-97:36;(y>=36||y>ht((2147483647-i)/d))&&Ir(\"overflow\"),i+=y*d;let w=g<=o?1:g>=o+26?26:g-o;if(yht(2147483647/E)&&Ir(\"overflow\"),d*=E;}let h=e.length+1;o=Qp(i-c,h,c==0),ht(i/h)>2147483647-n&&Ir(\"overflow\"),n+=ht(i/h),i%=h,e.splice(i++,0,n);}var a;return String.fromCodePoint(...e)},Kp=function(t){let e=[],r=(t=Gp(t)).length,i=128,n=0,o=72;for(let u of t)u<128&&e.push(Va(u));let s=e.length,a=s;for(s&&e.push(\"-\");a=i&&hht((2147483647-n)/c)&&Ir(\"overflow\"),n+=(u-i)*c,i=u;for(let h of t)if(h2147483647&&Ir(\"overflow\"),h==i){let d=n;for(let g=36;;g+=36){let y=g<=o?1:g>=o+26?26:g-o;if(dString.fromCodePoint(...t)},decode:zp,encode:Kp,toASCII:function(t){return Hp(t,function(e){return tE.test(e)?\"xn--\"+Kp(e):e})},toUnicode:function(t){return Hp(t,function(e){return eE.test(e)?zp(e.slice(4).toLowerCase()):e})}};zt.decode;zt.encode;zt.toASCII;zt.toUnicode;zt.ucs2;zt.version;});function nE(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var sE,ki,oE,dt,Jp=we(()=>{v();m();_();sE=function(t,e,r,i){e=e||\"&\",r=r||\"=\";var n={};if(typeof t!=\"string\"||t.length===0)return n;var o=/\\+/g;t=t.split(e);var s=1e3;i&&typeof i.maxKeys==\"number\"&&(s=i.maxKeys);var a=t.length;s>0&&a>s&&(a=s);for(var u=0;u=0?(c=y.substr(0,w),h=y.substr(w+1)):(c=y,h=\"\"),d=decodeURIComponent(c),g=decodeURIComponent(h),nE(n,d)?Array.isArray(n[d])?n[d].push(g):n[d]=[n[d],g]:n[d]=g;}return n},ki=function(t){switch(typeof t){case\"string\":return t;case\"boolean\":return t?\"true\":\"false\";case\"number\":return isFinite(t)?t:\"\";default:return \"\"}},oE=function(t,e,r,i){return e=e||\"&\",r=r||\"=\",t===null&&(t=void 0),typeof t==\"object\"?Object.keys(t).map(function(n){var o=encodeURIComponent(ki(n))+r;return Array.isArray(t[n])?t[n].map(function(s){return o+encodeURIComponent(ki(s))}).join(e):o+encodeURIComponent(ki(t[n]))}).join(e):i?encodeURIComponent(ki(i))+r+encodeURIComponent(ki(t)):\"\"},dt={};dt.decode=dt.parse=sE,dt.encode=dt.stringify=oE;dt.decode;dt.encode;dt.parse;dt.stringify;});function za(){throw new Error(\"setTimeout has not been defined\")}function Ka(){throw new Error(\"clearTimeout has not been defined\")}function eg(t){if(Bt===setTimeout)return setTimeout(t,0);if((Bt===za||!Bt)&&setTimeout)return Bt=setTimeout,setTimeout(t,0);try{return Bt(t,0)}catch{try{return Bt.call(null,t,0)}catch{return Bt.call(this||ii,t,0)}}}function aE(){ri&&Tr&&(ri=!1,Tr.length?Ot=Tr.concat(Ot):ss=-1,Ot.length&&tg());}function tg(){if(!ri){var t=eg(aE);ri=!0;for(var e=Ot.length;e;){for(Tr=Ot,Ot=[];++ss{v();m();_();ii=typeof globalThis<\"u\"?globalThis:typeof self<\"u\"?self:global,fe=Zp={};(function(){try{Bt=typeof setTimeout==\"function\"?setTimeout:za;}catch{Bt=za;}try{Pt=typeof clearTimeout==\"function\"?clearTimeout:Ka;}catch{Pt=Ka;}})();Ot=[],ri=!1,ss=-1;fe.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r1)for(var I=1;I{v();m();_();Ga={},ig=!1,ni=typeof globalThis<\"u\"?globalThis:typeof self<\"u\"?self:global;re=lE();re.platform=\"browser\";re.addListener;re.argv;re.binding;re.browser;re.chdir;re.cwd;re.emit;re.env;re.listeners;re.nextTick;re.off;re.on;re.once;re.prependListener;re.prependOnceListener;re.removeAllListeners;re.removeListener;re.title;re.umask;re.version;re.versions;});function uE(){if(ng)return Ya;ng=!0;var t=re;function e(o){if(typeof o!=\"string\")throw new TypeError(\"Path must be a string. Received \"+JSON.stringify(o))}function r(o,s){for(var a=\"\",u=0,c=-1,h=0,d,g=0;g<=o.length;++g){if(g2){var y=a.lastIndexOf(\"/\");if(y!==a.length-1){y===-1?(a=\"\",u=0):(a=a.slice(0,y),u=a.length-1-a.lastIndexOf(\"/\")),c=g,h=0;continue}}else if(a.length===2||a.length===1){a=\"\",u=0,c=g,h=0;continue}}s&&(a.length>0?a+=\"/..\":a=\"..\",u=2);}else a.length>0?a+=\"/\"+o.slice(c+1,g):a=o.slice(c+1,g),u=g-c-1;c=g,h=0;}else d===46&&h!==-1?++h:h=-1;}return a}function i(o,s){var a=s.dir||s.root,u=s.base||(s.name||\"\")+(s.ext||\"\");return a?a===s.root?a+u:a+o+u:u}var n={resolve:function(){for(var s=\"\",a=!1,u,c=arguments.length-1;c>=-1&&!a;c--){var h;c>=0?h=arguments[c]:(u===void 0&&(u=t.cwd()),h=u),e(h),h.length!==0&&(s=h+\"/\"+s,a=h.charCodeAt(0)===47);}return s=r(s,!a),a?s.length>0?\"/\"+s:\"/\":s.length>0?s:\".\"},normalize:function(s){if(e(s),s.length===0)return \".\";var a=s.charCodeAt(0)===47,u=s.charCodeAt(s.length-1)===47;return s=r(s,!a),s.length===0&&!a&&(s=\".\"),s.length>0&&u&&(s+=\"/\"),a?\"/\"+s:s},isAbsolute:function(s){return e(s),s.length>0&&s.charCodeAt(0)===47},join:function(){if(arguments.length===0)return \".\";for(var s,a=0;a0&&(s===void 0?s=u:s+=\"/\"+u);}return s===void 0?\".\":n.normalize(s)},relative:function(s,a){if(e(s),e(a),s===a||(s=n.resolve(s),a=n.resolve(a),s===a))return \"\";for(var u=1;uw){if(a.charCodeAt(d+S)===47)return a.slice(d+S+1);if(S===0)return a.slice(d+S)}else h>w&&(s.charCodeAt(u+S)===47?E=S:S===0&&(E=0));break}var I=s.charCodeAt(u+S),C=a.charCodeAt(d+S);if(I!==C)break;I===47&&(E=S);}var R=\"\";for(S=u+E+1;S<=c;++S)(S===c||s.charCodeAt(S)===47)&&(R.length===0?R+=\"..\":R+=\"/..\");return R.length>0?R+a.slice(d+E):(d+=E,a.charCodeAt(d)===47&&++d,a.slice(d))},_makeLong:function(s){return s},dirname:function(s){if(e(s),s.length===0)return \".\";for(var a=s.charCodeAt(0),u=a===47,c=-1,h=!0,d=s.length-1;d>=1;--d)if(a=s.charCodeAt(d),a===47){if(!h){c=d;break}}else h=!1;return c===-1?u?\"/\":\".\":u&&c===1?\"//\":s.slice(0,c)},basename:function(s,a){if(a!==void 0&&typeof a!=\"string\")throw new TypeError('\"ext\" argument must be a string');e(s);var u=0,c=-1,h=!0,d;if(a!==void 0&&a.length>0&&a.length<=s.length){if(a.length===s.length&&a===s)return \"\";var g=a.length-1,y=-1;for(d=s.length-1;d>=0;--d){var w=s.charCodeAt(d);if(w===47){if(!h){u=d+1;break}}else y===-1&&(h=!1,y=d+1),g>=0&&(w===a.charCodeAt(g)?--g===-1&&(c=d):(g=-1,c=y));}return u===c?c=y:c===-1&&(c=s.length),s.slice(u,c)}else {for(d=s.length-1;d>=0;--d)if(s.charCodeAt(d)===47){if(!h){u=d+1;break}}else c===-1&&(h=!1,c=d+1);return c===-1?\"\":s.slice(u,c)}},extname:function(s){e(s);for(var a=-1,u=0,c=-1,h=!0,d=0,g=s.length-1;g>=0;--g){var y=s.charCodeAt(g);if(y===47){if(!h){u=g+1;break}continue}c===-1&&(h=!1,c=g+1),y===46?a===-1?a=g:d!==1&&(d=1):a!==-1&&(d=-1);}return a===-1||c===-1||d===0||d===1&&a===c-1&&a===u+1?\"\":s.slice(a,c)},format:function(s){if(s===null||typeof s!=\"object\")throw new TypeError('The \"pathObject\" argument must be of type Object. Received type '+typeof s);return i(\"/\",s)},parse:function(s){e(s);var a={root:\"\",dir:\"\",base:\"\",ext:\"\",name:\"\"};if(s.length===0)return a;var u=s.charCodeAt(0),c=u===47,h;c?(a.root=\"/\",h=1):h=0;for(var d=-1,g=0,y=-1,w=!0,E=s.length-1,S=0;E>=h;--E){if(u=s.charCodeAt(E),u===47){if(!w){g=E+1;break}continue}y===-1&&(w=!1,y=E+1),u===46?d===-1?d=E:S!==1&&(S=1):d!==-1&&(S=-1);}return d===-1||y===-1||S===0||S===1&&d===y-1&&d===g+1?y!==-1&&(g===0&&c?a.base=a.name=s.slice(1,y):a.base=a.name=s.slice(g,y)):(g===0&&c?(a.name=s.slice(1,d),a.base=s.slice(1,y)):(a.name=s.slice(g,d),a.base=s.slice(g,y)),a.ext=s.slice(d,y)),g>0?a.dir=s.slice(0,g-1):c&&(a.dir=\"/\"),a},sep:\"/\",delimiter:\":\",win32:null,posix:null};return n.posix=n,Ya=n,Ya}var Ya,ng,Ja,sg=we(()=>{v();m();_();Qa();Ya={},ng=!1;Ja=uE();});var dg={};Qt(dg,{URL:()=>DE,Url:()=>ME,default:()=>Z,fileURLToPath:()=>cg,format:()=>LE,parse:()=>qE,pathToFileURL:()=>hg,resolve:()=>UE,resolveObject:()=>NE});function Fe(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null;}function xi(t,e,r){if(t&&pt.isObject(t)&&t instanceof Fe)return t;var i=new Fe;return i.parse(t,e,r),i}function bE(){if(ug)return el;ug=!0;var t=ne;function e(o){if(typeof o!=\"string\")throw new TypeError(\"Path must be a string. Received \"+JSON.stringify(o))}function r(o,s){for(var a=\"\",u=0,c=-1,h=0,d,g=0;g<=o.length;++g){if(g2){var y=a.lastIndexOf(\"/\");if(y!==a.length-1){y===-1?(a=\"\",u=0):(a=a.slice(0,y),u=a.length-1-a.lastIndexOf(\"/\")),c=g,h=0;continue}}else if(a.length===2||a.length===1){a=\"\",u=0,c=g,h=0;continue}}s&&(a.length>0?a+=\"/..\":a=\"..\",u=2);}else a.length>0?a+=\"/\"+o.slice(c+1,g):a=o.slice(c+1,g),u=g-c-1;c=g,h=0;}else d===46&&h!==-1?++h:h=-1;}return a}function i(o,s){var a=s.dir||s.root,u=s.base||(s.name||\"\")+(s.ext||\"\");return a?a===s.root?a+u:a+o+u:u}var n={resolve:function(){for(var s=\"\",a=!1,u,c=arguments.length-1;c>=-1&&!a;c--){var h;c>=0?h=arguments[c]:(u===void 0&&(u=t.cwd()),h=u),e(h),h.length!==0&&(s=h+\"/\"+s,a=h.charCodeAt(0)===47);}return s=r(s,!a),a?s.length>0?\"/\"+s:\"/\":s.length>0?s:\".\"},normalize:function(s){if(e(s),s.length===0)return \".\";var a=s.charCodeAt(0)===47,u=s.charCodeAt(s.length-1)===47;return s=r(s,!a),s.length===0&&!a&&(s=\".\"),s.length>0&&u&&(s+=\"/\"),a?\"/\"+s:s},isAbsolute:function(s){return e(s),s.length>0&&s.charCodeAt(0)===47},join:function(){if(arguments.length===0)return \".\";for(var s,a=0;a0&&(s===void 0?s=u:s+=\"/\"+u);}return s===void 0?\".\":n.normalize(s)},relative:function(s,a){if(e(s),e(a),s===a||(s=n.resolve(s),a=n.resolve(a),s===a))return \"\";for(var u=1;uw){if(a.charCodeAt(d+S)===47)return a.slice(d+S+1);if(S===0)return a.slice(d+S)}else h>w&&(s.charCodeAt(u+S)===47?E=S:S===0&&(E=0));break}var I=s.charCodeAt(u+S),C=a.charCodeAt(d+S);if(I!==C)break;I===47&&(E=S);}var R=\"\";for(S=u+E+1;S<=c;++S)(S===c||s.charCodeAt(S)===47)&&(R.length===0?R+=\"..\":R+=\"/..\");return R.length>0?R+a.slice(d+E):(d+=E,a.charCodeAt(d)===47&&++d,a.slice(d))},_makeLong:function(s){return s},dirname:function(s){if(e(s),s.length===0)return \".\";for(var a=s.charCodeAt(0),u=a===47,c=-1,h=!0,d=s.length-1;d>=1;--d)if(a=s.charCodeAt(d),a===47){if(!h){c=d;break}}else h=!1;return c===-1?u?\"/\":\".\":u&&c===1?\"//\":s.slice(0,c)},basename:function(s,a){if(a!==void 0&&typeof a!=\"string\")throw new TypeError('\"ext\" argument must be a string');e(s);var u=0,c=-1,h=!0,d;if(a!==void 0&&a.length>0&&a.length<=s.length){if(a.length===s.length&&a===s)return \"\";var g=a.length-1,y=-1;for(d=s.length-1;d>=0;--d){var w=s.charCodeAt(d);if(w===47){if(!h){u=d+1;break}}else y===-1&&(h=!1,y=d+1),g>=0&&(w===a.charCodeAt(g)?--g===-1&&(c=d):(g=-1,c=y));}return u===c?c=y:c===-1&&(c=s.length),s.slice(u,c)}else {for(d=s.length-1;d>=0;--d)if(s.charCodeAt(d)===47){if(!h){u=d+1;break}}else c===-1&&(h=!1,c=d+1);return c===-1?\"\":s.slice(u,c)}},extname:function(s){e(s);for(var a=-1,u=0,c=-1,h=!0,d=0,g=s.length-1;g>=0;--g){var y=s.charCodeAt(g);if(y===47){if(!h){u=g+1;break}continue}c===-1&&(h=!1,c=g+1),y===46?a===-1?a=g:d!==1&&(d=1):a!==-1&&(d=-1);}return a===-1||c===-1||d===0||d===1&&a===c-1&&a===u+1?\"\":s.slice(a,c)},format:function(s){if(s===null||typeof s!=\"object\")throw new TypeError('The \"pathObject\" argument must be of type Object. Received type '+typeof s);return i(\"/\",s)},parse:function(s){e(s);var a={root:\"\",dir:\"\",base:\"\",ext:\"\",name:\"\"};if(s.length===0)return a;var u=s.charCodeAt(0),c=u===47,h;c?(a.root=\"/\",h=1):h=0;for(var d=-1,g=0,y=-1,w=!0,E=s.length-1,S=0;E>=h;--E){if(u=s.charCodeAt(E),u===47){if(!w){g=E+1;break}continue}y===-1&&(w=!1,y=E+1),u===46?d===-1?d=E:S!==1&&(S=1):d!==-1&&(S=-1);}return d===-1||y===-1||S===0||S===1&&d===y-1&&d===g+1?y!==-1&&(g===0&&c?a.base=a.name=s.slice(1,y):a.base=a.name=s.slice(g,y)):(g===0&&c?(a.name=s.slice(1,d),a.base=s.slice(1,y)):(a.name=s.slice(g,d),a.base=s.slice(g,y)),a.ext=s.slice(d,y)),g>0?a.dir=s.slice(0,g-1):c&&(a.dir=\"/\"),a},sep:\"/\",delimiter:\":\",win32:null,posix:null};return n.posix=n,el=n,el}function BE(t){if(typeof t==\"string\")t=new URL(t);else if(!(t instanceof URL))throw new Deno.errors.InvalidData(\"invalid argument path , must be a string or URL\");if(t.protocol!==\"file:\")throw new Deno.errors.InvalidData(\"invalid url scheme\");return rl?PE(t):OE(t)}function PE(t){let e=t.hostname,r=t.pathname;for(let i=0;iEE||n!==\":\")throw new Deno.errors.InvalidData(\"file url path must be absolute\");return r.slice(1)}}function OE(t){if(t.hostname!==\"\")throw new Deno.errors.InvalidData(\"invalid file url hostname\");let e=t.pathname;for(let r=0;r$E||n!==\":\")throw new Deno.errors.InvalidData(\"file url path must be absolute\");return r.slice(1)}}function JE(t){if(t.hostname!==\"\")throw new Deno.errors.InvalidData(\"invalid file url hostname\");let e=t.pathname;for(let r=0;r{v();m();_();Yp();Jp();rg();sg();Qa();Z={},fE=zt,pt={isString:function(t){return typeof t==\"string\"},isObject:function(t){return typeof t==\"object\"&&t!==null},isNull:function(t){return t===null},isNullOrUndefined:function(t){return t==null}};Z.parse=xi,Z.resolve=function(t,e){return xi(t,!1,!0).resolve(e)},Z.resolveObject=function(t,e){return t?xi(t,!1,!0).resolveObject(e):e},Z.format=function(t){return pt.isString(t)&&(t=xi(t)),t instanceof Fe?t.format():Fe.prototype.format.call(t)},Z.Url=Fe;cE=/^([a-z0-9.+-]+:)/i,hE=/:[0-9]*$/,dE=/^(\\/\\/?(?!\\/)[^\\?\\s]*)(\\?[^\\s]*)?$/,pE=[\"{\",\"}\",\"|\",\"\\\\\",\"^\",\"`\"].concat([\"<\",\">\",'\"',\"`\",\" \",\"\\r\",`\n`,\"\t\"]),tl=[\"'\"].concat(pE),og=[\"%\",\"/\",\"?\",\";\",\"#\"].concat(tl),ag=[\"/\",\"?\",\"#\"],lg=/^[+a-z0-9A-Z_-]{0,63}$/,gE=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,yE={javascript:!0,\"javascript:\":!0},Xa={javascript:!0,\"javascript:\":!0},si={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,\"http:\":!0,\"https:\":!0,\"ftp:\":!0,\"gopher:\":!0,\"file:\":!0},Za=dt;Fe.prototype.parse=function(t,e,r){if(!pt.isString(t))throw new TypeError(\"Parameter 'url' must be a string, not \"+typeof t);var i=t.indexOf(\"?\"),n=i!==-1&&i127?U+=\"x\":U+=R[N];if(!U.match(lg)){var K=I.slice(0,w),z=I.slice(w+1),Q=R.match(gE);Q&&(K.push(Q[1]),z.unshift(Q[2])),z.length&&(s=\"/\"+z.join(\".\")+s),this.hostname=K.join(\".\");break}}}this.hostname.length>255?this.hostname=\"\":this.hostname=this.hostname.toLowerCase(),S||(this.hostname=fE.toASCII(this.hostname));var de=this.port?\":\"+this.port:\"\",Gt=this.hostname||\"\";this.host=Gt+de,this.href+=this.host,S&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),s[0]!==\"/\"&&(s=\"/\"+s));}if(!yE[c])for(w=0,C=tl.length;w0)&&r.host.split(\"@\"))&&(r.auth=Q.shift(),r.host=r.hostname=Q.shift())),r.search=t.search,r.query=t.query,pt.isNull(r.pathname)&&pt.isNull(r.search)||(r.path=(r.pathname?r.pathname:\"\")+(r.search?r.search:\"\")),r.href=r.format(),r;if(!R.length)return r.pathname=null,r.search?r.path=\"/\"+r.search:r.path=null,r.href=r.format(),r;for(var N=R.slice(-1)[0],W=(r.host||t.host||R.length>1)&&(N===\".\"||N===\"..\")||N===\"\",K=0,z=R.length;z>=0;z--)(N=R[z])===\".\"?R.splice(z,1):N===\"..\"?(R.splice(z,1),K++):K&&(R.splice(z,1),K--);if(!I&&!C)for(;K--;K)R.unshift(\"..\");!I||R[0]===\"\"||R[0]&&R[0].charAt(0)===\"/\"||R.unshift(\"\"),W&&R.join(\"/\").substr(-1)!==\"/\"&&R.push(\"\");var Q,de=R[0]===\"\"||R[0]&&R[0].charAt(0)===\"/\";return U&&(r.hostname=r.host=de?\"\":R.length?R.shift():\"\",(Q=!!(r.host&&r.host.indexOf(\"@\")>0)&&r.host.split(\"@\"))&&(r.auth=Q.shift(),r.host=r.hostname=Q.shift())),(I=I||r.host&&R.length)&&!de&&R.unshift(\"\"),R.length?r.pathname=R.join(\"/\"):(r.pathname=null,r.path=null),pt.isNull(r.pathname)&&pt.isNull(r.search)||(r.path=(r.pathname?r.pathname:\"\")+(r.search?r.search:\"\")),r.auth=t.auth||r.auth,r.slashes=r.slashes||t.slashes,r.href=r.format(),r},Fe.prototype.parseHost=function(){var t=this.host,e=hE.exec(t);e&&((e=e[0])!==\":\"&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t);};Z.Url;Z.format;Z.resolve;Z.resolveObject;el={},ug=!1;fg=bE(),wE=typeof Deno<\"u\"?Deno.build.os===\"windows\"?\"win32\":Deno.build.os:void 0;Z.URL=typeof URL<\"u\"?URL:null;Z.pathToFileURL=kE;Z.fileURLToPath=BE;Z.Url;Z.format;Z.resolve;Z.resolveObject;Z.URL;_E=92,mE=47,vE=97,EE=122,rl=wE===\"win32\",SE=/\\//g,AE=/%/g,IE=/\\\\/g,TE=/\\n/g,RE=/\\r/g,CE=/\\t/g;xE=typeof Deno<\"u\"?Deno.build.os===\"windows\"?\"win32\":Deno.build.os:void 0;Z.URL=typeof URL<\"u\"?URL:null;Z.pathToFileURL=hg;Z.fileURLToPath=cg;ME=Z.Url,LE=Z.format,UE=Z.resolve,NE=Z.resolveObject,qE=Z.parse,DE=Z.URL,jE=92,FE=47,WE=97,$E=122,il=xE===\"win32\",HE=/\\//g,VE=/%/g,zE=/\\\\/g,KE=/\\n/g,GE=/\\r/g,QE=/\\t/g;});var nl={};Qt(nl,{Server:()=>Me,Socket:()=>Me,Stream:()=>Me,_createServerHandle:()=>Me,_normalizeArgs:()=>Me,_setSimultaneousAccepts:()=>Me,connect:()=>Me,createConnection:()=>Me,createServer:()=>Me,default:()=>XE,isIP:()=>Me,isIPv4:()=>Me,isIPv6:()=>Me});function Me(){throw new Error(\"Node.js net module is not supported by JSPM core outside of Node.js\")}var XE,sl=we(()=>{v();m();_();XE={_createServerHandle:Me,_normalizeArgs:Me,_setSimultaneousAccepts:Me,connect:Me,createConnection:Me,createServer:Me,isIP:Me,isIPv4:Me,isIPv6:Me,Server:Me,Socket:Me,Stream:Me};});var ol=M(Mi=>{v();m();_();var gg=Mi&&Mi.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Mi,\"__esModule\",{value:!0});var ZE=gg((sl(),X(nl))),eS=gg(ot()),tS=(0, eS.default)(\"mqttjs:tcp\"),rS=(t,e)=>{e.port=e.port||1883,e.hostname=e.hostname||e.host||\"localhost\";let{port:r}=e,i=e.hostname;return tS(\"port %d and host %s\",r,i),ZE.default.createConnection(r,i)};Mi.default=rS;});var yg={};Qt(yg,{default:()=>iS});var iS,bg=we(()=>{v();m();_();iS={};});var ll=M(Li=>{v();m();_();var al=Li&&Li.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Li,\"__esModule\",{value:!0});var nS=al((bg(),X(yg))),sS=al((sl(),X(nl))),oS=al(ot()),aS=(0, oS.default)(\"mqttjs:tls\"),lS=(t,e)=>{e.port=e.port||8883,e.host=e.hostname||e.host||\"localhost\",sS.default.isIP(e.host)===0&&(e.servername=e.host),e.rejectUnauthorized=e.rejectUnauthorized!==!1,delete e.path,aS(\"port %d host %s rejectUnauthorized %b\",e.port,e.host,e.rejectUnauthorized);let r=nS.default.connect(e);r.on(\"secureConnect\",()=>{e.rejectUnauthorized&&!r.authorized?r.emit(\"error\",new Error(\"TLS not authorized\")):r.removeListener(\"error\",i);});function i(n){e.rejectUnauthorized&&t.emit(\"error\",n),r.end();}return r.on(\"error\",i),r};Li.default=lS;});var os=M(oi=>{v();m();_();Object.defineProperty(oi,\"__esModule\",{value:!0});oi.BufferedDuplex=oi.writev=void 0;var uS=Dt(),wg=(ye(),X(_e));function _g(t,e){let r=new Array(t.length);for(let i=0;i{this.push(n);});}_read(e){this.proxy.read(e);}_write(e,r,i){this.isSocketOpen?this.writeToProxy(e,r,i):this.writeQueue.push({chunk:e,encoding:r,cb:i});}_final(e){this.writeQueue=[],this.proxy.end(e);}_destroy(e,r){this.writeQueue=[],this.proxy.destroy(),r(e);}socketReady(){this.emit(\"connect\"),this.isSocketOpen=!0,this.processWriteQueue();}writeToProxy(e,r,i){this.proxy.write(e,r)===!1?this.proxy.once(\"drain\",i):i();}processWriteQueue(){for(;this.writeQueue.length>0;){let{chunk:e,encoding:r,cb:i}=this.writeQueue.shift();this.writeToProxy(e,r,i);}}};oi.BufferedDuplex=ul;});var hl=M(cl=>{v();m();_();Object.defineProperty(cl,\"__esModule\",{value:!0});var mg=(ye(),X(_e)),fS=Dt(),cS=os(),gt,fl,Le;function hS(){let t=new fS.Transform;return t._write=(e,r,i)=>{gt.send({data:e.buffer,success(){i();},fail(n){i(new Error(n));}});},t._flush=e=>{gt.close({success(){e();}});},t}function dS(t){t.hostname||(t.hostname=\"localhost\"),t.path||(t.path=\"/\"),t.wsOptions||(t.wsOptions={});}function pS(t,e){let r=t.protocol===\"wxs\"?\"wss\":\"ws\",i=`${r}://${t.hostname}${t.path}`;return t.port&&t.port!==80&&t.port!==443&&(i=`${r}://${t.hostname}:${t.port}${t.path}`),typeof t.transformWsUrl==\"function\"&&(i=t.transformWsUrl(i,t,e)),i}function gS(){gt.onOpen(()=>{Le.socketReady();}),gt.onMessage(t=>{let{data:e}=t;e instanceof ArrayBuffer?e=mg.Buffer.from(e):e=mg.Buffer.from(e,\"utf8\"),fl.push(e);}),gt.onClose(()=>{Le.emit(\"close\"),Le.end(),Le.destroy();}),gt.onError(t=>{let e=new Error(t.errMsg);Le.destroy(e);});}var yS=(t,e)=>{if(e.hostname=e.hostname||e.host,!e.hostname)throw new Error(\"Could not determine host. Specify host manually.\");let r=e.protocolId===\"MQIsdp\"&&e.protocolVersion===3?\"mqttv3.1\":\"mqtt\";dS(e);let i=pS(e,t);gt=wx.connectSocket({url:i,protocols:[r]}),fl=hS(),Le=new cS.BufferedDuplex(e,fl,gt),Le._destroy=(o,s)=>{gt.close({success(){s&&s(o);}});};let n=Le.destroy;return Le.destroy=(o,s)=>(Le.destroy=n,setTimeout(()=>{gt.close({fail(){Le._destroy(o,s);}});},0),Le),gS(),Le};cl.default=yS;});var gl=M(pl=>{v();m();_();Object.defineProperty(pl,\"__esModule\",{value:!0});var dl=(ye(),X(_e)),bS=Dt(),wS=os(),kt,as,ai,vg=!1;function _S(){let t=new bS.Transform;return t._write=(e,r,i)=>{kt.sendSocketMessage({data:e.buffer,success(){i();},fail(){i(new Error);}});},t._flush=e=>{kt.closeSocket({success(){e();}});},t}function mS(t){t.hostname||(t.hostname=\"localhost\"),t.path||(t.path=\"/\"),t.wsOptions||(t.wsOptions={});}function vS(t,e){let r=t.protocol===\"alis\"?\"wss\":\"ws\",i=`${r}://${t.hostname}${t.path}`;return t.port&&t.port!==80&&t.port!==443&&(i=`${r}://${t.hostname}:${t.port}${t.path}`),typeof t.transformWsUrl==\"function\"&&(i=t.transformWsUrl(i,t,e)),i}function ES(){vg||(vg=!0,kt.onSocketOpen(()=>{ai.socketReady();}),kt.onSocketMessage(t=>{if(typeof t.data==\"string\"){let e=dl.Buffer.from(t.data,\"base64\");as.push(e);}else {let e=new FileReader;e.addEventListener(\"load\",()=>{let r=e.result;r instanceof ArrayBuffer?r=dl.Buffer.from(r):r=dl.Buffer.from(r,\"utf8\"),as.push(r);}),e.readAsArrayBuffer(t.data);}}),kt.onSocketClose(()=>{ai.end(),ai.destroy();}),kt.onSocketError(t=>{ai.destroy(t);}));}var SS=(t,e)=>{if(e.hostname=e.hostname||e.host,!e.hostname)throw new Error(\"Could not determine host. Specify host manually.\");let r=e.protocolId===\"MQIsdp\"&&e.protocolVersion===3?\"mqttv3.1\":\"mqtt\";mS(e);let i=vS(e,t);return kt=e.my,kt.connectSocket({url:i,protocols:r}),as=_S(),ai=new wS.BufferedDuplex(e,as,kt),ES(),ai};pl.default=SS;});var Sg=M((PD,Eg)=>{v();m();_();Eg.exports=function(){throw new Error(\"ws does not work in the browser. Browser clients must use the native WebSocket object\")};});var _l=M(Ui=>{v();m();_();var wl=Ui&&Ui.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Ui,\"__esModule\",{value:!0});var yl=(ye(),X(_e)),Ag=wl(Sg()),AS=wl(ot()),IS=Dt(),Ig=wl(Pi()),bl=os(),Kt=(0, AS.default)(\"mqttjs:ws\"),TS=[\"rejectUnauthorized\",\"ca\",\"cert\",\"key\",\"pfx\",\"passphrase\"];function Tg(t,e){let r=`${t.protocol}://${t.hostname}:${t.port}${t.path}`;return typeof t.transformWsUrl==\"function\"&&(r=t.transformWsUrl(r,t,e)),r}function Rg(t){let e=t;return t.hostname||(e.hostname=\"localhost\"),t.port||(t.protocol===\"wss\"?e.port=443:e.port=80),t.path||(e.path=\"/\"),t.wsOptions||(e.wsOptions={}),!Ig.default&&t.protocol===\"wss\"&&TS.forEach(r=>{Object.prototype.hasOwnProperty.call(t,r)&&!Object.prototype.hasOwnProperty.call(t.wsOptions,r)&&(e.wsOptions[r]=t[r]);}),e}function RS(t){let e=Rg(t);if(e.hostname||(e.hostname=e.host),!e.hostname){if(typeof document>\"u\")throw new Error(\"Could not determine host. Specify host manually.\");let r=new URL(document.URL);e.hostname=r.hostname,e.port||(e.port=Number(r.port));}return e.objectMode===void 0&&(e.objectMode=!(e.binary===!0||e.binary===void 0)),e}function CS(t,e,r){Kt(\"createWebSocket\"),Kt(`protocol: ${r.protocolId} ${r.protocolVersion}`);let i=r.protocolId===\"MQIsdp\"&&r.protocolVersion===3?\"mqttv3.1\":\"mqtt\";Kt(`creating new Websocket for url: ${e} and protocol: ${i}`);let n;return r.createWebsocket?n=r.createWebsocket(e,[i],r):n=new Ag.default(e,[i],r.wsOptions),n}function BS(t,e){let r=e.protocolId===\"MQIsdp\"&&e.protocolVersion===3?\"mqttv3.1\":\"mqtt\",i=Tg(e,t),n;return e.createWebsocket?n=e.createWebsocket(i,[r],e):n=new WebSocket(i,[r]),n.binaryType=\"arraybuffer\",n}var PS=(t,e)=>{Kt(\"streamBuilder\");let r=Rg(e),i=Tg(r,t),n=CS(t,i,r),o=Ag.default.createWebSocketStream(n,r.wsOptions);return o.url=i,n.on(\"close\",()=>{o.destroy();}),o},OS=(t,e)=>{Kt(\"browserStreamBuilder\");let r,n=RS(e).browserBufferSize||1024*512,o=e.browserBufferTimeout||1e3,s=!e.objectMode,a=BS(t,e),u=h(e,E,S);e.objectMode||(u._writev=bl.writev.bind(u)),u.on(\"close\",()=>{a.close();});let c=typeof a.addEventListener<\"u\";a.readyState===a.OPEN?(r=u,r.socket=a):(r=new bl.BufferedDuplex(e,u,a),c?a.addEventListener(\"open\",d):a.onopen=d),c?(a.addEventListener(\"close\",g),a.addEventListener(\"error\",y),a.addEventListener(\"message\",w)):(a.onclose=g,a.onerror=y,a.onmessage=w);function h(I,C,R){let U=new IS.Transform({objectMode:I.objectMode});return U._write=C,U._flush=R,U}function d(){Kt(\"WebSocket onOpen\"),r instanceof bl.BufferedDuplex&&r.socketReady();}function g(I){Kt(\"WebSocket onClose\",I),r.end(),r.destroy();}function y(I){Kt(\"WebSocket onError\",I);let C=new Error(\"WebSocket error\");C.event=I,r.destroy(C);}function w(I){let{data:C}=I;C instanceof ArrayBuffer?C=yl.Buffer.from(C):C=yl.Buffer.from(C,\"utf8\"),u.push(C);}function E(I,C,R){if(a.bufferedAmount>n){setTimeout(E,o,I,C,R);return}s&&typeof I==\"string\"&&(I=yl.Buffer.from(I,\"utf8\"));try{a.send(I);}catch(U){return R(U)}R();}function S(I){a.close(),I();}return r};Ui.default=Ig.default?OS:PS;});var Pg=M(Rr=>{v();m();_();var ls=Rr&&Rr.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Rr,\"__esModule\",{value:!0});Rr.connectAsync=void 0;var kS=ls(ot()),xS=ls((pg(),X(dg))),MS=ls(ns()),LS=ls(Pi()),Cg=(0, kS.default)(\"mqttjs\"),Re={};LS.default?(Re.wx=hl().default,Re.wxs=hl().default,Re.ali=gl().default,Re.alis=gl().default):(Re.mqtt=ol().default,Re.tcp=ol().default,Re.ssl=ll().default,Re.tls=Re.ssl,Re.mqtts=ll().default);Re.ws=_l().default;Re.wss=_l().default;function US(t){let e;t.auth&&(e=t.auth.match(/^(.+):(.+)$/),e?(t.username=e[1],t.password=e[2]):t.username=t.auth);}function Bg(t,e){if(Cg(\"connecting to an MQTT broker...\"),typeof t==\"object\"&&!e&&(e=t,t=\"\"),e=e||{},t&&typeof t==\"string\"){let n=xS.default.parse(t,!0);if(n.port!=null&&(n.port=Number(n.port)),e=Object.assign(Object.assign({},n),e),e.protocol===null)throw new Error(\"Missing protocol\");e.protocol=e.protocol.replace(/:$/,\"\");}if(US(e),e.query&&typeof e.query.clientId==\"string\"&&(e.clientId=e.query.clientId),e.cert&&e.key)if(e.protocol){if([\"mqtts\",\"wss\",\"wxs\",\"alis\"].indexOf(e.protocol)===-1)switch(e.protocol){case\"mqtt\":e.protocol=\"mqtts\";break;case\"ws\":e.protocol=\"wss\";break;case\"wx\":e.protocol=\"wxs\";break;case\"ali\":e.protocol=\"alis\";break;default:throw new Error(`Unknown protocol for secure connection: \"${e.protocol}\"!`)}}else throw new Error(\"Missing secure protocol key\");if(!Re[e.protocol]){let n=[\"mqtts\",\"wss\"].indexOf(e.protocol)!==-1;e.protocol=[\"mqtt\",\"mqtts\",\"ws\",\"wss\",\"wx\",\"wxs\",\"ali\",\"alis\"].filter((o,s)=>n&&s%2===0?!1:typeof Re[o]==\"function\")[0];}if(e.clean===!1&&!e.clientId)throw new Error(\"Missing clientId for unclean clients\");e.protocol&&(e.defaultProtocol=e.protocol);function r(n){return e.servers&&((!n._reconnectCount||n._reconnectCount===e.servers.length)&&(n._reconnectCount=0),e.host=e.servers[n._reconnectCount].host,e.port=e.servers[n._reconnectCount].port,e.protocol=e.servers[n._reconnectCount].protocol?e.servers[n._reconnectCount].protocol:e.defaultProtocol,e.hostname=e.host,n._reconnectCount++),Cg(\"calling streambuilder for\",e.protocol),Re[e.protocol](n,e)}let i=new MS.default(r,e);return i.on(\"error\",()=>{}),i}function NS(t,e,r=!0){return new Promise((i,n)=>{let o=Bg(t,e),s={connect:u=>{a(),i(o);},end:()=>{a(),i(o);},error:u=>{a(),o.end(),n(u);}};r===!1&&(s.close=()=>{s.error(new Error(\"Couldn't connect to server\"));});function a(){Object.keys(s).forEach(u=>{o.off(u,s[u]);});}Object.keys(s).forEach(u=>{o.on(u,s[u]);});})}Rr.connectAsync=NS;Rr.default=Bg;});var ml=M(G=>{v();m();_();var Og=G&&G.__createBinding||(Object.create?function(t,e,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(e,r);(!n||(\"get\"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,i,n);}:function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r];}),qS=G&&G.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,\"default\",{enumerable:!0,value:e});}:function(t,e){t.default=e;}),DS=G&&G.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!==\"default\"&&Object.prototype.hasOwnProperty.call(t,r)&&Og(e,t,r);return qS(e,t),e},kg=G&&G.__exportStar||function(t,e){for(var r in t)r!==\"default\"&&!Object.prototype.hasOwnProperty.call(e,r)&&Og(e,t,r);},Ni=G&&G.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(G,\"__esModule\",{value:!0});G.ReasonCodes=G.PingTimer=G.UniqueMessageIdProvider=G.DefaultMessageIdProvider=G.Store=G.MqttClient=G.connectAsync=G.connect=G.Client=void 0;var xg=Ni(ns());G.MqttClient=xg.default;var jS=Ni(Yo());G.DefaultMessageIdProvider=jS.default;var FS=Ni($p());G.UniqueMessageIdProvider=FS.default;var WS=Ni(Zo());G.Store=WS.default;var Mg=DS(Pg());G.connect=Mg.default;Object.defineProperty(G,\"connectAsync\",{enumerable:!0,get:function(){return Mg.connectAsync}});var $S=Ni(Da());G.PingTimer=$S.default;G.Client=xg.default;kg(ns(),G);kg(Jr(),G);var HS=Ai();Object.defineProperty(G,\"ReasonCodes\",{enumerable:!0,get:function(){return HS.ReasonCodes}});});var QS=M(We=>{v();m();_();var Lg=We&&We.__createBinding||(Object.create?function(t,e,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(e,r);(!n||(\"get\"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,i,n);}:function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r];}),VS=We&&We.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,\"default\",{enumerable:!0,value:e});}:function(t,e){t.default=e;}),zS=We&&We.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!==\"default\"&&Object.prototype.hasOwnProperty.call(t,r)&&Lg(e,t,r);return VS(e,t),e},KS=We&&We.__exportStar||function(t,e){for(var r in t)r!==\"default\"&&!Object.prototype.hasOwnProperty.call(e,r)&&Lg(e,t,r);};Object.defineProperty(We,\"__esModule\",{value:!0});var GS=zS(ml());We.default=GS;KS(ml(),We);});var mqtt = QS();\n/*! Bundled license information:\n\n@jspm/core/nodelibs/browser/buffer.js:\n (*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh *)\n*/\n\nclass CloudInteropAPI {\n connectParams;\n _sessionDetails;\n _mqttClient;\n reconnectRetryLimit = 30;\n reconnectRetries = 0;\n contextListener;\n constructor(connectParams) {\n this.connectParams = connectParams;\n }\n get sessionDetails() {\n return this._sessionDetails;\n }\n get mqttClient() {\n return this._mqttClient;\n }\n async connect(params) {\n const { userId, password, sourceId, platformId } = params;\n let connectResponse;\n try {\n connectResponse = await axios.post(`${this.connectParams.url}/sessions`, {\n userId,\n sourceId,\n platformId\n });\n if (connectResponse.status !== 200) {\n throw new Error(`Failed to connect to Cloud Interop url: ${this.connectParams.url}`);\n }\n const { sessionRootTopic } = connectResponse.data;\n const lastWillPayload = {\n userId,\n sourceId,\n platformId,\n sessionId: connectResponse.data.sessionId\n };\n const clientOptions = {\n clientId: connectResponse.data.sessionId,\n clean: true,\n protocolVersion: 5,\n will: {\n topic: 'interop/lastwill',\n payload: Buffer.from(JSON.stringify(lastWillPayload)),\n qos: 0,\n retain: false\n },\n username: userId,\n password\n };\n this._mqttClient = await mqtt.connectAsync(connectResponse.data.mqttUrl, clientOptions);\n this._sessionDetails = connectResponse.data;\n console.log(`Cloud Interop successfully connected to ${this.connectParams.url}`);\n this._mqttClient.on('error', (error) => {\n console.error(`Cloud Interop Error: ${error}`);\n });\n this._mqttClient.stream.on('error', (error) => {\n console.error(`Cloud Interop Connection Error: ${error}`);\n });\n this._mqttClient.on('reconnect', () => {\n console.warn(`Cloud Interop attempting reconnection...`);\n // Default reconnectPeriod = 30 seconds\n // Attempt reconnection 30 times before ending session\n this.reconnectRetries += 1;\n if (this.reconnectRetries === this.reconnectRetryLimit) {\n console.warn(`Cloud Interop reached max reconnection attempts...`);\n this.disconnect();\n }\n });\n // Does not fire on initial connection, only successful reconnection attempts\n this._mqttClient.on('connect', () => {\n console.log(`Cloud Interop successfully reconnected`);\n this.reconnectRetries = 0;\n });\n this._mqttClient.on('message', (topic, message) => {\n this.handleCommand(topic, message, this._sessionDetails);\n });\n // Subscribe to all context groups\n this._mqttClient.subscribe(`${sessionRootTopic}/context-groups/#`);\n // Listen out for global commands\n this._mqttClient.subscribe(`${sessionRootTopic}/commands`);\n }\n catch (error) {\n console.warn(`Failed to connect to Cloud Interop at ${this.connectParams.url}`, error);\n }\n }\n async disconnect() {\n if (!this._sessionDetails) {\n return;\n }\n try {\n const disconnectResponse = await axios.delete(`${this.connectParams.url}/sessions/${this._sessionDetails.sessionId}`);\n if (disconnectResponse.status !== 200) {\n console.warn(`Cloud Interop disconnection failed`, disconnectResponse);\n }\n }\n catch (error) {\n console.warn(`Cloud Interop error during disconnection`, error);\n }\n finally {\n this._mqttClient?.removeAllListeners();\n this._mqttClient?.end(true);\n this._sessionDetails = undefined;\n this._mqttClient = undefined;\n this.reconnectRetries = 0;\n }\n }\n async setContext(contextGroup, context) {\n if (!this._sessionDetails) {\n return;\n }\n const { userId, sourceId } = this.connectParams;\n const payload = {\n userId,\n sourceId,\n context\n };\n await axios.post(`${this.connectParams.url}/context-groups/${this._sessionDetails.sessionId}/${contextGroup}`, payload);\n }\n addContextListener(callback) {\n this.contextListener = callback;\n }\n startIntentDiscovery(intentName, context) {\n throw new Error('Method not implemented.');\n }\n endIntentDiscovery(discoveryId) {\n throw new Error('Method not implemented.');\n }\n sendIntentDetail(discoveryId, intentDetail) {\n throw new Error('Method not implemented.');\n }\n raiseIntent(targetSession, intentInstanceId, context) {\n throw new Error('Method not implemented.');\n }\n addIntentDetailListener(callback) {\n throw new Error('Method not implemented.');\n }\n handleCommand(topic, message, sessionDetails) {\n if (message.length === 0 || !sessionDetails) {\n // Ignore clean up messages\n return;\n }\n const messageEnvelope = JSON.parse(message.toString());\n if (topic.startsWith(`${sessionDetails.sessionRootTopic}/context-groups/`)) {\n if (messageEnvelope.source.sessionId === sessionDetails.sessionId) {\n return;\n }\n if (this.contextListener) {\n const { channelName: contextGroup, payload: context, source } = messageEnvelope;\n this.contextListener(contextGroup, context, source);\n }\n }\n }\n}\n\nasync function cloudInteropOverride(config) {\n const client = new CloudInteropAPI(config);\n try {\n await client.connect(config);\n }\n catch (err) {\n console.warn(err);\n return (Base) => {\n return class NoOpOverride extends Base {\n constructor() {\n super();\n }\n };\n };\n }\n return (Base) => {\n return class CloudInteropOverride extends Base {\n constructor() {\n super();\n client.addContextListener((contextGroup, context, source) => {\n if (this.getContextGroups()\n .map(({ id }) => id)\n .includes(contextGroup) &&\n client.sessionDetails?.sessionId !== source.sessionId) {\n super.setContextForGroup({ context: context }, contextGroup);\n }\n });\n }\n async setContextForGroup({ context }, contextGroupId) {\n client.setContext(contextGroupId, context);\n super.setContextForGroup({ context }, contextGroupId);\n }\n async cloudReconnect() {\n await client.connect(config);\n }\n get cloudConnectionState() {\n if (client.mqttClient?.connected) {\n return 'connected';\n }\n if (client.mqttClient?.reconnecting) {\n return 'reconnecting';\n }\n return 'disconnected';\n }\n };\n };\n}\n\nexport { cloudInteropOverride };\n","\"use strict\";var e=require(\"./main-8cad4070.js\");require(\"buffer/\"),require(\"uuid\"),require(\"events\"),require(\"lodash/cloneDeep\"),require(\"lodash/isEqual\"),exports.connect=e.connect;\n","\"use strict\";var e=require(\"buffer/\"),t=require(\"events\"),n=require(\"lodash/cloneDeep\"),i=require(\"lodash/isEqual\"),r=require(\"uuid\");const o=(e,t)=>`${t}<${btoa(JSON.stringify(e))}>`;var s=\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof window?window:\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:{},a={},c={},d={},h={};async function l(e){const t=[];for(const n of e){const e=await n();t.push(e)}return t}Object.defineProperty(h,\"__esModule\",{value:!0}),h.promiseMapSerial=h.serial=h.promiseMap=h.promisify=void 0,h.promisify=function(e){return(...t)=>new Promise(((n,i)=>{e(...t,((e,t)=>e?i(e):n(t)))}))},h.promiseMap=async function(e,t){return Promise.all(e.map(t))},h.serial=l,h.promiseMapSerial=async function(e,t){return l(e.map(((e,n,i)=>()=>t(e,n,i))))};var u,p=s&&s.__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},w=s&&s.__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)};Object.defineProperty(d,\"__esModule\",{value:!0}),d.Reply=d.EmitterBase=d.Base=void 0;const y=h;class f{constructor(e){this.isNodeEnvironment=()=>\"node\"===this.wire.environment.type,this.isOpenFinEnvironment=()=>\"openfin\"===this.wire.environment.type,this.isBrowserEnvironment=()=>\"other\"===this.wire.environment.type,this.wire=e}get fin(){return this.wire.getFin()}get me(){return this.wire.me}}d.Base=f;d.EmitterBase=class extends f{constructor(e,t,...n){super(e),this.topic=t,u.set(this,void 0),this.eventNames=()=>this.hasEmitter()?this.getOrCreateEmitter().eventNames():[],this.emit=(e,t,...n)=>!!this.hasEmitter()&&this.getOrCreateEmitter().emit(e,t,...n),this.hasEmitter=()=>this.wire.eventAggregator.has(w(this,u,\"f\")),this.getOrCreateEmitter=()=>this.wire.eventAggregator.getOrCreate(w(this,u,\"f\")),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[],this.listenerCount=e=>this.hasEmitter()?this.getOrCreateEmitter().listenerCount(e):0,this.registerEventListener=async(e,t={},n,i)=>{const r={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e},o=this.getOrCreateEmitter();n(o);try{await this.wire.sendAction(\"subscribe-to-desktop-event\",r)}catch(e){throw i(o),this.deleteEmitterIfNothingRegistered(o),e}},this.deregisterEventListener=async(e,t={})=>{if(this.hasEmitter()){const n={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e};await this.wire.sendAction(\"unsubscribe-to-desktop-event\",n).catch((()=>null));return this.getOrCreateEmitter()}return Promise.resolve()},p(this,u,[t,...n],\"f\"),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[]}async on(e,t,n){return await this.registerEventListener(e,n,(n=>{n.on(e,t)}),(n=>{n.removeListener(e,t)})),this}async addListener(e,t,n){return this.on(e,t,n)}async once(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.once(e,i),n.once(e,t)}),(n=>{n.removeListener(e,i),n.removeListener(e,t)})),this}async prependListener(e,t,n){return await this.registerEventListener(e,n,(n=>{n.prependListener(e,t)}),(n=>{n.removeListener(e,t)})),this}async prependOnceListener(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.prependOnceListener(e,t),n.once(e,i)}),(n=>{n.removeListener(e,t),n.removeListener(e,i)})),this}async removeListener(e,t,n){const i=await this.deregisterEventListener(e,n);return i&&(i.removeListener(e,t),this.deleteEmitterIfNothingRegistered(i)),this}async deregisterAllListeners(e){const t={...this.identity,type:e,topic:this.topic};if(this.hasEmitter()){const e=this.getOrCreateEmitter(),n=e.listenerCount(t.type),i=[];for(let e=0;enull)));return await Promise.all(i),e}}async removeAllListeners(e){const t=async e=>{const t=await this.deregisterAllListeners(e);t&&(t.removeAllListeners(e),this.deleteEmitterIfNothingRegistered(t))};if(e)await t(e);else if(this.hasEmitter()){const e=this.getOrCreateEmitter().eventNames();await(0,y.promiseMap)(e,t)}return this}deleteEmitterIfNothingRegistered(e){0===e.eventNames().length&&this.wire.eventAggregator.delete(w(this,u,\"f\"))}},u=new WeakMap;d.Reply=class{};var g={};Object.defineProperty(g,\"__esModule\",{value:!0});var m=g.RuntimeError=g.NotSupportedError=g.NotImplementedError=g.NoAckError=g.DuplicateCorrelationError=g.UnexpectedActionError=g.DisconnectedError=void 0;class v extends Error{constructor(e){super(`Expected websocket state OPEN but found ${e}`),this.readyState=e}}g.DisconnectedError=v;class C extends Error{}g.UnexpectedActionError=C;class b extends Error{}g.DuplicateCorrelationError=b;class I extends Error{}g.NoAckError=I;class E extends Error{}g.NotImplementedError=E;class x extends Error{}g.NotSupportedError=x;class A extends Error{constructor(e){const{message:t,name:n,stack:i,...r}=e;super(t),this.name=n||\"Error\",this.stack=i??this.toString(),Object.keys(r).forEach((e=>{this[e]=r[e]}))}}class P extends Error{static getCallSite(e=0){const t=Error.stackTraceLimit,n=e+1;Error.stackTraceLimit=t+n;const i=Error.prepareStackTrace;Error.prepareStackTrace=(e,t)=>t;const r=(new Error).stack?.slice(n)??[];return Error.prepareStackTrace=i,Error.stackTraceLimit=t,r}static prepareStackTrace(e,t){if(\"function\"==typeof Error.prepareStackTrace)return Error.prepareStackTrace(e,t);let n=\"\";n+=e.name||\"Error\",n+=`: ${e.message||\"\"}`;for(const e of t)n+=`\\n at ${e.toString()}`;return n}constructor(e,t){const{reason:n,error:i}=e;super(n),this.name=\"RuntimeError\",i?.stack&&(this.cause=new A(i)),t&&(this.stack=P.prepareStackTrace(this,t))}}m=g.RuntimeError=P;var M={},_={},O={};Object.defineProperty(O,\"__esModule\",{value:!0}),O.validateIdentity=void 0,O.validateIdentity=function(e){let t;return\"object\"==typeof e&&\"string\"==typeof e.uuid||(t=\"Not a valid identity object\"),t};var S={},R={},F={},j={},k={},L={},T={};Object.defineProperty(T,\"__esModule\",{value:!0}),T.handleDeprecatedWarnings=void 0;var $;T.handleDeprecatedWarnings=e=>{(e.contentNavigation?.whitelist||e.contentNavigation?.blacklist||e.contentRedirect?.whitelist||e.contentRedirect?.blacklist)&&console.warn(\"The properties 'whitelist' and 'blacklist' have been marked as deprecated and will be removed in a future version. Please use 'allowlist' and 'denylist'.\")};var B={},G={};Object.defineProperty(G,\"__esModule\",{value:!0}),G.AsyncRetryableLazy=W=G.Lazy=void 0;var W=G.Lazy=class{constructor(e){this.producerFn=e}getValue(){return this.value||(this.value=this.producerFn()),this.value}};G.AsyncRetryableLazy=class{constructor(e){this.producerFn=e}async getValue(){return this.promise||(this.promise=this.producerFn().catch((e=>{throw delete this.promise,e}))),this.promise}};var H={};Object.defineProperty(H,\"__esModule\",{value:!0}),H.WebContents=void 0;const N=d;class D extends N.EmitterBase{constructor(e,t,n){super(e,n,t.uuid,t.name),this.identity=t,this.entityType=n}capturePage(e){return this.wire.sendAction(\"capture-page\",{options:e,...this.identity}).then((({payload:e})=>e.data))}executeJavaScript(e){return this.wire.sendAction(\"execute-javascript-in-window\",{...this.identity,code:e}).then((({payload:e})=>e.data))}getZoomLevel(){return this.wire.sendAction(\"get-zoom-level\",this.identity).then((({payload:e})=>e.data))}setZoomLevel(e){return this.wire.sendAction(\"set-zoom-level\",{...this.identity,level:e}).then((()=>{}))}navigate(e){return this.wire.sendAction(\"navigate-window\",{...this.identity,url:e}).then((()=>{}))}navigateBack(){return this.wire.sendAction(\"navigate-window-back\",{...this.identity}).then((()=>{}))}async navigateForward(){await this.wire.sendAction(\"navigate-window-forward\",{...this.identity})}stopNavigation(){return this.wire.sendAction(\"stop-window-navigation\",{...this.identity}).then((()=>{}))}reload(e=!1){return this.wire.sendAction(\"reload-window\",{ignoreCache:e,...this.identity}).then((()=>{}))}print(e={}){return this.wire.sendAction(\"print\",{...this.identity,options:e}).then((()=>{}))}findInPage(e,t){return this.wire.sendAction(\"find-in-page\",{...this.identity,searchTerm:e,options:t}).then((({payload:e})=>e.data))}stopFindInPage(e){return this.wire.sendAction(\"stop-find-in-page\",{...this.identity,action:e}).then((()=>{}))}getPrinters(){return this.wire.sendAction(\"get-printers\",{...this.identity}).then((({payload:e})=>e.data))}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){await this.wire.sendAction(\"focus-window\",{emitSynthFocused:e,...this.identity})}async showDeveloperTools(){await this.wire.sendAction(\"show-developer-tools\",this.identity)}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction(\"get-process-info\",this.identity);return e}async getSharedWorkers(){return this.wire.sendAction(\"get-shared-workers\",this.identity).then((({payload:e})=>e.data))}async inspectSharedWorker(){await this.wire.sendAction(\"inspect-shared-worker\",{...this.identity})}async inspectSharedWorkerById(e){await this.wire.sendAction(\"inspect-shared-worker-by-id\",{...this.identity,workerId:e})}async inspectServiceWorker(){await this.wire.sendAction(\"inspect-service-worker\",{...this.identity})}async showPopupWindow(e){if(this.wire.sendAction(`${this.entityType}-show-popup-window`,this.identity).catch((()=>{})),e?.onPopupReady){const t=async({popupName:t})=>{try{const n=this.fin.Window.wrapSync({uuid:this.fin.me.uuid,name:t});await e.onPopupReady(n)}catch(e){throw new Error(`Something went wrong during onPopupReady execution: ${e}`)}};await this.once(\"popup-ready\",t)}const{payload:t}=await this.wire.sendAction(\"try-create-popup-window\",{options:{...e,hasResultCallback:!!e?.onPopupResult,hasReadyCallback:!!e?.onPopupReady},...this.identity}),{data:{willOpen:n,options:i}}=t;n&&await this.fin.Window.create(i.initialOptions);if(e?.onPopupResult){const t=async t=>{await e.onPopupResult((e=>{const{name:t,uuid:n,result:i,data:r}=e,o={identity:{name:t,uuid:n},result:i};return r&&(o.data=r),o})(t))},n=async()=>{await this.removeListener(\"popup-result\",t)};await this.on(\"popup-result\",t),await this.once(\"popup-teardown\",n)}const{payload:r}=await this.wire.sendAction(\"show-popup-window\",{options:i,...this.identity});return r.data}}var U,V,z,K,q;function J(){return V||(V=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(function(){if($)return L;$=1,Object.defineProperty(L,\"__esModule\",{value:!0}),L.ViewModule=void 0;const e=d,t=O,n=J(),i=T;class r extends e.Base{async create(e){const{uuid:t}=this.wire.me;if(!e.name||\"string\"!=typeof e.name)throw new Error(\"Please provide a name property as a string in order to create a View.\");return(0,i.handleDeprecatedWarnings)(e),this.wire.environment.childViews?await this.wire.environment.createChildContent({entityType:\"view\",options:{...e,uuid:t}}):await this.wire.sendAction(\"create-view\",{...e,uuid:t}),this.wrapSync({uuid:t,name:e.name})}async wrap(e){this.wire.sendAction(\"view-wrap\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}wrapSync(e){this.wire.sendAction(\"view-wrap-sync\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}getCurrent(){if(this.wire.sendAction(\"view-get-current\").catch((e=>{})),!this.wire.me.isView)throw new Error(\"You are not in a View context\");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction(\"view-get-current-sync\").catch((e=>{})),!this.wire.me.isView)throw new Error(\"You are not in a View context\");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return L.ViewModule=r,L}(),e),n(function(){if(U)return B;var e;U=1,Object.defineProperty(B,\"__esModule\",{value:!0}),B.View=void 0;const t=g,n=G,i=H,r=ie();class o extends i.WebContents{constructor(i,o){super(i,o,\"view\"),this.identity=o,e.set(this,new n.Lazy((()=>this.fin.Platform.wrapSync(this.identity).getClient()))),this.attach=async e=>{await this.wire.sendAction(\"attach-view\",{target:e,...this.identity})},this.destroy=async()=>{await this.wire.sendAction(\"destroy-view\",{...this.identity})},this.show=async()=>{await this.wire.sendAction(\"show-view\",{...this.identity})},this.showAt=async(e,t={})=>{await this.wire.sendAction(\"show-view-at\",{bounds:e,...this.identity,options:t})},this.bringToFront=async()=>{await this.wire.sendAction(\"bring-view-to-front\",{...this.identity})},this.hide=async()=>{await this.wire.sendAction(\"hide-view\",{...this.identity})},this.setBounds=async e=>{await this.wire.sendAction(\"set-view-bounds\",{bounds:e,...this.identity})},this.getBounds=async()=>(await this.wire.sendAction(\"get-view-bounds\",{...this.identity})).payload.data,this.getInfo=async()=>(await this.wire.sendAction(\"get-view-info\",{...this.identity})).payload.data,this.getParentLayout=async()=>(this.wire.sendAction(\"view-get-parent-layout\",{...this.identity}).catch((()=>{})),this.fin.Platform.Layout.getLayoutByViewIdentity(this.identity)),this.getOptions=async()=>this.wire.sendAction(\"get-view-options\",{...this.identity}).then((({payload:e})=>e.data)),this.updateOptions=async e=>this.wire.sendAction(\"update-view-options\",{options:e,...this.identity}).then((()=>{})),this.getCurrentWindow=async()=>{const{payload:{data:e}}=await this.wire.sendAction(\"get-view-window\",{...this.identity});return new r._Window(this.wire,e)},this.getCurrentStack=async()=>{this.wire.sendAction(\"view-get-current-stack\").catch((()=>{}));try{return(await this.getParentLayout()).getStackByViewIdentity(this.identity)}catch(e){throw new t.RuntimeError({reason:\"This view does not belong to a stack.\",error:e})}},this.triggerBeforeUnload=async()=>(await this.wire.sendAction(\"trigger-before-unload\",{...this.identity})).payload.data,this.bindToElement=async e=>{if(!e)throw new Error(\"Element not found.\");return this.wire.environment.observeBounds(e,(async e=>this.setBounds(e)))}}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){const t=await this.getCurrentWindow();await t.focusedWebViewWasChanged(),await super.focus({emitSynthFocused:e})}}return B.View=o,e=new WeakMap,B}(),e)}(k)),k}function Y(){if(z)return j;z=1,Object.defineProperty(j,\"__esModule\",{value:!0}),j.Application=void 0;const e=d,t=ie(),n=J();class i extends e.EmitterBase{constructor(e,n){super(e,\"application\",n.uuid),this.identity=n,this.window=new t._Window(this.wire,{uuid:this.identity.uuid,name:this.identity.uuid})}windowListFromIdentityList(e){const n=[];return e.forEach((e=>{n.push(new t._Window(this.wire,{uuid:e.uuid,name:e.name}))})),n}isRunning(){return this.wire.sendAction(\"is-application-running\",this.identity).then((({payload:e})=>e.data))}async quit(e=!1){try{await this._close(e),await this.wire.sendAction(\"destroy-application\",{force:e,...this.identity})}catch(e){if(![\"Remote connection has closed\",\"Could not locate the requested application\"].some((t=>e.message.includes(t))))throw e}}async _close(e=!1){try{await this.wire.sendAction(\"close-application\",{force:e,...this.identity})}catch(e){if(!e.message.includes(\"Remote connection has closed\"))throw e}}close(e=!1){return console.warn(\"Deprecation Warning: Application.close is deprecated Please use Application.quit\"),this.wire.sendAction(\"application-close\",this.identity).catch((e=>{})),this._close(e)}getChildWindows(){return this.wire.sendAction(\"get-child-windows\",this.identity).then((({payload:e})=>{const t=[];return e.data.forEach((e=>{t.push({uuid:this.identity.uuid,name:e})})),this.windowListFromIdentityList(t)}))}getManifest(){return this.wire.sendAction(\"get-application-manifest\",this.identity).then((({payload:e})=>e.data))}getParentUuid(){return this.wire.sendAction(\"get-parent-application\",this.identity).then((({payload:e})=>e.data))}getShortcuts(){return this.wire.sendAction(\"get-shortcuts\",this.identity).then((({payload:e})=>e.data))}async getViews(){const{payload:e}=await this.wire.sendAction(\"application-get-views\",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}getZoomLevel(){return this.wire.sendAction(\"get-application-zoom-level\",this.identity).then((({payload:e})=>e.data))}getWindow(){return this.wire.sendAction(\"application-get-window\",this.identity).catch((e=>{})),Promise.resolve(this.window)}registerUser(e,t){return this.wire.sendAction(\"register-user\",{userName:e,appName:t,...this.identity}).then((()=>{}))}removeTrayIcon(){return this.wire.sendAction(\"remove-tray-icon\",this.identity).then((()=>{}))}restart(){return this.wire.sendAction(\"restart-application\",this.identity).then((()=>{}))}run(){return console.warn(\"Deprecation Warning: Application.run is deprecated Please use fin.Application.start\"),this.wire.sendAction(\"application-run\",this.identity).catch((e=>{})),this._run()}_run(e={}){return this.wire.sendAction(\"run-application\",{manifestUrl:this._manifestUrl,opts:e,...this.identity}).then((()=>{}))}scheduleRestart(){return this.wire.sendAction(\"relaunch-on-close\",this.identity).then((()=>{}))}async sendApplicationLog(){const{payload:e}=await this.wire.sendAction(\"send-application-log\",this.identity);return e.data}async setJumpList(e){await this.wire.sendAction(\"set-jump-list\",{config:e,...this.identity})}setTrayIcon(e){return this.wire.sendAction(\"set-tray-icon\",{enabledIcon:e,...this.identity}).then((()=>{}))}setShortcuts(e){return this.wire.sendAction(\"set-shortcuts\",{data:e,...this.identity}).then((()=>{}))}async setShortcutQueryParams(e){await this.wire.sendAction(\"set-shortcut-query-args\",{data:e,...this.identity})}setZoomLevel(e){return this.wire.sendAction(\"set-application-zoom-level\",{level:e,...this.identity}).then((()=>{}))}async setAppLogUsername(e){await this.wire.sendAction(\"set-app-log-username\",{data:e,...this.identity})}getTrayIconInfo(){return this.wire.sendAction(\"get-tray-icon-info\",this.identity).then((({payload:e})=>e.data))}hasTrayIcon(){return this.wire.sendAction(\"has-tray-icon\",this.identity).then((({payload:e})=>e.data))}terminate(){return this.wire.sendAction(\"terminate-application\",this.identity).then((()=>{}))}wait(){return this.wire.sendAction(\"wait-for-hung-application\",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction(\"get-info\",this.identity).then((({payload:e})=>e.data))}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction(\"application-get-process-info\",this.identity);return e}async setFileDownloadLocation(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t};await this.wire.sendAction(\"set-file-download-location\",{...n,downloadLocation:e})}async getFileDownloadLocation(){const{payload:{data:e}}=await this.wire.sendAction(\"get-file-download-location\",this.identity);return e}async showTrayIconPopupMenu(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t},{payload:i}=await this.wire.sendAction(\"show-tray-icon-popup-menu\",{...n,options:e});return i.data}async closeTrayIconPopupMenu(){const{name:e}=this.wire.me,t={uuid:this.identity.uuid,name:e};await this.wire.sendAction(\"close-tray-icon-popup-menu\",{...t})}}return j.Application=i,j}function Z(){return q||(q=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(function(){if(K)return F;K=1,Object.defineProperty(F,\"__esModule\",{value:!0}),F.ApplicationModule=void 0;const e=d,t=O,n=Y();class i extends e.Base{async wrap(e){this.wire.sendAction(\"wrap-application\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}wrapSync(e){this.wire.sendAction(\"wrap-application-sync\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}async _create(e){return void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&void 0===e.isPlatformController&&(e.autoShow=!0),await this.wire.sendAction(\"create-application\",e),this.wrap({uuid:e.uuid})}create(e){return console.warn(\"Deprecation Warning: fin.Application.create is deprecated. Please use fin.Application.start\"),this.wire.sendAction(\"application-create\").catch((e=>{})),this._create(e)}async start(e){this.wire.sendAction(\"start-application\").catch((e=>{}));const t=await this._create(e);return await this.wire.sendAction(\"run-application\",{uuid:e.uuid}),t}async startManyManifests(e,t){return this.wire.sendAction(\"run-applications\",{applications:e,opts:t}).then((()=>{}))}getCurrent(){return this.wire.sendAction(\"get-current-application\").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction(\"get-current-application-sync\").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}async startFromManifest(e,t){this.wire.sendAction(\"application-start-from-manifest\").catch((e=>{}));const n=await this._createFromManifest(e);return await n._run(t),n}createFromManifest(e){return console.warn(\"Deprecation Warning: fin.Application.createFromManifest is deprecated. Please use fin.Application.startFromManifest\"),this.wire.sendAction(\"application-create-from-manifest\").catch((e=>{})),this._createFromManifest(e)}_createFromManifest(e){return this.wire.sendAction(\"get-application-manifest\",{manifestUrl:e}).then((({payload:e})=>{const t=e.data.platform?e.data.platform.uuid:e.data.startup_app.uuid;return this.wrap({uuid:t})})).then((t=>(t._manifestUrl=e,t)))}}return F.ApplicationModule=i,F}(),e),n(Y(),e)}(R)),R}H.WebContents=D;var Q={};Object.defineProperty(Q,\"__esModule\",{value:!0}),Q.promisifySubscription=void 0;var X,ee,te;function ne(){if(X)return S;X=1,Object.defineProperty(S,\"__esModule\",{value:!0}),S._Window=void 0;const e=Z(),t=H,n=J(),i=T,r=Q;class o extends t.WebContents{constructor(e,t){super(e,t,\"window\")}async createWindow(e){this.wire.sendAction(\"window-create-window\",this.identity).catch((e=>{}));const t=await(0,r.promisifySubscription)(this,\"fire-constructor-callback\");void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&(e.autoShow=!0),(0,i.handleDeprecatedWarnings)(e);const n=this.wire.environment.createChildContent({entityType:\"window\",options:e}),[o]=await Promise.all([t.getValue(),n]);let s;const{success:a}=o,c=o.data,{message:d}=c;s=a?{httpResponseCode:c.httpResponseCode,apiInjected:c.apiInjected}:{message:c.message,networkErrorCode:c.networkErrorCode,stack:c.stack};const h={message:d,cbPayload:s,success:a};try{this.getWebWindow().fin.__internal_.openerSuccessCBCalled()}catch(e){}return h.success?this:Promise.reject(h)}getAllFrames(){return this.wire.sendAction(\"get-all-frames\",this.identity).then((({payload:e})=>e.data))}getBounds(){return this.wire.sendAction(\"get-window-bounds\",this.identity).then((({payload:e})=>e.data))}center(){return this.wire.sendAction(\"center-window\",this.identity).then((()=>{}))}blur(){return this.wire.sendAction(\"blur-window\",this.identity).then((()=>{}))}bringToFront(){return this.wire.sendAction(\"bring-window-to-front\",this.identity).then((()=>{}))}animate(e,t){return this.wire.sendAction(\"animate-window\",{transitions:e,options:t,...this.identity}).then((()=>{}))}hide(){return this.wire.sendAction(\"hide-window\",this.identity).then((()=>{}))}close(e=!1){return this.wire.sendAction(\"close-window\",{force:e,...this.identity}).then((()=>{Object.setPrototypeOf(this,null)}))}focusedWebViewWasChanged(){return this.wire.sendAction(\"focused-webview-changed\",this.identity).then((()=>{}))}getNativeId(){return this.wire.sendAction(\"get-window-native-id\",this.identity).then((({payload:e})=>e.data))}async getCurrentViews(){const{payload:e}=await this.wire.sendAction(\"window-get-views\",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}disableFrame(){return console.warn(\"Function is deprecated; use disableUserMovement instead.\"),this.wire.sendAction(\"disable-window-frame\",this.identity).then((()=>{}))}disableUserMovement(){return this.wire.sendAction(\"disable-window-frame\",this.identity).then((()=>{}))}enableFrame(){return console.warn(\"Function is deprecated; use enableUserMovement instead.\"),this.wire.sendAction(\"enable-window-frame\",this.identity).then((()=>{}))}enableUserMovement(){return this.wire.sendAction(\"enable-window-frame\",this.identity).then((()=>{}))}flash(){return this.wire.sendAction(\"flash-window\",this.identity).then((()=>{}))}stopFlashing(){return this.wire.sendAction(\"stop-flash-window\",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction(\"get-window-info\",this.identity).then((({payload:e})=>e.data))}async getLayout(e){this.wire.sendAction(\"window-get-layout\",this.identity).catch((e=>{}));const t=await this.getOptions();if(!t.layout&&!t.layoutSnapshot)throw new Error(\"Window does not have a Layout\");return this.fin.Platform.Layout.wrap(e??this.identity)}getOptions(){return this.wire.sendAction(\"get-window-options\",this.identity).then((({payload:e})=>e.data))}getParentApplication(){return this.wire.sendAction(\"window-get-parent-application\",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity))}getParentWindow(){return this.wire.sendAction(\"window-get-parent-window\",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity)).then((e=>e.getWindow()))}async getSnapshot(e){const t={area:e,...this.identity};console.warn(\"Window.getSnapshot has been deprecated, please use Window.capturePage\");return(await this.wire.sendAction(\"get-window-snapshot\",t)).payload.data}getState(){return this.wire.sendAction(\"get-window-state\",this.identity).then((({payload:e})=>e.data))}getWebWindow(){return this.wire.sendAction(\"window-get-web-window\",this.identity).catch((e=>{})),this.wire.environment.getWebWindow(this.identity)}isMainWindow(){return this.wire.sendAction(\"window-is-main-window\",this.identity).catch((e=>{})),this.me.uuid===this.me.name}isShowing(){return this.wire.sendAction(\"is-window-showing\",this.identity).then((({payload:e})=>e.data))}maximize(){return this.wire.sendAction(\"maximize-window\",this.identity).then((()=>{}))}minimize(){return this.wire.sendAction(\"minimize-window\",this.identity).then((()=>{}))}moveBy(e,t,n){return this.wire.sendAction(\"move-window-by\",{deltaLeft:e,deltaTop:t,positioningOptions:n,...this.identity}).then((()=>{}))}moveTo(e,t,n){return this.wire.sendAction(\"move-window\",{left:e,top:t,positioningOptions:n,...this.identity}).then((()=>{}))}resizeBy(e,t,n,i){return this.wire.sendAction(\"resize-window-by\",{deltaWidth:Math.floor(e),deltaHeight:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}resizeTo(e,t,n,i){return this.wire.sendAction(\"resize-window\",{width:Math.floor(e),height:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}restore(){return this.wire.sendAction(\"restore-window\",this.identity).then((()=>{}))}setAsForeground(){return this.wire.sendAction(\"set-foreground-window\",this.identity).then((()=>{}))}setBounds(e,t){return this.wire.sendAction(\"set-window-bounds\",{...e,...this.identity,positioningOptions:t}).then((()=>{}))}show(e=!1){return this.wire.sendAction(\"show-window\",{force:e,...this.identity}).then((()=>{}))}showAt(e,t,n=!1){return this.wire.sendAction(\"show-at-window\",{force:n,left:Math.floor(e),top:Math.floor(t),...this.identity}).then((()=>{}))}updateOptions(e){return this.wire.sendAction(\"update-window-options\",{options:e,...this.identity}).then((()=>{}))}authenticate(e,t){return this.wire.sendAction(\"window-authenticate\",{userName:e,password:t,...this.identity}).then((()=>{}))}async showPopupMenu(e){const{payload:t}=await this.wire.sendAction(\"show-popup-menu\",{options:e,...this.identity});return t.data}async closePopupMenu(){return this.wire.sendAction(\"close-popup-menu\",{...this.identity}).then((()=>{}))}async dispatchPopupResult(e){this.wire.sendAction(\"window-dispatch-popup-result\",this.identity).catch((e=>{})),await this.wire.sendAction(\"dispatch-popup-result\",{data:e,...this.identity})}async print(e={content:\"self\"}){switch(e.content){case void 0:case\"self\":return super.print(e);case\"screenshot\":return this.wire.sendAction(\"print-screenshot\",this.identity).then((()=>{}));case\"views\":return this.wire.sendAction(\"print-views\",{...this.identity,options:e}).then((()=>{}));default:return}}}return S._Window=o,S}function ie(){return te||(te=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(function(){if(ee)return _;ee=1,Object.defineProperty(_,\"__esModule\",{value:!0}),_._WindowModule=void 0;const e=d,t=O,n=ne();class i extends e.Base{async wrap(e){this.wire.sendAction(\"window-wrap\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}wrapSync(e){this.wire.sendAction(\"window-wrap-sync\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}create(e){return this.wire.sendAction(\"create-window\").catch((e=>{})),new n._Window(this.wire,{uuid:this.me.uuid,name:e.name}).createWindow(e)}getCurrent(){if(this.wire.sendAction(\"get-current-window\").catch((e=>{})),!this.wire.me.isWindow)throw new Error(\"You are not in a Window context\");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction(\"get-current-window-sync\").catch((e=>{})),!this.wire.me.isWindow)throw new Error(\"You are not in a Window context\");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return _._WindowModule=i,_}(),e),n(ne(),e)}(M)),M}Q.promisifySubscription=async(e,t,n=(()=>!0),i)=>{let r,o,s;const a=new Promise(((e,t)=>{r=e,o=t})),c=e=>{n(e)&&(clearTimeout(s),r(e))};return await e.on(t,c),i&&(s=setTimeout((()=>o(new Error(\"event timed out\"))),i)),a.finally((()=>{e.removeListener(t,c).catch((()=>null))})),{getValue:()=>a}},Object.defineProperty(c,\"__esModule\",{value:!0}),c.System=void 0;const re=d,oe=g,se=ie(),ae=t;class ce extends re.EmitterBase{constructor(e){super(e,\"system\")}sendExternalProcessRequest(e,t){return new Promise(((n,i)=>{const r=\"external-process-exited\";let o,s,a,c;\"function\"==typeof t.listener&&(a=e=>{const n=e||{};s={topic:\"exited\",uuid:n.processUuid||\"\",exitCode:n.exitCode||0},o===e.processUuid&&(t.listener(s),c.removeListener(r,a))},this.wire.me.name||(this.wire.me.name=this.wire.me.uuid),c=new se._Window(this.wire,this.wire.me),c.on(r,a)),this.wire.sendAction(e,t).then((({payload:e})=>{o=e.data.uuid,n(e.data),s&&o===s.uuid&&(t.listener(s),c.removeListener(r,a))})).catch((e=>{c&&c.removeListener(r,a),i(e)}))}))}getVersion(){return this.wire.sendAction(\"get-version\").then((({payload:e})=>e.data))}clearCache(e){return this.wire.sendAction(\"clear-cache\",e).then((()=>{}))}deleteCacheOnExit(){return this.wire.sendAction(\"delete-cache-request\").then((()=>{}))}exit(){return this.wire.sendAction(\"exit-desktop\").then((()=>{}))}async fetchManifest(e){const{payload:{data:t}}=await this.wire.sendAction(\"fetch-manifest\",{manifestUrl:e});return t}flushCookieStore(){return this.wire.sendAction(\"flush-cookie-store\").then((()=>{}))}getAllWindows(){return this.wire.sendAction(\"get-all-windows\").then((({payload:e})=>e.data))}getAllApplications(){return this.wire.sendAction(\"get-all-applications\").then((({payload:e})=>e.data))}getCommandLineArguments(){return this.wire.sendAction(\"get-command-line-arguments\").then((({payload:e})=>e.data))}async getCrashReporterState(){const{payload:{data:{diagnosticMode:e,isRunning:t}}}=await this.wire.sendAction(\"get-crash-reporter-state\");return console.warn(\"diagnosticMode property is deprecated. It will be removed in a future version\"),{diagnosticMode:e,diagnosticsMode:e,isRunning:t}}async startCrashReporter(e){const t=e,n={...t,diagnosticMode:t.diagnosticsMode||t.diagnosticMode},{payload:{data:{diagnosticMode:i,isRunning:r}}}=await this.wire.sendAction(\"start-crash-reporter\",n);return{diagnosticMode:i,diagnosticsMode:i,isRunning:r}}getUniqueUserId(){return this.wire.sendAction(\"get-unique-user-id\").then((({payload:e})=>e.data))}getEntityInfo(e,t){return this.wire.sendAction(\"get-entity-info\",{uuid:e,name:t}).then((({payload:e})=>e.data))}getEnvironmentVariable(e){return this.wire.sendAction(\"get-environment-variable\",{environmentVariables:e}).then((({payload:e})=>e.data))}getFocusedWindow(){return this.wire.sendAction(\"get-focused-window\").then((({payload:e})=>e.data))}async isAppCertified(e){const{payload:{data:{certifiedInfo:t}}}=await this.wire.sendAction(\"is-app-certified\",{manifestUrl:e});return t}getInstalledRuntimes(){return this.wire.sendAction(\"get-installed-runtimes\").then((({payload:e})=>e.data.runtimes))}async getInstalledApps(){const{payload:{data:{installedApps:e}}}=await this.wire.sendAction(\"get-installed-apps\");return e}getLog(e){return this.wire.sendAction(\"view-log\",e).then((({payload:e})=>e.data))}getMachineId(){return this.wire.sendAction(\"get-machine-id\").then((({payload:e})=>e.data))}getMinLogLevel(){return this.wire.sendAction(\"get-min-log-level\").then((({payload:e})=>e.data))}getLogList(){return this.wire.sendAction(\"list-logs\").then((({payload:e})=>e.data))}getMonitorInfo(){return this.wire.sendAction(\"get-monitor-info\").then((({payload:e})=>e.data))}getMousePosition(){return this.wire.sendAction(\"get-mouse-position\").then((({payload:e})=>e.data))}getProcessList(){return console.warn(\"System.getProcessList has been deprecated. Please consider using our new process APIs: Window.getProcessInfo, View.getProcessInfo, Application.getProcessInfo, System.getAllProcessInfo\"),this.wire.sendAction(\"process-snapshot\").then((({payload:e})=>e.data))}async getAllProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction(\"get-all-process-info\",this.identity);return e}getProxySettings(){return this.wire.sendAction(\"get-proxy-settings\").then((({payload:e})=>e.data))}getRuntimeInfo(){return this.wire.sendAction(\"get-runtime-info\").then((({payload:e})=>e.data))}getRvmInfo(){return this.wire.sendAction(\"get-rvm-info\").then((({payload:e})=>e.data))}getHostSpecs(){return this.wire.sendAction(\"get-host-specs\").then((({payload:e})=>e.data))}getOSInfo(){return this.wire.sendAction(\"get-os-info\").then((({payload:e})=>e.data))}launchExternalProcess(e){return this.sendExternalProcessRequest(\"launch-external-process\",e)}monitorExternalProcess(e){return this.sendExternalProcessRequest(\"monitor-external-process\",e)}log(e,t){return this.wire.sendAction(\"write-to-log\",{level:e,message:t}).then((()=>{}))}openUrlWithBrowser(e){return this.wire.sendAction(\"open-url-with-browser\",{url:e}).then((()=>{}))}async registerCustomProtocol(e){if(\"object\"!=typeof e)throw new Error(\"Must provide an object with a `protocolName` property having a string value.\");await this.wire.sendAction(\"register-custom-protocol\",e)}async unregisterCustomProtocol(e){await this.wire.sendAction(\"unregister-custom-protocol\",{protocolName:e})}async getCustomProtocolState(e){return this.wire.sendAction(\"get-custom-protocol-state\",{protocolName:e}).then((({payload:e})=>e.data))}releaseExternalProcess(e){return this.wire.sendAction(\"release-external-process\",{uuid:e}).then((()=>{}))}showDeveloperTools(e){return this.wire.sendAction(\"show-developer-tools\",e).then((()=>{}))}terminateExternalProcess(e){return this.wire.sendAction(\"terminate-external-process\",e).then((()=>{}))}updateProxySettings(e){return this.wire.sendAction(\"update-proxy\",e).then((()=>{}))}async downloadAsset(e,t){const n=()=>{};let i=n,r=n;const o=new Promise(((e,t)=>{i=e,r=t}));if(\"openfin\"!==this.wire.environment.type)throw new oe.NotSupportedError(\"downloadAsset only supported in an OpenFin Render process\");const s=oe.RuntimeError.getCallSite(),a=this.wire.environment.getNextMessageId().toString(),c=`asset-download-progress-${a}`,d=`asset-download-error-${a}`,h=`asset-download-complete-${a}`,l=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},u=()=>{this.removeListener(c,l)};await Promise.all([this.on(c,l),this.once(d,(e=>{u();const{reason:t,err:n}=e;r(new oe.RuntimeError({reason:t,error:n},s))})),this.once(h,(()=>{u(),i()}))]);const p=Object.assign(e,{downloadId:a});return await this.wire.sendAction(\"download-asset\",p).catch((e=>{throw u(),e})),o}downloadRuntime(e,t){const n=oe.RuntimeError.getCallSite();return new Promise(((i,r)=>{if(\"openfin\"!==this.wire.environment.type)return void r(new oe.NotSupportedError(\"downloadRuntime only supported in an OpenFin Render process\"));const o=this.wire.environment.getNextMessageId().toString(),s=`runtime-download-progress-${o}`,a=`runtime-download-error-${o}`,c=`runtime-download-complete-${o}`,d=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},h=()=>{this.removeListener(s,d)};this.on(s,d),this.once(a,(e=>{h();const{reason:t,err:i}=e;r(new oe.RuntimeError({reason:t,error:i},n))})),this.once(c,(()=>{h(),i()}));const l=Object.assign(e,{downloadId:o});this.wire.sendAction(\"download-runtime\",l).catch((e=>{h(),r(e)}))}))}downloadPreloadScripts(e){return this.wire.sendAction(\"download-preload-scripts\",{scripts:e}).then((({payload:e})=>e.data))}getAllExternalApplications(){return this.wire.sendAction(\"get-all-external-applications\").then((({payload:e})=>e.data))}getAppAssetInfo(e){return this.wire.sendAction(\"get-app-asset-info\",e).then((({payload:e})=>e.data))}getCookies(e){const t=this.wire.environment.getUrl(),n=Object.assign(e,{url:t});return this.wire.sendAction(\"get-cookies\",n).then((({payload:e})=>e.data))}setMinLogLevel(e){return this.wire.sendAction(\"set-min-log-level\",{level:e}).then((()=>{}))}resolveUuid(e){return this.wire.sendAction(\"resolve-uuid\",{entityKey:e}).then((({payload:e})=>e.data))}executeOnRemote(e,t){return t.requestingIdentity=e,this.wire.ferryAction(t)}readRegistryValue(e,t,n){return this.wire.sendAction(\"read-registry-value\",{rootKey:e,subkey:t,value:n}).then((({payload:e})=>e.data))}registerExternalConnection(e){return this.wire.sendAction(\"register-external-connection\",{uuid:e}).then((({payload:e})=>e.data))}async getServiceConfiguration(e){if(\"string\"!=typeof e.name)throw new Error(\"Must provide an object with a `name` property having a string value\");const{name:t}=e;return this.wire.sendAction(\"get-service-configuration\",{name:t}).then((({payload:e})=>e.data))}async getSystemAppConfig(e){if(\"string\"!=typeof e)throw new Error(\"Must provide a string value for name of system app\");return this.wire.sendAction(\"get-system-app-configuration\",{name:e}).then((({payload:e})=>e.data))}async registerShutdownHandler(e){this.wire.sendAction(\"system-register-shutdown-handler\").catch((e=>{}));const{uuid:t,name:n}=this.wire.me;this.on(\"system-shutdown\",(i=>{e({proceed:()=>{this.wire.environment.raiseEvent(\"application/system-shutdown-handled\",{uuid:t,name:n,topic:\"application\"})}})}))}runRvmHealthCheck(){return this.wire.sendAction(\"run-rvm-health-check\").then((({payload:e})=>e.data))}async launchManifest(e,t={}){const{subscribe:n,...i}=t,r=i;if(n){const e=new ae.EventEmitter;n(e);const t=\"app-version-progress\",i=\"runtime-status\",o=\"app-version-complete\",s=\"app-version-error\",a=this.wire.environment.getNextMessageId().toString();r.appVersionId=a;const c=[o,t,i,s],d=e=>{const{appVersionId:t,topic:n,type:i,...r}=e;return{...r,type:c.find((e=>i.includes(e)))}},h=t=>{const n=d(t);e.emit(n.type,n)},l=()=>{this.removeListener(`${t}.${a}`,h),this.removeListener(`${i}.${a}`,h),this.removeListener(`${o}.${a}`,h),this.removeListener(`${s}.${a}`,h),this.removeListener(`${o}.${a}`,l),this.removeListener(`${s}.${a}`,l)};await Promise.all([this.on(`${t}.${a}`,h),this.on(`${i}.${a}`,h),this.once(`${o}.${a}`,h),this.once(`${s}.${a}`,h),this.once(`${o}.${a}`,l),this.once(`${s}.${a}`,l)])}return(await this.wire.sendAction(\"launch-manifest\",{manifestUrl:e,opts:r})).payload.data.manifest}async queryPermissionForCurrentContext(e){const t={uuid:this.wire.me.uuid,name:this.wire.me.name};return(await this.wire.sendAction(\"query-permission-for-current-context\",{apiName:e,identity:t})).payload.data}async enableNativeWindowIntegrationProvider(e){const{payload:t}=await this.wire.sendAction(\"enable-native-window-integration-provider\",{permissions:e});return t.data}async registerUsage({data:e,type:t}){await this.wire.sendAction(\"register-usage\",{data:e,type:t})}async getPrinters(){const{payload:e}=await this.wire.sendAction(\"system-get-printers\");return e.data}async updateProcessLoggingOptions(e){await this.wire.sendAction(\"system-update-process-logging-options\",{options:e})}async getDomainSettings(){const{payload:{data:e}}=await this.wire.sendAction(\"get-domain-settings\",this.identity);return e}async setDomainSettings(e){await this.wire.sendAction(\"set-domain-settings\",{domainSettings:e,...this.identity})}async refreshExtensions(){const{payload:e}=await this.wire.sendAction(\"refresh-extensions\");return e.data}async getInstalledExtensions(){const{payload:e}=await this.wire.sendAction(\"get-installed-extensions\");return e.data}}c.System=ce;var de={},he={};Object.defineProperty(he,\"__esModule\",{value:!0}),he.RefCounter=void 0;he.RefCounter=class{constructor(){this.topicRefMap=new Map}incRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t+1;n=i,this.topicRefMap.set(e,i)}else this.topicRefMap.set(e,1),n=1;return n}decRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t-1;this.topicRefMap.set(e,i),n=i}else n=-1;return n}actOnFirst(e,t,n){return 1===this.incRefCount(e)?t():n()}actOnLast(e,t,n){return 0===this.decRefCount(e)?t():n()}};var le={},ue={},pe={};Object.defineProperty(pe,\"__esModule\",{value:!0}),pe.ChannelBase=pe.ProtectedItems=void 0;const we=e=>async(t,n,i)=>{const r=await e(t,n,i);return void 0===r?n:r};pe.ProtectedItems=class{constructor(e,t){this.providerIdentity=e,this.close=t}};class ye{static defaultAction(e){throw new Error(`No action registered at target for ${e}`)}constructor(){this.subscriptions=new Map}async processAction(e,t,n){try{const i=this.subscriptions.has(e)?this.subscriptions.get(e):(t,n)=>(this.defaultAction??ye.defaultAction)(e,t,n),r=this.preAction?await this.preAction(e,t,n):t,o=await i(r,n);return this.postAction?await this.postAction(e,o,n):o}catch(t){if(this.errorMiddleware)return this.errorMiddleware(e,t,n);throw t}}beforeAction(e){if(this.preAction)throw new Error(\"Already registered beforeAction middleware\");this.preAction=we(e)}onError(e){if(this.errorMiddleware)throw new Error(\"Already registered error middleware\");this.errorMiddleware=e}afterAction(e){if(this.postAction)throw new Error(\"Already registered afterAction middleware\");this.postAction=we(e)}remove(e){this.subscriptions.delete(e)}setDefaultAction(e){if(this.defaultAction)throw new Error(\"default action can only be set once\");this.defaultAction=e}register(e,t){if(this.subscriptions.has(e))throw new Error(`Subscription already registered for action: ${e}. Unsubscribe before adding new subscription`);return this.subscriptions.set(e,t),!0}}pe.ChannelBase=ye;var fe,ge,me,ve=s&&s.__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)},Ce=s&&s.__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};Object.defineProperty(ue,\"__esModule\",{value:!0}),ue.ChannelClient=void 0;const be=pe,Ie=new Map;class Ee extends be.ChannelBase{static closeChannelByEndpointId(e){const t=Ie.get(e);t&&ve(t,me,\"f\").call(t)}static handleProviderDisconnect(e){for(const t of Ie.values())t.providerIdentity.channelId===e.channelId&&(t.disconnectListener(e),ve(t,me,\"f\").call(t))}constructor(e,t,n){super(),fe.set(this,void 0),ge.set(this,void 0),this.processAction=(e,t,n)=>super.processAction(e,t,n),me.set(this,(()=>{Ie.delete(this.endpointId),ve(this,ge,\"f\").close()})),Ce(this,fe,new be.ProtectedItems(e,t),\"f\"),this.disconnectListener=()=>{},this.endpointId=e.endpointId,Ce(this,ge,n,\"f\"),Ie.set(this.endpointId,this),n.receive(this.processAction)}get providerIdentity(){return ve(this,fe,\"f\").providerIdentity}async dispatch(e,t){if(ve(this,ge,\"f\").isEndpointConnected(this.providerIdentity.channelId))return ve(this,ge,\"f\").send(this.providerIdentity.channelId,e,t);throw new Error(\"The client you are trying to dispatch from is disconnected from the target provider.\")}onDisconnection(e){this.disconnectListener=t=>{try{e(t)}catch(e){throw new Error(`Error while calling the onDisconnection callback: ${e.message}`)}finally{this.disconnectListener=()=>{}}}}async disconnect(){await this.sendDisconnectAction(),ve(this,me,\"f\").call(this)}async sendDisconnectAction(){const e=ve(this,fe,\"f\");await e.close()}static async wireClose(e,t,n){const{channelName:i,uuid:r,name:o}=t;await e.sendAction(\"disconnect-from-channel\",{channelName:i,uuid:r,name:o,endpointId:n})}}ue.ChannelClient=Ee,fe=new WeakMap,ge=new WeakMap,me=new WeakMap;var xe={},Ae={};Object.defineProperty(Ae,\"__esModule\",{value:!0}),Ae.exhaustiveCheck=void 0,Ae.exhaustiveCheck=function(e,t){throw new Error(`Unsupported value: ${e}${t?`\\n Supported values are: ${t.join(\"\")}`:\"\"}`)};var Pe,Me,_e,Oe={},Se=s&&s.__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},Re=s&&s.__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)};Object.defineProperty(Oe,\"__esModule\",{value:!0}),Oe.ClassicInfo=Oe.ClassicStrategy=void 0;Oe.ClassicStrategy=class{constructor(e,t,n,i){this.messageReceiver=t,this.endpointId=n,this.providerIdentity=i,Pe.set(this,void 0),Me.set(this,new Map),_e.set(this,new Map),this.send=async(e,t,n)=>{const i=Re(this,Me,\"f\").get(e);if(!i)throw new Error(`Could not locate routing info for endpoint ${e}`);const r={...i};r.isLocalEndpointId&&delete r.endpointId,delete r.isLocalEndpointId;const o=Re(this,Pe,\"f\").sendAction(\"send-channel-message\",{...r,providerIdentity:this.providerIdentity,action:t,payload:n});Re(this,_e,\"f\").get(e)?.add(o);return(await o.catch((e=>{throw new Error(e.message)})).finally((()=>{Re(this,_e,\"f\").get(e)?.delete(o)}))).payload.data.result},this.close=async()=>{this.messageReceiver.removeEndpoint(this.providerIdentity.channelId,this.endpointId),[...Re(this,Me,\"f\").keys()].forEach((e=>this.closeEndpoint(e))),Se(this,Me,new Map,\"f\")},Se(this,Pe,e,\"f\")}onEndpointDisconnect(e,t){}receive(e){this.messageReceiver.addEndpoint(e,this.providerIdentity.channelId,this.endpointId)}async closeEndpoint(e){const t=Re(this,Me,\"f\").get(e);Re(this,Me,\"f\").delete(e);const n=Re(this,_e,\"f\").get(e);n?.forEach((n=>{const i=`Channel connection with identity uuid: ${t?.uuid} / name: ${t?.name} / endpointId: ${e} no longer connected.`;n.cancel(new Error(i))}))}isEndpointConnected(e){return Re(this,Me,\"f\").has(e)}addEndpoint(e,t){Re(this,Me,\"f\").set(e,t.endpointIdentity),Re(this,_e,\"f\").set(e,new Set)}isValidEndpointPayload(e){return\"string\"==typeof e?.endpointIdentity?.endpointId||\"string\"==typeof e?.endpointIdentity?.channelId}},Pe=new WeakMap,Me=new WeakMap,_e=new WeakMap,Oe.ClassicInfo={version:5,minimumVersion:0,type:\"classic\"};var Fe={},je={},ke={};Object.defineProperty(ke,\"__esModule\",{value:!0}),ke.errorToPOJO=void 0,ke.errorToPOJO=function(e){return{stack:e.stack,name:e.name,message:e.message,toString:()=>e.stack||e.toString()}};var Le,Te,$e=s&&s.__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)},Be=s&&s.__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};Object.defineProperty(je,\"__esModule\",{value:!0}),je.RTCEndpoint=void 0;const Ge=ke;je.RTCEndpoint=class{static isValidEndpointPayload(e){const t=e=>\"object\"==typeof e&&null!==e;return t(e)&&t(e.endpointIdentity)&&t(e.rtc)&&\"string\"==typeof e.endpointIdentity.endpointId}constructor({rtc:e,endpointIdentity:t}){this.responseMap=new Map,Le.set(this,null),Te.set(this,void 0),this.connectionStateChangeHandler=e=>{\"connected\"!==this.rtc.rtcClient.connectionState&&(this.rtc.rtcClient.removeEventListener(\"connectionstatechange\",this.connectionStateChangeHandler),this.close(),$e(this,Te,\"f\")&&$e(this,Te,\"f\").call(this))},this.send=async(e,t)=>{const n=`message-${Math.random()}`,i=new Promise(((e,t)=>{this.responseMap.set(n,{resolve:e,reject:t})}));return this.rtc.channels.request.send(JSON.stringify({action:e,payload:t,messageId:n})),i},this.close=()=>{this.responseMap.forEach((e=>e.reject(\"Connection has closed.\"))),this.responseMap=new Map,this.rtc.channels.request.close(),this.rtc.channels.response.close(),this.rtc.rtcClient.close()},this.rtc=e,this.endpointIdentity=t,this.rtc.channels.response.addEventListener(\"message\",(e=>{let{data:t}=e;e.data instanceof ArrayBuffer&&(t=(new TextDecoder).decode(e.data));const{messageId:n,payload:i,success:r,error:o}=JSON.parse(t),{resolve:s,reject:a}=this.responseMap.get(n)??{};s&&a?(this.responseMap.delete(n),r?s(i):a(o)):(console.log(\"Could not find id in responseMap.\"),console.log(e))})),this.rtc.channels.request.addEventListener(\"message\",(async e=>{let{data:n}=e;e.data instanceof ArrayBuffer&&(n=(new TextDecoder).decode(e.data));const{messageId:i,action:r,payload:o}=JSON.parse(n);if($e(this,Le,\"f\"))try{const e=await $e(this,Le,\"f\").call(this,r,o,t);this.rtc.channels.response.send(JSON.stringify({messageId:i,payload:e,success:!0}))}catch(e){\"open\"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,error:(0,Ge.errorToPOJO)(e),success:!1}))}else\"open\"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,success:!1,error:\"Connection not ready.\"}))})),this.rtc.rtcClient.addEventListener(\"connectionstatechange\",this.connectionStateChangeHandler),Object.values(this.rtc.channels).forEach((e=>{e.onclose=e=>{[...this.responseMap.values()].forEach((e=>e.reject(new Error(\"RTCDataChannel closed unexpectedly, this is most commonly caused by message size. Note: RTC Channels have a message size limit of ~255kB.\")))),this.close(),$e(this,Te,\"f\")&&$e(this,Te,\"f\").call(this)}}))}onDisconnect(e){if($e(this,Te,\"f\"))throw new Error(\"RTCEndpoint disconnectListener cannot be set twice.\");Be(this,Te,e,\"f\")}receive(e){if($e(this,Le,\"f\"))throw new Error(\"You have already set a listener for this RTC Endpoint.\");Be(this,Le,e,\"f\")}get connected(){return\"connected\"===this.rtc.rtcClient.connectionState}},Le=new WeakMap,Te=new WeakMap;var We,He,Ne,De={},Ue=s&&s.__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)},Ve=s&&s.__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};Object.defineProperty(De,\"__esModule\",{value:!0}),De.EndpointStrategy=void 0;De.EndpointStrategy=class{constructor(e,t,n){this.EndpointType=e,this.StrategyName=n,We.set(this,null),He.set(this,new Map),Ne.set(this,!0),this.send=async(e,t,n)=>this.getEndpointById(e).send(t,n),this.close=async()=>{Ue(this,Ne,\"f\")&&(Ue(this,He,\"f\").forEach((e=>e.close())),Ve(this,He,new Map,\"f\")),Ve(this,Ne,!1,\"f\")},this.isValidEndpointPayload=t}onEndpointDisconnect(e,t){this.getEndpointById(e).onDisconnect(t)}receive(e){if(Ue(this,We,\"f\"))throw new Error(`You have already set a listener for this ${this.StrategyName} Strategy`);Ve(this,We,e,\"f\"),Ue(this,He,\"f\").forEach((e=>e.receive(Ue(this,We,\"f\"))))}getEndpointById(e){const t=Ue(this,He,\"f\").get(e);if(!t)throw new Error(`Client with endpoint id ${e} is not connected`);return t}get connected(){return Ue(this,Ne,\"f\")}isEndpointConnected(e){return Ue(this,He,\"f\").has(e)}addEndpoint(e,t){if(!Ue(this,Ne,\"f\"))return void console.warn(`Adding endpoint to disconnected ${this.StrategyName} Strategy`);const n=new this.EndpointType(t);Ue(this,We,\"f\")&&n.receive(Ue(this,We,\"f\")),Ue(this,He,\"f\").set(e,n)}async closeEndpoint(e){Ue(this,He,\"f\").delete(e)}},We=new WeakMap,He=new WeakMap,Ne=new WeakMap,Object.defineProperty(Fe,\"__esModule\",{value:!0}),Fe.RTCInfo=Fe.RTCStrategy=void 0;const ze=je,Ke=De;class qe extends Ke.EndpointStrategy{constructor(){super(ze.RTCEndpoint,ze.RTCEndpoint.isValidEndpointPayload,\"RTC\")}}Fe.RTCStrategy=qe,Fe.RTCInfo={version:2,minimumVersion:0,type:\"rtc\"};var Je={};Object.defineProperty(Je,\"__esModule\",{value:!0}),Je.RTCICEManager=void 0;const Ye=d;class Ze extends Ye.EmitterBase{constructor(e){super(e,\"channel\"),this.ensureChannelOpened=e=>new Promise(((t,n)=>{if(\"open\"===e.readyState)t();else if(\"connecting\"===e.readyState){const n=()=>{e.removeEventListener(\"open\",n),t()};e.addEventListener(\"open\",n)}else n(new Error(\"This Channel has already closed\"))}))}static createDataChannelPromise(e,t){let n;const i=new Promise((e=>{n=e})),r=i=>{const o=()=>{i.channel.removeEventListener(\"open\",o),n(i.channel)};i.channel.label===e&&(i.channel.addEventListener(\"open\",o),t.removeEventListener(\"datachannel\",r))};return t.addEventListener(\"datachannel\",r),i}async listenForProviderIce(e,t){await this.on(this.createProviderEventName(e),t,{timestamp:Date.now()})}async raiseProviderIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createProviderEventName(e)),t)}async listenForClientIce(e,t){await this.on(this.createClientEventName(e),t,{timestamp:Date.now()})}async raiseClientIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createClientEventName(e)),t)}cleanupIceListeners(e){this.removeAllListeners(this.createClientEventName(e)),this.removeAllListeners(this.createProviderEventName(e))}createClientEventName(e){return`ice-client-${e}`}createProviderEventName(e){return`ice-provider-${e}`}createRouteString(e){return`channel/${e}`}createRtcPeer(){return this.wire.environment.getRtcPeer()}async startClientOffer(){const e=Math.random().toString(),t=this.createRtcPeer();t.addEventListener(\"icecandidate\",(async t=>{t.candidate&&await this.raiseClientIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForProviderIce(e,(async e=>{await t.addIceCandidate(e.candidate)}));const n={request:t.createDataChannel(\"request\"),response:t.createDataChannel(\"response\")},i=await t.createOffer();await t.setLocalDescription(i);const r=Promise.all([n.request,n.response].map(this.ensureChannelOpened)).then((()=>{}));return{rtcClient:t,channels:n,offer:i,rtcConnectionId:e,channelsOpened:r}}async finishClientOffer(e,t,n){return await e.setRemoteDescription(t),await n,!0}async createProviderAnswer(e,t){const n=this.createRtcPeer(),i=Ze.createDataChannelPromise(\"request\",n),r=Ze.createDataChannelPromise(\"response\",n);n.addEventListener(\"icecandidate\",(async t=>{t.candidate&&await this.raiseProviderIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForClientIce(e,(async e=>{await n.addIceCandidate(e.candidate)})),await n.setRemoteDescription(t);const o=await n.createAnswer();await n.setLocalDescription(o);const s=Promise.all([i,r]).then((([t,n])=>(this.cleanupIceListeners(e),{request:t,response:n})));return{rtcClient:n,answer:o,channels:s}}}Je.RTCICEManager=Ze;var Qe={},Xe={};function et(e){return[...e.split(\".\").reverse().entries()].reduce(((e,[t,n])=>e+ +n*1e4**t),0)}function tt(e,t){return et(e)>=et(t)}function nt(e){return e.split(\"/\")[0]}Object.defineProperty(Xe,\"__esModule\",{value:!0}),Xe.runtimeUuidMeetsMinimumRuntimeVersion=Xe.parseRuntimeUuid=Xe.meetsMinimumRuntimeVersion=void 0,Xe.meetsMinimumRuntimeVersion=tt,Xe.parseRuntimeUuid=nt,Xe.runtimeUuidMeetsMinimumRuntimeVersion=function(e,t){return tt(nt(e),t)};var it,rt,ot,st,at,ct=s&&s.__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)},dt=s&&s.__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};Object.defineProperty(Qe,\"__esModule\",{value:!0}),Qe.ChannelProvider=void 0;const ht=pe,lt=Xe;class ut extends ht.ChannelBase{get connections(){return[...ct(this,it,\"f\")]}static handleClientDisconnection(e,t){const n=e.connections.find((e=>e.endpointId===t.endpointId));if(n)ct(e,st,\"f\").call(e,n);else{e.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name)).forEach(ct(e,st,\"f\"))}e.disconnectListener(t)}static setProviderRemoval(e,t){ut.removalMap.set(e,t)}constructor(e,t,n){super(),it.set(this,void 0),rt.set(this,void 0),ot.set(this,void 0),st.set(this,(e=>{const t=this.connections.filter((t=>t.endpointId!==e.endpointId));ct(this,ot,\"f\").closeEndpoint(e.endpointId),dt(this,it,t,\"f\")})),this.processAction=async(e,t,n)=>(ut.clientIsMultiRuntime(n)&&!(0,lt.runtimeUuidMeetsMinimumRuntimeVersion)(n.runtimeUuid,\"18.87.56.0\")?this.handleMultiRuntimeLegacyClient(n):this.checkForClientConnection(n),super.processAction(e,t,n)),at.set(this,(()=>{ct(this,ot,\"f\").close();const e=ut.removalMap.get(this);e&&e()})),dt(this,rt,new ht.ProtectedItems(e,t),\"f\"),this.connectListener=()=>{},this.disconnectListener=()=>{},dt(this,it,[],\"f\"),dt(this,ot,n,\"f\"),n.receive(this.processAction)}dispatch(e,t,n){const i=e.endpointId??this.getEndpointIdForOpenFinId(e,t);return i&&ct(this,ot,\"f\").isEndpointConnected(i)?ct(this,ot,\"f\").send(i,t,n):Promise.reject(new Error(`Client connection with identity uuid: ${e.uuid} / name: ${e.name} / endpointId: ${i} no longer connected.`))}async processConnection(e,t){return ct(this,it,\"f\").push(e),this.connectListener(e,t)}publish(e,t){return this.connections.map((n=>ct(this,ot,\"f\").send(n.endpointId,e,t)))}onConnection(e){this.connectListener=e}onDisconnection(e){this.disconnectListener=e}async destroy(){const e=ct(this,rt,\"f\");e.providerIdentity,dt(this,it,[],\"f\"),await e.close(),ct(this,at,\"f\").call(this)}async getAllClientInfo(){return this.connections.map((e=>{const{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}=e;return{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}}))}checkForClientConnection(e){if(!this.isClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider.\\n Client Identity: {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}isClientConnected(e){return ut.clientIdentityIncludesEndpointId(e)?this.connections.some((t=>t.endpointId===e.endpointId&&t.uuid===e.uuid&&t.name===e.name)):this.isLegacyClientConnected(e)}isLegacyClientConnected(e){return this.connections.some((t=>t.uuid===e.uuid&&t.name===e.name))}handleMultiRuntimeLegacyClient(e){if(!this.isLegacyClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider. Client Identity:\\n {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}getEndpointIdForOpenFinId(e,t){const n=this.connections.filter((t=>t.name===e.name&&t.uuid===e.uuid));if(n.length>=2){const n=ct(this,rt,\"f\"),{uuid:i,name:r}=e,o=n?.providerIdentity.uuid,s=n?.providerIdentity.name;console.warn(`WARNING: Dispatch call may have unintended results. The \"to\" argument of your dispatch call is missing the\\n \"endpointId\" parameter. The identity you are dispatching to ({uuid: ${i}, name: ${r}})\\n has multiple channelClients for this channel. Your dispatched action: (${t}) from the provider:\\n ({uuid: ${o}, name: ${s}}) will only be processed by the most recently-created client.`)}return n.pop()?.endpointId}static clientIdentityIncludesEndpointId(e){return void 0!==e.endpointId}static clientIsMultiRuntime(e){return void 0!==e.runtimeUuid}static async wireClose(e,t){await e.sendAction(\"destroy-channel\",{channelName:t})}}Qe.ChannelProvider=ut,it=new WeakMap,rt=new WeakMap,ot=new WeakMap,st=new WeakMap,at=new WeakMap,ut.removalMap=new WeakMap;var pt={};Object.defineProperty(pt,\"__esModule\",{value:!0}),pt.MessageReceiver=void 0;const wt=ue,yt=d;class ft extends yt.Base{constructor(e){super(e),this.onmessage=e=>\"process-channel-message\"===e.action&&(this.processChannelMessage(e),!0),this.endpointMap=new Map,this.latestEndpointIdByChannelId=new Map,e.registerMessageHandler(this.onmessage.bind(this))}async processChannelMessage(e){const{senderIdentity:t,providerIdentity:n,action:i,ackToSender:r,payload:o,intendedTargetIdentity:s}=e.payload,a=s.channelId??s.endpointId??this.latestEndpointIdByChannelId.get(n.channelId),c=this.endpointMap.get(a);if(!c)return r.payload.success=!1,r.payload.reason=`Client connection with identity uuid: ${this.wire.me.uuid} / name: ${this.wire.me.name} / endpointId: ${a} no longer connected.`,this.wire.sendRaw(r);try{const e=await c(i,o,t);return r.payload.payload=r.payload.payload||{},r.payload.payload.result=e,this.wire.sendRaw(r)}catch(e){return r.payload.success=!1,r.payload.reason=e.message,this.wire.sendRaw(r)}}addEndpoint(e,t,n){this.endpointMap.set(n,e),t!==n&&this.latestEndpointIdByChannelId.set(t,n)}removeEndpoint(e,t){this.endpointMap.delete(t),this.latestEndpointIdByChannelId.get(e)===t&&this.latestEndpointIdByChannelId.delete(e)}checkForPreviousClientConnection(e){const t=this.latestEndpointIdByChannelId.get(e);t&&(wt.ChannelClient.closeChannelByEndpointId(t),console.warn(\"You have created a second connection to an older provider. First connection has been removed from the clientMap\"),console.warn(\"If the provider calls publish(), you may receive multiple messages.\"))}}pt.MessageReceiver=ft;var gt={};Object.defineProperty(gt,\"__esModule\",{value:!0}),gt.ProtocolManager=void 0;gt.ProtocolManager=class{constructor(e){this.ProtocolsInPreferenceOrder=e,this.DefaultClientProtocols=[\"classic\"],this.DefaultProviderProtocols=[\"classic\"],this.getClientProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultClientProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(\", \")}.`);return t},this.getProviderProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultProviderProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(\", \")}.`);return t},this.getCompatibleProtocols=(e,t)=>t.supportedProtocols.filter((t=>e.some((e=>e.type===t.type&&t.version>=e.minimumVersion&&e.version>=(t.minimumVersion??0))))).slice(0,t.maxProtocols)}};var mt={};Object.defineProperty(mt,\"__esModule\",{value:!0});class vt{static combine(e,t){return new vt(e,t)}constructor(e,t){this.primary=e,this.secondary=t}onEndpointDisconnect(e,t){this.primary.onEndpointDisconnect(e,(()=>{this.secondary.isEndpointConnected(e)||t()})),this.secondary.onEndpointDisconnect(e,(()=>{this.primary.isEndpointConnected(e)||t()}))}isValidEndpointPayload(e){return this.primary.isValidEndpointPayload(e)||this.secondary.isValidEndpointPayload(e)}async closeEndpoint(e){await this.primary.closeEndpoint(e),await this.secondary.closeEndpoint(e)}isEndpointConnected(e){return this.primary.isEndpointConnected(e)||this.secondary.isEndpointConnected(e)}async addEndpoint(e,t){this.primary.isValidEndpointPayload(t)&&await this.primary.addEndpoint(e,t),this.secondary.isValidEndpointPayload(t)&&await this.secondary.addEndpoint(e,t)}receive(e){this.primary.receive(e),this.secondary.receive(e)}send(e,t,n){return this.primary.isEndpointConnected(e)?this.primary.send(e,t,n):this.secondary.send(e,t,n)}async close(){await Promise.all([this.primary.close(),this.secondary.close()])}}mt.default=vt;var Ct,bt,It=s&&s.__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},Et=s&&s.__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)},xt=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(xe,\"__esModule\",{value:!0}),xe.ConnectionManager=void 0;const At=Ae,Pt=d,Mt=Oe,_t=Fe,Ot=Je,St=Qe,Rt=pt,Ft=gt,jt=xt(mt);class kt extends Pt.Base{static getProtocolOptionsFromStrings(e){return e.map((e=>{switch(e){case\"rtc\":return _t.RTCInfo;case\"classic\":return Mt.ClassicInfo;default:return(0,At.exhaustiveCheck)(e,[\"rtc\",\"classic\"])}}))}constructor(e){super(e),Ct.set(this,void 0),bt.set(this,void 0),this.removeChannelFromProviderMap=e=>{this.providerMap.delete(e)},this.onmessage=e=>\"process-channel-connection\"===e.action&&(this.processChannelConnection(e),!0),this.providerMap=new Map,this.protocolManager=new Ft.ProtocolManager(\"node\"===this.wire.environment.type?[\"classic\"]:[\"rtc\",\"classic\"]),It(this,Ct,new Rt.MessageReceiver(e),\"f\"),It(this,bt,new Ot.RTCICEManager(e),\"f\"),e.registerMessageHandler(this.onmessage.bind(this))}createProvider(e,t){const n=Object.assign(this.wire.environment.getDefaultChannelOptions().create,e||{}),i=this.protocolManager.getProviderProtocols(n?.protocols),r=i.map((e=>{switch(e){case\"rtc\":return new _t.RTCStrategy;case\"classic\":return new Mt.ClassicStrategy(this.wire,Et(this,Ct,\"f\"),t.channelId,t);default:return(0,At.exhaustiveCheck)(e,[\"rtc\",\"classic\"])}}));let o;if(2===r.length){const[e,t]=r;o=jt.default.combine(e,t)}else{if(1!==r.length)throw new Error(\"failed to combine strategies\");[o]=r}const s=new St.ChannelProvider(t,(()=>St.ChannelProvider.wireClose(this.wire,t.channelName)),o),a=t.channelId;return this.providerMap.set(a,{provider:s,strategy:o,supportedProtocols:kt.getProtocolOptionsFromStrings(i)}),St.ChannelProvider.setProviderRemoval(s,this.removeChannelFromProviderMap.bind(this)),s}async createClientOffer(e){const t=this.protocolManager.getClientProtocols(e?.protocols);let n;return{offer:{supportedProtocols:await Promise.all(t.map((async e=>{switch(e){case\"rtc\":{const{rtcClient:e,channels:t,offer:i,rtcConnectionId:r,channelsOpened:o}=await Et(this,bt,\"f\").startClientOffer();return n={rtcClient:e,channels:t,channelsOpened:o},{type:\"rtc\",version:_t.RTCInfo.version,payload:{offer:i,rtcConnectionId:r}}}case\"classic\":return{type:\"classic\",version:Mt.ClassicInfo.version};default:return(0,At.exhaustiveCheck)(e,[\"rtc\",\"classic\"])}}))),maxProtocols:2},rtc:n}}async createClientStrategy(e,t){t.endpointId||(t.endpointId=this.wire.environment.getNextMessageId(),Et(this,Ct,\"f\").checkForPreviousClientConnection(t.channelId));const n=t.answer??{supportedProtocols:[{type:\"classic\",version:1}]},i=(await Promise.all(n.supportedProtocols.map((async n=>\"rtc\"===n.type&&e?(await Et(this,bt,\"f\").finishClientOffer(e.rtcClient,n.payload.answer,e.channelsOpened),new _t.RTCStrategy):\"classic\"===n.type?new Mt.ClassicStrategy(this.wire,Et(this,Ct,\"f\"),t.endpointId,t):null)))).filter((e=>null!==e));let r;if(e&&!i.some((e=>e instanceof _t.RTCStrategy))&&e&&e.rtcClient.close(),i.length>=2)r=jt.default.combine(i[0],i[1]);else{if(!i.length)throw new Error(\"No compatible protocols\");[r]=i}const o={endpointIdentity:t,rtc:e};return r.addEndpoint(t.channelId,o),r}async processChannelConnection(e){const{clientIdentity:t,providerIdentity:n,ackToSender:i,payload:r,offer:o}=e.payload;t.endpointId?t.isLocalEndpointId=!1:(t.endpointId=this.wire.environment.getNextMessageId(),t.isLocalEndpointId=!0);const s=n.channelId,a=this.providerMap.get(s);if(!a)return i.payload.success=!1,i.payload.reason=`Channel \"${n.channelName}\" has been destroyed.`,this.wire.sendRaw(i);const{provider:c,strategy:d,supportedProtocols:h}=a;try{if(!(c instanceof St.ChannelProvider))throw Error(\"Cannot connect to a channel client\");const e=o??{supportedProtocols:[{type:\"classic\",version:1}],maxProtocols:1},n=this.protocolManager.getCompatibleProtocols(h,e);if(!n.length)throw new Error(\"This provider does not support any of the offered protocols.\");const s=await c.processConnection(t,r);i.payload.payload=i.payload.payload||{};let a={supportedProtocols:[],endpointPayloadPromise:Promise.resolve({endpointIdentity:t})};return a=await n.reduce((async(e,t)=>{const n=await e;if(\"rtc\"===t.type){const{answer:e,rtcClient:i,channels:r}=await Et(this,bt,\"f\").createProviderAnswer(t.payload.rtcConnectionId,t.payload.offer);n.supportedProtocols.push({type:\"rtc\",version:_t.RTCInfo.version,payload:{answer:e}}),n.endpointPayloadPromise=n.endpointPayloadPromise.then((e=>r.then((t=>({...e,rtc:{rtcClient:i,channels:t}})))))}else n.supportedProtocols.push({type:\"classic\",version:Mt.ClassicInfo.version});return n}),Promise.resolve(a)),a.endpointPayloadPromise.then((e=>d.addEndpoint(t.endpointId,e))),i.payload.payload.result=s,i.payload.payload.answer=a,this.wire.sendRaw(i)}catch(e){return i.payload.success=!1,i.payload.reason=e.message,this.wire.sendRaw(i)}}}xe.ConnectionManager=kt,Ct=new WeakMap,bt=new WeakMap;var Lt,Tt,$t,Bt=s&&s.__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},Gt=s&&s.__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)};Object.defineProperty(le,\"__esModule\",{value:!0}),le.Channel=void 0;const Wt=t,Ht=G,Nt=d,Dt=ue,Ut=xe,Vt=Qe;function zt(e){const t=Math.floor(e/10),n=Math.min(3e4,500*2**t);return new Promise((e=>{setTimeout((()=>{e(!1)}),n)}))}class Kt extends Nt.EmitterBase{constructor(e){super(e,\"channel\"),Lt.set(this,void 0),Tt.set(this,new Wt.EventEmitter),$t.set(this,new Ht.AsyncRetryableLazy((async()=>{await Promise.all([this.on(\"disconnected\",(e=>{Dt.ChannelClient.handleProviderDisconnect(e)})),this.on(\"connected\",((...e)=>{Gt(this,Tt,\"f\").emit(\"connected\",...e)}))]).catch((()=>new Error(\"error setting up channel connection listeners\")))}))),Bt(this,Lt,new Ut.ConnectionManager(e),\"f\")}async getAllChannels(){return this.wire.sendAction(\"get-all-channels\").then((({payload:e})=>e.data))}async onChannelConnect(e){await this.on(\"connected\",e)}async onChannelDisconnect(e){await this.on(\"disconnected\",e)}async safeConnect(e,t,n){const i={count:0};do{let r=()=>{};const o=new Promise((t=>{r=n=>{e===n.channelName&&t(!0)},Gt(this,Tt,\"f\").on(\"connected\",r)}));try{if(i.count>0){i.gotConnectedEvent=await Promise.race([zt(i.count),o]);const t=await this.wire.sendAction(\"connect-to-channel\",{...n,retryInfo:i});return console.log(`Successfully connected to channelName: ${e}`),t.payload.data}const t=this.wire.sendAction(\"connect-to-channel\",n);i.originalMessageId=t.messageId;return(await t).payload.data}catch(n){if(!n.message.includes(\"internal-nack\"))throw n;t&&0===i.count&&console.warn(`No channel found for channelName: ${e}. Waiting for connection...`)}finally{i.count+=1,Gt(this,Tt,\"f\").removeListener(\"connected\",r)}}while(t);throw new Error(`No channel found for channelName: ${e}.`)}async connect(e,t={}){if(await Gt(this,$t,\"f\").getValue(),!e||\"string\"!=typeof e)throw new Error(\"Please provide a channelName string to connect to a channel.\");const n={wait:!0,...this.wire.environment.getDefaultChannelOptions().connect,...t},{offer:i,rtc:r}=await Gt(this,Lt,\"f\").createClientOffer(n);let o;(this.fin.me.isFrame||this.fin.me.isView||this.fin.me.isWindow)&&(o=(await this.fin.me.getInfo()).url);const s={channelName:e,...n,offer:i,connectionUrl:o},a=await this.safeConnect(e,n.wait,s),c=await Gt(this,Lt,\"f\").createClientStrategy(r,a),d=new Dt.ChannelClient(a,(()=>Dt.ChannelClient.wireClose(this.wire,a,a.endpointId)),c);return c.onEndpointDisconnect(a.channelId,(async()=>{try{await d.sendDisconnectAction()}catch(e){console.warn(`Something went wrong during disconnect for client with uuid: ${a.uuid} / name: ${a.name} / endpointId: ${a.endpointId}.`)}finally{Dt.ChannelClient.handleProviderDisconnect(a)}})),d}async create(e,t){if(!e)throw new Error(\"Please provide a channelName to create a channel\");const{payload:{data:n}}=await this.wire.sendAction(\"create-channel\",{channelName:e}),i=Gt(this,Lt,\"f\").createProvider(t,n);return this.on(\"client-disconnected\",(t=>{t.channelName===e&&Vt.ChannelProvider.handleClientDisconnection(i,t)})),i}}le.Channel=Kt,Lt=new WeakMap,Tt=new WeakMap,$t=new WeakMap,Object.defineProperty(de,\"__esModule\",{value:!0}),de.InterAppPayload=de.InterApplicationBus=void 0;const qt=t,Jt=d,Yt=he,Zt=le,Qt=O;class Xt extends Jt.Base{constructor(e){super(e),this.events={subscriberAdded:\"subscriber-added\",subscriberRemoved:\"subscriber-removed\"},this.refCounter=new Yt.RefCounter,this.Channel=new Zt.Channel(e),this.emitter=new qt.EventEmitter,e.registerMessageHandler(this.onmessage.bind(this)),this.on=this.emitter.on.bind(this.emitter),this.removeAllListeners=this.emitter.removeAllListeners.bind(this.emitter)}async publish(e,t){await this.wire.sendAction(\"publish-message\",{topic:e,message:t,sourceWindowName:this.me.name})}async send(e,t,n){const i=(0,Qt.validateIdentity)(e);if(i)throw new Error(i);await this.wire.sendAction(\"send-message\",{destinationUuid:e.uuid,destinationWindowName:e.name,topic:t,message:n,sourceWindowName:this.me.name})}subscribe(e,t,n){const i=this.createSubscriptionKey(e.uuid,e.name||\"*\",t);return this.emitter.on(i,n),this.refCounter.actOnFirst(i,(async()=>{await this.wire.sendAction(\"subscribe\",{sourceUuid:e.uuid,sourceWindowName:e.name||\"*\",topic:t,destinationWindowName:this.me.name})}),(()=>Promise.resolve()))}unsubscribe(e,t,n){const i=e.name||\"*\",r=this.createSubscriptionKey(e.uuid,i,t);return this.emitter.removeListener(r,n),this.refCounter.actOnLast(r,(async()=>{await this.wire.sendAction(\"unsubscribe\",{sourceUuid:e.uuid,sourceWindowName:i,topic:t,destinationWindowName:this.me.name})}),(()=>new Promise((e=>e)).then((()=>{}))))}processMessage(e){const{payload:{message:t,sourceWindowName:n,sourceUuid:i,topic:r}}=e,o=[this.createSubscriptionKey(i,n,r),this.createSubscriptionKey(i,\"*\",r),this.createSubscriptionKey(\"*\",\"*\",r)],s={uuid:i,name:n};o.forEach((e=>{this.emitter.emit(e,t,s)}))}emitSubscriverEvent(e,t){const{payload:{targetName:n,uuid:i,topic:r}}=t,o={name:n,uuid:i,topic:r};this.emitter.emit(e,o)}createSubscriptionKey(e,t,n){const i=t||\"*\";if(!(e&&i&&n))throw new Error(\"Missing uuid, name, or topic string\");return function(...e){return e.map((e=>Buffer.from(`${e}`).toString(\"base64\"))).join(\"/\")}(e,i,n)}onmessage(e){const{action:t}=e;switch(t){case\"process-message\":this.processMessage(e);break;case this.events.subscriberAdded:this.emitSubscriverEvent(this.events.subscriberAdded,e);break;case this.events.subscriberRemoved:this.emitSubscriverEvent(this.events.subscriberRemoved,e)}return!0}}de.InterApplicationBus=Xt;de.InterAppPayload=class{};var en={};Object.defineProperty(en,\"__esModule\",{value:!0}),en.Clipboard=void 0;const tn=d;class nn extends tn.Base{async writeText(e){await this.wire.sendAction(\"clipboard-write-text\",e)}async readText(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-text\",{type:e});return t.data}async writeImage(e){await this.wire.sendAction(\"clipboard-write-image\",e)}async readImage(e={format:\"dataURL\"}){const{payload:t}=await this.wire.sendAction(\"clipboard-read-image\",e);return t.data}async writeHtml(e){await this.wire.sendAction(\"clipboard-write-html\",e)}async readHtml(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-html\",{type:e});return t.data}async writeRtf(e){await this.wire.sendAction(\"clipboard-write-rtf\",e)}async readRtf(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-rtf\",{type:e});return t.data}async write(e){await this.wire.sendAction(\"clipboard-write\",e)}async getAvailableFormats(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-formats\",{type:e});return t.data}}en.Clipboard=nn;var rn={},on={},sn={};Object.defineProperty(sn,\"__esModule\",{value:!0}),sn.ExternalApplication=void 0;const an=d;class cn extends an.EmitterBase{constructor(e,t){super(e,\"external-application\",t.uuid),this.identity=t}getInfo(){return this.wire.sendAction(\"get-external-application-info\",this.identity).then((({payload:e})=>e.data))}}sn.ExternalApplication=cn,Object.defineProperty(on,\"__esModule\",{value:!0}),on.ExternalApplicationModule=void 0;const dn=d,hn=sn;class ln extends dn.Base{wrap(e){return this.wire.sendAction(\"external-application-wrap\").catch((e=>{})),Promise.resolve(new hn.ExternalApplication(this.wire,{uuid:e}))}wrapSync(e){return this.wire.sendAction(\"external-application-wrap-sync\").catch((e=>{})),new hn.ExternalApplication(this.wire,{uuid:e})}}on.ExternalApplicationModule=ln,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(on,e),n(sn,e)}(rn);var un={},pn={},wn={};Object.defineProperty(wn,\"__esModule\",{value:!0}),wn._Frame=void 0;const yn=d;class fn extends yn.EmitterBase{constructor(e,t){super(e,\"frame\",t.uuid,t.name),this.identity=t}getInfo(){return this.wire.sendAction(\"get-frame-info\",this.identity).then((({payload:e})=>e.data))}getParentWindow(){return this.wire.sendAction(\"get-parent-window\",this.identity).then((({payload:e})=>e.data))}}wn._Frame=fn,Object.defineProperty(pn,\"__esModule\",{value:!0}),pn._FrameModule=void 0;const gn=d,mn=O,vn=wn;class Cn extends gn.Base{async wrap(e){this.wire.sendAction(\"frame-wrap\").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}wrapSync(e){this.wire.sendAction(\"frame-wrap-sync\").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}getCurrent(){return this.wire.sendAction(\"frame-get-current\").catch((e=>{})),Promise.resolve(new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity()))}getCurrentSync(){return this.wire.sendAction(\"frame-get-current-sync\").catch((e=>{})),new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity())}}pn._FrameModule=Cn,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(pn,e),n(wn,e)}(un);var bn={};Object.defineProperty(bn,\"__esModule\",{value:!0}),bn.GlobalHotkey=void 0;const In=d;class En extends In.EmitterBase{constructor(e){super(e,\"global-hotkey\")}async register(e,t){await this.on(e,t),await this.wire.sendAction(\"global-hotkey-register\",{hotkey:e})}async unregister(e){await this.removeAllListeners(e),await this.wire.sendAction(\"global-hotkey-unregister\",{hotkey:e})}async unregisterAll(){await Promise.all(this.eventNames().filter((e=>!(\"registered\"===e||\"unregistered\"===e))).map((e=>this.removeAllListeners(e)))),await this.wire.sendAction(\"global-hotkey-unregister-all\",{})}async isRegistered(e){const{payload:{data:t}}=await this.wire.sendAction(\"global-hotkey-is-registered\",{hotkey:e});return t}}bn.GlobalHotkey=En;var xn,An={},Pn={},Mn={},_n=s&&s.__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)};Object.defineProperty(Mn,\"__esModule\",{value:!0}),Mn.Platform=void 0;const On=d,Sn=O,Rn=new Map;class Fn extends On.EmitterBase{constructor(e,t){super(t.wire,\"application\",e.uuid),this.getClient=e=>{this.wire.sendAction(\"platform-get-client\",this.identity).catch((e=>{}));const t=e||this.identity,{uuid:n}=t;if(!Rn.has(n)){const e=_n(this,xn,\"f\").call(this,n);Rn.set(n,e)}return Rn.get(n)},xn.set(this,(async e=>{try{const t=`custom-frame-${e}`,n=await this._channel.connect(t,{wait:!1});return n.onDisconnection((()=>{Rn.delete(e)})),n}catch(t){throw Rn.delete(e),new Error(\"The targeted Platform is not currently running. Listen for application-started event for the given Uuid.\")}})),this.launchLegacyManifest=this.launchContentManifest;const n=(0,Sn.validateIdentity)(e);if(n)throw new Error(n);this._channel=t,this.identity={uuid:e.uuid},this.Layout=this.fin.Platform.Layout,this.Application=this.fin.Application.wrapSync(this.identity)}async createView(e,t,n){this.wire.sendAction(\"platform-create-view\",this.identity).catch((e=>{}));const i=await this.getClient(),r=await i.dispatch(\"create-view\",{target:t,opts:e,targetView:n});if(!r||(0,Sn.validateIdentity)(r.identity))throw new Error(`When overwriting the createView call, please return an object that has a valid 'identity' property: ${JSON.stringify(r)}`);return this.fin.View.wrapSync(r.identity)}async createWindow(e){this.wire.sendAction(\"platform-create-window\",this.identity).catch((e=>{}));const t=await this.getClient();e.reason||(e.reason=\"api-call\");const n=await t.dispatch(\"create-view-container\",e);if(!n||(0,Sn.validateIdentity)(n.identity))throw new Error(`When overwriting the createWindow call, please return an object that has a valid 'identity' property: ${JSON.stringify(n)}`);const{identity:i}=n,r=this.fin.Window.wrapSync(i);return r.name=i.name,r.uuid=i.uuid,r}async quit(){this.wire.sendAction(\"platform-quit\",this.identity).catch((e=>{}));return(await this.getClient()).dispatch(\"quit\")}async closeView(e){this.wire.sendAction(\"platform-close-view\",this.identity).catch((e=>{}));const t=await this.getClient();await t.dispatch(\"close-view\",{view:e})}async reparentView(e,t){console.warn(\"Platform.reparentView has been deprecated, please use Platform.createView\"),this.wire.sendAction(\"platform-reparent-view\",this.identity).catch((e=>{}));const n={...e,uuid:e.uuid??this.identity.uuid},i=await this.fin.View.wrap(n),r=await i.getOptions();return this.createView(r,t)}async getSnapshot(){this.wire.sendAction(\"platform-get-snapshot\",this.identity).catch((e=>{}));return(await this.getClient()).dispatch(\"get-snapshot\")}async getViewSnapshot(e){return(await this.getClient()).dispatch(\"get-view-snapshot\",{viewIdentity:e})}async applySnapshot(e,t){this.wire.sendAction(\"platform-apply-snapshot\",this.identity).catch((e=>{}));const n=\"Requested snapshot must be a valid Snapshot object, or a url or filepath to such an object.\";let i;if(\"string\"==typeof e)try{i=(await this._channel.wire.sendAction(\"get-application-manifest\",{manifestUrl:e})).payload.data}catch(e){throw new Error(`${n}: ${e}`)}else i=e;if(!i.windows)throw new Error(n);const r=await this.getClient();return await r.dispatch(\"apply-snapshot\",{snapshot:i,options:t}),this}async fetchManifest(e){return(await this.getClient()).dispatch(\"platform-fetch-manifest\",{manifestUrl:e})}async launchContentManifest(e){this.wire.sendAction(\"platform-launch-content-manifest\",this.identity).catch((()=>{}));const t=await this.getClient(),n=await this.fetchManifest(e);return t.dispatch(\"launch-into-platform\",{manifest:n,manifestUrl:e}),this}async setWindowContext(e={},t){if(this.wire.sendAction(\"platform-set-window-context\",this.identity).catch((e=>{})),!e)throw new Error(\"Please provide a serializable object or string to set the context.\");const n=await this.getClient(),{entityType:i}=t?await this.fin.System.getEntityInfo(t.uuid,t.name):this.fin.me;await n.dispatch(\"set-window-context\",{context:e,entityType:i,target:t||{uuid:this.fin.me.uuid,name:this.fin.me.name}})}async getWindowContext(e){this.wire.sendAction(\"platform-get-window-context\",this.identity).catch((e=>{}));const t=await this.getClient(),{entityType:n}=e?await this.fin.System.getEntityInfo(e.uuid,e.name):this.fin.me;return t.dispatch(\"get-window-context\",{target:e||{uuid:this.fin.me.uuid,name:this.fin.me.name},entityType:n})}async closeWindow(e,t={skipBeforeUnload:!1}){this.wire.sendAction(\"platform-close-window\",this.identity).catch((e=>{}));return(await this.getClient()).dispatch(\"close-window\",{windowId:e,options:t})}}Mn.Platform=Fn,xn=new WeakMap;var jn={},kn={},Ln={},Tn={};function $n(e){switch(e){case\"columns\":case\"grid\":case\"rows\":case\"tabs\":return!0;default:return!1}}Object.defineProperty(Tn,\"__esModule\",{value:!0}),Tn.overrideFromComposables=Tn.isValidPresetType=void 0,Tn.isValidPresetType=$n,Tn.overrideFromComposables=function(...e){return t=>e.reduceRight(((e,t)=>n=>t(e(n))),(e=>e))(t)},Tn.default={isValidPresetType:$n};var Bn={},Gn={},Wn={};Object.defineProperty(Wn,\"__esModule\",{value:!0}),Wn.ApiConsumer=void 0;Wn.ApiConsumer=class{constructor(e){this.strategy=e,this.consume=async e=>(await this.strategy.getExposedFunctions(e)).reduce(((t,n)=>({...t,[n.key]:this.strategy.createFunction(n,e)})),{})}};var Hn={},Nn={};Object.defineProperty(Nn,\"__esModule\",{value:!0}),Nn.expose=Nn.getExposedProperties=void 0;const Dn=Symbol(\"exposedProperties\");Nn.getExposedProperties=e=>e[Dn]||e.prototype[Dn]||[];Nn.expose=e=>(t,n,i)=>{t[Dn]=t[Dn]||[],t[Dn].push({key:n,descriptor:i,options:e})},Object.defineProperty(Hn,\"__esModule\",{value:!0}),Hn.ApiExposer=void 0;const Un=Nn;Hn.ApiExposer=class{constructor(e){this.strategy=e,this.exposeInstance=async(e,t)=>{const n=(0,Un.getExposedProperties)(e),i=await Promise.all(n.map((async({key:n,options:i})=>({key:n,options:await this.strategy.exposeFunction(e[n].bind(e),{key:n,options:i,meta:t})}))));await this.strategy.exposeMeta(t,i)}}};var Vn={},zn={},Kn={};Object.defineProperty(Kn,\"__esModule\",{value:!0}),Kn.ChannelsConsumer=void 0;Kn.ChannelsConsumer=class{constructor(e){this.channel=e,this.getExposedFunctions=async e=>{const{id:t}=e,{props:n}=await this.channel.dispatch(`api-meta:${t}`);return n},this.createFunction=e=>(...t)=>{const{action:n}=e.options;return this.channel.dispatch(n,{args:t})}}};var qn={};Object.defineProperty(qn,\"__esModule\",{value:!0}),qn.ChannelsExposer=void 0;qn.ChannelsExposer=class{constructor(e){this.channelProviderOrClient=e,this.exposeFunction=async(e,t)=>{const{key:n,options:i,meta:r}=t,{id:o}=r,s=`${o}.${i?.action||n}`;return await this.channelProviderOrClient.register(s,(async({args:t})=>e(...t))),{action:s}},this.exposeMeta=async({id:e},t)=>{const n=`api-meta:${e}`;await this.channelProviderOrClient.register(n,(()=>({props:t})))}}},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Kn,e),n(qn,e)}(zn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(zn,e)}(Vn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Wn,e),n(Hn,e),n(Vn,e),n(Nn,e)}(Gn);var Jn={};Object.defineProperty(Jn,\"__esModule\",{value:!0}),Jn.createRelayedDispatch=exports.relayChannelClientApi_1=Jn.relayChannelClientApi=void 0;const Yn=[\"no longer connected\",\"RTCDataChannel closed unexpectedly\",\"The client you are trying to dispatch from is disconnected from the target provider\"];exports.relayChannelClientApi_1=Jn.relayChannelClientApi=async(e,t)=>{e.register(`relay:${t}`,(({action:t,target:n,payload:i})=>e.dispatch(n,t,i))),await Promise.resolve()};Jn.createRelayedDispatch=(e,t,n,i)=>async(r,o)=>{try{return await e.dispatch(`relay:${n}`,{action:r,payload:o,target:t})}catch(e){if(s=e.message,Yn.some((e=>s.includes(e)))&&i)throw new Error(i);throw e}var s};var Zn,Qn,Xn,ei=s&&s.__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},ti=s&&s.__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)};Object.defineProperty(Bn,\"__esModule\",{value:!0}),Bn.ColumnOrRow=Bn.TabStack=Bn.LayoutNode=void 0;const ni=Gn,ii=Jn;class ri{constructor(e,t){Zn.set(this,void 0),this.isRoot=()=>ti(this,Zn,\"f\").isRoot(this.entityId),this.exists=()=>ti(this,Zn,\"f\").exists(this.entityId),this.getParent=async()=>{const e=await ti(this,Zn,\"f\").getParent(this.entityId);if(e)return ri.getEntity(e,ti(this,Zn,\"f\"))},this.createAdjacentStack=async(e,t)=>{const n=await ti(this,Zn,\"f\").createAdjacentStack(this.entityId,e,t);return ri.getEntity({entityId:n,type:\"stack\"},ti(this,Zn,\"f\"))},this.getAdjacentStacks=async e=>(await ti(this,Zn,\"f\").getAdjacentStacks({targetId:this.entityId,edge:e})).map((e=>ri.getEntity({type:\"stack\",entityId:e.entityId},ti(this,Zn,\"f\")))),ei(this,Zn,e,\"f\"),this.entityId=t}}Bn.LayoutNode=ri,Zn=new WeakMap,ri.newLayoutEntitiesClient=async(e,t,n)=>{const i=(0,ii.createRelayedDispatch)(e,n,\"layout-relay\",\"You are trying to interact with a layout component on a window that does not exist or has been destroyed.\");return new ni.ApiConsumer(new ni.ChannelsConsumer({dispatch:i})).consume({id:t})},ri.getEntity=(e,t)=>{const{entityId:n,type:i}=e;switch(i){case\"column\":case\"row\":return new si(t,n,i);case\"stack\":return new oi(t,n);default:throw new Error(`Unrecognised Layout Entity encountered ('${JSON.stringify(e)})`)}};class oi extends ri{constructor(e,t){super(e,t),Qn.set(this,void 0),this.type=\"stack\",this.getViews=()=>ti(this,Qn,\"f\").getStackViews(this.entityId),this.addView=async(e,t={index:0})=>ti(this,Qn,\"f\").addViewToStack(this.entityId,e,t),this.removeView=async e=>{await ti(this,Qn,\"f\").removeViewFromStack(this.entityId,e)},this.setActiveView=async e=>{await ti(this,Qn,\"f\").setStackActiveView(this.entityId,e)},ei(this,Qn,e,\"f\")}}Bn.TabStack=oi,Qn=new WeakMap;class si extends ri{constructor(e,t,n){super(e,t),Xn.set(this,void 0),this.getContent=async()=>(await ti(this,Xn,\"f\").getContent(this.entityId)).map((e=>ri.getEntity(e,ti(this,Xn,\"f\")))),ei(this,Xn,e,\"f\"),this.type=n}}Bn.ColumnOrRow=si,Xn=new WeakMap;var ai={};Object.defineProperty(ai,\"__esModule\",{value:!0}),ai.DEFAULT_LAYOUT_KEY=ai.LAYOUT_CONTROLLER_ID=void 0,ai.LAYOUT_CONTROLLER_ID=\"layout-entities\",ai.DEFAULT_LAYOUT_KEY=\"__default__\";var ci,di,hi,li=s&&s.__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)};Object.defineProperty(Ln,\"__esModule\",{value:!0}),Ln.Layout=void 0;const ui=G,pi=O,wi=d,yi=Tn,fi=Bn,gi=ai;class mi extends wi.Base{static getClient(e){return li(e,di,\"f\").getValue()}constructor(e,t){super(t),ci.add(this),di.set(this,new ui.Lazy((async()=>fi.LayoutNode.newLayoutEntitiesClient(await this.platform.getClient(),gi.LAYOUT_CONTROLLER_ID,this.identity)))),this.replace=async e=>{this.wire.sendAction(\"layout-replace\").catch((e=>{}));const t=await this.platform.getClient();await t.dispatch(\"replace-layout\",{target:this.identity,opts:{layout:e}})},this.replaceView=async(e,t)=>{this.wire.sendAction(\"layout-replace-view\").catch((e=>{}));const n=await this.platform.getClient();await n.dispatch(\"replace-view\",{target:this.identity,opts:{viewToReplace:e,newView:t}})},this.applyPreset=async e=>{this.wire.sendAction(\"layout-apply-preset\").catch((e=>{}));const t=await this.platform.getClient(),{presetType:n}=e;if(!n||!(0,yi.isValidPresetType)(n))throw new Error(\"Cannot apply preset layout, please include an applicable presetType property in the PresetLayoutOptions.\");await t.dispatch(\"apply-preset-layout\",{target:this.identity,opts:{presetType:n}})};const n=(0,pi.validateIdentity)(e);if(n)throw new Error(n);this.identity=e,this.platform=this.fin.Platform.wrapSync({uuid:e.uuid}),e.uuid===this.fin.me.uuid&&e.name===this.fin.me.name&&(this.init=this.fin.Platform.Layout.init)}async getConfig(){this.wire.sendAction(\"layout-get-config\").catch((e=>{}));return(await this.platform.getClient()).dispatch(\"get-frame-snapshot\",{target:this.identity})}async getCurrentViews(){this.wire.sendAction(\"layout-get-views\").catch((e=>{}));const e=await this.platform.getClient();return(await e.dispatch(\"get-layout-views\",{target:this.identity})).map((e=>this.fin.View.wrapSync(e)))}async getRootItem(){this.wire.sendAction(\"layout-get-root-item\").catch((()=>{}));const e=await li(this,di,\"f\").getValue(),t=await e.getRoot(\"layoutName\"in this.identity?this.identity:void 0);return fi.LayoutNode.getEntity(t,e)}async getStackByViewIdentity(e){this.wire.sendAction(\"layout-get-stack-by-view\").catch((()=>{}));const t=await li(this,di,\"f\").getValue(),n=await t.getStackByView(e);if(!n)throw new Error(`No stack found for view: ${e.uuid}/${e.name}`);return fi.LayoutNode.getEntity(n,t)}async addView(e,{location:t,targetView:n}={}){this.wire.sendAction(\"layout-add-view\").catch((e=>{}));const{identity:i}=await li(this,ci,\"m\",hi).call(this,\"layout-add-view\",{viewOptions:e,location:t,targetView:n});return{identity:i}}async closeView(e){this.wire.sendAction(\"layout-close-view\").catch((e=>{})),await li(this,ci,\"m\",hi).call(this,\"layout-close-view\",{viewIdentity:e})}}Ln.Layout=mi,di=new WeakMap,ci=new WeakSet,hi=async function(e,t){return(await this.platform.getClient()).dispatch(e,{target:this.identity,opts:t})};var vi,Ci,bi,Ii,Ei,xi=s&&s.__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)},Ai=s&&s.__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};Object.defineProperty(kn,\"__esModule\",{value:!0}),kn.LayoutModule=void 0;const Pi=d,Mi=Ln,_i=ai;class Oi extends Pi.Base{constructor(){super(...arguments),vi.add(this),Ci.set(this,!1),bi.set(this,null),this.init=async(e={})=>{if(this.wire.sendAction(\"layout-init\").catch((e=>{})),!this.wire.environment.layoutAllowedInContext(this.fin))throw new Error(\"Layout.init can only be called from a Window context.\");if(xi(this,Ci,\"f\"))throw new Error(\"Layout.init was already called, please use Layout.create to add additional layouts.\");\"openfin\"===this.wire.environment.type&&await this.fin.Platform.getCurrentSync().getClient(),Ai(this,Ci,!0,\"f\"),Ai(this,bi,await this.wire.environment.initLayoutManager(this.fin,this.wire,e),\"f\"),await this.wire.environment.applyLayoutSnapshot(this.fin,xi(this,bi,\"f\"),e);const t={name:this.fin.me.name,uuid:this.fin.me.uuid};if(!e.layoutManagerOverride){const e={layoutName:_i.DEFAULT_LAYOUT_KEY,...t};return xi(this,Ii,\"f\").call(this,e)}return this.wrapSync(t)},Ii.set(this,(e=>{const t=\"[Layout] You are using a deprecated property `layoutManager` - it will throw if you access it starting in v37.\",n=new Proxy({},{get(e,n){throw console.warn(`[Layout-mgr-proxy] accessing ${n.toString()}`),new Error(t)}}),i=Object.assign(this.wrapSync(e),{layoutManager:n});return new Proxy(i,{get(e,n){if(\"layoutManager\"===n)throw console.warn(`[Layout-proxy] accessing ${n.toString()}`),new Error(t);return e[n]}})})),this.getCurrentLayoutManagerSync=()=>xi(this,vi,\"m\",Ei).call(this,\"fin.Platform.Layout.getCurrentLayoutManagerSync()\"),this.create=async e=>this.wire.environment.createLayout(xi(this,vi,\"m\",Ei).call(this,\"fin.Platform.Layout.create()\"),e),this.destroy=async e=>this.wire.environment.destroyLayout(xi(this,vi,\"m\",Ei).call(this,\"fin.Platform.Layout.destroy()\"),e)}async wrap(e){return this.wire.sendAction(\"layout-wrap\").catch((e=>{})),new Mi.Layout(e,this.wire)}wrapSync(e){return this.wire.sendAction(\"layout-wrap-sync\").catch((e=>{})),new Mi.Layout(e,this.wire)}async getCurrent(){if(this.wire.sendAction(\"layout-get-current\").catch((e=>{})),\"openfin\"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error(\"You are not in a Window context. Only Windows can have a Layout.\");const{uuid:e,name:t}=this.fin.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction(\"layout-get-current-sync\").catch((e=>{})),\"openfin\"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error(\"You are not in a Window context. Only Windows can have a Layout.\");const{uuid:e,name:t}=this.fin.me;return this.wrapSync({uuid:e,name:t})}async getLayoutByViewIdentity(e){this.wire.sendAction(\"layout-get-by-view-identity\").catch((()=>{}));let t=await this.wire.environment.getViewWindowIdentity(this.fin,e);t.identity&&(t=t.identity);try{const n=this.wrapSync(t),i=await Mi.Layout.getClient(n),r=await i.getLayoutIdentityForViewOrThrow(e);return this.wrapSync(r)}catch(n){if(![\"No action registered at target for\",\"getLayoutIdentityForViewOrThrow is not a function\"].some((e=>n.message.includes(e))))throw n;if(t.uuid===t.name)throw new Error(`View identity ${JSON.stringify(e)} is not attached to any layout in provider window ${JSON.stringify(t)}.`);return this.wrapSync(t)}}}kn.LayoutModule=Oi,Ci=new WeakMap,bi=new WeakMap,Ii=new WeakMap,vi=new WeakSet,Ei=function(e){if(!xi(this,bi,\"f\"))throw new Error(`You must call init before using the API ${e}`);return xi(this,bi,\"f\")},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(kn,e),n(Ln,e)}(jn),Object.defineProperty(Pn,\"__esModule\",{value:!0}),Pn.PlatformModule=void 0;const Si=d,Ri=Mn,Fi=jn;class ji extends Si.Base{constructor(e,t){super(e),this._channel=t,this.Layout=new Fi.LayoutModule(this.wire)}async init(e){if(!fin.__internal_.isPlatform||fin.me.name!==fin.me.uuid)throw new Error(\"fin.Platform.init should only be called from a custom platform provider running in the main window of the application.\");return this.wire.environment.initPlatform(this.fin,e)}async wrap(e){return this.wire.sendAction(\"platform-wrap\").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}wrapSync(e){return this.wire.sendAction(\"platform-wrap-sync\").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}async getCurrent(){return this.wire.sendAction(\"platform-get-current\").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction(\"platform-get-current-sync\").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}start(e){return this.wire.sendAction(\"platform-start\").catch((e=>{})),new Promise((async(t,n)=>{try{const{uuid:n}=e,i=await this.fin.Application._create({...e,isPlatformController:!0});i.once(\"platform-api-ready\",(()=>t(this.wrapSync({uuid:n})))),i._run({uuid:n})}catch(e){n(e)}}))}startFromManifest(e,t){return this.wire.sendAction(\"platform-start-from-manifest\").catch((e=>{})),new Promise((async(n,i)=>{try{const i=await this.fin.Application._createFromManifest(e);i.once(\"platform-api-ready\",(()=>n(this.wrapSync({uuid:i.identity.uuid})))),i._run(t)}catch(e){i(e)}}))}}Pn.PlatformModule=ji,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Pn,e),n(Mn,e)}(An);var ki={};!function(e){Object.defineProperty(e,\"__esModule\",{value:!0}),e.getMe=e.getBaseMe=e.environmentUnsupportedMessage=void 0;const t=J(),n=un,i=ie(),r=rn;function o(e,t,n){return{...{isView:\"view\"===e,isWindow:\"window\"===e,isFrame:\"iframe\"===e,isExternal:\"external connection\"===e},uuid:t,name:n,entityType:e}}e.environmentUnsupportedMessage=\"You are not running in OpenFin.\",e.getBaseMe=o,e.getMe=function(s){const{uuid:a,name:c,entityType:d}=s.me,h={setContext(){throw new Error(e.environmentUnsupportedMessage)},addContextHandler(){throw new Error(e.environmentUnsupportedMessage)},getContextGroups(){throw new Error(e.environmentUnsupportedMessage)},joinContextGroup(){throw new Error(e.environmentUnsupportedMessage)},removeFromContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getAllClientsInContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getInfoForContextGroup(){throw new Error(e.environmentUnsupportedMessage)}},l=\"Interop API has not been instantiated. Either connection has failed or you have not declared interop in your config.\",u={setContext(){throw new Error(l)},addContextHandler(){throw new Error(l)},getContextGroups(){throw new Error(l)},joinContextGroup(){throw new Error(l)},removeFromContextGroup(){throw new Error(l)},getAllClientsInContextGroup(){throw new Error(l)},getInfoForContextGroup(){throw new Error(l)}},p={eventNames:()=>{throw new Error(e.environmentUnsupportedMessage)},emit:()=>{throw new Error(e.environmentUnsupportedMessage)},listeners:()=>{throw new Error(e.environmentUnsupportedMessage)},listenerCount:()=>{throw new Error(e.environmentUnsupportedMessage)},on:()=>{throw new Error(e.environmentUnsupportedMessage)},addListener:()=>{throw new Error(e.environmentUnsupportedMessage)},once:()=>{throw new Error(e.environmentUnsupportedMessage)},prependListener:()=>{throw new Error(e.environmentUnsupportedMessage)},prependOnceListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeAllListeners:()=>{throw new Error(e.environmentUnsupportedMessage)}};switch(d){case\"view\":return Object.assign(new t.View(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case\"window\":return Object.assign(new i._Window(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case\"iframe\":return Object.assign(new n._Frame(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case\"external connection\":return Object.assign(new r.ExternalApplication(s,{uuid:a}),o(d,a,c),{interop:u,isOpenFin:!1});default:return{...o(d,a,c),...p,interop:h,isOpenFin:!1}}}}(ki);var Li={},Ti={},$i={};Object.defineProperty($i,\"__esModule\",{value:!0}),$i.createWarningObject=$i.createUnusableObject=void 0,$i.createUnusableObject=function(e){const t=()=>{throw new Error(e)};return new Proxy({},{apply:t,construct:t,defineProperty:t,deleteProperty:t,get:t,getOwnPropertyDescriptor:t,getPrototypeOf:t,has:t,isExtensible:t,ownKeys:t,preventExtensions:t,set:t,setPrototypeOf:t})},$i.createWarningObject=function(e,t){return new Proxy(t,{get:(...t)=>(console.warn(e),Reflect.get(...t)),set:(...t)=>(console.warn(e),Reflect.set(...t)),getOwnPropertyDescriptor:(...t)=>(console.warn(e),Reflect.getOwnPropertyDescriptor(...t)),ownKeys:(...t)=>(console.warn(e),Reflect.ownKeys(...t))})};var Bi,Gi={},Wi={};var Hi={};!function(e){Object.defineProperty(e,\"__esModule\",{value:!0}),e.wrapIntentHandler=e.BROKER_ERRORS=e.generateOverrideWarning=e.generateOverrideError=e.wrapContextHandler=e.wrapInTryCatch=e.generateId=void 0;e.generateId=()=>`${Math.random()}${Date.now()}`;e.wrapInTryCatch=(e,t)=>(...n)=>{try{return e(...n)}catch(e){throw new Error((t||\"\")+e)}};e.wrapContextHandler=(e,t)=>async n=>{try{await e(n)}catch(e){throw console.error(`Error thrown by handler ${t} for context type ${n.type}: ${e}`),e}};e.generateOverrideError=(e,t)=>`You have tried to to use ${e} but ${t} has not been overridden in the Interop Broker. Please override this function. Refer to our documentation for more info.`;e.generateOverrideWarning=(e,t,n,i)=>{const{uuid:r,name:o}=n;return i?`Entity with identity: ${r}/${o} has called ${i} or ${e} but ${t} has not been overridden.`:`Entity with identity: ${r}/${o} has called ${e} but ${t} has not been overridden.`},e.BROKER_ERRORS={fireIntent:(0,e.generateOverrideError)(\"fireIntent\",\"handleFiredIntent\"),fireIntentForContext:(0,e.generateOverrideError)(\"fireIntentForContext\",\"handleFiredIntentForContext\"),getInfoForIntent:(0,e.generateOverrideError)(\"getInfoForIntent\",\"handleInfoForIntent\"),getInfoForIntentsByContext:(0,e.generateOverrideError)(\"getInfoForIntentsByContext\",\"handleInfoForIntentsByContext\"),joinSessionContextGroupWithJoinContextGroup:\"The Context Group you have tried to join is a Session Context Group. Custom Context Groups can only be defined by the Interop Broker through code or manifest configuration. Please use joinSessionContextGroup.\",fdc3Open:(0,e.generateOverrideError)(\"fdc3.open\",\"fdc3HandleOpen\"),fdc3FindInstances:(0,e.generateOverrideError)(\"fdc3.findInstances\",\"fdc3HandleFindInstances\"),fdc3GetAppMetadata:(0,e.generateOverrideError)(\"fdc3.getAppMetadata\",\"fdc3HandleGetAppMetadata\"),fdc3GetInfo:(0,e.generateOverrideError)(\"fdc3.getInfo\",\"fdc3HandleGetInfo\")};e.wrapIntentHandler=(e,t)=>async n=>{try{return e(n)}catch(e){throw console.error(`Error thrown by handler ${t}: ${e}`),e}}}(Hi);var Ni,Di,Ui={};function Vi(){if(Di)return Gi;Di=1;var e,t,n,r=s&&s.__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},o=s&&s.__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)},a=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Gi,\"__esModule\",{value:!0}),Gi.InteropBroker=void 0;const c=d,h=a(function(){if(Bi)return Wi;Bi=1,Object.defineProperty(Wi,\"__esModule\",{value:!0});const e=Cr();return Wi.default=class{constructor(e,t){this.provider=e,this.id=t,this.lastContext=void 0,this.contextGroupMap=new Map,this.clients=new Map,this.registerListeners()}registerListeners(){this.provider.register(`sessionContextGroup:getContext-${this.id}`,this.getCurrentContext.bind(this)),this.provider.register(`sessionContextGroup:setContext-${this.id}`,this.setContext.bind(this)),this.provider.register(`sessionContextGroup:handlerAdded-${this.id}`,this.handlerAdded.bind(this)),this.provider.register(`sessionContextGroup:handlerRemoved-${this.id}`,this.handlerRemoved.bind(this))}getCurrentContext(e){return e.type?this.contextGroupMap.get(e.type):this.lastContext}setContext(t,n){const{context:i}=t,r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name} not in Session Client State Map`);this.contextGroupMap.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{e.contextHandlers.get(i.type)?.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getClientState(e){return this.clients.get(e.endpointId)}async handlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(i){const e=r.contextHandlers.get(i)||[];r.contextHandlers.set(i,[...e,n]);const o=this.contextGroupMap.get(i);o&&await this.provider.dispatch(t,n,o)}else{r.globalHandler=n;const e=[...this.contextGroupMap.keys()].map((async e=>{const i=this.contextGroupMap.get(e);i&&await this.provider.dispatch(t,n,i)}));await Promise.all(e)}}handlerRemoved(e,t){const{handlerId:n}=e,i=this.clients.get(t.endpointId);i?(Array.from(i.contextHandlers).forEach((([,e])=>{const t=e.indexOf(n);t>-1&&e.splice(t,1)})),i.globalHandler===n&&(i.globalHandler=void 0)):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={contextHandlers:new Map,clientIdentity:e,globalHandler:void 0};this.clients.set(e.endpointId,t)}}onDisconnection(e){this.clients.delete(e.endpointId)}},Wi}()),l=Hi,u=a(i),p=function(){if(Ni)return Ui;Ni=1,Object.defineProperty(Ui,\"__esModule\",{value:!0}),Ui.PrivateChannelProvider=void 0;const e=Vi();return Ui.PrivateChannelProvider=class t{constructor(e,t){this.provider=e,this.id=t,this.clients=new Map,this.registerListeners(),this.contextByContextType=new Map,this.lastContext=void 0,this.provider.onConnection((e=>this.registerNewClient(e))),this.provider.onDisconnection((async e=>{const{endpointId:t}=e;this.clients.has(t)&&await this.handleClientDisconnecting(e),0===(await this.provider.getAllClientInfo()).length&&this.provider.destroy()}))}getClientState(e){return this.clients.get(e.endpointId)}registerListeners(){this.provider.register(\"broadcast\",this.broadcast.bind(this)),this.provider.register(\"getCurrentContext\",this.getCurrentContext.bind(this)),this.provider.register(\"contextHandlerAdded\",this.contextHandlerAdded.bind(this)),this.provider.register(\"contextHandlerRemoved\",this.contextHandlerRemoved.bind(this)),this.provider.register(\"nonStandardHandlerRemoved\",this.nonStandardHandlerRemoved.bind(this)),this.provider.register(\"onAddContextHandlerAdded\",this.onAddContextHandlerAdded.bind(this)),this.provider.register(\"onDisconnectHandlerAdded\",this.onDisconnectHandlerAdded.bind(this)),this.provider.register(\"onUnsubscribeHandlerAdded\",this.onUnsubscribeHandlerAdded.bind(this)),this.provider.register(\"clientDisconnecting\",((e,t)=>{this.handleClientDisconnecting(t)}))}broadcast(t,n){const{context:i}=t;if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name}, tried to call broadcast, is not connected to this Private Channel`);const r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to broadcast - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);this.contextByContextType.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{const t=e.handlerIdsByContextTypes.get(i.type);t&&t.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getCurrentContext(e,t){const{contextType:n}=e;if(!this.getClientState(t))throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call getCurrentContext, is not connected to this Private Channel`);if(void 0!==n){return this.contextByContextType.get(n)||null}return this.lastContext?this.lastContext:null}contextHandlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call addContextListener, is not connected to this Private Channel`);if(i){const e=r.handlerIdsByContextTypes.get(i)||[];r.handlerIdsByContextTypes.set(i,[...e,n])}else r.globalHandler=n;Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&e.onAddContextListenerHandlerId&&this.provider.dispatch(e.clientIdentity,e.onAddContextListenerHandlerId,i)}))}async contextHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);if(i){let e;if(i.globalHandler===n)i.globalHandler=void 0;else for(const[t,r]of i.handlerIdsByContextTypes){const i=r.indexOf(n);i>-1&&(r.splice(i,1),e=t)}const r=(await this.getConnectedClients()).map((async n=>{const{clientIdentity:i,clientIdentity:{endpointId:r},onUnsubscribeHandlerId:o}=n;r!==t.endpointId&&o&&await this.provider.dispatch(i,o,e)}));try{await Promise.all(r)}catch(e){throw console.error(`Problem when attempting to dispatch to onUnsubscribeHandlers. Error: ${e} Removing Client: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}`),new Error(e)}}else console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}.`)}nonStandardHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);i?i.onDisconnectHandlerId===n?i.onDisconnectHandlerId=void 0:i.onAddContextListenerHandlerId===n?i.onAddContextListenerHandlerId=void 0:i.onUnsubscribeHandlerId===n&&(i.onUnsubscribeHandlerId=void 0):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}onAddContextHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onAddContextListener, is not connected to this Private Channel`);n.onAddContextListenerHandlerId=i,Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&Array.from(e.handlerIdsByContextTypes.keys()).forEach((e=>{this.provider.dispatch(t,i,e)}))}))}onDisconnectHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onDisconnect, is not connected to this Private Channel`);n.onDisconnectHandlerId=i}onUnsubscribeHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onUnsubscribe, is not connected to this Private Channel`);n.onUnsubscribeHandlerId=i}removeClient(e){const t=this.getClientState(e);if(!t)throw new Error(`Client with Identity: ${e.uuid} ${e.name}, tried to call disconnect, is not connected to this Private Channel`);t.handlerIdsByContextTypes.clear(),this.clients.delete(e.endpointId)}async fireOnDisconnectForOtherClients(e){const{endpointId:t}=e,n=(await this.getConnectedClients()).map((async e=>{const{clientIdentity:{endpointId:n},onDisconnectHandlerId:i}=e;n!==t&&i&&await this.provider.dispatch(e.clientIdentity,i)}));try{await Promise.all(n)}catch(t){throw console.error(`Problem when attempting to dispatch to onDisconnectHandlers. Error: ${t} Disconnecting Client: uuid: ${e.uuid}. name: ${e.name}. endpointId: ${e.endpointId}`),new Error(t)}}async unsubscribeAll(e){const{endpointId:t}=e,n=this.clients.get(t);if(n){const t=Array.from(n.handlerIdsByContextTypes.values()).flat(),i=n.globalHandler;if(t.length>0){const n=t.map((async t=>this.contextHandlerRemoved({handlerId:t},e)));try{await Promise.all(n)}catch(e){console.error(e.message)}}if(i)try{await this.contextHandlerRemoved({handlerId:i},e)}catch(e){console.error(e.message)}}}async handleClientDisconnecting(e){await this.unsubscribeAll(e),this.removeClient(e),await this.fireOnDisconnectForOtherClients(e)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={clientIdentity:e,handlerIdsByContextTypes:new Map,globalHandler:void 0,onAddContextListenerHandlerId:void 0,onUnsubscribeHandlerId:void 0,onDisconnectHandlerId:void 0};this.clients.set(e.endpointId,t)}}async getConnectedClients(){const e=await this.provider.getAllClientInfo();return Array.from(this.clients.values()).filter((t=>{const{uuid:n,name:i}=t.clientIdentity;return e.some((e=>i===e.name&&n===e.uuid))}))}static init(e,n){return new t(e,n)}},Ui}(),w=G,y=[{id:\"green\",displayMetadata:{color:\"#00CC88\",name:\"green\"}},{id:\"purple\",displayMetadata:{color:\"#8C61FF\",name:\"purple\"}},{id:\"orange\",displayMetadata:{color:\"#FF8C4C\",name:\"orange\"}},{id:\"red\",displayMetadata:{color:\"#FF5E60\",name:\"red\"}},{id:\"pink\",displayMetadata:{color:\"#FF8FB8\",name:\"pink\"}},{id:\"yellow\",displayMetadata:{color:\"#E9FF8F\",name:\"yellow\"}}];let f=class i extends c.Base{constructor(i,s,a){super(i),e.set(this,void 0),t.set(this,void 0),n.set(this,void 0),this.getProvider=()=>o(this,n,\"f\").getValue(),this.interopClients=new Map,this.contextGroupsById=new Map,r(this,t,a.contextGroups??[...y],\"f\"),r(this,e,a.fdc3Info,\"f\"),a?.logging&&(this.logging=a.logging),this.intentClientMap=new Map,this.lastContextMap=new Map,this.sessionContextGroupMap=new Map,r(this,n,new w.Lazy(s),\"f\"),this.setContextGroupMap(),this.setupChannelProvider()}static createClosedConstructor(...e){return class extends i{constructor(...t){if(t.length){const[n,i,r]=t;if(r&&\"object\"==typeof r&&!(0,u.default)(r,e[2]))return console.warn(\"You have modified the parameters of the InteropOverride constructor. This behavior is deprecated and will be removed in a future version. You can modify these options in your manifest. Please consult our Interop docs for guidance on migrating to the new override scheme.\"),void super(e[0],e[1],r);console.warn(\"You are attempting to pass arguments to the InteropOverride constructor. This is not necessary, and these passed arguments will be ignored. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.\")}super(...e)}}}setContext({context:e},t){this.wire.sendAction(\"interop-broker-set-context\").catch((e=>{}));const n=this.getClientState(t);if(!n||!n.contextGroupId)throw n?new Error(\"You must join a context group before you can set context.\"):new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);{const{contextGroupId:t}=n;this.setContextForGroup({context:e},t)}}setContextForGroup({context:e},t){this.wire.sendAction(\"interop-broker-set-context-for-group\").catch((e=>{}));const n=this.contextGroupsById.get(t);if(!n)throw new Error(`Unable to set context for context group that isn't in the context group mapping: ${t}.`);const r=i.checkContextIntegrity(e);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(e)}`);const o=e.type;n.set(o,e),this.lastContextMap.set(t,o);Array.from(this.interopClients.values()).filter((e=>e.contextGroupId===t)).forEach((t=>{for(const[,n]of t.contextHandlers)i.isContextTypeCompatible(o,n.contextType)&&this.invokeContextHandler(t.clientIdentity,n.handlerId,e)}))}getCurrentContext(e,t){this.wire.sendAction(\"interop-broker-get-current-context\").catch((e=>{}));const n=this.getClientState(t);if(!n?.contextGroupId)throw new Error(\"You must be a member of a context group to call getCurrentContext\");const{contextGroupId:i}=n,r=this.contextGroupsById.get(i),o=this.lastContextMap.get(i),s=e?.contextType??o;return r&&s?r.get(s):void 0}async joinContextGroup({contextGroupId:e,target:t},n){if(this.wire.sendAction(\"interop-broker-join-context-group\").catch((e=>{})),this.sessionContextGroupMap.has(e))throw new Error(l.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup);if(t){i.hasEndpointId(t)&&await this.addClientToContextGroup({contextGroupId:e},t);try{const n=this.channel.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name));if(!n.length)throw new Error(`Given Identity ${t.uuid} ${t.name} is not connected to the Interop Broker.`);n.length>1&&console.warn(`More than one connection found for identity ${t.uuid} ${t.name}`);const i=[];for(const t of n)i.push(this.addClientToContextGroup({contextGroupId:e},t));await Promise.all(i)}catch(e){throw new Error(e)}}else await this.addClientToContextGroup({contextGroupId:e},n)}async addClientToContextGroup({contextGroupId:e},t){this.wire.sendAction(\"interop-broker-add-client-to-context-group\").catch((e=>{}));const n=this.getClientState(t);if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(!this.getContextGroups().find((t=>t.id===e)))throw new Error(`Attempting to join a context group that does not exist: ${e}. You may only join existing context groups.`);if(n.contextGroupId!==e){n.contextGroupId=e,await this.setCurrentContextGroupInClientOptions(t,e);const i=this.contextGroupsById.get(e);for(const[,e]of n.contextHandlers){const{contextType:n,handlerId:r}=e;if(void 0===n)i.forEach(((e,n)=>{this.invokeContextHandler(t,r,e)}));else if(i.has(n)){const e=i.get(n);e&&this.invokeContextHandler(t,r,e)}}}}async removeFromContextGroup({target:e},t){if(this.wire.sendAction(\"interop-broker-remove-from-context-group\").catch((e=>{})),e){i.hasEndpointId(e)&&await this.removeClientFromContextGroup(e);try{const t=this.channel.connections.filter((t=>t.uuid===e.uuid&&t.name===e.name));if(!t.length)throw new Error(`No connection found for given Identity ${e.uuid} ${e.name}`);t.length>1&&console.warn(`More than one connection found for identity ${e.uuid} ${e.name}`);const n=[];for(const e of t)n.push(this.removeClientFromContextGroup(e));await Promise.all(n)}catch(e){throw new Error(e)}}else await this.removeClientFromContextGroup(t)}async removeClientFromContextGroup(e){this.wire.sendAction(\"interop-broker-remove-client-from-context-group\").catch((e=>{}));const t=this.getClientState(e);t&&(t.contextGroupId=void 0),await this.setCurrentContextGroupInClientOptions(e,null)}getContextGroups(){return this.wire.sendAction(\"interop-broker-get-context-groups\").catch((e=>{})),o(this,t,\"f\").map((e=>({...e})))}getInfoForContextGroup({contextGroupId:e}){return this.wire.sendAction(\"interop-broker-get-info-for-context-group\").catch((e=>{})),this.getContextGroups().find((t=>t.id===e))}getAllClientsInContextGroup({contextGroupId:e}){this.wire.sendAction(\"interop-broker-get-all-clients-in-context-group\").catch((e=>{}));return Array.from(this.interopClients.values()).filter((t=>t.contextGroupId===e)).map((e=>e.clientIdentity))}async handleFiredIntent(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.raiseIntent\",\"InteropBroker.handleFiredIntent\",t,\"interopClient.fireIntent\");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntent)}async setIntentTarget(e,t){this.wire.sendAction(\"interop-broker-set-intent-target\").catch((e=>{}));const n=this.intentClientMap.get(t.name),i=`intent-handler-${e.name}`;if(n){const t=n.get(i);if(t){if(t.pendingIntents.push(e),t.clientIdentity&&t.isReady){const{clientIdentity:e,pendingIntents:n}=t;try{const r=n[n.length-1];await this.invokeIntentHandler(e,i,r),t.pendingIntents=[]}catch(n){console.error(`Error invoking intent handler for client ${e.uuid}/${e.name}/${e.endpointId}`),t.isReady=!1}}}else n.set(i,{isReady:!1,pendingIntents:[e]})}else{this.intentClientMap.set(t.name,new Map);const n=this.intentClientMap.get(t.name);n&&n.set(i,{isReady:!1,pendingIntents:[e]})}}async handleInfoForIntent(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.findIntent\",\"InteropBroker.handleInfoForIntent\",t,\"interopClient.getInfoForIntent\");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntent)}async handleInfoForIntentsByContext(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.findIntentsByContext\",\"InteropBroker.handleInfoForIntentsByContext\",t,\"interopClient.getInfoForIntentsByContext\");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntentsByContext)}async handleFiredIntentForContext(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.raiseIntentForContext\",\"InteropBroker.handleFiredIntentForContext\",t,\"interopClient.fireIntentForContext\");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntentForContext)}async clientDisconnected(e){}async fdc3HandleOpen({app:e,context:t},n){const i=(0,l.generateOverrideWarning)(\"fdc3.open\",\"InteropBroker.fdc3HandleOpen\",n);throw console.warn(i),new Error(l.BROKER_ERRORS.fdc3Open)}async fdc3HandleFindInstances(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.open\",\"InteropBroker.fdc3HandleFindInstances\",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3FindInstances)}async fdc3HandleGetAppMetadata(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.getAppMetadata\",\"InteropBroker.fdc3HandleGetAppMetadata\",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3GetAppMetadata)}async invokeContextHandler(e,t,n){const i=await this.getProvider();try{await i.dispatch(e,t,n)}catch(i){console.error(`Error invoking context handler ${t} for context type ${n.type} in client ${e.uuid}/${e.name}/${e.endpointId}`,i)}}async invokeIntentHandler(e,t,n){const i=await this.getProvider();await i.dispatch(e,t,n)}async fdc3HandleGetInfo(t,n){const{fdc3Version:i}=t;return{fdc3Version:i,...o(this,e,\"f\"),optionalFeatures:{OriginatingAppMetadata:!1,UserChannelMembershipAPIs:!0},appMetadata:{appId:\"\",instanceId:\"\"}}}async getAllClientInfo(){return(await this.getProvider()).getAllClientInfo()}decorateSnapshot(e){return{...e,interopSnapshotDetails:{contextGroupStates:this.getContextGroupStates()}}}applySnapshot(e,t){const n=e?.interopSnapshotDetails?.contextGroupStates;n&&(t?.closeExistingWindows||this.updateExistingClients(n),this.rehydrateContextGroupStates(n))}updateExistingClients(e){this.interopClients.forEach((t=>{const{clientIdentity:n,contextGroupId:r,contextHandlers:o}=t;if(r){const t=e[r];for(const[,e]of Object.entries(t))o.forEach((t=>{const{handlerId:r,contextType:o}=t;i.isContextTypeCompatible(e.type,o)&&this.invokeContextHandler(n,r,e)}))}}))}getContextGroupStates(){return i.toObject(this.contextGroupsById)}rehydrateContextGroupStates(e){const t=Object.entries(e);for(const[e,n]of t){const t=Object.entries(n);for(const[n,i]of t)if(this.contextGroupsById.has(e)){this.contextGroupsById.get(e).set(n,i)}else console.warn(`Attempting to set a context group that isn't in the context group mapping. Skipping context group rehydration for: ${e}`)}}contextHandlerRegistered({contextType:e,handlerId:t},n){const i={contextType:e,handlerId:t},r=this.getClientState(n);if(r?.contextHandlers.set(t,i),r&&r.contextGroupId){const{contextGroupId:i}=r,o=this.contextGroupsById.get(i);if(void 0===e)o.forEach(((e,i)=>{this.invokeContextHandler(n,t,e)}));else if(o.has(e)){const i=o.get(e);i&&this.invokeContextHandler(n,t,i)}}}async intentHandlerRegistered(e,t){const{handlerId:n}=e,i=this.intentClientMap.get(t.name),r=i?.get(n);if(i)if(r){const{pendingIntents:e}=r;r.clientIdentity=t,r.isReady=!0;try{if(e.length>0){const i=e[e.length-1];await this.invokeIntentHandler(t,n,i),r.pendingIntents=[]}}catch(e){console.error(`Error invoking intent handler: ${n} for client ${t.uuid}/${t.name}/${t.endpointId}`)}}else i.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t});else{this.intentClientMap.set(t.name,new Map);const e=this.intentClientMap.get(t.name);e&&e.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t})}}removeContextHandler({handlerId:e},t){const n=this.getClientState(t);n&&n.contextHandlers.delete(e)}handleJoinSessionContextGroup({sessionContextGroupId:e},t){try{if(!e)throw new Error(\"Failed to join session context group: must specify group id.\");const n=this.sessionContextGroupMap.get(e);if(n)n.registerNewClient(t);else{const n=new h.default(this.channel,e);n.registerNewClient(t),this.sessionContextGroupMap.set(e,n)}return{hasConflict:this.contextGroupsById.has(e)}}catch(e){throw new Error(e)}}getClientState(e){return this.interopClients.get(e.endpointId)}static toObject(e){const t=Object.fromEntries(e),n={};return Object.entries(t).forEach((([e,t])=>{const i=Object.fromEntries(t);n[e]=i})),n}static checkContextIntegrity(e){if(!e)return{isValid:!1,reason:\"No context supplied\"};if(\"object\"!=typeof e)return{isValid:!1,reason:\"Context must be an Object\"};if(!e.type)return{isValid:!1,reason:\"Context must have a type property\"};if(e.id&&\"object\"!=typeof e.id)return{isValid:!1,reason:\"Context id must be an Object populated with key-value identifiers (if set)\"};if(e.id){const{id:t}=e,n=Object.keys(t);let i=!1;if(!n.length)return{isValid:!1,reason:\"Context id must have at least one key-value identifier\"};if(n.forEach((e=>{\"string\"==typeof e&&\"string\"==typeof t[e]||(i=!0)})),i)return{isValid:!1,reason:\"Context id key-value identifiers must be of type string\"}}return e.name&&\"string\"!=typeof e.name?{isValid:!1,reason:\"Context name must be of string type (if set)\"}:{isValid:!0}}static hasEndpointId(e){return void 0!==e.endpointId}static isContextTypeCompatible(e,t){return void 0===t||e===t}setContextGroupMap(){for(const e of this.getContextGroups())this.contextGroupsById.set(e.id,new Map)}async setCurrentContextGroupInClientOptions(e,t){try{const n=await this.fin.System.getEntityInfo(e.uuid,e.name);let i;\"view\"===n.entityType?i=await this.fin.View.wrap(e):\"window\"===n.entityType&&(i=await this.fin.Window.wrap(e)),i&&await i.updateOptions({interop:{currentContextGroup:t}})}catch(e){}}async setupChannelProvider(){try{const e=await this.getProvider();this.channel=e,this.wireChannel(e)}catch(e){throw new Error(`Error setting up Interop Broker Channel Provider: ${e}`)}}wireChannel(e){e.onConnection((async(e,t)=>{if(!await this.isConnectionAuthorized(e,t))throw new Error(`Connection not authorized for ${e.uuid}, ${e.name}`);if(!e.endpointId)throw new Error(\"Version too old to be compatible with Interop. Please upgrade your runtime to a more recent version.\");const n={contextGroupId:void 0,contextHandlers:new Map,clientIdentity:e};t?.currentContextGroup&&this.contextGroupsById.has(t.currentContextGroup)&&(n.contextGroupId=t?.currentContextGroup),this.interopClients.set(e.endpointId,n)})),e.onDisconnection((e=>{this.interopClients.delete(e.endpointId);const t=this.intentClientMap.get(e.name);t&&e.uuid===this.fin.me.uuid&&t.forEach((e=>{e.isReady=!1})),this.sessionContextGroupMap.forEach((t=>{t.onDisconnection(e)})),this.clientDisconnected(e)})),e.beforeAction((async(e,t,n)=>{if(!await this.isActionAuthorized(e,t,n))throw new Error(`Action (${e}) not authorized for ${n.uuid}, ${n.name}`);this.logging?.beforeAction?.enabled&&console.log(e,t,n)})),e.afterAction(((e,t,n)=>{this.logging?.afterAction?.enabled&&console.log(e,t,n)})),e.register(\"setContext\",this.setContext.bind(this)),e.register(\"fireIntent\",this.handleFiredIntent.bind(this)),e.register(\"getCurrentContext\",this.getCurrentContext.bind(this)),e.register(\"getInfoForIntent\",this.handleInfoForIntent.bind(this)),e.register(\"getInfoForIntentsByContext\",this.handleInfoForIntentsByContext.bind(this)),e.register(\"fireIntentForContext\",this.handleFiredIntentForContext.bind(this)),e.register(\"getContextGroups\",this.getContextGroups.bind(this)),e.register(\"joinContextGroup\",this.joinContextGroup.bind(this)),e.register(\"removeFromContextGroup\",this.removeFromContextGroup.bind(this)),e.register(\"getAllClientsInContextGroup\",this.getAllClientsInContextGroup.bind(this)),e.register(\"getInfoForContextGroup\",this.getInfoForContextGroup.bind(this)),e.register(\"contextHandlerRegistered\",this.contextHandlerRegistered.bind(this)),e.register(\"intentHandlerRegistered\",this.intentHandlerRegistered.bind(this)),e.register(\"removeContextHandler\",this.removeContextHandler.bind(this)),e.register(\"sessionContextGroup:createIfNeeded\",this.handleJoinSessionContextGroup.bind(this)),e.register(\"fdc3Open\",this.fdc3HandleOpen.bind(this)),e.register(\"fdc3v2FindIntentsByContext\",this.handleInfoForIntentsByContext.bind(this)),e.register(\"fdc3FindInstances\",this.fdc3HandleFindInstances.bind(this)),e.register(\"fdc3GetAppMetadata\",this.fdc3HandleGetAppMetadata.bind(this)),e.register(\"fdc3v2GetInfo\",(async(e,t)=>this.fdc3HandleGetInfo.bind(this)(e,t))),e.register(\"createPrivateChannelProvider\",(async e=>{const{channelId:t}=e,n=await this.fin.InterApplicationBus.Channel.create(t);p.PrivateChannelProvider.init(n,t)}))}isConnectionAuthorized(e,t){return this.wire.sendAction(\"interop-broker-is-connection-authorized\").catch((e=>{})),Promise.resolve(!0)}isActionAuthorized(e,t,n){return this.wire.sendAction(\"interop-broker-is-action-authorized\").catch((e=>{})),Promise.resolve(!0)}};return Gi.InteropBroker=f,e=new WeakMap,t=new WeakMap,n=new WeakMap,Gi}var zi,Ki={},qi={},Ji=s&&s.__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},Yi=s&&s.__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)};Object.defineProperty(qi,\"__esModule\",{value:!0});const Zi=d,Qi=Hi;class Xi extends Zi.Base{constructor(e,t,n){super(e),zi.set(this,void 0),this.id=n,Ji(this,zi,t,\"f\")}async setContext(e){this.wire.sendAction(\"interop-session-context-group-set-context\").catch((e=>{}));return(await Yi(this,zi,\"f\")).dispatch(`sessionContextGroup:setContext-${this.id}`,{sessionContextGroupId:this.id,context:e})}async getCurrentContext(e){this.wire.sendAction(\"interop-session-context-group-get-context\").catch((e=>{}));return(await Yi(this,zi,\"f\")).dispatch(`sessionContextGroup:getContext-${this.id}`,{sessionContextGroupId:this.id,type:e})}async addContextHandler(e,t){if(this.wire.sendAction(\"interop-session-context-group-add-handler\").catch((e=>{})),\"function\"!=typeof e)throw new Error(\"Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.\");const n=await Yi(this,zi,\"f\");let i;return i=t?`sessionContextHandler:invoke-${this.id}-${t}-${(0,Qi.generateId)()}`:`sessionContextHandler:invoke-${this.id}`,n.register(i,(0,Qi.wrapContextHandler)(e,i)),await n.dispatch(`sessionContextGroup:handlerAdded-${this.id}`,{handlerId:i,contextType:t}),{unsubscribe:await this.createUnsubscribeCb(i)}}async createUnsubscribeCb(e){const t=await Yi(this,zi,\"f\");return async()=>{t.remove(e),await t.dispatch(`sessionContextGroup:handlerRemoved-${this.id}`,{handlerId:e})}}getUserInstance(){return{id:this.id,setContext:(0,Qi.wrapInTryCatch)(this.setContext.bind(this),\"Failed to set context: \"),getCurrentContext:(0,Qi.wrapInTryCatch)(this.getCurrentContext.bind(this),\"Failed to get context: \"),addContextHandler:(0,Qi.wrapInTryCatch)(this.addContextHandler.bind(this),\"Failed to add context handler: \")}}}qi.default=Xi,zi=new WeakMap;var er={},tr={},nr={},ir={},rr=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),or=s&&s.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,\"default\",{enumerable:!0,value:t})}:function(e,t){e.default=t}),sr=s&&s.__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)&&rr(t,e,n);return or(t,e),t};Object.defineProperty(ir,\"__esModule\",{value:!0}),ir.PrivateChannelClient=void 0;const ar=sr(Hi);var cr,dr;function hr(){if(cr)return tr;cr=1;var e,t=s&&s.__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)},n=s&&s.__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},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(tr,\"__esModule\",{value:!0}),tr.FDC3ModuleBase=void 0;const o=nr,a=Hi,c=wr(),d=r(i);return tr.FDC3ModuleBase=class{get client(){return t(this,e,\"f\").call(this)}get fin(){return this.wire.getFin()}constructor(t,i){this.wire=i,e.set(this,void 0),n(this,e,t,\"f\")}async broadcast(e){return this.wire.sendAction(\"fdc3-broadcast\").catch((e=>{})),this.client.setContext(e)}async _open(e,t){this.wire.sendAction(\"fdc3-open\").catch((e=>{}));try{return await c.InteropClient.ferryFdc3Call(this.client,\"fdc3Open\",{app:e,context:t})}catch(e){const t=e.message===a.BROKER_ERRORS.fdc3Open?\"ResolverUnavailable\":e.message;throw new Error(t)}}async _getChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:\"system\",...(0,o.getUnsupportedChannelApis)()})))}async getOrCreateChannel(e){this.wire.sendAction(\"fdc3-get-or-create-channel\").catch((e=>{}));const t=(await this._getChannels()).find((t=>t.id===e));if(t)return{...t,type:\"system\",...(0,o.getUnsupportedChannelApis)()};try{const t=await this.client.joinSessionContextGroup(e);return(0,o.buildAppChannelObject)(t)}catch(e){throw console.error(e.message),new Error(o.ChannelError.CreationFailed)}}async getSystemChannels(){return this.wire.sendAction(\"fdc3-get-system-channels\").catch((e=>{})),this._getChannels()}async joinChannel(e){this.wire.sendAction(\"fdc3-join-channel\").catch((e=>{}));try{return await this.client.joinContextGroup(e)}catch(e){if(e.message===a.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup?console.error(\"The Channel you have tried to join is an App Channel. Custom Channels can only be defined by the Interop Broker through code or manifest configuration. Please use getOrCreateChannel.\"):console.error(e.message),e.message.startsWith(\"Attempting to join a context group that does not exist\"))throw new Error(o.ChannelError.NoChannelFound);throw new Error(o.ChannelError.AccessDenied)}}async getCurrentChannel(){this.wire.sendAction(\"fdc3-get-current-channel\").catch((e=>{}));const e=await this.getCurrentContextGroupInfo();return e?this.buildChannelObject(e):null}async leaveCurrentChannel(){return this.wire.sendAction(\"fdc3-leave-current-channel\").catch((e=>{})),this.client.removeFromContextGroup()}async getCurrentContextGroupInfo(){const e=await this.client.getContextGroups(),t=e.map((async e=>this.client.getAllClientsInContextGroup(e.id))),n=(await Promise.all(t)).findIndex((e=>e.some((e=>{const{uuid:t,name:n}=e;return this.wire.me.uuid===t&&this.wire.me.name===n}))));return e[n]}async buildChannelObject(e){return{...e,type:\"system\",addContextListener:(...[e,t])=>{let n,i;\"function\"==typeof e?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),n=e):(n=t,\"string\"==typeof e&&(i=e));const r=(async()=>{let e=!0;const t=await this.client.getCurrentContext(i);return this.client.addContextHandler(((i,r)=>{if(!e||(e=!1,!(0,d.default)(t,i)))return n(i,r)}),i)})();return{...r,unsubscribe:()=>r.then((e=>e.unsubscribe()))}},broadcast:this.broadcast.bind(this),getCurrentContext:async e=>{const t=await this.client.getCurrentContext(e);return void 0===t?null:t}}}},e=new WeakMap,tr}ir.PrivateChannelClient=class{constructor(e,t){this.id=t,this.client=e,this.listeners=new Map}async broadcast(e){return this.client.dispatch(\"broadcast\",{context:e})}async getCurrentContext(e){return this.client.dispatch(\"getCurrentContext\",{contextType:e})}async addContextListener(e,t){if(\"function\"!=typeof t)throw new Error(\"Non-function argument passed to the second parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.\");let n;n=e?`contextHandler:invoke-${this.id}-${e}-${ar.generateId()}`:`contextHandler:invoke-${this.id}-${ar.generateId()}`,this.client.register(n,ar.wrapContextHandler(t,n));const i={unsubscribe:await this.createContextUnsubscribeCb(n)};return this.listeners.set(n,i),await this.client.dispatch(\"contextHandlerAdded\",{handlerId:n,contextType:e}),i}createNonStandardUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch(\"nonStandardHandlerRemoved\",{handlerId:e})}}createContextUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch(\"contextHandlerRemoved\",{handlerId:e})}}onAddContextListener(e){const t=`onContextHandlerAdded:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch(\"onAddContextHandlerAdded\",{handlerId:t}),n}onDisconnect(e){const t=`onDisconnect:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch(\"onDisconnectHandlerAdded\",{handlerId:t}),n}onUnsubscribe(e){const t=`onUnsubscribe:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch(\"onUnsubscribeHandlerAdded\",{handlerId:t}),n}async cleanUpAllSubs(){Array.from(this.listeners.keys()).forEach((e=>{this.client.remove(e),this.listeners.delete(e)}))}async disconnect(){try{await this.client.dispatch(\"clientDisconnecting\"),await this.cleanUpAllSubs(),await this.client.disconnect()}catch(e){throw new Error(e.message)}}},function(e){var t=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,\"__esModule\",{value:!0}),e.getIntentResolution=e.isChannel=e.isContext=e.connectPrivateChannel=e.buildAppChannelObject=e.buildPrivateChannelObject=e.ChannelError=e.ResultError=e.UnsupportedChannelApiError=e.getUnsupportedChannelApis=void 0;const n=Hi,r=ir,o=t(i);e.getUnsupportedChannelApis=e=>({addContextListener:()=>{throw new a(\"Channel.addContextListener\",e)},broadcast:()=>{throw new a(\"Channel.broadcast\",e)},getCurrentContext:()=>{throw new a(\"Channel.getCurrentContext\",e)}});class a extends Error{constructor(e,t=\"System\"){super(e),this.message=`Calling ${e} on an instance of a ${t} Channel returned by fdc3.get${t}Channels is not supported. If you would like to use a ${t} Channel, please use fdc3.joinChannel, fdc3.addContextListener, and fdc3.broadcast instead.`}}var c,d;e.UnsupportedChannelApiError=a,function(e){e.NoResultReturned=\"NoResultReturned\",e.IntentHandlerRejected=\"IntentHandlerRejected\"}(c=e.ResultError||(e.ResultError={})),(d=e.ChannelError||(e.ChannelError={})).NoChannelFound=\"NoChannelFound\",d.AccessDenied=\"AccessDenied\",d.CreationFailed=\"CreationFailed\";e.buildPrivateChannelObject=e=>{let t=!1;const n=()=>{if(t)throw new Error(\"Private Channel Client has been disconnected from the Private Channel\")};return{id:e.id,type:\"private\",broadcast:async t=>(n(),e.broadcast(t)),getCurrentContext:async t=>(n(),e.getCurrentContext(t)),addContextListener:async(t,i)=>{n();let r=i,o=t;\"function\"==typeof t&&(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),r=t,o=null);return e.addContextListener(o,r)},onAddContextListener:t=>(n(),e.onAddContextListener(t)),disconnect:async()=>(n(),t=!0,e.disconnect()),onDisconnect:t=>(n(),e.onDisconnect(t)),onUnsubscribe:t=>(n(),e.onUnsubscribe(t))}};e.buildAppChannelObject=e=>({id:e.id,type:\"app\",broadcast:e.setContext,getCurrentContext:async t=>{const n=await e.getCurrentContext(t);return void 0===n?null:n},addContextListener:(t,n)=>{let i,r;\"function\"==typeof t?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),i=t):(i=n,\"string\"==typeof t&&(r=t));const s=(async()=>{let t=!0;const n=await e.getCurrentContext(r);return e.addContextHandler(((e,r)=>{if(!t||(t=!1,!(0,o.default)(n,e)))return i(e,r)}),r)})();return{...s,unsubscribe:()=>s.then((e=>e.unsubscribe()))}}});e.connectPrivateChannel=async t=>{try{const n=await fin.InterApplicationBus.Channel.connect(t),i=new r.PrivateChannelClient(n,t);return(0,e.buildPrivateChannelObject)(i)}catch(e){throw new Error(`Private Channel with id: ${t} doesn't exist`)}};e.isContext=e=>{if(e&&\"object\"==typeof e&&\"type\"in e){const{type:t}=e;return\"string\"==typeof t}return!1};e.isChannel=e=>{if(e&&\"object\"==typeof e&&\"type\"in e&&\"id\"in e){const{type:t,id:n}=e;return\"string\"==typeof t&&\"string\"==typeof n&&(\"app\"===t||\"private\"===t)}return!1};e.getIntentResolution=async(t,i,r,o)=>{const s=(0,n.generateId)(),a=new Promise(((e,t)=>{fin.InterApplicationBus.subscribe({uuid:\"*\"},s,(t=>{e(t)})).catch((()=>t(new Error(\"getResult is not supported in this environment\"))))})),d=r?{target:r,intentResolutionResultId:s}:{intentResolutionResultId:s},h=o?{name:o,context:i,metadata:d}:{...i,metadata:d},l=async()=>{let n=await a;if(!n||\"object\"!=typeof n)throw new Error(c.NoResultReturned);const{error:i}=n;if(i)throw new Error(c.IntentHandlerRejected);if((0,e.isChannel)(n)){const{id:i,type:r}=n;switch(r){case\"private\":n=await(0,e.connectPrivateChannel)(i);break;case\"app\":{const r=await t.joinSessionContextGroup(i);n=(0,e.buildAppChannelObject)(r);break}}}else if(!(0,e.isContext)(n))throw new Error(c.NoResultReturned);return n},u=o?await t.fireIntent(h):await t.fireIntentForContext(h);return\"object\"!=typeof u?{source:{appId:\"\",instanceId:\"\"},intent:\"\",version:\"2.0\",getResult:l}:{...u,getResult:l}}}(nr);var lr,ur,pr={};function wr(){if(ur)return Ki;ur=1;var e,t,n=s&&s.__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},i=s&&s.__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)},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ki,\"__esModule\",{value:!0}),Ki.InteropClient=void 0;const o=d,a=r(qi),c=function(){if(dr)return er;dr=1,Object.defineProperty(er,\"__esModule\",{value:!0}),er.Fdc3Module=void 0;const e=Hi,t=hr();class n extends t.FDC3ModuleBase{async open(e,t){await super._open(e,t)}addContextListener(e,t){let n;return this.wire.sendAction(\"fdc3-add-context-listener\").catch((e=>{})),\"function\"==typeof e?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),n=this.client.addContextHandler(e)):n=this.client.addContextHandler(t,null===e?void 0:e),{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}addIntentListener(e,t){this.wire.sendAction(\"fdc3-add-intent-listener\").catch((e=>{}));const n=this.client.registerIntentHandler((e=>{const{context:n,metadata:i}=e,{metadata:r}=n,o=i?.intentResolutionResultId||r?.intentResolutionResultId;o&&this.fin.InterApplicationBus.publish(o,null).catch((()=>null)),t(e.context)}),e,{fdc3Version:\"1.2\"});return{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}async raiseIntent(t,n,i){this.wire.sendAction(\"fdc3-raise-intent\").catch((e=>{}));const r=i?{name:t,context:n,metadata:{target:i}}:{name:t,context:n};try{return await this.client.fireIntent(r)}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntent?\"ResolverUnavailable\":t.message;throw new Error(n)}}async findIntent(t,n){this.wire.sendAction(\"fdc3-find-intent\").catch((e=>{}));try{return await this.client.getInfoForIntent({name:t,context:n})}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntent?\"ResolverUnavailable\":t.message;throw new Error(n)}}async findIntentsByContext(t){this.wire.sendAction(\"fdc3-find-intents-by-context\").catch((e=>{}));try{return await this.client.getInfoForIntentsByContext(t)}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntentsByContext?\"ResolverUnavailable\":t.message;throw new Error(n)}}async raiseIntentForContext(t,n){this.wire.sendAction(\"fdc3-raise-intent-for-context\").catch((e=>{}));try{return await this.client.fireIntentForContext({...t,metadata:{target:n}})}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntentForContext?\"ResolverUnavailable\":t.message;throw new Error(n)}}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}getInfo(){return this.wire.sendAction(\"fdc3-get-info\").catch((e=>{})),{providerVersion:this.wire.environment.getAdapterVersionSync(),provider:`openfin-${this.wire.me.uuid}`,fdc3Version:\"1.2\"}}}return er.Fdc3Module=n,er}(),h=function(){if(lr)return pr;lr=1,Object.defineProperty(pr,\"__esModule\",{value:!0}),pr.Fdc3Module2=void 0;const e=hr(),t=Hi,n=wr(),i=nr,r=ir;class o extends e.FDC3ModuleBase{async open(e,t){return\"string\"==typeof e&&console.warn(\"Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).\"),super._open(e,t)}async findInstances(e){this.wire.sendAction(\"fdc3-find-instances\").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,\"fdc3FindInstances\",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3FindInstances?\"ResolverUnavailable\":e.message;throw new Error(n)}}async getAppMetadata(e){this.wire.sendAction(\"fdc3-get-app-metadata\").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,\"fdc3GetAppMetadata\",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3GetAppMetadata?\"ResolverUnavailable\":e.message;throw new Error(n)}}async addContextListener(e,t){this.wire.sendAction(\"fdc3-add-context-listener\").catch((e=>{}));const n=e=>t=>{const{contextMetadata:n,...i}=t,r=n?[{...i},n]:[t,null];e(...r)};let i=t,r=n(i);return\"function\"==typeof e?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),i=e,r=n(i),this.client.addContextHandler(r)):this.client.addContextHandler(r,null===e?void 0:e)}async findIntent(e,n,i){this.wire.sendAction(\"fdc3-find-intent\").catch((e=>{}));try{return await this.client.getInfoForIntent({name:e,context:n,metadata:{resultType:i}})}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntent?\"ResolverUnavailable\":e.message;throw new Error(n)}}async findIntentsByContext(e,i){this.wire.sendAction(\"fdc3-find-intents-by-context\").catch((e=>{}));const r=i?{context:e,metadata:{resultType:i}}:e;try{return await n.InteropClient.ferryFdc3Call(this.client,\"fdc3v2FindIntentsByContext\",r)}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntentsByContext?\"ResolverUnavailable\":e.message;throw new Error(n)}}async raiseIntent(e,n,r){this.wire.sendAction(\"fdc3-raise-intent\").catch((e=>{}));try{return\"string\"==typeof r&&console.warn(\"Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).\"),(0,i.getIntentResolution)(this.client,n,r,e)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?\"ResolverUnavailable\":e.message;throw new Error(n)}}async raiseIntentForContext(e,n){this.wire.sendAction(\"fdc3-raise-intent-for-context\").catch((e=>{}));try{return\"string\"==typeof n&&console.warn(\"Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).\"),(0,i.getIntentResolution)(this.client,e,n)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?\"ResolverUnavailable\":e.message;throw new Error(n)}}async addIntentListener(e,t){if(this.wire.sendAction(\"fdc3-add-intent-listener\").catch((e=>{})),\"string\"!=typeof e)throw new Error(\"First argument must be an Intent name\");return this.client.registerIntentHandler((async e=>{let n,i;const{context:r,metadata:o}=e,{contextMetadata:s,metadata:a,...c}=r,d=o?.intentResolutionResultId||a?.intentResolutionResultId;try{const e=a?{metadata:a,...c}:{...c};n=await t(e,s),i=n}catch(e){n=e,i={error:!0}}if(d&&this.fin.InterApplicationBus.publish(d,i).catch((()=>null)),n instanceof Error)throw new Error(n.message);return n}),e,{fdc3Version:\"2.0\"})}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}async createPrivateChannel(){const e=(0,t.generateId)();await n.InteropClient.ferryFdc3Call(this.client,\"createPrivateChannelProvider\",{channelId:e});const o=await this.fin.InterApplicationBus.Channel.connect(e),s=new r.PrivateChannelClient(o,e);return(0,i.buildPrivateChannelObject)(s)}async getUserChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:\"user\",...(0,i.getUnsupportedChannelApis)(\"User\")})))}async getSystemChannels(){return console.warn(\"This API has been deprecated. Please use fdc3.getUserChannels instead.\"),super.getSystemChannels()}async joinUserChannel(e){return super.joinChannel(e)}async joinChannel(e){return console.warn(\"This API has been deprecated. Please use fdc3.joinUserChannel instead.\"),super.joinChannel(e)}async getCurrentChannel(){const e=await super.getCurrentChannel();return e?{...e,type:\"user\",broadcast:this.broadcast.bind(this)}:null}async getInfo(){return n.InteropClient.ferryFdc3Call(this.client,\"fdc3v2GetInfo\",{fdc3Version:\"2.0\"})}}return pr.Fdc3Module2=o,pr}(),l=Hi;let u=class extends o.Base{constructor(i,r){super(i),e.set(this,void 0),t.set(this,void 0),n(this,t,new Map,\"f\"),n(this,e,r,\"f\")}async setContext(t){this.wire.sendAction(\"interop-client-set-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"setContext\",{context:t})}async addContextHandler(t,n){if(this.wire.sendAction(\"interop-client-add-context-handler\").catch((e=>{})),\"function\"!=typeof t)throw new Error(\"Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.\");const r=await i(this,e,\"f\");let o;o=n?`invokeContextHandler-${n}-${(0,l.generateId)()}`:\"invokeContextHandler\";const s=(0,l.wrapContextHandler)(t,o);return r.register(o,s),await r.dispatch(\"contextHandlerRegistered\",{handlerId:o,contextType:n}),{unsubscribe:async()=>{r.remove(o),await r.dispatch(\"removeContextHandler\",{handlerId:o})}}}async getContextGroups(){this.wire.sendAction(\"interop-client-get-context-groups\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getContextGroups\")}async joinContextGroup(t,n){this.wire.sendAction(\"interop-client-join-context-group\").catch((e=>{}));const r=await i(this,e,\"f\");if(!t)throw new Error(\"No contextGroupId specified for joinContextGroup.\");return r.dispatch(\"joinContextGroup\",{contextGroupId:t,target:n})}async removeFromContextGroup(t){this.wire.sendAction(\"interop-client-remove-from-context-group\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"removeFromContextGroup\",{target:t})}async getAllClientsInContextGroup(t){this.wire.sendAction(\"interop-client-get-all-clients-in-context-group\").catch((e=>{}));const n=await i(this,e,\"f\");if(!t)throw new Error(\"No contextGroupId specified for getAllClientsInContextGroup.\");return n.dispatch(\"getAllClientsInContextGroup\",{contextGroupId:t})}async getInfoForContextGroup(t){this.wire.sendAction(\"interop-client-get-info-for-context-group\").catch((e=>{}));const n=await i(this,e,\"f\");if(!t)throw new Error(\"No contextGroupId specified for getInfoForContextGroup.\");return n.dispatch(\"getInfoForContextGroup\",{contextGroupId:t})}async fireIntent(t){this.wire.sendAction(\"interop-client-fire-intent\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"fireIntent\",t)}async registerIntentHandler(t,n,r){this.wire.sendAction(\"interop-client-register-intent-handler\").catch((e=>{}));const o=await i(this,e,\"f\"),s=`intent-handler-${n}`,a=(0,l.wrapIntentHandler)(t,s);try{await o.register(s,a),await o.dispatch(\"intentHandlerRegistered\",{handlerId:s,...r})}catch(e){throw new Error(\"Unable to register intent handler\")}return{unsubscribe:async()=>{o.remove(s)}}}async getCurrentContext(t){this.wire.sendAction(\"interop-client-get-current-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getCurrentContext\",{contextType:t})}async getInfoForIntent(t){this.wire.sendAction(\"interop-client-get-info-for-intent\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getInfoForIntent\",t)}async getInfoForIntentsByContext(t){this.wire.sendAction(\"interop-client-get-info-for-intents-by-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getInfoForIntentsByContext\",t)}async fireIntentForContext(t){this.wire.sendAction(\"interop-client-fire-intent-for-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"fireIntentForContext\",t)}async joinSessionContextGroup(n){try{const r=i(this,t,\"f\").get(n);if(r)return r.getUserInstance();const o=await i(this,e,\"f\"),{hasConflict:s}=await o.dispatch(\"sessionContextGroup:createIfNeeded\",{sessionContextGroupId:n});s&&console.warn(`A (non-session) context group with the name \"${n}\" already exists. If you are trying to join a Context Group, call joinContextGroup instead.`);const c=new a.default(this.wire,i(this,e,\"f\"),n);return i(this,t,\"f\").set(n,c),c.getUserInstance()}catch(e){throw console.error(`Error thrown trying to create Session Context Group with id \"${n}\": ${e}`),e}}async onDisconnection(t){this.wire.sendAction(\"interop-client-add-ondisconnection-listener\").catch((e=>{}));return(await i(this,e,\"f\")).onDisconnection((e=>{const{uuid:n}=e;t({type:\"interop-broker\",topic:\"disconnected\",brokerName:n})}))}getFDC3Sync(e){switch(e){case\"1.2\":return new c.Fdc3Module((()=>this),this.wire);case\"2.0\":return new h.Fdc3Module2((()=>this),this.wire);default:throw new Error(`Invalid FDC3 version provided: ${e}. Must be '1.2' or '2.0'`)}}async getFDC3(e){return this.getFDC3Sync(e)}static async ferryFdc3Call(t,n,r){return(await i(t,e,\"f\")).dispatch(n,r||null)}};return Ki.InteropClient=u,e=new WeakMap,t=new WeakMap,Ki}var yr,fr,gr,mr={};function vr(){if(yr)return mr;yr=1,Object.defineProperty(mr,\"__esModule\",{value:!0}),mr.overrideCheck=mr.checkFDC32Overrides=mr.getDefaultViewFdc3VersionFromAppInfo=void 0;const e=Vi();function t(t){return[\"fdc3HandleFindInstances\",\"handleInfoForIntent\",\"handleInfoForIntentsByContext\",\"fdc3HandleGetAppMetadata\",\"fdc3HandleGetInfo\",\"fdc3HandleOpen\",\"handleFiredIntent\",\"handleFiredIntentForContext\"].filter((n=>t[n]===e.InteropBroker.prototype[n]))}return mr.getDefaultViewFdc3VersionFromAppInfo=function({manifest:e,initialOptions:t}){const n=e?.platform?.defaultViewOptions?.fdc3InteropApi??t.defaultViewOptions?.fdc3InteropApi;return[\"1.2\",\"2.0\"].includes(n??\"\")?n:void 0},mr.checkFDC32Overrides=t,mr.overrideCheck=function(e,n){if(n&&\"2.0\"===n){const n=t(e);n.length>0&&console.warn(`WARNING: FDC3 2.0 has been set as a default option for Views in this Platform, but the required InteropBroker APIs for FDC3 2.0 compliance have not all been overridden.\\nThe following APIs need to be overridden:\\n${n.join(\"\\n\")}`)}},mr}function Cr(){return gr||(gr=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),i=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),i(function(){if(fr)return Ti;fr=1;var e=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ti,\"__esModule\",{value:!0}),Ti.InteropModule=void 0;const t=e(n),i=$i,r=d,o=Vi(),a=wr(),c=vr(),h=Tn,l=e=>new e,u=\"You have attempted to use or modify InteropBroker parameters, which is not allowed. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.\";class p extends r.Base{async init(e,n=l){this.wire.sendAction(\"interop-init\").catch((()=>{}));const r=await this.wire.environment.getInteropInfo(this.wire.getFin()),s=(0,i.createUnusableObject)(u),a=(0,i.createWarningObject)(u,(0,t.default)(r)),d=async()=>{throw new Error(u)},p=o.InteropBroker.createClosedConstructor(this.wire,(()=>this.fin.InterApplicationBus.Channel.create(`interop-broker-${e}`)),r);let w;return w=Array.isArray(n)?new((0,h.overrideFromComposables)(...n)(p))(s,d,a):await n(p,s,d,a),(0,c.overrideCheck)(w,r.fdc3Version),w}connectSync(e,t){return this.wire.sendAction(\"interop-connect-sync\").catch((()=>{})),new a.InteropClient(this.wire,this.wire.environment.whenReady().then((()=>this.fin.InterApplicationBus.Channel.connect(`interop-broker-${e}`,{payload:t}))))}}return Ti.InteropModule=p,Ti}(),e),i(wr(),e),i(Vi(),e)}(Li)),Li}var br={},Ir={},Er={},xr={};Object.defineProperty(xr,\"__esModule\",{value:!0}),xr.getSnapshotSourceChannelName=void 0;xr.getSnapshotSourceChannelName=e=>`snapshot-source-provider-${e.uuid}`;var Ar,Pr,Mr,_r,Or,Sr=s&&s.__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},Rr=s&&s.__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)};Object.defineProperty(Er,\"__esModule\",{value:!0}),Er.SnapshotSource=void 0;const Fr=d,jr=xr,kr=new Map;class Lr extends Fr.Base{constructor(e,t){super(e),Ar.set(this,void 0),Pr.set(this,(()=>(kr.has(this.identity.uuid)||kr.set(this.identity.uuid,{eventFired:null,clientPromise:null}),kr.get(this.identity.uuid)))),Mr.set(this,(()=>(Rr(this,Pr,\"f\").call(this).clientPromise||(Rr(this,Pr,\"f\").call(this).clientPromise=Rr(this,_r,\"f\").call(this)),Rr(this,Pr,\"f\").call(this).clientPromise))),_r.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);try{Rr(this,Pr,\"f\").call(this).eventFired||await Rr(this,Or,\"f\").call(this);const t=await this.fin.InterApplicationBus.Channel.connect(e,{wait:!1});return t.onDisconnection((()=>{Rr(this,Pr,\"f\").call(this).clientPromise=null,Rr(this,Pr,\"f\").call(this).eventFired=null})),t}catch(e){throw Rr(this,Pr,\"f\").call(this).clientPromise=null,new Error(\"The targeted SnapshotSource is not currently initialized. Await this object's ready() method.\")}})),Or.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);let t,n;const i=new Promise(((e,i)=>{t=e,n=i}));Rr(this,Pr,\"f\").call(this).eventFired=i;const r=async i=>{try{i.channelName===e&&(t(),await this.fin.InterApplicationBus.Channel.removeListener(\"connected\",r))}catch(e){n(e)}};await this.fin.InterApplicationBus.Channel.on(\"connected\",r)})),Sr(this,Ar,t,\"f\")}get identity(){return Rr(this,Ar,\"f\")}async ready(){this.wire.sendAction(\"snapshot-source-ready\").catch((e=>{}));try{await Rr(this,Mr,\"f\").call(this)}catch(e){await Rr(this,Pr,\"f\").call(this).eventFired}}async getSnapshot(){this.wire.sendAction(\"snapshot-source-get-snapshot\").catch((e=>{}));const e=await Rr(this,Mr,\"f\").call(this),t=await e.dispatch(\"get-snapshot\");return(await t).snapshot}async applySnapshot(e){this.wire.sendAction(\"snapshot-source-apply-snapshot\").catch((e=>{}));return(await Rr(this,Mr,\"f\").call(this)).dispatch(\"apply-snapshot\",{snapshot:e})}}Er.SnapshotSource=Lr,Ar=new WeakMap,Pr=new WeakMap,Mr=new WeakMap,_r=new WeakMap,Or=new WeakMap,Object.defineProperty(Ir,\"__esModule\",{value:!0}),Ir.SnapshotSourceModule=void 0;const Tr=d,$r=Er,Br=xr;class Gr extends Tr.Base{async init(e){if(this.wire.sendAction(\"snapshot-source-init\").catch((e=>{})),\"object\"!=typeof e||\"function\"!=typeof e.getSnapshot||\"function\"!=typeof e.applySnapshot)throw new Error(\"you must pass in a valid SnapshotProvider\");const t=await this.fin.InterApplicationBus.Channel.create((0,Br.getSnapshotSourceChannelName)(this.fin.me));t.register(\"get-snapshot\",(async()=>({snapshot:await e.getSnapshot()}))),t.register(\"apply-snapshot\",(({snapshot:t})=>e.applySnapshot(t)))}wrapSync(e){return this.wire.sendAction(\"snapshot-source-wrap-sync\").catch((e=>{})),new $r.SnapshotSource(this.wire,e)}async wrap(e){return this.wire.sendAction(\"snapshot-source-wrap\").catch((e=>{})),this.wrapSync(e)}}Ir.SnapshotSourceModule=Gr,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Ir,e),n(Er,e)}(br),Object.defineProperty(a,\"__esModule\",{value:!0});var Wr=a.Fin=void 0;const Hr=t,Nr=c,Dr=ie(),Ur=Z(),Vr=de,zr=en,Kr=rn,qr=un,Jr=bn,Yr=J(),Zr=An,Qr=ki,Xr=Cr(),eo=br;class to extends Hr.EventEmitter{constructor(e){super(),this.wire=e,this.System=new Nr.System(e),this.Window=new Dr._WindowModule(e),this.Application=new Ur.ApplicationModule(e),this.InterApplicationBus=new Vr.InterApplicationBus(e),this.Clipboard=new zr.Clipboard(e),this.ExternalApplication=new Kr.ExternalApplicationModule(e),this.Frame=new qr._FrameModule(e),this.GlobalHotkey=new Jr.GlobalHotkey(e),this.Platform=new Zr.PlatformModule(e,this.InterApplicationBus.Channel),this.View=new Yr.ViewModule(e),this.Interop=new Xr.InteropModule(e),this.SnapshotSource=new eo.SnapshotSourceModule(e),e.registerFin(this),this.me=(0,Qr.getMe)(e),e.on(\"disconnected\",(()=>{this.emit(\"disconnected\")}))}}Wr=a.Fin=to;var no={},io={};function ro(e){return\"string\"==typeof e.manifestUrl}function oo(e){return ao(e)&&\"string\"==typeof e.address}function so(e){return oo(e)&&\"string\"==typeof e.token}function ao(e){return\"string\"==typeof e.uuid}function co(e){return e.runtime&&\"string\"==typeof e.runtime.version}function ho(e){return ao(e)&&co(e)}Object.defineProperty(io,\"__esModule\",{value:!0}),io.isInternalConnectConfig=io.isPortDiscoveryConfig=io.isNewConnectConfig=io.isConfigWithReceiver=io.isRemoteConfig=io.isExistingConnectConfig=io.isExternalConfig=void 0,io.isExternalConfig=ro,io.isExistingConnectConfig=oo,io.isRemoteConfig=so,io.isConfigWithReceiver=function(e){return\"object\"==typeof e.receiver&&so({...e,address:\"\"})},io.isNewConnectConfig=ho,io.isPortDiscoveryConfig=function(e){return ro(e)&&co(e)||ho(e)},io.isInternalConnectConfig=function(e){return oo(e)||ho(e)};var lo={},uo={};Object.defineProperty(uo,\"__esModule\",{value:!0}),uo.EmitterMap=void 0;const po=t;function wo(e){return Buffer.from(e).toString(\"base64\")}uo.EmitterMap=class{constructor(){this.storage=new Map}hashKeys(e){return e.map(wo).join(\"/\")}getOrCreate(e){const t=this.hashKeys(e);return this.storage.has(t)||this.storage.set(t,new po.EventEmitter),this.storage.get(t)}has(e){return this.storage.has(this.hashKeys(e))}delete(e){const t=this.hashKeys(e);return this.storage.delete(t)}},Object.defineProperty(lo,\"__esModule\",{value:!0});const yo=uo;class fo extends yo.EmitterMap{constructor(){super(...arguments),this.dispatchEvent=e=>{if(function(e){return\"process-desktop-event\"===e.action}(e)){const{payload:t}=e,n=function(e){const{topic:t}=e;if(\"frame\"===t||\"window\"===t||\"view\"===t){const{uuid:n,name:i}=e;return[t,n,i]}if(\"application\"===t){const{uuid:n}=e;return[t,n]}return[t]}(t);if(this.has(n))return this.getOrCreate(n).emit(t.type,t),!0}return!1}}}lo.default=fo;var go,mo,vo=s&&s.__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},Co=s&&s.__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)},bo=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(no,\"__esModule\",{value:!0});var Io=no.Transport=void 0;const Eo=t,xo=io,Ao=g,Po=bo(lo),Mo=ki,_o=ke;class Oo extends Eo.EventEmitter{constructor(e,t,n){super(),this.wireListeners=new Map,this.topicRefMap=new Map,this.eventAggregator=new Po.default,this.messageHandlers=[this.eventAggregator.dispatchEvent],go.set(this,void 0),mo.set(this,void 0),this.connectSync=()=>{Co(this,go,\"f\").connectSync()},this.getPort=()=>Co(this,go,\"f\").getPort(),vo(this,go,new e(this.onmessage.bind(this)),\"f\"),this.environment=t,this.sendRaw=Co(this,go,\"f\").send.bind(Co(this,go,\"f\")),this.registerMessageHandler(this.handleMessage.bind(this)),Co(this,go,\"f\").on(\"disconnected\",(()=>{for(const[,{handleNack:e}]of this.wireListeners)e({reason:\"Remote connection has closed\"});this.wireListeners.clear(),this.emit(\"disconnected\")}));const{uuid:i,name:r}=n,o=this.environment.getCurrentEntityType();this.me=(0,Mo.getBaseMe)(o,i,r)}getFin(){if(!Co(this,mo,\"f\"))throw new Error(\"No Fin object registered for this transport\");return Co(this,mo,\"f\")}registerFin(e){if(Co(this,mo,\"f\"))throw new Error(\"Fin object has already been registered for this transport\");vo(this,mo,e,\"f\")}shutdown(){return Co(this,go,\"f\").shutdown()}async connect(e){if((0,xo.isConfigWithReceiver)(e))return await Co(this,go,\"f\").connect(e.receiver),this.authorize(e);if((0,xo.isRemoteConfig)(e))return this.connectRemote(e);if((0,xo.isExistingConnectConfig)(e))return this.connectByPort(e);if((0,xo.isNewConnectConfig)(e)){const t=await this.environment.retrievePort(e);return this.connectByPort({...e,address:`ws://localhost:${t}`})}}async connectRemote(e){return await Co(this,go,\"f\").connect(new(this.environment.getWsConstructor())(e.address)),this.authorize(e)}async connectByPort(e){const{address:t,uuid:n}=e,i={...e,type:\"file-token\"},r=Co(this,go,\"f\");await r.connect(new(this.environment.getWsConstructor())(e.address));const o=await this.sendAction(\"request-external-authorization\",{uuid:n,type:\"file-token\"},!0);if(\"external-authorization-response\"!==o.action)throw new Ao.UnexpectedActionError(o.action);return await this.environment.writeToken(o.payload.file,o.payload.token),this.authorize(i)}async authorize(e){const t=await this.sendAction(\"request-authorization\",e,!0);if(\"authorization-response\"!==t.action)throw new Ao.UnexpectedActionError(t.action);if(!0!==t.payload.success)throw new Ao.RuntimeError(t.payload)}sendAction(e,t={},n=!1){let i=()=>{};const r=Ao.RuntimeError.getCallSite(1),o=this.environment.getNextMessageId(),s=new Promise(((s,a)=>{i=a;const c={action:e,payload:t,messageId:o},d=Co(this,go,\"f\");return this.addWireListener(o,s,(e=>this.nackHandler(e,a,r)),n),d.send(c).catch(a)}));return Object.assign(s,{cancel:i,messageId:o})}nackHandler(e,t,n){t(\"string\"==typeof e?e:new Ao.RuntimeError(e,n))}ferryAction(e){return new Promise(((t,n)=>{const i=this.environment.getNextMessageId();e.messageId=i;const r=e=>{t(e.payload)};return Co(this,go,\"f\").send(e).then((()=>this.addWireListener(i,r,(e=>this.nackHandler(e,n)),!1))).catch(n)}))}registerMessageHandler(e){this.messageHandlers.push(e)}addWireListener(e,t,n,i){i?this.uncorrelatedListener=t:this.wireListeners.has(e)?n({reason:\"Duplicate handler id\",error:(0,_o.errorToPOJO)(new Ao.DuplicateCorrelationError(String(e)))}):this.wireListeners.set(e,{resolve:t,handleNack:n})}onmessage(e){for(const t of this.messageHandlers)t.call(null,e)}handleMessage(e){const t=e.correlationId||NaN;if(\"correlationId\"in e){if(!this.wireListeners.has(t))return!1;{const{resolve:n,handleNack:i}=this.wireListeners.get(t);\"ack\"!==e.action?i({reason:\"Did not receive ack action\",error:(0,_o.errorToPOJO)(new Ao.NoAckError(e.action))}):\"payload\"in e?e.payload.success?n.call(null,e):i(e.payload):\"string\"==typeof e.reason?i(e):(console.warn(\"Received invalid response from core\",e),i({reason:\"invalid response shape\"})),this.wireListeners.delete(t)}}else this.uncorrelatedListener&&this.uncorrelatedListener.call(null,e),this.uncorrelatedListener=()=>{};return!0}}Io=no.Transport=Oo,go=new WeakMap,mo=new WeakMap;const So=(...e)=>({log:(...t)=>console.debug(`[${(new Date).toISOString()}]`,...(e=>e.map((e=>`[${e}]`)))(e),...t),getLogger:(...t)=>So(...e,...t)}),Ro=So(\"@openfin/core-web/client\");function Fo(e,t){if(!function(e){return\"string\"==typeof e}(e))throw new Error(`Property ${t} has invalid type. Expected string, got ${typeof e}.`)}const jo=\"web-broker-ports-ready\",ko=Ro.getLogger(\"get-web-interop-ports\");function Lo(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)}function To(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}\"function\"==typeof SuppressedError&&SuppressedError;const $o=e=>{var n,i,r;return r=class extends t.EventEmitter{constructor(t){super(),n.set(this,void 0),i.set(this,!1),this.connectSync=()=>{Lo(this,i,\"f\")||(e.addEventListener(\"message\",(e=>{e.data?.topic?.startsWith(\"wire-message\")&&e.data.message&&Lo(this,n,\"f\").call(this,{...JSON.parse(e.data.message),ports:e.ports})})),e.start())},this.connect=async()=>{this.connectSync()},this.send=t=>(e.postMessage({topic:\"wire-message\",message:JSON.stringify(t)}),Promise.resolve()),this.shutdown=async()=>{e.close()},To(this,n,t,\"f\")}getPort(){return e}},n=new WeakMap,i=new WeakMap,r};var Bo={},Go={};Object.defineProperty(Go,\"__esModule\",{value:!0}),Go.BaseEnvironment=void 0;const Wo=vr();Go.BaseEnvironment=class{async getViewWindowIdentity(e,t){const{identity:n}=await e.View.wrapSync(t).getCurrentWindow();return n}async getInteropInfo(e){const t=await e.Application.getCurrentSync().getInfo().catch((()=>null)),n=t?.initialOptions?.interopBrokerConfiguration??{};return{fdc3Version:t?(0,Wo.getDefaultViewFdc3VersionFromAppInfo)(t):void 0,...n,fdc3Info:{providerVersion:await e.System.getVersion(),provider:\"OpenFin\"}}}},Object.defineProperty(Bo,\"__esModule\",{value:!0});var Ho=Bo.BrowserEnvironment=void 0;const No=Go;class Do extends No.BaseEnvironment{constructor(){super(...arguments),this.type=\"other\",this.getRandomId=()=>{const e=new Uint32Array(1);return window.crypto.getRandomValues(e)[0].toString(32)}}getAdapterVersionSync(){return\"\"}observeBounds(e,t){throw new Error(\"Method not implemented.\")}layoutAllowedInContext(e){return!1}initLayoutManager(e,t,n){throw new Error(\"Method not implemented.\")}applyLayoutSnapshot(e,t,n){throw new Error(\"Method not implemented.\")}createLayout(e,t){throw new Error(\"Method not implemented.\")}destroyLayout(e,t){throw new Error(\"Method not implemented.\")}resolveLayout(e,t){throw new Error(\"Method not implemented.\")}initPlatform(...e){throw new Error(\"Method not implemented.\")}writeToken(e,t){return Promise.resolve(\"\")}retrievePort(e){throw new Error(\"Method not implemented.\")}getNextMessageId(){return this.getRandomId()}createChildContent(e){throw new Error(\"Method not implemented.\")}getWebWindow(e){throw new Error(\"Method not implemented.\")}getCurrentEntityIdentity(){throw new Error(\"Method not implemented.\")}getCurrentEntityType(){return\"external connection\"}raiseEvent(e,t){throw new Error(\"Method not implemented.\")}getUrl(){return location.href}getDefaultChannelOptions(){return{create:{},connect:{}}}getRtcPeer(){return new RTCPeerConnection}getWsConstructor(){return WebSocket}whenReady(){return Promise.resolve()}}Ho=Bo.BrowserEnvironment=Do;const Uo=e=>\"platform\"in e&&void 0!==e.platform;var Vo,zo;class Ko extends Ho{constructor(e){super(),this.connectConfig=e,Vo.set(this,void 0),zo.set(this,new W((async()=>Promise.resolve().then((function(){return require(\"./main-b14f67c9.js\")}))))),Uo(e)&&this.validatePlatformOptions(e)}getAdapterVersionSync(){return\"0.39.21\"}validatePlatformOptions({platform:e}){if(!(\"layoutSnapshot\"in e))throw new Error(\"Platform options are missing layoutSnapshot. Please provide a layoutSnapshot in the platform options.\");if(\"windows\"in e||\"windows\"in e.layoutSnapshot)throw new Error(\"It appears you tried to call connect() with a snapshot object from an OpenFin desktop environment. Note that connect() expects to be called with a platform property with this structure: { platform: { layoutSnapshot } }. To get a layoutSnapshot of the expected structure, use fin.Platform.Layout.getCurrentLayoutManagerSync().getLayoutSnapshot() in v34+ in your desktop environment.\");const{layouts:t}=e.layoutSnapshot;Object.entries(t).map((([e,t])=>{if(\"object\"!=typeof t||null===t)throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must be an object.`);if(!(\"content\"in t))throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must contain a 'content' property.`)}))}async getInteropInfo(e){return{...{contextGroups:void 0,logging:{beforeAction:{enabled:!1},afterAction:{enabled:!1}}},fdc3Version:void 0,fdc3Info:{providerVersion:\"0.39.21\",provider:\"OpenFin Web\"}}}layoutAllowedInContext(e){return!0}async initLayoutManager(e,t,n){if(Lo(this,Vo,\"f\"))throw new Error(\"Layout already initialized.\");if(!Uo(this.connectConfig))throw new Error(\"Platform options are missing from connection config.\");const{WebLayoutEntryPoint:i}=await Lo(this,zo,\"f\").getValue();return To(this,Vo,new i(this.connectConfig),\"f\"),await Lo(this,Vo,\"f\").initLayoutManager(e,t,n)}async applyLayoutSnapshot(e,t,n){Lo(this,Vo,\"f\")?.applyLayoutSnapshot(e,t,n)}async createLayout(e,t){return Lo(this,Vo,\"f\")?.createLayout(e,t)}async destroyLayout(e,t){return Lo(this,Vo,\"f\")?.destroyLayout(e,t)}async getViewWindowIdentity(e,t){return Promise.resolve({uuid:t.uuid,name:t.uuid})}}Vo=new WeakMap,zo=new WeakMap;const qo=()=>{const e=((e,t)=>{const n=new RegExp(`^${t}<(?.*)>$`).exec(e)?.groups?.meta;if(n)try{return JSON.parse(atob(n))}catch(e){throw new Error(`Failed to decode JSON from ${n}.`)}})(window.name,\"of-frame\");if(e)try{const{name:t,uuid:n,brokerUrl:i,providerId:r,contextGroup:o}=e;return Fo(i,\"brokerUrl\"),Fo(n,\"uuid\"),Fo(t,\"name\"),{identity:{name:t,uuid:n},brokerUrl:i,interopConfig:{providerId:r,currentContextGroup:o}}}catch(e){throw new Error(`Unexpected error occurred when inferring platform information: ${e.stack}`)}},Jo=()=>{const e=r.v4();return{uuid:e,name:e}},Yo=async e=>{if(\"enabled\"===e.connectionInheritance){const t=await(async e=>{const t=qo();if(t){const{validateOptions:n=(()=>!0)}=e,{identity:i,...r}=t;if(!await n(r))throw new Error(\"Parent options were rejected by validateOptions.\");return t}})(e);if(t)return t}if(!e.options){const t=\"enabled\"===e.connectionInheritance?\"Broker URL was not specified nor provided by a platform container.\":\"Connection inheritance is disabled but no options were provided.\";throw new Error(t)}return{...e.options,identity:Jo()}};exports.__classPrivateFieldGet=Lo,exports.__classPrivateFieldSet=To,exports.apiExposer=Gn,exports.commonjsGlobal=s,exports.connect=async t=>{try{Ro.log(\"Establishing connection\",t);const{brokerUrl:n,identity:i,timeout:r,interopConfig:s}=await Yo(t),{workerPort:a,iframeBrokerPort:c}=await(async(e,t,n)=>{const{origin:i}=new URL(e),r=document.createElement(\"IFRAME\");let s;r.style.display=\"none\";try{return await new Promise(((a,c)=>{const d=e=>{if(e.source===r.contentWindow&&e.data?.topic===`ack-${jo}`){if(e.origin!==i)c(new Error(`Broker redirected to unexpected origin ${e.origin}, expected ${i}.`));else if(e.data.success){const[t,n]=e.ports;a({iframeBrokerPort:t,workerPort:n})}else c(new m(e.data));window.removeEventListener(\"message\",d),clearTimeout(s)}};window.addEventListener(\"message\",d),ko.log(`Connecting to broker ${e}`),r.setAttribute(\"src\",e),r.setAttribute(\"name\",o(t,\"of-broker\")),document.body.appendChild(r),ko.log(\"Iframe loaded, awaiting init message from iframe\"),n&&(s=setTimeout((()=>{window.removeEventListener(\"message\",d),document.body.removeChild(r),c(new Error(\"Worker did not initialize in time\"))}),n))}))}catch(e){throw new Error(`Failed to initialise Fin Web Client. ${e.message}`,{cause:e})}})(n,i,r);Ro.log(\"Successfully established connection to shared worker\");const d={entityType:\"external connection\",...i};a.start(),c.start();const h=((t,n,i)=>{const r=$o(n),o=new Ko(t),s=new Io(r,o,i);return s.connectSync(),window.Buffer=e.Buffer,new Wr(s)})(t,a,d);return s?.providerId&&(h.me.interop=h.Interop.connectSync(s.providerId),s?.currentContextGroup&&h.me.interop.joinContextGroup(s.currentContextGroup).catch((e=>{console.warn(`Error joining specified context group: ${s?.currentContextGroup}, continuing`,e)}))),{...h,me:{...h.me,identity:{uuid:h.me.uuid,name:h.me.name}}}}catch(e){throw new Error(`An error occured during web-interop connection: ${e.message}`)}},exports.decorators=Nn,exports.encodeOptions=o,exports.layout_constants=ai,exports.lazy=G;\n","\"use strict\";var t=require(\"./main-8cad4070.js\"),e=require(\"uuid\");require(\"buffer/\"),require(\"events\"),require(\"lodash/cloneDeep\"),require(\"lodash/isEqual\");var i={},n={};Object.defineProperty(n,\"__esModule\",{value:!0}),n.mapValuesAsync=n.mapEntriesAsync=void 0;const o=(t,[e,i])=>({...t,[e]:i});async function s(t,e){return(await Promise.all(e.map((async([e,i])=>[e,await t(i,e)])))).reduce(o,{})}n.mapEntriesAsync=s,n.mapValuesAsync=async function(t,e){let i;return i=e instanceof Map?[...e.entries()]:Object.entries(e),s(t,i)};var r,a,l,h,d=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldSet||function(t,e,i,n,o){if(\"m\"===n)throw new TypeError(\"Private method is not writable\");if(\"a\"===n&&!o)throw new TypeError(\"Private accessor was defined without a setter\");if(\"function\"==typeof e?t!==e||!o:!e.has(t))throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");return\"a\"===n?o.call(t,i):o?o.value=i:e.set(t,i),i},c=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldGet||function(t,e,i,n){if(\"a\"===i&&!n)throw new TypeError(\"Private accessor was defined without a getter\");if(\"function\"==typeof e?t!==e||!n:!e.has(t))throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");return\"m\"===i?n:\"a\"===i?n.call(t):n?n.value:e.get(t)};Object.defineProperty(i,\"__esModule\",{value:!0});var m=i.DefaultLayoutManager=void 0;const u=n;class p{constructor(t){a.set(this,void 0),l.set(this,new Map),d(this,a,t,\"f\")}size(){return c(this,l,\"f\").size}async applyLayoutSnapshot({layouts:t}){if(Object.keys(t).length>1)throw new Error(\"[LayoutManager] Tried to call applyLayoutSnapshot with more than 1 layout. When implementing multiple layouts via overridden LayoutManager class, you must override and fully implement the applyLayoutSnapshot method without calling super.applyLayoutSnapshot().\");const[[e,i]]=Object.entries(t);await p.createLayout(this,{layoutName:e,layout:i})}async showLayout({layoutName:t}){}async getLayoutSnapshot(){return{layouts:await(0,u.mapValuesAsync)((t=>t.getFrameSnapshot()),c(this,l,\"f\"))}}async removeLayout({layoutName:t}){}getLayoutIdentityForView(t){const e=[...c(this,l,\"f\").values()].find((e=>e.getCurrentViews().some((e=>e.name===t.name&&e.uuid===t.uuid))));return e?.identity??void 0}isLayoutVisible({layoutName:t}){return c(p,r,\"m\",h).call(p,this,t).isVisible()}resolveLayoutIdentity(t){if(t&&\"layoutName\"in t)return t;const e=[...c(this,l,\"f\").values()];if(1===e.length)return e[0].identity;const i=e.find((t=>t.isVisible()));return i?.identity??void 0}static async resolveLayout(t,e){const i=t.resolveLayoutIdentity(e);if(void 0===i||!(\"layoutName\"in i))throw new Error(\"[layout-manager] resolveLayout: Could not resolve the layout identity. Make sure you include 'layoutName' in the identity object.\");return c(p,r,\"m\",h).call(p,t,i.layoutName)}static async handleSharedView(t,e,i){await(0,u.mapValuesAsync)((async t=>{if(t.identity.layoutName!==e.layoutName){const e=t.getCurrentViews().find((t=>t.name===i.name));e&&await t.onViewDetached({viewIdentity:e,target:null}).catch(console.error)}}),c(t,l,\"f\"))}static async handleLastViewRemoved(t,e){await t.removeLayout(e),await c(t,a,\"f\").handleLastViewRemoved(t)}static async destroyLayout(t,{layoutName:e}){await c(p,r,\"m\",h).call(p,t,e).destroy(),c(t,l,\"f\").delete(e)}static async createLayout(t,e){const{layoutName:i}=e;if(c(t,l,\"f\").has(i))throw new Error(`Layout name ${i} already exists`);await c(t,a,\"f\").createLayout(e,t)}static registerLayout(t,e,i){c(t,l,\"f\").set(e,i)}static getAllLayouts(t){return[...c(t,l,\"f\").values()]}static setInitialSnapshot(t,e){c(t,a,\"f\").setInitialSnapshot(e)}static createClosedConstructor(...t){return class extends p{constructor(){super(...t)}}}}m=i.DefaultLayoutManager=p,r=p,a=new WeakMap,l=new WeakMap,h=function(t,e){const i=c(t,l,\"f\").get(e);if(!i)throw new Error(`[layout-manager] getLayoutByName: Could not locate layout with name '${e}'`);return i};var g={},f={},v={};Object.defineProperty(v,\"__esModule\",{value:!0}),v.ReversibleMap=void 0;v.ReversibleMap=class{constructor(){this.valueToKey=new Map,this.keyToValue=new Map,this.setUnique=(t,e)=>{if(this.hasKey(t)||this.hasValue(e))throw new Error(\"Key or value already in the map.\");this.keyToValue.set(t,e),this.valueToKey.set(e,t)},this.getKey=t=>{const e=this.valueToKey.get(t);if(!e)throw new Error(\"Value not found in the map.\");return e},this.deleteKey=t=>{const e=this.getValue(t);return this.keyToValue.delete(t),this.valueToKey.delete(e),e},this.deleteValue=t=>{const e=this.getKey(t);return this.keyToValue.delete(e),this.valueToKey.delete(t),e},this.hasKey=t=>this.keyToValue.has(t),this.hasValue=t=>this.valueToKey.has(t)}getValue(t){const e=this.keyToValue.get(t);if(!e)throw new Error(\"Key not found in the map.\");return e}},Object.defineProperty(f,\"__esModule\",{value:!0});var _=f.LayoutContentCache=void 0;const y=t.lazy,C=v;class w{constructor(){this.contentItemCache=new C.ReversibleMap,this.contentItemCacheId=0,this.createCacheKey=()=>{const t=`entity-${this.contentItemCacheId.toString()}`;return this.contentItemCacheId+=1,t},this.hasKey=t=>this.contentItemCache.hasKey(t),this.getItemOrUndefined=t=>{try{return this.getContentItemOrThrow(t)}catch(t){return}},this.getContentItemOrThrow=(t,e)=>{if(!this.contentItemCache.hasKey(t))throw new Error(\"Layout component has been destroyed or detached from the current layout.\");const i=this.contentItemCache.getValue(t);if(e&&!e.includes(i.type))throw new Error(`Layout item is not the expected type. Expected ${e.join(\", \")}, got ${i.type}.`);return i},this.getOrCreateEntityId=t=>{if(this.contentItemCache.hasValue(t))return this.contentItemCache.getKey(t);t.onDestroyed((()=>{this.contentItemCache.deleteValue(t)}));const e=this.createCacheKey();return this.contentItemCache.setUnique(e,t),e}}static getSingleInstance(){return w.singleton.getValue()}}_=f.LayoutContentCache=w,w.singleton=new y.Lazy((()=>new w));var I={},b={};!function(t){Object.defineProperty(t,\"__esModule\",{value:!0}),t.getAdjacentStacks=t.doShareEdge=t.getAdjacentItem=void 0;t.getAdjacentItem=(e,i)=>{const{parent:n}=e;if(e.isRoot()||!n)return;const o=[\"top\",\"bottom\"].includes(i)?\"column\":\"row\",s=[\"top\",\"left\"].includes(i)?-1:1;if(n.type===o){const t=n.contentItems.indexOf(e)+s;if(t>=0&&t{const n=t.getBounds(),o=e.getBounds();if(!n||!o)return!1;if([\"top\",\"bottom\"].includes(i)){return!(n.righto.right)}return!(n.bottomo.bottom)};t.getAdjacentStacks=(e,i)=>{const n=[\"top\",\"bottom\"].includes(i)?\"row\":\"column\",o=s=>\"stack\"===s.type?(0,t.doShareEdge)(e,s,i)?[s]:[]:\"root\"===s.type||\"ground\"===s.type?[]:s.type===n?s.contentItems.map((t=>o(t))).flat():s.type!==n?[\"top\",\"right\"].includes(i)?o(s.contentItems[s.contentItems.length-1]):o(s.contentItems[0]):[],s=(0,t.getAdjacentItem)(e,i);return s?o(s):[]}}(b);var S=t.commonjsGlobal&&t.commonjsGlobal.__decorate||function(t,e,i,n){var o,s=arguments.length,r=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if(\"object\"==typeof Reflect&&\"function\"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(s<3?o(r):s>3?o(e,i,r):o(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};Object.defineProperty(I,\"__esModule\",{value:!0}),I.LayoutEntitiesController=void 0;const E=t.decorators,x=b,L=i;class z{constructor(t,e,i){this.wire=t,this.layoutManager=e,this.layoutContentCache=i,this.analytics=t=>{this.wire.sendAction(`layout-controller-${t}`).catch((()=>{}))},this.getLayoutIdentityForViewOrThrow=async t=>{const e=this.layoutManager.getLayoutIdentityForView(t);if(!e)throw new Error(`View identity ${t.name} is not attached to any layouts.`);return e},this.getRoot=async t=>{this.analytics(\"get-root\");const e=(await this.getLayout(t)).getRoot();return{type:e.type,entityId:this.layoutContentCache.getOrCreateEntityId(e)}},this.getStackByView=async t=>{this.analytics(\"get-stack-by-view\");const e=await this.getLayoutIdentityForViewOrThrow(t),i=(await this.getLayout(e)).getStackByView(t);if(\"stack\"===i?.type)return{entityId:this.layoutContentCache.getOrCreateEntityId(i),type:\"stack\"}},this.getStackViews=t=>{this.analytics(\"get-stack-views\");return this.layoutContentCache.getContentItemOrThrow(t,[\"stack\"]).contentItems.map((t=>({name:t.viewName,uuid:this.wire.me.uuid})))},this.isRoot=t=>{this.analytics(\"is-root\");return this.layoutContentCache.getContentItemOrThrow(t).isRoot()},this.exists=t=>(this.analytics(\"exists\"),this.layoutContentCache.hasKey(t)),this.addViewToStack=async(t,e,{index:i}={index:0})=>{this.analytics(\"add-view-to-stack\");const n=this.layoutContentCache.getContentItemOrThrow(t);if(i&&i>n.contentItems.length+1)throw new Error(`Index '${i}' out of range, please exclude the index or specify a number between 0 and ${n.contentItems.length}`);const o={id:t,index:i},{identity:s}=await n.layout.platformCreateView(e,{location:o});return s},this.findViewInStack=(t,e)=>t.contentItems.find((t=>t.viewName===e.name)),this.removeViewFromStack=async(t,e)=>{this.analytics(\"remove-view-from-stack\");const i=this.layoutContentCache.getContentItemOrThrow(t,[\"stack\"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to remove a view ('${e.name}') which does not belong to the stack.`);await n.layout.platformCloseView(e)},this.createAdjacentStack=async(t,e,{position:i=\"right\"}={})=>{if(this.analytics(\"create-adjacent-stack\"),!Array.isArray(e)||0===e.length)throw new Error('The parameter \"views\" must be an array with at least 1 element.');if(![\"top\",\"bottom\",\"left\",\"right\"].includes(i))throw new Error(`Invalid position '${i}' specified.`);const n=this.layoutContentCache.getContentItemOrThrow(t).createAdjacentStack({position:i}),o=this.layoutContentCache.getOrCreateEntityId(n);return await Promise.all(e.reverse().map((t=>this.addViewToStack(o,t)))),o},this.getAdjacentStacks=async({targetId:t,edge:e})=>{this.analytics(\"get-adjacent-stacks\");const i=this.layoutContentCache.getContentItemOrThrow(t);return(0,x.getAdjacentStacks)(i,e).map((t=>({entityId:this.layoutContentCache.getOrCreateEntityId(t)})))},this.setStackActiveView=async(t,e)=>{this.analytics(\"set-stack-active-view\");const i=this.layoutContentCache.getContentItemOrThrow(t,[\"stack\"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to set a view ('${e.name}') as active when it does not belong to the stack.`);i.setActiveContentItem(n,!0)}}async getLayout(t){const e=await L.DefaultLayoutManager.resolveLayout(this.layoutManager,t);if(!e)throw new Error(`Could not resolve target layout identity ${JSON.stringify(t)}`);return e}getContent(t){this.analytics(\"get-content\");return this.layoutContentCache.getContentItemOrThrow(t,[\"column\",\"row\"]).contentItems.map((t=>({type:t.type,entityId:this.layoutContentCache.getOrCreateEntityId(t)})))}getParent(t){this.analytics(\"get-parent\");const e=this.layoutContentCache.getContentItemOrThrow(t);if(!e.isRoot())return e.parent?.contentItems.includes(e)?{type:e.parent.type,entityId:this.layoutContentCache.getOrCreateEntityId(e.parent)}:void 0}}S([(0,E.expose)()],z.prototype,\"getLayoutIdentityForViewOrThrow\",void 0),S([(0,E.expose)()],z.prototype,\"getRoot\",void 0),S([(0,E.expose)()],z.prototype,\"getStackByView\",void 0),S([(0,E.expose)()],z.prototype,\"getStackViews\",void 0),S([(0,E.expose)()],z.prototype,\"getContent\",null),S([(0,E.expose)()],z.prototype,\"getParent\",null),S([(0,E.expose)()],z.prototype,\"isRoot\",void 0),S([(0,E.expose)()],z.prototype,\"exists\",void 0),S([(0,E.expose)()],z.prototype,\"addViewToStack\",void 0),S([(0,E.expose)()],z.prototype,\"removeViewFromStack\",void 0),S([(0,E.expose)()],z.prototype,\"createAdjacentStack\",void 0),S([(0,E.expose)()],z.prototype,\"getAdjacentStacks\",void 0),S([(0,E.expose)()],z.prototype,\"setStackActiveView\",void 0),I.LayoutEntitiesController=z,Object.defineProperty(g,\"__esModule\",{value:!0});var M=g.initLayoutEndpoints=void 0;const P=t.apiExposer,T=t.layout_constants,A=f,k=I,D=i;M=g.initLayoutEndpoints=async function(t,e){const i=t.getFin(),n=await i.Platform.getCurrentSync().getClient(),o=new P.ChannelsExposer(n);await new P.ApiExposer(o).exposeInstance(new k.LayoutEntitiesController(t,e,A.LayoutContentCache.getSingleInstance()),{id:T.LAYOUT_CONTROLLER_ID}),await async function(t,e){const i=t=>async i=>{const n=await D.DefaultLayoutManager.resolveLayout(e,i.target);if(!n)throw new Error(`Could not resolve the layout target from payload ${JSON.stringify(i)}`);return t(n,i)},n=(e,n)=>{t.register(e,i(n))},o=(t,e)=>{n(t,e)};n(\"replace-view\",((t,e)=>t.replaceView(e))),n(\"replace-layout\",((t,{layout:e})=>t.replaceLayout(e))),n(\"add-view\",((t,e)=>t.insertView(e))),o(\"layout-add-view\",((t,{viewOptions:e,location:i,targetView:n})=>t.platformCreateView(e,{location:i,targetView:n}))),n(\"close-view\",((t,e)=>t.cleanupView(e.viewIdentity))),o(\"layout-close-view\",((t,e)=>t.platformCloseView(e.viewIdentity))),n(\"apply-preset-layout\",((t,e)=>t.applyPreset(e))),n(\"get-layout-views\",(t=>t.getCurrentViews())),n(\"get-frame-snapshot\",(t=>t.getFrameSnapshot())),n(\"is-visible\",(t=>t.isVisible())),n(\"destroy\",(t=>t.destroy())),t.register(\"get-layout-snapshot\",(()=>e.getLayoutSnapshot()))}(n,e)};var R={};Object.defineProperty(R,\"__esModule\",{value:!0});var U=R.BaseLayout=void 0;U=R.BaseLayout=class{};var O={};Object.defineProperty(O,\"__esModule\",{value:!0});var V=O.DOMEmitter=void 0;V=O.DOMEmitter=class{constructor(t){this.container=t}dispatchLocalEvent(t,e){const i={...e,type:t,tabSelector:`tab-${e.name}`,containerSelector:`container-${e.name}`,topic:\"openfin-DOM-event\"};this.container.dispatchEvent(new CustomEvent(t,{detail:i}))}};var B={};Object.defineProperty(B,\"__esModule\",{value:!0});var H=B.mapLayoutContentItemsImmutableSync=B.mapLayoutContentItemsImmutable=W=B.isVisible=void 0;var W=B.isVisible=t=>(0!==t.offsetWidth||0!==t.offsetHeight)&&\"hidden\"!==window.getComputedStyle(t).visibility&&t.offsetTop>=0&&t.offsetLeft>=0&&t.offsetTop<=window.innerHeight&&t.offsetLeft<=window.innerWidth;const F=t=>\"type\"in t&&\"component\"===t.type;B.mapLayoutContentItemsImmutable=async function t(e,i){return F(i)?e(i):{...i,content:await Promise.all(i.content?.map((i=>t(e,i))))}},H=B.mapLayoutContentItemsImmutableSync=function t(e,i){return F(i)?e(i):{...i,content:i.content?.map((i=>t(e,i)))}};class N extends Error{constructor(t,e){super(e),this.type=t}}class G extends N{constructor(t,e){super(\"Configuration\",t),this.node=e}}class j extends N{constructor(t){super(\"PopoutBlocked\",t)}}class $ extends N{constructor(t){super(\"API\",t)}}class Z extends N{constructor(t){super(\"Bind\",t)}}class q extends Error{constructor(t,e,i){super(`${t}: ${e}${void 0===i?\"\":\": \"+i}`)}}class X extends q{constructor(t,e){super(\"Assert\",t,e)}}class Y extends q{constructor(t,e,i){super(\"UnreachableCase\",t,`${e}${void 0===i?\"\":\": \"+i}`)}}class K extends q{constructor(t,e){super(\"UnexpectedNull\",t,e)}}class J extends q{constructor(t,e){super(\"UnexpectedUndefined\",t,e)}}var Q;!function(t){let e=!1;const i={PopoutCannotBeCreatedWithGroundItemConfig:{id:0,default:\"Popout cannot be created with ground ItemConfig\"},PleaseRegisterAConstructorFunction:{id:1,default:\"Please register a constructor function\"},ComponentTypeNotRegisteredAndBindComponentEventHandlerNotAssigned:{id:2,default:\"Component type not registered and BindComponentEvent handler not assigned\"},ComponentIsAlreadyRegistered:{id:3,default:\"Component is already registered\"},ComponentIsNotVirtuable:{id:4,default:\"Component is not virtuable. Requires rootHtmlElement field/getter\"},VirtualComponentDoesNotHaveRootHtmlElement:{id:5,default:'Virtual component does not have getter \"rootHtmlElement\"'},ItemConfigIsNotTypeComponent:{id:6,default:\"ItemConfig is not of type component\"},InvalidNumberPartInSizeString:{id:7,default:\"Invalid number part in size string\"},UnknownUnitInSizeString:{id:8,default:\"Unknown unit in size string\"},UnsupportedUnitInSizeString:{id:9,default:\"Unsupported unit in size string\"}};t.idCount=Object.keys(i).length;const n=Object.values(i);t.checkInitialise=function(){if(!e)for(let e=0;e=\"0\"&&t<=\"9\"}function Tt(t,e){const i=zt(e);t.style.width=i}function At(t,e){const i=zt(e);t.style.height=i}function kt(t){return{width:t.offsetWidth,height:t.offsetHeight}}function Dt(t,e){t.style.display=e?\"\":\"none\"}function Rt(t,e){if(void 0!==e)for(const i in e)if(e.hasOwnProperty(i)){const n=e[i],o=t[i];t[i]=Ut(o,n)}return t}function Ut(t,e){if(\"object\"!=typeof e)return e;if(Array.isArray(e)){const t=e.length,i=new Array(t);for(let n=0;n36)throw new Error(\"Too many keys in config minifier map\")},t.translateObject=n}(dt||(dt={})),function(t){t.defaults={type:at.ground,content:[],size:1,sizeUnit:ht.Fractional,minSize:void 0,minSizeUnit:ht.Pixel,id:\"\",isClosable:!0},t.createCopy=function(t,e){switch(t.type){case at.ground:case at.row:case at.column:return gt.createCopy(t,e);case at.stack:return ut.createCopy(t,e);case at.component:return pt.createCopy(t);default:throw new Y(\"CICC91354\",t.type,\"Invalid Config Item type specified\")}},t.createDefault=function(t){switch(t){case at.ground:throw new X(\"CICCDR91562\");case at.row:case at.column:return gt.createDefault(t);case at.stack:return ut.createDefault();case at.component:return pt.createDefault();default:throw new Y(\"CICCDD91563\",t,\"Invalid Config Item type specified\")}},t.isComponentItem=function(t){return t.type===at.component},t.isStackItem=function(t){return t.type===at.stack},t.isGroundItem=function(t){return t.type===at.ground}}(ct||(ct={})),function(t){t.defaultMaximised=!1,function(t){t.createCopy=function(t,e){return void 0===t?void 0:{show:null!=e?e:t.show,popout:t.popout,close:t.close,maximise:t.maximise,minimise:t.minimise,tabDropdown:t.tabDropdown}}}(t.Header||(t.Header={}))}(mt||(mt={})),function(t){function e(t){const e=t.length,i=new Array(e);for(let n=0;n\"__glMaximised\"===t));t>0&&(o=!0,n=n.splice(t,1)),e=n.length>0?n[0]:ct.defaults.id}else e=n;return i=void 0!==t.maximised?t.maximised:o,{id:e,maximised:i}}}(wt||(wt={})),function(t){function e(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0;return{resolved:!0,root:Et.resolve(i),openPopouts:t.resolveOpenPopouts(e.openPopouts),dimensions:t.Dimensions.resolve(e.dimensions),settings:t.Settings.resolve(e.settings),header:t.Header.resolve(e.header,e.settings,e.labels)}}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:Lt.fromResolvedArray(e.openPopouts),settings:_t.Settings.createCopy(e.settings),dimensions:t.Dimensions.fromResolved(e.dimensions),header:_t.Header.createCopy(e.header)}},t.isResolved=function(t){const e=t;return void 0!==e.resolved&&!0===e.resolved},t.resolveOpenPopouts=function(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0,{root:Et.resolve(o),openPopouts:xt.resolveOpenPopouts(e.openPopouts),dimensions:xt.Dimensions.resolve(e.dimensions),settings:xt.Settings.resolve(e.settings),header:xt.Header.resolve(e.header,e.settings,e.labels),parentId:null!==(i=e.parentId)&&void 0!==i?i:null,indexInParent:null!==(n=e.indexInParent)&&void 0!==n?n:null,window:t.Window.resolve(e.window,e.dimensions),resolved:!0}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:i(e.openPopouts),dimensions:xt.Dimensions.fromResolved(e.dimensions),settings:_t.Settings.createCopy(e.settings),header:_t.Header.createCopy(e.header),parentId:e.parentId,indexInParent:e.indexInParent,window:t.Window.fromResolved(e.window)}},t.fromResolvedArray=i}(Lt||(Lt={}));class Wt{constructor(){this._allEventSubscriptions=[],this._subscriptionsMap=new Map,this.unbind=this.removeEventListener,this.trigger=this.emit}tryBubbleEvent(t,e){}emit(t,...e){let i=this._subscriptionsMap.get(t);if(void 0!==i){i=i.slice();for(let t=0;t0){const n=e.slice();n.unshift(t);const o=this._allEventSubscriptions.slice();for(let t=0;t0?n.contentItems[0]:n,e=0);const o=this._layoutManager.createAndInitContentItem(i,t);t.addChild(o,e),this._layoutManager.layoutConfig.settings.popInOnClose?this._onClose():this.close()}createWindow(){const t=this.createUrl(),e=Math.floor(1e6*Math.random()).toString(36),i=this.serializeWindowFeatures({width:this._initialWindowSize.width,height:this._initialWindowSize.height,innerWidth:this._initialWindowSize.width,innerHeight:this._initialWindowSize.height,menubar:\"no\",toolbar:\"no\",location:\"no\",personalbar:\"no\",resizable:\"yes\",scrollbars:\"no\",status:\"no\"});if(this._popoutWindow=globalThis.open(t,e,i),this._popoutWindow)this._popoutWindow.addEventListener(\"load\",(()=>this.positionWindow()),{passive:!0}),this._popoutWindow.addEventListener(\"beforeunload\",(()=>{this._layoutManager.layoutConfig.settings.popInOnClose?this.popIn():this._onClose()}),{passive:!0}),this._checkReadyInterval=setInterval((()=>this.checkReady()),10);else if(!0===this._layoutManager.layoutConfig.settings.blockedPopoutsThrowError){throw new j(\"Popout blocked\")}}checkReady(){if(null===this._popoutWindow)throw new K(\"BPCR01844\");this._popoutWindow.__glInstance&&this._popoutWindow.__glInstance.isInitialised&&(this.onInitialised(),void 0!==this._checkReadyInterval&&(clearInterval(this._checkReadyInterval),this._checkReadyInterval=void 0))}serializeWindowFeatures(t){const e=[];for(const i in t)e.push(i+\"=\"+t[i].toString());return e.join(\",\")}createUrl(){const t=\"gl-window-config-\"+Ot(),e=_t.minifyConfig(this._config);try{localStorage.setItem(t,JSON.stringify(e))}catch(t){throw new Error(\"Error while writing to localStorage \"+function(t){return t instanceof Error?t.message:\"string\"==typeof t?t:\"Unknown Error\"}(t))}const i=new URL(location.href);return i.searchParams.set(\"gl-window\",t),i.toString()}positionWindow(){if(null===this._popoutWindow)throw new Error(\"BrowserPopout.positionWindow: null popoutWindow\");this._popoutWindow.moveTo(this._initialWindowSize.left,this._initialWindowSize.top),this._popoutWindow.focus()}onInitialised(){this._isInitialised=!0,this.getGlInstance().on(\"popIn\",(()=>this.popIn())),this.emit(\"initialised\")}_onClose(){setTimeout((()=>this.emit(\"closed\")),50)}}class Gt extends Wt{constructor(t,e,i,n){super(),this.layoutManager=t,this._parent=i,this._element=n,this._popInParentIds=[],this._type=e.type,this._id=e.id,this._isInitialised=!1,this.isGround=!1,this.isRow=!1,this.isColumn=!1,this.isStack=!1,this.isComponent=!1,this.size=e.size,this.sizeUnit=e.sizeUnit,this.minSize=e.minSize,this.minSizeUnit=e.minSizeUnit,this._isClosable=e.isClosable,this._pendingEventPropagations={},this._throttledEvents=[\"stateChanged\"],this._contentItems=this.createContentItems(e.content)}get type(){return this._type}get id(){return this._id}set id(t){this._id=t}get popInParentIds(){return this._popInParentIds}get parent(){return this._parent}get contentItems(){return this._contentItems}get isClosable(){return this._isClosable}get element(){return this._element}get isInitialised(){return this._isInitialised}static isStack(t){return t.isStack}static isComponentItem(t){return t.isComponent}static isComponentParentableItem(t){return t.isStack||t.isGround}removeChild(t,e=!1){const i=this._contentItems.indexOf(t);if(-1===i)throw new Error(\"Can't remove child item. Unknown content item\");if(e||this._contentItems[i].destroy(),this._contentItems.splice(i,1),this._contentItems.length>0)this.updateSize(!1);else if(!this.isGround&&!0===this._isClosable){if(null===this._parent)throw new K(\"CIUC00874\");this._parent.removeChild(this)}}addChild(t,e,i){return null!=e||(e=this._contentItems.length),this._contentItems.splice(e,0,t),t.setParent(this),!0===this._isInitialised&&!1===t._isInitialised&&t.init(),e}replaceChild(t,e,i=!1){const n=this._contentItems.indexOf(t),o=t._element.parentNode;if(-1===n)throw new X(\"CIRCI23232\",\"Can't replace child. oldChild is not child of this\");if(null===o)throw new K(\"CIRCP23232\");if(o.replaceChild(e._element,t._element),!0===i&&(t._parent=null,t.destroy()),this._contentItems[n]=e,e.setParent(this),e.size=t.size,e.sizeUnit=t.sizeUnit,e.minSize=t.minSize,e.minSizeUnit=t.minSizeUnit,null===e._parent)throw new K(\"CIRCNC45699\");!0===e._parent._isInitialised&&!1===e._isInitialised&&e.init(),this.updateSize(!1)}remove(){if(null===this._parent)throw new K(\"CIR11110\");this._parent.removeChild(this)}popout(){const t=Ot(),e=this.layoutManager.createPopoutFromContentItem(this,void 0,t,void 0);return this.emitBaseBubblingEvent(\"stateChanged\"),e}calculateConfigContent(){const t=this._contentItems,e=t.length,i=new Array(e);for(let n=0;nthis.propagateEventToLayoutManager(t,e))))}propagateEventToLayoutManager(t,e){this._pendingEventPropagations[t]=!1,this.layoutManager.emitUnknown(t,e)}}class jt extends Gt{constructor(t,e,i){super(t,e,i,document.createElement(\"div\")),this._parentItem=i,this._focused=!1,this.isComponent=!0,this._reorderEnabled=e.reorderEnabled,this.applyUpdatableConfig(e),this._initialWantMaximise=e.maximised;const n=document.createElement(\"div\");n.classList.add(\"lm_content\"),this.element.appendChild(n),this._container=new Ft(e,this,t,n,(t=>this.handleUpdateItemConfigEvent(t)),(()=>this.show()),(()=>this.hide()),(t=>this.focus(t)),(t=>this.blur(t)))}get componentName(){return this._container.componentType}get componentType(){return this._container.componentType}get reorderEnabled(){return this._reorderEnabled}get initialWantMaximise(){return this._initialWantMaximise}get component(){return this._container.component}get container(){return this._container}get parentItem(){return this._parentItem}get headerConfig(){return this._headerConfig}get title(){return this._title}get tab(){return this._tab}get focused(){return this._focused}destroy(){this._container.destroy(),super.destroy()}applyUpdatableConfig(t){this.setTitle(t.title),this._headerConfig=t.header}toConfig(){const t=this._container.stateRequestEvent,e=void 0===t?this._container.state:t();return{type:at.component,content:[],size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,maximised:!1,isClosable:this.isClosable,reorderEnabled:this._reorderEnabled,title:this._title,header:mt.Header.createCopy(this._headerConfig),componentType:pt.copyComponentType(this.componentType),componentState:e}}close(){if(null===this.parent)throw new K(\"CIC68883\");this.parent.removeChild(this,!1)}enterDragMode(t,e){Tt(this.element,t),At(this.element,e),this._container.enterDragMode(t,e)}exitDragMode(){this._container.exitDragMode()}enterStackMaximised(){this._container.enterStackMaximised()}exitStackMaximised(){this._container.exitStackMaximised()}drag(){this._container.drag()}updateSize(t){this.updateNodeSize(t)}init(){this.updateNodeSize(!1),super.init(),this._container.emit(\"open\"),this.initContentItems()}setTitle(t){this._title=t,this.emit(\"titleChanged\",t),this.emit(\"stateChanged\")}setTab(t){this._tab=t,this.emit(\"tab\",t),this._container.setTab(t)}hide(){super.hide(),this._container.setVisibility(!1)}show(){super.show(),this._container.setVisibility(!0)}focus(t=!1){this.parentItem.setActiveComponentItem(this,!0,t)}setFocused(t){this._focused=!0,this.tab.setFocused(),t||this.emitBaseBubblingEvent(\"focus\")}blur(t=!1){this._focused&&this.layoutManager.setFocusedComponentItem(void 0,t)}setBlurred(t){this._focused=!1,this.tab.setBlurred(),t||this.emitBaseBubblingEvent(\"blur\")}setParent(t){this._parentItem=t,super.setParent(t)}handleUpdateItemConfigEvent(t){this.applyUpdatableConfig(t)}updateNodeSize(t){if(\"none\"!==this.element.style.display){const{width:e,height:i}=kt(this.element);this._container.setSizeToNodeSize(e,i,t)}}}class $t extends Gt{constructor(){super(...arguments),this._focused=!1}get focused(){return this._focused}setFocusedValue(t){this._focused=t}}class Zt extends Wt{constructor(t,e){super(),this._eElement=t,this._pointerTracking=!1,this._pointerDownEventListener=t=>this.onPointerDown(t),this._pointerMoveEventListener=t=>this.onPointerMove(t),this._pointerUpEventListener=t=>this.onPointerUp(t),this._timeout=void 0,this._allowableTargets=[t,...e],this._oDocument=document,this._eBody=document.body,this._nDelay=1800,this._nDistance=10,this._nX=0,this._nY=0,this._nOriginalX=0,this._nOriginalY=0,this._dragging=!1,this._eElement.addEventListener(\"pointerdown\",this._pointerDownEventListener,{passive:!0})}destroy(){this.checkRemovePointerTrackingEventListeners(),this._eElement.removeEventListener(\"pointerdown\",this._pointerDownEventListener)}cancelDrag(){this.processDragStop(void 0)}onPointerDown(t){if(this._allowableTargets.includes(t.target)&&t.isPrimary){const e=this.getPointerCoordinates(t);this.processPointerDown(e)}}processPointerDown(t){this._nOriginalX=t.x,this._nOriginalY=t.y,this._oDocument.addEventListener(\"pointermove\",this._pointerMoveEventListener),this._oDocument.addEventListener(\"pointerup\",this._pointerUpEventListener,{passive:!0}),this._pointerTracking=!0,this._timeout=setTimeout((()=>{try{this.startDrag()}catch(t){throw console.error(t),t}}),this._nDelay)}onPointerMove(t){this._pointerTracking&&(this.processDragMove(t),t.preventDefault())}processDragMove(t){this._nX=t.pageX-this._nOriginalX,this._nY=t.pageY-this._nOriginalY,!1===this._dragging&&(Math.abs(this._nX)>this._nDistance||Math.abs(this._nY)>this._nDistance)&&this.startDrag(),this._dragging&&this.emit(\"drag\",this._nX,this._nY,t)}onPointerUp(t){this.processDragStop(t)}processDragStop(t){var e;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this.checkRemovePointerTrackingEventListeners(),!0===this._dragging&&(this._eBody.classList.remove(\"lm_dragging\"),this._eElement.classList.remove(\"lm_dragging\"),null===(e=this._oDocument.querySelector(\"iframe\"))||void 0===e||e.style.setProperty(\"pointer-events\",\"\"),this._dragging=!1,this.emit(\"dragStop\",t))}checkRemovePointerTrackingEventListeners(){this._pointerTracking&&(this._oDocument.removeEventListener(\"pointermove\",this._pointerMoveEventListener),this._oDocument.removeEventListener(\"pointerup\",this._pointerUpEventListener),this._pointerTracking=!1)}startDrag(){var t;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this._dragging=!0,this._eBody.classList.add(\"lm_dragging\"),this._eElement.classList.add(\"lm_dragging\"),null===(t=this._oDocument.querySelector(\"iframe\"))||void 0===t||t.style.setProperty(\"pointer-events\",\"none\"),this.emit(\"dragStart\",this._nOriginalX,this._nOriginalY)}getPointerCoordinates(t){return{x:t.pageX,y:t.pageY}}}class qt{constructor(t,e,i){this._isVertical=t,this._size=e,this._grabSize=i0){const i=this.createSplitter(Math.max(0,e-1)).element;e>0?(this.contentItems[e-1].element.insertAdjacentElement(\"afterend\",i),i.insertAdjacentElement(\"afterend\",t.element)):(this.contentItems[0].element.insertAdjacentElement(\"beforebegin\",i),i.insertAdjacentElement(\"beforebegin\",t.element))}else this._childElementContainer.appendChild(t.element);super.addChild(t,e);const n=1/this.contentItems.length*100;if(!0===i)return this.emitBaseBubblingEvent(\"stateChanged\"),e;for(let e=0;e0&&(this.calculateRelativeSizes(),this.setAbsoluteSizes()),this.emitBaseBubblingEvent(\"stateChanged\"),this.emit(\"resize\")}setAbsoluteSizes(){const t=this.calculateAbsoluteSizes();for(let e=0;e0&&t.itemSizes[e]++,this._isColumn?(Tt(this.contentItems[e].element,t.crossAxisSize),At(this.contentItems[e].element,t.itemSizes[e])):(Tt(this.contentItems[e].element,t.itemSizes[e]),At(this.contentItems[e].element,t.crossAxisSize))}calculateAbsoluteSizes(){const t=(this.contentItems.length-1)*this._splitterSize,{width:e,height:i}=kt(this.element);let n,o;this._isColumn?(n=i-t,o=e):(n=e-t,o=i);let s=0;const r=[];for(let t=0;t0){const n=100-t;for(let t=0;t100&&e.length>0){for(let t=0;te)return;{const r=i/e;let a=i;for(let e=0;ethis.onSplitterDrag(e,t,i))),e.on(\"dragStop\",(()=>this.onSplitterDragStop(e))),e.on(\"dragStart\",(()=>this.onSplitterDragStart(e))),this._splitter.splice(t,0,e),e}getSplitItems(t){const e=this._splitter.indexOf(t);return{before:this.contentItems[e],after:this.contentItems[e+1]}}calculateContentItemMinSize(t){const e=t.minSize;if(void 0!==e){if(t.minSizeUnit===ht.Pixel)return e;throw new X(\"ROCGMD98831\",JSON.stringify(t))}{const t=this.layoutManager.layoutConfig.dimensions;return this._isColumn?t.defaultMinItemHeight:t.defaultMinItemWidth}}calculateContentItemsTotalMinSize(t){let e=0;for(const i of t)e+=this.calculateContentItemMinSize(i);return e}onSplitterDragStart(t){const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=this.calculateContentItemsTotalMinSize(e.before.contentItems),s=this.calculateContentItemsTotalMinSize(e.after.contentItems);this._splitterPosition=0,this._splitterMinPosition=-1*(i-o),this._splitterMaxPosition=n-s}onSplitterDrag(t,e,i){let n=this._isColumn?i:e;if(null===this._splitterMinPosition||null===this._splitterMaxPosition)throw new K(\"ROCOSD59226\");n=Math.max(n,this._splitterMinPosition),n=Math.min(n,this._splitterMaxPosition),this._splitterPosition=n;const o=zt(n);this._isColumn?t.element.style.top=o:t.element.style.left=o}onSplitterDragStop(t){if(null===this._splitterPosition)throw new K(\"ROCOSDS66932\");{const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=(this._splitterPosition+i)/(i+n),s=e.before.size+e.after.size;e.before.size=o*s,e.after.size=(1-o)*s,t.element.style.top=zt(0),t.element.style.left=zt(0),globalThis.requestAnimationFrame((()=>this.updateSize(!1)))}}}!function(t){t.getElementDimensionSize=function(t,e){return\"width\"===e?function(t){return t.offsetWidth}(t):function(t){return t.offsetHeight}(t)},t.setElementDimensionSize=function(t,e,i){return\"width\"===e?Tt(t,i):At(t,i)},t.createElement=function(t,e){const i=t.createElement(\"div\");return i.classList.add(\"lm_item\"),e?i.classList.add(\"lm_column\"):i.classList.add(\"lm_row\"),i}}(Xt||(Xt={}));class Yt extends $t{constructor(t,e,i){super(t,vt.create(e),null,Yt.createElement(document)),this.isGround=!0,this._childElementContainer=this.element,this._containerElement=i;let n=null;for(;;){const t=n?n.previousSibling:this._containerElement.lastChild;if(!(t instanceof Element&&t.classList.contains(\"lm_content\")))break;n=t}this._containerElement.insertBefore(this.element,n)}init(){if(!0!==this.isInitialised){this.updateNodeSize();for(let t=0;t0?this.contentItems[0]:this,n.isComponent)throw new Error(\"Cannot add item as child to ComponentItem\");{const t=this.layoutManager.createAndInitContentItem(i,n);return e=n.addChild(t,e),n===this?-1:e}}loadComponentAsRoot(t){this.clearRoot();const e=Ct.resolve(t,!1);if(e.maximised)throw new Error(\"Root Component cannot be maximised\");{const t=new jt(this.layoutManager,e,this);t.init(),this.addChild(t,0)}}addChild(t,e){if(this.contentItems.length>0)throw new Error(\"Ground node can only have a single child\");return this._childElementContainer.appendChild(t.element),e=super.addChild(t,e),this.updateSize(!1),this.emitBaseBubblingEvent(\"stateChanged\"),e}calculateConfigContent(){const t=this.contentItems,e=t.length,i=new Array(e);for(let n=0;n0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e)),this.updateContentItemsSize(!1))}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}createSideAreas(){const t=Yt.Area.oppositeSides,e=new Array(Object.keys(t).length);let i=0;for(const n in t){const o=n,s=this.getElementArea();if(null===s)throw new K(\"RCSA77553\");s.side=o,\"2\"===t[o][1]?s[o]=s[t[o]]-50:s[o]=s[t[o]]+50,s.surface=(s.x2-s.x1)*(s.y2-s.y1),e[i++]=s}return e}highlightDropZone(t,e,i){this.layoutManager.tabDropPlaceholder.remove(),super.highlightDropZone(t,e,i)}onDrop(t,e){if(t.isComponent){const e=ut.createDefault(),i=t;e.header=mt.Header.createCopy(i.headerConfig);const n=this.layoutManager.createAndInitContentItem(e,this);n.addChild(t),t=n}if(0===this.contentItems.length)this.addChild(t);else{if(t.type===at.row||t.type===at.column){const e=ut.createDefault(),i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}const i=\"x\"==e.side[0]?at.row:at.column,n=\"2\"==e.side[1],o=this.contentItems[0];if(o instanceof Xt&&o.type===i){const e=o.contentItems[n?0:o.contentItems.length-1];o.addChild(t,n?0:void 0,!0),e.size*=.5,t.size=e.size,t.sizeUnit=ht.Percent,o.updateSize(!1)}else{const e=ct.createDefault(i),s=this.layoutManager.createContentItem(e,this);this.replaceChild(o,s),s.addChild(t,n?0:void 0,!0),s.addChild(o,n?void 0:0,!0),o.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}}dock(){throw new X(\"GID87731\")}validateDocking(){throw new X(\"GIVD87732\")}getAllContentItems(){const t=[this];return this.deepGetAllContentItems(this.contentItems,t),t}getConfigMaximisedItems(){const t=[];return this.deepFilterContentItems(this.contentItems,t,(t=>!(!Gt.isStack(t)||!t.initialWantMaximise)||!(!Gt.isComponentItem(t)||!t.initialWantMaximise))),t}getItemsByPopInParentId(t){const e=[];return this.deepFilterContentItems(this.contentItems,e,(e=>e.popInParentIds.includes(t))),e}toConfig(){throw new Error(\"Cannot generate GroundItem config\")}setActiveComponentItem(t,e,i){}updateNodeSize(){const{width:t,height:e}=kt(this._containerElement);Tt(this.element,t),At(this.element,e),this.contentItems.length>0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e))}deepGetAllContentItems(t,e){for(let i=0;ithis.onClick(t),this._touchStartEventListener=t=>this.onTouchStart(t),this._element=document.createElement(\"div\"),this._element.classList.add(i),this._element.title=e,this._header.on(\"destroy\",(()=>this.destroy())),this._element.addEventListener(\"click\",this._clickEventListener,{passive:!0}),this._element.addEventListener(\"touchstart\",this._touchStartEventListener,{passive:!0}),this._header.controlsContainerElement.appendChild(this._element)}get element(){return this._element}destroy(){var t;this._element.removeEventListener(\"click\",this._clickEventListener),this._element.removeEventListener(\"touchstart\",this._touchStartEventListener),null===(t=this._element.parentNode)||void 0===t||t.removeChild(this._element)}onClick(t){this._pushEvent(t)}onTouchStart(t){this._pushEvent(t)}}class Jt{constructor(t,e,i,n,o){var s;this._layoutManager=t,this._componentItem=e,this._closeEvent=i,this._focusEvent=n,this._dragStartEvent=o,this._isActive=!1,this._tabClickListener=t=>this.onTabClickDown(t),this._tabTouchStartListener=t=>this.onTabTouchStart(t),this._closeClickListener=()=>this.onCloseClick(),this._closeTouchStartListener=()=>this.onCloseTouchStart(),this._dragStartListener=(t,e)=>this.onDragStart(t,e),this._contentItemDestroyListener=()=>this.onContentItemDestroy(),this._tabTitleChangedListener=t=>this.setTitle(t),this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_tab\"),this._titleElement=document.createElement(\"span\"),this._titleElement.classList.add(\"lm_title\"),this._closeElement=document.createElement(\"div\"),this._closeElement.classList.add(\"lm_close_tab\"),this._element.appendChild(this._titleElement),this._element.appendChild(this._closeElement),e.isClosable?this._closeElement.style.display=\"\":this._closeElement.style.display=\"none\",this.setTitle(e.title),this._componentItem.on(\"titleChanged\",this._tabTitleChangedListener);(null!==(s=e.reorderEnabled)&&void 0!==s?s:this._layoutManager.layoutConfig.settings.reorderEnabled)&&this.enableReorder(),this._element.addEventListener(\"click\",this._tabClickListener,{passive:!0}),this._element.addEventListener(\"touchstart\",this._tabTouchStartListener,{passive:!0}),this._componentItem.isClosable?(this._closeElement.addEventListener(\"click\",this._closeClickListener,{passive:!0}),this._closeElement.addEventListener(\"touchstart\",this._closeTouchStartListener,{passive:!0})):(this._closeElement.remove(),this._closeElement=void 0),this._componentItem.setTab(this),this._layoutManager.emit(\"tabCreated\",this)}get isActive(){return this._isActive}get componentItem(){return this._componentItem}get contentItem(){return this._componentItem}get element(){return this._element}get titleElement(){return this._titleElement}get closeElement(){return this._closeElement}get reorderEnabled(){return void 0!==this._dragListener}set reorderEnabled(t){t!==this.reorderEnabled&&(t?this.enableReorder():this.disableReorder())}setTitle(t){this._titleElement.innerText=t,this._element.title=t}setActive(t){t!==this._isActive&&(this._isActive=t,t?this._element.classList.add(\"lm_active\"):this._element.classList.remove(\"lm_active\"))}destroy(){var t,e;this._closeEvent=void 0,this._focusEvent=void 0,this._dragStartEvent=void 0,this._element.removeEventListener(\"click\",this._tabClickListener),this._element.removeEventListener(\"touchstart\",this._tabTouchStartListener),null===(t=this._closeElement)||void 0===t||t.removeEventListener(\"click\",this._closeClickListener),null===(e=this._closeElement)||void 0===e||e.removeEventListener(\"touchstart\",this._closeTouchStartListener),this._componentItem.off(\"titleChanged\",this._tabTitleChangedListener),this.reorderEnabled&&this.disableReorder(),this._element.remove()}setBlurred(){this._element.classList.remove(\"lm_focused\"),this._titleElement.classList.remove(\"lm_focused\")}setFocused(){this._element.classList.add(\"lm_focused\"),this._titleElement.classList.add(\"lm_focused\")}onDragStart(t,e){if(void 0===this._dragListener)throw new J(\"TODSDLU10093\");if(void 0===this._dragStartEvent)throw new J(\"TODS23309\");this._dragStartEvent(t,e,this._dragListener,this.componentItem)}onContentItemDestroy(){void 0!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=void 0)}onTabClickDown(t){const e=t.target;e!==this._element&&e!==this._titleElement||(0===t.button?this.notifyFocus():1===t.button&&this._componentItem.isClosable&&this.notifyClose())}onTabTouchStart(t){t.target===this._element&&this.notifyFocus()}onCloseClick(){this.notifyClose()}onCloseTouchStart(){this.notifyClose()}notifyClose(){if(void 0===this._closeEvent)throw new J(\"TNC15007\");this._closeEvent(this._componentItem)}notifyFocus(){if(void 0===this._focusEvent)throw new J(\"TNA15007\");this._focusEvent(this._componentItem)}enableReorder(){this._dragListener=new Zt(this._element,[this._titleElement]),this._dragListener.on(\"dragStart\",this._dragStartListener),this._componentItem.on(\"destroy\",this._contentItemDestroyListener)}disableReorder(){if(void 0===this._dragListener)throw new J(\"TDR87745\");this._componentItem.off(\"destroy\",this._contentItemDestroyListener),this._dragListener.off(\"dragStart\",this._dragStartListener),this._dragListener=void 0}}class Qt{constructor(t,e,i,n,o){this._layoutManager=t,this._componentRemoveEvent=e,this._componentFocusEvent=i,this._componentDragStartEvent=n,this._dropdownActiveChangedEvent=o,this._tabs=[],this._lastVisibleTabIndex=-1,this._dropdownActive=!1,this._element=document.createElement(\"section\"),this._element.classList.add(\"lm_tabs\"),this._dropdownElement=document.createElement(\"section\"),this._dropdownElement.classList.add(\"lm_tabdropdown_list\"),this._dropdownElement.style.display=\"none\"}get tabs(){return this._tabs}get tabCount(){return this._tabs.length}get lastVisibleTabIndex(){return this._lastVisibleTabIndex}get element(){return this._element}get dropdownElement(){return this._dropdownElement}get dropdownActive(){return this._dropdownActive}destroy(){for(let t=0;tthis.handleTabCloseEvent(t)),(t=>this.handleTabFocusEvent(t)),((t,e,i,n)=>this.handleTabDragStartEvent(t,e,i,n)));void 0===e&&(e=this._tabs.length),this._tabs.splice(e,0,i),ethis._lastVisibleTabIndex){const t=this._tabs[e];for(let t=e;t>0;t--)this._tabs[t]=this._tabs[t-1];this._tabs[0]=t}}updateTabSizes(t,e){let i=!1;this.tryUpdateTabSizes(i,t,e)||(i=!0,this.tryUpdateTabSizes(i,t,e)),i!==this._dropdownActive&&(this._dropdownActive=i,this._dropdownActiveChangedEvent())}tryUpdateTabSizes(t,e,i){if(this._tabs.length>0){if(void 0===i)throw new Error(\"non-empty tabs must have active component item\");let n=0,o=!1;const s=this._layoutManager.layoutConfig.settings.tabOverlapAllowance,r=this._tabs.indexOf(i.tab),a=this._tabs[r];this._lastVisibleTabIndex=-1;for(let i=0;ie){if(o)i===r&&(l.style.zIndex=\"auto\",l.style.marginLeft=\"\",l.parentElement!==this._element&&this._element.appendChild(l));else{let t;if(t=r>0&&r<=i?(d-e)/(i-1):(d-e)/i,tthis.onClick(t),this._touchStartListener=t=>this.onTouchStart(t),this._rowColumnClosable=!0,this._closeButton=null,this._popoutButton=null,this._tabsContainer=new Qt(this._layoutManager,(t=>this.handleTabInitiatedComponentRemoveEvent(t)),(t=>this.handleTabInitiatedComponentFocusEvent(t)),((t,e,i,n)=>this.handleTabInitiatedDragStartEvent(t,e,i,n)),(()=>this.processTabDropdownActiveChanged())),this._show=i.show,this._popoutEnabled=i.popoutEnabled,this._popoutLabel=i.popoutLabel,this._maximiseEnabled=i.maximiseEnabled,this._maximiseLabel=i.maximiseLabel,this._minimiseEnabled=i.minimiseEnabled,this._minimiseLabel=i.minimiseLabel,this._closeEnabled=i.closeEnabled,this._closeLabel=i.closeLabel,this._tabDropdownEnabled=i.tabDropdownEnabled,this._tabDropdownLabel=i.tabDropdownLabel,this.setSide(i.side),this._canRemoveComponent=this._configClosable,this._element=document.createElement(\"section\"),this._element.classList.add(\"lm_header\"),this._controlsContainerElement=document.createElement(\"section\"),this._controlsContainerElement.classList.add(\"lm_controls\"),this._element.appendChild(this._tabsContainer.element),this._element.appendChild(this._controlsContainerElement),this._element.appendChild(this._tabsContainer.dropdownElement),this._element.addEventListener(\"click\",this._clickListener,{passive:!0}),this._element.addEventListener(\"touchstart\",this._touchStartListener,{passive:!0}),this._documentMouseUpListener=()=>this._tabsContainer.hideAdditionalTabsDropdown(),globalThis.document.addEventListener(\"mouseup\",this._documentMouseUpListener,{passive:!0}),this._tabControlOffset=this._layoutManager.layoutConfig.settings.tabControlOffset,this._tabDropdownEnabled&&(this._tabDropdownButton=new Kt(this,this._tabDropdownLabel,\"lm_tabdropdown\",(()=>this._tabsContainer.showAdditionalTabsDropdown()))),this._popoutEnabled&&(this._popoutButton=new Kt(this,this._popoutLabel,\"lm_popout\",(()=>this.handleButtonPopoutEvent()))),this._maximiseEnabled&&(this._maximiseButton=new Kt(this,this._maximiseLabel,\"lm_maximise\",(t=>this.handleButtonMaximiseToggleEvent(t)))),this._configClosable&&(this._closeButton=new Kt(this,this._closeLabel,\"lm_close\",(()=>s()))),this.processTabDropdownActiveChanged()}get show(){return this._show}get side(){return this._side}get leftRightSided(){return this._leftRightSided}get layoutManager(){return this._layoutManager}get parent(){return this._parent}get tabs(){return this._tabsContainer.tabs}get lastVisibleTabIndex(){return this._tabsContainer.lastVisibleTabIndex}get element(){return this._element}get tabsContainerElement(){return this._tabsContainer.element}get controlsContainerElement(){return this._controlsContainerElement}destroy(){this.emit(\"destroy\"),this._popoutEvent=void 0,this._maximiseToggleEvent=void 0,this._clickEvent=void 0,this._touchStartEvent=void 0,this._componentRemoveEvent=void 0,this._componentFocusEvent=void 0,this._componentDragStartEvent=void 0,this._tabsContainer.destroy(),globalThis.document.removeEventListener(\"mouseup\",this._documentMouseUpListener),this._element.remove()}createTab(t,e){this._tabsContainer.createTab(t,e)}removeTab(t){this._tabsContainer.removeTab(t)}processActiveComponentChanged(t){this._tabsContainer.processActiveComponentChanged(t),this.updateTabSizes()}setSide(t){this._side=t,this._leftRightSided=[nt.right,nt.left].includes(this._side)}setRowColumnClosable(t){this._rowColumnClosable=t,this.updateClosability()}updateClosability(){let t;if(this._configClosable)if(this._rowColumnClosable){t=!0;const e=this.tabs.length;for(let i=0;i1}applyFocusedValue(t){t?this._element.classList.add(\"lm_focused\"):this._element.classList.remove(\"lm_focused\")}processMaximised(){if(void 0===this._maximiseButton)throw new J(\"HPMAX16997\");this._maximiseButton.element.setAttribute(\"title\",this._minimiseLabel)}processMinimised(){if(void 0===this._maximiseButton)throw new J(\"HPMIN16997\");this._maximiseButton.element.setAttribute(\"title\",this._maximiseLabel)}updateTabSizes(){if(this._tabsContainer.tabCount>0){const t=this._show?this._layoutManager.layoutConfig.dimensions.headerHeight:0;let e;this._leftRightSided?(this._element.style.height=\"\",this._element.style.width=zt(t)):(this._element.style.width=\"\",this._element.style.height=zt(t)),e=this._leftRightSided?this._element.offsetHeight-this._controlsContainerElement.offsetHeight-this._tabControlOffset:this._element.offsetWidth-this._controlsContainerElement.offsetWidth-this._tabControlOffset,this._tabsContainer.updateTabSizes(e,this._getActiveComponentItemEvent())}}handleTabInitiatedComponentRemoveEvent(t){if(this._canRemoveComponent){if(void 0===this._componentRemoveEvent)throw new J(\"HHTCE22294\");this._componentRemoveEvent(t)}}handleTabInitiatedComponentFocusEvent(t){if(void 0===this._componentFocusEvent)throw new J(\"HHTAE22294\");this._componentFocusEvent(t)}handleTabInitiatedDragStartEvent(t,e,i,n){if(this._canRemoveComponent){if(void 0===this._componentDragStartEvent)throw new J(\"HHTDSE22294\");this._componentDragStartEvent(t,e,i,n)}else i.cancelDrag()}processTabDropdownActiveChanged(){void 0!==this._tabDropdownButton&&Dt(this._tabDropdownButton.element,this._tabsContainer.dropdownActive)}handleButtonPopoutEvent(){if(this._layoutManager.layoutConfig.settings.popoutWholeStack){if(void 0===this._popoutEvent)throw new J(\"HHBPOE17834\");this._popoutEvent()}else{const t=this._getActiveComponentItemEvent();t&&t.popout()}}handleButtonMaximiseToggleEvent(t){if(void 0===this._maximiseToggleEvent)throw new J(\"HHBMTE16834\");this._maximiseToggleEvent()}onClick(t){t.target===this._element&&this.notifyClick(t)}onTouchStart(t){t.target===this._element&&this.notifyTouchStart(t)}notifyClick(t){if(void 0===this._clickEvent)throw new J(\"HNHC46834\");this._clickEvent(t)}notifyTouchStart(t){if(void 0===this._touchStartEvent)throw new J(\"HNHTS46834\");this._touchStartEvent(t)}}class ee extends $t{constructor(t,e,i){var n,o,s,r,a,l,h,d,c,m,u,p,g,f,v,_,y,C,w;super(t,e,i,ee.createElement(document)),this._headerSideChanged=!1,this._resizeListener=()=>this.handleResize(),this._maximisedListener=()=>this.handleMaximised(),this._minimisedListener=()=>this.handleMinimised(),this._headerConfig=e.header;const I=t.layoutConfig.header,b=e.content;let S;if(1!==b.length)S=void 0;else{S=b[0].header}this._initialWantMaximise=e.maximised,this._initialActiveItemIndex=null!==(n=e.activeItemIndex)&&void 0!==n?n:0;const E=null!==(r=null!==(s=null===(o=this._headerConfig)||void 0===o?void 0:o.show)&&void 0!==s?s:null==S?void 0:S.show)&&void 0!==r?r:I.show,x=null!==(h=null!==(l=null===(a=this._headerConfig)||void 0===a?void 0:a.popout)&&void 0!==l?l:null==S?void 0:S.popout)&&void 0!==h?h:I.popout,L=null!==(m=null!==(c=null===(d=this._headerConfig)||void 0===d?void 0:d.maximise)&&void 0!==c?c:null==S?void 0:S.maximise)&&void 0!==m?m:I.maximise,z=null!==(g=null!==(p=null===(u=this._headerConfig)||void 0===u?void 0:u.close)&&void 0!==p?p:null==S?void 0:S.close)&&void 0!==g?g:I.close,M=null!==(_=null!==(v=null===(f=this._headerConfig)||void 0===f?void 0:f.minimise)&&void 0!==v?v:null==S?void 0:S.minimise)&&void 0!==_?_:I.minimise,P=null!==(w=null!==(C=null===(y=this._headerConfig)||void 0===y?void 0:y.tabDropdown)&&void 0!==C?C:null==S?void 0:S.tabDropdown)&&void 0!==w?w:I.tabDropdown;this._maximisedEnabled=!1!==L;const T={show:!1!==E,side:!1===E?nt.top:E,popoutEnabled:!1!==x,popoutLabel:!1===x?\"\":x,maximiseEnabled:this._maximisedEnabled,maximiseLabel:!1===L?\"\":L,closeEnabled:!1!==z,closeLabel:!1===z?\"\":z,minimiseEnabled:!0,minimiseLabel:M,tabDropdownEnabled:!1!==P,tabDropdownLabel:!1===P?\"\":P};this._header=new te(t,this,T,e.isClosable&&!1!==z,(()=>this.getActiveComponentItem()),(()=>this.remove()),(()=>this.handlePopoutEvent()),(()=>this.toggleMaximise()),(t=>this.handleHeaderClickEvent(t)),(t=>this.handleHeaderTouchStartEvent(t)),(t=>this.handleHeaderComponentRemoveEvent(t)),(t=>this.handleHeaderComponentFocusEvent(t)),((t,e,i,n)=>this.handleHeaderComponentStartDragEvent(t,e,i,n))),this.isStack=!0,this._childElementContainer=document.createElement(\"section\"),this._childElementContainer.classList.add(\"lm_items\"),this.on(\"resize\",this._resizeListener),this._maximisedEnabled&&(this.on(\"maximised\",this._maximisedListener),this.on(\"minimised\",this._minimisedListener)),this.element.appendChild(this._header.element),this.element.appendChild(this._childElementContainer),this.setupHeaderPosition(),this._header.updateClosability()}get childElementContainer(){return this._childElementContainer}get header(){return this._header}get headerShow(){return this._header.show}get headerSide(){return this._header.side}get headerLeftRightSided(){return this._header.leftRightSided}get contentAreaDimensions(){return this._contentAreaDimensions}get initialWantMaximise(){return this._initialWantMaximise}get isMaximised(){return this===this.layoutManager.maximisedStack}get stackParent(){if(!this.parent)throw new Error(\"Stack should always have a parent\");return this.parent}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}init(){if(!0===this.isInitialised)return;this.updateNodeSize();for(let t=0;t0){if(this._initialActiveItemIndex<0||this._initialActiveItemIndex>=e)throw new Error(`ActiveItemIndex out of range: ${this._initialActiveItemIndex} id: ${this.id}`);for(let i=0;ithis.contentItems.length)throw e-=1,new X(\"SAC99728\");if(t instanceof jt)return e=super.addChild(t,e),this._childElementContainer.appendChild(t.element),this._header.createTab(t,e),this.setActiveComponentItem(t,i),this._header.updateTabSizes(),this.updateSize(!1),t.container.setBaseLogicalZIndex(),this._header.updateClosability(),this.emitStateChangedEvent(),e;throw new X(\"SACC88532\")}removeChild(t,e){const i=t,n=this.contentItems.indexOf(i),o=1===this.contentItems.length;if(this._activeComponentItem===i&&(i.focused&&i.blur(),!o)){const t=0===n?1:n-1;this.setActiveComponentItem(this.contentItems[t],!1)}this._header.removeTab(i),super.removeChild(i,e),o||this._header.updateClosability(),this.emitStateChangedEvent()}toggleMaximise(){this.isMaximised?this.minimise():this.maximise()}maximise(){if(!this.isMaximised){this.layoutManager.setMaximisedStack(this);const t=this.contentItems,e=t.length;for(let i=0;i0&&void 0===t)throw new Error(\"expected non-empty stack to have an active component item\");return{type:\"stack\",content:this.calculateConfigContent(),size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,isClosable:this.isClosable,maximised:this.isMaximised,header:this.createHeaderConfig(),activeItemIndex:t}}onDrop(t,e){if(\"header\"===this._dropSegment){if(this.resetHeaderDropZone(),void 0===this._dropIndex)throw new J(\"SODDI68990\");return void this.addChild(t,this._dropIndex)}if(\"body\"===this._dropSegment)return void this.addChild(t,0,!0);const i=\"top\"===this._dropSegment||\"bottom\"===this._dropSegment,n=\"left\"===this._dropSegment||\"right\"===this._dropSegment,o=\"top\"===this._dropSegment||\"left\"===this._dropSegment,s=i&&this.stackParent.isColumn||n&&this.stackParent.isRow;if(t.isComponent){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createAndInitContentItem(e,this);i.addChild(t),t=i}if(t.type===at.row||t.type===at.column){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}if(s){const e=this.stackParent.contentItems.indexOf(this);this.stackParent.addChild(t,o?e:e+1,!0),this.size*=.5,t.size=this.size,t.sizeUnit=this.sizeUnit,this.stackParent.updateSize(!1)}else{const e=i?at.column:at.row,n=ct.createDefault(e),s=this.layoutManager.createContentItem(n,this);this.stackParent.replaceChild(this,s),s.addChild(t,o?0:void 0,!0),s.addChild(this,o?void 0:0,!0),this.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}highlightDropZone(t,e){for(const i in this._contentAreaDimensions){const n=i,o=this._contentAreaDimensions[n].hoverArea;if(o.x1t&&o.y1e)return void(\"header\"===n?(this._dropSegment=\"header\",this.highlightHeaderDropZone(this._header.leftRightSided?e:t)):(this.resetHeaderDropZone(),this.highlightBodyDropZone(n)))}}getArea(){if(\"none\"===this.element.style.display)return null;const t=super.getElementArea(this._header.element),e=super.getElementArea(this._childElementContainer);if(null===t||null===e)throw new K(\"SGAHC13086\");const i=e.x2-e.x1,n=e.y2-e.y1;return this._contentAreaDimensions={header:{hoverArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2},highlightArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2}}},0===this.contentItems.length?(this._contentAreaDimensions.body={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2}},super.getElementArea(this.element)):(this._contentAreaDimensions.left={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x1+.25*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x1+.5*i,y2:e.y2}},this._contentAreaDimensions.top={hoverArea:{x1:e.x1+.25*i,y1:e.y1,x2:e.x1+.75*i,y2:e.y1+.5*n},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y1+.5*n}},this._contentAreaDimensions.right={hoverArea:{x1:e.x1+.75*i,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1+.5*i,y1:e.y1,x2:e.x2,y2:e.y2}},this._contentAreaDimensions.bottom={hoverArea:{x1:e.x1+.25*i,y1:e.y1+.5*n,x2:e.x1+.75*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1+.5*n,x2:e.x2,y2:e.y2}},super.getElementArea(this.element))}positionHeader(t){this._header.side!==t&&(this._header.setSide(t),this._headerSideChanged=!0,this.setupHeaderPosition())}updateNodeSize(){if(\"none\"!==this.element.style.display){const t=kt(this.element);if(this._header.show){t[this._header.leftRightSided?it.width:it.height]-=this.layoutManager.layoutConfig.dimensions.headerHeight}this._childElementContainer.style.width=zt(t.width),this._childElementContainer.style.height=zt(t.height);for(let e=0;e=o&&tthis.onDrag(t,e,i))),this._dragListener.on(\"dragStop\",(()=>this.onDrop())),this.createDragProxyElements(t,e),null===this._componentItem.parent)throw new K(\"DPC10097\");this._componentItemFocused=this._componentItem.focused,this._componentItemFocused&&this._componentItem.blur(),this._componentItem.parent.removeChild(this._componentItem,!0),this.setDimensions(),document.body.appendChild(this._element),this.determineMinMaxXY(),this._layoutManager.calculateItemAreas(),this.setDropPosition(t,e)}get element(){return this._element}createDragProxyElements(t,e){this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_dragProxy\");const i=document.createElement(\"div\");i.classList.add(\"lm_header\");const n=document.createElement(\"div\");n.classList.add(\"lm_tabs\");const o=document.createElement(\"div\");o.classList.add(\"lm_tab\");const s=document.createElement(\"span\");s.classList.add(\"lm_title\"),o.appendChild(s),n.appendChild(o),i.appendChild(n),this._proxyContainerElement=document.createElement(\"div\"),this._proxyContainerElement.classList.add(\"lm_content\"),this._element.appendChild(i),this._element.appendChild(this._proxyContainerElement),this._originalParent instanceof ee&&this._originalParent.headerShow&&(this._sided=this._originalParent.headerLeftRightSided,this._element.classList.add(\"lm_\"+this._originalParent.headerSide),[nt.right,nt.bottom].indexOf(this._originalParent.headerSide)>=0&&this._proxyContainerElement.insertAdjacentElement(\"afterend\",i)),this._element.style.left=zt(t),this._element.style.top=zt(e),o.setAttribute(\"title\",this._componentItem.title),s.insertAdjacentText(\"afterbegin\",this._componentItem.title),this._proxyContainerElement.appendChild(this._componentItem.element)}determineMinMaxXY(){const t=this._layoutManager.groundItem;if(void 0===t)throw new J(\"DPDMMXY73109\");{const e=t.element.getBoundingClientRect();this._minX=e.left+document.body.scrollLeft,this._minY=e.top+document.body.scrollTop,this._maxX=this._minX+e.width,this._maxY=this._minY+e.height}}onDrag(t,e,i){const n=i.pageX,o=i.pageY;this.setDropPosition(n,o),this._componentItem.drag()}setDropPosition(t,e){this._layoutManager.layoutConfig.settings.constrainDragToContainer&&(t<=this._minX?t=Math.ceil(this._minX):t>=this._maxX&&(t=Math.floor(this._maxX)),e<=this._minY?e=Math.ceil(this._minY):e>=this._maxY&&(e=Math.floor(this._maxY))),this._element.style.left=zt(t),this._element.style.top=zt(e),this._area=this._layoutManager.getArea(t,e),null!==this._area&&(this._lastValidArea=this._area,this._area.contentItem.highlightDropZone(t,e,this._area))}onDrop(){const t=this._layoutManager.dropTargetIndicator;if(null===t)throw new K(\"DPOD30011\");let e;if(t.hide(),this._componentItem.exitDragMode(),null!==this._area)e=this._componentItem,this._area.contentItem.onDrop(e,this._area);else if(null!==this._lastValidArea){e=this._componentItem;this._lastValidArea.contentItem.onDrop(e,this._lastValidArea)}else this._originalParent?(e=this._componentItem,this._originalParent.addChild(e)):this._componentItem.destroy();this._element.remove(),this._layoutManager.emit(\"itemDropped\",this._componentItem),this._componentItemFocused&&void 0!==e&&e.focus()}setDimensions(){const t=this._layoutManager.layoutConfig.dimensions;if(void 0===t)throw new Error(\"DragProxy.setDimensions: dimensions undefined\");let e=t.dragProxyWidth,i=t.dragProxyHeight;if(void 0===e||void 0===i)throw new Error(\"DragProxy.setDimensions: width and/or height undefined\");const n=!1===this._layoutManager.layoutConfig.header.show?0:t.headerHeight;this._element.style.width=zt(e),this._element.style.height=zt(i),e-=this._sided?n:0,i-=this._sided?0:n,this._proxyContainerElement.style.width=zt(e),this._proxyContainerElement.style.height=zt(i),this._componentItem.enterDragMode(e,i),this._componentItem.show()}}class ne{constructor(t,e,i,n,o,s,r){this._layoutManager=t,this._element=e,this._extraAllowableChildTargets=i,this._componentTypeOrFtn=n,this._componentState=o,this._title=s,this._id=r,this._dragListener=null,this._dummyGroundContainer=document.createElement(\"div\");const a=gt.createDefault(\"row\");this._dummyGroundContentItem=new Yt(this._layoutManager,a,this._dummyGroundContainer),this.createDragListener()}destroy(){this.removeDragListener()}createDragListener(){this.removeDragListener(),this._dragListener=new Zt(this._element,this._extraAllowableChildTargets),this._dragListener.on(\"dragStart\",((t,e)=>this.onDragStart(t,e))),this._dragListener.on(\"dragStop\",(()=>this.onDragStop()))}onDragStart(t,e){var i;const n=\"component\";let o;if(\"function\"==typeof this._componentTypeOrFtn){const t=this._componentTypeOrFtn();o=ne.isDragSourceComponentItemConfig(t)?{type:n,componentState:t.state,componentType:t.type,title:null!==(i=t.title)&&void 0!==i?i:this._title}:t}else o={type:n,componentState:this._componentState,componentType:this._componentTypeOrFtn,title:this._title,id:this._id};const s=bt.resolve(o,!1),r=new jt(this._layoutManager,s,this._dummyGroundContentItem);if(this._dummyGroundContentItem.contentItems.push(r),null===this._dragListener)throw new K(\"DSODSD66746\");{const i=new ie(t,e,this._dragListener,this._layoutManager,r,this._dummyGroundContentItem),n=this._layoutManager.transitionIndicator;if(null===n)throw new K(\"DSODST66746\");n.transitionElements(this._element,i.element)}}onDragStop(){this.createDragListener()}removeDragListener(){null!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=null)}}!function(t){t.isDragSourceComponentItemConfig=function(t){return!(\"componentType\"in t)}}(ne||(ne={}));class oe{constructor(){this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_dropTargetIndicator\");const t=document.createElement(\"div\");t.classList.add(\"lm_inner\"),this._element.appendChild(t),document.body.appendChild(this._element)}destroy(){this._element.remove()}highlightArea(t,e){this._element.style.left=zt(t.x1+e),this._element.style.top=zt(t.y1+e),this._element.style.width=zt(t.x2-t.x1-e),this._element.style.height=zt(t.y2-t.y1-e),this._element.style.display=\"block\"}hide(){Dt(this._element,!1)}}class se{constructor(){this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_transition_indicator\"),document.body.appendChild(this._element),this._toElement=null,this._fromDimensions=null,this._totalAnimationDuration=200,this._animationStartTime=null}destroy(){this._element.remove()}transitionElements(t,e){}nextAnimationFrame(){}measure(t){const e=t.getBoundingClientRect();return{left:e.left,top:e.top,width:t.offsetWidth,height:t.offsetHeight}}}class re extends Wt{constructor(t){super(),this._layoutManager=t,this._childEventListener=t=>this.onEventFromChild(t),globalThis.addEventListener(re.ChildEventName,this._childEventListener,{passive:!0})}emit(t,...e){\"userBroadcast\"===t?this.emitUserBroadcast(...e):super.emit(t,...e)}emitUserBroadcast(...t){this.handleUserBroadcastEvent(\"userBroadcast\",t)}destroy(){globalThis.removeEventListener(re.ChildEventName,this._childEventListener)}handleUserBroadcastEvent(t,e){this._layoutManager.isSubWindow?this.propagateToParent(t,e):this.propagateToThisAndSubtree(t,e)}onEventFromChild(t){const e=t.detail;this.handleUserBroadcastEvent(e.eventName,e.args)}propagateToParent(t,e){const i={bubbles:!0,cancelable:!0,detail:{layoutManager:this._layoutManager,eventName:t,args:e}},n=new CustomEvent(re.ChildEventName,i),o=globalThis.opener;if(null===o)throw new K(\"EHPTP15778\");o.dispatchEvent(n)}propagateToThisAndSubtree(t,e){this.emitUnknown(t,...e);for(let i=0;ithis.handleContainerResize())),this._windowBeforeUnloadListener=()=>this.onBeforeUnload(),this._windowBeforeUnloadListening=!1,this._maximisedStackBeforeDestroyedListener=t=>this.cleanupBeforeMaximisedStackDestroyed(t),this.isSubWindow=t.isSubWindow,this._constructorOrSubWindowLayoutConfig=t.constructorOrSubWindowLayoutConfig,Q.checkInitialise(),dt.checkInitialise(),void 0!==t.containerElement&&(this._containerElement=t.containerElement)}get container(){return this._containerElement}get isInitialised(){return this._isInitialised}get groundItem(){return this._groundItem}get root(){return this._groundItem}get openPopouts(){return this._openPopouts}get dropTargetIndicator(){return this._dropTargetIndicator}get transitionIndicator(){return this._transitionIndicator}get width(){return this._width}get height(){return this._height}get eventHub(){return this._eventHub}get rootItem(){if(void 0===this._groundItem)throw new Error(\"Cannot access rootItem before init\");return 0===this._groundItem.contentItems.length?void 0:this._groundItem.contentItems[0]}get focusedComponentItem(){return this._focusedComponentItem}get tabDropPlaceholder(){return this._tabDropPlaceholder}get maximisedStack(){return this._maximisedStack}get deprecatedConstructor(){return!this.isSubWindow&&void 0!==this._constructorOrSubWindowLayoutConfig}destroy(){if(this._isInitialised){this._windowBeforeUnloadListening&&(globalThis.removeEventListener(\"beforeunload\",this._windowBeforeUnloadListener),this._windowBeforeUnloadListening=!1),!0===this.layoutConfig.settings.closePopoutsOnUnload&&this.closeAllOpenPopouts(),this._resizeObserver.disconnect(),this.checkClearResizeTimeout(),void 0!==this._groundItem&&this._groundItem.destroy(),this._tabDropPlaceholder.remove(),null!==this._dropTargetIndicator&&this._dropTargetIndicator.destroy(),null!==this._transitionIndicator&&this._transitionIndicator.destroy(),this._eventHub.destroy();for(const t of this._dragSources)t.destroy();this._dragSources=[],this._isInitialised=!1}}minifyConfig(t){return _t.minifyConfig(t)}unminifyConfig(t){return _t.unminifyConfig(t)}init(){let t;if(this.setContainer(),this._dropTargetIndicator=new oe,this._transitionIndicator=new se,this.updateSizeFromContainer(),this.isSubWindow){if(void 0===this._constructorOrSubWindowLayoutConfig)throw new J(\"LMIU07155\");{const e=this._constructorOrSubWindowLayoutConfig.root;if(void 0===e)throw new X(\"LMIC07156\");if(!Ct.isComponent(e))throw new X(\"LMIC07157\");t=e;const i=xt.resolve(this._constructorOrSubWindowLayoutConfig);this.layoutConfig=Object.assign(Object.assign({},i),{root:void 0})}}else void 0===this._constructorOrSubWindowLayoutConfig?this.layoutConfig=_t.createDefault():this.layoutConfig=xt.resolve(this._constructorOrSubWindowLayoutConfig);const e=this.layoutConfig;this._groundItem=new Yt(this,e.root,this._containerElement),this._groundItem.init(),this.checkLoadedLayoutMaximiseItem(),this._resizeObserver.observe(this._containerElement),this._isInitialised=!0,this.adjustColumnsResponsive(),this.emit(\"initialised\"),void 0!==t&&this.loadComponentAsRoot(t)}loadLayout(t){if(!this.isInitialised)throw new Error(\"GoldenLayout: Need to call init() if LayoutConfig with defined root passed to constructor\");if(void 0===this._groundItem)throw new J(\"LMLL11119\");this.createSubWindows(),this.layoutConfig=xt.resolve(t),this._groundItem.loadRoot(this.layoutConfig.root),this.checkLoadedLayoutMaximiseItem(),this.adjustColumnsResponsive()}saveLayout(){if(!1===this._isInitialised)throw new Error(\"Can't create config, layout not yet initialised\");if(void 0===this._groundItem)throw new J(\"LMTC18244\");{const t=this._groundItem.calculateConfigContent();let e;e=1!==t.length?void 0:t[0],this.reconcilePopoutWindows();const i=[];for(let t=0;t=0?n=this._groundItem.contentItems[0]:e=0;break;case at.row:case at.column:e=n.addItem(t,i.index);break;case at.stack:if(Ct.isComponent(t)){e=n.addItem(t,i.index);break}throw Error(tt[6]);case at.component:throw new X(\"LMAIALC87444602\");default:throw new Y(\"LMAIALU98881733\",n.type)}if(Ct.isComponent(t)){const t=n.contentItems[e];Gt.isStack(t)&&(n=t,e=0)}return i.parentItem=n,i.index=e,i}}}loadComponentAsRoot(t){if(void 0===this._groundItem)throw new Error(\"Cannot add item before init\");this._groundItem.loadComponentAsRoot(t)}updateSize(t,e){this.setSize(t,e)}setSize(t,e){if(this._width=t,this._height=e,!0===this._isInitialised){if(void 0===this._groundItem)throw new J(\"LMUS18881\");if(this._groundItem.setSize(this._width,this._height),this._maximisedStack){const{width:t,height:e}=kt(this._containerElement);Tt(this._maximisedStack.element,t),At(this._maximisedStack.element,e),this._maximisedStack.updateSize(!1)}this.adjustColumnsResponsive()}}beginSizeInvalidation(){this._sizeInvalidationBeginCount++}endSizeInvalidation(){0==--this._sizeInvalidationBeginCount&&this.updateSizeFromContainer()}updateSizeFromContainer(){const{width:t,height:e}=kt(this._containerElement);this.setSize(t,e)}updateRootSize(t=!1){if(void 0===this._groundItem)throw new J(\"LMURS28881\");this._groundItem.updateSize(t)}createAndInitContentItem(t,e){const i=this.createContentItem(t,e);return i.init(),i}createContentItem(t,e){if(\"string\"!=typeof t.type)throw new G(\"Missing parameter 'type'\",JSON.stringify(t));if(ct.isComponentItem(t)&&!(e instanceof ee)&&e&&!(!0===this.isSubWindow&&e instanceof Yt)){t={type:at.stack,content:[t],size:t.size,sizeUnit:t.sizeUnit,minSize:t.minSize,minSizeUnit:t.minSizeUnit,id:t.id,maximised:t.maximised,isClosable:t.isClosable,activeItemIndex:0,header:void 0}}return this.createContentItemFromConfig(t,e)}findFirstComponentItemById(t){if(void 0===this._groundItem)throw new J(\"LMFFCIBI82446\");return this.findFirstContentItemTypeByIdRecursive(at.component,t,this._groundItem)}createPopout(t,e,i,n){return t instanceof Gt?this.createPopoutFromContentItem(t,e,i,n):this.createPopoutFromItemConfig(t,e,i,n)}createPopoutFromContentItem(t,e,i,n){let o=t.parent,s=t;for(;null!==o&&1===o.contentItems.length&&!o.isGround;)s=o,o=o.parent;if(null===o)throw new K(\"LMCPFCI00834\");{if(void 0===n&&(n=o.contentItems.indexOf(s)),null!==i&&o.addPopInParentId(i),void 0===e){const i=globalThis.screenX||globalThis.screenLeft,n=globalThis.screenY||globalThis.screenTop,o=t.element.offsetLeft,s=t.element.offsetTop,{width:r,height:a}=kt(t.element);e={left:i+o,top:n+s,width:r,height:a}}const r=t.toConfig();if(t.remove(),ft.isRootItemConfig(r))return this.createPopoutFromItemConfig(r,e,i,n);throw new Error(`${tt[0]}`)}}beginVirtualSizedContainerAdding(){0==++this._virtualSizedContainerAddingBeginCount&&(this._virtualSizedContainers.length=0)}addVirtualSizedContainer(t){this._virtualSizedContainers.push(t)}endVirtualSizedContainerAdding(){if(0==--this._virtualSizedContainerAddingBeginCount){const t=this._virtualSizedContainers.length;if(t>0){this.fireBeforeVirtualRectingEvent(t);for(let e=0;ethis.emit(\"windowOpened\",a))),a.on(\"closed\",(()=>this.reconcilePopoutWindows())),this._openPopouts.push(a),this.layoutConfig.settings.closePopoutsOnUnload&&!this._windowBeforeUnloadListening&&(globalThis.addEventListener(\"beforeunload\",this._windowBeforeUnloadListener,{passive:!0}),this._windowBeforeUnloadListening=!0),a}closeAllOpenPopouts(){for(let t=0;tglobalThis.close()),1)}getArea(t,e){let i=null,n=1/0;for(let o=0;o=s.x1&&t=s.y1&&es.surface&&(n=s.surface,i=s)}return i}calculateItemAreas(){const t=this.getAllContentItems(),e=this._groundItem;if(void 0===e)throw new J(\"LMCIAR44365\");if(1!==t.length){e.contentItems[0].isStack?this._itemAreas=[]:this._itemAreas=e.createSideAreas();for(let e=0;e0){let e=t[0];if(Gt.isComponentItem(e)){const t=e.parent;if(null===t)throw new K(\"LMXLLMI69999\");e=t}if(!Gt.isStack(e))throw new X(\"LMCLLMI19993\");e.maximise()}}}processMaximiseStack(t){if(this._maximisedStack=t,t.on(\"beforeItemDestroyed\",this._maximisedStackBeforeDestroyedListener),t.element.classList.add(\"lm_maximised\"),t.element.insertAdjacentElement(\"afterend\",this._maximisePlaceholder),void 0===this._groundItem)throw new J(\"LMMXI19993\");{this._groundItem.element.prepend(t.element);const{width:e,height:i}=kt(this._containerElement);Tt(t.element,e),At(t.element,i),t.updateSize(!0),t.focusActiveContentItem(),this._maximisedStack.emit(\"maximised\"),this.emit(\"stateChanged\")}}processMinimiseMaximisedStack(){if(void 0===this._maximisedStack)throw new X(\"LMMMS74422\");{const t=this._maximisedStack;if(null===t.parent)throw new K(\"LMMI13668\");t.element.classList.remove(\"lm_maximised\"),this._maximisePlaceholder.insertAdjacentElement(\"afterend\",t.element),this._maximisePlaceholder.remove(),this.updateRootSize(!0),this._maximisedStack=void 0,t.off(\"beforeItemDestroyed\",this._maximisedStackBeforeDestroyedListener),t.emit(\"minimised\"),this.emit(\"stateChanged\")}}reconcilePopoutWindows(){const t=[];for(let e=0;e{this._resizeTimeoutId=void 0,this.beginSizeInvalidation(),this.endSizeInvalidation()}),this.resizeDebounceInterval))}checkClearResizeTimeout(){void 0!==this._resizeTimeoutId&&(clearTimeout(this._resizeTimeoutId),this._resizeTimeoutId=void 0)}setContainer(){var t;const e=document.body,i=null!==(t=this._containerElement)&&void 0!==t?t:e;if(i===e){this.resizeWithContainerAutomatically=!0;const t=document.documentElement;t.style.height=\"100%\",t.style.margin=\"0\",t.style.padding=\"0\",t.style.overflow=\"clip\",e.style.height=\"100%\",e.style.margin=\"0\",e.style.padding=\"0\",e.style.overflow=\"clip\"}this._containerElement=i}onBeforeUnload(){this.destroy()}adjustColumnsResponsive(){if(void 0===this._groundItem)throw new J(\"LMACR20883\");if(this._firstLoad=!1,this.useResponsiveLayout()&&!this._updatingColumnsResponsive&&this._groundItem.contentItems.length>0&&this._groundItem.contentItems[0].isRow){if(void 0===this._groundItem||null===this._width)throw new J(\"LMACR77412\");{const t=this._groundItem.contentItems[0].contentItems.length;if(t<=1)return;{const e=this.layoutConfig.dimensions.defaultMinItemWidth;if(t*e<=this._width)return;{this._updatingColumnsResponsive=!0;const i=t-Math.max(Math.floor(this._width/e),1),n=this._groundItem.contentItems[0],o=this.getAllStacks();if(0===o.length)throw new X(\"LMACRS77413\");{const t=o[0];for(let e=0;en?void 0:{parentItem:t,index:o}}}case 1:if(void 0===this._focusedComponentItem)return;{const t=this._focusedComponentItem.parentItem;return this.tryCreateLocationFromParentItem(t,e)}case 2:{const t=this.findFirstContentItemType(at.stack);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 3:{let t=this.findFirstContentItemType(at.row);return void 0!==t?this.tryCreateLocationFromParentItem(t,e):(t=this.findFirstContentItemType(at.column),void 0!==t?this.tryCreateLocationFromParentItem(t,e):void 0)}case 4:{const t=this.findFirstContentItemType(at.row);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 5:{const t=this.findFirstContentItemType(at.column);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 6:if(void 0===this._groundItem)throw new J(\"LMFLRIF18244\");return void 0!==this.rootItem?void 0:void 0===e||0===e?{parentItem:this._groundItem,index:0}:void 0;case 7:if(void 0===this._groundItem)throw new J(\"LMFLF18244\");{const t=this._groundItem.contentItems;if(0===t.length)return void 0===e||0===e?{parentItem:this._groundItem,index:0}:void 0;{const i=t[0];return this.tryCreateLocationFromParentItem(i,e)}}}}tryCreateLocationFromParentItem(t,e){const i=t.contentItems.length;return void 0===e?{parentItem:t,index:i}:e<0||e>i?void 0:{parentItem:t,index:e}}}!function(t){t.createMaximisePlaceElement=function(t){const e=t.createElement(\"div\");return e.classList.add(\"lm_maximise_place\"),e},t.createTabDropPlaceholderElement=function(t){const e=t.createElement(\"div\");return e.classList.add(\"lm_drop_tab_placeholder\"),e},t.defaultLocationSelectors=[{typeId:1,index:void 0},{typeId:2,index:void 0},{typeId:3,index:void 0},{typeId:7,index:void 0}],t.afterFocusedItemIfPossibleLocationSelectors=[{typeId:0,index:1},{typeId:2,index:void 0},{typeId:3,index:void 0},{typeId:7,index:void 0}]}(ae||(ae={}));class le extends ae{constructor(t,e,i,n){if(super(le.createLayoutManagerConstructorParameters(t,e)),this._bindComponentEventHanlderPassedInConstructor=!1,this._creationTimeoutPassed=!1,void 0!==e&&\"function\"==typeof e&&(this.bindComponentEvent=e,this._bindComponentEventHanlderPassedInConstructor=!0,void 0!==i&&(this.unbindComponentEvent=i)),!this._bindComponentEventHanlderPassedInConstructor&&this.isSubWindow){if(void 0===this._constructorOrSubWindowLayoutConfig)throw new J(\"VLC98823\");{const t=xt.resolve(this._constructorOrSubWindowLayoutConfig);this.layoutConfig=Object.assign(Object.assign({},t),{root:void 0})}}!0!==n&&(this.deprecatedConstructor||this.init())}destroy(){this.bindComponentEvent=void 0,this.unbindComponentEvent=void 0,super.destroy()}init(){if(this._bindComponentEventHanlderPassedInConstructor||\"loading\"!==document.readyState&&null!==document.body){if(!this._bindComponentEventHanlderPassedInConstructor&&!0===this.isSubWindow&&!this._creationTimeoutPassed)return setTimeout((()=>this.init()),7),void(this._creationTimeoutPassed=!0);!0===this.isSubWindow&&(this._bindComponentEventHanlderPassedInConstructor||this.clearHtmlAndAdjustStylesForSubWindow(),window.__glInstance=this),super.init()}else document.addEventListener(\"DOMContentLoaded\",(()=>this.init()),{passive:!0})}clearHtmlAndAdjustStylesForSubWindow(){const t=document.head,e=new Array(4);e[0]=document.querySelectorAll(\"body link\"),e[1]=document.querySelectorAll(\"body style\"),e[2]=document.querySelectorAll(\"template\"),e[3]=document.querySelectorAll(\".gl_keep\");for(let i=0;ithis.emit(\"popIn\"))),document.body.appendChild(t),!0}}bindComponent(t,e){if(void 0!==this.bindComponentEvent){return this.bindComponentEvent(t,e)}if(void 0!==this.getComponentEvent)return{virtual:!1,component:this.getComponentEvent(t,e)};{const t=`${tt[2]}: ${JSON.stringify(e)}`;throw new Z(t)}}unbindComponent(t,e,i){if(void 0!==this.unbindComponentEvent)this.unbindComponentEvent(t);else if(!e&&void 0!==this.releaseComponentEvent){if(void 0===i)throw new J(\"VCUCRCU333998\");this.releaseComponentEvent(t,i)}}}!function(t){let e=!1;t.createLayoutManagerConstructorParameters=function(t,i){const n=e?null:new URL(document.location.href).searchParams.get(\"gl-window\");e=!0;const o=null!==n;let s,r;if(null!==n){const e=localStorage.getItem(n);if(null===e)throw new Error(\"Null gl-window Config\");localStorage.removeItem(n);const i=JSON.parse(e),o=_t.unminifyConfig(i);r=xt.fromResolved(o),t instanceof HTMLElement&&(s=t)}else void 0===t?r=void 0:t instanceof HTMLElement?(r=void 0,s=t):r=t,void 0===s&&i instanceof HTMLElement&&(s=i);return{constructorOrSubWindowLayoutConfig:r,isSubWindow:o,containerElement:s}}}(le||(le={}));class he extends le{constructor(t,e,i){super(t,e,i,!0),this._componentTypesMap=new Map,this._registeredComponentMap=new Map,this._virtuableComponentMap=new Map,this._containerVirtualRectingRequiredEventListener=(t,e,i)=>this.handleContainerVirtualRectingRequiredEvent(t,e,i),this._containerVirtualVisibilityChangeRequiredEventListener=(t,e)=>this.handleContainerVirtualVisibilityChangeRequiredEvent(t,e),this._containerVirtualZIndexChangeRequiredEventListener=(t,e,i)=>this.handleContainerVirtualZIndexChangeRequiredEvent(t,e,i),this.deprecatedConstructor||this.init()}registerComponent(t,e,i=!1){if(\"function\"!=typeof e)throw new $(\"registerComponent() componentConstructorOrFactoryFtn parameter is not a function\");if(e.hasOwnProperty(\"prototype\")){const n=e;this.registerComponentConstructor(t,n,i)}else{const n=e;this.registerComponentFactoryFunction(t,n,i)}}registerComponentConstructor(t,e,i=!1){if(\"function\"!=typeof e)throw new Error(tt[1]);if(void 0!==this._componentTypesMap.get(t))throw new Z(`${tt[3]}: ${t}`);this._componentTypesMap.set(t,{constructor:e,factoryFunction:void 0,virtual:i})}registerComponentFactoryFunction(t,e,i=!1){if(\"function\"!=typeof e)throw new Z(\"Please register a constructor function\");if(void 0!==this._componentTypesMap.get(t))throw new Z(`${tt[3]}: ${t}`);this._componentTypesMap.set(t,{constructor:void 0,factoryFunction:e,virtual:i})}registerComponentFunction(t){this.registerGetComponentConstructorCallback(t)}registerGetComponentConstructorCallback(t){if(\"function\"!=typeof t)throw new Error(\"Please register a callback function\");void 0!==this._getComponentConstructorFtn&&console.warn(\"Multiple component functions are being registered. Only the final registered function will be used.\"),this._getComponentConstructorFtn=t}getRegisteredComponentTypeNames(){const t=this._componentTypesMap.keys();return Array.from(t)}getComponentInstantiator(t){let e;const i=pt.resolveComponentTypeName(t);return void 0!==i&&(e=this._componentTypesMap.get(i)),void 0===e&&void 0!==this._getComponentConstructorFtn&&(e={constructor:this._getComponentConstructorFtn(t),factoryFunction:void 0,virtual:!1}),e}bindComponent(t,e){let i;const n=pt.resolveComponentTypeName(e);let o;if(void 0!==n&&(i=this._componentTypesMap.get(n)),void 0===i&&void 0!==this._getComponentConstructorFtn&&(i={constructor:this._getComponentConstructorFtn(e),factoryFunction:void 0,virtual:!1}),void 0!==i){const s=i.virtual;let r,a;r=void 0===e.componentState?void 0:Ut({},e.componentState);const l=i.constructor;if(void 0!==l)a=new l(t,r,s);else{const e=i.factoryFunction;if(void 0===e)throw new X(\"LMBCFFU10008\");a=e(t,r,s)}if(s){if(void 0===a)throw new J(\"GLBCVCU988774\");{const e=a,i=e.rootHtmlElement;if(void 0===i)throw new Z(`${tt[5]}: ${n}`);!function(t){const e=\"absolute\";t.style.position!==e&&(t.style.position=e)}(i),this.container.appendChild(i),this._virtuableComponentMap.set(t,e),t.virtualRectingRequiredEvent=this._containerVirtualRectingRequiredEventListener,t.virtualVisibilityChangeRequiredEvent=this._containerVirtualVisibilityChangeRequiredEventListener,t.virtualZIndexChangeRequiredEvent=this._containerVirtualZIndexChangeRequiredEventListener}}this._registeredComponentMap.set(t,a),o={virtual:i.virtual,component:a}}else o=super.bindComponent(t,e);return o}unbindComponent(t,e,i){if(void 0===this._registeredComponentMap.get(t))super.unbindComponent(t,e,i);else{const e=this._virtuableComponentMap.get(t);if(void 0!==e){const i=e.rootHtmlElement;if(void 0===i)throw new X(\"GLUC77743\",t.title);this.container.removeChild(i),this._virtuableComponentMap.delete(t)}}}fireBeforeVirtualRectingEvent(t){this._goldenLayoutBoundingClientRect=this.container.getBoundingClientRect(),super.fireBeforeVirtualRectingEvent(t)}handleContainerVirtualRectingRequiredEvent(t,e,i){const n=this._virtuableComponentMap.get(t);if(void 0===n)throw new J(\"GLHCSCE55933\");{const o=n.rootHtmlElement;if(void 0===o)throw new Z(tt[4]+\" \"+t.title);{const n=t.element.getBoundingClientRect(),s=n.left-this._goldenLayoutBoundingClientRect.left;o.style.left=zt(s);const r=n.top-this._goldenLayoutBoundingClientRect.top;o.style.top=zt(r),Tt(o,e),At(o,i)}}}handleContainerVirtualVisibilityChangeRequiredEvent(t,e){const i=this._virtuableComponentMap.get(t);if(void 0===i)throw new J(\"GLHCVVCRE55934\");{const n=i.rootHtmlElement;if(void 0===n)throw new Z(tt[4]+\" \"+t.title);Dt(n,e)}}handleContainerVirtualZIndexChangeRequiredEvent(t,e,i){const n=this._virtuableComponentMap.get(t);if(void 0===n)throw new J(\"GLHCVZICRE55935\");{const e=n.rootHtmlElement;if(void 0===e)throw new Z(tt[4]+\" \"+t.title);e.style.zIndex=i}}}const de=\"initial_\",ce={show:\"top\",popout:!1,maximise:!1,close:\"close-tab-unused\"},me={headerHeight:31},ue={hasHeaders:!0,reorderEnabled:!0},pe={popoutWholeStack:!1,constrainDragToContainer:!1,constrainDragToHeaders:!1,preventDragout:!1,showMaximiseIcon:!1,showPopoutIcon:!1,showCloseIcon:!1,blockedPopoutsThrowError:!0,closePopoutsOnUnload:!0,selectionEnabled:!1};var ge,fe;class ve{constructor(e){this.layout=e,ge.set(this,void 0),fe.set(this,void 0),this.handleResize=t=>{t.forEach((t=>this.resizeElement(t.target)))},this.handleMutation=()=>{this.layout.viewComponentsByContainerElement.forEach((t=>{this.resizeElement(t.container.element)}))},t.__classPrivateFieldSet(this,ge,new ResizeObserver(this.handleResize),\"f\"),t.__classPrivateFieldSet(this,fe,new MutationObserver(this.handleMutation),\"f\")}observeMutations(e){t.__classPrivateFieldGet(this,fe,\"f\")?.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[\"class\"]})}destroy(){t.__classPrivateFieldGet(this,ge,\"f\").disconnect(),t.__classPrivateFieldGet(this,fe,\"f\").disconnect()}observeContainer(e){t.__classPrivateFieldGet(this,ge,\"f\").observe(e)}unobserveContainer(e){t.__classPrivateFieldGet(this,ge,\"f\").unobserve(e)}resizeElement(t){const e=this.layout.viewComponentsByContainerElement.get(t);e&&e.resize()}}ge=new WeakMap,fe=new WeakMap;var _e={};Object.defineProperty(_e,\"__esModule\",{value:!0});var ye=_e.BaseItem=void 0;class Ce{constructor(t,e,i){this._item=t,this._layout=e,this._wrap=i}get raw(){return this._item}get layout(){return this._layout}get type(){return this._item.type}get contentItems(){return(this._item.contentItems??[]).map((t=>this._wrap(t)))}get parent(){const t=this._item.parent;return t?this._wrap(t):null}setActiveContentItem(t,e){if(\"stack\"!==this.type)throw new Error(`Cannot call setActiveContentItem from a non-stack item: ${this.type}`);this._item.setActiveContentItem(t.raw,e)}static wrapInternal(t,e,i){const n=Ce.wrapCache.get(e);if(n)return n;const o=new t(e,i,(e=>Ce.wrapInternal(t,e,i)));return Ce.wrapCache.set(e,o),o}}ye=_e.BaseItem=Ce,Ce.wrapCache=new WeakMap;const we=t=>!!t&&\"contentItems\"in t&&(t.isRow||t.isColumn);class Ie extends ye{isRoot(){return!!this._item.parent?.isGround}getBounds(){return this._item.element.getBoundingClientRect()}get viewName(){if(this._item.isComponent){const{component:t}=this._item;return t.identity.name}throw new Error(\"View name not found\")}onDestroyed(t){const e=({target:i})=>{i===this._item&&(t(),this._item.off(\"itemDestroyed\",e))};this._item.on(\"itemDestroyed\",e)}createAdjacentStack({position:t=\"right\"}={}){const e=this.raw;if(ee.isStack(e)&&e.parent){const i=[\"top\",\"bottom\"].includes(t)?\"column\":\"row\",n=[\"left\",\"top\"].includes(t)?1:0,o=we(e.parent)?e.parent:e.layoutManager,s=o,r=e.parent.contentItems.indexOf(e);e.parent.isGround&&e.parent.removeChild(e,!0);const a=o.newItem({type:i,content:[{type:\"stack\",content:[]}]},r);if(!a)throw new Error(\"createAdjacentStack: Failed to create new container\");const l=a.contentItems[0];return a.addChild(this.raw,n),we(s)&&s.removeChild(e,!0),this._wrap(l)}throw new Error(`Cannot creat adjacent stacks for type: ${e.type}, must be type 'stack'`)}setActiveContentItem(t,e=!0){if(!ee.isStack(this._item))throw new Error(`Cannot call setActiveContentItem from a non-stack item: ${this.type}`);this._item.setActiveComponentItem(t.raw,!e)}static wrap(t,e){return ye.wrapInternal(Ie,t,e)}}function be(t=[],e){for(const i of t)\"component\"===i.type?Object.keys(e).forEach((t=>{t in i&&(i.componentState={[`${de}${t}`]:i[t],...i.componentState}),i[t]=e[t]})):be(i.content,e)}function Se(t=[],e,i){for(const n of t)if(\"component\"===n.type)Object.keys(e).forEach((t=>{if(`${de}${t}`in n.componentState)return n[t]=n.componentState[`${de}${t}`],void delete n.componentState[`${de}${t}`];n[t]=e[t]}));else{if(n.size&&(\"row\"===i||\"column\"===i)){n[\"row\"===i?\"width\":\"height\"]=n.size?.includes(\".\")?parseFloat(n.size):parseInt(n.size)}Se(n.content,e,n.type)}}function Ee(t){if(t.root){t.root.content&&Se([t.root],{componentName:\"view\",isClosable:!0});const e=t.root;t.content=[e],delete t.root}return t}const xe=e=>class extends e{connectedCallback(){if(!this.name||!this.uuid)throw new Error(\" Name or uuid attribute missing\");if(!this.src)throw new Error(\" missing 'src' attribute.\");this.#t||(this.#t=document.createElement(\"iframe\"),this.#t.src=this.src,this.#t.style.height=\"100%\",this.#t.style.width=\"100%\",this.#t.style.border=\"none\",this.forceFrameName?this.#t.setAttribute(\"name\",this.forceFrameName):this.#t.setAttribute(\"name\",t.encodeOptions({brokerUrl:this.brokerUrl,name:this.name,uuid:this.uuid,providerId:this.providerId,contextGroup:this.contextGroup},\"of-frame\")),this.#t.setAttribute(\"id\",this.name),this.appendChild(this.#t))}#t;get brokerUrl(){return this.getAttribute(\"of-broker\")}set brokerUrl(t){t&&this.setAttribute(\"of-broker\",t)}get name(){return this.getAttribute(\"of-name\")}set name(t){t&&this.setAttribute(\"of-name\",t)}get forceFrameName(){return this.getAttribute(\"forceFrameName\")}set forceFrameName(t){t&&this.setAttribute(\"forceFrameName\",t)}get uuid(){return this.getAttribute(\"of-uuid\")}set uuid(t){t&&this.setAttribute(\"of-uuid\",t)}get src(){return this.getAttribute(\"src\")}set src(t){t&&this.setAttribute(\"src\",t)}get providerId(){return this.getAttribute(\"of-provider-id\")}set providerId(t){t&&this.setAttribute(\"of-provider-id\",t)}get contextGroup(){return this.getAttribute(\"of-context-group\")}set contextGroup(t){t&&this.setAttribute(\"of-context-group\",t)}static get observedAttributes(){return[\"name\"]}};class Le{static create(t){const e=document.createElement(\"of-view\");return Object.entries(t).forEach((([t,i])=>{e.setAttribute(t,i)})),e}}customElements.define(\"of-view\",xe(HTMLElement));class ze{constructor(t,i,n,{brokerUrl:o,interopConfig:s},r){this.container=t,this.config=i,this.ofView=null,this.isDragging=()=>this.container.tab.element?.className.includes(\"lm_dragging\")??!1;const{url:a,web:l,interop:h,name:d}=i||{},c=d??`internal-generated-view-${e.v4()}`;if(this.identity={uuid:n,name:c},this.container.element.setAttribute(\"of-name\",c),this.container.element.id=`container-${c}`,this.container.parent.id=c,void 0===a)return void this.handleUrlMissing();const m=this.updateTitleIfNotSet(a),u={\"of-broker\":o,\"of-uuid\":n,\"of-name\":c,src:a};l?.frameName&&(u.forceFrameName=l.frameName);const p=h?.currentContextGroup??s?.currentContextGroup;p&&(u[\"of-context-group\"]=p),s?.providerId&&(u[\"of-provider-id\"]=s?.providerId),this.ofView=Le.create(u),this.ofView.title=m??`Iframe: ${a}`,r.appendChild(this.ofView),this.ofView.style.position=\"absolute\"}updateTitleIfNotSet(t){return\"view\"===this.container.parent.title&&this.container.parent.setTitle(t),this.container.parent.title}handleUrlMissing(){const t=document.createElement(\"div\");t.setAttribute(\"style\",\"padding: 20px\");t.innerText=\"No URL provided\",this.container.element.appendChild(t)}destroy(){this.ofView?.remove(),this.ofView=null}closeView(){this.container.close()}resize(){if(this.ofView){if(this.isDragging())return void(this.ofView.style.display=\"none\");const t=this.container.element.getBoundingClientRect();this.ofView.style.position=\"absolute\",this.ofView.style.height=`${t.height}px`,this.ofView.style.width=`${t.width}px`,this.ofView.style.inset=`${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`,this.ofView.style.display=\"block\"}}}class Me extends U{static overrideConfig(t){const e={...ue,...t.settings,...pe};return e.reorderEnabled?be(t.content,{isClosable:!0}):be(t.content,{reorderEnabled:!1}),{dimensions:me,...t,settings:e,header:{...ce,show:!1!==t.settings?.hasHeaders&&ce.show}}}constructor(t,e,i,{options:n},o,s){super(),this.identity=t,this.container=e,this.initialConfig=i,this.layoutManager=o,this.platformProvider=s,this.viewComponentsByContainerElement=new Map,this.layoutContentCache=_.getSingleInstance(),this.reparentingViews=new Set,this.goldenLayoutDestroyed=!1,this.createViewComponent=(t,e)=>{m.handleSharedView(this.layoutManager,this.identity,e);const i=new ze(t,e,this.identity.uuid,this.options,this.iframeContainer);return e&&!1===e[`${de}isClosable`]&&this.stylesheet.insertRule(`#tab-${i.identity.name} .lm_close_tab { display: none; }`),this.viewComponentsByContainerElement.set(t.element,i),this.resizeController.observeContainer(t.element),i},this.iframeContainer=document.createElement(\"div\"),this.iframeContainer.id=`openfin-layout-iframe-container-${this.identity.layoutName}`,this.domEmitter=new V(e),this.setupStylesheets(),this.layout=new he(this.container),this.layout.resizeWithContainerAutomatically=!0,this.options=n,this.layout.registerComponent(\"view\",this.createViewComponent),this.setupListeners(),this.resizeController=new ve(this),this.layout.loadLayout(Me.overrideConfig(i));const r=document.createElement(\"div\");r.id=`openfin-layout-shadow-container-${this.identity.layoutName}`,r.attachShadow({mode:\"open\",delegatesFocus:!1}).appendChild(this.iframeContainer),this.container.appendChild(r),this.resizeController.observeMutations(this.container)}getStackByView({name:t}){const e=this.layout.findFirstComponentItemById(t);if(e?.parent&&e?.parent?.isStack)return Ie.wrap(e.parent,this)}getRoot(){return Ie.wrap(this.layout.rootItem,this)}async platformCloseView(t){const e=[...this.viewComponentsByContainerElement.values()].find((e=>e.identity.name===t.name));if(!e)throw new Error(`View with name: ${t.name} not found in layout.`);e.closeView()}async platformCreateView(t,{location:e,targetView:i}={}){if(i)throw new Error(\"TargetView not supported in web\");const n={options:this.platformProvider.normalizeOptions(t),target:this.identity,location:e};return this.insertView(n)}setupStylesheets(){if(this.container.setAttribute(\"data-openfin-layout-name\",this.identity.layoutName),this.stylesheet=new CSSStyleSheet,this.stylesheet.insertRule(\".lm_close { display: none; }\"),document.adoptedStyleSheets.push(this.stylesheet),this.initialConfig.settings?.preventSplitterResize){const t=`\\n [data-openfin-layout-name='${this.identity.layoutName}'] .lm_splitter {\\n pointer-events: none;\\n }`;this.stylesheet.insertRule(t)}}insertView({options:t,location:e,targetView:i}){const n=e?this.layoutContentCache.getItemOrUndefined(e.id):void 0,o=i?this.layoutContentCache.getItemOrUndefined(i.name):void 0,s=n??o??Ie.wrap(this.layout.rootItem,this);let r;if(ee.isStack(s.raw))r=s.raw;else{if(!we(s.raw))throw new Error(\"Cannot add a view at the requested location\");r=s.raw.newItem({type:\"stack\",content:[]})}const a=Math.min(r.contentItems.length,e?.index??r.contentItems.length);let l=this.layout.findFirstComponentItemById(t.name);l?(l.parent&&l.parent.removeChild(l,!0),r.addChild(l,a)):l=r.newComponent(\"view\",t,t.title??t.url??\"Default Title\",a);const h=l.component.identity;return Promise.resolve({identity:h})}replaceView({viewToReplace:t,newView:e}){throw new Error(\"Method not implemented.\")}replaceLayout(t){throw new Error(\"Method not implemented.\")}async cleanupView(t){}applyPreset(t){throw new Error(\"Method not implemented.\")}getCurrentViews(){return[...this.viewComponentsByContainerElement.values()].map((t=>t.identity))}async getFrameSnapshot(){return Ee(xt.fromResolved(this.layout.toConfig()))}isVisible(){return W(this.container)}async onViewDetached({viewIdentity:t}){this.reparentingViews.add(t.name),this.platformCloseView(t)}async destroy(){this.goldenLayoutDestroyed||(this.goldenLayoutDestroyed=!0,this.layout.destroy()),this.iframeContainer.remove(),this.resizeController.destroy(),document.adoptedStyleSheets=document.adoptedStyleSheets.filter((t=>t!==this.stylesheet)),this.viewComponentsByContainerElement.clear()}setupListeners(){this.container.addEventListener(\"pointerdown\",(t=>{if(t.target instanceof HTMLElement){const e=t.target.classList;[\"lm_tab\",\"lm_title\",\"lm_splitter\",\"lm_drag_handle\"].some((t=>e.contains(t)))&&(this.handleDragStart(),2===t.button&&t.stopPropagation())}}),!0),document.addEventListener(\"pointerup\",(()=>this.handleDragEnd()),!0),this.layout.on(\"tabCreated\",(t=>{const e=t.componentItem.component;t.element.id=`tab-${e.identity.name}`,this.domEmitter.dispatchLocalEvent(\"tab-created\",e.identity)})),this.layout.on(\"itemCreated\",(({target:t})=>{const e=t;if(Gt.isComponentItem(e)){const t=e.component;this.domEmitter.dispatchLocalEvent(\"container-created\",t.identity)}})),this.layout.on(\"itemDestroyed\",(t=>{const e=t.target;if(Gt.isComponentItem(e)){const t=e.component;this.removeViewComponent(t)}})),this.layout.on(\"itemDropped\",(()=>{this.handleDragEnd()}))}handleDragStart(){this.iframeContainer.style.pointerEvents=\"none\"}handleDragEnd(){this.iframeContainer.style.pointerEvents=\"\"}removeViewComponent(t){if(t.config&&!1===t.config[`${de}isClosable`]){const e=[...this.stylesheet.cssRules].findIndex((e=>e.cssText.includes(`#tab-${t.identity.name}`)));this.stylesheet.deleteRule(e)}t.destroy(),this.viewComponentsByContainerElement.delete(t.container.element),this.resizeController.unobserveContainer(t.container.element),this.reparentingViews.has(t.identity.name)?this.reparentingViews.delete(t.identity.name):this.platformProvider.closeView(t.identity.name);0===this.getCurrentViews().length&&(this.goldenLayoutDestroyed||(this.goldenLayoutDestroyed=!0,m.handleLastViewRemoved(this.layoutManager,this.identity)))}}class Pe{constructor(t,e,i,n){this.windowIdentity=t,this.connectConfig=e,this.provider=i,this.fallbackContainer=n}async createLayout(t,e){if(!(\"container\"in t)&&!this.fallbackContainer)throw new Error(\"Container property is not optional in web\");const{layoutName:i}=t,n=t,o=this.provider.initLayoutViews(n),s=n.container??this.fallbackContainer,r={...this.windowIdentity,layoutName:i},a=new Me(r,s,o,this.connectConfig,e,this.provider);m.registerLayout(e,i,a),this.fallbackContainer=null}async getLayoutSnapshot(t){return t.getLayoutSnapshot()}async handleLastViewRemoved(t){}}class Te{static async init(e){const i=e.getFin().InterApplicationBus.Channel,n=await i.create(`custom-frame-${e.me.uuid}`);return n.setDefaultAction((async(t,{target:e,opts:i},o)=>{const s=n.connections.find((t=>t.name===e.name));if(s)return n.dispatch(s,t,{...i,target:e});throw new Error(`Client with name ${e.name} not found`)})),await t.relayChannelClientApi_1(n,\"layout-relay\"),new Te(e)}constructor(t){this.wire=t,this.viewNames=new Set}normalizeOptions(t,i=\"default\"){const n=this.wire.me.uuid;let{name:o=`internal-generated-view-${e.v4()}`}=t;return o.match(/^internal-generated-view-/)&&this.viewNames.has(o)&&\"duplicate\"===i&&(o=`internal-generated-view-${e.v4()}`),this.viewNames.add(o),{...t,name:o,uuid:n}}closeView(t){this.viewNames.delete(t)}initLayoutViews({layout:t,multiInstanceViewBehavior:e}){return H((t=>{if(\"component\"===t.type&&t.componentState){const i=this.normalizeOptions(t.componentState,e);return{...t,componentState:i}}return t}),t)}}var Ae;const ke=t=>t;Ae=new WeakMap,exports.WebLayoutEntryPoint=class{constructor(e){Ae.set(this,void 0),this.initLayoutManager=async(e,i,{container:n,layoutManagerOverride:o})=>{const s=await Te.init(i),r=o??ke,a=new Pe(i.me,t.__classPrivateFieldGet(this,Ae,\"f\"),s,n),l=new(r(m.createClosedConstructor(a)));return await M(i,l),l},this.applyLayoutSnapshot=async(e,i,n)=>{await i.applyLayoutSnapshot(t.__classPrivateFieldGet(this,Ae,\"f\").platform.layoutSnapshot)},this.createLayout=async(t,e)=>m.createLayout(t,e),this.destroyLayout=async(t,e)=>m.destroyLayout(t,e),t.__classPrivateFieldSet(this,Ae,e,\"f\")}};\n","'use strict'\n\nexports.byteLength = byteLength\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\nfor (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i]\n revLookup[code.charCodeAt(i)] = i\n}\n\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction getLens (b64) {\n var len = b64.length\n\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // Trim off extra bytes after placeholder bytes are found\n // See: https://github.com/beatgammit/base64-js/issues/42\n var validLen = b64.indexOf('=')\n if (validLen === -1) validLen = len\n\n var placeHoldersLen = validLen === len\n ? 0\n : 4 - (validLen % 4)\n\n return [validLen, placeHoldersLen]\n}\n\n// base64 is 4/3 + up to two characters of the original data\nfunction byteLength (b64) {\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction _byteLength (b64, validLen, placeHoldersLen) {\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction toByteArray (b64) {\n var tmp\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n\n var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))\n\n var curByte = 0\n\n // if there are placeholders, only get up to the last complete 4 chars\n var len = placeHoldersLen > 0\n ? validLen - 4\n : validLen\n\n var i\n for (i = 0; i < len; i += 4) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 18) |\n (revLookup[b64.charCodeAt(i + 1)] << 12) |\n (revLookup[b64.charCodeAt(i + 2)] << 6) |\n revLookup[b64.charCodeAt(i + 3)]\n arr[curByte++] = (tmp >> 16) & 0xFF\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 2) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 2) |\n (revLookup[b64.charCodeAt(i + 1)] >> 4)\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 1) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 10) |\n (revLookup[b64.charCodeAt(i + 1)] << 4) |\n (revLookup[b64.charCodeAt(i + 2)] >> 2)\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] +\n lookup[num >> 12 & 0x3F] +\n lookup[num >> 6 & 0x3F] +\n lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n var tmp\n var output = []\n for (var i = start; i < end; i += 3) {\n tmp =\n ((uint8[i] << 16) & 0xFF0000) +\n ((uint8[i + 1] << 8) & 0xFF00) +\n (uint8[i + 2] & 0xFF)\n output.push(tripletToBase64(tmp))\n }\n return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n var tmp\n var len = uint8.length\n var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n var parts = []\n var maxChunkLength = 16383 // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1]\n parts.push(\n lookup[tmp >> 2] +\n lookup[(tmp << 4) & 0x3F] +\n '=='\n )\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + uint8[len - 1]\n parts.push(\n lookup[tmp >> 10] +\n lookup[(tmp >> 4) & 0x3F] +\n lookup[(tmp << 2) & 0x3F] +\n '='\n )\n }\n\n return parts.join('')\n}\n","/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n/* eslint-disable no-proto */\n\n'use strict'\n\nconst base64 = require('base64-js')\nconst ieee754 = require('ieee754')\nconst customInspectSymbol =\n (typeof Symbol === 'function' && typeof Symbol['for'] === 'function') // eslint-disable-line dot-notation\n ? Symbol['for']('nodejs.util.inspect.custom') // eslint-disable-line dot-notation\n : null\n\nexports.Buffer = Buffer\nexports.SlowBuffer = SlowBuffer\nexports.INSPECT_MAX_BYTES = 50\n\nconst K_MAX_LENGTH = 0x7fffffff\nexports.kMaxLength = K_MAX_LENGTH\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Print warning and recommend using `buffer` v4.x which has an Object\n * implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * We report that the browser does not support typed arrays if the are not subclassable\n * using __proto__. Firefox 4-29 lacks support for adding new properties to `Uint8Array`\n * (See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438). IE 10 lacks support\n * for __proto__ and has a buggy typed array implementation.\n */\nBuffer.TYPED_ARRAY_SUPPORT = typedArraySupport()\n\nif (!Buffer.TYPED_ARRAY_SUPPORT && typeof console !== 'undefined' &&\n typeof console.error === 'function') {\n console.error(\n 'This browser lacks typed array (Uint8Array) support which is required by ' +\n '`buffer` v5.x. Use `buffer` v4.x if you require old browser support.'\n )\n}\n\nfunction typedArraySupport () {\n // Can typed array instances can be augmented?\n try {\n const arr = new Uint8Array(1)\n const proto = { foo: function () { return 42 } }\n Object.setPrototypeOf(proto, Uint8Array.prototype)\n Object.setPrototypeOf(arr, proto)\n return arr.foo() === 42\n } catch (e) {\n return false\n }\n}\n\nObject.defineProperty(Buffer.prototype, 'parent', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.buffer\n }\n})\n\nObject.defineProperty(Buffer.prototype, 'offset', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.byteOffset\n }\n})\n\nfunction createBuffer (length) {\n if (length > K_MAX_LENGTH) {\n throw new RangeError('The value \"' + length + '\" is invalid for option \"size\"')\n }\n // Return an augmented `Uint8Array` instance\n const buf = new Uint8Array(length)\n Object.setPrototypeOf(buf, Buffer.prototype)\n return buf\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new TypeError(\n 'The \"string\" argument must be of type string. Received type number'\n )\n }\n return allocUnsafe(arg)\n }\n return from(arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\nfunction from (value, encodingOrOffset, length) {\n if (typeof value === 'string') {\n return fromString(value, encodingOrOffset)\n }\n\n if (ArrayBuffer.isView(value)) {\n return fromArrayView(value)\n }\n\n if (value == null) {\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n }\n\n if (isInstance(value, ArrayBuffer) ||\n (value && isInstance(value.buffer, ArrayBuffer))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof SharedArrayBuffer !== 'undefined' &&\n (isInstance(value, SharedArrayBuffer) ||\n (value && isInstance(value.buffer, SharedArrayBuffer)))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof value === 'number') {\n throw new TypeError(\n 'The \"value\" argument must not be of type number. Received type number'\n )\n }\n\n const valueOf = value.valueOf && value.valueOf()\n if (valueOf != null && valueOf !== value) {\n return Buffer.from(valueOf, encodingOrOffset, length)\n }\n\n const b = fromObject(value)\n if (b) return b\n\n if (typeof Symbol !== 'undefined' && Symbol.toPrimitive != null &&\n typeof value[Symbol.toPrimitive] === 'function') {\n return Buffer.from(value[Symbol.toPrimitive]('string'), encodingOrOffset, length)\n }\n\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n return from(value, encodingOrOffset, length)\n}\n\n// Note: Change prototype *after* Buffer.from is defined to workaround Chrome bug:\n// https://github.com/feross/buffer/pull/148\nObject.setPrototypeOf(Buffer.prototype, Uint8Array.prototype)\nObject.setPrototypeOf(Buffer, Uint8Array)\n\nfunction assertSize (size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be of type number')\n } else if (size < 0) {\n throw new RangeError('The value \"' + size + '\" is invalid for option \"size\"')\n }\n}\n\nfunction alloc (size, fill, encoding) {\n assertSize(size)\n if (size <= 0) {\n return createBuffer(size)\n }\n if (fill !== undefined) {\n // Only pay attention to encoding if it's a string. This\n // prevents accidentally sending in a number that would\n // be interpreted as a start offset.\n return typeof encoding === 'string'\n ? createBuffer(size).fill(fill, encoding)\n : createBuffer(size).fill(fill)\n }\n return createBuffer(size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n return alloc(size, fill, encoding)\n}\n\nfunction allocUnsafe (size) {\n assertSize(size)\n return createBuffer(size < 0 ? 0 : checked(size) | 0)\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n return allocUnsafe(size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n return allocUnsafe(size)\n}\n\nfunction fromString (string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8'\n }\n\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n\n const length = byteLength(string, encoding) | 0\n let buf = createBuffer(length)\n\n const actual = buf.write(string, encoding)\n\n if (actual !== length) {\n // Writing a hex string, for example, that contains invalid characters will\n // cause everything after the first invalid character to be ignored. (e.g.\n // 'abxxcd' will be treated as 'ab')\n buf = buf.slice(0, actual)\n }\n\n return buf\n}\n\nfunction fromArrayLike (array) {\n const length = array.length < 0 ? 0 : checked(array.length) | 0\n const buf = createBuffer(length)\n for (let i = 0; i < length; i += 1) {\n buf[i] = array[i] & 255\n }\n return buf\n}\n\nfunction fromArrayView (arrayView) {\n if (isInstance(arrayView, Uint8Array)) {\n const copy = new Uint8Array(arrayView)\n return fromArrayBuffer(copy.buffer, copy.byteOffset, copy.byteLength)\n }\n return fromArrayLike(arrayView)\n}\n\nfunction fromArrayBuffer (array, byteOffset, length) {\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\"offset\" is outside of buffer bounds')\n }\n\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\"length\" is outside of buffer bounds')\n }\n\n let buf\n if (byteOffset === undefined && length === undefined) {\n buf = new Uint8Array(array)\n } else if (length === undefined) {\n buf = new Uint8Array(array, byteOffset)\n } else {\n buf = new Uint8Array(array, byteOffset, length)\n }\n\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(buf, Buffer.prototype)\n\n return buf\n}\n\nfunction fromObject (obj) {\n if (Buffer.isBuffer(obj)) {\n const len = checked(obj.length) | 0\n const buf = createBuffer(len)\n\n if (buf.length === 0) {\n return buf\n }\n\n obj.copy(buf, 0, 0, len)\n return buf\n }\n\n if (obj.length !== undefined) {\n if (typeof obj.length !== 'number' || numberIsNaN(obj.length)) {\n return createBuffer(0)\n }\n return fromArrayLike(obj)\n }\n\n if (obj.type === 'Buffer' && Array.isArray(obj.data)) {\n return fromArrayLike(obj.data)\n }\n}\n\nfunction checked (length) {\n // Note: cannot use `length < K_MAX_LENGTH` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= K_MAX_LENGTH) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + K_MAX_LENGTH.toString(16) + ' bytes')\n }\n return length | 0\n}\n\nfunction SlowBuffer (length) {\n if (+length != length) { // eslint-disable-line eqeqeq\n length = 0\n }\n return Buffer.alloc(+length)\n}\n\nBuffer.isBuffer = function isBuffer (b) {\n return b != null && b._isBuffer === true &&\n b !== Buffer.prototype // so Buffer.isBuffer(Buffer.prototype) will be false\n}\n\nBuffer.compare = function compare (a, b) {\n if (isInstance(a, Uint8Array)) a = Buffer.from(a, a.offset, a.byteLength)\n if (isInstance(b, Uint8Array)) b = Buffer.from(b, b.offset, b.byteLength)\n if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n throw new TypeError(\n 'The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array'\n )\n }\n\n if (a === b) return 0\n\n let x = a.length\n let y = b.length\n\n for (let i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i]\n y = b[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n switch (String(encoding).toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'latin1':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return true\n default:\n return false\n }\n}\n\nBuffer.concat = function concat (list, length) {\n if (!Array.isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n\n if (list.length === 0) {\n return Buffer.alloc(0)\n }\n\n let i\n if (length === undefined) {\n length = 0\n for (i = 0; i < list.length; ++i) {\n length += list[i].length\n }\n }\n\n const buffer = Buffer.allocUnsafe(length)\n let pos = 0\n for (i = 0; i < list.length; ++i) {\n let buf = list[i]\n if (isInstance(buf, Uint8Array)) {\n if (pos + buf.length > buffer.length) {\n if (!Buffer.isBuffer(buf)) buf = Buffer.from(buf)\n buf.copy(buffer, pos)\n } else {\n Uint8Array.prototype.set.call(\n buffer,\n buf,\n pos\n )\n }\n } else if (!Buffer.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n } else {\n buf.copy(buffer, pos)\n }\n pos += buf.length\n }\n return buffer\n}\n\nfunction byteLength (string, encoding) {\n if (Buffer.isBuffer(string)) {\n return string.length\n }\n if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) {\n return string.byteLength\n }\n if (typeof string !== 'string') {\n throw new TypeError(\n 'The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. ' +\n 'Received type ' + typeof string\n )\n }\n\n const len = string.length\n const mustMatch = (arguments.length > 2 && arguments[2] === true)\n if (!mustMatch && len === 0) return 0\n\n // Use a for loop to avoid recursion\n let loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'ascii':\n case 'latin1':\n case 'binary':\n return len\n case 'utf8':\n case 'utf-8':\n return utf8ToBytes(string).length\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return len * 2\n case 'hex':\n return len >>> 1\n case 'base64':\n return base64ToBytes(string).length\n default:\n if (loweredCase) {\n return mustMatch ? -1 : utf8ToBytes(string).length // assume utf8\n }\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n let loweredCase = false\n\n // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n // property of a typed array.\n\n // This behaves neither like String nor Uint8Array in that we set start/end\n // to their upper/lower bounds if the value passed is out of range.\n // undefined is handled specially as per ECMA-262 6th Edition,\n // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n if (start === undefined || start < 0) {\n start = 0\n }\n // Return early if start > this.length. Done here to prevent potential uint32\n // coercion fail below.\n if (start > this.length) {\n return ''\n }\n\n if (end === undefined || end > this.length) {\n end = this.length\n }\n\n if (end <= 0) {\n return ''\n }\n\n // Force coercion to uint32. This will also coerce falsey/NaN values to 0.\n end >>>= 0\n start >>>= 0\n\n if (end <= start) {\n return ''\n }\n\n if (!encoding) encoding = 'utf8'\n\n while (true) {\n switch (encoding) {\n case 'hex':\n return hexSlice(this, start, end)\n\n case 'utf8':\n case 'utf-8':\n return utf8Slice(this, start, end)\n\n case 'ascii':\n return asciiSlice(this, start, end)\n\n case 'latin1':\n case 'binary':\n return latin1Slice(this, start, end)\n\n case 'base64':\n return base64Slice(this, start, end)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return utf16leSlice(this, start, end)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = (encoding + '').toLowerCase()\n loweredCase = true\n }\n }\n}\n\n// This property is used by `Buffer.isBuffer` (and the `is-buffer` npm package)\n// to detect a Buffer instance. It's not possible to use `instanceof Buffer`\n// reliably in a browserify context because there could be multiple different\n// copies of the 'buffer' package in use. This method works even for Buffer\n// instances that were created from another copy of the `buffer` package.\n// See: https://github.com/feross/buffer/issues/154\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n const i = b[n]\n b[n] = b[m]\n b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n const len = this.length\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits')\n }\n for (let i = 0; i < len; i += 2) {\n swap(this, i, i + 1)\n }\n return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n const len = this.length\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits')\n }\n for (let i = 0; i < len; i += 4) {\n swap(this, i, i + 3)\n swap(this, i + 1, i + 2)\n }\n return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n const len = this.length\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits')\n }\n for (let i = 0; i < len; i += 8) {\n swap(this, i, i + 7)\n swap(this, i + 1, i + 6)\n swap(this, i + 2, i + 5)\n swap(this, i + 3, i + 4)\n }\n return this\n}\n\nBuffer.prototype.toString = function toString () {\n const length = this.length\n if (length === 0) return ''\n if (arguments.length === 0) return utf8Slice(this, 0, length)\n return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.toLocaleString = Buffer.prototype.toString\n\nBuffer.prototype.equals = function equals (b) {\n if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n if (this === b) return true\n return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n let str = ''\n const max = exports.INSPECT_MAX_BYTES\n str = this.toString('hex', 0, max).replace(/(.{2})/g, '$1 ').trim()\n if (this.length > max) str += ' ... '\n return ''\n}\nif (customInspectSymbol) {\n Buffer.prototype[customInspectSymbol] = Buffer.prototype.inspect\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n if (isInstance(target, Uint8Array)) {\n target = Buffer.from(target, target.offset, target.byteLength)\n }\n if (!Buffer.isBuffer(target)) {\n throw new TypeError(\n 'The \"target\" argument must be one of type Buffer or Uint8Array. ' +\n 'Received type ' + (typeof target)\n )\n }\n\n if (start === undefined) {\n start = 0\n }\n if (end === undefined) {\n end = target ? target.length : 0\n }\n if (thisStart === undefined) {\n thisStart = 0\n }\n if (thisEnd === undefined) {\n thisEnd = this.length\n }\n\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError('out of range index')\n }\n\n if (thisStart >= thisEnd && start >= end) {\n return 0\n }\n if (thisStart >= thisEnd) {\n return -1\n }\n if (start >= end) {\n return 1\n }\n\n start >>>= 0\n end >>>= 0\n thisStart >>>= 0\n thisEnd >>>= 0\n\n if (this === target) return 0\n\n let x = thisEnd - thisStart\n let y = end - start\n const len = Math.min(x, y)\n\n const thisCopy = this.slice(thisStart, thisEnd)\n const targetCopy = target.slice(start, end)\n\n for (let i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i]\n y = targetCopy[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (numberIsNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [val], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n let indexSize = 1\n let arrLength = arr.length\n let valLength = val.length\n\n if (encoding !== undefined) {\n encoding = String(encoding).toLowerCase()\n if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n encoding === 'utf16le' || encoding === 'utf-16le') {\n if (arr.length < 2 || val.length < 2) {\n return -1\n }\n indexSize = 2\n arrLength /= 2\n valLength /= 2\n byteOffset /= 2\n }\n }\n\n function read (buf, i) {\n if (indexSize === 1) {\n return buf[i]\n } else {\n return buf.readUInt16BE(i * indexSize)\n }\n }\n\n let i\n if (dir) {\n let foundIndex = -1\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1) foundIndex = i\n if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n } else {\n if (foundIndex !== -1) i -= i - foundIndex\n foundIndex = -1\n }\n }\n } else {\n if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n for (i = byteOffset; i >= 0; i--) {\n let found = true\n for (let j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false\n break\n }\n }\n if (found) return i\n }\n }\n\n return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n offset = Number(offset) || 0\n const remaining = buf.length - offset\n if (!length) {\n length = remaining\n } else {\n length = Number(length)\n if (length > remaining) {\n length = remaining\n }\n }\n\n const strLen = string.length\n\n if (length > strLen / 2) {\n length = strLen / 2\n }\n let i\n for (i = 0; i < length; ++i) {\n const parsed = parseInt(string.substr(i * 2, 2), 16)\n if (numberIsNaN(parsed)) return i\n buf[offset + i] = parsed\n }\n return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n // Buffer#write(string)\n if (offset === undefined) {\n encoding = 'utf8'\n length = this.length\n offset = 0\n // Buffer#write(string, encoding)\n } else if (length === undefined && typeof offset === 'string') {\n encoding = offset\n length = this.length\n offset = 0\n // Buffer#write(string, offset[, length][, encoding])\n } else if (isFinite(offset)) {\n offset = offset >>> 0\n if (isFinite(length)) {\n length = length >>> 0\n if (encoding === undefined) encoding = 'utf8'\n } else {\n encoding = length\n length = undefined\n }\n } else {\n throw new Error(\n 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n )\n }\n\n const remaining = this.length - offset\n if (length === undefined || length > remaining) length = remaining\n\n if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n throw new RangeError('Attempt to write outside buffer bounds')\n }\n\n if (!encoding) encoding = 'utf8'\n\n let loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'hex':\n return hexWrite(this, string, offset, length)\n\n case 'utf8':\n case 'utf-8':\n return utf8Write(this, string, offset, length)\n\n case 'ascii':\n case 'latin1':\n case 'binary':\n return asciiWrite(this, string, offset, length)\n\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return base64Write(this, string, offset, length)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return ucs2Write(this, string, offset, length)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0)\n }\n}\n\nfunction base64Slice (buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf)\n } else {\n return base64.fromByteArray(buf.slice(start, end))\n }\n}\n\nfunction utf8Slice (buf, start, end) {\n end = Math.min(buf.length, end)\n const res = []\n\n let i = start\n while (i < end) {\n const firstByte = buf[i]\n let codePoint = null\n let bytesPerSequence = (firstByte > 0xEF)\n ? 4\n : (firstByte > 0xDF)\n ? 3\n : (firstByte > 0xBF)\n ? 2\n : 1\n\n if (i + bytesPerSequence <= end) {\n let secondByte, thirdByte, fourthByte, tempCodePoint\n\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 0x80) {\n codePoint = firstByte\n }\n break\n case 2:\n secondByte = buf[i + 1]\n if ((secondByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n if (tempCodePoint > 0x7F) {\n codePoint = tempCodePoint\n }\n }\n break\n case 3:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n codePoint = tempCodePoint\n }\n }\n break\n case 4:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n fourthByte = buf[i + 3]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n codePoint = tempCodePoint\n }\n }\n }\n }\n\n if (codePoint === null) {\n // we did not generate a valid codePoint so insert a\n // replacement char (U+FFFD) and advance only 1 byte\n codePoint = 0xFFFD\n bytesPerSequence = 1\n } else if (codePoint > 0xFFFF) {\n // encode to utf16 (surrogate pair dance)\n codePoint -= 0x10000\n res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n codePoint = 0xDC00 | codePoint & 0x3FF\n }\n\n res.push(codePoint)\n i += bytesPerSequence\n }\n\n return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nconst MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n const len = codePoints.length\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n }\n\n // Decode in chunks to avoid \"call stack size exceeded\".\n let res = ''\n let i = 0\n while (i < len) {\n res += String.fromCharCode.apply(\n String,\n codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n )\n }\n return res\n}\n\nfunction asciiSlice (buf, start, end) {\n let ret = ''\n end = Math.min(buf.length, end)\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F)\n }\n return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n let ret = ''\n end = Math.min(buf.length, end)\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i])\n }\n return ret\n}\n\nfunction hexSlice (buf, start, end) {\n const len = buf.length\n\n if (!start || start < 0) start = 0\n if (!end || end < 0 || end > len) end = len\n\n let out = ''\n for (let i = start; i < end; ++i) {\n out += hexSliceLookupTable[buf[i]]\n }\n return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n const bytes = buf.slice(start, end)\n let res = ''\n // If bytes.length is odd, the last 8 bits must be ignored (same as node.js)\n for (let i = 0; i < bytes.length - 1; i += 2) {\n res += String.fromCharCode(bytes[i] + (bytes[i + 1] * 256))\n }\n return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n const len = this.length\n start = ~~start\n end = end === undefined ? len : ~~end\n\n if (start < 0) {\n start += len\n if (start < 0) start = 0\n } else if (start > len) {\n start = len\n }\n\n if (end < 0) {\n end += len\n if (end < 0) end = 0\n } else if (end > len) {\n end = len\n }\n\n if (end < start) end = start\n\n const newBuf = this.subarray(start, end)\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(newBuf, Buffer.prototype)\n\n return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUintLE =\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let val = this[offset]\n let mul = 1\n let i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUintBE =\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n checkOffset(offset, byteLength, this.length)\n }\n\n let val = this[offset + --byteLength]\n let mul = 1\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUint8 =\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n return this[offset]\n}\n\nBuffer.prototype.readUint16LE =\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUint16BE =\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUint32LE =\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return ((this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16)) +\n (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUint32BE =\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] * 0x1000000) +\n ((this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n this[offset + 3])\n}\n\nBuffer.prototype.readBigUInt64LE = defineBigIntMethod(function readBigUInt64LE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const lo = first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24\n\n const hi = this[++offset] +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n last * 2 ** 24\n\n return BigInt(lo) + (BigInt(hi) << BigInt(32))\n})\n\nBuffer.prototype.readBigUInt64BE = defineBigIntMethod(function readBigUInt64BE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const hi = first * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset]\n\n const lo = this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last\n\n return (BigInt(hi) << BigInt(32)) + BigInt(lo)\n})\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let val = this[offset]\n let mul = 1\n let i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let i = byteLength\n let mul = 1\n let val = this[offset + --i]\n while (i > 0 && (mul *= 0x100)) {\n val += this[offset + --i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n if (!(this[offset] & 0x80)) return (this[offset])\n return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n const val = this[offset] | (this[offset + 1] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n const val = this[offset + 1] | (this[offset] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16) |\n (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] << 24) |\n (this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n (this[offset + 3])\n}\n\nBuffer.prototype.readBigInt64LE = defineBigIntMethod(function readBigInt64LE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const val = this[offset + 4] +\n this[offset + 5] * 2 ** 8 +\n this[offset + 6] * 2 ** 16 +\n (last << 24) // Overflow\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24)\n})\n\nBuffer.prototype.readBigInt64BE = defineBigIntMethod(function readBigInt64BE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const val = (first << 24) + // Overflow\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset]\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last)\n})\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUintLE =\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n let mul = 1\n let i = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUintBE =\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n let i = byteLength - 1\n let mul = 1\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUint8 =\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeUint16LE =\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeUint16BE =\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeUint32LE =\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset + 3] = (value >>> 24)\n this[offset + 2] = (value >>> 16)\n this[offset + 1] = (value >>> 8)\n this[offset] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeUint32BE =\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nfunction wrtBigUInt64LE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7)\n\n let lo = Number(value & BigInt(0xffffffff))\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n return offset\n}\n\nfunction wrtBigUInt64BE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7)\n\n let lo = Number(value & BigInt(0xffffffff))\n buf[offset + 7] = lo\n lo = lo >> 8\n buf[offset + 6] = lo\n lo = lo >> 8\n buf[offset + 5] = lo\n lo = lo >> 8\n buf[offset + 4] = lo\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n buf[offset + 3] = hi\n hi = hi >> 8\n buf[offset + 2] = hi\n hi = hi >> 8\n buf[offset + 1] = hi\n hi = hi >> 8\n buf[offset] = hi\n return offset + 8\n}\n\nBuffer.prototype.writeBigUInt64LE = defineBigIntMethod(function writeBigUInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeBigUInt64BE = defineBigIntMethod(function writeBigUInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n let i = 0\n let mul = 1\n let sub = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n let i = byteLength - 1\n let mul = 1\n let sub = 0\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n if (value < 0) value = 0xff + value + 1\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n this[offset + 2] = (value >>> 16)\n this[offset + 3] = (value >>> 24)\n return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (value < 0) value = 0xffffffff + value + 1\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeBigInt64LE = defineBigIntMethod(function writeBigInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nBuffer.prototype.writeBigInt64BE = defineBigIntMethod(function writeBigInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n }\n ieee754.write(buf, value, offset, littleEndian, 23, 4)\n return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n }\n ieee754.write(buf, value, offset, littleEndian, 52, 8)\n return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n if (!Buffer.isBuffer(target)) throw new TypeError('argument should be a Buffer')\n if (!start) start = 0\n if (!end && end !== 0) end = this.length\n if (targetStart >= target.length) targetStart = target.length\n if (!targetStart) targetStart = 0\n if (end > 0 && end < start) end = start\n\n // Copy 0 bytes; we're done\n if (end === start) return 0\n if (target.length === 0 || this.length === 0) return 0\n\n // Fatal error conditions\n if (targetStart < 0) {\n throw new RangeError('targetStart out of bounds')\n }\n if (start < 0 || start >= this.length) throw new RangeError('Index out of range')\n if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n // Are we oob?\n if (end > this.length) end = this.length\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start\n }\n\n const len = end - start\n\n if (this === target && typeof Uint8Array.prototype.copyWithin === 'function') {\n // Use built-in when available, missing from IE11\n this.copyWithin(targetStart, start, end)\n } else {\n Uint8Array.prototype.set.call(\n target,\n this.subarray(start, end),\n targetStart\n )\n }\n\n return len\n}\n\n// Usage:\n// buffer.fill(number[, offset[, end]])\n// buffer.fill(buffer[, offset[, end]])\n// buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n // Handle string cases:\n if (typeof val === 'string') {\n if (typeof start === 'string') {\n encoding = start\n start = 0\n end = this.length\n } else if (typeof end === 'string') {\n encoding = end\n end = this.length\n }\n if (encoding !== undefined && typeof encoding !== 'string') {\n throw new TypeError('encoding must be a string')\n }\n if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n if (val.length === 1) {\n const code = val.charCodeAt(0)\n if ((encoding === 'utf8' && code < 128) ||\n encoding === 'latin1') {\n // Fast path: If `val` fits into a single byte, use that numeric value.\n val = code\n }\n }\n } else if (typeof val === 'number') {\n val = val & 255\n } else if (typeof val === 'boolean') {\n val = Number(val)\n }\n\n // Invalid ranges are not set to a default, so can range check early.\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError('Out of range index')\n }\n\n if (end <= start) {\n return this\n }\n\n start = start >>> 0\n end = end === undefined ? this.length : end >>> 0\n\n if (!val) val = 0\n\n let i\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val\n }\n } else {\n const bytes = Buffer.isBuffer(val)\n ? val\n : Buffer.from(val, encoding)\n const len = bytes.length\n if (len === 0) {\n throw new TypeError('The value \"' + val +\n '\" is invalid for argument \"value\"')\n }\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len]\n }\n }\n\n return this\n}\n\n// CUSTOM ERRORS\n// =============\n\n// Simplified versions from Node, changed for Buffer-only usage\nconst errors = {}\nfunction E (sym, getMessage, Base) {\n errors[sym] = class NodeError extends Base {\n constructor () {\n super()\n\n Object.defineProperty(this, 'message', {\n value: getMessage.apply(this, arguments),\n writable: true,\n configurable: true\n })\n\n // Add the error code to the name to include it in the stack trace.\n this.name = `${this.name} [${sym}]`\n // Access the stack to generate the error message including the error code\n // from the name.\n this.stack // eslint-disable-line no-unused-expressions\n // Reset the name to the actual name.\n delete this.name\n }\n\n get code () {\n return sym\n }\n\n set code (value) {\n Object.defineProperty(this, 'code', {\n configurable: true,\n enumerable: true,\n value,\n writable: true\n })\n }\n\n toString () {\n return `${this.name} [${sym}]: ${this.message}`\n }\n }\n}\n\nE('ERR_BUFFER_OUT_OF_BOUNDS',\n function (name) {\n if (name) {\n return `${name} is outside of buffer bounds`\n }\n\n return 'Attempt to access memory outside buffer bounds'\n }, RangeError)\nE('ERR_INVALID_ARG_TYPE',\n function (name, actual) {\n return `The \"${name}\" argument must be of type number. Received type ${typeof actual}`\n }, TypeError)\nE('ERR_OUT_OF_RANGE',\n function (str, range, input) {\n let msg = `The value of \"${str}\" is out of range.`\n let received = input\n if (Number.isInteger(input) && Math.abs(input) > 2 ** 32) {\n received = addNumericalSeparator(String(input))\n } else if (typeof input === 'bigint') {\n received = String(input)\n if (input > BigInt(2) ** BigInt(32) || input < -(BigInt(2) ** BigInt(32))) {\n received = addNumericalSeparator(received)\n }\n received += 'n'\n }\n msg += ` It must be ${range}. Received ${received}`\n return msg\n }, RangeError)\n\nfunction addNumericalSeparator (val) {\n let res = ''\n let i = val.length\n const start = val[0] === '-' ? 1 : 0\n for (; i >= start + 4; i -= 3) {\n res = `_${val.slice(i - 3, i)}${res}`\n }\n return `${val.slice(0, i)}${res}`\n}\n\n// CHECK FUNCTIONS\n// ===============\n\nfunction checkBounds (buf, offset, byteLength) {\n validateNumber(offset, 'offset')\n if (buf[offset] === undefined || buf[offset + byteLength] === undefined) {\n boundsError(offset, buf.length - (byteLength + 1))\n }\n}\n\nfunction checkIntBI (value, min, max, buf, offset, byteLength) {\n if (value > max || value < min) {\n const n = typeof min === 'bigint' ? 'n' : ''\n let range\n if (byteLength > 3) {\n if (min === 0 || min === BigInt(0)) {\n range = `>= 0${n} and < 2${n} ** ${(byteLength + 1) * 8}${n}`\n } else {\n range = `>= -(2${n} ** ${(byteLength + 1) * 8 - 1}${n}) and < 2 ** ` +\n `${(byteLength + 1) * 8 - 1}${n}`\n }\n } else {\n range = `>= ${min}${n} and <= ${max}${n}`\n }\n throw new errors.ERR_OUT_OF_RANGE('value', range, value)\n }\n checkBounds(buf, offset, byteLength)\n}\n\nfunction validateNumber (value, name) {\n if (typeof value !== 'number') {\n throw new errors.ERR_INVALID_ARG_TYPE(name, 'number', value)\n }\n}\n\nfunction boundsError (value, length, type) {\n if (Math.floor(value) !== value) {\n validateNumber(value, type)\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset', 'an integer', value)\n }\n\n if (length < 0) {\n throw new errors.ERR_BUFFER_OUT_OF_BOUNDS()\n }\n\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset',\n `>= ${type ? 1 : 0} and <= ${length}`,\n value)\n}\n\n// HELPER FUNCTIONS\n// ================\n\nconst INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n // Node takes equal signs as end of the Base64 encoding\n str = str.split('=')[0]\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = str.trim().replace(INVALID_BASE64_RE, '')\n // Node converts strings with length < 2 to ''\n if (str.length < 2) return ''\n // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n while (str.length % 4 !== 0) {\n str = str + '='\n }\n return str\n}\n\nfunction utf8ToBytes (string, units) {\n units = units || Infinity\n let codePoint\n const length = string.length\n let leadSurrogate = null\n const bytes = []\n\n for (let i = 0; i < length; ++i) {\n codePoint = string.charCodeAt(i)\n\n // is surrogate component\n if (codePoint > 0xD7FF && codePoint < 0xE000) {\n // last char was a lead\n if (!leadSurrogate) {\n // no lead yet\n if (codePoint > 0xDBFF) {\n // unexpected trail\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n } else if (i + 1 === length) {\n // unpaired lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n }\n\n // valid lead\n leadSurrogate = codePoint\n\n continue\n }\n\n // 2 leads in a row\n if (codePoint < 0xDC00) {\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n leadSurrogate = codePoint\n continue\n }\n\n // valid surrogate pair\n codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n } else if (leadSurrogate) {\n // valid bmp char, but last char was a lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n }\n\n leadSurrogate = null\n\n // encode utf8\n if (codePoint < 0x80) {\n if ((units -= 1) < 0) break\n bytes.push(codePoint)\n } else if (codePoint < 0x800) {\n if ((units -= 2) < 0) break\n bytes.push(\n codePoint >> 0x6 | 0xC0,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x10000) {\n if ((units -= 3) < 0) break\n bytes.push(\n codePoint >> 0xC | 0xE0,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x110000) {\n if ((units -= 4) < 0) break\n bytes.push(\n codePoint >> 0x12 | 0xF0,\n codePoint >> 0xC & 0x3F | 0x80,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else {\n throw new Error('Invalid code point')\n }\n }\n\n return bytes\n}\n\nfunction asciiToBytes (str) {\n const byteArray = []\n for (let i = 0; i < str.length; ++i) {\n // Node's code seems to be doing this and not & 0x7F..\n byteArray.push(str.charCodeAt(i) & 0xFF)\n }\n return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n let c, hi, lo\n const byteArray = []\n for (let i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0) break\n\n c = str.charCodeAt(i)\n hi = c >> 8\n lo = c % 256\n byteArray.push(lo)\n byteArray.push(hi)\n }\n\n return byteArray\n}\n\nfunction base64ToBytes (str) {\n return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n let i\n for (i = 0; i < length; ++i) {\n if ((i + offset >= dst.length) || (i >= src.length)) break\n dst[i + offset] = src[i]\n }\n return i\n}\n\n// ArrayBuffer or Uint8Array objects from other contexts (i.e. iframes) do not pass\n// the `instanceof` check but they should be treated as of that type.\n// See: https://github.com/feross/buffer/issues/166\nfunction isInstance (obj, type) {\n return obj instanceof type ||\n (obj != null && obj.constructor != null && obj.constructor.name != null &&\n obj.constructor.name === type.name)\n}\nfunction numberIsNaN (obj) {\n // For IE11 support\n return obj !== obj // eslint-disable-line no-self-compare\n}\n\n// Create lookup table for `toString('hex')`\n// See: https://github.com/feross/buffer/issues/219\nconst hexSliceLookupTable = (function () {\n const alphabet = '0123456789abcdef'\n const table = new Array(256)\n for (let i = 0; i < 16; ++i) {\n const i16 = i * 16\n for (let j = 0; j < 16; ++j) {\n table[i16 + j] = alphabet[i] + alphabet[j]\n }\n }\n return table\n})()\n\n// Return not function with Error if BigInt not supported\nfunction defineBigIntMethod (fn) {\n return typeof BigInt === 'undefined' ? BufferBigIntNotDefined : fn\n}\n\nfunction BufferBigIntNotDefined () {\n throw new Error('BigInt not supported')\n}\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\nvar R = typeof Reflect === 'object' ? Reflect : null\nvar ReflectApply = R && typeof R.apply === 'function'\n ? R.apply\n : function ReflectApply(target, receiver, args) {\n return Function.prototype.apply.call(target, receiver, args);\n }\n\nvar ReflectOwnKeys\nif (R && typeof R.ownKeys === 'function') {\n ReflectOwnKeys = R.ownKeys\n} else if (Object.getOwnPropertySymbols) {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target)\n .concat(Object.getOwnPropertySymbols(target));\n };\n} else {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target);\n };\n}\n\nfunction ProcessEmitWarning(warning) {\n if (console && console.warn) console.warn(warning);\n}\n\nvar NumberIsNaN = Number.isNaN || function NumberIsNaN(value) {\n return value !== value;\n}\n\nfunction EventEmitter() {\n EventEmitter.init.call(this);\n}\nmodule.exports = EventEmitter;\nmodule.exports.once = once;\n\n// Backwards-compat with node 0.10.x\nEventEmitter.EventEmitter = EventEmitter;\n\nEventEmitter.prototype._events = undefined;\nEventEmitter.prototype._eventsCount = 0;\nEventEmitter.prototype._maxListeners = undefined;\n\n// By default EventEmitters will print a warning if more than 10 listeners are\n// added to it. This is a useful default which helps finding memory leaks.\nvar defaultMaxListeners = 10;\n\nfunction checkListener(listener) {\n if (typeof listener !== 'function') {\n throw new TypeError('The \"listener\" argument must be of type Function. Received type ' + typeof listener);\n }\n}\n\nObject.defineProperty(EventEmitter, 'defaultMaxListeners', {\n enumerable: true,\n get: function() {\n return defaultMaxListeners;\n },\n set: function(arg) {\n if (typeof arg !== 'number' || arg < 0 || NumberIsNaN(arg)) {\n throw new RangeError('The value of \"defaultMaxListeners\" is out of range. It must be a non-negative number. Received ' + arg + '.');\n }\n defaultMaxListeners = arg;\n }\n});\n\nEventEmitter.init = function() {\n\n if (this._events === undefined ||\n this._events === Object.getPrototypeOf(this)._events) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n }\n\n this._maxListeners = this._maxListeners || undefined;\n};\n\n// Obviously not all Emitters should be limited to 10. This function allows\n// that to be increased. Set to zero for unlimited.\nEventEmitter.prototype.setMaxListeners = function setMaxListeners(n) {\n if (typeof n !== 'number' || n < 0 || NumberIsNaN(n)) {\n throw new RangeError('The value of \"n\" is out of range. It must be a non-negative number. Received ' + n + '.');\n }\n this._maxListeners = n;\n return this;\n};\n\nfunction _getMaxListeners(that) {\n if (that._maxListeners === undefined)\n return EventEmitter.defaultMaxListeners;\n return that._maxListeners;\n}\n\nEventEmitter.prototype.getMaxListeners = function getMaxListeners() {\n return _getMaxListeners(this);\n};\n\nEventEmitter.prototype.emit = function emit(type) {\n var args = [];\n for (var i = 1; i < arguments.length; i++) args.push(arguments[i]);\n var doError = (type === 'error');\n\n var events = this._events;\n if (events !== undefined)\n doError = (doError && events.error === undefined);\n else if (!doError)\n return false;\n\n // If there is no 'error' event listener then throw.\n if (doError) {\n var er;\n if (args.length > 0)\n er = args[0];\n if (er instanceof Error) {\n // Note: The comments on the `throw` lines are intentional, they show\n // up in Node's output if this results in an unhandled exception.\n throw er; // Unhandled 'error' event\n }\n // At least give some kind of context to the user\n var err = new Error('Unhandled error.' + (er ? ' (' + er.message + ')' : ''));\n err.context = er;\n throw err; // Unhandled 'error' event\n }\n\n var handler = events[type];\n\n if (handler === undefined)\n return false;\n\n if (typeof handler === 'function') {\n ReflectApply(handler, this, args);\n } else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n ReflectApply(listeners[i], this, args);\n }\n\n return true;\n};\n\nfunction _addListener(target, type, listener, prepend) {\n var m;\n var events;\n var existing;\n\n checkListener(listener);\n\n events = target._events;\n if (events === undefined) {\n events = target._events = Object.create(null);\n target._eventsCount = 0;\n } else {\n // To avoid recursion in the case that type === \"newListener\"! Before\n // adding it to the listeners, first emit \"newListener\".\n if (events.newListener !== undefined) {\n target.emit('newListener', type,\n listener.listener ? listener.listener : listener);\n\n // Re-assign `events` because a newListener handler could have caused the\n // this._events to be assigned to a new object\n events = target._events;\n }\n existing = events[type];\n }\n\n if (existing === undefined) {\n // Optimize the case of one listener. Don't need the extra array object.\n existing = events[type] = listener;\n ++target._eventsCount;\n } else {\n if (typeof existing === 'function') {\n // Adding the second element, need to change to array.\n existing = events[type] =\n prepend ? [listener, existing] : [existing, listener];\n // If we've already got an array, just append.\n } else if (prepend) {\n existing.unshift(listener);\n } else {\n existing.push(listener);\n }\n\n // Check for listener leak\n m = _getMaxListeners(target);\n if (m > 0 && existing.length > m && !existing.warned) {\n existing.warned = true;\n // No error code for this since it is a Warning\n // eslint-disable-next-line no-restricted-syntax\n var w = new Error('Possible EventEmitter memory leak detected. ' +\n existing.length + ' ' + String(type) + ' listeners ' +\n 'added. Use emitter.setMaxListeners() to ' +\n 'increase limit');\n w.name = 'MaxListenersExceededWarning';\n w.emitter = target;\n w.type = type;\n w.count = existing.length;\n ProcessEmitWarning(w);\n }\n }\n\n return target;\n}\n\nEventEmitter.prototype.addListener = function addListener(type, listener) {\n return _addListener(this, type, listener, false);\n};\n\nEventEmitter.prototype.on = EventEmitter.prototype.addListener;\n\nEventEmitter.prototype.prependListener =\n function prependListener(type, listener) {\n return _addListener(this, type, listener, true);\n };\n\nfunction onceWrapper() {\n if (!this.fired) {\n this.target.removeListener(this.type, this.wrapFn);\n this.fired = true;\n if (arguments.length === 0)\n return this.listener.call(this.target);\n return this.listener.apply(this.target, arguments);\n }\n}\n\nfunction _onceWrap(target, type, listener) {\n var state = { fired: false, wrapFn: undefined, target: target, type: type, listener: listener };\n var wrapped = onceWrapper.bind(state);\n wrapped.listener = listener;\n state.wrapFn = wrapped;\n return wrapped;\n}\n\nEventEmitter.prototype.once = function once(type, listener) {\n checkListener(listener);\n this.on(type, _onceWrap(this, type, listener));\n return this;\n};\n\nEventEmitter.prototype.prependOnceListener =\n function prependOnceListener(type, listener) {\n checkListener(listener);\n this.prependListener(type, _onceWrap(this, type, listener));\n return this;\n };\n\n// Emits a 'removeListener' event if and only if the listener was removed.\nEventEmitter.prototype.removeListener =\n function removeListener(type, listener) {\n var list, events, position, i, originalListener;\n\n checkListener(listener);\n\n events = this._events;\n if (events === undefined)\n return this;\n\n list = events[type];\n if (list === undefined)\n return this;\n\n if (list === listener || list.listener === listener) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else {\n delete events[type];\n if (events.removeListener)\n this.emit('removeListener', type, list.listener || listener);\n }\n } else if (typeof list !== 'function') {\n position = -1;\n\n for (i = list.length - 1; i >= 0; i--) {\n if (list[i] === listener || list[i].listener === listener) {\n originalListener = list[i].listener;\n position = i;\n break;\n }\n }\n\n if (position < 0)\n return this;\n\n if (position === 0)\n list.shift();\n else {\n spliceOne(list, position);\n }\n\n if (list.length === 1)\n events[type] = list[0];\n\n if (events.removeListener !== undefined)\n this.emit('removeListener', type, originalListener || listener);\n }\n\n return this;\n };\n\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\n\nEventEmitter.prototype.removeAllListeners =\n function removeAllListeners(type) {\n var listeners, events, i;\n\n events = this._events;\n if (events === undefined)\n return this;\n\n // not listening for removeListener, no need to emit\n if (events.removeListener === undefined) {\n if (arguments.length === 0) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n } else if (events[type] !== undefined) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else\n delete events[type];\n }\n return this;\n }\n\n // emit removeListener for all listeners on all events\n if (arguments.length === 0) {\n var keys = Object.keys(events);\n var key;\n for (i = 0; i < keys.length; ++i) {\n key = keys[i];\n if (key === 'removeListener') continue;\n this.removeAllListeners(key);\n }\n this.removeAllListeners('removeListener');\n this._events = Object.create(null);\n this._eventsCount = 0;\n return this;\n }\n\n listeners = events[type];\n\n if (typeof listeners === 'function') {\n this.removeListener(type, listeners);\n } else if (listeners !== undefined) {\n // LIFO order\n for (i = listeners.length - 1; i >= 0; i--) {\n this.removeListener(type, listeners[i]);\n }\n }\n\n return this;\n };\n\nfunction _listeners(target, type, unwrap) {\n var events = target._events;\n\n if (events === undefined)\n return [];\n\n var evlistener = events[type];\n if (evlistener === undefined)\n return [];\n\n if (typeof evlistener === 'function')\n return unwrap ? [evlistener.listener || evlistener] : [evlistener];\n\n return unwrap ?\n unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length);\n}\n\nEventEmitter.prototype.listeners = function listeners(type) {\n return _listeners(this, type, true);\n};\n\nEventEmitter.prototype.rawListeners = function rawListeners(type) {\n return _listeners(this, type, false);\n};\n\nEventEmitter.listenerCount = function(emitter, type) {\n if (typeof emitter.listenerCount === 'function') {\n return emitter.listenerCount(type);\n } else {\n return listenerCount.call(emitter, type);\n }\n};\n\nEventEmitter.prototype.listenerCount = listenerCount;\nfunction listenerCount(type) {\n var events = this._events;\n\n if (events !== undefined) {\n var evlistener = events[type];\n\n if (typeof evlistener === 'function') {\n return 1;\n } else if (evlistener !== undefined) {\n return evlistener.length;\n }\n }\n\n return 0;\n}\n\nEventEmitter.prototype.eventNames = function eventNames() {\n return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : [];\n};\n\nfunction arrayClone(arr, n) {\n var copy = new Array(n);\n for (var i = 0; i < n; ++i)\n copy[i] = arr[i];\n return copy;\n}\n\nfunction spliceOne(list, index) {\n for (; index + 1 < list.length; index++)\n list[index] = list[index + 1];\n list.pop();\n}\n\nfunction unwrapListeners(arr) {\n var ret = new Array(arr.length);\n for (var i = 0; i < ret.length; ++i) {\n ret[i] = arr[i].listener || arr[i];\n }\n return ret;\n}\n\nfunction once(emitter, name) {\n return new Promise(function (resolve, reject) {\n function errorListener(err) {\n emitter.removeListener(name, resolver);\n reject(err);\n }\n\n function resolver() {\n if (typeof emitter.removeListener === 'function') {\n emitter.removeListener('error', errorListener);\n }\n resolve([].slice.call(arguments));\n };\n\n eventTargetAgnosticAddListener(emitter, name, resolver, { once: true });\n if (name !== 'error') {\n addErrorHandlerIfEventEmitter(emitter, errorListener, { once: true });\n }\n });\n}\n\nfunction addErrorHandlerIfEventEmitter(emitter, handler, flags) {\n if (typeof emitter.on === 'function') {\n eventTargetAgnosticAddListener(emitter, 'error', handler, flags);\n }\n}\n\nfunction eventTargetAgnosticAddListener(emitter, name, listener, flags) {\n if (typeof emitter.on === 'function') {\n if (flags.once) {\n emitter.once(name, listener);\n } else {\n emitter.on(name, listener);\n }\n } else if (typeof emitter.addEventListener === 'function') {\n // EventTarget does not have `error` event semantics like Node\n // EventEmitters, we do not listen for `error` events here.\n emitter.addEventListener(name, function wrapListener(arg) {\n // IE does not have builtin `{ once: true }` support so we\n // have to do it manually.\n if (flags.once) {\n emitter.removeEventListener(name, wrapListener);\n }\n listener(arg);\n });\n } else {\n throw new TypeError('The \"emitter\" argument must be of type EventEmitter. Received type ' + typeof emitter);\n }\n}\n","/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */\nexports.read = function (buffer, offset, isLE, mLen, nBytes) {\n var e, m\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var nBits = -7\n var i = isLE ? (nBytes - 1) : 0\n var d = isLE ? -1 : 1\n var s = buffer[offset + i]\n\n i += d\n\n e = s & ((1 << (-nBits)) - 1)\n s >>= (-nBits)\n nBits += eLen\n for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & ((1 << (-nBits)) - 1)\n e >>= (-nBits)\n nBits += mLen\n for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias\n } else if (e === eMax) {\n return m ? NaN : ((s ? -1 : 1) * Infinity)\n } else {\n m = m + Math.pow(2, mLen)\n e = e - eBias\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n var i = isLE ? 0 : (nBytes - 1)\n var d = isLE ? 1 : -1\n var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n value = Math.abs(value)\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0\n e = eMax\n } else {\n e = Math.floor(Math.log(value) / Math.LN2)\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--\n c *= 2\n }\n if (e + eBias >= 1) {\n value += rt / c\n } else {\n value += rt * Math.pow(2, 1 - eBias)\n }\n if (value * c >= 2) {\n e++\n c /= 2\n }\n\n if (e + eBias >= eMax) {\n m = 0\n e = eMax\n } else if (e + eBias >= 1) {\n m = ((value * c) - 1) * Math.pow(2, mLen)\n e = e + eBias\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n e = 0\n }\n }\n\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n e = (e << mLen) | m\n eLen += mLen\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128\n}\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView');\n\nmodule.exports = DataView;\n","var hashClear = require('./_hashClear'),\n hashDelete = require('./_hashDelete'),\n hashGet = require('./_hashGet'),\n hashHas = require('./_hashHas'),\n hashSet = require('./_hashSet');\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\nmodule.exports = Hash;\n","var listCacheClear = require('./_listCacheClear'),\n listCacheDelete = require('./_listCacheDelete'),\n listCacheGet = require('./_listCacheGet'),\n listCacheHas = require('./_listCacheHas'),\n listCacheSet = require('./_listCacheSet');\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\nmodule.exports = ListCache;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map');\n\nmodule.exports = Map;\n","var mapCacheClear = require('./_mapCacheClear'),\n mapCacheDelete = require('./_mapCacheDelete'),\n mapCacheGet = require('./_mapCacheGet'),\n mapCacheHas = require('./_mapCacheHas'),\n mapCacheSet = require('./_mapCacheSet');\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\nmodule.exports = MapCache;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Promise = getNative(root, 'Promise');\n\nmodule.exports = Promise;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Set = getNative(root, 'Set');\n\nmodule.exports = Set;\n","var MapCache = require('./_MapCache'),\n setCacheAdd = require('./_setCacheAdd'),\n setCacheHas = require('./_setCacheHas');\n\n/**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\nfunction SetCache(values) {\n var index = -1,\n length = values == null ? 0 : values.length;\n\n this.__data__ = new MapCache;\n while (++index < length) {\n this.add(values[index]);\n }\n}\n\n// Add methods to `SetCache`.\nSetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\nSetCache.prototype.has = setCacheHas;\n\nmodule.exports = SetCache;\n","var ListCache = require('./_ListCache'),\n stackClear = require('./_stackClear'),\n stackDelete = require('./_stackDelete'),\n stackGet = require('./_stackGet'),\n stackHas = require('./_stackHas'),\n stackSet = require('./_stackSet');\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\nmodule.exports = Stack;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Uint8Array = root.Uint8Array;\n\nmodule.exports = Uint8Array;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar WeakMap = getNative(root, 'WeakMap');\n\nmodule.exports = WeakMap;\n","/**\n * A specialized version of `_.forEach` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\nfunction arrayEach(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (iteratee(array[index], index, array) === false) {\n break;\n }\n }\n return array;\n}\n\nmodule.exports = arrayEach;\n","/**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\nfunction arrayFilter(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result[resIndex++] = value;\n }\n }\n return result;\n}\n\nmodule.exports = arrayFilter;\n","var baseTimes = require('./_baseTimes'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isIndex = require('./_isIndex'),\n isTypedArray = require('./isTypedArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = arrayLikeKeys;\n","/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n}\n\nmodule.exports = arrayPush;\n","/**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\nfunction arraySome(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (predicate(array[index], index, array)) {\n return true;\n }\n }\n return false;\n}\n\nmodule.exports = arraySome;\n","var baseAssignValue = require('./_baseAssignValue'),\n eq = require('./eq');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\nmodule.exports = assignValue;\n","var eq = require('./eq');\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\nmodule.exports = assocIndexOf;\n","var copyObject = require('./_copyObject'),\n keys = require('./keys');\n\n/**\n * The base implementation of `_.assign` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssign(object, source) {\n return object && copyObject(source, keys(source), object);\n}\n\nmodule.exports = baseAssign;\n","var copyObject = require('./_copyObject'),\n keysIn = require('./keysIn');\n\n/**\n * The base implementation of `_.assignIn` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssignIn(object, source) {\n return object && copyObject(source, keysIn(source), object);\n}\n\nmodule.exports = baseAssignIn;\n","var defineProperty = require('./_defineProperty');\n\n/**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction baseAssignValue(object, key, value) {\n if (key == '__proto__' && defineProperty) {\n defineProperty(object, key, {\n 'configurable': true,\n 'enumerable': true,\n 'value': value,\n 'writable': true\n });\n } else {\n object[key] = value;\n }\n}\n\nmodule.exports = baseAssignValue;\n","var Stack = require('./_Stack'),\n arrayEach = require('./_arrayEach'),\n assignValue = require('./_assignValue'),\n baseAssign = require('./_baseAssign'),\n baseAssignIn = require('./_baseAssignIn'),\n cloneBuffer = require('./_cloneBuffer'),\n copyArray = require('./_copyArray'),\n copySymbols = require('./_copySymbols'),\n copySymbolsIn = require('./_copySymbolsIn'),\n getAllKeys = require('./_getAllKeys'),\n getAllKeysIn = require('./_getAllKeysIn'),\n getTag = require('./_getTag'),\n initCloneArray = require('./_initCloneArray'),\n initCloneByTag = require('./_initCloneByTag'),\n initCloneObject = require('./_initCloneObject'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isMap = require('./isMap'),\n isObject = require('./isObject'),\n isSet = require('./isSet'),\n keys = require('./keys'),\n keysIn = require('./keysIn');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_FLAT_FLAG = 2,\n CLONE_SYMBOLS_FLAG = 4;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values supported by `_.clone`. */\nvar cloneableTags = {};\ncloneableTags[argsTag] = cloneableTags[arrayTag] =\ncloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =\ncloneableTags[boolTag] = cloneableTags[dateTag] =\ncloneableTags[float32Tag] = cloneableTags[float64Tag] =\ncloneableTags[int8Tag] = cloneableTags[int16Tag] =\ncloneableTags[int32Tag] = cloneableTags[mapTag] =\ncloneableTags[numberTag] = cloneableTags[objectTag] =\ncloneableTags[regexpTag] = cloneableTags[setTag] =\ncloneableTags[stringTag] = cloneableTags[symbolTag] =\ncloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =\ncloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;\ncloneableTags[errorTag] = cloneableTags[funcTag] =\ncloneableTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.clone` and `_.cloneDeep` which tracks\n * traversed objects.\n *\n * @private\n * @param {*} value The value to clone.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Deep clone\n * 2 - Flatten inherited properties\n * 4 - Clone symbols\n * @param {Function} [customizer] The function to customize cloning.\n * @param {string} [key] The key of `value`.\n * @param {Object} [object] The parent object of `value`.\n * @param {Object} [stack] Tracks traversed objects and their clone counterparts.\n * @returns {*} Returns the cloned value.\n */\nfunction baseClone(value, bitmask, customizer, key, object, stack) {\n var result,\n isDeep = bitmask & CLONE_DEEP_FLAG,\n isFlat = bitmask & CLONE_FLAT_FLAG,\n isFull = bitmask & CLONE_SYMBOLS_FLAG;\n\n if (customizer) {\n result = object ? customizer(value, key, object, stack) : customizer(value);\n }\n if (result !== undefined) {\n return result;\n }\n if (!isObject(value)) {\n return value;\n }\n var isArr = isArray(value);\n if (isArr) {\n result = initCloneArray(value);\n if (!isDeep) {\n return copyArray(value, result);\n }\n } else {\n var tag = getTag(value),\n isFunc = tag == funcTag || tag == genTag;\n\n if (isBuffer(value)) {\n return cloneBuffer(value, isDeep);\n }\n if (tag == objectTag || tag == argsTag || (isFunc && !object)) {\n result = (isFlat || isFunc) ? {} : initCloneObject(value);\n if (!isDeep) {\n return isFlat\n ? copySymbolsIn(value, baseAssignIn(result, value))\n : copySymbols(value, baseAssign(result, value));\n }\n } else {\n if (!cloneableTags[tag]) {\n return object ? value : {};\n }\n result = initCloneByTag(value, tag, isDeep);\n }\n }\n // Check for circular references and return its corresponding clone.\n stack || (stack = new Stack);\n var stacked = stack.get(value);\n if (stacked) {\n return stacked;\n }\n stack.set(value, result);\n\n if (isSet(value)) {\n value.forEach(function(subValue) {\n result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));\n });\n } else if (isMap(value)) {\n value.forEach(function(subValue, key) {\n result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n }\n\n var keysFunc = isFull\n ? (isFlat ? getAllKeysIn : getAllKeys)\n : (isFlat ? keysIn : keys);\n\n var props = isArr ? undefined : keysFunc(value);\n arrayEach(props || value, function(subValue, key) {\n if (props) {\n key = subValue;\n subValue = value[key];\n }\n // Recursively populate clone (susceptible to call stack limits).\n assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n return result;\n}\n\nmodule.exports = baseClone;\n","var isObject = require('./isObject');\n\n/** Built-in value references. */\nvar objectCreate = Object.create;\n\n/**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} proto The object to inherit from.\n * @returns {Object} Returns the new object.\n */\nvar baseCreate = (function() {\n function object() {}\n return function(proto) {\n if (!isObject(proto)) {\n return {};\n }\n if (objectCreate) {\n return objectCreate(proto);\n }\n object.prototype = proto;\n var result = new object;\n object.prototype = undefined;\n return result;\n };\n}());\n\nmodule.exports = baseCreate;\n","var arrayPush = require('./_arrayPush'),\n isArray = require('./isArray');\n\n/**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction baseGetAllKeys(object, keysFunc, symbolsFunc) {\n var result = keysFunc(object);\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n}\n\nmodule.exports = baseGetAllKeys;\n","var Symbol = require('./_Symbol'),\n getRawTag = require('./_getRawTag'),\n objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]';\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\nmodule.exports = baseIsArguments;\n","var baseIsEqualDeep = require('./_baseIsEqualDeep'),\n isObjectLike = require('./isObjectLike');\n\n/**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Unordered comparison\n * 2 - Partial comparison\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\nfunction baseIsEqual(value, other, bitmask, customizer, stack) {\n if (value === other) {\n return true;\n }\n if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\n return value !== value && other !== other;\n }\n return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n}\n\nmodule.exports = baseIsEqual;\n","var Stack = require('./_Stack'),\n equalArrays = require('./_equalArrays'),\n equalByTag = require('./_equalByTag'),\n equalObjects = require('./_equalObjects'),\n getTag = require('./_getTag'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isTypedArray = require('./isTypedArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n var objIsArr = isArray(object),\n othIsArr = isArray(other),\n objTag = objIsArr ? arrayTag : getTag(object),\n othTag = othIsArr ? arrayTag : getTag(other);\n\n objTag = objTag == argsTag ? objectTag : objTag;\n othTag = othTag == argsTag ? objectTag : othTag;\n\n var objIsObj = objTag == objectTag,\n othIsObj = othTag == objectTag,\n isSameTag = objTag == othTag;\n\n if (isSameTag && isBuffer(object)) {\n if (!isBuffer(other)) {\n return false;\n }\n objIsArr = true;\n objIsObj = false;\n }\n if (isSameTag && !objIsObj) {\n stack || (stack = new Stack);\n return (objIsArr || isTypedArray(object))\n ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n }\n if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n if (objIsWrapped || othIsWrapped) {\n var objUnwrapped = objIsWrapped ? object.value() : object,\n othUnwrapped = othIsWrapped ? other.value() : other;\n\n stack || (stack = new Stack);\n return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n }\n }\n if (!isSameTag) {\n return false;\n }\n stack || (stack = new Stack);\n return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n}\n\nmodule.exports = baseIsEqualDeep;\n","var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]';\n\n/**\n * The base implementation of `_.isMap` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n */\nfunction baseIsMap(value) {\n return isObjectLike(value) && getTag(value) == mapTag;\n}\n\nmodule.exports = baseIsMap;\n","var isFunction = require('./isFunction'),\n isMasked = require('./_isMasked'),\n isObject = require('./isObject'),\n toSource = require('./_toSource');\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\nmodule.exports = baseIsNative;\n","var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar setTag = '[object Set]';\n\n/**\n * The base implementation of `_.isSet` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n */\nfunction baseIsSet(value) {\n return isObjectLike(value) && getTag(value) == setTag;\n}\n\nmodule.exports = baseIsSet;\n","var baseGetTag = require('./_baseGetTag'),\n isLength = require('./isLength'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n\nmodule.exports = baseIsTypedArray;\n","var isPrototype = require('./_isPrototype'),\n nativeKeys = require('./_nativeKeys');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeys;\n","var isObject = require('./isObject'),\n isPrototype = require('./_isPrototype'),\n nativeKeysIn = require('./_nativeKeysIn');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeysIn(object) {\n if (!isObject(object)) {\n return nativeKeysIn(object);\n }\n var isProto = isPrototype(object),\n result = [];\n\n for (var key in object) {\n if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeysIn;\n","/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\nmodule.exports = baseTimes;\n","/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n return function(value) {\n return func(value);\n };\n}\n\nmodule.exports = baseUnary;\n","/**\n * Checks if a `cache` value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction cacheHas(cache, key) {\n return cache.has(key);\n}\n\nmodule.exports = cacheHas;\n","var Uint8Array = require('./_Uint8Array');\n\n/**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\nfunction cloneArrayBuffer(arrayBuffer) {\n var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n return result;\n}\n\nmodule.exports = cloneArrayBuffer;\n","var root = require('./_root');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined,\n allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;\n\n/**\n * Creates a clone of `buffer`.\n *\n * @private\n * @param {Buffer} buffer The buffer to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Buffer} Returns the cloned buffer.\n */\nfunction cloneBuffer(buffer, isDeep) {\n if (isDeep) {\n return buffer.slice();\n }\n var length = buffer.length,\n result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\n\n buffer.copy(result);\n return result;\n}\n\nmodule.exports = cloneBuffer;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer');\n\n/**\n * Creates a clone of `dataView`.\n *\n * @private\n * @param {Object} dataView The data view to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned data view.\n */\nfunction cloneDataView(dataView, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;\n return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);\n}\n\nmodule.exports = cloneDataView;\n","/** Used to match `RegExp` flags from their coerced string values. */\nvar reFlags = /\\w*$/;\n\n/**\n * Creates a clone of `regexp`.\n *\n * @private\n * @param {Object} regexp The regexp to clone.\n * @returns {Object} Returns the cloned regexp.\n */\nfunction cloneRegExp(regexp) {\n var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));\n result.lastIndex = regexp.lastIndex;\n return result;\n}\n\nmodule.exports = cloneRegExp;\n","var Symbol = require('./_Symbol');\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * Creates a clone of the `symbol` object.\n *\n * @private\n * @param {Object} symbol The symbol object to clone.\n * @returns {Object} Returns the cloned symbol object.\n */\nfunction cloneSymbol(symbol) {\n return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};\n}\n\nmodule.exports = cloneSymbol;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer');\n\n/**\n * Creates a clone of `typedArray`.\n *\n * @private\n * @param {Object} typedArray The typed array to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned typed array.\n */\nfunction cloneTypedArray(typedArray, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n}\n\nmodule.exports = cloneTypedArray;\n","/**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\nfunction copyArray(source, array) {\n var index = -1,\n length = source.length;\n\n array || (array = Array(length));\n while (++index < length) {\n array[index] = source[index];\n }\n return array;\n}\n\nmodule.exports = copyArray;\n","var assignValue = require('./_assignValue'),\n baseAssignValue = require('./_baseAssignValue');\n\n/**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\nfunction copyObject(source, props, object, customizer) {\n var isNew = !object;\n object || (object = {});\n\n var index = -1,\n length = props.length;\n\n while (++index < length) {\n var key = props[index];\n\n var newValue = customizer\n ? customizer(object[key], source[key], key, object, source)\n : undefined;\n\n if (newValue === undefined) {\n newValue = source[key];\n }\n if (isNew) {\n baseAssignValue(object, key, newValue);\n } else {\n assignValue(object, key, newValue);\n }\n }\n return object;\n}\n\nmodule.exports = copyObject;\n","var copyObject = require('./_copyObject'),\n getSymbols = require('./_getSymbols');\n\n/**\n * Copies own symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbols(source, object) {\n return copyObject(source, getSymbols(source), object);\n}\n\nmodule.exports = copySymbols;\n","var copyObject = require('./_copyObject'),\n getSymbolsIn = require('./_getSymbolsIn');\n\n/**\n * Copies own and inherited symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbolsIn(source, object) {\n return copyObject(source, getSymbolsIn(source), object);\n}\n\nmodule.exports = copySymbolsIn;\n","var root = require('./_root');\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\nmodule.exports = coreJsData;\n","var getNative = require('./_getNative');\n\nvar defineProperty = (function() {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n}());\n\nmodule.exports = defineProperty;\n","var SetCache = require('./_SetCache'),\n arraySome = require('./_arraySome'),\n cacheHas = require('./_cacheHas');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\nfunction equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n arrLength = array.length,\n othLength = other.length;\n\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n return false;\n }\n // Check that cyclic values are equal.\n var arrStacked = stack.get(array);\n var othStacked = stack.get(other);\n if (arrStacked && othStacked) {\n return arrStacked == other && othStacked == array;\n }\n var index = -1,\n result = true,\n seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n stack.set(array, other);\n stack.set(other, array);\n\n // Ignore non-index properties.\n while (++index < arrLength) {\n var arrValue = array[index],\n othValue = other[index];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, arrValue, index, other, array, stack)\n : customizer(arrValue, othValue, index, array, other, stack);\n }\n if (compared !== undefined) {\n if (compared) {\n continue;\n }\n result = false;\n break;\n }\n // Recursively compare arrays (susceptible to call stack limits).\n if (seen) {\n if (!arraySome(other, function(othValue, othIndex) {\n if (!cacheHas(seen, othIndex) &&\n (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n return seen.push(othIndex);\n }\n })) {\n result = false;\n break;\n }\n } else if (!(\n arrValue === othValue ||\n equalFunc(arrValue, othValue, bitmask, customizer, stack)\n )) {\n result = false;\n break;\n }\n }\n stack['delete'](array);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalArrays;\n","var Symbol = require('./_Symbol'),\n Uint8Array = require('./_Uint8Array'),\n eq = require('./eq'),\n equalArrays = require('./_equalArrays'),\n mapToArray = require('./_mapToArray'),\n setToArray = require('./_setToArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]';\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n switch (tag) {\n case dataViewTag:\n if ((object.byteLength != other.byteLength) ||\n (object.byteOffset != other.byteOffset)) {\n return false;\n }\n object = object.buffer;\n other = other.buffer;\n\n case arrayBufferTag:\n if ((object.byteLength != other.byteLength) ||\n !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n return false;\n }\n return true;\n\n case boolTag:\n case dateTag:\n case numberTag:\n // Coerce booleans to `1` or `0` and dates to milliseconds.\n // Invalid dates are coerced to `NaN`.\n return eq(+object, +other);\n\n case errorTag:\n return object.name == other.name && object.message == other.message;\n\n case regexpTag:\n case stringTag:\n // Coerce regexes to strings and treat strings, primitives and objects,\n // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n // for more details.\n return object == (other + '');\n\n case mapTag:\n var convert = mapToArray;\n\n case setTag:\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n convert || (convert = setToArray);\n\n if (object.size != other.size && !isPartial) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked) {\n return stacked == other;\n }\n bitmask |= COMPARE_UNORDERED_FLAG;\n\n // Recursively compare objects (susceptible to call stack limits).\n stack.set(object, other);\n var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n stack['delete'](object);\n return result;\n\n case symbolTag:\n if (symbolValueOf) {\n return symbolValueOf.call(object) == symbolValueOf.call(other);\n }\n }\n return false;\n}\n\nmodule.exports = equalByTag;\n","var getAllKeys = require('./_getAllKeys');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n objProps = getAllKeys(object),\n objLength = objProps.length,\n othProps = getAllKeys(other),\n othLength = othProps.length;\n\n if (objLength != othLength && !isPartial) {\n return false;\n }\n var index = objLength;\n while (index--) {\n var key = objProps[index];\n if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n return false;\n }\n }\n // Check that cyclic values are equal.\n var objStacked = stack.get(object);\n var othStacked = stack.get(other);\n if (objStacked && othStacked) {\n return objStacked == other && othStacked == object;\n }\n var result = true;\n stack.set(object, other);\n stack.set(other, object);\n\n var skipCtor = isPartial;\n while (++index < objLength) {\n key = objProps[index];\n var objValue = object[key],\n othValue = other[key];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, objValue, key, other, object, stack)\n : customizer(objValue, othValue, key, object, other, stack);\n }\n // Recursively compare objects (susceptible to call stack limits).\n if (!(compared === undefined\n ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n : compared\n )) {\n result = false;\n break;\n }\n skipCtor || (skipCtor = key == 'constructor');\n }\n if (result && !skipCtor) {\n var objCtor = object.constructor,\n othCtor = other.constructor;\n\n // Non `Object` object instances with different constructors are not equal.\n if (objCtor != othCtor &&\n ('constructor' in object && 'constructor' in other) &&\n !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n result = false;\n }\n }\n stack['delete'](object);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalObjects;\n","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n","var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbols = require('./_getSymbols'),\n keys = require('./keys');\n\n/**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeys(object) {\n return baseGetAllKeys(object, keys, getSymbols);\n}\n\nmodule.exports = getAllKeys;\n","var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbolsIn = require('./_getSymbolsIn'),\n keysIn = require('./keysIn');\n\n/**\n * Creates an array of own and inherited enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeysIn(object) {\n return baseGetAllKeys(object, keysIn, getSymbolsIn);\n}\n\nmodule.exports = getAllKeysIn;\n","var isKeyable = require('./_isKeyable');\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\nmodule.exports = getMapData;\n","var baseIsNative = require('./_baseIsNative'),\n getValue = require('./_getValue');\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\nmodule.exports = getNative;\n","var overArg = require('./_overArg');\n\n/** Built-in value references. */\nvar getPrototype = overArg(Object.getPrototypeOf, Object);\n\nmodule.exports = getPrototype;\n","var Symbol = require('./_Symbol');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nmodule.exports = getRawTag;\n","var arrayFilter = require('./_arrayFilter'),\n stubArray = require('./stubArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n if (object == null) {\n return [];\n }\n object = Object(object);\n return arrayFilter(nativeGetSymbols(object), function(symbol) {\n return propertyIsEnumerable.call(object, symbol);\n });\n};\n\nmodule.exports = getSymbols;\n","var arrayPush = require('./_arrayPush'),\n getPrototype = require('./_getPrototype'),\n getSymbols = require('./_getSymbols'),\n stubArray = require('./stubArray');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own and inherited enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {\n var result = [];\n while (object) {\n arrayPush(result, getSymbols(object));\n object = getPrototype(object);\n }\n return result;\n};\n\nmodule.exports = getSymbolsIn;\n","var DataView = require('./_DataView'),\n Map = require('./_Map'),\n Promise = require('./_Promise'),\n Set = require('./_Set'),\n WeakMap = require('./_WeakMap'),\n baseGetTag = require('./_baseGetTag'),\n toSource = require('./_toSource');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n setTag = '[object Set]',\n weakMapTag = '[object WeakMap]';\n\nvar dataViewTag = '[object DataView]';\n\n/** Used to detect maps, sets, and weakmaps. */\nvar dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nvar getTag = baseGetTag;\n\n// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\nif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = baseGetTag(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : '';\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n}\n\nmodule.exports = getTag;\n","/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\nmodule.exports = getValue;\n","var nativeCreate = require('./_nativeCreate');\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n}\n\nmodule.exports = hashClear;\n","/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = hashDelete;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\nmodule.exports = hashGet;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\nmodule.exports = hashHas;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\nmodule.exports = hashSet;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Initializes an array clone.\n *\n * @private\n * @param {Array} array The array to clone.\n * @returns {Array} Returns the initialized clone.\n */\nfunction initCloneArray(array) {\n var length = array.length,\n result = new array.constructor(length);\n\n // Add properties assigned by `RegExp#exec`.\n if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {\n result.index = array.index;\n result.input = array.input;\n }\n return result;\n}\n\nmodule.exports = initCloneArray;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer'),\n cloneDataView = require('./_cloneDataView'),\n cloneRegExp = require('./_cloneRegExp'),\n cloneSymbol = require('./_cloneSymbol'),\n cloneTypedArray = require('./_cloneTypedArray');\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/**\n * Initializes an object clone based on its `toStringTag`.\n *\n * **Note:** This function only supports cloning values with tags of\n * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.\n *\n * @private\n * @param {Object} object The object to clone.\n * @param {string} tag The `toStringTag` of the object to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneByTag(object, tag, isDeep) {\n var Ctor = object.constructor;\n switch (tag) {\n case arrayBufferTag:\n return cloneArrayBuffer(object);\n\n case boolTag:\n case dateTag:\n return new Ctor(+object);\n\n case dataViewTag:\n return cloneDataView(object, isDeep);\n\n case float32Tag: case float64Tag:\n case int8Tag: case int16Tag: case int32Tag:\n case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:\n return cloneTypedArray(object, isDeep);\n\n case mapTag:\n return new Ctor;\n\n case numberTag:\n case stringTag:\n return new Ctor(object);\n\n case regexpTag:\n return cloneRegExp(object);\n\n case setTag:\n return new Ctor;\n\n case symbolTag:\n return cloneSymbol(object);\n }\n}\n\nmodule.exports = initCloneByTag;\n","var baseCreate = require('./_baseCreate'),\n getPrototype = require('./_getPrototype'),\n isPrototype = require('./_isPrototype');\n\n/**\n * Initializes an object clone.\n *\n * @private\n * @param {Object} object The object to clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneObject(object) {\n return (typeof object.constructor == 'function' && !isPrototype(object))\n ? baseCreate(getPrototype(object))\n : {};\n}\n\nmodule.exports = initCloneObject;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n var type = typeof value;\n length = length == null ? MAX_SAFE_INTEGER : length;\n\n return !!length &&\n (type == 'number' ||\n (type != 'symbol' && reIsUint.test(value))) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\nmodule.exports = isIndex;\n","/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\nmodule.exports = isKeyable;\n","var coreJsData = require('./_coreJsData');\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\nmodule.exports = isMasked;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\nmodule.exports = isPrototype;\n","/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n}\n\nmodule.exports = listCacheClear;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype;\n\n/** Built-in value references. */\nvar splice = arrayProto.splice;\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n}\n\nmodule.exports = listCacheDelete;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\nmodule.exports = listCacheGet;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\nmodule.exports = listCacheHas;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\nmodule.exports = listCacheSet;\n","var Hash = require('./_Hash'),\n ListCache = require('./_ListCache'),\n Map = require('./_Map');\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\nmodule.exports = mapCacheClear;\n","var getMapData = require('./_getMapData');\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = mapCacheDelete;\n","var getMapData = require('./_getMapData');\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\nmodule.exports = mapCacheGet;\n","var getMapData = require('./_getMapData');\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\nmodule.exports = mapCacheHas;\n","var getMapData = require('./_getMapData');\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n}\n\nmodule.exports = mapCacheSet;\n","/**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\nfunction mapToArray(map) {\n var index = -1,\n result = Array(map.size);\n\n map.forEach(function(value, key) {\n result[++index] = [key, value];\n });\n return result;\n}\n\nmodule.exports = mapToArray;\n","var getNative = require('./_getNative');\n\n/* Built-in method references that are verified to be native. */\nvar nativeCreate = getNative(Object, 'create');\n\nmodule.exports = nativeCreate;\n","var overArg = require('./_overArg');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeKeys = overArg(Object.keys, Object);\n\nmodule.exports = nativeKeys;\n","/**\n * This function is like\n * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * except that it includes inherited enumerable properties.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction nativeKeysIn(object) {\n var result = [];\n if (object != null) {\n for (var key in Object(object)) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = nativeKeysIn;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n try {\n // Use `util.types` for Node.js 10+.\n var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n if (types) {\n return types;\n }\n\n // Legacy `process.binding('util')` for Node.js < 10.\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n}());\n\nmodule.exports = nodeUtil;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n","/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\nmodule.exports = overArg;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n","/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\nfunction setCacheAdd(value) {\n this.__data__.set(value, HASH_UNDEFINED);\n return this;\n}\n\nmodule.exports = setCacheAdd;\n","/**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\nfunction setCacheHas(value) {\n return this.__data__.has(value);\n}\n\nmodule.exports = setCacheHas;\n","/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\nfunction setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n}\n\nmodule.exports = setToArray;\n","var ListCache = require('./_ListCache');\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}\n\nmodule.exports = stackClear;\n","/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n var data = this.__data__,\n result = data['delete'](key);\n\n this.size = data.size;\n return result;\n}\n\nmodule.exports = stackDelete;\n","/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n return this.__data__.get(key);\n}\n\nmodule.exports = stackGet;\n","/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n return this.__data__.has(key);\n}\n\nmodule.exports = stackHas;\n","var ListCache = require('./_ListCache'),\n Map = require('./_Map'),\n MapCache = require('./_MapCache');\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n var data = this.__data__;\n if (data instanceof ListCache) {\n var pairs = data.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n this.size = ++data.size;\n return this;\n }\n data = this.__data__ = new MapCache(pairs);\n }\n data.set(key, value);\n this.size = data.size;\n return this;\n}\n\nmodule.exports = stackSet;\n","/** Used for built-in method references. */\nvar funcProto = Function.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\nmodule.exports = toSource;\n","var baseClone = require('./_baseClone');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_SYMBOLS_FLAG = 4;\n\n/**\n * This method is like `_.clone` except that it recursively clones `value`.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Lang\n * @param {*} value The value to recursively clone.\n * @returns {*} Returns the deep cloned value.\n * @see _.clone\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var deep = _.cloneDeep(objects);\n * console.log(deep[0] === objects[0]);\n * // => false\n */\nfunction cloneDeep(value) {\n return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);\n}\n\nmodule.exports = cloneDeep;\n","/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\nmodule.exports = eq;\n","var baseIsArguments = require('./_baseIsArguments'),\n isObjectLike = require('./isObjectLike');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n};\n\nmodule.exports = isArguments;\n","/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\nmodule.exports = isArray;\n","var isFunction = require('./isFunction'),\n isLength = require('./isLength');\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\nmodule.exports = isArrayLike;\n","var root = require('./_root'),\n stubFalse = require('./stubFalse');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\nmodule.exports = isBuffer;\n","var baseIsEqual = require('./_baseIsEqual');\n\n/**\n * Performs a deep comparison between two values to determine if they are\n * equivalent.\n *\n * **Note:** This method supports comparing arrays, array buffers, booleans,\n * date objects, error objects, maps, numbers, `Object` objects, regexes,\n * sets, strings, symbols, and typed arrays. `Object` objects are compared\n * by their own, not inherited, enumerable properties. Functions and DOM\n * nodes are compared by strict equality, i.e. `===`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.isEqual(object, other);\n * // => true\n *\n * object === other;\n * // => false\n */\nfunction isEqual(value, other) {\n return baseIsEqual(value, other);\n}\n\nmodule.exports = isEqual;\n","var baseGetTag = require('./_baseGetTag'),\n isObject = require('./isObject');\n\n/** `Object#toString` result references. */\nvar asyncTag = '[object AsyncFunction]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n proxyTag = '[object Proxy]';\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\nmodule.exports = isFunction;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\nmodule.exports = isLength;\n","var baseIsMap = require('./_baseIsMap'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsMap = nodeUtil && nodeUtil.isMap;\n\n/**\n * Checks if `value` is classified as a `Map` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n * @example\n *\n * _.isMap(new Map);\n * // => true\n *\n * _.isMap(new WeakMap);\n * // => false\n */\nvar isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;\n\nmodule.exports = isMap;\n","/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n","var baseIsSet = require('./_baseIsSet'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsSet = nodeUtil && nodeUtil.isSet;\n\n/**\n * Checks if `value` is classified as a `Set` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n * @example\n *\n * _.isSet(new Set);\n * // => true\n *\n * _.isSet(new WeakSet);\n * // => false\n */\nvar isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;\n\nmodule.exports = isSet;\n","var baseIsTypedArray = require('./_baseIsTypedArray'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\nmodule.exports = isTypedArray;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeys = require('./_baseKeys'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\nmodule.exports = keys;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeysIn = require('./_baseKeysIn'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\nfunction keysIn(object) {\n return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n}\n\nmodule.exports = keysIn;\n","/**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\nfunction stubArray() {\n return [];\n}\n\nmodule.exports = stubArray;\n","/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n return false;\n}\n\nmodule.exports = stubFalse;\n","import type { WebLayoutSnapshot } from \"@openfin/core-web\";\nimport type { Settings } from \"../shapes/setting-shapes\";\n\n/**\n * Fetches the settings for the application.\n * @returns The settings for the application.\n */\nexport async function getSettings(): Promise {\n\tconst settings = await getManifestSettings();\n\tif (settings === undefined) {\n\t\tconsole.error(\n\t\t\t\"Unable to run the example as settings are required and we fetch them from the link web manifest from the html page that is being served. It should exist in the customSettings section of the web manifest.\"\n\t\t);\n\t}\n\treturn settings;\n}\n\n/**\n * Returns a default layout from the settings if provided.\n * @returns The default layout from the settings.\n */\nexport async function getDefaultLayout(): Promise {\n\tconst settings = await getSettings();\n\tif (settings?.platform?.layout?.defaultLayout === undefined) {\n\t\tconsole.error(\n\t\t\t\"Unable to run the example as without a layout being defined. Please ensure that settings have been provided in the web manifest.\"\n\t\t);\n\t\treturn;\n\t}\n\tif (typeof settings.platform.layout.defaultLayout === \"string\") {\n\t\tconst layoutResponse = await fetch(settings.platform.layout.defaultLayout);\n\t\tconst layoutJson = (await layoutResponse.json()) as WebLayoutSnapshot;\n\t\treturn layoutJson;\n\t}\n\treturn settings.platform.layout.defaultLayout;\n}\n\n/**\n * Returns the settings from the manifest file.\n * @returns customSettings for this example\n */\nasync function getManifestSettings(): Promise {\n\t// Get the manifest link\n\tconst link = document.querySelector('link[rel=\"manifest\"]');\n\tif (link !== null) {\n\t\tconst manifestResponse = await fetch(link.href);\n\t\tconst manifestJson = (await manifestResponse.json()) as { custom_settings: Settings };\n\t\treturn manifestJson.custom_settings;\n\t}\n}\n","export { default as v1 } from './v1.js';\nexport { default as v3 } from './v3.js';\nexport { default as v4 } from './v4.js';\nexport { default as v5 } from './v5.js';\nexport { default as NIL } from './nil.js';\nexport { default as version } from './version.js';\nexport { default as validate } from './validate.js';\nexport { default as stringify } from './stringify.js';\nexport { default as parse } from './parse.js';","/*\n * Browser-compatible JavaScript MD5\n *\n * Modification of JavaScript MD5\n * https://github.com/blueimp/JavaScript-MD5\n *\n * Copyright 2011, Sebastian Tschan\n * https://blueimp.net\n *\n * Licensed under the MIT license:\n * https://opensource.org/licenses/MIT\n *\n * Based on\n * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message\n * Digest Algorithm, as defined in RFC 1321.\n * Version 2.2 Copyright (C) Paul Johnston 1999 - 2009\n * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet\n * Distributed under the BSD License\n * See http://pajhome.org.uk/crypt/md5 for more info.\n */\nfunction md5(bytes) {\n if (typeof bytes === 'string') {\n var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape\n\n bytes = new Uint8Array(msg.length);\n\n for (var i = 0; i < msg.length; ++i) {\n bytes[i] = msg.charCodeAt(i);\n }\n }\n\n return md5ToHexEncodedArray(wordsToMd5(bytesToWords(bytes), bytes.length * 8));\n}\n/*\n * Convert an array of little-endian words to an array of bytes\n */\n\n\nfunction md5ToHexEncodedArray(input) {\n var output = [];\n var length32 = input.length * 32;\n var hexTab = '0123456789abcdef';\n\n for (var i = 0; i < length32; i += 8) {\n var x = input[i >> 5] >>> i % 32 & 0xff;\n var hex = parseInt(hexTab.charAt(x >>> 4 & 0x0f) + hexTab.charAt(x & 0x0f), 16);\n output.push(hex);\n }\n\n return output;\n}\n/**\n * Calculate output length with padding and bit length\n */\n\n\nfunction getOutputLength(inputLength8) {\n return (inputLength8 + 64 >>> 9 << 4) + 14 + 1;\n}\n/*\n * Calculate the MD5 of an array of little-endian words, and a bit length.\n */\n\n\nfunction wordsToMd5(x, len) {\n /* append padding */\n x[len >> 5] |= 0x80 << len % 32;\n x[getOutputLength(len) - 1] = len;\n var a = 1732584193;\n var b = -271733879;\n var c = -1732584194;\n var d = 271733878;\n\n for (var i = 0; i < x.length; i += 16) {\n var olda = a;\n var oldb = b;\n var oldc = c;\n var oldd = d;\n a = md5ff(a, b, c, d, x[i], 7, -680876936);\n d = md5ff(d, a, b, c, x[i + 1], 12, -389564586);\n c = md5ff(c, d, a, b, x[i + 2], 17, 606105819);\n b = md5ff(b, c, d, a, x[i + 3], 22, -1044525330);\n a = md5ff(a, b, c, d, x[i + 4], 7, -176418897);\n d = md5ff(d, a, b, c, x[i + 5], 12, 1200080426);\n c = md5ff(c, d, a, b, x[i + 6], 17, -1473231341);\n b = md5ff(b, c, d, a, x[i + 7], 22, -45705983);\n a = md5ff(a, b, c, d, x[i + 8], 7, 1770035416);\n d = md5ff(d, a, b, c, x[i + 9], 12, -1958414417);\n c = md5ff(c, d, a, b, x[i + 10], 17, -42063);\n b = md5ff(b, c, d, a, x[i + 11], 22, -1990404162);\n a = md5ff(a, b, c, d, x[i + 12], 7, 1804603682);\n d = md5ff(d, a, b, c, x[i + 13], 12, -40341101);\n c = md5ff(c, d, a, b, x[i + 14], 17, -1502002290);\n b = md5ff(b, c, d, a, x[i + 15], 22, 1236535329);\n a = md5gg(a, b, c, d, x[i + 1], 5, -165796510);\n d = md5gg(d, a, b, c, x[i + 6], 9, -1069501632);\n c = md5gg(c, d, a, b, x[i + 11], 14, 643717713);\n b = md5gg(b, c, d, a, x[i], 20, -373897302);\n a = md5gg(a, b, c, d, x[i + 5], 5, -701558691);\n d = md5gg(d, a, b, c, x[i + 10], 9, 38016083);\n c = md5gg(c, d, a, b, x[i + 15], 14, -660478335);\n b = md5gg(b, c, d, a, x[i + 4], 20, -405537848);\n a = md5gg(a, b, c, d, x[i + 9], 5, 568446438);\n d = md5gg(d, a, b, c, x[i + 14], 9, -1019803690);\n c = md5gg(c, d, a, b, x[i + 3], 14, -187363961);\n b = md5gg(b, c, d, a, x[i + 8], 20, 1163531501);\n a = md5gg(a, b, c, d, x[i + 13], 5, -1444681467);\n d = md5gg(d, a, b, c, x[i + 2], 9, -51403784);\n c = md5gg(c, d, a, b, x[i + 7], 14, 1735328473);\n b = md5gg(b, c, d, a, x[i + 12], 20, -1926607734);\n a = md5hh(a, b, c, d, x[i + 5], 4, -378558);\n d = md5hh(d, a, b, c, x[i + 8], 11, -2022574463);\n c = md5hh(c, d, a, b, x[i + 11], 16, 1839030562);\n b = md5hh(b, c, d, a, x[i + 14], 23, -35309556);\n a = md5hh(a, b, c, d, x[i + 1], 4, -1530992060);\n d = md5hh(d, a, b, c, x[i + 4], 11, 1272893353);\n c = md5hh(c, d, a, b, x[i + 7], 16, -155497632);\n b = md5hh(b, c, d, a, x[i + 10], 23, -1094730640);\n a = md5hh(a, b, c, d, x[i + 13], 4, 681279174);\n d = md5hh(d, a, b, c, x[i], 11, -358537222);\n c = md5hh(c, d, a, b, x[i + 3], 16, -722521979);\n b = md5hh(b, c, d, a, x[i + 6], 23, 76029189);\n a = md5hh(a, b, c, d, x[i + 9], 4, -640364487);\n d = md5hh(d, a, b, c, x[i + 12], 11, -421815835);\n c = md5hh(c, d, a, b, x[i + 15], 16, 530742520);\n b = md5hh(b, c, d, a, x[i + 2], 23, -995338651);\n a = md5ii(a, b, c, d, x[i], 6, -198630844);\n d = md5ii(d, a, b, c, x[i + 7], 10, 1126891415);\n c = md5ii(c, d, a, b, x[i + 14], 15, -1416354905);\n b = md5ii(b, c, d, a, x[i + 5], 21, -57434055);\n a = md5ii(a, b, c, d, x[i + 12], 6, 1700485571);\n d = md5ii(d, a, b, c, x[i + 3], 10, -1894986606);\n c = md5ii(c, d, a, b, x[i + 10], 15, -1051523);\n b = md5ii(b, c, d, a, x[i + 1], 21, -2054922799);\n a = md5ii(a, b, c, d, x[i + 8], 6, 1873313359);\n d = md5ii(d, a, b, c, x[i + 15], 10, -30611744);\n c = md5ii(c, d, a, b, x[i + 6], 15, -1560198380);\n b = md5ii(b, c, d, a, x[i + 13], 21, 1309151649);\n a = md5ii(a, b, c, d, x[i + 4], 6, -145523070);\n d = md5ii(d, a, b, c, x[i + 11], 10, -1120210379);\n c = md5ii(c, d, a, b, x[i + 2], 15, 718787259);\n b = md5ii(b, c, d, a, x[i + 9], 21, -343485551);\n a = safeAdd(a, olda);\n b = safeAdd(b, oldb);\n c = safeAdd(c, oldc);\n d = safeAdd(d, oldd);\n }\n\n return [a, b, c, d];\n}\n/*\n * Convert an array bytes to an array of little-endian words\n * Characters >255 have their high-byte silently ignored.\n */\n\n\nfunction bytesToWords(input) {\n if (input.length === 0) {\n return [];\n }\n\n var length8 = input.length * 8;\n var output = new Uint32Array(getOutputLength(length8));\n\n for (var i = 0; i < length8; i += 8) {\n output[i >> 5] |= (input[i / 8] & 0xff) << i % 32;\n }\n\n return output;\n}\n/*\n * Add integers, wrapping at 2^32. This uses 16-bit operations internally\n * to work around bugs in some JS interpreters.\n */\n\n\nfunction safeAdd(x, y) {\n var lsw = (x & 0xffff) + (y & 0xffff);\n var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n return msw << 16 | lsw & 0xffff;\n}\n/*\n * Bitwise rotate a 32-bit number to the left.\n */\n\n\nfunction bitRotateLeft(num, cnt) {\n return num << cnt | num >>> 32 - cnt;\n}\n/*\n * These functions implement the four basic operations the algorithm uses.\n */\n\n\nfunction md5cmn(q, a, b, x, s, t) {\n return safeAdd(bitRotateLeft(safeAdd(safeAdd(a, q), safeAdd(x, t)), s), b);\n}\n\nfunction md5ff(a, b, c, d, x, s, t) {\n return md5cmn(b & c | ~b & d, a, b, x, s, t);\n}\n\nfunction md5gg(a, b, c, d, x, s, t) {\n return md5cmn(b & d | c & ~d, a, b, x, s, t);\n}\n\nfunction md5hh(a, b, c, d, x, s, t) {\n return md5cmn(b ^ c ^ d, a, b, x, s, t);\n}\n\nfunction md5ii(a, b, c, d, x, s, t) {\n return md5cmn(c ^ (b | ~d), a, b, x, s, t);\n}\n\nexport default md5;","export default '00000000-0000-0000-0000-000000000000';","import validate from './validate.js';\n\nfunction parse(uuid) {\n if (!validate(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n var v;\n var arr = new Uint8Array(16); // Parse ########-....-....-....-............\n\n arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24;\n arr[1] = v >>> 16 & 0xff;\n arr[2] = v >>> 8 & 0xff;\n arr[3] = v & 0xff; // Parse ........-####-....-....-............\n\n arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8;\n arr[5] = v & 0xff; // Parse ........-....-####-....-............\n\n arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8;\n arr[7] = v & 0xff; // Parse ........-....-....-####-............\n\n arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8;\n arr[9] = v & 0xff; // Parse ........-....-....-....-############\n // (Use \"/\" to avoid 32-bit truncation when bit-shifting high-order bytes)\n\n arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff;\n arr[11] = v / 0x100000000 & 0xff;\n arr[12] = v >>> 24 & 0xff;\n arr[13] = v >>> 16 & 0xff;\n arr[14] = v >>> 8 & 0xff;\n arr[15] = v & 0xff;\n return arr;\n}\n\nexport default parse;","export default /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;","// Unique ID creation requires a high quality random # generator. In the browser we therefore\n// require the crypto API and do not support built-in fallback to lower quality random number\n// generators (like Math.random()).\nvar getRandomValues;\nvar rnds8 = new Uint8Array(16);\nexport default function rng() {\n // lazy load so that environments that need to polyfill have a chance to do so\n if (!getRandomValues) {\n // getRandomValues needs to be invoked in a context where \"this\" is a Crypto implementation. Also,\n // find the complete implementation of crypto (msCrypto) on IE11.\n getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto !== 'undefined' && typeof msCrypto.getRandomValues === 'function' && msCrypto.getRandomValues.bind(msCrypto);\n\n if (!getRandomValues) {\n throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');\n }\n }\n\n return getRandomValues(rnds8);\n}","// Adapted from Chris Veness' SHA1 code at\n// http://www.movable-type.co.uk/scripts/sha1.html\nfunction f(s, x, y, z) {\n switch (s) {\n case 0:\n return x & y ^ ~x & z;\n\n case 1:\n return x ^ y ^ z;\n\n case 2:\n return x & y ^ x & z ^ y & z;\n\n case 3:\n return x ^ y ^ z;\n }\n}\n\nfunction ROTL(x, n) {\n return x << n | x >>> 32 - n;\n}\n\nfunction sha1(bytes) {\n var K = [0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xca62c1d6];\n var H = [0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0];\n\n if (typeof bytes === 'string') {\n var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape\n\n bytes = [];\n\n for (var i = 0; i < msg.length; ++i) {\n bytes.push(msg.charCodeAt(i));\n }\n } else if (!Array.isArray(bytes)) {\n // Convert Array-like to Array\n bytes = Array.prototype.slice.call(bytes);\n }\n\n bytes.push(0x80);\n var l = bytes.length / 4 + 2;\n var N = Math.ceil(l / 16);\n var M = new Array(N);\n\n for (var _i = 0; _i < N; ++_i) {\n var arr = new Uint32Array(16);\n\n for (var j = 0; j < 16; ++j) {\n arr[j] = bytes[_i * 64 + j * 4] << 24 | bytes[_i * 64 + j * 4 + 1] << 16 | bytes[_i * 64 + j * 4 + 2] << 8 | bytes[_i * 64 + j * 4 + 3];\n }\n\n M[_i] = arr;\n }\n\n M[N - 1][14] = (bytes.length - 1) * 8 / Math.pow(2, 32);\n M[N - 1][14] = Math.floor(M[N - 1][14]);\n M[N - 1][15] = (bytes.length - 1) * 8 & 0xffffffff;\n\n for (var _i2 = 0; _i2 < N; ++_i2) {\n var W = new Uint32Array(80);\n\n for (var t = 0; t < 16; ++t) {\n W[t] = M[_i2][t];\n }\n\n for (var _t = 16; _t < 80; ++_t) {\n W[_t] = ROTL(W[_t - 3] ^ W[_t - 8] ^ W[_t - 14] ^ W[_t - 16], 1);\n }\n\n var a = H[0];\n var b = H[1];\n var c = H[2];\n var d = H[3];\n var e = H[4];\n\n for (var _t2 = 0; _t2 < 80; ++_t2) {\n var s = Math.floor(_t2 / 20);\n var T = ROTL(a, 5) + f(s, b, c, d) + e + K[s] + W[_t2] >>> 0;\n e = d;\n d = c;\n c = ROTL(b, 30) >>> 0;\n b = a;\n a = T;\n }\n\n H[0] = H[0] + a >>> 0;\n H[1] = H[1] + b >>> 0;\n H[2] = H[2] + c >>> 0;\n H[3] = H[3] + d >>> 0;\n H[4] = H[4] + e >>> 0;\n }\n\n return [H[0] >> 24 & 0xff, H[0] >> 16 & 0xff, H[0] >> 8 & 0xff, H[0] & 0xff, H[1] >> 24 & 0xff, H[1] >> 16 & 0xff, H[1] >> 8 & 0xff, H[1] & 0xff, H[2] >> 24 & 0xff, H[2] >> 16 & 0xff, H[2] >> 8 & 0xff, H[2] & 0xff, H[3] >> 24 & 0xff, H[3] >> 16 & 0xff, H[3] >> 8 & 0xff, H[3] & 0xff, H[4] >> 24 & 0xff, H[4] >> 16 & 0xff, H[4] >> 8 & 0xff, H[4] & 0xff];\n}\n\nexport default sha1;","import validate from './validate.js';\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\n\nvar byteToHex = [];\n\nfor (var i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).substr(1));\n}\n\nfunction stringify(arr) {\n var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n var uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!validate(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n\n return uuid;\n}\n\nexport default stringify;","import rng from './rng.js';\nimport stringify from './stringify.js'; // **`v1()` - Generate time-based UUID**\n//\n// Inspired by https://github.com/LiosK/UUID.js\n// and http://docs.python.org/library/uuid.html\n\nvar _nodeId;\n\nvar _clockseq; // Previous uuid creation time\n\n\nvar _lastMSecs = 0;\nvar _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details\n\nfunction v1(options, buf, offset) {\n var i = buf && offset || 0;\n var b = buf || new Array(16);\n options = options || {};\n var node = options.node || _nodeId;\n var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not\n // specified. We do this lazily to minimize issues related to insufficient\n // system entropy. See #189\n\n if (node == null || clockseq == null) {\n var seedBytes = options.random || (options.rng || rng)();\n\n if (node == null) {\n // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)\n node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]];\n }\n\n if (clockseq == null) {\n // Per 4.2.2, randomize (14 bit) clockseq\n clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;\n }\n } // UUID timestamps are 100 nano-second units since the Gregorian epoch,\n // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so\n // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'\n // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.\n\n\n var msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock\n // cycle to simulate higher resolution clock\n\n var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs)\n\n var dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression\n\n if (dt < 0 && options.clockseq === undefined) {\n clockseq = clockseq + 1 & 0x3fff;\n } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new\n // time interval\n\n\n if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {\n nsecs = 0;\n } // Per 4.2.1.2 Throw error if too many uuids are requested\n\n\n if (nsecs >= 10000) {\n throw new Error(\"uuid.v1(): Can't create more than 10M uuids/sec\");\n }\n\n _lastMSecs = msecs;\n _lastNSecs = nsecs;\n _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch\n\n msecs += 12219292800000; // `time_low`\n\n var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;\n b[i++] = tl >>> 24 & 0xff;\n b[i++] = tl >>> 16 & 0xff;\n b[i++] = tl >>> 8 & 0xff;\n b[i++] = tl & 0xff; // `time_mid`\n\n var tmh = msecs / 0x100000000 * 10000 & 0xfffffff;\n b[i++] = tmh >>> 8 & 0xff;\n b[i++] = tmh & 0xff; // `time_high_and_version`\n\n b[i++] = tmh >>> 24 & 0xf | 0x10; // include version\n\n b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)\n\n b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low`\n\n b[i++] = clockseq & 0xff; // `node`\n\n for (var n = 0; n < 6; ++n) {\n b[i + n] = node[n];\n }\n\n return buf || stringify(b);\n}\n\nexport default v1;","import v35 from './v35.js';\nimport md5 from './md5.js';\nvar v3 = v35('v3', 0x30, md5);\nexport default v3;","import stringify from './stringify.js';\nimport parse from './parse.js';\n\nfunction stringToBytes(str) {\n str = unescape(encodeURIComponent(str)); // UTF8 escape\n\n var bytes = [];\n\n for (var i = 0; i < str.length; ++i) {\n bytes.push(str.charCodeAt(i));\n }\n\n return bytes;\n}\n\nexport var DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8';\nexport var URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8';\nexport default function (name, version, hashfunc) {\n function generateUUID(value, namespace, buf, offset) {\n if (typeof value === 'string') {\n value = stringToBytes(value);\n }\n\n if (typeof namespace === 'string') {\n namespace = parse(namespace);\n }\n\n if (namespace.length !== 16) {\n throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)');\n } // Compute hash of namespace and value, Per 4.3\n // Future: Use spread syntax when supported on all platforms, e.g. `bytes =\n // hashfunc([...namespace, ... value])`\n\n\n var bytes = new Uint8Array(16 + value.length);\n bytes.set(namespace);\n bytes.set(value, namespace.length);\n bytes = hashfunc(bytes);\n bytes[6] = bytes[6] & 0x0f | version;\n bytes[8] = bytes[8] & 0x3f | 0x80;\n\n if (buf) {\n offset = offset || 0;\n\n for (var i = 0; i < 16; ++i) {\n buf[offset + i] = bytes[i];\n }\n\n return buf;\n }\n\n return stringify(bytes);\n } // Function#name is not settable on some platforms (#270)\n\n\n try {\n generateUUID.name = name; // eslint-disable-next-line no-empty\n } catch (err) {} // For CommonJS default export support\n\n\n generateUUID.DNS = DNS;\n generateUUID.URL = URL;\n return generateUUID;\n}","import rng from './rng.js';\nimport stringify from './stringify.js';\n\nfunction v4(options, buf, offset) {\n options = options || {};\n var rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n offset = offset || 0;\n\n for (var i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n\n return buf;\n }\n\n return stringify(rnds);\n}\n\nexport default v4;","import v35 from './v35.js';\nimport sha1 from './sha1.js';\nvar v5 = v35('v5', 0x50, sha1);\nexport default v5;","import REGEX from './regex.js';\n\nfunction validate(uuid) {\n return typeof uuid === 'string' && REGEX.test(uuid);\n}\n\nexport default validate;","import validate from './validate.js';\n\nfunction version(uuid) {\n if (!validate(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n return parseInt(uuid.substr(14, 1), 16);\n}\n\nexport default version;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","__webpack_require__.amdO = {};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = (module) => {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","import { type CloudInteropOverrideParams, cloudInteropOverride } from \"@openfin/cloud-interop\";\nimport type OpenFin from \"@openfin/core\";\nimport { connect } from \"@openfin/core-web\";\nimport { getDefaultLayout, getSettings } from \"./platform/settings\";\nimport type { Settings } from \"./shapes/setting-shapes\";\n\n/**\n * Sets up panels if supported.\n * @param settings The settings to use.\n */\nfunction setupPanels(settings: Settings): void {\n\tif (settings?.platform?.layout?.panels?.left) {\n\t\tconst leftPanel = settings.platform.layout.panels.left;\n\t\tconst leftPanelFrame = document.querySelector(`#${leftPanel.frameId}`);\n\t\tif (leftPanelFrame === null) {\n\t\t\tconsole.error(\n\t\t\t\t`Please ensure the document has an element with the following id #${leftPanel.frameContainerId} so that the web-layout can be applied.`\n\t\t\t);\n\t\t\treturn;\n\t\t}\n\t\tleftPanelFrame.src = leftPanel.url;\n\t\tconsole.log(`Panel ${leftPanel.frameId} has been setup with the url ${leftPanel.url}`);\n\t} else {\n\t\tconsole.log(\"No panels require setup.\");\n\t}\n}\n\n/**\n * Gets the required cloud settings.\n * @param settings The default settings.\n * @returns The cloud settings.\n */\nasync function getCloudSettings(settings: Settings): Promise {\n\tif (settings?.cloud?.connectParams?.url?.startsWith(\"http\")) {\n\t\treturn settings.cloud.connectParams;\n\t}\n\tconst mainPage = document.querySelector(\"#main-page\");\n\tconst cloudDetails = document.querySelector(\"#cloud-details\");\n\tconst btnSubmit = document.querySelector(\"#btnSubmit\");\n\tconst btnContinue = document.querySelector(\"#btnContinue\");\n\tmainPage?.classList.add(\"hidden\");\n\tcloudDetails?.classList.remove(\"hidden\");\n\n\treturn new Promise((resolve, reject) => {\n\t\tbtnContinue?.addEventListener(\"click\", async () => {\n\t\t\tcloudDetails?.classList.add(\"hidden\");\n\t\t\tmainPage?.classList.remove(\"hidden\");\n\t\t\treject(new Error(\"Running in local only mode as cloud interop settings have not been provided.\"));\n\t\t});\n\t\tbtnSubmit?.addEventListener(\"click\", async () => {\n\t\t\tconst userId = document.querySelector(\"#userId\")?.value;\n\t\t\tconst password = document.querySelector(\"#password\")?.value;\n\t\t\tconst platformId = document.querySelector(\"#platformId\")?.value;\n\t\t\tconst url = document.querySelector(\"#url\")?.value;\n\t\t\tconst sourceId = document.querySelector(\"#sourceId\")?.value;\n\t\t\tconst sourceDisplayName = document.querySelector(\"#sourceDisplayName\")?.value;\n\t\t\t// Check if the inputs are valid\n\t\t\tif (\n\t\t\t\tuserId === null ||\n\t\t\t\tpassword === null ||\n\t\t\t\tplatformId === null ||\n\t\t\t\turl === null ||\n\t\t\t\tuserId?.trim() === \"\" ||\n\t\t\t\tpassword?.trim() === \"\" ||\n\t\t\t\tplatformId?.trim() === \"\" ||\n\t\t\t\turl?.trim() === \"\"\n\t\t\t) {\n\t\t\t\treject(\n\t\t\t\t\tnew Error(\n\t\t\t\t\t\t\"Required cloud connect parameters are missing or invalid. Please check the settings. You will need configuration provided by OpenFin to connect to the cloud. Running in local only mode.\"\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}\n\t\t\tconst options = {\n\t\t\t\tuserId: userId ?? \"\",\n\t\t\t\tpassword: password ?? \"\",\n\t\t\t\tplatformId: platformId ?? \"\",\n\t\t\t\turl: url ?? \"\",\n\t\t\t\tsourceId: sourceId ?? \"cloud-interop\",\n\t\t\t\tsourceDisplayName: sourceDisplayName ?? \"Cloud Interop Example\"\n\t\t\t};\n\t\t\tcloudDetails?.classList.add(\"hidden\");\n\t\t\tmainPage?.classList.remove(\"hidden\");\n\t\t\tresolve(options);\n\t\t});\n\t});\n}\n\n/**\n * Initializes the OpenFin Web Broker and Cloud connection.\n */\nasync function init(): Promise {\n\t// Get the required settings\n\tconst settings = await getSettings();\n\t// Get the default layout\n\tconst layoutSnapshot = await getDefaultLayout();\n\n\tif (settings === undefined || layoutSnapshot === undefined) {\n\t\tconsole.error(\n\t\t\t\"Unable to run the sample as we have been unable to load the web manifest and it's settings from the currently running html page. Please ensure that the web manifest is being served and that it contains the custom_settings section.\"\n\t\t);\n\t\treturn;\n\t}\n\t// Get the dom element that should host the layout\n\tconst layoutContainer = document.querySelector(\n\t\t`#${settings.platform.layout.layoutContainerId}`\n\t);\n\tif (layoutContainer === null) {\n\t\tconsole.error(\n\t\t\t`Please ensure the document has an element with the following id #${settings.platform.layout.layoutContainerId} so that the web-layout can be applied.`\n\t\t);\n\t\treturn;\n\t}\n\tlet cloudSettings: CloudInteropOverrideParams | undefined;\n\ttry {\n\t\tcloudSettings = await getCloudSettings(settings);\n\t\tif (cloudSettings !== undefined) {\n\t\t\tsettings.cloud.connectParams = cloudSettings;\n\t\t}\n\t} catch (err) {\n\t\t// Get the element for displaying error messages\n\t\tconst error = document.querySelector(\"#error\");\n\t\tconsole.error(err);\n\t\tif (error !== null) {\n\t\t\terror.textContent = (err as Error).message;\n\t\t}\n\t}\n\t// Connect to the OpenFin Web Broker and pass the default layout.\n\t// It is good practice to specify providerId even if content is explicitly specifying it for cases where\n\t// this provider uses our layout system and content uses inheritance. currentContextGroup\n\t// is useful for defaulting any client that uses inheritance through our layout system.\n\tconst fin = await connect({\n\t\toptions: {\n\t\t\tbrokerUrl: settings.platform.interop.brokerUrl,\n\t\t\tinteropConfig: {\n\t\t\t\tproviderId: settings.platform.interop.providerId,\n\t\t\t\tcurrentContextGroup: settings.platform.interop.defaultContextGroup\n\t\t\t}\n\t\t},\n\t\tconnectionInheritance: \"enabled\",\n\t\tplatform: { layoutSnapshot }\n\t});\n\n\t// assign the fin api to the window object to make it globally available for consistency with container/workspace code.\n\twindow.fin = fin;\n\tif (cloudSettings === undefined) {\n\t\t// You may now use the `fin` object and initialize the Broker.\n\t\tawait fin.Interop.init(settings.platform.interop.providerId);\n\t} else {\n\t\t// You may now use the `fin` object and initialize the Broker with support for cloud interop.\n\t\tconst cloudOverride = (await cloudInteropOverride(\n\t\t\tcloudSettings\n\t\t)) as unknown as OpenFin.ConstructorOverride;\n\t\tawait fin.Interop.init(settings.platform.interop.providerId, [cloudOverride]);\n\t}\n\n\t// initialize the layout and pass it the dom element to bind to\n\tawait fin.Platform.Layout.init({\n\t\tcontainer: layoutContainer\n\t});\n\t// setup panels not that everything has been initialized\n\tsetupPanels(settings);\n}\n\ninit()\n\t.then(() => {\n\t\tconsole.log(\"Connected to the OpenFin Web Broker.\");\n\t\treturn true;\n\t})\n\t.catch((err) => console.error(err));\n"],"names":[],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"provider.bundle.js","mappings":";;;;;;;;;;;;;;;AAAgC;;AAEhC;AACA;AACA;AACA;AACA;;AAEA;;AAEA,OAAO,UAAU;AACjB,OAAO,gBAAgB;;AAEvB;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,SAAS;AACtB;AACA,OAAO,SAAS;;AAEhB;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;;AAGA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,UAAU;AACrB;AACA,WAAW,SAAS;AACpB,aAAa;AACb;AACA,2BAA2B,oBAAoB,IAAI;AACnD;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,gCAAgC,OAAO;AACvC;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,wFAAwF,qBAAM;AAC9F,CAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,SAAS,GAAG,SAAS;AAC5C,4BAA4B;AAC5B;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA,SAAS,UAAU;AACnB;AACA;AACA;AACA;AACA;AACA,MAAM;AACN,kCAAkC;AAClC,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;;AAEA,wCAAwC,OAAO;AAC/C;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,WAAW,SAAS;AACpB,aAAa,QAAQ;AACrB;AACA,gCAAgC,WAAW,IAAI;AAC/C;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,GAAG,GAAG,WAAW;AACjB;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,kBAAkB;AAC7B,WAAW,UAAU;AACrB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B,WAAW,UAAU;AACrB;AACA,aAAa;AACb;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,0BAA0B,eAAe;;AAEzC;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;AACA;AACA,WAAW,QAAQ;AACnB;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,SAAS,QAAQ;AACjB;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,SAAS;AACpB;AACA,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,aAAa,OAAO;AACpB;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB,CAAC;;AAED;AACA,oDAAoD,YAAY;;AAEhE;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA,GAAG;;AAEH;;AAEA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA,WAAW,YAAY;AACvB;AACA,aAAa;AACb;AACA;AACA;AACA;;AAEA,mDAAmD;AACnD;AACA,CAAC;;AAED;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB,WAAW,SAAS;AACpB,WAAW,UAAU;AACrB,WAAW,SAAS;AACpB,WAAW,SAAS;AACpB,WAAW,UAAU;AACrB;AACA,aAAa;AACb;;AAEA;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B,WAAW,QAAQ;AACnB,WAAW,qBAAqB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,yEAAyE,0CAAM;AAC/E;;AAEA;AACA;;AAEA;AACA;AACA;AACA,aAAa,GAAG;AAChB,aAAa,eAAe;AAC5B,aAAa,sBAAsB;AACnC,YAAY;AACZ;AACA,eAAe,SAAS;AACxB;AACA;AACA;;AAEA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA,WAAW,qBAAqB;AAChC,WAAW,qBAAqB;AAChC;AACA,aAAa;AACb;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,UAAU;AACvB,aAAa,UAAU;AACvB;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,eAAe,SAAS;AACxB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,UAAU;AACvB;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA,WAAW,YAAY;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,4BAA4B;AACzC;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gEAAgE;AAChE;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,wBAAwB,iBAAiB;AACzC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,GAAG;;AAEH;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,MAAM;AACN;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,2BAA2B,mBAAmB;AAC9C;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,KAAK;AACL,GAAG;AACH;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,oDAAoD,MAAM;AAC1D,oDAAoD;AACpD;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;AAEA;;AAEA;AACA;AACA;AACA,WAAW,gBAAgB;AAC3B,WAAW,SAAS;AACpB;AACA,aAAa,GAAG;AAChB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;;AAEH;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,SAAS;AACpB,WAAW,SAAS;AACpB,WAAW,SAAS;AACpB;AACA,aAAa,eAAe;AAC5B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA,uCAAuC;AACvC,KAAK;;AAEL;AACA,0DAA0D,wBAAwB;AAClF;AACA,KAAK;;AAEL;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,cAAc;AACd;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc,QAAQ;AACtB,gBAAgB;AAChB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,cAAc,QAAQ;AACtB,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA,0BAA0B,KAAK;AAC/B;AACA;;AAEA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,SAAS,6BAA6B;AACtC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,8CAA8C;AAC9C,QAAQ;AACR;AACA,oEAAoE;AACpE,yFAAyF;AACzF;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;;AAEP;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;;AAGA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,yCAAyC,MAAM;AAC/C,MAAM;AACN;AACA;AACA,8CAA8C,MAAM;AACpD;AACA,CAAC;;AAED,sCAAsC,OAAO;;AAE7C;;AAEA;AACA;AACA;;AAEA,WAAW,QAAQ;AACnB;AACA;;AAEA;;AAEA,oBAAoB,YAAY;AAChC;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA,mDAAmD,GAAG;AACtD;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA,yCAAyC,IAAI;AAC7C;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,SAAS;AACtB;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAG;AACH;;AAEA,uEAAuE,WAAW;;AAElF;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,iCAAiC,SAAS;AAC1C,MAAM;AACN,6BAA6B;AAC7B,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,8CAA8C;AAC9C;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA,WAAW,mBAAmB;AAC9B,WAAW,SAAS;AACpB,WAAW,SAAS;AACpB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB;AACA,aAAa;AACb;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,eAAe;AAC5B,aAAa,SAAS;AACtB;AACA,eAAe,SAAS;AACxB;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA,oEAAoE;;AAEpE;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA;;AAEA,WAAW,yCAAyC;;AAEpD;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,gDAAgD;AAChD;AACA;AACA,yBAAyB;AACzB,KAAK;AACL;AACA,CAAC;;AAED;AACA;;AAEA;AACA;AACA,kDAAkD;AAClD;AACA;AACA;AACA,UAAU,IAAI;AACd;AACA;AACA,OAAO;AACP;AACA;;AAEA;;AAEA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA,WAAW,UAAU;AACrB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,KAAK;;AAEL;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA,WAAW,UAAU;AACrB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC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A;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA,0CAA0C,iBAAiB;AAC3D;AACA,0CAA0C,iBAAiB;AAC3D;AACA;AACA,kEAAkE,uBAAuB;AACzF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D,uBAAuB,YAAY,+BAA+B;AAC/H;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA;AACA;AACA,4BAA4B,uBAAuB,kBAAkB,+BAA+B,GAAG,aAAa;AACpH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,gCAAgC;AAChE;AACA;AACA;AACA;AACA,wBAAwB,sDAAsD;AAC9E;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,IAAI;AACpC;AACA;AACA,mDAAmD,kBAAkB;AACrE;AACA,iBAAiB;AACjB;AACA,uCAAuC,SAAS;AAChD;AACA,2CAA2C,SAAS;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEgC;;;;;;;;;;;;ACz4GnB,MAAM,mBAAO,CAAC,qFAAoB,EAAE,mBAAO,CAAC,mDAAS,EAAE,mBAAO,CAAC,+DAAM,EAAE,mBAAO,CAAC,mDAAQ,EAAE,mBAAO,CAAC,gEAAkB,EAAE,mBAAO,CAAC,4DAAgB,EAAE,eAAe;;;;;;;;;;;;ACA9J,MAAM,mBAAO,CAAC,mDAAS,IAAI,mBAAO,CAAC,mDAAQ,IAAI,mBAAO,CA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AAO,EAAE,GAAG,mHAAmH,OAAO,0BAA0B,oBAAoB,aAAa,yBAAyB,iBAAiB,qCAAqC,EAAE,cAAc,2CAA2C,kDAAkD,OAAO,uBAAuB,SAAS,MAAM,OAAO,cAAc,eAAe,2BAA2B,OAAO,eAAe,sDAAsD,oCAAoC,IAAI,iIAAiI,sBAAsB,yCAAyC,2FAA2F;;;;;;;;;;;;ACFv6nD;;AAEZ,kBAAkB;AAClB,mBAAmB;AACnB,qBAAqB;;AAErB;AACA;AACA;;AAEA;AACA,mCAAmC,SAAS;AAC5C;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,cAAc,SAAS;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,2CAA2C,UAAU;AACrD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;ACrJA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEY;;AAEZ,eAAe,mBAAO,CAAC,wDAAW;AAClC,gBAAgB,mBAAO,CAAC,oDAAS;AACjC;AACA;AACA;AACA;;AAEA,cAAc;AACd,kBAAkB;AAClB,yBAAyB;;AAEzB;AACA,kBAAkB;;AAElB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,kBAAkB,YAAY;AAC9B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA,wCAAwC,SAAS;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;;AAEA;AACA;AACA,cAAc,iBAAiB;AAC/B;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,iDAAiD,EAAE;AACnD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C;AAC1C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA,yBAAyB,eAAe;AACxC;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,yBAAyB,QAAQ;AACjC;AACA,sBAAsB,eAAe;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc,YAAY;AAC1B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB,sBAAsB;AACxC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,mBAAmB;AACnB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA,oBAAoB,SAAS;AAC7B;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA,qBAAqB,WAAW,GAAG,IAAI;AACvC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA,gBAAgB,WAAW,GAAG,IAAI,KAAK,aAAa;AACpD;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;;AAEA;AACA,GAAG;AACH;AACA;AACA,mBAAmB,KAAK,mDAAmD,cAAc;AACzF,GAAG;AACH;AACA;AACA,+BAA+B,IAAI;AACnC;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,MAAM,aAAa,SAAS;AACtD;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,SAAS,gBAAgB;AACzB,cAAc,oBAAoB,EAAE,IAAI;AACxC;AACA,YAAY,gBAAgB,EAAE,IAAI;AAClC;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,GAAG,SAAS,GAAG,KAAK,qBAAqB,EAAE,EAAE;AACpE,QAAQ;AACR,yBAAyB,GAAG,KAAK,yBAAyB,EAAE,EAAE;AAC9D,mBAAmB,yBAAyB,EAAE,EAAE;AAChD;AACA,MAAM;AACN,oBAAoB,IAAI,EAAE,GAAG,SAAS,IAAI,EAAE,EAAE;AAC9C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,0CAA0C,cAAc,SAAS,OAAO;AACxE;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,kBAAkB,YAAY;AAC9B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,kBAAkB,gBAAgB;AAClC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,kBAAkB,gBAAgB;AAClC;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,cAAc,YAAY;AAC1B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,QAAQ;AAC1B;AACA,oBAAoB,QAAQ;AAC5B;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;;;;;ACzjEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEa;;AAEb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB;;AAEnB;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,sBAAsB;AACxC;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA,eAAe;AACf;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA,oBAAoB,SAAS;AAC7B;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;;AAEA,kCAAkC,QAAQ;AAC1C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oBAAoB,iBAAiB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,QAAQ;AACR;AACA,uCAAuC,QAAQ;AAC/C;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,OAAO;AACzB;AACA;AACA;;AAEA;AACA,SAAS,yBAAyB;AAClC;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,gBAAgB;AAClC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,8DAA8D,YAAY;AAC1E;AACA,8DAA8D,YAAY;AAC1E;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,qCAAqC,YAAY;AACjD;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;AACA;;;;;;;;;;;AChfA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,SAAS,WAAW;;AAEpB;AACA;AACA;AACA,SAAS,WAAW;;AAEpB;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;A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AClB,WAAW,UAAU;AACrB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACxBA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,kBAAkB,mBAAO,CAAC,+DAAe;AACzC,cAAc,mBAAO,CAAC,uDAAW;AACjC,eAAe,mBAAO,CAAC,yDAAY;AACnC,cAAc,mBAAO,CAAC,yDAAY;AAClC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,SAAS;AACpB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AChDA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACnBA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,UAAU;AACrB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACtBA,sBAAsB,mBAAO,CAAC,yEAAoB;AAClD,SAAS,mBAAO,CAAC,6CAAM;;AAEvB;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC3BA,SAAS,mBAAO,CAAC,6CAAM;;AAEvB;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,GAAG;AACd,aAAa,QAAQ;AAC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AAW;AACjC,eAAe,mBAAO,CAAC,yDAAY;AACnC,YAAY,mBAAO,CAAC,mDAAS;AAC7B,eAAe,mBAAO,CAAC,yDAAY;AACnC,YAAY,mBAAO,CAAC,mDAAS;AAC7B,WAAW,mBAAO,CAAC,iDAAQ;AAC3B,aAAa,mBAAO,CAAC,qDAAU;;AAE/B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,SAAS;AACpB;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa,GAAG;AAChB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;AACA,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;;;;;;;;;;ACrKA,eAAe,mBAAO,CAAC,yDAAY;;AAEnC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;;;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;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClFA,aAAa,mBAAO,CAAC,uDAAW;AAChC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA,iBAAiB,mBAAO,CAAC,6DAAc;AACvC,eAAe,mBAAO,CAAC,2DAAa;AACpC,eAAe,mBAAO,CAAC,yDAAY;AACnC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;AACA;AACA;AACA,oCAAoC;;AAEpC;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC9CA,aAAa,mBAAO,CAAC,uDAAW;AAChC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,eAAe,mBAAO,CAAC,yDAAY;AACnC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC3DA,kBAAkB,mBAAO,CAAC,iEAAgB;AAC1C,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC7BA,eAAe,mBAAO,CAAC,yDAAY;AACnC,kBAAkB,mBAAO,CAAC,iEAAgB;AAC1C,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AChCA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACnBA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,aAAa,UAAU;AACvB;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACbA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACZA,iBAA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A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACnFA,aAAa,mBAAO,CAAC,uDAAW;AAChC,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,SAAS,mBAAO,CAAC,6CAAM;AACvB,kBAAkB,mBAAO,CAAC,iEAAgB;AAC1C,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC/GA,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA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;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACzDA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa,GAAG;AAChB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACZA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACdA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AChBA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,GAAG;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC7BA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACtBA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACtBA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACzBA,uBAAuB,mBAAO,CAAC,2EAAqB;AACpD,oBAAoB,mBAAO,CAAC,qEAAkB;AAC9C,kBAAkB,mBAAO,CAAC,iEAAgB;AAC1C,kBAAkB,mBAAO,CAAC,iEAAgB;AAC1C,sBAAsB,mBAAO,CAAC,yEAAoB;;AAElD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC5EA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,mBAAmB,mBAAO,CAAC,mEAAiB;AAC5C,kBAAkB,mBAAO,CAAC,iEAAgB;;AAE1C;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACxBA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACdA,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACnBA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACZA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClCA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,GAAG;AAChB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;AClBA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACfA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACzBA,WAAW,mBAAO,CAAC,mDAAS;AAC5B,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,UAAU,mBAAO,CAAC,iDAAQ;;AAE1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpBA,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA,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AACA,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,aAAa,UAAU;AACvB;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACdA,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;ACRA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACbA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;;;;;;;;;;ACjBA,gBAAgB,mBAAO,CAAC,6DAAc;;AAEtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACdA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,GAAG;AAChB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACbA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACbA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,UAAU,mBAAO,CAAC,iDAAQ;AAC1B,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjCA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;;;;;;;;;;;ACzBA,gBAAgB,mBAAO,CAAC,6DAAc;;AAEtC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,GAAG;AAChB;AACA;AACA;AACA,oBAAoB,QAAQ,IAAI,QAAQ;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,kBAAkB;AAClB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpCA,sBAAsB,mBAAO,CAAC,yEAAoB;AAClD,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA,8BAA8B,mBAAmB;AACjD;AACA;AACA;AACA;AACA;AACA,+CAA+C,mBAAmB;AAClE;AACA;AACA;;AAEA;;;;;;;;;;;ACnCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACzBA,iBAAiB,mBAAO,CAAC,6DAAc;AACvC,eAAe,mBAAO,CAAC,yDAAY;;AAEnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AChCA,WAAW,mBAAO,CAAC,mDAAS;AAC5B,gBAAgB,mBAAO,CAAC,2DAAa;;AAErC;AACA,kBAAkB,KAA0B;;AAE5C;AACA,gCAAgC,QAAa;;AAE7C;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACrCA,kBAAkB,mBAAO,CAAC,iEAAgB;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,kBAAkB;AAClB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClCA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,eAAe,mBAAO,CAAC,yDAAY;;AAEnC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpCA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClCA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC1BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC9BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC5BA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC1BA,uBAAuB,mBAAO,CAAC,2EAAqB;AACpD,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC1BA,oBAAoB,mBAAO,CAAC,qEAAkB;AAC9C,eAAe,mBAAO,CAAC,2DAAa;AACpC,kBAAkB,mBAAO,CAAC,+DAAe;;AAEz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AChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,kBAAkB,aAAa;AAC/B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,iEAAe,GAAG;;;;;;;;;;;;;;;ACtNlB,iEAAe,sCAAsC;;;;;;;;;;;;;;;;ACAhB;;AAErC;AACA,OAAO,wDAAQ;AACf;AACA;;AAEA;AACA,gCAAgC;;AAEhC;AACA;AACA;AACA,qBAAqB;;AAErB;AACA,qBAAqB;;AAErB;AACA,qBAAqB;;AAErB;AACA,qBAAqB;AACrB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,iEAAe,KAAK;;;;;;;;;;;;;;;AClCpB,iEAAe,cAAc,EAAE,UAAU,EAAE,eAAe,EAAE,gBAAgB,EAAE,UAAU,GAAG,yCAAyC;;;;;;;;;;;;;;;ACApI;AACA;AACA;AACA;AACA;AACe;AACf;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;AClBA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;A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,GAAG,GAAG,CAAC;IACjB,IAAI,aAAa,KAAK,SAAS,EAAE,CAAC;QACjC,8DAA8D;QAC9D,MAAM,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;IAC9D,CAAC;SAAM,CAAC;QACP,6FAA6F;QAC7F,MAAM,aAAa,GAAG,CAAC,MAAM,wCAAoB,EAChD,aAAa,CACb,CAAkE,CAAC;QACpE,MAAM,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,UAAU,EAAE,CAAC,aAAa,CAAC,CAAC,CAAC;IAC/E,CAAC;IAED,+DAA+D;IAC/D,MAAM,GAAG,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC;QAC9B,SAAS,EAAE,eAAe;KAC1B,CAAC,CAAC;IACH,wDAAwD;IACxD,WAAW,CAAC,QAAQ,CAAC,CAAC;AACvB,CAAC;AAED,IAAI,EAAE;KACJ,IAAI,CAAC,GAAG,EAAE;IACV,OAAO,CAAC,GAAG,CAAC,sCAAsC,CAAC,CAAC;IACpD,OAAO,IAAI,CAAC;AACb,CAAC,CAAC;KACD,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC","sources":["webpack://openfin-web--cloud-interop/../../node_modules/@openfin/cloud-interop/out/index.js","webpack://openfin-web--cloud-interop/../../node_modules/@openfin/core-web/out/api-client.js","webpack://openfin-web--cloud-interop/../../node_modules/@openfin/core-web/out/main-8cad4070.js","webpack://openfin-web--cloud-interop/../../node_modules/@openfin/core-web/out/main-b14f67c9.js","webpack://openfin-web--cloud-interop/../../node_modules/base64-js/index.js","webpack://openfin-web--cloud-interop/../../node_modules/buffer/index.js","webpack://openfin-web--cloud-interop/../../node_modules/events/events.js","webpack://openfin-web--cloud-interop/../../node_modules/ieee754/index.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_DataView.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_Hash.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_ListCache.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_Map.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_MapCache.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_Promise.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_Set.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_SetCache.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_Stack.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_Symbol.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_Uint8Array.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_WeakMap.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_arrayEach.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_arrayFilter.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_arrayLikeKeys.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_arrayPush.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_arraySome.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_assignValue.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_assocIndexOf.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseAssign.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseAssignIn.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseAssignValue.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseClone.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseCreate.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseGetAllKeys.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseGetTag.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseIsArguments.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseIsEqual.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseIsEqualDeep.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseIsMap.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseIsNative.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseIsSet.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseIsTypedArray.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseKeys.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseKeysIn.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseTimes.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_baseUnary.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_cacheHas.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_cloneArrayBuffer.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_cloneBuffer.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_cloneDataView.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_cloneRegExp.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_cloneSymbol.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_cloneTypedArray.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_copyArray.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_copyObject.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_copySymbols.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_copySymbolsIn.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_coreJsData.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_defineProperty.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_equalArrays.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_equalByTag.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_equalObjects.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_freeGlobal.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_getAllKeys.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_getAllKeysIn.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_getMapData.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_getNative.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_getPrototype.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_getRawTag.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_getSymbols.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_getSymbolsIn.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_getTag.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_getValue.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_hashClear.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_hashDelete.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_hashGet.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_hashHas.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_hashSet.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_initCloneArray.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_initCloneByTag.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_initCloneObject.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_isIndex.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_isKeyable.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_isMasked.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_isPrototype.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_listCacheClear.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_listCacheDelete.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_listCacheGet.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_listCacheHas.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_listCacheSet.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_mapCacheClear.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_mapCacheDelete.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_mapCacheGet.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_mapCacheHas.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_mapCacheSet.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_mapToArray.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_nativeCreate.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_nativeKeys.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_nativeKeysIn.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_nodeUtil.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_objectToString.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_overArg.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_root.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_setCacheAdd.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_setCacheHas.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_setToArray.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_stackClear.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_stackDelete.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_stackGet.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_stackHas.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_stackSet.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/_toSource.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/cloneDeep.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/eq.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/isArguments.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/isArray.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/isArrayLike.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/isBuffer.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/isEqual.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/isFunction.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/isLength.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/isMap.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/isObject.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/isObjectLike.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/isSet.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/isTypedArray.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/keys.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/keysIn.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/stubArray.js","webpack://openfin-web--cloud-interop/../../node_modules/lodash/stubFalse.js","webpack://openfin-web--cloud-interop/./client/src/platform/settings.ts","webpack://openfin-web--cloud-interop/../../node_modules/uuid/dist/esm-browser/index.js","webpack://openfin-web--cloud-interop/../../node_modules/uuid/dist/esm-browser/md5.js","webpack://openfin-web--cloud-interop/../../node_modules/uuid/dist/esm-browser/nil.js","webpack://openfin-web--cloud-interop/../../node_modules/uuid/dist/esm-browser/parse.js","webpack://openfin-web--cloud-interop/../../node_modules/uuid/dist/esm-browser/regex.js","webpack://openfin-web--cloud-interop/../../node_modules/uuid/dist/esm-browser/rng.js","webpack://openfin-web--cloud-interop/../../node_modules/uuid/dist/esm-browser/sha1.js","webpack://openfin-web--cloud-interop/../../node_modules/uuid/dist/esm-browser/stringify.js","webpack://openfin-web--cloud-interop/../../node_modules/uuid/dist/esm-browser/v1.js","webpack://openfin-web--cloud-interop/../../node_modules/uuid/dist/esm-browser/v3.js","webpack://openfin-web--cloud-interop/../../node_modules/uuid/dist/esm-browser/v35.js","webpack://openfin-web--cloud-interop/../../node_modules/uuid/dist/esm-browser/v4.js","webpack://openfin-web--cloud-interop/../../node_modules/uuid/dist/esm-browser/v5.js","webpack://openfin-web--cloud-interop/../../node_modules/uuid/dist/esm-browser/validate.js","webpack://openfin-web--cloud-interop/../../node_modules/uuid/dist/esm-browser/version.js","webpack://openfin-web--cloud-interop/webpack/bootstrap","webpack://openfin-web--cloud-interop/webpack/runtime/amd options","webpack://openfin-web--cloud-interop/webpack/runtime/define property getters","webpack://openfin-web--cloud-interop/webpack/runtime/global","webpack://openfin-web--cloud-interop/webpack/runtime/hasOwnProperty shorthand","webpack://openfin-web--cloud-interop/webpack/runtime/make namespace object","webpack://openfin-web--cloud-interop/webpack/runtime/node module decorator","webpack://openfin-web--cloud-interop/./client/src/provider.ts"],"sourcesContent":["import { Buffer } from 'buffer';\n\nfunction bind(fn, thisArg) {\n return function wrap() {\n return fn.apply(thisArg, arguments);\n };\n}\n\n// utils is a library of generic helper functions non-specific to axios\n\nconst {toString} = Object.prototype;\nconst {getPrototypeOf} = Object;\n\nconst kindOf = (cache => thing => {\n const str = toString.call(thing);\n return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());\n})(Object.create(null));\n\nconst kindOfTest = (type) => {\n type = type.toLowerCase();\n return (thing) => kindOf(thing) === type\n};\n\nconst typeOfTest = type => thing => typeof thing === type;\n\n/**\n * Determine if a value is an Array\n *\n * @param {Object} val The value to test\n *\n * @returns {boolean} True if value is an Array, otherwise false\n */\nconst {isArray} = Array;\n\n/**\n * Determine if a value is undefined\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if the value is undefined, otherwise false\n */\nconst isUndefined = typeOfTest('undefined');\n\n/**\n * Determine if a value is a Buffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Buffer, otherwise false\n */\nfunction isBuffer(val) {\n return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)\n && isFunction(val.constructor.isBuffer) && val.constructor.isBuffer(val);\n}\n\n/**\n * Determine if a value is an ArrayBuffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is an ArrayBuffer, otherwise false\n */\nconst isArrayBuffer = kindOfTest('ArrayBuffer');\n\n\n/**\n * Determine if a value is a view on an ArrayBuffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false\n */\nfunction isArrayBufferView(val) {\n let result;\n if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {\n result = ArrayBuffer.isView(val);\n } else {\n result = (val) && (val.buffer) && (isArrayBuffer(val.buffer));\n }\n return result;\n}\n\n/**\n * Determine if a value is a String\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a String, otherwise false\n */\nconst isString = typeOfTest('string');\n\n/**\n * Determine if a value is a Function\n *\n * @param {*} val The value to test\n * @returns {boolean} True if value is a Function, otherwise false\n */\nconst isFunction = typeOfTest('function');\n\n/**\n * Determine if a value is a Number\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Number, otherwise false\n */\nconst isNumber = typeOfTest('number');\n\n/**\n * Determine if a value is an Object\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value is an Object, otherwise false\n */\nconst isObject = (thing) => thing !== null && typeof thing === 'object';\n\n/**\n * Determine if a value is a Boolean\n *\n * @param {*} thing The value to test\n * @returns {boolean} True if value is a Boolean, otherwise false\n */\nconst isBoolean = thing => thing === true || thing === false;\n\n/**\n * Determine if a value is a plain Object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a plain Object, otherwise false\n */\nconst isPlainObject = (val) => {\n if (kindOf(val) !== 'object') {\n return false;\n }\n\n const prototype = getPrototypeOf(val);\n return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in val) && !(Symbol.iterator in val);\n};\n\n/**\n * Determine if a value is a Date\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Date, otherwise false\n */\nconst isDate = kindOfTest('Date');\n\n/**\n * Determine if a value is a File\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a File, otherwise false\n */\nconst isFile = kindOfTest('File');\n\n/**\n * Determine if a value is a Blob\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Blob, otherwise false\n */\nconst isBlob = kindOfTest('Blob');\n\n/**\n * Determine if a value is a FileList\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a File, otherwise false\n */\nconst isFileList = kindOfTest('FileList');\n\n/**\n * Determine if a value is a Stream\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Stream, otherwise false\n */\nconst isStream = (val) => isObject(val) && isFunction(val.pipe);\n\n/**\n * Determine if a value is a FormData\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value is an FormData, otherwise false\n */\nconst isFormData = (thing) => {\n let kind;\n return thing && (\n (typeof FormData === 'function' && thing instanceof FormData) || (\n isFunction(thing.append) && (\n (kind = kindOf(thing)) === 'formdata' ||\n // detect form-data instance\n (kind === 'object' && isFunction(thing.toString) && thing.toString() === '[object FormData]')\n )\n )\n )\n};\n\n/**\n * Determine if a value is a URLSearchParams object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a URLSearchParams object, otherwise false\n */\nconst isURLSearchParams = kindOfTest('URLSearchParams');\n\n/**\n * Trim excess whitespace off the beginning and end of a string\n *\n * @param {String} str The String to trim\n *\n * @returns {String} The String freed of excess whitespace\n */\nconst trim = (str) => str.trim ?\n str.trim() : str.replace(/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g, '');\n\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n *\n * @param {Boolean} [allOwnKeys = false]\n * @returns {any}\n */\nfunction forEach(obj, fn, {allOwnKeys = false} = {}) {\n // Don't bother if no value provided\n if (obj === null || typeof obj === 'undefined') {\n return;\n }\n\n let i;\n let l;\n\n // Force an array if not already something iterable\n if (typeof obj !== 'object') {\n /*eslint no-param-reassign:0*/\n obj = [obj];\n }\n\n if (isArray(obj)) {\n // Iterate over array values\n for (i = 0, l = obj.length; i < l; i++) {\n fn.call(null, obj[i], i, obj);\n }\n } else {\n // Iterate over object keys\n const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);\n const len = keys.length;\n let key;\n\n for (i = 0; i < len; i++) {\n key = keys[i];\n fn.call(null, obj[key], key, obj);\n }\n }\n}\n\nfunction findKey(obj, key) {\n key = key.toLowerCase();\n const keys = Object.keys(obj);\n let i = keys.length;\n let _key;\n while (i-- > 0) {\n _key = keys[i];\n if (key === _key.toLowerCase()) {\n return _key;\n }\n }\n return null;\n}\n\nconst _global = (() => {\n /*eslint no-undef:0*/\n if (typeof globalThis !== \"undefined\") return globalThis;\n return typeof self !== \"undefined\" ? self : (typeof window !== 'undefined' ? window : global)\n})();\n\nconst isContextDefined = (context) => !isUndefined(context) && context !== _global;\n\n/**\n * Accepts varargs expecting each argument to be an object, then\n * immutably merges the properties of each object and returns result.\n *\n * When multiple objects contain the same key the later object in\n * the arguments list will take precedence.\n *\n * Example:\n *\n * ```js\n * var result = merge({foo: 123}, {foo: 456});\n * console.log(result.foo); // outputs 456\n * ```\n *\n * @param {Object} obj1 Object to merge\n *\n * @returns {Object} Result of all merge properties\n */\nfunction merge(/* obj1, obj2, obj3, ... */) {\n const {caseless} = isContextDefined(this) && this || {};\n const result = {};\n const assignValue = (val, key) => {\n const targetKey = caseless && findKey(result, key) || key;\n if (isPlainObject(result[targetKey]) && isPlainObject(val)) {\n result[targetKey] = merge(result[targetKey], val);\n } else if (isPlainObject(val)) {\n result[targetKey] = merge({}, val);\n } else if (isArray(val)) {\n result[targetKey] = val.slice();\n } else {\n result[targetKey] = val;\n }\n };\n\n for (let i = 0, l = arguments.length; i < l; i++) {\n arguments[i] && forEach(arguments[i], assignValue);\n }\n return result;\n}\n\n/**\n * Extends object a by mutably adding to it the properties of object b.\n *\n * @param {Object} a The object to be extended\n * @param {Object} b The object to copy properties from\n * @param {Object} thisArg The object to bind function to\n *\n * @param {Boolean} [allOwnKeys]\n * @returns {Object} The resulting value of object a\n */\nconst extend = (a, b, thisArg, {allOwnKeys}= {}) => {\n forEach(b, (val, key) => {\n if (thisArg && isFunction(val)) {\n a[key] = bind(val, thisArg);\n } else {\n a[key] = val;\n }\n }, {allOwnKeys});\n return a;\n};\n\n/**\n * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)\n *\n * @param {string} content with BOM\n *\n * @returns {string} content value without BOM\n */\nconst stripBOM = (content) => {\n if (content.charCodeAt(0) === 0xFEFF) {\n content = content.slice(1);\n }\n return content;\n};\n\n/**\n * Inherit the prototype methods from one constructor into another\n * @param {function} constructor\n * @param {function} superConstructor\n * @param {object} [props]\n * @param {object} [descriptors]\n *\n * @returns {void}\n */\nconst inherits = (constructor, superConstructor, props, descriptors) => {\n constructor.prototype = Object.create(superConstructor.prototype, descriptors);\n constructor.prototype.constructor = constructor;\n Object.defineProperty(constructor, 'super', {\n value: superConstructor.prototype\n });\n props && Object.assign(constructor.prototype, props);\n};\n\n/**\n * Resolve object with deep prototype chain to a flat object\n * @param {Object} sourceObj source object\n * @param {Object} [destObj]\n * @param {Function|Boolean} [filter]\n * @param {Function} [propFilter]\n *\n * @returns {Object}\n */\nconst toFlatObject = (sourceObj, destObj, filter, propFilter) => {\n let props;\n let i;\n let prop;\n const merged = {};\n\n destObj = destObj || {};\n // eslint-disable-next-line no-eq-null,eqeqeq\n if (sourceObj == null) return destObj;\n\n do {\n props = Object.getOwnPropertyNames(sourceObj);\n i = props.length;\n while (i-- > 0) {\n prop = props[i];\n if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) {\n destObj[prop] = sourceObj[prop];\n merged[prop] = true;\n }\n }\n sourceObj = filter !== false && getPrototypeOf(sourceObj);\n } while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype);\n\n return destObj;\n};\n\n/**\n * Determines whether a string ends with the characters of a specified string\n *\n * @param {String} str\n * @param {String} searchString\n * @param {Number} [position= 0]\n *\n * @returns {boolean}\n */\nconst endsWith = (str, searchString, position) => {\n str = String(str);\n if (position === undefined || position > str.length) {\n position = str.length;\n }\n position -= searchString.length;\n const lastIndex = str.indexOf(searchString, position);\n return lastIndex !== -1 && lastIndex === position;\n};\n\n\n/**\n * Returns new array from array like object or null if failed\n *\n * @param {*} [thing]\n *\n * @returns {?Array}\n */\nconst toArray = (thing) => {\n if (!thing) return null;\n if (isArray(thing)) return thing;\n let i = thing.length;\n if (!isNumber(i)) return null;\n const arr = new Array(i);\n while (i-- > 0) {\n arr[i] = thing[i];\n }\n return arr;\n};\n\n/**\n * Checking if the Uint8Array exists and if it does, it returns a function that checks if the\n * thing passed in is an instance of Uint8Array\n *\n * @param {TypedArray}\n *\n * @returns {Array}\n */\n// eslint-disable-next-line func-names\nconst isTypedArray = (TypedArray => {\n // eslint-disable-next-line func-names\n return thing => {\n return TypedArray && thing instanceof TypedArray;\n };\n})(typeof Uint8Array !== 'undefined' && getPrototypeOf(Uint8Array));\n\n/**\n * For each entry in the object, call the function with the key and value.\n *\n * @param {Object} obj - The object to iterate over.\n * @param {Function} fn - The function to call for each entry.\n *\n * @returns {void}\n */\nconst forEachEntry = (obj, fn) => {\n const generator = obj && obj[Symbol.iterator];\n\n const iterator = generator.call(obj);\n\n let result;\n\n while ((result = iterator.next()) && !result.done) {\n const pair = result.value;\n fn.call(obj, pair[0], pair[1]);\n }\n};\n\n/**\n * It takes a regular expression and a string, and returns an array of all the matches\n *\n * @param {string} regExp - The regular expression to match against.\n * @param {string} str - The string to search.\n *\n * @returns {Array}\n */\nconst matchAll = (regExp, str) => {\n let matches;\n const arr = [];\n\n while ((matches = regExp.exec(str)) !== null) {\n arr.push(matches);\n }\n\n return arr;\n};\n\n/* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */\nconst isHTMLForm = kindOfTest('HTMLFormElement');\n\nconst toCamelCase = str => {\n return str.toLowerCase().replace(/[-_\\s]([a-z\\d])(\\w*)/g,\n function replacer(m, p1, p2) {\n return p1.toUpperCase() + p2;\n }\n );\n};\n\n/* Creating a function that will check if an object has a property. */\nconst hasOwnProperty = (({hasOwnProperty}) => (obj, prop) => hasOwnProperty.call(obj, prop))(Object.prototype);\n\n/**\n * Determine if a value is a RegExp object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a RegExp object, otherwise false\n */\nconst isRegExp = kindOfTest('RegExp');\n\nconst reduceDescriptors = (obj, reducer) => {\n const descriptors = Object.getOwnPropertyDescriptors(obj);\n const reducedDescriptors = {};\n\n forEach(descriptors, (descriptor, name) => {\n let ret;\n if ((ret = reducer(descriptor, name, obj)) !== false) {\n reducedDescriptors[name] = ret || descriptor;\n }\n });\n\n Object.defineProperties(obj, reducedDescriptors);\n};\n\n/**\n * Makes all methods read-only\n * @param {Object} obj\n */\n\nconst freezeMethods = (obj) => {\n reduceDescriptors(obj, (descriptor, name) => {\n // skip restricted props in strict mode\n if (isFunction(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) {\n return false;\n }\n\n const value = obj[name];\n\n if (!isFunction(value)) return;\n\n descriptor.enumerable = false;\n\n if ('writable' in descriptor) {\n descriptor.writable = false;\n return;\n }\n\n if (!descriptor.set) {\n descriptor.set = () => {\n throw Error('Can not rewrite read-only method \\'' + name + '\\'');\n };\n }\n });\n};\n\nconst toObjectSet = (arrayOrString, delimiter) => {\n const obj = {};\n\n const define = (arr) => {\n arr.forEach(value => {\n obj[value] = true;\n });\n };\n\n isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter));\n\n return obj;\n};\n\nconst noop = () => {};\n\nconst toFiniteNumber = (value, defaultValue) => {\n value = +value;\n return Number.isFinite(value) ? value : defaultValue;\n};\n\nconst ALPHA = 'abcdefghijklmnopqrstuvwxyz';\n\nconst DIGIT = '0123456789';\n\nconst ALPHABET = {\n DIGIT,\n ALPHA,\n ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT\n};\n\nconst generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {\n let str = '';\n const {length} = alphabet;\n while (size--) {\n str += alphabet[Math.random() * length|0];\n }\n\n return str;\n};\n\n/**\n * If the thing is a FormData object, return true, otherwise return false.\n *\n * @param {unknown} thing - The thing to check.\n *\n * @returns {boolean}\n */\nfunction isSpecCompliantForm(thing) {\n return !!(thing && isFunction(thing.append) && thing[Symbol.toStringTag] === 'FormData' && thing[Symbol.iterator]);\n}\n\nconst toJSONObject = (obj) => {\n const stack = new Array(10);\n\n const visit = (source, i) => {\n\n if (isObject(source)) {\n if (stack.indexOf(source) >= 0) {\n return;\n }\n\n if(!('toJSON' in source)) {\n stack[i] = source;\n const target = isArray(source) ? [] : {};\n\n forEach(source, (value, key) => {\n const reducedValue = visit(value, i + 1);\n !isUndefined(reducedValue) && (target[key] = reducedValue);\n });\n\n stack[i] = undefined;\n\n return target;\n }\n }\n\n return source;\n };\n\n return visit(obj, 0);\n};\n\nconst isAsyncFn = kindOfTest('AsyncFunction');\n\nconst isThenable = (thing) =>\n thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch);\n\nvar utils$1 = {\n isArray,\n isArrayBuffer,\n isBuffer,\n isFormData,\n isArrayBufferView,\n isString,\n isNumber,\n isBoolean,\n isObject,\n isPlainObject,\n isUndefined,\n isDate,\n isFile,\n isBlob,\n isRegExp,\n isFunction,\n isStream,\n isURLSearchParams,\n isTypedArray,\n isFileList,\n forEach,\n merge,\n extend,\n trim,\n stripBOM,\n inherits,\n toFlatObject,\n kindOf,\n kindOfTest,\n endsWith,\n toArray,\n forEachEntry,\n matchAll,\n isHTMLForm,\n hasOwnProperty,\n hasOwnProp: hasOwnProperty, // an alias to avoid ESLint no-prototype-builtins detection\n reduceDescriptors,\n freezeMethods,\n toObjectSet,\n toCamelCase,\n noop,\n toFiniteNumber,\n findKey,\n global: _global,\n isContextDefined,\n ALPHABET,\n generateString,\n isSpecCompliantForm,\n toJSONObject,\n isAsyncFn,\n isThenable\n};\n\n/**\n * Create an Error with the specified message, config, error code, request and response.\n *\n * @param {string} message The error message.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [config] The config.\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n *\n * @returns {Error} The created error.\n */\nfunction AxiosError(message, code, config, request, response) {\n Error.call(this);\n\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n } else {\n this.stack = (new Error()).stack;\n }\n\n this.message = message;\n this.name = 'AxiosError';\n code && (this.code = code);\n config && (this.config = config);\n request && (this.request = request);\n response && (this.response = response);\n}\n\nutils$1.inherits(AxiosError, Error, {\n toJSON: function toJSON() {\n return {\n // Standard\n message: this.message,\n name: this.name,\n // Microsoft\n description: this.description,\n number: this.number,\n // Mozilla\n fileName: this.fileName,\n lineNumber: this.lineNumber,\n columnNumber: this.columnNumber,\n stack: this.stack,\n // Axios\n config: utils$1.toJSONObject(this.config),\n code: this.code,\n status: this.response && this.response.status ? this.response.status : null\n };\n }\n});\n\nconst prototype$1 = AxiosError.prototype;\nconst descriptors = {};\n\n[\n 'ERR_BAD_OPTION_VALUE',\n 'ERR_BAD_OPTION',\n 'ECONNABORTED',\n 'ETIMEDOUT',\n 'ERR_NETWORK',\n 'ERR_FR_TOO_MANY_REDIRECTS',\n 'ERR_DEPRECATED',\n 'ERR_BAD_RESPONSE',\n 'ERR_BAD_REQUEST',\n 'ERR_CANCELED',\n 'ERR_NOT_SUPPORT',\n 'ERR_INVALID_URL'\n// eslint-disable-next-line func-names\n].forEach(code => {\n descriptors[code] = {value: code};\n});\n\nObject.defineProperties(AxiosError, descriptors);\nObject.defineProperty(prototype$1, 'isAxiosError', {value: true});\n\n// eslint-disable-next-line func-names\nAxiosError.from = (error, code, config, request, response, customProps) => {\n const axiosError = Object.create(prototype$1);\n\n utils$1.toFlatObject(error, axiosError, function filter(obj) {\n return obj !== Error.prototype;\n }, prop => {\n return prop !== 'isAxiosError';\n });\n\n AxiosError.call(axiosError, error.message, code, config, request, response);\n\n axiosError.cause = error;\n\n axiosError.name = error.name;\n\n customProps && Object.assign(axiosError, customProps);\n\n return axiosError;\n};\n\n// eslint-disable-next-line strict\nvar httpAdapter = null;\n\n/**\n * Determines if the given thing is a array or js object.\n *\n * @param {string} thing - The object or array to be visited.\n *\n * @returns {boolean}\n */\nfunction isVisitable(thing) {\n return utils$1.isPlainObject(thing) || utils$1.isArray(thing);\n}\n\n/**\n * It removes the brackets from the end of a string\n *\n * @param {string} key - The key of the parameter.\n *\n * @returns {string} the key without the brackets.\n */\nfunction removeBrackets(key) {\n return utils$1.endsWith(key, '[]') ? key.slice(0, -2) : key;\n}\n\n/**\n * It takes a path, a key, and a boolean, and returns a string\n *\n * @param {string} path - The path to the current key.\n * @param {string} key - The key of the current object being iterated over.\n * @param {string} dots - If true, the key will be rendered with dots instead of brackets.\n *\n * @returns {string} The path to the current key.\n */\nfunction renderKey(path, key, dots) {\n if (!path) return key;\n return path.concat(key).map(function each(token, i) {\n // eslint-disable-next-line no-param-reassign\n token = removeBrackets(token);\n return !dots && i ? '[' + token + ']' : token;\n }).join(dots ? '.' : '');\n}\n\n/**\n * If the array is an array and none of its elements are visitable, then it's a flat array.\n *\n * @param {Array} arr - The array to check\n *\n * @returns {boolean}\n */\nfunction isFlatArray(arr) {\n return utils$1.isArray(arr) && !arr.some(isVisitable);\n}\n\nconst predicates = utils$1.toFlatObject(utils$1, {}, null, function filter(prop) {\n return /^is[A-Z]/.test(prop);\n});\n\n/**\n * Convert a data object to FormData\n *\n * @param {Object} obj\n * @param {?Object} [formData]\n * @param {?Object} [options]\n * @param {Function} [options.visitor]\n * @param {Boolean} [options.metaTokens = true]\n * @param {Boolean} [options.dots = false]\n * @param {?Boolean} [options.indexes = false]\n *\n * @returns {Object}\n **/\n\n/**\n * It converts an object into a FormData object\n *\n * @param {Object} obj - The object to convert to form data.\n * @param {string} formData - The FormData object to append to.\n * @param {Object} options\n *\n * @returns\n */\nfunction toFormData(obj, formData, options) {\n if (!utils$1.isObject(obj)) {\n throw new TypeError('target must be an object');\n }\n\n // eslint-disable-next-line no-param-reassign\n formData = formData || new (FormData)();\n\n // eslint-disable-next-line no-param-reassign\n options = utils$1.toFlatObject(options, {\n metaTokens: true,\n dots: false,\n indexes: false\n }, false, function defined(option, source) {\n // eslint-disable-next-line no-eq-null,eqeqeq\n return !utils$1.isUndefined(source[option]);\n });\n\n const metaTokens = options.metaTokens;\n // eslint-disable-next-line no-use-before-define\n const visitor = options.visitor || defaultVisitor;\n const dots = options.dots;\n const indexes = options.indexes;\n const _Blob = options.Blob || typeof Blob !== 'undefined' && Blob;\n const useBlob = _Blob && utils$1.isSpecCompliantForm(formData);\n\n if (!utils$1.isFunction(visitor)) {\n throw new TypeError('visitor must be a function');\n }\n\n function convertValue(value) {\n if (value === null) return '';\n\n if (utils$1.isDate(value)) {\n return value.toISOString();\n }\n\n if (!useBlob && utils$1.isBlob(value)) {\n throw new AxiosError('Blob is not supported. Use a Buffer instead.');\n }\n\n if (utils$1.isArrayBuffer(value) || utils$1.isTypedArray(value)) {\n return useBlob && typeof Blob === 'function' ? new Blob([value]) : Buffer.from(value);\n }\n\n return value;\n }\n\n /**\n * Default visitor.\n *\n * @param {*} value\n * @param {String|Number} key\n * @param {Array} path\n * @this {FormData}\n *\n * @returns {boolean} return true to visit the each prop of the value recursively\n */\n function defaultVisitor(value, key, path) {\n let arr = value;\n\n if (value && !path && typeof value === 'object') {\n if (utils$1.endsWith(key, '{}')) {\n // eslint-disable-next-line no-param-reassign\n key = metaTokens ? key : key.slice(0, -2);\n // eslint-disable-next-line no-param-reassign\n value = JSON.stringify(value);\n } else if (\n (utils$1.isArray(value) && isFlatArray(value)) ||\n ((utils$1.isFileList(value) || utils$1.endsWith(key, '[]')) && (arr = utils$1.toArray(value))\n )) {\n // eslint-disable-next-line no-param-reassign\n key = removeBrackets(key);\n\n arr.forEach(function each(el, index) {\n !(utils$1.isUndefined(el) || el === null) && formData.append(\n // eslint-disable-next-line no-nested-ternary\n indexes === true ? renderKey([key], index, dots) : (indexes === null ? key : key + '[]'),\n convertValue(el)\n );\n });\n return false;\n }\n }\n\n if (isVisitable(value)) {\n return true;\n }\n\n formData.append(renderKey(path, key, dots), convertValue(value));\n\n return false;\n }\n\n const stack = [];\n\n const exposedHelpers = Object.assign(predicates, {\n defaultVisitor,\n convertValue,\n isVisitable\n });\n\n function build(value, path) {\n if (utils$1.isUndefined(value)) return;\n\n if (stack.indexOf(value) !== -1) {\n throw Error('Circular reference detected in ' + path.join('.'));\n }\n\n stack.push(value);\n\n utils$1.forEach(value, function each(el, key) {\n const result = !(utils$1.isUndefined(el) || el === null) && visitor.call(\n formData, el, utils$1.isString(key) ? key.trim() : key, path, exposedHelpers\n );\n\n if (result === true) {\n build(el, path ? path.concat(key) : [key]);\n }\n });\n\n stack.pop();\n }\n\n if (!utils$1.isObject(obj)) {\n throw new TypeError('data must be an object');\n }\n\n build(obj);\n\n return formData;\n}\n\n/**\n * It encodes a string by replacing all characters that are not in the unreserved set with\n * their percent-encoded equivalents\n *\n * @param {string} str - The string to encode.\n *\n * @returns {string} The encoded string.\n */\nfunction encode$1(str) {\n const charMap = {\n '!': '%21',\n \"'\": '%27',\n '(': '%28',\n ')': '%29',\n '~': '%7E',\n '%20': '+',\n '%00': '\\x00'\n };\n return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) {\n return charMap[match];\n });\n}\n\n/**\n * It takes a params object and converts it to a FormData object\n *\n * @param {Object} params - The parameters to be converted to a FormData object.\n * @param {Object} options - The options object passed to the Axios constructor.\n *\n * @returns {void}\n */\nfunction AxiosURLSearchParams(params, options) {\n this._pairs = [];\n\n params && toFormData(params, this, options);\n}\n\nconst prototype = AxiosURLSearchParams.prototype;\n\nprototype.append = function append(name, value) {\n this._pairs.push([name, value]);\n};\n\nprototype.toString = function toString(encoder) {\n const _encode = encoder ? function(value) {\n return encoder.call(this, value, encode$1);\n } : encode$1;\n\n return this._pairs.map(function each(pair) {\n return _encode(pair[0]) + '=' + _encode(pair[1]);\n }, '').join('&');\n};\n\n/**\n * It replaces all instances of the characters `:`, `$`, `,`, `+`, `[`, and `]` with their\n * URI encoded counterparts\n *\n * @param {string} val The value to be encoded.\n *\n * @returns {string} The encoded value.\n */\nfunction encode(val) {\n return encodeURIComponent(val).\n replace(/%3A/gi, ':').\n replace(/%24/g, '$').\n replace(/%2C/gi, ',').\n replace(/%20/g, '+').\n replace(/%5B/gi, '[').\n replace(/%5D/gi, ']');\n}\n\n/**\n * Build a URL by appending params to the end\n *\n * @param {string} url The base of the url (e.g., http://www.google.com)\n * @param {object} [params] The params to be appended\n * @param {?object} options\n *\n * @returns {string} The formatted url\n */\nfunction buildURL(url, params, options) {\n /*eslint no-param-reassign:0*/\n if (!params) {\n return url;\n }\n \n const _encode = options && options.encode || encode;\n\n const serializeFn = options && options.serialize;\n\n let serializedParams;\n\n if (serializeFn) {\n serializedParams = serializeFn(params, options);\n } else {\n serializedParams = utils$1.isURLSearchParams(params) ?\n params.toString() :\n new AxiosURLSearchParams(params, options).toString(_encode);\n }\n\n if (serializedParams) {\n const hashmarkIndex = url.indexOf(\"#\");\n\n if (hashmarkIndex !== -1) {\n url = url.slice(0, hashmarkIndex);\n }\n url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n }\n\n return url;\n}\n\nclass InterceptorManager {\n constructor() {\n this.handlers = [];\n }\n\n /**\n * Add a new interceptor to the stack\n *\n * @param {Function} fulfilled The function to handle `then` for a `Promise`\n * @param {Function} rejected The function to handle `reject` for a `Promise`\n *\n * @return {Number} An ID used to remove interceptor later\n */\n use(fulfilled, rejected, options) {\n this.handlers.push({\n fulfilled,\n rejected,\n synchronous: options ? options.synchronous : false,\n runWhen: options ? options.runWhen : null\n });\n return this.handlers.length - 1;\n }\n\n /**\n * Remove an interceptor from the stack\n *\n * @param {Number} id The ID that was returned by `use`\n *\n * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise\n */\n eject(id) {\n if (this.handlers[id]) {\n this.handlers[id] = null;\n }\n }\n\n /**\n * Clear all interceptors from the stack\n *\n * @returns {void}\n */\n clear() {\n if (this.handlers) {\n this.handlers = [];\n }\n }\n\n /**\n * Iterate over all the registered interceptors\n *\n * This method is particularly useful for skipping over any\n * interceptors that may have become `null` calling `eject`.\n *\n * @param {Function} fn The function to call for each interceptor\n *\n * @returns {void}\n */\n forEach(fn) {\n utils$1.forEach(this.handlers, function forEachHandler(h) {\n if (h !== null) {\n fn(h);\n }\n });\n }\n}\n\nvar transitionalDefaults = {\n silentJSONParsing: true,\n forcedJSONParsing: true,\n clarifyTimeoutError: false\n};\n\nvar URLSearchParams$1 = typeof URLSearchParams !== 'undefined' ? URLSearchParams : AxiosURLSearchParams;\n\nvar FormData$1 = typeof FormData !== 'undefined' ? FormData : null;\n\nvar Blob$1 = typeof Blob !== 'undefined' ? Blob : null;\n\nvar platform$1 = {\n isBrowser: true,\n classes: {\n URLSearchParams: URLSearchParams$1,\n FormData: FormData$1,\n Blob: Blob$1\n },\n protocols: ['http', 'https', 'file', 'blob', 'url', 'data']\n};\n\nconst hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined';\n\n/**\n * Determine if we're running in a standard browser environment\n *\n * This allows axios to run in a web worker, and react-native.\n * Both environments support XMLHttpRequest, but not fully standard globals.\n *\n * web workers:\n * typeof window -> undefined\n * typeof document -> undefined\n *\n * react-native:\n * navigator.product -> 'ReactNative'\n * nativescript\n * navigator.product -> 'NativeScript' or 'NS'\n *\n * @returns {boolean}\n */\nconst hasStandardBrowserEnv = (\n (product) => {\n return hasBrowserEnv && ['ReactNative', 'NativeScript', 'NS'].indexOf(product) < 0\n })(typeof navigator !== 'undefined' && navigator.product);\n\n/**\n * Determine if we're running in a standard browser webWorker environment\n *\n * Although the `isStandardBrowserEnv` method indicates that\n * `allows axios to run in a web worker`, the WebWorker will still be\n * filtered out due to its judgment standard\n * `typeof window !== 'undefined' && typeof document !== 'undefined'`.\n * This leads to a problem when axios post `FormData` in webWorker\n */\nconst hasStandardBrowserWebWorkerEnv = (() => {\n return (\n typeof WorkerGlobalScope !== 'undefined' &&\n // eslint-disable-next-line no-undef\n self instanceof WorkerGlobalScope &&\n typeof self.importScripts === 'function'\n );\n})();\n\nvar utils = /*#__PURE__*/Object.freeze({\n __proto__: null,\n hasBrowserEnv: hasBrowserEnv,\n hasStandardBrowserEnv: hasStandardBrowserEnv,\n hasStandardBrowserWebWorkerEnv: hasStandardBrowserWebWorkerEnv\n});\n\nvar platform = {\n ...utils,\n ...platform$1\n};\n\nfunction toURLEncodedForm(data, options) {\n return toFormData(data, new platform.classes.URLSearchParams(), Object.assign({\n visitor: function(value, key, path, helpers) {\n if (platform.isNode && utils$1.isBuffer(value)) {\n this.append(key, value.toString('base64'));\n return false;\n }\n\n return helpers.defaultVisitor.apply(this, arguments);\n }\n }, options));\n}\n\n/**\n * It takes a string like `foo[x][y][z]` and returns an array like `['foo', 'x', 'y', 'z']\n *\n * @param {string} name - The name of the property to get.\n *\n * @returns An array of strings.\n */\nfunction parsePropPath(name) {\n // foo[x][y][z]\n // foo.x.y.z\n // foo-x-y-z\n // foo x y z\n return utils$1.matchAll(/\\w+|\\[(\\w*)]/g, name).map(match => {\n return match[0] === '[]' ? '' : match[1] || match[0];\n });\n}\n\n/**\n * Convert an array to an object.\n *\n * @param {Array} arr - The array to convert to an object.\n *\n * @returns An object with the same keys and values as the array.\n */\nfunction arrayToObject(arr) {\n const obj = {};\n const keys = Object.keys(arr);\n let i;\n const len = keys.length;\n let key;\n for (i = 0; i < len; i++) {\n key = keys[i];\n obj[key] = arr[key];\n }\n return obj;\n}\n\n/**\n * It takes a FormData object and returns a JavaScript object\n *\n * @param {string} formData The FormData object to convert to JSON.\n *\n * @returns {Object | null} The converted object.\n */\nfunction formDataToJSON(formData) {\n function buildPath(path, value, target, index) {\n let name = path[index++];\n\n if (name === '__proto__') return true;\n\n const isNumericKey = Number.isFinite(+name);\n const isLast = index >= path.length;\n name = !name && utils$1.isArray(target) ? target.length : name;\n\n if (isLast) {\n if (utils$1.hasOwnProp(target, name)) {\n target[name] = [target[name], value];\n } else {\n target[name] = value;\n }\n\n return !isNumericKey;\n }\n\n if (!target[name] || !utils$1.isObject(target[name])) {\n target[name] = [];\n }\n\n const result = buildPath(path, value, target[name], index);\n\n if (result && utils$1.isArray(target[name])) {\n target[name] = arrayToObject(target[name]);\n }\n\n return !isNumericKey;\n }\n\n if (utils$1.isFormData(formData) && utils$1.isFunction(formData.entries)) {\n const obj = {};\n\n utils$1.forEachEntry(formData, (name, value) => {\n buildPath(parsePropPath(name), value, obj, 0);\n });\n\n return obj;\n }\n\n return null;\n}\n\n/**\n * It takes a string, tries to parse it, and if it fails, it returns the stringified version\n * of the input\n *\n * @param {any} rawValue - The value to be stringified.\n * @param {Function} parser - A function that parses a string into a JavaScript object.\n * @param {Function} encoder - A function that takes a value and returns a string.\n *\n * @returns {string} A stringified version of the rawValue.\n */\nfunction stringifySafely(rawValue, parser, encoder) {\n if (utils$1.isString(rawValue)) {\n try {\n (parser || JSON.parse)(rawValue);\n return utils$1.trim(rawValue);\n } catch (e) {\n if (e.name !== 'SyntaxError') {\n throw e;\n }\n }\n }\n\n return (encoder || JSON.stringify)(rawValue);\n}\n\nconst defaults = {\n\n transitional: transitionalDefaults,\n\n adapter: ['xhr', 'http'],\n\n transformRequest: [function transformRequest(data, headers) {\n const contentType = headers.getContentType() || '';\n const hasJSONContentType = contentType.indexOf('application/json') > -1;\n const isObjectPayload = utils$1.isObject(data);\n\n if (isObjectPayload && utils$1.isHTMLForm(data)) {\n data = new FormData(data);\n }\n\n const isFormData = utils$1.isFormData(data);\n\n if (isFormData) {\n return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;\n }\n\n if (utils$1.isArrayBuffer(data) ||\n utils$1.isBuffer(data) ||\n utils$1.isStream(data) ||\n utils$1.isFile(data) ||\n utils$1.isBlob(data)\n ) {\n return data;\n }\n if (utils$1.isArrayBufferView(data)) {\n return data.buffer;\n }\n if (utils$1.isURLSearchParams(data)) {\n headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false);\n return data.toString();\n }\n\n let isFileList;\n\n if (isObjectPayload) {\n if (contentType.indexOf('application/x-www-form-urlencoded') > -1) {\n return toURLEncodedForm(data, this.formSerializer).toString();\n }\n\n if ((isFileList = utils$1.isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) {\n const _FormData = this.env && this.env.FormData;\n\n return toFormData(\n isFileList ? {'files[]': data} : data,\n _FormData && new _FormData(),\n this.formSerializer\n );\n }\n }\n\n if (isObjectPayload || hasJSONContentType ) {\n headers.setContentType('application/json', false);\n return stringifySafely(data);\n }\n\n return data;\n }],\n\n transformResponse: [function transformResponse(data) {\n const transitional = this.transitional || defaults.transitional;\n const forcedJSONParsing = transitional && transitional.forcedJSONParsing;\n const JSONRequested = this.responseType === 'json';\n\n if (data && utils$1.isString(data) && ((forcedJSONParsing && !this.responseType) || JSONRequested)) {\n const silentJSONParsing = transitional && transitional.silentJSONParsing;\n const strictJSONParsing = !silentJSONParsing && JSONRequested;\n\n try {\n return JSON.parse(data);\n } catch (e) {\n if (strictJSONParsing) {\n if (e.name === 'SyntaxError') {\n throw AxiosError.from(e, AxiosError.ERR_BAD_RESPONSE, this, null, this.response);\n }\n throw e;\n }\n }\n }\n\n return data;\n }],\n\n /**\n * A timeout in milliseconds to abort a request. If set to 0 (default) a\n * timeout is not created.\n */\n timeout: 0,\n\n xsrfCookieName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN',\n\n maxContentLength: -1,\n maxBodyLength: -1,\n\n env: {\n FormData: platform.classes.FormData,\n Blob: platform.classes.Blob\n },\n\n validateStatus: function validateStatus(status) {\n return status >= 200 && status < 300;\n },\n\n headers: {\n common: {\n 'Accept': 'application/json, text/plain, */*',\n 'Content-Type': undefined\n }\n }\n};\n\nutils$1.forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => {\n defaults.headers[method] = {};\n});\n\nvar defaults$1 = defaults;\n\n// RawAxiosHeaders whose duplicates are ignored by node\n// c.f. https://nodejs.org/api/http.html#http_message_headers\nconst ignoreDuplicateOf = utils$1.toObjectSet([\n 'age', 'authorization', 'content-length', 'content-type', 'etag',\n 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',\n 'last-modified', 'location', 'max-forwards', 'proxy-authorization',\n 'referer', 'retry-after', 'user-agent'\n]);\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} rawHeaders Headers needing to be parsed\n *\n * @returns {Object} Headers parsed into an object\n */\nvar parseHeaders = rawHeaders => {\n const parsed = {};\n let key;\n let val;\n let i;\n\n rawHeaders && rawHeaders.split('\\n').forEach(function parser(line) {\n i = line.indexOf(':');\n key = line.substring(0, i).trim().toLowerCase();\n val = line.substring(i + 1).trim();\n\n if (!key || (parsed[key] && ignoreDuplicateOf[key])) {\n return;\n }\n\n if (key === 'set-cookie') {\n if (parsed[key]) {\n parsed[key].push(val);\n } else {\n parsed[key] = [val];\n }\n } else {\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n }\n });\n\n return parsed;\n};\n\nconst $internals = Symbol('internals');\n\nfunction normalizeHeader(header) {\n return header && String(header).trim().toLowerCase();\n}\n\nfunction normalizeValue(value) {\n if (value === false || value == null) {\n return value;\n }\n\n return utils$1.isArray(value) ? value.map(normalizeValue) : String(value);\n}\n\nfunction parseTokens(str) {\n const tokens = Object.create(null);\n const tokensRE = /([^\\s,;=]+)\\s*(?:=\\s*([^,;]+))?/g;\n let match;\n\n while ((match = tokensRE.exec(str))) {\n tokens[match[1]] = match[2];\n }\n\n return tokens;\n}\n\nconst isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());\n\nfunction matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {\n if (utils$1.isFunction(filter)) {\n return filter.call(this, value, header);\n }\n\n if (isHeaderNameFilter) {\n value = header;\n }\n\n if (!utils$1.isString(value)) return;\n\n if (utils$1.isString(filter)) {\n return value.indexOf(filter) !== -1;\n }\n\n if (utils$1.isRegExp(filter)) {\n return filter.test(value);\n }\n}\n\nfunction formatHeader(header) {\n return header.trim()\n .toLowerCase().replace(/([a-z\\d])(\\w*)/g, (w, char, str) => {\n return char.toUpperCase() + str;\n });\n}\n\nfunction buildAccessors(obj, header) {\n const accessorName = utils$1.toCamelCase(' ' + header);\n\n ['get', 'set', 'has'].forEach(methodName => {\n Object.defineProperty(obj, methodName + accessorName, {\n value: function(arg1, arg2, arg3) {\n return this[methodName].call(this, header, arg1, arg2, arg3);\n },\n configurable: true\n });\n });\n}\n\nclass AxiosHeaders {\n constructor(headers) {\n headers && this.set(headers);\n }\n\n set(header, valueOrRewrite, rewrite) {\n const self = this;\n\n function setHeader(_value, _header, _rewrite) {\n const lHeader = normalizeHeader(_header);\n\n if (!lHeader) {\n throw new Error('header name must be a non-empty string');\n }\n\n const key = utils$1.findKey(self, lHeader);\n\n if(!key || self[key] === undefined || _rewrite === true || (_rewrite === undefined && self[key] !== false)) {\n self[key || _header] = normalizeValue(_value);\n }\n }\n\n const setHeaders = (headers, _rewrite) =>\n utils$1.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));\n\n if (utils$1.isPlainObject(header) || header instanceof this.constructor) {\n setHeaders(header, valueOrRewrite);\n } else if(utils$1.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {\n setHeaders(parseHeaders(header), valueOrRewrite);\n } else {\n header != null && setHeader(valueOrRewrite, header, rewrite);\n }\n\n return this;\n }\n\n get(header, parser) {\n header = normalizeHeader(header);\n\n if (header) {\n const key = utils$1.findKey(this, header);\n\n if (key) {\n const value = this[key];\n\n if (!parser) {\n return value;\n }\n\n if (parser === true) {\n return parseTokens(value);\n }\n\n if (utils$1.isFunction(parser)) {\n return parser.call(this, value, key);\n }\n\n if (utils$1.isRegExp(parser)) {\n return parser.exec(value);\n }\n\n throw new TypeError('parser must be boolean|regexp|function');\n }\n }\n }\n\n has(header, matcher) {\n header = normalizeHeader(header);\n\n if (header) {\n const key = utils$1.findKey(this, header);\n\n return !!(key && this[key] !== undefined && (!matcher || matchHeaderValue(this, this[key], key, matcher)));\n }\n\n return false;\n }\n\n delete(header, matcher) {\n const self = this;\n let deleted = false;\n\n function deleteHeader(_header) {\n _header = normalizeHeader(_header);\n\n if (_header) {\n const key = utils$1.findKey(self, _header);\n\n if (key && (!matcher || matchHeaderValue(self, self[key], key, matcher))) {\n delete self[key];\n\n deleted = true;\n }\n }\n }\n\n if (utils$1.isArray(header)) {\n header.forEach(deleteHeader);\n } else {\n deleteHeader(header);\n }\n\n return deleted;\n }\n\n clear(matcher) {\n const keys = Object.keys(this);\n let i = keys.length;\n let deleted = false;\n\n while (i--) {\n const key = keys[i];\n if(!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {\n delete this[key];\n deleted = true;\n }\n }\n\n return deleted;\n }\n\n normalize(format) {\n const self = this;\n const headers = {};\n\n utils$1.forEach(this, (value, header) => {\n const key = utils$1.findKey(headers, header);\n\n if (key) {\n self[key] = normalizeValue(value);\n delete self[header];\n return;\n }\n\n const normalized = format ? formatHeader(header) : String(header).trim();\n\n if (normalized !== header) {\n delete self[header];\n }\n\n self[normalized] = normalizeValue(value);\n\n headers[normalized] = true;\n });\n\n return this;\n }\n\n concat(...targets) {\n return this.constructor.concat(this, ...targets);\n }\n\n toJSON(asStrings) {\n const obj = Object.create(null);\n\n utils$1.forEach(this, (value, header) => {\n value != null && value !== false && (obj[header] = asStrings && utils$1.isArray(value) ? value.join(', ') : value);\n });\n\n return obj;\n }\n\n [Symbol.iterator]() {\n return Object.entries(this.toJSON())[Symbol.iterator]();\n }\n\n toString() {\n return Object.entries(this.toJSON()).map(([header, value]) => header + ': ' + value).join('\\n');\n }\n\n get [Symbol.toStringTag]() {\n return 'AxiosHeaders';\n }\n\n static from(thing) {\n return thing instanceof this ? thing : new this(thing);\n }\n\n static concat(first, ...targets) {\n const computed = new this(first);\n\n targets.forEach((target) => computed.set(target));\n\n return computed;\n }\n\n static accessor(header) {\n const internals = this[$internals] = (this[$internals] = {\n accessors: {}\n });\n\n const accessors = internals.accessors;\n const prototype = this.prototype;\n\n function defineAccessor(_header) {\n const lHeader = normalizeHeader(_header);\n\n if (!accessors[lHeader]) {\n buildAccessors(prototype, _header);\n accessors[lHeader] = true;\n }\n }\n\n utils$1.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);\n\n return this;\n }\n}\n\nAxiosHeaders.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']);\n\n// reserved names hotfix\nutils$1.reduceDescriptors(AxiosHeaders.prototype, ({value}, key) => {\n let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set`\n return {\n get: () => value,\n set(headerValue) {\n this[mapped] = headerValue;\n }\n }\n});\n\nutils$1.freezeMethods(AxiosHeaders);\n\nvar AxiosHeaders$1 = AxiosHeaders;\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Array|Function} fns A single function or Array of functions\n * @param {?Object} response The response object\n *\n * @returns {*} The resulting transformed data\n */\nfunction transformData(fns, response) {\n const config = this || defaults$1;\n const context = response || config;\n const headers = AxiosHeaders$1.from(context.headers);\n let data = context.data;\n\n utils$1.forEach(fns, function transform(fn) {\n data = fn.call(config, data, headers.normalize(), response ? response.status : undefined);\n });\n\n headers.normalize();\n\n return data;\n}\n\nfunction isCancel(value) {\n return !!(value && value.__CANCEL__);\n}\n\n/**\n * A `CanceledError` is an object that is thrown when an operation is canceled.\n *\n * @param {string=} message The message.\n * @param {Object=} config The config.\n * @param {Object=} request The request.\n *\n * @returns {CanceledError} The created error.\n */\nfunction CanceledError(message, config, request) {\n // eslint-disable-next-line no-eq-null,eqeqeq\n AxiosError.call(this, message == null ? 'canceled' : message, AxiosError.ERR_CANCELED, config, request);\n this.name = 'CanceledError';\n}\n\nutils$1.inherits(CanceledError, AxiosError, {\n __CANCEL__: true\n});\n\n/**\n * Resolve or reject a Promise based on response status.\n *\n * @param {Function} resolve A function that resolves the promise.\n * @param {Function} reject A function that rejects the promise.\n * @param {object} response The response.\n *\n * @returns {object} The response.\n */\nfunction settle(resolve, reject, response) {\n const validateStatus = response.config.validateStatus;\n if (!response.status || !validateStatus || validateStatus(response.status)) {\n resolve(response);\n } else {\n reject(new AxiosError(\n 'Request failed with status code ' + response.status,\n [AxiosError.ERR_BAD_REQUEST, AxiosError.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],\n response.config,\n response.request,\n response\n ));\n }\n}\n\nvar cookies = platform.hasStandardBrowserEnv ?\n\n // Standard browser envs support document.cookie\n {\n write(name, value, expires, path, domain, secure) {\n const cookie = [name + '=' + encodeURIComponent(value)];\n\n utils$1.isNumber(expires) && cookie.push('expires=' + new Date(expires).toGMTString());\n\n utils$1.isString(path) && cookie.push('path=' + path);\n\n utils$1.isString(domain) && cookie.push('domain=' + domain);\n\n secure === true && cookie.push('secure');\n\n document.cookie = cookie.join('; ');\n },\n\n read(name) {\n const match = document.cookie.match(new RegExp('(^|;\\\\s*)(' + name + ')=([^;]*)'));\n return (match ? decodeURIComponent(match[3]) : null);\n },\n\n remove(name) {\n this.write(name, '', Date.now() - 86400000);\n }\n }\n\n :\n\n // Non-standard browser env (web workers, react-native) lack needed support.\n {\n write() {},\n read() {\n return null;\n },\n remove() {}\n };\n\n/**\n * Determines whether the specified URL is absolute\n *\n * @param {string} url The URL to test\n *\n * @returns {boolean} True if the specified URL is absolute, otherwise false\n */\nfunction isAbsoluteURL(url) {\n // A URL is considered absolute if it begins with \"://\" or \"//\" (protocol-relative URL).\n // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n // by any combination of letters, digits, plus, period, or hyphen.\n return /^([a-z][a-z\\d+\\-.]*:)?\\/\\//i.test(url);\n}\n\n/**\n * Creates a new URL by combining the specified URLs\n *\n * @param {string} baseURL The base URL\n * @param {string} relativeURL The relative URL\n *\n * @returns {string} The combined URL\n */\nfunction combineURLs(baseURL, relativeURL) {\n return relativeURL\n ? baseURL.replace(/\\/?\\/$/, '') + '/' + relativeURL.replace(/^\\/+/, '')\n : baseURL;\n}\n\n/**\n * Creates a new URL by combining the baseURL with the requestedURL,\n * only when the requestedURL is not already an absolute URL.\n * If the requestURL is absolute, this function returns the requestedURL untouched.\n *\n * @param {string} baseURL The base URL\n * @param {string} requestedURL Absolute or relative URL to combine\n *\n * @returns {string} The combined full path\n */\nfunction buildFullPath(baseURL, requestedURL) {\n if (baseURL && !isAbsoluteURL(requestedURL)) {\n return combineURLs(baseURL, requestedURL);\n }\n return requestedURL;\n}\n\nvar isURLSameOrigin = platform.hasStandardBrowserEnv ?\n\n// Standard browser envs have full support of the APIs needed to test\n// whether the request URL is of the same origin as current location.\n (function standardBrowserEnv() {\n const msie = /(msie|trident)/i.test(navigator.userAgent);\n const urlParsingNode = document.createElement('a');\n let originURL;\n\n /**\n * Parse a URL to discover its components\n *\n * @param {String} url The URL to be parsed\n * @returns {Object}\n */\n function resolveURL(url) {\n let href = url;\n\n if (msie) {\n // IE needs attribute set twice to normalize properties\n urlParsingNode.setAttribute('href', href);\n href = urlParsingNode.href;\n }\n\n urlParsingNode.setAttribute('href', href);\n\n // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils\n return {\n href: urlParsingNode.href,\n protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',\n host: urlParsingNode.host,\n search: urlParsingNode.search ? urlParsingNode.search.replace(/^\\?/, '') : '',\n hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',\n hostname: urlParsingNode.hostname,\n port: urlParsingNode.port,\n pathname: (urlParsingNode.pathname.charAt(0) === '/') ?\n urlParsingNode.pathname :\n '/' + urlParsingNode.pathname\n };\n }\n\n originURL = resolveURL(window.location.href);\n\n /**\n * Determine if a URL shares the same origin as the current location\n *\n * @param {String} requestURL The URL to test\n * @returns {boolean} True if URL shares the same origin, otherwise false\n */\n return function isURLSameOrigin(requestURL) {\n const parsed = (utils$1.isString(requestURL)) ? resolveURL(requestURL) : requestURL;\n return (parsed.protocol === originURL.protocol &&\n parsed.host === originURL.host);\n };\n })() :\n\n // Non standard browser envs (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return function isURLSameOrigin() {\n return true;\n };\n })();\n\nfunction parseProtocol(url) {\n const match = /^([-+\\w]{1,25})(:?\\/\\/|:)/.exec(url);\n return match && match[1] || '';\n}\n\n/**\n * Calculate data maxRate\n * @param {Number} [samplesCount= 10]\n * @param {Number} [min= 1000]\n * @returns {Function}\n */\nfunction speedometer(samplesCount, min) {\n samplesCount = samplesCount || 10;\n const bytes = new Array(samplesCount);\n const timestamps = new Array(samplesCount);\n let head = 0;\n let tail = 0;\n let firstSampleTS;\n\n min = min !== undefined ? min : 1000;\n\n return function push(chunkLength) {\n const now = Date.now();\n\n const startedAt = timestamps[tail];\n\n if (!firstSampleTS) {\n firstSampleTS = now;\n }\n\n bytes[head] = chunkLength;\n timestamps[head] = now;\n\n let i = tail;\n let bytesCount = 0;\n\n while (i !== head) {\n bytesCount += bytes[i++];\n i = i % samplesCount;\n }\n\n head = (head + 1) % samplesCount;\n\n if (head === tail) {\n tail = (tail + 1) % samplesCount;\n }\n\n if (now - firstSampleTS < min) {\n return;\n }\n\n const passed = startedAt && now - startedAt;\n\n return passed ? Math.round(bytesCount * 1000 / passed) : undefined;\n };\n}\n\nfunction progressEventReducer(listener, isDownloadStream) {\n let bytesNotified = 0;\n const _speedometer = speedometer(50, 250);\n\n return e => {\n const loaded = e.loaded;\n const total = e.lengthComputable ? e.total : undefined;\n const progressBytes = loaded - bytesNotified;\n const rate = _speedometer(progressBytes);\n const inRange = loaded <= total;\n\n bytesNotified = loaded;\n\n const data = {\n loaded,\n total,\n progress: total ? (loaded / total) : undefined,\n bytes: progressBytes,\n rate: rate ? rate : undefined,\n estimated: rate && total && inRange ? (total - loaded) / rate : undefined,\n event: e\n };\n\n data[isDownloadStream ? 'download' : 'upload'] = true;\n\n listener(data);\n };\n}\n\nconst isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';\n\nvar xhrAdapter = isXHRAdapterSupported && function (config) {\n return new Promise(function dispatchXhrRequest(resolve, reject) {\n let requestData = config.data;\n const requestHeaders = AxiosHeaders$1.from(config.headers).normalize();\n let {responseType, withXSRFToken} = config;\n let onCanceled;\n function done() {\n if (config.cancelToken) {\n config.cancelToken.unsubscribe(onCanceled);\n }\n\n if (config.signal) {\n config.signal.removeEventListener('abort', onCanceled);\n }\n }\n\n let contentType;\n\n if (utils$1.isFormData(requestData)) {\n if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {\n requestHeaders.setContentType(false); // Let the browser set it\n } else if ((contentType = requestHeaders.getContentType()) !== false) {\n // fix semicolon duplication issue for ReactNative FormData implementation\n const [type, ...tokens] = contentType ? contentType.split(';').map(token => token.trim()).filter(Boolean) : [];\n requestHeaders.setContentType([type || 'multipart/form-data', ...tokens].join('; '));\n }\n }\n\n let request = new XMLHttpRequest();\n\n // HTTP basic authentication\n if (config.auth) {\n const username = config.auth.username || '';\n const password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : '';\n requestHeaders.set('Authorization', 'Basic ' + btoa(username + ':' + password));\n }\n\n const fullPath = buildFullPath(config.baseURL, config.url);\n\n request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);\n\n // Set the request timeout in MS\n request.timeout = config.timeout;\n\n function onloadend() {\n if (!request) {\n return;\n }\n // Prepare the response\n const responseHeaders = AxiosHeaders$1.from(\n 'getAllResponseHeaders' in request && request.getAllResponseHeaders()\n );\n const responseData = !responseType || responseType === 'text' || responseType === 'json' ?\n request.responseText : request.response;\n const response = {\n data: responseData,\n status: request.status,\n statusText: request.statusText,\n headers: responseHeaders,\n config,\n request\n };\n\n settle(function _resolve(value) {\n resolve(value);\n done();\n }, function _reject(err) {\n reject(err);\n done();\n }, response);\n\n // Clean up request\n request = null;\n }\n\n if ('onloadend' in request) {\n // Use onloadend if available\n request.onloadend = onloadend;\n } else {\n // Listen for ready state to emulate onloadend\n request.onreadystatechange = function handleLoad() {\n if (!request || request.readyState !== 4) {\n return;\n }\n\n // The request errored out and we didn't get a response, this will be\n // handled by onerror instead\n // With one exception: request that using file: protocol, most browsers\n // will return status as 0 even though it's a successful request\n if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {\n return;\n }\n // readystate handler is calling before onerror or ontimeout handlers,\n // so we should call onloadend on the next 'tick'\n setTimeout(onloadend);\n };\n }\n\n // Handle browser request cancellation (as opposed to a manual cancellation)\n request.onabort = function handleAbort() {\n if (!request) {\n return;\n }\n\n reject(new AxiosError('Request aborted', AxiosError.ECONNABORTED, config, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle low level network errors\n request.onerror = function handleError() {\n // Real errors are hidden from us by the browser\n // onerror should only fire if it's a network error\n reject(new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle timeout\n request.ontimeout = function handleTimeout() {\n let timeoutErrorMessage = config.timeout ? 'timeout of ' + config.timeout + 'ms exceeded' : 'timeout exceeded';\n const transitional = config.transitional || transitionalDefaults;\n if (config.timeoutErrorMessage) {\n timeoutErrorMessage = config.timeoutErrorMessage;\n }\n reject(new AxiosError(\n timeoutErrorMessage,\n transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED,\n config,\n request));\n\n // Clean up request\n request = null;\n };\n\n // Add xsrf header\n // This is only done if running in a standard browser environment.\n // Specifically not if we're in a web worker, or react-native.\n if(platform.hasStandardBrowserEnv) {\n withXSRFToken && utils$1.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(config));\n\n if (withXSRFToken || (withXSRFToken !== false && isURLSameOrigin(fullPath))) {\n // Add xsrf header\n const xsrfValue = config.xsrfHeaderName && config.xsrfCookieName && cookies.read(config.xsrfCookieName);\n\n if (xsrfValue) {\n requestHeaders.set(config.xsrfHeaderName, xsrfValue);\n }\n }\n }\n\n // Remove Content-Type if data is undefined\n requestData === undefined && requestHeaders.setContentType(null);\n\n // Add headers to the request\n if ('setRequestHeader' in request) {\n utils$1.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {\n request.setRequestHeader(key, val);\n });\n }\n\n // Add withCredentials to request if needed\n if (!utils$1.isUndefined(config.withCredentials)) {\n request.withCredentials = !!config.withCredentials;\n }\n\n // Add responseType to request if needed\n if (responseType && responseType !== 'json') {\n request.responseType = config.responseType;\n }\n\n // Handle progress if needed\n if (typeof config.onDownloadProgress === 'function') {\n request.addEventListener('progress', progressEventReducer(config.onDownloadProgress, true));\n }\n\n // Not all browsers support upload events\n if (typeof config.onUploadProgress === 'function' && request.upload) {\n request.upload.addEventListener('progress', progressEventReducer(config.onUploadProgress));\n }\n\n if (config.cancelToken || config.signal) {\n // Handle cancellation\n // eslint-disable-next-line func-names\n onCanceled = cancel => {\n if (!request) {\n return;\n }\n reject(!cancel || cancel.type ? new CanceledError(null, config, request) : cancel);\n request.abort();\n request = null;\n };\n\n config.cancelToken && config.cancelToken.subscribe(onCanceled);\n if (config.signal) {\n config.signal.aborted ? onCanceled() : config.signal.addEventListener('abort', onCanceled);\n }\n }\n\n const protocol = parseProtocol(fullPath);\n\n if (protocol && platform.protocols.indexOf(protocol) === -1) {\n reject(new AxiosError('Unsupported protocol ' + protocol + ':', AxiosError.ERR_BAD_REQUEST, config));\n return;\n }\n\n\n // Send the request\n request.send(requestData || null);\n });\n};\n\nconst knownAdapters = {\n http: httpAdapter,\n xhr: xhrAdapter\n};\n\nutils$1.forEach(knownAdapters, (fn, value) => {\n if (fn) {\n try {\n Object.defineProperty(fn, 'name', {value});\n } catch (e) {\n // eslint-disable-next-line no-empty\n }\n Object.defineProperty(fn, 'adapterName', {value});\n }\n});\n\nconst renderReason = (reason) => `- ${reason}`;\n\nconst isResolvedHandle = (adapter) => utils$1.isFunction(adapter) || adapter === null || adapter === false;\n\nvar adapters = {\n getAdapter: (adapters) => {\n adapters = utils$1.isArray(adapters) ? adapters : [adapters];\n\n const {length} = adapters;\n let nameOrAdapter;\n let adapter;\n\n const rejectedReasons = {};\n\n for (let i = 0; i < length; i++) {\n nameOrAdapter = adapters[i];\n let id;\n\n adapter = nameOrAdapter;\n\n if (!isResolvedHandle(nameOrAdapter)) {\n adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];\n\n if (adapter === undefined) {\n throw new AxiosError(`Unknown adapter '${id}'`);\n }\n }\n\n if (adapter) {\n break;\n }\n\n rejectedReasons[id || '#' + i] = adapter;\n }\n\n if (!adapter) {\n\n const reasons = Object.entries(rejectedReasons)\n .map(([id, state]) => `adapter ${id} ` +\n (state === false ? 'is not supported by the environment' : 'is not available in the build')\n );\n\n let s = length ?\n (reasons.length > 1 ? 'since :\\n' + reasons.map(renderReason).join('\\n') : ' ' + renderReason(reasons[0])) :\n 'as no adapter specified';\n\n throw new AxiosError(\n `There is no suitable adapter to dispatch the request ` + s,\n 'ERR_NOT_SUPPORT'\n );\n }\n\n return adapter;\n },\n adapters: knownAdapters\n};\n\n/**\n * Throws a `CanceledError` if cancellation has been requested.\n *\n * @param {Object} config The config that is to be used for the request\n *\n * @returns {void}\n */\nfunction throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n\n if (config.signal && config.signal.aborted) {\n throw new CanceledError(null, config);\n }\n}\n\n/**\n * Dispatch a request to the server using the configured adapter.\n *\n * @param {object} config The config that is to be used for the request\n *\n * @returns {Promise} The Promise to be fulfilled\n */\nfunction dispatchRequest(config) {\n throwIfCancellationRequested(config);\n\n config.headers = AxiosHeaders$1.from(config.headers);\n\n // Transform request data\n config.data = transformData.call(\n config,\n config.transformRequest\n );\n\n if (['post', 'put', 'patch'].indexOf(config.method) !== -1) {\n config.headers.setContentType('application/x-www-form-urlencoded', false);\n }\n\n const adapter = adapters.getAdapter(config.adapter || defaults$1.adapter);\n\n return adapter(config).then(function onAdapterResolution(response) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n response.data = transformData.call(\n config,\n config.transformResponse,\n response\n );\n\n response.headers = AxiosHeaders$1.from(response.headers);\n\n return response;\n }, function onAdapterRejection(reason) {\n if (!isCancel(reason)) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n if (reason && reason.response) {\n reason.response.data = transformData.call(\n config,\n config.transformResponse,\n reason.response\n );\n reason.response.headers = AxiosHeaders$1.from(reason.response.headers);\n }\n }\n\n return Promise.reject(reason);\n });\n}\n\nconst headersToObject = (thing) => thing instanceof AxiosHeaders$1 ? { ...thing } : thing;\n\n/**\n * Config-specific merge-function which creates a new config-object\n * by merging two configuration objects together.\n *\n * @param {Object} config1\n * @param {Object} config2\n *\n * @returns {Object} New object resulting from merging config2 to config1\n */\nfunction mergeConfig(config1, config2) {\n // eslint-disable-next-line no-param-reassign\n config2 = config2 || {};\n const config = {};\n\n function getMergedValue(target, source, caseless) {\n if (utils$1.isPlainObject(target) && utils$1.isPlainObject(source)) {\n return utils$1.merge.call({caseless}, target, source);\n } else if (utils$1.isPlainObject(source)) {\n return utils$1.merge({}, source);\n } else if (utils$1.isArray(source)) {\n return source.slice();\n }\n return source;\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDeepProperties(a, b, caseless) {\n if (!utils$1.isUndefined(b)) {\n return getMergedValue(a, b, caseless);\n } else if (!utils$1.isUndefined(a)) {\n return getMergedValue(undefined, a, caseless);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function valueFromConfig2(a, b) {\n if (!utils$1.isUndefined(b)) {\n return getMergedValue(undefined, b);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function defaultToConfig2(a, b) {\n if (!utils$1.isUndefined(b)) {\n return getMergedValue(undefined, b);\n } else if (!utils$1.isUndefined(a)) {\n return getMergedValue(undefined, a);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDirectKeys(a, b, prop) {\n if (prop in config2) {\n return getMergedValue(a, b);\n } else if (prop in config1) {\n return getMergedValue(undefined, a);\n }\n }\n\n const mergeMap = {\n url: valueFromConfig2,\n method: valueFromConfig2,\n data: valueFromConfig2,\n baseURL: defaultToConfig2,\n transformRequest: defaultToConfig2,\n transformResponse: defaultToConfig2,\n paramsSerializer: defaultToConfig2,\n timeout: defaultToConfig2,\n timeoutMessage: defaultToConfig2,\n withCredentials: defaultToConfig2,\n withXSRFToken: defaultToConfig2,\n adapter: defaultToConfig2,\n responseType: defaultToConfig2,\n xsrfCookieName: defaultToConfig2,\n xsrfHeaderName: defaultToConfig2,\n onUploadProgress: defaultToConfig2,\n onDownloadProgress: defaultToConfig2,\n decompress: defaultToConfig2,\n maxContentLength: defaultToConfig2,\n maxBodyLength: defaultToConfig2,\n beforeRedirect: defaultToConfig2,\n transport: defaultToConfig2,\n httpAgent: defaultToConfig2,\n httpsAgent: defaultToConfig2,\n cancelToken: defaultToConfig2,\n socketPath: defaultToConfig2,\n responseEncoding: defaultToConfig2,\n validateStatus: mergeDirectKeys,\n headers: (a, b) => mergeDeepProperties(headersToObject(a), headersToObject(b), true)\n };\n\n utils$1.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {\n const merge = mergeMap[prop] || mergeDeepProperties;\n const configValue = merge(config1[prop], config2[prop], prop);\n (utils$1.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);\n });\n\n return config;\n}\n\nconst VERSION = \"1.6.8\";\n\nconst validators$1 = {};\n\n// eslint-disable-next-line func-names\n['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach((type, i) => {\n validators$1[type] = function validator(thing) {\n return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type;\n };\n});\n\nconst deprecatedWarnings = {};\n\n/**\n * Transitional option validator\n *\n * @param {function|boolean?} validator - set to false if the transitional option has been removed\n * @param {string?} version - deprecated version / removed since version\n * @param {string?} message - some message with additional info\n *\n * @returns {function}\n */\nvalidators$1.transitional = function transitional(validator, version, message) {\n function formatMessage(opt, desc) {\n return '[Axios v' + VERSION + '] Transitional option \\'' + opt + '\\'' + desc + (message ? '. ' + message : '');\n }\n\n // eslint-disable-next-line func-names\n return (value, opt, opts) => {\n if (validator === false) {\n throw new AxiosError(\n formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')),\n AxiosError.ERR_DEPRECATED\n );\n }\n\n if (version && !deprecatedWarnings[opt]) {\n deprecatedWarnings[opt] = true;\n // eslint-disable-next-line no-console\n console.warn(\n formatMessage(\n opt,\n ' has been deprecated since v' + version + ' and will be removed in the near future'\n )\n );\n }\n\n return validator ? validator(value, opt, opts) : true;\n };\n};\n\n/**\n * Assert object's properties type\n *\n * @param {object} options\n * @param {object} schema\n * @param {boolean?} allowUnknown\n *\n * @returns {object}\n */\n\nfunction assertOptions(options, schema, allowUnknown) {\n if (typeof options !== 'object') {\n throw new AxiosError('options must be an object', AxiosError.ERR_BAD_OPTION_VALUE);\n }\n const keys = Object.keys(options);\n let i = keys.length;\n while (i-- > 0) {\n const opt = keys[i];\n const validator = schema[opt];\n if (validator) {\n const value = options[opt];\n const result = value === undefined || validator(value, opt, options);\n if (result !== true) {\n throw new AxiosError('option ' + opt + ' must be ' + result, AxiosError.ERR_BAD_OPTION_VALUE);\n }\n continue;\n }\n if (allowUnknown !== true) {\n throw new AxiosError('Unknown option ' + opt, AxiosError.ERR_BAD_OPTION);\n }\n }\n}\n\nvar validator = {\n assertOptions,\n validators: validators$1\n};\n\nconst validators = validator.validators;\n\n/**\n * Create a new instance of Axios\n *\n * @param {Object} instanceConfig The default config for the instance\n *\n * @return {Axios} A new instance of Axios\n */\nclass Axios {\n constructor(instanceConfig) {\n this.defaults = instanceConfig;\n this.interceptors = {\n request: new InterceptorManager(),\n response: new InterceptorManager()\n };\n }\n\n /**\n * Dispatch a request\n *\n * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)\n * @param {?Object} config\n *\n * @returns {Promise} The Promise to be fulfilled\n */\n async request(configOrUrl, config) {\n try {\n return await this._request(configOrUrl, config);\n } catch (err) {\n if (err instanceof Error) {\n let dummy;\n\n Error.captureStackTrace ? Error.captureStackTrace(dummy = {}) : (dummy = new Error());\n\n // slice off the Error: ... line\n const stack = dummy.stack ? dummy.stack.replace(/^.+\\n/, '') : '';\n\n if (!err.stack) {\n err.stack = stack;\n // match without the 2 top stack lines\n } else if (stack && !String(err.stack).endsWith(stack.replace(/^.+\\n.+\\n/, ''))) {\n err.stack += '\\n' + stack;\n }\n }\n\n throw err;\n }\n }\n\n _request(configOrUrl, config) {\n /*eslint no-param-reassign:0*/\n // Allow for axios('example/url'[, config]) a la fetch API\n if (typeof configOrUrl === 'string') {\n config = config || {};\n config.url = configOrUrl;\n } else {\n config = configOrUrl || {};\n }\n\n config = mergeConfig(this.defaults, config);\n\n const {transitional, paramsSerializer, headers} = config;\n\n if (transitional !== undefined) {\n validator.assertOptions(transitional, {\n silentJSONParsing: validators.transitional(validators.boolean),\n forcedJSONParsing: validators.transitional(validators.boolean),\n clarifyTimeoutError: validators.transitional(validators.boolean)\n }, false);\n }\n\n if (paramsSerializer != null) {\n if (utils$1.isFunction(paramsSerializer)) {\n config.paramsSerializer = {\n serialize: paramsSerializer\n };\n } else {\n validator.assertOptions(paramsSerializer, {\n encode: validators.function,\n serialize: validators.function\n }, true);\n }\n }\n\n // Set config.method\n config.method = (config.method || this.defaults.method || 'get').toLowerCase();\n\n // Flatten headers\n let contextHeaders = headers && utils$1.merge(\n headers.common,\n headers[config.method]\n );\n\n headers && utils$1.forEach(\n ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],\n (method) => {\n delete headers[method];\n }\n );\n\n config.headers = AxiosHeaders$1.concat(contextHeaders, headers);\n\n // filter out skipped interceptors\n const requestInterceptorChain = [];\n let synchronousRequestInterceptors = true;\n this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) {\n return;\n }\n\n synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;\n\n requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);\n });\n\n const responseInterceptorChain = [];\n this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);\n });\n\n let promise;\n let i = 0;\n let len;\n\n if (!synchronousRequestInterceptors) {\n const chain = [dispatchRequest.bind(this), undefined];\n chain.unshift.apply(chain, requestInterceptorChain);\n chain.push.apply(chain, responseInterceptorChain);\n len = chain.length;\n\n promise = Promise.resolve(config);\n\n while (i < len) {\n promise = promise.then(chain[i++], chain[i++]);\n }\n\n return promise;\n }\n\n len = requestInterceptorChain.length;\n\n let newConfig = config;\n\n i = 0;\n\n while (i < len) {\n const onFulfilled = requestInterceptorChain[i++];\n const onRejected = requestInterceptorChain[i++];\n try {\n newConfig = onFulfilled(newConfig);\n } catch (error) {\n onRejected.call(this, error);\n break;\n }\n }\n\n try {\n promise = dispatchRequest.call(this, newConfig);\n } catch (error) {\n return Promise.reject(error);\n }\n\n i = 0;\n len = responseInterceptorChain.length;\n\n while (i < len) {\n promise = promise.then(responseInterceptorChain[i++], responseInterceptorChain[i++]);\n }\n\n return promise;\n }\n\n getUri(config) {\n config = mergeConfig(this.defaults, config);\n const fullPath = buildFullPath(config.baseURL, config.url);\n return buildURL(fullPath, config.params, config.paramsSerializer);\n }\n}\n\n// Provide aliases for supported request methods\nutils$1.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, config) {\n return this.request(mergeConfig(config || {}, {\n method,\n url,\n data: (config || {}).data\n }));\n };\n});\n\nutils$1.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n /*eslint func-names:0*/\n\n function generateHTTPMethod(isForm) {\n return function httpMethod(url, data, config) {\n return this.request(mergeConfig(config || {}, {\n method,\n headers: isForm ? {\n 'Content-Type': 'multipart/form-data'\n } : {},\n url,\n data\n }));\n };\n }\n\n Axios.prototype[method] = generateHTTPMethod();\n\n Axios.prototype[method + 'Form'] = generateHTTPMethod(true);\n});\n\nvar Axios$1 = Axios;\n\n/**\n * A `CancelToken` is an object that can be used to request cancellation of an operation.\n *\n * @param {Function} executor The executor function.\n *\n * @returns {CancelToken}\n */\nclass CancelToken {\n constructor(executor) {\n if (typeof executor !== 'function') {\n throw new TypeError('executor must be a function.');\n }\n\n let resolvePromise;\n\n this.promise = new Promise(function promiseExecutor(resolve) {\n resolvePromise = resolve;\n });\n\n const token = this;\n\n // eslint-disable-next-line func-names\n this.promise.then(cancel => {\n if (!token._listeners) return;\n\n let i = token._listeners.length;\n\n while (i-- > 0) {\n token._listeners[i](cancel);\n }\n token._listeners = null;\n });\n\n // eslint-disable-next-line func-names\n this.promise.then = onfulfilled => {\n let _resolve;\n // eslint-disable-next-line func-names\n const promise = new Promise(resolve => {\n token.subscribe(resolve);\n _resolve = resolve;\n }).then(onfulfilled);\n\n promise.cancel = function reject() {\n token.unsubscribe(_resolve);\n };\n\n return promise;\n };\n\n executor(function cancel(message, config, request) {\n if (token.reason) {\n // Cancellation has already been requested\n return;\n }\n\n token.reason = new CanceledError(message, config, request);\n resolvePromise(token.reason);\n });\n }\n\n /**\n * Throws a `CanceledError` if cancellation has been requested.\n */\n throwIfRequested() {\n if (this.reason) {\n throw this.reason;\n }\n }\n\n /**\n * Subscribe to the cancel signal\n */\n\n subscribe(listener) {\n if (this.reason) {\n listener(this.reason);\n return;\n }\n\n if (this._listeners) {\n this._listeners.push(listener);\n } else {\n this._listeners = [listener];\n }\n }\n\n /**\n * Unsubscribe from the cancel signal\n */\n\n unsubscribe(listener) {\n if (!this._listeners) {\n return;\n }\n const index = this._listeners.indexOf(listener);\n if (index !== -1) {\n this._listeners.splice(index, 1);\n }\n }\n\n /**\n * Returns an object that contains a new `CancelToken` and a function that, when called,\n * cancels the `CancelToken`.\n */\n static source() {\n let cancel;\n const token = new CancelToken(function executor(c) {\n cancel = c;\n });\n return {\n token,\n cancel\n };\n }\n}\n\nvar CancelToken$1 = CancelToken;\n\n/**\n * Syntactic sugar for invoking a function and expanding an array for arguments.\n *\n * Common use case would be to use `Function.prototype.apply`.\n *\n * ```js\n * function f(x, y, z) {}\n * var args = [1, 2, 3];\n * f.apply(null, args);\n * ```\n *\n * With `spread` this example can be re-written.\n *\n * ```js\n * spread(function(x, y, z) {})([1, 2, 3]);\n * ```\n *\n * @param {Function} callback\n *\n * @returns {Function}\n */\nfunction spread(callback) {\n return function wrap(arr) {\n return callback.apply(null, arr);\n };\n}\n\n/**\n * Determines whether the payload is an error thrown by Axios\n *\n * @param {*} payload The value to test\n *\n * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false\n */\nfunction isAxiosError(payload) {\n return utils$1.isObject(payload) && (payload.isAxiosError === true);\n}\n\nconst HttpStatusCode = {\n Continue: 100,\n SwitchingProtocols: 101,\n Processing: 102,\n EarlyHints: 103,\n Ok: 200,\n Created: 201,\n Accepted: 202,\n NonAuthoritativeInformation: 203,\n NoContent: 204,\n ResetContent: 205,\n PartialContent: 206,\n MultiStatus: 207,\n AlreadyReported: 208,\n ImUsed: 226,\n MultipleChoices: 300,\n MovedPermanently: 301,\n Found: 302,\n SeeOther: 303,\n NotModified: 304,\n UseProxy: 305,\n Unused: 306,\n TemporaryRedirect: 307,\n PermanentRedirect: 308,\n BadRequest: 400,\n Unauthorized: 401,\n PaymentRequired: 402,\n Forbidden: 403,\n NotFound: 404,\n MethodNotAllowed: 405,\n NotAcceptable: 406,\n ProxyAuthenticationRequired: 407,\n RequestTimeout: 408,\n Conflict: 409,\n Gone: 410,\n LengthRequired: 411,\n PreconditionFailed: 412,\n PayloadTooLarge: 413,\n UriTooLong: 414,\n UnsupportedMediaType: 415,\n RangeNotSatisfiable: 416,\n ExpectationFailed: 417,\n ImATeapot: 418,\n MisdirectedRequest: 421,\n UnprocessableEntity: 422,\n Locked: 423,\n FailedDependency: 424,\n TooEarly: 425,\n UpgradeRequired: 426,\n PreconditionRequired: 428,\n TooManyRequests: 429,\n RequestHeaderFieldsTooLarge: 431,\n UnavailableForLegalReasons: 451,\n InternalServerError: 500,\n NotImplemented: 501,\n BadGateway: 502,\n ServiceUnavailable: 503,\n GatewayTimeout: 504,\n HttpVersionNotSupported: 505,\n VariantAlsoNegotiates: 506,\n InsufficientStorage: 507,\n LoopDetected: 508,\n NotExtended: 510,\n NetworkAuthenticationRequired: 511,\n};\n\nObject.entries(HttpStatusCode).forEach(([key, value]) => {\n HttpStatusCode[value] = key;\n});\n\nvar HttpStatusCode$1 = HttpStatusCode;\n\n/**\n * Create an instance of Axios\n *\n * @param {Object} defaultConfig The default config for the instance\n *\n * @returns {Axios} A new instance of Axios\n */\nfunction createInstance(defaultConfig) {\n const context = new Axios$1(defaultConfig);\n const instance = bind(Axios$1.prototype.request, context);\n\n // Copy axios.prototype to instance\n utils$1.extend(instance, Axios$1.prototype, context, {allOwnKeys: true});\n\n // Copy context to instance\n utils$1.extend(instance, context, null, {allOwnKeys: true});\n\n // Factory for creating new instances\n instance.create = function create(instanceConfig) {\n return createInstance(mergeConfig(defaultConfig, instanceConfig));\n };\n\n return instance;\n}\n\n// Create the default instance to be exported\nconst axios = createInstance(defaults$1);\n\n// Expose Axios class to allow class inheritance\naxios.Axios = Axios$1;\n\n// Expose Cancel & CancelToken\naxios.CanceledError = CanceledError;\naxios.CancelToken = CancelToken$1;\naxios.isCancel = isCancel;\naxios.VERSION = VERSION;\naxios.toFormData = toFormData;\n\n// Expose AxiosError class\naxios.AxiosError = AxiosError;\n\n// alias for CanceledError for backward compatibility\naxios.Cancel = axios.CanceledError;\n\n// Expose all/spread\naxios.all = function all(promises) {\n return Promise.all(promises);\n};\n\naxios.spread = spread;\n\n// Expose isAxiosError\naxios.isAxiosError = isAxiosError;\n\n// Expose mergeConfig\naxios.mergeConfig = mergeConfig;\n\naxios.AxiosHeaders = AxiosHeaders$1;\n\naxios.formToJSON = thing => formDataToJSON(utils$1.isHTMLForm(thing) ? new FormData(thing) : thing);\n\naxios.getAdapter = adapters.getAdapter;\n\naxios.HttpStatusCode = HttpStatusCode$1;\n\naxios.default = axios;\n\nvar ds=Object.defineProperty;var zg=Object.getOwnPropertyDescriptor;var Kg=Object.getOwnPropertyNames;var Gg=Object.prototype.hasOwnProperty;var we=(t,e)=>()=>(t&&(e=t(t=0)),e);var M=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Qt=(t,e)=>{for(var r in e)ds(t,r,{get:e[r],enumerable:!0});},Qg=(t,e,r,i)=>{if(e&&typeof e==\"object\"||typeof e==\"function\")for(let n of Kg(e))!Gg.call(t,n)&&n!==r&&ds(t,n,{get:()=>e[n],enumerable:!(i=zg(e,n))||i.enumerable});return t};var X=t=>Qg(ds({},\"__esModule\",{value:!0}),t);var B,_=we(()=>{B={deviceMemory:8,hardwareConcurrency:8,language:\"en-US\"};});var P={};Qt(P,{_debugEnd:()=>yu,_debugProcess:()=>gu,_events:()=>ku,_eventsCount:()=>xu,_exiting:()=>Yl,_fatalExceptions:()=>cu,_getActiveHandles:()=>eu,_getActiveRequests:()=>Zl,_kill:()=>ru,_linkedBinding:()=>Gl,_maxListeners:()=>Ou,_preload_modules:()=>Cu,_rawDebug:()=>zl,_startProfilerIdleNotifier:()=>bu,_stopProfilerIdleNotifier:()=>wu,_tickCallback:()=>pu,abort:()=>Eu,addListener:()=>Mu,allowedNodeEnvironmentFlags:()=>lu,arch:()=>xl,argv:()=>Ul,argv0:()=>Ru,assert:()=>uu,binding:()=>Fl,chdir:()=>Hl,config:()=>Jl,cpuUsage:()=>Fi,cwd:()=>$l,debugPort:()=>Tu,default:()=>$u,dlopen:()=>Xl,domain:()=>Ql,emit:()=>Du,emitWarning:()=>jl,env:()=>Ll,execArgv:()=>Nl,execPath:()=>Iu,exit:()=>ou,features:()=>fu,hasUncaughtExceptionCaptureCallback:()=>du,hrtime:()=>ji,kill:()=>su,listeners:()=>Wu,memoryUsage:()=>nu,moduleLoadList:()=>Kl,nextTick:()=>Pl,off:()=>Uu,on:()=>bt,once:()=>Lu,openStdin:()=>au,pid:()=>Su,platform:()=>Ml,ppid:()=>Au,prependListener:()=>ju,prependOnceListener:()=>Fu,reallyExit:()=>tu,release:()=>Vl,removeAllListeners:()=>qu,removeListener:()=>Nu,resourceUsage:()=>iu,setSourceMapsEnabled:()=>Bu,setUncaughtExceptionCaptureCallback:()=>hu,stderr:()=>mu,stdin:()=>vu,stdout:()=>_u,title:()=>kl,umask:()=>Wl,uptime:()=>Pu,version:()=>ql,versions:()=>Dl});function ys(t){throw new Error(\"Node.js process \"+t+\" is not supported by JSPM core outside of Node.js\")}function Yg(){!xr||!Yt||(xr=!1,Yt.length?yt=Yt.concat(yt):Di=-1,yt.length&&Bl());}function Bl(){if(!xr){var t=setTimeout(Yg,0);xr=!0;for(var e=yt.length;e;){for(Yt=yt,yt=[];++Di1)for(var r=1;r{v();m();_();yt=[],xr=!1,Di=-1;Ol.prototype.run=function(){this.fun.apply(null,this.array);};kl=\"browser\",xl=\"x64\",Ml=\"browser\",Ll={PATH:\"/usr/bin\",LANG:B.language+\".UTF-8\",PWD:\"/\",HOME:\"/home\",TMP:\"/tmp\"},Ul=[\"/usr/bin/node\"],Nl=[],ql=\"v16.8.0\",Dl={},jl=function(t,e){console.warn((e?e+\": \":\"\")+t);},Fl=function(t){ys(\"binding\");},Wl=function(t){return 0},$l=function(){return \"/\"},Hl=function(t){},Vl={name:\"node\",sourceUrl:\"\",headersUrl:\"\",libUrl:\"\"};zl=ve,Kl=[];Ql={},Yl=!1,Jl={};tu=ve,ru=ve,Fi=function(){return {}},iu=Fi,nu=Fi,su=ve,ou=ve,au=ve,lu={};fu={inspector:!1,debug:!1,uv:!1,ipv6:!1,tls_alpn:!1,tls_sni:!1,tls_ocsp:!1,tls:!1,cached_builtins:!0},cu=ve,hu=ve;pu=ve,gu=ve,yu=ve,bu=ve,wu=ve,_u=void 0,mu=void 0,vu=void 0,Eu=ve,Su=2,Au=1,Iu=\"/bin/usr/node\",Tu=9229,Ru=\"node\",Cu=[],Bu=ve,Mt={now:typeof performance<\"u\"?performance.now.bind(performance):void 0,timing:typeof performance<\"u\"?performance.timing:void 0};Mt.now===void 0&&(ps=Date.now(),Mt.timing&&Mt.timing.navigationStart&&(ps=Mt.timing.navigationStart),Mt.now=()=>Date.now()-ps);gs=1e9;ji.bigint=function(t){var e=ji(t);return typeof BigInt>\"u\"?e[0]*gs+e[1]:BigInt(e[0]*gs)+BigInt(e[1])};Ou=10,ku={},xu=0;Mu=bt,Lu=bt,Uu=bt,Nu=bt,qu=bt,Du=ve,ju=bt,Fu=bt;$u={version:ql,versions:Dl,arch:xl,platform:Ml,release:Vl,_rawDebug:zl,moduleLoadList:Kl,binding:Fl,_linkedBinding:Gl,_events:ku,_eventsCount:xu,_maxListeners:Ou,on:bt,addListener:Mu,once:Lu,off:Uu,removeListener:Nu,removeAllListeners:qu,emit:Du,prependListener:ju,prependOnceListener:Fu,listeners:Wu,domain:Ql,_exiting:Yl,config:Jl,dlopen:Xl,uptime:Pu,_getActiveRequests:Zl,_getActiveHandles:eu,reallyExit:tu,_kill:ru,cpuUsage:Fi,resourceUsage:iu,memoryUsage:nu,kill:su,exit:ou,openStdin:au,allowedNodeEnvironmentFlags:lu,assert:uu,features:fu,_fatalExceptions:cu,setUncaughtExceptionCaptureCallback:hu,hasUncaughtExceptionCaptureCallback:du,emitWarning:jl,nextTick:Pl,_tickCallback:pu,_debugProcess:gu,_debugEnd:yu,_startProfilerIdleNotifier:bu,_stopProfilerIdleNotifier:wu,stdout:_u,stdin:vu,stderr:mu,abort:Eu,umask:Wl,chdir:Hl,cwd:$l,env:Ll,title:kl,argv:Ul,execArgv:Nl,pid:Su,ppid:Au,execPath:Iu,debugPort:Tu,hrtime:ji,argv0:Ru,_preload_modules:Cu,setSourceMapsEnabled:Bu};});var m=we(()=>{Hu();});var _e={};Qt(_e,{Buffer:()=>x,INSPECT_MAX_BYTES:()=>ey,default:()=>Lt,kMaxLength:()=>ty});function Jg(){if(Vu)return ui;Vu=!0,ui.byteLength=a,ui.toByteArray=c,ui.fromByteArray=g;for(var t=[],e=[],r=typeof Uint8Array<\"u\"?Uint8Array:Array,i=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\",n=0,o=i.length;n0)throw new Error(\"Invalid string. Length must be a multiple of 4\");var E=y.indexOf(\"=\");E===-1&&(E=w);var S=E===w?0:4-E%4;return [E,S]}function a(y){var w=s(y),E=w[0],S=w[1];return (E+S)*3/4-S}function u(y,w,E){return (w+E)*3/4-E}function c(y){var w,E=s(y),S=E[0],I=E[1],C=new r(u(y,S,I)),R=0,U=I>0?S-4:S,N;for(N=0;N>16&255,C[R++]=w>>8&255,C[R++]=w&255;return I===2&&(w=e[y.charCodeAt(N)]<<2|e[y.charCodeAt(N+1)]>>4,C[R++]=w&255),I===1&&(w=e[y.charCodeAt(N)]<<10|e[y.charCodeAt(N+1)]<<4|e[y.charCodeAt(N+2)]>>2,C[R++]=w>>8&255,C[R++]=w&255),C}function h(y){return t[y>>18&63]+t[y>>12&63]+t[y>>6&63]+t[y&63]}function d(y,w,E){for(var S,I=[],C=w;CU?U:R+C));return S===1?(w=y[E-1],I.push(t[w>>2]+t[w<<4&63]+\"==\")):S===2&&(w=(y[E-2]<<8)+y[E-1],I.push(t[w>>10]+t[w>>4&63]+t[w<<2&63]+\"=\")),I.join(\"\")}return ui}function Xg(){if(zu)return Wi;zu=!0;return Wi.read=function(t,e,r,i,n){var o,s,a=n*8-i-1,u=(1<>1,h=-7,d=r?n-1:0,g=r?-1:1,y=t[e+d];for(d+=g,o=y&(1<<-h)-1,y>>=-h,h+=a;h>0;o=o*256+t[e+d],d+=g,h-=8);for(s=o&(1<<-h)-1,o>>=-h,h+=i;h>0;s=s*256+t[e+d],d+=g,h-=8);if(o===0)o=1-c;else {if(o===u)return s?NaN:(y?-1:1)*(1/0);s=s+Math.pow(2,i),o=o-c;}return (y?-1:1)*s*Math.pow(2,o-i)},Wi.write=function(t,e,r,i,n,o){var s,a,u,c=o*8-n-1,h=(1<>1,g=n===23?Math.pow(2,-24)-Math.pow(2,-77):0,y=i?0:o-1,w=i?1:-1,E=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=h):(s=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-s))<1&&(s--,u*=2),s+d>=1?e+=g/u:e+=g*Math.pow(2,1-d),e*u>=2&&(s++,u/=2),s+d>=h?(a=0,s=h):s+d>=1?(a=(e*u-1)*Math.pow(2,n),s=s+d):(a=e*Math.pow(2,d-1)*Math.pow(2,n),s=0));n>=8;t[r+y]=a&255,y+=w,a/=256,n-=8);for(s=s<0;t[r+y]=s&255,y+=w,s/=256,c-=8);t[r+y-w]|=E*128;},Wi}function Zg(){if(Ku)return Jt;Ku=!0;let t=Jg(),e=Xg(),r=typeof Symbol==\"function\"&&typeof Symbol.for==\"function\"?Symbol.for(\"nodejs.util.inspect.custom\"):null;Jt.Buffer=s,Jt.SlowBuffer=I,Jt.INSPECT_MAX_BYTES=50;let i=2147483647;Jt.kMaxLength=i,s.TYPED_ARRAY_SUPPORT=n(),!s.TYPED_ARRAY_SUPPORT&&typeof console<\"u\"&&typeof console.error==\"function\"&&console.error(\"This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.\");function n(){try{let p=new Uint8Array(1),l={foo:function(){return 42}};return Object.setPrototypeOf(l,Uint8Array.prototype),Object.setPrototypeOf(p,l),p.foo()===42}catch{return !1}}Object.defineProperty(s.prototype,\"parent\",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),Object.defineProperty(s.prototype,\"offset\",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}});function o(p){if(p>i)throw new RangeError('The value \"'+p+'\" is invalid for option \"size\"');let l=new Uint8Array(p);return Object.setPrototypeOf(l,s.prototype),l}function s(p,l,f){if(typeof p==\"number\"){if(typeof l==\"string\")throw new TypeError('The \"string\" argument must be of type string. Received type number');return h(p)}return a(p,l,f)}s.poolSize=8192;function a(p,l,f){if(typeof p==\"string\")return d(p,l);if(ArrayBuffer.isView(p))return y(p);if(p==null)throw new TypeError(\"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type \"+typeof p);if(Ye(p,ArrayBuffer)||p&&Ye(p.buffer,ArrayBuffer)||typeof SharedArrayBuffer<\"u\"&&(Ye(p,SharedArrayBuffer)||p&&Ye(p.buffer,SharedArrayBuffer)))return w(p,l,f);if(typeof p==\"number\")throw new TypeError('The \"value\" argument must not be of type number. Received type number');let b=p.valueOf&&p.valueOf();if(b!=null&&b!==p)return s.from(b,l,f);let A=E(p);if(A)return A;if(typeof Symbol<\"u\"&&Symbol.toPrimitive!=null&&typeof p[Symbol.toPrimitive]==\"function\")return s.from(p[Symbol.toPrimitive](\"string\"),l,f);throw new TypeError(\"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type \"+typeof p)}s.from=function(p,l,f){return a(p,l,f)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array);function u(p){if(typeof p!=\"number\")throw new TypeError('\"size\" argument must be of type number');if(p<0)throw new RangeError('The value \"'+p+'\" is invalid for option \"size\"')}function c(p,l,f){return u(p),p<=0?o(p):l!==void 0?typeof f==\"string\"?o(p).fill(l,f):o(p).fill(l):o(p)}s.alloc=function(p,l,f){return c(p,l,f)};function h(p){return u(p),o(p<0?0:S(p)|0)}s.allocUnsafe=function(p){return h(p)},s.allocUnsafeSlow=function(p){return h(p)};function d(p,l){if((typeof l!=\"string\"||l===\"\")&&(l=\"utf8\"),!s.isEncoding(l))throw new TypeError(\"Unknown encoding: \"+l);let f=C(p,l)|0,b=o(f),A=b.write(p,l);return A!==f&&(b=b.slice(0,A)),b}function g(p){let l=p.length<0?0:S(p.length)|0,f=o(l);for(let b=0;b=i)throw new RangeError(\"Attempt to allocate Buffer larger than maximum size: 0x\"+i.toString(16)+\" bytes\");return p|0}function I(p){return +p!=p&&(p=0),s.alloc(+p)}s.isBuffer=function(l){return l!=null&&l._isBuffer===!0&&l!==s.prototype},s.compare=function(l,f){if(Ye(l,Uint8Array)&&(l=s.from(l,l.offset,l.byteLength)),Ye(f,Uint8Array)&&(f=s.from(f,f.offset,f.byteLength)),!s.isBuffer(l)||!s.isBuffer(f))throw new TypeError('The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array');if(l===f)return 0;let b=l.length,A=f.length;for(let T=0,O=Math.min(b,A);TA.length?(s.isBuffer(O)||(O=s.from(O)),O.copy(A,T)):Uint8Array.prototype.set.call(A,O,T);else if(s.isBuffer(O))O.copy(A,T);else throw new TypeError('\"list\" argument must be an Array of Buffers');T+=O.length;}return A};function C(p,l){if(s.isBuffer(p))return p.length;if(ArrayBuffer.isView(p)||Ye(p,ArrayBuffer))return p.byteLength;if(typeof p!=\"string\")throw new TypeError('The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof p);let f=p.length,b=arguments.length>2&&arguments[2]===!0;if(!b&&f===0)return 0;let A=!1;for(;;)switch(l){case\"ascii\":case\"latin1\":case\"binary\":return f;case\"utf8\":case\"utf-8\":return cs(p).length;case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return f*2;case\"hex\":return f>>>1;case\"base64\":return Cl(p).length;default:if(A)return b?-1:cs(p).length;l=(\"\"+l).toLowerCase(),A=!0;}}s.byteLength=C;function R(p,l,f){let b=!1;if((l===void 0||l<0)&&(l=0),l>this.length||((f===void 0||f>this.length)&&(f=this.length),f<=0)||(f>>>=0,l>>>=0,f<=l))return \"\";for(p||(p=\"utf8\");;)switch(p){case\"hex\":return Ng(this,l,f);case\"utf8\":case\"utf-8\":return Cr(this,l,f);case\"ascii\":return us(this,l,f);case\"latin1\":case\"binary\":return Ug(this,l,f);case\"base64\":return pe(this,l,f);case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return qg(this,l,f);default:if(b)throw new TypeError(\"Unknown encoding: \"+p);p=(p+\"\").toLowerCase(),b=!0;}}s.prototype._isBuffer=!0;function U(p,l,f){let b=p[l];p[l]=p[f],p[f]=b;}s.prototype.swap16=function(){let l=this.length;if(l%2!==0)throw new RangeError(\"Buffer size must be a multiple of 16-bits\");for(let f=0;ff&&(l+=\" ... \"),\"\"},r&&(s.prototype[r]=s.prototype.inspect),s.prototype.compare=function(l,f,b,A,T){if(Ye(l,Uint8Array)&&(l=s.from(l,l.offset,l.byteLength)),!s.isBuffer(l))throw new TypeError('The \"target\" argument must be one of type Buffer or Uint8Array. Received type '+typeof l);if(f===void 0&&(f=0),b===void 0&&(b=l?l.length:0),A===void 0&&(A=0),T===void 0&&(T=this.length),f<0||b>l.length||A<0||T>this.length)throw new RangeError(\"out of range index\");if(A>=T&&f>=b)return 0;if(A>=T)return -1;if(f>=b)return 1;if(f>>>=0,b>>>=0,A>>>=0,T>>>=0,this===l)return 0;let O=T-A,$=b-f,se=Math.min(O,$),te=this.slice(A,T),oe=l.slice(f,b);for(let J=0;J2147483647?f=2147483647:f<-2147483648&&(f=-2147483648),f=+f,hs(f)&&(f=A?0:p.length-1),f<0&&(f=p.length+f),f>=p.length){if(A)return -1;f=p.length-1;}else if(f<0)if(A)f=0;else return -1;if(typeof l==\"string\"&&(l=s.from(l,b)),s.isBuffer(l))return l.length===0?-1:W(p,l,f,b,A);if(typeof l==\"number\")return l=l&255,typeof Uint8Array.prototype.indexOf==\"function\"?A?Uint8Array.prototype.indexOf.call(p,l,f):Uint8Array.prototype.lastIndexOf.call(p,l,f):W(p,[l],f,b,A);throw new TypeError(\"val must be string, number or Buffer\")}function W(p,l,f,b,A){let T=1,O=p.length,$=l.length;if(b!==void 0&&(b=String(b).toLowerCase(),b===\"ucs2\"||b===\"ucs-2\"||b===\"utf16le\"||b===\"utf-16le\")){if(p.length<2||l.length<2)return -1;T=2,O/=2,$/=2,f/=2;}function se(oe,J){return T===1?oe[J]:oe.readUInt16BE(J*T)}let te;if(A){let oe=-1;for(te=f;teO&&(f=O-$),te=f;te>=0;te--){let oe=!0;for(let J=0;J<$;J++)if(se(p,te+J)!==se(l,J)){oe=!1;break}if(oe)return te}return -1}s.prototype.includes=function(l,f,b){return this.indexOf(l,f,b)!==-1},s.prototype.indexOf=function(l,f,b){return N(this,l,f,b,!0)},s.prototype.lastIndexOf=function(l,f,b){return N(this,l,f,b,!1)};function K(p,l,f,b){f=Number(f)||0;let A=p.length-f;b?(b=Number(b),b>A&&(b=A)):b=A;let T=l.length;b>T/2&&(b=T/2);let O;for(O=0;O>>0,isFinite(b)?(b=b>>>0,A===void 0&&(A=\"utf8\")):(A=b,b=void 0);else throw new Error(\"Buffer.write(string, encoding, offset[, length]) is no longer supported\");let T=this.length-f;if((b===void 0||b>T)&&(b=T),l.length>0&&(b<0||f<0)||f>this.length)throw new RangeError(\"Attempt to write outside buffer bounds\");A||(A=\"utf8\");let O=!1;for(;;)switch(A){case\"hex\":return K(this,l,f,b);case\"utf8\":case\"utf-8\":return z(this,l,f,b);case\"ascii\":case\"latin1\":case\"binary\":return Q(this,l,f,b);case\"base64\":return de(this,l,f,b);case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return Gt(this,l,f,b);default:if(O)throw new TypeError(\"Unknown encoding: \"+A);A=(\"\"+A).toLowerCase(),O=!0;}},s.prototype.toJSON=function(){return {type:\"Buffer\",data:Array.prototype.slice.call(this._arr||this,0)}};function pe(p,l,f){return l===0&&f===p.length?t.fromByteArray(p):t.fromByteArray(p.slice(l,f))}function Cr(p,l,f){f=Math.min(p.length,f);let b=[],A=l;for(;A239?4:T>223?3:T>191?2:1;if(A+$<=f){let se,te,oe,J;switch($){case 1:T<128&&(O=T);break;case 2:se=p[A+1],(se&192)===128&&(J=(T&31)<<6|se&63,J>127&&(O=J));break;case 3:se=p[A+1],te=p[A+2],(se&192)===128&&(te&192)===128&&(J=(T&15)<<12|(se&63)<<6|te&63,J>2047&&(J<55296||J>57343)&&(O=J));break;case 4:se=p[A+1],te=p[A+2],oe=p[A+3],(se&192)===128&&(te&192)===128&&(oe&192)===128&&(J=(T&15)<<18|(se&63)<<12|(te&63)<<6|oe&63,J>65535&&J<1114112&&(O=J));}}O===null?(O=65533,$=1):O>65535&&(O-=65536,b.push(O>>>10&1023|55296),O=56320|O&1023),b.push(O),A+=$;}return Pr(b)}let Br=4096;function Pr(p){let l=p.length;if(l<=Br)return String.fromCharCode.apply(String,p);let f=\"\",b=0;for(;bb)&&(f=b);let A=\"\";for(let T=l;Tb&&(l=b),f<0?(f+=b,f<0&&(f=0)):f>b&&(f=b),ff)throw new RangeError(\"Trying to access beyond buffer length\")}s.prototype.readUintLE=s.prototype.readUIntLE=function(l,f,b){l=l>>>0,f=f>>>0,b||ge(l,f,this.length);let A=this[l],T=1,O=0;for(;++O>>0,f=f>>>0,b||ge(l,f,this.length);let A=this[l+--f],T=1;for(;f>0&&(T*=256);)A+=this[l+--f]*T;return A},s.prototype.readUint8=s.prototype.readUInt8=function(l,f){return l=l>>>0,f||ge(l,1,this.length),this[l]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(l,f){return l=l>>>0,f||ge(l,2,this.length),this[l]|this[l+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(l,f){return l=l>>>0,f||ge(l,2,this.length),this[l]<<8|this[l+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(l,f){return l=l>>>0,f||ge(l,4,this.length),(this[l]|this[l+1]<<8|this[l+2]<<16)+this[l+3]*16777216},s.prototype.readUint32BE=s.prototype.readUInt32BE=function(l,f){return l=l>>>0,f||ge(l,4,this.length),this[l]*16777216+(this[l+1]<<16|this[l+2]<<8|this[l+3])},s.prototype.readBigUInt64LE=xt(function(l){l=l>>>0,kr(l,\"offset\");let f=this[l],b=this[l+7];(f===void 0||b===void 0)&&li(l,this.length-8);let A=f+this[++l]*2**8+this[++l]*2**16+this[++l]*2**24,T=this[++l]+this[++l]*2**8+this[++l]*2**16+b*2**24;return BigInt(A)+(BigInt(T)<>>0,kr(l,\"offset\");let f=this[l],b=this[l+7];(f===void 0||b===void 0)&&li(l,this.length-8);let A=f*2**24+this[++l]*2**16+this[++l]*2**8+this[++l],T=this[++l]*2**24+this[++l]*2**16+this[++l]*2**8+b;return (BigInt(A)<>>0,f=f>>>0,b||ge(l,f,this.length);let A=this[l],T=1,O=0;for(;++O=T&&(A-=Math.pow(2,8*f)),A},s.prototype.readIntBE=function(l,f,b){l=l>>>0,f=f>>>0,b||ge(l,f,this.length);let A=f,T=1,O=this[l+--A];for(;A>0&&(T*=256);)O+=this[l+--A]*T;return T*=128,O>=T&&(O-=Math.pow(2,8*f)),O},s.prototype.readInt8=function(l,f){return l=l>>>0,f||ge(l,1,this.length),this[l]&128?(255-this[l]+1)*-1:this[l]},s.prototype.readInt16LE=function(l,f){l=l>>>0,f||ge(l,2,this.length);let b=this[l]|this[l+1]<<8;return b&32768?b|4294901760:b},s.prototype.readInt16BE=function(l,f){l=l>>>0,f||ge(l,2,this.length);let b=this[l+1]|this[l]<<8;return b&32768?b|4294901760:b},s.prototype.readInt32LE=function(l,f){return l=l>>>0,f||ge(l,4,this.length),this[l]|this[l+1]<<8|this[l+2]<<16|this[l+3]<<24},s.prototype.readInt32BE=function(l,f){return l=l>>>0,f||ge(l,4,this.length),this[l]<<24|this[l+1]<<16|this[l+2]<<8|this[l+3]},s.prototype.readBigInt64LE=xt(function(l){l=l>>>0,kr(l,\"offset\");let f=this[l],b=this[l+7];(f===void 0||b===void 0)&&li(l,this.length-8);let A=this[l+4]+this[l+5]*2**8+this[l+6]*2**16+(b<<24);return (BigInt(A)<>>0,kr(l,\"offset\");let f=this[l],b=this[l+7];(f===void 0||b===void 0)&&li(l,this.length-8);let A=(f<<24)+this[++l]*2**16+this[++l]*2**8+this[++l];return (BigInt(A)<>>0,f||ge(l,4,this.length),e.read(this,l,!0,23,4)},s.prototype.readFloatBE=function(l,f){return l=l>>>0,f||ge(l,4,this.length),e.read(this,l,!1,23,4)},s.prototype.readDoubleLE=function(l,f){return l=l>>>0,f||ge(l,8,this.length),e.read(this,l,!0,52,8)},s.prototype.readDoubleBE=function(l,f){return l=l>>>0,f||ge(l,8,this.length),e.read(this,l,!1,52,8)};function Ce(p,l,f,b,A,T){if(!s.isBuffer(p))throw new TypeError('\"buffer\" argument must be a Buffer instance');if(l>A||lp.length)throw new RangeError(\"Index out of range\")}s.prototype.writeUintLE=s.prototype.writeUIntLE=function(l,f,b,A){if(l=+l,f=f>>>0,b=b>>>0,!A){let $=Math.pow(2,8*b)-1;Ce(this,l,f,b,$,0);}let T=1,O=0;for(this[f]=l&255;++O>>0,b=b>>>0,!A){let $=Math.pow(2,8*b)-1;Ce(this,l,f,b,$,0);}let T=b-1,O=1;for(this[f+T]=l&255;--T>=0&&(O*=256);)this[f+T]=l/O&255;return f+b},s.prototype.writeUint8=s.prototype.writeUInt8=function(l,f,b){return l=+l,f=f>>>0,b||Ce(this,l,f,1,255,0),this[f]=l&255,f+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(l,f,b){return l=+l,f=f>>>0,b||Ce(this,l,f,2,65535,0),this[f]=l&255,this[f+1]=l>>>8,f+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function(l,f,b){return l=+l,f=f>>>0,b||Ce(this,l,f,2,65535,0),this[f]=l>>>8,this[f+1]=l&255,f+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function(l,f,b){return l=+l,f=f>>>0,b||Ce(this,l,f,4,4294967295,0),this[f+3]=l>>>24,this[f+2]=l>>>16,this[f+1]=l>>>8,this[f]=l&255,f+4},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function(l,f,b){return l=+l,f=f>>>0,b||Ce(this,l,f,4,4294967295,0),this[f]=l>>>24,this[f+1]=l>>>16,this[f+2]=l>>>8,this[f+3]=l&255,f+4};function vl(p,l,f,b,A){Rl(l,b,A,p,f,7);let T=Number(l&BigInt(4294967295));p[f++]=T,T=T>>8,p[f++]=T,T=T>>8,p[f++]=T,T=T>>8,p[f++]=T;let O=Number(l>>BigInt(32)&BigInt(4294967295));return p[f++]=O,O=O>>8,p[f++]=O,O=O>>8,p[f++]=O,O=O>>8,p[f++]=O,f}function El(p,l,f,b,A){Rl(l,b,A,p,f,7);let T=Number(l&BigInt(4294967295));p[f+7]=T,T=T>>8,p[f+6]=T,T=T>>8,p[f+5]=T,T=T>>8,p[f+4]=T;let O=Number(l>>BigInt(32)&BigInt(4294967295));return p[f+3]=O,O=O>>8,p[f+2]=O,O=O>>8,p[f+1]=O,O=O>>8,p[f]=O,f+8}s.prototype.writeBigUInt64LE=xt(function(l,f=0){return vl(this,l,f,BigInt(0),BigInt(\"0xffffffffffffffff\"))}),s.prototype.writeBigUInt64BE=xt(function(l,f=0){return El(this,l,f,BigInt(0),BigInt(\"0xffffffffffffffff\"))}),s.prototype.writeIntLE=function(l,f,b,A){if(l=+l,f=f>>>0,!A){let se=Math.pow(2,8*b-1);Ce(this,l,f,b,se-1,-se);}let T=0,O=1,$=0;for(this[f]=l&255;++T>0)-$&255;return f+b},s.prototype.writeIntBE=function(l,f,b,A){if(l=+l,f=f>>>0,!A){let se=Math.pow(2,8*b-1);Ce(this,l,f,b,se-1,-se);}let T=b-1,O=1,$=0;for(this[f+T]=l&255;--T>=0&&(O*=256);)l<0&&$===0&&this[f+T+1]!==0&&($=1),this[f+T]=(l/O>>0)-$&255;return f+b},s.prototype.writeInt8=function(l,f,b){return l=+l,f=f>>>0,b||Ce(this,l,f,1,127,-128),l<0&&(l=255+l+1),this[f]=l&255,f+1},s.prototype.writeInt16LE=function(l,f,b){return l=+l,f=f>>>0,b||Ce(this,l,f,2,32767,-32768),this[f]=l&255,this[f+1]=l>>>8,f+2},s.prototype.writeInt16BE=function(l,f,b){return l=+l,f=f>>>0,b||Ce(this,l,f,2,32767,-32768),this[f]=l>>>8,this[f+1]=l&255,f+2},s.prototype.writeInt32LE=function(l,f,b){return l=+l,f=f>>>0,b||Ce(this,l,f,4,2147483647,-2147483648),this[f]=l&255,this[f+1]=l>>>8,this[f+2]=l>>>16,this[f+3]=l>>>24,f+4},s.prototype.writeInt32BE=function(l,f,b){return l=+l,f=f>>>0,b||Ce(this,l,f,4,2147483647,-2147483648),l<0&&(l=4294967295+l+1),this[f]=l>>>24,this[f+1]=l>>>16,this[f+2]=l>>>8,this[f+3]=l&255,f+4},s.prototype.writeBigInt64LE=xt(function(l,f=0){return vl(this,l,f,-BigInt(\"0x8000000000000000\"),BigInt(\"0x7fffffffffffffff\"))}),s.prototype.writeBigInt64BE=xt(function(l,f=0){return El(this,l,f,-BigInt(\"0x8000000000000000\"),BigInt(\"0x7fffffffffffffff\"))});function Sl(p,l,f,b,A,T){if(f+b>p.length)throw new RangeError(\"Index out of range\");if(f<0)throw new RangeError(\"Index out of range\")}function Al(p,l,f,b,A){return l=+l,f=f>>>0,A||Sl(p,l,f,4),e.write(p,l,f,b,23,4),f+4}s.prototype.writeFloatLE=function(l,f,b){return Al(this,l,f,!0,b)},s.prototype.writeFloatBE=function(l,f,b){return Al(this,l,f,!1,b)};function Il(p,l,f,b,A){return l=+l,f=f>>>0,A||Sl(p,l,f,8),e.write(p,l,f,b,52,8),f+8}s.prototype.writeDoubleLE=function(l,f,b){return Il(this,l,f,!0,b)},s.prototype.writeDoubleBE=function(l,f,b){return Il(this,l,f,!1,b)},s.prototype.copy=function(l,f,b,A){if(!s.isBuffer(l))throw new TypeError(\"argument should be a Buffer\");if(b||(b=0),!A&&A!==0&&(A=this.length),f>=l.length&&(f=l.length),f||(f=0),A>0&&A=this.length)throw new RangeError(\"Index out of range\");if(A<0)throw new RangeError(\"sourceEnd out of bounds\");A>this.length&&(A=this.length),l.length-f>>0,b=b===void 0?this.length:b>>>0,l||(l=0);let T;if(typeof l==\"number\")for(T=f;T2**32?A=Tl(String(f)):typeof f==\"bigint\"&&(A=String(f),(f>BigInt(2)**BigInt(32)||f<-(BigInt(2)**BigInt(32)))&&(A=Tl(A)),A+=\"n\"),b+=` It must be ${l}. Received ${A}`,b},RangeError);function Tl(p){let l=\"\",f=p.length,b=p[0]===\"-\"?1:0;for(;f>=b+4;f-=3)l=`_${p.slice(f-3,f)}${l}`;return `${p.slice(0,f)}${l}`}function Dg(p,l,f){kr(l,\"offset\"),(p[l]===void 0||p[l+f]===void 0)&&li(l,p.length-(f+1));}function Rl(p,l,f,b,A,T){if(p>f||p3?l===0||l===BigInt(0)?$=`>= 0${O} and < 2${O} ** ${(T+1)*8}${O}`:$=`>= -(2${O} ** ${(T+1)*8-1}${O}) and < 2 ** ${(T+1)*8-1}${O}`:$=`>= ${l}${O} and <= ${f}${O}`,new Or.ERR_OUT_OF_RANGE(\"value\",$,p)}Dg(b,A,T);}function kr(p,l){if(typeof p!=\"number\")throw new Or.ERR_INVALID_ARG_TYPE(l,\"number\",p)}function li(p,l,f){throw Math.floor(p)!==p?(kr(p,f),new Or.ERR_OUT_OF_RANGE(f||\"offset\",\"an integer\",p)):l<0?new Or.ERR_BUFFER_OUT_OF_BOUNDS:new Or.ERR_OUT_OF_RANGE(f||\"offset\",`>= ${f?1:0} and <= ${l}`,p)}let jg=/[^+/0-9A-Za-z-_]/g;function Fg(p){if(p=p.split(\"=\")[0],p=p.trim().replace(jg,\"\"),p.length<2)return \"\";for(;p.length%4!==0;)p=p+\"=\";return p}function cs(p,l){l=l||1/0;let f,b=p.length,A=null,T=[];for(let O=0;O55295&&f<57344){if(!A){if(f>56319){(l-=3)>-1&&T.push(239,191,189);continue}else if(O+1===b){(l-=3)>-1&&T.push(239,191,189);continue}A=f;continue}if(f<56320){(l-=3)>-1&&T.push(239,191,189),A=f;continue}f=(A-55296<<10|f-56320)+65536;}else A&&(l-=3)>-1&&T.push(239,191,189);if(A=null,f<128){if((l-=1)<0)break;T.push(f);}else if(f<2048){if((l-=2)<0)break;T.push(f>>6|192,f&63|128);}else if(f<65536){if((l-=3)<0)break;T.push(f>>12|224,f>>6&63|128,f&63|128);}else if(f<1114112){if((l-=4)<0)break;T.push(f>>18|240,f>>12&63|128,f>>6&63|128,f&63|128);}else throw new Error(\"Invalid code point\")}return T}function Wg(p){let l=[];for(let f=0;f>8,A=f%256,T.push(A),T.push(b);return T}function Cl(p){return t.toByteArray(Fg(p))}function qi(p,l,f,b){let A;for(A=0;A=l.length||A>=p.length);++A)l[A+f]=p[A];return A}function Ye(p,l){return p instanceof l||p!=null&&p.constructor!=null&&p.constructor.name!=null&&p.constructor.name===l.name}function hs(p){return p!==p}let Hg=function(){let p=\"0123456789abcdef\",l=new Array(256);for(let f=0;f<16;++f){let b=f*16;for(let A=0;A<16;++A)l[b+A]=p[f]+p[A];}return l}();function xt(p){return typeof BigInt>\"u\"?Vg:p}function Vg(){throw new Error(\"BigInt not supported\")}return Jt}var ui,Vu,Wi,zu,Jt,Ku,Lt,x,ey,ty,ye=we(()=>{v();m();_();ui={},Vu=!1;Wi={},zu=!1;Jt={},Ku=!1;Lt=Zg();Lt.Buffer;Lt.SlowBuffer;Lt.INSPECT_MAX_BYTES;Lt.kMaxLength;x=Lt.Buffer,ey=Lt.INSPECT_MAX_BYTES,ty=Lt.kMaxLength;});var v=we(()=>{ye();});var Gu=M(ws=>{v();m();_();Object.defineProperty(ws,\"__esModule\",{value:!0});var bs=class{constructor(e){this.aliasToTopic={},this.max=e;}put(e,r){return r===0||r>this.max?!1:(this.aliasToTopic[r]=e,this.length=Object.keys(this.aliasToTopic).length,!0)}getTopicByAlias(e){return this.aliasToTopic[e]}clear(){this.aliasToTopic={};}};ws.default=bs;});var ce=M((PA,Qu)=>{v();m();_();Qu.exports={ArrayIsArray(t){return Array.isArray(t)},ArrayPrototypeIncludes(t,e){return t.includes(e)},ArrayPrototypeIndexOf(t,e){return t.indexOf(e)},ArrayPrototypeJoin(t,e){return t.join(e)},ArrayPrototypeMap(t,e){return t.map(e)},ArrayPrototypePop(t,e){return t.pop(e)},ArrayPrototypePush(t,e){return t.push(e)},ArrayPrototypeSlice(t,e,r){return t.slice(e,r)},Error,FunctionPrototypeCall(t,e,...r){return t.call(e,...r)},FunctionPrototypeSymbolHasInstance(t,e){return Function.prototype[Symbol.hasInstance].call(t,e)},MathFloor:Math.floor,Number,NumberIsInteger:Number.isInteger,NumberIsNaN:Number.isNaN,NumberMAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER,NumberMIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER,NumberParseInt:Number.parseInt,ObjectDefineProperties(t,e){return Object.defineProperties(t,e)},ObjectDefineProperty(t,e,r){return Object.defineProperty(t,e,r)},ObjectGetOwnPropertyDescriptor(t,e){return Object.getOwnPropertyDescriptor(t,e)},ObjectKeys(t){return Object.keys(t)},ObjectSetPrototypeOf(t,e){return Object.setPrototypeOf(t,e)},Promise,PromisePrototypeCatch(t,e){return t.catch(e)},PromisePrototypeThen(t,e,r){return t.then(e,r)},PromiseReject(t){return Promise.reject(t)},ReflectApply:Reflect.apply,RegExpPrototypeTest(t,e){return t.test(e)},SafeSet:Set,String,StringPrototypeSlice(t,e,r){return t.slice(e,r)},StringPrototypeToLowerCase(t){return t.toLowerCase()},StringPrototypeToUpperCase(t){return t.toUpperCase()},StringPrototypeTrim(t){return t.trim()},Symbol,SymbolFor:Symbol.for,SymbolAsyncIterator:Symbol.asyncIterator,SymbolHasInstance:Symbol.hasInstance,SymbolIterator:Symbol.iterator,TypedArrayPrototypeSet(t,e,r){return t.set(e,r)},Uint8Array};});var Je=M((jA,ms)=>{v();m();_();var ry=(ye(),X(_e)),iy=Object.getPrototypeOf(async function(){}).constructor,Yu=globalThis.Blob||ry.Blob,ny=typeof Yu<\"u\"?function(e){return e instanceof Yu}:function(e){return !1},_s=class extends Error{constructor(e){if(!Array.isArray(e))throw new TypeError(`Expected input to be an Array, got ${typeof e}`);let r=\"\";for(let i=0;i{t=i,e=n;}),resolve:t,reject:e}},promisify(t){return new Promise((e,r)=>{t((i,...n)=>i?r(i):e(...n));})},debuglog(){return function(){}},format(t,...e){return t.replace(/%([sdifj])/g,function(...[r,i]){let n=e.shift();return i===\"f\"?n.toFixed(6):i===\"j\"?JSON.stringify(n):i===\"s\"&&typeof n==\"object\"?`${n.constructor!==Object?n.constructor.name:\"\"} {}`.trim():n.toString()})},inspect(t){switch(typeof t){case\"string\":if(t.includes(\"'\"))if(t.includes('\"')){if(!t.includes(\"`\")&&!t.includes(\"${\"))return `\\`${t}\\``}else return `\"${t}\"`;return `'${t}'`;case\"number\":return isNaN(t)?\"NaN\":Object.is(t,-0)?String(t):t;case\"bigint\":return `${String(t)}n`;case\"boolean\":case\"undefined\":return String(t);case\"object\":return \"{}\"}},types:{isAsyncFunction(t){return t instanceof iy},isArrayBufferView(t){return ArrayBuffer.isView(t)}},isBlob:ny};ms.exports.promisify.custom=Symbol.for(\"nodejs.util.promisify.custom\");});var Hi=M((YA,$i)=>{v();m();_();var{AbortController:Ju,AbortSignal:sy}=typeof self<\"u\"?self:typeof window<\"u\"?window:void 0;$i.exports=Ju;$i.exports.AbortSignal=sy;$i.exports.default=Ju;});var Se=M((oI,ef)=>{v();m();_();var{format:oy,inspect:Vi,AggregateError:ay}=Je(),ly=globalThis.AggregateError||ay,uy=Symbol(\"kIsNodeError\"),fy=[\"string\",\"function\",\"number\",\"object\",\"Function\",\"Object\",\"boolean\",\"bigint\",\"symbol\"],cy=/^([A-Z][a-z0-9]*)+$/,hy=\"__node_internal_\",zi={};function Xt(t,e){if(!t)throw new zi.ERR_INTERNAL_ASSERTION(e)}function Xu(t){let e=\"\",r=t.length,i=t[0]===\"-\"?1:0;for(;r>=i+4;r-=3)e=`_${t.slice(r-3,r)}${e}`;return `${t.slice(0,r)}${e}`}function dy(t,e,r){if(typeof e==\"function\")return Xt(e.length<=r.length,`Code: ${t}; The provided arguments length (${r.length}) does not match the required ones (${e.length}).`),e(...r);let i=(e.match(/%[dfijoOs]/g)||[]).length;return Xt(i===r.length,`Code: ${t}; The provided arguments length (${r.length}) does not match the required ones (${i}).`),r.length===0?e:oy(e,...r)}function me(t,e,r){r||(r=Error);class i extends r{constructor(...o){super(dy(t,e,o));}toString(){return `${this.name} [${t}]: ${this.message}`}}Object.defineProperties(i.prototype,{name:{value:r.name,writable:!0,enumerable:!1,configurable:!0},toString:{value(){return `${this.name} [${t}]: ${this.message}`},writable:!0,enumerable:!1,configurable:!0}}),i.prototype.code=t,i.prototype[uy]=!0,zi[t]=i;}function Zu(t){let e=hy+t.name;return Object.defineProperty(t,\"name\",{value:e}),t}function py(t,e){if(t&&e&&t!==e){if(Array.isArray(e.errors))return e.errors.push(t),e;let r=new ly([e,t],e.message);return r.code=e.code,r}return t||e}var vs=class extends Error{constructor(e=\"The operation was aborted\",r=void 0){if(r!==void 0&&typeof r!=\"object\")throw new zi.ERR_INVALID_ARG_TYPE(\"options\",\"Object\",r);super(e,r),this.code=\"ABORT_ERR\",this.name=\"AbortError\";}};me(\"ERR_ASSERTION\",\"%s\",Error);me(\"ERR_INVALID_ARG_TYPE\",(t,e,r)=>{Xt(typeof t==\"string\",\"'name' must be a string\"),Array.isArray(e)||(e=[e]);let i=\"The \";t.endsWith(\" argument\")?i+=`${t} `:i+=`\"${t}\" ${t.includes(\".\")?\"property\":\"argument\"} `,i+=\"must be \";let n=[],o=[],s=[];for(let u of e)Xt(typeof u==\"string\",\"All expected entries have to be of type string\"),fy.includes(u)?n.push(u.toLowerCase()):cy.test(u)?o.push(u):(Xt(u!==\"object\",'The value \"object\" should be written as \"Object\"'),s.push(u));if(o.length>0){let u=n.indexOf(\"object\");u!==-1&&(n.splice(n,u,1),o.push(\"Object\"));}if(n.length>0){switch(n.length){case 1:i+=`of type ${n[0]}`;break;case 2:i+=`one of type ${n[0]} or ${n[1]}`;break;default:{let u=n.pop();i+=`one of type ${n.join(\", \")}, or ${u}`;}}(o.length>0||s.length>0)&&(i+=\" or \");}if(o.length>0){switch(o.length){case 1:i+=`an instance of ${o[0]}`;break;case 2:i+=`an instance of ${o[0]} or ${o[1]}`;break;default:{let u=o.pop();i+=`an instance of ${o.join(\", \")}, or ${u}`;}}s.length>0&&(i+=\" or \");}switch(s.length){case 0:break;case 1:s[0].toLowerCase()!==s[0]&&(i+=\"an \"),i+=`${s[0]}`;break;case 2:i+=`one of ${s[0]} or ${s[1]}`;break;default:{let u=s.pop();i+=`one of ${s.join(\", \")}, or ${u}`;}}if(r==null)i+=`. Received ${r}`;else if(typeof r==\"function\"&&r.name)i+=`. Received function ${r.name}`;else if(typeof r==\"object\"){var a;if((a=r.constructor)!==null&&a!==void 0&&a.name)i+=`. Received an instance of ${r.constructor.name}`;else {let u=Vi(r,{depth:-1});i+=`. Received ${u}`;}}else {let u=Vi(r,{colors:!1});u.length>25&&(u=`${u.slice(0,25)}...`),i+=`. Received type ${typeof r} (${u})`;}return i},TypeError);me(\"ERR_INVALID_ARG_VALUE\",(t,e,r=\"is invalid\")=>{let i=Vi(e);return i.length>128&&(i=i.slice(0,128)+\"...\"),`The ${t.includes(\".\")?\"property\":\"argument\"} '${t}' ${r}. Received ${i}`},TypeError);me(\"ERR_INVALID_RETURN_VALUE\",(t,e,r)=>{var i;let n=r!=null&&(i=r.constructor)!==null&&i!==void 0&&i.name?`instance of ${r.constructor.name}`:`type ${typeof r}`;return `Expected ${t} to be returned from the \"${e}\" function but got ${n}.`},TypeError);me(\"ERR_MISSING_ARGS\",(...t)=>{Xt(t.length>0,\"At least one arg needs to be specified\");let e,r=t.length;switch(t=(Array.isArray(t)?t:[t]).map(i=>`\"${i}\"`).join(\" or \"),r){case 1:e+=`The ${t[0]} argument`;break;case 2:e+=`The ${t[0]} and ${t[1]} arguments`;break;default:{let i=t.pop();e+=`The ${t.join(\", \")}, and ${i} arguments`;}break}return `${e} must be specified`},TypeError);me(\"ERR_OUT_OF_RANGE\",(t,e,r)=>{Xt(e,'Missing \"range\" argument');let i;return Number.isInteger(r)&&Math.abs(r)>2**32?i=Xu(String(r)):typeof r==\"bigint\"?(i=String(r),(r>2n**32n||r<-(2n**32n))&&(i=Xu(i)),i+=\"n\"):i=Vi(r),`The value of \"${t}\" is out of range. It must be ${e}. Received ${i}`},RangeError);me(\"ERR_MULTIPLE_CALLBACK\",\"Callback called multiple times\",Error);me(\"ERR_METHOD_NOT_IMPLEMENTED\",\"The %s method is not implemented\",Error);me(\"ERR_STREAM_ALREADY_FINISHED\",\"Cannot call %s after a stream was finished\",Error);me(\"ERR_STREAM_CANNOT_PIPE\",\"Cannot pipe, not readable\",Error);me(\"ERR_STREAM_DESTROYED\",\"Cannot call %s after a stream was destroyed\",Error);me(\"ERR_STREAM_NULL_VALUES\",\"May not write null values to stream\",TypeError);me(\"ERR_STREAM_PREMATURE_CLOSE\",\"Premature close\",Error);me(\"ERR_STREAM_PUSH_AFTER_EOF\",\"stream.push() after EOF\",Error);me(\"ERR_STREAM_UNSHIFT_AFTER_END_EVENT\",\"stream.unshift() after end event\",Error);me(\"ERR_STREAM_WRITE_AFTER_END\",\"write after end\",Error);me(\"ERR_UNKNOWN_ENCODING\",\"Unknown encoding: %s\",TypeError);ef.exports={AbortError:vs,aggregateTwoErrors:Zu(py),hideStackFrames:Zu,codes:zi};});var fi=M((yI,ff)=>{v();m();_();var{ArrayIsArray:Ss,ArrayPrototypeIncludes:sf,ArrayPrototypeJoin:of,ArrayPrototypeMap:gy,NumberIsInteger:As,NumberIsNaN:yy,NumberMAX_SAFE_INTEGER:by,NumberMIN_SAFE_INTEGER:wy,NumberParseInt:_y,ObjectPrototypeHasOwnProperty:my,RegExpPrototypeExec:af,String:vy,StringPrototypeToUpperCase:Ey,StringPrototypeTrim:Sy}=ce(),{hideStackFrames:Ue,codes:{ERR_SOCKET_BAD_PORT:Ay,ERR_INVALID_ARG_TYPE:Ae,ERR_INVALID_ARG_VALUE:Mr,ERR_OUT_OF_RANGE:Zt,ERR_UNKNOWN_SIGNAL:tf}}=Se(),{normalizeEncoding:Iy}=Je(),{isAsyncFunction:Ty,isArrayBufferView:Ry}=Je().types,rf={};function Cy(t){return t===(t|0)}function By(t){return t===t>>>0}var Py=/^[0-7]+$/,Oy=\"must be a 32-bit unsigned integer or an octal string\";function ky(t,e,r){if(typeof t>\"u\"&&(t=r),typeof t==\"string\"){if(af(Py,t)===null)throw new Mr(e,t,Oy);t=_y(t,8);}return lf(t,e),t}var xy=Ue((t,e,r=wy,i=by)=>{if(typeof t!=\"number\")throw new Ae(e,\"number\",t);if(!As(t))throw new Zt(e,\"an integer\",t);if(ti)throw new Zt(e,`>= ${r} && <= ${i}`,t)}),My=Ue((t,e,r=-2147483648,i=2147483647)=>{if(typeof t!=\"number\")throw new Ae(e,\"number\",t);if(!As(t))throw new Zt(e,\"an integer\",t);if(ti)throw new Zt(e,`>= ${r} && <= ${i}`,t)}),lf=Ue((t,e,r=!1)=>{if(typeof t!=\"number\")throw new Ae(e,\"number\",t);if(!As(t))throw new Zt(e,\"an integer\",t);let i=r?1:0,n=4294967295;if(tn)throw new Zt(e,`>= ${i} && <= ${n}`,t)});function Is(t,e){if(typeof t!=\"string\")throw new Ae(e,\"string\",t)}function Ly(t,e,r=void 0,i){if(typeof t!=\"number\")throw new Ae(e,\"number\",t);if(r!=null&&ti||(r!=null||i!=null)&&yy(t))throw new Zt(e,`${r!=null?`>= ${r}`:\"\"}${r!=null&&i!=null?\" && \":\"\"}${i!=null?`<= ${i}`:\"\"}`,t)}var Uy=Ue((t,e,r)=>{if(!sf(r,t)){let n=\"must be one of: \"+of(gy(r,o=>typeof o==\"string\"?`'${o}'`:vy(o)),\", \");throw new Mr(e,t,n)}});function uf(t,e){if(typeof t!=\"boolean\")throw new Ae(e,\"boolean\",t)}function Es(t,e,r){return t==null||!my(t,e)?r:t[e]}var Ny=Ue((t,e,r=null)=>{let i=Es(r,\"allowArray\",!1),n=Es(r,\"allowFunction\",!1);if(!Es(r,\"nullable\",!1)&&t===null||!i&&Ss(t)||typeof t!=\"object\"&&(!n||typeof t!=\"function\"))throw new Ae(e,\"Object\",t)}),qy=Ue((t,e)=>{if(t!=null&&typeof t!=\"object\"&&typeof t!=\"function\")throw new Ae(e,\"a dictionary\",t)}),Ts=Ue((t,e,r=0)=>{if(!Ss(t))throw new Ae(e,\"Array\",t);if(t.length{if(!Ry(t))throw new Ae(e,[\"Buffer\",\"TypedArray\",\"DataView\"],t)});function $y(t,e){let r=Iy(e),i=t.length;if(r===\"hex\"&&i%2!==0)throw new Mr(\"encoding\",e,`is invalid for data of length ${i}`)}function Hy(t,e=\"Port\",r=!0){if(typeof t!=\"number\"&&typeof t!=\"string\"||typeof t==\"string\"&&Sy(t).length===0||+t!==+t>>>0||t>65535||t===0&&!r)throw new Ay(e,t,r);return t|0}var Vy=Ue((t,e)=>{if(t!==void 0&&(t===null||typeof t!=\"object\"||!(\"aborted\"in t)))throw new Ae(e,\"AbortSignal\",t)}),zy=Ue((t,e)=>{if(typeof t!=\"function\")throw new Ae(e,\"Function\",t)}),Ky=Ue((t,e)=>{if(typeof t!=\"function\"||Ty(t))throw new Ae(e,\"Function\",t)}),Gy=Ue((t,e)=>{if(t!==void 0)throw new Ae(e,\"undefined\",t)});function Qy(t,e,r){if(!sf(r,t))throw new Ae(e,`('${of(r,\"|\")}')`,t)}var Yy=/^(?:<[^>]*>)(?:\\s*;\\s*[^;\"\\s]+(?:=(\")?[^;\"\\s]*\\1)?)*$/;function nf(t,e){if(typeof t>\"u\"||!af(Yy,t))throw new Mr(e,t,'must be an array or string of format \"; rel=preload; as=style\"')}function Jy(t){if(typeof t==\"string\")return nf(t,\"hints\"),t;if(Ss(t)){let e=t.length,r=\"\";if(e===0)return r;for(let i=0;i; rel=preload; as=style\"')}ff.exports={isInt32:Cy,isUint32:By,parseFileMode:ky,validateArray:Ts,validateStringArray:Dy,validateBooleanArray:jy,validateBoolean:uf,validateBuffer:Wy,validateDictionary:qy,validateEncoding:$y,validateFunction:zy,validateInt32:My,validateInteger:xy,validateNumber:Ly,validateObject:Ny,validateOneOf:Uy,validatePlainFunction:Ky,validatePort:Hy,validateSignalName:Fy,validateString:Is,validateUint32:lf,validateUndefined:Gy,validateUnion:Qy,validateAbortSignal:Vy,validateLinkHeaderValue:Jy};});var Ut=M((TI,pf)=>{v();m();_();var ae=pf.exports={},Xe,Ze;function Rs(){throw new Error(\"setTimeout has not been defined\")}function Cs(){throw new Error(\"clearTimeout has not been defined\")}(function(){try{typeof setTimeout==\"function\"?Xe=setTimeout:Xe=Rs;}catch{Xe=Rs;}try{typeof clearTimeout==\"function\"?Ze=clearTimeout:Ze=Cs;}catch{Ze=Cs;}})();function cf(t){if(Xe===setTimeout)return setTimeout(t,0);if((Xe===Rs||!Xe)&&setTimeout)return Xe=setTimeout,setTimeout(t,0);try{return Xe(t,0)}catch{try{return Xe.call(null,t,0)}catch{return Xe.call(this,t,0)}}}function Xy(t){if(Ze===clearTimeout)return clearTimeout(t);if((Ze===Cs||!Ze)&&clearTimeout)return Ze=clearTimeout,clearTimeout(t);try{return Ze(t)}catch{try{return Ze.call(null,t)}catch{return Ze.call(this,t)}}}var wt=[],Lr=!1,er,Ki=-1;function Zy(){!Lr||!er||(Lr=!1,er.length?wt=er.concat(wt):Ki=-1,wt.length&&hf());}function hf(){if(!Lr){var t=cf(Zy);Lr=!0;for(var e=wt.length;e;){for(er=wt,wt=[];++Ki1)for(var r=1;r{v();m();_();var{Symbol:Gi,SymbolAsyncIterator:gf,SymbolIterator:yf,SymbolFor:bf}=ce(),wf=Gi(\"kDestroyed\"),_f=Gi(\"kIsErrored\"),Bs=Gi(\"kIsReadable\"),mf=Gi(\"kIsDisturbed\"),eb=bf(\"nodejs.webstream.isClosedPromise\"),tb=bf(\"nodejs.webstream.controllerErrorFunction\");function Qi(t,e=!1){var r;return !!(t&&typeof t.pipe==\"function\"&&typeof t.on==\"function\"&&(!e||typeof t.pause==\"function\"&&typeof t.resume==\"function\")&&(!t._writableState||((r=t._readableState)===null||r===void 0?void 0:r.readable)!==!1)&&(!t._writableState||t._readableState))}function Yi(t){var e;return !!(t&&typeof t.write==\"function\"&&typeof t.on==\"function\"&&(!t._readableState||((e=t._writableState)===null||e===void 0?void 0:e.writable)!==!1))}function rb(t){return !!(t&&typeof t.pipe==\"function\"&&t._readableState&&typeof t.on==\"function\"&&typeof t.write==\"function\")}function et(t){return t&&(t._readableState||t._writableState||typeof t.write==\"function\"&&typeof t.on==\"function\"||typeof t.pipe==\"function\"&&typeof t.on==\"function\")}function vf(t){return !!(t&&!et(t)&&typeof t.pipeThrough==\"function\"&&typeof t.getReader==\"function\"&&typeof t.cancel==\"function\")}function Ef(t){return !!(t&&!et(t)&&typeof t.getWriter==\"function\"&&typeof t.abort==\"function\")}function Sf(t){return !!(t&&!et(t)&&typeof t.readable==\"object\"&&typeof t.writable==\"object\")}function ib(t){return vf(t)||Ef(t)||Sf(t)}function nb(t,e){return t==null?!1:e===!0?typeof t[gf]==\"function\":e===!1?typeof t[yf]==\"function\":typeof t[gf]==\"function\"||typeof t[yf]==\"function\"}function Ji(t){if(!et(t))return null;let e=t._writableState,r=t._readableState,i=e||r;return !!(t.destroyed||t[wf]||i!=null&&i.destroyed)}function Af(t){if(!Yi(t))return null;if(t.writableEnded===!0)return !0;let e=t._writableState;return e!=null&&e.errored?!1:typeof e?.ended!=\"boolean\"?null:e.ended}function sb(t,e){if(!Yi(t))return null;if(t.writableFinished===!0)return !0;let r=t._writableState;return r!=null&&r.errored?!1:typeof r?.finished!=\"boolean\"?null:!!(r.finished||e===!1&&r.ended===!0&&r.length===0)}function ob(t){if(!Qi(t))return null;if(t.readableEnded===!0)return !0;let e=t._readableState;return !e||e.errored?!1:typeof e?.ended!=\"boolean\"?null:e.ended}function If(t,e){if(!Qi(t))return null;let r=t._readableState;return r!=null&&r.errored?!1:typeof r?.endEmitted!=\"boolean\"?null:!!(r.endEmitted||e===!1&&r.ended===!0&&r.length===0)}function Tf(t){return t&&t[Bs]!=null?t[Bs]:typeof t?.readable!=\"boolean\"?null:Ji(t)?!1:Qi(t)&&t.readable&&!If(t)}function Rf(t){return typeof t?.writable!=\"boolean\"?null:Ji(t)?!1:Yi(t)&&t.writable&&!Af(t)}function ab(t,e){return et(t)?Ji(t)?!0:!(e?.readable!==!1&&Tf(t)||e?.writable!==!1&&Rf(t)):null}function lb(t){var e,r;return et(t)?t.writableErrored?t.writableErrored:(e=(r=t._writableState)===null||r===void 0?void 0:r.errored)!==null&&e!==void 0?e:null:null}function ub(t){var e,r;return et(t)?t.readableErrored?t.readableErrored:(e=(r=t._readableState)===null||r===void 0?void 0:r.errored)!==null&&e!==void 0?e:null:null}function fb(t){if(!et(t))return null;if(typeof t.closed==\"boolean\")return t.closed;let e=t._writableState,r=t._readableState;return typeof e?.closed==\"boolean\"||typeof r?.closed==\"boolean\"?e?.closed||r?.closed:typeof t._closed==\"boolean\"&&Cf(t)?t._closed:null}function Cf(t){return typeof t._closed==\"boolean\"&&typeof t._defaultKeepAlive==\"boolean\"&&typeof t._removedConnection==\"boolean\"&&typeof t._removedContLen==\"boolean\"}function Bf(t){return typeof t._sent100==\"boolean\"&&Cf(t)}function cb(t){var e;return typeof t._consuming==\"boolean\"&&typeof t._dumped==\"boolean\"&&((e=t.req)===null||e===void 0?void 0:e.upgradeOrConnect)===void 0}function hb(t){if(!et(t))return null;let e=t._writableState,r=t._readableState,i=e||r;return !i&&Bf(t)||!!(i&&i.autoDestroy&&i.emitClose&&i.closed===!1)}function db(t){var e;return !!(t&&((e=t[mf])!==null&&e!==void 0?e:t.readableDidRead||t.readableAborted))}function pb(t){var e,r,i,n,o,s,a,u,c,h;return !!(t&&((e=(r=(i=(n=(o=(s=t[_f])!==null&&s!==void 0?s:t.readableErrored)!==null&&o!==void 0?o:t.writableErrored)!==null&&n!==void 0?n:(a=t._readableState)===null||a===void 0?void 0:a.errorEmitted)!==null&&i!==void 0?i:(u=t._writableState)===null||u===void 0?void 0:u.errorEmitted)!==null&&r!==void 0?r:(c=t._readableState)===null||c===void 0?void 0:c.errored)!==null&&e!==void 0?e:!((h=t._writableState)===null||h===void 0)&&h.errored))}Pf.exports={kDestroyed:wf,isDisturbed:db,kIsDisturbed:mf,isErrored:pb,kIsErrored:_f,isReadable:Tf,kIsReadable:Bs,kIsClosedPromise:eb,kControllerErrorFunction:tb,isClosed:fb,isDestroyed:Ji,isDuplexNodeStream:rb,isFinished:ab,isIterable:nb,isReadableNodeStream:Qi,isReadableStream:vf,isReadableEnded:ob,isReadableFinished:If,isReadableErrored:ub,isNodeStream:et,isWebStream:ib,isWritable:Rf,isWritableNodeStream:Yi,isWritableStream:Ef,isWritableEnded:Af,isWritableFinished:sb,isWritableErrored:lb,isServerRequest:cb,isServerResponse:Bf,willEmitClose:hb,isTransformStream:Sf};});var mt=M((zI,Ms)=>{v();m();_();var Nt=Ut(),{AbortError:Df,codes:gb}=Se(),{ERR_INVALID_ARG_TYPE:yb,ERR_STREAM_PREMATURE_CLOSE:Of}=gb,{kEmptyObject:Os,once:ks}=Je(),{validateAbortSignal:bb,validateFunction:wb,validateObject:_b,validateBoolean:mb}=fi(),{Promise:vb,PromisePrototypeThen:Eb}=ce(),{isClosed:Sb,isReadable:kf,isReadableNodeStream:Ps,isReadableStream:Ab,isReadableFinished:xf,isReadableErrored:Mf,isWritable:Lf,isWritableNodeStream:Uf,isWritableStream:Ib,isWritableFinished:Nf,isWritableErrored:qf,isNodeStream:Tb,willEmitClose:Rb,kIsClosedPromise:Cb}=tt();function Bb(t){return t.setHeader&&typeof t.abort==\"function\"}var xs=()=>{};function jf(t,e,r){var i,n;if(arguments.length===2?(r=e,e=Os):e==null?e=Os:_b(e,\"options\"),wb(r,\"callback\"),bb(e.signal,\"options.signal\"),r=ks(r),Ab(t)||Ib(t))return Pb(t,e,r);if(!Tb(t))throw new yb(\"stream\",[\"ReadableStream\",\"WritableStream\",\"Stream\"],t);let o=(i=e.readable)!==null&&i!==void 0?i:Ps(t),s=(n=e.writable)!==null&&n!==void 0?n:Uf(t),a=t._writableState,u=t._readableState,c=()=>{t.writable||g();},h=Rb(t)&&Ps(t)===o&&Uf(t)===s,d=Nf(t,!1),g=()=>{d=!0,t.destroyed&&(h=!1),!(h&&(!t.readable||o))&&(!o||y)&&r.call(t);},y=xf(t,!1),w=()=>{y=!0,t.destroyed&&(h=!1),!(h&&(!t.writable||s))&&(!s||d)&&r.call(t);},E=N=>{r.call(t,N);},S=Sb(t),I=()=>{S=!0;let N=qf(t)||Mf(t);if(N&&typeof N!=\"boolean\")return r.call(t,N);if(o&&!y&&Ps(t,!0)&&!xf(t,!1))return r.call(t,new Of);if(s&&!d&&!Nf(t,!1))return r.call(t,new Of);r.call(t);},C=()=>{S=!0;let N=qf(t)||Mf(t);if(N&&typeof N!=\"boolean\")return r.call(t,N);r.call(t);},R=()=>{t.req.on(\"finish\",g);};Bb(t)?(t.on(\"complete\",g),h||t.on(\"abort\",I),t.req?R():t.on(\"request\",R)):s&&!a&&(t.on(\"end\",c),t.on(\"close\",c)),!h&&typeof t.aborted==\"boolean\"&&t.on(\"aborted\",I),t.on(\"end\",w),t.on(\"finish\",g),e.error!==!1&&t.on(\"error\",E),t.on(\"close\",I),S?Nt.nextTick(I):a!=null&&a.errorEmitted||u!=null&&u.errorEmitted?h||Nt.nextTick(C):(!o&&(!h||kf(t))&&(d||Lf(t)===!1)||!s&&(!h||Lf(t))&&(y||kf(t)===!1)||u&&t.req&&t.aborted)&&Nt.nextTick(C);let U=()=>{r=xs,t.removeListener(\"aborted\",I),t.removeListener(\"complete\",g),t.removeListener(\"abort\",I),t.removeListener(\"request\",R),t.req&&t.req.removeListener(\"finish\",g),t.removeListener(\"end\",c),t.removeListener(\"close\",c),t.removeListener(\"finish\",g),t.removeListener(\"end\",w),t.removeListener(\"error\",E),t.removeListener(\"close\",I);};if(e.signal&&!S){let N=()=>{let W=r;U(),W.call(t,new Df(void 0,{cause:e.signal.reason}));};if(e.signal.aborted)Nt.nextTick(N);else {let W=r;r=ks((...K)=>{e.signal.removeEventListener(\"abort\",N),W.apply(t,K);}),e.signal.addEventListener(\"abort\",N);}}return U}function Pb(t,e,r){let i=!1,n=xs;if(e.signal)if(n=()=>{i=!0,r.call(t,new Df(void 0,{cause:e.signal.reason}));},e.signal.aborted)Nt.nextTick(n);else {let s=r;r=ks((...a)=>{e.signal.removeEventListener(\"abort\",n),s.apply(t,a);}),e.signal.addEventListener(\"abort\",n);}let o=(...s)=>{i||Nt.nextTick(()=>r.apply(t,s));};return Eb(t[Cb].promise,o,o),xs}function Ob(t,e){var r;let i=!1;return e===null&&(e=Os),(r=e)!==null&&r!==void 0&&r.cleanup&&(mb(e.cleanup,\"cleanup\"),i=e.cleanup),new vb((n,o)=>{let s=jf(t,e,a=>{i&&s(),a?o(a):n();});})}Ms.exports=jf;Ms.exports.finished=Ob;});var tr=M((rT,Gf)=>{v();m();_();var rt=Ut(),{aggregateTwoErrors:kb,codes:{ERR_MULTIPLE_CALLBACK:xb},AbortError:Mb}=Se(),{Symbol:$f}=ce(),{kDestroyed:Lb,isDestroyed:Ub,isFinished:Nb,isServerRequest:qb}=tt(),Hf=$f(\"kDestroy\"),Ls=$f(\"kConstruct\");function Vf(t,e,r){t&&(t.stack,e&&!e.errored&&(e.errored=t),r&&!r.errored&&(r.errored=t));}function Db(t,e){let r=this._readableState,i=this._writableState,n=i||r;return i!=null&&i.destroyed||r!=null&&r.destroyed?(typeof e==\"function\"&&e(),this):(Vf(t,i,r),i&&(i.destroyed=!0),r&&(r.destroyed=!0),n.constructed?Ff(this,t,e):this.once(Hf,function(o){Ff(this,kb(o,t),e);}),this)}function Ff(t,e,r){let i=!1;function n(o){if(i)return;i=!0;let s=t._readableState,a=t._writableState;Vf(o,a,s),a&&(a.closed=!0),s&&(s.closed=!0),typeof r==\"function\"&&r(o),o?rt.nextTick(jb,t,o):rt.nextTick(zf,t);}try{t._destroy(e||null,n);}catch(o){n(o);}}function jb(t,e){Us(t,e),zf(t);}function zf(t){let e=t._readableState,r=t._writableState;r&&(r.closeEmitted=!0),e&&(e.closeEmitted=!0),(r!=null&&r.emitClose||e!=null&&e.emitClose)&&t.emit(\"close\");}function Us(t,e){let r=t._readableState,i=t._writableState;i!=null&&i.errorEmitted||r!=null&&r.errorEmitted||(i&&(i.errorEmitted=!0),r&&(r.errorEmitted=!0),t.emit(\"error\",e));}function Fb(){let t=this._readableState,e=this._writableState;t&&(t.constructed=!0,t.closed=!1,t.closeEmitted=!1,t.destroyed=!1,t.errored=null,t.errorEmitted=!1,t.reading=!1,t.ended=t.readable===!1,t.endEmitted=t.readable===!1),e&&(e.constructed=!0,e.destroyed=!1,e.closed=!1,e.closeEmitted=!1,e.errored=null,e.errorEmitted=!1,e.finalCalled=!1,e.prefinished=!1,e.ended=e.writable===!1,e.ending=e.writable===!1,e.finished=e.writable===!1);}function Ns(t,e,r){let i=t._readableState,n=t._writableState;if(n!=null&&n.destroyed||i!=null&&i.destroyed)return this;i!=null&&i.autoDestroy||n!=null&&n.autoDestroy?t.destroy(e):e&&(e.stack,n&&!n.errored&&(n.errored=e),i&&!i.errored&&(i.errored=e),r?rt.nextTick(Us,t,e):Us(t,e));}function Wb(t,e){if(typeof t._construct!=\"function\")return;let r=t._readableState,i=t._writableState;r&&(r.constructed=!1),i&&(i.constructed=!1),t.once(Ls,e),!(t.listenerCount(Ls)>1)&&rt.nextTick($b,t);}function $b(t){let e=!1;function r(i){if(e){Ns(t,i??new xb);return}e=!0;let n=t._readableState,o=t._writableState,s=o||n;n&&(n.constructed=!0),o&&(o.constructed=!0),s.destroyed?t.emit(Hf,i):i?Ns(t,i,!0):rt.nextTick(Hb,t);}try{t._construct(i=>{rt.nextTick(r,i);});}catch(i){rt.nextTick(r,i);}}function Hb(t){t.emit(Ls);}function Wf(t){return t?.setHeader&&typeof t.abort==\"function\"}function Kf(t){t.emit(\"close\");}function Vb(t,e){t.emit(\"error\",e),rt.nextTick(Kf,t);}function zb(t,e){!t||Ub(t)||(!e&&!Nb(t)&&(e=new Mb),qb(t)?(t.socket=null,t.destroy(e)):Wf(t)?t.abort():Wf(t.req)?t.req.abort():typeof t.destroy==\"function\"?t.destroy(e):typeof t.close==\"function\"?t.close():e?rt.nextTick(Vb,t,e):rt.nextTick(Kf,t),t.destroyed||(t[Lb]=!0));}Gf.exports={construct:Wb,destroyer:zb,destroy:Db,undestroy:Fb,errorOrDestroy:Ns};});function Y(){Y.init.call(this);}function Xi(t){if(typeof t!=\"function\")throw new TypeError('The \"listener\" argument must be of type Function. Received type '+typeof t)}function nc(t){return t._maxListeners===void 0?Y.defaultMaxListeners:t._maxListeners}function Xf(t,e,r,i){var n,o,s,a;if(Xi(r),(o=t._events)===void 0?(o=t._events=Object.create(null),t._eventsCount=0):(o.newListener!==void 0&&(t.emit(\"newListener\",e,r.listener?r.listener:r),o=t._events),s=o[e]),s===void 0)s=o[e]=r,++t._eventsCount;else if(typeof s==\"function\"?s=o[e]=i?[r,s]:[s,r]:i?s.unshift(r):s.push(r),(n=nc(t))>0&&s.length>n&&!s.warned){s.warned=!0;var u=new Error(\"Possible EventEmitter memory leak detected. \"+s.length+\" \"+String(e)+\" listeners added. Use emitter.setMaxListeners() to increase limit\");u.name=\"MaxListenersExceededWarning\",u.emitter=t,u.type=e,u.count=s.length,a=u,console&&console.warn&&console.warn(a);}return t}function Kb(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function Zf(t,e,r){var i={fired:!1,wrapFn:void 0,target:t,type:e,listener:r},n=Kb.bind(i);return n.listener=r,i.wrapFn=n,n}function ec(t,e,r){var i=t._events;if(i===void 0)return [];var n=i[e];return n===void 0?[]:typeof n==\"function\"?r?[n.listener||n]:[n]:r?function(o){for(var s=new Array(o.length),a=0;a{v();m();_();Ur=typeof Reflect==\"object\"?Reflect:null,Qf=Ur&&typeof Ur.apply==\"function\"?Ur.apply:function(t,e,r){return Function.prototype.apply.call(t,e,r)};ic=Ur&&typeof Ur.ownKeys==\"function\"?Ur.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)};Yf=Number.isNaN||function(t){return t!=t};rc=Y,Y.EventEmitter=Y,Y.prototype._events=void 0,Y.prototype._eventsCount=0,Y.prototype._maxListeners=void 0;Jf=10;Object.defineProperty(Y,\"defaultMaxListeners\",{enumerable:!0,get:function(){return Jf},set:function(t){if(typeof t!=\"number\"||t<0||Yf(t))throw new RangeError('The value of \"defaultMaxListeners\" is out of range. It must be a non-negative number. Received '+t+\".\");Jf=t;}}),Y.init=function(){this._events!==void 0&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0;},Y.prototype.setMaxListeners=function(t){if(typeof t!=\"number\"||t<0||Yf(t))throw new RangeError('The value of \"n\" is out of range. It must be a non-negative number. Received '+t+\".\");return this._maxListeners=t,this},Y.prototype.getMaxListeners=function(){return nc(this)},Y.prototype.emit=function(t){for(var e=[],r=1;r0&&(o=e[0]),o instanceof Error)throw o;var s=new Error(\"Unhandled error.\"+(o?\" (\"+o.message+\")\":\"\"));throw s.context=o,s}var a=n[t];if(a===void 0)return !1;if(typeof a==\"function\")Qf(a,this,e);else {var u=a.length,c=sc(a,u);for(r=0;r=0;o--)if(r[o]===e||r[o].listener===e){s=r[o].listener,n=o;break}if(n<0)return this;n===0?r.shift():function(a,u){for(;u+1=0;i--)this.removeListener(t,e[i]);return this},Y.prototype.listeners=function(t){return ec(this,t,!0)},Y.prototype.rawListeners=function(t){return ec(this,t,!1)},Y.listenerCount=function(t,e){return typeof t.listenerCount==\"function\"?t.listenerCount(e):tc.call(t,e)},Y.prototype.listenerCount=tc,Y.prototype.eventNames=function(){return this._eventsCount>0?ic(this._events):[]};Be=rc;Be.EventEmitter;Be.defaultMaxListeners;Be.init;Be.listenerCount;Be.EventEmitter;Be.defaultMaxListeners;Be.init;Be.listenerCount;});var rr={};Qt(rr,{EventEmitter:()=>Gb,default:()=>Be,defaultMaxListeners:()=>Qb,init:()=>Yb,listenerCount:()=>Jb,on:()=>Xb,once:()=>Zb});var Gb,Qb,Yb,Jb,Xb,Zb,ir=we(()=>{v();m();_();qs();qs();Be.once=function(t,e){return new Promise((r,i)=>{function n(...s){o!==void 0&&t.removeListener(\"error\",o),r(s);}let o;e!==\"error\"&&(o=s=>{t.removeListener(name,n),i(s);},t.once(\"error\",o)),t.once(e,n);})};Be.on=function(t,e){let r=[],i=[],n=null,o=!1,s={async next(){let c=r.shift();if(c)return createIterResult(c,!1);if(n){let h=Promise.reject(n);return n=null,h}return o?createIterResult(void 0,!0):new Promise((h,d)=>i.push({resolve:h,reject:d}))},async return(){t.removeListener(e,a),t.removeListener(\"error\",u),o=!0;for(let c of i)c.resolve(createIterResult(void 0,!0));return createIterResult(void 0,!0)},throw(c){n=c,t.removeListener(e,a),t.removeListener(\"error\",u);},[Symbol.asyncIterator](){return this}};return t.on(e,a),t.on(\"error\",u),s;function a(...c){let h=i.shift();h?h.resolve(createIterResult(c,!1)):r.push(c);}function u(c){o=!0;let h=i.shift();h?h.reject(c):n=c,s.return();}};({EventEmitter:Gb,defaultMaxListeners:Qb,init:Yb,listenerCount:Jb,on:Xb,once:Zb}=Be);});var tn=M((xT,ac)=>{v();m();_();var{ArrayIsArray:ew,ObjectSetPrototypeOf:oc}=ce(),{EventEmitter:Zi}=(ir(),X(rr));function en(t){Zi.call(this,t);}oc(en.prototype,Zi.prototype);oc(en,Zi);en.prototype.pipe=function(t,e){let r=this;function i(h){t.writable&&t.write(h)===!1&&r.pause&&r.pause();}r.on(\"data\",i);function n(){r.readable&&r.resume&&r.resume();}t.on(\"drain\",n),!t._isStdio&&(!e||e.end!==!1)&&(r.on(\"end\",s),r.on(\"close\",a));let o=!1;function s(){o||(o=!0,t.end());}function a(){o||(o=!0,typeof t.destroy==\"function\"&&t.destroy());}function u(h){c(),Zi.listenerCount(this,\"error\")===0&&this.emit(\"error\",h);}Ds(r,\"error\",u),Ds(t,\"error\",u);function c(){r.removeListener(\"data\",i),t.removeListener(\"drain\",n),r.removeListener(\"end\",s),r.removeListener(\"close\",a),r.removeListener(\"error\",u),t.removeListener(\"error\",u),r.removeListener(\"end\",c),r.removeListener(\"close\",c),t.removeListener(\"close\",c);}return r.on(\"end\",c),r.on(\"close\",c),t.on(\"close\",c),t.emit(\"pipe\",r),t};function Ds(t,e,r){if(typeof t.prependListener==\"function\")return t.prependListener(e,r);!t._events||!t._events[e]?t.on(e,r):ew(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]];}ac.exports={Stream:en,prependListener:Ds};});var ci=M(($T,rn)=>{v();m();_();var{AbortError:lc,codes:tw}=Se(),{isNodeStream:uc,isWebStream:rw,kControllerErrorFunction:iw}=tt(),nw=mt(),{ERR_INVALID_ARG_TYPE:fc}=tw,sw=(t,e)=>{if(typeof t!=\"object\"||!(\"aborted\"in t))throw new fc(e,\"AbortSignal\",t)};rn.exports.addAbortSignal=function(e,r){if(sw(e,\"signal\"),!uc(r)&&!rw(r))throw new fc(\"stream\",[\"ReadableStream\",\"WritableStream\",\"Stream\"],r);return rn.exports.addAbortSignalNoValidate(e,r)};rn.exports.addAbortSignalNoValidate=function(t,e){if(typeof t!=\"object\"||!(\"aborted\"in t))return e;let r=uc(e)?()=>{e.destroy(new lc(void 0,{cause:t.reason}));}:()=>{e[iw](new lc(void 0,{cause:t.reason}));};return t.aborted?r():(t.addEventListener(\"abort\",r),nw(e,()=>t.removeEventListener(\"abort\",r))),e};});var dc=M((e2,hc)=>{v();m();_();var{StringPrototypeSlice:cc,SymbolIterator:ow,TypedArrayPrototypeSet:nn,Uint8Array:aw}=ce(),{Buffer:js}=(ye(),X(_e)),{inspect:lw}=Je();hc.exports=class{constructor(){this.head=null,this.tail=null,this.length=0;}push(e){let r={data:e,next:null};this.length>0?this.tail.next=r:this.head=r,this.tail=r,++this.length;}unshift(e){let r={data:e,next:this.head};this.length===0&&(this.tail=r),this.head=r,++this.length;}shift(){if(this.length===0)return;let e=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,e}clear(){this.head=this.tail=null,this.length=0;}join(e){if(this.length===0)return \"\";let r=this.head,i=\"\"+r.data;for(;(r=r.next)!==null;)i+=e+r.data;return i}concat(e){if(this.length===0)return js.alloc(0);let r=js.allocUnsafe(e>>>0),i=this.head,n=0;for(;i;)nn(r,i.data,n),n+=i.data.length,i=i.next;return r}consume(e,r){let i=this.head.data;if(eo.length)r+=o,e-=o.length;else {e===o.length?(r+=o,++n,i.next?this.head=i.next:this.head=this.tail=null):(r+=cc(o,0,e),this.head=i,i.data=cc(o,e));break}++n;}while((i=i.next)!==null);return this.length-=n,r}_getBuffer(e){let r=js.allocUnsafe(e),i=e,n=this.head,o=0;do{let s=n.data;if(e>s.length)nn(r,s,i-e),e-=s.length;else {e===s.length?(nn(r,s,i-e),++o,n.next?this.head=n.next:this.head=this.tail=null):(nn(r,new aw(s.buffer,s.byteOffset,e),i-e),this.head=n,n.data=s.slice(e));break}++o;}while((n=n.next)!==null);return this.length-=o,r}[Symbol.for(\"nodejs.util.inspect.custom\")](e,r){return lw(this,{...r,depth:0,customInspect:!1})}};});var sn=M((f2,gc)=>{v();m();_();var{MathFloor:uw,NumberIsInteger:fw}=ce(),{ERR_INVALID_ARG_VALUE:cw}=Se().codes;function hw(t,e,r){return t.highWaterMark!=null?t.highWaterMark:e?t[r]:null}function pc(t){return t?16:16*1024}function dw(t,e,r,i){let n=hw(e,i,r);if(n!=null){if(!fw(n)||n<0){let o=i?`options.${r}`:\"options.highWaterMark\";throw new cw(o,n)}return uw(n)}return pc(t.objectMode)}gc.exports={getHighWaterMark:dw,getDefaultHighWaterMark:pc};});function wc(t){var e=t.length;if(e%4>0)throw new Error(\"Invalid string. Length must be a multiple of 4\");var r=t.indexOf(\"=\");return r===-1&&(r=e),[r,r===e?0:4-r%4]}function pw(t,e,r){for(var i,n,o=[],s=e;s>18&63]+$e[n>>12&63]+$e[n>>6&63]+$e[63&n]);return o.join(\"\")}function vt(t){if(t>2147483647)throw new RangeError('The value \"'+t+'\" is invalid for option \"size\"');var e=new Uint8Array(t);return Object.setPrototypeOf(e,k.prototype),e}function k(t,e,r){if(typeof t==\"number\"){if(typeof e==\"string\")throw new TypeError('The \"string\" argument must be of type string. Received type number');return Hs(t)}return Cc(t,e,r)}function Cc(t,e,r){if(typeof t==\"string\")return function(o,s){if(typeof s==\"string\"&&s!==\"\"||(s=\"utf8\"),!k.isEncoding(s))throw new TypeError(\"Unknown encoding: \"+s);var a=0|Pc(o,s),u=vt(a),c=u.write(o,s);return c!==a&&(u=u.slice(0,c)),u}(t,e);if(ArrayBuffer.isView(t))return Fs(t);if(t==null)throw new TypeError(\"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type \"+typeof t);if(Et(t,ArrayBuffer)||t&&Et(t.buffer,ArrayBuffer)||typeof SharedArrayBuffer<\"u\"&&(Et(t,SharedArrayBuffer)||t&&Et(t.buffer,SharedArrayBuffer)))return mc(t,e,r);if(typeof t==\"number\")throw new TypeError('The \"value\" argument must not be of type number. Received type number');var i=t.valueOf&&t.valueOf();if(i!=null&&i!==t)return k.from(i,e,r);var n=function(o){if(k.isBuffer(o)){var s=0|Ks(o.length),a=vt(s);return a.length===0||o.copy(a,0,0,s),a}if(o.length!==void 0)return typeof o.length!=\"number\"||Gs(o.length)?vt(0):Fs(o);if(o.type===\"Buffer\"&&Array.isArray(o.data))return Fs(o.data)}(t);if(n)return n;if(typeof Symbol<\"u\"&&Symbol.toPrimitive!=null&&typeof t[Symbol.toPrimitive]==\"function\")return k.from(t[Symbol.toPrimitive](\"string\"),e,r);throw new TypeError(\"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type \"+typeof t)}function Bc(t){if(typeof t!=\"number\")throw new TypeError('\"size\" argument must be of type number');if(t<0)throw new RangeError('The value \"'+t+'\" is invalid for option \"size\"')}function Hs(t){return Bc(t),vt(t<0?0:0|Ks(t))}function Fs(t){for(var e=t.length<0?0:0|Ks(t.length),r=vt(e),i=0;i=2147483647)throw new RangeError(\"Attempt to allocate Buffer larger than maximum size: 0x\"+2147483647 .toString(16)+\" bytes\");return 0|t}function Pc(t,e){if(k.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||Et(t,ArrayBuffer))return t.byteLength;if(typeof t!=\"string\")throw new TypeError('The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);var r=t.length,i=arguments.length>2&&arguments[2]===!0;if(!i&&r===0)return 0;for(var n=!1;;)switch(e){case\"ascii\":case\"latin1\":case\"binary\":return r;case\"utf8\":case\"utf-8\":return Vs(t).length;case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return 2*r;case\"hex\":return r>>>1;case\"base64\":return Mc(t).length;default:if(n)return i?-1:Vs(t).length;e=(\"\"+e).toLowerCase(),n=!0;}}function yw(t,e,r){var i=!1;if((e===void 0||e<0)&&(e=0),e>this.length||((r===void 0||r>this.length)&&(r=this.length),r<=0)||(r>>>=0)<=(e>>>=0))return \"\";for(t||(t=\"utf8\");;)switch(t){case\"hex\":return Iw(this,e,r);case\"utf8\":case\"utf-8\":return kc(this,e,r);case\"ascii\":return Sw(this,e,r);case\"latin1\":case\"binary\":return Aw(this,e,r);case\"base64\":return Ew(this,e,r);case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return Tw(this,e,r);default:if(i)throw new TypeError(\"Unknown encoding: \"+t);t=(t+\"\").toLowerCase(),i=!0;}}function sr(t,e,r){var i=t[e];t[e]=t[r],t[r]=i;}function vc(t,e,r,i,n){if(t.length===0)return -1;if(typeof r==\"string\"?(i=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),Gs(r=+r)&&(r=n?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(n)return -1;r=t.length-1;}else if(r<0){if(!n)return -1;r=0;}if(typeof e==\"string\"&&(e=k.from(e,i)),k.isBuffer(e))return e.length===0?-1:Ec(t,e,r,i,n);if(typeof e==\"number\")return e&=255,typeof Uint8Array.prototype.indexOf==\"function\"?n?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):Ec(t,[e],r,i,n);throw new TypeError(\"val must be string, number or Buffer\")}function Ec(t,e,r,i,n){var o,s=1,a=t.length,u=e.length;if(i!==void 0&&((i=String(i).toLowerCase())===\"ucs2\"||i===\"ucs-2\"||i===\"utf16le\"||i===\"utf-16le\")){if(t.length<2||e.length<2)return -1;s=2,a/=2,u/=2,r/=2;}function c(y,w){return s===1?y[w]:y.readUInt16BE(w*s)}if(n){var h=-1;for(o=r;oa&&(r=a-u),o=r;o>=0;o--){for(var d=!0,g=0;gn&&(i=n):i=n;var o=e.length;i>o/2&&(i=o/2);for(var s=0;s>8,u=s%256,c.push(u),c.push(a);return c}(e,t.length-r),t,r,i)}function Ew(t,e,r){return e===0&&r===t.length?$s.fromByteArray(t):$s.fromByteArray(t.slice(e,r))}function kc(t,e,r){r=Math.min(t.length,r);for(var i=[],n=e;n239?4:c>223?3:c>191?2:1;if(n+d<=r)switch(d){case 1:c<128&&(h=c);break;case 2:(192&(o=t[n+1]))==128&&(u=(31&c)<<6|63&o)>127&&(h=u);break;case 3:o=t[n+1],s=t[n+2],(192&o)==128&&(192&s)==128&&(u=(15&c)<<12|(63&o)<<6|63&s)>2047&&(u<55296||u>57343)&&(h=u);break;case 4:o=t[n+1],s=t[n+2],a=t[n+3],(192&o)==128&&(192&s)==128&&(192&a)==128&&(u=(15&c)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&u<1114112&&(h=u);}h===null?(h=65533,d=1):h>65535&&(h-=65536,i.push(h>>>10&1023|55296),h=56320|1023&h),i.push(h),n+=d;}return function(g){var y=g.length;if(y<=4096)return String.fromCharCode.apply(String,g);for(var w=\"\",E=0;Ei)&&(r=i);for(var n=\"\",o=e;or)throw new RangeError(\"Trying to access beyond buffer length\")}function Pe(t,e,r,i,n,o){if(!k.isBuffer(t))throw new TypeError('\"buffer\" argument must be a Buffer instance');if(e>n||et.length)throw new RangeError(\"Index out of range\")}function xc(t,e,r,i,n,o){if(r+i>t.length)throw new RangeError(\"Index out of range\");if(r<0)throw new RangeError(\"Index out of range\")}function Sc(t,e,r,i,n){return e=+e,r>>>=0,n||xc(t,0,r,4),Nr.write(t,e,r,i,23,4),r+4}function Ac(t,e,r,i,n){return e=+e,r>>>=0,n||xc(t,0,r,8),Nr.write(t,e,r,i,52,8),r+8}function Vs(t,e){var r;e=e||1/0;for(var i=t.length,n=null,o=[],s=0;s55295&&r<57344){if(!n){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(s+1===i){(e-=3)>-1&&o.push(239,191,189);continue}n=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),n=r;continue}r=65536+(n-55296<<10|r-56320);}else n&&(e-=3)>-1&&o.push(239,191,189);if(n=null,r<128){if((e-=1)<0)break;o.push(r);}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128);}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128);}else {if(!(r<1114112))throw new Error(\"Invalid code point\");if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128);}}return o}function Mc(t){return $s.toByteArray(function(e){if((e=(e=e.split(\"=\")[0]).trim().replace(Rw,\"\")).length<2)return \"\";for(;e.length%4!=0;)e+=\"=\";return e}(t))}function un(t,e,r,i){for(var n=0;n=e.length||n>=t.length);++n)e[n+r]=t[n];return n}function Et(t,e){return t instanceof e||t!=null&&t.constructor!=null&&t.constructor.name!=null&&t.constructor.name===e.name}function Gs(t){return t!=t}function Ic(t,e){for(var r in t)e[r]=t[r];}function or(t,e,r){return it(t,e,r)}function hi(t){var e;switch(this.encoding=function(r){var i=function(n){if(!n)return \"utf8\";for(var o;;)switch(n){case\"utf8\":case\"utf-8\":return \"utf8\";case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return \"utf16le\";case\"latin1\":case\"binary\":return \"latin1\";case\"base64\":case\"ascii\":case\"hex\":return n;default:if(o)return;n=(\"\"+n).toLowerCase(),o=!0;}}(r);if(typeof i!=\"string\"&&(zs.isEncoding===Tc||!Tc(r)))throw new Error(\"Unknown encoding: \"+r);return i||r}(t),this.encoding){case\"utf16le\":this.text=Ow,this.end=kw,e=4;break;case\"utf8\":this.fillLast=Pw,e=4;break;case\"base64\":this.text=xw,this.end=Mw,e=3;break;default:return this.write=Lw,this.end=Uw,void 0}this.lastNeed=0,this.lastTotal=0,this.lastChar=zs.allocUnsafe(e);}function Ws(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function Pw(t){var e=this.lastTotal-this.lastNeed,r=function(i,n,o){if((192&n[0])!=128)return i.lastNeed=0,\"\\uFFFD\";if(i.lastNeed>1&&n.length>1){if((192&n[1])!=128)return i.lastNeed=1,\"\\uFFFD\";if(i.lastNeed>2&&n.length>2&&(192&n[2])!=128)return i.lastNeed=2,\"\\uFFFD\"}}(this,t);return r!==void 0?r:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),this.lastNeed-=t.length,void 0)}function Ow(t,e){if((t.length-e)%2==0){var r=t.toString(\"utf16le\",e);if(r){var i=r.charCodeAt(r.length-1);if(i>=55296&&i<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString(\"utf16le\",e,t.length-1)}function kw(t){var e=t&&t.length?this.write(t):\"\";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString(\"utf16le\",0,r)}return e}function xw(t,e){var r=(t.length-e)%3;return r===0?t.toString(\"base64\",e):(this.lastNeed=3-r,this.lastTotal=3,r===1?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString(\"base64\",e,t.length-r))}function Mw(t){var e=t&&t.length?this.write(t):\"\";return this.lastNeed?e+this.lastChar.toString(\"base64\",0,3-this.lastNeed):e}function Lw(t){return t.toString(this.encoding)}function Uw(t){return t&&t.length?this.write(t):\"\"}var Rc,$e,ke,yc,on,nr,bc,gw,St,$s,Nr,_c,Rw,Cw,an,ln,it,Bw,ar,zs,Tc,Qs=we(()=>{v();m();_();for(Rc={byteLength:function(t){var e=wc(t),r=e[0],i=e[1];return 3*(r+i)/4-i},toByteArray:function(t){var e,r,i=wc(t),n=i[0],o=i[1],s=new yc(function(c,h,d){return 3*(h+d)/4-d}(0,n,o)),a=0,u=o>0?n-4:n;for(r=0;r>16&255,s[a++]=e>>8&255,s[a++]=255&e;return o===2&&(e=ke[t.charCodeAt(r)]<<2|ke[t.charCodeAt(r+1)]>>4,s[a++]=255&e),o===1&&(e=ke[t.charCodeAt(r)]<<10|ke[t.charCodeAt(r+1)]<<4|ke[t.charCodeAt(r+2)]>>2,s[a++]=e>>8&255,s[a++]=255&e),s},fromByteArray:function(t){for(var e,r=t.length,i=r%3,n=[],o=0,s=r-i;os?s:o+16383));return i===1?(e=t[r-1],n.push($e[e>>2]+$e[e<<4&63]+\"==\")):i===2&&(e=(t[r-2]<<8)+t[r-1],n.push($e[e>>10]+$e[e>>4&63]+$e[e<<2&63]+\"=\")),n.join(\"\")}},$e=[],ke=[],yc=typeof Uint8Array<\"u\"?Uint8Array:Array,on=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\",nr=0,bc=on.length;nr>1,h=-7,d=r?n-1:0,g=r?-1:1,y=t[e+d];for(d+=g,o=y&(1<<-h)-1,y>>=-h,h+=a;h>0;o=256*o+t[e+d],d+=g,h-=8);for(s=o&(1<<-h)-1,o>>=-h,h+=i;h>0;s=256*s+t[e+d],d+=g,h-=8);if(o===0)o=1-c;else {if(o===u)return s?NaN:1/0*(y?-1:1);s+=Math.pow(2,i),o-=c;}return (y?-1:1)*s*Math.pow(2,o-i)},write:function(t,e,r,i,n,o){var s,a,u,c=8*o-n-1,h=(1<>1,g=n===23?Math.pow(2,-24)-Math.pow(2,-77):0,y=i?0:o-1,w=i?1:-1,E=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=h):(s=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-s))<1&&(s--,u*=2),(e+=s+d>=1?g/u:g*Math.pow(2,1-d))*u>=2&&(s++,u/=2),s+d>=h?(a=0,s=h):s+d>=1?(a=(e*u-1)*Math.pow(2,n),s+=d):(a=e*Math.pow(2,d-1)*Math.pow(2,n),s=0));n>=8;t[r+y]=255&a,y+=w,a/=256,n-=8);for(s=s<0;t[r+y]=255&s,y+=w,s/=256,c-=8);t[r+y-w]|=128*E;}},St={},$s=Rc,Nr=gw,_c=typeof Symbol==\"function\"&&typeof Symbol.for==\"function\"?Symbol.for(\"nodejs.util.inspect.custom\"):null;St.Buffer=k,St.SlowBuffer=function(t){return +t!=t&&(t=0),k.alloc(+t)},St.INSPECT_MAX_BYTES=50;St.kMaxLength=2147483647,k.TYPED_ARRAY_SUPPORT=function(){try{var t=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(t,e),t.foo()===42}catch{return !1}}(),k.TYPED_ARRAY_SUPPORT||typeof console>\"u\"||typeof console.error!=\"function\"||console.error(\"This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.\"),Object.defineProperty(k.prototype,\"parent\",{enumerable:!0,get:function(){if(k.isBuffer(this))return this.buffer}}),Object.defineProperty(k.prototype,\"offset\",{enumerable:!0,get:function(){if(k.isBuffer(this))return this.byteOffset}}),k.poolSize=8192,k.from=function(t,e,r){return Cc(t,e,r)},Object.setPrototypeOf(k.prototype,Uint8Array.prototype),Object.setPrototypeOf(k,Uint8Array),k.alloc=function(t,e,r){return function(i,n,o){return Bc(i),i<=0?vt(i):n!==void 0?typeof o==\"string\"?vt(i).fill(n,o):vt(i).fill(n):vt(i)}(t,e,r)},k.allocUnsafe=function(t){return Hs(t)},k.allocUnsafeSlow=function(t){return Hs(t)},k.isBuffer=function(t){return t!=null&&t._isBuffer===!0&&t!==k.prototype},k.compare=function(t,e){if(Et(t,Uint8Array)&&(t=k.from(t,t.offset,t.byteLength)),Et(e,Uint8Array)&&(e=k.from(e,e.offset,e.byteLength)),!k.isBuffer(t)||!k.isBuffer(e))throw new TypeError('The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;for(var r=t.length,i=e.length,n=0,o=Math.min(r,i);ne&&(t+=\" ... \"),\"\"},_c&&(k.prototype[_c]=k.prototype.inspect),k.prototype.compare=function(t,e,r,i,n){if(Et(t,Uint8Array)&&(t=k.from(t,t.offset,t.byteLength)),!k.isBuffer(t))throw new TypeError('The \"target\" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(e===void 0&&(e=0),r===void 0&&(r=t?t.length:0),i===void 0&&(i=0),n===void 0&&(n=this.length),e<0||r>t.length||i<0||n>this.length)throw new RangeError(\"out of range index\");if(i>=n&&e>=r)return 0;if(i>=n)return -1;if(e>=r)return 1;if(this===t)return 0;for(var o=(n>>>=0)-(i>>>=0),s=(r>>>=0)-(e>>>=0),a=Math.min(o,s),u=this.slice(i,n),c=t.slice(e,r),h=0;h>>=0,isFinite(r)?(r>>>=0,i===void 0&&(i=\"utf8\")):(i=r,r=void 0);}var n=this.length-e;if((r===void 0||r>n)&&(r=n),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError(\"Attempt to write outside buffer bounds\");i||(i=\"utf8\");for(var o=!1;;)switch(i){case\"hex\":return bw(this,t,e,r);case\"utf8\":case\"utf-8\":return ww(this,t,e,r);case\"ascii\":return Oc(this,t,e,r);case\"latin1\":case\"binary\":return _w(this,t,e,r);case\"base64\":return mw(this,t,e,r);case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return vw(this,t,e,r);default:if(o)throw new TypeError(\"Unknown encoding: \"+i);i=(\"\"+i).toLowerCase(),o=!0;}},k.prototype.toJSON=function(){return {type:\"Buffer\",data:Array.prototype.slice.call(this._arr||this,0)}};k.prototype.slice=function(t,e){var r=this.length;(t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=e===void 0?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e>>=0,e>>>=0,r||be(t,e,this.length);for(var i=this[t],n=1,o=0;++o>>=0,e>>>=0,r||be(t,e,this.length);for(var i=this[t+--e],n=1;e>0&&(n*=256);)i+=this[t+--e]*n;return i},k.prototype.readUInt8=function(t,e){return t>>>=0,e||be(t,1,this.length),this[t]},k.prototype.readUInt16LE=function(t,e){return t>>>=0,e||be(t,2,this.length),this[t]|this[t+1]<<8},k.prototype.readUInt16BE=function(t,e){return t>>>=0,e||be(t,2,this.length),this[t]<<8|this[t+1]},k.prototype.readUInt32LE=function(t,e){return t>>>=0,e||be(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},k.prototype.readUInt32BE=function(t,e){return t>>>=0,e||be(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},k.prototype.readIntLE=function(t,e,r){t>>>=0,e>>>=0,r||be(t,e,this.length);for(var i=this[t],n=1,o=0;++o=(n*=128)&&(i-=Math.pow(2,8*e)),i},k.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||be(t,e,this.length);for(var i=e,n=1,o=this[t+--i];i>0&&(n*=256);)o+=this[t+--i]*n;return o>=(n*=128)&&(o-=Math.pow(2,8*e)),o},k.prototype.readInt8=function(t,e){return t>>>=0,e||be(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},k.prototype.readInt16LE=function(t,e){t>>>=0,e||be(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},k.prototype.readInt16BE=function(t,e){t>>>=0,e||be(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},k.prototype.readInt32LE=function(t,e){return t>>>=0,e||be(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},k.prototype.readInt32BE=function(t,e){return t>>>=0,e||be(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},k.prototype.readFloatLE=function(t,e){return t>>>=0,e||be(t,4,this.length),Nr.read(this,t,!0,23,4)},k.prototype.readFloatBE=function(t,e){return t>>>=0,e||be(t,4,this.length),Nr.read(this,t,!1,23,4)},k.prototype.readDoubleLE=function(t,e){return t>>>=0,e||be(t,8,this.length),Nr.read(this,t,!0,52,8)},k.prototype.readDoubleBE=function(t,e){return t>>>=0,e||be(t,8,this.length),Nr.read(this,t,!1,52,8)},k.prototype.writeUIntLE=function(t,e,r,i){t=+t,e>>>=0,r>>>=0,i||Pe(this,t,e,r,Math.pow(2,8*r)-1,0);var n=1,o=0;for(this[e]=255&t;++o>>=0,r>>>=0,i||Pe(this,t,e,r,Math.pow(2,8*r)-1,0);var n=r-1,o=1;for(this[e+n]=255&t;--n>=0&&(o*=256);)this[e+n]=t/o&255;return e+r},k.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||Pe(this,t,e,1,255,0),this[e]=255&t,e+1},k.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||Pe(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},k.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||Pe(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},k.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||Pe(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},k.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||Pe(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},k.prototype.writeIntLE=function(t,e,r,i){if(t=+t,e>>>=0,!i){var n=Math.pow(2,8*r-1);Pe(this,t,e,r,n-1,-n);}var o=0,s=1,a=0;for(this[e]=255&t;++o>0)-a&255;return e+r},k.prototype.writeIntBE=function(t,e,r,i){if(t=+t,e>>>=0,!i){var n=Math.pow(2,8*r-1);Pe(this,t,e,r,n-1,-n);}var o=r-1,s=1,a=0;for(this[e+o]=255&t;--o>=0&&(s*=256);)t<0&&a===0&&this[e+o+1]!==0&&(a=1),this[e+o]=(t/s>>0)-a&255;return e+r},k.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||Pe(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},k.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||Pe(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},k.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||Pe(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},k.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||Pe(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},k.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||Pe(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},k.prototype.writeFloatLE=function(t,e,r){return Sc(this,t,e,!0,r)},k.prototype.writeFloatBE=function(t,e,r){return Sc(this,t,e,!1,r)},k.prototype.writeDoubleLE=function(t,e,r){return Ac(this,t,e,!0,r)},k.prototype.writeDoubleBE=function(t,e,r){return Ac(this,t,e,!1,r)},k.prototype.copy=function(t,e,r,i){if(!k.isBuffer(t))throw new TypeError(\"argument should be a Buffer\");if(r||(r=0),i||i===0||(i=this.length),e>=t.length&&(e=t.length),e||(e=0),i>0&&i=this.length)throw new RangeError(\"Index out of range\");if(i<0)throw new RangeError(\"sourceEnd out of bounds\");i>this.length&&(i=this.length),t.length-e=0;--o)t[o+e]=this[o+r];else Uint8Array.prototype.set.call(t,this.subarray(r,i),e);return n},k.prototype.fill=function(t,e,r,i){if(typeof t==\"string\"){if(typeof e==\"string\"?(i=e,e=0,r=this.length):typeof r==\"string\"&&(i=r,r=this.length),i!==void 0&&typeof i!=\"string\")throw new TypeError(\"encoding must be a string\");if(typeof i==\"string\"&&!k.isEncoding(i))throw new TypeError(\"Unknown encoding: \"+i);if(t.length===1){var n=t.charCodeAt(0);(i===\"utf8\"&&n<128||i===\"latin1\")&&(t=n);}}else typeof t==\"number\"?t&=255:typeof t==\"boolean\"&&(t=Number(t));if(e<0||this.length>>=0,r=r===void 0?this.length:r>>>0,t||(t=0),typeof t==\"number\")for(o=e;o=0?(u>0&&(n.lastNeed=u-1),u):--a=0?(u>0&&(n.lastNeed=u-2),u):--a=0?(u>0&&(u===2?u=0:n.lastNeed=u-3),u):0}(this,t,e);if(!this.lastNeed)return t.toString(\"utf8\",e);this.lastTotal=r;var i=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,i),t.toString(\"utf8\",e,i)},hi.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length;};ar.StringDecoder;ar.StringDecoder;});var Lc={};Qt(Lc,{StringDecoder:()=>Nw,default:()=>ar});var Nw,Uc=we(()=>{v();m();_();Qs();Qs();Nw=ar.StringDecoder;});var Ys=M((F2,jc)=>{v();m();_();var Nc=Ut(),{PromisePrototypeThen:qw,SymbolAsyncIterator:qc,SymbolIterator:Dc}=ce(),{Buffer:Dw}=(ye(),X(_e)),{ERR_INVALID_ARG_TYPE:jw,ERR_STREAM_NULL_VALUES:Fw}=Se().codes;function Ww(t,e,r){let i;if(typeof e==\"string\"||e instanceof Dw)return new t({objectMode:!0,...r,read(){this.push(e),this.push(null);}});let n;if(e&&e[qc])n=!0,i=e[qc]();else if(e&&e[Dc])n=!1,i=e[Dc]();else throw new jw(\"iterable\",[\"Iterable\"],e);let o=new t({objectMode:!0,highWaterMark:1,...r}),s=!1;o._read=function(){s||(s=!0,u());},o._destroy=function(c,h){qw(a(c),()=>Nc.nextTick(h,c),d=>Nc.nextTick(h,d||c));};async function a(c){let h=c!=null,d=typeof i.throw==\"function\";if(h&&d){let{value:g,done:y}=await i.throw(c);if(await g,y)return}if(typeof i.return==\"function\"){let{value:g}=await i.return();await g;}}async function u(){for(;;){try{let{value:c,done:h}=n?await i.next():i.next();if(h)o.push(null);else {let d=c&&typeof c.then==\"function\"?await c:c;if(d===null)throw s=!1,new Fw;if(o.push(d))continue;s=!1;}}catch(c){o.destroy(c);}break}}return o}jc.exports=Ww;});var di=M((J2,Zc)=>{v();m();_();var He=Ut(),{ArrayPrototypeIndexOf:$w,NumberIsInteger:Hw,NumberIsNaN:Vw,NumberParseInt:zw,ObjectDefineProperties:$c,ObjectKeys:Kw,ObjectSetPrototypeOf:Hc,Promise:Gw,SafeSet:Qw,SymbolAsyncIterator:Yw,Symbol:Jw}=ce();Zc.exports=F;F.ReadableState=ro;var{EventEmitter:Xw}=(ir(),X(rr)),{Stream:qt,prependListener:Zw}=tn(),{Buffer:Js}=(ye(),X(_e)),{addAbortSignal:e_}=ci(),t_=mt(),H=Je().debuglog(\"stream\",t=>{H=t;}),r_=dc(),Dr=tr(),{getHighWaterMark:i_,getDefaultHighWaterMark:n_}=sn(),{aggregateTwoErrors:Fc,codes:{ERR_INVALID_ARG_TYPE:s_,ERR_METHOD_NOT_IMPLEMENTED:o_,ERR_OUT_OF_RANGE:a_,ERR_STREAM_PUSH_AFTER_EOF:l_,ERR_STREAM_UNSHIFT_AFTER_END_EVENT:u_}}=Se(),{validateObject:f_}=fi(),lr=Jw(\"kPaused\"),{StringDecoder:Vc}=(Uc(),X(Lc)),c_=Ys();Hc(F.prototype,qt.prototype);Hc(F,qt);var Xs=()=>{},{errorOrDestroy:qr}=Dr;function ro(t,e,r){typeof r!=\"boolean\"&&(r=e instanceof nt()),this.objectMode=!!(t&&t.objectMode),r&&(this.objectMode=this.objectMode||!!(t&&t.readableObjectMode)),this.highWaterMark=t?i_(this,t,\"readableHighWaterMark\",r):n_(!1),this.buffer=new r_,this.length=0,this.pipes=[],this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.constructed=!0,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this[lr]=null,this.errorEmitted=!1,this.emitClose=!t||t.emitClose!==!1,this.autoDestroy=!t||t.autoDestroy!==!1,this.destroyed=!1,this.errored=null,this.closed=!1,this.closeEmitted=!1,this.defaultEncoding=t&&t.defaultEncoding||\"utf8\",this.awaitDrainWriters=null,this.multiAwaitDrain=!1,this.readingMore=!1,this.dataEmitted=!1,this.decoder=null,this.encoding=null,t&&t.encoding&&(this.decoder=new Vc(t.encoding),this.encoding=t.encoding);}function F(t){if(!(this instanceof F))return new F(t);let e=this instanceof nt();this._readableState=new ro(t,this,e),t&&(typeof t.read==\"function\"&&(this._read=t.read),typeof t.destroy==\"function\"&&(this._destroy=t.destroy),typeof t.construct==\"function\"&&(this._construct=t.construct),t.signal&&!e&&e_(t.signal,this)),qt.call(this,t),Dr.construct(this,()=>{this._readableState.needReadable&&fn(this,this._readableState);});}F.prototype.destroy=Dr.destroy;F.prototype._undestroy=Dr.undestroy;F.prototype._destroy=function(t,e){e(t);};F.prototype[Xw.captureRejectionSymbol]=function(t){this.destroy(t);};F.prototype.push=function(t,e){return zc(this,t,e,!1)};F.prototype.unshift=function(t,e){return zc(this,t,e,!0)};function zc(t,e,r,i){H(\"readableAddChunk\",e);let n=t._readableState,o;if(n.objectMode||(typeof e==\"string\"?(r=r||n.defaultEncoding,n.encoding!==r&&(i&&n.encoding?e=Js.from(e,r).toString(n.encoding):(e=Js.from(e,r),r=\"\"))):e instanceof Js?r=\"\":qt._isUint8Array(e)?(e=qt._uint8ArrayToBuffer(e),r=\"\"):e!=null&&(o=new s_(\"chunk\",[\"string\",\"Buffer\",\"Uint8Array\"],e))),o)qr(t,o);else if(e===null)n.reading=!1,p_(t,n);else if(n.objectMode||e&&e.length>0)if(i)if(n.endEmitted)qr(t,new u_);else {if(n.destroyed||n.errored)return !1;Zs(t,n,e,!0);}else if(n.ended)qr(t,new l_);else {if(n.destroyed||n.errored)return !1;n.reading=!1,n.decoder&&!r?(e=n.decoder.write(e),n.objectMode||e.length!==0?Zs(t,n,e,!1):fn(t,n)):Zs(t,n,e,!1);}else i||(n.reading=!1,fn(t,n));return !n.ended&&(n.length0?(e.multiAwaitDrain?e.awaitDrainWriters.clear():e.awaitDrainWriters=null,e.dataEmitted=!0,t.emit(\"data\",r)):(e.length+=e.objectMode?1:r.length,i?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&cn(t)),fn(t,e);}F.prototype.isPaused=function(){let t=this._readableState;return t[lr]===!0||t.flowing===!1};F.prototype.setEncoding=function(t){let e=new Vc(t);this._readableState.decoder=e,this._readableState.encoding=this._readableState.decoder.encoding;let r=this._readableState.buffer,i=\"\";for(let n of r)i+=e.write(n);return r.clear(),i!==\"\"&&r.push(i),this._readableState.length=i.length,this};var h_=1073741824;function d_(t){if(t>h_)throw new a_(\"size\",\"<= 1GiB\",t);return t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++,t}function Wc(t,e){return t<=0||e.length===0&&e.ended?0:e.objectMode?1:Vw(t)?e.flowing&&e.length?e.buffer.first().length:e.length:t<=e.length?t:e.ended?e.length:0}F.prototype.read=function(t){H(\"read\",t),t===void 0?t=NaN:Hw(t)||(t=zw(t,10));let e=this._readableState,r=t;if(t>e.highWaterMark&&(e.highWaterMark=d_(t)),t!==0&&(e.emittedReadable=!1),t===0&&e.needReadable&&((e.highWaterMark!==0?e.length>=e.highWaterMark:e.length>0)||e.ended))return H(\"read: emitReadable\",e.length,e.ended),e.length===0&&e.ended?eo(this):cn(this),null;if(t=Wc(t,e),t===0&&e.ended)return e.length===0&&eo(this),null;let i=e.needReadable;if(H(\"need readable\",i),(e.length===0||e.length-t0?n=Jc(t,e):n=null,n===null?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.multiAwaitDrain?e.awaitDrainWriters.clear():e.awaitDrainWriters=null),e.length===0&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&eo(this)),n!==null&&!e.errorEmitted&&!e.closeEmitted&&(e.dataEmitted=!0,this.emit(\"data\",n)),n};function p_(t,e){if(H(\"onEofChunk\"),!e.ended){if(e.decoder){let r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length);}e.ended=!0,e.sync?cn(t):(e.needReadable=!1,e.emittedReadable=!0,Kc(t));}}function cn(t){let e=t._readableState;H(\"emitReadable\",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(H(\"emitReadable\",e.flowing),e.emittedReadable=!0,He.nextTick(Kc,t));}function Kc(t){let e=t._readableState;H(\"emitReadable_\",e.destroyed,e.length,e.ended),!e.destroyed&&!e.errored&&(e.length||e.ended)&&(t.emit(\"readable\"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,Qc(t);}function fn(t,e){!e.readingMore&&e.constructed&&(e.readingMore=!0,He.nextTick(g_,t,e));}function g_(t,e){for(;!e.reading&&!e.ended&&(e.length1&&i.pipes.includes(t)&&(H(\"false write response, pause\",i.awaitDrainWriters.size),i.awaitDrainWriters.add(t)),r.pause()),u||(u=y_(r,t),t.on(\"drain\",u));}r.on(\"data\",g);function g(I){H(\"ondata\");let C=t.write(I);H(\"dest.write\",C),C===!1&&d();}function y(I){if(H(\"onerror\",I),S(),t.removeListener(\"error\",y),t.listenerCount(\"error\")===0){let C=t._writableState||t._readableState;C&&!C.errorEmitted?qr(t,I):t.emit(\"error\",I);}}Zw(t,\"error\",y);function w(){t.removeListener(\"finish\",E),S();}t.once(\"close\",w);function E(){H(\"onfinish\"),t.removeListener(\"close\",w),S();}t.once(\"finish\",E);function S(){H(\"unpipe\"),r.unpipe(t);}return t.emit(\"pipe\",r),t.writableNeedDrain===!0?i.flowing&&d():i.flowing||(H(\"pipe resume\"),r.resume()),t};function y_(t,e){return function(){let i=t._readableState;i.awaitDrainWriters===e?(H(\"pipeOnDrain\",1),i.awaitDrainWriters=null):i.multiAwaitDrain&&(H(\"pipeOnDrain\",i.awaitDrainWriters.size),i.awaitDrainWriters.delete(e)),(!i.awaitDrainWriters||i.awaitDrainWriters.size===0)&&t.listenerCount(\"data\")&&t.resume();}}F.prototype.unpipe=function(t){let e=this._readableState,r={hasUnpiped:!1};if(e.pipes.length===0)return this;if(!t){let n=e.pipes;e.pipes=[],this.pause();for(let o=0;o0,i.flowing!==!1&&this.resume()):t===\"readable\"&&!i.endEmitted&&!i.readableListening&&(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,H(\"on readable\",i.length,i.reading),i.length?cn(this):i.reading||He.nextTick(b_,this)),r};F.prototype.addListener=F.prototype.on;F.prototype.removeListener=function(t,e){let r=qt.prototype.removeListener.call(this,t,e);return t===\"readable\"&&He.nextTick(Gc,this),r};F.prototype.off=F.prototype.removeListener;F.prototype.removeAllListeners=function(t){let e=qt.prototype.removeAllListeners.apply(this,arguments);return (t===\"readable\"||t===void 0)&&He.nextTick(Gc,this),e};function Gc(t){let e=t._readableState;e.readableListening=t.listenerCount(\"readable\")>0,e.resumeScheduled&&e[lr]===!1?e.flowing=!0:t.listenerCount(\"data\")>0?t.resume():e.readableListening||(e.flowing=null);}function b_(t){H(\"readable nexttick read 0\"),t.read(0);}F.prototype.resume=function(){let t=this._readableState;return t.flowing||(H(\"resume\"),t.flowing=!t.readableListening,w_(this,t)),t[lr]=!1,this};function w_(t,e){e.resumeScheduled||(e.resumeScheduled=!0,He.nextTick(__,t,e));}function __(t,e){H(\"resume\",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit(\"resume\"),Qc(t),e.flowing&&!e.reading&&t.read(0);}F.prototype.pause=function(){return H(\"call pause flowing=%j\",this._readableState.flowing),this._readableState.flowing!==!1&&(H(\"pause\"),this._readableState.flowing=!1,this.emit(\"pause\")),this._readableState[lr]=!0,this};function Qc(t){let e=t._readableState;for(H(\"flow\",e.flowing);e.flowing&&t.read()!==null;);}F.prototype.wrap=function(t){let e=!1;t.on(\"data\",i=>{!this.push(i)&&t.pause&&(e=!0,t.pause());}),t.on(\"end\",()=>{this.push(null);}),t.on(\"error\",i=>{qr(this,i);}),t.on(\"close\",()=>{this.destroy();}),t.on(\"destroy\",()=>{this.destroy();}),this._read=()=>{e&&t.resume&&(e=!1,t.resume());};let r=Kw(t);for(let i=1;i{n=s?Fc(n,s):null,r(),r=Xs;});try{for(;;){let s=t.destroyed?null:t.read();if(s!==null)yield s;else {if(n)throw n;if(n===null)return;await new Gw(i);}}}catch(s){throw n=Fc(n,s),n}finally{(n||e?.destroyOnReturn!==!1)&&(n===void 0||t._readableState.autoDestroy)?Dr.destroyer(t,null):(t.off(\"readable\",i),o());}}$c(F.prototype,{readable:{__proto__:null,get(){let t=this._readableState;return !!t&&t.readable!==!1&&!t.destroyed&&!t.errorEmitted&&!t.endEmitted},set(t){this._readableState&&(this._readableState.readable=!!t);}},readableDidRead:{__proto__:null,enumerable:!1,get:function(){return this._readableState.dataEmitted}},readableAborted:{__proto__:null,enumerable:!1,get:function(){return !!(this._readableState.readable!==!1&&(this._readableState.destroyed||this._readableState.errored)&&!this._readableState.endEmitted)}},readableHighWaterMark:{__proto__:null,enumerable:!1,get:function(){return this._readableState.highWaterMark}},readableBuffer:{__proto__:null,enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}},readableFlowing:{__proto__:null,enumerable:!1,get:function(){return this._readableState.flowing},set:function(t){this._readableState&&(this._readableState.flowing=t);}},readableLength:{__proto__:null,enumerable:!1,get(){return this._readableState.length}},readableObjectMode:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.objectMode:!1}},readableEncoding:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.encoding:null}},errored:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.errored:null}},closed:{__proto__:null,get(){return this._readableState?this._readableState.closed:!1}},destroyed:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.destroyed:!1},set(t){this._readableState&&(this._readableState.destroyed=t);}},readableEnded:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.endEmitted:!1}}});$c(ro.prototype,{pipesCount:{__proto__:null,get(){return this.pipes.length}},paused:{__proto__:null,get(){return this[lr]!==!1},set(t){this[lr]=!!t;}}});F._fromList=Jc;function Jc(t,e){if(e.length===0)return null;let r;return e.objectMode?r=e.buffer.shift():!t||t>=e.length?(e.decoder?r=e.buffer.join(\"\"):e.buffer.length===1?r=e.buffer.first():r=e.buffer.concat(e.length),e.buffer.clear()):r=e.buffer.consume(t,e.decoder),r}function eo(t){let e=t._readableState;H(\"endReadable\",e.endEmitted),e.endEmitted||(e.ended=!0,He.nextTick(v_,e,t));}function v_(t,e){if(H(\"endReadableNT\",t.endEmitted,t.length),!t.errored&&!t.closeEmitted&&!t.endEmitted&&t.length===0){if(t.endEmitted=!0,e.emit(\"end\"),e.writable&&e.allowHalfOpen===!1)He.nextTick(E_,e);else if(t.autoDestroy){let r=e._writableState;(!r||r.autoDestroy&&(r.finished||r.writable===!1))&&e.destroy();}}}function E_(t){t.writable&&!t.writableEnded&&!t.destroyed&&t.end();}F.from=function(t,e){return c_(F,t,e)};var to;function Xc(){return to===void 0&&(to={}),to}F.fromWeb=function(t,e){return Xc().newStreamReadableFromReadableStream(t,e)};F.toWeb=function(t,e){return Xc().newReadableStreamFromStreamReadable(t,e)};F.wrap=function(t,e){var r,i;return new F({objectMode:(r=(i=t.readableObjectMode)!==null&&i!==void 0?i:t.objectMode)!==null&&r!==void 0?r:!0,...e,destroy(n,o){Dr.destroyer(t,n),o(n);}}).wrap(t)};});var uo=M((aR,ch)=>{v();m();_();var ur=Ut(),{ArrayPrototypeSlice:rh,Error:S_,FunctionPrototypeSymbolHasInstance:ih,ObjectDefineProperty:nh,ObjectDefineProperties:A_,ObjectSetPrototypeOf:sh,StringPrototypeToLowerCase:I_,Symbol:T_,SymbolHasInstance:R_}=ce();ch.exports=ie;ie.WritableState=yi;var{EventEmitter:C_}=(ir(),X(rr)),pi=tn().Stream,{Buffer:hn}=(ye(),X(_e)),gn=tr(),{addAbortSignal:B_}=ci(),{getHighWaterMark:P_,getDefaultHighWaterMark:O_}=sn(),{ERR_INVALID_ARG_TYPE:k_,ERR_METHOD_NOT_IMPLEMENTED:x_,ERR_MULTIPLE_CALLBACK:oh,ERR_STREAM_CANNOT_PIPE:M_,ERR_STREAM_DESTROYED:gi,ERR_STREAM_ALREADY_FINISHED:L_,ERR_STREAM_NULL_VALUES:U_,ERR_STREAM_WRITE_AFTER_END:N_,ERR_UNKNOWN_ENCODING:ah}=Se().codes,{errorOrDestroy:jr}=gn;sh(ie.prototype,pi.prototype);sh(ie,pi);function so(){}var Fr=T_(\"kOnFinished\");function yi(t,e,r){typeof r!=\"boolean\"&&(r=e instanceof nt()),this.objectMode=!!(t&&t.objectMode),r&&(this.objectMode=this.objectMode||!!(t&&t.writableObjectMode)),this.highWaterMark=t?P_(this,t,\"writableHighWaterMark\",r):O_(!1),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;let i=!!(t&&t.decodeStrings===!1);this.decodeStrings=!i,this.defaultEncoding=t&&t.defaultEncoding||\"utf8\",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=D_.bind(void 0,e),this.writecb=null,this.writelen=0,this.afterWriteTickInfo=null,pn(this),this.pendingcb=0,this.constructed=!0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!t||t.emitClose!==!1,this.autoDestroy=!t||t.autoDestroy!==!1,this.errored=null,this.closed=!1,this.closeEmitted=!1,this[Fr]=[];}function pn(t){t.buffered=[],t.bufferedIndex=0,t.allBuffers=!0,t.allNoop=!0;}yi.prototype.getBuffer=function(){return rh(this.buffered,this.bufferedIndex)};nh(yi.prototype,\"bufferedRequestCount\",{__proto__:null,get(){return this.buffered.length-this.bufferedIndex}});function ie(t){let e=this instanceof nt();if(!e&&!ih(ie,this))return new ie(t);this._writableState=new yi(t,this,e),t&&(typeof t.write==\"function\"&&(this._write=t.write),typeof t.writev==\"function\"&&(this._writev=t.writev),typeof t.destroy==\"function\"&&(this._destroy=t.destroy),typeof t.final==\"function\"&&(this._final=t.final),typeof t.construct==\"function\"&&(this._construct=t.construct),t.signal&&B_(t.signal,this)),pi.call(this,t),gn.construct(this,()=>{let r=this._writableState;r.writing||ao(this,r),lo(this,r);});}nh(ie,R_,{__proto__:null,value:function(t){return ih(this,t)?!0:this!==ie?!1:t&&t._writableState instanceof yi}});ie.prototype.pipe=function(){jr(this,new M_);};function lh(t,e,r,i){let n=t._writableState;if(typeof r==\"function\")i=r,r=n.defaultEncoding;else {if(!r)r=n.defaultEncoding;else if(r!==\"buffer\"&&!hn.isEncoding(r))throw new ah(r);typeof i!=\"function\"&&(i=so);}if(e===null)throw new U_;if(!n.objectMode)if(typeof e==\"string\")n.decodeStrings!==!1&&(e=hn.from(e,r),r=\"buffer\");else if(e instanceof hn)r=\"buffer\";else if(pi._isUint8Array(e))e=pi._uint8ArrayToBuffer(e),r=\"buffer\";else throw new k_(\"chunk\",[\"string\",\"Buffer\",\"Uint8Array\"],e);let o;return n.ending?o=new N_:n.destroyed&&(o=new gi(\"write\")),o?(ur.nextTick(i,o),jr(t,o,!0),o):(n.pendingcb++,q_(t,n,e,r,i))}ie.prototype.write=function(t,e,r){return lh(this,t,e,r)===!0};ie.prototype.cork=function(){this._writableState.corked++;};ie.prototype.uncork=function(){let t=this._writableState;t.corked&&(t.corked--,t.writing||ao(this,t));};ie.prototype.setDefaultEncoding=function(e){if(typeof e==\"string\"&&(e=I_(e)),!hn.isEncoding(e))throw new ah(e);return this._writableState.defaultEncoding=e,this};function q_(t,e,r,i,n){let o=e.objectMode?1:r.length;e.length+=o;let s=e.lengthr.bufferedIndex&&ao(t,r),i?r.afterWriteTickInfo!==null&&r.afterWriteTickInfo.cb===n?r.afterWriteTickInfo.count++:(r.afterWriteTickInfo={count:1,cb:n,stream:t,state:r},ur.nextTick(j_,r.afterWriteTickInfo)):uh(t,r,1,n));}function j_({stream:t,state:e,count:r,cb:i}){return e.afterWriteTickInfo=null,uh(t,e,r,i)}function uh(t,e,r,i){for(!e.ending&&!t.destroyed&&e.length===0&&e.needDrain&&(e.needDrain=!1,t.emit(\"drain\"));r-- >0;)e.pendingcb--,i();e.destroyed&&oo(e),lo(t,e);}function oo(t){if(t.writing)return;for(let n=t.bufferedIndex;n1&&t._writev){e.pendingcb-=o-1;let a=e.allNoop?so:c=>{for(let h=s;h256?(r.splice(0,s),e.bufferedIndex=0):e.bufferedIndex=s;}e.bufferProcessing=!1;}ie.prototype._write=function(t,e,r){if(this._writev)this._writev([{chunk:t,encoding:e}],r);else throw new x_(\"_write()\")};ie.prototype._writev=null;ie.prototype.end=function(t,e,r){let i=this._writableState;typeof t==\"function\"?(r=t,t=null,e=null):typeof e==\"function\"&&(r=e,e=null);let n;if(t!=null){let o=lh(this,t,e);o instanceof S_&&(n=o);}return i.corked&&(i.corked=1,this.uncork()),n||(!i.errored&&!i.ending?(i.ending=!0,lo(this,i,!0),i.ended=!0):i.finished?n=new L_(\"end\"):i.destroyed&&(n=new gi(\"end\"))),typeof r==\"function\"&&(n||i.finished?ur.nextTick(r,n):i[Fr].push(r)),this};function dn(t){return t.ending&&!t.destroyed&&t.constructed&&t.length===0&&!t.errored&&t.buffered.length===0&&!t.finished&&!t.writing&&!t.errorEmitted&&!t.closeEmitted}function F_(t,e){let r=!1;function i(n){if(r){jr(t,n??oh());return}if(r=!0,e.pendingcb--,n){let o=e[Fr].splice(0);for(let s=0;s{dn(n)?no(i,n):n.pendingcb--;},t,e)):dn(e)&&(e.pendingcb++,no(t,e))));}function no(t,e){e.pendingcb--,e.finished=!0;let r=e[Fr].splice(0);for(let i=0;i{v();m();_();var fo=Ut(),H_=(ye(),X(_e)),{isReadable:V_,isWritable:z_,isIterable:hh,isNodeStream:K_,isReadableNodeStream:dh,isWritableNodeStream:ph,isDuplexNodeStream:G_}=tt(),gh=mt(),{AbortError:vh,codes:{ERR_INVALID_ARG_TYPE:Q_,ERR_INVALID_RETURN_VALUE:yh}}=Se(),{destroyer:Wr}=tr(),Y_=nt(),J_=di(),{createDeferredPromise:bh}=Je(),wh=Ys(),_h=globalThis.Blob||H_.Blob,X_=typeof _h<\"u\"?function(e){return e instanceof _h}:function(e){return !1},Z_=globalThis.AbortController||Hi().AbortController,{FunctionPrototypeCall:mh}=ce(),fr=class extends Y_{constructor(e){super(e),e?.readable===!1&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),e?.writable===!1&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0);}};Eh.exports=function t(e,r){if(G_(e))return e;if(dh(e))return yn({readable:e});if(ph(e))return yn({writable:e});if(K_(e))return yn({writable:!1,readable:!1});if(typeof e==\"function\"){let{value:n,write:o,final:s,destroy:a}=e0(e);if(hh(n))return wh(fr,n,{objectMode:!0,write:o,final:s,destroy:a});let u=n?.then;if(typeof u==\"function\"){let c,h=mh(u,n,d=>{if(d!=null)throw new yh(\"nully\",\"body\",d)},d=>{Wr(c,d);});return c=new fr({objectMode:!0,readable:!1,write:o,final(d){s(async()=>{try{await h,fo.nextTick(d,null);}catch(g){fo.nextTick(d,g);}});},destroy:a})}throw new yh(\"Iterable, AsyncIterable or AsyncFunction\",r,n)}if(X_(e))return t(e.arrayBuffer());if(hh(e))return wh(fr,e,{objectMode:!0,writable:!1});if(typeof e?.writable==\"object\"||typeof e?.readable==\"object\"){let n=e!=null&&e.readable?dh(e?.readable)?e?.readable:t(e.readable):void 0,o=e!=null&&e.writable?ph(e?.writable)?e?.writable:t(e.writable):void 0;return yn({readable:n,writable:o})}let i=e?.then;if(typeof i==\"function\"){let n;return mh(i,e,o=>{o!=null&&n.push(o),n.push(null);},o=>{Wr(n,o);}),n=new fr({objectMode:!0,writable:!1,read(){}})}throw new Q_(r,[\"Blob\",\"ReadableStream\",\"WritableStream\",\"Stream\",\"Iterable\",\"AsyncIterable\",\"Function\",\"{ readable, writable } pair\",\"Promise\"],e)};function e0(t){let{promise:e,resolve:r}=bh(),i=new Z_,n=i.signal;return {value:t(async function*(){for(;;){let s=e;e=null;let{chunk:a,done:u,cb:c}=await s;if(fo.nextTick(c),u)return;if(n.aborted)throw new vh(void 0,{cause:n.reason});(({promise:e,resolve:r}=bh())),yield a;}}(),{signal:n}),write(s,a,u){let c=r;r=null,c({chunk:s,done:!1,cb:u});},final(s){let a=r;r=null,a({done:!0,cb:s});},destroy(s,a){i.abort(),a(s);}}}function yn(t){let e=t.readable&&typeof t.readable.read!=\"function\"?J_.wrap(t.readable):t.readable,r=t.writable,i=!!V_(e),n=!!z_(r),o,s,a,u,c;function h(d){let g=u;u=null,g?g(d):d&&c.destroy(d);}return c=new fr({readableObjectMode:!!(e!=null&&e.readableObjectMode),writableObjectMode:!!(r!=null&&r.writableObjectMode),readable:i,writable:n}),n&&(gh(r,d=>{n=!1,d&&Wr(e,d),h(d);}),c._write=function(d,g,y){r.write(d,g)?y():o=y;},c._final=function(d){r.end(),s=d;},r.on(\"drain\",function(){if(o){let d=o;o=null,d();}}),r.on(\"finish\",function(){if(s){let d=s;s=null,d();}})),i&&(gh(e,d=>{i=!1,d&&Wr(e,d),h(d);}),e.on(\"readable\",function(){if(a){let d=a;a=null,d();}}),e.on(\"end\",function(){c.push(null);}),c._read=function(){for(;;){let d=e.read();if(d===null){a=c._read;return}if(!c.push(d))return}}),c._destroy=function(d,g){!d&&u!==null&&(d=new vh),a=null,o=null,s=null,u===null?g(d):(u=g,Wr(r,d),Wr(e,d));},c}});var nt=M((RR,Th)=>{v();m();_();var{ObjectDefineProperties:t0,ObjectGetOwnPropertyDescriptor:At,ObjectKeys:r0,ObjectSetPrototypeOf:Ah}=ce();Th.exports=Ve;var po=di(),Ne=uo();Ah(Ve.prototype,po.prototype);Ah(Ve,po);{let t=r0(Ne.prototype);for(let e=0;e{v();m();_();var{ObjectSetPrototypeOf:Rh,Symbol:i0}=ce();Ch.exports=It;var{ERR_METHOD_NOT_IMPLEMENTED:n0}=Se().codes,yo=nt(),{getHighWaterMark:s0}=sn();Rh(It.prototype,yo.prototype);Rh(It,yo);var bi=i0(\"kCallback\");function It(t){if(!(this instanceof It))return new It(t);let e=t?s0(this,t,\"readableHighWaterMark\",!0):null;e===0&&(t={...t,highWaterMark:null,readableHighWaterMark:e,writableHighWaterMark:t.writableHighWaterMark||0}),yo.call(this,t),this._readableState.sync=!1,this[bi]=null,t&&(typeof t.transform==\"function\"&&(this._transform=t.transform),typeof t.flush==\"function\"&&(this._flush=t.flush)),this.on(\"prefinish\",o0);}function go(t){typeof this._flush==\"function\"&&!this.destroyed?this._flush((e,r)=>{if(e){t?t(e):this.destroy(e);return}r!=null&&this.push(r),this.push(null),t&&t();}):(this.push(null),t&&t());}function o0(){this._final!==go&&go.call(this);}It.prototype._final=go;It.prototype._transform=function(t,e,r){throw new n0(\"_transform()\")};It.prototype._write=function(t,e,r){let i=this._readableState,n=this._writableState,o=i.length;this._transform(t,e,(s,a)=>{if(s){r(s);return}a!=null&&this.push(a),n.ended||o===i.length||i.length{v();m();_();var{ObjectSetPrototypeOf:Bh}=ce();Ph.exports=$r;var wo=bo();Bh($r.prototype,wo.prototype);Bh($r,wo);function $r(t){if(!(this instanceof $r))return new $r(t);wo.call(this,t);}$r.prototype._transform=function(t,e,r){r(null,t);};});var mn=M((iC,Lh)=>{v();m();_();var wi=Ut(),{ArrayIsArray:a0,Promise:l0,SymbolAsyncIterator:u0}=ce(),_n=mt(),{once:f0}=Je(),c0=tr(),Oh=nt(),{aggregateTwoErrors:h0,codes:{ERR_INVALID_ARG_TYPE:Ro,ERR_INVALID_RETURN_VALUE:mo,ERR_MISSING_ARGS:d0,ERR_STREAM_DESTROYED:p0,ERR_STREAM_PREMATURE_CLOSE:g0},AbortError:y0}=Se(),{validateFunction:b0,validateAbortSignal:w0}=fi(),{isIterable:cr,isReadable:vo,isReadableNodeStream:wn,isNodeStream:kh,isTransformStream:Hr,isWebStream:_0,isReadableStream:Eo,isReadableEnded:m0}=tt(),v0=globalThis.AbortController||Hi().AbortController,So,Ao;function xh(t,e,r){let i=!1;t.on(\"close\",()=>{i=!0;});let n=_n(t,{readable:e,writable:r},o=>{i=!o;});return {destroy:o=>{i||(i=!0,c0.destroyer(t,o||new p0(\"pipe\")));},cleanup:n}}function E0(t){return b0(t[t.length-1],\"streams[stream.length - 1]\"),t.pop()}function Io(t){if(cr(t))return t;if(wn(t))return S0(t);throw new Ro(\"val\",[\"Readable\",\"Iterable\",\"AsyncIterable\"],t)}async function*S0(t){Ao||(Ao=di()),yield*Ao.prototype[u0].call(t);}async function bn(t,e,r,{end:i}){let n,o=null,s=c=>{if(c&&(n=c),o){let h=o;o=null,h();}},a=()=>new l0((c,h)=>{n?h(n):o=()=>{n?h(n):c();};});e.on(\"drain\",s);let u=_n(e,{readable:!1},s);try{e.writableNeedDrain&&await a();for await(let c of t)e.write(c)||await a();i&&e.end(),await a(),r();}catch(c){r(n!==c?h0(n,c):c);}finally{u(),e.off(\"drain\",s);}}async function To(t,e,r,{end:i}){Hr(e)&&(e=e.writable);let n=e.getWriter();try{for await(let o of t)await n.ready,n.write(o).catch(()=>{});await n.ready,i&&await n.close(),r();}catch(o){try{await n.abort(o),r(o);}catch(s){r(s);}}}function A0(...t){return Mh(t,f0(E0(t)))}function Mh(t,e,r){if(t.length===1&&a0(t[0])&&(t=t[0]),t.length<2)throw new d0(\"streams\");let i=new v0,n=i.signal,o=r?.signal,s=[];w0(o,\"options.signal\");function a(){y(new y0);}o?.addEventListener(\"abort\",a);let u,c,h=[],d=0;function g(C){y(C,--d===0);}function y(C,R){if(C&&(!u||u.code===\"ERR_STREAM_PREMATURE_CLOSE\")&&(u=C),!(!u&&!R)){for(;h.length;)h.shift()(u);o?.removeEventListener(\"abort\",a),i.abort(),R&&(u||s.forEach(U=>U()),wi.nextTick(e,u,c));}}let w;for(let C=0;C0,W=U||r?.end!==!1,K=C===t.length-1;if(kh(R)){let z=function(Q){Q&&Q.name!==\"AbortError\"&&Q.code!==\"ERR_STREAM_PREMATURE_CLOSE\"&&g(Q);};if(W){let{destroy:Q,cleanup:de}=xh(R,U,N);h.push(Q),vo(R)&&K&&s.push(de);}R.on(\"error\",z),vo(R)&&K&&s.push(()=>{R.removeListener(\"error\",z);});}if(C===0)if(typeof R==\"function\"){if(w=R({signal:n}),!cr(w))throw new mo(\"Iterable, AsyncIterable or Stream\",\"source\",w)}else cr(R)||wn(R)||Hr(R)?w=R:w=Oh.from(R);else if(typeof R==\"function\"){if(Hr(w)){var E;w=Io((E=w)===null||E===void 0?void 0:E.readable);}else w=Io(w);if(w=R(w,{signal:n}),U){if(!cr(w,!0))throw new mo(\"AsyncIterable\",`transform[${C-1}]`,w)}else {var S;So||(So=_o());let z=new So({objectMode:!0}),Q=(S=w)===null||S===void 0?void 0:S.then;if(typeof Q==\"function\")d++,Q.call(w,pe=>{c=pe,pe!=null&&z.write(pe),W&&z.end(),wi.nextTick(g);},pe=>{z.destroy(pe),wi.nextTick(g,pe);});else if(cr(w,!0))d++,bn(w,z,g,{end:W});else if(Eo(w)||Hr(w)){let pe=w.readable||w;d++,bn(pe,z,g,{end:W});}else throw new mo(\"AsyncIterable or Promise\",\"destination\",w);w=z;let{destroy:de,cleanup:Gt}=xh(w,!1,!0);h.push(de),K&&s.push(Gt);}}else if(kh(R)){if(wn(w)){d+=2;let z=I0(w,R,g,{end:W});vo(R)&&K&&s.push(z);}else if(Hr(w)||Eo(w)){let z=w.readable||w;d++,bn(z,R,g,{end:W});}else if(cr(w))d++,bn(w,R,g,{end:W});else throw new Ro(\"val\",[\"Readable\",\"Iterable\",\"AsyncIterable\",\"ReadableStream\",\"TransformStream\"],w);w=R;}else if(_0(R)){if(wn(w))d++,To(Io(w),R,g,{end:W});else if(Eo(w)||cr(w))d++,To(w,R,g,{end:W});else if(Hr(w))d++,To(w.readable,R,g,{end:W});else throw new Ro(\"val\",[\"Readable\",\"Iterable\",\"AsyncIterable\",\"ReadableStream\",\"TransformStream\"],w);w=R;}else w=Oh.from(R);}return (n!=null&&n.aborted||o!=null&&o.aborted)&&wi.nextTick(a),w}function I0(t,e,r,{end:i}){let n=!1;if(e.on(\"close\",()=>{n||r(new g0);}),t.pipe(e,{end:!1}),i){let s=function(){n=!0,e.end();};m0(t)?wi.nextTick(s):t.once(\"end\",s);}else r();return _n(t,{readable:!0,writable:!1},s=>{let a=t._readableState;s&&s.code===\"ERR_STREAM_PREMATURE_CLOSE\"&&a&&a.ended&&!a.errored&&!a.errorEmitted?t.once(\"end\",r).once(\"error\",r):r(s);}),_n(e,{readable:!1,writable:!0},r)}Lh.exports={pipelineImpl:Mh,pipeline:A0};});var Bo=M((dC,Fh)=>{v();m();_();var{pipeline:T0}=mn(),vn=nt(),{destroyer:R0}=tr(),{isNodeStream:En,isReadable:Uh,isWritable:Nh,isWebStream:Co,isTransformStream:hr,isWritableStream:qh,isReadableStream:Dh}=tt(),{AbortError:C0,codes:{ERR_INVALID_ARG_VALUE:jh,ERR_MISSING_ARGS:B0}}=Se(),P0=mt();Fh.exports=function(...e){if(e.length===0)throw new B0(\"streams\");if(e.length===1)return vn.from(e[0]);let r=[...e];if(typeof e[0]==\"function\"&&(e[0]=vn.from(e[0])),typeof e[e.length-1]==\"function\"){let y=e.length-1;e[y]=vn.from(e[y]);}for(let y=0;y0&&!(Nh(e[y])||qh(e[y])||hr(e[y])))throw new jh(`streams[${y}]`,r[y],\"must be writable\")}let i,n,o,s,a;function u(y){let w=s;s=null,w?w(y):y?a.destroy(y):!g&&!d&&a.destroy();}let c=e[0],h=T0(e,u),d=!!(Nh(c)||qh(c)||hr(c)),g=!!(Uh(h)||Dh(h)||hr(h));if(a=new vn({writableObjectMode:!!(c!=null&&c.writableObjectMode),readableObjectMode:!!(h!=null&&h.writableObjectMode),writable:d,readable:g}),d){if(En(c))a._write=function(w,E,S){c.write(w,E)?S():i=S;},a._final=function(w){c.end(),n=w;},c.on(\"drain\",function(){if(i){let w=i;i=null,w();}});else if(Co(c)){let E=(hr(c)?c.writable:c).getWriter();a._write=async function(S,I,C){try{await E.ready,E.write(S).catch(()=>{}),C();}catch(R){C(R);}},a._final=async function(S){try{await E.ready,E.close().catch(()=>{}),n=S;}catch(I){S(I);}};}let y=hr(h)?h.readable:h;P0(y,()=>{if(n){let w=n;n=null,w();}});}if(g){if(En(h))h.on(\"readable\",function(){if(o){let y=o;o=null,y();}}),h.on(\"end\",function(){a.push(null);}),a._read=function(){for(;;){let y=h.read();if(y===null){o=a._read;return}if(!a.push(y))return}};else if(Co(h)){let w=(hr(h)?h.readable:h).getReader();a._read=async function(){for(;;)try{let{value:E,done:S}=await w.read();if(!a.push(E))return;if(S){a.push(null);return}}catch{return}};}}return a._destroy=function(y,w){!y&&s!==null&&(y=new C0),o=null,i=null,n=null,s===null?w(y):(s=w,En(h)&&R0(h,y));},a};});var Qh=M((SC,ko)=>{v();m();_();var Vh=globalThis.AbortController||Hi().AbortController,{codes:{ERR_INVALID_ARG_VALUE:O0,ERR_INVALID_ARG_TYPE:_i,ERR_MISSING_ARGS:k0,ERR_OUT_OF_RANGE:x0},AbortError:st}=Se(),{validateAbortSignal:dr,validateInteger:M0,validateObject:pr}=fi(),L0=ce().Symbol(\"kWeak\"),{finished:U0}=mt(),N0=Bo(),{addAbortSignalNoValidate:q0}=ci(),{isWritable:D0,isNodeStream:j0}=tt(),{ArrayPrototypePush:F0,MathFloor:W0,Number:$0,NumberIsNaN:H0,Promise:Wh,PromiseReject:$h,PromisePrototypeThen:V0,Symbol:zh}=ce(),Sn=zh(\"kEmpty\"),Hh=zh(\"kEof\");function z0(t,e){if(e!=null&&pr(e,\"options\"),e?.signal!=null&&dr(e.signal,\"options.signal\"),j0(t)&&!D0(t))throw new O0(\"stream\",t,\"must be writable\");let r=N0(this,t);return e!=null&&e.signal&&q0(e.signal,r),r}function An(t,e){if(typeof t!=\"function\")throw new _i(\"fn\",[\"Function\",\"AsyncFunction\"],t);e!=null&&pr(e,\"options\"),e?.signal!=null&&dr(e.signal,\"options.signal\");let r=1;return e?.concurrency!=null&&(r=W0(e.concurrency)),M0(r,\"concurrency\",1),async function*(){var n,o;let s=new Vh,a=this,u=[],c=s.signal,h={signal:c},d=()=>s.abort();e!=null&&(n=e.signal)!==null&&n!==void 0&&n.aborted&&d(),e==null||(o=e.signal)===null||o===void 0||o.addEventListener(\"abort\",d);let g,y,w=!1;function E(){w=!0;}async function S(){try{for await(let R of a){var I;if(w)return;if(c.aborted)throw new st;try{R=t(R,h);}catch(U){R=$h(U);}R!==Sn&&(typeof((I=R)===null||I===void 0?void 0:I.catch)==\"function\"&&R.catch(E),u.push(R),g&&(g(),g=null),!w&&u.length&&u.length>=r&&await new Wh(U=>{y=U;}));}u.push(Hh);}catch(R){let U=$h(R);V0(U,void 0,E),u.push(U);}finally{var C;w=!0,g&&(g(),g=null),e==null||(C=e.signal)===null||C===void 0||C.removeEventListener(\"abort\",d);}}S();try{for(;;){for(;u.length>0;){let I=await u[0];if(I===Hh)return;if(c.aborted)throw new st;I!==Sn&&(yield I),u.shift(),y&&(y(),y=null);}await new Wh(I=>{g=I;});}}finally{s.abort(),w=!0,y&&(y(),y=null);}}.call(this)}function K0(t=void 0){return t!=null&&pr(t,\"options\"),t?.signal!=null&&dr(t.signal,\"options.signal\"),async function*(){let r=0;for await(let n of this){var i;if(t!=null&&(i=t.signal)!==null&&i!==void 0&&i.aborted)throw new st({cause:t.signal.reason});yield [r++,n];}}.call(this)}async function Kh(t,e=void 0){for await(let r of Oo.call(this,t,e))return !0;return !1}async function G0(t,e=void 0){if(typeof t!=\"function\")throw new _i(\"fn\",[\"Function\",\"AsyncFunction\"],t);return !await Kh.call(this,async(...r)=>!await t(...r),e)}async function Q0(t,e){for await(let r of Oo.call(this,t,e))return r}async function Y0(t,e){if(typeof t!=\"function\")throw new _i(\"fn\",[\"Function\",\"AsyncFunction\"],t);async function r(i,n){return await t(i,n),Sn}for await(let i of An.call(this,r,e));}function Oo(t,e){if(typeof t!=\"function\")throw new _i(\"fn\",[\"Function\",\"AsyncFunction\"],t);async function r(i,n){return await t(i,n)?i:Sn}return An.call(this,r,e)}var Po=class extends k0{constructor(){super(\"reduce\"),this.message=\"Reduce of an empty stream requires an initial value\";}};async function J0(t,e,r){var i;if(typeof t!=\"function\")throw new _i(\"reducer\",[\"Function\",\"AsyncFunction\"],t);r!=null&&pr(r,\"options\"),r?.signal!=null&&dr(r.signal,\"options.signal\");let n=arguments.length>1;if(r!=null&&(i=r.signal)!==null&&i!==void 0&&i.aborted){let c=new st(void 0,{cause:r.signal.reason});throw this.once(\"error\",()=>{}),await U0(this.destroy(c)),c}let o=new Vh,s=o.signal;if(r!=null&&r.signal){let c={once:!0,[L0]:this};r.signal.addEventListener(\"abort\",()=>o.abort(),c);}let a=!1;try{for await(let c of this){var u;if(a=!0,r!=null&&(u=r.signal)!==null&&u!==void 0&&u.aborted)throw new st;n?e=await t(e,c,{signal:s}):(e=c,n=!0);}if(!a&&!n)throw new Po}finally{o.abort();}return e}async function X0(t){t!=null&&pr(t,\"options\"),t?.signal!=null&&dr(t.signal,\"options.signal\");let e=[];for await(let i of this){var r;if(t!=null&&(r=t.signal)!==null&&r!==void 0&&r.aborted)throw new st(void 0,{cause:t.signal.reason});F0(e,i);}return e}function Z0(t,e){let r=An.call(this,t,e);return async function*(){for await(let n of r)yield*n;}.call(this)}function Gh(t){if(t=$0(t),H0(t))return 0;if(t<0)throw new x0(\"number\",\">= 0\",t);return t}function em(t,e=void 0){return e!=null&&pr(e,\"options\"),e?.signal!=null&&dr(e.signal,\"options.signal\"),t=Gh(t),async function*(){var i;if(e!=null&&(i=e.signal)!==null&&i!==void 0&&i.aborted)throw new st;for await(let o of this){var n;if(e!=null&&(n=e.signal)!==null&&n!==void 0&&n.aborted)throw new st;t--<=0&&(yield o);}}.call(this)}function tm(t,e=void 0){return e!=null&&pr(e,\"options\"),e?.signal!=null&&dr(e.signal,\"options.signal\"),t=Gh(t),async function*(){var i;if(e!=null&&(i=e.signal)!==null&&i!==void 0&&i.aborted)throw new st;for await(let o of this){var n;if(e!=null&&(n=e.signal)!==null&&n!==void 0&&n.aborted)throw new st;if(t-- >0)yield o;else return}}.call(this)}ko.exports.streamReturningOperators={asIndexedPairs:K0,drop:em,filter:Oo,flatMap:Z0,map:An,take:tm,compose:z0};ko.exports.promiseReturningOperators={every:G0,forEach:Y0,reduce:J0,toArray:X0,some:Kh,find:Q0};});var xo=M((xC,Yh)=>{v();m();_();var{ArrayPrototypePop:rm,Promise:im}=ce(),{isIterable:nm,isNodeStream:sm,isWebStream:om}=tt(),{pipelineImpl:am}=mn(),{finished:lm}=mt();Mo();function um(...t){return new im((e,r)=>{let i,n,o=t[t.length-1];if(o&&typeof o==\"object\"&&!sm(o)&&!nm(o)&&!om(o)){let s=rm(t);i=s.signal,n=s.end;}am(t,(s,a)=>{s?r(s):e(a);},{signal:i,end:n});})}Yh.exports={finished:lm,pipeline:um};});var Mo=M(($C,sd)=>{v();m();_();var{Buffer:fm}=(ye(),X(_e)),{ObjectDefineProperty:Tt,ObjectKeys:Zh,ReflectApply:ed}=ce(),{promisify:{custom:td}}=Je(),{streamReturningOperators:Jh,promiseReturningOperators:Xh}=Qh(),{codes:{ERR_ILLEGAL_CONSTRUCTOR:rd}}=Se(),cm=Bo(),{pipeline:id}=mn(),{destroyer:hm}=tr(),nd=mt(),Lo=xo(),Uo=tt(),le=sd.exports=tn().Stream;le.isDisturbed=Uo.isDisturbed;le.isErrored=Uo.isErrored;le.isReadable=Uo.isReadable;le.Readable=di();for(let t of Zh(Jh)){let r=function(...i){if(new.target)throw rd();return le.Readable.from(ed(e,this,i))};let e=Jh[t];Tt(r,\"name\",{__proto__:null,value:e.name}),Tt(r,\"length\",{__proto__:null,value:e.length}),Tt(le.Readable.prototype,t,{__proto__:null,value:r,enumerable:!1,configurable:!0,writable:!0});}for(let t of Zh(Xh)){let r=function(...n){if(new.target)throw rd();return ed(e,this,n)};let e=Xh[t];Tt(r,\"name\",{__proto__:null,value:e.name}),Tt(r,\"length\",{__proto__:null,value:e.length}),Tt(le.Readable.prototype,t,{__proto__:null,value:r,enumerable:!1,configurable:!0,writable:!0});}le.Writable=uo();le.Duplex=nt();le.Transform=bo();le.PassThrough=_o();le.pipeline=id;var{addAbortSignal:dm}=ci();le.addAbortSignal=dm;le.finished=nd;le.destroy=hm;le.compose=cm;Tt(le,\"promises\",{__proto__:null,configurable:!0,enumerable:!0,get(){return Lo}});Tt(id,td,{__proto__:null,enumerable:!0,get(){return Lo.pipeline}});Tt(nd,td,{__proto__:null,enumerable:!0,get(){return Lo.finished}});le.Stream=le;le._isUint8Array=function(e){return e instanceof Uint8Array};le._uint8ArrayToBuffer=function(e){return fm.from(e.buffer,e.byteOffset,e.byteLength)};});var Dt=M((ZC,ue)=>{v();m();_();var he=Mo(),pm=xo(),gm=he.Readable.destroy;ue.exports=he.Readable;ue.exports._uint8ArrayToBuffer=he._uint8ArrayToBuffer;ue.exports._isUint8Array=he._isUint8Array;ue.exports.isDisturbed=he.isDisturbed;ue.exports.isErrored=he.isErrored;ue.exports.isReadable=he.isReadable;ue.exports.Readable=he.Readable;ue.exports.Writable=he.Writable;ue.exports.Duplex=he.Duplex;ue.exports.Transform=he.Transform;ue.exports.PassThrough=he.PassThrough;ue.exports.addAbortSignal=he.addAbortSignal;ue.exports.finished=he.finished;ue.exports.destroy=he.destroy;ue.exports.destroy=gm;ue.exports.pipeline=he.pipeline;ue.exports.compose=he.compose;Object.defineProperty(he,\"promises\",{configurable:!0,enumerable:!0,get(){return pm}});ue.exports.Stream=he.Stream;ue.exports.default=ue.exports;});var od=M((uB,qo)=>{v();m();_();typeof Object.create==\"function\"?qo.exports=function(e,r){r&&(e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}));}:qo.exports=function(e,r){if(r){e.super_=r;var i=function(){};i.prototype=r.prototype,e.prototype=new i,e.prototype.constructor=e;}};});var ud=M((_B,ld)=>{v();m();_();var{Buffer:ze}=(ye(),X(_e)),ad=Symbol.for(\"BufferList\");function ee(t){if(!(this instanceof ee))return new ee(t);ee._init.call(this,t);}ee._init=function(e){Object.defineProperty(this,ad,{value:!0}),this._bufs=[],this.length=0,e&&this.append(e);};ee.prototype._new=function(e){return new ee(e)};ee.prototype._offset=function(e){if(e===0)return [0,0];let r=0;for(let i=0;ithis.length||e<0)return;let r=this._offset(e);return this._bufs[r[0]][r[1]]};ee.prototype.slice=function(e,r){return typeof e==\"number\"&&e<0&&(e+=this.length),typeof r==\"number\"&&r<0&&(r+=this.length),this.copy(null,0,e,r)};ee.prototype.copy=function(e,r,i,n){if((typeof i!=\"number\"||i<0)&&(i=0),(typeof n!=\"number\"||n>this.length)&&(n=this.length),i>=this.length||n<=0)return e||ze.alloc(0);let o=!!e,s=this._offset(i),a=n-i,u=a,c=o&&r||0,h=s[1];if(i===0&&n===this.length){if(!o)return this._bufs.length===1?this._bufs[0]:ze.concat(this._bufs,this.length);for(let d=0;dg)this._bufs[d].copy(e,c,h),c+=g;else {this._bufs[d].copy(e,c,h,h+u),c+=g;break}u-=g,h&&(h=0);}return e.length>c?e.slice(0,c):e};ee.prototype.shallowSlice=function(e,r){if(e=e||0,r=typeof r!=\"number\"?this.length:r,e<0&&(e+=this.length),r<0&&(r+=this.length),e===r)return this._new();let i=this._offset(e),n=this._offset(r),o=this._bufs.slice(i[0],n[0]+1);return n[1]===0?o.pop():o[o.length-1]=o[o.length-1].slice(0,n[1]),i[1]!==0&&(o[0]=o[0].slice(i[1])),this._new(o)};ee.prototype.toString=function(e,r,i){return this.slice(r,i).toString(e)};ee.prototype.consume=function(e){if(e=Math.trunc(e),Number.isNaN(e)||e<=0)return this;for(;this._bufs.length;)if(e>=this._bufs[0].length)e-=this._bufs[0].length,this.length-=this._bufs[0].length,this._bufs.shift();else {this._bufs[0]=this._bufs[0].slice(e),this.length-=e;break}return this};ee.prototype.duplicate=function(){let e=this._new();for(let r=0;rthis.length?this.length:e;let i=this._offset(e),n=i[0],o=i[1];for(;n=t.length){let u=s.indexOf(t,o);if(u!==-1)return this._reverseOffset([n,u]);o=s.length-t.length+1;}else {let u=this._reverseOffset([n,o]);if(this._match(u,t))return u;o++;}o=0;}return -1};ee.prototype._match=function(t,e){if(this.length-t{v();m();_();var Do=Dt().Duplex,ym=od(),mi=ud();function Ee(t){if(!(this instanceof Ee))return new Ee(t);if(typeof t==\"function\"){this._callback=t;let e=function(i){this._callback&&(this._callback(i),this._callback=null);}.bind(this);this.on(\"pipe\",function(i){i.on(\"error\",e);}),this.on(\"unpipe\",function(i){i.removeListener(\"error\",e);}),t=null;}mi._init.call(this,t),Do.call(this);}ym(Ee,Do);Object.assign(Ee.prototype,mi.prototype);Ee.prototype._new=function(e){return new Ee(e)};Ee.prototype._write=function(e,r,i){this._appendBuffer(e),typeof i==\"function\"&&i();};Ee.prototype._read=function(e){if(!this.length)return this.push(null);e=Math.min(e,this.length),this.push(this.slice(0,e)),this.consume(e);};Ee.prototype.end=function(e){Do.prototype.end.call(this,e),this._callback&&(this._callback(null,this.slice()),this._callback=null);};Ee.prototype._destroy=function(e,r){this._bufs.length=0,this.length=0,r(e);};Ee.prototype._isBufferList=function(e){return e instanceof Ee||e instanceof mi||Ee.isBufferList(e)};Ee.isBufferList=mi.isBufferList;In.exports=Ee;In.exports.BufferListStream=Ee;In.exports.BufferList=mi;});var hd=M((DB,cd)=>{v();m();_();var jo=class{constructor(){this.cmd=null,this.retain=!1,this.qos=0,this.dup=!1,this.length=-1,this.topic=null,this.payload=null;}};cd.exports=jo;});var Fo=M((QB,dd)=>{v();m();_();var L=dd.exports,{Buffer:Oe}=(ye(),X(_e));L.types={0:\"reserved\",1:\"connect\",2:\"connack\",3:\"publish\",4:\"puback\",5:\"pubrec\",6:\"pubrel\",7:\"pubcomp\",8:\"subscribe\",9:\"suback\",10:\"unsubscribe\",11:\"unsuback\",12:\"pingreq\",13:\"pingresp\",14:\"disconnect\",15:\"auth\"};L.requiredHeaderFlags={1:0,2:0,4:0,5:0,6:2,7:0,8:2,9:0,10:2,11:0,12:0,13:0,14:0,15:0};L.requiredHeaderFlagsErrors={};for(let t in L.requiredHeaderFlags){let e=L.requiredHeaderFlags[t];L.requiredHeaderFlagsErrors[t]=\"Invalid header flag bits, must be 0x\"+e.toString(16)+\" for \"+L.types[t]+\" packet\";}L.codes={};for(let t in L.types){let e=L.types[t];L.codes[e]=t;}L.CMD_SHIFT=4;L.CMD_MASK=240;L.DUP_MASK=8;L.QOS_MASK=3;L.QOS_SHIFT=1;L.RETAIN_MASK=1;L.VARBYTEINT_MASK=127;L.VARBYTEINT_FIN_MASK=128;L.VARBYTEINT_MAX=268435455;L.SESSIONPRESENT_MASK=1;L.SESSIONPRESENT_HEADER=Oe.from([L.SESSIONPRESENT_MASK]);L.CONNACK_HEADER=Oe.from([L.codes.connack<[0,1].map(r=>[0,1].map(i=>{let n=Oe.alloc(1);return n.writeUInt8(L.codes[t]<Oe.from([t]));L.EMPTY={pingreq:Oe.from([L.codes.pingreq<<4,0]),pingresp:Oe.from([L.codes.pingresp<<4,0]),disconnect:Oe.from([L.codes.disconnect<<4,0])};L.MQTT5_PUBACK_PUBREC_CODES={0:\"Success\",16:\"No matching subscribers\",128:\"Unspecified error\",131:\"Implementation specific error\",135:\"Not authorized\",144:\"Topic Name invalid\",145:\"Packet identifier in use\",151:\"Quota exceeded\",153:\"Payload format invalid\"};L.MQTT5_PUBREL_PUBCOMP_CODES={0:\"Success\",146:\"Packet Identifier not found\"};L.MQTT5_SUBACK_CODES={0:\"Granted QoS 0\",1:\"Granted QoS 1\",2:\"Granted QoS 2\",128:\"Unspecified error\",131:\"Implementation specific error\",135:\"Not authorized\",143:\"Topic Filter invalid\",145:\"Packet Identifier in use\",151:\"Quota exceeded\",158:\"Shared Subscriptions not supported\",161:\"Subscription Identifiers not supported\",162:\"Wildcard Subscriptions not supported\"};L.MQTT5_UNSUBACK_CODES={0:\"Success\",17:\"No subscription existed\",128:\"Unspecified error\",131:\"Implementation specific error\",135:\"Not authorized\",143:\"Topic Filter invalid\",145:\"Packet Identifier in use\"};L.MQTT5_DISCONNECT_CODES={0:\"Normal disconnection\",4:\"Disconnect with Will Message\",128:\"Unspecified error\",129:\"Malformed Packet\",130:\"Protocol Error\",131:\"Implementation specific error\",135:\"Not authorized\",137:\"Server busy\",139:\"Server shutting down\",141:\"Keep Alive timeout\",142:\"Session taken over\",143:\"Topic Filter invalid\",144:\"Topic Name invalid\",147:\"Receive Maximum exceeded\",148:\"Topic Alias invalid\",149:\"Packet too large\",150:\"Message rate too high\",151:\"Quota exceeded\",152:\"Administrative action\",153:\"Payload format invalid\",154:\"Retain not supported\",155:\"QoS not supported\",156:\"Use another server\",157:\"Server moved\",158:\"Shared Subscriptions not supported\",159:\"Connection rate exceeded\",160:\"Maximum connect time\",161:\"Subscription Identifiers not supported\",162:\"Wildcard Subscriptions not supported\"};L.MQTT5_AUTH_CODES={0:\"Success\",24:\"Continue authentication\",25:\"Re-authenticate\"};});var gd=M((sP,pd)=>{v();m();_();var Vr=1e3,zr=Vr*60,Kr=zr*60,gr=Kr*24,bm=gr*7,wm=gr*365.25;pd.exports=function(t,e){e=e||{};var r=typeof t;if(r===\"string\"&&t.length>0)return _m(t);if(r===\"number\"&&isFinite(t))return e.long?vm(t):mm(t);throw new Error(\"val is not a non-empty string or a valid number. val=\"+JSON.stringify(t))};function _m(t){if(t=String(t),!(t.length>100)){var e=/^(-?(?:\\d+)?\\.?\\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(e){var r=parseFloat(e[1]),i=(e[2]||\"ms\").toLowerCase();switch(i){case\"years\":case\"year\":case\"yrs\":case\"yr\":case\"y\":return r*wm;case\"weeks\":case\"week\":case\"w\":return r*bm;case\"days\":case\"day\":case\"d\":return r*gr;case\"hours\":case\"hour\":case\"hrs\":case\"hr\":case\"h\":return r*Kr;case\"minutes\":case\"minute\":case\"mins\":case\"min\":case\"m\":return r*zr;case\"seconds\":case\"second\":case\"secs\":case\"sec\":case\"s\":return r*Vr;case\"milliseconds\":case\"millisecond\":case\"msecs\":case\"msec\":case\"ms\":return r;default:return}}}}function mm(t){var e=Math.abs(t);return e>=gr?Math.round(t/gr)+\"d\":e>=Kr?Math.round(t/Kr)+\"h\":e>=zr?Math.round(t/zr)+\"m\":e>=Vr?Math.round(t/Vr)+\"s\":t+\"ms\"}function vm(t){var e=Math.abs(t);return e>=gr?Tn(t,e,gr,\"day\"):e>=Kr?Tn(t,e,Kr,\"hour\"):e>=zr?Tn(t,e,zr,\"minute\"):e>=Vr?Tn(t,e,Vr,\"second\"):t+\" ms\"}function Tn(t,e,r,i){var n=e>=r*1.5;return Math.round(t/r)+\" \"+i+(n?\"s\":\"\")}});var bd=M((gP,yd)=>{v();m();_();function Em(t){r.debug=r,r.default=r,r.coerce=u,r.disable=o,r.enable=n,r.enabled=s,r.humanize=gd(),r.destroy=c,Object.keys(t).forEach(h=>{r[h]=t[h];}),r.names=[],r.skips=[],r.formatters={};function e(h){let d=0;for(let g=0;g{if(W===\"%%\")return \"%\";U++;let z=r.formatters[K];if(typeof z==\"function\"){let Q=S[U];W=z.call(I,Q),S.splice(U,1),U--;}return W}),r.formatArgs.call(I,S),(I.log||r.log).apply(I,S);}return E.namespace=h,E.useColors=r.useColors(),E.color=r.selectColor(h),E.extend=i,E.destroy=r.destroy,Object.defineProperty(E,\"enabled\",{enumerable:!0,configurable:!1,get:()=>g!==null?g:(y!==r.namespaces&&(y=r.namespaces,w=r.enabled(h)),w),set:S=>{g=S;}}),typeof r.init==\"function\"&&r.init(E),E}function i(h,d){let g=r(this.namespace+(typeof d>\"u\"?\":\":d)+h);return g.log=this.log,g}function n(h){r.save(h),r.namespaces=h,r.names=[],r.skips=[];let d,g=(typeof h==\"string\"?h:\"\").split(/[\\s,]+/),y=g.length;for(d=0;d\"-\"+d)].join(\",\");return r.enable(\"\"),h}function s(h){if(h[h.length-1]===\"*\")return !0;let d,g;for(d=0,g=r.skips.length;d{v();m();_();xe.formatArgs=Am;xe.save=Im;xe.load=Tm;xe.useColors=Sm;xe.storage=Rm();xe.destroy=(()=>{let t=!1;return ()=>{t||(t=!0,console.warn(\"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.\"));}})();xe.colors=[\"#0000CC\",\"#0000FF\",\"#0033CC\",\"#0033FF\",\"#0066CC\",\"#0066FF\",\"#0099CC\",\"#0099FF\",\"#00CC00\",\"#00CC33\",\"#00CC66\",\"#00CC99\",\"#00CCCC\",\"#00CCFF\",\"#3300CC\",\"#3300FF\",\"#3333CC\",\"#3333FF\",\"#3366CC\",\"#3366FF\",\"#3399CC\",\"#3399FF\",\"#33CC00\",\"#33CC33\",\"#33CC66\",\"#33CC99\",\"#33CCCC\",\"#33CCFF\",\"#6600CC\",\"#6600FF\",\"#6633CC\",\"#6633FF\",\"#66CC00\",\"#66CC33\",\"#9900CC\",\"#9900FF\",\"#9933CC\",\"#9933FF\",\"#99CC00\",\"#99CC33\",\"#CC0000\",\"#CC0033\",\"#CC0066\",\"#CC0099\",\"#CC00CC\",\"#CC00FF\",\"#CC3300\",\"#CC3333\",\"#CC3366\",\"#CC3399\",\"#CC33CC\",\"#CC33FF\",\"#CC6600\",\"#CC6633\",\"#CC9900\",\"#CC9933\",\"#CCCC00\",\"#CCCC33\",\"#FF0000\",\"#FF0033\",\"#FF0066\",\"#FF0099\",\"#FF00CC\",\"#FF00FF\",\"#FF3300\",\"#FF3333\",\"#FF3366\",\"#FF3399\",\"#FF33CC\",\"#FF33FF\",\"#FF6600\",\"#FF6633\",\"#FF9900\",\"#FF9933\",\"#FFCC00\",\"#FFCC33\"];function Sm(){return typeof window<\"u\"&&window.process&&(window.process.type===\"renderer\"||window.process.__nwjs)?!0:typeof B<\"u\"&&B.userAgent&&B.userAgent.toLowerCase().match(/(edge|trident)\\/(\\d+)/)?!1:typeof document<\"u\"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<\"u\"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof B<\"u\"&&B.userAgent&&B.userAgent.toLowerCase().match(/firefox\\/(\\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof B<\"u\"&&B.userAgent&&B.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/)}function Am(t){if(t[0]=(this.useColors?\"%c\":\"\")+this.namespace+(this.useColors?\" %c\":\" \")+t[0]+(this.useColors?\"%c \":\" \")+\"+\"+Rn.exports.humanize(this.diff),!this.useColors)return;let e=\"color: \"+this.color;t.splice(1,0,e,\"color: inherit\");let r=0,i=0;t[0].replace(/%[a-zA-Z%]/g,n=>{n!==\"%%\"&&(r++,n===\"%c\"&&(i=r));}),t.splice(i,0,e);}xe.log=console.debug||console.log||(()=>{});function Im(t){try{t?xe.storage.setItem(\"debug\",t):xe.storage.removeItem(\"debug\");}catch{}}function Tm(){let t;try{t=xe.storage.getItem(\"debug\");}catch{}return !t&&typeof P<\"u\"&&\"env\"in P&&(t=P.env.DEBUG),t}function Rm(){try{return localStorage}catch{}}Rn.exports=bd()(xe);var{formatters:Cm}=Rn.exports;Cm.j=function(t){try{return JSON.stringify(t)}catch(e){return \"[UnexpectedJSONParseError]: \"+e.message}};});var md=M((MP,_d)=>{v();m();_();var Bm=fd(),{EventEmitter:Pm}=(ir(),X(rr)),wd=hd(),V=Fo(),D=ot()(\"mqtt-packet:parser\"),Wo=class t extends Pm{constructor(){super(),this.parser=this.constructor.parser;}static parser(e){return this instanceof t?(this.settings=e||{},this._states=[\"_parseHeader\",\"_parseLength\",\"_parsePayload\",\"_newPacket\"],this._resetState(),this):new t().parser(e)}_resetState(){D(\"_resetState: resetting packet, error, _list, and _stateCounter\"),this.packet=new wd,this.error=null,this._list=Bm(),this._stateCounter=0;}parse(e){for(this.error&&this._resetState(),this._list.append(e),D(\"parse: current state: %s\",this._states[this._stateCounter]);(this.packet.length!==-1||this._list.length>0)&&this[this._states[this._stateCounter]]()&&!this.error;)this._stateCounter++,D(\"parse: state complete. _stateCounter is now: %d\",this._stateCounter),D(\"parse: packet.length: %d, buffer list length: %d\",this.packet.length,this._list.length),this._stateCounter>=this._states.length&&(this._stateCounter=0);return D(\"parse: exited while loop. packet: %d, buffer list length: %d\",this.packet.length,this._list.length),this._list.length}_parseHeader(){let e=this._list.readUInt8(0),r=e>>V.CMD_SHIFT;this.packet.cmd=V.types[r];let i=e&15,n=V.requiredHeaderFlags[r];return n!=null&&i!==n?this._emitError(new Error(V.requiredHeaderFlagsErrors[r])):(this.packet.retain=(e&V.RETAIN_MASK)!==0,this.packet.qos=e>>V.QOS_SHIFT&V.QOS_MASK,this.packet.qos>2?this._emitError(new Error(\"Packet must not have both QoS bits set to 1\")):(this.packet.dup=(e&V.DUP_MASK)!==0,D(\"_parseHeader: packet: %o\",this.packet),this._list.consume(1),!0))}_parseLength(){let e=this._parseVarByteNum(!0);return e&&(this.packet.length=e.value,this._list.consume(e.bytes)),D(\"_parseLength %d\",e.value),!!e}_parsePayload(){D(\"_parsePayload: payload %O\",this._list);let e=!1;if(this.packet.length===0||this._list.length>=this.packet.length){switch(this._pos=0,this.packet.cmd){case\"connect\":this._parseConnect();break;case\"connack\":this._parseConnack();break;case\"publish\":this._parsePublish();break;case\"puback\":case\"pubrec\":case\"pubrel\":case\"pubcomp\":this._parseConfirmation();break;case\"subscribe\":this._parseSubscribe();break;case\"suback\":this._parseSuback();break;case\"unsubscribe\":this._parseUnsubscribe();break;case\"unsuback\":this._parseUnsuback();break;case\"pingreq\":case\"pingresp\":break;case\"disconnect\":this._parseDisconnect();break;case\"auth\":this._parseAuth();break;default:this._emitError(new Error(\"Not supported\"));}e=!0;}return D(\"_parsePayload complete result: %s\",e),e}_parseConnect(){D(\"_parseConnect\");let e,r,i,n,o={},s=this.packet,a=this._parseString();if(a===null)return this._emitError(new Error(\"Cannot parse protocolId\"));if(a!==\"MQTT\"&&a!==\"MQIsdp\")return this._emitError(new Error(\"Invalid protocolId\"));if(s.protocolId=a,this._pos>=this._list.length)return this._emitError(new Error(\"Packet too short\"));if(s.protocolVersion=this._list.readUInt8(this._pos),s.protocolVersion>=128&&(s.bridgeMode=!0,s.protocolVersion=s.protocolVersion-128),s.protocolVersion!==3&&s.protocolVersion!==4&&s.protocolVersion!==5)return this._emitError(new Error(\"Invalid protocol version\"));if(this._pos++,this._pos>=this._list.length)return this._emitError(new Error(\"Packet too short\"));if(this._list.readUInt8(this._pos)&1)return this._emitError(new Error(\"Connect flag bit 0 must be 0, but got 1\"));o.username=this._list.readUInt8(this._pos)&V.USERNAME_MASK,o.password=this._list.readUInt8(this._pos)&V.PASSWORD_MASK,o.will=this._list.readUInt8(this._pos)&V.WILL_FLAG_MASK;let u=!!(this._list.readUInt8(this._pos)&V.WILL_RETAIN_MASK),c=(this._list.readUInt8(this._pos)&V.WILL_QOS_MASK)>>V.WILL_QOS_SHIFT;if(o.will)s.will={},s.will.retain=u,s.will.qos=c;else {if(u)return this._emitError(new Error(\"Will Retain Flag must be set to zero when Will Flag is set to 0\"));if(c)return this._emitError(new Error(\"Will QoS must be set to zero when Will Flag is set to 0\"))}if(s.clean=(this._list.readUInt8(this._pos)&V.CLEAN_SESSION_MASK)!==0,this._pos++,s.keepalive=this._parseNum(),s.keepalive===-1)return this._emitError(new Error(\"Packet too short\"));if(s.protocolVersion===5){let d=this._parseProperties();Object.getOwnPropertyNames(d).length&&(s.properties=d);}let h=this._parseString();if(h===null)return this._emitError(new Error(\"Packet too short\"));if(s.clientId=h,D(\"_parseConnect: packet.clientId: %s\",s.clientId),o.will){if(s.protocolVersion===5){let d=this._parseProperties();Object.getOwnPropertyNames(d).length&&(s.will.properties=d);}if(e=this._parseString(),e===null)return this._emitError(new Error(\"Cannot parse will topic\"));if(s.will.topic=e,D(\"_parseConnect: packet.will.topic: %s\",s.will.topic),r=this._parseBuffer(),r===null)return this._emitError(new Error(\"Cannot parse will payload\"));s.will.payload=r,D(\"_parseConnect: packet.will.paylaod: %s\",s.will.payload);}if(o.username){if(n=this._parseString(),n===null)return this._emitError(new Error(\"Cannot parse username\"));s.username=n,D(\"_parseConnect: packet.username: %s\",s.username);}if(o.password){if(i=this._parseBuffer(),i===null)return this._emitError(new Error(\"Cannot parse password\"));s.password=i;}return this.settings=s,D(\"_parseConnect: complete\"),s}_parseConnack(){D(\"_parseConnack\");let e=this.packet;if(this._list.length<1)return null;let r=this._list.readUInt8(this._pos++);if(r>1)return this._emitError(new Error(\"Invalid connack flags, bits 7-1 must be set to 0\"));if(e.sessionPresent=!!(r&V.SESSIONPRESENT_MASK),this.settings.protocolVersion===5)this._list.length>=2?e.reasonCode=this._list.readUInt8(this._pos++):e.reasonCode=0;else {if(this._list.length<2)return null;e.returnCode=this._list.readUInt8(this._pos++);}if(e.returnCode===-1||e.reasonCode===-1)return this._emitError(new Error(\"Cannot parse return code\"));if(this.settings.protocolVersion===5){let i=this._parseProperties();Object.getOwnPropertyNames(i).length&&(e.properties=i);}D(\"_parseConnack: complete\");}_parsePublish(){D(\"_parsePublish\");let e=this.packet;if(e.topic=this._parseString(),e.topic===null)return this._emitError(new Error(\"Cannot parse topic\"));if(!(e.qos>0&&!this._parseMessageId())){if(this.settings.protocolVersion===5){let r=this._parseProperties();Object.getOwnPropertyNames(r).length&&(e.properties=r);}e.payload=this._list.slice(this._pos,e.length),D(\"_parsePublish: payload from buffer list: %o\",e.payload);}}_parseSubscribe(){D(\"_parseSubscribe\");let e=this.packet,r,i,n,o,s,a,u;if(e.subscriptions=[],!!this._parseMessageId()){if(this.settings.protocolVersion===5){let c=this._parseProperties();Object.getOwnPropertyNames(c).length&&(e.properties=c);}if(e.length<=0)return this._emitError(new Error(\"Malformed subscribe, no payload specified\"));for(;this._pos=e.length)return this._emitError(new Error(\"Malformed Subscribe Payload\"));if(i=this._parseByte(),this.settings.protocolVersion===5){if(i&192)return this._emitError(new Error(\"Invalid subscribe topic flag bits, bits 7-6 must be 0\"))}else if(i&252)return this._emitError(new Error(\"Invalid subscribe topic flag bits, bits 7-2 must be 0\"));if(n=i&V.SUBSCRIBE_OPTIONS_QOS_MASK,n>2)return this._emitError(new Error(\"Invalid subscribe QoS, must be <= 2\"));if(a=(i>>V.SUBSCRIBE_OPTIONS_NL_SHIFT&V.SUBSCRIBE_OPTIONS_NL_MASK)!==0,s=(i>>V.SUBSCRIBE_OPTIONS_RAP_SHIFT&V.SUBSCRIBE_OPTIONS_RAP_MASK)!==0,o=i>>V.SUBSCRIBE_OPTIONS_RH_SHIFT&V.SUBSCRIBE_OPTIONS_RH_MASK,o>2)return this._emitError(new Error(\"Invalid retain handling, must be <= 2\"));u={topic:r,qos:n},this.settings.protocolVersion===5?(u.nl=a,u.rap=s,u.rh=o):this.settings.bridgeMode&&(u.rh=0,u.rap=!0,u.nl=!0),D(\"_parseSubscribe: push subscription `%s` to subscription\",u),e.subscriptions.push(u);}}}_parseSuback(){D(\"_parseSuback\");let e=this.packet;if(this.packet.granted=[],!!this._parseMessageId()){if(this.settings.protocolVersion===5){let r=this._parseProperties();Object.getOwnPropertyNames(r).length&&(e.properties=r);}if(e.length<=0)return this._emitError(new Error(\"Malformed suback, no payload specified\"));for(;this._pos2&&r!==128)return this._emitError(new Error(\"Invalid suback QoS, must be 0, 1, 2 or 128\"));this.packet.granted.push(r);}}}_parseUnsubscribe(){D(\"_parseUnsubscribe\");let e=this.packet;if(e.unsubscriptions=[],!!this._parseMessageId()){if(this.settings.protocolVersion===5){let r=this._parseProperties();Object.getOwnPropertyNames(r).length&&(e.properties=r);}if(e.length<=0)return this._emitError(new Error(\"Malformed unsubscribe, no payload specified\"));for(;this._pos2){switch(e.reasonCode=this._parseByte(),this.packet.cmd){case\"puback\":case\"pubrec\":if(!V.MQTT5_PUBACK_PUBREC_CODES[e.reasonCode])return this._emitError(new Error(\"Invalid \"+this.packet.cmd+\" reason code\"));break;case\"pubrel\":case\"pubcomp\":if(!V.MQTT5_PUBREL_PUBCOMP_CODES[e.reasonCode])return this._emitError(new Error(\"Invalid \"+this.packet.cmd+\" reason code\"));break}D(\"_parseConfirmation: packet.reasonCode `%d`\",e.reasonCode);}else e.reasonCode=0;if(e.length>3){let r=this._parseProperties();Object.getOwnPropertyNames(r).length&&(e.properties=r);}}return !0}_parseDisconnect(){let e=this.packet;if(D(\"_parseDisconnect\"),this.settings.protocolVersion===5){this._list.length>0?(e.reasonCode=this._parseByte(),V.MQTT5_DISCONNECT_CODES[e.reasonCode]||this._emitError(new Error(\"Invalid disconnect reason code\"))):e.reasonCode=0;let r=this._parseProperties();Object.getOwnPropertyNames(r).length&&(e.properties=r);}return D(\"_parseDisconnect result: true\"),!0}_parseAuth(){D(\"_parseAuth\");let e=this.packet;if(this.settings.protocolVersion!==5)return this._emitError(new Error(\"Not supported auth packet for this version MQTT\"));if(e.reasonCode=this._parseByte(),!V.MQTT5_AUTH_CODES[e.reasonCode])return this._emitError(new Error(\"Invalid auth reason code\"));let r=this._parseProperties();return Object.getOwnPropertyNames(r).length&&(e.properties=r),D(\"_parseAuth: result: true\"),!0}_parseMessageId(){let e=this.packet;return e.messageId=this._parseNum(),e.messageId===null?(this._emitError(new Error(\"Cannot parse messageId\")),!1):(D(\"_parseMessageId: packet.messageId %d\",e.messageId),!0)}_parseString(e){let r=this._parseNum(),i=r+this._pos;if(r===-1||i>this._list.length||i>this.packet.length)return null;let n=this._list.toString(\"utf8\",this._pos,i);return this._pos+=r,D(\"_parseString: result: %s\",n),n}_parseStringPair(){return D(\"_parseStringPair\"),{name:this._parseString(),value:this._parseString()}}_parseBuffer(){let e=this._parseNum(),r=e+this._pos;if(e===-1||r>this._list.length||r>this.packet.length)return null;let i=this._list.slice(this._pos,r);return this._pos+=e,D(\"_parseBuffer: result: %o\",i),i}_parseNum(){if(this._list.length-this._pos<2)return -1;let e=this._list.readUInt16BE(this._pos);return this._pos+=2,D(\"_parseNum: result: %s\",e),e}_parse4ByteNum(){if(this._list.length-this._pos<4)return -1;let e=this._list.readUInt32BE(this._pos);return this._pos+=4,D(\"_parse4ByteNum: result: %s\",e),e}_parseVarByteNum(e){D(\"_parseVarByteNum\");let r=4,i=0,n=1,o=0,s=!1,a,u=this._pos?this._pos:0;for(;i=i&&this._emitError(new Error(\"Invalid variable byte integer\")),u&&(this._pos+=i),s?e?s={bytes:i,value:o}:s=o:s=!1,D(\"_parseVarByteNum: result: %o\",s),s}_parseByte(){let e;return this._pos{v();m();_();var{Buffer:vi}=(ye(),X(_e)),Om=65536,vd={},km=vi.isBuffer(vi.from([1,2]).subarray(0,1));function Ed(t){let e=vi.allocUnsafe(2);return e.writeUInt8(t>>8,0),e.writeUInt8(t&255,0+1),e}function xm(){for(let t=0;t0&&(r=r|128),n.writeUInt8(r,i++);while(t>0&&i<4);return t>0&&(i=0),km?n.subarray(0,i):n.slice(0,i)}function Lm(t){let e=vi.allocUnsafe(4);return e.writeUInt32BE(t,0),e}Sd.exports={cache:vd,generateCache:xm,generateNumber:Ed,genBufVariableByteInt:Mm,generate4ByteBuffer:Lm};});var Id=M((eO,$o)=>{v();m();_();typeof P>\"u\"||!P.version||P.version.indexOf(\"v0.\")===0||P.version.indexOf(\"v1.\")===0&&P.version.indexOf(\"v1.8.\")!==0?$o.exports={nextTick:Um}:$o.exports=P;function Um(t,e,r,i){if(typeof t!=\"function\")throw new TypeError('\"callback\" argument must be a function');var n=arguments.length,o,s;switch(n){case 0:case 1:return P.nextTick(t);case 2:return P.nextTick(function(){t.call(null,e);});case 3:return P.nextTick(function(){t.call(null,e,r);});case 4:return P.nextTick(function(){t.call(null,e,r,i);});default:for(o=new Array(n-1),s=0;s{v();m();_();var j=Fo(),{Buffer:q}=(ye(),X(_e)),Nm=q.allocUnsafe(0),qm=q.from([0]),Ei=Ad(),Dm=Id().nextTick,qe=ot()(\"mqtt-packet:writeToStream\"),Cn=Ei.cache,jm=Ei.generateNumber,Fm=Ei.generateCache,Ho=Ei.genBufVariableByteInt,Wm=Ei.generate4ByteBuffer,Ie=Vo,Bn=!0;function Od(t,e,r){switch(qe(\"generate called\"),e.cork&&(e.cork(),Dm($m,e)),Bn&&(Bn=!1,Fm()),qe(\"generate: packet.cmd: %s\",t.cmd),t.cmd){case\"connect\":return Hm(t,e);case\"connack\":return Vm(t,e,r);case\"publish\":return zm(t,e,r);case\"puback\":case\"pubrec\":case\"pubrel\":case\"pubcomp\":return Km(t,e,r);case\"subscribe\":return Gm(t,e,r);case\"suback\":return Qm(t,e,r);case\"unsubscribe\":return Ym(t,e,r);case\"unsuback\":return Jm(t,e,r);case\"pingreq\":case\"pingresp\":return Xm(t,e);case\"disconnect\":return Zm(t,e,r);case\"auth\":return e1(t,e,r);default:return e.destroy(new Error(\"Unknown command\")),!1}}Object.defineProperty(Od,\"cacheNumbers\",{get(){return Ie===Vo},set(t){t?((!Cn||Object.keys(Cn).length===0)&&(Bn=!0),Ie=Vo):(Bn=!1,Ie=t1);}});function $m(t){t.uncork();}function Hm(t,e,r){let i=t||{},n=i.protocolId||\"MQTT\",o=i.protocolVersion||4,s=i.will,a=i.clean,u=i.keepalive||0,c=i.clientId||\"\",h=i.username,d=i.password,g=i.properties;a===void 0&&(a=!0);let y=0;if(!n||typeof n!=\"string\"&&!q.isBuffer(n))return e.destroy(new Error(\"Invalid protocolId\")),!1;if(y+=n.length+2,o!==3&&o!==4&&o!==5)return e.destroy(new Error(\"Invalid protocol version\")),!1;if(y+=1,(typeof c==\"string\"||q.isBuffer(c))&&(c||o>=4)&&(c||a))y+=q.byteLength(c)+2;else {if(o<4)return e.destroy(new Error(\"clientId must be supplied before 3.1.1\")),!1;if(a*1===0)return e.destroy(new Error(\"clientId must be given if cleanSession set to 0\")),!1}if(typeof u!=\"number\"||u<0||u>65535||u%1!==0)return e.destroy(new Error(\"Invalid keepalive\")),!1;y+=2,y+=1;let w,E;if(o===5){if(w=Ft(e,g),!w)return !1;y+=w.length;}if(s){if(typeof s!=\"object\")return e.destroy(new Error(\"Invalid will\")),!1;if(!s.topic||typeof s.topic!=\"string\")return e.destroy(new Error(\"Invalid will topic\")),!1;if(y+=q.byteLength(s.topic)+2,y+=2,s.payload)if(s.payload.length>=0)typeof s.payload==\"string\"?y+=q.byteLength(s.payload):y+=s.payload.length;else return e.destroy(new Error(\"Invalid will payload\")),!1;if(E={},o===5){if(E=Ft(e,s.properties),!E)return !1;y+=E.length;}}let S=!1;if(h!=null)if(Pd(h))S=!0,y+=q.byteLength(h)+2;else return e.destroy(new Error(\"Invalid username\")),!1;if(d!=null){if(!S)return e.destroy(new Error(\"Username is required to use password\")),!1;if(Pd(d))y+=kd(d)+2;else return e.destroy(new Error(\"Invalid password\")),!1}e.write(j.CONNECT_HEADER),De(e,y),Gr(e,n),i.bridgeMode&&(o+=128),e.write(o===131?j.VERSION131:o===132?j.VERSION132:o===4?j.VERSION4:o===5?j.VERSION5:j.VERSION3);let I=0;return I|=h!=null?j.USERNAME_MASK:0,I|=d!=null?j.PASSWORD_MASK:0,I|=s&&s.retain?j.WILL_RETAIN_MASK:0,I|=s&&s.qos?s.qos<0&&Ie(e,c),g?.write(),qe(\"publish: payload: %o\",u),e.write(u)}function Km(t,e,r){let i=r?r.protocolVersion:4,n=t||{},o=n.cmd||\"puback\",s=n.messageId,a=n.dup&&o===\"pubrel\"?j.DUP_MASK:0,u=0,c=n.reasonCode,h=n.properties,d=i===5?3:2;if(o===\"pubrel\"&&(u=1),typeof s!=\"number\")return e.destroy(new Error(\"Invalid messageId\")),!1;let g=null;if(i===5&&typeof h==\"object\"){if(g=Si(e,h,r,d),!g)return !1;d+=g.length;}return e.write(j.ACKS[o][u][a][0]),d===3&&(d+=c!==0?1:-1),De(e,d),Ie(e,s),i===5&&d!==2&&e.write(q.from([c])),g!==null?g.write():d===4&&e.write(q.from([0])),!0}function Gm(t,e,r){qe(\"subscribe: packet: \");let i=r?r.protocolVersion:4,n=t||{},o=n.dup?j.DUP_MASK:0,s=n.messageId,a=n.subscriptions,u=n.properties,c=0;if(typeof s!=\"number\")return e.destroy(new Error(\"Invalid messageId\")),!1;c+=2;let h=null;if(i===5){if(h=Ft(e,u),!h)return !1;c+=h.length;}if(typeof a==\"object\"&&a.length)for(let g=0;g2)return e.destroy(new Error(\"Invalid subscriptions - invalid Retain Handling\")),!1}c+=q.byteLength(y)+2+1;}else return e.destroy(new Error(\"Invalid subscriptions\")),!1;qe(\"subscribe: writing to stream: %o\",j.SUBSCRIBE_HEADER),e.write(j.SUBSCRIBE_HEADER[1][o?1:0][0]),De(e,c),Ie(e,s),h!==null&&h.write();let d=!0;for(let g of a){let y=g.topic,w=g.qos,E=+g.nl,S=+g.rap,I=g.rh,C;yr(e,y),C=j.SUBSCRIBE_OPTIONS_QOS[w],i===5&&(C|=E?j.SUBSCRIBE_OPTIONS_NL:0,C|=S?j.SUBSCRIBE_OPTIONS_RAP:0,C|=I?j.SUBSCRIBE_OPTIONS_RH[I]:0),d=e.write(q.from([C]));}return d}function Qm(t,e,r){let i=r?r.protocolVersion:4,n=t||{},o=n.messageId,s=n.granted,a=n.properties,u=0;if(typeof o!=\"number\")return e.destroy(new Error(\"Invalid messageId\")),!1;if(u+=2,typeof s==\"object\"&&s.length)for(let h=0;hj.VARBYTEINT_MAX)return t.destroy(new Error(`Invalid variable byte integer: ${e}`)),!1;let r=Td[e];return r||(r=Ho(e),e<16384&&(Td[e]=r)),qe(\"writeVarByteInt: writing to stream: %o\",r),t.write(r)}function yr(t,e){let r=q.byteLength(e);return Ie(t,r),qe(\"writeString: %s\",e),t.write(e,\"utf8\")}function Rd(t,e,r){yr(t,e),yr(t,r);}function Vo(t,e){return qe(\"writeNumberCached: number: %d\",e),qe(\"writeNumberCached: %o\",Cn[e]),t.write(Cn[e])}function t1(t,e){let r=jm(e);return qe(\"writeNumberGenerated: %o\",r),t.write(r)}function r1(t,e){let r=Wm(e);return qe(\"write4ByteNumber: %o\",r),t.write(r)}function Gr(t,e){typeof e==\"string\"?yr(t,e):e?(Ie(t,e.length),t.write(e)):Ie(t,0);}function Ft(t,e){if(typeof e!=\"object\"||e.length!=null)return {length:1,write(){Bd(t,{},0);}};let r=0;function i(o,s){let a=j.propertiesTypes[o],u=0;switch(a){case\"byte\":{if(typeof s!=\"boolean\")return t.destroy(new Error(`Invalid ${o}: ${s}`)),!1;u+=1+1;break}case\"int8\":{if(typeof s!=\"number\"||s<0||s>255)return t.destroy(new Error(`Invalid ${o}: ${s}`)),!1;u+=1+1;break}case\"binary\":{if(s&&s===null)return t.destroy(new Error(`Invalid ${o}: ${s}`)),!1;u+=1+q.byteLength(s)+2;break}case\"int16\":{if(typeof s!=\"number\"||s<0||s>65535)return t.destroy(new Error(`Invalid ${o}: ${s}`)),!1;u+=1+2;break}case\"int32\":{if(typeof s!=\"number\"||s<0||s>4294967295)return t.destroy(new Error(`Invalid ${o}: ${s}`)),!1;u+=1+4;break}case\"var\":{if(typeof s!=\"number\"||s<0||s>268435455)return t.destroy(new Error(`Invalid ${o}: ${s}`)),!1;u+=1+q.byteLength(Ho(s));break}case\"string\":{if(typeof s!=\"string\")return t.destroy(new Error(`Invalid ${o}: ${s}`)),!1;u+=1+2+q.byteLength(s.toString());break}case\"pair\":{if(typeof s!=\"object\")return t.destroy(new Error(`Invalid ${o}: ${s}`)),!1;u+=Object.getOwnPropertyNames(s).reduce((c,h)=>{let d=s[h];return Array.isArray(d)?c+=d.reduce((g,y)=>(g+=1+2+q.byteLength(h.toString())+2+q.byteLength(y.toString()),g),0):c+=1+2+q.byteLength(h.toString())+2+q.byteLength(s[h].toString()),c},0);break}default:return t.destroy(new Error(`Invalid property ${o}: ${s}`)),!1}return u}if(e)for(let o in e){let s=0,a=0,u=e[o];if(Array.isArray(u))for(let c=0;co;){let a=n.shift();if(a&&e[a])delete e[a],s=Ft(t,e);else return !1}return s}function Cd(t,e,r){switch(j.propertiesTypes[e]){case\"byte\":{t.write(q.from([j.properties[e]])),t.write(q.from([+r]));break}case\"int8\":{t.write(q.from([j.properties[e]])),t.write(q.from([r]));break}case\"binary\":{t.write(q.from([j.properties[e]])),Gr(t,r);break}case\"int16\":{t.write(q.from([j.properties[e]])),Ie(t,r);break}case\"int32\":{t.write(q.from([j.properties[e]])),r1(t,r);break}case\"var\":{t.write(q.from([j.properties[e]])),De(t,r);break}case\"string\":{t.write(q.from([j.properties[e]])),yr(t,r);break}case\"pair\":{Object.getOwnPropertyNames(r).forEach(n=>{let o=r[n];Array.isArray(o)?o.forEach(s=>{t.write(q.from([j.properties[e]])),Rd(t,n.toString(),s.toString());}):(t.write(q.from([j.properties[e]])),Rd(t,n.toString(),o.toString()));});break}default:return t.destroy(new Error(`Invalid property ${e} value: ${r}`)),!1}}function Bd(t,e,r){De(t,r);for(let i in e)if(Object.prototype.hasOwnProperty.call(e,i)&&e[i]!==null){let n=e[i];if(Array.isArray(n))for(let o=0;o{v();m();_();var i1=zo(),{EventEmitter:n1}=(ir(),X(rr)),{Buffer:Md}=(ye(),X(_e));function s1(t,e){let r=new Ko;return i1(t,r,e),r.concat()}var Ko=class extends n1{constructor(){super(),this._array=new Array(20),this._i=0;}write(e){return this._array[this._i++]=e,!0}concat(){let e=0,r=new Array(this._array.length),i=this._array,n=0,o;for(o=0;o{v();m();_();Pn.parser=md().parser;Pn.generate=Ud();Pn.writeToStream=zo();});var Yo=M(Qo=>{v();m();_();Object.defineProperty(Qo,\"__esModule\",{value:!0});var Go=class{constructor(){this.nextId=Math.max(1,Math.floor(Math.random()*65535));}allocate(){let e=this.nextId++;return this.nextId===65536&&(this.nextId=1),e}getLastAllocated(){return this.nextId===1?65535:this.nextId-1}register(e){return !0}deallocate(e){}clear(){}};Qo.default=Go;});var Dd=M((YO,qd)=>{v();m();_();qd.exports=o1;function Qr(t){return t instanceof x?x.from(t):new t.constructor(t.buffer.slice(),t.byteOffset,t.length)}function o1(t){if(t=t||{},t.circles)return a1(t);return t.proto?i:r;function e(n,o){for(var s=Object.keys(n),a=new Array(s.length),u=0;u{v();m();_();jd.exports=Dd()();});var $d=M(Yr=>{v();m();_();Object.defineProperty(Yr,\"__esModule\",{value:!0});Yr.validateTopics=Yr.validateTopic=void 0;function Wd(t){let e=t.split(\"/\");for(let r=0;r{v();m();_();Object.defineProperty(Xo,\"__esModule\",{value:!0});var u1=Dt(),f1={objectMode:!0},c1={clean:!0},Jo=class{constructor(e){this.options=e||{},this.options=Object.assign(Object.assign({},c1),e),this._inflights=new Map;}put(e,r){return this._inflights.set(e.messageId,e),r&&r(),this}createStream(){let e=new u1.Readable(f1),r=[],i=!1,n=0;return this._inflights.forEach((o,s)=>{r.push(o);}),e._read=()=>{!i&&n{if(!i)return i=!0,setTimeout(()=>{e.emit(\"close\");},0),e},e}del(e,r){let i=this._inflights.get(e.messageId);return i?(this._inflights.delete(e.messageId),r(null,i)):r&&r(new Error(\"missing packet\")),this}get(e,r){let i=this._inflights.get(e.messageId);return i?r(null,i):r&&r(new Error(\"missing packet\")),this}close(e){this.options.clean&&(this._inflights=null),e&&e();}};Xo.default=Jo;});var Vd=M(ea=>{v();m();_();Object.defineProperty(ea,\"__esModule\",{value:!0});var Hd=[0,16,128,131,135,144,145,151,153],h1=(t,e,r)=>{t.log(\"handlePublish: packet %o\",e),r=typeof r<\"u\"?r:t.noop;let i=e.topic.toString(),n=e.payload,{qos:o}=e,{messageId:s}=e,{options:a}=t;if(t.options.protocolVersion===5){let u;if(e.properties&&(u=e.properties.topicAlias),typeof u<\"u\")if(i.length===0)if(u>0&&u<=65535){let c=t.topicAliasRecv.getTopicByAlias(u);if(c)i=c,t.log(\"handlePublish :: topic complemented by alias. topic: %s - alias: %d\",i,u);else {t.log(\"handlePublish :: unregistered topic alias. alias: %d\",u),t.emit(\"error\",new Error(\"Received unregistered Topic Alias\"));return}}else {t.log(\"handlePublish :: topic alias out of range. alias: %d\",u),t.emit(\"error\",new Error(\"Received Topic Alias is out of range\"));return}else if(t.topicAliasRecv.put(i,u))t.log(\"handlePublish :: registered topic: %s - alias: %d\",i,u);else {t.log(\"handlePublish :: topic alias out of range. alias: %d\",u),t.emit(\"error\",new Error(\"Received Topic Alias is out of range\"));return}}switch(t.log(\"handlePublish: qos %d\",o),o){case 2:{a.customHandleAcks(i,n,e,(u,c)=>{if(typeof u==\"number\"&&(c=u,u=null),u)return t.emit(\"error\",u);if(Hd.indexOf(c)===-1)return t.emit(\"error\",new Error(\"Wrong reason code for pubrec\"));c?t._sendPacket({cmd:\"pubrec\",messageId:s,reasonCode:c},r):t.incomingStore.put(e,()=>{t._sendPacket({cmd:\"pubrec\",messageId:s},r);});});break}case 1:{a.customHandleAcks(i,n,e,(u,c)=>{if(typeof u==\"number\"&&(c=u,u=null),u)return t.emit(\"error\",u);if(Hd.indexOf(c)===-1)return t.emit(\"error\",new Error(\"Wrong reason code for puback\"));c||t.emit(\"message\",i,n,e),t.handleMessage(e,h=>{if(h)return r&&r(h);t._sendPacket({cmd:\"puback\",messageId:s,reasonCode:c},r);});});break}case 0:t.emit(\"message\",i,n,e),t.handleMessage(e,r);break;default:t.log(\"handlePublish: unknown QoS. Doing nothing.\");break}};ea.default=h1;});var Jr=M(Wt=>{v();m();_();Object.defineProperty(Wt,\"__esModule\",{value:!0});Wt.nextTick=Wt.applyMixin=Wt.ErrorWithReasonCode=void 0;var ta=class t extends Error{constructor(e,r){super(e),this.code=r,Object.setPrototypeOf(this,t.prototype),Object.getPrototypeOf(this).name=\"ErrorWithReasonCode\";}};Wt.ErrorWithReasonCode=ta;function d1(t,e,r=!1){var i;let n=[e];for(;;){let o=n[0],s=Object.getPrototypeOf(o);if(s?.prototype)n.unshift(s);else break}for(let o of n)for(let s of Object.getOwnPropertyNames(o.prototype))(r||s!==\"constructor\")&&Object.defineProperty(t.prototype,s,(i=Object.getOwnPropertyDescriptor(o.prototype,s))!==null&&i!==void 0?i:Object.create(null));}Wt.applyMixin=d1;Wt.nextTick=typeof(P===null||P===void 0?void 0:P.nextTick)==\"function\"?P.nextTick:t=>{setTimeout(t,0);};});var Ai=M(br=>{v();m();_();Object.defineProperty(br,\"__esModule\",{value:!0});br.ReasonCodes=void 0;br.ReasonCodes={0:\"\",1:\"Unacceptable protocol version\",2:\"Identifier rejected\",3:\"Server unavailable\",4:\"Bad username or password\",5:\"Not authorized\",16:\"No matching subscribers\",17:\"No subscription existed\",128:\"Unspecified error\",129:\"Malformed Packet\",130:\"Protocol Error\",131:\"Implementation specific error\",132:\"Unsupported Protocol Version\",133:\"Client Identifier not valid\",134:\"Bad User Name or Password\",135:\"Not authorized\",136:\"Server unavailable\",137:\"Server busy\",138:\"Banned\",139:\"Server shutting down\",140:\"Bad authentication method\",141:\"Keep Alive timeout\",142:\"Session taken over\",143:\"Topic Filter invalid\",144:\"Topic Name invalid\",145:\"Packet identifier in use\",146:\"Packet Identifier not found\",147:\"Receive Maximum exceeded\",148:\"Topic Alias invalid\",149:\"Packet too large\",150:\"Message rate too high\",151:\"Quota exceeded\",152:\"Administrative action\",153:\"Payload format invalid\",154:\"Retain not supported\",155:\"QoS not supported\",156:\"Use another server\",157:\"Server moved\",158:\"Shared Subscriptions not supported\",159:\"Connection rate exceeded\",160:\"Maximum connect time\",161:\"Subscription Identifiers not supported\",162:\"Wildcard Subscriptions not supported\"};var p1=(t,e)=>{let{messageId:r}=e,i=e.cmd,n=null,o=t.outgoing[r]?t.outgoing[r].cb:null,s;if(!o){t.log(\"_handleAck :: Server sent an ack in error. Ignoring.\");return}switch(t.log(\"_handleAck :: packet type\",i),i){case\"pubcomp\":case\"puback\":{let a=e.reasonCode;a&&a>0&&a!==16?(s=new Error(`Publish error: ${br.ReasonCodes[a]}`),s.code=a,t._removeOutgoingAndStoreMessage(r,()=>{o(s,e);})):t._removeOutgoingAndStoreMessage(r,o);break}case\"pubrec\":{n={cmd:\"pubrel\",qos:2,messageId:r};let a=e.reasonCode;a&&a>0&&a!==16?(s=new Error(`Publish error: ${br.ReasonCodes[a]}`),s.code=a,t._removeOutgoingAndStoreMessage(r,()=>{o(s,e);})):t._sendPacket(n);break}case\"suback\":{delete t.outgoing[r],t.messageIdProvider.deallocate(r);let a=e.granted;for(let u=0;u{delete t._resubscribeTopics[h];});}delete t.messageIdToTopic[r],t._invokeStoreProcessingQueue(),o(null,e);break}case\"unsuback\":{delete t.outgoing[r],t.messageIdProvider.deallocate(r),t._invokeStoreProcessingQueue(),o(null);break}default:t.emit(\"error\",new Error(\"unrecognized packet type\"));}t.disconnecting&&Object.keys(t.outgoing).length===0&&t.emit(\"outgoingEmpty\");};br.default=p1;});var Kd=M(ra=>{v();m();_();Object.defineProperty(ra,\"__esModule\",{value:!0});var zd=Jr(),g1=Ai(),y1=(t,e)=>{let{options:r}=t,i=r.protocolVersion,n=i===5?e.reasonCode:e.returnCode;if(i!==5){let o=new zd.ErrorWithReasonCode(`Protocol error: Auth packets are only supported in MQTT 5. Your version:${i}`,n);t.emit(\"error\",o);return}t.handleAuth(e,(o,s)=>{if(o){t.emit(\"error\",o);return}if(n===24)t.reconnecting=!1,t._sendPacket(s);else {let a=new zd.ErrorWithReasonCode(`Connection refused: ${g1.ReasonCodes[n]}`,n);t.emit(\"error\",a);}});};ra.default=y1;});var Xd=M(kn=>{v();m();_();Object.defineProperty(kn,\"__esModule\",{value:!0});kn.LRUCache=void 0;var Ii=typeof performance==\"object\"&&performance&&typeof performance.now==\"function\"?performance:Date,Qd=new Set,ia=typeof P==\"object\"&&P?P:{},Yd=(t,e,r,i)=>{typeof ia.emitWarning==\"function\"?ia.emitWarning(t,e,r,i):console.error(`[${r}] ${e}: ${t}`);},On=globalThis.AbortController,Gd=globalThis.AbortSignal;if(typeof On>\"u\"){Gd=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(i,n){this._onabort.push(n);}},On=class{constructor(){e();}signal=new Gd;abort(i){if(!this.signal.aborted){this.signal.reason=i,this.signal.aborted=!0;for(let n of this.signal._onabort)n(i);this.signal.onabort?.(i);}}};let t=ia.env?.LRU_CACHE_IGNORE_AC_WARNING!==\"1\",e=()=>{t&&(t=!1,Yd(\"AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.\",\"NO_ABORT_CONTROLLER\",\"ENOTSUP\",e));};}var b1=t=>!Qd.has(t),$t=t=>t&&t===Math.floor(t)&&t>0&&isFinite(t),Jd=t=>$t(t)?t<=Math.pow(2,8)?Uint8Array:t<=Math.pow(2,16)?Uint16Array:t<=Math.pow(2,32)?Uint32Array:t<=Number.MAX_SAFE_INTEGER?Xr:null:null,Xr=class extends Array{constructor(e){super(e),this.fill(0);}},na=class t{heap;length;static#l=!1;static create(e){let r=Jd(e);if(!r)return [];t.#l=!0;let i=new t(e,r);return t.#l=!1,i}constructor(e,r){if(!t.#l)throw new TypeError(\"instantiate Stack using Stack.create(n)\");this.heap=new r(e),this.length=0;}push(e){this.heap[this.length++]=e;}pop(){return this.heap[--this.length]}},sa=class t{#l;#c;#p;#g;#B;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#i;#y;#n;#r;#e;#u;#h;#a;#s;#b;#o;#E;#S;#w;#_;#I;#f;static unsafeExposeInternals(e){return {starts:e.#S,ttls:e.#w,sizes:e.#E,keyMap:e.#n,keyList:e.#r,valList:e.#e,next:e.#u,prev:e.#h,get head(){return e.#a},get tail(){return e.#s},free:e.#b,isBackgroundFetch:r=>e.#t(r),backgroundFetch:(r,i,n,o)=>e.#k(r,i,n,o),moveToTail:r=>e.#C(r),indexes:r=>e.#m(r),rindexes:r=>e.#v(r),isStale:r=>e.#d(r)}}get max(){return this.#l}get maxSize(){return this.#c}get calculatedSize(){return this.#y}get size(){return this.#i}get fetchMethod(){return this.#B}get dispose(){return this.#p}get disposeAfter(){return this.#g}constructor(e){let{max:r=0,ttl:i,ttlResolution:n=1,ttlAutopurge:o,updateAgeOnGet:s,updateAgeOnHas:a,allowStale:u,dispose:c,disposeAfter:h,noDisposeOnSet:d,noUpdateTTL:g,maxSize:y=0,maxEntrySize:w=0,sizeCalculation:E,fetchMethod:S,noDeleteOnFetchRejection:I,noDeleteOnStaleGet:C,allowStaleOnFetchRejection:R,allowStaleOnFetchAbort:U,ignoreFetchAbort:N}=e;if(r!==0&&!$t(r))throw new TypeError(\"max option must be a nonnegative integer\");let W=r?Jd(r):Array;if(!W)throw new Error(\"invalid max value: \"+r);if(this.#l=r,this.#c=y,this.maxEntrySize=w||this.#c,this.sizeCalculation=E,this.sizeCalculation){if(!this.#c&&!this.maxEntrySize)throw new TypeError(\"cannot set sizeCalculation without setting maxSize or maxEntrySize\");if(typeof this.sizeCalculation!=\"function\")throw new TypeError(\"sizeCalculation set to non-function\")}if(S!==void 0&&typeof S!=\"function\")throw new TypeError(\"fetchMethod must be a function if specified\");if(this.#B=S,this.#I=!!S,this.#n=new Map,this.#r=new Array(r).fill(void 0),this.#e=new Array(r).fill(void 0),this.#u=new W(r),this.#h=new W(r),this.#a=0,this.#s=0,this.#b=na.create(r),this.#i=0,this.#y=0,typeof c==\"function\"&&(this.#p=c),typeof h==\"function\"?(this.#g=h,this.#o=[]):(this.#g=void 0,this.#o=void 0),this.#_=!!this.#p,this.#f=!!this.#g,this.noDisposeOnSet=!!d,this.noUpdateTTL=!!g,this.noDeleteOnFetchRejection=!!I,this.allowStaleOnFetchRejection=!!R,this.allowStaleOnFetchAbort=!!U,this.ignoreFetchAbort=!!N,this.maxEntrySize!==0){if(this.#c!==0&&!$t(this.#c))throw new TypeError(\"maxSize must be a positive integer if specified\");if(!$t(this.maxEntrySize))throw new TypeError(\"maxEntrySize must be a positive integer if specified\");this.#q();}if(this.allowStale=!!u,this.noDeleteOnStaleGet=!!C,this.updateAgeOnGet=!!s,this.updateAgeOnHas=!!a,this.ttlResolution=$t(n)||n===0?n:1,this.ttlAutopurge=!!o,this.ttl=i||0,this.ttl){if(!$t(this.ttl))throw new TypeError(\"ttl must be a positive integer if specified\");this.#x();}if(this.#l===0&&this.ttl===0&&this.#c===0)throw new TypeError(\"At least one of max, maxSize, or ttl is required\");if(!this.ttlAutopurge&&!this.#l&&!this.#c){let K=\"LRU_CACHE_UNBOUNDED\";b1(K)&&(Qd.add(K),Yd(\"TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.\",\"UnboundedCacheWarning\",K,t));}}getRemainingTTL(e){return this.#n.has(e)?1/0:0}#x(){let e=new Xr(this.#l),r=new Xr(this.#l);this.#w=e,this.#S=r,this.#M=(o,s,a=Ii.now())=>{if(r[o]=s!==0?a:0,e[o]=s,s!==0&&this.ttlAutopurge){let u=setTimeout(()=>{this.#d(o)&&this.delete(this.#r[o]);},s+1);u.unref&&u.unref();}},this.#T=o=>{r[o]=e[o]!==0?Ii.now():0;},this.#A=(o,s)=>{if(e[s]){let a=e[s],u=r[s];o.ttl=a,o.start=u,o.now=i||n();let c=o.now-u;o.remainingTTL=a-c;}};let i=0,n=()=>{let o=Ii.now();if(this.ttlResolution>0){i=o;let s=setTimeout(()=>i=0,this.ttlResolution);s.unref&&s.unref();}return o};this.getRemainingTTL=o=>{let s=this.#n.get(o);if(s===void 0)return 0;let a=e[s],u=r[s];if(a===0||u===0)return 1/0;let c=(i||n())-u;return a-c},this.#d=o=>e[o]!==0&&r[o]!==0&&(i||n())-r[o]>e[o];}#T=()=>{};#A=()=>{};#M=()=>{};#d=()=>!1;#q(){let e=new Xr(this.#l);this.#y=0,this.#E=e,this.#R=r=>{this.#y-=e[r],e[r]=0;},this.#L=(r,i,n,o)=>{if(this.#t(i))return 0;if(!$t(n))if(o){if(typeof o!=\"function\")throw new TypeError(\"sizeCalculation must be a function\");if(n=o(i,r),!$t(n))throw new TypeError(\"sizeCalculation return invalid (expect positive integer)\")}else throw new TypeError(\"invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.\");return n},this.#P=(r,i,n)=>{if(e[r]=i,this.#c){let o=this.#c-e[r];for(;this.#y>o;)this.#O(!0);}this.#y+=e[r],n&&(n.entrySize=i,n.totalCalculatedSize=this.#y);};}#R=e=>{};#P=(e,r,i)=>{};#L=(e,r,i,n)=>{if(i||n)throw new TypeError(\"cannot set size without setting maxSize or maxEntrySize on cache\");return 0};*#m({allowStale:e=this.allowStale}={}){if(this.#i)for(let r=this.#s;!(!this.#U(r)||((e||!this.#d(r))&&(yield r),r===this.#a));)r=this.#h[r];}*#v({allowStale:e=this.allowStale}={}){if(this.#i)for(let r=this.#a;!(!this.#U(r)||((e||!this.#d(r))&&(yield r),r===this.#s));)r=this.#u[r];}#U(e){return e!==void 0&&this.#n.get(this.#r[e])===e}*entries(){for(let e of this.#m())this.#e[e]!==void 0&&this.#r[e]!==void 0&&!this.#t(this.#e[e])&&(yield [this.#r[e],this.#e[e]]);}*rentries(){for(let e of this.#v())this.#e[e]!==void 0&&this.#r[e]!==void 0&&!this.#t(this.#e[e])&&(yield [this.#r[e],this.#e[e]]);}*keys(){for(let e of this.#m()){let r=this.#r[e];r!==void 0&&!this.#t(this.#e[e])&&(yield r);}}*rkeys(){for(let e of this.#v()){let r=this.#r[e];r!==void 0&&!this.#t(this.#e[e])&&(yield r);}}*values(){for(let e of this.#m())this.#e[e]!==void 0&&!this.#t(this.#e[e])&&(yield this.#e[e]);}*rvalues(){for(let e of this.#v())this.#e[e]!==void 0&&!this.#t(this.#e[e])&&(yield this.#e[e]);}[Symbol.iterator](){return this.entries()}find(e,r={}){for(let i of this.#m()){let n=this.#e[i],o=this.#t(n)?n.__staleWhileFetching:n;if(o!==void 0&&e(o,this.#r[i],this))return this.get(this.#r[i],r)}}forEach(e,r=this){for(let i of this.#m()){let n=this.#e[i],o=this.#t(n)?n.__staleWhileFetching:n;o!==void 0&&e.call(r,o,this.#r[i],this);}}rforEach(e,r=this){for(let i of this.#v()){let n=this.#e[i],o=this.#t(n)?n.__staleWhileFetching:n;o!==void 0&&e.call(r,o,this.#r[i],this);}}purgeStale(){let e=!1;for(let r of this.#v({allowStale:!0}))this.#d(r)&&(this.delete(this.#r[r]),e=!0);return e}dump(){let e=[];for(let r of this.#m({allowStale:!0})){let i=this.#r[r],n=this.#e[r],o=this.#t(n)?n.__staleWhileFetching:n;if(o===void 0||i===void 0)continue;let s={value:o};if(this.#w&&this.#S){s.ttl=this.#w[r];let a=Ii.now()-this.#S[r];s.start=Math.floor(Date.now()-a);}this.#E&&(s.size=this.#E[r]),e.unshift([i,s]);}return e}load(e){this.clear();for(let[r,i]of e){if(i.start){let n=Date.now()-i.start;i.start=Ii.now()-n;}this.set(r,i.value,i);}}set(e,r,i={}){if(r===void 0)return this.delete(e),this;let{ttl:n=this.ttl,start:o,noDisposeOnSet:s=this.noDisposeOnSet,sizeCalculation:a=this.sizeCalculation,status:u}=i,{noUpdateTTL:c=this.noUpdateTTL}=i,h=this.#L(e,r,i.size||0,a);if(this.maxEntrySize&&h>this.maxEntrySize)return u&&(u.set=\"miss\",u.maxEntrySizeExceeded=!0),this.delete(e),this;let d=this.#i===0?void 0:this.#n.get(e);if(d===void 0)d=this.#i===0?this.#s:this.#b.length!==0?this.#b.pop():this.#i===this.#l?this.#O(!1):this.#i,this.#r[d]=e,this.#e[d]=r,this.#n.set(e,d),this.#u[this.#s]=d,this.#h[d]=this.#s,this.#s=d,this.#i++,this.#P(d,h,u),u&&(u.set=\"add\"),c=!1;else {this.#C(d);let g=this.#e[d];if(r!==g){if(this.#I&&this.#t(g)){g.__abortController.abort(new Error(\"replaced\"));let{__staleWhileFetching:y}=g;y!==void 0&&!s&&(this.#_&&this.#p?.(y,e,\"set\"),this.#f&&this.#o?.push([y,e,\"set\"]));}else s||(this.#_&&this.#p?.(g,e,\"set\"),this.#f&&this.#o?.push([g,e,\"set\"]));if(this.#R(d),this.#P(d,h,u),this.#e[d]=r,u){u.set=\"replace\";let y=g&&this.#t(g)?g.__staleWhileFetching:g;y!==void 0&&(u.oldValue=y);}}else u&&(u.set=\"update\");}if(n!==0&&!this.#w&&this.#x(),this.#w&&(c||this.#M(d,n,o),u&&this.#A(u,d)),!s&&this.#f&&this.#o){let g=this.#o,y;for(;y=g?.shift();)this.#g?.(...y);}return this}pop(){try{for(;this.#i;){let e=this.#e[this.#a];if(this.#O(!0),this.#t(e)){if(e.__staleWhileFetching)return e.__staleWhileFetching}else if(e!==void 0)return e}}finally{if(this.#f&&this.#o){let e=this.#o,r;for(;r=e?.shift();)this.#g?.(...r);}}}#O(e){let r=this.#a,i=this.#r[r],n=this.#e[r];return this.#I&&this.#t(n)?n.__abortController.abort(new Error(\"evicted\")):(this.#_||this.#f)&&(this.#_&&this.#p?.(n,i,\"evict\"),this.#f&&this.#o?.push([n,i,\"evict\"])),this.#R(r),e&&(this.#r[r]=void 0,this.#e[r]=void 0,this.#b.push(r)),this.#i===1?(this.#a=this.#s=0,this.#b.length=0):this.#a=this.#u[r],this.#n.delete(i),this.#i--,r}has(e,r={}){let{updateAgeOnHas:i=this.updateAgeOnHas,status:n}=r,o=this.#n.get(e);if(o!==void 0){let s=this.#e[o];if(this.#t(s)&&s.__staleWhileFetching===void 0)return !1;if(this.#d(o))n&&(n.has=\"stale\",this.#A(n,o));else return i&&this.#T(o),n&&(n.has=\"hit\",this.#A(n,o)),!0}else n&&(n.has=\"miss\");return !1}peek(e,r={}){let{allowStale:i=this.allowStale}=r,n=this.#n.get(e);if(n!==void 0&&(i||!this.#d(n))){let o=this.#e[n];return this.#t(o)?o.__staleWhileFetching:o}}#k(e,r,i,n){let o=r===void 0?void 0:this.#e[r];if(this.#t(o))return o;let s=new On,{signal:a}=i;a?.addEventListener(\"abort\",()=>s.abort(a.reason),{signal:s.signal});let u={signal:s.signal,options:i,context:n},c=(E,S=!1)=>{let{aborted:I}=s.signal,C=i.ignoreFetchAbort&&E!==void 0;if(i.status&&(I&&!S?(i.status.fetchAborted=!0,i.status.fetchError=s.signal.reason,C&&(i.status.fetchAbortIgnored=!0)):i.status.fetchResolved=!0),I&&!C&&!S)return d(s.signal.reason);let R=y;return this.#e[r]===y&&(E===void 0?R.__staleWhileFetching?this.#e[r]=R.__staleWhileFetching:this.delete(e):(i.status&&(i.status.fetchUpdated=!0),this.set(e,E,u.options))),E},h=E=>(i.status&&(i.status.fetchRejected=!0,i.status.fetchError=E),d(E)),d=E=>{let{aborted:S}=s.signal,I=S&&i.allowStaleOnFetchAbort,C=I||i.allowStaleOnFetchRejection,R=C||i.noDeleteOnFetchRejection,U=y;if(this.#e[r]===y&&(!R||U.__staleWhileFetching===void 0?this.delete(e):I||(this.#e[r]=U.__staleWhileFetching)),C)return i.status&&U.__staleWhileFetching!==void 0&&(i.status.returnedStale=!0),U.__staleWhileFetching;if(U.__returned===U)throw E},g=(E,S)=>{let I=this.#B?.(e,o,u);I&&I instanceof Promise&&I.then(C=>E(C===void 0?void 0:C),S),s.signal.addEventListener(\"abort\",()=>{(!i.ignoreFetchAbort||i.allowStaleOnFetchAbort)&&(E(void 0),i.allowStaleOnFetchAbort&&(E=C=>c(C,!0)));});};i.status&&(i.status.fetchDispatched=!0);let y=new Promise(g).then(c,h),w=Object.assign(y,{__abortController:s,__staleWhileFetching:o,__returned:void 0});return r===void 0?(this.set(e,w,{...u.options,status:void 0}),r=this.#n.get(e)):this.#e[r]=w,w}#t(e){if(!this.#I)return !1;let r=e;return !!r&&r instanceof Promise&&r.hasOwnProperty(\"__staleWhileFetching\")&&r.__abortController instanceof On}async fetch(e,r={}){let{allowStale:i=this.allowStale,updateAgeOnGet:n=this.updateAgeOnGet,noDeleteOnStaleGet:o=this.noDeleteOnStaleGet,ttl:s=this.ttl,noDisposeOnSet:a=this.noDisposeOnSet,size:u=0,sizeCalculation:c=this.sizeCalculation,noUpdateTTL:h=this.noUpdateTTL,noDeleteOnFetchRejection:d=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:g=this.allowStaleOnFetchRejection,ignoreFetchAbort:y=this.ignoreFetchAbort,allowStaleOnFetchAbort:w=this.allowStaleOnFetchAbort,context:E,forceRefresh:S=!1,status:I,signal:C}=r;if(!this.#I)return I&&(I.fetch=\"get\"),this.get(e,{allowStale:i,updateAgeOnGet:n,noDeleteOnStaleGet:o,status:I});let R={allowStale:i,updateAgeOnGet:n,noDeleteOnStaleGet:o,ttl:s,noDisposeOnSet:a,size:u,sizeCalculation:c,noUpdateTTL:h,noDeleteOnFetchRejection:d,allowStaleOnFetchRejection:g,allowStaleOnFetchAbort:w,ignoreFetchAbort:y,status:I,signal:C},U=this.#n.get(e);if(U===void 0){I&&(I.fetch=\"miss\");let N=this.#k(e,U,R,E);return N.__returned=N}else {let N=this.#e[U];if(this.#t(N)){let de=i&&N.__staleWhileFetching!==void 0;return I&&(I.fetch=\"inflight\",de&&(I.returnedStale=!0)),de?N.__staleWhileFetching:N.__returned=N}let W=this.#d(U);if(!S&&!W)return I&&(I.fetch=\"hit\"),this.#C(U),n&&this.#T(U),I&&this.#A(I,U),N;let K=this.#k(e,U,R,E),Q=K.__staleWhileFetching!==void 0&&i;return I&&(I.fetch=W?\"stale\":\"refresh\",Q&&W&&(I.returnedStale=!0)),Q?K.__staleWhileFetching:K.__returned=K}}get(e,r={}){let{allowStale:i=this.allowStale,updateAgeOnGet:n=this.updateAgeOnGet,noDeleteOnStaleGet:o=this.noDeleteOnStaleGet,status:s}=r,a=this.#n.get(e);if(a!==void 0){let u=this.#e[a],c=this.#t(u);return s&&this.#A(s,a),this.#d(a)?(s&&(s.get=\"stale\"),c?(s&&i&&u.__staleWhileFetching!==void 0&&(s.returnedStale=!0),i?u.__staleWhileFetching:void 0):(o||this.delete(e),s&&i&&(s.returnedStale=!0),i?u:void 0)):(s&&(s.get=\"hit\"),c?u.__staleWhileFetching:(this.#C(a),n&&this.#T(a),u))}else s&&(s.get=\"miss\");}#N(e,r){this.#h[r]=e,this.#u[e]=r;}#C(e){e!==this.#s&&(e===this.#a?this.#a=this.#u[e]:this.#N(this.#h[e],this.#u[e]),this.#N(this.#s,e),this.#s=e);}delete(e){let r=!1;if(this.#i!==0){let i=this.#n.get(e);if(i!==void 0)if(r=!0,this.#i===1)this.clear();else {this.#R(i);let n=this.#e[i];this.#t(n)?n.__abortController.abort(new Error(\"deleted\")):(this.#_||this.#f)&&(this.#_&&this.#p?.(n,e,\"delete\"),this.#f&&this.#o?.push([n,e,\"delete\"])),this.#n.delete(e),this.#r[i]=void 0,this.#e[i]=void 0,i===this.#s?this.#s=this.#h[i]:i===this.#a?this.#a=this.#u[i]:(this.#u[this.#h[i]]=this.#u[i],this.#h[this.#u[i]]=this.#h[i]),this.#i--,this.#b.push(i);}}if(this.#f&&this.#o?.length){let i=this.#o,n;for(;n=i?.shift();)this.#g?.(...n);}return r}clear(){for(let e of this.#v({allowStale:!0})){let r=this.#e[e];if(this.#t(r))r.__abortController.abort(new Error(\"deleted\"));else {let i=this.#r[e];this.#_&&this.#p?.(r,i,\"delete\"),this.#f&&this.#o?.push([r,i,\"delete\"]);}}if(this.#n.clear(),this.#e.fill(void 0),this.#r.fill(void 0),this.#w&&this.#S&&(this.#w.fill(0),this.#S.fill(0)),this.#E&&this.#E.fill(0),this.#a=0,this.#s=0,this.#b.length=0,this.#y=0,this.#i=0,this.#f&&this.#o){let e=this.#o,r;for(;r=e?.shift();)this.#g?.(...r);}}};kn.LRUCache=sa;});var at=M(Ht=>{v();m();_();Object.defineProperty(Ht,\"t\",{value:!0});Ht.ContainerIterator=Ht.Container=Ht.Base=void 0;var oa=class{constructor(e=0){this.iteratorType=e;}equals(e){return this.o===e.o}};Ht.ContainerIterator=oa;var xn=class{constructor(){this.i=0;}get length(){return this.i}size(){return this.i}empty(){return this.i===0}};Ht.Base=xn;var aa=class extends xn{};Ht.Container=aa;});var Zd=M(Mn=>{v();m();_();Object.defineProperty(Mn,\"t\",{value:!0});Mn.default=void 0;var w1=at(),la=class extends w1.Base{constructor(e=[]){super(),this.S=[];let r=this;e.forEach(function(i){r.push(i);});}clear(){this.i=0,this.S=[];}push(e){return this.S.push(e),this.i+=1,this.i}pop(){if(this.i!==0)return this.i-=1,this.S.pop()}top(){return this.S[this.i-1]}},_1=la;Mn.default=_1;});var ep=M(Ln=>{v();m();_();Object.defineProperty(Ln,\"t\",{value:!0});Ln.default=void 0;var m1=at(),ua=class extends m1.Base{constructor(e=[]){super(),this.j=0,this.q=[];let r=this;e.forEach(function(i){r.push(i);});}clear(){this.q=[],this.i=this.j=0;}push(e){let r=this.q.length;if(this.j/r>.5&&this.j+this.i>=r&&r>4096){let i=this.i;for(let n=0;n{v();m();_();Object.defineProperty(Un,\"t\",{value:!0});Un.default=void 0;var E1=at(),fa=class extends E1.Base{constructor(e=[],r=function(n,o){return n>o?-1:n>1;for(let o=this.i-1>>1;o>=0;--o)this.k(o,n);}m(e){let r=this.C[e];for(;e>0;){let i=e-1>>1,n=this.C[i];if(this.v(n,r)<=0)break;this.C[e]=n,e=i;}this.C[e]=r;}k(e,r){let i=this.C[e];for(;e0&&(n=o,s=this.C[o]),this.v(s,i)>=0)break;this.C[e]=s,e=n;}this.C[e]=i;}clear(){this.i=0,this.C.length=0;}push(e){this.C.push(e),this.m(this.i),this.i+=1;}pop(){if(this.i===0)return;let e=this.C[0],r=this.C.pop();return this.i-=1,this.i&&(this.C[0]=r,this.k(0,this.i>>1)),e}top(){return this.C[0]}find(e){return this.C.indexOf(e)>=0}remove(e){let r=this.C.indexOf(e);return r<0?!1:(r===0?this.pop():r===this.i-1?(this.C.pop(),this.i-=1):(this.C.splice(r,1,this.C.pop()),this.i-=1,this.m(r),this.k(r,this.i>>1)),!0)}updateItem(e){let r=this.C.indexOf(e);return r<0?!1:(this.m(r),this.k(r,this.i>>1),!0)}toArray(){return [...this.C]}},S1=fa;Un.default=S1;});var qn=M(Nn=>{v();m();_();Object.defineProperty(Nn,\"t\",{value:!0});Nn.default=void 0;var A1=at(),ca=class extends A1.Container{},I1=ca;Nn.default=I1;});var lt=M(ha=>{v();m();_();Object.defineProperty(ha,\"t\",{value:!0});ha.throwIteratorAccessError=T1;function T1(){throw new RangeError(\"Iterator access denied!\")}});var pa=M(jn=>{v();m();_();Object.defineProperty(jn,\"t\",{value:!0});jn.RandomIterator=void 0;var R1=at(),Dn=lt(),da=class extends R1.ContainerIterator{constructor(e,r){super(r),this.o=e,this.iteratorType===0?(this.pre=function(){return this.o===0&&(0, Dn.throwIteratorAccessError)(),this.o-=1,this},this.next=function(){return this.o===this.container.size()&&(0, Dn.throwIteratorAccessError)(),this.o+=1,this}):(this.pre=function(){return this.o===this.container.size()-1&&(0, Dn.throwIteratorAccessError)(),this.o+=1,this},this.next=function(){return this.o===-1&&(0, Dn.throwIteratorAccessError)(),this.o-=1,this});}get pointer(){return this.container.getElementByPos(this.o)}set pointer(e){this.container.setElementByPos(this.o,e);}};jn.RandomIterator=da;});var rp=M(Fn=>{v();m();_();Object.defineProperty(Fn,\"t\",{value:!0});Fn.default=void 0;var C1=P1(qn()),B1=pa();function P1(t){return t&&t.t?t:{default:t}}var wr=class t extends B1.RandomIterator{constructor(e,r,i){super(e,i),this.container=r;}copy(){return new t(this.o,this.container,this.iteratorType)}},ga=class extends C1.default{constructor(e=[],r=!0){if(super(),Array.isArray(e))this.J=r?[...e]:e,this.i=e.length;else {this.J=[];let i=this;e.forEach(function(n){i.pushBack(n);});}}clear(){this.i=0,this.J.length=0;}begin(){return new wr(0,this)}end(){return new wr(this.i,this)}rBegin(){return new wr(this.i-1,this,1)}rEnd(){return new wr(-1,this,1)}front(){return this.J[0]}back(){return this.J[this.i-1]}getElementByPos(e){if(e<0||e>this.i-1)throw new RangeError;return this.J[e]}eraseElementByPos(e){if(e<0||e>this.i-1)throw new RangeError;return this.J.splice(e,1),this.i-=1,this.i}eraseElementByValue(e){let r=0;for(let i=0;ithis.i-1)throw new RangeError;this.J[e]=r;}insert(e,r,i=1){if(e<0||e>this.i)throw new RangeError;return this.J.splice(e,0,...new Array(i).fill(r)),this.i+=i,this.i}find(e){for(let r=0;r{v();m();_();Object.defineProperty(Wn,\"t\",{value:!0});Wn.default=void 0;var k1=M1(qn()),x1=at(),_r=lt();function M1(t){return t&&t.t?t:{default:t}}var mr=class t extends x1.ContainerIterator{constructor(e,r,i,n){super(n),this.o=e,this.h=r,this.container=i,this.iteratorType===0?(this.pre=function(){return this.o.L===this.h&&(0, _r.throwIteratorAccessError)(),this.o=this.o.L,this},this.next=function(){return this.o===this.h&&(0, _r.throwIteratorAccessError)(),this.o=this.o.B,this}):(this.pre=function(){return this.o.B===this.h&&(0, _r.throwIteratorAccessError)(),this.o=this.o.B,this},this.next=function(){return this.o===this.h&&(0, _r.throwIteratorAccessError)(),this.o=this.o.L,this});}get pointer(){return this.o===this.h&&(0, _r.throwIteratorAccessError)(),this.o.l}set pointer(e){this.o===this.h&&(0, _r.throwIteratorAccessError)(),this.o.l=e;}copy(){return new t(this.o,this.h,this.container,this.iteratorType)}},ya=class extends k1.default{constructor(e=[]){super(),this.h={},this.p=this._=this.h.L=this.h.B=this.h;let r=this;e.forEach(function(i){r.pushBack(i);});}V(e){let{L:r,B:i}=e;r.B=i,i.L=r,e===this.p&&(this.p=i),e===this._&&(this._=r),this.i-=1;}G(e,r){let i=r.B,n={l:e,L:r,B:i};r.B=n,i.L=n,r===this.h&&(this.p=n),i===this.h&&(this._=n),this.i+=1;}clear(){this.i=0,this.p=this._=this.h.L=this.h.B=this.h;}begin(){return new mr(this.p,this.h,this)}end(){return new mr(this.h,this.h,this)}rBegin(){return new mr(this._,this.h,this,1)}rEnd(){return new mr(this.h,this.h,this,1)}front(){return this.p.l}back(){return this._.l}getElementByPos(e){if(e<0||e>this.i-1)throw new RangeError;let r=this.p;for(;e--;)r=r.B;return r.l}eraseElementByPos(e){if(e<0||e>this.i-1)throw new RangeError;let r=this.p;for(;e--;)r=r.B;return this.V(r),this.i}eraseElementByValue(e){let r=this.p;for(;r!==this.h;)r.l===e&&this.V(r),r=r.B;return this.i}eraseElementByIterator(e){let r=e.o;return r===this.h&&(0, _r.throwIteratorAccessError)(),e=e.next(),this.V(r),e}pushBack(e){return this.G(e,this._),this.i}popBack(){if(this.i===0)return;let e=this._.l;return this.V(this._),e}pushFront(e){return this.G(e,this.h),this.i}popFront(){if(this.i===0)return;let e=this.p.l;return this.V(this.p),e}setElementByPos(e,r){if(e<0||e>this.i-1)throw new RangeError;let i=this.p;for(;e--;)i=i.B;i.l=r;}insert(e,r,i=1){if(e<0||e>this.i)throw new RangeError;if(i<=0)return this.i;if(e===0)for(;i--;)this.pushFront(r);else if(e===this.i)for(;i--;)this.pushBack(r);else {let n=this.p;for(let s=1;s{v();m();_();Object.defineProperty($n,\"t\",{value:!0});$n.default=void 0;var U1=q1(qn()),N1=pa();function q1(t){return t&&t.t?t:{default:t}}var vr=class t extends N1.RandomIterator{constructor(e,r,i){super(e,i),this.container=r;}copy(){return new t(this.o,this.container,this.iteratorType)}},ba=class extends U1.default{constructor(e=[],r=4096){super(),this.j=0,this.D=0,this.R=0,this.N=0,this.P=0,this.A=[];let i=(()=>{if(typeof e.length==\"number\")return e.length;if(typeof e.size==\"number\")return e.size;if(typeof e.size==\"function\")return e.size();throw new TypeError(\"Cannot get the length or size of the container\")})();this.F=r,this.P=Math.max(Math.ceil(i/this.F),1);for(let s=0;s>1)-(n>>1),this.D=this.N=this.F-i%this.F>>1;let o=this;e.forEach(function(s){o.pushBack(s);});}T(){let e=[],r=Math.max(this.P>>1,1);for(let i=0;i>1;}begin(){return new vr(0,this)}end(){return new vr(this.i,this)}rBegin(){return new vr(this.i-1,this,1)}rEnd(){return new vr(-1,this,1)}front(){if(this.i!==0)return this.A[this.j][this.D]}back(){if(this.i!==0)return this.A[this.R][this.N]}pushBack(e){return this.i&&(this.N0?this.N-=1:this.R>0?(this.R-=1,this.N=this.F-1):(this.R=this.P-1,this.N=this.F-1)),this.i-=1,e}pushFront(e){return this.i&&(this.D>0?this.D-=1:this.j>0?(this.j-=1,this.D=this.F-1):(this.j=this.P-1,this.D=this.F-1),this.j===this.R&&this.D===this.N&&this.T()),this.i+=1,this.A[this.j][this.D]=e,this.i}popFront(){if(this.i===0)return;let e=this.A[this.j][this.D];return this.i!==1&&(this.Dthis.i-1)throw new RangeError;let{curNodeBucketIndex:r,curNodePointerIndex:i}=this.O(e);return this.A[r][i]}setElementByPos(e,r){if(e<0||e>this.i-1)throw new RangeError;let{curNodeBucketIndex:i,curNodePointerIndex:n}=this.O(e);this.A[i][n]=r;}insert(e,r,i=1){if(e<0||e>this.i)throw new RangeError;if(e===0)for(;i--;)this.pushFront(r);else if(e===this.i)for(;i--;)this.pushBack(r);else {let n=[];for(let o=e;othis.i-1)throw new RangeError;if(e===0)this.popFront();else if(e===this.i-1)this.popBack();else {let r=[];for(let n=e+1;ne;)this.popBack();return this.i}sort(e){let r=[];for(let i=0;i{v();m();_();Object.defineProperty(Zr,\"t\",{value:!0});Zr.TreeNodeEnableIndex=Zr.TreeNode=void 0;var Hn=class{constructor(e,r){this.ee=1,this.u=void 0,this.l=void 0,this.U=void 0,this.W=void 0,this.tt=void 0,this.u=e,this.l=r;}L(){let e=this;if(e.ee===1&&e.tt.tt===e)e=e.W;else if(e.U)for(e=e.U;e.W;)e=e.W;else {let r=e.tt;for(;r.U===e;)e=r,r=e.tt;e=r;}return e}B(){let e=this;if(e.W){for(e=e.W;e.U;)e=e.U;return e}else {let r=e.tt;for(;r.W===e;)e=r,r=e.tt;return e.W!==r?r:e}}te(){let e=this.tt,r=this.W,i=r.U;return e.tt===this?e.tt=r:e.U===this?e.U=r:e.W=r,r.tt=e,r.U=this,this.tt=r,this.W=i,i&&(i.tt=this),r}se(){let e=this.tt,r=this.U,i=r.W;return e.tt===this?e.tt=r:e.U===this?e.U=r:e.W=r,r.tt=e,r.W=this,this.tt=r,this.U=i,i&&(i.tt=this),r}};Zr.TreeNode=Hn;var wa=class extends Hn{constructor(){super(...arguments),this.rt=1;}te(){let e=super.te();return this.ie(),e.ie(),e}se(){let e=super.se();return this.ie(),e.ie(),e}ie(){this.rt=1,this.U&&(this.rt+=this.U.rt),this.W&&(this.rt+=this.W.rt);}};Zr.TreeNodeEnableIndex=wa;});var ma=M(Vn=>{v();m();_();Object.defineProperty(Vn,\"t\",{value:!0});Vn.default=void 0;var op=sp(),j1=at(),ap=lt(),_a=class extends j1.Container{constructor(e=function(i,n){return in?1:0},r=!1){super(),this.Y=void 0,this.v=e,r?(this.re=op.TreeNodeEnableIndex,this.M=function(i,n,o){let s=this.ne(i,n,o);if(s){let a=s.tt;for(;a!==this.h;)a.rt+=1,a=a.tt;let u=this.he(s);if(u){let{parentNode:c,grandParent:h,curNode:d}=u;c.ie(),h.ie(),d.ie();}}return this.i},this.V=function(i){let n=this.fe(i);for(;n!==this.h;)n.rt-=1,n=n.tt;}):(this.re=op.TreeNode,this.M=function(i,n,o){let s=this.ne(i,n,o);return s&&this.he(s),this.i},this.V=this.fe),this.h=new this.re;}X(e,r){let i=this.h;for(;e;){let n=this.v(e.u,r);if(n<0)e=e.W;else if(n>0)i=e,e=e.U;else return e}return i}Z(e,r){let i=this.h;for(;e;)this.v(e.u,r)<=0?e=e.W:(i=e,e=e.U);return i}$(e,r){let i=this.h;for(;e;){let n=this.v(e.u,r);if(n<0)i=e,e=e.W;else if(n>0)e=e.U;else return e}return i}rr(e,r){let i=this.h;for(;e;)this.v(e.u,r)<0?(i=e,e=e.W):e=e.U;return i}ue(e){for(;;){let r=e.tt;if(r===this.h)return;if(e.ee===1){e.ee=0;return}if(e===r.U){let i=r.W;if(i.ee===1)i.ee=0,r.ee=1,r===this.Y?this.Y=r.te():r.te();else if(i.W&&i.W.ee===1){i.ee=r.ee,r.ee=0,i.W.ee=0,r===this.Y?this.Y=r.te():r.te();return}else i.U&&i.U.ee===1?(i.ee=1,i.U.ee=0,i.se()):(i.ee=1,e=r);}else {let i=r.U;if(i.ee===1)i.ee=0,r.ee=1,r===this.Y?this.Y=r.se():r.se();else if(i.U&&i.U.ee===1){i.ee=r.ee,r.ee=0,i.U.ee=0,r===this.Y?this.Y=r.se():r.se();return}else i.W&&i.W.ee===1?(i.ee=1,i.W.ee=0,i.te()):(i.ee=1,e=r);}}}fe(e){if(this.i===1)return this.clear(),this.h;let r=e;for(;r.U||r.W;){if(r.W)for(r=r.W;r.U;)r=r.U;else r=r.U;[e.u,r.u]=[r.u,e.u],[e.l,r.l]=[r.l,e.l],e=r;}this.h.U===r?this.h.U=r.tt:this.h.W===r&&(this.h.W=r.tt),this.ue(r);let i=r.tt;return r===i.U?i.U=void 0:i.W=void 0,this.i-=1,this.Y.ee=0,i}oe(e,r){return e===void 0?!1:this.oe(e.U,r)||r(e)?!0:this.oe(e.W,r)}he(e){for(;;){let r=e.tt;if(r.ee===0)return;let i=r.tt;if(r===i.U){let n=i.W;if(n&&n.ee===1){if(n.ee=r.ee=0,i===this.Y)return;i.ee=1,e=i;continue}else if(e===r.W){if(e.ee=0,e.U&&(e.U.tt=r),e.W&&(e.W.tt=i),r.W=e.U,i.U=e.W,e.U=r,e.W=i,i===this.Y)this.Y=e,this.h.tt=e;else {let o=i.tt;o.U===i?o.U=e:o.W=e;}return e.tt=i.tt,r.tt=e,i.tt=e,i.ee=1,{parentNode:r,grandParent:i,curNode:e}}else r.ee=0,i===this.Y?this.Y=i.se():i.se(),i.ee=1;}else {let n=i.U;if(n&&n.ee===1){if(n.ee=r.ee=0,i===this.Y)return;i.ee=1,e=i;continue}else if(e===r.U){if(e.ee=0,e.U&&(e.U.tt=i),e.W&&(e.W.tt=r),i.W=e.U,r.U=e.W,e.U=i,e.W=r,i===this.Y)this.Y=e,this.h.tt=e;else {let o=i.tt;o.U===i?o.U=e:o.W=e;}return e.tt=i.tt,r.tt=e,i.tt=e,i.ee=1,{parentNode:r,grandParent:i,curNode:e}}else r.ee=0,i===this.Y?this.Y=i.te():i.te(),i.ee=1;}return}}ne(e,r,i){if(this.Y===void 0){this.i+=1,this.Y=new this.re(e,r),this.Y.ee=0,this.Y.tt=this.h,this.h.tt=this.Y,this.h.U=this.Y,this.h.W=this.Y;return}let n,o=this.h.U,s=this.v(o.u,e);if(s===0){o.l=r;return}else if(s>0)o.U=new this.re(e,r),o.U.tt=o,n=o.U,this.h.U=n;else {let a=this.h.W,u=this.v(a.u,e);if(u===0){a.l=r;return}else if(u<0)a.W=new this.re(e,r),a.W.tt=a,n=a.W,this.h.W=n;else {if(i!==void 0){let c=i.o;if(c!==this.h){let h=this.v(c.u,e);if(h===0){c.l=r;return}else if(h>0){let d=c.L(),g=this.v(d.u,e);if(g===0){d.l=r;return}else g<0&&(n=new this.re(e,r),d.W===void 0?(d.W=n,n.tt=d):(c.U=n,n.tt=c));}}}if(n===void 0)for(n=this.Y;;){let c=this.v(n.u,e);if(c>0){if(n.U===void 0){n.U=new this.re(e,r),n.U.tt=n,n=n.U;break}n=n.U;}else if(c<0){if(n.W===void 0){n.W=new this.re(e,r),n.W.tt=n,n=n.W;break}n=n.W;}else {n.l=r;return}}}}return this.i+=1,n}I(e,r){for(;e;){let i=this.v(e.u,r);if(i<0)e=e.W;else if(i>0)e=e.U;else return e}return e||this.h}clear(){this.i=0,this.Y=void 0,this.h.tt=void 0,this.h.U=this.h.W=void 0;}updateKeyByIterator(e,r){let i=e.o;if(i===this.h&&(0, ap.throwIteratorAccessError)(),this.i===1)return i.u=r,!0;if(i===this.h.U)return this.v(i.B().u,r)>0?(i.u=r,!0):!1;if(i===this.h.W)return this.v(i.L().u,r)<0?(i.u=r,!0):!1;let n=i.L().u;if(this.v(n,r)>=0)return !1;let o=i.B().u;return this.v(o,r)<=0?!1:(i.u=r,!0)}eraseElementByPos(e){if(e<0||e>this.i-1)throw new RangeError;let r=0,i=this;return this.oe(this.Y,function(n){return e===r?(i.V(n),!0):(r+=1,!1)}),this.i}eraseElementByKey(e){if(this.i===0)return !1;let r=this.I(this.Y,e);return r===this.h?!1:(this.V(r),!0)}eraseElementByIterator(e){let r=e.o;r===this.h&&(0, ap.throwIteratorAccessError)();let i=r.W===void 0;return e.iteratorType===0?i&&e.next():(!i||r.U===void 0)&&e.next(),this.V(r),e}forEach(e){let r=0;for(let i of this)e(i,r++,this);}getElementByPos(e){if(e<0||e>this.i-1)throw new RangeError;let r,i=0;for(let n of this){if(i===e){r=n;break}i+=1;}return r}getHeight(){if(this.i===0)return 0;let e=function(r){return r?Math.max(e(r.U),e(r.W))+1:0};return e(this.Y)}},F1=_a;Vn.default=F1;});var Ea=M(Kn=>{v();m();_();Object.defineProperty(Kn,\"t\",{value:!0});Kn.default=void 0;var W1=at(),zn=lt(),va=class extends W1.ContainerIterator{constructor(e,r,i){super(i),this.o=e,this.h=r,this.iteratorType===0?(this.pre=function(){return this.o===this.h.U&&(0, zn.throwIteratorAccessError)(),this.o=this.o.L(),this},this.next=function(){return this.o===this.h&&(0, zn.throwIteratorAccessError)(),this.o=this.o.B(),this}):(this.pre=function(){return this.o===this.h.W&&(0, zn.throwIteratorAccessError)(),this.o=this.o.B(),this},this.next=function(){return this.o===this.h&&(0, zn.throwIteratorAccessError)(),this.o=this.o.L(),this});}get index(){let e=this.o,r=this.h.tt;if(e===this.h)return r?r.rt-1:0;let i=0;for(e.U&&(i+=e.U.rt);e!==r;){let n=e.tt;e===n.W&&(i+=1,n.U&&(i+=n.U.rt)),e=n;}return i}},$1=va;Kn.default=$1;});var up=M(Gn=>{v();m();_();Object.defineProperty(Gn,\"t\",{value:!0});Gn.default=void 0;var H1=lp(ma()),V1=lp(Ea()),z1=lt();function lp(t){return t&&t.t?t:{default:t}}var Ke=class t extends V1.default{constructor(e,r,i,n){super(e,r,n),this.container=i;}get pointer(){return this.o===this.h&&(0, z1.throwIteratorAccessError)(),this.o.u}copy(){return new t(this.o,this.h,this.container,this.iteratorType)}},Sa=class extends H1.default{constructor(e=[],r,i){super(r,i);let n=this;e.forEach(function(o){n.insert(o);});}*K(e){e!==void 0&&(yield*this.K(e.U),yield e.u,yield*this.K(e.W));}begin(){return new Ke(this.h.U||this.h,this.h,this)}end(){return new Ke(this.h,this.h,this)}rBegin(){return new Ke(this.h.W||this.h,this.h,this,1)}rEnd(){return new Ke(this.h,this.h,this,1)}front(){return this.h.U?this.h.U.u:void 0}back(){return this.h.W?this.h.W.u:void 0}insert(e,r){return this.M(e,void 0,r)}find(e){let r=this.I(this.Y,e);return new Ke(r,this.h,this)}lowerBound(e){let r=this.X(this.Y,e);return new Ke(r,this.h,this)}upperBound(e){let r=this.Z(this.Y,e);return new Ke(r,this.h,this)}reverseLowerBound(e){let r=this.$(this.Y,e);return new Ke(r,this.h,this)}reverseUpperBound(e){let r=this.rr(this.Y,e);return new Ke(r,this.h,this)}union(e){let r=this;return e.forEach(function(i){r.insert(i);}),this.i}[Symbol.iterator](){return this.K(this.Y)}},K1=Sa;Gn.default=K1;});var cp=M(Qn=>{v();m();_();Object.defineProperty(Qn,\"t\",{value:!0});Qn.default=void 0;var G1=fp(ma()),Q1=fp(Ea()),Y1=lt();function fp(t){return t&&t.t?t:{default:t}}var Ge=class t extends Q1.default{constructor(e,r,i,n){super(e,r,n),this.container=i;}get pointer(){this.o===this.h&&(0, Y1.throwIteratorAccessError)();let e=this;return new Proxy([],{get(r,i){if(i===\"0\")return e.o.u;if(i===\"1\")return e.o.l},set(r,i,n){if(i!==\"1\")throw new TypeError(\"props must be 1\");return e.o.l=n,!0}})}copy(){return new t(this.o,this.h,this.container,this.iteratorType)}},Aa=class extends G1.default{constructor(e=[],r,i){super(r,i);let n=this;e.forEach(function(o){n.setElement(o[0],o[1]);});}*K(e){e!==void 0&&(yield*this.K(e.U),yield [e.u,e.l],yield*this.K(e.W));}begin(){return new Ge(this.h.U||this.h,this.h,this)}end(){return new Ge(this.h,this.h,this)}rBegin(){return new Ge(this.h.W||this.h,this.h,this,1)}rEnd(){return new Ge(this.h,this.h,this,1)}front(){if(this.i===0)return;let e=this.h.U;return [e.u,e.l]}back(){if(this.i===0)return;let e=this.h.W;return [e.u,e.l]}lowerBound(e){let r=this.X(this.Y,e);return new Ge(r,this.h,this)}upperBound(e){let r=this.Z(this.Y,e);return new Ge(r,this.h,this)}reverseLowerBound(e){let r=this.$(this.Y,e);return new Ge(r,this.h,this)}reverseUpperBound(e){let r=this.rr(this.Y,e);return new Ge(r,this.h,this)}setElement(e,r,i){return this.M(e,r,i)}find(e){let r=this.I(this.Y,e);return new Ge(r,this.h,this)}getElementByKey(e){return this.I(this.Y,e).l}union(e){let r=this;return e.forEach(function(i){r.setElement(i[0],i[1]);}),this.i}[Symbol.iterator](){return this.K(this.Y)}},J1=Aa;Qn.default=J1;});var Ta=M(Ia=>{v();m();_();Object.defineProperty(Ia,\"t\",{value:!0});Ia.default=X1;function X1(t){let e=typeof t;return e===\"object\"&&t!==null||e===\"function\"}});var Pa=M(ei=>{v();m();_();Object.defineProperty(ei,\"t\",{value:!0});ei.HashContainerIterator=ei.HashContainer=void 0;var hp=at(),Ra=Z1(Ta()),Ti=lt();function Z1(t){return t&&t.t?t:{default:t}}var Ca=class extends hp.ContainerIterator{constructor(e,r,i){super(i),this.o=e,this.h=r,this.iteratorType===0?(this.pre=function(){return this.o.L===this.h&&(0, Ti.throwIteratorAccessError)(),this.o=this.o.L,this},this.next=function(){return this.o===this.h&&(0, Ti.throwIteratorAccessError)(),this.o=this.o.B,this}):(this.pre=function(){return this.o.B===this.h&&(0, Ti.throwIteratorAccessError)(),this.o=this.o.B,this},this.next=function(){return this.o===this.h&&(0, Ti.throwIteratorAccessError)(),this.o=this.o.L,this});}};ei.HashContainerIterator=Ca;var Ba=class extends hp.Container{constructor(){super(),this.H=[],this.g={},this.HASH_TAG=Symbol(\"@@HASH_TAG\"),Object.setPrototypeOf(this.g,null),this.h={},this.h.L=this.h.B=this.p=this._=this.h;}V(e){let{L:r,B:i}=e;r.B=i,i.L=r,e===this.p&&(this.p=i),e===this._&&(this._=r),this.i-=1;}M(e,r,i){i===void 0&&(i=(0, Ra.default)(e));let n;if(i){let o=e[this.HASH_TAG];if(o!==void 0)return this.H[o].l=r,this.i;Object.defineProperty(e,this.HASH_TAG,{value:this.H.length,configurable:!0}),n={u:e,l:r,L:this._,B:this.h},this.H.push(n);}else {let o=this.g[e];if(o)return o.l=r,this.i;n={u:e,l:r,L:this._,B:this.h},this.g[e]=n;}return this.i===0?(this.p=n,this.h.B=n):this._.B=n,this._=n,this.h.L=n,++this.i}I(e,r){if(r===void 0&&(r=(0, Ra.default)(e)),r){let i=e[this.HASH_TAG];return i===void 0?this.h:this.H[i]}else return this.g[e]||this.h}clear(){let e=this.HASH_TAG;this.H.forEach(function(r){delete r.u[e];}),this.H=[],this.g={},Object.setPrototypeOf(this.g,null),this.i=0,this.p=this._=this.h.L=this.h.B=this.h;}eraseElementByKey(e,r){let i;if(r===void 0&&(r=(0, Ra.default)(e)),r){let n=e[this.HASH_TAG];if(n===void 0)return !1;delete e[this.HASH_TAG],i=this.H[n],delete this.H[n];}else {if(i=this.g[e],i===void 0)return !1;delete this.g[e];}return this.V(i),!0}eraseElementByIterator(e){let r=e.o;return r===this.h&&(0, Ti.throwIteratorAccessError)(),this.V(r),e.next()}eraseElementByPos(e){if(e<0||e>this.i-1)throw new RangeError;let r=this.p;for(;e--;)r=r.B;return this.V(r),this.i}};ei.HashContainer=Ba;});var pp=M(Yn=>{v();m();_();Object.defineProperty(Yn,\"t\",{value:!0});Yn.default=void 0;var dp=Pa(),ev=lt(),Er=class t extends dp.HashContainerIterator{constructor(e,r,i,n){super(e,r,n),this.container=i;}get pointer(){return this.o===this.h&&(0, ev.throwIteratorAccessError)(),this.o.u}copy(){return new t(this.o,this.h,this.container,this.iteratorType)}},Oa=class extends dp.HashContainer{constructor(e=[]){super();let r=this;e.forEach(function(i){r.insert(i);});}begin(){return new Er(this.p,this.h,this)}end(){return new Er(this.h,this.h,this)}rBegin(){return new Er(this._,this.h,this,1)}rEnd(){return new Er(this.h,this.h,this,1)}front(){return this.p.u}back(){return this._.u}insert(e,r){return this.M(e,void 0,r)}getElementByPos(e){if(e<0||e>this.i-1)throw new RangeError;let r=this.p;for(;e--;)r=r.B;return r.u}find(e,r){let i=this.I(e,r);return new Er(i,this.h,this)}forEach(e){let r=0,i=this.p;for(;i!==this.h;)e(i.u,r++,this),i=i.B;}[Symbol.iterator](){return function*(){let e=this.p;for(;e!==this.h;)yield e.u,e=e.B;}.bind(this)()}},tv=Oa;Yn.default=tv;});var yp=M(Jn=>{v();m();_();Object.defineProperty(Jn,\"t\",{value:!0});Jn.default=void 0;var gp=Pa(),rv=nv(Ta()),iv=lt();function nv(t){return t&&t.t?t:{default:t}}var Sr=class t extends gp.HashContainerIterator{constructor(e,r,i,n){super(e,r,n),this.container=i;}get pointer(){this.o===this.h&&(0, iv.throwIteratorAccessError)();let e=this;return new Proxy([],{get(r,i){if(i===\"0\")return e.o.u;if(i===\"1\")return e.o.l},set(r,i,n){if(i!==\"1\")throw new TypeError(\"props must be 1\");return e.o.l=n,!0}})}copy(){return new t(this.o,this.h,this.container,this.iteratorType)}},ka=class extends gp.HashContainer{constructor(e=[]){super();let r=this;e.forEach(function(i){r.setElement(i[0],i[1]);});}begin(){return new Sr(this.p,this.h,this)}end(){return new Sr(this.h,this.h,this)}rBegin(){return new Sr(this._,this.h,this,1)}rEnd(){return new Sr(this.h,this.h,this,1)}front(){if(this.i!==0)return [this.p.u,this.p.l]}back(){if(this.i!==0)return [this._.u,this._.l]}setElement(e,r,i){return this.M(e,r,i)}getElementByKey(e,r){if(r===void 0&&(r=(0, rv.default)(e)),r){let n=e[this.HASH_TAG];return n!==void 0?this.H[n].l:void 0}let i=this.g[e];return i?i.l:void 0}getElementByPos(e){if(e<0||e>this.i-1)throw new RangeError;let r=this.p;for(;e--;)r=r.B;return [r.u,r.l]}find(e,r){let i=this.I(e,r);return new Sr(i,this.h,this)}forEach(e){let r=0,i=this.p;for(;i!==this.h;)e([i.u,i.l],r++,this),i=i.B;}[Symbol.iterator](){return function*(){let e=this.p;for(;e!==this.h;)yield [e.u,e.l],e=e.B;}.bind(this)()}},sv=ka;Jn.default=sv;});var bp=M(je=>{v();m();_();Object.defineProperty(je,\"t\",{value:!0});Object.defineProperty(je,\"Deque\",{enumerable:!0,get:function(){return cv.default}});Object.defineProperty(je,\"HashMap\",{enumerable:!0,get:function(){return gv.default}});Object.defineProperty(je,\"HashSet\",{enumerable:!0,get:function(){return pv.default}});Object.defineProperty(je,\"LinkList\",{enumerable:!0,get:function(){return fv.default}});Object.defineProperty(je,\"OrderedMap\",{enumerable:!0,get:function(){return dv.default}});Object.defineProperty(je,\"OrderedSet\",{enumerable:!0,get:function(){return hv.default}});Object.defineProperty(je,\"PriorityQueue\",{enumerable:!0,get:function(){return lv.default}});Object.defineProperty(je,\"Queue\",{enumerable:!0,get:function(){return av.default}});Object.defineProperty(je,\"Stack\",{enumerable:!0,get:function(){return ov.default}});Object.defineProperty(je,\"Vector\",{enumerable:!0,get:function(){return uv.default}});var ov=ut(Zd()),av=ut(ep()),lv=ut(tp()),uv=ut(rp()),fv=ut(ip()),cv=ut(np()),hv=ut(up()),dv=ut(cp()),pv=ut(pp()),gv=ut(yp());function ut(t){return t&&t.t?t:{default:t}}});var _p=M((mN,wp)=>{v();m();_();var yv=bp().OrderedSet,ft=ot()(\"number-allocator:trace\"),bv=ot()(\"number-allocator:error\");function Te(t,e){this.low=t,this.high=e;}Te.prototype.equals=function(t){return this.low===t.low&&this.high===t.high};Te.prototype.compare=function(t){return this.lowr.compare(i)),ft(\"Create\"),this.clear();}ct.prototype.firstVacant=function(){return this.ss.size()===0?null:this.ss.front().low};ct.prototype.alloc=function(){if(this.ss.size()===0)return ft(\"alloc():empty\"),null;let t=this.ss.begin(),e=t.pointer.low,r=t.pointer.high,i=e;return i+1<=r?this.ss.updateKeyByIterator(t,new Te(e+1,r)):this.ss.eraseElementByPos(0),ft(\"alloc():\"+i),i};ct.prototype.use=function(t){let e=new Te(t,t),r=this.ss.lowerBound(e);if(!r.equals(this.ss.end())){let i=r.pointer.low,n=r.pointer.high;return r.pointer.equals(e)?(this.ss.eraseElementByIterator(r),ft(\"use():\"+t),!0):i>t?!1:i===t?(this.ss.updateKeyByIterator(r,new Te(i+1,n)),ft(\"use():\"+t),!0):n===t?(this.ss.updateKeyByIterator(r,new Te(i,n-1)),ft(\"use():\"+t),!0):(this.ss.updateKeyByIterator(r,new Te(t+1,n)),this.ss.insert(new Te(i,t-1)),ft(\"use():\"+t),!0)}return ft(\"use():failed\"),!1};ct.prototype.free=function(t){if(tthis.max){bv(\"free():\"+t+\" is out of range\");return}let e=new Te(t,t),r=this.ss.upperBound(e);if(r.equals(this.ss.end())){if(r.equals(this.ss.begin())){this.ss.insert(e);return}r.pre();let i=r.pointer.high;r.pointer.high+1===t?this.ss.updateKeyByIterator(r,new Te(i,t)):this.ss.insert(e);}else if(r.equals(this.ss.begin()))if(t+1===r.pointer.low){let i=r.pointer.high;this.ss.updateKeyByIterator(r,new Te(t,i));}else this.ss.insert(e);else {let i=r.pointer.low,n=r.pointer.high;r.pre();let o=r.pointer.low;r.pointer.high+1===t?t+1===i?(this.ss.eraseElementByIterator(r),this.ss.updateKeyByIterator(r,new Te(o,n))):this.ss.updateKeyByIterator(r,new Te(o,t)):t+1===i?(this.ss.eraseElementByIterator(r.next()),this.ss.insert(new Te(t,n))):this.ss.insert(e);}ft(\"free():\"+t);};ct.prototype.clear=function(){ft(\"clear()\"),this.ss.clear(),this.ss.insert(new Te(this.min,this.max));};ct.prototype.intervalCount=function(){return this.ss.size()};ct.prototype.dump=function(){console.log(\"length:\"+this.ss.size());for(let t of this.ss)console.log(t);};wp.exports=ct;});var xa=M((PN,mp)=>{v();m();_();var wv=_p();mp.exports.NumberAllocator=wv;});var vp=M(La=>{v();m();_();Object.defineProperty(La,\"__esModule\",{value:!0});var _v=Xd(),mv=xa(),Ma=class{constructor(e){e>0&&(this.aliasToTopic=new _v.LRUCache({max:e}),this.topicToAlias={},this.numberAllocator=new mv.NumberAllocator(1,e),this.max=e,this.length=0);}put(e,r){if(r===0||r>this.max)return !1;let i=this.aliasToTopic.get(r);return i&&delete this.topicToAlias[i],this.aliasToTopic.set(r,e),this.topicToAlias[e]=r,this.numberAllocator.use(r),this.length=this.aliasToTopic.size,!0}getTopicByAlias(e){return this.aliasToTopic.get(e)}getAliasByTopic(e){let r=this.topicToAlias[e];return typeof r<\"u\"&&this.aliasToTopic.get(r),r}clear(){this.aliasToTopic.clear(),this.topicToAlias={},this.numberAllocator.clear(),this.length=0;}getLruAlias(){let e=this.numberAllocator.firstVacant();return e||[...this.aliasToTopic.keys()][this.aliasToTopic.size-1]}};La.default=Ma;});var Ep=M(Ri=>{v();m();_();var vv=Ri&&Ri.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Ri,\"__esModule\",{value:!0});var Ev=Ai(),Sv=vv(vp()),Av=Jr(),Iv=(t,e)=>{t.log(\"_handleConnack\");let{options:r}=t,n=r.protocolVersion===5?e.reasonCode:e.returnCode;if(clearTimeout(t.connackTimer),delete t.topicAliasSend,e.properties){if(e.properties.topicAliasMaximum){if(e.properties.topicAliasMaximum>65535){t.emit(\"error\",new Error(\"topicAliasMaximum from broker is out of range\"));return}e.properties.topicAliasMaximum>0&&(t.topicAliasSend=new Sv.default(e.properties.topicAliasMaximum));}e.properties.serverKeepAlive&&r.keepalive&&(r.keepalive=e.properties.serverKeepAlive,t._shiftPingInterval()),e.properties.maximumPacketSize&&(r.properties||(r.properties={}),r.properties.maximumPacketSize=e.properties.maximumPacketSize);}if(n===0)t.reconnecting=!1,t._onConnect(e);else if(n>0){let o=new Av.ErrorWithReasonCode(`Connection refused: ${Ev.ReasonCodes[n]}`,n);t.emit(\"error\",o);}};Ri.default=Iv;});var Sp=M(Ua=>{v();m();_();Object.defineProperty(Ua,\"__esModule\",{value:!0});var Tv=(t,e,r)=>{t.log(\"handling pubrel packet\");let i=typeof r<\"u\"?r:t.noop,{messageId:n}=e,o={cmd:\"pubcomp\",messageId:n};t.incomingStore.get(e,(s,a)=>{s?t._sendPacket(o,i):(t.emit(\"message\",a.topic,a.payload,a),t.handleMessage(a,u=>{if(u)return i(u);t.incomingStore.del(a,t.noop),t._sendPacket(o,i);}));});};Ua.default=Tv;});var Ap=M(Ci=>{v();m();_();var Bi=Ci&&Ci.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Ci,\"__esModule\",{value:!0});var Rv=Bi(Vd()),Cv=Bi(Kd()),Bv=Bi(Ep()),Pv=Bi(Ai()),Ov=Bi(Sp()),kv=(t,e,r)=>{let{options:i}=t;if(i.protocolVersion===5&&i.properties&&i.properties.maximumPacketSize&&i.properties.maximumPacketSize{v();m();_();var xv=ti&&ti.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(ti,\"__esModule\",{value:!0});ti.TypedEventEmitter=void 0;var Mv=xv((ir(),X(rr))),Lv=Jr(),Xn=class{};ti.TypedEventEmitter=Xn;(0, Lv.applyMixin)(Xn,Mv.default);});var Pi=M(Ar=>{v();m();_();Object.defineProperty(Ar,\"__esModule\",{value:!0});Ar.isReactNativeBrowser=Ar.isWebWorker=void 0;var Uv=()=>typeof window<\"u\"&&typeof window.document<\"u\",Tp=()=>{var t,e;return !!(typeof self==\"object\"&&(!((e=(t=self?.constructor)===null||t===void 0?void 0:t.name)===null||e===void 0)&&e.includes(\"WorkerGlobalScope\")))},Rp=()=>typeof B<\"u\"&&B.product===\"ReactNative\",Nv=Uv()||Tp()||Rp();Ar.isWebWorker=Tp();Ar.isReactNativeBrowser=Rp();Ar.default=Nv;});var Bp=M((Zn,Cp)=>{v();m();_();(function(t,e){typeof Zn==\"object\"&&typeof Cp<\"u\"?e(Zn):typeof define==\"function\"&&define.amd?define([\"exports\"],e):(t=typeof globalThis<\"u\"?globalThis:t||self,e(t.fastUniqueNumbers={}));})(Zn,function(t){var e=function(g){return function(y){var w=g(y);return y.add(w),w}},r=function(g){return function(y,w){return g.set(y,w),w}},i=Number.MAX_SAFE_INTEGER===void 0?9007199254740991:Number.MAX_SAFE_INTEGER,n=536870912,o=n*2,s=function(g,y){return function(w){var E=y.get(w),S=E===void 0?w.size:Ei)throw new Error(\"Congratulations, you created a collection of unique numbers which uses all available integers!\");for(;w.has(S);)S=Math.floor(Math.random()*i);return g(w,S)}},a=new WeakMap,u=r(a),c=s(u,a),h=e(c);t.addUniqueNumber=h,t.generateUniqueNumber=c;});});var Op=M((es,Pp)=>{v();m();_();(function(t,e){typeof es==\"object\"&&typeof Pp<\"u\"?e(es,Bp()):typeof define==\"function\"&&define.amd?define([\"exports\",\"fast-unique-numbers\"],e):(t=typeof globalThis<\"u\"?globalThis:t||self,e(t.workerTimersBroker={},t.fastUniqueNumbers));})(es,function(t,e){var r=function(s){return s.method!==void 0&&s.method===\"call\"},i=function(s){return s.error===null&&typeof s.id==\"number\"},n=function(s){var a=new Map([[0,function(){}]]),u=new Map([[0,function(){}]]),c=new Map,h=new Worker(s);h.addEventListener(\"message\",function(E){var S=E.data;if(r(S)){var I=S.params,C=I.timerId,R=I.timerType;if(R===\"interval\"){var U=a.get(C);if(typeof U==\"number\"){var N=c.get(U);if(N===void 0||N.timerId!==C||N.timerType!==R)throw new Error(\"The timer is in an undefined state.\")}else if(typeof U<\"u\")U();else throw new Error(\"The timer is in an undefined state.\")}else if(R===\"timeout\"){var W=u.get(C);if(typeof W==\"number\"){var K=c.get(W);if(K===void 0||K.timerId!==C||K.timerType!==R)throw new Error(\"The timer is in an undefined state.\")}else if(typeof W<\"u\")W(),u.delete(C);else throw new Error(\"The timer is in an undefined state.\")}}else if(i(S)){var z=S.id,Q=c.get(z);if(Q===void 0)throw new Error(\"The timer is in an undefined state.\");var de=Q.timerId,Gt=Q.timerType;c.delete(z),Gt===\"interval\"?a.delete(de):u.delete(de);}else {var pe=S.error.message;throw new Error(pe)}});var d=function(S){var I=e.generateUniqueNumber(c);c.set(I,{timerId:S,timerType:\"interval\"}),a.set(S,I),h.postMessage({id:I,method:\"clear\",params:{timerId:S,timerType:\"interval\"}});},g=function(S){var I=e.generateUniqueNumber(c);c.set(I,{timerId:S,timerType:\"timeout\"}),u.set(S,I),h.postMessage({id:I,method:\"clear\",params:{timerId:S,timerType:\"timeout\"}});},y=function(S){var I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,C=e.generateUniqueNumber(a);return a.set(C,function(){S(),typeof a.get(C)==\"function\"&&h.postMessage({id:null,method:\"set\",params:{delay:I,now:performance.now(),timerId:C,timerType:\"interval\"}});}),h.postMessage({id:null,method:\"set\",params:{delay:I,now:performance.now(),timerId:C,timerType:\"interval\"}}),C},w=function(S){var I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,C=e.generateUniqueNumber(u);return u.set(C,S),h.postMessage({id:null,method:\"set\",params:{delay:I,now:performance.now(),timerId:C,timerType:\"timeout\"}}),C};return {clearInterval:d,clearTimeout:g,setInterval:y,setTimeout:w}};t.load=n;});});var xp=M((ts,kp)=>{v();m();_();(function(t,e){typeof ts==\"object\"&&typeof kp<\"u\"?e(ts,Op()):typeof define==\"function\"&&define.amd?define([\"exports\",\"worker-timers-broker\"],e):(t=typeof globalThis<\"u\"?globalThis:t||self,e(t.workerTimers={},t.workerTimersBroker));})(ts,function(t,e){var r=function(h,d){var g=null;return function(){if(g!==null)return g;var y=new Blob([d],{type:\"application/javascript; charset=utf-8\"}),w=URL.createObjectURL(y);return g=h(w),setTimeout(function(){return URL.revokeObjectURL(w)}),g}},i=`(()=>{var e={472:(e,t,r)=>{var o,i;void 0===(i=\"function\"==typeof(o=function(){\"use strict\";var e=new Map,t=new Map,r=function(t){var r=e.get(t);if(void 0===r)throw new Error('There is no interval scheduled with the given id \"'.concat(t,'\".'));clearTimeout(r),e.delete(t)},o=function(e){var r=t.get(e);if(void 0===r)throw new Error('There is no timeout scheduled with the given id \"'.concat(e,'\".'));clearTimeout(r),t.delete(e)},i=function(e,t){var r,o=performance.now();return{expected:o+(r=e-Math.max(0,o-t)),remainingDelay:r}},n=function e(t,r,o,i){var n=performance.now();n>o?postMessage({id:null,method:\"call\",params:{timerId:r,timerType:i}}):t.set(r,setTimeout(e,o-n,t,r,o,i))},a=function(t,r,o){var a=i(t,o),s=a.expected,d=a.remainingDelay;e.set(r,setTimeout(n,d,e,r,s,\"interval\"))},s=function(e,r,o){var a=i(e,o),s=a.expected,d=a.remainingDelay;t.set(r,setTimeout(n,d,t,r,s,\"timeout\"))};addEventListener(\"message\",(function(e){var t=e.data;try{if(\"clear\"===t.method){var i=t.id,n=t.params,d=n.timerId,c=n.timerType;if(\"interval\"===c)r(d),postMessage({error:null,id:i});else{if(\"timeout\"!==c)throw new Error('The given type \"'.concat(c,'\" is not supported'));o(d),postMessage({error:null,id:i})}}else{if(\"set\"!==t.method)throw new Error('The given method \"'.concat(t.method,'\" is not supported'));var u=t.params,l=u.delay,p=u.now,m=u.timerId,v=u.timerType;if(\"interval\"===v)a(l,m,p);else{if(\"timeout\"!==v)throw new Error('The given type \"'.concat(v,'\" is not supported'));s(l,m,p)}}}catch(e){postMessage({error:{message:e.message},id:t.id,result:null})}}))})?o.call(t,r,t,e):o)||(e.exports=i)}},t={};function r(o){var i=t[o];if(void 0!==i)return i.exports;var n=t[o]={exports:{}};return e[o](n,n.exports,r),n.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var o in t)r.o(t,o)&&!r.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{\"use strict\";r(472)})()})();`,n=r(e.load,i),o=function(h){return n().clearInterval(h)},s=function(h){return n().clearTimeout(h)},a=function(){var h;return (h=n()).setInterval.apply(h,arguments)},u=function(){var h;return (h=n()).setTimeout.apply(h,arguments)};t.clearInterval=o,t.clearTimeout=s,t.setInterval=a,t.setTimeout=u;});});var Np=M(Rt=>{v();m();_();var qv=Rt&&Rt.__createBinding||(Object.create?function(t,e,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(e,r);(!n||(\"get\"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,i,n);}:function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r];}),Dv=Rt&&Rt.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,\"default\",{enumerable:!0,value:e});}:function(t,e){t.default=e;}),jv=Rt&&Rt.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!==\"default\"&&Object.prototype.hasOwnProperty.call(t,r)&&qv(e,t,r);return Dv(e,t),e};Object.defineProperty(Rt,\"__esModule\",{value:!0});var Na=jv(Pi()),Mp=xp(),Lp={set:Mp.setTimeout,clear:Mp.clearTimeout},Up={set:(t,e)=>setTimeout(t,e),clear:t=>clearTimeout(t)},Fv=t=>{switch(t){case\"native\":return Up;case\"worker\":return Lp;case\"auto\":default:return Na.default&&!Na.isWebWorker&&!Na.isReactNativeBrowser?Lp:Up}};Rt.default=Fv;});var Da=M(Oi=>{v();m();_();var Wv=Oi&&Oi.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Oi,\"__esModule\",{value:!0});var $v=Wv(Np()),qa=class{constructor(e,r,i){this.keepalive=e*1e3,this.checkPing=r,this.timer=(0, $v.default)(i),this.reschedule();}clear(){this.timerId&&(this.timer.clear(this.timerId),this.timerId=null);}reschedule(){this.clear(),this.timerId=this.timer.set(()=>{this.checkPing(),this.timerId&&this.reschedule();},this.keepalive);}};Oi.default=qa;});var ns=M(Qe=>{v();m();_();var Hv=Qe&&Qe.__createBinding||(Object.create?function(t,e,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(e,r);(!n||(\"get\"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,i,n);}:function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r];}),Vv=Qe&&Qe.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,\"default\",{enumerable:!0,value:e});}:function(t,e){t.default=e;}),Wp=Qe&&Qe.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!==\"default\"&&Object.prototype.hasOwnProperty.call(t,r)&&Hv(e,t,r);return Vv(e,t),e},Vt=Qe&&Qe.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Qe,\"__esModule\",{value:!0});var zv=Vt(Gu()),ja=Vt(Nd()),Kv=Vt(Yo()),Gv=Dt(),qp=Vt(Fd()),Dp=Wp($d()),Qv=Vt(ot()),rs=Vt(Zo()),Yv=Vt(Ap()),Wa=Jr(),Jv=Ip(),Xv=Vt(Da()),jp=Wp(Pi()),Fa=globalThis.setImmediate||((...t)=>{let e=t.shift();(0, Wa.nextTick)(()=>{e(...t);});}),Fp={keepalive:60,reschedulePings:!0,protocolId:\"MQTT\",protocolVersion:4,reconnectPeriod:1e3,connectTimeout:30*1e3,clean:!0,resubscribe:!0,writeCache:!0,timerVariant:\"auto\"},is=class t extends Jv.TypedEventEmitter{static defaultId(){return `mqttjs_${Math.random().toString(16).substr(2,8)}`}constructor(e,r){super(),this.options=r||{};for(let i in Fp)typeof this.options[i]>\"u\"?this.options[i]=Fp[i]:this.options[i]=r[i];this.log=this.options.log||(0, Qv.default)(\"mqttjs:client\"),this.noop=this._noop.bind(this),this.log(\"MqttClient :: version:\",t.VERSION),jp.isWebWorker?this.log(\"MqttClient :: environment\",\"webworker\"):this.log(\"MqttClient :: environment\",jp.default?\"browser\":\"node\"),this.log(\"MqttClient :: options.protocol\",r.protocol),this.log(\"MqttClient :: options.protocolVersion\",r.protocolVersion),this.log(\"MqttClient :: options.username\",r.username),this.log(\"MqttClient :: options.keepalive\",r.keepalive),this.log(\"MqttClient :: options.reconnectPeriod\",r.reconnectPeriod),this.log(\"MqttClient :: options.rejectUnauthorized\",r.rejectUnauthorized),this.log(\"MqttClient :: options.properties.topicAliasMaximum\",r.properties?r.properties.topicAliasMaximum:void 0),this.options.clientId=typeof r.clientId==\"string\"?r.clientId:t.defaultId(),this.log(\"MqttClient :: clientId\",this.options.clientId),this.options.customHandleAcks=r.protocolVersion===5&&r.customHandleAcks?r.customHandleAcks:(...i)=>{i[3](null,0);},this.options.writeCache||(ja.default.writeToStream.cacheNumbers=!1),this.streamBuilder=e,this.messageIdProvider=typeof this.options.messageIdProvider>\"u\"?new Kv.default:this.options.messageIdProvider,this.outgoingStore=r.outgoingStore||new rs.default,this.incomingStore=r.incomingStore||new rs.default,this.queueQoSZero=r.queueQoSZero===void 0?!0:r.queueQoSZero,this._resubscribeTopics={},this.messageIdToTopic={},this.pingTimer=null,this.connected=!1,this.disconnecting=!1,this.reconnecting=!1,this.queue=[],this.connackTimer=null,this.reconnectTimer=null,this._storeProcessing=!1,this._packetIdsDuringStoreProcessing={},this._storeProcessingQueue=[],this.outgoing={},this._firstConnection=!0,r.properties&&r.properties.topicAliasMaximum>0&&(r.properties.topicAliasMaximum>65535?this.log(\"MqttClient :: options.properties.topicAliasMaximum is out of range\"):this.topicAliasRecv=new zv.default(r.properties.topicAliasMaximum)),this.on(\"connect\",()=>{let{queue:i}=this,n=()=>{let o=i.shift();this.log(\"deliver :: entry %o\",o);let s=null;if(!o){this._resubscribe();return}s=o.packet,this.log(\"deliver :: call _sendPacket for %o\",s);let a=!0;s.messageId&&s.messageId!==0&&(this.messageIdProvider.register(s.messageId)||(a=!1)),a?this._sendPacket(s,u=>{o.cb&&o.cb(u),n();}):(this.log(\"messageId: %d has already used. The message is skipped and removed.\",s.messageId),n());};this.log(\"connect :: sending queued packets\"),n();}),this.on(\"close\",()=>{this.log(\"close :: connected set to `false`\"),this.connected=!1,this.log(\"close :: clearing connackTimer\"),clearTimeout(this.connackTimer),this.log(\"close :: clearing ping timer\"),this.pingTimer&&(this.pingTimer.clear(),this.pingTimer=null),this.topicAliasRecv&&this.topicAliasRecv.clear(),this.log(\"close :: calling _setupReconnect\"),this._setupReconnect();}),this.options.manualConnect||(this.log(\"MqttClient :: setting up stream\"),this.connect());}handleAuth(e,r){r();}handleMessage(e,r){r();}_nextId(){return this.messageIdProvider.allocate()}getLastMessageId(){return this.messageIdProvider.getLastAllocated()}connect(){var e;let r=new Gv.Writable,i=ja.default.parser(this.options),n=null,o=[];this.log(\"connect :: calling method to clear reconnect\"),this._clearReconnect(),this.log(\"connect :: using streamBuilder provided to client to create stream\"),this.stream=this.streamBuilder(this),i.on(\"packet\",h=>{this.log(\"parser :: on packet push to packets array.\"),o.push(h);});let s=()=>{this.log(\"work :: getting next packet in queue\");let h=o.shift();if(h)this.log(\"work :: packet pulled from queue\"),(0, Yv.default)(this,h,a);else {this.log(\"work :: no packets in queue\");let d=n;n=null,this.log(\"work :: done flag is %s\",!!d),d&&d();}},a=()=>{if(o.length)(0, Wa.nextTick)(s);else {let h=n;n=null,h();}};r._write=(h,d,g)=>{n=g,this.log(\"writable stream :: parsing buffer\"),i.parse(h),s();};let u=h=>{this.log(\"streamErrorHandler :: error\",h.message),h.code?(this.log(\"streamErrorHandler :: emitting error\"),this.emit(\"error\",h)):this.noop(h);};this.log(\"connect :: pipe stream to writable stream\"),this.stream.pipe(r),this.stream.on(\"error\",u),this.stream.on(\"close\",()=>{this.log(\"(%s)stream :: on close\",this.options.clientId),this._flushVolatile(),this.log(\"stream: emit close to MqttClient\"),this.emit(\"close\");}),this.log(\"connect: sending packet `connect`\");let c={cmd:\"connect\",protocolId:this.options.protocolId,protocolVersion:this.options.protocolVersion,clean:this.options.clean,clientId:this.options.clientId,keepalive:this.options.keepalive,username:this.options.username,password:this.options.password,properties:this.options.properties};if(this.options.will&&(c.will=Object.assign(Object.assign({},this.options.will),{payload:(e=this.options.will)===null||e===void 0?void 0:e.payload})),this.topicAliasRecv&&(c.properties||(c.properties={}),this.topicAliasRecv&&(c.properties.topicAliasMaximum=this.topicAliasRecv.max)),this._writePacket(c),i.on(\"error\",this.emit.bind(this,\"error\")),this.options.properties){if(!this.options.properties.authenticationMethod&&this.options.properties.authenticationData)return this.end(()=>this.emit(\"error\",new Error(\"Packet has no Authentication Method\"))),this;if(this.options.properties.authenticationMethod&&this.options.authPacket&&typeof this.options.authPacket==\"object\"){let h=Object.assign({cmd:\"auth\",reasonCode:0},this.options.authPacket);this._writePacket(h);}}return this.stream.setMaxListeners(1e3),clearTimeout(this.connackTimer),this.connackTimer=setTimeout(()=>{this.log(\"!!connectTimeout hit!! Calling _cleanUp with force `true`\"),this.emit(\"error\",new Error(\"connack timeout\")),this._cleanUp(!0);},this.options.connectTimeout),this}publish(e,r,i,n){this.log(\"publish :: message `%s` to topic `%s`\",r,e);let{options:o}=this;typeof i==\"function\"&&(n=i,i=null),i=i||{},i=Object.assign(Object.assign({},{qos:0,retain:!1,dup:!1}),i);let{qos:a,retain:u,dup:c,properties:h,cbStorePut:d}=i;if(this._checkDisconnecting(n))return this;let g=()=>{let y=0;if((a===1||a===2)&&(y=this._nextId(),y===null))return this.log(\"No messageId left\"),!1;let w={cmd:\"publish\",topic:e,payload:r,qos:a,retain:u,messageId:y,dup:c};switch(o.protocolVersion===5&&(w.properties=h),this.log(\"publish :: qos\",a),a){case 1:case 2:this.outgoing[w.messageId]={volatile:!1,cb:n||this.noop},this.log(\"MqttClient:publish: packet cmd: %s\",w.cmd),this._sendPacket(w,void 0,d);break;default:this.log(\"MqttClient:publish: packet cmd: %s\",w.cmd),this._sendPacket(w,n,d);break}return !0};return (this._storeProcessing||this._storeProcessingQueue.length>0||!g())&&this._storeProcessingQueue.push({invoke:g,cbStorePut:i.cbStorePut,callback:n}),this}publishAsync(e,r,i){return new Promise((n,o)=>{this.publish(e,r,i,(s,a)=>{s?o(s):n(a);});})}subscribe(e,r,i){let n=this.options.protocolVersion;typeof r==\"function\"&&(i=r),i=i||this.noop;let o=!1,s=[];typeof e==\"string\"?(e=[e],s=e):Array.isArray(e)?s=e:typeof e==\"object\"&&(o=e.resubscribe,delete e.resubscribe,s=Object.keys(e));let a=Dp.validateTopics(s);if(a!==null)return Fa(i,new Error(`Invalid topic ${a}`)),this;if(this._checkDisconnecting(i))return this.log(\"subscribe: discconecting true\"),this;let u={qos:0};n===5&&(u.nl=!1,u.rap=!1,u.rh=0),r=Object.assign(Object.assign({},u),r);let c=r.properties,h=[],d=(y,w)=>{if(w=w||r,!Object.prototype.hasOwnProperty.call(this._resubscribeTopics,y)||this._resubscribeTopics[y].qos{this.log(\"subscribe: array topic %s\",y),d(y);}):Object.keys(e).forEach(y=>{this.log(\"subscribe: object topic %s, %o\",y,e[y]),d(y,e[y]);}),!h.length)return i(null,[]),this;let g=()=>{let y=this._nextId();if(y===null)return this.log(\"No messageId left\"),!1;let w={cmd:\"subscribe\",subscriptions:h,messageId:y};if(c&&(w.properties=c),this.options.resubscribe){this.log(\"subscribe :: resubscribe true\");let E=[];h.forEach(S=>{if(this.options.reconnectPeriod>0){let I={qos:S.qos};n===5&&(I.nl=S.nl||!1,I.rap=S.rap||!1,I.rh=S.rh||0,I.properties=S.properties),this._resubscribeTopics[S.topic]=I,E.push(S.topic);}}),this.messageIdToTopic[w.messageId]=E;}return this.outgoing[w.messageId]={volatile:!0,cb(E,S){if(!E){let{granted:I}=S;for(let C=0;C0||!g())&&this._storeProcessingQueue.push({invoke:g,callback:i}),this}subscribeAsync(e,r){return new Promise((i,n)=>{this.subscribe(e,r,(o,s)=>{o?n(o):i(s);});})}unsubscribe(e,r,i){typeof e==\"string\"&&(e=[e]),typeof r==\"function\"&&(i=r),i=i||this.noop;let n=Dp.validateTopics(e);if(n!==null)return Fa(i,new Error(`Invalid topic ${n}`)),this;if(this._checkDisconnecting(i))return this;let o=()=>{let s=this._nextId();if(s===null)return this.log(\"No messageId left\"),!1;let a={cmd:\"unsubscribe\",messageId:s,unsubscriptions:[]};return typeof e==\"string\"?a.unsubscriptions=[e]:Array.isArray(e)&&(a.unsubscriptions=e),this.options.resubscribe&&a.unsubscriptions.forEach(u=>{delete this._resubscribeTopics[u];}),typeof r==\"object\"&&r.properties&&(a.properties=r.properties),this.outgoing[a.messageId]={volatile:!0,cb:i},this.log(\"unsubscribe: call _sendPacket\"),this._sendPacket(a),!0};return (this._storeProcessing||this._storeProcessingQueue.length>0||!o())&&this._storeProcessingQueue.push({invoke:o,callback:i}),this}unsubscribeAsync(e,r){return new Promise((i,n)=>{this.unsubscribe(e,r,(o,s)=>{o?n(o):i(s);});})}end(e,r,i){this.log(\"end :: (%s)\",this.options.clientId),(e==null||typeof e!=\"boolean\")&&(i=i||r,r=e,e=!1),typeof r!=\"object\"&&(i=i||r,r=null),this.log(\"end :: cb? %s\",!!i),(!i||typeof i!=\"function\")&&(i=this.noop);let n=()=>{this.log(\"end :: closeStores: closing incoming and outgoing stores\"),this.disconnected=!0,this.incomingStore.close(s=>{this.outgoingStore.close(a=>{if(this.log(\"end :: closeStores: emitting end\"),this.emit(\"end\"),i){let u=s||a;this.log(\"end :: closeStores: invoking callback with args\"),i(u);}});}),this._deferredReconnect&&this._deferredReconnect();},o=()=>{this.log(\"end :: (%s) :: finish :: calling _cleanUp with force %s\",this.options.clientId,e),this._cleanUp(e,()=>{this.log(\"end :: finish :: calling process.nextTick on closeStores\"),(0, Wa.nextTick)(n);},r);};return this.disconnecting?(i(),this):(this._clearReconnect(),this.disconnecting=!0,!e&&Object.keys(this.outgoing).length>0?(this.log(\"end :: (%s) :: calling finish in 10ms once outgoing is empty\",this.options.clientId),this.once(\"outgoingEmpty\",setTimeout.bind(null,o,10))):(this.log(\"end :: (%s) :: immediately calling finish\",this.options.clientId),o()),this)}endAsync(e,r){return new Promise((i,n)=>{this.end(e,r,o=>{o?n(o):i();});})}removeOutgoingMessage(e){if(this.outgoing[e]){let{cb:r}=this.outgoing[e];this._removeOutgoingAndStoreMessage(e,()=>{r(new Error(\"Message removed\"));});}return this}reconnect(e){this.log(\"client reconnect\");let r=()=>{e?(this.options.incomingStore=e.incomingStore,this.options.outgoingStore=e.outgoingStore):(this.options.incomingStore=null,this.options.outgoingStore=null),this.incomingStore=this.options.incomingStore||new rs.default,this.outgoingStore=this.options.outgoingStore||new rs.default,this.disconnecting=!1,this.disconnected=!1,this._deferredReconnect=null,this._reconnect();};return this.disconnecting&&!this.disconnected?this._deferredReconnect=r:r(),this}_flushVolatile(){this.outgoing&&(this.log(\"_flushVolatile :: deleting volatile messages from the queue and setting their callbacks as error function\"),Object.keys(this.outgoing).forEach(e=>{this.outgoing[e].volatile&&typeof this.outgoing[e].cb==\"function\"&&(this.outgoing[e].cb(new Error(\"Connection closed\")),delete this.outgoing[e]);}));}_flush(){this.outgoing&&(this.log(\"_flush: queue exists? %b\",!!this.outgoing),Object.keys(this.outgoing).forEach(e=>{typeof this.outgoing[e].cb==\"function\"&&(this.outgoing[e].cb(new Error(\"Connection closed\")),delete this.outgoing[e]);}));}_removeTopicAliasAndRecoverTopicName(e){let r;e.properties&&(r=e.properties.topicAlias);let i=e.topic.toString();if(this.log(\"_removeTopicAliasAndRecoverTopicName :: alias %d, topic %o\",r,i),i.length===0){if(typeof r>\"u\")return new Error(\"Unregistered Topic Alias\");if(i=this.topicAliasSend.getTopicByAlias(r),typeof i>\"u\")return new Error(\"Unregistered Topic Alias\");e.topic=i;}r&&delete e.properties.topicAlias;}_checkDisconnecting(e){return this.disconnecting&&(e&&e!==this.noop?e(new Error(\"client disconnecting\")):this.emit(\"error\",new Error(\"client disconnecting\"))),this.disconnecting}_reconnect(){this.log(\"_reconnect: emitting reconnect to client\"),this.emit(\"reconnect\"),this.connected?(this.end(()=>{this.connect();}),this.log(\"client already connected. disconnecting first.\")):(this.log(\"_reconnect: calling connect\"),this.connect());}_setupReconnect(){!this.disconnecting&&!this.reconnectTimer&&this.options.reconnectPeriod>0?(this.reconnecting||(this.log(\"_setupReconnect :: emit `offline` state\"),this.emit(\"offline\"),this.log(\"_setupReconnect :: set `reconnecting` to `true`\"),this.reconnecting=!0),this.log(\"_setupReconnect :: setting reconnectTimer for %d ms\",this.options.reconnectPeriod),this.reconnectTimer=setInterval(()=>{this.log(\"reconnectTimer :: reconnect triggered!\"),this._reconnect();},this.options.reconnectPeriod)):this.log(\"_setupReconnect :: doing nothing...\");}_clearReconnect(){this.log(\"_clearReconnect : clearing reconnect timer\"),this.reconnectTimer&&(clearInterval(this.reconnectTimer),this.reconnectTimer=null);}_cleanUp(e,r,i={}){if(r&&(this.log(\"_cleanUp :: done callback provided for on stream close\"),this.stream.on(\"close\",r)),this.log(\"_cleanUp :: forced? %s\",e),e)this.options.reconnectPeriod===0&&this.options.clean&&this._flush(),this.log(\"_cleanUp :: (%s) :: destroying stream\",this.options.clientId),this.stream.destroy();else {let n=Object.assign({cmd:\"disconnect\"},i);this.log(\"_cleanUp :: (%s) :: call _sendPacket with disconnect packet\",this.options.clientId),this._sendPacket(n,()=>{this.log(\"_cleanUp :: (%s) :: destroying stream\",this.options.clientId),Fa(()=>{this.stream.end(()=>{this.log(\"_cleanUp :: (%s) :: stream destroyed\",this.options.clientId);});});});}!this.disconnecting&&!this.reconnecting&&(this.log(\"_cleanUp :: client not disconnecting/reconnecting. Clearing and resetting reconnect.\"),this._clearReconnect(),this._setupReconnect()),this.pingTimer&&(this.log(\"_cleanUp :: clearing pingTimer\"),this.pingTimer.clear(),this.pingTimer=null),r&&!this.connected&&(this.log(\"_cleanUp :: (%s) :: removing stream `done` callback `close` listener\",this.options.clientId),this.stream.removeListener(\"close\",r),r());}_storeAndSend(e,r,i){this.log(\"storeAndSend :: store packet with cmd %s to outgoingStore\",e.cmd);let n=e,o;if(n.cmd===\"publish\"&&(n=(0, qp.default)(e),o=this._removeTopicAliasAndRecoverTopicName(n),o))return r&&r(o);this.outgoingStore.put(n,s=>{if(s)return r&&r(s);i(),this._writePacket(e,r);});}_applyTopicAlias(e){if(this.options.protocolVersion===5&&e.cmd===\"publish\"){let r;e.properties&&(r=e.properties.topicAlias);let i=e.topic.toString();if(this.topicAliasSend)if(r){if(i.length!==0&&(this.log(\"applyTopicAlias :: register topic: %s - alias: %d\",i,r),!this.topicAliasSend.put(i,r)))return this.log(\"applyTopicAlias :: error out of range. topic: %s - alias: %d\",i,r),new Error(\"Sending Topic Alias out of range\")}else i.length!==0&&(this.options.autoAssignTopicAlias?(r=this.topicAliasSend.getAliasByTopic(i),r?(e.topic=\"\",e.properties=Object.assign(Object.assign({},e.properties),{topicAlias:r}),this.log(\"applyTopicAlias :: auto assign(use) topic: %s - alias: %d\",i,r)):(r=this.topicAliasSend.getLruAlias(),this.topicAliasSend.put(i,r),e.properties=Object.assign(Object.assign({},e.properties),{topicAlias:r}),this.log(\"applyTopicAlias :: auto assign topic: %s - alias: %d\",i,r))):this.options.autoUseTopicAlias&&(r=this.topicAliasSend.getAliasByTopic(i),r&&(e.topic=\"\",e.properties=Object.assign(Object.assign({},e.properties),{topicAlias:r}),this.log(\"applyTopicAlias :: auto use topic: %s - alias: %d\",i,r))));else if(r)return this.log(\"applyTopicAlias :: error out of range. topic: %s - alias: %d\",i,r),new Error(\"Sending Topic Alias out of range\")}}_noop(e){this.log(\"noop ::\",e);}_writePacket(e,r){this.log(\"_writePacket :: packet: %O\",e),this.log(\"_writePacket :: emitting `packetsend`\"),this.emit(\"packetsend\",e),this._shiftPingInterval(),this.log(\"_writePacket :: writing to stream\");let i=ja.default.writeToStream(e,this.stream,this.options);this.log(\"_writePacket :: writeToStream result %s\",i),!i&&r&&r!==this.noop?(this.log(\"_writePacket :: handle events on `drain` once through callback.\"),this.stream.once(\"drain\",r)):r&&(this.log(\"_writePacket :: invoking cb\"),r());}_sendPacket(e,r,i,n){this.log(\"_sendPacket :: (%s) :: start\",this.options.clientId),i=i||this.noop,r=r||this.noop;let o=this._applyTopicAlias(e);if(o){r(o);return}if(!this.connected){if(e.cmd===\"auth\"){this._writePacket(e,r);return}this.log(\"_sendPacket :: client not connected. Storing packet offline.\"),this._storePacket(e,r,i);return}if(n){this._writePacket(e,r);return}switch(e.cmd){case\"publish\":break;case\"pubrel\":this._storeAndSend(e,r,i);return;default:this._writePacket(e,r);return}switch(e.qos){case 2:case 1:this._storeAndSend(e,r,i);break;case 0:default:this._writePacket(e,r);break}this.log(\"_sendPacket :: (%s) :: end\",this.options.clientId);}_storePacket(e,r,i){this.log(\"_storePacket :: packet: %o\",e),this.log(\"_storePacket :: cb? %s\",!!r),i=i||this.noop;let n=e;if(n.cmd===\"publish\"){n=(0, qp.default)(e);let s=this._removeTopicAliasAndRecoverTopicName(n);if(s)return r&&r(s)}let o=n.qos||0;o===0&&this.queueQoSZero||n.cmd!==\"publish\"?this.queue.push({packet:n,cb:r}):o>0?(r=this.outgoing[n.messageId]?this.outgoing[n.messageId].cb:null,this.outgoingStore.put(n,s=>{if(s)return r&&r(s);i();})):r&&r(new Error(\"No connection to broker\"));}_setupPingTimer(){this.log(\"_setupPingTimer :: keepalive %d (seconds)\",this.options.keepalive),!this.pingTimer&&this.options.keepalive&&(this.pingResp=!0,this.pingTimer=new Xv.default(this.options.keepalive,()=>{this._checkPing();},this.options.timerVariant));}_shiftPingInterval(){this.pingTimer&&this.options.keepalive&&this.options.reschedulePings&&this.pingTimer.reschedule();}_checkPing(){this.log(\"_checkPing :: checking ping...\"),this.pingResp?(this.log(\"_checkPing :: ping response received. Clearing flag and sending `pingreq`\"),this.pingResp=!1,this._sendPacket({cmd:\"pingreq\"})):(this.emit(\"error\",new Error(\"Keepalive timeout\")),this.log(\"_checkPing :: calling _cleanUp with force true\"),this._cleanUp(!0));}_resubscribe(){this.log(\"_resubscribe\");let e=Object.keys(this._resubscribeTopics);if(!this._firstConnection&&(this.options.clean||this.options.protocolVersion>=4&&!this.connackPacket.sessionPresent)&&e.length>0)if(this.options.resubscribe)if(this.options.protocolVersion===5){this.log(\"_resubscribe: protocolVersion 5\");for(let r=0;r{let i=this.outgoingStore.createStream(),n=()=>{i.destroy(),i=null,this._flushStoreProcessingQueue(),o();},o=()=>{this._storeProcessing=!1,this._packetIdsDuringStoreProcessing={};};this.once(\"close\",n),i.on(\"error\",a=>{o(),this._flushStoreProcessingQueue(),this.removeListener(\"close\",n),this.emit(\"error\",a);});let s=()=>{if(!i)return;let a=i.read(1),u;if(!a){i.once(\"readable\",s);return}if(this._storeProcessing=!0,this._packetIdsDuringStoreProcessing[a.messageId]){s();return}!this.disconnecting&&!this.reconnectTimer?(u=this.outgoing[a.messageId]?this.outgoing[a.messageId].cb:null,this.outgoing[a.messageId]={volatile:!1,cb(c,h){u&&u(c,h),s();}},this._packetIdsDuringStoreProcessing[a.messageId]=!0,this.messageIdProvider.register(a.messageId)?this._sendPacket(a,void 0,void 0,!0):this.log(\"messageId: %d has already used.\",a.messageId)):i.destroy&&i.destroy();};i.on(\"end\",()=>{let a=!0;for(let u in this._packetIdsDuringStoreProcessing)if(!this._packetIdsDuringStoreProcessing[u]){a=!1;break}this.removeListener(\"close\",n),a?(o(),this._invokeAllStoreProcessingQueue(),this.emit(\"connect\",e)):r();}),s();};r();}_invokeStoreProcessingQueue(){if(!this._storeProcessing&&this._storeProcessingQueue.length>0){let e=this._storeProcessingQueue[0];if(e&&e.invoke())return this._storeProcessingQueue.shift(),!0}return !1}_invokeAllStoreProcessingQueue(){for(;this._invokeStoreProcessingQueue(););}_flushStoreProcessingQueue(){for(let e of this._storeProcessingQueue)e.cbStorePut&&e.cbStorePut(new Error(\"Connection closed\")),e.callback&&e.callback(new Error(\"Connection closed\"));this._storeProcessingQueue.splice(0);}_removeOutgoingAndStoreMessage(e,r){delete this.outgoing[e],this.outgoingStore.del({messageId:e},(i,n)=>{r(i,n),this.messageIdProvider.deallocate(e),this._invokeStoreProcessingQueue();});}};is.VERSION=\"5.5.2\";Qe.default=is;});var $p=M(Ha=>{v();m();_();Object.defineProperty(Ha,\"__esModule\",{value:!0});var Zv=xa(),$a=class{constructor(){this.numberAllocator=new Zv.NumberAllocator(1,65535);}allocate(){return this.lastId=this.numberAllocator.alloc(),this.lastId}getLastAllocated(){return this.lastId}register(e){return this.numberAllocator.use(e)}deallocate(e){this.numberAllocator.free(e);}clear(){this.numberAllocator.clear();}};Ha.default=$a;});function Ir(t){throw new RangeError(iE[t])}function Hp(t,e){let r=t.split(\"@\"),i=\"\";r.length>1&&(i=r[0]+\"@\",t=r[1]);let n=function(o,s){let a=[],u=o.length;for(;u--;)a[u]=s(o[u]);return a}((t=t.replace(rE,\".\")).split(\".\"),e).join(\".\");return i+n}function Gp(t){let e=[],r=0,i=t.length;for(;r=55296&&n<=56319&&r{v();m();_();eE=/^xn--/,tE=/[^\\0-\\x7E]/,rE=/[\\x2E\\u3002\\uFF0E\\uFF61]/g,iE={overflow:\"Overflow: input needs wider integers to process\",\"not-basic\":\"Illegal input >= 0x80 (not a basic code point)\",\"invalid-input\":\"Invalid input\"},ht=Math.floor,Va=String.fromCharCode;Vp=function(t,e){return t+22+75*(t<26)-((e!=0)<<5)},Qp=function(t,e,r){let i=0;for(t=r?ht(t/700):t>>1,t+=ht(t/e);t>455;i+=36)t=ht(t/35);return ht(i+36*t/(t+38))},zp=function(t){let e=[],r=t.length,i=0,n=128,o=72,s=t.lastIndexOf(\"-\");s<0&&(s=0);for(let u=0;u=128&&Ir(\"not-basic\"),e.push(t.charCodeAt(u));for(let u=s>0?s+1:0;u=r&&Ir(\"invalid-input\");let y=(a=t.charCodeAt(u++))-48<10?a-22:a-65<26?a-65:a-97<26?a-97:36;(y>=36||y>ht((2147483647-i)/d))&&Ir(\"overflow\"),i+=y*d;let w=g<=o?1:g>=o+26?26:g-o;if(yht(2147483647/E)&&Ir(\"overflow\"),d*=E;}let h=e.length+1;o=Qp(i-c,h,c==0),ht(i/h)>2147483647-n&&Ir(\"overflow\"),n+=ht(i/h),i%=h,e.splice(i++,0,n);}var a;return String.fromCodePoint(...e)},Kp=function(t){let e=[],r=(t=Gp(t)).length,i=128,n=0,o=72;for(let u of t)u<128&&e.push(Va(u));let s=e.length,a=s;for(s&&e.push(\"-\");a=i&&hht((2147483647-n)/c)&&Ir(\"overflow\"),n+=(u-i)*c,i=u;for(let h of t)if(h2147483647&&Ir(\"overflow\"),h==i){let d=n;for(let g=36;;g+=36){let y=g<=o?1:g>=o+26?26:g-o;if(dString.fromCodePoint(...t)},decode:zp,encode:Kp,toASCII:function(t){return Hp(t,function(e){return tE.test(e)?\"xn--\"+Kp(e):e})},toUnicode:function(t){return Hp(t,function(e){return eE.test(e)?zp(e.slice(4).toLowerCase()):e})}};zt.decode;zt.encode;zt.toASCII;zt.toUnicode;zt.ucs2;zt.version;});function nE(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var sE,ki,oE,dt,Jp=we(()=>{v();m();_();sE=function(t,e,r,i){e=e||\"&\",r=r||\"=\";var n={};if(typeof t!=\"string\"||t.length===0)return n;var o=/\\+/g;t=t.split(e);var s=1e3;i&&typeof i.maxKeys==\"number\"&&(s=i.maxKeys);var a=t.length;s>0&&a>s&&(a=s);for(var u=0;u=0?(c=y.substr(0,w),h=y.substr(w+1)):(c=y,h=\"\"),d=decodeURIComponent(c),g=decodeURIComponent(h),nE(n,d)?Array.isArray(n[d])?n[d].push(g):n[d]=[n[d],g]:n[d]=g;}return n},ki=function(t){switch(typeof t){case\"string\":return t;case\"boolean\":return t?\"true\":\"false\";case\"number\":return isFinite(t)?t:\"\";default:return \"\"}},oE=function(t,e,r,i){return e=e||\"&\",r=r||\"=\",t===null&&(t=void 0),typeof t==\"object\"?Object.keys(t).map(function(n){var o=encodeURIComponent(ki(n))+r;return Array.isArray(t[n])?t[n].map(function(s){return o+encodeURIComponent(ki(s))}).join(e):o+encodeURIComponent(ki(t[n]))}).join(e):i?encodeURIComponent(ki(i))+r+encodeURIComponent(ki(t)):\"\"},dt={};dt.decode=dt.parse=sE,dt.encode=dt.stringify=oE;dt.decode;dt.encode;dt.parse;dt.stringify;});function za(){throw new Error(\"setTimeout has not been defined\")}function Ka(){throw new Error(\"clearTimeout has not been defined\")}function eg(t){if(Bt===setTimeout)return setTimeout(t,0);if((Bt===za||!Bt)&&setTimeout)return Bt=setTimeout,setTimeout(t,0);try{return Bt(t,0)}catch{try{return Bt.call(null,t,0)}catch{return Bt.call(this||ii,t,0)}}}function aE(){ri&&Tr&&(ri=!1,Tr.length?Ot=Tr.concat(Ot):ss=-1,Ot.length&&tg());}function tg(){if(!ri){var t=eg(aE);ri=!0;for(var e=Ot.length;e;){for(Tr=Ot,Ot=[];++ss{v();m();_();ii=typeof globalThis<\"u\"?globalThis:typeof self<\"u\"?self:global,fe=Zp={};(function(){try{Bt=typeof setTimeout==\"function\"?setTimeout:za;}catch{Bt=za;}try{Pt=typeof clearTimeout==\"function\"?clearTimeout:Ka;}catch{Pt=Ka;}})();Ot=[],ri=!1,ss=-1;fe.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r1)for(var I=1;I{v();m();_();Ga={},ig=!1,ni=typeof globalThis<\"u\"?globalThis:typeof self<\"u\"?self:global;re=lE();re.platform=\"browser\";re.addListener;re.argv;re.binding;re.browser;re.chdir;re.cwd;re.emit;re.env;re.listeners;re.nextTick;re.off;re.on;re.once;re.prependListener;re.prependOnceListener;re.removeAllListeners;re.removeListener;re.title;re.umask;re.version;re.versions;});function uE(){if(ng)return Ya;ng=!0;var t=re;function e(o){if(typeof o!=\"string\")throw new TypeError(\"Path must be a string. Received \"+JSON.stringify(o))}function r(o,s){for(var a=\"\",u=0,c=-1,h=0,d,g=0;g<=o.length;++g){if(g2){var y=a.lastIndexOf(\"/\");if(y!==a.length-1){y===-1?(a=\"\",u=0):(a=a.slice(0,y),u=a.length-1-a.lastIndexOf(\"/\")),c=g,h=0;continue}}else if(a.length===2||a.length===1){a=\"\",u=0,c=g,h=0;continue}}s&&(a.length>0?a+=\"/..\":a=\"..\",u=2);}else a.length>0?a+=\"/\"+o.slice(c+1,g):a=o.slice(c+1,g),u=g-c-1;c=g,h=0;}else d===46&&h!==-1?++h:h=-1;}return a}function i(o,s){var a=s.dir||s.root,u=s.base||(s.name||\"\")+(s.ext||\"\");return a?a===s.root?a+u:a+o+u:u}var n={resolve:function(){for(var s=\"\",a=!1,u,c=arguments.length-1;c>=-1&&!a;c--){var h;c>=0?h=arguments[c]:(u===void 0&&(u=t.cwd()),h=u),e(h),h.length!==0&&(s=h+\"/\"+s,a=h.charCodeAt(0)===47);}return s=r(s,!a),a?s.length>0?\"/\"+s:\"/\":s.length>0?s:\".\"},normalize:function(s){if(e(s),s.length===0)return \".\";var a=s.charCodeAt(0)===47,u=s.charCodeAt(s.length-1)===47;return s=r(s,!a),s.length===0&&!a&&(s=\".\"),s.length>0&&u&&(s+=\"/\"),a?\"/\"+s:s},isAbsolute:function(s){return e(s),s.length>0&&s.charCodeAt(0)===47},join:function(){if(arguments.length===0)return \".\";for(var s,a=0;a0&&(s===void 0?s=u:s+=\"/\"+u);}return s===void 0?\".\":n.normalize(s)},relative:function(s,a){if(e(s),e(a),s===a||(s=n.resolve(s),a=n.resolve(a),s===a))return \"\";for(var u=1;uw){if(a.charCodeAt(d+S)===47)return a.slice(d+S+1);if(S===0)return a.slice(d+S)}else h>w&&(s.charCodeAt(u+S)===47?E=S:S===0&&(E=0));break}var I=s.charCodeAt(u+S),C=a.charCodeAt(d+S);if(I!==C)break;I===47&&(E=S);}var R=\"\";for(S=u+E+1;S<=c;++S)(S===c||s.charCodeAt(S)===47)&&(R.length===0?R+=\"..\":R+=\"/..\");return R.length>0?R+a.slice(d+E):(d+=E,a.charCodeAt(d)===47&&++d,a.slice(d))},_makeLong:function(s){return s},dirname:function(s){if(e(s),s.length===0)return \".\";for(var a=s.charCodeAt(0),u=a===47,c=-1,h=!0,d=s.length-1;d>=1;--d)if(a=s.charCodeAt(d),a===47){if(!h){c=d;break}}else h=!1;return c===-1?u?\"/\":\".\":u&&c===1?\"//\":s.slice(0,c)},basename:function(s,a){if(a!==void 0&&typeof a!=\"string\")throw new TypeError('\"ext\" argument must be a string');e(s);var u=0,c=-1,h=!0,d;if(a!==void 0&&a.length>0&&a.length<=s.length){if(a.length===s.length&&a===s)return \"\";var g=a.length-1,y=-1;for(d=s.length-1;d>=0;--d){var w=s.charCodeAt(d);if(w===47){if(!h){u=d+1;break}}else y===-1&&(h=!1,y=d+1),g>=0&&(w===a.charCodeAt(g)?--g===-1&&(c=d):(g=-1,c=y));}return u===c?c=y:c===-1&&(c=s.length),s.slice(u,c)}else {for(d=s.length-1;d>=0;--d)if(s.charCodeAt(d)===47){if(!h){u=d+1;break}}else c===-1&&(h=!1,c=d+1);return c===-1?\"\":s.slice(u,c)}},extname:function(s){e(s);for(var a=-1,u=0,c=-1,h=!0,d=0,g=s.length-1;g>=0;--g){var y=s.charCodeAt(g);if(y===47){if(!h){u=g+1;break}continue}c===-1&&(h=!1,c=g+1),y===46?a===-1?a=g:d!==1&&(d=1):a!==-1&&(d=-1);}return a===-1||c===-1||d===0||d===1&&a===c-1&&a===u+1?\"\":s.slice(a,c)},format:function(s){if(s===null||typeof s!=\"object\")throw new TypeError('The \"pathObject\" argument must be of type Object. Received type '+typeof s);return i(\"/\",s)},parse:function(s){e(s);var a={root:\"\",dir:\"\",base:\"\",ext:\"\",name:\"\"};if(s.length===0)return a;var u=s.charCodeAt(0),c=u===47,h;c?(a.root=\"/\",h=1):h=0;for(var d=-1,g=0,y=-1,w=!0,E=s.length-1,S=0;E>=h;--E){if(u=s.charCodeAt(E),u===47){if(!w){g=E+1;break}continue}y===-1&&(w=!1,y=E+1),u===46?d===-1?d=E:S!==1&&(S=1):d!==-1&&(S=-1);}return d===-1||y===-1||S===0||S===1&&d===y-1&&d===g+1?y!==-1&&(g===0&&c?a.base=a.name=s.slice(1,y):a.base=a.name=s.slice(g,y)):(g===0&&c?(a.name=s.slice(1,d),a.base=s.slice(1,y)):(a.name=s.slice(g,d),a.base=s.slice(g,y)),a.ext=s.slice(d,y)),g>0?a.dir=s.slice(0,g-1):c&&(a.dir=\"/\"),a},sep:\"/\",delimiter:\":\",win32:null,posix:null};return n.posix=n,Ya=n,Ya}var Ya,ng,Ja,sg=we(()=>{v();m();_();Qa();Ya={},ng=!1;Ja=uE();});var dg={};Qt(dg,{URL:()=>DE,Url:()=>ME,default:()=>Z,fileURLToPath:()=>cg,format:()=>LE,parse:()=>qE,pathToFileURL:()=>hg,resolve:()=>UE,resolveObject:()=>NE});function Fe(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null;}function xi(t,e,r){if(t&&pt.isObject(t)&&t instanceof Fe)return t;var i=new Fe;return i.parse(t,e,r),i}function bE(){if(ug)return el;ug=!0;var t=ne;function e(o){if(typeof o!=\"string\")throw new TypeError(\"Path must be a string. Received \"+JSON.stringify(o))}function r(o,s){for(var a=\"\",u=0,c=-1,h=0,d,g=0;g<=o.length;++g){if(g2){var y=a.lastIndexOf(\"/\");if(y!==a.length-1){y===-1?(a=\"\",u=0):(a=a.slice(0,y),u=a.length-1-a.lastIndexOf(\"/\")),c=g,h=0;continue}}else if(a.length===2||a.length===1){a=\"\",u=0,c=g,h=0;continue}}s&&(a.length>0?a+=\"/..\":a=\"..\",u=2);}else a.length>0?a+=\"/\"+o.slice(c+1,g):a=o.slice(c+1,g),u=g-c-1;c=g,h=0;}else d===46&&h!==-1?++h:h=-1;}return a}function i(o,s){var a=s.dir||s.root,u=s.base||(s.name||\"\")+(s.ext||\"\");return a?a===s.root?a+u:a+o+u:u}var n={resolve:function(){for(var s=\"\",a=!1,u,c=arguments.length-1;c>=-1&&!a;c--){var h;c>=0?h=arguments[c]:(u===void 0&&(u=t.cwd()),h=u),e(h),h.length!==0&&(s=h+\"/\"+s,a=h.charCodeAt(0)===47);}return s=r(s,!a),a?s.length>0?\"/\"+s:\"/\":s.length>0?s:\".\"},normalize:function(s){if(e(s),s.length===0)return \".\";var a=s.charCodeAt(0)===47,u=s.charCodeAt(s.length-1)===47;return s=r(s,!a),s.length===0&&!a&&(s=\".\"),s.length>0&&u&&(s+=\"/\"),a?\"/\"+s:s},isAbsolute:function(s){return e(s),s.length>0&&s.charCodeAt(0)===47},join:function(){if(arguments.length===0)return \".\";for(var s,a=0;a0&&(s===void 0?s=u:s+=\"/\"+u);}return s===void 0?\".\":n.normalize(s)},relative:function(s,a){if(e(s),e(a),s===a||(s=n.resolve(s),a=n.resolve(a),s===a))return \"\";for(var u=1;uw){if(a.charCodeAt(d+S)===47)return a.slice(d+S+1);if(S===0)return a.slice(d+S)}else h>w&&(s.charCodeAt(u+S)===47?E=S:S===0&&(E=0));break}var I=s.charCodeAt(u+S),C=a.charCodeAt(d+S);if(I!==C)break;I===47&&(E=S);}var R=\"\";for(S=u+E+1;S<=c;++S)(S===c||s.charCodeAt(S)===47)&&(R.length===0?R+=\"..\":R+=\"/..\");return R.length>0?R+a.slice(d+E):(d+=E,a.charCodeAt(d)===47&&++d,a.slice(d))},_makeLong:function(s){return s},dirname:function(s){if(e(s),s.length===0)return \".\";for(var a=s.charCodeAt(0),u=a===47,c=-1,h=!0,d=s.length-1;d>=1;--d)if(a=s.charCodeAt(d),a===47){if(!h){c=d;break}}else h=!1;return c===-1?u?\"/\":\".\":u&&c===1?\"//\":s.slice(0,c)},basename:function(s,a){if(a!==void 0&&typeof a!=\"string\")throw new TypeError('\"ext\" argument must be a string');e(s);var u=0,c=-1,h=!0,d;if(a!==void 0&&a.length>0&&a.length<=s.length){if(a.length===s.length&&a===s)return \"\";var g=a.length-1,y=-1;for(d=s.length-1;d>=0;--d){var w=s.charCodeAt(d);if(w===47){if(!h){u=d+1;break}}else y===-1&&(h=!1,y=d+1),g>=0&&(w===a.charCodeAt(g)?--g===-1&&(c=d):(g=-1,c=y));}return u===c?c=y:c===-1&&(c=s.length),s.slice(u,c)}else {for(d=s.length-1;d>=0;--d)if(s.charCodeAt(d)===47){if(!h){u=d+1;break}}else c===-1&&(h=!1,c=d+1);return c===-1?\"\":s.slice(u,c)}},extname:function(s){e(s);for(var a=-1,u=0,c=-1,h=!0,d=0,g=s.length-1;g>=0;--g){var y=s.charCodeAt(g);if(y===47){if(!h){u=g+1;break}continue}c===-1&&(h=!1,c=g+1),y===46?a===-1?a=g:d!==1&&(d=1):a!==-1&&(d=-1);}return a===-1||c===-1||d===0||d===1&&a===c-1&&a===u+1?\"\":s.slice(a,c)},format:function(s){if(s===null||typeof s!=\"object\")throw new TypeError('The \"pathObject\" argument must be of type Object. Received type '+typeof s);return i(\"/\",s)},parse:function(s){e(s);var a={root:\"\",dir:\"\",base:\"\",ext:\"\",name:\"\"};if(s.length===0)return a;var u=s.charCodeAt(0),c=u===47,h;c?(a.root=\"/\",h=1):h=0;for(var d=-1,g=0,y=-1,w=!0,E=s.length-1,S=0;E>=h;--E){if(u=s.charCodeAt(E),u===47){if(!w){g=E+1;break}continue}y===-1&&(w=!1,y=E+1),u===46?d===-1?d=E:S!==1&&(S=1):d!==-1&&(S=-1);}return d===-1||y===-1||S===0||S===1&&d===y-1&&d===g+1?y!==-1&&(g===0&&c?a.base=a.name=s.slice(1,y):a.base=a.name=s.slice(g,y)):(g===0&&c?(a.name=s.slice(1,d),a.base=s.slice(1,y)):(a.name=s.slice(g,d),a.base=s.slice(g,y)),a.ext=s.slice(d,y)),g>0?a.dir=s.slice(0,g-1):c&&(a.dir=\"/\"),a},sep:\"/\",delimiter:\":\",win32:null,posix:null};return n.posix=n,el=n,el}function BE(t){if(typeof t==\"string\")t=new URL(t);else if(!(t instanceof URL))throw new Deno.errors.InvalidData(\"invalid argument path , must be a string or URL\");if(t.protocol!==\"file:\")throw new Deno.errors.InvalidData(\"invalid url scheme\");return rl?PE(t):OE(t)}function PE(t){let e=t.hostname,r=t.pathname;for(let i=0;iEE||n!==\":\")throw new Deno.errors.InvalidData(\"file url path must be absolute\");return r.slice(1)}}function OE(t){if(t.hostname!==\"\")throw new Deno.errors.InvalidData(\"invalid file url hostname\");let e=t.pathname;for(let r=0;r$E||n!==\":\")throw new Deno.errors.InvalidData(\"file url path must be absolute\");return r.slice(1)}}function JE(t){if(t.hostname!==\"\")throw new Deno.errors.InvalidData(\"invalid file url hostname\");let e=t.pathname;for(let r=0;r{v();m();_();Yp();Jp();rg();sg();Qa();Z={},fE=zt,pt={isString:function(t){return typeof t==\"string\"},isObject:function(t){return typeof t==\"object\"&&t!==null},isNull:function(t){return t===null},isNullOrUndefined:function(t){return t==null}};Z.parse=xi,Z.resolve=function(t,e){return xi(t,!1,!0).resolve(e)},Z.resolveObject=function(t,e){return t?xi(t,!1,!0).resolveObject(e):e},Z.format=function(t){return pt.isString(t)&&(t=xi(t)),t instanceof Fe?t.format():Fe.prototype.format.call(t)},Z.Url=Fe;cE=/^([a-z0-9.+-]+:)/i,hE=/:[0-9]*$/,dE=/^(\\/\\/?(?!\\/)[^\\?\\s]*)(\\?[^\\s]*)?$/,pE=[\"{\",\"}\",\"|\",\"\\\\\",\"^\",\"`\"].concat([\"<\",\">\",'\"',\"`\",\" \",\"\\r\",`\n`,\"\t\"]),tl=[\"'\"].concat(pE),og=[\"%\",\"/\",\"?\",\";\",\"#\"].concat(tl),ag=[\"/\",\"?\",\"#\"],lg=/^[+a-z0-9A-Z_-]{0,63}$/,gE=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,yE={javascript:!0,\"javascript:\":!0},Xa={javascript:!0,\"javascript:\":!0},si={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,\"http:\":!0,\"https:\":!0,\"ftp:\":!0,\"gopher:\":!0,\"file:\":!0},Za=dt;Fe.prototype.parse=function(t,e,r){if(!pt.isString(t))throw new TypeError(\"Parameter 'url' must be a string, not \"+typeof t);var i=t.indexOf(\"?\"),n=i!==-1&&i127?U+=\"x\":U+=R[N];if(!U.match(lg)){var K=I.slice(0,w),z=I.slice(w+1),Q=R.match(gE);Q&&(K.push(Q[1]),z.unshift(Q[2])),z.length&&(s=\"/\"+z.join(\".\")+s),this.hostname=K.join(\".\");break}}}this.hostname.length>255?this.hostname=\"\":this.hostname=this.hostname.toLowerCase(),S||(this.hostname=fE.toASCII(this.hostname));var de=this.port?\":\"+this.port:\"\",Gt=this.hostname||\"\";this.host=Gt+de,this.href+=this.host,S&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),s[0]!==\"/\"&&(s=\"/\"+s));}if(!yE[c])for(w=0,C=tl.length;w0)&&r.host.split(\"@\"))&&(r.auth=Q.shift(),r.host=r.hostname=Q.shift())),r.search=t.search,r.query=t.query,pt.isNull(r.pathname)&&pt.isNull(r.search)||(r.path=(r.pathname?r.pathname:\"\")+(r.search?r.search:\"\")),r.href=r.format(),r;if(!R.length)return r.pathname=null,r.search?r.path=\"/\"+r.search:r.path=null,r.href=r.format(),r;for(var N=R.slice(-1)[0],W=(r.host||t.host||R.length>1)&&(N===\".\"||N===\"..\")||N===\"\",K=0,z=R.length;z>=0;z--)(N=R[z])===\".\"?R.splice(z,1):N===\"..\"?(R.splice(z,1),K++):K&&(R.splice(z,1),K--);if(!I&&!C)for(;K--;K)R.unshift(\"..\");!I||R[0]===\"\"||R[0]&&R[0].charAt(0)===\"/\"||R.unshift(\"\"),W&&R.join(\"/\").substr(-1)!==\"/\"&&R.push(\"\");var Q,de=R[0]===\"\"||R[0]&&R[0].charAt(0)===\"/\";return U&&(r.hostname=r.host=de?\"\":R.length?R.shift():\"\",(Q=!!(r.host&&r.host.indexOf(\"@\")>0)&&r.host.split(\"@\"))&&(r.auth=Q.shift(),r.host=r.hostname=Q.shift())),(I=I||r.host&&R.length)&&!de&&R.unshift(\"\"),R.length?r.pathname=R.join(\"/\"):(r.pathname=null,r.path=null),pt.isNull(r.pathname)&&pt.isNull(r.search)||(r.path=(r.pathname?r.pathname:\"\")+(r.search?r.search:\"\")),r.auth=t.auth||r.auth,r.slashes=r.slashes||t.slashes,r.href=r.format(),r},Fe.prototype.parseHost=function(){var t=this.host,e=hE.exec(t);e&&((e=e[0])!==\":\"&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t);};Z.Url;Z.format;Z.resolve;Z.resolveObject;el={},ug=!1;fg=bE(),wE=typeof Deno<\"u\"?Deno.build.os===\"windows\"?\"win32\":Deno.build.os:void 0;Z.URL=typeof URL<\"u\"?URL:null;Z.pathToFileURL=kE;Z.fileURLToPath=BE;Z.Url;Z.format;Z.resolve;Z.resolveObject;Z.URL;_E=92,mE=47,vE=97,EE=122,rl=wE===\"win32\",SE=/\\//g,AE=/%/g,IE=/\\\\/g,TE=/\\n/g,RE=/\\r/g,CE=/\\t/g;xE=typeof Deno<\"u\"?Deno.build.os===\"windows\"?\"win32\":Deno.build.os:void 0;Z.URL=typeof URL<\"u\"?URL:null;Z.pathToFileURL=hg;Z.fileURLToPath=cg;ME=Z.Url,LE=Z.format,UE=Z.resolve,NE=Z.resolveObject,qE=Z.parse,DE=Z.URL,jE=92,FE=47,WE=97,$E=122,il=xE===\"win32\",HE=/\\//g,VE=/%/g,zE=/\\\\/g,KE=/\\n/g,GE=/\\r/g,QE=/\\t/g;});var nl={};Qt(nl,{Server:()=>Me,Socket:()=>Me,Stream:()=>Me,_createServerHandle:()=>Me,_normalizeArgs:()=>Me,_setSimultaneousAccepts:()=>Me,connect:()=>Me,createConnection:()=>Me,createServer:()=>Me,default:()=>XE,isIP:()=>Me,isIPv4:()=>Me,isIPv6:()=>Me});function Me(){throw new Error(\"Node.js net module is not supported by JSPM core outside of Node.js\")}var XE,sl=we(()=>{v();m();_();XE={_createServerHandle:Me,_normalizeArgs:Me,_setSimultaneousAccepts:Me,connect:Me,createConnection:Me,createServer:Me,isIP:Me,isIPv4:Me,isIPv6:Me,Server:Me,Socket:Me,Stream:Me};});var ol=M(Mi=>{v();m();_();var gg=Mi&&Mi.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Mi,\"__esModule\",{value:!0});var ZE=gg((sl(),X(nl))),eS=gg(ot()),tS=(0, eS.default)(\"mqttjs:tcp\"),rS=(t,e)=>{e.port=e.port||1883,e.hostname=e.hostname||e.host||\"localhost\";let{port:r}=e,i=e.hostname;return tS(\"port %d and host %s\",r,i),ZE.default.createConnection(r,i)};Mi.default=rS;});var yg={};Qt(yg,{default:()=>iS});var iS,bg=we(()=>{v();m();_();iS={};});var ll=M(Li=>{v();m();_();var al=Li&&Li.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Li,\"__esModule\",{value:!0});var nS=al((bg(),X(yg))),sS=al((sl(),X(nl))),oS=al(ot()),aS=(0, oS.default)(\"mqttjs:tls\"),lS=(t,e)=>{e.port=e.port||8883,e.host=e.hostname||e.host||\"localhost\",sS.default.isIP(e.host)===0&&(e.servername=e.host),e.rejectUnauthorized=e.rejectUnauthorized!==!1,delete e.path,aS(\"port %d host %s rejectUnauthorized %b\",e.port,e.host,e.rejectUnauthorized);let r=nS.default.connect(e);r.on(\"secureConnect\",()=>{e.rejectUnauthorized&&!r.authorized?r.emit(\"error\",new Error(\"TLS not authorized\")):r.removeListener(\"error\",i);});function i(n){e.rejectUnauthorized&&t.emit(\"error\",n),r.end();}return r.on(\"error\",i),r};Li.default=lS;});var os=M(oi=>{v();m();_();Object.defineProperty(oi,\"__esModule\",{value:!0});oi.BufferedDuplex=oi.writev=void 0;var uS=Dt(),wg=(ye(),X(_e));function _g(t,e){let r=new Array(t.length);for(let i=0;i{this.push(n);});}_read(e){this.proxy.read(e);}_write(e,r,i){this.isSocketOpen?this.writeToProxy(e,r,i):this.writeQueue.push({chunk:e,encoding:r,cb:i});}_final(e){this.writeQueue=[],this.proxy.end(e);}_destroy(e,r){this.writeQueue=[],this.proxy.destroy(),r(e);}socketReady(){this.emit(\"connect\"),this.isSocketOpen=!0,this.processWriteQueue();}writeToProxy(e,r,i){this.proxy.write(e,r)===!1?this.proxy.once(\"drain\",i):i();}processWriteQueue(){for(;this.writeQueue.length>0;){let{chunk:e,encoding:r,cb:i}=this.writeQueue.shift();this.writeToProxy(e,r,i);}}};oi.BufferedDuplex=ul;});var hl=M(cl=>{v();m();_();Object.defineProperty(cl,\"__esModule\",{value:!0});var mg=(ye(),X(_e)),fS=Dt(),cS=os(),gt,fl,Le;function hS(){let t=new fS.Transform;return t._write=(e,r,i)=>{gt.send({data:e.buffer,success(){i();},fail(n){i(new Error(n));}});},t._flush=e=>{gt.close({success(){e();}});},t}function dS(t){t.hostname||(t.hostname=\"localhost\"),t.path||(t.path=\"/\"),t.wsOptions||(t.wsOptions={});}function pS(t,e){let r=t.protocol===\"wxs\"?\"wss\":\"ws\",i=`${r}://${t.hostname}${t.path}`;return t.port&&t.port!==80&&t.port!==443&&(i=`${r}://${t.hostname}:${t.port}${t.path}`),typeof t.transformWsUrl==\"function\"&&(i=t.transformWsUrl(i,t,e)),i}function gS(){gt.onOpen(()=>{Le.socketReady();}),gt.onMessage(t=>{let{data:e}=t;e instanceof ArrayBuffer?e=mg.Buffer.from(e):e=mg.Buffer.from(e,\"utf8\"),fl.push(e);}),gt.onClose(()=>{Le.emit(\"close\"),Le.end(),Le.destroy();}),gt.onError(t=>{let e=new Error(t.errMsg);Le.destroy(e);});}var yS=(t,e)=>{if(e.hostname=e.hostname||e.host,!e.hostname)throw new Error(\"Could not determine host. Specify host manually.\");let r=e.protocolId===\"MQIsdp\"&&e.protocolVersion===3?\"mqttv3.1\":\"mqtt\";dS(e);let i=pS(e,t);gt=wx.connectSocket({url:i,protocols:[r]}),fl=hS(),Le=new cS.BufferedDuplex(e,fl,gt),Le._destroy=(o,s)=>{gt.close({success(){s&&s(o);}});};let n=Le.destroy;return Le.destroy=(o,s)=>(Le.destroy=n,setTimeout(()=>{gt.close({fail(){Le._destroy(o,s);}});},0),Le),gS(),Le};cl.default=yS;});var gl=M(pl=>{v();m();_();Object.defineProperty(pl,\"__esModule\",{value:!0});var dl=(ye(),X(_e)),bS=Dt(),wS=os(),kt,as,ai,vg=!1;function _S(){let t=new bS.Transform;return t._write=(e,r,i)=>{kt.sendSocketMessage({data:e.buffer,success(){i();},fail(){i(new Error);}});},t._flush=e=>{kt.closeSocket({success(){e();}});},t}function mS(t){t.hostname||(t.hostname=\"localhost\"),t.path||(t.path=\"/\"),t.wsOptions||(t.wsOptions={});}function vS(t,e){let r=t.protocol===\"alis\"?\"wss\":\"ws\",i=`${r}://${t.hostname}${t.path}`;return t.port&&t.port!==80&&t.port!==443&&(i=`${r}://${t.hostname}:${t.port}${t.path}`),typeof t.transformWsUrl==\"function\"&&(i=t.transformWsUrl(i,t,e)),i}function ES(){vg||(vg=!0,kt.onSocketOpen(()=>{ai.socketReady();}),kt.onSocketMessage(t=>{if(typeof t.data==\"string\"){let e=dl.Buffer.from(t.data,\"base64\");as.push(e);}else {let e=new FileReader;e.addEventListener(\"load\",()=>{let r=e.result;r instanceof ArrayBuffer?r=dl.Buffer.from(r):r=dl.Buffer.from(r,\"utf8\"),as.push(r);}),e.readAsArrayBuffer(t.data);}}),kt.onSocketClose(()=>{ai.end(),ai.destroy();}),kt.onSocketError(t=>{ai.destroy(t);}));}var SS=(t,e)=>{if(e.hostname=e.hostname||e.host,!e.hostname)throw new Error(\"Could not determine host. Specify host manually.\");let r=e.protocolId===\"MQIsdp\"&&e.protocolVersion===3?\"mqttv3.1\":\"mqtt\";mS(e);let i=vS(e,t);return kt=e.my,kt.connectSocket({url:i,protocols:r}),as=_S(),ai=new wS.BufferedDuplex(e,as,kt),ES(),ai};pl.default=SS;});var Sg=M((PD,Eg)=>{v();m();_();Eg.exports=function(){throw new Error(\"ws does not work in the browser. Browser clients must use the native WebSocket object\")};});var _l=M(Ui=>{v();m();_();var wl=Ui&&Ui.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Ui,\"__esModule\",{value:!0});var yl=(ye(),X(_e)),Ag=wl(Sg()),AS=wl(ot()),IS=Dt(),Ig=wl(Pi()),bl=os(),Kt=(0, AS.default)(\"mqttjs:ws\"),TS=[\"rejectUnauthorized\",\"ca\",\"cert\",\"key\",\"pfx\",\"passphrase\"];function Tg(t,e){let r=`${t.protocol}://${t.hostname}:${t.port}${t.path}`;return typeof t.transformWsUrl==\"function\"&&(r=t.transformWsUrl(r,t,e)),r}function Rg(t){let e=t;return t.hostname||(e.hostname=\"localhost\"),t.port||(t.protocol===\"wss\"?e.port=443:e.port=80),t.path||(e.path=\"/\"),t.wsOptions||(e.wsOptions={}),!Ig.default&&t.protocol===\"wss\"&&TS.forEach(r=>{Object.prototype.hasOwnProperty.call(t,r)&&!Object.prototype.hasOwnProperty.call(t.wsOptions,r)&&(e.wsOptions[r]=t[r]);}),e}function RS(t){let e=Rg(t);if(e.hostname||(e.hostname=e.host),!e.hostname){if(typeof document>\"u\")throw new Error(\"Could not determine host. Specify host manually.\");let r=new URL(document.URL);e.hostname=r.hostname,e.port||(e.port=Number(r.port));}return e.objectMode===void 0&&(e.objectMode=!(e.binary===!0||e.binary===void 0)),e}function CS(t,e,r){Kt(\"createWebSocket\"),Kt(`protocol: ${r.protocolId} ${r.protocolVersion}`);let i=r.protocolId===\"MQIsdp\"&&r.protocolVersion===3?\"mqttv3.1\":\"mqtt\";Kt(`creating new Websocket for url: ${e} and protocol: ${i}`);let n;return r.createWebsocket?n=r.createWebsocket(e,[i],r):n=new Ag.default(e,[i],r.wsOptions),n}function BS(t,e){let r=e.protocolId===\"MQIsdp\"&&e.protocolVersion===3?\"mqttv3.1\":\"mqtt\",i=Tg(e,t),n;return e.createWebsocket?n=e.createWebsocket(i,[r],e):n=new WebSocket(i,[r]),n.binaryType=\"arraybuffer\",n}var PS=(t,e)=>{Kt(\"streamBuilder\");let r=Rg(e),i=Tg(r,t),n=CS(t,i,r),o=Ag.default.createWebSocketStream(n,r.wsOptions);return o.url=i,n.on(\"close\",()=>{o.destroy();}),o},OS=(t,e)=>{Kt(\"browserStreamBuilder\");let r,n=RS(e).browserBufferSize||1024*512,o=e.browserBufferTimeout||1e3,s=!e.objectMode,a=BS(t,e),u=h(e,E,S);e.objectMode||(u._writev=bl.writev.bind(u)),u.on(\"close\",()=>{a.close();});let c=typeof a.addEventListener<\"u\";a.readyState===a.OPEN?(r=u,r.socket=a):(r=new bl.BufferedDuplex(e,u,a),c?a.addEventListener(\"open\",d):a.onopen=d),c?(a.addEventListener(\"close\",g),a.addEventListener(\"error\",y),a.addEventListener(\"message\",w)):(a.onclose=g,a.onerror=y,a.onmessage=w);function h(I,C,R){let U=new IS.Transform({objectMode:I.objectMode});return U._write=C,U._flush=R,U}function d(){Kt(\"WebSocket onOpen\"),r instanceof bl.BufferedDuplex&&r.socketReady();}function g(I){Kt(\"WebSocket onClose\",I),r.end(),r.destroy();}function y(I){Kt(\"WebSocket onError\",I);let C=new Error(\"WebSocket error\");C.event=I,r.destroy(C);}function w(I){let{data:C}=I;C instanceof ArrayBuffer?C=yl.Buffer.from(C):C=yl.Buffer.from(C,\"utf8\"),u.push(C);}function E(I,C,R){if(a.bufferedAmount>n){setTimeout(E,o,I,C,R);return}s&&typeof I==\"string\"&&(I=yl.Buffer.from(I,\"utf8\"));try{a.send(I);}catch(U){return R(U)}R();}function S(I){a.close(),I();}return r};Ui.default=Ig.default?OS:PS;});var Pg=M(Rr=>{v();m();_();var ls=Rr&&Rr.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Rr,\"__esModule\",{value:!0});Rr.connectAsync=void 0;var kS=ls(ot()),xS=ls((pg(),X(dg))),MS=ls(ns()),LS=ls(Pi()),Cg=(0, kS.default)(\"mqttjs\"),Re={};LS.default?(Re.wx=hl().default,Re.wxs=hl().default,Re.ali=gl().default,Re.alis=gl().default):(Re.mqtt=ol().default,Re.tcp=ol().default,Re.ssl=ll().default,Re.tls=Re.ssl,Re.mqtts=ll().default);Re.ws=_l().default;Re.wss=_l().default;function US(t){let e;t.auth&&(e=t.auth.match(/^(.+):(.+)$/),e?(t.username=e[1],t.password=e[2]):t.username=t.auth);}function Bg(t,e){if(Cg(\"connecting to an MQTT broker...\"),typeof t==\"object\"&&!e&&(e=t,t=\"\"),e=e||{},t&&typeof t==\"string\"){let n=xS.default.parse(t,!0);if(n.port!=null&&(n.port=Number(n.port)),e=Object.assign(Object.assign({},n),e),e.protocol===null)throw new Error(\"Missing protocol\");e.protocol=e.protocol.replace(/:$/,\"\");}if(US(e),e.query&&typeof e.query.clientId==\"string\"&&(e.clientId=e.query.clientId),e.cert&&e.key)if(e.protocol){if([\"mqtts\",\"wss\",\"wxs\",\"alis\"].indexOf(e.protocol)===-1)switch(e.protocol){case\"mqtt\":e.protocol=\"mqtts\";break;case\"ws\":e.protocol=\"wss\";break;case\"wx\":e.protocol=\"wxs\";break;case\"ali\":e.protocol=\"alis\";break;default:throw new Error(`Unknown protocol for secure connection: \"${e.protocol}\"!`)}}else throw new Error(\"Missing secure protocol key\");if(!Re[e.protocol]){let n=[\"mqtts\",\"wss\"].indexOf(e.protocol)!==-1;e.protocol=[\"mqtt\",\"mqtts\",\"ws\",\"wss\",\"wx\",\"wxs\",\"ali\",\"alis\"].filter((o,s)=>n&&s%2===0?!1:typeof Re[o]==\"function\")[0];}if(e.clean===!1&&!e.clientId)throw new Error(\"Missing clientId for unclean clients\");e.protocol&&(e.defaultProtocol=e.protocol);function r(n){return e.servers&&((!n._reconnectCount||n._reconnectCount===e.servers.length)&&(n._reconnectCount=0),e.host=e.servers[n._reconnectCount].host,e.port=e.servers[n._reconnectCount].port,e.protocol=e.servers[n._reconnectCount].protocol?e.servers[n._reconnectCount].protocol:e.defaultProtocol,e.hostname=e.host,n._reconnectCount++),Cg(\"calling streambuilder for\",e.protocol),Re[e.protocol](n,e)}let i=new MS.default(r,e);return i.on(\"error\",()=>{}),i}function NS(t,e,r=!0){return new Promise((i,n)=>{let o=Bg(t,e),s={connect:u=>{a(),i(o);},end:()=>{a(),i(o);},error:u=>{a(),o.end(),n(u);}};r===!1&&(s.close=()=>{s.error(new Error(\"Couldn't connect to server\"));});function a(){Object.keys(s).forEach(u=>{o.off(u,s[u]);});}Object.keys(s).forEach(u=>{o.on(u,s[u]);});})}Rr.connectAsync=NS;Rr.default=Bg;});var ml=M(G=>{v();m();_();var Og=G&&G.__createBinding||(Object.create?function(t,e,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(e,r);(!n||(\"get\"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,i,n);}:function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r];}),qS=G&&G.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,\"default\",{enumerable:!0,value:e});}:function(t,e){t.default=e;}),DS=G&&G.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!==\"default\"&&Object.prototype.hasOwnProperty.call(t,r)&&Og(e,t,r);return qS(e,t),e},kg=G&&G.__exportStar||function(t,e){for(var r in t)r!==\"default\"&&!Object.prototype.hasOwnProperty.call(e,r)&&Og(e,t,r);},Ni=G&&G.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(G,\"__esModule\",{value:!0});G.ReasonCodes=G.PingTimer=G.UniqueMessageIdProvider=G.DefaultMessageIdProvider=G.Store=G.MqttClient=G.connectAsync=G.connect=G.Client=void 0;var xg=Ni(ns());G.MqttClient=xg.default;var jS=Ni(Yo());G.DefaultMessageIdProvider=jS.default;var FS=Ni($p());G.UniqueMessageIdProvider=FS.default;var WS=Ni(Zo());G.Store=WS.default;var Mg=DS(Pg());G.connect=Mg.default;Object.defineProperty(G,\"connectAsync\",{enumerable:!0,get:function(){return Mg.connectAsync}});var $S=Ni(Da());G.PingTimer=$S.default;G.Client=xg.default;kg(ns(),G);kg(Jr(),G);var HS=Ai();Object.defineProperty(G,\"ReasonCodes\",{enumerable:!0,get:function(){return HS.ReasonCodes}});});var QS=M(We=>{v();m();_();var Lg=We&&We.__createBinding||(Object.create?function(t,e,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(e,r);(!n||(\"get\"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,i,n);}:function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r];}),VS=We&&We.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,\"default\",{enumerable:!0,value:e});}:function(t,e){t.default=e;}),zS=We&&We.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!==\"default\"&&Object.prototype.hasOwnProperty.call(t,r)&&Lg(e,t,r);return VS(e,t),e},KS=We&&We.__exportStar||function(t,e){for(var r in t)r!==\"default\"&&!Object.prototype.hasOwnProperty.call(e,r)&&Lg(e,t,r);};Object.defineProperty(We,\"__esModule\",{value:!0});var GS=zS(ml());We.default=GS;KS(ml(),We);});var mqtt = QS();\n/*! Bundled license information:\n\n@jspm/core/nodelibs/browser/buffer.js:\n (*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh *)\n*/\n\nclass CloudInteropAPI {\n connectParams;\n _sessionDetails;\n _mqttClient;\n reconnectRetryLimit = 30;\n reconnectRetries = 0;\n contextListener;\n constructor(connectParams) {\n this.connectParams = connectParams;\n }\n get sessionDetails() {\n return this._sessionDetails;\n }\n get mqttClient() {\n return this._mqttClient;\n }\n async connect(params) {\n const { userId, password, sourceId, platformId } = params;\n let connectResponse;\n try {\n connectResponse = await axios.post(`${this.connectParams.url}/sessions`, {\n userId,\n sourceId,\n platformId\n });\n if (connectResponse.status !== 200) {\n throw new Error(`Failed to connect to Cloud Interop url: ${this.connectParams.url}`);\n }\n const { sessionRootTopic } = connectResponse.data;\n const lastWillPayload = {\n userId,\n sourceId,\n platformId,\n sessionId: connectResponse.data.sessionId\n };\n const clientOptions = {\n clientId: connectResponse.data.sessionId,\n clean: true,\n protocolVersion: 5,\n will: {\n topic: 'interop/lastwill',\n payload: Buffer.from(JSON.stringify(lastWillPayload)),\n qos: 0,\n retain: false\n },\n username: userId,\n password\n };\n this._mqttClient = await mqtt.connectAsync(connectResponse.data.mqttUrl, clientOptions);\n this._sessionDetails = connectResponse.data;\n console.log(`Cloud Interop successfully connected to ${this.connectParams.url}`);\n this._mqttClient.on('error', (error) => {\n console.error(`Cloud Interop Error: ${error}`);\n });\n this._mqttClient.stream.on('error', (error) => {\n console.error(`Cloud Interop Connection Error: ${error}`);\n });\n this._mqttClient.on('reconnect', () => {\n console.warn(`Cloud Interop attempting reconnection...`);\n // Default reconnectPeriod = 30 seconds\n // Attempt reconnection 30 times before ending session\n this.reconnectRetries += 1;\n if (this.reconnectRetries === this.reconnectRetryLimit) {\n console.warn(`Cloud Interop reached max reconnection attempts...`);\n this.disconnect();\n }\n });\n // Does not fire on initial connection, only successful reconnection attempts\n this._mqttClient.on('connect', () => {\n console.log(`Cloud Interop successfully reconnected`);\n this.reconnectRetries = 0;\n });\n this._mqttClient.on('message', (topic, message) => {\n this.handleCommand(topic, message, this._sessionDetails);\n });\n // Subscribe to all context groups\n this._mqttClient.subscribe(`${sessionRootTopic}/context-groups/#`);\n // Listen out for global commands\n this._mqttClient.subscribe(`${sessionRootTopic}/commands`);\n }\n catch (error) {\n console.warn(`Failed to connect to Cloud Interop at ${this.connectParams.url}`, error);\n }\n }\n async disconnect() {\n if (!this._sessionDetails) {\n return;\n }\n try {\n const disconnectResponse = await axios.delete(`${this.connectParams.url}/sessions/${this._sessionDetails.sessionId}`);\n if (disconnectResponse.status !== 200) {\n console.warn(`Cloud Interop disconnection failed`, disconnectResponse);\n }\n }\n catch (error) {\n console.warn(`Cloud Interop error during disconnection`, error);\n }\n finally {\n this._mqttClient?.removeAllListeners();\n this._mqttClient?.end(true);\n this._sessionDetails = undefined;\n this._mqttClient = undefined;\n this.reconnectRetries = 0;\n }\n }\n async setContext(contextGroup, context) {\n if (!this._sessionDetails) {\n return;\n }\n const { userId, sourceId } = this.connectParams;\n const payload = {\n userId,\n sourceId,\n context\n };\n await axios.post(`${this.connectParams.url}/context-groups/${this._sessionDetails.sessionId}/${contextGroup}`, payload);\n }\n addContextListener(callback) {\n this.contextListener = callback;\n }\n startIntentDiscovery(intentName, context) {\n throw new Error('Method not implemented.');\n }\n endIntentDiscovery(discoveryId) {\n throw new Error('Method not implemented.');\n }\n sendIntentDetail(discoveryId, intentDetail) {\n throw new Error('Method not implemented.');\n }\n raiseIntent(targetSession, intentInstanceId, context) {\n throw new Error('Method not implemented.');\n }\n addIntentDetailListener(callback) {\n throw new Error('Method not implemented.');\n }\n handleCommand(topic, message, sessionDetails) {\n if (message.length === 0 || !sessionDetails) {\n // Ignore clean up messages\n return;\n }\n const messageEnvelope = JSON.parse(message.toString());\n if (topic.startsWith(`${sessionDetails.sessionRootTopic}/context-groups/`)) {\n if (messageEnvelope.source.sessionId === sessionDetails.sessionId) {\n return;\n }\n if (this.contextListener) {\n const { channelName: contextGroup, payload: context, source } = messageEnvelope;\n this.contextListener(contextGroup, context, source);\n }\n }\n }\n}\n\nasync function cloudInteropOverride(config) {\n const client = new CloudInteropAPI(config);\n try {\n await client.connect(config);\n }\n catch (err) {\n console.warn(err);\n return (Base) => {\n return class NoOpOverride extends Base {\n constructor() {\n super();\n }\n };\n };\n }\n return (Base) => {\n return class CloudInteropOverride extends Base {\n constructor() {\n super();\n client.addContextListener((contextGroup, context, source) => {\n if (this.getContextGroups()\n .map(({ id }) => id)\n .includes(contextGroup) &&\n client.sessionDetails?.sessionId !== source.sessionId) {\n super.setContextForGroup({ context: context }, contextGroup);\n }\n });\n }\n async setContextForGroup({ context }, contextGroupId) {\n client.setContext(contextGroupId, context);\n super.setContextForGroup({ context }, contextGroupId);\n }\n async cloudReconnect() {\n await client.connect(config);\n }\n get cloudConnectionState() {\n if (client.mqttClient?.connected) {\n return 'connected';\n }\n if (client.mqttClient?.reconnecting) {\n return 'reconnecting';\n }\n return 'disconnected';\n }\n };\n };\n}\n\nexport { cloudInteropOverride };\n","\"use strict\";var e=require(\"./main-8cad4070.js\");require(\"buffer/\"),require(\"uuid\"),require(\"events\"),require(\"lodash/cloneDeep\"),require(\"lodash/isEqual\"),exports.connect=e.connect;\n","\"use strict\";var e=require(\"buffer/\"),t=require(\"events\"),n=require(\"lodash/cloneDeep\"),i=require(\"lodash/isEqual\"),r=require(\"uuid\");const o=(e,t)=>`${t}<${btoa(JSON.stringify(e))}>`;var s=\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof window?window:\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:{},a={},c={},d={},h={};async function l(e){const t=[];for(const n of e){const e=await n();t.push(e)}return t}Object.defineProperty(h,\"__esModule\",{value:!0}),h.promiseMapSerial=h.serial=h.promiseMap=h.promisify=void 0,h.promisify=function(e){return(...t)=>new Promise(((n,i)=>{e(...t,((e,t)=>e?i(e):n(t)))}))},h.promiseMap=async function(e,t){return Promise.all(e.map(t))},h.serial=l,h.promiseMapSerial=async function(e,t){return l(e.map(((e,n,i)=>()=>t(e,n,i))))};var u,p=s&&s.__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},w=s&&s.__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)};Object.defineProperty(d,\"__esModule\",{value:!0}),d.Reply=d.EmitterBase=d.Base=void 0;const y=h;class f{constructor(e){this.isNodeEnvironment=()=>\"node\"===this.wire.environment.type,this.isOpenFinEnvironment=()=>\"openfin\"===this.wire.environment.type,this.isBrowserEnvironment=()=>\"other\"===this.wire.environment.type,this.wire=e}get fin(){return this.wire.getFin()}get me(){return this.wire.me}}d.Base=f;d.EmitterBase=class extends f{constructor(e,t,...n){super(e),this.topic=t,u.set(this,void 0),this.eventNames=()=>this.hasEmitter()?this.getOrCreateEmitter().eventNames():[],this.emit=(e,t,...n)=>!!this.hasEmitter()&&this.getOrCreateEmitter().emit(e,t,...n),this.hasEmitter=()=>this.wire.eventAggregator.has(w(this,u,\"f\")),this.getOrCreateEmitter=()=>this.wire.eventAggregator.getOrCreate(w(this,u,\"f\")),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[],this.listenerCount=e=>this.hasEmitter()?this.getOrCreateEmitter().listenerCount(e):0,this.registerEventListener=async(e,t={},n,i)=>{const r={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e},o=this.getOrCreateEmitter();n(o);try{await this.wire.sendAction(\"subscribe-to-desktop-event\",r)}catch(e){throw i(o),this.deleteEmitterIfNothingRegistered(o),e}},this.deregisterEventListener=async(e,t={})=>{if(this.hasEmitter()){const n={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e};await this.wire.sendAction(\"unsubscribe-to-desktop-event\",n).catch((()=>null));return this.getOrCreateEmitter()}return Promise.resolve()},p(this,u,[t,...n],\"f\"),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[]}async on(e,t,n){return await this.registerEventListener(e,n,(n=>{n.on(e,t)}),(n=>{n.removeListener(e,t)})),this}async addListener(e,t,n){return this.on(e,t,n)}async once(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.once(e,i),n.once(e,t)}),(n=>{n.removeListener(e,i),n.removeListener(e,t)})),this}async prependListener(e,t,n){return await this.registerEventListener(e,n,(n=>{n.prependListener(e,t)}),(n=>{n.removeListener(e,t)})),this}async prependOnceListener(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.prependOnceListener(e,t),n.once(e,i)}),(n=>{n.removeListener(e,t),n.removeListener(e,i)})),this}async removeListener(e,t,n){const i=await this.deregisterEventListener(e,n);return i&&(i.removeListener(e,t),this.deleteEmitterIfNothingRegistered(i)),this}async deregisterAllListeners(e){const t={...this.identity,type:e,topic:this.topic};if(this.hasEmitter()){const e=this.getOrCreateEmitter(),n=e.listenerCount(t.type),i=[];for(let e=0;enull)));return await Promise.all(i),e}}async removeAllListeners(e){const t=async e=>{const t=await this.deregisterAllListeners(e);t&&(t.removeAllListeners(e),this.deleteEmitterIfNothingRegistered(t))};if(e)await t(e);else if(this.hasEmitter()){const e=this.getOrCreateEmitter().eventNames();await(0,y.promiseMap)(e,t)}return this}deleteEmitterIfNothingRegistered(e){0===e.eventNames().length&&this.wire.eventAggregator.delete(w(this,u,\"f\"))}},u=new WeakMap;d.Reply=class{};var g={};Object.defineProperty(g,\"__esModule\",{value:!0});var m=g.RuntimeError=g.NotSupportedError=g.NotImplementedError=g.NoAckError=g.DuplicateCorrelationError=g.UnexpectedActionError=g.DisconnectedError=void 0;class v extends Error{constructor(e){super(`Expected websocket state OPEN but found ${e}`),this.readyState=e}}g.DisconnectedError=v;class C extends Error{}g.UnexpectedActionError=C;class b extends Error{}g.DuplicateCorrelationError=b;class I extends Error{}g.NoAckError=I;class E extends Error{}g.NotImplementedError=E;class x extends Error{}g.NotSupportedError=x;class A extends Error{constructor(e){const{message:t,name:n,stack:i,...r}=e;super(t),this.name=n||\"Error\",this.stack=i??this.toString(),Object.keys(r).forEach((e=>{this[e]=r[e]}))}}class P extends Error{static getCallSite(e=0){const t=Error.stackTraceLimit,n=e+1;Error.stackTraceLimit=t+n;const i=Error.prepareStackTrace;Error.prepareStackTrace=(e,t)=>t;const r=(new Error).stack?.slice(n)??[];return Error.prepareStackTrace=i,Error.stackTraceLimit=t,r}static prepareStackTrace(e,t){if(\"function\"==typeof Error.prepareStackTrace)return Error.prepareStackTrace(e,t);let n=\"\";n+=e.name||\"Error\",n+=`: ${e.message||\"\"}`;for(const e of t)n+=`\\n at ${e.toString()}`;return n}constructor(e,t){const{reason:n,error:i}=e;super(n),this.name=\"RuntimeError\",i?.stack&&(this.cause=new A(i)),t&&(this.stack=P.prepareStackTrace(this,t))}}m=g.RuntimeError=P;var M={},_={},O={};Object.defineProperty(O,\"__esModule\",{value:!0}),O.validateIdentity=void 0,O.validateIdentity=function(e){let t;return\"object\"==typeof e&&\"string\"==typeof e.uuid||(t=\"Not a valid identity object\"),t};var S={},R={},F={},j={},k={},L={},T={};Object.defineProperty(T,\"__esModule\",{value:!0}),T.handleDeprecatedWarnings=void 0;var $;T.handleDeprecatedWarnings=e=>{(e.contentNavigation?.whitelist||e.contentNavigation?.blacklist||e.contentRedirect?.whitelist||e.contentRedirect?.blacklist)&&console.warn(\"The properties 'whitelist' and 'blacklist' have been marked as deprecated and will be removed in a future version. Please use 'allowlist' and 'denylist'.\")};var B={},G={};Object.defineProperty(G,\"__esModule\",{value:!0}),G.AsyncRetryableLazy=W=G.Lazy=void 0;var W=G.Lazy=class{constructor(e){this.producerFn=e}getValue(){return this.value||(this.value=this.producerFn()),this.value}};G.AsyncRetryableLazy=class{constructor(e){this.producerFn=e}async getValue(){return this.promise||(this.promise=this.producerFn().catch((e=>{throw delete this.promise,e}))),this.promise}};var H={};Object.defineProperty(H,\"__esModule\",{value:!0}),H.WebContents=void 0;const N=d;class D extends N.EmitterBase{constructor(e,t,n){super(e,n,t.uuid,t.name),this.identity=t,this.entityType=n}capturePage(e){return this.wire.sendAction(\"capture-page\",{options:e,...this.identity}).then((({payload:e})=>e.data))}executeJavaScript(e){return this.wire.sendAction(\"execute-javascript-in-window\",{...this.identity,code:e}).then((({payload:e})=>e.data))}getZoomLevel(){return this.wire.sendAction(\"get-zoom-level\",this.identity).then((({payload:e})=>e.data))}setZoomLevel(e){return this.wire.sendAction(\"set-zoom-level\",{...this.identity,level:e}).then((()=>{}))}navigate(e){return this.wire.sendAction(\"navigate-window\",{...this.identity,url:e}).then((()=>{}))}navigateBack(){return this.wire.sendAction(\"navigate-window-back\",{...this.identity}).then((()=>{}))}async navigateForward(){await this.wire.sendAction(\"navigate-window-forward\",{...this.identity})}stopNavigation(){return this.wire.sendAction(\"stop-window-navigation\",{...this.identity}).then((()=>{}))}reload(e=!1){return this.wire.sendAction(\"reload-window\",{ignoreCache:e,...this.identity}).then((()=>{}))}print(e={}){return this.wire.sendAction(\"print\",{...this.identity,options:e}).then((()=>{}))}findInPage(e,t){return this.wire.sendAction(\"find-in-page\",{...this.identity,searchTerm:e,options:t}).then((({payload:e})=>e.data))}stopFindInPage(e){return this.wire.sendAction(\"stop-find-in-page\",{...this.identity,action:e}).then((()=>{}))}getPrinters(){return this.wire.sendAction(\"get-printers\",{...this.identity}).then((({payload:e})=>e.data))}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){await this.wire.sendAction(\"focus-window\",{emitSynthFocused:e,...this.identity})}async showDeveloperTools(){await this.wire.sendAction(\"show-developer-tools\",this.identity)}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction(\"get-process-info\",this.identity);return e}async getSharedWorkers(){return this.wire.sendAction(\"get-shared-workers\",this.identity).then((({payload:e})=>e.data))}async inspectSharedWorker(){await this.wire.sendAction(\"inspect-shared-worker\",{...this.identity})}async inspectSharedWorkerById(e){await this.wire.sendAction(\"inspect-shared-worker-by-id\",{...this.identity,workerId:e})}async inspectServiceWorker(){await this.wire.sendAction(\"inspect-service-worker\",{...this.identity})}async showPopupWindow(e){if(this.wire.sendAction(`${this.entityType}-show-popup-window`,this.identity).catch((()=>{})),e?.onPopupReady){const t=async({popupName:t})=>{try{const n=this.fin.Window.wrapSync({uuid:this.fin.me.uuid,name:t});await e.onPopupReady(n)}catch(e){throw new Error(`Something went wrong during onPopupReady execution: ${e}`)}};await this.once(\"popup-ready\",t)}const{payload:t}=await this.wire.sendAction(\"try-create-popup-window\",{options:{...e,hasResultCallback:!!e?.onPopupResult,hasReadyCallback:!!e?.onPopupReady},...this.identity}),{data:{willOpen:n,options:i}}=t;n&&await this.fin.Window.create(i.initialOptions);if(e?.onPopupResult){const t=async t=>{await e.onPopupResult((e=>{const{name:t,uuid:n,result:i,data:r}=e,o={identity:{name:t,uuid:n},result:i};return r&&(o.data=r),o})(t))},n=async()=>{await this.removeListener(\"popup-result\",t)};await this.on(\"popup-result\",t),await this.once(\"popup-teardown\",n)}const{payload:r}=await this.wire.sendAction(\"show-popup-window\",{options:i,...this.identity});return r.data}}var U,V,z,K,q;function J(){return V||(V=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(function(){if($)return L;$=1,Object.defineProperty(L,\"__esModule\",{value:!0}),L.ViewModule=void 0;const e=d,t=O,n=J(),i=T;class r extends e.Base{async create(e){const{uuid:t}=this.wire.me;if(!e.name||\"string\"!=typeof e.name)throw new Error(\"Please provide a name property as a string in order to create a View.\");return(0,i.handleDeprecatedWarnings)(e),this.wire.environment.childViews?await this.wire.environment.createChildContent({entityType:\"view\",options:{...e,uuid:t}}):await this.wire.sendAction(\"create-view\",{...e,uuid:t}),this.wrapSync({uuid:t,name:e.name})}async wrap(e){this.wire.sendAction(\"view-wrap\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}wrapSync(e){this.wire.sendAction(\"view-wrap-sync\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}getCurrent(){if(this.wire.sendAction(\"view-get-current\").catch((e=>{})),!this.wire.me.isView)throw new Error(\"You are not in a View context\");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction(\"view-get-current-sync\").catch((e=>{})),!this.wire.me.isView)throw new Error(\"You are not in a View context\");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return L.ViewModule=r,L}(),e),n(function(){if(U)return B;var e;U=1,Object.defineProperty(B,\"__esModule\",{value:!0}),B.View=void 0;const t=g,n=G,i=H,r=ie();class o extends i.WebContents{constructor(i,o){super(i,o,\"view\"),this.identity=o,e.set(this,new n.Lazy((()=>this.fin.Platform.wrapSync(this.identity).getClient()))),this.attach=async e=>{await this.wire.sendAction(\"attach-view\",{target:e,...this.identity})},this.destroy=async()=>{await this.wire.sendAction(\"destroy-view\",{...this.identity})},this.show=async()=>{await this.wire.sendAction(\"show-view\",{...this.identity})},this.showAt=async(e,t={})=>{await this.wire.sendAction(\"show-view-at\",{bounds:e,...this.identity,options:t})},this.bringToFront=async()=>{await this.wire.sendAction(\"bring-view-to-front\",{...this.identity})},this.hide=async()=>{await this.wire.sendAction(\"hide-view\",{...this.identity})},this.setBounds=async e=>{await this.wire.sendAction(\"set-view-bounds\",{bounds:e,...this.identity})},this.getBounds=async()=>(await this.wire.sendAction(\"get-view-bounds\",{...this.identity})).payload.data,this.getInfo=async()=>(await this.wire.sendAction(\"get-view-info\",{...this.identity})).payload.data,this.getParentLayout=async()=>(this.wire.sendAction(\"view-get-parent-layout\",{...this.identity}).catch((()=>{})),this.fin.Platform.Layout.getLayoutByViewIdentity(this.identity)),this.getOptions=async()=>this.wire.sendAction(\"get-view-options\",{...this.identity}).then((({payload:e})=>e.data)),this.updateOptions=async e=>this.wire.sendAction(\"update-view-options\",{options:e,...this.identity}).then((()=>{})),this.getCurrentWindow=async()=>{const{payload:{data:e}}=await this.wire.sendAction(\"get-view-window\",{...this.identity});return new r._Window(this.wire,e)},this.getCurrentStack=async()=>{this.wire.sendAction(\"view-get-current-stack\").catch((()=>{}));try{return(await this.getParentLayout()).getStackByViewIdentity(this.identity)}catch(e){throw new t.RuntimeError({reason:\"This view does not belong to a stack.\",error:e})}},this.triggerBeforeUnload=async()=>(await this.wire.sendAction(\"trigger-before-unload\",{...this.identity})).payload.data,this.bindToElement=async e=>{if(!e)throw new Error(\"Element not found.\");return this.wire.environment.observeBounds(e,(async e=>this.setBounds(e)))}}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){const t=await this.getCurrentWindow();await t.focusedWebViewWasChanged(),await super.focus({emitSynthFocused:e})}}return B.View=o,e=new WeakMap,B}(),e)}(k)),k}function Y(){if(z)return j;z=1,Object.defineProperty(j,\"__esModule\",{value:!0}),j.Application=void 0;const e=d,t=ie(),n=J();class i extends e.EmitterBase{constructor(e,n){super(e,\"application\",n.uuid),this.identity=n,this.window=new t._Window(this.wire,{uuid:this.identity.uuid,name:this.identity.uuid})}windowListFromIdentityList(e){const n=[];return e.forEach((e=>{n.push(new t._Window(this.wire,{uuid:e.uuid,name:e.name}))})),n}isRunning(){return this.wire.sendAction(\"is-application-running\",this.identity).then((({payload:e})=>e.data))}async quit(e=!1){try{await this._close(e),await this.wire.sendAction(\"destroy-application\",{force:e,...this.identity})}catch(e){if(![\"Remote connection has closed\",\"Could not locate the requested application\"].some((t=>e.message.includes(t))))throw e}}async _close(e=!1){try{await this.wire.sendAction(\"close-application\",{force:e,...this.identity})}catch(e){if(!e.message.includes(\"Remote connection has closed\"))throw e}}close(e=!1){return console.warn(\"Deprecation Warning: Application.close is deprecated Please use Application.quit\"),this.wire.sendAction(\"application-close\",this.identity).catch((e=>{})),this._close(e)}getChildWindows(){return this.wire.sendAction(\"get-child-windows\",this.identity).then((({payload:e})=>{const t=[];return e.data.forEach((e=>{t.push({uuid:this.identity.uuid,name:e})})),this.windowListFromIdentityList(t)}))}getManifest(){return this.wire.sendAction(\"get-application-manifest\",this.identity).then((({payload:e})=>e.data))}getParentUuid(){return this.wire.sendAction(\"get-parent-application\",this.identity).then((({payload:e})=>e.data))}getShortcuts(){return this.wire.sendAction(\"get-shortcuts\",this.identity).then((({payload:e})=>e.data))}async getViews(){const{payload:e}=await this.wire.sendAction(\"application-get-views\",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}getZoomLevel(){return this.wire.sendAction(\"get-application-zoom-level\",this.identity).then((({payload:e})=>e.data))}getWindow(){return this.wire.sendAction(\"application-get-window\",this.identity).catch((e=>{})),Promise.resolve(this.window)}registerUser(e,t){return this.wire.sendAction(\"register-user\",{userName:e,appName:t,...this.identity}).then((()=>{}))}removeTrayIcon(){return this.wire.sendAction(\"remove-tray-icon\",this.identity).then((()=>{}))}restart(){return this.wire.sendAction(\"restart-application\",this.identity).then((()=>{}))}run(){return console.warn(\"Deprecation Warning: Application.run is deprecated Please use fin.Application.start\"),this.wire.sendAction(\"application-run\",this.identity).catch((e=>{})),this._run()}_run(e={}){return this.wire.sendAction(\"run-application\",{manifestUrl:this._manifestUrl,opts:e,...this.identity}).then((()=>{}))}scheduleRestart(){return this.wire.sendAction(\"relaunch-on-close\",this.identity).then((()=>{}))}async sendApplicationLog(){const{payload:e}=await this.wire.sendAction(\"send-application-log\",this.identity);return e.data}async setJumpList(e){await this.wire.sendAction(\"set-jump-list\",{config:e,...this.identity})}setTrayIcon(e){return this.wire.sendAction(\"set-tray-icon\",{enabledIcon:e,...this.identity}).then((()=>{}))}setShortcuts(e){return this.wire.sendAction(\"set-shortcuts\",{data:e,...this.identity}).then((()=>{}))}async setShortcutQueryParams(e){await this.wire.sendAction(\"set-shortcut-query-args\",{data:e,...this.identity})}setZoomLevel(e){return this.wire.sendAction(\"set-application-zoom-level\",{level:e,...this.identity}).then((()=>{}))}async setAppLogUsername(e){await this.wire.sendAction(\"set-app-log-username\",{data:e,...this.identity})}getTrayIconInfo(){return this.wire.sendAction(\"get-tray-icon-info\",this.identity).then((({payload:e})=>e.data))}hasTrayIcon(){return this.wire.sendAction(\"has-tray-icon\",this.identity).then((({payload:e})=>e.data))}terminate(){return this.wire.sendAction(\"terminate-application\",this.identity).then((()=>{}))}wait(){return this.wire.sendAction(\"wait-for-hung-application\",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction(\"get-info\",this.identity).then((({payload:e})=>e.data))}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction(\"application-get-process-info\",this.identity);return e}async setFileDownloadLocation(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t};await this.wire.sendAction(\"set-file-download-location\",{...n,downloadLocation:e})}async getFileDownloadLocation(){const{payload:{data:e}}=await this.wire.sendAction(\"get-file-download-location\",this.identity);return e}async showTrayIconPopupMenu(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t},{payload:i}=await this.wire.sendAction(\"show-tray-icon-popup-menu\",{...n,options:e});return i.data}async closeTrayIconPopupMenu(){const{name:e}=this.wire.me,t={uuid:this.identity.uuid,name:e};await this.wire.sendAction(\"close-tray-icon-popup-menu\",{...t})}}return j.Application=i,j}function Z(){return q||(q=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(function(){if(K)return F;K=1,Object.defineProperty(F,\"__esModule\",{value:!0}),F.ApplicationModule=void 0;const e=d,t=O,n=Y();class i extends e.Base{async wrap(e){this.wire.sendAction(\"wrap-application\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}wrapSync(e){this.wire.sendAction(\"wrap-application-sync\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}async _create(e){return void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&void 0===e.isPlatformController&&(e.autoShow=!0),await this.wire.sendAction(\"create-application\",e),this.wrap({uuid:e.uuid})}create(e){return console.warn(\"Deprecation Warning: fin.Application.create is deprecated. Please use fin.Application.start\"),this.wire.sendAction(\"application-create\").catch((e=>{})),this._create(e)}async start(e){this.wire.sendAction(\"start-application\").catch((e=>{}));const t=await this._create(e);return await this.wire.sendAction(\"run-application\",{uuid:e.uuid}),t}async startManyManifests(e,t){return this.wire.sendAction(\"run-applications\",{applications:e,opts:t}).then((()=>{}))}getCurrent(){return this.wire.sendAction(\"get-current-application\").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction(\"get-current-application-sync\").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}async startFromManifest(e,t){this.wire.sendAction(\"application-start-from-manifest\").catch((e=>{}));const n=await this._createFromManifest(e);return await n._run(t),n}createFromManifest(e){return console.warn(\"Deprecation Warning: fin.Application.createFromManifest is deprecated. Please use fin.Application.startFromManifest\"),this.wire.sendAction(\"application-create-from-manifest\").catch((e=>{})),this._createFromManifest(e)}_createFromManifest(e){return this.wire.sendAction(\"get-application-manifest\",{manifestUrl:e}).then((({payload:e})=>{const t=e.data.platform?e.data.platform.uuid:e.data.startup_app.uuid;return this.wrap({uuid:t})})).then((t=>(t._manifestUrl=e,t)))}}return F.ApplicationModule=i,F}(),e),n(Y(),e)}(R)),R}H.WebContents=D;var Q={};Object.defineProperty(Q,\"__esModule\",{value:!0}),Q.promisifySubscription=void 0;var X,ee,te;function ne(){if(X)return S;X=1,Object.defineProperty(S,\"__esModule\",{value:!0}),S._Window=void 0;const e=Z(),t=H,n=J(),i=T,r=Q;class o extends t.WebContents{constructor(e,t){super(e,t,\"window\")}async createWindow(e){this.wire.sendAction(\"window-create-window\",this.identity).catch((e=>{}));const t=await(0,r.promisifySubscription)(this,\"fire-constructor-callback\");void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&(e.autoShow=!0),(0,i.handleDeprecatedWarnings)(e);const n=this.wire.environment.createChildContent({entityType:\"window\",options:e}),[o]=await Promise.all([t.getValue(),n]);let s;const{success:a}=o,c=o.data,{message:d}=c;s=a?{httpResponseCode:c.httpResponseCode,apiInjected:c.apiInjected}:{message:c.message,networkErrorCode:c.networkErrorCode,stack:c.stack};const h={message:d,cbPayload:s,success:a};try{this.getWebWindow().fin.__internal_.openerSuccessCBCalled()}catch(e){}return h.success?this:Promise.reject(h)}getAllFrames(){return this.wire.sendAction(\"get-all-frames\",this.identity).then((({payload:e})=>e.data))}getBounds(){return this.wire.sendAction(\"get-window-bounds\",this.identity).then((({payload:e})=>e.data))}center(){return this.wire.sendAction(\"center-window\",this.identity).then((()=>{}))}blur(){return this.wire.sendAction(\"blur-window\",this.identity).then((()=>{}))}bringToFront(){return this.wire.sendAction(\"bring-window-to-front\",this.identity).then((()=>{}))}animate(e,t){return this.wire.sendAction(\"animate-window\",{transitions:e,options:t,...this.identity}).then((()=>{}))}hide(){return this.wire.sendAction(\"hide-window\",this.identity).then((()=>{}))}close(e=!1){return this.wire.sendAction(\"close-window\",{force:e,...this.identity}).then((()=>{Object.setPrototypeOf(this,null)}))}focusedWebViewWasChanged(){return this.wire.sendAction(\"focused-webview-changed\",this.identity).then((()=>{}))}getNativeId(){return this.wire.sendAction(\"get-window-native-id\",this.identity).then((({payload:e})=>e.data))}async getCurrentViews(){const{payload:e}=await this.wire.sendAction(\"window-get-views\",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}disableFrame(){return console.warn(\"Function is deprecated; use disableUserMovement instead.\"),this.wire.sendAction(\"disable-window-frame\",this.identity).then((()=>{}))}disableUserMovement(){return this.wire.sendAction(\"disable-window-frame\",this.identity).then((()=>{}))}enableFrame(){return console.warn(\"Function is deprecated; use enableUserMovement instead.\"),this.wire.sendAction(\"enable-window-frame\",this.identity).then((()=>{}))}enableUserMovement(){return this.wire.sendAction(\"enable-window-frame\",this.identity).then((()=>{}))}flash(){return this.wire.sendAction(\"flash-window\",this.identity).then((()=>{}))}stopFlashing(){return this.wire.sendAction(\"stop-flash-window\",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction(\"get-window-info\",this.identity).then((({payload:e})=>e.data))}async getLayout(e){this.wire.sendAction(\"window-get-layout\",this.identity).catch((e=>{}));const t=await this.getOptions();if(!t.layout&&!t.layoutSnapshot)throw new Error(\"Window does not have a Layout\");return this.fin.Platform.Layout.wrap(e??this.identity)}getOptions(){return this.wire.sendAction(\"get-window-options\",this.identity).then((({payload:e})=>e.data))}getParentApplication(){return this.wire.sendAction(\"window-get-parent-application\",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity))}getParentWindow(){return this.wire.sendAction(\"window-get-parent-window\",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity)).then((e=>e.getWindow()))}async getSnapshot(e){const t={area:e,...this.identity};console.warn(\"Window.getSnapshot has been deprecated, please use Window.capturePage\");return(await this.wire.sendAction(\"get-window-snapshot\",t)).payload.data}getState(){return this.wire.sendAction(\"get-window-state\",this.identity).then((({payload:e})=>e.data))}getWebWindow(){return this.wire.sendAction(\"window-get-web-window\",this.identity).catch((e=>{})),this.wire.environment.getWebWindow(this.identity)}isMainWindow(){return this.wire.sendAction(\"window-is-main-window\",this.identity).catch((e=>{})),this.me.uuid===this.me.name}isShowing(){return this.wire.sendAction(\"is-window-showing\",this.identity).then((({payload:e})=>e.data))}maximize(){return this.wire.sendAction(\"maximize-window\",this.identity).then((()=>{}))}minimize(){return this.wire.sendAction(\"minimize-window\",this.identity).then((()=>{}))}moveBy(e,t,n){return this.wire.sendAction(\"move-window-by\",{deltaLeft:e,deltaTop:t,positioningOptions:n,...this.identity}).then((()=>{}))}moveTo(e,t,n){return this.wire.sendAction(\"move-window\",{left:e,top:t,positioningOptions:n,...this.identity}).then((()=>{}))}resizeBy(e,t,n,i){return this.wire.sendAction(\"resize-window-by\",{deltaWidth:Math.floor(e),deltaHeight:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}resizeTo(e,t,n,i){return this.wire.sendAction(\"resize-window\",{width:Math.floor(e),height:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}restore(){return this.wire.sendAction(\"restore-window\",this.identity).then((()=>{}))}setAsForeground(){return this.wire.sendAction(\"set-foreground-window\",this.identity).then((()=>{}))}setBounds(e,t){return this.wire.sendAction(\"set-window-bounds\",{...e,...this.identity,positioningOptions:t}).then((()=>{}))}show(e=!1){return this.wire.sendAction(\"show-window\",{force:e,...this.identity}).then((()=>{}))}showAt(e,t,n=!1){return this.wire.sendAction(\"show-at-window\",{force:n,left:Math.floor(e),top:Math.floor(t),...this.identity}).then((()=>{}))}updateOptions(e){return this.wire.sendAction(\"update-window-options\",{options:e,...this.identity}).then((()=>{}))}authenticate(e,t){return this.wire.sendAction(\"window-authenticate\",{userName:e,password:t,...this.identity}).then((()=>{}))}async showPopupMenu(e){const{payload:t}=await this.wire.sendAction(\"show-popup-menu\",{options:e,...this.identity});return t.data}async closePopupMenu(){return this.wire.sendAction(\"close-popup-menu\",{...this.identity}).then((()=>{}))}async dispatchPopupResult(e){this.wire.sendAction(\"window-dispatch-popup-result\",this.identity).catch((e=>{})),await this.wire.sendAction(\"dispatch-popup-result\",{data:e,...this.identity})}async print(e={content:\"self\"}){switch(e.content){case void 0:case\"self\":return super.print(e);case\"screenshot\":return this.wire.sendAction(\"print-screenshot\",this.identity).then((()=>{}));case\"views\":return this.wire.sendAction(\"print-views\",{...this.identity,options:e}).then((()=>{}));default:return}}}return S._Window=o,S}function ie(){return te||(te=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(function(){if(ee)return _;ee=1,Object.defineProperty(_,\"__esModule\",{value:!0}),_._WindowModule=void 0;const e=d,t=O,n=ne();class i extends e.Base{async wrap(e){this.wire.sendAction(\"window-wrap\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}wrapSync(e){this.wire.sendAction(\"window-wrap-sync\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}create(e){return this.wire.sendAction(\"create-window\").catch((e=>{})),new n._Window(this.wire,{uuid:this.me.uuid,name:e.name}).createWindow(e)}getCurrent(){if(this.wire.sendAction(\"get-current-window\").catch((e=>{})),!this.wire.me.isWindow)throw new Error(\"You are not in a Window context\");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction(\"get-current-window-sync\").catch((e=>{})),!this.wire.me.isWindow)throw new Error(\"You are not in a Window context\");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return _._WindowModule=i,_}(),e),n(ne(),e)}(M)),M}Q.promisifySubscription=async(e,t,n=(()=>!0),i)=>{let r,o,s;const a=new Promise(((e,t)=>{r=e,o=t})),c=e=>{n(e)&&(clearTimeout(s),r(e))};return await e.on(t,c),i&&(s=setTimeout((()=>o(new Error(\"event timed out\"))),i)),a.finally((()=>{e.removeListener(t,c).catch((()=>null))})),{getValue:()=>a}},Object.defineProperty(c,\"__esModule\",{value:!0}),c.System=void 0;const re=d,oe=g,se=ie(),ae=t;class ce extends re.EmitterBase{constructor(e){super(e,\"system\")}sendExternalProcessRequest(e,t){return new Promise(((n,i)=>{const r=\"external-process-exited\";let o,s,a,c;\"function\"==typeof t.listener&&(a=e=>{const n=e||{};s={topic:\"exited\",uuid:n.processUuid||\"\",exitCode:n.exitCode||0},o===e.processUuid&&(t.listener(s),c.removeListener(r,a))},this.wire.me.name||(this.wire.me.name=this.wire.me.uuid),c=new se._Window(this.wire,this.wire.me),c.on(r,a)),this.wire.sendAction(e,t).then((({payload:e})=>{o=e.data.uuid,n(e.data),s&&o===s.uuid&&(t.listener(s),c.removeListener(r,a))})).catch((e=>{c&&c.removeListener(r,a),i(e)}))}))}getVersion(){return this.wire.sendAction(\"get-version\").then((({payload:e})=>e.data))}clearCache(e){return this.wire.sendAction(\"clear-cache\",e).then((()=>{}))}deleteCacheOnExit(){return this.wire.sendAction(\"delete-cache-request\").then((()=>{}))}exit(){return this.wire.sendAction(\"exit-desktop\").then((()=>{}))}async fetchManifest(e){const{payload:{data:t}}=await this.wire.sendAction(\"fetch-manifest\",{manifestUrl:e});return t}flushCookieStore(){return this.wire.sendAction(\"flush-cookie-store\").then((()=>{}))}getAllWindows(){return this.wire.sendAction(\"get-all-windows\").then((({payload:e})=>e.data))}getAllApplications(){return this.wire.sendAction(\"get-all-applications\").then((({payload:e})=>e.data))}getCommandLineArguments(){return this.wire.sendAction(\"get-command-line-arguments\").then((({payload:e})=>e.data))}async getCrashReporterState(){const{payload:{data:{diagnosticMode:e,isRunning:t}}}=await this.wire.sendAction(\"get-crash-reporter-state\");return console.warn(\"diagnosticMode property is deprecated. It will be removed in a future version\"),{diagnosticMode:e,diagnosticsMode:e,isRunning:t}}async startCrashReporter(e){const t=e,n={...t,diagnosticMode:t.diagnosticsMode||t.diagnosticMode},{payload:{data:{diagnosticMode:i,isRunning:r}}}=await this.wire.sendAction(\"start-crash-reporter\",n);return{diagnosticMode:i,diagnosticsMode:i,isRunning:r}}getUniqueUserId(){return this.wire.sendAction(\"get-unique-user-id\").then((({payload:e})=>e.data))}getEntityInfo(e,t){return this.wire.sendAction(\"get-entity-info\",{uuid:e,name:t}).then((({payload:e})=>e.data))}getEnvironmentVariable(e){return this.wire.sendAction(\"get-environment-variable\",{environmentVariables:e}).then((({payload:e})=>e.data))}getFocusedWindow(){return this.wire.sendAction(\"get-focused-window\").then((({payload:e})=>e.data))}async isAppCertified(e){const{payload:{data:{certifiedInfo:t}}}=await this.wire.sendAction(\"is-app-certified\",{manifestUrl:e});return t}getInstalledRuntimes(){return this.wire.sendAction(\"get-installed-runtimes\").then((({payload:e})=>e.data.runtimes))}async getInstalledApps(){const{payload:{data:{installedApps:e}}}=await this.wire.sendAction(\"get-installed-apps\");return e}getLog(e){return this.wire.sendAction(\"view-log\",e).then((({payload:e})=>e.data))}getMachineId(){return this.wire.sendAction(\"get-machine-id\").then((({payload:e})=>e.data))}getMinLogLevel(){return this.wire.sendAction(\"get-min-log-level\").then((({payload:e})=>e.data))}getLogList(){return this.wire.sendAction(\"list-logs\").then((({payload:e})=>e.data))}getMonitorInfo(){return this.wire.sendAction(\"get-monitor-info\").then((({payload:e})=>e.data))}getMousePosition(){return this.wire.sendAction(\"get-mouse-position\").then((({payload:e})=>e.data))}getProcessList(){return console.warn(\"System.getProcessList has been deprecated. Please consider using our new process APIs: Window.getProcessInfo, View.getProcessInfo, Application.getProcessInfo, System.getAllProcessInfo\"),this.wire.sendAction(\"process-snapshot\").then((({payload:e})=>e.data))}async getAllProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction(\"get-all-process-info\",this.identity);return e}getProxySettings(){return this.wire.sendAction(\"get-proxy-settings\").then((({payload:e})=>e.data))}getRuntimeInfo(){return this.wire.sendAction(\"get-runtime-info\").then((({payload:e})=>e.data))}getRvmInfo(){return this.wire.sendAction(\"get-rvm-info\").then((({payload:e})=>e.data))}getHostSpecs(){return this.wire.sendAction(\"get-host-specs\").then((({payload:e})=>e.data))}getOSInfo(){return this.wire.sendAction(\"get-os-info\").then((({payload:e})=>e.data))}launchExternalProcess(e){return this.sendExternalProcessRequest(\"launch-external-process\",e)}monitorExternalProcess(e){return this.sendExternalProcessRequest(\"monitor-external-process\",e)}log(e,t){return this.wire.sendAction(\"write-to-log\",{level:e,message:t}).then((()=>{}))}openUrlWithBrowser(e){return this.wire.sendAction(\"open-url-with-browser\",{url:e}).then((()=>{}))}async registerCustomProtocol(e){if(\"object\"!=typeof e)throw new Error(\"Must provide an object with a `protocolName` property having a string value.\");await this.wire.sendAction(\"register-custom-protocol\",e)}async unregisterCustomProtocol(e){await this.wire.sendAction(\"unregister-custom-protocol\",{protocolName:e})}async getCustomProtocolState(e){return this.wire.sendAction(\"get-custom-protocol-state\",{protocolName:e}).then((({payload:e})=>e.data))}releaseExternalProcess(e){return this.wire.sendAction(\"release-external-process\",{uuid:e}).then((()=>{}))}showDeveloperTools(e){return this.wire.sendAction(\"show-developer-tools\",e).then((()=>{}))}terminateExternalProcess(e){return this.wire.sendAction(\"terminate-external-process\",e).then((()=>{}))}updateProxySettings(e){return this.wire.sendAction(\"update-proxy\",e).then((()=>{}))}async downloadAsset(e,t){const n=()=>{};let i=n,r=n;const o=new Promise(((e,t)=>{i=e,r=t}));if(\"openfin\"!==this.wire.environment.type)throw new oe.NotSupportedError(\"downloadAsset only supported in an OpenFin Render process\");const s=oe.RuntimeError.getCallSite(),a=this.wire.environment.getNextMessageId().toString(),c=`asset-download-progress-${a}`,d=`asset-download-error-${a}`,h=`asset-download-complete-${a}`,l=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},u=()=>{this.removeListener(c,l)};await Promise.all([this.on(c,l),this.once(d,(e=>{u();const{reason:t,err:n}=e;r(new oe.RuntimeError({reason:t,error:n},s))})),this.once(h,(()=>{u(),i()}))]);const p=Object.assign(e,{downloadId:a});return await this.wire.sendAction(\"download-asset\",p).catch((e=>{throw u(),e})),o}downloadRuntime(e,t){const n=oe.RuntimeError.getCallSite();return new Promise(((i,r)=>{if(\"openfin\"!==this.wire.environment.type)return void r(new oe.NotSupportedError(\"downloadRuntime only supported in an OpenFin Render process\"));const o=this.wire.environment.getNextMessageId().toString(),s=`runtime-download-progress-${o}`,a=`runtime-download-error-${o}`,c=`runtime-download-complete-${o}`,d=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},h=()=>{this.removeListener(s,d)};this.on(s,d),this.once(a,(e=>{h();const{reason:t,err:i}=e;r(new oe.RuntimeError({reason:t,error:i},n))})),this.once(c,(()=>{h(),i()}));const l=Object.assign(e,{downloadId:o});this.wire.sendAction(\"download-runtime\",l).catch((e=>{h(),r(e)}))}))}downloadPreloadScripts(e){return this.wire.sendAction(\"download-preload-scripts\",{scripts:e}).then((({payload:e})=>e.data))}getAllExternalApplications(){return this.wire.sendAction(\"get-all-external-applications\").then((({payload:e})=>e.data))}getAppAssetInfo(e){return this.wire.sendAction(\"get-app-asset-info\",e).then((({payload:e})=>e.data))}getCookies(e){const t=this.wire.environment.getUrl(),n=Object.assign(e,{url:t});return this.wire.sendAction(\"get-cookies\",n).then((({payload:e})=>e.data))}setMinLogLevel(e){return this.wire.sendAction(\"set-min-log-level\",{level:e}).then((()=>{}))}resolveUuid(e){return this.wire.sendAction(\"resolve-uuid\",{entityKey:e}).then((({payload:e})=>e.data))}executeOnRemote(e,t){return t.requestingIdentity=e,this.wire.ferryAction(t)}readRegistryValue(e,t,n){return this.wire.sendAction(\"read-registry-value\",{rootKey:e,subkey:t,value:n}).then((({payload:e})=>e.data))}registerExternalConnection(e){return this.wire.sendAction(\"register-external-connection\",{uuid:e}).then((({payload:e})=>e.data))}async getServiceConfiguration(e){if(\"string\"!=typeof e.name)throw new Error(\"Must provide an object with a `name` property having a string value\");const{name:t}=e;return this.wire.sendAction(\"get-service-configuration\",{name:t}).then((({payload:e})=>e.data))}async getSystemAppConfig(e){if(\"string\"!=typeof e)throw new Error(\"Must provide a string value for name of system app\");return this.wire.sendAction(\"get-system-app-configuration\",{name:e}).then((({payload:e})=>e.data))}async registerShutdownHandler(e){this.wire.sendAction(\"system-register-shutdown-handler\").catch((e=>{}));const{uuid:t,name:n}=this.wire.me;this.on(\"system-shutdown\",(i=>{e({proceed:()=>{this.wire.environment.raiseEvent(\"application/system-shutdown-handled\",{uuid:t,name:n,topic:\"application\"})}})}))}runRvmHealthCheck(){return this.wire.sendAction(\"run-rvm-health-check\").then((({payload:e})=>e.data))}async launchManifest(e,t={}){const{subscribe:n,...i}=t,r=i;if(n){const e=new ae.EventEmitter;n(e);const t=\"app-version-progress\",i=\"runtime-status\",o=\"app-version-complete\",s=\"app-version-error\",a=this.wire.environment.getNextMessageId().toString();r.appVersionId=a;const c=[o,t,i,s],d=e=>{const{appVersionId:t,topic:n,type:i,...r}=e;return{...r,type:c.find((e=>i.includes(e)))}},h=t=>{const n=d(t);e.emit(n.type,n)},l=()=>{this.removeListener(`${t}.${a}`,h),this.removeListener(`${i}.${a}`,h),this.removeListener(`${o}.${a}`,h),this.removeListener(`${s}.${a}`,h),this.removeListener(`${o}.${a}`,l),this.removeListener(`${s}.${a}`,l)};await Promise.all([this.on(`${t}.${a}`,h),this.on(`${i}.${a}`,h),this.once(`${o}.${a}`,h),this.once(`${s}.${a}`,h),this.once(`${o}.${a}`,l),this.once(`${s}.${a}`,l)])}return(await this.wire.sendAction(\"launch-manifest\",{manifestUrl:e,opts:r})).payload.data.manifest}async queryPermissionForCurrentContext(e){const t={uuid:this.wire.me.uuid,name:this.wire.me.name};return(await this.wire.sendAction(\"query-permission-for-current-context\",{apiName:e,identity:t})).payload.data}async enableNativeWindowIntegrationProvider(e){const{payload:t}=await this.wire.sendAction(\"enable-native-window-integration-provider\",{permissions:e});return t.data}async registerUsage({data:e,type:t}){await this.wire.sendAction(\"register-usage\",{data:e,type:t})}async getPrinters(){const{payload:e}=await this.wire.sendAction(\"system-get-printers\");return e.data}async updateProcessLoggingOptions(e){await this.wire.sendAction(\"system-update-process-logging-options\",{options:e})}async getDomainSettings(){const{payload:{data:e}}=await this.wire.sendAction(\"get-domain-settings\",this.identity);return e}async setDomainSettings(e){await this.wire.sendAction(\"set-domain-settings\",{domainSettings:e,...this.identity})}async refreshExtensions(){const{payload:e}=await this.wire.sendAction(\"refresh-extensions\");return e.data}async getInstalledExtensions(){const{payload:e}=await this.wire.sendAction(\"get-installed-extensions\");return e.data}}c.System=ce;var de={},he={};Object.defineProperty(he,\"__esModule\",{value:!0}),he.RefCounter=void 0;he.RefCounter=class{constructor(){this.topicRefMap=new Map}incRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t+1;n=i,this.topicRefMap.set(e,i)}else this.topicRefMap.set(e,1),n=1;return n}decRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t-1;this.topicRefMap.set(e,i),n=i}else n=-1;return n}actOnFirst(e,t,n){return 1===this.incRefCount(e)?t():n()}actOnLast(e,t,n){return 0===this.decRefCount(e)?t():n()}};var le={},ue={},pe={};Object.defineProperty(pe,\"__esModule\",{value:!0}),pe.ChannelBase=pe.ProtectedItems=void 0;const we=e=>async(t,n,i)=>{const r=await e(t,n,i);return void 0===r?n:r};pe.ProtectedItems=class{constructor(e,t){this.providerIdentity=e,this.close=t}};class ye{static defaultAction(e){throw new Error(`No action registered at target for ${e}`)}constructor(){this.subscriptions=new Map}async processAction(e,t,n){try{const i=this.subscriptions.has(e)?this.subscriptions.get(e):(t,n)=>(this.defaultAction??ye.defaultAction)(e,t,n),r=this.preAction?await this.preAction(e,t,n):t,o=await i(r,n);return this.postAction?await this.postAction(e,o,n):o}catch(t){if(this.errorMiddleware)return this.errorMiddleware(e,t,n);throw t}}beforeAction(e){if(this.preAction)throw new Error(\"Already registered beforeAction middleware\");this.preAction=we(e)}onError(e){if(this.errorMiddleware)throw new Error(\"Already registered error middleware\");this.errorMiddleware=e}afterAction(e){if(this.postAction)throw new Error(\"Already registered afterAction middleware\");this.postAction=we(e)}remove(e){this.subscriptions.delete(e)}setDefaultAction(e){if(this.defaultAction)throw new Error(\"default action can only be set once\");this.defaultAction=e}register(e,t){if(this.subscriptions.has(e))throw new Error(`Subscription already registered for action: ${e}. Unsubscribe before adding new subscription`);return this.subscriptions.set(e,t),!0}}pe.ChannelBase=ye;var fe,ge,me,ve=s&&s.__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)},Ce=s&&s.__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};Object.defineProperty(ue,\"__esModule\",{value:!0}),ue.ChannelClient=void 0;const be=pe,Ie=new Map;class Ee extends be.ChannelBase{static closeChannelByEndpointId(e){const t=Ie.get(e);t&&ve(t,me,\"f\").call(t)}static handleProviderDisconnect(e){for(const t of Ie.values())t.providerIdentity.channelId===e.channelId&&(t.disconnectListener(e),ve(t,me,\"f\").call(t))}constructor(e,t,n){super(),fe.set(this,void 0),ge.set(this,void 0),this.processAction=(e,t,n)=>super.processAction(e,t,n),me.set(this,(()=>{Ie.delete(this.endpointId),ve(this,ge,\"f\").close()})),Ce(this,fe,new be.ProtectedItems(e,t),\"f\"),this.disconnectListener=()=>{},this.endpointId=e.endpointId,Ce(this,ge,n,\"f\"),Ie.set(this.endpointId,this),n.receive(this.processAction)}get providerIdentity(){return ve(this,fe,\"f\").providerIdentity}async dispatch(e,t){if(ve(this,ge,\"f\").isEndpointConnected(this.providerIdentity.channelId))return ve(this,ge,\"f\").send(this.providerIdentity.channelId,e,t);throw new Error(\"The client you are trying to dispatch from is disconnected from the target provider.\")}onDisconnection(e){this.disconnectListener=t=>{try{e(t)}catch(e){throw new Error(`Error while calling the onDisconnection callback: ${e.message}`)}finally{this.disconnectListener=()=>{}}}}async disconnect(){await this.sendDisconnectAction(),ve(this,me,\"f\").call(this)}async sendDisconnectAction(){const e=ve(this,fe,\"f\");await e.close()}static async wireClose(e,t,n){const{channelName:i,uuid:r,name:o}=t;await e.sendAction(\"disconnect-from-channel\",{channelName:i,uuid:r,name:o,endpointId:n})}}ue.ChannelClient=Ee,fe=new WeakMap,ge=new WeakMap,me=new WeakMap;var xe={},Ae={};Object.defineProperty(Ae,\"__esModule\",{value:!0}),Ae.exhaustiveCheck=void 0,Ae.exhaustiveCheck=function(e,t){throw new Error(`Unsupported value: ${e}${t?`\\n Supported values are: ${t.join(\"\")}`:\"\"}`)};var Pe,Me,_e,Oe={},Se=s&&s.__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},Re=s&&s.__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)};Object.defineProperty(Oe,\"__esModule\",{value:!0}),Oe.ClassicInfo=Oe.ClassicStrategy=void 0;Oe.ClassicStrategy=class{constructor(e,t,n,i){this.messageReceiver=t,this.endpointId=n,this.providerIdentity=i,Pe.set(this,void 0),Me.set(this,new Map),_e.set(this,new Map),this.send=async(e,t,n)=>{const i=Re(this,Me,\"f\").get(e);if(!i)throw new Error(`Could not locate routing info for endpoint ${e}`);const r={...i};r.isLocalEndpointId&&delete r.endpointId,delete r.isLocalEndpointId;const o=Re(this,Pe,\"f\").sendAction(\"send-channel-message\",{...r,providerIdentity:this.providerIdentity,action:t,payload:n});Re(this,_e,\"f\").get(e)?.add(o);return(await o.catch((e=>{throw new Error(e.message)})).finally((()=>{Re(this,_e,\"f\").get(e)?.delete(o)}))).payload.data.result},this.close=async()=>{this.messageReceiver.removeEndpoint(this.providerIdentity.channelId,this.endpointId),[...Re(this,Me,\"f\").keys()].forEach((e=>this.closeEndpoint(e))),Se(this,Me,new Map,\"f\")},Se(this,Pe,e,\"f\")}onEndpointDisconnect(e,t){}receive(e){this.messageReceiver.addEndpoint(e,this.providerIdentity.channelId,this.endpointId)}async closeEndpoint(e){const t=Re(this,Me,\"f\").get(e);Re(this,Me,\"f\").delete(e);const n=Re(this,_e,\"f\").get(e);n?.forEach((n=>{const i=`Channel connection with identity uuid: ${t?.uuid} / name: ${t?.name} / endpointId: ${e} no longer connected.`;n.cancel(new Error(i))}))}isEndpointConnected(e){return Re(this,Me,\"f\").has(e)}addEndpoint(e,t){Re(this,Me,\"f\").set(e,t.endpointIdentity),Re(this,_e,\"f\").set(e,new Set)}isValidEndpointPayload(e){return\"string\"==typeof e?.endpointIdentity?.endpointId||\"string\"==typeof e?.endpointIdentity?.channelId}},Pe=new WeakMap,Me=new WeakMap,_e=new WeakMap,Oe.ClassicInfo={version:5,minimumVersion:0,type:\"classic\"};var Fe={},je={},ke={};Object.defineProperty(ke,\"__esModule\",{value:!0}),ke.errorToPOJO=void 0,ke.errorToPOJO=function(e){return{stack:e.stack,name:e.name,message:e.message,toString:()=>e.stack||e.toString()}};var Le,Te,$e=s&&s.__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)},Be=s&&s.__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};Object.defineProperty(je,\"__esModule\",{value:!0}),je.RTCEndpoint=void 0;const Ge=ke;je.RTCEndpoint=class{static isValidEndpointPayload(e){const t=e=>\"object\"==typeof e&&null!==e;return t(e)&&t(e.endpointIdentity)&&t(e.rtc)&&\"string\"==typeof e.endpointIdentity.endpointId}constructor({rtc:e,endpointIdentity:t}){this.responseMap=new Map,Le.set(this,null),Te.set(this,void 0),this.connectionStateChangeHandler=e=>{\"connected\"!==this.rtc.rtcClient.connectionState&&(this.rtc.rtcClient.removeEventListener(\"connectionstatechange\",this.connectionStateChangeHandler),this.close(),$e(this,Te,\"f\")&&$e(this,Te,\"f\").call(this))},this.send=async(e,t)=>{const n=`message-${Math.random()}`,i=new Promise(((e,t)=>{this.responseMap.set(n,{resolve:e,reject:t})}));return this.rtc.channels.request.send(JSON.stringify({action:e,payload:t,messageId:n})),i},this.close=()=>{this.responseMap.forEach((e=>e.reject(\"Connection has closed.\"))),this.responseMap=new Map,this.rtc.channels.request.close(),this.rtc.channels.response.close(),this.rtc.rtcClient.close()},this.rtc=e,this.endpointIdentity=t,this.rtc.channels.response.addEventListener(\"message\",(e=>{let{data:t}=e;e.data instanceof ArrayBuffer&&(t=(new TextDecoder).decode(e.data));const{messageId:n,payload:i,success:r,error:o}=JSON.parse(t),{resolve:s,reject:a}=this.responseMap.get(n)??{};s&&a?(this.responseMap.delete(n),r?s(i):a(o)):(console.log(\"Could not find id in responseMap.\"),console.log(e))})),this.rtc.channels.request.addEventListener(\"message\",(async e=>{let{data:n}=e;e.data instanceof ArrayBuffer&&(n=(new TextDecoder).decode(e.data));const{messageId:i,action:r,payload:o}=JSON.parse(n);if($e(this,Le,\"f\"))try{const e=await $e(this,Le,\"f\").call(this,r,o,t);this.rtc.channels.response.send(JSON.stringify({messageId:i,payload:e,success:!0}))}catch(e){\"open\"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,error:(0,Ge.errorToPOJO)(e),success:!1}))}else\"open\"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,success:!1,error:\"Connection not ready.\"}))})),this.rtc.rtcClient.addEventListener(\"connectionstatechange\",this.connectionStateChangeHandler),Object.values(this.rtc.channels).forEach((e=>{e.onclose=e=>{[...this.responseMap.values()].forEach((e=>e.reject(new Error(\"RTCDataChannel closed unexpectedly, this is most commonly caused by message size. Note: RTC Channels have a message size limit of ~255kB.\")))),this.close(),$e(this,Te,\"f\")&&$e(this,Te,\"f\").call(this)}}))}onDisconnect(e){if($e(this,Te,\"f\"))throw new Error(\"RTCEndpoint disconnectListener cannot be set twice.\");Be(this,Te,e,\"f\")}receive(e){if($e(this,Le,\"f\"))throw new Error(\"You have already set a listener for this RTC Endpoint.\");Be(this,Le,e,\"f\")}get connected(){return\"connected\"===this.rtc.rtcClient.connectionState}},Le=new WeakMap,Te=new WeakMap;var We,He,Ne,De={},Ue=s&&s.__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)},Ve=s&&s.__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};Object.defineProperty(De,\"__esModule\",{value:!0}),De.EndpointStrategy=void 0;De.EndpointStrategy=class{constructor(e,t,n){this.EndpointType=e,this.StrategyName=n,We.set(this,null),He.set(this,new Map),Ne.set(this,!0),this.send=async(e,t,n)=>this.getEndpointById(e).send(t,n),this.close=async()=>{Ue(this,Ne,\"f\")&&(Ue(this,He,\"f\").forEach((e=>e.close())),Ve(this,He,new Map,\"f\")),Ve(this,Ne,!1,\"f\")},this.isValidEndpointPayload=t}onEndpointDisconnect(e,t){this.getEndpointById(e).onDisconnect(t)}receive(e){if(Ue(this,We,\"f\"))throw new Error(`You have already set a listener for this ${this.StrategyName} Strategy`);Ve(this,We,e,\"f\"),Ue(this,He,\"f\").forEach((e=>e.receive(Ue(this,We,\"f\"))))}getEndpointById(e){const t=Ue(this,He,\"f\").get(e);if(!t)throw new Error(`Client with endpoint id ${e} is not connected`);return t}get connected(){return Ue(this,Ne,\"f\")}isEndpointConnected(e){return Ue(this,He,\"f\").has(e)}addEndpoint(e,t){if(!Ue(this,Ne,\"f\"))return void console.warn(`Adding endpoint to disconnected ${this.StrategyName} Strategy`);const n=new this.EndpointType(t);Ue(this,We,\"f\")&&n.receive(Ue(this,We,\"f\")),Ue(this,He,\"f\").set(e,n)}async closeEndpoint(e){Ue(this,He,\"f\").delete(e)}},We=new WeakMap,He=new WeakMap,Ne=new WeakMap,Object.defineProperty(Fe,\"__esModule\",{value:!0}),Fe.RTCInfo=Fe.RTCStrategy=void 0;const ze=je,Ke=De;class qe extends Ke.EndpointStrategy{constructor(){super(ze.RTCEndpoint,ze.RTCEndpoint.isValidEndpointPayload,\"RTC\")}}Fe.RTCStrategy=qe,Fe.RTCInfo={version:2,minimumVersion:0,type:\"rtc\"};var Je={};Object.defineProperty(Je,\"__esModule\",{value:!0}),Je.RTCICEManager=void 0;const Ye=d;class Ze extends Ye.EmitterBase{constructor(e){super(e,\"channel\"),this.ensureChannelOpened=e=>new Promise(((t,n)=>{if(\"open\"===e.readyState)t();else if(\"connecting\"===e.readyState){const n=()=>{e.removeEventListener(\"open\",n),t()};e.addEventListener(\"open\",n)}else n(new Error(\"This Channel has already closed\"))}))}static createDataChannelPromise(e,t){let n;const i=new Promise((e=>{n=e})),r=i=>{const o=()=>{i.channel.removeEventListener(\"open\",o),n(i.channel)};i.channel.label===e&&(i.channel.addEventListener(\"open\",o),t.removeEventListener(\"datachannel\",r))};return t.addEventListener(\"datachannel\",r),i}async listenForProviderIce(e,t){await this.on(this.createProviderEventName(e),t,{timestamp:Date.now()})}async raiseProviderIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createProviderEventName(e)),t)}async listenForClientIce(e,t){await this.on(this.createClientEventName(e),t,{timestamp:Date.now()})}async raiseClientIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createClientEventName(e)),t)}cleanupIceListeners(e){this.removeAllListeners(this.createClientEventName(e)),this.removeAllListeners(this.createProviderEventName(e))}createClientEventName(e){return`ice-client-${e}`}createProviderEventName(e){return`ice-provider-${e}`}createRouteString(e){return`channel/${e}`}createRtcPeer(){return this.wire.environment.getRtcPeer()}async startClientOffer(){const e=Math.random().toString(),t=this.createRtcPeer();t.addEventListener(\"icecandidate\",(async t=>{t.candidate&&await this.raiseClientIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForProviderIce(e,(async e=>{await t.addIceCandidate(e.candidate)}));const n={request:t.createDataChannel(\"request\"),response:t.createDataChannel(\"response\")},i=await t.createOffer();await t.setLocalDescription(i);const r=Promise.all([n.request,n.response].map(this.ensureChannelOpened)).then((()=>{}));return{rtcClient:t,channels:n,offer:i,rtcConnectionId:e,channelsOpened:r}}async finishClientOffer(e,t,n){return await e.setRemoteDescription(t),await n,!0}async createProviderAnswer(e,t){const n=this.createRtcPeer(),i=Ze.createDataChannelPromise(\"request\",n),r=Ze.createDataChannelPromise(\"response\",n);n.addEventListener(\"icecandidate\",(async t=>{t.candidate&&await this.raiseProviderIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForClientIce(e,(async e=>{await n.addIceCandidate(e.candidate)})),await n.setRemoteDescription(t);const o=await n.createAnswer();await n.setLocalDescription(o);const s=Promise.all([i,r]).then((([t,n])=>(this.cleanupIceListeners(e),{request:t,response:n})));return{rtcClient:n,answer:o,channels:s}}}Je.RTCICEManager=Ze;var Qe={},Xe={};function et(e){return[...e.split(\".\").reverse().entries()].reduce(((e,[t,n])=>e+ +n*1e4**t),0)}function tt(e,t){return et(e)>=et(t)}function nt(e){return e.split(\"/\")[0]}Object.defineProperty(Xe,\"__esModule\",{value:!0}),Xe.runtimeUuidMeetsMinimumRuntimeVersion=Xe.parseRuntimeUuid=Xe.meetsMinimumRuntimeVersion=void 0,Xe.meetsMinimumRuntimeVersion=tt,Xe.parseRuntimeUuid=nt,Xe.runtimeUuidMeetsMinimumRuntimeVersion=function(e,t){return tt(nt(e),t)};var it,rt,ot,st,at,ct=s&&s.__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)},dt=s&&s.__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};Object.defineProperty(Qe,\"__esModule\",{value:!0}),Qe.ChannelProvider=void 0;const ht=pe,lt=Xe;class ut extends ht.ChannelBase{get connections(){return[...ct(this,it,\"f\")]}static handleClientDisconnection(e,t){const n=e.connections.find((e=>e.endpointId===t.endpointId));if(n)ct(e,st,\"f\").call(e,n);else{e.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name)).forEach(ct(e,st,\"f\"))}e.disconnectListener(t)}static setProviderRemoval(e,t){ut.removalMap.set(e,t)}constructor(e,t,n){super(),it.set(this,void 0),rt.set(this,void 0),ot.set(this,void 0),st.set(this,(e=>{const t=this.connections.filter((t=>t.endpointId!==e.endpointId));ct(this,ot,\"f\").closeEndpoint(e.endpointId),dt(this,it,t,\"f\")})),this.processAction=async(e,t,n)=>(ut.clientIsMultiRuntime(n)&&!(0,lt.runtimeUuidMeetsMinimumRuntimeVersion)(n.runtimeUuid,\"18.87.56.0\")?this.handleMultiRuntimeLegacyClient(n):this.checkForClientConnection(n),super.processAction(e,t,n)),at.set(this,(()=>{ct(this,ot,\"f\").close();const e=ut.removalMap.get(this);e&&e()})),dt(this,rt,new ht.ProtectedItems(e,t),\"f\"),this.connectListener=()=>{},this.disconnectListener=()=>{},dt(this,it,[],\"f\"),dt(this,ot,n,\"f\"),n.receive(this.processAction)}dispatch(e,t,n){const i=e.endpointId??this.getEndpointIdForOpenFinId(e,t);return i&&ct(this,ot,\"f\").isEndpointConnected(i)?ct(this,ot,\"f\").send(i,t,n):Promise.reject(new Error(`Client connection with identity uuid: ${e.uuid} / name: ${e.name} / endpointId: ${i} no longer connected.`))}async processConnection(e,t){return ct(this,it,\"f\").push(e),this.connectListener(e,t)}publish(e,t){return this.connections.map((n=>ct(this,ot,\"f\").send(n.endpointId,e,t)))}onConnection(e){this.connectListener=e}onDisconnection(e){this.disconnectListener=e}async destroy(){const e=ct(this,rt,\"f\");e.providerIdentity,dt(this,it,[],\"f\"),await e.close(),ct(this,at,\"f\").call(this)}async getAllClientInfo(){return this.connections.map((e=>{const{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}=e;return{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}}))}checkForClientConnection(e){if(!this.isClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider.\\n Client Identity: {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}isClientConnected(e){return ut.clientIdentityIncludesEndpointId(e)?this.connections.some((t=>t.endpointId===e.endpointId&&t.uuid===e.uuid&&t.name===e.name)):this.isLegacyClientConnected(e)}isLegacyClientConnected(e){return this.connections.some((t=>t.uuid===e.uuid&&t.name===e.name))}handleMultiRuntimeLegacyClient(e){if(!this.isLegacyClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider. Client Identity:\\n {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}getEndpointIdForOpenFinId(e,t){const n=this.connections.filter((t=>t.name===e.name&&t.uuid===e.uuid));if(n.length>=2){const n=ct(this,rt,\"f\"),{uuid:i,name:r}=e,o=n?.providerIdentity.uuid,s=n?.providerIdentity.name;console.warn(`WARNING: Dispatch call may have unintended results. The \"to\" argument of your dispatch call is missing the\\n \"endpointId\" parameter. The identity you are dispatching to ({uuid: ${i}, name: ${r}})\\n has multiple channelClients for this channel. Your dispatched action: (${t}) from the provider:\\n ({uuid: ${o}, name: ${s}}) will only be processed by the most recently-created client.`)}return n.pop()?.endpointId}static clientIdentityIncludesEndpointId(e){return void 0!==e.endpointId}static clientIsMultiRuntime(e){return void 0!==e.runtimeUuid}static async wireClose(e,t){await e.sendAction(\"destroy-channel\",{channelName:t})}}Qe.ChannelProvider=ut,it=new WeakMap,rt=new WeakMap,ot=new WeakMap,st=new WeakMap,at=new WeakMap,ut.removalMap=new WeakMap;var pt={};Object.defineProperty(pt,\"__esModule\",{value:!0}),pt.MessageReceiver=void 0;const wt=ue,yt=d;class ft extends yt.Base{constructor(e){super(e),this.onmessage=e=>\"process-channel-message\"===e.action&&(this.processChannelMessage(e),!0),this.endpointMap=new Map,this.latestEndpointIdByChannelId=new Map,e.registerMessageHandler(this.onmessage.bind(this))}async processChannelMessage(e){const{senderIdentity:t,providerIdentity:n,action:i,ackToSender:r,payload:o,intendedTargetIdentity:s}=e.payload,a=s.channelId??s.endpointId??this.latestEndpointIdByChannelId.get(n.channelId),c=this.endpointMap.get(a);if(!c)return r.payload.success=!1,r.payload.reason=`Client connection with identity uuid: ${this.wire.me.uuid} / name: ${this.wire.me.name} / endpointId: ${a} no longer connected.`,this.wire.sendRaw(r);try{const e=await c(i,o,t);return r.payload.payload=r.payload.payload||{},r.payload.payload.result=e,this.wire.sendRaw(r)}catch(e){return r.payload.success=!1,r.payload.reason=e.message,this.wire.sendRaw(r)}}addEndpoint(e,t,n){this.endpointMap.set(n,e),t!==n&&this.latestEndpointIdByChannelId.set(t,n)}removeEndpoint(e,t){this.endpointMap.delete(t),this.latestEndpointIdByChannelId.get(e)===t&&this.latestEndpointIdByChannelId.delete(e)}checkForPreviousClientConnection(e){const t=this.latestEndpointIdByChannelId.get(e);t&&(wt.ChannelClient.closeChannelByEndpointId(t),console.warn(\"You have created a second connection to an older provider. First connection has been removed from the clientMap\"),console.warn(\"If the provider calls publish(), you may receive multiple messages.\"))}}pt.MessageReceiver=ft;var gt={};Object.defineProperty(gt,\"__esModule\",{value:!0}),gt.ProtocolManager=void 0;gt.ProtocolManager=class{constructor(e){this.ProtocolsInPreferenceOrder=e,this.DefaultClientProtocols=[\"classic\"],this.DefaultProviderProtocols=[\"classic\"],this.getClientProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultClientProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(\", \")}.`);return t},this.getProviderProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultProviderProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(\", \")}.`);return t},this.getCompatibleProtocols=(e,t)=>t.supportedProtocols.filter((t=>e.some((e=>e.type===t.type&&t.version>=e.minimumVersion&&e.version>=(t.minimumVersion??0))))).slice(0,t.maxProtocols)}};var mt={};Object.defineProperty(mt,\"__esModule\",{value:!0});class vt{static combine(e,t){return new vt(e,t)}constructor(e,t){this.primary=e,this.secondary=t}onEndpointDisconnect(e,t){this.primary.onEndpointDisconnect(e,(()=>{this.secondary.isEndpointConnected(e)||t()})),this.secondary.onEndpointDisconnect(e,(()=>{this.primary.isEndpointConnected(e)||t()}))}isValidEndpointPayload(e){return this.primary.isValidEndpointPayload(e)||this.secondary.isValidEndpointPayload(e)}async closeEndpoint(e){await this.primary.closeEndpoint(e),await this.secondary.closeEndpoint(e)}isEndpointConnected(e){return this.primary.isEndpointConnected(e)||this.secondary.isEndpointConnected(e)}async addEndpoint(e,t){this.primary.isValidEndpointPayload(t)&&await this.primary.addEndpoint(e,t),this.secondary.isValidEndpointPayload(t)&&await this.secondary.addEndpoint(e,t)}receive(e){this.primary.receive(e),this.secondary.receive(e)}send(e,t,n){return this.primary.isEndpointConnected(e)?this.primary.send(e,t,n):this.secondary.send(e,t,n)}async close(){await Promise.all([this.primary.close(),this.secondary.close()])}}mt.default=vt;var Ct,bt,It=s&&s.__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},Et=s&&s.__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)},xt=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(xe,\"__esModule\",{value:!0}),xe.ConnectionManager=void 0;const At=Ae,Pt=d,Mt=Oe,_t=Fe,Ot=Je,St=Qe,Rt=pt,Ft=gt,jt=xt(mt);class kt extends Pt.Base{static getProtocolOptionsFromStrings(e){return e.map((e=>{switch(e){case\"rtc\":return _t.RTCInfo;case\"classic\":return Mt.ClassicInfo;default:return(0,At.exhaustiveCheck)(e,[\"rtc\",\"classic\"])}}))}constructor(e){super(e),Ct.set(this,void 0),bt.set(this,void 0),this.removeChannelFromProviderMap=e=>{this.providerMap.delete(e)},this.onmessage=e=>\"process-channel-connection\"===e.action&&(this.processChannelConnection(e),!0),this.providerMap=new Map,this.protocolManager=new Ft.ProtocolManager(\"node\"===this.wire.environment.type?[\"classic\"]:[\"rtc\",\"classic\"]),It(this,Ct,new Rt.MessageReceiver(e),\"f\"),It(this,bt,new Ot.RTCICEManager(e),\"f\"),e.registerMessageHandler(this.onmessage.bind(this))}createProvider(e,t){const n=Object.assign(this.wire.environment.getDefaultChannelOptions().create,e||{}),i=this.protocolManager.getProviderProtocols(n?.protocols),r=i.map((e=>{switch(e){case\"rtc\":return new _t.RTCStrategy;case\"classic\":return new Mt.ClassicStrategy(this.wire,Et(this,Ct,\"f\"),t.channelId,t);default:return(0,At.exhaustiveCheck)(e,[\"rtc\",\"classic\"])}}));let o;if(2===r.length){const[e,t]=r;o=jt.default.combine(e,t)}else{if(1!==r.length)throw new Error(\"failed to combine strategies\");[o]=r}const s=new St.ChannelProvider(t,(()=>St.ChannelProvider.wireClose(this.wire,t.channelName)),o),a=t.channelId;return this.providerMap.set(a,{provider:s,strategy:o,supportedProtocols:kt.getProtocolOptionsFromStrings(i)}),St.ChannelProvider.setProviderRemoval(s,this.removeChannelFromProviderMap.bind(this)),s}async createClientOffer(e){const t=this.protocolManager.getClientProtocols(e?.protocols);let n;return{offer:{supportedProtocols:await Promise.all(t.map((async e=>{switch(e){case\"rtc\":{const{rtcClient:e,channels:t,offer:i,rtcConnectionId:r,channelsOpened:o}=await Et(this,bt,\"f\").startClientOffer();return n={rtcClient:e,channels:t,channelsOpened:o},{type:\"rtc\",version:_t.RTCInfo.version,payload:{offer:i,rtcConnectionId:r}}}case\"classic\":return{type:\"classic\",version:Mt.ClassicInfo.version};default:return(0,At.exhaustiveCheck)(e,[\"rtc\",\"classic\"])}}))),maxProtocols:2},rtc:n}}async createClientStrategy(e,t){t.endpointId||(t.endpointId=this.wire.environment.getNextMessageId(),Et(this,Ct,\"f\").checkForPreviousClientConnection(t.channelId));const n=t.answer??{supportedProtocols:[{type:\"classic\",version:1}]},i=(await Promise.all(n.supportedProtocols.map((async n=>\"rtc\"===n.type&&e?(await Et(this,bt,\"f\").finishClientOffer(e.rtcClient,n.payload.answer,e.channelsOpened),new _t.RTCStrategy):\"classic\"===n.type?new Mt.ClassicStrategy(this.wire,Et(this,Ct,\"f\"),t.endpointId,t):null)))).filter((e=>null!==e));let r;if(e&&!i.some((e=>e instanceof _t.RTCStrategy))&&e&&e.rtcClient.close(),i.length>=2)r=jt.default.combine(i[0],i[1]);else{if(!i.length)throw new Error(\"No compatible protocols\");[r]=i}const o={endpointIdentity:t,rtc:e};return r.addEndpoint(t.channelId,o),r}async processChannelConnection(e){const{clientIdentity:t,providerIdentity:n,ackToSender:i,payload:r,offer:o}=e.payload;t.endpointId?t.isLocalEndpointId=!1:(t.endpointId=this.wire.environment.getNextMessageId(),t.isLocalEndpointId=!0);const s=n.channelId,a=this.providerMap.get(s);if(!a)return i.payload.success=!1,i.payload.reason=`Channel \"${n.channelName}\" has been destroyed.`,this.wire.sendRaw(i);const{provider:c,strategy:d,supportedProtocols:h}=a;try{if(!(c instanceof St.ChannelProvider))throw Error(\"Cannot connect to a channel client\");const e=o??{supportedProtocols:[{type:\"classic\",version:1}],maxProtocols:1},n=this.protocolManager.getCompatibleProtocols(h,e);if(!n.length)throw new Error(\"This provider does not support any of the offered protocols.\");const s=await c.processConnection(t,r);i.payload.payload=i.payload.payload||{};let a={supportedProtocols:[],endpointPayloadPromise:Promise.resolve({endpointIdentity:t})};return a=await n.reduce((async(e,t)=>{const n=await e;if(\"rtc\"===t.type){const{answer:e,rtcClient:i,channels:r}=await Et(this,bt,\"f\").createProviderAnswer(t.payload.rtcConnectionId,t.payload.offer);n.supportedProtocols.push({type:\"rtc\",version:_t.RTCInfo.version,payload:{answer:e}}),n.endpointPayloadPromise=n.endpointPayloadPromise.then((e=>r.then((t=>({...e,rtc:{rtcClient:i,channels:t}})))))}else n.supportedProtocols.push({type:\"classic\",version:Mt.ClassicInfo.version});return n}),Promise.resolve(a)),a.endpointPayloadPromise.then((e=>d.addEndpoint(t.endpointId,e))),i.payload.payload.result=s,i.payload.payload.answer=a,this.wire.sendRaw(i)}catch(e){return i.payload.success=!1,i.payload.reason=e.message,this.wire.sendRaw(i)}}}xe.ConnectionManager=kt,Ct=new WeakMap,bt=new WeakMap;var Lt,Tt,$t,Bt=s&&s.__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},Gt=s&&s.__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)};Object.defineProperty(le,\"__esModule\",{value:!0}),le.Channel=void 0;const Wt=t,Ht=G,Nt=d,Dt=ue,Ut=xe,Vt=Qe;function zt(e){const t=Math.floor(e/10),n=Math.min(3e4,500*2**t);return new Promise((e=>{setTimeout((()=>{e(!1)}),n)}))}class Kt extends Nt.EmitterBase{constructor(e){super(e,\"channel\"),Lt.set(this,void 0),Tt.set(this,new Wt.EventEmitter),$t.set(this,new Ht.AsyncRetryableLazy((async()=>{await Promise.all([this.on(\"disconnected\",(e=>{Dt.ChannelClient.handleProviderDisconnect(e)})),this.on(\"connected\",((...e)=>{Gt(this,Tt,\"f\").emit(\"connected\",...e)}))]).catch((()=>new Error(\"error setting up channel connection listeners\")))}))),Bt(this,Lt,new Ut.ConnectionManager(e),\"f\")}async getAllChannels(){return this.wire.sendAction(\"get-all-channels\").then((({payload:e})=>e.data))}async onChannelConnect(e){await this.on(\"connected\",e)}async onChannelDisconnect(e){await this.on(\"disconnected\",e)}async safeConnect(e,t,n){const i={count:0};do{let r=()=>{};const o=new Promise((t=>{r=n=>{e===n.channelName&&t(!0)},Gt(this,Tt,\"f\").on(\"connected\",r)}));try{if(i.count>0){i.gotConnectedEvent=await Promise.race([zt(i.count),o]);const t=await this.wire.sendAction(\"connect-to-channel\",{...n,retryInfo:i});return console.log(`Successfully connected to channelName: ${e}`),t.payload.data}const t=this.wire.sendAction(\"connect-to-channel\",n);i.originalMessageId=t.messageId;return(await t).payload.data}catch(n){if(!n.message.includes(\"internal-nack\"))throw n;t&&0===i.count&&console.warn(`No channel found for channelName: ${e}. Waiting for connection...`)}finally{i.count+=1,Gt(this,Tt,\"f\").removeListener(\"connected\",r)}}while(t);throw new Error(`No channel found for channelName: ${e}.`)}async connect(e,t={}){if(await Gt(this,$t,\"f\").getValue(),!e||\"string\"!=typeof e)throw new Error(\"Please provide a channelName string to connect to a channel.\");const n={wait:!0,...this.wire.environment.getDefaultChannelOptions().connect,...t},{offer:i,rtc:r}=await Gt(this,Lt,\"f\").createClientOffer(n);let o;(this.fin.me.isFrame||this.fin.me.isView||this.fin.me.isWindow)&&(o=(await this.fin.me.getInfo()).url);const s={channelName:e,...n,offer:i,connectionUrl:o},a=await this.safeConnect(e,n.wait,s),c=await Gt(this,Lt,\"f\").createClientStrategy(r,a),d=new Dt.ChannelClient(a,(()=>Dt.ChannelClient.wireClose(this.wire,a,a.endpointId)),c);return c.onEndpointDisconnect(a.channelId,(async()=>{try{await d.sendDisconnectAction()}catch(e){console.warn(`Something went wrong during disconnect for client with uuid: ${a.uuid} / name: ${a.name} / endpointId: ${a.endpointId}.`)}finally{Dt.ChannelClient.handleProviderDisconnect(a)}})),d}async create(e,t){if(!e)throw new Error(\"Please provide a channelName to create a channel\");const{payload:{data:n}}=await this.wire.sendAction(\"create-channel\",{channelName:e}),i=Gt(this,Lt,\"f\").createProvider(t,n);return this.on(\"client-disconnected\",(t=>{t.channelName===e&&Vt.ChannelProvider.handleClientDisconnection(i,t)})),i}}le.Channel=Kt,Lt=new WeakMap,Tt=new WeakMap,$t=new WeakMap,Object.defineProperty(de,\"__esModule\",{value:!0}),de.InterAppPayload=de.InterApplicationBus=void 0;const qt=t,Jt=d,Yt=he,Zt=le,Qt=O;class Xt extends Jt.Base{constructor(e){super(e),this.events={subscriberAdded:\"subscriber-added\",subscriberRemoved:\"subscriber-removed\"},this.refCounter=new Yt.RefCounter,this.Channel=new Zt.Channel(e),this.emitter=new qt.EventEmitter,e.registerMessageHandler(this.onmessage.bind(this)),this.on=this.emitter.on.bind(this.emitter),this.removeAllListeners=this.emitter.removeAllListeners.bind(this.emitter)}async publish(e,t){await this.wire.sendAction(\"publish-message\",{topic:e,message:t,sourceWindowName:this.me.name})}async send(e,t,n){const i=(0,Qt.validateIdentity)(e);if(i)throw new Error(i);await this.wire.sendAction(\"send-message\",{destinationUuid:e.uuid,destinationWindowName:e.name,topic:t,message:n,sourceWindowName:this.me.name})}subscribe(e,t,n){const i=this.createSubscriptionKey(e.uuid,e.name||\"*\",t);return this.emitter.on(i,n),this.refCounter.actOnFirst(i,(async()=>{await this.wire.sendAction(\"subscribe\",{sourceUuid:e.uuid,sourceWindowName:e.name||\"*\",topic:t,destinationWindowName:this.me.name})}),(()=>Promise.resolve()))}unsubscribe(e,t,n){const i=e.name||\"*\",r=this.createSubscriptionKey(e.uuid,i,t);return this.emitter.removeListener(r,n),this.refCounter.actOnLast(r,(async()=>{await this.wire.sendAction(\"unsubscribe\",{sourceUuid:e.uuid,sourceWindowName:i,topic:t,destinationWindowName:this.me.name})}),(()=>new Promise((e=>e)).then((()=>{}))))}processMessage(e){const{payload:{message:t,sourceWindowName:n,sourceUuid:i,topic:r}}=e,o=[this.createSubscriptionKey(i,n,r),this.createSubscriptionKey(i,\"*\",r),this.createSubscriptionKey(\"*\",\"*\",r)],s={uuid:i,name:n};o.forEach((e=>{this.emitter.emit(e,t,s)}))}emitSubscriverEvent(e,t){const{payload:{targetName:n,uuid:i,topic:r}}=t,o={name:n,uuid:i,topic:r};this.emitter.emit(e,o)}createSubscriptionKey(e,t,n){const i=t||\"*\";if(!(e&&i&&n))throw new Error(\"Missing uuid, name, or topic string\");return function(...e){return e.map((e=>Buffer.from(`${e}`).toString(\"base64\"))).join(\"/\")}(e,i,n)}onmessage(e){const{action:t}=e;switch(t){case\"process-message\":this.processMessage(e);break;case this.events.subscriberAdded:this.emitSubscriverEvent(this.events.subscriberAdded,e);break;case this.events.subscriberRemoved:this.emitSubscriverEvent(this.events.subscriberRemoved,e)}return!0}}de.InterApplicationBus=Xt;de.InterAppPayload=class{};var en={};Object.defineProperty(en,\"__esModule\",{value:!0}),en.Clipboard=void 0;const tn=d;class nn extends tn.Base{async writeText(e){await this.wire.sendAction(\"clipboard-write-text\",e)}async readText(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-text\",{type:e});return t.data}async writeImage(e){await this.wire.sendAction(\"clipboard-write-image\",e)}async readImage(e={format:\"dataURL\"}){const{payload:t}=await this.wire.sendAction(\"clipboard-read-image\",e);return t.data}async writeHtml(e){await this.wire.sendAction(\"clipboard-write-html\",e)}async readHtml(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-html\",{type:e});return t.data}async writeRtf(e){await this.wire.sendAction(\"clipboard-write-rtf\",e)}async readRtf(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-rtf\",{type:e});return t.data}async write(e){await this.wire.sendAction(\"clipboard-write\",e)}async getAvailableFormats(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-formats\",{type:e});return t.data}}en.Clipboard=nn;var rn={},on={},sn={};Object.defineProperty(sn,\"__esModule\",{value:!0}),sn.ExternalApplication=void 0;const an=d;class cn extends an.EmitterBase{constructor(e,t){super(e,\"external-application\",t.uuid),this.identity=t}getInfo(){return this.wire.sendAction(\"get-external-application-info\",this.identity).then((({payload:e})=>e.data))}}sn.ExternalApplication=cn,Object.defineProperty(on,\"__esModule\",{value:!0}),on.ExternalApplicationModule=void 0;const dn=d,hn=sn;class ln extends dn.Base{wrap(e){return this.wire.sendAction(\"external-application-wrap\").catch((e=>{})),Promise.resolve(new hn.ExternalApplication(this.wire,{uuid:e}))}wrapSync(e){return this.wire.sendAction(\"external-application-wrap-sync\").catch((e=>{})),new hn.ExternalApplication(this.wire,{uuid:e})}}on.ExternalApplicationModule=ln,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(on,e),n(sn,e)}(rn);var un={},pn={},wn={};Object.defineProperty(wn,\"__esModule\",{value:!0}),wn._Frame=void 0;const yn=d;class fn extends yn.EmitterBase{constructor(e,t){super(e,\"frame\",t.uuid,t.name),this.identity=t}getInfo(){return this.wire.sendAction(\"get-frame-info\",this.identity).then((({payload:e})=>e.data))}getParentWindow(){return this.wire.sendAction(\"get-parent-window\",this.identity).then((({payload:e})=>e.data))}}wn._Frame=fn,Object.defineProperty(pn,\"__esModule\",{value:!0}),pn._FrameModule=void 0;const gn=d,mn=O,vn=wn;class Cn extends gn.Base{async wrap(e){this.wire.sendAction(\"frame-wrap\").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}wrapSync(e){this.wire.sendAction(\"frame-wrap-sync\").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}getCurrent(){return this.wire.sendAction(\"frame-get-current\").catch((e=>{})),Promise.resolve(new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity()))}getCurrentSync(){return this.wire.sendAction(\"frame-get-current-sync\").catch((e=>{})),new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity())}}pn._FrameModule=Cn,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(pn,e),n(wn,e)}(un);var bn={};Object.defineProperty(bn,\"__esModule\",{value:!0}),bn.GlobalHotkey=void 0;const In=d;class En extends In.EmitterBase{constructor(e){super(e,\"global-hotkey\")}async register(e,t){await this.on(e,t),await this.wire.sendAction(\"global-hotkey-register\",{hotkey:e})}async unregister(e){await this.removeAllListeners(e),await this.wire.sendAction(\"global-hotkey-unregister\",{hotkey:e})}async unregisterAll(){await Promise.all(this.eventNames().filter((e=>!(\"registered\"===e||\"unregistered\"===e))).map((e=>this.removeAllListeners(e)))),await this.wire.sendAction(\"global-hotkey-unregister-all\",{})}async isRegistered(e){const{payload:{data:t}}=await this.wire.sendAction(\"global-hotkey-is-registered\",{hotkey:e});return t}}bn.GlobalHotkey=En;var xn,An={},Pn={},Mn={},_n=s&&s.__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)};Object.defineProperty(Mn,\"__esModule\",{value:!0}),Mn.Platform=void 0;const On=d,Sn=O,Rn=new Map;class Fn extends On.EmitterBase{constructor(e,t){super(t.wire,\"application\",e.uuid),this.getClient=e=>{this.wire.sendAction(\"platform-get-client\",this.identity).catch((e=>{}));const t=e||this.identity,{uuid:n}=t;if(!Rn.has(n)){const e=_n(this,xn,\"f\").call(this,n);Rn.set(n,e)}return Rn.get(n)},xn.set(this,(async e=>{try{const t=`custom-frame-${e}`,n=await this._channel.connect(t,{wait:!1});return n.onDisconnection((()=>{Rn.delete(e)})),n}catch(t){throw Rn.delete(e),new Error(\"The targeted Platform is not currently running. Listen for application-started event for the given Uuid.\")}})),this.launchLegacyManifest=this.launchContentManifest;const n=(0,Sn.validateIdentity)(e);if(n)throw new Error(n);this._channel=t,this.identity={uuid:e.uuid},this.Layout=this.fin.Platform.Layout,this.Application=this.fin.Application.wrapSync(this.identity)}async createView(e,t,n){this.wire.sendAction(\"platform-create-view\",this.identity).catch((e=>{}));const i=await this.getClient(),r=await i.dispatch(\"create-view\",{target:t,opts:e,targetView:n});if(!r||(0,Sn.validateIdentity)(r.identity))throw new Error(`When overwriting the createView call, please return an object that has a valid 'identity' property: ${JSON.stringify(r)}`);return this.fin.View.wrapSync(r.identity)}async createWindow(e){this.wire.sendAction(\"platform-create-window\",this.identity).catch((e=>{}));const t=await this.getClient();e.reason||(e.reason=\"api-call\");const n=await t.dispatch(\"create-view-container\",e);if(!n||(0,Sn.validateIdentity)(n.identity))throw new Error(`When overwriting the createWindow call, please return an object that has a valid 'identity' property: ${JSON.stringify(n)}`);const{identity:i}=n,r=this.fin.Window.wrapSync(i);return r.name=i.name,r.uuid=i.uuid,r}async quit(){this.wire.sendAction(\"platform-quit\",this.identity).catch((e=>{}));return(await this.getClient()).dispatch(\"quit\")}async closeView(e){this.wire.sendAction(\"platform-close-view\",this.identity).catch((e=>{}));const t=await this.getClient();await t.dispatch(\"close-view\",{view:e})}async reparentView(e,t){console.warn(\"Platform.reparentView has been deprecated, please use Platform.createView\"),this.wire.sendAction(\"platform-reparent-view\",this.identity).catch((e=>{}));const n={...e,uuid:e.uuid??this.identity.uuid},i=await this.fin.View.wrap(n),r=await i.getOptions();return this.createView(r,t)}async getSnapshot(){this.wire.sendAction(\"platform-get-snapshot\",this.identity).catch((e=>{}));return(await this.getClient()).dispatch(\"get-snapshot\")}async getViewSnapshot(e){return(await this.getClient()).dispatch(\"get-view-snapshot\",{viewIdentity:e})}async applySnapshot(e,t){this.wire.sendAction(\"platform-apply-snapshot\",this.identity).catch((e=>{}));const n=\"Requested snapshot must be a valid Snapshot object, or a url or filepath to such an object.\";let i;if(\"string\"==typeof e)try{i=(await this._channel.wire.sendAction(\"get-application-manifest\",{manifestUrl:e})).payload.data}catch(e){throw new Error(`${n}: ${e}`)}else i=e;if(!i.windows)throw new Error(n);const r=await this.getClient();return await r.dispatch(\"apply-snapshot\",{snapshot:i,options:t}),this}async fetchManifest(e){return(await this.getClient()).dispatch(\"platform-fetch-manifest\",{manifestUrl:e})}async launchContentManifest(e){this.wire.sendAction(\"platform-launch-content-manifest\",this.identity).catch((()=>{}));const t=await this.getClient(),n=await this.fetchManifest(e);return t.dispatch(\"launch-into-platform\",{manifest:n,manifestUrl:e}),this}async setWindowContext(e={},t){if(this.wire.sendAction(\"platform-set-window-context\",this.identity).catch((e=>{})),!e)throw new Error(\"Please provide a serializable object or string to set the context.\");const n=await this.getClient(),{entityType:i}=t?await this.fin.System.getEntityInfo(t.uuid,t.name):this.fin.me;await n.dispatch(\"set-window-context\",{context:e,entityType:i,target:t||{uuid:this.fin.me.uuid,name:this.fin.me.name}})}async getWindowContext(e){this.wire.sendAction(\"platform-get-window-context\",this.identity).catch((e=>{}));const t=await this.getClient(),{entityType:n}=e?await this.fin.System.getEntityInfo(e.uuid,e.name):this.fin.me;return t.dispatch(\"get-window-context\",{target:e||{uuid:this.fin.me.uuid,name:this.fin.me.name},entityType:n})}async closeWindow(e,t={skipBeforeUnload:!1}){this.wire.sendAction(\"platform-close-window\",this.identity).catch((e=>{}));return(await this.getClient()).dispatch(\"close-window\",{windowId:e,options:t})}}Mn.Platform=Fn,xn=new WeakMap;var jn={},kn={},Ln={},Tn={};function $n(e){switch(e){case\"columns\":case\"grid\":case\"rows\":case\"tabs\":return!0;default:return!1}}Object.defineProperty(Tn,\"__esModule\",{value:!0}),Tn.overrideFromComposables=Tn.isValidPresetType=void 0,Tn.isValidPresetType=$n,Tn.overrideFromComposables=function(...e){return t=>e.reduceRight(((e,t)=>n=>t(e(n))),(e=>e))(t)},Tn.default={isValidPresetType:$n};var Bn={},Gn={},Wn={};Object.defineProperty(Wn,\"__esModule\",{value:!0}),Wn.ApiConsumer=void 0;Wn.ApiConsumer=class{constructor(e){this.strategy=e,this.consume=async e=>(await this.strategy.getExposedFunctions(e)).reduce(((t,n)=>({...t,[n.key]:this.strategy.createFunction(n,e)})),{})}};var Hn={},Nn={};Object.defineProperty(Nn,\"__esModule\",{value:!0}),Nn.expose=Nn.getExposedProperties=void 0;const Dn=Symbol(\"exposedProperties\");Nn.getExposedProperties=e=>e[Dn]||e.prototype[Dn]||[];Nn.expose=e=>(t,n,i)=>{t[Dn]=t[Dn]||[],t[Dn].push({key:n,descriptor:i,options:e})},Object.defineProperty(Hn,\"__esModule\",{value:!0}),Hn.ApiExposer=void 0;const Un=Nn;Hn.ApiExposer=class{constructor(e){this.strategy=e,this.exposeInstance=async(e,t)=>{const n=(0,Un.getExposedProperties)(e),i=await Promise.all(n.map((async({key:n,options:i})=>({key:n,options:await this.strategy.exposeFunction(e[n].bind(e),{key:n,options:i,meta:t})}))));await this.strategy.exposeMeta(t,i)}}};var Vn={},zn={},Kn={};Object.defineProperty(Kn,\"__esModule\",{value:!0}),Kn.ChannelsConsumer=void 0;Kn.ChannelsConsumer=class{constructor(e){this.channel=e,this.getExposedFunctions=async e=>{const{id:t}=e,{props:n}=await this.channel.dispatch(`api-meta:${t}`);return n},this.createFunction=e=>(...t)=>{const{action:n}=e.options;return this.channel.dispatch(n,{args:t})}}};var qn={};Object.defineProperty(qn,\"__esModule\",{value:!0}),qn.ChannelsExposer=void 0;qn.ChannelsExposer=class{constructor(e){this.channelProviderOrClient=e,this.exposeFunction=async(e,t)=>{const{key:n,options:i,meta:r}=t,{id:o}=r,s=`${o}.${i?.action||n}`;return await this.channelProviderOrClient.register(s,(async({args:t})=>e(...t))),{action:s}},this.exposeMeta=async({id:e},t)=>{const n=`api-meta:${e}`;await this.channelProviderOrClient.register(n,(()=>({props:t})))}}},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Kn,e),n(qn,e)}(zn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(zn,e)}(Vn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Wn,e),n(Hn,e),n(Vn,e),n(Nn,e)}(Gn);var Jn={};Object.defineProperty(Jn,\"__esModule\",{value:!0}),Jn.createRelayedDispatch=exports.relayChannelClientApi_1=Jn.relayChannelClientApi=void 0;const Yn=[\"no longer connected\",\"RTCDataChannel closed unexpectedly\",\"The client you are trying to dispatch from is disconnected from the target provider\"];exports.relayChannelClientApi_1=Jn.relayChannelClientApi=async(e,t)=>{e.register(`relay:${t}`,(({action:t,target:n,payload:i})=>e.dispatch(n,t,i))),await Promise.resolve()};Jn.createRelayedDispatch=(e,t,n,i)=>async(r,o)=>{try{return await e.dispatch(`relay:${n}`,{action:r,payload:o,target:t})}catch(e){if(s=e.message,Yn.some((e=>s.includes(e)))&&i)throw new Error(i);throw e}var s};var Zn,Qn,Xn,ei=s&&s.__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},ti=s&&s.__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)};Object.defineProperty(Bn,\"__esModule\",{value:!0}),Bn.ColumnOrRow=Bn.TabStack=Bn.LayoutNode=void 0;const ni=Gn,ii=Jn;class ri{constructor(e,t){Zn.set(this,void 0),this.isRoot=()=>ti(this,Zn,\"f\").isRoot(this.entityId),this.exists=()=>ti(this,Zn,\"f\").exists(this.entityId),this.getParent=async()=>{const e=await ti(this,Zn,\"f\").getParent(this.entityId);if(e)return ri.getEntity(e,ti(this,Zn,\"f\"))},this.createAdjacentStack=async(e,t)=>{const n=await ti(this,Zn,\"f\").createAdjacentStack(this.entityId,e,t);return ri.getEntity({entityId:n,type:\"stack\"},ti(this,Zn,\"f\"))},this.getAdjacentStacks=async e=>(await ti(this,Zn,\"f\").getAdjacentStacks({targetId:this.entityId,edge:e})).map((e=>ri.getEntity({type:\"stack\",entityId:e.entityId},ti(this,Zn,\"f\")))),ei(this,Zn,e,\"f\"),this.entityId=t}}Bn.LayoutNode=ri,Zn=new WeakMap,ri.newLayoutEntitiesClient=async(e,t,n)=>{const i=(0,ii.createRelayedDispatch)(e,n,\"layout-relay\",\"You are trying to interact with a layout component on a window that does not exist or has been destroyed.\");return new ni.ApiConsumer(new ni.ChannelsConsumer({dispatch:i})).consume({id:t})},ri.getEntity=(e,t)=>{const{entityId:n,type:i}=e;switch(i){case\"column\":case\"row\":return new si(t,n,i);case\"stack\":return new oi(t,n);default:throw new Error(`Unrecognised Layout Entity encountered ('${JSON.stringify(e)})`)}};class oi extends ri{constructor(e,t){super(e,t),Qn.set(this,void 0),this.type=\"stack\",this.getViews=()=>ti(this,Qn,\"f\").getStackViews(this.entityId),this.addView=async(e,t={index:0})=>ti(this,Qn,\"f\").addViewToStack(this.entityId,e,t),this.removeView=async e=>{await ti(this,Qn,\"f\").removeViewFromStack(this.entityId,e)},this.setActiveView=async e=>{await ti(this,Qn,\"f\").setStackActiveView(this.entityId,e)},ei(this,Qn,e,\"f\")}}Bn.TabStack=oi,Qn=new WeakMap;class si extends ri{constructor(e,t,n){super(e,t),Xn.set(this,void 0),this.getContent=async()=>(await ti(this,Xn,\"f\").getContent(this.entityId)).map((e=>ri.getEntity(e,ti(this,Xn,\"f\")))),ei(this,Xn,e,\"f\"),this.type=n}}Bn.ColumnOrRow=si,Xn=new WeakMap;var ai={};Object.defineProperty(ai,\"__esModule\",{value:!0}),ai.DEFAULT_LAYOUT_KEY=ai.LAYOUT_CONTROLLER_ID=void 0,ai.LAYOUT_CONTROLLER_ID=\"layout-entities\",ai.DEFAULT_LAYOUT_KEY=\"__default__\";var ci,di,hi,li=s&&s.__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)};Object.defineProperty(Ln,\"__esModule\",{value:!0}),Ln.Layout=void 0;const ui=G,pi=O,wi=d,yi=Tn,fi=Bn,gi=ai;class mi extends wi.Base{static getClient(e){return li(e,di,\"f\").getValue()}constructor(e,t){super(t),ci.add(this),di.set(this,new ui.Lazy((async()=>fi.LayoutNode.newLayoutEntitiesClient(await this.platform.getClient(),gi.LAYOUT_CONTROLLER_ID,this.identity)))),this.replace=async e=>{this.wire.sendAction(\"layout-replace\").catch((e=>{}));const t=await this.platform.getClient();await t.dispatch(\"replace-layout\",{target:this.identity,opts:{layout:e}})},this.replaceView=async(e,t)=>{this.wire.sendAction(\"layout-replace-view\").catch((e=>{}));const n=await this.platform.getClient();await n.dispatch(\"replace-view\",{target:this.identity,opts:{viewToReplace:e,newView:t}})},this.applyPreset=async e=>{this.wire.sendAction(\"layout-apply-preset\").catch((e=>{}));const t=await this.platform.getClient(),{presetType:n}=e;if(!n||!(0,yi.isValidPresetType)(n))throw new Error(\"Cannot apply preset layout, please include an applicable presetType property in the PresetLayoutOptions.\");await t.dispatch(\"apply-preset-layout\",{target:this.identity,opts:{presetType:n}})};const n=(0,pi.validateIdentity)(e);if(n)throw new Error(n);this.identity=e,this.platform=this.fin.Platform.wrapSync({uuid:e.uuid}),e.uuid===this.fin.me.uuid&&e.name===this.fin.me.name&&(this.init=this.fin.Platform.Layout.init)}async getConfig(){this.wire.sendAction(\"layout-get-config\").catch((e=>{}));return(await this.platform.getClient()).dispatch(\"get-frame-snapshot\",{target:this.identity})}async getCurrentViews(){this.wire.sendAction(\"layout-get-views\").catch((e=>{}));const e=await this.platform.getClient();return(await e.dispatch(\"get-layout-views\",{target:this.identity})).map((e=>this.fin.View.wrapSync(e)))}async getRootItem(){this.wire.sendAction(\"layout-get-root-item\").catch((()=>{}));const e=await li(this,di,\"f\").getValue(),t=await e.getRoot(\"layoutName\"in this.identity?this.identity:void 0);return fi.LayoutNode.getEntity(t,e)}async getStackByViewIdentity(e){this.wire.sendAction(\"layout-get-stack-by-view\").catch((()=>{}));const t=await li(this,di,\"f\").getValue(),n=await t.getStackByView(e);if(!n)throw new Error(`No stack found for view: ${e.uuid}/${e.name}`);return fi.LayoutNode.getEntity(n,t)}async addView(e,{location:t,targetView:n}={}){this.wire.sendAction(\"layout-add-view\").catch((e=>{}));const{identity:i}=await li(this,ci,\"m\",hi).call(this,\"layout-add-view\",{viewOptions:e,location:t,targetView:n});return{identity:i}}async closeView(e){this.wire.sendAction(\"layout-close-view\").catch((e=>{})),await li(this,ci,\"m\",hi).call(this,\"layout-close-view\",{viewIdentity:e})}}Ln.Layout=mi,di=new WeakMap,ci=new WeakSet,hi=async function(e,t){return(await this.platform.getClient()).dispatch(e,{target:this.identity,opts:t})};var vi,Ci,bi,Ii,Ei,xi=s&&s.__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)},Ai=s&&s.__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};Object.defineProperty(kn,\"__esModule\",{value:!0}),kn.LayoutModule=void 0;const Pi=d,Mi=Ln,_i=ai;class Oi extends Pi.Base{constructor(){super(...arguments),vi.add(this),Ci.set(this,!1),bi.set(this,null),this.init=async(e={})=>{if(this.wire.sendAction(\"layout-init\").catch((e=>{})),!this.wire.environment.layoutAllowedInContext(this.fin))throw new Error(\"Layout.init can only be called from a Window context.\");if(xi(this,Ci,\"f\"))throw new Error(\"Layout.init was already called, please use Layout.create to add additional layouts.\");\"openfin\"===this.wire.environment.type&&await this.fin.Platform.getCurrentSync().getClient(),Ai(this,Ci,!0,\"f\"),Ai(this,bi,await this.wire.environment.initLayoutManager(this.fin,this.wire,e),\"f\"),await this.wire.environment.applyLayoutSnapshot(this.fin,xi(this,bi,\"f\"),e);const t={name:this.fin.me.name,uuid:this.fin.me.uuid};if(!e.layoutManagerOverride){const e={layoutName:_i.DEFAULT_LAYOUT_KEY,...t};return xi(this,Ii,\"f\").call(this,e)}return this.wrapSync(t)},Ii.set(this,(e=>{const t=\"[Layout] You are using a deprecated property `layoutManager` - it will throw if you access it starting in v37.\",n=new Proxy({},{get(e,n){throw console.warn(`[Layout-mgr-proxy] accessing ${n.toString()}`),new Error(t)}}),i=Object.assign(this.wrapSync(e),{layoutManager:n});return new Proxy(i,{get(e,n){if(\"layoutManager\"===n)throw console.warn(`[Layout-proxy] accessing ${n.toString()}`),new Error(t);return e[n]}})})),this.getCurrentLayoutManagerSync=()=>xi(this,vi,\"m\",Ei).call(this,\"fin.Platform.Layout.getCurrentLayoutManagerSync()\"),this.create=async e=>this.wire.environment.createLayout(xi(this,vi,\"m\",Ei).call(this,\"fin.Platform.Layout.create()\"),e),this.destroy=async e=>this.wire.environment.destroyLayout(xi(this,vi,\"m\",Ei).call(this,\"fin.Platform.Layout.destroy()\"),e)}async wrap(e){return this.wire.sendAction(\"layout-wrap\").catch((e=>{})),new Mi.Layout(e,this.wire)}wrapSync(e){return this.wire.sendAction(\"layout-wrap-sync\").catch((e=>{})),new Mi.Layout(e,this.wire)}async getCurrent(){if(this.wire.sendAction(\"layout-get-current\").catch((e=>{})),\"openfin\"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error(\"You are not in a Window context. Only Windows can have a Layout.\");const{uuid:e,name:t}=this.fin.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction(\"layout-get-current-sync\").catch((e=>{})),\"openfin\"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error(\"You are not in a Window context. Only Windows can have a Layout.\");const{uuid:e,name:t}=this.fin.me;return this.wrapSync({uuid:e,name:t})}async getLayoutByViewIdentity(e){this.wire.sendAction(\"layout-get-by-view-identity\").catch((()=>{}));let t=await this.wire.environment.getViewWindowIdentity(this.fin,e);t.identity&&(t=t.identity);try{const n=this.wrapSync(t),i=await Mi.Layout.getClient(n),r=await i.getLayoutIdentityForViewOrThrow(e);return this.wrapSync(r)}catch(n){if(![\"No action registered at target for\",\"getLayoutIdentityForViewOrThrow is not a function\"].some((e=>n.message.includes(e))))throw n;if(t.uuid===t.name)throw new Error(`View identity ${JSON.stringify(e)} is not attached to any layout in provider window ${JSON.stringify(t)}.`);return this.wrapSync(t)}}}kn.LayoutModule=Oi,Ci=new WeakMap,bi=new WeakMap,Ii=new WeakMap,vi=new WeakSet,Ei=function(e){if(!xi(this,bi,\"f\"))throw new Error(`You must call init before using the API ${e}`);return xi(this,bi,\"f\")},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(kn,e),n(Ln,e)}(jn),Object.defineProperty(Pn,\"__esModule\",{value:!0}),Pn.PlatformModule=void 0;const Si=d,Ri=Mn,Fi=jn;class ji extends Si.Base{constructor(e,t){super(e),this._channel=t,this.Layout=new Fi.LayoutModule(this.wire)}async init(e){if(!fin.__internal_.isPlatform||fin.me.name!==fin.me.uuid)throw new Error(\"fin.Platform.init should only be called from a custom platform provider running in the main window of the application.\");return this.wire.environment.initPlatform(this.fin,e)}async wrap(e){return this.wire.sendAction(\"platform-wrap\").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}wrapSync(e){return this.wire.sendAction(\"platform-wrap-sync\").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}async getCurrent(){return this.wire.sendAction(\"platform-get-current\").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction(\"platform-get-current-sync\").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}start(e){return this.wire.sendAction(\"platform-start\").catch((e=>{})),new Promise((async(t,n)=>{try{const{uuid:n}=e,i=await this.fin.Application._create({...e,isPlatformController:!0});i.once(\"platform-api-ready\",(()=>t(this.wrapSync({uuid:n})))),i._run({uuid:n})}catch(e){n(e)}}))}startFromManifest(e,t){return this.wire.sendAction(\"platform-start-from-manifest\").catch((e=>{})),new Promise((async(n,i)=>{try{const i=await this.fin.Application._createFromManifest(e);i.once(\"platform-api-ready\",(()=>n(this.wrapSync({uuid:i.identity.uuid})))),i._run(t)}catch(e){i(e)}}))}}Pn.PlatformModule=ji,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Pn,e),n(Mn,e)}(An);var ki={};!function(e){Object.defineProperty(e,\"__esModule\",{value:!0}),e.getMe=e.getBaseMe=e.environmentUnsupportedMessage=void 0;const t=J(),n=un,i=ie(),r=rn;function o(e,t,n){return{...{isView:\"view\"===e,isWindow:\"window\"===e,isFrame:\"iframe\"===e,isExternal:\"external connection\"===e},uuid:t,name:n,entityType:e}}e.environmentUnsupportedMessage=\"You are not running in OpenFin.\",e.getBaseMe=o,e.getMe=function(s){const{uuid:a,name:c,entityType:d}=s.me,h={setContext(){throw new Error(e.environmentUnsupportedMessage)},addContextHandler(){throw new Error(e.environmentUnsupportedMessage)},getContextGroups(){throw new Error(e.environmentUnsupportedMessage)},joinContextGroup(){throw new Error(e.environmentUnsupportedMessage)},removeFromContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getAllClientsInContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getInfoForContextGroup(){throw new Error(e.environmentUnsupportedMessage)}},l=\"Interop API has not been instantiated. Either connection has failed or you have not declared interop in your config.\",u={setContext(){throw new Error(l)},addContextHandler(){throw new Error(l)},getContextGroups(){throw new Error(l)},joinContextGroup(){throw new Error(l)},removeFromContextGroup(){throw new Error(l)},getAllClientsInContextGroup(){throw new Error(l)},getInfoForContextGroup(){throw new Error(l)}},p={eventNames:()=>{throw new Error(e.environmentUnsupportedMessage)},emit:()=>{throw new Error(e.environmentUnsupportedMessage)},listeners:()=>{throw new Error(e.environmentUnsupportedMessage)},listenerCount:()=>{throw new Error(e.environmentUnsupportedMessage)},on:()=>{throw new Error(e.environmentUnsupportedMessage)},addListener:()=>{throw new Error(e.environmentUnsupportedMessage)},once:()=>{throw new Error(e.environmentUnsupportedMessage)},prependListener:()=>{throw new Error(e.environmentUnsupportedMessage)},prependOnceListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeAllListeners:()=>{throw new Error(e.environmentUnsupportedMessage)}};switch(d){case\"view\":return Object.assign(new t.View(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case\"window\":return Object.assign(new i._Window(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case\"iframe\":return Object.assign(new n._Frame(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case\"external connection\":return Object.assign(new r.ExternalApplication(s,{uuid:a}),o(d,a,c),{interop:u,isOpenFin:!1});default:return{...o(d,a,c),...p,interop:h,isOpenFin:!1}}}}(ki);var Li={},Ti={},$i={};Object.defineProperty($i,\"__esModule\",{value:!0}),$i.createWarningObject=$i.createUnusableObject=void 0,$i.createUnusableObject=function(e){const t=()=>{throw new Error(e)};return new Proxy({},{apply:t,construct:t,defineProperty:t,deleteProperty:t,get:t,getOwnPropertyDescriptor:t,getPrototypeOf:t,has:t,isExtensible:t,ownKeys:t,preventExtensions:t,set:t,setPrototypeOf:t})},$i.createWarningObject=function(e,t){return new Proxy(t,{get:(...t)=>(console.warn(e),Reflect.get(...t)),set:(...t)=>(console.warn(e),Reflect.set(...t)),getOwnPropertyDescriptor:(...t)=>(console.warn(e),Reflect.getOwnPropertyDescriptor(...t)),ownKeys:(...t)=>(console.warn(e),Reflect.ownKeys(...t))})};var Bi,Gi={},Wi={};var Hi={};!function(e){Object.defineProperty(e,\"__esModule\",{value:!0}),e.wrapIntentHandler=e.BROKER_ERRORS=e.generateOverrideWarning=e.generateOverrideError=e.wrapContextHandler=e.wrapInTryCatch=e.generateId=void 0;e.generateId=()=>`${Math.random()}${Date.now()}`;e.wrapInTryCatch=(e,t)=>(...n)=>{try{return e(...n)}catch(e){throw new Error((t||\"\")+e)}};e.wrapContextHandler=(e,t)=>async n=>{try{await e(n)}catch(e){throw console.error(`Error thrown by handler ${t} for context type ${n.type}: ${e}`),e}};e.generateOverrideError=(e,t)=>`You have tried to to use ${e} but ${t} has not been overridden in the Interop Broker. Please override this function. Refer to our documentation for more info.`;e.generateOverrideWarning=(e,t,n,i)=>{const{uuid:r,name:o}=n;return i?`Entity with identity: ${r}/${o} has called ${i} or ${e} but ${t} has not been overridden.`:`Entity with identity: ${r}/${o} has called ${e} but ${t} has not been overridden.`},e.BROKER_ERRORS={fireIntent:(0,e.generateOverrideError)(\"fireIntent\",\"handleFiredIntent\"),fireIntentForContext:(0,e.generateOverrideError)(\"fireIntentForContext\",\"handleFiredIntentForContext\"),getInfoForIntent:(0,e.generateOverrideError)(\"getInfoForIntent\",\"handleInfoForIntent\"),getInfoForIntentsByContext:(0,e.generateOverrideError)(\"getInfoForIntentsByContext\",\"handleInfoForIntentsByContext\"),joinSessionContextGroupWithJoinContextGroup:\"The Context Group you have tried to join is a Session Context Group. Custom Context Groups can only be defined by the Interop Broker through code or manifest configuration. Please use joinSessionContextGroup.\",fdc3Open:(0,e.generateOverrideError)(\"fdc3.open\",\"fdc3HandleOpen\"),fdc3FindInstances:(0,e.generateOverrideError)(\"fdc3.findInstances\",\"fdc3HandleFindInstances\"),fdc3GetAppMetadata:(0,e.generateOverrideError)(\"fdc3.getAppMetadata\",\"fdc3HandleGetAppMetadata\"),fdc3GetInfo:(0,e.generateOverrideError)(\"fdc3.getInfo\",\"fdc3HandleGetInfo\")};e.wrapIntentHandler=(e,t)=>async n=>{try{return e(n)}catch(e){throw console.error(`Error thrown by handler ${t}: ${e}`),e}}}(Hi);var Ni,Di,Ui={};function Vi(){if(Di)return Gi;Di=1;var e,t,n,r=s&&s.__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},o=s&&s.__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)},a=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Gi,\"__esModule\",{value:!0}),Gi.InteropBroker=void 0;const c=d,h=a(function(){if(Bi)return Wi;Bi=1,Object.defineProperty(Wi,\"__esModule\",{value:!0});const e=Cr();return Wi.default=class{constructor(e,t){this.provider=e,this.id=t,this.lastContext=void 0,this.contextGroupMap=new Map,this.clients=new Map,this.registerListeners()}registerListeners(){this.provider.register(`sessionContextGroup:getContext-${this.id}`,this.getCurrentContext.bind(this)),this.provider.register(`sessionContextGroup:setContext-${this.id}`,this.setContext.bind(this)),this.provider.register(`sessionContextGroup:handlerAdded-${this.id}`,this.handlerAdded.bind(this)),this.provider.register(`sessionContextGroup:handlerRemoved-${this.id}`,this.handlerRemoved.bind(this))}getCurrentContext(e){return e.type?this.contextGroupMap.get(e.type):this.lastContext}setContext(t,n){const{context:i}=t,r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name} not in Session Client State Map`);this.contextGroupMap.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{e.contextHandlers.get(i.type)?.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getClientState(e){return this.clients.get(e.endpointId)}async handlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(i){const e=r.contextHandlers.get(i)||[];r.contextHandlers.set(i,[...e,n]);const o=this.contextGroupMap.get(i);o&&await this.provider.dispatch(t,n,o)}else{r.globalHandler=n;const e=[...this.contextGroupMap.keys()].map((async e=>{const i=this.contextGroupMap.get(e);i&&await this.provider.dispatch(t,n,i)}));await Promise.all(e)}}handlerRemoved(e,t){const{handlerId:n}=e,i=this.clients.get(t.endpointId);i?(Array.from(i.contextHandlers).forEach((([,e])=>{const t=e.indexOf(n);t>-1&&e.splice(t,1)})),i.globalHandler===n&&(i.globalHandler=void 0)):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={contextHandlers:new Map,clientIdentity:e,globalHandler:void 0};this.clients.set(e.endpointId,t)}}onDisconnection(e){this.clients.delete(e.endpointId)}},Wi}()),l=Hi,u=a(i),p=function(){if(Ni)return Ui;Ni=1,Object.defineProperty(Ui,\"__esModule\",{value:!0}),Ui.PrivateChannelProvider=void 0;const e=Vi();return Ui.PrivateChannelProvider=class t{constructor(e,t){this.provider=e,this.id=t,this.clients=new Map,this.registerListeners(),this.contextByContextType=new Map,this.lastContext=void 0,this.provider.onConnection((e=>this.registerNewClient(e))),this.provider.onDisconnection((async e=>{const{endpointId:t}=e;this.clients.has(t)&&await this.handleClientDisconnecting(e),0===(await this.provider.getAllClientInfo()).length&&this.provider.destroy()}))}getClientState(e){return this.clients.get(e.endpointId)}registerListeners(){this.provider.register(\"broadcast\",this.broadcast.bind(this)),this.provider.register(\"getCurrentContext\",this.getCurrentContext.bind(this)),this.provider.register(\"contextHandlerAdded\",this.contextHandlerAdded.bind(this)),this.provider.register(\"contextHandlerRemoved\",this.contextHandlerRemoved.bind(this)),this.provider.register(\"nonStandardHandlerRemoved\",this.nonStandardHandlerRemoved.bind(this)),this.provider.register(\"onAddContextHandlerAdded\",this.onAddContextHandlerAdded.bind(this)),this.provider.register(\"onDisconnectHandlerAdded\",this.onDisconnectHandlerAdded.bind(this)),this.provider.register(\"onUnsubscribeHandlerAdded\",this.onUnsubscribeHandlerAdded.bind(this)),this.provider.register(\"clientDisconnecting\",((e,t)=>{this.handleClientDisconnecting(t)}))}broadcast(t,n){const{context:i}=t;if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name}, tried to call broadcast, is not connected to this Private Channel`);const r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to broadcast - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);this.contextByContextType.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{const t=e.handlerIdsByContextTypes.get(i.type);t&&t.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getCurrentContext(e,t){const{contextType:n}=e;if(!this.getClientState(t))throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call getCurrentContext, is not connected to this Private Channel`);if(void 0!==n){return this.contextByContextType.get(n)||null}return this.lastContext?this.lastContext:null}contextHandlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call addContextListener, is not connected to this Private Channel`);if(i){const e=r.handlerIdsByContextTypes.get(i)||[];r.handlerIdsByContextTypes.set(i,[...e,n])}else r.globalHandler=n;Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&e.onAddContextListenerHandlerId&&this.provider.dispatch(e.clientIdentity,e.onAddContextListenerHandlerId,i)}))}async contextHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);if(i){let e;if(i.globalHandler===n)i.globalHandler=void 0;else for(const[t,r]of i.handlerIdsByContextTypes){const i=r.indexOf(n);i>-1&&(r.splice(i,1),e=t)}const r=(await this.getConnectedClients()).map((async n=>{const{clientIdentity:i,clientIdentity:{endpointId:r},onUnsubscribeHandlerId:o}=n;r!==t.endpointId&&o&&await this.provider.dispatch(i,o,e)}));try{await Promise.all(r)}catch(e){throw console.error(`Problem when attempting to dispatch to onUnsubscribeHandlers. Error: ${e} Removing Client: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}`),new Error(e)}}else console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}.`)}nonStandardHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);i?i.onDisconnectHandlerId===n?i.onDisconnectHandlerId=void 0:i.onAddContextListenerHandlerId===n?i.onAddContextListenerHandlerId=void 0:i.onUnsubscribeHandlerId===n&&(i.onUnsubscribeHandlerId=void 0):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}onAddContextHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onAddContextListener, is not connected to this Private Channel`);n.onAddContextListenerHandlerId=i,Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&Array.from(e.handlerIdsByContextTypes.keys()).forEach((e=>{this.provider.dispatch(t,i,e)}))}))}onDisconnectHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onDisconnect, is not connected to this Private Channel`);n.onDisconnectHandlerId=i}onUnsubscribeHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onUnsubscribe, is not connected to this Private Channel`);n.onUnsubscribeHandlerId=i}removeClient(e){const t=this.getClientState(e);if(!t)throw new Error(`Client with Identity: ${e.uuid} ${e.name}, tried to call disconnect, is not connected to this Private Channel`);t.handlerIdsByContextTypes.clear(),this.clients.delete(e.endpointId)}async fireOnDisconnectForOtherClients(e){const{endpointId:t}=e,n=(await this.getConnectedClients()).map((async e=>{const{clientIdentity:{endpointId:n},onDisconnectHandlerId:i}=e;n!==t&&i&&await this.provider.dispatch(e.clientIdentity,i)}));try{await Promise.all(n)}catch(t){throw console.error(`Problem when attempting to dispatch to onDisconnectHandlers. Error: ${t} Disconnecting Client: uuid: ${e.uuid}. name: ${e.name}. endpointId: ${e.endpointId}`),new Error(t)}}async unsubscribeAll(e){const{endpointId:t}=e,n=this.clients.get(t);if(n){const t=Array.from(n.handlerIdsByContextTypes.values()).flat(),i=n.globalHandler;if(t.length>0){const n=t.map((async t=>this.contextHandlerRemoved({handlerId:t},e)));try{await Promise.all(n)}catch(e){console.error(e.message)}}if(i)try{await this.contextHandlerRemoved({handlerId:i},e)}catch(e){console.error(e.message)}}}async handleClientDisconnecting(e){await this.unsubscribeAll(e),this.removeClient(e),await this.fireOnDisconnectForOtherClients(e)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={clientIdentity:e,handlerIdsByContextTypes:new Map,globalHandler:void 0,onAddContextListenerHandlerId:void 0,onUnsubscribeHandlerId:void 0,onDisconnectHandlerId:void 0};this.clients.set(e.endpointId,t)}}async getConnectedClients(){const e=await this.provider.getAllClientInfo();return Array.from(this.clients.values()).filter((t=>{const{uuid:n,name:i}=t.clientIdentity;return e.some((e=>i===e.name&&n===e.uuid))}))}static init(e,n){return new t(e,n)}},Ui}(),w=G,y=[{id:\"green\",displayMetadata:{color:\"#00CC88\",name:\"green\"}},{id:\"purple\",displayMetadata:{color:\"#8C61FF\",name:\"purple\"}},{id:\"orange\",displayMetadata:{color:\"#FF8C4C\",name:\"orange\"}},{id:\"red\",displayMetadata:{color:\"#FF5E60\",name:\"red\"}},{id:\"pink\",displayMetadata:{color:\"#FF8FB8\",name:\"pink\"}},{id:\"yellow\",displayMetadata:{color:\"#E9FF8F\",name:\"yellow\"}}];let f=class i extends c.Base{constructor(i,s,a){super(i),e.set(this,void 0),t.set(this,void 0),n.set(this,void 0),this.getProvider=()=>o(this,n,\"f\").getValue(),this.interopClients=new Map,this.contextGroupsById=new Map,r(this,t,a.contextGroups??[...y],\"f\"),r(this,e,a.fdc3Info,\"f\"),a?.logging&&(this.logging=a.logging),this.intentClientMap=new Map,this.lastContextMap=new Map,this.sessionContextGroupMap=new Map,r(this,n,new w.Lazy(s),\"f\"),this.setContextGroupMap(),this.setupChannelProvider()}static createClosedConstructor(...e){return class extends i{constructor(...t){if(t.length){const[n,i,r]=t;if(r&&\"object\"==typeof r&&!(0,u.default)(r,e[2]))return console.warn(\"You have modified the parameters of the InteropOverride constructor. This behavior is deprecated and will be removed in a future version. You can modify these options in your manifest. Please consult our Interop docs for guidance on migrating to the new override scheme.\"),void super(e[0],e[1],r);console.warn(\"You are attempting to pass arguments to the InteropOverride constructor. This is not necessary, and these passed arguments will be ignored. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.\")}super(...e)}}}setContext({context:e},t){this.wire.sendAction(\"interop-broker-set-context\").catch((e=>{}));const n=this.getClientState(t);if(!n||!n.contextGroupId)throw n?new Error(\"You must join a context group before you can set context.\"):new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);{const{contextGroupId:t}=n;this.setContextForGroup({context:e},t)}}setContextForGroup({context:e},t){this.wire.sendAction(\"interop-broker-set-context-for-group\").catch((e=>{}));const n=this.contextGroupsById.get(t);if(!n)throw new Error(`Unable to set context for context group that isn't in the context group mapping: ${t}.`);const r=i.checkContextIntegrity(e);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(e)}`);const o=e.type;n.set(o,e),this.lastContextMap.set(t,o);Array.from(this.interopClients.values()).filter((e=>e.contextGroupId===t)).forEach((t=>{for(const[,n]of t.contextHandlers)i.isContextTypeCompatible(o,n.contextType)&&this.invokeContextHandler(t.clientIdentity,n.handlerId,e)}))}getCurrentContext(e,t){this.wire.sendAction(\"interop-broker-get-current-context\").catch((e=>{}));const n=this.getClientState(t);if(!n?.contextGroupId)throw new Error(\"You must be a member of a context group to call getCurrentContext\");const{contextGroupId:i}=n,r=this.contextGroupsById.get(i),o=this.lastContextMap.get(i),s=e?.contextType??o;return r&&s?r.get(s):void 0}async joinContextGroup({contextGroupId:e,target:t},n){if(this.wire.sendAction(\"interop-broker-join-context-group\").catch((e=>{})),this.sessionContextGroupMap.has(e))throw new Error(l.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup);if(t){i.hasEndpointId(t)&&await this.addClientToContextGroup({contextGroupId:e},t);try{const n=this.channel.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name));if(!n.length)throw new Error(`Given Identity ${t.uuid} ${t.name} is not connected to the Interop Broker.`);n.length>1&&console.warn(`More than one connection found for identity ${t.uuid} ${t.name}`);const i=[];for(const t of n)i.push(this.addClientToContextGroup({contextGroupId:e},t));await Promise.all(i)}catch(e){throw new Error(e)}}else await this.addClientToContextGroup({contextGroupId:e},n)}async addClientToContextGroup({contextGroupId:e},t){this.wire.sendAction(\"interop-broker-add-client-to-context-group\").catch((e=>{}));const n=this.getClientState(t);if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(!this.getContextGroups().find((t=>t.id===e)))throw new Error(`Attempting to join a context group that does not exist: ${e}. You may only join existing context groups.`);if(n.contextGroupId!==e){n.contextGroupId=e,await this.setCurrentContextGroupInClientOptions(t,e);const i=this.contextGroupsById.get(e);for(const[,e]of n.contextHandlers){const{contextType:n,handlerId:r}=e;if(void 0===n)i.forEach(((e,n)=>{this.invokeContextHandler(t,r,e)}));else if(i.has(n)){const e=i.get(n);e&&this.invokeContextHandler(t,r,e)}}}}async removeFromContextGroup({target:e},t){if(this.wire.sendAction(\"interop-broker-remove-from-context-group\").catch((e=>{})),e){i.hasEndpointId(e)&&await this.removeClientFromContextGroup(e);try{const t=this.channel.connections.filter((t=>t.uuid===e.uuid&&t.name===e.name));if(!t.length)throw new Error(`No connection found for given Identity ${e.uuid} ${e.name}`);t.length>1&&console.warn(`More than one connection found for identity ${e.uuid} ${e.name}`);const n=[];for(const e of t)n.push(this.removeClientFromContextGroup(e));await Promise.all(n)}catch(e){throw new Error(e)}}else await this.removeClientFromContextGroup(t)}async removeClientFromContextGroup(e){this.wire.sendAction(\"interop-broker-remove-client-from-context-group\").catch((e=>{}));const t=this.getClientState(e);t&&(t.contextGroupId=void 0),await this.setCurrentContextGroupInClientOptions(e,null)}getContextGroups(){return this.wire.sendAction(\"interop-broker-get-context-groups\").catch((e=>{})),o(this,t,\"f\").map((e=>({...e})))}getInfoForContextGroup({contextGroupId:e}){return this.wire.sendAction(\"interop-broker-get-info-for-context-group\").catch((e=>{})),this.getContextGroups().find((t=>t.id===e))}getAllClientsInContextGroup({contextGroupId:e}){this.wire.sendAction(\"interop-broker-get-all-clients-in-context-group\").catch((e=>{}));return Array.from(this.interopClients.values()).filter((t=>t.contextGroupId===e)).map((e=>e.clientIdentity))}async handleFiredIntent(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.raiseIntent\",\"InteropBroker.handleFiredIntent\",t,\"interopClient.fireIntent\");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntent)}async setIntentTarget(e,t){this.wire.sendAction(\"interop-broker-set-intent-target\").catch((e=>{}));const n=this.intentClientMap.get(t.name),i=`intent-handler-${e.name}`;if(n){const t=n.get(i);if(t){if(t.pendingIntents.push(e),t.clientIdentity&&t.isReady){const{clientIdentity:e,pendingIntents:n}=t;try{const r=n[n.length-1];await this.invokeIntentHandler(e,i,r),t.pendingIntents=[]}catch(n){console.error(`Error invoking intent handler for client ${e.uuid}/${e.name}/${e.endpointId}`),t.isReady=!1}}}else n.set(i,{isReady:!1,pendingIntents:[e]})}else{this.intentClientMap.set(t.name,new Map);const n=this.intentClientMap.get(t.name);n&&n.set(i,{isReady:!1,pendingIntents:[e]})}}async handleInfoForIntent(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.findIntent\",\"InteropBroker.handleInfoForIntent\",t,\"interopClient.getInfoForIntent\");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntent)}async handleInfoForIntentsByContext(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.findIntentsByContext\",\"InteropBroker.handleInfoForIntentsByContext\",t,\"interopClient.getInfoForIntentsByContext\");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntentsByContext)}async handleFiredIntentForContext(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.raiseIntentForContext\",\"InteropBroker.handleFiredIntentForContext\",t,\"interopClient.fireIntentForContext\");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntentForContext)}async clientDisconnected(e){}async fdc3HandleOpen({app:e,context:t},n){const i=(0,l.generateOverrideWarning)(\"fdc3.open\",\"InteropBroker.fdc3HandleOpen\",n);throw console.warn(i),new Error(l.BROKER_ERRORS.fdc3Open)}async fdc3HandleFindInstances(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.open\",\"InteropBroker.fdc3HandleFindInstances\",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3FindInstances)}async fdc3HandleGetAppMetadata(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.getAppMetadata\",\"InteropBroker.fdc3HandleGetAppMetadata\",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3GetAppMetadata)}async invokeContextHandler(e,t,n){const i=await this.getProvider();try{await i.dispatch(e,t,n)}catch(i){console.error(`Error invoking context handler ${t} for context type ${n.type} in client ${e.uuid}/${e.name}/${e.endpointId}`,i)}}async invokeIntentHandler(e,t,n){const i=await this.getProvider();await i.dispatch(e,t,n)}async fdc3HandleGetInfo(t,n){const{fdc3Version:i}=t;return{fdc3Version:i,...o(this,e,\"f\"),optionalFeatures:{OriginatingAppMetadata:!1,UserChannelMembershipAPIs:!0},appMetadata:{appId:\"\",instanceId:\"\"}}}async getAllClientInfo(){return(await this.getProvider()).getAllClientInfo()}decorateSnapshot(e){return{...e,interopSnapshotDetails:{contextGroupStates:this.getContextGroupStates()}}}applySnapshot(e,t){const n=e?.interopSnapshotDetails?.contextGroupStates;n&&(t?.closeExistingWindows||this.updateExistingClients(n),this.rehydrateContextGroupStates(n))}updateExistingClients(e){this.interopClients.forEach((t=>{const{clientIdentity:n,contextGroupId:r,contextHandlers:o}=t;if(r){const t=e[r];for(const[,e]of Object.entries(t))o.forEach((t=>{const{handlerId:r,contextType:o}=t;i.isContextTypeCompatible(e.type,o)&&this.invokeContextHandler(n,r,e)}))}}))}getContextGroupStates(){return i.toObject(this.contextGroupsById)}rehydrateContextGroupStates(e){const t=Object.entries(e);for(const[e,n]of t){const t=Object.entries(n);for(const[n,i]of t)if(this.contextGroupsById.has(e)){this.contextGroupsById.get(e).set(n,i)}else console.warn(`Attempting to set a context group that isn't in the context group mapping. Skipping context group rehydration for: ${e}`)}}contextHandlerRegistered({contextType:e,handlerId:t},n){const i={contextType:e,handlerId:t},r=this.getClientState(n);if(r?.contextHandlers.set(t,i),r&&r.contextGroupId){const{contextGroupId:i}=r,o=this.contextGroupsById.get(i);if(void 0===e)o.forEach(((e,i)=>{this.invokeContextHandler(n,t,e)}));else if(o.has(e)){const i=o.get(e);i&&this.invokeContextHandler(n,t,i)}}}async intentHandlerRegistered(e,t){const{handlerId:n}=e,i=this.intentClientMap.get(t.name),r=i?.get(n);if(i)if(r){const{pendingIntents:e}=r;r.clientIdentity=t,r.isReady=!0;try{if(e.length>0){const i=e[e.length-1];await this.invokeIntentHandler(t,n,i),r.pendingIntents=[]}}catch(e){console.error(`Error invoking intent handler: ${n} for client ${t.uuid}/${t.name}/${t.endpointId}`)}}else i.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t});else{this.intentClientMap.set(t.name,new Map);const e=this.intentClientMap.get(t.name);e&&e.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t})}}removeContextHandler({handlerId:e},t){const n=this.getClientState(t);n&&n.contextHandlers.delete(e)}handleJoinSessionContextGroup({sessionContextGroupId:e},t){try{if(!e)throw new Error(\"Failed to join session context group: must specify group id.\");const n=this.sessionContextGroupMap.get(e);if(n)n.registerNewClient(t);else{const n=new h.default(this.channel,e);n.registerNewClient(t),this.sessionContextGroupMap.set(e,n)}return{hasConflict:this.contextGroupsById.has(e)}}catch(e){throw new Error(e)}}getClientState(e){return this.interopClients.get(e.endpointId)}static toObject(e){const t=Object.fromEntries(e),n={};return Object.entries(t).forEach((([e,t])=>{const i=Object.fromEntries(t);n[e]=i})),n}static checkContextIntegrity(e){if(!e)return{isValid:!1,reason:\"No context supplied\"};if(\"object\"!=typeof e)return{isValid:!1,reason:\"Context must be an Object\"};if(!e.type)return{isValid:!1,reason:\"Context must have a type property\"};if(e.id&&\"object\"!=typeof e.id)return{isValid:!1,reason:\"Context id must be an Object populated with key-value identifiers (if set)\"};if(e.id){const{id:t}=e,n=Object.keys(t);let i=!1;if(!n.length)return{isValid:!1,reason:\"Context id must have at least one key-value identifier\"};if(n.forEach((e=>{\"string\"==typeof e&&\"string\"==typeof t[e]||(i=!0)})),i)return{isValid:!1,reason:\"Context id key-value identifiers must be of type string\"}}return e.name&&\"string\"!=typeof e.name?{isValid:!1,reason:\"Context name must be of string type (if set)\"}:{isValid:!0}}static hasEndpointId(e){return void 0!==e.endpointId}static isContextTypeCompatible(e,t){return void 0===t||e===t}setContextGroupMap(){for(const e of this.getContextGroups())this.contextGroupsById.set(e.id,new Map)}async setCurrentContextGroupInClientOptions(e,t){try{const n=await this.fin.System.getEntityInfo(e.uuid,e.name);let i;\"view\"===n.entityType?i=await this.fin.View.wrap(e):\"window\"===n.entityType&&(i=await this.fin.Window.wrap(e)),i&&await i.updateOptions({interop:{currentContextGroup:t}})}catch(e){}}async setupChannelProvider(){try{const e=await this.getProvider();this.channel=e,this.wireChannel(e)}catch(e){throw new Error(`Error setting up Interop Broker Channel Provider: ${e}`)}}wireChannel(e){e.onConnection((async(e,t)=>{if(!await this.isConnectionAuthorized(e,t))throw new Error(`Connection not authorized for ${e.uuid}, ${e.name}`);if(!e.endpointId)throw new Error(\"Version too old to be compatible with Interop. Please upgrade your runtime to a more recent version.\");const n={contextGroupId:void 0,contextHandlers:new Map,clientIdentity:e};t?.currentContextGroup&&this.contextGroupsById.has(t.currentContextGroup)&&(n.contextGroupId=t?.currentContextGroup),this.interopClients.set(e.endpointId,n)})),e.onDisconnection((e=>{this.interopClients.delete(e.endpointId);const t=this.intentClientMap.get(e.name);t&&e.uuid===this.fin.me.uuid&&t.forEach((e=>{e.isReady=!1})),this.sessionContextGroupMap.forEach((t=>{t.onDisconnection(e)})),this.clientDisconnected(e)})),e.beforeAction((async(e,t,n)=>{if(!await this.isActionAuthorized(e,t,n))throw new Error(`Action (${e}) not authorized for ${n.uuid}, ${n.name}`);this.logging?.beforeAction?.enabled&&console.log(e,t,n)})),e.afterAction(((e,t,n)=>{this.logging?.afterAction?.enabled&&console.log(e,t,n)})),e.register(\"setContext\",this.setContext.bind(this)),e.register(\"fireIntent\",this.handleFiredIntent.bind(this)),e.register(\"getCurrentContext\",this.getCurrentContext.bind(this)),e.register(\"getInfoForIntent\",this.handleInfoForIntent.bind(this)),e.register(\"getInfoForIntentsByContext\",this.handleInfoForIntentsByContext.bind(this)),e.register(\"fireIntentForContext\",this.handleFiredIntentForContext.bind(this)),e.register(\"getContextGroups\",this.getContextGroups.bind(this)),e.register(\"joinContextGroup\",this.joinContextGroup.bind(this)),e.register(\"removeFromContextGroup\",this.removeFromContextGroup.bind(this)),e.register(\"getAllClientsInContextGroup\",this.getAllClientsInContextGroup.bind(this)),e.register(\"getInfoForContextGroup\",this.getInfoForContextGroup.bind(this)),e.register(\"contextHandlerRegistered\",this.contextHandlerRegistered.bind(this)),e.register(\"intentHandlerRegistered\",this.intentHandlerRegistered.bind(this)),e.register(\"removeContextHandler\",this.removeContextHandler.bind(this)),e.register(\"sessionContextGroup:createIfNeeded\",this.handleJoinSessionContextGroup.bind(this)),e.register(\"fdc3Open\",this.fdc3HandleOpen.bind(this)),e.register(\"fdc3v2FindIntentsByContext\",this.handleInfoForIntentsByContext.bind(this)),e.register(\"fdc3FindInstances\",this.fdc3HandleFindInstances.bind(this)),e.register(\"fdc3GetAppMetadata\",this.fdc3HandleGetAppMetadata.bind(this)),e.register(\"fdc3v2GetInfo\",(async(e,t)=>this.fdc3HandleGetInfo.bind(this)(e,t))),e.register(\"createPrivateChannelProvider\",(async e=>{const{channelId:t}=e,n=await this.fin.InterApplicationBus.Channel.create(t);p.PrivateChannelProvider.init(n,t)}))}isConnectionAuthorized(e,t){return this.wire.sendAction(\"interop-broker-is-connection-authorized\").catch((e=>{})),Promise.resolve(!0)}isActionAuthorized(e,t,n){return this.wire.sendAction(\"interop-broker-is-action-authorized\").catch((e=>{})),Promise.resolve(!0)}};return Gi.InteropBroker=f,e=new WeakMap,t=new WeakMap,n=new WeakMap,Gi}var zi,Ki={},qi={},Ji=s&&s.__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},Yi=s&&s.__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)};Object.defineProperty(qi,\"__esModule\",{value:!0});const Zi=d,Qi=Hi;class Xi extends Zi.Base{constructor(e,t,n){super(e),zi.set(this,void 0),this.id=n,Ji(this,zi,t,\"f\")}async setContext(e){this.wire.sendAction(\"interop-session-context-group-set-context\").catch((e=>{}));return(await Yi(this,zi,\"f\")).dispatch(`sessionContextGroup:setContext-${this.id}`,{sessionContextGroupId:this.id,context:e})}async getCurrentContext(e){this.wire.sendAction(\"interop-session-context-group-get-context\").catch((e=>{}));return(await Yi(this,zi,\"f\")).dispatch(`sessionContextGroup:getContext-${this.id}`,{sessionContextGroupId:this.id,type:e})}async addContextHandler(e,t){if(this.wire.sendAction(\"interop-session-context-group-add-handler\").catch((e=>{})),\"function\"!=typeof e)throw new Error(\"Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.\");const n=await Yi(this,zi,\"f\");let i;return i=t?`sessionContextHandler:invoke-${this.id}-${t}-${(0,Qi.generateId)()}`:`sessionContextHandler:invoke-${this.id}`,n.register(i,(0,Qi.wrapContextHandler)(e,i)),await n.dispatch(`sessionContextGroup:handlerAdded-${this.id}`,{handlerId:i,contextType:t}),{unsubscribe:await this.createUnsubscribeCb(i)}}async createUnsubscribeCb(e){const t=await Yi(this,zi,\"f\");return async()=>{t.remove(e),await t.dispatch(`sessionContextGroup:handlerRemoved-${this.id}`,{handlerId:e})}}getUserInstance(){return{id:this.id,setContext:(0,Qi.wrapInTryCatch)(this.setContext.bind(this),\"Failed to set context: \"),getCurrentContext:(0,Qi.wrapInTryCatch)(this.getCurrentContext.bind(this),\"Failed to get context: \"),addContextHandler:(0,Qi.wrapInTryCatch)(this.addContextHandler.bind(this),\"Failed to add context handler: \")}}}qi.default=Xi,zi=new WeakMap;var er={},tr={},nr={},ir={},rr=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),or=s&&s.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,\"default\",{enumerable:!0,value:t})}:function(e,t){e.default=t}),sr=s&&s.__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)&&rr(t,e,n);return or(t,e),t};Object.defineProperty(ir,\"__esModule\",{value:!0}),ir.PrivateChannelClient=void 0;const ar=sr(Hi);var cr,dr;function hr(){if(cr)return tr;cr=1;var e,t=s&&s.__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)},n=s&&s.__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},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(tr,\"__esModule\",{value:!0}),tr.FDC3ModuleBase=void 0;const o=nr,a=Hi,c=wr(),d=r(i);return tr.FDC3ModuleBase=class{get client(){return t(this,e,\"f\").call(this)}get fin(){return this.wire.getFin()}constructor(t,i){this.wire=i,e.set(this,void 0),n(this,e,t,\"f\")}async broadcast(e){return this.wire.sendAction(\"fdc3-broadcast\").catch((e=>{})),this.client.setContext(e)}async _open(e,t){this.wire.sendAction(\"fdc3-open\").catch((e=>{}));try{return await c.InteropClient.ferryFdc3Call(this.client,\"fdc3Open\",{app:e,context:t})}catch(e){const t=e.message===a.BROKER_ERRORS.fdc3Open?\"ResolverUnavailable\":e.message;throw new Error(t)}}async _getChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:\"system\",...(0,o.getUnsupportedChannelApis)()})))}async getOrCreateChannel(e){this.wire.sendAction(\"fdc3-get-or-create-channel\").catch((e=>{}));const t=(await this._getChannels()).find((t=>t.id===e));if(t)return{...t,type:\"system\",...(0,o.getUnsupportedChannelApis)()};try{const t=await this.client.joinSessionContextGroup(e);return(0,o.buildAppChannelObject)(t)}catch(e){throw console.error(e.message),new Error(o.ChannelError.CreationFailed)}}async getSystemChannels(){return this.wire.sendAction(\"fdc3-get-system-channels\").catch((e=>{})),this._getChannels()}async joinChannel(e){this.wire.sendAction(\"fdc3-join-channel\").catch((e=>{}));try{return await this.client.joinContextGroup(e)}catch(e){if(e.message===a.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup?console.error(\"The Channel you have tried to join is an App Channel. Custom Channels can only be defined by the Interop Broker through code or manifest configuration. Please use getOrCreateChannel.\"):console.error(e.message),e.message.startsWith(\"Attempting to join a context group that does not exist\"))throw new Error(o.ChannelError.NoChannelFound);throw new Error(o.ChannelError.AccessDenied)}}async getCurrentChannel(){this.wire.sendAction(\"fdc3-get-current-channel\").catch((e=>{}));const e=await this.getCurrentContextGroupInfo();return e?this.buildChannelObject(e):null}async leaveCurrentChannel(){return this.wire.sendAction(\"fdc3-leave-current-channel\").catch((e=>{})),this.client.removeFromContextGroup()}async getCurrentContextGroupInfo(){const e=await this.client.getContextGroups(),t=e.map((async e=>this.client.getAllClientsInContextGroup(e.id))),n=(await Promise.all(t)).findIndex((e=>e.some((e=>{const{uuid:t,name:n}=e;return this.wire.me.uuid===t&&this.wire.me.name===n}))));return e[n]}async buildChannelObject(e){return{...e,type:\"system\",addContextListener:(...[e,t])=>{let n,i;\"function\"==typeof e?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),n=e):(n=t,\"string\"==typeof e&&(i=e));const r=(async()=>{let e=!0;const t=await this.client.getCurrentContext(i);return this.client.addContextHandler(((i,r)=>{if(!e||(e=!1,!(0,d.default)(t,i)))return n(i,r)}),i)})();return{...r,unsubscribe:()=>r.then((e=>e.unsubscribe()))}},broadcast:this.broadcast.bind(this),getCurrentContext:async e=>{const t=await this.client.getCurrentContext(e);return void 0===t?null:t}}}},e=new WeakMap,tr}ir.PrivateChannelClient=class{constructor(e,t){this.id=t,this.client=e,this.listeners=new Map}async broadcast(e){return this.client.dispatch(\"broadcast\",{context:e})}async getCurrentContext(e){return this.client.dispatch(\"getCurrentContext\",{contextType:e})}async addContextListener(e,t){if(\"function\"!=typeof t)throw new Error(\"Non-function argument passed to the second parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.\");let n;n=e?`contextHandler:invoke-${this.id}-${e}-${ar.generateId()}`:`contextHandler:invoke-${this.id}-${ar.generateId()}`,this.client.register(n,ar.wrapContextHandler(t,n));const i={unsubscribe:await this.createContextUnsubscribeCb(n)};return this.listeners.set(n,i),await this.client.dispatch(\"contextHandlerAdded\",{handlerId:n,contextType:e}),i}createNonStandardUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch(\"nonStandardHandlerRemoved\",{handlerId:e})}}createContextUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch(\"contextHandlerRemoved\",{handlerId:e})}}onAddContextListener(e){const t=`onContextHandlerAdded:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch(\"onAddContextHandlerAdded\",{handlerId:t}),n}onDisconnect(e){const t=`onDisconnect:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch(\"onDisconnectHandlerAdded\",{handlerId:t}),n}onUnsubscribe(e){const t=`onUnsubscribe:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch(\"onUnsubscribeHandlerAdded\",{handlerId:t}),n}async cleanUpAllSubs(){Array.from(this.listeners.keys()).forEach((e=>{this.client.remove(e),this.listeners.delete(e)}))}async disconnect(){try{await this.client.dispatch(\"clientDisconnecting\"),await this.cleanUpAllSubs(),await this.client.disconnect()}catch(e){throw new Error(e.message)}}},function(e){var t=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,\"__esModule\",{value:!0}),e.getIntentResolution=e.isChannel=e.isContext=e.connectPrivateChannel=e.buildAppChannelObject=e.buildPrivateChannelObject=e.ChannelError=e.ResultError=e.UnsupportedChannelApiError=e.getUnsupportedChannelApis=void 0;const n=Hi,r=ir,o=t(i);e.getUnsupportedChannelApis=e=>({addContextListener:()=>{throw new a(\"Channel.addContextListener\",e)},broadcast:()=>{throw new a(\"Channel.broadcast\",e)},getCurrentContext:()=>{throw new a(\"Channel.getCurrentContext\",e)}});class a extends Error{constructor(e,t=\"System\"){super(e),this.message=`Calling ${e} on an instance of a ${t} Channel returned by fdc3.get${t}Channels is not supported. If you would like to use a ${t} Channel, please use fdc3.joinChannel, fdc3.addContextListener, and fdc3.broadcast instead.`}}var c,d;e.UnsupportedChannelApiError=a,function(e){e.NoResultReturned=\"NoResultReturned\",e.IntentHandlerRejected=\"IntentHandlerRejected\"}(c=e.ResultError||(e.ResultError={})),(d=e.ChannelError||(e.ChannelError={})).NoChannelFound=\"NoChannelFound\",d.AccessDenied=\"AccessDenied\",d.CreationFailed=\"CreationFailed\";e.buildPrivateChannelObject=e=>{let t=!1;const n=()=>{if(t)throw new Error(\"Private Channel Client has been disconnected from the Private Channel\")};return{id:e.id,type:\"private\",broadcast:async t=>(n(),e.broadcast(t)),getCurrentContext:async t=>(n(),e.getCurrentContext(t)),addContextListener:async(t,i)=>{n();let r=i,o=t;\"function\"==typeof t&&(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),r=t,o=null);return e.addContextListener(o,r)},onAddContextListener:t=>(n(),e.onAddContextListener(t)),disconnect:async()=>(n(),t=!0,e.disconnect()),onDisconnect:t=>(n(),e.onDisconnect(t)),onUnsubscribe:t=>(n(),e.onUnsubscribe(t))}};e.buildAppChannelObject=e=>({id:e.id,type:\"app\",broadcast:e.setContext,getCurrentContext:async t=>{const n=await e.getCurrentContext(t);return void 0===n?null:n},addContextListener:(t,n)=>{let i,r;\"function\"==typeof t?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),i=t):(i=n,\"string\"==typeof t&&(r=t));const s=(async()=>{let t=!0;const n=await e.getCurrentContext(r);return e.addContextHandler(((e,r)=>{if(!t||(t=!1,!(0,o.default)(n,e)))return i(e,r)}),r)})();return{...s,unsubscribe:()=>s.then((e=>e.unsubscribe()))}}});e.connectPrivateChannel=async t=>{try{const n=await fin.InterApplicationBus.Channel.connect(t),i=new r.PrivateChannelClient(n,t);return(0,e.buildPrivateChannelObject)(i)}catch(e){throw new Error(`Private Channel with id: ${t} doesn't exist`)}};e.isContext=e=>{if(e&&\"object\"==typeof e&&\"type\"in e){const{type:t}=e;return\"string\"==typeof t}return!1};e.isChannel=e=>{if(e&&\"object\"==typeof e&&\"type\"in e&&\"id\"in e){const{type:t,id:n}=e;return\"string\"==typeof t&&\"string\"==typeof n&&(\"app\"===t||\"private\"===t)}return!1};e.getIntentResolution=async(t,i,r,o)=>{const s=(0,n.generateId)(),a=new Promise(((e,t)=>{fin.InterApplicationBus.subscribe({uuid:\"*\"},s,(t=>{e(t)})).catch((()=>t(new Error(\"getResult is not supported in this environment\"))))})),d=r?{target:r,intentResolutionResultId:s}:{intentResolutionResultId:s},h=o?{name:o,context:i,metadata:d}:{...i,metadata:d},l=async()=>{let n=await a;if(!n||\"object\"!=typeof n)throw new Error(c.NoResultReturned);const{error:i}=n;if(i)throw new Error(c.IntentHandlerRejected);if((0,e.isChannel)(n)){const{id:i,type:r}=n;switch(r){case\"private\":n=await(0,e.connectPrivateChannel)(i);break;case\"app\":{const r=await t.joinSessionContextGroup(i);n=(0,e.buildAppChannelObject)(r);break}}}else if(!(0,e.isContext)(n))throw new Error(c.NoResultReturned);return n},u=o?await t.fireIntent(h):await t.fireIntentForContext(h);return\"object\"!=typeof u?{source:{appId:\"\",instanceId:\"\"},intent:\"\",version:\"2.0\",getResult:l}:{...u,getResult:l}}}(nr);var lr,ur,pr={};function wr(){if(ur)return Ki;ur=1;var e,t,n=s&&s.__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},i=s&&s.__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)},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ki,\"__esModule\",{value:!0}),Ki.InteropClient=void 0;const o=d,a=r(qi),c=function(){if(dr)return er;dr=1,Object.defineProperty(er,\"__esModule\",{value:!0}),er.Fdc3Module=void 0;const e=Hi,t=hr();class n extends t.FDC3ModuleBase{async open(e,t){await super._open(e,t)}addContextListener(e,t){let n;return this.wire.sendAction(\"fdc3-add-context-listener\").catch((e=>{})),\"function\"==typeof e?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),n=this.client.addContextHandler(e)):n=this.client.addContextHandler(t,null===e?void 0:e),{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}addIntentListener(e,t){this.wire.sendAction(\"fdc3-add-intent-listener\").catch((e=>{}));const n=this.client.registerIntentHandler((e=>{const{context:n,metadata:i}=e,{metadata:r}=n,o=i?.intentResolutionResultId||r?.intentResolutionResultId;o&&this.fin.InterApplicationBus.publish(o,null).catch((()=>null)),t(e.context)}),e,{fdc3Version:\"1.2\"});return{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}async raiseIntent(t,n,i){this.wire.sendAction(\"fdc3-raise-intent\").catch((e=>{}));const r=i?{name:t,context:n,metadata:{target:i}}:{name:t,context:n};try{return await this.client.fireIntent(r)}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntent?\"ResolverUnavailable\":t.message;throw new Error(n)}}async findIntent(t,n){this.wire.sendAction(\"fdc3-find-intent\").catch((e=>{}));try{return await this.client.getInfoForIntent({name:t,context:n})}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntent?\"ResolverUnavailable\":t.message;throw new Error(n)}}async findIntentsByContext(t){this.wire.sendAction(\"fdc3-find-intents-by-context\").catch((e=>{}));try{return await this.client.getInfoForIntentsByContext(t)}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntentsByContext?\"ResolverUnavailable\":t.message;throw new Error(n)}}async raiseIntentForContext(t,n){this.wire.sendAction(\"fdc3-raise-intent-for-context\").catch((e=>{}));try{return await this.client.fireIntentForContext({...t,metadata:{target:n}})}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntentForContext?\"ResolverUnavailable\":t.message;throw new Error(n)}}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}getInfo(){return this.wire.sendAction(\"fdc3-get-info\").catch((e=>{})),{providerVersion:this.wire.environment.getAdapterVersionSync(),provider:`openfin-${this.wire.me.uuid}`,fdc3Version:\"1.2\"}}}return er.Fdc3Module=n,er}(),h=function(){if(lr)return pr;lr=1,Object.defineProperty(pr,\"__esModule\",{value:!0}),pr.Fdc3Module2=void 0;const e=hr(),t=Hi,n=wr(),i=nr,r=ir;class o extends e.FDC3ModuleBase{async open(e,t){return\"string\"==typeof e&&console.warn(\"Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).\"),super._open(e,t)}async findInstances(e){this.wire.sendAction(\"fdc3-find-instances\").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,\"fdc3FindInstances\",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3FindInstances?\"ResolverUnavailable\":e.message;throw new Error(n)}}async getAppMetadata(e){this.wire.sendAction(\"fdc3-get-app-metadata\").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,\"fdc3GetAppMetadata\",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3GetAppMetadata?\"ResolverUnavailable\":e.message;throw new Error(n)}}async addContextListener(e,t){this.wire.sendAction(\"fdc3-add-context-listener\").catch((e=>{}));const n=e=>t=>{const{contextMetadata:n,...i}=t,r=n?[{...i},n]:[t,null];e(...r)};let i=t,r=n(i);return\"function\"==typeof e?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),i=e,r=n(i),this.client.addContextHandler(r)):this.client.addContextHandler(r,null===e?void 0:e)}async findIntent(e,n,i){this.wire.sendAction(\"fdc3-find-intent\").catch((e=>{}));try{return await this.client.getInfoForIntent({name:e,context:n,metadata:{resultType:i}})}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntent?\"ResolverUnavailable\":e.message;throw new Error(n)}}async findIntentsByContext(e,i){this.wire.sendAction(\"fdc3-find-intents-by-context\").catch((e=>{}));const r=i?{context:e,metadata:{resultType:i}}:e;try{return await n.InteropClient.ferryFdc3Call(this.client,\"fdc3v2FindIntentsByContext\",r)}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntentsByContext?\"ResolverUnavailable\":e.message;throw new Error(n)}}async raiseIntent(e,n,r){this.wire.sendAction(\"fdc3-raise-intent\").catch((e=>{}));try{return\"string\"==typeof r&&console.warn(\"Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).\"),(0,i.getIntentResolution)(this.client,n,r,e)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?\"ResolverUnavailable\":e.message;throw new Error(n)}}async raiseIntentForContext(e,n){this.wire.sendAction(\"fdc3-raise-intent-for-context\").catch((e=>{}));try{return\"string\"==typeof n&&console.warn(\"Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).\"),(0,i.getIntentResolution)(this.client,e,n)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?\"ResolverUnavailable\":e.message;throw new Error(n)}}async addIntentListener(e,t){if(this.wire.sendAction(\"fdc3-add-intent-listener\").catch((e=>{})),\"string\"!=typeof e)throw new Error(\"First argument must be an Intent name\");return this.client.registerIntentHandler((async e=>{let n,i;const{context:r,metadata:o}=e,{contextMetadata:s,metadata:a,...c}=r,d=o?.intentResolutionResultId||a?.intentResolutionResultId;try{const e=a?{metadata:a,...c}:{...c};n=await t(e,s),i=n}catch(e){n=e,i={error:!0}}if(d&&this.fin.InterApplicationBus.publish(d,i).catch((()=>null)),n instanceof Error)throw new Error(n.message);return n}),e,{fdc3Version:\"2.0\"})}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}async createPrivateChannel(){const e=(0,t.generateId)();await n.InteropClient.ferryFdc3Call(this.client,\"createPrivateChannelProvider\",{channelId:e});const o=await this.fin.InterApplicationBus.Channel.connect(e),s=new r.PrivateChannelClient(o,e);return(0,i.buildPrivateChannelObject)(s)}async getUserChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:\"user\",...(0,i.getUnsupportedChannelApis)(\"User\")})))}async getSystemChannels(){return console.warn(\"This API has been deprecated. Please use fdc3.getUserChannels instead.\"),super.getSystemChannels()}async joinUserChannel(e){return super.joinChannel(e)}async joinChannel(e){return console.warn(\"This API has been deprecated. Please use fdc3.joinUserChannel instead.\"),super.joinChannel(e)}async getCurrentChannel(){const e=await super.getCurrentChannel();return e?{...e,type:\"user\",broadcast:this.broadcast.bind(this)}:null}async getInfo(){return n.InteropClient.ferryFdc3Call(this.client,\"fdc3v2GetInfo\",{fdc3Version:\"2.0\"})}}return pr.Fdc3Module2=o,pr}(),l=Hi;let u=class extends o.Base{constructor(i,r){super(i),e.set(this,void 0),t.set(this,void 0),n(this,t,new Map,\"f\"),n(this,e,r,\"f\")}async setContext(t){this.wire.sendAction(\"interop-client-set-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"setContext\",{context:t})}async addContextHandler(t,n){if(this.wire.sendAction(\"interop-client-add-context-handler\").catch((e=>{})),\"function\"!=typeof t)throw new Error(\"Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.\");const r=await i(this,e,\"f\");let o;o=n?`invokeContextHandler-${n}-${(0,l.generateId)()}`:\"invokeContextHandler\";const s=(0,l.wrapContextHandler)(t,o);return r.register(o,s),await r.dispatch(\"contextHandlerRegistered\",{handlerId:o,contextType:n}),{unsubscribe:async()=>{r.remove(o),await r.dispatch(\"removeContextHandler\",{handlerId:o})}}}async getContextGroups(){this.wire.sendAction(\"interop-client-get-context-groups\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getContextGroups\")}async joinContextGroup(t,n){this.wire.sendAction(\"interop-client-join-context-group\").catch((e=>{}));const r=await i(this,e,\"f\");if(!t)throw new Error(\"No contextGroupId specified for joinContextGroup.\");return r.dispatch(\"joinContextGroup\",{contextGroupId:t,target:n})}async removeFromContextGroup(t){this.wire.sendAction(\"interop-client-remove-from-context-group\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"removeFromContextGroup\",{target:t})}async getAllClientsInContextGroup(t){this.wire.sendAction(\"interop-client-get-all-clients-in-context-group\").catch((e=>{}));const n=await i(this,e,\"f\");if(!t)throw new Error(\"No contextGroupId specified for getAllClientsInContextGroup.\");return n.dispatch(\"getAllClientsInContextGroup\",{contextGroupId:t})}async getInfoForContextGroup(t){this.wire.sendAction(\"interop-client-get-info-for-context-group\").catch((e=>{}));const n=await i(this,e,\"f\");if(!t)throw new Error(\"No contextGroupId specified for getInfoForContextGroup.\");return n.dispatch(\"getInfoForContextGroup\",{contextGroupId:t})}async fireIntent(t){this.wire.sendAction(\"interop-client-fire-intent\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"fireIntent\",t)}async registerIntentHandler(t,n,r){this.wire.sendAction(\"interop-client-register-intent-handler\").catch((e=>{}));const o=await i(this,e,\"f\"),s=`intent-handler-${n}`,a=(0,l.wrapIntentHandler)(t,s);try{await o.register(s,a),await o.dispatch(\"intentHandlerRegistered\",{handlerId:s,...r})}catch(e){throw new Error(\"Unable to register intent handler\")}return{unsubscribe:async()=>{o.remove(s)}}}async getCurrentContext(t){this.wire.sendAction(\"interop-client-get-current-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getCurrentContext\",{contextType:t})}async getInfoForIntent(t){this.wire.sendAction(\"interop-client-get-info-for-intent\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getInfoForIntent\",t)}async getInfoForIntentsByContext(t){this.wire.sendAction(\"interop-client-get-info-for-intents-by-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getInfoForIntentsByContext\",t)}async fireIntentForContext(t){this.wire.sendAction(\"interop-client-fire-intent-for-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"fireIntentForContext\",t)}async joinSessionContextGroup(n){try{const r=i(this,t,\"f\").get(n);if(r)return r.getUserInstance();const o=await i(this,e,\"f\"),{hasConflict:s}=await o.dispatch(\"sessionContextGroup:createIfNeeded\",{sessionContextGroupId:n});s&&console.warn(`A (non-session) context group with the name \"${n}\" already exists. If you are trying to join a Context Group, call joinContextGroup instead.`);const c=new a.default(this.wire,i(this,e,\"f\"),n);return i(this,t,\"f\").set(n,c),c.getUserInstance()}catch(e){throw console.error(`Error thrown trying to create Session Context Group with id \"${n}\": ${e}`),e}}async onDisconnection(t){this.wire.sendAction(\"interop-client-add-ondisconnection-listener\").catch((e=>{}));return(await i(this,e,\"f\")).onDisconnection((e=>{const{uuid:n}=e;t({type:\"interop-broker\",topic:\"disconnected\",brokerName:n})}))}getFDC3Sync(e){switch(e){case\"1.2\":return new c.Fdc3Module((()=>this),this.wire);case\"2.0\":return new h.Fdc3Module2((()=>this),this.wire);default:throw new Error(`Invalid FDC3 version provided: ${e}. Must be '1.2' or '2.0'`)}}async getFDC3(e){return this.getFDC3Sync(e)}static async ferryFdc3Call(t,n,r){return(await i(t,e,\"f\")).dispatch(n,r||null)}};return Ki.InteropClient=u,e=new WeakMap,t=new WeakMap,Ki}var yr,fr,gr,mr={};function vr(){if(yr)return mr;yr=1,Object.defineProperty(mr,\"__esModule\",{value:!0}),mr.overrideCheck=mr.checkFDC32Overrides=mr.getDefaultViewFdc3VersionFromAppInfo=void 0;const e=Vi();function t(t){return[\"fdc3HandleFindInstances\",\"handleInfoForIntent\",\"handleInfoForIntentsByContext\",\"fdc3HandleGetAppMetadata\",\"fdc3HandleGetInfo\",\"fdc3HandleOpen\",\"handleFiredIntent\",\"handleFiredIntentForContext\"].filter((n=>t[n]===e.InteropBroker.prototype[n]))}return mr.getDefaultViewFdc3VersionFromAppInfo=function({manifest:e,initialOptions:t}){const n=e?.platform?.defaultViewOptions?.fdc3InteropApi??t.defaultViewOptions?.fdc3InteropApi;return[\"1.2\",\"2.0\"].includes(n??\"\")?n:void 0},mr.checkFDC32Overrides=t,mr.overrideCheck=function(e,n){if(n&&\"2.0\"===n){const n=t(e);n.length>0&&console.warn(`WARNING: FDC3 2.0 has been set as a default option for Views in this Platform, but the required InteropBroker APIs for FDC3 2.0 compliance have not all been overridden.\\nThe following APIs need to be overridden:\\n${n.join(\"\\n\")}`)}},mr}function Cr(){return gr||(gr=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),i=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),i(function(){if(fr)return Ti;fr=1;var e=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ti,\"__esModule\",{value:!0}),Ti.InteropModule=void 0;const t=e(n),i=$i,r=d,o=Vi(),a=wr(),c=vr(),h=Tn,l=e=>new e,u=\"You have attempted to use or modify InteropBroker parameters, which is not allowed. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.\";class p extends r.Base{async init(e,n=l){this.wire.sendAction(\"interop-init\").catch((()=>{}));const r=await this.wire.environment.getInteropInfo(this.wire.getFin()),s=(0,i.createUnusableObject)(u),a=(0,i.createWarningObject)(u,(0,t.default)(r)),d=async()=>{throw new Error(u)},p=o.InteropBroker.createClosedConstructor(this.wire,(()=>this.fin.InterApplicationBus.Channel.create(`interop-broker-${e}`)),r);let w;return w=Array.isArray(n)?new((0,h.overrideFromComposables)(...n)(p))(s,d,a):await n(p,s,d,a),(0,c.overrideCheck)(w,r.fdc3Version),w}connectSync(e,t){return this.wire.sendAction(\"interop-connect-sync\").catch((()=>{})),new a.InteropClient(this.wire,this.wire.environment.whenReady().then((()=>this.fin.InterApplicationBus.Channel.connect(`interop-broker-${e}`,{payload:t}))))}}return Ti.InteropModule=p,Ti}(),e),i(wr(),e),i(Vi(),e)}(Li)),Li}var br={},Ir={},Er={},xr={};Object.defineProperty(xr,\"__esModule\",{value:!0}),xr.getSnapshotSourceChannelName=void 0;xr.getSnapshotSourceChannelName=e=>`snapshot-source-provider-${e.uuid}`;var Ar,Pr,Mr,_r,Or,Sr=s&&s.__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},Rr=s&&s.__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)};Object.defineProperty(Er,\"__esModule\",{value:!0}),Er.SnapshotSource=void 0;const Fr=d,jr=xr,kr=new Map;class Lr extends Fr.Base{constructor(e,t){super(e),Ar.set(this,void 0),Pr.set(this,(()=>(kr.has(this.identity.uuid)||kr.set(this.identity.uuid,{eventFired:null,clientPromise:null}),kr.get(this.identity.uuid)))),Mr.set(this,(()=>(Rr(this,Pr,\"f\").call(this).clientPromise||(Rr(this,Pr,\"f\").call(this).clientPromise=Rr(this,_r,\"f\").call(this)),Rr(this,Pr,\"f\").call(this).clientPromise))),_r.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);try{Rr(this,Pr,\"f\").call(this).eventFired||await Rr(this,Or,\"f\").call(this);const t=await this.fin.InterApplicationBus.Channel.connect(e,{wait:!1});return t.onDisconnection((()=>{Rr(this,Pr,\"f\").call(this).clientPromise=null,Rr(this,Pr,\"f\").call(this).eventFired=null})),t}catch(e){throw Rr(this,Pr,\"f\").call(this).clientPromise=null,new Error(\"The targeted SnapshotSource is not currently initialized. Await this object's ready() method.\")}})),Or.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);let t,n;const i=new Promise(((e,i)=>{t=e,n=i}));Rr(this,Pr,\"f\").call(this).eventFired=i;const r=async i=>{try{i.channelName===e&&(t(),await this.fin.InterApplicationBus.Channel.removeListener(\"connected\",r))}catch(e){n(e)}};await this.fin.InterApplicationBus.Channel.on(\"connected\",r)})),Sr(this,Ar,t,\"f\")}get identity(){return Rr(this,Ar,\"f\")}async ready(){this.wire.sendAction(\"snapshot-source-ready\").catch((e=>{}));try{await Rr(this,Mr,\"f\").call(this)}catch(e){await Rr(this,Pr,\"f\").call(this).eventFired}}async getSnapshot(){this.wire.sendAction(\"snapshot-source-get-snapshot\").catch((e=>{}));const e=await Rr(this,Mr,\"f\").call(this),t=await e.dispatch(\"get-snapshot\");return(await t).snapshot}async applySnapshot(e){this.wire.sendAction(\"snapshot-source-apply-snapshot\").catch((e=>{}));return(await Rr(this,Mr,\"f\").call(this)).dispatch(\"apply-snapshot\",{snapshot:e})}}Er.SnapshotSource=Lr,Ar=new WeakMap,Pr=new WeakMap,Mr=new WeakMap,_r=new WeakMap,Or=new WeakMap,Object.defineProperty(Ir,\"__esModule\",{value:!0}),Ir.SnapshotSourceModule=void 0;const Tr=d,$r=Er,Br=xr;class Gr extends Tr.Base{async init(e){if(this.wire.sendAction(\"snapshot-source-init\").catch((e=>{})),\"object\"!=typeof e||\"function\"!=typeof e.getSnapshot||\"function\"!=typeof e.applySnapshot)throw new Error(\"you must pass in a valid SnapshotProvider\");const t=await this.fin.InterApplicationBus.Channel.create((0,Br.getSnapshotSourceChannelName)(this.fin.me));t.register(\"get-snapshot\",(async()=>({snapshot:await e.getSnapshot()}))),t.register(\"apply-snapshot\",(({snapshot:t})=>e.applySnapshot(t)))}wrapSync(e){return this.wire.sendAction(\"snapshot-source-wrap-sync\").catch((e=>{})),new $r.SnapshotSource(this.wire,e)}async wrap(e){return this.wire.sendAction(\"snapshot-source-wrap\").catch((e=>{})),this.wrapSync(e)}}Ir.SnapshotSourceModule=Gr,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Ir,e),n(Er,e)}(br),Object.defineProperty(a,\"__esModule\",{value:!0});var Wr=a.Fin=void 0;const Hr=t,Nr=c,Dr=ie(),Ur=Z(),Vr=de,zr=en,Kr=rn,qr=un,Jr=bn,Yr=J(),Zr=An,Qr=ki,Xr=Cr(),eo=br;class to extends Hr.EventEmitter{constructor(e){super(),this.wire=e,this.System=new Nr.System(e),this.Window=new Dr._WindowModule(e),this.Application=new Ur.ApplicationModule(e),this.InterApplicationBus=new Vr.InterApplicationBus(e),this.Clipboard=new zr.Clipboard(e),this.ExternalApplication=new Kr.ExternalApplicationModule(e),this.Frame=new qr._FrameModule(e),this.GlobalHotkey=new Jr.GlobalHotkey(e),this.Platform=new Zr.PlatformModule(e,this.InterApplicationBus.Channel),this.View=new Yr.ViewModule(e),this.Interop=new Xr.InteropModule(e),this.SnapshotSource=new eo.SnapshotSourceModule(e),e.registerFin(this),this.me=(0,Qr.getMe)(e),e.on(\"disconnected\",(()=>{this.emit(\"disconnected\")}))}}Wr=a.Fin=to;var no={},io={};function ro(e){return\"string\"==typeof e.manifestUrl}function oo(e){return ao(e)&&\"string\"==typeof e.address}function so(e){return oo(e)&&\"string\"==typeof e.token}function ao(e){return\"string\"==typeof e.uuid}function co(e){return e.runtime&&\"string\"==typeof e.runtime.version}function ho(e){return ao(e)&&co(e)}Object.defineProperty(io,\"__esModule\",{value:!0}),io.isInternalConnectConfig=io.isPortDiscoveryConfig=io.isNewConnectConfig=io.isConfigWithReceiver=io.isRemoteConfig=io.isExistingConnectConfig=io.isExternalConfig=void 0,io.isExternalConfig=ro,io.isExistingConnectConfig=oo,io.isRemoteConfig=so,io.isConfigWithReceiver=function(e){return\"object\"==typeof e.receiver&&so({...e,address:\"\"})},io.isNewConnectConfig=ho,io.isPortDiscoveryConfig=function(e){return ro(e)&&co(e)||ho(e)},io.isInternalConnectConfig=function(e){return oo(e)||ho(e)};var lo={},uo={};Object.defineProperty(uo,\"__esModule\",{value:!0}),uo.EmitterMap=void 0;const po=t;function wo(e){return Buffer.from(e).toString(\"base64\")}uo.EmitterMap=class{constructor(){this.storage=new Map}hashKeys(e){return e.map(wo).join(\"/\")}getOrCreate(e){const t=this.hashKeys(e);return this.storage.has(t)||this.storage.set(t,new po.EventEmitter),this.storage.get(t)}has(e){return this.storage.has(this.hashKeys(e))}delete(e){const t=this.hashKeys(e);return this.storage.delete(t)}},Object.defineProperty(lo,\"__esModule\",{value:!0});const yo=uo;class fo extends yo.EmitterMap{constructor(){super(...arguments),this.dispatchEvent=e=>{if(function(e){return\"process-desktop-event\"===e.action}(e)){const{payload:t}=e,n=function(e){const{topic:t}=e;if(\"frame\"===t||\"window\"===t||\"view\"===t){const{uuid:n,name:i}=e;return[t,n,i]}if(\"application\"===t){const{uuid:n}=e;return[t,n]}return[t]}(t);if(this.has(n))return this.getOrCreate(n).emit(t.type,t),!0}return!1}}}lo.default=fo;var go,mo,vo=s&&s.__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},Co=s&&s.__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)},bo=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(no,\"__esModule\",{value:!0});var Io=no.Transport=void 0;const Eo=t,xo=io,Ao=g,Po=bo(lo),Mo=ki,_o=ke;class Oo extends Eo.EventEmitter{constructor(e,t,n){super(),this.wireListeners=new Map,this.topicRefMap=new Map,this.eventAggregator=new Po.default,this.messageHandlers=[this.eventAggregator.dispatchEvent],go.set(this,void 0),mo.set(this,void 0),this.connectSync=()=>{Co(this,go,\"f\").connectSync()},this.getPort=()=>Co(this,go,\"f\").getPort(),vo(this,go,new e(this.onmessage.bind(this)),\"f\"),this.environment=t,this.sendRaw=Co(this,go,\"f\").send.bind(Co(this,go,\"f\")),this.registerMessageHandler(this.handleMessage.bind(this)),Co(this,go,\"f\").on(\"disconnected\",(()=>{for(const[,{handleNack:e}]of this.wireListeners)e({reason:\"Remote connection has closed\"});this.wireListeners.clear(),this.emit(\"disconnected\")}));const{uuid:i,name:r}=n,o=this.environment.getCurrentEntityType();this.me=(0,Mo.getBaseMe)(o,i,r)}getFin(){if(!Co(this,mo,\"f\"))throw new Error(\"No Fin object registered for this transport\");return Co(this,mo,\"f\")}registerFin(e){if(Co(this,mo,\"f\"))throw new Error(\"Fin object has already been registered for this transport\");vo(this,mo,e,\"f\")}shutdown(){return Co(this,go,\"f\").shutdown()}async connect(e){if((0,xo.isConfigWithReceiver)(e))return await Co(this,go,\"f\").connect(e.receiver),this.authorize(e);if((0,xo.isRemoteConfig)(e))return this.connectRemote(e);if((0,xo.isExistingConnectConfig)(e))return this.connectByPort(e);if((0,xo.isNewConnectConfig)(e)){const t=await this.environment.retrievePort(e);return this.connectByPort({...e,address:`ws://localhost:${t}`})}}async connectRemote(e){return await Co(this,go,\"f\").connect(new(this.environment.getWsConstructor())(e.address)),this.authorize(e)}async connectByPort(e){const{address:t,uuid:n}=e,i={...e,type:\"file-token\"},r=Co(this,go,\"f\");await r.connect(new(this.environment.getWsConstructor())(e.address));const o=await this.sendAction(\"request-external-authorization\",{uuid:n,type:\"file-token\"},!0);if(\"external-authorization-response\"!==o.action)throw new Ao.UnexpectedActionError(o.action);return await this.environment.writeToken(o.payload.file,o.payload.token),this.authorize(i)}async authorize(e){const t=await this.sendAction(\"request-authorization\",e,!0);if(\"authorization-response\"!==t.action)throw new Ao.UnexpectedActionError(t.action);if(!0!==t.payload.success)throw new Ao.RuntimeError(t.payload)}sendAction(e,t={},n=!1){let i=()=>{};const r=Ao.RuntimeError.getCallSite(1),o=this.environment.getNextMessageId(),s=new Promise(((s,a)=>{i=a;const c={action:e,payload:t,messageId:o},d=Co(this,go,\"f\");return this.addWireListener(o,s,(e=>this.nackHandler(e,a,r)),n),d.send(c).catch(a)}));return Object.assign(s,{cancel:i,messageId:o})}nackHandler(e,t,n){t(\"string\"==typeof e?e:new Ao.RuntimeError(e,n))}ferryAction(e){return new Promise(((t,n)=>{const i=this.environment.getNextMessageId();e.messageId=i;const r=e=>{t(e.payload)};return Co(this,go,\"f\").send(e).then((()=>this.addWireListener(i,r,(e=>this.nackHandler(e,n)),!1))).catch(n)}))}registerMessageHandler(e){this.messageHandlers.push(e)}addWireListener(e,t,n,i){i?this.uncorrelatedListener=t:this.wireListeners.has(e)?n({reason:\"Duplicate handler id\",error:(0,_o.errorToPOJO)(new Ao.DuplicateCorrelationError(String(e)))}):this.wireListeners.set(e,{resolve:t,handleNack:n})}onmessage(e){for(const t of this.messageHandlers)t.call(null,e)}handleMessage(e){const t=e.correlationId||NaN;if(\"correlationId\"in e){if(!this.wireListeners.has(t))return!1;{const{resolve:n,handleNack:i}=this.wireListeners.get(t);\"ack\"!==e.action?i({reason:\"Did not receive ack action\",error:(0,_o.errorToPOJO)(new Ao.NoAckError(e.action))}):\"payload\"in e?e.payload.success?n.call(null,e):i(e.payload):\"string\"==typeof e.reason?i(e):(console.warn(\"Received invalid response from core\",e),i({reason:\"invalid response shape\"})),this.wireListeners.delete(t)}}else this.uncorrelatedListener&&this.uncorrelatedListener.call(null,e),this.uncorrelatedListener=()=>{};return!0}}Io=no.Transport=Oo,go=new WeakMap,mo=new WeakMap;const So=(...e)=>({log:(...t)=>console.debug(`[${(new Date).toISOString()}]`,...(e=>e.map((e=>`[${e}]`)))(e),...t),getLogger:(...t)=>So(...e,...t)}),Ro=So(\"@openfin/core-web/client\");function Fo(e,t){if(!function(e){return\"string\"==typeof e}(e))throw new Error(`Property ${t} has invalid type. Expected string, got ${typeof e}.`)}const jo=\"web-broker-ports-ready\",ko=Ro.getLogger(\"get-web-interop-ports\");function Lo(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)}function To(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}\"function\"==typeof SuppressedError&&SuppressedError;const $o=e=>{var n,i,r;return r=class extends t.EventEmitter{constructor(t){super(),n.set(this,void 0),i.set(this,!1),this.connectSync=()=>{Lo(this,i,\"f\")||(e.addEventListener(\"message\",(e=>{e.data?.topic?.startsWith(\"wire-message\")&&e.data.message&&Lo(this,n,\"f\").call(this,{...JSON.parse(e.data.message),ports:e.ports})})),e.start())},this.connect=async()=>{this.connectSync()},this.send=t=>(e.postMessage({topic:\"wire-message\",message:JSON.stringify(t)}),Promise.resolve()),this.shutdown=async()=>{e.close()},To(this,n,t,\"f\")}getPort(){return e}},n=new WeakMap,i=new WeakMap,r};var Bo={},Go={};Object.defineProperty(Go,\"__esModule\",{value:!0}),Go.BaseEnvironment=void 0;const Wo=vr();Go.BaseEnvironment=class{async getViewWindowIdentity(e,t){const{identity:n}=await e.View.wrapSync(t).getCurrentWindow();return n}async getInteropInfo(e){const t=await e.Application.getCurrentSync().getInfo().catch((()=>null)),n=t?.initialOptions?.interopBrokerConfiguration??{};return{fdc3Version:t?(0,Wo.getDefaultViewFdc3VersionFromAppInfo)(t):void 0,...n,fdc3Info:{providerVersion:await e.System.getVersion(),provider:\"OpenFin\"}}}},Object.defineProperty(Bo,\"__esModule\",{value:!0});var Ho=Bo.BrowserEnvironment=void 0;const No=Go;class Do extends No.BaseEnvironment{constructor(){super(...arguments),this.type=\"other\",this.getRandomId=()=>{const e=new Uint32Array(1);return window.crypto.getRandomValues(e)[0].toString(32)}}getAdapterVersionSync(){return\"\"}observeBounds(e,t){throw new Error(\"Method not implemented.\")}layoutAllowedInContext(e){return!1}initLayoutManager(e,t,n){throw new Error(\"Method not implemented.\")}applyLayoutSnapshot(e,t,n){throw new Error(\"Method not implemented.\")}createLayout(e,t){throw new Error(\"Method not implemented.\")}destroyLayout(e,t){throw new Error(\"Method not implemented.\")}resolveLayout(e,t){throw new Error(\"Method not implemented.\")}initPlatform(...e){throw new Error(\"Method not implemented.\")}writeToken(e,t){return Promise.resolve(\"\")}retrievePort(e){throw new Error(\"Method not implemented.\")}getNextMessageId(){return this.getRandomId()}createChildContent(e){throw new Error(\"Method not implemented.\")}getWebWindow(e){throw new Error(\"Method not implemented.\")}getCurrentEntityIdentity(){throw new Error(\"Method not implemented.\")}getCurrentEntityType(){return\"external connection\"}raiseEvent(e,t){throw new Error(\"Method not implemented.\")}getUrl(){return location.href}getDefaultChannelOptions(){return{create:{},connect:{}}}getRtcPeer(){return new RTCPeerConnection}getWsConstructor(){return WebSocket}whenReady(){return Promise.resolve()}}Ho=Bo.BrowserEnvironment=Do;const Uo=e=>\"platform\"in e&&void 0!==e.platform;var Vo,zo;class Ko extends Ho{constructor(e){super(),this.connectConfig=e,Vo.set(this,void 0),zo.set(this,new W((async()=>Promise.resolve().then((function(){return require(\"./main-b14f67c9.js\")}))))),Uo(e)&&this.validatePlatformOptions(e)}getAdapterVersionSync(){return\"0.39.21\"}validatePlatformOptions({platform:e}){if(!(\"layoutSnapshot\"in e))throw new Error(\"Platform options are missing layoutSnapshot. Please provide a layoutSnapshot in the platform options.\");if(\"windows\"in e||\"windows\"in e.layoutSnapshot)throw new Error(\"It appears you tried to call connect() with a snapshot object from an OpenFin desktop environment. Note that connect() expects to be called with a platform property with this structure: { platform: { layoutSnapshot } }. To get a layoutSnapshot of the expected structure, use fin.Platform.Layout.getCurrentLayoutManagerSync().getLayoutSnapshot() in v34+ in your desktop environment.\");const{layouts:t}=e.layoutSnapshot;Object.entries(t).map((([e,t])=>{if(\"object\"!=typeof t||null===t)throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must be an object.`);if(!(\"content\"in t))throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must contain a 'content' property.`)}))}async getInteropInfo(e){return{...{contextGroups:void 0,logging:{beforeAction:{enabled:!1},afterAction:{enabled:!1}}},fdc3Version:void 0,fdc3Info:{providerVersion:\"0.39.21\",provider:\"OpenFin Web\"}}}layoutAllowedInContext(e){return!0}async initLayoutManager(e,t,n){if(Lo(this,Vo,\"f\"))throw new Error(\"Layout already initialized.\");if(!Uo(this.connectConfig))throw new Error(\"Platform options are missing from connection config.\");const{WebLayoutEntryPoint:i}=await Lo(this,zo,\"f\").getValue();return To(this,Vo,new i(this.connectConfig),\"f\"),await Lo(this,Vo,\"f\").initLayoutManager(e,t,n)}async applyLayoutSnapshot(e,t,n){Lo(this,Vo,\"f\")?.applyLayoutSnapshot(e,t,n)}async createLayout(e,t){return Lo(this,Vo,\"f\")?.createLayout(e,t)}async destroyLayout(e,t){return Lo(this,Vo,\"f\")?.destroyLayout(e,t)}async getViewWindowIdentity(e,t){return Promise.resolve({uuid:t.uuid,name:t.uuid})}}Vo=new WeakMap,zo=new WeakMap;const qo=()=>{const e=((e,t)=>{const n=new RegExp(`^${t}<(?.*)>$`).exec(e)?.groups?.meta;if(n)try{return JSON.parse(atob(n))}catch(e){throw new Error(`Failed to decode JSON from ${n}.`)}})(window.name,\"of-frame\");if(e)try{const{name:t,uuid:n,brokerUrl:i,providerId:r,contextGroup:o}=e;return Fo(i,\"brokerUrl\"),Fo(n,\"uuid\"),Fo(t,\"name\"),{identity:{name:t,uuid:n},brokerUrl:i,interopConfig:{providerId:r,currentContextGroup:o}}}catch(e){throw new Error(`Unexpected error occurred when inferring platform information: ${e.stack}`)}},Jo=()=>{const e=r.v4();return{uuid:e,name:e}},Yo=async e=>{if(\"enabled\"===e.connectionInheritance){const t=await(async e=>{const t=qo();if(t){const{validateOptions:n=(()=>!0)}=e,{identity:i,...r}=t;if(!await n(r))throw new Error(\"Parent options were rejected by validateOptions.\");return t}})(e);if(t)return t}if(!e.options){const t=\"enabled\"===e.connectionInheritance?\"Broker URL was not specified nor provided by a platform container.\":\"Connection inheritance is disabled but no options were provided.\";throw new Error(t)}return{...e.options,identity:Jo()}};exports.__classPrivateFieldGet=Lo,exports.__classPrivateFieldSet=To,exports.apiExposer=Gn,exports.commonjsGlobal=s,exports.connect=async t=>{try{Ro.log(\"Establishing connection\",t);const{brokerUrl:n,identity:i,timeout:r,interopConfig:s}=await Yo(t),{workerPort:a,iframeBrokerPort:c}=await(async(e,t,n)=>{const{origin:i}=new URL(e),r=document.createElement(\"IFRAME\");let s;r.style.display=\"none\";try{return await new Promise(((a,c)=>{const d=e=>{if(e.source===r.contentWindow&&e.data?.topic===`ack-${jo}`){if(e.origin!==i)c(new Error(`Broker redirected to unexpected origin ${e.origin}, expected ${i}.`));else if(e.data.success){const[t,n]=e.ports;a({iframeBrokerPort:t,workerPort:n})}else c(new m(e.data));window.removeEventListener(\"message\",d),clearTimeout(s)}};window.addEventListener(\"message\",d),ko.log(`Connecting to broker ${e}`),r.setAttribute(\"src\",e),r.setAttribute(\"name\",o(t,\"of-broker\")),document.body.appendChild(r),ko.log(\"Iframe loaded, awaiting init message from iframe\"),n&&(s=setTimeout((()=>{window.removeEventListener(\"message\",d),document.body.removeChild(r),c(new Error(\"Worker did not initialize in time\"))}),n))}))}catch(e){throw new Error(`Failed to initialise Fin Web Client. ${e.message}`,{cause:e})}})(n,i,r);Ro.log(\"Successfully established connection to shared worker\");const d={entityType:\"external connection\",...i};a.start(),c.start();const h=((t,n,i)=>{const r=$o(n),o=new Ko(t),s=new Io(r,o,i);return s.connectSync(),window.Buffer=e.Buffer,new Wr(s)})(t,a,d);return s?.providerId&&(h.me.interop=h.Interop.connectSync(s.providerId),s?.currentContextGroup&&h.me.interop.joinContextGroup(s.currentContextGroup).catch((e=>{console.warn(`Error joining specified context group: ${s?.currentContextGroup}, continuing`,e)}))),{...h,me:{...h.me,identity:{uuid:h.me.uuid,name:h.me.name}}}}catch(e){throw new Error(`An error occured during web-interop connection: ${e.message}`)}},exports.decorators=Nn,exports.encodeOptions=o,exports.layout_constants=ai,exports.lazy=G;\n","\"use strict\";var t=require(\"./main-8cad4070.js\"),e=require(\"uuid\");require(\"buffer/\"),require(\"events\"),require(\"lodash/cloneDeep\"),require(\"lodash/isEqual\");var i={},n={};Object.defineProperty(n,\"__esModule\",{value:!0}),n.mapValuesAsync=n.mapEntriesAsync=void 0;const o=(t,[e,i])=>({...t,[e]:i});async function s(t,e){return(await Promise.all(e.map((async([e,i])=>[e,await t(i,e)])))).reduce(o,{})}n.mapEntriesAsync=s,n.mapValuesAsync=async function(t,e){let i;return i=e instanceof Map?[...e.entries()]:Object.entries(e),s(t,i)};var r,a,l,h,d=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldSet||function(t,e,i,n,o){if(\"m\"===n)throw new TypeError(\"Private method is not writable\");if(\"a\"===n&&!o)throw new TypeError(\"Private accessor was defined without a setter\");if(\"function\"==typeof e?t!==e||!o:!e.has(t))throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");return\"a\"===n?o.call(t,i):o?o.value=i:e.set(t,i),i},c=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldGet||function(t,e,i,n){if(\"a\"===i&&!n)throw new TypeError(\"Private accessor was defined without a getter\");if(\"function\"==typeof e?t!==e||!n:!e.has(t))throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");return\"m\"===i?n:\"a\"===i?n.call(t):n?n.value:e.get(t)};Object.defineProperty(i,\"__esModule\",{value:!0});var m=i.DefaultLayoutManager=void 0;const u=n;class p{constructor(t){a.set(this,void 0),l.set(this,new Map),d(this,a,t,\"f\")}size(){return c(this,l,\"f\").size}async applyLayoutSnapshot({layouts:t}){if(Object.keys(t).length>1)throw new Error(\"[LayoutManager] Tried to call applyLayoutSnapshot with more than 1 layout. When implementing multiple layouts via overridden LayoutManager class, you must override and fully implement the applyLayoutSnapshot method without calling super.applyLayoutSnapshot().\");const[[e,i]]=Object.entries(t);await p.createLayout(this,{layoutName:e,layout:i})}async showLayout({layoutName:t}){}async getLayoutSnapshot(){return{layouts:await(0,u.mapValuesAsync)((t=>t.getFrameSnapshot()),c(this,l,\"f\"))}}async removeLayout({layoutName:t}){}getLayoutIdentityForView(t){const e=[...c(this,l,\"f\").values()].find((e=>e.getCurrentViews().some((e=>e.name===t.name&&e.uuid===t.uuid))));return e?.identity??void 0}isLayoutVisible({layoutName:t}){return c(p,r,\"m\",h).call(p,this,t).isVisible()}resolveLayoutIdentity(t){if(t&&\"layoutName\"in t)return t;const e=[...c(this,l,\"f\").values()];if(1===e.length)return e[0].identity;const i=e.find((t=>t.isVisible()));return i?.identity??void 0}static async resolveLayout(t,e){const i=t.resolveLayoutIdentity(e);if(void 0===i||!(\"layoutName\"in i))throw new Error(\"[layout-manager] resolveLayout: Could not resolve the layout identity. Make sure you include 'layoutName' in the identity object.\");return c(p,r,\"m\",h).call(p,t,i.layoutName)}static async handleSharedView(t,e,i){await(0,u.mapValuesAsync)((async t=>{if(t.identity.layoutName!==e.layoutName){const e=t.getCurrentViews().find((t=>t.name===i.name));e&&await t.onViewDetached({viewIdentity:e,target:null}).catch(console.error)}}),c(t,l,\"f\"))}static async handleLastViewRemoved(t,e){await t.removeLayout(e),await c(t,a,\"f\").handleLastViewRemoved(t)}static async destroyLayout(t,{layoutName:e}){await c(p,r,\"m\",h).call(p,t,e).destroy(),c(t,l,\"f\").delete(e)}static async createLayout(t,e){const{layoutName:i}=e;if(c(t,l,\"f\").has(i))throw new Error(`Layout name ${i} already exists`);await c(t,a,\"f\").createLayout(e,t)}static registerLayout(t,e,i){c(t,l,\"f\").set(e,i)}static getAllLayouts(t){return[...c(t,l,\"f\").values()]}static setInitialSnapshot(t,e){c(t,a,\"f\").setInitialSnapshot(e)}static createClosedConstructor(...t){return class extends p{constructor(){super(...t)}}}}m=i.DefaultLayoutManager=p,r=p,a=new WeakMap,l=new WeakMap,h=function(t,e){const i=c(t,l,\"f\").get(e);if(!i)throw new Error(`[layout-manager] getLayoutByName: Could not locate layout with name '${e}'`);return i};var g={},f={},v={};Object.defineProperty(v,\"__esModule\",{value:!0}),v.ReversibleMap=void 0;v.ReversibleMap=class{constructor(){this.valueToKey=new Map,this.keyToValue=new Map,this.setUnique=(t,e)=>{if(this.hasKey(t)||this.hasValue(e))throw new Error(\"Key or value already in the map.\");this.keyToValue.set(t,e),this.valueToKey.set(e,t)},this.getKey=t=>{const e=this.valueToKey.get(t);if(!e)throw new Error(\"Value not found in the map.\");return e},this.deleteKey=t=>{const e=this.getValue(t);return this.keyToValue.delete(t),this.valueToKey.delete(e),e},this.deleteValue=t=>{const e=this.getKey(t);return this.keyToValue.delete(e),this.valueToKey.delete(t),e},this.hasKey=t=>this.keyToValue.has(t),this.hasValue=t=>this.valueToKey.has(t)}getValue(t){const e=this.keyToValue.get(t);if(!e)throw new Error(\"Key not found in the map.\");return e}},Object.defineProperty(f,\"__esModule\",{value:!0});var _=f.LayoutContentCache=void 0;const y=t.lazy,C=v;class w{constructor(){this.contentItemCache=new C.ReversibleMap,this.contentItemCacheId=0,this.createCacheKey=()=>{const t=`entity-${this.contentItemCacheId.toString()}`;return this.contentItemCacheId+=1,t},this.hasKey=t=>this.contentItemCache.hasKey(t),this.getItemOrUndefined=t=>{try{return this.getContentItemOrThrow(t)}catch(t){return}},this.getContentItemOrThrow=(t,e)=>{if(!this.contentItemCache.hasKey(t))throw new Error(\"Layout component has been destroyed or detached from the current layout.\");const i=this.contentItemCache.getValue(t);if(e&&!e.includes(i.type))throw new Error(`Layout item is not the expected type. Expected ${e.join(\", \")}, got ${i.type}.`);return i},this.getOrCreateEntityId=t=>{if(this.contentItemCache.hasValue(t))return this.contentItemCache.getKey(t);t.onDestroyed((()=>{this.contentItemCache.deleteValue(t)}));const e=this.createCacheKey();return this.contentItemCache.setUnique(e,t),e}}static getSingleInstance(){return w.singleton.getValue()}}_=f.LayoutContentCache=w,w.singleton=new y.Lazy((()=>new w));var I={},b={};!function(t){Object.defineProperty(t,\"__esModule\",{value:!0}),t.getAdjacentStacks=t.doShareEdge=t.getAdjacentItem=void 0;t.getAdjacentItem=(e,i)=>{const{parent:n}=e;if(e.isRoot()||!n)return;const o=[\"top\",\"bottom\"].includes(i)?\"column\":\"row\",s=[\"top\",\"left\"].includes(i)?-1:1;if(n.type===o){const t=n.contentItems.indexOf(e)+s;if(t>=0&&t{const n=t.getBounds(),o=e.getBounds();if(!n||!o)return!1;if([\"top\",\"bottom\"].includes(i)){return!(n.righto.right)}return!(n.bottomo.bottom)};t.getAdjacentStacks=(e,i)=>{const n=[\"top\",\"bottom\"].includes(i)?\"row\":\"column\",o=s=>\"stack\"===s.type?(0,t.doShareEdge)(e,s,i)?[s]:[]:\"root\"===s.type||\"ground\"===s.type?[]:s.type===n?s.contentItems.map((t=>o(t))).flat():s.type!==n?[\"top\",\"right\"].includes(i)?o(s.contentItems[s.contentItems.length-1]):o(s.contentItems[0]):[],s=(0,t.getAdjacentItem)(e,i);return s?o(s):[]}}(b);var S=t.commonjsGlobal&&t.commonjsGlobal.__decorate||function(t,e,i,n){var o,s=arguments.length,r=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if(\"object\"==typeof Reflect&&\"function\"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(s<3?o(r):s>3?o(e,i,r):o(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};Object.defineProperty(I,\"__esModule\",{value:!0}),I.LayoutEntitiesController=void 0;const E=t.decorators,x=b,L=i;class z{constructor(t,e,i){this.wire=t,this.layoutManager=e,this.layoutContentCache=i,this.analytics=t=>{this.wire.sendAction(`layout-controller-${t}`).catch((()=>{}))},this.getLayoutIdentityForViewOrThrow=async t=>{const e=this.layoutManager.getLayoutIdentityForView(t);if(!e)throw new Error(`View identity ${t.name} is not attached to any layouts.`);return e},this.getRoot=async t=>{this.analytics(\"get-root\");const e=(await this.getLayout(t)).getRoot();return{type:e.type,entityId:this.layoutContentCache.getOrCreateEntityId(e)}},this.getStackByView=async t=>{this.analytics(\"get-stack-by-view\");const e=await this.getLayoutIdentityForViewOrThrow(t),i=(await this.getLayout(e)).getStackByView(t);if(\"stack\"===i?.type)return{entityId:this.layoutContentCache.getOrCreateEntityId(i),type:\"stack\"}},this.getStackViews=t=>{this.analytics(\"get-stack-views\");return this.layoutContentCache.getContentItemOrThrow(t,[\"stack\"]).contentItems.map((t=>({name:t.viewName,uuid:this.wire.me.uuid})))},this.isRoot=t=>{this.analytics(\"is-root\");return this.layoutContentCache.getContentItemOrThrow(t).isRoot()},this.exists=t=>(this.analytics(\"exists\"),this.layoutContentCache.hasKey(t)),this.addViewToStack=async(t,e,{index:i}={index:0})=>{this.analytics(\"add-view-to-stack\");const n=this.layoutContentCache.getContentItemOrThrow(t);if(i&&i>n.contentItems.length+1)throw new Error(`Index '${i}' out of range, please exclude the index or specify a number between 0 and ${n.contentItems.length}`);const o={id:t,index:i},{identity:s}=await n.layout.platformCreateView(e,{location:o});return s},this.findViewInStack=(t,e)=>t.contentItems.find((t=>t.viewName===e.name)),this.removeViewFromStack=async(t,e)=>{this.analytics(\"remove-view-from-stack\");const i=this.layoutContentCache.getContentItemOrThrow(t,[\"stack\"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to remove a view ('${e.name}') which does not belong to the stack.`);await n.layout.platformCloseView(e)},this.createAdjacentStack=async(t,e,{position:i=\"right\"}={})=>{if(this.analytics(\"create-adjacent-stack\"),!Array.isArray(e)||0===e.length)throw new Error('The parameter \"views\" must be an array with at least 1 element.');if(![\"top\",\"bottom\",\"left\",\"right\"].includes(i))throw new Error(`Invalid position '${i}' specified.`);const n=this.layoutContentCache.getContentItemOrThrow(t).createAdjacentStack({position:i}),o=this.layoutContentCache.getOrCreateEntityId(n);return await Promise.all(e.reverse().map((t=>this.addViewToStack(o,t)))),o},this.getAdjacentStacks=async({targetId:t,edge:e})=>{this.analytics(\"get-adjacent-stacks\");const i=this.layoutContentCache.getContentItemOrThrow(t);return(0,x.getAdjacentStacks)(i,e).map((t=>({entityId:this.layoutContentCache.getOrCreateEntityId(t)})))},this.setStackActiveView=async(t,e)=>{this.analytics(\"set-stack-active-view\");const i=this.layoutContentCache.getContentItemOrThrow(t,[\"stack\"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to set a view ('${e.name}') as active when it does not belong to the stack.`);i.setActiveContentItem(n,!0)}}async getLayout(t){const e=await L.DefaultLayoutManager.resolveLayout(this.layoutManager,t);if(!e)throw new Error(`Could not resolve target layout identity ${JSON.stringify(t)}`);return e}getContent(t){this.analytics(\"get-content\");return this.layoutContentCache.getContentItemOrThrow(t,[\"column\",\"row\"]).contentItems.map((t=>({type:t.type,entityId:this.layoutContentCache.getOrCreateEntityId(t)})))}getParent(t){this.analytics(\"get-parent\");const e=this.layoutContentCache.getContentItemOrThrow(t);if(!e.isRoot())return e.parent?.contentItems.includes(e)?{type:e.parent.type,entityId:this.layoutContentCache.getOrCreateEntityId(e.parent)}:void 0}}S([(0,E.expose)()],z.prototype,\"getLayoutIdentityForViewOrThrow\",void 0),S([(0,E.expose)()],z.prototype,\"getRoot\",void 0),S([(0,E.expose)()],z.prototype,\"getStackByView\",void 0),S([(0,E.expose)()],z.prototype,\"getStackViews\",void 0),S([(0,E.expose)()],z.prototype,\"getContent\",null),S([(0,E.expose)()],z.prototype,\"getParent\",null),S([(0,E.expose)()],z.prototype,\"isRoot\",void 0),S([(0,E.expose)()],z.prototype,\"exists\",void 0),S([(0,E.expose)()],z.prototype,\"addViewToStack\",void 0),S([(0,E.expose)()],z.prototype,\"removeViewFromStack\",void 0),S([(0,E.expose)()],z.prototype,\"createAdjacentStack\",void 0),S([(0,E.expose)()],z.prototype,\"getAdjacentStacks\",void 0),S([(0,E.expose)()],z.prototype,\"setStackActiveView\",void 0),I.LayoutEntitiesController=z,Object.defineProperty(g,\"__esModule\",{value:!0});var M=g.initLayoutEndpoints=void 0;const P=t.apiExposer,T=t.layout_constants,A=f,k=I,D=i;M=g.initLayoutEndpoints=async function(t,e){const i=t.getFin(),n=await i.Platform.getCurrentSync().getClient(),o=new P.ChannelsExposer(n);await new P.ApiExposer(o).exposeInstance(new k.LayoutEntitiesController(t,e,A.LayoutContentCache.getSingleInstance()),{id:T.LAYOUT_CONTROLLER_ID}),await async function(t,e){const i=t=>async i=>{const n=await D.DefaultLayoutManager.resolveLayout(e,i.target);if(!n)throw new Error(`Could not resolve the layout target from payload ${JSON.stringify(i)}`);return t(n,i)},n=(e,n)=>{t.register(e,i(n))},o=(t,e)=>{n(t,e)};n(\"replace-view\",((t,e)=>t.replaceView(e))),n(\"replace-layout\",((t,{layout:e})=>t.replaceLayout(e))),n(\"add-view\",((t,e)=>t.insertView(e))),o(\"layout-add-view\",((t,{viewOptions:e,location:i,targetView:n})=>t.platformCreateView(e,{location:i,targetView:n}))),n(\"close-view\",((t,e)=>t.cleanupView(e.viewIdentity))),o(\"layout-close-view\",((t,e)=>t.platformCloseView(e.viewIdentity))),n(\"apply-preset-layout\",((t,e)=>t.applyPreset(e))),n(\"get-layout-views\",(t=>t.getCurrentViews())),n(\"get-frame-snapshot\",(t=>t.getFrameSnapshot())),n(\"is-visible\",(t=>t.isVisible())),n(\"destroy\",(t=>t.destroy())),t.register(\"get-layout-snapshot\",(()=>e.getLayoutSnapshot()))}(n,e)};var R={};Object.defineProperty(R,\"__esModule\",{value:!0});var U=R.BaseLayout=void 0;U=R.BaseLayout=class{};var O={};Object.defineProperty(O,\"__esModule\",{value:!0});var V=O.DOMEmitter=void 0;V=O.DOMEmitter=class{constructor(t){this.container=t}dispatchLocalEvent(t,e){const i={...e,type:t,tabSelector:`tab-${e.name}`,containerSelector:`container-${e.name}`,topic:\"openfin-DOM-event\"};this.container.dispatchEvent(new CustomEvent(t,{detail:i}))}};var B={};Object.defineProperty(B,\"__esModule\",{value:!0});var H=B.mapLayoutContentItemsImmutableSync=B.mapLayoutContentItemsImmutable=W=B.isVisible=void 0;var W=B.isVisible=t=>(0!==t.offsetWidth||0!==t.offsetHeight)&&\"hidden\"!==window.getComputedStyle(t).visibility&&t.offsetTop>=0&&t.offsetLeft>=0&&t.offsetTop<=window.innerHeight&&t.offsetLeft<=window.innerWidth;const F=t=>\"type\"in t&&\"component\"===t.type;B.mapLayoutContentItemsImmutable=async function t(e,i){return F(i)?e(i):{...i,content:await Promise.all(i.content?.map((i=>t(e,i))))}},H=B.mapLayoutContentItemsImmutableSync=function t(e,i){return F(i)?e(i):{...i,content:i.content?.map((i=>t(e,i)))}};class N extends Error{constructor(t,e){super(e),this.type=t}}class G extends N{constructor(t,e){super(\"Configuration\",t),this.node=e}}class j extends N{constructor(t){super(\"PopoutBlocked\",t)}}class $ extends N{constructor(t){super(\"API\",t)}}class Z extends N{constructor(t){super(\"Bind\",t)}}class q extends Error{constructor(t,e,i){super(`${t}: ${e}${void 0===i?\"\":\": \"+i}`)}}class X extends q{constructor(t,e){super(\"Assert\",t,e)}}class Y extends q{constructor(t,e,i){super(\"UnreachableCase\",t,`${e}${void 0===i?\"\":\": \"+i}`)}}class K extends q{constructor(t,e){super(\"UnexpectedNull\",t,e)}}class J extends q{constructor(t,e){super(\"UnexpectedUndefined\",t,e)}}var Q;!function(t){let e=!1;const i={PopoutCannotBeCreatedWithGroundItemConfig:{id:0,default:\"Popout cannot be created with ground ItemConfig\"},PleaseRegisterAConstructorFunction:{id:1,default:\"Please register a constructor function\"},ComponentTypeNotRegisteredAndBindComponentEventHandlerNotAssigned:{id:2,default:\"Component type not registered and BindComponentEvent handler not assigned\"},ComponentIsAlreadyRegistered:{id:3,default:\"Component is already registered\"},ComponentIsNotVirtuable:{id:4,default:\"Component is not virtuable. Requires rootHtmlElement field/getter\"},VirtualComponentDoesNotHaveRootHtmlElement:{id:5,default:'Virtual component does not have getter \"rootHtmlElement\"'},ItemConfigIsNotTypeComponent:{id:6,default:\"ItemConfig is not of type component\"},InvalidNumberPartInSizeString:{id:7,default:\"Invalid number part in size string\"},UnknownUnitInSizeString:{id:8,default:\"Unknown unit in size string\"},UnsupportedUnitInSizeString:{id:9,default:\"Unsupported unit in size string\"}};t.idCount=Object.keys(i).length;const n=Object.values(i);t.checkInitialise=function(){if(!e)for(let e=0;e=\"0\"&&t<=\"9\"}function Tt(t,e){const i=zt(e);t.style.width=i}function At(t,e){const i=zt(e);t.style.height=i}function kt(t){return{width:t.offsetWidth,height:t.offsetHeight}}function Dt(t,e){t.style.display=e?\"\":\"none\"}function Rt(t,e){if(void 0!==e)for(const i in e)if(e.hasOwnProperty(i)){const n=e[i],o=t[i];t[i]=Ut(o,n)}return t}function Ut(t,e){if(\"object\"!=typeof e)return e;if(Array.isArray(e)){const t=e.length,i=new Array(t);for(let n=0;n36)throw new Error(\"Too many keys in config minifier map\")},t.translateObject=n}(dt||(dt={})),function(t){t.defaults={type:at.ground,content:[],size:1,sizeUnit:ht.Fractional,minSize:void 0,minSizeUnit:ht.Pixel,id:\"\",isClosable:!0},t.createCopy=function(t,e){switch(t.type){case at.ground:case at.row:case at.column:return gt.createCopy(t,e);case at.stack:return ut.createCopy(t,e);case at.component:return pt.createCopy(t);default:throw new Y(\"CICC91354\",t.type,\"Invalid Config Item type specified\")}},t.createDefault=function(t){switch(t){case at.ground:throw new X(\"CICCDR91562\");case at.row:case at.column:return gt.createDefault(t);case at.stack:return ut.createDefault();case at.component:return pt.createDefault();default:throw new Y(\"CICCDD91563\",t,\"Invalid Config Item type specified\")}},t.isComponentItem=function(t){return t.type===at.component},t.isStackItem=function(t){return t.type===at.stack},t.isGroundItem=function(t){return t.type===at.ground}}(ct||(ct={})),function(t){t.defaultMaximised=!1,function(t){t.createCopy=function(t,e){return void 0===t?void 0:{show:null!=e?e:t.show,popout:t.popout,close:t.close,maximise:t.maximise,minimise:t.minimise,tabDropdown:t.tabDropdown}}}(t.Header||(t.Header={}))}(mt||(mt={})),function(t){function e(t){const e=t.length,i=new Array(e);for(let n=0;n\"__glMaximised\"===t));t>0&&(o=!0,n=n.splice(t,1)),e=n.length>0?n[0]:ct.defaults.id}else e=n;return i=void 0!==t.maximised?t.maximised:o,{id:e,maximised:i}}}(wt||(wt={})),function(t){function e(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0;return{resolved:!0,root:Et.resolve(i),openPopouts:t.resolveOpenPopouts(e.openPopouts),dimensions:t.Dimensions.resolve(e.dimensions),settings:t.Settings.resolve(e.settings),header:t.Header.resolve(e.header,e.settings,e.labels)}}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:Lt.fromResolvedArray(e.openPopouts),settings:_t.Settings.createCopy(e.settings),dimensions:t.Dimensions.fromResolved(e.dimensions),header:_t.Header.createCopy(e.header)}},t.isResolved=function(t){const e=t;return void 0!==e.resolved&&!0===e.resolved},t.resolveOpenPopouts=function(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0,{root:Et.resolve(o),openPopouts:xt.resolveOpenPopouts(e.openPopouts),dimensions:xt.Dimensions.resolve(e.dimensions),settings:xt.Settings.resolve(e.settings),header:xt.Header.resolve(e.header,e.settings,e.labels),parentId:null!==(i=e.parentId)&&void 0!==i?i:null,indexInParent:null!==(n=e.indexInParent)&&void 0!==n?n:null,window:t.Window.resolve(e.window,e.dimensions),resolved:!0}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:i(e.openPopouts),dimensions:xt.Dimensions.fromResolved(e.dimensions),settings:_t.Settings.createCopy(e.settings),header:_t.Header.createCopy(e.header),parentId:e.parentId,indexInParent:e.indexInParent,window:t.Window.fromResolved(e.window)}},t.fromResolvedArray=i}(Lt||(Lt={}));class Wt{constructor(){this._allEventSubscriptions=[],this._subscriptionsMap=new Map,this.unbind=this.removeEventListener,this.trigger=this.emit}tryBubbleEvent(t,e){}emit(t,...e){let i=this._subscriptionsMap.get(t);if(void 0!==i){i=i.slice();for(let t=0;t0){const n=e.slice();n.unshift(t);const o=this._allEventSubscriptions.slice();for(let t=0;t0?n.contentItems[0]:n,e=0);const o=this._layoutManager.createAndInitContentItem(i,t);t.addChild(o,e),this._layoutManager.layoutConfig.settings.popInOnClose?this._onClose():this.close()}createWindow(){const t=this.createUrl(),e=Math.floor(1e6*Math.random()).toString(36),i=this.serializeWindowFeatures({width:this._initialWindowSize.width,height:this._initialWindowSize.height,innerWidth:this._initialWindowSize.width,innerHeight:this._initialWindowSize.height,menubar:\"no\",toolbar:\"no\",location:\"no\",personalbar:\"no\",resizable:\"yes\",scrollbars:\"no\",status:\"no\"});if(this._popoutWindow=globalThis.open(t,e,i),this._popoutWindow)this._popoutWindow.addEventListener(\"load\",(()=>this.positionWindow()),{passive:!0}),this._popoutWindow.addEventListener(\"beforeunload\",(()=>{this._layoutManager.layoutConfig.settings.popInOnClose?this.popIn():this._onClose()}),{passive:!0}),this._checkReadyInterval=setInterval((()=>this.checkReady()),10);else if(!0===this._layoutManager.layoutConfig.settings.blockedPopoutsThrowError){throw new j(\"Popout blocked\")}}checkReady(){if(null===this._popoutWindow)throw new K(\"BPCR01844\");this._popoutWindow.__glInstance&&this._popoutWindow.__glInstance.isInitialised&&(this.onInitialised(),void 0!==this._checkReadyInterval&&(clearInterval(this._checkReadyInterval),this._checkReadyInterval=void 0))}serializeWindowFeatures(t){const e=[];for(const i in t)e.push(i+\"=\"+t[i].toString());return e.join(\",\")}createUrl(){const t=\"gl-window-config-\"+Ot(),e=_t.minifyConfig(this._config);try{localStorage.setItem(t,JSON.stringify(e))}catch(t){throw new Error(\"Error while writing to localStorage \"+function(t){return t instanceof Error?t.message:\"string\"==typeof t?t:\"Unknown Error\"}(t))}const i=new URL(location.href);return i.searchParams.set(\"gl-window\",t),i.toString()}positionWindow(){if(null===this._popoutWindow)throw new Error(\"BrowserPopout.positionWindow: null popoutWindow\");this._popoutWindow.moveTo(this._initialWindowSize.left,this._initialWindowSize.top),this._popoutWindow.focus()}onInitialised(){this._isInitialised=!0,this.getGlInstance().on(\"popIn\",(()=>this.popIn())),this.emit(\"initialised\")}_onClose(){setTimeout((()=>this.emit(\"closed\")),50)}}class Gt extends Wt{constructor(t,e,i,n){super(),this.layoutManager=t,this._parent=i,this._element=n,this._popInParentIds=[],this._type=e.type,this._id=e.id,this._isInitialised=!1,this.isGround=!1,this.isRow=!1,this.isColumn=!1,this.isStack=!1,this.isComponent=!1,this.size=e.size,this.sizeUnit=e.sizeUnit,this.minSize=e.minSize,this.minSizeUnit=e.minSizeUnit,this._isClosable=e.isClosable,this._pendingEventPropagations={},this._throttledEvents=[\"stateChanged\"],this._contentItems=this.createContentItems(e.content)}get type(){return this._type}get id(){return this._id}set id(t){this._id=t}get popInParentIds(){return this._popInParentIds}get parent(){return this._parent}get contentItems(){return this._contentItems}get isClosable(){return this._isClosable}get element(){return this._element}get isInitialised(){return this._isInitialised}static isStack(t){return t.isStack}static isComponentItem(t){return t.isComponent}static isComponentParentableItem(t){return t.isStack||t.isGround}removeChild(t,e=!1){const i=this._contentItems.indexOf(t);if(-1===i)throw new Error(\"Can't remove child item. Unknown content item\");if(e||this._contentItems[i].destroy(),this._contentItems.splice(i,1),this._contentItems.length>0)this.updateSize(!1);else if(!this.isGround&&!0===this._isClosable){if(null===this._parent)throw new K(\"CIUC00874\");this._parent.removeChild(this)}}addChild(t,e,i){return null!=e||(e=this._contentItems.length),this._contentItems.splice(e,0,t),t.setParent(this),!0===this._isInitialised&&!1===t._isInitialised&&t.init(),e}replaceChild(t,e,i=!1){const n=this._contentItems.indexOf(t),o=t._element.parentNode;if(-1===n)throw new X(\"CIRCI23232\",\"Can't replace child. oldChild is not child of this\");if(null===o)throw new K(\"CIRCP23232\");if(o.replaceChild(e._element,t._element),!0===i&&(t._parent=null,t.destroy()),this._contentItems[n]=e,e.setParent(this),e.size=t.size,e.sizeUnit=t.sizeUnit,e.minSize=t.minSize,e.minSizeUnit=t.minSizeUnit,null===e._parent)throw new K(\"CIRCNC45699\");!0===e._parent._isInitialised&&!1===e._isInitialised&&e.init(),this.updateSize(!1)}remove(){if(null===this._parent)throw new K(\"CIR11110\");this._parent.removeChild(this)}popout(){const t=Ot(),e=this.layoutManager.createPopoutFromContentItem(this,void 0,t,void 0);return this.emitBaseBubblingEvent(\"stateChanged\"),e}calculateConfigContent(){const t=this._contentItems,e=t.length,i=new Array(e);for(let n=0;nthis.propagateEventToLayoutManager(t,e))))}propagateEventToLayoutManager(t,e){this._pendingEventPropagations[t]=!1,this.layoutManager.emitUnknown(t,e)}}class jt extends Gt{constructor(t,e,i){super(t,e,i,document.createElement(\"div\")),this._parentItem=i,this._focused=!1,this.isComponent=!0,this._reorderEnabled=e.reorderEnabled,this.applyUpdatableConfig(e),this._initialWantMaximise=e.maximised;const n=document.createElement(\"div\");n.classList.add(\"lm_content\"),this.element.appendChild(n),this._container=new Ft(e,this,t,n,(t=>this.handleUpdateItemConfigEvent(t)),(()=>this.show()),(()=>this.hide()),(t=>this.focus(t)),(t=>this.blur(t)))}get componentName(){return this._container.componentType}get componentType(){return this._container.componentType}get reorderEnabled(){return this._reorderEnabled}get initialWantMaximise(){return this._initialWantMaximise}get component(){return this._container.component}get container(){return this._container}get parentItem(){return this._parentItem}get headerConfig(){return this._headerConfig}get title(){return this._title}get tab(){return this._tab}get focused(){return this._focused}destroy(){this._container.destroy(),super.destroy()}applyUpdatableConfig(t){this.setTitle(t.title),this._headerConfig=t.header}toConfig(){const t=this._container.stateRequestEvent,e=void 0===t?this._container.state:t();return{type:at.component,content:[],size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,maximised:!1,isClosable:this.isClosable,reorderEnabled:this._reorderEnabled,title:this._title,header:mt.Header.createCopy(this._headerConfig),componentType:pt.copyComponentType(this.componentType),componentState:e}}close(){if(null===this.parent)throw new K(\"CIC68883\");this.parent.removeChild(this,!1)}enterDragMode(t,e){Tt(this.element,t),At(this.element,e),this._container.enterDragMode(t,e)}exitDragMode(){this._container.exitDragMode()}enterStackMaximised(){this._container.enterStackMaximised()}exitStackMaximised(){this._container.exitStackMaximised()}drag(){this._container.drag()}updateSize(t){this.updateNodeSize(t)}init(){this.updateNodeSize(!1),super.init(),this._container.emit(\"open\"),this.initContentItems()}setTitle(t){this._title=t,this.emit(\"titleChanged\",t),this.emit(\"stateChanged\")}setTab(t){this._tab=t,this.emit(\"tab\",t),this._container.setTab(t)}hide(){super.hide(),this._container.setVisibility(!1)}show(){super.show(),this._container.setVisibility(!0)}focus(t=!1){this.parentItem.setActiveComponentItem(this,!0,t)}setFocused(t){this._focused=!0,this.tab.setFocused(),t||this.emitBaseBubblingEvent(\"focus\")}blur(t=!1){this._focused&&this.layoutManager.setFocusedComponentItem(void 0,t)}setBlurred(t){this._focused=!1,this.tab.setBlurred(),t||this.emitBaseBubblingEvent(\"blur\")}setParent(t){this._parentItem=t,super.setParent(t)}handleUpdateItemConfigEvent(t){this.applyUpdatableConfig(t)}updateNodeSize(t){if(\"none\"!==this.element.style.display){const{width:e,height:i}=kt(this.element);this._container.setSizeToNodeSize(e,i,t)}}}class $t extends Gt{constructor(){super(...arguments),this._focused=!1}get focused(){return this._focused}setFocusedValue(t){this._focused=t}}class Zt extends Wt{constructor(t,e){super(),this._eElement=t,this._pointerTracking=!1,this._pointerDownEventListener=t=>this.onPointerDown(t),this._pointerMoveEventListener=t=>this.onPointerMove(t),this._pointerUpEventListener=t=>this.onPointerUp(t),this._timeout=void 0,this._allowableTargets=[t,...e],this._oDocument=document,this._eBody=document.body,this._nDelay=1800,this._nDistance=10,this._nX=0,this._nY=0,this._nOriginalX=0,this._nOriginalY=0,this._dragging=!1,this._eElement.addEventListener(\"pointerdown\",this._pointerDownEventListener,{passive:!0})}destroy(){this.checkRemovePointerTrackingEventListeners(),this._eElement.removeEventListener(\"pointerdown\",this._pointerDownEventListener)}cancelDrag(){this.processDragStop(void 0)}onPointerDown(t){if(this._allowableTargets.includes(t.target)&&t.isPrimary){const e=this.getPointerCoordinates(t);this.processPointerDown(e)}}processPointerDown(t){this._nOriginalX=t.x,this._nOriginalY=t.y,this._oDocument.addEventListener(\"pointermove\",this._pointerMoveEventListener),this._oDocument.addEventListener(\"pointerup\",this._pointerUpEventListener,{passive:!0}),this._pointerTracking=!0,this._timeout=setTimeout((()=>{try{this.startDrag()}catch(t){throw console.error(t),t}}),this._nDelay)}onPointerMove(t){this._pointerTracking&&(this.processDragMove(t),t.preventDefault())}processDragMove(t){this._nX=t.pageX-this._nOriginalX,this._nY=t.pageY-this._nOriginalY,!1===this._dragging&&(Math.abs(this._nX)>this._nDistance||Math.abs(this._nY)>this._nDistance)&&this.startDrag(),this._dragging&&this.emit(\"drag\",this._nX,this._nY,t)}onPointerUp(t){this.processDragStop(t)}processDragStop(t){var e;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this.checkRemovePointerTrackingEventListeners(),!0===this._dragging&&(this._eBody.classList.remove(\"lm_dragging\"),this._eElement.classList.remove(\"lm_dragging\"),null===(e=this._oDocument.querySelector(\"iframe\"))||void 0===e||e.style.setProperty(\"pointer-events\",\"\"),this._dragging=!1,this.emit(\"dragStop\",t))}checkRemovePointerTrackingEventListeners(){this._pointerTracking&&(this._oDocument.removeEventListener(\"pointermove\",this._pointerMoveEventListener),this._oDocument.removeEventListener(\"pointerup\",this._pointerUpEventListener),this._pointerTracking=!1)}startDrag(){var t;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this._dragging=!0,this._eBody.classList.add(\"lm_dragging\"),this._eElement.classList.add(\"lm_dragging\"),null===(t=this._oDocument.querySelector(\"iframe\"))||void 0===t||t.style.setProperty(\"pointer-events\",\"none\"),this.emit(\"dragStart\",this._nOriginalX,this._nOriginalY)}getPointerCoordinates(t){return{x:t.pageX,y:t.pageY}}}class qt{constructor(t,e,i){this._isVertical=t,this._size=e,this._grabSize=i0){const i=this.createSplitter(Math.max(0,e-1)).element;e>0?(this.contentItems[e-1].element.insertAdjacentElement(\"afterend\",i),i.insertAdjacentElement(\"afterend\",t.element)):(this.contentItems[0].element.insertAdjacentElement(\"beforebegin\",i),i.insertAdjacentElement(\"beforebegin\",t.element))}else this._childElementContainer.appendChild(t.element);super.addChild(t,e);const n=1/this.contentItems.length*100;if(!0===i)return this.emitBaseBubblingEvent(\"stateChanged\"),e;for(let e=0;e0&&(this.calculateRelativeSizes(),this.setAbsoluteSizes()),this.emitBaseBubblingEvent(\"stateChanged\"),this.emit(\"resize\")}setAbsoluteSizes(){const t=this.calculateAbsoluteSizes();for(let e=0;e0&&t.itemSizes[e]++,this._isColumn?(Tt(this.contentItems[e].element,t.crossAxisSize),At(this.contentItems[e].element,t.itemSizes[e])):(Tt(this.contentItems[e].element,t.itemSizes[e]),At(this.contentItems[e].element,t.crossAxisSize))}calculateAbsoluteSizes(){const t=(this.contentItems.length-1)*this._splitterSize,{width:e,height:i}=kt(this.element);let n,o;this._isColumn?(n=i-t,o=e):(n=e-t,o=i);let s=0;const r=[];for(let t=0;t0){const n=100-t;for(let t=0;t100&&e.length>0){for(let t=0;te)return;{const r=i/e;let a=i;for(let e=0;ethis.onSplitterDrag(e,t,i))),e.on(\"dragStop\",(()=>this.onSplitterDragStop(e))),e.on(\"dragStart\",(()=>this.onSplitterDragStart(e))),this._splitter.splice(t,0,e),e}getSplitItems(t){const e=this._splitter.indexOf(t);return{before:this.contentItems[e],after:this.contentItems[e+1]}}calculateContentItemMinSize(t){const e=t.minSize;if(void 0!==e){if(t.minSizeUnit===ht.Pixel)return e;throw new X(\"ROCGMD98831\",JSON.stringify(t))}{const t=this.layoutManager.layoutConfig.dimensions;return this._isColumn?t.defaultMinItemHeight:t.defaultMinItemWidth}}calculateContentItemsTotalMinSize(t){let e=0;for(const i of t)e+=this.calculateContentItemMinSize(i);return e}onSplitterDragStart(t){const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=this.calculateContentItemsTotalMinSize(e.before.contentItems),s=this.calculateContentItemsTotalMinSize(e.after.contentItems);this._splitterPosition=0,this._splitterMinPosition=-1*(i-o),this._splitterMaxPosition=n-s}onSplitterDrag(t,e,i){let n=this._isColumn?i:e;if(null===this._splitterMinPosition||null===this._splitterMaxPosition)throw new K(\"ROCOSD59226\");n=Math.max(n,this._splitterMinPosition),n=Math.min(n,this._splitterMaxPosition),this._splitterPosition=n;const o=zt(n);this._isColumn?t.element.style.top=o:t.element.style.left=o}onSplitterDragStop(t){if(null===this._splitterPosition)throw new K(\"ROCOSDS66932\");{const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=(this._splitterPosition+i)/(i+n),s=e.before.size+e.after.size;e.before.size=o*s,e.after.size=(1-o)*s,t.element.style.top=zt(0),t.element.style.left=zt(0),globalThis.requestAnimationFrame((()=>this.updateSize(!1)))}}}!function(t){t.getElementDimensionSize=function(t,e){return\"width\"===e?function(t){return t.offsetWidth}(t):function(t){return t.offsetHeight}(t)},t.setElementDimensionSize=function(t,e,i){return\"width\"===e?Tt(t,i):At(t,i)},t.createElement=function(t,e){const i=t.createElement(\"div\");return i.classList.add(\"lm_item\"),e?i.classList.add(\"lm_column\"):i.classList.add(\"lm_row\"),i}}(Xt||(Xt={}));class Yt extends $t{constructor(t,e,i){super(t,vt.create(e),null,Yt.createElement(document)),this.isGround=!0,this._childElementContainer=this.element,this._containerElement=i;let n=null;for(;;){const t=n?n.previousSibling:this._containerElement.lastChild;if(!(t instanceof Element&&t.classList.contains(\"lm_content\")))break;n=t}this._containerElement.insertBefore(this.element,n)}init(){if(!0!==this.isInitialised){this.updateNodeSize();for(let t=0;t0?this.contentItems[0]:this,n.isComponent)throw new Error(\"Cannot add item as child to ComponentItem\");{const t=this.layoutManager.createAndInitContentItem(i,n);return e=n.addChild(t,e),n===this?-1:e}}loadComponentAsRoot(t){this.clearRoot();const e=Ct.resolve(t,!1);if(e.maximised)throw new Error(\"Root Component cannot be maximised\");{const t=new jt(this.layoutManager,e,this);t.init(),this.addChild(t,0)}}addChild(t,e){if(this.contentItems.length>0)throw new Error(\"Ground node can only have a single child\");return this._childElementContainer.appendChild(t.element),e=super.addChild(t,e),this.updateSize(!1),this.emitBaseBubblingEvent(\"stateChanged\"),e}calculateConfigContent(){const t=this.contentItems,e=t.length,i=new Array(e);for(let n=0;n0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e)),this.updateContentItemsSize(!1))}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}createSideAreas(){const t=Yt.Area.oppositeSides,e=new Array(Object.keys(t).length);let i=0;for(const n in t){const o=n,s=this.getElementArea();if(null===s)throw new K(\"RCSA77553\");s.side=o,\"2\"===t[o][1]?s[o]=s[t[o]]-50:s[o]=s[t[o]]+50,s.surface=(s.x2-s.x1)*(s.y2-s.y1),e[i++]=s}return e}highlightDropZone(t,e,i){this.layoutManager.tabDropPlaceholder.remove(),super.highlightDropZone(t,e,i)}onDrop(t,e){if(t.isComponent){const e=ut.createDefault(),i=t;e.header=mt.Header.createCopy(i.headerConfig);const n=this.layoutManager.createAndInitContentItem(e,this);n.addChild(t),t=n}if(0===this.contentItems.length)this.addChild(t);else{if(t.type===at.row||t.type===at.column){const e=ut.createDefault(),i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}const i=\"x\"==e.side[0]?at.row:at.column,n=\"2\"==e.side[1],o=this.contentItems[0];if(o instanceof Xt&&o.type===i){const e=o.contentItems[n?0:o.contentItems.length-1];o.addChild(t,n?0:void 0,!0),e.size*=.5,t.size=e.size,t.sizeUnit=ht.Percent,o.updateSize(!1)}else{const e=ct.createDefault(i),s=this.layoutManager.createContentItem(e,this);this.replaceChild(o,s),s.addChild(t,n?0:void 0,!0),s.addChild(o,n?void 0:0,!0),o.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}}dock(){throw new X(\"GID87731\")}validateDocking(){throw new X(\"GIVD87732\")}getAllContentItems(){const t=[this];return this.deepGetAllContentItems(this.contentItems,t),t}getConfigMaximisedItems(){const t=[];return this.deepFilterContentItems(this.contentItems,t,(t=>!(!Gt.isStack(t)||!t.initialWantMaximise)||!(!Gt.isComponentItem(t)||!t.initialWantMaximise))),t}getItemsByPopInParentId(t){const e=[];return this.deepFilterContentItems(this.contentItems,e,(e=>e.popInParentIds.includes(t))),e}toConfig(){throw new Error(\"Cannot generate GroundItem config\")}setActiveComponentItem(t,e,i){}updateNodeSize(){const{width:t,height:e}=kt(this._containerElement);Tt(this.element,t),At(this.element,e),this.contentItems.length>0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e))}deepGetAllContentItems(t,e){for(let i=0;ithis.onClick(t),this._touchStartEventListener=t=>this.onTouchStart(t),this._element=document.createElement(\"div\"),this._element.classList.add(i),this._element.title=e,this._header.on(\"destroy\",(()=>this.destroy())),this._element.addEventListener(\"click\",this._clickEventListener,{passive:!0}),this._element.addEventListener(\"touchstart\",this._touchStartEventListener,{passive:!0}),this._header.controlsContainerElement.appendChild(this._element)}get element(){return this._element}destroy(){var t;this._element.removeEventListener(\"click\",this._clickEventListener),this._element.removeEventListener(\"touchstart\",this._touchStartEventListener),null===(t=this._element.parentNode)||void 0===t||t.removeChild(this._element)}onClick(t){this._pushEvent(t)}onTouchStart(t){this._pushEvent(t)}}class Jt{constructor(t,e,i,n,o){var s;this._layoutManager=t,this._componentItem=e,this._closeEvent=i,this._focusEvent=n,this._dragStartEvent=o,this._isActive=!1,this._tabClickListener=t=>this.onTabClickDown(t),this._tabTouchStartListener=t=>this.onTabTouchStart(t),this._closeClickListener=()=>this.onCloseClick(),this._closeTouchStartListener=()=>this.onCloseTouchStart(),this._dragStartListener=(t,e)=>this.onDragStart(t,e),this._contentItemDestroyListener=()=>this.onContentItemDestroy(),this._tabTitleChangedListener=t=>this.setTitle(t),this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_tab\"),this._titleElement=document.createElement(\"span\"),this._titleElement.classList.add(\"lm_title\"),this._closeElement=document.createElement(\"div\"),this._closeElement.classList.add(\"lm_close_tab\"),this._element.appendChild(this._titleElement),this._element.appendChild(this._closeElement),e.isClosable?this._closeElement.style.display=\"\":this._closeElement.style.display=\"none\",this.setTitle(e.title),this._componentItem.on(\"titleChanged\",this._tabTitleChangedListener);(null!==(s=e.reorderEnabled)&&void 0!==s?s:this._layoutManager.layoutConfig.settings.reorderEnabled)&&this.enableReorder(),this._element.addEventListener(\"click\",this._tabClickListener,{passive:!0}),this._element.addEventListener(\"touchstart\",this._tabTouchStartListener,{passive:!0}),this._componentItem.isClosable?(this._closeElement.addEventListener(\"click\",this._closeClickListener,{passive:!0}),this._closeElement.addEventListener(\"touchstart\",this._closeTouchStartListener,{passive:!0})):(this._closeElement.remove(),this._closeElement=void 0),this._componentItem.setTab(this),this._layoutManager.emit(\"tabCreated\",this)}get isActive(){return this._isActive}get componentItem(){return this._componentItem}get contentItem(){return this._componentItem}get element(){return this._element}get titleElement(){return this._titleElement}get closeElement(){return this._closeElement}get reorderEnabled(){return void 0!==this._dragListener}set reorderEnabled(t){t!==this.reorderEnabled&&(t?this.enableReorder():this.disableReorder())}setTitle(t){this._titleElement.innerText=t,this._element.title=t}setActive(t){t!==this._isActive&&(this._isActive=t,t?this._element.classList.add(\"lm_active\"):this._element.classList.remove(\"lm_active\"))}destroy(){var t,e;this._closeEvent=void 0,this._focusEvent=void 0,this._dragStartEvent=void 0,this._element.removeEventListener(\"click\",this._tabClickListener),this._element.removeEventListener(\"touchstart\",this._tabTouchStartListener),null===(t=this._closeElement)||void 0===t||t.removeEventListener(\"click\",this._closeClickListener),null===(e=this._closeElement)||void 0===e||e.removeEventListener(\"touchstart\",this._closeTouchStartListener),this._componentItem.off(\"titleChanged\",this._tabTitleChangedListener),this.reorderEnabled&&this.disableReorder(),this._element.remove()}setBlurred(){this._element.classList.remove(\"lm_focused\"),this._titleElement.classList.remove(\"lm_focused\")}setFocused(){this._element.classList.add(\"lm_focused\"),this._titleElement.classList.add(\"lm_focused\")}onDragStart(t,e){if(void 0===this._dragListener)throw new J(\"TODSDLU10093\");if(void 0===this._dragStartEvent)throw new J(\"TODS23309\");this._dragStartEvent(t,e,this._dragListener,this.componentItem)}onContentItemDestroy(){void 0!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=void 0)}onTabClickDown(t){const e=t.target;e!==this._element&&e!==this._titleElement||(0===t.button?this.notifyFocus():1===t.button&&this._componentItem.isClosable&&this.notifyClose())}onTabTouchStart(t){t.target===this._element&&this.notifyFocus()}onCloseClick(){this.notifyClose()}onCloseTouchStart(){this.notifyClose()}notifyClose(){if(void 0===this._closeEvent)throw new J(\"TNC15007\");this._closeEvent(this._componentItem)}notifyFocus(){if(void 0===this._focusEvent)throw new J(\"TNA15007\");this._focusEvent(this._componentItem)}enableReorder(){this._dragListener=new Zt(this._element,[this._titleElement]),this._dragListener.on(\"dragStart\",this._dragStartListener),this._componentItem.on(\"destroy\",this._contentItemDestroyListener)}disableReorder(){if(void 0===this._dragListener)throw new J(\"TDR87745\");this._componentItem.off(\"destroy\",this._contentItemDestroyListener),this._dragListener.off(\"dragStart\",this._dragStartListener),this._dragListener=void 0}}class Qt{constructor(t,e,i,n,o){this._layoutManager=t,this._componentRemoveEvent=e,this._componentFocusEvent=i,this._componentDragStartEvent=n,this._dropdownActiveChangedEvent=o,this._tabs=[],this._lastVisibleTabIndex=-1,this._dropdownActive=!1,this._element=document.createElement(\"section\"),this._element.classList.add(\"lm_tabs\"),this._dropdownElement=document.createElement(\"section\"),this._dropdownElement.classList.add(\"lm_tabdropdown_list\"),this._dropdownElement.style.display=\"none\"}get tabs(){return this._tabs}get tabCount(){return this._tabs.length}get lastVisibleTabIndex(){return this._lastVisibleTabIndex}get element(){return this._element}get dropdownElement(){return this._dropdownElement}get dropdownActive(){return this._dropdownActive}destroy(){for(let t=0;tthis.handleTabCloseEvent(t)),(t=>this.handleTabFocusEvent(t)),((t,e,i,n)=>this.handleTabDragStartEvent(t,e,i,n)));void 0===e&&(e=this._tabs.length),this._tabs.splice(e,0,i),ethis._lastVisibleTabIndex){const t=this._tabs[e];for(let t=e;t>0;t--)this._tabs[t]=this._tabs[t-1];this._tabs[0]=t}}updateTabSizes(t,e){let i=!1;this.tryUpdateTabSizes(i,t,e)||(i=!0,this.tryUpdateTabSizes(i,t,e)),i!==this._dropdownActive&&(this._dropdownActive=i,this._dropdownActiveChangedEvent())}tryUpdateTabSizes(t,e,i){if(this._tabs.length>0){if(void 0===i)throw new Error(\"non-empty tabs must have active component item\");let n=0,o=!1;const s=this._layoutManager.layoutConfig.settings.tabOverlapAllowance,r=this._tabs.indexOf(i.tab),a=this._tabs[r];this._lastVisibleTabIndex=-1;for(let i=0;ie){if(o)i===r&&(l.style.zIndex=\"auto\",l.style.marginLeft=\"\",l.parentElement!==this._element&&this._element.appendChild(l));else{let t;if(t=r>0&&r<=i?(d-e)/(i-1):(d-e)/i,tthis.onClick(t),this._touchStartListener=t=>this.onTouchStart(t),this._rowColumnClosable=!0,this._closeButton=null,this._popoutButton=null,this._tabsContainer=new Qt(this._layoutManager,(t=>this.handleTabInitiatedComponentRemoveEvent(t)),(t=>this.handleTabInitiatedComponentFocusEvent(t)),((t,e,i,n)=>this.handleTabInitiatedDragStartEvent(t,e,i,n)),(()=>this.processTabDropdownActiveChanged())),this._show=i.show,this._popoutEnabled=i.popoutEnabled,this._popoutLabel=i.popoutLabel,this._maximiseEnabled=i.maximiseEnabled,this._maximiseLabel=i.maximiseLabel,this._minimiseEnabled=i.minimiseEnabled,this._minimiseLabel=i.minimiseLabel,this._closeEnabled=i.closeEnabled,this._closeLabel=i.closeLabel,this._tabDropdownEnabled=i.tabDropdownEnabled,this._tabDropdownLabel=i.tabDropdownLabel,this.setSide(i.side),this._canRemoveComponent=this._configClosable,this._element=document.createElement(\"section\"),this._element.classList.add(\"lm_header\"),this._controlsContainerElement=document.createElement(\"section\"),this._controlsContainerElement.classList.add(\"lm_controls\"),this._element.appendChild(this._tabsContainer.element),this._element.appendChild(this._controlsContainerElement),this._element.appendChild(this._tabsContainer.dropdownElement),this._element.addEventListener(\"click\",this._clickListener,{passive:!0}),this._element.addEventListener(\"touchstart\",this._touchStartListener,{passive:!0}),this._documentMouseUpListener=()=>this._tabsContainer.hideAdditionalTabsDropdown(),globalThis.document.addEventListener(\"mouseup\",this._documentMouseUpListener,{passive:!0}),this._tabControlOffset=this._layoutManager.layoutConfig.settings.tabControlOffset,this._tabDropdownEnabled&&(this._tabDropdownButton=new Kt(this,this._tabDropdownLabel,\"lm_tabdropdown\",(()=>this._tabsContainer.showAdditionalTabsDropdown()))),this._popoutEnabled&&(this._popoutButton=new Kt(this,this._popoutLabel,\"lm_popout\",(()=>this.handleButtonPopoutEvent()))),this._maximiseEnabled&&(this._maximiseButton=new Kt(this,this._maximiseLabel,\"lm_maximise\",(t=>this.handleButtonMaximiseToggleEvent(t)))),this._configClosable&&(this._closeButton=new Kt(this,this._closeLabel,\"lm_close\",(()=>s()))),this.processTabDropdownActiveChanged()}get show(){return this._show}get side(){return this._side}get leftRightSided(){return this._leftRightSided}get layoutManager(){return this._layoutManager}get parent(){return this._parent}get tabs(){return this._tabsContainer.tabs}get lastVisibleTabIndex(){return this._tabsContainer.lastVisibleTabIndex}get element(){return this._element}get tabsContainerElement(){return this._tabsContainer.element}get controlsContainerElement(){return this._controlsContainerElement}destroy(){this.emit(\"destroy\"),this._popoutEvent=void 0,this._maximiseToggleEvent=void 0,this._clickEvent=void 0,this._touchStartEvent=void 0,this._componentRemoveEvent=void 0,this._componentFocusEvent=void 0,this._componentDragStartEvent=void 0,this._tabsContainer.destroy(),globalThis.document.removeEventListener(\"mouseup\",this._documentMouseUpListener),this._element.remove()}createTab(t,e){this._tabsContainer.createTab(t,e)}removeTab(t){this._tabsContainer.removeTab(t)}processActiveComponentChanged(t){this._tabsContainer.processActiveComponentChanged(t),this.updateTabSizes()}setSide(t){this._side=t,this._leftRightSided=[nt.right,nt.left].includes(this._side)}setRowColumnClosable(t){this._rowColumnClosable=t,this.updateClosability()}updateClosability(){let t;if(this._configClosable)if(this._rowColumnClosable){t=!0;const e=this.tabs.length;for(let i=0;i1}applyFocusedValue(t){t?this._element.classList.add(\"lm_focused\"):this._element.classList.remove(\"lm_focused\")}processMaximised(){if(void 0===this._maximiseButton)throw new J(\"HPMAX16997\");this._maximiseButton.element.setAttribute(\"title\",this._minimiseLabel)}processMinimised(){if(void 0===this._maximiseButton)throw new J(\"HPMIN16997\");this._maximiseButton.element.setAttribute(\"title\",this._maximiseLabel)}updateTabSizes(){if(this._tabsContainer.tabCount>0){const t=this._show?this._layoutManager.layoutConfig.dimensions.headerHeight:0;let e;this._leftRightSided?(this._element.style.height=\"\",this._element.style.width=zt(t)):(this._element.style.width=\"\",this._element.style.height=zt(t)),e=this._leftRightSided?this._element.offsetHeight-this._controlsContainerElement.offsetHeight-this._tabControlOffset:this._element.offsetWidth-this._controlsContainerElement.offsetWidth-this._tabControlOffset,this._tabsContainer.updateTabSizes(e,this._getActiveComponentItemEvent())}}handleTabInitiatedComponentRemoveEvent(t){if(this._canRemoveComponent){if(void 0===this._componentRemoveEvent)throw new J(\"HHTCE22294\");this._componentRemoveEvent(t)}}handleTabInitiatedComponentFocusEvent(t){if(void 0===this._componentFocusEvent)throw new J(\"HHTAE22294\");this._componentFocusEvent(t)}handleTabInitiatedDragStartEvent(t,e,i,n){if(this._canRemoveComponent){if(void 0===this._componentDragStartEvent)throw new J(\"HHTDSE22294\");this._componentDragStartEvent(t,e,i,n)}else i.cancelDrag()}processTabDropdownActiveChanged(){void 0!==this._tabDropdownButton&&Dt(this._tabDropdownButton.element,this._tabsContainer.dropdownActive)}handleButtonPopoutEvent(){if(this._layoutManager.layoutConfig.settings.popoutWholeStack){if(void 0===this._popoutEvent)throw new J(\"HHBPOE17834\");this._popoutEvent()}else{const t=this._getActiveComponentItemEvent();t&&t.popout()}}handleButtonMaximiseToggleEvent(t){if(void 0===this._maximiseToggleEvent)throw new J(\"HHBMTE16834\");this._maximiseToggleEvent()}onClick(t){t.target===this._element&&this.notifyClick(t)}onTouchStart(t){t.target===this._element&&this.notifyTouchStart(t)}notifyClick(t){if(void 0===this._clickEvent)throw new J(\"HNHC46834\");this._clickEvent(t)}notifyTouchStart(t){if(void 0===this._touchStartEvent)throw new J(\"HNHTS46834\");this._touchStartEvent(t)}}class ee extends $t{constructor(t,e,i){var n,o,s,r,a,l,h,d,c,m,u,p,g,f,v,_,y,C,w;super(t,e,i,ee.createElement(document)),this._headerSideChanged=!1,this._resizeListener=()=>this.handleResize(),this._maximisedListener=()=>this.handleMaximised(),this._minimisedListener=()=>this.handleMinimised(),this._headerConfig=e.header;const I=t.layoutConfig.header,b=e.content;let S;if(1!==b.length)S=void 0;else{S=b[0].header}this._initialWantMaximise=e.maximised,this._initialActiveItemIndex=null!==(n=e.activeItemIndex)&&void 0!==n?n:0;const E=null!==(r=null!==(s=null===(o=this._headerConfig)||void 0===o?void 0:o.show)&&void 0!==s?s:null==S?void 0:S.show)&&void 0!==r?r:I.show,x=null!==(h=null!==(l=null===(a=this._headerConfig)||void 0===a?void 0:a.popout)&&void 0!==l?l:null==S?void 0:S.popout)&&void 0!==h?h:I.popout,L=null!==(m=null!==(c=null===(d=this._headerConfig)||void 0===d?void 0:d.maximise)&&void 0!==c?c:null==S?void 0:S.maximise)&&void 0!==m?m:I.maximise,z=null!==(g=null!==(p=null===(u=this._headerConfig)||void 0===u?void 0:u.close)&&void 0!==p?p:null==S?void 0:S.close)&&void 0!==g?g:I.close,M=null!==(_=null!==(v=null===(f=this._headerConfig)||void 0===f?void 0:f.minimise)&&void 0!==v?v:null==S?void 0:S.minimise)&&void 0!==_?_:I.minimise,P=null!==(w=null!==(C=null===(y=this._headerConfig)||void 0===y?void 0:y.tabDropdown)&&void 0!==C?C:null==S?void 0:S.tabDropdown)&&void 0!==w?w:I.tabDropdown;this._maximisedEnabled=!1!==L;const T={show:!1!==E,side:!1===E?nt.top:E,popoutEnabled:!1!==x,popoutLabel:!1===x?\"\":x,maximiseEnabled:this._maximisedEnabled,maximiseLabel:!1===L?\"\":L,closeEnabled:!1!==z,closeLabel:!1===z?\"\":z,minimiseEnabled:!0,minimiseLabel:M,tabDropdownEnabled:!1!==P,tabDropdownLabel:!1===P?\"\":P};this._header=new te(t,this,T,e.isClosable&&!1!==z,(()=>this.getActiveComponentItem()),(()=>this.remove()),(()=>this.handlePopoutEvent()),(()=>this.toggleMaximise()),(t=>this.handleHeaderClickEvent(t)),(t=>this.handleHeaderTouchStartEvent(t)),(t=>this.handleHeaderComponentRemoveEvent(t)),(t=>this.handleHeaderComponentFocusEvent(t)),((t,e,i,n)=>this.handleHeaderComponentStartDragEvent(t,e,i,n))),this.isStack=!0,this._childElementContainer=document.createElement(\"section\"),this._childElementContainer.classList.add(\"lm_items\"),this.on(\"resize\",this._resizeListener),this._maximisedEnabled&&(this.on(\"maximised\",this._maximisedListener),this.on(\"minimised\",this._minimisedListener)),this.element.appendChild(this._header.element),this.element.appendChild(this._childElementContainer),this.setupHeaderPosition(),this._header.updateClosability()}get childElementContainer(){return this._childElementContainer}get header(){return this._header}get headerShow(){return this._header.show}get headerSide(){return this._header.side}get headerLeftRightSided(){return this._header.leftRightSided}get contentAreaDimensions(){return this._contentAreaDimensions}get initialWantMaximise(){return this._initialWantMaximise}get isMaximised(){return this===this.layoutManager.maximisedStack}get stackParent(){if(!this.parent)throw new Error(\"Stack should always have a parent\");return this.parent}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}init(){if(!0===this.isInitialised)return;this.updateNodeSize();for(let t=0;t0){if(this._initialActiveItemIndex<0||this._initialActiveItemIndex>=e)throw new Error(`ActiveItemIndex out of range: ${this._initialActiveItemIndex} id: ${this.id}`);for(let i=0;ithis.contentItems.length)throw e-=1,new X(\"SAC99728\");if(t instanceof jt)return e=super.addChild(t,e),this._childElementContainer.appendChild(t.element),this._header.createTab(t,e),this.setActiveComponentItem(t,i),this._header.updateTabSizes(),this.updateSize(!1),t.container.setBaseLogicalZIndex(),this._header.updateClosability(),this.emitStateChangedEvent(),e;throw new X(\"SACC88532\")}removeChild(t,e){const i=t,n=this.contentItems.indexOf(i),o=1===this.contentItems.length;if(this._activeComponentItem===i&&(i.focused&&i.blur(),!o)){const t=0===n?1:n-1;this.setActiveComponentItem(this.contentItems[t],!1)}this._header.removeTab(i),super.removeChild(i,e),o||this._header.updateClosability(),this.emitStateChangedEvent()}toggleMaximise(){this.isMaximised?this.minimise():this.maximise()}maximise(){if(!this.isMaximised){this.layoutManager.setMaximisedStack(this);const t=this.contentItems,e=t.length;for(let i=0;i0&&void 0===t)throw new Error(\"expected non-empty stack to have an active component item\");return{type:\"stack\",content:this.calculateConfigContent(),size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,isClosable:this.isClosable,maximised:this.isMaximised,header:this.createHeaderConfig(),activeItemIndex:t}}onDrop(t,e){if(\"header\"===this._dropSegment){if(this.resetHeaderDropZone(),void 0===this._dropIndex)throw new J(\"SODDI68990\");return void this.addChild(t,this._dropIndex)}if(\"body\"===this._dropSegment)return void this.addChild(t,0,!0);const i=\"top\"===this._dropSegment||\"bottom\"===this._dropSegment,n=\"left\"===this._dropSegment||\"right\"===this._dropSegment,o=\"top\"===this._dropSegment||\"left\"===this._dropSegment,s=i&&this.stackParent.isColumn||n&&this.stackParent.isRow;if(t.isComponent){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createAndInitContentItem(e,this);i.addChild(t),t=i}if(t.type===at.row||t.type===at.column){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}if(s){const e=this.stackParent.contentItems.indexOf(this);this.stackParent.addChild(t,o?e:e+1,!0),this.size*=.5,t.size=this.size,t.sizeUnit=this.sizeUnit,this.stackParent.updateSize(!1)}else{const e=i?at.column:at.row,n=ct.createDefault(e),s=this.layoutManager.createContentItem(n,this);this.stackParent.replaceChild(this,s),s.addChild(t,o?0:void 0,!0),s.addChild(this,o?void 0:0,!0),this.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}highlightDropZone(t,e){for(const i in this._contentAreaDimensions){const n=i,o=this._contentAreaDimensions[n].hoverArea;if(o.x1t&&o.y1e)return void(\"header\"===n?(this._dropSegment=\"header\",this.highlightHeaderDropZone(this._header.leftRightSided?e:t)):(this.resetHeaderDropZone(),this.highlightBodyDropZone(n)))}}getArea(){if(\"none\"===this.element.style.display)return null;const t=super.getElementArea(this._header.element),e=super.getElementArea(this._childElementContainer);if(null===t||null===e)throw new K(\"SGAHC13086\");const i=e.x2-e.x1,n=e.y2-e.y1;return this._contentAreaDimensions={header:{hoverArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2},highlightArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2}}},0===this.contentItems.length?(this._contentAreaDimensions.body={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2}},super.getElementArea(this.element)):(this._contentAreaDimensions.left={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x1+.25*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x1+.5*i,y2:e.y2}},this._contentAreaDimensions.top={hoverArea:{x1:e.x1+.25*i,y1:e.y1,x2:e.x1+.75*i,y2:e.y1+.5*n},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y1+.5*n}},this._contentAreaDimensions.right={hoverArea:{x1:e.x1+.75*i,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1+.5*i,y1:e.y1,x2:e.x2,y2:e.y2}},this._contentAreaDimensions.bottom={hoverArea:{x1:e.x1+.25*i,y1:e.y1+.5*n,x2:e.x1+.75*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1+.5*n,x2:e.x2,y2:e.y2}},super.getElementArea(this.element))}positionHeader(t){this._header.side!==t&&(this._header.setSide(t),this._headerSideChanged=!0,this.setupHeaderPosition())}updateNodeSize(){if(\"none\"!==this.element.style.display){const t=kt(this.element);if(this._header.show){t[this._header.leftRightSided?it.width:it.height]-=this.layoutManager.layoutConfig.dimensions.headerHeight}this._childElementContainer.style.width=zt(t.width),this._childElementContainer.style.height=zt(t.height);for(let e=0;e=o&&tthis.onDrag(t,e,i))),this._dragListener.on(\"dragStop\",(()=>this.onDrop())),this.createDragProxyElements(t,e),null===this._componentItem.parent)throw new K(\"DPC10097\");this._componentItemFocused=this._componentItem.focused,this._componentItemFocused&&this._componentItem.blur(),this._componentItem.parent.removeChild(this._componentItem,!0),this.setDimensions(),document.body.appendChild(this._element),this.determineMinMaxXY(),this._layoutManager.calculateItemAreas(),this.setDropPosition(t,e)}get element(){return this._element}createDragProxyElements(t,e){this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_dragProxy\");const i=document.createElement(\"div\");i.classList.add(\"lm_header\");const n=document.createElement(\"div\");n.classList.add(\"lm_tabs\");const o=document.createElement(\"div\");o.classList.add(\"lm_tab\");const s=document.createElement(\"span\");s.classList.add(\"lm_title\"),o.appendChild(s),n.appendChild(o),i.appendChild(n),this._proxyContainerElement=document.createElement(\"div\"),this._proxyContainerElement.classList.add(\"lm_content\"),this._element.appendChild(i),this._element.appendChild(this._proxyContainerElement),this._originalParent instanceof ee&&this._originalParent.headerShow&&(this._sided=this._originalParent.headerLeftRightSided,this._element.classList.add(\"lm_\"+this._originalParent.headerSide),[nt.right,nt.bottom].indexOf(this._originalParent.headerSide)>=0&&this._proxyContainerElement.insertAdjacentElement(\"afterend\",i)),this._element.style.left=zt(t),this._element.style.top=zt(e),o.setAttribute(\"title\",this._componentItem.title),s.insertAdjacentText(\"afterbegin\",this._componentItem.title),this._proxyContainerElement.appendChild(this._componentItem.element)}determineMinMaxXY(){const t=this._layoutManager.groundItem;if(void 0===t)throw new J(\"DPDMMXY73109\");{const e=t.element.getBoundingClientRect();this._minX=e.left+document.body.scrollLeft,this._minY=e.top+document.body.scrollTop,this._maxX=this._minX+e.width,this._maxY=this._minY+e.height}}onDrag(t,e,i){const n=i.pageX,o=i.pageY;this.setDropPosition(n,o),this._componentItem.drag()}setDropPosition(t,e){this._layoutManager.layoutConfig.settings.constrainDragToContainer&&(t<=this._minX?t=Math.ceil(this._minX):t>=this._maxX&&(t=Math.floor(this._maxX)),e<=this._minY?e=Math.ceil(this._minY):e>=this._maxY&&(e=Math.floor(this._maxY))),this._element.style.left=zt(t),this._element.style.top=zt(e),this._area=this._layoutManager.getArea(t,e),null!==this._area&&(this._lastValidArea=this._area,this._area.contentItem.highlightDropZone(t,e,this._area))}onDrop(){const t=this._layoutManager.dropTargetIndicator;if(null===t)throw new K(\"DPOD30011\");let e;if(t.hide(),this._componentItem.exitDragMode(),null!==this._area)e=this._componentItem,this._area.contentItem.onDrop(e,this._area);else if(null!==this._lastValidArea){e=this._componentItem;this._lastValidArea.contentItem.onDrop(e,this._lastValidArea)}else this._originalParent?(e=this._componentItem,this._originalParent.addChild(e)):this._componentItem.destroy();this._element.remove(),this._layoutManager.emit(\"itemDropped\",this._componentItem),this._componentItemFocused&&void 0!==e&&e.focus()}setDimensions(){const t=this._layoutManager.layoutConfig.dimensions;if(void 0===t)throw new Error(\"DragProxy.setDimensions: dimensions undefined\");let e=t.dragProxyWidth,i=t.dragProxyHeight;if(void 0===e||void 0===i)throw new Error(\"DragProxy.setDimensions: width and/or height undefined\");const n=!1===this._layoutManager.layoutConfig.header.show?0:t.headerHeight;this._element.style.width=zt(e),this._element.style.height=zt(i),e-=this._sided?n:0,i-=this._sided?0:n,this._proxyContainerElement.style.width=zt(e),this._proxyContainerElement.style.height=zt(i),this._componentItem.enterDragMode(e,i),this._componentItem.show()}}class ne{constructor(t,e,i,n,o,s,r){this._layoutManager=t,this._element=e,this._extraAllowableChildTargets=i,this._componentTypeOrFtn=n,this._componentState=o,this._title=s,this._id=r,this._dragListener=null,this._dummyGroundContainer=document.createElement(\"div\");const a=gt.createDefault(\"row\");this._dummyGroundContentItem=new Yt(this._layoutManager,a,this._dummyGroundContainer),this.createDragListener()}destroy(){this.removeDragListener()}createDragListener(){this.removeDragListener(),this._dragListener=new Zt(this._element,this._extraAllowableChildTargets),this._dragListener.on(\"dragStart\",((t,e)=>this.onDragStart(t,e))),this._dragListener.on(\"dragStop\",(()=>this.onDragStop()))}onDragStart(t,e){var i;const n=\"component\";let o;if(\"function\"==typeof this._componentTypeOrFtn){const t=this._componentTypeOrFtn();o=ne.isDragSourceComponentItemConfig(t)?{type:n,componentState:t.state,componentType:t.type,title:null!==(i=t.title)&&void 0!==i?i:this._title}:t}else o={type:n,componentState:this._componentState,componentType:this._componentTypeOrFtn,title:this._title,id:this._id};const s=bt.resolve(o,!1),r=new jt(this._layoutManager,s,this._dummyGroundContentItem);if(this._dummyGroundContentItem.contentItems.push(r),null===this._dragListener)throw new K(\"DSODSD66746\");{const i=new ie(t,e,this._dragListener,this._layoutManager,r,this._dummyGroundContentItem),n=this._layoutManager.transitionIndicator;if(null===n)throw new K(\"DSODST66746\");n.transitionElements(this._element,i.element)}}onDragStop(){this.createDragListener()}removeDragListener(){null!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=null)}}!function(t){t.isDragSourceComponentItemConfig=function(t){return!(\"componentType\"in t)}}(ne||(ne={}));class oe{constructor(){this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_dropTargetIndicator\");const t=document.createElement(\"div\");t.classList.add(\"lm_inner\"),this._element.appendChild(t),document.body.appendChild(this._element)}destroy(){this._element.remove()}highlightArea(t,e){this._element.style.left=zt(t.x1+e),this._element.style.top=zt(t.y1+e),this._element.style.width=zt(t.x2-t.x1-e),this._element.style.height=zt(t.y2-t.y1-e),this._element.style.display=\"block\"}hide(){Dt(this._element,!1)}}class se{constructor(){this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_transition_indicator\"),document.body.appendChild(this._element),this._toElement=null,this._fromDimensions=null,this._totalAnimationDuration=200,this._animationStartTime=null}destroy(){this._element.remove()}transitionElements(t,e){}nextAnimationFrame(){}measure(t){const e=t.getBoundingClientRect();return{left:e.left,top:e.top,width:t.offsetWidth,height:t.offsetHeight}}}class re extends Wt{constructor(t){super(),this._layoutManager=t,this._childEventListener=t=>this.onEventFromChild(t),globalThis.addEventListener(re.ChildEventName,this._childEventListener,{passive:!0})}emit(t,...e){\"userBroadcast\"===t?this.emitUserBroadcast(...e):super.emit(t,...e)}emitUserBroadcast(...t){this.handleUserBroadcastEvent(\"userBroadcast\",t)}destroy(){globalThis.removeEventListener(re.ChildEventName,this._childEventListener)}handleUserBroadcastEvent(t,e){this._layoutManager.isSubWindow?this.propagateToParent(t,e):this.propagateToThisAndSubtree(t,e)}onEventFromChild(t){const e=t.detail;this.handleUserBroadcastEvent(e.eventName,e.args)}propagateToParent(t,e){const i={bubbles:!0,cancelable:!0,detail:{layoutManager:this._layoutManager,eventName:t,args:e}},n=new CustomEvent(re.ChildEventName,i),o=globalThis.opener;if(null===o)throw new K(\"EHPTP15778\");o.dispatchEvent(n)}propagateToThisAndSubtree(t,e){this.emitUnknown(t,...e);for(let i=0;ithis.handleContainerResize())),this._windowBeforeUnloadListener=()=>this.onBeforeUnload(),this._windowBeforeUnloadListening=!1,this._maximisedStackBeforeDestroyedListener=t=>this.cleanupBeforeMaximisedStackDestroyed(t),this.isSubWindow=t.isSubWindow,this._constructorOrSubWindowLayoutConfig=t.constructorOrSubWindowLayoutConfig,Q.checkInitialise(),dt.checkInitialise(),void 0!==t.containerElement&&(this._containerElement=t.containerElement)}get container(){return this._containerElement}get isInitialised(){return this._isInitialised}get groundItem(){return this._groundItem}get root(){return this._groundItem}get openPopouts(){return this._openPopouts}get dropTargetIndicator(){return this._dropTargetIndicator}get transitionIndicator(){return this._transitionIndicator}get width(){return this._width}get height(){return this._height}get eventHub(){return this._eventHub}get rootItem(){if(void 0===this._groundItem)throw new Error(\"Cannot access rootItem before init\");return 0===this._groundItem.contentItems.length?void 0:this._groundItem.contentItems[0]}get focusedComponentItem(){return this._focusedComponentItem}get tabDropPlaceholder(){return this._tabDropPlaceholder}get maximisedStack(){return this._maximisedStack}get deprecatedConstructor(){return!this.isSubWindow&&void 0!==this._constructorOrSubWindowLayoutConfig}destroy(){if(this._isInitialised){this._windowBeforeUnloadListening&&(globalThis.removeEventListener(\"beforeunload\",this._windowBeforeUnloadListener),this._windowBeforeUnloadListening=!1),!0===this.layoutConfig.settings.closePopoutsOnUnload&&this.closeAllOpenPopouts(),this._resizeObserver.disconnect(),this.checkClearResizeTimeout(),void 0!==this._groundItem&&this._groundItem.destroy(),this._tabDropPlaceholder.remove(),null!==this._dropTargetIndicator&&this._dropTargetIndicator.destroy(),null!==this._transitionIndicator&&this._transitionIndicator.destroy(),this._eventHub.destroy();for(const t of this._dragSources)t.destroy();this._dragSources=[],this._isInitialised=!1}}minifyConfig(t){return _t.minifyConfig(t)}unminifyConfig(t){return _t.unminifyConfig(t)}init(){let t;if(this.setContainer(),this._dropTargetIndicator=new oe,this._transitionIndicator=new se,this.updateSizeFromContainer(),this.isSubWindow){if(void 0===this._constructorOrSubWindowLayoutConfig)throw new J(\"LMIU07155\");{const e=this._constructorOrSubWindowLayoutConfig.root;if(void 0===e)throw new X(\"LMIC07156\");if(!Ct.isComponent(e))throw new X(\"LMIC07157\");t=e;const i=xt.resolve(this._constructorOrSubWindowLayoutConfig);this.layoutConfig=Object.assign(Object.assign({},i),{root:void 0})}}else void 0===this._constructorOrSubWindowLayoutConfig?this.layoutConfig=_t.createDefault():this.layoutConfig=xt.resolve(this._constructorOrSubWindowLayoutConfig);const e=this.layoutConfig;this._groundItem=new Yt(this,e.root,this._containerElement),this._groundItem.init(),this.checkLoadedLayoutMaximiseItem(),this._resizeObserver.observe(this._containerElement),this._isInitialised=!0,this.adjustColumnsResponsive(),this.emit(\"initialised\"),void 0!==t&&this.loadComponentAsRoot(t)}loadLayout(t){if(!this.isInitialised)throw new Error(\"GoldenLayout: Need to call init() if LayoutConfig with defined root passed to constructor\");if(void 0===this._groundItem)throw new J(\"LMLL11119\");this.createSubWindows(),this.layoutConfig=xt.resolve(t),this._groundItem.loadRoot(this.layoutConfig.root),this.checkLoadedLayoutMaximiseItem(),this.adjustColumnsResponsive()}saveLayout(){if(!1===this._isInitialised)throw new Error(\"Can't create config, layout not yet initialised\");if(void 0===this._groundItem)throw new J(\"LMTC18244\");{const t=this._groundItem.calculateConfigContent();let e;e=1!==t.length?void 0:t[0],this.reconcilePopoutWindows();const i=[];for(let t=0;t=0?n=this._groundItem.contentItems[0]:e=0;break;case at.row:case at.column:e=n.addItem(t,i.index);break;case at.stack:if(Ct.isComponent(t)){e=n.addItem(t,i.index);break}throw Error(tt[6]);case at.component:throw new X(\"LMAIALC87444602\");default:throw new Y(\"LMAIALU98881733\",n.type)}if(Ct.isComponent(t)){const t=n.contentItems[e];Gt.isStack(t)&&(n=t,e=0)}return i.parentItem=n,i.index=e,i}}}loadComponentAsRoot(t){if(void 0===this._groundItem)throw new Error(\"Cannot add item before init\");this._groundItem.loadComponentAsRoot(t)}updateSize(t,e){this.setSize(t,e)}setSize(t,e){if(this._width=t,this._height=e,!0===this._isInitialised){if(void 0===this._groundItem)throw new J(\"LMUS18881\");if(this._groundItem.setSize(this._width,this._height),this._maximisedStack){const{width:t,height:e}=kt(this._containerElement);Tt(this._maximisedStack.element,t),At(this._maximisedStack.element,e),this._maximisedStack.updateSize(!1)}this.adjustColumnsResponsive()}}beginSizeInvalidation(){this._sizeInvalidationBeginCount++}endSizeInvalidation(){0==--this._sizeInvalidationBeginCount&&this.updateSizeFromContainer()}updateSizeFromContainer(){const{width:t,height:e}=kt(this._containerElement);this.setSize(t,e)}updateRootSize(t=!1){if(void 0===this._groundItem)throw new J(\"LMURS28881\");this._groundItem.updateSize(t)}createAndInitContentItem(t,e){const i=this.createContentItem(t,e);return i.init(),i}createContentItem(t,e){if(\"string\"!=typeof t.type)throw new G(\"Missing parameter 'type'\",JSON.stringify(t));if(ct.isComponentItem(t)&&!(e instanceof ee)&&e&&!(!0===this.isSubWindow&&e instanceof Yt)){t={type:at.stack,content:[t],size:t.size,sizeUnit:t.sizeUnit,minSize:t.minSize,minSizeUnit:t.minSizeUnit,id:t.id,maximised:t.maximised,isClosable:t.isClosable,activeItemIndex:0,header:void 0}}return this.createContentItemFromConfig(t,e)}findFirstComponentItemById(t){if(void 0===this._groundItem)throw new J(\"LMFFCIBI82446\");return this.findFirstContentItemTypeByIdRecursive(at.component,t,this._groundItem)}createPopout(t,e,i,n){return t instanceof Gt?this.createPopoutFromContentItem(t,e,i,n):this.createPopoutFromItemConfig(t,e,i,n)}createPopoutFromContentItem(t,e,i,n){let o=t.parent,s=t;for(;null!==o&&1===o.contentItems.length&&!o.isGround;)s=o,o=o.parent;if(null===o)throw new K(\"LMCPFCI00834\");{if(void 0===n&&(n=o.contentItems.indexOf(s)),null!==i&&o.addPopInParentId(i),void 0===e){const i=globalThis.screenX||globalThis.screenLeft,n=globalThis.screenY||globalThis.screenTop,o=t.element.offsetLeft,s=t.element.offsetTop,{width:r,height:a}=kt(t.element);e={left:i+o,top:n+s,width:r,height:a}}const r=t.toConfig();if(t.remove(),ft.isRootItemConfig(r))return this.createPopoutFromItemConfig(r,e,i,n);throw new Error(`${tt[0]}`)}}beginVirtualSizedContainerAdding(){0==++this._virtualSizedContainerAddingBeginCount&&(this._virtualSizedContainers.length=0)}addVirtualSizedContainer(t){this._virtualSizedContainers.push(t)}endVirtualSizedContainerAdding(){if(0==--this._virtualSizedContainerAddingBeginCount){const t=this._virtualSizedContainers.length;if(t>0){this.fireBeforeVirtualRectingEvent(t);for(let e=0;ethis.emit(\"windowOpened\",a))),a.on(\"closed\",(()=>this.reconcilePopoutWindows())),this._openPopouts.push(a),this.layoutConfig.settings.closePopoutsOnUnload&&!this._windowBeforeUnloadListening&&(globalThis.addEventListener(\"beforeunload\",this._windowBeforeUnloadListener,{passive:!0}),this._windowBeforeUnloadListening=!0),a}closeAllOpenPopouts(){for(let t=0;tglobalThis.close()),1)}getArea(t,e){let i=null,n=1/0;for(let o=0;o=s.x1&&t=s.y1&&es.surface&&(n=s.surface,i=s)}return i}calculateItemAreas(){const t=this.getAllContentItems(),e=this._groundItem;if(void 0===e)throw new J(\"LMCIAR44365\");if(1!==t.length){e.contentItems[0].isStack?this._itemAreas=[]:this._itemAreas=e.createSideAreas();for(let e=0;e0){let e=t[0];if(Gt.isComponentItem(e)){const t=e.parent;if(null===t)throw new K(\"LMXLLMI69999\");e=t}if(!Gt.isStack(e))throw new X(\"LMCLLMI19993\");e.maximise()}}}processMaximiseStack(t){if(this._maximisedStack=t,t.on(\"beforeItemDestroyed\",this._maximisedStackBeforeDestroyedListener),t.element.classList.add(\"lm_maximised\"),t.element.insertAdjacentElement(\"afterend\",this._maximisePlaceholder),void 0===this._groundItem)throw new J(\"LMMXI19993\");{this._groundItem.element.prepend(t.element);const{width:e,height:i}=kt(this._containerElement);Tt(t.element,e),At(t.element,i),t.updateSize(!0),t.focusActiveContentItem(),this._maximisedStack.emit(\"maximised\"),this.emit(\"stateChanged\")}}processMinimiseMaximisedStack(){if(void 0===this._maximisedStack)throw new X(\"LMMMS74422\");{const t=this._maximisedStack;if(null===t.parent)throw new K(\"LMMI13668\");t.element.classList.remove(\"lm_maximised\"),this._maximisePlaceholder.insertAdjacentElement(\"afterend\",t.element),this._maximisePlaceholder.remove(),this.updateRootSize(!0),this._maximisedStack=void 0,t.off(\"beforeItemDestroyed\",this._maximisedStackBeforeDestroyedListener),t.emit(\"minimised\"),this.emit(\"stateChanged\")}}reconcilePopoutWindows(){const t=[];for(let e=0;e{this._resizeTimeoutId=void 0,this.beginSizeInvalidation(),this.endSizeInvalidation()}),this.resizeDebounceInterval))}checkClearResizeTimeout(){void 0!==this._resizeTimeoutId&&(clearTimeout(this._resizeTimeoutId),this._resizeTimeoutId=void 0)}setContainer(){var t;const e=document.body,i=null!==(t=this._containerElement)&&void 0!==t?t:e;if(i===e){this.resizeWithContainerAutomatically=!0;const t=document.documentElement;t.style.height=\"100%\",t.style.margin=\"0\",t.style.padding=\"0\",t.style.overflow=\"clip\",e.style.height=\"100%\",e.style.margin=\"0\",e.style.padding=\"0\",e.style.overflow=\"clip\"}this._containerElement=i}onBeforeUnload(){this.destroy()}adjustColumnsResponsive(){if(void 0===this._groundItem)throw new J(\"LMACR20883\");if(this._firstLoad=!1,this.useResponsiveLayout()&&!this._updatingColumnsResponsive&&this._groundItem.contentItems.length>0&&this._groundItem.contentItems[0].isRow){if(void 0===this._groundItem||null===this._width)throw new J(\"LMACR77412\");{const t=this._groundItem.contentItems[0].contentItems.length;if(t<=1)return;{const e=this.layoutConfig.dimensions.defaultMinItemWidth;if(t*e<=this._width)return;{this._updatingColumnsResponsive=!0;const i=t-Math.max(Math.floor(this._width/e),1),n=this._groundItem.contentItems[0],o=this.getAllStacks();if(0===o.length)throw new X(\"LMACRS77413\");{const t=o[0];for(let e=0;en?void 0:{parentItem:t,index:o}}}case 1:if(void 0===this._focusedComponentItem)return;{const t=this._focusedComponentItem.parentItem;return this.tryCreateLocationFromParentItem(t,e)}case 2:{const t=this.findFirstContentItemType(at.stack);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 3:{let t=this.findFirstContentItemType(at.row);return void 0!==t?this.tryCreateLocationFromParentItem(t,e):(t=this.findFirstContentItemType(at.column),void 0!==t?this.tryCreateLocationFromParentItem(t,e):void 0)}case 4:{const t=this.findFirstContentItemType(at.row);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 5:{const t=this.findFirstContentItemType(at.column);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 6:if(void 0===this._groundItem)throw new J(\"LMFLRIF18244\");return void 0!==this.rootItem?void 0:void 0===e||0===e?{parentItem:this._groundItem,index:0}:void 0;case 7:if(void 0===this._groundItem)throw new J(\"LMFLF18244\");{const t=this._groundItem.contentItems;if(0===t.length)return void 0===e||0===e?{parentItem:this._groundItem,index:0}:void 0;{const i=t[0];return this.tryCreateLocationFromParentItem(i,e)}}}}tryCreateLocationFromParentItem(t,e){const i=t.contentItems.length;return void 0===e?{parentItem:t,index:i}:e<0||e>i?void 0:{parentItem:t,index:e}}}!function(t){t.createMaximisePlaceElement=function(t){const e=t.createElement(\"div\");return e.classList.add(\"lm_maximise_place\"),e},t.createTabDropPlaceholderElement=function(t){const e=t.createElement(\"div\");return e.classList.add(\"lm_drop_tab_placeholder\"),e},t.defaultLocationSelectors=[{typeId:1,index:void 0},{typeId:2,index:void 0},{typeId:3,index:void 0},{typeId:7,index:void 0}],t.afterFocusedItemIfPossibleLocationSelectors=[{typeId:0,index:1},{typeId:2,index:void 0},{typeId:3,index:void 0},{typeId:7,index:void 0}]}(ae||(ae={}));class le extends ae{constructor(t,e,i,n){if(super(le.createLayoutManagerConstructorParameters(t,e)),this._bindComponentEventHanlderPassedInConstructor=!1,this._creationTimeoutPassed=!1,void 0!==e&&\"function\"==typeof e&&(this.bindComponentEvent=e,this._bindComponentEventHanlderPassedInConstructor=!0,void 0!==i&&(this.unbindComponentEvent=i)),!this._bindComponentEventHanlderPassedInConstructor&&this.isSubWindow){if(void 0===this._constructorOrSubWindowLayoutConfig)throw new J(\"VLC98823\");{const t=xt.resolve(this._constructorOrSubWindowLayoutConfig);this.layoutConfig=Object.assign(Object.assign({},t),{root:void 0})}}!0!==n&&(this.deprecatedConstructor||this.init())}destroy(){this.bindComponentEvent=void 0,this.unbindComponentEvent=void 0,super.destroy()}init(){if(this._bindComponentEventHanlderPassedInConstructor||\"loading\"!==document.readyState&&null!==document.body){if(!this._bindComponentEventHanlderPassedInConstructor&&!0===this.isSubWindow&&!this._creationTimeoutPassed)return setTimeout((()=>this.init()),7),void(this._creationTimeoutPassed=!0);!0===this.isSubWindow&&(this._bindComponentEventHanlderPassedInConstructor||this.clearHtmlAndAdjustStylesForSubWindow(),window.__glInstance=this),super.init()}else document.addEventListener(\"DOMContentLoaded\",(()=>this.init()),{passive:!0})}clearHtmlAndAdjustStylesForSubWindow(){const t=document.head,e=new Array(4);e[0]=document.querySelectorAll(\"body link\"),e[1]=document.querySelectorAll(\"body style\"),e[2]=document.querySelectorAll(\"template\"),e[3]=document.querySelectorAll(\".gl_keep\");for(let i=0;ithis.emit(\"popIn\"))),document.body.appendChild(t),!0}}bindComponent(t,e){if(void 0!==this.bindComponentEvent){return this.bindComponentEvent(t,e)}if(void 0!==this.getComponentEvent)return{virtual:!1,component:this.getComponentEvent(t,e)};{const t=`${tt[2]}: ${JSON.stringify(e)}`;throw new Z(t)}}unbindComponent(t,e,i){if(void 0!==this.unbindComponentEvent)this.unbindComponentEvent(t);else if(!e&&void 0!==this.releaseComponentEvent){if(void 0===i)throw new J(\"VCUCRCU333998\");this.releaseComponentEvent(t,i)}}}!function(t){let e=!1;t.createLayoutManagerConstructorParameters=function(t,i){const n=e?null:new URL(document.location.href).searchParams.get(\"gl-window\");e=!0;const o=null!==n;let s,r;if(null!==n){const e=localStorage.getItem(n);if(null===e)throw new Error(\"Null gl-window Config\");localStorage.removeItem(n);const i=JSON.parse(e),o=_t.unminifyConfig(i);r=xt.fromResolved(o),t instanceof HTMLElement&&(s=t)}else void 0===t?r=void 0:t instanceof HTMLElement?(r=void 0,s=t):r=t,void 0===s&&i instanceof HTMLElement&&(s=i);return{constructorOrSubWindowLayoutConfig:r,isSubWindow:o,containerElement:s}}}(le||(le={}));class he extends le{constructor(t,e,i){super(t,e,i,!0),this._componentTypesMap=new Map,this._registeredComponentMap=new Map,this._virtuableComponentMap=new Map,this._containerVirtualRectingRequiredEventListener=(t,e,i)=>this.handleContainerVirtualRectingRequiredEvent(t,e,i),this._containerVirtualVisibilityChangeRequiredEventListener=(t,e)=>this.handleContainerVirtualVisibilityChangeRequiredEvent(t,e),this._containerVirtualZIndexChangeRequiredEventListener=(t,e,i)=>this.handleContainerVirtualZIndexChangeRequiredEvent(t,e,i),this.deprecatedConstructor||this.init()}registerComponent(t,e,i=!1){if(\"function\"!=typeof e)throw new $(\"registerComponent() componentConstructorOrFactoryFtn parameter is not a function\");if(e.hasOwnProperty(\"prototype\")){const n=e;this.registerComponentConstructor(t,n,i)}else{const n=e;this.registerComponentFactoryFunction(t,n,i)}}registerComponentConstructor(t,e,i=!1){if(\"function\"!=typeof e)throw new Error(tt[1]);if(void 0!==this._componentTypesMap.get(t))throw new Z(`${tt[3]}: ${t}`);this._componentTypesMap.set(t,{constructor:e,factoryFunction:void 0,virtual:i})}registerComponentFactoryFunction(t,e,i=!1){if(\"function\"!=typeof e)throw new Z(\"Please register a constructor function\");if(void 0!==this._componentTypesMap.get(t))throw new Z(`${tt[3]}: ${t}`);this._componentTypesMap.set(t,{constructor:void 0,factoryFunction:e,virtual:i})}registerComponentFunction(t){this.registerGetComponentConstructorCallback(t)}registerGetComponentConstructorCallback(t){if(\"function\"!=typeof t)throw new Error(\"Please register a callback function\");void 0!==this._getComponentConstructorFtn&&console.warn(\"Multiple component functions are being registered. Only the final registered function will be used.\"),this._getComponentConstructorFtn=t}getRegisteredComponentTypeNames(){const t=this._componentTypesMap.keys();return Array.from(t)}getComponentInstantiator(t){let e;const i=pt.resolveComponentTypeName(t);return void 0!==i&&(e=this._componentTypesMap.get(i)),void 0===e&&void 0!==this._getComponentConstructorFtn&&(e={constructor:this._getComponentConstructorFtn(t),factoryFunction:void 0,virtual:!1}),e}bindComponent(t,e){let i;const n=pt.resolveComponentTypeName(e);let o;if(void 0!==n&&(i=this._componentTypesMap.get(n)),void 0===i&&void 0!==this._getComponentConstructorFtn&&(i={constructor:this._getComponentConstructorFtn(e),factoryFunction:void 0,virtual:!1}),void 0!==i){const s=i.virtual;let r,a;r=void 0===e.componentState?void 0:Ut({},e.componentState);const l=i.constructor;if(void 0!==l)a=new l(t,r,s);else{const e=i.factoryFunction;if(void 0===e)throw new X(\"LMBCFFU10008\");a=e(t,r,s)}if(s){if(void 0===a)throw new J(\"GLBCVCU988774\");{const e=a,i=e.rootHtmlElement;if(void 0===i)throw new Z(`${tt[5]}: ${n}`);!function(t){const e=\"absolute\";t.style.position!==e&&(t.style.position=e)}(i),this.container.appendChild(i),this._virtuableComponentMap.set(t,e),t.virtualRectingRequiredEvent=this._containerVirtualRectingRequiredEventListener,t.virtualVisibilityChangeRequiredEvent=this._containerVirtualVisibilityChangeRequiredEventListener,t.virtualZIndexChangeRequiredEvent=this._containerVirtualZIndexChangeRequiredEventListener}}this._registeredComponentMap.set(t,a),o={virtual:i.virtual,component:a}}else o=super.bindComponent(t,e);return o}unbindComponent(t,e,i){if(void 0===this._registeredComponentMap.get(t))super.unbindComponent(t,e,i);else{const e=this._virtuableComponentMap.get(t);if(void 0!==e){const i=e.rootHtmlElement;if(void 0===i)throw new X(\"GLUC77743\",t.title);this.container.removeChild(i),this._virtuableComponentMap.delete(t)}}}fireBeforeVirtualRectingEvent(t){this._goldenLayoutBoundingClientRect=this.container.getBoundingClientRect(),super.fireBeforeVirtualRectingEvent(t)}handleContainerVirtualRectingRequiredEvent(t,e,i){const n=this._virtuableComponentMap.get(t);if(void 0===n)throw new J(\"GLHCSCE55933\");{const o=n.rootHtmlElement;if(void 0===o)throw new Z(tt[4]+\" \"+t.title);{const n=t.element.getBoundingClientRect(),s=n.left-this._goldenLayoutBoundingClientRect.left;o.style.left=zt(s);const r=n.top-this._goldenLayoutBoundingClientRect.top;o.style.top=zt(r),Tt(o,e),At(o,i)}}}handleContainerVirtualVisibilityChangeRequiredEvent(t,e){const i=this._virtuableComponentMap.get(t);if(void 0===i)throw new J(\"GLHCVVCRE55934\");{const n=i.rootHtmlElement;if(void 0===n)throw new Z(tt[4]+\" \"+t.title);Dt(n,e)}}handleContainerVirtualZIndexChangeRequiredEvent(t,e,i){const n=this._virtuableComponentMap.get(t);if(void 0===n)throw new J(\"GLHCVZICRE55935\");{const e=n.rootHtmlElement;if(void 0===e)throw new Z(tt[4]+\" \"+t.title);e.style.zIndex=i}}}const de=\"initial_\",ce={show:\"top\",popout:!1,maximise:!1,close:\"close-tab-unused\"},me={headerHeight:31},ue={hasHeaders:!0,reorderEnabled:!0},pe={popoutWholeStack:!1,constrainDragToContainer:!1,constrainDragToHeaders:!1,preventDragout:!1,showMaximiseIcon:!1,showPopoutIcon:!1,showCloseIcon:!1,blockedPopoutsThrowError:!0,closePopoutsOnUnload:!0,selectionEnabled:!1};var ge,fe;class ve{constructor(e){this.layout=e,ge.set(this,void 0),fe.set(this,void 0),this.handleResize=t=>{t.forEach((t=>this.resizeElement(t.target)))},this.handleMutation=()=>{this.layout.viewComponentsByContainerElement.forEach((t=>{this.resizeElement(t.container.element)}))},t.__classPrivateFieldSet(this,ge,new ResizeObserver(this.handleResize),\"f\"),t.__classPrivateFieldSet(this,fe,new MutationObserver(this.handleMutation),\"f\")}observeMutations(e){t.__classPrivateFieldGet(this,fe,\"f\")?.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[\"class\"]})}destroy(){t.__classPrivateFieldGet(this,ge,\"f\").disconnect(),t.__classPrivateFieldGet(this,fe,\"f\").disconnect()}observeContainer(e){t.__classPrivateFieldGet(this,ge,\"f\").observe(e)}unobserveContainer(e){t.__classPrivateFieldGet(this,ge,\"f\").unobserve(e)}resizeElement(t){const e=this.layout.viewComponentsByContainerElement.get(t);e&&e.resize()}}ge=new WeakMap,fe=new WeakMap;var _e={};Object.defineProperty(_e,\"__esModule\",{value:!0});var ye=_e.BaseItem=void 0;class Ce{constructor(t,e,i){this._item=t,this._layout=e,this._wrap=i}get raw(){return this._item}get layout(){return this._layout}get type(){return this._item.type}get contentItems(){return(this._item.contentItems??[]).map((t=>this._wrap(t)))}get parent(){const t=this._item.parent;return t?this._wrap(t):null}setActiveContentItem(t,e){if(\"stack\"!==this.type)throw new Error(`Cannot call setActiveContentItem from a non-stack item: ${this.type}`);this._item.setActiveContentItem(t.raw,e)}static wrapInternal(t,e,i){const n=Ce.wrapCache.get(e);if(n)return n;const o=new t(e,i,(e=>Ce.wrapInternal(t,e,i)));return Ce.wrapCache.set(e,o),o}}ye=_e.BaseItem=Ce,Ce.wrapCache=new WeakMap;const we=t=>!!t&&\"contentItems\"in t&&(t.isRow||t.isColumn);class Ie extends ye{isRoot(){return!!this._item.parent?.isGround}getBounds(){return this._item.element.getBoundingClientRect()}get viewName(){if(this._item.isComponent){const{component:t}=this._item;return t.identity.name}throw new Error(\"View name not found\")}onDestroyed(t){const e=({target:i})=>{i===this._item&&(t(),this._item.off(\"itemDestroyed\",e))};this._item.on(\"itemDestroyed\",e)}createAdjacentStack({position:t=\"right\"}={}){const e=this.raw;if(ee.isStack(e)&&e.parent){const i=[\"top\",\"bottom\"].includes(t)?\"column\":\"row\",n=[\"left\",\"top\"].includes(t)?1:0,o=we(e.parent)?e.parent:e.layoutManager,s=o,r=e.parent.contentItems.indexOf(e);e.parent.isGround&&e.parent.removeChild(e,!0);const a=o.newItem({type:i,content:[{type:\"stack\",content:[]}]},r);if(!a)throw new Error(\"createAdjacentStack: Failed to create new container\");const l=a.contentItems[0];return a.addChild(this.raw,n),we(s)&&s.removeChild(e,!0),this._wrap(l)}throw new Error(`Cannot creat adjacent stacks for type: ${e.type}, must be type 'stack'`)}setActiveContentItem(t,e=!0){if(!ee.isStack(this._item))throw new Error(`Cannot call setActiveContentItem from a non-stack item: ${this.type}`);this._item.setActiveComponentItem(t.raw,!e)}static wrap(t,e){return ye.wrapInternal(Ie,t,e)}}function be(t=[],e){for(const i of t)\"component\"===i.type?Object.keys(e).forEach((t=>{t in i&&(i.componentState={[`${de}${t}`]:i[t],...i.componentState}),i[t]=e[t]})):be(i.content,e)}function Se(t=[],e,i){for(const n of t)if(\"component\"===n.type)Object.keys(e).forEach((t=>{if(`${de}${t}`in n.componentState)return n[t]=n.componentState[`${de}${t}`],void delete n.componentState[`${de}${t}`];n[t]=e[t]}));else{if(n.size&&(\"row\"===i||\"column\"===i)){n[\"row\"===i?\"width\":\"height\"]=n.size?.includes(\".\")?parseFloat(n.size):parseInt(n.size)}Se(n.content,e,n.type)}}function Ee(t){if(t.root){t.root.content&&Se([t.root],{componentName:\"view\",isClosable:!0});const e=t.root;t.content=[e],delete t.root}return t}const xe=e=>class extends e{connectedCallback(){if(!this.name||!this.uuid)throw new Error(\" Name or uuid attribute missing\");if(!this.src)throw new Error(\" missing 'src' attribute.\");this.#t||(this.#t=document.createElement(\"iframe\"),this.#t.src=this.src,this.#t.style.height=\"100%\",this.#t.style.width=\"100%\",this.#t.style.border=\"none\",this.forceFrameName?this.#t.setAttribute(\"name\",this.forceFrameName):this.#t.setAttribute(\"name\",t.encodeOptions({brokerUrl:this.brokerUrl,name:this.name,uuid:this.uuid,providerId:this.providerId,contextGroup:this.contextGroup},\"of-frame\")),this.#t.setAttribute(\"id\",this.name),this.appendChild(this.#t))}#t;get brokerUrl(){return this.getAttribute(\"of-broker\")}set brokerUrl(t){t&&this.setAttribute(\"of-broker\",t)}get name(){return this.getAttribute(\"of-name\")}set name(t){t&&this.setAttribute(\"of-name\",t)}get forceFrameName(){return this.getAttribute(\"forceFrameName\")}set forceFrameName(t){t&&this.setAttribute(\"forceFrameName\",t)}get uuid(){return this.getAttribute(\"of-uuid\")}set uuid(t){t&&this.setAttribute(\"of-uuid\",t)}get src(){return this.getAttribute(\"src\")}set src(t){t&&this.setAttribute(\"src\",t)}get providerId(){return this.getAttribute(\"of-provider-id\")}set providerId(t){t&&this.setAttribute(\"of-provider-id\",t)}get contextGroup(){return this.getAttribute(\"of-context-group\")}set contextGroup(t){t&&this.setAttribute(\"of-context-group\",t)}static get observedAttributes(){return[\"name\"]}};class Le{static create(t){const e=document.createElement(\"of-view\");return Object.entries(t).forEach((([t,i])=>{e.setAttribute(t,i)})),e}}customElements.define(\"of-view\",xe(HTMLElement));class ze{constructor(t,i,n,{brokerUrl:o,interopConfig:s},r){this.container=t,this.config=i,this.ofView=null,this.isDragging=()=>this.container.tab.element?.className.includes(\"lm_dragging\")??!1;const{url:a,web:l,interop:h,name:d}=i||{},c=d??`internal-generated-view-${e.v4()}`;if(this.identity={uuid:n,name:c},this.container.element.setAttribute(\"of-name\",c),this.container.element.id=`container-${c}`,this.container.parent.id=c,void 0===a)return void this.handleUrlMissing();const m=this.updateTitleIfNotSet(a),u={\"of-broker\":o,\"of-uuid\":n,\"of-name\":c,src:a};l?.frameName&&(u.forceFrameName=l.frameName);const p=h?.currentContextGroup??s?.currentContextGroup;p&&(u[\"of-context-group\"]=p),s?.providerId&&(u[\"of-provider-id\"]=s?.providerId),this.ofView=Le.create(u),this.ofView.title=m??`Iframe: ${a}`,r.appendChild(this.ofView),this.ofView.style.position=\"absolute\"}updateTitleIfNotSet(t){return\"view\"===this.container.parent.title&&this.container.parent.setTitle(t),this.container.parent.title}handleUrlMissing(){const t=document.createElement(\"div\");t.setAttribute(\"style\",\"padding: 20px\");t.innerText=\"No URL provided\",this.container.element.appendChild(t)}destroy(){this.ofView?.remove(),this.ofView=null}closeView(){this.container.close()}resize(){if(this.ofView){if(this.isDragging())return void(this.ofView.style.display=\"none\");const t=this.container.element.getBoundingClientRect();this.ofView.style.position=\"absolute\",this.ofView.style.height=`${t.height}px`,this.ofView.style.width=`${t.width}px`,this.ofView.style.inset=`${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`,this.ofView.style.display=\"block\"}}}class Me extends U{static overrideConfig(t){const e={...ue,...t.settings,...pe};return e.reorderEnabled?be(t.content,{isClosable:!0}):be(t.content,{reorderEnabled:!1}),{dimensions:me,...t,settings:e,header:{...ce,show:!1!==t.settings?.hasHeaders&&ce.show}}}constructor(t,e,i,{options:n},o,s){super(),this.identity=t,this.container=e,this.initialConfig=i,this.layoutManager=o,this.platformProvider=s,this.viewComponentsByContainerElement=new Map,this.layoutContentCache=_.getSingleInstance(),this.reparentingViews=new Set,this.goldenLayoutDestroyed=!1,this.createViewComponent=(t,e)=>{m.handleSharedView(this.layoutManager,this.identity,e);const i=new ze(t,e,this.identity.uuid,this.options,this.iframeContainer);return e&&!1===e[`${de}isClosable`]&&this.stylesheet.insertRule(`#tab-${i.identity.name} .lm_close_tab { display: none; }`),this.viewComponentsByContainerElement.set(t.element,i),this.resizeController.observeContainer(t.element),i},this.iframeContainer=document.createElement(\"div\"),this.iframeContainer.id=`openfin-layout-iframe-container-${this.identity.layoutName}`,this.domEmitter=new V(e),this.setupStylesheets(),this.layout=new he(this.container),this.layout.resizeWithContainerAutomatically=!0,this.options=n,this.layout.registerComponent(\"view\",this.createViewComponent),this.setupListeners(),this.resizeController=new ve(this),this.layout.loadLayout(Me.overrideConfig(i));const r=document.createElement(\"div\");r.id=`openfin-layout-shadow-container-${this.identity.layoutName}`,r.attachShadow({mode:\"open\",delegatesFocus:!1}).appendChild(this.iframeContainer),this.container.appendChild(r),this.resizeController.observeMutations(this.container)}getStackByView({name:t}){const e=this.layout.findFirstComponentItemById(t);if(e?.parent&&e?.parent?.isStack)return Ie.wrap(e.parent,this)}getRoot(){return Ie.wrap(this.layout.rootItem,this)}async platformCloseView(t){const e=[...this.viewComponentsByContainerElement.values()].find((e=>e.identity.name===t.name));if(!e)throw new Error(`View with name: ${t.name} not found in layout.`);e.closeView()}async platformCreateView(t,{location:e,targetView:i}={}){if(i)throw new Error(\"TargetView not supported in web\");const n={options:this.platformProvider.normalizeOptions(t),target:this.identity,location:e};return this.insertView(n)}setupStylesheets(){if(this.container.setAttribute(\"data-openfin-layout-name\",this.identity.layoutName),this.stylesheet=new CSSStyleSheet,this.stylesheet.insertRule(\".lm_close { display: none; }\"),document.adoptedStyleSheets.push(this.stylesheet),this.initialConfig.settings?.preventSplitterResize){const t=`\\n [data-openfin-layout-name='${this.identity.layoutName}'] .lm_splitter {\\n pointer-events: none;\\n }`;this.stylesheet.insertRule(t)}}insertView({options:t,location:e,targetView:i}){const n=e?this.layoutContentCache.getItemOrUndefined(e.id):void 0,o=i?this.layoutContentCache.getItemOrUndefined(i.name):void 0,s=n??o??Ie.wrap(this.layout.rootItem,this);let r;if(ee.isStack(s.raw))r=s.raw;else{if(!we(s.raw))throw new Error(\"Cannot add a view at the requested location\");r=s.raw.newItem({type:\"stack\",content:[]})}const a=Math.min(r.contentItems.length,e?.index??r.contentItems.length);let l=this.layout.findFirstComponentItemById(t.name);l?(l.parent&&l.parent.removeChild(l,!0),r.addChild(l,a)):l=r.newComponent(\"view\",t,t.title??t.url??\"Default Title\",a);const h=l.component.identity;return Promise.resolve({identity:h})}replaceView({viewToReplace:t,newView:e}){throw new Error(\"Method not implemented.\")}replaceLayout(t){throw new Error(\"Method not implemented.\")}async cleanupView(t){}applyPreset(t){throw new Error(\"Method not implemented.\")}getCurrentViews(){return[...this.viewComponentsByContainerElement.values()].map((t=>t.identity))}async getFrameSnapshot(){return Ee(xt.fromResolved(this.layout.toConfig()))}isVisible(){return W(this.container)}async onViewDetached({viewIdentity:t}){this.reparentingViews.add(t.name),this.platformCloseView(t)}async destroy(){this.goldenLayoutDestroyed||(this.goldenLayoutDestroyed=!0,this.layout.destroy()),this.iframeContainer.remove(),this.resizeController.destroy(),document.adoptedStyleSheets=document.adoptedStyleSheets.filter((t=>t!==this.stylesheet)),this.viewComponentsByContainerElement.clear()}setupListeners(){this.container.addEventListener(\"pointerdown\",(t=>{if(t.target instanceof HTMLElement){const e=t.target.classList;[\"lm_tab\",\"lm_title\",\"lm_splitter\",\"lm_drag_handle\"].some((t=>e.contains(t)))&&(this.handleDragStart(),2===t.button&&t.stopPropagation())}}),!0),document.addEventListener(\"pointerup\",(()=>this.handleDragEnd()),!0),this.layout.on(\"tabCreated\",(t=>{const e=t.componentItem.component;t.element.id=`tab-${e.identity.name}`,this.domEmitter.dispatchLocalEvent(\"tab-created\",e.identity)})),this.layout.on(\"itemCreated\",(({target:t})=>{const e=t;if(Gt.isComponentItem(e)){const t=e.component;this.domEmitter.dispatchLocalEvent(\"container-created\",t.identity)}})),this.layout.on(\"itemDestroyed\",(t=>{const e=t.target;if(Gt.isComponentItem(e)){const t=e.component;this.removeViewComponent(t)}})),this.layout.on(\"itemDropped\",(()=>{this.handleDragEnd()}))}handleDragStart(){this.iframeContainer.style.pointerEvents=\"none\"}handleDragEnd(){this.iframeContainer.style.pointerEvents=\"\"}removeViewComponent(t){if(t.config&&!1===t.config[`${de}isClosable`]){const e=[...this.stylesheet.cssRules].findIndex((e=>e.cssText.includes(`#tab-${t.identity.name}`)));this.stylesheet.deleteRule(e)}t.destroy(),this.viewComponentsByContainerElement.delete(t.container.element),this.resizeController.unobserveContainer(t.container.element),this.reparentingViews.has(t.identity.name)?this.reparentingViews.delete(t.identity.name):this.platformProvider.closeView(t.identity.name);0===this.getCurrentViews().length&&(this.goldenLayoutDestroyed||(this.goldenLayoutDestroyed=!0,m.handleLastViewRemoved(this.layoutManager,this.identity)))}}class Pe{constructor(t,e,i,n){this.windowIdentity=t,this.connectConfig=e,this.provider=i,this.fallbackContainer=n}async createLayout(t,e){if(!(\"container\"in t)&&!this.fallbackContainer)throw new Error(\"Container property is not optional in web\");const{layoutName:i}=t,n=t,o=this.provider.initLayoutViews(n),s=n.container??this.fallbackContainer,r={...this.windowIdentity,layoutName:i},a=new Me(r,s,o,this.connectConfig,e,this.provider);m.registerLayout(e,i,a),this.fallbackContainer=null}async getLayoutSnapshot(t){return t.getLayoutSnapshot()}async handleLastViewRemoved(t){}}class Te{static async init(e){const i=e.getFin().InterApplicationBus.Channel,n=await i.create(`custom-frame-${e.me.uuid}`);return n.setDefaultAction((async(t,{target:e,opts:i},o)=>{const s=n.connections.find((t=>t.name===e.name));if(s)return n.dispatch(s,t,{...i,target:e});throw new Error(`Client with name ${e.name} not found`)})),await t.relayChannelClientApi_1(n,\"layout-relay\"),new Te(e)}constructor(t){this.wire=t,this.viewNames=new Set}normalizeOptions(t,i=\"default\"){const n=this.wire.me.uuid;let{name:o=`internal-generated-view-${e.v4()}`}=t;return o.match(/^internal-generated-view-/)&&this.viewNames.has(o)&&\"duplicate\"===i&&(o=`internal-generated-view-${e.v4()}`),this.viewNames.add(o),{...t,name:o,uuid:n}}closeView(t){this.viewNames.delete(t)}initLayoutViews({layout:t,multiInstanceViewBehavior:e}){return H((t=>{if(\"component\"===t.type&&t.componentState){const i=this.normalizeOptions(t.componentState,e);return{...t,componentState:i}}return t}),t)}}var Ae;const ke=t=>t;Ae=new WeakMap,exports.WebLayoutEntryPoint=class{constructor(e){Ae.set(this,void 0),this.initLayoutManager=async(e,i,{container:n,layoutManagerOverride:o})=>{const s=await Te.init(i),r=o??ke,a=new Pe(i.me,t.__classPrivateFieldGet(this,Ae,\"f\"),s,n),l=new(r(m.createClosedConstructor(a)));return await M(i,l),l},this.applyLayoutSnapshot=async(e,i,n)=>{await i.applyLayoutSnapshot(t.__classPrivateFieldGet(this,Ae,\"f\").platform.layoutSnapshot)},this.createLayout=async(t,e)=>m.createLayout(t,e),this.destroyLayout=async(t,e)=>m.destroyLayout(t,e),t.__classPrivateFieldSet(this,Ae,e,\"f\")}};\n","'use strict'\n\nexports.byteLength = byteLength\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\nfor (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i]\n revLookup[code.charCodeAt(i)] = i\n}\n\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction getLens (b64) {\n var len = b64.length\n\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // Trim off extra bytes after placeholder bytes are found\n // See: https://github.com/beatgammit/base64-js/issues/42\n var validLen = b64.indexOf('=')\n if (validLen === -1) validLen = len\n\n var placeHoldersLen = validLen === len\n ? 0\n : 4 - (validLen % 4)\n\n return [validLen, placeHoldersLen]\n}\n\n// base64 is 4/3 + up to two characters of the original data\nfunction byteLength (b64) {\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction _byteLength (b64, validLen, placeHoldersLen) {\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction toByteArray (b64) {\n var tmp\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n\n var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))\n\n var curByte = 0\n\n // if there are placeholders, only get up to the last complete 4 chars\n var len = placeHoldersLen > 0\n ? validLen - 4\n : validLen\n\n var i\n for (i = 0; i < len; i += 4) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 18) |\n (revLookup[b64.charCodeAt(i + 1)] << 12) |\n (revLookup[b64.charCodeAt(i + 2)] << 6) |\n revLookup[b64.charCodeAt(i + 3)]\n arr[curByte++] = (tmp >> 16) & 0xFF\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 2) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 2) |\n (revLookup[b64.charCodeAt(i + 1)] >> 4)\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 1) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 10) |\n (revLookup[b64.charCodeAt(i + 1)] << 4) |\n (revLookup[b64.charCodeAt(i + 2)] >> 2)\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] +\n lookup[num >> 12 & 0x3F] +\n lookup[num >> 6 & 0x3F] +\n lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n var tmp\n var output = []\n for (var i = start; i < end; i += 3) {\n tmp =\n ((uint8[i] << 16) & 0xFF0000) +\n ((uint8[i + 1] << 8) & 0xFF00) +\n (uint8[i + 2] & 0xFF)\n output.push(tripletToBase64(tmp))\n }\n return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n var tmp\n var len = uint8.length\n var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n var parts = []\n var maxChunkLength = 16383 // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1]\n parts.push(\n lookup[tmp >> 2] +\n lookup[(tmp << 4) & 0x3F] +\n '=='\n )\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + uint8[len - 1]\n parts.push(\n lookup[tmp >> 10] +\n lookup[(tmp >> 4) & 0x3F] +\n lookup[(tmp << 2) & 0x3F] +\n '='\n )\n }\n\n return parts.join('')\n}\n","/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n/* eslint-disable no-proto */\n\n'use strict'\n\nconst base64 = require('base64-js')\nconst ieee754 = require('ieee754')\nconst customInspectSymbol =\n (typeof Symbol === 'function' && typeof Symbol['for'] === 'function') // eslint-disable-line dot-notation\n ? Symbol['for']('nodejs.util.inspect.custom') // eslint-disable-line dot-notation\n : null\n\nexports.Buffer = Buffer\nexports.SlowBuffer = SlowBuffer\nexports.INSPECT_MAX_BYTES = 50\n\nconst K_MAX_LENGTH = 0x7fffffff\nexports.kMaxLength = K_MAX_LENGTH\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Print warning and recommend using `buffer` v4.x which has an Object\n * implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * We report that the browser does not support typed arrays if the are not subclassable\n * using __proto__. Firefox 4-29 lacks support for adding new properties to `Uint8Array`\n * (See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438). IE 10 lacks support\n * for __proto__ and has a buggy typed array implementation.\n */\nBuffer.TYPED_ARRAY_SUPPORT = typedArraySupport()\n\nif (!Buffer.TYPED_ARRAY_SUPPORT && typeof console !== 'undefined' &&\n typeof console.error === 'function') {\n console.error(\n 'This browser lacks typed array (Uint8Array) support which is required by ' +\n '`buffer` v5.x. Use `buffer` v4.x if you require old browser support.'\n )\n}\n\nfunction typedArraySupport () {\n // Can typed array instances can be augmented?\n try {\n const arr = new Uint8Array(1)\n const proto = { foo: function () { return 42 } }\n Object.setPrototypeOf(proto, Uint8Array.prototype)\n Object.setPrototypeOf(arr, proto)\n return arr.foo() === 42\n } catch (e) {\n return false\n }\n}\n\nObject.defineProperty(Buffer.prototype, 'parent', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.buffer\n }\n})\n\nObject.defineProperty(Buffer.prototype, 'offset', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.byteOffset\n }\n})\n\nfunction createBuffer (length) {\n if (length > K_MAX_LENGTH) {\n throw new RangeError('The value \"' + length + '\" is invalid for option \"size\"')\n }\n // Return an augmented `Uint8Array` instance\n const buf = new Uint8Array(length)\n Object.setPrototypeOf(buf, Buffer.prototype)\n return buf\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new TypeError(\n 'The \"string\" argument must be of type string. Received type number'\n )\n }\n return allocUnsafe(arg)\n }\n return from(arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\nfunction from (value, encodingOrOffset, length) {\n if (typeof value === 'string') {\n return fromString(value, encodingOrOffset)\n }\n\n if (ArrayBuffer.isView(value)) {\n return fromArrayView(value)\n }\n\n if (value == null) {\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n }\n\n if (isInstance(value, ArrayBuffer) ||\n (value && isInstance(value.buffer, ArrayBuffer))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof SharedArrayBuffer !== 'undefined' &&\n (isInstance(value, SharedArrayBuffer) ||\n (value && isInstance(value.buffer, SharedArrayBuffer)))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof value === 'number') {\n throw new TypeError(\n 'The \"value\" argument must not be of type number. Received type number'\n )\n }\n\n const valueOf = value.valueOf && value.valueOf()\n if (valueOf != null && valueOf !== value) {\n return Buffer.from(valueOf, encodingOrOffset, length)\n }\n\n const b = fromObject(value)\n if (b) return b\n\n if (typeof Symbol !== 'undefined' && Symbol.toPrimitive != null &&\n typeof value[Symbol.toPrimitive] === 'function') {\n return Buffer.from(value[Symbol.toPrimitive]('string'), encodingOrOffset, length)\n }\n\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n return from(value, encodingOrOffset, length)\n}\n\n// Note: Change prototype *after* Buffer.from is defined to workaround Chrome bug:\n// https://github.com/feross/buffer/pull/148\nObject.setPrototypeOf(Buffer.prototype, Uint8Array.prototype)\nObject.setPrototypeOf(Buffer, Uint8Array)\n\nfunction assertSize (size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be of type number')\n } else if (size < 0) {\n throw new RangeError('The value \"' + size + '\" is invalid for option \"size\"')\n }\n}\n\nfunction alloc (size, fill, encoding) {\n assertSize(size)\n if (size <= 0) {\n return createBuffer(size)\n }\n if (fill !== undefined) {\n // Only pay attention to encoding if it's a string. This\n // prevents accidentally sending in a number that would\n // be interpreted as a start offset.\n return typeof encoding === 'string'\n ? createBuffer(size).fill(fill, encoding)\n : createBuffer(size).fill(fill)\n }\n return createBuffer(size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n return alloc(size, fill, encoding)\n}\n\nfunction allocUnsafe (size) {\n assertSize(size)\n return createBuffer(size < 0 ? 0 : checked(size) | 0)\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n return allocUnsafe(size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n return allocUnsafe(size)\n}\n\nfunction fromString (string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8'\n }\n\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n\n const length = byteLength(string, encoding) | 0\n let buf = createBuffer(length)\n\n const actual = buf.write(string, encoding)\n\n if (actual !== length) {\n // Writing a hex string, for example, that contains invalid characters will\n // cause everything after the first invalid character to be ignored. (e.g.\n // 'abxxcd' will be treated as 'ab')\n buf = buf.slice(0, actual)\n }\n\n return buf\n}\n\nfunction fromArrayLike (array) {\n const length = array.length < 0 ? 0 : checked(array.length) | 0\n const buf = createBuffer(length)\n for (let i = 0; i < length; i += 1) {\n buf[i] = array[i] & 255\n }\n return buf\n}\n\nfunction fromArrayView (arrayView) {\n if (isInstance(arrayView, Uint8Array)) {\n const copy = new Uint8Array(arrayView)\n return fromArrayBuffer(copy.buffer, copy.byteOffset, copy.byteLength)\n }\n return fromArrayLike(arrayView)\n}\n\nfunction fromArrayBuffer (array, byteOffset, length) {\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\"offset\" is outside of buffer bounds')\n }\n\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\"length\" is outside of buffer bounds')\n }\n\n let buf\n if (byteOffset === undefined && length === undefined) {\n buf = new Uint8Array(array)\n } else if (length === undefined) {\n buf = new Uint8Array(array, byteOffset)\n } else {\n buf = new Uint8Array(array, byteOffset, length)\n }\n\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(buf, Buffer.prototype)\n\n return buf\n}\n\nfunction fromObject (obj) {\n if (Buffer.isBuffer(obj)) {\n const len = checked(obj.length) | 0\n const buf = createBuffer(len)\n\n if (buf.length === 0) {\n return buf\n }\n\n obj.copy(buf, 0, 0, len)\n return buf\n }\n\n if (obj.length !== undefined) {\n if (typeof obj.length !== 'number' || numberIsNaN(obj.length)) {\n return createBuffer(0)\n }\n return fromArrayLike(obj)\n }\n\n if (obj.type === 'Buffer' && Array.isArray(obj.data)) {\n return fromArrayLike(obj.data)\n }\n}\n\nfunction checked (length) {\n // Note: cannot use `length < K_MAX_LENGTH` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= K_MAX_LENGTH) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + K_MAX_LENGTH.toString(16) + ' bytes')\n }\n return length | 0\n}\n\nfunction SlowBuffer (length) {\n if (+length != length) { // eslint-disable-line eqeqeq\n length = 0\n }\n return Buffer.alloc(+length)\n}\n\nBuffer.isBuffer = function isBuffer (b) {\n return b != null && b._isBuffer === true &&\n b !== Buffer.prototype // so Buffer.isBuffer(Buffer.prototype) will be false\n}\n\nBuffer.compare = function compare (a, b) {\n if (isInstance(a, Uint8Array)) a = Buffer.from(a, a.offset, a.byteLength)\n if (isInstance(b, Uint8Array)) b = Buffer.from(b, b.offset, b.byteLength)\n if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n throw new TypeError(\n 'The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array'\n )\n }\n\n if (a === b) return 0\n\n let x = a.length\n let y = b.length\n\n for (let i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i]\n y = b[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n switch (String(encoding).toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'latin1':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return true\n default:\n return false\n }\n}\n\nBuffer.concat = function concat (list, length) {\n if (!Array.isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n\n if (list.length === 0) {\n return Buffer.alloc(0)\n }\n\n let i\n if (length === undefined) {\n length = 0\n for (i = 0; i < list.length; ++i) {\n length += list[i].length\n }\n }\n\n const buffer = Buffer.allocUnsafe(length)\n let pos = 0\n for (i = 0; i < list.length; ++i) {\n let buf = list[i]\n if (isInstance(buf, Uint8Array)) {\n if (pos + buf.length > buffer.length) {\n if (!Buffer.isBuffer(buf)) buf = Buffer.from(buf)\n buf.copy(buffer, pos)\n } else {\n Uint8Array.prototype.set.call(\n buffer,\n buf,\n pos\n )\n }\n } else if (!Buffer.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n } else {\n buf.copy(buffer, pos)\n }\n pos += buf.length\n }\n return buffer\n}\n\nfunction byteLength (string, encoding) {\n if (Buffer.isBuffer(string)) {\n return string.length\n }\n if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) {\n return string.byteLength\n }\n if (typeof string !== 'string') {\n throw new TypeError(\n 'The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. ' +\n 'Received type ' + typeof string\n )\n }\n\n const len = string.length\n const mustMatch = (arguments.length > 2 && arguments[2] === true)\n if (!mustMatch && len === 0) return 0\n\n // Use a for loop to avoid recursion\n let loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'ascii':\n case 'latin1':\n case 'binary':\n return len\n case 'utf8':\n case 'utf-8':\n return utf8ToBytes(string).length\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return len * 2\n case 'hex':\n return len >>> 1\n case 'base64':\n return base64ToBytes(string).length\n default:\n if (loweredCase) {\n return mustMatch ? -1 : utf8ToBytes(string).length // assume utf8\n }\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n let loweredCase = false\n\n // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n // property of a typed array.\n\n // This behaves neither like String nor Uint8Array in that we set start/end\n // to their upper/lower bounds if the value passed is out of range.\n // undefined is handled specially as per ECMA-262 6th Edition,\n // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n if (start === undefined || start < 0) {\n start = 0\n }\n // Return early if start > this.length. Done here to prevent potential uint32\n // coercion fail below.\n if (start > this.length) {\n return ''\n }\n\n if (end === undefined || end > this.length) {\n end = this.length\n }\n\n if (end <= 0) {\n return ''\n }\n\n // Force coercion to uint32. This will also coerce falsey/NaN values to 0.\n end >>>= 0\n start >>>= 0\n\n if (end <= start) {\n return ''\n }\n\n if (!encoding) encoding = 'utf8'\n\n while (true) {\n switch (encoding) {\n case 'hex':\n return hexSlice(this, start, end)\n\n case 'utf8':\n case 'utf-8':\n return utf8Slice(this, start, end)\n\n case 'ascii':\n return asciiSlice(this, start, end)\n\n case 'latin1':\n case 'binary':\n return latin1Slice(this, start, end)\n\n case 'base64':\n return base64Slice(this, start, end)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return utf16leSlice(this, start, end)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = (encoding + '').toLowerCase()\n loweredCase = true\n }\n }\n}\n\n// This property is used by `Buffer.isBuffer` (and the `is-buffer` npm package)\n// to detect a Buffer instance. It's not possible to use `instanceof Buffer`\n// reliably in a browserify context because there could be multiple different\n// copies of the 'buffer' package in use. This method works even for Buffer\n// instances that were created from another copy of the `buffer` package.\n// See: https://github.com/feross/buffer/issues/154\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n const i = b[n]\n b[n] = b[m]\n b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n const len = this.length\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits')\n }\n for (let i = 0; i < len; i += 2) {\n swap(this, i, i + 1)\n }\n return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n const len = this.length\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits')\n }\n for (let i = 0; i < len; i += 4) {\n swap(this, i, i + 3)\n swap(this, i + 1, i + 2)\n }\n return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n const len = this.length\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits')\n }\n for (let i = 0; i < len; i += 8) {\n swap(this, i, i + 7)\n swap(this, i + 1, i + 6)\n swap(this, i + 2, i + 5)\n swap(this, i + 3, i + 4)\n }\n return this\n}\n\nBuffer.prototype.toString = function toString () {\n const length = this.length\n if (length === 0) return ''\n if (arguments.length === 0) return utf8Slice(this, 0, length)\n return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.toLocaleString = Buffer.prototype.toString\n\nBuffer.prototype.equals = function equals (b) {\n if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n if (this === b) return true\n return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n let str = ''\n const max = exports.INSPECT_MAX_BYTES\n str = this.toString('hex', 0, max).replace(/(.{2})/g, '$1 ').trim()\n if (this.length > max) str += ' ... '\n return ''\n}\nif (customInspectSymbol) {\n Buffer.prototype[customInspectSymbol] = Buffer.prototype.inspect\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n if (isInstance(target, Uint8Array)) {\n target = Buffer.from(target, target.offset, target.byteLength)\n }\n if (!Buffer.isBuffer(target)) {\n throw new TypeError(\n 'The \"target\" argument must be one of type Buffer or Uint8Array. ' +\n 'Received type ' + (typeof target)\n )\n }\n\n if (start === undefined) {\n start = 0\n }\n if (end === undefined) {\n end = target ? target.length : 0\n }\n if (thisStart === undefined) {\n thisStart = 0\n }\n if (thisEnd === undefined) {\n thisEnd = this.length\n }\n\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError('out of range index')\n }\n\n if (thisStart >= thisEnd && start >= end) {\n return 0\n }\n if (thisStart >= thisEnd) {\n return -1\n }\n if (start >= end) {\n return 1\n }\n\n start >>>= 0\n end >>>= 0\n thisStart >>>= 0\n thisEnd >>>= 0\n\n if (this === target) return 0\n\n let x = thisEnd - thisStart\n let y = end - start\n const len = Math.min(x, y)\n\n const thisCopy = this.slice(thisStart, thisEnd)\n const targetCopy = target.slice(start, end)\n\n for (let i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i]\n y = targetCopy[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (numberIsNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [val], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n let indexSize = 1\n let arrLength = arr.length\n let valLength = val.length\n\n if (encoding !== undefined) {\n encoding = String(encoding).toLowerCase()\n if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n encoding === 'utf16le' || encoding === 'utf-16le') {\n if (arr.length < 2 || val.length < 2) {\n return -1\n }\n indexSize = 2\n arrLength /= 2\n valLength /= 2\n byteOffset /= 2\n }\n }\n\n function read (buf, i) {\n if (indexSize === 1) {\n return buf[i]\n } else {\n return buf.readUInt16BE(i * indexSize)\n }\n }\n\n let i\n if (dir) {\n let foundIndex = -1\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1) foundIndex = i\n if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n } else {\n if (foundIndex !== -1) i -= i - foundIndex\n foundIndex = -1\n }\n }\n } else {\n if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n for (i = byteOffset; i >= 0; i--) {\n let found = true\n for (let j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false\n break\n }\n }\n if (found) return i\n }\n }\n\n return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n offset = Number(offset) || 0\n const remaining = buf.length - offset\n if (!length) {\n length = remaining\n } else {\n length = Number(length)\n if (length > remaining) {\n length = remaining\n }\n }\n\n const strLen = string.length\n\n if (length > strLen / 2) {\n length = strLen / 2\n }\n let i\n for (i = 0; i < length; ++i) {\n const parsed = parseInt(string.substr(i * 2, 2), 16)\n if (numberIsNaN(parsed)) return i\n buf[offset + i] = parsed\n }\n return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n // Buffer#write(string)\n if (offset === undefined) {\n encoding = 'utf8'\n length = this.length\n offset = 0\n // Buffer#write(string, encoding)\n } else if (length === undefined && typeof offset === 'string') {\n encoding = offset\n length = this.length\n offset = 0\n // Buffer#write(string, offset[, length][, encoding])\n } else if (isFinite(offset)) {\n offset = offset >>> 0\n if (isFinite(length)) {\n length = length >>> 0\n if (encoding === undefined) encoding = 'utf8'\n } else {\n encoding = length\n length = undefined\n }\n } else {\n throw new Error(\n 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n )\n }\n\n const remaining = this.length - offset\n if (length === undefined || length > remaining) length = remaining\n\n if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n throw new RangeError('Attempt to write outside buffer bounds')\n }\n\n if (!encoding) encoding = 'utf8'\n\n let loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'hex':\n return hexWrite(this, string, offset, length)\n\n case 'utf8':\n case 'utf-8':\n return utf8Write(this, string, offset, length)\n\n case 'ascii':\n case 'latin1':\n case 'binary':\n return asciiWrite(this, string, offset, length)\n\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return base64Write(this, string, offset, length)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return ucs2Write(this, string, offset, length)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0)\n }\n}\n\nfunction base64Slice (buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf)\n } else {\n return base64.fromByteArray(buf.slice(start, end))\n }\n}\n\nfunction utf8Slice (buf, start, end) {\n end = Math.min(buf.length, end)\n const res = []\n\n let i = start\n while (i < end) {\n const firstByte = buf[i]\n let codePoint = null\n let bytesPerSequence = (firstByte > 0xEF)\n ? 4\n : (firstByte > 0xDF)\n ? 3\n : (firstByte > 0xBF)\n ? 2\n : 1\n\n if (i + bytesPerSequence <= end) {\n let secondByte, thirdByte, fourthByte, tempCodePoint\n\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 0x80) {\n codePoint = firstByte\n }\n break\n case 2:\n secondByte = buf[i + 1]\n if ((secondByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n if (tempCodePoint > 0x7F) {\n codePoint = tempCodePoint\n }\n }\n break\n case 3:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n codePoint = tempCodePoint\n }\n }\n break\n case 4:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n fourthByte = buf[i + 3]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n codePoint = tempCodePoint\n }\n }\n }\n }\n\n if (codePoint === null) {\n // we did not generate a valid codePoint so insert a\n // replacement char (U+FFFD) and advance only 1 byte\n codePoint = 0xFFFD\n bytesPerSequence = 1\n } else if (codePoint > 0xFFFF) {\n // encode to utf16 (surrogate pair dance)\n codePoint -= 0x10000\n res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n codePoint = 0xDC00 | codePoint & 0x3FF\n }\n\n res.push(codePoint)\n i += bytesPerSequence\n }\n\n return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nconst MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n const len = codePoints.length\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n }\n\n // Decode in chunks to avoid \"call stack size exceeded\".\n let res = ''\n let i = 0\n while (i < len) {\n res += String.fromCharCode.apply(\n String,\n codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n )\n }\n return res\n}\n\nfunction asciiSlice (buf, start, end) {\n let ret = ''\n end = Math.min(buf.length, end)\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F)\n }\n return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n let ret = ''\n end = Math.min(buf.length, end)\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i])\n }\n return ret\n}\n\nfunction hexSlice (buf, start, end) {\n const len = buf.length\n\n if (!start || start < 0) start = 0\n if (!end || end < 0 || end > len) end = len\n\n let out = ''\n for (let i = start; i < end; ++i) {\n out += hexSliceLookupTable[buf[i]]\n }\n return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n const bytes = buf.slice(start, end)\n let res = ''\n // If bytes.length is odd, the last 8 bits must be ignored (same as node.js)\n for (let i = 0; i < bytes.length - 1; i += 2) {\n res += String.fromCharCode(bytes[i] + (bytes[i + 1] * 256))\n }\n return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n const len = this.length\n start = ~~start\n end = end === undefined ? len : ~~end\n\n if (start < 0) {\n start += len\n if (start < 0) start = 0\n } else if (start > len) {\n start = len\n }\n\n if (end < 0) {\n end += len\n if (end < 0) end = 0\n } else if (end > len) {\n end = len\n }\n\n if (end < start) end = start\n\n const newBuf = this.subarray(start, end)\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(newBuf, Buffer.prototype)\n\n return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUintLE =\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let val = this[offset]\n let mul = 1\n let i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUintBE =\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n checkOffset(offset, byteLength, this.length)\n }\n\n let val = this[offset + --byteLength]\n let mul = 1\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUint8 =\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n return this[offset]\n}\n\nBuffer.prototype.readUint16LE =\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUint16BE =\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUint32LE =\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return ((this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16)) +\n (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUint32BE =\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] * 0x1000000) +\n ((this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n this[offset + 3])\n}\n\nBuffer.prototype.readBigUInt64LE = defineBigIntMethod(function readBigUInt64LE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const lo = first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24\n\n const hi = this[++offset] +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n last * 2 ** 24\n\n return BigInt(lo) + (BigInt(hi) << BigInt(32))\n})\n\nBuffer.prototype.readBigUInt64BE = defineBigIntMethod(function readBigUInt64BE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const hi = first * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset]\n\n const lo = this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last\n\n return (BigInt(hi) << BigInt(32)) + BigInt(lo)\n})\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let val = this[offset]\n let mul = 1\n let i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let i = byteLength\n let mul = 1\n let val = this[offset + --i]\n while (i > 0 && (mul *= 0x100)) {\n val += this[offset + --i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n if (!(this[offset] & 0x80)) return (this[offset])\n return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n const val = this[offset] | (this[offset + 1] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n const val = this[offset + 1] | (this[offset] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16) |\n (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] << 24) |\n (this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n (this[offset + 3])\n}\n\nBuffer.prototype.readBigInt64LE = defineBigIntMethod(function readBigInt64LE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const val = this[offset + 4] +\n this[offset + 5] * 2 ** 8 +\n this[offset + 6] * 2 ** 16 +\n (last << 24) // Overflow\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24)\n})\n\nBuffer.prototype.readBigInt64BE = defineBigIntMethod(function readBigInt64BE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const val = (first << 24) + // Overflow\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset]\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last)\n})\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUintLE =\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n let mul = 1\n let i = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUintBE =\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n let i = byteLength - 1\n let mul = 1\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUint8 =\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeUint16LE =\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeUint16BE =\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeUint32LE =\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset + 3] = (value >>> 24)\n this[offset + 2] = (value >>> 16)\n this[offset + 1] = (value >>> 8)\n this[offset] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeUint32BE =\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nfunction wrtBigUInt64LE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7)\n\n let lo = Number(value & BigInt(0xffffffff))\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n return offset\n}\n\nfunction wrtBigUInt64BE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7)\n\n let lo = Number(value & BigInt(0xffffffff))\n buf[offset + 7] = lo\n lo = lo >> 8\n buf[offset + 6] = lo\n lo = lo >> 8\n buf[offset + 5] = lo\n lo = lo >> 8\n buf[offset + 4] = lo\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n buf[offset + 3] = hi\n hi = hi >> 8\n buf[offset + 2] = hi\n hi = hi >> 8\n buf[offset + 1] = hi\n hi = hi >> 8\n buf[offset] = hi\n return offset + 8\n}\n\nBuffer.prototype.writeBigUInt64LE = defineBigIntMethod(function writeBigUInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeBigUInt64BE = defineBigIntMethod(function writeBigUInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n let i = 0\n let mul = 1\n let sub = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n let i = byteLength - 1\n let mul = 1\n let sub = 0\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n if (value < 0) value = 0xff + value + 1\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n this[offset + 2] = (value >>> 16)\n this[offset + 3] = (value >>> 24)\n return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (value < 0) value = 0xffffffff + value + 1\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeBigInt64LE = defineBigIntMethod(function writeBigInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nBuffer.prototype.writeBigInt64BE = defineBigIntMethod(function writeBigInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n }\n ieee754.write(buf, value, offset, littleEndian, 23, 4)\n return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n }\n ieee754.write(buf, value, offset, littleEndian, 52, 8)\n return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n if (!Buffer.isBuffer(target)) throw new TypeError('argument should be a Buffer')\n if (!start) start = 0\n if (!end && end !== 0) end = this.length\n if (targetStart >= target.length) targetStart = target.length\n if (!targetStart) targetStart = 0\n if (end > 0 && end < start) end = start\n\n // Copy 0 bytes; we're done\n if (end === start) return 0\n if (target.length === 0 || this.length === 0) return 0\n\n // Fatal error conditions\n if (targetStart < 0) {\n throw new RangeError('targetStart out of bounds')\n }\n if (start < 0 || start >= this.length) throw new RangeError('Index out of range')\n if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n // Are we oob?\n if (end > this.length) end = this.length\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start\n }\n\n const len = end - start\n\n if (this === target && typeof Uint8Array.prototype.copyWithin === 'function') {\n // Use built-in when available, missing from IE11\n this.copyWithin(targetStart, start, end)\n } else {\n Uint8Array.prototype.set.call(\n target,\n this.subarray(start, end),\n targetStart\n )\n }\n\n return len\n}\n\n// Usage:\n// buffer.fill(number[, offset[, end]])\n// buffer.fill(buffer[, offset[, end]])\n// buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n // Handle string cases:\n if (typeof val === 'string') {\n if (typeof start === 'string') {\n encoding = start\n start = 0\n end = this.length\n } else if (typeof end === 'string') {\n encoding = end\n end = this.length\n }\n if (encoding !== undefined && typeof encoding !== 'string') {\n throw new TypeError('encoding must be a string')\n }\n if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n if (val.length === 1) {\n const code = val.charCodeAt(0)\n if ((encoding === 'utf8' && code < 128) ||\n encoding === 'latin1') {\n // Fast path: If `val` fits into a single byte, use that numeric value.\n val = code\n }\n }\n } else if (typeof val === 'number') {\n val = val & 255\n } else if (typeof val === 'boolean') {\n val = Number(val)\n }\n\n // Invalid ranges are not set to a default, so can range check early.\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError('Out of range index')\n }\n\n if (end <= start) {\n return this\n }\n\n start = start >>> 0\n end = end === undefined ? this.length : end >>> 0\n\n if (!val) val = 0\n\n let i\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val\n }\n } else {\n const bytes = Buffer.isBuffer(val)\n ? val\n : Buffer.from(val, encoding)\n const len = bytes.length\n if (len === 0) {\n throw new TypeError('The value \"' + val +\n '\" is invalid for argument \"value\"')\n }\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len]\n }\n }\n\n return this\n}\n\n// CUSTOM ERRORS\n// =============\n\n// Simplified versions from Node, changed for Buffer-only usage\nconst errors = {}\nfunction E (sym, getMessage, Base) {\n errors[sym] = class NodeError extends Base {\n constructor () {\n super()\n\n Object.defineProperty(this, 'message', {\n value: getMessage.apply(this, arguments),\n writable: true,\n configurable: true\n })\n\n // Add the error code to the name to include it in the stack trace.\n this.name = `${this.name} [${sym}]`\n // Access the stack to generate the error message including the error code\n // from the name.\n this.stack // eslint-disable-line no-unused-expressions\n // Reset the name to the actual name.\n delete this.name\n }\n\n get code () {\n return sym\n }\n\n set code (value) {\n Object.defineProperty(this, 'code', {\n configurable: true,\n enumerable: true,\n value,\n writable: true\n })\n }\n\n toString () {\n return `${this.name} [${sym}]: ${this.message}`\n }\n }\n}\n\nE('ERR_BUFFER_OUT_OF_BOUNDS',\n function (name) {\n if (name) {\n return `${name} is outside of buffer bounds`\n }\n\n return 'Attempt to access memory outside buffer bounds'\n }, RangeError)\nE('ERR_INVALID_ARG_TYPE',\n function (name, actual) {\n return `The \"${name}\" argument must be of type number. Received type ${typeof actual}`\n }, TypeError)\nE('ERR_OUT_OF_RANGE',\n function (str, range, input) {\n let msg = `The value of \"${str}\" is out of range.`\n let received = input\n if (Number.isInteger(input) && Math.abs(input) > 2 ** 32) {\n received = addNumericalSeparator(String(input))\n } else if (typeof input === 'bigint') {\n received = String(input)\n if (input > BigInt(2) ** BigInt(32) || input < -(BigInt(2) ** BigInt(32))) {\n received = addNumericalSeparator(received)\n }\n received += 'n'\n }\n msg += ` It must be ${range}. Received ${received}`\n return msg\n }, RangeError)\n\nfunction addNumericalSeparator (val) {\n let res = ''\n let i = val.length\n const start = val[0] === '-' ? 1 : 0\n for (; i >= start + 4; i -= 3) {\n res = `_${val.slice(i - 3, i)}${res}`\n }\n return `${val.slice(0, i)}${res}`\n}\n\n// CHECK FUNCTIONS\n// ===============\n\nfunction checkBounds (buf, offset, byteLength) {\n validateNumber(offset, 'offset')\n if (buf[offset] === undefined || buf[offset + byteLength] === undefined) {\n boundsError(offset, buf.length - (byteLength + 1))\n }\n}\n\nfunction checkIntBI (value, min, max, buf, offset, byteLength) {\n if (value > max || value < min) {\n const n = typeof min === 'bigint' ? 'n' : ''\n let range\n if (byteLength > 3) {\n if (min === 0 || min === BigInt(0)) {\n range = `>= 0${n} and < 2${n} ** ${(byteLength + 1) * 8}${n}`\n } else {\n range = `>= -(2${n} ** ${(byteLength + 1) * 8 - 1}${n}) and < 2 ** ` +\n `${(byteLength + 1) * 8 - 1}${n}`\n }\n } else {\n range = `>= ${min}${n} and <= ${max}${n}`\n }\n throw new errors.ERR_OUT_OF_RANGE('value', range, value)\n }\n checkBounds(buf, offset, byteLength)\n}\n\nfunction validateNumber (value, name) {\n if (typeof value !== 'number') {\n throw new errors.ERR_INVALID_ARG_TYPE(name, 'number', value)\n }\n}\n\nfunction boundsError (value, length, type) {\n if (Math.floor(value) !== value) {\n validateNumber(value, type)\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset', 'an integer', value)\n }\n\n if (length < 0) {\n throw new errors.ERR_BUFFER_OUT_OF_BOUNDS()\n }\n\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset',\n `>= ${type ? 1 : 0} and <= ${length}`,\n value)\n}\n\n// HELPER FUNCTIONS\n// ================\n\nconst INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n // Node takes equal signs as end of the Base64 encoding\n str = str.split('=')[0]\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = str.trim().replace(INVALID_BASE64_RE, '')\n // Node converts strings with length < 2 to ''\n if (str.length < 2) return ''\n // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n while (str.length % 4 !== 0) {\n str = str + '='\n }\n return str\n}\n\nfunction utf8ToBytes (string, units) {\n units = units || Infinity\n let codePoint\n const length = string.length\n let leadSurrogate = null\n const bytes = []\n\n for (let i = 0; i < length; ++i) {\n codePoint = string.charCodeAt(i)\n\n // is surrogate component\n if (codePoint > 0xD7FF && codePoint < 0xE000) {\n // last char was a lead\n if (!leadSurrogate) {\n // no lead yet\n if (codePoint > 0xDBFF) {\n // unexpected trail\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n } else if (i + 1 === length) {\n // unpaired lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n }\n\n // valid lead\n leadSurrogate = codePoint\n\n continue\n }\n\n // 2 leads in a row\n if (codePoint < 0xDC00) {\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n leadSurrogate = codePoint\n continue\n }\n\n // valid surrogate pair\n codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n } else if (leadSurrogate) {\n // valid bmp char, but last char was a lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n }\n\n leadSurrogate = null\n\n // encode utf8\n if (codePoint < 0x80) {\n if ((units -= 1) < 0) break\n bytes.push(codePoint)\n } else if (codePoint < 0x800) {\n if ((units -= 2) < 0) break\n bytes.push(\n codePoint >> 0x6 | 0xC0,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x10000) {\n if ((units -= 3) < 0) break\n bytes.push(\n codePoint >> 0xC | 0xE0,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x110000) {\n if ((units -= 4) < 0) break\n bytes.push(\n codePoint >> 0x12 | 0xF0,\n codePoint >> 0xC & 0x3F | 0x80,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else {\n throw new Error('Invalid code point')\n }\n }\n\n return bytes\n}\n\nfunction asciiToBytes (str) {\n const byteArray = []\n for (let i = 0; i < str.length; ++i) {\n // Node's code seems to be doing this and not & 0x7F..\n byteArray.push(str.charCodeAt(i) & 0xFF)\n }\n return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n let c, hi, lo\n const byteArray = []\n for (let i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0) break\n\n c = str.charCodeAt(i)\n hi = c >> 8\n lo = c % 256\n byteArray.push(lo)\n byteArray.push(hi)\n }\n\n return byteArray\n}\n\nfunction base64ToBytes (str) {\n return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n let i\n for (i = 0; i < length; ++i) {\n if ((i + offset >= dst.length) || (i >= src.length)) break\n dst[i + offset] = src[i]\n }\n return i\n}\n\n// ArrayBuffer or Uint8Array objects from other contexts (i.e. iframes) do not pass\n// the `instanceof` check but they should be treated as of that type.\n// See: https://github.com/feross/buffer/issues/166\nfunction isInstance (obj, type) {\n return obj instanceof type ||\n (obj != null && obj.constructor != null && obj.constructor.name != null &&\n obj.constructor.name === type.name)\n}\nfunction numberIsNaN (obj) {\n // For IE11 support\n return obj !== obj // eslint-disable-line no-self-compare\n}\n\n// Create lookup table for `toString('hex')`\n// See: https://github.com/feross/buffer/issues/219\nconst hexSliceLookupTable = (function () {\n const alphabet = '0123456789abcdef'\n const table = new Array(256)\n for (let i = 0; i < 16; ++i) {\n const i16 = i * 16\n for (let j = 0; j < 16; ++j) {\n table[i16 + j] = alphabet[i] + alphabet[j]\n }\n }\n return table\n})()\n\n// Return not function with Error if BigInt not supported\nfunction defineBigIntMethod (fn) {\n return typeof BigInt === 'undefined' ? BufferBigIntNotDefined : fn\n}\n\nfunction BufferBigIntNotDefined () {\n throw new Error('BigInt not supported')\n}\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\nvar R = typeof Reflect === 'object' ? Reflect : null\nvar ReflectApply = R && typeof R.apply === 'function'\n ? R.apply\n : function ReflectApply(target, receiver, args) {\n return Function.prototype.apply.call(target, receiver, args);\n }\n\nvar ReflectOwnKeys\nif (R && typeof R.ownKeys === 'function') {\n ReflectOwnKeys = R.ownKeys\n} else if (Object.getOwnPropertySymbols) {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target)\n .concat(Object.getOwnPropertySymbols(target));\n };\n} else {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target);\n };\n}\n\nfunction ProcessEmitWarning(warning) {\n if (console && console.warn) console.warn(warning);\n}\n\nvar NumberIsNaN = Number.isNaN || function NumberIsNaN(value) {\n return value !== value;\n}\n\nfunction EventEmitter() {\n EventEmitter.init.call(this);\n}\nmodule.exports = EventEmitter;\nmodule.exports.once = once;\n\n// Backwards-compat with node 0.10.x\nEventEmitter.EventEmitter = EventEmitter;\n\nEventEmitter.prototype._events = undefined;\nEventEmitter.prototype._eventsCount = 0;\nEventEmitter.prototype._maxListeners = undefined;\n\n// By default EventEmitters will print a warning if more than 10 listeners are\n// added to it. This is a useful default which helps finding memory leaks.\nvar defaultMaxListeners = 10;\n\nfunction checkListener(listener) {\n if (typeof listener !== 'function') {\n throw new TypeError('The \"listener\" argument must be of type Function. Received type ' + typeof listener);\n }\n}\n\nObject.defineProperty(EventEmitter, 'defaultMaxListeners', {\n enumerable: true,\n get: function() {\n return defaultMaxListeners;\n },\n set: function(arg) {\n if (typeof arg !== 'number' || arg < 0 || NumberIsNaN(arg)) {\n throw new RangeError('The value of \"defaultMaxListeners\" is out of range. It must be a non-negative number. Received ' + arg + '.');\n }\n defaultMaxListeners = arg;\n }\n});\n\nEventEmitter.init = function() {\n\n if (this._events === undefined ||\n this._events === Object.getPrototypeOf(this)._events) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n }\n\n this._maxListeners = this._maxListeners || undefined;\n};\n\n// Obviously not all Emitters should be limited to 10. This function allows\n// that to be increased. Set to zero for unlimited.\nEventEmitter.prototype.setMaxListeners = function setMaxListeners(n) {\n if (typeof n !== 'number' || n < 0 || NumberIsNaN(n)) {\n throw new RangeError('The value of \"n\" is out of range. It must be a non-negative number. Received ' + n + '.');\n }\n this._maxListeners = n;\n return this;\n};\n\nfunction _getMaxListeners(that) {\n if (that._maxListeners === undefined)\n return EventEmitter.defaultMaxListeners;\n return that._maxListeners;\n}\n\nEventEmitter.prototype.getMaxListeners = function getMaxListeners() {\n return _getMaxListeners(this);\n};\n\nEventEmitter.prototype.emit = function emit(type) {\n var args = [];\n for (var i = 1; i < arguments.length; i++) args.push(arguments[i]);\n var doError = (type === 'error');\n\n var events = this._events;\n if (events !== undefined)\n doError = (doError && events.error === undefined);\n else if (!doError)\n return false;\n\n // If there is no 'error' event listener then throw.\n if (doError) {\n var er;\n if (args.length > 0)\n er = args[0];\n if (er instanceof Error) {\n // Note: The comments on the `throw` lines are intentional, they show\n // up in Node's output if this results in an unhandled exception.\n throw er; // Unhandled 'error' event\n }\n // At least give some kind of context to the user\n var err = new Error('Unhandled error.' + (er ? ' (' + er.message + ')' : ''));\n err.context = er;\n throw err; // Unhandled 'error' event\n }\n\n var handler = events[type];\n\n if (handler === undefined)\n return false;\n\n if (typeof handler === 'function') {\n ReflectApply(handler, this, args);\n } else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n ReflectApply(listeners[i], this, args);\n }\n\n return true;\n};\n\nfunction _addListener(target, type, listener, prepend) {\n var m;\n var events;\n var existing;\n\n checkListener(listener);\n\n events = target._events;\n if (events === undefined) {\n events = target._events = Object.create(null);\n target._eventsCount = 0;\n } else {\n // To avoid recursion in the case that type === \"newListener\"! Before\n // adding it to the listeners, first emit \"newListener\".\n if (events.newListener !== undefined) {\n target.emit('newListener', type,\n listener.listener ? listener.listener : listener);\n\n // Re-assign `events` because a newListener handler could have caused the\n // this._events to be assigned to a new object\n events = target._events;\n }\n existing = events[type];\n }\n\n if (existing === undefined) {\n // Optimize the case of one listener. Don't need the extra array object.\n existing = events[type] = listener;\n ++target._eventsCount;\n } else {\n if (typeof existing === 'function') {\n // Adding the second element, need to change to array.\n existing = events[type] =\n prepend ? [listener, existing] : [existing, listener];\n // If we've already got an array, just append.\n } else if (prepend) {\n existing.unshift(listener);\n } else {\n existing.push(listener);\n }\n\n // Check for listener leak\n m = _getMaxListeners(target);\n if (m > 0 && existing.length > m && !existing.warned) {\n existing.warned = true;\n // No error code for this since it is a Warning\n // eslint-disable-next-line no-restricted-syntax\n var w = new Error('Possible EventEmitter memory leak detected. ' +\n existing.length + ' ' + String(type) + ' listeners ' +\n 'added. Use emitter.setMaxListeners() to ' +\n 'increase limit');\n w.name = 'MaxListenersExceededWarning';\n w.emitter = target;\n w.type = type;\n w.count = existing.length;\n ProcessEmitWarning(w);\n }\n }\n\n return target;\n}\n\nEventEmitter.prototype.addListener = function addListener(type, listener) {\n return _addListener(this, type, listener, false);\n};\n\nEventEmitter.prototype.on = EventEmitter.prototype.addListener;\n\nEventEmitter.prototype.prependListener =\n function prependListener(type, listener) {\n return _addListener(this, type, listener, true);\n };\n\nfunction onceWrapper() {\n if (!this.fired) {\n this.target.removeListener(this.type, this.wrapFn);\n this.fired = true;\n if (arguments.length === 0)\n return this.listener.call(this.target);\n return this.listener.apply(this.target, arguments);\n }\n}\n\nfunction _onceWrap(target, type, listener) {\n var state = { fired: false, wrapFn: undefined, target: target, type: type, listener: listener };\n var wrapped = onceWrapper.bind(state);\n wrapped.listener = listener;\n state.wrapFn = wrapped;\n return wrapped;\n}\n\nEventEmitter.prototype.once = function once(type, listener) {\n checkListener(listener);\n this.on(type, _onceWrap(this, type, listener));\n return this;\n};\n\nEventEmitter.prototype.prependOnceListener =\n function prependOnceListener(type, listener) {\n checkListener(listener);\n this.prependListener(type, _onceWrap(this, type, listener));\n return this;\n };\n\n// Emits a 'removeListener' event if and only if the listener was removed.\nEventEmitter.prototype.removeListener =\n function removeListener(type, listener) {\n var list, events, position, i, originalListener;\n\n checkListener(listener);\n\n events = this._events;\n if (events === undefined)\n return this;\n\n list = events[type];\n if (list === undefined)\n return this;\n\n if (list === listener || list.listener === listener) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else {\n delete events[type];\n if (events.removeListener)\n this.emit('removeListener', type, list.listener || listener);\n }\n } else if (typeof list !== 'function') {\n position = -1;\n\n for (i = list.length - 1; i >= 0; i--) {\n if (list[i] === listener || list[i].listener === listener) {\n originalListener = list[i].listener;\n position = i;\n break;\n }\n }\n\n if (position < 0)\n return this;\n\n if (position === 0)\n list.shift();\n else {\n spliceOne(list, position);\n }\n\n if (list.length === 1)\n events[type] = list[0];\n\n if (events.removeListener !== undefined)\n this.emit('removeListener', type, originalListener || listener);\n }\n\n return this;\n };\n\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\n\nEventEmitter.prototype.removeAllListeners =\n function removeAllListeners(type) {\n var listeners, events, i;\n\n events = this._events;\n if (events === undefined)\n return this;\n\n // not listening for removeListener, no need to emit\n if (events.removeListener === undefined) {\n if (arguments.length === 0) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n } else if (events[type] !== undefined) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else\n delete events[type];\n }\n return this;\n }\n\n // emit removeListener for all listeners on all events\n if (arguments.length === 0) {\n var keys = Object.keys(events);\n var key;\n for (i = 0; i < keys.length; ++i) {\n key = keys[i];\n if (key === 'removeListener') continue;\n this.removeAllListeners(key);\n }\n this.removeAllListeners('removeListener');\n this._events = Object.create(null);\n this._eventsCount = 0;\n return this;\n }\n\n listeners = events[type];\n\n if (typeof listeners === 'function') {\n this.removeListener(type, listeners);\n } else if (listeners !== undefined) {\n // LIFO order\n for (i = listeners.length - 1; i >= 0; i--) {\n this.removeListener(type, listeners[i]);\n }\n }\n\n return this;\n };\n\nfunction _listeners(target, type, unwrap) {\n var events = target._events;\n\n if (events === undefined)\n return [];\n\n var evlistener = events[type];\n if (evlistener === undefined)\n return [];\n\n if (typeof evlistener === 'function')\n return unwrap ? [evlistener.listener || evlistener] : [evlistener];\n\n return unwrap ?\n unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length);\n}\n\nEventEmitter.prototype.listeners = function listeners(type) {\n return _listeners(this, type, true);\n};\n\nEventEmitter.prototype.rawListeners = function rawListeners(type) {\n return _listeners(this, type, false);\n};\n\nEventEmitter.listenerCount = function(emitter, type) {\n if (typeof emitter.listenerCount === 'function') {\n return emitter.listenerCount(type);\n } else {\n return listenerCount.call(emitter, type);\n }\n};\n\nEventEmitter.prototype.listenerCount = listenerCount;\nfunction listenerCount(type) {\n var events = this._events;\n\n if (events !== undefined) {\n var evlistener = events[type];\n\n if (typeof evlistener === 'function') {\n return 1;\n } else if (evlistener !== undefined) {\n return evlistener.length;\n }\n }\n\n return 0;\n}\n\nEventEmitter.prototype.eventNames = function eventNames() {\n return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : [];\n};\n\nfunction arrayClone(arr, n) {\n var copy = new Array(n);\n for (var i = 0; i < n; ++i)\n copy[i] = arr[i];\n return copy;\n}\n\nfunction spliceOne(list, index) {\n for (; index + 1 < list.length; index++)\n list[index] = list[index + 1];\n list.pop();\n}\n\nfunction unwrapListeners(arr) {\n var ret = new Array(arr.length);\n for (var i = 0; i < ret.length; ++i) {\n ret[i] = arr[i].listener || arr[i];\n }\n return ret;\n}\n\nfunction once(emitter, name) {\n return new Promise(function (resolve, reject) {\n function errorListener(err) {\n emitter.removeListener(name, resolver);\n reject(err);\n }\n\n function resolver() {\n if (typeof emitter.removeListener === 'function') {\n emitter.removeListener('error', errorListener);\n }\n resolve([].slice.call(arguments));\n };\n\n eventTargetAgnosticAddListener(emitter, name, resolver, { once: true });\n if (name !== 'error') {\n addErrorHandlerIfEventEmitter(emitter, errorListener, { once: true });\n }\n });\n}\n\nfunction addErrorHandlerIfEventEmitter(emitter, handler, flags) {\n if (typeof emitter.on === 'function') {\n eventTargetAgnosticAddListener(emitter, 'error', handler, flags);\n }\n}\n\nfunction eventTargetAgnosticAddListener(emitter, name, listener, flags) {\n if (typeof emitter.on === 'function') {\n if (flags.once) {\n emitter.once(name, listener);\n } else {\n emitter.on(name, listener);\n }\n } else if (typeof emitter.addEventListener === 'function') {\n // EventTarget does not have `error` event semantics like Node\n // EventEmitters, we do not listen for `error` events here.\n emitter.addEventListener(name, function wrapListener(arg) {\n // IE does not have builtin `{ once: true }` support so we\n // have to do it manually.\n if (flags.once) {\n emitter.removeEventListener(name, wrapListener);\n }\n listener(arg);\n });\n } else {\n throw new TypeError('The \"emitter\" argument must be of type EventEmitter. Received type ' + typeof emitter);\n }\n}\n","/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */\nexports.read = function (buffer, offset, isLE, mLen, nBytes) {\n var e, m\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var nBits = -7\n var i = isLE ? (nBytes - 1) : 0\n var d = isLE ? -1 : 1\n var s = buffer[offset + i]\n\n i += d\n\n e = s & ((1 << (-nBits)) - 1)\n s >>= (-nBits)\n nBits += eLen\n for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & ((1 << (-nBits)) - 1)\n e >>= (-nBits)\n nBits += mLen\n for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias\n } else if (e === eMax) {\n return m ? NaN : ((s ? -1 : 1) * Infinity)\n } else {\n m = m + Math.pow(2, mLen)\n e = e - eBias\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n var i = isLE ? 0 : (nBytes - 1)\n var d = isLE ? 1 : -1\n var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n value = Math.abs(value)\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0\n e = eMax\n } else {\n e = Math.floor(Math.log(value) / Math.LN2)\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--\n c *= 2\n }\n if (e + eBias >= 1) {\n value += rt / c\n } else {\n value += rt * Math.pow(2, 1 - eBias)\n }\n if (value * c >= 2) {\n e++\n c /= 2\n }\n\n if (e + eBias >= eMax) {\n m = 0\n e = eMax\n } else if (e + eBias >= 1) {\n m = ((value * c) - 1) * Math.pow(2, mLen)\n e = e + eBias\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n e = 0\n }\n }\n\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n e = (e << mLen) | m\n eLen += mLen\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128\n}\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView');\n\nmodule.exports = DataView;\n","var hashClear = require('./_hashClear'),\n hashDelete = require('./_hashDelete'),\n hashGet = require('./_hashGet'),\n hashHas = require('./_hashHas'),\n hashSet = require('./_hashSet');\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\nmodule.exports = Hash;\n","var listCacheClear = require('./_listCacheClear'),\n listCacheDelete = require('./_listCacheDelete'),\n listCacheGet = require('./_listCacheGet'),\n listCacheHas = require('./_listCacheHas'),\n listCacheSet = require('./_listCacheSet');\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\nmodule.exports = ListCache;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map');\n\nmodule.exports = Map;\n","var mapCacheClear = require('./_mapCacheClear'),\n mapCacheDelete = require('./_mapCacheDelete'),\n mapCacheGet = require('./_mapCacheGet'),\n mapCacheHas = require('./_mapCacheHas'),\n mapCacheSet = require('./_mapCacheSet');\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\nmodule.exports = MapCache;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Promise = getNative(root, 'Promise');\n\nmodule.exports = Promise;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Set = getNative(root, 'Set');\n\nmodule.exports = Set;\n","var MapCache = require('./_MapCache'),\n setCacheAdd = require('./_setCacheAdd'),\n setCacheHas = require('./_setCacheHas');\n\n/**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\nfunction SetCache(values) {\n var index = -1,\n length = values == null ? 0 : values.length;\n\n this.__data__ = new MapCache;\n while (++index < length) {\n this.add(values[index]);\n }\n}\n\n// Add methods to `SetCache`.\nSetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\nSetCache.prototype.has = setCacheHas;\n\nmodule.exports = SetCache;\n","var ListCache = require('./_ListCache'),\n stackClear = require('./_stackClear'),\n stackDelete = require('./_stackDelete'),\n stackGet = require('./_stackGet'),\n stackHas = require('./_stackHas'),\n stackSet = require('./_stackSet');\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\nmodule.exports = Stack;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Uint8Array = root.Uint8Array;\n\nmodule.exports = Uint8Array;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar WeakMap = getNative(root, 'WeakMap');\n\nmodule.exports = WeakMap;\n","/**\n * A specialized version of `_.forEach` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\nfunction arrayEach(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (iteratee(array[index], index, array) === false) {\n break;\n }\n }\n return array;\n}\n\nmodule.exports = arrayEach;\n","/**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\nfunction arrayFilter(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result[resIndex++] = value;\n }\n }\n return result;\n}\n\nmodule.exports = arrayFilter;\n","var baseTimes = require('./_baseTimes'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isIndex = require('./_isIndex'),\n isTypedArray = require('./isTypedArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = arrayLikeKeys;\n","/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n}\n\nmodule.exports = arrayPush;\n","/**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\nfunction arraySome(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (predicate(array[index], index, array)) {\n return true;\n }\n }\n return false;\n}\n\nmodule.exports = arraySome;\n","var baseAssignValue = require('./_baseAssignValue'),\n eq = require('./eq');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\nmodule.exports = assignValue;\n","var eq = require('./eq');\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\nmodule.exports = assocIndexOf;\n","var copyObject = require('./_copyObject'),\n keys = require('./keys');\n\n/**\n * The base implementation of `_.assign` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssign(object, source) {\n return object && copyObject(source, keys(source), object);\n}\n\nmodule.exports = baseAssign;\n","var copyObject = require('./_copyObject'),\n keysIn = require('./keysIn');\n\n/**\n * The base implementation of `_.assignIn` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssignIn(object, source) {\n return object && copyObject(source, keysIn(source), object);\n}\n\nmodule.exports = baseAssignIn;\n","var defineProperty = require('./_defineProperty');\n\n/**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction baseAssignValue(object, key, value) {\n if (key == '__proto__' && defineProperty) {\n defineProperty(object, key, {\n 'configurable': true,\n 'enumerable': true,\n 'value': value,\n 'writable': true\n });\n } else {\n object[key] = value;\n }\n}\n\nmodule.exports = baseAssignValue;\n","var Stack = require('./_Stack'),\n arrayEach = require('./_arrayEach'),\n assignValue = require('./_assignValue'),\n baseAssign = require('./_baseAssign'),\n baseAssignIn = require('./_baseAssignIn'),\n cloneBuffer = require('./_cloneBuffer'),\n copyArray = require('./_copyArray'),\n copySymbols = require('./_copySymbols'),\n copySymbolsIn = require('./_copySymbolsIn'),\n getAllKeys = require('./_getAllKeys'),\n getAllKeysIn = require('./_getAllKeysIn'),\n getTag = require('./_getTag'),\n initCloneArray = require('./_initCloneArray'),\n initCloneByTag = require('./_initCloneByTag'),\n initCloneObject = require('./_initCloneObject'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isMap = require('./isMap'),\n isObject = require('./isObject'),\n isSet = require('./isSet'),\n keys = require('./keys'),\n keysIn = require('./keysIn');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_FLAT_FLAG = 2,\n CLONE_SYMBOLS_FLAG = 4;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values supported by `_.clone`. */\nvar cloneableTags = {};\ncloneableTags[argsTag] = cloneableTags[arrayTag] =\ncloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =\ncloneableTags[boolTag] = cloneableTags[dateTag] =\ncloneableTags[float32Tag] = cloneableTags[float64Tag] =\ncloneableTags[int8Tag] = cloneableTags[int16Tag] =\ncloneableTags[int32Tag] = cloneableTags[mapTag] =\ncloneableTags[numberTag] = cloneableTags[objectTag] =\ncloneableTags[regexpTag] = cloneableTags[setTag] =\ncloneableTags[stringTag] = cloneableTags[symbolTag] =\ncloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =\ncloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;\ncloneableTags[errorTag] = cloneableTags[funcTag] =\ncloneableTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.clone` and `_.cloneDeep` which tracks\n * traversed objects.\n *\n * @private\n * @param {*} value The value to clone.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Deep clone\n * 2 - Flatten inherited properties\n * 4 - Clone symbols\n * @param {Function} [customizer] The function to customize cloning.\n * @param {string} [key] The key of `value`.\n * @param {Object} [object] The parent object of `value`.\n * @param {Object} [stack] Tracks traversed objects and their clone counterparts.\n * @returns {*} Returns the cloned value.\n */\nfunction baseClone(value, bitmask, customizer, key, object, stack) {\n var result,\n isDeep = bitmask & CLONE_DEEP_FLAG,\n isFlat = bitmask & CLONE_FLAT_FLAG,\n isFull = bitmask & CLONE_SYMBOLS_FLAG;\n\n if (customizer) {\n result = object ? customizer(value, key, object, stack) : customizer(value);\n }\n if (result !== undefined) {\n return result;\n }\n if (!isObject(value)) {\n return value;\n }\n var isArr = isArray(value);\n if (isArr) {\n result = initCloneArray(value);\n if (!isDeep) {\n return copyArray(value, result);\n }\n } else {\n var tag = getTag(value),\n isFunc = tag == funcTag || tag == genTag;\n\n if (isBuffer(value)) {\n return cloneBuffer(value, isDeep);\n }\n if (tag == objectTag || tag == argsTag || (isFunc && !object)) {\n result = (isFlat || isFunc) ? {} : initCloneObject(value);\n if (!isDeep) {\n return isFlat\n ? copySymbolsIn(value, baseAssignIn(result, value))\n : copySymbols(value, baseAssign(result, value));\n }\n } else {\n if (!cloneableTags[tag]) {\n return object ? value : {};\n }\n result = initCloneByTag(value, tag, isDeep);\n }\n }\n // Check for circular references and return its corresponding clone.\n stack || (stack = new Stack);\n var stacked = stack.get(value);\n if (stacked) {\n return stacked;\n }\n stack.set(value, result);\n\n if (isSet(value)) {\n value.forEach(function(subValue) {\n result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));\n });\n } else if (isMap(value)) {\n value.forEach(function(subValue, key) {\n result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n }\n\n var keysFunc = isFull\n ? (isFlat ? getAllKeysIn : getAllKeys)\n : (isFlat ? keysIn : keys);\n\n var props = isArr ? undefined : keysFunc(value);\n arrayEach(props || value, function(subValue, key) {\n if (props) {\n key = subValue;\n subValue = value[key];\n }\n // Recursively populate clone (susceptible to call stack limits).\n assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n return result;\n}\n\nmodule.exports = baseClone;\n","var isObject = require('./isObject');\n\n/** Built-in value references. */\nvar objectCreate = Object.create;\n\n/**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} proto The object to inherit from.\n * @returns {Object} Returns the new object.\n */\nvar baseCreate = (function() {\n function object() {}\n return function(proto) {\n if (!isObject(proto)) {\n return {};\n }\n if (objectCreate) {\n return objectCreate(proto);\n }\n object.prototype = proto;\n var result = new object;\n object.prototype = undefined;\n return result;\n };\n}());\n\nmodule.exports = baseCreate;\n","var arrayPush = require('./_arrayPush'),\n isArray = require('./isArray');\n\n/**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction baseGetAllKeys(object, keysFunc, symbolsFunc) {\n var result = keysFunc(object);\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n}\n\nmodule.exports = baseGetAllKeys;\n","var Symbol = require('./_Symbol'),\n getRawTag = require('./_getRawTag'),\n objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]';\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\nmodule.exports = baseIsArguments;\n","var baseIsEqualDeep = require('./_baseIsEqualDeep'),\n isObjectLike = require('./isObjectLike');\n\n/**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Unordered comparison\n * 2 - Partial comparison\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\nfunction baseIsEqual(value, other, bitmask, customizer, stack) {\n if (value === other) {\n return true;\n }\n if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\n return value !== value && other !== other;\n }\n return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n}\n\nmodule.exports = baseIsEqual;\n","var Stack = require('./_Stack'),\n equalArrays = require('./_equalArrays'),\n equalByTag = require('./_equalByTag'),\n equalObjects = require('./_equalObjects'),\n getTag = require('./_getTag'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isTypedArray = require('./isTypedArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n var objIsArr = isArray(object),\n othIsArr = isArray(other),\n objTag = objIsArr ? arrayTag : getTag(object),\n othTag = othIsArr ? arrayTag : getTag(other);\n\n objTag = objTag == argsTag ? objectTag : objTag;\n othTag = othTag == argsTag ? objectTag : othTag;\n\n var objIsObj = objTag == objectTag,\n othIsObj = othTag == objectTag,\n isSameTag = objTag == othTag;\n\n if (isSameTag && isBuffer(object)) {\n if (!isBuffer(other)) {\n return false;\n }\n objIsArr = true;\n objIsObj = false;\n }\n if (isSameTag && !objIsObj) {\n stack || (stack = new Stack);\n return (objIsArr || isTypedArray(object))\n ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n }\n if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n if (objIsWrapped || othIsWrapped) {\n var objUnwrapped = objIsWrapped ? object.value() : object,\n othUnwrapped = othIsWrapped ? other.value() : other;\n\n stack || (stack = new Stack);\n return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n }\n }\n if (!isSameTag) {\n return false;\n }\n stack || (stack = new Stack);\n return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n}\n\nmodule.exports = baseIsEqualDeep;\n","var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]';\n\n/**\n * The base implementation of `_.isMap` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n */\nfunction baseIsMap(value) {\n return isObjectLike(value) && getTag(value) == mapTag;\n}\n\nmodule.exports = baseIsMap;\n","var isFunction = require('./isFunction'),\n isMasked = require('./_isMasked'),\n isObject = require('./isObject'),\n toSource = require('./_toSource');\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\nmodule.exports = baseIsNative;\n","var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar setTag = '[object Set]';\n\n/**\n * The base implementation of `_.isSet` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n */\nfunction baseIsSet(value) {\n return isObjectLike(value) && getTag(value) == setTag;\n}\n\nmodule.exports = baseIsSet;\n","var baseGetTag = require('./_baseGetTag'),\n isLength = require('./isLength'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n\nmodule.exports = baseIsTypedArray;\n","var isPrototype = require('./_isPrototype'),\n nativeKeys = require('./_nativeKeys');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeys;\n","var isObject = require('./isObject'),\n isPrototype = require('./_isPrototype'),\n nativeKeysIn = require('./_nativeKeysIn');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeysIn(object) {\n if (!isObject(object)) {\n return nativeKeysIn(object);\n }\n var isProto = isPrototype(object),\n result = [];\n\n for (var key in object) {\n if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeysIn;\n","/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\nmodule.exports = baseTimes;\n","/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n return function(value) {\n return func(value);\n };\n}\n\nmodule.exports = baseUnary;\n","/**\n * Checks if a `cache` value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction cacheHas(cache, key) {\n return cache.has(key);\n}\n\nmodule.exports = cacheHas;\n","var Uint8Array = require('./_Uint8Array');\n\n/**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\nfunction cloneArrayBuffer(arrayBuffer) {\n var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n return result;\n}\n\nmodule.exports = cloneArrayBuffer;\n","var root = require('./_root');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined,\n allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;\n\n/**\n * Creates a clone of `buffer`.\n *\n * @private\n * @param {Buffer} buffer The buffer to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Buffer} Returns the cloned buffer.\n */\nfunction cloneBuffer(buffer, isDeep) {\n if (isDeep) {\n return buffer.slice();\n }\n var length = buffer.length,\n result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\n\n buffer.copy(result);\n return result;\n}\n\nmodule.exports = cloneBuffer;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer');\n\n/**\n * Creates a clone of `dataView`.\n *\n * @private\n * @param {Object} dataView The data view to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned data view.\n */\nfunction cloneDataView(dataView, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;\n return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);\n}\n\nmodule.exports = cloneDataView;\n","/** Used to match `RegExp` flags from their coerced string values. */\nvar reFlags = /\\w*$/;\n\n/**\n * Creates a clone of `regexp`.\n *\n * @private\n * @param {Object} regexp The regexp to clone.\n * @returns {Object} Returns the cloned regexp.\n */\nfunction cloneRegExp(regexp) {\n var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));\n result.lastIndex = regexp.lastIndex;\n return result;\n}\n\nmodule.exports = cloneRegExp;\n","var Symbol = require('./_Symbol');\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * Creates a clone of the `symbol` object.\n *\n * @private\n * @param {Object} symbol The symbol object to clone.\n * @returns {Object} Returns the cloned symbol object.\n */\nfunction cloneSymbol(symbol) {\n return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};\n}\n\nmodule.exports = cloneSymbol;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer');\n\n/**\n * Creates a clone of `typedArray`.\n *\n * @private\n * @param {Object} typedArray The typed array to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned typed array.\n */\nfunction cloneTypedArray(typedArray, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n}\n\nmodule.exports = cloneTypedArray;\n","/**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\nfunction copyArray(source, array) {\n var index = -1,\n length = source.length;\n\n array || (array = Array(length));\n while (++index < length) {\n array[index] = source[index];\n }\n return array;\n}\n\nmodule.exports = copyArray;\n","var assignValue = require('./_assignValue'),\n baseAssignValue = require('./_baseAssignValue');\n\n/**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\nfunction copyObject(source, props, object, customizer) {\n var isNew = !object;\n object || (object = {});\n\n var index = -1,\n length = props.length;\n\n while (++index < length) {\n var key = props[index];\n\n var newValue = customizer\n ? customizer(object[key], source[key], key, object, source)\n : undefined;\n\n if (newValue === undefined) {\n newValue = source[key];\n }\n if (isNew) {\n baseAssignValue(object, key, newValue);\n } else {\n assignValue(object, key, newValue);\n }\n }\n return object;\n}\n\nmodule.exports = copyObject;\n","var copyObject = require('./_copyObject'),\n getSymbols = require('./_getSymbols');\n\n/**\n * Copies own symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbols(source, object) {\n return copyObject(source, getSymbols(source), object);\n}\n\nmodule.exports = copySymbols;\n","var copyObject = require('./_copyObject'),\n getSymbolsIn = require('./_getSymbolsIn');\n\n/**\n * Copies own and inherited symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbolsIn(source, object) {\n return copyObject(source, getSymbolsIn(source), object);\n}\n\nmodule.exports = copySymbolsIn;\n","var root = require('./_root');\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\nmodule.exports = coreJsData;\n","var getNative = require('./_getNative');\n\nvar defineProperty = (function() {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n}());\n\nmodule.exports = defineProperty;\n","var SetCache = require('./_SetCache'),\n arraySome = require('./_arraySome'),\n cacheHas = require('./_cacheHas');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\nfunction equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n arrLength = array.length,\n othLength = other.length;\n\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n return false;\n }\n // Check that cyclic values are equal.\n var arrStacked = stack.get(array);\n var othStacked = stack.get(other);\n if (arrStacked && othStacked) {\n return arrStacked == other && othStacked == array;\n }\n var index = -1,\n result = true,\n seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n stack.set(array, other);\n stack.set(other, array);\n\n // Ignore non-index properties.\n while (++index < arrLength) {\n var arrValue = array[index],\n othValue = other[index];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, arrValue, index, other, array, stack)\n : customizer(arrValue, othValue, index, array, other, stack);\n }\n if (compared !== undefined) {\n if (compared) {\n continue;\n }\n result = false;\n break;\n }\n // Recursively compare arrays (susceptible to call stack limits).\n if (seen) {\n if (!arraySome(other, function(othValue, othIndex) {\n if (!cacheHas(seen, othIndex) &&\n (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n return seen.push(othIndex);\n }\n })) {\n result = false;\n break;\n }\n } else if (!(\n arrValue === othValue ||\n equalFunc(arrValue, othValue, bitmask, customizer, stack)\n )) {\n result = false;\n break;\n }\n }\n stack['delete'](array);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalArrays;\n","var Symbol = require('./_Symbol'),\n Uint8Array = require('./_Uint8Array'),\n eq = require('./eq'),\n equalArrays = require('./_equalArrays'),\n mapToArray = require('./_mapToArray'),\n setToArray = require('./_setToArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]';\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n switch (tag) {\n case dataViewTag:\n if ((object.byteLength != other.byteLength) ||\n (object.byteOffset != other.byteOffset)) {\n return false;\n }\n object = object.buffer;\n other = other.buffer;\n\n case arrayBufferTag:\n if ((object.byteLength != other.byteLength) ||\n !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n return false;\n }\n return true;\n\n case boolTag:\n case dateTag:\n case numberTag:\n // Coerce booleans to `1` or `0` and dates to milliseconds.\n // Invalid dates are coerced to `NaN`.\n return eq(+object, +other);\n\n case errorTag:\n return object.name == other.name && object.message == other.message;\n\n case regexpTag:\n case stringTag:\n // Coerce regexes to strings and treat strings, primitives and objects,\n // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n // for more details.\n return object == (other + '');\n\n case mapTag:\n var convert = mapToArray;\n\n case setTag:\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n convert || (convert = setToArray);\n\n if (object.size != other.size && !isPartial) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked) {\n return stacked == other;\n }\n bitmask |= COMPARE_UNORDERED_FLAG;\n\n // Recursively compare objects (susceptible to call stack limits).\n stack.set(object, other);\n var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n stack['delete'](object);\n return result;\n\n case symbolTag:\n if (symbolValueOf) {\n return symbolValueOf.call(object) == symbolValueOf.call(other);\n }\n }\n return false;\n}\n\nmodule.exports = equalByTag;\n","var getAllKeys = require('./_getAllKeys');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n objProps = getAllKeys(object),\n objLength = objProps.length,\n othProps = getAllKeys(other),\n othLength = othProps.length;\n\n if (objLength != othLength && !isPartial) {\n return false;\n }\n var index = objLength;\n while (index--) {\n var key = objProps[index];\n if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n return false;\n }\n }\n // Check that cyclic values are equal.\n var objStacked = stack.get(object);\n var othStacked = stack.get(other);\n if (objStacked && othStacked) {\n return objStacked == other && othStacked == object;\n }\n var result = true;\n stack.set(object, other);\n stack.set(other, object);\n\n var skipCtor = isPartial;\n while (++index < objLength) {\n key = objProps[index];\n var objValue = object[key],\n othValue = other[key];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, objValue, key, other, object, stack)\n : customizer(objValue, othValue, key, object, other, stack);\n }\n // Recursively compare objects (susceptible to call stack limits).\n if (!(compared === undefined\n ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n : compared\n )) {\n result = false;\n break;\n }\n skipCtor || (skipCtor = key == 'constructor');\n }\n if (result && !skipCtor) {\n var objCtor = object.constructor,\n othCtor = other.constructor;\n\n // Non `Object` object instances with different constructors are not equal.\n if (objCtor != othCtor &&\n ('constructor' in object && 'constructor' in other) &&\n !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n result = false;\n }\n }\n stack['delete'](object);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalObjects;\n","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n","var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbols = require('./_getSymbols'),\n keys = require('./keys');\n\n/**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeys(object) {\n return baseGetAllKeys(object, keys, getSymbols);\n}\n\nmodule.exports = getAllKeys;\n","var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbolsIn = require('./_getSymbolsIn'),\n keysIn = require('./keysIn');\n\n/**\n * Creates an array of own and inherited enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeysIn(object) {\n return baseGetAllKeys(object, keysIn, getSymbolsIn);\n}\n\nmodule.exports = getAllKeysIn;\n","var isKeyable = require('./_isKeyable');\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\nmodule.exports = getMapData;\n","var baseIsNative = require('./_baseIsNative'),\n getValue = require('./_getValue');\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\nmodule.exports = getNative;\n","var overArg = require('./_overArg');\n\n/** Built-in value references. */\nvar getPrototype = overArg(Object.getPrototypeOf, Object);\n\nmodule.exports = getPrototype;\n","var Symbol = require('./_Symbol');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nmodule.exports = getRawTag;\n","var arrayFilter = require('./_arrayFilter'),\n stubArray = require('./stubArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n if (object == null) {\n return [];\n }\n object = Object(object);\n return arrayFilter(nativeGetSymbols(object), function(symbol) {\n return propertyIsEnumerable.call(object, symbol);\n });\n};\n\nmodule.exports = getSymbols;\n","var arrayPush = require('./_arrayPush'),\n getPrototype = require('./_getPrototype'),\n getSymbols = require('./_getSymbols'),\n stubArray = require('./stubArray');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own and inherited enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {\n var result = [];\n while (object) {\n arrayPush(result, getSymbols(object));\n object = getPrototype(object);\n }\n return result;\n};\n\nmodule.exports = getSymbolsIn;\n","var DataView = require('./_DataView'),\n Map = require('./_Map'),\n Promise = require('./_Promise'),\n Set = require('./_Set'),\n WeakMap = require('./_WeakMap'),\n baseGetTag = require('./_baseGetTag'),\n toSource = require('./_toSource');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n setTag = '[object Set]',\n weakMapTag = '[object WeakMap]';\n\nvar dataViewTag = '[object DataView]';\n\n/** Used to detect maps, sets, and weakmaps. */\nvar dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nvar getTag = baseGetTag;\n\n// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\nif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = baseGetTag(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : '';\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n}\n\nmodule.exports = getTag;\n","/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\nmodule.exports = getValue;\n","var nativeCreate = require('./_nativeCreate');\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n}\n\nmodule.exports = hashClear;\n","/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = hashDelete;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\nmodule.exports = hashGet;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\nmodule.exports = hashHas;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\nmodule.exports = hashSet;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Initializes an array clone.\n *\n * @private\n * @param {Array} array The array to clone.\n * @returns {Array} Returns the initialized clone.\n */\nfunction initCloneArray(array) {\n var length = array.length,\n result = new array.constructor(length);\n\n // Add properties assigned by `RegExp#exec`.\n if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {\n result.index = array.index;\n result.input = array.input;\n }\n return result;\n}\n\nmodule.exports = initCloneArray;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer'),\n cloneDataView = require('./_cloneDataView'),\n cloneRegExp = require('./_cloneRegExp'),\n cloneSymbol = require('./_cloneSymbol'),\n cloneTypedArray = require('./_cloneTypedArray');\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/**\n * Initializes an object clone based on its `toStringTag`.\n *\n * **Note:** This function only supports cloning values with tags of\n * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.\n *\n * @private\n * @param {Object} object The object to clone.\n * @param {string} tag The `toStringTag` of the object to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneByTag(object, tag, isDeep) {\n var Ctor = object.constructor;\n switch (tag) {\n case arrayBufferTag:\n return cloneArrayBuffer(object);\n\n case boolTag:\n case dateTag:\n return new Ctor(+object);\n\n case dataViewTag:\n return cloneDataView(object, isDeep);\n\n case float32Tag: case float64Tag:\n case int8Tag: case int16Tag: case int32Tag:\n case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:\n return cloneTypedArray(object, isDeep);\n\n case mapTag:\n return new Ctor;\n\n case numberTag:\n case stringTag:\n return new Ctor(object);\n\n case regexpTag:\n return cloneRegExp(object);\n\n case setTag:\n return new Ctor;\n\n case symbolTag:\n return cloneSymbol(object);\n }\n}\n\nmodule.exports = initCloneByTag;\n","var baseCreate = require('./_baseCreate'),\n getPrototype = require('./_getPrototype'),\n isPrototype = require('./_isPrototype');\n\n/**\n * Initializes an object clone.\n *\n * @private\n * @param {Object} object The object to clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneObject(object) {\n return (typeof object.constructor == 'function' && !isPrototype(object))\n ? baseCreate(getPrototype(object))\n : {};\n}\n\nmodule.exports = initCloneObject;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n var type = typeof value;\n length = length == null ? MAX_SAFE_INTEGER : length;\n\n return !!length &&\n (type == 'number' ||\n (type != 'symbol' && reIsUint.test(value))) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\nmodule.exports = isIndex;\n","/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\nmodule.exports = isKeyable;\n","var coreJsData = require('./_coreJsData');\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\nmodule.exports = isMasked;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\nmodule.exports = isPrototype;\n","/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n}\n\nmodule.exports = listCacheClear;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype;\n\n/** Built-in value references. */\nvar splice = arrayProto.splice;\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n}\n\nmodule.exports = listCacheDelete;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\nmodule.exports = listCacheGet;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\nmodule.exports = listCacheHas;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\nmodule.exports = listCacheSet;\n","var Hash = require('./_Hash'),\n ListCache = require('./_ListCache'),\n Map = require('./_Map');\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\nmodule.exports = mapCacheClear;\n","var getMapData = require('./_getMapData');\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = mapCacheDelete;\n","var getMapData = require('./_getMapData');\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\nmodule.exports = mapCacheGet;\n","var getMapData = require('./_getMapData');\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\nmodule.exports = mapCacheHas;\n","var getMapData = require('./_getMapData');\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n}\n\nmodule.exports = mapCacheSet;\n","/**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\nfunction mapToArray(map) {\n var index = -1,\n result = Array(map.size);\n\n map.forEach(function(value, key) {\n result[++index] = [key, value];\n });\n return result;\n}\n\nmodule.exports = mapToArray;\n","var getNative = require('./_getNative');\n\n/* Built-in method references that are verified to be native. */\nvar nativeCreate = getNative(Object, 'create');\n\nmodule.exports = nativeCreate;\n","var overArg = require('./_overArg');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeKeys = overArg(Object.keys, Object);\n\nmodule.exports = nativeKeys;\n","/**\n * This function is like\n * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * except that it includes inherited enumerable properties.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction nativeKeysIn(object) {\n var result = [];\n if (object != null) {\n for (var key in Object(object)) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = nativeKeysIn;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n try {\n // Use `util.types` for Node.js 10+.\n var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n if (types) {\n return types;\n }\n\n // Legacy `process.binding('util')` for Node.js < 10.\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n}());\n\nmodule.exports = nodeUtil;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n","/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\nmodule.exports = overArg;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n","/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\nfunction setCacheAdd(value) {\n this.__data__.set(value, HASH_UNDEFINED);\n return this;\n}\n\nmodule.exports = setCacheAdd;\n","/**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\nfunction setCacheHas(value) {\n return this.__data__.has(value);\n}\n\nmodule.exports = setCacheHas;\n","/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\nfunction setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n}\n\nmodule.exports = setToArray;\n","var ListCache = require('./_ListCache');\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}\n\nmodule.exports = stackClear;\n","/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n var data = this.__data__,\n result = data['delete'](key);\n\n this.size = data.size;\n return result;\n}\n\nmodule.exports = stackDelete;\n","/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n return this.__data__.get(key);\n}\n\nmodule.exports = stackGet;\n","/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n return this.__data__.has(key);\n}\n\nmodule.exports = stackHas;\n","var ListCache = require('./_ListCache'),\n Map = require('./_Map'),\n MapCache = require('./_MapCache');\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n var data = this.__data__;\n if (data instanceof ListCache) {\n var pairs = data.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n this.size = ++data.size;\n return this;\n }\n data = this.__data__ = new MapCache(pairs);\n }\n data.set(key, value);\n this.size = data.size;\n return this;\n}\n\nmodule.exports = stackSet;\n","/** Used for built-in method references. */\nvar funcProto = Function.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\nmodule.exports = toSource;\n","var baseClone = require('./_baseClone');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_SYMBOLS_FLAG = 4;\n\n/**\n * This method is like `_.clone` except that it recursively clones `value`.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Lang\n * @param {*} value The value to recursively clone.\n * @returns {*} Returns the deep cloned value.\n * @see _.clone\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var deep = _.cloneDeep(objects);\n * console.log(deep[0] === objects[0]);\n * // => false\n */\nfunction cloneDeep(value) {\n return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);\n}\n\nmodule.exports = cloneDeep;\n","/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\nmodule.exports = eq;\n","var baseIsArguments = require('./_baseIsArguments'),\n isObjectLike = require('./isObjectLike');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n};\n\nmodule.exports = isArguments;\n","/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\nmodule.exports = isArray;\n","var isFunction = require('./isFunction'),\n isLength = require('./isLength');\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\nmodule.exports = isArrayLike;\n","var root = require('./_root'),\n stubFalse = require('./stubFalse');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\nmodule.exports = isBuffer;\n","var baseIsEqual = require('./_baseIsEqual');\n\n/**\n * Performs a deep comparison between two values to determine if they are\n * equivalent.\n *\n * **Note:** This method supports comparing arrays, array buffers, booleans,\n * date objects, error objects, maps, numbers, `Object` objects, regexes,\n * sets, strings, symbols, and typed arrays. `Object` objects are compared\n * by their own, not inherited, enumerable properties. Functions and DOM\n * nodes are compared by strict equality, i.e. `===`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.isEqual(object, other);\n * // => true\n *\n * object === other;\n * // => false\n */\nfunction isEqual(value, other) {\n return baseIsEqual(value, other);\n}\n\nmodule.exports = isEqual;\n","var baseGetTag = require('./_baseGetTag'),\n isObject = require('./isObject');\n\n/** `Object#toString` result references. */\nvar asyncTag = '[object AsyncFunction]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n proxyTag = '[object Proxy]';\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\nmodule.exports = isFunction;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\nmodule.exports = isLength;\n","var baseIsMap = require('./_baseIsMap'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsMap = nodeUtil && nodeUtil.isMap;\n\n/**\n * Checks if `value` is classified as a `Map` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n * @example\n *\n * _.isMap(new Map);\n * // => true\n *\n * _.isMap(new WeakMap);\n * // => false\n */\nvar isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;\n\nmodule.exports = isMap;\n","/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n","var baseIsSet = require('./_baseIsSet'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsSet = nodeUtil && nodeUtil.isSet;\n\n/**\n * Checks if `value` is classified as a `Set` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n * @example\n *\n * _.isSet(new Set);\n * // => true\n *\n * _.isSet(new WeakSet);\n * // => false\n */\nvar isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;\n\nmodule.exports = isSet;\n","var baseIsTypedArray = require('./_baseIsTypedArray'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\nmodule.exports = isTypedArray;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeys = require('./_baseKeys'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\nmodule.exports = keys;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeysIn = require('./_baseKeysIn'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\nfunction keysIn(object) {\n return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n}\n\nmodule.exports = keysIn;\n","/**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\nfunction stubArray() {\n return [];\n}\n\nmodule.exports = stubArray;\n","/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n return false;\n}\n\nmodule.exports = stubFalse;\n","import type { WebLayoutSnapshot } from \"@openfin/core-web\";\nimport type { Settings } from \"../shapes/setting-shapes\";\n\n/**\n * Fetches the settings for the application.\n * @returns The settings for the application.\n */\nexport async function getSettings(): Promise {\n\tconst settings = await getManifestSettings();\n\tif (settings === undefined) {\n\t\tconsole.error(\n\t\t\t\"Unable to run the example as settings are required and we fetch them from the link web manifest from the html page that is being served. It should exist in the customSettings section of the web manifest.\"\n\t\t);\n\t}\n\treturn settings;\n}\n\n/**\n * Returns a default layout from the settings if provided.\n * @returns The default layout from the settings.\n */\nexport async function getDefaultLayout(): Promise {\n\tconst settings = await getSettings();\n\tif (settings?.platform?.layout?.defaultLayout === undefined) {\n\t\tconsole.error(\n\t\t\t\"Unable to run the example as without a layout being defined. Please ensure that settings have been provided in the web manifest.\"\n\t\t);\n\t\treturn;\n\t}\n\tif (typeof settings.platform.layout.defaultLayout === \"string\") {\n\t\tconst layoutResponse = await fetch(settings.platform.layout.defaultLayout);\n\t\tconst layoutJson = (await layoutResponse.json()) as WebLayoutSnapshot;\n\t\treturn layoutJson;\n\t}\n\treturn settings.platform.layout.defaultLayout;\n}\n\n/**\n * Returns the settings from the manifest file.\n * @returns customSettings for this example\n */\nasync function getManifestSettings(): Promise {\n\t// Get the manifest link\n\tconst link = document.querySelector('link[rel=\"manifest\"]');\n\tif (link !== null) {\n\t\tconst manifestResponse = await fetch(link.href);\n\t\tconst manifestJson = (await manifestResponse.json()) as { custom_settings: Settings };\n\t\treturn manifestJson.custom_settings;\n\t}\n}\n","export { default as v1 } from './v1.js';\nexport { default as v3 } from './v3.js';\nexport { default as v4 } from './v4.js';\nexport { default as v5 } from './v5.js';\nexport { default as NIL } from './nil.js';\nexport { default as version } from './version.js';\nexport { default as validate } from './validate.js';\nexport { default as stringify } from './stringify.js';\nexport { default as parse } from './parse.js';","/*\n * Browser-compatible JavaScript MD5\n *\n * Modification of JavaScript MD5\n * https://github.com/blueimp/JavaScript-MD5\n *\n * Copyright 2011, Sebastian Tschan\n * https://blueimp.net\n *\n * Licensed under the MIT license:\n * https://opensource.org/licenses/MIT\n *\n * Based on\n * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message\n * Digest Algorithm, as defined in RFC 1321.\n * Version 2.2 Copyright (C) Paul Johnston 1999 - 2009\n * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet\n * Distributed under the BSD License\n * See http://pajhome.org.uk/crypt/md5 for more info.\n */\nfunction md5(bytes) {\n if (typeof bytes === 'string') {\n var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape\n\n bytes = new Uint8Array(msg.length);\n\n for (var i = 0; i < msg.length; ++i) {\n bytes[i] = msg.charCodeAt(i);\n }\n }\n\n return md5ToHexEncodedArray(wordsToMd5(bytesToWords(bytes), bytes.length * 8));\n}\n/*\n * Convert an array of little-endian words to an array of bytes\n */\n\n\nfunction md5ToHexEncodedArray(input) {\n var output = [];\n var length32 = input.length * 32;\n var hexTab = '0123456789abcdef';\n\n for (var i = 0; i < length32; i += 8) {\n var x = input[i >> 5] >>> i % 32 & 0xff;\n var hex = parseInt(hexTab.charAt(x >>> 4 & 0x0f) + hexTab.charAt(x & 0x0f), 16);\n output.push(hex);\n }\n\n return output;\n}\n/**\n * Calculate output length with padding and bit length\n */\n\n\nfunction getOutputLength(inputLength8) {\n return (inputLength8 + 64 >>> 9 << 4) + 14 + 1;\n}\n/*\n * Calculate the MD5 of an array of little-endian words, and a bit length.\n */\n\n\nfunction wordsToMd5(x, len) {\n /* append padding */\n x[len >> 5] |= 0x80 << len % 32;\n x[getOutputLength(len) - 1] = len;\n var a = 1732584193;\n var b = -271733879;\n var c = -1732584194;\n var d = 271733878;\n\n for (var i = 0; i < x.length; i += 16) {\n var olda = a;\n var oldb = b;\n var oldc = c;\n var oldd = d;\n a = md5ff(a, b, c, d, x[i], 7, -680876936);\n d = md5ff(d, a, b, c, x[i + 1], 12, -389564586);\n c = md5ff(c, d, a, b, x[i + 2], 17, 606105819);\n b = md5ff(b, c, d, a, x[i + 3], 22, -1044525330);\n a = md5ff(a, b, c, d, x[i + 4], 7, -176418897);\n d = md5ff(d, a, b, c, x[i + 5], 12, 1200080426);\n c = md5ff(c, d, a, b, x[i + 6], 17, -1473231341);\n b = md5ff(b, c, d, a, x[i + 7], 22, -45705983);\n a = md5ff(a, b, c, d, x[i + 8], 7, 1770035416);\n d = md5ff(d, a, b, c, x[i + 9], 12, -1958414417);\n c = md5ff(c, d, a, b, x[i + 10], 17, -42063);\n b = md5ff(b, c, d, a, x[i + 11], 22, -1990404162);\n a = md5ff(a, b, c, d, x[i + 12], 7, 1804603682);\n d = md5ff(d, a, b, c, x[i + 13], 12, -40341101);\n c = md5ff(c, d, a, b, x[i + 14], 17, -1502002290);\n b = md5ff(b, c, d, a, x[i + 15], 22, 1236535329);\n a = md5gg(a, b, c, d, x[i + 1], 5, -165796510);\n d = md5gg(d, a, b, c, x[i + 6], 9, -1069501632);\n c = md5gg(c, d, a, b, x[i + 11], 14, 643717713);\n b = md5gg(b, c, d, a, x[i], 20, -373897302);\n a = md5gg(a, b, c, d, x[i + 5], 5, -701558691);\n d = md5gg(d, a, b, c, x[i + 10], 9, 38016083);\n c = md5gg(c, d, a, b, x[i + 15], 14, -660478335);\n b = md5gg(b, c, d, a, x[i + 4], 20, -405537848);\n a = md5gg(a, b, c, d, x[i + 9], 5, 568446438);\n d = md5gg(d, a, b, c, x[i + 14], 9, -1019803690);\n c = md5gg(c, d, a, b, x[i + 3], 14, -187363961);\n b = md5gg(b, c, d, a, x[i + 8], 20, 1163531501);\n a = md5gg(a, b, c, d, x[i + 13], 5, -1444681467);\n d = md5gg(d, a, b, c, x[i + 2], 9, -51403784);\n c = md5gg(c, d, a, b, x[i + 7], 14, 1735328473);\n b = md5gg(b, c, d, a, x[i + 12], 20, -1926607734);\n a = md5hh(a, b, c, d, x[i + 5], 4, -378558);\n d = md5hh(d, a, b, c, x[i + 8], 11, -2022574463);\n c = md5hh(c, d, a, b, x[i + 11], 16, 1839030562);\n b = md5hh(b, c, d, a, x[i + 14], 23, -35309556);\n a = md5hh(a, b, c, d, x[i + 1], 4, -1530992060);\n d = md5hh(d, a, b, c, x[i + 4], 11, 1272893353);\n c = md5hh(c, d, a, b, x[i + 7], 16, -155497632);\n b = md5hh(b, c, d, a, x[i + 10], 23, -1094730640);\n a = md5hh(a, b, c, d, x[i + 13], 4, 681279174);\n d = md5hh(d, a, b, c, x[i], 11, -358537222);\n c = md5hh(c, d, a, b, x[i + 3], 16, -722521979);\n b = md5hh(b, c, d, a, x[i + 6], 23, 76029189);\n a = md5hh(a, b, c, d, x[i + 9], 4, -640364487);\n d = md5hh(d, a, b, c, x[i + 12], 11, -421815835);\n c = md5hh(c, d, a, b, x[i + 15], 16, 530742520);\n b = md5hh(b, c, d, a, x[i + 2], 23, -995338651);\n a = md5ii(a, b, c, d, x[i], 6, -198630844);\n d = md5ii(d, a, b, c, x[i + 7], 10, 1126891415);\n c = md5ii(c, d, a, b, x[i + 14], 15, -1416354905);\n b = md5ii(b, c, d, a, x[i + 5], 21, -57434055);\n a = md5ii(a, b, c, d, x[i + 12], 6, 1700485571);\n d = md5ii(d, a, b, c, x[i + 3], 10, -1894986606);\n c = md5ii(c, d, a, b, x[i + 10], 15, -1051523);\n b = md5ii(b, c, d, a, x[i + 1], 21, -2054922799);\n a = md5ii(a, b, c, d, x[i + 8], 6, 1873313359);\n d = md5ii(d, a, b, c, x[i + 15], 10, -30611744);\n c = md5ii(c, d, a, b, x[i + 6], 15, -1560198380);\n b = md5ii(b, c, d, a, x[i + 13], 21, 1309151649);\n a = md5ii(a, b, c, d, x[i + 4], 6, -145523070);\n d = md5ii(d, a, b, c, x[i + 11], 10, -1120210379);\n c = md5ii(c, d, a, b, x[i + 2], 15, 718787259);\n b = md5ii(b, c, d, a, x[i + 9], 21, -343485551);\n a = safeAdd(a, olda);\n b = safeAdd(b, oldb);\n c = safeAdd(c, oldc);\n d = safeAdd(d, oldd);\n }\n\n return [a, b, c, d];\n}\n/*\n * Convert an array bytes to an array of little-endian words\n * Characters >255 have their high-byte silently ignored.\n */\n\n\nfunction bytesToWords(input) {\n if (input.length === 0) {\n return [];\n }\n\n var length8 = input.length * 8;\n var output = new Uint32Array(getOutputLength(length8));\n\n for (var i = 0; i < length8; i += 8) {\n output[i >> 5] |= (input[i / 8] & 0xff) << i % 32;\n }\n\n return output;\n}\n/*\n * Add integers, wrapping at 2^32. This uses 16-bit operations internally\n * to work around bugs in some JS interpreters.\n */\n\n\nfunction safeAdd(x, y) {\n var lsw = (x & 0xffff) + (y & 0xffff);\n var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n return msw << 16 | lsw & 0xffff;\n}\n/*\n * Bitwise rotate a 32-bit number to the left.\n */\n\n\nfunction bitRotateLeft(num, cnt) {\n return num << cnt | num >>> 32 - cnt;\n}\n/*\n * These functions implement the four basic operations the algorithm uses.\n */\n\n\nfunction md5cmn(q, a, b, x, s, t) {\n return safeAdd(bitRotateLeft(safeAdd(safeAdd(a, q), safeAdd(x, t)), s), b);\n}\n\nfunction md5ff(a, b, c, d, x, s, t) {\n return md5cmn(b & c | ~b & d, a, b, x, s, t);\n}\n\nfunction md5gg(a, b, c, d, x, s, t) {\n return md5cmn(b & d | c & ~d, a, b, x, s, t);\n}\n\nfunction md5hh(a, b, c, d, x, s, t) {\n return md5cmn(b ^ c ^ d, a, b, x, s, t);\n}\n\nfunction md5ii(a, b, c, d, x, s, t) {\n return md5cmn(c ^ (b | ~d), a, b, x, s, t);\n}\n\nexport default md5;","export default '00000000-0000-0000-0000-000000000000';","import validate from './validate.js';\n\nfunction parse(uuid) {\n if (!validate(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n var v;\n var arr = new Uint8Array(16); // Parse ########-....-....-....-............\n\n arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24;\n arr[1] = v >>> 16 & 0xff;\n arr[2] = v >>> 8 & 0xff;\n arr[3] = v & 0xff; // Parse ........-####-....-....-............\n\n arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8;\n arr[5] = v & 0xff; // Parse ........-....-####-....-............\n\n arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8;\n arr[7] = v & 0xff; // Parse ........-....-....-####-............\n\n arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8;\n arr[9] = v & 0xff; // Parse ........-....-....-....-############\n // (Use \"/\" to avoid 32-bit truncation when bit-shifting high-order bytes)\n\n arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff;\n arr[11] = v / 0x100000000 & 0xff;\n arr[12] = v >>> 24 & 0xff;\n arr[13] = v >>> 16 & 0xff;\n arr[14] = v >>> 8 & 0xff;\n arr[15] = v & 0xff;\n return arr;\n}\n\nexport default parse;","export default /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;","// Unique ID creation requires a high quality random # generator. In the browser we therefore\n// require the crypto API and do not support built-in fallback to lower quality random number\n// generators (like Math.random()).\nvar getRandomValues;\nvar rnds8 = new Uint8Array(16);\nexport default function rng() {\n // lazy load so that environments that need to polyfill have a chance to do so\n if (!getRandomValues) {\n // getRandomValues needs to be invoked in a context where \"this\" is a Crypto implementation. Also,\n // find the complete implementation of crypto (msCrypto) on IE11.\n getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto !== 'undefined' && typeof msCrypto.getRandomValues === 'function' && msCrypto.getRandomValues.bind(msCrypto);\n\n if (!getRandomValues) {\n throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');\n }\n }\n\n return getRandomValues(rnds8);\n}","// Adapted from Chris Veness' SHA1 code at\n// http://www.movable-type.co.uk/scripts/sha1.html\nfunction f(s, x, y, z) {\n switch (s) {\n case 0:\n return x & y ^ ~x & z;\n\n case 1:\n return x ^ y ^ z;\n\n case 2:\n return x & y ^ x & z ^ y & z;\n\n case 3:\n return x ^ y ^ z;\n }\n}\n\nfunction ROTL(x, n) {\n return x << n | x >>> 32 - n;\n}\n\nfunction sha1(bytes) {\n var K = [0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xca62c1d6];\n var H = [0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0];\n\n if (typeof bytes === 'string') {\n var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape\n\n bytes = [];\n\n for (var i = 0; i < msg.length; ++i) {\n bytes.push(msg.charCodeAt(i));\n }\n } else if (!Array.isArray(bytes)) {\n // Convert Array-like to Array\n bytes = Array.prototype.slice.call(bytes);\n }\n\n bytes.push(0x80);\n var l = bytes.length / 4 + 2;\n var N = Math.ceil(l / 16);\n var M = new Array(N);\n\n for (var _i = 0; _i < N; ++_i) {\n var arr = new Uint32Array(16);\n\n for (var j = 0; j < 16; ++j) {\n arr[j] = bytes[_i * 64 + j * 4] << 24 | bytes[_i * 64 + j * 4 + 1] << 16 | bytes[_i * 64 + j * 4 + 2] << 8 | bytes[_i * 64 + j * 4 + 3];\n }\n\n M[_i] = arr;\n }\n\n M[N - 1][14] = (bytes.length - 1) * 8 / Math.pow(2, 32);\n M[N - 1][14] = Math.floor(M[N - 1][14]);\n M[N - 1][15] = (bytes.length - 1) * 8 & 0xffffffff;\n\n for (var _i2 = 0; _i2 < N; ++_i2) {\n var W = new Uint32Array(80);\n\n for (var t = 0; t < 16; ++t) {\n W[t] = M[_i2][t];\n }\n\n for (var _t = 16; _t < 80; ++_t) {\n W[_t] = ROTL(W[_t - 3] ^ W[_t - 8] ^ W[_t - 14] ^ W[_t - 16], 1);\n }\n\n var a = H[0];\n var b = H[1];\n var c = H[2];\n var d = H[3];\n var e = H[4];\n\n for (var _t2 = 0; _t2 < 80; ++_t2) {\n var s = Math.floor(_t2 / 20);\n var T = ROTL(a, 5) + f(s, b, c, d) + e + K[s] + W[_t2] >>> 0;\n e = d;\n d = c;\n c = ROTL(b, 30) >>> 0;\n b = a;\n a = T;\n }\n\n H[0] = H[0] + a >>> 0;\n H[1] = H[1] + b >>> 0;\n H[2] = H[2] + c >>> 0;\n H[3] = H[3] + d >>> 0;\n H[4] = H[4] + e >>> 0;\n }\n\n return [H[0] >> 24 & 0xff, H[0] >> 16 & 0xff, H[0] >> 8 & 0xff, H[0] & 0xff, H[1] >> 24 & 0xff, H[1] >> 16 & 0xff, H[1] >> 8 & 0xff, H[1] & 0xff, H[2] >> 24 & 0xff, H[2] >> 16 & 0xff, H[2] >> 8 & 0xff, H[2] & 0xff, H[3] >> 24 & 0xff, H[3] >> 16 & 0xff, H[3] >> 8 & 0xff, H[3] & 0xff, H[4] >> 24 & 0xff, H[4] >> 16 & 0xff, H[4] >> 8 & 0xff, H[4] & 0xff];\n}\n\nexport default sha1;","import validate from './validate.js';\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\n\nvar byteToHex = [];\n\nfor (var i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).substr(1));\n}\n\nfunction stringify(arr) {\n var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n var uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!validate(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n\n return uuid;\n}\n\nexport default stringify;","import rng from './rng.js';\nimport stringify from './stringify.js'; // **`v1()` - Generate time-based UUID**\n//\n// Inspired by https://github.com/LiosK/UUID.js\n// and http://docs.python.org/library/uuid.html\n\nvar _nodeId;\n\nvar _clockseq; // Previous uuid creation time\n\n\nvar _lastMSecs = 0;\nvar _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details\n\nfunction v1(options, buf, offset) {\n var i = buf && offset || 0;\n var b = buf || new Array(16);\n options = options || {};\n var node = options.node || _nodeId;\n var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not\n // specified. We do this lazily to minimize issues related to insufficient\n // system entropy. See #189\n\n if (node == null || clockseq == null) {\n var seedBytes = options.random || (options.rng || rng)();\n\n if (node == null) {\n // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)\n node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]];\n }\n\n if (clockseq == null) {\n // Per 4.2.2, randomize (14 bit) clockseq\n clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;\n }\n } // UUID timestamps are 100 nano-second units since the Gregorian epoch,\n // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so\n // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'\n // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.\n\n\n var msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock\n // cycle to simulate higher resolution clock\n\n var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs)\n\n var dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression\n\n if (dt < 0 && options.clockseq === undefined) {\n clockseq = clockseq + 1 & 0x3fff;\n } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new\n // time interval\n\n\n if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {\n nsecs = 0;\n } // Per 4.2.1.2 Throw error if too many uuids are requested\n\n\n if (nsecs >= 10000) {\n throw new Error(\"uuid.v1(): Can't create more than 10M uuids/sec\");\n }\n\n _lastMSecs = msecs;\n _lastNSecs = nsecs;\n _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch\n\n msecs += 12219292800000; // `time_low`\n\n var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;\n b[i++] = tl >>> 24 & 0xff;\n b[i++] = tl >>> 16 & 0xff;\n b[i++] = tl >>> 8 & 0xff;\n b[i++] = tl & 0xff; // `time_mid`\n\n var tmh = msecs / 0x100000000 * 10000 & 0xfffffff;\n b[i++] = tmh >>> 8 & 0xff;\n b[i++] = tmh & 0xff; // `time_high_and_version`\n\n b[i++] = tmh >>> 24 & 0xf | 0x10; // include version\n\n b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)\n\n b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low`\n\n b[i++] = clockseq & 0xff; // `node`\n\n for (var n = 0; n < 6; ++n) {\n b[i + n] = node[n];\n }\n\n return buf || stringify(b);\n}\n\nexport default v1;","import v35 from './v35.js';\nimport md5 from './md5.js';\nvar v3 = v35('v3', 0x30, md5);\nexport default v3;","import stringify from './stringify.js';\nimport parse from './parse.js';\n\nfunction stringToBytes(str) {\n str = unescape(encodeURIComponent(str)); // UTF8 escape\n\n var bytes = [];\n\n for (var i = 0; i < str.length; ++i) {\n bytes.push(str.charCodeAt(i));\n }\n\n return bytes;\n}\n\nexport var DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8';\nexport var URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8';\nexport default function (name, version, hashfunc) {\n function generateUUID(value, namespace, buf, offset) {\n if (typeof value === 'string') {\n value = stringToBytes(value);\n }\n\n if (typeof namespace === 'string') {\n namespace = parse(namespace);\n }\n\n if (namespace.length !== 16) {\n throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)');\n } // Compute hash of namespace and value, Per 4.3\n // Future: Use spread syntax when supported on all platforms, e.g. `bytes =\n // hashfunc([...namespace, ... value])`\n\n\n var bytes = new Uint8Array(16 + value.length);\n bytes.set(namespace);\n bytes.set(value, namespace.length);\n bytes = hashfunc(bytes);\n bytes[6] = bytes[6] & 0x0f | version;\n bytes[8] = bytes[8] & 0x3f | 0x80;\n\n if (buf) {\n offset = offset || 0;\n\n for (var i = 0; i < 16; ++i) {\n buf[offset + i] = bytes[i];\n }\n\n return buf;\n }\n\n return stringify(bytes);\n } // Function#name is not settable on some platforms (#270)\n\n\n try {\n generateUUID.name = name; // eslint-disable-next-line no-empty\n } catch (err) {} // For CommonJS default export support\n\n\n generateUUID.DNS = DNS;\n generateUUID.URL = URL;\n return generateUUID;\n}","import rng from './rng.js';\nimport stringify from './stringify.js';\n\nfunction v4(options, buf, offset) {\n options = options || {};\n var rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n offset = offset || 0;\n\n for (var i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n\n return buf;\n }\n\n return stringify(rnds);\n}\n\nexport default v4;","import v35 from './v35.js';\nimport sha1 from './sha1.js';\nvar v5 = v35('v5', 0x50, sha1);\nexport default v5;","import REGEX from './regex.js';\n\nfunction validate(uuid) {\n return typeof uuid === 'string' && REGEX.test(uuid);\n}\n\nexport default validate;","import validate from './validate.js';\n\nfunction version(uuid) {\n if (!validate(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n return parseInt(uuid.substr(14, 1), 16);\n}\n\nexport default version;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","__webpack_require__.amdO = {};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = (module) => {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","import { type CloudInteropOverrideParams, cloudInteropOverride } from \"@openfin/cloud-interop\";\nimport type OpenFin from \"@openfin/core\";\nimport { connect } from \"@openfin/core-web\";\nimport { getDefaultLayout, getSettings } from \"./platform/settings\";\nimport type { Settings } from \"./shapes/setting-shapes\";\n\n/**\n * Sets up panels if supported.\n * @param settings The settings to use.\n */\nfunction setupPanels(settings: Settings): void {\n\tif (settings?.platform?.layout?.panels?.left) {\n\t\tconst leftPanel = settings.platform.layout.panels.left;\n\t\tconst leftPanelFrame = document.querySelector(`#${leftPanel.frameId}`);\n\t\tif (leftPanelFrame === null) {\n\t\t\tconsole.error(\n\t\t\t\t`Please ensure the document has an element with the following id #${leftPanel.frameContainerId} so that the web-layout can be applied.`\n\t\t\t);\n\t\t\treturn;\n\t\t}\n\t\tleftPanelFrame.src = leftPanel.url;\n\t\tconsole.log(`Panel ${leftPanel.frameId} has been setup with the url ${leftPanel.url}`);\n\t} else {\n\t\tconsole.log(\"No panels require setup.\");\n\t}\n}\n\n/**\n * Gets the required cloud settings.\n * @param settings The default settings.\n * @returns The cloud settings.\n */\nasync function getCloudSettings(settings: Settings): Promise {\n\tif (settings?.cloud?.connectParams?.url?.startsWith(\"http\")) {\n\t\treturn settings.cloud.connectParams;\n\t}\n\tconst mainPage = document.querySelector(\"#main-page\");\n\tconst cloudDetails = document.querySelector(\"#cloud-details\");\n\tconst btnSubmit = document.querySelector(\"#btnSubmit\");\n\tconst btnContinue = document.querySelector(\"#btnContinue\");\n\tmainPage?.classList.add(\"hidden\");\n\tcloudDetails?.classList.remove(\"hidden\");\n\n\treturn new Promise((resolve, reject) => {\n\t\tbtnContinue?.addEventListener(\"click\", async () => {\n\t\t\tcloudDetails?.classList.add(\"hidden\");\n\t\t\tmainPage?.classList.remove(\"hidden\");\n\t\t\treject(new Error(\"Running in local only mode as cloud interop settings have not been provided.\"));\n\t\t});\n\t\tbtnSubmit?.addEventListener(\"click\", async () => {\n\t\t\tconst userId = document.querySelector(\"#userId\")?.value;\n\t\t\tconst password = document.querySelector(\"#password\")?.value;\n\t\t\tconst platformId = document.querySelector(\"#platformId\")?.value;\n\t\t\tconst url = document.querySelector(\"#url\")?.value;\n\t\t\tconst sourceId = document.querySelector(\"#sourceId\")?.value;\n\t\t\tconst sourceDisplayName = document.querySelector(\"#sourceDisplayName\")?.value;\n\t\t\t// Check if the inputs are valid\n\t\t\tif (\n\t\t\t\tuserId === null ||\n\t\t\t\tpassword === null ||\n\t\t\t\tplatformId === null ||\n\t\t\t\turl === null ||\n\t\t\t\tuserId?.trim() === \"\" ||\n\t\t\t\tpassword?.trim() === \"\" ||\n\t\t\t\tplatformId?.trim() === \"\" ||\n\t\t\t\turl?.trim() === \"\"\n\t\t\t) {\n\t\t\t\treject(\n\t\t\t\t\tnew Error(\n\t\t\t\t\t\t\"Required cloud connect parameters are missing or invalid. Please check the settings. You will need configuration provided by OpenFin to connect to the cloud. Running in local only mode.\"\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}\n\t\t\tconst options = {\n\t\t\t\tuserId: userId ?? \"\",\n\t\t\t\tpassword: password ?? \"\",\n\t\t\t\tplatformId: platformId ?? \"\",\n\t\t\t\turl: url ?? \"\",\n\t\t\t\tsourceId: sourceId ?? \"cloud-interop\",\n\t\t\t\tsourceDisplayName: sourceDisplayName ?? \"Cloud Interop Example\"\n\t\t\t};\n\t\t\tcloudDetails?.classList.add(\"hidden\");\n\t\t\tmainPage?.classList.remove(\"hidden\");\n\t\t\tresolve(options);\n\t\t});\n\t});\n}\n\n/**\n * Initializes the OpenFin Web Broker and Cloud connection.\n */\nasync function init(): Promise {\n\t// Get the required settings\n\tconst settings = await getSettings();\n\t// Get the default layout\n\tconst layoutSnapshot = await getDefaultLayout();\n\n\tif (settings === undefined || layoutSnapshot === undefined) {\n\t\tconsole.error(\n\t\t\t\"Unable to run the sample as we have been unable to load the web manifest and it's settings from the currently running html page. Please ensure that the web manifest is being served and that it contains the custom_settings section.\"\n\t\t);\n\t\treturn;\n\t}\n\t// Get the dom element that should host the layout\n\tconst layoutContainer = document.querySelector(\n\t\t`#${settings.platform.layout.layoutContainerId}`\n\t);\n\tif (layoutContainer === null) {\n\t\tconsole.error(\n\t\t\t`Please ensure the document has an element with the following id #${settings.platform.layout.layoutContainerId} so that the web-layout can be applied.`\n\t\t);\n\t\treturn;\n\t}\n\tlet cloudSettings: CloudInteropOverrideParams | undefined;\n\ttry {\n\t\tcloudSettings = await getCloudSettings(settings);\n\t\tif (cloudSettings !== undefined) {\n\t\t\tsettings.cloud.connectParams = cloudSettings;\n\t\t}\n\t} catch (err) {\n\t\t// Get the element for displaying error messages\n\t\tconst error = document.querySelector(\"#error\");\n\t\tconsole.error(err);\n\t\tif (error !== null) {\n\t\t\terror.textContent = (err as Error).message;\n\t\t}\n\t}\n\t// Connect to the OpenFin Web Broker and pass the default layout.\n\t// It is good practice to specify providerId even if content is explicitly specifying it for cases where\n\t// this provider uses our layout system and content uses inheritance. currentContextGroup\n\t// is useful for defaulting any client that uses inheritance through our layout system.\n\tconst fin = await connect({\n\t\toptions: {\n\t\t\tbrokerUrl: settings.platform.interop.brokerUrl,\n\t\t\tinteropConfig: {\n\t\t\t\tproviderId: settings.platform.interop.providerId,\n\t\t\t\tcurrentContextGroup: settings.platform.interop.defaultContextGroup\n\t\t\t}\n\t\t},\n\t\tconnectionInheritance: \"enabled\",\n\t\tplatform: { layoutSnapshot }\n\t});\n\n\t// assign the fin api to the window object to make it globally available for consistency with container/workspace code.\n\twindow.fin = fin;\n\tif (cloudSettings === undefined) {\n\t\t// You may now use the `fin` object and initialize the Broker.\n\t\tawait fin.Interop.init(settings.platform.interop.providerId);\n\t} else {\n\t\t// You may now use the `fin` object and initialize the Broker with support for cloud interop.\n\t\tconst cloudOverride = (await cloudInteropOverride(\n\t\t\tcloudSettings\n\t\t)) as unknown as OpenFin.ConstructorOverride;\n\t\tawait fin.Interop.init(settings.platform.interop.providerId, [cloudOverride]);\n\t}\n\n\t// initialize the layout and pass it the dom element to bind to\n\tawait fin.Platform.Layout.init({\n\t\tcontainer: layoutContainer\n\t});\n\t// setup panels not that everything has been initialized\n\tsetupPanels(settings);\n}\n\ninit()\n\t.then(() => {\n\t\tconsole.log(\"Connected to the OpenFin Web Broker.\");\n\t\treturn true;\n\t})\n\t.catch((err) => console.error(err));\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/web/v19.2.0/cloud-interop/layouts/default.layout.fin.json b/web/v19.2.0/cloud-interop/layouts/default.layout.fin.json index 2716796..96ebdeb 100644 --- a/web/v19.2.0/cloud-interop/layouts/default.layout.fin.json +++ b/web/v19.2.0/cloud-interop/layouts/default.layout.fin.json @@ -33,7 +33,7 @@ "type": "component", "componentName": "view", "componentState": { - "url": "https://built-on-openfin.github.io/dev-extensions/extensions/v19.1.0/interop/fdc3/context/2-0/fdc3-broadcast-view.html", + "url": "https://built-on-openfin.github.io/dev-extensions/extensions/v19.2.0/interop/fdc3/context/2-0/fdc3-broadcast-view.html", "name": "internal-generated-view-54a8ef85-a885-4234-be46-9d52e88fcb74" }, "title": "FDC3 Different Domain" @@ -70,7 +70,7 @@ "type": "component", "componentName": "view", "componentState": { - "url": "https://built-on-openfin.github.io/dev-extensions/extensions/v19.1.0/interop/interop-api/context/interop-broadcast-view.html", + "url": "https://built-on-openfin.github.io/dev-extensions/extensions/v19.2.0/interop/interop-api/context/interop-broadcast-view.html", "name": "internal-generated-view-2d9a3624-fd0e-4e0a-b681-a79a9616b871" }, "title": "Interop External Domain" diff --git a/web/v19.2.0/web-client-api/js/shim-connect-fallback.api.bundle.js b/web/v19.2.0/web-client-api/js/shim-connect-fallback.api.bundle.js index 53b258f..7b7d2b0 100644 --- a/web/v19.2.0/web-client-api/js/shim-connect-fallback.api.bundle.js +++ b/web/v19.2.0/web-client-api/js/shim-connect-fallback.api.bundle.js @@ -1,2 +1,2 @@ -(()=>{"use strict";var e={554:(e,t)=>{async function o(e,t){try{console.log("Attempting to get the API with the following options:",t),await e.getAPI(t),console.log("OpenFin API shim applied")}catch(e){console.error("Failed to load the OpenFin API shim. Please note this is an example and you should implement your own approach for production.",e)}}Object.defineProperty(t,"__esModule",{value:!0}),t.init=async function(e){if(void 0===window.fin){console.log("Fin is not available. Importing the OpenFin API shim.");const t="https://built-on-openfin.github.io/web-starter/web/v19.1.0/web-client-api/js/web.client.api.bundle.js",n=await import(t);console.log("OpenFin API shim script imported."),console.log("Checking to see if the document is ready before requesting the API."),"loading"===document.readyState?(console.log("Document is still loading. Waiting for it to be ready using DOMContentLoaded."),document.addEventListener("DOMContentLoaded",(async()=>{await o(n,e)}))):(console.log("Document is available. Requesting API."),await o(n,e))}}}},t={};function o(n){var i=t[n];if(void 0!==i)return i.exports;var a=t[n]={exports:{}};return e[n](a,a.exports,o),a.exports}(()=>{const e=o(554);(async()=>{await(0,e.init)({target:window,requestConnectOptions:{strategy:"request-on-failure"}})})()})()})(); +(()=>{"use strict";var e={554:(e,t)=>{async function o(e,t){try{console.log("Attempting to get the API with the following options:",t),await e.getAPI(t),console.log("OpenFin API shim applied")}catch(e){console.error("Failed to load the OpenFin API shim. Please note this is an example and you should implement your own approach for production.",e)}}Object.defineProperty(t,"__esModule",{value:!0}),t.init=async function(e){if(void 0===window.fin){console.log("Fin is not available. Importing the OpenFin API shim.");const t="https://built-on-openfin.github.io/web-starter/web/v19.2.0/web-client-api/js/web.client.api.bundle.js",n=await import(t);console.log("OpenFin API shim script imported."),console.log("Checking to see if the document is ready before requesting the API."),"loading"===document.readyState?(console.log("Document is still loading. Waiting for it to be ready using DOMContentLoaded."),document.addEventListener("DOMContentLoaded",(async()=>{await o(n,e)}))):(console.log("Document is available. Requesting API."),await o(n,e))}}}},t={};function o(n){var i=t[n];if(void 0!==i)return i.exports;var a=t[n]={exports:{}};return e[n](a,a.exports,o),a.exports}(()=>{const e=o(554);(async()=>{await(0,e.init)({target:window,requestConnectOptions:{strategy:"request-on-failure"}})})()})()})(); //# sourceMappingURL=shim-connect-fallback.api.bundle.js.map \ No newline at end of file diff --git a/web/v19.2.0/web-client-api/js/shim-connect-fallback.api.bundle.js.map b/web/v19.2.0/web-client-api/js/shim-connect-fallback.api.bundle.js.map index 4fdaba9..359f274 100644 --- a/web/v19.2.0/web-client-api/js/shim-connect-fallback.api.bundle.js.map +++ b/web/v19.2.0/web-client-api/js/shim-connect-fallback.api.bundle.js.map @@ -1 +1 @@ -{"version":3,"file":"shim-connect-fallback.api.bundle.js","mappings":"sCAoCAA,eAAeC,EACdC,EACAC,GAEA,IACCC,QAAQC,IAAI,wDAAyDF,SAC/DD,EAAUI,OAAOH,GACvBC,QAAQC,IAAI,2BACb,CAAE,MAAOE,GACRH,QAAQG,MACP,iIACAA,EAEF,CACD,C,iDA3CA,OAAOP,eAAoBG,GAC1B,QAAmBK,IAAfC,OAAOC,IAAmB,CAC7BN,QAAQC,IAAI,yDACZ,MAAMM,EACL,wGACKT,QAAkBU,OAAiCD,GACzDP,QAAQC,IAAI,qCACZD,QAAQC,IAAI,uEACgB,YAAxBQ,SAASC,YACZV,QAAQC,IAAI,iFACZQ,SAASE,iBAAiB,oBAAoBf,gBACvCC,EAAcC,EAAWC,EAAQ,MAGxCC,QAAQC,IAAI,gDACNJ,EAAcC,EAAWC,GAEjC,CACD,C,GCxBIa,EAA2B,CAAC,EAGhC,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqBV,IAAjBW,EACH,OAAOA,EAAaC,QAGrB,IAAIC,EAASL,EAAyBE,GAAY,CAGjDE,QAAS,CAAC,GAOX,OAHAE,EAAoBJ,GAAUG,EAAQA,EAAOD,QAASH,GAG/CI,EAAOD,OACf,C,MCrBA,eAEA,iBACO,IAAAG,MAAK,CACVC,OAAQf,OACRgB,sBAAuB,CAAEC,SAAU,uBAEpC,EALD,E","sources":["webpack://openfin-web--web-client-api/./client/src/shim-client.ts","webpack://openfin-web--web-client-api/webpack/bootstrap","webpack://openfin-web--web-client-api/./client/src/shim-connect-fallback.ts"],"sourcesContent":["import type { ClientOptions, DefaultAPIContainerShape } from \"./client-shapes\";\n\n/**\n * This function is used to load the OpenFin API shim if the OpenFin API is not available.\n * Takes a set of options to pass to the shim.\n * @param options The options to pass to the shim.\n */\nexport async function init(options: ClientOptions): Promise {\n\tif (window.fin === undefined) {\n\t\tconsole.log(\"Fin is not available. Importing the OpenFin API shim.\");\n\t\tconst url =\n\t\t\t\"https://built-on-openfin.github.io/web-starter/web/v19.1.0/web-client-api/js/web.client.api.bundle.js\";\n\t\tconst webClient = await import(/* webpackIgnore: true */ url);\n\t\tconsole.log(\"OpenFin API shim script imported.\");\n\t\tconsole.log(\"Checking to see if the document is ready before requesting the API.\");\n\t\tif (document.readyState === \"loading\") {\n\t\t\tconsole.log(\"Document is still loading. Waiting for it to be ready using DOMContentLoaded.\");\n\t\t\tdocument.addEventListener(\"DOMContentLoaded\", async () => {\n\t\t\t\tawait initWhenReady(webClient, options);\n\t\t\t});\n\t\t} else {\n\t\t\tconsole.log(\"Document is available. Requesting API.\");\n\t\t\tawait initWhenReady(webClient, options);\n\t\t}\n\t}\n}\n\n/**\n * This function is used to load the OpenFin API shim if the OpenFin API is not available.\n * It will be called when we know the document is ready as the core-web requires DOM access\n * and this is a shim that can be loaded by script and reliant on developers to do it when the\n * document is ready (either through defer or script placement/listeners).\n * @param webClient The web client fetched via import.\n * @param webClient.getAPI The function to get the API.\n * @param options The options to pass to the shim.\n */\nasync function initWhenReady(\n\twebClient: { getAPI: (options: ClientOptions) => Promise },\n\toptions: ClientOptions\n): Promise {\n\ttry {\n\t\tconsole.log(\"Attempting to get the API with the following options:\", options);\n\t\tawait webClient.getAPI(options);\n\t\tconsole.log(\"OpenFin API shim applied\");\n\t} catch (error) {\n\t\tconsole.error(\n\t\t\t\"Failed to load the OpenFin API shim. Please note this is an example and you should implement your own approach for production.\",\n\t\t\terror\n\t\t);\n\t}\n}\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","import type { DefaultAPIContainerShape } from \"./client-shapes\";\nimport { init } from \"./shim-client\";\n// eslint-disable-next-line @typescript-eslint/no-floating-promises, @typescript-eslint/explicit-function-return-type\n(async () => {\n\tawait init({\n\t\ttarget: window as unknown as DefaultAPIContainerShape,\n\t\trequestConnectOptions: { strategy: \"request-on-failure\" }\n\t});\n})();\n"],"names":["async","initWhenReady","webClient","options","console","log","getAPI","error","undefined","window","fin","url","import","document","readyState","addEventListener","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","exports","module","__webpack_modules__","init","target","requestConnectOptions","strategy"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"shim-connect-fallback.api.bundle.js","mappings":"sCAoCAA,eAAeC,EACdC,EACAC,GAEA,IACCC,QAAQC,IAAI,wDAAyDF,SAC/DD,EAAUI,OAAOH,GACvBC,QAAQC,IAAI,2BACb,CAAE,MAAOE,GACRH,QAAQG,MACP,iIACAA,EAEF,CACD,C,iDA3CA,OAAOP,eAAoBG,GAC1B,QAAmBK,IAAfC,OAAOC,IAAmB,CAC7BN,QAAQC,IAAI,yDACZ,MAAMM,EACL,wGACKT,QAAkBU,OAAiCD,GACzDP,QAAQC,IAAI,qCACZD,QAAQC,IAAI,uEACgB,YAAxBQ,SAASC,YACZV,QAAQC,IAAI,iFACZQ,SAASE,iBAAiB,oBAAoBf,gBACvCC,EAAcC,EAAWC,EAAQ,MAGxCC,QAAQC,IAAI,gDACNJ,EAAcC,EAAWC,GAEjC,CACD,C,GCxBIa,EAA2B,CAAC,EAGhC,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqBV,IAAjBW,EACH,OAAOA,EAAaC,QAGrB,IAAIC,EAASL,EAAyBE,GAAY,CAGjDE,QAAS,CAAC,GAOX,OAHAE,EAAoBJ,GAAUG,EAAQA,EAAOD,QAASH,GAG/CI,EAAOD,OACf,C,MCrBA,eAEA,iBACO,IAAAG,MAAK,CACVC,OAAQf,OACRgB,sBAAuB,CAAEC,SAAU,uBAEpC,EALD,E","sources":["webpack://openfin-web--web-client-api/./client/src/shim-client.ts","webpack://openfin-web--web-client-api/webpack/bootstrap","webpack://openfin-web--web-client-api/./client/src/shim-connect-fallback.ts"],"sourcesContent":["import type { ClientOptions, DefaultAPIContainerShape } from \"./client-shapes\";\n\n/**\n * This function is used to load the OpenFin API shim if the OpenFin API is not available.\n * Takes a set of options to pass to the shim.\n * @param options The options to pass to the shim.\n */\nexport async function init(options: ClientOptions): Promise {\n\tif (window.fin === undefined) {\n\t\tconsole.log(\"Fin is not available. Importing the OpenFin API shim.\");\n\t\tconst url =\n\t\t\t\"https://built-on-openfin.github.io/web-starter/web/v19.2.0/web-client-api/js/web.client.api.bundle.js\";\n\t\tconst webClient = await import(/* webpackIgnore: true */ url);\n\t\tconsole.log(\"OpenFin API shim script imported.\");\n\t\tconsole.log(\"Checking to see if the document is ready before requesting the API.\");\n\t\tif (document.readyState === \"loading\") {\n\t\t\tconsole.log(\"Document is still loading. Waiting for it to be ready using DOMContentLoaded.\");\n\t\t\tdocument.addEventListener(\"DOMContentLoaded\", async () => {\n\t\t\t\tawait initWhenReady(webClient, options);\n\t\t\t});\n\t\t} else {\n\t\t\tconsole.log(\"Document is available. Requesting API.\");\n\t\t\tawait initWhenReady(webClient, options);\n\t\t}\n\t}\n}\n\n/**\n * This function is used to load the OpenFin API shim if the OpenFin API is not available.\n * It will be called when we know the document is ready as the core-web requires DOM access\n * and this is a shim that can be loaded by script and reliant on developers to do it when the\n * document is ready (either through defer or script placement/listeners).\n * @param webClient The web client fetched via import.\n * @param webClient.getAPI The function to get the API.\n * @param options The options to pass to the shim.\n */\nasync function initWhenReady(\n\twebClient: { getAPI: (options: ClientOptions) => Promise },\n\toptions: ClientOptions\n): Promise {\n\ttry {\n\t\tconsole.log(\"Attempting to get the API with the following options:\", options);\n\t\tawait webClient.getAPI(options);\n\t\tconsole.log(\"OpenFin API shim applied\");\n\t} catch (error) {\n\t\tconsole.error(\n\t\t\t\"Failed to load the OpenFin API shim. Please note this is an example and you should implement your own approach for production.\",\n\t\t\terror\n\t\t);\n\t}\n}\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","import type { DefaultAPIContainerShape } from \"./client-shapes\";\nimport { init } from \"./shim-client\";\n// eslint-disable-next-line @typescript-eslint/no-floating-promises, @typescript-eslint/explicit-function-return-type\n(async () => {\n\tawait init({\n\t\ttarget: window as unknown as DefaultAPIContainerShape,\n\t\trequestConnectOptions: { strategy: \"request-on-failure\" }\n\t});\n})();\n"],"names":["async","initWhenReady","webClient","options","console","log","getAPI","error","undefined","window","fin","url","import","document","readyState","addEventListener","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","exports","module","__webpack_modules__","init","target","requestConnectOptions","strategy"],"sourceRoot":""} \ No newline at end of file diff --git a/web/v19.2.0/web-client-api/js/shim.api.bundle.js b/web/v19.2.0/web-client-api/js/shim.api.bundle.js index f046e17..a35fb92 100644 --- a/web/v19.2.0/web-client-api/js/shim.api.bundle.js +++ b/web/v19.2.0/web-client-api/js/shim.api.bundle.js @@ -1,2 +1,2 @@ -(()=>{"use strict";var e={554:(e,t)=>{async function o(e,t){try{console.log("Attempting to get the API with the following options:",t),await e.getAPI(t),console.log("OpenFin API shim applied")}catch(e){console.error("Failed to load the OpenFin API shim. Please note this is an example and you should implement your own approach for production.",e)}}Object.defineProperty(t,"__esModule",{value:!0}),t.init=async function(e){if(void 0===window.fin){console.log("Fin is not available. Importing the OpenFin API shim.");const t="https://built-on-openfin.github.io/web-starter/web/v19.1.0/web-client-api/js/web.client.api.bundle.js",n=await import(t);console.log("OpenFin API shim script imported."),console.log("Checking to see if the document is ready before requesting the API."),"loading"===document.readyState?(console.log("Document is still loading. Waiting for it to be ready using DOMContentLoaded."),document.addEventListener("DOMContentLoaded",(async()=>{await o(n,e)}))):(console.log("Document is available. Requesting API."),await o(n,e))}}}},t={};function o(n){var i=t[n];if(void 0!==i)return i.exports;var a=t[n]={exports:{}};return e[n](a,a.exports,o),a.exports}(()=>{const e=o(554);(async()=>{await(0,e.init)({target:window})})()})()})(); +(()=>{"use strict";var e={554:(e,t)=>{async function o(e,t){try{console.log("Attempting to get the API with the following options:",t),await e.getAPI(t),console.log("OpenFin API shim applied")}catch(e){console.error("Failed to load the OpenFin API shim. Please note this is an example and you should implement your own approach for production.",e)}}Object.defineProperty(t,"__esModule",{value:!0}),t.init=async function(e){if(void 0===window.fin){console.log("Fin is not available. Importing the OpenFin API shim.");const t="https://built-on-openfin.github.io/web-starter/web/v19.2.0/web-client-api/js/web.client.api.bundle.js",n=await import(t);console.log("OpenFin API shim script imported."),console.log("Checking to see if the document is ready before requesting the API."),"loading"===document.readyState?(console.log("Document is still loading. Waiting for it to be ready using DOMContentLoaded."),document.addEventListener("DOMContentLoaded",(async()=>{await o(n,e)}))):(console.log("Document is available. Requesting API."),await o(n,e))}}}},t={};function o(n){var i=t[n];if(void 0!==i)return i.exports;var a=t[n]={exports:{}};return e[n](a,a.exports,o),a.exports}(()=>{const e=o(554);(async()=>{await(0,e.init)({target:window})})()})()})(); //# sourceMappingURL=shim.api.bundle.js.map \ No newline at end of file diff --git a/web/v19.2.0/web-client-api/js/shim.api.bundle.js.map b/web/v19.2.0/web-client-api/js/shim.api.bundle.js.map index d9d1f36..0d2bc16 100644 --- a/web/v19.2.0/web-client-api/js/shim.api.bundle.js.map +++ b/web/v19.2.0/web-client-api/js/shim.api.bundle.js.map @@ -1 +1 @@ -{"version":3,"file":"shim.api.bundle.js","mappings":"sCAoCAA,eAAeC,EACdC,EACAC,GAEA,IACCC,QAAQC,IAAI,wDAAyDF,SAC/DD,EAAUI,OAAOH,GACvBC,QAAQC,IAAI,2BACb,CAAE,MAAOE,GACRH,QAAQG,MACP,iIACAA,EAEF,CACD,C,iDA3CA,OAAOP,eAAoBG,GAC1B,QAAmBK,IAAfC,OAAOC,IAAmB,CAC7BN,QAAQC,IAAI,yDACZ,MAAMM,EACL,wGACKT,QAAkBU,OAAiCD,GACzDP,QAAQC,IAAI,qCACZD,QAAQC,IAAI,uEACgB,YAAxBQ,SAASC,YACZV,QAAQC,IAAI,iFACZQ,SAASE,iBAAiB,oBAAoBf,gBACvCC,EAAcC,EAAWC,EAAQ,MAGxCC,QAAQC,IAAI,gDACNJ,EAAcC,EAAWC,GAEjC,CACD,C,GCxBIa,EAA2B,CAAC,EAGhC,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqBV,IAAjBW,EACH,OAAOA,EAAaC,QAGrB,IAAIC,EAASL,EAAyBE,GAAY,CAGjDE,QAAS,CAAC,GAOX,OAHAE,EAAoBJ,GAAUG,EAAQA,EAAOD,QAASH,GAG/CI,EAAOD,OACf,C,MCrBA,eAEA,iBACO,IAAAG,MAAK,CAAEC,OAAQf,QACrB,EAFD,E","sources":["webpack://openfin-web--web-client-api/./client/src/shim-client.ts","webpack://openfin-web--web-client-api/webpack/bootstrap","webpack://openfin-web--web-client-api/./client/src/shim.ts"],"sourcesContent":["import type { ClientOptions, DefaultAPIContainerShape } from \"./client-shapes\";\n\n/**\n * This function is used to load the OpenFin API shim if the OpenFin API is not available.\n * Takes a set of options to pass to the shim.\n * @param options The options to pass to the shim.\n */\nexport async function init(options: ClientOptions): Promise {\n\tif (window.fin === undefined) {\n\t\tconsole.log(\"Fin is not available. Importing the OpenFin API shim.\");\n\t\tconst url =\n\t\t\t\"https://built-on-openfin.github.io/web-starter/web/v19.1.0/web-client-api/js/web.client.api.bundle.js\";\n\t\tconst webClient = await import(/* webpackIgnore: true */ url);\n\t\tconsole.log(\"OpenFin API shim script imported.\");\n\t\tconsole.log(\"Checking to see if the document is ready before requesting the API.\");\n\t\tif (document.readyState === \"loading\") {\n\t\t\tconsole.log(\"Document is still loading. Waiting for it to be ready using DOMContentLoaded.\");\n\t\t\tdocument.addEventListener(\"DOMContentLoaded\", async () => {\n\t\t\t\tawait initWhenReady(webClient, options);\n\t\t\t});\n\t\t} else {\n\t\t\tconsole.log(\"Document is available. Requesting API.\");\n\t\t\tawait initWhenReady(webClient, options);\n\t\t}\n\t}\n}\n\n/**\n * This function is used to load the OpenFin API shim if the OpenFin API is not available.\n * It will be called when we know the document is ready as the core-web requires DOM access\n * and this is a shim that can be loaded by script and reliant on developers to do it when the\n * document is ready (either through defer or script placement/listeners).\n * @param webClient The web client fetched via import.\n * @param webClient.getAPI The function to get the API.\n * @param options The options to pass to the shim.\n */\nasync function initWhenReady(\n\twebClient: { getAPI: (options: ClientOptions) => Promise },\n\toptions: ClientOptions\n): Promise {\n\ttry {\n\t\tconsole.log(\"Attempting to get the API with the following options:\", options);\n\t\tawait webClient.getAPI(options);\n\t\tconsole.log(\"OpenFin API shim applied\");\n\t} catch (error) {\n\t\tconsole.error(\n\t\t\t\"Failed to load the OpenFin API shim. Please note this is an example and you should implement your own approach for production.\",\n\t\t\terror\n\t\t);\n\t}\n}\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","import type { DefaultAPIContainerShape } from \"./client-shapes\";\nimport { init } from \"./shim-client\";\n// eslint-disable-next-line @typescript-eslint/no-floating-promises, @typescript-eslint/explicit-function-return-type\n(async () => {\n\tawait init({ target: window as unknown as DefaultAPIContainerShape });\n})();\n"],"names":["async","initWhenReady","webClient","options","console","log","getAPI","error","undefined","window","fin","url","import","document","readyState","addEventListener","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","exports","module","__webpack_modules__","init","target"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"shim.api.bundle.js","mappings":"sCAoCAA,eAAeC,EACdC,EACAC,GAEA,IACCC,QAAQC,IAAI,wDAAyDF,SAC/DD,EAAUI,OAAOH,GACvBC,QAAQC,IAAI,2BACb,CAAE,MAAOE,GACRH,QAAQG,MACP,iIACAA,EAEF,CACD,C,iDA3CA,OAAOP,eAAoBG,GAC1B,QAAmBK,IAAfC,OAAOC,IAAmB,CAC7BN,QAAQC,IAAI,yDACZ,MAAMM,EACL,wGACKT,QAAkBU,OAAiCD,GACzDP,QAAQC,IAAI,qCACZD,QAAQC,IAAI,uEACgB,YAAxBQ,SAASC,YACZV,QAAQC,IAAI,iFACZQ,SAASE,iBAAiB,oBAAoBf,gBACvCC,EAAcC,EAAWC,EAAQ,MAGxCC,QAAQC,IAAI,gDACNJ,EAAcC,EAAWC,GAEjC,CACD,C,GCxBIa,EAA2B,CAAC,EAGhC,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqBV,IAAjBW,EACH,OAAOA,EAAaC,QAGrB,IAAIC,EAASL,EAAyBE,GAAY,CAGjDE,QAAS,CAAC,GAOX,OAHAE,EAAoBJ,GAAUG,EAAQA,EAAOD,QAASH,GAG/CI,EAAOD,OACf,C,MCrBA,eAEA,iBACO,IAAAG,MAAK,CAAEC,OAAQf,QACrB,EAFD,E","sources":["webpack://openfin-web--web-client-api/./client/src/shim-client.ts","webpack://openfin-web--web-client-api/webpack/bootstrap","webpack://openfin-web--web-client-api/./client/src/shim.ts"],"sourcesContent":["import type { ClientOptions, DefaultAPIContainerShape } from \"./client-shapes\";\n\n/**\n * This function is used to load the OpenFin API shim if the OpenFin API is not available.\n * Takes a set of options to pass to the shim.\n * @param options The options to pass to the shim.\n */\nexport async function init(options: ClientOptions): Promise {\n\tif (window.fin === undefined) {\n\t\tconsole.log(\"Fin is not available. Importing the OpenFin API shim.\");\n\t\tconst url =\n\t\t\t\"https://built-on-openfin.github.io/web-starter/web/v19.2.0/web-client-api/js/web.client.api.bundle.js\";\n\t\tconst webClient = await import(/* webpackIgnore: true */ url);\n\t\tconsole.log(\"OpenFin API shim script imported.\");\n\t\tconsole.log(\"Checking to see if the document is ready before requesting the API.\");\n\t\tif (document.readyState === \"loading\") {\n\t\t\tconsole.log(\"Document is still loading. Waiting for it to be ready using DOMContentLoaded.\");\n\t\t\tdocument.addEventListener(\"DOMContentLoaded\", async () => {\n\t\t\t\tawait initWhenReady(webClient, options);\n\t\t\t});\n\t\t} else {\n\t\t\tconsole.log(\"Document is available. Requesting API.\");\n\t\t\tawait initWhenReady(webClient, options);\n\t\t}\n\t}\n}\n\n/**\n * This function is used to load the OpenFin API shim if the OpenFin API is not available.\n * It will be called when we know the document is ready as the core-web requires DOM access\n * and this is a shim that can be loaded by script and reliant on developers to do it when the\n * document is ready (either through defer or script placement/listeners).\n * @param webClient The web client fetched via import.\n * @param webClient.getAPI The function to get the API.\n * @param options The options to pass to the shim.\n */\nasync function initWhenReady(\n\twebClient: { getAPI: (options: ClientOptions) => Promise },\n\toptions: ClientOptions\n): Promise {\n\ttry {\n\t\tconsole.log(\"Attempting to get the API with the following options:\", options);\n\t\tawait webClient.getAPI(options);\n\t\tconsole.log(\"OpenFin API shim applied\");\n\t} catch (error) {\n\t\tconsole.error(\n\t\t\t\"Failed to load the OpenFin API shim. Please note this is an example and you should implement your own approach for production.\",\n\t\t\terror\n\t\t);\n\t}\n}\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","import type { DefaultAPIContainerShape } from \"./client-shapes\";\nimport { init } from \"./shim-client\";\n// eslint-disable-next-line @typescript-eslint/no-floating-promises, @typescript-eslint/explicit-function-return-type\n(async () => {\n\tawait init({ target: window as unknown as DefaultAPIContainerShape });\n})();\n"],"names":["async","initWhenReady","webClient","options","console","log","getAPI","error","undefined","window","fin","url","import","document","readyState","addEventListener","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","exports","module","__webpack_modules__","init","target"],"sourceRoot":""} \ No newline at end of file diff --git a/web/v19.2.0/web-client-api/js/web.client.api.bundle.js b/web/v19.2.0/web-client-api/js/web.client.api.bundle.js index df86ac5..b244fd3 100644 --- a/web/v19.2.0/web-client-api/js/web.client.api.bundle.js +++ b/web/v19.2.0/web-client-api/js/web.client.api.bundle.js @@ -1,3 +1,3 @@ /*! For license information please see web.client.api.bundle.js.LICENSE.txt */ -var t={8584:(t,e,n)=>{var i=n(6205);n(1048),n(5412),n(46),n(6108),n(6343),e.connect=i.connect},6205:(t,e,n)=>{var i=n(1048),o=n(46),r=n(6108),s=n(6343),a=n(5412);const c=(t,e)=>`${e}<${btoa(JSON.stringify(t))}>`;var d="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==n.g?n.g:"undefined"!=typeof self?self:{},h={},l={},u={},p={};async function f(t){const e=[];for(const n of t){const t=await n();e.push(t)}return e}Object.defineProperty(p,"__esModule",{value:!0}),p.promiseMapSerial=p.serial=p.promiseMap=p.promisify=void 0,p.promisify=function(t){return(...e)=>new Promise(((n,i)=>{t(...e,((t,e)=>t?i(t):n(e)))}))},p.promiseMap=async function(t,e){return Promise.all(t.map(e))},p.serial=f,p.promiseMapSerial=async function(t,e){return f(t.map(((t,n,i)=>()=>e(t,n,i))))};var m,w=d&&d.__classPrivateFieldSet||function(t,e,n,i,o){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?o.call(t,n):o?o.value=n:e.set(t,n),n},y=d&&d.__classPrivateFieldGet||function(t,e,n,i){if("a"===n&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(t):i?i.value:e.get(t)};Object.defineProperty(u,"__esModule",{value:!0}),u.Reply=u.EmitterBase=u.Base=void 0;const g=p;class v{constructor(t){this.isNodeEnvironment=()=>"node"===this.wire.environment.type,this.isOpenFinEnvironment=()=>"openfin"===this.wire.environment.type,this.isBrowserEnvironment=()=>"other"===this.wire.environment.type,this.wire=t}get fin(){return this.wire.getFin()}get me(){return this.wire.me}}u.Base=v,u.EmitterBase=class extends v{constructor(t,e,...n){super(t),this.topic=e,m.set(this,void 0),this.eventNames=()=>this.hasEmitter()?this.getOrCreateEmitter().eventNames():[],this.emit=(t,e,...n)=>!!this.hasEmitter()&&this.getOrCreateEmitter().emit(t,e,...n),this.hasEmitter=()=>this.wire.eventAggregator.has(y(this,m,"f")),this.getOrCreateEmitter=()=>this.wire.eventAggregator.getOrCreate(y(this,m,"f")),this.listeners=t=>this.hasEmitter()?this.getOrCreateEmitter().listeners(t):[],this.listenerCount=t=>this.hasEmitter()?this.getOrCreateEmitter().listenerCount(t):0,this.registerEventListener=async(t,e={},n,i)=>{const o={...this.identity,timestamp:e.timestamp||Date.now(),topic:this.topic,type:t},r=this.getOrCreateEmitter();n(r);try{await this.wire.sendAction("subscribe-to-desktop-event",o)}catch(t){throw i(r),this.deleteEmitterIfNothingRegistered(r),t}},this.deregisterEventListener=async(t,e={})=>{if(this.hasEmitter()){const n={...this.identity,timestamp:e.timestamp||Date.now(),topic:this.topic,type:t};return await this.wire.sendAction("unsubscribe-to-desktop-event",n).catch((()=>null)),this.getOrCreateEmitter()}return Promise.resolve()},w(this,m,[e,...n],"f"),this.listeners=t=>this.hasEmitter()?this.getOrCreateEmitter().listeners(t):[]}async on(t,e,n){return await this.registerEventListener(t,n,(n=>{n.on(t,e)}),(n=>{n.removeListener(t,e)})),this}async addListener(t,e,n){return this.on(t,e,n)}async once(t,e,n){const i=()=>this.deregisterEventListener(t);return await this.registerEventListener(t,n,(n=>{n.once(t,i),n.once(t,e)}),(n=>{n.removeListener(t,i),n.removeListener(t,e)})),this}async prependListener(t,e,n){return await this.registerEventListener(t,n,(n=>{n.prependListener(t,e)}),(n=>{n.removeListener(t,e)})),this}async prependOnceListener(t,e,n){const i=()=>this.deregisterEventListener(t);return await this.registerEventListener(t,n,(n=>{n.prependOnceListener(t,e),n.once(t,i)}),(n=>{n.removeListener(t,e),n.removeListener(t,i)})),this}async removeListener(t,e,n){const i=await this.deregisterEventListener(t,n);return i&&(i.removeListener(t,e),this.deleteEmitterIfNothingRegistered(i)),this}async deregisterAllListeners(t){const e={...this.identity,type:t,topic:this.topic};if(this.hasEmitter()){const t=this.getOrCreateEmitter(),n=t.listenerCount(e.type),i=[];for(let t=0;tnull)));return await Promise.all(i),t}}async removeAllListeners(t){const e=async t=>{const e=await this.deregisterAllListeners(t);e&&(e.removeAllListeners(t),this.deleteEmitterIfNothingRegistered(e))};if(t)await e(t);else if(this.hasEmitter()){const t=this.getOrCreateEmitter().eventNames();await(0,g.promiseMap)(t,e)}return this}deleteEmitterIfNothingRegistered(t){0===t.eventNames().length&&this.wire.eventAggregator.delete(y(this,m,"f"))}},m=new WeakMap,u.Reply=class{};var C={};Object.defineProperty(C,"__esModule",{value:!0});var b=C.RuntimeError=C.NotSupportedError=C.NotImplementedError=C.NoAckError=C.DuplicateCorrelationError=C.UnexpectedActionError=C.DisconnectedError=void 0;class _ extends Error{constructor(t){super(`Expected websocket state OPEN but found ${t}`),this.readyState=t}}C.DisconnectedError=_;class I extends Error{}C.UnexpectedActionError=I;class E extends Error{}C.DuplicateCorrelationError=E;class x extends Error{}C.NoAckError=x;class S extends Error{}C.NotImplementedError=S;class A extends Error{}C.NotSupportedError=A;class P extends Error{constructor(t){const{message:e,name:n,stack:i,...o}=t;super(e),this.name=n||"Error",this.stack=i??this.toString(),Object.keys(o).forEach((t=>{this[t]=o[t]}))}}class M extends Error{static getCallSite(t=0){const e=Error.stackTraceLimit,n=t+1;Error.stackTraceLimit=e+n;const i=Error.prepareStackTrace;Error.prepareStackTrace=(t,e)=>e;const o=(new Error).stack?.slice(n)??[];return Error.prepareStackTrace=i,Error.stackTraceLimit=e,o}static prepareStackTrace(t,e){if("function"==typeof Error.prepareStackTrace)return Error.prepareStackTrace(t,e);let n="";n+=t.name||"Error",n+=`: ${t.message||""}`;for(const t of e)n+=`\n at ${t.toString()}`;return n}constructor(t,e){const{reason:n,error:i}=t;super(n),this.name="RuntimeError",i?.stack&&(this.cause=new P(i)),e&&(this.stack=M.prepareStackTrace(this,e))}}b=C.RuntimeError=M;var L={},O={},R={};Object.defineProperty(R,"__esModule",{value:!0}),R.validateIdentity=void 0,R.validateIdentity=function(t){let e;return"object"==typeof t&&"string"==typeof t.uuid||(e="Not a valid identity object"),e};var T,k={},j={},B={},z={},F={},D={},U={};Object.defineProperty(U,"__esModule",{value:!0}),U.handleDeprecatedWarnings=void 0,U.handleDeprecatedWarnings=t=>{(t.contentNavigation?.whitelist||t.contentNavigation?.blacklist||t.contentRedirect?.whitelist||t.contentRedirect?.blacklist)&&console.warn("The properties 'whitelist' and 'blacklist' have been marked as deprecated and will be removed in a future version. Please use 'allowlist' and 'denylist'.")};var W={},$={};Object.defineProperty($,"__esModule",{value:!0}),$.AsyncRetryableLazy=V=$.Lazy=void 0;var V=$.Lazy=class{constructor(t){this.producerFn=t}getValue(){return this.value||(this.value=this.producerFn()),this.value}};$.AsyncRetryableLazy=class{constructor(t){this.producerFn=t}async getValue(){return this.promise||(this.promise=this.producerFn().catch((t=>{throw delete this.promise,t}))),this.promise}};var H={};Object.defineProperty(H,"__esModule",{value:!0}),H.WebContents=void 0;const N=u;class G extends N.EmitterBase{constructor(t,e,n){super(t,n,e.uuid,e.name),this.identity=e,this.entityType=n}capturePage(t){return this.wire.sendAction("capture-page",{options:t,...this.identity}).then((({payload:t})=>t.data))}executeJavaScript(t){return this.wire.sendAction("execute-javascript-in-window",{...this.identity,code:t}).then((({payload:t})=>t.data))}getZoomLevel(){return this.wire.sendAction("get-zoom-level",this.identity).then((({payload:t})=>t.data))}setZoomLevel(t){return this.wire.sendAction("set-zoom-level",{...this.identity,level:t}).then((()=>{}))}navigate(t){return this.wire.sendAction("navigate-window",{...this.identity,url:t}).then((()=>{}))}navigateBack(){return this.wire.sendAction("navigate-window-back",{...this.identity}).then((()=>{}))}async navigateForward(){await this.wire.sendAction("navigate-window-forward",{...this.identity})}stopNavigation(){return this.wire.sendAction("stop-window-navigation",{...this.identity}).then((()=>{}))}reload(t=!1){return this.wire.sendAction("reload-window",{ignoreCache:t,...this.identity}).then((()=>{}))}print(t={}){return this.wire.sendAction("print",{...this.identity,options:t}).then((()=>{}))}findInPage(t,e){return this.wire.sendAction("find-in-page",{...this.identity,searchTerm:t,options:e}).then((({payload:t})=>t.data))}stopFindInPage(t){return this.wire.sendAction("stop-find-in-page",{...this.identity,action:t}).then((()=>{}))}getPrinters(){return this.wire.sendAction("get-printers",{...this.identity}).then((({payload:t})=>t.data))}async focus({emitSynthFocused:t}={emitSynthFocused:!0}){await this.wire.sendAction("focus-window",{emitSynthFocused:t,...this.identity})}async showDeveloperTools(){await this.wire.sendAction("show-developer-tools",this.identity)}async getProcessInfo(){const{payload:{data:t}}=await this.wire.sendAction("get-process-info",this.identity);return t}async getSharedWorkers(){return this.wire.sendAction("get-shared-workers",this.identity).then((({payload:t})=>t.data))}async inspectSharedWorker(){await this.wire.sendAction("inspect-shared-worker",{...this.identity})}async inspectSharedWorkerById(t){await this.wire.sendAction("inspect-shared-worker-by-id",{...this.identity,workerId:t})}async inspectServiceWorker(){await this.wire.sendAction("inspect-service-worker",{...this.identity})}async showPopupWindow(t){if(this.wire.sendAction(`${this.entityType}-show-popup-window`,this.identity).catch((()=>{})),t?.onPopupReady){const e=async({popupName:e})=>{try{const n=this.fin.Window.wrapSync({uuid:this.fin.me.uuid,name:e});await t.onPopupReady(n)}catch(t){throw new Error(`Something went wrong during onPopupReady execution: ${t}`)}};await this.once("popup-ready",e)}const{payload:e}=await this.wire.sendAction("try-create-popup-window",{options:{...t,hasResultCallback:!!t?.onPopupResult,hasReadyCallback:!!t?.onPopupReady},...this.identity}),{data:{willOpen:n,options:i}}=e;if(n&&await this.fin.Window.create(i.initialOptions),t?.onPopupResult){const e=async e=>{await t.onPopupResult((t=>{const{name:e,uuid:n,result:i,data:o}=t,r={identity:{name:e,uuid:n},result:i};return o&&(r.data=o),r})(e))},n=async()=>{await this.removeListener("popup-result",e)};await this.on("popup-result",e),await this.once("popup-teardown",n)}const{payload:o}=await this.wire.sendAction("show-popup-window",{options:i,...this.identity});return o.data}}var q,Y,K,Z,J;function X(){return Y||(Y=1,function(t){var e=d&&d.__createBinding||(Object.create?function(t,e,n,i){void 0===i&&(i=n);var o=Object.getOwnPropertyDescriptor(e,n);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,o)}:function(t,e,n,i){void 0===i&&(i=n),t[i]=e[n]}),n=d&&d.__exportStar||function(t,n){for(var i in t)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||e(n,t,i)};Object.defineProperty(t,"__esModule",{value:!0}),n(function(){if(T)return D;T=1,Object.defineProperty(D,"__esModule",{value:!0}),D.ViewModule=void 0;const t=u,e=R,n=X(),i=U;class o extends t.Base{async create(t){const{uuid:e}=this.wire.me;if(!t.name||"string"!=typeof t.name)throw new Error("Please provide a name property as a string in order to create a View.");return(0,i.handleDeprecatedWarnings)(t),this.wire.environment.childViews?await this.wire.environment.createChildContent({entityType:"view",options:{...t,uuid:e}}):await this.wire.sendAction("create-view",{...t,uuid:e}),this.wrapSync({uuid:e,name:t.name})}async wrap(t){this.wire.sendAction("view-wrap").catch((t=>{}));const i=(0,e.validateIdentity)(t);if(i)throw new Error(i);return new n.View(this.wire,t)}wrapSync(t){this.wire.sendAction("view-wrap-sync").catch((t=>{}));const i=(0,e.validateIdentity)(t);if(i)throw new Error(i);return new n.View(this.wire,t)}getCurrent(){if(this.wire.sendAction("view-get-current").catch((t=>{})),!this.wire.me.isView)throw new Error("You are not in a View context");const{uuid:t,name:e}=this.wire.me;return this.wrap({uuid:t,name:e})}getCurrentSync(){if(this.wire.sendAction("view-get-current-sync").catch((t=>{})),!this.wire.me.isView)throw new Error("You are not in a View context");const{uuid:t,name:e}=this.wire.me;return this.wrapSync({uuid:t,name:e})}}return D.ViewModule=o,D}(),t),n(function(){if(q)return W;var t;q=1,Object.defineProperty(W,"__esModule",{value:!0}),W.View=void 0;const e=C,n=$,i=H,o=st();class r extends i.WebContents{constructor(i,r){super(i,r,"view"),this.identity=r,t.set(this,new n.Lazy((()=>this.fin.Platform.wrapSync(this.identity).getClient()))),this.attach=async t=>{await this.wire.sendAction("attach-view",{target:t,...this.identity})},this.destroy=async()=>{await this.wire.sendAction("destroy-view",{...this.identity})},this.show=async()=>{await this.wire.sendAction("show-view",{...this.identity})},this.showAt=async(t,e={})=>{await this.wire.sendAction("show-view-at",{bounds:t,...this.identity,options:e})},this.bringToFront=async()=>{await this.wire.sendAction("bring-view-to-front",{...this.identity})},this.hide=async()=>{await this.wire.sendAction("hide-view",{...this.identity})},this.setBounds=async t=>{await this.wire.sendAction("set-view-bounds",{bounds:t,...this.identity})},this.getBounds=async()=>(await this.wire.sendAction("get-view-bounds",{...this.identity})).payload.data,this.getInfo=async()=>(await this.wire.sendAction("get-view-info",{...this.identity})).payload.data,this.getParentLayout=async()=>(this.wire.sendAction("view-get-parent-layout",{...this.identity}).catch((()=>{})),this.fin.Platform.Layout.getLayoutByViewIdentity(this.identity)),this.getOptions=async()=>this.wire.sendAction("get-view-options",{...this.identity}).then((({payload:t})=>t.data)),this.updateOptions=async t=>this.wire.sendAction("update-view-options",{options:t,...this.identity}).then((()=>{})),this.getCurrentWindow=async()=>{const{payload:{data:t}}=await this.wire.sendAction("get-view-window",{...this.identity});return new o._Window(this.wire,t)},this.getCurrentStack=async()=>{this.wire.sendAction("view-get-current-stack").catch((()=>{}));try{return(await this.getParentLayout()).getStackByViewIdentity(this.identity)}catch(t){throw new e.RuntimeError({reason:"This view does not belong to a stack.",error:t})}},this.triggerBeforeUnload=async()=>(await this.wire.sendAction("trigger-before-unload",{...this.identity})).payload.data,this.bindToElement=async t=>{if(!t)throw new Error("Element not found.");return this.wire.environment.observeBounds(t,(async t=>this.setBounds(t)))}}async focus({emitSynthFocused:t}={emitSynthFocused:!0}){const e=await this.getCurrentWindow();await e.focusedWebViewWasChanged(),await super.focus({emitSynthFocused:t})}}return W.View=r,t=new WeakMap,W}(),t)}(F)),F}function Q(){if(K)return z;K=1,Object.defineProperty(z,"__esModule",{value:!0}),z.Application=void 0;const t=u,e=st(),n=X();class i extends t.EmitterBase{constructor(t,n){super(t,"application",n.uuid),this.identity=n,this.window=new e._Window(this.wire,{uuid:this.identity.uuid,name:this.identity.uuid})}windowListFromIdentityList(t){const n=[];return t.forEach((t=>{n.push(new e._Window(this.wire,{uuid:t.uuid,name:t.name}))})),n}isRunning(){return this.wire.sendAction("is-application-running",this.identity).then((({payload:t})=>t.data))}async quit(t=!1){try{await this._close(t),await this.wire.sendAction("destroy-application",{force:t,...this.identity})}catch(t){if(!["Remote connection has closed","Could not locate the requested application"].some((e=>t.message.includes(e))))throw t}}async _close(t=!1){try{await this.wire.sendAction("close-application",{force:t,...this.identity})}catch(t){if(!t.message.includes("Remote connection has closed"))throw t}}close(t=!1){return console.warn("Deprecation Warning: Application.close is deprecated Please use Application.quit"),this.wire.sendAction("application-close",this.identity).catch((t=>{})),this._close(t)}getChildWindows(){return this.wire.sendAction("get-child-windows",this.identity).then((({payload:t})=>{const e=[];return t.data.forEach((t=>{e.push({uuid:this.identity.uuid,name:t})})),this.windowListFromIdentityList(e)}))}getManifest(){return this.wire.sendAction("get-application-manifest",this.identity).then((({payload:t})=>t.data))}getParentUuid(){return this.wire.sendAction("get-parent-application",this.identity).then((({payload:t})=>t.data))}getShortcuts(){return this.wire.sendAction("get-shortcuts",this.identity).then((({payload:t})=>t.data))}async getViews(){const{payload:t}=await this.wire.sendAction("application-get-views",this.identity);return t.data.map((t=>new n.View(this.wire,t)))}getZoomLevel(){return this.wire.sendAction("get-application-zoom-level",this.identity).then((({payload:t})=>t.data))}getWindow(){return this.wire.sendAction("application-get-window",this.identity).catch((t=>{})),Promise.resolve(this.window)}registerUser(t,e){return this.wire.sendAction("register-user",{userName:t,appName:e,...this.identity}).then((()=>{}))}removeTrayIcon(){return this.wire.sendAction("remove-tray-icon",this.identity).then((()=>{}))}restart(){return this.wire.sendAction("restart-application",this.identity).then((()=>{}))}run(){return console.warn("Deprecation Warning: Application.run is deprecated Please use fin.Application.start"),this.wire.sendAction("application-run",this.identity).catch((t=>{})),this._run()}_run(t={}){return this.wire.sendAction("run-application",{manifestUrl:this._manifestUrl,opts:t,...this.identity}).then((()=>{}))}scheduleRestart(){return this.wire.sendAction("relaunch-on-close",this.identity).then((()=>{}))}async sendApplicationLog(){const{payload:t}=await this.wire.sendAction("send-application-log",this.identity);return t.data}async setJumpList(t){await this.wire.sendAction("set-jump-list",{config:t,...this.identity})}setTrayIcon(t){return this.wire.sendAction("set-tray-icon",{enabledIcon:t,...this.identity}).then((()=>{}))}setShortcuts(t){return this.wire.sendAction("set-shortcuts",{data:t,...this.identity}).then((()=>{}))}async setShortcutQueryParams(t){await this.wire.sendAction("set-shortcut-query-args",{data:t,...this.identity})}setZoomLevel(t){return this.wire.sendAction("set-application-zoom-level",{level:t,...this.identity}).then((()=>{}))}async setAppLogUsername(t){await this.wire.sendAction("set-app-log-username",{data:t,...this.identity})}getTrayIconInfo(){return this.wire.sendAction("get-tray-icon-info",this.identity).then((({payload:t})=>t.data))}hasTrayIcon(){return this.wire.sendAction("has-tray-icon",this.identity).then((({payload:t})=>t.data))}terminate(){return this.wire.sendAction("terminate-application",this.identity).then((()=>{}))}wait(){return this.wire.sendAction("wait-for-hung-application",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction("get-info",this.identity).then((({payload:t})=>t.data))}async getProcessInfo(){const{payload:{data:t}}=await this.wire.sendAction("application-get-process-info",this.identity);return t}async setFileDownloadLocation(t){const{name:e}=this.wire.me,n={uuid:this.identity.uuid,name:e};await this.wire.sendAction("set-file-download-location",{...n,downloadLocation:t})}async getFileDownloadLocation(){const{payload:{data:t}}=await this.wire.sendAction("get-file-download-location",this.identity);return t}async showTrayIconPopupMenu(t){const{name:e}=this.wire.me,n={uuid:this.identity.uuid,name:e},{payload:i}=await this.wire.sendAction("show-tray-icon-popup-menu",{...n,options:t});return i.data}async closeTrayIconPopupMenu(){const{name:t}=this.wire.me,e={uuid:this.identity.uuid,name:t};await this.wire.sendAction("close-tray-icon-popup-menu",{...e})}}return z.Application=i,z}function tt(){return J||(J=1,function(t){var e=d&&d.__createBinding||(Object.create?function(t,e,n,i){void 0===i&&(i=n);var o=Object.getOwnPropertyDescriptor(e,n);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,o)}:function(t,e,n,i){void 0===i&&(i=n),t[i]=e[n]}),n=d&&d.__exportStar||function(t,n){for(var i in t)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||e(n,t,i)};Object.defineProperty(t,"__esModule",{value:!0}),n(function(){if(Z)return B;Z=1,Object.defineProperty(B,"__esModule",{value:!0}),B.ApplicationModule=void 0;const t=u,e=R,n=Q();class i extends t.Base{async wrap(t){this.wire.sendAction("wrap-application").catch((t=>{}));const i=(0,e.validateIdentity)(t);if(i)throw new Error(i);return new n.Application(this.wire,t)}wrapSync(t){this.wire.sendAction("wrap-application-sync").catch((t=>{}));const i=(0,e.validateIdentity)(t);if(i)throw new Error(i);return new n.Application(this.wire,t)}async _create(t){return void 0===t.waitForPageLoad&&(t.waitForPageLoad=!1),void 0===t.autoShow&&void 0===t.isPlatformController&&(t.autoShow=!0),await this.wire.sendAction("create-application",t),this.wrap({uuid:t.uuid})}create(t){return console.warn("Deprecation Warning: fin.Application.create is deprecated. Please use fin.Application.start"),this.wire.sendAction("application-create").catch((t=>{})),this._create(t)}async start(t){this.wire.sendAction("start-application").catch((t=>{}));const e=await this._create(t);return await this.wire.sendAction("run-application",{uuid:t.uuid}),e}async startManyManifests(t,e){return this.wire.sendAction("run-applications",{applications:t,opts:e}).then((()=>{}))}getCurrent(){return this.wire.sendAction("get-current-application").catch((t=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction("get-current-application-sync").catch((t=>{})),this.wrapSync({uuid:this.wire.me.uuid})}async startFromManifest(t,e){this.wire.sendAction("application-start-from-manifest").catch((t=>{}));const n=await this._createFromManifest(t);return await n._run(e),n}createFromManifest(t){return console.warn("Deprecation Warning: fin.Application.createFromManifest is deprecated. Please use fin.Application.startFromManifest"),this.wire.sendAction("application-create-from-manifest").catch((t=>{})),this._createFromManifest(t)}_createFromManifest(t){return this.wire.sendAction("get-application-manifest",{manifestUrl:t}).then((({payload:t})=>{const e=t.data.platform?t.data.platform.uuid:t.data.startup_app.uuid;return this.wrap({uuid:e})})).then((e=>(e._manifestUrl=t,e)))}}return B.ApplicationModule=i,B}(),t),n(Q(),t)}(j)),j}H.WebContents=G;var et,nt,it,ot={};function rt(){if(et)return k;et=1,Object.defineProperty(k,"__esModule",{value:!0}),k._Window=void 0;const t=tt(),e=H,n=X(),i=U,o=ot;class r extends e.WebContents{constructor(t,e){super(t,e,"window")}async createWindow(t){this.wire.sendAction("window-create-window",this.identity).catch((t=>{}));const e=await(0,o.promisifySubscription)(this,"fire-constructor-callback");void 0===t.waitForPageLoad&&(t.waitForPageLoad=!1),void 0===t.autoShow&&(t.autoShow=!0),(0,i.handleDeprecatedWarnings)(t);const n=this.wire.environment.createChildContent({entityType:"window",options:t}),[r]=await Promise.all([e.getValue(),n]);let s;const{success:a}=r,c=r.data,{message:d}=c;s=a?{httpResponseCode:c.httpResponseCode,apiInjected:c.apiInjected}:{message:c.message,networkErrorCode:c.networkErrorCode,stack:c.stack};const h={message:d,cbPayload:s,success:a};try{this.getWebWindow().fin.__internal_.openerSuccessCBCalled()}catch(t){}return h.success?this:Promise.reject(h)}getAllFrames(){return this.wire.sendAction("get-all-frames",this.identity).then((({payload:t})=>t.data))}getBounds(){return this.wire.sendAction("get-window-bounds",this.identity).then((({payload:t})=>t.data))}center(){return this.wire.sendAction("center-window",this.identity).then((()=>{}))}blur(){return this.wire.sendAction("blur-window",this.identity).then((()=>{}))}bringToFront(){return this.wire.sendAction("bring-window-to-front",this.identity).then((()=>{}))}animate(t,e){return this.wire.sendAction("animate-window",{transitions:t,options:e,...this.identity}).then((()=>{}))}hide(){return this.wire.sendAction("hide-window",this.identity).then((()=>{}))}close(t=!1){return this.wire.sendAction("close-window",{force:t,...this.identity}).then((()=>{Object.setPrototypeOf(this,null)}))}focusedWebViewWasChanged(){return this.wire.sendAction("focused-webview-changed",this.identity).then((()=>{}))}getNativeId(){return this.wire.sendAction("get-window-native-id",this.identity).then((({payload:t})=>t.data))}async getCurrentViews(){const{payload:t}=await this.wire.sendAction("window-get-views",this.identity);return t.data.map((t=>new n.View(this.wire,t)))}disableFrame(){return console.warn("Function is deprecated; use disableUserMovement instead."),this.wire.sendAction("disable-window-frame",this.identity).then((()=>{}))}disableUserMovement(){return this.wire.sendAction("disable-window-frame",this.identity).then((()=>{}))}enableFrame(){return console.warn("Function is deprecated; use enableUserMovement instead."),this.wire.sendAction("enable-window-frame",this.identity).then((()=>{}))}enableUserMovement(){return this.wire.sendAction("enable-window-frame",this.identity).then((()=>{}))}flash(){return this.wire.sendAction("flash-window",this.identity).then((()=>{}))}stopFlashing(){return this.wire.sendAction("stop-flash-window",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction("get-window-info",this.identity).then((({payload:t})=>t.data))}async getLayout(t){this.wire.sendAction("window-get-layout",this.identity).catch((t=>{}));const e=await this.getOptions();if(!e.layout&&!e.layoutSnapshot)throw new Error("Window does not have a Layout");return this.fin.Platform.Layout.wrap(t??this.identity)}getOptions(){return this.wire.sendAction("get-window-options",this.identity).then((({payload:t})=>t.data))}getParentApplication(){return this.wire.sendAction("window-get-parent-application",this.identity).catch((t=>{})),Promise.resolve(new t.Application(this.wire,this.identity))}getParentWindow(){return this.wire.sendAction("window-get-parent-window",this.identity).catch((t=>{})),Promise.resolve(new t.Application(this.wire,this.identity)).then((t=>t.getWindow()))}async getSnapshot(t){const e={area:t,...this.identity};return console.warn("Window.getSnapshot has been deprecated, please use Window.capturePage"),(await this.wire.sendAction("get-window-snapshot",e)).payload.data}getState(){return this.wire.sendAction("get-window-state",this.identity).then((({payload:t})=>t.data))}getWebWindow(){return this.wire.sendAction("window-get-web-window",this.identity).catch((t=>{})),this.wire.environment.getWebWindow(this.identity)}isMainWindow(){return this.wire.sendAction("window-is-main-window",this.identity).catch((t=>{})),this.me.uuid===this.me.name}isShowing(){return this.wire.sendAction("is-window-showing",this.identity).then((({payload:t})=>t.data))}maximize(){return this.wire.sendAction("maximize-window",this.identity).then((()=>{}))}minimize(){return this.wire.sendAction("minimize-window",this.identity).then((()=>{}))}moveBy(t,e,n){return this.wire.sendAction("move-window-by",{deltaLeft:t,deltaTop:e,positioningOptions:n,...this.identity}).then((()=>{}))}moveTo(t,e,n){return this.wire.sendAction("move-window",{left:t,top:e,positioningOptions:n,...this.identity}).then((()=>{}))}resizeBy(t,e,n,i){return this.wire.sendAction("resize-window-by",{deltaWidth:Math.floor(t),deltaHeight:Math.floor(e),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}resizeTo(t,e,n,i){return this.wire.sendAction("resize-window",{width:Math.floor(t),height:Math.floor(e),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}restore(){return this.wire.sendAction("restore-window",this.identity).then((()=>{}))}setAsForeground(){return this.wire.sendAction("set-foreground-window",this.identity).then((()=>{}))}setBounds(t,e){return this.wire.sendAction("set-window-bounds",{...t,...this.identity,positioningOptions:e}).then((()=>{}))}show(t=!1){return this.wire.sendAction("show-window",{force:t,...this.identity}).then((()=>{}))}showAt(t,e,n=!1){return this.wire.sendAction("show-at-window",{force:n,left:Math.floor(t),top:Math.floor(e),...this.identity}).then((()=>{}))}updateOptions(t){return this.wire.sendAction("update-window-options",{options:t,...this.identity}).then((()=>{}))}authenticate(t,e){return this.wire.sendAction("window-authenticate",{userName:t,password:e,...this.identity}).then((()=>{}))}async showPopupMenu(t){const{payload:e}=await this.wire.sendAction("show-popup-menu",{options:t,...this.identity});return e.data}async closePopupMenu(){return this.wire.sendAction("close-popup-menu",{...this.identity}).then((()=>{}))}async dispatchPopupResult(t){this.wire.sendAction("window-dispatch-popup-result",this.identity).catch((t=>{})),await this.wire.sendAction("dispatch-popup-result",{data:t,...this.identity})}async print(t={content:"self"}){switch(t.content){case void 0:case"self":return super.print(t);case"screenshot":return this.wire.sendAction("print-screenshot",this.identity).then((()=>{}));case"views":return this.wire.sendAction("print-views",{...this.identity,options:t}).then((()=>{}));default:return}}}return k._Window=r,k}function st(){return it||(it=1,function(t){var e=d&&d.__createBinding||(Object.create?function(t,e,n,i){void 0===i&&(i=n);var o=Object.getOwnPropertyDescriptor(e,n);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,o)}:function(t,e,n,i){void 0===i&&(i=n),t[i]=e[n]}),n=d&&d.__exportStar||function(t,n){for(var i in t)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||e(n,t,i)};Object.defineProperty(t,"__esModule",{value:!0}),n(function(){if(nt)return O;nt=1,Object.defineProperty(O,"__esModule",{value:!0}),O._WindowModule=void 0;const t=u,e=R,n=rt();class i extends t.Base{async wrap(t){this.wire.sendAction("window-wrap").catch((t=>{}));const i=(0,e.validateIdentity)(t);if(i)throw new Error(i);return new n._Window(this.wire,t)}wrapSync(t){this.wire.sendAction("window-wrap-sync").catch((t=>{}));const i=(0,e.validateIdentity)(t);if(i)throw new Error(i);return new n._Window(this.wire,t)}create(t){return this.wire.sendAction("create-window").catch((t=>{})),new n._Window(this.wire,{uuid:this.me.uuid,name:t.name}).createWindow(t)}getCurrent(){if(this.wire.sendAction("get-current-window").catch((t=>{})),!this.wire.me.isWindow)throw new Error("You are not in a Window context");const{uuid:t,name:e}=this.wire.me;return this.wrap({uuid:t,name:e})}getCurrentSync(){if(this.wire.sendAction("get-current-window-sync").catch((t=>{})),!this.wire.me.isWindow)throw new Error("You are not in a Window context");const{uuid:t,name:e}=this.wire.me;return this.wrapSync({uuid:t,name:e})}}return O._WindowModule=i,O}(),t),n(rt(),t)}(L)),L}Object.defineProperty(ot,"__esModule",{value:!0}),ot.promisifySubscription=void 0,ot.promisifySubscription=async(t,e,n=()=>!0,i)=>{let o,r,s;const a=new Promise(((t,e)=>{o=t,r=e})),c=t=>{n(t)&&(clearTimeout(s),o(t))};return await t.on(e,c),i&&(s=setTimeout((()=>r(new Error("event timed out"))),i)),a.finally((()=>{t.removeListener(e,c).catch((()=>null))})),{getValue:()=>a}},Object.defineProperty(l,"__esModule",{value:!0}),l.System=void 0;const at=u,ct=C,dt=st(),ht=o;class lt extends at.EmitterBase{constructor(t){super(t,"system")}sendExternalProcessRequest(t,e){return new Promise(((n,i)=>{const o="external-process-exited";let r,s,a,c;"function"==typeof e.listener&&(a=t=>{const n=t||{};s={topic:"exited",uuid:n.processUuid||"",exitCode:n.exitCode||0},r===t.processUuid&&(e.listener(s),c.removeListener(o,a))},this.wire.me.name||(this.wire.me.name=this.wire.me.uuid),c=new dt._Window(this.wire,this.wire.me),c.on(o,a)),this.wire.sendAction(t,e).then((({payload:t})=>{r=t.data.uuid,n(t.data),s&&r===s.uuid&&(e.listener(s),c.removeListener(o,a))})).catch((t=>{c&&c.removeListener(o,a),i(t)}))}))}getVersion(){return this.wire.sendAction("get-version").then((({payload:t})=>t.data))}clearCache(t){return this.wire.sendAction("clear-cache",t).then((()=>{}))}deleteCacheOnExit(){return this.wire.sendAction("delete-cache-request").then((()=>{}))}exit(){return this.wire.sendAction("exit-desktop").then((()=>{}))}async fetchManifest(t){const{payload:{data:e}}=await this.wire.sendAction("fetch-manifest",{manifestUrl:t});return e}flushCookieStore(){return this.wire.sendAction("flush-cookie-store").then((()=>{}))}getAllWindows(){return this.wire.sendAction("get-all-windows").then((({payload:t})=>t.data))}getAllApplications(){return this.wire.sendAction("get-all-applications").then((({payload:t})=>t.data))}getCommandLineArguments(){return this.wire.sendAction("get-command-line-arguments").then((({payload:t})=>t.data))}async getCrashReporterState(){const{payload:{data:{diagnosticMode:t,isRunning:e}}}=await this.wire.sendAction("get-crash-reporter-state");return console.warn("diagnosticMode property is deprecated. It will be removed in a future version"),{diagnosticMode:t,diagnosticsMode:t,isRunning:e}}async startCrashReporter(t){const e=t,n={...e,diagnosticMode:e.diagnosticsMode||e.diagnosticMode},{payload:{data:{diagnosticMode:i,isRunning:o}}}=await this.wire.sendAction("start-crash-reporter",n);return{diagnosticMode:i,diagnosticsMode:i,isRunning:o}}getUniqueUserId(){return this.wire.sendAction("get-unique-user-id").then((({payload:t})=>t.data))}getEntityInfo(t,e){return this.wire.sendAction("get-entity-info",{uuid:t,name:e}).then((({payload:t})=>t.data))}getEnvironmentVariable(t){return this.wire.sendAction("get-environment-variable",{environmentVariables:t}).then((({payload:t})=>t.data))}getFocusedWindow(){return this.wire.sendAction("get-focused-window").then((({payload:t})=>t.data))}async isAppCertified(t){const{payload:{data:{certifiedInfo:e}}}=await this.wire.sendAction("is-app-certified",{manifestUrl:t});return e}getInstalledRuntimes(){return this.wire.sendAction("get-installed-runtimes").then((({payload:t})=>t.data.runtimes))}async getInstalledApps(){const{payload:{data:{installedApps:t}}}=await this.wire.sendAction("get-installed-apps");return t}getLog(t){return this.wire.sendAction("view-log",t).then((({payload:t})=>t.data))}getMachineId(){return this.wire.sendAction("get-machine-id").then((({payload:t})=>t.data))}getMinLogLevel(){return this.wire.sendAction("get-min-log-level").then((({payload:t})=>t.data))}getLogList(){return this.wire.sendAction("list-logs").then((({payload:t})=>t.data))}getMonitorInfo(){return this.wire.sendAction("get-monitor-info").then((({payload:t})=>t.data))}getMousePosition(){return this.wire.sendAction("get-mouse-position").then((({payload:t})=>t.data))}getProcessList(){return console.warn("System.getProcessList has been deprecated. Please consider using our new process APIs: Window.getProcessInfo, View.getProcessInfo, Application.getProcessInfo, System.getAllProcessInfo"),this.wire.sendAction("process-snapshot").then((({payload:t})=>t.data))}async getAllProcessInfo(){const{payload:{data:t}}=await this.wire.sendAction("get-all-process-info",this.identity);return t}getProxySettings(){return this.wire.sendAction("get-proxy-settings").then((({payload:t})=>t.data))}getRuntimeInfo(){return this.wire.sendAction("get-runtime-info").then((({payload:t})=>t.data))}getRvmInfo(){return this.wire.sendAction("get-rvm-info").then((({payload:t})=>t.data))}getHostSpecs(){return this.wire.sendAction("get-host-specs").then((({payload:t})=>t.data))}getOSInfo(){return this.wire.sendAction("get-os-info").then((({payload:t})=>t.data))}launchExternalProcess(t){return this.sendExternalProcessRequest("launch-external-process",t)}monitorExternalProcess(t){return this.sendExternalProcessRequest("monitor-external-process",t)}log(t,e){return this.wire.sendAction("write-to-log",{level:t,message:e}).then((()=>{}))}openUrlWithBrowser(t){return this.wire.sendAction("open-url-with-browser",{url:t}).then((()=>{}))}async registerCustomProtocol(t){if("object"!=typeof t)throw new Error("Must provide an object with a `protocolName` property having a string value.");await this.wire.sendAction("register-custom-protocol",t)}async unregisterCustomProtocol(t){await this.wire.sendAction("unregister-custom-protocol",{protocolName:t})}async getCustomProtocolState(t){return this.wire.sendAction("get-custom-protocol-state",{protocolName:t}).then((({payload:t})=>t.data))}releaseExternalProcess(t){return this.wire.sendAction("release-external-process",{uuid:t}).then((()=>{}))}showDeveloperTools(t){return this.wire.sendAction("show-developer-tools",t).then((()=>{}))}terminateExternalProcess(t){return this.wire.sendAction("terminate-external-process",t).then((()=>{}))}updateProxySettings(t){return this.wire.sendAction("update-proxy",t).then((()=>{}))}async downloadAsset(t,e){const n=()=>{};let i=n,o=n;const r=new Promise(((t,e)=>{i=t,o=e}));if("openfin"!==this.wire.environment.type)throw new ct.NotSupportedError("downloadAsset only supported in an OpenFin Render process");const s=ct.RuntimeError.getCallSite(),a=this.wire.environment.getNextMessageId().toString(),c=`asset-download-progress-${a}`,d=`asset-download-error-${a}`,h=`asset-download-complete-${a}`,l=t=>{const n={downloadedBytes:t.downloadedBytes,totalBytes:t.totalBytes};e(n)},u=()=>{this.removeListener(c,l)};await Promise.all([this.on(c,l),this.once(d,(t=>{u();const{reason:e,err:n}=t;o(new ct.RuntimeError({reason:e,error:n},s))})),this.once(h,(()=>{u(),i()}))]);const p=Object.assign(t,{downloadId:a});return await this.wire.sendAction("download-asset",p).catch((t=>{throw u(),t})),r}downloadRuntime(t,e){const n=ct.RuntimeError.getCallSite();return new Promise(((i,o)=>{if("openfin"!==this.wire.environment.type)return void o(new ct.NotSupportedError("downloadRuntime only supported in an OpenFin Render process"));const r=this.wire.environment.getNextMessageId().toString(),s=`runtime-download-progress-${r}`,a=`runtime-download-error-${r}`,c=`runtime-download-complete-${r}`,d=t=>{const n={downloadedBytes:t.downloadedBytes,totalBytes:t.totalBytes};e(n)},h=()=>{this.removeListener(s,d)};this.on(s,d),this.once(a,(t=>{h();const{reason:e,err:i}=t;o(new ct.RuntimeError({reason:e,error:i},n))})),this.once(c,(()=>{h(),i()}));const l=Object.assign(t,{downloadId:r});this.wire.sendAction("download-runtime",l).catch((t=>{h(),o(t)}))}))}downloadPreloadScripts(t){return this.wire.sendAction("download-preload-scripts",{scripts:t}).then((({payload:t})=>t.data))}getAllExternalApplications(){return this.wire.sendAction("get-all-external-applications").then((({payload:t})=>t.data))}getAppAssetInfo(t){return this.wire.sendAction("get-app-asset-info",t).then((({payload:t})=>t.data))}getCookies(t){const e=this.wire.environment.getUrl(),n=Object.assign(t,{url:e});return this.wire.sendAction("get-cookies",n).then((({payload:t})=>t.data))}setMinLogLevel(t){return this.wire.sendAction("set-min-log-level",{level:t}).then((()=>{}))}resolveUuid(t){return this.wire.sendAction("resolve-uuid",{entityKey:t}).then((({payload:t})=>t.data))}executeOnRemote(t,e){return e.requestingIdentity=t,this.wire.ferryAction(e)}readRegistryValue(t,e,n){return this.wire.sendAction("read-registry-value",{rootKey:t,subkey:e,value:n}).then((({payload:t})=>t.data))}registerExternalConnection(t){return this.wire.sendAction("register-external-connection",{uuid:t}).then((({payload:t})=>t.data))}async getServiceConfiguration(t){if("string"!=typeof t.name)throw new Error("Must provide an object with a `name` property having a string value");const{name:e}=t;return this.wire.sendAction("get-service-configuration",{name:e}).then((({payload:t})=>t.data))}async getSystemAppConfig(t){if("string"!=typeof t)throw new Error("Must provide a string value for name of system app");return this.wire.sendAction("get-system-app-configuration",{name:t}).then((({payload:t})=>t.data))}async registerShutdownHandler(t){this.wire.sendAction("system-register-shutdown-handler").catch((t=>{}));const{uuid:e,name:n}=this.wire.me;this.on("system-shutdown",(i=>{t({proceed:()=>{this.wire.environment.raiseEvent("application/system-shutdown-handled",{uuid:e,name:n,topic:"application"})}})}))}runRvmHealthCheck(){return this.wire.sendAction("run-rvm-health-check").then((({payload:t})=>t.data))}async launchManifest(t,e={}){const{subscribe:n,...i}=e,o=i;if(n){const t=new ht.EventEmitter;n(t);const e="app-version-progress",i="runtime-status",r="app-version-complete",s="app-version-error",a=this.wire.environment.getNextMessageId().toString();o.appVersionId=a;const c=[r,e,i,s],d=t=>{const{appVersionId:e,topic:n,type:i,...o}=t;return{...o,type:c.find((t=>i.includes(t)))}},h=e=>{const n=d(e);t.emit(n.type,n)},l=()=>{this.removeListener(`${e}.${a}`,h),this.removeListener(`${i}.${a}`,h),this.removeListener(`${r}.${a}`,h),this.removeListener(`${s}.${a}`,h),this.removeListener(`${r}.${a}`,l),this.removeListener(`${s}.${a}`,l)};await Promise.all([this.on(`${e}.${a}`,h),this.on(`${i}.${a}`,h),this.once(`${r}.${a}`,h),this.once(`${s}.${a}`,h),this.once(`${r}.${a}`,l),this.once(`${s}.${a}`,l)])}return(await this.wire.sendAction("launch-manifest",{manifestUrl:t,opts:o})).payload.data.manifest}async queryPermissionForCurrentContext(t){const e={uuid:this.wire.me.uuid,name:this.wire.me.name};return(await this.wire.sendAction("query-permission-for-current-context",{apiName:t,identity:e})).payload.data}async enableNativeWindowIntegrationProvider(t){const{payload:e}=await this.wire.sendAction("enable-native-window-integration-provider",{permissions:t});return e.data}async registerUsage({data:t,type:e}){await this.wire.sendAction("register-usage",{data:t,type:e})}async getPrinters(){const{payload:t}=await this.wire.sendAction("system-get-printers");return t.data}async updateProcessLoggingOptions(t){await this.wire.sendAction("system-update-process-logging-options",{options:t})}async getDomainSettings(){const{payload:{data:t}}=await this.wire.sendAction("get-domain-settings",this.identity);return t}async setDomainSettings(t){await this.wire.sendAction("set-domain-settings",{domainSettings:t,...this.identity})}async refreshExtensions(){const{payload:t}=await this.wire.sendAction("refresh-extensions");return t.data}async getInstalledExtensions(){const{payload:t}=await this.wire.sendAction("get-installed-extensions");return t.data}}l.System=lt;var ut={},pt={};Object.defineProperty(pt,"__esModule",{value:!0}),pt.RefCounter=void 0,pt.RefCounter=class{constructor(){this.topicRefMap=new Map}incRefCount(t){const e=this.topicRefMap.get(t);let n;if(e){const i=e+1;n=i,this.topicRefMap.set(t,i)}else this.topicRefMap.set(t,1),n=1;return n}decRefCount(t){const e=this.topicRefMap.get(t);let n;if(e){const i=e-1;this.topicRefMap.set(t,i),n=i}else n=-1;return n}actOnFirst(t,e,n){return 1===this.incRefCount(t)?e():n()}actOnLast(t,e,n){return 0===this.decRefCount(t)?e():n()}};var ft={},mt={},wt={};Object.defineProperty(wt,"__esModule",{value:!0}),wt.ChannelBase=wt.ProtectedItems=void 0;const yt=t=>async(e,n,i)=>{const o=await t(e,n,i);return void 0===o?n:o};wt.ProtectedItems=class{constructor(t,e){this.providerIdentity=t,this.close=e}};class gt{static defaultAction(t){throw new Error(`No action registered at target for ${t}`)}constructor(){this.subscriptions=new Map}async processAction(t,e,n){try{const i=this.subscriptions.has(t)?this.subscriptions.get(t):(e,n)=>(this.defaultAction??gt.defaultAction)(t,e,n),o=this.preAction?await this.preAction(t,e,n):e,r=await i(o,n);return this.postAction?await this.postAction(t,r,n):r}catch(e){if(this.errorMiddleware)return this.errorMiddleware(t,e,n);throw e}}beforeAction(t){if(this.preAction)throw new Error("Already registered beforeAction middleware");this.preAction=yt(t)}onError(t){if(this.errorMiddleware)throw new Error("Already registered error middleware");this.errorMiddleware=t}afterAction(t){if(this.postAction)throw new Error("Already registered afterAction middleware");this.postAction=yt(t)}remove(t){this.subscriptions.delete(t)}setDefaultAction(t){if(this.defaultAction)throw new Error("default action can only be set once");this.defaultAction=t}register(t,e){if(this.subscriptions.has(t))throw new Error(`Subscription already registered for action: ${t}. Unsubscribe before adding new subscription`);return this.subscriptions.set(t,e),!0}}wt.ChannelBase=gt;var vt,Ct,bt,_t=d&&d.__classPrivateFieldGet||function(t,e,n,i){if("a"===n&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(t):i?i.value:e.get(t)},It=d&&d.__classPrivateFieldSet||function(t,e,n,i,o){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?o.call(t,n):o?o.value=n:e.set(t,n),n};Object.defineProperty(mt,"__esModule",{value:!0}),mt.ChannelClient=void 0;const Et=wt,xt=new Map;class St extends Et.ChannelBase{static closeChannelByEndpointId(t){const e=xt.get(t);e&&_t(e,bt,"f").call(e)}static handleProviderDisconnect(t){for(const e of xt.values())e.providerIdentity.channelId===t.channelId&&(e.disconnectListener(t),_t(e,bt,"f").call(e))}constructor(t,e,n){super(),vt.set(this,void 0),Ct.set(this,void 0),this.processAction=(t,e,n)=>super.processAction(t,e,n),bt.set(this,(()=>{xt.delete(this.endpointId),_t(this,Ct,"f").close()})),It(this,vt,new Et.ProtectedItems(t,e),"f"),this.disconnectListener=()=>{},this.endpointId=t.endpointId,It(this,Ct,n,"f"),xt.set(this.endpointId,this),n.receive(this.processAction)}get providerIdentity(){return _t(this,vt,"f").providerIdentity}async dispatch(t,e){if(_t(this,Ct,"f").isEndpointConnected(this.providerIdentity.channelId))return _t(this,Ct,"f").send(this.providerIdentity.channelId,t,e);throw new Error("The client you are trying to dispatch from is disconnected from the target provider.")}onDisconnection(t){this.disconnectListener=e=>{try{t(e)}catch(t){throw new Error(`Error while calling the onDisconnection callback: ${t.message}`)}finally{this.disconnectListener=()=>{}}}}async disconnect(){await this.sendDisconnectAction(),_t(this,bt,"f").call(this)}async sendDisconnectAction(){const t=_t(this,vt,"f");await t.close()}static async wireClose(t,e,n){const{channelName:i,uuid:o,name:r}=e;await t.sendAction("disconnect-from-channel",{channelName:i,uuid:o,name:r,endpointId:n})}}mt.ChannelClient=St,vt=new WeakMap,Ct=new WeakMap,bt=new WeakMap;var At={},Pt={};Object.defineProperty(Pt,"__esModule",{value:!0}),Pt.exhaustiveCheck=void 0,Pt.exhaustiveCheck=function(t,e){throw new Error(`Unsupported value: ${t}${e?`\n Supported values are: ${e.join("")}`:""}`)};var Mt,Lt,Ot,Rt={},Tt=d&&d.__classPrivateFieldSet||function(t,e,n,i,o){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?o.call(t,n):o?o.value=n:e.set(t,n),n},kt=d&&d.__classPrivateFieldGet||function(t,e,n,i){if("a"===n&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(t):i?i.value:e.get(t)};Object.defineProperty(Rt,"__esModule",{value:!0}),Rt.ClassicInfo=Rt.ClassicStrategy=void 0,Rt.ClassicStrategy=class{constructor(t,e,n,i){this.messageReceiver=e,this.endpointId=n,this.providerIdentity=i,Mt.set(this,void 0),Lt.set(this,new Map),Ot.set(this,new Map),this.send=async(t,e,n)=>{const i=kt(this,Lt,"f").get(t);if(!i)throw new Error(`Could not locate routing info for endpoint ${t}`);const o={...i};o.isLocalEndpointId&&delete o.endpointId,delete o.isLocalEndpointId;const r=kt(this,Mt,"f").sendAction("send-channel-message",{...o,providerIdentity:this.providerIdentity,action:e,payload:n});return kt(this,Ot,"f").get(t)?.add(r),(await r.catch((t=>{throw new Error(t.message)})).finally((()=>{kt(this,Ot,"f").get(t)?.delete(r)}))).payload.data.result},this.close=async()=>{this.messageReceiver.removeEndpoint(this.providerIdentity.channelId,this.endpointId),[...kt(this,Lt,"f").keys()].forEach((t=>this.closeEndpoint(t))),Tt(this,Lt,new Map,"f")},Tt(this,Mt,t,"f")}onEndpointDisconnect(t,e){}receive(t){this.messageReceiver.addEndpoint(t,this.providerIdentity.channelId,this.endpointId)}async closeEndpoint(t){const e=kt(this,Lt,"f").get(t);kt(this,Lt,"f").delete(t);const n=kt(this,Ot,"f").get(t);n?.forEach((n=>{const i=`Channel connection with identity uuid: ${e?.uuid} / name: ${e?.name} / endpointId: ${t} no longer connected.`;n.cancel(new Error(i))}))}isEndpointConnected(t){return kt(this,Lt,"f").has(t)}addEndpoint(t,e){kt(this,Lt,"f").set(t,e.endpointIdentity),kt(this,Ot,"f").set(t,new Set)}isValidEndpointPayload(t){return"string"==typeof t?.endpointIdentity?.endpointId||"string"==typeof t?.endpointIdentity?.channelId}},Mt=new WeakMap,Lt=new WeakMap,Ot=new WeakMap,Rt.ClassicInfo={version:5,minimumVersion:0,type:"classic"};var jt={},Bt={},zt={};Object.defineProperty(zt,"__esModule",{value:!0}),zt.errorToPOJO=void 0,zt.errorToPOJO=function(t){return{stack:t.stack,name:t.name,message:t.message,toString:()=>t.stack||t.toString()}};var Ft,Dt,Ut=d&&d.__classPrivateFieldGet||function(t,e,n,i){if("a"===n&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(t):i?i.value:e.get(t)},Wt=d&&d.__classPrivateFieldSet||function(t,e,n,i,o){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?o.call(t,n):o?o.value=n:e.set(t,n),n};Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.RTCEndpoint=void 0;const $t=zt;Bt.RTCEndpoint=class{static isValidEndpointPayload(t){const e=t=>"object"==typeof t&&null!==t;return e(t)&&e(t.endpointIdentity)&&e(t.rtc)&&"string"==typeof t.endpointIdentity.endpointId}constructor({rtc:t,endpointIdentity:e}){this.responseMap=new Map,Ft.set(this,null),Dt.set(this,void 0),this.connectionStateChangeHandler=t=>{"connected"!==this.rtc.rtcClient.connectionState&&(this.rtc.rtcClient.removeEventListener("connectionstatechange",this.connectionStateChangeHandler),this.close(),Ut(this,Dt,"f")&&Ut(this,Dt,"f").call(this))},this.send=async(t,e)=>{const n=`message-${Math.random()}`,i=new Promise(((t,e)=>{this.responseMap.set(n,{resolve:t,reject:e})}));return this.rtc.channels.request.send(JSON.stringify({action:t,payload:e,messageId:n})),i},this.close=()=>{this.responseMap.forEach((t=>t.reject("Connection has closed."))),this.responseMap=new Map,this.rtc.channels.request.close(),this.rtc.channels.response.close(),this.rtc.rtcClient.close()},this.rtc=t,this.endpointIdentity=e,this.rtc.channels.response.addEventListener("message",(t=>{let{data:e}=t;t.data instanceof ArrayBuffer&&(e=(new TextDecoder).decode(t.data));const{messageId:n,payload:i,success:o,error:r}=JSON.parse(e),{resolve:s,reject:a}=this.responseMap.get(n)??{};s&&a?(this.responseMap.delete(n),o?s(i):a(r)):(console.log("Could not find id in responseMap."),console.log(t))})),this.rtc.channels.request.addEventListener("message",(async t=>{let{data:n}=t;t.data instanceof ArrayBuffer&&(n=(new TextDecoder).decode(t.data));const{messageId:i,action:o,payload:r}=JSON.parse(n);if(Ut(this,Ft,"f"))try{const t=await Ut(this,Ft,"f").call(this,o,r,e);this.rtc.channels.response.send(JSON.stringify({messageId:i,payload:t,success:!0}))}catch(t){"open"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,error:(0,$t.errorToPOJO)(t),success:!1}))}else"open"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,success:!1,error:"Connection not ready."}))})),this.rtc.rtcClient.addEventListener("connectionstatechange",this.connectionStateChangeHandler),Object.values(this.rtc.channels).forEach((t=>{t.onclose=t=>{[...this.responseMap.values()].forEach((t=>t.reject(new Error("RTCDataChannel closed unexpectedly, this is most commonly caused by message size. Note: RTC Channels have a message size limit of ~255kB.")))),this.close(),Ut(this,Dt,"f")&&Ut(this,Dt,"f").call(this)}}))}onDisconnect(t){if(Ut(this,Dt,"f"))throw new Error("RTCEndpoint disconnectListener cannot be set twice.");Wt(this,Dt,t,"f")}receive(t){if(Ut(this,Ft,"f"))throw new Error("You have already set a listener for this RTC Endpoint.");Wt(this,Ft,t,"f")}get connected(){return"connected"===this.rtc.rtcClient.connectionState}},Ft=new WeakMap,Dt=new WeakMap;var Vt,Ht,Nt,Gt={},qt=d&&d.__classPrivateFieldGet||function(t,e,n,i){if("a"===n&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(t):i?i.value:e.get(t)},Yt=d&&d.__classPrivateFieldSet||function(t,e,n,i,o){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?o.call(t,n):o?o.value=n:e.set(t,n),n};Object.defineProperty(Gt,"__esModule",{value:!0}),Gt.EndpointStrategy=void 0,Gt.EndpointStrategy=class{constructor(t,e,n){this.EndpointType=t,this.StrategyName=n,Vt.set(this,null),Ht.set(this,new Map),Nt.set(this,!0),this.send=async(t,e,n)=>this.getEndpointById(t).send(e,n),this.close=async()=>{qt(this,Nt,"f")&&(qt(this,Ht,"f").forEach((t=>t.close())),Yt(this,Ht,new Map,"f")),Yt(this,Nt,!1,"f")},this.isValidEndpointPayload=e}onEndpointDisconnect(t,e){this.getEndpointById(t).onDisconnect(e)}receive(t){if(qt(this,Vt,"f"))throw new Error(`You have already set a listener for this ${this.StrategyName} Strategy`);Yt(this,Vt,t,"f"),qt(this,Ht,"f").forEach((t=>t.receive(qt(this,Vt,"f"))))}getEndpointById(t){const e=qt(this,Ht,"f").get(t);if(!e)throw new Error(`Client with endpoint id ${t} is not connected`);return e}get connected(){return qt(this,Nt,"f")}isEndpointConnected(t){return qt(this,Ht,"f").has(t)}addEndpoint(t,e){if(!qt(this,Nt,"f"))return void console.warn(`Adding endpoint to disconnected ${this.StrategyName} Strategy`);const n=new this.EndpointType(e);qt(this,Vt,"f")&&n.receive(qt(this,Vt,"f")),qt(this,Ht,"f").set(t,n)}async closeEndpoint(t){qt(this,Ht,"f").delete(t)}},Vt=new WeakMap,Ht=new WeakMap,Nt=new WeakMap,Object.defineProperty(jt,"__esModule",{value:!0}),jt.RTCInfo=jt.RTCStrategy=void 0;const Kt=Bt,Zt=Gt;class Jt extends Zt.EndpointStrategy{constructor(){super(Kt.RTCEndpoint,Kt.RTCEndpoint.isValidEndpointPayload,"RTC")}}jt.RTCStrategy=Jt,jt.RTCInfo={version:2,minimumVersion:0,type:"rtc"};var Xt={};Object.defineProperty(Xt,"__esModule",{value:!0}),Xt.RTCICEManager=void 0;const Qt=u;class te extends Qt.EmitterBase{constructor(t){super(t,"channel"),this.ensureChannelOpened=t=>new Promise(((e,n)=>{if("open"===t.readyState)e();else if("connecting"===t.readyState){const n=()=>{t.removeEventListener("open",n),e()};t.addEventListener("open",n)}else n(new Error("This Channel has already closed"))}))}static createDataChannelPromise(t,e){let n;const i=new Promise((t=>{n=t})),o=i=>{const r=()=>{i.channel.removeEventListener("open",r),n(i.channel)};i.channel.label===t&&(i.channel.addEventListener("open",r),e.removeEventListener("datachannel",o))};return e.addEventListener("datachannel",o),i}async listenForProviderIce(t,e){await this.on(this.createProviderEventName(t),e,{timestamp:Date.now()})}async raiseProviderIce(t,e){await this.wire.environment.raiseEvent(this.createRouteString(this.createProviderEventName(t)),e)}async listenForClientIce(t,e){await this.on(this.createClientEventName(t),e,{timestamp:Date.now()})}async raiseClientIce(t,e){await this.wire.environment.raiseEvent(this.createRouteString(this.createClientEventName(t)),e)}cleanupIceListeners(t){this.removeAllListeners(this.createClientEventName(t)),this.removeAllListeners(this.createProviderEventName(t))}createClientEventName(t){return`ice-client-${t}`}createProviderEventName(t){return`ice-provider-${t}`}createRouteString(t){return`channel/${t}`}createRtcPeer(){return this.wire.environment.getRtcPeer()}async startClientOffer(){const t=Math.random().toString(),e=this.createRtcPeer();e.addEventListener("icecandidate",(async e=>{e.candidate&&await this.raiseClientIce(t,{candidate:e.candidate?.toJSON()})})),await this.listenForProviderIce(t,(async t=>{await e.addIceCandidate(t.candidate)}));const n={request:e.createDataChannel("request"),response:e.createDataChannel("response")},i=await e.createOffer();await e.setLocalDescription(i);const o=Promise.all([n.request,n.response].map(this.ensureChannelOpened)).then((()=>{}));return{rtcClient:e,channels:n,offer:i,rtcConnectionId:t,channelsOpened:o}}async finishClientOffer(t,e,n){return await t.setRemoteDescription(e),await n,!0}async createProviderAnswer(t,e){const n=this.createRtcPeer(),i=te.createDataChannelPromise("request",n),o=te.createDataChannelPromise("response",n);n.addEventListener("icecandidate",(async e=>{e.candidate&&await this.raiseProviderIce(t,{candidate:e.candidate?.toJSON()})})),await this.listenForClientIce(t,(async t=>{await n.addIceCandidate(t.candidate)})),await n.setRemoteDescription(e);const r=await n.createAnswer();await n.setLocalDescription(r);const s=Promise.all([i,o]).then((([e,n])=>(this.cleanupIceListeners(t),{request:e,response:n})));return{rtcClient:n,answer:r,channels:s}}}Xt.RTCICEManager=te;var ee={},ne={};function ie(t){return[...t.split(".").reverse().entries()].reduce(((t,[e,n])=>t+ +n*1e4**e),0)}function oe(t,e){return ie(t)>=ie(e)}function re(t){return t.split("/")[0]}Object.defineProperty(ne,"__esModule",{value:!0}),ne.runtimeUuidMeetsMinimumRuntimeVersion=ne.parseRuntimeUuid=ne.meetsMinimumRuntimeVersion=void 0,ne.meetsMinimumRuntimeVersion=oe,ne.parseRuntimeUuid=re,ne.runtimeUuidMeetsMinimumRuntimeVersion=function(t,e){return oe(re(t),e)};var se,ae,ce,de,he,le=d&&d.__classPrivateFieldGet||function(t,e,n,i){if("a"===n&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(t):i?i.value:e.get(t)},ue=d&&d.__classPrivateFieldSet||function(t,e,n,i,o){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?o.call(t,n):o?o.value=n:e.set(t,n),n};Object.defineProperty(ee,"__esModule",{value:!0}),ee.ChannelProvider=void 0;const pe=wt,fe=ne;class me extends pe.ChannelBase{get connections(){return[...le(this,se,"f")]}static handleClientDisconnection(t,e){const n=t.connections.find((t=>t.endpointId===e.endpointId));n?le(t,de,"f").call(t,n):t.connections.filter((t=>t.uuid===e.uuid&&t.name===e.name)).forEach(le(t,de,"f")),t.disconnectListener(e)}static setProviderRemoval(t,e){me.removalMap.set(t,e)}constructor(t,e,n){super(),se.set(this,void 0),ae.set(this,void 0),ce.set(this,void 0),de.set(this,(t=>{const e=this.connections.filter((e=>e.endpointId!==t.endpointId));le(this,ce,"f").closeEndpoint(t.endpointId),ue(this,se,e,"f")})),this.processAction=async(t,e,n)=>(me.clientIsMultiRuntime(n)&&!(0,fe.runtimeUuidMeetsMinimumRuntimeVersion)(n.runtimeUuid,"18.87.56.0")?this.handleMultiRuntimeLegacyClient(n):this.checkForClientConnection(n),super.processAction(t,e,n)),he.set(this,(()=>{le(this,ce,"f").close();const t=me.removalMap.get(this);t&&t()})),ue(this,ae,new pe.ProtectedItems(t,e),"f"),this.connectListener=()=>{},this.disconnectListener=()=>{},ue(this,se,[],"f"),ue(this,ce,n,"f"),n.receive(this.processAction)}dispatch(t,e,n){const i=t.endpointId??this.getEndpointIdForOpenFinId(t,e);return i&&le(this,ce,"f").isEndpointConnected(i)?le(this,ce,"f").send(i,e,n):Promise.reject(new Error(`Client connection with identity uuid: ${t.uuid} / name: ${t.name} / endpointId: ${i} no longer connected.`))}async processConnection(t,e){return le(this,se,"f").push(t),this.connectListener(t,e)}publish(t,e){return this.connections.map((n=>le(this,ce,"f").send(n.endpointId,t,e)))}onConnection(t){this.connectListener=t}onDisconnection(t){this.disconnectListener=t}async destroy(){const t=le(this,ae,"f");t.providerIdentity,ue(this,se,[],"f"),await t.close(),le(this,he,"f").call(this)}async getAllClientInfo(){return this.connections.map((t=>{const{uuid:e,name:n,endpointId:i,entityType:o,connectionUrl:r}=t;return{uuid:e,name:n,endpointId:i,entityType:o,connectionUrl:r}}))}checkForClientConnection(t){if(!this.isClientConnected(t))throw new Error(`This action was sent from a client that is not connected to the provider.\n Client Identity: {uuid: ${t.uuid}, name: ${t.name}, endpointId: ${t.endpointId}}`)}isClientConnected(t){return me.clientIdentityIncludesEndpointId(t)?this.connections.some((e=>e.endpointId===t.endpointId&&e.uuid===t.uuid&&e.name===t.name)):this.isLegacyClientConnected(t)}isLegacyClientConnected(t){return this.connections.some((e=>e.uuid===t.uuid&&e.name===t.name))}handleMultiRuntimeLegacyClient(t){if(!this.isLegacyClientConnected(t))throw new Error(`This action was sent from a client that is not connected to the provider. Client Identity:\n {uuid: ${t.uuid}, name: ${t.name}, endpointId: ${t.endpointId}}`)}getEndpointIdForOpenFinId(t,e){const n=this.connections.filter((e=>e.name===t.name&&e.uuid===t.uuid));if(n.length>=2){const n=le(this,ae,"f"),{uuid:i,name:o}=t,r=n?.providerIdentity.uuid,s=n?.providerIdentity.name;console.warn(`WARNING: Dispatch call may have unintended results. The "to" argument of your dispatch call is missing the\n "endpointId" parameter. The identity you are dispatching to ({uuid: ${i}, name: ${o}})\n has multiple channelClients for this channel. Your dispatched action: (${e}) from the provider:\n ({uuid: ${r}, name: ${s}}) will only be processed by the most recently-created client.`)}return n.pop()?.endpointId}static clientIdentityIncludesEndpointId(t){return void 0!==t.endpointId}static clientIsMultiRuntime(t){return void 0!==t.runtimeUuid}static async wireClose(t,e){await t.sendAction("destroy-channel",{channelName:e})}}ee.ChannelProvider=me,se=new WeakMap,ae=new WeakMap,ce=new WeakMap,de=new WeakMap,he=new WeakMap,me.removalMap=new WeakMap;var we={};Object.defineProperty(we,"__esModule",{value:!0}),we.MessageReceiver=void 0;const ye=mt,ge=u;class ve extends ge.Base{constructor(t){super(t),this.onmessage=t=>"process-channel-message"===t.action&&(this.processChannelMessage(t),!0),this.endpointMap=new Map,this.latestEndpointIdByChannelId=new Map,t.registerMessageHandler(this.onmessage.bind(this))}async processChannelMessage(t){const{senderIdentity:e,providerIdentity:n,action:i,ackToSender:o,payload:r,intendedTargetIdentity:s}=t.payload,a=s.channelId??s.endpointId??this.latestEndpointIdByChannelId.get(n.channelId),c=this.endpointMap.get(a);if(!c)return o.payload.success=!1,o.payload.reason=`Client connection with identity uuid: ${this.wire.me.uuid} / name: ${this.wire.me.name} / endpointId: ${a} no longer connected.`,this.wire.sendRaw(o);try{const t=await c(i,r,e);return o.payload.payload=o.payload.payload||{},o.payload.payload.result=t,this.wire.sendRaw(o)}catch(t){return o.payload.success=!1,o.payload.reason=t.message,this.wire.sendRaw(o)}}addEndpoint(t,e,n){this.endpointMap.set(n,t),e!==n&&this.latestEndpointIdByChannelId.set(e,n)}removeEndpoint(t,e){this.endpointMap.delete(e),this.latestEndpointIdByChannelId.get(t)===e&&this.latestEndpointIdByChannelId.delete(t)}checkForPreviousClientConnection(t){const e=this.latestEndpointIdByChannelId.get(t);e&&(ye.ChannelClient.closeChannelByEndpointId(e),console.warn("You have created a second connection to an older provider. First connection has been removed from the clientMap"),console.warn("If the provider calls publish(), you may receive multiple messages."))}}we.MessageReceiver=ve;var Ce={};Object.defineProperty(Ce,"__esModule",{value:!0}),Ce.ProtocolManager=void 0,Ce.ProtocolManager=class{constructor(t){this.ProtocolsInPreferenceOrder=t,this.DefaultClientProtocols=["classic"],this.DefaultProviderProtocols=["classic"],this.getClientProtocols=t=>{const e=t?this.ProtocolsInPreferenceOrder.filter((e=>t.includes(e))):this.DefaultClientProtocols;if(!e.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(", ")}.`);return e},this.getProviderProtocols=t=>{const e=t?this.ProtocolsInPreferenceOrder.filter((e=>t.includes(e))):this.DefaultProviderProtocols;if(!e.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(", ")}.`);return e},this.getCompatibleProtocols=(t,e)=>e.supportedProtocols.filter((e=>t.some((t=>t.type===e.type&&e.version>=t.minimumVersion&&t.version>=(e.minimumVersion??0))))).slice(0,e.maxProtocols)}};var be={};Object.defineProperty(be,"__esModule",{value:!0});class _e{static combine(t,e){return new _e(t,e)}constructor(t,e){this.primary=t,this.secondary=e}onEndpointDisconnect(t,e){this.primary.onEndpointDisconnect(t,(()=>{this.secondary.isEndpointConnected(t)||e()})),this.secondary.onEndpointDisconnect(t,(()=>{this.primary.isEndpointConnected(t)||e()}))}isValidEndpointPayload(t){return this.primary.isValidEndpointPayload(t)||this.secondary.isValidEndpointPayload(t)}async closeEndpoint(t){await this.primary.closeEndpoint(t),await this.secondary.closeEndpoint(t)}isEndpointConnected(t){return this.primary.isEndpointConnected(t)||this.secondary.isEndpointConnected(t)}async addEndpoint(t,e){this.primary.isValidEndpointPayload(e)&&await this.primary.addEndpoint(t,e),this.secondary.isValidEndpointPayload(e)&&await this.secondary.addEndpoint(t,e)}receive(t){this.primary.receive(t),this.secondary.receive(t)}send(t,e,n){return this.primary.isEndpointConnected(t)?this.primary.send(t,e,n):this.secondary.send(t,e,n)}async close(){await Promise.all([this.primary.close(),this.secondary.close()])}}be.default=_e;var Ie,Ee,xe=d&&d.__classPrivateFieldSet||function(t,e,n,i,o){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?o.call(t,n):o?o.value=n:e.set(t,n),n},Se=d&&d.__classPrivateFieldGet||function(t,e,n,i){if("a"===n&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(t):i?i.value:e.get(t)},Ae=d&&d.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(At,"__esModule",{value:!0}),At.ConnectionManager=void 0;const Pe=Pt,Me=u,Le=Rt,Oe=jt,Re=Xt,Te=ee,ke=we,je=Ce,Be=Ae(be);class ze extends Me.Base{static getProtocolOptionsFromStrings(t){return t.map((t=>{switch(t){case"rtc":return Oe.RTCInfo;case"classic":return Le.ClassicInfo;default:return(0,Pe.exhaustiveCheck)(t,["rtc","classic"])}}))}constructor(t){super(t),Ie.set(this,void 0),Ee.set(this,void 0),this.removeChannelFromProviderMap=t=>{this.providerMap.delete(t)},this.onmessage=t=>"process-channel-connection"===t.action&&(this.processChannelConnection(t),!0),this.providerMap=new Map,this.protocolManager=new je.ProtocolManager("node"===this.wire.environment.type?["classic"]:["rtc","classic"]),xe(this,Ie,new ke.MessageReceiver(t),"f"),xe(this,Ee,new Re.RTCICEManager(t),"f"),t.registerMessageHandler(this.onmessage.bind(this))}createProvider(t,e){const n=Object.assign(this.wire.environment.getDefaultChannelOptions().create,t||{}),i=this.protocolManager.getProviderProtocols(n?.protocols),o=i.map((t=>{switch(t){case"rtc":return new Oe.RTCStrategy;case"classic":return new Le.ClassicStrategy(this.wire,Se(this,Ie,"f"),e.channelId,e);default:return(0,Pe.exhaustiveCheck)(t,["rtc","classic"])}}));let r;if(2===o.length){const[t,e]=o;r=Be.default.combine(t,e)}else{if(1!==o.length)throw new Error("failed to combine strategies");[r]=o}const s=new Te.ChannelProvider(e,(()=>Te.ChannelProvider.wireClose(this.wire,e.channelName)),r),a=e.channelId;return this.providerMap.set(a,{provider:s,strategy:r,supportedProtocols:ze.getProtocolOptionsFromStrings(i)}),Te.ChannelProvider.setProviderRemoval(s,this.removeChannelFromProviderMap.bind(this)),s}async createClientOffer(t){const e=this.protocolManager.getClientProtocols(t?.protocols);let n;return{offer:{supportedProtocols:await Promise.all(e.map((async t=>{switch(t){case"rtc":{const{rtcClient:t,channels:e,offer:i,rtcConnectionId:o,channelsOpened:r}=await Se(this,Ee,"f").startClientOffer();return n={rtcClient:t,channels:e,channelsOpened:r},{type:"rtc",version:Oe.RTCInfo.version,payload:{offer:i,rtcConnectionId:o}}}case"classic":return{type:"classic",version:Le.ClassicInfo.version};default:return(0,Pe.exhaustiveCheck)(t,["rtc","classic"])}}))),maxProtocols:2},rtc:n}}async createClientStrategy(t,e){e.endpointId||(e.endpointId=this.wire.environment.getNextMessageId(),Se(this,Ie,"f").checkForPreviousClientConnection(e.channelId));const n=e.answer??{supportedProtocols:[{type:"classic",version:1}]},i=(await Promise.all(n.supportedProtocols.map((async n=>"rtc"===n.type&&t?(await Se(this,Ee,"f").finishClientOffer(t.rtcClient,n.payload.answer,t.channelsOpened),new Oe.RTCStrategy):"classic"===n.type?new Le.ClassicStrategy(this.wire,Se(this,Ie,"f"),e.endpointId,e):null)))).filter((t=>null!==t));let o;if(t&&!i.some((t=>t instanceof Oe.RTCStrategy))&&t&&t.rtcClient.close(),i.length>=2)o=Be.default.combine(i[0],i[1]);else{if(!i.length)throw new Error("No compatible protocols");[o]=i}const r={endpointIdentity:e,rtc:t};return o.addEndpoint(e.channelId,r),o}async processChannelConnection(t){const{clientIdentity:e,providerIdentity:n,ackToSender:i,payload:o,offer:r}=t.payload;e.endpointId?e.isLocalEndpointId=!1:(e.endpointId=this.wire.environment.getNextMessageId(),e.isLocalEndpointId=!0);const s=n.channelId,a=this.providerMap.get(s);if(!a)return i.payload.success=!1,i.payload.reason=`Channel "${n.channelName}" has been destroyed.`,this.wire.sendRaw(i);const{provider:c,strategy:d,supportedProtocols:h}=a;try{if(!(c instanceof Te.ChannelProvider))throw Error("Cannot connect to a channel client");const t=r??{supportedProtocols:[{type:"classic",version:1}],maxProtocols:1},n=this.protocolManager.getCompatibleProtocols(h,t);if(!n.length)throw new Error("This provider does not support any of the offered protocols.");const s=await c.processConnection(e,o);i.payload.payload=i.payload.payload||{};let a={supportedProtocols:[],endpointPayloadPromise:Promise.resolve({endpointIdentity:e})};return a=await n.reduce((async(t,e)=>{const n=await t;if("rtc"===e.type){const{answer:t,rtcClient:i,channels:o}=await Se(this,Ee,"f").createProviderAnswer(e.payload.rtcConnectionId,e.payload.offer);n.supportedProtocols.push({type:"rtc",version:Oe.RTCInfo.version,payload:{answer:t}}),n.endpointPayloadPromise=n.endpointPayloadPromise.then((t=>o.then((e=>({...t,rtc:{rtcClient:i,channels:e}})))))}else n.supportedProtocols.push({type:"classic",version:Le.ClassicInfo.version});return n}),Promise.resolve(a)),a.endpointPayloadPromise.then((t=>d.addEndpoint(e.endpointId,t))),i.payload.payload.result=s,i.payload.payload.answer=a,this.wire.sendRaw(i)}catch(t){return i.payload.success=!1,i.payload.reason=t.message,this.wire.sendRaw(i)}}}At.ConnectionManager=ze,Ie=new WeakMap,Ee=new WeakMap;var Fe,De,Ue,We=d&&d.__classPrivateFieldSet||function(t,e,n,i,o){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?o.call(t,n):o?o.value=n:e.set(t,n),n},$e=d&&d.__classPrivateFieldGet||function(t,e,n,i){if("a"===n&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(t):i?i.value:e.get(t)};Object.defineProperty(ft,"__esModule",{value:!0}),ft.Channel=void 0;const Ve=o,He=$,Ne=u,Ge=mt,qe=At,Ye=ee;function Ke(t){const e=Math.floor(t/10),n=Math.min(3e4,500*2**e);return new Promise((t=>{setTimeout((()=>{t(!1)}),n)}))}class Ze extends Ne.EmitterBase{constructor(t){super(t,"channel"),Fe.set(this,void 0),De.set(this,new Ve.EventEmitter),Ue.set(this,new He.AsyncRetryableLazy((async()=>{await Promise.all([this.on("disconnected",(t=>{Ge.ChannelClient.handleProviderDisconnect(t)})),this.on("connected",((...t)=>{$e(this,De,"f").emit("connected",...t)}))]).catch((()=>new Error("error setting up channel connection listeners")))}))),We(this,Fe,new qe.ConnectionManager(t),"f")}async getAllChannels(){return this.wire.sendAction("get-all-channels").then((({payload:t})=>t.data))}async onChannelConnect(t){await this.on("connected",t)}async onChannelDisconnect(t){await this.on("disconnected",t)}async safeConnect(t,e,n){const i={count:0};do{let o=()=>{};const r=new Promise((e=>{o=n=>{t===n.channelName&&e(!0)},$e(this,De,"f").on("connected",o)}));try{if(i.count>0){i.gotConnectedEvent=await Promise.race([Ke(i.count),r]);const e=await this.wire.sendAction("connect-to-channel",{...n,retryInfo:i});return console.log(`Successfully connected to channelName: ${t}`),e.payload.data}const e=this.wire.sendAction("connect-to-channel",n);return i.originalMessageId=e.messageId,(await e).payload.data}catch(n){if(!n.message.includes("internal-nack"))throw n;e&&0===i.count&&console.warn(`No channel found for channelName: ${t}. Waiting for connection...`)}finally{i.count+=1,$e(this,De,"f").removeListener("connected",o)}}while(e);throw new Error(`No channel found for channelName: ${t}.`)}async connect(t,e={}){if(await $e(this,Ue,"f").getValue(),!t||"string"!=typeof t)throw new Error("Please provide a channelName string to connect to a channel.");const n={wait:!0,...this.wire.environment.getDefaultChannelOptions().connect,...e},{offer:i,rtc:o}=await $e(this,Fe,"f").createClientOffer(n);let r;(this.fin.me.isFrame||this.fin.me.isView||this.fin.me.isWindow)&&(r=(await this.fin.me.getInfo()).url);const s={channelName:t,...n,offer:i,connectionUrl:r},a=await this.safeConnect(t,n.wait,s),c=await $e(this,Fe,"f").createClientStrategy(o,a),d=new Ge.ChannelClient(a,(()=>Ge.ChannelClient.wireClose(this.wire,a,a.endpointId)),c);return c.onEndpointDisconnect(a.channelId,(async()=>{try{await d.sendDisconnectAction()}catch(t){console.warn(`Something went wrong during disconnect for client with uuid: ${a.uuid} / name: ${a.name} / endpointId: ${a.endpointId}.`)}finally{Ge.ChannelClient.handleProviderDisconnect(a)}})),d}async create(t,e){if(!t)throw new Error("Please provide a channelName to create a channel");const{payload:{data:n}}=await this.wire.sendAction("create-channel",{channelName:t}),i=$e(this,Fe,"f").createProvider(e,n);return this.on("client-disconnected",(e=>{e.channelName===t&&Ye.ChannelProvider.handleClientDisconnection(i,e)})),i}}ft.Channel=Ze,Fe=new WeakMap,De=new WeakMap,Ue=new WeakMap,Object.defineProperty(ut,"__esModule",{value:!0}),ut.InterAppPayload=ut.InterApplicationBus=void 0;const Je=o,Xe=u,Qe=pt,tn=ft,en=R;class nn extends Xe.Base{constructor(t){super(t),this.events={subscriberAdded:"subscriber-added",subscriberRemoved:"subscriber-removed"},this.refCounter=new Qe.RefCounter,this.Channel=new tn.Channel(t),this.emitter=new Je.EventEmitter,t.registerMessageHandler(this.onmessage.bind(this)),this.on=this.emitter.on.bind(this.emitter),this.removeAllListeners=this.emitter.removeAllListeners.bind(this.emitter)}async publish(t,e){await this.wire.sendAction("publish-message",{topic:t,message:e,sourceWindowName:this.me.name})}async send(t,e,n){const i=(0,en.validateIdentity)(t);if(i)throw new Error(i);await this.wire.sendAction("send-message",{destinationUuid:t.uuid,destinationWindowName:t.name,topic:e,message:n,sourceWindowName:this.me.name})}subscribe(t,e,n){const i=this.createSubscriptionKey(t.uuid,t.name||"*",e);return this.emitter.on(i,n),this.refCounter.actOnFirst(i,(async()=>{await this.wire.sendAction("subscribe",{sourceUuid:t.uuid,sourceWindowName:t.name||"*",topic:e,destinationWindowName:this.me.name})}),(()=>Promise.resolve()))}unsubscribe(t,e,n){const i=t.name||"*",o=this.createSubscriptionKey(t.uuid,i,e);return this.emitter.removeListener(o,n),this.refCounter.actOnLast(o,(async()=>{await this.wire.sendAction("unsubscribe",{sourceUuid:t.uuid,sourceWindowName:i,topic:e,destinationWindowName:this.me.name})}),(()=>new Promise((t=>t)).then((()=>{}))))}processMessage(t){const{payload:{message:e,sourceWindowName:n,sourceUuid:i,topic:o}}=t,r=[this.createSubscriptionKey(i,n,o),this.createSubscriptionKey(i,"*",o),this.createSubscriptionKey("*","*",o)],s={uuid:i,name:n};r.forEach((t=>{this.emitter.emit(t,e,s)}))}emitSubscriverEvent(t,e){const{payload:{targetName:n,uuid:i,topic:o}}=e,r={name:n,uuid:i,topic:o};this.emitter.emit(t,r)}createSubscriptionKey(t,e,n){const i=e||"*";if(!(t&&i&&n))throw new Error("Missing uuid, name, or topic string");return function(...t){return t.map((t=>Buffer.from(`${t}`).toString("base64"))).join("/")}(t,i,n)}onmessage(t){const{action:e}=t;switch(e){case"process-message":this.processMessage(t);break;case this.events.subscriberAdded:this.emitSubscriverEvent(this.events.subscriberAdded,t);break;case this.events.subscriberRemoved:this.emitSubscriverEvent(this.events.subscriberRemoved,t)}return!0}}ut.InterApplicationBus=nn,ut.InterAppPayload=class{};var on={};Object.defineProperty(on,"__esModule",{value:!0}),on.Clipboard=void 0;const rn=u;class sn extends rn.Base{async writeText(t){await this.wire.sendAction("clipboard-write-text",t)}async readText(t){const{payload:e}=await this.wire.sendAction("clipboard-read-text",{type:t});return e.data}async writeImage(t){await this.wire.sendAction("clipboard-write-image",t)}async readImage(t={format:"dataURL"}){const{payload:e}=await this.wire.sendAction("clipboard-read-image",t);return e.data}async writeHtml(t){await this.wire.sendAction("clipboard-write-html",t)}async readHtml(t){const{payload:e}=await this.wire.sendAction("clipboard-read-html",{type:t});return e.data}async writeRtf(t){await this.wire.sendAction("clipboard-write-rtf",t)}async readRtf(t){const{payload:e}=await this.wire.sendAction("clipboard-read-rtf",{type:t});return e.data}async write(t){await this.wire.sendAction("clipboard-write",t)}async getAvailableFormats(t){const{payload:e}=await this.wire.sendAction("clipboard-read-formats",{type:t});return e.data}}on.Clipboard=sn;var an={},cn={},dn={};Object.defineProperty(dn,"__esModule",{value:!0}),dn.ExternalApplication=void 0;const hn=u;class ln extends hn.EmitterBase{constructor(t,e){super(t,"external-application",e.uuid),this.identity=e}getInfo(){return this.wire.sendAction("get-external-application-info",this.identity).then((({payload:t})=>t.data))}}dn.ExternalApplication=ln,Object.defineProperty(cn,"__esModule",{value:!0}),cn.ExternalApplicationModule=void 0;const un=u,pn=dn;class fn extends un.Base{wrap(t){return this.wire.sendAction("external-application-wrap").catch((t=>{})),Promise.resolve(new pn.ExternalApplication(this.wire,{uuid:t}))}wrapSync(t){return this.wire.sendAction("external-application-wrap-sync").catch((t=>{})),new pn.ExternalApplication(this.wire,{uuid:t})}}cn.ExternalApplicationModule=fn,function(t){var e=d&&d.__createBinding||(Object.create?function(t,e,n,i){void 0===i&&(i=n);var o=Object.getOwnPropertyDescriptor(e,n);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,o)}:function(t,e,n,i){void 0===i&&(i=n),t[i]=e[n]}),n=d&&d.__exportStar||function(t,n){for(var i in t)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||e(n,t,i)};Object.defineProperty(t,"__esModule",{value:!0}),n(cn,t),n(dn,t)}(an);var mn={},wn={},yn={};Object.defineProperty(yn,"__esModule",{value:!0}),yn._Frame=void 0;const gn=u;class vn extends gn.EmitterBase{constructor(t,e){super(t,"frame",e.uuid,e.name),this.identity=e}getInfo(){return this.wire.sendAction("get-frame-info",this.identity).then((({payload:t})=>t.data))}getParentWindow(){return this.wire.sendAction("get-parent-window",this.identity).then((({payload:t})=>t.data))}}yn._Frame=vn,Object.defineProperty(wn,"__esModule",{value:!0}),wn._FrameModule=void 0;const Cn=u,bn=R,_n=yn;class In extends Cn.Base{async wrap(t){this.wire.sendAction("frame-wrap").catch((t=>{}));const e=(0,bn.validateIdentity)(t);if(e)throw new Error(e);return new _n._Frame(this.wire,t)}wrapSync(t){this.wire.sendAction("frame-wrap-sync").catch((t=>{}));const e=(0,bn.validateIdentity)(t);if(e)throw new Error(e);return new _n._Frame(this.wire,t)}getCurrent(){return this.wire.sendAction("frame-get-current").catch((t=>{})),Promise.resolve(new _n._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity()))}getCurrentSync(){return this.wire.sendAction("frame-get-current-sync").catch((t=>{})),new _n._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity())}}wn._FrameModule=In,function(t){var e=d&&d.__createBinding||(Object.create?function(t,e,n,i){void 0===i&&(i=n);var o=Object.getOwnPropertyDescriptor(e,n);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,o)}:function(t,e,n,i){void 0===i&&(i=n),t[i]=e[n]}),n=d&&d.__exportStar||function(t,n){for(var i in t)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||e(n,t,i)};Object.defineProperty(t,"__esModule",{value:!0}),n(wn,t),n(yn,t)}(mn);var En={};Object.defineProperty(En,"__esModule",{value:!0}),En.GlobalHotkey=void 0;const xn=u;class Sn extends xn.EmitterBase{constructor(t){super(t,"global-hotkey")}async register(t,e){await this.on(t,e),await this.wire.sendAction("global-hotkey-register",{hotkey:t})}async unregister(t){await this.removeAllListeners(t),await this.wire.sendAction("global-hotkey-unregister",{hotkey:t})}async unregisterAll(){await Promise.all(this.eventNames().filter((t=>!("registered"===t||"unregistered"===t))).map((t=>this.removeAllListeners(t)))),await this.wire.sendAction("global-hotkey-unregister-all",{})}async isRegistered(t){const{payload:{data:e}}=await this.wire.sendAction("global-hotkey-is-registered",{hotkey:t});return e}}En.GlobalHotkey=Sn;var An,Pn={},Mn={},Ln={},On=d&&d.__classPrivateFieldGet||function(t,e,n,i){if("a"===n&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(t):i?i.value:e.get(t)};Object.defineProperty(Ln,"__esModule",{value:!0}),Ln.Platform=void 0;const Rn=u,Tn=R,kn=new Map;class jn extends Rn.EmitterBase{constructor(t,e){super(e.wire,"application",t.uuid),this.getClient=t=>{this.wire.sendAction("platform-get-client",this.identity).catch((t=>{}));const e=t||this.identity,{uuid:n}=e;if(!kn.has(n)){const t=On(this,An,"f").call(this,n);kn.set(n,t)}return kn.get(n)},An.set(this,(async t=>{try{const e=`custom-frame-${t}`,n=await this._channel.connect(e,{wait:!1});return n.onDisconnection((()=>{kn.delete(t)})),n}catch(e){throw kn.delete(t),new Error("The targeted Platform is not currently running. Listen for application-started event for the given Uuid.")}})),this.launchLegacyManifest=this.launchContentManifest;const n=(0,Tn.validateIdentity)(t);if(n)throw new Error(n);this._channel=e,this.identity={uuid:t.uuid},this.Layout=this.fin.Platform.Layout,this.Application=this.fin.Application.wrapSync(this.identity)}async createView(t,e,n){this.wire.sendAction("platform-create-view",this.identity).catch((t=>{}));const i=await this.getClient(),o=await i.dispatch("create-view",{target:e,opts:t,targetView:n});if(!o||(0,Tn.validateIdentity)(o.identity))throw new Error(`When overwriting the createView call, please return an object that has a valid 'identity' property: ${JSON.stringify(o)}`);return this.fin.View.wrapSync(o.identity)}async createWindow(t){this.wire.sendAction("platform-create-window",this.identity).catch((t=>{}));const e=await this.getClient();t.reason||(t.reason="api-call");const n=await e.dispatch("create-view-container",t);if(!n||(0,Tn.validateIdentity)(n.identity))throw new Error(`When overwriting the createWindow call, please return an object that has a valid 'identity' property: ${JSON.stringify(n)}`);const{identity:i}=n,o=this.fin.Window.wrapSync(i);return o.name=i.name,o.uuid=i.uuid,o}async quit(){return this.wire.sendAction("platform-quit",this.identity).catch((t=>{})),(await this.getClient()).dispatch("quit")}async closeView(t){this.wire.sendAction("platform-close-view",this.identity).catch((t=>{}));const e=await this.getClient();await e.dispatch("close-view",{view:t})}async reparentView(t,e){console.warn("Platform.reparentView has been deprecated, please use Platform.createView"),this.wire.sendAction("platform-reparent-view",this.identity).catch((t=>{}));const n={...t,uuid:t.uuid??this.identity.uuid},i=await this.fin.View.wrap(n),o=await i.getOptions();return this.createView(o,e)}async getSnapshot(){return this.wire.sendAction("platform-get-snapshot",this.identity).catch((t=>{})),(await this.getClient()).dispatch("get-snapshot")}async getViewSnapshot(t){return(await this.getClient()).dispatch("get-view-snapshot",{viewIdentity:t})}async applySnapshot(t,e){this.wire.sendAction("platform-apply-snapshot",this.identity).catch((t=>{}));const n="Requested snapshot must be a valid Snapshot object, or a url or filepath to such an object.";let i;if("string"==typeof t)try{i=(await this._channel.wire.sendAction("get-application-manifest",{manifestUrl:t})).payload.data}catch(t){throw new Error(`${n}: ${t}`)}else i=t;if(!i.windows)throw new Error(n);const o=await this.getClient();return await o.dispatch("apply-snapshot",{snapshot:i,options:e}),this}async fetchManifest(t){return(await this.getClient()).dispatch("platform-fetch-manifest",{manifestUrl:t})}async launchContentManifest(t){this.wire.sendAction("platform-launch-content-manifest",this.identity).catch((()=>{}));const e=await this.getClient(),n=await this.fetchManifest(t);return e.dispatch("launch-into-platform",{manifest:n,manifestUrl:t}),this}async setWindowContext(t={},e){if(this.wire.sendAction("platform-set-window-context",this.identity).catch((t=>{})),!t)throw new Error("Please provide a serializable object or string to set the context.");const n=await this.getClient(),{entityType:i}=e?await this.fin.System.getEntityInfo(e.uuid,e.name):this.fin.me;await n.dispatch("set-window-context",{context:t,entityType:i,target:e||{uuid:this.fin.me.uuid,name:this.fin.me.name}})}async getWindowContext(t){this.wire.sendAction("platform-get-window-context",this.identity).catch((t=>{}));const e=await this.getClient(),{entityType:n}=t?await this.fin.System.getEntityInfo(t.uuid,t.name):this.fin.me;return e.dispatch("get-window-context",{target:t||{uuid:this.fin.me.uuid,name:this.fin.me.name},entityType:n})}async closeWindow(t,e={skipBeforeUnload:!1}){return this.wire.sendAction("platform-close-window",this.identity).catch((t=>{})),(await this.getClient()).dispatch("close-window",{windowId:t,options:e})}}Ln.Platform=jn,An=new WeakMap;var Bn={},zn={},Fn={},Dn={};function Un(t){switch(t){case"columns":case"grid":case"rows":case"tabs":return!0;default:return!1}}Object.defineProperty(Dn,"__esModule",{value:!0}),Dn.overrideFromComposables=Dn.isValidPresetType=void 0,Dn.isValidPresetType=Un,Dn.overrideFromComposables=function(...t){return e=>t.reduceRight(((t,e)=>n=>e(t(n))),(t=>t))(e)},Dn.default={isValidPresetType:Un};var Wn={},$n={},Vn={};Object.defineProperty(Vn,"__esModule",{value:!0}),Vn.ApiConsumer=void 0,Vn.ApiConsumer=class{constructor(t){this.strategy=t,this.consume=async t=>(await this.strategy.getExposedFunctions(t)).reduce(((e,n)=>({...e,[n.key]:this.strategy.createFunction(n,t)})),{})}};var Hn={},Nn={};Object.defineProperty(Nn,"__esModule",{value:!0}),Nn.expose=Nn.getExposedProperties=void 0;const Gn=Symbol("exposedProperties");Nn.getExposedProperties=t=>t[Gn]||t.prototype[Gn]||[],Nn.expose=t=>(e,n,i)=>{e[Gn]=e[Gn]||[],e[Gn].push({key:n,descriptor:i,options:t})},Object.defineProperty(Hn,"__esModule",{value:!0}),Hn.ApiExposer=void 0;const qn=Nn;Hn.ApiExposer=class{constructor(t){this.strategy=t,this.exposeInstance=async(t,e)=>{const n=(0,qn.getExposedProperties)(t),i=await Promise.all(n.map((async({key:n,options:i})=>({key:n,options:await this.strategy.exposeFunction(t[n].bind(t),{key:n,options:i,meta:e})}))));await this.strategy.exposeMeta(e,i)}}};var Yn={},Kn={},Zn={};Object.defineProperty(Zn,"__esModule",{value:!0}),Zn.ChannelsConsumer=void 0,Zn.ChannelsConsumer=class{constructor(t){this.channel=t,this.getExposedFunctions=async t=>{const{id:e}=t,{props:n}=await this.channel.dispatch(`api-meta:${e}`);return n},this.createFunction=t=>(...e)=>{const{action:n}=t.options;return this.channel.dispatch(n,{args:e})}}};var Jn={};Object.defineProperty(Jn,"__esModule",{value:!0}),Jn.ChannelsExposer=void 0,Jn.ChannelsExposer=class{constructor(t){this.channelProviderOrClient=t,this.exposeFunction=async(t,e)=>{const{key:n,options:i,meta:o}=e,{id:r}=o,s=`${r}.${i?.action||n}`;return await this.channelProviderOrClient.register(s,(async({args:e})=>t(...e))),{action:s}},this.exposeMeta=async({id:t},e)=>{const n=`api-meta:${t}`;await this.channelProviderOrClient.register(n,(()=>({props:e})))}}},function(t){var e=d&&d.__createBinding||(Object.create?function(t,e,n,i){void 0===i&&(i=n);var o=Object.getOwnPropertyDescriptor(e,n);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,o)}:function(t,e,n,i){void 0===i&&(i=n),t[i]=e[n]}),n=d&&d.__exportStar||function(t,n){for(var i in t)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||e(n,t,i)};Object.defineProperty(t,"__esModule",{value:!0}),n(Zn,t),n(Jn,t)}(Kn),function(t){var e=d&&d.__createBinding||(Object.create?function(t,e,n,i){void 0===i&&(i=n);var o=Object.getOwnPropertyDescriptor(e,n);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,o)}:function(t,e,n,i){void 0===i&&(i=n),t[i]=e[n]}),n=d&&d.__exportStar||function(t,n){for(var i in t)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||e(n,t,i)};Object.defineProperty(t,"__esModule",{value:!0}),n(Kn,t)}(Yn),function(t){var e=d&&d.__createBinding||(Object.create?function(t,e,n,i){void 0===i&&(i=n);var o=Object.getOwnPropertyDescriptor(e,n);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,o)}:function(t,e,n,i){void 0===i&&(i=n),t[i]=e[n]}),n=d&&d.__exportStar||function(t,n){for(var i in t)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||e(n,t,i)};Object.defineProperty(t,"__esModule",{value:!0}),n(Vn,t),n(Hn,t),n(Yn,t),n(Nn,t)}($n);var Xn={};Object.defineProperty(Xn,"__esModule",{value:!0}),Xn.createRelayedDispatch=e.relayChannelClientApi_1=Xn.relayChannelClientApi=void 0;const Qn=["no longer connected","RTCDataChannel closed unexpectedly","The client you are trying to dispatch from is disconnected from the target provider"];e.relayChannelClientApi_1=Xn.relayChannelClientApi=async(t,e)=>{t.register(`relay:${e}`,(({action:e,target:n,payload:i})=>t.dispatch(n,e,i))),await Promise.resolve()},Xn.createRelayedDispatch=(t,e,n,i)=>async(o,r)=>{try{return await t.dispatch(`relay:${n}`,{action:o,payload:r,target:e})}catch(t){if(s=t.message,Qn.some((t=>s.includes(t)))&&i)throw new Error(i);throw t}var s};var ti,ei,ni,ii=d&&d.__classPrivateFieldSet||function(t,e,n,i,o){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?o.call(t,n):o?o.value=n:e.set(t,n),n},oi=d&&d.__classPrivateFieldGet||function(t,e,n,i){if("a"===n&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(t):i?i.value:e.get(t)};Object.defineProperty(Wn,"__esModule",{value:!0}),Wn.ColumnOrRow=Wn.TabStack=Wn.LayoutNode=void 0;const ri=$n,si=Xn;class ai{constructor(t,e){ti.set(this,void 0),this.isRoot=()=>oi(this,ti,"f").isRoot(this.entityId),this.exists=()=>oi(this,ti,"f").exists(this.entityId),this.getParent=async()=>{const t=await oi(this,ti,"f").getParent(this.entityId);if(t)return ai.getEntity(t,oi(this,ti,"f"))},this.createAdjacentStack=async(t,e)=>{const n=await oi(this,ti,"f").createAdjacentStack(this.entityId,t,e);return ai.getEntity({entityId:n,type:"stack"},oi(this,ti,"f"))},this.getAdjacentStacks=async t=>(await oi(this,ti,"f").getAdjacentStacks({targetId:this.entityId,edge:t})).map((t=>ai.getEntity({type:"stack",entityId:t.entityId},oi(this,ti,"f")))),ii(this,ti,t,"f"),this.entityId=e}}Wn.LayoutNode=ai,ti=new WeakMap,ai.newLayoutEntitiesClient=async(t,e,n)=>{const i=(0,si.createRelayedDispatch)(t,n,"layout-relay","You are trying to interact with a layout component on a window that does not exist or has been destroyed.");return new ri.ApiConsumer(new ri.ChannelsConsumer({dispatch:i})).consume({id:e})},ai.getEntity=(t,e)=>{const{entityId:n,type:i}=t;switch(i){case"column":case"row":return new di(e,n,i);case"stack":return new ci(e,n);default:throw new Error(`Unrecognised Layout Entity encountered ('${JSON.stringify(t)})`)}};class ci extends ai{constructor(t,e){super(t,e),ei.set(this,void 0),this.type="stack",this.getViews=()=>oi(this,ei,"f").getStackViews(this.entityId),this.addView=async(t,e={index:0})=>oi(this,ei,"f").addViewToStack(this.entityId,t,e),this.removeView=async t=>{await oi(this,ei,"f").removeViewFromStack(this.entityId,t)},this.setActiveView=async t=>{await oi(this,ei,"f").setStackActiveView(this.entityId,t)},ii(this,ei,t,"f")}}Wn.TabStack=ci,ei=new WeakMap;class di extends ai{constructor(t,e,n){super(t,e),ni.set(this,void 0),this.getContent=async()=>(await oi(this,ni,"f").getContent(this.entityId)).map((t=>ai.getEntity(t,oi(this,ni,"f")))),ii(this,ni,t,"f"),this.type=n}}Wn.ColumnOrRow=di,ni=new WeakMap;var hi={};Object.defineProperty(hi,"__esModule",{value:!0}),hi.DEFAULT_LAYOUT_KEY=hi.LAYOUT_CONTROLLER_ID=void 0,hi.LAYOUT_CONTROLLER_ID="layout-entities",hi.DEFAULT_LAYOUT_KEY="__default__";var li,ui,pi,fi=d&&d.__classPrivateFieldGet||function(t,e,n,i){if("a"===n&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(t):i?i.value:e.get(t)};Object.defineProperty(Fn,"__esModule",{value:!0}),Fn.Layout=void 0;const mi=$,wi=R,yi=u,gi=Dn,vi=Wn,Ci=hi;class bi extends yi.Base{static getClient(t){return fi(t,ui,"f").getValue()}constructor(t,e){super(e),li.add(this),ui.set(this,new mi.Lazy((async()=>vi.LayoutNode.newLayoutEntitiesClient(await this.platform.getClient(),Ci.LAYOUT_CONTROLLER_ID,this.identity)))),this.replace=async t=>{this.wire.sendAction("layout-replace").catch((t=>{}));const e=await this.platform.getClient();await e.dispatch("replace-layout",{target:this.identity,opts:{layout:t}})},this.replaceView=async(t,e)=>{this.wire.sendAction("layout-replace-view").catch((t=>{}));const n=await this.platform.getClient();await n.dispatch("replace-view",{target:this.identity,opts:{viewToReplace:t,newView:e}})},this.applyPreset=async t=>{this.wire.sendAction("layout-apply-preset").catch((t=>{}));const e=await this.platform.getClient(),{presetType:n}=t;if(!n||!(0,gi.isValidPresetType)(n))throw new Error("Cannot apply preset layout, please include an applicable presetType property in the PresetLayoutOptions.");await e.dispatch("apply-preset-layout",{target:this.identity,opts:{presetType:n}})};const n=(0,wi.validateIdentity)(t);if(n)throw new Error(n);this.identity=t,this.platform=this.fin.Platform.wrapSync({uuid:t.uuid}),t.uuid===this.fin.me.uuid&&t.name===this.fin.me.name&&(this.init=this.fin.Platform.Layout.init)}async getConfig(){return this.wire.sendAction("layout-get-config").catch((t=>{})),(await this.platform.getClient()).dispatch("get-frame-snapshot",{target:this.identity})}async getCurrentViews(){this.wire.sendAction("layout-get-views").catch((t=>{}));const t=await this.platform.getClient();return(await t.dispatch("get-layout-views",{target:this.identity})).map((t=>this.fin.View.wrapSync(t)))}async getRootItem(){this.wire.sendAction("layout-get-root-item").catch((()=>{}));const t=await fi(this,ui,"f").getValue(),e=await t.getRoot("layoutName"in this.identity?this.identity:void 0);return vi.LayoutNode.getEntity(e,t)}async getStackByViewIdentity(t){this.wire.sendAction("layout-get-stack-by-view").catch((()=>{}));const e=await fi(this,ui,"f").getValue(),n=await e.getStackByView(t);if(!n)throw new Error(`No stack found for view: ${t.uuid}/${t.name}`);return vi.LayoutNode.getEntity(n,e)}async addView(t,{location:e,targetView:n}={}){this.wire.sendAction("layout-add-view").catch((t=>{}));const{identity:i}=await fi(this,li,"m",pi).call(this,"layout-add-view",{viewOptions:t,location:e,targetView:n});return{identity:i}}async closeView(t){this.wire.sendAction("layout-close-view").catch((t=>{})),await fi(this,li,"m",pi).call(this,"layout-close-view",{viewIdentity:t})}}Fn.Layout=bi,ui=new WeakMap,li=new WeakSet,pi=async function(t,e){return(await this.platform.getClient()).dispatch(t,{target:this.identity,opts:e})};var _i,Ii,Ei,xi,Si,Ai=d&&d.__classPrivateFieldGet||function(t,e,n,i){if("a"===n&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(t):i?i.value:e.get(t)},Pi=d&&d.__classPrivateFieldSet||function(t,e,n,i,o){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?o.call(t,n):o?o.value=n:e.set(t,n),n};Object.defineProperty(zn,"__esModule",{value:!0}),zn.LayoutModule=void 0;const Mi=u,Li=Fn,Oi=hi;class Ri extends Mi.Base{constructor(){super(...arguments),_i.add(this),Ii.set(this,!1),Ei.set(this,null),this.init=async(t={})=>{if(this.wire.sendAction("layout-init").catch((t=>{})),!this.wire.environment.layoutAllowedInContext(this.fin))throw new Error("Layout.init can only be called from a Window context.");if(Ai(this,Ii,"f"))throw new Error("Layout.init was already called, please use Layout.create to add additional layouts.");"openfin"===this.wire.environment.type&&await this.fin.Platform.getCurrentSync().getClient(),Pi(this,Ii,!0,"f"),Pi(this,Ei,await this.wire.environment.initLayoutManager(this.fin,this.wire,t),"f"),await this.wire.environment.applyLayoutSnapshot(this.fin,Ai(this,Ei,"f"),t);const e={name:this.fin.me.name,uuid:this.fin.me.uuid};if(!t.layoutManagerOverride){const t={layoutName:Oi.DEFAULT_LAYOUT_KEY,...e};return Ai(this,xi,"f").call(this,t)}return this.wrapSync(e)},xi.set(this,(t=>{const e="[Layout] You are using a deprecated property `layoutManager` - it will throw if you access it starting in v37.",n=new Proxy({},{get(t,n){throw console.warn(`[Layout-mgr-proxy] accessing ${n.toString()}`),new Error(e)}}),i=Object.assign(this.wrapSync(t),{layoutManager:n});return new Proxy(i,{get(t,n){if("layoutManager"===n)throw console.warn(`[Layout-proxy] accessing ${n.toString()}`),new Error(e);return t[n]}})})),this.getCurrentLayoutManagerSync=()=>Ai(this,_i,"m",Si).call(this,"fin.Platform.Layout.getCurrentLayoutManagerSync()"),this.create=async t=>this.wire.environment.createLayout(Ai(this,_i,"m",Si).call(this,"fin.Platform.Layout.create()"),t),this.destroy=async t=>this.wire.environment.destroyLayout(Ai(this,_i,"m",Si).call(this,"fin.Platform.Layout.destroy()"),t)}async wrap(t){return this.wire.sendAction("layout-wrap").catch((t=>{})),new Li.Layout(t,this.wire)}wrapSync(t){return this.wire.sendAction("layout-wrap-sync").catch((t=>{})),new Li.Layout(t,this.wire)}async getCurrent(){if(this.wire.sendAction("layout-get-current").catch((t=>{})),"openfin"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error("You are not in a Window context. Only Windows can have a Layout.");const{uuid:t,name:e}=this.fin.me;return this.wrap({uuid:t,name:e})}getCurrentSync(){if(this.wire.sendAction("layout-get-current-sync").catch((t=>{})),"openfin"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error("You are not in a Window context. Only Windows can have a Layout.");const{uuid:t,name:e}=this.fin.me;return this.wrapSync({uuid:t,name:e})}async getLayoutByViewIdentity(t){this.wire.sendAction("layout-get-by-view-identity").catch((()=>{}));let e=await this.wire.environment.getViewWindowIdentity(this.fin,t);e.identity&&(e=e.identity);try{const n=this.wrapSync(e),i=await Li.Layout.getClient(n),o=await i.getLayoutIdentityForViewOrThrow(t);return this.wrapSync(o)}catch(n){if(!["No action registered at target for","getLayoutIdentityForViewOrThrow is not a function"].some((t=>n.message.includes(t))))throw n;if(e.uuid===e.name)throw new Error(`View identity ${JSON.stringify(t)} is not attached to any layout in provider window ${JSON.stringify(e)}.`);return this.wrapSync(e)}}}zn.LayoutModule=Ri,Ii=new WeakMap,Ei=new WeakMap,xi=new WeakMap,_i=new WeakSet,Si=function(t){if(!Ai(this,Ei,"f"))throw new Error(`You must call init before using the API ${t}`);return Ai(this,Ei,"f")},function(t){var e=d&&d.__createBinding||(Object.create?function(t,e,n,i){void 0===i&&(i=n);var o=Object.getOwnPropertyDescriptor(e,n);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,o)}:function(t,e,n,i){void 0===i&&(i=n),t[i]=e[n]}),n=d&&d.__exportStar||function(t,n){for(var i in t)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||e(n,t,i)};Object.defineProperty(t,"__esModule",{value:!0}),n(zn,t),n(Fn,t)}(Bn),Object.defineProperty(Mn,"__esModule",{value:!0}),Mn.PlatformModule=void 0;const Ti=u,ki=Ln,ji=Bn;class Bi extends Ti.Base{constructor(t,e){super(t),this._channel=e,this.Layout=new ji.LayoutModule(this.wire)}async init(t){if(!fin.__internal_.isPlatform||fin.me.name!==fin.me.uuid)throw new Error("fin.Platform.init should only be called from a custom platform provider running in the main window of the application.");return this.wire.environment.initPlatform(this.fin,t)}async wrap(t){return this.wire.sendAction("platform-wrap").catch((t=>{})),new ki.Platform({uuid:t.uuid},this._channel)}wrapSync(t){return this.wire.sendAction("platform-wrap-sync").catch((t=>{})),new ki.Platform({uuid:t.uuid},this._channel)}async getCurrent(){return this.wire.sendAction("platform-get-current").catch((t=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction("platform-get-current-sync").catch((t=>{})),this.wrapSync({uuid:this.wire.me.uuid})}start(t){return this.wire.sendAction("platform-start").catch((t=>{})),new Promise((async(e,n)=>{try{const{uuid:n}=t,i=await this.fin.Application._create({...t,isPlatformController:!0});i.once("platform-api-ready",(()=>e(this.wrapSync({uuid:n})))),i._run({uuid:n})}catch(t){n(t)}}))}startFromManifest(t,e){return this.wire.sendAction("platform-start-from-manifest").catch((t=>{})),new Promise((async(n,i)=>{try{const i=await this.fin.Application._createFromManifest(t);i.once("platform-api-ready",(()=>n(this.wrapSync({uuid:i.identity.uuid})))),i._run(e)}catch(t){i(t)}}))}}Mn.PlatformModule=Bi,function(t){var e=d&&d.__createBinding||(Object.create?function(t,e,n,i){void 0===i&&(i=n);var o=Object.getOwnPropertyDescriptor(e,n);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,o)}:function(t,e,n,i){void 0===i&&(i=n),t[i]=e[n]}),n=d&&d.__exportStar||function(t,n){for(var i in t)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||e(n,t,i)};Object.defineProperty(t,"__esModule",{value:!0}),n(Mn,t),n(Ln,t)}(Pn);var zi={};!function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.getMe=t.getBaseMe=t.environmentUnsupportedMessage=void 0;const e=X(),n=mn,i=st(),o=an;function r(t,e,n){return{isView:"view"===t,isWindow:"window"===t,isFrame:"iframe"===t,isExternal:"external connection"===t,uuid:e,name:n,entityType:t}}t.environmentUnsupportedMessage="You are not running in OpenFin.",t.getBaseMe=r,t.getMe=function(s){const{uuid:a,name:c,entityType:d}=s.me,h={setContext(){throw new Error(t.environmentUnsupportedMessage)},addContextHandler(){throw new Error(t.environmentUnsupportedMessage)},getContextGroups(){throw new Error(t.environmentUnsupportedMessage)},joinContextGroup(){throw new Error(t.environmentUnsupportedMessage)},removeFromContextGroup(){throw new Error(t.environmentUnsupportedMessage)},getAllClientsInContextGroup(){throw new Error(t.environmentUnsupportedMessage)},getInfoForContextGroup(){throw new Error(t.environmentUnsupportedMessage)}},l="Interop API has not been instantiated. Either connection has failed or you have not declared interop in your config.",u={setContext(){throw new Error(l)},addContextHandler(){throw new Error(l)},getContextGroups(){throw new Error(l)},joinContextGroup(){throw new Error(l)},removeFromContextGroup(){throw new Error(l)},getAllClientsInContextGroup(){throw new Error(l)},getInfoForContextGroup(){throw new Error(l)}},p={eventNames:()=>{throw new Error(t.environmentUnsupportedMessage)},emit:()=>{throw new Error(t.environmentUnsupportedMessage)},listeners:()=>{throw new Error(t.environmentUnsupportedMessage)},listenerCount:()=>{throw new Error(t.environmentUnsupportedMessage)},on:()=>{throw new Error(t.environmentUnsupportedMessage)},addListener:()=>{throw new Error(t.environmentUnsupportedMessage)},once:()=>{throw new Error(t.environmentUnsupportedMessage)},prependListener:()=>{throw new Error(t.environmentUnsupportedMessage)},prependOnceListener:()=>{throw new Error(t.environmentUnsupportedMessage)},removeListener:()=>{throw new Error(t.environmentUnsupportedMessage)},removeAllListeners:()=>{throw new Error(t.environmentUnsupportedMessage)}};switch(d){case"view":return Object.assign(new e.View(s,{uuid:a,name:c}),r(d,a,c),{interop:u,isOpenFin:!0});case"window":return Object.assign(new i._Window(s,{uuid:a,name:c}),r(d,a,c),{interop:u,isOpenFin:!0});case"iframe":return Object.assign(new n._Frame(s,{uuid:a,name:c}),r(d,a,c),{interop:u,isOpenFin:!0});case"external connection":return Object.assign(new o.ExternalApplication(s,{uuid:a}),r(d,a,c),{interop:u,isOpenFin:!1});default:return{...r(d,a,c),...p,interop:h,isOpenFin:!1}}}}(zi);var Fi={},Di={},Ui={};Object.defineProperty(Ui,"__esModule",{value:!0}),Ui.createWarningObject=Ui.createUnusableObject=void 0,Ui.createUnusableObject=function(t){const e=()=>{throw new Error(t)};return new Proxy({},{apply:e,construct:e,defineProperty:e,deleteProperty:e,get:e,getOwnPropertyDescriptor:e,getPrototypeOf:e,has:e,isExtensible:e,ownKeys:e,preventExtensions:e,set:e,setPrototypeOf:e})},Ui.createWarningObject=function(t,e){return new Proxy(e,{get:(...e)=>(console.warn(t),Reflect.get(...e)),set:(...e)=>(console.warn(t),Reflect.set(...e)),getOwnPropertyDescriptor:(...e)=>(console.warn(t),Reflect.getOwnPropertyDescriptor(...e)),ownKeys:(...e)=>(console.warn(t),Reflect.ownKeys(...e))})};var Wi,$i={},Vi={},Hi={};!function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.wrapIntentHandler=t.BROKER_ERRORS=t.generateOverrideWarning=t.generateOverrideError=t.wrapContextHandler=t.wrapInTryCatch=t.generateId=void 0,t.generateId=()=>`${Math.random()}${Date.now()}`,t.wrapInTryCatch=(t,e)=>(...n)=>{try{return t(...n)}catch(t){throw new Error((e||"")+t)}},t.wrapContextHandler=(t,e)=>async n=>{try{await t(n)}catch(t){throw console.error(`Error thrown by handler ${e} for context type ${n.type}: ${t}`),t}},t.generateOverrideError=(t,e)=>`You have tried to to use ${t} but ${e} has not been overridden in the Interop Broker. Please override this function. Refer to our documentation for more info.`,t.generateOverrideWarning=(t,e,n,i)=>{const{uuid:o,name:r}=n;return i?`Entity with identity: ${o}/${r} has called ${i} or ${t} but ${e} has not been overridden.`:`Entity with identity: ${o}/${r} has called ${t} but ${e} has not been overridden.`},t.BROKER_ERRORS={fireIntent:(0,t.generateOverrideError)("fireIntent","handleFiredIntent"),fireIntentForContext:(0,t.generateOverrideError)("fireIntentForContext","handleFiredIntentForContext"),getInfoForIntent:(0,t.generateOverrideError)("getInfoForIntent","handleInfoForIntent"),getInfoForIntentsByContext:(0,t.generateOverrideError)("getInfoForIntentsByContext","handleInfoForIntentsByContext"),joinSessionContextGroupWithJoinContextGroup:"The Context Group you have tried to join is a Session Context Group. Custom Context Groups can only be defined by the Interop Broker through code or manifest configuration. Please use joinSessionContextGroup.",fdc3Open:(0,t.generateOverrideError)("fdc3.open","fdc3HandleOpen"),fdc3FindInstances:(0,t.generateOverrideError)("fdc3.findInstances","fdc3HandleFindInstances"),fdc3GetAppMetadata:(0,t.generateOverrideError)("fdc3.getAppMetadata","fdc3HandleGetAppMetadata"),fdc3GetInfo:(0,t.generateOverrideError)("fdc3.getInfo","fdc3HandleGetInfo")},t.wrapIntentHandler=(t,e)=>async n=>{try{return t(n)}catch(t){throw console.error(`Error thrown by handler ${e}: ${t}`),t}}}(Hi);var Ni,Gi,qi={};function Yi(){if(Gi)return $i;Gi=1;var t,e,n,i=d&&d.__classPrivateFieldSet||function(t,e,n,i,o){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?o.call(t,n):o?o.value=n:e.set(t,n),n},o=d&&d.__classPrivateFieldGet||function(t,e,n,i){if("a"===n&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(t):i?i.value:e.get(t)},r=d&&d.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty($i,"__esModule",{value:!0}),$i.InteropBroker=void 0;const a=u,c=r(function(){if(Wi)return Vi;Wi=1,Object.defineProperty(Vi,"__esModule",{value:!0});const t=Eo();return Vi.default=class{constructor(t,e){this.provider=t,this.id=e,this.lastContext=void 0,this.contextGroupMap=new Map,this.clients=new Map,this.registerListeners()}registerListeners(){this.provider.register(`sessionContextGroup:getContext-${this.id}`,this.getCurrentContext.bind(this)),this.provider.register(`sessionContextGroup:setContext-${this.id}`,this.setContext.bind(this)),this.provider.register(`sessionContextGroup:handlerAdded-${this.id}`,this.handlerAdded.bind(this)),this.provider.register(`sessionContextGroup:handlerRemoved-${this.id}`,this.handlerRemoved.bind(this))}getCurrentContext(t){return t.type?this.contextGroupMap.get(t.type):this.lastContext}setContext(e,n){const{context:i}=e,o=t.InteropBroker.checkContextIntegrity(i);if(!1===o.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${o.reason}. Context: ${JSON.stringify(i)}`);if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name} not in Session Client State Map`);this.contextGroupMap.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((t=>{t.contextHandlers.get(i.type)?.forEach((e=>{this.provider.dispatch(t.clientIdentity,e,i)})),t.globalHandler&&this.provider.dispatch(t.clientIdentity,t.globalHandler,i)}))}getClientState(t){return this.clients.get(t.endpointId)}async handlerAdded(t,e){const{handlerId:n,contextType:i}=t,o=this.getClientState(e);if(!o)throw new Error(`Client with Identity: ${e.uuid} ${e.name} not in Client State Map`);if(i){const t=o.contextHandlers.get(i)||[];o.contextHandlers.set(i,[...t,n]);const r=this.contextGroupMap.get(i);r&&await this.provider.dispatch(e,n,r)}else{o.globalHandler=n;const t=[...this.contextGroupMap.keys()].map((async t=>{const i=this.contextGroupMap.get(t);i&&await this.provider.dispatch(e,n,i)}));await Promise.all(t)}}handlerRemoved(t,e){const{handlerId:n}=t,i=this.clients.get(e.endpointId);i?(Array.from(i.contextHandlers).forEach((([,t])=>{const e=t.indexOf(n);e>-1&&t.splice(e,1)})),i.globalHandler===n&&(i.globalHandler=void 0)):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${e}`)}registerNewClient(t){if(!this.clients.has(t.endpointId)){const e={contextHandlers:new Map,clientIdentity:t,globalHandler:void 0};this.clients.set(t.endpointId,e)}}onDisconnection(t){this.clients.delete(t.endpointId)}},Vi}()),h=Hi,l=r(s),p=function(){if(Ni)return qi;Ni=1,Object.defineProperty(qi,"__esModule",{value:!0}),qi.PrivateChannelProvider=void 0;const t=Yi();return qi.PrivateChannelProvider=class e{constructor(t,e){this.provider=t,this.id=e,this.clients=new Map,this.registerListeners(),this.contextByContextType=new Map,this.lastContext=void 0,this.provider.onConnection((t=>this.registerNewClient(t))),this.provider.onDisconnection((async t=>{const{endpointId:e}=t;this.clients.has(e)&&await this.handleClientDisconnecting(t),0===(await this.provider.getAllClientInfo()).length&&this.provider.destroy()}))}getClientState(t){return this.clients.get(t.endpointId)}registerListeners(){this.provider.register("broadcast",this.broadcast.bind(this)),this.provider.register("getCurrentContext",this.getCurrentContext.bind(this)),this.provider.register("contextHandlerAdded",this.contextHandlerAdded.bind(this)),this.provider.register("contextHandlerRemoved",this.contextHandlerRemoved.bind(this)),this.provider.register("nonStandardHandlerRemoved",this.nonStandardHandlerRemoved.bind(this)),this.provider.register("onAddContextHandlerAdded",this.onAddContextHandlerAdded.bind(this)),this.provider.register("onDisconnectHandlerAdded",this.onDisconnectHandlerAdded.bind(this)),this.provider.register("onUnsubscribeHandlerAdded",this.onUnsubscribeHandlerAdded.bind(this)),this.provider.register("clientDisconnecting",((t,e)=>{this.handleClientDisconnecting(e)}))}broadcast(e,n){const{context:i}=e;if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name}, tried to call broadcast, is not connected to this Private Channel`);const o=t.InteropBroker.checkContextIntegrity(i);if(!1===o.isValid)throw new Error(`Failed to broadcast - bad Context. Reason: ${o.reason}. Context: ${JSON.stringify(i)}`);this.contextByContextType.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((t=>{const e=t.handlerIdsByContextTypes.get(i.type);e&&e.forEach((e=>{this.provider.dispatch(t.clientIdentity,e,i)})),t.globalHandler&&this.provider.dispatch(t.clientIdentity,t.globalHandler,i)}))}getCurrentContext(t,e){const{contextType:n}=t;if(!this.getClientState(e))throw new Error(`Client with Identity: ${e.uuid} ${e.name}, tried to call getCurrentContext, is not connected to this Private Channel`);return void 0!==n?this.contextByContextType.get(n)||null:this.lastContext?this.lastContext:null}contextHandlerAdded(t,e){const{handlerId:n,contextType:i}=t,o=this.getClientState(e);if(!o)throw new Error(`Client with Identity: ${e.uuid} ${e.name}, tried to call addContextListener, is not connected to this Private Channel`);if(i){const t=o.handlerIdsByContextTypes.get(i)||[];o.handlerIdsByContextTypes.set(i,[...t,n])}else o.globalHandler=n;Array.from(this.clients.values()).forEach((t=>{t.clientIdentity.endpointId!==e.endpointId&&t.onAddContextListenerHandlerId&&this.provider.dispatch(t.clientIdentity,t.onAddContextListenerHandlerId,i)}))}async contextHandlerRemoved(t,e){const{handlerId:n}=t,i=this.getClientState(e);if(i){let o;if(i.globalHandler===n)i.globalHandler=void 0;else for(const[t,e]of i.handlerIdsByContextTypes){const i=e.indexOf(n);i>-1&&(e.splice(i,1),o=t)}const r=(await this.getConnectedClients()).map((async t=>{const{clientIdentity:n,clientIdentity:{endpointId:i},onUnsubscribeHandlerId:r}=t;i!==e.endpointId&&r&&await this.provider.dispatch(n,r,o)}));try{await Promise.all(r)}catch(t){throw console.error(`Problem when attempting to dispatch to onUnsubscribeHandlers. Error: ${t} Removing Client: ${n}. uuid: ${e.uuid}. name: ${e.name}. endpointId: ${e.endpointId}`),new Error(t)}}else console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. uuid: ${e.uuid}. name: ${e.name}. endpointId: ${e.endpointId}.`)}nonStandardHandlerRemoved(t,e){const{handlerId:n}=t,i=this.getClientState(e);i?i.onDisconnectHandlerId===n?i.onDisconnectHandlerId=void 0:i.onAddContextListenerHandlerId===n?i.onAddContextListenerHandlerId=void 0:i.onUnsubscribeHandlerId===n&&(i.onUnsubscribeHandlerId=void 0):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${e}`)}onAddContextHandlerAdded(t,e){const n=this.getClientState(e),{handlerId:i}=t;if(!n)throw new Error(`Client with Identity: ${e.uuid} ${e.name}, tried to call onAddContextListener, is not connected to this Private Channel`);n.onAddContextListenerHandlerId=i,Array.from(this.clients.values()).forEach((t=>{t.clientIdentity.endpointId!==e.endpointId&&Array.from(t.handlerIdsByContextTypes.keys()).forEach((t=>{this.provider.dispatch(e,i,t)}))}))}onDisconnectHandlerAdded(t,e){const n=this.getClientState(e),{handlerId:i}=t;if(!n)throw new Error(`Client with Identity: ${e.uuid} ${e.name}, tried to call onDisconnect, is not connected to this Private Channel`);n.onDisconnectHandlerId=i}onUnsubscribeHandlerAdded(t,e){const n=this.getClientState(e),{handlerId:i}=t;if(!n)throw new Error(`Client with Identity: ${e.uuid} ${e.name}, tried to call onUnsubscribe, is not connected to this Private Channel`);n.onUnsubscribeHandlerId=i}removeClient(t){const e=this.getClientState(t);if(!e)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call disconnect, is not connected to this Private Channel`);e.handlerIdsByContextTypes.clear(),this.clients.delete(t.endpointId)}async fireOnDisconnectForOtherClients(t){const{endpointId:e}=t,n=(await this.getConnectedClients()).map((async t=>{const{clientIdentity:{endpointId:n},onDisconnectHandlerId:i}=t;n!==e&&i&&await this.provider.dispatch(t.clientIdentity,i)}));try{await Promise.all(n)}catch(e){throw console.error(`Problem when attempting to dispatch to onDisconnectHandlers. Error: ${e} Disconnecting Client: uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}`),new Error(e)}}async unsubscribeAll(t){const{endpointId:e}=t,n=this.clients.get(e);if(n){const e=Array.from(n.handlerIdsByContextTypes.values()).flat(),i=n.globalHandler;if(e.length>0){const n=e.map((async e=>this.contextHandlerRemoved({handlerId:e},t)));try{await Promise.all(n)}catch(t){console.error(t.message)}}if(i)try{await this.contextHandlerRemoved({handlerId:i},t)}catch(t){console.error(t.message)}}}async handleClientDisconnecting(t){await this.unsubscribeAll(t),this.removeClient(t),await this.fireOnDisconnectForOtherClients(t)}registerNewClient(t){if(!this.clients.has(t.endpointId)){const e={clientIdentity:t,handlerIdsByContextTypes:new Map,globalHandler:void 0,onAddContextListenerHandlerId:void 0,onUnsubscribeHandlerId:void 0,onDisconnectHandlerId:void 0};this.clients.set(t.endpointId,e)}}async getConnectedClients(){const t=await this.provider.getAllClientInfo();return Array.from(this.clients.values()).filter((e=>{const{uuid:n,name:i}=e.clientIdentity;return t.some((t=>i===t.name&&n===t.uuid))}))}static init(t,n){return new e(t,n)}},qi}(),f=$,m=[{id:"green",displayMetadata:{color:"#00CC88",name:"green"}},{id:"purple",displayMetadata:{color:"#8C61FF",name:"purple"}},{id:"orange",displayMetadata:{color:"#FF8C4C",name:"orange"}},{id:"red",displayMetadata:{color:"#FF5E60",name:"red"}},{id:"pink",displayMetadata:{color:"#FF8FB8",name:"pink"}},{id:"yellow",displayMetadata:{color:"#E9FF8F",name:"yellow"}}];let w=class r extends a.Base{constructor(r,s,a){super(r),t.set(this,void 0),e.set(this,void 0),n.set(this,void 0),this.getProvider=()=>o(this,n,"f").getValue(),this.interopClients=new Map,this.contextGroupsById=new Map,i(this,e,a.contextGroups??[...m],"f"),i(this,t,a.fdc3Info,"f"),a?.logging&&(this.logging=a.logging),this.intentClientMap=new Map,this.lastContextMap=new Map,this.sessionContextGroupMap=new Map,i(this,n,new f.Lazy(s),"f"),this.setContextGroupMap(),this.setupChannelProvider()}static createClosedConstructor(...t){return class extends r{constructor(...e){if(e.length){const[n,i,o]=e;if(o&&"object"==typeof o&&!(0,l.default)(o,t[2]))return console.warn("You have modified the parameters of the InteropOverride constructor. This behavior is deprecated and will be removed in a future version. You can modify these options in your manifest. Please consult our Interop docs for guidance on migrating to the new override scheme."),void super(t[0],t[1],o);console.warn("You are attempting to pass arguments to the InteropOverride constructor. This is not necessary, and these passed arguments will be ignored. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.")}super(...t)}}}setContext({context:t},e){this.wire.sendAction("interop-broker-set-context").catch((t=>{}));const n=this.getClientState(e);if(!n||!n.contextGroupId)throw n?new Error("You must join a context group before you can set context."):new Error(`Client with Identity: ${e.uuid} ${e.name} not in Client State Map`);{const{contextGroupId:e}=n;this.setContextForGroup({context:t},e)}}setContextForGroup({context:t},e){this.wire.sendAction("interop-broker-set-context-for-group").catch((t=>{}));const n=this.contextGroupsById.get(e);if(!n)throw new Error(`Unable to set context for context group that isn't in the context group mapping: ${e}.`);const i=r.checkContextIntegrity(t);if(!1===i.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${i.reason}. Context: ${JSON.stringify(t)}`);const o=t.type;n.set(o,t),this.lastContextMap.set(e,o),Array.from(this.interopClients.values()).filter((t=>t.contextGroupId===e)).forEach((e=>{for(const[,n]of e.contextHandlers)r.isContextTypeCompatible(o,n.contextType)&&this.invokeContextHandler(e.clientIdentity,n.handlerId,t)}))}getCurrentContext(t,e){this.wire.sendAction("interop-broker-get-current-context").catch((t=>{}));const n=this.getClientState(e);if(!n?.contextGroupId)throw new Error("You must be a member of a context group to call getCurrentContext");const{contextGroupId:i}=n,o=this.contextGroupsById.get(i),r=this.lastContextMap.get(i),s=t?.contextType??r;return o&&s?o.get(s):void 0}async joinContextGroup({contextGroupId:t,target:e},n){if(this.wire.sendAction("interop-broker-join-context-group").catch((t=>{})),this.sessionContextGroupMap.has(t))throw new Error(h.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup);if(e){r.hasEndpointId(e)&&await this.addClientToContextGroup({contextGroupId:t},e);try{const n=this.channel.connections.filter((t=>t.uuid===e.uuid&&t.name===e.name));if(!n.length)throw new Error(`Given Identity ${e.uuid} ${e.name} is not connected to the Interop Broker.`);n.length>1&&console.warn(`More than one connection found for identity ${e.uuid} ${e.name}`);const i=[];for(const e of n)i.push(this.addClientToContextGroup({contextGroupId:t},e));await Promise.all(i)}catch(t){throw new Error(t)}}else await this.addClientToContextGroup({contextGroupId:t},n)}async addClientToContextGroup({contextGroupId:t},e){this.wire.sendAction("interop-broker-add-client-to-context-group").catch((t=>{}));const n=this.getClientState(e);if(!n)throw new Error(`Client with Identity: ${e.uuid} ${e.name} not in Client State Map`);if(!this.getContextGroups().find((e=>e.id===t)))throw new Error(`Attempting to join a context group that does not exist: ${t}. You may only join existing context groups.`);if(n.contextGroupId!==t){n.contextGroupId=t,await this.setCurrentContextGroupInClientOptions(e,t);const i=this.contextGroupsById.get(t);for(const[,t]of n.contextHandlers){const{contextType:n,handlerId:o}=t;if(void 0===n)i.forEach(((t,n)=>{this.invokeContextHandler(e,o,t)}));else if(i.has(n)){const t=i.get(n);t&&this.invokeContextHandler(e,o,t)}}}}async removeFromContextGroup({target:t},e){if(this.wire.sendAction("interop-broker-remove-from-context-group").catch((t=>{})),t){r.hasEndpointId(t)&&await this.removeClientFromContextGroup(t);try{const e=this.channel.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name));if(!e.length)throw new Error(`No connection found for given Identity ${t.uuid} ${t.name}`);e.length>1&&console.warn(`More than one connection found for identity ${t.uuid} ${t.name}`);const n=[];for(const t of e)n.push(this.removeClientFromContextGroup(t));await Promise.all(n)}catch(t){throw new Error(t)}}else await this.removeClientFromContextGroup(e)}async removeClientFromContextGroup(t){this.wire.sendAction("interop-broker-remove-client-from-context-group").catch((t=>{}));const e=this.getClientState(t);e&&(e.contextGroupId=void 0),await this.setCurrentContextGroupInClientOptions(t,null)}getContextGroups(){return this.wire.sendAction("interop-broker-get-context-groups").catch((t=>{})),o(this,e,"f").map((t=>({...t})))}getInfoForContextGroup({contextGroupId:t}){return this.wire.sendAction("interop-broker-get-info-for-context-group").catch((t=>{})),this.getContextGroups().find((e=>e.id===t))}getAllClientsInContextGroup({contextGroupId:t}){return this.wire.sendAction("interop-broker-get-all-clients-in-context-group").catch((t=>{})),Array.from(this.interopClients.values()).filter((e=>e.contextGroupId===t)).map((t=>t.clientIdentity))}async handleFiredIntent(t,e){const n=(0,h.generateOverrideWarning)("fdc3.raiseIntent","InteropBroker.handleFiredIntent",e,"interopClient.fireIntent");throw console.warn(n),new Error(h.BROKER_ERRORS.fireIntent)}async setIntentTarget(t,e){this.wire.sendAction("interop-broker-set-intent-target").catch((t=>{}));const n=this.intentClientMap.get(e.name),i=`intent-handler-${t.name}`;if(n){const e=n.get(i);if(e){if(e.pendingIntents.push(t),e.clientIdentity&&e.isReady){const{clientIdentity:t,pendingIntents:o}=e;try{const n=o[o.length-1];await this.invokeIntentHandler(t,i,n),e.pendingIntents=[]}catch(n){console.error(`Error invoking intent handler for client ${t.uuid}/${t.name}/${t.endpointId}`),e.isReady=!1}}}else n.set(i,{isReady:!1,pendingIntents:[t]})}else{this.intentClientMap.set(e.name,new Map);const n=this.intentClientMap.get(e.name);n&&n.set(i,{isReady:!1,pendingIntents:[t]})}}async handleInfoForIntent(t,e){const n=(0,h.generateOverrideWarning)("fdc3.findIntent","InteropBroker.handleInfoForIntent",e,"interopClient.getInfoForIntent");throw console.warn(n),new Error(h.BROKER_ERRORS.getInfoForIntent)}async handleInfoForIntentsByContext(t,e){const n=(0,h.generateOverrideWarning)("fdc3.findIntentsByContext","InteropBroker.handleInfoForIntentsByContext",e,"interopClient.getInfoForIntentsByContext");throw console.warn(n),new Error(h.BROKER_ERRORS.getInfoForIntentsByContext)}async handleFiredIntentForContext(t,e){const n=(0,h.generateOverrideWarning)("fdc3.raiseIntentForContext","InteropBroker.handleFiredIntentForContext",e,"interopClient.fireIntentForContext");throw console.warn(n),new Error(h.BROKER_ERRORS.fireIntentForContext)}async clientDisconnected(t){}async fdc3HandleOpen({app:t,context:e},n){const i=(0,h.generateOverrideWarning)("fdc3.open","InteropBroker.fdc3HandleOpen",n);throw console.warn(i),new Error(h.BROKER_ERRORS.fdc3Open)}async fdc3HandleFindInstances(t,e){const n=(0,h.generateOverrideWarning)("fdc3.open","InteropBroker.fdc3HandleFindInstances",e);throw console.warn(n),new Error(h.BROKER_ERRORS.fdc3FindInstances)}async fdc3HandleGetAppMetadata(t,e){const n=(0,h.generateOverrideWarning)("fdc3.getAppMetadata","InteropBroker.fdc3HandleGetAppMetadata",e);throw console.warn(n),new Error(h.BROKER_ERRORS.fdc3GetAppMetadata)}async invokeContextHandler(t,e,n){const i=await this.getProvider();try{await i.dispatch(t,e,n)}catch(i){console.error(`Error invoking context handler ${e} for context type ${n.type} in client ${t.uuid}/${t.name}/${t.endpointId}`,i)}}async invokeIntentHandler(t,e,n){const i=await this.getProvider();await i.dispatch(t,e,n)}async fdc3HandleGetInfo(e,n){const{fdc3Version:i}=e;return{fdc3Version:i,...o(this,t,"f"),optionalFeatures:{OriginatingAppMetadata:!1,UserChannelMembershipAPIs:!0},appMetadata:{appId:"",instanceId:""}}}async getAllClientInfo(){return(await this.getProvider()).getAllClientInfo()}decorateSnapshot(t){return{...t,interopSnapshotDetails:{contextGroupStates:this.getContextGroupStates()}}}applySnapshot(t,e){const n=t?.interopSnapshotDetails?.contextGroupStates;n&&(e?.closeExistingWindows||this.updateExistingClients(n),this.rehydrateContextGroupStates(n))}updateExistingClients(t){this.interopClients.forEach((e=>{const{clientIdentity:n,contextGroupId:i,contextHandlers:o}=e;if(i){const e=t[i];for(const[,t]of Object.entries(e))o.forEach((e=>{const{handlerId:i,contextType:o}=e;r.isContextTypeCompatible(t.type,o)&&this.invokeContextHandler(n,i,t)}))}}))}getContextGroupStates(){return r.toObject(this.contextGroupsById)}rehydrateContextGroupStates(t){const e=Object.entries(t);for(const[t,n]of e){const e=Object.entries(n);for(const[n,i]of e)this.contextGroupsById.has(t)?this.contextGroupsById.get(t).set(n,i):console.warn(`Attempting to set a context group that isn't in the context group mapping. Skipping context group rehydration for: ${t}`)}}contextHandlerRegistered({contextType:t,handlerId:e},n){const i={contextType:t,handlerId:e},o=this.getClientState(n);if(o?.contextHandlers.set(e,i),o&&o.contextGroupId){const{contextGroupId:i}=o,r=this.contextGroupsById.get(i);if(void 0===t)r.forEach(((t,i)=>{this.invokeContextHandler(n,e,t)}));else if(r.has(t)){const i=r.get(t);i&&this.invokeContextHandler(n,e,i)}}}async intentHandlerRegistered(t,e){const{handlerId:n}=t,i=this.intentClientMap.get(e.name),o=i?.get(n);if(i)if(o){const{pendingIntents:i}=o;o.clientIdentity=e,o.isReady=!0;try{if(i.length>0){const t=i[i.length-1];await this.invokeIntentHandler(e,n,t),o.pendingIntents=[]}}catch(t){console.error(`Error invoking intent handler: ${n} for client ${e.uuid}/${e.name}/${e.endpointId}`)}}else i.set(n,{isReady:!0,pendingIntents:[],clientIdentity:e});else{this.intentClientMap.set(e.name,new Map);const t=this.intentClientMap.get(e.name);t&&t.set(n,{isReady:!0,pendingIntents:[],clientIdentity:e})}}removeContextHandler({handlerId:t},e){const n=this.getClientState(e);n&&n.contextHandlers.delete(t)}handleJoinSessionContextGroup({sessionContextGroupId:t},e){try{if(!t)throw new Error("Failed to join session context group: must specify group id.");const n=this.sessionContextGroupMap.get(t);if(n)n.registerNewClient(e);else{const n=new c.default(this.channel,t);n.registerNewClient(e),this.sessionContextGroupMap.set(t,n)}return{hasConflict:this.contextGroupsById.has(t)}}catch(t){throw new Error(t)}}getClientState(t){return this.interopClients.get(t.endpointId)}static toObject(t){const e=Object.fromEntries(t),n={};return Object.entries(e).forEach((([t,e])=>{const i=Object.fromEntries(e);n[t]=i})),n}static checkContextIntegrity(t){if(!t)return{isValid:!1,reason:"No context supplied"};if("object"!=typeof t)return{isValid:!1,reason:"Context must be an Object"};if(!t.type)return{isValid:!1,reason:"Context must have a type property"};if(t.id&&"object"!=typeof t.id)return{isValid:!1,reason:"Context id must be an Object populated with key-value identifiers (if set)"};if(t.id){const{id:e}=t,n=Object.keys(e);let i=!1;if(!n.length)return{isValid:!1,reason:"Context id must have at least one key-value identifier"};if(n.forEach((t=>{"string"==typeof t&&"string"==typeof e[t]||(i=!0)})),i)return{isValid:!1,reason:"Context id key-value identifiers must be of type string"}}return t.name&&"string"!=typeof t.name?{isValid:!1,reason:"Context name must be of string type (if set)"}:{isValid:!0}}static hasEndpointId(t){return void 0!==t.endpointId}static isContextTypeCompatible(t,e){return void 0===e||t===e}setContextGroupMap(){for(const t of this.getContextGroups())this.contextGroupsById.set(t.id,new Map)}async setCurrentContextGroupInClientOptions(t,e){try{const n=await this.fin.System.getEntityInfo(t.uuid,t.name);let i;"view"===n.entityType?i=await this.fin.View.wrap(t):"window"===n.entityType&&(i=await this.fin.Window.wrap(t)),i&&await i.updateOptions({interop:{currentContextGroup:e}})}catch(t){}}async setupChannelProvider(){try{const t=await this.getProvider();this.channel=t,this.wireChannel(t)}catch(t){throw new Error(`Error setting up Interop Broker Channel Provider: ${t}`)}}wireChannel(t){t.onConnection((async(t,e)=>{if(!await this.isConnectionAuthorized(t,e))throw new Error(`Connection not authorized for ${t.uuid}, ${t.name}`);if(!t.endpointId)throw new Error("Version too old to be compatible with Interop. Please upgrade your runtime to a more recent version.");const n={contextGroupId:void 0,contextHandlers:new Map,clientIdentity:t};e?.currentContextGroup&&this.contextGroupsById.has(e.currentContextGroup)&&(n.contextGroupId=e?.currentContextGroup),this.interopClients.set(t.endpointId,n)})),t.onDisconnection((t=>{this.interopClients.delete(t.endpointId);const e=this.intentClientMap.get(t.name);e&&t.uuid===this.fin.me.uuid&&e.forEach((t=>{t.isReady=!1})),this.sessionContextGroupMap.forEach((e=>{e.onDisconnection(t)})),this.clientDisconnected(t)})),t.beforeAction((async(t,e,n)=>{if(!await this.isActionAuthorized(t,e,n))throw new Error(`Action (${t}) not authorized for ${n.uuid}, ${n.name}`);this.logging?.beforeAction?.enabled&&console.log(t,e,n)})),t.afterAction(((t,e,n)=>{this.logging?.afterAction?.enabled&&console.log(t,e,n)})),t.register("setContext",this.setContext.bind(this)),t.register("fireIntent",this.handleFiredIntent.bind(this)),t.register("getCurrentContext",this.getCurrentContext.bind(this)),t.register("getInfoForIntent",this.handleInfoForIntent.bind(this)),t.register("getInfoForIntentsByContext",this.handleInfoForIntentsByContext.bind(this)),t.register("fireIntentForContext",this.handleFiredIntentForContext.bind(this)),t.register("getContextGroups",this.getContextGroups.bind(this)),t.register("joinContextGroup",this.joinContextGroup.bind(this)),t.register("removeFromContextGroup",this.removeFromContextGroup.bind(this)),t.register("getAllClientsInContextGroup",this.getAllClientsInContextGroup.bind(this)),t.register("getInfoForContextGroup",this.getInfoForContextGroup.bind(this)),t.register("contextHandlerRegistered",this.contextHandlerRegistered.bind(this)),t.register("intentHandlerRegistered",this.intentHandlerRegistered.bind(this)),t.register("removeContextHandler",this.removeContextHandler.bind(this)),t.register("sessionContextGroup:createIfNeeded",this.handleJoinSessionContextGroup.bind(this)),t.register("fdc3Open",this.fdc3HandleOpen.bind(this)),t.register("fdc3v2FindIntentsByContext",this.handleInfoForIntentsByContext.bind(this)),t.register("fdc3FindInstances",this.fdc3HandleFindInstances.bind(this)),t.register("fdc3GetAppMetadata",this.fdc3HandleGetAppMetadata.bind(this)),t.register("fdc3v2GetInfo",(async(t,e)=>this.fdc3HandleGetInfo.bind(this)(t,e))),t.register("createPrivateChannelProvider",(async t=>{const{channelId:e}=t,n=await this.fin.InterApplicationBus.Channel.create(e);p.PrivateChannelProvider.init(n,e)}))}isConnectionAuthorized(t,e){return this.wire.sendAction("interop-broker-is-connection-authorized").catch((t=>{})),Promise.resolve(!0)}isActionAuthorized(t,e,n){return this.wire.sendAction("interop-broker-is-action-authorized").catch((t=>{})),Promise.resolve(!0)}};return $i.InteropBroker=w,t=new WeakMap,e=new WeakMap,n=new WeakMap,$i}var Ki,Zi={},Ji={},Xi=d&&d.__classPrivateFieldSet||function(t,e,n,i,o){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?o.call(t,n):o?o.value=n:e.set(t,n),n},Qi=d&&d.__classPrivateFieldGet||function(t,e,n,i){if("a"===n&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(t):i?i.value:e.get(t)};Object.defineProperty(Ji,"__esModule",{value:!0});const to=u,eo=Hi;class no extends to.Base{constructor(t,e,n){super(t),Ki.set(this,void 0),this.id=n,Xi(this,Ki,e,"f")}async setContext(t){return this.wire.sendAction("interop-session-context-group-set-context").catch((t=>{})),(await Qi(this,Ki,"f")).dispatch(`sessionContextGroup:setContext-${this.id}`,{sessionContextGroupId:this.id,context:t})}async getCurrentContext(t){return this.wire.sendAction("interop-session-context-group-get-context").catch((t=>{})),(await Qi(this,Ki,"f")).dispatch(`sessionContextGroup:getContext-${this.id}`,{sessionContextGroupId:this.id,type:t})}async addContextHandler(t,e){if(this.wire.sendAction("interop-session-context-group-add-handler").catch((t=>{})),"function"!=typeof t)throw new Error("Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");const n=await Qi(this,Ki,"f");let i;return i=e?`sessionContextHandler:invoke-${this.id}-${e}-${(0,eo.generateId)()}`:`sessionContextHandler:invoke-${this.id}`,n.register(i,(0,eo.wrapContextHandler)(t,i)),await n.dispatch(`sessionContextGroup:handlerAdded-${this.id}`,{handlerId:i,contextType:e}),{unsubscribe:await this.createUnsubscribeCb(i)}}async createUnsubscribeCb(t){const e=await Qi(this,Ki,"f");return async()=>{e.remove(t),await e.dispatch(`sessionContextGroup:handlerRemoved-${this.id}`,{handlerId:t})}}getUserInstance(){return{id:this.id,setContext:(0,eo.wrapInTryCatch)(this.setContext.bind(this),"Failed to set context: "),getCurrentContext:(0,eo.wrapInTryCatch)(this.getCurrentContext.bind(this),"Failed to get context: "),addContextHandler:(0,eo.wrapInTryCatch)(this.addContextHandler.bind(this),"Failed to add context handler: ")}}}Ji.default=no,Ki=new WeakMap;var io={},oo={},ro={},so={},ao=d&&d.__createBinding||(Object.create?function(t,e,n,i){void 0===i&&(i=n);var o=Object.getOwnPropertyDescriptor(e,n);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,o)}:function(t,e,n,i){void 0===i&&(i=n),t[i]=e[n]}),co=d&&d.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),ho=d&&d.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&ao(e,t,n);return co(e,t),e};Object.defineProperty(so,"__esModule",{value:!0}),so.PrivateChannelClient=void 0;const lo=ho(Hi);var uo,po;function fo(){if(uo)return oo;uo=1;var t,e=d&&d.__classPrivateFieldGet||function(t,e,n,i){if("a"===n&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(t):i?i.value:e.get(t)},n=d&&d.__classPrivateFieldSet||function(t,e,n,i,o){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?o.call(t,n):o?o.value=n:e.set(t,n),n},i=d&&d.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(oo,"__esModule",{value:!0}),oo.FDC3ModuleBase=void 0;const o=ro,r=Hi,a=go(),c=i(s);return oo.FDC3ModuleBase=class{get client(){return e(this,t,"f").call(this)}get fin(){return this.wire.getFin()}constructor(e,i){this.wire=i,t.set(this,void 0),n(this,t,e,"f")}async broadcast(t){return this.wire.sendAction("fdc3-broadcast").catch((t=>{})),this.client.setContext(t)}async _open(t,e){this.wire.sendAction("fdc3-open").catch((t=>{}));try{return await a.InteropClient.ferryFdc3Call(this.client,"fdc3Open",{app:t,context:e})}catch(t){const e=t.message===r.BROKER_ERRORS.fdc3Open?"ResolverUnavailable":t.message;throw new Error(e)}}async _getChannels(){return(await this.client.getContextGroups()).map((t=>({...t,type:"system",...(0,o.getUnsupportedChannelApis)()})))}async getOrCreateChannel(t){this.wire.sendAction("fdc3-get-or-create-channel").catch((t=>{}));const e=(await this._getChannels()).find((e=>e.id===t));if(e)return{...e,type:"system",...(0,o.getUnsupportedChannelApis)()};try{const e=await this.client.joinSessionContextGroup(t);return(0,o.buildAppChannelObject)(e)}catch(t){throw console.error(t.message),new Error(o.ChannelError.CreationFailed)}}async getSystemChannels(){return this.wire.sendAction("fdc3-get-system-channels").catch((t=>{})),this._getChannels()}async joinChannel(t){this.wire.sendAction("fdc3-join-channel").catch((t=>{}));try{return await this.client.joinContextGroup(t)}catch(t){if(t.message===r.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup?console.error("The Channel you have tried to join is an App Channel. Custom Channels can only be defined by the Interop Broker through code or manifest configuration. Please use getOrCreateChannel."):console.error(t.message),t.message.startsWith("Attempting to join a context group that does not exist"))throw new Error(o.ChannelError.NoChannelFound);throw new Error(o.ChannelError.AccessDenied)}}async getCurrentChannel(){this.wire.sendAction("fdc3-get-current-channel").catch((t=>{}));const t=await this.getCurrentContextGroupInfo();return t?this.buildChannelObject(t):null}async leaveCurrentChannel(){return this.wire.sendAction("fdc3-leave-current-channel").catch((t=>{})),this.client.removeFromContextGroup()}async getCurrentContextGroupInfo(){const t=await this.client.getContextGroups(),e=t.map((async t=>this.client.getAllClientsInContextGroup(t.id))),n=(await Promise.all(e)).findIndex((t=>t.some((t=>{const{uuid:e,name:n}=t;return this.wire.me.uuid===e&&this.wire.me.name===n}))));return t[n]}async buildChannelObject(t){return{...t,type:"system",addContextListener:(...[t,e])=>{let n,i;"function"==typeof t?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),n=t):(n=e,"string"==typeof t&&(i=t));const o=(async()=>{let t=!0;const e=await this.client.getCurrentContext(i);return this.client.addContextHandler(((i,o)=>{if(!t||(t=!1,!(0,c.default)(e,i)))return n(i,o)}),i)})();return{...o,unsubscribe:()=>o.then((t=>t.unsubscribe()))}},broadcast:this.broadcast.bind(this),getCurrentContext:async t=>{const e=await this.client.getCurrentContext(t);return void 0===e?null:e}}}},t=new WeakMap,oo}so.PrivateChannelClient=class{constructor(t,e){this.id=e,this.client=t,this.listeners=new Map}async broadcast(t){return this.client.dispatch("broadcast",{context:t})}async getCurrentContext(t){return this.client.dispatch("getCurrentContext",{contextType:t})}async addContextListener(t,e){if("function"!=typeof e)throw new Error("Non-function argument passed to the second parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");let n;n=t?`contextHandler:invoke-${this.id}-${t}-${lo.generateId()}`:`contextHandler:invoke-${this.id}-${lo.generateId()}`,this.client.register(n,lo.wrapContextHandler(e,n));const i={unsubscribe:await this.createContextUnsubscribeCb(n)};return this.listeners.set(n,i),await this.client.dispatch("contextHandlerAdded",{handlerId:n,contextType:t}),i}createNonStandardUnsubscribeCb(t){return async()=>{this.client.remove(t),this.listeners.delete(t),await this.client.dispatch("nonStandardHandlerRemoved",{handlerId:t})}}createContextUnsubscribeCb(t){return async()=>{this.client.remove(t),this.listeners.delete(t),await this.client.dispatch("contextHandlerRemoved",{handlerId:t})}}onAddContextListener(t){const e=`onContextHandlerAdded:invoke-${this.id}-${lo.generateId()}`;this.client.register(e,t);const n={unsubscribe:this.createNonStandardUnsubscribeCb(e)};return this.listeners.set(e,n),this.client.dispatch("onAddContextHandlerAdded",{handlerId:e}),n}onDisconnect(t){const e=`onDisconnect:invoke-${this.id}-${lo.generateId()}`;this.client.register(e,t);const n={unsubscribe:this.createNonStandardUnsubscribeCb(e)};return this.listeners.set(e,n),this.client.dispatch("onDisconnectHandlerAdded",{handlerId:e}),n}onUnsubscribe(t){const e=`onUnsubscribe:invoke-${this.id}-${lo.generateId()}`;this.client.register(e,t);const n={unsubscribe:this.createNonStandardUnsubscribeCb(e)};return this.listeners.set(e,n),this.client.dispatch("onUnsubscribeHandlerAdded",{handlerId:e}),n}async cleanUpAllSubs(){Array.from(this.listeners.keys()).forEach((t=>{this.client.remove(t),this.listeners.delete(t)}))}async disconnect(){try{await this.client.dispatch("clientDisconnecting"),await this.cleanUpAllSubs(),await this.client.disconnect()}catch(t){throw new Error(t.message)}}},function(t){var e=d&&d.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(t,"__esModule",{value:!0}),t.getIntentResolution=t.isChannel=t.isContext=t.connectPrivateChannel=t.buildAppChannelObject=t.buildPrivateChannelObject=t.ChannelError=t.ResultError=t.UnsupportedChannelApiError=t.getUnsupportedChannelApis=void 0;const n=Hi,i=so,o=e(s);t.getUnsupportedChannelApis=t=>({addContextListener:()=>{throw new r("Channel.addContextListener",t)},broadcast:()=>{throw new r("Channel.broadcast",t)},getCurrentContext:()=>{throw new r("Channel.getCurrentContext",t)}});class r extends Error{constructor(t,e="System"){super(t),this.message=`Calling ${t} on an instance of a ${e} Channel returned by fdc3.get${e}Channels is not supported. If you would like to use a ${e} Channel, please use fdc3.joinChannel, fdc3.addContextListener, and fdc3.broadcast instead.`}}var a,c;t.UnsupportedChannelApiError=r,function(t){t.NoResultReturned="NoResultReturned",t.IntentHandlerRejected="IntentHandlerRejected"}(a=t.ResultError||(t.ResultError={})),(c=t.ChannelError||(t.ChannelError={})).NoChannelFound="NoChannelFound",c.AccessDenied="AccessDenied",c.CreationFailed="CreationFailed",t.buildPrivateChannelObject=t=>{let e=!1;const n=()=>{if(e)throw new Error("Private Channel Client has been disconnected from the Private Channel")};return{id:t.id,type:"private",broadcast:async e=>(n(),t.broadcast(e)),getCurrentContext:async e=>(n(),t.getCurrentContext(e)),addContextListener:async(e,i)=>{n();let o=i,r=e;return"function"==typeof e&&(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),o=e,r=null),t.addContextListener(r,o)},onAddContextListener:e=>(n(),t.onAddContextListener(e)),disconnect:async()=>(n(),e=!0,t.disconnect()),onDisconnect:e=>(n(),t.onDisconnect(e)),onUnsubscribe:e=>(n(),t.onUnsubscribe(e))}},t.buildAppChannelObject=t=>({id:t.id,type:"app",broadcast:t.setContext,getCurrentContext:async e=>{const n=await t.getCurrentContext(e);return void 0===n?null:n},addContextListener:(e,n)=>{let i,r;"function"==typeof e?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),i=e):(i=n,"string"==typeof e&&(r=e));const s=(async()=>{let e=!0;const n=await t.getCurrentContext(r);return t.addContextHandler(((t,r)=>{if(!e||(e=!1,!(0,o.default)(n,t)))return i(t,r)}),r)})();return{...s,unsubscribe:()=>s.then((t=>t.unsubscribe()))}}}),t.connectPrivateChannel=async e=>{try{const n=await fin.InterApplicationBus.Channel.connect(e),o=new i.PrivateChannelClient(n,e);return(0,t.buildPrivateChannelObject)(o)}catch(t){throw new Error(`Private Channel with id: ${e} doesn't exist`)}},t.isContext=t=>{if(t&&"object"==typeof t&&"type"in t){const{type:e}=t;return"string"==typeof e}return!1},t.isChannel=t=>{if(t&&"object"==typeof t&&"type"in t&&"id"in t){const{type:e,id:n}=t;return"string"==typeof e&&"string"==typeof n&&("app"===e||"private"===e)}return!1},t.getIntentResolution=async(e,i,o,r)=>{const s=(0,n.generateId)(),c=new Promise(((t,e)=>{fin.InterApplicationBus.subscribe({uuid:"*"},s,(e=>{t(e)})).catch((()=>e(new Error("getResult is not supported in this environment"))))})),d=o?{target:o,intentResolutionResultId:s}:{intentResolutionResultId:s},h=r?{name:r,context:i,metadata:d}:{...i,metadata:d},l=async()=>{let n=await c;if(!n||"object"!=typeof n)throw new Error(a.NoResultReturned);const{error:i}=n;if(i)throw new Error(a.IntentHandlerRejected);if((0,t.isChannel)(n)){const{id:i,type:o}=n;switch(o){case"private":n=await(0,t.connectPrivateChannel)(i);break;case"app":{const o=await e.joinSessionContextGroup(i);n=(0,t.buildAppChannelObject)(o);break}}}else if(!(0,t.isContext)(n))throw new Error(a.NoResultReturned);return n},u=r?await e.fireIntent(h):await e.fireIntentForContext(h);return"object"!=typeof u?{source:{appId:"",instanceId:""},intent:"",version:"2.0",getResult:l}:{...u,getResult:l}}}(ro);var mo,wo,yo={};function go(){if(wo)return Zi;wo=1;var t,e,n=d&&d.__classPrivateFieldSet||function(t,e,n,i,o){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?o.call(t,n):o?o.value=n:e.set(t,n),n},i=d&&d.__classPrivateFieldGet||function(t,e,n,i){if("a"===n&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(t):i?i.value:e.get(t)},o=d&&d.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Zi,"__esModule",{value:!0}),Zi.InteropClient=void 0;const r=u,s=o(Ji),a=function(){if(po)return io;po=1,Object.defineProperty(io,"__esModule",{value:!0}),io.Fdc3Module=void 0;const t=Hi,e=fo();class n extends e.FDC3ModuleBase{async open(t,e){await super._open(t,e)}addContextListener(t,e){let n;return this.wire.sendAction("fdc3-add-context-listener").catch((t=>{})),"function"==typeof t?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),n=this.client.addContextHandler(t)):n=this.client.addContextHandler(e,null===t?void 0:t),{...n,unsubscribe:()=>n.then((t=>t.unsubscribe()))}}addIntentListener(t,e){this.wire.sendAction("fdc3-add-intent-listener").catch((t=>{}));const n=this.client.registerIntentHandler((t=>{const{context:n,metadata:i}=t,{metadata:o}=n,r=i?.intentResolutionResultId||o?.intentResolutionResultId;r&&this.fin.InterApplicationBus.publish(r,null).catch((()=>null)),e(t.context)}),t,{fdc3Version:"1.2"});return{...n,unsubscribe:()=>n.then((t=>t.unsubscribe()))}}async raiseIntent(e,n,i){this.wire.sendAction("fdc3-raise-intent").catch((t=>{}));const o=i?{name:e,context:n,metadata:{target:i}}:{name:e,context:n};try{return await this.client.fireIntent(o)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?"ResolverUnavailable":e.message;throw new Error(n)}}async findIntent(e,n){this.wire.sendAction("fdc3-find-intent").catch((t=>{}));try{return await this.client.getInfoForIntent({name:e,context:n})}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntent?"ResolverUnavailable":e.message;throw new Error(n)}}async findIntentsByContext(e){this.wire.sendAction("fdc3-find-intents-by-context").catch((t=>{}));try{return await this.client.getInfoForIntentsByContext(e)}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntentsByContext?"ResolverUnavailable":e.message;throw new Error(n)}}async raiseIntentForContext(e,n){this.wire.sendAction("fdc3-raise-intent-for-context").catch((t=>{}));try{return await this.client.fireIntentForContext({...e,metadata:{target:n}})}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntentForContext?"ResolverUnavailable":e.message;throw new Error(n)}}async getOrCreateChannel(t){return super.getOrCreateChannel(t)}getInfo(){return this.wire.sendAction("fdc3-get-info").catch((t=>{})),{providerVersion:this.wire.environment.getAdapterVersionSync(),provider:`openfin-${this.wire.me.uuid}`,fdc3Version:"1.2"}}}return io.Fdc3Module=n,io}(),c=function(){if(mo)return yo;mo=1,Object.defineProperty(yo,"__esModule",{value:!0}),yo.Fdc3Module2=void 0;const t=fo(),e=Hi,n=go(),i=ro,o=so;class r extends t.FDC3ModuleBase{async open(t,e){return"string"==typeof t&&console.warn("Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string })."),super._open(t,e)}async findInstances(t){this.wire.sendAction("fdc3-find-instances").catch((t=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,"fdc3FindInstances",t)}catch(t){const n=t.message===e.BROKER_ERRORS.fdc3FindInstances?"ResolverUnavailable":t.message;throw new Error(n)}}async getAppMetadata(t){this.wire.sendAction("fdc3-get-app-metadata").catch((t=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,"fdc3GetAppMetadata",t)}catch(t){const n=t.message===e.BROKER_ERRORS.fdc3GetAppMetadata?"ResolverUnavailable":t.message;throw new Error(n)}}async addContextListener(t,e){this.wire.sendAction("fdc3-add-context-listener").catch((t=>{}));const n=t=>e=>{const{contextMetadata:n,...i}=e,o=n?[{...i},n]:[e,null];t(...o)};let i=e,o=n(i);return"function"==typeof t?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),i=t,o=n(i),this.client.addContextHandler(o)):this.client.addContextHandler(o,null===t?void 0:t)}async findIntent(t,n,i){this.wire.sendAction("fdc3-find-intent").catch((t=>{}));try{return await this.client.getInfoForIntent({name:t,context:n,metadata:{resultType:i}})}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntent?"ResolverUnavailable":t.message;throw new Error(n)}}async findIntentsByContext(t,i){this.wire.sendAction("fdc3-find-intents-by-context").catch((t=>{}));const o=i?{context:t,metadata:{resultType:i}}:t;try{return await n.InteropClient.ferryFdc3Call(this.client,"fdc3v2FindIntentsByContext",o)}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntentsByContext?"ResolverUnavailable":t.message;throw new Error(n)}}async raiseIntent(t,n,o){this.wire.sendAction("fdc3-raise-intent").catch((t=>{}));try{return"string"==typeof o&&console.warn("Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string })."),(0,i.getIntentResolution)(this.client,n,o,t)}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntent?"ResolverUnavailable":t.message;throw new Error(n)}}async raiseIntentForContext(t,n){this.wire.sendAction("fdc3-raise-intent-for-context").catch((t=>{}));try{return"string"==typeof n&&console.warn("Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string })."),(0,i.getIntentResolution)(this.client,t,n)}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntent?"ResolverUnavailable":t.message;throw new Error(n)}}async addIntentListener(t,e){if(this.wire.sendAction("fdc3-add-intent-listener").catch((t=>{})),"string"!=typeof t)throw new Error("First argument must be an Intent name");return this.client.registerIntentHandler((async t=>{let n,i;const{context:o,metadata:r}=t,{contextMetadata:s,metadata:a,...c}=o,d=r?.intentResolutionResultId||a?.intentResolutionResultId;try{const t=a?{metadata:a,...c}:{...c};n=await e(t,s),i=n}catch(t){n=t,i={error:!0}}if(d&&this.fin.InterApplicationBus.publish(d,i).catch((()=>null)),n instanceof Error)throw new Error(n.message);return n}),t,{fdc3Version:"2.0"})}async getOrCreateChannel(t){return super.getOrCreateChannel(t)}async createPrivateChannel(){const t=(0,e.generateId)();await n.InteropClient.ferryFdc3Call(this.client,"createPrivateChannelProvider",{channelId:t});const r=await this.fin.InterApplicationBus.Channel.connect(t),s=new o.PrivateChannelClient(r,t);return(0,i.buildPrivateChannelObject)(s)}async getUserChannels(){return(await this.client.getContextGroups()).map((t=>({...t,type:"user",...(0,i.getUnsupportedChannelApis)("User")})))}async getSystemChannels(){return console.warn("This API has been deprecated. Please use fdc3.getUserChannels instead."),super.getSystemChannels()}async joinUserChannel(t){return super.joinChannel(t)}async joinChannel(t){return console.warn("This API has been deprecated. Please use fdc3.joinUserChannel instead."),super.joinChannel(t)}async getCurrentChannel(){const t=await super.getCurrentChannel();return t?{...t,type:"user",broadcast:this.broadcast.bind(this)}:null}async getInfo(){return n.InteropClient.ferryFdc3Call(this.client,"fdc3v2GetInfo",{fdc3Version:"2.0"})}}return yo.Fdc3Module2=r,yo}(),h=Hi;let l=class extends r.Base{constructor(i,o){super(i),t.set(this,void 0),e.set(this,void 0),n(this,e,new Map,"f"),n(this,t,o,"f")}async setContext(e){return this.wire.sendAction("interop-client-set-context").catch((t=>{})),(await i(this,t,"f")).dispatch("setContext",{context:e})}async addContextHandler(e,n){if(this.wire.sendAction("interop-client-add-context-handler").catch((t=>{})),"function"!=typeof e)throw new Error("Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");const o=await i(this,t,"f");let r;r=n?`invokeContextHandler-${n}-${(0,h.generateId)()}`:"invokeContextHandler";const s=(0,h.wrapContextHandler)(e,r);return o.register(r,s),await o.dispatch("contextHandlerRegistered",{handlerId:r,contextType:n}),{unsubscribe:async()=>{o.remove(r),await o.dispatch("removeContextHandler",{handlerId:r})}}}async getContextGroups(){return this.wire.sendAction("interop-client-get-context-groups").catch((t=>{})),(await i(this,t,"f")).dispatch("getContextGroups")}async joinContextGroup(e,n){this.wire.sendAction("interop-client-join-context-group").catch((t=>{}));const o=await i(this,t,"f");if(!e)throw new Error("No contextGroupId specified for joinContextGroup.");return o.dispatch("joinContextGroup",{contextGroupId:e,target:n})}async removeFromContextGroup(e){return this.wire.sendAction("interop-client-remove-from-context-group").catch((t=>{})),(await i(this,t,"f")).dispatch("removeFromContextGroup",{target:e})}async getAllClientsInContextGroup(e){this.wire.sendAction("interop-client-get-all-clients-in-context-group").catch((t=>{}));const n=await i(this,t,"f");if(!e)throw new Error("No contextGroupId specified for getAllClientsInContextGroup.");return n.dispatch("getAllClientsInContextGroup",{contextGroupId:e})}async getInfoForContextGroup(e){this.wire.sendAction("interop-client-get-info-for-context-group").catch((t=>{}));const n=await i(this,t,"f");if(!e)throw new Error("No contextGroupId specified for getInfoForContextGroup.");return n.dispatch("getInfoForContextGroup",{contextGroupId:e})}async fireIntent(e){return this.wire.sendAction("interop-client-fire-intent").catch((t=>{})),(await i(this,t,"f")).dispatch("fireIntent",e)}async registerIntentHandler(e,n,o){this.wire.sendAction("interop-client-register-intent-handler").catch((t=>{}));const r=await i(this,t,"f"),s=`intent-handler-${n}`,a=(0,h.wrapIntentHandler)(e,s);try{await r.register(s,a),await r.dispatch("intentHandlerRegistered",{handlerId:s,...o})}catch(t){throw new Error("Unable to register intent handler")}return{unsubscribe:async()=>{r.remove(s)}}}async getCurrentContext(e){return this.wire.sendAction("interop-client-get-current-context").catch((t=>{})),(await i(this,t,"f")).dispatch("getCurrentContext",{contextType:e})}async getInfoForIntent(e){return this.wire.sendAction("interop-client-get-info-for-intent").catch((t=>{})),(await i(this,t,"f")).dispatch("getInfoForIntent",e)}async getInfoForIntentsByContext(e){return this.wire.sendAction("interop-client-get-info-for-intents-by-context").catch((t=>{})),(await i(this,t,"f")).dispatch("getInfoForIntentsByContext",e)}async fireIntentForContext(e){return this.wire.sendAction("interop-client-fire-intent-for-context").catch((t=>{})),(await i(this,t,"f")).dispatch("fireIntentForContext",e)}async joinSessionContextGroup(n){try{const o=i(this,e,"f").get(n);if(o)return o.getUserInstance();const r=await i(this,t,"f"),{hasConflict:a}=await r.dispatch("sessionContextGroup:createIfNeeded",{sessionContextGroupId:n});a&&console.warn(`A (non-session) context group with the name "${n}" already exists. If you are trying to join a Context Group, call joinContextGroup instead.`);const c=new s.default(this.wire,i(this,t,"f"),n);return i(this,e,"f").set(n,c),c.getUserInstance()}catch(t){throw console.error(`Error thrown trying to create Session Context Group with id "${n}": ${t}`),t}}async onDisconnection(e){return this.wire.sendAction("interop-client-add-ondisconnection-listener").catch((t=>{})),(await i(this,t,"f")).onDisconnection((t=>{const{uuid:n}=t;e({type:"interop-broker",topic:"disconnected",brokerName:n})}))}getFDC3Sync(t){switch(t){case"1.2":return new a.Fdc3Module((()=>this),this.wire);case"2.0":return new c.Fdc3Module2((()=>this),this.wire);default:throw new Error(`Invalid FDC3 version provided: ${t}. Must be '1.2' or '2.0'`)}}async getFDC3(t){return this.getFDC3Sync(t)}static async ferryFdc3Call(e,n,o){return(await i(e,t,"f")).dispatch(n,o||null)}};return Zi.InteropClient=l,t=new WeakMap,e=new WeakMap,Zi}var vo,Co,bo,_o={};function Io(){if(vo)return _o;vo=1,Object.defineProperty(_o,"__esModule",{value:!0}),_o.overrideCheck=_o.checkFDC32Overrides=_o.getDefaultViewFdc3VersionFromAppInfo=void 0;const t=Yi();function e(e){return["fdc3HandleFindInstances","handleInfoForIntent","handleInfoForIntentsByContext","fdc3HandleGetAppMetadata","fdc3HandleGetInfo","fdc3HandleOpen","handleFiredIntent","handleFiredIntentForContext"].filter((n=>e[n]===t.InteropBroker.prototype[n]))}return _o.getDefaultViewFdc3VersionFromAppInfo=function({manifest:t,initialOptions:e}){const n=t?.platform?.defaultViewOptions?.fdc3InteropApi??e.defaultViewOptions?.fdc3InteropApi;return["1.2","2.0"].includes(n??"")?n:void 0},_o.checkFDC32Overrides=e,_o.overrideCheck=function(t,n){if(n&&"2.0"===n){const n=e(t);n.length>0&&console.warn(`WARNING: FDC3 2.0 has been set as a default option for Views in this Platform, but the required InteropBroker APIs for FDC3 2.0 compliance have not all been overridden.\nThe following APIs need to be overridden:\n${n.join("\n")}`)}},_o}function Eo(){return bo||(bo=1,function(t){var e=d&&d.__createBinding||(Object.create?function(t,e,n,i){void 0===i&&(i=n);var o=Object.getOwnPropertyDescriptor(e,n);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,o)}:function(t,e,n,i){void 0===i&&(i=n),t[i]=e[n]}),n=d&&d.__exportStar||function(t,n){for(var i in t)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||e(n,t,i)};Object.defineProperty(t,"__esModule",{value:!0}),n(function(){if(Co)return Di;Co=1;var t=d&&d.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Di,"__esModule",{value:!0}),Di.InteropModule=void 0;const e=t(r),n=Ui,i=u,o=Yi(),s=go(),a=Io(),c=Dn,h=t=>new t,l="You have attempted to use or modify InteropBroker parameters, which is not allowed. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.";class p extends i.Base{async init(t,i=h){this.wire.sendAction("interop-init").catch((()=>{}));const r=await this.wire.environment.getInteropInfo(this.wire.getFin()),s=(0,n.createUnusableObject)(l),d=(0,n.createWarningObject)(l,(0,e.default)(r)),u=async()=>{throw new Error(l)},p=o.InteropBroker.createClosedConstructor(this.wire,(()=>this.fin.InterApplicationBus.Channel.create(`interop-broker-${t}`)),r);let f;return f=Array.isArray(i)?new((0,c.overrideFromComposables)(...i)(p))(s,u,d):await i(p,s,u,d),(0,a.overrideCheck)(f,r.fdc3Version),f}connectSync(t,e){return this.wire.sendAction("interop-connect-sync").catch((()=>{})),new s.InteropClient(this.wire,this.wire.environment.whenReady().then((()=>this.fin.InterApplicationBus.Channel.connect(`interop-broker-${t}`,{payload:e}))))}}return Di.InteropModule=p,Di}(),t),n(go(),t),n(Yi(),t)}(Fi)),Fi}var xo={},So={},Ao={},Po={};Object.defineProperty(Po,"__esModule",{value:!0}),Po.getSnapshotSourceChannelName=void 0,Po.getSnapshotSourceChannelName=t=>`snapshot-source-provider-${t.uuid}`;var Mo,Lo,Oo,Ro,To,ko=d&&d.__classPrivateFieldSet||function(t,e,n,i,o){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?o.call(t,n):o?o.value=n:e.set(t,n),n},jo=d&&d.__classPrivateFieldGet||function(t,e,n,i){if("a"===n&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(t):i?i.value:e.get(t)};Object.defineProperty(Ao,"__esModule",{value:!0}),Ao.SnapshotSource=void 0;const Bo=u,zo=Po,Fo=new Map;class Do extends Bo.Base{constructor(t,e){super(t),Mo.set(this,void 0),Lo.set(this,(()=>(Fo.has(this.identity.uuid)||Fo.set(this.identity.uuid,{eventFired:null,clientPromise:null}),Fo.get(this.identity.uuid)))),Oo.set(this,(()=>(jo(this,Lo,"f").call(this).clientPromise||(jo(this,Lo,"f").call(this).clientPromise=jo(this,Ro,"f").call(this)),jo(this,Lo,"f").call(this).clientPromise))),Ro.set(this,(async()=>{const t=(0,zo.getSnapshotSourceChannelName)(this.identity);try{jo(this,Lo,"f").call(this).eventFired||await jo(this,To,"f").call(this);const e=await this.fin.InterApplicationBus.Channel.connect(t,{wait:!1});return e.onDisconnection((()=>{jo(this,Lo,"f").call(this).clientPromise=null,jo(this,Lo,"f").call(this).eventFired=null})),e}catch(t){throw jo(this,Lo,"f").call(this).clientPromise=null,new Error("The targeted SnapshotSource is not currently initialized. Await this object's ready() method.")}})),To.set(this,(async()=>{const t=(0,zo.getSnapshotSourceChannelName)(this.identity);let e,n;const i=new Promise(((t,i)=>{e=t,n=i}));jo(this,Lo,"f").call(this).eventFired=i;const o=async i=>{try{i.channelName===t&&(e(),await this.fin.InterApplicationBus.Channel.removeListener("connected",o))}catch(t){n(t)}};await this.fin.InterApplicationBus.Channel.on("connected",o)})),ko(this,Mo,e,"f")}get identity(){return jo(this,Mo,"f")}async ready(){this.wire.sendAction("snapshot-source-ready").catch((t=>{}));try{await jo(this,Oo,"f").call(this)}catch(t){await jo(this,Lo,"f").call(this).eventFired}}async getSnapshot(){this.wire.sendAction("snapshot-source-get-snapshot").catch((t=>{}));const t=await jo(this,Oo,"f").call(this),e=await t.dispatch("get-snapshot");return(await e).snapshot}async applySnapshot(t){return this.wire.sendAction("snapshot-source-apply-snapshot").catch((t=>{})),(await jo(this,Oo,"f").call(this)).dispatch("apply-snapshot",{snapshot:t})}}Ao.SnapshotSource=Do,Mo=new WeakMap,Lo=new WeakMap,Oo=new WeakMap,Ro=new WeakMap,To=new WeakMap,Object.defineProperty(So,"__esModule",{value:!0}),So.SnapshotSourceModule=void 0;const Uo=u,Wo=Ao,$o=Po;class Vo extends Uo.Base{async init(t){if(this.wire.sendAction("snapshot-source-init").catch((t=>{})),"object"!=typeof t||"function"!=typeof t.getSnapshot||"function"!=typeof t.applySnapshot)throw new Error("you must pass in a valid SnapshotProvider");const e=await this.fin.InterApplicationBus.Channel.create((0,$o.getSnapshotSourceChannelName)(this.fin.me));e.register("get-snapshot",(async()=>({snapshot:await t.getSnapshot()}))),e.register("apply-snapshot",(({snapshot:e})=>t.applySnapshot(e)))}wrapSync(t){return this.wire.sendAction("snapshot-source-wrap-sync").catch((t=>{})),new Wo.SnapshotSource(this.wire,t)}async wrap(t){return this.wire.sendAction("snapshot-source-wrap").catch((t=>{})),this.wrapSync(t)}}So.SnapshotSourceModule=Vo,function(t){var e=d&&d.__createBinding||(Object.create?function(t,e,n,i){void 0===i&&(i=n);var o=Object.getOwnPropertyDescriptor(e,n);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,o)}:function(t,e,n,i){void 0===i&&(i=n),t[i]=e[n]}),n=d&&d.__exportStar||function(t,n){for(var i in t)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||e(n,t,i)};Object.defineProperty(t,"__esModule",{value:!0}),n(So,t),n(Ao,t)}(xo),Object.defineProperty(h,"__esModule",{value:!0});var Ho=h.Fin=void 0;const No=o,Go=l,qo=st(),Yo=tt(),Ko=ut,Zo=on,Jo=an,Xo=mn,Qo=En,tr=X(),er=Pn,nr=zi,ir=Eo(),or=xo;class rr extends No.EventEmitter{constructor(t){super(),this.wire=t,this.System=new Go.System(t),this.Window=new qo._WindowModule(t),this.Application=new Yo.ApplicationModule(t),this.InterApplicationBus=new Ko.InterApplicationBus(t),this.Clipboard=new Zo.Clipboard(t),this.ExternalApplication=new Jo.ExternalApplicationModule(t),this.Frame=new Xo._FrameModule(t),this.GlobalHotkey=new Qo.GlobalHotkey(t),this.Platform=new er.PlatformModule(t,this.InterApplicationBus.Channel),this.View=new tr.ViewModule(t),this.Interop=new ir.InteropModule(t),this.SnapshotSource=new or.SnapshotSourceModule(t),t.registerFin(this),this.me=(0,nr.getMe)(t),t.on("disconnected",(()=>{this.emit("disconnected")}))}}Ho=h.Fin=rr;var sr={},ar={};function cr(t){return"string"==typeof t.manifestUrl}function dr(t){return lr(t)&&"string"==typeof t.address}function hr(t){return dr(t)&&"string"==typeof t.token}function lr(t){return"string"==typeof t.uuid}function ur(t){return t.runtime&&"string"==typeof t.runtime.version}function pr(t){return lr(t)&&ur(t)}Object.defineProperty(ar,"__esModule",{value:!0}),ar.isInternalConnectConfig=ar.isPortDiscoveryConfig=ar.isNewConnectConfig=ar.isConfigWithReceiver=ar.isRemoteConfig=ar.isExistingConnectConfig=ar.isExternalConfig=void 0,ar.isExternalConfig=cr,ar.isExistingConnectConfig=dr,ar.isRemoteConfig=hr,ar.isConfigWithReceiver=function(t){return"object"==typeof t.receiver&&hr({...t,address:""})},ar.isNewConnectConfig=pr,ar.isPortDiscoveryConfig=function(t){return cr(t)&&ur(t)||pr(t)},ar.isInternalConnectConfig=function(t){return dr(t)||pr(t)};var fr={},mr={};Object.defineProperty(mr,"__esModule",{value:!0}),mr.EmitterMap=void 0;const wr=o;function yr(t){return Buffer.from(t).toString("base64")}mr.EmitterMap=class{constructor(){this.storage=new Map}hashKeys(t){return t.map(yr).join("/")}getOrCreate(t){const e=this.hashKeys(t);return this.storage.has(e)||this.storage.set(e,new wr.EventEmitter),this.storage.get(e)}has(t){return this.storage.has(this.hashKeys(t))}delete(t){const e=this.hashKeys(t);return this.storage.delete(e)}},Object.defineProperty(fr,"__esModule",{value:!0});const gr=mr;class vr extends gr.EmitterMap{constructor(){super(...arguments),this.dispatchEvent=t=>{if(function(t){return"process-desktop-event"===t.action}(t)){const{payload:e}=t,n=function(t){const{topic:e}=t;if("frame"===e||"window"===e||"view"===e){const{uuid:n,name:i}=t;return[e,n,i]}if("application"===e){const{uuid:n}=t;return[e,n]}return[e]}(e);if(this.has(n))return this.getOrCreate(n).emit(e.type,e),!0}return!1}}}fr.default=vr;var Cr,br,_r=d&&d.__classPrivateFieldSet||function(t,e,n,i,o){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?o.call(t,n):o?o.value=n:e.set(t,n),n},Ir=d&&d.__classPrivateFieldGet||function(t,e,n,i){if("a"===n&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(t):i?i.value:e.get(t)},Er=d&&d.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(sr,"__esModule",{value:!0});var xr=sr.Transport=void 0;const Sr=o,Ar=ar,Pr=C,Mr=Er(fr),Lr=zi,Or=zt;class Rr extends Sr.EventEmitter{constructor(t,e,n){super(),this.wireListeners=new Map,this.topicRefMap=new Map,this.eventAggregator=new Mr.default,this.messageHandlers=[this.eventAggregator.dispatchEvent],Cr.set(this,void 0),br.set(this,void 0),this.connectSync=()=>{Ir(this,Cr,"f").connectSync()},this.getPort=()=>Ir(this,Cr,"f").getPort(),_r(this,Cr,new t(this.onmessage.bind(this)),"f"),this.environment=e,this.sendRaw=Ir(this,Cr,"f").send.bind(Ir(this,Cr,"f")),this.registerMessageHandler(this.handleMessage.bind(this)),Ir(this,Cr,"f").on("disconnected",(()=>{for(const[,{handleNack:t}]of this.wireListeners)t({reason:"Remote connection has closed"});this.wireListeners.clear(),this.emit("disconnected")}));const{uuid:i,name:o}=n,r=this.environment.getCurrentEntityType();this.me=(0,Lr.getBaseMe)(r,i,o)}getFin(){if(!Ir(this,br,"f"))throw new Error("No Fin object registered for this transport");return Ir(this,br,"f")}registerFin(t){if(Ir(this,br,"f"))throw new Error("Fin object has already been registered for this transport");_r(this,br,t,"f")}shutdown(){return Ir(this,Cr,"f").shutdown()}async connect(t){if((0,Ar.isConfigWithReceiver)(t))return await Ir(this,Cr,"f").connect(t.receiver),this.authorize(t);if((0,Ar.isRemoteConfig)(t))return this.connectRemote(t);if((0,Ar.isExistingConnectConfig)(t))return this.connectByPort(t);if((0,Ar.isNewConnectConfig)(t)){const e=await this.environment.retrievePort(t);return this.connectByPort({...t,address:`ws://localhost:${e}`})}}async connectRemote(t){return await Ir(this,Cr,"f").connect(new(this.environment.getWsConstructor())(t.address)),this.authorize(t)}async connectByPort(t){const{address:e,uuid:n}=t,i={...t,type:"file-token"},o=Ir(this,Cr,"f");await o.connect(new(this.environment.getWsConstructor())(t.address));const r=await this.sendAction("request-external-authorization",{uuid:n,type:"file-token"},!0);if("external-authorization-response"!==r.action)throw new Pr.UnexpectedActionError(r.action);return await this.environment.writeToken(r.payload.file,r.payload.token),this.authorize(i)}async authorize(t){const e=await this.sendAction("request-authorization",t,!0);if("authorization-response"!==e.action)throw new Pr.UnexpectedActionError(e.action);if(!0!==e.payload.success)throw new Pr.RuntimeError(e.payload)}sendAction(t,e={},n=!1){let i=()=>{};const o=Pr.RuntimeError.getCallSite(1),r=this.environment.getNextMessageId(),s=new Promise(((s,a)=>{i=a;const c={action:t,payload:e,messageId:r},d=Ir(this,Cr,"f");return this.addWireListener(r,s,(t=>this.nackHandler(t,a,o)),n),d.send(c).catch(a)}));return Object.assign(s,{cancel:i,messageId:r})}nackHandler(t,e,n){e("string"==typeof t?t:new Pr.RuntimeError(t,n))}ferryAction(t){return new Promise(((e,n)=>{const i=this.environment.getNextMessageId();t.messageId=i;const o=t=>{e(t.payload)};return Ir(this,Cr,"f").send(t).then((()=>this.addWireListener(i,o,(t=>this.nackHandler(t,n)),!1))).catch(n)}))}registerMessageHandler(t){this.messageHandlers.push(t)}addWireListener(t,e,n,i){i?this.uncorrelatedListener=e:this.wireListeners.has(t)?n({reason:"Duplicate handler id",error:(0,Or.errorToPOJO)(new Pr.DuplicateCorrelationError(String(t)))}):this.wireListeners.set(t,{resolve:e,handleNack:n})}onmessage(t){for(const e of this.messageHandlers)e.call(null,t)}handleMessage(t){const e=t.correlationId||NaN;if("correlationId"in t){if(!this.wireListeners.has(e))return!1;{const{resolve:n,handleNack:i}=this.wireListeners.get(e);"ack"!==t.action?i({reason:"Did not receive ack action",error:(0,Or.errorToPOJO)(new Pr.NoAckError(t.action))}):"payload"in t?t.payload.success?n.call(null,t):i(t.payload):"string"==typeof t.reason?i(t):(console.warn("Received invalid response from core",t),i({reason:"invalid response shape"})),this.wireListeners.delete(e)}}else this.uncorrelatedListener&&this.uncorrelatedListener.call(null,t),this.uncorrelatedListener=()=>{};return!0}}xr=sr.Transport=Rr,Cr=new WeakMap,br=new WeakMap;const Tr=(...t)=>({log:(...e)=>console.debug(`[${(new Date).toISOString()}]`,...(t=>t.map((t=>`[${t}]`)))(t),...e),getLogger:(...e)=>Tr(...t,...e)}),kr=Tr("@openfin/core-web/client");function jr(t,e){if(!function(t){return"string"==typeof t}(t))throw new Error(`Property ${e} has invalid type. Expected string, got ${typeof t}.`)}const Br=kr.getLogger("get-web-interop-ports");function zr(t,e,n,i){if("a"===n&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(t):i?i.value:e.get(t)}function Fr(t,e,n,i,o){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?o.call(t,n):o?o.value=n:e.set(t,n),n}"function"==typeof SuppressedError&&SuppressedError;const Dr=t=>{var e,n,i;return i=class extends o.EventEmitter{constructor(i){super(),e.set(this,void 0),n.set(this,!1),this.connectSync=()=>{zr(this,n,"f")||(t.addEventListener("message",(t=>{t.data?.topic?.startsWith("wire-message")&&t.data.message&&zr(this,e,"f").call(this,{...JSON.parse(t.data.message),ports:t.ports})})),t.start())},this.connect=async()=>{this.connectSync()},this.send=e=>(t.postMessage({topic:"wire-message",message:JSON.stringify(e)}),Promise.resolve()),this.shutdown=async()=>{t.close()},Fr(this,e,i,"f")}getPort(){return t}},e=new WeakMap,n=new WeakMap,i};var Ur={},Wr={};Object.defineProperty(Wr,"__esModule",{value:!0}),Wr.BaseEnvironment=void 0;const $r=Io();Wr.BaseEnvironment=class{async getViewWindowIdentity(t,e){const{identity:n}=await t.View.wrapSync(e).getCurrentWindow();return n}async getInteropInfo(t){const e=await t.Application.getCurrentSync().getInfo().catch((()=>null)),n=e?.initialOptions?.interopBrokerConfiguration??{};return{fdc3Version:e?(0,$r.getDefaultViewFdc3VersionFromAppInfo)(e):void 0,...n,fdc3Info:{providerVersion:await t.System.getVersion(),provider:"OpenFin"}}}},Object.defineProperty(Ur,"__esModule",{value:!0});var Vr=Ur.BrowserEnvironment=void 0;const Hr=Wr;class Nr extends Hr.BaseEnvironment{constructor(){super(...arguments),this.type="other",this.getRandomId=()=>{const t=new Uint32Array(1);return window.crypto.getRandomValues(t)[0].toString(32)}}getAdapterVersionSync(){return""}observeBounds(t,e){throw new Error("Method not implemented.")}layoutAllowedInContext(t){return!1}initLayoutManager(t,e,n){throw new Error("Method not implemented.")}applyLayoutSnapshot(t,e,n){throw new Error("Method not implemented.")}createLayout(t,e){throw new Error("Method not implemented.")}destroyLayout(t,e){throw new Error("Method not implemented.")}resolveLayout(t,e){throw new Error("Method not implemented.")}initPlatform(...t){throw new Error("Method not implemented.")}writeToken(t,e){return Promise.resolve("")}retrievePort(t){throw new Error("Method not implemented.")}getNextMessageId(){return this.getRandomId()}createChildContent(t){throw new Error("Method not implemented.")}getWebWindow(t){throw new Error("Method not implemented.")}getCurrentEntityIdentity(){throw new Error("Method not implemented.")}getCurrentEntityType(){return"external connection"}raiseEvent(t,e){throw new Error("Method not implemented.")}getUrl(){return location.href}getDefaultChannelOptions(){return{create:{},connect:{}}}getRtcPeer(){return new RTCPeerConnection}getWsConstructor(){return WebSocket}whenReady(){return Promise.resolve()}}Vr=Ur.BrowserEnvironment=Nr;const Gr=t=>"platform"in t&&void 0!==t.platform;var qr,Yr;class Kr extends Vr{constructor(t){super(),this.connectConfig=t,qr.set(this,void 0),Yr.set(this,new V((async()=>Promise.resolve().then((function(){return n(3398)}))))),Gr(t)&&this.validatePlatformOptions(t)}getAdapterVersionSync(){return"0.39.21"}validatePlatformOptions({platform:t}){if(!("layoutSnapshot"in t))throw new Error("Platform options are missing layoutSnapshot. Please provide a layoutSnapshot in the platform options.");if("windows"in t||"windows"in t.layoutSnapshot)throw new Error("It appears you tried to call connect() with a snapshot object from an OpenFin desktop environment. Note that connect() expects to be called with a platform property with this structure: { platform: { layoutSnapshot } }. To get a layoutSnapshot of the expected structure, use fin.Platform.Layout.getCurrentLayoutManagerSync().getLayoutSnapshot() in v34+ in your desktop environment.");const{layouts:e}=t.layoutSnapshot;Object.entries(e).map((([t,e])=>{if("object"!=typeof e||null===e)throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${t} must be an object.`);if(!("content"in e))throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${t} must contain a 'content' property.`)}))}async getInteropInfo(t){return{contextGroups:void 0,logging:{beforeAction:{enabled:!1},afterAction:{enabled:!1}},fdc3Version:void 0,fdc3Info:{providerVersion:"0.39.21",provider:"OpenFin Web"}}}layoutAllowedInContext(t){return!0}async initLayoutManager(t,e,n){if(zr(this,qr,"f"))throw new Error("Layout already initialized.");if(!Gr(this.connectConfig))throw new Error("Platform options are missing from connection config.");const{WebLayoutEntryPoint:i}=await zr(this,Yr,"f").getValue();return Fr(this,qr,new i(this.connectConfig),"f"),await zr(this,qr,"f").initLayoutManager(t,e,n)}async applyLayoutSnapshot(t,e,n){zr(this,qr,"f")?.applyLayoutSnapshot(t,e,n)}async createLayout(t,e){return zr(this,qr,"f")?.createLayout(t,e)}async destroyLayout(t,e){return zr(this,qr,"f")?.destroyLayout(t,e)}async getViewWindowIdentity(t,e){return Promise.resolve({uuid:e.uuid,name:e.uuid})}}qr=new WeakMap,Yr=new WeakMap;const Zr=()=>{const t=a.v4();return{uuid:t,name:t}};e.__classPrivateFieldGet=zr,e.__classPrivateFieldSet=Fr,e.apiExposer=$n,e.commonjsGlobal=d,e.connect=async t=>{try{kr.log("Establishing connection",t);const{brokerUrl:e,identity:n,timeout:o,interopConfig:r}=await(async t=>{if("enabled"===t.connectionInheritance){const e=await(async t=>{const e=(()=>{const t=(t=>{const e=new RegExp("^of-frame<(?.*)>$").exec(t)?.groups?.meta;if(e)try{return JSON.parse(atob(e))}catch(t){throw new Error(`Failed to decode JSON from ${e}.`)}})(window.name);if(t)try{const{name:e,uuid:n,brokerUrl:i,providerId:o,contextGroup:r}=t;return jr(i,"brokerUrl"),jr(n,"uuid"),jr(e,"name"),{identity:{name:e,uuid:n},brokerUrl:i,interopConfig:{providerId:o,currentContextGroup:r}}}catch(t){throw new Error(`Unexpected error occurred when inferring platform information: ${t.stack}`)}})();if(e){const{validateOptions:n=()=>!0}=t,{identity:i,...o}=e;if(!await n(o))throw new Error("Parent options were rejected by validateOptions.");return e}})(t);if(e)return e}if(!t.options){const e="enabled"===t.connectionInheritance?"Broker URL was not specified nor provided by a platform container.":"Connection inheritance is disabled but no options were provided.";throw new Error(e)}return{...t.options,identity:Zr()}})(t),{workerPort:s,iframeBrokerPort:a}=await(async(t,e,n)=>{const{origin:i}=new URL(t),o=document.createElement("IFRAME");let r;o.style.display="none";try{return await new Promise(((s,a)=>{const d=t=>{if(t.source===o.contentWindow&&"ack-web-broker-ports-ready"===t.data?.topic){if(t.origin!==i)a(new Error(`Broker redirected to unexpected origin ${t.origin}, expected ${i}.`));else if(t.data.success){const[e,n]=t.ports;s({iframeBrokerPort:e,workerPort:n})}else a(new b(t.data));window.removeEventListener("message",d),clearTimeout(r)}};window.addEventListener("message",d),Br.log(`Connecting to broker ${t}`),o.setAttribute("src",t),o.setAttribute("name",c(e,"of-broker")),document.body.appendChild(o),Br.log("Iframe loaded, awaiting init message from iframe"),n&&(r=setTimeout((()=>{window.removeEventListener("message",d),document.body.removeChild(o),a(new Error("Worker did not initialize in time"))}),n))}))}catch(t){throw new Error(`Failed to initialise Fin Web Client. ${t.message}`,{cause:t})}})(e,n,o);kr.log("Successfully established connection to shared worker");const d={entityType:"external connection",...n};s.start(),a.start();const h=((t,e,n)=>{const o=Dr(e),r=new Kr(t),s=new xr(o,r,n);return s.connectSync(),window.Buffer=i.Buffer,new Ho(s)})(t,s,d);return r?.providerId&&(h.me.interop=h.Interop.connectSync(r.providerId),r?.currentContextGroup&&h.me.interop.joinContextGroup(r.currentContextGroup).catch((t=>{console.warn(`Error joining specified context group: ${r?.currentContextGroup}, continuing`,t)}))),{...h,me:{...h.me,identity:{uuid:h.me.uuid,name:h.me.name}}}}catch(t){throw new Error(`An error occured during web-interop connection: ${t.message}`)}},e.decorators=Nn,e.encodeOptions=c,e.layout_constants=hi,e.lazy=$},3398:(t,e,n)=>{var i=n(6205),o=n(5412);n(1048),n(46),n(6108),n(6343);var r={},s={};Object.defineProperty(s,"__esModule",{value:!0}),s.mapValuesAsync=s.mapEntriesAsync=void 0;const a=(t,[e,n])=>({...t,[e]:n});async function c(t,e){return(await Promise.all(e.map((async([e,n])=>[e,await t(n,e)])))).reduce(a,{})}s.mapEntriesAsync=c,s.mapValuesAsync=async function(t,e){let n;return n=e instanceof Map?[...e.entries()]:Object.entries(e),c(t,n)};var d,h,l,u,p=i.commonjsGlobal&&i.commonjsGlobal.__classPrivateFieldSet||function(t,e,n,i,o){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?o.call(t,n):o?o.value=n:e.set(t,n),n},f=i.commonjsGlobal&&i.commonjsGlobal.__classPrivateFieldGet||function(t,e,n,i){if("a"===n&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(t):i?i.value:e.get(t)};Object.defineProperty(r,"__esModule",{value:!0});var m=r.DefaultLayoutManager=void 0;const w=s;class y{constructor(t){h.set(this,void 0),l.set(this,new Map),p(this,h,t,"f")}size(){return f(this,l,"f").size}async applyLayoutSnapshot({layouts:t}){if(Object.keys(t).length>1)throw new Error("[LayoutManager] Tried to call applyLayoutSnapshot with more than 1 layout. When implementing multiple layouts via overridden LayoutManager class, you must override and fully implement the applyLayoutSnapshot method without calling super.applyLayoutSnapshot().");const[[e,n]]=Object.entries(t);await y.createLayout(this,{layoutName:e,layout:n})}async showLayout({layoutName:t}){}async getLayoutSnapshot(){return{layouts:await(0,w.mapValuesAsync)((t=>t.getFrameSnapshot()),f(this,l,"f"))}}async removeLayout({layoutName:t}){}getLayoutIdentityForView(t){const e=[...f(this,l,"f").values()].find((e=>e.getCurrentViews().some((e=>e.name===t.name&&e.uuid===t.uuid))));return e?.identity??void 0}isLayoutVisible({layoutName:t}){return f(y,d,"m",u).call(y,this,t).isVisible()}resolveLayoutIdentity(t){if(t&&"layoutName"in t)return t;const e=[...f(this,l,"f").values()];if(1===e.length)return e[0].identity;const n=e.find((t=>t.isVisible()));return n?.identity??void 0}static async resolveLayout(t,e){const n=t.resolveLayoutIdentity(e);if(void 0===n||!("layoutName"in n))throw new Error("[layout-manager] resolveLayout: Could not resolve the layout identity. Make sure you include 'layoutName' in the identity object.");return f(y,d,"m",u).call(y,t,n.layoutName)}static async handleSharedView(t,e,n){await(0,w.mapValuesAsync)((async t=>{if(t.identity.layoutName!==e.layoutName){const e=t.getCurrentViews().find((t=>t.name===n.name));e&&await t.onViewDetached({viewIdentity:e,target:null}).catch(console.error)}}),f(t,l,"f"))}static async handleLastViewRemoved(t,e){await t.removeLayout(e),await f(t,h,"f").handleLastViewRemoved(t)}static async destroyLayout(t,{layoutName:e}){await f(y,d,"m",u).call(y,t,e).destroy(),f(t,l,"f").delete(e)}static async createLayout(t,e){const{layoutName:n}=e;if(f(t,l,"f").has(n))throw new Error(`Layout name ${n} already exists`);await f(t,h,"f").createLayout(e,t)}static registerLayout(t,e,n){f(t,l,"f").set(e,n)}static getAllLayouts(t){return[...f(t,l,"f").values()]}static setInitialSnapshot(t,e){f(t,h,"f").setInitialSnapshot(e)}static createClosedConstructor(...t){return class extends y{constructor(){super(...t)}}}}m=r.DefaultLayoutManager=y,d=y,h=new WeakMap,l=new WeakMap,u=function(t,e){const n=f(t,l,"f").get(e);if(!n)throw new Error(`[layout-manager] getLayoutByName: Could not locate layout with name '${e}'`);return n};var g={},v={},C={};Object.defineProperty(C,"__esModule",{value:!0}),C.ReversibleMap=void 0,C.ReversibleMap=class{constructor(){this.valueToKey=new Map,this.keyToValue=new Map,this.setUnique=(t,e)=>{if(this.hasKey(t)||this.hasValue(e))throw new Error("Key or value already in the map.");this.keyToValue.set(t,e),this.valueToKey.set(e,t)},this.getKey=t=>{const e=this.valueToKey.get(t);if(!e)throw new Error("Value not found in the map.");return e},this.deleteKey=t=>{const e=this.getValue(t);return this.keyToValue.delete(t),this.valueToKey.delete(e),e},this.deleteValue=t=>{const e=this.getKey(t);return this.keyToValue.delete(e),this.valueToKey.delete(t),e},this.hasKey=t=>this.keyToValue.has(t),this.hasValue=t=>this.valueToKey.has(t)}getValue(t){const e=this.keyToValue.get(t);if(!e)throw new Error("Key not found in the map.");return e}},Object.defineProperty(v,"__esModule",{value:!0});var b=v.LayoutContentCache=void 0;const _=i.lazy,I=C;class E{constructor(){this.contentItemCache=new I.ReversibleMap,this.contentItemCacheId=0,this.createCacheKey=()=>{const t=`entity-${this.contentItemCacheId.toString()}`;return this.contentItemCacheId+=1,t},this.hasKey=t=>this.contentItemCache.hasKey(t),this.getItemOrUndefined=t=>{try{return this.getContentItemOrThrow(t)}catch(t){return}},this.getContentItemOrThrow=(t,e)=>{if(!this.contentItemCache.hasKey(t))throw new Error("Layout component has been destroyed or detached from the current layout.");const n=this.contentItemCache.getValue(t);if(e&&!e.includes(n.type))throw new Error(`Layout item is not the expected type. Expected ${e.join(", ")}, got ${n.type}.`);return n},this.getOrCreateEntityId=t=>{if(this.contentItemCache.hasValue(t))return this.contentItemCache.getKey(t);t.onDestroyed((()=>{this.contentItemCache.deleteValue(t)}));const e=this.createCacheKey();return this.contentItemCache.setUnique(e,t),e}}static getSingleInstance(){return E.singleton.getValue()}}b=v.LayoutContentCache=E,E.singleton=new _.Lazy((()=>new E));var x={},S={};!function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.getAdjacentStacks=t.doShareEdge=t.getAdjacentItem=void 0,t.getAdjacentItem=(e,n)=>{const{parent:i}=e;if(e.isRoot()||!i)return;const o=["top","bottom"].includes(n)?"column":"row",r=["top","left"].includes(n)?-1:1;if(i.type===o){const t=i.contentItems.indexOf(e)+r;if(t>=0&&t{const i=t.getBounds(),o=e.getBounds();return!(!i||!o||(["top","bottom"].includes(n)?i.righto.right:i.bottomo.bottom))},t.getAdjacentStacks=(e,n)=>{const i=["top","bottom"].includes(n)?"row":"column",o=r=>"stack"===r.type?(0,t.doShareEdge)(e,r,n)?[r]:[]:"root"===r.type||"ground"===r.type?[]:r.type===i?r.contentItems.map((t=>o(t))).flat():r.type!==i?["top","right"].includes(n)?o(r.contentItems[r.contentItems.length-1]):o(r.contentItems[0]):[],r=(0,t.getAdjacentItem)(e,n);return r?o(r):[]}}(S);var A=i.commonjsGlobal&&i.commonjsGlobal.__decorate||function(t,e,n,i){var o,r=arguments.length,s=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(r<3?o(s):r>3?o(e,n,s):o(e,n))||s);return r>3&&s&&Object.defineProperty(e,n,s),s};Object.defineProperty(x,"__esModule",{value:!0}),x.LayoutEntitiesController=void 0;const P=i.decorators,M=S,L=r;class O{constructor(t,e,n){this.wire=t,this.layoutManager=e,this.layoutContentCache=n,this.analytics=t=>{this.wire.sendAction(`layout-controller-${t}`).catch((()=>{}))},this.getLayoutIdentityForViewOrThrow=async t=>{const e=this.layoutManager.getLayoutIdentityForView(t);if(!e)throw new Error(`View identity ${t.name} is not attached to any layouts.`);return e},this.getRoot=async t=>{this.analytics("get-root");const e=(await this.getLayout(t)).getRoot();return{type:e.type,entityId:this.layoutContentCache.getOrCreateEntityId(e)}},this.getStackByView=async t=>{this.analytics("get-stack-by-view");const e=await this.getLayoutIdentityForViewOrThrow(t),n=(await this.getLayout(e)).getStackByView(t);if("stack"===n?.type)return{entityId:this.layoutContentCache.getOrCreateEntityId(n),type:"stack"}},this.getStackViews=t=>(this.analytics("get-stack-views"),this.layoutContentCache.getContentItemOrThrow(t,["stack"]).contentItems.map((t=>({name:t.viewName,uuid:this.wire.me.uuid})))),this.isRoot=t=>(this.analytics("is-root"),this.layoutContentCache.getContentItemOrThrow(t).isRoot()),this.exists=t=>(this.analytics("exists"),this.layoutContentCache.hasKey(t)),this.addViewToStack=async(t,e,{index:n}={index:0})=>{this.analytics("add-view-to-stack");const i=this.layoutContentCache.getContentItemOrThrow(t);if(n&&n>i.contentItems.length+1)throw new Error(`Index '${n}' out of range, please exclude the index or specify a number between 0 and ${i.contentItems.length}`);const o={id:t,index:n},{identity:r}=await i.layout.platformCreateView(e,{location:o});return r},this.findViewInStack=(t,e)=>t.contentItems.find((t=>t.viewName===e.name)),this.removeViewFromStack=async(t,e)=>{this.analytics("remove-view-from-stack");const n=this.layoutContentCache.getContentItemOrThrow(t,["stack"]),i=this.findViewInStack(n,e);if(!i)throw new Error(`Tried to remove a view ('${e.name}') which does not belong to the stack.`);await i.layout.platformCloseView(e)},this.createAdjacentStack=async(t,e,{position:n="right"}={})=>{if(this.analytics("create-adjacent-stack"),!Array.isArray(e)||0===e.length)throw new Error('The parameter "views" must be an array with at least 1 element.');if(!["top","bottom","left","right"].includes(n))throw new Error(`Invalid position '${n}' specified.`);const i=this.layoutContentCache.getContentItemOrThrow(t).createAdjacentStack({position:n}),o=this.layoutContentCache.getOrCreateEntityId(i);return await Promise.all(e.reverse().map((t=>this.addViewToStack(o,t)))),o},this.getAdjacentStacks=async({targetId:t,edge:e})=>{this.analytics("get-adjacent-stacks");const n=this.layoutContentCache.getContentItemOrThrow(t);return(0,M.getAdjacentStacks)(n,e).map((t=>({entityId:this.layoutContentCache.getOrCreateEntityId(t)})))},this.setStackActiveView=async(t,e)=>{this.analytics("set-stack-active-view");const n=this.layoutContentCache.getContentItemOrThrow(t,["stack"]),i=this.findViewInStack(n,e);if(!i)throw new Error(`Tried to set a view ('${e.name}') as active when it does not belong to the stack.`);n.setActiveContentItem(i,!0)}}async getLayout(t){const e=await L.DefaultLayoutManager.resolveLayout(this.layoutManager,t);if(!e)throw new Error(`Could not resolve target layout identity ${JSON.stringify(t)}`);return e}getContent(t){return this.analytics("get-content"),this.layoutContentCache.getContentItemOrThrow(t,["column","row"]).contentItems.map((t=>({type:t.type,entityId:this.layoutContentCache.getOrCreateEntityId(t)})))}getParent(t){this.analytics("get-parent");const e=this.layoutContentCache.getContentItemOrThrow(t);if(!e.isRoot())return e.parent?.contentItems.includes(e)?{type:e.parent.type,entityId:this.layoutContentCache.getOrCreateEntityId(e.parent)}:void 0}}A([(0,P.expose)()],O.prototype,"getLayoutIdentityForViewOrThrow",void 0),A([(0,P.expose)()],O.prototype,"getRoot",void 0),A([(0,P.expose)()],O.prototype,"getStackByView",void 0),A([(0,P.expose)()],O.prototype,"getStackViews",void 0),A([(0,P.expose)()],O.prototype,"getContent",null),A([(0,P.expose)()],O.prototype,"getParent",null),A([(0,P.expose)()],O.prototype,"isRoot",void 0),A([(0,P.expose)()],O.prototype,"exists",void 0),A([(0,P.expose)()],O.prototype,"addViewToStack",void 0),A([(0,P.expose)()],O.prototype,"removeViewFromStack",void 0),A([(0,P.expose)()],O.prototype,"createAdjacentStack",void 0),A([(0,P.expose)()],O.prototype,"getAdjacentStacks",void 0),A([(0,P.expose)()],O.prototype,"setStackActiveView",void 0),x.LayoutEntitiesController=O,Object.defineProperty(g,"__esModule",{value:!0});var R=g.initLayoutEndpoints=void 0;const T=i.apiExposer,k=i.layout_constants,j=v,B=x,z=r;R=g.initLayoutEndpoints=async function(t,e){const n=t.getFin(),i=await n.Platform.getCurrentSync().getClient(),o=new T.ChannelsExposer(i);await new T.ApiExposer(o).exposeInstance(new B.LayoutEntitiesController(t,e,j.LayoutContentCache.getSingleInstance()),{id:k.LAYOUT_CONTROLLER_ID}),await async function(t,e){const n=t=>async n=>{const i=await z.DefaultLayoutManager.resolveLayout(e,n.target);if(!i)throw new Error(`Could not resolve the layout target from payload ${JSON.stringify(n)}`);return t(i,n)},i=(e,i)=>{t.register(e,n(i))},o=(t,e)=>{i(t,e)};i("replace-view",((t,e)=>t.replaceView(e))),i("replace-layout",((t,{layout:e})=>t.replaceLayout(e))),i("add-view",((t,e)=>t.insertView(e))),o("layout-add-view",((t,{viewOptions:e,location:n,targetView:i})=>t.platformCreateView(e,{location:n,targetView:i}))),i("close-view",((t,e)=>t.cleanupView(e.viewIdentity))),o("layout-close-view",((t,e)=>t.platformCloseView(e.viewIdentity))),i("apply-preset-layout",((t,e)=>t.applyPreset(e))),i("get-layout-views",(t=>t.getCurrentViews())),i("get-frame-snapshot",(t=>t.getFrameSnapshot())),i("is-visible",(t=>t.isVisible())),i("destroy",(t=>t.destroy())),t.register("get-layout-snapshot",(()=>e.getLayoutSnapshot()))}(i,e)};var F={};Object.defineProperty(F,"__esModule",{value:!0});var D=F.BaseLayout=void 0;D=F.BaseLayout=class{};var U={};Object.defineProperty(U,"__esModule",{value:!0});var W=U.DOMEmitter=void 0;W=U.DOMEmitter=class{constructor(t){this.container=t}dispatchLocalEvent(t,e){const n={...e,type:t,tabSelector:`tab-${e.name}`,containerSelector:`container-${e.name}`,topic:"openfin-DOM-event"};this.container.dispatchEvent(new CustomEvent(t,{detail:n}))}};var $={};Object.defineProperty($,"__esModule",{value:!0});var V=$.mapLayoutContentItemsImmutableSync=$.mapLayoutContentItemsImmutable=H=$.isVisible=void 0,H=$.isVisible=t=>(0!==t.offsetWidth||0!==t.offsetHeight)&&"hidden"!==window.getComputedStyle(t).visibility&&t.offsetTop>=0&&t.offsetLeft>=0&&t.offsetTop<=window.innerHeight&&t.offsetLeft<=window.innerWidth;const N=t=>"type"in t&&"component"===t.type;$.mapLayoutContentItemsImmutable=async function t(e,n){return N(n)?e(n):{...n,content:await Promise.all(n.content?.map((n=>t(e,n))))}},V=$.mapLayoutContentItemsImmutableSync=function t(e,n){return N(n)?e(n):{...n,content:n.content?.map((n=>t(e,n)))}};class G extends Error{constructor(t,e){super(e),this.type=t}}class q extends G{constructor(t,e){super("Configuration",t),this.node=e}}class Y extends G{constructor(t){super("PopoutBlocked",t)}}class K extends G{constructor(t){super("API",t)}}class Z extends G{constructor(t){super("Bind",t)}}class J extends Error{constructor(t,e,n){super(`${t}: ${e}${void 0===n?"":": "+n}`)}}class X extends J{constructor(t,e){super("Assert",t,e)}}class Q extends J{constructor(t,e,n){super("UnreachableCase",t,`${e}${void 0===n?"":": "+n}`)}}class tt extends J{constructor(t,e){super("UnexpectedNull",t,e)}}class et extends J{constructor(t,e){super("UnexpectedUndefined",t,e)}}var nt;!function(t){let e=!1;const n={PopoutCannotBeCreatedWithGroundItemConfig:{id:0,default:"Popout cannot be created with ground ItemConfig"},PleaseRegisterAConstructorFunction:{id:1,default:"Please register a constructor function"},ComponentTypeNotRegisteredAndBindComponentEventHandlerNotAssigned:{id:2,default:"Component type not registered and BindComponentEvent handler not assigned"},ComponentIsAlreadyRegistered:{id:3,default:"Component is already registered"},ComponentIsNotVirtuable:{id:4,default:"Component is not virtuable. Requires rootHtmlElement field/getter"},VirtualComponentDoesNotHaveRootHtmlElement:{id:5,default:'Virtual component does not have getter "rootHtmlElement"'},ItemConfigIsNotTypeComponent:{id:6,default:"ItemConfig is not of type component"},InvalidNumberPartInSizeString:{id:7,default:"Invalid number part in size string"},UnknownUnitInSizeString:{id:8,default:"Unknown unit in size string"},UnsupportedUnitInSizeString:{id:9,default:"Unsupported unit in size string"}};t.idCount=Object.keys(n).length;const i=Object.values(n);t.checkInitialise=function(){if(!e)for(let e=0;e="0"&&t<="9"}function kt(t,e){const n=Ot(e);t.style.width=n}function jt(t,e){const n=Ot(e);t.style.height=n}function Bt(t){return{width:t.offsetWidth,height:t.offsetHeight}}function zt(t,e){t.style.display=e?"":"none"}function Ft(t,e){if(void 0!==e)for(const n in e)if(e.hasOwnProperty(n)){const i=e[n],o=t[n];t[n]=Dt(o,i)}return t}function Dt(t,e){if("object"!=typeof e)return e;if(Array.isArray(e)){const t=e.length,n=new Array(t);for(let i=0;i36)throw new Error("Too many keys in config minifier map")},t.translateObject=i}(pt||(pt={})),function(t){t.defaults={type:ht.ground,content:[],size:1,sizeUnit:ut.Fractional,minSize:void 0,minSizeUnit:ut.Pixel,id:"",isClosable:!0},t.createCopy=function(t,e){switch(t.type){case ht.ground:case ht.row:case ht.column:return gt.createCopy(t,e);case ht.stack:return wt.createCopy(t,e);case ht.component:return yt.createCopy(t);default:throw new Q("CICC91354",t.type,"Invalid Config Item type specified")}},t.createDefault=function(t){switch(t){case ht.ground:throw new X("CICCDR91562");case ht.row:case ht.column:return gt.createDefault(t);case ht.stack:return wt.createDefault();case ht.component:return yt.createDefault();default:throw new Q("CICCDD91563",t,"Invalid Config Item type specified")}},t.isComponentItem=function(t){return t.type===ht.component},t.isStackItem=function(t){return t.type===ht.stack},t.isGroundItem=function(t){return t.type===ht.ground}}(ft||(ft={})),function(t){t.defaultMaximised=!1,function(t){t.createCopy=function(t,e){return void 0===t?void 0:{show:null!=e?e:t.show,popout:t.popout,close:t.close,maximise:t.maximise,minimise:t.minimise,tabDropdown:t.tabDropdown}}}(t.Header||(t.Header={}))}(mt||(mt={})),function(t){function e(t){const e=t.length,n=new Array(e);for(let i=0;i"__glMaximised"===t));t>0&&(o=!0,i=i.splice(t,1)),e=i.length>0?i[0]:ft.defaults.id}else e=i;return n=void 0!==t.maximised?t.maximised:o,{id:e,maximised:n}}}(Et||(Et={})),function(t){function e(t){if(void 0===t)return[];{const e=t.length,n=new Array(e);for(let i=0;i0?e.content[0]:void 0,{resolved:!0,root:Pt.resolve(n),openPopouts:t.resolveOpenPopouts(e.openPopouts),dimensions:t.Dimensions.resolve(e.dimensions),settings:t.Settings.resolve(e.settings),header:t.Header.resolve(e.header,e.settings,e.labels)}}},t.fromResolved=function(e){return{root:Pt.fromResolvedOrUndefined(e.root),openPopouts:Lt.fromResolvedArray(e.openPopouts),settings:bt.Settings.createCopy(e.settings),dimensions:t.Dimensions.fromResolved(e.dimensions),header:bt.Header.createCopy(e.header)}},t.isResolved=function(t){const e=t;return void 0!==e.resolved&&!0===e.resolved},t.resolveOpenPopouts=function(t){if(void 0===t)return[];{const e=t.length,n=new Array(e);for(let i=0;i0?e.content[0]:void 0,{root:Pt.resolve(o),openPopouts:Mt.resolveOpenPopouts(e.openPopouts),dimensions:Mt.Dimensions.resolve(e.dimensions),settings:Mt.Settings.resolve(e.settings),header:Mt.Header.resolve(e.header,e.settings,e.labels),parentId:null!==(n=e.parentId)&&void 0!==n?n:null,indexInParent:null!==(i=e.indexInParent)&&void 0!==i?i:null,window:t.Window.resolve(e.window,e.dimensions),resolved:!0}},t.fromResolved=function(e){return{root:Pt.fromResolvedOrUndefined(e.root),openPopouts:n(e.openPopouts),dimensions:Mt.Dimensions.fromResolved(e.dimensions),settings:bt.Settings.createCopy(e.settings),header:bt.Header.createCopy(e.header),parentId:e.parentId,indexInParent:e.indexInParent,window:t.Window.fromResolved(e.window)}},t.fromResolvedArray=n}(Lt||(Lt={}));class Ht{constructor(){this._allEventSubscriptions=[],this._subscriptionsMap=new Map,this.unbind=this.removeEventListener,this.trigger=this.emit}tryBubbleEvent(t,e){}emit(t,...e){let n=this._subscriptionsMap.get(t);if(void 0!==n){n=n.slice();for(let t=0;t0){const i=e.slice();i.unshift(t);const o=this._allEventSubscriptions.slice();for(let t=0;t0?i.contentItems[0]:i,e=0);const o=this._layoutManager.createAndInitContentItem(n,t);t.addChild(o,e),this._layoutManager.layoutConfig.settings.popInOnClose?this._onClose():this.close()}createWindow(){const t=this.createUrl(),e=Math.floor(1e6*Math.random()).toString(36),n=this.serializeWindowFeatures({width:this._initialWindowSize.width,height:this._initialWindowSize.height,innerWidth:this._initialWindowSize.width,innerHeight:this._initialWindowSize.height,menubar:"no",toolbar:"no",location:"no",personalbar:"no",resizable:"yes",scrollbars:"no",status:"no"});if(this._popoutWindow=globalThis.open(t,e,n),this._popoutWindow)this._popoutWindow.addEventListener("load",(()=>this.positionWindow()),{passive:!0}),this._popoutWindow.addEventListener("beforeunload",(()=>{this._layoutManager.layoutConfig.settings.popInOnClose?this.popIn():this._onClose()}),{passive:!0}),this._checkReadyInterval=setInterval((()=>this.checkReady()),10);else if(!0===this._layoutManager.layoutConfig.settings.blockedPopoutsThrowError)throw new Y("Popout blocked")}checkReady(){if(null===this._popoutWindow)throw new tt("BPCR01844");this._popoutWindow.__glInstance&&this._popoutWindow.__glInstance.isInitialised&&(this.onInitialised(),void 0!==this._checkReadyInterval&&(clearInterval(this._checkReadyInterval),this._checkReadyInterval=void 0))}serializeWindowFeatures(t){const e=[];for(const n in t)e.push(n+"="+t[n].toString());return e.join(",")}createUrl(){const t="gl-window-config-"+Ut(),e=bt.minifyConfig(this._config);try{localStorage.setItem(t,JSON.stringify(e))}catch(t){throw new Error("Error while writing to localStorage "+function(t){return t instanceof Error?t.message:"string"==typeof t?t:"Unknown Error"}(t))}const n=new URL(location.href);return n.searchParams.set("gl-window",t),n.toString()}positionWindow(){if(null===this._popoutWindow)throw new Error("BrowserPopout.positionWindow: null popoutWindow");this._popoutWindow.moveTo(this._initialWindowSize.left,this._initialWindowSize.top),this._popoutWindow.focus()}onInitialised(){this._isInitialised=!0,this.getGlInstance().on("popIn",(()=>this.popIn())),this.emit("initialised")}_onClose(){setTimeout((()=>this.emit("closed")),50)}}class qt extends Ht{constructor(t,e,n,i){super(),this.layoutManager=t,this._parent=n,this._element=i,this._popInParentIds=[],this._type=e.type,this._id=e.id,this._isInitialised=!1,this.isGround=!1,this.isRow=!1,this.isColumn=!1,this.isStack=!1,this.isComponent=!1,this.size=e.size,this.sizeUnit=e.sizeUnit,this.minSize=e.minSize,this.minSizeUnit=e.minSizeUnit,this._isClosable=e.isClosable,this._pendingEventPropagations={},this._throttledEvents=["stateChanged"],this._contentItems=this.createContentItems(e.content)}get type(){return this._type}get id(){return this._id}set id(t){this._id=t}get popInParentIds(){return this._popInParentIds}get parent(){return this._parent}get contentItems(){return this._contentItems}get isClosable(){return this._isClosable}get element(){return this._element}get isInitialised(){return this._isInitialised}static isStack(t){return t.isStack}static isComponentItem(t){return t.isComponent}static isComponentParentableItem(t){return t.isStack||t.isGround}removeChild(t,e=!1){const n=this._contentItems.indexOf(t);if(-1===n)throw new Error("Can't remove child item. Unknown content item");if(e||this._contentItems[n].destroy(),this._contentItems.splice(n,1),this._contentItems.length>0)this.updateSize(!1);else if(!this.isGround&&!0===this._isClosable){if(null===this._parent)throw new tt("CIUC00874");this._parent.removeChild(this)}}addChild(t,e,n){return null!=e||(e=this._contentItems.length),this._contentItems.splice(e,0,t),t.setParent(this),!0===this._isInitialised&&!1===t._isInitialised&&t.init(),e}replaceChild(t,e,n=!1){const i=this._contentItems.indexOf(t),o=t._element.parentNode;if(-1===i)throw new X("CIRCI23232","Can't replace child. oldChild is not child of this");if(null===o)throw new tt("CIRCP23232");if(o.replaceChild(e._element,t._element),!0===n&&(t._parent=null,t.destroy()),this._contentItems[i]=e,e.setParent(this),e.size=t.size,e.sizeUnit=t.sizeUnit,e.minSize=t.minSize,e.minSizeUnit=t.minSizeUnit,null===e._parent)throw new tt("CIRCNC45699");!0===e._parent._isInitialised&&!1===e._isInitialised&&e.init(),this.updateSize(!1)}remove(){if(null===this._parent)throw new tt("CIR11110");this._parent.removeChild(this)}popout(){const t=Ut(),e=this.layoutManager.createPopoutFromContentItem(this,void 0,t,void 0);return this.emitBaseBubblingEvent("stateChanged"),e}calculateConfigContent(){const t=this._contentItems,e=t.length,n=new Array(e);for(let i=0;ithis.propagateEventToLayoutManager(t,e))))}propagateEventToLayoutManager(t,e){this._pendingEventPropagations[t]=!1,this.layoutManager.emitUnknown(t,e)}}class Yt extends qt{constructor(t,e,n){super(t,e,n,document.createElement("div")),this._parentItem=n,this._focused=!1,this.isComponent=!0,this._reorderEnabled=e.reorderEnabled,this.applyUpdatableConfig(e),this._initialWantMaximise=e.maximised;const i=document.createElement("div");i.classList.add("lm_content"),this.element.appendChild(i),this._container=new Nt(e,this,t,i,(t=>this.handleUpdateItemConfigEvent(t)),(()=>this.show()),(()=>this.hide()),(t=>this.focus(t)),(t=>this.blur(t)))}get componentName(){return this._container.componentType}get componentType(){return this._container.componentType}get reorderEnabled(){return this._reorderEnabled}get initialWantMaximise(){return this._initialWantMaximise}get component(){return this._container.component}get container(){return this._container}get parentItem(){return this._parentItem}get headerConfig(){return this._headerConfig}get title(){return this._title}get tab(){return this._tab}get focused(){return this._focused}destroy(){this._container.destroy(),super.destroy()}applyUpdatableConfig(t){this.setTitle(t.title),this._headerConfig=t.header}toConfig(){const t=this._container.stateRequestEvent,e=void 0===t?this._container.state:t();return{type:ht.component,content:[],size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,maximised:!1,isClosable:this.isClosable,reorderEnabled:this._reorderEnabled,title:this._title,header:mt.Header.createCopy(this._headerConfig),componentType:yt.copyComponentType(this.componentType),componentState:e}}close(){if(null===this.parent)throw new tt("CIC68883");this.parent.removeChild(this,!1)}enterDragMode(t,e){kt(this.element,t),jt(this.element,e),this._container.enterDragMode(t,e)}exitDragMode(){this._container.exitDragMode()}enterStackMaximised(){this._container.enterStackMaximised()}exitStackMaximised(){this._container.exitStackMaximised()}drag(){this._container.drag()}updateSize(t){this.updateNodeSize(t)}init(){this.updateNodeSize(!1),super.init(),this._container.emit("open"),this.initContentItems()}setTitle(t){this._title=t,this.emit("titleChanged",t),this.emit("stateChanged")}setTab(t){this._tab=t,this.emit("tab",t),this._container.setTab(t)}hide(){super.hide(),this._container.setVisibility(!1)}show(){super.show(),this._container.setVisibility(!0)}focus(t=!1){this.parentItem.setActiveComponentItem(this,!0,t)}setFocused(t){this._focused=!0,this.tab.setFocused(),t||this.emitBaseBubblingEvent("focus")}blur(t=!1){this._focused&&this.layoutManager.setFocusedComponentItem(void 0,t)}setBlurred(t){this._focused=!1,this.tab.setBlurred(),t||this.emitBaseBubblingEvent("blur")}setParent(t){this._parentItem=t,super.setParent(t)}handleUpdateItemConfigEvent(t){this.applyUpdatableConfig(t)}updateNodeSize(t){if("none"!==this.element.style.display){const{width:e,height:n}=Bt(this.element);this._container.setSizeToNodeSize(e,n,t)}}}class Kt extends qt{constructor(){super(...arguments),this._focused=!1}get focused(){return this._focused}setFocusedValue(t){this._focused=t}}class Zt extends Ht{constructor(t,e){super(),this._eElement=t,this._pointerTracking=!1,this._pointerDownEventListener=t=>this.onPointerDown(t),this._pointerMoveEventListener=t=>this.onPointerMove(t),this._pointerUpEventListener=t=>this.onPointerUp(t),this._timeout=void 0,this._allowableTargets=[t,...e],this._oDocument=document,this._eBody=document.body,this._nDelay=1800,this._nDistance=10,this._nX=0,this._nY=0,this._nOriginalX=0,this._nOriginalY=0,this._dragging=!1,this._eElement.addEventListener("pointerdown",this._pointerDownEventListener,{passive:!0})}destroy(){this.checkRemovePointerTrackingEventListeners(),this._eElement.removeEventListener("pointerdown",this._pointerDownEventListener)}cancelDrag(){this.processDragStop(void 0)}onPointerDown(t){if(this._allowableTargets.includes(t.target)&&t.isPrimary){const e=this.getPointerCoordinates(t);this.processPointerDown(e)}}processPointerDown(t){this._nOriginalX=t.x,this._nOriginalY=t.y,this._oDocument.addEventListener("pointermove",this._pointerMoveEventListener),this._oDocument.addEventListener("pointerup",this._pointerUpEventListener,{passive:!0}),this._pointerTracking=!0,this._timeout=setTimeout((()=>{try{this.startDrag()}catch(t){throw console.error(t),t}}),this._nDelay)}onPointerMove(t){this._pointerTracking&&(this.processDragMove(t),t.preventDefault())}processDragMove(t){this._nX=t.pageX-this._nOriginalX,this._nY=t.pageY-this._nOriginalY,!1===this._dragging&&(Math.abs(this._nX)>this._nDistance||Math.abs(this._nY)>this._nDistance)&&this.startDrag(),this._dragging&&this.emit("drag",this._nX,this._nY,t)}onPointerUp(t){this.processDragStop(t)}processDragStop(t){var e;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this.checkRemovePointerTrackingEventListeners(),!0===this._dragging&&(this._eBody.classList.remove("lm_dragging"),this._eElement.classList.remove("lm_dragging"),null===(e=this._oDocument.querySelector("iframe"))||void 0===e||e.style.setProperty("pointer-events",""),this._dragging=!1,this.emit("dragStop",t))}checkRemovePointerTrackingEventListeners(){this._pointerTracking&&(this._oDocument.removeEventListener("pointermove",this._pointerMoveEventListener),this._oDocument.removeEventListener("pointerup",this._pointerUpEventListener),this._pointerTracking=!1)}startDrag(){var t;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this._dragging=!0,this._eBody.classList.add("lm_dragging"),this._eElement.classList.add("lm_dragging"),null===(t=this._oDocument.querySelector("iframe"))||void 0===t||t.style.setProperty("pointer-events","none"),this.emit("dragStart",this._nOriginalX,this._nOriginalY)}getPointerCoordinates(t){return{x:t.pageX,y:t.pageY}}}class Jt{constructor(t,e,n){this._isVertical=t,this._size=e,this._grabSize=n0){const n=this.createSplitter(Math.max(0,e-1)).element;e>0?(this.contentItems[e-1].element.insertAdjacentElement("afterend",n),n.insertAdjacentElement("afterend",t.element)):(this.contentItems[0].element.insertAdjacentElement("beforebegin",n),n.insertAdjacentElement("beforebegin",t.element))}else this._childElementContainer.appendChild(t.element);super.addChild(t,e);const i=1/this.contentItems.length*100;if(!0===n)return this.emitBaseBubblingEvent("stateChanged"),e;for(let e=0;e0&&(this.calculateRelativeSizes(),this.setAbsoluteSizes()),this.emitBaseBubblingEvent("stateChanged"),this.emit("resize")}setAbsoluteSizes(){const t=this.calculateAbsoluteSizes();for(let e=0;e0&&t.itemSizes[e]++,this._isColumn?(kt(this.contentItems[e].element,t.crossAxisSize),jt(this.contentItems[e].element,t.itemSizes[e])):(kt(this.contentItems[e].element,t.itemSizes[e]),jt(this.contentItems[e].element,t.crossAxisSize))}calculateAbsoluteSizes(){const t=(this.contentItems.length-1)*this._splitterSize,{width:e,height:n}=Bt(this.element);let i,o;this._isColumn?(i=n-t,o=e):(i=e-t,o=n);let r=0;const s=[];for(let t=0;t0){const i=100-t;for(let t=0;t100&&e.length>0){for(let t=0;te)return;{const s=n/e;let a=n;for(let e=0;ethis.onSplitterDrag(e,t,n))),e.on("dragStop",(()=>this.onSplitterDragStop(e))),e.on("dragStart",(()=>this.onSplitterDragStart(e))),this._splitter.splice(t,0,e),e}getSplitItems(t){const e=this._splitter.indexOf(t);return{before:this.contentItems[e],after:this.contentItems[e+1]}}calculateContentItemMinSize(t){const e=t.minSize;if(void 0!==e){if(t.minSizeUnit===ut.Pixel)return e;throw new X("ROCGMD98831",JSON.stringify(t))}{const t=this.layoutManager.layoutConfig.dimensions;return this._isColumn?t.defaultMinItemHeight:t.defaultMinItemWidth}}calculateContentItemsTotalMinSize(t){let e=0;for(const n of t)e+=this.calculateContentItemMinSize(n);return e}onSplitterDragStart(t){const e=this.getSplitItems(t),n=Rt(e.before.element.style[this._dimension]),i=Rt(e.after.element.style[this._dimension]),o=this.calculateContentItemsTotalMinSize(e.before.contentItems),r=this.calculateContentItemsTotalMinSize(e.after.contentItems);this._splitterPosition=0,this._splitterMinPosition=-1*(n-o),this._splitterMaxPosition=i-r}onSplitterDrag(t,e,n){let i=this._isColumn?n:e;if(null===this._splitterMinPosition||null===this._splitterMaxPosition)throw new tt("ROCOSD59226");i=Math.max(i,this._splitterMinPosition),i=Math.min(i,this._splitterMaxPosition),this._splitterPosition=i;const o=Ot(i);this._isColumn?t.element.style.top=o:t.element.style.left=o}onSplitterDragStop(t){if(null===this._splitterPosition)throw new tt("ROCOSDS66932");{const e=this.getSplitItems(t),n=Rt(e.before.element.style[this._dimension]),i=Rt(e.after.element.style[this._dimension]),o=(this._splitterPosition+n)/(n+i),r=e.before.size+e.after.size;e.before.size=o*r,e.after.size=(1-o)*r,t.element.style.top=Ot(0),t.element.style.left=Ot(0),globalThis.requestAnimationFrame((()=>this.updateSize(!1)))}}}!function(t){t.getElementDimensionSize=function(t,e){return"width"===e?function(t){return t.offsetWidth}(t):function(t){return t.offsetHeight}(t)},t.setElementDimensionSize=function(t,e,n){return"width"===e?kt(t,n):jt(t,n)},t.createElement=function(t,e){const n=t.createElement("div");return n.classList.add("lm_item"),e?n.classList.add("lm_column"):n.classList.add("lm_row"),n}}(Xt||(Xt={}));class Qt extends Kt{constructor(t,e,n){super(t,Ct.create(e),null,Qt.createElement(document)),this.isGround=!0,this._childElementContainer=this.element,this._containerElement=n;let i=null;for(;;){const t=i?i.previousSibling:this._containerElement.lastChild;if(!(t instanceof Element&&t.classList.contains("lm_content")))break;i=t}this._containerElement.insertBefore(this.element,i)}init(){if(!0!==this.isInitialised){this.updateNodeSize();for(let t=0;t0?this.contentItems[0]:this,i.isComponent)throw new Error("Cannot add item as child to ComponentItem");{const t=this.layoutManager.createAndInitContentItem(n,i);return e=i.addChild(t,e),i===this?-1:e}}loadComponentAsRoot(t){this.clearRoot();const e=It.resolve(t,!1);if(e.maximised)throw new Error("Root Component cannot be maximised");{const t=new Yt(this.layoutManager,e,this);t.init(),this.addChild(t,0)}}addChild(t,e){if(this.contentItems.length>0)throw new Error("Ground node can only have a single child");return this._childElementContainer.appendChild(t.element),e=super.addChild(t,e),this.updateSize(!1),this.emitBaseBubblingEvent("stateChanged"),e}calculateConfigContent(){const t=this.contentItems,e=t.length,n=new Array(e);for(let i=0;i0&&(kt(this.contentItems[0].element,t),jt(this.contentItems[0].element,e)),this.updateContentItemsSize(!1))}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}createSideAreas(){const t=Qt.Area.oppositeSides,e=new Array(Object.keys(t).length);let n=0;for(const i in t){const o=i,r=this.getElementArea();if(null===r)throw new tt("RCSA77553");r.side=o,"2"===t[o][1]?r[o]=r[t[o]]-50:r[o]=r[t[o]]+50,r.surface=(r.x2-r.x1)*(r.y2-r.y1),e[n++]=r}return e}highlightDropZone(t,e,n){this.layoutManager.tabDropPlaceholder.remove(),super.highlightDropZone(t,e,n)}onDrop(t,e){if(t.isComponent){const e=wt.createDefault(),n=t;e.header=mt.Header.createCopy(n.headerConfig);const i=this.layoutManager.createAndInitContentItem(e,this);i.addChild(t),t=i}if(0===this.contentItems.length)this.addChild(t);else{if(t.type===ht.row||t.type===ht.column){const e=wt.createDefault(),n=this.layoutManager.createContentItem(e,this);n.addChild(t),t=n}const n="x"==e.side[0]?ht.row:ht.column,i="2"==e.side[1],o=this.contentItems[0];if(o instanceof Xt&&o.type===n){const e=o.contentItems[i?0:o.contentItems.length-1];o.addChild(t,i?0:void 0,!0),e.size*=.5,t.size=e.size,t.sizeUnit=ut.Percent,o.updateSize(!1)}else{const e=ft.createDefault(n),r=this.layoutManager.createContentItem(e,this);this.replaceChild(o,r),r.addChild(t,i?0:void 0,!0),r.addChild(o,i?void 0:0,!0),o.size=50,t.size=50,t.sizeUnit=ut.Percent,r.updateSize(!1)}}}dock(){throw new X("GID87731")}validateDocking(){throw new X("GIVD87732")}getAllContentItems(){const t=[this];return this.deepGetAllContentItems(this.contentItems,t),t}getConfigMaximisedItems(){const t=[];return this.deepFilterContentItems(this.contentItems,t,(t=>!(!qt.isStack(t)||!t.initialWantMaximise)||!(!qt.isComponentItem(t)||!t.initialWantMaximise))),t}getItemsByPopInParentId(t){const e=[];return this.deepFilterContentItems(this.contentItems,e,(e=>e.popInParentIds.includes(t))),e}toConfig(){throw new Error("Cannot generate GroundItem config")}setActiveComponentItem(t,e,n){}updateNodeSize(){const{width:t,height:e}=Bt(this._containerElement);kt(this.element,t),jt(this.element,e),this.contentItems.length>0&&(kt(this.contentItems[0].element,t),jt(this.contentItems[0].element,e))}deepGetAllContentItems(t,e){for(let n=0;nthis.onClick(t),this._touchStartEventListener=t=>this.onTouchStart(t),this._element=document.createElement("div"),this._element.classList.add(n),this._element.title=e,this._header.on("destroy",(()=>this.destroy())),this._element.addEventListener("click",this._clickEventListener,{passive:!0}),this._element.addEventListener("touchstart",this._touchStartEventListener,{passive:!0}),this._header.controlsContainerElement.appendChild(this._element)}get element(){return this._element}destroy(){var t;this._element.removeEventListener("click",this._clickEventListener),this._element.removeEventListener("touchstart",this._touchStartEventListener),null===(t=this._element.parentNode)||void 0===t||t.removeChild(this._element)}onClick(t){this._pushEvent(t)}onTouchStart(t){this._pushEvent(t)}}class ee{constructor(t,e,n,i,o){var r;this._layoutManager=t,this._componentItem=e,this._closeEvent=n,this._focusEvent=i,this._dragStartEvent=o,this._isActive=!1,this._tabClickListener=t=>this.onTabClickDown(t),this._tabTouchStartListener=t=>this.onTabTouchStart(t),this._closeClickListener=()=>this.onCloseClick(),this._closeTouchStartListener=()=>this.onCloseTouchStart(),this._dragStartListener=(t,e)=>this.onDragStart(t,e),this._contentItemDestroyListener=()=>this.onContentItemDestroy(),this._tabTitleChangedListener=t=>this.setTitle(t),this._element=document.createElement("div"),this._element.classList.add("lm_tab"),this._titleElement=document.createElement("span"),this._titleElement.classList.add("lm_title"),this._closeElement=document.createElement("div"),this._closeElement.classList.add("lm_close_tab"),this._element.appendChild(this._titleElement),this._element.appendChild(this._closeElement),e.isClosable?this._closeElement.style.display="":this._closeElement.style.display="none",this.setTitle(e.title),this._componentItem.on("titleChanged",this._tabTitleChangedListener),(null!==(r=e.reorderEnabled)&&void 0!==r?r:this._layoutManager.layoutConfig.settings.reorderEnabled)&&this.enableReorder(),this._element.addEventListener("click",this._tabClickListener,{passive:!0}),this._element.addEventListener("touchstart",this._tabTouchStartListener,{passive:!0}),this._componentItem.isClosable?(this._closeElement.addEventListener("click",this._closeClickListener,{passive:!0}),this._closeElement.addEventListener("touchstart",this._closeTouchStartListener,{passive:!0})):(this._closeElement.remove(),this._closeElement=void 0),this._componentItem.setTab(this),this._layoutManager.emit("tabCreated",this)}get isActive(){return this._isActive}get componentItem(){return this._componentItem}get contentItem(){return this._componentItem}get element(){return this._element}get titleElement(){return this._titleElement}get closeElement(){return this._closeElement}get reorderEnabled(){return void 0!==this._dragListener}set reorderEnabled(t){t!==this.reorderEnabled&&(t?this.enableReorder():this.disableReorder())}setTitle(t){this._titleElement.innerText=t,this._element.title=t}setActive(t){t!==this._isActive&&(this._isActive=t,t?this._element.classList.add("lm_active"):this._element.classList.remove("lm_active"))}destroy(){var t,e;this._closeEvent=void 0,this._focusEvent=void 0,this._dragStartEvent=void 0,this._element.removeEventListener("click",this._tabClickListener),this._element.removeEventListener("touchstart",this._tabTouchStartListener),null===(t=this._closeElement)||void 0===t||t.removeEventListener("click",this._closeClickListener),null===(e=this._closeElement)||void 0===e||e.removeEventListener("touchstart",this._closeTouchStartListener),this._componentItem.off("titleChanged",this._tabTitleChangedListener),this.reorderEnabled&&this.disableReorder(),this._element.remove()}setBlurred(){this._element.classList.remove("lm_focused"),this._titleElement.classList.remove("lm_focused")}setFocused(){this._element.classList.add("lm_focused"),this._titleElement.classList.add("lm_focused")}onDragStart(t,e){if(void 0===this._dragListener)throw new et("TODSDLU10093");if(void 0===this._dragStartEvent)throw new et("TODS23309");this._dragStartEvent(t,e,this._dragListener,this.componentItem)}onContentItemDestroy(){void 0!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=void 0)}onTabClickDown(t){const e=t.target;e!==this._element&&e!==this._titleElement||(0===t.button?this.notifyFocus():1===t.button&&this._componentItem.isClosable&&this.notifyClose())}onTabTouchStart(t){t.target===this._element&&this.notifyFocus()}onCloseClick(){this.notifyClose()}onCloseTouchStart(){this.notifyClose()}notifyClose(){if(void 0===this._closeEvent)throw new et("TNC15007");this._closeEvent(this._componentItem)}notifyFocus(){if(void 0===this._focusEvent)throw new et("TNA15007");this._focusEvent(this._componentItem)}enableReorder(){this._dragListener=new Zt(this._element,[this._titleElement]),this._dragListener.on("dragStart",this._dragStartListener),this._componentItem.on("destroy",this._contentItemDestroyListener)}disableReorder(){if(void 0===this._dragListener)throw new et("TDR87745");this._componentItem.off("destroy",this._contentItemDestroyListener),this._dragListener.off("dragStart",this._dragStartListener),this._dragListener=void 0}}class ne{constructor(t,e,n,i,o){this._layoutManager=t,this._componentRemoveEvent=e,this._componentFocusEvent=n,this._componentDragStartEvent=i,this._dropdownActiveChangedEvent=o,this._tabs=[],this._lastVisibleTabIndex=-1,this._dropdownActive=!1,this._element=document.createElement("section"),this._element.classList.add("lm_tabs"),this._dropdownElement=document.createElement("section"),this._dropdownElement.classList.add("lm_tabdropdown_list"),this._dropdownElement.style.display="none"}get tabs(){return this._tabs}get tabCount(){return this._tabs.length}get lastVisibleTabIndex(){return this._lastVisibleTabIndex}get element(){return this._element}get dropdownElement(){return this._dropdownElement}get dropdownActive(){return this._dropdownActive}destroy(){for(let t=0;tthis.handleTabCloseEvent(t)),(t=>this.handleTabFocusEvent(t)),((t,e,n,i)=>this.handleTabDragStartEvent(t,e,n,i)));void 0===e&&(e=this._tabs.length),this._tabs.splice(e,0,n),ethis._lastVisibleTabIndex){const t=this._tabs[e];for(let t=e;t>0;t--)this._tabs[t]=this._tabs[t-1];this._tabs[0]=t}}updateTabSizes(t,e){let n=!1;this.tryUpdateTabSizes(n,t,e)||(n=!0,this.tryUpdateTabSizes(n,t,e)),n!==this._dropdownActive&&(this._dropdownActive=n,this._dropdownActiveChangedEvent())}tryUpdateTabSizes(t,e,n){if(this._tabs.length>0){if(void 0===n)throw new Error("non-empty tabs must have active component item");let i=0,o=!1;const r=this._layoutManager.layoutConfig.settings.tabOverlapAllowance,s=this._tabs.indexOf(n.tab),a=this._tabs[s];this._lastVisibleTabIndex=-1;for(let n=0;ne){if(o)n===s&&(c.style.zIndex="auto",c.style.marginLeft="",c.parentElement!==this._element&&this._element.appendChild(c));else{let t;if(t=s>0&&s<=n?(h-e)/(n-1):(h-e)/n,tthis.onClick(t),this._touchStartListener=t=>this.onTouchStart(t),this._rowColumnClosable=!0,this._closeButton=null,this._popoutButton=null,this._tabsContainer=new ne(this._layoutManager,(t=>this.handleTabInitiatedComponentRemoveEvent(t)),(t=>this.handleTabInitiatedComponentFocusEvent(t)),((t,e,n,i)=>this.handleTabInitiatedDragStartEvent(t,e,n,i)),(()=>this.processTabDropdownActiveChanged())),this._show=n.show,this._popoutEnabled=n.popoutEnabled,this._popoutLabel=n.popoutLabel,this._maximiseEnabled=n.maximiseEnabled,this._maximiseLabel=n.maximiseLabel,this._minimiseEnabled=n.minimiseEnabled,this._minimiseLabel=n.minimiseLabel,this._closeEnabled=n.closeEnabled,this._closeLabel=n.closeLabel,this._tabDropdownEnabled=n.tabDropdownEnabled,this._tabDropdownLabel=n.tabDropdownLabel,this.setSide(n.side),this._canRemoveComponent=this._configClosable,this._element=document.createElement("section"),this._element.classList.add("lm_header"),this._controlsContainerElement=document.createElement("section"),this._controlsContainerElement.classList.add("lm_controls"),this._element.appendChild(this._tabsContainer.element),this._element.appendChild(this._controlsContainerElement),this._element.appendChild(this._tabsContainer.dropdownElement),this._element.addEventListener("click",this._clickListener,{passive:!0}),this._element.addEventListener("touchstart",this._touchStartListener,{passive:!0}),this._documentMouseUpListener=()=>this._tabsContainer.hideAdditionalTabsDropdown(),globalThis.document.addEventListener("mouseup",this._documentMouseUpListener,{passive:!0}),this._tabControlOffset=this._layoutManager.layoutConfig.settings.tabControlOffset,this._tabDropdownEnabled&&(this._tabDropdownButton=new te(this,this._tabDropdownLabel,"lm_tabdropdown",(()=>this._tabsContainer.showAdditionalTabsDropdown()))),this._popoutEnabled&&(this._popoutButton=new te(this,this._popoutLabel,"lm_popout",(()=>this.handleButtonPopoutEvent()))),this._maximiseEnabled&&(this._maximiseButton=new te(this,this._maximiseLabel,"lm_maximise",(t=>this.handleButtonMaximiseToggleEvent(t)))),this._configClosable&&(this._closeButton=new te(this,this._closeLabel,"lm_close",(()=>r()))),this.processTabDropdownActiveChanged()}get show(){return this._show}get side(){return this._side}get leftRightSided(){return this._leftRightSided}get layoutManager(){return this._layoutManager}get parent(){return this._parent}get tabs(){return this._tabsContainer.tabs}get lastVisibleTabIndex(){return this._tabsContainer.lastVisibleTabIndex}get element(){return this._element}get tabsContainerElement(){return this._tabsContainer.element}get controlsContainerElement(){return this._controlsContainerElement}destroy(){this.emit("destroy"),this._popoutEvent=void 0,this._maximiseToggleEvent=void 0,this._clickEvent=void 0,this._touchStartEvent=void 0,this._componentRemoveEvent=void 0,this._componentFocusEvent=void 0,this._componentDragStartEvent=void 0,this._tabsContainer.destroy(),globalThis.document.removeEventListener("mouseup",this._documentMouseUpListener),this._element.remove()}createTab(t,e){this._tabsContainer.createTab(t,e)}removeTab(t){this._tabsContainer.removeTab(t)}processActiveComponentChanged(t){this._tabsContainer.processActiveComponentChanged(t),this.updateTabSizes()}setSide(t){this._side=t,this._leftRightSided=[st.right,st.left].includes(this._side)}setRowColumnClosable(t){this._rowColumnClosable=t,this.updateClosability()}updateClosability(){let t;if(this._configClosable)if(this._rowColumnClosable){t=!0;const e=this.tabs.length;for(let n=0;n1}applyFocusedValue(t){t?this._element.classList.add("lm_focused"):this._element.classList.remove("lm_focused")}processMaximised(){if(void 0===this._maximiseButton)throw new et("HPMAX16997");this._maximiseButton.element.setAttribute("title",this._minimiseLabel)}processMinimised(){if(void 0===this._maximiseButton)throw new et("HPMIN16997");this._maximiseButton.element.setAttribute("title",this._maximiseLabel)}updateTabSizes(){if(this._tabsContainer.tabCount>0){const t=this._show?this._layoutManager.layoutConfig.dimensions.headerHeight:0;let e;this._leftRightSided?(this._element.style.height="",this._element.style.width=Ot(t)):(this._element.style.width="",this._element.style.height=Ot(t)),e=this._leftRightSided?this._element.offsetHeight-this._controlsContainerElement.offsetHeight-this._tabControlOffset:this._element.offsetWidth-this._controlsContainerElement.offsetWidth-this._tabControlOffset,this._tabsContainer.updateTabSizes(e,this._getActiveComponentItemEvent())}}handleTabInitiatedComponentRemoveEvent(t){if(this._canRemoveComponent){if(void 0===this._componentRemoveEvent)throw new et("HHTCE22294");this._componentRemoveEvent(t)}}handleTabInitiatedComponentFocusEvent(t){if(void 0===this._componentFocusEvent)throw new et("HHTAE22294");this._componentFocusEvent(t)}handleTabInitiatedDragStartEvent(t,e,n,i){if(this._canRemoveComponent){if(void 0===this._componentDragStartEvent)throw new et("HHTDSE22294");this._componentDragStartEvent(t,e,n,i)}else n.cancelDrag()}processTabDropdownActiveChanged(){void 0!==this._tabDropdownButton&&zt(this._tabDropdownButton.element,this._tabsContainer.dropdownActive)}handleButtonPopoutEvent(){if(this._layoutManager.layoutConfig.settings.popoutWholeStack){if(void 0===this._popoutEvent)throw new et("HHBPOE17834");this._popoutEvent()}else{const t=this._getActiveComponentItemEvent();t&&t.popout()}}handleButtonMaximiseToggleEvent(t){if(void 0===this._maximiseToggleEvent)throw new et("HHBMTE16834");this._maximiseToggleEvent()}onClick(t){t.target===this._element&&this.notifyClick(t)}onTouchStart(t){t.target===this._element&&this.notifyTouchStart(t)}notifyClick(t){if(void 0===this._clickEvent)throw new et("HNHC46834");this._clickEvent(t)}notifyTouchStart(t){if(void 0===this._touchStartEvent)throw new et("HNHTS46834");this._touchStartEvent(t)}}class oe extends Kt{constructor(t,e,n){var i,o,r,s,a,c,d,h,l,u,p,f,m,w,y,g,v,C,b;super(t,e,n,oe.createElement(document)),this._headerSideChanged=!1,this._resizeListener=()=>this.handleResize(),this._maximisedListener=()=>this.handleMaximised(),this._minimisedListener=()=>this.handleMinimised(),this._headerConfig=e.header;const _=t.layoutConfig.header,I=e.content;let E;E=1!==I.length?void 0:I[0].header,this._initialWantMaximise=e.maximised,this._initialActiveItemIndex=null!==(i=e.activeItemIndex)&&void 0!==i?i:0;const x=null!==(s=null!==(r=null===(o=this._headerConfig)||void 0===o?void 0:o.show)&&void 0!==r?r:null==E?void 0:E.show)&&void 0!==s?s:_.show,S=null!==(d=null!==(c=null===(a=this._headerConfig)||void 0===a?void 0:a.popout)&&void 0!==c?c:null==E?void 0:E.popout)&&void 0!==d?d:_.popout,A=null!==(u=null!==(l=null===(h=this._headerConfig)||void 0===h?void 0:h.maximise)&&void 0!==l?l:null==E?void 0:E.maximise)&&void 0!==u?u:_.maximise,P=null!==(m=null!==(f=null===(p=this._headerConfig)||void 0===p?void 0:p.close)&&void 0!==f?f:null==E?void 0:E.close)&&void 0!==m?m:_.close,M=null!==(g=null!==(y=null===(w=this._headerConfig)||void 0===w?void 0:w.minimise)&&void 0!==y?y:null==E?void 0:E.minimise)&&void 0!==g?g:_.minimise,L=null!==(b=null!==(C=null===(v=this._headerConfig)||void 0===v?void 0:v.tabDropdown)&&void 0!==C?C:null==E?void 0:E.tabDropdown)&&void 0!==b?b:_.tabDropdown;this._maximisedEnabled=!1!==A;const O={show:!1!==x,side:!1===x?st.top:x,popoutEnabled:!1!==S,popoutLabel:!1===S?"":S,maximiseEnabled:this._maximisedEnabled,maximiseLabel:!1===A?"":A,closeEnabled:!1!==P,closeLabel:!1===P?"":P,minimiseEnabled:!0,minimiseLabel:M,tabDropdownEnabled:!1!==L,tabDropdownLabel:!1===L?"":L};this._header=new ie(t,this,O,e.isClosable&&!1!==P,(()=>this.getActiveComponentItem()),(()=>this.remove()),(()=>this.handlePopoutEvent()),(()=>this.toggleMaximise()),(t=>this.handleHeaderClickEvent(t)),(t=>this.handleHeaderTouchStartEvent(t)),(t=>this.handleHeaderComponentRemoveEvent(t)),(t=>this.handleHeaderComponentFocusEvent(t)),((t,e,n,i)=>this.handleHeaderComponentStartDragEvent(t,e,n,i))),this.isStack=!0,this._childElementContainer=document.createElement("section"),this._childElementContainer.classList.add("lm_items"),this.on("resize",this._resizeListener),this._maximisedEnabled&&(this.on("maximised",this._maximisedListener),this.on("minimised",this._minimisedListener)),this.element.appendChild(this._header.element),this.element.appendChild(this._childElementContainer),this.setupHeaderPosition(),this._header.updateClosability()}get childElementContainer(){return this._childElementContainer}get header(){return this._header}get headerShow(){return this._header.show}get headerSide(){return this._header.side}get headerLeftRightSided(){return this._header.leftRightSided}get contentAreaDimensions(){return this._contentAreaDimensions}get initialWantMaximise(){return this._initialWantMaximise}get isMaximised(){return this===this.layoutManager.maximisedStack}get stackParent(){if(!this.parent)throw new Error("Stack should always have a parent");return this.parent}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}init(){if(!0===this.isInitialised)return;this.updateNodeSize();for(let t=0;t0){if(this._initialActiveItemIndex<0||this._initialActiveItemIndex>=e)throw new Error(`ActiveItemIndex out of range: ${this._initialActiveItemIndex} id: ${this.id}`);for(let n=0;nthis.contentItems.length)throw e-=1,new X("SAC99728");if(t instanceof Yt)return e=super.addChild(t,e),this._childElementContainer.appendChild(t.element),this._header.createTab(t,e),this.setActiveComponentItem(t,n),this._header.updateTabSizes(),this.updateSize(!1),t.container.setBaseLogicalZIndex(),this._header.updateClosability(),this.emitStateChangedEvent(),e;throw new X("SACC88532")}removeChild(t,e){const n=t,i=this.contentItems.indexOf(n),o=1===this.contentItems.length;if(this._activeComponentItem===n&&(n.focused&&n.blur(),!o)){const t=0===i?1:i-1;this.setActiveComponentItem(this.contentItems[t],!1)}this._header.removeTab(n),super.removeChild(n,e),o||this._header.updateClosability(),this.emitStateChangedEvent()}toggleMaximise(){this.isMaximised?this.minimise():this.maximise()}maximise(){if(!this.isMaximised){this.layoutManager.setMaximisedStack(this);const t=this.contentItems,e=t.length;for(let n=0;n0&&void 0===t)throw new Error("expected non-empty stack to have an active component item");return{type:"stack",content:this.calculateConfigContent(),size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,isClosable:this.isClosable,maximised:this.isMaximised,header:this.createHeaderConfig(),activeItemIndex:t}}onDrop(t,e){if("header"===this._dropSegment){if(this.resetHeaderDropZone(),void 0===this._dropIndex)throw new et("SODDI68990");return void this.addChild(t,this._dropIndex)}if("body"===this._dropSegment)return void this.addChild(t,0,!0);const n="top"===this._dropSegment||"bottom"===this._dropSegment,i="left"===this._dropSegment||"right"===this._dropSegment,o="top"===this._dropSegment||"left"===this._dropSegment,r=n&&this.stackParent.isColumn||i&&this.stackParent.isRow;if(t.isComponent){const e=wt.createDefault();e.header=this.createHeaderConfig();const n=this.layoutManager.createAndInitContentItem(e,this);n.addChild(t),t=n}if(t.type===ht.row||t.type===ht.column){const e=wt.createDefault();e.header=this.createHeaderConfig();const n=this.layoutManager.createContentItem(e,this);n.addChild(t),t=n}if(r){const e=this.stackParent.contentItems.indexOf(this);this.stackParent.addChild(t,o?e:e+1,!0),this.size*=.5,t.size=this.size,t.sizeUnit=this.sizeUnit,this.stackParent.updateSize(!1)}else{const e=n?ht.column:ht.row,i=ft.createDefault(e),r=this.layoutManager.createContentItem(i,this);this.stackParent.replaceChild(this,r),r.addChild(t,o?0:void 0,!0),r.addChild(this,o?void 0:0,!0),this.size=50,t.size=50,t.sizeUnit=ut.Percent,r.updateSize(!1)}}highlightDropZone(t,e){for(const n in this._contentAreaDimensions){const i=n,o=this._contentAreaDimensions[i].hoverArea;if(o.x1t&&o.y1e)return void("header"===i?(this._dropSegment="header",this.highlightHeaderDropZone(this._header.leftRightSided?e:t)):(this.resetHeaderDropZone(),this.highlightBodyDropZone(i)))}}getArea(){if("none"===this.element.style.display)return null;const t=super.getElementArea(this._header.element),e=super.getElementArea(this._childElementContainer);if(null===t||null===e)throw new tt("SGAHC13086");const n=e.x2-e.x1,i=e.y2-e.y1;return this._contentAreaDimensions={header:{hoverArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2},highlightArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2}}},0===this.contentItems.length?(this._contentAreaDimensions.body={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2}},super.getElementArea(this.element)):(this._contentAreaDimensions.left={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x1+.25*n,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x1+.5*n,y2:e.y2}},this._contentAreaDimensions.top={hoverArea:{x1:e.x1+.25*n,y1:e.y1,x2:e.x1+.75*n,y2:e.y1+.5*i},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y1+.5*i}},this._contentAreaDimensions.right={hoverArea:{x1:e.x1+.75*n,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1+.5*n,y1:e.y1,x2:e.x2,y2:e.y2}},this._contentAreaDimensions.bottom={hoverArea:{x1:e.x1+.25*n,y1:e.y1+.5*i,x2:e.x1+.75*n,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1+.5*i,x2:e.x2,y2:e.y2}},super.getElementArea(this.element))}positionHeader(t){this._header.side!==t&&(this._header.setSide(t),this._headerSideChanged=!0,this.setupHeaderPosition())}updateNodeSize(){if("none"!==this.element.style.display){const t=Bt(this.element);this._header.show&&(t[this._header.leftRightSided?rt.width:rt.height]-=this.layoutManager.layoutConfig.dimensions.headerHeight),this._childElementContainer.style.width=Ot(t.width),this._childElementContainer.style.height=Ot(t.height);for(let e=0;e=o&&tthis.onDrag(t,e,n))),this._dragListener.on("dragStop",(()=>this.onDrop())),this.createDragProxyElements(t,e),null===this._componentItem.parent)throw new tt("DPC10097");this._componentItemFocused=this._componentItem.focused,this._componentItemFocused&&this._componentItem.blur(),this._componentItem.parent.removeChild(this._componentItem,!0),this.setDimensions(),document.body.appendChild(this._element),this.determineMinMaxXY(),this._layoutManager.calculateItemAreas(),this.setDropPosition(t,e)}get element(){return this._element}createDragProxyElements(t,e){this._element=document.createElement("div"),this._element.classList.add("lm_dragProxy");const n=document.createElement("div");n.classList.add("lm_header");const i=document.createElement("div");i.classList.add("lm_tabs");const o=document.createElement("div");o.classList.add("lm_tab");const r=document.createElement("span");r.classList.add("lm_title"),o.appendChild(r),i.appendChild(o),n.appendChild(i),this._proxyContainerElement=document.createElement("div"),this._proxyContainerElement.classList.add("lm_content"),this._element.appendChild(n),this._element.appendChild(this._proxyContainerElement),this._originalParent instanceof oe&&this._originalParent.headerShow&&(this._sided=this._originalParent.headerLeftRightSided,this._element.classList.add("lm_"+this._originalParent.headerSide),[st.right,st.bottom].indexOf(this._originalParent.headerSide)>=0&&this._proxyContainerElement.insertAdjacentElement("afterend",n)),this._element.style.left=Ot(t),this._element.style.top=Ot(e),o.setAttribute("title",this._componentItem.title),r.insertAdjacentText("afterbegin",this._componentItem.title),this._proxyContainerElement.appendChild(this._componentItem.element)}determineMinMaxXY(){const t=this._layoutManager.groundItem;if(void 0===t)throw new et("DPDMMXY73109");{const e=t.element.getBoundingClientRect();this._minX=e.left+document.body.scrollLeft,this._minY=e.top+document.body.scrollTop,this._maxX=this._minX+e.width,this._maxY=this._minY+e.height}}onDrag(t,e,n){const i=n.pageX,o=n.pageY;this.setDropPosition(i,o),this._componentItem.drag()}setDropPosition(t,e){this._layoutManager.layoutConfig.settings.constrainDragToContainer&&(t<=this._minX?t=Math.ceil(this._minX):t>=this._maxX&&(t=Math.floor(this._maxX)),e<=this._minY?e=Math.ceil(this._minY):e>=this._maxY&&(e=Math.floor(this._maxY))),this._element.style.left=Ot(t),this._element.style.top=Ot(e),this._area=this._layoutManager.getArea(t,e),null!==this._area&&(this._lastValidArea=this._area,this._area.contentItem.highlightDropZone(t,e,this._area))}onDrop(){const t=this._layoutManager.dropTargetIndicator;if(null===t)throw new tt("DPOD30011");let e;t.hide(),this._componentItem.exitDragMode(),null!==this._area?(e=this._componentItem,this._area.contentItem.onDrop(e,this._area)):null!==this._lastValidArea?(e=this._componentItem,this._lastValidArea.contentItem.onDrop(e,this._lastValidArea)):this._originalParent?(e=this._componentItem,this._originalParent.addChild(e)):this._componentItem.destroy(),this._element.remove(),this._layoutManager.emit("itemDropped",this._componentItem),this._componentItemFocused&&void 0!==e&&e.focus()}setDimensions(){const t=this._layoutManager.layoutConfig.dimensions;if(void 0===t)throw new Error("DragProxy.setDimensions: dimensions undefined");let e=t.dragProxyWidth,n=t.dragProxyHeight;if(void 0===e||void 0===n)throw new Error("DragProxy.setDimensions: width and/or height undefined");const i=!1===this._layoutManager.layoutConfig.header.show?0:t.headerHeight;this._element.style.width=Ot(e),this._element.style.height=Ot(n),e-=this._sided?i:0,n-=this._sided?0:i,this._proxyContainerElement.style.width=Ot(e),this._proxyContainerElement.style.height=Ot(n),this._componentItem.enterDragMode(e,n),this._componentItem.show()}}class se{constructor(t,e,n,i,o,r,s){this._layoutManager=t,this._element=e,this._extraAllowableChildTargets=n,this._componentTypeOrFtn=i,this._componentState=o,this._title=r,this._id=s,this._dragListener=null,this._dummyGroundContainer=document.createElement("div");const a=gt.createDefault("row");this._dummyGroundContentItem=new Qt(this._layoutManager,a,this._dummyGroundContainer),this.createDragListener()}destroy(){this.removeDragListener()}createDragListener(){this.removeDragListener(),this._dragListener=new Zt(this._element,this._extraAllowableChildTargets),this._dragListener.on("dragStart",((t,e)=>this.onDragStart(t,e))),this._dragListener.on("dragStop",(()=>this.onDragStop()))}onDragStart(t,e){var n;const i="component";let o;if("function"==typeof this._componentTypeOrFtn){const t=this._componentTypeOrFtn();o=se.isDragSourceComponentItemConfig(t)?{type:i,componentState:t.state,componentType:t.type,title:null!==(n=t.title)&&void 0!==n?n:this._title}:t}else o={type:i,componentState:this._componentState,componentType:this._componentTypeOrFtn,title:this._title,id:this._id};const r=St.resolve(o,!1),s=new Yt(this._layoutManager,r,this._dummyGroundContentItem);if(this._dummyGroundContentItem.contentItems.push(s),null===this._dragListener)throw new tt("DSODSD66746");{const n=new re(t,e,this._dragListener,this._layoutManager,s,this._dummyGroundContentItem),i=this._layoutManager.transitionIndicator;if(null===i)throw new tt("DSODST66746");i.transitionElements(this._element,n.element)}}onDragStop(){this.createDragListener()}removeDragListener(){null!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=null)}}!function(t){t.isDragSourceComponentItemConfig=function(t){return!("componentType"in t)}}(se||(se={}));class ae{constructor(){this._element=document.createElement("div"),this._element.classList.add("lm_dropTargetIndicator");const t=document.createElement("div");t.classList.add("lm_inner"),this._element.appendChild(t),document.body.appendChild(this._element)}destroy(){this._element.remove()}highlightArea(t,e){this._element.style.left=Ot(t.x1+e),this._element.style.top=Ot(t.y1+e),this._element.style.width=Ot(t.x2-t.x1-e),this._element.style.height=Ot(t.y2-t.y1-e),this._element.style.display="block"}hide(){zt(this._element,!1)}}class ce{constructor(){this._element=document.createElement("div"),this._element.classList.add("lm_transition_indicator"),document.body.appendChild(this._element),this._toElement=null,this._fromDimensions=null,this._totalAnimationDuration=200,this._animationStartTime=null}destroy(){this._element.remove()}transitionElements(t,e){}nextAnimationFrame(){}measure(t){const e=t.getBoundingClientRect();return{left:e.left,top:e.top,width:t.offsetWidth,height:t.offsetHeight}}}class de extends Ht{constructor(t){super(),this._layoutManager=t,this._childEventListener=t=>this.onEventFromChild(t),globalThis.addEventListener(de.ChildEventName,this._childEventListener,{passive:!0})}emit(t,...e){"userBroadcast"===t?this.emitUserBroadcast(...e):super.emit(t,...e)}emitUserBroadcast(...t){this.handleUserBroadcastEvent("userBroadcast",t)}destroy(){globalThis.removeEventListener(de.ChildEventName,this._childEventListener)}handleUserBroadcastEvent(t,e){this._layoutManager.isSubWindow?this.propagateToParent(t,e):this.propagateToThisAndSubtree(t,e)}onEventFromChild(t){const e=t.detail;this.handleUserBroadcastEvent(e.eventName,e.args)}propagateToParent(t,e){const n={bubbles:!0,cancelable:!0,detail:{layoutManager:this._layoutManager,eventName:t,args:e}},i=new CustomEvent(de.ChildEventName,n),o=globalThis.opener;if(null===o)throw new tt("EHPTP15778");o.dispatchEvent(i)}propagateToThisAndSubtree(t,e){this.emitUnknown(t,...e);for(let n=0;nthis.handleContainerResize())),this._windowBeforeUnloadListener=()=>this.onBeforeUnload(),this._windowBeforeUnloadListening=!1,this._maximisedStackBeforeDestroyedListener=t=>this.cleanupBeforeMaximisedStackDestroyed(t),this.isSubWindow=t.isSubWindow,this._constructorOrSubWindowLayoutConfig=t.constructorOrSubWindowLayoutConfig,nt.checkInitialise(),pt.checkInitialise(),void 0!==t.containerElement&&(this._containerElement=t.containerElement)}get container(){return this._containerElement}get isInitialised(){return this._isInitialised}get groundItem(){return this._groundItem}get root(){return this._groundItem}get openPopouts(){return this._openPopouts}get dropTargetIndicator(){return this._dropTargetIndicator}get transitionIndicator(){return this._transitionIndicator}get width(){return this._width}get height(){return this._height}get eventHub(){return this._eventHub}get rootItem(){if(void 0===this._groundItem)throw new Error("Cannot access rootItem before init");return 0===this._groundItem.contentItems.length?void 0:this._groundItem.contentItems[0]}get focusedComponentItem(){return this._focusedComponentItem}get tabDropPlaceholder(){return this._tabDropPlaceholder}get maximisedStack(){return this._maximisedStack}get deprecatedConstructor(){return!this.isSubWindow&&void 0!==this._constructorOrSubWindowLayoutConfig}destroy(){if(this._isInitialised){this._windowBeforeUnloadListening&&(globalThis.removeEventListener("beforeunload",this._windowBeforeUnloadListener),this._windowBeforeUnloadListening=!1),!0===this.layoutConfig.settings.closePopoutsOnUnload&&this.closeAllOpenPopouts(),this._resizeObserver.disconnect(),this.checkClearResizeTimeout(),void 0!==this._groundItem&&this._groundItem.destroy(),this._tabDropPlaceholder.remove(),null!==this._dropTargetIndicator&&this._dropTargetIndicator.destroy(),null!==this._transitionIndicator&&this._transitionIndicator.destroy(),this._eventHub.destroy();for(const t of this._dragSources)t.destroy();this._dragSources=[],this._isInitialised=!1}}minifyConfig(t){return bt.minifyConfig(t)}unminifyConfig(t){return bt.unminifyConfig(t)}init(){let t;if(this.setContainer(),this._dropTargetIndicator=new ae,this._transitionIndicator=new ce,this.updateSizeFromContainer(),this.isSubWindow){if(void 0===this._constructorOrSubWindowLayoutConfig)throw new et("LMIU07155");{const e=this._constructorOrSubWindowLayoutConfig.root;if(void 0===e)throw new X("LMIC07156");if(!It.isComponent(e))throw new X("LMIC07157");t=e;const n=Mt.resolve(this._constructorOrSubWindowLayoutConfig);this.layoutConfig=Object.assign(Object.assign({},n),{root:void 0})}}else void 0===this._constructorOrSubWindowLayoutConfig?this.layoutConfig=bt.createDefault():this.layoutConfig=Mt.resolve(this._constructorOrSubWindowLayoutConfig);const e=this.layoutConfig;this._groundItem=new Qt(this,e.root,this._containerElement),this._groundItem.init(),this.checkLoadedLayoutMaximiseItem(),this._resizeObserver.observe(this._containerElement),this._isInitialised=!0,this.adjustColumnsResponsive(),this.emit("initialised"),void 0!==t&&this.loadComponentAsRoot(t)}loadLayout(t){if(!this.isInitialised)throw new Error("GoldenLayout: Need to call init() if LayoutConfig with defined root passed to constructor");if(void 0===this._groundItem)throw new et("LMLL11119");this.createSubWindows(),this.layoutConfig=Mt.resolve(t),this._groundItem.loadRoot(this.layoutConfig.root),this.checkLoadedLayoutMaximiseItem(),this.adjustColumnsResponsive()}saveLayout(){if(!1===this._isInitialised)throw new Error("Can't create config, layout not yet initialised");if(void 0===this._groundItem)throw new et("LMTC18244");{const t=this._groundItem.calculateConfigContent();let e;e=1!==t.length?void 0:t[0],this.reconcilePopoutWindows();const n=[];for(let t=0;t=0?i=this._groundItem.contentItems[0]:e=0;break;case ht.row:case ht.column:e=i.addItem(t,n.index);break;case ht.stack:if(It.isComponent(t)){e=i.addItem(t,n.index);break}throw Error(it[6]);case ht.component:throw new X("LMAIALC87444602");default:throw new Q("LMAIALU98881733",i.type)}if(It.isComponent(t)){const t=i.contentItems[e];qt.isStack(t)&&(i=t,e=0)}return n.parentItem=i,n.index=e,n}}}loadComponentAsRoot(t){if(void 0===this._groundItem)throw new Error("Cannot add item before init");this._groundItem.loadComponentAsRoot(t)}updateSize(t,e){this.setSize(t,e)}setSize(t,e){if(this._width=t,this._height=e,!0===this._isInitialised){if(void 0===this._groundItem)throw new et("LMUS18881");if(this._groundItem.setSize(this._width,this._height),this._maximisedStack){const{width:t,height:e}=Bt(this._containerElement);kt(this._maximisedStack.element,t),jt(this._maximisedStack.element,e),this._maximisedStack.updateSize(!1)}this.adjustColumnsResponsive()}}beginSizeInvalidation(){this._sizeInvalidationBeginCount++}endSizeInvalidation(){0==--this._sizeInvalidationBeginCount&&this.updateSizeFromContainer()}updateSizeFromContainer(){const{width:t,height:e}=Bt(this._containerElement);this.setSize(t,e)}updateRootSize(t=!1){if(void 0===this._groundItem)throw new et("LMURS28881");this._groundItem.updateSize(t)}createAndInitContentItem(t,e){const n=this.createContentItem(t,e);return n.init(),n}createContentItem(t,e){if("string"!=typeof t.type)throw new q("Missing parameter 'type'",JSON.stringify(t));return!ft.isComponentItem(t)||e instanceof oe||!e||!0===this.isSubWindow&&e instanceof Qt||(t={type:ht.stack,content:[t],size:t.size,sizeUnit:t.sizeUnit,minSize:t.minSize,minSizeUnit:t.minSizeUnit,id:t.id,maximised:t.maximised,isClosable:t.isClosable,activeItemIndex:0,header:void 0}),this.createContentItemFromConfig(t,e)}findFirstComponentItemById(t){if(void 0===this._groundItem)throw new et("LMFFCIBI82446");return this.findFirstContentItemTypeByIdRecursive(ht.component,t,this._groundItem)}createPopout(t,e,n,i){return t instanceof qt?this.createPopoutFromContentItem(t,e,n,i):this.createPopoutFromItemConfig(t,e,n,i)}createPopoutFromContentItem(t,e,n,i){let o=t.parent,r=t;for(;null!==o&&1===o.contentItems.length&&!o.isGround;)r=o,o=o.parent;if(null===o)throw new tt("LMCPFCI00834");{if(void 0===i&&(i=o.contentItems.indexOf(r)),null!==n&&o.addPopInParentId(n),void 0===e){const n=globalThis.screenX||globalThis.screenLeft,i=globalThis.screenY||globalThis.screenTop,o=t.element.offsetLeft,r=t.element.offsetTop,{width:s,height:a}=Bt(t.element);e={left:n+o,top:i+r,width:s,height:a}}const s=t.toConfig();if(t.remove(),vt.isRootItemConfig(s))return this.createPopoutFromItemConfig(s,e,n,i);throw new Error(`${it[0]}`)}}beginVirtualSizedContainerAdding(){0==++this._virtualSizedContainerAddingBeginCount&&(this._virtualSizedContainers.length=0)}addVirtualSizedContainer(t){this._virtualSizedContainers.push(t)}endVirtualSizedContainerAdding(){if(0==--this._virtualSizedContainerAddingBeginCount){const t=this._virtualSizedContainers.length;if(t>0){this.fireBeforeVirtualRectingEvent(t);for(let e=0;ethis.emit("windowOpened",a))),a.on("closed",(()=>this.reconcilePopoutWindows())),this._openPopouts.push(a),this.layoutConfig.settings.closePopoutsOnUnload&&!this._windowBeforeUnloadListening&&(globalThis.addEventListener("beforeunload",this._windowBeforeUnloadListener,{passive:!0}),this._windowBeforeUnloadListening=!0),a}closeAllOpenPopouts(){for(let t=0;tglobalThis.close()),1)}getArea(t,e){let n=null,i=1/0;for(let o=0;o=r.x1&&t=r.y1&&er.surface&&(i=r.surface,n=r)}return n}calculateItemAreas(){const t=this.getAllContentItems(),e=this._groundItem;if(void 0===e)throw new et("LMCIAR44365");if(1!==t.length){e.contentItems[0].isStack?this._itemAreas=[]:this._itemAreas=e.createSideAreas();for(let e=0;e0){let e=t[0];if(qt.isComponentItem(e)){const t=e.parent;if(null===t)throw new tt("LMXLLMI69999");e=t}if(!qt.isStack(e))throw new X("LMCLLMI19993");e.maximise()}}}processMaximiseStack(t){if(this._maximisedStack=t,t.on("beforeItemDestroyed",this._maximisedStackBeforeDestroyedListener),t.element.classList.add("lm_maximised"),t.element.insertAdjacentElement("afterend",this._maximisePlaceholder),void 0===this._groundItem)throw new et("LMMXI19993");{this._groundItem.element.prepend(t.element);const{width:e,height:n}=Bt(this._containerElement);kt(t.element,e),jt(t.element,n),t.updateSize(!0),t.focusActiveContentItem(),this._maximisedStack.emit("maximised"),this.emit("stateChanged")}}processMinimiseMaximisedStack(){if(void 0===this._maximisedStack)throw new X("LMMMS74422");{const t=this._maximisedStack;if(null===t.parent)throw new tt("LMMI13668");t.element.classList.remove("lm_maximised"),this._maximisePlaceholder.insertAdjacentElement("afterend",t.element),this._maximisePlaceholder.remove(),this.updateRootSize(!0),this._maximisedStack=void 0,t.off("beforeItemDestroyed",this._maximisedStackBeforeDestroyedListener),t.emit("minimised"),this.emit("stateChanged")}}reconcilePopoutWindows(){const t=[];for(let e=0;e{this._resizeTimeoutId=void 0,this.beginSizeInvalidation(),this.endSizeInvalidation()}),this.resizeDebounceInterval))}checkClearResizeTimeout(){void 0!==this._resizeTimeoutId&&(clearTimeout(this._resizeTimeoutId),this._resizeTimeoutId=void 0)}setContainer(){var t;const e=document.body,n=null!==(t=this._containerElement)&&void 0!==t?t:e;if(n===e){this.resizeWithContainerAutomatically=!0;const t=document.documentElement;t.style.height="100%",t.style.margin="0",t.style.padding="0",t.style.overflow="clip",e.style.height="100%",e.style.margin="0",e.style.padding="0",e.style.overflow="clip"}this._containerElement=n}onBeforeUnload(){this.destroy()}adjustColumnsResponsive(){if(void 0===this._groundItem)throw new et("LMACR20883");if(this._firstLoad=!1,this.useResponsiveLayout()&&!this._updatingColumnsResponsive&&this._groundItem.contentItems.length>0&&this._groundItem.contentItems[0].isRow){if(void 0===this._groundItem||null===this._width)throw new et("LMACR77412");{const t=this._groundItem.contentItems[0].contentItems.length;if(t<=1)return;{const e=this.layoutConfig.dimensions.defaultMinItemWidth;if(t*e<=this._width)return;{this._updatingColumnsResponsive=!0;const n=t-Math.max(Math.floor(this._width/e),1),i=this._groundItem.contentItems[0],o=this.getAllStacks();if(0===o.length)throw new X("LMACRS77413");{const t=o[0];for(let e=0;ei?void 0:{parentItem:t,index:o}}}case 1:if(void 0===this._focusedComponentItem)return;{const t=this._focusedComponentItem.parentItem;return this.tryCreateLocationFromParentItem(t,e)}case 2:{const t=this.findFirstContentItemType(ht.stack);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 3:{let t=this.findFirstContentItemType(ht.row);return void 0!==t?this.tryCreateLocationFromParentItem(t,e):(t=this.findFirstContentItemType(ht.column),void 0!==t?this.tryCreateLocationFromParentItem(t,e):void 0)}case 4:{const t=this.findFirstContentItemType(ht.row);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 5:{const t=this.findFirstContentItemType(ht.column);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 6:if(void 0===this._groundItem)throw new et("LMFLRIF18244");return void 0!==this.rootItem?void 0:void 0===e||0===e?{parentItem:this._groundItem,index:0}:void 0;case 7:if(void 0===this._groundItem)throw new et("LMFLF18244");{const t=this._groundItem.contentItems;if(0===t.length)return void 0===e||0===e?{parentItem:this._groundItem,index:0}:void 0;{const n=t[0];return this.tryCreateLocationFromParentItem(n,e)}}}}tryCreateLocationFromParentItem(t,e){const n=t.contentItems.length;return void 0===e?{parentItem:t,index:n}:e<0||e>n?void 0:{parentItem:t,index:e}}}!function(t){t.createMaximisePlaceElement=function(t){const e=t.createElement("div");return e.classList.add("lm_maximise_place"),e},t.createTabDropPlaceholderElement=function(t){const e=t.createElement("div");return e.classList.add("lm_drop_tab_placeholder"),e},t.defaultLocationSelectors=[{typeId:1,index:void 0},{typeId:2,index:void 0},{typeId:3,index:void 0},{typeId:7,index:void 0}],t.afterFocusedItemIfPossibleLocationSelectors=[{typeId:0,index:1},{typeId:2,index:void 0},{typeId:3,index:void 0},{typeId:7,index:void 0}]}(he||(he={}));class le extends he{constructor(t,e,n,i){if(super(le.createLayoutManagerConstructorParameters(t,e)),this._bindComponentEventHanlderPassedInConstructor=!1,this._creationTimeoutPassed=!1,void 0!==e&&"function"==typeof e&&(this.bindComponentEvent=e,this._bindComponentEventHanlderPassedInConstructor=!0,void 0!==n&&(this.unbindComponentEvent=n)),!this._bindComponentEventHanlderPassedInConstructor&&this.isSubWindow){if(void 0===this._constructorOrSubWindowLayoutConfig)throw new et("VLC98823");{const t=Mt.resolve(this._constructorOrSubWindowLayoutConfig);this.layoutConfig=Object.assign(Object.assign({},t),{root:void 0})}}!0!==i&&(this.deprecatedConstructor||this.init())}destroy(){this.bindComponentEvent=void 0,this.unbindComponentEvent=void 0,super.destroy()}init(){if(this._bindComponentEventHanlderPassedInConstructor||"loading"!==document.readyState&&null!==document.body){if(!this._bindComponentEventHanlderPassedInConstructor&&!0===this.isSubWindow&&!this._creationTimeoutPassed)return setTimeout((()=>this.init()),7),void(this._creationTimeoutPassed=!0);!0===this.isSubWindow&&(this._bindComponentEventHanlderPassedInConstructor||this.clearHtmlAndAdjustStylesForSubWindow(),window.__glInstance=this),super.init()}else document.addEventListener("DOMContentLoaded",(()=>this.init()),{passive:!0})}clearHtmlAndAdjustStylesForSubWindow(){const t=document.head,e=new Array(4);e[0]=document.querySelectorAll("body link"),e[1]=document.querySelectorAll("body style"),e[2]=document.querySelectorAll("template"),e[3]=document.querySelectorAll(".gl_keep");for(let n=0;nthis.emit("popIn"))),document.body.appendChild(t),!0}}bindComponent(t,e){if(void 0!==this.bindComponentEvent)return this.bindComponentEvent(t,e);if(void 0!==this.getComponentEvent)return{virtual:!1,component:this.getComponentEvent(t,e)};{const t=`${it[2]}: ${JSON.stringify(e)}`;throw new Z(t)}}unbindComponent(t,e,n){if(void 0!==this.unbindComponentEvent)this.unbindComponentEvent(t);else if(!e&&void 0!==this.releaseComponentEvent){if(void 0===n)throw new et("VCUCRCU333998");this.releaseComponentEvent(t,n)}}}!function(t){let e=!1;t.createLayoutManagerConstructorParameters=function(t,n){const i=e?null:new URL(document.location.href).searchParams.get("gl-window");e=!0;const o=null!==i;let r,s;if(null!==i){const e=localStorage.getItem(i);if(null===e)throw new Error("Null gl-window Config");localStorage.removeItem(i);const n=JSON.parse(e),o=bt.unminifyConfig(n);s=Mt.fromResolved(o),t instanceof HTMLElement&&(r=t)}else void 0===t?s=void 0:t instanceof HTMLElement?(s=void 0,r=t):s=t,void 0===r&&n instanceof HTMLElement&&(r=n);return{constructorOrSubWindowLayoutConfig:s,isSubWindow:o,containerElement:r}}}(le||(le={}));class ue extends le{constructor(t,e,n){super(t,e,n,!0),this._componentTypesMap=new Map,this._registeredComponentMap=new Map,this._virtuableComponentMap=new Map,this._containerVirtualRectingRequiredEventListener=(t,e,n)=>this.handleContainerVirtualRectingRequiredEvent(t,e,n),this._containerVirtualVisibilityChangeRequiredEventListener=(t,e)=>this.handleContainerVirtualVisibilityChangeRequiredEvent(t,e),this._containerVirtualZIndexChangeRequiredEventListener=(t,e,n)=>this.handleContainerVirtualZIndexChangeRequiredEvent(t,e,n),this.deprecatedConstructor||this.init()}registerComponent(t,e,n=!1){if("function"!=typeof e)throw new K("registerComponent() componentConstructorOrFactoryFtn parameter is not a function");if(e.hasOwnProperty("prototype")){const i=e;this.registerComponentConstructor(t,i,n)}else{const i=e;this.registerComponentFactoryFunction(t,i,n)}}registerComponentConstructor(t,e,n=!1){if("function"!=typeof e)throw new Error(it[1]);if(void 0!==this._componentTypesMap.get(t))throw new Z(`${it[3]}: ${t}`);this._componentTypesMap.set(t,{constructor:e,factoryFunction:void 0,virtual:n})}registerComponentFactoryFunction(t,e,n=!1){if("function"!=typeof e)throw new Z("Please register a constructor function");if(void 0!==this._componentTypesMap.get(t))throw new Z(`${it[3]}: ${t}`);this._componentTypesMap.set(t,{constructor:void 0,factoryFunction:e,virtual:n})}registerComponentFunction(t){this.registerGetComponentConstructorCallback(t)}registerGetComponentConstructorCallback(t){if("function"!=typeof t)throw new Error("Please register a callback function");void 0!==this._getComponentConstructorFtn&&console.warn("Multiple component functions are being registered. Only the final registered function will be used."),this._getComponentConstructorFtn=t}getRegisteredComponentTypeNames(){const t=this._componentTypesMap.keys();return Array.from(t)}getComponentInstantiator(t){let e;const n=yt.resolveComponentTypeName(t);return void 0!==n&&(e=this._componentTypesMap.get(n)),void 0===e&&void 0!==this._getComponentConstructorFtn&&(e={constructor:this._getComponentConstructorFtn(t),factoryFunction:void 0,virtual:!1}),e}bindComponent(t,e){let n;const i=yt.resolveComponentTypeName(e);let o;if(void 0!==i&&(n=this._componentTypesMap.get(i)),void 0===n&&void 0!==this._getComponentConstructorFtn&&(n={constructor:this._getComponentConstructorFtn(e),factoryFunction:void 0,virtual:!1}),void 0!==n){const r=n.virtual;let s,a;s=void 0===e.componentState?void 0:Dt({},e.componentState);const c=n.constructor;if(void 0!==c)a=new c(t,s,r);else{const e=n.factoryFunction;if(void 0===e)throw new X("LMBCFFU10008");a=e(t,s,r)}if(r){if(void 0===a)throw new et("GLBCVCU988774");{const e=a,n=e.rootHtmlElement;if(void 0===n)throw new Z(`${it[5]}: ${i}`);!function(t){const e="absolute";t.style.position!==e&&(t.style.position=e)}(n),this.container.appendChild(n),this._virtuableComponentMap.set(t,e),t.virtualRectingRequiredEvent=this._containerVirtualRectingRequiredEventListener,t.virtualVisibilityChangeRequiredEvent=this._containerVirtualVisibilityChangeRequiredEventListener,t.virtualZIndexChangeRequiredEvent=this._containerVirtualZIndexChangeRequiredEventListener}}this._registeredComponentMap.set(t,a),o={virtual:n.virtual,component:a}}else o=super.bindComponent(t,e);return o}unbindComponent(t,e,n){if(void 0===this._registeredComponentMap.get(t))super.unbindComponent(t,e,n);else{const e=this._virtuableComponentMap.get(t);if(void 0!==e){const n=e.rootHtmlElement;if(void 0===n)throw new X("GLUC77743",t.title);this.container.removeChild(n),this._virtuableComponentMap.delete(t)}}}fireBeforeVirtualRectingEvent(t){this._goldenLayoutBoundingClientRect=this.container.getBoundingClientRect(),super.fireBeforeVirtualRectingEvent(t)}handleContainerVirtualRectingRequiredEvent(t,e,n){const i=this._virtuableComponentMap.get(t);if(void 0===i)throw new et("GLHCSCE55933");{const o=i.rootHtmlElement;if(void 0===o)throw new Z(it[4]+" "+t.title);{const i=t.element.getBoundingClientRect(),r=i.left-this._goldenLayoutBoundingClientRect.left;o.style.left=Ot(r);const s=i.top-this._goldenLayoutBoundingClientRect.top;o.style.top=Ot(s),kt(o,e),jt(o,n)}}}handleContainerVirtualVisibilityChangeRequiredEvent(t,e){const n=this._virtuableComponentMap.get(t);if(void 0===n)throw new et("GLHCVVCRE55934");{const i=n.rootHtmlElement;if(void 0===i)throw new Z(it[4]+" "+t.title);zt(i,e)}}handleContainerVirtualZIndexChangeRequiredEvent(t,e,n){const i=this._virtuableComponentMap.get(t);if(void 0===i)throw new et("GLHCVZICRE55935");{const e=i.rootHtmlElement;if(void 0===e)throw new Z(it[4]+" "+t.title);e.style.zIndex=n}}}const pe="initial_",fe={show:"top",popout:!1,maximise:!1,close:"close-tab-unused"},me={headerHeight:31},we={hasHeaders:!0,reorderEnabled:!0},ye={popoutWholeStack:!1,constrainDragToContainer:!1,constrainDragToHeaders:!1,preventDragout:!1,showMaximiseIcon:!1,showPopoutIcon:!1,showCloseIcon:!1,blockedPopoutsThrowError:!0,closePopoutsOnUnload:!0,selectionEnabled:!1};var ge,ve;class Ce{constructor(t){this.layout=t,ge.set(this,void 0),ve.set(this,void 0),this.handleResize=t=>{t.forEach((t=>this.resizeElement(t.target)))},this.handleMutation=()=>{this.layout.viewComponentsByContainerElement.forEach((t=>{this.resizeElement(t.container.element)}))},i.__classPrivateFieldSet(this,ge,new ResizeObserver(this.handleResize),"f"),i.__classPrivateFieldSet(this,ve,new MutationObserver(this.handleMutation),"f")}observeMutations(t){i.__classPrivateFieldGet(this,ve,"f")?.observe(t,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["class"]})}destroy(){i.__classPrivateFieldGet(this,ge,"f").disconnect(),i.__classPrivateFieldGet(this,ve,"f").disconnect()}observeContainer(t){i.__classPrivateFieldGet(this,ge,"f").observe(t)}unobserveContainer(t){i.__classPrivateFieldGet(this,ge,"f").unobserve(t)}resizeElement(t){const e=this.layout.viewComponentsByContainerElement.get(t);e&&e.resize()}}ge=new WeakMap,ve=new WeakMap;var be={};Object.defineProperty(be,"__esModule",{value:!0});var _e=be.BaseItem=void 0;class Ie{constructor(t,e,n){this._item=t,this._layout=e,this._wrap=n}get raw(){return this._item}get layout(){return this._layout}get type(){return this._item.type}get contentItems(){return(this._item.contentItems??[]).map((t=>this._wrap(t)))}get parent(){const t=this._item.parent;return t?this._wrap(t):null}setActiveContentItem(t,e){if("stack"!==this.type)throw new Error(`Cannot call setActiveContentItem from a non-stack item: ${this.type}`);this._item.setActiveContentItem(t.raw,e)}static wrapInternal(t,e,n){const i=Ie.wrapCache.get(e);if(i)return i;const o=new t(e,n,(e=>Ie.wrapInternal(t,e,n)));return Ie.wrapCache.set(e,o),o}}_e=be.BaseItem=Ie,Ie.wrapCache=new WeakMap;const Ee=t=>!!t&&"contentItems"in t&&(t.isRow||t.isColumn);class xe extends _e{isRoot(){return!!this._item.parent?.isGround}getBounds(){return this._item.element.getBoundingClientRect()}get viewName(){if(this._item.isComponent){const{component:t}=this._item;return t.identity.name}throw new Error("View name not found")}onDestroyed(t){const e=({target:n})=>{n===this._item&&(t(),this._item.off("itemDestroyed",e))};this._item.on("itemDestroyed",e)}createAdjacentStack({position:t="right"}={}){const e=this.raw;if(oe.isStack(e)&&e.parent){const n=["top","bottom"].includes(t)?"column":"row",i=["left","top"].includes(t)?1:0,o=Ee(e.parent)?e.parent:e.layoutManager,r=o,s=e.parent.contentItems.indexOf(e);e.parent.isGround&&e.parent.removeChild(e,!0);const a=o.newItem({type:n,content:[{type:"stack",content:[]}]},s);if(!a)throw new Error("createAdjacentStack: Failed to create new container");const c=a.contentItems[0];return a.addChild(this.raw,i),Ee(r)&&r.removeChild(e,!0),this._wrap(c)}throw new Error(`Cannot creat adjacent stacks for type: ${e.type}, must be type 'stack'`)}setActiveContentItem(t,e=!0){if(!oe.isStack(this._item))throw new Error(`Cannot call setActiveContentItem from a non-stack item: ${this.type}`);this._item.setActiveComponentItem(t.raw,!e)}static wrap(t,e){return _e.wrapInternal(xe,t,e)}}function Se(t=[],e){for(const n of t)"component"===n.type?Object.keys(e).forEach((t=>{t in n&&(n.componentState={[`${pe}${t}`]:n[t],...n.componentState}),n[t]=e[t]})):Se(n.content,e)}function Ae(t=[],e,n){for(const i of t)"component"===i.type?Object.keys(e).forEach((t=>{if(`${pe}${t}`in i.componentState)return i[t]=i.componentState[`${pe}${t}`],void delete i.componentState[`${pe}${t}`];i[t]=e[t]})):(!i.size||"row"!==n&&"column"!==n||(i["row"===n?"width":"height"]=i.size?.includes(".")?parseFloat(i.size):parseInt(i.size)),Ae(i.content,e,i.type))}function Pe(t){if(t.root){t.root.content&&Ae([t.root],{componentName:"view",isClosable:!0});const e=t.root;t.content=[e],delete t.root}return t}class Me{static create(t){const e=document.createElement("of-view");return Object.entries(t).forEach((([t,n])=>{e.setAttribute(t,n)})),e}}customElements.define("of-view",(t=>class extends t{connectedCallback(){if(!this.name||!this.uuid)throw new Error(" Name or uuid attribute missing");if(!this.src)throw new Error(" missing 'src' attribute.");this.#t||(this.#t=document.createElement("iframe"),this.#t.src=this.src,this.#t.style.height="100%",this.#t.style.width="100%",this.#t.style.border="none",this.forceFrameName?this.#t.setAttribute("name",this.forceFrameName):this.#t.setAttribute("name",i.encodeOptions({brokerUrl:this.brokerUrl,name:this.name,uuid:this.uuid,providerId:this.providerId,contextGroup:this.contextGroup},"of-frame")),this.#t.setAttribute("id",this.name),this.appendChild(this.#t))}#t;get brokerUrl(){return this.getAttribute("of-broker")}set brokerUrl(t){t&&this.setAttribute("of-broker",t)}get name(){return this.getAttribute("of-name")}set name(t){t&&this.setAttribute("of-name",t)}get forceFrameName(){return this.getAttribute("forceFrameName")}set forceFrameName(t){t&&this.setAttribute("forceFrameName",t)}get uuid(){return this.getAttribute("of-uuid")}set uuid(t){t&&this.setAttribute("of-uuid",t)}get src(){return this.getAttribute("src")}set src(t){t&&this.setAttribute("src",t)}get providerId(){return this.getAttribute("of-provider-id")}set providerId(t){t&&this.setAttribute("of-provider-id",t)}get contextGroup(){return this.getAttribute("of-context-group")}set contextGroup(t){t&&this.setAttribute("of-context-group",t)}static get observedAttributes(){return["name"]}})(HTMLElement));class Le{constructor(t,e,n,{brokerUrl:i,interopConfig:r},s){this.container=t,this.config=e,this.ofView=null,this.isDragging=()=>this.container.tab.element?.className.includes("lm_dragging")??!1;const{url:a,web:c,interop:d,name:h}=e||{},l=h??`internal-generated-view-${o.v4()}`;if(this.identity={uuid:n,name:l},this.container.element.setAttribute("of-name",l),this.container.element.id=`container-${l}`,this.container.parent.id=l,void 0===a)return void this.handleUrlMissing();const u=this.updateTitleIfNotSet(a),p={"of-broker":i,"of-uuid":n,"of-name":l,src:a};c?.frameName&&(p.forceFrameName=c.frameName);const f=d?.currentContextGroup??r?.currentContextGroup;f&&(p["of-context-group"]=f),r?.providerId&&(p["of-provider-id"]=r?.providerId),this.ofView=Me.create(p),this.ofView.title=u??`Iframe: ${a}`,s.appendChild(this.ofView),this.ofView.style.position="absolute"}updateTitleIfNotSet(t){return"view"===this.container.parent.title&&this.container.parent.setTitle(t),this.container.parent.title}handleUrlMissing(){const t=document.createElement("div");t.setAttribute("style","padding: 20px"),t.innerText="No URL provided",this.container.element.appendChild(t)}destroy(){this.ofView?.remove(),this.ofView=null}closeView(){this.container.close()}resize(){if(this.ofView){if(this.isDragging())return void(this.ofView.style.display="none");const t=this.container.element.getBoundingClientRect();this.ofView.style.position="absolute",this.ofView.style.height=`${t.height}px`,this.ofView.style.width=`${t.width}px`,this.ofView.style.inset=`${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`,this.ofView.style.display="block"}}}class Oe extends D{static overrideConfig(t){const e={...we,...t.settings,...ye};return e.reorderEnabled?Se(t.content,{isClosable:!0}):Se(t.content,{reorderEnabled:!1}),{dimensions:me,...t,settings:e,header:{...fe,show:!1!==t.settings?.hasHeaders&&fe.show}}}constructor(t,e,n,{options:i},o,r){super(),this.identity=t,this.container=e,this.initialConfig=n,this.layoutManager=o,this.platformProvider=r,this.viewComponentsByContainerElement=new Map,this.layoutContentCache=b.getSingleInstance(),this.reparentingViews=new Set,this.goldenLayoutDestroyed=!1,this.createViewComponent=(t,e)=>{m.handleSharedView(this.layoutManager,this.identity,e);const n=new Le(t,e,this.identity.uuid,this.options,this.iframeContainer);return e&&!1===e[`${pe}isClosable`]&&this.stylesheet.insertRule(`#tab-${n.identity.name} .lm_close_tab { display: none; }`),this.viewComponentsByContainerElement.set(t.element,n),this.resizeController.observeContainer(t.element),n},this.iframeContainer=document.createElement("div"),this.iframeContainer.id=`openfin-layout-iframe-container-${this.identity.layoutName}`,this.domEmitter=new W(e),this.setupStylesheets(),this.layout=new ue(this.container),this.layout.resizeWithContainerAutomatically=!0,this.options=i,this.layout.registerComponent("view",this.createViewComponent),this.setupListeners(),this.resizeController=new Ce(this),this.layout.loadLayout(Oe.overrideConfig(n));const s=document.createElement("div");s.id=`openfin-layout-shadow-container-${this.identity.layoutName}`,s.attachShadow({mode:"open",delegatesFocus:!1}).appendChild(this.iframeContainer),this.container.appendChild(s),this.resizeController.observeMutations(this.container)}getStackByView({name:t}){const e=this.layout.findFirstComponentItemById(t);if(e?.parent&&e?.parent?.isStack)return xe.wrap(e.parent,this)}getRoot(){return xe.wrap(this.layout.rootItem,this)}async platformCloseView(t){const e=[...this.viewComponentsByContainerElement.values()].find((e=>e.identity.name===t.name));if(!e)throw new Error(`View with name: ${t.name} not found in layout.`);e.closeView()}async platformCreateView(t,{location:e,targetView:n}={}){if(n)throw new Error("TargetView not supported in web");const i={options:this.platformProvider.normalizeOptions(t),target:this.identity,location:e};return this.insertView(i)}setupStylesheets(){if(this.container.setAttribute("data-openfin-layout-name",this.identity.layoutName),this.stylesheet=new CSSStyleSheet,this.stylesheet.insertRule(".lm_close { display: none; }"),document.adoptedStyleSheets.push(this.stylesheet),this.initialConfig.settings?.preventSplitterResize){const t=`\n [data-openfin-layout-name='${this.identity.layoutName}'] .lm_splitter {\n pointer-events: none;\n }`;this.stylesheet.insertRule(t)}}insertView({options:t,location:e,targetView:n}){const i=e?this.layoutContentCache.getItemOrUndefined(e.id):void 0,o=n?this.layoutContentCache.getItemOrUndefined(n.name):void 0,r=i??o??xe.wrap(this.layout.rootItem,this);let s;if(oe.isStack(r.raw))s=r.raw;else{if(!Ee(r.raw))throw new Error("Cannot add a view at the requested location");s=r.raw.newItem({type:"stack",content:[]})}const a=Math.min(s.contentItems.length,e?.index??s.contentItems.length);let c=this.layout.findFirstComponentItemById(t.name);c?(c.parent&&c.parent.removeChild(c,!0),s.addChild(c,a)):c=s.newComponent("view",t,t.title??t.url??"Default Title",a);const d=c.component.identity;return Promise.resolve({identity:d})}replaceView({viewToReplace:t,newView:e}){throw new Error("Method not implemented.")}replaceLayout(t){throw new Error("Method not implemented.")}async cleanupView(t){}applyPreset(t){throw new Error("Method not implemented.")}getCurrentViews(){return[...this.viewComponentsByContainerElement.values()].map((t=>t.identity))}async getFrameSnapshot(){return Pe(Mt.fromResolved(this.layout.toConfig()))}isVisible(){return H(this.container)}async onViewDetached({viewIdentity:t}){this.reparentingViews.add(t.name),this.platformCloseView(t)}async destroy(){this.goldenLayoutDestroyed||(this.goldenLayoutDestroyed=!0,this.layout.destroy()),this.iframeContainer.remove(),this.resizeController.destroy(),document.adoptedStyleSheets=document.adoptedStyleSheets.filter((t=>t!==this.stylesheet)),this.viewComponentsByContainerElement.clear()}setupListeners(){this.container.addEventListener("pointerdown",(t=>{if(t.target instanceof HTMLElement){const e=t.target.classList;["lm_tab","lm_title","lm_splitter","lm_drag_handle"].some((t=>e.contains(t)))&&(this.handleDragStart(),2===t.button&&t.stopPropagation())}}),!0),document.addEventListener("pointerup",(()=>this.handleDragEnd()),!0),this.layout.on("tabCreated",(t=>{const e=t.componentItem.component;t.element.id=`tab-${e.identity.name}`,this.domEmitter.dispatchLocalEvent("tab-created",e.identity)})),this.layout.on("itemCreated",(({target:t})=>{const e=t;if(qt.isComponentItem(e)){const t=e.component;this.domEmitter.dispatchLocalEvent("container-created",t.identity)}})),this.layout.on("itemDestroyed",(t=>{const e=t.target;if(qt.isComponentItem(e)){const t=e.component;this.removeViewComponent(t)}})),this.layout.on("itemDropped",(()=>{this.handleDragEnd()}))}handleDragStart(){this.iframeContainer.style.pointerEvents="none"}handleDragEnd(){this.iframeContainer.style.pointerEvents=""}removeViewComponent(t){if(t.config&&!1===t.config[`${pe}isClosable`]){const e=[...this.stylesheet.cssRules].findIndex((e=>e.cssText.includes(`#tab-${t.identity.name}`)));this.stylesheet.deleteRule(e)}t.destroy(),this.viewComponentsByContainerElement.delete(t.container.element),this.resizeController.unobserveContainer(t.container.element),this.reparentingViews.has(t.identity.name)?this.reparentingViews.delete(t.identity.name):this.platformProvider.closeView(t.identity.name),0===this.getCurrentViews().length&&(this.goldenLayoutDestroyed||(this.goldenLayoutDestroyed=!0,m.handleLastViewRemoved(this.layoutManager,this.identity)))}}class Re{constructor(t,e,n,i){this.windowIdentity=t,this.connectConfig=e,this.provider=n,this.fallbackContainer=i}async createLayout(t,e){if(!("container"in t)&&!this.fallbackContainer)throw new Error("Container property is not optional in web");const{layoutName:n}=t,i=t,o=this.provider.initLayoutViews(i),r=i.container??this.fallbackContainer,s={...this.windowIdentity,layoutName:n},a=new Oe(s,r,o,this.connectConfig,e,this.provider);m.registerLayout(e,n,a),this.fallbackContainer=null}async getLayoutSnapshot(t){return t.getLayoutSnapshot()}async handleLastViewRemoved(t){}}class Te{static async init(t){const e=t.getFin().InterApplicationBus.Channel,n=await e.create(`custom-frame-${t.me.uuid}`);return n.setDefaultAction((async(t,{target:e,opts:i},o)=>{const r=n.connections.find((t=>t.name===e.name));if(r)return n.dispatch(r,t,{...i,target:e});throw new Error(`Client with name ${e.name} not found`)})),await i.relayChannelClientApi_1(n,"layout-relay"),new Te(t)}constructor(t){this.wire=t,this.viewNames=new Set}normalizeOptions(t,e="default"){const n=this.wire.me.uuid;let{name:i=`internal-generated-view-${o.v4()}`}=t;return i.match(/^internal-generated-view-/)&&this.viewNames.has(i)&&"duplicate"===e&&(i=`internal-generated-view-${o.v4()}`),this.viewNames.add(i),{...t,name:i,uuid:n}}closeView(t){this.viewNames.delete(t)}initLayoutViews({layout:t,multiInstanceViewBehavior:e}){return V((t=>{if("component"===t.type&&t.componentState){const n=this.normalizeOptions(t.componentState,e);return{...t,componentState:n}}return t}),t)}}var ke;const je=t=>t;ke=new WeakMap,e.WebLayoutEntryPoint=class{constructor(t){ke.set(this,void 0),this.initLayoutManager=async(t,e,{container:n,layoutManagerOverride:o})=>{const r=await Te.init(e),s=o??je,a=new Re(e.me,i.__classPrivateFieldGet(this,ke,"f"),r,n),c=new(s(m.createClosedConstructor(a)));return await R(e,c),c},this.applyLayoutSnapshot=async(t,e,n)=>{await e.applyLayoutSnapshot(i.__classPrivateFieldGet(this,ke,"f").platform.layoutSnapshot)},this.createLayout=async(t,e)=>m.createLayout(t,e),this.destroyLayout=async(t,e)=>m.destroyLayout(t,e),i.__classPrivateFieldSet(this,ke,t,"f")}}},7991:(t,e)=>{e.byteLength=function(t){var e=a(t),n=e[0],i=e[1];return 3*(n+i)/4-i},e.toByteArray=function(t){var e,n,r=a(t),s=r[0],c=r[1],d=new o(function(t,e,n){return 3*(e+n)/4-n}(0,s,c)),h=0,l=c>0?s-4:s;for(n=0;n>16&255,d[h++]=e>>8&255,d[h++]=255&e;return 2===c&&(e=i[t.charCodeAt(n)]<<2|i[t.charCodeAt(n+1)]>>4,d[h++]=255&e),1===c&&(e=i[t.charCodeAt(n)]<<10|i[t.charCodeAt(n+1)]<<4|i[t.charCodeAt(n+2)]>>2,d[h++]=e>>8&255,d[h++]=255&e),d},e.fromByteArray=function(t){for(var e,i=t.length,o=i%3,r=[],s=16383,a=0,d=i-o;ad?d:a+s));return 1===o?(e=t[i-1],r.push(n[e>>2]+n[e<<4&63]+"==")):2===o&&(e=(t[i-2]<<8)+t[i-1],r.push(n[e>>10]+n[e>>4&63]+n[e<<2&63]+"=")),r.join("")};for(var n=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0;s<64;++s)n[s]=r[s],i[r.charCodeAt(s)]=s;function a(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");return-1===n&&(n=e),[n,n===e?0:4-n%4]}function c(t,e,i){for(var o,r,s=[],a=e;a>18&63]+n[r>>12&63]+n[r>>6&63]+n[63&r]);return s.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},1048:(t,e,n)=>{const i=n(7991),o=n(9318),r="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=c,e.SlowBuffer=function(t){return+t!=t&&(t=0),c.alloc(+t)},e.INSPECT_MAX_BYTES=50;const s=2147483647;function a(t){if(t>s)throw new RangeError('The value "'+t+'" is invalid for option "size"');const e=new Uint8Array(t);return Object.setPrototypeOf(e,c.prototype),e}function c(t,e,n){if("number"==typeof t){if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return l(t)}return d(t,e,n)}function d(t,e,n){if("string"==typeof t)return function(t,e){if("string"==typeof e&&""!==e||(e="utf8"),!c.isEncoding(e))throw new TypeError("Unknown encoding: "+e);const n=0|m(t,e);let i=a(n);const o=i.write(t,e);return o!==n&&(i=i.slice(0,o)),i}(t,e);if(ArrayBuffer.isView(t))return function(t){if(K(t,Uint8Array)){const e=new Uint8Array(t);return p(e.buffer,e.byteOffset,e.byteLength)}return u(t)}(t);if(null==t)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(K(t,ArrayBuffer)||t&&K(t.buffer,ArrayBuffer))return p(t,e,n);if("undefined"!=typeof SharedArrayBuffer&&(K(t,SharedArrayBuffer)||t&&K(t.buffer,SharedArrayBuffer)))return p(t,e,n);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');const i=t.valueOf&&t.valueOf();if(null!=i&&i!==t)return c.from(i,e,n);const o=function(t){if(c.isBuffer(t)){const e=0|f(t.length),n=a(e);return 0===n.length||t.copy(n,0,0,e),n}return void 0!==t.length?"number"!=typeof t.length||Z(t.length)?a(0):u(t):"Buffer"===t.type&&Array.isArray(t.data)?u(t.data):void 0}(t);if(o)return o;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return c.from(t[Symbol.toPrimitive]("string"),e,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function h(t){if("number"!=typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function l(t){return h(t),a(t<0?0:0|f(t))}function u(t){const e=t.length<0?0:0|f(t.length),n=a(e);for(let i=0;i=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return 0|t}function m(t,e){if(c.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||K(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);const n=t.length,i=arguments.length>2&&!0===arguments[2];if(!i&&0===n)return 0;let o=!1;for(;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return G(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return q(t).length;default:if(o)return i?-1:G(t).length;e=(""+e).toLowerCase(),o=!0}}function w(t,e,n){let i=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return L(this,e,n);case"utf8":case"utf-8":return S(this,e,n);case"ascii":return P(this,e,n);case"latin1":case"binary":return M(this,e,n);case"base64":return x(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,e,n);default:if(i)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),i=!0}}function y(t,e,n){const i=t[e];t[e]=t[n],t[n]=i}function g(t,e,n,i,o){if(0===t.length)return-1;if("string"==typeof n?(i=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),Z(n=+n)&&(n=o?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(o)return-1;n=t.length-1}else if(n<0){if(!o)return-1;n=0}if("string"==typeof e&&(e=c.from(e,i)),c.isBuffer(e))return 0===e.length?-1:v(t,e,n,i,o);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(t,e,n):Uint8Array.prototype.lastIndexOf.call(t,e,n):v(t,[e],n,i,o);throw new TypeError("val must be string, number or Buffer")}function v(t,e,n,i,o){let r,s=1,a=t.length,c=e.length;if(void 0!==i&&("ucs2"===(i=String(i).toLowerCase())||"ucs-2"===i||"utf16le"===i||"utf-16le"===i)){if(t.length<2||e.length<2)return-1;s=2,a/=2,c/=2,n/=2}function d(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(o){let i=-1;for(r=n;ra&&(n=a-c),r=n;r>=0;r--){let n=!0;for(let i=0;io&&(i=o):i=o;const r=e.length;let s;for(i>r/2&&(i=r/2),s=0;s>8,o=n%256,r.push(o),r.push(i);return r}(e,t.length-n),t,n,i)}function x(t,e,n){return 0===e&&n===t.length?i.fromByteArray(t):i.fromByteArray(t.slice(e,n))}function S(t,e,n){n=Math.min(t.length,n);const i=[];let o=e;for(;o239?4:e>223?3:e>191?2:1;if(o+s<=n){let n,i,a,c;switch(s){case 1:e<128&&(r=e);break;case 2:n=t[o+1],128==(192&n)&&(c=(31&e)<<6|63&n,c>127&&(r=c));break;case 3:n=t[o+1],i=t[o+2],128==(192&n)&&128==(192&i)&&(c=(15&e)<<12|(63&n)<<6|63&i,c>2047&&(c<55296||c>57343)&&(r=c));break;case 4:n=t[o+1],i=t[o+2],a=t[o+3],128==(192&n)&&128==(192&i)&&128==(192&a)&&(c=(15&e)<<18|(63&n)<<12|(63&i)<<6|63&a,c>65535&&c<1114112&&(r=c))}}null===r?(r=65533,s=1):r>65535&&(r-=65536,i.push(r>>>10&1023|55296),r=56320|1023&r),i.push(r),o+=s}return function(t){const e=t.length;if(e<=A)return String.fromCharCode.apply(String,t);let n="",i=0;for(;ii.length?(c.isBuffer(e)||(e=c.from(e)),e.copy(i,o)):Uint8Array.prototype.set.call(i,e,o);else{if(!c.isBuffer(e))throw new TypeError('"list" argument must be an Array of Buffers');e.copy(i,o)}o+=e.length}return i},c.byteLength=m,c.prototype._isBuffer=!0,c.prototype.swap16=function(){const t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let e=0;en&&(t+=" ... "),""},r&&(c.prototype[r]=c.prototype.inspect),c.prototype.compare=function(t,e,n,i,o){if(K(t,Uint8Array)&&(t=c.from(t,t.offset,t.byteLength)),!c.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&&(e=0),void 0===n&&(n=t?t.length:0),void 0===i&&(i=0),void 0===o&&(o=this.length),e<0||n>t.length||i<0||o>this.length)throw new RangeError("out of range index");if(i>=o&&e>=n)return 0;if(i>=o)return-1;if(e>=n)return 1;if(this===t)return 0;let r=(o>>>=0)-(i>>>=0),s=(n>>>=0)-(e>>>=0);const a=Math.min(r,s),d=this.slice(i,o),h=t.slice(e,n);for(let t=0;t>>=0,isFinite(n)?(n>>>=0,void 0===i&&(i="utf8")):(i=n,n=void 0)}const o=this.length-e;if((void 0===n||n>o)&&(n=o),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");let r=!1;for(;;)switch(i){case"hex":return C(this,t,e,n);case"utf8":case"utf-8":return b(this,t,e,n);case"ascii":case"latin1":case"binary":return _(this,t,e,n);case"base64":return I(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,t,e,n);default:if(r)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),r=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const A=4096;function P(t,e,n){let i="";n=Math.min(t.length,n);for(let o=e;oi)&&(n=i);let o="";for(let i=e;in)throw new RangeError("Trying to access beyond buffer length")}function T(t,e,n,i,o,r){if(!c.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>o||et.length)throw new RangeError("Index out of range")}function k(t,e,n,i,o){$(e,i,o,t,n,7);let r=Number(e&BigInt(4294967295));t[n++]=r,r>>=8,t[n++]=r,r>>=8,t[n++]=r,r>>=8,t[n++]=r;let s=Number(e>>BigInt(32)&BigInt(4294967295));return t[n++]=s,s>>=8,t[n++]=s,s>>=8,t[n++]=s,s>>=8,t[n++]=s,n}function j(t,e,n,i,o){$(e,i,o,t,n,7);let r=Number(e&BigInt(4294967295));t[n+7]=r,r>>=8,t[n+6]=r,r>>=8,t[n+5]=r,r>>=8,t[n+4]=r;let s=Number(e>>BigInt(32)&BigInt(4294967295));return t[n+3]=s,s>>=8,t[n+2]=s,s>>=8,t[n+1]=s,s>>=8,t[n]=s,n+8}function B(t,e,n,i,o,r){if(n+i>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function z(t,e,n,i,r){return e=+e,n>>>=0,r||B(t,0,n,4),o.write(t,e,n,i,23,4),n+4}function F(t,e,n,i,r){return e=+e,n>>>=0,r||B(t,0,n,8),o.write(t,e,n,i,52,8),n+8}c.prototype.slice=function(t,e){const n=this.length;(t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(e=void 0===e?n:~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),e>>=0,e>>>=0,n||R(t,e,this.length);let i=this[t],o=1,r=0;for(;++r>>=0,e>>>=0,n||R(t,e,this.length);let i=this[t+--e],o=1;for(;e>0&&(o*=256);)i+=this[t+--e]*o;return i},c.prototype.readUint8=c.prototype.readUInt8=function(t,e){return t>>>=0,e||R(t,1,this.length),this[t]},c.prototype.readUint16LE=c.prototype.readUInt16LE=function(t,e){return t>>>=0,e||R(t,2,this.length),this[t]|this[t+1]<<8},c.prototype.readUint16BE=c.prototype.readUInt16BE=function(t,e){return t>>>=0,e||R(t,2,this.length),this[t]<<8|this[t+1]},c.prototype.readUint32LE=c.prototype.readUInt32LE=function(t,e){return t>>>=0,e||R(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},c.prototype.readUint32BE=c.prototype.readUInt32BE=function(t,e){return t>>>=0,e||R(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},c.prototype.readBigUInt64LE=X((function(t){V(t>>>=0,"offset");const e=this[t],n=this[t+7];void 0!==e&&void 0!==n||H(t,this.length-8);const i=e+256*this[++t]+65536*this[++t]+this[++t]*2**24,o=this[++t]+256*this[++t]+65536*this[++t]+n*2**24;return BigInt(i)+(BigInt(o)<>>=0,"offset");const e=this[t],n=this[t+7];void 0!==e&&void 0!==n||H(t,this.length-8);const i=e*2**24+65536*this[++t]+256*this[++t]+this[++t],o=this[++t]*2**24+65536*this[++t]+256*this[++t]+n;return(BigInt(i)<>>=0,e>>>=0,n||R(t,e,this.length);let i=this[t],o=1,r=0;for(;++r=o&&(i-=Math.pow(2,8*e)),i},c.prototype.readIntBE=function(t,e,n){t>>>=0,e>>>=0,n||R(t,e,this.length);let i=e,o=1,r=this[t+--i];for(;i>0&&(o*=256);)r+=this[t+--i]*o;return o*=128,r>=o&&(r-=Math.pow(2,8*e)),r},c.prototype.readInt8=function(t,e){return t>>>=0,e||R(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},c.prototype.readInt16LE=function(t,e){t>>>=0,e||R(t,2,this.length);const n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt16BE=function(t,e){t>>>=0,e||R(t,2,this.length);const n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt32LE=function(t,e){return t>>>=0,e||R(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},c.prototype.readInt32BE=function(t,e){return t>>>=0,e||R(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},c.prototype.readBigInt64LE=X((function(t){V(t>>>=0,"offset");const e=this[t],n=this[t+7];void 0!==e&&void 0!==n||H(t,this.length-8);const i=this[t+4]+256*this[t+5]+65536*this[t+6]+(n<<24);return(BigInt(i)<>>=0,"offset");const e=this[t],n=this[t+7];void 0!==e&&void 0!==n||H(t,this.length-8);const i=(e<<24)+65536*this[++t]+256*this[++t]+this[++t];return(BigInt(i)<>>=0,e||R(t,4,this.length),o.read(this,t,!0,23,4)},c.prototype.readFloatBE=function(t,e){return t>>>=0,e||R(t,4,this.length),o.read(this,t,!1,23,4)},c.prototype.readDoubleLE=function(t,e){return t>>>=0,e||R(t,8,this.length),o.read(this,t,!0,52,8)},c.prototype.readDoubleBE=function(t,e){return t>>>=0,e||R(t,8,this.length),o.read(this,t,!1,52,8)},c.prototype.writeUintLE=c.prototype.writeUIntLE=function(t,e,n,i){t=+t,e>>>=0,n>>>=0,i||T(this,t,e,n,Math.pow(2,8*n)-1,0);let o=1,r=0;for(this[e]=255&t;++r>>=0,n>>>=0,i||T(this,t,e,n,Math.pow(2,8*n)-1,0);let o=n-1,r=1;for(this[e+o]=255&t;--o>=0&&(r*=256);)this[e+o]=t/r&255;return e+n},c.prototype.writeUint8=c.prototype.writeUInt8=function(t,e,n){return t=+t,e>>>=0,n||T(this,t,e,1,255,0),this[e]=255&t,e+1},c.prototype.writeUint16LE=c.prototype.writeUInt16LE=function(t,e,n){return t=+t,e>>>=0,n||T(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},c.prototype.writeUint16BE=c.prototype.writeUInt16BE=function(t,e,n){return t=+t,e>>>=0,n||T(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},c.prototype.writeUint32LE=c.prototype.writeUInt32LE=function(t,e,n){return t=+t,e>>>=0,n||T(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},c.prototype.writeUint32BE=c.prototype.writeUInt32BE=function(t,e,n){return t=+t,e>>>=0,n||T(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},c.prototype.writeBigUInt64LE=X((function(t,e=0){return k(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))})),c.prototype.writeBigUInt64BE=X((function(t,e=0){return j(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))})),c.prototype.writeIntLE=function(t,e,n,i){if(t=+t,e>>>=0,!i){const i=Math.pow(2,8*n-1);T(this,t,e,n,i-1,-i)}let o=0,r=1,s=0;for(this[e]=255&t;++o>>=0,!i){const i=Math.pow(2,8*n-1);T(this,t,e,n,i-1,-i)}let o=n-1,r=1,s=0;for(this[e+o]=255&t;--o>=0&&(r*=256);)t<0&&0===s&&0!==this[e+o+1]&&(s=1),this[e+o]=(t/r|0)-s&255;return e+n},c.prototype.writeInt8=function(t,e,n){return t=+t,e>>>=0,n||T(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},c.prototype.writeInt16LE=function(t,e,n){return t=+t,e>>>=0,n||T(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},c.prototype.writeInt16BE=function(t,e,n){return t=+t,e>>>=0,n||T(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},c.prototype.writeInt32LE=function(t,e,n){return t=+t,e>>>=0,n||T(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},c.prototype.writeInt32BE=function(t,e,n){return t=+t,e>>>=0,n||T(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},c.prototype.writeBigInt64LE=X((function(t,e=0){return k(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),c.prototype.writeBigInt64BE=X((function(t,e=0){return j(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),c.prototype.writeFloatLE=function(t,e,n){return z(this,t,e,!0,n)},c.prototype.writeFloatBE=function(t,e,n){return z(this,t,e,!1,n)},c.prototype.writeDoubleLE=function(t,e,n){return F(this,t,e,!0,n)},c.prototype.writeDoubleBE=function(t,e,n){return F(this,t,e,!1,n)},c.prototype.copy=function(t,e,n,i){if(!c.isBuffer(t))throw new TypeError("argument should be a Buffer");if(n||(n=0),i||0===i||(i=this.length),e>=t.length&&(e=t.length),e||(e=0),i>0&&i=this.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),t.length-e>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"==typeof t)for(o=e;o=i+4;n-=3)e=`_${t.slice(n-3,n)}${e}`;return`${t.slice(0,n)}${e}`}function $(t,e,n,i,o,r){if(t>n||t3?0===e||e===BigInt(0)?`>= 0${i} and < 2${i} ** ${8*(r+1)}${i}`:`>= -(2${i} ** ${8*(r+1)-1}${i}) and < 2 ** ${8*(r+1)-1}${i}`:`>= ${e}${i} and <= ${n}${i}`,new D.ERR_OUT_OF_RANGE("value",o,t)}!function(t,e,n){V(e,"offset"),void 0!==t[e]&&void 0!==t[e+n]||H(e,t.length-(n+1))}(i,o,r)}function V(t,e){if("number"!=typeof t)throw new D.ERR_INVALID_ARG_TYPE(e,"number",t)}function H(t,e,n){if(Math.floor(t)!==t)throw V(t,n),new D.ERR_OUT_OF_RANGE(n||"offset","an integer",t);if(e<0)throw new D.ERR_BUFFER_OUT_OF_BOUNDS;throw new D.ERR_OUT_OF_RANGE(n||"offset",`>= ${n?1:0} and <= ${e}`,t)}U("ERR_BUFFER_OUT_OF_BOUNDS",(function(t){return t?`${t} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),U("ERR_INVALID_ARG_TYPE",(function(t,e){return`The "${t}" argument must be of type number. Received type ${typeof e}`}),TypeError),U("ERR_OUT_OF_RANGE",(function(t,e,n){let i=`The value of "${t}" is out of range.`,o=n;return Number.isInteger(n)&&Math.abs(n)>2**32?o=W(String(n)):"bigint"==typeof n&&(o=String(n),(n>BigInt(2)**BigInt(32)||n<-(BigInt(2)**BigInt(32)))&&(o=W(o)),o+="n"),i+=` It must be ${e}. Received ${o}`,i}),RangeError);const N=/[^+/0-9A-Za-z-_]/g;function G(t,e){let n;e=e||1/0;const i=t.length;let o=null;const r=[];for(let s=0;s55295&&n<57344){if(!o){if(n>56319){(e-=3)>-1&&r.push(239,191,189);continue}if(s+1===i){(e-=3)>-1&&r.push(239,191,189);continue}o=n;continue}if(n<56320){(e-=3)>-1&&r.push(239,191,189),o=n;continue}n=65536+(o-55296<<10|n-56320)}else o&&(e-=3)>-1&&r.push(239,191,189);if(o=null,n<128){if((e-=1)<0)break;r.push(n)}else if(n<2048){if((e-=2)<0)break;r.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;r.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;r.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return r}function q(t){return i.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(N,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function Y(t,e,n,i){let o;for(o=0;o=e.length||o>=t.length);++o)e[o+n]=t[o];return o}function K(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function Z(t){return t!=t}const J=function(){const t="0123456789abcdef",e=new Array(256);for(let n=0;n<16;++n){const i=16*n;for(let o=0;o<16;++o)e[i+o]=t[n]+t[o]}return e}();function X(t){return"undefined"==typeof BigInt?Q:t}function Q(){throw new Error("BigInt not supported")}},46:t=>{var e,n="object"==typeof Reflect?Reflect:null,i=n&&"function"==typeof n.apply?n.apply:function(t,e,n){return Function.prototype.apply.call(t,e,n)};e=n&&"function"==typeof n.ownKeys?n.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)};var o=Number.isNaN||function(t){return t!=t};function r(){r.init.call(this)}t.exports=r,t.exports.once=function(t,e){return new Promise((function(n,i){function o(n){t.removeListener(e,r),i(n)}function r(){"function"==typeof t.removeListener&&t.removeListener("error",o),n([].slice.call(arguments))}m(t,e,r,{once:!0}),"error"!==e&&function(t,e){"function"==typeof t.on&&m(t,"error",e,{once:!0})}(t,o)}))},r.EventEmitter=r,r.prototype._events=void 0,r.prototype._eventsCount=0,r.prototype._maxListeners=void 0;var s=10;function a(t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}function c(t){return void 0===t._maxListeners?r.defaultMaxListeners:t._maxListeners}function d(t,e,n,i){var o,r,s,d;if(a(n),void 0===(r=t._events)?(r=t._events=Object.create(null),t._eventsCount=0):(void 0!==r.newListener&&(t.emit("newListener",e,n.listener?n.listener:n),r=t._events),s=r[e]),void 0===s)s=r[e]=n,++t._eventsCount;else if("function"==typeof s?s=r[e]=i?[n,s]:[s,n]:i?s.unshift(n):s.push(n),(o=c(t))>0&&s.length>o&&!s.warned){s.warned=!0;var h=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");h.name="MaxListenersExceededWarning",h.emitter=t,h.type=e,h.count=s.length,d=h,console&&console.warn&&console.warn(d)}return t}function h(){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 l(t,e,n){var i={fired:!1,wrapFn:void 0,target:t,type:e,listener:n},o=h.bind(i);return o.listener=n,i.wrapFn=o,o}function u(t,e,n){var i=t._events;if(void 0===i)return[];var o=i[e];return void 0===o?[]:"function"==typeof o?n?[o.listener||o]:[o]:n?function(t){for(var e=new Array(t.length),n=0;n0&&(s=e[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var c=r[t];if(void 0===c)return!1;if("function"==typeof c)i(c,this,e);else{var d=c.length,h=f(c,d);for(n=0;n=0;r--)if(n[r]===e||n[r].listener===e){s=n[r].listener,o=r;break}if(o<0)return this;0===o?n.shift():function(t,e){for(;e+1=0;i--)this.removeListener(t,e[i]);return this},r.prototype.listeners=function(t){return u(this,t,!0)},r.prototype.rawListeners=function(t){return u(this,t,!1)},r.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):p.call(t,e)},r.prototype.listenerCount=p,r.prototype.eventNames=function(){return this._eventsCount>0?e(this._events):[]}},9318:(t,e)=>{e.read=function(t,e,n,i,o){var r,s,a=8*o-i-1,c=(1<>1,h=-7,l=n?o-1:0,u=n?-1:1,p=t[e+l];for(l+=u,r=p&(1<<-h)-1,p>>=-h,h+=a;h>0;r=256*r+t[e+l],l+=u,h-=8);for(s=r&(1<<-h)-1,r>>=-h,h+=i;h>0;s=256*s+t[e+l],l+=u,h-=8);if(0===r)r=1-d;else{if(r===c)return s?NaN:1/0*(p?-1:1);s+=Math.pow(2,i),r-=d}return(p?-1:1)*s*Math.pow(2,r-i)},e.write=function(t,e,n,i,o,r){var s,a,c,d=8*r-o-1,h=(1<>1,u=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,p=i?0:r-1,f=i?1:-1,m=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=h):(s=Math.floor(Math.log(e)/Math.LN2),e*(c=Math.pow(2,-s))<1&&(s--,c*=2),(e+=s+l>=1?u/c:u*Math.pow(2,1-l))*c>=2&&(s++,c/=2),s+l>=h?(a=0,s=h):s+l>=1?(a=(e*c-1)*Math.pow(2,o),s+=l):(a=e*Math.pow(2,l-1)*Math.pow(2,o),s=0));o>=8;t[n+p]=255&a,p+=f,a/=256,o-=8);for(s=s<0;t[n+p]=255&s,p+=f,s/=256,d-=8);t[n+p-f]|=128*m}},3103:(t,e,n)=>{var i=n(4715)(n(8942),"DataView");t.exports=i},5098:(t,e,n)=>{var i=n(3305),o=n(9361),r=n(1112),s=n(5276),a=n(5071);function c(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e{var i=n(2393),o=n(2049),r=n(7144),s=n(7452),a=n(3964);function c(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e{var i=n(4715)(n(8942),"Map");t.exports=i},8250:(t,e,n)=>{var i=n(9753),o=n(5681),r=n(88),s=n(4732),a=n(9068);function c(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e{var i=n(4715)(n(8942),"Promise");t.exports=i},4512:(t,e,n)=>{var i=n(4715)(n(8942),"Set");t.exports=i},3212:(t,e,n)=>{var i=n(8250),o=n(1877),r=n(8006);function s(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new i;++e{var i=n(1386),o=n(4103),r=n(1779),s=n(4162),a=n(7462),c=n(6638);function d(t){var e=this.__data__=new i(t);this.size=e.size}d.prototype.clear=o,d.prototype.delete=r,d.prototype.get=s,d.prototype.has=a,d.prototype.set=c,t.exports=d},5650:(t,e,n)=>{var i=n(8942).Symbol;t.exports=i},1623:(t,e,n)=>{var i=n(8942).Uint8Array;t.exports=i},9270:(t,e,n)=>{var i=n(4715)(n(8942),"WeakMap");t.exports=i},9968:t=>{t.exports=function(t,e){for(var n=-1,i=null==t?0:t.length;++n{t.exports=function(t,e){for(var n=-1,i=null==t?0:t.length,o=0,r=[];++n{var i=n(6137),o=n(3283),r=n(3142),s=n(5853),a=n(9632),c=n(8666),d=Object.prototype.hasOwnProperty;t.exports=function(t,e){var n=r(t),h=!n&&o(t),l=!n&&!h&&s(t),u=!n&&!h&&!l&&c(t),p=n||h||l||u,f=p?i(t.length,String):[],m=f.length;for(var w in t)!e&&!d.call(t,w)||p&&("length"==w||l&&("offset"==w||"parent"==w)||u&&("buffer"==w||"byteLength"==w||"byteOffset"==w)||a(w,m))||f.push(w);return f}},1129:t=>{t.exports=function(t,e){for(var n=-1,i=e.length,o=t.length;++n{t.exports=function(t,e){for(var n=-1,i=null==t?0:t.length;++n{var i=n(7073),o=n(6285),r=Object.prototype.hasOwnProperty;t.exports=function(t,e,n){var s=t[e];r.call(t,e)&&o(s,n)&&(void 0!==n||e in t)||i(t,e,n)}},7034:(t,e,n)=>{var i=n(6285);t.exports=function(t,e){for(var n=t.length;n--;)if(i(t[n][0],e))return n;return-1}},7930:(t,e,n)=>{var i=n(9032),o=n(1211);t.exports=function(t,e){return t&&i(e,o(e),t)}},125:(t,e,n)=>{var i=n(9032),o=n(5288);t.exports=function(t,e){return t&&i(e,o(e),t)}},7073:(t,e,n)=>{var i=n(2532);t.exports=function(t,e,n){"__proto__"==e&&i?i(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}},9334:(t,e,n)=>{var i=n(1340),o=n(9968),r=n(3422),s=n(7930),a=n(125),c=n(7099),d=n(4354),h=n(3546),l=n(4733),u=n(393),p=n(3650),f=n(8486),m=n(7350),w=n(424),y=n(5964),g=n(3142),v=n(5853),C=n(7681),b=n(1580),_=n(3943),I=n(1211),E=n(5288),x="[object Arguments]",S="[object Function]",A="[object Object]",P={};P[x]=P["[object Array]"]=P["[object ArrayBuffer]"]=P["[object DataView]"]=P["[object Boolean]"]=P["[object Date]"]=P["[object Float32Array]"]=P["[object Float64Array]"]=P["[object Int8Array]"]=P["[object Int16Array]"]=P["[object Int32Array]"]=P["[object Map]"]=P["[object Number]"]=P[A]=P["[object RegExp]"]=P["[object Set]"]=P["[object String]"]=P["[object Symbol]"]=P["[object Uint8Array]"]=P["[object Uint8ClampedArray]"]=P["[object Uint16Array]"]=P["[object Uint32Array]"]=!0,P["[object Error]"]=P[S]=P["[object WeakMap]"]=!1,t.exports=function t(e,n,M,L,O,R){var T,k=1&n,j=2&n,B=4&n;if(M&&(T=O?M(e,L,O,R):M(e)),void 0!==T)return T;if(!b(e))return e;var z=g(e);if(z){if(T=m(e),!k)return d(e,T)}else{var F=f(e),D=F==S||"[object GeneratorFunction]"==F;if(v(e))return c(e,k);if(F==A||F==x||D&&!O){if(T=j||D?{}:y(e),!k)return j?l(e,a(T,e)):h(e,s(T,e))}else{if(!P[F])return O?e:{};T=w(e,F,k)}}R||(R=new i);var U=R.get(e);if(U)return U;R.set(e,T),_(e)?e.forEach((function(i){T.add(t(i,n,M,i,e,R))})):C(e)&&e.forEach((function(i,o){T.set(o,t(i,n,M,o,e,R))}));var W=z?void 0:(B?j?p:u:j?E:I)(e);return o(W||e,(function(i,o){W&&(i=e[o=i]),r(T,o,t(i,n,M,o,e,R))})),T}},9747:(t,e,n)=>{var i=n(1580),o=Object.create,r=function(){function t(){}return function(e){if(!i(e))return{};if(o)return o(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();t.exports=r},8244:(t,e,n)=>{var i=n(1129),o=n(3142);t.exports=function(t,e,n){var r=e(t);return o(t)?r:i(r,n(t))}},7379:(t,e,n)=>{var i=n(5650),o=n(8870),r=n(9005),s=i?i.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":s&&s in Object(t)?o(t):r(t)}},6027:(t,e,n)=>{var i=n(7379),o=n(547);t.exports=function(t){return o(t)&&"[object Arguments]"==i(t)}},4687:(t,e,n)=>{var i=n(353),o=n(547);t.exports=function t(e,n,r,s,a){return e===n||(null==e||null==n||!o(e)&&!o(n)?e!=e&&n!=n:i(e,n,r,s,t,a))}},353:(t,e,n)=>{var i=n(1340),o=n(3934),r=n(8861),s=n(1182),a=n(8486),c=n(3142),d=n(5853),h=n(8666),l="[object Arguments]",u="[object Array]",p="[object Object]",f=Object.prototype.hasOwnProperty;t.exports=function(t,e,n,m,w,y){var g=c(t),v=c(e),C=g?u:a(t),b=v?u:a(e),_=(C=C==l?p:C)==p,I=(b=b==l?p:b)==p,E=C==b;if(E&&d(t)){if(!d(e))return!1;g=!0,_=!1}if(E&&!_)return y||(y=new i),g||h(t)?o(t,e,n,m,w,y):r(t,e,C,n,m,w,y);if(!(1&n)){var x=_&&f.call(t,"__wrapped__"),S=I&&f.call(e,"__wrapped__");if(x||S){var A=x?t.value():t,P=S?e.value():e;return y||(y=new i),w(A,P,n,m,y)}}return!!E&&(y||(y=new i),s(t,e,n,m,w,y))}},777:(t,e,n)=>{var i=n(8486),o=n(547);t.exports=function(t){return o(t)&&"[object Map]"==i(t)}},9624:(t,e,n)=>{var i=n(3655),o=n(4759),r=n(1580),s=n(4066),a=/^\[object .+?Constructor\]$/,c=Function.prototype,d=Object.prototype,h=c.toString,l=d.hasOwnProperty,u=RegExp("^"+h.call(l).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=function(t){return!(!r(t)||o(t))&&(i(t)?u:a).test(s(t))}},1935:(t,e,n)=>{var i=n(8486),o=n(547);t.exports=function(t){return o(t)&&"[object Set]"==i(t)}},674:(t,e,n)=>{var i=n(7379),o=n(5387),r=n(547),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,t.exports=function(t){return r(t)&&o(t.length)&&!!s[i(t)]}},195:(t,e,n)=>{var i=n(4882),o=n(8121),r=Object.prototype.hasOwnProperty;t.exports=function(t){if(!i(t))return o(t);var e=[];for(var n in Object(t))r.call(t,n)&&"constructor"!=n&&e.push(n);return e}},7200:(t,e,n)=>{var i=n(1580),o=n(4882),r=n(8546),s=Object.prototype.hasOwnProperty;t.exports=function(t){if(!i(t))return r(t);var e=o(t),n=[];for(var a in t)("constructor"!=a||!e&&s.call(t,a))&&n.push(a);return n}},6137:t=>{t.exports=function(t,e){for(var n=-1,i=Array(t);++n{t.exports=function(t){return function(e){return t(e)}}},5568:t=>{t.exports=function(t,e){return t.has(e)}},8898:(t,e,n)=>{var i=n(1623);t.exports=function(t){var e=new t.constructor(t.byteLength);return new i(e).set(new i(t)),e}},7099:(t,e,n)=>{t=n.nmd(t);var i=n(8942),o=e&&!e.nodeType&&e,r=o&&t&&!t.nodeType&&t,s=r&&r.exports===o?i.Buffer:void 0,a=s?s.allocUnsafe:void 0;t.exports=function(t,e){if(e)return t.slice();var n=t.length,i=a?a(n):new t.constructor(n);return t.copy(i),i}},2480:(t,e,n)=>{var i=n(8898);t.exports=function(t,e){var n=e?i(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}},8340:t=>{var e=/\w*$/;t.exports=function(t){var n=new t.constructor(t.source,e.exec(t));return n.lastIndex=t.lastIndex,n}},8069:(t,e,n)=>{var i=n(5650),o=i?i.prototype:void 0,r=o?o.valueOf:void 0;t.exports=function(t){return r?Object(r.call(t)):{}}},2264:(t,e,n)=>{var i=n(8898);t.exports=function(t,e){var n=e?i(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}},4354:t=>{t.exports=function(t,e){var n=-1,i=t.length;for(e||(e=Array(i));++n{var i=n(3422),o=n(7073);t.exports=function(t,e,n,r){var s=!n;n||(n={});for(var a=-1,c=e.length;++a{var i=n(9032),o=n(7979);t.exports=function(t,e){return i(t,o(t),e)}},4733:(t,e,n)=>{var i=n(9032),o=n(5832);t.exports=function(t,e){return i(t,o(t),e)}},1950:(t,e,n)=>{var i=n(8942)["__core-js_shared__"];t.exports=i},2532:(t,e,n)=>{var i=n(4715),o=function(){try{var t=i(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();t.exports=o},3934:(t,e,n)=>{var i=n(3212),o=n(6465),r=n(5568);t.exports=function(t,e,n,s,a,c){var d=1&n,h=t.length,l=e.length;if(h!=l&&!(d&&l>h))return!1;var u=c.get(t),p=c.get(e);if(u&&p)return u==e&&p==t;var f=-1,m=!0,w=2&n?new i:void 0;for(c.set(t,e),c.set(e,t);++f{var i=n(5650),o=n(1623),r=n(6285),s=n(3934),a=n(5894),c=n(9828),d=i?i.prototype:void 0,h=d?d.valueOf:void 0;t.exports=function(t,e,n,i,d,l,u){switch(n){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!l(new o(t),new o(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return r(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var p=a;case"[object Set]":var f=1&i;if(p||(p=c),t.size!=e.size&&!f)return!1;var m=u.get(t);if(m)return m==e;i|=2,u.set(t,e);var w=s(p(t),p(e),i,d,l,u);return u.delete(t),w;case"[object Symbol]":if(h)return h.call(t)==h.call(e)}return!1}},1182:(t,e,n)=>{var i=n(393),o=Object.prototype.hasOwnProperty;t.exports=function(t,e,n,r,s,a){var c=1&n,d=i(t),h=d.length;if(h!=i(e).length&&!c)return!1;for(var l=h;l--;){var u=d[l];if(!(c?u in e:o.call(e,u)))return!1}var p=a.get(t),f=a.get(e);if(p&&f)return p==e&&f==t;var m=!0;a.set(t,e),a.set(e,t);for(var w=c;++l{var i="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;t.exports=i},393:(t,e,n)=>{var i=n(8244),o=n(7979),r=n(1211);t.exports=function(t){return i(t,r,o)}},3650:(t,e,n)=>{var i=n(8244),o=n(5832),r=n(5288);t.exports=function(t){return i(t,r,o)}},4700:(t,e,n)=>{var i=n(9067);t.exports=function(t,e){var n=t.__data__;return i(e)?n["string"==typeof e?"string":"hash"]:n.map}},4715:(t,e,n)=>{var i=n(9624),o=n(155);t.exports=function(t,e){var n=o(t,e);return i(n)?n:void 0}},4784:(t,e,n)=>{var i=n(3766)(Object.getPrototypeOf,Object);t.exports=i},8870:(t,e,n)=>{var i=n(5650),o=Object.prototype,r=o.hasOwnProperty,s=o.toString,a=i?i.toStringTag:void 0;t.exports=function(t){var e=r.call(t,a),n=t[a];try{t[a]=void 0;var i=!0}catch(t){}var o=s.call(t);return i&&(e?t[a]=n:delete t[a]),o}},7979:(t,e,n)=>{var i=n(9847),o=n(9306),r=Object.prototype.propertyIsEnumerable,s=Object.getOwnPropertySymbols,a=s?function(t){return null==t?[]:(t=Object(t),i(s(t),(function(e){return r.call(t,e)})))}:o;t.exports=a},5832:(t,e,n)=>{var i=n(1129),o=n(4784),r=n(7979),s=n(9306),a=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)i(e,r(t)),t=o(t);return e}:s;t.exports=a},8486:(t,e,n)=>{var i=n(3103),o=n(9770),r=n(9413),s=n(4512),a=n(9270),c=n(7379),d=n(4066),h="[object Map]",l="[object Promise]",u="[object Set]",p="[object WeakMap]",f="[object DataView]",m=d(i),w=d(o),y=d(r),g=d(s),v=d(a),C=c;(i&&C(new i(new ArrayBuffer(1)))!=f||o&&C(new o)!=h||r&&C(r.resolve())!=l||s&&C(new s)!=u||a&&C(new a)!=p)&&(C=function(t){var e=c(t),n="[object Object]"==e?t.constructor:void 0,i=n?d(n):"";if(i)switch(i){case m:return f;case w:return h;case y:return l;case g:return u;case v:return p}return e}),t.exports=C},155:t=>{t.exports=function(t,e){return null==t?void 0:t[e]}},3305:(t,e,n)=>{var i=n(4497);t.exports=function(){this.__data__=i?i(null):{},this.size=0}},9361:t=>{t.exports=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}},1112:(t,e,n)=>{var i=n(4497),o=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;if(i){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return o.call(e,t)?e[t]:void 0}},5276:(t,e,n)=>{var i=n(4497),o=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;return i?void 0!==e[t]:o.call(e,t)}},5071:(t,e,n)=>{var i=n(4497);t.exports=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=i&&void 0===e?"__lodash_hash_undefined__":e,this}},7350:t=>{var e=Object.prototype.hasOwnProperty;t.exports=function(t){var n=t.length,i=new t.constructor(n);return n&&"string"==typeof t[0]&&e.call(t,"index")&&(i.index=t.index,i.input=t.input),i}},424:(t,e,n)=>{var i=n(8898),o=n(2480),r=n(8340),s=n(8069),a=n(2264);t.exports=function(t,e,n){var c=t.constructor;switch(e){case"[object ArrayBuffer]":return i(t);case"[object Boolean]":case"[object Date]":return new c(+t);case"[object DataView]":return o(t,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(t,n);case"[object Map]":case"[object Set]":return new c;case"[object Number]":case"[object String]":return new c(t);case"[object RegExp]":return r(t);case"[object Symbol]":return s(t)}}},5964:(t,e,n)=>{var i=n(9747),o=n(4784),r=n(4882);t.exports=function(t){return"function"!=typeof t.constructor||r(t)?{}:i(o(t))}},9632:t=>{var e=/^(?:0|[1-9]\d*)$/;t.exports=function(t,n){var i=typeof t;return!!(n=null==n?9007199254740991:n)&&("number"==i||"symbol"!=i&&e.test(t))&&t>-1&&t%1==0&&t{t.exports=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}},4759:(t,e,n)=>{var i,o=n(1950),r=(i=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+i:"";t.exports=function(t){return!!r&&r in t}},4882:t=>{var e=Object.prototype;t.exports=function(t){var n=t&&t.constructor;return t===("function"==typeof n&&n.prototype||e)}},2393:t=>{t.exports=function(){this.__data__=[],this.size=0}},2049:(t,e,n)=>{var i=n(7034),o=Array.prototype.splice;t.exports=function(t){var e=this.__data__,n=i(e,t);return!(n<0||(n==e.length-1?e.pop():o.call(e,n,1),--this.size,0))}},7144:(t,e,n)=>{var i=n(7034);t.exports=function(t){var e=this.__data__,n=i(e,t);return n<0?void 0:e[n][1]}},7452:(t,e,n)=>{var i=n(7034);t.exports=function(t){return i(this.__data__,t)>-1}},3964:(t,e,n)=>{var i=n(7034);t.exports=function(t,e){var n=this.__data__,o=i(n,t);return o<0?(++this.size,n.push([t,e])):n[o][1]=e,this}},9753:(t,e,n)=>{var i=n(5098),o=n(1386),r=n(9770);t.exports=function(){this.size=0,this.__data__={hash:new i,map:new(r||o),string:new i}}},5681:(t,e,n)=>{var i=n(4700);t.exports=function(t){var e=i(this,t).delete(t);return this.size-=e?1:0,e}},88:(t,e,n)=>{var i=n(4700);t.exports=function(t){return i(this,t).get(t)}},4732:(t,e,n)=>{var i=n(4700);t.exports=function(t){return i(this,t).has(t)}},9068:(t,e,n)=>{var i=n(4700);t.exports=function(t,e){var n=i(this,t),o=n.size;return n.set(t,e),this.size+=n.size==o?0:1,this}},5894:t=>{t.exports=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t,i){n[++e]=[i,t]})),n}},4497:(t,e,n)=>{var i=n(4715)(Object,"create");t.exports=i},8121:(t,e,n)=>{var i=n(3766)(Object.keys,Object);t.exports=i},8546:t=>{t.exports=function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e}},2306:(t,e,n)=>{t=n.nmd(t);var i=n(4967),o=e&&!e.nodeType&&e,r=o&&t&&!t.nodeType&&t,s=r&&r.exports===o&&i.process,a=function(){try{return r&&r.require&&r.require("util").types||s&&s.binding&&s.binding("util")}catch(t){}}();t.exports=a},9005:t=>{var e=Object.prototype.toString;t.exports=function(t){return e.call(t)}},3766:t=>{t.exports=function(t,e){return function(n){return t(e(n))}}},8942:(t,e,n)=>{var i=n(4967),o="object"==typeof self&&self&&self.Object===Object&&self,r=i||o||Function("return this")();t.exports=r},1877:t=>{t.exports=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this}},8006:t=>{t.exports=function(t){return this.__data__.has(t)}},9828:t=>{t.exports=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}},4103:(t,e,n)=>{var i=n(1386);t.exports=function(){this.__data__=new i,this.size=0}},1779:t=>{t.exports=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}},4162:t=>{t.exports=function(t){return this.__data__.get(t)}},7462:t=>{t.exports=function(t){return this.__data__.has(t)}},6638:(t,e,n)=>{var i=n(1386),o=n(9770),r=n(8250);t.exports=function(t,e){var n=this.__data__;if(n instanceof i){var s=n.__data__;if(!o||s.length<199)return s.push([t,e]),this.size=++n.size,this;n=this.__data__=new r(s)}return n.set(t,e),this.size=n.size,this}},4066:t=>{var e=Function.prototype.toString;t.exports=function(t){if(null!=t){try{return e.call(t)}catch(t){}try{return t+""}catch(t){}}return""}},6108:(t,e,n)=>{var i=n(9334);t.exports=function(t){return i(t,5)}},6285:t=>{t.exports=function(t,e){return t===e||t!=t&&e!=e}},3283:(t,e,n)=>{var i=n(6027),o=n(547),r=Object.prototype,s=r.hasOwnProperty,a=r.propertyIsEnumerable,c=i(function(){return arguments}())?i:function(t){return o(t)&&s.call(t,"callee")&&!a.call(t,"callee")};t.exports=c},3142:t=>{var e=Array.isArray;t.exports=e},6529:(t,e,n)=>{var i=n(3655),o=n(5387);t.exports=function(t){return null!=t&&o(t.length)&&!i(t)}},5853:(t,e,n)=>{t=n.nmd(t);var i=n(8942),o=n(4772),r=e&&!e.nodeType&&e,s=r&&t&&!t.nodeType&&t,a=s&&s.exports===r?i.Buffer:void 0,c=(a?a.isBuffer:void 0)||o;t.exports=c},6343:(t,e,n)=>{var i=n(4687);t.exports=function(t,e){return i(t,e)}},3655:(t,e,n)=>{var i=n(7379),o=n(1580);t.exports=function(t){if(!o(t))return!1;var e=i(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}},5387:t=>{t.exports=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}},7681:(t,e,n)=>{var i=n(777),o=n(9460),r=n(2306),s=r&&r.isMap,a=s?o(s):i;t.exports=a},1580:t=>{t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},547:t=>{t.exports=function(t){return null!=t&&"object"==typeof t}},3943:(t,e,n)=>{var i=n(1935),o=n(9460),r=n(2306),s=r&&r.isSet,a=s?o(s):i;t.exports=a},8666:(t,e,n)=>{var i=n(674),o=n(9460),r=n(2306),s=r&&r.isTypedArray,a=s?o(s):i;t.exports=a},1211:(t,e,n)=>{var i=n(358),o=n(195),r=n(6529);t.exports=function(t){return r(t)?i(t):o(t)}},5288:(t,e,n)=>{var i=n(358),o=n(7200),r=n(6529);t.exports=function(t){return r(t)?i(t,!0):o(t)}},9306:t=>{t.exports=function(){return[]}},4772:t=>{t.exports=function(){return!1}},5412:(t,e,n)=>{var i;n.r(e),n.d(e,{NIL:()=>L,parse:()=>w,stringify:()=>h,v1:()=>m,v3:()=>x,v4:()=>S,v5:()=>M,validate:()=>a,version:()=>O});var o=new Uint8Array(16);function r(){if(!i&&!(i="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return i(o)}const s=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,a=function(t){return"string"==typeof t&&s.test(t)};for(var c=[],d=0;d<256;++d)c.push((d+256).toString(16).substr(1));const h=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(c[t[e+0]]+c[t[e+1]]+c[t[e+2]]+c[t[e+3]]+"-"+c[t[e+4]]+c[t[e+5]]+"-"+c[t[e+6]]+c[t[e+7]]+"-"+c[t[e+8]]+c[t[e+9]]+"-"+c[t[e+10]]+c[t[e+11]]+c[t[e+12]]+c[t[e+13]]+c[t[e+14]]+c[t[e+15]]).toLowerCase();if(!a(n))throw TypeError("Stringified UUID is invalid");return n};var l,u,p=0,f=0;const m=function(t,e,n){var i=e&&n||0,o=e||new Array(16),s=(t=t||{}).node||l,a=void 0!==t.clockseq?t.clockseq:u;if(null==s||null==a){var c=t.random||(t.rng||r)();null==s&&(s=l=[1|c[0],c[1],c[2],c[3],c[4],c[5]]),null==a&&(a=u=16383&(c[6]<<8|c[7]))}var d=void 0!==t.msecs?t.msecs:Date.now(),m=void 0!==t.nsecs?t.nsecs:f+1,w=d-p+(m-f)/1e4;if(w<0&&void 0===t.clockseq&&(a=a+1&16383),(w<0||d>p)&&void 0===t.nsecs&&(m=0),m>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");p=d,f=m,u=a;var y=(1e4*(268435455&(d+=122192928e5))+m)%4294967296;o[i++]=y>>>24&255,o[i++]=y>>>16&255,o[i++]=y>>>8&255,o[i++]=255&y;var g=d/4294967296*1e4&268435455;o[i++]=g>>>8&255,o[i++]=255&g,o[i++]=g>>>24&15|16,o[i++]=g>>>16&255,o[i++]=a>>>8|128,o[i++]=255&a;for(var v=0;v<6;++v)o[i+v]=s[v];return e||h(o)},w=function(t){if(!a(t))throw TypeError("Invalid UUID");var e,n=new Uint8Array(16);return n[0]=(e=parseInt(t.slice(0,8),16))>>>24,n[1]=e>>>16&255,n[2]=e>>>8&255,n[3]=255&e,n[4]=(e=parseInt(t.slice(9,13),16))>>>8,n[5]=255&e,n[6]=(e=parseInt(t.slice(14,18),16))>>>8,n[7]=255&e,n[8]=(e=parseInt(t.slice(19,23),16))>>>8,n[9]=255&e,n[10]=(e=parseInt(t.slice(24,36),16))/1099511627776&255,n[11]=e/4294967296&255,n[12]=e>>>24&255,n[13]=e>>>16&255,n[14]=e>>>8&255,n[15]=255&e,n};function y(t,e,n){function i(t,i,o,r){if("string"==typeof t&&(t=function(t){t=unescape(encodeURIComponent(t));for(var e=[],n=0;n>>9<<4)+1}function v(t,e){var n=(65535&t)+(65535&e);return(t>>16)+(e>>16)+(n>>16)<<16|65535&n}function C(t,e,n,i,o,r){return v((s=v(v(e,t),v(i,r)))<<(a=o)|s>>>32-a,n);var s,a}function b(t,e,n,i,o,r,s){return C(e&n|~e&i,t,e,o,r,s)}function _(t,e,n,i,o,r,s){return C(e&i|n&~i,t,e,o,r,s)}function I(t,e,n,i,o,r,s){return C(e^n^i,t,e,o,r,s)}function E(t,e,n,i,o,r,s){return C(n^(e|~i),t,e,o,r,s)}const x=y("v3",48,(function(t){if("string"==typeof t){var e=unescape(encodeURIComponent(t));t=new Uint8Array(e.length);for(var n=0;n>5]>>>o%32&255,s=parseInt(i.charAt(r>>>4&15)+i.charAt(15&r),16);e.push(s)}return e}(function(t,e){t[e>>5]|=128<>5]|=(255&t[i/8])<>>32-e}const M=y("v5",80,(function(t){var e=[1518500249,1859775393,2400959708,3395469782],n=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof t){var i=unescape(encodeURIComponent(t));t=[];for(var o=0;o>>0;v=g,g=y,y=P(w,30)>>>0,w=m,m=_}n[0]=n[0]+m>>>0,n[1]=n[1]+w>>>0,n[2]=n[2]+y>>>0,n[3]=n[3]+g>>>0,n[4]=n[4]+v>>>0}return[n[0]>>24&255,n[0]>>16&255,n[0]>>8&255,255&n[0],n[1]>>24&255,n[1]>>16&255,n[1]>>8&255,255&n[1],n[2]>>24&255,n[2]>>16&255,n[2]>>8&255,255&n[2],n[3]>>24&255,n[3]>>16&255,n[3]>>8&255,255&n[3],n[4]>>24&255,n[4]>>16&255,n[4]>>8&255,255&n[4]]})),L="00000000-0000-0000-0000-000000000000",O=function(t){if(!a(t))throw TypeError("Invalid UUID");return parseInt(t.substr(14,1),16)}}},e={};function n(i){var o=e[i];if(void 0!==o)return o.exports;var r=e[i]={id:i,loaded:!1,exports:{}};return t[i](r,r.exports,n),r.loaded=!0,r.exports}n.d=(t,e)=>{for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.nmd=t=>(t.paths=[],t.children||(t.children=[]),t);var i={};(()=>{var t=i;Object.defineProperty(t,"B",{value:!0}),t.d=async function(t){const n={};let i=!1,c=!1;if(void 0===t.api&&(t.api=s),void 0===t.logger&&(t.logger=o),t.api.fin)if("undefined"!=typeof window&&"object"==typeof window.fin)t.logger.info("Fin API instance already exists. Using the reference that exists in the window object."),n.fin=window.fin;else{let o;try{if(t.logger.info(`Creating Fin API instance through @openfin/core-web connect using the following options. \n\t\t\t\t\tConnect Options: \n\t\t\t\t\t${JSON.stringify(t.connectOptions)} \n\t\t\t\t\tRequest Connect Options:\n\t\t\t\t\t${JSON.stringify(t.requestConnectOptions)}`),void 0!==t.connectOptions)t.logger.info("Creating Fin API instance using the connect options provided."),o=await(0,e.connect)(t.connectOptions);else if(void 0!==t.requestConnectOptions&&"request"===t.requestConnectOptions.strategy){const n=await a(t.requestConnectOptions);t.logger.info("Creating Fin API instance using the request connect options provided."),o=await(0,e.connect)(n)}else t.logger.info("Creating Fin API instance using the default connect options."),o=await(0,e.connect)(r)}catch(n){if(n instanceof Error&&n.message.includes("Broker URL was not specified nor provided by a platform container")&&"request-on-failure"===t.requestConnectOptions?.strategy)try{const n=await a(t.requestConnectOptions);t.logger.info("As the broker url was not specified nor provided by a platform provider and request-on-failure was specified as the requestConnectOptions strategy we will try to connect again using this strategy to see if it is supported by the platform."),o=await(0,e.connect)(n)}catch(e){t.logger.error(`Error creating Fin API instance through @openfin/core-web connect using the following using the request-on-failure strategy and the following options: \n\t\t\t\t\t\t\tConnect Options: \n\t\t\t\t\t\t\t${JSON.stringify(t.connectOptions)} \n\t\t\t\t\t\t\tRequest Connect Options:\n\t\t\t\t\t\t\t${JSON.stringify(t.requestConnectOptions)}`,e)}else t.logger.error(`Error creating Fin API instance through @openfin/core-web connect using the following options: \n\t\t\t\t\t\tConnect Options: \n\t\t\t\t\t\t${JSON.stringify(t.connectOptions)} \n\t\t\t\t\t\tRequest Connect Options:\n\t\t\t\t\t\t${JSON.stringify(t.requestConnectOptions)}`,n)}if(void 0===o)throw new Error("Failed to create a fin API instance.");n.fin=o,i=!0}if(t.api.fdc3)if("undefined"!=typeof window&&"object"==typeof window.fdc3)t.logger.info("fdc3 API instance already exists. Using the reference that exists in the window object."),n.fdc3=window.fdc3;else if(void 0!==n.fin?.me?.interop?.getFDC3){const e=t.api.fdc3Version??"2.0";try{t.logger.info(`Creating fdc3 API through the @openfin/core-web getFDC3 function specifying version ${e}.`),n.fdc3=await n.fin.me.interop.getFDC3(e),c=!0}catch(n){t.logger.error(`Error creating fdc3 API through the @openfin/core-web getFDC3 function specifying version ${e}.`,n)}}else t.logger.error("Creating an fdc3 API through the @openfin/core-web getFDC3 function isn't possible without the @openfin/core-web fin api being available. If you are running inside of a container please enable FDC3 for your view/window.");if(void 0!==t.target){const e=t.target===window;if(void 0!==n.fin&&(t.target.fin=n.fin,e&&i)){const t=new CustomEvent("finReady");window.dispatchEvent(t)}if(void 0!==n.fdc3&&(t.target.fdc3=n.fdc3,e&&c)){const t=new CustomEvent("fdc3Ready");window.dispatchEvent(t)}}return n};const e=n(8584),o={error:console.error,warn:console.warn,info:console.info},r={connectionInheritance:"enabled"},s={fin:!0,fdc3:!0,fdc3Version:"2.0"};async function a(t){return new Promise(((e,n)=>{const i=setTimeout((()=>{n(new Error("Timed out waiting for connection options."))}),t.timeout??3e3);window.addEventListener("message",(async function o(r){if(Array.isArray(t.receivingOrigin)&&!t.receivingOrigin.includes(r.origin))n(new Error(`Received message from unexpected origin: ${r.origin}`));else if(r.data&&"openfin.coreWeb.connectConfig"===r.data.type){window.removeEventListener("message",o);const t=r.data.connectConfig;void 0===t?n(new Error("No connection options were provided.")):(clearTimeout(i),e(t))}}));let o=window.top??window.parent;"parent"===t.target&&(o=window.parent),o.postMessage({type:"openfin.coreWeb.connectConfig"},t.targetOrigin??"*")}))}})();var o=i.B,r=i.d;export{o as __esModule,r as getAPI}; +var t={5067:(t,e,n)=>{var i=n(1672);n(1048),n(5412),n(46),n(6108),n(6343),e.connect=i.connect},1672:(t,e,n)=>{var i=n(1048),o=n(46),r=n(6108),s=n(6343),a=n(5412);const c=(t,e)=>`${e}<${btoa(JSON.stringify(t))}>`;var d="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==n.g?n.g:"undefined"!=typeof self?self:{},h={},l={},u={},p={};async function f(t){const e=[];for(const n of t){const t=await n();e.push(t)}return e}Object.defineProperty(p,"__esModule",{value:!0}),p.promiseMapSerial=p.serial=p.promiseMap=p.promisify=void 0,p.promisify=function(t){return(...e)=>new Promise(((n,i)=>{t(...e,((t,e)=>t?i(t):n(e)))}))},p.promiseMap=async function(t,e){return Promise.all(t.map(e))},p.serial=f,p.promiseMapSerial=async function(t,e){return f(t.map(((t,n,i)=>()=>e(t,n,i))))};var m,w=d&&d.__classPrivateFieldSet||function(t,e,n,i,o){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?o.call(t,n):o?o.value=n:e.set(t,n),n},y=d&&d.__classPrivateFieldGet||function(t,e,n,i){if("a"===n&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(t):i?i.value:e.get(t)};Object.defineProperty(u,"__esModule",{value:!0}),u.Reply=u.EmitterBase=u.Base=void 0;const g=p;class v{constructor(t){this.isNodeEnvironment=()=>"node"===this.wire.environment.type,this.isOpenFinEnvironment=()=>"openfin"===this.wire.environment.type,this.isBrowserEnvironment=()=>"other"===this.wire.environment.type,this.wire=t}get fin(){return this.wire.getFin()}get me(){return this.wire.me}}u.Base=v,u.EmitterBase=class extends v{constructor(t,e,...n){super(t),this.topic=e,m.set(this,void 0),this.eventNames=()=>this.hasEmitter()?this.getOrCreateEmitter().eventNames():[],this.emit=(t,e,...n)=>!!this.hasEmitter()&&this.getOrCreateEmitter().emit(t,e,...n),this.hasEmitter=()=>this.wire.eventAggregator.has(y(this,m,"f")),this.getOrCreateEmitter=()=>this.wire.eventAggregator.getOrCreate(y(this,m,"f")),this.listeners=t=>this.hasEmitter()?this.getOrCreateEmitter().listeners(t):[],this.listenerCount=t=>this.hasEmitter()?this.getOrCreateEmitter().listenerCount(t):0,this.registerEventListener=async(t,e={},n,i)=>{const o={...this.identity,timestamp:e.timestamp||Date.now(),topic:this.topic,type:t},r=this.getOrCreateEmitter();n(r);try{await this.wire.sendAction("subscribe-to-desktop-event",o)}catch(t){throw i(r),this.deleteEmitterIfNothingRegistered(r),t}},this.deregisterEventListener=async(t,e={})=>{if(this.hasEmitter()){const n={...this.identity,timestamp:e.timestamp||Date.now(),topic:this.topic,type:t};return await this.wire.sendAction("unsubscribe-to-desktop-event",n).catch((()=>null)),this.getOrCreateEmitter()}return Promise.resolve()},w(this,m,[e,...n],"f"),this.listeners=t=>this.hasEmitter()?this.getOrCreateEmitter().listeners(t):[]}async on(t,e,n){return await this.registerEventListener(t,n,(n=>{n.on(t,e)}),(n=>{n.removeListener(t,e)})),this}async addListener(t,e,n){return this.on(t,e,n)}async once(t,e,n){const i=()=>this.deregisterEventListener(t);return await this.registerEventListener(t,n,(n=>{n.once(t,i),n.once(t,e)}),(n=>{n.removeListener(t,i),n.removeListener(t,e)})),this}async prependListener(t,e,n){return await this.registerEventListener(t,n,(n=>{n.prependListener(t,e)}),(n=>{n.removeListener(t,e)})),this}async prependOnceListener(t,e,n){const i=()=>this.deregisterEventListener(t);return await this.registerEventListener(t,n,(n=>{n.prependOnceListener(t,e),n.once(t,i)}),(n=>{n.removeListener(t,e),n.removeListener(t,i)})),this}async removeListener(t,e,n){const i=await this.deregisterEventListener(t,n);return i&&(i.removeListener(t,e),this.deleteEmitterIfNothingRegistered(i)),this}async deregisterAllListeners(t){const e={...this.identity,type:t,topic:this.topic};if(this.hasEmitter()){const t=this.getOrCreateEmitter(),n=t.listenerCount(e.type),i=[];for(let t=0;tnull)));return await Promise.all(i),t}}async removeAllListeners(t){const e=async t=>{const e=await this.deregisterAllListeners(t);e&&(e.removeAllListeners(t),this.deleteEmitterIfNothingRegistered(e))};if(t)await e(t);else if(this.hasEmitter()){const t=this.getOrCreateEmitter().eventNames();await(0,g.promiseMap)(t,e)}return this}deleteEmitterIfNothingRegistered(t){0===t.eventNames().length&&this.wire.eventAggregator.delete(y(this,m,"f"))}},m=new WeakMap,u.Reply=class{};var C={};Object.defineProperty(C,"__esModule",{value:!0});var b=C.RuntimeError=C.NotSupportedError=C.NotImplementedError=C.NoAckError=C.DuplicateCorrelationError=C.UnexpectedActionError=C.DisconnectedError=void 0;class _ extends Error{constructor(t){super(`Expected websocket state OPEN but found ${t}`),this.readyState=t}}C.DisconnectedError=_;class I extends Error{}C.UnexpectedActionError=I;class E extends Error{}C.DuplicateCorrelationError=E;class x extends Error{}C.NoAckError=x;class S extends Error{}C.NotImplementedError=S;class A extends Error{}C.NotSupportedError=A;class P extends Error{constructor(t){const{message:e,name:n,stack:i,...o}=t;super(e),this.name=n||"Error",this.stack=i??this.toString(),Object.keys(o).forEach((t=>{this[t]=o[t]}))}}class M extends Error{static getCallSite(t=0){const e=Error.stackTraceLimit,n=t+1;Error.stackTraceLimit=e+n;const i=Error.prepareStackTrace;Error.prepareStackTrace=(t,e)=>e;const o=(new Error).stack?.slice(n)??[];return Error.prepareStackTrace=i,Error.stackTraceLimit=e,o}static prepareStackTrace(t,e){if("function"==typeof Error.prepareStackTrace)return Error.prepareStackTrace(t,e);let n="";n+=t.name||"Error",n+=`: ${t.message||""}`;for(const t of e)n+=`\n at ${t.toString()}`;return n}constructor(t,e){const{reason:n,error:i}=t;super(n),this.name="RuntimeError",i?.stack&&(this.cause=new P(i)),e&&(this.stack=M.prepareStackTrace(this,e))}}b=C.RuntimeError=M;var L={},O={},R={};Object.defineProperty(R,"__esModule",{value:!0}),R.validateIdentity=void 0,R.validateIdentity=function(t){let e;return"object"==typeof t&&"string"==typeof t.uuid||(e="Not a valid identity object"),e};var T,k={},j={},B={},z={},F={},D={},U={};Object.defineProperty(U,"__esModule",{value:!0}),U.handleDeprecatedWarnings=void 0,U.handleDeprecatedWarnings=t=>{(t.contentNavigation?.whitelist||t.contentNavigation?.blacklist||t.contentRedirect?.whitelist||t.contentRedirect?.blacklist)&&console.warn("The properties 'whitelist' and 'blacklist' have been marked as deprecated and will be removed in a future version. Please use 'allowlist' and 'denylist'.")};var W={},$={};Object.defineProperty($,"__esModule",{value:!0}),$.AsyncRetryableLazy=V=$.Lazy=void 0;var V=$.Lazy=class{constructor(t){this.producerFn=t}getValue(){return this.value||(this.value=this.producerFn()),this.value}};$.AsyncRetryableLazy=class{constructor(t){this.producerFn=t}async getValue(){return this.promise||(this.promise=this.producerFn().catch((t=>{throw delete this.promise,t}))),this.promise}};var H={};Object.defineProperty(H,"__esModule",{value:!0}),H.WebContents=void 0;const N=u;class G extends N.EmitterBase{constructor(t,e,n){super(t,n,e.uuid,e.name),this.identity=e,this.entityType=n}capturePage(t){return this.wire.sendAction("capture-page",{options:t,...this.identity}).then((({payload:t})=>t.data))}executeJavaScript(t){return this.wire.sendAction("execute-javascript-in-window",{...this.identity,code:t}).then((({payload:t})=>t.data))}getZoomLevel(){return this.wire.sendAction("get-zoom-level",this.identity).then((({payload:t})=>t.data))}setZoomLevel(t){return this.wire.sendAction("set-zoom-level",{...this.identity,level:t}).then((()=>{}))}navigate(t){return this.wire.sendAction("navigate-window",{...this.identity,url:t}).then((()=>{}))}navigateBack(){return this.wire.sendAction("navigate-window-back",{...this.identity}).then((()=>{}))}async navigateForward(){await this.wire.sendAction("navigate-window-forward",{...this.identity})}stopNavigation(){return this.wire.sendAction("stop-window-navigation",{...this.identity}).then((()=>{}))}reload(t=!1){return this.wire.sendAction("reload-window",{ignoreCache:t,...this.identity}).then((()=>{}))}print(t={}){return this.wire.sendAction("print",{...this.identity,options:t}).then((()=>{}))}findInPage(t,e){return this.wire.sendAction("find-in-page",{...this.identity,searchTerm:t,options:e}).then((({payload:t})=>t.data))}stopFindInPage(t){return this.wire.sendAction("stop-find-in-page",{...this.identity,action:t}).then((()=>{}))}getPrinters(){return this.wire.sendAction("get-printers",{...this.identity}).then((({payload:t})=>t.data))}async focus({emitSynthFocused:t}={emitSynthFocused:!0}){await this.wire.sendAction("focus-window",{emitSynthFocused:t,...this.identity})}async showDeveloperTools(){await this.wire.sendAction("show-developer-tools",this.identity)}async getProcessInfo(){const{payload:{data:t}}=await this.wire.sendAction("get-process-info",this.identity);return t}async getSharedWorkers(){return this.wire.sendAction("get-shared-workers",this.identity).then((({payload:t})=>t.data))}async inspectSharedWorker(){await this.wire.sendAction("inspect-shared-worker",{...this.identity})}async inspectSharedWorkerById(t){await this.wire.sendAction("inspect-shared-worker-by-id",{...this.identity,workerId:t})}async inspectServiceWorker(){await this.wire.sendAction("inspect-service-worker",{...this.identity})}async showPopupWindow(t){if(this.wire.sendAction(`${this.entityType}-show-popup-window`,this.identity).catch((()=>{})),t?.onPopupReady){const e=async({popupName:e})=>{try{const n=this.fin.Window.wrapSync({uuid:this.fin.me.uuid,name:e});await t.onPopupReady(n)}catch(t){throw new Error(`Something went wrong during onPopupReady execution: ${t}`)}};await this.once("popup-ready",e)}const{payload:e}=await this.wire.sendAction("try-create-popup-window",{options:{...t,hasResultCallback:!!t?.onPopupResult,hasReadyCallback:!!t?.onPopupReady},...this.identity}),{data:{willOpen:n,options:i}}=e;if(n&&await this.fin.Window.create(i.initialOptions),t?.onPopupResult){const e=async e=>{await t.onPopupResult((t=>{const{name:e,uuid:n,result:i,data:o}=t,r={identity:{name:e,uuid:n},result:i};return o&&(r.data=o),r})(e))},n=async()=>{await this.removeListener("popup-result",e)};await this.on("popup-result",e),await this.once("popup-teardown",n)}const{payload:o}=await this.wire.sendAction("show-popup-window",{options:i,...this.identity});return o.data}}var q,Y,K,Z,J;function X(){return Y||(Y=1,function(t){var e=d&&d.__createBinding||(Object.create?function(t,e,n,i){void 0===i&&(i=n);var o=Object.getOwnPropertyDescriptor(e,n);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,o)}:function(t,e,n,i){void 0===i&&(i=n),t[i]=e[n]}),n=d&&d.__exportStar||function(t,n){for(var i in t)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||e(n,t,i)};Object.defineProperty(t,"__esModule",{value:!0}),n(function(){if(T)return D;T=1,Object.defineProperty(D,"__esModule",{value:!0}),D.ViewModule=void 0;const t=u,e=R,n=X(),i=U;class o extends t.Base{async create(t){const{uuid:e}=this.wire.me;if(!t.name||"string"!=typeof t.name)throw new Error("Please provide a name property as a string in order to create a View.");return(0,i.handleDeprecatedWarnings)(t),this.wire.environment.childViews?await this.wire.environment.createChildContent({entityType:"view",options:{...t,uuid:e}}):await this.wire.sendAction("create-view",{...t,uuid:e}),this.wrapSync({uuid:e,name:t.name})}async wrap(t){this.wire.sendAction("view-wrap").catch((t=>{}));const i=(0,e.validateIdentity)(t);if(i)throw new Error(i);return new n.View(this.wire,t)}wrapSync(t){this.wire.sendAction("view-wrap-sync").catch((t=>{}));const i=(0,e.validateIdentity)(t);if(i)throw new Error(i);return new n.View(this.wire,t)}getCurrent(){if(this.wire.sendAction("view-get-current").catch((t=>{})),!this.wire.me.isView)throw new Error("You are not in a View context");const{uuid:t,name:e}=this.wire.me;return this.wrap({uuid:t,name:e})}getCurrentSync(){if(this.wire.sendAction("view-get-current-sync").catch((t=>{})),!this.wire.me.isView)throw new Error("You are not in a View context");const{uuid:t,name:e}=this.wire.me;return this.wrapSync({uuid:t,name:e})}}return D.ViewModule=o,D}(),t),n(function(){if(q)return W;var t;q=1,Object.defineProperty(W,"__esModule",{value:!0}),W.View=void 0;const e=C,n=$,i=H,o=st();class r extends i.WebContents{constructor(i,r){super(i,r,"view"),this.identity=r,t.set(this,new n.Lazy((()=>this.fin.Platform.wrapSync(this.identity).getClient()))),this.attach=async t=>{await this.wire.sendAction("attach-view",{target:t,...this.identity})},this.destroy=async()=>{await this.wire.sendAction("destroy-view",{...this.identity})},this.show=async()=>{await this.wire.sendAction("show-view",{...this.identity})},this.showAt=async(t,e={})=>{await this.wire.sendAction("show-view-at",{bounds:t,...this.identity,options:e})},this.bringToFront=async()=>{await this.wire.sendAction("bring-view-to-front",{...this.identity})},this.hide=async()=>{await this.wire.sendAction("hide-view",{...this.identity})},this.setBounds=async t=>{await this.wire.sendAction("set-view-bounds",{bounds:t,...this.identity})},this.getBounds=async()=>(await this.wire.sendAction("get-view-bounds",{...this.identity})).payload.data,this.getInfo=async()=>(await this.wire.sendAction("get-view-info",{...this.identity})).payload.data,this.getParentLayout=async()=>(this.wire.sendAction("view-get-parent-layout",{...this.identity}).catch((()=>{})),this.fin.Platform.Layout.getLayoutByViewIdentity(this.identity)),this.getOptions=async()=>this.wire.sendAction("get-view-options",{...this.identity}).then((({payload:t})=>t.data)),this.updateOptions=async t=>this.wire.sendAction("update-view-options",{options:t,...this.identity}).then((()=>{})),this.getCurrentWindow=async()=>{const{payload:{data:t}}=await this.wire.sendAction("get-view-window",{...this.identity});return new o._Window(this.wire,t)},this.getCurrentStack=async()=>{this.wire.sendAction("view-get-current-stack").catch((()=>{}));try{return(await this.getParentLayout()).getStackByViewIdentity(this.identity)}catch(t){throw new e.RuntimeError({reason:"This view does not belong to a stack.",error:t})}},this.triggerBeforeUnload=async()=>(await this.wire.sendAction("trigger-before-unload",{...this.identity})).payload.data,this.bindToElement=async t=>{if(!t)throw new Error("Element not found.");return this.wire.environment.observeBounds(t,(async t=>this.setBounds(t)))}}async focus({emitSynthFocused:t}={emitSynthFocused:!0}){const e=await this.getCurrentWindow();await e.focusedWebViewWasChanged(),await super.focus({emitSynthFocused:t})}}return W.View=r,t=new WeakMap,W}(),t)}(F)),F}function Q(){if(K)return z;K=1,Object.defineProperty(z,"__esModule",{value:!0}),z.Application=void 0;const t=u,e=st(),n=X();class i extends t.EmitterBase{constructor(t,n){super(t,"application",n.uuid),this.identity=n,this.window=new e._Window(this.wire,{uuid:this.identity.uuid,name:this.identity.uuid})}windowListFromIdentityList(t){const n=[];return t.forEach((t=>{n.push(new e._Window(this.wire,{uuid:t.uuid,name:t.name}))})),n}isRunning(){return this.wire.sendAction("is-application-running",this.identity).then((({payload:t})=>t.data))}async quit(t=!1){try{await this._close(t),await this.wire.sendAction("destroy-application",{force:t,...this.identity})}catch(t){if(!["Remote connection has closed","Could not locate the requested application"].some((e=>t.message.includes(e))))throw t}}async _close(t=!1){try{await this.wire.sendAction("close-application",{force:t,...this.identity})}catch(t){if(!t.message.includes("Remote connection has closed"))throw t}}close(t=!1){return console.warn("Deprecation Warning: Application.close is deprecated Please use Application.quit"),this.wire.sendAction("application-close",this.identity).catch((t=>{})),this._close(t)}getChildWindows(){return this.wire.sendAction("get-child-windows",this.identity).then((({payload:t})=>{const e=[];return t.data.forEach((t=>{e.push({uuid:this.identity.uuid,name:t})})),this.windowListFromIdentityList(e)}))}getManifest(){return this.wire.sendAction("get-application-manifest",this.identity).then((({payload:t})=>t.data))}getParentUuid(){return this.wire.sendAction("get-parent-application",this.identity).then((({payload:t})=>t.data))}getShortcuts(){return this.wire.sendAction("get-shortcuts",this.identity).then((({payload:t})=>t.data))}async getViews(){const{payload:t}=await this.wire.sendAction("application-get-views",this.identity);return t.data.map((t=>new n.View(this.wire,t)))}getZoomLevel(){return this.wire.sendAction("get-application-zoom-level",this.identity).then((({payload:t})=>t.data))}getWindow(){return this.wire.sendAction("application-get-window",this.identity).catch((t=>{})),Promise.resolve(this.window)}registerUser(t,e){return this.wire.sendAction("register-user",{userName:t,appName:e,...this.identity}).then((()=>{}))}removeTrayIcon(){return this.wire.sendAction("remove-tray-icon",this.identity).then((()=>{}))}restart(){return this.wire.sendAction("restart-application",this.identity).then((()=>{}))}run(){return console.warn("Deprecation Warning: Application.run is deprecated Please use fin.Application.start"),this.wire.sendAction("application-run",this.identity).catch((t=>{})),this._run()}_run(t={}){return this.wire.sendAction("run-application",{manifestUrl:this._manifestUrl,opts:t,...this.identity}).then((()=>{}))}scheduleRestart(){return this.wire.sendAction("relaunch-on-close",this.identity).then((()=>{}))}async sendApplicationLog(){const{payload:t}=await this.wire.sendAction("send-application-log",this.identity);return t.data}async setJumpList(t){await this.wire.sendAction("set-jump-list",{config:t,...this.identity})}setTrayIcon(t){return this.wire.sendAction("set-tray-icon",{enabledIcon:t,...this.identity}).then((()=>{}))}setShortcuts(t){return this.wire.sendAction("set-shortcuts",{data:t,...this.identity}).then((()=>{}))}async setShortcutQueryParams(t){await this.wire.sendAction("set-shortcut-query-args",{data:t,...this.identity})}setZoomLevel(t){return this.wire.sendAction("set-application-zoom-level",{level:t,...this.identity}).then((()=>{}))}async setAppLogUsername(t){await this.wire.sendAction("set-app-log-username",{data:t,...this.identity})}getTrayIconInfo(){return this.wire.sendAction("get-tray-icon-info",this.identity).then((({payload:t})=>t.data))}hasTrayIcon(){return this.wire.sendAction("has-tray-icon",this.identity).then((({payload:t})=>t.data))}terminate(){return this.wire.sendAction("terminate-application",this.identity).then((()=>{}))}wait(){return this.wire.sendAction("wait-for-hung-application",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction("get-info",this.identity).then((({payload:t})=>t.data))}async getProcessInfo(){const{payload:{data:t}}=await this.wire.sendAction("application-get-process-info",this.identity);return t}async setFileDownloadLocation(t){const{name:e}=this.wire.me,n={uuid:this.identity.uuid,name:e};await this.wire.sendAction("set-file-download-location",{...n,downloadLocation:t})}async getFileDownloadLocation(){const{payload:{data:t}}=await this.wire.sendAction("get-file-download-location",this.identity);return t}async showTrayIconPopupMenu(t){const{name:e}=this.wire.me,n={uuid:this.identity.uuid,name:e},{payload:i}=await this.wire.sendAction("show-tray-icon-popup-menu",{...n,options:t});return i.data}async closeTrayIconPopupMenu(){const{name:t}=this.wire.me,e={uuid:this.identity.uuid,name:t};await this.wire.sendAction("close-tray-icon-popup-menu",{...e})}}return z.Application=i,z}function tt(){return J||(J=1,function(t){var e=d&&d.__createBinding||(Object.create?function(t,e,n,i){void 0===i&&(i=n);var o=Object.getOwnPropertyDescriptor(e,n);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,o)}:function(t,e,n,i){void 0===i&&(i=n),t[i]=e[n]}),n=d&&d.__exportStar||function(t,n){for(var i in t)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||e(n,t,i)};Object.defineProperty(t,"__esModule",{value:!0}),n(function(){if(Z)return B;Z=1,Object.defineProperty(B,"__esModule",{value:!0}),B.ApplicationModule=void 0;const t=u,e=R,n=Q();class i extends t.Base{async wrap(t){this.wire.sendAction("wrap-application").catch((t=>{}));const i=(0,e.validateIdentity)(t);if(i)throw new Error(i);return new n.Application(this.wire,t)}wrapSync(t){this.wire.sendAction("wrap-application-sync").catch((t=>{}));const i=(0,e.validateIdentity)(t);if(i)throw new Error(i);return new n.Application(this.wire,t)}async _create(t){return void 0===t.waitForPageLoad&&(t.waitForPageLoad=!1),void 0===t.autoShow&&void 0===t.isPlatformController&&(t.autoShow=!0),await this.wire.sendAction("create-application",t),this.wrap({uuid:t.uuid})}create(t){return console.warn("Deprecation Warning: fin.Application.create is deprecated. Please use fin.Application.start"),this.wire.sendAction("application-create").catch((t=>{})),this._create(t)}async start(t){this.wire.sendAction("start-application").catch((t=>{}));const e=await this._create(t);return await this.wire.sendAction("run-application",{uuid:t.uuid}),e}async startManyManifests(t,e){return this.wire.sendAction("run-applications",{applications:t,opts:e}).then((()=>{}))}getCurrent(){return this.wire.sendAction("get-current-application").catch((t=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction("get-current-application-sync").catch((t=>{})),this.wrapSync({uuid:this.wire.me.uuid})}async startFromManifest(t,e){this.wire.sendAction("application-start-from-manifest").catch((t=>{}));const n=await this._createFromManifest(t);return await n._run(e),n}createFromManifest(t){return console.warn("Deprecation Warning: fin.Application.createFromManifest is deprecated. Please use fin.Application.startFromManifest"),this.wire.sendAction("application-create-from-manifest").catch((t=>{})),this._createFromManifest(t)}_createFromManifest(t){return this.wire.sendAction("get-application-manifest",{manifestUrl:t}).then((({payload:t})=>{const e=t.data.platform?t.data.platform.uuid:t.data.startup_app.uuid;return this.wrap({uuid:e})})).then((e=>(e._manifestUrl=t,e)))}}return B.ApplicationModule=i,B}(),t),n(Q(),t)}(j)),j}H.WebContents=G;var et,nt,it,ot={};function rt(){if(et)return k;et=1,Object.defineProperty(k,"__esModule",{value:!0}),k._Window=void 0;const t=tt(),e=H,n=X(),i=U,o=ot;class r extends e.WebContents{constructor(t,e){super(t,e,"window")}async createWindow(t){this.wire.sendAction("window-create-window",this.identity).catch((t=>{}));const e=await(0,o.promisifySubscription)(this,"fire-constructor-callback");void 0===t.waitForPageLoad&&(t.waitForPageLoad=!1),void 0===t.autoShow&&(t.autoShow=!0),(0,i.handleDeprecatedWarnings)(t);const n=this.wire.environment.createChildContent({entityType:"window",options:t}),[r]=await Promise.all([e.getValue(),n]);let s;const{success:a}=r,c=r.data,{message:d}=c;s=a?{httpResponseCode:c.httpResponseCode,apiInjected:c.apiInjected}:{message:c.message,networkErrorCode:c.networkErrorCode,stack:c.stack};const h={message:d,cbPayload:s,success:a};try{this.getWebWindow().fin.__internal_.openerSuccessCBCalled()}catch(t){}return h.success?this:Promise.reject(h)}getAllFrames(){return this.wire.sendAction("get-all-frames",this.identity).then((({payload:t})=>t.data))}getBounds(){return this.wire.sendAction("get-window-bounds",this.identity).then((({payload:t})=>t.data))}center(){return this.wire.sendAction("center-window",this.identity).then((()=>{}))}blur(){return this.wire.sendAction("blur-window",this.identity).then((()=>{}))}bringToFront(){return this.wire.sendAction("bring-window-to-front",this.identity).then((()=>{}))}animate(t,e){return this.wire.sendAction("animate-window",{transitions:t,options:e,...this.identity}).then((()=>{}))}hide(){return this.wire.sendAction("hide-window",this.identity).then((()=>{}))}close(t=!1){return this.wire.sendAction("close-window",{force:t,...this.identity}).then((()=>{Object.setPrototypeOf(this,null)}))}focusedWebViewWasChanged(){return this.wire.sendAction("focused-webview-changed",this.identity).then((()=>{}))}getNativeId(){return this.wire.sendAction("get-window-native-id",this.identity).then((({payload:t})=>t.data))}async getCurrentViews(){const{payload:t}=await this.wire.sendAction("window-get-views",this.identity);return t.data.map((t=>new n.View(this.wire,t)))}disableFrame(){return console.warn("Function is deprecated; use disableUserMovement instead."),this.wire.sendAction("disable-window-frame",this.identity).then((()=>{}))}disableUserMovement(){return this.wire.sendAction("disable-window-frame",this.identity).then((()=>{}))}enableFrame(){return console.warn("Function is deprecated; use enableUserMovement instead."),this.wire.sendAction("enable-window-frame",this.identity).then((()=>{}))}enableUserMovement(){return this.wire.sendAction("enable-window-frame",this.identity).then((()=>{}))}flash(){return this.wire.sendAction("flash-window",this.identity).then((()=>{}))}stopFlashing(){return this.wire.sendAction("stop-flash-window",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction("get-window-info",this.identity).then((({payload:t})=>t.data))}async getLayout(t){this.wire.sendAction("window-get-layout",this.identity).catch((t=>{}));const e=await this.getOptions();if(!e.layout&&!e.layoutSnapshot)throw new Error("Window does not have a Layout");return this.fin.Platform.Layout.wrap(t??this.identity)}getOptions(){return this.wire.sendAction("get-window-options",this.identity).then((({payload:t})=>t.data))}getParentApplication(){return this.wire.sendAction("window-get-parent-application",this.identity).catch((t=>{})),Promise.resolve(new t.Application(this.wire,this.identity))}getParentWindow(){return this.wire.sendAction("window-get-parent-window",this.identity).catch((t=>{})),Promise.resolve(new t.Application(this.wire,this.identity)).then((t=>t.getWindow()))}async getSnapshot(t){const e={area:t,...this.identity};return console.warn("Window.getSnapshot has been deprecated, please use Window.capturePage"),(await this.wire.sendAction("get-window-snapshot",e)).payload.data}getState(){return this.wire.sendAction("get-window-state",this.identity).then((({payload:t})=>t.data))}getWebWindow(){return this.wire.sendAction("window-get-web-window",this.identity).catch((t=>{})),this.wire.environment.getWebWindow(this.identity)}isMainWindow(){return this.wire.sendAction("window-is-main-window",this.identity).catch((t=>{})),this.me.uuid===this.me.name}isShowing(){return this.wire.sendAction("is-window-showing",this.identity).then((({payload:t})=>t.data))}maximize(){return this.wire.sendAction("maximize-window",this.identity).then((()=>{}))}minimize(){return this.wire.sendAction("minimize-window",this.identity).then((()=>{}))}moveBy(t,e,n){return this.wire.sendAction("move-window-by",{deltaLeft:t,deltaTop:e,positioningOptions:n,...this.identity}).then((()=>{}))}moveTo(t,e,n){return this.wire.sendAction("move-window",{left:t,top:e,positioningOptions:n,...this.identity}).then((()=>{}))}resizeBy(t,e,n,i){return this.wire.sendAction("resize-window-by",{deltaWidth:Math.floor(t),deltaHeight:Math.floor(e),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}resizeTo(t,e,n,i){return this.wire.sendAction("resize-window",{width:Math.floor(t),height:Math.floor(e),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}restore(){return this.wire.sendAction("restore-window",this.identity).then((()=>{}))}setAsForeground(){return this.wire.sendAction("set-foreground-window",this.identity).then((()=>{}))}setBounds(t,e){return this.wire.sendAction("set-window-bounds",{...t,...this.identity,positioningOptions:e}).then((()=>{}))}show(t=!1){return this.wire.sendAction("show-window",{force:t,...this.identity}).then((()=>{}))}showAt(t,e,n=!1){return this.wire.sendAction("show-at-window",{force:n,left:Math.floor(t),top:Math.floor(e),...this.identity}).then((()=>{}))}updateOptions(t){return this.wire.sendAction("update-window-options",{options:t,...this.identity}).then((()=>{}))}authenticate(t,e){return this.wire.sendAction("window-authenticate",{userName:t,password:e,...this.identity}).then((()=>{}))}async showPopupMenu(t){const{payload:e}=await this.wire.sendAction("show-popup-menu",{options:t,...this.identity});return e.data}async closePopupMenu(){return this.wire.sendAction("close-popup-menu",{...this.identity}).then((()=>{}))}async dispatchPopupResult(t){this.wire.sendAction("window-dispatch-popup-result",this.identity).catch((t=>{})),await this.wire.sendAction("dispatch-popup-result",{data:t,...this.identity})}async print(t={content:"self"}){switch(t.content){case void 0:case"self":return super.print(t);case"screenshot":return this.wire.sendAction("print-screenshot",this.identity).then((()=>{}));case"views":return this.wire.sendAction("print-views",{...this.identity,options:t}).then((()=>{}));default:return}}}return k._Window=r,k}function st(){return it||(it=1,function(t){var e=d&&d.__createBinding||(Object.create?function(t,e,n,i){void 0===i&&(i=n);var o=Object.getOwnPropertyDescriptor(e,n);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,o)}:function(t,e,n,i){void 0===i&&(i=n),t[i]=e[n]}),n=d&&d.__exportStar||function(t,n){for(var i in t)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||e(n,t,i)};Object.defineProperty(t,"__esModule",{value:!0}),n(function(){if(nt)return O;nt=1,Object.defineProperty(O,"__esModule",{value:!0}),O._WindowModule=void 0;const t=u,e=R,n=rt();class i extends t.Base{async wrap(t){this.wire.sendAction("window-wrap").catch((t=>{}));const i=(0,e.validateIdentity)(t);if(i)throw new Error(i);return new n._Window(this.wire,t)}wrapSync(t){this.wire.sendAction("window-wrap-sync").catch((t=>{}));const i=(0,e.validateIdentity)(t);if(i)throw new Error(i);return new n._Window(this.wire,t)}create(t){return this.wire.sendAction("create-window").catch((t=>{})),new n._Window(this.wire,{uuid:this.me.uuid,name:t.name}).createWindow(t)}getCurrent(){if(this.wire.sendAction("get-current-window").catch((t=>{})),!this.wire.me.isWindow)throw new Error("You are not in a Window context");const{uuid:t,name:e}=this.wire.me;return this.wrap({uuid:t,name:e})}getCurrentSync(){if(this.wire.sendAction("get-current-window-sync").catch((t=>{})),!this.wire.me.isWindow)throw new Error("You are not in a Window context");const{uuid:t,name:e}=this.wire.me;return this.wrapSync({uuid:t,name:e})}}return O._WindowModule=i,O}(),t),n(rt(),t)}(L)),L}Object.defineProperty(ot,"__esModule",{value:!0}),ot.promisifySubscription=void 0,ot.promisifySubscription=async(t,e,n=()=>!0,i)=>{let o,r,s;const a=new Promise(((t,e)=>{o=t,r=e})),c=t=>{n(t)&&(clearTimeout(s),o(t))};return await t.on(e,c),i&&(s=setTimeout((()=>r(new Error("event timed out"))),i)),a.finally((()=>{t.removeListener(e,c).catch((()=>null))})),{getValue:()=>a}},Object.defineProperty(l,"__esModule",{value:!0}),l.System=void 0;const at=u,ct=C,dt=st(),ht=o;class lt extends at.EmitterBase{constructor(t){super(t,"system")}sendExternalProcessRequest(t,e){return new Promise(((n,i)=>{const o="external-process-exited";let r,s,a,c;"function"==typeof e.listener&&(a=t=>{const n=t||{};s={topic:"exited",uuid:n.processUuid||"",exitCode:n.exitCode||0},r===t.processUuid&&(e.listener(s),c.removeListener(o,a))},this.wire.me.name||(this.wire.me.name=this.wire.me.uuid),c=new dt._Window(this.wire,this.wire.me),c.on(o,a)),this.wire.sendAction(t,e).then((({payload:t})=>{r=t.data.uuid,n(t.data),s&&r===s.uuid&&(e.listener(s),c.removeListener(o,a))})).catch((t=>{c&&c.removeListener(o,a),i(t)}))}))}getVersion(){return this.wire.sendAction("get-version").then((({payload:t})=>t.data))}clearCache(t){return this.wire.sendAction("clear-cache",t).then((()=>{}))}deleteCacheOnExit(){return this.wire.sendAction("delete-cache-request").then((()=>{}))}exit(){return this.wire.sendAction("exit-desktop").then((()=>{}))}async fetchManifest(t){const{payload:{data:e}}=await this.wire.sendAction("fetch-manifest",{manifestUrl:t});return e}flushCookieStore(){return this.wire.sendAction("flush-cookie-store").then((()=>{}))}getAllWindows(){return this.wire.sendAction("get-all-windows").then((({payload:t})=>t.data))}getAllApplications(){return this.wire.sendAction("get-all-applications").then((({payload:t})=>t.data))}getCommandLineArguments(){return this.wire.sendAction("get-command-line-arguments").then((({payload:t})=>t.data))}async getCrashReporterState(){const{payload:{data:{diagnosticMode:t,isRunning:e}}}=await this.wire.sendAction("get-crash-reporter-state");return console.warn("diagnosticMode property is deprecated. It will be removed in a future version"),{diagnosticMode:t,diagnosticsMode:t,isRunning:e}}async startCrashReporter(t){const e=t,n={...e,diagnosticMode:e.diagnosticsMode||e.diagnosticMode},{payload:{data:{diagnosticMode:i,isRunning:o}}}=await this.wire.sendAction("start-crash-reporter",n);return{diagnosticMode:i,diagnosticsMode:i,isRunning:o}}getUniqueUserId(){return this.wire.sendAction("get-unique-user-id").then((({payload:t})=>t.data))}getEntityInfo(t,e){return this.wire.sendAction("get-entity-info",{uuid:t,name:e}).then((({payload:t})=>t.data))}getEnvironmentVariable(t){return this.wire.sendAction("get-environment-variable",{environmentVariables:t}).then((({payload:t})=>t.data))}getFocusedWindow(){return this.wire.sendAction("get-focused-window").then((({payload:t})=>t.data))}async isAppCertified(t){const{payload:{data:{certifiedInfo:e}}}=await this.wire.sendAction("is-app-certified",{manifestUrl:t});return e}getInstalledRuntimes(){return this.wire.sendAction("get-installed-runtimes").then((({payload:t})=>t.data.runtimes))}async getInstalledApps(){const{payload:{data:{installedApps:t}}}=await this.wire.sendAction("get-installed-apps");return t}getLog(t){return this.wire.sendAction("view-log",t).then((({payload:t})=>t.data))}getMachineId(){return this.wire.sendAction("get-machine-id").then((({payload:t})=>t.data))}getMinLogLevel(){return this.wire.sendAction("get-min-log-level").then((({payload:t})=>t.data))}getLogList(){return this.wire.sendAction("list-logs").then((({payload:t})=>t.data))}getMonitorInfo(){return this.wire.sendAction("get-monitor-info").then((({payload:t})=>t.data))}getMousePosition(){return this.wire.sendAction("get-mouse-position").then((({payload:t})=>t.data))}getProcessList(){return console.warn("System.getProcessList has been deprecated. Please consider using our new process APIs: Window.getProcessInfo, View.getProcessInfo, Application.getProcessInfo, System.getAllProcessInfo"),this.wire.sendAction("process-snapshot").then((({payload:t})=>t.data))}async getAllProcessInfo(){const{payload:{data:t}}=await this.wire.sendAction("get-all-process-info",this.identity);return t}getProxySettings(){return this.wire.sendAction("get-proxy-settings").then((({payload:t})=>t.data))}getRuntimeInfo(){return this.wire.sendAction("get-runtime-info").then((({payload:t})=>t.data))}getRvmInfo(){return this.wire.sendAction("get-rvm-info").then((({payload:t})=>t.data))}getHostSpecs(){return this.wire.sendAction("get-host-specs").then((({payload:t})=>t.data))}getOSInfo(){return this.wire.sendAction("get-os-info").then((({payload:t})=>t.data))}launchExternalProcess(t){return this.sendExternalProcessRequest("launch-external-process",t)}monitorExternalProcess(t){return this.sendExternalProcessRequest("monitor-external-process",t)}log(t,e){return this.wire.sendAction("write-to-log",{level:t,message:e}).then((()=>{}))}openUrlWithBrowser(t){return this.wire.sendAction("open-url-with-browser",{url:t}).then((()=>{}))}async registerCustomProtocol(t){if("object"!=typeof t)throw new Error("Must provide an object with a `protocolName` property having a string value.");await this.wire.sendAction("register-custom-protocol",t)}async unregisterCustomProtocol(t){await this.wire.sendAction("unregister-custom-protocol",{protocolName:t})}async getCustomProtocolState(t){return this.wire.sendAction("get-custom-protocol-state",{protocolName:t}).then((({payload:t})=>t.data))}releaseExternalProcess(t){return this.wire.sendAction("release-external-process",{uuid:t}).then((()=>{}))}showDeveloperTools(t){return this.wire.sendAction("show-developer-tools",t).then((()=>{}))}terminateExternalProcess(t){return this.wire.sendAction("terminate-external-process",t).then((()=>{}))}updateProxySettings(t){return this.wire.sendAction("update-proxy",t).then((()=>{}))}async downloadAsset(t,e){const n=()=>{};let i=n,o=n;const r=new Promise(((t,e)=>{i=t,o=e}));if("openfin"!==this.wire.environment.type)throw new ct.NotSupportedError("downloadAsset only supported in an OpenFin Render process");const s=ct.RuntimeError.getCallSite(),a=this.wire.environment.getNextMessageId().toString(),c=`asset-download-progress-${a}`,d=`asset-download-error-${a}`,h=`asset-download-complete-${a}`,l=t=>{const n={downloadedBytes:t.downloadedBytes,totalBytes:t.totalBytes};e(n)},u=()=>{this.removeListener(c,l)};await Promise.all([this.on(c,l),this.once(d,(t=>{u();const{reason:e,err:n}=t;o(new ct.RuntimeError({reason:e,error:n},s))})),this.once(h,(()=>{u(),i()}))]);const p=Object.assign(t,{downloadId:a});return await this.wire.sendAction("download-asset",p).catch((t=>{throw u(),t})),r}downloadRuntime(t,e){const n=ct.RuntimeError.getCallSite();return new Promise(((i,o)=>{if("openfin"!==this.wire.environment.type)return void o(new ct.NotSupportedError("downloadRuntime only supported in an OpenFin Render process"));const r=this.wire.environment.getNextMessageId().toString(),s=`runtime-download-progress-${r}`,a=`runtime-download-error-${r}`,c=`runtime-download-complete-${r}`,d=t=>{const n={downloadedBytes:t.downloadedBytes,totalBytes:t.totalBytes};e(n)},h=()=>{this.removeListener(s,d)};this.on(s,d),this.once(a,(t=>{h();const{reason:e,err:i}=t;o(new ct.RuntimeError({reason:e,error:i},n))})),this.once(c,(()=>{h(),i()}));const l=Object.assign(t,{downloadId:r});this.wire.sendAction("download-runtime",l).catch((t=>{h(),o(t)}))}))}downloadPreloadScripts(t){return this.wire.sendAction("download-preload-scripts",{scripts:t}).then((({payload:t})=>t.data))}getAllExternalApplications(){return this.wire.sendAction("get-all-external-applications").then((({payload:t})=>t.data))}getAppAssetInfo(t){return this.wire.sendAction("get-app-asset-info",t).then((({payload:t})=>t.data))}getCookies(t){const e=this.wire.environment.getUrl(),n=Object.assign(t,{url:e});return this.wire.sendAction("get-cookies",n).then((({payload:t})=>t.data))}setMinLogLevel(t){return this.wire.sendAction("set-min-log-level",{level:t}).then((()=>{}))}resolveUuid(t){return this.wire.sendAction("resolve-uuid",{entityKey:t}).then((({payload:t})=>t.data))}executeOnRemote(t,e){return e.requestingIdentity=t,this.wire.ferryAction(e)}readRegistryValue(t,e,n){return this.wire.sendAction("read-registry-value",{rootKey:t,subkey:e,value:n}).then((({payload:t})=>t.data))}registerExternalConnection(t){return this.wire.sendAction("register-external-connection",{uuid:t}).then((({payload:t})=>t.data))}async getServiceConfiguration(t){if("string"!=typeof t.name)throw new Error("Must provide an object with a `name` property having a string value");const{name:e}=t;return this.wire.sendAction("get-service-configuration",{name:e}).then((({payload:t})=>t.data))}async getSystemAppConfig(t){if("string"!=typeof t)throw new Error("Must provide a string value for name of system app");return this.wire.sendAction("get-system-app-configuration",{name:t}).then((({payload:t})=>t.data))}async registerShutdownHandler(t){this.wire.sendAction("system-register-shutdown-handler").catch((t=>{}));const{uuid:e,name:n}=this.wire.me;this.on("system-shutdown",(i=>{t({proceed:()=>{this.wire.environment.raiseEvent("application/system-shutdown-handled",{uuid:e,name:n,topic:"application"})}})}))}runRvmHealthCheck(){return this.wire.sendAction("run-rvm-health-check").then((({payload:t})=>t.data))}async launchManifest(t,e={}){const{subscribe:n,...i}=e,o=i;if(n){const t=new ht.EventEmitter;n(t);const e="app-version-progress",i="runtime-status",r="app-version-complete",s="app-version-error",a=this.wire.environment.getNextMessageId().toString();o.appVersionId=a;const c=[r,e,i,s],d=t=>{const{appVersionId:e,topic:n,type:i,...o}=t;return{...o,type:c.find((t=>i.includes(t)))}},h=e=>{const n=d(e);t.emit(n.type,n)},l=()=>{this.removeListener(`${e}.${a}`,h),this.removeListener(`${i}.${a}`,h),this.removeListener(`${r}.${a}`,h),this.removeListener(`${s}.${a}`,h),this.removeListener(`${r}.${a}`,l),this.removeListener(`${s}.${a}`,l)};await Promise.all([this.on(`${e}.${a}`,h),this.on(`${i}.${a}`,h),this.once(`${r}.${a}`,h),this.once(`${s}.${a}`,h),this.once(`${r}.${a}`,l),this.once(`${s}.${a}`,l)])}return(await this.wire.sendAction("launch-manifest",{manifestUrl:t,opts:o})).payload.data.manifest}async queryPermissionForCurrentContext(t){const e={uuid:this.wire.me.uuid,name:this.wire.me.name};return(await this.wire.sendAction("query-permission-for-current-context",{apiName:t,identity:e})).payload.data}async enableNativeWindowIntegrationProvider(t){const{payload:e}=await this.wire.sendAction("enable-native-window-integration-provider",{permissions:t});return e.data}async registerUsage({data:t,type:e}){await this.wire.sendAction("register-usage",{data:t,type:e})}async getPrinters(){const{payload:t}=await this.wire.sendAction("system-get-printers");return t.data}async updateProcessLoggingOptions(t){await this.wire.sendAction("system-update-process-logging-options",{options:t})}async getDomainSettings(){const{payload:{data:t}}=await this.wire.sendAction("get-domain-settings",this.identity);return t}async setDomainSettings(t){await this.wire.sendAction("set-domain-settings",{domainSettings:t,...this.identity})}async refreshExtensions(){const{payload:t}=await this.wire.sendAction("refresh-extensions");return t.data}async getInstalledExtensions(){const{payload:t}=await this.wire.sendAction("get-installed-extensions");return t.data}}l.System=lt;var ut={},pt={};Object.defineProperty(pt,"__esModule",{value:!0}),pt.RefCounter=void 0,pt.RefCounter=class{constructor(){this.topicRefMap=new Map}incRefCount(t){const e=this.topicRefMap.get(t);let n;if(e){const i=e+1;n=i,this.topicRefMap.set(t,i)}else this.topicRefMap.set(t,1),n=1;return n}decRefCount(t){const e=this.topicRefMap.get(t);let n;if(e){const i=e-1;this.topicRefMap.set(t,i),n=i}else n=-1;return n}actOnFirst(t,e,n){return 1===this.incRefCount(t)?e():n()}actOnLast(t,e,n){return 0===this.decRefCount(t)?e():n()}};var ft={},mt={},wt={};Object.defineProperty(wt,"__esModule",{value:!0}),wt.ChannelBase=wt.ProtectedItems=void 0;const yt=t=>async(e,n,i)=>{const o=await t(e,n,i);return void 0===o?n:o};wt.ProtectedItems=class{constructor(t,e){this.providerIdentity=t,this.close=e}};class gt{static defaultAction(t){throw new Error(`No action registered at target for ${t}`)}constructor(){this.subscriptions=new Map}async processAction(t,e,n){try{const i=this.subscriptions.has(t)?this.subscriptions.get(t):(e,n)=>(this.defaultAction??gt.defaultAction)(t,e,n),o=this.preAction?await this.preAction(t,e,n):e,r=await i(o,n);return this.postAction?await this.postAction(t,r,n):r}catch(e){if(this.errorMiddleware)return this.errorMiddleware(t,e,n);throw e}}beforeAction(t){if(this.preAction)throw new Error("Already registered beforeAction middleware");this.preAction=yt(t)}onError(t){if(this.errorMiddleware)throw new Error("Already registered error middleware");this.errorMiddleware=t}afterAction(t){if(this.postAction)throw new Error("Already registered afterAction middleware");this.postAction=yt(t)}remove(t){this.subscriptions.delete(t)}setDefaultAction(t){if(this.defaultAction)throw new Error("default action can only be set once");this.defaultAction=t}register(t,e){if(this.subscriptions.has(t))throw new Error(`Subscription already registered for action: ${t}. Unsubscribe before adding new subscription`);return this.subscriptions.set(t,e),!0}}wt.ChannelBase=gt;var vt,Ct,bt,_t=d&&d.__classPrivateFieldGet||function(t,e,n,i){if("a"===n&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(t):i?i.value:e.get(t)},It=d&&d.__classPrivateFieldSet||function(t,e,n,i,o){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?o.call(t,n):o?o.value=n:e.set(t,n),n};Object.defineProperty(mt,"__esModule",{value:!0}),mt.ChannelClient=void 0;const Et=wt,xt=new Map;class St extends Et.ChannelBase{static closeChannelByEndpointId(t){const e=xt.get(t);e&&_t(e,bt,"f").call(e)}static handleProviderDisconnect(t){for(const e of xt.values())e.providerIdentity.channelId===t.channelId&&(e.disconnectListener(t),_t(e,bt,"f").call(e))}constructor(t,e,n){super(),vt.set(this,void 0),Ct.set(this,void 0),this.processAction=(t,e,n)=>super.processAction(t,e,n),bt.set(this,(()=>{xt.delete(this.endpointId),_t(this,Ct,"f").close()})),It(this,vt,new Et.ProtectedItems(t,e),"f"),this.disconnectListener=()=>{},this.endpointId=t.endpointId,It(this,Ct,n,"f"),xt.set(this.endpointId,this),n.receive(this.processAction)}get providerIdentity(){return _t(this,vt,"f").providerIdentity}async dispatch(t,e){if(_t(this,Ct,"f").isEndpointConnected(this.providerIdentity.channelId))return _t(this,Ct,"f").send(this.providerIdentity.channelId,t,e);throw new Error("The client you are trying to dispatch from is disconnected from the target provider.")}onDisconnection(t){this.disconnectListener=e=>{try{t(e)}catch(t){throw new Error(`Error while calling the onDisconnection callback: ${t.message}`)}finally{this.disconnectListener=()=>{}}}}async disconnect(){await this.sendDisconnectAction(),_t(this,bt,"f").call(this)}async sendDisconnectAction(){const t=_t(this,vt,"f");await t.close()}static async wireClose(t,e,n){const{channelName:i,uuid:o,name:r}=e;await t.sendAction("disconnect-from-channel",{channelName:i,uuid:o,name:r,endpointId:n})}}mt.ChannelClient=St,vt=new WeakMap,Ct=new WeakMap,bt=new WeakMap;var At={},Pt={};Object.defineProperty(Pt,"__esModule",{value:!0}),Pt.exhaustiveCheck=void 0,Pt.exhaustiveCheck=function(t,e){throw new Error(`Unsupported value: ${t}${e?`\n Supported values are: ${e.join("")}`:""}`)};var Mt,Lt,Ot,Rt={},Tt=d&&d.__classPrivateFieldSet||function(t,e,n,i,o){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?o.call(t,n):o?o.value=n:e.set(t,n),n},kt=d&&d.__classPrivateFieldGet||function(t,e,n,i){if("a"===n&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(t):i?i.value:e.get(t)};Object.defineProperty(Rt,"__esModule",{value:!0}),Rt.ClassicInfo=Rt.ClassicStrategy=void 0,Rt.ClassicStrategy=class{constructor(t,e,n,i){this.messageReceiver=e,this.endpointId=n,this.providerIdentity=i,Mt.set(this,void 0),Lt.set(this,new Map),Ot.set(this,new Map),this.send=async(t,e,n)=>{const i=kt(this,Lt,"f").get(t);if(!i)throw new Error(`Could not locate routing info for endpoint ${t}`);const o={...i};o.isLocalEndpointId&&delete o.endpointId,delete o.isLocalEndpointId;const r=kt(this,Mt,"f").sendAction("send-channel-message",{...o,providerIdentity:this.providerIdentity,action:e,payload:n});return kt(this,Ot,"f").get(t)?.add(r),(await r.catch((t=>{throw new Error(t.message)})).finally((()=>{kt(this,Ot,"f").get(t)?.delete(r)}))).payload.data.result},this.close=async()=>{this.messageReceiver.removeEndpoint(this.providerIdentity.channelId,this.endpointId),[...kt(this,Lt,"f").keys()].forEach((t=>this.closeEndpoint(t))),Tt(this,Lt,new Map,"f")},Tt(this,Mt,t,"f")}onEndpointDisconnect(t,e){}receive(t){this.messageReceiver.addEndpoint(t,this.providerIdentity.channelId,this.endpointId)}async closeEndpoint(t){const e=kt(this,Lt,"f").get(t);kt(this,Lt,"f").delete(t);const n=kt(this,Ot,"f").get(t);n?.forEach((n=>{const i=`Channel connection with identity uuid: ${e?.uuid} / name: ${e?.name} / endpointId: ${t} no longer connected.`;n.cancel(new Error(i))}))}isEndpointConnected(t){return kt(this,Lt,"f").has(t)}addEndpoint(t,e){kt(this,Lt,"f").set(t,e.endpointIdentity),kt(this,Ot,"f").set(t,new Set)}isValidEndpointPayload(t){return"string"==typeof t?.endpointIdentity?.endpointId||"string"==typeof t?.endpointIdentity?.channelId}},Mt=new WeakMap,Lt=new WeakMap,Ot=new WeakMap,Rt.ClassicInfo={version:5,minimumVersion:0,type:"classic"};var jt={},Bt={},zt={};Object.defineProperty(zt,"__esModule",{value:!0}),zt.errorToPOJO=void 0,zt.errorToPOJO=function(t){return{stack:t.stack,name:t.name,message:t.message,toString:()=>t.stack||t.toString()}};var Ft,Dt,Ut=d&&d.__classPrivateFieldGet||function(t,e,n,i){if("a"===n&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(t):i?i.value:e.get(t)},Wt=d&&d.__classPrivateFieldSet||function(t,e,n,i,o){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?o.call(t,n):o?o.value=n:e.set(t,n),n};Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.RTCEndpoint=void 0;const $t=zt;Bt.RTCEndpoint=class{static isValidEndpointPayload(t){const e=t=>"object"==typeof t&&null!==t;return e(t)&&e(t.endpointIdentity)&&e(t.rtc)&&"string"==typeof t.endpointIdentity.endpointId}constructor({rtc:t,endpointIdentity:e}){this.responseMap=new Map,Ft.set(this,null),Dt.set(this,void 0),this.connectionStateChangeHandler=t=>{"connected"!==this.rtc.rtcClient.connectionState&&(this.rtc.rtcClient.removeEventListener("connectionstatechange",this.connectionStateChangeHandler),this.close(),Ut(this,Dt,"f")&&Ut(this,Dt,"f").call(this))},this.send=async(t,e)=>{const n=`message-${Math.random()}`,i=new Promise(((t,e)=>{this.responseMap.set(n,{resolve:t,reject:e})}));return this.rtc.channels.request.send(JSON.stringify({action:t,payload:e,messageId:n})),i},this.close=()=>{this.responseMap.forEach((t=>t.reject("Connection has closed."))),this.responseMap=new Map,this.rtc.channels.request.close(),this.rtc.channels.response.close(),this.rtc.rtcClient.close()},this.rtc=t,this.endpointIdentity=e,this.rtc.channels.response.addEventListener("message",(t=>{let{data:e}=t;t.data instanceof ArrayBuffer&&(e=(new TextDecoder).decode(t.data));const{messageId:n,payload:i,success:o,error:r}=JSON.parse(e),{resolve:s,reject:a}=this.responseMap.get(n)??{};s&&a?(this.responseMap.delete(n),o?s(i):a(r)):(console.log("Could not find id in responseMap."),console.log(t))})),this.rtc.channels.request.addEventListener("message",(async t=>{let{data:n}=t;t.data instanceof ArrayBuffer&&(n=(new TextDecoder).decode(t.data));const{messageId:i,action:o,payload:r}=JSON.parse(n);if(Ut(this,Ft,"f"))try{const t=await Ut(this,Ft,"f").call(this,o,r,e);this.rtc.channels.response.send(JSON.stringify({messageId:i,payload:t,success:!0}))}catch(t){"open"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,error:(0,$t.errorToPOJO)(t),success:!1}))}else"open"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,success:!1,error:"Connection not ready."}))})),this.rtc.rtcClient.addEventListener("connectionstatechange",this.connectionStateChangeHandler),Object.values(this.rtc.channels).forEach((t=>{t.onclose=t=>{[...this.responseMap.values()].forEach((t=>t.reject(new Error("RTCDataChannel closed unexpectedly, this is most commonly caused by message size. Note: RTC Channels have a message size limit of ~255kB.")))),this.close(),Ut(this,Dt,"f")&&Ut(this,Dt,"f").call(this)}}))}onDisconnect(t){if(Ut(this,Dt,"f"))throw new Error("RTCEndpoint disconnectListener cannot be set twice.");Wt(this,Dt,t,"f")}receive(t){if(Ut(this,Ft,"f"))throw new Error("You have already set a listener for this RTC Endpoint.");Wt(this,Ft,t,"f")}get connected(){return"connected"===this.rtc.rtcClient.connectionState}},Ft=new WeakMap,Dt=new WeakMap;var Vt,Ht,Nt,Gt={},qt=d&&d.__classPrivateFieldGet||function(t,e,n,i){if("a"===n&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(t):i?i.value:e.get(t)},Yt=d&&d.__classPrivateFieldSet||function(t,e,n,i,o){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?o.call(t,n):o?o.value=n:e.set(t,n),n};Object.defineProperty(Gt,"__esModule",{value:!0}),Gt.EndpointStrategy=void 0,Gt.EndpointStrategy=class{constructor(t,e,n){this.EndpointType=t,this.StrategyName=n,Vt.set(this,null),Ht.set(this,new Map),Nt.set(this,!0),this.send=async(t,e,n)=>this.getEndpointById(t).send(e,n),this.close=async()=>{qt(this,Nt,"f")&&(qt(this,Ht,"f").forEach((t=>t.close())),Yt(this,Ht,new Map,"f")),Yt(this,Nt,!1,"f")},this.isValidEndpointPayload=e}onEndpointDisconnect(t,e){this.getEndpointById(t).onDisconnect(e)}receive(t){if(qt(this,Vt,"f"))throw new Error(`You have already set a listener for this ${this.StrategyName} Strategy`);Yt(this,Vt,t,"f"),qt(this,Ht,"f").forEach((t=>t.receive(qt(this,Vt,"f"))))}getEndpointById(t){const e=qt(this,Ht,"f").get(t);if(!e)throw new Error(`Client with endpoint id ${t} is not connected`);return e}get connected(){return qt(this,Nt,"f")}isEndpointConnected(t){return qt(this,Ht,"f").has(t)}addEndpoint(t,e){if(!qt(this,Nt,"f"))return void console.warn(`Adding endpoint to disconnected ${this.StrategyName} Strategy`);const n=new this.EndpointType(e);qt(this,Vt,"f")&&n.receive(qt(this,Vt,"f")),qt(this,Ht,"f").set(t,n)}async closeEndpoint(t){qt(this,Ht,"f").delete(t)}},Vt=new WeakMap,Ht=new WeakMap,Nt=new WeakMap,Object.defineProperty(jt,"__esModule",{value:!0}),jt.RTCInfo=jt.RTCStrategy=void 0;const Kt=Bt,Zt=Gt;class Jt extends Zt.EndpointStrategy{constructor(){super(Kt.RTCEndpoint,Kt.RTCEndpoint.isValidEndpointPayload,"RTC")}}jt.RTCStrategy=Jt,jt.RTCInfo={version:2,minimumVersion:0,type:"rtc"};var Xt={};Object.defineProperty(Xt,"__esModule",{value:!0}),Xt.RTCICEManager=void 0;const Qt=u;class te extends Qt.EmitterBase{constructor(t){super(t,"channel"),this.ensureChannelOpened=t=>new Promise(((e,n)=>{if("open"===t.readyState)e();else if("connecting"===t.readyState){const n=()=>{t.removeEventListener("open",n),e()};t.addEventListener("open",n)}else n(new Error("This Channel has already closed"))}))}static createDataChannelPromise(t,e){let n;const i=new Promise((t=>{n=t})),o=i=>{const r=()=>{i.channel.removeEventListener("open",r),n(i.channel)};i.channel.label===t&&(i.channel.addEventListener("open",r),e.removeEventListener("datachannel",o))};return e.addEventListener("datachannel",o),i}async listenForProviderIce(t,e){await this.on(this.createProviderEventName(t),e,{timestamp:Date.now()})}async raiseProviderIce(t,e){await this.wire.environment.raiseEvent(this.createRouteString(this.createProviderEventName(t)),e)}async listenForClientIce(t,e){await this.on(this.createClientEventName(t),e,{timestamp:Date.now()})}async raiseClientIce(t,e){await this.wire.environment.raiseEvent(this.createRouteString(this.createClientEventName(t)),e)}cleanupIceListeners(t){this.removeAllListeners(this.createClientEventName(t)),this.removeAllListeners(this.createProviderEventName(t))}createClientEventName(t){return`ice-client-${t}`}createProviderEventName(t){return`ice-provider-${t}`}createRouteString(t){return`channel/${t}`}createRtcPeer(){return this.wire.environment.getRtcPeer()}async startClientOffer(){const t=Math.random().toString(),e=this.createRtcPeer();e.addEventListener("icecandidate",(async e=>{e.candidate&&await this.raiseClientIce(t,{candidate:e.candidate?.toJSON()})})),await this.listenForProviderIce(t,(async t=>{await e.addIceCandidate(t.candidate)}));const n={request:e.createDataChannel("request"),response:e.createDataChannel("response")},i=await e.createOffer();await e.setLocalDescription(i);const o=Promise.all([n.request,n.response].map(this.ensureChannelOpened)).then((()=>{}));return{rtcClient:e,channels:n,offer:i,rtcConnectionId:t,channelsOpened:o}}async finishClientOffer(t,e,n){return await t.setRemoteDescription(e),await n,!0}async createProviderAnswer(t,e){const n=this.createRtcPeer(),i=te.createDataChannelPromise("request",n),o=te.createDataChannelPromise("response",n);n.addEventListener("icecandidate",(async e=>{e.candidate&&await this.raiseProviderIce(t,{candidate:e.candidate?.toJSON()})})),await this.listenForClientIce(t,(async t=>{await n.addIceCandidate(t.candidate)})),await n.setRemoteDescription(e);const r=await n.createAnswer();await n.setLocalDescription(r);const s=Promise.all([i,o]).then((([e,n])=>(this.cleanupIceListeners(t),{request:e,response:n})));return{rtcClient:n,answer:r,channels:s}}}Xt.RTCICEManager=te;var ee={},ne={};function ie(t){return[...t.split(".").reverse().entries()].reduce(((t,[e,n])=>t+ +n*1e4**e),0)}function oe(t,e){return ie(t)>=ie(e)}function re(t){return t.split("/")[0]}Object.defineProperty(ne,"__esModule",{value:!0}),ne.runtimeUuidMeetsMinimumRuntimeVersion=ne.parseRuntimeUuid=ne.meetsMinimumRuntimeVersion=void 0,ne.meetsMinimumRuntimeVersion=oe,ne.parseRuntimeUuid=re,ne.runtimeUuidMeetsMinimumRuntimeVersion=function(t,e){return oe(re(t),e)};var se,ae,ce,de,he,le=d&&d.__classPrivateFieldGet||function(t,e,n,i){if("a"===n&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(t):i?i.value:e.get(t)},ue=d&&d.__classPrivateFieldSet||function(t,e,n,i,o){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?o.call(t,n):o?o.value=n:e.set(t,n),n};Object.defineProperty(ee,"__esModule",{value:!0}),ee.ChannelProvider=void 0;const pe=wt,fe=ne;class me extends pe.ChannelBase{get connections(){return[...le(this,se,"f")]}static handleClientDisconnection(t,e){const n=t.connections.find((t=>t.endpointId===e.endpointId));n?le(t,de,"f").call(t,n):t.connections.filter((t=>t.uuid===e.uuid&&t.name===e.name)).forEach(le(t,de,"f")),t.disconnectListener(e)}static setProviderRemoval(t,e){me.removalMap.set(t,e)}constructor(t,e,n){super(),se.set(this,void 0),ae.set(this,void 0),ce.set(this,void 0),de.set(this,(t=>{const e=this.connections.filter((e=>e.endpointId!==t.endpointId));le(this,ce,"f").closeEndpoint(t.endpointId),ue(this,se,e,"f")})),this.processAction=async(t,e,n)=>(me.clientIsMultiRuntime(n)&&!(0,fe.runtimeUuidMeetsMinimumRuntimeVersion)(n.runtimeUuid,"18.87.56.0")?this.handleMultiRuntimeLegacyClient(n):this.checkForClientConnection(n),super.processAction(t,e,n)),he.set(this,(()=>{le(this,ce,"f").close();const t=me.removalMap.get(this);t&&t()})),ue(this,ae,new pe.ProtectedItems(t,e),"f"),this.connectListener=()=>{},this.disconnectListener=()=>{},ue(this,se,[],"f"),ue(this,ce,n,"f"),n.receive(this.processAction)}dispatch(t,e,n){const i=t.endpointId??this.getEndpointIdForOpenFinId(t,e);return i&&le(this,ce,"f").isEndpointConnected(i)?le(this,ce,"f").send(i,e,n):Promise.reject(new Error(`Client connection with identity uuid: ${t.uuid} / name: ${t.name} / endpointId: ${i} no longer connected.`))}async processConnection(t,e){return le(this,se,"f").push(t),this.connectListener(t,e)}publish(t,e){return this.connections.map((n=>le(this,ce,"f").send(n.endpointId,t,e)))}onConnection(t){this.connectListener=t}onDisconnection(t){this.disconnectListener=t}async destroy(){const t=le(this,ae,"f");t.providerIdentity,ue(this,se,[],"f"),await t.close(),le(this,he,"f").call(this)}async getAllClientInfo(){return this.connections.map((t=>{const{uuid:e,name:n,endpointId:i,entityType:o,connectionUrl:r}=t;return{uuid:e,name:n,endpointId:i,entityType:o,connectionUrl:r}}))}checkForClientConnection(t){if(!this.isClientConnected(t))throw new Error(`This action was sent from a client that is not connected to the provider.\n Client Identity: {uuid: ${t.uuid}, name: ${t.name}, endpointId: ${t.endpointId}}`)}isClientConnected(t){return me.clientIdentityIncludesEndpointId(t)?this.connections.some((e=>e.endpointId===t.endpointId&&e.uuid===t.uuid&&e.name===t.name)):this.isLegacyClientConnected(t)}isLegacyClientConnected(t){return this.connections.some((e=>e.uuid===t.uuid&&e.name===t.name))}handleMultiRuntimeLegacyClient(t){if(!this.isLegacyClientConnected(t))throw new Error(`This action was sent from a client that is not connected to the provider. Client Identity:\n {uuid: ${t.uuid}, name: ${t.name}, endpointId: ${t.endpointId}}`)}getEndpointIdForOpenFinId(t,e){const n=this.connections.filter((e=>e.name===t.name&&e.uuid===t.uuid));if(n.length>=2){const n=le(this,ae,"f"),{uuid:i,name:o}=t,r=n?.providerIdentity.uuid,s=n?.providerIdentity.name;console.warn(`WARNING: Dispatch call may have unintended results. The "to" argument of your dispatch call is missing the\n "endpointId" parameter. The identity you are dispatching to ({uuid: ${i}, name: ${o}})\n has multiple channelClients for this channel. Your dispatched action: (${e}) from the provider:\n ({uuid: ${r}, name: ${s}}) will only be processed by the most recently-created client.`)}return n.pop()?.endpointId}static clientIdentityIncludesEndpointId(t){return void 0!==t.endpointId}static clientIsMultiRuntime(t){return void 0!==t.runtimeUuid}static async wireClose(t,e){await t.sendAction("destroy-channel",{channelName:e})}}ee.ChannelProvider=me,se=new WeakMap,ae=new WeakMap,ce=new WeakMap,de=new WeakMap,he=new WeakMap,me.removalMap=new WeakMap;var we={};Object.defineProperty(we,"__esModule",{value:!0}),we.MessageReceiver=void 0;const ye=mt,ge=u;class ve extends ge.Base{constructor(t){super(t),this.onmessage=t=>"process-channel-message"===t.action&&(this.processChannelMessage(t),!0),this.endpointMap=new Map,this.latestEndpointIdByChannelId=new Map,t.registerMessageHandler(this.onmessage.bind(this))}async processChannelMessage(t){const{senderIdentity:e,providerIdentity:n,action:i,ackToSender:o,payload:r,intendedTargetIdentity:s}=t.payload,a=s.channelId??s.endpointId??this.latestEndpointIdByChannelId.get(n.channelId),c=this.endpointMap.get(a);if(!c)return o.payload.success=!1,o.payload.reason=`Client connection with identity uuid: ${this.wire.me.uuid} / name: ${this.wire.me.name} / endpointId: ${a} no longer connected.`,this.wire.sendRaw(o);try{const t=await c(i,r,e);return o.payload.payload=o.payload.payload||{},o.payload.payload.result=t,this.wire.sendRaw(o)}catch(t){return o.payload.success=!1,o.payload.reason=t.message,this.wire.sendRaw(o)}}addEndpoint(t,e,n){this.endpointMap.set(n,t),e!==n&&this.latestEndpointIdByChannelId.set(e,n)}removeEndpoint(t,e){this.endpointMap.delete(e),this.latestEndpointIdByChannelId.get(t)===e&&this.latestEndpointIdByChannelId.delete(t)}checkForPreviousClientConnection(t){const e=this.latestEndpointIdByChannelId.get(t);e&&(ye.ChannelClient.closeChannelByEndpointId(e),console.warn("You have created a second connection to an older provider. First connection has been removed from the clientMap"),console.warn("If the provider calls publish(), you may receive multiple messages."))}}we.MessageReceiver=ve;var Ce={};Object.defineProperty(Ce,"__esModule",{value:!0}),Ce.ProtocolManager=void 0,Ce.ProtocolManager=class{constructor(t){this.ProtocolsInPreferenceOrder=t,this.DefaultClientProtocols=["classic"],this.DefaultProviderProtocols=["classic"],this.getClientProtocols=t=>{const e=t?this.ProtocolsInPreferenceOrder.filter((e=>t.includes(e))):this.DefaultClientProtocols;if(!e.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(", ")}.`);return e},this.getProviderProtocols=t=>{const e=t?this.ProtocolsInPreferenceOrder.filter((e=>t.includes(e))):this.DefaultProviderProtocols;if(!e.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(", ")}.`);return e},this.getCompatibleProtocols=(t,e)=>e.supportedProtocols.filter((e=>t.some((t=>t.type===e.type&&e.version>=t.minimumVersion&&t.version>=(e.minimumVersion??0))))).slice(0,e.maxProtocols)}};var be={};Object.defineProperty(be,"__esModule",{value:!0});class _e{static combine(t,e){return new _e(t,e)}constructor(t,e){this.primary=t,this.secondary=e}onEndpointDisconnect(t,e){this.primary.onEndpointDisconnect(t,(()=>{this.secondary.isEndpointConnected(t)||e()})),this.secondary.onEndpointDisconnect(t,(()=>{this.primary.isEndpointConnected(t)||e()}))}isValidEndpointPayload(t){return this.primary.isValidEndpointPayload(t)||this.secondary.isValidEndpointPayload(t)}async closeEndpoint(t){await this.primary.closeEndpoint(t),await this.secondary.closeEndpoint(t)}isEndpointConnected(t){return this.primary.isEndpointConnected(t)||this.secondary.isEndpointConnected(t)}async addEndpoint(t,e){this.primary.isValidEndpointPayload(e)&&await this.primary.addEndpoint(t,e),this.secondary.isValidEndpointPayload(e)&&await this.secondary.addEndpoint(t,e)}receive(t){this.primary.receive(t),this.secondary.receive(t)}send(t,e,n){return this.primary.isEndpointConnected(t)?this.primary.send(t,e,n):this.secondary.send(t,e,n)}async close(){await Promise.all([this.primary.close(),this.secondary.close()])}}be.default=_e;var Ie,Ee,xe=d&&d.__classPrivateFieldSet||function(t,e,n,i,o){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?o.call(t,n):o?o.value=n:e.set(t,n),n},Se=d&&d.__classPrivateFieldGet||function(t,e,n,i){if("a"===n&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(t):i?i.value:e.get(t)},Ae=d&&d.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(At,"__esModule",{value:!0}),At.ConnectionManager=void 0;const Pe=Pt,Me=u,Le=Rt,Oe=jt,Re=Xt,Te=ee,ke=we,je=Ce,Be=Ae(be);class ze extends Me.Base{static getProtocolOptionsFromStrings(t){return t.map((t=>{switch(t){case"rtc":return Oe.RTCInfo;case"classic":return Le.ClassicInfo;default:return(0,Pe.exhaustiveCheck)(t,["rtc","classic"])}}))}constructor(t){super(t),Ie.set(this,void 0),Ee.set(this,void 0),this.removeChannelFromProviderMap=t=>{this.providerMap.delete(t)},this.onmessage=t=>"process-channel-connection"===t.action&&(this.processChannelConnection(t),!0),this.providerMap=new Map,this.protocolManager=new je.ProtocolManager("node"===this.wire.environment.type?["classic"]:["rtc","classic"]),xe(this,Ie,new ke.MessageReceiver(t),"f"),xe(this,Ee,new Re.RTCICEManager(t),"f"),t.registerMessageHandler(this.onmessage.bind(this))}createProvider(t,e){const n=Object.assign(this.wire.environment.getDefaultChannelOptions().create,t||{}),i=this.protocolManager.getProviderProtocols(n?.protocols),o=i.map((t=>{switch(t){case"rtc":return new Oe.RTCStrategy;case"classic":return new Le.ClassicStrategy(this.wire,Se(this,Ie,"f"),e.channelId,e);default:return(0,Pe.exhaustiveCheck)(t,["rtc","classic"])}}));let r;if(2===o.length){const[t,e]=o;r=Be.default.combine(t,e)}else{if(1!==o.length)throw new Error("failed to combine strategies");[r]=o}const s=new Te.ChannelProvider(e,(()=>Te.ChannelProvider.wireClose(this.wire,e.channelName)),r),a=e.channelId;return this.providerMap.set(a,{provider:s,strategy:r,supportedProtocols:ze.getProtocolOptionsFromStrings(i)}),Te.ChannelProvider.setProviderRemoval(s,this.removeChannelFromProviderMap.bind(this)),s}async createClientOffer(t){const e=this.protocolManager.getClientProtocols(t?.protocols);let n;return{offer:{supportedProtocols:await Promise.all(e.map((async t=>{switch(t){case"rtc":{const{rtcClient:t,channels:e,offer:i,rtcConnectionId:o,channelsOpened:r}=await Se(this,Ee,"f").startClientOffer();return n={rtcClient:t,channels:e,channelsOpened:r},{type:"rtc",version:Oe.RTCInfo.version,payload:{offer:i,rtcConnectionId:o}}}case"classic":return{type:"classic",version:Le.ClassicInfo.version};default:return(0,Pe.exhaustiveCheck)(t,["rtc","classic"])}}))),maxProtocols:2},rtc:n}}async createClientStrategy(t,e){e.endpointId||(e.endpointId=this.wire.environment.getNextMessageId(),Se(this,Ie,"f").checkForPreviousClientConnection(e.channelId));const n=e.answer??{supportedProtocols:[{type:"classic",version:1}]},i=(await Promise.all(n.supportedProtocols.map((async n=>"rtc"===n.type&&t?(await Se(this,Ee,"f").finishClientOffer(t.rtcClient,n.payload.answer,t.channelsOpened),new Oe.RTCStrategy):"classic"===n.type?new Le.ClassicStrategy(this.wire,Se(this,Ie,"f"),e.endpointId,e):null)))).filter((t=>null!==t));let o;if(t&&!i.some((t=>t instanceof Oe.RTCStrategy))&&t&&t.rtcClient.close(),i.length>=2)o=Be.default.combine(i[0],i[1]);else{if(!i.length)throw new Error("No compatible protocols");[o]=i}const r={endpointIdentity:e,rtc:t};return o.addEndpoint(e.channelId,r),o}async processChannelConnection(t){const{clientIdentity:e,providerIdentity:n,ackToSender:i,payload:o,offer:r}=t.payload;e.endpointId?e.isLocalEndpointId=!1:(e.endpointId=this.wire.environment.getNextMessageId(),e.isLocalEndpointId=!0);const s=n.channelId,a=this.providerMap.get(s);if(!a)return i.payload.success=!1,i.payload.reason=`Channel "${n.channelName}" has been destroyed.`,this.wire.sendRaw(i);const{provider:c,strategy:d,supportedProtocols:h}=a;try{if(!(c instanceof Te.ChannelProvider))throw Error("Cannot connect to a channel client");const t=r??{supportedProtocols:[{type:"classic",version:1}],maxProtocols:1},n=this.protocolManager.getCompatibleProtocols(h,t);if(!n.length)throw new Error("This provider does not support any of the offered protocols.");const s=await c.processConnection(e,o);i.payload.payload=i.payload.payload||{};let a={supportedProtocols:[],endpointPayloadPromise:Promise.resolve({endpointIdentity:e})};return a=await n.reduce((async(t,e)=>{const n=await t;if("rtc"===e.type){const{answer:t,rtcClient:i,channels:o}=await Se(this,Ee,"f").createProviderAnswer(e.payload.rtcConnectionId,e.payload.offer);n.supportedProtocols.push({type:"rtc",version:Oe.RTCInfo.version,payload:{answer:t}}),n.endpointPayloadPromise=n.endpointPayloadPromise.then((t=>o.then((e=>({...t,rtc:{rtcClient:i,channels:e}})))))}else n.supportedProtocols.push({type:"classic",version:Le.ClassicInfo.version});return n}),Promise.resolve(a)),a.endpointPayloadPromise.then((t=>d.addEndpoint(e.endpointId,t))),i.payload.payload.result=s,i.payload.payload.answer=a,this.wire.sendRaw(i)}catch(t){return i.payload.success=!1,i.payload.reason=t.message,this.wire.sendRaw(i)}}}At.ConnectionManager=ze,Ie=new WeakMap,Ee=new WeakMap;var Fe,De,Ue,We=d&&d.__classPrivateFieldSet||function(t,e,n,i,o){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?o.call(t,n):o?o.value=n:e.set(t,n),n},$e=d&&d.__classPrivateFieldGet||function(t,e,n,i){if("a"===n&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(t):i?i.value:e.get(t)};Object.defineProperty(ft,"__esModule",{value:!0}),ft.Channel=void 0;const Ve=o,He=$,Ne=u,Ge=mt,qe=At,Ye=ee;function Ke(t){const e=Math.floor(t/10),n=Math.min(3e4,500*2**e);return new Promise((t=>{setTimeout((()=>{t(!1)}),n)}))}class Ze extends Ne.EmitterBase{constructor(t){super(t,"channel"),Fe.set(this,void 0),De.set(this,new Ve.EventEmitter),Ue.set(this,new He.AsyncRetryableLazy((async()=>{await Promise.all([this.on("disconnected",(t=>{Ge.ChannelClient.handleProviderDisconnect(t)})),this.on("connected",((...t)=>{$e(this,De,"f").emit("connected",...t)}))]).catch((()=>new Error("error setting up channel connection listeners")))}))),We(this,Fe,new qe.ConnectionManager(t),"f")}async getAllChannels(){return this.wire.sendAction("get-all-channels").then((({payload:t})=>t.data))}async onChannelConnect(t){await this.on("connected",t)}async onChannelDisconnect(t){await this.on("disconnected",t)}async safeConnect(t,e,n){const i={count:0};do{let o=()=>{};const r=new Promise((e=>{o=n=>{t===n.channelName&&e(!0)},$e(this,De,"f").on("connected",o)}));try{if(i.count>0){i.gotConnectedEvent=await Promise.race([Ke(i.count),r]);const e=await this.wire.sendAction("connect-to-channel",{...n,retryInfo:i});return console.log(`Successfully connected to channelName: ${t}`),e.payload.data}const e=this.wire.sendAction("connect-to-channel",n);return i.originalMessageId=e.messageId,(await e).payload.data}catch(n){if(!n.message.includes("internal-nack"))throw n;e&&0===i.count&&console.warn(`No channel found for channelName: ${t}. Waiting for connection...`)}finally{i.count+=1,$e(this,De,"f").removeListener("connected",o)}}while(e);throw new Error(`No channel found for channelName: ${t}.`)}async connect(t,e={}){if(await $e(this,Ue,"f").getValue(),!t||"string"!=typeof t)throw new Error("Please provide a channelName string to connect to a channel.");const n={wait:!0,...this.wire.environment.getDefaultChannelOptions().connect,...e},{offer:i,rtc:o}=await $e(this,Fe,"f").createClientOffer(n);let r;(this.fin.me.isFrame||this.fin.me.isView||this.fin.me.isWindow)&&(r=(await this.fin.me.getInfo()).url);const s={channelName:t,...n,offer:i,connectionUrl:r},a=await this.safeConnect(t,n.wait,s),c=await $e(this,Fe,"f").createClientStrategy(o,a),d=new Ge.ChannelClient(a,(()=>Ge.ChannelClient.wireClose(this.wire,a,a.endpointId)),c);return c.onEndpointDisconnect(a.channelId,(async()=>{try{await d.sendDisconnectAction()}catch(t){console.warn(`Something went wrong during disconnect for client with uuid: ${a.uuid} / name: ${a.name} / endpointId: ${a.endpointId}.`)}finally{Ge.ChannelClient.handleProviderDisconnect(a)}})),d}async create(t,e){if(!t)throw new Error("Please provide a channelName to create a channel");const{payload:{data:n}}=await this.wire.sendAction("create-channel",{channelName:t}),i=$e(this,Fe,"f").createProvider(e,n);return this.on("client-disconnected",(e=>{e.channelName===t&&Ye.ChannelProvider.handleClientDisconnection(i,e)})),i}}ft.Channel=Ze,Fe=new WeakMap,De=new WeakMap,Ue=new WeakMap,Object.defineProperty(ut,"__esModule",{value:!0}),ut.InterAppPayload=ut.InterApplicationBus=void 0;const Je=o,Xe=u,Qe=pt,tn=ft,en=R;class nn extends Xe.Base{constructor(t){super(t),this.events={subscriberAdded:"subscriber-added",subscriberRemoved:"subscriber-removed"},this.refCounter=new Qe.RefCounter,this.Channel=new tn.Channel(t),this.emitter=new Je.EventEmitter,t.registerMessageHandler(this.onmessage.bind(this)),this.on=this.emitter.on.bind(this.emitter),this.removeAllListeners=this.emitter.removeAllListeners.bind(this.emitter)}async publish(t,e){await this.wire.sendAction("publish-message",{topic:t,message:e,sourceWindowName:this.me.name})}async send(t,e,n){const i=(0,en.validateIdentity)(t);if(i)throw new Error(i);await this.wire.sendAction("send-message",{destinationUuid:t.uuid,destinationWindowName:t.name,topic:e,message:n,sourceWindowName:this.me.name})}subscribe(t,e,n){const i=this.createSubscriptionKey(t.uuid,t.name||"*",e);return this.emitter.on(i,n),this.refCounter.actOnFirst(i,(async()=>{await this.wire.sendAction("subscribe",{sourceUuid:t.uuid,sourceWindowName:t.name||"*",topic:e,destinationWindowName:this.me.name})}),(()=>Promise.resolve()))}unsubscribe(t,e,n){const i=t.name||"*",o=this.createSubscriptionKey(t.uuid,i,e);return this.emitter.removeListener(o,n),this.refCounter.actOnLast(o,(async()=>{await this.wire.sendAction("unsubscribe",{sourceUuid:t.uuid,sourceWindowName:i,topic:e,destinationWindowName:this.me.name})}),(()=>new Promise((t=>t)).then((()=>{}))))}processMessage(t){const{payload:{message:e,sourceWindowName:n,sourceUuid:i,topic:o}}=t,r=[this.createSubscriptionKey(i,n,o),this.createSubscriptionKey(i,"*",o),this.createSubscriptionKey("*","*",o)],s={uuid:i,name:n};r.forEach((t=>{this.emitter.emit(t,e,s)}))}emitSubscriverEvent(t,e){const{payload:{targetName:n,uuid:i,topic:o}}=e,r={name:n,uuid:i,topic:o};this.emitter.emit(t,r)}createSubscriptionKey(t,e,n){const i=e||"*";if(!(t&&i&&n))throw new Error("Missing uuid, name, or topic string");return function(...t){return t.map((t=>Buffer.from(`${t}`).toString("base64"))).join("/")}(t,i,n)}onmessage(t){const{action:e}=t;switch(e){case"process-message":this.processMessage(t);break;case this.events.subscriberAdded:this.emitSubscriverEvent(this.events.subscriberAdded,t);break;case this.events.subscriberRemoved:this.emitSubscriverEvent(this.events.subscriberRemoved,t)}return!0}}ut.InterApplicationBus=nn,ut.InterAppPayload=class{};var on={};Object.defineProperty(on,"__esModule",{value:!0}),on.Clipboard=void 0;const rn=u;class sn extends rn.Base{async writeText(t){await this.wire.sendAction("clipboard-write-text",t)}async readText(t){const{payload:e}=await this.wire.sendAction("clipboard-read-text",{type:t});return e.data}async writeImage(t){await this.wire.sendAction("clipboard-write-image",t)}async readImage(t={format:"dataURL"}){const{payload:e}=await this.wire.sendAction("clipboard-read-image",t);return e.data}async writeHtml(t){await this.wire.sendAction("clipboard-write-html",t)}async readHtml(t){const{payload:e}=await this.wire.sendAction("clipboard-read-html",{type:t});return e.data}async writeRtf(t){await this.wire.sendAction("clipboard-write-rtf",t)}async readRtf(t){const{payload:e}=await this.wire.sendAction("clipboard-read-rtf",{type:t});return e.data}async write(t){await this.wire.sendAction("clipboard-write",t)}async getAvailableFormats(t){const{payload:e}=await this.wire.sendAction("clipboard-read-formats",{type:t});return e.data}}on.Clipboard=sn;var an={},cn={},dn={};Object.defineProperty(dn,"__esModule",{value:!0}),dn.ExternalApplication=void 0;const hn=u;class ln extends hn.EmitterBase{constructor(t,e){super(t,"external-application",e.uuid),this.identity=e}getInfo(){return this.wire.sendAction("get-external-application-info",this.identity).then((({payload:t})=>t.data))}}dn.ExternalApplication=ln,Object.defineProperty(cn,"__esModule",{value:!0}),cn.ExternalApplicationModule=void 0;const un=u,pn=dn;class fn extends un.Base{wrap(t){return this.wire.sendAction("external-application-wrap").catch((t=>{})),Promise.resolve(new pn.ExternalApplication(this.wire,{uuid:t}))}wrapSync(t){return this.wire.sendAction("external-application-wrap-sync").catch((t=>{})),new pn.ExternalApplication(this.wire,{uuid:t})}}cn.ExternalApplicationModule=fn,function(t){var e=d&&d.__createBinding||(Object.create?function(t,e,n,i){void 0===i&&(i=n);var o=Object.getOwnPropertyDescriptor(e,n);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,o)}:function(t,e,n,i){void 0===i&&(i=n),t[i]=e[n]}),n=d&&d.__exportStar||function(t,n){for(var i in t)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||e(n,t,i)};Object.defineProperty(t,"__esModule",{value:!0}),n(cn,t),n(dn,t)}(an);var mn={},wn={},yn={};Object.defineProperty(yn,"__esModule",{value:!0}),yn._Frame=void 0;const gn=u;class vn extends gn.EmitterBase{constructor(t,e){super(t,"frame",e.uuid,e.name),this.identity=e}getInfo(){return this.wire.sendAction("get-frame-info",this.identity).then((({payload:t})=>t.data))}getParentWindow(){return this.wire.sendAction("get-parent-window",this.identity).then((({payload:t})=>t.data))}}yn._Frame=vn,Object.defineProperty(wn,"__esModule",{value:!0}),wn._FrameModule=void 0;const Cn=u,bn=R,_n=yn;class In extends Cn.Base{async wrap(t){this.wire.sendAction("frame-wrap").catch((t=>{}));const e=(0,bn.validateIdentity)(t);if(e)throw new Error(e);return new _n._Frame(this.wire,t)}wrapSync(t){this.wire.sendAction("frame-wrap-sync").catch((t=>{}));const e=(0,bn.validateIdentity)(t);if(e)throw new Error(e);return new _n._Frame(this.wire,t)}getCurrent(){return this.wire.sendAction("frame-get-current").catch((t=>{})),Promise.resolve(new _n._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity()))}getCurrentSync(){return this.wire.sendAction("frame-get-current-sync").catch((t=>{})),new _n._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity())}}wn._FrameModule=In,function(t){var e=d&&d.__createBinding||(Object.create?function(t,e,n,i){void 0===i&&(i=n);var o=Object.getOwnPropertyDescriptor(e,n);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,o)}:function(t,e,n,i){void 0===i&&(i=n),t[i]=e[n]}),n=d&&d.__exportStar||function(t,n){for(var i in t)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||e(n,t,i)};Object.defineProperty(t,"__esModule",{value:!0}),n(wn,t),n(yn,t)}(mn);var En={};Object.defineProperty(En,"__esModule",{value:!0}),En.GlobalHotkey=void 0;const xn=u;class Sn extends xn.EmitterBase{constructor(t){super(t,"global-hotkey")}async register(t,e){await this.on(t,e),await this.wire.sendAction("global-hotkey-register",{hotkey:t})}async unregister(t){await this.removeAllListeners(t),await this.wire.sendAction("global-hotkey-unregister",{hotkey:t})}async unregisterAll(){await Promise.all(this.eventNames().filter((t=>!("registered"===t||"unregistered"===t))).map((t=>this.removeAllListeners(t)))),await this.wire.sendAction("global-hotkey-unregister-all",{})}async isRegistered(t){const{payload:{data:e}}=await this.wire.sendAction("global-hotkey-is-registered",{hotkey:t});return e}}En.GlobalHotkey=Sn;var An,Pn={},Mn={},Ln={},On=d&&d.__classPrivateFieldGet||function(t,e,n,i){if("a"===n&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(t):i?i.value:e.get(t)};Object.defineProperty(Ln,"__esModule",{value:!0}),Ln.Platform=void 0;const Rn=u,Tn=R,kn=new Map;class jn extends Rn.EmitterBase{constructor(t,e){super(e.wire,"application",t.uuid),this.getClient=t=>{this.wire.sendAction("platform-get-client",this.identity).catch((t=>{}));const e=t||this.identity,{uuid:n}=e;if(!kn.has(n)){const t=On(this,An,"f").call(this,n);kn.set(n,t)}return kn.get(n)},An.set(this,(async t=>{try{const e=`custom-frame-${t}`,n=await this._channel.connect(e,{wait:!1});return n.onDisconnection((()=>{kn.delete(t)})),n}catch(e){throw kn.delete(t),new Error("The targeted Platform is not currently running. Listen for application-started event for the given Uuid.")}})),this.launchLegacyManifest=this.launchContentManifest;const n=(0,Tn.validateIdentity)(t);if(n)throw new Error(n);this._channel=e,this.identity={uuid:t.uuid},this.Layout=this.fin.Platform.Layout,this.Application=this.fin.Application.wrapSync(this.identity)}async createView(t,e,n){this.wire.sendAction("platform-create-view",this.identity).catch((t=>{}));const i=await this.getClient(),o=await i.dispatch("create-view",{target:e,opts:t,targetView:n});if(!o||(0,Tn.validateIdentity)(o.identity))throw new Error(`When overwriting the createView call, please return an object that has a valid 'identity' property: ${JSON.stringify(o)}`);return this.fin.View.wrapSync(o.identity)}async createWindow(t){this.wire.sendAction("platform-create-window",this.identity).catch((t=>{}));const e=await this.getClient();t.reason||(t.reason="api-call");const n=await e.dispatch("create-view-container",t);if(!n||(0,Tn.validateIdentity)(n.identity))throw new Error(`When overwriting the createWindow call, please return an object that has a valid 'identity' property: ${JSON.stringify(n)}`);const{identity:i}=n,o=this.fin.Window.wrapSync(i);return o.name=i.name,o.uuid=i.uuid,o}async quit(){return this.wire.sendAction("platform-quit",this.identity).catch((t=>{})),(await this.getClient()).dispatch("quit")}async closeView(t){this.wire.sendAction("platform-close-view",this.identity).catch((t=>{}));const e=await this.getClient();await e.dispatch("close-view",{view:t})}async reparentView(t,e){console.warn("Platform.reparentView has been deprecated, please use Platform.createView"),this.wire.sendAction("platform-reparent-view",this.identity).catch((t=>{}));const n={...t,uuid:t.uuid??this.identity.uuid},i=await this.fin.View.wrap(n),o=await i.getOptions();return this.createView(o,e)}async getSnapshot(){return this.wire.sendAction("platform-get-snapshot",this.identity).catch((t=>{})),(await this.getClient()).dispatch("get-snapshot")}async getViewSnapshot(t){return(await this.getClient()).dispatch("get-view-snapshot",{viewIdentity:t})}async applySnapshot(t,e){this.wire.sendAction("platform-apply-snapshot",this.identity).catch((t=>{}));const n="Requested snapshot must be a valid Snapshot object, or a url or filepath to such an object.";let i;if("string"==typeof t)try{i=(await this._channel.wire.sendAction("get-application-manifest",{manifestUrl:t})).payload.data}catch(t){throw new Error(`${n}: ${t}`)}else i=t;if(!i.windows)throw new Error(n);const o=await this.getClient();return await o.dispatch("apply-snapshot",{snapshot:i,options:e}),this}async fetchManifest(t){return(await this.getClient()).dispatch("platform-fetch-manifest",{manifestUrl:t})}async launchContentManifest(t){this.wire.sendAction("platform-launch-content-manifest",this.identity).catch((()=>{}));const e=await this.getClient(),n=await this.fetchManifest(t);return e.dispatch("launch-into-platform",{manifest:n,manifestUrl:t}),this}async setWindowContext(t={},e){if(this.wire.sendAction("platform-set-window-context",this.identity).catch((t=>{})),!t)throw new Error("Please provide a serializable object or string to set the context.");const n=await this.getClient(),{entityType:i}=e?await this.fin.System.getEntityInfo(e.uuid,e.name):this.fin.me;await n.dispatch("set-window-context",{context:t,entityType:i,target:e||{uuid:this.fin.me.uuid,name:this.fin.me.name}})}async getWindowContext(t){this.wire.sendAction("platform-get-window-context",this.identity).catch((t=>{}));const e=await this.getClient(),{entityType:n}=t?await this.fin.System.getEntityInfo(t.uuid,t.name):this.fin.me;return e.dispatch("get-window-context",{target:t||{uuid:this.fin.me.uuid,name:this.fin.me.name},entityType:n})}async closeWindow(t,e={skipBeforeUnload:!1}){return this.wire.sendAction("platform-close-window",this.identity).catch((t=>{})),(await this.getClient()).dispatch("close-window",{windowId:t,options:e})}}Ln.Platform=jn,An=new WeakMap;var Bn={},zn={},Fn={},Dn={};function Un(t){switch(t){case"columns":case"grid":case"rows":case"tabs":return!0;default:return!1}}Object.defineProperty(Dn,"__esModule",{value:!0}),Dn.overrideFromComposables=Dn.isValidPresetType=void 0,Dn.isValidPresetType=Un,Dn.overrideFromComposables=function(...t){return e=>t.reduceRight(((t,e)=>n=>e(t(n))),(t=>t))(e)},Dn.default={isValidPresetType:Un};var Wn={},$n={},Vn={};Object.defineProperty(Vn,"__esModule",{value:!0}),Vn.ApiConsumer=void 0,Vn.ApiConsumer=class{constructor(t){this.strategy=t,this.consume=async t=>(await this.strategy.getExposedFunctions(t)).reduce(((e,n)=>({...e,[n.key]:this.strategy.createFunction(n,t)})),{})}};var Hn={},Nn={};Object.defineProperty(Nn,"__esModule",{value:!0}),Nn.expose=Nn.getExposedProperties=void 0;const Gn=Symbol("exposedProperties");Nn.getExposedProperties=t=>t[Gn]||t.prototype[Gn]||[],Nn.expose=t=>(e,n,i)=>{e[Gn]=e[Gn]||[],e[Gn].push({key:n,descriptor:i,options:t})},Object.defineProperty(Hn,"__esModule",{value:!0}),Hn.ApiExposer=void 0;const qn=Nn;Hn.ApiExposer=class{constructor(t){this.strategy=t,this.exposeInstance=async(t,e)=>{const n=(0,qn.getExposedProperties)(t),i=await Promise.all(n.map((async({key:n,options:i})=>({key:n,options:await this.strategy.exposeFunction(t[n].bind(t),{key:n,options:i,meta:e})}))));await this.strategy.exposeMeta(e,i)}}};var Yn={},Kn={},Zn={};Object.defineProperty(Zn,"__esModule",{value:!0}),Zn.ChannelsConsumer=void 0,Zn.ChannelsConsumer=class{constructor(t){this.channel=t,this.getExposedFunctions=async t=>{const{id:e}=t,{props:n}=await this.channel.dispatch(`api-meta:${e}`);return n},this.createFunction=t=>(...e)=>{const{action:n}=t.options;return this.channel.dispatch(n,{args:e})}}};var Jn={};Object.defineProperty(Jn,"__esModule",{value:!0}),Jn.ChannelsExposer=void 0,Jn.ChannelsExposer=class{constructor(t){this.channelProviderOrClient=t,this.exposeFunction=async(t,e)=>{const{key:n,options:i,meta:o}=e,{id:r}=o,s=`${r}.${i?.action||n}`;return await this.channelProviderOrClient.register(s,(async({args:e})=>t(...e))),{action:s}},this.exposeMeta=async({id:t},e)=>{const n=`api-meta:${t}`;await this.channelProviderOrClient.register(n,(()=>({props:e})))}}},function(t){var e=d&&d.__createBinding||(Object.create?function(t,e,n,i){void 0===i&&(i=n);var o=Object.getOwnPropertyDescriptor(e,n);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,o)}:function(t,e,n,i){void 0===i&&(i=n),t[i]=e[n]}),n=d&&d.__exportStar||function(t,n){for(var i in t)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||e(n,t,i)};Object.defineProperty(t,"__esModule",{value:!0}),n(Zn,t),n(Jn,t)}(Kn),function(t){var e=d&&d.__createBinding||(Object.create?function(t,e,n,i){void 0===i&&(i=n);var o=Object.getOwnPropertyDescriptor(e,n);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,o)}:function(t,e,n,i){void 0===i&&(i=n),t[i]=e[n]}),n=d&&d.__exportStar||function(t,n){for(var i in t)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||e(n,t,i)};Object.defineProperty(t,"__esModule",{value:!0}),n(Kn,t)}(Yn),function(t){var e=d&&d.__createBinding||(Object.create?function(t,e,n,i){void 0===i&&(i=n);var o=Object.getOwnPropertyDescriptor(e,n);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,o)}:function(t,e,n,i){void 0===i&&(i=n),t[i]=e[n]}),n=d&&d.__exportStar||function(t,n){for(var i in t)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||e(n,t,i)};Object.defineProperty(t,"__esModule",{value:!0}),n(Vn,t),n(Hn,t),n(Yn,t),n(Nn,t)}($n);var Xn={};Object.defineProperty(Xn,"__esModule",{value:!0}),Xn.createRelayedDispatch=e.relayChannelClientApi_1=Xn.relayChannelClientApi=void 0;const Qn=["no longer connected","RTCDataChannel closed unexpectedly","The client you are trying to dispatch from is disconnected from the target provider"];e.relayChannelClientApi_1=Xn.relayChannelClientApi=async(t,e)=>{t.register(`relay:${e}`,(({action:e,target:n,payload:i})=>t.dispatch(n,e,i))),await Promise.resolve()},Xn.createRelayedDispatch=(t,e,n,i)=>async(o,r)=>{try{return await t.dispatch(`relay:${n}`,{action:o,payload:r,target:e})}catch(t){if(s=t.message,Qn.some((t=>s.includes(t)))&&i)throw new Error(i);throw t}var s};var ti,ei,ni,ii=d&&d.__classPrivateFieldSet||function(t,e,n,i,o){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?o.call(t,n):o?o.value=n:e.set(t,n),n},oi=d&&d.__classPrivateFieldGet||function(t,e,n,i){if("a"===n&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(t):i?i.value:e.get(t)};Object.defineProperty(Wn,"__esModule",{value:!0}),Wn.ColumnOrRow=Wn.TabStack=Wn.LayoutNode=void 0;const ri=$n,si=Xn;class ai{constructor(t,e){ti.set(this,void 0),this.isRoot=()=>oi(this,ti,"f").isRoot(this.entityId),this.exists=()=>oi(this,ti,"f").exists(this.entityId),this.getParent=async()=>{const t=await oi(this,ti,"f").getParent(this.entityId);if(t)return ai.getEntity(t,oi(this,ti,"f"))},this.createAdjacentStack=async(t,e)=>{const n=await oi(this,ti,"f").createAdjacentStack(this.entityId,t,e);return ai.getEntity({entityId:n,type:"stack"},oi(this,ti,"f"))},this.getAdjacentStacks=async t=>(await oi(this,ti,"f").getAdjacentStacks({targetId:this.entityId,edge:t})).map((t=>ai.getEntity({type:"stack",entityId:t.entityId},oi(this,ti,"f")))),ii(this,ti,t,"f"),this.entityId=e}}Wn.LayoutNode=ai,ti=new WeakMap,ai.newLayoutEntitiesClient=async(t,e,n)=>{const i=(0,si.createRelayedDispatch)(t,n,"layout-relay","You are trying to interact with a layout component on a window that does not exist or has been destroyed.");return new ri.ApiConsumer(new ri.ChannelsConsumer({dispatch:i})).consume({id:e})},ai.getEntity=(t,e)=>{const{entityId:n,type:i}=t;switch(i){case"column":case"row":return new di(e,n,i);case"stack":return new ci(e,n);default:throw new Error(`Unrecognised Layout Entity encountered ('${JSON.stringify(t)})`)}};class ci extends ai{constructor(t,e){super(t,e),ei.set(this,void 0),this.type="stack",this.getViews=()=>oi(this,ei,"f").getStackViews(this.entityId),this.addView=async(t,e={index:0})=>oi(this,ei,"f").addViewToStack(this.entityId,t,e),this.removeView=async t=>{await oi(this,ei,"f").removeViewFromStack(this.entityId,t)},this.setActiveView=async t=>{await oi(this,ei,"f").setStackActiveView(this.entityId,t)},ii(this,ei,t,"f")}}Wn.TabStack=ci,ei=new WeakMap;class di extends ai{constructor(t,e,n){super(t,e),ni.set(this,void 0),this.getContent=async()=>(await oi(this,ni,"f").getContent(this.entityId)).map((t=>ai.getEntity(t,oi(this,ni,"f")))),ii(this,ni,t,"f"),this.type=n}}Wn.ColumnOrRow=di,ni=new WeakMap;var hi={};Object.defineProperty(hi,"__esModule",{value:!0}),hi.DEFAULT_LAYOUT_KEY=hi.LAYOUT_CONTROLLER_ID=void 0,hi.LAYOUT_CONTROLLER_ID="layout-entities",hi.DEFAULT_LAYOUT_KEY="__default__";var li,ui,pi,fi=d&&d.__classPrivateFieldGet||function(t,e,n,i){if("a"===n&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(t):i?i.value:e.get(t)};Object.defineProperty(Fn,"__esModule",{value:!0}),Fn.Layout=void 0;const mi=$,wi=R,yi=u,gi=Dn,vi=Wn,Ci=hi;class bi extends yi.Base{static getClient(t){return fi(t,ui,"f").getValue()}constructor(t,e){super(e),li.add(this),ui.set(this,new mi.Lazy((async()=>vi.LayoutNode.newLayoutEntitiesClient(await this.platform.getClient(),Ci.LAYOUT_CONTROLLER_ID,this.identity)))),this.replace=async t=>{this.wire.sendAction("layout-replace").catch((t=>{}));const e=await this.platform.getClient();await e.dispatch("replace-layout",{target:this.identity,opts:{layout:t}})},this.replaceView=async(t,e)=>{this.wire.sendAction("layout-replace-view").catch((t=>{}));const n=await this.platform.getClient();await n.dispatch("replace-view",{target:this.identity,opts:{viewToReplace:t,newView:e}})},this.applyPreset=async t=>{this.wire.sendAction("layout-apply-preset").catch((t=>{}));const e=await this.platform.getClient(),{presetType:n}=t;if(!n||!(0,gi.isValidPresetType)(n))throw new Error("Cannot apply preset layout, please include an applicable presetType property in the PresetLayoutOptions.");await e.dispatch("apply-preset-layout",{target:this.identity,opts:{presetType:n}})};const n=(0,wi.validateIdentity)(t);if(n)throw new Error(n);this.identity=t,this.platform=this.fin.Platform.wrapSync({uuid:t.uuid}),t.uuid===this.fin.me.uuid&&t.name===this.fin.me.name&&(this.init=this.fin.Platform.Layout.init)}async getConfig(){return this.wire.sendAction("layout-get-config").catch((t=>{})),(await this.platform.getClient()).dispatch("get-frame-snapshot",{target:this.identity})}async getCurrentViews(){this.wire.sendAction("layout-get-views").catch((t=>{}));const t=await this.platform.getClient();return(await t.dispatch("get-layout-views",{target:this.identity})).map((t=>this.fin.View.wrapSync(t)))}async getRootItem(){this.wire.sendAction("layout-get-root-item").catch((()=>{}));const t=await fi(this,ui,"f").getValue(),e=await t.getRoot("layoutName"in this.identity?this.identity:void 0);return vi.LayoutNode.getEntity(e,t)}async getStackByViewIdentity(t){this.wire.sendAction("layout-get-stack-by-view").catch((()=>{}));const e=await fi(this,ui,"f").getValue(),n=await e.getStackByView(t);if(!n)throw new Error(`No stack found for view: ${t.uuid}/${t.name}`);return vi.LayoutNode.getEntity(n,e)}async addView(t,{location:e,targetView:n}={}){this.wire.sendAction("layout-add-view").catch((t=>{}));const{identity:i}=await fi(this,li,"m",pi).call(this,"layout-add-view",{viewOptions:t,location:e,targetView:n});return{identity:i}}async closeView(t){this.wire.sendAction("layout-close-view").catch((t=>{})),await fi(this,li,"m",pi).call(this,"layout-close-view",{viewIdentity:t})}}Fn.Layout=bi,ui=new WeakMap,li=new WeakSet,pi=async function(t,e){return(await this.platform.getClient()).dispatch(t,{target:this.identity,opts:e})};var _i,Ii,Ei,xi,Si,Ai=d&&d.__classPrivateFieldGet||function(t,e,n,i){if("a"===n&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(t):i?i.value:e.get(t)},Pi=d&&d.__classPrivateFieldSet||function(t,e,n,i,o){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?o.call(t,n):o?o.value=n:e.set(t,n),n};Object.defineProperty(zn,"__esModule",{value:!0}),zn.LayoutModule=void 0;const Mi=u,Li=Fn,Oi=hi;class Ri extends Mi.Base{constructor(){super(...arguments),_i.add(this),Ii.set(this,!1),Ei.set(this,null),this.init=async(t={})=>{if(this.wire.sendAction("layout-init").catch((t=>{})),!this.wire.environment.layoutAllowedInContext(this.fin))throw new Error("Layout.init can only be called from a Window context.");if(Ai(this,Ii,"f"))throw new Error("Layout.init was already called, please use Layout.create to add additional layouts.");"openfin"===this.wire.environment.type&&await this.fin.Platform.getCurrentSync().getClient(),Pi(this,Ii,!0,"f"),Pi(this,Ei,await this.wire.environment.initLayoutManager(this.fin,this.wire,t),"f"),await this.wire.environment.applyLayoutSnapshot(this.fin,Ai(this,Ei,"f"),t);const e={name:this.fin.me.name,uuid:this.fin.me.uuid};if(!t.layoutManagerOverride){const t={layoutName:Oi.DEFAULT_LAYOUT_KEY,...e};return Ai(this,xi,"f").call(this,t)}return this.wrapSync(e)},xi.set(this,(t=>{const e="[Layout] You are using a deprecated property `layoutManager` - it will throw if you access it starting in v37.",n=new Proxy({},{get(t,n){throw console.warn(`[Layout-mgr-proxy] accessing ${n.toString()}`),new Error(e)}}),i=Object.assign(this.wrapSync(t),{layoutManager:n});return new Proxy(i,{get(t,n){if("layoutManager"===n)throw console.warn(`[Layout-proxy] accessing ${n.toString()}`),new Error(e);return t[n]}})})),this.getCurrentLayoutManagerSync=()=>Ai(this,_i,"m",Si).call(this,"fin.Platform.Layout.getCurrentLayoutManagerSync()"),this.create=async t=>this.wire.environment.createLayout(Ai(this,_i,"m",Si).call(this,"fin.Platform.Layout.create()"),t),this.destroy=async t=>this.wire.environment.destroyLayout(Ai(this,_i,"m",Si).call(this,"fin.Platform.Layout.destroy()"),t)}async wrap(t){return this.wire.sendAction("layout-wrap").catch((t=>{})),new Li.Layout(t,this.wire)}wrapSync(t){return this.wire.sendAction("layout-wrap-sync").catch((t=>{})),new Li.Layout(t,this.wire)}async getCurrent(){if(this.wire.sendAction("layout-get-current").catch((t=>{})),"openfin"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error("You are not in a Window context. Only Windows can have a Layout.");const{uuid:t,name:e}=this.fin.me;return this.wrap({uuid:t,name:e})}getCurrentSync(){if(this.wire.sendAction("layout-get-current-sync").catch((t=>{})),"openfin"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error("You are not in a Window context. Only Windows can have a Layout.");const{uuid:t,name:e}=this.fin.me;return this.wrapSync({uuid:t,name:e})}async getLayoutByViewIdentity(t){this.wire.sendAction("layout-get-by-view-identity").catch((()=>{}));let e=await this.wire.environment.getViewWindowIdentity(this.fin,t);e.identity&&(e=e.identity);try{const n=this.wrapSync(e),i=await Li.Layout.getClient(n),o=await i.getLayoutIdentityForViewOrThrow(t);return this.wrapSync(o)}catch(n){if(!["No action registered at target for","getLayoutIdentityForViewOrThrow is not a function"].some((t=>n.message.includes(t))))throw n;if(e.uuid===e.name)throw new Error(`View identity ${JSON.stringify(t)} is not attached to any layout in provider window ${JSON.stringify(e)}.`);return this.wrapSync(e)}}}zn.LayoutModule=Ri,Ii=new WeakMap,Ei=new WeakMap,xi=new WeakMap,_i=new WeakSet,Si=function(t){if(!Ai(this,Ei,"f"))throw new Error(`You must call init before using the API ${t}`);return Ai(this,Ei,"f")},function(t){var e=d&&d.__createBinding||(Object.create?function(t,e,n,i){void 0===i&&(i=n);var o=Object.getOwnPropertyDescriptor(e,n);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,o)}:function(t,e,n,i){void 0===i&&(i=n),t[i]=e[n]}),n=d&&d.__exportStar||function(t,n){for(var i in t)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||e(n,t,i)};Object.defineProperty(t,"__esModule",{value:!0}),n(zn,t),n(Fn,t)}(Bn),Object.defineProperty(Mn,"__esModule",{value:!0}),Mn.PlatformModule=void 0;const Ti=u,ki=Ln,ji=Bn;class Bi extends Ti.Base{constructor(t,e){super(t),this._channel=e,this.Layout=new ji.LayoutModule(this.wire)}async init(t){if(!fin.__internal_.isPlatform||fin.me.name!==fin.me.uuid)throw new Error("fin.Platform.init should only be called from a custom platform provider running in the main window of the application.");return this.wire.environment.initPlatform(this.fin,t)}async wrap(t){return this.wire.sendAction("platform-wrap").catch((t=>{})),new ki.Platform({uuid:t.uuid},this._channel)}wrapSync(t){return this.wire.sendAction("platform-wrap-sync").catch((t=>{})),new ki.Platform({uuid:t.uuid},this._channel)}async getCurrent(){return this.wire.sendAction("platform-get-current").catch((t=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction("platform-get-current-sync").catch((t=>{})),this.wrapSync({uuid:this.wire.me.uuid})}start(t){return this.wire.sendAction("platform-start").catch((t=>{})),new Promise((async(e,n)=>{try{const{uuid:n}=t,i=await this.fin.Application._create({...t,isPlatformController:!0});i.once("platform-api-ready",(()=>e(this.wrapSync({uuid:n})))),i._run({uuid:n})}catch(t){n(t)}}))}startFromManifest(t,e){return this.wire.sendAction("platform-start-from-manifest").catch((t=>{})),new Promise((async(n,i)=>{try{const i=await this.fin.Application._createFromManifest(t);i.once("platform-api-ready",(()=>n(this.wrapSync({uuid:i.identity.uuid})))),i._run(e)}catch(t){i(t)}}))}}Mn.PlatformModule=Bi,function(t){var e=d&&d.__createBinding||(Object.create?function(t,e,n,i){void 0===i&&(i=n);var o=Object.getOwnPropertyDescriptor(e,n);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,o)}:function(t,e,n,i){void 0===i&&(i=n),t[i]=e[n]}),n=d&&d.__exportStar||function(t,n){for(var i in t)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||e(n,t,i)};Object.defineProperty(t,"__esModule",{value:!0}),n(Mn,t),n(Ln,t)}(Pn);var zi={};!function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.getMe=t.getBaseMe=t.environmentUnsupportedMessage=void 0;const e=X(),n=mn,i=st(),o=an;function r(t,e,n){return{isView:"view"===t,isWindow:"window"===t,isFrame:"iframe"===t,isExternal:"external connection"===t,uuid:e,name:n,entityType:t}}t.environmentUnsupportedMessage="You are not running in OpenFin.",t.getBaseMe=r,t.getMe=function(s){const{uuid:a,name:c,entityType:d}=s.me,h={setContext(){throw new Error(t.environmentUnsupportedMessage)},addContextHandler(){throw new Error(t.environmentUnsupportedMessage)},getContextGroups(){throw new Error(t.environmentUnsupportedMessage)},joinContextGroup(){throw new Error(t.environmentUnsupportedMessage)},removeFromContextGroup(){throw new Error(t.environmentUnsupportedMessage)},getAllClientsInContextGroup(){throw new Error(t.environmentUnsupportedMessage)},getInfoForContextGroup(){throw new Error(t.environmentUnsupportedMessage)}},l="Interop API has not been instantiated. Either connection has failed or you have not declared interop in your config.",u={setContext(){throw new Error(l)},addContextHandler(){throw new Error(l)},getContextGroups(){throw new Error(l)},joinContextGroup(){throw new Error(l)},removeFromContextGroup(){throw new Error(l)},getAllClientsInContextGroup(){throw new Error(l)},getInfoForContextGroup(){throw new Error(l)}},p={eventNames:()=>{throw new Error(t.environmentUnsupportedMessage)},emit:()=>{throw new Error(t.environmentUnsupportedMessage)},listeners:()=>{throw new Error(t.environmentUnsupportedMessage)},listenerCount:()=>{throw new Error(t.environmentUnsupportedMessage)},on:()=>{throw new Error(t.environmentUnsupportedMessage)},addListener:()=>{throw new Error(t.environmentUnsupportedMessage)},once:()=>{throw new Error(t.environmentUnsupportedMessage)},prependListener:()=>{throw new Error(t.environmentUnsupportedMessage)},prependOnceListener:()=>{throw new Error(t.environmentUnsupportedMessage)},removeListener:()=>{throw new Error(t.environmentUnsupportedMessage)},removeAllListeners:()=>{throw new Error(t.environmentUnsupportedMessage)}};switch(d){case"view":return Object.assign(new e.View(s,{uuid:a,name:c}),r(d,a,c),{interop:u,isOpenFin:!0});case"window":return Object.assign(new i._Window(s,{uuid:a,name:c}),r(d,a,c),{interop:u,isOpenFin:!0});case"iframe":return Object.assign(new n._Frame(s,{uuid:a,name:c}),r(d,a,c),{interop:u,isOpenFin:!0});case"external connection":return Object.assign(new o.ExternalApplication(s,{uuid:a}),r(d,a,c),{interop:u,isOpenFin:!1});default:return{...r(d,a,c),...p,interop:h,isOpenFin:!1}}}}(zi);var Fi={},Di={},Ui={};Object.defineProperty(Ui,"__esModule",{value:!0}),Ui.createWarningObject=Ui.createUnusableObject=void 0,Ui.createUnusableObject=function(t){const e=()=>{throw new Error(t)};return new Proxy({},{apply:e,construct:e,defineProperty:e,deleteProperty:e,get:e,getOwnPropertyDescriptor:e,getPrototypeOf:e,has:e,isExtensible:e,ownKeys:e,preventExtensions:e,set:e,setPrototypeOf:e})},Ui.createWarningObject=function(t,e){return new Proxy(e,{get:(...e)=>(console.warn(t),Reflect.get(...e)),set:(...e)=>(console.warn(t),Reflect.set(...e)),getOwnPropertyDescriptor:(...e)=>(console.warn(t),Reflect.getOwnPropertyDescriptor(...e)),ownKeys:(...e)=>(console.warn(t),Reflect.ownKeys(...e))})};var Wi,$i={},Vi={},Hi={};!function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.wrapIntentHandler=t.BROKER_ERRORS=t.generateOverrideWarning=t.generateOverrideError=t.wrapContextHandler=t.wrapInTryCatch=t.generateId=void 0,t.generateId=()=>`${Math.random()}${Date.now()}`,t.wrapInTryCatch=(t,e)=>(...n)=>{try{return t(...n)}catch(t){throw new Error((e||"")+t)}},t.wrapContextHandler=(t,e)=>async n=>{try{await t(n)}catch(t){throw console.error(`Error thrown by handler ${e} for context type ${n.type}: ${t}`),t}},t.generateOverrideError=(t,e)=>`You have tried to to use ${t} but ${e} has not been overridden in the Interop Broker. Please override this function. Refer to our documentation for more info.`,t.generateOverrideWarning=(t,e,n,i)=>{const{uuid:o,name:r}=n;return i?`Entity with identity: ${o}/${r} has called ${i} or ${t} but ${e} has not been overridden.`:`Entity with identity: ${o}/${r} has called ${t} but ${e} has not been overridden.`},t.BROKER_ERRORS={fireIntent:(0,t.generateOverrideError)("fireIntent","handleFiredIntent"),fireIntentForContext:(0,t.generateOverrideError)("fireIntentForContext","handleFiredIntentForContext"),getInfoForIntent:(0,t.generateOverrideError)("getInfoForIntent","handleInfoForIntent"),getInfoForIntentsByContext:(0,t.generateOverrideError)("getInfoForIntentsByContext","handleInfoForIntentsByContext"),joinSessionContextGroupWithJoinContextGroup:"The Context Group you have tried to join is a Session Context Group. Custom Context Groups can only be defined by the Interop Broker through code or manifest configuration. Please use joinSessionContextGroup.",fdc3Open:(0,t.generateOverrideError)("fdc3.open","fdc3HandleOpen"),fdc3FindInstances:(0,t.generateOverrideError)("fdc3.findInstances","fdc3HandleFindInstances"),fdc3GetAppMetadata:(0,t.generateOverrideError)("fdc3.getAppMetadata","fdc3HandleGetAppMetadata"),fdc3GetInfo:(0,t.generateOverrideError)("fdc3.getInfo","fdc3HandleGetInfo")},t.wrapIntentHandler=(t,e)=>async n=>{try{return t(n)}catch(t){throw console.error(`Error thrown by handler ${e}: ${t}`),t}}}(Hi);var Ni,Gi,qi={};function Yi(){if(Gi)return $i;Gi=1;var t,e,n,i=d&&d.__classPrivateFieldSet||function(t,e,n,i,o){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?o.call(t,n):o?o.value=n:e.set(t,n),n},o=d&&d.__classPrivateFieldGet||function(t,e,n,i){if("a"===n&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(t):i?i.value:e.get(t)},r=d&&d.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty($i,"__esModule",{value:!0}),$i.InteropBroker=void 0;const a=u,c=r(function(){if(Wi)return Vi;Wi=1,Object.defineProperty(Vi,"__esModule",{value:!0});const t=Eo();return Vi.default=class{constructor(t,e){this.provider=t,this.id=e,this.lastContext=void 0,this.contextGroupMap=new Map,this.clients=new Map,this.registerListeners()}registerListeners(){this.provider.register(`sessionContextGroup:getContext-${this.id}`,this.getCurrentContext.bind(this)),this.provider.register(`sessionContextGroup:setContext-${this.id}`,this.setContext.bind(this)),this.provider.register(`sessionContextGroup:handlerAdded-${this.id}`,this.handlerAdded.bind(this)),this.provider.register(`sessionContextGroup:handlerRemoved-${this.id}`,this.handlerRemoved.bind(this))}getCurrentContext(t){return t.type?this.contextGroupMap.get(t.type):this.lastContext}setContext(e,n){const{context:i}=e,o=t.InteropBroker.checkContextIntegrity(i);if(!1===o.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${o.reason}. Context: ${JSON.stringify(i)}`);if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name} not in Session Client State Map`);this.contextGroupMap.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((t=>{t.contextHandlers.get(i.type)?.forEach((e=>{this.provider.dispatch(t.clientIdentity,e,i)})),t.globalHandler&&this.provider.dispatch(t.clientIdentity,t.globalHandler,i)}))}getClientState(t){return this.clients.get(t.endpointId)}async handlerAdded(t,e){const{handlerId:n,contextType:i}=t,o=this.getClientState(e);if(!o)throw new Error(`Client with Identity: ${e.uuid} ${e.name} not in Client State Map`);if(i){const t=o.contextHandlers.get(i)||[];o.contextHandlers.set(i,[...t,n]);const r=this.contextGroupMap.get(i);r&&await this.provider.dispatch(e,n,r)}else{o.globalHandler=n;const t=[...this.contextGroupMap.keys()].map((async t=>{const i=this.contextGroupMap.get(t);i&&await this.provider.dispatch(e,n,i)}));await Promise.all(t)}}handlerRemoved(t,e){const{handlerId:n}=t,i=this.clients.get(e.endpointId);i?(Array.from(i.contextHandlers).forEach((([,t])=>{const e=t.indexOf(n);e>-1&&t.splice(e,1)})),i.globalHandler===n&&(i.globalHandler=void 0)):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${e}`)}registerNewClient(t){if(!this.clients.has(t.endpointId)){const e={contextHandlers:new Map,clientIdentity:t,globalHandler:void 0};this.clients.set(t.endpointId,e)}}onDisconnection(t){this.clients.delete(t.endpointId)}},Vi}()),h=Hi,l=r(s),p=function(){if(Ni)return qi;Ni=1,Object.defineProperty(qi,"__esModule",{value:!0}),qi.PrivateChannelProvider=void 0;const t=Yi();return qi.PrivateChannelProvider=class e{constructor(t,e){this.provider=t,this.id=e,this.clients=new Map,this.registerListeners(),this.contextByContextType=new Map,this.lastContext=void 0,this.provider.onConnection((t=>this.registerNewClient(t))),this.provider.onDisconnection((async t=>{const{endpointId:e}=t;this.clients.has(e)&&await this.handleClientDisconnecting(t),0===(await this.provider.getAllClientInfo()).length&&this.provider.destroy()}))}getClientState(t){return this.clients.get(t.endpointId)}registerListeners(){this.provider.register("broadcast",this.broadcast.bind(this)),this.provider.register("getCurrentContext",this.getCurrentContext.bind(this)),this.provider.register("contextHandlerAdded",this.contextHandlerAdded.bind(this)),this.provider.register("contextHandlerRemoved",this.contextHandlerRemoved.bind(this)),this.provider.register("nonStandardHandlerRemoved",this.nonStandardHandlerRemoved.bind(this)),this.provider.register("onAddContextHandlerAdded",this.onAddContextHandlerAdded.bind(this)),this.provider.register("onDisconnectHandlerAdded",this.onDisconnectHandlerAdded.bind(this)),this.provider.register("onUnsubscribeHandlerAdded",this.onUnsubscribeHandlerAdded.bind(this)),this.provider.register("clientDisconnecting",((t,e)=>{this.handleClientDisconnecting(e)}))}broadcast(e,n){const{context:i}=e;if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name}, tried to call broadcast, is not connected to this Private Channel`);const o=t.InteropBroker.checkContextIntegrity(i);if(!1===o.isValid)throw new Error(`Failed to broadcast - bad Context. Reason: ${o.reason}. Context: ${JSON.stringify(i)}`);this.contextByContextType.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((t=>{const e=t.handlerIdsByContextTypes.get(i.type);e&&e.forEach((e=>{this.provider.dispatch(t.clientIdentity,e,i)})),t.globalHandler&&this.provider.dispatch(t.clientIdentity,t.globalHandler,i)}))}getCurrentContext(t,e){const{contextType:n}=t;if(!this.getClientState(e))throw new Error(`Client with Identity: ${e.uuid} ${e.name}, tried to call getCurrentContext, is not connected to this Private Channel`);return void 0!==n?this.contextByContextType.get(n)||null:this.lastContext?this.lastContext:null}contextHandlerAdded(t,e){const{handlerId:n,contextType:i}=t,o=this.getClientState(e);if(!o)throw new Error(`Client with Identity: ${e.uuid} ${e.name}, tried to call addContextListener, is not connected to this Private Channel`);if(i){const t=o.handlerIdsByContextTypes.get(i)||[];o.handlerIdsByContextTypes.set(i,[...t,n])}else o.globalHandler=n;Array.from(this.clients.values()).forEach((t=>{t.clientIdentity.endpointId!==e.endpointId&&t.onAddContextListenerHandlerId&&this.provider.dispatch(t.clientIdentity,t.onAddContextListenerHandlerId,i)}))}async contextHandlerRemoved(t,e){const{handlerId:n}=t,i=this.getClientState(e);if(i){let o;if(i.globalHandler===n)i.globalHandler=void 0;else for(const[t,e]of i.handlerIdsByContextTypes){const i=e.indexOf(n);i>-1&&(e.splice(i,1),o=t)}const r=(await this.getConnectedClients()).map((async t=>{const{clientIdentity:n,clientIdentity:{endpointId:i},onUnsubscribeHandlerId:r}=t;i!==e.endpointId&&r&&await this.provider.dispatch(n,r,o)}));try{await Promise.all(r)}catch(t){throw console.error(`Problem when attempting to dispatch to onUnsubscribeHandlers. Error: ${t} Removing Client: ${n}. uuid: ${e.uuid}. name: ${e.name}. endpointId: ${e.endpointId}`),new Error(t)}}else console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. uuid: ${e.uuid}. name: ${e.name}. endpointId: ${e.endpointId}.`)}nonStandardHandlerRemoved(t,e){const{handlerId:n}=t,i=this.getClientState(e);i?i.onDisconnectHandlerId===n?i.onDisconnectHandlerId=void 0:i.onAddContextListenerHandlerId===n?i.onAddContextListenerHandlerId=void 0:i.onUnsubscribeHandlerId===n&&(i.onUnsubscribeHandlerId=void 0):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${e}`)}onAddContextHandlerAdded(t,e){const n=this.getClientState(e),{handlerId:i}=t;if(!n)throw new Error(`Client with Identity: ${e.uuid} ${e.name}, tried to call onAddContextListener, is not connected to this Private Channel`);n.onAddContextListenerHandlerId=i,Array.from(this.clients.values()).forEach((t=>{t.clientIdentity.endpointId!==e.endpointId&&Array.from(t.handlerIdsByContextTypes.keys()).forEach((t=>{this.provider.dispatch(e,i,t)}))}))}onDisconnectHandlerAdded(t,e){const n=this.getClientState(e),{handlerId:i}=t;if(!n)throw new Error(`Client with Identity: ${e.uuid} ${e.name}, tried to call onDisconnect, is not connected to this Private Channel`);n.onDisconnectHandlerId=i}onUnsubscribeHandlerAdded(t,e){const n=this.getClientState(e),{handlerId:i}=t;if(!n)throw new Error(`Client with Identity: ${e.uuid} ${e.name}, tried to call onUnsubscribe, is not connected to this Private Channel`);n.onUnsubscribeHandlerId=i}removeClient(t){const e=this.getClientState(t);if(!e)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call disconnect, is not connected to this Private Channel`);e.handlerIdsByContextTypes.clear(),this.clients.delete(t.endpointId)}async fireOnDisconnectForOtherClients(t){const{endpointId:e}=t,n=(await this.getConnectedClients()).map((async t=>{const{clientIdentity:{endpointId:n},onDisconnectHandlerId:i}=t;n!==e&&i&&await this.provider.dispatch(t.clientIdentity,i)}));try{await Promise.all(n)}catch(e){throw console.error(`Problem when attempting to dispatch to onDisconnectHandlers. Error: ${e} Disconnecting Client: uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}`),new Error(e)}}async unsubscribeAll(t){const{endpointId:e}=t,n=this.clients.get(e);if(n){const e=Array.from(n.handlerIdsByContextTypes.values()).flat(),i=n.globalHandler;if(e.length>0){const n=e.map((async e=>this.contextHandlerRemoved({handlerId:e},t)));try{await Promise.all(n)}catch(t){console.error(t.message)}}if(i)try{await this.contextHandlerRemoved({handlerId:i},t)}catch(t){console.error(t.message)}}}async handleClientDisconnecting(t){await this.unsubscribeAll(t),this.removeClient(t),await this.fireOnDisconnectForOtherClients(t)}registerNewClient(t){if(!this.clients.has(t.endpointId)){const e={clientIdentity:t,handlerIdsByContextTypes:new Map,globalHandler:void 0,onAddContextListenerHandlerId:void 0,onUnsubscribeHandlerId:void 0,onDisconnectHandlerId:void 0};this.clients.set(t.endpointId,e)}}async getConnectedClients(){const t=await this.provider.getAllClientInfo();return Array.from(this.clients.values()).filter((e=>{const{uuid:n,name:i}=e.clientIdentity;return t.some((t=>i===t.name&&n===t.uuid))}))}static init(t,n){return new e(t,n)}},qi}(),f=$,m=[{id:"green",displayMetadata:{color:"#00CC88",name:"green"}},{id:"purple",displayMetadata:{color:"#8C61FF",name:"purple"}},{id:"orange",displayMetadata:{color:"#FF8C4C",name:"orange"}},{id:"red",displayMetadata:{color:"#FF5E60",name:"red"}},{id:"pink",displayMetadata:{color:"#FF8FB8",name:"pink"}},{id:"yellow",displayMetadata:{color:"#E9FF8F",name:"yellow"}}];let w=class r extends a.Base{constructor(r,s,a){super(r),t.set(this,void 0),e.set(this,void 0),n.set(this,void 0),this.getProvider=()=>o(this,n,"f").getValue(),this.interopClients=new Map,this.contextGroupsById=new Map,i(this,e,a.contextGroups??[...m],"f"),i(this,t,a.fdc3Info,"f"),a?.logging&&(this.logging=a.logging),this.intentClientMap=new Map,this.lastContextMap=new Map,this.sessionContextGroupMap=new Map,i(this,n,new f.Lazy(s),"f"),this.setContextGroupMap(),this.setupChannelProvider()}static createClosedConstructor(...t){return class extends r{constructor(...e){if(e.length){const[n,i,o]=e;if(o&&"object"==typeof o&&!(0,l.default)(o,t[2]))return console.warn("You have modified the parameters of the InteropOverride constructor. This behavior is deprecated and will be removed in a future version. You can modify these options in your manifest. Please consult our Interop docs for guidance on migrating to the new override scheme."),void super(t[0],t[1],o);console.warn("You are attempting to pass arguments to the InteropOverride constructor. This is not necessary, and these passed arguments will be ignored. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.")}super(...t)}}}setContext({context:t},e){this.wire.sendAction("interop-broker-set-context").catch((t=>{}));const n=this.getClientState(e);if(!n||!n.contextGroupId)throw n?new Error("You must join a context group before you can set context."):new Error(`Client with Identity: ${e.uuid} ${e.name} not in Client State Map`);{const{contextGroupId:e}=n;this.setContextForGroup({context:t},e)}}setContextForGroup({context:t},e){this.wire.sendAction("interop-broker-set-context-for-group").catch((t=>{}));const n=this.contextGroupsById.get(e);if(!n)throw new Error(`Unable to set context for context group that isn't in the context group mapping: ${e}.`);const i=r.checkContextIntegrity(t);if(!1===i.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${i.reason}. Context: ${JSON.stringify(t)}`);const o=t.type;n.set(o,t),this.lastContextMap.set(e,o),Array.from(this.interopClients.values()).filter((t=>t.contextGroupId===e)).forEach((e=>{for(const[,n]of e.contextHandlers)r.isContextTypeCompatible(o,n.contextType)&&this.invokeContextHandler(e.clientIdentity,n.handlerId,t)}))}getCurrentContext(t,e){this.wire.sendAction("interop-broker-get-current-context").catch((t=>{}));const n=this.getClientState(e);if(!n?.contextGroupId)throw new Error("You must be a member of a context group to call getCurrentContext");const{contextGroupId:i}=n,o=this.contextGroupsById.get(i),r=this.lastContextMap.get(i),s=t?.contextType??r;return o&&s?o.get(s):void 0}async joinContextGroup({contextGroupId:t,target:e},n){if(this.wire.sendAction("interop-broker-join-context-group").catch((t=>{})),this.sessionContextGroupMap.has(t))throw new Error(h.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup);if(e){r.hasEndpointId(e)&&await this.addClientToContextGroup({contextGroupId:t},e);try{const n=this.channel.connections.filter((t=>t.uuid===e.uuid&&t.name===e.name));if(!n.length)throw new Error(`Given Identity ${e.uuid} ${e.name} is not connected to the Interop Broker.`);n.length>1&&console.warn(`More than one connection found for identity ${e.uuid} ${e.name}`);const i=[];for(const e of n)i.push(this.addClientToContextGroup({contextGroupId:t},e));await Promise.all(i)}catch(t){throw new Error(t)}}else await this.addClientToContextGroup({contextGroupId:t},n)}async addClientToContextGroup({contextGroupId:t},e){this.wire.sendAction("interop-broker-add-client-to-context-group").catch((t=>{}));const n=this.getClientState(e);if(!n)throw new Error(`Client with Identity: ${e.uuid} ${e.name} not in Client State Map`);if(!this.getContextGroups().find((e=>e.id===t)))throw new Error(`Attempting to join a context group that does not exist: ${t}. You may only join existing context groups.`);if(n.contextGroupId!==t){n.contextGroupId=t,await this.setCurrentContextGroupInClientOptions(e,t);const i=this.contextGroupsById.get(t);for(const[,t]of n.contextHandlers){const{contextType:n,handlerId:o}=t;if(void 0===n)i.forEach(((t,n)=>{this.invokeContextHandler(e,o,t)}));else if(i.has(n)){const t=i.get(n);t&&this.invokeContextHandler(e,o,t)}}}}async removeFromContextGroup({target:t},e){if(this.wire.sendAction("interop-broker-remove-from-context-group").catch((t=>{})),t){r.hasEndpointId(t)&&await this.removeClientFromContextGroup(t);try{const e=this.channel.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name));if(!e.length)throw new Error(`No connection found for given Identity ${t.uuid} ${t.name}`);e.length>1&&console.warn(`More than one connection found for identity ${t.uuid} ${t.name}`);const n=[];for(const t of e)n.push(this.removeClientFromContextGroup(t));await Promise.all(n)}catch(t){throw new Error(t)}}else await this.removeClientFromContextGroup(e)}async removeClientFromContextGroup(t){this.wire.sendAction("interop-broker-remove-client-from-context-group").catch((t=>{}));const e=this.getClientState(t);e&&(e.contextGroupId=void 0),await this.setCurrentContextGroupInClientOptions(t,null)}getContextGroups(){return this.wire.sendAction("interop-broker-get-context-groups").catch((t=>{})),o(this,e,"f").map((t=>({...t})))}getInfoForContextGroup({contextGroupId:t}){return this.wire.sendAction("interop-broker-get-info-for-context-group").catch((t=>{})),this.getContextGroups().find((e=>e.id===t))}getAllClientsInContextGroup({contextGroupId:t}){return this.wire.sendAction("interop-broker-get-all-clients-in-context-group").catch((t=>{})),Array.from(this.interopClients.values()).filter((e=>e.contextGroupId===t)).map((t=>t.clientIdentity))}async handleFiredIntent(t,e){const n=(0,h.generateOverrideWarning)("fdc3.raiseIntent","InteropBroker.handleFiredIntent",e,"interopClient.fireIntent");throw console.warn(n),new Error(h.BROKER_ERRORS.fireIntent)}async setIntentTarget(t,e){this.wire.sendAction("interop-broker-set-intent-target").catch((t=>{}));const n=this.intentClientMap.get(e.name),i=`intent-handler-${t.name}`;if(n){const e=n.get(i);if(e){if(e.pendingIntents.push(t),e.clientIdentity&&e.isReady){const{clientIdentity:t,pendingIntents:o}=e;try{const n=o[o.length-1];await this.invokeIntentHandler(t,i,n),e.pendingIntents=[]}catch(n){console.error(`Error invoking intent handler for client ${t.uuid}/${t.name}/${t.endpointId}`),e.isReady=!1}}}else n.set(i,{isReady:!1,pendingIntents:[t]})}else{this.intentClientMap.set(e.name,new Map);const n=this.intentClientMap.get(e.name);n&&n.set(i,{isReady:!1,pendingIntents:[t]})}}async handleInfoForIntent(t,e){const n=(0,h.generateOverrideWarning)("fdc3.findIntent","InteropBroker.handleInfoForIntent",e,"interopClient.getInfoForIntent");throw console.warn(n),new Error(h.BROKER_ERRORS.getInfoForIntent)}async handleInfoForIntentsByContext(t,e){const n=(0,h.generateOverrideWarning)("fdc3.findIntentsByContext","InteropBroker.handleInfoForIntentsByContext",e,"interopClient.getInfoForIntentsByContext");throw console.warn(n),new Error(h.BROKER_ERRORS.getInfoForIntentsByContext)}async handleFiredIntentForContext(t,e){const n=(0,h.generateOverrideWarning)("fdc3.raiseIntentForContext","InteropBroker.handleFiredIntentForContext",e,"interopClient.fireIntentForContext");throw console.warn(n),new Error(h.BROKER_ERRORS.fireIntentForContext)}async clientDisconnected(t){}async fdc3HandleOpen({app:t,context:e},n){const i=(0,h.generateOverrideWarning)("fdc3.open","InteropBroker.fdc3HandleOpen",n);throw console.warn(i),new Error(h.BROKER_ERRORS.fdc3Open)}async fdc3HandleFindInstances(t,e){const n=(0,h.generateOverrideWarning)("fdc3.open","InteropBroker.fdc3HandleFindInstances",e);throw console.warn(n),new Error(h.BROKER_ERRORS.fdc3FindInstances)}async fdc3HandleGetAppMetadata(t,e){const n=(0,h.generateOverrideWarning)("fdc3.getAppMetadata","InteropBroker.fdc3HandleGetAppMetadata",e);throw console.warn(n),new Error(h.BROKER_ERRORS.fdc3GetAppMetadata)}async invokeContextHandler(t,e,n){const i=await this.getProvider();try{await i.dispatch(t,e,n)}catch(i){console.error(`Error invoking context handler ${e} for context type ${n.type} in client ${t.uuid}/${t.name}/${t.endpointId}`,i)}}async invokeIntentHandler(t,e,n){const i=await this.getProvider();await i.dispatch(t,e,n)}async fdc3HandleGetInfo(e,n){const{fdc3Version:i}=e;return{fdc3Version:i,...o(this,t,"f"),optionalFeatures:{OriginatingAppMetadata:!1,UserChannelMembershipAPIs:!0},appMetadata:{appId:"",instanceId:""}}}async getAllClientInfo(){return(await this.getProvider()).getAllClientInfo()}decorateSnapshot(t){return{...t,interopSnapshotDetails:{contextGroupStates:this.getContextGroupStates()}}}applySnapshot(t,e){const n=t?.interopSnapshotDetails?.contextGroupStates;n&&(e?.closeExistingWindows||this.updateExistingClients(n),this.rehydrateContextGroupStates(n))}updateExistingClients(t){this.interopClients.forEach((e=>{const{clientIdentity:n,contextGroupId:i,contextHandlers:o}=e;if(i){const e=t[i];for(const[,t]of Object.entries(e))o.forEach((e=>{const{handlerId:i,contextType:o}=e;r.isContextTypeCompatible(t.type,o)&&this.invokeContextHandler(n,i,t)}))}}))}getContextGroupStates(){return r.toObject(this.contextGroupsById)}rehydrateContextGroupStates(t){const e=Object.entries(t);for(const[t,n]of e){const e=Object.entries(n);for(const[n,i]of e)this.contextGroupsById.has(t)?this.contextGroupsById.get(t).set(n,i):console.warn(`Attempting to set a context group that isn't in the context group mapping. Skipping context group rehydration for: ${t}`)}}contextHandlerRegistered({contextType:t,handlerId:e},n){const i={contextType:t,handlerId:e},o=this.getClientState(n);if(o?.contextHandlers.set(e,i),o&&o.contextGroupId){const{contextGroupId:i}=o,r=this.contextGroupsById.get(i);if(void 0===t)r.forEach(((t,i)=>{this.invokeContextHandler(n,e,t)}));else if(r.has(t)){const i=r.get(t);i&&this.invokeContextHandler(n,e,i)}}}async intentHandlerRegistered(t,e){const{handlerId:n}=t,i=this.intentClientMap.get(e.name),o=i?.get(n);if(i)if(o){const{pendingIntents:i}=o;o.clientIdentity=e,o.isReady=!0;try{if(i.length>0){const t=i[i.length-1];await this.invokeIntentHandler(e,n,t),o.pendingIntents=[]}}catch(t){console.error(`Error invoking intent handler: ${n} for client ${e.uuid}/${e.name}/${e.endpointId}`)}}else i.set(n,{isReady:!0,pendingIntents:[],clientIdentity:e});else{this.intentClientMap.set(e.name,new Map);const t=this.intentClientMap.get(e.name);t&&t.set(n,{isReady:!0,pendingIntents:[],clientIdentity:e})}}removeContextHandler({handlerId:t},e){const n=this.getClientState(e);n&&n.contextHandlers.delete(t)}handleJoinSessionContextGroup({sessionContextGroupId:t},e){try{if(!t)throw new Error("Failed to join session context group: must specify group id.");const n=this.sessionContextGroupMap.get(t);if(n)n.registerNewClient(e);else{const n=new c.default(this.channel,t);n.registerNewClient(e),this.sessionContextGroupMap.set(t,n)}return{hasConflict:this.contextGroupsById.has(t)}}catch(t){throw new Error(t)}}getClientState(t){return this.interopClients.get(t.endpointId)}static toObject(t){const e=Object.fromEntries(t),n={};return Object.entries(e).forEach((([t,e])=>{const i=Object.fromEntries(e);n[t]=i})),n}static checkContextIntegrity(t){if(!t)return{isValid:!1,reason:"No context supplied"};if("object"!=typeof t)return{isValid:!1,reason:"Context must be an Object"};if(!t.type)return{isValid:!1,reason:"Context must have a type property"};if(t.id&&"object"!=typeof t.id)return{isValid:!1,reason:"Context id must be an Object populated with key-value identifiers (if set)"};if(t.id){const{id:e}=t,n=Object.keys(e);let i=!1;if(!n.length)return{isValid:!1,reason:"Context id must have at least one key-value identifier"};if(n.forEach((t=>{"string"==typeof t&&"string"==typeof e[t]||(i=!0)})),i)return{isValid:!1,reason:"Context id key-value identifiers must be of type string"}}return t.name&&"string"!=typeof t.name?{isValid:!1,reason:"Context name must be of string type (if set)"}:{isValid:!0}}static hasEndpointId(t){return void 0!==t.endpointId}static isContextTypeCompatible(t,e){return void 0===e||t===e}setContextGroupMap(){for(const t of this.getContextGroups())this.contextGroupsById.set(t.id,new Map)}async setCurrentContextGroupInClientOptions(t,e){try{const n=await this.fin.System.getEntityInfo(t.uuid,t.name);let i;"view"===n.entityType?i=await this.fin.View.wrap(t):"window"===n.entityType&&(i=await this.fin.Window.wrap(t)),i&&await i.updateOptions({interop:{currentContextGroup:e}})}catch(t){}}async setupChannelProvider(){try{const t=await this.getProvider();this.channel=t,this.wireChannel(t)}catch(t){throw new Error(`Error setting up Interop Broker Channel Provider: ${t}`)}}wireChannel(t){t.onConnection((async(t,e)=>{if(!await this.isConnectionAuthorized(t,e))throw new Error(`Connection not authorized for ${t.uuid}, ${t.name}`);if(!t.endpointId)throw new Error("Version too old to be compatible with Interop. Please upgrade your runtime to a more recent version.");const n={contextGroupId:void 0,contextHandlers:new Map,clientIdentity:t};e?.currentContextGroup&&this.contextGroupsById.has(e.currentContextGroup)&&(n.contextGroupId=e?.currentContextGroup),this.interopClients.set(t.endpointId,n)})),t.onDisconnection((t=>{this.interopClients.delete(t.endpointId);const e=this.intentClientMap.get(t.name);e&&t.uuid===this.fin.me.uuid&&e.forEach((t=>{t.isReady=!1})),this.sessionContextGroupMap.forEach((e=>{e.onDisconnection(t)})),this.clientDisconnected(t)})),t.beforeAction((async(t,e,n)=>{if(!await this.isActionAuthorized(t,e,n))throw new Error(`Action (${t}) not authorized for ${n.uuid}, ${n.name}`);this.logging?.beforeAction?.enabled&&console.log(t,e,n)})),t.afterAction(((t,e,n)=>{this.logging?.afterAction?.enabled&&console.log(t,e,n)})),t.register("setContext",this.setContext.bind(this)),t.register("fireIntent",this.handleFiredIntent.bind(this)),t.register("getCurrentContext",this.getCurrentContext.bind(this)),t.register("getInfoForIntent",this.handleInfoForIntent.bind(this)),t.register("getInfoForIntentsByContext",this.handleInfoForIntentsByContext.bind(this)),t.register("fireIntentForContext",this.handleFiredIntentForContext.bind(this)),t.register("getContextGroups",this.getContextGroups.bind(this)),t.register("joinContextGroup",this.joinContextGroup.bind(this)),t.register("removeFromContextGroup",this.removeFromContextGroup.bind(this)),t.register("getAllClientsInContextGroup",this.getAllClientsInContextGroup.bind(this)),t.register("getInfoForContextGroup",this.getInfoForContextGroup.bind(this)),t.register("contextHandlerRegistered",this.contextHandlerRegistered.bind(this)),t.register("intentHandlerRegistered",this.intentHandlerRegistered.bind(this)),t.register("removeContextHandler",this.removeContextHandler.bind(this)),t.register("sessionContextGroup:createIfNeeded",this.handleJoinSessionContextGroup.bind(this)),t.register("fdc3Open",this.fdc3HandleOpen.bind(this)),t.register("fdc3v2FindIntentsByContext",this.handleInfoForIntentsByContext.bind(this)),t.register("fdc3FindInstances",this.fdc3HandleFindInstances.bind(this)),t.register("fdc3GetAppMetadata",this.fdc3HandleGetAppMetadata.bind(this)),t.register("fdc3v2GetInfo",(async(t,e)=>this.fdc3HandleGetInfo.bind(this)(t,e))),t.register("createPrivateChannelProvider",(async t=>{const{channelId:e}=t,n=await this.fin.InterApplicationBus.Channel.create(e);p.PrivateChannelProvider.init(n,e)}))}isConnectionAuthorized(t,e){return this.wire.sendAction("interop-broker-is-connection-authorized").catch((t=>{})),Promise.resolve(!0)}isActionAuthorized(t,e,n){return this.wire.sendAction("interop-broker-is-action-authorized").catch((t=>{})),Promise.resolve(!0)}};return $i.InteropBroker=w,t=new WeakMap,e=new WeakMap,n=new WeakMap,$i}var Ki,Zi={},Ji={},Xi=d&&d.__classPrivateFieldSet||function(t,e,n,i,o){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?o.call(t,n):o?o.value=n:e.set(t,n),n},Qi=d&&d.__classPrivateFieldGet||function(t,e,n,i){if("a"===n&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(t):i?i.value:e.get(t)};Object.defineProperty(Ji,"__esModule",{value:!0});const to=u,eo=Hi;class no extends to.Base{constructor(t,e,n){super(t),Ki.set(this,void 0),this.id=n,Xi(this,Ki,e,"f")}async setContext(t){return this.wire.sendAction("interop-session-context-group-set-context").catch((t=>{})),(await Qi(this,Ki,"f")).dispatch(`sessionContextGroup:setContext-${this.id}`,{sessionContextGroupId:this.id,context:t})}async getCurrentContext(t){return this.wire.sendAction("interop-session-context-group-get-context").catch((t=>{})),(await Qi(this,Ki,"f")).dispatch(`sessionContextGroup:getContext-${this.id}`,{sessionContextGroupId:this.id,type:t})}async addContextHandler(t,e){if(this.wire.sendAction("interop-session-context-group-add-handler").catch((t=>{})),"function"!=typeof t)throw new Error("Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");const n=await Qi(this,Ki,"f");let i;return i=e?`sessionContextHandler:invoke-${this.id}-${e}-${(0,eo.generateId)()}`:`sessionContextHandler:invoke-${this.id}`,n.register(i,(0,eo.wrapContextHandler)(t,i)),await n.dispatch(`sessionContextGroup:handlerAdded-${this.id}`,{handlerId:i,contextType:e}),{unsubscribe:await this.createUnsubscribeCb(i)}}async createUnsubscribeCb(t){const e=await Qi(this,Ki,"f");return async()=>{e.remove(t),await e.dispatch(`sessionContextGroup:handlerRemoved-${this.id}`,{handlerId:t})}}getUserInstance(){return{id:this.id,setContext:(0,eo.wrapInTryCatch)(this.setContext.bind(this),"Failed to set context: "),getCurrentContext:(0,eo.wrapInTryCatch)(this.getCurrentContext.bind(this),"Failed to get context: "),addContextHandler:(0,eo.wrapInTryCatch)(this.addContextHandler.bind(this),"Failed to add context handler: ")}}}Ji.default=no,Ki=new WeakMap;var io={},oo={},ro={},so={},ao=d&&d.__createBinding||(Object.create?function(t,e,n,i){void 0===i&&(i=n);var o=Object.getOwnPropertyDescriptor(e,n);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,o)}:function(t,e,n,i){void 0===i&&(i=n),t[i]=e[n]}),co=d&&d.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),ho=d&&d.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&ao(e,t,n);return co(e,t),e};Object.defineProperty(so,"__esModule",{value:!0}),so.PrivateChannelClient=void 0;const lo=ho(Hi);var uo,po;function fo(){if(uo)return oo;uo=1;var t,e=d&&d.__classPrivateFieldGet||function(t,e,n,i){if("a"===n&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(t):i?i.value:e.get(t)},n=d&&d.__classPrivateFieldSet||function(t,e,n,i,o){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?o.call(t,n):o?o.value=n:e.set(t,n),n},i=d&&d.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(oo,"__esModule",{value:!0}),oo.FDC3ModuleBase=void 0;const o=ro,r=Hi,a=go(),c=i(s);return oo.FDC3ModuleBase=class{get client(){return e(this,t,"f").call(this)}get fin(){return this.wire.getFin()}constructor(e,i){this.wire=i,t.set(this,void 0),n(this,t,e,"f")}async broadcast(t){return this.wire.sendAction("fdc3-broadcast").catch((t=>{})),this.client.setContext(t)}async _open(t,e){this.wire.sendAction("fdc3-open").catch((t=>{}));try{return await a.InteropClient.ferryFdc3Call(this.client,"fdc3Open",{app:t,context:e})}catch(t){const e=t.message===r.BROKER_ERRORS.fdc3Open?"ResolverUnavailable":t.message;throw new Error(e)}}async _getChannels(){return(await this.client.getContextGroups()).map((t=>({...t,type:"system",...(0,o.getUnsupportedChannelApis)()})))}async getOrCreateChannel(t){this.wire.sendAction("fdc3-get-or-create-channel").catch((t=>{}));const e=(await this._getChannels()).find((e=>e.id===t));if(e)return{...e,type:"system",...(0,o.getUnsupportedChannelApis)()};try{const e=await this.client.joinSessionContextGroup(t);return(0,o.buildAppChannelObject)(e)}catch(t){throw console.error(t.message),new Error(o.ChannelError.CreationFailed)}}async getSystemChannels(){return this.wire.sendAction("fdc3-get-system-channels").catch((t=>{})),this._getChannels()}async joinChannel(t){this.wire.sendAction("fdc3-join-channel").catch((t=>{}));try{return await this.client.joinContextGroup(t)}catch(t){if(t.message===r.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup?console.error("The Channel you have tried to join is an App Channel. Custom Channels can only be defined by the Interop Broker through code or manifest configuration. Please use getOrCreateChannel."):console.error(t.message),t.message.startsWith("Attempting to join a context group that does not exist"))throw new Error(o.ChannelError.NoChannelFound);throw new Error(o.ChannelError.AccessDenied)}}async getCurrentChannel(){this.wire.sendAction("fdc3-get-current-channel").catch((t=>{}));const t=await this.getCurrentContextGroupInfo();return t?this.buildChannelObject(t):null}async leaveCurrentChannel(){return this.wire.sendAction("fdc3-leave-current-channel").catch((t=>{})),this.client.removeFromContextGroup()}async getCurrentContextGroupInfo(){const t=await this.client.getContextGroups(),e=t.map((async t=>this.client.getAllClientsInContextGroup(t.id))),n=(await Promise.all(e)).findIndex((t=>t.some((t=>{const{uuid:e,name:n}=t;return this.wire.me.uuid===e&&this.wire.me.name===n}))));return t[n]}async buildChannelObject(t){return{...t,type:"system",addContextListener:(...[t,e])=>{let n,i;"function"==typeof t?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),n=t):(n=e,"string"==typeof t&&(i=t));const o=(async()=>{let t=!0;const e=await this.client.getCurrentContext(i);return this.client.addContextHandler(((i,o)=>{if(!t||(t=!1,!(0,c.default)(e,i)))return n(i,o)}),i)})();return{...o,unsubscribe:()=>o.then((t=>t.unsubscribe()))}},broadcast:this.broadcast.bind(this),getCurrentContext:async t=>{const e=await this.client.getCurrentContext(t);return void 0===e?null:e}}}},t=new WeakMap,oo}so.PrivateChannelClient=class{constructor(t,e){this.id=e,this.client=t,this.listeners=new Map}async broadcast(t){return this.client.dispatch("broadcast",{context:t})}async getCurrentContext(t){return this.client.dispatch("getCurrentContext",{contextType:t})}async addContextListener(t,e){if("function"!=typeof e)throw new Error("Non-function argument passed to the second parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");let n;n=t?`contextHandler:invoke-${this.id}-${t}-${lo.generateId()}`:`contextHandler:invoke-${this.id}-${lo.generateId()}`,this.client.register(n,lo.wrapContextHandler(e,n));const i={unsubscribe:await this.createContextUnsubscribeCb(n)};return this.listeners.set(n,i),await this.client.dispatch("contextHandlerAdded",{handlerId:n,contextType:t}),i}createNonStandardUnsubscribeCb(t){return async()=>{this.client.remove(t),this.listeners.delete(t),await this.client.dispatch("nonStandardHandlerRemoved",{handlerId:t})}}createContextUnsubscribeCb(t){return async()=>{this.client.remove(t),this.listeners.delete(t),await this.client.dispatch("contextHandlerRemoved",{handlerId:t})}}onAddContextListener(t){const e=`onContextHandlerAdded:invoke-${this.id}-${lo.generateId()}`;this.client.register(e,t);const n={unsubscribe:this.createNonStandardUnsubscribeCb(e)};return this.listeners.set(e,n),this.client.dispatch("onAddContextHandlerAdded",{handlerId:e}),n}onDisconnect(t){const e=`onDisconnect:invoke-${this.id}-${lo.generateId()}`;this.client.register(e,t);const n={unsubscribe:this.createNonStandardUnsubscribeCb(e)};return this.listeners.set(e,n),this.client.dispatch("onDisconnectHandlerAdded",{handlerId:e}),n}onUnsubscribe(t){const e=`onUnsubscribe:invoke-${this.id}-${lo.generateId()}`;this.client.register(e,t);const n={unsubscribe:this.createNonStandardUnsubscribeCb(e)};return this.listeners.set(e,n),this.client.dispatch("onUnsubscribeHandlerAdded",{handlerId:e}),n}async cleanUpAllSubs(){Array.from(this.listeners.keys()).forEach((t=>{this.client.remove(t),this.listeners.delete(t)}))}async disconnect(){try{await this.client.dispatch("clientDisconnecting"),await this.cleanUpAllSubs(),await this.client.disconnect()}catch(t){throw new Error(t.message)}}},function(t){var e=d&&d.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(t,"__esModule",{value:!0}),t.getIntentResolution=t.isChannel=t.isContext=t.connectPrivateChannel=t.buildAppChannelObject=t.buildPrivateChannelObject=t.ChannelError=t.ResultError=t.UnsupportedChannelApiError=t.getUnsupportedChannelApis=void 0;const n=Hi,i=so,o=e(s);t.getUnsupportedChannelApis=t=>({addContextListener:()=>{throw new r("Channel.addContextListener",t)},broadcast:()=>{throw new r("Channel.broadcast",t)},getCurrentContext:()=>{throw new r("Channel.getCurrentContext",t)}});class r extends Error{constructor(t,e="System"){super(t),this.message=`Calling ${t} on an instance of a ${e} Channel returned by fdc3.get${e}Channels is not supported. If you would like to use a ${e} Channel, please use fdc3.joinChannel, fdc3.addContextListener, and fdc3.broadcast instead.`}}var a,c;t.UnsupportedChannelApiError=r,function(t){t.NoResultReturned="NoResultReturned",t.IntentHandlerRejected="IntentHandlerRejected"}(a=t.ResultError||(t.ResultError={})),(c=t.ChannelError||(t.ChannelError={})).NoChannelFound="NoChannelFound",c.AccessDenied="AccessDenied",c.CreationFailed="CreationFailed",t.buildPrivateChannelObject=t=>{let e=!1;const n=()=>{if(e)throw new Error("Private Channel Client has been disconnected from the Private Channel")};return{id:t.id,type:"private",broadcast:async e=>(n(),t.broadcast(e)),getCurrentContext:async e=>(n(),t.getCurrentContext(e)),addContextListener:async(e,i)=>{n();let o=i,r=e;return"function"==typeof e&&(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),o=e,r=null),t.addContextListener(r,o)},onAddContextListener:e=>(n(),t.onAddContextListener(e)),disconnect:async()=>(n(),e=!0,t.disconnect()),onDisconnect:e=>(n(),t.onDisconnect(e)),onUnsubscribe:e=>(n(),t.onUnsubscribe(e))}},t.buildAppChannelObject=t=>({id:t.id,type:"app",broadcast:t.setContext,getCurrentContext:async e=>{const n=await t.getCurrentContext(e);return void 0===n?null:n},addContextListener:(e,n)=>{let i,r;"function"==typeof e?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),i=e):(i=n,"string"==typeof e&&(r=e));const s=(async()=>{let e=!0;const n=await t.getCurrentContext(r);return t.addContextHandler(((t,r)=>{if(!e||(e=!1,!(0,o.default)(n,t)))return i(t,r)}),r)})();return{...s,unsubscribe:()=>s.then((t=>t.unsubscribe()))}}}),t.connectPrivateChannel=async e=>{try{const n=await fin.InterApplicationBus.Channel.connect(e),o=new i.PrivateChannelClient(n,e);return(0,t.buildPrivateChannelObject)(o)}catch(t){throw new Error(`Private Channel with id: ${e} doesn't exist`)}},t.isContext=t=>{if(t&&"object"==typeof t&&"type"in t){const{type:e}=t;return"string"==typeof e}return!1},t.isChannel=t=>{if(t&&"object"==typeof t&&"type"in t&&"id"in t){const{type:e,id:n}=t;return"string"==typeof e&&"string"==typeof n&&("app"===e||"private"===e)}return!1},t.getIntentResolution=async(e,i,o,r)=>{const s=(0,n.generateId)(),c=new Promise(((t,e)=>{fin.InterApplicationBus.subscribe({uuid:"*"},s,(e=>{t(e)})).catch((()=>e(new Error("getResult is not supported in this environment"))))})),d=o?{target:o,intentResolutionResultId:s}:{intentResolutionResultId:s},h=r?{name:r,context:i,metadata:d}:{...i,metadata:d},l=async()=>{let n=await c;if(!n||"object"!=typeof n)throw new Error(a.NoResultReturned);const{error:i}=n;if(i)throw new Error(a.IntentHandlerRejected);if((0,t.isChannel)(n)){const{id:i,type:o}=n;switch(o){case"private":n=await(0,t.connectPrivateChannel)(i);break;case"app":{const o=await e.joinSessionContextGroup(i);n=(0,t.buildAppChannelObject)(o);break}}}else if(!(0,t.isContext)(n))throw new Error(a.NoResultReturned);return n},u=r?await e.fireIntent(h):await e.fireIntentForContext(h);return"object"!=typeof u?{source:{appId:"",instanceId:""},intent:"",version:"2.0",getResult:l}:{...u,getResult:l}}}(ro);var mo,wo,yo={};function go(){if(wo)return Zi;wo=1;var t,e,n=d&&d.__classPrivateFieldSet||function(t,e,n,i,o){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?o.call(t,n):o?o.value=n:e.set(t,n),n},i=d&&d.__classPrivateFieldGet||function(t,e,n,i){if("a"===n&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(t):i?i.value:e.get(t)},o=d&&d.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Zi,"__esModule",{value:!0}),Zi.InteropClient=void 0;const r=u,s=o(Ji),a=function(){if(po)return io;po=1,Object.defineProperty(io,"__esModule",{value:!0}),io.Fdc3Module=void 0;const t=Hi,e=fo();class n extends e.FDC3ModuleBase{async open(t,e){await super._open(t,e)}addContextListener(t,e){let n;return this.wire.sendAction("fdc3-add-context-listener").catch((t=>{})),"function"==typeof t?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),n=this.client.addContextHandler(t)):n=this.client.addContextHandler(e,null===t?void 0:t),{...n,unsubscribe:()=>n.then((t=>t.unsubscribe()))}}addIntentListener(t,e){this.wire.sendAction("fdc3-add-intent-listener").catch((t=>{}));const n=this.client.registerIntentHandler((t=>{const{context:n,metadata:i}=t,{metadata:o}=n,r=i?.intentResolutionResultId||o?.intentResolutionResultId;r&&this.fin.InterApplicationBus.publish(r,null).catch((()=>null)),e(t.context)}),t,{fdc3Version:"1.2"});return{...n,unsubscribe:()=>n.then((t=>t.unsubscribe()))}}async raiseIntent(e,n,i){this.wire.sendAction("fdc3-raise-intent").catch((t=>{}));const o=i?{name:e,context:n,metadata:{target:i}}:{name:e,context:n};try{return await this.client.fireIntent(o)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?"ResolverUnavailable":e.message;throw new Error(n)}}async findIntent(e,n){this.wire.sendAction("fdc3-find-intent").catch((t=>{}));try{return await this.client.getInfoForIntent({name:e,context:n})}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntent?"ResolverUnavailable":e.message;throw new Error(n)}}async findIntentsByContext(e){this.wire.sendAction("fdc3-find-intents-by-context").catch((t=>{}));try{return await this.client.getInfoForIntentsByContext(e)}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntentsByContext?"ResolverUnavailable":e.message;throw new Error(n)}}async raiseIntentForContext(e,n){this.wire.sendAction("fdc3-raise-intent-for-context").catch((t=>{}));try{return await this.client.fireIntentForContext({...e,metadata:{target:n}})}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntentForContext?"ResolverUnavailable":e.message;throw new Error(n)}}async getOrCreateChannel(t){return super.getOrCreateChannel(t)}getInfo(){return this.wire.sendAction("fdc3-get-info").catch((t=>{})),{providerVersion:this.wire.environment.getAdapterVersionSync(),provider:`openfin-${this.wire.me.uuid}`,fdc3Version:"1.2"}}}return io.Fdc3Module=n,io}(),c=function(){if(mo)return yo;mo=1,Object.defineProperty(yo,"__esModule",{value:!0}),yo.Fdc3Module2=void 0;const t=fo(),e=Hi,n=go(),i=ro,o=so;class r extends t.FDC3ModuleBase{async open(t,e){return"string"==typeof t&&console.warn("Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string })."),super._open(t,e)}async findInstances(t){this.wire.sendAction("fdc3-find-instances").catch((t=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,"fdc3FindInstances",t)}catch(t){const n=t.message===e.BROKER_ERRORS.fdc3FindInstances?"ResolverUnavailable":t.message;throw new Error(n)}}async getAppMetadata(t){this.wire.sendAction("fdc3-get-app-metadata").catch((t=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,"fdc3GetAppMetadata",t)}catch(t){const n=t.message===e.BROKER_ERRORS.fdc3GetAppMetadata?"ResolverUnavailable":t.message;throw new Error(n)}}async addContextListener(t,e){this.wire.sendAction("fdc3-add-context-listener").catch((t=>{}));const n=t=>e=>{const{contextMetadata:n,...i}=e,o=n?[{...i},n]:[e,null];t(...o)};let i=e,o=n(i);return"function"==typeof t?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),i=t,o=n(i),this.client.addContextHandler(o)):this.client.addContextHandler(o,null===t?void 0:t)}async findIntent(t,n,i){this.wire.sendAction("fdc3-find-intent").catch((t=>{}));try{return await this.client.getInfoForIntent({name:t,context:n,metadata:{resultType:i}})}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntent?"ResolverUnavailable":t.message;throw new Error(n)}}async findIntentsByContext(t,i){this.wire.sendAction("fdc3-find-intents-by-context").catch((t=>{}));const o=i?{context:t,metadata:{resultType:i}}:t;try{return await n.InteropClient.ferryFdc3Call(this.client,"fdc3v2FindIntentsByContext",o)}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntentsByContext?"ResolverUnavailable":t.message;throw new Error(n)}}async raiseIntent(t,n,o){this.wire.sendAction("fdc3-raise-intent").catch((t=>{}));try{return"string"==typeof o&&console.warn("Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string })."),(0,i.getIntentResolution)(this.client,n,o,t)}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntent?"ResolverUnavailable":t.message;throw new Error(n)}}async raiseIntentForContext(t,n){this.wire.sendAction("fdc3-raise-intent-for-context").catch((t=>{}));try{return"string"==typeof n&&console.warn("Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string })."),(0,i.getIntentResolution)(this.client,t,n)}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntent?"ResolverUnavailable":t.message;throw new Error(n)}}async addIntentListener(t,e){if(this.wire.sendAction("fdc3-add-intent-listener").catch((t=>{})),"string"!=typeof t)throw new Error("First argument must be an Intent name");return this.client.registerIntentHandler((async t=>{let n,i;const{context:o,metadata:r}=t,{contextMetadata:s,metadata:a,...c}=o,d=r?.intentResolutionResultId||a?.intentResolutionResultId;try{const t=a?{metadata:a,...c}:{...c};n=await e(t,s),i=n}catch(t){n=t,i={error:!0}}if(d&&this.fin.InterApplicationBus.publish(d,i).catch((()=>null)),n instanceof Error)throw new Error(n.message);return n}),t,{fdc3Version:"2.0"})}async getOrCreateChannel(t){return super.getOrCreateChannel(t)}async createPrivateChannel(){const t=(0,e.generateId)();await n.InteropClient.ferryFdc3Call(this.client,"createPrivateChannelProvider",{channelId:t});const r=await this.fin.InterApplicationBus.Channel.connect(t),s=new o.PrivateChannelClient(r,t);return(0,i.buildPrivateChannelObject)(s)}async getUserChannels(){return(await this.client.getContextGroups()).map((t=>({...t,type:"user",...(0,i.getUnsupportedChannelApis)("User")})))}async getSystemChannels(){return console.warn("This API has been deprecated. Please use fdc3.getUserChannels instead."),super.getSystemChannels()}async joinUserChannel(t){return super.joinChannel(t)}async joinChannel(t){return console.warn("This API has been deprecated. Please use fdc3.joinUserChannel instead."),super.joinChannel(t)}async getCurrentChannel(){const t=await super.getCurrentChannel();return t?{...t,type:"user",broadcast:this.broadcast.bind(this)}:null}async getInfo(){return n.InteropClient.ferryFdc3Call(this.client,"fdc3v2GetInfo",{fdc3Version:"2.0"})}}return yo.Fdc3Module2=r,yo}(),h=Hi;let l=class extends r.Base{constructor(i,o){super(i),t.set(this,void 0),e.set(this,void 0),n(this,e,new Map,"f"),n(this,t,o,"f")}async setContext(e){return this.wire.sendAction("interop-client-set-context").catch((t=>{})),(await i(this,t,"f")).dispatch("setContext",{context:e})}async addContextHandler(e,n){if(this.wire.sendAction("interop-client-add-context-handler").catch((t=>{})),"function"!=typeof e)throw new Error("Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");const o=await i(this,t,"f");let r;r=n?`invokeContextHandler-${n}-${(0,h.generateId)()}`:"invokeContextHandler";const s=(0,h.wrapContextHandler)(e,r);return o.register(r,s),await o.dispatch("contextHandlerRegistered",{handlerId:r,contextType:n}),{unsubscribe:async()=>{o.remove(r),await o.dispatch("removeContextHandler",{handlerId:r})}}}async getContextGroups(){return this.wire.sendAction("interop-client-get-context-groups").catch((t=>{})),(await i(this,t,"f")).dispatch("getContextGroups")}async joinContextGroup(e,n){this.wire.sendAction("interop-client-join-context-group").catch((t=>{}));const o=await i(this,t,"f");if(!e)throw new Error("No contextGroupId specified for joinContextGroup.");return o.dispatch("joinContextGroup",{contextGroupId:e,target:n})}async removeFromContextGroup(e){return this.wire.sendAction("interop-client-remove-from-context-group").catch((t=>{})),(await i(this,t,"f")).dispatch("removeFromContextGroup",{target:e})}async getAllClientsInContextGroup(e){this.wire.sendAction("interop-client-get-all-clients-in-context-group").catch((t=>{}));const n=await i(this,t,"f");if(!e)throw new Error("No contextGroupId specified for getAllClientsInContextGroup.");return n.dispatch("getAllClientsInContextGroup",{contextGroupId:e})}async getInfoForContextGroup(e){this.wire.sendAction("interop-client-get-info-for-context-group").catch((t=>{}));const n=await i(this,t,"f");if(!e)throw new Error("No contextGroupId specified for getInfoForContextGroup.");return n.dispatch("getInfoForContextGroup",{contextGroupId:e})}async fireIntent(e){return this.wire.sendAction("interop-client-fire-intent").catch((t=>{})),(await i(this,t,"f")).dispatch("fireIntent",e)}async registerIntentHandler(e,n,o){this.wire.sendAction("interop-client-register-intent-handler").catch((t=>{}));const r=await i(this,t,"f"),s=`intent-handler-${n}`,a=(0,h.wrapIntentHandler)(e,s);try{await r.register(s,a),await r.dispatch("intentHandlerRegistered",{handlerId:s,...o})}catch(t){throw new Error("Unable to register intent handler")}return{unsubscribe:async()=>{r.remove(s)}}}async getCurrentContext(e){return this.wire.sendAction("interop-client-get-current-context").catch((t=>{})),(await i(this,t,"f")).dispatch("getCurrentContext",{contextType:e})}async getInfoForIntent(e){return this.wire.sendAction("interop-client-get-info-for-intent").catch((t=>{})),(await i(this,t,"f")).dispatch("getInfoForIntent",e)}async getInfoForIntentsByContext(e){return this.wire.sendAction("interop-client-get-info-for-intents-by-context").catch((t=>{})),(await i(this,t,"f")).dispatch("getInfoForIntentsByContext",e)}async fireIntentForContext(e){return this.wire.sendAction("interop-client-fire-intent-for-context").catch((t=>{})),(await i(this,t,"f")).dispatch("fireIntentForContext",e)}async joinSessionContextGroup(n){try{const o=i(this,e,"f").get(n);if(o)return o.getUserInstance();const r=await i(this,t,"f"),{hasConflict:a}=await r.dispatch("sessionContextGroup:createIfNeeded",{sessionContextGroupId:n});a&&console.warn(`A (non-session) context group with the name "${n}" already exists. If you are trying to join a Context Group, call joinContextGroup instead.`);const c=new s.default(this.wire,i(this,t,"f"),n);return i(this,e,"f").set(n,c),c.getUserInstance()}catch(t){throw console.error(`Error thrown trying to create Session Context Group with id "${n}": ${t}`),t}}async onDisconnection(e){return this.wire.sendAction("interop-client-add-ondisconnection-listener").catch((t=>{})),(await i(this,t,"f")).onDisconnection((t=>{const{uuid:n}=t;e({type:"interop-broker",topic:"disconnected",brokerName:n})}))}getFDC3Sync(t){switch(t){case"1.2":return new a.Fdc3Module((()=>this),this.wire);case"2.0":return new c.Fdc3Module2((()=>this),this.wire);default:throw new Error(`Invalid FDC3 version provided: ${t}. Must be '1.2' or '2.0'`)}}async getFDC3(t){return this.getFDC3Sync(t)}static async ferryFdc3Call(e,n,o){return(await i(e,t,"f")).dispatch(n,o||null)}};return Zi.InteropClient=l,t=new WeakMap,e=new WeakMap,Zi}var vo,Co,bo,_o={};function Io(){if(vo)return _o;vo=1,Object.defineProperty(_o,"__esModule",{value:!0}),_o.overrideCheck=_o.checkFDC32Overrides=_o.getDefaultViewFdc3VersionFromAppInfo=void 0;const t=Yi();function e(e){return["fdc3HandleFindInstances","handleInfoForIntent","handleInfoForIntentsByContext","fdc3HandleGetAppMetadata","fdc3HandleGetInfo","fdc3HandleOpen","handleFiredIntent","handleFiredIntentForContext"].filter((n=>e[n]===t.InteropBroker.prototype[n]))}return _o.getDefaultViewFdc3VersionFromAppInfo=function({manifest:t,initialOptions:e}){const n=t?.platform?.defaultViewOptions?.fdc3InteropApi??e.defaultViewOptions?.fdc3InteropApi;return["1.2","2.0"].includes(n??"")?n:void 0},_o.checkFDC32Overrides=e,_o.overrideCheck=function(t,n){if(n&&"2.0"===n){const n=e(t);n.length>0&&console.warn(`WARNING: FDC3 2.0 has been set as a default option for Views in this Platform, but the required InteropBroker APIs for FDC3 2.0 compliance have not all been overridden.\nThe following APIs need to be overridden:\n${n.join("\n")}`)}},_o}function Eo(){return bo||(bo=1,function(t){var e=d&&d.__createBinding||(Object.create?function(t,e,n,i){void 0===i&&(i=n);var o=Object.getOwnPropertyDescriptor(e,n);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,o)}:function(t,e,n,i){void 0===i&&(i=n),t[i]=e[n]}),n=d&&d.__exportStar||function(t,n){for(var i in t)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||e(n,t,i)};Object.defineProperty(t,"__esModule",{value:!0}),n(function(){if(Co)return Di;Co=1;var t=d&&d.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Di,"__esModule",{value:!0}),Di.InteropModule=void 0;const e=t(r),n=Ui,i=u,o=Yi(),s=go(),a=Io(),c=Dn,h=t=>new t,l="You have attempted to use or modify InteropBroker parameters, which is not allowed. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.";class p extends i.Base{async init(t,i=h){this.wire.sendAction("interop-init").catch((()=>{}));const r=await this.wire.environment.getInteropInfo(this.wire.getFin()),s=(0,n.createUnusableObject)(l),d=(0,n.createWarningObject)(l,(0,e.default)(r)),u=async()=>{throw new Error(l)},p=o.InteropBroker.createClosedConstructor(this.wire,(()=>this.fin.InterApplicationBus.Channel.create(`interop-broker-${t}`)),r);let f;return f=Array.isArray(i)?new((0,c.overrideFromComposables)(...i)(p))(s,u,d):await i(p,s,u,d),(0,a.overrideCheck)(f,r.fdc3Version),f}connectSync(t,e){return this.wire.sendAction("interop-connect-sync").catch((()=>{})),new s.InteropClient(this.wire,this.wire.environment.whenReady().then((()=>this.fin.InterApplicationBus.Channel.connect(`interop-broker-${t}`,{payload:e}))))}}return Di.InteropModule=p,Di}(),t),n(go(),t),n(Yi(),t)}(Fi)),Fi}var xo={},So={},Ao={},Po={};Object.defineProperty(Po,"__esModule",{value:!0}),Po.getSnapshotSourceChannelName=void 0,Po.getSnapshotSourceChannelName=t=>`snapshot-source-provider-${t.uuid}`;var Mo,Lo,Oo,Ro,To,ko=d&&d.__classPrivateFieldSet||function(t,e,n,i,o){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?o.call(t,n):o?o.value=n:e.set(t,n),n},jo=d&&d.__classPrivateFieldGet||function(t,e,n,i){if("a"===n&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(t):i?i.value:e.get(t)};Object.defineProperty(Ao,"__esModule",{value:!0}),Ao.SnapshotSource=void 0;const Bo=u,zo=Po,Fo=new Map;class Do extends Bo.Base{constructor(t,e){super(t),Mo.set(this,void 0),Lo.set(this,(()=>(Fo.has(this.identity.uuid)||Fo.set(this.identity.uuid,{eventFired:null,clientPromise:null}),Fo.get(this.identity.uuid)))),Oo.set(this,(()=>(jo(this,Lo,"f").call(this).clientPromise||(jo(this,Lo,"f").call(this).clientPromise=jo(this,Ro,"f").call(this)),jo(this,Lo,"f").call(this).clientPromise))),Ro.set(this,(async()=>{const t=(0,zo.getSnapshotSourceChannelName)(this.identity);try{jo(this,Lo,"f").call(this).eventFired||await jo(this,To,"f").call(this);const e=await this.fin.InterApplicationBus.Channel.connect(t,{wait:!1});return e.onDisconnection((()=>{jo(this,Lo,"f").call(this).clientPromise=null,jo(this,Lo,"f").call(this).eventFired=null})),e}catch(t){throw jo(this,Lo,"f").call(this).clientPromise=null,new Error("The targeted SnapshotSource is not currently initialized. Await this object's ready() method.")}})),To.set(this,(async()=>{const t=(0,zo.getSnapshotSourceChannelName)(this.identity);let e,n;const i=new Promise(((t,i)=>{e=t,n=i}));jo(this,Lo,"f").call(this).eventFired=i;const o=async i=>{try{i.channelName===t&&(e(),await this.fin.InterApplicationBus.Channel.removeListener("connected",o))}catch(t){n(t)}};await this.fin.InterApplicationBus.Channel.on("connected",o)})),ko(this,Mo,e,"f")}get identity(){return jo(this,Mo,"f")}async ready(){this.wire.sendAction("snapshot-source-ready").catch((t=>{}));try{await jo(this,Oo,"f").call(this)}catch(t){await jo(this,Lo,"f").call(this).eventFired}}async getSnapshot(){this.wire.sendAction("snapshot-source-get-snapshot").catch((t=>{}));const t=await jo(this,Oo,"f").call(this),e=await t.dispatch("get-snapshot");return(await e).snapshot}async applySnapshot(t){return this.wire.sendAction("snapshot-source-apply-snapshot").catch((t=>{})),(await jo(this,Oo,"f").call(this)).dispatch("apply-snapshot",{snapshot:t})}}Ao.SnapshotSource=Do,Mo=new WeakMap,Lo=new WeakMap,Oo=new WeakMap,Ro=new WeakMap,To=new WeakMap,Object.defineProperty(So,"__esModule",{value:!0}),So.SnapshotSourceModule=void 0;const Uo=u,Wo=Ao,$o=Po;class Vo extends Uo.Base{async init(t){if(this.wire.sendAction("snapshot-source-init").catch((t=>{})),"object"!=typeof t||"function"!=typeof t.getSnapshot||"function"!=typeof t.applySnapshot)throw new Error("you must pass in a valid SnapshotProvider");const e=await this.fin.InterApplicationBus.Channel.create((0,$o.getSnapshotSourceChannelName)(this.fin.me));e.register("get-snapshot",(async()=>({snapshot:await t.getSnapshot()}))),e.register("apply-snapshot",(({snapshot:e})=>t.applySnapshot(e)))}wrapSync(t){return this.wire.sendAction("snapshot-source-wrap-sync").catch((t=>{})),new Wo.SnapshotSource(this.wire,t)}async wrap(t){return this.wire.sendAction("snapshot-source-wrap").catch((t=>{})),this.wrapSync(t)}}So.SnapshotSourceModule=Vo,function(t){var e=d&&d.__createBinding||(Object.create?function(t,e,n,i){void 0===i&&(i=n);var o=Object.getOwnPropertyDescriptor(e,n);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,o)}:function(t,e,n,i){void 0===i&&(i=n),t[i]=e[n]}),n=d&&d.__exportStar||function(t,n){for(var i in t)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||e(n,t,i)};Object.defineProperty(t,"__esModule",{value:!0}),n(So,t),n(Ao,t)}(xo),Object.defineProperty(h,"__esModule",{value:!0});var Ho=h.Fin=void 0;const No=o,Go=l,qo=st(),Yo=tt(),Ko=ut,Zo=on,Jo=an,Xo=mn,Qo=En,tr=X(),er=Pn,nr=zi,ir=Eo(),or=xo;class rr extends No.EventEmitter{constructor(t){super(),this.wire=t,this.System=new Go.System(t),this.Window=new qo._WindowModule(t),this.Application=new Yo.ApplicationModule(t),this.InterApplicationBus=new Ko.InterApplicationBus(t),this.Clipboard=new Zo.Clipboard(t),this.ExternalApplication=new Jo.ExternalApplicationModule(t),this.Frame=new Xo._FrameModule(t),this.GlobalHotkey=new Qo.GlobalHotkey(t),this.Platform=new er.PlatformModule(t,this.InterApplicationBus.Channel),this.View=new tr.ViewModule(t),this.Interop=new ir.InteropModule(t),this.SnapshotSource=new or.SnapshotSourceModule(t),t.registerFin(this),this.me=(0,nr.getMe)(t),t.on("disconnected",(()=>{this.emit("disconnected")}))}}Ho=h.Fin=rr;var sr={},ar={};function cr(t){return"string"==typeof t.manifestUrl}function dr(t){return lr(t)&&"string"==typeof t.address}function hr(t){return dr(t)&&"string"==typeof t.token}function lr(t){return"string"==typeof t.uuid}function ur(t){return t.runtime&&"string"==typeof t.runtime.version}function pr(t){return lr(t)&&ur(t)}Object.defineProperty(ar,"__esModule",{value:!0}),ar.isInternalConnectConfig=ar.isPortDiscoveryConfig=ar.isNewConnectConfig=ar.isConfigWithReceiver=ar.isRemoteConfig=ar.isExistingConnectConfig=ar.isExternalConfig=void 0,ar.isExternalConfig=cr,ar.isExistingConnectConfig=dr,ar.isRemoteConfig=hr,ar.isConfigWithReceiver=function(t){return"object"==typeof t.receiver&&hr({...t,address:""})},ar.isNewConnectConfig=pr,ar.isPortDiscoveryConfig=function(t){return cr(t)&&ur(t)||pr(t)},ar.isInternalConnectConfig=function(t){return dr(t)||pr(t)};var fr={},mr={};Object.defineProperty(mr,"__esModule",{value:!0}),mr.EmitterMap=void 0;const wr=o;function yr(t){return Buffer.from(t).toString("base64")}mr.EmitterMap=class{constructor(){this.storage=new Map}hashKeys(t){return t.map(yr).join("/")}getOrCreate(t){const e=this.hashKeys(t);return this.storage.has(e)||this.storage.set(e,new wr.EventEmitter),this.storage.get(e)}has(t){return this.storage.has(this.hashKeys(t))}delete(t){const e=this.hashKeys(t);return this.storage.delete(e)}},Object.defineProperty(fr,"__esModule",{value:!0});const gr=mr;class vr extends gr.EmitterMap{constructor(){super(...arguments),this.dispatchEvent=t=>{if(function(t){return"process-desktop-event"===t.action}(t)){const{payload:e}=t,n=function(t){const{topic:e}=t;if("frame"===e||"window"===e||"view"===e){const{uuid:n,name:i}=t;return[e,n,i]}if("application"===e){const{uuid:n}=t;return[e,n]}return[e]}(e);if(this.has(n))return this.getOrCreate(n).emit(e.type,e),!0}return!1}}}fr.default=vr;var Cr,br,_r=d&&d.__classPrivateFieldSet||function(t,e,n,i,o){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?o.call(t,n):o?o.value=n:e.set(t,n),n},Ir=d&&d.__classPrivateFieldGet||function(t,e,n,i){if("a"===n&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(t):i?i.value:e.get(t)},Er=d&&d.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(sr,"__esModule",{value:!0});var xr=sr.Transport=void 0;const Sr=o,Ar=ar,Pr=C,Mr=Er(fr),Lr=zi,Or=zt;class Rr extends Sr.EventEmitter{constructor(t,e,n){super(),this.wireListeners=new Map,this.topicRefMap=new Map,this.eventAggregator=new Mr.default,this.messageHandlers=[this.eventAggregator.dispatchEvent],Cr.set(this,void 0),br.set(this,void 0),this.connectSync=()=>{Ir(this,Cr,"f").connectSync()},this.getPort=()=>Ir(this,Cr,"f").getPort(),_r(this,Cr,new t(this.onmessage.bind(this)),"f"),this.environment=e,this.sendRaw=Ir(this,Cr,"f").send.bind(Ir(this,Cr,"f")),this.registerMessageHandler(this.handleMessage.bind(this)),Ir(this,Cr,"f").on("disconnected",(()=>{for(const[,{handleNack:t}]of this.wireListeners)t({reason:"Remote connection has closed"});this.wireListeners.clear(),this.emit("disconnected")}));const{uuid:i,name:o}=n,r=this.environment.getCurrentEntityType();this.me=(0,Lr.getBaseMe)(r,i,o)}getFin(){if(!Ir(this,br,"f"))throw new Error("No Fin object registered for this transport");return Ir(this,br,"f")}registerFin(t){if(Ir(this,br,"f"))throw new Error("Fin object has already been registered for this transport");_r(this,br,t,"f")}shutdown(){return Ir(this,Cr,"f").shutdown()}async connect(t){if((0,Ar.isConfigWithReceiver)(t))return await Ir(this,Cr,"f").connect(t.receiver),this.authorize(t);if((0,Ar.isRemoteConfig)(t))return this.connectRemote(t);if((0,Ar.isExistingConnectConfig)(t))return this.connectByPort(t);if((0,Ar.isNewConnectConfig)(t)){const e=await this.environment.retrievePort(t);return this.connectByPort({...t,address:`ws://localhost:${e}`})}}async connectRemote(t){return await Ir(this,Cr,"f").connect(new(this.environment.getWsConstructor())(t.address)),this.authorize(t)}async connectByPort(t){const{address:e,uuid:n}=t,i={...t,type:"file-token"},o=Ir(this,Cr,"f");await o.connect(new(this.environment.getWsConstructor())(t.address));const r=await this.sendAction("request-external-authorization",{uuid:n,type:"file-token"},!0);if("external-authorization-response"!==r.action)throw new Pr.UnexpectedActionError(r.action);return await this.environment.writeToken(r.payload.file,r.payload.token),this.authorize(i)}async authorize(t){const e=await this.sendAction("request-authorization",t,!0);if("authorization-response"!==e.action)throw new Pr.UnexpectedActionError(e.action);if(!0!==e.payload.success)throw new Pr.RuntimeError(e.payload)}sendAction(t,e={},n=!1){let i=()=>{};const o=Pr.RuntimeError.getCallSite(1),r=this.environment.getNextMessageId(),s=new Promise(((s,a)=>{i=a;const c={action:t,payload:e,messageId:r},d=Ir(this,Cr,"f");return this.addWireListener(r,s,(t=>this.nackHandler(t,a,o)),n),d.send(c).catch(a)}));return Object.assign(s,{cancel:i,messageId:r})}nackHandler(t,e,n){e("string"==typeof t?t:new Pr.RuntimeError(t,n))}ferryAction(t){return new Promise(((e,n)=>{const i=this.environment.getNextMessageId();t.messageId=i;const o=t=>{e(t.payload)};return Ir(this,Cr,"f").send(t).then((()=>this.addWireListener(i,o,(t=>this.nackHandler(t,n)),!1))).catch(n)}))}registerMessageHandler(t){this.messageHandlers.push(t)}addWireListener(t,e,n,i){i?this.uncorrelatedListener=e:this.wireListeners.has(t)?n({reason:"Duplicate handler id",error:(0,Or.errorToPOJO)(new Pr.DuplicateCorrelationError(String(t)))}):this.wireListeners.set(t,{resolve:e,handleNack:n})}onmessage(t){for(const e of this.messageHandlers)e.call(null,t)}handleMessage(t){const e=t.correlationId||NaN;if("correlationId"in t){if(!this.wireListeners.has(e))return!1;{const{resolve:n,handleNack:i}=this.wireListeners.get(e);"ack"!==t.action?i({reason:"Did not receive ack action",error:(0,Or.errorToPOJO)(new Pr.NoAckError(t.action))}):"payload"in t?t.payload.success?n.call(null,t):i(t.payload):"string"==typeof t.reason?i(t):(console.warn("Received invalid response from core",t),i({reason:"invalid response shape"})),this.wireListeners.delete(e)}}else this.uncorrelatedListener&&this.uncorrelatedListener.call(null,t),this.uncorrelatedListener=()=>{};return!0}}xr=sr.Transport=Rr,Cr=new WeakMap,br=new WeakMap;const Tr=(...t)=>({log:(...e)=>console.debug(`[${(new Date).toISOString()}]`,...(t=>t.map((t=>`[${t}]`)))(t),...e),getLogger:(...e)=>Tr(...t,...e)}),kr=Tr("@openfin/core-web/client");function jr(t,e){if(!function(t){return"string"==typeof t}(t))throw new Error(`Property ${e} has invalid type. Expected string, got ${typeof t}.`)}const Br=kr.getLogger("get-web-interop-ports");function zr(t,e,n,i){if("a"===n&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(t):i?i.value:e.get(t)}function Fr(t,e,n,i,o){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?o.call(t,n):o?o.value=n:e.set(t,n),n}"function"==typeof SuppressedError&&SuppressedError;const Dr=t=>{var e,n,i;return i=class extends o.EventEmitter{constructor(i){super(),e.set(this,void 0),n.set(this,!1),this.connectSync=()=>{zr(this,n,"f")||(t.addEventListener("message",(t=>{t.data?.topic?.startsWith("wire-message")&&t.data.message&&zr(this,e,"f").call(this,{...JSON.parse(t.data.message),ports:t.ports})})),t.start())},this.connect=async()=>{this.connectSync()},this.send=e=>(t.postMessage({topic:"wire-message",message:JSON.stringify(e)}),Promise.resolve()),this.shutdown=async()=>{t.close()},Fr(this,e,i,"f")}getPort(){return t}},e=new WeakMap,n=new WeakMap,i};var Ur={},Wr={};Object.defineProperty(Wr,"__esModule",{value:!0}),Wr.BaseEnvironment=void 0;const $r=Io();Wr.BaseEnvironment=class{async getViewWindowIdentity(t,e){const{identity:n}=await t.View.wrapSync(e).getCurrentWindow();return n}async getInteropInfo(t){const e=await t.Application.getCurrentSync().getInfo().catch((()=>null)),n=e?.initialOptions?.interopBrokerConfiguration??{};return{fdc3Version:e?(0,$r.getDefaultViewFdc3VersionFromAppInfo)(e):void 0,...n,fdc3Info:{providerVersion:await t.System.getVersion(),provider:"OpenFin"}}}},Object.defineProperty(Ur,"__esModule",{value:!0});var Vr=Ur.BrowserEnvironment=void 0;const Hr=Wr;class Nr extends Hr.BaseEnvironment{constructor(){super(...arguments),this.type="other",this.getRandomId=()=>{const t=new Uint32Array(1);return window.crypto.getRandomValues(t)[0].toString(32)}}getAdapterVersionSync(){return""}observeBounds(t,e){throw new Error("Method not implemented.")}layoutAllowedInContext(t){return!1}initLayoutManager(t,e,n){throw new Error("Method not implemented.")}applyLayoutSnapshot(t,e,n){throw new Error("Method not implemented.")}createLayout(t,e){throw new Error("Method not implemented.")}destroyLayout(t,e){throw new Error("Method not implemented.")}resolveLayout(t,e){throw new Error("Method not implemented.")}initPlatform(...t){throw new Error("Method not implemented.")}writeToken(t,e){return Promise.resolve("")}retrievePort(t){throw new Error("Method not implemented.")}getNextMessageId(){return this.getRandomId()}createChildContent(t){throw new Error("Method not implemented.")}getWebWindow(t){throw new Error("Method not implemented.")}getCurrentEntityIdentity(){throw new Error("Method not implemented.")}getCurrentEntityType(){return"external connection"}raiseEvent(t,e){throw new Error("Method not implemented.")}getUrl(){return location.href}getDefaultChannelOptions(){return{create:{},connect:{}}}getRtcPeer(){return new RTCPeerConnection}getWsConstructor(){return WebSocket}whenReady(){return Promise.resolve()}}Vr=Ur.BrowserEnvironment=Nr;const Gr=t=>"platform"in t&&void 0!==t.platform;var qr,Yr;class Kr extends Vr{constructor(t){super(),this.connectConfig=t,qr.set(this,void 0),Yr.set(this,new V((async()=>Promise.resolve().then((function(){return n(4463)}))))),Gr(t)&&this.validatePlatformOptions(t)}getAdapterVersionSync(){return"0.39.21"}validatePlatformOptions({platform:t}){if(!("layoutSnapshot"in t))throw new Error("Platform options are missing layoutSnapshot. Please provide a layoutSnapshot in the platform options.");if("windows"in t||"windows"in t.layoutSnapshot)throw new Error("It appears you tried to call connect() with a snapshot object from an OpenFin desktop environment. Note that connect() expects to be called with a platform property with this structure: { platform: { layoutSnapshot } }. To get a layoutSnapshot of the expected structure, use fin.Platform.Layout.getCurrentLayoutManagerSync().getLayoutSnapshot() in v34+ in your desktop environment.");const{layouts:e}=t.layoutSnapshot;Object.entries(e).map((([t,e])=>{if("object"!=typeof e||null===e)throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${t} must be an object.`);if(!("content"in e))throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${t} must contain a 'content' property.`)}))}async getInteropInfo(t){return{contextGroups:void 0,logging:{beforeAction:{enabled:!1},afterAction:{enabled:!1}},fdc3Version:void 0,fdc3Info:{providerVersion:"0.39.21",provider:"OpenFin Web"}}}layoutAllowedInContext(t){return!0}async initLayoutManager(t,e,n){if(zr(this,qr,"f"))throw new Error("Layout already initialized.");if(!Gr(this.connectConfig))throw new Error("Platform options are missing from connection config.");const{WebLayoutEntryPoint:i}=await zr(this,Yr,"f").getValue();return Fr(this,qr,new i(this.connectConfig),"f"),await zr(this,qr,"f").initLayoutManager(t,e,n)}async applyLayoutSnapshot(t,e,n){zr(this,qr,"f")?.applyLayoutSnapshot(t,e,n)}async createLayout(t,e){return zr(this,qr,"f")?.createLayout(t,e)}async destroyLayout(t,e){return zr(this,qr,"f")?.destroyLayout(t,e)}async getViewWindowIdentity(t,e){return Promise.resolve({uuid:e.uuid,name:e.uuid})}}qr=new WeakMap,Yr=new WeakMap;const Zr=()=>{const t=a.v4();return{uuid:t,name:t}};e.__classPrivateFieldGet=zr,e.__classPrivateFieldSet=Fr,e.apiExposer=$n,e.commonjsGlobal=d,e.connect=async t=>{try{kr.log("Establishing connection",t);const{brokerUrl:e,identity:n,timeout:o,interopConfig:r}=await(async t=>{if("enabled"===t.connectionInheritance){const e=await(async t=>{const e=(()=>{const t=(t=>{const e=new RegExp("^of-frame<(?.*)>$").exec(t)?.groups?.meta;if(e)try{return JSON.parse(atob(e))}catch(t){throw new Error(`Failed to decode JSON from ${e}.`)}})(window.name);if(t)try{const{name:e,uuid:n,brokerUrl:i,providerId:o,contextGroup:r}=t;return jr(i,"brokerUrl"),jr(n,"uuid"),jr(e,"name"),{identity:{name:e,uuid:n},brokerUrl:i,interopConfig:{providerId:o,currentContextGroup:r}}}catch(t){throw new Error(`Unexpected error occurred when inferring platform information: ${t.stack}`)}})();if(e){const{validateOptions:n=()=>!0}=t,{identity:i,...o}=e;if(!await n(o))throw new Error("Parent options were rejected by validateOptions.");return e}})(t);if(e)return e}if(!t.options){const e="enabled"===t.connectionInheritance?"Broker URL was not specified nor provided by a platform container.":"Connection inheritance is disabled but no options were provided.";throw new Error(e)}return{...t.options,identity:Zr()}})(t),{workerPort:s,iframeBrokerPort:a}=await(async(t,e,n)=>{const{origin:i}=new URL(t),o=document.createElement("IFRAME");let r;o.style.display="none";try{return await new Promise(((s,a)=>{const d=t=>{if(t.source===o.contentWindow&&"ack-web-broker-ports-ready"===t.data?.topic){if(t.origin!==i)a(new Error(`Broker redirected to unexpected origin ${t.origin}, expected ${i}.`));else if(t.data.success){const[e,n]=t.ports;s({iframeBrokerPort:e,workerPort:n})}else a(new b(t.data));window.removeEventListener("message",d),clearTimeout(r)}};window.addEventListener("message",d),Br.log(`Connecting to broker ${t}`),o.setAttribute("src",t),o.setAttribute("name",c(e,"of-broker")),document.body.appendChild(o),Br.log("Iframe loaded, awaiting init message from iframe"),n&&(r=setTimeout((()=>{window.removeEventListener("message",d),document.body.removeChild(o),a(new Error("Worker did not initialize in time"))}),n))}))}catch(t){throw new Error(`Failed to initialise Fin Web Client. ${t.message}`,{cause:t})}})(e,n,o);kr.log("Successfully established connection to shared worker");const d={entityType:"external connection",...n};s.start(),a.start();const h=((t,e,n)=>{const o=Dr(e),r=new Kr(t),s=new xr(o,r,n);return s.connectSync(),window.Buffer=i.Buffer,new Ho(s)})(t,s,d);return r?.providerId&&(h.me.interop=h.Interop.connectSync(r.providerId),r?.currentContextGroup&&h.me.interop.joinContextGroup(r.currentContextGroup).catch((t=>{console.warn(`Error joining specified context group: ${r?.currentContextGroup}, continuing`,t)}))),{...h,me:{...h.me,identity:{uuid:h.me.uuid,name:h.me.name}}}}catch(t){throw new Error(`An error occured during web-interop connection: ${t.message}`)}},e.decorators=Nn,e.encodeOptions=c,e.layout_constants=hi,e.lazy=$},4463:(t,e,n)=>{var i=n(1672),o=n(5412);n(1048),n(46),n(6108),n(6343);var r={},s={};Object.defineProperty(s,"__esModule",{value:!0}),s.mapValuesAsync=s.mapEntriesAsync=void 0;const a=(t,[e,n])=>({...t,[e]:n});async function c(t,e){return(await Promise.all(e.map((async([e,n])=>[e,await t(n,e)])))).reduce(a,{})}s.mapEntriesAsync=c,s.mapValuesAsync=async function(t,e){let n;return n=e instanceof Map?[...e.entries()]:Object.entries(e),c(t,n)};var d,h,l,u,p=i.commonjsGlobal&&i.commonjsGlobal.__classPrivateFieldSet||function(t,e,n,i,o){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?o.call(t,n):o?o.value=n:e.set(t,n),n},f=i.commonjsGlobal&&i.commonjsGlobal.__classPrivateFieldGet||function(t,e,n,i){if("a"===n&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(t):i?i.value:e.get(t)};Object.defineProperty(r,"__esModule",{value:!0});var m=r.DefaultLayoutManager=void 0;const w=s;class y{constructor(t){h.set(this,void 0),l.set(this,new Map),p(this,h,t,"f")}size(){return f(this,l,"f").size}async applyLayoutSnapshot({layouts:t}){if(Object.keys(t).length>1)throw new Error("[LayoutManager] Tried to call applyLayoutSnapshot with more than 1 layout. When implementing multiple layouts via overridden LayoutManager class, you must override and fully implement the applyLayoutSnapshot method without calling super.applyLayoutSnapshot().");const[[e,n]]=Object.entries(t);await y.createLayout(this,{layoutName:e,layout:n})}async showLayout({layoutName:t}){}async getLayoutSnapshot(){return{layouts:await(0,w.mapValuesAsync)((t=>t.getFrameSnapshot()),f(this,l,"f"))}}async removeLayout({layoutName:t}){}getLayoutIdentityForView(t){const e=[...f(this,l,"f").values()].find((e=>e.getCurrentViews().some((e=>e.name===t.name&&e.uuid===t.uuid))));return e?.identity??void 0}isLayoutVisible({layoutName:t}){return f(y,d,"m",u).call(y,this,t).isVisible()}resolveLayoutIdentity(t){if(t&&"layoutName"in t)return t;const e=[...f(this,l,"f").values()];if(1===e.length)return e[0].identity;const n=e.find((t=>t.isVisible()));return n?.identity??void 0}static async resolveLayout(t,e){const n=t.resolveLayoutIdentity(e);if(void 0===n||!("layoutName"in n))throw new Error("[layout-manager] resolveLayout: Could not resolve the layout identity. Make sure you include 'layoutName' in the identity object.");return f(y,d,"m",u).call(y,t,n.layoutName)}static async handleSharedView(t,e,n){await(0,w.mapValuesAsync)((async t=>{if(t.identity.layoutName!==e.layoutName){const e=t.getCurrentViews().find((t=>t.name===n.name));e&&await t.onViewDetached({viewIdentity:e,target:null}).catch(console.error)}}),f(t,l,"f"))}static async handleLastViewRemoved(t,e){await t.removeLayout(e),await f(t,h,"f").handleLastViewRemoved(t)}static async destroyLayout(t,{layoutName:e}){await f(y,d,"m",u).call(y,t,e).destroy(),f(t,l,"f").delete(e)}static async createLayout(t,e){const{layoutName:n}=e;if(f(t,l,"f").has(n))throw new Error(`Layout name ${n} already exists`);await f(t,h,"f").createLayout(e,t)}static registerLayout(t,e,n){f(t,l,"f").set(e,n)}static getAllLayouts(t){return[...f(t,l,"f").values()]}static setInitialSnapshot(t,e){f(t,h,"f").setInitialSnapshot(e)}static createClosedConstructor(...t){return class extends y{constructor(){super(...t)}}}}m=r.DefaultLayoutManager=y,d=y,h=new WeakMap,l=new WeakMap,u=function(t,e){const n=f(t,l,"f").get(e);if(!n)throw new Error(`[layout-manager] getLayoutByName: Could not locate layout with name '${e}'`);return n};var g={},v={},C={};Object.defineProperty(C,"__esModule",{value:!0}),C.ReversibleMap=void 0,C.ReversibleMap=class{constructor(){this.valueToKey=new Map,this.keyToValue=new Map,this.setUnique=(t,e)=>{if(this.hasKey(t)||this.hasValue(e))throw new Error("Key or value already in the map.");this.keyToValue.set(t,e),this.valueToKey.set(e,t)},this.getKey=t=>{const e=this.valueToKey.get(t);if(!e)throw new Error("Value not found in the map.");return e},this.deleteKey=t=>{const e=this.getValue(t);return this.keyToValue.delete(t),this.valueToKey.delete(e),e},this.deleteValue=t=>{const e=this.getKey(t);return this.keyToValue.delete(e),this.valueToKey.delete(t),e},this.hasKey=t=>this.keyToValue.has(t),this.hasValue=t=>this.valueToKey.has(t)}getValue(t){const e=this.keyToValue.get(t);if(!e)throw new Error("Key not found in the map.");return e}},Object.defineProperty(v,"__esModule",{value:!0});var b=v.LayoutContentCache=void 0;const _=i.lazy,I=C;class E{constructor(){this.contentItemCache=new I.ReversibleMap,this.contentItemCacheId=0,this.createCacheKey=()=>{const t=`entity-${this.contentItemCacheId.toString()}`;return this.contentItemCacheId+=1,t},this.hasKey=t=>this.contentItemCache.hasKey(t),this.getItemOrUndefined=t=>{try{return this.getContentItemOrThrow(t)}catch(t){return}},this.getContentItemOrThrow=(t,e)=>{if(!this.contentItemCache.hasKey(t))throw new Error("Layout component has been destroyed or detached from the current layout.");const n=this.contentItemCache.getValue(t);if(e&&!e.includes(n.type))throw new Error(`Layout item is not the expected type. Expected ${e.join(", ")}, got ${n.type}.`);return n},this.getOrCreateEntityId=t=>{if(this.contentItemCache.hasValue(t))return this.contentItemCache.getKey(t);t.onDestroyed((()=>{this.contentItemCache.deleteValue(t)}));const e=this.createCacheKey();return this.contentItemCache.setUnique(e,t),e}}static getSingleInstance(){return E.singleton.getValue()}}b=v.LayoutContentCache=E,E.singleton=new _.Lazy((()=>new E));var x={},S={};!function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.getAdjacentStacks=t.doShareEdge=t.getAdjacentItem=void 0,t.getAdjacentItem=(e,n)=>{const{parent:i}=e;if(e.isRoot()||!i)return;const o=["top","bottom"].includes(n)?"column":"row",r=["top","left"].includes(n)?-1:1;if(i.type===o){const t=i.contentItems.indexOf(e)+r;if(t>=0&&t{const i=t.getBounds(),o=e.getBounds();return!(!i||!o||(["top","bottom"].includes(n)?i.righto.right:i.bottomo.bottom))},t.getAdjacentStacks=(e,n)=>{const i=["top","bottom"].includes(n)?"row":"column",o=r=>"stack"===r.type?(0,t.doShareEdge)(e,r,n)?[r]:[]:"root"===r.type||"ground"===r.type?[]:r.type===i?r.contentItems.map((t=>o(t))).flat():r.type!==i?["top","right"].includes(n)?o(r.contentItems[r.contentItems.length-1]):o(r.contentItems[0]):[],r=(0,t.getAdjacentItem)(e,n);return r?o(r):[]}}(S);var A=i.commonjsGlobal&&i.commonjsGlobal.__decorate||function(t,e,n,i){var o,r=arguments.length,s=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(r<3?o(s):r>3?o(e,n,s):o(e,n))||s);return r>3&&s&&Object.defineProperty(e,n,s),s};Object.defineProperty(x,"__esModule",{value:!0}),x.LayoutEntitiesController=void 0;const P=i.decorators,M=S,L=r;class O{constructor(t,e,n){this.wire=t,this.layoutManager=e,this.layoutContentCache=n,this.analytics=t=>{this.wire.sendAction(`layout-controller-${t}`).catch((()=>{}))},this.getLayoutIdentityForViewOrThrow=async t=>{const e=this.layoutManager.getLayoutIdentityForView(t);if(!e)throw new Error(`View identity ${t.name} is not attached to any layouts.`);return e},this.getRoot=async t=>{this.analytics("get-root");const e=(await this.getLayout(t)).getRoot();return{type:e.type,entityId:this.layoutContentCache.getOrCreateEntityId(e)}},this.getStackByView=async t=>{this.analytics("get-stack-by-view");const e=await this.getLayoutIdentityForViewOrThrow(t),n=(await this.getLayout(e)).getStackByView(t);if("stack"===n?.type)return{entityId:this.layoutContentCache.getOrCreateEntityId(n),type:"stack"}},this.getStackViews=t=>(this.analytics("get-stack-views"),this.layoutContentCache.getContentItemOrThrow(t,["stack"]).contentItems.map((t=>({name:t.viewName,uuid:this.wire.me.uuid})))),this.isRoot=t=>(this.analytics("is-root"),this.layoutContentCache.getContentItemOrThrow(t).isRoot()),this.exists=t=>(this.analytics("exists"),this.layoutContentCache.hasKey(t)),this.addViewToStack=async(t,e,{index:n}={index:0})=>{this.analytics("add-view-to-stack");const i=this.layoutContentCache.getContentItemOrThrow(t);if(n&&n>i.contentItems.length+1)throw new Error(`Index '${n}' out of range, please exclude the index or specify a number between 0 and ${i.contentItems.length}`);const o={id:t,index:n},{identity:r}=await i.layout.platformCreateView(e,{location:o});return r},this.findViewInStack=(t,e)=>t.contentItems.find((t=>t.viewName===e.name)),this.removeViewFromStack=async(t,e)=>{this.analytics("remove-view-from-stack");const n=this.layoutContentCache.getContentItemOrThrow(t,["stack"]),i=this.findViewInStack(n,e);if(!i)throw new Error(`Tried to remove a view ('${e.name}') which does not belong to the stack.`);await i.layout.platformCloseView(e)},this.createAdjacentStack=async(t,e,{position:n="right"}={})=>{if(this.analytics("create-adjacent-stack"),!Array.isArray(e)||0===e.length)throw new Error('The parameter "views" must be an array with at least 1 element.');if(!["top","bottom","left","right"].includes(n))throw new Error(`Invalid position '${n}' specified.`);const i=this.layoutContentCache.getContentItemOrThrow(t).createAdjacentStack({position:n}),o=this.layoutContentCache.getOrCreateEntityId(i);return await Promise.all(e.reverse().map((t=>this.addViewToStack(o,t)))),o},this.getAdjacentStacks=async({targetId:t,edge:e})=>{this.analytics("get-adjacent-stacks");const n=this.layoutContentCache.getContentItemOrThrow(t);return(0,M.getAdjacentStacks)(n,e).map((t=>({entityId:this.layoutContentCache.getOrCreateEntityId(t)})))},this.setStackActiveView=async(t,e)=>{this.analytics("set-stack-active-view");const n=this.layoutContentCache.getContentItemOrThrow(t,["stack"]),i=this.findViewInStack(n,e);if(!i)throw new Error(`Tried to set a view ('${e.name}') as active when it does not belong to the stack.`);n.setActiveContentItem(i,!0)}}async getLayout(t){const e=await L.DefaultLayoutManager.resolveLayout(this.layoutManager,t);if(!e)throw new Error(`Could not resolve target layout identity ${JSON.stringify(t)}`);return e}getContent(t){return this.analytics("get-content"),this.layoutContentCache.getContentItemOrThrow(t,["column","row"]).contentItems.map((t=>({type:t.type,entityId:this.layoutContentCache.getOrCreateEntityId(t)})))}getParent(t){this.analytics("get-parent");const e=this.layoutContentCache.getContentItemOrThrow(t);if(!e.isRoot())return e.parent?.contentItems.includes(e)?{type:e.parent.type,entityId:this.layoutContentCache.getOrCreateEntityId(e.parent)}:void 0}}A([(0,P.expose)()],O.prototype,"getLayoutIdentityForViewOrThrow",void 0),A([(0,P.expose)()],O.prototype,"getRoot",void 0),A([(0,P.expose)()],O.prototype,"getStackByView",void 0),A([(0,P.expose)()],O.prototype,"getStackViews",void 0),A([(0,P.expose)()],O.prototype,"getContent",null),A([(0,P.expose)()],O.prototype,"getParent",null),A([(0,P.expose)()],O.prototype,"isRoot",void 0),A([(0,P.expose)()],O.prototype,"exists",void 0),A([(0,P.expose)()],O.prototype,"addViewToStack",void 0),A([(0,P.expose)()],O.prototype,"removeViewFromStack",void 0),A([(0,P.expose)()],O.prototype,"createAdjacentStack",void 0),A([(0,P.expose)()],O.prototype,"getAdjacentStacks",void 0),A([(0,P.expose)()],O.prototype,"setStackActiveView",void 0),x.LayoutEntitiesController=O,Object.defineProperty(g,"__esModule",{value:!0});var R=g.initLayoutEndpoints=void 0;const T=i.apiExposer,k=i.layout_constants,j=v,B=x,z=r;R=g.initLayoutEndpoints=async function(t,e){const n=t.getFin(),i=await n.Platform.getCurrentSync().getClient(),o=new T.ChannelsExposer(i);await new T.ApiExposer(o).exposeInstance(new B.LayoutEntitiesController(t,e,j.LayoutContentCache.getSingleInstance()),{id:k.LAYOUT_CONTROLLER_ID}),await async function(t,e){const n=t=>async n=>{const i=await z.DefaultLayoutManager.resolveLayout(e,n.target);if(!i)throw new Error(`Could not resolve the layout target from payload ${JSON.stringify(n)}`);return t(i,n)},i=(e,i)=>{t.register(e,n(i))},o=(t,e)=>{i(t,e)};i("replace-view",((t,e)=>t.replaceView(e))),i("replace-layout",((t,{layout:e})=>t.replaceLayout(e))),i("add-view",((t,e)=>t.insertView(e))),o("layout-add-view",((t,{viewOptions:e,location:n,targetView:i})=>t.platformCreateView(e,{location:n,targetView:i}))),i("close-view",((t,e)=>t.cleanupView(e.viewIdentity))),o("layout-close-view",((t,e)=>t.platformCloseView(e.viewIdentity))),i("apply-preset-layout",((t,e)=>t.applyPreset(e))),i("get-layout-views",(t=>t.getCurrentViews())),i("get-frame-snapshot",(t=>t.getFrameSnapshot())),i("is-visible",(t=>t.isVisible())),i("destroy",(t=>t.destroy())),t.register("get-layout-snapshot",(()=>e.getLayoutSnapshot()))}(i,e)};var F={};Object.defineProperty(F,"__esModule",{value:!0});var D=F.BaseLayout=void 0;D=F.BaseLayout=class{};var U={};Object.defineProperty(U,"__esModule",{value:!0});var W=U.DOMEmitter=void 0;W=U.DOMEmitter=class{constructor(t){this.container=t}dispatchLocalEvent(t,e){const n={...e,type:t,tabSelector:`tab-${e.name}`,containerSelector:`container-${e.name}`,topic:"openfin-DOM-event"};this.container.dispatchEvent(new CustomEvent(t,{detail:n}))}};var $={};Object.defineProperty($,"__esModule",{value:!0});var V=$.mapLayoutContentItemsImmutableSync=$.mapLayoutContentItemsImmutable=H=$.isVisible=void 0,H=$.isVisible=t=>(0!==t.offsetWidth||0!==t.offsetHeight)&&"hidden"!==window.getComputedStyle(t).visibility&&t.offsetTop>=0&&t.offsetLeft>=0&&t.offsetTop<=window.innerHeight&&t.offsetLeft<=window.innerWidth;const N=t=>"type"in t&&"component"===t.type;$.mapLayoutContentItemsImmutable=async function t(e,n){return N(n)?e(n):{...n,content:await Promise.all(n.content?.map((n=>t(e,n))))}},V=$.mapLayoutContentItemsImmutableSync=function t(e,n){return N(n)?e(n):{...n,content:n.content?.map((n=>t(e,n)))}};class G extends Error{constructor(t,e){super(e),this.type=t}}class q extends G{constructor(t,e){super("Configuration",t),this.node=e}}class Y extends G{constructor(t){super("PopoutBlocked",t)}}class K extends G{constructor(t){super("API",t)}}class Z extends G{constructor(t){super("Bind",t)}}class J extends Error{constructor(t,e,n){super(`${t}: ${e}${void 0===n?"":": "+n}`)}}class X extends J{constructor(t,e){super("Assert",t,e)}}class Q extends J{constructor(t,e,n){super("UnreachableCase",t,`${e}${void 0===n?"":": "+n}`)}}class tt extends J{constructor(t,e){super("UnexpectedNull",t,e)}}class et extends J{constructor(t,e){super("UnexpectedUndefined",t,e)}}var nt;!function(t){let e=!1;const n={PopoutCannotBeCreatedWithGroundItemConfig:{id:0,default:"Popout cannot be created with ground ItemConfig"},PleaseRegisterAConstructorFunction:{id:1,default:"Please register a constructor function"},ComponentTypeNotRegisteredAndBindComponentEventHandlerNotAssigned:{id:2,default:"Component type not registered and BindComponentEvent handler not assigned"},ComponentIsAlreadyRegistered:{id:3,default:"Component is already registered"},ComponentIsNotVirtuable:{id:4,default:"Component is not virtuable. Requires rootHtmlElement field/getter"},VirtualComponentDoesNotHaveRootHtmlElement:{id:5,default:'Virtual component does not have getter "rootHtmlElement"'},ItemConfigIsNotTypeComponent:{id:6,default:"ItemConfig is not of type component"},InvalidNumberPartInSizeString:{id:7,default:"Invalid number part in size string"},UnknownUnitInSizeString:{id:8,default:"Unknown unit in size string"},UnsupportedUnitInSizeString:{id:9,default:"Unsupported unit in size string"}};t.idCount=Object.keys(n).length;const i=Object.values(n);t.checkInitialise=function(){if(!e)for(let e=0;e="0"&&t<="9"}function kt(t,e){const n=Ot(e);t.style.width=n}function jt(t,e){const n=Ot(e);t.style.height=n}function Bt(t){return{width:t.offsetWidth,height:t.offsetHeight}}function zt(t,e){t.style.display=e?"":"none"}function Ft(t,e){if(void 0!==e)for(const n in e)if(e.hasOwnProperty(n)){const i=e[n],o=t[n];t[n]=Dt(o,i)}return t}function Dt(t,e){if("object"!=typeof e)return e;if(Array.isArray(e)){const t=e.length,n=new Array(t);for(let i=0;i36)throw new Error("Too many keys in config minifier map")},t.translateObject=i}(pt||(pt={})),function(t){t.defaults={type:ht.ground,content:[],size:1,sizeUnit:ut.Fractional,minSize:void 0,minSizeUnit:ut.Pixel,id:"",isClosable:!0},t.createCopy=function(t,e){switch(t.type){case ht.ground:case ht.row:case ht.column:return gt.createCopy(t,e);case ht.stack:return wt.createCopy(t,e);case ht.component:return yt.createCopy(t);default:throw new Q("CICC91354",t.type,"Invalid Config Item type specified")}},t.createDefault=function(t){switch(t){case ht.ground:throw new X("CICCDR91562");case ht.row:case ht.column:return gt.createDefault(t);case ht.stack:return wt.createDefault();case ht.component:return yt.createDefault();default:throw new Q("CICCDD91563",t,"Invalid Config Item type specified")}},t.isComponentItem=function(t){return t.type===ht.component},t.isStackItem=function(t){return t.type===ht.stack},t.isGroundItem=function(t){return t.type===ht.ground}}(ft||(ft={})),function(t){t.defaultMaximised=!1,function(t){t.createCopy=function(t,e){return void 0===t?void 0:{show:null!=e?e:t.show,popout:t.popout,close:t.close,maximise:t.maximise,minimise:t.minimise,tabDropdown:t.tabDropdown}}}(t.Header||(t.Header={}))}(mt||(mt={})),function(t){function e(t){const e=t.length,n=new Array(e);for(let i=0;i"__glMaximised"===t));t>0&&(o=!0,i=i.splice(t,1)),e=i.length>0?i[0]:ft.defaults.id}else e=i;return n=void 0!==t.maximised?t.maximised:o,{id:e,maximised:n}}}(Et||(Et={})),function(t){function e(t){if(void 0===t)return[];{const e=t.length,n=new Array(e);for(let i=0;i0?e.content[0]:void 0,{resolved:!0,root:Pt.resolve(n),openPopouts:t.resolveOpenPopouts(e.openPopouts),dimensions:t.Dimensions.resolve(e.dimensions),settings:t.Settings.resolve(e.settings),header:t.Header.resolve(e.header,e.settings,e.labels)}}},t.fromResolved=function(e){return{root:Pt.fromResolvedOrUndefined(e.root),openPopouts:Lt.fromResolvedArray(e.openPopouts),settings:bt.Settings.createCopy(e.settings),dimensions:t.Dimensions.fromResolved(e.dimensions),header:bt.Header.createCopy(e.header)}},t.isResolved=function(t){const e=t;return void 0!==e.resolved&&!0===e.resolved},t.resolveOpenPopouts=function(t){if(void 0===t)return[];{const e=t.length,n=new Array(e);for(let i=0;i0?e.content[0]:void 0,{root:Pt.resolve(o),openPopouts:Mt.resolveOpenPopouts(e.openPopouts),dimensions:Mt.Dimensions.resolve(e.dimensions),settings:Mt.Settings.resolve(e.settings),header:Mt.Header.resolve(e.header,e.settings,e.labels),parentId:null!==(n=e.parentId)&&void 0!==n?n:null,indexInParent:null!==(i=e.indexInParent)&&void 0!==i?i:null,window:t.Window.resolve(e.window,e.dimensions),resolved:!0}},t.fromResolved=function(e){return{root:Pt.fromResolvedOrUndefined(e.root),openPopouts:n(e.openPopouts),dimensions:Mt.Dimensions.fromResolved(e.dimensions),settings:bt.Settings.createCopy(e.settings),header:bt.Header.createCopy(e.header),parentId:e.parentId,indexInParent:e.indexInParent,window:t.Window.fromResolved(e.window)}},t.fromResolvedArray=n}(Lt||(Lt={}));class Ht{constructor(){this._allEventSubscriptions=[],this._subscriptionsMap=new Map,this.unbind=this.removeEventListener,this.trigger=this.emit}tryBubbleEvent(t,e){}emit(t,...e){let n=this._subscriptionsMap.get(t);if(void 0!==n){n=n.slice();for(let t=0;t0){const i=e.slice();i.unshift(t);const o=this._allEventSubscriptions.slice();for(let t=0;t0?i.contentItems[0]:i,e=0);const o=this._layoutManager.createAndInitContentItem(n,t);t.addChild(o,e),this._layoutManager.layoutConfig.settings.popInOnClose?this._onClose():this.close()}createWindow(){const t=this.createUrl(),e=Math.floor(1e6*Math.random()).toString(36),n=this.serializeWindowFeatures({width:this._initialWindowSize.width,height:this._initialWindowSize.height,innerWidth:this._initialWindowSize.width,innerHeight:this._initialWindowSize.height,menubar:"no",toolbar:"no",location:"no",personalbar:"no",resizable:"yes",scrollbars:"no",status:"no"});if(this._popoutWindow=globalThis.open(t,e,n),this._popoutWindow)this._popoutWindow.addEventListener("load",(()=>this.positionWindow()),{passive:!0}),this._popoutWindow.addEventListener("beforeunload",(()=>{this._layoutManager.layoutConfig.settings.popInOnClose?this.popIn():this._onClose()}),{passive:!0}),this._checkReadyInterval=setInterval((()=>this.checkReady()),10);else if(!0===this._layoutManager.layoutConfig.settings.blockedPopoutsThrowError)throw new Y("Popout blocked")}checkReady(){if(null===this._popoutWindow)throw new tt("BPCR01844");this._popoutWindow.__glInstance&&this._popoutWindow.__glInstance.isInitialised&&(this.onInitialised(),void 0!==this._checkReadyInterval&&(clearInterval(this._checkReadyInterval),this._checkReadyInterval=void 0))}serializeWindowFeatures(t){const e=[];for(const n in t)e.push(n+"="+t[n].toString());return e.join(",")}createUrl(){const t="gl-window-config-"+Ut(),e=bt.minifyConfig(this._config);try{localStorage.setItem(t,JSON.stringify(e))}catch(t){throw new Error("Error while writing to localStorage "+function(t){return t instanceof Error?t.message:"string"==typeof t?t:"Unknown Error"}(t))}const n=new URL(location.href);return n.searchParams.set("gl-window",t),n.toString()}positionWindow(){if(null===this._popoutWindow)throw new Error("BrowserPopout.positionWindow: null popoutWindow");this._popoutWindow.moveTo(this._initialWindowSize.left,this._initialWindowSize.top),this._popoutWindow.focus()}onInitialised(){this._isInitialised=!0,this.getGlInstance().on("popIn",(()=>this.popIn())),this.emit("initialised")}_onClose(){setTimeout((()=>this.emit("closed")),50)}}class qt extends Ht{constructor(t,e,n,i){super(),this.layoutManager=t,this._parent=n,this._element=i,this._popInParentIds=[],this._type=e.type,this._id=e.id,this._isInitialised=!1,this.isGround=!1,this.isRow=!1,this.isColumn=!1,this.isStack=!1,this.isComponent=!1,this.size=e.size,this.sizeUnit=e.sizeUnit,this.minSize=e.minSize,this.minSizeUnit=e.minSizeUnit,this._isClosable=e.isClosable,this._pendingEventPropagations={},this._throttledEvents=["stateChanged"],this._contentItems=this.createContentItems(e.content)}get type(){return this._type}get id(){return this._id}set id(t){this._id=t}get popInParentIds(){return this._popInParentIds}get parent(){return this._parent}get contentItems(){return this._contentItems}get isClosable(){return this._isClosable}get element(){return this._element}get isInitialised(){return this._isInitialised}static isStack(t){return t.isStack}static isComponentItem(t){return t.isComponent}static isComponentParentableItem(t){return t.isStack||t.isGround}removeChild(t,e=!1){const n=this._contentItems.indexOf(t);if(-1===n)throw new Error("Can't remove child item. Unknown content item");if(e||this._contentItems[n].destroy(),this._contentItems.splice(n,1),this._contentItems.length>0)this.updateSize(!1);else if(!this.isGround&&!0===this._isClosable){if(null===this._parent)throw new tt("CIUC00874");this._parent.removeChild(this)}}addChild(t,e,n){return null!=e||(e=this._contentItems.length),this._contentItems.splice(e,0,t),t.setParent(this),!0===this._isInitialised&&!1===t._isInitialised&&t.init(),e}replaceChild(t,e,n=!1){const i=this._contentItems.indexOf(t),o=t._element.parentNode;if(-1===i)throw new X("CIRCI23232","Can't replace child. oldChild is not child of this");if(null===o)throw new tt("CIRCP23232");if(o.replaceChild(e._element,t._element),!0===n&&(t._parent=null,t.destroy()),this._contentItems[i]=e,e.setParent(this),e.size=t.size,e.sizeUnit=t.sizeUnit,e.minSize=t.minSize,e.minSizeUnit=t.minSizeUnit,null===e._parent)throw new tt("CIRCNC45699");!0===e._parent._isInitialised&&!1===e._isInitialised&&e.init(),this.updateSize(!1)}remove(){if(null===this._parent)throw new tt("CIR11110");this._parent.removeChild(this)}popout(){const t=Ut(),e=this.layoutManager.createPopoutFromContentItem(this,void 0,t,void 0);return this.emitBaseBubblingEvent("stateChanged"),e}calculateConfigContent(){const t=this._contentItems,e=t.length,n=new Array(e);for(let i=0;ithis.propagateEventToLayoutManager(t,e))))}propagateEventToLayoutManager(t,e){this._pendingEventPropagations[t]=!1,this.layoutManager.emitUnknown(t,e)}}class Yt extends qt{constructor(t,e,n){super(t,e,n,document.createElement("div")),this._parentItem=n,this._focused=!1,this.isComponent=!0,this._reorderEnabled=e.reorderEnabled,this.applyUpdatableConfig(e),this._initialWantMaximise=e.maximised;const i=document.createElement("div");i.classList.add("lm_content"),this.element.appendChild(i),this._container=new Nt(e,this,t,i,(t=>this.handleUpdateItemConfigEvent(t)),(()=>this.show()),(()=>this.hide()),(t=>this.focus(t)),(t=>this.blur(t)))}get componentName(){return this._container.componentType}get componentType(){return this._container.componentType}get reorderEnabled(){return this._reorderEnabled}get initialWantMaximise(){return this._initialWantMaximise}get component(){return this._container.component}get container(){return this._container}get parentItem(){return this._parentItem}get headerConfig(){return this._headerConfig}get title(){return this._title}get tab(){return this._tab}get focused(){return this._focused}destroy(){this._container.destroy(),super.destroy()}applyUpdatableConfig(t){this.setTitle(t.title),this._headerConfig=t.header}toConfig(){const t=this._container.stateRequestEvent,e=void 0===t?this._container.state:t();return{type:ht.component,content:[],size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,maximised:!1,isClosable:this.isClosable,reorderEnabled:this._reorderEnabled,title:this._title,header:mt.Header.createCopy(this._headerConfig),componentType:yt.copyComponentType(this.componentType),componentState:e}}close(){if(null===this.parent)throw new tt("CIC68883");this.parent.removeChild(this,!1)}enterDragMode(t,e){kt(this.element,t),jt(this.element,e),this._container.enterDragMode(t,e)}exitDragMode(){this._container.exitDragMode()}enterStackMaximised(){this._container.enterStackMaximised()}exitStackMaximised(){this._container.exitStackMaximised()}drag(){this._container.drag()}updateSize(t){this.updateNodeSize(t)}init(){this.updateNodeSize(!1),super.init(),this._container.emit("open"),this.initContentItems()}setTitle(t){this._title=t,this.emit("titleChanged",t),this.emit("stateChanged")}setTab(t){this._tab=t,this.emit("tab",t),this._container.setTab(t)}hide(){super.hide(),this._container.setVisibility(!1)}show(){super.show(),this._container.setVisibility(!0)}focus(t=!1){this.parentItem.setActiveComponentItem(this,!0,t)}setFocused(t){this._focused=!0,this.tab.setFocused(),t||this.emitBaseBubblingEvent("focus")}blur(t=!1){this._focused&&this.layoutManager.setFocusedComponentItem(void 0,t)}setBlurred(t){this._focused=!1,this.tab.setBlurred(),t||this.emitBaseBubblingEvent("blur")}setParent(t){this._parentItem=t,super.setParent(t)}handleUpdateItemConfigEvent(t){this.applyUpdatableConfig(t)}updateNodeSize(t){if("none"!==this.element.style.display){const{width:e,height:n}=Bt(this.element);this._container.setSizeToNodeSize(e,n,t)}}}class Kt extends qt{constructor(){super(...arguments),this._focused=!1}get focused(){return this._focused}setFocusedValue(t){this._focused=t}}class Zt extends Ht{constructor(t,e){super(),this._eElement=t,this._pointerTracking=!1,this._pointerDownEventListener=t=>this.onPointerDown(t),this._pointerMoveEventListener=t=>this.onPointerMove(t),this._pointerUpEventListener=t=>this.onPointerUp(t),this._timeout=void 0,this._allowableTargets=[t,...e],this._oDocument=document,this._eBody=document.body,this._nDelay=1800,this._nDistance=10,this._nX=0,this._nY=0,this._nOriginalX=0,this._nOriginalY=0,this._dragging=!1,this._eElement.addEventListener("pointerdown",this._pointerDownEventListener,{passive:!0})}destroy(){this.checkRemovePointerTrackingEventListeners(),this._eElement.removeEventListener("pointerdown",this._pointerDownEventListener)}cancelDrag(){this.processDragStop(void 0)}onPointerDown(t){if(this._allowableTargets.includes(t.target)&&t.isPrimary){const e=this.getPointerCoordinates(t);this.processPointerDown(e)}}processPointerDown(t){this._nOriginalX=t.x,this._nOriginalY=t.y,this._oDocument.addEventListener("pointermove",this._pointerMoveEventListener),this._oDocument.addEventListener("pointerup",this._pointerUpEventListener,{passive:!0}),this._pointerTracking=!0,this._timeout=setTimeout((()=>{try{this.startDrag()}catch(t){throw console.error(t),t}}),this._nDelay)}onPointerMove(t){this._pointerTracking&&(this.processDragMove(t),t.preventDefault())}processDragMove(t){this._nX=t.pageX-this._nOriginalX,this._nY=t.pageY-this._nOriginalY,!1===this._dragging&&(Math.abs(this._nX)>this._nDistance||Math.abs(this._nY)>this._nDistance)&&this.startDrag(),this._dragging&&this.emit("drag",this._nX,this._nY,t)}onPointerUp(t){this.processDragStop(t)}processDragStop(t){var e;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this.checkRemovePointerTrackingEventListeners(),!0===this._dragging&&(this._eBody.classList.remove("lm_dragging"),this._eElement.classList.remove("lm_dragging"),null===(e=this._oDocument.querySelector("iframe"))||void 0===e||e.style.setProperty("pointer-events",""),this._dragging=!1,this.emit("dragStop",t))}checkRemovePointerTrackingEventListeners(){this._pointerTracking&&(this._oDocument.removeEventListener("pointermove",this._pointerMoveEventListener),this._oDocument.removeEventListener("pointerup",this._pointerUpEventListener),this._pointerTracking=!1)}startDrag(){var t;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this._dragging=!0,this._eBody.classList.add("lm_dragging"),this._eElement.classList.add("lm_dragging"),null===(t=this._oDocument.querySelector("iframe"))||void 0===t||t.style.setProperty("pointer-events","none"),this.emit("dragStart",this._nOriginalX,this._nOriginalY)}getPointerCoordinates(t){return{x:t.pageX,y:t.pageY}}}class Jt{constructor(t,e,n){this._isVertical=t,this._size=e,this._grabSize=n0){const n=this.createSplitter(Math.max(0,e-1)).element;e>0?(this.contentItems[e-1].element.insertAdjacentElement("afterend",n),n.insertAdjacentElement("afterend",t.element)):(this.contentItems[0].element.insertAdjacentElement("beforebegin",n),n.insertAdjacentElement("beforebegin",t.element))}else this._childElementContainer.appendChild(t.element);super.addChild(t,e);const i=1/this.contentItems.length*100;if(!0===n)return this.emitBaseBubblingEvent("stateChanged"),e;for(let e=0;e0&&(this.calculateRelativeSizes(),this.setAbsoluteSizes()),this.emitBaseBubblingEvent("stateChanged"),this.emit("resize")}setAbsoluteSizes(){const t=this.calculateAbsoluteSizes();for(let e=0;e0&&t.itemSizes[e]++,this._isColumn?(kt(this.contentItems[e].element,t.crossAxisSize),jt(this.contentItems[e].element,t.itemSizes[e])):(kt(this.contentItems[e].element,t.itemSizes[e]),jt(this.contentItems[e].element,t.crossAxisSize))}calculateAbsoluteSizes(){const t=(this.contentItems.length-1)*this._splitterSize,{width:e,height:n}=Bt(this.element);let i,o;this._isColumn?(i=n-t,o=e):(i=e-t,o=n);let r=0;const s=[];for(let t=0;t0){const i=100-t;for(let t=0;t100&&e.length>0){for(let t=0;te)return;{const s=n/e;let a=n;for(let e=0;ethis.onSplitterDrag(e,t,n))),e.on("dragStop",(()=>this.onSplitterDragStop(e))),e.on("dragStart",(()=>this.onSplitterDragStart(e))),this._splitter.splice(t,0,e),e}getSplitItems(t){const e=this._splitter.indexOf(t);return{before:this.contentItems[e],after:this.contentItems[e+1]}}calculateContentItemMinSize(t){const e=t.minSize;if(void 0!==e){if(t.minSizeUnit===ut.Pixel)return e;throw new X("ROCGMD98831",JSON.stringify(t))}{const t=this.layoutManager.layoutConfig.dimensions;return this._isColumn?t.defaultMinItemHeight:t.defaultMinItemWidth}}calculateContentItemsTotalMinSize(t){let e=0;for(const n of t)e+=this.calculateContentItemMinSize(n);return e}onSplitterDragStart(t){const e=this.getSplitItems(t),n=Rt(e.before.element.style[this._dimension]),i=Rt(e.after.element.style[this._dimension]),o=this.calculateContentItemsTotalMinSize(e.before.contentItems),r=this.calculateContentItemsTotalMinSize(e.after.contentItems);this._splitterPosition=0,this._splitterMinPosition=-1*(n-o),this._splitterMaxPosition=i-r}onSplitterDrag(t,e,n){let i=this._isColumn?n:e;if(null===this._splitterMinPosition||null===this._splitterMaxPosition)throw new tt("ROCOSD59226");i=Math.max(i,this._splitterMinPosition),i=Math.min(i,this._splitterMaxPosition),this._splitterPosition=i;const o=Ot(i);this._isColumn?t.element.style.top=o:t.element.style.left=o}onSplitterDragStop(t){if(null===this._splitterPosition)throw new tt("ROCOSDS66932");{const e=this.getSplitItems(t),n=Rt(e.before.element.style[this._dimension]),i=Rt(e.after.element.style[this._dimension]),o=(this._splitterPosition+n)/(n+i),r=e.before.size+e.after.size;e.before.size=o*r,e.after.size=(1-o)*r,t.element.style.top=Ot(0),t.element.style.left=Ot(0),globalThis.requestAnimationFrame((()=>this.updateSize(!1)))}}}!function(t){t.getElementDimensionSize=function(t,e){return"width"===e?function(t){return t.offsetWidth}(t):function(t){return t.offsetHeight}(t)},t.setElementDimensionSize=function(t,e,n){return"width"===e?kt(t,n):jt(t,n)},t.createElement=function(t,e){const n=t.createElement("div");return n.classList.add("lm_item"),e?n.classList.add("lm_column"):n.classList.add("lm_row"),n}}(Xt||(Xt={}));class Qt extends Kt{constructor(t,e,n){super(t,Ct.create(e),null,Qt.createElement(document)),this.isGround=!0,this._childElementContainer=this.element,this._containerElement=n;let i=null;for(;;){const t=i?i.previousSibling:this._containerElement.lastChild;if(!(t instanceof Element&&t.classList.contains("lm_content")))break;i=t}this._containerElement.insertBefore(this.element,i)}init(){if(!0!==this.isInitialised){this.updateNodeSize();for(let t=0;t0?this.contentItems[0]:this,i.isComponent)throw new Error("Cannot add item as child to ComponentItem");{const t=this.layoutManager.createAndInitContentItem(n,i);return e=i.addChild(t,e),i===this?-1:e}}loadComponentAsRoot(t){this.clearRoot();const e=It.resolve(t,!1);if(e.maximised)throw new Error("Root Component cannot be maximised");{const t=new Yt(this.layoutManager,e,this);t.init(),this.addChild(t,0)}}addChild(t,e){if(this.contentItems.length>0)throw new Error("Ground node can only have a single child");return this._childElementContainer.appendChild(t.element),e=super.addChild(t,e),this.updateSize(!1),this.emitBaseBubblingEvent("stateChanged"),e}calculateConfigContent(){const t=this.contentItems,e=t.length,n=new Array(e);for(let i=0;i0&&(kt(this.contentItems[0].element,t),jt(this.contentItems[0].element,e)),this.updateContentItemsSize(!1))}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}createSideAreas(){const t=Qt.Area.oppositeSides,e=new Array(Object.keys(t).length);let n=0;for(const i in t){const o=i,r=this.getElementArea();if(null===r)throw new tt("RCSA77553");r.side=o,"2"===t[o][1]?r[o]=r[t[o]]-50:r[o]=r[t[o]]+50,r.surface=(r.x2-r.x1)*(r.y2-r.y1),e[n++]=r}return e}highlightDropZone(t,e,n){this.layoutManager.tabDropPlaceholder.remove(),super.highlightDropZone(t,e,n)}onDrop(t,e){if(t.isComponent){const e=wt.createDefault(),n=t;e.header=mt.Header.createCopy(n.headerConfig);const i=this.layoutManager.createAndInitContentItem(e,this);i.addChild(t),t=i}if(0===this.contentItems.length)this.addChild(t);else{if(t.type===ht.row||t.type===ht.column){const e=wt.createDefault(),n=this.layoutManager.createContentItem(e,this);n.addChild(t),t=n}const n="x"==e.side[0]?ht.row:ht.column,i="2"==e.side[1],o=this.contentItems[0];if(o instanceof Xt&&o.type===n){const e=o.contentItems[i?0:o.contentItems.length-1];o.addChild(t,i?0:void 0,!0),e.size*=.5,t.size=e.size,t.sizeUnit=ut.Percent,o.updateSize(!1)}else{const e=ft.createDefault(n),r=this.layoutManager.createContentItem(e,this);this.replaceChild(o,r),r.addChild(t,i?0:void 0,!0),r.addChild(o,i?void 0:0,!0),o.size=50,t.size=50,t.sizeUnit=ut.Percent,r.updateSize(!1)}}}dock(){throw new X("GID87731")}validateDocking(){throw new X("GIVD87732")}getAllContentItems(){const t=[this];return this.deepGetAllContentItems(this.contentItems,t),t}getConfigMaximisedItems(){const t=[];return this.deepFilterContentItems(this.contentItems,t,(t=>!(!qt.isStack(t)||!t.initialWantMaximise)||!(!qt.isComponentItem(t)||!t.initialWantMaximise))),t}getItemsByPopInParentId(t){const e=[];return this.deepFilterContentItems(this.contentItems,e,(e=>e.popInParentIds.includes(t))),e}toConfig(){throw new Error("Cannot generate GroundItem config")}setActiveComponentItem(t,e,n){}updateNodeSize(){const{width:t,height:e}=Bt(this._containerElement);kt(this.element,t),jt(this.element,e),this.contentItems.length>0&&(kt(this.contentItems[0].element,t),jt(this.contentItems[0].element,e))}deepGetAllContentItems(t,e){for(let n=0;nthis.onClick(t),this._touchStartEventListener=t=>this.onTouchStart(t),this._element=document.createElement("div"),this._element.classList.add(n),this._element.title=e,this._header.on("destroy",(()=>this.destroy())),this._element.addEventListener("click",this._clickEventListener,{passive:!0}),this._element.addEventListener("touchstart",this._touchStartEventListener,{passive:!0}),this._header.controlsContainerElement.appendChild(this._element)}get element(){return this._element}destroy(){var t;this._element.removeEventListener("click",this._clickEventListener),this._element.removeEventListener("touchstart",this._touchStartEventListener),null===(t=this._element.parentNode)||void 0===t||t.removeChild(this._element)}onClick(t){this._pushEvent(t)}onTouchStart(t){this._pushEvent(t)}}class ee{constructor(t,e,n,i,o){var r;this._layoutManager=t,this._componentItem=e,this._closeEvent=n,this._focusEvent=i,this._dragStartEvent=o,this._isActive=!1,this._tabClickListener=t=>this.onTabClickDown(t),this._tabTouchStartListener=t=>this.onTabTouchStart(t),this._closeClickListener=()=>this.onCloseClick(),this._closeTouchStartListener=()=>this.onCloseTouchStart(),this._dragStartListener=(t,e)=>this.onDragStart(t,e),this._contentItemDestroyListener=()=>this.onContentItemDestroy(),this._tabTitleChangedListener=t=>this.setTitle(t),this._element=document.createElement("div"),this._element.classList.add("lm_tab"),this._titleElement=document.createElement("span"),this._titleElement.classList.add("lm_title"),this._closeElement=document.createElement("div"),this._closeElement.classList.add("lm_close_tab"),this._element.appendChild(this._titleElement),this._element.appendChild(this._closeElement),e.isClosable?this._closeElement.style.display="":this._closeElement.style.display="none",this.setTitle(e.title),this._componentItem.on("titleChanged",this._tabTitleChangedListener),(null!==(r=e.reorderEnabled)&&void 0!==r?r:this._layoutManager.layoutConfig.settings.reorderEnabled)&&this.enableReorder(),this._element.addEventListener("click",this._tabClickListener,{passive:!0}),this._element.addEventListener("touchstart",this._tabTouchStartListener,{passive:!0}),this._componentItem.isClosable?(this._closeElement.addEventListener("click",this._closeClickListener,{passive:!0}),this._closeElement.addEventListener("touchstart",this._closeTouchStartListener,{passive:!0})):(this._closeElement.remove(),this._closeElement=void 0),this._componentItem.setTab(this),this._layoutManager.emit("tabCreated",this)}get isActive(){return this._isActive}get componentItem(){return this._componentItem}get contentItem(){return this._componentItem}get element(){return this._element}get titleElement(){return this._titleElement}get closeElement(){return this._closeElement}get reorderEnabled(){return void 0!==this._dragListener}set reorderEnabled(t){t!==this.reorderEnabled&&(t?this.enableReorder():this.disableReorder())}setTitle(t){this._titleElement.innerText=t,this._element.title=t}setActive(t){t!==this._isActive&&(this._isActive=t,t?this._element.classList.add("lm_active"):this._element.classList.remove("lm_active"))}destroy(){var t,e;this._closeEvent=void 0,this._focusEvent=void 0,this._dragStartEvent=void 0,this._element.removeEventListener("click",this._tabClickListener),this._element.removeEventListener("touchstart",this._tabTouchStartListener),null===(t=this._closeElement)||void 0===t||t.removeEventListener("click",this._closeClickListener),null===(e=this._closeElement)||void 0===e||e.removeEventListener("touchstart",this._closeTouchStartListener),this._componentItem.off("titleChanged",this._tabTitleChangedListener),this.reorderEnabled&&this.disableReorder(),this._element.remove()}setBlurred(){this._element.classList.remove("lm_focused"),this._titleElement.classList.remove("lm_focused")}setFocused(){this._element.classList.add("lm_focused"),this._titleElement.classList.add("lm_focused")}onDragStart(t,e){if(void 0===this._dragListener)throw new et("TODSDLU10093");if(void 0===this._dragStartEvent)throw new et("TODS23309");this._dragStartEvent(t,e,this._dragListener,this.componentItem)}onContentItemDestroy(){void 0!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=void 0)}onTabClickDown(t){const e=t.target;e!==this._element&&e!==this._titleElement||(0===t.button?this.notifyFocus():1===t.button&&this._componentItem.isClosable&&this.notifyClose())}onTabTouchStart(t){t.target===this._element&&this.notifyFocus()}onCloseClick(){this.notifyClose()}onCloseTouchStart(){this.notifyClose()}notifyClose(){if(void 0===this._closeEvent)throw new et("TNC15007");this._closeEvent(this._componentItem)}notifyFocus(){if(void 0===this._focusEvent)throw new et("TNA15007");this._focusEvent(this._componentItem)}enableReorder(){this._dragListener=new Zt(this._element,[this._titleElement]),this._dragListener.on("dragStart",this._dragStartListener),this._componentItem.on("destroy",this._contentItemDestroyListener)}disableReorder(){if(void 0===this._dragListener)throw new et("TDR87745");this._componentItem.off("destroy",this._contentItemDestroyListener),this._dragListener.off("dragStart",this._dragStartListener),this._dragListener=void 0}}class ne{constructor(t,e,n,i,o){this._layoutManager=t,this._componentRemoveEvent=e,this._componentFocusEvent=n,this._componentDragStartEvent=i,this._dropdownActiveChangedEvent=o,this._tabs=[],this._lastVisibleTabIndex=-1,this._dropdownActive=!1,this._element=document.createElement("section"),this._element.classList.add("lm_tabs"),this._dropdownElement=document.createElement("section"),this._dropdownElement.classList.add("lm_tabdropdown_list"),this._dropdownElement.style.display="none"}get tabs(){return this._tabs}get tabCount(){return this._tabs.length}get lastVisibleTabIndex(){return this._lastVisibleTabIndex}get element(){return this._element}get dropdownElement(){return this._dropdownElement}get dropdownActive(){return this._dropdownActive}destroy(){for(let t=0;tthis.handleTabCloseEvent(t)),(t=>this.handleTabFocusEvent(t)),((t,e,n,i)=>this.handleTabDragStartEvent(t,e,n,i)));void 0===e&&(e=this._tabs.length),this._tabs.splice(e,0,n),ethis._lastVisibleTabIndex){const t=this._tabs[e];for(let t=e;t>0;t--)this._tabs[t]=this._tabs[t-1];this._tabs[0]=t}}updateTabSizes(t,e){let n=!1;this.tryUpdateTabSizes(n,t,e)||(n=!0,this.tryUpdateTabSizes(n,t,e)),n!==this._dropdownActive&&(this._dropdownActive=n,this._dropdownActiveChangedEvent())}tryUpdateTabSizes(t,e,n){if(this._tabs.length>0){if(void 0===n)throw new Error("non-empty tabs must have active component item");let i=0,o=!1;const r=this._layoutManager.layoutConfig.settings.tabOverlapAllowance,s=this._tabs.indexOf(n.tab),a=this._tabs[s];this._lastVisibleTabIndex=-1;for(let n=0;ne){if(o)n===s&&(c.style.zIndex="auto",c.style.marginLeft="",c.parentElement!==this._element&&this._element.appendChild(c));else{let t;if(t=s>0&&s<=n?(h-e)/(n-1):(h-e)/n,tthis.onClick(t),this._touchStartListener=t=>this.onTouchStart(t),this._rowColumnClosable=!0,this._closeButton=null,this._popoutButton=null,this._tabsContainer=new ne(this._layoutManager,(t=>this.handleTabInitiatedComponentRemoveEvent(t)),(t=>this.handleTabInitiatedComponentFocusEvent(t)),((t,e,n,i)=>this.handleTabInitiatedDragStartEvent(t,e,n,i)),(()=>this.processTabDropdownActiveChanged())),this._show=n.show,this._popoutEnabled=n.popoutEnabled,this._popoutLabel=n.popoutLabel,this._maximiseEnabled=n.maximiseEnabled,this._maximiseLabel=n.maximiseLabel,this._minimiseEnabled=n.minimiseEnabled,this._minimiseLabel=n.minimiseLabel,this._closeEnabled=n.closeEnabled,this._closeLabel=n.closeLabel,this._tabDropdownEnabled=n.tabDropdownEnabled,this._tabDropdownLabel=n.tabDropdownLabel,this.setSide(n.side),this._canRemoveComponent=this._configClosable,this._element=document.createElement("section"),this._element.classList.add("lm_header"),this._controlsContainerElement=document.createElement("section"),this._controlsContainerElement.classList.add("lm_controls"),this._element.appendChild(this._tabsContainer.element),this._element.appendChild(this._controlsContainerElement),this._element.appendChild(this._tabsContainer.dropdownElement),this._element.addEventListener("click",this._clickListener,{passive:!0}),this._element.addEventListener("touchstart",this._touchStartListener,{passive:!0}),this._documentMouseUpListener=()=>this._tabsContainer.hideAdditionalTabsDropdown(),globalThis.document.addEventListener("mouseup",this._documentMouseUpListener,{passive:!0}),this._tabControlOffset=this._layoutManager.layoutConfig.settings.tabControlOffset,this._tabDropdownEnabled&&(this._tabDropdownButton=new te(this,this._tabDropdownLabel,"lm_tabdropdown",(()=>this._tabsContainer.showAdditionalTabsDropdown()))),this._popoutEnabled&&(this._popoutButton=new te(this,this._popoutLabel,"lm_popout",(()=>this.handleButtonPopoutEvent()))),this._maximiseEnabled&&(this._maximiseButton=new te(this,this._maximiseLabel,"lm_maximise",(t=>this.handleButtonMaximiseToggleEvent(t)))),this._configClosable&&(this._closeButton=new te(this,this._closeLabel,"lm_close",(()=>r()))),this.processTabDropdownActiveChanged()}get show(){return this._show}get side(){return this._side}get leftRightSided(){return this._leftRightSided}get layoutManager(){return this._layoutManager}get parent(){return this._parent}get tabs(){return this._tabsContainer.tabs}get lastVisibleTabIndex(){return this._tabsContainer.lastVisibleTabIndex}get element(){return this._element}get tabsContainerElement(){return this._tabsContainer.element}get controlsContainerElement(){return this._controlsContainerElement}destroy(){this.emit("destroy"),this._popoutEvent=void 0,this._maximiseToggleEvent=void 0,this._clickEvent=void 0,this._touchStartEvent=void 0,this._componentRemoveEvent=void 0,this._componentFocusEvent=void 0,this._componentDragStartEvent=void 0,this._tabsContainer.destroy(),globalThis.document.removeEventListener("mouseup",this._documentMouseUpListener),this._element.remove()}createTab(t,e){this._tabsContainer.createTab(t,e)}removeTab(t){this._tabsContainer.removeTab(t)}processActiveComponentChanged(t){this._tabsContainer.processActiveComponentChanged(t),this.updateTabSizes()}setSide(t){this._side=t,this._leftRightSided=[st.right,st.left].includes(this._side)}setRowColumnClosable(t){this._rowColumnClosable=t,this.updateClosability()}updateClosability(){let t;if(this._configClosable)if(this._rowColumnClosable){t=!0;const e=this.tabs.length;for(let n=0;n1}applyFocusedValue(t){t?this._element.classList.add("lm_focused"):this._element.classList.remove("lm_focused")}processMaximised(){if(void 0===this._maximiseButton)throw new et("HPMAX16997");this._maximiseButton.element.setAttribute("title",this._minimiseLabel)}processMinimised(){if(void 0===this._maximiseButton)throw new et("HPMIN16997");this._maximiseButton.element.setAttribute("title",this._maximiseLabel)}updateTabSizes(){if(this._tabsContainer.tabCount>0){const t=this._show?this._layoutManager.layoutConfig.dimensions.headerHeight:0;let e;this._leftRightSided?(this._element.style.height="",this._element.style.width=Ot(t)):(this._element.style.width="",this._element.style.height=Ot(t)),e=this._leftRightSided?this._element.offsetHeight-this._controlsContainerElement.offsetHeight-this._tabControlOffset:this._element.offsetWidth-this._controlsContainerElement.offsetWidth-this._tabControlOffset,this._tabsContainer.updateTabSizes(e,this._getActiveComponentItemEvent())}}handleTabInitiatedComponentRemoveEvent(t){if(this._canRemoveComponent){if(void 0===this._componentRemoveEvent)throw new et("HHTCE22294");this._componentRemoveEvent(t)}}handleTabInitiatedComponentFocusEvent(t){if(void 0===this._componentFocusEvent)throw new et("HHTAE22294");this._componentFocusEvent(t)}handleTabInitiatedDragStartEvent(t,e,n,i){if(this._canRemoveComponent){if(void 0===this._componentDragStartEvent)throw new et("HHTDSE22294");this._componentDragStartEvent(t,e,n,i)}else n.cancelDrag()}processTabDropdownActiveChanged(){void 0!==this._tabDropdownButton&&zt(this._tabDropdownButton.element,this._tabsContainer.dropdownActive)}handleButtonPopoutEvent(){if(this._layoutManager.layoutConfig.settings.popoutWholeStack){if(void 0===this._popoutEvent)throw new et("HHBPOE17834");this._popoutEvent()}else{const t=this._getActiveComponentItemEvent();t&&t.popout()}}handleButtonMaximiseToggleEvent(t){if(void 0===this._maximiseToggleEvent)throw new et("HHBMTE16834");this._maximiseToggleEvent()}onClick(t){t.target===this._element&&this.notifyClick(t)}onTouchStart(t){t.target===this._element&&this.notifyTouchStart(t)}notifyClick(t){if(void 0===this._clickEvent)throw new et("HNHC46834");this._clickEvent(t)}notifyTouchStart(t){if(void 0===this._touchStartEvent)throw new et("HNHTS46834");this._touchStartEvent(t)}}class oe extends Kt{constructor(t,e,n){var i,o,r,s,a,c,d,h,l,u,p,f,m,w,y,g,v,C,b;super(t,e,n,oe.createElement(document)),this._headerSideChanged=!1,this._resizeListener=()=>this.handleResize(),this._maximisedListener=()=>this.handleMaximised(),this._minimisedListener=()=>this.handleMinimised(),this._headerConfig=e.header;const _=t.layoutConfig.header,I=e.content;let E;E=1!==I.length?void 0:I[0].header,this._initialWantMaximise=e.maximised,this._initialActiveItemIndex=null!==(i=e.activeItemIndex)&&void 0!==i?i:0;const x=null!==(s=null!==(r=null===(o=this._headerConfig)||void 0===o?void 0:o.show)&&void 0!==r?r:null==E?void 0:E.show)&&void 0!==s?s:_.show,S=null!==(d=null!==(c=null===(a=this._headerConfig)||void 0===a?void 0:a.popout)&&void 0!==c?c:null==E?void 0:E.popout)&&void 0!==d?d:_.popout,A=null!==(u=null!==(l=null===(h=this._headerConfig)||void 0===h?void 0:h.maximise)&&void 0!==l?l:null==E?void 0:E.maximise)&&void 0!==u?u:_.maximise,P=null!==(m=null!==(f=null===(p=this._headerConfig)||void 0===p?void 0:p.close)&&void 0!==f?f:null==E?void 0:E.close)&&void 0!==m?m:_.close,M=null!==(g=null!==(y=null===(w=this._headerConfig)||void 0===w?void 0:w.minimise)&&void 0!==y?y:null==E?void 0:E.minimise)&&void 0!==g?g:_.minimise,L=null!==(b=null!==(C=null===(v=this._headerConfig)||void 0===v?void 0:v.tabDropdown)&&void 0!==C?C:null==E?void 0:E.tabDropdown)&&void 0!==b?b:_.tabDropdown;this._maximisedEnabled=!1!==A;const O={show:!1!==x,side:!1===x?st.top:x,popoutEnabled:!1!==S,popoutLabel:!1===S?"":S,maximiseEnabled:this._maximisedEnabled,maximiseLabel:!1===A?"":A,closeEnabled:!1!==P,closeLabel:!1===P?"":P,minimiseEnabled:!0,minimiseLabel:M,tabDropdownEnabled:!1!==L,tabDropdownLabel:!1===L?"":L};this._header=new ie(t,this,O,e.isClosable&&!1!==P,(()=>this.getActiveComponentItem()),(()=>this.remove()),(()=>this.handlePopoutEvent()),(()=>this.toggleMaximise()),(t=>this.handleHeaderClickEvent(t)),(t=>this.handleHeaderTouchStartEvent(t)),(t=>this.handleHeaderComponentRemoveEvent(t)),(t=>this.handleHeaderComponentFocusEvent(t)),((t,e,n,i)=>this.handleHeaderComponentStartDragEvent(t,e,n,i))),this.isStack=!0,this._childElementContainer=document.createElement("section"),this._childElementContainer.classList.add("lm_items"),this.on("resize",this._resizeListener),this._maximisedEnabled&&(this.on("maximised",this._maximisedListener),this.on("minimised",this._minimisedListener)),this.element.appendChild(this._header.element),this.element.appendChild(this._childElementContainer),this.setupHeaderPosition(),this._header.updateClosability()}get childElementContainer(){return this._childElementContainer}get header(){return this._header}get headerShow(){return this._header.show}get headerSide(){return this._header.side}get headerLeftRightSided(){return this._header.leftRightSided}get contentAreaDimensions(){return this._contentAreaDimensions}get initialWantMaximise(){return this._initialWantMaximise}get isMaximised(){return this===this.layoutManager.maximisedStack}get stackParent(){if(!this.parent)throw new Error("Stack should always have a parent");return this.parent}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}init(){if(!0===this.isInitialised)return;this.updateNodeSize();for(let t=0;t0){if(this._initialActiveItemIndex<0||this._initialActiveItemIndex>=e)throw new Error(`ActiveItemIndex out of range: ${this._initialActiveItemIndex} id: ${this.id}`);for(let n=0;nthis.contentItems.length)throw e-=1,new X("SAC99728");if(t instanceof Yt)return e=super.addChild(t,e),this._childElementContainer.appendChild(t.element),this._header.createTab(t,e),this.setActiveComponentItem(t,n),this._header.updateTabSizes(),this.updateSize(!1),t.container.setBaseLogicalZIndex(),this._header.updateClosability(),this.emitStateChangedEvent(),e;throw new X("SACC88532")}removeChild(t,e){const n=t,i=this.contentItems.indexOf(n),o=1===this.contentItems.length;if(this._activeComponentItem===n&&(n.focused&&n.blur(),!o)){const t=0===i?1:i-1;this.setActiveComponentItem(this.contentItems[t],!1)}this._header.removeTab(n),super.removeChild(n,e),o||this._header.updateClosability(),this.emitStateChangedEvent()}toggleMaximise(){this.isMaximised?this.minimise():this.maximise()}maximise(){if(!this.isMaximised){this.layoutManager.setMaximisedStack(this);const t=this.contentItems,e=t.length;for(let n=0;n0&&void 0===t)throw new Error("expected non-empty stack to have an active component item");return{type:"stack",content:this.calculateConfigContent(),size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,isClosable:this.isClosable,maximised:this.isMaximised,header:this.createHeaderConfig(),activeItemIndex:t}}onDrop(t,e){if("header"===this._dropSegment){if(this.resetHeaderDropZone(),void 0===this._dropIndex)throw new et("SODDI68990");return void this.addChild(t,this._dropIndex)}if("body"===this._dropSegment)return void this.addChild(t,0,!0);const n="top"===this._dropSegment||"bottom"===this._dropSegment,i="left"===this._dropSegment||"right"===this._dropSegment,o="top"===this._dropSegment||"left"===this._dropSegment,r=n&&this.stackParent.isColumn||i&&this.stackParent.isRow;if(t.isComponent){const e=wt.createDefault();e.header=this.createHeaderConfig();const n=this.layoutManager.createAndInitContentItem(e,this);n.addChild(t),t=n}if(t.type===ht.row||t.type===ht.column){const e=wt.createDefault();e.header=this.createHeaderConfig();const n=this.layoutManager.createContentItem(e,this);n.addChild(t),t=n}if(r){const e=this.stackParent.contentItems.indexOf(this);this.stackParent.addChild(t,o?e:e+1,!0),this.size*=.5,t.size=this.size,t.sizeUnit=this.sizeUnit,this.stackParent.updateSize(!1)}else{const e=n?ht.column:ht.row,i=ft.createDefault(e),r=this.layoutManager.createContentItem(i,this);this.stackParent.replaceChild(this,r),r.addChild(t,o?0:void 0,!0),r.addChild(this,o?void 0:0,!0),this.size=50,t.size=50,t.sizeUnit=ut.Percent,r.updateSize(!1)}}highlightDropZone(t,e){for(const n in this._contentAreaDimensions){const i=n,o=this._contentAreaDimensions[i].hoverArea;if(o.x1t&&o.y1e)return void("header"===i?(this._dropSegment="header",this.highlightHeaderDropZone(this._header.leftRightSided?e:t)):(this.resetHeaderDropZone(),this.highlightBodyDropZone(i)))}}getArea(){if("none"===this.element.style.display)return null;const t=super.getElementArea(this._header.element),e=super.getElementArea(this._childElementContainer);if(null===t||null===e)throw new tt("SGAHC13086");const n=e.x2-e.x1,i=e.y2-e.y1;return this._contentAreaDimensions={header:{hoverArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2},highlightArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2}}},0===this.contentItems.length?(this._contentAreaDimensions.body={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2}},super.getElementArea(this.element)):(this._contentAreaDimensions.left={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x1+.25*n,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x1+.5*n,y2:e.y2}},this._contentAreaDimensions.top={hoverArea:{x1:e.x1+.25*n,y1:e.y1,x2:e.x1+.75*n,y2:e.y1+.5*i},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y1+.5*i}},this._contentAreaDimensions.right={hoverArea:{x1:e.x1+.75*n,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1+.5*n,y1:e.y1,x2:e.x2,y2:e.y2}},this._contentAreaDimensions.bottom={hoverArea:{x1:e.x1+.25*n,y1:e.y1+.5*i,x2:e.x1+.75*n,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1+.5*i,x2:e.x2,y2:e.y2}},super.getElementArea(this.element))}positionHeader(t){this._header.side!==t&&(this._header.setSide(t),this._headerSideChanged=!0,this.setupHeaderPosition())}updateNodeSize(){if("none"!==this.element.style.display){const t=Bt(this.element);this._header.show&&(t[this._header.leftRightSided?rt.width:rt.height]-=this.layoutManager.layoutConfig.dimensions.headerHeight),this._childElementContainer.style.width=Ot(t.width),this._childElementContainer.style.height=Ot(t.height);for(let e=0;e=o&&tthis.onDrag(t,e,n))),this._dragListener.on("dragStop",(()=>this.onDrop())),this.createDragProxyElements(t,e),null===this._componentItem.parent)throw new tt("DPC10097");this._componentItemFocused=this._componentItem.focused,this._componentItemFocused&&this._componentItem.blur(),this._componentItem.parent.removeChild(this._componentItem,!0),this.setDimensions(),document.body.appendChild(this._element),this.determineMinMaxXY(),this._layoutManager.calculateItemAreas(),this.setDropPosition(t,e)}get element(){return this._element}createDragProxyElements(t,e){this._element=document.createElement("div"),this._element.classList.add("lm_dragProxy");const n=document.createElement("div");n.classList.add("lm_header");const i=document.createElement("div");i.classList.add("lm_tabs");const o=document.createElement("div");o.classList.add("lm_tab");const r=document.createElement("span");r.classList.add("lm_title"),o.appendChild(r),i.appendChild(o),n.appendChild(i),this._proxyContainerElement=document.createElement("div"),this._proxyContainerElement.classList.add("lm_content"),this._element.appendChild(n),this._element.appendChild(this._proxyContainerElement),this._originalParent instanceof oe&&this._originalParent.headerShow&&(this._sided=this._originalParent.headerLeftRightSided,this._element.classList.add("lm_"+this._originalParent.headerSide),[st.right,st.bottom].indexOf(this._originalParent.headerSide)>=0&&this._proxyContainerElement.insertAdjacentElement("afterend",n)),this._element.style.left=Ot(t),this._element.style.top=Ot(e),o.setAttribute("title",this._componentItem.title),r.insertAdjacentText("afterbegin",this._componentItem.title),this._proxyContainerElement.appendChild(this._componentItem.element)}determineMinMaxXY(){const t=this._layoutManager.groundItem;if(void 0===t)throw new et("DPDMMXY73109");{const e=t.element.getBoundingClientRect();this._minX=e.left+document.body.scrollLeft,this._minY=e.top+document.body.scrollTop,this._maxX=this._minX+e.width,this._maxY=this._minY+e.height}}onDrag(t,e,n){const i=n.pageX,o=n.pageY;this.setDropPosition(i,o),this._componentItem.drag()}setDropPosition(t,e){this._layoutManager.layoutConfig.settings.constrainDragToContainer&&(t<=this._minX?t=Math.ceil(this._minX):t>=this._maxX&&(t=Math.floor(this._maxX)),e<=this._minY?e=Math.ceil(this._minY):e>=this._maxY&&(e=Math.floor(this._maxY))),this._element.style.left=Ot(t),this._element.style.top=Ot(e),this._area=this._layoutManager.getArea(t,e),null!==this._area&&(this._lastValidArea=this._area,this._area.contentItem.highlightDropZone(t,e,this._area))}onDrop(){const t=this._layoutManager.dropTargetIndicator;if(null===t)throw new tt("DPOD30011");let e;t.hide(),this._componentItem.exitDragMode(),null!==this._area?(e=this._componentItem,this._area.contentItem.onDrop(e,this._area)):null!==this._lastValidArea?(e=this._componentItem,this._lastValidArea.contentItem.onDrop(e,this._lastValidArea)):this._originalParent?(e=this._componentItem,this._originalParent.addChild(e)):this._componentItem.destroy(),this._element.remove(),this._layoutManager.emit("itemDropped",this._componentItem),this._componentItemFocused&&void 0!==e&&e.focus()}setDimensions(){const t=this._layoutManager.layoutConfig.dimensions;if(void 0===t)throw new Error("DragProxy.setDimensions: dimensions undefined");let e=t.dragProxyWidth,n=t.dragProxyHeight;if(void 0===e||void 0===n)throw new Error("DragProxy.setDimensions: width and/or height undefined");const i=!1===this._layoutManager.layoutConfig.header.show?0:t.headerHeight;this._element.style.width=Ot(e),this._element.style.height=Ot(n),e-=this._sided?i:0,n-=this._sided?0:i,this._proxyContainerElement.style.width=Ot(e),this._proxyContainerElement.style.height=Ot(n),this._componentItem.enterDragMode(e,n),this._componentItem.show()}}class se{constructor(t,e,n,i,o,r,s){this._layoutManager=t,this._element=e,this._extraAllowableChildTargets=n,this._componentTypeOrFtn=i,this._componentState=o,this._title=r,this._id=s,this._dragListener=null,this._dummyGroundContainer=document.createElement("div");const a=gt.createDefault("row");this._dummyGroundContentItem=new Qt(this._layoutManager,a,this._dummyGroundContainer),this.createDragListener()}destroy(){this.removeDragListener()}createDragListener(){this.removeDragListener(),this._dragListener=new Zt(this._element,this._extraAllowableChildTargets),this._dragListener.on("dragStart",((t,e)=>this.onDragStart(t,e))),this._dragListener.on("dragStop",(()=>this.onDragStop()))}onDragStart(t,e){var n;const i="component";let o;if("function"==typeof this._componentTypeOrFtn){const t=this._componentTypeOrFtn();o=se.isDragSourceComponentItemConfig(t)?{type:i,componentState:t.state,componentType:t.type,title:null!==(n=t.title)&&void 0!==n?n:this._title}:t}else o={type:i,componentState:this._componentState,componentType:this._componentTypeOrFtn,title:this._title,id:this._id};const r=St.resolve(o,!1),s=new Yt(this._layoutManager,r,this._dummyGroundContentItem);if(this._dummyGroundContentItem.contentItems.push(s),null===this._dragListener)throw new tt("DSODSD66746");{const n=new re(t,e,this._dragListener,this._layoutManager,s,this._dummyGroundContentItem),i=this._layoutManager.transitionIndicator;if(null===i)throw new tt("DSODST66746");i.transitionElements(this._element,n.element)}}onDragStop(){this.createDragListener()}removeDragListener(){null!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=null)}}!function(t){t.isDragSourceComponentItemConfig=function(t){return!("componentType"in t)}}(se||(se={}));class ae{constructor(){this._element=document.createElement("div"),this._element.classList.add("lm_dropTargetIndicator");const t=document.createElement("div");t.classList.add("lm_inner"),this._element.appendChild(t),document.body.appendChild(this._element)}destroy(){this._element.remove()}highlightArea(t,e){this._element.style.left=Ot(t.x1+e),this._element.style.top=Ot(t.y1+e),this._element.style.width=Ot(t.x2-t.x1-e),this._element.style.height=Ot(t.y2-t.y1-e),this._element.style.display="block"}hide(){zt(this._element,!1)}}class ce{constructor(){this._element=document.createElement("div"),this._element.classList.add("lm_transition_indicator"),document.body.appendChild(this._element),this._toElement=null,this._fromDimensions=null,this._totalAnimationDuration=200,this._animationStartTime=null}destroy(){this._element.remove()}transitionElements(t,e){}nextAnimationFrame(){}measure(t){const e=t.getBoundingClientRect();return{left:e.left,top:e.top,width:t.offsetWidth,height:t.offsetHeight}}}class de extends Ht{constructor(t){super(),this._layoutManager=t,this._childEventListener=t=>this.onEventFromChild(t),globalThis.addEventListener(de.ChildEventName,this._childEventListener,{passive:!0})}emit(t,...e){"userBroadcast"===t?this.emitUserBroadcast(...e):super.emit(t,...e)}emitUserBroadcast(...t){this.handleUserBroadcastEvent("userBroadcast",t)}destroy(){globalThis.removeEventListener(de.ChildEventName,this._childEventListener)}handleUserBroadcastEvent(t,e){this._layoutManager.isSubWindow?this.propagateToParent(t,e):this.propagateToThisAndSubtree(t,e)}onEventFromChild(t){const e=t.detail;this.handleUserBroadcastEvent(e.eventName,e.args)}propagateToParent(t,e){const n={bubbles:!0,cancelable:!0,detail:{layoutManager:this._layoutManager,eventName:t,args:e}},i=new CustomEvent(de.ChildEventName,n),o=globalThis.opener;if(null===o)throw new tt("EHPTP15778");o.dispatchEvent(i)}propagateToThisAndSubtree(t,e){this.emitUnknown(t,...e);for(let n=0;nthis.handleContainerResize())),this._windowBeforeUnloadListener=()=>this.onBeforeUnload(),this._windowBeforeUnloadListening=!1,this._maximisedStackBeforeDestroyedListener=t=>this.cleanupBeforeMaximisedStackDestroyed(t),this.isSubWindow=t.isSubWindow,this._constructorOrSubWindowLayoutConfig=t.constructorOrSubWindowLayoutConfig,nt.checkInitialise(),pt.checkInitialise(),void 0!==t.containerElement&&(this._containerElement=t.containerElement)}get container(){return this._containerElement}get isInitialised(){return this._isInitialised}get groundItem(){return this._groundItem}get root(){return this._groundItem}get openPopouts(){return this._openPopouts}get dropTargetIndicator(){return this._dropTargetIndicator}get transitionIndicator(){return this._transitionIndicator}get width(){return this._width}get height(){return this._height}get eventHub(){return this._eventHub}get rootItem(){if(void 0===this._groundItem)throw new Error("Cannot access rootItem before init");return 0===this._groundItem.contentItems.length?void 0:this._groundItem.contentItems[0]}get focusedComponentItem(){return this._focusedComponentItem}get tabDropPlaceholder(){return this._tabDropPlaceholder}get maximisedStack(){return this._maximisedStack}get deprecatedConstructor(){return!this.isSubWindow&&void 0!==this._constructorOrSubWindowLayoutConfig}destroy(){if(this._isInitialised){this._windowBeforeUnloadListening&&(globalThis.removeEventListener("beforeunload",this._windowBeforeUnloadListener),this._windowBeforeUnloadListening=!1),!0===this.layoutConfig.settings.closePopoutsOnUnload&&this.closeAllOpenPopouts(),this._resizeObserver.disconnect(),this.checkClearResizeTimeout(),void 0!==this._groundItem&&this._groundItem.destroy(),this._tabDropPlaceholder.remove(),null!==this._dropTargetIndicator&&this._dropTargetIndicator.destroy(),null!==this._transitionIndicator&&this._transitionIndicator.destroy(),this._eventHub.destroy();for(const t of this._dragSources)t.destroy();this._dragSources=[],this._isInitialised=!1}}minifyConfig(t){return bt.minifyConfig(t)}unminifyConfig(t){return bt.unminifyConfig(t)}init(){let t;if(this.setContainer(),this._dropTargetIndicator=new ae,this._transitionIndicator=new ce,this.updateSizeFromContainer(),this.isSubWindow){if(void 0===this._constructorOrSubWindowLayoutConfig)throw new et("LMIU07155");{const e=this._constructorOrSubWindowLayoutConfig.root;if(void 0===e)throw new X("LMIC07156");if(!It.isComponent(e))throw new X("LMIC07157");t=e;const n=Mt.resolve(this._constructorOrSubWindowLayoutConfig);this.layoutConfig=Object.assign(Object.assign({},n),{root:void 0})}}else void 0===this._constructorOrSubWindowLayoutConfig?this.layoutConfig=bt.createDefault():this.layoutConfig=Mt.resolve(this._constructorOrSubWindowLayoutConfig);const e=this.layoutConfig;this._groundItem=new Qt(this,e.root,this._containerElement),this._groundItem.init(),this.checkLoadedLayoutMaximiseItem(),this._resizeObserver.observe(this._containerElement),this._isInitialised=!0,this.adjustColumnsResponsive(),this.emit("initialised"),void 0!==t&&this.loadComponentAsRoot(t)}loadLayout(t){if(!this.isInitialised)throw new Error("GoldenLayout: Need to call init() if LayoutConfig with defined root passed to constructor");if(void 0===this._groundItem)throw new et("LMLL11119");this.createSubWindows(),this.layoutConfig=Mt.resolve(t),this._groundItem.loadRoot(this.layoutConfig.root),this.checkLoadedLayoutMaximiseItem(),this.adjustColumnsResponsive()}saveLayout(){if(!1===this._isInitialised)throw new Error("Can't create config, layout not yet initialised");if(void 0===this._groundItem)throw new et("LMTC18244");{const t=this._groundItem.calculateConfigContent();let e;e=1!==t.length?void 0:t[0],this.reconcilePopoutWindows();const n=[];for(let t=0;t=0?i=this._groundItem.contentItems[0]:e=0;break;case ht.row:case ht.column:e=i.addItem(t,n.index);break;case ht.stack:if(It.isComponent(t)){e=i.addItem(t,n.index);break}throw Error(it[6]);case ht.component:throw new X("LMAIALC87444602");default:throw new Q("LMAIALU98881733",i.type)}if(It.isComponent(t)){const t=i.contentItems[e];qt.isStack(t)&&(i=t,e=0)}return n.parentItem=i,n.index=e,n}}}loadComponentAsRoot(t){if(void 0===this._groundItem)throw new Error("Cannot add item before init");this._groundItem.loadComponentAsRoot(t)}updateSize(t,e){this.setSize(t,e)}setSize(t,e){if(this._width=t,this._height=e,!0===this._isInitialised){if(void 0===this._groundItem)throw new et("LMUS18881");if(this._groundItem.setSize(this._width,this._height),this._maximisedStack){const{width:t,height:e}=Bt(this._containerElement);kt(this._maximisedStack.element,t),jt(this._maximisedStack.element,e),this._maximisedStack.updateSize(!1)}this.adjustColumnsResponsive()}}beginSizeInvalidation(){this._sizeInvalidationBeginCount++}endSizeInvalidation(){0==--this._sizeInvalidationBeginCount&&this.updateSizeFromContainer()}updateSizeFromContainer(){const{width:t,height:e}=Bt(this._containerElement);this.setSize(t,e)}updateRootSize(t=!1){if(void 0===this._groundItem)throw new et("LMURS28881");this._groundItem.updateSize(t)}createAndInitContentItem(t,e){const n=this.createContentItem(t,e);return n.init(),n}createContentItem(t,e){if("string"!=typeof t.type)throw new q("Missing parameter 'type'",JSON.stringify(t));return!ft.isComponentItem(t)||e instanceof oe||!e||!0===this.isSubWindow&&e instanceof Qt||(t={type:ht.stack,content:[t],size:t.size,sizeUnit:t.sizeUnit,minSize:t.minSize,minSizeUnit:t.minSizeUnit,id:t.id,maximised:t.maximised,isClosable:t.isClosable,activeItemIndex:0,header:void 0}),this.createContentItemFromConfig(t,e)}findFirstComponentItemById(t){if(void 0===this._groundItem)throw new et("LMFFCIBI82446");return this.findFirstContentItemTypeByIdRecursive(ht.component,t,this._groundItem)}createPopout(t,e,n,i){return t instanceof qt?this.createPopoutFromContentItem(t,e,n,i):this.createPopoutFromItemConfig(t,e,n,i)}createPopoutFromContentItem(t,e,n,i){let o=t.parent,r=t;for(;null!==o&&1===o.contentItems.length&&!o.isGround;)r=o,o=o.parent;if(null===o)throw new tt("LMCPFCI00834");{if(void 0===i&&(i=o.contentItems.indexOf(r)),null!==n&&o.addPopInParentId(n),void 0===e){const n=globalThis.screenX||globalThis.screenLeft,i=globalThis.screenY||globalThis.screenTop,o=t.element.offsetLeft,r=t.element.offsetTop,{width:s,height:a}=Bt(t.element);e={left:n+o,top:i+r,width:s,height:a}}const s=t.toConfig();if(t.remove(),vt.isRootItemConfig(s))return this.createPopoutFromItemConfig(s,e,n,i);throw new Error(`${it[0]}`)}}beginVirtualSizedContainerAdding(){0==++this._virtualSizedContainerAddingBeginCount&&(this._virtualSizedContainers.length=0)}addVirtualSizedContainer(t){this._virtualSizedContainers.push(t)}endVirtualSizedContainerAdding(){if(0==--this._virtualSizedContainerAddingBeginCount){const t=this._virtualSizedContainers.length;if(t>0){this.fireBeforeVirtualRectingEvent(t);for(let e=0;ethis.emit("windowOpened",a))),a.on("closed",(()=>this.reconcilePopoutWindows())),this._openPopouts.push(a),this.layoutConfig.settings.closePopoutsOnUnload&&!this._windowBeforeUnloadListening&&(globalThis.addEventListener("beforeunload",this._windowBeforeUnloadListener,{passive:!0}),this._windowBeforeUnloadListening=!0),a}closeAllOpenPopouts(){for(let t=0;tglobalThis.close()),1)}getArea(t,e){let n=null,i=1/0;for(let o=0;o=r.x1&&t=r.y1&&er.surface&&(i=r.surface,n=r)}return n}calculateItemAreas(){const t=this.getAllContentItems(),e=this._groundItem;if(void 0===e)throw new et("LMCIAR44365");if(1!==t.length){e.contentItems[0].isStack?this._itemAreas=[]:this._itemAreas=e.createSideAreas();for(let e=0;e0){let e=t[0];if(qt.isComponentItem(e)){const t=e.parent;if(null===t)throw new tt("LMXLLMI69999");e=t}if(!qt.isStack(e))throw new X("LMCLLMI19993");e.maximise()}}}processMaximiseStack(t){if(this._maximisedStack=t,t.on("beforeItemDestroyed",this._maximisedStackBeforeDestroyedListener),t.element.classList.add("lm_maximised"),t.element.insertAdjacentElement("afterend",this._maximisePlaceholder),void 0===this._groundItem)throw new et("LMMXI19993");{this._groundItem.element.prepend(t.element);const{width:e,height:n}=Bt(this._containerElement);kt(t.element,e),jt(t.element,n),t.updateSize(!0),t.focusActiveContentItem(),this._maximisedStack.emit("maximised"),this.emit("stateChanged")}}processMinimiseMaximisedStack(){if(void 0===this._maximisedStack)throw new X("LMMMS74422");{const t=this._maximisedStack;if(null===t.parent)throw new tt("LMMI13668");t.element.classList.remove("lm_maximised"),this._maximisePlaceholder.insertAdjacentElement("afterend",t.element),this._maximisePlaceholder.remove(),this.updateRootSize(!0),this._maximisedStack=void 0,t.off("beforeItemDestroyed",this._maximisedStackBeforeDestroyedListener),t.emit("minimised"),this.emit("stateChanged")}}reconcilePopoutWindows(){const t=[];for(let e=0;e{this._resizeTimeoutId=void 0,this.beginSizeInvalidation(),this.endSizeInvalidation()}),this.resizeDebounceInterval))}checkClearResizeTimeout(){void 0!==this._resizeTimeoutId&&(clearTimeout(this._resizeTimeoutId),this._resizeTimeoutId=void 0)}setContainer(){var t;const e=document.body,n=null!==(t=this._containerElement)&&void 0!==t?t:e;if(n===e){this.resizeWithContainerAutomatically=!0;const t=document.documentElement;t.style.height="100%",t.style.margin="0",t.style.padding="0",t.style.overflow="clip",e.style.height="100%",e.style.margin="0",e.style.padding="0",e.style.overflow="clip"}this._containerElement=n}onBeforeUnload(){this.destroy()}adjustColumnsResponsive(){if(void 0===this._groundItem)throw new et("LMACR20883");if(this._firstLoad=!1,this.useResponsiveLayout()&&!this._updatingColumnsResponsive&&this._groundItem.contentItems.length>0&&this._groundItem.contentItems[0].isRow){if(void 0===this._groundItem||null===this._width)throw new et("LMACR77412");{const t=this._groundItem.contentItems[0].contentItems.length;if(t<=1)return;{const e=this.layoutConfig.dimensions.defaultMinItemWidth;if(t*e<=this._width)return;{this._updatingColumnsResponsive=!0;const n=t-Math.max(Math.floor(this._width/e),1),i=this._groundItem.contentItems[0],o=this.getAllStacks();if(0===o.length)throw new X("LMACRS77413");{const t=o[0];for(let e=0;ei?void 0:{parentItem:t,index:o}}}case 1:if(void 0===this._focusedComponentItem)return;{const t=this._focusedComponentItem.parentItem;return this.tryCreateLocationFromParentItem(t,e)}case 2:{const t=this.findFirstContentItemType(ht.stack);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 3:{let t=this.findFirstContentItemType(ht.row);return void 0!==t?this.tryCreateLocationFromParentItem(t,e):(t=this.findFirstContentItemType(ht.column),void 0!==t?this.tryCreateLocationFromParentItem(t,e):void 0)}case 4:{const t=this.findFirstContentItemType(ht.row);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 5:{const t=this.findFirstContentItemType(ht.column);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 6:if(void 0===this._groundItem)throw new et("LMFLRIF18244");return void 0!==this.rootItem?void 0:void 0===e||0===e?{parentItem:this._groundItem,index:0}:void 0;case 7:if(void 0===this._groundItem)throw new et("LMFLF18244");{const t=this._groundItem.contentItems;if(0===t.length)return void 0===e||0===e?{parentItem:this._groundItem,index:0}:void 0;{const n=t[0];return this.tryCreateLocationFromParentItem(n,e)}}}}tryCreateLocationFromParentItem(t,e){const n=t.contentItems.length;return void 0===e?{parentItem:t,index:n}:e<0||e>n?void 0:{parentItem:t,index:e}}}!function(t){t.createMaximisePlaceElement=function(t){const e=t.createElement("div");return e.classList.add("lm_maximise_place"),e},t.createTabDropPlaceholderElement=function(t){const e=t.createElement("div");return e.classList.add("lm_drop_tab_placeholder"),e},t.defaultLocationSelectors=[{typeId:1,index:void 0},{typeId:2,index:void 0},{typeId:3,index:void 0},{typeId:7,index:void 0}],t.afterFocusedItemIfPossibleLocationSelectors=[{typeId:0,index:1},{typeId:2,index:void 0},{typeId:3,index:void 0},{typeId:7,index:void 0}]}(he||(he={}));class le extends he{constructor(t,e,n,i){if(super(le.createLayoutManagerConstructorParameters(t,e)),this._bindComponentEventHanlderPassedInConstructor=!1,this._creationTimeoutPassed=!1,void 0!==e&&"function"==typeof e&&(this.bindComponentEvent=e,this._bindComponentEventHanlderPassedInConstructor=!0,void 0!==n&&(this.unbindComponentEvent=n)),!this._bindComponentEventHanlderPassedInConstructor&&this.isSubWindow){if(void 0===this._constructorOrSubWindowLayoutConfig)throw new et("VLC98823");{const t=Mt.resolve(this._constructorOrSubWindowLayoutConfig);this.layoutConfig=Object.assign(Object.assign({},t),{root:void 0})}}!0!==i&&(this.deprecatedConstructor||this.init())}destroy(){this.bindComponentEvent=void 0,this.unbindComponentEvent=void 0,super.destroy()}init(){if(this._bindComponentEventHanlderPassedInConstructor||"loading"!==document.readyState&&null!==document.body){if(!this._bindComponentEventHanlderPassedInConstructor&&!0===this.isSubWindow&&!this._creationTimeoutPassed)return setTimeout((()=>this.init()),7),void(this._creationTimeoutPassed=!0);!0===this.isSubWindow&&(this._bindComponentEventHanlderPassedInConstructor||this.clearHtmlAndAdjustStylesForSubWindow(),window.__glInstance=this),super.init()}else document.addEventListener("DOMContentLoaded",(()=>this.init()),{passive:!0})}clearHtmlAndAdjustStylesForSubWindow(){const t=document.head,e=new Array(4);e[0]=document.querySelectorAll("body link"),e[1]=document.querySelectorAll("body style"),e[2]=document.querySelectorAll("template"),e[3]=document.querySelectorAll(".gl_keep");for(let n=0;nthis.emit("popIn"))),document.body.appendChild(t),!0}}bindComponent(t,e){if(void 0!==this.bindComponentEvent)return this.bindComponentEvent(t,e);if(void 0!==this.getComponentEvent)return{virtual:!1,component:this.getComponentEvent(t,e)};{const t=`${it[2]}: ${JSON.stringify(e)}`;throw new Z(t)}}unbindComponent(t,e,n){if(void 0!==this.unbindComponentEvent)this.unbindComponentEvent(t);else if(!e&&void 0!==this.releaseComponentEvent){if(void 0===n)throw new et("VCUCRCU333998");this.releaseComponentEvent(t,n)}}}!function(t){let e=!1;t.createLayoutManagerConstructorParameters=function(t,n){const i=e?null:new URL(document.location.href).searchParams.get("gl-window");e=!0;const o=null!==i;let r,s;if(null!==i){const e=localStorage.getItem(i);if(null===e)throw new Error("Null gl-window Config");localStorage.removeItem(i);const n=JSON.parse(e),o=bt.unminifyConfig(n);s=Mt.fromResolved(o),t instanceof HTMLElement&&(r=t)}else void 0===t?s=void 0:t instanceof HTMLElement?(s=void 0,r=t):s=t,void 0===r&&n instanceof HTMLElement&&(r=n);return{constructorOrSubWindowLayoutConfig:s,isSubWindow:o,containerElement:r}}}(le||(le={}));class ue extends le{constructor(t,e,n){super(t,e,n,!0),this._componentTypesMap=new Map,this._registeredComponentMap=new Map,this._virtuableComponentMap=new Map,this._containerVirtualRectingRequiredEventListener=(t,e,n)=>this.handleContainerVirtualRectingRequiredEvent(t,e,n),this._containerVirtualVisibilityChangeRequiredEventListener=(t,e)=>this.handleContainerVirtualVisibilityChangeRequiredEvent(t,e),this._containerVirtualZIndexChangeRequiredEventListener=(t,e,n)=>this.handleContainerVirtualZIndexChangeRequiredEvent(t,e,n),this.deprecatedConstructor||this.init()}registerComponent(t,e,n=!1){if("function"!=typeof e)throw new K("registerComponent() componentConstructorOrFactoryFtn parameter is not a function");if(e.hasOwnProperty("prototype")){const i=e;this.registerComponentConstructor(t,i,n)}else{const i=e;this.registerComponentFactoryFunction(t,i,n)}}registerComponentConstructor(t,e,n=!1){if("function"!=typeof e)throw new Error(it[1]);if(void 0!==this._componentTypesMap.get(t))throw new Z(`${it[3]}: ${t}`);this._componentTypesMap.set(t,{constructor:e,factoryFunction:void 0,virtual:n})}registerComponentFactoryFunction(t,e,n=!1){if("function"!=typeof e)throw new Z("Please register a constructor function");if(void 0!==this._componentTypesMap.get(t))throw new Z(`${it[3]}: ${t}`);this._componentTypesMap.set(t,{constructor:void 0,factoryFunction:e,virtual:n})}registerComponentFunction(t){this.registerGetComponentConstructorCallback(t)}registerGetComponentConstructorCallback(t){if("function"!=typeof t)throw new Error("Please register a callback function");void 0!==this._getComponentConstructorFtn&&console.warn("Multiple component functions are being registered. Only the final registered function will be used."),this._getComponentConstructorFtn=t}getRegisteredComponentTypeNames(){const t=this._componentTypesMap.keys();return Array.from(t)}getComponentInstantiator(t){let e;const n=yt.resolveComponentTypeName(t);return void 0!==n&&(e=this._componentTypesMap.get(n)),void 0===e&&void 0!==this._getComponentConstructorFtn&&(e={constructor:this._getComponentConstructorFtn(t),factoryFunction:void 0,virtual:!1}),e}bindComponent(t,e){let n;const i=yt.resolveComponentTypeName(e);let o;if(void 0!==i&&(n=this._componentTypesMap.get(i)),void 0===n&&void 0!==this._getComponentConstructorFtn&&(n={constructor:this._getComponentConstructorFtn(e),factoryFunction:void 0,virtual:!1}),void 0!==n){const r=n.virtual;let s,a;s=void 0===e.componentState?void 0:Dt({},e.componentState);const c=n.constructor;if(void 0!==c)a=new c(t,s,r);else{const e=n.factoryFunction;if(void 0===e)throw new X("LMBCFFU10008");a=e(t,s,r)}if(r){if(void 0===a)throw new et("GLBCVCU988774");{const e=a,n=e.rootHtmlElement;if(void 0===n)throw new Z(`${it[5]}: ${i}`);!function(t){const e="absolute";t.style.position!==e&&(t.style.position=e)}(n),this.container.appendChild(n),this._virtuableComponentMap.set(t,e),t.virtualRectingRequiredEvent=this._containerVirtualRectingRequiredEventListener,t.virtualVisibilityChangeRequiredEvent=this._containerVirtualVisibilityChangeRequiredEventListener,t.virtualZIndexChangeRequiredEvent=this._containerVirtualZIndexChangeRequiredEventListener}}this._registeredComponentMap.set(t,a),o={virtual:n.virtual,component:a}}else o=super.bindComponent(t,e);return o}unbindComponent(t,e,n){if(void 0===this._registeredComponentMap.get(t))super.unbindComponent(t,e,n);else{const e=this._virtuableComponentMap.get(t);if(void 0!==e){const n=e.rootHtmlElement;if(void 0===n)throw new X("GLUC77743",t.title);this.container.removeChild(n),this._virtuableComponentMap.delete(t)}}}fireBeforeVirtualRectingEvent(t){this._goldenLayoutBoundingClientRect=this.container.getBoundingClientRect(),super.fireBeforeVirtualRectingEvent(t)}handleContainerVirtualRectingRequiredEvent(t,e,n){const i=this._virtuableComponentMap.get(t);if(void 0===i)throw new et("GLHCSCE55933");{const o=i.rootHtmlElement;if(void 0===o)throw new Z(it[4]+" "+t.title);{const i=t.element.getBoundingClientRect(),r=i.left-this._goldenLayoutBoundingClientRect.left;o.style.left=Ot(r);const s=i.top-this._goldenLayoutBoundingClientRect.top;o.style.top=Ot(s),kt(o,e),jt(o,n)}}}handleContainerVirtualVisibilityChangeRequiredEvent(t,e){const n=this._virtuableComponentMap.get(t);if(void 0===n)throw new et("GLHCVVCRE55934");{const i=n.rootHtmlElement;if(void 0===i)throw new Z(it[4]+" "+t.title);zt(i,e)}}handleContainerVirtualZIndexChangeRequiredEvent(t,e,n){const i=this._virtuableComponentMap.get(t);if(void 0===i)throw new et("GLHCVZICRE55935");{const e=i.rootHtmlElement;if(void 0===e)throw new Z(it[4]+" "+t.title);e.style.zIndex=n}}}const pe="initial_",fe={show:"top",popout:!1,maximise:!1,close:"close-tab-unused"},me={headerHeight:31},we={hasHeaders:!0,reorderEnabled:!0},ye={popoutWholeStack:!1,constrainDragToContainer:!1,constrainDragToHeaders:!1,preventDragout:!1,showMaximiseIcon:!1,showPopoutIcon:!1,showCloseIcon:!1,blockedPopoutsThrowError:!0,closePopoutsOnUnload:!0,selectionEnabled:!1};var ge,ve;class Ce{constructor(t){this.layout=t,ge.set(this,void 0),ve.set(this,void 0),this.handleResize=t=>{t.forEach((t=>this.resizeElement(t.target)))},this.handleMutation=()=>{this.layout.viewComponentsByContainerElement.forEach((t=>{this.resizeElement(t.container.element)}))},i.__classPrivateFieldSet(this,ge,new ResizeObserver(this.handleResize),"f"),i.__classPrivateFieldSet(this,ve,new MutationObserver(this.handleMutation),"f")}observeMutations(t){i.__classPrivateFieldGet(this,ve,"f")?.observe(t,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["class"]})}destroy(){i.__classPrivateFieldGet(this,ge,"f").disconnect(),i.__classPrivateFieldGet(this,ve,"f").disconnect()}observeContainer(t){i.__classPrivateFieldGet(this,ge,"f").observe(t)}unobserveContainer(t){i.__classPrivateFieldGet(this,ge,"f").unobserve(t)}resizeElement(t){const e=this.layout.viewComponentsByContainerElement.get(t);e&&e.resize()}}ge=new WeakMap,ve=new WeakMap;var be={};Object.defineProperty(be,"__esModule",{value:!0});var _e=be.BaseItem=void 0;class Ie{constructor(t,e,n){this._item=t,this._layout=e,this._wrap=n}get raw(){return this._item}get layout(){return this._layout}get type(){return this._item.type}get contentItems(){return(this._item.contentItems??[]).map((t=>this._wrap(t)))}get parent(){const t=this._item.parent;return t?this._wrap(t):null}setActiveContentItem(t,e){if("stack"!==this.type)throw new Error(`Cannot call setActiveContentItem from a non-stack item: ${this.type}`);this._item.setActiveContentItem(t.raw,e)}static wrapInternal(t,e,n){const i=Ie.wrapCache.get(e);if(i)return i;const o=new t(e,n,(e=>Ie.wrapInternal(t,e,n)));return Ie.wrapCache.set(e,o),o}}_e=be.BaseItem=Ie,Ie.wrapCache=new WeakMap;const Ee=t=>!!t&&"contentItems"in t&&(t.isRow||t.isColumn);class xe extends _e{isRoot(){return!!this._item.parent?.isGround}getBounds(){return this._item.element.getBoundingClientRect()}get viewName(){if(this._item.isComponent){const{component:t}=this._item;return t.identity.name}throw new Error("View name not found")}onDestroyed(t){const e=({target:n})=>{n===this._item&&(t(),this._item.off("itemDestroyed",e))};this._item.on("itemDestroyed",e)}createAdjacentStack({position:t="right"}={}){const e=this.raw;if(oe.isStack(e)&&e.parent){const n=["top","bottom"].includes(t)?"column":"row",i=["left","top"].includes(t)?1:0,o=Ee(e.parent)?e.parent:e.layoutManager,r=o,s=e.parent.contentItems.indexOf(e);e.parent.isGround&&e.parent.removeChild(e,!0);const a=o.newItem({type:n,content:[{type:"stack",content:[]}]},s);if(!a)throw new Error("createAdjacentStack: Failed to create new container");const c=a.contentItems[0];return a.addChild(this.raw,i),Ee(r)&&r.removeChild(e,!0),this._wrap(c)}throw new Error(`Cannot creat adjacent stacks for type: ${e.type}, must be type 'stack'`)}setActiveContentItem(t,e=!0){if(!oe.isStack(this._item))throw new Error(`Cannot call setActiveContentItem from a non-stack item: ${this.type}`);this._item.setActiveComponentItem(t.raw,!e)}static wrap(t,e){return _e.wrapInternal(xe,t,e)}}function Se(t=[],e){for(const n of t)"component"===n.type?Object.keys(e).forEach((t=>{t in n&&(n.componentState={[`${pe}${t}`]:n[t],...n.componentState}),n[t]=e[t]})):Se(n.content,e)}function Ae(t=[],e,n){for(const i of t)"component"===i.type?Object.keys(e).forEach((t=>{if(`${pe}${t}`in i.componentState)return i[t]=i.componentState[`${pe}${t}`],void delete i.componentState[`${pe}${t}`];i[t]=e[t]})):(!i.size||"row"!==n&&"column"!==n||(i["row"===n?"width":"height"]=i.size?.includes(".")?parseFloat(i.size):parseInt(i.size)),Ae(i.content,e,i.type))}function Pe(t){if(t.root){t.root.content&&Ae([t.root],{componentName:"view",isClosable:!0});const e=t.root;t.content=[e],delete t.root}return t}class Me{static create(t){const e=document.createElement("of-view");return Object.entries(t).forEach((([t,n])=>{e.setAttribute(t,n)})),e}}customElements.define("of-view",(t=>class extends t{connectedCallback(){if(!this.name||!this.uuid)throw new Error(" Name or uuid attribute missing");if(!this.src)throw new Error(" missing 'src' attribute.");this.#t||(this.#t=document.createElement("iframe"),this.#t.src=this.src,this.#t.style.height="100%",this.#t.style.width="100%",this.#t.style.border="none",this.forceFrameName?this.#t.setAttribute("name",this.forceFrameName):this.#t.setAttribute("name",i.encodeOptions({brokerUrl:this.brokerUrl,name:this.name,uuid:this.uuid,providerId:this.providerId,contextGroup:this.contextGroup},"of-frame")),this.#t.setAttribute("id",this.name),this.appendChild(this.#t))}#t;get brokerUrl(){return this.getAttribute("of-broker")}set brokerUrl(t){t&&this.setAttribute("of-broker",t)}get name(){return this.getAttribute("of-name")}set name(t){t&&this.setAttribute("of-name",t)}get forceFrameName(){return this.getAttribute("forceFrameName")}set forceFrameName(t){t&&this.setAttribute("forceFrameName",t)}get uuid(){return this.getAttribute("of-uuid")}set uuid(t){t&&this.setAttribute("of-uuid",t)}get src(){return this.getAttribute("src")}set src(t){t&&this.setAttribute("src",t)}get providerId(){return this.getAttribute("of-provider-id")}set providerId(t){t&&this.setAttribute("of-provider-id",t)}get contextGroup(){return this.getAttribute("of-context-group")}set contextGroup(t){t&&this.setAttribute("of-context-group",t)}static get observedAttributes(){return["name"]}})(HTMLElement));class Le{constructor(t,e,n,{brokerUrl:i,interopConfig:r},s){this.container=t,this.config=e,this.ofView=null,this.isDragging=()=>this.container.tab.element?.className.includes("lm_dragging")??!1;const{url:a,web:c,interop:d,name:h}=e||{},l=h??`internal-generated-view-${o.v4()}`;if(this.identity={uuid:n,name:l},this.container.element.setAttribute("of-name",l),this.container.element.id=`container-${l}`,this.container.parent.id=l,void 0===a)return void this.handleUrlMissing();const u=this.updateTitleIfNotSet(a),p={"of-broker":i,"of-uuid":n,"of-name":l,src:a};c?.frameName&&(p.forceFrameName=c.frameName);const f=d?.currentContextGroup??r?.currentContextGroup;f&&(p["of-context-group"]=f),r?.providerId&&(p["of-provider-id"]=r?.providerId),this.ofView=Me.create(p),this.ofView.title=u??`Iframe: ${a}`,s.appendChild(this.ofView),this.ofView.style.position="absolute"}updateTitleIfNotSet(t){return"view"===this.container.parent.title&&this.container.parent.setTitle(t),this.container.parent.title}handleUrlMissing(){const t=document.createElement("div");t.setAttribute("style","padding: 20px"),t.innerText="No URL provided",this.container.element.appendChild(t)}destroy(){this.ofView?.remove(),this.ofView=null}closeView(){this.container.close()}resize(){if(this.ofView){if(this.isDragging())return void(this.ofView.style.display="none");const t=this.container.element.getBoundingClientRect();this.ofView.style.position="absolute",this.ofView.style.height=`${t.height}px`,this.ofView.style.width=`${t.width}px`,this.ofView.style.inset=`${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`,this.ofView.style.display="block"}}}class Oe extends D{static overrideConfig(t){const e={...we,...t.settings,...ye};return e.reorderEnabled?Se(t.content,{isClosable:!0}):Se(t.content,{reorderEnabled:!1}),{dimensions:me,...t,settings:e,header:{...fe,show:!1!==t.settings?.hasHeaders&&fe.show}}}constructor(t,e,n,{options:i},o,r){super(),this.identity=t,this.container=e,this.initialConfig=n,this.layoutManager=o,this.platformProvider=r,this.viewComponentsByContainerElement=new Map,this.layoutContentCache=b.getSingleInstance(),this.reparentingViews=new Set,this.goldenLayoutDestroyed=!1,this.createViewComponent=(t,e)=>{m.handleSharedView(this.layoutManager,this.identity,e);const n=new Le(t,e,this.identity.uuid,this.options,this.iframeContainer);return e&&!1===e[`${pe}isClosable`]&&this.stylesheet.insertRule(`#tab-${n.identity.name} .lm_close_tab { display: none; }`),this.viewComponentsByContainerElement.set(t.element,n),this.resizeController.observeContainer(t.element),n},this.iframeContainer=document.createElement("div"),this.iframeContainer.id=`openfin-layout-iframe-container-${this.identity.layoutName}`,this.domEmitter=new W(e),this.setupStylesheets(),this.layout=new ue(this.container),this.layout.resizeWithContainerAutomatically=!0,this.options=i,this.layout.registerComponent("view",this.createViewComponent),this.setupListeners(),this.resizeController=new Ce(this),this.layout.loadLayout(Oe.overrideConfig(n));const s=document.createElement("div");s.id=`openfin-layout-shadow-container-${this.identity.layoutName}`,s.attachShadow({mode:"open",delegatesFocus:!1}).appendChild(this.iframeContainer),this.container.appendChild(s),this.resizeController.observeMutations(this.container)}getStackByView({name:t}){const e=this.layout.findFirstComponentItemById(t);if(e?.parent&&e?.parent?.isStack)return xe.wrap(e.parent,this)}getRoot(){return xe.wrap(this.layout.rootItem,this)}async platformCloseView(t){const e=[...this.viewComponentsByContainerElement.values()].find((e=>e.identity.name===t.name));if(!e)throw new Error(`View with name: ${t.name} not found in layout.`);e.closeView()}async platformCreateView(t,{location:e,targetView:n}={}){if(n)throw new Error("TargetView not supported in web");const i={options:this.platformProvider.normalizeOptions(t),target:this.identity,location:e};return this.insertView(i)}setupStylesheets(){if(this.container.setAttribute("data-openfin-layout-name",this.identity.layoutName),this.stylesheet=new CSSStyleSheet,this.stylesheet.insertRule(".lm_close { display: none; }"),document.adoptedStyleSheets.push(this.stylesheet),this.initialConfig.settings?.preventSplitterResize){const t=`\n [data-openfin-layout-name='${this.identity.layoutName}'] .lm_splitter {\n pointer-events: none;\n }`;this.stylesheet.insertRule(t)}}insertView({options:t,location:e,targetView:n}){const i=e?this.layoutContentCache.getItemOrUndefined(e.id):void 0,o=n?this.layoutContentCache.getItemOrUndefined(n.name):void 0,r=i??o??xe.wrap(this.layout.rootItem,this);let s;if(oe.isStack(r.raw))s=r.raw;else{if(!Ee(r.raw))throw new Error("Cannot add a view at the requested location");s=r.raw.newItem({type:"stack",content:[]})}const a=Math.min(s.contentItems.length,e?.index??s.contentItems.length);let c=this.layout.findFirstComponentItemById(t.name);c?(c.parent&&c.parent.removeChild(c,!0),s.addChild(c,a)):c=s.newComponent("view",t,t.title??t.url??"Default Title",a);const d=c.component.identity;return Promise.resolve({identity:d})}replaceView({viewToReplace:t,newView:e}){throw new Error("Method not implemented.")}replaceLayout(t){throw new Error("Method not implemented.")}async cleanupView(t){}applyPreset(t){throw new Error("Method not implemented.")}getCurrentViews(){return[...this.viewComponentsByContainerElement.values()].map((t=>t.identity))}async getFrameSnapshot(){return Pe(Mt.fromResolved(this.layout.toConfig()))}isVisible(){return H(this.container)}async onViewDetached({viewIdentity:t}){this.reparentingViews.add(t.name),this.platformCloseView(t)}async destroy(){this.goldenLayoutDestroyed||(this.goldenLayoutDestroyed=!0,this.layout.destroy()),this.iframeContainer.remove(),this.resizeController.destroy(),document.adoptedStyleSheets=document.adoptedStyleSheets.filter((t=>t!==this.stylesheet)),this.viewComponentsByContainerElement.clear()}setupListeners(){this.container.addEventListener("pointerdown",(t=>{if(t.target instanceof HTMLElement){const e=t.target.classList;["lm_tab","lm_title","lm_splitter","lm_drag_handle"].some((t=>e.contains(t)))&&(this.handleDragStart(),2===t.button&&t.stopPropagation())}}),!0),document.addEventListener("pointerup",(()=>this.handleDragEnd()),!0),this.layout.on("tabCreated",(t=>{const e=t.componentItem.component;t.element.id=`tab-${e.identity.name}`,this.domEmitter.dispatchLocalEvent("tab-created",e.identity)})),this.layout.on("itemCreated",(({target:t})=>{const e=t;if(qt.isComponentItem(e)){const t=e.component;this.domEmitter.dispatchLocalEvent("container-created",t.identity)}})),this.layout.on("itemDestroyed",(t=>{const e=t.target;if(qt.isComponentItem(e)){const t=e.component;this.removeViewComponent(t)}})),this.layout.on("itemDropped",(()=>{this.handleDragEnd()}))}handleDragStart(){this.iframeContainer.style.pointerEvents="none"}handleDragEnd(){this.iframeContainer.style.pointerEvents=""}removeViewComponent(t){if(t.config&&!1===t.config[`${pe}isClosable`]){const e=[...this.stylesheet.cssRules].findIndex((e=>e.cssText.includes(`#tab-${t.identity.name}`)));this.stylesheet.deleteRule(e)}t.destroy(),this.viewComponentsByContainerElement.delete(t.container.element),this.resizeController.unobserveContainer(t.container.element),this.reparentingViews.has(t.identity.name)?this.reparentingViews.delete(t.identity.name):this.platformProvider.closeView(t.identity.name),0===this.getCurrentViews().length&&(this.goldenLayoutDestroyed||(this.goldenLayoutDestroyed=!0,m.handleLastViewRemoved(this.layoutManager,this.identity)))}}class Re{constructor(t,e,n,i){this.windowIdentity=t,this.connectConfig=e,this.provider=n,this.fallbackContainer=i}async createLayout(t,e){if(!("container"in t)&&!this.fallbackContainer)throw new Error("Container property is not optional in web");const{layoutName:n}=t,i=t,o=this.provider.initLayoutViews(i),r=i.container??this.fallbackContainer,s={...this.windowIdentity,layoutName:n},a=new Oe(s,r,o,this.connectConfig,e,this.provider);m.registerLayout(e,n,a),this.fallbackContainer=null}async getLayoutSnapshot(t){return t.getLayoutSnapshot()}async handleLastViewRemoved(t){}}class Te{static async init(t){const e=t.getFin().InterApplicationBus.Channel,n=await e.create(`custom-frame-${t.me.uuid}`);return n.setDefaultAction((async(t,{target:e,opts:i},o)=>{const r=n.connections.find((t=>t.name===e.name));if(r)return n.dispatch(r,t,{...i,target:e});throw new Error(`Client with name ${e.name} not found`)})),await i.relayChannelClientApi_1(n,"layout-relay"),new Te(t)}constructor(t){this.wire=t,this.viewNames=new Set}normalizeOptions(t,e="default"){const n=this.wire.me.uuid;let{name:i=`internal-generated-view-${o.v4()}`}=t;return i.match(/^internal-generated-view-/)&&this.viewNames.has(i)&&"duplicate"===e&&(i=`internal-generated-view-${o.v4()}`),this.viewNames.add(i),{...t,name:i,uuid:n}}closeView(t){this.viewNames.delete(t)}initLayoutViews({layout:t,multiInstanceViewBehavior:e}){return V((t=>{if("component"===t.type&&t.componentState){const n=this.normalizeOptions(t.componentState,e);return{...t,componentState:n}}return t}),t)}}var ke;const je=t=>t;ke=new WeakMap,e.WebLayoutEntryPoint=class{constructor(t){ke.set(this,void 0),this.initLayoutManager=async(t,e,{container:n,layoutManagerOverride:o})=>{const r=await Te.init(e),s=o??je,a=new Re(e.me,i.__classPrivateFieldGet(this,ke,"f"),r,n),c=new(s(m.createClosedConstructor(a)));return await R(e,c),c},this.applyLayoutSnapshot=async(t,e,n)=>{await e.applyLayoutSnapshot(i.__classPrivateFieldGet(this,ke,"f").platform.layoutSnapshot)},this.createLayout=async(t,e)=>m.createLayout(t,e),this.destroyLayout=async(t,e)=>m.destroyLayout(t,e),i.__classPrivateFieldSet(this,ke,t,"f")}}},7991:(t,e)=>{e.byteLength=function(t){var e=a(t),n=e[0],i=e[1];return 3*(n+i)/4-i},e.toByteArray=function(t){var e,n,r=a(t),s=r[0],c=r[1],d=new o(function(t,e,n){return 3*(e+n)/4-n}(0,s,c)),h=0,l=c>0?s-4:s;for(n=0;n>16&255,d[h++]=e>>8&255,d[h++]=255&e;return 2===c&&(e=i[t.charCodeAt(n)]<<2|i[t.charCodeAt(n+1)]>>4,d[h++]=255&e),1===c&&(e=i[t.charCodeAt(n)]<<10|i[t.charCodeAt(n+1)]<<4|i[t.charCodeAt(n+2)]>>2,d[h++]=e>>8&255,d[h++]=255&e),d},e.fromByteArray=function(t){for(var e,i=t.length,o=i%3,r=[],s=16383,a=0,d=i-o;ad?d:a+s));return 1===o?(e=t[i-1],r.push(n[e>>2]+n[e<<4&63]+"==")):2===o&&(e=(t[i-2]<<8)+t[i-1],r.push(n[e>>10]+n[e>>4&63]+n[e<<2&63]+"=")),r.join("")};for(var n=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0;s<64;++s)n[s]=r[s],i[r.charCodeAt(s)]=s;function a(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");return-1===n&&(n=e),[n,n===e?0:4-n%4]}function c(t,e,i){for(var o,r,s=[],a=e;a>18&63]+n[r>>12&63]+n[r>>6&63]+n[63&r]);return s.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},1048:(t,e,n)=>{const i=n(7991),o=n(9318),r="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=c,e.SlowBuffer=function(t){return+t!=t&&(t=0),c.alloc(+t)},e.INSPECT_MAX_BYTES=50;const s=2147483647;function a(t){if(t>s)throw new RangeError('The value "'+t+'" is invalid for option "size"');const e=new Uint8Array(t);return Object.setPrototypeOf(e,c.prototype),e}function c(t,e,n){if("number"==typeof t){if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return l(t)}return d(t,e,n)}function d(t,e,n){if("string"==typeof t)return function(t,e){if("string"==typeof e&&""!==e||(e="utf8"),!c.isEncoding(e))throw new TypeError("Unknown encoding: "+e);const n=0|m(t,e);let i=a(n);const o=i.write(t,e);return o!==n&&(i=i.slice(0,o)),i}(t,e);if(ArrayBuffer.isView(t))return function(t){if(K(t,Uint8Array)){const e=new Uint8Array(t);return p(e.buffer,e.byteOffset,e.byteLength)}return u(t)}(t);if(null==t)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(K(t,ArrayBuffer)||t&&K(t.buffer,ArrayBuffer))return p(t,e,n);if("undefined"!=typeof SharedArrayBuffer&&(K(t,SharedArrayBuffer)||t&&K(t.buffer,SharedArrayBuffer)))return p(t,e,n);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');const i=t.valueOf&&t.valueOf();if(null!=i&&i!==t)return c.from(i,e,n);const o=function(t){if(c.isBuffer(t)){const e=0|f(t.length),n=a(e);return 0===n.length||t.copy(n,0,0,e),n}return void 0!==t.length?"number"!=typeof t.length||Z(t.length)?a(0):u(t):"Buffer"===t.type&&Array.isArray(t.data)?u(t.data):void 0}(t);if(o)return o;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return c.from(t[Symbol.toPrimitive]("string"),e,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function h(t){if("number"!=typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function l(t){return h(t),a(t<0?0:0|f(t))}function u(t){const e=t.length<0?0:0|f(t.length),n=a(e);for(let i=0;i=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return 0|t}function m(t,e){if(c.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||K(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);const n=t.length,i=arguments.length>2&&!0===arguments[2];if(!i&&0===n)return 0;let o=!1;for(;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return G(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return q(t).length;default:if(o)return i?-1:G(t).length;e=(""+e).toLowerCase(),o=!0}}function w(t,e,n){let i=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return L(this,e,n);case"utf8":case"utf-8":return S(this,e,n);case"ascii":return P(this,e,n);case"latin1":case"binary":return M(this,e,n);case"base64":return x(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,e,n);default:if(i)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),i=!0}}function y(t,e,n){const i=t[e];t[e]=t[n],t[n]=i}function g(t,e,n,i,o){if(0===t.length)return-1;if("string"==typeof n?(i=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),Z(n=+n)&&(n=o?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(o)return-1;n=t.length-1}else if(n<0){if(!o)return-1;n=0}if("string"==typeof e&&(e=c.from(e,i)),c.isBuffer(e))return 0===e.length?-1:v(t,e,n,i,o);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(t,e,n):Uint8Array.prototype.lastIndexOf.call(t,e,n):v(t,[e],n,i,o);throw new TypeError("val must be string, number or Buffer")}function v(t,e,n,i,o){let r,s=1,a=t.length,c=e.length;if(void 0!==i&&("ucs2"===(i=String(i).toLowerCase())||"ucs-2"===i||"utf16le"===i||"utf-16le"===i)){if(t.length<2||e.length<2)return-1;s=2,a/=2,c/=2,n/=2}function d(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(o){let i=-1;for(r=n;ra&&(n=a-c),r=n;r>=0;r--){let n=!0;for(let i=0;io&&(i=o):i=o;const r=e.length;let s;for(i>r/2&&(i=r/2),s=0;s>8,o=n%256,r.push(o),r.push(i);return r}(e,t.length-n),t,n,i)}function x(t,e,n){return 0===e&&n===t.length?i.fromByteArray(t):i.fromByteArray(t.slice(e,n))}function S(t,e,n){n=Math.min(t.length,n);const i=[];let o=e;for(;o239?4:e>223?3:e>191?2:1;if(o+s<=n){let n,i,a,c;switch(s){case 1:e<128&&(r=e);break;case 2:n=t[o+1],128==(192&n)&&(c=(31&e)<<6|63&n,c>127&&(r=c));break;case 3:n=t[o+1],i=t[o+2],128==(192&n)&&128==(192&i)&&(c=(15&e)<<12|(63&n)<<6|63&i,c>2047&&(c<55296||c>57343)&&(r=c));break;case 4:n=t[o+1],i=t[o+2],a=t[o+3],128==(192&n)&&128==(192&i)&&128==(192&a)&&(c=(15&e)<<18|(63&n)<<12|(63&i)<<6|63&a,c>65535&&c<1114112&&(r=c))}}null===r?(r=65533,s=1):r>65535&&(r-=65536,i.push(r>>>10&1023|55296),r=56320|1023&r),i.push(r),o+=s}return function(t){const e=t.length;if(e<=A)return String.fromCharCode.apply(String,t);let n="",i=0;for(;ii.length?(c.isBuffer(e)||(e=c.from(e)),e.copy(i,o)):Uint8Array.prototype.set.call(i,e,o);else{if(!c.isBuffer(e))throw new TypeError('"list" argument must be an Array of Buffers');e.copy(i,o)}o+=e.length}return i},c.byteLength=m,c.prototype._isBuffer=!0,c.prototype.swap16=function(){const t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let e=0;en&&(t+=" ... "),""},r&&(c.prototype[r]=c.prototype.inspect),c.prototype.compare=function(t,e,n,i,o){if(K(t,Uint8Array)&&(t=c.from(t,t.offset,t.byteLength)),!c.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&&(e=0),void 0===n&&(n=t?t.length:0),void 0===i&&(i=0),void 0===o&&(o=this.length),e<0||n>t.length||i<0||o>this.length)throw new RangeError("out of range index");if(i>=o&&e>=n)return 0;if(i>=o)return-1;if(e>=n)return 1;if(this===t)return 0;let r=(o>>>=0)-(i>>>=0),s=(n>>>=0)-(e>>>=0);const a=Math.min(r,s),d=this.slice(i,o),h=t.slice(e,n);for(let t=0;t>>=0,isFinite(n)?(n>>>=0,void 0===i&&(i="utf8")):(i=n,n=void 0)}const o=this.length-e;if((void 0===n||n>o)&&(n=o),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");let r=!1;for(;;)switch(i){case"hex":return C(this,t,e,n);case"utf8":case"utf-8":return b(this,t,e,n);case"ascii":case"latin1":case"binary":return _(this,t,e,n);case"base64":return I(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,t,e,n);default:if(r)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),r=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const A=4096;function P(t,e,n){let i="";n=Math.min(t.length,n);for(let o=e;oi)&&(n=i);let o="";for(let i=e;in)throw new RangeError("Trying to access beyond buffer length")}function T(t,e,n,i,o,r){if(!c.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>o||et.length)throw new RangeError("Index out of range")}function k(t,e,n,i,o){$(e,i,o,t,n,7);let r=Number(e&BigInt(4294967295));t[n++]=r,r>>=8,t[n++]=r,r>>=8,t[n++]=r,r>>=8,t[n++]=r;let s=Number(e>>BigInt(32)&BigInt(4294967295));return t[n++]=s,s>>=8,t[n++]=s,s>>=8,t[n++]=s,s>>=8,t[n++]=s,n}function j(t,e,n,i,o){$(e,i,o,t,n,7);let r=Number(e&BigInt(4294967295));t[n+7]=r,r>>=8,t[n+6]=r,r>>=8,t[n+5]=r,r>>=8,t[n+4]=r;let s=Number(e>>BigInt(32)&BigInt(4294967295));return t[n+3]=s,s>>=8,t[n+2]=s,s>>=8,t[n+1]=s,s>>=8,t[n]=s,n+8}function B(t,e,n,i,o,r){if(n+i>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function z(t,e,n,i,r){return e=+e,n>>>=0,r||B(t,0,n,4),o.write(t,e,n,i,23,4),n+4}function F(t,e,n,i,r){return e=+e,n>>>=0,r||B(t,0,n,8),o.write(t,e,n,i,52,8),n+8}c.prototype.slice=function(t,e){const n=this.length;(t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(e=void 0===e?n:~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),e>>=0,e>>>=0,n||R(t,e,this.length);let i=this[t],o=1,r=0;for(;++r>>=0,e>>>=0,n||R(t,e,this.length);let i=this[t+--e],o=1;for(;e>0&&(o*=256);)i+=this[t+--e]*o;return i},c.prototype.readUint8=c.prototype.readUInt8=function(t,e){return t>>>=0,e||R(t,1,this.length),this[t]},c.prototype.readUint16LE=c.prototype.readUInt16LE=function(t,e){return t>>>=0,e||R(t,2,this.length),this[t]|this[t+1]<<8},c.prototype.readUint16BE=c.prototype.readUInt16BE=function(t,e){return t>>>=0,e||R(t,2,this.length),this[t]<<8|this[t+1]},c.prototype.readUint32LE=c.prototype.readUInt32LE=function(t,e){return t>>>=0,e||R(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},c.prototype.readUint32BE=c.prototype.readUInt32BE=function(t,e){return t>>>=0,e||R(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},c.prototype.readBigUInt64LE=X((function(t){V(t>>>=0,"offset");const e=this[t],n=this[t+7];void 0!==e&&void 0!==n||H(t,this.length-8);const i=e+256*this[++t]+65536*this[++t]+this[++t]*2**24,o=this[++t]+256*this[++t]+65536*this[++t]+n*2**24;return BigInt(i)+(BigInt(o)<>>=0,"offset");const e=this[t],n=this[t+7];void 0!==e&&void 0!==n||H(t,this.length-8);const i=e*2**24+65536*this[++t]+256*this[++t]+this[++t],o=this[++t]*2**24+65536*this[++t]+256*this[++t]+n;return(BigInt(i)<>>=0,e>>>=0,n||R(t,e,this.length);let i=this[t],o=1,r=0;for(;++r=o&&(i-=Math.pow(2,8*e)),i},c.prototype.readIntBE=function(t,e,n){t>>>=0,e>>>=0,n||R(t,e,this.length);let i=e,o=1,r=this[t+--i];for(;i>0&&(o*=256);)r+=this[t+--i]*o;return o*=128,r>=o&&(r-=Math.pow(2,8*e)),r},c.prototype.readInt8=function(t,e){return t>>>=0,e||R(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},c.prototype.readInt16LE=function(t,e){t>>>=0,e||R(t,2,this.length);const n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt16BE=function(t,e){t>>>=0,e||R(t,2,this.length);const n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt32LE=function(t,e){return t>>>=0,e||R(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},c.prototype.readInt32BE=function(t,e){return t>>>=0,e||R(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},c.prototype.readBigInt64LE=X((function(t){V(t>>>=0,"offset");const e=this[t],n=this[t+7];void 0!==e&&void 0!==n||H(t,this.length-8);const i=this[t+4]+256*this[t+5]+65536*this[t+6]+(n<<24);return(BigInt(i)<>>=0,"offset");const e=this[t],n=this[t+7];void 0!==e&&void 0!==n||H(t,this.length-8);const i=(e<<24)+65536*this[++t]+256*this[++t]+this[++t];return(BigInt(i)<>>=0,e||R(t,4,this.length),o.read(this,t,!0,23,4)},c.prototype.readFloatBE=function(t,e){return t>>>=0,e||R(t,4,this.length),o.read(this,t,!1,23,4)},c.prototype.readDoubleLE=function(t,e){return t>>>=0,e||R(t,8,this.length),o.read(this,t,!0,52,8)},c.prototype.readDoubleBE=function(t,e){return t>>>=0,e||R(t,8,this.length),o.read(this,t,!1,52,8)},c.prototype.writeUintLE=c.prototype.writeUIntLE=function(t,e,n,i){t=+t,e>>>=0,n>>>=0,i||T(this,t,e,n,Math.pow(2,8*n)-1,0);let o=1,r=0;for(this[e]=255&t;++r>>=0,n>>>=0,i||T(this,t,e,n,Math.pow(2,8*n)-1,0);let o=n-1,r=1;for(this[e+o]=255&t;--o>=0&&(r*=256);)this[e+o]=t/r&255;return e+n},c.prototype.writeUint8=c.prototype.writeUInt8=function(t,e,n){return t=+t,e>>>=0,n||T(this,t,e,1,255,0),this[e]=255&t,e+1},c.prototype.writeUint16LE=c.prototype.writeUInt16LE=function(t,e,n){return t=+t,e>>>=0,n||T(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},c.prototype.writeUint16BE=c.prototype.writeUInt16BE=function(t,e,n){return t=+t,e>>>=0,n||T(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},c.prototype.writeUint32LE=c.prototype.writeUInt32LE=function(t,e,n){return t=+t,e>>>=0,n||T(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},c.prototype.writeUint32BE=c.prototype.writeUInt32BE=function(t,e,n){return t=+t,e>>>=0,n||T(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},c.prototype.writeBigUInt64LE=X((function(t,e=0){return k(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))})),c.prototype.writeBigUInt64BE=X((function(t,e=0){return j(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))})),c.prototype.writeIntLE=function(t,e,n,i){if(t=+t,e>>>=0,!i){const i=Math.pow(2,8*n-1);T(this,t,e,n,i-1,-i)}let o=0,r=1,s=0;for(this[e]=255&t;++o>>=0,!i){const i=Math.pow(2,8*n-1);T(this,t,e,n,i-1,-i)}let o=n-1,r=1,s=0;for(this[e+o]=255&t;--o>=0&&(r*=256);)t<0&&0===s&&0!==this[e+o+1]&&(s=1),this[e+o]=(t/r|0)-s&255;return e+n},c.prototype.writeInt8=function(t,e,n){return t=+t,e>>>=0,n||T(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},c.prototype.writeInt16LE=function(t,e,n){return t=+t,e>>>=0,n||T(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},c.prototype.writeInt16BE=function(t,e,n){return t=+t,e>>>=0,n||T(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},c.prototype.writeInt32LE=function(t,e,n){return t=+t,e>>>=0,n||T(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},c.prototype.writeInt32BE=function(t,e,n){return t=+t,e>>>=0,n||T(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},c.prototype.writeBigInt64LE=X((function(t,e=0){return k(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),c.prototype.writeBigInt64BE=X((function(t,e=0){return j(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),c.prototype.writeFloatLE=function(t,e,n){return z(this,t,e,!0,n)},c.prototype.writeFloatBE=function(t,e,n){return z(this,t,e,!1,n)},c.prototype.writeDoubleLE=function(t,e,n){return F(this,t,e,!0,n)},c.prototype.writeDoubleBE=function(t,e,n){return F(this,t,e,!1,n)},c.prototype.copy=function(t,e,n,i){if(!c.isBuffer(t))throw new TypeError("argument should be a Buffer");if(n||(n=0),i||0===i||(i=this.length),e>=t.length&&(e=t.length),e||(e=0),i>0&&i=this.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),t.length-e>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"==typeof t)for(o=e;o=i+4;n-=3)e=`_${t.slice(n-3,n)}${e}`;return`${t.slice(0,n)}${e}`}function $(t,e,n,i,o,r){if(t>n||t3?0===e||e===BigInt(0)?`>= 0${i} and < 2${i} ** ${8*(r+1)}${i}`:`>= -(2${i} ** ${8*(r+1)-1}${i}) and < 2 ** ${8*(r+1)-1}${i}`:`>= ${e}${i} and <= ${n}${i}`,new D.ERR_OUT_OF_RANGE("value",o,t)}!function(t,e,n){V(e,"offset"),void 0!==t[e]&&void 0!==t[e+n]||H(e,t.length-(n+1))}(i,o,r)}function V(t,e){if("number"!=typeof t)throw new D.ERR_INVALID_ARG_TYPE(e,"number",t)}function H(t,e,n){if(Math.floor(t)!==t)throw V(t,n),new D.ERR_OUT_OF_RANGE(n||"offset","an integer",t);if(e<0)throw new D.ERR_BUFFER_OUT_OF_BOUNDS;throw new D.ERR_OUT_OF_RANGE(n||"offset",`>= ${n?1:0} and <= ${e}`,t)}U("ERR_BUFFER_OUT_OF_BOUNDS",(function(t){return t?`${t} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),U("ERR_INVALID_ARG_TYPE",(function(t,e){return`The "${t}" argument must be of type number. Received type ${typeof e}`}),TypeError),U("ERR_OUT_OF_RANGE",(function(t,e,n){let i=`The value of "${t}" is out of range.`,o=n;return Number.isInteger(n)&&Math.abs(n)>2**32?o=W(String(n)):"bigint"==typeof n&&(o=String(n),(n>BigInt(2)**BigInt(32)||n<-(BigInt(2)**BigInt(32)))&&(o=W(o)),o+="n"),i+=` It must be ${e}. Received ${o}`,i}),RangeError);const N=/[^+/0-9A-Za-z-_]/g;function G(t,e){let n;e=e||1/0;const i=t.length;let o=null;const r=[];for(let s=0;s55295&&n<57344){if(!o){if(n>56319){(e-=3)>-1&&r.push(239,191,189);continue}if(s+1===i){(e-=3)>-1&&r.push(239,191,189);continue}o=n;continue}if(n<56320){(e-=3)>-1&&r.push(239,191,189),o=n;continue}n=65536+(o-55296<<10|n-56320)}else o&&(e-=3)>-1&&r.push(239,191,189);if(o=null,n<128){if((e-=1)<0)break;r.push(n)}else if(n<2048){if((e-=2)<0)break;r.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;r.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;r.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return r}function q(t){return i.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(N,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function Y(t,e,n,i){let o;for(o=0;o=e.length||o>=t.length);++o)e[o+n]=t[o];return o}function K(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function Z(t){return t!=t}const J=function(){const t="0123456789abcdef",e=new Array(256);for(let n=0;n<16;++n){const i=16*n;for(let o=0;o<16;++o)e[i+o]=t[n]+t[o]}return e}();function X(t){return"undefined"==typeof BigInt?Q:t}function Q(){throw new Error("BigInt not supported")}},46:t=>{var e,n="object"==typeof Reflect?Reflect:null,i=n&&"function"==typeof n.apply?n.apply:function(t,e,n){return Function.prototype.apply.call(t,e,n)};e=n&&"function"==typeof n.ownKeys?n.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)};var o=Number.isNaN||function(t){return t!=t};function r(){r.init.call(this)}t.exports=r,t.exports.once=function(t,e){return new Promise((function(n,i){function o(n){t.removeListener(e,r),i(n)}function r(){"function"==typeof t.removeListener&&t.removeListener("error",o),n([].slice.call(arguments))}m(t,e,r,{once:!0}),"error"!==e&&function(t,e){"function"==typeof t.on&&m(t,"error",e,{once:!0})}(t,o)}))},r.EventEmitter=r,r.prototype._events=void 0,r.prototype._eventsCount=0,r.prototype._maxListeners=void 0;var s=10;function a(t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}function c(t){return void 0===t._maxListeners?r.defaultMaxListeners:t._maxListeners}function d(t,e,n,i){var o,r,s,d;if(a(n),void 0===(r=t._events)?(r=t._events=Object.create(null),t._eventsCount=0):(void 0!==r.newListener&&(t.emit("newListener",e,n.listener?n.listener:n),r=t._events),s=r[e]),void 0===s)s=r[e]=n,++t._eventsCount;else if("function"==typeof s?s=r[e]=i?[n,s]:[s,n]:i?s.unshift(n):s.push(n),(o=c(t))>0&&s.length>o&&!s.warned){s.warned=!0;var h=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");h.name="MaxListenersExceededWarning",h.emitter=t,h.type=e,h.count=s.length,d=h,console&&console.warn&&console.warn(d)}return t}function h(){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 l(t,e,n){var i={fired:!1,wrapFn:void 0,target:t,type:e,listener:n},o=h.bind(i);return o.listener=n,i.wrapFn=o,o}function u(t,e,n){var i=t._events;if(void 0===i)return[];var o=i[e];return void 0===o?[]:"function"==typeof o?n?[o.listener||o]:[o]:n?function(t){for(var e=new Array(t.length),n=0;n0&&(s=e[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var c=r[t];if(void 0===c)return!1;if("function"==typeof c)i(c,this,e);else{var d=c.length,h=f(c,d);for(n=0;n=0;r--)if(n[r]===e||n[r].listener===e){s=n[r].listener,o=r;break}if(o<0)return this;0===o?n.shift():function(t,e){for(;e+1=0;i--)this.removeListener(t,e[i]);return this},r.prototype.listeners=function(t){return u(this,t,!0)},r.prototype.rawListeners=function(t){return u(this,t,!1)},r.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):p.call(t,e)},r.prototype.listenerCount=p,r.prototype.eventNames=function(){return this._eventsCount>0?e(this._events):[]}},9318:(t,e)=>{e.read=function(t,e,n,i,o){var r,s,a=8*o-i-1,c=(1<>1,h=-7,l=n?o-1:0,u=n?-1:1,p=t[e+l];for(l+=u,r=p&(1<<-h)-1,p>>=-h,h+=a;h>0;r=256*r+t[e+l],l+=u,h-=8);for(s=r&(1<<-h)-1,r>>=-h,h+=i;h>0;s=256*s+t[e+l],l+=u,h-=8);if(0===r)r=1-d;else{if(r===c)return s?NaN:1/0*(p?-1:1);s+=Math.pow(2,i),r-=d}return(p?-1:1)*s*Math.pow(2,r-i)},e.write=function(t,e,n,i,o,r){var s,a,c,d=8*r-o-1,h=(1<>1,u=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,p=i?0:r-1,f=i?1:-1,m=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=h):(s=Math.floor(Math.log(e)/Math.LN2),e*(c=Math.pow(2,-s))<1&&(s--,c*=2),(e+=s+l>=1?u/c:u*Math.pow(2,1-l))*c>=2&&(s++,c/=2),s+l>=h?(a=0,s=h):s+l>=1?(a=(e*c-1)*Math.pow(2,o),s+=l):(a=e*Math.pow(2,l-1)*Math.pow(2,o),s=0));o>=8;t[n+p]=255&a,p+=f,a/=256,o-=8);for(s=s<0;t[n+p]=255&s,p+=f,s/=256,d-=8);t[n+p-f]|=128*m}},3103:(t,e,n)=>{var i=n(4715)(n(8942),"DataView");t.exports=i},5098:(t,e,n)=>{var i=n(3305),o=n(9361),r=n(1112),s=n(5276),a=n(5071);function c(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e{var i=n(2393),o=n(2049),r=n(7144),s=n(7452),a=n(3964);function c(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e{var i=n(4715)(n(8942),"Map");t.exports=i},8250:(t,e,n)=>{var i=n(9753),o=n(5681),r=n(88),s=n(4732),a=n(9068);function c(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e{var i=n(4715)(n(8942),"Promise");t.exports=i},4512:(t,e,n)=>{var i=n(4715)(n(8942),"Set");t.exports=i},3212:(t,e,n)=>{var i=n(8250),o=n(1877),r=n(8006);function s(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new i;++e{var i=n(1386),o=n(4103),r=n(1779),s=n(4162),a=n(7462),c=n(6638);function d(t){var e=this.__data__=new i(t);this.size=e.size}d.prototype.clear=o,d.prototype.delete=r,d.prototype.get=s,d.prototype.has=a,d.prototype.set=c,t.exports=d},5650:(t,e,n)=>{var i=n(8942).Symbol;t.exports=i},1623:(t,e,n)=>{var i=n(8942).Uint8Array;t.exports=i},9270:(t,e,n)=>{var i=n(4715)(n(8942),"WeakMap");t.exports=i},9968:t=>{t.exports=function(t,e){for(var n=-1,i=null==t?0:t.length;++n{t.exports=function(t,e){for(var n=-1,i=null==t?0:t.length,o=0,r=[];++n{var i=n(6137),o=n(3283),r=n(3142),s=n(5853),a=n(9632),c=n(8666),d=Object.prototype.hasOwnProperty;t.exports=function(t,e){var n=r(t),h=!n&&o(t),l=!n&&!h&&s(t),u=!n&&!h&&!l&&c(t),p=n||h||l||u,f=p?i(t.length,String):[],m=f.length;for(var w in t)!e&&!d.call(t,w)||p&&("length"==w||l&&("offset"==w||"parent"==w)||u&&("buffer"==w||"byteLength"==w||"byteOffset"==w)||a(w,m))||f.push(w);return f}},1129:t=>{t.exports=function(t,e){for(var n=-1,i=e.length,o=t.length;++n{t.exports=function(t,e){for(var n=-1,i=null==t?0:t.length;++n{var i=n(7073),o=n(6285),r=Object.prototype.hasOwnProperty;t.exports=function(t,e,n){var s=t[e];r.call(t,e)&&o(s,n)&&(void 0!==n||e in t)||i(t,e,n)}},7034:(t,e,n)=>{var i=n(6285);t.exports=function(t,e){for(var n=t.length;n--;)if(i(t[n][0],e))return n;return-1}},7930:(t,e,n)=>{var i=n(9032),o=n(1211);t.exports=function(t,e){return t&&i(e,o(e),t)}},125:(t,e,n)=>{var i=n(9032),o=n(5288);t.exports=function(t,e){return t&&i(e,o(e),t)}},7073:(t,e,n)=>{var i=n(2532);t.exports=function(t,e,n){"__proto__"==e&&i?i(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}},9334:(t,e,n)=>{var i=n(1340),o=n(9968),r=n(3422),s=n(7930),a=n(125),c=n(7099),d=n(4354),h=n(3546),l=n(4733),u=n(393),p=n(3650),f=n(8486),m=n(7350),w=n(424),y=n(5964),g=n(3142),v=n(5853),C=n(7681),b=n(1580),_=n(3943),I=n(1211),E=n(5288),x="[object Arguments]",S="[object Function]",A="[object Object]",P={};P[x]=P["[object Array]"]=P["[object ArrayBuffer]"]=P["[object DataView]"]=P["[object Boolean]"]=P["[object Date]"]=P["[object Float32Array]"]=P["[object Float64Array]"]=P["[object Int8Array]"]=P["[object Int16Array]"]=P["[object Int32Array]"]=P["[object Map]"]=P["[object Number]"]=P[A]=P["[object RegExp]"]=P["[object Set]"]=P["[object String]"]=P["[object Symbol]"]=P["[object Uint8Array]"]=P["[object Uint8ClampedArray]"]=P["[object Uint16Array]"]=P["[object Uint32Array]"]=!0,P["[object Error]"]=P[S]=P["[object WeakMap]"]=!1,t.exports=function t(e,n,M,L,O,R){var T,k=1&n,j=2&n,B=4&n;if(M&&(T=O?M(e,L,O,R):M(e)),void 0!==T)return T;if(!b(e))return e;var z=g(e);if(z){if(T=m(e),!k)return d(e,T)}else{var F=f(e),D=F==S||"[object GeneratorFunction]"==F;if(v(e))return c(e,k);if(F==A||F==x||D&&!O){if(T=j||D?{}:y(e),!k)return j?l(e,a(T,e)):h(e,s(T,e))}else{if(!P[F])return O?e:{};T=w(e,F,k)}}R||(R=new i);var U=R.get(e);if(U)return U;R.set(e,T),_(e)?e.forEach((function(i){T.add(t(i,n,M,i,e,R))})):C(e)&&e.forEach((function(i,o){T.set(o,t(i,n,M,o,e,R))}));var W=z?void 0:(B?j?p:u:j?E:I)(e);return o(W||e,(function(i,o){W&&(i=e[o=i]),r(T,o,t(i,n,M,o,e,R))})),T}},9747:(t,e,n)=>{var i=n(1580),o=Object.create,r=function(){function t(){}return function(e){if(!i(e))return{};if(o)return o(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();t.exports=r},8244:(t,e,n)=>{var i=n(1129),o=n(3142);t.exports=function(t,e,n){var r=e(t);return o(t)?r:i(r,n(t))}},7379:(t,e,n)=>{var i=n(5650),o=n(8870),r=n(9005),s=i?i.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":s&&s in Object(t)?o(t):r(t)}},6027:(t,e,n)=>{var i=n(7379),o=n(547);t.exports=function(t){return o(t)&&"[object Arguments]"==i(t)}},4687:(t,e,n)=>{var i=n(353),o=n(547);t.exports=function t(e,n,r,s,a){return e===n||(null==e||null==n||!o(e)&&!o(n)?e!=e&&n!=n:i(e,n,r,s,t,a))}},353:(t,e,n)=>{var i=n(1340),o=n(3934),r=n(8861),s=n(1182),a=n(8486),c=n(3142),d=n(5853),h=n(8666),l="[object Arguments]",u="[object Array]",p="[object Object]",f=Object.prototype.hasOwnProperty;t.exports=function(t,e,n,m,w,y){var g=c(t),v=c(e),C=g?u:a(t),b=v?u:a(e),_=(C=C==l?p:C)==p,I=(b=b==l?p:b)==p,E=C==b;if(E&&d(t)){if(!d(e))return!1;g=!0,_=!1}if(E&&!_)return y||(y=new i),g||h(t)?o(t,e,n,m,w,y):r(t,e,C,n,m,w,y);if(!(1&n)){var x=_&&f.call(t,"__wrapped__"),S=I&&f.call(e,"__wrapped__");if(x||S){var A=x?t.value():t,P=S?e.value():e;return y||(y=new i),w(A,P,n,m,y)}}return!!E&&(y||(y=new i),s(t,e,n,m,w,y))}},777:(t,e,n)=>{var i=n(8486),o=n(547);t.exports=function(t){return o(t)&&"[object Map]"==i(t)}},9624:(t,e,n)=>{var i=n(3655),o=n(4759),r=n(1580),s=n(4066),a=/^\[object .+?Constructor\]$/,c=Function.prototype,d=Object.prototype,h=c.toString,l=d.hasOwnProperty,u=RegExp("^"+h.call(l).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=function(t){return!(!r(t)||o(t))&&(i(t)?u:a).test(s(t))}},1935:(t,e,n)=>{var i=n(8486),o=n(547);t.exports=function(t){return o(t)&&"[object Set]"==i(t)}},674:(t,e,n)=>{var i=n(7379),o=n(5387),r=n(547),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,t.exports=function(t){return r(t)&&o(t.length)&&!!s[i(t)]}},195:(t,e,n)=>{var i=n(4882),o=n(8121),r=Object.prototype.hasOwnProperty;t.exports=function(t){if(!i(t))return o(t);var e=[];for(var n in Object(t))r.call(t,n)&&"constructor"!=n&&e.push(n);return e}},7200:(t,e,n)=>{var i=n(1580),o=n(4882),r=n(8546),s=Object.prototype.hasOwnProperty;t.exports=function(t){if(!i(t))return r(t);var e=o(t),n=[];for(var a in t)("constructor"!=a||!e&&s.call(t,a))&&n.push(a);return n}},6137:t=>{t.exports=function(t,e){for(var n=-1,i=Array(t);++n{t.exports=function(t){return function(e){return t(e)}}},5568:t=>{t.exports=function(t,e){return t.has(e)}},8898:(t,e,n)=>{var i=n(1623);t.exports=function(t){var e=new t.constructor(t.byteLength);return new i(e).set(new i(t)),e}},7099:(t,e,n)=>{t=n.nmd(t);var i=n(8942),o=e&&!e.nodeType&&e,r=o&&t&&!t.nodeType&&t,s=r&&r.exports===o?i.Buffer:void 0,a=s?s.allocUnsafe:void 0;t.exports=function(t,e){if(e)return t.slice();var n=t.length,i=a?a(n):new t.constructor(n);return t.copy(i),i}},2480:(t,e,n)=>{var i=n(8898);t.exports=function(t,e){var n=e?i(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}},8340:t=>{var e=/\w*$/;t.exports=function(t){var n=new t.constructor(t.source,e.exec(t));return n.lastIndex=t.lastIndex,n}},8069:(t,e,n)=>{var i=n(5650),o=i?i.prototype:void 0,r=o?o.valueOf:void 0;t.exports=function(t){return r?Object(r.call(t)):{}}},2264:(t,e,n)=>{var i=n(8898);t.exports=function(t,e){var n=e?i(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}},4354:t=>{t.exports=function(t,e){var n=-1,i=t.length;for(e||(e=Array(i));++n{var i=n(3422),o=n(7073);t.exports=function(t,e,n,r){var s=!n;n||(n={});for(var a=-1,c=e.length;++a{var i=n(9032),o=n(7979);t.exports=function(t,e){return i(t,o(t),e)}},4733:(t,e,n)=>{var i=n(9032),o=n(5832);t.exports=function(t,e){return i(t,o(t),e)}},1950:(t,e,n)=>{var i=n(8942)["__core-js_shared__"];t.exports=i},2532:(t,e,n)=>{var i=n(4715),o=function(){try{var t=i(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();t.exports=o},3934:(t,e,n)=>{var i=n(3212),o=n(6465),r=n(5568);t.exports=function(t,e,n,s,a,c){var d=1&n,h=t.length,l=e.length;if(h!=l&&!(d&&l>h))return!1;var u=c.get(t),p=c.get(e);if(u&&p)return u==e&&p==t;var f=-1,m=!0,w=2&n?new i:void 0;for(c.set(t,e),c.set(e,t);++f{var i=n(5650),o=n(1623),r=n(6285),s=n(3934),a=n(5894),c=n(9828),d=i?i.prototype:void 0,h=d?d.valueOf:void 0;t.exports=function(t,e,n,i,d,l,u){switch(n){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!l(new o(t),new o(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return r(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var p=a;case"[object Set]":var f=1&i;if(p||(p=c),t.size!=e.size&&!f)return!1;var m=u.get(t);if(m)return m==e;i|=2,u.set(t,e);var w=s(p(t),p(e),i,d,l,u);return u.delete(t),w;case"[object Symbol]":if(h)return h.call(t)==h.call(e)}return!1}},1182:(t,e,n)=>{var i=n(393),o=Object.prototype.hasOwnProperty;t.exports=function(t,e,n,r,s,a){var c=1&n,d=i(t),h=d.length;if(h!=i(e).length&&!c)return!1;for(var l=h;l--;){var u=d[l];if(!(c?u in e:o.call(e,u)))return!1}var p=a.get(t),f=a.get(e);if(p&&f)return p==e&&f==t;var m=!0;a.set(t,e),a.set(e,t);for(var w=c;++l{var i="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;t.exports=i},393:(t,e,n)=>{var i=n(8244),o=n(7979),r=n(1211);t.exports=function(t){return i(t,r,o)}},3650:(t,e,n)=>{var i=n(8244),o=n(5832),r=n(5288);t.exports=function(t){return i(t,r,o)}},4700:(t,e,n)=>{var i=n(9067);t.exports=function(t,e){var n=t.__data__;return i(e)?n["string"==typeof e?"string":"hash"]:n.map}},4715:(t,e,n)=>{var i=n(9624),o=n(155);t.exports=function(t,e){var n=o(t,e);return i(n)?n:void 0}},4784:(t,e,n)=>{var i=n(3766)(Object.getPrototypeOf,Object);t.exports=i},8870:(t,e,n)=>{var i=n(5650),o=Object.prototype,r=o.hasOwnProperty,s=o.toString,a=i?i.toStringTag:void 0;t.exports=function(t){var e=r.call(t,a),n=t[a];try{t[a]=void 0;var i=!0}catch(t){}var o=s.call(t);return i&&(e?t[a]=n:delete t[a]),o}},7979:(t,e,n)=>{var i=n(9847),o=n(9306),r=Object.prototype.propertyIsEnumerable,s=Object.getOwnPropertySymbols,a=s?function(t){return null==t?[]:(t=Object(t),i(s(t),(function(e){return r.call(t,e)})))}:o;t.exports=a},5832:(t,e,n)=>{var i=n(1129),o=n(4784),r=n(7979),s=n(9306),a=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)i(e,r(t)),t=o(t);return e}:s;t.exports=a},8486:(t,e,n)=>{var i=n(3103),o=n(9770),r=n(9413),s=n(4512),a=n(9270),c=n(7379),d=n(4066),h="[object Map]",l="[object Promise]",u="[object Set]",p="[object WeakMap]",f="[object DataView]",m=d(i),w=d(o),y=d(r),g=d(s),v=d(a),C=c;(i&&C(new i(new ArrayBuffer(1)))!=f||o&&C(new o)!=h||r&&C(r.resolve())!=l||s&&C(new s)!=u||a&&C(new a)!=p)&&(C=function(t){var e=c(t),n="[object Object]"==e?t.constructor:void 0,i=n?d(n):"";if(i)switch(i){case m:return f;case w:return h;case y:return l;case g:return u;case v:return p}return e}),t.exports=C},155:t=>{t.exports=function(t,e){return null==t?void 0:t[e]}},3305:(t,e,n)=>{var i=n(4497);t.exports=function(){this.__data__=i?i(null):{},this.size=0}},9361:t=>{t.exports=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}},1112:(t,e,n)=>{var i=n(4497),o=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;if(i){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return o.call(e,t)?e[t]:void 0}},5276:(t,e,n)=>{var i=n(4497),o=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;return i?void 0!==e[t]:o.call(e,t)}},5071:(t,e,n)=>{var i=n(4497);t.exports=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=i&&void 0===e?"__lodash_hash_undefined__":e,this}},7350:t=>{var e=Object.prototype.hasOwnProperty;t.exports=function(t){var n=t.length,i=new t.constructor(n);return n&&"string"==typeof t[0]&&e.call(t,"index")&&(i.index=t.index,i.input=t.input),i}},424:(t,e,n)=>{var i=n(8898),o=n(2480),r=n(8340),s=n(8069),a=n(2264);t.exports=function(t,e,n){var c=t.constructor;switch(e){case"[object ArrayBuffer]":return i(t);case"[object Boolean]":case"[object Date]":return new c(+t);case"[object DataView]":return o(t,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(t,n);case"[object Map]":case"[object Set]":return new c;case"[object Number]":case"[object String]":return new c(t);case"[object RegExp]":return r(t);case"[object Symbol]":return s(t)}}},5964:(t,e,n)=>{var i=n(9747),o=n(4784),r=n(4882);t.exports=function(t){return"function"!=typeof t.constructor||r(t)?{}:i(o(t))}},9632:t=>{var e=/^(?:0|[1-9]\d*)$/;t.exports=function(t,n){var i=typeof t;return!!(n=null==n?9007199254740991:n)&&("number"==i||"symbol"!=i&&e.test(t))&&t>-1&&t%1==0&&t{t.exports=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}},4759:(t,e,n)=>{var i,o=n(1950),r=(i=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+i:"";t.exports=function(t){return!!r&&r in t}},4882:t=>{var e=Object.prototype;t.exports=function(t){var n=t&&t.constructor;return t===("function"==typeof n&&n.prototype||e)}},2393:t=>{t.exports=function(){this.__data__=[],this.size=0}},2049:(t,e,n)=>{var i=n(7034),o=Array.prototype.splice;t.exports=function(t){var e=this.__data__,n=i(e,t);return!(n<0||(n==e.length-1?e.pop():o.call(e,n,1),--this.size,0))}},7144:(t,e,n)=>{var i=n(7034);t.exports=function(t){var e=this.__data__,n=i(e,t);return n<0?void 0:e[n][1]}},7452:(t,e,n)=>{var i=n(7034);t.exports=function(t){return i(this.__data__,t)>-1}},3964:(t,e,n)=>{var i=n(7034);t.exports=function(t,e){var n=this.__data__,o=i(n,t);return o<0?(++this.size,n.push([t,e])):n[o][1]=e,this}},9753:(t,e,n)=>{var i=n(5098),o=n(1386),r=n(9770);t.exports=function(){this.size=0,this.__data__={hash:new i,map:new(r||o),string:new i}}},5681:(t,e,n)=>{var i=n(4700);t.exports=function(t){var e=i(this,t).delete(t);return this.size-=e?1:0,e}},88:(t,e,n)=>{var i=n(4700);t.exports=function(t){return i(this,t).get(t)}},4732:(t,e,n)=>{var i=n(4700);t.exports=function(t){return i(this,t).has(t)}},9068:(t,e,n)=>{var i=n(4700);t.exports=function(t,e){var n=i(this,t),o=n.size;return n.set(t,e),this.size+=n.size==o?0:1,this}},5894:t=>{t.exports=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t,i){n[++e]=[i,t]})),n}},4497:(t,e,n)=>{var i=n(4715)(Object,"create");t.exports=i},8121:(t,e,n)=>{var i=n(3766)(Object.keys,Object);t.exports=i},8546:t=>{t.exports=function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e}},2306:(t,e,n)=>{t=n.nmd(t);var i=n(4967),o=e&&!e.nodeType&&e,r=o&&t&&!t.nodeType&&t,s=r&&r.exports===o&&i.process,a=function(){try{return r&&r.require&&r.require("util").types||s&&s.binding&&s.binding("util")}catch(t){}}();t.exports=a},9005:t=>{var e=Object.prototype.toString;t.exports=function(t){return e.call(t)}},3766:t=>{t.exports=function(t,e){return function(n){return t(e(n))}}},8942:(t,e,n)=>{var i=n(4967),o="object"==typeof self&&self&&self.Object===Object&&self,r=i||o||Function("return this")();t.exports=r},1877:t=>{t.exports=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this}},8006:t=>{t.exports=function(t){return this.__data__.has(t)}},9828:t=>{t.exports=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}},4103:(t,e,n)=>{var i=n(1386);t.exports=function(){this.__data__=new i,this.size=0}},1779:t=>{t.exports=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}},4162:t=>{t.exports=function(t){return this.__data__.get(t)}},7462:t=>{t.exports=function(t){return this.__data__.has(t)}},6638:(t,e,n)=>{var i=n(1386),o=n(9770),r=n(8250);t.exports=function(t,e){var n=this.__data__;if(n instanceof i){var s=n.__data__;if(!o||s.length<199)return s.push([t,e]),this.size=++n.size,this;n=this.__data__=new r(s)}return n.set(t,e),this.size=n.size,this}},4066:t=>{var e=Function.prototype.toString;t.exports=function(t){if(null!=t){try{return e.call(t)}catch(t){}try{return t+""}catch(t){}}return""}},6108:(t,e,n)=>{var i=n(9334);t.exports=function(t){return i(t,5)}},6285:t=>{t.exports=function(t,e){return t===e||t!=t&&e!=e}},3283:(t,e,n)=>{var i=n(6027),o=n(547),r=Object.prototype,s=r.hasOwnProperty,a=r.propertyIsEnumerable,c=i(function(){return arguments}())?i:function(t){return o(t)&&s.call(t,"callee")&&!a.call(t,"callee")};t.exports=c},3142:t=>{var e=Array.isArray;t.exports=e},6529:(t,e,n)=>{var i=n(3655),o=n(5387);t.exports=function(t){return null!=t&&o(t.length)&&!i(t)}},5853:(t,e,n)=>{t=n.nmd(t);var i=n(8942),o=n(4772),r=e&&!e.nodeType&&e,s=r&&t&&!t.nodeType&&t,a=s&&s.exports===r?i.Buffer:void 0,c=(a?a.isBuffer:void 0)||o;t.exports=c},6343:(t,e,n)=>{var i=n(4687);t.exports=function(t,e){return i(t,e)}},3655:(t,e,n)=>{var i=n(7379),o=n(1580);t.exports=function(t){if(!o(t))return!1;var e=i(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}},5387:t=>{t.exports=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}},7681:(t,e,n)=>{var i=n(777),o=n(9460),r=n(2306),s=r&&r.isMap,a=s?o(s):i;t.exports=a},1580:t=>{t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},547:t=>{t.exports=function(t){return null!=t&&"object"==typeof t}},3943:(t,e,n)=>{var i=n(1935),o=n(9460),r=n(2306),s=r&&r.isSet,a=s?o(s):i;t.exports=a},8666:(t,e,n)=>{var i=n(674),o=n(9460),r=n(2306),s=r&&r.isTypedArray,a=s?o(s):i;t.exports=a},1211:(t,e,n)=>{var i=n(358),o=n(195),r=n(6529);t.exports=function(t){return r(t)?i(t):o(t)}},5288:(t,e,n)=>{var i=n(358),o=n(7200),r=n(6529);t.exports=function(t){return r(t)?i(t,!0):o(t)}},9306:t=>{t.exports=function(){return[]}},4772:t=>{t.exports=function(){return!1}},5412:(t,e,n)=>{var i;n.r(e),n.d(e,{NIL:()=>L,parse:()=>w,stringify:()=>h,v1:()=>m,v3:()=>x,v4:()=>S,v5:()=>M,validate:()=>a,version:()=>O});var o=new Uint8Array(16);function r(){if(!i&&!(i="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return i(o)}const s=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,a=function(t){return"string"==typeof t&&s.test(t)};for(var c=[],d=0;d<256;++d)c.push((d+256).toString(16).substr(1));const h=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(c[t[e+0]]+c[t[e+1]]+c[t[e+2]]+c[t[e+3]]+"-"+c[t[e+4]]+c[t[e+5]]+"-"+c[t[e+6]]+c[t[e+7]]+"-"+c[t[e+8]]+c[t[e+9]]+"-"+c[t[e+10]]+c[t[e+11]]+c[t[e+12]]+c[t[e+13]]+c[t[e+14]]+c[t[e+15]]).toLowerCase();if(!a(n))throw TypeError("Stringified UUID is invalid");return n};var l,u,p=0,f=0;const m=function(t,e,n){var i=e&&n||0,o=e||new Array(16),s=(t=t||{}).node||l,a=void 0!==t.clockseq?t.clockseq:u;if(null==s||null==a){var c=t.random||(t.rng||r)();null==s&&(s=l=[1|c[0],c[1],c[2],c[3],c[4],c[5]]),null==a&&(a=u=16383&(c[6]<<8|c[7]))}var d=void 0!==t.msecs?t.msecs:Date.now(),m=void 0!==t.nsecs?t.nsecs:f+1,w=d-p+(m-f)/1e4;if(w<0&&void 0===t.clockseq&&(a=a+1&16383),(w<0||d>p)&&void 0===t.nsecs&&(m=0),m>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");p=d,f=m,u=a;var y=(1e4*(268435455&(d+=122192928e5))+m)%4294967296;o[i++]=y>>>24&255,o[i++]=y>>>16&255,o[i++]=y>>>8&255,o[i++]=255&y;var g=d/4294967296*1e4&268435455;o[i++]=g>>>8&255,o[i++]=255&g,o[i++]=g>>>24&15|16,o[i++]=g>>>16&255,o[i++]=a>>>8|128,o[i++]=255&a;for(var v=0;v<6;++v)o[i+v]=s[v];return e||h(o)},w=function(t){if(!a(t))throw TypeError("Invalid UUID");var e,n=new Uint8Array(16);return n[0]=(e=parseInt(t.slice(0,8),16))>>>24,n[1]=e>>>16&255,n[2]=e>>>8&255,n[3]=255&e,n[4]=(e=parseInt(t.slice(9,13),16))>>>8,n[5]=255&e,n[6]=(e=parseInt(t.slice(14,18),16))>>>8,n[7]=255&e,n[8]=(e=parseInt(t.slice(19,23),16))>>>8,n[9]=255&e,n[10]=(e=parseInt(t.slice(24,36),16))/1099511627776&255,n[11]=e/4294967296&255,n[12]=e>>>24&255,n[13]=e>>>16&255,n[14]=e>>>8&255,n[15]=255&e,n};function y(t,e,n){function i(t,i,o,r){if("string"==typeof t&&(t=function(t){t=unescape(encodeURIComponent(t));for(var e=[],n=0;n>>9<<4)+1}function v(t,e){var n=(65535&t)+(65535&e);return(t>>16)+(e>>16)+(n>>16)<<16|65535&n}function C(t,e,n,i,o,r){return v((s=v(v(e,t),v(i,r)))<<(a=o)|s>>>32-a,n);var s,a}function b(t,e,n,i,o,r,s){return C(e&n|~e&i,t,e,o,r,s)}function _(t,e,n,i,o,r,s){return C(e&i|n&~i,t,e,o,r,s)}function I(t,e,n,i,o,r,s){return C(e^n^i,t,e,o,r,s)}function E(t,e,n,i,o,r,s){return C(n^(e|~i),t,e,o,r,s)}const x=y("v3",48,(function(t){if("string"==typeof t){var e=unescape(encodeURIComponent(t));t=new Uint8Array(e.length);for(var n=0;n>5]>>>o%32&255,s=parseInt(i.charAt(r>>>4&15)+i.charAt(15&r),16);e.push(s)}return e}(function(t,e){t[e>>5]|=128<>5]|=(255&t[i/8])<>>32-e}const M=y("v5",80,(function(t){var e=[1518500249,1859775393,2400959708,3395469782],n=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof t){var i=unescape(encodeURIComponent(t));t=[];for(var o=0;o>>0;v=g,g=y,y=P(w,30)>>>0,w=m,m=_}n[0]=n[0]+m>>>0,n[1]=n[1]+w>>>0,n[2]=n[2]+y>>>0,n[3]=n[3]+g>>>0,n[4]=n[4]+v>>>0}return[n[0]>>24&255,n[0]>>16&255,n[0]>>8&255,255&n[0],n[1]>>24&255,n[1]>>16&255,n[1]>>8&255,255&n[1],n[2]>>24&255,n[2]>>16&255,n[2]>>8&255,255&n[2],n[3]>>24&255,n[3]>>16&255,n[3]>>8&255,255&n[3],n[4]>>24&255,n[4]>>16&255,n[4]>>8&255,255&n[4]]})),L="00000000-0000-0000-0000-000000000000",O=function(t){if(!a(t))throw TypeError("Invalid UUID");return parseInt(t.substr(14,1),16)}}},e={};function n(i){var o=e[i];if(void 0!==o)return o.exports;var r=e[i]={id:i,loaded:!1,exports:{}};return t[i](r,r.exports,n),r.loaded=!0,r.exports}n.d=(t,e)=>{for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.nmd=t=>(t.paths=[],t.children||(t.children=[]),t);var i={};(()=>{var t=i;Object.defineProperty(t,"B",{value:!0}),t.d=async function(t){const n={};let i=!1,c=!1;if(void 0===t.api&&(t.api=s),void 0===t.logger&&(t.logger=o),t.api.fin)if("undefined"!=typeof window&&"object"==typeof window.fin)t.logger.info("Fin API instance already exists. Using the reference that exists in the window object."),n.fin=window.fin;else{let o;try{if(t.logger.info(`Creating Fin API instance through @openfin/core-web connect using the following options. \n\t\t\t\t\tConnect Options: \n\t\t\t\t\t${JSON.stringify(t.connectOptions)} \n\t\t\t\t\tRequest Connect Options:\n\t\t\t\t\t${JSON.stringify(t.requestConnectOptions)}`),void 0!==t.connectOptions)t.logger.info("Creating Fin API instance using the connect options provided."),o=await(0,e.connect)(t.connectOptions);else if(void 0!==t.requestConnectOptions&&"request"===t.requestConnectOptions.strategy){const n=await a(t.requestConnectOptions);t.logger.info("Creating Fin API instance using the request connect options provided."),o=await(0,e.connect)(n)}else t.logger.info("Creating Fin API instance using the default connect options."),o=await(0,e.connect)(r)}catch(n){if(n instanceof Error&&n.message.includes("Broker URL was not specified nor provided by a platform container")&&"request-on-failure"===t.requestConnectOptions?.strategy)try{const n=await a(t.requestConnectOptions);t.logger.info("As the broker url was not specified nor provided by a platform provider and request-on-failure was specified as the requestConnectOptions strategy we will try to connect again using this strategy to see if it is supported by the platform."),o=await(0,e.connect)(n)}catch(e){t.logger.error(`Error creating Fin API instance through @openfin/core-web connect using the following using the request-on-failure strategy and the following options: \n\t\t\t\t\t\t\tConnect Options: \n\t\t\t\t\t\t\t${JSON.stringify(t.connectOptions)} \n\t\t\t\t\t\t\tRequest Connect Options:\n\t\t\t\t\t\t\t${JSON.stringify(t.requestConnectOptions)}`,e)}else t.logger.error(`Error creating Fin API instance through @openfin/core-web connect using the following options: \n\t\t\t\t\t\tConnect Options: \n\t\t\t\t\t\t${JSON.stringify(t.connectOptions)} \n\t\t\t\t\t\tRequest Connect Options:\n\t\t\t\t\t\t${JSON.stringify(t.requestConnectOptions)}`,n)}if(void 0===o)throw new Error("Failed to create a fin API instance.");n.fin=o,i=!0}if(t.api.fdc3)if("undefined"!=typeof window&&"object"==typeof window.fdc3)t.logger.info("fdc3 API instance already exists. Using the reference that exists in the window object."),n.fdc3=window.fdc3;else if(void 0!==n.fin?.me?.interop?.getFDC3){const e=t.api.fdc3Version??"2.0";try{t.logger.info(`Creating fdc3 API through the @openfin/core-web getFDC3 function specifying version ${e}.`),n.fdc3=await n.fin.me.interop.getFDC3(e),c=!0}catch(n){t.logger.error(`Error creating fdc3 API through the @openfin/core-web getFDC3 function specifying version ${e}.`,n)}}else t.logger.error("Creating an fdc3 API through the @openfin/core-web getFDC3 function isn't possible without the @openfin/core-web fin api being available. If you are running inside of a container please enable FDC3 for your view/window.");if(void 0!==t.target){const e=t.target===window;if(void 0!==n.fin&&(t.target.fin=n.fin,e&&i)){const t=new CustomEvent("finReady");window.dispatchEvent(t)}if(void 0!==n.fdc3&&(t.target.fdc3=n.fdc3,e&&c)){const t=new CustomEvent("fdc3Ready");window.dispatchEvent(t)}}return n};const e=n(5067),o={error:console.error,warn:console.warn,info:console.info},r={connectionInheritance:"enabled"},s={fin:!0,fdc3:!0,fdc3Version:"2.0"};async function a(t){return new Promise(((e,n)=>{const i=setTimeout((()=>{n(new Error("Timed out waiting for connection options."))}),t.timeout??3e3);window.addEventListener("message",(async function o(r){if(Array.isArray(t.receivingOrigin)&&!t.receivingOrigin.includes(r.origin))n(new Error(`Received message from unexpected origin: ${r.origin}`));else if(r.data&&"openfin.coreWeb.connectConfig"===r.data.type){window.removeEventListener("message",o);const t=r.data.connectConfig;void 0===t?n(new Error("No connection options were provided.")):(clearTimeout(i),e(t))}}));let o=window.top??window.parent;"parent"===t.target&&(o=window.parent),o.postMessage({type:"openfin.coreWeb.connectConfig"},t.targetOrigin??"*")}))}})();var o=i.B,r=i.d;export{o as __esModule,r as getAPI}; //# sourceMappingURL=web.client.api.bundle.js.map \ No newline at end of file diff --git a/web/v19.2.0/web-client-api/js/web.client.api.bundle.js.map b/web/v19.2.0/web-client-api/js/web.client.api.bundle.js.map index 1d969fd..5787e7b 100644 --- a/web/v19.2.0/web-client-api/js/web.client.api.bundle.js.map +++ b/web/v19.2.0/web-client-api/js/web.client.api.bundle.js.map @@ -1 +1 @@ -{"version":3,"file":"web.client.api.bundle.js","mappings":";sBAAa,IAAIA,EAAE,EAAQ,MAAsB,EAAQ,MAAW,EAAQ,MAAQ,EAAQ,IAAU,EAAQ,MAAoB,EAAQ,MAAkBC,EAAQC,QAAQF,EAAEE,wBCAjK,IAAIF,EAAE,EAAQ,MAAWG,EAAE,EAAQ,IAAUC,EAAE,EAAQ,MAAoBC,EAAE,EAAQ,MAAkBC,EAAE,EAAQ,MAAQ,MAAMC,EAAE,CAACP,EAAEG,IAAI,GAAGA,KAAKK,KAAKC,KAAKC,UAAUV,OAAO,IAAIW,EAAE,oBAAoBC,WAAWA,WAAW,oBAAoBC,OAAOA,YAAO,IAAoB,EAAAC,EAAO,EAAAA,EAAO,oBAAoBC,KAAKA,KAAK,CAAC,EAAEC,EAAE,CAAC,EAAEC,EAAE,CAAC,EAAEC,EAAE,CAAC,EAAEC,EAAE,CAAC,EAAEC,eAAeC,EAAErB,GAAG,MAAMG,EAAE,GAAG,IAAI,MAAMC,KAAKJ,EAAE,CAAC,MAAMA,QAAQI,IAAID,EAAEmB,KAAKtB,EAAE,CAAC,OAAOG,CAAC,CAACoB,OAAOC,eAAeL,EAAE,aAAa,CAACM,OAAM,IAAKN,EAAEO,iBAAiBP,EAAEQ,OAAOR,EAAES,WAAWT,EAAEU,eAAU,EAAOV,EAAEU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G,KAA0C,CAC7ExC,OAAOijB,oBAAoB,UAAW0zE,GACtC,MAAM//C,EAAgB6/C,EAAMxtF,KAAK2tC,mBACX+9B,IAAlB/9B,EACHxjC,EAAO,IAAI9N,MAAM,0CAEjBmR,aAAaigF,GACbzyF,EAAQ2yC,GAEV,CACD,IAEA,IAAIxpC,EAASpN,OAAOqV,KAAOrV,OAAOy7C,OACX,WAAnB3yC,EAAQsE,SACXA,EAASpN,OAAOy7C,QAEjBruC,EAAOkoC,YA7B8C,CACpD9yC,KAAM,iCA4B4BsG,EAAQ+tF,cAAgB,IAAI,GAEjE","sources":["webpack://openfin-web--web-client-api/./node_modules/@openfin/core-web/out/api-client.js","webpack://openfin-web--web-client-api/./node_modules/@openfin/core-web/out/main-8cad4070.js","webpack://openfin-web--web-client-api/./node_modules/@openfin/core-web/out/main-b14f67c9.js","webpack://openfin-web--web-client-api/../../node_modules/base64-js/index.js","webpack://openfin-web--web-client-api/../../node_modules/buffer/index.js","webpack://openfin-web--web-client-api/../../node_modules/events/events.js","webpack://openfin-web--web-client-api/../../node_modules/ieee754/index.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_DataView.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_Hash.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_ListCache.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_Map.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_MapCache.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_Promise.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_Set.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_SetCache.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_Stack.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_Symbol.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_Uint8Array.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_WeakMap.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_arrayEach.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_arrayFilter.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_arrayLikeKeys.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_arrayPush.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_arraySome.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_assignValue.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_assocIndexOf.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_baseAssign.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_baseAssignIn.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_baseAssignValue.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_baseClone.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_baseCreate.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_baseGetAllKeys.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_baseGetTag.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_baseIsArguments.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_baseIsEqual.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_baseIsEqualDeep.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_baseIsMap.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_baseIsNative.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_baseIsSet.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_baseIsTypedArray.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_baseKeys.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_baseKeysIn.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_baseTimes.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_baseUnary.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_cacheHas.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_cloneArrayBuffer.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_cloneBuffer.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_cloneDataView.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_cloneRegExp.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_cloneSymbol.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_cloneTypedArray.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_copyArray.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_copyObject.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_copySymbols.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_copySymbolsIn.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_coreJsData.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_defineProperty.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_equalArrays.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_equalByTag.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_equalObjects.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_freeGlobal.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_getAllKeys.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_getAllKeysIn.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_getMapData.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_getNative.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_getPrototype.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_getRawTag.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_getSymbols.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_getSymbolsIn.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_getTag.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_getValue.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_hashClear.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_hashDelete.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_hashGet.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_hashHas.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_hashSet.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_initCloneArray.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_initCloneByTag.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_initCloneObject.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_isIndex.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_isKeyable.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_isMasked.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_isPrototype.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_listCacheClear.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_listCacheDelete.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_listCacheGet.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_listCacheHas.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_listCacheSet.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_mapCacheClear.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_mapCacheDelete.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_mapCacheGet.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_mapCacheHas.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_mapCacheSet.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_mapToArray.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_nativeCreate.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_nativeKeys.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_nativeKeysIn.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_nodeUtil.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_objectToString.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_overArg.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_root.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_setCacheAdd.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_setCacheHas.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_setToArray.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_stackClear.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_stackDelete.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_stackGet.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_stackHas.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_stackSet.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_toSource.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/cloneDeep.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/eq.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/isArguments.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/isArray.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/isArrayLike.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/isBuffer.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/isEqual.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/isFunction.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/isLength.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/isMap.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/isObject.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/isObjectLike.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/isSet.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/isTypedArray.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/keys.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/keysIn.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/stubArray.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/stubFalse.js","webpack://openfin-web--web-client-api/../../node_modules/uuid/dist/esm-browser/rng.js","webpack://openfin-web--web-client-api/../../node_modules/uuid/dist/esm-browser/regex.js","webpack://openfin-web--web-client-api/../../node_modules/uuid/dist/esm-browser/validate.js","webpack://openfin-web--web-client-api/../../node_modules/uuid/dist/esm-browser/stringify.js","webpack://openfin-web--web-client-api/../../node_modules/uuid/dist/esm-browser/v1.js","webpack://openfin-web--web-client-api/../../node_modules/uuid/dist/esm-browser/parse.js","webpack://openfin-web--web-client-api/../../node_modules/uuid/dist/esm-browser/v35.js","webpack://openfin-web--web-client-api/../../node_modules/uuid/dist/esm-browser/md5.js","webpack://openfin-web--web-client-api/../../node_modules/uuid/dist/esm-browser/v3.js","webpack://openfin-web--web-client-api/../../node_modules/uuid/dist/esm-browser/v4.js","webpack://openfin-web--web-client-api/../../node_modules/uuid/dist/esm-browser/sha1.js","webpack://openfin-web--web-client-api/../../node_modules/uuid/dist/esm-browser/v5.js","webpack://openfin-web--web-client-api/../../node_modules/uuid/dist/esm-browser/nil.js","webpack://openfin-web--web-client-api/../../node_modules/uuid/dist/esm-browser/version.js","webpack://openfin-web--web-client-api/webpack/bootstrap","webpack://openfin-web--web-client-api/webpack/runtime/define property getters","webpack://openfin-web--web-client-api/webpack/runtime/global","webpack://openfin-web--web-client-api/webpack/runtime/hasOwnProperty shorthand","webpack://openfin-web--web-client-api/webpack/runtime/make namespace object","webpack://openfin-web--web-client-api/webpack/runtime/node module decorator","webpack://openfin-web--web-client-api/./client/src/client.ts"],"sourcesContent":["\"use strict\";var e=require(\"./main-8cad4070.js\");require(\"buffer/\"),require(\"uuid\"),require(\"events\"),require(\"lodash/cloneDeep\"),require(\"lodash/isEqual\"),exports.connect=e.connect;\n","\"use strict\";var e=require(\"buffer/\"),t=require(\"events\"),n=require(\"lodash/cloneDeep\"),i=require(\"lodash/isEqual\"),r=require(\"uuid\");const o=(e,t)=>`${t}<${btoa(JSON.stringify(e))}>`;var s=\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof window?window:\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:{},a={},c={},d={},h={};async function l(e){const t=[];for(const n of e){const e=await n();t.push(e)}return t}Object.defineProperty(h,\"__esModule\",{value:!0}),h.promiseMapSerial=h.serial=h.promiseMap=h.promisify=void 0,h.promisify=function(e){return(...t)=>new Promise(((n,i)=>{e(...t,((e,t)=>e?i(e):n(t)))}))},h.promiseMap=async function(e,t){return Promise.all(e.map(t))},h.serial=l,h.promiseMapSerial=async function(e,t){return l(e.map(((e,n,i)=>()=>t(e,n,i))))};var u,p=s&&s.__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},w=s&&s.__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)};Object.defineProperty(d,\"__esModule\",{value:!0}),d.Reply=d.EmitterBase=d.Base=void 0;const y=h;class f{constructor(e){this.isNodeEnvironment=()=>\"node\"===this.wire.environment.type,this.isOpenFinEnvironment=()=>\"openfin\"===this.wire.environment.type,this.isBrowserEnvironment=()=>\"other\"===this.wire.environment.type,this.wire=e}get fin(){return this.wire.getFin()}get me(){return this.wire.me}}d.Base=f;d.EmitterBase=class extends f{constructor(e,t,...n){super(e),this.topic=t,u.set(this,void 0),this.eventNames=()=>this.hasEmitter()?this.getOrCreateEmitter().eventNames():[],this.emit=(e,t,...n)=>!!this.hasEmitter()&&this.getOrCreateEmitter().emit(e,t,...n),this.hasEmitter=()=>this.wire.eventAggregator.has(w(this,u,\"f\")),this.getOrCreateEmitter=()=>this.wire.eventAggregator.getOrCreate(w(this,u,\"f\")),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[],this.listenerCount=e=>this.hasEmitter()?this.getOrCreateEmitter().listenerCount(e):0,this.registerEventListener=async(e,t={},n,i)=>{const r={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e},o=this.getOrCreateEmitter();n(o);try{await this.wire.sendAction(\"subscribe-to-desktop-event\",r)}catch(e){throw i(o),this.deleteEmitterIfNothingRegistered(o),e}},this.deregisterEventListener=async(e,t={})=>{if(this.hasEmitter()){const n={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e};await this.wire.sendAction(\"unsubscribe-to-desktop-event\",n).catch((()=>null));return this.getOrCreateEmitter()}return Promise.resolve()},p(this,u,[t,...n],\"f\"),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[]}async on(e,t,n){return await this.registerEventListener(e,n,(n=>{n.on(e,t)}),(n=>{n.removeListener(e,t)})),this}async addListener(e,t,n){return this.on(e,t,n)}async once(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.once(e,i),n.once(e,t)}),(n=>{n.removeListener(e,i),n.removeListener(e,t)})),this}async prependListener(e,t,n){return await this.registerEventListener(e,n,(n=>{n.prependListener(e,t)}),(n=>{n.removeListener(e,t)})),this}async prependOnceListener(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.prependOnceListener(e,t),n.once(e,i)}),(n=>{n.removeListener(e,t),n.removeListener(e,i)})),this}async removeListener(e,t,n){const i=await this.deregisterEventListener(e,n);return i&&(i.removeListener(e,t),this.deleteEmitterIfNothingRegistered(i)),this}async deregisterAllListeners(e){const t={...this.identity,type:e,topic:this.topic};if(this.hasEmitter()){const e=this.getOrCreateEmitter(),n=e.listenerCount(t.type),i=[];for(let e=0;enull)));return await Promise.all(i),e}}async removeAllListeners(e){const t=async e=>{const t=await this.deregisterAllListeners(e);t&&(t.removeAllListeners(e),this.deleteEmitterIfNothingRegistered(t))};if(e)await t(e);else if(this.hasEmitter()){const e=this.getOrCreateEmitter().eventNames();await(0,y.promiseMap)(e,t)}return this}deleteEmitterIfNothingRegistered(e){0===e.eventNames().length&&this.wire.eventAggregator.delete(w(this,u,\"f\"))}},u=new WeakMap;d.Reply=class{};var g={};Object.defineProperty(g,\"__esModule\",{value:!0});var m=g.RuntimeError=g.NotSupportedError=g.NotImplementedError=g.NoAckError=g.DuplicateCorrelationError=g.UnexpectedActionError=g.DisconnectedError=void 0;class v extends Error{constructor(e){super(`Expected websocket state OPEN but found ${e}`),this.readyState=e}}g.DisconnectedError=v;class C extends Error{}g.UnexpectedActionError=C;class b extends Error{}g.DuplicateCorrelationError=b;class I extends Error{}g.NoAckError=I;class E extends Error{}g.NotImplementedError=E;class x extends Error{}g.NotSupportedError=x;class A extends Error{constructor(e){const{message:t,name:n,stack:i,...r}=e;super(t),this.name=n||\"Error\",this.stack=i??this.toString(),Object.keys(r).forEach((e=>{this[e]=r[e]}))}}class P extends Error{static getCallSite(e=0){const t=Error.stackTraceLimit,n=e+1;Error.stackTraceLimit=t+n;const i=Error.prepareStackTrace;Error.prepareStackTrace=(e,t)=>t;const r=(new Error).stack?.slice(n)??[];return Error.prepareStackTrace=i,Error.stackTraceLimit=t,r}static prepareStackTrace(e,t){if(\"function\"==typeof Error.prepareStackTrace)return Error.prepareStackTrace(e,t);let n=\"\";n+=e.name||\"Error\",n+=`: ${e.message||\"\"}`;for(const e of t)n+=`\\n at ${e.toString()}`;return n}constructor(e,t){const{reason:n,error:i}=e;super(n),this.name=\"RuntimeError\",i?.stack&&(this.cause=new A(i)),t&&(this.stack=P.prepareStackTrace(this,t))}}m=g.RuntimeError=P;var M={},_={},O={};Object.defineProperty(O,\"__esModule\",{value:!0}),O.validateIdentity=void 0,O.validateIdentity=function(e){let t;return\"object\"==typeof e&&\"string\"==typeof e.uuid||(t=\"Not a valid identity object\"),t};var S={},R={},F={},j={},k={},L={},T={};Object.defineProperty(T,\"__esModule\",{value:!0}),T.handleDeprecatedWarnings=void 0;var $;T.handleDeprecatedWarnings=e=>{(e.contentNavigation?.whitelist||e.contentNavigation?.blacklist||e.contentRedirect?.whitelist||e.contentRedirect?.blacklist)&&console.warn(\"The properties 'whitelist' and 'blacklist' have been marked as deprecated and will be removed in a future version. Please use 'allowlist' and 'denylist'.\")};var B={},G={};Object.defineProperty(G,\"__esModule\",{value:!0}),G.AsyncRetryableLazy=W=G.Lazy=void 0;var W=G.Lazy=class{constructor(e){this.producerFn=e}getValue(){return this.value||(this.value=this.producerFn()),this.value}};G.AsyncRetryableLazy=class{constructor(e){this.producerFn=e}async getValue(){return this.promise||(this.promise=this.producerFn().catch((e=>{throw delete this.promise,e}))),this.promise}};var H={};Object.defineProperty(H,\"__esModule\",{value:!0}),H.WebContents=void 0;const N=d;class D extends N.EmitterBase{constructor(e,t,n){super(e,n,t.uuid,t.name),this.identity=t,this.entityType=n}capturePage(e){return this.wire.sendAction(\"capture-page\",{options:e,...this.identity}).then((({payload:e})=>e.data))}executeJavaScript(e){return this.wire.sendAction(\"execute-javascript-in-window\",{...this.identity,code:e}).then((({payload:e})=>e.data))}getZoomLevel(){return this.wire.sendAction(\"get-zoom-level\",this.identity).then((({payload:e})=>e.data))}setZoomLevel(e){return this.wire.sendAction(\"set-zoom-level\",{...this.identity,level:e}).then((()=>{}))}navigate(e){return this.wire.sendAction(\"navigate-window\",{...this.identity,url:e}).then((()=>{}))}navigateBack(){return this.wire.sendAction(\"navigate-window-back\",{...this.identity}).then((()=>{}))}async navigateForward(){await this.wire.sendAction(\"navigate-window-forward\",{...this.identity})}stopNavigation(){return this.wire.sendAction(\"stop-window-navigation\",{...this.identity}).then((()=>{}))}reload(e=!1){return this.wire.sendAction(\"reload-window\",{ignoreCache:e,...this.identity}).then((()=>{}))}print(e={}){return this.wire.sendAction(\"print\",{...this.identity,options:e}).then((()=>{}))}findInPage(e,t){return this.wire.sendAction(\"find-in-page\",{...this.identity,searchTerm:e,options:t}).then((({payload:e})=>e.data))}stopFindInPage(e){return this.wire.sendAction(\"stop-find-in-page\",{...this.identity,action:e}).then((()=>{}))}getPrinters(){return this.wire.sendAction(\"get-printers\",{...this.identity}).then((({payload:e})=>e.data))}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){await this.wire.sendAction(\"focus-window\",{emitSynthFocused:e,...this.identity})}async showDeveloperTools(){await this.wire.sendAction(\"show-developer-tools\",this.identity)}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction(\"get-process-info\",this.identity);return e}async getSharedWorkers(){return this.wire.sendAction(\"get-shared-workers\",this.identity).then((({payload:e})=>e.data))}async inspectSharedWorker(){await this.wire.sendAction(\"inspect-shared-worker\",{...this.identity})}async inspectSharedWorkerById(e){await this.wire.sendAction(\"inspect-shared-worker-by-id\",{...this.identity,workerId:e})}async inspectServiceWorker(){await this.wire.sendAction(\"inspect-service-worker\",{...this.identity})}async showPopupWindow(e){if(this.wire.sendAction(`${this.entityType}-show-popup-window`,this.identity).catch((()=>{})),e?.onPopupReady){const t=async({popupName:t})=>{try{const n=this.fin.Window.wrapSync({uuid:this.fin.me.uuid,name:t});await e.onPopupReady(n)}catch(e){throw new Error(`Something went wrong during onPopupReady execution: ${e}`)}};await this.once(\"popup-ready\",t)}const{payload:t}=await this.wire.sendAction(\"try-create-popup-window\",{options:{...e,hasResultCallback:!!e?.onPopupResult,hasReadyCallback:!!e?.onPopupReady},...this.identity}),{data:{willOpen:n,options:i}}=t;n&&await this.fin.Window.create(i.initialOptions);if(e?.onPopupResult){const t=async t=>{await e.onPopupResult((e=>{const{name:t,uuid:n,result:i,data:r}=e,o={identity:{name:t,uuid:n},result:i};return r&&(o.data=r),o})(t))},n=async()=>{await this.removeListener(\"popup-result\",t)};await this.on(\"popup-result\",t),await this.once(\"popup-teardown\",n)}const{payload:r}=await this.wire.sendAction(\"show-popup-window\",{options:i,...this.identity});return r.data}}var U,V,z,K,q;function J(){return V||(V=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(function(){if($)return L;$=1,Object.defineProperty(L,\"__esModule\",{value:!0}),L.ViewModule=void 0;const e=d,t=O,n=J(),i=T;class r extends e.Base{async create(e){const{uuid:t}=this.wire.me;if(!e.name||\"string\"!=typeof e.name)throw new Error(\"Please provide a name property as a string in order to create a View.\");return(0,i.handleDeprecatedWarnings)(e),this.wire.environment.childViews?await this.wire.environment.createChildContent({entityType:\"view\",options:{...e,uuid:t}}):await this.wire.sendAction(\"create-view\",{...e,uuid:t}),this.wrapSync({uuid:t,name:e.name})}async wrap(e){this.wire.sendAction(\"view-wrap\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}wrapSync(e){this.wire.sendAction(\"view-wrap-sync\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}getCurrent(){if(this.wire.sendAction(\"view-get-current\").catch((e=>{})),!this.wire.me.isView)throw new Error(\"You are not in a View context\");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction(\"view-get-current-sync\").catch((e=>{})),!this.wire.me.isView)throw new Error(\"You are not in a View context\");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return L.ViewModule=r,L}(),e),n(function(){if(U)return B;var e;U=1,Object.defineProperty(B,\"__esModule\",{value:!0}),B.View=void 0;const t=g,n=G,i=H,r=ie();class o extends i.WebContents{constructor(i,o){super(i,o,\"view\"),this.identity=o,e.set(this,new n.Lazy((()=>this.fin.Platform.wrapSync(this.identity).getClient()))),this.attach=async e=>{await this.wire.sendAction(\"attach-view\",{target:e,...this.identity})},this.destroy=async()=>{await this.wire.sendAction(\"destroy-view\",{...this.identity})},this.show=async()=>{await this.wire.sendAction(\"show-view\",{...this.identity})},this.showAt=async(e,t={})=>{await this.wire.sendAction(\"show-view-at\",{bounds:e,...this.identity,options:t})},this.bringToFront=async()=>{await this.wire.sendAction(\"bring-view-to-front\",{...this.identity})},this.hide=async()=>{await this.wire.sendAction(\"hide-view\",{...this.identity})},this.setBounds=async e=>{await this.wire.sendAction(\"set-view-bounds\",{bounds:e,...this.identity})},this.getBounds=async()=>(await this.wire.sendAction(\"get-view-bounds\",{...this.identity})).payload.data,this.getInfo=async()=>(await this.wire.sendAction(\"get-view-info\",{...this.identity})).payload.data,this.getParentLayout=async()=>(this.wire.sendAction(\"view-get-parent-layout\",{...this.identity}).catch((()=>{})),this.fin.Platform.Layout.getLayoutByViewIdentity(this.identity)),this.getOptions=async()=>this.wire.sendAction(\"get-view-options\",{...this.identity}).then((({payload:e})=>e.data)),this.updateOptions=async e=>this.wire.sendAction(\"update-view-options\",{options:e,...this.identity}).then((()=>{})),this.getCurrentWindow=async()=>{const{payload:{data:e}}=await this.wire.sendAction(\"get-view-window\",{...this.identity});return new r._Window(this.wire,e)},this.getCurrentStack=async()=>{this.wire.sendAction(\"view-get-current-stack\").catch((()=>{}));try{return(await this.getParentLayout()).getStackByViewIdentity(this.identity)}catch(e){throw new t.RuntimeError({reason:\"This view does not belong to a stack.\",error:e})}},this.triggerBeforeUnload=async()=>(await this.wire.sendAction(\"trigger-before-unload\",{...this.identity})).payload.data,this.bindToElement=async e=>{if(!e)throw new Error(\"Element not found.\");return this.wire.environment.observeBounds(e,(async e=>this.setBounds(e)))}}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){const t=await this.getCurrentWindow();await t.focusedWebViewWasChanged(),await super.focus({emitSynthFocused:e})}}return B.View=o,e=new WeakMap,B}(),e)}(k)),k}function Y(){if(z)return j;z=1,Object.defineProperty(j,\"__esModule\",{value:!0}),j.Application=void 0;const e=d,t=ie(),n=J();class i extends e.EmitterBase{constructor(e,n){super(e,\"application\",n.uuid),this.identity=n,this.window=new t._Window(this.wire,{uuid:this.identity.uuid,name:this.identity.uuid})}windowListFromIdentityList(e){const n=[];return e.forEach((e=>{n.push(new t._Window(this.wire,{uuid:e.uuid,name:e.name}))})),n}isRunning(){return this.wire.sendAction(\"is-application-running\",this.identity).then((({payload:e})=>e.data))}async quit(e=!1){try{await this._close(e),await this.wire.sendAction(\"destroy-application\",{force:e,...this.identity})}catch(e){if(![\"Remote connection has closed\",\"Could not locate the requested application\"].some((t=>e.message.includes(t))))throw e}}async _close(e=!1){try{await this.wire.sendAction(\"close-application\",{force:e,...this.identity})}catch(e){if(!e.message.includes(\"Remote connection has closed\"))throw e}}close(e=!1){return console.warn(\"Deprecation Warning: Application.close is deprecated Please use Application.quit\"),this.wire.sendAction(\"application-close\",this.identity).catch((e=>{})),this._close(e)}getChildWindows(){return this.wire.sendAction(\"get-child-windows\",this.identity).then((({payload:e})=>{const t=[];return e.data.forEach((e=>{t.push({uuid:this.identity.uuid,name:e})})),this.windowListFromIdentityList(t)}))}getManifest(){return this.wire.sendAction(\"get-application-manifest\",this.identity).then((({payload:e})=>e.data))}getParentUuid(){return this.wire.sendAction(\"get-parent-application\",this.identity).then((({payload:e})=>e.data))}getShortcuts(){return this.wire.sendAction(\"get-shortcuts\",this.identity).then((({payload:e})=>e.data))}async getViews(){const{payload:e}=await this.wire.sendAction(\"application-get-views\",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}getZoomLevel(){return this.wire.sendAction(\"get-application-zoom-level\",this.identity).then((({payload:e})=>e.data))}getWindow(){return this.wire.sendAction(\"application-get-window\",this.identity).catch((e=>{})),Promise.resolve(this.window)}registerUser(e,t){return this.wire.sendAction(\"register-user\",{userName:e,appName:t,...this.identity}).then((()=>{}))}removeTrayIcon(){return this.wire.sendAction(\"remove-tray-icon\",this.identity).then((()=>{}))}restart(){return this.wire.sendAction(\"restart-application\",this.identity).then((()=>{}))}run(){return console.warn(\"Deprecation Warning: Application.run is deprecated Please use fin.Application.start\"),this.wire.sendAction(\"application-run\",this.identity).catch((e=>{})),this._run()}_run(e={}){return this.wire.sendAction(\"run-application\",{manifestUrl:this._manifestUrl,opts:e,...this.identity}).then((()=>{}))}scheduleRestart(){return this.wire.sendAction(\"relaunch-on-close\",this.identity).then((()=>{}))}async sendApplicationLog(){const{payload:e}=await this.wire.sendAction(\"send-application-log\",this.identity);return e.data}async setJumpList(e){await this.wire.sendAction(\"set-jump-list\",{config:e,...this.identity})}setTrayIcon(e){return this.wire.sendAction(\"set-tray-icon\",{enabledIcon:e,...this.identity}).then((()=>{}))}setShortcuts(e){return this.wire.sendAction(\"set-shortcuts\",{data:e,...this.identity}).then((()=>{}))}async setShortcutQueryParams(e){await this.wire.sendAction(\"set-shortcut-query-args\",{data:e,...this.identity})}setZoomLevel(e){return this.wire.sendAction(\"set-application-zoom-level\",{level:e,...this.identity}).then((()=>{}))}async setAppLogUsername(e){await this.wire.sendAction(\"set-app-log-username\",{data:e,...this.identity})}getTrayIconInfo(){return this.wire.sendAction(\"get-tray-icon-info\",this.identity).then((({payload:e})=>e.data))}hasTrayIcon(){return this.wire.sendAction(\"has-tray-icon\",this.identity).then((({payload:e})=>e.data))}terminate(){return this.wire.sendAction(\"terminate-application\",this.identity).then((()=>{}))}wait(){return this.wire.sendAction(\"wait-for-hung-application\",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction(\"get-info\",this.identity).then((({payload:e})=>e.data))}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction(\"application-get-process-info\",this.identity);return e}async setFileDownloadLocation(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t};await this.wire.sendAction(\"set-file-download-location\",{...n,downloadLocation:e})}async getFileDownloadLocation(){const{payload:{data:e}}=await this.wire.sendAction(\"get-file-download-location\",this.identity);return e}async showTrayIconPopupMenu(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t},{payload:i}=await this.wire.sendAction(\"show-tray-icon-popup-menu\",{...n,options:e});return i.data}async closeTrayIconPopupMenu(){const{name:e}=this.wire.me,t={uuid:this.identity.uuid,name:e};await this.wire.sendAction(\"close-tray-icon-popup-menu\",{...t})}}return j.Application=i,j}function Z(){return q||(q=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(function(){if(K)return F;K=1,Object.defineProperty(F,\"__esModule\",{value:!0}),F.ApplicationModule=void 0;const e=d,t=O,n=Y();class i extends e.Base{async wrap(e){this.wire.sendAction(\"wrap-application\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}wrapSync(e){this.wire.sendAction(\"wrap-application-sync\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}async _create(e){return void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&void 0===e.isPlatformController&&(e.autoShow=!0),await this.wire.sendAction(\"create-application\",e),this.wrap({uuid:e.uuid})}create(e){return console.warn(\"Deprecation Warning: fin.Application.create is deprecated. Please use fin.Application.start\"),this.wire.sendAction(\"application-create\").catch((e=>{})),this._create(e)}async start(e){this.wire.sendAction(\"start-application\").catch((e=>{}));const t=await this._create(e);return await this.wire.sendAction(\"run-application\",{uuid:e.uuid}),t}async startManyManifests(e,t){return this.wire.sendAction(\"run-applications\",{applications:e,opts:t}).then((()=>{}))}getCurrent(){return this.wire.sendAction(\"get-current-application\").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction(\"get-current-application-sync\").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}async startFromManifest(e,t){this.wire.sendAction(\"application-start-from-manifest\").catch((e=>{}));const n=await this._createFromManifest(e);return await n._run(t),n}createFromManifest(e){return console.warn(\"Deprecation Warning: fin.Application.createFromManifest is deprecated. Please use fin.Application.startFromManifest\"),this.wire.sendAction(\"application-create-from-manifest\").catch((e=>{})),this._createFromManifest(e)}_createFromManifest(e){return this.wire.sendAction(\"get-application-manifest\",{manifestUrl:e}).then((({payload:e})=>{const t=e.data.platform?e.data.platform.uuid:e.data.startup_app.uuid;return this.wrap({uuid:t})})).then((t=>(t._manifestUrl=e,t)))}}return F.ApplicationModule=i,F}(),e),n(Y(),e)}(R)),R}H.WebContents=D;var Q={};Object.defineProperty(Q,\"__esModule\",{value:!0}),Q.promisifySubscription=void 0;var X,ee,te;function ne(){if(X)return S;X=1,Object.defineProperty(S,\"__esModule\",{value:!0}),S._Window=void 0;const e=Z(),t=H,n=J(),i=T,r=Q;class o extends t.WebContents{constructor(e,t){super(e,t,\"window\")}async createWindow(e){this.wire.sendAction(\"window-create-window\",this.identity).catch((e=>{}));const t=await(0,r.promisifySubscription)(this,\"fire-constructor-callback\");void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&(e.autoShow=!0),(0,i.handleDeprecatedWarnings)(e);const n=this.wire.environment.createChildContent({entityType:\"window\",options:e}),[o]=await Promise.all([t.getValue(),n]);let s;const{success:a}=o,c=o.data,{message:d}=c;s=a?{httpResponseCode:c.httpResponseCode,apiInjected:c.apiInjected}:{message:c.message,networkErrorCode:c.networkErrorCode,stack:c.stack};const h={message:d,cbPayload:s,success:a};try{this.getWebWindow().fin.__internal_.openerSuccessCBCalled()}catch(e){}return h.success?this:Promise.reject(h)}getAllFrames(){return this.wire.sendAction(\"get-all-frames\",this.identity).then((({payload:e})=>e.data))}getBounds(){return this.wire.sendAction(\"get-window-bounds\",this.identity).then((({payload:e})=>e.data))}center(){return this.wire.sendAction(\"center-window\",this.identity).then((()=>{}))}blur(){return this.wire.sendAction(\"blur-window\",this.identity).then((()=>{}))}bringToFront(){return this.wire.sendAction(\"bring-window-to-front\",this.identity).then((()=>{}))}animate(e,t){return this.wire.sendAction(\"animate-window\",{transitions:e,options:t,...this.identity}).then((()=>{}))}hide(){return this.wire.sendAction(\"hide-window\",this.identity).then((()=>{}))}close(e=!1){return this.wire.sendAction(\"close-window\",{force:e,...this.identity}).then((()=>{Object.setPrototypeOf(this,null)}))}focusedWebViewWasChanged(){return this.wire.sendAction(\"focused-webview-changed\",this.identity).then((()=>{}))}getNativeId(){return this.wire.sendAction(\"get-window-native-id\",this.identity).then((({payload:e})=>e.data))}async getCurrentViews(){const{payload:e}=await this.wire.sendAction(\"window-get-views\",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}disableFrame(){return console.warn(\"Function is deprecated; use disableUserMovement instead.\"),this.wire.sendAction(\"disable-window-frame\",this.identity).then((()=>{}))}disableUserMovement(){return this.wire.sendAction(\"disable-window-frame\",this.identity).then((()=>{}))}enableFrame(){return console.warn(\"Function is deprecated; use enableUserMovement instead.\"),this.wire.sendAction(\"enable-window-frame\",this.identity).then((()=>{}))}enableUserMovement(){return this.wire.sendAction(\"enable-window-frame\",this.identity).then((()=>{}))}flash(){return this.wire.sendAction(\"flash-window\",this.identity).then((()=>{}))}stopFlashing(){return this.wire.sendAction(\"stop-flash-window\",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction(\"get-window-info\",this.identity).then((({payload:e})=>e.data))}async getLayout(e){this.wire.sendAction(\"window-get-layout\",this.identity).catch((e=>{}));const t=await this.getOptions();if(!t.layout&&!t.layoutSnapshot)throw new Error(\"Window does not have a Layout\");return this.fin.Platform.Layout.wrap(e??this.identity)}getOptions(){return this.wire.sendAction(\"get-window-options\",this.identity).then((({payload:e})=>e.data))}getParentApplication(){return this.wire.sendAction(\"window-get-parent-application\",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity))}getParentWindow(){return this.wire.sendAction(\"window-get-parent-window\",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity)).then((e=>e.getWindow()))}async getSnapshot(e){const t={area:e,...this.identity};console.warn(\"Window.getSnapshot has been deprecated, please use Window.capturePage\");return(await this.wire.sendAction(\"get-window-snapshot\",t)).payload.data}getState(){return this.wire.sendAction(\"get-window-state\",this.identity).then((({payload:e})=>e.data))}getWebWindow(){return this.wire.sendAction(\"window-get-web-window\",this.identity).catch((e=>{})),this.wire.environment.getWebWindow(this.identity)}isMainWindow(){return this.wire.sendAction(\"window-is-main-window\",this.identity).catch((e=>{})),this.me.uuid===this.me.name}isShowing(){return this.wire.sendAction(\"is-window-showing\",this.identity).then((({payload:e})=>e.data))}maximize(){return this.wire.sendAction(\"maximize-window\",this.identity).then((()=>{}))}minimize(){return this.wire.sendAction(\"minimize-window\",this.identity).then((()=>{}))}moveBy(e,t,n){return this.wire.sendAction(\"move-window-by\",{deltaLeft:e,deltaTop:t,positioningOptions:n,...this.identity}).then((()=>{}))}moveTo(e,t,n){return this.wire.sendAction(\"move-window\",{left:e,top:t,positioningOptions:n,...this.identity}).then((()=>{}))}resizeBy(e,t,n,i){return this.wire.sendAction(\"resize-window-by\",{deltaWidth:Math.floor(e),deltaHeight:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}resizeTo(e,t,n,i){return this.wire.sendAction(\"resize-window\",{width:Math.floor(e),height:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}restore(){return this.wire.sendAction(\"restore-window\",this.identity).then((()=>{}))}setAsForeground(){return this.wire.sendAction(\"set-foreground-window\",this.identity).then((()=>{}))}setBounds(e,t){return this.wire.sendAction(\"set-window-bounds\",{...e,...this.identity,positioningOptions:t}).then((()=>{}))}show(e=!1){return this.wire.sendAction(\"show-window\",{force:e,...this.identity}).then((()=>{}))}showAt(e,t,n=!1){return this.wire.sendAction(\"show-at-window\",{force:n,left:Math.floor(e),top:Math.floor(t),...this.identity}).then((()=>{}))}updateOptions(e){return this.wire.sendAction(\"update-window-options\",{options:e,...this.identity}).then((()=>{}))}authenticate(e,t){return this.wire.sendAction(\"window-authenticate\",{userName:e,password:t,...this.identity}).then((()=>{}))}async showPopupMenu(e){const{payload:t}=await this.wire.sendAction(\"show-popup-menu\",{options:e,...this.identity});return t.data}async closePopupMenu(){return this.wire.sendAction(\"close-popup-menu\",{...this.identity}).then((()=>{}))}async dispatchPopupResult(e){this.wire.sendAction(\"window-dispatch-popup-result\",this.identity).catch((e=>{})),await this.wire.sendAction(\"dispatch-popup-result\",{data:e,...this.identity})}async print(e={content:\"self\"}){switch(e.content){case void 0:case\"self\":return super.print(e);case\"screenshot\":return this.wire.sendAction(\"print-screenshot\",this.identity).then((()=>{}));case\"views\":return this.wire.sendAction(\"print-views\",{...this.identity,options:e}).then((()=>{}));default:return}}}return S._Window=o,S}function ie(){return te||(te=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(function(){if(ee)return _;ee=1,Object.defineProperty(_,\"__esModule\",{value:!0}),_._WindowModule=void 0;const e=d,t=O,n=ne();class i extends e.Base{async wrap(e){this.wire.sendAction(\"window-wrap\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}wrapSync(e){this.wire.sendAction(\"window-wrap-sync\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}create(e){return this.wire.sendAction(\"create-window\").catch((e=>{})),new n._Window(this.wire,{uuid:this.me.uuid,name:e.name}).createWindow(e)}getCurrent(){if(this.wire.sendAction(\"get-current-window\").catch((e=>{})),!this.wire.me.isWindow)throw new Error(\"You are not in a Window context\");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction(\"get-current-window-sync\").catch((e=>{})),!this.wire.me.isWindow)throw new Error(\"You are not in a Window context\");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return _._WindowModule=i,_}(),e),n(ne(),e)}(M)),M}Q.promisifySubscription=async(e,t,n=(()=>!0),i)=>{let r,o,s;const a=new Promise(((e,t)=>{r=e,o=t})),c=e=>{n(e)&&(clearTimeout(s),r(e))};return await e.on(t,c),i&&(s=setTimeout((()=>o(new Error(\"event timed out\"))),i)),a.finally((()=>{e.removeListener(t,c).catch((()=>null))})),{getValue:()=>a}},Object.defineProperty(c,\"__esModule\",{value:!0}),c.System=void 0;const re=d,oe=g,se=ie(),ae=t;class ce extends re.EmitterBase{constructor(e){super(e,\"system\")}sendExternalProcessRequest(e,t){return new Promise(((n,i)=>{const r=\"external-process-exited\";let o,s,a,c;\"function\"==typeof t.listener&&(a=e=>{const n=e||{};s={topic:\"exited\",uuid:n.processUuid||\"\",exitCode:n.exitCode||0},o===e.processUuid&&(t.listener(s),c.removeListener(r,a))},this.wire.me.name||(this.wire.me.name=this.wire.me.uuid),c=new se._Window(this.wire,this.wire.me),c.on(r,a)),this.wire.sendAction(e,t).then((({payload:e})=>{o=e.data.uuid,n(e.data),s&&o===s.uuid&&(t.listener(s),c.removeListener(r,a))})).catch((e=>{c&&c.removeListener(r,a),i(e)}))}))}getVersion(){return this.wire.sendAction(\"get-version\").then((({payload:e})=>e.data))}clearCache(e){return this.wire.sendAction(\"clear-cache\",e).then((()=>{}))}deleteCacheOnExit(){return this.wire.sendAction(\"delete-cache-request\").then((()=>{}))}exit(){return this.wire.sendAction(\"exit-desktop\").then((()=>{}))}async fetchManifest(e){const{payload:{data:t}}=await this.wire.sendAction(\"fetch-manifest\",{manifestUrl:e});return t}flushCookieStore(){return this.wire.sendAction(\"flush-cookie-store\").then((()=>{}))}getAllWindows(){return this.wire.sendAction(\"get-all-windows\").then((({payload:e})=>e.data))}getAllApplications(){return this.wire.sendAction(\"get-all-applications\").then((({payload:e})=>e.data))}getCommandLineArguments(){return this.wire.sendAction(\"get-command-line-arguments\").then((({payload:e})=>e.data))}async getCrashReporterState(){const{payload:{data:{diagnosticMode:e,isRunning:t}}}=await this.wire.sendAction(\"get-crash-reporter-state\");return console.warn(\"diagnosticMode property is deprecated. It will be removed in a future version\"),{diagnosticMode:e,diagnosticsMode:e,isRunning:t}}async startCrashReporter(e){const t=e,n={...t,diagnosticMode:t.diagnosticsMode||t.diagnosticMode},{payload:{data:{diagnosticMode:i,isRunning:r}}}=await this.wire.sendAction(\"start-crash-reporter\",n);return{diagnosticMode:i,diagnosticsMode:i,isRunning:r}}getUniqueUserId(){return this.wire.sendAction(\"get-unique-user-id\").then((({payload:e})=>e.data))}getEntityInfo(e,t){return this.wire.sendAction(\"get-entity-info\",{uuid:e,name:t}).then((({payload:e})=>e.data))}getEnvironmentVariable(e){return this.wire.sendAction(\"get-environment-variable\",{environmentVariables:e}).then((({payload:e})=>e.data))}getFocusedWindow(){return this.wire.sendAction(\"get-focused-window\").then((({payload:e})=>e.data))}async isAppCertified(e){const{payload:{data:{certifiedInfo:t}}}=await this.wire.sendAction(\"is-app-certified\",{manifestUrl:e});return t}getInstalledRuntimes(){return this.wire.sendAction(\"get-installed-runtimes\").then((({payload:e})=>e.data.runtimes))}async getInstalledApps(){const{payload:{data:{installedApps:e}}}=await this.wire.sendAction(\"get-installed-apps\");return e}getLog(e){return this.wire.sendAction(\"view-log\",e).then((({payload:e})=>e.data))}getMachineId(){return this.wire.sendAction(\"get-machine-id\").then((({payload:e})=>e.data))}getMinLogLevel(){return this.wire.sendAction(\"get-min-log-level\").then((({payload:e})=>e.data))}getLogList(){return this.wire.sendAction(\"list-logs\").then((({payload:e})=>e.data))}getMonitorInfo(){return this.wire.sendAction(\"get-monitor-info\").then((({payload:e})=>e.data))}getMousePosition(){return this.wire.sendAction(\"get-mouse-position\").then((({payload:e})=>e.data))}getProcessList(){return console.warn(\"System.getProcessList has been deprecated. Please consider using our new process APIs: Window.getProcessInfo, View.getProcessInfo, Application.getProcessInfo, System.getAllProcessInfo\"),this.wire.sendAction(\"process-snapshot\").then((({payload:e})=>e.data))}async getAllProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction(\"get-all-process-info\",this.identity);return e}getProxySettings(){return this.wire.sendAction(\"get-proxy-settings\").then((({payload:e})=>e.data))}getRuntimeInfo(){return this.wire.sendAction(\"get-runtime-info\").then((({payload:e})=>e.data))}getRvmInfo(){return this.wire.sendAction(\"get-rvm-info\").then((({payload:e})=>e.data))}getHostSpecs(){return this.wire.sendAction(\"get-host-specs\").then((({payload:e})=>e.data))}getOSInfo(){return this.wire.sendAction(\"get-os-info\").then((({payload:e})=>e.data))}launchExternalProcess(e){return this.sendExternalProcessRequest(\"launch-external-process\",e)}monitorExternalProcess(e){return this.sendExternalProcessRequest(\"monitor-external-process\",e)}log(e,t){return this.wire.sendAction(\"write-to-log\",{level:e,message:t}).then((()=>{}))}openUrlWithBrowser(e){return this.wire.sendAction(\"open-url-with-browser\",{url:e}).then((()=>{}))}async registerCustomProtocol(e){if(\"object\"!=typeof e)throw new Error(\"Must provide an object with a `protocolName` property having a string value.\");await this.wire.sendAction(\"register-custom-protocol\",e)}async unregisterCustomProtocol(e){await this.wire.sendAction(\"unregister-custom-protocol\",{protocolName:e})}async getCustomProtocolState(e){return this.wire.sendAction(\"get-custom-protocol-state\",{protocolName:e}).then((({payload:e})=>e.data))}releaseExternalProcess(e){return this.wire.sendAction(\"release-external-process\",{uuid:e}).then((()=>{}))}showDeveloperTools(e){return this.wire.sendAction(\"show-developer-tools\",e).then((()=>{}))}terminateExternalProcess(e){return this.wire.sendAction(\"terminate-external-process\",e).then((()=>{}))}updateProxySettings(e){return this.wire.sendAction(\"update-proxy\",e).then((()=>{}))}async downloadAsset(e,t){const n=()=>{};let i=n,r=n;const o=new Promise(((e,t)=>{i=e,r=t}));if(\"openfin\"!==this.wire.environment.type)throw new oe.NotSupportedError(\"downloadAsset only supported in an OpenFin Render process\");const s=oe.RuntimeError.getCallSite(),a=this.wire.environment.getNextMessageId().toString(),c=`asset-download-progress-${a}`,d=`asset-download-error-${a}`,h=`asset-download-complete-${a}`,l=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},u=()=>{this.removeListener(c,l)};await Promise.all([this.on(c,l),this.once(d,(e=>{u();const{reason:t,err:n}=e;r(new oe.RuntimeError({reason:t,error:n},s))})),this.once(h,(()=>{u(),i()}))]);const p=Object.assign(e,{downloadId:a});return await this.wire.sendAction(\"download-asset\",p).catch((e=>{throw u(),e})),o}downloadRuntime(e,t){const n=oe.RuntimeError.getCallSite();return new Promise(((i,r)=>{if(\"openfin\"!==this.wire.environment.type)return void r(new oe.NotSupportedError(\"downloadRuntime only supported in an OpenFin Render process\"));const o=this.wire.environment.getNextMessageId().toString(),s=`runtime-download-progress-${o}`,a=`runtime-download-error-${o}`,c=`runtime-download-complete-${o}`,d=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},h=()=>{this.removeListener(s,d)};this.on(s,d),this.once(a,(e=>{h();const{reason:t,err:i}=e;r(new oe.RuntimeError({reason:t,error:i},n))})),this.once(c,(()=>{h(),i()}));const l=Object.assign(e,{downloadId:o});this.wire.sendAction(\"download-runtime\",l).catch((e=>{h(),r(e)}))}))}downloadPreloadScripts(e){return this.wire.sendAction(\"download-preload-scripts\",{scripts:e}).then((({payload:e})=>e.data))}getAllExternalApplications(){return this.wire.sendAction(\"get-all-external-applications\").then((({payload:e})=>e.data))}getAppAssetInfo(e){return this.wire.sendAction(\"get-app-asset-info\",e).then((({payload:e})=>e.data))}getCookies(e){const t=this.wire.environment.getUrl(),n=Object.assign(e,{url:t});return this.wire.sendAction(\"get-cookies\",n).then((({payload:e})=>e.data))}setMinLogLevel(e){return this.wire.sendAction(\"set-min-log-level\",{level:e}).then((()=>{}))}resolveUuid(e){return this.wire.sendAction(\"resolve-uuid\",{entityKey:e}).then((({payload:e})=>e.data))}executeOnRemote(e,t){return t.requestingIdentity=e,this.wire.ferryAction(t)}readRegistryValue(e,t,n){return this.wire.sendAction(\"read-registry-value\",{rootKey:e,subkey:t,value:n}).then((({payload:e})=>e.data))}registerExternalConnection(e){return this.wire.sendAction(\"register-external-connection\",{uuid:e}).then((({payload:e})=>e.data))}async getServiceConfiguration(e){if(\"string\"!=typeof e.name)throw new Error(\"Must provide an object with a `name` property having a string value\");const{name:t}=e;return this.wire.sendAction(\"get-service-configuration\",{name:t}).then((({payload:e})=>e.data))}async getSystemAppConfig(e){if(\"string\"!=typeof e)throw new Error(\"Must provide a string value for name of system app\");return this.wire.sendAction(\"get-system-app-configuration\",{name:e}).then((({payload:e})=>e.data))}async registerShutdownHandler(e){this.wire.sendAction(\"system-register-shutdown-handler\").catch((e=>{}));const{uuid:t,name:n}=this.wire.me;this.on(\"system-shutdown\",(i=>{e({proceed:()=>{this.wire.environment.raiseEvent(\"application/system-shutdown-handled\",{uuid:t,name:n,topic:\"application\"})}})}))}runRvmHealthCheck(){return this.wire.sendAction(\"run-rvm-health-check\").then((({payload:e})=>e.data))}async launchManifest(e,t={}){const{subscribe:n,...i}=t,r=i;if(n){const e=new ae.EventEmitter;n(e);const t=\"app-version-progress\",i=\"runtime-status\",o=\"app-version-complete\",s=\"app-version-error\",a=this.wire.environment.getNextMessageId().toString();r.appVersionId=a;const c=[o,t,i,s],d=e=>{const{appVersionId:t,topic:n,type:i,...r}=e;return{...r,type:c.find((e=>i.includes(e)))}},h=t=>{const n=d(t);e.emit(n.type,n)},l=()=>{this.removeListener(`${t}.${a}`,h),this.removeListener(`${i}.${a}`,h),this.removeListener(`${o}.${a}`,h),this.removeListener(`${s}.${a}`,h),this.removeListener(`${o}.${a}`,l),this.removeListener(`${s}.${a}`,l)};await Promise.all([this.on(`${t}.${a}`,h),this.on(`${i}.${a}`,h),this.once(`${o}.${a}`,h),this.once(`${s}.${a}`,h),this.once(`${o}.${a}`,l),this.once(`${s}.${a}`,l)])}return(await this.wire.sendAction(\"launch-manifest\",{manifestUrl:e,opts:r})).payload.data.manifest}async queryPermissionForCurrentContext(e){const t={uuid:this.wire.me.uuid,name:this.wire.me.name};return(await this.wire.sendAction(\"query-permission-for-current-context\",{apiName:e,identity:t})).payload.data}async enableNativeWindowIntegrationProvider(e){const{payload:t}=await this.wire.sendAction(\"enable-native-window-integration-provider\",{permissions:e});return t.data}async registerUsage({data:e,type:t}){await this.wire.sendAction(\"register-usage\",{data:e,type:t})}async getPrinters(){const{payload:e}=await this.wire.sendAction(\"system-get-printers\");return e.data}async updateProcessLoggingOptions(e){await this.wire.sendAction(\"system-update-process-logging-options\",{options:e})}async getDomainSettings(){const{payload:{data:e}}=await this.wire.sendAction(\"get-domain-settings\",this.identity);return e}async setDomainSettings(e){await this.wire.sendAction(\"set-domain-settings\",{domainSettings:e,...this.identity})}async refreshExtensions(){const{payload:e}=await this.wire.sendAction(\"refresh-extensions\");return e.data}async getInstalledExtensions(){const{payload:e}=await this.wire.sendAction(\"get-installed-extensions\");return e.data}}c.System=ce;var de={},he={};Object.defineProperty(he,\"__esModule\",{value:!0}),he.RefCounter=void 0;he.RefCounter=class{constructor(){this.topicRefMap=new Map}incRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t+1;n=i,this.topicRefMap.set(e,i)}else this.topicRefMap.set(e,1),n=1;return n}decRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t-1;this.topicRefMap.set(e,i),n=i}else n=-1;return n}actOnFirst(e,t,n){return 1===this.incRefCount(e)?t():n()}actOnLast(e,t,n){return 0===this.decRefCount(e)?t():n()}};var le={},ue={},pe={};Object.defineProperty(pe,\"__esModule\",{value:!0}),pe.ChannelBase=pe.ProtectedItems=void 0;const we=e=>async(t,n,i)=>{const r=await e(t,n,i);return void 0===r?n:r};pe.ProtectedItems=class{constructor(e,t){this.providerIdentity=e,this.close=t}};class ye{static defaultAction(e){throw new Error(`No action registered at target for ${e}`)}constructor(){this.subscriptions=new Map}async processAction(e,t,n){try{const i=this.subscriptions.has(e)?this.subscriptions.get(e):(t,n)=>(this.defaultAction??ye.defaultAction)(e,t,n),r=this.preAction?await this.preAction(e,t,n):t,o=await i(r,n);return this.postAction?await this.postAction(e,o,n):o}catch(t){if(this.errorMiddleware)return this.errorMiddleware(e,t,n);throw t}}beforeAction(e){if(this.preAction)throw new Error(\"Already registered beforeAction middleware\");this.preAction=we(e)}onError(e){if(this.errorMiddleware)throw new Error(\"Already registered error middleware\");this.errorMiddleware=e}afterAction(e){if(this.postAction)throw new Error(\"Already registered afterAction middleware\");this.postAction=we(e)}remove(e){this.subscriptions.delete(e)}setDefaultAction(e){if(this.defaultAction)throw new Error(\"default action can only be set once\");this.defaultAction=e}register(e,t){if(this.subscriptions.has(e))throw new Error(`Subscription already registered for action: ${e}. Unsubscribe before adding new subscription`);return this.subscriptions.set(e,t),!0}}pe.ChannelBase=ye;var fe,ge,me,ve=s&&s.__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)},Ce=s&&s.__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};Object.defineProperty(ue,\"__esModule\",{value:!0}),ue.ChannelClient=void 0;const be=pe,Ie=new Map;class Ee extends be.ChannelBase{static closeChannelByEndpointId(e){const t=Ie.get(e);t&&ve(t,me,\"f\").call(t)}static handleProviderDisconnect(e){for(const t of Ie.values())t.providerIdentity.channelId===e.channelId&&(t.disconnectListener(e),ve(t,me,\"f\").call(t))}constructor(e,t,n){super(),fe.set(this,void 0),ge.set(this,void 0),this.processAction=(e,t,n)=>super.processAction(e,t,n),me.set(this,(()=>{Ie.delete(this.endpointId),ve(this,ge,\"f\").close()})),Ce(this,fe,new be.ProtectedItems(e,t),\"f\"),this.disconnectListener=()=>{},this.endpointId=e.endpointId,Ce(this,ge,n,\"f\"),Ie.set(this.endpointId,this),n.receive(this.processAction)}get providerIdentity(){return ve(this,fe,\"f\").providerIdentity}async dispatch(e,t){if(ve(this,ge,\"f\").isEndpointConnected(this.providerIdentity.channelId))return ve(this,ge,\"f\").send(this.providerIdentity.channelId,e,t);throw new Error(\"The client you are trying to dispatch from is disconnected from the target provider.\")}onDisconnection(e){this.disconnectListener=t=>{try{e(t)}catch(e){throw new Error(`Error while calling the onDisconnection callback: ${e.message}`)}finally{this.disconnectListener=()=>{}}}}async disconnect(){await this.sendDisconnectAction(),ve(this,me,\"f\").call(this)}async sendDisconnectAction(){const e=ve(this,fe,\"f\");await e.close()}static async wireClose(e,t,n){const{channelName:i,uuid:r,name:o}=t;await e.sendAction(\"disconnect-from-channel\",{channelName:i,uuid:r,name:o,endpointId:n})}}ue.ChannelClient=Ee,fe=new WeakMap,ge=new WeakMap,me=new WeakMap;var xe={},Ae={};Object.defineProperty(Ae,\"__esModule\",{value:!0}),Ae.exhaustiveCheck=void 0,Ae.exhaustiveCheck=function(e,t){throw new Error(`Unsupported value: ${e}${t?`\\n Supported values are: ${t.join(\"\")}`:\"\"}`)};var Pe,Me,_e,Oe={},Se=s&&s.__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},Re=s&&s.__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)};Object.defineProperty(Oe,\"__esModule\",{value:!0}),Oe.ClassicInfo=Oe.ClassicStrategy=void 0;Oe.ClassicStrategy=class{constructor(e,t,n,i){this.messageReceiver=t,this.endpointId=n,this.providerIdentity=i,Pe.set(this,void 0),Me.set(this,new Map),_e.set(this,new Map),this.send=async(e,t,n)=>{const i=Re(this,Me,\"f\").get(e);if(!i)throw new Error(`Could not locate routing info for endpoint ${e}`);const r={...i};r.isLocalEndpointId&&delete r.endpointId,delete r.isLocalEndpointId;const o=Re(this,Pe,\"f\").sendAction(\"send-channel-message\",{...r,providerIdentity:this.providerIdentity,action:t,payload:n});Re(this,_e,\"f\").get(e)?.add(o);return(await o.catch((e=>{throw new Error(e.message)})).finally((()=>{Re(this,_e,\"f\").get(e)?.delete(o)}))).payload.data.result},this.close=async()=>{this.messageReceiver.removeEndpoint(this.providerIdentity.channelId,this.endpointId),[...Re(this,Me,\"f\").keys()].forEach((e=>this.closeEndpoint(e))),Se(this,Me,new Map,\"f\")},Se(this,Pe,e,\"f\")}onEndpointDisconnect(e,t){}receive(e){this.messageReceiver.addEndpoint(e,this.providerIdentity.channelId,this.endpointId)}async closeEndpoint(e){const t=Re(this,Me,\"f\").get(e);Re(this,Me,\"f\").delete(e);const n=Re(this,_e,\"f\").get(e);n?.forEach((n=>{const i=`Channel connection with identity uuid: ${t?.uuid} / name: ${t?.name} / endpointId: ${e} no longer connected.`;n.cancel(new Error(i))}))}isEndpointConnected(e){return Re(this,Me,\"f\").has(e)}addEndpoint(e,t){Re(this,Me,\"f\").set(e,t.endpointIdentity),Re(this,_e,\"f\").set(e,new Set)}isValidEndpointPayload(e){return\"string\"==typeof e?.endpointIdentity?.endpointId||\"string\"==typeof e?.endpointIdentity?.channelId}},Pe=new WeakMap,Me=new WeakMap,_e=new WeakMap,Oe.ClassicInfo={version:5,minimumVersion:0,type:\"classic\"};var Fe={},je={},ke={};Object.defineProperty(ke,\"__esModule\",{value:!0}),ke.errorToPOJO=void 0,ke.errorToPOJO=function(e){return{stack:e.stack,name:e.name,message:e.message,toString:()=>e.stack||e.toString()}};var Le,Te,$e=s&&s.__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)},Be=s&&s.__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};Object.defineProperty(je,\"__esModule\",{value:!0}),je.RTCEndpoint=void 0;const Ge=ke;je.RTCEndpoint=class{static isValidEndpointPayload(e){const t=e=>\"object\"==typeof e&&null!==e;return t(e)&&t(e.endpointIdentity)&&t(e.rtc)&&\"string\"==typeof e.endpointIdentity.endpointId}constructor({rtc:e,endpointIdentity:t}){this.responseMap=new Map,Le.set(this,null),Te.set(this,void 0),this.connectionStateChangeHandler=e=>{\"connected\"!==this.rtc.rtcClient.connectionState&&(this.rtc.rtcClient.removeEventListener(\"connectionstatechange\",this.connectionStateChangeHandler),this.close(),$e(this,Te,\"f\")&&$e(this,Te,\"f\").call(this))},this.send=async(e,t)=>{const n=`message-${Math.random()}`,i=new Promise(((e,t)=>{this.responseMap.set(n,{resolve:e,reject:t})}));return this.rtc.channels.request.send(JSON.stringify({action:e,payload:t,messageId:n})),i},this.close=()=>{this.responseMap.forEach((e=>e.reject(\"Connection has closed.\"))),this.responseMap=new Map,this.rtc.channels.request.close(),this.rtc.channels.response.close(),this.rtc.rtcClient.close()},this.rtc=e,this.endpointIdentity=t,this.rtc.channels.response.addEventListener(\"message\",(e=>{let{data:t}=e;e.data instanceof ArrayBuffer&&(t=(new TextDecoder).decode(e.data));const{messageId:n,payload:i,success:r,error:o}=JSON.parse(t),{resolve:s,reject:a}=this.responseMap.get(n)??{};s&&a?(this.responseMap.delete(n),r?s(i):a(o)):(console.log(\"Could not find id in responseMap.\"),console.log(e))})),this.rtc.channels.request.addEventListener(\"message\",(async e=>{let{data:n}=e;e.data instanceof ArrayBuffer&&(n=(new TextDecoder).decode(e.data));const{messageId:i,action:r,payload:o}=JSON.parse(n);if($e(this,Le,\"f\"))try{const e=await $e(this,Le,\"f\").call(this,r,o,t);this.rtc.channels.response.send(JSON.stringify({messageId:i,payload:e,success:!0}))}catch(e){\"open\"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,error:(0,Ge.errorToPOJO)(e),success:!1}))}else\"open\"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,success:!1,error:\"Connection not ready.\"}))})),this.rtc.rtcClient.addEventListener(\"connectionstatechange\",this.connectionStateChangeHandler),Object.values(this.rtc.channels).forEach((e=>{e.onclose=e=>{[...this.responseMap.values()].forEach((e=>e.reject(new Error(\"RTCDataChannel closed unexpectedly, this is most commonly caused by message size. Note: RTC Channels have a message size limit of ~255kB.\")))),this.close(),$e(this,Te,\"f\")&&$e(this,Te,\"f\").call(this)}}))}onDisconnect(e){if($e(this,Te,\"f\"))throw new Error(\"RTCEndpoint disconnectListener cannot be set twice.\");Be(this,Te,e,\"f\")}receive(e){if($e(this,Le,\"f\"))throw new Error(\"You have already set a listener for this RTC Endpoint.\");Be(this,Le,e,\"f\")}get connected(){return\"connected\"===this.rtc.rtcClient.connectionState}},Le=new WeakMap,Te=new WeakMap;var We,He,Ne,De={},Ue=s&&s.__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)},Ve=s&&s.__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};Object.defineProperty(De,\"__esModule\",{value:!0}),De.EndpointStrategy=void 0;De.EndpointStrategy=class{constructor(e,t,n){this.EndpointType=e,this.StrategyName=n,We.set(this,null),He.set(this,new Map),Ne.set(this,!0),this.send=async(e,t,n)=>this.getEndpointById(e).send(t,n),this.close=async()=>{Ue(this,Ne,\"f\")&&(Ue(this,He,\"f\").forEach((e=>e.close())),Ve(this,He,new Map,\"f\")),Ve(this,Ne,!1,\"f\")},this.isValidEndpointPayload=t}onEndpointDisconnect(e,t){this.getEndpointById(e).onDisconnect(t)}receive(e){if(Ue(this,We,\"f\"))throw new Error(`You have already set a listener for this ${this.StrategyName} Strategy`);Ve(this,We,e,\"f\"),Ue(this,He,\"f\").forEach((e=>e.receive(Ue(this,We,\"f\"))))}getEndpointById(e){const t=Ue(this,He,\"f\").get(e);if(!t)throw new Error(`Client with endpoint id ${e} is not connected`);return t}get connected(){return Ue(this,Ne,\"f\")}isEndpointConnected(e){return Ue(this,He,\"f\").has(e)}addEndpoint(e,t){if(!Ue(this,Ne,\"f\"))return void console.warn(`Adding endpoint to disconnected ${this.StrategyName} Strategy`);const n=new this.EndpointType(t);Ue(this,We,\"f\")&&n.receive(Ue(this,We,\"f\")),Ue(this,He,\"f\").set(e,n)}async closeEndpoint(e){Ue(this,He,\"f\").delete(e)}},We=new WeakMap,He=new WeakMap,Ne=new WeakMap,Object.defineProperty(Fe,\"__esModule\",{value:!0}),Fe.RTCInfo=Fe.RTCStrategy=void 0;const ze=je,Ke=De;class qe extends Ke.EndpointStrategy{constructor(){super(ze.RTCEndpoint,ze.RTCEndpoint.isValidEndpointPayload,\"RTC\")}}Fe.RTCStrategy=qe,Fe.RTCInfo={version:2,minimumVersion:0,type:\"rtc\"};var Je={};Object.defineProperty(Je,\"__esModule\",{value:!0}),Je.RTCICEManager=void 0;const Ye=d;class Ze extends Ye.EmitterBase{constructor(e){super(e,\"channel\"),this.ensureChannelOpened=e=>new Promise(((t,n)=>{if(\"open\"===e.readyState)t();else if(\"connecting\"===e.readyState){const n=()=>{e.removeEventListener(\"open\",n),t()};e.addEventListener(\"open\",n)}else n(new Error(\"This Channel has already closed\"))}))}static createDataChannelPromise(e,t){let n;const i=new Promise((e=>{n=e})),r=i=>{const o=()=>{i.channel.removeEventListener(\"open\",o),n(i.channel)};i.channel.label===e&&(i.channel.addEventListener(\"open\",o),t.removeEventListener(\"datachannel\",r))};return t.addEventListener(\"datachannel\",r),i}async listenForProviderIce(e,t){await this.on(this.createProviderEventName(e),t,{timestamp:Date.now()})}async raiseProviderIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createProviderEventName(e)),t)}async listenForClientIce(e,t){await this.on(this.createClientEventName(e),t,{timestamp:Date.now()})}async raiseClientIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createClientEventName(e)),t)}cleanupIceListeners(e){this.removeAllListeners(this.createClientEventName(e)),this.removeAllListeners(this.createProviderEventName(e))}createClientEventName(e){return`ice-client-${e}`}createProviderEventName(e){return`ice-provider-${e}`}createRouteString(e){return`channel/${e}`}createRtcPeer(){return this.wire.environment.getRtcPeer()}async startClientOffer(){const e=Math.random().toString(),t=this.createRtcPeer();t.addEventListener(\"icecandidate\",(async t=>{t.candidate&&await this.raiseClientIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForProviderIce(e,(async e=>{await t.addIceCandidate(e.candidate)}));const n={request:t.createDataChannel(\"request\"),response:t.createDataChannel(\"response\")},i=await t.createOffer();await t.setLocalDescription(i);const r=Promise.all([n.request,n.response].map(this.ensureChannelOpened)).then((()=>{}));return{rtcClient:t,channels:n,offer:i,rtcConnectionId:e,channelsOpened:r}}async finishClientOffer(e,t,n){return await e.setRemoteDescription(t),await n,!0}async createProviderAnswer(e,t){const n=this.createRtcPeer(),i=Ze.createDataChannelPromise(\"request\",n),r=Ze.createDataChannelPromise(\"response\",n);n.addEventListener(\"icecandidate\",(async t=>{t.candidate&&await this.raiseProviderIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForClientIce(e,(async e=>{await n.addIceCandidate(e.candidate)})),await n.setRemoteDescription(t);const o=await n.createAnswer();await n.setLocalDescription(o);const s=Promise.all([i,r]).then((([t,n])=>(this.cleanupIceListeners(e),{request:t,response:n})));return{rtcClient:n,answer:o,channels:s}}}Je.RTCICEManager=Ze;var Qe={},Xe={};function et(e){return[...e.split(\".\").reverse().entries()].reduce(((e,[t,n])=>e+ +n*1e4**t),0)}function tt(e,t){return et(e)>=et(t)}function nt(e){return e.split(\"/\")[0]}Object.defineProperty(Xe,\"__esModule\",{value:!0}),Xe.runtimeUuidMeetsMinimumRuntimeVersion=Xe.parseRuntimeUuid=Xe.meetsMinimumRuntimeVersion=void 0,Xe.meetsMinimumRuntimeVersion=tt,Xe.parseRuntimeUuid=nt,Xe.runtimeUuidMeetsMinimumRuntimeVersion=function(e,t){return tt(nt(e),t)};var it,rt,ot,st,at,ct=s&&s.__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)},dt=s&&s.__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};Object.defineProperty(Qe,\"__esModule\",{value:!0}),Qe.ChannelProvider=void 0;const ht=pe,lt=Xe;class ut extends ht.ChannelBase{get connections(){return[...ct(this,it,\"f\")]}static handleClientDisconnection(e,t){const n=e.connections.find((e=>e.endpointId===t.endpointId));if(n)ct(e,st,\"f\").call(e,n);else{e.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name)).forEach(ct(e,st,\"f\"))}e.disconnectListener(t)}static setProviderRemoval(e,t){ut.removalMap.set(e,t)}constructor(e,t,n){super(),it.set(this,void 0),rt.set(this,void 0),ot.set(this,void 0),st.set(this,(e=>{const t=this.connections.filter((t=>t.endpointId!==e.endpointId));ct(this,ot,\"f\").closeEndpoint(e.endpointId),dt(this,it,t,\"f\")})),this.processAction=async(e,t,n)=>(ut.clientIsMultiRuntime(n)&&!(0,lt.runtimeUuidMeetsMinimumRuntimeVersion)(n.runtimeUuid,\"18.87.56.0\")?this.handleMultiRuntimeLegacyClient(n):this.checkForClientConnection(n),super.processAction(e,t,n)),at.set(this,(()=>{ct(this,ot,\"f\").close();const e=ut.removalMap.get(this);e&&e()})),dt(this,rt,new ht.ProtectedItems(e,t),\"f\"),this.connectListener=()=>{},this.disconnectListener=()=>{},dt(this,it,[],\"f\"),dt(this,ot,n,\"f\"),n.receive(this.processAction)}dispatch(e,t,n){const i=e.endpointId??this.getEndpointIdForOpenFinId(e,t);return i&&ct(this,ot,\"f\").isEndpointConnected(i)?ct(this,ot,\"f\").send(i,t,n):Promise.reject(new Error(`Client connection with identity uuid: ${e.uuid} / name: ${e.name} / endpointId: ${i} no longer connected.`))}async processConnection(e,t){return ct(this,it,\"f\").push(e),this.connectListener(e,t)}publish(e,t){return this.connections.map((n=>ct(this,ot,\"f\").send(n.endpointId,e,t)))}onConnection(e){this.connectListener=e}onDisconnection(e){this.disconnectListener=e}async destroy(){const e=ct(this,rt,\"f\");e.providerIdentity,dt(this,it,[],\"f\"),await e.close(),ct(this,at,\"f\").call(this)}async getAllClientInfo(){return this.connections.map((e=>{const{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}=e;return{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}}))}checkForClientConnection(e){if(!this.isClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider.\\n Client Identity: {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}isClientConnected(e){return ut.clientIdentityIncludesEndpointId(e)?this.connections.some((t=>t.endpointId===e.endpointId&&t.uuid===e.uuid&&t.name===e.name)):this.isLegacyClientConnected(e)}isLegacyClientConnected(e){return this.connections.some((t=>t.uuid===e.uuid&&t.name===e.name))}handleMultiRuntimeLegacyClient(e){if(!this.isLegacyClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider. Client Identity:\\n {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}getEndpointIdForOpenFinId(e,t){const n=this.connections.filter((t=>t.name===e.name&&t.uuid===e.uuid));if(n.length>=2){const n=ct(this,rt,\"f\"),{uuid:i,name:r}=e,o=n?.providerIdentity.uuid,s=n?.providerIdentity.name;console.warn(`WARNING: Dispatch call may have unintended results. The \"to\" argument of your dispatch call is missing the\\n \"endpointId\" parameter. The identity you are dispatching to ({uuid: ${i}, name: ${r}})\\n has multiple channelClients for this channel. Your dispatched action: (${t}) from the provider:\\n ({uuid: ${o}, name: ${s}}) will only be processed by the most recently-created client.`)}return n.pop()?.endpointId}static clientIdentityIncludesEndpointId(e){return void 0!==e.endpointId}static clientIsMultiRuntime(e){return void 0!==e.runtimeUuid}static async wireClose(e,t){await e.sendAction(\"destroy-channel\",{channelName:t})}}Qe.ChannelProvider=ut,it=new WeakMap,rt=new WeakMap,ot=new WeakMap,st=new WeakMap,at=new WeakMap,ut.removalMap=new WeakMap;var pt={};Object.defineProperty(pt,\"__esModule\",{value:!0}),pt.MessageReceiver=void 0;const wt=ue,yt=d;class ft extends yt.Base{constructor(e){super(e),this.onmessage=e=>\"process-channel-message\"===e.action&&(this.processChannelMessage(e),!0),this.endpointMap=new Map,this.latestEndpointIdByChannelId=new Map,e.registerMessageHandler(this.onmessage.bind(this))}async processChannelMessage(e){const{senderIdentity:t,providerIdentity:n,action:i,ackToSender:r,payload:o,intendedTargetIdentity:s}=e.payload,a=s.channelId??s.endpointId??this.latestEndpointIdByChannelId.get(n.channelId),c=this.endpointMap.get(a);if(!c)return r.payload.success=!1,r.payload.reason=`Client connection with identity uuid: ${this.wire.me.uuid} / name: ${this.wire.me.name} / endpointId: ${a} no longer connected.`,this.wire.sendRaw(r);try{const e=await c(i,o,t);return r.payload.payload=r.payload.payload||{},r.payload.payload.result=e,this.wire.sendRaw(r)}catch(e){return r.payload.success=!1,r.payload.reason=e.message,this.wire.sendRaw(r)}}addEndpoint(e,t,n){this.endpointMap.set(n,e),t!==n&&this.latestEndpointIdByChannelId.set(t,n)}removeEndpoint(e,t){this.endpointMap.delete(t),this.latestEndpointIdByChannelId.get(e)===t&&this.latestEndpointIdByChannelId.delete(e)}checkForPreviousClientConnection(e){const t=this.latestEndpointIdByChannelId.get(e);t&&(wt.ChannelClient.closeChannelByEndpointId(t),console.warn(\"You have created a second connection to an older provider. First connection has been removed from the clientMap\"),console.warn(\"If the provider calls publish(), you may receive multiple messages.\"))}}pt.MessageReceiver=ft;var gt={};Object.defineProperty(gt,\"__esModule\",{value:!0}),gt.ProtocolManager=void 0;gt.ProtocolManager=class{constructor(e){this.ProtocolsInPreferenceOrder=e,this.DefaultClientProtocols=[\"classic\"],this.DefaultProviderProtocols=[\"classic\"],this.getClientProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultClientProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(\", \")}.`);return t},this.getProviderProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultProviderProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(\", \")}.`);return t},this.getCompatibleProtocols=(e,t)=>t.supportedProtocols.filter((t=>e.some((e=>e.type===t.type&&t.version>=e.minimumVersion&&e.version>=(t.minimumVersion??0))))).slice(0,t.maxProtocols)}};var mt={};Object.defineProperty(mt,\"__esModule\",{value:!0});class vt{static combine(e,t){return new vt(e,t)}constructor(e,t){this.primary=e,this.secondary=t}onEndpointDisconnect(e,t){this.primary.onEndpointDisconnect(e,(()=>{this.secondary.isEndpointConnected(e)||t()})),this.secondary.onEndpointDisconnect(e,(()=>{this.primary.isEndpointConnected(e)||t()}))}isValidEndpointPayload(e){return this.primary.isValidEndpointPayload(e)||this.secondary.isValidEndpointPayload(e)}async closeEndpoint(e){await this.primary.closeEndpoint(e),await this.secondary.closeEndpoint(e)}isEndpointConnected(e){return this.primary.isEndpointConnected(e)||this.secondary.isEndpointConnected(e)}async addEndpoint(e,t){this.primary.isValidEndpointPayload(t)&&await this.primary.addEndpoint(e,t),this.secondary.isValidEndpointPayload(t)&&await this.secondary.addEndpoint(e,t)}receive(e){this.primary.receive(e),this.secondary.receive(e)}send(e,t,n){return this.primary.isEndpointConnected(e)?this.primary.send(e,t,n):this.secondary.send(e,t,n)}async close(){await Promise.all([this.primary.close(),this.secondary.close()])}}mt.default=vt;var Ct,bt,It=s&&s.__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},Et=s&&s.__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)},xt=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(xe,\"__esModule\",{value:!0}),xe.ConnectionManager=void 0;const At=Ae,Pt=d,Mt=Oe,_t=Fe,Ot=Je,St=Qe,Rt=pt,Ft=gt,jt=xt(mt);class kt extends Pt.Base{static getProtocolOptionsFromStrings(e){return e.map((e=>{switch(e){case\"rtc\":return _t.RTCInfo;case\"classic\":return Mt.ClassicInfo;default:return(0,At.exhaustiveCheck)(e,[\"rtc\",\"classic\"])}}))}constructor(e){super(e),Ct.set(this,void 0),bt.set(this,void 0),this.removeChannelFromProviderMap=e=>{this.providerMap.delete(e)},this.onmessage=e=>\"process-channel-connection\"===e.action&&(this.processChannelConnection(e),!0),this.providerMap=new Map,this.protocolManager=new Ft.ProtocolManager(\"node\"===this.wire.environment.type?[\"classic\"]:[\"rtc\",\"classic\"]),It(this,Ct,new Rt.MessageReceiver(e),\"f\"),It(this,bt,new Ot.RTCICEManager(e),\"f\"),e.registerMessageHandler(this.onmessage.bind(this))}createProvider(e,t){const n=Object.assign(this.wire.environment.getDefaultChannelOptions().create,e||{}),i=this.protocolManager.getProviderProtocols(n?.protocols),r=i.map((e=>{switch(e){case\"rtc\":return new _t.RTCStrategy;case\"classic\":return new Mt.ClassicStrategy(this.wire,Et(this,Ct,\"f\"),t.channelId,t);default:return(0,At.exhaustiveCheck)(e,[\"rtc\",\"classic\"])}}));let o;if(2===r.length){const[e,t]=r;o=jt.default.combine(e,t)}else{if(1!==r.length)throw new Error(\"failed to combine strategies\");[o]=r}const s=new St.ChannelProvider(t,(()=>St.ChannelProvider.wireClose(this.wire,t.channelName)),o),a=t.channelId;return this.providerMap.set(a,{provider:s,strategy:o,supportedProtocols:kt.getProtocolOptionsFromStrings(i)}),St.ChannelProvider.setProviderRemoval(s,this.removeChannelFromProviderMap.bind(this)),s}async createClientOffer(e){const t=this.protocolManager.getClientProtocols(e?.protocols);let n;return{offer:{supportedProtocols:await Promise.all(t.map((async e=>{switch(e){case\"rtc\":{const{rtcClient:e,channels:t,offer:i,rtcConnectionId:r,channelsOpened:o}=await Et(this,bt,\"f\").startClientOffer();return n={rtcClient:e,channels:t,channelsOpened:o},{type:\"rtc\",version:_t.RTCInfo.version,payload:{offer:i,rtcConnectionId:r}}}case\"classic\":return{type:\"classic\",version:Mt.ClassicInfo.version};default:return(0,At.exhaustiveCheck)(e,[\"rtc\",\"classic\"])}}))),maxProtocols:2},rtc:n}}async createClientStrategy(e,t){t.endpointId||(t.endpointId=this.wire.environment.getNextMessageId(),Et(this,Ct,\"f\").checkForPreviousClientConnection(t.channelId));const n=t.answer??{supportedProtocols:[{type:\"classic\",version:1}]},i=(await Promise.all(n.supportedProtocols.map((async n=>\"rtc\"===n.type&&e?(await Et(this,bt,\"f\").finishClientOffer(e.rtcClient,n.payload.answer,e.channelsOpened),new _t.RTCStrategy):\"classic\"===n.type?new Mt.ClassicStrategy(this.wire,Et(this,Ct,\"f\"),t.endpointId,t):null)))).filter((e=>null!==e));let r;if(e&&!i.some((e=>e instanceof _t.RTCStrategy))&&e&&e.rtcClient.close(),i.length>=2)r=jt.default.combine(i[0],i[1]);else{if(!i.length)throw new Error(\"No compatible protocols\");[r]=i}const o={endpointIdentity:t,rtc:e};return r.addEndpoint(t.channelId,o),r}async processChannelConnection(e){const{clientIdentity:t,providerIdentity:n,ackToSender:i,payload:r,offer:o}=e.payload;t.endpointId?t.isLocalEndpointId=!1:(t.endpointId=this.wire.environment.getNextMessageId(),t.isLocalEndpointId=!0);const s=n.channelId,a=this.providerMap.get(s);if(!a)return i.payload.success=!1,i.payload.reason=`Channel \"${n.channelName}\" has been destroyed.`,this.wire.sendRaw(i);const{provider:c,strategy:d,supportedProtocols:h}=a;try{if(!(c instanceof St.ChannelProvider))throw Error(\"Cannot connect to a channel client\");const e=o??{supportedProtocols:[{type:\"classic\",version:1}],maxProtocols:1},n=this.protocolManager.getCompatibleProtocols(h,e);if(!n.length)throw new Error(\"This provider does not support any of the offered protocols.\");const s=await c.processConnection(t,r);i.payload.payload=i.payload.payload||{};let a={supportedProtocols:[],endpointPayloadPromise:Promise.resolve({endpointIdentity:t})};return a=await n.reduce((async(e,t)=>{const n=await e;if(\"rtc\"===t.type){const{answer:e,rtcClient:i,channels:r}=await Et(this,bt,\"f\").createProviderAnswer(t.payload.rtcConnectionId,t.payload.offer);n.supportedProtocols.push({type:\"rtc\",version:_t.RTCInfo.version,payload:{answer:e}}),n.endpointPayloadPromise=n.endpointPayloadPromise.then((e=>r.then((t=>({...e,rtc:{rtcClient:i,channels:t}})))))}else n.supportedProtocols.push({type:\"classic\",version:Mt.ClassicInfo.version});return n}),Promise.resolve(a)),a.endpointPayloadPromise.then((e=>d.addEndpoint(t.endpointId,e))),i.payload.payload.result=s,i.payload.payload.answer=a,this.wire.sendRaw(i)}catch(e){return i.payload.success=!1,i.payload.reason=e.message,this.wire.sendRaw(i)}}}xe.ConnectionManager=kt,Ct=new WeakMap,bt=new WeakMap;var Lt,Tt,$t,Bt=s&&s.__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},Gt=s&&s.__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)};Object.defineProperty(le,\"__esModule\",{value:!0}),le.Channel=void 0;const Wt=t,Ht=G,Nt=d,Dt=ue,Ut=xe,Vt=Qe;function zt(e){const t=Math.floor(e/10),n=Math.min(3e4,500*2**t);return new Promise((e=>{setTimeout((()=>{e(!1)}),n)}))}class Kt extends Nt.EmitterBase{constructor(e){super(e,\"channel\"),Lt.set(this,void 0),Tt.set(this,new Wt.EventEmitter),$t.set(this,new Ht.AsyncRetryableLazy((async()=>{await Promise.all([this.on(\"disconnected\",(e=>{Dt.ChannelClient.handleProviderDisconnect(e)})),this.on(\"connected\",((...e)=>{Gt(this,Tt,\"f\").emit(\"connected\",...e)}))]).catch((()=>new Error(\"error setting up channel connection listeners\")))}))),Bt(this,Lt,new Ut.ConnectionManager(e),\"f\")}async getAllChannels(){return this.wire.sendAction(\"get-all-channels\").then((({payload:e})=>e.data))}async onChannelConnect(e){await this.on(\"connected\",e)}async onChannelDisconnect(e){await this.on(\"disconnected\",e)}async safeConnect(e,t,n){const i={count:0};do{let r=()=>{};const o=new Promise((t=>{r=n=>{e===n.channelName&&t(!0)},Gt(this,Tt,\"f\").on(\"connected\",r)}));try{if(i.count>0){i.gotConnectedEvent=await Promise.race([zt(i.count),o]);const t=await this.wire.sendAction(\"connect-to-channel\",{...n,retryInfo:i});return console.log(`Successfully connected to channelName: ${e}`),t.payload.data}const t=this.wire.sendAction(\"connect-to-channel\",n);i.originalMessageId=t.messageId;return(await t).payload.data}catch(n){if(!n.message.includes(\"internal-nack\"))throw n;t&&0===i.count&&console.warn(`No channel found for channelName: ${e}. Waiting for connection...`)}finally{i.count+=1,Gt(this,Tt,\"f\").removeListener(\"connected\",r)}}while(t);throw new Error(`No channel found for channelName: ${e}.`)}async connect(e,t={}){if(await Gt(this,$t,\"f\").getValue(),!e||\"string\"!=typeof e)throw new Error(\"Please provide a channelName string to connect to a channel.\");const n={wait:!0,...this.wire.environment.getDefaultChannelOptions().connect,...t},{offer:i,rtc:r}=await Gt(this,Lt,\"f\").createClientOffer(n);let o;(this.fin.me.isFrame||this.fin.me.isView||this.fin.me.isWindow)&&(o=(await this.fin.me.getInfo()).url);const s={channelName:e,...n,offer:i,connectionUrl:o},a=await this.safeConnect(e,n.wait,s),c=await Gt(this,Lt,\"f\").createClientStrategy(r,a),d=new Dt.ChannelClient(a,(()=>Dt.ChannelClient.wireClose(this.wire,a,a.endpointId)),c);return c.onEndpointDisconnect(a.channelId,(async()=>{try{await d.sendDisconnectAction()}catch(e){console.warn(`Something went wrong during disconnect for client with uuid: ${a.uuid} / name: ${a.name} / endpointId: ${a.endpointId}.`)}finally{Dt.ChannelClient.handleProviderDisconnect(a)}})),d}async create(e,t){if(!e)throw new Error(\"Please provide a channelName to create a channel\");const{payload:{data:n}}=await this.wire.sendAction(\"create-channel\",{channelName:e}),i=Gt(this,Lt,\"f\").createProvider(t,n);return this.on(\"client-disconnected\",(t=>{t.channelName===e&&Vt.ChannelProvider.handleClientDisconnection(i,t)})),i}}le.Channel=Kt,Lt=new WeakMap,Tt=new WeakMap,$t=new WeakMap,Object.defineProperty(de,\"__esModule\",{value:!0}),de.InterAppPayload=de.InterApplicationBus=void 0;const qt=t,Jt=d,Yt=he,Zt=le,Qt=O;class Xt extends Jt.Base{constructor(e){super(e),this.events={subscriberAdded:\"subscriber-added\",subscriberRemoved:\"subscriber-removed\"},this.refCounter=new Yt.RefCounter,this.Channel=new Zt.Channel(e),this.emitter=new qt.EventEmitter,e.registerMessageHandler(this.onmessage.bind(this)),this.on=this.emitter.on.bind(this.emitter),this.removeAllListeners=this.emitter.removeAllListeners.bind(this.emitter)}async publish(e,t){await this.wire.sendAction(\"publish-message\",{topic:e,message:t,sourceWindowName:this.me.name})}async send(e,t,n){const i=(0,Qt.validateIdentity)(e);if(i)throw new Error(i);await this.wire.sendAction(\"send-message\",{destinationUuid:e.uuid,destinationWindowName:e.name,topic:t,message:n,sourceWindowName:this.me.name})}subscribe(e,t,n){const i=this.createSubscriptionKey(e.uuid,e.name||\"*\",t);return this.emitter.on(i,n),this.refCounter.actOnFirst(i,(async()=>{await this.wire.sendAction(\"subscribe\",{sourceUuid:e.uuid,sourceWindowName:e.name||\"*\",topic:t,destinationWindowName:this.me.name})}),(()=>Promise.resolve()))}unsubscribe(e,t,n){const i=e.name||\"*\",r=this.createSubscriptionKey(e.uuid,i,t);return this.emitter.removeListener(r,n),this.refCounter.actOnLast(r,(async()=>{await this.wire.sendAction(\"unsubscribe\",{sourceUuid:e.uuid,sourceWindowName:i,topic:t,destinationWindowName:this.me.name})}),(()=>new Promise((e=>e)).then((()=>{}))))}processMessage(e){const{payload:{message:t,sourceWindowName:n,sourceUuid:i,topic:r}}=e,o=[this.createSubscriptionKey(i,n,r),this.createSubscriptionKey(i,\"*\",r),this.createSubscriptionKey(\"*\",\"*\",r)],s={uuid:i,name:n};o.forEach((e=>{this.emitter.emit(e,t,s)}))}emitSubscriverEvent(e,t){const{payload:{targetName:n,uuid:i,topic:r}}=t,o={name:n,uuid:i,topic:r};this.emitter.emit(e,o)}createSubscriptionKey(e,t,n){const i=t||\"*\";if(!(e&&i&&n))throw new Error(\"Missing uuid, name, or topic string\");return function(...e){return e.map((e=>Buffer.from(`${e}`).toString(\"base64\"))).join(\"/\")}(e,i,n)}onmessage(e){const{action:t}=e;switch(t){case\"process-message\":this.processMessage(e);break;case this.events.subscriberAdded:this.emitSubscriverEvent(this.events.subscriberAdded,e);break;case this.events.subscriberRemoved:this.emitSubscriverEvent(this.events.subscriberRemoved,e)}return!0}}de.InterApplicationBus=Xt;de.InterAppPayload=class{};var en={};Object.defineProperty(en,\"__esModule\",{value:!0}),en.Clipboard=void 0;const tn=d;class nn extends tn.Base{async writeText(e){await this.wire.sendAction(\"clipboard-write-text\",e)}async readText(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-text\",{type:e});return t.data}async writeImage(e){await this.wire.sendAction(\"clipboard-write-image\",e)}async readImage(e={format:\"dataURL\"}){const{payload:t}=await this.wire.sendAction(\"clipboard-read-image\",e);return t.data}async writeHtml(e){await this.wire.sendAction(\"clipboard-write-html\",e)}async readHtml(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-html\",{type:e});return t.data}async writeRtf(e){await this.wire.sendAction(\"clipboard-write-rtf\",e)}async readRtf(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-rtf\",{type:e});return t.data}async write(e){await this.wire.sendAction(\"clipboard-write\",e)}async getAvailableFormats(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-formats\",{type:e});return t.data}}en.Clipboard=nn;var rn={},on={},sn={};Object.defineProperty(sn,\"__esModule\",{value:!0}),sn.ExternalApplication=void 0;const an=d;class cn extends an.EmitterBase{constructor(e,t){super(e,\"external-application\",t.uuid),this.identity=t}getInfo(){return this.wire.sendAction(\"get-external-application-info\",this.identity).then((({payload:e})=>e.data))}}sn.ExternalApplication=cn,Object.defineProperty(on,\"__esModule\",{value:!0}),on.ExternalApplicationModule=void 0;const dn=d,hn=sn;class ln extends dn.Base{wrap(e){return this.wire.sendAction(\"external-application-wrap\").catch((e=>{})),Promise.resolve(new hn.ExternalApplication(this.wire,{uuid:e}))}wrapSync(e){return this.wire.sendAction(\"external-application-wrap-sync\").catch((e=>{})),new hn.ExternalApplication(this.wire,{uuid:e})}}on.ExternalApplicationModule=ln,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(on,e),n(sn,e)}(rn);var un={},pn={},wn={};Object.defineProperty(wn,\"__esModule\",{value:!0}),wn._Frame=void 0;const yn=d;class fn extends yn.EmitterBase{constructor(e,t){super(e,\"frame\",t.uuid,t.name),this.identity=t}getInfo(){return this.wire.sendAction(\"get-frame-info\",this.identity).then((({payload:e})=>e.data))}getParentWindow(){return this.wire.sendAction(\"get-parent-window\",this.identity).then((({payload:e})=>e.data))}}wn._Frame=fn,Object.defineProperty(pn,\"__esModule\",{value:!0}),pn._FrameModule=void 0;const gn=d,mn=O,vn=wn;class Cn extends gn.Base{async wrap(e){this.wire.sendAction(\"frame-wrap\").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}wrapSync(e){this.wire.sendAction(\"frame-wrap-sync\").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}getCurrent(){return this.wire.sendAction(\"frame-get-current\").catch((e=>{})),Promise.resolve(new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity()))}getCurrentSync(){return this.wire.sendAction(\"frame-get-current-sync\").catch((e=>{})),new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity())}}pn._FrameModule=Cn,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(pn,e),n(wn,e)}(un);var bn={};Object.defineProperty(bn,\"__esModule\",{value:!0}),bn.GlobalHotkey=void 0;const In=d;class En extends In.EmitterBase{constructor(e){super(e,\"global-hotkey\")}async register(e,t){await this.on(e,t),await this.wire.sendAction(\"global-hotkey-register\",{hotkey:e})}async unregister(e){await this.removeAllListeners(e),await this.wire.sendAction(\"global-hotkey-unregister\",{hotkey:e})}async unregisterAll(){await Promise.all(this.eventNames().filter((e=>!(\"registered\"===e||\"unregistered\"===e))).map((e=>this.removeAllListeners(e)))),await this.wire.sendAction(\"global-hotkey-unregister-all\",{})}async isRegistered(e){const{payload:{data:t}}=await this.wire.sendAction(\"global-hotkey-is-registered\",{hotkey:e});return t}}bn.GlobalHotkey=En;var xn,An={},Pn={},Mn={},_n=s&&s.__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)};Object.defineProperty(Mn,\"__esModule\",{value:!0}),Mn.Platform=void 0;const On=d,Sn=O,Rn=new Map;class Fn extends On.EmitterBase{constructor(e,t){super(t.wire,\"application\",e.uuid),this.getClient=e=>{this.wire.sendAction(\"platform-get-client\",this.identity).catch((e=>{}));const t=e||this.identity,{uuid:n}=t;if(!Rn.has(n)){const e=_n(this,xn,\"f\").call(this,n);Rn.set(n,e)}return Rn.get(n)},xn.set(this,(async e=>{try{const t=`custom-frame-${e}`,n=await this._channel.connect(t,{wait:!1});return n.onDisconnection((()=>{Rn.delete(e)})),n}catch(t){throw Rn.delete(e),new Error(\"The targeted Platform is not currently running. Listen for application-started event for the given Uuid.\")}})),this.launchLegacyManifest=this.launchContentManifest;const n=(0,Sn.validateIdentity)(e);if(n)throw new Error(n);this._channel=t,this.identity={uuid:e.uuid},this.Layout=this.fin.Platform.Layout,this.Application=this.fin.Application.wrapSync(this.identity)}async createView(e,t,n){this.wire.sendAction(\"platform-create-view\",this.identity).catch((e=>{}));const i=await this.getClient(),r=await i.dispatch(\"create-view\",{target:t,opts:e,targetView:n});if(!r||(0,Sn.validateIdentity)(r.identity))throw new Error(`When overwriting the createView call, please return an object that has a valid 'identity' property: ${JSON.stringify(r)}`);return this.fin.View.wrapSync(r.identity)}async createWindow(e){this.wire.sendAction(\"platform-create-window\",this.identity).catch((e=>{}));const t=await this.getClient();e.reason||(e.reason=\"api-call\");const n=await t.dispatch(\"create-view-container\",e);if(!n||(0,Sn.validateIdentity)(n.identity))throw new Error(`When overwriting the createWindow call, please return an object that has a valid 'identity' property: ${JSON.stringify(n)}`);const{identity:i}=n,r=this.fin.Window.wrapSync(i);return r.name=i.name,r.uuid=i.uuid,r}async quit(){this.wire.sendAction(\"platform-quit\",this.identity).catch((e=>{}));return(await this.getClient()).dispatch(\"quit\")}async closeView(e){this.wire.sendAction(\"platform-close-view\",this.identity).catch((e=>{}));const t=await this.getClient();await t.dispatch(\"close-view\",{view:e})}async reparentView(e,t){console.warn(\"Platform.reparentView has been deprecated, please use Platform.createView\"),this.wire.sendAction(\"platform-reparent-view\",this.identity).catch((e=>{}));const n={...e,uuid:e.uuid??this.identity.uuid},i=await this.fin.View.wrap(n),r=await i.getOptions();return this.createView(r,t)}async getSnapshot(){this.wire.sendAction(\"platform-get-snapshot\",this.identity).catch((e=>{}));return(await this.getClient()).dispatch(\"get-snapshot\")}async getViewSnapshot(e){return(await this.getClient()).dispatch(\"get-view-snapshot\",{viewIdentity:e})}async applySnapshot(e,t){this.wire.sendAction(\"platform-apply-snapshot\",this.identity).catch((e=>{}));const n=\"Requested snapshot must be a valid Snapshot object, or a url or filepath to such an object.\";let i;if(\"string\"==typeof e)try{i=(await this._channel.wire.sendAction(\"get-application-manifest\",{manifestUrl:e})).payload.data}catch(e){throw new Error(`${n}: ${e}`)}else i=e;if(!i.windows)throw new Error(n);const r=await this.getClient();return await r.dispatch(\"apply-snapshot\",{snapshot:i,options:t}),this}async fetchManifest(e){return(await this.getClient()).dispatch(\"platform-fetch-manifest\",{manifestUrl:e})}async launchContentManifest(e){this.wire.sendAction(\"platform-launch-content-manifest\",this.identity).catch((()=>{}));const t=await this.getClient(),n=await this.fetchManifest(e);return t.dispatch(\"launch-into-platform\",{manifest:n,manifestUrl:e}),this}async setWindowContext(e={},t){if(this.wire.sendAction(\"platform-set-window-context\",this.identity).catch((e=>{})),!e)throw new Error(\"Please provide a serializable object or string to set the context.\");const n=await this.getClient(),{entityType:i}=t?await this.fin.System.getEntityInfo(t.uuid,t.name):this.fin.me;await n.dispatch(\"set-window-context\",{context:e,entityType:i,target:t||{uuid:this.fin.me.uuid,name:this.fin.me.name}})}async getWindowContext(e){this.wire.sendAction(\"platform-get-window-context\",this.identity).catch((e=>{}));const t=await this.getClient(),{entityType:n}=e?await this.fin.System.getEntityInfo(e.uuid,e.name):this.fin.me;return t.dispatch(\"get-window-context\",{target:e||{uuid:this.fin.me.uuid,name:this.fin.me.name},entityType:n})}async closeWindow(e,t={skipBeforeUnload:!1}){this.wire.sendAction(\"platform-close-window\",this.identity).catch((e=>{}));return(await this.getClient()).dispatch(\"close-window\",{windowId:e,options:t})}}Mn.Platform=Fn,xn=new WeakMap;var jn={},kn={},Ln={},Tn={};function $n(e){switch(e){case\"columns\":case\"grid\":case\"rows\":case\"tabs\":return!0;default:return!1}}Object.defineProperty(Tn,\"__esModule\",{value:!0}),Tn.overrideFromComposables=Tn.isValidPresetType=void 0,Tn.isValidPresetType=$n,Tn.overrideFromComposables=function(...e){return t=>e.reduceRight(((e,t)=>n=>t(e(n))),(e=>e))(t)},Tn.default={isValidPresetType:$n};var Bn={},Gn={},Wn={};Object.defineProperty(Wn,\"__esModule\",{value:!0}),Wn.ApiConsumer=void 0;Wn.ApiConsumer=class{constructor(e){this.strategy=e,this.consume=async e=>(await this.strategy.getExposedFunctions(e)).reduce(((t,n)=>({...t,[n.key]:this.strategy.createFunction(n,e)})),{})}};var Hn={},Nn={};Object.defineProperty(Nn,\"__esModule\",{value:!0}),Nn.expose=Nn.getExposedProperties=void 0;const Dn=Symbol(\"exposedProperties\");Nn.getExposedProperties=e=>e[Dn]||e.prototype[Dn]||[];Nn.expose=e=>(t,n,i)=>{t[Dn]=t[Dn]||[],t[Dn].push({key:n,descriptor:i,options:e})},Object.defineProperty(Hn,\"__esModule\",{value:!0}),Hn.ApiExposer=void 0;const Un=Nn;Hn.ApiExposer=class{constructor(e){this.strategy=e,this.exposeInstance=async(e,t)=>{const n=(0,Un.getExposedProperties)(e),i=await Promise.all(n.map((async({key:n,options:i})=>({key:n,options:await this.strategy.exposeFunction(e[n].bind(e),{key:n,options:i,meta:t})}))));await this.strategy.exposeMeta(t,i)}}};var Vn={},zn={},Kn={};Object.defineProperty(Kn,\"__esModule\",{value:!0}),Kn.ChannelsConsumer=void 0;Kn.ChannelsConsumer=class{constructor(e){this.channel=e,this.getExposedFunctions=async e=>{const{id:t}=e,{props:n}=await this.channel.dispatch(`api-meta:${t}`);return n},this.createFunction=e=>(...t)=>{const{action:n}=e.options;return this.channel.dispatch(n,{args:t})}}};var qn={};Object.defineProperty(qn,\"__esModule\",{value:!0}),qn.ChannelsExposer=void 0;qn.ChannelsExposer=class{constructor(e){this.channelProviderOrClient=e,this.exposeFunction=async(e,t)=>{const{key:n,options:i,meta:r}=t,{id:o}=r,s=`${o}.${i?.action||n}`;return await this.channelProviderOrClient.register(s,(async({args:t})=>e(...t))),{action:s}},this.exposeMeta=async({id:e},t)=>{const n=`api-meta:${e}`;await this.channelProviderOrClient.register(n,(()=>({props:t})))}}},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Kn,e),n(qn,e)}(zn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(zn,e)}(Vn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Wn,e),n(Hn,e),n(Vn,e),n(Nn,e)}(Gn);var Jn={};Object.defineProperty(Jn,\"__esModule\",{value:!0}),Jn.createRelayedDispatch=exports.relayChannelClientApi_1=Jn.relayChannelClientApi=void 0;const Yn=[\"no longer connected\",\"RTCDataChannel closed unexpectedly\",\"The client you are trying to dispatch from is disconnected from the target provider\"];exports.relayChannelClientApi_1=Jn.relayChannelClientApi=async(e,t)=>{e.register(`relay:${t}`,(({action:t,target:n,payload:i})=>e.dispatch(n,t,i))),await Promise.resolve()};Jn.createRelayedDispatch=(e,t,n,i)=>async(r,o)=>{try{return await e.dispatch(`relay:${n}`,{action:r,payload:o,target:t})}catch(e){if(s=e.message,Yn.some((e=>s.includes(e)))&&i)throw new Error(i);throw e}var s};var Zn,Qn,Xn,ei=s&&s.__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},ti=s&&s.__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)};Object.defineProperty(Bn,\"__esModule\",{value:!0}),Bn.ColumnOrRow=Bn.TabStack=Bn.LayoutNode=void 0;const ni=Gn,ii=Jn;class ri{constructor(e,t){Zn.set(this,void 0),this.isRoot=()=>ti(this,Zn,\"f\").isRoot(this.entityId),this.exists=()=>ti(this,Zn,\"f\").exists(this.entityId),this.getParent=async()=>{const e=await ti(this,Zn,\"f\").getParent(this.entityId);if(e)return ri.getEntity(e,ti(this,Zn,\"f\"))},this.createAdjacentStack=async(e,t)=>{const n=await ti(this,Zn,\"f\").createAdjacentStack(this.entityId,e,t);return ri.getEntity({entityId:n,type:\"stack\"},ti(this,Zn,\"f\"))},this.getAdjacentStacks=async e=>(await ti(this,Zn,\"f\").getAdjacentStacks({targetId:this.entityId,edge:e})).map((e=>ri.getEntity({type:\"stack\",entityId:e.entityId},ti(this,Zn,\"f\")))),ei(this,Zn,e,\"f\"),this.entityId=t}}Bn.LayoutNode=ri,Zn=new WeakMap,ri.newLayoutEntitiesClient=async(e,t,n)=>{const i=(0,ii.createRelayedDispatch)(e,n,\"layout-relay\",\"You are trying to interact with a layout component on a window that does not exist or has been destroyed.\");return new ni.ApiConsumer(new ni.ChannelsConsumer({dispatch:i})).consume({id:t})},ri.getEntity=(e,t)=>{const{entityId:n,type:i}=e;switch(i){case\"column\":case\"row\":return new si(t,n,i);case\"stack\":return new oi(t,n);default:throw new Error(`Unrecognised Layout Entity encountered ('${JSON.stringify(e)})`)}};class oi extends ri{constructor(e,t){super(e,t),Qn.set(this,void 0),this.type=\"stack\",this.getViews=()=>ti(this,Qn,\"f\").getStackViews(this.entityId),this.addView=async(e,t={index:0})=>ti(this,Qn,\"f\").addViewToStack(this.entityId,e,t),this.removeView=async e=>{await ti(this,Qn,\"f\").removeViewFromStack(this.entityId,e)},this.setActiveView=async e=>{await ti(this,Qn,\"f\").setStackActiveView(this.entityId,e)},ei(this,Qn,e,\"f\")}}Bn.TabStack=oi,Qn=new WeakMap;class si extends ri{constructor(e,t,n){super(e,t),Xn.set(this,void 0),this.getContent=async()=>(await ti(this,Xn,\"f\").getContent(this.entityId)).map((e=>ri.getEntity(e,ti(this,Xn,\"f\")))),ei(this,Xn,e,\"f\"),this.type=n}}Bn.ColumnOrRow=si,Xn=new WeakMap;var ai={};Object.defineProperty(ai,\"__esModule\",{value:!0}),ai.DEFAULT_LAYOUT_KEY=ai.LAYOUT_CONTROLLER_ID=void 0,ai.LAYOUT_CONTROLLER_ID=\"layout-entities\",ai.DEFAULT_LAYOUT_KEY=\"__default__\";var ci,di,hi,li=s&&s.__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)};Object.defineProperty(Ln,\"__esModule\",{value:!0}),Ln.Layout=void 0;const ui=G,pi=O,wi=d,yi=Tn,fi=Bn,gi=ai;class mi extends wi.Base{static getClient(e){return li(e,di,\"f\").getValue()}constructor(e,t){super(t),ci.add(this),di.set(this,new ui.Lazy((async()=>fi.LayoutNode.newLayoutEntitiesClient(await this.platform.getClient(),gi.LAYOUT_CONTROLLER_ID,this.identity)))),this.replace=async e=>{this.wire.sendAction(\"layout-replace\").catch((e=>{}));const t=await this.platform.getClient();await t.dispatch(\"replace-layout\",{target:this.identity,opts:{layout:e}})},this.replaceView=async(e,t)=>{this.wire.sendAction(\"layout-replace-view\").catch((e=>{}));const n=await this.platform.getClient();await n.dispatch(\"replace-view\",{target:this.identity,opts:{viewToReplace:e,newView:t}})},this.applyPreset=async e=>{this.wire.sendAction(\"layout-apply-preset\").catch((e=>{}));const t=await this.platform.getClient(),{presetType:n}=e;if(!n||!(0,yi.isValidPresetType)(n))throw new Error(\"Cannot apply preset layout, please include an applicable presetType property in the PresetLayoutOptions.\");await t.dispatch(\"apply-preset-layout\",{target:this.identity,opts:{presetType:n}})};const n=(0,pi.validateIdentity)(e);if(n)throw new Error(n);this.identity=e,this.platform=this.fin.Platform.wrapSync({uuid:e.uuid}),e.uuid===this.fin.me.uuid&&e.name===this.fin.me.name&&(this.init=this.fin.Platform.Layout.init)}async getConfig(){this.wire.sendAction(\"layout-get-config\").catch((e=>{}));return(await this.platform.getClient()).dispatch(\"get-frame-snapshot\",{target:this.identity})}async getCurrentViews(){this.wire.sendAction(\"layout-get-views\").catch((e=>{}));const e=await this.platform.getClient();return(await e.dispatch(\"get-layout-views\",{target:this.identity})).map((e=>this.fin.View.wrapSync(e)))}async getRootItem(){this.wire.sendAction(\"layout-get-root-item\").catch((()=>{}));const e=await li(this,di,\"f\").getValue(),t=await e.getRoot(\"layoutName\"in this.identity?this.identity:void 0);return fi.LayoutNode.getEntity(t,e)}async getStackByViewIdentity(e){this.wire.sendAction(\"layout-get-stack-by-view\").catch((()=>{}));const t=await li(this,di,\"f\").getValue(),n=await t.getStackByView(e);if(!n)throw new Error(`No stack found for view: ${e.uuid}/${e.name}`);return fi.LayoutNode.getEntity(n,t)}async addView(e,{location:t,targetView:n}={}){this.wire.sendAction(\"layout-add-view\").catch((e=>{}));const{identity:i}=await li(this,ci,\"m\",hi).call(this,\"layout-add-view\",{viewOptions:e,location:t,targetView:n});return{identity:i}}async closeView(e){this.wire.sendAction(\"layout-close-view\").catch((e=>{})),await li(this,ci,\"m\",hi).call(this,\"layout-close-view\",{viewIdentity:e})}}Ln.Layout=mi,di=new WeakMap,ci=new WeakSet,hi=async function(e,t){return(await this.platform.getClient()).dispatch(e,{target:this.identity,opts:t})};var vi,Ci,bi,Ii,Ei,xi=s&&s.__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)},Ai=s&&s.__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};Object.defineProperty(kn,\"__esModule\",{value:!0}),kn.LayoutModule=void 0;const Pi=d,Mi=Ln,_i=ai;class Oi extends Pi.Base{constructor(){super(...arguments),vi.add(this),Ci.set(this,!1),bi.set(this,null),this.init=async(e={})=>{if(this.wire.sendAction(\"layout-init\").catch((e=>{})),!this.wire.environment.layoutAllowedInContext(this.fin))throw new Error(\"Layout.init can only be called from a Window context.\");if(xi(this,Ci,\"f\"))throw new Error(\"Layout.init was already called, please use Layout.create to add additional layouts.\");\"openfin\"===this.wire.environment.type&&await this.fin.Platform.getCurrentSync().getClient(),Ai(this,Ci,!0,\"f\"),Ai(this,bi,await this.wire.environment.initLayoutManager(this.fin,this.wire,e),\"f\"),await this.wire.environment.applyLayoutSnapshot(this.fin,xi(this,bi,\"f\"),e);const t={name:this.fin.me.name,uuid:this.fin.me.uuid};if(!e.layoutManagerOverride){const e={layoutName:_i.DEFAULT_LAYOUT_KEY,...t};return xi(this,Ii,\"f\").call(this,e)}return this.wrapSync(t)},Ii.set(this,(e=>{const t=\"[Layout] You are using a deprecated property `layoutManager` - it will throw if you access it starting in v37.\",n=new Proxy({},{get(e,n){throw console.warn(`[Layout-mgr-proxy] accessing ${n.toString()}`),new Error(t)}}),i=Object.assign(this.wrapSync(e),{layoutManager:n});return new Proxy(i,{get(e,n){if(\"layoutManager\"===n)throw console.warn(`[Layout-proxy] accessing ${n.toString()}`),new Error(t);return e[n]}})})),this.getCurrentLayoutManagerSync=()=>xi(this,vi,\"m\",Ei).call(this,\"fin.Platform.Layout.getCurrentLayoutManagerSync()\"),this.create=async e=>this.wire.environment.createLayout(xi(this,vi,\"m\",Ei).call(this,\"fin.Platform.Layout.create()\"),e),this.destroy=async e=>this.wire.environment.destroyLayout(xi(this,vi,\"m\",Ei).call(this,\"fin.Platform.Layout.destroy()\"),e)}async wrap(e){return this.wire.sendAction(\"layout-wrap\").catch((e=>{})),new Mi.Layout(e,this.wire)}wrapSync(e){return this.wire.sendAction(\"layout-wrap-sync\").catch((e=>{})),new Mi.Layout(e,this.wire)}async getCurrent(){if(this.wire.sendAction(\"layout-get-current\").catch((e=>{})),\"openfin\"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error(\"You are not in a Window context. Only Windows can have a Layout.\");const{uuid:e,name:t}=this.fin.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction(\"layout-get-current-sync\").catch((e=>{})),\"openfin\"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error(\"You are not in a Window context. Only Windows can have a Layout.\");const{uuid:e,name:t}=this.fin.me;return this.wrapSync({uuid:e,name:t})}async getLayoutByViewIdentity(e){this.wire.sendAction(\"layout-get-by-view-identity\").catch((()=>{}));let t=await this.wire.environment.getViewWindowIdentity(this.fin,e);t.identity&&(t=t.identity);try{const n=this.wrapSync(t),i=await Mi.Layout.getClient(n),r=await i.getLayoutIdentityForViewOrThrow(e);return this.wrapSync(r)}catch(n){if(![\"No action registered at target for\",\"getLayoutIdentityForViewOrThrow is not a function\"].some((e=>n.message.includes(e))))throw n;if(t.uuid===t.name)throw new Error(`View identity ${JSON.stringify(e)} is not attached to any layout in provider window ${JSON.stringify(t)}.`);return this.wrapSync(t)}}}kn.LayoutModule=Oi,Ci=new WeakMap,bi=new WeakMap,Ii=new WeakMap,vi=new WeakSet,Ei=function(e){if(!xi(this,bi,\"f\"))throw new Error(`You must call init before using the API ${e}`);return xi(this,bi,\"f\")},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(kn,e),n(Ln,e)}(jn),Object.defineProperty(Pn,\"__esModule\",{value:!0}),Pn.PlatformModule=void 0;const Si=d,Ri=Mn,Fi=jn;class ji extends Si.Base{constructor(e,t){super(e),this._channel=t,this.Layout=new Fi.LayoutModule(this.wire)}async init(e){if(!fin.__internal_.isPlatform||fin.me.name!==fin.me.uuid)throw new Error(\"fin.Platform.init should only be called from a custom platform provider running in the main window of the application.\");return this.wire.environment.initPlatform(this.fin,e)}async wrap(e){return this.wire.sendAction(\"platform-wrap\").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}wrapSync(e){return this.wire.sendAction(\"platform-wrap-sync\").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}async getCurrent(){return this.wire.sendAction(\"platform-get-current\").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction(\"platform-get-current-sync\").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}start(e){return this.wire.sendAction(\"platform-start\").catch((e=>{})),new Promise((async(t,n)=>{try{const{uuid:n}=e,i=await this.fin.Application._create({...e,isPlatformController:!0});i.once(\"platform-api-ready\",(()=>t(this.wrapSync({uuid:n})))),i._run({uuid:n})}catch(e){n(e)}}))}startFromManifest(e,t){return this.wire.sendAction(\"platform-start-from-manifest\").catch((e=>{})),new Promise((async(n,i)=>{try{const i=await this.fin.Application._createFromManifest(e);i.once(\"platform-api-ready\",(()=>n(this.wrapSync({uuid:i.identity.uuid})))),i._run(t)}catch(e){i(e)}}))}}Pn.PlatformModule=ji,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Pn,e),n(Mn,e)}(An);var ki={};!function(e){Object.defineProperty(e,\"__esModule\",{value:!0}),e.getMe=e.getBaseMe=e.environmentUnsupportedMessage=void 0;const t=J(),n=un,i=ie(),r=rn;function o(e,t,n){return{...{isView:\"view\"===e,isWindow:\"window\"===e,isFrame:\"iframe\"===e,isExternal:\"external connection\"===e},uuid:t,name:n,entityType:e}}e.environmentUnsupportedMessage=\"You are not running in OpenFin.\",e.getBaseMe=o,e.getMe=function(s){const{uuid:a,name:c,entityType:d}=s.me,h={setContext(){throw new Error(e.environmentUnsupportedMessage)},addContextHandler(){throw new Error(e.environmentUnsupportedMessage)},getContextGroups(){throw new Error(e.environmentUnsupportedMessage)},joinContextGroup(){throw new Error(e.environmentUnsupportedMessage)},removeFromContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getAllClientsInContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getInfoForContextGroup(){throw new Error(e.environmentUnsupportedMessage)}},l=\"Interop API has not been instantiated. Either connection has failed or you have not declared interop in your config.\",u={setContext(){throw new Error(l)},addContextHandler(){throw new Error(l)},getContextGroups(){throw new Error(l)},joinContextGroup(){throw new Error(l)},removeFromContextGroup(){throw new Error(l)},getAllClientsInContextGroup(){throw new Error(l)},getInfoForContextGroup(){throw new Error(l)}},p={eventNames:()=>{throw new Error(e.environmentUnsupportedMessage)},emit:()=>{throw new Error(e.environmentUnsupportedMessage)},listeners:()=>{throw new Error(e.environmentUnsupportedMessage)},listenerCount:()=>{throw new Error(e.environmentUnsupportedMessage)},on:()=>{throw new Error(e.environmentUnsupportedMessage)},addListener:()=>{throw new Error(e.environmentUnsupportedMessage)},once:()=>{throw new Error(e.environmentUnsupportedMessage)},prependListener:()=>{throw new Error(e.environmentUnsupportedMessage)},prependOnceListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeAllListeners:()=>{throw new Error(e.environmentUnsupportedMessage)}};switch(d){case\"view\":return Object.assign(new t.View(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case\"window\":return Object.assign(new i._Window(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case\"iframe\":return Object.assign(new n._Frame(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case\"external connection\":return Object.assign(new r.ExternalApplication(s,{uuid:a}),o(d,a,c),{interop:u,isOpenFin:!1});default:return{...o(d,a,c),...p,interop:h,isOpenFin:!1}}}}(ki);var Li={},Ti={},$i={};Object.defineProperty($i,\"__esModule\",{value:!0}),$i.createWarningObject=$i.createUnusableObject=void 0,$i.createUnusableObject=function(e){const t=()=>{throw new Error(e)};return new Proxy({},{apply:t,construct:t,defineProperty:t,deleteProperty:t,get:t,getOwnPropertyDescriptor:t,getPrototypeOf:t,has:t,isExtensible:t,ownKeys:t,preventExtensions:t,set:t,setPrototypeOf:t})},$i.createWarningObject=function(e,t){return new Proxy(t,{get:(...t)=>(console.warn(e),Reflect.get(...t)),set:(...t)=>(console.warn(e),Reflect.set(...t)),getOwnPropertyDescriptor:(...t)=>(console.warn(e),Reflect.getOwnPropertyDescriptor(...t)),ownKeys:(...t)=>(console.warn(e),Reflect.ownKeys(...t))})};var Bi,Gi={},Wi={};var Hi={};!function(e){Object.defineProperty(e,\"__esModule\",{value:!0}),e.wrapIntentHandler=e.BROKER_ERRORS=e.generateOverrideWarning=e.generateOverrideError=e.wrapContextHandler=e.wrapInTryCatch=e.generateId=void 0;e.generateId=()=>`${Math.random()}${Date.now()}`;e.wrapInTryCatch=(e,t)=>(...n)=>{try{return e(...n)}catch(e){throw new Error((t||\"\")+e)}};e.wrapContextHandler=(e,t)=>async n=>{try{await e(n)}catch(e){throw console.error(`Error thrown by handler ${t} for context type ${n.type}: ${e}`),e}};e.generateOverrideError=(e,t)=>`You have tried to to use ${e} but ${t} has not been overridden in the Interop Broker. Please override this function. Refer to our documentation for more info.`;e.generateOverrideWarning=(e,t,n,i)=>{const{uuid:r,name:o}=n;return i?`Entity with identity: ${r}/${o} has called ${i} or ${e} but ${t} has not been overridden.`:`Entity with identity: ${r}/${o} has called ${e} but ${t} has not been overridden.`},e.BROKER_ERRORS={fireIntent:(0,e.generateOverrideError)(\"fireIntent\",\"handleFiredIntent\"),fireIntentForContext:(0,e.generateOverrideError)(\"fireIntentForContext\",\"handleFiredIntentForContext\"),getInfoForIntent:(0,e.generateOverrideError)(\"getInfoForIntent\",\"handleInfoForIntent\"),getInfoForIntentsByContext:(0,e.generateOverrideError)(\"getInfoForIntentsByContext\",\"handleInfoForIntentsByContext\"),joinSessionContextGroupWithJoinContextGroup:\"The Context Group you have tried to join is a Session Context Group. Custom Context Groups can only be defined by the Interop Broker through code or manifest configuration. Please use joinSessionContextGroup.\",fdc3Open:(0,e.generateOverrideError)(\"fdc3.open\",\"fdc3HandleOpen\"),fdc3FindInstances:(0,e.generateOverrideError)(\"fdc3.findInstances\",\"fdc3HandleFindInstances\"),fdc3GetAppMetadata:(0,e.generateOverrideError)(\"fdc3.getAppMetadata\",\"fdc3HandleGetAppMetadata\"),fdc3GetInfo:(0,e.generateOverrideError)(\"fdc3.getInfo\",\"fdc3HandleGetInfo\")};e.wrapIntentHandler=(e,t)=>async n=>{try{return e(n)}catch(e){throw console.error(`Error thrown by handler ${t}: ${e}`),e}}}(Hi);var Ni,Di,Ui={};function Vi(){if(Di)return Gi;Di=1;var e,t,n,r=s&&s.__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},o=s&&s.__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)},a=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Gi,\"__esModule\",{value:!0}),Gi.InteropBroker=void 0;const c=d,h=a(function(){if(Bi)return Wi;Bi=1,Object.defineProperty(Wi,\"__esModule\",{value:!0});const e=Cr();return Wi.default=class{constructor(e,t){this.provider=e,this.id=t,this.lastContext=void 0,this.contextGroupMap=new Map,this.clients=new Map,this.registerListeners()}registerListeners(){this.provider.register(`sessionContextGroup:getContext-${this.id}`,this.getCurrentContext.bind(this)),this.provider.register(`sessionContextGroup:setContext-${this.id}`,this.setContext.bind(this)),this.provider.register(`sessionContextGroup:handlerAdded-${this.id}`,this.handlerAdded.bind(this)),this.provider.register(`sessionContextGroup:handlerRemoved-${this.id}`,this.handlerRemoved.bind(this))}getCurrentContext(e){return e.type?this.contextGroupMap.get(e.type):this.lastContext}setContext(t,n){const{context:i}=t,r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name} not in Session Client State Map`);this.contextGroupMap.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{e.contextHandlers.get(i.type)?.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getClientState(e){return this.clients.get(e.endpointId)}async handlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(i){const e=r.contextHandlers.get(i)||[];r.contextHandlers.set(i,[...e,n]);const o=this.contextGroupMap.get(i);o&&await this.provider.dispatch(t,n,o)}else{r.globalHandler=n;const e=[...this.contextGroupMap.keys()].map((async e=>{const i=this.contextGroupMap.get(e);i&&await this.provider.dispatch(t,n,i)}));await Promise.all(e)}}handlerRemoved(e,t){const{handlerId:n}=e,i=this.clients.get(t.endpointId);i?(Array.from(i.contextHandlers).forEach((([,e])=>{const t=e.indexOf(n);t>-1&&e.splice(t,1)})),i.globalHandler===n&&(i.globalHandler=void 0)):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={contextHandlers:new Map,clientIdentity:e,globalHandler:void 0};this.clients.set(e.endpointId,t)}}onDisconnection(e){this.clients.delete(e.endpointId)}},Wi}()),l=Hi,u=a(i),p=function(){if(Ni)return Ui;Ni=1,Object.defineProperty(Ui,\"__esModule\",{value:!0}),Ui.PrivateChannelProvider=void 0;const e=Vi();return Ui.PrivateChannelProvider=class t{constructor(e,t){this.provider=e,this.id=t,this.clients=new Map,this.registerListeners(),this.contextByContextType=new Map,this.lastContext=void 0,this.provider.onConnection((e=>this.registerNewClient(e))),this.provider.onDisconnection((async e=>{const{endpointId:t}=e;this.clients.has(t)&&await this.handleClientDisconnecting(e),0===(await this.provider.getAllClientInfo()).length&&this.provider.destroy()}))}getClientState(e){return this.clients.get(e.endpointId)}registerListeners(){this.provider.register(\"broadcast\",this.broadcast.bind(this)),this.provider.register(\"getCurrentContext\",this.getCurrentContext.bind(this)),this.provider.register(\"contextHandlerAdded\",this.contextHandlerAdded.bind(this)),this.provider.register(\"contextHandlerRemoved\",this.contextHandlerRemoved.bind(this)),this.provider.register(\"nonStandardHandlerRemoved\",this.nonStandardHandlerRemoved.bind(this)),this.provider.register(\"onAddContextHandlerAdded\",this.onAddContextHandlerAdded.bind(this)),this.provider.register(\"onDisconnectHandlerAdded\",this.onDisconnectHandlerAdded.bind(this)),this.provider.register(\"onUnsubscribeHandlerAdded\",this.onUnsubscribeHandlerAdded.bind(this)),this.provider.register(\"clientDisconnecting\",((e,t)=>{this.handleClientDisconnecting(t)}))}broadcast(t,n){const{context:i}=t;if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name}, tried to call broadcast, is not connected to this Private Channel`);const r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to broadcast - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);this.contextByContextType.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{const t=e.handlerIdsByContextTypes.get(i.type);t&&t.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getCurrentContext(e,t){const{contextType:n}=e;if(!this.getClientState(t))throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call getCurrentContext, is not connected to this Private Channel`);if(void 0!==n){return this.contextByContextType.get(n)||null}return this.lastContext?this.lastContext:null}contextHandlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call addContextListener, is not connected to this Private Channel`);if(i){const e=r.handlerIdsByContextTypes.get(i)||[];r.handlerIdsByContextTypes.set(i,[...e,n])}else r.globalHandler=n;Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&e.onAddContextListenerHandlerId&&this.provider.dispatch(e.clientIdentity,e.onAddContextListenerHandlerId,i)}))}async contextHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);if(i){let e;if(i.globalHandler===n)i.globalHandler=void 0;else for(const[t,r]of i.handlerIdsByContextTypes){const i=r.indexOf(n);i>-1&&(r.splice(i,1),e=t)}const r=(await this.getConnectedClients()).map((async n=>{const{clientIdentity:i,clientIdentity:{endpointId:r},onUnsubscribeHandlerId:o}=n;r!==t.endpointId&&o&&await this.provider.dispatch(i,o,e)}));try{await Promise.all(r)}catch(e){throw console.error(`Problem when attempting to dispatch to onUnsubscribeHandlers. Error: ${e} Removing Client: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}`),new Error(e)}}else console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}.`)}nonStandardHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);i?i.onDisconnectHandlerId===n?i.onDisconnectHandlerId=void 0:i.onAddContextListenerHandlerId===n?i.onAddContextListenerHandlerId=void 0:i.onUnsubscribeHandlerId===n&&(i.onUnsubscribeHandlerId=void 0):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}onAddContextHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onAddContextListener, is not connected to this Private Channel`);n.onAddContextListenerHandlerId=i,Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&Array.from(e.handlerIdsByContextTypes.keys()).forEach((e=>{this.provider.dispatch(t,i,e)}))}))}onDisconnectHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onDisconnect, is not connected to this Private Channel`);n.onDisconnectHandlerId=i}onUnsubscribeHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onUnsubscribe, is not connected to this Private Channel`);n.onUnsubscribeHandlerId=i}removeClient(e){const t=this.getClientState(e);if(!t)throw new Error(`Client with Identity: ${e.uuid} ${e.name}, tried to call disconnect, is not connected to this Private Channel`);t.handlerIdsByContextTypes.clear(),this.clients.delete(e.endpointId)}async fireOnDisconnectForOtherClients(e){const{endpointId:t}=e,n=(await this.getConnectedClients()).map((async e=>{const{clientIdentity:{endpointId:n},onDisconnectHandlerId:i}=e;n!==t&&i&&await this.provider.dispatch(e.clientIdentity,i)}));try{await Promise.all(n)}catch(t){throw console.error(`Problem when attempting to dispatch to onDisconnectHandlers. Error: ${t} Disconnecting Client: uuid: ${e.uuid}. name: ${e.name}. endpointId: ${e.endpointId}`),new Error(t)}}async unsubscribeAll(e){const{endpointId:t}=e,n=this.clients.get(t);if(n){const t=Array.from(n.handlerIdsByContextTypes.values()).flat(),i=n.globalHandler;if(t.length>0){const n=t.map((async t=>this.contextHandlerRemoved({handlerId:t},e)));try{await Promise.all(n)}catch(e){console.error(e.message)}}if(i)try{await this.contextHandlerRemoved({handlerId:i},e)}catch(e){console.error(e.message)}}}async handleClientDisconnecting(e){await this.unsubscribeAll(e),this.removeClient(e),await this.fireOnDisconnectForOtherClients(e)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={clientIdentity:e,handlerIdsByContextTypes:new Map,globalHandler:void 0,onAddContextListenerHandlerId:void 0,onUnsubscribeHandlerId:void 0,onDisconnectHandlerId:void 0};this.clients.set(e.endpointId,t)}}async getConnectedClients(){const e=await this.provider.getAllClientInfo();return Array.from(this.clients.values()).filter((t=>{const{uuid:n,name:i}=t.clientIdentity;return e.some((e=>i===e.name&&n===e.uuid))}))}static init(e,n){return new t(e,n)}},Ui}(),w=G,y=[{id:\"green\",displayMetadata:{color:\"#00CC88\",name:\"green\"}},{id:\"purple\",displayMetadata:{color:\"#8C61FF\",name:\"purple\"}},{id:\"orange\",displayMetadata:{color:\"#FF8C4C\",name:\"orange\"}},{id:\"red\",displayMetadata:{color:\"#FF5E60\",name:\"red\"}},{id:\"pink\",displayMetadata:{color:\"#FF8FB8\",name:\"pink\"}},{id:\"yellow\",displayMetadata:{color:\"#E9FF8F\",name:\"yellow\"}}];let f=class i extends c.Base{constructor(i,s,a){super(i),e.set(this,void 0),t.set(this,void 0),n.set(this,void 0),this.getProvider=()=>o(this,n,\"f\").getValue(),this.interopClients=new Map,this.contextGroupsById=new Map,r(this,t,a.contextGroups??[...y],\"f\"),r(this,e,a.fdc3Info,\"f\"),a?.logging&&(this.logging=a.logging),this.intentClientMap=new Map,this.lastContextMap=new Map,this.sessionContextGroupMap=new Map,r(this,n,new w.Lazy(s),\"f\"),this.setContextGroupMap(),this.setupChannelProvider()}static createClosedConstructor(...e){return class extends i{constructor(...t){if(t.length){const[n,i,r]=t;if(r&&\"object\"==typeof r&&!(0,u.default)(r,e[2]))return console.warn(\"You have modified the parameters of the InteropOverride constructor. This behavior is deprecated and will be removed in a future version. You can modify these options in your manifest. Please consult our Interop docs for guidance on migrating to the new override scheme.\"),void super(e[0],e[1],r);console.warn(\"You are attempting to pass arguments to the InteropOverride constructor. This is not necessary, and these passed arguments will be ignored. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.\")}super(...e)}}}setContext({context:e},t){this.wire.sendAction(\"interop-broker-set-context\").catch((e=>{}));const n=this.getClientState(t);if(!n||!n.contextGroupId)throw n?new Error(\"You must join a context group before you can set context.\"):new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);{const{contextGroupId:t}=n;this.setContextForGroup({context:e},t)}}setContextForGroup({context:e},t){this.wire.sendAction(\"interop-broker-set-context-for-group\").catch((e=>{}));const n=this.contextGroupsById.get(t);if(!n)throw new Error(`Unable to set context for context group that isn't in the context group mapping: ${t}.`);const r=i.checkContextIntegrity(e);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(e)}`);const o=e.type;n.set(o,e),this.lastContextMap.set(t,o);Array.from(this.interopClients.values()).filter((e=>e.contextGroupId===t)).forEach((t=>{for(const[,n]of t.contextHandlers)i.isContextTypeCompatible(o,n.contextType)&&this.invokeContextHandler(t.clientIdentity,n.handlerId,e)}))}getCurrentContext(e,t){this.wire.sendAction(\"interop-broker-get-current-context\").catch((e=>{}));const n=this.getClientState(t);if(!n?.contextGroupId)throw new Error(\"You must be a member of a context group to call getCurrentContext\");const{contextGroupId:i}=n,r=this.contextGroupsById.get(i),o=this.lastContextMap.get(i),s=e?.contextType??o;return r&&s?r.get(s):void 0}async joinContextGroup({contextGroupId:e,target:t},n){if(this.wire.sendAction(\"interop-broker-join-context-group\").catch((e=>{})),this.sessionContextGroupMap.has(e))throw new Error(l.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup);if(t){i.hasEndpointId(t)&&await this.addClientToContextGroup({contextGroupId:e},t);try{const n=this.channel.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name));if(!n.length)throw new Error(`Given Identity ${t.uuid} ${t.name} is not connected to the Interop Broker.`);n.length>1&&console.warn(`More than one connection found for identity ${t.uuid} ${t.name}`);const i=[];for(const t of n)i.push(this.addClientToContextGroup({contextGroupId:e},t));await Promise.all(i)}catch(e){throw new Error(e)}}else await this.addClientToContextGroup({contextGroupId:e},n)}async addClientToContextGroup({contextGroupId:e},t){this.wire.sendAction(\"interop-broker-add-client-to-context-group\").catch((e=>{}));const n=this.getClientState(t);if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(!this.getContextGroups().find((t=>t.id===e)))throw new Error(`Attempting to join a context group that does not exist: ${e}. You may only join existing context groups.`);if(n.contextGroupId!==e){n.contextGroupId=e,await this.setCurrentContextGroupInClientOptions(t,e);const i=this.contextGroupsById.get(e);for(const[,e]of n.contextHandlers){const{contextType:n,handlerId:r}=e;if(void 0===n)i.forEach(((e,n)=>{this.invokeContextHandler(t,r,e)}));else if(i.has(n)){const e=i.get(n);e&&this.invokeContextHandler(t,r,e)}}}}async removeFromContextGroup({target:e},t){if(this.wire.sendAction(\"interop-broker-remove-from-context-group\").catch((e=>{})),e){i.hasEndpointId(e)&&await this.removeClientFromContextGroup(e);try{const t=this.channel.connections.filter((t=>t.uuid===e.uuid&&t.name===e.name));if(!t.length)throw new Error(`No connection found for given Identity ${e.uuid} ${e.name}`);t.length>1&&console.warn(`More than one connection found for identity ${e.uuid} ${e.name}`);const n=[];for(const e of t)n.push(this.removeClientFromContextGroup(e));await Promise.all(n)}catch(e){throw new Error(e)}}else await this.removeClientFromContextGroup(t)}async removeClientFromContextGroup(e){this.wire.sendAction(\"interop-broker-remove-client-from-context-group\").catch((e=>{}));const t=this.getClientState(e);t&&(t.contextGroupId=void 0),await this.setCurrentContextGroupInClientOptions(e,null)}getContextGroups(){return this.wire.sendAction(\"interop-broker-get-context-groups\").catch((e=>{})),o(this,t,\"f\").map((e=>({...e})))}getInfoForContextGroup({contextGroupId:e}){return this.wire.sendAction(\"interop-broker-get-info-for-context-group\").catch((e=>{})),this.getContextGroups().find((t=>t.id===e))}getAllClientsInContextGroup({contextGroupId:e}){this.wire.sendAction(\"interop-broker-get-all-clients-in-context-group\").catch((e=>{}));return Array.from(this.interopClients.values()).filter((t=>t.contextGroupId===e)).map((e=>e.clientIdentity))}async handleFiredIntent(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.raiseIntent\",\"InteropBroker.handleFiredIntent\",t,\"interopClient.fireIntent\");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntent)}async setIntentTarget(e,t){this.wire.sendAction(\"interop-broker-set-intent-target\").catch((e=>{}));const n=this.intentClientMap.get(t.name),i=`intent-handler-${e.name}`;if(n){const t=n.get(i);if(t){if(t.pendingIntents.push(e),t.clientIdentity&&t.isReady){const{clientIdentity:e,pendingIntents:n}=t;try{const r=n[n.length-1];await this.invokeIntentHandler(e,i,r),t.pendingIntents=[]}catch(n){console.error(`Error invoking intent handler for client ${e.uuid}/${e.name}/${e.endpointId}`),t.isReady=!1}}}else n.set(i,{isReady:!1,pendingIntents:[e]})}else{this.intentClientMap.set(t.name,new Map);const n=this.intentClientMap.get(t.name);n&&n.set(i,{isReady:!1,pendingIntents:[e]})}}async handleInfoForIntent(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.findIntent\",\"InteropBroker.handleInfoForIntent\",t,\"interopClient.getInfoForIntent\");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntent)}async handleInfoForIntentsByContext(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.findIntentsByContext\",\"InteropBroker.handleInfoForIntentsByContext\",t,\"interopClient.getInfoForIntentsByContext\");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntentsByContext)}async handleFiredIntentForContext(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.raiseIntentForContext\",\"InteropBroker.handleFiredIntentForContext\",t,\"interopClient.fireIntentForContext\");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntentForContext)}async clientDisconnected(e){}async fdc3HandleOpen({app:e,context:t},n){const i=(0,l.generateOverrideWarning)(\"fdc3.open\",\"InteropBroker.fdc3HandleOpen\",n);throw console.warn(i),new Error(l.BROKER_ERRORS.fdc3Open)}async fdc3HandleFindInstances(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.open\",\"InteropBroker.fdc3HandleFindInstances\",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3FindInstances)}async fdc3HandleGetAppMetadata(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.getAppMetadata\",\"InteropBroker.fdc3HandleGetAppMetadata\",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3GetAppMetadata)}async invokeContextHandler(e,t,n){const i=await this.getProvider();try{await i.dispatch(e,t,n)}catch(i){console.error(`Error invoking context handler ${t} for context type ${n.type} in client ${e.uuid}/${e.name}/${e.endpointId}`,i)}}async invokeIntentHandler(e,t,n){const i=await this.getProvider();await i.dispatch(e,t,n)}async fdc3HandleGetInfo(t,n){const{fdc3Version:i}=t;return{fdc3Version:i,...o(this,e,\"f\"),optionalFeatures:{OriginatingAppMetadata:!1,UserChannelMembershipAPIs:!0},appMetadata:{appId:\"\",instanceId:\"\"}}}async getAllClientInfo(){return(await this.getProvider()).getAllClientInfo()}decorateSnapshot(e){return{...e,interopSnapshotDetails:{contextGroupStates:this.getContextGroupStates()}}}applySnapshot(e,t){const n=e?.interopSnapshotDetails?.contextGroupStates;n&&(t?.closeExistingWindows||this.updateExistingClients(n),this.rehydrateContextGroupStates(n))}updateExistingClients(e){this.interopClients.forEach((t=>{const{clientIdentity:n,contextGroupId:r,contextHandlers:o}=t;if(r){const t=e[r];for(const[,e]of Object.entries(t))o.forEach((t=>{const{handlerId:r,contextType:o}=t;i.isContextTypeCompatible(e.type,o)&&this.invokeContextHandler(n,r,e)}))}}))}getContextGroupStates(){return i.toObject(this.contextGroupsById)}rehydrateContextGroupStates(e){const t=Object.entries(e);for(const[e,n]of t){const t=Object.entries(n);for(const[n,i]of t)if(this.contextGroupsById.has(e)){this.contextGroupsById.get(e).set(n,i)}else console.warn(`Attempting to set a context group that isn't in the context group mapping. Skipping context group rehydration for: ${e}`)}}contextHandlerRegistered({contextType:e,handlerId:t},n){const i={contextType:e,handlerId:t},r=this.getClientState(n);if(r?.contextHandlers.set(t,i),r&&r.contextGroupId){const{contextGroupId:i}=r,o=this.contextGroupsById.get(i);if(void 0===e)o.forEach(((e,i)=>{this.invokeContextHandler(n,t,e)}));else if(o.has(e)){const i=o.get(e);i&&this.invokeContextHandler(n,t,i)}}}async intentHandlerRegistered(e,t){const{handlerId:n}=e,i=this.intentClientMap.get(t.name),r=i?.get(n);if(i)if(r){const{pendingIntents:e}=r;r.clientIdentity=t,r.isReady=!0;try{if(e.length>0){const i=e[e.length-1];await this.invokeIntentHandler(t,n,i),r.pendingIntents=[]}}catch(e){console.error(`Error invoking intent handler: ${n} for client ${t.uuid}/${t.name}/${t.endpointId}`)}}else i.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t});else{this.intentClientMap.set(t.name,new Map);const e=this.intentClientMap.get(t.name);e&&e.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t})}}removeContextHandler({handlerId:e},t){const n=this.getClientState(t);n&&n.contextHandlers.delete(e)}handleJoinSessionContextGroup({sessionContextGroupId:e},t){try{if(!e)throw new Error(\"Failed to join session context group: must specify group id.\");const n=this.sessionContextGroupMap.get(e);if(n)n.registerNewClient(t);else{const n=new h.default(this.channel,e);n.registerNewClient(t),this.sessionContextGroupMap.set(e,n)}return{hasConflict:this.contextGroupsById.has(e)}}catch(e){throw new Error(e)}}getClientState(e){return this.interopClients.get(e.endpointId)}static toObject(e){const t=Object.fromEntries(e),n={};return Object.entries(t).forEach((([e,t])=>{const i=Object.fromEntries(t);n[e]=i})),n}static checkContextIntegrity(e){if(!e)return{isValid:!1,reason:\"No context supplied\"};if(\"object\"!=typeof e)return{isValid:!1,reason:\"Context must be an Object\"};if(!e.type)return{isValid:!1,reason:\"Context must have a type property\"};if(e.id&&\"object\"!=typeof e.id)return{isValid:!1,reason:\"Context id must be an Object populated with key-value identifiers (if set)\"};if(e.id){const{id:t}=e,n=Object.keys(t);let i=!1;if(!n.length)return{isValid:!1,reason:\"Context id must have at least one key-value identifier\"};if(n.forEach((e=>{\"string\"==typeof e&&\"string\"==typeof t[e]||(i=!0)})),i)return{isValid:!1,reason:\"Context id key-value identifiers must be of type string\"}}return e.name&&\"string\"!=typeof e.name?{isValid:!1,reason:\"Context name must be of string type (if set)\"}:{isValid:!0}}static hasEndpointId(e){return void 0!==e.endpointId}static isContextTypeCompatible(e,t){return void 0===t||e===t}setContextGroupMap(){for(const e of this.getContextGroups())this.contextGroupsById.set(e.id,new Map)}async setCurrentContextGroupInClientOptions(e,t){try{const n=await this.fin.System.getEntityInfo(e.uuid,e.name);let i;\"view\"===n.entityType?i=await this.fin.View.wrap(e):\"window\"===n.entityType&&(i=await this.fin.Window.wrap(e)),i&&await i.updateOptions({interop:{currentContextGroup:t}})}catch(e){}}async setupChannelProvider(){try{const e=await this.getProvider();this.channel=e,this.wireChannel(e)}catch(e){throw new Error(`Error setting up Interop Broker Channel Provider: ${e}`)}}wireChannel(e){e.onConnection((async(e,t)=>{if(!await this.isConnectionAuthorized(e,t))throw new Error(`Connection not authorized for ${e.uuid}, ${e.name}`);if(!e.endpointId)throw new Error(\"Version too old to be compatible with Interop. Please upgrade your runtime to a more recent version.\");const n={contextGroupId:void 0,contextHandlers:new Map,clientIdentity:e};t?.currentContextGroup&&this.contextGroupsById.has(t.currentContextGroup)&&(n.contextGroupId=t?.currentContextGroup),this.interopClients.set(e.endpointId,n)})),e.onDisconnection((e=>{this.interopClients.delete(e.endpointId);const t=this.intentClientMap.get(e.name);t&&e.uuid===this.fin.me.uuid&&t.forEach((e=>{e.isReady=!1})),this.sessionContextGroupMap.forEach((t=>{t.onDisconnection(e)})),this.clientDisconnected(e)})),e.beforeAction((async(e,t,n)=>{if(!await this.isActionAuthorized(e,t,n))throw new Error(`Action (${e}) not authorized for ${n.uuid}, ${n.name}`);this.logging?.beforeAction?.enabled&&console.log(e,t,n)})),e.afterAction(((e,t,n)=>{this.logging?.afterAction?.enabled&&console.log(e,t,n)})),e.register(\"setContext\",this.setContext.bind(this)),e.register(\"fireIntent\",this.handleFiredIntent.bind(this)),e.register(\"getCurrentContext\",this.getCurrentContext.bind(this)),e.register(\"getInfoForIntent\",this.handleInfoForIntent.bind(this)),e.register(\"getInfoForIntentsByContext\",this.handleInfoForIntentsByContext.bind(this)),e.register(\"fireIntentForContext\",this.handleFiredIntentForContext.bind(this)),e.register(\"getContextGroups\",this.getContextGroups.bind(this)),e.register(\"joinContextGroup\",this.joinContextGroup.bind(this)),e.register(\"removeFromContextGroup\",this.removeFromContextGroup.bind(this)),e.register(\"getAllClientsInContextGroup\",this.getAllClientsInContextGroup.bind(this)),e.register(\"getInfoForContextGroup\",this.getInfoForContextGroup.bind(this)),e.register(\"contextHandlerRegistered\",this.contextHandlerRegistered.bind(this)),e.register(\"intentHandlerRegistered\",this.intentHandlerRegistered.bind(this)),e.register(\"removeContextHandler\",this.removeContextHandler.bind(this)),e.register(\"sessionContextGroup:createIfNeeded\",this.handleJoinSessionContextGroup.bind(this)),e.register(\"fdc3Open\",this.fdc3HandleOpen.bind(this)),e.register(\"fdc3v2FindIntentsByContext\",this.handleInfoForIntentsByContext.bind(this)),e.register(\"fdc3FindInstances\",this.fdc3HandleFindInstances.bind(this)),e.register(\"fdc3GetAppMetadata\",this.fdc3HandleGetAppMetadata.bind(this)),e.register(\"fdc3v2GetInfo\",(async(e,t)=>this.fdc3HandleGetInfo.bind(this)(e,t))),e.register(\"createPrivateChannelProvider\",(async e=>{const{channelId:t}=e,n=await this.fin.InterApplicationBus.Channel.create(t);p.PrivateChannelProvider.init(n,t)}))}isConnectionAuthorized(e,t){return this.wire.sendAction(\"interop-broker-is-connection-authorized\").catch((e=>{})),Promise.resolve(!0)}isActionAuthorized(e,t,n){return this.wire.sendAction(\"interop-broker-is-action-authorized\").catch((e=>{})),Promise.resolve(!0)}};return Gi.InteropBroker=f,e=new WeakMap,t=new WeakMap,n=new WeakMap,Gi}var zi,Ki={},qi={},Ji=s&&s.__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},Yi=s&&s.__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)};Object.defineProperty(qi,\"__esModule\",{value:!0});const Zi=d,Qi=Hi;class Xi extends Zi.Base{constructor(e,t,n){super(e),zi.set(this,void 0),this.id=n,Ji(this,zi,t,\"f\")}async setContext(e){this.wire.sendAction(\"interop-session-context-group-set-context\").catch((e=>{}));return(await Yi(this,zi,\"f\")).dispatch(`sessionContextGroup:setContext-${this.id}`,{sessionContextGroupId:this.id,context:e})}async getCurrentContext(e){this.wire.sendAction(\"interop-session-context-group-get-context\").catch((e=>{}));return(await Yi(this,zi,\"f\")).dispatch(`sessionContextGroup:getContext-${this.id}`,{sessionContextGroupId:this.id,type:e})}async addContextHandler(e,t){if(this.wire.sendAction(\"interop-session-context-group-add-handler\").catch((e=>{})),\"function\"!=typeof e)throw new Error(\"Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.\");const n=await Yi(this,zi,\"f\");let i;return i=t?`sessionContextHandler:invoke-${this.id}-${t}-${(0,Qi.generateId)()}`:`sessionContextHandler:invoke-${this.id}`,n.register(i,(0,Qi.wrapContextHandler)(e,i)),await n.dispatch(`sessionContextGroup:handlerAdded-${this.id}`,{handlerId:i,contextType:t}),{unsubscribe:await this.createUnsubscribeCb(i)}}async createUnsubscribeCb(e){const t=await Yi(this,zi,\"f\");return async()=>{t.remove(e),await t.dispatch(`sessionContextGroup:handlerRemoved-${this.id}`,{handlerId:e})}}getUserInstance(){return{id:this.id,setContext:(0,Qi.wrapInTryCatch)(this.setContext.bind(this),\"Failed to set context: \"),getCurrentContext:(0,Qi.wrapInTryCatch)(this.getCurrentContext.bind(this),\"Failed to get context: \"),addContextHandler:(0,Qi.wrapInTryCatch)(this.addContextHandler.bind(this),\"Failed to add context handler: \")}}}qi.default=Xi,zi=new WeakMap;var er={},tr={},nr={},ir={},rr=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),or=s&&s.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,\"default\",{enumerable:!0,value:t})}:function(e,t){e.default=t}),sr=s&&s.__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)&&rr(t,e,n);return or(t,e),t};Object.defineProperty(ir,\"__esModule\",{value:!0}),ir.PrivateChannelClient=void 0;const ar=sr(Hi);var cr,dr;function hr(){if(cr)return tr;cr=1;var e,t=s&&s.__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)},n=s&&s.__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},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(tr,\"__esModule\",{value:!0}),tr.FDC3ModuleBase=void 0;const o=nr,a=Hi,c=wr(),d=r(i);return tr.FDC3ModuleBase=class{get client(){return t(this,e,\"f\").call(this)}get fin(){return this.wire.getFin()}constructor(t,i){this.wire=i,e.set(this,void 0),n(this,e,t,\"f\")}async broadcast(e){return this.wire.sendAction(\"fdc3-broadcast\").catch((e=>{})),this.client.setContext(e)}async _open(e,t){this.wire.sendAction(\"fdc3-open\").catch((e=>{}));try{return await c.InteropClient.ferryFdc3Call(this.client,\"fdc3Open\",{app:e,context:t})}catch(e){const t=e.message===a.BROKER_ERRORS.fdc3Open?\"ResolverUnavailable\":e.message;throw new Error(t)}}async _getChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:\"system\",...(0,o.getUnsupportedChannelApis)()})))}async getOrCreateChannel(e){this.wire.sendAction(\"fdc3-get-or-create-channel\").catch((e=>{}));const t=(await this._getChannels()).find((t=>t.id===e));if(t)return{...t,type:\"system\",...(0,o.getUnsupportedChannelApis)()};try{const t=await this.client.joinSessionContextGroup(e);return(0,o.buildAppChannelObject)(t)}catch(e){throw console.error(e.message),new Error(o.ChannelError.CreationFailed)}}async getSystemChannels(){return this.wire.sendAction(\"fdc3-get-system-channels\").catch((e=>{})),this._getChannels()}async joinChannel(e){this.wire.sendAction(\"fdc3-join-channel\").catch((e=>{}));try{return await this.client.joinContextGroup(e)}catch(e){if(e.message===a.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup?console.error(\"The Channel you have tried to join is an App Channel. Custom Channels can only be defined by the Interop Broker through code or manifest configuration. Please use getOrCreateChannel.\"):console.error(e.message),e.message.startsWith(\"Attempting to join a context group that does not exist\"))throw new Error(o.ChannelError.NoChannelFound);throw new Error(o.ChannelError.AccessDenied)}}async getCurrentChannel(){this.wire.sendAction(\"fdc3-get-current-channel\").catch((e=>{}));const e=await this.getCurrentContextGroupInfo();return e?this.buildChannelObject(e):null}async leaveCurrentChannel(){return this.wire.sendAction(\"fdc3-leave-current-channel\").catch((e=>{})),this.client.removeFromContextGroup()}async getCurrentContextGroupInfo(){const e=await this.client.getContextGroups(),t=e.map((async e=>this.client.getAllClientsInContextGroup(e.id))),n=(await Promise.all(t)).findIndex((e=>e.some((e=>{const{uuid:t,name:n}=e;return this.wire.me.uuid===t&&this.wire.me.name===n}))));return e[n]}async buildChannelObject(e){return{...e,type:\"system\",addContextListener:(...[e,t])=>{let n,i;\"function\"==typeof e?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),n=e):(n=t,\"string\"==typeof e&&(i=e));const r=(async()=>{let e=!0;const t=await this.client.getCurrentContext(i);return this.client.addContextHandler(((i,r)=>{if(!e||(e=!1,!(0,d.default)(t,i)))return n(i,r)}),i)})();return{...r,unsubscribe:()=>r.then((e=>e.unsubscribe()))}},broadcast:this.broadcast.bind(this),getCurrentContext:async e=>{const t=await this.client.getCurrentContext(e);return void 0===t?null:t}}}},e=new WeakMap,tr}ir.PrivateChannelClient=class{constructor(e,t){this.id=t,this.client=e,this.listeners=new Map}async broadcast(e){return this.client.dispatch(\"broadcast\",{context:e})}async getCurrentContext(e){return this.client.dispatch(\"getCurrentContext\",{contextType:e})}async addContextListener(e,t){if(\"function\"!=typeof t)throw new Error(\"Non-function argument passed to the second parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.\");let n;n=e?`contextHandler:invoke-${this.id}-${e}-${ar.generateId()}`:`contextHandler:invoke-${this.id}-${ar.generateId()}`,this.client.register(n,ar.wrapContextHandler(t,n));const i={unsubscribe:await this.createContextUnsubscribeCb(n)};return this.listeners.set(n,i),await this.client.dispatch(\"contextHandlerAdded\",{handlerId:n,contextType:e}),i}createNonStandardUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch(\"nonStandardHandlerRemoved\",{handlerId:e})}}createContextUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch(\"contextHandlerRemoved\",{handlerId:e})}}onAddContextListener(e){const t=`onContextHandlerAdded:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch(\"onAddContextHandlerAdded\",{handlerId:t}),n}onDisconnect(e){const t=`onDisconnect:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch(\"onDisconnectHandlerAdded\",{handlerId:t}),n}onUnsubscribe(e){const t=`onUnsubscribe:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch(\"onUnsubscribeHandlerAdded\",{handlerId:t}),n}async cleanUpAllSubs(){Array.from(this.listeners.keys()).forEach((e=>{this.client.remove(e),this.listeners.delete(e)}))}async disconnect(){try{await this.client.dispatch(\"clientDisconnecting\"),await this.cleanUpAllSubs(),await this.client.disconnect()}catch(e){throw new Error(e.message)}}},function(e){var t=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,\"__esModule\",{value:!0}),e.getIntentResolution=e.isChannel=e.isContext=e.connectPrivateChannel=e.buildAppChannelObject=e.buildPrivateChannelObject=e.ChannelError=e.ResultError=e.UnsupportedChannelApiError=e.getUnsupportedChannelApis=void 0;const n=Hi,r=ir,o=t(i);e.getUnsupportedChannelApis=e=>({addContextListener:()=>{throw new a(\"Channel.addContextListener\",e)},broadcast:()=>{throw new a(\"Channel.broadcast\",e)},getCurrentContext:()=>{throw new a(\"Channel.getCurrentContext\",e)}});class a extends Error{constructor(e,t=\"System\"){super(e),this.message=`Calling ${e} on an instance of a ${t} Channel returned by fdc3.get${t}Channels is not supported. If you would like to use a ${t} Channel, please use fdc3.joinChannel, fdc3.addContextListener, and fdc3.broadcast instead.`}}var c,d;e.UnsupportedChannelApiError=a,function(e){e.NoResultReturned=\"NoResultReturned\",e.IntentHandlerRejected=\"IntentHandlerRejected\"}(c=e.ResultError||(e.ResultError={})),(d=e.ChannelError||(e.ChannelError={})).NoChannelFound=\"NoChannelFound\",d.AccessDenied=\"AccessDenied\",d.CreationFailed=\"CreationFailed\";e.buildPrivateChannelObject=e=>{let t=!1;const n=()=>{if(t)throw new Error(\"Private Channel Client has been disconnected from the Private Channel\")};return{id:e.id,type:\"private\",broadcast:async t=>(n(),e.broadcast(t)),getCurrentContext:async t=>(n(),e.getCurrentContext(t)),addContextListener:async(t,i)=>{n();let r=i,o=t;\"function\"==typeof t&&(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),r=t,o=null);return e.addContextListener(o,r)},onAddContextListener:t=>(n(),e.onAddContextListener(t)),disconnect:async()=>(n(),t=!0,e.disconnect()),onDisconnect:t=>(n(),e.onDisconnect(t)),onUnsubscribe:t=>(n(),e.onUnsubscribe(t))}};e.buildAppChannelObject=e=>({id:e.id,type:\"app\",broadcast:e.setContext,getCurrentContext:async t=>{const n=await e.getCurrentContext(t);return void 0===n?null:n},addContextListener:(t,n)=>{let i,r;\"function\"==typeof t?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),i=t):(i=n,\"string\"==typeof t&&(r=t));const s=(async()=>{let t=!0;const n=await e.getCurrentContext(r);return e.addContextHandler(((e,r)=>{if(!t||(t=!1,!(0,o.default)(n,e)))return i(e,r)}),r)})();return{...s,unsubscribe:()=>s.then((e=>e.unsubscribe()))}}});e.connectPrivateChannel=async t=>{try{const n=await fin.InterApplicationBus.Channel.connect(t),i=new r.PrivateChannelClient(n,t);return(0,e.buildPrivateChannelObject)(i)}catch(e){throw new Error(`Private Channel with id: ${t} doesn't exist`)}};e.isContext=e=>{if(e&&\"object\"==typeof e&&\"type\"in e){const{type:t}=e;return\"string\"==typeof t}return!1};e.isChannel=e=>{if(e&&\"object\"==typeof e&&\"type\"in e&&\"id\"in e){const{type:t,id:n}=e;return\"string\"==typeof t&&\"string\"==typeof n&&(\"app\"===t||\"private\"===t)}return!1};e.getIntentResolution=async(t,i,r,o)=>{const s=(0,n.generateId)(),a=new Promise(((e,t)=>{fin.InterApplicationBus.subscribe({uuid:\"*\"},s,(t=>{e(t)})).catch((()=>t(new Error(\"getResult is not supported in this environment\"))))})),d=r?{target:r,intentResolutionResultId:s}:{intentResolutionResultId:s},h=o?{name:o,context:i,metadata:d}:{...i,metadata:d},l=async()=>{let n=await a;if(!n||\"object\"!=typeof n)throw new Error(c.NoResultReturned);const{error:i}=n;if(i)throw new Error(c.IntentHandlerRejected);if((0,e.isChannel)(n)){const{id:i,type:r}=n;switch(r){case\"private\":n=await(0,e.connectPrivateChannel)(i);break;case\"app\":{const r=await t.joinSessionContextGroup(i);n=(0,e.buildAppChannelObject)(r);break}}}else if(!(0,e.isContext)(n))throw new Error(c.NoResultReturned);return n},u=o?await t.fireIntent(h):await t.fireIntentForContext(h);return\"object\"!=typeof u?{source:{appId:\"\",instanceId:\"\"},intent:\"\",version:\"2.0\",getResult:l}:{...u,getResult:l}}}(nr);var lr,ur,pr={};function wr(){if(ur)return Ki;ur=1;var e,t,n=s&&s.__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},i=s&&s.__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)},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ki,\"__esModule\",{value:!0}),Ki.InteropClient=void 0;const o=d,a=r(qi),c=function(){if(dr)return er;dr=1,Object.defineProperty(er,\"__esModule\",{value:!0}),er.Fdc3Module=void 0;const e=Hi,t=hr();class n extends t.FDC3ModuleBase{async open(e,t){await super._open(e,t)}addContextListener(e,t){let n;return this.wire.sendAction(\"fdc3-add-context-listener\").catch((e=>{})),\"function\"==typeof e?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),n=this.client.addContextHandler(e)):n=this.client.addContextHandler(t,null===e?void 0:e),{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}addIntentListener(e,t){this.wire.sendAction(\"fdc3-add-intent-listener\").catch((e=>{}));const n=this.client.registerIntentHandler((e=>{const{context:n,metadata:i}=e,{metadata:r}=n,o=i?.intentResolutionResultId||r?.intentResolutionResultId;o&&this.fin.InterApplicationBus.publish(o,null).catch((()=>null)),t(e.context)}),e,{fdc3Version:\"1.2\"});return{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}async raiseIntent(t,n,i){this.wire.sendAction(\"fdc3-raise-intent\").catch((e=>{}));const r=i?{name:t,context:n,metadata:{target:i}}:{name:t,context:n};try{return await this.client.fireIntent(r)}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntent?\"ResolverUnavailable\":t.message;throw new Error(n)}}async findIntent(t,n){this.wire.sendAction(\"fdc3-find-intent\").catch((e=>{}));try{return await this.client.getInfoForIntent({name:t,context:n})}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntent?\"ResolverUnavailable\":t.message;throw new Error(n)}}async findIntentsByContext(t){this.wire.sendAction(\"fdc3-find-intents-by-context\").catch((e=>{}));try{return await this.client.getInfoForIntentsByContext(t)}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntentsByContext?\"ResolverUnavailable\":t.message;throw new Error(n)}}async raiseIntentForContext(t,n){this.wire.sendAction(\"fdc3-raise-intent-for-context\").catch((e=>{}));try{return await this.client.fireIntentForContext({...t,metadata:{target:n}})}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntentForContext?\"ResolverUnavailable\":t.message;throw new Error(n)}}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}getInfo(){return this.wire.sendAction(\"fdc3-get-info\").catch((e=>{})),{providerVersion:this.wire.environment.getAdapterVersionSync(),provider:`openfin-${this.wire.me.uuid}`,fdc3Version:\"1.2\"}}}return er.Fdc3Module=n,er}(),h=function(){if(lr)return pr;lr=1,Object.defineProperty(pr,\"__esModule\",{value:!0}),pr.Fdc3Module2=void 0;const e=hr(),t=Hi,n=wr(),i=nr,r=ir;class o extends e.FDC3ModuleBase{async open(e,t){return\"string\"==typeof e&&console.warn(\"Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).\"),super._open(e,t)}async findInstances(e){this.wire.sendAction(\"fdc3-find-instances\").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,\"fdc3FindInstances\",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3FindInstances?\"ResolverUnavailable\":e.message;throw new Error(n)}}async getAppMetadata(e){this.wire.sendAction(\"fdc3-get-app-metadata\").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,\"fdc3GetAppMetadata\",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3GetAppMetadata?\"ResolverUnavailable\":e.message;throw new Error(n)}}async addContextListener(e,t){this.wire.sendAction(\"fdc3-add-context-listener\").catch((e=>{}));const n=e=>t=>{const{contextMetadata:n,...i}=t,r=n?[{...i},n]:[t,null];e(...r)};let i=t,r=n(i);return\"function\"==typeof e?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),i=e,r=n(i),this.client.addContextHandler(r)):this.client.addContextHandler(r,null===e?void 0:e)}async findIntent(e,n,i){this.wire.sendAction(\"fdc3-find-intent\").catch((e=>{}));try{return await this.client.getInfoForIntent({name:e,context:n,metadata:{resultType:i}})}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntent?\"ResolverUnavailable\":e.message;throw new Error(n)}}async findIntentsByContext(e,i){this.wire.sendAction(\"fdc3-find-intents-by-context\").catch((e=>{}));const r=i?{context:e,metadata:{resultType:i}}:e;try{return await n.InteropClient.ferryFdc3Call(this.client,\"fdc3v2FindIntentsByContext\",r)}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntentsByContext?\"ResolverUnavailable\":e.message;throw new Error(n)}}async raiseIntent(e,n,r){this.wire.sendAction(\"fdc3-raise-intent\").catch((e=>{}));try{return\"string\"==typeof r&&console.warn(\"Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).\"),(0,i.getIntentResolution)(this.client,n,r,e)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?\"ResolverUnavailable\":e.message;throw new Error(n)}}async raiseIntentForContext(e,n){this.wire.sendAction(\"fdc3-raise-intent-for-context\").catch((e=>{}));try{return\"string\"==typeof n&&console.warn(\"Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).\"),(0,i.getIntentResolution)(this.client,e,n)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?\"ResolverUnavailable\":e.message;throw new Error(n)}}async addIntentListener(e,t){if(this.wire.sendAction(\"fdc3-add-intent-listener\").catch((e=>{})),\"string\"!=typeof e)throw new Error(\"First argument must be an Intent name\");return this.client.registerIntentHandler((async e=>{let n,i;const{context:r,metadata:o}=e,{contextMetadata:s,metadata:a,...c}=r,d=o?.intentResolutionResultId||a?.intentResolutionResultId;try{const e=a?{metadata:a,...c}:{...c};n=await t(e,s),i=n}catch(e){n=e,i={error:!0}}if(d&&this.fin.InterApplicationBus.publish(d,i).catch((()=>null)),n instanceof Error)throw new Error(n.message);return n}),e,{fdc3Version:\"2.0\"})}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}async createPrivateChannel(){const e=(0,t.generateId)();await n.InteropClient.ferryFdc3Call(this.client,\"createPrivateChannelProvider\",{channelId:e});const o=await this.fin.InterApplicationBus.Channel.connect(e),s=new r.PrivateChannelClient(o,e);return(0,i.buildPrivateChannelObject)(s)}async getUserChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:\"user\",...(0,i.getUnsupportedChannelApis)(\"User\")})))}async getSystemChannels(){return console.warn(\"This API has been deprecated. Please use fdc3.getUserChannels instead.\"),super.getSystemChannels()}async joinUserChannel(e){return super.joinChannel(e)}async joinChannel(e){return console.warn(\"This API has been deprecated. Please use fdc3.joinUserChannel instead.\"),super.joinChannel(e)}async getCurrentChannel(){const e=await super.getCurrentChannel();return e?{...e,type:\"user\",broadcast:this.broadcast.bind(this)}:null}async getInfo(){return n.InteropClient.ferryFdc3Call(this.client,\"fdc3v2GetInfo\",{fdc3Version:\"2.0\"})}}return pr.Fdc3Module2=o,pr}(),l=Hi;let u=class extends o.Base{constructor(i,r){super(i),e.set(this,void 0),t.set(this,void 0),n(this,t,new Map,\"f\"),n(this,e,r,\"f\")}async setContext(t){this.wire.sendAction(\"interop-client-set-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"setContext\",{context:t})}async addContextHandler(t,n){if(this.wire.sendAction(\"interop-client-add-context-handler\").catch((e=>{})),\"function\"!=typeof t)throw new Error(\"Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.\");const r=await i(this,e,\"f\");let o;o=n?`invokeContextHandler-${n}-${(0,l.generateId)()}`:\"invokeContextHandler\";const s=(0,l.wrapContextHandler)(t,o);return r.register(o,s),await r.dispatch(\"contextHandlerRegistered\",{handlerId:o,contextType:n}),{unsubscribe:async()=>{r.remove(o),await r.dispatch(\"removeContextHandler\",{handlerId:o})}}}async getContextGroups(){this.wire.sendAction(\"interop-client-get-context-groups\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getContextGroups\")}async joinContextGroup(t,n){this.wire.sendAction(\"interop-client-join-context-group\").catch((e=>{}));const r=await i(this,e,\"f\");if(!t)throw new Error(\"No contextGroupId specified for joinContextGroup.\");return r.dispatch(\"joinContextGroup\",{contextGroupId:t,target:n})}async removeFromContextGroup(t){this.wire.sendAction(\"interop-client-remove-from-context-group\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"removeFromContextGroup\",{target:t})}async getAllClientsInContextGroup(t){this.wire.sendAction(\"interop-client-get-all-clients-in-context-group\").catch((e=>{}));const n=await i(this,e,\"f\");if(!t)throw new Error(\"No contextGroupId specified for getAllClientsInContextGroup.\");return n.dispatch(\"getAllClientsInContextGroup\",{contextGroupId:t})}async getInfoForContextGroup(t){this.wire.sendAction(\"interop-client-get-info-for-context-group\").catch((e=>{}));const n=await i(this,e,\"f\");if(!t)throw new Error(\"No contextGroupId specified for getInfoForContextGroup.\");return n.dispatch(\"getInfoForContextGroup\",{contextGroupId:t})}async fireIntent(t){this.wire.sendAction(\"interop-client-fire-intent\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"fireIntent\",t)}async registerIntentHandler(t,n,r){this.wire.sendAction(\"interop-client-register-intent-handler\").catch((e=>{}));const o=await i(this,e,\"f\"),s=`intent-handler-${n}`,a=(0,l.wrapIntentHandler)(t,s);try{await o.register(s,a),await o.dispatch(\"intentHandlerRegistered\",{handlerId:s,...r})}catch(e){throw new Error(\"Unable to register intent handler\")}return{unsubscribe:async()=>{o.remove(s)}}}async getCurrentContext(t){this.wire.sendAction(\"interop-client-get-current-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getCurrentContext\",{contextType:t})}async getInfoForIntent(t){this.wire.sendAction(\"interop-client-get-info-for-intent\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getInfoForIntent\",t)}async getInfoForIntentsByContext(t){this.wire.sendAction(\"interop-client-get-info-for-intents-by-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getInfoForIntentsByContext\",t)}async fireIntentForContext(t){this.wire.sendAction(\"interop-client-fire-intent-for-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"fireIntentForContext\",t)}async joinSessionContextGroup(n){try{const r=i(this,t,\"f\").get(n);if(r)return r.getUserInstance();const o=await i(this,e,\"f\"),{hasConflict:s}=await o.dispatch(\"sessionContextGroup:createIfNeeded\",{sessionContextGroupId:n});s&&console.warn(`A (non-session) context group with the name \"${n}\" already exists. If you are trying to join a Context Group, call joinContextGroup instead.`);const c=new a.default(this.wire,i(this,e,\"f\"),n);return i(this,t,\"f\").set(n,c),c.getUserInstance()}catch(e){throw console.error(`Error thrown trying to create Session Context Group with id \"${n}\": ${e}`),e}}async onDisconnection(t){this.wire.sendAction(\"interop-client-add-ondisconnection-listener\").catch((e=>{}));return(await i(this,e,\"f\")).onDisconnection((e=>{const{uuid:n}=e;t({type:\"interop-broker\",topic:\"disconnected\",brokerName:n})}))}getFDC3Sync(e){switch(e){case\"1.2\":return new c.Fdc3Module((()=>this),this.wire);case\"2.0\":return new h.Fdc3Module2((()=>this),this.wire);default:throw new Error(`Invalid FDC3 version provided: ${e}. Must be '1.2' or '2.0'`)}}async getFDC3(e){return this.getFDC3Sync(e)}static async ferryFdc3Call(t,n,r){return(await i(t,e,\"f\")).dispatch(n,r||null)}};return Ki.InteropClient=u,e=new WeakMap,t=new WeakMap,Ki}var yr,fr,gr,mr={};function vr(){if(yr)return mr;yr=1,Object.defineProperty(mr,\"__esModule\",{value:!0}),mr.overrideCheck=mr.checkFDC32Overrides=mr.getDefaultViewFdc3VersionFromAppInfo=void 0;const e=Vi();function t(t){return[\"fdc3HandleFindInstances\",\"handleInfoForIntent\",\"handleInfoForIntentsByContext\",\"fdc3HandleGetAppMetadata\",\"fdc3HandleGetInfo\",\"fdc3HandleOpen\",\"handleFiredIntent\",\"handleFiredIntentForContext\"].filter((n=>t[n]===e.InteropBroker.prototype[n]))}return mr.getDefaultViewFdc3VersionFromAppInfo=function({manifest:e,initialOptions:t}){const n=e?.platform?.defaultViewOptions?.fdc3InteropApi??t.defaultViewOptions?.fdc3InteropApi;return[\"1.2\",\"2.0\"].includes(n??\"\")?n:void 0},mr.checkFDC32Overrides=t,mr.overrideCheck=function(e,n){if(n&&\"2.0\"===n){const n=t(e);n.length>0&&console.warn(`WARNING: FDC3 2.0 has been set as a default option for Views in this Platform, but the required InteropBroker APIs for FDC3 2.0 compliance have not all been overridden.\\nThe following APIs need to be overridden:\\n${n.join(\"\\n\")}`)}},mr}function Cr(){return gr||(gr=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),i=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),i(function(){if(fr)return Ti;fr=1;var e=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ti,\"__esModule\",{value:!0}),Ti.InteropModule=void 0;const t=e(n),i=$i,r=d,o=Vi(),a=wr(),c=vr(),h=Tn,l=e=>new e,u=\"You have attempted to use or modify InteropBroker parameters, which is not allowed. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.\";class p extends r.Base{async init(e,n=l){this.wire.sendAction(\"interop-init\").catch((()=>{}));const r=await this.wire.environment.getInteropInfo(this.wire.getFin()),s=(0,i.createUnusableObject)(u),a=(0,i.createWarningObject)(u,(0,t.default)(r)),d=async()=>{throw new Error(u)},p=o.InteropBroker.createClosedConstructor(this.wire,(()=>this.fin.InterApplicationBus.Channel.create(`interop-broker-${e}`)),r);let w;return w=Array.isArray(n)?new((0,h.overrideFromComposables)(...n)(p))(s,d,a):await n(p,s,d,a),(0,c.overrideCheck)(w,r.fdc3Version),w}connectSync(e,t){return this.wire.sendAction(\"interop-connect-sync\").catch((()=>{})),new a.InteropClient(this.wire,this.wire.environment.whenReady().then((()=>this.fin.InterApplicationBus.Channel.connect(`interop-broker-${e}`,{payload:t}))))}}return Ti.InteropModule=p,Ti}(),e),i(wr(),e),i(Vi(),e)}(Li)),Li}var br={},Ir={},Er={},xr={};Object.defineProperty(xr,\"__esModule\",{value:!0}),xr.getSnapshotSourceChannelName=void 0;xr.getSnapshotSourceChannelName=e=>`snapshot-source-provider-${e.uuid}`;var Ar,Pr,Mr,_r,Or,Sr=s&&s.__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},Rr=s&&s.__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)};Object.defineProperty(Er,\"__esModule\",{value:!0}),Er.SnapshotSource=void 0;const Fr=d,jr=xr,kr=new Map;class Lr extends Fr.Base{constructor(e,t){super(e),Ar.set(this,void 0),Pr.set(this,(()=>(kr.has(this.identity.uuid)||kr.set(this.identity.uuid,{eventFired:null,clientPromise:null}),kr.get(this.identity.uuid)))),Mr.set(this,(()=>(Rr(this,Pr,\"f\").call(this).clientPromise||(Rr(this,Pr,\"f\").call(this).clientPromise=Rr(this,_r,\"f\").call(this)),Rr(this,Pr,\"f\").call(this).clientPromise))),_r.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);try{Rr(this,Pr,\"f\").call(this).eventFired||await Rr(this,Or,\"f\").call(this);const t=await this.fin.InterApplicationBus.Channel.connect(e,{wait:!1});return t.onDisconnection((()=>{Rr(this,Pr,\"f\").call(this).clientPromise=null,Rr(this,Pr,\"f\").call(this).eventFired=null})),t}catch(e){throw Rr(this,Pr,\"f\").call(this).clientPromise=null,new Error(\"The targeted SnapshotSource is not currently initialized. Await this object's ready() method.\")}})),Or.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);let t,n;const i=new Promise(((e,i)=>{t=e,n=i}));Rr(this,Pr,\"f\").call(this).eventFired=i;const r=async i=>{try{i.channelName===e&&(t(),await this.fin.InterApplicationBus.Channel.removeListener(\"connected\",r))}catch(e){n(e)}};await this.fin.InterApplicationBus.Channel.on(\"connected\",r)})),Sr(this,Ar,t,\"f\")}get identity(){return Rr(this,Ar,\"f\")}async ready(){this.wire.sendAction(\"snapshot-source-ready\").catch((e=>{}));try{await Rr(this,Mr,\"f\").call(this)}catch(e){await Rr(this,Pr,\"f\").call(this).eventFired}}async getSnapshot(){this.wire.sendAction(\"snapshot-source-get-snapshot\").catch((e=>{}));const e=await Rr(this,Mr,\"f\").call(this),t=await e.dispatch(\"get-snapshot\");return(await t).snapshot}async applySnapshot(e){this.wire.sendAction(\"snapshot-source-apply-snapshot\").catch((e=>{}));return(await Rr(this,Mr,\"f\").call(this)).dispatch(\"apply-snapshot\",{snapshot:e})}}Er.SnapshotSource=Lr,Ar=new WeakMap,Pr=new WeakMap,Mr=new WeakMap,_r=new WeakMap,Or=new WeakMap,Object.defineProperty(Ir,\"__esModule\",{value:!0}),Ir.SnapshotSourceModule=void 0;const Tr=d,$r=Er,Br=xr;class Gr extends Tr.Base{async init(e){if(this.wire.sendAction(\"snapshot-source-init\").catch((e=>{})),\"object\"!=typeof e||\"function\"!=typeof e.getSnapshot||\"function\"!=typeof e.applySnapshot)throw new Error(\"you must pass in a valid SnapshotProvider\");const t=await this.fin.InterApplicationBus.Channel.create((0,Br.getSnapshotSourceChannelName)(this.fin.me));t.register(\"get-snapshot\",(async()=>({snapshot:await e.getSnapshot()}))),t.register(\"apply-snapshot\",(({snapshot:t})=>e.applySnapshot(t)))}wrapSync(e){return this.wire.sendAction(\"snapshot-source-wrap-sync\").catch((e=>{})),new $r.SnapshotSource(this.wire,e)}async wrap(e){return this.wire.sendAction(\"snapshot-source-wrap\").catch((e=>{})),this.wrapSync(e)}}Ir.SnapshotSourceModule=Gr,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Ir,e),n(Er,e)}(br),Object.defineProperty(a,\"__esModule\",{value:!0});var Wr=a.Fin=void 0;const Hr=t,Nr=c,Dr=ie(),Ur=Z(),Vr=de,zr=en,Kr=rn,qr=un,Jr=bn,Yr=J(),Zr=An,Qr=ki,Xr=Cr(),eo=br;class to extends Hr.EventEmitter{constructor(e){super(),this.wire=e,this.System=new Nr.System(e),this.Window=new Dr._WindowModule(e),this.Application=new Ur.ApplicationModule(e),this.InterApplicationBus=new Vr.InterApplicationBus(e),this.Clipboard=new zr.Clipboard(e),this.ExternalApplication=new Kr.ExternalApplicationModule(e),this.Frame=new qr._FrameModule(e),this.GlobalHotkey=new Jr.GlobalHotkey(e),this.Platform=new Zr.PlatformModule(e,this.InterApplicationBus.Channel),this.View=new Yr.ViewModule(e),this.Interop=new Xr.InteropModule(e),this.SnapshotSource=new eo.SnapshotSourceModule(e),e.registerFin(this),this.me=(0,Qr.getMe)(e),e.on(\"disconnected\",(()=>{this.emit(\"disconnected\")}))}}Wr=a.Fin=to;var no={},io={};function ro(e){return\"string\"==typeof e.manifestUrl}function oo(e){return ao(e)&&\"string\"==typeof e.address}function so(e){return oo(e)&&\"string\"==typeof e.token}function ao(e){return\"string\"==typeof e.uuid}function co(e){return e.runtime&&\"string\"==typeof e.runtime.version}function ho(e){return ao(e)&&co(e)}Object.defineProperty(io,\"__esModule\",{value:!0}),io.isInternalConnectConfig=io.isPortDiscoveryConfig=io.isNewConnectConfig=io.isConfigWithReceiver=io.isRemoteConfig=io.isExistingConnectConfig=io.isExternalConfig=void 0,io.isExternalConfig=ro,io.isExistingConnectConfig=oo,io.isRemoteConfig=so,io.isConfigWithReceiver=function(e){return\"object\"==typeof e.receiver&&so({...e,address:\"\"})},io.isNewConnectConfig=ho,io.isPortDiscoveryConfig=function(e){return ro(e)&&co(e)||ho(e)},io.isInternalConnectConfig=function(e){return oo(e)||ho(e)};var lo={},uo={};Object.defineProperty(uo,\"__esModule\",{value:!0}),uo.EmitterMap=void 0;const po=t;function wo(e){return Buffer.from(e).toString(\"base64\")}uo.EmitterMap=class{constructor(){this.storage=new Map}hashKeys(e){return e.map(wo).join(\"/\")}getOrCreate(e){const t=this.hashKeys(e);return this.storage.has(t)||this.storage.set(t,new po.EventEmitter),this.storage.get(t)}has(e){return this.storage.has(this.hashKeys(e))}delete(e){const t=this.hashKeys(e);return this.storage.delete(t)}},Object.defineProperty(lo,\"__esModule\",{value:!0});const yo=uo;class fo extends yo.EmitterMap{constructor(){super(...arguments),this.dispatchEvent=e=>{if(function(e){return\"process-desktop-event\"===e.action}(e)){const{payload:t}=e,n=function(e){const{topic:t}=e;if(\"frame\"===t||\"window\"===t||\"view\"===t){const{uuid:n,name:i}=e;return[t,n,i]}if(\"application\"===t){const{uuid:n}=e;return[t,n]}return[t]}(t);if(this.has(n))return this.getOrCreate(n).emit(t.type,t),!0}return!1}}}lo.default=fo;var go,mo,vo=s&&s.__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},Co=s&&s.__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)},bo=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(no,\"__esModule\",{value:!0});var Io=no.Transport=void 0;const Eo=t,xo=io,Ao=g,Po=bo(lo),Mo=ki,_o=ke;class Oo extends Eo.EventEmitter{constructor(e,t,n){super(),this.wireListeners=new Map,this.topicRefMap=new Map,this.eventAggregator=new Po.default,this.messageHandlers=[this.eventAggregator.dispatchEvent],go.set(this,void 0),mo.set(this,void 0),this.connectSync=()=>{Co(this,go,\"f\").connectSync()},this.getPort=()=>Co(this,go,\"f\").getPort(),vo(this,go,new e(this.onmessage.bind(this)),\"f\"),this.environment=t,this.sendRaw=Co(this,go,\"f\").send.bind(Co(this,go,\"f\")),this.registerMessageHandler(this.handleMessage.bind(this)),Co(this,go,\"f\").on(\"disconnected\",(()=>{for(const[,{handleNack:e}]of this.wireListeners)e({reason:\"Remote connection has closed\"});this.wireListeners.clear(),this.emit(\"disconnected\")}));const{uuid:i,name:r}=n,o=this.environment.getCurrentEntityType();this.me=(0,Mo.getBaseMe)(o,i,r)}getFin(){if(!Co(this,mo,\"f\"))throw new Error(\"No Fin object registered for this transport\");return Co(this,mo,\"f\")}registerFin(e){if(Co(this,mo,\"f\"))throw new Error(\"Fin object has already been registered for this transport\");vo(this,mo,e,\"f\")}shutdown(){return Co(this,go,\"f\").shutdown()}async connect(e){if((0,xo.isConfigWithReceiver)(e))return await Co(this,go,\"f\").connect(e.receiver),this.authorize(e);if((0,xo.isRemoteConfig)(e))return this.connectRemote(e);if((0,xo.isExistingConnectConfig)(e))return this.connectByPort(e);if((0,xo.isNewConnectConfig)(e)){const t=await this.environment.retrievePort(e);return this.connectByPort({...e,address:`ws://localhost:${t}`})}}async connectRemote(e){return await Co(this,go,\"f\").connect(new(this.environment.getWsConstructor())(e.address)),this.authorize(e)}async connectByPort(e){const{address:t,uuid:n}=e,i={...e,type:\"file-token\"},r=Co(this,go,\"f\");await r.connect(new(this.environment.getWsConstructor())(e.address));const o=await this.sendAction(\"request-external-authorization\",{uuid:n,type:\"file-token\"},!0);if(\"external-authorization-response\"!==o.action)throw new Ao.UnexpectedActionError(o.action);return await this.environment.writeToken(o.payload.file,o.payload.token),this.authorize(i)}async authorize(e){const t=await this.sendAction(\"request-authorization\",e,!0);if(\"authorization-response\"!==t.action)throw new Ao.UnexpectedActionError(t.action);if(!0!==t.payload.success)throw new Ao.RuntimeError(t.payload)}sendAction(e,t={},n=!1){let i=()=>{};const r=Ao.RuntimeError.getCallSite(1),o=this.environment.getNextMessageId(),s=new Promise(((s,a)=>{i=a;const c={action:e,payload:t,messageId:o},d=Co(this,go,\"f\");return this.addWireListener(o,s,(e=>this.nackHandler(e,a,r)),n),d.send(c).catch(a)}));return Object.assign(s,{cancel:i,messageId:o})}nackHandler(e,t,n){t(\"string\"==typeof e?e:new Ao.RuntimeError(e,n))}ferryAction(e){return new Promise(((t,n)=>{const i=this.environment.getNextMessageId();e.messageId=i;const r=e=>{t(e.payload)};return Co(this,go,\"f\").send(e).then((()=>this.addWireListener(i,r,(e=>this.nackHandler(e,n)),!1))).catch(n)}))}registerMessageHandler(e){this.messageHandlers.push(e)}addWireListener(e,t,n,i){i?this.uncorrelatedListener=t:this.wireListeners.has(e)?n({reason:\"Duplicate handler id\",error:(0,_o.errorToPOJO)(new Ao.DuplicateCorrelationError(String(e)))}):this.wireListeners.set(e,{resolve:t,handleNack:n})}onmessage(e){for(const t of this.messageHandlers)t.call(null,e)}handleMessage(e){const t=e.correlationId||NaN;if(\"correlationId\"in e){if(!this.wireListeners.has(t))return!1;{const{resolve:n,handleNack:i}=this.wireListeners.get(t);\"ack\"!==e.action?i({reason:\"Did not receive ack action\",error:(0,_o.errorToPOJO)(new Ao.NoAckError(e.action))}):\"payload\"in e?e.payload.success?n.call(null,e):i(e.payload):\"string\"==typeof e.reason?i(e):(console.warn(\"Received invalid response from core\",e),i({reason:\"invalid response shape\"})),this.wireListeners.delete(t)}}else this.uncorrelatedListener&&this.uncorrelatedListener.call(null,e),this.uncorrelatedListener=()=>{};return!0}}Io=no.Transport=Oo,go=new WeakMap,mo=new WeakMap;const So=(...e)=>({log:(...t)=>console.debug(`[${(new Date).toISOString()}]`,...(e=>e.map((e=>`[${e}]`)))(e),...t),getLogger:(...t)=>So(...e,...t)}),Ro=So(\"@openfin/core-web/client\");function Fo(e,t){if(!function(e){return\"string\"==typeof e}(e))throw new Error(`Property ${t} has invalid type. Expected string, got ${typeof e}.`)}const jo=\"web-broker-ports-ready\",ko=Ro.getLogger(\"get-web-interop-ports\");function Lo(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)}function To(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}\"function\"==typeof SuppressedError&&SuppressedError;const $o=e=>{var n,i,r;return r=class extends t.EventEmitter{constructor(t){super(),n.set(this,void 0),i.set(this,!1),this.connectSync=()=>{Lo(this,i,\"f\")||(e.addEventListener(\"message\",(e=>{e.data?.topic?.startsWith(\"wire-message\")&&e.data.message&&Lo(this,n,\"f\").call(this,{...JSON.parse(e.data.message),ports:e.ports})})),e.start())},this.connect=async()=>{this.connectSync()},this.send=t=>(e.postMessage({topic:\"wire-message\",message:JSON.stringify(t)}),Promise.resolve()),this.shutdown=async()=>{e.close()},To(this,n,t,\"f\")}getPort(){return e}},n=new WeakMap,i=new WeakMap,r};var Bo={},Go={};Object.defineProperty(Go,\"__esModule\",{value:!0}),Go.BaseEnvironment=void 0;const Wo=vr();Go.BaseEnvironment=class{async getViewWindowIdentity(e,t){const{identity:n}=await e.View.wrapSync(t).getCurrentWindow();return n}async getInteropInfo(e){const t=await e.Application.getCurrentSync().getInfo().catch((()=>null)),n=t?.initialOptions?.interopBrokerConfiguration??{};return{fdc3Version:t?(0,Wo.getDefaultViewFdc3VersionFromAppInfo)(t):void 0,...n,fdc3Info:{providerVersion:await e.System.getVersion(),provider:\"OpenFin\"}}}},Object.defineProperty(Bo,\"__esModule\",{value:!0});var Ho=Bo.BrowserEnvironment=void 0;const No=Go;class Do extends No.BaseEnvironment{constructor(){super(...arguments),this.type=\"other\",this.getRandomId=()=>{const e=new Uint32Array(1);return window.crypto.getRandomValues(e)[0].toString(32)}}getAdapterVersionSync(){return\"\"}observeBounds(e,t){throw new Error(\"Method not implemented.\")}layoutAllowedInContext(e){return!1}initLayoutManager(e,t,n){throw new Error(\"Method not implemented.\")}applyLayoutSnapshot(e,t,n){throw new Error(\"Method not implemented.\")}createLayout(e,t){throw new Error(\"Method not implemented.\")}destroyLayout(e,t){throw new Error(\"Method not implemented.\")}resolveLayout(e,t){throw new Error(\"Method not implemented.\")}initPlatform(...e){throw new Error(\"Method not implemented.\")}writeToken(e,t){return Promise.resolve(\"\")}retrievePort(e){throw new Error(\"Method not implemented.\")}getNextMessageId(){return this.getRandomId()}createChildContent(e){throw new Error(\"Method not implemented.\")}getWebWindow(e){throw new Error(\"Method not implemented.\")}getCurrentEntityIdentity(){throw new Error(\"Method not implemented.\")}getCurrentEntityType(){return\"external connection\"}raiseEvent(e,t){throw new Error(\"Method not implemented.\")}getUrl(){return location.href}getDefaultChannelOptions(){return{create:{},connect:{}}}getRtcPeer(){return new RTCPeerConnection}getWsConstructor(){return WebSocket}whenReady(){return Promise.resolve()}}Ho=Bo.BrowserEnvironment=Do;const Uo=e=>\"platform\"in e&&void 0!==e.platform;var Vo,zo;class Ko extends Ho{constructor(e){super(),this.connectConfig=e,Vo.set(this,void 0),zo.set(this,new W((async()=>Promise.resolve().then((function(){return require(\"./main-b14f67c9.js\")}))))),Uo(e)&&this.validatePlatformOptions(e)}getAdapterVersionSync(){return\"0.39.21\"}validatePlatformOptions({platform:e}){if(!(\"layoutSnapshot\"in e))throw new Error(\"Platform options are missing layoutSnapshot. Please provide a layoutSnapshot in the platform options.\");if(\"windows\"in e||\"windows\"in e.layoutSnapshot)throw new Error(\"It appears you tried to call connect() with a snapshot object from an OpenFin desktop environment. Note that connect() expects to be called with a platform property with this structure: { platform: { layoutSnapshot } }. To get a layoutSnapshot of the expected structure, use fin.Platform.Layout.getCurrentLayoutManagerSync().getLayoutSnapshot() in v34+ in your desktop environment.\");const{layouts:t}=e.layoutSnapshot;Object.entries(t).map((([e,t])=>{if(\"object\"!=typeof t||null===t)throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must be an object.`);if(!(\"content\"in t))throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must contain a 'content' property.`)}))}async getInteropInfo(e){return{...{contextGroups:void 0,logging:{beforeAction:{enabled:!1},afterAction:{enabled:!1}}},fdc3Version:void 0,fdc3Info:{providerVersion:\"0.39.21\",provider:\"OpenFin Web\"}}}layoutAllowedInContext(e){return!0}async initLayoutManager(e,t,n){if(Lo(this,Vo,\"f\"))throw new Error(\"Layout already initialized.\");if(!Uo(this.connectConfig))throw new Error(\"Platform options are missing from connection config.\");const{WebLayoutEntryPoint:i}=await Lo(this,zo,\"f\").getValue();return To(this,Vo,new i(this.connectConfig),\"f\"),await Lo(this,Vo,\"f\").initLayoutManager(e,t,n)}async applyLayoutSnapshot(e,t,n){Lo(this,Vo,\"f\")?.applyLayoutSnapshot(e,t,n)}async createLayout(e,t){return Lo(this,Vo,\"f\")?.createLayout(e,t)}async destroyLayout(e,t){return Lo(this,Vo,\"f\")?.destroyLayout(e,t)}async getViewWindowIdentity(e,t){return Promise.resolve({uuid:t.uuid,name:t.uuid})}}Vo=new WeakMap,zo=new WeakMap;const qo=()=>{const e=((e,t)=>{const n=new RegExp(`^${t}<(?.*)>$`).exec(e)?.groups?.meta;if(n)try{return JSON.parse(atob(n))}catch(e){throw new Error(`Failed to decode JSON from ${n}.`)}})(window.name,\"of-frame\");if(e)try{const{name:t,uuid:n,brokerUrl:i,providerId:r,contextGroup:o}=e;return Fo(i,\"brokerUrl\"),Fo(n,\"uuid\"),Fo(t,\"name\"),{identity:{name:t,uuid:n},brokerUrl:i,interopConfig:{providerId:r,currentContextGroup:o}}}catch(e){throw new Error(`Unexpected error occurred when inferring platform information: ${e.stack}`)}},Jo=()=>{const e=r.v4();return{uuid:e,name:e}},Yo=async e=>{if(\"enabled\"===e.connectionInheritance){const t=await(async e=>{const t=qo();if(t){const{validateOptions:n=(()=>!0)}=e,{identity:i,...r}=t;if(!await n(r))throw new Error(\"Parent options were rejected by validateOptions.\");return t}})(e);if(t)return t}if(!e.options){const t=\"enabled\"===e.connectionInheritance?\"Broker URL was not specified nor provided by a platform container.\":\"Connection inheritance is disabled but no options were provided.\";throw new Error(t)}return{...e.options,identity:Jo()}};exports.__classPrivateFieldGet=Lo,exports.__classPrivateFieldSet=To,exports.apiExposer=Gn,exports.commonjsGlobal=s,exports.connect=async t=>{try{Ro.log(\"Establishing connection\",t);const{brokerUrl:n,identity:i,timeout:r,interopConfig:s}=await Yo(t),{workerPort:a,iframeBrokerPort:c}=await(async(e,t,n)=>{const{origin:i}=new URL(e),r=document.createElement(\"IFRAME\");let s;r.style.display=\"none\";try{return await new Promise(((a,c)=>{const d=e=>{if(e.source===r.contentWindow&&e.data?.topic===`ack-${jo}`){if(e.origin!==i)c(new Error(`Broker redirected to unexpected origin ${e.origin}, expected ${i}.`));else if(e.data.success){const[t,n]=e.ports;a({iframeBrokerPort:t,workerPort:n})}else c(new m(e.data));window.removeEventListener(\"message\",d),clearTimeout(s)}};window.addEventListener(\"message\",d),ko.log(`Connecting to broker ${e}`),r.setAttribute(\"src\",e),r.setAttribute(\"name\",o(t,\"of-broker\")),document.body.appendChild(r),ko.log(\"Iframe loaded, awaiting init message from iframe\"),n&&(s=setTimeout((()=>{window.removeEventListener(\"message\",d),document.body.removeChild(r),c(new Error(\"Worker did not initialize in time\"))}),n))}))}catch(e){throw new Error(`Failed to initialise Fin Web Client. ${e.message}`,{cause:e})}})(n,i,r);Ro.log(\"Successfully established connection to shared worker\");const d={entityType:\"external connection\",...i};a.start(),c.start();const h=((t,n,i)=>{const r=$o(n),o=new Ko(t),s=new Io(r,o,i);return s.connectSync(),window.Buffer=e.Buffer,new Wr(s)})(t,a,d);return s?.providerId&&(h.me.interop=h.Interop.connectSync(s.providerId),s?.currentContextGroup&&h.me.interop.joinContextGroup(s.currentContextGroup).catch((e=>{console.warn(`Error joining specified context group: ${s?.currentContextGroup}, continuing`,e)}))),{...h,me:{...h.me,identity:{uuid:h.me.uuid,name:h.me.name}}}}catch(e){throw new Error(`An error occured during web-interop connection: ${e.message}`)}},exports.decorators=Nn,exports.encodeOptions=o,exports.layout_constants=ai,exports.lazy=G;\n","\"use strict\";var t=require(\"./main-8cad4070.js\"),e=require(\"uuid\");require(\"buffer/\"),require(\"events\"),require(\"lodash/cloneDeep\"),require(\"lodash/isEqual\");var i={},n={};Object.defineProperty(n,\"__esModule\",{value:!0}),n.mapValuesAsync=n.mapEntriesAsync=void 0;const o=(t,[e,i])=>({...t,[e]:i});async function s(t,e){return(await Promise.all(e.map((async([e,i])=>[e,await t(i,e)])))).reduce(o,{})}n.mapEntriesAsync=s,n.mapValuesAsync=async function(t,e){let i;return i=e instanceof Map?[...e.entries()]:Object.entries(e),s(t,i)};var r,a,l,h,d=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldSet||function(t,e,i,n,o){if(\"m\"===n)throw new TypeError(\"Private method is not writable\");if(\"a\"===n&&!o)throw new TypeError(\"Private accessor was defined without a setter\");if(\"function\"==typeof e?t!==e||!o:!e.has(t))throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");return\"a\"===n?o.call(t,i):o?o.value=i:e.set(t,i),i},c=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldGet||function(t,e,i,n){if(\"a\"===i&&!n)throw new TypeError(\"Private accessor was defined without a getter\");if(\"function\"==typeof e?t!==e||!n:!e.has(t))throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");return\"m\"===i?n:\"a\"===i?n.call(t):n?n.value:e.get(t)};Object.defineProperty(i,\"__esModule\",{value:!0});var m=i.DefaultLayoutManager=void 0;const u=n;class p{constructor(t){a.set(this,void 0),l.set(this,new Map),d(this,a,t,\"f\")}size(){return c(this,l,\"f\").size}async applyLayoutSnapshot({layouts:t}){if(Object.keys(t).length>1)throw new Error(\"[LayoutManager] Tried to call applyLayoutSnapshot with more than 1 layout. When implementing multiple layouts via overridden LayoutManager class, you must override and fully implement the applyLayoutSnapshot method without calling super.applyLayoutSnapshot().\");const[[e,i]]=Object.entries(t);await p.createLayout(this,{layoutName:e,layout:i})}async showLayout({layoutName:t}){}async getLayoutSnapshot(){return{layouts:await(0,u.mapValuesAsync)((t=>t.getFrameSnapshot()),c(this,l,\"f\"))}}async removeLayout({layoutName:t}){}getLayoutIdentityForView(t){const e=[...c(this,l,\"f\").values()].find((e=>e.getCurrentViews().some((e=>e.name===t.name&&e.uuid===t.uuid))));return e?.identity??void 0}isLayoutVisible({layoutName:t}){return c(p,r,\"m\",h).call(p,this,t).isVisible()}resolveLayoutIdentity(t){if(t&&\"layoutName\"in t)return t;const e=[...c(this,l,\"f\").values()];if(1===e.length)return e[0].identity;const i=e.find((t=>t.isVisible()));return i?.identity??void 0}static async resolveLayout(t,e){const i=t.resolveLayoutIdentity(e);if(void 0===i||!(\"layoutName\"in i))throw new Error(\"[layout-manager] resolveLayout: Could not resolve the layout identity. Make sure you include 'layoutName' in the identity object.\");return c(p,r,\"m\",h).call(p,t,i.layoutName)}static async handleSharedView(t,e,i){await(0,u.mapValuesAsync)((async t=>{if(t.identity.layoutName!==e.layoutName){const e=t.getCurrentViews().find((t=>t.name===i.name));e&&await t.onViewDetached({viewIdentity:e,target:null}).catch(console.error)}}),c(t,l,\"f\"))}static async handleLastViewRemoved(t,e){await t.removeLayout(e),await c(t,a,\"f\").handleLastViewRemoved(t)}static async destroyLayout(t,{layoutName:e}){await c(p,r,\"m\",h).call(p,t,e).destroy(),c(t,l,\"f\").delete(e)}static async createLayout(t,e){const{layoutName:i}=e;if(c(t,l,\"f\").has(i))throw new Error(`Layout name ${i} already exists`);await c(t,a,\"f\").createLayout(e,t)}static registerLayout(t,e,i){c(t,l,\"f\").set(e,i)}static getAllLayouts(t){return[...c(t,l,\"f\").values()]}static setInitialSnapshot(t,e){c(t,a,\"f\").setInitialSnapshot(e)}static createClosedConstructor(...t){return class extends p{constructor(){super(...t)}}}}m=i.DefaultLayoutManager=p,r=p,a=new WeakMap,l=new WeakMap,h=function(t,e){const i=c(t,l,\"f\").get(e);if(!i)throw new Error(`[layout-manager] getLayoutByName: Could not locate layout with name '${e}'`);return i};var g={},f={},v={};Object.defineProperty(v,\"__esModule\",{value:!0}),v.ReversibleMap=void 0;v.ReversibleMap=class{constructor(){this.valueToKey=new Map,this.keyToValue=new Map,this.setUnique=(t,e)=>{if(this.hasKey(t)||this.hasValue(e))throw new Error(\"Key or value already in the map.\");this.keyToValue.set(t,e),this.valueToKey.set(e,t)},this.getKey=t=>{const e=this.valueToKey.get(t);if(!e)throw new Error(\"Value not found in the map.\");return e},this.deleteKey=t=>{const e=this.getValue(t);return this.keyToValue.delete(t),this.valueToKey.delete(e),e},this.deleteValue=t=>{const e=this.getKey(t);return this.keyToValue.delete(e),this.valueToKey.delete(t),e},this.hasKey=t=>this.keyToValue.has(t),this.hasValue=t=>this.valueToKey.has(t)}getValue(t){const e=this.keyToValue.get(t);if(!e)throw new Error(\"Key not found in the map.\");return e}},Object.defineProperty(f,\"__esModule\",{value:!0});var _=f.LayoutContentCache=void 0;const y=t.lazy,C=v;class w{constructor(){this.contentItemCache=new C.ReversibleMap,this.contentItemCacheId=0,this.createCacheKey=()=>{const t=`entity-${this.contentItemCacheId.toString()}`;return this.contentItemCacheId+=1,t},this.hasKey=t=>this.contentItemCache.hasKey(t),this.getItemOrUndefined=t=>{try{return this.getContentItemOrThrow(t)}catch(t){return}},this.getContentItemOrThrow=(t,e)=>{if(!this.contentItemCache.hasKey(t))throw new Error(\"Layout component has been destroyed or detached from the current layout.\");const i=this.contentItemCache.getValue(t);if(e&&!e.includes(i.type))throw new Error(`Layout item is not the expected type. Expected ${e.join(\", \")}, got ${i.type}.`);return i},this.getOrCreateEntityId=t=>{if(this.contentItemCache.hasValue(t))return this.contentItemCache.getKey(t);t.onDestroyed((()=>{this.contentItemCache.deleteValue(t)}));const e=this.createCacheKey();return this.contentItemCache.setUnique(e,t),e}}static getSingleInstance(){return w.singleton.getValue()}}_=f.LayoutContentCache=w,w.singleton=new y.Lazy((()=>new w));var I={},b={};!function(t){Object.defineProperty(t,\"__esModule\",{value:!0}),t.getAdjacentStacks=t.doShareEdge=t.getAdjacentItem=void 0;t.getAdjacentItem=(e,i)=>{const{parent:n}=e;if(e.isRoot()||!n)return;const o=[\"top\",\"bottom\"].includes(i)?\"column\":\"row\",s=[\"top\",\"left\"].includes(i)?-1:1;if(n.type===o){const t=n.contentItems.indexOf(e)+s;if(t>=0&&t{const n=t.getBounds(),o=e.getBounds();if(!n||!o)return!1;if([\"top\",\"bottom\"].includes(i)){return!(n.righto.right)}return!(n.bottomo.bottom)};t.getAdjacentStacks=(e,i)=>{const n=[\"top\",\"bottom\"].includes(i)?\"row\":\"column\",o=s=>\"stack\"===s.type?(0,t.doShareEdge)(e,s,i)?[s]:[]:\"root\"===s.type||\"ground\"===s.type?[]:s.type===n?s.contentItems.map((t=>o(t))).flat():s.type!==n?[\"top\",\"right\"].includes(i)?o(s.contentItems[s.contentItems.length-1]):o(s.contentItems[0]):[],s=(0,t.getAdjacentItem)(e,i);return s?o(s):[]}}(b);var S=t.commonjsGlobal&&t.commonjsGlobal.__decorate||function(t,e,i,n){var o,s=arguments.length,r=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if(\"object\"==typeof Reflect&&\"function\"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(s<3?o(r):s>3?o(e,i,r):o(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};Object.defineProperty(I,\"__esModule\",{value:!0}),I.LayoutEntitiesController=void 0;const E=t.decorators,x=b,L=i;class z{constructor(t,e,i){this.wire=t,this.layoutManager=e,this.layoutContentCache=i,this.analytics=t=>{this.wire.sendAction(`layout-controller-${t}`).catch((()=>{}))},this.getLayoutIdentityForViewOrThrow=async t=>{const e=this.layoutManager.getLayoutIdentityForView(t);if(!e)throw new Error(`View identity ${t.name} is not attached to any layouts.`);return e},this.getRoot=async t=>{this.analytics(\"get-root\");const e=(await this.getLayout(t)).getRoot();return{type:e.type,entityId:this.layoutContentCache.getOrCreateEntityId(e)}},this.getStackByView=async t=>{this.analytics(\"get-stack-by-view\");const e=await this.getLayoutIdentityForViewOrThrow(t),i=(await this.getLayout(e)).getStackByView(t);if(\"stack\"===i?.type)return{entityId:this.layoutContentCache.getOrCreateEntityId(i),type:\"stack\"}},this.getStackViews=t=>{this.analytics(\"get-stack-views\");return this.layoutContentCache.getContentItemOrThrow(t,[\"stack\"]).contentItems.map((t=>({name:t.viewName,uuid:this.wire.me.uuid})))},this.isRoot=t=>{this.analytics(\"is-root\");return this.layoutContentCache.getContentItemOrThrow(t).isRoot()},this.exists=t=>(this.analytics(\"exists\"),this.layoutContentCache.hasKey(t)),this.addViewToStack=async(t,e,{index:i}={index:0})=>{this.analytics(\"add-view-to-stack\");const n=this.layoutContentCache.getContentItemOrThrow(t);if(i&&i>n.contentItems.length+1)throw new Error(`Index '${i}' out of range, please exclude the index or specify a number between 0 and ${n.contentItems.length}`);const o={id:t,index:i},{identity:s}=await n.layout.platformCreateView(e,{location:o});return s},this.findViewInStack=(t,e)=>t.contentItems.find((t=>t.viewName===e.name)),this.removeViewFromStack=async(t,e)=>{this.analytics(\"remove-view-from-stack\");const i=this.layoutContentCache.getContentItemOrThrow(t,[\"stack\"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to remove a view ('${e.name}') which does not belong to the stack.`);await n.layout.platformCloseView(e)},this.createAdjacentStack=async(t,e,{position:i=\"right\"}={})=>{if(this.analytics(\"create-adjacent-stack\"),!Array.isArray(e)||0===e.length)throw new Error('The parameter \"views\" must be an array with at least 1 element.');if(![\"top\",\"bottom\",\"left\",\"right\"].includes(i))throw new Error(`Invalid position '${i}' specified.`);const n=this.layoutContentCache.getContentItemOrThrow(t).createAdjacentStack({position:i}),o=this.layoutContentCache.getOrCreateEntityId(n);return await Promise.all(e.reverse().map((t=>this.addViewToStack(o,t)))),o},this.getAdjacentStacks=async({targetId:t,edge:e})=>{this.analytics(\"get-adjacent-stacks\");const i=this.layoutContentCache.getContentItemOrThrow(t);return(0,x.getAdjacentStacks)(i,e).map((t=>({entityId:this.layoutContentCache.getOrCreateEntityId(t)})))},this.setStackActiveView=async(t,e)=>{this.analytics(\"set-stack-active-view\");const i=this.layoutContentCache.getContentItemOrThrow(t,[\"stack\"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to set a view ('${e.name}') as active when it does not belong to the stack.`);i.setActiveContentItem(n,!0)}}async getLayout(t){const e=await L.DefaultLayoutManager.resolveLayout(this.layoutManager,t);if(!e)throw new Error(`Could not resolve target layout identity ${JSON.stringify(t)}`);return e}getContent(t){this.analytics(\"get-content\");return this.layoutContentCache.getContentItemOrThrow(t,[\"column\",\"row\"]).contentItems.map((t=>({type:t.type,entityId:this.layoutContentCache.getOrCreateEntityId(t)})))}getParent(t){this.analytics(\"get-parent\");const e=this.layoutContentCache.getContentItemOrThrow(t);if(!e.isRoot())return e.parent?.contentItems.includes(e)?{type:e.parent.type,entityId:this.layoutContentCache.getOrCreateEntityId(e.parent)}:void 0}}S([(0,E.expose)()],z.prototype,\"getLayoutIdentityForViewOrThrow\",void 0),S([(0,E.expose)()],z.prototype,\"getRoot\",void 0),S([(0,E.expose)()],z.prototype,\"getStackByView\",void 0),S([(0,E.expose)()],z.prototype,\"getStackViews\",void 0),S([(0,E.expose)()],z.prototype,\"getContent\",null),S([(0,E.expose)()],z.prototype,\"getParent\",null),S([(0,E.expose)()],z.prototype,\"isRoot\",void 0),S([(0,E.expose)()],z.prototype,\"exists\",void 0),S([(0,E.expose)()],z.prototype,\"addViewToStack\",void 0),S([(0,E.expose)()],z.prototype,\"removeViewFromStack\",void 0),S([(0,E.expose)()],z.prototype,\"createAdjacentStack\",void 0),S([(0,E.expose)()],z.prototype,\"getAdjacentStacks\",void 0),S([(0,E.expose)()],z.prototype,\"setStackActiveView\",void 0),I.LayoutEntitiesController=z,Object.defineProperty(g,\"__esModule\",{value:!0});var M=g.initLayoutEndpoints=void 0;const P=t.apiExposer,T=t.layout_constants,A=f,k=I,D=i;M=g.initLayoutEndpoints=async function(t,e){const i=t.getFin(),n=await i.Platform.getCurrentSync().getClient(),o=new P.ChannelsExposer(n);await new P.ApiExposer(o).exposeInstance(new k.LayoutEntitiesController(t,e,A.LayoutContentCache.getSingleInstance()),{id:T.LAYOUT_CONTROLLER_ID}),await async function(t,e){const i=t=>async i=>{const n=await D.DefaultLayoutManager.resolveLayout(e,i.target);if(!n)throw new Error(`Could not resolve the layout target from payload ${JSON.stringify(i)}`);return t(n,i)},n=(e,n)=>{t.register(e,i(n))},o=(t,e)=>{n(t,e)};n(\"replace-view\",((t,e)=>t.replaceView(e))),n(\"replace-layout\",((t,{layout:e})=>t.replaceLayout(e))),n(\"add-view\",((t,e)=>t.insertView(e))),o(\"layout-add-view\",((t,{viewOptions:e,location:i,targetView:n})=>t.platformCreateView(e,{location:i,targetView:n}))),n(\"close-view\",((t,e)=>t.cleanupView(e.viewIdentity))),o(\"layout-close-view\",((t,e)=>t.platformCloseView(e.viewIdentity))),n(\"apply-preset-layout\",((t,e)=>t.applyPreset(e))),n(\"get-layout-views\",(t=>t.getCurrentViews())),n(\"get-frame-snapshot\",(t=>t.getFrameSnapshot())),n(\"is-visible\",(t=>t.isVisible())),n(\"destroy\",(t=>t.destroy())),t.register(\"get-layout-snapshot\",(()=>e.getLayoutSnapshot()))}(n,e)};var R={};Object.defineProperty(R,\"__esModule\",{value:!0});var U=R.BaseLayout=void 0;U=R.BaseLayout=class{};var O={};Object.defineProperty(O,\"__esModule\",{value:!0});var V=O.DOMEmitter=void 0;V=O.DOMEmitter=class{constructor(t){this.container=t}dispatchLocalEvent(t,e){const i={...e,type:t,tabSelector:`tab-${e.name}`,containerSelector:`container-${e.name}`,topic:\"openfin-DOM-event\"};this.container.dispatchEvent(new CustomEvent(t,{detail:i}))}};var B={};Object.defineProperty(B,\"__esModule\",{value:!0});var H=B.mapLayoutContentItemsImmutableSync=B.mapLayoutContentItemsImmutable=W=B.isVisible=void 0;var W=B.isVisible=t=>(0!==t.offsetWidth||0!==t.offsetHeight)&&\"hidden\"!==window.getComputedStyle(t).visibility&&t.offsetTop>=0&&t.offsetLeft>=0&&t.offsetTop<=window.innerHeight&&t.offsetLeft<=window.innerWidth;const F=t=>\"type\"in t&&\"component\"===t.type;B.mapLayoutContentItemsImmutable=async function t(e,i){return F(i)?e(i):{...i,content:await Promise.all(i.content?.map((i=>t(e,i))))}},H=B.mapLayoutContentItemsImmutableSync=function t(e,i){return F(i)?e(i):{...i,content:i.content?.map((i=>t(e,i)))}};class N extends Error{constructor(t,e){super(e),this.type=t}}class G extends N{constructor(t,e){super(\"Configuration\",t),this.node=e}}class j extends N{constructor(t){super(\"PopoutBlocked\",t)}}class $ extends N{constructor(t){super(\"API\",t)}}class Z extends N{constructor(t){super(\"Bind\",t)}}class q extends Error{constructor(t,e,i){super(`${t}: ${e}${void 0===i?\"\":\": \"+i}`)}}class X extends q{constructor(t,e){super(\"Assert\",t,e)}}class Y extends q{constructor(t,e,i){super(\"UnreachableCase\",t,`${e}${void 0===i?\"\":\": \"+i}`)}}class K extends q{constructor(t,e){super(\"UnexpectedNull\",t,e)}}class J extends q{constructor(t,e){super(\"UnexpectedUndefined\",t,e)}}var Q;!function(t){let e=!1;const i={PopoutCannotBeCreatedWithGroundItemConfig:{id:0,default:\"Popout cannot be created with ground ItemConfig\"},PleaseRegisterAConstructorFunction:{id:1,default:\"Please register a constructor function\"},ComponentTypeNotRegisteredAndBindComponentEventHandlerNotAssigned:{id:2,default:\"Component type not registered and BindComponentEvent handler not assigned\"},ComponentIsAlreadyRegistered:{id:3,default:\"Component is already registered\"},ComponentIsNotVirtuable:{id:4,default:\"Component is not virtuable. Requires rootHtmlElement field/getter\"},VirtualComponentDoesNotHaveRootHtmlElement:{id:5,default:'Virtual component does not have getter \"rootHtmlElement\"'},ItemConfigIsNotTypeComponent:{id:6,default:\"ItemConfig is not of type component\"},InvalidNumberPartInSizeString:{id:7,default:\"Invalid number part in size string\"},UnknownUnitInSizeString:{id:8,default:\"Unknown unit in size string\"},UnsupportedUnitInSizeString:{id:9,default:\"Unsupported unit in size string\"}};t.idCount=Object.keys(i).length;const n=Object.values(i);t.checkInitialise=function(){if(!e)for(let e=0;e=\"0\"&&t<=\"9\"}function Tt(t,e){const i=zt(e);t.style.width=i}function At(t,e){const i=zt(e);t.style.height=i}function kt(t){return{width:t.offsetWidth,height:t.offsetHeight}}function Dt(t,e){t.style.display=e?\"\":\"none\"}function Rt(t,e){if(void 0!==e)for(const i in e)if(e.hasOwnProperty(i)){const n=e[i],o=t[i];t[i]=Ut(o,n)}return t}function Ut(t,e){if(\"object\"!=typeof e)return e;if(Array.isArray(e)){const t=e.length,i=new Array(t);for(let n=0;n36)throw new Error(\"Too many keys in config minifier map\")},t.translateObject=n}(dt||(dt={})),function(t){t.defaults={type:at.ground,content:[],size:1,sizeUnit:ht.Fractional,minSize:void 0,minSizeUnit:ht.Pixel,id:\"\",isClosable:!0},t.createCopy=function(t,e){switch(t.type){case at.ground:case at.row:case at.column:return gt.createCopy(t,e);case at.stack:return ut.createCopy(t,e);case at.component:return pt.createCopy(t);default:throw new Y(\"CICC91354\",t.type,\"Invalid Config Item type specified\")}},t.createDefault=function(t){switch(t){case at.ground:throw new X(\"CICCDR91562\");case at.row:case at.column:return gt.createDefault(t);case at.stack:return ut.createDefault();case at.component:return pt.createDefault();default:throw new Y(\"CICCDD91563\",t,\"Invalid Config Item type specified\")}},t.isComponentItem=function(t){return t.type===at.component},t.isStackItem=function(t){return t.type===at.stack},t.isGroundItem=function(t){return t.type===at.ground}}(ct||(ct={})),function(t){t.defaultMaximised=!1,function(t){t.createCopy=function(t,e){return void 0===t?void 0:{show:null!=e?e:t.show,popout:t.popout,close:t.close,maximise:t.maximise,minimise:t.minimise,tabDropdown:t.tabDropdown}}}(t.Header||(t.Header={}))}(mt||(mt={})),function(t){function e(t){const e=t.length,i=new Array(e);for(let n=0;n\"__glMaximised\"===t));t>0&&(o=!0,n=n.splice(t,1)),e=n.length>0?n[0]:ct.defaults.id}else e=n;return i=void 0!==t.maximised?t.maximised:o,{id:e,maximised:i}}}(wt||(wt={})),function(t){function e(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0;return{resolved:!0,root:Et.resolve(i),openPopouts:t.resolveOpenPopouts(e.openPopouts),dimensions:t.Dimensions.resolve(e.dimensions),settings:t.Settings.resolve(e.settings),header:t.Header.resolve(e.header,e.settings,e.labels)}}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:Lt.fromResolvedArray(e.openPopouts),settings:_t.Settings.createCopy(e.settings),dimensions:t.Dimensions.fromResolved(e.dimensions),header:_t.Header.createCopy(e.header)}},t.isResolved=function(t){const e=t;return void 0!==e.resolved&&!0===e.resolved},t.resolveOpenPopouts=function(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0,{root:Et.resolve(o),openPopouts:xt.resolveOpenPopouts(e.openPopouts),dimensions:xt.Dimensions.resolve(e.dimensions),settings:xt.Settings.resolve(e.settings),header:xt.Header.resolve(e.header,e.settings,e.labels),parentId:null!==(i=e.parentId)&&void 0!==i?i:null,indexInParent:null!==(n=e.indexInParent)&&void 0!==n?n:null,window:t.Window.resolve(e.window,e.dimensions),resolved:!0}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:i(e.openPopouts),dimensions:xt.Dimensions.fromResolved(e.dimensions),settings:_t.Settings.createCopy(e.settings),header:_t.Header.createCopy(e.header),parentId:e.parentId,indexInParent:e.indexInParent,window:t.Window.fromResolved(e.window)}},t.fromResolvedArray=i}(Lt||(Lt={}));class Wt{constructor(){this._allEventSubscriptions=[],this._subscriptionsMap=new Map,this.unbind=this.removeEventListener,this.trigger=this.emit}tryBubbleEvent(t,e){}emit(t,...e){let i=this._subscriptionsMap.get(t);if(void 0!==i){i=i.slice();for(let t=0;t0){const n=e.slice();n.unshift(t);const o=this._allEventSubscriptions.slice();for(let t=0;t0?n.contentItems[0]:n,e=0);const o=this._layoutManager.createAndInitContentItem(i,t);t.addChild(o,e),this._layoutManager.layoutConfig.settings.popInOnClose?this._onClose():this.close()}createWindow(){const t=this.createUrl(),e=Math.floor(1e6*Math.random()).toString(36),i=this.serializeWindowFeatures({width:this._initialWindowSize.width,height:this._initialWindowSize.height,innerWidth:this._initialWindowSize.width,innerHeight:this._initialWindowSize.height,menubar:\"no\",toolbar:\"no\",location:\"no\",personalbar:\"no\",resizable:\"yes\",scrollbars:\"no\",status:\"no\"});if(this._popoutWindow=globalThis.open(t,e,i),this._popoutWindow)this._popoutWindow.addEventListener(\"load\",(()=>this.positionWindow()),{passive:!0}),this._popoutWindow.addEventListener(\"beforeunload\",(()=>{this._layoutManager.layoutConfig.settings.popInOnClose?this.popIn():this._onClose()}),{passive:!0}),this._checkReadyInterval=setInterval((()=>this.checkReady()),10);else if(!0===this._layoutManager.layoutConfig.settings.blockedPopoutsThrowError){throw new j(\"Popout blocked\")}}checkReady(){if(null===this._popoutWindow)throw new K(\"BPCR01844\");this._popoutWindow.__glInstance&&this._popoutWindow.__glInstance.isInitialised&&(this.onInitialised(),void 0!==this._checkReadyInterval&&(clearInterval(this._checkReadyInterval),this._checkReadyInterval=void 0))}serializeWindowFeatures(t){const e=[];for(const i in t)e.push(i+\"=\"+t[i].toString());return e.join(\",\")}createUrl(){const t=\"gl-window-config-\"+Ot(),e=_t.minifyConfig(this._config);try{localStorage.setItem(t,JSON.stringify(e))}catch(t){throw new Error(\"Error while writing to localStorage \"+function(t){return t instanceof Error?t.message:\"string\"==typeof t?t:\"Unknown Error\"}(t))}const i=new URL(location.href);return i.searchParams.set(\"gl-window\",t),i.toString()}positionWindow(){if(null===this._popoutWindow)throw new Error(\"BrowserPopout.positionWindow: null popoutWindow\");this._popoutWindow.moveTo(this._initialWindowSize.left,this._initialWindowSize.top),this._popoutWindow.focus()}onInitialised(){this._isInitialised=!0,this.getGlInstance().on(\"popIn\",(()=>this.popIn())),this.emit(\"initialised\")}_onClose(){setTimeout((()=>this.emit(\"closed\")),50)}}class Gt extends Wt{constructor(t,e,i,n){super(),this.layoutManager=t,this._parent=i,this._element=n,this._popInParentIds=[],this._type=e.type,this._id=e.id,this._isInitialised=!1,this.isGround=!1,this.isRow=!1,this.isColumn=!1,this.isStack=!1,this.isComponent=!1,this.size=e.size,this.sizeUnit=e.sizeUnit,this.minSize=e.minSize,this.minSizeUnit=e.minSizeUnit,this._isClosable=e.isClosable,this._pendingEventPropagations={},this._throttledEvents=[\"stateChanged\"],this._contentItems=this.createContentItems(e.content)}get type(){return this._type}get id(){return this._id}set id(t){this._id=t}get popInParentIds(){return this._popInParentIds}get parent(){return this._parent}get contentItems(){return this._contentItems}get isClosable(){return this._isClosable}get element(){return this._element}get isInitialised(){return this._isInitialised}static isStack(t){return t.isStack}static isComponentItem(t){return t.isComponent}static isComponentParentableItem(t){return t.isStack||t.isGround}removeChild(t,e=!1){const i=this._contentItems.indexOf(t);if(-1===i)throw new Error(\"Can't remove child item. Unknown content item\");if(e||this._contentItems[i].destroy(),this._contentItems.splice(i,1),this._contentItems.length>0)this.updateSize(!1);else if(!this.isGround&&!0===this._isClosable){if(null===this._parent)throw new K(\"CIUC00874\");this._parent.removeChild(this)}}addChild(t,e,i){return null!=e||(e=this._contentItems.length),this._contentItems.splice(e,0,t),t.setParent(this),!0===this._isInitialised&&!1===t._isInitialised&&t.init(),e}replaceChild(t,e,i=!1){const n=this._contentItems.indexOf(t),o=t._element.parentNode;if(-1===n)throw new X(\"CIRCI23232\",\"Can't replace child. oldChild is not child of this\");if(null===o)throw new K(\"CIRCP23232\");if(o.replaceChild(e._element,t._element),!0===i&&(t._parent=null,t.destroy()),this._contentItems[n]=e,e.setParent(this),e.size=t.size,e.sizeUnit=t.sizeUnit,e.minSize=t.minSize,e.minSizeUnit=t.minSizeUnit,null===e._parent)throw new K(\"CIRCNC45699\");!0===e._parent._isInitialised&&!1===e._isInitialised&&e.init(),this.updateSize(!1)}remove(){if(null===this._parent)throw new K(\"CIR11110\");this._parent.removeChild(this)}popout(){const t=Ot(),e=this.layoutManager.createPopoutFromContentItem(this,void 0,t,void 0);return this.emitBaseBubblingEvent(\"stateChanged\"),e}calculateConfigContent(){const t=this._contentItems,e=t.length,i=new Array(e);for(let n=0;nthis.propagateEventToLayoutManager(t,e))))}propagateEventToLayoutManager(t,e){this._pendingEventPropagations[t]=!1,this.layoutManager.emitUnknown(t,e)}}class jt extends Gt{constructor(t,e,i){super(t,e,i,document.createElement(\"div\")),this._parentItem=i,this._focused=!1,this.isComponent=!0,this._reorderEnabled=e.reorderEnabled,this.applyUpdatableConfig(e),this._initialWantMaximise=e.maximised;const n=document.createElement(\"div\");n.classList.add(\"lm_content\"),this.element.appendChild(n),this._container=new Ft(e,this,t,n,(t=>this.handleUpdateItemConfigEvent(t)),(()=>this.show()),(()=>this.hide()),(t=>this.focus(t)),(t=>this.blur(t)))}get componentName(){return this._container.componentType}get componentType(){return this._container.componentType}get reorderEnabled(){return this._reorderEnabled}get initialWantMaximise(){return this._initialWantMaximise}get component(){return this._container.component}get container(){return this._container}get parentItem(){return this._parentItem}get headerConfig(){return this._headerConfig}get title(){return this._title}get tab(){return this._tab}get focused(){return this._focused}destroy(){this._container.destroy(),super.destroy()}applyUpdatableConfig(t){this.setTitle(t.title),this._headerConfig=t.header}toConfig(){const t=this._container.stateRequestEvent,e=void 0===t?this._container.state:t();return{type:at.component,content:[],size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,maximised:!1,isClosable:this.isClosable,reorderEnabled:this._reorderEnabled,title:this._title,header:mt.Header.createCopy(this._headerConfig),componentType:pt.copyComponentType(this.componentType),componentState:e}}close(){if(null===this.parent)throw new K(\"CIC68883\");this.parent.removeChild(this,!1)}enterDragMode(t,e){Tt(this.element,t),At(this.element,e),this._container.enterDragMode(t,e)}exitDragMode(){this._container.exitDragMode()}enterStackMaximised(){this._container.enterStackMaximised()}exitStackMaximised(){this._container.exitStackMaximised()}drag(){this._container.drag()}updateSize(t){this.updateNodeSize(t)}init(){this.updateNodeSize(!1),super.init(),this._container.emit(\"open\"),this.initContentItems()}setTitle(t){this._title=t,this.emit(\"titleChanged\",t),this.emit(\"stateChanged\")}setTab(t){this._tab=t,this.emit(\"tab\",t),this._container.setTab(t)}hide(){super.hide(),this._container.setVisibility(!1)}show(){super.show(),this._container.setVisibility(!0)}focus(t=!1){this.parentItem.setActiveComponentItem(this,!0,t)}setFocused(t){this._focused=!0,this.tab.setFocused(),t||this.emitBaseBubblingEvent(\"focus\")}blur(t=!1){this._focused&&this.layoutManager.setFocusedComponentItem(void 0,t)}setBlurred(t){this._focused=!1,this.tab.setBlurred(),t||this.emitBaseBubblingEvent(\"blur\")}setParent(t){this._parentItem=t,super.setParent(t)}handleUpdateItemConfigEvent(t){this.applyUpdatableConfig(t)}updateNodeSize(t){if(\"none\"!==this.element.style.display){const{width:e,height:i}=kt(this.element);this._container.setSizeToNodeSize(e,i,t)}}}class $t extends Gt{constructor(){super(...arguments),this._focused=!1}get focused(){return this._focused}setFocusedValue(t){this._focused=t}}class Zt extends Wt{constructor(t,e){super(),this._eElement=t,this._pointerTracking=!1,this._pointerDownEventListener=t=>this.onPointerDown(t),this._pointerMoveEventListener=t=>this.onPointerMove(t),this._pointerUpEventListener=t=>this.onPointerUp(t),this._timeout=void 0,this._allowableTargets=[t,...e],this._oDocument=document,this._eBody=document.body,this._nDelay=1800,this._nDistance=10,this._nX=0,this._nY=0,this._nOriginalX=0,this._nOriginalY=0,this._dragging=!1,this._eElement.addEventListener(\"pointerdown\",this._pointerDownEventListener,{passive:!0})}destroy(){this.checkRemovePointerTrackingEventListeners(),this._eElement.removeEventListener(\"pointerdown\",this._pointerDownEventListener)}cancelDrag(){this.processDragStop(void 0)}onPointerDown(t){if(this._allowableTargets.includes(t.target)&&t.isPrimary){const e=this.getPointerCoordinates(t);this.processPointerDown(e)}}processPointerDown(t){this._nOriginalX=t.x,this._nOriginalY=t.y,this._oDocument.addEventListener(\"pointermove\",this._pointerMoveEventListener),this._oDocument.addEventListener(\"pointerup\",this._pointerUpEventListener,{passive:!0}),this._pointerTracking=!0,this._timeout=setTimeout((()=>{try{this.startDrag()}catch(t){throw console.error(t),t}}),this._nDelay)}onPointerMove(t){this._pointerTracking&&(this.processDragMove(t),t.preventDefault())}processDragMove(t){this._nX=t.pageX-this._nOriginalX,this._nY=t.pageY-this._nOriginalY,!1===this._dragging&&(Math.abs(this._nX)>this._nDistance||Math.abs(this._nY)>this._nDistance)&&this.startDrag(),this._dragging&&this.emit(\"drag\",this._nX,this._nY,t)}onPointerUp(t){this.processDragStop(t)}processDragStop(t){var e;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this.checkRemovePointerTrackingEventListeners(),!0===this._dragging&&(this._eBody.classList.remove(\"lm_dragging\"),this._eElement.classList.remove(\"lm_dragging\"),null===(e=this._oDocument.querySelector(\"iframe\"))||void 0===e||e.style.setProperty(\"pointer-events\",\"\"),this._dragging=!1,this.emit(\"dragStop\",t))}checkRemovePointerTrackingEventListeners(){this._pointerTracking&&(this._oDocument.removeEventListener(\"pointermove\",this._pointerMoveEventListener),this._oDocument.removeEventListener(\"pointerup\",this._pointerUpEventListener),this._pointerTracking=!1)}startDrag(){var t;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this._dragging=!0,this._eBody.classList.add(\"lm_dragging\"),this._eElement.classList.add(\"lm_dragging\"),null===(t=this._oDocument.querySelector(\"iframe\"))||void 0===t||t.style.setProperty(\"pointer-events\",\"none\"),this.emit(\"dragStart\",this._nOriginalX,this._nOriginalY)}getPointerCoordinates(t){return{x:t.pageX,y:t.pageY}}}class qt{constructor(t,e,i){this._isVertical=t,this._size=e,this._grabSize=i0){const i=this.createSplitter(Math.max(0,e-1)).element;e>0?(this.contentItems[e-1].element.insertAdjacentElement(\"afterend\",i),i.insertAdjacentElement(\"afterend\",t.element)):(this.contentItems[0].element.insertAdjacentElement(\"beforebegin\",i),i.insertAdjacentElement(\"beforebegin\",t.element))}else this._childElementContainer.appendChild(t.element);super.addChild(t,e);const n=1/this.contentItems.length*100;if(!0===i)return this.emitBaseBubblingEvent(\"stateChanged\"),e;for(let e=0;e0&&(this.calculateRelativeSizes(),this.setAbsoluteSizes()),this.emitBaseBubblingEvent(\"stateChanged\"),this.emit(\"resize\")}setAbsoluteSizes(){const t=this.calculateAbsoluteSizes();for(let e=0;e0&&t.itemSizes[e]++,this._isColumn?(Tt(this.contentItems[e].element,t.crossAxisSize),At(this.contentItems[e].element,t.itemSizes[e])):(Tt(this.contentItems[e].element,t.itemSizes[e]),At(this.contentItems[e].element,t.crossAxisSize))}calculateAbsoluteSizes(){const t=(this.contentItems.length-1)*this._splitterSize,{width:e,height:i}=kt(this.element);let n,o;this._isColumn?(n=i-t,o=e):(n=e-t,o=i);let s=0;const r=[];for(let t=0;t0){const n=100-t;for(let t=0;t100&&e.length>0){for(let t=0;te)return;{const r=i/e;let a=i;for(let e=0;ethis.onSplitterDrag(e,t,i))),e.on(\"dragStop\",(()=>this.onSplitterDragStop(e))),e.on(\"dragStart\",(()=>this.onSplitterDragStart(e))),this._splitter.splice(t,0,e),e}getSplitItems(t){const e=this._splitter.indexOf(t);return{before:this.contentItems[e],after:this.contentItems[e+1]}}calculateContentItemMinSize(t){const e=t.minSize;if(void 0!==e){if(t.minSizeUnit===ht.Pixel)return e;throw new X(\"ROCGMD98831\",JSON.stringify(t))}{const t=this.layoutManager.layoutConfig.dimensions;return this._isColumn?t.defaultMinItemHeight:t.defaultMinItemWidth}}calculateContentItemsTotalMinSize(t){let e=0;for(const i of t)e+=this.calculateContentItemMinSize(i);return e}onSplitterDragStart(t){const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=this.calculateContentItemsTotalMinSize(e.before.contentItems),s=this.calculateContentItemsTotalMinSize(e.after.contentItems);this._splitterPosition=0,this._splitterMinPosition=-1*(i-o),this._splitterMaxPosition=n-s}onSplitterDrag(t,e,i){let n=this._isColumn?i:e;if(null===this._splitterMinPosition||null===this._splitterMaxPosition)throw new K(\"ROCOSD59226\");n=Math.max(n,this._splitterMinPosition),n=Math.min(n,this._splitterMaxPosition),this._splitterPosition=n;const o=zt(n);this._isColumn?t.element.style.top=o:t.element.style.left=o}onSplitterDragStop(t){if(null===this._splitterPosition)throw new K(\"ROCOSDS66932\");{const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=(this._splitterPosition+i)/(i+n),s=e.before.size+e.after.size;e.before.size=o*s,e.after.size=(1-o)*s,t.element.style.top=zt(0),t.element.style.left=zt(0),globalThis.requestAnimationFrame((()=>this.updateSize(!1)))}}}!function(t){t.getElementDimensionSize=function(t,e){return\"width\"===e?function(t){return t.offsetWidth}(t):function(t){return t.offsetHeight}(t)},t.setElementDimensionSize=function(t,e,i){return\"width\"===e?Tt(t,i):At(t,i)},t.createElement=function(t,e){const i=t.createElement(\"div\");return i.classList.add(\"lm_item\"),e?i.classList.add(\"lm_column\"):i.classList.add(\"lm_row\"),i}}(Xt||(Xt={}));class Yt extends $t{constructor(t,e,i){super(t,vt.create(e),null,Yt.createElement(document)),this.isGround=!0,this._childElementContainer=this.element,this._containerElement=i;let n=null;for(;;){const t=n?n.previousSibling:this._containerElement.lastChild;if(!(t instanceof Element&&t.classList.contains(\"lm_content\")))break;n=t}this._containerElement.insertBefore(this.element,n)}init(){if(!0!==this.isInitialised){this.updateNodeSize();for(let t=0;t0?this.contentItems[0]:this,n.isComponent)throw new Error(\"Cannot add item as child to ComponentItem\");{const t=this.layoutManager.createAndInitContentItem(i,n);return e=n.addChild(t,e),n===this?-1:e}}loadComponentAsRoot(t){this.clearRoot();const e=Ct.resolve(t,!1);if(e.maximised)throw new Error(\"Root Component cannot be maximised\");{const t=new jt(this.layoutManager,e,this);t.init(),this.addChild(t,0)}}addChild(t,e){if(this.contentItems.length>0)throw new Error(\"Ground node can only have a single child\");return this._childElementContainer.appendChild(t.element),e=super.addChild(t,e),this.updateSize(!1),this.emitBaseBubblingEvent(\"stateChanged\"),e}calculateConfigContent(){const t=this.contentItems,e=t.length,i=new Array(e);for(let n=0;n0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e)),this.updateContentItemsSize(!1))}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}createSideAreas(){const t=Yt.Area.oppositeSides,e=new Array(Object.keys(t).length);let i=0;for(const n in t){const o=n,s=this.getElementArea();if(null===s)throw new K(\"RCSA77553\");s.side=o,\"2\"===t[o][1]?s[o]=s[t[o]]-50:s[o]=s[t[o]]+50,s.surface=(s.x2-s.x1)*(s.y2-s.y1),e[i++]=s}return e}highlightDropZone(t,e,i){this.layoutManager.tabDropPlaceholder.remove(),super.highlightDropZone(t,e,i)}onDrop(t,e){if(t.isComponent){const e=ut.createDefault(),i=t;e.header=mt.Header.createCopy(i.headerConfig);const n=this.layoutManager.createAndInitContentItem(e,this);n.addChild(t),t=n}if(0===this.contentItems.length)this.addChild(t);else{if(t.type===at.row||t.type===at.column){const e=ut.createDefault(),i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}const i=\"x\"==e.side[0]?at.row:at.column,n=\"2\"==e.side[1],o=this.contentItems[0];if(o instanceof Xt&&o.type===i){const e=o.contentItems[n?0:o.contentItems.length-1];o.addChild(t,n?0:void 0,!0),e.size*=.5,t.size=e.size,t.sizeUnit=ht.Percent,o.updateSize(!1)}else{const e=ct.createDefault(i),s=this.layoutManager.createContentItem(e,this);this.replaceChild(o,s),s.addChild(t,n?0:void 0,!0),s.addChild(o,n?void 0:0,!0),o.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}}dock(){throw new X(\"GID87731\")}validateDocking(){throw new X(\"GIVD87732\")}getAllContentItems(){const t=[this];return this.deepGetAllContentItems(this.contentItems,t),t}getConfigMaximisedItems(){const t=[];return this.deepFilterContentItems(this.contentItems,t,(t=>!(!Gt.isStack(t)||!t.initialWantMaximise)||!(!Gt.isComponentItem(t)||!t.initialWantMaximise))),t}getItemsByPopInParentId(t){const e=[];return this.deepFilterContentItems(this.contentItems,e,(e=>e.popInParentIds.includes(t))),e}toConfig(){throw new Error(\"Cannot generate GroundItem config\")}setActiveComponentItem(t,e,i){}updateNodeSize(){const{width:t,height:e}=kt(this._containerElement);Tt(this.element,t),At(this.element,e),this.contentItems.length>0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e))}deepGetAllContentItems(t,e){for(let i=0;ithis.onClick(t),this._touchStartEventListener=t=>this.onTouchStart(t),this._element=document.createElement(\"div\"),this._element.classList.add(i),this._element.title=e,this._header.on(\"destroy\",(()=>this.destroy())),this._element.addEventListener(\"click\",this._clickEventListener,{passive:!0}),this._element.addEventListener(\"touchstart\",this._touchStartEventListener,{passive:!0}),this._header.controlsContainerElement.appendChild(this._element)}get element(){return this._element}destroy(){var t;this._element.removeEventListener(\"click\",this._clickEventListener),this._element.removeEventListener(\"touchstart\",this._touchStartEventListener),null===(t=this._element.parentNode)||void 0===t||t.removeChild(this._element)}onClick(t){this._pushEvent(t)}onTouchStart(t){this._pushEvent(t)}}class Jt{constructor(t,e,i,n,o){var s;this._layoutManager=t,this._componentItem=e,this._closeEvent=i,this._focusEvent=n,this._dragStartEvent=o,this._isActive=!1,this._tabClickListener=t=>this.onTabClickDown(t),this._tabTouchStartListener=t=>this.onTabTouchStart(t),this._closeClickListener=()=>this.onCloseClick(),this._closeTouchStartListener=()=>this.onCloseTouchStart(),this._dragStartListener=(t,e)=>this.onDragStart(t,e),this._contentItemDestroyListener=()=>this.onContentItemDestroy(),this._tabTitleChangedListener=t=>this.setTitle(t),this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_tab\"),this._titleElement=document.createElement(\"span\"),this._titleElement.classList.add(\"lm_title\"),this._closeElement=document.createElement(\"div\"),this._closeElement.classList.add(\"lm_close_tab\"),this._element.appendChild(this._titleElement),this._element.appendChild(this._closeElement),e.isClosable?this._closeElement.style.display=\"\":this._closeElement.style.display=\"none\",this.setTitle(e.title),this._componentItem.on(\"titleChanged\",this._tabTitleChangedListener);(null!==(s=e.reorderEnabled)&&void 0!==s?s:this._layoutManager.layoutConfig.settings.reorderEnabled)&&this.enableReorder(),this._element.addEventListener(\"click\",this._tabClickListener,{passive:!0}),this._element.addEventListener(\"touchstart\",this._tabTouchStartListener,{passive:!0}),this._componentItem.isClosable?(this._closeElement.addEventListener(\"click\",this._closeClickListener,{passive:!0}),this._closeElement.addEventListener(\"touchstart\",this._closeTouchStartListener,{passive:!0})):(this._closeElement.remove(),this._closeElement=void 0),this._componentItem.setTab(this),this._layoutManager.emit(\"tabCreated\",this)}get isActive(){return this._isActive}get componentItem(){return this._componentItem}get contentItem(){return this._componentItem}get element(){return this._element}get titleElement(){return this._titleElement}get closeElement(){return this._closeElement}get reorderEnabled(){return void 0!==this._dragListener}set reorderEnabled(t){t!==this.reorderEnabled&&(t?this.enableReorder():this.disableReorder())}setTitle(t){this._titleElement.innerText=t,this._element.title=t}setActive(t){t!==this._isActive&&(this._isActive=t,t?this._element.classList.add(\"lm_active\"):this._element.classList.remove(\"lm_active\"))}destroy(){var t,e;this._closeEvent=void 0,this._focusEvent=void 0,this._dragStartEvent=void 0,this._element.removeEventListener(\"click\",this._tabClickListener),this._element.removeEventListener(\"touchstart\",this._tabTouchStartListener),null===(t=this._closeElement)||void 0===t||t.removeEventListener(\"click\",this._closeClickListener),null===(e=this._closeElement)||void 0===e||e.removeEventListener(\"touchstart\",this._closeTouchStartListener),this._componentItem.off(\"titleChanged\",this._tabTitleChangedListener),this.reorderEnabled&&this.disableReorder(),this._element.remove()}setBlurred(){this._element.classList.remove(\"lm_focused\"),this._titleElement.classList.remove(\"lm_focused\")}setFocused(){this._element.classList.add(\"lm_focused\"),this._titleElement.classList.add(\"lm_focused\")}onDragStart(t,e){if(void 0===this._dragListener)throw new J(\"TODSDLU10093\");if(void 0===this._dragStartEvent)throw new J(\"TODS23309\");this._dragStartEvent(t,e,this._dragListener,this.componentItem)}onContentItemDestroy(){void 0!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=void 0)}onTabClickDown(t){const e=t.target;e!==this._element&&e!==this._titleElement||(0===t.button?this.notifyFocus():1===t.button&&this._componentItem.isClosable&&this.notifyClose())}onTabTouchStart(t){t.target===this._element&&this.notifyFocus()}onCloseClick(){this.notifyClose()}onCloseTouchStart(){this.notifyClose()}notifyClose(){if(void 0===this._closeEvent)throw new J(\"TNC15007\");this._closeEvent(this._componentItem)}notifyFocus(){if(void 0===this._focusEvent)throw new J(\"TNA15007\");this._focusEvent(this._componentItem)}enableReorder(){this._dragListener=new Zt(this._element,[this._titleElement]),this._dragListener.on(\"dragStart\",this._dragStartListener),this._componentItem.on(\"destroy\",this._contentItemDestroyListener)}disableReorder(){if(void 0===this._dragListener)throw new J(\"TDR87745\");this._componentItem.off(\"destroy\",this._contentItemDestroyListener),this._dragListener.off(\"dragStart\",this._dragStartListener),this._dragListener=void 0}}class Qt{constructor(t,e,i,n,o){this._layoutManager=t,this._componentRemoveEvent=e,this._componentFocusEvent=i,this._componentDragStartEvent=n,this._dropdownActiveChangedEvent=o,this._tabs=[],this._lastVisibleTabIndex=-1,this._dropdownActive=!1,this._element=document.createElement(\"section\"),this._element.classList.add(\"lm_tabs\"),this._dropdownElement=document.createElement(\"section\"),this._dropdownElement.classList.add(\"lm_tabdropdown_list\"),this._dropdownElement.style.display=\"none\"}get tabs(){return this._tabs}get tabCount(){return this._tabs.length}get lastVisibleTabIndex(){return this._lastVisibleTabIndex}get element(){return this._element}get dropdownElement(){return this._dropdownElement}get dropdownActive(){return this._dropdownActive}destroy(){for(let t=0;tthis.handleTabCloseEvent(t)),(t=>this.handleTabFocusEvent(t)),((t,e,i,n)=>this.handleTabDragStartEvent(t,e,i,n)));void 0===e&&(e=this._tabs.length),this._tabs.splice(e,0,i),ethis._lastVisibleTabIndex){const t=this._tabs[e];for(let t=e;t>0;t--)this._tabs[t]=this._tabs[t-1];this._tabs[0]=t}}updateTabSizes(t,e){let i=!1;this.tryUpdateTabSizes(i,t,e)||(i=!0,this.tryUpdateTabSizes(i,t,e)),i!==this._dropdownActive&&(this._dropdownActive=i,this._dropdownActiveChangedEvent())}tryUpdateTabSizes(t,e,i){if(this._tabs.length>0){if(void 0===i)throw new Error(\"non-empty tabs must have active component item\");let n=0,o=!1;const s=this._layoutManager.layoutConfig.settings.tabOverlapAllowance,r=this._tabs.indexOf(i.tab),a=this._tabs[r];this._lastVisibleTabIndex=-1;for(let i=0;ie){if(o)i===r&&(l.style.zIndex=\"auto\",l.style.marginLeft=\"\",l.parentElement!==this._element&&this._element.appendChild(l));else{let t;if(t=r>0&&r<=i?(d-e)/(i-1):(d-e)/i,tthis.onClick(t),this._touchStartListener=t=>this.onTouchStart(t),this._rowColumnClosable=!0,this._closeButton=null,this._popoutButton=null,this._tabsContainer=new Qt(this._layoutManager,(t=>this.handleTabInitiatedComponentRemoveEvent(t)),(t=>this.handleTabInitiatedComponentFocusEvent(t)),((t,e,i,n)=>this.handleTabInitiatedDragStartEvent(t,e,i,n)),(()=>this.processTabDropdownActiveChanged())),this._show=i.show,this._popoutEnabled=i.popoutEnabled,this._popoutLabel=i.popoutLabel,this._maximiseEnabled=i.maximiseEnabled,this._maximiseLabel=i.maximiseLabel,this._minimiseEnabled=i.minimiseEnabled,this._minimiseLabel=i.minimiseLabel,this._closeEnabled=i.closeEnabled,this._closeLabel=i.closeLabel,this._tabDropdownEnabled=i.tabDropdownEnabled,this._tabDropdownLabel=i.tabDropdownLabel,this.setSide(i.side),this._canRemoveComponent=this._configClosable,this._element=document.createElement(\"section\"),this._element.classList.add(\"lm_header\"),this._controlsContainerElement=document.createElement(\"section\"),this._controlsContainerElement.classList.add(\"lm_controls\"),this._element.appendChild(this._tabsContainer.element),this._element.appendChild(this._controlsContainerElement),this._element.appendChild(this._tabsContainer.dropdownElement),this._element.addEventListener(\"click\",this._clickListener,{passive:!0}),this._element.addEventListener(\"touchstart\",this._touchStartListener,{passive:!0}),this._documentMouseUpListener=()=>this._tabsContainer.hideAdditionalTabsDropdown(),globalThis.document.addEventListener(\"mouseup\",this._documentMouseUpListener,{passive:!0}),this._tabControlOffset=this._layoutManager.layoutConfig.settings.tabControlOffset,this._tabDropdownEnabled&&(this._tabDropdownButton=new Kt(this,this._tabDropdownLabel,\"lm_tabdropdown\",(()=>this._tabsContainer.showAdditionalTabsDropdown()))),this._popoutEnabled&&(this._popoutButton=new Kt(this,this._popoutLabel,\"lm_popout\",(()=>this.handleButtonPopoutEvent()))),this._maximiseEnabled&&(this._maximiseButton=new Kt(this,this._maximiseLabel,\"lm_maximise\",(t=>this.handleButtonMaximiseToggleEvent(t)))),this._configClosable&&(this._closeButton=new Kt(this,this._closeLabel,\"lm_close\",(()=>s()))),this.processTabDropdownActiveChanged()}get show(){return this._show}get side(){return this._side}get leftRightSided(){return this._leftRightSided}get layoutManager(){return this._layoutManager}get parent(){return this._parent}get tabs(){return this._tabsContainer.tabs}get lastVisibleTabIndex(){return this._tabsContainer.lastVisibleTabIndex}get element(){return this._element}get tabsContainerElement(){return this._tabsContainer.element}get controlsContainerElement(){return this._controlsContainerElement}destroy(){this.emit(\"destroy\"),this._popoutEvent=void 0,this._maximiseToggleEvent=void 0,this._clickEvent=void 0,this._touchStartEvent=void 0,this._componentRemoveEvent=void 0,this._componentFocusEvent=void 0,this._componentDragStartEvent=void 0,this._tabsContainer.destroy(),globalThis.document.removeEventListener(\"mouseup\",this._documentMouseUpListener),this._element.remove()}createTab(t,e){this._tabsContainer.createTab(t,e)}removeTab(t){this._tabsContainer.removeTab(t)}processActiveComponentChanged(t){this._tabsContainer.processActiveComponentChanged(t),this.updateTabSizes()}setSide(t){this._side=t,this._leftRightSided=[nt.right,nt.left].includes(this._side)}setRowColumnClosable(t){this._rowColumnClosable=t,this.updateClosability()}updateClosability(){let t;if(this._configClosable)if(this._rowColumnClosable){t=!0;const e=this.tabs.length;for(let i=0;i1}applyFocusedValue(t){t?this._element.classList.add(\"lm_focused\"):this._element.classList.remove(\"lm_focused\")}processMaximised(){if(void 0===this._maximiseButton)throw new J(\"HPMAX16997\");this._maximiseButton.element.setAttribute(\"title\",this._minimiseLabel)}processMinimised(){if(void 0===this._maximiseButton)throw new J(\"HPMIN16997\");this._maximiseButton.element.setAttribute(\"title\",this._maximiseLabel)}updateTabSizes(){if(this._tabsContainer.tabCount>0){const t=this._show?this._layoutManager.layoutConfig.dimensions.headerHeight:0;let e;this._leftRightSided?(this._element.style.height=\"\",this._element.style.width=zt(t)):(this._element.style.width=\"\",this._element.style.height=zt(t)),e=this._leftRightSided?this._element.offsetHeight-this._controlsContainerElement.offsetHeight-this._tabControlOffset:this._element.offsetWidth-this._controlsContainerElement.offsetWidth-this._tabControlOffset,this._tabsContainer.updateTabSizes(e,this._getActiveComponentItemEvent())}}handleTabInitiatedComponentRemoveEvent(t){if(this._canRemoveComponent){if(void 0===this._componentRemoveEvent)throw new J(\"HHTCE22294\");this._componentRemoveEvent(t)}}handleTabInitiatedComponentFocusEvent(t){if(void 0===this._componentFocusEvent)throw new J(\"HHTAE22294\");this._componentFocusEvent(t)}handleTabInitiatedDragStartEvent(t,e,i,n){if(this._canRemoveComponent){if(void 0===this._componentDragStartEvent)throw new J(\"HHTDSE22294\");this._componentDragStartEvent(t,e,i,n)}else i.cancelDrag()}processTabDropdownActiveChanged(){void 0!==this._tabDropdownButton&&Dt(this._tabDropdownButton.element,this._tabsContainer.dropdownActive)}handleButtonPopoutEvent(){if(this._layoutManager.layoutConfig.settings.popoutWholeStack){if(void 0===this._popoutEvent)throw new J(\"HHBPOE17834\");this._popoutEvent()}else{const t=this._getActiveComponentItemEvent();t&&t.popout()}}handleButtonMaximiseToggleEvent(t){if(void 0===this._maximiseToggleEvent)throw new J(\"HHBMTE16834\");this._maximiseToggleEvent()}onClick(t){t.target===this._element&&this.notifyClick(t)}onTouchStart(t){t.target===this._element&&this.notifyTouchStart(t)}notifyClick(t){if(void 0===this._clickEvent)throw new J(\"HNHC46834\");this._clickEvent(t)}notifyTouchStart(t){if(void 0===this._touchStartEvent)throw new J(\"HNHTS46834\");this._touchStartEvent(t)}}class ee extends $t{constructor(t,e,i){var n,o,s,r,a,l,h,d,c,m,u,p,g,f,v,_,y,C,w;super(t,e,i,ee.createElement(document)),this._headerSideChanged=!1,this._resizeListener=()=>this.handleResize(),this._maximisedListener=()=>this.handleMaximised(),this._minimisedListener=()=>this.handleMinimised(),this._headerConfig=e.header;const I=t.layoutConfig.header,b=e.content;let S;if(1!==b.length)S=void 0;else{S=b[0].header}this._initialWantMaximise=e.maximised,this._initialActiveItemIndex=null!==(n=e.activeItemIndex)&&void 0!==n?n:0;const E=null!==(r=null!==(s=null===(o=this._headerConfig)||void 0===o?void 0:o.show)&&void 0!==s?s:null==S?void 0:S.show)&&void 0!==r?r:I.show,x=null!==(h=null!==(l=null===(a=this._headerConfig)||void 0===a?void 0:a.popout)&&void 0!==l?l:null==S?void 0:S.popout)&&void 0!==h?h:I.popout,L=null!==(m=null!==(c=null===(d=this._headerConfig)||void 0===d?void 0:d.maximise)&&void 0!==c?c:null==S?void 0:S.maximise)&&void 0!==m?m:I.maximise,z=null!==(g=null!==(p=null===(u=this._headerConfig)||void 0===u?void 0:u.close)&&void 0!==p?p:null==S?void 0:S.close)&&void 0!==g?g:I.close,M=null!==(_=null!==(v=null===(f=this._headerConfig)||void 0===f?void 0:f.minimise)&&void 0!==v?v:null==S?void 0:S.minimise)&&void 0!==_?_:I.minimise,P=null!==(w=null!==(C=null===(y=this._headerConfig)||void 0===y?void 0:y.tabDropdown)&&void 0!==C?C:null==S?void 0:S.tabDropdown)&&void 0!==w?w:I.tabDropdown;this._maximisedEnabled=!1!==L;const T={show:!1!==E,side:!1===E?nt.top:E,popoutEnabled:!1!==x,popoutLabel:!1===x?\"\":x,maximiseEnabled:this._maximisedEnabled,maximiseLabel:!1===L?\"\":L,closeEnabled:!1!==z,closeLabel:!1===z?\"\":z,minimiseEnabled:!0,minimiseLabel:M,tabDropdownEnabled:!1!==P,tabDropdownLabel:!1===P?\"\":P};this._header=new te(t,this,T,e.isClosable&&!1!==z,(()=>this.getActiveComponentItem()),(()=>this.remove()),(()=>this.handlePopoutEvent()),(()=>this.toggleMaximise()),(t=>this.handleHeaderClickEvent(t)),(t=>this.handleHeaderTouchStartEvent(t)),(t=>this.handleHeaderComponentRemoveEvent(t)),(t=>this.handleHeaderComponentFocusEvent(t)),((t,e,i,n)=>this.handleHeaderComponentStartDragEvent(t,e,i,n))),this.isStack=!0,this._childElementContainer=document.createElement(\"section\"),this._childElementContainer.classList.add(\"lm_items\"),this.on(\"resize\",this._resizeListener),this._maximisedEnabled&&(this.on(\"maximised\",this._maximisedListener),this.on(\"minimised\",this._minimisedListener)),this.element.appendChild(this._header.element),this.element.appendChild(this._childElementContainer),this.setupHeaderPosition(),this._header.updateClosability()}get childElementContainer(){return this._childElementContainer}get header(){return this._header}get headerShow(){return this._header.show}get headerSide(){return this._header.side}get headerLeftRightSided(){return this._header.leftRightSided}get contentAreaDimensions(){return this._contentAreaDimensions}get initialWantMaximise(){return this._initialWantMaximise}get isMaximised(){return this===this.layoutManager.maximisedStack}get stackParent(){if(!this.parent)throw new Error(\"Stack should always have a parent\");return this.parent}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}init(){if(!0===this.isInitialised)return;this.updateNodeSize();for(let t=0;t0){if(this._initialActiveItemIndex<0||this._initialActiveItemIndex>=e)throw new Error(`ActiveItemIndex out of range: ${this._initialActiveItemIndex} id: ${this.id}`);for(let i=0;ithis.contentItems.length)throw e-=1,new X(\"SAC99728\");if(t instanceof jt)return e=super.addChild(t,e),this._childElementContainer.appendChild(t.element),this._header.createTab(t,e),this.setActiveComponentItem(t,i),this._header.updateTabSizes(),this.updateSize(!1),t.container.setBaseLogicalZIndex(),this._header.updateClosability(),this.emitStateChangedEvent(),e;throw new X(\"SACC88532\")}removeChild(t,e){const i=t,n=this.contentItems.indexOf(i),o=1===this.contentItems.length;if(this._activeComponentItem===i&&(i.focused&&i.blur(),!o)){const t=0===n?1:n-1;this.setActiveComponentItem(this.contentItems[t],!1)}this._header.removeTab(i),super.removeChild(i,e),o||this._header.updateClosability(),this.emitStateChangedEvent()}toggleMaximise(){this.isMaximised?this.minimise():this.maximise()}maximise(){if(!this.isMaximised){this.layoutManager.setMaximisedStack(this);const t=this.contentItems,e=t.length;for(let i=0;i0&&void 0===t)throw new Error(\"expected non-empty stack to have an active component item\");return{type:\"stack\",content:this.calculateConfigContent(),size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,isClosable:this.isClosable,maximised:this.isMaximised,header:this.createHeaderConfig(),activeItemIndex:t}}onDrop(t,e){if(\"header\"===this._dropSegment){if(this.resetHeaderDropZone(),void 0===this._dropIndex)throw new J(\"SODDI68990\");return void this.addChild(t,this._dropIndex)}if(\"body\"===this._dropSegment)return void this.addChild(t,0,!0);const i=\"top\"===this._dropSegment||\"bottom\"===this._dropSegment,n=\"left\"===this._dropSegment||\"right\"===this._dropSegment,o=\"top\"===this._dropSegment||\"left\"===this._dropSegment,s=i&&this.stackParent.isColumn||n&&this.stackParent.isRow;if(t.isComponent){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createAndInitContentItem(e,this);i.addChild(t),t=i}if(t.type===at.row||t.type===at.column){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}if(s){const e=this.stackParent.contentItems.indexOf(this);this.stackParent.addChild(t,o?e:e+1,!0),this.size*=.5,t.size=this.size,t.sizeUnit=this.sizeUnit,this.stackParent.updateSize(!1)}else{const e=i?at.column:at.row,n=ct.createDefault(e),s=this.layoutManager.createContentItem(n,this);this.stackParent.replaceChild(this,s),s.addChild(t,o?0:void 0,!0),s.addChild(this,o?void 0:0,!0),this.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}highlightDropZone(t,e){for(const i in this._contentAreaDimensions){const n=i,o=this._contentAreaDimensions[n].hoverArea;if(o.x1t&&o.y1e)return void(\"header\"===n?(this._dropSegment=\"header\",this.highlightHeaderDropZone(this._header.leftRightSided?e:t)):(this.resetHeaderDropZone(),this.highlightBodyDropZone(n)))}}getArea(){if(\"none\"===this.element.style.display)return null;const t=super.getElementArea(this._header.element),e=super.getElementArea(this._childElementContainer);if(null===t||null===e)throw new K(\"SGAHC13086\");const i=e.x2-e.x1,n=e.y2-e.y1;return this._contentAreaDimensions={header:{hoverArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2},highlightArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2}}},0===this.contentItems.length?(this._contentAreaDimensions.body={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2}},super.getElementArea(this.element)):(this._contentAreaDimensions.left={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x1+.25*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x1+.5*i,y2:e.y2}},this._contentAreaDimensions.top={hoverArea:{x1:e.x1+.25*i,y1:e.y1,x2:e.x1+.75*i,y2:e.y1+.5*n},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y1+.5*n}},this._contentAreaDimensions.right={hoverArea:{x1:e.x1+.75*i,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1+.5*i,y1:e.y1,x2:e.x2,y2:e.y2}},this._contentAreaDimensions.bottom={hoverArea:{x1:e.x1+.25*i,y1:e.y1+.5*n,x2:e.x1+.75*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1+.5*n,x2:e.x2,y2:e.y2}},super.getElementArea(this.element))}positionHeader(t){this._header.side!==t&&(this._header.setSide(t),this._headerSideChanged=!0,this.setupHeaderPosition())}updateNodeSize(){if(\"none\"!==this.element.style.display){const t=kt(this.element);if(this._header.show){t[this._header.leftRightSided?it.width:it.height]-=this.layoutManager.layoutConfig.dimensions.headerHeight}this._childElementContainer.style.width=zt(t.width),this._childElementContainer.style.height=zt(t.height);for(let e=0;e=o&&tthis.onDrag(t,e,i))),this._dragListener.on(\"dragStop\",(()=>this.onDrop())),this.createDragProxyElements(t,e),null===this._componentItem.parent)throw new K(\"DPC10097\");this._componentItemFocused=this._componentItem.focused,this._componentItemFocused&&this._componentItem.blur(),this._componentItem.parent.removeChild(this._componentItem,!0),this.setDimensions(),document.body.appendChild(this._element),this.determineMinMaxXY(),this._layoutManager.calculateItemAreas(),this.setDropPosition(t,e)}get element(){return this._element}createDragProxyElements(t,e){this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_dragProxy\");const i=document.createElement(\"div\");i.classList.add(\"lm_header\");const n=document.createElement(\"div\");n.classList.add(\"lm_tabs\");const o=document.createElement(\"div\");o.classList.add(\"lm_tab\");const s=document.createElement(\"span\");s.classList.add(\"lm_title\"),o.appendChild(s),n.appendChild(o),i.appendChild(n),this._proxyContainerElement=document.createElement(\"div\"),this._proxyContainerElement.classList.add(\"lm_content\"),this._element.appendChild(i),this._element.appendChild(this._proxyContainerElement),this._originalParent instanceof ee&&this._originalParent.headerShow&&(this._sided=this._originalParent.headerLeftRightSided,this._element.classList.add(\"lm_\"+this._originalParent.headerSide),[nt.right,nt.bottom].indexOf(this._originalParent.headerSide)>=0&&this._proxyContainerElement.insertAdjacentElement(\"afterend\",i)),this._element.style.left=zt(t),this._element.style.top=zt(e),o.setAttribute(\"title\",this._componentItem.title),s.insertAdjacentText(\"afterbegin\",this._componentItem.title),this._proxyContainerElement.appendChild(this._componentItem.element)}determineMinMaxXY(){const t=this._layoutManager.groundItem;if(void 0===t)throw new J(\"DPDMMXY73109\");{const e=t.element.getBoundingClientRect();this._minX=e.left+document.body.scrollLeft,this._minY=e.top+document.body.scrollTop,this._maxX=this._minX+e.width,this._maxY=this._minY+e.height}}onDrag(t,e,i){const n=i.pageX,o=i.pageY;this.setDropPosition(n,o),this._componentItem.drag()}setDropPosition(t,e){this._layoutManager.layoutConfig.settings.constrainDragToContainer&&(t<=this._minX?t=Math.ceil(this._minX):t>=this._maxX&&(t=Math.floor(this._maxX)),e<=this._minY?e=Math.ceil(this._minY):e>=this._maxY&&(e=Math.floor(this._maxY))),this._element.style.left=zt(t),this._element.style.top=zt(e),this._area=this._layoutManager.getArea(t,e),null!==this._area&&(this._lastValidArea=this._area,this._area.contentItem.highlightDropZone(t,e,this._area))}onDrop(){const t=this._layoutManager.dropTargetIndicator;if(null===t)throw new K(\"DPOD30011\");let e;if(t.hide(),this._componentItem.exitDragMode(),null!==this._area)e=this._componentItem,this._area.contentItem.onDrop(e,this._area);else if(null!==this._lastValidArea){e=this._componentItem;this._lastValidArea.contentItem.onDrop(e,this._lastValidArea)}else this._originalParent?(e=this._componentItem,this._originalParent.addChild(e)):this._componentItem.destroy();this._element.remove(),this._layoutManager.emit(\"itemDropped\",this._componentItem),this._componentItemFocused&&void 0!==e&&e.focus()}setDimensions(){const t=this._layoutManager.layoutConfig.dimensions;if(void 0===t)throw new Error(\"DragProxy.setDimensions: dimensions undefined\");let e=t.dragProxyWidth,i=t.dragProxyHeight;if(void 0===e||void 0===i)throw new Error(\"DragProxy.setDimensions: width and/or height undefined\");const n=!1===this._layoutManager.layoutConfig.header.show?0:t.headerHeight;this._element.style.width=zt(e),this._element.style.height=zt(i),e-=this._sided?n:0,i-=this._sided?0:n,this._proxyContainerElement.style.width=zt(e),this._proxyContainerElement.style.height=zt(i),this._componentItem.enterDragMode(e,i),this._componentItem.show()}}class ne{constructor(t,e,i,n,o,s,r){this._layoutManager=t,this._element=e,this._extraAllowableChildTargets=i,this._componentTypeOrFtn=n,this._componentState=o,this._title=s,this._id=r,this._dragListener=null,this._dummyGroundContainer=document.createElement(\"div\");const a=gt.createDefault(\"row\");this._dummyGroundContentItem=new Yt(this._layoutManager,a,this._dummyGroundContainer),this.createDragListener()}destroy(){this.removeDragListener()}createDragListener(){this.removeDragListener(),this._dragListener=new Zt(this._element,this._extraAllowableChildTargets),this._dragListener.on(\"dragStart\",((t,e)=>this.onDragStart(t,e))),this._dragListener.on(\"dragStop\",(()=>this.onDragStop()))}onDragStart(t,e){var i;const n=\"component\";let o;if(\"function\"==typeof this._componentTypeOrFtn){const t=this._componentTypeOrFtn();o=ne.isDragSourceComponentItemConfig(t)?{type:n,componentState:t.state,componentType:t.type,title:null!==(i=t.title)&&void 0!==i?i:this._title}:t}else o={type:n,componentState:this._componentState,componentType:this._componentTypeOrFtn,title:this._title,id:this._id};const s=bt.resolve(o,!1),r=new jt(this._layoutManager,s,this._dummyGroundContentItem);if(this._dummyGroundContentItem.contentItems.push(r),null===this._dragListener)throw new K(\"DSODSD66746\");{const i=new ie(t,e,this._dragListener,this._layoutManager,r,this._dummyGroundContentItem),n=this._layoutManager.transitionIndicator;if(null===n)throw new K(\"DSODST66746\");n.transitionElements(this._element,i.element)}}onDragStop(){this.createDragListener()}removeDragListener(){null!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=null)}}!function(t){t.isDragSourceComponentItemConfig=function(t){return!(\"componentType\"in t)}}(ne||(ne={}));class oe{constructor(){this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_dropTargetIndicator\");const t=document.createElement(\"div\");t.classList.add(\"lm_inner\"),this._element.appendChild(t),document.body.appendChild(this._element)}destroy(){this._element.remove()}highlightArea(t,e){this._element.style.left=zt(t.x1+e),this._element.style.top=zt(t.y1+e),this._element.style.width=zt(t.x2-t.x1-e),this._element.style.height=zt(t.y2-t.y1-e),this._element.style.display=\"block\"}hide(){Dt(this._element,!1)}}class se{constructor(){this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_transition_indicator\"),document.body.appendChild(this._element),this._toElement=null,this._fromDimensions=null,this._totalAnimationDuration=200,this._animationStartTime=null}destroy(){this._element.remove()}transitionElements(t,e){}nextAnimationFrame(){}measure(t){const e=t.getBoundingClientRect();return{left:e.left,top:e.top,width:t.offsetWidth,height:t.offsetHeight}}}class re extends Wt{constructor(t){super(),this._layoutManager=t,this._childEventListener=t=>this.onEventFromChild(t),globalThis.addEventListener(re.ChildEventName,this._childEventListener,{passive:!0})}emit(t,...e){\"userBroadcast\"===t?this.emitUserBroadcast(...e):super.emit(t,...e)}emitUserBroadcast(...t){this.handleUserBroadcastEvent(\"userBroadcast\",t)}destroy(){globalThis.removeEventListener(re.ChildEventName,this._childEventListener)}handleUserBroadcastEvent(t,e){this._layoutManager.isSubWindow?this.propagateToParent(t,e):this.propagateToThisAndSubtree(t,e)}onEventFromChild(t){const e=t.detail;this.handleUserBroadcastEvent(e.eventName,e.args)}propagateToParent(t,e){const i={bubbles:!0,cancelable:!0,detail:{layoutManager:this._layoutManager,eventName:t,args:e}},n=new CustomEvent(re.ChildEventName,i),o=globalThis.opener;if(null===o)throw new K(\"EHPTP15778\");o.dispatchEvent(n)}propagateToThisAndSubtree(t,e){this.emitUnknown(t,...e);for(let i=0;ithis.handleContainerResize())),this._windowBeforeUnloadListener=()=>this.onBeforeUnload(),this._windowBeforeUnloadListening=!1,this._maximisedStackBeforeDestroyedListener=t=>this.cleanupBeforeMaximisedStackDestroyed(t),this.isSubWindow=t.isSubWindow,this._constructorOrSubWindowLayoutConfig=t.constructorOrSubWindowLayoutConfig,Q.checkInitialise(),dt.checkInitialise(),void 0!==t.containerElement&&(this._containerElement=t.containerElement)}get container(){return this._containerElement}get isInitialised(){return this._isInitialised}get groundItem(){return this._groundItem}get root(){return this._groundItem}get openPopouts(){return this._openPopouts}get dropTargetIndicator(){return this._dropTargetIndicator}get transitionIndicator(){return this._transitionIndicator}get width(){return this._width}get height(){return this._height}get eventHub(){return this._eventHub}get rootItem(){if(void 0===this._groundItem)throw new Error(\"Cannot access rootItem before init\");return 0===this._groundItem.contentItems.length?void 0:this._groundItem.contentItems[0]}get focusedComponentItem(){return this._focusedComponentItem}get tabDropPlaceholder(){return this._tabDropPlaceholder}get maximisedStack(){return this._maximisedStack}get deprecatedConstructor(){return!this.isSubWindow&&void 0!==this._constructorOrSubWindowLayoutConfig}destroy(){if(this._isInitialised){this._windowBeforeUnloadListening&&(globalThis.removeEventListener(\"beforeunload\",this._windowBeforeUnloadListener),this._windowBeforeUnloadListening=!1),!0===this.layoutConfig.settings.closePopoutsOnUnload&&this.closeAllOpenPopouts(),this._resizeObserver.disconnect(),this.checkClearResizeTimeout(),void 0!==this._groundItem&&this._groundItem.destroy(),this._tabDropPlaceholder.remove(),null!==this._dropTargetIndicator&&this._dropTargetIndicator.destroy(),null!==this._transitionIndicator&&this._transitionIndicator.destroy(),this._eventHub.destroy();for(const t of this._dragSources)t.destroy();this._dragSources=[],this._isInitialised=!1}}minifyConfig(t){return _t.minifyConfig(t)}unminifyConfig(t){return _t.unminifyConfig(t)}init(){let t;if(this.setContainer(),this._dropTargetIndicator=new oe,this._transitionIndicator=new se,this.updateSizeFromContainer(),this.isSubWindow){if(void 0===this._constructorOrSubWindowLayoutConfig)throw new J(\"LMIU07155\");{const e=this._constructorOrSubWindowLayoutConfig.root;if(void 0===e)throw new X(\"LMIC07156\");if(!Ct.isComponent(e))throw new X(\"LMIC07157\");t=e;const i=xt.resolve(this._constructorOrSubWindowLayoutConfig);this.layoutConfig=Object.assign(Object.assign({},i),{root:void 0})}}else void 0===this._constructorOrSubWindowLayoutConfig?this.layoutConfig=_t.createDefault():this.layoutConfig=xt.resolve(this._constructorOrSubWindowLayoutConfig);const e=this.layoutConfig;this._groundItem=new Yt(this,e.root,this._containerElement),this._groundItem.init(),this.checkLoadedLayoutMaximiseItem(),this._resizeObserver.observe(this._containerElement),this._isInitialised=!0,this.adjustColumnsResponsive(),this.emit(\"initialised\"),void 0!==t&&this.loadComponentAsRoot(t)}loadLayout(t){if(!this.isInitialised)throw new Error(\"GoldenLayout: Need to call init() if LayoutConfig with defined root passed to constructor\");if(void 0===this._groundItem)throw new J(\"LMLL11119\");this.createSubWindows(),this.layoutConfig=xt.resolve(t),this._groundItem.loadRoot(this.layoutConfig.root),this.checkLoadedLayoutMaximiseItem(),this.adjustColumnsResponsive()}saveLayout(){if(!1===this._isInitialised)throw new Error(\"Can't create config, layout not yet initialised\");if(void 0===this._groundItem)throw new J(\"LMTC18244\");{const t=this._groundItem.calculateConfigContent();let e;e=1!==t.length?void 0:t[0],this.reconcilePopoutWindows();const i=[];for(let t=0;t=0?n=this._groundItem.contentItems[0]:e=0;break;case at.row:case at.column:e=n.addItem(t,i.index);break;case at.stack:if(Ct.isComponent(t)){e=n.addItem(t,i.index);break}throw Error(tt[6]);case at.component:throw new X(\"LMAIALC87444602\");default:throw new Y(\"LMAIALU98881733\",n.type)}if(Ct.isComponent(t)){const t=n.contentItems[e];Gt.isStack(t)&&(n=t,e=0)}return i.parentItem=n,i.index=e,i}}}loadComponentAsRoot(t){if(void 0===this._groundItem)throw new Error(\"Cannot add item before init\");this._groundItem.loadComponentAsRoot(t)}updateSize(t,e){this.setSize(t,e)}setSize(t,e){if(this._width=t,this._height=e,!0===this._isInitialised){if(void 0===this._groundItem)throw new J(\"LMUS18881\");if(this._groundItem.setSize(this._width,this._height),this._maximisedStack){const{width:t,height:e}=kt(this._containerElement);Tt(this._maximisedStack.element,t),At(this._maximisedStack.element,e),this._maximisedStack.updateSize(!1)}this.adjustColumnsResponsive()}}beginSizeInvalidation(){this._sizeInvalidationBeginCount++}endSizeInvalidation(){0==--this._sizeInvalidationBeginCount&&this.updateSizeFromContainer()}updateSizeFromContainer(){const{width:t,height:e}=kt(this._containerElement);this.setSize(t,e)}updateRootSize(t=!1){if(void 0===this._groundItem)throw new J(\"LMURS28881\");this._groundItem.updateSize(t)}createAndInitContentItem(t,e){const i=this.createContentItem(t,e);return i.init(),i}createContentItem(t,e){if(\"string\"!=typeof t.type)throw new G(\"Missing parameter 'type'\",JSON.stringify(t));if(ct.isComponentItem(t)&&!(e instanceof ee)&&e&&!(!0===this.isSubWindow&&e instanceof Yt)){t={type:at.stack,content:[t],size:t.size,sizeUnit:t.sizeUnit,minSize:t.minSize,minSizeUnit:t.minSizeUnit,id:t.id,maximised:t.maximised,isClosable:t.isClosable,activeItemIndex:0,header:void 0}}return this.createContentItemFromConfig(t,e)}findFirstComponentItemById(t){if(void 0===this._groundItem)throw new J(\"LMFFCIBI82446\");return this.findFirstContentItemTypeByIdRecursive(at.component,t,this._groundItem)}createPopout(t,e,i,n){return t instanceof Gt?this.createPopoutFromContentItem(t,e,i,n):this.createPopoutFromItemConfig(t,e,i,n)}createPopoutFromContentItem(t,e,i,n){let o=t.parent,s=t;for(;null!==o&&1===o.contentItems.length&&!o.isGround;)s=o,o=o.parent;if(null===o)throw new K(\"LMCPFCI00834\");{if(void 0===n&&(n=o.contentItems.indexOf(s)),null!==i&&o.addPopInParentId(i),void 0===e){const i=globalThis.screenX||globalThis.screenLeft,n=globalThis.screenY||globalThis.screenTop,o=t.element.offsetLeft,s=t.element.offsetTop,{width:r,height:a}=kt(t.element);e={left:i+o,top:n+s,width:r,height:a}}const r=t.toConfig();if(t.remove(),ft.isRootItemConfig(r))return this.createPopoutFromItemConfig(r,e,i,n);throw new Error(`${tt[0]}`)}}beginVirtualSizedContainerAdding(){0==++this._virtualSizedContainerAddingBeginCount&&(this._virtualSizedContainers.length=0)}addVirtualSizedContainer(t){this._virtualSizedContainers.push(t)}endVirtualSizedContainerAdding(){if(0==--this._virtualSizedContainerAddingBeginCount){const t=this._virtualSizedContainers.length;if(t>0){this.fireBeforeVirtualRectingEvent(t);for(let e=0;ethis.emit(\"windowOpened\",a))),a.on(\"closed\",(()=>this.reconcilePopoutWindows())),this._openPopouts.push(a),this.layoutConfig.settings.closePopoutsOnUnload&&!this._windowBeforeUnloadListening&&(globalThis.addEventListener(\"beforeunload\",this._windowBeforeUnloadListener,{passive:!0}),this._windowBeforeUnloadListening=!0),a}closeAllOpenPopouts(){for(let t=0;tglobalThis.close()),1)}getArea(t,e){let i=null,n=1/0;for(let o=0;o=s.x1&&t=s.y1&&es.surface&&(n=s.surface,i=s)}return i}calculateItemAreas(){const t=this.getAllContentItems(),e=this._groundItem;if(void 0===e)throw new J(\"LMCIAR44365\");if(1!==t.length){e.contentItems[0].isStack?this._itemAreas=[]:this._itemAreas=e.createSideAreas();for(let e=0;e0){let e=t[0];if(Gt.isComponentItem(e)){const t=e.parent;if(null===t)throw new K(\"LMXLLMI69999\");e=t}if(!Gt.isStack(e))throw new X(\"LMCLLMI19993\");e.maximise()}}}processMaximiseStack(t){if(this._maximisedStack=t,t.on(\"beforeItemDestroyed\",this._maximisedStackBeforeDestroyedListener),t.element.classList.add(\"lm_maximised\"),t.element.insertAdjacentElement(\"afterend\",this._maximisePlaceholder),void 0===this._groundItem)throw new J(\"LMMXI19993\");{this._groundItem.element.prepend(t.element);const{width:e,height:i}=kt(this._containerElement);Tt(t.element,e),At(t.element,i),t.updateSize(!0),t.focusActiveContentItem(),this._maximisedStack.emit(\"maximised\"),this.emit(\"stateChanged\")}}processMinimiseMaximisedStack(){if(void 0===this._maximisedStack)throw new X(\"LMMMS74422\");{const t=this._maximisedStack;if(null===t.parent)throw new K(\"LMMI13668\");t.element.classList.remove(\"lm_maximised\"),this._maximisePlaceholder.insertAdjacentElement(\"afterend\",t.element),this._maximisePlaceholder.remove(),this.updateRootSize(!0),this._maximisedStack=void 0,t.off(\"beforeItemDestroyed\",this._maximisedStackBeforeDestroyedListener),t.emit(\"minimised\"),this.emit(\"stateChanged\")}}reconcilePopoutWindows(){const t=[];for(let e=0;e{this._resizeTimeoutId=void 0,this.beginSizeInvalidation(),this.endSizeInvalidation()}),this.resizeDebounceInterval))}checkClearResizeTimeout(){void 0!==this._resizeTimeoutId&&(clearTimeout(this._resizeTimeoutId),this._resizeTimeoutId=void 0)}setContainer(){var t;const e=document.body,i=null!==(t=this._containerElement)&&void 0!==t?t:e;if(i===e){this.resizeWithContainerAutomatically=!0;const t=document.documentElement;t.style.height=\"100%\",t.style.margin=\"0\",t.style.padding=\"0\",t.style.overflow=\"clip\",e.style.height=\"100%\",e.style.margin=\"0\",e.style.padding=\"0\",e.style.overflow=\"clip\"}this._containerElement=i}onBeforeUnload(){this.destroy()}adjustColumnsResponsive(){if(void 0===this._groundItem)throw new J(\"LMACR20883\");if(this._firstLoad=!1,this.useResponsiveLayout()&&!this._updatingColumnsResponsive&&this._groundItem.contentItems.length>0&&this._groundItem.contentItems[0].isRow){if(void 0===this._groundItem||null===this._width)throw new J(\"LMACR77412\");{const t=this._groundItem.contentItems[0].contentItems.length;if(t<=1)return;{const e=this.layoutConfig.dimensions.defaultMinItemWidth;if(t*e<=this._width)return;{this._updatingColumnsResponsive=!0;const i=t-Math.max(Math.floor(this._width/e),1),n=this._groundItem.contentItems[0],o=this.getAllStacks();if(0===o.length)throw new X(\"LMACRS77413\");{const t=o[0];for(let e=0;en?void 0:{parentItem:t,index:o}}}case 1:if(void 0===this._focusedComponentItem)return;{const t=this._focusedComponentItem.parentItem;return this.tryCreateLocationFromParentItem(t,e)}case 2:{const t=this.findFirstContentItemType(at.stack);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 3:{let t=this.findFirstContentItemType(at.row);return void 0!==t?this.tryCreateLocationFromParentItem(t,e):(t=this.findFirstContentItemType(at.column),void 0!==t?this.tryCreateLocationFromParentItem(t,e):void 0)}case 4:{const t=this.findFirstContentItemType(at.row);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 5:{const t=this.findFirstContentItemType(at.column);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 6:if(void 0===this._groundItem)throw new J(\"LMFLRIF18244\");return void 0!==this.rootItem?void 0:void 0===e||0===e?{parentItem:this._groundItem,index:0}:void 0;case 7:if(void 0===this._groundItem)throw new J(\"LMFLF18244\");{const t=this._groundItem.contentItems;if(0===t.length)return void 0===e||0===e?{parentItem:this._groundItem,index:0}:void 0;{const i=t[0];return this.tryCreateLocationFromParentItem(i,e)}}}}tryCreateLocationFromParentItem(t,e){const i=t.contentItems.length;return void 0===e?{parentItem:t,index:i}:e<0||e>i?void 0:{parentItem:t,index:e}}}!function(t){t.createMaximisePlaceElement=function(t){const e=t.createElement(\"div\");return e.classList.add(\"lm_maximise_place\"),e},t.createTabDropPlaceholderElement=function(t){const e=t.createElement(\"div\");return e.classList.add(\"lm_drop_tab_placeholder\"),e},t.defaultLocationSelectors=[{typeId:1,index:void 0},{typeId:2,index:void 0},{typeId:3,index:void 0},{typeId:7,index:void 0}],t.afterFocusedItemIfPossibleLocationSelectors=[{typeId:0,index:1},{typeId:2,index:void 0},{typeId:3,index:void 0},{typeId:7,index:void 0}]}(ae||(ae={}));class le extends ae{constructor(t,e,i,n){if(super(le.createLayoutManagerConstructorParameters(t,e)),this._bindComponentEventHanlderPassedInConstructor=!1,this._creationTimeoutPassed=!1,void 0!==e&&\"function\"==typeof e&&(this.bindComponentEvent=e,this._bindComponentEventHanlderPassedInConstructor=!0,void 0!==i&&(this.unbindComponentEvent=i)),!this._bindComponentEventHanlderPassedInConstructor&&this.isSubWindow){if(void 0===this._constructorOrSubWindowLayoutConfig)throw new J(\"VLC98823\");{const t=xt.resolve(this._constructorOrSubWindowLayoutConfig);this.layoutConfig=Object.assign(Object.assign({},t),{root:void 0})}}!0!==n&&(this.deprecatedConstructor||this.init())}destroy(){this.bindComponentEvent=void 0,this.unbindComponentEvent=void 0,super.destroy()}init(){if(this._bindComponentEventHanlderPassedInConstructor||\"loading\"!==document.readyState&&null!==document.body){if(!this._bindComponentEventHanlderPassedInConstructor&&!0===this.isSubWindow&&!this._creationTimeoutPassed)return setTimeout((()=>this.init()),7),void(this._creationTimeoutPassed=!0);!0===this.isSubWindow&&(this._bindComponentEventHanlderPassedInConstructor||this.clearHtmlAndAdjustStylesForSubWindow(),window.__glInstance=this),super.init()}else document.addEventListener(\"DOMContentLoaded\",(()=>this.init()),{passive:!0})}clearHtmlAndAdjustStylesForSubWindow(){const t=document.head,e=new Array(4);e[0]=document.querySelectorAll(\"body link\"),e[1]=document.querySelectorAll(\"body style\"),e[2]=document.querySelectorAll(\"template\"),e[3]=document.querySelectorAll(\".gl_keep\");for(let i=0;ithis.emit(\"popIn\"))),document.body.appendChild(t),!0}}bindComponent(t,e){if(void 0!==this.bindComponentEvent){return this.bindComponentEvent(t,e)}if(void 0!==this.getComponentEvent)return{virtual:!1,component:this.getComponentEvent(t,e)};{const t=`${tt[2]}: ${JSON.stringify(e)}`;throw new Z(t)}}unbindComponent(t,e,i){if(void 0!==this.unbindComponentEvent)this.unbindComponentEvent(t);else if(!e&&void 0!==this.releaseComponentEvent){if(void 0===i)throw new J(\"VCUCRCU333998\");this.releaseComponentEvent(t,i)}}}!function(t){let e=!1;t.createLayoutManagerConstructorParameters=function(t,i){const n=e?null:new URL(document.location.href).searchParams.get(\"gl-window\");e=!0;const o=null!==n;let s,r;if(null!==n){const e=localStorage.getItem(n);if(null===e)throw new Error(\"Null gl-window Config\");localStorage.removeItem(n);const i=JSON.parse(e),o=_t.unminifyConfig(i);r=xt.fromResolved(o),t instanceof HTMLElement&&(s=t)}else void 0===t?r=void 0:t instanceof HTMLElement?(r=void 0,s=t):r=t,void 0===s&&i instanceof HTMLElement&&(s=i);return{constructorOrSubWindowLayoutConfig:r,isSubWindow:o,containerElement:s}}}(le||(le={}));class he extends le{constructor(t,e,i){super(t,e,i,!0),this._componentTypesMap=new Map,this._registeredComponentMap=new Map,this._virtuableComponentMap=new Map,this._containerVirtualRectingRequiredEventListener=(t,e,i)=>this.handleContainerVirtualRectingRequiredEvent(t,e,i),this._containerVirtualVisibilityChangeRequiredEventListener=(t,e)=>this.handleContainerVirtualVisibilityChangeRequiredEvent(t,e),this._containerVirtualZIndexChangeRequiredEventListener=(t,e,i)=>this.handleContainerVirtualZIndexChangeRequiredEvent(t,e,i),this.deprecatedConstructor||this.init()}registerComponent(t,e,i=!1){if(\"function\"!=typeof e)throw new $(\"registerComponent() componentConstructorOrFactoryFtn parameter is not a function\");if(e.hasOwnProperty(\"prototype\")){const n=e;this.registerComponentConstructor(t,n,i)}else{const n=e;this.registerComponentFactoryFunction(t,n,i)}}registerComponentConstructor(t,e,i=!1){if(\"function\"!=typeof e)throw new Error(tt[1]);if(void 0!==this._componentTypesMap.get(t))throw new Z(`${tt[3]}: ${t}`);this._componentTypesMap.set(t,{constructor:e,factoryFunction:void 0,virtual:i})}registerComponentFactoryFunction(t,e,i=!1){if(\"function\"!=typeof e)throw new Z(\"Please register a constructor function\");if(void 0!==this._componentTypesMap.get(t))throw new Z(`${tt[3]}: ${t}`);this._componentTypesMap.set(t,{constructor:void 0,factoryFunction:e,virtual:i})}registerComponentFunction(t){this.registerGetComponentConstructorCallback(t)}registerGetComponentConstructorCallback(t){if(\"function\"!=typeof t)throw new Error(\"Please register a callback function\");void 0!==this._getComponentConstructorFtn&&console.warn(\"Multiple component functions are being registered. Only the final registered function will be used.\"),this._getComponentConstructorFtn=t}getRegisteredComponentTypeNames(){const t=this._componentTypesMap.keys();return Array.from(t)}getComponentInstantiator(t){let e;const i=pt.resolveComponentTypeName(t);return void 0!==i&&(e=this._componentTypesMap.get(i)),void 0===e&&void 0!==this._getComponentConstructorFtn&&(e={constructor:this._getComponentConstructorFtn(t),factoryFunction:void 0,virtual:!1}),e}bindComponent(t,e){let i;const n=pt.resolveComponentTypeName(e);let o;if(void 0!==n&&(i=this._componentTypesMap.get(n)),void 0===i&&void 0!==this._getComponentConstructorFtn&&(i={constructor:this._getComponentConstructorFtn(e),factoryFunction:void 0,virtual:!1}),void 0!==i){const s=i.virtual;let r,a;r=void 0===e.componentState?void 0:Ut({},e.componentState);const l=i.constructor;if(void 0!==l)a=new l(t,r,s);else{const e=i.factoryFunction;if(void 0===e)throw new X(\"LMBCFFU10008\");a=e(t,r,s)}if(s){if(void 0===a)throw new J(\"GLBCVCU988774\");{const e=a,i=e.rootHtmlElement;if(void 0===i)throw new Z(`${tt[5]}: ${n}`);!function(t){const e=\"absolute\";t.style.position!==e&&(t.style.position=e)}(i),this.container.appendChild(i),this._virtuableComponentMap.set(t,e),t.virtualRectingRequiredEvent=this._containerVirtualRectingRequiredEventListener,t.virtualVisibilityChangeRequiredEvent=this._containerVirtualVisibilityChangeRequiredEventListener,t.virtualZIndexChangeRequiredEvent=this._containerVirtualZIndexChangeRequiredEventListener}}this._registeredComponentMap.set(t,a),o={virtual:i.virtual,component:a}}else o=super.bindComponent(t,e);return o}unbindComponent(t,e,i){if(void 0===this._registeredComponentMap.get(t))super.unbindComponent(t,e,i);else{const e=this._virtuableComponentMap.get(t);if(void 0!==e){const i=e.rootHtmlElement;if(void 0===i)throw new X(\"GLUC77743\",t.title);this.container.removeChild(i),this._virtuableComponentMap.delete(t)}}}fireBeforeVirtualRectingEvent(t){this._goldenLayoutBoundingClientRect=this.container.getBoundingClientRect(),super.fireBeforeVirtualRectingEvent(t)}handleContainerVirtualRectingRequiredEvent(t,e,i){const n=this._virtuableComponentMap.get(t);if(void 0===n)throw new J(\"GLHCSCE55933\");{const o=n.rootHtmlElement;if(void 0===o)throw new Z(tt[4]+\" \"+t.title);{const n=t.element.getBoundingClientRect(),s=n.left-this._goldenLayoutBoundingClientRect.left;o.style.left=zt(s);const r=n.top-this._goldenLayoutBoundingClientRect.top;o.style.top=zt(r),Tt(o,e),At(o,i)}}}handleContainerVirtualVisibilityChangeRequiredEvent(t,e){const i=this._virtuableComponentMap.get(t);if(void 0===i)throw new J(\"GLHCVVCRE55934\");{const n=i.rootHtmlElement;if(void 0===n)throw new Z(tt[4]+\" \"+t.title);Dt(n,e)}}handleContainerVirtualZIndexChangeRequiredEvent(t,e,i){const n=this._virtuableComponentMap.get(t);if(void 0===n)throw new J(\"GLHCVZICRE55935\");{const e=n.rootHtmlElement;if(void 0===e)throw new Z(tt[4]+\" \"+t.title);e.style.zIndex=i}}}const de=\"initial_\",ce={show:\"top\",popout:!1,maximise:!1,close:\"close-tab-unused\"},me={headerHeight:31},ue={hasHeaders:!0,reorderEnabled:!0},pe={popoutWholeStack:!1,constrainDragToContainer:!1,constrainDragToHeaders:!1,preventDragout:!1,showMaximiseIcon:!1,showPopoutIcon:!1,showCloseIcon:!1,blockedPopoutsThrowError:!0,closePopoutsOnUnload:!0,selectionEnabled:!1};var ge,fe;class ve{constructor(e){this.layout=e,ge.set(this,void 0),fe.set(this,void 0),this.handleResize=t=>{t.forEach((t=>this.resizeElement(t.target)))},this.handleMutation=()=>{this.layout.viewComponentsByContainerElement.forEach((t=>{this.resizeElement(t.container.element)}))},t.__classPrivateFieldSet(this,ge,new ResizeObserver(this.handleResize),\"f\"),t.__classPrivateFieldSet(this,fe,new MutationObserver(this.handleMutation),\"f\")}observeMutations(e){t.__classPrivateFieldGet(this,fe,\"f\")?.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[\"class\"]})}destroy(){t.__classPrivateFieldGet(this,ge,\"f\").disconnect(),t.__classPrivateFieldGet(this,fe,\"f\").disconnect()}observeContainer(e){t.__classPrivateFieldGet(this,ge,\"f\").observe(e)}unobserveContainer(e){t.__classPrivateFieldGet(this,ge,\"f\").unobserve(e)}resizeElement(t){const e=this.layout.viewComponentsByContainerElement.get(t);e&&e.resize()}}ge=new WeakMap,fe=new WeakMap;var _e={};Object.defineProperty(_e,\"__esModule\",{value:!0});var ye=_e.BaseItem=void 0;class Ce{constructor(t,e,i){this._item=t,this._layout=e,this._wrap=i}get raw(){return this._item}get layout(){return this._layout}get type(){return this._item.type}get contentItems(){return(this._item.contentItems??[]).map((t=>this._wrap(t)))}get parent(){const t=this._item.parent;return t?this._wrap(t):null}setActiveContentItem(t,e){if(\"stack\"!==this.type)throw new Error(`Cannot call setActiveContentItem from a non-stack item: ${this.type}`);this._item.setActiveContentItem(t.raw,e)}static wrapInternal(t,e,i){const n=Ce.wrapCache.get(e);if(n)return n;const o=new t(e,i,(e=>Ce.wrapInternal(t,e,i)));return Ce.wrapCache.set(e,o),o}}ye=_e.BaseItem=Ce,Ce.wrapCache=new WeakMap;const we=t=>!!t&&\"contentItems\"in t&&(t.isRow||t.isColumn);class Ie extends ye{isRoot(){return!!this._item.parent?.isGround}getBounds(){return this._item.element.getBoundingClientRect()}get viewName(){if(this._item.isComponent){const{component:t}=this._item;return t.identity.name}throw new Error(\"View name not found\")}onDestroyed(t){const e=({target:i})=>{i===this._item&&(t(),this._item.off(\"itemDestroyed\",e))};this._item.on(\"itemDestroyed\",e)}createAdjacentStack({position:t=\"right\"}={}){const e=this.raw;if(ee.isStack(e)&&e.parent){const i=[\"top\",\"bottom\"].includes(t)?\"column\":\"row\",n=[\"left\",\"top\"].includes(t)?1:0,o=we(e.parent)?e.parent:e.layoutManager,s=o,r=e.parent.contentItems.indexOf(e);e.parent.isGround&&e.parent.removeChild(e,!0);const a=o.newItem({type:i,content:[{type:\"stack\",content:[]}]},r);if(!a)throw new Error(\"createAdjacentStack: Failed to create new container\");const l=a.contentItems[0];return a.addChild(this.raw,n),we(s)&&s.removeChild(e,!0),this._wrap(l)}throw new Error(`Cannot creat adjacent stacks for type: ${e.type}, must be type 'stack'`)}setActiveContentItem(t,e=!0){if(!ee.isStack(this._item))throw new Error(`Cannot call setActiveContentItem from a non-stack item: ${this.type}`);this._item.setActiveComponentItem(t.raw,!e)}static wrap(t,e){return ye.wrapInternal(Ie,t,e)}}function be(t=[],e){for(const i of t)\"component\"===i.type?Object.keys(e).forEach((t=>{t in i&&(i.componentState={[`${de}${t}`]:i[t],...i.componentState}),i[t]=e[t]})):be(i.content,e)}function Se(t=[],e,i){for(const n of t)if(\"component\"===n.type)Object.keys(e).forEach((t=>{if(`${de}${t}`in n.componentState)return n[t]=n.componentState[`${de}${t}`],void delete n.componentState[`${de}${t}`];n[t]=e[t]}));else{if(n.size&&(\"row\"===i||\"column\"===i)){n[\"row\"===i?\"width\":\"height\"]=n.size?.includes(\".\")?parseFloat(n.size):parseInt(n.size)}Se(n.content,e,n.type)}}function Ee(t){if(t.root){t.root.content&&Se([t.root],{componentName:\"view\",isClosable:!0});const e=t.root;t.content=[e],delete t.root}return t}const xe=e=>class extends e{connectedCallback(){if(!this.name||!this.uuid)throw new Error(\" Name or uuid attribute missing\");if(!this.src)throw new Error(\" missing 'src' attribute.\");this.#t||(this.#t=document.createElement(\"iframe\"),this.#t.src=this.src,this.#t.style.height=\"100%\",this.#t.style.width=\"100%\",this.#t.style.border=\"none\",this.forceFrameName?this.#t.setAttribute(\"name\",this.forceFrameName):this.#t.setAttribute(\"name\",t.encodeOptions({brokerUrl:this.brokerUrl,name:this.name,uuid:this.uuid,providerId:this.providerId,contextGroup:this.contextGroup},\"of-frame\")),this.#t.setAttribute(\"id\",this.name),this.appendChild(this.#t))}#t;get brokerUrl(){return this.getAttribute(\"of-broker\")}set brokerUrl(t){t&&this.setAttribute(\"of-broker\",t)}get name(){return this.getAttribute(\"of-name\")}set name(t){t&&this.setAttribute(\"of-name\",t)}get forceFrameName(){return this.getAttribute(\"forceFrameName\")}set forceFrameName(t){t&&this.setAttribute(\"forceFrameName\",t)}get uuid(){return this.getAttribute(\"of-uuid\")}set uuid(t){t&&this.setAttribute(\"of-uuid\",t)}get src(){return this.getAttribute(\"src\")}set src(t){t&&this.setAttribute(\"src\",t)}get providerId(){return this.getAttribute(\"of-provider-id\")}set providerId(t){t&&this.setAttribute(\"of-provider-id\",t)}get contextGroup(){return this.getAttribute(\"of-context-group\")}set contextGroup(t){t&&this.setAttribute(\"of-context-group\",t)}static get observedAttributes(){return[\"name\"]}};class Le{static create(t){const e=document.createElement(\"of-view\");return Object.entries(t).forEach((([t,i])=>{e.setAttribute(t,i)})),e}}customElements.define(\"of-view\",xe(HTMLElement));class ze{constructor(t,i,n,{brokerUrl:o,interopConfig:s},r){this.container=t,this.config=i,this.ofView=null,this.isDragging=()=>this.container.tab.element?.className.includes(\"lm_dragging\")??!1;const{url:a,web:l,interop:h,name:d}=i||{},c=d??`internal-generated-view-${e.v4()}`;if(this.identity={uuid:n,name:c},this.container.element.setAttribute(\"of-name\",c),this.container.element.id=`container-${c}`,this.container.parent.id=c,void 0===a)return void this.handleUrlMissing();const m=this.updateTitleIfNotSet(a),u={\"of-broker\":o,\"of-uuid\":n,\"of-name\":c,src:a};l?.frameName&&(u.forceFrameName=l.frameName);const p=h?.currentContextGroup??s?.currentContextGroup;p&&(u[\"of-context-group\"]=p),s?.providerId&&(u[\"of-provider-id\"]=s?.providerId),this.ofView=Le.create(u),this.ofView.title=m??`Iframe: ${a}`,r.appendChild(this.ofView),this.ofView.style.position=\"absolute\"}updateTitleIfNotSet(t){return\"view\"===this.container.parent.title&&this.container.parent.setTitle(t),this.container.parent.title}handleUrlMissing(){const t=document.createElement(\"div\");t.setAttribute(\"style\",\"padding: 20px\");t.innerText=\"No URL provided\",this.container.element.appendChild(t)}destroy(){this.ofView?.remove(),this.ofView=null}closeView(){this.container.close()}resize(){if(this.ofView){if(this.isDragging())return void(this.ofView.style.display=\"none\");const t=this.container.element.getBoundingClientRect();this.ofView.style.position=\"absolute\",this.ofView.style.height=`${t.height}px`,this.ofView.style.width=`${t.width}px`,this.ofView.style.inset=`${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`,this.ofView.style.display=\"block\"}}}class Me extends U{static overrideConfig(t){const e={...ue,...t.settings,...pe};return e.reorderEnabled?be(t.content,{isClosable:!0}):be(t.content,{reorderEnabled:!1}),{dimensions:me,...t,settings:e,header:{...ce,show:!1!==t.settings?.hasHeaders&&ce.show}}}constructor(t,e,i,{options:n},o,s){super(),this.identity=t,this.container=e,this.initialConfig=i,this.layoutManager=o,this.platformProvider=s,this.viewComponentsByContainerElement=new Map,this.layoutContentCache=_.getSingleInstance(),this.reparentingViews=new Set,this.goldenLayoutDestroyed=!1,this.createViewComponent=(t,e)=>{m.handleSharedView(this.layoutManager,this.identity,e);const i=new ze(t,e,this.identity.uuid,this.options,this.iframeContainer);return e&&!1===e[`${de}isClosable`]&&this.stylesheet.insertRule(`#tab-${i.identity.name} .lm_close_tab { display: none; }`),this.viewComponentsByContainerElement.set(t.element,i),this.resizeController.observeContainer(t.element),i},this.iframeContainer=document.createElement(\"div\"),this.iframeContainer.id=`openfin-layout-iframe-container-${this.identity.layoutName}`,this.domEmitter=new V(e),this.setupStylesheets(),this.layout=new he(this.container),this.layout.resizeWithContainerAutomatically=!0,this.options=n,this.layout.registerComponent(\"view\",this.createViewComponent),this.setupListeners(),this.resizeController=new ve(this),this.layout.loadLayout(Me.overrideConfig(i));const r=document.createElement(\"div\");r.id=`openfin-layout-shadow-container-${this.identity.layoutName}`,r.attachShadow({mode:\"open\",delegatesFocus:!1}).appendChild(this.iframeContainer),this.container.appendChild(r),this.resizeController.observeMutations(this.container)}getStackByView({name:t}){const e=this.layout.findFirstComponentItemById(t);if(e?.parent&&e?.parent?.isStack)return Ie.wrap(e.parent,this)}getRoot(){return Ie.wrap(this.layout.rootItem,this)}async platformCloseView(t){const e=[...this.viewComponentsByContainerElement.values()].find((e=>e.identity.name===t.name));if(!e)throw new Error(`View with name: ${t.name} not found in layout.`);e.closeView()}async platformCreateView(t,{location:e,targetView:i}={}){if(i)throw new Error(\"TargetView not supported in web\");const n={options:this.platformProvider.normalizeOptions(t),target:this.identity,location:e};return this.insertView(n)}setupStylesheets(){if(this.container.setAttribute(\"data-openfin-layout-name\",this.identity.layoutName),this.stylesheet=new CSSStyleSheet,this.stylesheet.insertRule(\".lm_close { display: none; }\"),document.adoptedStyleSheets.push(this.stylesheet),this.initialConfig.settings?.preventSplitterResize){const t=`\\n [data-openfin-layout-name='${this.identity.layoutName}'] .lm_splitter {\\n pointer-events: none;\\n }`;this.stylesheet.insertRule(t)}}insertView({options:t,location:e,targetView:i}){const n=e?this.layoutContentCache.getItemOrUndefined(e.id):void 0,o=i?this.layoutContentCache.getItemOrUndefined(i.name):void 0,s=n??o??Ie.wrap(this.layout.rootItem,this);let r;if(ee.isStack(s.raw))r=s.raw;else{if(!we(s.raw))throw new Error(\"Cannot add a view at the requested location\");r=s.raw.newItem({type:\"stack\",content:[]})}const a=Math.min(r.contentItems.length,e?.index??r.contentItems.length);let l=this.layout.findFirstComponentItemById(t.name);l?(l.parent&&l.parent.removeChild(l,!0),r.addChild(l,a)):l=r.newComponent(\"view\",t,t.title??t.url??\"Default Title\",a);const h=l.component.identity;return Promise.resolve({identity:h})}replaceView({viewToReplace:t,newView:e}){throw new Error(\"Method not implemented.\")}replaceLayout(t){throw new Error(\"Method not implemented.\")}async cleanupView(t){}applyPreset(t){throw new Error(\"Method not implemented.\")}getCurrentViews(){return[...this.viewComponentsByContainerElement.values()].map((t=>t.identity))}async getFrameSnapshot(){return Ee(xt.fromResolved(this.layout.toConfig()))}isVisible(){return W(this.container)}async onViewDetached({viewIdentity:t}){this.reparentingViews.add(t.name),this.platformCloseView(t)}async destroy(){this.goldenLayoutDestroyed||(this.goldenLayoutDestroyed=!0,this.layout.destroy()),this.iframeContainer.remove(),this.resizeController.destroy(),document.adoptedStyleSheets=document.adoptedStyleSheets.filter((t=>t!==this.stylesheet)),this.viewComponentsByContainerElement.clear()}setupListeners(){this.container.addEventListener(\"pointerdown\",(t=>{if(t.target instanceof HTMLElement){const e=t.target.classList;[\"lm_tab\",\"lm_title\",\"lm_splitter\",\"lm_drag_handle\"].some((t=>e.contains(t)))&&(this.handleDragStart(),2===t.button&&t.stopPropagation())}}),!0),document.addEventListener(\"pointerup\",(()=>this.handleDragEnd()),!0),this.layout.on(\"tabCreated\",(t=>{const e=t.componentItem.component;t.element.id=`tab-${e.identity.name}`,this.domEmitter.dispatchLocalEvent(\"tab-created\",e.identity)})),this.layout.on(\"itemCreated\",(({target:t})=>{const e=t;if(Gt.isComponentItem(e)){const t=e.component;this.domEmitter.dispatchLocalEvent(\"container-created\",t.identity)}})),this.layout.on(\"itemDestroyed\",(t=>{const e=t.target;if(Gt.isComponentItem(e)){const t=e.component;this.removeViewComponent(t)}})),this.layout.on(\"itemDropped\",(()=>{this.handleDragEnd()}))}handleDragStart(){this.iframeContainer.style.pointerEvents=\"none\"}handleDragEnd(){this.iframeContainer.style.pointerEvents=\"\"}removeViewComponent(t){if(t.config&&!1===t.config[`${de}isClosable`]){const e=[...this.stylesheet.cssRules].findIndex((e=>e.cssText.includes(`#tab-${t.identity.name}`)));this.stylesheet.deleteRule(e)}t.destroy(),this.viewComponentsByContainerElement.delete(t.container.element),this.resizeController.unobserveContainer(t.container.element),this.reparentingViews.has(t.identity.name)?this.reparentingViews.delete(t.identity.name):this.platformProvider.closeView(t.identity.name);0===this.getCurrentViews().length&&(this.goldenLayoutDestroyed||(this.goldenLayoutDestroyed=!0,m.handleLastViewRemoved(this.layoutManager,this.identity)))}}class Pe{constructor(t,e,i,n){this.windowIdentity=t,this.connectConfig=e,this.provider=i,this.fallbackContainer=n}async createLayout(t,e){if(!(\"container\"in t)&&!this.fallbackContainer)throw new Error(\"Container property is not optional in web\");const{layoutName:i}=t,n=t,o=this.provider.initLayoutViews(n),s=n.container??this.fallbackContainer,r={...this.windowIdentity,layoutName:i},a=new Me(r,s,o,this.connectConfig,e,this.provider);m.registerLayout(e,i,a),this.fallbackContainer=null}async getLayoutSnapshot(t){return t.getLayoutSnapshot()}async handleLastViewRemoved(t){}}class Te{static async init(e){const i=e.getFin().InterApplicationBus.Channel,n=await i.create(`custom-frame-${e.me.uuid}`);return n.setDefaultAction((async(t,{target:e,opts:i},o)=>{const s=n.connections.find((t=>t.name===e.name));if(s)return n.dispatch(s,t,{...i,target:e});throw new Error(`Client with name ${e.name} not found`)})),await t.relayChannelClientApi_1(n,\"layout-relay\"),new Te(e)}constructor(t){this.wire=t,this.viewNames=new Set}normalizeOptions(t,i=\"default\"){const n=this.wire.me.uuid;let{name:o=`internal-generated-view-${e.v4()}`}=t;return o.match(/^internal-generated-view-/)&&this.viewNames.has(o)&&\"duplicate\"===i&&(o=`internal-generated-view-${e.v4()}`),this.viewNames.add(o),{...t,name:o,uuid:n}}closeView(t){this.viewNames.delete(t)}initLayoutViews({layout:t,multiInstanceViewBehavior:e}){return H((t=>{if(\"component\"===t.type&&t.componentState){const i=this.normalizeOptions(t.componentState,e);return{...t,componentState:i}}return t}),t)}}var Ae;const ke=t=>t;Ae=new WeakMap,exports.WebLayoutEntryPoint=class{constructor(e){Ae.set(this,void 0),this.initLayoutManager=async(e,i,{container:n,layoutManagerOverride:o})=>{const s=await Te.init(i),r=o??ke,a=new Pe(i.me,t.__classPrivateFieldGet(this,Ae,\"f\"),s,n),l=new(r(m.createClosedConstructor(a)));return await M(i,l),l},this.applyLayoutSnapshot=async(e,i,n)=>{await i.applyLayoutSnapshot(t.__classPrivateFieldGet(this,Ae,\"f\").platform.layoutSnapshot)},this.createLayout=async(t,e)=>m.createLayout(t,e),this.destroyLayout=async(t,e)=>m.destroyLayout(t,e),t.__classPrivateFieldSet(this,Ae,e,\"f\")}};\n","'use strict'\n\nexports.byteLength = byteLength\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\nfor (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i]\n revLookup[code.charCodeAt(i)] = i\n}\n\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction getLens (b64) {\n var len = b64.length\n\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // Trim off extra bytes after placeholder bytes are found\n // See: https://github.com/beatgammit/base64-js/issues/42\n var validLen = b64.indexOf('=')\n if (validLen === -1) validLen = len\n\n var placeHoldersLen = validLen === len\n ? 0\n : 4 - (validLen % 4)\n\n return [validLen, placeHoldersLen]\n}\n\n// base64 is 4/3 + up to two characters of the original data\nfunction byteLength (b64) {\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction _byteLength (b64, validLen, placeHoldersLen) {\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction toByteArray (b64) {\n var tmp\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n\n var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))\n\n var curByte = 0\n\n // if there are placeholders, only get up to the last complete 4 chars\n var len = placeHoldersLen > 0\n ? validLen - 4\n : validLen\n\n var i\n for (i = 0; i < len; i += 4) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 18) |\n (revLookup[b64.charCodeAt(i + 1)] << 12) |\n (revLookup[b64.charCodeAt(i + 2)] << 6) |\n revLookup[b64.charCodeAt(i + 3)]\n arr[curByte++] = (tmp >> 16) & 0xFF\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 2) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 2) |\n (revLookup[b64.charCodeAt(i + 1)] >> 4)\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 1) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 10) |\n (revLookup[b64.charCodeAt(i + 1)] << 4) |\n (revLookup[b64.charCodeAt(i + 2)] >> 2)\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] +\n lookup[num >> 12 & 0x3F] +\n lookup[num >> 6 & 0x3F] +\n lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n var tmp\n var output = []\n for (var i = start; i < end; i += 3) {\n tmp =\n ((uint8[i] << 16) & 0xFF0000) +\n ((uint8[i + 1] << 8) & 0xFF00) +\n (uint8[i + 2] & 0xFF)\n output.push(tripletToBase64(tmp))\n }\n return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n var tmp\n var len = uint8.length\n var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n var parts = []\n var maxChunkLength = 16383 // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1]\n parts.push(\n lookup[tmp >> 2] +\n lookup[(tmp << 4) & 0x3F] +\n '=='\n )\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + uint8[len - 1]\n parts.push(\n lookup[tmp >> 10] +\n lookup[(tmp >> 4) & 0x3F] +\n lookup[(tmp << 2) & 0x3F] +\n '='\n )\n }\n\n return parts.join('')\n}\n","/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n/* eslint-disable no-proto */\n\n'use strict'\n\nconst base64 = require('base64-js')\nconst ieee754 = require('ieee754')\nconst customInspectSymbol =\n (typeof Symbol === 'function' && typeof Symbol['for'] === 'function') // eslint-disable-line dot-notation\n ? Symbol['for']('nodejs.util.inspect.custom') // eslint-disable-line dot-notation\n : null\n\nexports.Buffer = Buffer\nexports.SlowBuffer = SlowBuffer\nexports.INSPECT_MAX_BYTES = 50\n\nconst K_MAX_LENGTH = 0x7fffffff\nexports.kMaxLength = K_MAX_LENGTH\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Print warning and recommend using `buffer` v4.x which has an Object\n * implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * We report that the browser does not support typed arrays if the are not subclassable\n * using __proto__. Firefox 4-29 lacks support for adding new properties to `Uint8Array`\n * (See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438). IE 10 lacks support\n * for __proto__ and has a buggy typed array implementation.\n */\nBuffer.TYPED_ARRAY_SUPPORT = typedArraySupport()\n\nif (!Buffer.TYPED_ARRAY_SUPPORT && typeof console !== 'undefined' &&\n typeof console.error === 'function') {\n console.error(\n 'This browser lacks typed array (Uint8Array) support which is required by ' +\n '`buffer` v5.x. Use `buffer` v4.x if you require old browser support.'\n )\n}\n\nfunction typedArraySupport () {\n // Can typed array instances can be augmented?\n try {\n const arr = new Uint8Array(1)\n const proto = { foo: function () { return 42 } }\n Object.setPrototypeOf(proto, Uint8Array.prototype)\n Object.setPrototypeOf(arr, proto)\n return arr.foo() === 42\n } catch (e) {\n return false\n }\n}\n\nObject.defineProperty(Buffer.prototype, 'parent', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.buffer\n }\n})\n\nObject.defineProperty(Buffer.prototype, 'offset', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.byteOffset\n }\n})\n\nfunction createBuffer (length) {\n if (length > K_MAX_LENGTH) {\n throw new RangeError('The value \"' + length + '\" is invalid for option \"size\"')\n }\n // Return an augmented `Uint8Array` instance\n const buf = new Uint8Array(length)\n Object.setPrototypeOf(buf, Buffer.prototype)\n return buf\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new TypeError(\n 'The \"string\" argument must be of type string. Received type number'\n )\n }\n return allocUnsafe(arg)\n }\n return from(arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\nfunction from (value, encodingOrOffset, length) {\n if (typeof value === 'string') {\n return fromString(value, encodingOrOffset)\n }\n\n if (ArrayBuffer.isView(value)) {\n return fromArrayView(value)\n }\n\n if (value == null) {\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n }\n\n if (isInstance(value, ArrayBuffer) ||\n (value && isInstance(value.buffer, ArrayBuffer))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof SharedArrayBuffer !== 'undefined' &&\n (isInstance(value, SharedArrayBuffer) ||\n (value && isInstance(value.buffer, SharedArrayBuffer)))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof value === 'number') {\n throw new TypeError(\n 'The \"value\" argument must not be of type number. Received type number'\n )\n }\n\n const valueOf = value.valueOf && value.valueOf()\n if (valueOf != null && valueOf !== value) {\n return Buffer.from(valueOf, encodingOrOffset, length)\n }\n\n const b = fromObject(value)\n if (b) return b\n\n if (typeof Symbol !== 'undefined' && Symbol.toPrimitive != null &&\n typeof value[Symbol.toPrimitive] === 'function') {\n return Buffer.from(value[Symbol.toPrimitive]('string'), encodingOrOffset, length)\n }\n\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n return from(value, encodingOrOffset, length)\n}\n\n// Note: Change prototype *after* Buffer.from is defined to workaround Chrome bug:\n// https://github.com/feross/buffer/pull/148\nObject.setPrototypeOf(Buffer.prototype, Uint8Array.prototype)\nObject.setPrototypeOf(Buffer, Uint8Array)\n\nfunction assertSize (size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be of type number')\n } else if (size < 0) {\n throw new RangeError('The value \"' + size + '\" is invalid for option \"size\"')\n }\n}\n\nfunction alloc (size, fill, encoding) {\n assertSize(size)\n if (size <= 0) {\n return createBuffer(size)\n }\n if (fill !== undefined) {\n // Only pay attention to encoding if it's a string. This\n // prevents accidentally sending in a number that would\n // be interpreted as a start offset.\n return typeof encoding === 'string'\n ? createBuffer(size).fill(fill, encoding)\n : createBuffer(size).fill(fill)\n }\n return createBuffer(size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n return alloc(size, fill, encoding)\n}\n\nfunction allocUnsafe (size) {\n assertSize(size)\n return createBuffer(size < 0 ? 0 : checked(size) | 0)\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n return allocUnsafe(size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n return allocUnsafe(size)\n}\n\nfunction fromString (string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8'\n }\n\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n\n const length = byteLength(string, encoding) | 0\n let buf = createBuffer(length)\n\n const actual = buf.write(string, encoding)\n\n if (actual !== length) {\n // Writing a hex string, for example, that contains invalid characters will\n // cause everything after the first invalid character to be ignored. (e.g.\n // 'abxxcd' will be treated as 'ab')\n buf = buf.slice(0, actual)\n }\n\n return buf\n}\n\nfunction fromArrayLike (array) {\n const length = array.length < 0 ? 0 : checked(array.length) | 0\n const buf = createBuffer(length)\n for (let i = 0; i < length; i += 1) {\n buf[i] = array[i] & 255\n }\n return buf\n}\n\nfunction fromArrayView (arrayView) {\n if (isInstance(arrayView, Uint8Array)) {\n const copy = new Uint8Array(arrayView)\n return fromArrayBuffer(copy.buffer, copy.byteOffset, copy.byteLength)\n }\n return fromArrayLike(arrayView)\n}\n\nfunction fromArrayBuffer (array, byteOffset, length) {\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\"offset\" is outside of buffer bounds')\n }\n\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\"length\" is outside of buffer bounds')\n }\n\n let buf\n if (byteOffset === undefined && length === undefined) {\n buf = new Uint8Array(array)\n } else if (length === undefined) {\n buf = new Uint8Array(array, byteOffset)\n } else {\n buf = new Uint8Array(array, byteOffset, length)\n }\n\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(buf, Buffer.prototype)\n\n return buf\n}\n\nfunction fromObject (obj) {\n if (Buffer.isBuffer(obj)) {\n const len = checked(obj.length) | 0\n const buf = createBuffer(len)\n\n if (buf.length === 0) {\n return buf\n }\n\n obj.copy(buf, 0, 0, len)\n return buf\n }\n\n if (obj.length !== undefined) {\n if (typeof obj.length !== 'number' || numberIsNaN(obj.length)) {\n return createBuffer(0)\n }\n return fromArrayLike(obj)\n }\n\n if (obj.type === 'Buffer' && Array.isArray(obj.data)) {\n return fromArrayLike(obj.data)\n }\n}\n\nfunction checked (length) {\n // Note: cannot use `length < K_MAX_LENGTH` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= K_MAX_LENGTH) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + K_MAX_LENGTH.toString(16) + ' bytes')\n }\n return length | 0\n}\n\nfunction SlowBuffer (length) {\n if (+length != length) { // eslint-disable-line eqeqeq\n length = 0\n }\n return Buffer.alloc(+length)\n}\n\nBuffer.isBuffer = function isBuffer (b) {\n return b != null && b._isBuffer === true &&\n b !== Buffer.prototype // so Buffer.isBuffer(Buffer.prototype) will be false\n}\n\nBuffer.compare = function compare (a, b) {\n if (isInstance(a, Uint8Array)) a = Buffer.from(a, a.offset, a.byteLength)\n if (isInstance(b, Uint8Array)) b = Buffer.from(b, b.offset, b.byteLength)\n if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n throw new TypeError(\n 'The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array'\n )\n }\n\n if (a === b) return 0\n\n let x = a.length\n let y = b.length\n\n for (let i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i]\n y = b[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n switch (String(encoding).toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'latin1':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return true\n default:\n return false\n }\n}\n\nBuffer.concat = function concat (list, length) {\n if (!Array.isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n\n if (list.length === 0) {\n return Buffer.alloc(0)\n }\n\n let i\n if (length === undefined) {\n length = 0\n for (i = 0; i < list.length; ++i) {\n length += list[i].length\n }\n }\n\n const buffer = Buffer.allocUnsafe(length)\n let pos = 0\n for (i = 0; i < list.length; ++i) {\n let buf = list[i]\n if (isInstance(buf, Uint8Array)) {\n if (pos + buf.length > buffer.length) {\n if (!Buffer.isBuffer(buf)) buf = Buffer.from(buf)\n buf.copy(buffer, pos)\n } else {\n Uint8Array.prototype.set.call(\n buffer,\n buf,\n pos\n )\n }\n } else if (!Buffer.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n } else {\n buf.copy(buffer, pos)\n }\n pos += buf.length\n }\n return buffer\n}\n\nfunction byteLength (string, encoding) {\n if (Buffer.isBuffer(string)) {\n return string.length\n }\n if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) {\n return string.byteLength\n }\n if (typeof string !== 'string') {\n throw new TypeError(\n 'The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. ' +\n 'Received type ' + typeof string\n )\n }\n\n const len = string.length\n const mustMatch = (arguments.length > 2 && arguments[2] === true)\n if (!mustMatch && len === 0) return 0\n\n // Use a for loop to avoid recursion\n let loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'ascii':\n case 'latin1':\n case 'binary':\n return len\n case 'utf8':\n case 'utf-8':\n return utf8ToBytes(string).length\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return len * 2\n case 'hex':\n return len >>> 1\n case 'base64':\n return base64ToBytes(string).length\n default:\n if (loweredCase) {\n return mustMatch ? -1 : utf8ToBytes(string).length // assume utf8\n }\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n let loweredCase = false\n\n // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n // property of a typed array.\n\n // This behaves neither like String nor Uint8Array in that we set start/end\n // to their upper/lower bounds if the value passed is out of range.\n // undefined is handled specially as per ECMA-262 6th Edition,\n // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n if (start === undefined || start < 0) {\n start = 0\n }\n // Return early if start > this.length. Done here to prevent potential uint32\n // coercion fail below.\n if (start > this.length) {\n return ''\n }\n\n if (end === undefined || end > this.length) {\n end = this.length\n }\n\n if (end <= 0) {\n return ''\n }\n\n // Force coercion to uint32. This will also coerce falsey/NaN values to 0.\n end >>>= 0\n start >>>= 0\n\n if (end <= start) {\n return ''\n }\n\n if (!encoding) encoding = 'utf8'\n\n while (true) {\n switch (encoding) {\n case 'hex':\n return hexSlice(this, start, end)\n\n case 'utf8':\n case 'utf-8':\n return utf8Slice(this, start, end)\n\n case 'ascii':\n return asciiSlice(this, start, end)\n\n case 'latin1':\n case 'binary':\n return latin1Slice(this, start, end)\n\n case 'base64':\n return base64Slice(this, start, end)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return utf16leSlice(this, start, end)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = (encoding + '').toLowerCase()\n loweredCase = true\n }\n }\n}\n\n// This property is used by `Buffer.isBuffer` (and the `is-buffer` npm package)\n// to detect a Buffer instance. It's not possible to use `instanceof Buffer`\n// reliably in a browserify context because there could be multiple different\n// copies of the 'buffer' package in use. This method works even for Buffer\n// instances that were created from another copy of the `buffer` package.\n// See: https://github.com/feross/buffer/issues/154\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n const i = b[n]\n b[n] = b[m]\n b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n const len = this.length\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits')\n }\n for (let i = 0; i < len; i += 2) {\n swap(this, i, i + 1)\n }\n return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n const len = this.length\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits')\n }\n for (let i = 0; i < len; i += 4) {\n swap(this, i, i + 3)\n swap(this, i + 1, i + 2)\n }\n return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n const len = this.length\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits')\n }\n for (let i = 0; i < len; i += 8) {\n swap(this, i, i + 7)\n swap(this, i + 1, i + 6)\n swap(this, i + 2, i + 5)\n swap(this, i + 3, i + 4)\n }\n return this\n}\n\nBuffer.prototype.toString = function toString () {\n const length = this.length\n if (length === 0) return ''\n if (arguments.length === 0) return utf8Slice(this, 0, length)\n return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.toLocaleString = Buffer.prototype.toString\n\nBuffer.prototype.equals = function equals (b) {\n if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n if (this === b) return true\n return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n let str = ''\n const max = exports.INSPECT_MAX_BYTES\n str = this.toString('hex', 0, max).replace(/(.{2})/g, '$1 ').trim()\n if (this.length > max) str += ' ... '\n return ''\n}\nif (customInspectSymbol) {\n Buffer.prototype[customInspectSymbol] = Buffer.prototype.inspect\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n if (isInstance(target, Uint8Array)) {\n target = Buffer.from(target, target.offset, target.byteLength)\n }\n if (!Buffer.isBuffer(target)) {\n throw new TypeError(\n 'The \"target\" argument must be one of type Buffer or Uint8Array. ' +\n 'Received type ' + (typeof target)\n )\n }\n\n if (start === undefined) {\n start = 0\n }\n if (end === undefined) {\n end = target ? target.length : 0\n }\n if (thisStart === undefined) {\n thisStart = 0\n }\n if (thisEnd === undefined) {\n thisEnd = this.length\n }\n\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError('out of range index')\n }\n\n if (thisStart >= thisEnd && start >= end) {\n return 0\n }\n if (thisStart >= thisEnd) {\n return -1\n }\n if (start >= end) {\n return 1\n }\n\n start >>>= 0\n end >>>= 0\n thisStart >>>= 0\n thisEnd >>>= 0\n\n if (this === target) return 0\n\n let x = thisEnd - thisStart\n let y = end - start\n const len = Math.min(x, y)\n\n const thisCopy = this.slice(thisStart, thisEnd)\n const targetCopy = target.slice(start, end)\n\n for (let i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i]\n y = targetCopy[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (numberIsNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [val], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n let indexSize = 1\n let arrLength = arr.length\n let valLength = val.length\n\n if (encoding !== undefined) {\n encoding = String(encoding).toLowerCase()\n if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n encoding === 'utf16le' || encoding === 'utf-16le') {\n if (arr.length < 2 || val.length < 2) {\n return -1\n }\n indexSize = 2\n arrLength /= 2\n valLength /= 2\n byteOffset /= 2\n }\n }\n\n function read (buf, i) {\n if (indexSize === 1) {\n return buf[i]\n } else {\n return buf.readUInt16BE(i * indexSize)\n }\n }\n\n let i\n if (dir) {\n let foundIndex = -1\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1) foundIndex = i\n if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n } else {\n if (foundIndex !== -1) i -= i - foundIndex\n foundIndex = -1\n }\n }\n } else {\n if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n for (i = byteOffset; i >= 0; i--) {\n let found = true\n for (let j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false\n break\n }\n }\n if (found) return i\n }\n }\n\n return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n offset = Number(offset) || 0\n const remaining = buf.length - offset\n if (!length) {\n length = remaining\n } else {\n length = Number(length)\n if (length > remaining) {\n length = remaining\n }\n }\n\n const strLen = string.length\n\n if (length > strLen / 2) {\n length = strLen / 2\n }\n let i\n for (i = 0; i < length; ++i) {\n const parsed = parseInt(string.substr(i * 2, 2), 16)\n if (numberIsNaN(parsed)) return i\n buf[offset + i] = parsed\n }\n return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n // Buffer#write(string)\n if (offset === undefined) {\n encoding = 'utf8'\n length = this.length\n offset = 0\n // Buffer#write(string, encoding)\n } else if (length === undefined && typeof offset === 'string') {\n encoding = offset\n length = this.length\n offset = 0\n // Buffer#write(string, offset[, length][, encoding])\n } else if (isFinite(offset)) {\n offset = offset >>> 0\n if (isFinite(length)) {\n length = length >>> 0\n if (encoding === undefined) encoding = 'utf8'\n } else {\n encoding = length\n length = undefined\n }\n } else {\n throw new Error(\n 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n )\n }\n\n const remaining = this.length - offset\n if (length === undefined || length > remaining) length = remaining\n\n if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n throw new RangeError('Attempt to write outside buffer bounds')\n }\n\n if (!encoding) encoding = 'utf8'\n\n let loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'hex':\n return hexWrite(this, string, offset, length)\n\n case 'utf8':\n case 'utf-8':\n return utf8Write(this, string, offset, length)\n\n case 'ascii':\n case 'latin1':\n case 'binary':\n return asciiWrite(this, string, offset, length)\n\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return base64Write(this, string, offset, length)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return ucs2Write(this, string, offset, length)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0)\n }\n}\n\nfunction base64Slice (buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf)\n } else {\n return base64.fromByteArray(buf.slice(start, end))\n }\n}\n\nfunction utf8Slice (buf, start, end) {\n end = Math.min(buf.length, end)\n const res = []\n\n let i = start\n while (i < end) {\n const firstByte = buf[i]\n let codePoint = null\n let bytesPerSequence = (firstByte > 0xEF)\n ? 4\n : (firstByte > 0xDF)\n ? 3\n : (firstByte > 0xBF)\n ? 2\n : 1\n\n if (i + bytesPerSequence <= end) {\n let secondByte, thirdByte, fourthByte, tempCodePoint\n\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 0x80) {\n codePoint = firstByte\n }\n break\n case 2:\n secondByte = buf[i + 1]\n if ((secondByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n if (tempCodePoint > 0x7F) {\n codePoint = tempCodePoint\n }\n }\n break\n case 3:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n codePoint = tempCodePoint\n }\n }\n break\n case 4:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n fourthByte = buf[i + 3]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n codePoint = tempCodePoint\n }\n }\n }\n }\n\n if (codePoint === null) {\n // we did not generate a valid codePoint so insert a\n // replacement char (U+FFFD) and advance only 1 byte\n codePoint = 0xFFFD\n bytesPerSequence = 1\n } else if (codePoint > 0xFFFF) {\n // encode to utf16 (surrogate pair dance)\n codePoint -= 0x10000\n res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n codePoint = 0xDC00 | codePoint & 0x3FF\n }\n\n res.push(codePoint)\n i += bytesPerSequence\n }\n\n return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nconst MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n const len = codePoints.length\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n }\n\n // Decode in chunks to avoid \"call stack size exceeded\".\n let res = ''\n let i = 0\n while (i < len) {\n res += String.fromCharCode.apply(\n String,\n codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n )\n }\n return res\n}\n\nfunction asciiSlice (buf, start, end) {\n let ret = ''\n end = Math.min(buf.length, end)\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F)\n }\n return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n let ret = ''\n end = Math.min(buf.length, end)\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i])\n }\n return ret\n}\n\nfunction hexSlice (buf, start, end) {\n const len = buf.length\n\n if (!start || start < 0) start = 0\n if (!end || end < 0 || end > len) end = len\n\n let out = ''\n for (let i = start; i < end; ++i) {\n out += hexSliceLookupTable[buf[i]]\n }\n return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n const bytes = buf.slice(start, end)\n let res = ''\n // If bytes.length is odd, the last 8 bits must be ignored (same as node.js)\n for (let i = 0; i < bytes.length - 1; i += 2) {\n res += String.fromCharCode(bytes[i] + (bytes[i + 1] * 256))\n }\n return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n const len = this.length\n start = ~~start\n end = end === undefined ? len : ~~end\n\n if (start < 0) {\n start += len\n if (start < 0) start = 0\n } else if (start > len) {\n start = len\n }\n\n if (end < 0) {\n end += len\n if (end < 0) end = 0\n } else if (end > len) {\n end = len\n }\n\n if (end < start) end = start\n\n const newBuf = this.subarray(start, end)\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(newBuf, Buffer.prototype)\n\n return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUintLE =\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let val = this[offset]\n let mul = 1\n let i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUintBE =\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n checkOffset(offset, byteLength, this.length)\n }\n\n let val = this[offset + --byteLength]\n let mul = 1\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUint8 =\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n return this[offset]\n}\n\nBuffer.prototype.readUint16LE =\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUint16BE =\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUint32LE =\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return ((this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16)) +\n (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUint32BE =\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] * 0x1000000) +\n ((this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n this[offset + 3])\n}\n\nBuffer.prototype.readBigUInt64LE = defineBigIntMethod(function readBigUInt64LE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const lo = first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24\n\n const hi = this[++offset] +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n last * 2 ** 24\n\n return BigInt(lo) + (BigInt(hi) << BigInt(32))\n})\n\nBuffer.prototype.readBigUInt64BE = defineBigIntMethod(function readBigUInt64BE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const hi = first * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset]\n\n const lo = this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last\n\n return (BigInt(hi) << BigInt(32)) + BigInt(lo)\n})\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let val = this[offset]\n let mul = 1\n let i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let i = byteLength\n let mul = 1\n let val = this[offset + --i]\n while (i > 0 && (mul *= 0x100)) {\n val += this[offset + --i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n if (!(this[offset] & 0x80)) return (this[offset])\n return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n const val = this[offset] | (this[offset + 1] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n const val = this[offset + 1] | (this[offset] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16) |\n (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] << 24) |\n (this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n (this[offset + 3])\n}\n\nBuffer.prototype.readBigInt64LE = defineBigIntMethod(function readBigInt64LE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const val = this[offset + 4] +\n this[offset + 5] * 2 ** 8 +\n this[offset + 6] * 2 ** 16 +\n (last << 24) // Overflow\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24)\n})\n\nBuffer.prototype.readBigInt64BE = defineBigIntMethod(function readBigInt64BE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const val = (first << 24) + // Overflow\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset]\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last)\n})\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUintLE =\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n let mul = 1\n let i = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUintBE =\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n let i = byteLength - 1\n let mul = 1\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUint8 =\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeUint16LE =\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeUint16BE =\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeUint32LE =\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset + 3] = (value >>> 24)\n this[offset + 2] = (value >>> 16)\n this[offset + 1] = (value >>> 8)\n this[offset] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeUint32BE =\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nfunction wrtBigUInt64LE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7)\n\n let lo = Number(value & BigInt(0xffffffff))\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n return offset\n}\n\nfunction wrtBigUInt64BE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7)\n\n let lo = Number(value & BigInt(0xffffffff))\n buf[offset + 7] = lo\n lo = lo >> 8\n buf[offset + 6] = lo\n lo = lo >> 8\n buf[offset + 5] = lo\n lo = lo >> 8\n buf[offset + 4] = lo\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n buf[offset + 3] = hi\n hi = hi >> 8\n buf[offset + 2] = hi\n hi = hi >> 8\n buf[offset + 1] = hi\n hi = hi >> 8\n buf[offset] = hi\n return offset + 8\n}\n\nBuffer.prototype.writeBigUInt64LE = defineBigIntMethod(function writeBigUInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeBigUInt64BE = defineBigIntMethod(function writeBigUInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n let i = 0\n let mul = 1\n let sub = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n let i = byteLength - 1\n let mul = 1\n let sub = 0\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n if (value < 0) value = 0xff + value + 1\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n this[offset + 2] = (value >>> 16)\n this[offset + 3] = (value >>> 24)\n return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (value < 0) value = 0xffffffff + value + 1\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeBigInt64LE = defineBigIntMethod(function writeBigInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nBuffer.prototype.writeBigInt64BE = defineBigIntMethod(function writeBigInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n }\n ieee754.write(buf, value, offset, littleEndian, 23, 4)\n return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n }\n ieee754.write(buf, value, offset, littleEndian, 52, 8)\n return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n if (!Buffer.isBuffer(target)) throw new TypeError('argument should be a Buffer')\n if (!start) start = 0\n if (!end && end !== 0) end = this.length\n if (targetStart >= target.length) targetStart = target.length\n if (!targetStart) targetStart = 0\n if (end > 0 && end < start) end = start\n\n // Copy 0 bytes; we're done\n if (end === start) return 0\n if (target.length === 0 || this.length === 0) return 0\n\n // Fatal error conditions\n if (targetStart < 0) {\n throw new RangeError('targetStart out of bounds')\n }\n if (start < 0 || start >= this.length) throw new RangeError('Index out of range')\n if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n // Are we oob?\n if (end > this.length) end = this.length\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start\n }\n\n const len = end - start\n\n if (this === target && typeof Uint8Array.prototype.copyWithin === 'function') {\n // Use built-in when available, missing from IE11\n this.copyWithin(targetStart, start, end)\n } else {\n Uint8Array.prototype.set.call(\n target,\n this.subarray(start, end),\n targetStart\n )\n }\n\n return len\n}\n\n// Usage:\n// buffer.fill(number[, offset[, end]])\n// buffer.fill(buffer[, offset[, end]])\n// buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n // Handle string cases:\n if (typeof val === 'string') {\n if (typeof start === 'string') {\n encoding = start\n start = 0\n end = this.length\n } else if (typeof end === 'string') {\n encoding = end\n end = this.length\n }\n if (encoding !== undefined && typeof encoding !== 'string') {\n throw new TypeError('encoding must be a string')\n }\n if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n if (val.length === 1) {\n const code = val.charCodeAt(0)\n if ((encoding === 'utf8' && code < 128) ||\n encoding === 'latin1') {\n // Fast path: If `val` fits into a single byte, use that numeric value.\n val = code\n }\n }\n } else if (typeof val === 'number') {\n val = val & 255\n } else if (typeof val === 'boolean') {\n val = Number(val)\n }\n\n // Invalid ranges are not set to a default, so can range check early.\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError('Out of range index')\n }\n\n if (end <= start) {\n return this\n }\n\n start = start >>> 0\n end = end === undefined ? this.length : end >>> 0\n\n if (!val) val = 0\n\n let i\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val\n }\n } else {\n const bytes = Buffer.isBuffer(val)\n ? val\n : Buffer.from(val, encoding)\n const len = bytes.length\n if (len === 0) {\n throw new TypeError('The value \"' + val +\n '\" is invalid for argument \"value\"')\n }\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len]\n }\n }\n\n return this\n}\n\n// CUSTOM ERRORS\n// =============\n\n// Simplified versions from Node, changed for Buffer-only usage\nconst errors = {}\nfunction E (sym, getMessage, Base) {\n errors[sym] = class NodeError extends Base {\n constructor () {\n super()\n\n Object.defineProperty(this, 'message', {\n value: getMessage.apply(this, arguments),\n writable: true,\n configurable: true\n })\n\n // Add the error code to the name to include it in the stack trace.\n this.name = `${this.name} [${sym}]`\n // Access the stack to generate the error message including the error code\n // from the name.\n this.stack // eslint-disable-line no-unused-expressions\n // Reset the name to the actual name.\n delete this.name\n }\n\n get code () {\n return sym\n }\n\n set code (value) {\n Object.defineProperty(this, 'code', {\n configurable: true,\n enumerable: true,\n value,\n writable: true\n })\n }\n\n toString () {\n return `${this.name} [${sym}]: ${this.message}`\n }\n }\n}\n\nE('ERR_BUFFER_OUT_OF_BOUNDS',\n function (name) {\n if (name) {\n return `${name} is outside of buffer bounds`\n }\n\n return 'Attempt to access memory outside buffer bounds'\n }, RangeError)\nE('ERR_INVALID_ARG_TYPE',\n function (name, actual) {\n return `The \"${name}\" argument must be of type number. Received type ${typeof actual}`\n }, TypeError)\nE('ERR_OUT_OF_RANGE',\n function (str, range, input) {\n let msg = `The value of \"${str}\" is out of range.`\n let received = input\n if (Number.isInteger(input) && Math.abs(input) > 2 ** 32) {\n received = addNumericalSeparator(String(input))\n } else if (typeof input === 'bigint') {\n received = String(input)\n if (input > BigInt(2) ** BigInt(32) || input < -(BigInt(2) ** BigInt(32))) {\n received = addNumericalSeparator(received)\n }\n received += 'n'\n }\n msg += ` It must be ${range}. Received ${received}`\n return msg\n }, RangeError)\n\nfunction addNumericalSeparator (val) {\n let res = ''\n let i = val.length\n const start = val[0] === '-' ? 1 : 0\n for (; i >= start + 4; i -= 3) {\n res = `_${val.slice(i - 3, i)}${res}`\n }\n return `${val.slice(0, i)}${res}`\n}\n\n// CHECK FUNCTIONS\n// ===============\n\nfunction checkBounds (buf, offset, byteLength) {\n validateNumber(offset, 'offset')\n if (buf[offset] === undefined || buf[offset + byteLength] === undefined) {\n boundsError(offset, buf.length - (byteLength + 1))\n }\n}\n\nfunction checkIntBI (value, min, max, buf, offset, byteLength) {\n if (value > max || value < min) {\n const n = typeof min === 'bigint' ? 'n' : ''\n let range\n if (byteLength > 3) {\n if (min === 0 || min === BigInt(0)) {\n range = `>= 0${n} and < 2${n} ** ${(byteLength + 1) * 8}${n}`\n } else {\n range = `>= -(2${n} ** ${(byteLength + 1) * 8 - 1}${n}) and < 2 ** ` +\n `${(byteLength + 1) * 8 - 1}${n}`\n }\n } else {\n range = `>= ${min}${n} and <= ${max}${n}`\n }\n throw new errors.ERR_OUT_OF_RANGE('value', range, value)\n }\n checkBounds(buf, offset, byteLength)\n}\n\nfunction validateNumber (value, name) {\n if (typeof value !== 'number') {\n throw new errors.ERR_INVALID_ARG_TYPE(name, 'number', value)\n }\n}\n\nfunction boundsError (value, length, type) {\n if (Math.floor(value) !== value) {\n validateNumber(value, type)\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset', 'an integer', value)\n }\n\n if (length < 0) {\n throw new errors.ERR_BUFFER_OUT_OF_BOUNDS()\n }\n\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset',\n `>= ${type ? 1 : 0} and <= ${length}`,\n value)\n}\n\n// HELPER FUNCTIONS\n// ================\n\nconst INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n // Node takes equal signs as end of the Base64 encoding\n str = str.split('=')[0]\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = str.trim().replace(INVALID_BASE64_RE, '')\n // Node converts strings with length < 2 to ''\n if (str.length < 2) return ''\n // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n while (str.length % 4 !== 0) {\n str = str + '='\n }\n return str\n}\n\nfunction utf8ToBytes (string, units) {\n units = units || Infinity\n let codePoint\n const length = string.length\n let leadSurrogate = null\n const bytes = []\n\n for (let i = 0; i < length; ++i) {\n codePoint = string.charCodeAt(i)\n\n // is surrogate component\n if (codePoint > 0xD7FF && codePoint < 0xE000) {\n // last char was a lead\n if (!leadSurrogate) {\n // no lead yet\n if (codePoint > 0xDBFF) {\n // unexpected trail\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n } else if (i + 1 === length) {\n // unpaired lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n }\n\n // valid lead\n leadSurrogate = codePoint\n\n continue\n }\n\n // 2 leads in a row\n if (codePoint < 0xDC00) {\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n leadSurrogate = codePoint\n continue\n }\n\n // valid surrogate pair\n codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n } else if (leadSurrogate) {\n // valid bmp char, but last char was a lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n }\n\n leadSurrogate = null\n\n // encode utf8\n if (codePoint < 0x80) {\n if ((units -= 1) < 0) break\n bytes.push(codePoint)\n } else if (codePoint < 0x800) {\n if ((units -= 2) < 0) break\n bytes.push(\n codePoint >> 0x6 | 0xC0,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x10000) {\n if ((units -= 3) < 0) break\n bytes.push(\n codePoint >> 0xC | 0xE0,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x110000) {\n if ((units -= 4) < 0) break\n bytes.push(\n codePoint >> 0x12 | 0xF0,\n codePoint >> 0xC & 0x3F | 0x80,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else {\n throw new Error('Invalid code point')\n }\n }\n\n return bytes\n}\n\nfunction asciiToBytes (str) {\n const byteArray = []\n for (let i = 0; i < str.length; ++i) {\n // Node's code seems to be doing this and not & 0x7F..\n byteArray.push(str.charCodeAt(i) & 0xFF)\n }\n return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n let c, hi, lo\n const byteArray = []\n for (let i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0) break\n\n c = str.charCodeAt(i)\n hi = c >> 8\n lo = c % 256\n byteArray.push(lo)\n byteArray.push(hi)\n }\n\n return byteArray\n}\n\nfunction base64ToBytes (str) {\n return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n let i\n for (i = 0; i < length; ++i) {\n if ((i + offset >= dst.length) || (i >= src.length)) break\n dst[i + offset] = src[i]\n }\n return i\n}\n\n// ArrayBuffer or Uint8Array objects from other contexts (i.e. iframes) do not pass\n// the `instanceof` check but they should be treated as of that type.\n// See: https://github.com/feross/buffer/issues/166\nfunction isInstance (obj, type) {\n return obj instanceof type ||\n (obj != null && obj.constructor != null && obj.constructor.name != null &&\n obj.constructor.name === type.name)\n}\nfunction numberIsNaN (obj) {\n // For IE11 support\n return obj !== obj // eslint-disable-line no-self-compare\n}\n\n// Create lookup table for `toString('hex')`\n// See: https://github.com/feross/buffer/issues/219\nconst hexSliceLookupTable = (function () {\n const alphabet = '0123456789abcdef'\n const table = new Array(256)\n for (let i = 0; i < 16; ++i) {\n const i16 = i * 16\n for (let j = 0; j < 16; ++j) {\n table[i16 + j] = alphabet[i] + alphabet[j]\n }\n }\n return table\n})()\n\n// Return not function with Error if BigInt not supported\nfunction defineBigIntMethod (fn) {\n return typeof BigInt === 'undefined' ? BufferBigIntNotDefined : fn\n}\n\nfunction BufferBigIntNotDefined () {\n throw new Error('BigInt not supported')\n}\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\nvar R = typeof Reflect === 'object' ? Reflect : null\nvar ReflectApply = R && typeof R.apply === 'function'\n ? R.apply\n : function ReflectApply(target, receiver, args) {\n return Function.prototype.apply.call(target, receiver, args);\n }\n\nvar ReflectOwnKeys\nif (R && typeof R.ownKeys === 'function') {\n ReflectOwnKeys = R.ownKeys\n} else if (Object.getOwnPropertySymbols) {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target)\n .concat(Object.getOwnPropertySymbols(target));\n };\n} else {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target);\n };\n}\n\nfunction ProcessEmitWarning(warning) {\n if (console && console.warn) console.warn(warning);\n}\n\nvar NumberIsNaN = Number.isNaN || function NumberIsNaN(value) {\n return value !== value;\n}\n\nfunction EventEmitter() {\n EventEmitter.init.call(this);\n}\nmodule.exports = EventEmitter;\nmodule.exports.once = once;\n\n// Backwards-compat with node 0.10.x\nEventEmitter.EventEmitter = EventEmitter;\n\nEventEmitter.prototype._events = undefined;\nEventEmitter.prototype._eventsCount = 0;\nEventEmitter.prototype._maxListeners = undefined;\n\n// By default EventEmitters will print a warning if more than 10 listeners are\n// added to it. This is a useful default which helps finding memory leaks.\nvar defaultMaxListeners = 10;\n\nfunction checkListener(listener) {\n if (typeof listener !== 'function') {\n throw new TypeError('The \"listener\" argument must be of type Function. Received type ' + typeof listener);\n }\n}\n\nObject.defineProperty(EventEmitter, 'defaultMaxListeners', {\n enumerable: true,\n get: function() {\n return defaultMaxListeners;\n },\n set: function(arg) {\n if (typeof arg !== 'number' || arg < 0 || NumberIsNaN(arg)) {\n throw new RangeError('The value of \"defaultMaxListeners\" is out of range. It must be a non-negative number. Received ' + arg + '.');\n }\n defaultMaxListeners = arg;\n }\n});\n\nEventEmitter.init = function() {\n\n if (this._events === undefined ||\n this._events === Object.getPrototypeOf(this)._events) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n }\n\n this._maxListeners = this._maxListeners || undefined;\n};\n\n// Obviously not all Emitters should be limited to 10. This function allows\n// that to be increased. Set to zero for unlimited.\nEventEmitter.prototype.setMaxListeners = function setMaxListeners(n) {\n if (typeof n !== 'number' || n < 0 || NumberIsNaN(n)) {\n throw new RangeError('The value of \"n\" is out of range. It must be a non-negative number. Received ' + n + '.');\n }\n this._maxListeners = n;\n return this;\n};\n\nfunction _getMaxListeners(that) {\n if (that._maxListeners === undefined)\n return EventEmitter.defaultMaxListeners;\n return that._maxListeners;\n}\n\nEventEmitter.prototype.getMaxListeners = function getMaxListeners() {\n return _getMaxListeners(this);\n};\n\nEventEmitter.prototype.emit = function emit(type) {\n var args = [];\n for (var i = 1; i < arguments.length; i++) args.push(arguments[i]);\n var doError = (type === 'error');\n\n var events = this._events;\n if (events !== undefined)\n doError = (doError && events.error === undefined);\n else if (!doError)\n return false;\n\n // If there is no 'error' event listener then throw.\n if (doError) {\n var er;\n if (args.length > 0)\n er = args[0];\n if (er instanceof Error) {\n // Note: The comments on the `throw` lines are intentional, they show\n // up in Node's output if this results in an unhandled exception.\n throw er; // Unhandled 'error' event\n }\n // At least give some kind of context to the user\n var err = new Error('Unhandled error.' + (er ? ' (' + er.message + ')' : ''));\n err.context = er;\n throw err; // Unhandled 'error' event\n }\n\n var handler = events[type];\n\n if (handler === undefined)\n return false;\n\n if (typeof handler === 'function') {\n ReflectApply(handler, this, args);\n } else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n ReflectApply(listeners[i], this, args);\n }\n\n return true;\n};\n\nfunction _addListener(target, type, listener, prepend) {\n var m;\n var events;\n var existing;\n\n checkListener(listener);\n\n events = target._events;\n if (events === undefined) {\n events = target._events = Object.create(null);\n target._eventsCount = 0;\n } else {\n // To avoid recursion in the case that type === \"newListener\"! Before\n // adding it to the listeners, first emit \"newListener\".\n if (events.newListener !== undefined) {\n target.emit('newListener', type,\n listener.listener ? listener.listener : listener);\n\n // Re-assign `events` because a newListener handler could have caused the\n // this._events to be assigned to a new object\n events = target._events;\n }\n existing = events[type];\n }\n\n if (existing === undefined) {\n // Optimize the case of one listener. Don't need the extra array object.\n existing = events[type] = listener;\n ++target._eventsCount;\n } else {\n if (typeof existing === 'function') {\n // Adding the second element, need to change to array.\n existing = events[type] =\n prepend ? [listener, existing] : [existing, listener];\n // If we've already got an array, just append.\n } else if (prepend) {\n existing.unshift(listener);\n } else {\n existing.push(listener);\n }\n\n // Check for listener leak\n m = _getMaxListeners(target);\n if (m > 0 && existing.length > m && !existing.warned) {\n existing.warned = true;\n // No error code for this since it is a Warning\n // eslint-disable-next-line no-restricted-syntax\n var w = new Error('Possible EventEmitter memory leak detected. ' +\n existing.length + ' ' + String(type) + ' listeners ' +\n 'added. Use emitter.setMaxListeners() to ' +\n 'increase limit');\n w.name = 'MaxListenersExceededWarning';\n w.emitter = target;\n w.type = type;\n w.count = existing.length;\n ProcessEmitWarning(w);\n }\n }\n\n return target;\n}\n\nEventEmitter.prototype.addListener = function addListener(type, listener) {\n return _addListener(this, type, listener, false);\n};\n\nEventEmitter.prototype.on = EventEmitter.prototype.addListener;\n\nEventEmitter.prototype.prependListener =\n function prependListener(type, listener) {\n return _addListener(this, type, listener, true);\n };\n\nfunction onceWrapper() {\n if (!this.fired) {\n this.target.removeListener(this.type, this.wrapFn);\n this.fired = true;\n if (arguments.length === 0)\n return this.listener.call(this.target);\n return this.listener.apply(this.target, arguments);\n }\n}\n\nfunction _onceWrap(target, type, listener) {\n var state = { fired: false, wrapFn: undefined, target: target, type: type, listener: listener };\n var wrapped = onceWrapper.bind(state);\n wrapped.listener = listener;\n state.wrapFn = wrapped;\n return wrapped;\n}\n\nEventEmitter.prototype.once = function once(type, listener) {\n checkListener(listener);\n this.on(type, _onceWrap(this, type, listener));\n return this;\n};\n\nEventEmitter.prototype.prependOnceListener =\n function prependOnceListener(type, listener) {\n checkListener(listener);\n this.prependListener(type, _onceWrap(this, type, listener));\n return this;\n };\n\n// Emits a 'removeListener' event if and only if the listener was removed.\nEventEmitter.prototype.removeListener =\n function removeListener(type, listener) {\n var list, events, position, i, originalListener;\n\n checkListener(listener);\n\n events = this._events;\n if (events === undefined)\n return this;\n\n list = events[type];\n if (list === undefined)\n return this;\n\n if (list === listener || list.listener === listener) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else {\n delete events[type];\n if (events.removeListener)\n this.emit('removeListener', type, list.listener || listener);\n }\n } else if (typeof list !== 'function') {\n position = -1;\n\n for (i = list.length - 1; i >= 0; i--) {\n if (list[i] === listener || list[i].listener === listener) {\n originalListener = list[i].listener;\n position = i;\n break;\n }\n }\n\n if (position < 0)\n return this;\n\n if (position === 0)\n list.shift();\n else {\n spliceOne(list, position);\n }\n\n if (list.length === 1)\n events[type] = list[0];\n\n if (events.removeListener !== undefined)\n this.emit('removeListener', type, originalListener || listener);\n }\n\n return this;\n };\n\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\n\nEventEmitter.prototype.removeAllListeners =\n function removeAllListeners(type) {\n var listeners, events, i;\n\n events = this._events;\n if (events === undefined)\n return this;\n\n // not listening for removeListener, no need to emit\n if (events.removeListener === undefined) {\n if (arguments.length === 0) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n } else if (events[type] !== undefined) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else\n delete events[type];\n }\n return this;\n }\n\n // emit removeListener for all listeners on all events\n if (arguments.length === 0) {\n var keys = Object.keys(events);\n var key;\n for (i = 0; i < keys.length; ++i) {\n key = keys[i];\n if (key === 'removeListener') continue;\n this.removeAllListeners(key);\n }\n this.removeAllListeners('removeListener');\n this._events = Object.create(null);\n this._eventsCount = 0;\n return this;\n }\n\n listeners = events[type];\n\n if (typeof listeners === 'function') {\n this.removeListener(type, listeners);\n } else if (listeners !== undefined) {\n // LIFO order\n for (i = listeners.length - 1; i >= 0; i--) {\n this.removeListener(type, listeners[i]);\n }\n }\n\n return this;\n };\n\nfunction _listeners(target, type, unwrap) {\n var events = target._events;\n\n if (events === undefined)\n return [];\n\n var evlistener = events[type];\n if (evlistener === undefined)\n return [];\n\n if (typeof evlistener === 'function')\n return unwrap ? [evlistener.listener || evlistener] : [evlistener];\n\n return unwrap ?\n unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length);\n}\n\nEventEmitter.prototype.listeners = function listeners(type) {\n return _listeners(this, type, true);\n};\n\nEventEmitter.prototype.rawListeners = function rawListeners(type) {\n return _listeners(this, type, false);\n};\n\nEventEmitter.listenerCount = function(emitter, type) {\n if (typeof emitter.listenerCount === 'function') {\n return emitter.listenerCount(type);\n } else {\n return listenerCount.call(emitter, type);\n }\n};\n\nEventEmitter.prototype.listenerCount = listenerCount;\nfunction listenerCount(type) {\n var events = this._events;\n\n if (events !== undefined) {\n var evlistener = events[type];\n\n if (typeof evlistener === 'function') {\n return 1;\n } else if (evlistener !== undefined) {\n return evlistener.length;\n }\n }\n\n return 0;\n}\n\nEventEmitter.prototype.eventNames = function eventNames() {\n return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : [];\n};\n\nfunction arrayClone(arr, n) {\n var copy = new Array(n);\n for (var i = 0; i < n; ++i)\n copy[i] = arr[i];\n return copy;\n}\n\nfunction spliceOne(list, index) {\n for (; index + 1 < list.length; index++)\n list[index] = list[index + 1];\n list.pop();\n}\n\nfunction unwrapListeners(arr) {\n var ret = new Array(arr.length);\n for (var i = 0; i < ret.length; ++i) {\n ret[i] = arr[i].listener || arr[i];\n }\n return ret;\n}\n\nfunction once(emitter, name) {\n return new Promise(function (resolve, reject) {\n function errorListener(err) {\n emitter.removeListener(name, resolver);\n reject(err);\n }\n\n function resolver() {\n if (typeof emitter.removeListener === 'function') {\n emitter.removeListener('error', errorListener);\n }\n resolve([].slice.call(arguments));\n };\n\n eventTargetAgnosticAddListener(emitter, name, resolver, { once: true });\n if (name !== 'error') {\n addErrorHandlerIfEventEmitter(emitter, errorListener, { once: true });\n }\n });\n}\n\nfunction addErrorHandlerIfEventEmitter(emitter, handler, flags) {\n if (typeof emitter.on === 'function') {\n eventTargetAgnosticAddListener(emitter, 'error', handler, flags);\n }\n}\n\nfunction eventTargetAgnosticAddListener(emitter, name, listener, flags) {\n if (typeof emitter.on === 'function') {\n if (flags.once) {\n emitter.once(name, listener);\n } else {\n emitter.on(name, listener);\n }\n } else if (typeof emitter.addEventListener === 'function') {\n // EventTarget does not have `error` event semantics like Node\n // EventEmitters, we do not listen for `error` events here.\n emitter.addEventListener(name, function wrapListener(arg) {\n // IE does not have builtin `{ once: true }` support so we\n // have to do it manually.\n if (flags.once) {\n emitter.removeEventListener(name, wrapListener);\n }\n listener(arg);\n });\n } else {\n throw new TypeError('The \"emitter\" argument must be of type EventEmitter. Received type ' + typeof emitter);\n }\n}\n","/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */\nexports.read = function (buffer, offset, isLE, mLen, nBytes) {\n var e, m\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var nBits = -7\n var i = isLE ? (nBytes - 1) : 0\n var d = isLE ? -1 : 1\n var s = buffer[offset + i]\n\n i += d\n\n e = s & ((1 << (-nBits)) - 1)\n s >>= (-nBits)\n nBits += eLen\n for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & ((1 << (-nBits)) - 1)\n e >>= (-nBits)\n nBits += mLen\n for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias\n } else if (e === eMax) {\n return m ? NaN : ((s ? -1 : 1) * Infinity)\n } else {\n m = m + Math.pow(2, mLen)\n e = e - eBias\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n var i = isLE ? 0 : (nBytes - 1)\n var d = isLE ? 1 : -1\n var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n value = Math.abs(value)\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0\n e = eMax\n } else {\n e = Math.floor(Math.log(value) / Math.LN2)\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--\n c *= 2\n }\n if (e + eBias >= 1) {\n value += rt / c\n } else {\n value += rt * Math.pow(2, 1 - eBias)\n }\n if (value * c >= 2) {\n e++\n c /= 2\n }\n\n if (e + eBias >= eMax) {\n m = 0\n e = eMax\n } else if (e + eBias >= 1) {\n m = ((value * c) - 1) * Math.pow(2, mLen)\n e = e + eBias\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n e = 0\n }\n }\n\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n e = (e << mLen) | m\n eLen += mLen\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128\n}\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView');\n\nmodule.exports = DataView;\n","var hashClear = require('./_hashClear'),\n hashDelete = require('./_hashDelete'),\n hashGet = require('./_hashGet'),\n hashHas = require('./_hashHas'),\n hashSet = require('./_hashSet');\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\nmodule.exports = Hash;\n","var listCacheClear = require('./_listCacheClear'),\n listCacheDelete = require('./_listCacheDelete'),\n listCacheGet = require('./_listCacheGet'),\n listCacheHas = require('./_listCacheHas'),\n listCacheSet = require('./_listCacheSet');\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\nmodule.exports = ListCache;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map');\n\nmodule.exports = Map;\n","var mapCacheClear = require('./_mapCacheClear'),\n mapCacheDelete = require('./_mapCacheDelete'),\n mapCacheGet = require('./_mapCacheGet'),\n mapCacheHas = require('./_mapCacheHas'),\n mapCacheSet = require('./_mapCacheSet');\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\nmodule.exports = MapCache;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Promise = getNative(root, 'Promise');\n\nmodule.exports = Promise;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Set = getNative(root, 'Set');\n\nmodule.exports = Set;\n","var MapCache = require('./_MapCache'),\n setCacheAdd = require('./_setCacheAdd'),\n setCacheHas = require('./_setCacheHas');\n\n/**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\nfunction SetCache(values) {\n var index = -1,\n length = values == null ? 0 : values.length;\n\n this.__data__ = new MapCache;\n while (++index < length) {\n this.add(values[index]);\n }\n}\n\n// Add methods to `SetCache`.\nSetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\nSetCache.prototype.has = setCacheHas;\n\nmodule.exports = SetCache;\n","var ListCache = require('./_ListCache'),\n stackClear = require('./_stackClear'),\n stackDelete = require('./_stackDelete'),\n stackGet = require('./_stackGet'),\n stackHas = require('./_stackHas'),\n stackSet = require('./_stackSet');\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\nmodule.exports = Stack;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Uint8Array = root.Uint8Array;\n\nmodule.exports = Uint8Array;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar WeakMap = getNative(root, 'WeakMap');\n\nmodule.exports = WeakMap;\n","/**\n * A specialized version of `_.forEach` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\nfunction arrayEach(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (iteratee(array[index], index, array) === false) {\n break;\n }\n }\n return array;\n}\n\nmodule.exports = arrayEach;\n","/**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\nfunction arrayFilter(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result[resIndex++] = value;\n }\n }\n return result;\n}\n\nmodule.exports = arrayFilter;\n","var baseTimes = require('./_baseTimes'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isIndex = require('./_isIndex'),\n isTypedArray = require('./isTypedArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = arrayLikeKeys;\n","/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n}\n\nmodule.exports = arrayPush;\n","/**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\nfunction arraySome(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (predicate(array[index], index, array)) {\n return true;\n }\n }\n return false;\n}\n\nmodule.exports = arraySome;\n","var baseAssignValue = require('./_baseAssignValue'),\n eq = require('./eq');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\nmodule.exports = assignValue;\n","var eq = require('./eq');\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\nmodule.exports = assocIndexOf;\n","var copyObject = require('./_copyObject'),\n keys = require('./keys');\n\n/**\n * The base implementation of `_.assign` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssign(object, source) {\n return object && copyObject(source, keys(source), object);\n}\n\nmodule.exports = baseAssign;\n","var copyObject = require('./_copyObject'),\n keysIn = require('./keysIn');\n\n/**\n * The base implementation of `_.assignIn` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssignIn(object, source) {\n return object && copyObject(source, keysIn(source), object);\n}\n\nmodule.exports = baseAssignIn;\n","var defineProperty = require('./_defineProperty');\n\n/**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction baseAssignValue(object, key, value) {\n if (key == '__proto__' && defineProperty) {\n defineProperty(object, key, {\n 'configurable': true,\n 'enumerable': true,\n 'value': value,\n 'writable': true\n });\n } else {\n object[key] = value;\n }\n}\n\nmodule.exports = baseAssignValue;\n","var Stack = require('./_Stack'),\n arrayEach = require('./_arrayEach'),\n assignValue = require('./_assignValue'),\n baseAssign = require('./_baseAssign'),\n baseAssignIn = require('./_baseAssignIn'),\n cloneBuffer = require('./_cloneBuffer'),\n copyArray = require('./_copyArray'),\n copySymbols = require('./_copySymbols'),\n copySymbolsIn = require('./_copySymbolsIn'),\n getAllKeys = require('./_getAllKeys'),\n getAllKeysIn = require('./_getAllKeysIn'),\n getTag = require('./_getTag'),\n initCloneArray = require('./_initCloneArray'),\n initCloneByTag = require('./_initCloneByTag'),\n initCloneObject = require('./_initCloneObject'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isMap = require('./isMap'),\n isObject = require('./isObject'),\n isSet = require('./isSet'),\n keys = require('./keys'),\n keysIn = require('./keysIn');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_FLAT_FLAG = 2,\n CLONE_SYMBOLS_FLAG = 4;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values supported by `_.clone`. */\nvar cloneableTags = {};\ncloneableTags[argsTag] = cloneableTags[arrayTag] =\ncloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =\ncloneableTags[boolTag] = cloneableTags[dateTag] =\ncloneableTags[float32Tag] = cloneableTags[float64Tag] =\ncloneableTags[int8Tag] = cloneableTags[int16Tag] =\ncloneableTags[int32Tag] = cloneableTags[mapTag] =\ncloneableTags[numberTag] = cloneableTags[objectTag] =\ncloneableTags[regexpTag] = cloneableTags[setTag] =\ncloneableTags[stringTag] = cloneableTags[symbolTag] =\ncloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =\ncloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;\ncloneableTags[errorTag] = cloneableTags[funcTag] =\ncloneableTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.clone` and `_.cloneDeep` which tracks\n * traversed objects.\n *\n * @private\n * @param {*} value The value to clone.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Deep clone\n * 2 - Flatten inherited properties\n * 4 - Clone symbols\n * @param {Function} [customizer] The function to customize cloning.\n * @param {string} [key] The key of `value`.\n * @param {Object} [object] The parent object of `value`.\n * @param {Object} [stack] Tracks traversed objects and their clone counterparts.\n * @returns {*} Returns the cloned value.\n */\nfunction baseClone(value, bitmask, customizer, key, object, stack) {\n var result,\n isDeep = bitmask & CLONE_DEEP_FLAG,\n isFlat = bitmask & CLONE_FLAT_FLAG,\n isFull = bitmask & CLONE_SYMBOLS_FLAG;\n\n if (customizer) {\n result = object ? customizer(value, key, object, stack) : customizer(value);\n }\n if (result !== undefined) {\n return result;\n }\n if (!isObject(value)) {\n return value;\n }\n var isArr = isArray(value);\n if (isArr) {\n result = initCloneArray(value);\n if (!isDeep) {\n return copyArray(value, result);\n }\n } else {\n var tag = getTag(value),\n isFunc = tag == funcTag || tag == genTag;\n\n if (isBuffer(value)) {\n return cloneBuffer(value, isDeep);\n }\n if (tag == objectTag || tag == argsTag || (isFunc && !object)) {\n result = (isFlat || isFunc) ? {} : initCloneObject(value);\n if (!isDeep) {\n return isFlat\n ? copySymbolsIn(value, baseAssignIn(result, value))\n : copySymbols(value, baseAssign(result, value));\n }\n } else {\n if (!cloneableTags[tag]) {\n return object ? value : {};\n }\n result = initCloneByTag(value, tag, isDeep);\n }\n }\n // Check for circular references and return its corresponding clone.\n stack || (stack = new Stack);\n var stacked = stack.get(value);\n if (stacked) {\n return stacked;\n }\n stack.set(value, result);\n\n if (isSet(value)) {\n value.forEach(function(subValue) {\n result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));\n });\n } else if (isMap(value)) {\n value.forEach(function(subValue, key) {\n result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n }\n\n var keysFunc = isFull\n ? (isFlat ? getAllKeysIn : getAllKeys)\n : (isFlat ? keysIn : keys);\n\n var props = isArr ? undefined : keysFunc(value);\n arrayEach(props || value, function(subValue, key) {\n if (props) {\n key = subValue;\n subValue = value[key];\n }\n // Recursively populate clone (susceptible to call stack limits).\n assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n return result;\n}\n\nmodule.exports = baseClone;\n","var isObject = require('./isObject');\n\n/** Built-in value references. */\nvar objectCreate = Object.create;\n\n/**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} proto The object to inherit from.\n * @returns {Object} Returns the new object.\n */\nvar baseCreate = (function() {\n function object() {}\n return function(proto) {\n if (!isObject(proto)) {\n return {};\n }\n if (objectCreate) {\n return objectCreate(proto);\n }\n object.prototype = proto;\n var result = new object;\n object.prototype = undefined;\n return result;\n };\n}());\n\nmodule.exports = baseCreate;\n","var arrayPush = require('./_arrayPush'),\n isArray = require('./isArray');\n\n/**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction baseGetAllKeys(object, keysFunc, symbolsFunc) {\n var result = keysFunc(object);\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n}\n\nmodule.exports = baseGetAllKeys;\n","var Symbol = require('./_Symbol'),\n getRawTag = require('./_getRawTag'),\n objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]';\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\nmodule.exports = baseIsArguments;\n","var baseIsEqualDeep = require('./_baseIsEqualDeep'),\n isObjectLike = require('./isObjectLike');\n\n/**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Unordered comparison\n * 2 - Partial comparison\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\nfunction baseIsEqual(value, other, bitmask, customizer, stack) {\n if (value === other) {\n return true;\n }\n if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\n return value !== value && other !== other;\n }\n return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n}\n\nmodule.exports = baseIsEqual;\n","var Stack = require('./_Stack'),\n equalArrays = require('./_equalArrays'),\n equalByTag = require('./_equalByTag'),\n equalObjects = require('./_equalObjects'),\n getTag = require('./_getTag'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isTypedArray = require('./isTypedArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n var objIsArr = isArray(object),\n othIsArr = isArray(other),\n objTag = objIsArr ? arrayTag : getTag(object),\n othTag = othIsArr ? arrayTag : getTag(other);\n\n objTag = objTag == argsTag ? objectTag : objTag;\n othTag = othTag == argsTag ? objectTag : othTag;\n\n var objIsObj = objTag == objectTag,\n othIsObj = othTag == objectTag,\n isSameTag = objTag == othTag;\n\n if (isSameTag && isBuffer(object)) {\n if (!isBuffer(other)) {\n return false;\n }\n objIsArr = true;\n objIsObj = false;\n }\n if (isSameTag && !objIsObj) {\n stack || (stack = new Stack);\n return (objIsArr || isTypedArray(object))\n ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n }\n if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n if (objIsWrapped || othIsWrapped) {\n var objUnwrapped = objIsWrapped ? object.value() : object,\n othUnwrapped = othIsWrapped ? other.value() : other;\n\n stack || (stack = new Stack);\n return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n }\n }\n if (!isSameTag) {\n return false;\n }\n stack || (stack = new Stack);\n return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n}\n\nmodule.exports = baseIsEqualDeep;\n","var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]';\n\n/**\n * The base implementation of `_.isMap` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n */\nfunction baseIsMap(value) {\n return isObjectLike(value) && getTag(value) == mapTag;\n}\n\nmodule.exports = baseIsMap;\n","var isFunction = require('./isFunction'),\n isMasked = require('./_isMasked'),\n isObject = require('./isObject'),\n toSource = require('./_toSource');\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\nmodule.exports = baseIsNative;\n","var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar setTag = '[object Set]';\n\n/**\n * The base implementation of `_.isSet` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n */\nfunction baseIsSet(value) {\n return isObjectLike(value) && getTag(value) == setTag;\n}\n\nmodule.exports = baseIsSet;\n","var baseGetTag = require('./_baseGetTag'),\n isLength = require('./isLength'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n\nmodule.exports = baseIsTypedArray;\n","var isPrototype = require('./_isPrototype'),\n nativeKeys = require('./_nativeKeys');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeys;\n","var isObject = require('./isObject'),\n isPrototype = require('./_isPrototype'),\n nativeKeysIn = require('./_nativeKeysIn');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeysIn(object) {\n if (!isObject(object)) {\n return nativeKeysIn(object);\n }\n var isProto = isPrototype(object),\n result = [];\n\n for (var key in object) {\n if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeysIn;\n","/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\nmodule.exports = baseTimes;\n","/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n return function(value) {\n return func(value);\n };\n}\n\nmodule.exports = baseUnary;\n","/**\n * Checks if a `cache` value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction cacheHas(cache, key) {\n return cache.has(key);\n}\n\nmodule.exports = cacheHas;\n","var Uint8Array = require('./_Uint8Array');\n\n/**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\nfunction cloneArrayBuffer(arrayBuffer) {\n var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n return result;\n}\n\nmodule.exports = cloneArrayBuffer;\n","var root = require('./_root');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined,\n allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;\n\n/**\n * Creates a clone of `buffer`.\n *\n * @private\n * @param {Buffer} buffer The buffer to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Buffer} Returns the cloned buffer.\n */\nfunction cloneBuffer(buffer, isDeep) {\n if (isDeep) {\n return buffer.slice();\n }\n var length = buffer.length,\n result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\n\n buffer.copy(result);\n return result;\n}\n\nmodule.exports = cloneBuffer;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer');\n\n/**\n * Creates a clone of `dataView`.\n *\n * @private\n * @param {Object} dataView The data view to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned data view.\n */\nfunction cloneDataView(dataView, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;\n return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);\n}\n\nmodule.exports = cloneDataView;\n","/** Used to match `RegExp` flags from their coerced string values. */\nvar reFlags = /\\w*$/;\n\n/**\n * Creates a clone of `regexp`.\n *\n * @private\n * @param {Object} regexp The regexp to clone.\n * @returns {Object} Returns the cloned regexp.\n */\nfunction cloneRegExp(regexp) {\n var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));\n result.lastIndex = regexp.lastIndex;\n return result;\n}\n\nmodule.exports = cloneRegExp;\n","var Symbol = require('./_Symbol');\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * Creates a clone of the `symbol` object.\n *\n * @private\n * @param {Object} symbol The symbol object to clone.\n * @returns {Object} Returns the cloned symbol object.\n */\nfunction cloneSymbol(symbol) {\n return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};\n}\n\nmodule.exports = cloneSymbol;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer');\n\n/**\n * Creates a clone of `typedArray`.\n *\n * @private\n * @param {Object} typedArray The typed array to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned typed array.\n */\nfunction cloneTypedArray(typedArray, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n}\n\nmodule.exports = cloneTypedArray;\n","/**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\nfunction copyArray(source, array) {\n var index = -1,\n length = source.length;\n\n array || (array = Array(length));\n while (++index < length) {\n array[index] = source[index];\n }\n return array;\n}\n\nmodule.exports = copyArray;\n","var assignValue = require('./_assignValue'),\n baseAssignValue = require('./_baseAssignValue');\n\n/**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\nfunction copyObject(source, props, object, customizer) {\n var isNew = !object;\n object || (object = {});\n\n var index = -1,\n length = props.length;\n\n while (++index < length) {\n var key = props[index];\n\n var newValue = customizer\n ? customizer(object[key], source[key], key, object, source)\n : undefined;\n\n if (newValue === undefined) {\n newValue = source[key];\n }\n if (isNew) {\n baseAssignValue(object, key, newValue);\n } else {\n assignValue(object, key, newValue);\n }\n }\n return object;\n}\n\nmodule.exports = copyObject;\n","var copyObject = require('./_copyObject'),\n getSymbols = require('./_getSymbols');\n\n/**\n * Copies own symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbols(source, object) {\n return copyObject(source, getSymbols(source), object);\n}\n\nmodule.exports = copySymbols;\n","var copyObject = require('./_copyObject'),\n getSymbolsIn = require('./_getSymbolsIn');\n\n/**\n * Copies own and inherited symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbolsIn(source, object) {\n return copyObject(source, getSymbolsIn(source), object);\n}\n\nmodule.exports = copySymbolsIn;\n","var root = require('./_root');\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\nmodule.exports = coreJsData;\n","var getNative = require('./_getNative');\n\nvar defineProperty = (function() {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n}());\n\nmodule.exports = defineProperty;\n","var SetCache = require('./_SetCache'),\n arraySome = require('./_arraySome'),\n cacheHas = require('./_cacheHas');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\nfunction equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n arrLength = array.length,\n othLength = other.length;\n\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n return false;\n }\n // Check that cyclic values are equal.\n var arrStacked = stack.get(array);\n var othStacked = stack.get(other);\n if (arrStacked && othStacked) {\n return arrStacked == other && othStacked == array;\n }\n var index = -1,\n result = true,\n seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n stack.set(array, other);\n stack.set(other, array);\n\n // Ignore non-index properties.\n while (++index < arrLength) {\n var arrValue = array[index],\n othValue = other[index];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, arrValue, index, other, array, stack)\n : customizer(arrValue, othValue, index, array, other, stack);\n }\n if (compared !== undefined) {\n if (compared) {\n continue;\n }\n result = false;\n break;\n }\n // Recursively compare arrays (susceptible to call stack limits).\n if (seen) {\n if (!arraySome(other, function(othValue, othIndex) {\n if (!cacheHas(seen, othIndex) &&\n (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n return seen.push(othIndex);\n }\n })) {\n result = false;\n break;\n }\n } else if (!(\n arrValue === othValue ||\n equalFunc(arrValue, othValue, bitmask, customizer, stack)\n )) {\n result = false;\n break;\n }\n }\n stack['delete'](array);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalArrays;\n","var Symbol = require('./_Symbol'),\n Uint8Array = require('./_Uint8Array'),\n eq = require('./eq'),\n equalArrays = require('./_equalArrays'),\n mapToArray = require('./_mapToArray'),\n setToArray = require('./_setToArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]';\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n switch (tag) {\n case dataViewTag:\n if ((object.byteLength != other.byteLength) ||\n (object.byteOffset != other.byteOffset)) {\n return false;\n }\n object = object.buffer;\n other = other.buffer;\n\n case arrayBufferTag:\n if ((object.byteLength != other.byteLength) ||\n !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n return false;\n }\n return true;\n\n case boolTag:\n case dateTag:\n case numberTag:\n // Coerce booleans to `1` or `0` and dates to milliseconds.\n // Invalid dates are coerced to `NaN`.\n return eq(+object, +other);\n\n case errorTag:\n return object.name == other.name && object.message == other.message;\n\n case regexpTag:\n case stringTag:\n // Coerce regexes to strings and treat strings, primitives and objects,\n // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n // for more details.\n return object == (other + '');\n\n case mapTag:\n var convert = mapToArray;\n\n case setTag:\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n convert || (convert = setToArray);\n\n if (object.size != other.size && !isPartial) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked) {\n return stacked == other;\n }\n bitmask |= COMPARE_UNORDERED_FLAG;\n\n // Recursively compare objects (susceptible to call stack limits).\n stack.set(object, other);\n var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n stack['delete'](object);\n return result;\n\n case symbolTag:\n if (symbolValueOf) {\n return symbolValueOf.call(object) == symbolValueOf.call(other);\n }\n }\n return false;\n}\n\nmodule.exports = equalByTag;\n","var getAllKeys = require('./_getAllKeys');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n objProps = getAllKeys(object),\n objLength = objProps.length,\n othProps = getAllKeys(other),\n othLength = othProps.length;\n\n if (objLength != othLength && !isPartial) {\n return false;\n }\n var index = objLength;\n while (index--) {\n var key = objProps[index];\n if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n return false;\n }\n }\n // Check that cyclic values are equal.\n var objStacked = stack.get(object);\n var othStacked = stack.get(other);\n if (objStacked && othStacked) {\n return objStacked == other && othStacked == object;\n }\n var result = true;\n stack.set(object, other);\n stack.set(other, object);\n\n var skipCtor = isPartial;\n while (++index < objLength) {\n key = objProps[index];\n var objValue = object[key],\n othValue = other[key];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, objValue, key, other, object, stack)\n : customizer(objValue, othValue, key, object, other, stack);\n }\n // Recursively compare objects (susceptible to call stack limits).\n if (!(compared === undefined\n ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n : compared\n )) {\n result = false;\n break;\n }\n skipCtor || (skipCtor = key == 'constructor');\n }\n if (result && !skipCtor) {\n var objCtor = object.constructor,\n othCtor = other.constructor;\n\n // Non `Object` object instances with different constructors are not equal.\n if (objCtor != othCtor &&\n ('constructor' in object && 'constructor' in other) &&\n !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n result = false;\n }\n }\n stack['delete'](object);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalObjects;\n","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n","var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbols = require('./_getSymbols'),\n keys = require('./keys');\n\n/**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeys(object) {\n return baseGetAllKeys(object, keys, getSymbols);\n}\n\nmodule.exports = getAllKeys;\n","var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbolsIn = require('./_getSymbolsIn'),\n keysIn = require('./keysIn');\n\n/**\n * Creates an array of own and inherited enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeysIn(object) {\n return baseGetAllKeys(object, keysIn, getSymbolsIn);\n}\n\nmodule.exports = getAllKeysIn;\n","var isKeyable = require('./_isKeyable');\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\nmodule.exports = getMapData;\n","var baseIsNative = require('./_baseIsNative'),\n getValue = require('./_getValue');\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\nmodule.exports = getNative;\n","var overArg = require('./_overArg');\n\n/** Built-in value references. */\nvar getPrototype = overArg(Object.getPrototypeOf, Object);\n\nmodule.exports = getPrototype;\n","var Symbol = require('./_Symbol');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nmodule.exports = getRawTag;\n","var arrayFilter = require('./_arrayFilter'),\n stubArray = require('./stubArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n if (object == null) {\n return [];\n }\n object = Object(object);\n return arrayFilter(nativeGetSymbols(object), function(symbol) {\n return propertyIsEnumerable.call(object, symbol);\n });\n};\n\nmodule.exports = getSymbols;\n","var arrayPush = require('./_arrayPush'),\n getPrototype = require('./_getPrototype'),\n getSymbols = require('./_getSymbols'),\n stubArray = require('./stubArray');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own and inherited enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {\n var result = [];\n while (object) {\n arrayPush(result, getSymbols(object));\n object = getPrototype(object);\n }\n return result;\n};\n\nmodule.exports = getSymbolsIn;\n","var DataView = require('./_DataView'),\n Map = require('./_Map'),\n Promise = require('./_Promise'),\n Set = require('./_Set'),\n WeakMap = require('./_WeakMap'),\n baseGetTag = require('./_baseGetTag'),\n toSource = require('./_toSource');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n setTag = '[object Set]',\n weakMapTag = '[object WeakMap]';\n\nvar dataViewTag = '[object DataView]';\n\n/** Used to detect maps, sets, and weakmaps. */\nvar dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nvar getTag = baseGetTag;\n\n// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\nif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = baseGetTag(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : '';\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n}\n\nmodule.exports = getTag;\n","/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\nmodule.exports = getValue;\n","var nativeCreate = require('./_nativeCreate');\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n}\n\nmodule.exports = hashClear;\n","/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = hashDelete;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\nmodule.exports = hashGet;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\nmodule.exports = hashHas;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\nmodule.exports = hashSet;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Initializes an array clone.\n *\n * @private\n * @param {Array} array The array to clone.\n * @returns {Array} Returns the initialized clone.\n */\nfunction initCloneArray(array) {\n var length = array.length,\n result = new array.constructor(length);\n\n // Add properties assigned by `RegExp#exec`.\n if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {\n result.index = array.index;\n result.input = array.input;\n }\n return result;\n}\n\nmodule.exports = initCloneArray;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer'),\n cloneDataView = require('./_cloneDataView'),\n cloneRegExp = require('./_cloneRegExp'),\n cloneSymbol = require('./_cloneSymbol'),\n cloneTypedArray = require('./_cloneTypedArray');\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/**\n * Initializes an object clone based on its `toStringTag`.\n *\n * **Note:** This function only supports cloning values with tags of\n * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.\n *\n * @private\n * @param {Object} object The object to clone.\n * @param {string} tag The `toStringTag` of the object to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneByTag(object, tag, isDeep) {\n var Ctor = object.constructor;\n switch (tag) {\n case arrayBufferTag:\n return cloneArrayBuffer(object);\n\n case boolTag:\n case dateTag:\n return new Ctor(+object);\n\n case dataViewTag:\n return cloneDataView(object, isDeep);\n\n case float32Tag: case float64Tag:\n case int8Tag: case int16Tag: case int32Tag:\n case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:\n return cloneTypedArray(object, isDeep);\n\n case mapTag:\n return new Ctor;\n\n case numberTag:\n case stringTag:\n return new Ctor(object);\n\n case regexpTag:\n return cloneRegExp(object);\n\n case setTag:\n return new Ctor;\n\n case symbolTag:\n return cloneSymbol(object);\n }\n}\n\nmodule.exports = initCloneByTag;\n","var baseCreate = require('./_baseCreate'),\n getPrototype = require('./_getPrototype'),\n isPrototype = require('./_isPrototype');\n\n/**\n * Initializes an object clone.\n *\n * @private\n * @param {Object} object The object to clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneObject(object) {\n return (typeof object.constructor == 'function' && !isPrototype(object))\n ? baseCreate(getPrototype(object))\n : {};\n}\n\nmodule.exports = initCloneObject;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n var type = typeof value;\n length = length == null ? MAX_SAFE_INTEGER : length;\n\n return !!length &&\n (type == 'number' ||\n (type != 'symbol' && reIsUint.test(value))) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\nmodule.exports = isIndex;\n","/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\nmodule.exports = isKeyable;\n","var coreJsData = require('./_coreJsData');\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\nmodule.exports = isMasked;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\nmodule.exports = isPrototype;\n","/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n}\n\nmodule.exports = listCacheClear;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype;\n\n/** Built-in value references. */\nvar splice = arrayProto.splice;\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n}\n\nmodule.exports = listCacheDelete;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\nmodule.exports = listCacheGet;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\nmodule.exports = listCacheHas;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\nmodule.exports = listCacheSet;\n","var Hash = require('./_Hash'),\n ListCache = require('./_ListCache'),\n Map = require('./_Map');\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\nmodule.exports = mapCacheClear;\n","var getMapData = require('./_getMapData');\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = mapCacheDelete;\n","var getMapData = require('./_getMapData');\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\nmodule.exports = mapCacheGet;\n","var getMapData = require('./_getMapData');\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\nmodule.exports = mapCacheHas;\n","var getMapData = require('./_getMapData');\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n}\n\nmodule.exports = mapCacheSet;\n","/**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\nfunction mapToArray(map) {\n var index = -1,\n result = Array(map.size);\n\n map.forEach(function(value, key) {\n result[++index] = [key, value];\n });\n return result;\n}\n\nmodule.exports = mapToArray;\n","var getNative = require('./_getNative');\n\n/* Built-in method references that are verified to be native. */\nvar nativeCreate = getNative(Object, 'create');\n\nmodule.exports = nativeCreate;\n","var overArg = require('./_overArg');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeKeys = overArg(Object.keys, Object);\n\nmodule.exports = nativeKeys;\n","/**\n * This function is like\n * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * except that it includes inherited enumerable properties.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction nativeKeysIn(object) {\n var result = [];\n if (object != null) {\n for (var key in Object(object)) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = nativeKeysIn;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n try {\n // Use `util.types` for Node.js 10+.\n var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n if (types) {\n return types;\n }\n\n // Legacy `process.binding('util')` for Node.js < 10.\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n}());\n\nmodule.exports = nodeUtil;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n","/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\nmodule.exports = overArg;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n","/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\nfunction setCacheAdd(value) {\n this.__data__.set(value, HASH_UNDEFINED);\n return this;\n}\n\nmodule.exports = setCacheAdd;\n","/**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\nfunction setCacheHas(value) {\n return this.__data__.has(value);\n}\n\nmodule.exports = setCacheHas;\n","/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\nfunction setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n}\n\nmodule.exports = setToArray;\n","var ListCache = require('./_ListCache');\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}\n\nmodule.exports = stackClear;\n","/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n var data = this.__data__,\n result = data['delete'](key);\n\n this.size = data.size;\n return result;\n}\n\nmodule.exports = stackDelete;\n","/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n return this.__data__.get(key);\n}\n\nmodule.exports = stackGet;\n","/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n return this.__data__.has(key);\n}\n\nmodule.exports = stackHas;\n","var ListCache = require('./_ListCache'),\n Map = require('./_Map'),\n MapCache = require('./_MapCache');\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n var data = this.__data__;\n if (data instanceof ListCache) {\n var pairs = data.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n this.size = ++data.size;\n return this;\n }\n data = this.__data__ = new MapCache(pairs);\n }\n data.set(key, value);\n this.size = data.size;\n return this;\n}\n\nmodule.exports = stackSet;\n","/** Used for built-in method references. */\nvar funcProto = Function.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\nmodule.exports = toSource;\n","var baseClone = require('./_baseClone');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_SYMBOLS_FLAG = 4;\n\n/**\n * This method is like `_.clone` except that it recursively clones `value`.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Lang\n * @param {*} value The value to recursively clone.\n * @returns {*} Returns the deep cloned value.\n * @see _.clone\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var deep = _.cloneDeep(objects);\n * console.log(deep[0] === objects[0]);\n * // => false\n */\nfunction cloneDeep(value) {\n return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);\n}\n\nmodule.exports = cloneDeep;\n","/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\nmodule.exports = eq;\n","var baseIsArguments = require('./_baseIsArguments'),\n isObjectLike = require('./isObjectLike');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n};\n\nmodule.exports = isArguments;\n","/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\nmodule.exports = isArray;\n","var isFunction = require('./isFunction'),\n isLength = require('./isLength');\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\nmodule.exports = isArrayLike;\n","var root = require('./_root'),\n stubFalse = require('./stubFalse');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\nmodule.exports = isBuffer;\n","var baseIsEqual = require('./_baseIsEqual');\n\n/**\n * Performs a deep comparison between two values to determine if they are\n * equivalent.\n *\n * **Note:** This method supports comparing arrays, array buffers, booleans,\n * date objects, error objects, maps, numbers, `Object` objects, regexes,\n * sets, strings, symbols, and typed arrays. `Object` objects are compared\n * by their own, not inherited, enumerable properties. Functions and DOM\n * nodes are compared by strict equality, i.e. `===`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.isEqual(object, other);\n * // => true\n *\n * object === other;\n * // => false\n */\nfunction isEqual(value, other) {\n return baseIsEqual(value, other);\n}\n\nmodule.exports = isEqual;\n","var baseGetTag = require('./_baseGetTag'),\n isObject = require('./isObject');\n\n/** `Object#toString` result references. */\nvar asyncTag = '[object AsyncFunction]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n proxyTag = '[object Proxy]';\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\nmodule.exports = isFunction;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\nmodule.exports = isLength;\n","var baseIsMap = require('./_baseIsMap'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsMap = nodeUtil && nodeUtil.isMap;\n\n/**\n * Checks if `value` is classified as a `Map` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n * @example\n *\n * _.isMap(new Map);\n * // => true\n *\n * _.isMap(new WeakMap);\n * // => false\n */\nvar isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;\n\nmodule.exports = isMap;\n","/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n","var baseIsSet = require('./_baseIsSet'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsSet = nodeUtil && nodeUtil.isSet;\n\n/**\n * Checks if `value` is classified as a `Set` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n * @example\n *\n * _.isSet(new Set);\n * // => true\n *\n * _.isSet(new WeakSet);\n * // => false\n */\nvar isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;\n\nmodule.exports = isSet;\n","var baseIsTypedArray = require('./_baseIsTypedArray'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\nmodule.exports = isTypedArray;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeys = require('./_baseKeys'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\nmodule.exports = keys;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeysIn = require('./_baseKeysIn'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\nfunction keysIn(object) {\n return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n}\n\nmodule.exports = keysIn;\n","/**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\nfunction stubArray() {\n return [];\n}\n\nmodule.exports = stubArray;\n","/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n return false;\n}\n\nmodule.exports = stubFalse;\n","// Unique ID creation requires a high quality random # generator. In the browser we therefore\n// require the crypto API and do not support built-in fallback to lower quality random number\n// generators (like Math.random()).\nvar getRandomValues;\nvar rnds8 = new Uint8Array(16);\nexport default function rng() {\n // lazy load so that environments that need to polyfill have a chance to do so\n if (!getRandomValues) {\n // getRandomValues needs to be invoked in a context where \"this\" is a Crypto implementation. Also,\n // find the complete implementation of crypto (msCrypto) on IE11.\n getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto !== 'undefined' && typeof msCrypto.getRandomValues === 'function' && msCrypto.getRandomValues.bind(msCrypto);\n\n if (!getRandomValues) {\n throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');\n }\n }\n\n return getRandomValues(rnds8);\n}","export default /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;","import REGEX from './regex.js';\n\nfunction validate(uuid) {\n return typeof uuid === 'string' && REGEX.test(uuid);\n}\n\nexport default validate;","import validate from './validate.js';\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\n\nvar byteToHex = [];\n\nfor (var i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).substr(1));\n}\n\nfunction stringify(arr) {\n var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n var uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!validate(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n\n return uuid;\n}\n\nexport default stringify;","import rng from './rng.js';\nimport stringify from './stringify.js'; // **`v1()` - Generate time-based UUID**\n//\n// Inspired by https://github.com/LiosK/UUID.js\n// and http://docs.python.org/library/uuid.html\n\nvar _nodeId;\n\nvar _clockseq; // Previous uuid creation time\n\n\nvar _lastMSecs = 0;\nvar _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details\n\nfunction v1(options, buf, offset) {\n var i = buf && offset || 0;\n var b = buf || new Array(16);\n options = options || {};\n var node = options.node || _nodeId;\n var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not\n // specified. We do this lazily to minimize issues related to insufficient\n // system entropy. See #189\n\n if (node == null || clockseq == null) {\n var seedBytes = options.random || (options.rng || rng)();\n\n if (node == null) {\n // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)\n node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]];\n }\n\n if (clockseq == null) {\n // Per 4.2.2, randomize (14 bit) clockseq\n clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;\n }\n } // UUID timestamps are 100 nano-second units since the Gregorian epoch,\n // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so\n // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'\n // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.\n\n\n var msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock\n // cycle to simulate higher resolution clock\n\n var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs)\n\n var dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression\n\n if (dt < 0 && options.clockseq === undefined) {\n clockseq = clockseq + 1 & 0x3fff;\n } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new\n // time interval\n\n\n if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {\n nsecs = 0;\n } // Per 4.2.1.2 Throw error if too many uuids are requested\n\n\n if (nsecs >= 10000) {\n throw new Error(\"uuid.v1(): Can't create more than 10M uuids/sec\");\n }\n\n _lastMSecs = msecs;\n _lastNSecs = nsecs;\n _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch\n\n msecs += 12219292800000; // `time_low`\n\n var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;\n b[i++] = tl >>> 24 & 0xff;\n b[i++] = tl >>> 16 & 0xff;\n b[i++] = tl >>> 8 & 0xff;\n b[i++] = tl & 0xff; // `time_mid`\n\n var tmh = msecs / 0x100000000 * 10000 & 0xfffffff;\n b[i++] = tmh >>> 8 & 0xff;\n b[i++] = tmh & 0xff; // `time_high_and_version`\n\n b[i++] = tmh >>> 24 & 0xf | 0x10; // include version\n\n b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)\n\n b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low`\n\n b[i++] = clockseq & 0xff; // `node`\n\n for (var n = 0; n < 6; ++n) {\n b[i + n] = node[n];\n }\n\n return buf || stringify(b);\n}\n\nexport default v1;","import validate from './validate.js';\n\nfunction parse(uuid) {\n if (!validate(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n var v;\n var arr = new Uint8Array(16); // Parse ########-....-....-....-............\n\n arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24;\n arr[1] = v >>> 16 & 0xff;\n arr[2] = v >>> 8 & 0xff;\n arr[3] = v & 0xff; // Parse ........-####-....-....-............\n\n arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8;\n arr[5] = v & 0xff; // Parse ........-....-####-....-............\n\n arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8;\n arr[7] = v & 0xff; // Parse ........-....-....-####-............\n\n arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8;\n arr[9] = v & 0xff; // Parse ........-....-....-....-############\n // (Use \"/\" to avoid 32-bit truncation when bit-shifting high-order bytes)\n\n arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff;\n arr[11] = v / 0x100000000 & 0xff;\n arr[12] = v >>> 24 & 0xff;\n arr[13] = v >>> 16 & 0xff;\n arr[14] = v >>> 8 & 0xff;\n arr[15] = v & 0xff;\n return arr;\n}\n\nexport default parse;","import stringify from './stringify.js';\nimport parse from './parse.js';\n\nfunction stringToBytes(str) {\n str = unescape(encodeURIComponent(str)); // UTF8 escape\n\n var bytes = [];\n\n for (var i = 0; i < str.length; ++i) {\n bytes.push(str.charCodeAt(i));\n }\n\n return bytes;\n}\n\nexport var DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8';\nexport var URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8';\nexport default function (name, version, hashfunc) {\n function generateUUID(value, namespace, buf, offset) {\n if (typeof value === 'string') {\n value = stringToBytes(value);\n }\n\n if (typeof namespace === 'string') {\n namespace = parse(namespace);\n }\n\n if (namespace.length !== 16) {\n throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)');\n } // Compute hash of namespace and value, Per 4.3\n // Future: Use spread syntax when supported on all platforms, e.g. `bytes =\n // hashfunc([...namespace, ... value])`\n\n\n var bytes = new Uint8Array(16 + value.length);\n bytes.set(namespace);\n bytes.set(value, namespace.length);\n bytes = hashfunc(bytes);\n bytes[6] = bytes[6] & 0x0f | version;\n bytes[8] = bytes[8] & 0x3f | 0x80;\n\n if (buf) {\n offset = offset || 0;\n\n for (var i = 0; i < 16; ++i) {\n buf[offset + i] = bytes[i];\n }\n\n return buf;\n }\n\n return stringify(bytes);\n } // Function#name is not settable on some platforms (#270)\n\n\n try {\n generateUUID.name = name; // eslint-disable-next-line no-empty\n } catch (err) {} // For CommonJS default export support\n\n\n generateUUID.DNS = DNS;\n generateUUID.URL = URL;\n return generateUUID;\n}","/*\n * Browser-compatible JavaScript MD5\n *\n * Modification of JavaScript MD5\n * https://github.com/blueimp/JavaScript-MD5\n *\n * Copyright 2011, Sebastian Tschan\n * https://blueimp.net\n *\n * Licensed under the MIT license:\n * https://opensource.org/licenses/MIT\n *\n * Based on\n * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message\n * Digest Algorithm, as defined in RFC 1321.\n * Version 2.2 Copyright (C) Paul Johnston 1999 - 2009\n * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet\n * Distributed under the BSD License\n * See http://pajhome.org.uk/crypt/md5 for more info.\n */\nfunction md5(bytes) {\n if (typeof bytes === 'string') {\n var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape\n\n bytes = new Uint8Array(msg.length);\n\n for (var i = 0; i < msg.length; ++i) {\n bytes[i] = msg.charCodeAt(i);\n }\n }\n\n return md5ToHexEncodedArray(wordsToMd5(bytesToWords(bytes), bytes.length * 8));\n}\n/*\n * Convert an array of little-endian words to an array of bytes\n */\n\n\nfunction md5ToHexEncodedArray(input) {\n var output = [];\n var length32 = input.length * 32;\n var hexTab = '0123456789abcdef';\n\n for (var i = 0; i < length32; i += 8) {\n var x = input[i >> 5] >>> i % 32 & 0xff;\n var hex = parseInt(hexTab.charAt(x >>> 4 & 0x0f) + hexTab.charAt(x & 0x0f), 16);\n output.push(hex);\n }\n\n return output;\n}\n/**\n * Calculate output length with padding and bit length\n */\n\n\nfunction getOutputLength(inputLength8) {\n return (inputLength8 + 64 >>> 9 << 4) + 14 + 1;\n}\n/*\n * Calculate the MD5 of an array of little-endian words, and a bit length.\n */\n\n\nfunction wordsToMd5(x, len) {\n /* append padding */\n x[len >> 5] |= 0x80 << len % 32;\n x[getOutputLength(len) - 1] = len;\n var a = 1732584193;\n var b = -271733879;\n var c = -1732584194;\n var d = 271733878;\n\n for (var i = 0; i < x.length; i += 16) {\n var olda = a;\n var oldb = b;\n var oldc = c;\n var oldd = d;\n a = md5ff(a, b, c, d, x[i], 7, -680876936);\n d = md5ff(d, a, b, c, x[i + 1], 12, -389564586);\n c = md5ff(c, d, a, b, x[i + 2], 17, 606105819);\n b = md5ff(b, c, d, a, x[i + 3], 22, -1044525330);\n a = md5ff(a, b, c, d, x[i + 4], 7, -176418897);\n d = md5ff(d, a, b, c, x[i + 5], 12, 1200080426);\n c = md5ff(c, d, a, b, x[i + 6], 17, -1473231341);\n b = md5ff(b, c, d, a, x[i + 7], 22, -45705983);\n a = md5ff(a, b, c, d, x[i + 8], 7, 1770035416);\n d = md5ff(d, a, b, c, x[i + 9], 12, -1958414417);\n c = md5ff(c, d, a, b, x[i + 10], 17, -42063);\n b = md5ff(b, c, d, a, x[i + 11], 22, -1990404162);\n a = md5ff(a, b, c, d, x[i + 12], 7, 1804603682);\n d = md5ff(d, a, b, c, x[i + 13], 12, -40341101);\n c = md5ff(c, d, a, b, x[i + 14], 17, -1502002290);\n b = md5ff(b, c, d, a, x[i + 15], 22, 1236535329);\n a = md5gg(a, b, c, d, x[i + 1], 5, -165796510);\n d = md5gg(d, a, b, c, x[i + 6], 9, -1069501632);\n c = md5gg(c, d, a, b, x[i + 11], 14, 643717713);\n b = md5gg(b, c, d, a, x[i], 20, -373897302);\n a = md5gg(a, b, c, d, x[i + 5], 5, -701558691);\n d = md5gg(d, a, b, c, x[i + 10], 9, 38016083);\n c = md5gg(c, d, a, b, x[i + 15], 14, -660478335);\n b = md5gg(b, c, d, a, x[i + 4], 20, -405537848);\n a = md5gg(a, b, c, d, x[i + 9], 5, 568446438);\n d = md5gg(d, a, b, c, x[i + 14], 9, -1019803690);\n c = md5gg(c, d, a, b, x[i + 3], 14, -187363961);\n b = md5gg(b, c, d, a, x[i + 8], 20, 1163531501);\n a = md5gg(a, b, c, d, x[i + 13], 5, -1444681467);\n d = md5gg(d, a, b, c, x[i + 2], 9, -51403784);\n c = md5gg(c, d, a, b, x[i + 7], 14, 1735328473);\n b = md5gg(b, c, d, a, x[i + 12], 20, -1926607734);\n a = md5hh(a, b, c, d, x[i + 5], 4, -378558);\n d = md5hh(d, a, b, c, x[i + 8], 11, -2022574463);\n c = md5hh(c, d, a, b, x[i + 11], 16, 1839030562);\n b = md5hh(b, c, d, a, x[i + 14], 23, -35309556);\n a = md5hh(a, b, c, d, x[i + 1], 4, -1530992060);\n d = md5hh(d, a, b, c, x[i + 4], 11, 1272893353);\n c = md5hh(c, d, a, b, x[i + 7], 16, -155497632);\n b = md5hh(b, c, d, a, x[i + 10], 23, -1094730640);\n a = md5hh(a, b, c, d, x[i + 13], 4, 681279174);\n d = md5hh(d, a, b, c, x[i], 11, -358537222);\n c = md5hh(c, d, a, b, x[i + 3], 16, -722521979);\n b = md5hh(b, c, d, a, x[i + 6], 23, 76029189);\n a = md5hh(a, b, c, d, x[i + 9], 4, -640364487);\n d = md5hh(d, a, b, c, x[i + 12], 11, -421815835);\n c = md5hh(c, d, a, b, x[i + 15], 16, 530742520);\n b = md5hh(b, c, d, a, x[i + 2], 23, -995338651);\n a = md5ii(a, b, c, d, x[i], 6, -198630844);\n d = md5ii(d, a, b, c, x[i + 7], 10, 1126891415);\n c = md5ii(c, d, a, b, x[i + 14], 15, -1416354905);\n b = md5ii(b, c, d, a, x[i + 5], 21, -57434055);\n a = md5ii(a, b, c, d, x[i + 12], 6, 1700485571);\n d = md5ii(d, a, b, c, x[i + 3], 10, -1894986606);\n c = md5ii(c, d, a, b, x[i + 10], 15, -1051523);\n b = md5ii(b, c, d, a, x[i + 1], 21, -2054922799);\n a = md5ii(a, b, c, d, x[i + 8], 6, 1873313359);\n d = md5ii(d, a, b, c, x[i + 15], 10, -30611744);\n c = md5ii(c, d, a, b, x[i + 6], 15, -1560198380);\n b = md5ii(b, c, d, a, x[i + 13], 21, 1309151649);\n a = md5ii(a, b, c, d, x[i + 4], 6, -145523070);\n d = md5ii(d, a, b, c, x[i + 11], 10, -1120210379);\n c = md5ii(c, d, a, b, x[i + 2], 15, 718787259);\n b = md5ii(b, c, d, a, x[i + 9], 21, -343485551);\n a = safeAdd(a, olda);\n b = safeAdd(b, oldb);\n c = safeAdd(c, oldc);\n d = safeAdd(d, oldd);\n }\n\n return [a, b, c, d];\n}\n/*\n * Convert an array bytes to an array of little-endian words\n * Characters >255 have their high-byte silently ignored.\n */\n\n\nfunction bytesToWords(input) {\n if (input.length === 0) {\n return [];\n }\n\n var length8 = input.length * 8;\n var output = new Uint32Array(getOutputLength(length8));\n\n for (var i = 0; i < length8; i += 8) {\n output[i >> 5] |= (input[i / 8] & 0xff) << i % 32;\n }\n\n return output;\n}\n/*\n * Add integers, wrapping at 2^32. This uses 16-bit operations internally\n * to work around bugs in some JS interpreters.\n */\n\n\nfunction safeAdd(x, y) {\n var lsw = (x & 0xffff) + (y & 0xffff);\n var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n return msw << 16 | lsw & 0xffff;\n}\n/*\n * Bitwise rotate a 32-bit number to the left.\n */\n\n\nfunction bitRotateLeft(num, cnt) {\n return num << cnt | num >>> 32 - cnt;\n}\n/*\n * These functions implement the four basic operations the algorithm uses.\n */\n\n\nfunction md5cmn(q, a, b, x, s, t) {\n return safeAdd(bitRotateLeft(safeAdd(safeAdd(a, q), safeAdd(x, t)), s), b);\n}\n\nfunction md5ff(a, b, c, d, x, s, t) {\n return md5cmn(b & c | ~b & d, a, b, x, s, t);\n}\n\nfunction md5gg(a, b, c, d, x, s, t) {\n return md5cmn(b & d | c & ~d, a, b, x, s, t);\n}\n\nfunction md5hh(a, b, c, d, x, s, t) {\n return md5cmn(b ^ c ^ d, a, b, x, s, t);\n}\n\nfunction md5ii(a, b, c, d, x, s, t) {\n return md5cmn(c ^ (b | ~d), a, b, x, s, t);\n}\n\nexport default md5;","import v35 from './v35.js';\nimport md5 from './md5.js';\nvar v3 = v35('v3', 0x30, md5);\nexport default v3;","import rng from './rng.js';\nimport stringify from './stringify.js';\n\nfunction v4(options, buf, offset) {\n options = options || {};\n var rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n offset = offset || 0;\n\n for (var i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n\n return buf;\n }\n\n return stringify(rnds);\n}\n\nexport default v4;","// Adapted from Chris Veness' SHA1 code at\n// http://www.movable-type.co.uk/scripts/sha1.html\nfunction f(s, x, y, z) {\n switch (s) {\n case 0:\n return x & y ^ ~x & z;\n\n case 1:\n return x ^ y ^ z;\n\n case 2:\n return x & y ^ x & z ^ y & z;\n\n case 3:\n return x ^ y ^ z;\n }\n}\n\nfunction ROTL(x, n) {\n return x << n | x >>> 32 - n;\n}\n\nfunction sha1(bytes) {\n var K = [0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xca62c1d6];\n var H = [0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0];\n\n if (typeof bytes === 'string') {\n var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape\n\n bytes = [];\n\n for (var i = 0; i < msg.length; ++i) {\n bytes.push(msg.charCodeAt(i));\n }\n } else if (!Array.isArray(bytes)) {\n // Convert Array-like to Array\n bytes = Array.prototype.slice.call(bytes);\n }\n\n bytes.push(0x80);\n var l = bytes.length / 4 + 2;\n var N = Math.ceil(l / 16);\n var M = new Array(N);\n\n for (var _i = 0; _i < N; ++_i) {\n var arr = new Uint32Array(16);\n\n for (var j = 0; j < 16; ++j) {\n arr[j] = bytes[_i * 64 + j * 4] << 24 | bytes[_i * 64 + j * 4 + 1] << 16 | bytes[_i * 64 + j * 4 + 2] << 8 | bytes[_i * 64 + j * 4 + 3];\n }\n\n M[_i] = arr;\n }\n\n M[N - 1][14] = (bytes.length - 1) * 8 / Math.pow(2, 32);\n M[N - 1][14] = Math.floor(M[N - 1][14]);\n M[N - 1][15] = (bytes.length - 1) * 8 & 0xffffffff;\n\n for (var _i2 = 0; _i2 < N; ++_i2) {\n var W = new Uint32Array(80);\n\n for (var t = 0; t < 16; ++t) {\n W[t] = M[_i2][t];\n }\n\n for (var _t = 16; _t < 80; ++_t) {\n W[_t] = ROTL(W[_t - 3] ^ W[_t - 8] ^ W[_t - 14] ^ W[_t - 16], 1);\n }\n\n var a = H[0];\n var b = H[1];\n var c = H[2];\n var d = H[3];\n var e = H[4];\n\n for (var _t2 = 0; _t2 < 80; ++_t2) {\n var s = Math.floor(_t2 / 20);\n var T = ROTL(a, 5) + f(s, b, c, d) + e + K[s] + W[_t2] >>> 0;\n e = d;\n d = c;\n c = ROTL(b, 30) >>> 0;\n b = a;\n a = T;\n }\n\n H[0] = H[0] + a >>> 0;\n H[1] = H[1] + b >>> 0;\n H[2] = H[2] + c >>> 0;\n H[3] = H[3] + d >>> 0;\n H[4] = H[4] + e >>> 0;\n }\n\n return [H[0] >> 24 & 0xff, H[0] >> 16 & 0xff, H[0] >> 8 & 0xff, H[0] & 0xff, H[1] >> 24 & 0xff, H[1] >> 16 & 0xff, H[1] >> 8 & 0xff, H[1] & 0xff, H[2] >> 24 & 0xff, H[2] >> 16 & 0xff, H[2] >> 8 & 0xff, H[2] & 0xff, H[3] >> 24 & 0xff, H[3] >> 16 & 0xff, H[3] >> 8 & 0xff, H[3] & 0xff, H[4] >> 24 & 0xff, H[4] >> 16 & 0xff, H[4] >> 8 & 0xff, H[4] & 0xff];\n}\n\nexport default sha1;","import v35 from './v35.js';\nimport sha1 from './sha1.js';\nvar v5 = v35('v5', 0x50, sha1);\nexport default v5;","export default '00000000-0000-0000-0000-000000000000';","import validate from './validate.js';\n\nfunction version(uuid) {\n if (!validate(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n return parseInt(uuid.substr(14, 1), 16);\n}\n\nexport default version;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = (module) => {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","import { connect, type ConnectConfig } from \"@openfin/core-web\";\nimport type {\n\tAPIOptions,\n\tClientOptions,\n\tConnectOptionsRequestContext,\n\tDefaultAPIContainerShape,\n\tDefaultFDC3Type,\n\tDefaultFinType,\n\tRequestConnectOptions\n} from \"./client-shapes\";\n\nconst DEFAULT_LOGGER = {\n\terror: console.error,\n\twarn: console.warn,\n\tinfo: console.info\n};\n\nconst DEFAULT_CONNECT_OPTIONS: ConnectConfig = {\n\tconnectionInheritance: \"enabled\"\n};\n\nconst DEFAULT_OPTIONS: APIOptions = {\n\tfin: true,\n\tfdc3: true,\n\tfdc3Version: \"2.0\"\n};\n\n/**\n * Requests the connection options from the parent window.\n * @param options - The options to use when requesting the connection options.\n * @returns A promise that resolves with the connection options.\n */\nasync function requestConnectOptions(options: RequestConnectOptions): Promise {\n\treturn new Promise((resolve, reject) => {\n\t\tconst requestContext: ConnectOptionsRequestContext = {\n\t\t\ttype: \"openfin.coreWeb.connectConfig\"\n\t\t};\n\t\tconst timer = setTimeout(() => {\n\t\t\treject(new Error(\"Timed out waiting for connection options.\"));\n\t\t}, options.timeout ?? 3000);\n\t\t/**\n\t\t * Handles the message event and resolves the promise with the connection options.\n\t\t * @param event - The message event.\n\t\t */\n\t\tasync function messageHandler(event: MessageEvent): Promise {\n\t\t\tif (Array.isArray(options.receivingOrigin) && !options.receivingOrigin.includes(event.origin)) {\n\t\t\t\treject(new Error(`Received message from unexpected origin: ${event.origin}`));\n\t\t\t} else if (event.data && event.data.type === \"openfin.coreWeb.connectConfig\") {\n\t\t\t\twindow.removeEventListener(\"message\", messageHandler);\n\t\t\t\tconst connectConfig = event.data.connectConfig;\n\t\t\t\tif (connectConfig === undefined) {\n\t\t\t\t\treject(new Error(\"No connection options were provided.\"));\n\t\t\t\t} else {\n\t\t\t\t\tclearTimeout(timer);\n\t\t\t\t\tresolve(connectConfig);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\twindow.addEventListener(\"message\", messageHandler);\n\t\tlet target = window.top ?? window.parent;\n\t\tif (options.target === \"parent\") {\n\t\t\ttarget = window.parent;\n\t\t}\n\t\ttarget.postMessage(requestContext, options.targetOrigin ?? \"*\");\n\t});\n}\n\n/**\n * Initializes (if required) and returns the fin and fdc3 API objects based on the options provided.\n * @param options - The options to use when initializing the API objects.\n * @returns A promise that resolves with the fin and fdc3 API objects.\n */\nexport async function getAPI(\n\toptions: ClientOptions\n): Promise> {\n\tconst response: DefaultAPIContainerShape = {};\n\tlet finInitialized = false;\n\tlet fdc3Initialized = false;\n\n\tif (options.api === undefined) {\n\t\toptions.api = DEFAULT_OPTIONS;\n\t}\n\tif (options.logger === undefined) {\n\t\toptions.logger = DEFAULT_LOGGER;\n\t}\n\tif (options.api.fin) {\n\t\tif (\n\t\t\ttypeof window !== \"undefined\" &&\n\t\t\ttypeof (window as unknown as { fin: DefaultFinType }).fin === \"object\"\n\t\t) {\n\t\t\toptions.logger.info(\n\t\t\t\t\"Fin API instance already exists. Using the reference that exists in the window object.\"\n\t\t\t);\n\t\t\tresponse.fin = (window as unknown as { fin: DefaultFinType }).fin;\n\t\t} else {\n\t\t\tlet newFin: DefaultFinType | undefined;\n\t\t\ttry {\n\t\t\t\toptions.logger.info(\n\t\t\t\t\t`Creating Fin API instance through @openfin/core-web connect using the following options. \n\t\t\t\t\tConnect Options: \n\t\t\t\t\t${JSON.stringify(options.connectOptions)} \n\t\t\t\t\tRequest Connect Options:\n\t\t\t\t\t${JSON.stringify(options.requestConnectOptions)}`\n\t\t\t\t);\n\t\t\t\tif (options.connectOptions !== undefined) {\n\t\t\t\t\toptions.logger.info(\"Creating Fin API instance using the connect options provided.\");\n\t\t\t\t\tnewFin = (await connect(options.connectOptions)) as unknown as DefaultFinType;\n\t\t\t\t} else if (\n\t\t\t\t\toptions.requestConnectOptions !== undefined &&\n\t\t\t\t\toptions.requestConnectOptions.strategy === \"request\"\n\t\t\t\t) {\n\t\t\t\t\tconst connectConfig = await requestConnectOptions(options.requestConnectOptions);\n\t\t\t\t\toptions.logger.info(\"Creating Fin API instance using the request connect options provided.\");\n\t\t\t\t\tnewFin = (await connect(connectConfig)) as unknown as DefaultFinType;\n\t\t\t\t} else {\n\t\t\t\t\toptions.logger.info(\"Creating Fin API instance using the default connect options.\");\n\t\t\t\t\tnewFin = (await connect(DEFAULT_CONNECT_OPTIONS)) as unknown as DefaultFinType;\n\t\t\t\t}\n\t\t\t} catch (err) {\n\t\t\t\tif (\n\t\t\t\t\terr instanceof Error &&\n\t\t\t\t\terr.message.includes(\"Broker URL was not specified nor provided by a platform container\") &&\n\t\t\t\t\toptions.requestConnectOptions?.strategy === \"request-on-failure\"\n\t\t\t\t) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tconst requestedConnectConfig = await requestConnectOptions(options.requestConnectOptions);\n\t\t\t\t\t\toptions.logger.info(\n\t\t\t\t\t\t\t\"As the broker url was not specified nor provided by a platform provider and request-on-failure was specified as the requestConnectOptions strategy we will try to connect again using this strategy to see if it is supported by the platform.\"\n\t\t\t\t\t\t);\n\t\t\t\t\t\tnewFin = (await connect(requestedConnectConfig)) as unknown as DefaultFinType;\n\t\t\t\t\t} catch (requestError) {\n\t\t\t\t\t\toptions.logger.error(\n\t\t\t\t\t\t\t`Error creating Fin API instance through @openfin/core-web connect using the following using the request-on-failure strategy and the following options: \n\t\t\t\t\t\t\tConnect Options: \n\t\t\t\t\t\t\t${JSON.stringify(options.connectOptions)} \n\t\t\t\t\t\t\tRequest Connect Options:\n\t\t\t\t\t\t\t${JSON.stringify(options.requestConnectOptions)}`,\n\t\t\t\t\t\t\trequestError as Error\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\toptions.logger.error(\n\t\t\t\t\t\t`Error creating Fin API instance through @openfin/core-web connect using the following options: \n\t\t\t\t\t\tConnect Options: \n\t\t\t\t\t\t${JSON.stringify(options.connectOptions)} \n\t\t\t\t\t\tRequest Connect Options:\n\t\t\t\t\t\t${JSON.stringify(options.requestConnectOptions)}`,\n\t\t\t\t\t\terr as Error\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (newFin === undefined) {\n\t\t\t\tthrow new Error(\"Failed to create a fin API instance.\");\n\t\t\t}\n\t\t\tresponse.fin = newFin;\n\t\t\tfinInitialized = true;\n\t\t}\n\t}\n\n\tif (options.api.fdc3) {\n\t\tif (typeof window !== \"undefined\" && typeof (window as unknown as { fdc3: FDC3 }).fdc3 === \"object\") {\n\t\t\toptions.logger.info(\n\t\t\t\t\"fdc3 API instance already exists. Using the reference that exists in the window object.\"\n\t\t\t);\n\t\t\tresponse.fdc3 = (window as unknown as { fdc3: FDC3 }).fdc3;\n\t\t} else if (response.fin?.me?.interop?.getFDC3 !== undefined) {\n\t\t\tconst fdc3Version = options.api.fdc3Version ?? \"2.0\";\n\t\t\ttry {\n\t\t\t\toptions.logger.info(\n\t\t\t\t\t`Creating fdc3 API through the @openfin/core-web getFDC3 function specifying version ${fdc3Version}.`\n\t\t\t\t);\n\t\t\t\tresponse.fdc3 = (await response.fin.me.interop.getFDC3(fdc3Version)) as FDC3;\n\t\t\t\tfdc3Initialized = true;\n\t\t\t} catch (err) {\n\t\t\t\toptions.logger.error(\n\t\t\t\t\t`Error creating fdc3 API through the @openfin/core-web getFDC3 function specifying version ${fdc3Version}.`,\n\t\t\t\t\terr as Error\n\t\t\t\t);\n\t\t\t}\n\t\t} else {\n\t\t\toptions.logger.error(\n\t\t\t\t\"Creating an fdc3 API through the @openfin/core-web getFDC3 function isn't possible without the @openfin/core-web fin api being available. If you are running inside of a container please enable FDC3 for your view/window.\"\n\t\t\t);\n\t\t}\n\t}\n\n\tif (options.target !== undefined) {\n\t\tconst targetIsWindow = (options.target as unknown) === window;\n\t\tif (response.fin !== undefined) {\n\t\t\toptions.target.fin = response.fin;\n\n\t\t\tif (targetIsWindow && finInitialized) {\n\t\t\t\t// Create and dispatch the finReady event\n\t\t\t\tconst event = new CustomEvent(\"finReady\");\n\t\t\t\twindow.dispatchEvent(event);\n\t\t\t}\n\t\t}\n\t\tif (response.fdc3 !== undefined) {\n\t\t\toptions.target.fdc3 = response.fdc3;\n\t\t\tif (targetIsWindow && fdc3Initialized) {\n\t\t\t\t// Create and dispatch the FDC3Ready event\n\t\t\t\tconst event = new CustomEvent(\"fdc3Ready\");\n\t\t\t\twindow.dispatchEvent(event);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn response;\n}\n"],"names":["e","exports","connect","t","n","i","r","o","btoa","JSON","stringify","s","globalThis","window","g","self","a","c","d","h","async","l","push","Object","defineProperty","value","promiseMapSerial","serial","promiseMap","promisify","Promise","all","map","u","p","__classPrivateFieldSet","TypeError","has","call","set","w","__classPrivateFieldGet","get","Reply","EmitterBase","Base","y","f","constructor","this","isNodeEnvironment","wire","environment","type","isOpenFinEnvironment","isBrowserEnvironment","fin","getFin","me","super","topic","eventNames","hasEmitter","getOrCreateEmitter","emit","eventAggregator","getOrCreate","listeners","listenerCount","registerEventListener","identity","timestamp","Date","now","sendAction","deleteEmitterIfNothingRegistered","deregisterEventListener","catch","resolve","on","removeListener","addListener","once","prependListener","prependOnceListener","deregisterAllListeners","removeAllListeners","length","delete","WeakMap","m","RuntimeError","NotSupportedError","NotImplementedError","NoAckError","DuplicateCorrelationError","UnexpectedActionError","DisconnectedError","v","Error","readyState","C","b","I","E","x","A","message","name","stack","toString","keys","forEach","P","getCallSite","stackTraceLimit","prepareStackTrace","slice","reason","error","cause","M","_","O","validateIdentity","uuid","$","S","R","F","j","k","L","T","handleDeprecatedWarnings","contentNavigation","whitelist","blacklist","contentRedirect","console","warn","B","G","AsyncRetryableLazy","W","Lazy","producerFn","getValue","promise","H","WebContents","N","D","entityType","capturePage","options","then","payload","data","executeJavaScript","code","getZoomLevel","setZoomLevel","level","navigate","url","navigateBack","navigateForward","stopNavigation","reload","ignoreCache","print","findInPage","searchTerm","stopFindInPage","action","getPrinters","focus","emitSynthFocused","showDeveloperTools","getProcessInfo","getSharedWorkers","inspectSharedWorker","inspectSharedWorkerById","workerId","inspectServiceWorker","showPopupWindow","onPopupReady","popupName","Window","wrapSync","hasResultCallback","onPopupResult","hasReadyCallback","willOpen","create","initialOptions","result","U","V","z","K","q","J","__createBinding","getOwnPropertyDescriptor","__esModule","writable","configurable","enumerable","__exportStar","prototype","hasOwnProperty","ViewModule","childViews","createChildContent","wrap","View","getCurrent","isView","getCurrentSync","ie","Platform","getClient","attach","target","destroy","show","showAt","bounds","bringToFront","hide","setBounds","getBounds","getInfo","getParentLayout","Layout","getLayoutByViewIdentity","getOptions","updateOptions","getCurrentWindow","_Window","getCurrentStack","getStackByViewIdentity","triggerBeforeUnload","bindToElement","observeBounds","focusedWebViewWasChanged","Y","Application","windowListFromIdentityList","isRunning","quit","_close","force","some","includes","close","getChildWindows","getManifest","getParentUuid","getShortcuts","getViews","getWindow","registerUser","userName","appName","removeTrayIcon","restart","run","_run","manifestUrl","_manifestUrl","opts","scheduleRestart","sendApplicationLog","setJumpList","config","setTrayIcon","enabledIcon","setShortcuts","setShortcutQueryParams","setAppLogUsername","getTrayIconInfo","hasTrayIcon","terminate","wait","setFileDownloadLocation","downloadLocation","getFileDownloadLocation","showTrayIconPopupMenu","closeTrayIconPopupMenu","Z","ApplicationModule","_create","waitForPageLoad","autoShow","isPlatformController","start","startManyManifests","applications","startFromManifest","_createFromManifest","createFromManifest","platform","startup_app","X","ee","te","Q","ne","createWindow","promisifySubscription","success","httpResponseCode","apiInjected","networkErrorCode","cbPayload","getWebWindow","__internal_","openerSuccessCBCalled","reject","getAllFrames","center","blur","animate","transitions","setPrototypeOf","getNativeId","getCurrentViews","disableFrame","disableUserMovement","enableFrame","enableUserMovement","flash","stopFlashing","getLayout","layout","layoutSnapshot","getParentApplication","getParentWindow","getSnapshot","area","getState","isMainWindow","isShowing","maximize","minimize","moveBy","deltaLeft","deltaTop","positioningOptions","moveTo","left","top","resizeBy","deltaWidth","Math","floor","deltaHeight","anchor","resizeTo","width","height","restore","setAsForeground","authenticate","password","showPopupMenu","closePopupMenu","dispatchPopupResult","content","_WindowModule","isWindow","clearTimeout","setTimeout","finally","System","re","oe","se","ae","ce","sendExternalProcessRequest","listener","processUuid","exitCode","getVersion","clearCache","deleteCacheOnExit","exit","fetchManifest","flushCookieStore","getAllWindows","getAllApplications","getCommandLineArguments","getCrashReporterState","diagnosticMode","diagnosticsMode","startCrashReporter","getUniqueUserId","getEntityInfo","getEnvironmentVariable","environmentVariables","getFocusedWindow","isAppCertified","certifiedInfo","getInstalledRuntimes","runtimes","getInstalledApps","installedApps","getLog","getMachineId","getMinLogLevel","getLogList","getMonitorInfo","getMousePosition","getProcessList","getAllProcessInfo","getProxySettings","getRuntimeInfo","getRvmInfo","getHostSpecs","getOSInfo","launchExternalProcess","monitorExternalProcess","log","openUrlWithBrowser","registerCustomProtocol","unregisterCustomProtocol","protocolName","getCustomProtocolState","releaseExternalProcess","terminateExternalProcess","updateProxySettings","downloadAsset","getNextMessageId","downloadedBytes","totalBytes","err","assign","downloadId","downloadRuntime","downloadPreloadScripts","scripts","getAllExternalApplications","getAppAssetInfo","getCookies","getUrl","setMinLogLevel","resolveUuid","entityKey","executeOnRemote","requestingIdentity","ferryAction","readRegistryValue","rootKey","subkey","registerExternalConnection","getServiceConfiguration","getSystemAppConfig","registerShutdownHandler","proceed","raiseEvent","runRvmHealthCheck","launchManifest","subscribe","EventEmitter","appVersionId","find","manifest","queryPermissionForCurrentContext","apiName","enableNativeWindowIntegrationProvider","permissions","registerUsage","updateProcessLoggingOptions","getDomainSettings","setDomainSettings","domainSettings","refreshExtensions","getInstalledExtensions","de","he","RefCounter","topicRefMap","Map","incRefCount","decRefCount","actOnFirst","actOnLast","le","ue","pe","ChannelBase","ProtectedItems","we","providerIdentity","ye","defaultAction","subscriptions","processAction","preAction","postAction","errorMiddleware","beforeAction","onError","afterAction","remove","setDefaultAction","register","fe","ge","ve","Ce","ChannelClient","be","Ie","Ee","closeChannelByEndpointId","handleProviderDisconnect","values","channelId","disconnectListener","endpointId","receive","dispatch","isEndpointConnected","send","onDisconnection","disconnect","sendDisconnectAction","wireClose","channelName","xe","Ae","exhaustiveCheck","join","Pe","Me","_e","Oe","Se","Re","ClassicInfo","ClassicStrategy","messageReceiver","isLocalEndpointId","add","removeEndpoint","closeEndpoint","onEndpointDisconnect","addEndpoint","cancel","endpointIdentity","Set","isValidEndpointPayload","version","minimumVersion","Fe","je","ke","errorToPOJO","Le","Te","$e","Be","RTCEndpoint","Ge","rtc","responseMap","connectionStateChangeHandler","rtcClient","connectionState","removeEventListener","random","channels","request","messageId","response","addEventListener","ArrayBuffer","TextDecoder","decode","parse","onclose","onDisconnect","connected","We","He","Ne","De","Ue","Ve","EndpointStrategy","EndpointType","StrategyName","getEndpointById","RTCInfo","RTCStrategy","ze","Ke","qe","Je","RTCICEManager","Ye","Ze","ensureChannelOpened","createDataChannelPromise","channel","label","listenForProviderIce","createProviderEventName","raiseProviderIce","createRouteString","listenForClientIce","createClientEventName","raiseClientIce","cleanupIceListeners","createRtcPeer","getRtcPeer","startClientOffer","candidate","toJSON","addIceCandidate","createDataChannel","createOffer","setLocalDescription","offer","rtcConnectionId","channelsOpened","finishClientOffer","setRemoteDescription","createProviderAnswer","createAnswer","answer","Qe","Xe","et","split","reverse","entries","reduce","tt","nt","runtimeUuidMeetsMinimumRuntimeVersion","parseRuntimeUuid","meetsMinimumRuntimeVersion","it","rt","ot","st","at","ct","dt","ChannelProvider","ht","lt","ut","connections","handleClientDisconnection","filter","setProviderRemoval","removalMap","clientIsMultiRuntime","runtimeUuid","handleMultiRuntimeLegacyClient","checkForClientConnection","connectListener","getEndpointIdForOpenFinId","processConnection","publish","onConnection","getAllClientInfo","connectionUrl","isClientConnected","clientIdentityIncludesEndpointId","isLegacyClientConnected","pop","pt","MessageReceiver","wt","yt","ft","onmessage","processChannelMessage","endpointMap","latestEndpointIdByChannelId","registerMessageHandler","bind","senderIdentity","ackToSender","intendedTargetIdentity","sendRaw","checkForPreviousClientConnection","gt","ProtocolManager","ProtocolsInPreferenceOrder","DefaultClientProtocols","DefaultProviderProtocols","getClientProtocols","getProviderProtocols","getCompatibleProtocols","supportedProtocols","maxProtocols","mt","vt","combine","primary","secondary","default","Ct","bt","It","Et","xt","__importDefault","ConnectionManager","At","Pt","Mt","_t","Ot","St","Rt","Ft","jt","kt","getProtocolOptionsFromStrings","removeChannelFromProviderMap","providerMap","processChannelConnection","protocolManager","createProvider","getDefaultChannelOptions","protocols","provider","strategy","createClientOffer","createClientStrategy","clientIdentity","endpointPayloadPromise","Lt","Tt","$t","Bt","Gt","Channel","Wt","Ht","Nt","Dt","Ut","Vt","zt","min","Kt","getAllChannels","onChannelConnect","onChannelDisconnect","safeConnect","count","gotConnectedEvent","race","retryInfo","originalMessageId","isFrame","InterAppPayload","InterApplicationBus","qt","Jt","Yt","Zt","Qt","Xt","events","subscriberAdded","subscriberRemoved","refCounter","emitter","sourceWindowName","destinationUuid","destinationWindowName","createSubscriptionKey","sourceUuid","unsubscribe","processMessage","emitSubscriverEvent","targetName","Buffer","from","en","Clipboard","tn","nn","writeText","readText","writeImage","readImage","format","writeHtml","readHtml","writeRtf","readRtf","write","getAvailableFormats","rn","sn","ExternalApplication","an","cn","ExternalApplicationModule","dn","hn","ln","un","pn","wn","_Frame","yn","fn","_FrameModule","gn","mn","vn","Cn","getCurrentEntityIdentity","bn","GlobalHotkey","In","En","hotkey","unregister","unregisterAll","isRegistered","xn","An","Pn","Mn","_n","On","Sn","Rn","Fn","_channel","launchLegacyManifest","launchContentManifest","createView","targetView","closeView","view","reparentView","getViewSnapshot","viewIdentity","applySnapshot","windows","snapshot","setWindowContext","context","getWindowContext","closeWindow","skipBeforeUnload","windowId","jn","kn","Ln","Tn","$n","overrideFromComposables","isValidPresetType","reduceRight","Bn","Gn","Wn","ApiConsumer","consume","getExposedFunctions","key","createFunction","Hn","Nn","expose","getExposedProperties","Dn","Symbol","descriptor","ApiExposer","Un","exposeInstance","exposeFunction","meta","exposeMeta","Vn","zn","Kn","ChannelsConsumer","id","props","args","qn","ChannelsExposer","channelProviderOrClient","Jn","createRelayedDispatch","relayChannelClientApi_1","relayChannelClientApi","Yn","Zn","Qn","Xn","ei","ti","ColumnOrRow","TabStack","LayoutNode","ni","ii","ri","isRoot","entityId","exists","getParent","getEntity","createAdjacentStack","getAdjacentStacks","targetId","edge","newLayoutEntitiesClient","si","oi","getStackViews","addView","index","addViewToStack","removeView","removeViewFromStack","setActiveView","setStackActiveView","getContent","ai","DEFAULT_LAYOUT_KEY","LAYOUT_CONTROLLER_ID","ci","di","hi","li","ui","pi","wi","yi","fi","gi","mi","replace","replaceView","viewToReplace","newView","applyPreset","presetType","init","getConfig","getRootItem","getRoot","getStackByView","location","viewOptions","WeakSet","vi","Ci","bi","Ii","Ei","xi","Ai","LayoutModule","Pi","Mi","_i","Oi","arguments","layoutAllowedInContext","initLayoutManager","applyLayoutSnapshot","layoutManagerOverride","layoutName","Proxy","layoutManager","getCurrentLayoutManagerSync","createLayout","destroyLayout","getViewWindowIdentity","getLayoutIdentityForViewOrThrow","PlatformModule","Si","Ri","Fi","ji","isPlatform","initPlatform","ki","getMe","getBaseMe","environmentUnsupportedMessage","isExternal","setContext","addContextHandler","getContextGroups","joinContextGroup","removeFromContextGroup","getAllClientsInContextGroup","getInfoForContextGroup","interop","isOpenFin","Li","Ti","$i","createWarningObject","createUnusableObject","apply","construct","deleteProperty","getPrototypeOf","isExtensible","ownKeys","preventExtensions","Reflect","Bi","Gi","Wi","Hi","wrapIntentHandler","BROKER_ERRORS","generateOverrideWarning","generateOverrideError","wrapContextHandler","wrapInTryCatch","generateId","fireIntent","fireIntentForContext","getInfoForIntent","getInfoForIntentsByContext","joinSessionContextGroupWithJoinContextGroup","fdc3Open","fdc3FindInstances","fdc3GetAppMetadata","fdc3GetInfo","Ni","Di","Ui","Vi","InteropBroker","Cr","lastContext","contextGroupMap","clients","registerListeners","getCurrentContext","handlerAdded","handlerRemoved","checkContextIntegrity","isValid","getClientState","Array","contextHandlers","globalHandler","handlerId","contextType","indexOf","splice","registerNewClient","PrivateChannelProvider","contextByContextType","handleClientDisconnecting","broadcast","contextHandlerAdded","contextHandlerRemoved","nonStandardHandlerRemoved","onAddContextHandlerAdded","onDisconnectHandlerAdded","onUnsubscribeHandlerAdded","handlerIdsByContextTypes","onAddContextListenerHandlerId","getConnectedClients","onUnsubscribeHandlerId","onDisconnectHandlerId","removeClient","clear","fireOnDisconnectForOtherClients","unsubscribeAll","flat","displayMetadata","color","getProvider","interopClients","contextGroupsById","contextGroups","fdc3Info","logging","intentClientMap","lastContextMap","sessionContextGroupMap","setContextGroupMap","setupChannelProvider","createClosedConstructor","contextGroupId","setContextForGroup","isContextTypeCompatible","invokeContextHandler","hasEndpointId","addClientToContextGroup","setCurrentContextGroupInClientOptions","removeClientFromContextGroup","handleFiredIntent","setIntentTarget","pendingIntents","isReady","invokeIntentHandler","handleInfoForIntent","handleInfoForIntentsByContext","handleFiredIntentForContext","clientDisconnected","fdc3HandleOpen","app","fdc3HandleFindInstances","fdc3HandleGetAppMetadata","fdc3HandleGetInfo","fdc3Version","optionalFeatures","OriginatingAppMetadata","UserChannelMembershipAPIs","appMetadata","appId","instanceId","decorateSnapshot","interopSnapshotDetails","contextGroupStates","getContextGroupStates","closeExistingWindows","updateExistingClients","rehydrateContextGroupStates","toObject","contextHandlerRegistered","intentHandlerRegistered","removeContextHandler","handleJoinSessionContextGroup","sessionContextGroupId","hasConflict","fromEntries","currentContextGroup","wireChannel","isConnectionAuthorized","isActionAuthorized","enabled","zi","Ki","qi","Ji","Yi","Zi","Qi","Xi","createUnsubscribeCb","getUserInstance","er","tr","nr","ir","rr","or","__setModuleDefault","sr","__importStar","PrivateChannelClient","ar","cr","dr","hr","FDC3ModuleBase","wr","client","_open","InteropClient","ferryFdc3Call","_getChannels","getUnsupportedChannelApis","getOrCreateChannel","joinSessionContextGroup","buildAppChannelObject","ChannelError","CreationFailed","getSystemChannels","joinChannel","startsWith","NoChannelFound","AccessDenied","getCurrentChannel","getCurrentContextGroupInfo","buildChannelObject","leaveCurrentChannel","findIndex","addContextListener","createContextUnsubscribeCb","createNonStandardUnsubscribeCb","onAddContextListener","onUnsubscribe","cleanUpAllSubs","getIntentResolution","isChannel","isContext","connectPrivateChannel","buildPrivateChannelObject","ResultError","UnsupportedChannelApiError","NoResultReturned","IntentHandlerRejected","intentResolutionResultId","metadata","source","intent","getResult","lr","ur","pr","Fdc3Module","open","addIntentListener","registerIntentHandler","raiseIntent","findIntent","findIntentsByContext","raiseIntentForContext","providerVersion","getAdapterVersionSync","Fdc3Module2","findInstances","getAppMetadata","contextMetadata","resultType","createPrivateChannel","getUserChannels","joinUserChannel","brokerName","getFDC3Sync","getFDC3","yr","fr","gr","mr","vr","overrideCheck","checkFDC32Overrides","getDefaultViewFdc3VersionFromAppInfo","defaultViewOptions","fdc3InteropApi","InteropModule","getInteropInfo","isArray","connectSync","whenReady","br","Ir","Er","xr","getSnapshotSourceChannelName","Ar","Pr","Mr","_r","Or","Sr","Rr","SnapshotSource","Fr","jr","kr","Lr","eventFired","clientPromise","ready","SnapshotSourceModule","Tr","$r","Br","Gr","Wr","Fin","Hr","Nr","Dr","Ur","Vr","zr","Kr","qr","Jr","Yr","Zr","Qr","Xr","eo","to","Frame","Interop","registerFin","no","io","ro","oo","ao","address","so","token","co","runtime","ho","isInternalConnectConfig","isPortDiscoveryConfig","isNewConnectConfig","isConfigWithReceiver","isRemoteConfig","isExistingConnectConfig","isExternalConfig","receiver","lo","uo","EmitterMap","po","wo","storage","hashKeys","yo","fo","dispatchEvent","go","mo","vo","Co","bo","Io","Transport","Eo","xo","Ao","Po","Mo","_o","Oo","wireListeners","messageHandlers","getPort","handleMessage","handleNack","getCurrentEntityType","shutdown","authorize","connectRemote","connectByPort","retrievePort","getWsConstructor","writeToken","file","addWireListener","nackHandler","uncorrelatedListener","String","correlationId","NaN","So","debug","toISOString","getLogger","Ro","Fo","ko","Lo","To","SuppressedError","$o","ports","postMessage","Bo","Go","BaseEnvironment","Wo","interopBrokerConfiguration","Ho","BrowserEnvironment","No","Do","getRandomId","Uint32Array","crypto","getRandomValues","resolveLayout","href","RTCPeerConnection","WebSocket","Uo","Vo","zo","Ko","connectConfig","validatePlatformOptions","layouts","WebLayoutEntryPoint","Jo","v4","apiExposer","commonjsGlobal","brokerUrl","timeout","interopConfig","connectionInheritance","RegExp","exec","groups","atob","providerId","contextGroup","qo","validateOptions","Yo","workerPort","iframeBrokerPort","origin","URL","document","createElement","style","display","contentWindow","setAttribute","body","appendChild","removeChild","decorators","encodeOptions","layout_constants","lazy","mapValuesAsync","mapEntriesAsync","DefaultLayoutManager","size","showLayout","getLayoutSnapshot","getFrameSnapshot","removeLayout","getLayoutIdentityForView","isLayoutVisible","isVisible","resolveLayoutIdentity","handleSharedView","onViewDetached","handleLastViewRemoved","registerLayout","getAllLayouts","setInitialSnapshot","ReversibleMap","valueToKey","keyToValue","setUnique","hasKey","hasValue","getKey","deleteKey","deleteValue","LayoutContentCache","contentItemCache","contentItemCacheId","createCacheKey","getItemOrUndefined","getContentItemOrThrow","getOrCreateEntityId","onDestroyed","getSingleInstance","singleton","doShareEdge","getAdjacentItem","parent","contentItems","right","bottom","__decorate","decorate","LayoutEntitiesController","layoutContentCache","analytics","viewName","platformCreateView","findViewInStack","platformCloseView","position","setActiveContentItem","initLayoutEndpoints","replaceLayout","insertView","cleanupView","BaseLayout","DOMEmitter","container","dispatchLocalEvent","tabSelector","containerSelector","CustomEvent","detail","mapLayoutContentItemsImmutableSync","mapLayoutContentItemsImmutable","offsetWidth","offsetHeight","getComputedStyle","visibility","offsetTop","offsetLeft","innerHeight","innerWidth","node","PopoutCannotBeCreatedWithGroundItemConfig","PleaseRegisterAConstructorFunction","ComponentTypeNotRegisteredAndBindComponentEventHandlerNotAssigned","ComponentIsAlreadyRegistered","ComponentIsNotVirtuable","VirtualComponentDoesNotHaveRootHtmlElement","ItemConfigIsNotTypeComponent","InvalidNumberPartInSizeString","UnknownUnitInSizeString","UnsupportedUnitInSizeString","idCount","checkInitialise","defaultComponentBaseZIndex","defaultComponentDragZIndex","defaultComponentStackMaximisedZIndex","base","drag","stackMaximised","parseFloat","numericPart","firstNonNumericCharPart","trimStart","substring","trim","Number","parseInt","isNaN","tryParse","sizeUnit","isJson","isJsonObject","ground","row","column","component","none","always","onload","Pixel","Percent","Fractional","Em","substr","translateObject","defaults","minSize","minSizeUnit","isClosable","createCopy","createDefault","isComponentItem","isStackItem","isGroundItem","defaultMaximised","popout","maximise","minimise","tabDropdown","Header","defaultActiveItemIndex","maximised","activeItemIndex","header","copyContent","defaultReorderEnabled","resolveComponentTypeName","componentType","reorderEnabled","title","componentState","copyComponentType","isChildItemConfig","isRootItemConfig","Settings","constrainDragToContainer","popoutWholeStack","blockedPopoutsThrowError","closePopoutsOnUnload","responsiveMode","tabOverlapAllowance","reorderOnTabMenuClick","tabControlOffset","popInOnClose","Dimensions","borderWidth","borderGrabWidth","defaultMinItemHeight","defaultMinItemHeightUnit","defaultMinItemWidth","defaultMinItemWidthUnit","headerHeight","dragProxyWidth","dragProxyHeight","dock","isPopout","root","openPopouts","dimensions","settings","resolved","copyOpenPopouts","minifyConfig","unminifyConfig","parentId","indexInParent","resolveContent","resolveId","resolveSize","resolveMinSize","calculateSizeWidthHeightSpecificationType","isGround","isRow","isColumn","isStack","isComponent","resolveIdAndMaximised","fromResolved","minWidth","minHeight","hasHeaders","componentName","componentTypeToTitle","fromResolvedOrUndefined","resolveDefaultMinItemHeight","resolveDefaultMinItemWidth","showPopoutIcon","popin","showMaximiseIcon","showCloseIcon","resolveOpenPopouts","labels","fromResolvedArray","isResolved","_allEventSubscriptions","_subscriptionsMap","unbind","trigger","tryBubbleEvent","emitAllEvent","emitUnknown","emitBaseBubblingEvent","BubblingEvent","emitUnknownBubblingEvent","removeUnknownEventListener","off","addUnknownEventListener","ALL_EVENT","removeSubscription","unshift","headerClickEventName","headerTouchStartEventName","_name","_target","_isPropagationStopped","isPropagationStopped","stopPropagation","ClickBubblingEvent","_mouseEvent","mouseEvent","TouchStartBubblingEvent","_touchEvent","touchEvent","_config","_parent","_layoutManager","_element","_updateItemConfigEvent","_showEvent","_hideEvent","_focusEvent","_blurEvent","_stackMaximised","_width","_height","_visible","_isShownWithZeroDimensions","_componentType","_isClosable","_initialState","_state","_boundComponent","bindComponent","updateElementPositionPropertyFromBoundComponent","virtual","tab","_tab","isHidden","visible","state","initialState","element","releaseComponent","stateRequestEvent","getElement","setSize","updateSize","replaceComponent","virtualVisibilityChangeRequiredEvent","virtualRectingRequiredEvent","fireBeforeVirtualRectingEvent","fireAfterVirtualRectingEvent","setBaseLogicalZIndex","extendState","setState","setTitle","setTab","setVisibility","setSizeToNodeSize","emitShow","emitHide","setLogicalZIndex","_logicalZIndex","notifyVirtualZIndexChangeRequired","enterDragMode","exitDragMode","enterStackMaximised","exitStackMaximised","addVirtualSizedContainerToLayoutManager","checkShownFromZeroDimensions","notifyVirtualRectingRequired","virtualZIndexChangeRequiredEvent","beginVirtualSizedContainerAdding","addVirtualSizedContainer","endVirtualSizedContainerAdding","unbindComponent","_initialWindowSize","_isInitialised","_popoutWindow","toConfig","getGlInstance","saveLayout","screenX","screenLeft","screenY","screenTop","__glInstance","popIn","groundItem","getItemsByPopInParentId","createAndInitContentItem","addChild","layoutConfig","_onClose","createUrl","serializeWindowFeatures","menubar","toolbar","personalbar","resizable","scrollbars","status","positionWindow","passive","_checkReadyInterval","setInterval","checkReady","isInitialised","onInitialised","clearInterval","localStorage","setItem","searchParams","_popInParentIds","_type","_id","_pendingEventPropagations","_throttledEvents","_contentItems","createContentItems","popInParentIds","isComponentParentableItem","setParent","replaceChild","parentNode","createPopoutFromContentItem","calculateConfigContent","highlightDropZone","dropTargetIndicator","highlightArea","onDrop","beginSizeInvalidation","endSizeInvalidation","getElementArea","getBoundingClientRect","scrollTop","scrollLeft","x1","y1","x2","y2","surface","contentItem","addPopInParentId","initContentItems","updateContentItemsSize","createContentItem","propagateEvent","scheduleEventPropagationToLayoutManager","requestAnimationFrame","propagateEventToLayoutManager","_parentItem","_focused","_reorderEnabled","applyUpdatableConfig","_initialWantMaximise","classList","_container","handleUpdateItemConfigEvent","initialWantMaximise","parentItem","headerConfig","_headerConfig","_title","focused","updateNodeSize","setActiveComponentItem","setFocused","setFocusedComponentItem","setBlurred","setFocusedValue","_eElement","_pointerTracking","_pointerDownEventListener","onPointerDown","_pointerMoveEventListener","onPointerMove","_pointerUpEventListener","onPointerUp","_timeout","_allowableTargets","_oDocument","_eBody","_nDelay","_nDistance","_nX","_nY","_nOriginalX","_nOriginalY","_dragging","checkRemovePointerTrackingEventListeners","cancelDrag","processDragStop","isPrimary","getPointerCoordinates","processPointerDown","startDrag","processDragMove","preventDefault","pageX","pageY","abs","querySelector","setProperty","_isVertical","_size","_grabSize","_dragListener","_rowOrColumnParent","_splitter","_childElementContainer","_splitterSize","_splitterGrabSize","_isColumn","_dimension","_splitterPosition","_splitterMinPosition","_splitterMaxPosition","_configType","newComponent","newItem","addComponent","addItem","checkMinimiseMaximisedStack","createSplitter","max","insertAdjacentElement","calculateRelativeSizes","setAbsoluteSizes","calculateAbsoluteSizes","additionalPixel","itemSizes","crossAxisSize","totalSize","round","respectMinItemSize","calculateContentItemMinSize","onSplitterDrag","onSplitterDragStop","onSplitterDragStart","getSplitItems","before","after","calculateContentItemsTotalMinSize","getElementDimensionSize","setElementDimensionSize","_containerElement","previousSibling","lastChild","Element","contains","insertBefore","loadRoot","clearRoot","loadComponentAsRoot","createSideAreas","Area","oppositeSides","side","tabDropPlaceholder","validateDocking","getAllContentItems","deepGetAllContentItems","getConfigMaximisedItems","deepFilterContentItems","_header","_pushEvent","_clickEventListener","onClick","_touchStartEventListener","onTouchStart","controlsContainerElement","_componentItem","_closeEvent","_dragStartEvent","_isActive","_tabClickListener","onTabClickDown","_tabTouchStartListener","onTabTouchStart","_closeClickListener","onCloseClick","_closeTouchStartListener","onCloseTouchStart","_dragStartListener","onDragStart","_contentItemDestroyListener","onContentItemDestroy","_tabTitleChangedListener","_titleElement","_closeElement","enableReorder","isActive","componentItem","titleElement","closeElement","disableReorder","innerText","setActive","button","notifyFocus","notifyClose","_componentRemoveEvent","_componentFocusEvent","_componentDragStartEvent","_dropdownActiveChangedEvent","_tabs","_lastVisibleTabIndex","_dropdownActive","_dropdownElement","tabs","tabCount","lastVisibleTabIndex","dropdownElement","dropdownActive","createTab","handleTabCloseEvent","handleTabFocusEvent","handleTabDragStartEvent","childNodes","removeTab","processActiveComponentChanged","updateTabSizes","tryUpdateTabSizes","parentElement","marginRight","zIndex","marginLeft","showAdditionalTabsDropdown","hideAdditionalTabsDropdown","_configClosable","_getActiveComponentItemEvent","_popoutEvent","_maximiseToggleEvent","_clickEvent","_touchStartEvent","_clickListener","_touchStartListener","_rowColumnClosable","_closeButton","_popoutButton","_tabsContainer","handleTabInitiatedComponentRemoveEvent","handleTabInitiatedComponentFocusEvent","handleTabInitiatedDragStartEvent","processTabDropdownActiveChanged","_show","_popoutEnabled","popoutEnabled","_popoutLabel","popoutLabel","_maximiseEnabled","maximiseEnabled","_maximiseLabel","maximiseLabel","_minimiseEnabled","minimiseEnabled","_minimiseLabel","minimiseLabel","_closeEnabled","closeEnabled","_closeLabel","closeLabel","_tabDropdownEnabled","tabDropdownEnabled","_tabDropdownLabel","tabDropdownLabel","setSide","_canRemoveComponent","_controlsContainerElement","_documentMouseUpListener","_tabControlOffset","_tabDropdownButton","handleButtonPopoutEvent","_maximiseButton","handleButtonMaximiseToggleEvent","_side","leftRightSided","_leftRightSided","tabsContainerElement","setRowColumnClosable","updateClosability","applyFocusedValue","processMaximised","processMinimised","notifyClick","notifyTouchStart","_headerSideChanged","_resizeListener","handleResize","_maximisedListener","handleMaximised","_minimisedListener","handleMinimised","_initialActiveItemIndex","_maximisedEnabled","getActiveComponentItem","handlePopoutEvent","toggleMaximise","handleHeaderClickEvent","handleHeaderTouchStartEvent","handleHeaderComponentRemoveEvent","handleHeaderComponentFocusEvent","handleHeaderComponentStartDragEvent","setupHeaderPosition","childElementContainer","headerShow","headerSide","headerLeftRightSided","contentAreaDimensions","_contentAreaDimensions","isMaximised","maximisedStack","stackParent","_activeComponentItem","emitStateChangedEvent","getActiveContentItem","focusActiveContentItem","setMaximisedStack","createHeaderConfig","_dropSegment","resetHeaderDropZone","_dropIndex","hoverArea","highlightHeaderDropZone","highlightBodyDropZone","getArea","positionHeader","clientHeight","startComponentDrag","_originalParent","_area","_lastValidArea","onDrag","createDragProxyElements","_componentItemFocused","setDimensions","determineMinMaxXY","calculateItemAreas","setDropPosition","_proxyContainerElement","_sided","insertAdjacentText","_minX","_minY","_maxX","_maxY","ceil","_extraAllowableChildTargets","_componentTypeOrFtn","_componentState","_dummyGroundContainer","_dummyGroundContentItem","createDragListener","removeDragListener","onDragStop","isDragSourceComponentItemConfig","transitionIndicator","transitionElements","_toElement","_fromDimensions","_totalAnimationDuration","_animationStartTime","nextAnimationFrame","measure","_childEventListener","onEventFromChild","ChildEventName","emitUserBroadcast","handleUserBroadcastEvent","isSubWindow","propagateToParent","propagateToThisAndSubtree","eventName","bubbles","cancelable","opener","eventHub","resizeWithContainerAutomatically","resizeDebounceInterval","resizeDebounceExtendedWhenPossible","_groundItem","_openPopouts","_dropTargetIndicator","_transitionIndicator","_itemAreas","_maximisePlaceholder","createMaximisePlaceElement","_tabDropPlaceholder","createTabDropPlaceholderElement","_dragSources","_updatingColumnsResponsive","_firstLoad","_eventHub","_virtualSizedContainers","_virtualSizedContainerAddingBeginCount","_sizeInvalidationBeginCount","_resizeObserver","ResizeObserver","handleContainerResize","_windowBeforeUnloadListener","onBeforeUnload","_windowBeforeUnloadListening","_maximisedStackBeforeDestroyedListener","cleanupBeforeMaximisedStackDestroyed","_constructorOrSubWindowLayoutConfig","constructorOrSubWindowLayoutConfig","containerElement","rootItem","focusedComponentItem","_focusedComponentItem","_maximisedStack","deprecatedConstructor","closeAllOpenPopouts","checkClearResizeTimeout","setContainer","updateSizeFromContainer","checkLoadedLayoutMaximiseItem","observe","adjustColumnsResponsive","loadLayout","createSubWindows","reconcilePopoutWindows","newComponentAtLocation","addComponentAtLocation","addItemAtLocation","newItemAtLocation","defaultLocationSelectors","findFirstLocation","updateRootSize","createContentItemFromConfig","findFirstComponentItemById","findFirstContentItemTypeByIdRecursive","createPopout","createPopoutFromItemConfig","beforeVirtualRectingEvent","afterVirtualRectingEvent","createPopoutFromPopoutLayoutConfig","newDragSource","removeDragSource","focusComponent","clearComponentFocus","processMinimiseMaximisedStack","processMaximiseStack","prepend","closed","processResizeWithDebounce","_resizeTimeoutId","documentElement","margin","padding","overflow","useResponsiveLayout","getAllStacks","addChildContentItemsToContainer","findAllStacksRecursive","findFirstContentItemType","findFirstContentItemTypeRecursive","findLocation","typeId","tryCreateLocationFromParentItem","afterFocusedItemIfPossibleLocationSelectors","createLayoutManagerConstructorParameters","_bindComponentEventHanlderPassedInConstructor","_creationTimeoutPassed","bindComponentEvent","unbindComponentEvent","clearHtmlAndAdjustStylesForSubWindow","head","querySelectorAll","innerHTML","checkAddDefaultPopinButton","getComponentEvent","releaseComponentEvent","getItem","removeItem","HTMLElement","_componentTypesMap","_registeredComponentMap","_virtuableComponentMap","_containerVirtualRectingRequiredEventListener","handleContainerVirtualRectingRequiredEvent","_containerVirtualVisibilityChangeRequiredEventListener","handleContainerVirtualVisibilityChangeRequiredEvent","_containerVirtualZIndexChangeRequiredEventListener","handleContainerVirtualZIndexChangeRequiredEvent","registerComponent","registerComponentConstructor","registerComponentFactoryFunction","factoryFunction","registerComponentFunction","registerGetComponentConstructorCallback","_getComponentConstructorFtn","getRegisteredComponentTypeNames","getComponentInstantiator","rootHtmlElement","_goldenLayoutBoundingClientRect","constrainDragToHeaders","preventDragout","selectionEnabled","resizeElement","handleMutation","viewComponentsByContainerElement","MutationObserver","observeMutations","childList","subtree","attributes","attributeFilter","observeContainer","unobserveContainer","unobserve","resize","BaseItem","_item","_layout","_wrap","raw","wrapInternal","wrapCache","customElements","define","connectedCallback","src","border","forceFrameName","getAttribute","observedAttributes","ofView","isDragging","className","web","handleUrlMissing","updateTitleIfNotSet","frameName","inset","overrideConfig","initialConfig","platformProvider","reparentingViews","goldenLayoutDestroyed","createViewComponent","iframeContainer","stylesheet","insertRule","resizeController","domEmitter","setupStylesheets","setupListeners","attachShadow","mode","delegatesFocus","normalizeOptions","CSSStyleSheet","adoptedStyleSheets","preventSplitterResize","handleDragStart","handleDragEnd","removeViewComponent","pointerEvents","cssRules","cssText","deleteRule","windowIdentity","fallbackContainer","initLayoutViews","viewNames","match","multiInstanceViewBehavior","byteLength","b64","lens","getLens","validLen","placeHoldersLen","toByteArray","tmp","arr","Arr","_byteLength","curByte","len","revLookup","charCodeAt","fromByteArray","uint8","extraBytes","parts","maxChunkLength","len2","encodeChunk","lookup","Uint8Array","end","num","output","base64","ieee754","customInspectSymbol","SlowBuffer","alloc","INSPECT_MAX_BYTES","K_MAX_LENGTH","createBuffer","RangeError","buf","arg","encodingOrOffset","allocUnsafe","string","encoding","isEncoding","actual","fromString","arrayView","isInstance","copy","fromArrayBuffer","buffer","byteOffset","fromArrayLike","fromArrayView","SharedArrayBuffer","valueOf","obj","isBuffer","checked","undefined","numberIsNaN","fromObject","toPrimitive","assertSize","array","mustMatch","loweredCase","utf8ToBytes","base64ToBytes","toLowerCase","slowToString","hexSlice","utf8Slice","asciiSlice","latin1Slice","base64Slice","utf16leSlice","swap","bidirectionalIndexOf","val","dir","arrayIndexOf","lastIndexOf","indexSize","arrLength","valLength","read","readUInt16BE","foundIndex","found","hexWrite","offset","remaining","strLen","parsed","utf8Write","blitBuffer","asciiWrite","str","byteArray","asciiToBytes","base64Write","ucs2Write","units","utf16leToBytes","res","firstByte","codePoint","bytesPerSequence","secondByte","thirdByte","fourthByte","tempCodePoint","codePoints","MAX_ARGUMENTS_LENGTH","fromCharCode","decodeCodePointsArray","kMaxLength","TYPED_ARRAY_SUPPORT","proto","foo","typedArraySupport","poolSize","fill","allocUnsafeSlow","_isBuffer","compare","concat","list","pos","swap16","swap32","swap64","toLocaleString","equals","inspect","thisStart","thisEnd","thisCopy","targetCopy","isFinite","_arr","ret","out","hexSliceLookupTable","bytes","checkOffset","ext","checkInt","wrtBigUInt64LE","checkIntBI","BigInt","wrtBigUInt64BE","checkIEEE754","writeFloat","littleEndian","noAssert","writeDouble","newBuf","subarray","readUintLE","readUIntLE","mul","readUintBE","readUIntBE","readUint8","readUInt8","readUint16LE","readUInt16LE","readUint16BE","readUint32LE","readUInt32LE","readUint32BE","readUInt32BE","readBigUInt64LE","defineBigIntMethod","validateNumber","first","last","boundsError","readBigUInt64BE","readIntLE","pow","readIntBE","readInt8","readInt16LE","readInt16BE","readInt32LE","readInt32BE","readBigInt64LE","readBigInt64BE","readFloatLE","readFloatBE","readDoubleLE","readDoubleBE","writeUintLE","writeUIntLE","writeUintBE","writeUIntBE","writeUint8","writeUInt8","writeUint16LE","writeUInt16LE","writeUint16BE","writeUInt16BE","writeUint32LE","writeUInt32LE","writeUint32BE","writeUInt32BE","writeBigUInt64LE","writeBigUInt64BE","writeIntLE","limit","sub","writeIntBE","writeInt8","writeInt16LE","writeInt16BE","writeInt32LE","writeInt32BE","writeBigInt64LE","writeBigInt64BE","writeFloatLE","writeFloatBE","writeDoubleLE","writeDoubleBE","targetStart","copyWithin","errors","sym","getMessage","addNumericalSeparator","range","ERR_OUT_OF_RANGE","checkBounds","ERR_INVALID_ARG_TYPE","ERR_BUFFER_OUT_OF_BOUNDS","input","msg","received","isInteger","INVALID_BASE64_RE","Infinity","leadSurrogate","base64clean","dst","alphabet","table","i16","BufferBigIntNotDefined","ReflectOwnKeys","ReflectApply","Function","getOwnPropertySymbols","getOwnPropertyNames","NumberIsNaN","module","errorListener","resolver","eventTargetAgnosticAddListener","handler","addErrorHandlerIfEventEmitter","_events","_eventsCount","_maxListeners","defaultMaxListeners","checkListener","_getMaxListeners","that","_addListener","existing","warning","newListener","warned","onceWrapper","fired","wrapFn","_onceWrap","wrapped","_listeners","unwrap","evlistener","unwrapListeners","arrayClone","flags","wrapListener","setMaxListeners","getMaxListeners","doError","originalListener","shift","spliceOne","rawListeners","isLE","mLen","nBytes","eLen","eMax","eBias","nBits","LN2","DataView","getNative","hashClear","hashDelete","hashGet","hashHas","hashSet","Hash","entry","listCacheClear","listCacheDelete","listCacheGet","listCacheHas","listCacheSet","ListCache","mapCacheClear","mapCacheDelete","mapCacheGet","mapCacheHas","mapCacheSet","MapCache","setCacheAdd","setCacheHas","SetCache","__data__","stackClear","stackDelete","stackGet","stackHas","stackSet","Stack","iteratee","predicate","resIndex","baseTimes","isArguments","isIndex","isTypedArray","inherited","isArr","isArg","isBuff","isType","skipIndexes","baseAssignValue","eq","object","objValue","copyObject","keysIn","arrayEach","assignValue","baseAssign","baseAssignIn","cloneBuffer","copyArray","copySymbols","copySymbolsIn","getAllKeys","getAllKeysIn","getTag","initCloneArray","initCloneByTag","initCloneObject","isMap","isObject","isSet","argsTag","funcTag","objectTag","cloneableTags","baseClone","bitmask","customizer","isDeep","isFlat","isFull","tag","isFunc","stacked","subValue","objectCreate","baseCreate","arrayPush","keysFunc","symbolsFunc","getRawTag","objectToString","symToStringTag","toStringTag","baseGetTag","isObjectLike","baseIsEqualDeep","baseIsEqual","other","equalArrays","equalByTag","equalObjects","arrayTag","equalFunc","objIsArr","othIsArr","objTag","othTag","objIsObj","othIsObj","isSameTag","objIsWrapped","othIsWrapped","objUnwrapped","othUnwrapped","isFunction","isMasked","toSource","reIsHostCtor","funcProto","objectProto","funcToString","reIsNative","test","isLength","typedArrayTags","isPrototype","nativeKeys","nativeKeysIn","isProto","func","cache","arrayBuffer","freeExports","nodeType","freeModule","cloneArrayBuffer","dataView","reFlags","regexp","lastIndex","symbolProto","symbolValueOf","symbol","typedArray","isNew","newValue","getSymbols","getSymbolsIn","coreJsData","arraySome","cacheHas","isPartial","othLength","arrStacked","othStacked","seen","arrValue","othValue","compared","othIndex","mapToArray","setToArray","convert","objProps","objLength","objStacked","skipCtor","objCtor","othCtor","freeGlobal","baseGetAllKeys","isKeyable","baseIsNative","getPrototype","overArg","nativeObjectToString","isOwn","unmasked","arrayFilter","stubArray","propertyIsEnumerable","nativeGetSymbols","mapTag","promiseTag","setTag","weakMapTag","dataViewTag","dataViewCtorString","mapCtorString","promiseCtorString","setCtorString","weakMapCtorString","Ctor","ctorString","nativeCreate","cloneDataView","cloneRegExp","cloneSymbol","cloneTypedArray","reIsUint","uid","maskSrcKey","IE_PROTO","assocIndexOf","getMapData","freeProcess","process","nodeUtil","require","types","binding","transform","freeSelf","pairs","LARGE_ARRAY_SIZE","CLONE_DEEP_FLAG","baseIsArguments","stubFalse","baseIsMap","baseUnary","nodeIsMap","baseIsSet","nodeIsSet","baseIsTypedArray","nodeIsTypedArray","arrayLikeKeys","baseKeys","isArrayLike","baseKeysIn","rnds8","rng","msCrypto","byteToHex","_nodeId","_clockseq","_lastMSecs","_lastNSecs","clockseq","seedBytes","msecs","nsecs","tl","tmh","hashfunc","generateUUID","namespace","unescape","encodeURIComponent","stringToBytes","DNS","getOutputLength","inputLength8","safeAdd","lsw","md5cmn","cnt","md5ff","md5gg","md5hh","md5ii","v35","length32","hexTab","hex","charAt","md5ToHexEncodedArray","olda","oldb","oldc","oldd","wordsToMd5","length8","bytesToWords","rnds","ROTL","_i2","_t2","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","loaded","__webpack_modules__","definition","prop","nmd","paths","children","finInitialized","fdc3Initialized","api","DEFAULT_OPTIONS","logger","DEFAULT_LOGGER","info","newFin","connectOptions","requestConnectOptions","DEFAULT_CONNECT_OPTIONS","requestedConnectConfig","requestError","fdc3","targetIsWindow","event","timer","messageHandler","receivingOrigin","targetOrigin"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"web.client.api.bundle.js","mappings":";sBAAa,IAAIA,EAAE,EAAQ,MAAsB,EAAQ,MAAW,EAAQ,MAAQ,EAAQ,IAAU,EAAQ,MAAoB,EAAQ,MAAkBC,EAAQC,QAAQF,EAAEE,wBCAjK,IAAIF,EAAE,EAAQ,MAAWG,EAAE,EAAQ,IAAUC,EAAE,EAAQ,MAAoBC,EAAE,EAAQ,MAAkBC,EAAE,EAAQ,MAAQ,MAAMC,EAAE,CAACP,EAAEG,IAAI,GAAGA,KAAKK,KAAKC,KAAKC,UAAUV,OAAO,IAAIW,EAAE,oBAAoBC,WAAWA,WAAW,oBAAoBC,OAAOA,YAAO,IAAoB,EAAAC,EAAO,EAAAA,EAAO,oBAAoBC,KAAKA,KAAK,CAAC,EAAEC,EAAE,CAAC,EAA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EAAO,IAAI9N,MAAM,6CAA6C,GAC5DwD,EAAQuuC,SAAW,KAmBtBr3C,OAAOujB,iBAAiB,WAdxBhjB,eAAeo2F,EAAeF,GAC7B,GAAIh1D,MAAMkM,QAAQ7kC,EAAQ8tF,mBAAqB9tF,EAAQ8tF,gBAAgBznF,SAASsnF,EAAMt+C,QACrF/kC,EAAO,IAAI9N,MAAM,4CAA4CmxF,EAAMt+C,gBAC7D,GAAIs+C,EAAMxtF,MAA4B,kCAApBwtF,EAAMxtF,KAAKzG,KAA0C,CAC7ExC,OAAOijB,oBAAoB,UAAW0zE,GACtC,MAAM//C,EAAgB6/C,EAAMxtF,KAAK2tC,mBACX+9B,IAAlB/9B,EACHxjC,EAAO,IAAI9N,MAAM,0CAEjBmR,aAAaigF,GACbzyF,EAAQ2yC,GAEV,CACD,IAEA,IAAIxpC,EAASpN,OAAOqV,KAAOrV,OAAOy7C,OACX,WAAnB3yC,EAAQsE,SACXA,EAASpN,OAAOy7C,QAEjBruC,EAAOkoC,YA7B8C,CACpD9yC,KAAM,iCA4B4BsG,EAAQ+tF,cAAgB,IAAI,GAEjE","sources":["webpack://openfin-web--web-client-api/../../node_modules/@openfin/core-web/out/api-client.js","webpack://openfin-web--web-client-api/../../node_modules/@openfin/core-web/out/main-8cad4070.js","webpack://openfin-web--web-client-api/../../node_modules/@openfin/core-web/out/main-b14f67c9.js","webpack://openfin-web--web-client-api/../../node_modules/base64-js/index.js","webpack://openfin-web--web-client-api/../../node_modules/buffer/index.js","webpack://openfin-web--web-client-api/../../node_modules/events/events.js","webpack://openfin-web--web-client-api/../../node_modules/ieee754/index.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_DataView.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_Hash.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_ListCache.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_Map.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_MapCache.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_Promise.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_Set.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_SetCache.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_Stack.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_Symbol.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_Uint8Array.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_WeakMap.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_arrayEach.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_arrayFilter.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_arrayLikeKeys.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_arrayPush.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_arraySome.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_assignValue.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_assocIndexOf.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_baseAssign.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_baseAssignIn.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_baseAssignValue.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_baseClone.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_baseCreate.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_baseGetAllKeys.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_baseGetTag.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_baseIsArguments.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_baseIsEqual.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_baseIsEqualDeep.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_baseIsMap.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_baseIsNative.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_baseIsSet.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_baseIsTypedArray.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_baseKeys.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_baseKeysIn.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_baseTimes.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_baseUnary.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_cacheHas.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_cloneArrayBuffer.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_cloneBuffer.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_cloneDataView.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_cloneRegExp.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_cloneSymbol.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_cloneTypedArray.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_copyArray.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_copyObject.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_copySymbols.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_copySymbolsIn.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_coreJsData.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_defineProperty.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_equalArrays.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_equalByTag.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_equalObjects.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_freeGlobal.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_getAllKeys.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_getAllKeysIn.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_getMapData.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_getNative.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_getPrototype.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_getRawTag.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_getSymbols.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_getSymbolsIn.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_getTag.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_getValue.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_hashClear.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_hashDelete.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_hashGet.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_hashHas.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_hashSet.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_initCloneArray.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_initCloneByTag.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_initCloneObject.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_isIndex.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_isKeyable.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_isMasked.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_isPrototype.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_listCacheClear.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_listCacheDelete.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_listCacheGet.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_listCacheHas.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_listCacheSet.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_mapCacheClear.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_mapCacheDelete.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_mapCacheGet.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_mapCacheHas.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_mapCacheSet.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_mapToArray.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_nativeCreate.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_nativeKeys.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_nativeKeysIn.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_nodeUtil.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_objectToString.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_overArg.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_root.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_setCacheAdd.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_setCacheHas.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_setToArray.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_stackClear.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_stackDelete.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_stackGet.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_stackHas.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_stackSet.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/_toSource.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/cloneDeep.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/eq.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/isArguments.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/isArray.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/isArrayLike.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/isBuffer.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/isEqual.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/isFunction.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/isLength.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/isMap.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/isObject.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/isObjectLike.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/isSet.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/isTypedArray.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/keys.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/keysIn.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/stubArray.js","webpack://openfin-web--web-client-api/../../node_modules/lodash/stubFalse.js","webpack://openfin-web--web-client-api/../../node_modules/uuid/dist/esm-browser/rng.js","webpack://openfin-web--web-client-api/../../node_modules/uuid/dist/esm-browser/regex.js","webpack://openfin-web--web-client-api/../../node_modules/uuid/dist/esm-browser/validate.js","webpack://openfin-web--web-client-api/../../node_modules/uuid/dist/esm-browser/stringify.js","webpack://openfin-web--web-client-api/../../node_modules/uuid/dist/esm-browser/v1.js","webpack://openfin-web--web-client-api/../../node_modules/uuid/dist/esm-browser/parse.js","webpack://openfin-web--web-client-api/../../node_modules/uuid/dist/esm-browser/v35.js","webpack://openfin-web--web-client-api/../../node_modules/uuid/dist/esm-browser/md5.js","webpack://openfin-web--web-client-api/../../node_modules/uuid/dist/esm-browser/v3.js","webpack://openfin-web--web-client-api/../../node_modules/uuid/dist/esm-browser/v4.js","webpack://openfin-web--web-client-api/../../node_modules/uuid/dist/esm-browser/sha1.js","webpack://openfin-web--web-client-api/../../node_modules/uuid/dist/esm-browser/v5.js","webpack://openfin-web--web-client-api/../../node_modules/uuid/dist/esm-browser/nil.js","webpack://openfin-web--web-client-api/../../node_modules/uuid/dist/esm-browser/version.js","webpack://openfin-web--web-client-api/webpack/bootstrap","webpack://openfin-web--web-client-api/webpack/runtime/define property getters","webpack://openfin-web--web-client-api/webpack/runtime/global","webpack://openfin-web--web-client-api/webpack/runtime/hasOwnProperty shorthand","webpack://openfin-web--web-client-api/webpack/runtime/make namespace object","webpack://openfin-web--web-client-api/webpack/runtime/node module decorator","webpack://openfin-web--web-client-api/./client/src/client.ts"],"sourcesContent":["\"use strict\";var e=require(\"./main-8cad4070.js\");require(\"buffer/\"),require(\"uuid\"),require(\"events\"),require(\"lodash/cloneDeep\"),require(\"lodash/isEqual\"),exports.connect=e.connect;\n","\"use strict\";var e=require(\"buffer/\"),t=require(\"events\"),n=require(\"lodash/cloneDeep\"),i=require(\"lodash/isEqual\"),r=require(\"uuid\");const o=(e,t)=>`${t}<${btoa(JSON.stringify(e))}>`;var s=\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof window?window:\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:{},a={},c={},d={},h={};async function l(e){const t=[];for(const n of e){const e=await n();t.push(e)}return t}Object.defineProperty(h,\"__esModule\",{value:!0}),h.promiseMapSerial=h.serial=h.promiseMap=h.promisify=void 0,h.promisify=function(e){return(...t)=>new Promise(((n,i)=>{e(...t,((e,t)=>e?i(e):n(t)))}))},h.promiseMap=async function(e,t){return Promise.all(e.map(t))},h.serial=l,h.promiseMapSerial=async function(e,t){return l(e.map(((e,n,i)=>()=>t(e,n,i))))};var u,p=s&&s.__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},w=s&&s.__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)};Object.defineProperty(d,\"__esModule\",{value:!0}),d.Reply=d.EmitterBase=d.Base=void 0;const y=h;class f{constructor(e){this.isNodeEnvironment=()=>\"node\"===this.wire.environment.type,this.isOpenFinEnvironment=()=>\"openfin\"===this.wire.environment.type,this.isBrowserEnvironment=()=>\"other\"===this.wire.environment.type,this.wire=e}get fin(){return this.wire.getFin()}get me(){return this.wire.me}}d.Base=f;d.EmitterBase=class extends f{constructor(e,t,...n){super(e),this.topic=t,u.set(this,void 0),this.eventNames=()=>this.hasEmitter()?this.getOrCreateEmitter().eventNames():[],this.emit=(e,t,...n)=>!!this.hasEmitter()&&this.getOrCreateEmitter().emit(e,t,...n),this.hasEmitter=()=>this.wire.eventAggregator.has(w(this,u,\"f\")),this.getOrCreateEmitter=()=>this.wire.eventAggregator.getOrCreate(w(this,u,\"f\")),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[],this.listenerCount=e=>this.hasEmitter()?this.getOrCreateEmitter().listenerCount(e):0,this.registerEventListener=async(e,t={},n,i)=>{const r={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e},o=this.getOrCreateEmitter();n(o);try{await this.wire.sendAction(\"subscribe-to-desktop-event\",r)}catch(e){throw i(o),this.deleteEmitterIfNothingRegistered(o),e}},this.deregisterEventListener=async(e,t={})=>{if(this.hasEmitter()){const n={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e};await this.wire.sendAction(\"unsubscribe-to-desktop-event\",n).catch((()=>null));return this.getOrCreateEmitter()}return Promise.resolve()},p(this,u,[t,...n],\"f\"),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[]}async on(e,t,n){return await this.registerEventListener(e,n,(n=>{n.on(e,t)}),(n=>{n.removeListener(e,t)})),this}async addListener(e,t,n){return this.on(e,t,n)}async once(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.once(e,i),n.once(e,t)}),(n=>{n.removeListener(e,i),n.removeListener(e,t)})),this}async prependListener(e,t,n){return await this.registerEventListener(e,n,(n=>{n.prependListener(e,t)}),(n=>{n.removeListener(e,t)})),this}async prependOnceListener(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.prependOnceListener(e,t),n.once(e,i)}),(n=>{n.removeListener(e,t),n.removeListener(e,i)})),this}async removeListener(e,t,n){const i=await this.deregisterEventListener(e,n);return i&&(i.removeListener(e,t),this.deleteEmitterIfNothingRegistered(i)),this}async deregisterAllListeners(e){const t={...this.identity,type:e,topic:this.topic};if(this.hasEmitter()){const e=this.getOrCreateEmitter(),n=e.listenerCount(t.type),i=[];for(let e=0;enull)));return await Promise.all(i),e}}async removeAllListeners(e){const t=async e=>{const t=await this.deregisterAllListeners(e);t&&(t.removeAllListeners(e),this.deleteEmitterIfNothingRegistered(t))};if(e)await t(e);else if(this.hasEmitter()){const e=this.getOrCreateEmitter().eventNames();await(0,y.promiseMap)(e,t)}return this}deleteEmitterIfNothingRegistered(e){0===e.eventNames().length&&this.wire.eventAggregator.delete(w(this,u,\"f\"))}},u=new WeakMap;d.Reply=class{};var g={};Object.defineProperty(g,\"__esModule\",{value:!0});var m=g.RuntimeError=g.NotSupportedError=g.NotImplementedError=g.NoAckError=g.DuplicateCorrelationError=g.UnexpectedActionError=g.DisconnectedError=void 0;class v extends Error{constructor(e){super(`Expected websocket state OPEN but found ${e}`),this.readyState=e}}g.DisconnectedError=v;class C extends Error{}g.UnexpectedActionError=C;class b extends Error{}g.DuplicateCorrelationError=b;class I extends Error{}g.NoAckError=I;class E extends Error{}g.NotImplementedError=E;class x extends Error{}g.NotSupportedError=x;class A extends Error{constructor(e){const{message:t,name:n,stack:i,...r}=e;super(t),this.name=n||\"Error\",this.stack=i??this.toString(),Object.keys(r).forEach((e=>{this[e]=r[e]}))}}class P extends Error{static getCallSite(e=0){const t=Error.stackTraceLimit,n=e+1;Error.stackTraceLimit=t+n;const i=Error.prepareStackTrace;Error.prepareStackTrace=(e,t)=>t;const r=(new Error).stack?.slice(n)??[];return Error.prepareStackTrace=i,Error.stackTraceLimit=t,r}static prepareStackTrace(e,t){if(\"function\"==typeof Error.prepareStackTrace)return Error.prepareStackTrace(e,t);let n=\"\";n+=e.name||\"Error\",n+=`: ${e.message||\"\"}`;for(const e of t)n+=`\\n at ${e.toString()}`;return n}constructor(e,t){const{reason:n,error:i}=e;super(n),this.name=\"RuntimeError\",i?.stack&&(this.cause=new A(i)),t&&(this.stack=P.prepareStackTrace(this,t))}}m=g.RuntimeError=P;var M={},_={},O={};Object.defineProperty(O,\"__esModule\",{value:!0}),O.validateIdentity=void 0,O.validateIdentity=function(e){let t;return\"object\"==typeof e&&\"string\"==typeof e.uuid||(t=\"Not a valid identity object\"),t};var S={},R={},F={},j={},k={},L={},T={};Object.defineProperty(T,\"__esModule\",{value:!0}),T.handleDeprecatedWarnings=void 0;var $;T.handleDeprecatedWarnings=e=>{(e.contentNavigation?.whitelist||e.contentNavigation?.blacklist||e.contentRedirect?.whitelist||e.contentRedirect?.blacklist)&&console.warn(\"The properties 'whitelist' and 'blacklist' have been marked as deprecated and will be removed in a future version. Please use 'allowlist' and 'denylist'.\")};var B={},G={};Object.defineProperty(G,\"__esModule\",{value:!0}),G.AsyncRetryableLazy=W=G.Lazy=void 0;var W=G.Lazy=class{constructor(e){this.producerFn=e}getValue(){return this.value||(this.value=this.producerFn()),this.value}};G.AsyncRetryableLazy=class{constructor(e){this.producerFn=e}async getValue(){return this.promise||(this.promise=this.producerFn().catch((e=>{throw delete this.promise,e}))),this.promise}};var H={};Object.defineProperty(H,\"__esModule\",{value:!0}),H.WebContents=void 0;const N=d;class D extends N.EmitterBase{constructor(e,t,n){super(e,n,t.uuid,t.name),this.identity=t,this.entityType=n}capturePage(e){return this.wire.sendAction(\"capture-page\",{options:e,...this.identity}).then((({payload:e})=>e.data))}executeJavaScript(e){return this.wire.sendAction(\"execute-javascript-in-window\",{...this.identity,code:e}).then((({payload:e})=>e.data))}getZoomLevel(){return this.wire.sendAction(\"get-zoom-level\",this.identity).then((({payload:e})=>e.data))}setZoomLevel(e){return this.wire.sendAction(\"set-zoom-level\",{...this.identity,level:e}).then((()=>{}))}navigate(e){return this.wire.sendAction(\"navigate-window\",{...this.identity,url:e}).then((()=>{}))}navigateBack(){return this.wire.sendAction(\"navigate-window-back\",{...this.identity}).then((()=>{}))}async navigateForward(){await this.wire.sendAction(\"navigate-window-forward\",{...this.identity})}stopNavigation(){return this.wire.sendAction(\"stop-window-navigation\",{...this.identity}).then((()=>{}))}reload(e=!1){return this.wire.sendAction(\"reload-window\",{ignoreCache:e,...this.identity}).then((()=>{}))}print(e={}){return this.wire.sendAction(\"print\",{...this.identity,options:e}).then((()=>{}))}findInPage(e,t){return this.wire.sendAction(\"find-in-page\",{...this.identity,searchTerm:e,options:t}).then((({payload:e})=>e.data))}stopFindInPage(e){return this.wire.sendAction(\"stop-find-in-page\",{...this.identity,action:e}).then((()=>{}))}getPrinters(){return this.wire.sendAction(\"get-printers\",{...this.identity}).then((({payload:e})=>e.data))}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){await this.wire.sendAction(\"focus-window\",{emitSynthFocused:e,...this.identity})}async showDeveloperTools(){await this.wire.sendAction(\"show-developer-tools\",this.identity)}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction(\"get-process-info\",this.identity);return e}async getSharedWorkers(){return this.wire.sendAction(\"get-shared-workers\",this.identity).then((({payload:e})=>e.data))}async inspectSharedWorker(){await this.wire.sendAction(\"inspect-shared-worker\",{...this.identity})}async inspectSharedWorkerById(e){await this.wire.sendAction(\"inspect-shared-worker-by-id\",{...this.identity,workerId:e})}async inspectServiceWorker(){await this.wire.sendAction(\"inspect-service-worker\",{...this.identity})}async showPopupWindow(e){if(this.wire.sendAction(`${this.entityType}-show-popup-window`,this.identity).catch((()=>{})),e?.onPopupReady){const t=async({popupName:t})=>{try{const n=this.fin.Window.wrapSync({uuid:this.fin.me.uuid,name:t});await e.onPopupReady(n)}catch(e){throw new Error(`Something went wrong during onPopupReady execution: ${e}`)}};await this.once(\"popup-ready\",t)}const{payload:t}=await this.wire.sendAction(\"try-create-popup-window\",{options:{...e,hasResultCallback:!!e?.onPopupResult,hasReadyCallback:!!e?.onPopupReady},...this.identity}),{data:{willOpen:n,options:i}}=t;n&&await this.fin.Window.create(i.initialOptions);if(e?.onPopupResult){const t=async t=>{await e.onPopupResult((e=>{const{name:t,uuid:n,result:i,data:r}=e,o={identity:{name:t,uuid:n},result:i};return r&&(o.data=r),o})(t))},n=async()=>{await this.removeListener(\"popup-result\",t)};await this.on(\"popup-result\",t),await this.once(\"popup-teardown\",n)}const{payload:r}=await this.wire.sendAction(\"show-popup-window\",{options:i,...this.identity});return r.data}}var U,V,z,K,q;function J(){return V||(V=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(function(){if($)return L;$=1,Object.defineProperty(L,\"__esModule\",{value:!0}),L.ViewModule=void 0;const e=d,t=O,n=J(),i=T;class r extends e.Base{async create(e){const{uuid:t}=this.wire.me;if(!e.name||\"string\"!=typeof e.name)throw new Error(\"Please provide a name property as a string in order to create a View.\");return(0,i.handleDeprecatedWarnings)(e),this.wire.environment.childViews?await this.wire.environment.createChildContent({entityType:\"view\",options:{...e,uuid:t}}):await this.wire.sendAction(\"create-view\",{...e,uuid:t}),this.wrapSync({uuid:t,name:e.name})}async wrap(e){this.wire.sendAction(\"view-wrap\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}wrapSync(e){this.wire.sendAction(\"view-wrap-sync\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}getCurrent(){if(this.wire.sendAction(\"view-get-current\").catch((e=>{})),!this.wire.me.isView)throw new Error(\"You are not in a View context\");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction(\"view-get-current-sync\").catch((e=>{})),!this.wire.me.isView)throw new Error(\"You are not in a View context\");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return L.ViewModule=r,L}(),e),n(function(){if(U)return B;var e;U=1,Object.defineProperty(B,\"__esModule\",{value:!0}),B.View=void 0;const t=g,n=G,i=H,r=ie();class o extends i.WebContents{constructor(i,o){super(i,o,\"view\"),this.identity=o,e.set(this,new n.Lazy((()=>this.fin.Platform.wrapSync(this.identity).getClient()))),this.attach=async e=>{await this.wire.sendAction(\"attach-view\",{target:e,...this.identity})},this.destroy=async()=>{await this.wire.sendAction(\"destroy-view\",{...this.identity})},this.show=async()=>{await this.wire.sendAction(\"show-view\",{...this.identity})},this.showAt=async(e,t={})=>{await this.wire.sendAction(\"show-view-at\",{bounds:e,...this.identity,options:t})},this.bringToFront=async()=>{await this.wire.sendAction(\"bring-view-to-front\",{...this.identity})},this.hide=async()=>{await this.wire.sendAction(\"hide-view\",{...this.identity})},this.setBounds=async e=>{await this.wire.sendAction(\"set-view-bounds\",{bounds:e,...this.identity})},this.getBounds=async()=>(await this.wire.sendAction(\"get-view-bounds\",{...this.identity})).payload.data,this.getInfo=async()=>(await this.wire.sendAction(\"get-view-info\",{...this.identity})).payload.data,this.getParentLayout=async()=>(this.wire.sendAction(\"view-get-parent-layout\",{...this.identity}).catch((()=>{})),this.fin.Platform.Layout.getLayoutByViewIdentity(this.identity)),this.getOptions=async()=>this.wire.sendAction(\"get-view-options\",{...this.identity}).then((({payload:e})=>e.data)),this.updateOptions=async e=>this.wire.sendAction(\"update-view-options\",{options:e,...this.identity}).then((()=>{})),this.getCurrentWindow=async()=>{const{payload:{data:e}}=await this.wire.sendAction(\"get-view-window\",{...this.identity});return new r._Window(this.wire,e)},this.getCurrentStack=async()=>{this.wire.sendAction(\"view-get-current-stack\").catch((()=>{}));try{return(await this.getParentLayout()).getStackByViewIdentity(this.identity)}catch(e){throw new t.RuntimeError({reason:\"This view does not belong to a stack.\",error:e})}},this.triggerBeforeUnload=async()=>(await this.wire.sendAction(\"trigger-before-unload\",{...this.identity})).payload.data,this.bindToElement=async e=>{if(!e)throw new Error(\"Element not found.\");return this.wire.environment.observeBounds(e,(async e=>this.setBounds(e)))}}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){const t=await this.getCurrentWindow();await t.focusedWebViewWasChanged(),await super.focus({emitSynthFocused:e})}}return B.View=o,e=new WeakMap,B}(),e)}(k)),k}function Y(){if(z)return j;z=1,Object.defineProperty(j,\"__esModule\",{value:!0}),j.Application=void 0;const e=d,t=ie(),n=J();class i extends e.EmitterBase{constructor(e,n){super(e,\"application\",n.uuid),this.identity=n,this.window=new t._Window(this.wire,{uuid:this.identity.uuid,name:this.identity.uuid})}windowListFromIdentityList(e){const n=[];return e.forEach((e=>{n.push(new t._Window(this.wire,{uuid:e.uuid,name:e.name}))})),n}isRunning(){return this.wire.sendAction(\"is-application-running\",this.identity).then((({payload:e})=>e.data))}async quit(e=!1){try{await this._close(e),await this.wire.sendAction(\"destroy-application\",{force:e,...this.identity})}catch(e){if(![\"Remote connection has closed\",\"Could not locate the requested application\"].some((t=>e.message.includes(t))))throw e}}async _close(e=!1){try{await this.wire.sendAction(\"close-application\",{force:e,...this.identity})}catch(e){if(!e.message.includes(\"Remote connection has closed\"))throw e}}close(e=!1){return console.warn(\"Deprecation Warning: Application.close is deprecated Please use Application.quit\"),this.wire.sendAction(\"application-close\",this.identity).catch((e=>{})),this._close(e)}getChildWindows(){return this.wire.sendAction(\"get-child-windows\",this.identity).then((({payload:e})=>{const t=[];return e.data.forEach((e=>{t.push({uuid:this.identity.uuid,name:e})})),this.windowListFromIdentityList(t)}))}getManifest(){return this.wire.sendAction(\"get-application-manifest\",this.identity).then((({payload:e})=>e.data))}getParentUuid(){return this.wire.sendAction(\"get-parent-application\",this.identity).then((({payload:e})=>e.data))}getShortcuts(){return this.wire.sendAction(\"get-shortcuts\",this.identity).then((({payload:e})=>e.data))}async getViews(){const{payload:e}=await this.wire.sendAction(\"application-get-views\",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}getZoomLevel(){return this.wire.sendAction(\"get-application-zoom-level\",this.identity).then((({payload:e})=>e.data))}getWindow(){return this.wire.sendAction(\"application-get-window\",this.identity).catch((e=>{})),Promise.resolve(this.window)}registerUser(e,t){return this.wire.sendAction(\"register-user\",{userName:e,appName:t,...this.identity}).then((()=>{}))}removeTrayIcon(){return this.wire.sendAction(\"remove-tray-icon\",this.identity).then((()=>{}))}restart(){return this.wire.sendAction(\"restart-application\",this.identity).then((()=>{}))}run(){return console.warn(\"Deprecation Warning: Application.run is deprecated Please use fin.Application.start\"),this.wire.sendAction(\"application-run\",this.identity).catch((e=>{})),this._run()}_run(e={}){return this.wire.sendAction(\"run-application\",{manifestUrl:this._manifestUrl,opts:e,...this.identity}).then((()=>{}))}scheduleRestart(){return this.wire.sendAction(\"relaunch-on-close\",this.identity).then((()=>{}))}async sendApplicationLog(){const{payload:e}=await this.wire.sendAction(\"send-application-log\",this.identity);return e.data}async setJumpList(e){await this.wire.sendAction(\"set-jump-list\",{config:e,...this.identity})}setTrayIcon(e){return this.wire.sendAction(\"set-tray-icon\",{enabledIcon:e,...this.identity}).then((()=>{}))}setShortcuts(e){return this.wire.sendAction(\"set-shortcuts\",{data:e,...this.identity}).then((()=>{}))}async setShortcutQueryParams(e){await this.wire.sendAction(\"set-shortcut-query-args\",{data:e,...this.identity})}setZoomLevel(e){return this.wire.sendAction(\"set-application-zoom-level\",{level:e,...this.identity}).then((()=>{}))}async setAppLogUsername(e){await this.wire.sendAction(\"set-app-log-username\",{data:e,...this.identity})}getTrayIconInfo(){return this.wire.sendAction(\"get-tray-icon-info\",this.identity).then((({payload:e})=>e.data))}hasTrayIcon(){return this.wire.sendAction(\"has-tray-icon\",this.identity).then((({payload:e})=>e.data))}terminate(){return this.wire.sendAction(\"terminate-application\",this.identity).then((()=>{}))}wait(){return this.wire.sendAction(\"wait-for-hung-application\",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction(\"get-info\",this.identity).then((({payload:e})=>e.data))}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction(\"application-get-process-info\",this.identity);return e}async setFileDownloadLocation(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t};await this.wire.sendAction(\"set-file-download-location\",{...n,downloadLocation:e})}async getFileDownloadLocation(){const{payload:{data:e}}=await this.wire.sendAction(\"get-file-download-location\",this.identity);return e}async showTrayIconPopupMenu(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t},{payload:i}=await this.wire.sendAction(\"show-tray-icon-popup-menu\",{...n,options:e});return i.data}async closeTrayIconPopupMenu(){const{name:e}=this.wire.me,t={uuid:this.identity.uuid,name:e};await this.wire.sendAction(\"close-tray-icon-popup-menu\",{...t})}}return j.Application=i,j}function Z(){return q||(q=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(function(){if(K)return F;K=1,Object.defineProperty(F,\"__esModule\",{value:!0}),F.ApplicationModule=void 0;const e=d,t=O,n=Y();class i extends e.Base{async wrap(e){this.wire.sendAction(\"wrap-application\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}wrapSync(e){this.wire.sendAction(\"wrap-application-sync\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}async _create(e){return void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&void 0===e.isPlatformController&&(e.autoShow=!0),await this.wire.sendAction(\"create-application\",e),this.wrap({uuid:e.uuid})}create(e){return console.warn(\"Deprecation Warning: fin.Application.create is deprecated. Please use fin.Application.start\"),this.wire.sendAction(\"application-create\").catch((e=>{})),this._create(e)}async start(e){this.wire.sendAction(\"start-application\").catch((e=>{}));const t=await this._create(e);return await this.wire.sendAction(\"run-application\",{uuid:e.uuid}),t}async startManyManifests(e,t){return this.wire.sendAction(\"run-applications\",{applications:e,opts:t}).then((()=>{}))}getCurrent(){return this.wire.sendAction(\"get-current-application\").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction(\"get-current-application-sync\").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}async startFromManifest(e,t){this.wire.sendAction(\"application-start-from-manifest\").catch((e=>{}));const n=await this._createFromManifest(e);return await n._run(t),n}createFromManifest(e){return console.warn(\"Deprecation Warning: fin.Application.createFromManifest is deprecated. Please use fin.Application.startFromManifest\"),this.wire.sendAction(\"application-create-from-manifest\").catch((e=>{})),this._createFromManifest(e)}_createFromManifest(e){return this.wire.sendAction(\"get-application-manifest\",{manifestUrl:e}).then((({payload:e})=>{const t=e.data.platform?e.data.platform.uuid:e.data.startup_app.uuid;return this.wrap({uuid:t})})).then((t=>(t._manifestUrl=e,t)))}}return F.ApplicationModule=i,F}(),e),n(Y(),e)}(R)),R}H.WebContents=D;var Q={};Object.defineProperty(Q,\"__esModule\",{value:!0}),Q.promisifySubscription=void 0;var X,ee,te;function ne(){if(X)return S;X=1,Object.defineProperty(S,\"__esModule\",{value:!0}),S._Window=void 0;const e=Z(),t=H,n=J(),i=T,r=Q;class o extends t.WebContents{constructor(e,t){super(e,t,\"window\")}async createWindow(e){this.wire.sendAction(\"window-create-window\",this.identity).catch((e=>{}));const t=await(0,r.promisifySubscription)(this,\"fire-constructor-callback\");void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&(e.autoShow=!0),(0,i.handleDeprecatedWarnings)(e);const n=this.wire.environment.createChildContent({entityType:\"window\",options:e}),[o]=await Promise.all([t.getValue(),n]);let s;const{success:a}=o,c=o.data,{message:d}=c;s=a?{httpResponseCode:c.httpResponseCode,apiInjected:c.apiInjected}:{message:c.message,networkErrorCode:c.networkErrorCode,stack:c.stack};const h={message:d,cbPayload:s,success:a};try{this.getWebWindow().fin.__internal_.openerSuccessCBCalled()}catch(e){}return h.success?this:Promise.reject(h)}getAllFrames(){return this.wire.sendAction(\"get-all-frames\",this.identity).then((({payload:e})=>e.data))}getBounds(){return this.wire.sendAction(\"get-window-bounds\",this.identity).then((({payload:e})=>e.data))}center(){return this.wire.sendAction(\"center-window\",this.identity).then((()=>{}))}blur(){return this.wire.sendAction(\"blur-window\",this.identity).then((()=>{}))}bringToFront(){return this.wire.sendAction(\"bring-window-to-front\",this.identity).then((()=>{}))}animate(e,t){return this.wire.sendAction(\"animate-window\",{transitions:e,options:t,...this.identity}).then((()=>{}))}hide(){return this.wire.sendAction(\"hide-window\",this.identity).then((()=>{}))}close(e=!1){return this.wire.sendAction(\"close-window\",{force:e,...this.identity}).then((()=>{Object.setPrototypeOf(this,null)}))}focusedWebViewWasChanged(){return this.wire.sendAction(\"focused-webview-changed\",this.identity).then((()=>{}))}getNativeId(){return this.wire.sendAction(\"get-window-native-id\",this.identity).then((({payload:e})=>e.data))}async getCurrentViews(){const{payload:e}=await this.wire.sendAction(\"window-get-views\",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}disableFrame(){return console.warn(\"Function is deprecated; use disableUserMovement instead.\"),this.wire.sendAction(\"disable-window-frame\",this.identity).then((()=>{}))}disableUserMovement(){return this.wire.sendAction(\"disable-window-frame\",this.identity).then((()=>{}))}enableFrame(){return console.warn(\"Function is deprecated; use enableUserMovement instead.\"),this.wire.sendAction(\"enable-window-frame\",this.identity).then((()=>{}))}enableUserMovement(){return this.wire.sendAction(\"enable-window-frame\",this.identity).then((()=>{}))}flash(){return this.wire.sendAction(\"flash-window\",this.identity).then((()=>{}))}stopFlashing(){return this.wire.sendAction(\"stop-flash-window\",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction(\"get-window-info\",this.identity).then((({payload:e})=>e.data))}async getLayout(e){this.wire.sendAction(\"window-get-layout\",this.identity).catch((e=>{}));const t=await this.getOptions();if(!t.layout&&!t.layoutSnapshot)throw new Error(\"Window does not have a Layout\");return this.fin.Platform.Layout.wrap(e??this.identity)}getOptions(){return this.wire.sendAction(\"get-window-options\",this.identity).then((({payload:e})=>e.data))}getParentApplication(){return this.wire.sendAction(\"window-get-parent-application\",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity))}getParentWindow(){return this.wire.sendAction(\"window-get-parent-window\",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity)).then((e=>e.getWindow()))}async getSnapshot(e){const t={area:e,...this.identity};console.warn(\"Window.getSnapshot has been deprecated, please use Window.capturePage\");return(await this.wire.sendAction(\"get-window-snapshot\",t)).payload.data}getState(){return this.wire.sendAction(\"get-window-state\",this.identity).then((({payload:e})=>e.data))}getWebWindow(){return this.wire.sendAction(\"window-get-web-window\",this.identity).catch((e=>{})),this.wire.environment.getWebWindow(this.identity)}isMainWindow(){return this.wire.sendAction(\"window-is-main-window\",this.identity).catch((e=>{})),this.me.uuid===this.me.name}isShowing(){return this.wire.sendAction(\"is-window-showing\",this.identity).then((({payload:e})=>e.data))}maximize(){return this.wire.sendAction(\"maximize-window\",this.identity).then((()=>{}))}minimize(){return this.wire.sendAction(\"minimize-window\",this.identity).then((()=>{}))}moveBy(e,t,n){return this.wire.sendAction(\"move-window-by\",{deltaLeft:e,deltaTop:t,positioningOptions:n,...this.identity}).then((()=>{}))}moveTo(e,t,n){return this.wire.sendAction(\"move-window\",{left:e,top:t,positioningOptions:n,...this.identity}).then((()=>{}))}resizeBy(e,t,n,i){return this.wire.sendAction(\"resize-window-by\",{deltaWidth:Math.floor(e),deltaHeight:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}resizeTo(e,t,n,i){return this.wire.sendAction(\"resize-window\",{width:Math.floor(e),height:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}restore(){return this.wire.sendAction(\"restore-window\",this.identity).then((()=>{}))}setAsForeground(){return this.wire.sendAction(\"set-foreground-window\",this.identity).then((()=>{}))}setBounds(e,t){return this.wire.sendAction(\"set-window-bounds\",{...e,...this.identity,positioningOptions:t}).then((()=>{}))}show(e=!1){return this.wire.sendAction(\"show-window\",{force:e,...this.identity}).then((()=>{}))}showAt(e,t,n=!1){return this.wire.sendAction(\"show-at-window\",{force:n,left:Math.floor(e),top:Math.floor(t),...this.identity}).then((()=>{}))}updateOptions(e){return this.wire.sendAction(\"update-window-options\",{options:e,...this.identity}).then((()=>{}))}authenticate(e,t){return this.wire.sendAction(\"window-authenticate\",{userName:e,password:t,...this.identity}).then((()=>{}))}async showPopupMenu(e){const{payload:t}=await this.wire.sendAction(\"show-popup-menu\",{options:e,...this.identity});return t.data}async closePopupMenu(){return this.wire.sendAction(\"close-popup-menu\",{...this.identity}).then((()=>{}))}async dispatchPopupResult(e){this.wire.sendAction(\"window-dispatch-popup-result\",this.identity).catch((e=>{})),await this.wire.sendAction(\"dispatch-popup-result\",{data:e,...this.identity})}async print(e={content:\"self\"}){switch(e.content){case void 0:case\"self\":return super.print(e);case\"screenshot\":return this.wire.sendAction(\"print-screenshot\",this.identity).then((()=>{}));case\"views\":return this.wire.sendAction(\"print-views\",{...this.identity,options:e}).then((()=>{}));default:return}}}return S._Window=o,S}function ie(){return te||(te=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(function(){if(ee)return _;ee=1,Object.defineProperty(_,\"__esModule\",{value:!0}),_._WindowModule=void 0;const e=d,t=O,n=ne();class i extends e.Base{async wrap(e){this.wire.sendAction(\"window-wrap\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}wrapSync(e){this.wire.sendAction(\"window-wrap-sync\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}create(e){return this.wire.sendAction(\"create-window\").catch((e=>{})),new n._Window(this.wire,{uuid:this.me.uuid,name:e.name}).createWindow(e)}getCurrent(){if(this.wire.sendAction(\"get-current-window\").catch((e=>{})),!this.wire.me.isWindow)throw new Error(\"You are not in a Window context\");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction(\"get-current-window-sync\").catch((e=>{})),!this.wire.me.isWindow)throw new Error(\"You are not in a Window context\");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return _._WindowModule=i,_}(),e),n(ne(),e)}(M)),M}Q.promisifySubscription=async(e,t,n=(()=>!0),i)=>{let r,o,s;const a=new Promise(((e,t)=>{r=e,o=t})),c=e=>{n(e)&&(clearTimeout(s),r(e))};return await e.on(t,c),i&&(s=setTimeout((()=>o(new Error(\"event timed out\"))),i)),a.finally((()=>{e.removeListener(t,c).catch((()=>null))})),{getValue:()=>a}},Object.defineProperty(c,\"__esModule\",{value:!0}),c.System=void 0;const re=d,oe=g,se=ie(),ae=t;class ce extends re.EmitterBase{constructor(e){super(e,\"system\")}sendExternalProcessRequest(e,t){return new Promise(((n,i)=>{const r=\"external-process-exited\";let o,s,a,c;\"function\"==typeof t.listener&&(a=e=>{const n=e||{};s={topic:\"exited\",uuid:n.processUuid||\"\",exitCode:n.exitCode||0},o===e.processUuid&&(t.listener(s),c.removeListener(r,a))},this.wire.me.name||(this.wire.me.name=this.wire.me.uuid),c=new se._Window(this.wire,this.wire.me),c.on(r,a)),this.wire.sendAction(e,t).then((({payload:e})=>{o=e.data.uuid,n(e.data),s&&o===s.uuid&&(t.listener(s),c.removeListener(r,a))})).catch((e=>{c&&c.removeListener(r,a),i(e)}))}))}getVersion(){return this.wire.sendAction(\"get-version\").then((({payload:e})=>e.data))}clearCache(e){return this.wire.sendAction(\"clear-cache\",e).then((()=>{}))}deleteCacheOnExit(){return this.wire.sendAction(\"delete-cache-request\").then((()=>{}))}exit(){return this.wire.sendAction(\"exit-desktop\").then((()=>{}))}async fetchManifest(e){const{payload:{data:t}}=await this.wire.sendAction(\"fetch-manifest\",{manifestUrl:e});return t}flushCookieStore(){return this.wire.sendAction(\"flush-cookie-store\").then((()=>{}))}getAllWindows(){return this.wire.sendAction(\"get-all-windows\").then((({payload:e})=>e.data))}getAllApplications(){return this.wire.sendAction(\"get-all-applications\").then((({payload:e})=>e.data))}getCommandLineArguments(){return this.wire.sendAction(\"get-command-line-arguments\").then((({payload:e})=>e.data))}async getCrashReporterState(){const{payload:{data:{diagnosticMode:e,isRunning:t}}}=await this.wire.sendAction(\"get-crash-reporter-state\");return console.warn(\"diagnosticMode property is deprecated. It will be removed in a future version\"),{diagnosticMode:e,diagnosticsMode:e,isRunning:t}}async startCrashReporter(e){const t=e,n={...t,diagnosticMode:t.diagnosticsMode||t.diagnosticMode},{payload:{data:{diagnosticMode:i,isRunning:r}}}=await this.wire.sendAction(\"start-crash-reporter\",n);return{diagnosticMode:i,diagnosticsMode:i,isRunning:r}}getUniqueUserId(){return this.wire.sendAction(\"get-unique-user-id\").then((({payload:e})=>e.data))}getEntityInfo(e,t){return this.wire.sendAction(\"get-entity-info\",{uuid:e,name:t}).then((({payload:e})=>e.data))}getEnvironmentVariable(e){return this.wire.sendAction(\"get-environment-variable\",{environmentVariables:e}).then((({payload:e})=>e.data))}getFocusedWindow(){return this.wire.sendAction(\"get-focused-window\").then((({payload:e})=>e.data))}async isAppCertified(e){const{payload:{data:{certifiedInfo:t}}}=await this.wire.sendAction(\"is-app-certified\",{manifestUrl:e});return t}getInstalledRuntimes(){return this.wire.sendAction(\"get-installed-runtimes\").then((({payload:e})=>e.data.runtimes))}async getInstalledApps(){const{payload:{data:{installedApps:e}}}=await this.wire.sendAction(\"get-installed-apps\");return e}getLog(e){return this.wire.sendAction(\"view-log\",e).then((({payload:e})=>e.data))}getMachineId(){return this.wire.sendAction(\"get-machine-id\").then((({payload:e})=>e.data))}getMinLogLevel(){return this.wire.sendAction(\"get-min-log-level\").then((({payload:e})=>e.data))}getLogList(){return this.wire.sendAction(\"list-logs\").then((({payload:e})=>e.data))}getMonitorInfo(){return this.wire.sendAction(\"get-monitor-info\").then((({payload:e})=>e.data))}getMousePosition(){return this.wire.sendAction(\"get-mouse-position\").then((({payload:e})=>e.data))}getProcessList(){return console.warn(\"System.getProcessList has been deprecated. Please consider using our new process APIs: Window.getProcessInfo, View.getProcessInfo, Application.getProcessInfo, System.getAllProcessInfo\"),this.wire.sendAction(\"process-snapshot\").then((({payload:e})=>e.data))}async getAllProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction(\"get-all-process-info\",this.identity);return e}getProxySettings(){return this.wire.sendAction(\"get-proxy-settings\").then((({payload:e})=>e.data))}getRuntimeInfo(){return this.wire.sendAction(\"get-runtime-info\").then((({payload:e})=>e.data))}getRvmInfo(){return this.wire.sendAction(\"get-rvm-info\").then((({payload:e})=>e.data))}getHostSpecs(){return this.wire.sendAction(\"get-host-specs\").then((({payload:e})=>e.data))}getOSInfo(){return this.wire.sendAction(\"get-os-info\").then((({payload:e})=>e.data))}launchExternalProcess(e){return this.sendExternalProcessRequest(\"launch-external-process\",e)}monitorExternalProcess(e){return this.sendExternalProcessRequest(\"monitor-external-process\",e)}log(e,t){return this.wire.sendAction(\"write-to-log\",{level:e,message:t}).then((()=>{}))}openUrlWithBrowser(e){return this.wire.sendAction(\"open-url-with-browser\",{url:e}).then((()=>{}))}async registerCustomProtocol(e){if(\"object\"!=typeof e)throw new Error(\"Must provide an object with a `protocolName` property having a string value.\");await this.wire.sendAction(\"register-custom-protocol\",e)}async unregisterCustomProtocol(e){await this.wire.sendAction(\"unregister-custom-protocol\",{protocolName:e})}async getCustomProtocolState(e){return this.wire.sendAction(\"get-custom-protocol-state\",{protocolName:e}).then((({payload:e})=>e.data))}releaseExternalProcess(e){return this.wire.sendAction(\"release-external-process\",{uuid:e}).then((()=>{}))}showDeveloperTools(e){return this.wire.sendAction(\"show-developer-tools\",e).then((()=>{}))}terminateExternalProcess(e){return this.wire.sendAction(\"terminate-external-process\",e).then((()=>{}))}updateProxySettings(e){return this.wire.sendAction(\"update-proxy\",e).then((()=>{}))}async downloadAsset(e,t){const n=()=>{};let i=n,r=n;const o=new Promise(((e,t)=>{i=e,r=t}));if(\"openfin\"!==this.wire.environment.type)throw new oe.NotSupportedError(\"downloadAsset only supported in an OpenFin Render process\");const s=oe.RuntimeError.getCallSite(),a=this.wire.environment.getNextMessageId().toString(),c=`asset-download-progress-${a}`,d=`asset-download-error-${a}`,h=`asset-download-complete-${a}`,l=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},u=()=>{this.removeListener(c,l)};await Promise.all([this.on(c,l),this.once(d,(e=>{u();const{reason:t,err:n}=e;r(new oe.RuntimeError({reason:t,error:n},s))})),this.once(h,(()=>{u(),i()}))]);const p=Object.assign(e,{downloadId:a});return await this.wire.sendAction(\"download-asset\",p).catch((e=>{throw u(),e})),o}downloadRuntime(e,t){const n=oe.RuntimeError.getCallSite();return new Promise(((i,r)=>{if(\"openfin\"!==this.wire.environment.type)return void r(new oe.NotSupportedError(\"downloadRuntime only supported in an OpenFin Render process\"));const o=this.wire.environment.getNextMessageId().toString(),s=`runtime-download-progress-${o}`,a=`runtime-download-error-${o}`,c=`runtime-download-complete-${o}`,d=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},h=()=>{this.removeListener(s,d)};this.on(s,d),this.once(a,(e=>{h();const{reason:t,err:i}=e;r(new oe.RuntimeError({reason:t,error:i},n))})),this.once(c,(()=>{h(),i()}));const l=Object.assign(e,{downloadId:o});this.wire.sendAction(\"download-runtime\",l).catch((e=>{h(),r(e)}))}))}downloadPreloadScripts(e){return this.wire.sendAction(\"download-preload-scripts\",{scripts:e}).then((({payload:e})=>e.data))}getAllExternalApplications(){return this.wire.sendAction(\"get-all-external-applications\").then((({payload:e})=>e.data))}getAppAssetInfo(e){return this.wire.sendAction(\"get-app-asset-info\",e).then((({payload:e})=>e.data))}getCookies(e){const t=this.wire.environment.getUrl(),n=Object.assign(e,{url:t});return this.wire.sendAction(\"get-cookies\",n).then((({payload:e})=>e.data))}setMinLogLevel(e){return this.wire.sendAction(\"set-min-log-level\",{level:e}).then((()=>{}))}resolveUuid(e){return this.wire.sendAction(\"resolve-uuid\",{entityKey:e}).then((({payload:e})=>e.data))}executeOnRemote(e,t){return t.requestingIdentity=e,this.wire.ferryAction(t)}readRegistryValue(e,t,n){return this.wire.sendAction(\"read-registry-value\",{rootKey:e,subkey:t,value:n}).then((({payload:e})=>e.data))}registerExternalConnection(e){return this.wire.sendAction(\"register-external-connection\",{uuid:e}).then((({payload:e})=>e.data))}async getServiceConfiguration(e){if(\"string\"!=typeof e.name)throw new Error(\"Must provide an object with a `name` property having a string value\");const{name:t}=e;return this.wire.sendAction(\"get-service-configuration\",{name:t}).then((({payload:e})=>e.data))}async getSystemAppConfig(e){if(\"string\"!=typeof e)throw new Error(\"Must provide a string value for name of system app\");return this.wire.sendAction(\"get-system-app-configuration\",{name:e}).then((({payload:e})=>e.data))}async registerShutdownHandler(e){this.wire.sendAction(\"system-register-shutdown-handler\").catch((e=>{}));const{uuid:t,name:n}=this.wire.me;this.on(\"system-shutdown\",(i=>{e({proceed:()=>{this.wire.environment.raiseEvent(\"application/system-shutdown-handled\",{uuid:t,name:n,topic:\"application\"})}})}))}runRvmHealthCheck(){return this.wire.sendAction(\"run-rvm-health-check\").then((({payload:e})=>e.data))}async launchManifest(e,t={}){const{subscribe:n,...i}=t,r=i;if(n){const e=new ae.EventEmitter;n(e);const t=\"app-version-progress\",i=\"runtime-status\",o=\"app-version-complete\",s=\"app-version-error\",a=this.wire.environment.getNextMessageId().toString();r.appVersionId=a;const c=[o,t,i,s],d=e=>{const{appVersionId:t,topic:n,type:i,...r}=e;return{...r,type:c.find((e=>i.includes(e)))}},h=t=>{const n=d(t);e.emit(n.type,n)},l=()=>{this.removeListener(`${t}.${a}`,h),this.removeListener(`${i}.${a}`,h),this.removeListener(`${o}.${a}`,h),this.removeListener(`${s}.${a}`,h),this.removeListener(`${o}.${a}`,l),this.removeListener(`${s}.${a}`,l)};await Promise.all([this.on(`${t}.${a}`,h),this.on(`${i}.${a}`,h),this.once(`${o}.${a}`,h),this.once(`${s}.${a}`,h),this.once(`${o}.${a}`,l),this.once(`${s}.${a}`,l)])}return(await this.wire.sendAction(\"launch-manifest\",{manifestUrl:e,opts:r})).payload.data.manifest}async queryPermissionForCurrentContext(e){const t={uuid:this.wire.me.uuid,name:this.wire.me.name};return(await this.wire.sendAction(\"query-permission-for-current-context\",{apiName:e,identity:t})).payload.data}async enableNativeWindowIntegrationProvider(e){const{payload:t}=await this.wire.sendAction(\"enable-native-window-integration-provider\",{permissions:e});return t.data}async registerUsage({data:e,type:t}){await this.wire.sendAction(\"register-usage\",{data:e,type:t})}async getPrinters(){const{payload:e}=await this.wire.sendAction(\"system-get-printers\");return e.data}async updateProcessLoggingOptions(e){await this.wire.sendAction(\"system-update-process-logging-options\",{options:e})}async getDomainSettings(){const{payload:{data:e}}=await this.wire.sendAction(\"get-domain-settings\",this.identity);return e}async setDomainSettings(e){await this.wire.sendAction(\"set-domain-settings\",{domainSettings:e,...this.identity})}async refreshExtensions(){const{payload:e}=await this.wire.sendAction(\"refresh-extensions\");return e.data}async getInstalledExtensions(){const{payload:e}=await this.wire.sendAction(\"get-installed-extensions\");return e.data}}c.System=ce;var de={},he={};Object.defineProperty(he,\"__esModule\",{value:!0}),he.RefCounter=void 0;he.RefCounter=class{constructor(){this.topicRefMap=new Map}incRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t+1;n=i,this.topicRefMap.set(e,i)}else this.topicRefMap.set(e,1),n=1;return n}decRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t-1;this.topicRefMap.set(e,i),n=i}else n=-1;return n}actOnFirst(e,t,n){return 1===this.incRefCount(e)?t():n()}actOnLast(e,t,n){return 0===this.decRefCount(e)?t():n()}};var le={},ue={},pe={};Object.defineProperty(pe,\"__esModule\",{value:!0}),pe.ChannelBase=pe.ProtectedItems=void 0;const we=e=>async(t,n,i)=>{const r=await e(t,n,i);return void 0===r?n:r};pe.ProtectedItems=class{constructor(e,t){this.providerIdentity=e,this.close=t}};class ye{static defaultAction(e){throw new Error(`No action registered at target for ${e}`)}constructor(){this.subscriptions=new Map}async processAction(e,t,n){try{const i=this.subscriptions.has(e)?this.subscriptions.get(e):(t,n)=>(this.defaultAction??ye.defaultAction)(e,t,n),r=this.preAction?await this.preAction(e,t,n):t,o=await i(r,n);return this.postAction?await this.postAction(e,o,n):o}catch(t){if(this.errorMiddleware)return this.errorMiddleware(e,t,n);throw t}}beforeAction(e){if(this.preAction)throw new Error(\"Already registered beforeAction middleware\");this.preAction=we(e)}onError(e){if(this.errorMiddleware)throw new Error(\"Already registered error middleware\");this.errorMiddleware=e}afterAction(e){if(this.postAction)throw new Error(\"Already registered afterAction middleware\");this.postAction=we(e)}remove(e){this.subscriptions.delete(e)}setDefaultAction(e){if(this.defaultAction)throw new Error(\"default action can only be set once\");this.defaultAction=e}register(e,t){if(this.subscriptions.has(e))throw new Error(`Subscription already registered for action: ${e}. Unsubscribe before adding new subscription`);return this.subscriptions.set(e,t),!0}}pe.ChannelBase=ye;var fe,ge,me,ve=s&&s.__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)},Ce=s&&s.__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};Object.defineProperty(ue,\"__esModule\",{value:!0}),ue.ChannelClient=void 0;const be=pe,Ie=new Map;class Ee extends be.ChannelBase{static closeChannelByEndpointId(e){const t=Ie.get(e);t&&ve(t,me,\"f\").call(t)}static handleProviderDisconnect(e){for(const t of Ie.values())t.providerIdentity.channelId===e.channelId&&(t.disconnectListener(e),ve(t,me,\"f\").call(t))}constructor(e,t,n){super(),fe.set(this,void 0),ge.set(this,void 0),this.processAction=(e,t,n)=>super.processAction(e,t,n),me.set(this,(()=>{Ie.delete(this.endpointId),ve(this,ge,\"f\").close()})),Ce(this,fe,new be.ProtectedItems(e,t),\"f\"),this.disconnectListener=()=>{},this.endpointId=e.endpointId,Ce(this,ge,n,\"f\"),Ie.set(this.endpointId,this),n.receive(this.processAction)}get providerIdentity(){return ve(this,fe,\"f\").providerIdentity}async dispatch(e,t){if(ve(this,ge,\"f\").isEndpointConnected(this.providerIdentity.channelId))return ve(this,ge,\"f\").send(this.providerIdentity.channelId,e,t);throw new Error(\"The client you are trying to dispatch from is disconnected from the target provider.\")}onDisconnection(e){this.disconnectListener=t=>{try{e(t)}catch(e){throw new Error(`Error while calling the onDisconnection callback: ${e.message}`)}finally{this.disconnectListener=()=>{}}}}async disconnect(){await this.sendDisconnectAction(),ve(this,me,\"f\").call(this)}async sendDisconnectAction(){const e=ve(this,fe,\"f\");await e.close()}static async wireClose(e,t,n){const{channelName:i,uuid:r,name:o}=t;await e.sendAction(\"disconnect-from-channel\",{channelName:i,uuid:r,name:o,endpointId:n})}}ue.ChannelClient=Ee,fe=new WeakMap,ge=new WeakMap,me=new WeakMap;var xe={},Ae={};Object.defineProperty(Ae,\"__esModule\",{value:!0}),Ae.exhaustiveCheck=void 0,Ae.exhaustiveCheck=function(e,t){throw new Error(`Unsupported value: ${e}${t?`\\n Supported values are: ${t.join(\"\")}`:\"\"}`)};var Pe,Me,_e,Oe={},Se=s&&s.__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},Re=s&&s.__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)};Object.defineProperty(Oe,\"__esModule\",{value:!0}),Oe.ClassicInfo=Oe.ClassicStrategy=void 0;Oe.ClassicStrategy=class{constructor(e,t,n,i){this.messageReceiver=t,this.endpointId=n,this.providerIdentity=i,Pe.set(this,void 0),Me.set(this,new Map),_e.set(this,new Map),this.send=async(e,t,n)=>{const i=Re(this,Me,\"f\").get(e);if(!i)throw new Error(`Could not locate routing info for endpoint ${e}`);const r={...i};r.isLocalEndpointId&&delete r.endpointId,delete r.isLocalEndpointId;const o=Re(this,Pe,\"f\").sendAction(\"send-channel-message\",{...r,providerIdentity:this.providerIdentity,action:t,payload:n});Re(this,_e,\"f\").get(e)?.add(o);return(await o.catch((e=>{throw new Error(e.message)})).finally((()=>{Re(this,_e,\"f\").get(e)?.delete(o)}))).payload.data.result},this.close=async()=>{this.messageReceiver.removeEndpoint(this.providerIdentity.channelId,this.endpointId),[...Re(this,Me,\"f\").keys()].forEach((e=>this.closeEndpoint(e))),Se(this,Me,new Map,\"f\")},Se(this,Pe,e,\"f\")}onEndpointDisconnect(e,t){}receive(e){this.messageReceiver.addEndpoint(e,this.providerIdentity.channelId,this.endpointId)}async closeEndpoint(e){const t=Re(this,Me,\"f\").get(e);Re(this,Me,\"f\").delete(e);const n=Re(this,_e,\"f\").get(e);n?.forEach((n=>{const i=`Channel connection with identity uuid: ${t?.uuid} / name: ${t?.name} / endpointId: ${e} no longer connected.`;n.cancel(new Error(i))}))}isEndpointConnected(e){return Re(this,Me,\"f\").has(e)}addEndpoint(e,t){Re(this,Me,\"f\").set(e,t.endpointIdentity),Re(this,_e,\"f\").set(e,new Set)}isValidEndpointPayload(e){return\"string\"==typeof e?.endpointIdentity?.endpointId||\"string\"==typeof e?.endpointIdentity?.channelId}},Pe=new WeakMap,Me=new WeakMap,_e=new WeakMap,Oe.ClassicInfo={version:5,minimumVersion:0,type:\"classic\"};var Fe={},je={},ke={};Object.defineProperty(ke,\"__esModule\",{value:!0}),ke.errorToPOJO=void 0,ke.errorToPOJO=function(e){return{stack:e.stack,name:e.name,message:e.message,toString:()=>e.stack||e.toString()}};var Le,Te,$e=s&&s.__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)},Be=s&&s.__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};Object.defineProperty(je,\"__esModule\",{value:!0}),je.RTCEndpoint=void 0;const Ge=ke;je.RTCEndpoint=class{static isValidEndpointPayload(e){const t=e=>\"object\"==typeof e&&null!==e;return t(e)&&t(e.endpointIdentity)&&t(e.rtc)&&\"string\"==typeof e.endpointIdentity.endpointId}constructor({rtc:e,endpointIdentity:t}){this.responseMap=new Map,Le.set(this,null),Te.set(this,void 0),this.connectionStateChangeHandler=e=>{\"connected\"!==this.rtc.rtcClient.connectionState&&(this.rtc.rtcClient.removeEventListener(\"connectionstatechange\",this.connectionStateChangeHandler),this.close(),$e(this,Te,\"f\")&&$e(this,Te,\"f\").call(this))},this.send=async(e,t)=>{const n=`message-${Math.random()}`,i=new Promise(((e,t)=>{this.responseMap.set(n,{resolve:e,reject:t})}));return this.rtc.channels.request.send(JSON.stringify({action:e,payload:t,messageId:n})),i},this.close=()=>{this.responseMap.forEach((e=>e.reject(\"Connection has closed.\"))),this.responseMap=new Map,this.rtc.channels.request.close(),this.rtc.channels.response.close(),this.rtc.rtcClient.close()},this.rtc=e,this.endpointIdentity=t,this.rtc.channels.response.addEventListener(\"message\",(e=>{let{data:t}=e;e.data instanceof ArrayBuffer&&(t=(new TextDecoder).decode(e.data));const{messageId:n,payload:i,success:r,error:o}=JSON.parse(t),{resolve:s,reject:a}=this.responseMap.get(n)??{};s&&a?(this.responseMap.delete(n),r?s(i):a(o)):(console.log(\"Could not find id in responseMap.\"),console.log(e))})),this.rtc.channels.request.addEventListener(\"message\",(async e=>{let{data:n}=e;e.data instanceof ArrayBuffer&&(n=(new TextDecoder).decode(e.data));const{messageId:i,action:r,payload:o}=JSON.parse(n);if($e(this,Le,\"f\"))try{const e=await $e(this,Le,\"f\").call(this,r,o,t);this.rtc.channels.response.send(JSON.stringify({messageId:i,payload:e,success:!0}))}catch(e){\"open\"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,error:(0,Ge.errorToPOJO)(e),success:!1}))}else\"open\"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,success:!1,error:\"Connection not ready.\"}))})),this.rtc.rtcClient.addEventListener(\"connectionstatechange\",this.connectionStateChangeHandler),Object.values(this.rtc.channels).forEach((e=>{e.onclose=e=>{[...this.responseMap.values()].forEach((e=>e.reject(new Error(\"RTCDataChannel closed unexpectedly, this is most commonly caused by message size. Note: RTC Channels have a message size limit of ~255kB.\")))),this.close(),$e(this,Te,\"f\")&&$e(this,Te,\"f\").call(this)}}))}onDisconnect(e){if($e(this,Te,\"f\"))throw new Error(\"RTCEndpoint disconnectListener cannot be set twice.\");Be(this,Te,e,\"f\")}receive(e){if($e(this,Le,\"f\"))throw new Error(\"You have already set a listener for this RTC Endpoint.\");Be(this,Le,e,\"f\")}get connected(){return\"connected\"===this.rtc.rtcClient.connectionState}},Le=new WeakMap,Te=new WeakMap;var We,He,Ne,De={},Ue=s&&s.__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)},Ve=s&&s.__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};Object.defineProperty(De,\"__esModule\",{value:!0}),De.EndpointStrategy=void 0;De.EndpointStrategy=class{constructor(e,t,n){this.EndpointType=e,this.StrategyName=n,We.set(this,null),He.set(this,new Map),Ne.set(this,!0),this.send=async(e,t,n)=>this.getEndpointById(e).send(t,n),this.close=async()=>{Ue(this,Ne,\"f\")&&(Ue(this,He,\"f\").forEach((e=>e.close())),Ve(this,He,new Map,\"f\")),Ve(this,Ne,!1,\"f\")},this.isValidEndpointPayload=t}onEndpointDisconnect(e,t){this.getEndpointById(e).onDisconnect(t)}receive(e){if(Ue(this,We,\"f\"))throw new Error(`You have already set a listener for this ${this.StrategyName} Strategy`);Ve(this,We,e,\"f\"),Ue(this,He,\"f\").forEach((e=>e.receive(Ue(this,We,\"f\"))))}getEndpointById(e){const t=Ue(this,He,\"f\").get(e);if(!t)throw new Error(`Client with endpoint id ${e} is not connected`);return t}get connected(){return Ue(this,Ne,\"f\")}isEndpointConnected(e){return Ue(this,He,\"f\").has(e)}addEndpoint(e,t){if(!Ue(this,Ne,\"f\"))return void console.warn(`Adding endpoint to disconnected ${this.StrategyName} Strategy`);const n=new this.EndpointType(t);Ue(this,We,\"f\")&&n.receive(Ue(this,We,\"f\")),Ue(this,He,\"f\").set(e,n)}async closeEndpoint(e){Ue(this,He,\"f\").delete(e)}},We=new WeakMap,He=new WeakMap,Ne=new WeakMap,Object.defineProperty(Fe,\"__esModule\",{value:!0}),Fe.RTCInfo=Fe.RTCStrategy=void 0;const ze=je,Ke=De;class qe extends Ke.EndpointStrategy{constructor(){super(ze.RTCEndpoint,ze.RTCEndpoint.isValidEndpointPayload,\"RTC\")}}Fe.RTCStrategy=qe,Fe.RTCInfo={version:2,minimumVersion:0,type:\"rtc\"};var Je={};Object.defineProperty(Je,\"__esModule\",{value:!0}),Je.RTCICEManager=void 0;const Ye=d;class Ze extends Ye.EmitterBase{constructor(e){super(e,\"channel\"),this.ensureChannelOpened=e=>new Promise(((t,n)=>{if(\"open\"===e.readyState)t();else if(\"connecting\"===e.readyState){const n=()=>{e.removeEventListener(\"open\",n),t()};e.addEventListener(\"open\",n)}else n(new Error(\"This Channel has already closed\"))}))}static createDataChannelPromise(e,t){let n;const i=new Promise((e=>{n=e})),r=i=>{const o=()=>{i.channel.removeEventListener(\"open\",o),n(i.channel)};i.channel.label===e&&(i.channel.addEventListener(\"open\",o),t.removeEventListener(\"datachannel\",r))};return t.addEventListener(\"datachannel\",r),i}async listenForProviderIce(e,t){await this.on(this.createProviderEventName(e),t,{timestamp:Date.now()})}async raiseProviderIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createProviderEventName(e)),t)}async listenForClientIce(e,t){await this.on(this.createClientEventName(e),t,{timestamp:Date.now()})}async raiseClientIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createClientEventName(e)),t)}cleanupIceListeners(e){this.removeAllListeners(this.createClientEventName(e)),this.removeAllListeners(this.createProviderEventName(e))}createClientEventName(e){return`ice-client-${e}`}createProviderEventName(e){return`ice-provider-${e}`}createRouteString(e){return`channel/${e}`}createRtcPeer(){return this.wire.environment.getRtcPeer()}async startClientOffer(){const e=Math.random().toString(),t=this.createRtcPeer();t.addEventListener(\"icecandidate\",(async t=>{t.candidate&&await this.raiseClientIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForProviderIce(e,(async e=>{await t.addIceCandidate(e.candidate)}));const n={request:t.createDataChannel(\"request\"),response:t.createDataChannel(\"response\")},i=await t.createOffer();await t.setLocalDescription(i);const r=Promise.all([n.request,n.response].map(this.ensureChannelOpened)).then((()=>{}));return{rtcClient:t,channels:n,offer:i,rtcConnectionId:e,channelsOpened:r}}async finishClientOffer(e,t,n){return await e.setRemoteDescription(t),await n,!0}async createProviderAnswer(e,t){const n=this.createRtcPeer(),i=Ze.createDataChannelPromise(\"request\",n),r=Ze.createDataChannelPromise(\"response\",n);n.addEventListener(\"icecandidate\",(async t=>{t.candidate&&await this.raiseProviderIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForClientIce(e,(async e=>{await n.addIceCandidate(e.candidate)})),await n.setRemoteDescription(t);const o=await n.createAnswer();await n.setLocalDescription(o);const s=Promise.all([i,r]).then((([t,n])=>(this.cleanupIceListeners(e),{request:t,response:n})));return{rtcClient:n,answer:o,channels:s}}}Je.RTCICEManager=Ze;var Qe={},Xe={};function et(e){return[...e.split(\".\").reverse().entries()].reduce(((e,[t,n])=>e+ +n*1e4**t),0)}function tt(e,t){return et(e)>=et(t)}function nt(e){return e.split(\"/\")[0]}Object.defineProperty(Xe,\"__esModule\",{value:!0}),Xe.runtimeUuidMeetsMinimumRuntimeVersion=Xe.parseRuntimeUuid=Xe.meetsMinimumRuntimeVersion=void 0,Xe.meetsMinimumRuntimeVersion=tt,Xe.parseRuntimeUuid=nt,Xe.runtimeUuidMeetsMinimumRuntimeVersion=function(e,t){return tt(nt(e),t)};var it,rt,ot,st,at,ct=s&&s.__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)},dt=s&&s.__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};Object.defineProperty(Qe,\"__esModule\",{value:!0}),Qe.ChannelProvider=void 0;const ht=pe,lt=Xe;class ut extends ht.ChannelBase{get connections(){return[...ct(this,it,\"f\")]}static handleClientDisconnection(e,t){const n=e.connections.find((e=>e.endpointId===t.endpointId));if(n)ct(e,st,\"f\").call(e,n);else{e.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name)).forEach(ct(e,st,\"f\"))}e.disconnectListener(t)}static setProviderRemoval(e,t){ut.removalMap.set(e,t)}constructor(e,t,n){super(),it.set(this,void 0),rt.set(this,void 0),ot.set(this,void 0),st.set(this,(e=>{const t=this.connections.filter((t=>t.endpointId!==e.endpointId));ct(this,ot,\"f\").closeEndpoint(e.endpointId),dt(this,it,t,\"f\")})),this.processAction=async(e,t,n)=>(ut.clientIsMultiRuntime(n)&&!(0,lt.runtimeUuidMeetsMinimumRuntimeVersion)(n.runtimeUuid,\"18.87.56.0\")?this.handleMultiRuntimeLegacyClient(n):this.checkForClientConnection(n),super.processAction(e,t,n)),at.set(this,(()=>{ct(this,ot,\"f\").close();const e=ut.removalMap.get(this);e&&e()})),dt(this,rt,new ht.ProtectedItems(e,t),\"f\"),this.connectListener=()=>{},this.disconnectListener=()=>{},dt(this,it,[],\"f\"),dt(this,ot,n,\"f\"),n.receive(this.processAction)}dispatch(e,t,n){const i=e.endpointId??this.getEndpointIdForOpenFinId(e,t);return i&&ct(this,ot,\"f\").isEndpointConnected(i)?ct(this,ot,\"f\").send(i,t,n):Promise.reject(new Error(`Client connection with identity uuid: ${e.uuid} / name: ${e.name} / endpointId: ${i} no longer connected.`))}async processConnection(e,t){return ct(this,it,\"f\").push(e),this.connectListener(e,t)}publish(e,t){return this.connections.map((n=>ct(this,ot,\"f\").send(n.endpointId,e,t)))}onConnection(e){this.connectListener=e}onDisconnection(e){this.disconnectListener=e}async destroy(){const e=ct(this,rt,\"f\");e.providerIdentity,dt(this,it,[],\"f\"),await e.close(),ct(this,at,\"f\").call(this)}async getAllClientInfo(){return this.connections.map((e=>{const{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}=e;return{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}}))}checkForClientConnection(e){if(!this.isClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider.\\n Client Identity: {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}isClientConnected(e){return ut.clientIdentityIncludesEndpointId(e)?this.connections.some((t=>t.endpointId===e.endpointId&&t.uuid===e.uuid&&t.name===e.name)):this.isLegacyClientConnected(e)}isLegacyClientConnected(e){return this.connections.some((t=>t.uuid===e.uuid&&t.name===e.name))}handleMultiRuntimeLegacyClient(e){if(!this.isLegacyClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider. Client Identity:\\n {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}getEndpointIdForOpenFinId(e,t){const n=this.connections.filter((t=>t.name===e.name&&t.uuid===e.uuid));if(n.length>=2){const n=ct(this,rt,\"f\"),{uuid:i,name:r}=e,o=n?.providerIdentity.uuid,s=n?.providerIdentity.name;console.warn(`WARNING: Dispatch call may have unintended results. The \"to\" argument of your dispatch call is missing the\\n \"endpointId\" parameter. The identity you are dispatching to ({uuid: ${i}, name: ${r}})\\n has multiple channelClients for this channel. Your dispatched action: (${t}) from the provider:\\n ({uuid: ${o}, name: ${s}}) will only be processed by the most recently-created client.`)}return n.pop()?.endpointId}static clientIdentityIncludesEndpointId(e){return void 0!==e.endpointId}static clientIsMultiRuntime(e){return void 0!==e.runtimeUuid}static async wireClose(e,t){await e.sendAction(\"destroy-channel\",{channelName:t})}}Qe.ChannelProvider=ut,it=new WeakMap,rt=new WeakMap,ot=new WeakMap,st=new WeakMap,at=new WeakMap,ut.removalMap=new WeakMap;var pt={};Object.defineProperty(pt,\"__esModule\",{value:!0}),pt.MessageReceiver=void 0;const wt=ue,yt=d;class ft extends yt.Base{constructor(e){super(e),this.onmessage=e=>\"process-channel-message\"===e.action&&(this.processChannelMessage(e),!0),this.endpointMap=new Map,this.latestEndpointIdByChannelId=new Map,e.registerMessageHandler(this.onmessage.bind(this))}async processChannelMessage(e){const{senderIdentity:t,providerIdentity:n,action:i,ackToSender:r,payload:o,intendedTargetIdentity:s}=e.payload,a=s.channelId??s.endpointId??this.latestEndpointIdByChannelId.get(n.channelId),c=this.endpointMap.get(a);if(!c)return r.payload.success=!1,r.payload.reason=`Client connection with identity uuid: ${this.wire.me.uuid} / name: ${this.wire.me.name} / endpointId: ${a} no longer connected.`,this.wire.sendRaw(r);try{const e=await c(i,o,t);return r.payload.payload=r.payload.payload||{},r.payload.payload.result=e,this.wire.sendRaw(r)}catch(e){return r.payload.success=!1,r.payload.reason=e.message,this.wire.sendRaw(r)}}addEndpoint(e,t,n){this.endpointMap.set(n,e),t!==n&&this.latestEndpointIdByChannelId.set(t,n)}removeEndpoint(e,t){this.endpointMap.delete(t),this.latestEndpointIdByChannelId.get(e)===t&&this.latestEndpointIdByChannelId.delete(e)}checkForPreviousClientConnection(e){const t=this.latestEndpointIdByChannelId.get(e);t&&(wt.ChannelClient.closeChannelByEndpointId(t),console.warn(\"You have created a second connection to an older provider. First connection has been removed from the clientMap\"),console.warn(\"If the provider calls publish(), you may receive multiple messages.\"))}}pt.MessageReceiver=ft;var gt={};Object.defineProperty(gt,\"__esModule\",{value:!0}),gt.ProtocolManager=void 0;gt.ProtocolManager=class{constructor(e){this.ProtocolsInPreferenceOrder=e,this.DefaultClientProtocols=[\"classic\"],this.DefaultProviderProtocols=[\"classic\"],this.getClientProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultClientProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(\", \")}.`);return t},this.getProviderProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultProviderProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(\", \")}.`);return t},this.getCompatibleProtocols=(e,t)=>t.supportedProtocols.filter((t=>e.some((e=>e.type===t.type&&t.version>=e.minimumVersion&&e.version>=(t.minimumVersion??0))))).slice(0,t.maxProtocols)}};var mt={};Object.defineProperty(mt,\"__esModule\",{value:!0});class vt{static combine(e,t){return new vt(e,t)}constructor(e,t){this.primary=e,this.secondary=t}onEndpointDisconnect(e,t){this.primary.onEndpointDisconnect(e,(()=>{this.secondary.isEndpointConnected(e)||t()})),this.secondary.onEndpointDisconnect(e,(()=>{this.primary.isEndpointConnected(e)||t()}))}isValidEndpointPayload(e){return this.primary.isValidEndpointPayload(e)||this.secondary.isValidEndpointPayload(e)}async closeEndpoint(e){await this.primary.closeEndpoint(e),await this.secondary.closeEndpoint(e)}isEndpointConnected(e){return this.primary.isEndpointConnected(e)||this.secondary.isEndpointConnected(e)}async addEndpoint(e,t){this.primary.isValidEndpointPayload(t)&&await this.primary.addEndpoint(e,t),this.secondary.isValidEndpointPayload(t)&&await this.secondary.addEndpoint(e,t)}receive(e){this.primary.receive(e),this.secondary.receive(e)}send(e,t,n){return this.primary.isEndpointConnected(e)?this.primary.send(e,t,n):this.secondary.send(e,t,n)}async close(){await Promise.all([this.primary.close(),this.secondary.close()])}}mt.default=vt;var Ct,bt,It=s&&s.__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},Et=s&&s.__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)},xt=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(xe,\"__esModule\",{value:!0}),xe.ConnectionManager=void 0;const At=Ae,Pt=d,Mt=Oe,_t=Fe,Ot=Je,St=Qe,Rt=pt,Ft=gt,jt=xt(mt);class kt extends Pt.Base{static getProtocolOptionsFromStrings(e){return e.map((e=>{switch(e){case\"rtc\":return _t.RTCInfo;case\"classic\":return Mt.ClassicInfo;default:return(0,At.exhaustiveCheck)(e,[\"rtc\",\"classic\"])}}))}constructor(e){super(e),Ct.set(this,void 0),bt.set(this,void 0),this.removeChannelFromProviderMap=e=>{this.providerMap.delete(e)},this.onmessage=e=>\"process-channel-connection\"===e.action&&(this.processChannelConnection(e),!0),this.providerMap=new Map,this.protocolManager=new Ft.ProtocolManager(\"node\"===this.wire.environment.type?[\"classic\"]:[\"rtc\",\"classic\"]),It(this,Ct,new Rt.MessageReceiver(e),\"f\"),It(this,bt,new Ot.RTCICEManager(e),\"f\"),e.registerMessageHandler(this.onmessage.bind(this))}createProvider(e,t){const n=Object.assign(this.wire.environment.getDefaultChannelOptions().create,e||{}),i=this.protocolManager.getProviderProtocols(n?.protocols),r=i.map((e=>{switch(e){case\"rtc\":return new _t.RTCStrategy;case\"classic\":return new Mt.ClassicStrategy(this.wire,Et(this,Ct,\"f\"),t.channelId,t);default:return(0,At.exhaustiveCheck)(e,[\"rtc\",\"classic\"])}}));let o;if(2===r.length){const[e,t]=r;o=jt.default.combine(e,t)}else{if(1!==r.length)throw new Error(\"failed to combine strategies\");[o]=r}const s=new St.ChannelProvider(t,(()=>St.ChannelProvider.wireClose(this.wire,t.channelName)),o),a=t.channelId;return this.providerMap.set(a,{provider:s,strategy:o,supportedProtocols:kt.getProtocolOptionsFromStrings(i)}),St.ChannelProvider.setProviderRemoval(s,this.removeChannelFromProviderMap.bind(this)),s}async createClientOffer(e){const t=this.protocolManager.getClientProtocols(e?.protocols);let n;return{offer:{supportedProtocols:await Promise.all(t.map((async e=>{switch(e){case\"rtc\":{const{rtcClient:e,channels:t,offer:i,rtcConnectionId:r,channelsOpened:o}=await Et(this,bt,\"f\").startClientOffer();return n={rtcClient:e,channels:t,channelsOpened:o},{type:\"rtc\",version:_t.RTCInfo.version,payload:{offer:i,rtcConnectionId:r}}}case\"classic\":return{type:\"classic\",version:Mt.ClassicInfo.version};default:return(0,At.exhaustiveCheck)(e,[\"rtc\",\"classic\"])}}))),maxProtocols:2},rtc:n}}async createClientStrategy(e,t){t.endpointId||(t.endpointId=this.wire.environment.getNextMessageId(),Et(this,Ct,\"f\").checkForPreviousClientConnection(t.channelId));const n=t.answer??{supportedProtocols:[{type:\"classic\",version:1}]},i=(await Promise.all(n.supportedProtocols.map((async n=>\"rtc\"===n.type&&e?(await Et(this,bt,\"f\").finishClientOffer(e.rtcClient,n.payload.answer,e.channelsOpened),new _t.RTCStrategy):\"classic\"===n.type?new Mt.ClassicStrategy(this.wire,Et(this,Ct,\"f\"),t.endpointId,t):null)))).filter((e=>null!==e));let r;if(e&&!i.some((e=>e instanceof _t.RTCStrategy))&&e&&e.rtcClient.close(),i.length>=2)r=jt.default.combine(i[0],i[1]);else{if(!i.length)throw new Error(\"No compatible protocols\");[r]=i}const o={endpointIdentity:t,rtc:e};return r.addEndpoint(t.channelId,o),r}async processChannelConnection(e){const{clientIdentity:t,providerIdentity:n,ackToSender:i,payload:r,offer:o}=e.payload;t.endpointId?t.isLocalEndpointId=!1:(t.endpointId=this.wire.environment.getNextMessageId(),t.isLocalEndpointId=!0);const s=n.channelId,a=this.providerMap.get(s);if(!a)return i.payload.success=!1,i.payload.reason=`Channel \"${n.channelName}\" has been destroyed.`,this.wire.sendRaw(i);const{provider:c,strategy:d,supportedProtocols:h}=a;try{if(!(c instanceof St.ChannelProvider))throw Error(\"Cannot connect to a channel client\");const e=o??{supportedProtocols:[{type:\"classic\",version:1}],maxProtocols:1},n=this.protocolManager.getCompatibleProtocols(h,e);if(!n.length)throw new Error(\"This provider does not support any of the offered protocols.\");const s=await c.processConnection(t,r);i.payload.payload=i.payload.payload||{};let a={supportedProtocols:[],endpointPayloadPromise:Promise.resolve({endpointIdentity:t})};return a=await n.reduce((async(e,t)=>{const n=await e;if(\"rtc\"===t.type){const{answer:e,rtcClient:i,channels:r}=await Et(this,bt,\"f\").createProviderAnswer(t.payload.rtcConnectionId,t.payload.offer);n.supportedProtocols.push({type:\"rtc\",version:_t.RTCInfo.version,payload:{answer:e}}),n.endpointPayloadPromise=n.endpointPayloadPromise.then((e=>r.then((t=>({...e,rtc:{rtcClient:i,channels:t}})))))}else n.supportedProtocols.push({type:\"classic\",version:Mt.ClassicInfo.version});return n}),Promise.resolve(a)),a.endpointPayloadPromise.then((e=>d.addEndpoint(t.endpointId,e))),i.payload.payload.result=s,i.payload.payload.answer=a,this.wire.sendRaw(i)}catch(e){return i.payload.success=!1,i.payload.reason=e.message,this.wire.sendRaw(i)}}}xe.ConnectionManager=kt,Ct=new WeakMap,bt=new WeakMap;var Lt,Tt,$t,Bt=s&&s.__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},Gt=s&&s.__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)};Object.defineProperty(le,\"__esModule\",{value:!0}),le.Channel=void 0;const Wt=t,Ht=G,Nt=d,Dt=ue,Ut=xe,Vt=Qe;function zt(e){const t=Math.floor(e/10),n=Math.min(3e4,500*2**t);return new Promise((e=>{setTimeout((()=>{e(!1)}),n)}))}class Kt extends Nt.EmitterBase{constructor(e){super(e,\"channel\"),Lt.set(this,void 0),Tt.set(this,new Wt.EventEmitter),$t.set(this,new Ht.AsyncRetryableLazy((async()=>{await Promise.all([this.on(\"disconnected\",(e=>{Dt.ChannelClient.handleProviderDisconnect(e)})),this.on(\"connected\",((...e)=>{Gt(this,Tt,\"f\").emit(\"connected\",...e)}))]).catch((()=>new Error(\"error setting up channel connection listeners\")))}))),Bt(this,Lt,new Ut.ConnectionManager(e),\"f\")}async getAllChannels(){return this.wire.sendAction(\"get-all-channels\").then((({payload:e})=>e.data))}async onChannelConnect(e){await this.on(\"connected\",e)}async onChannelDisconnect(e){await this.on(\"disconnected\",e)}async safeConnect(e,t,n){const i={count:0};do{let r=()=>{};const o=new Promise((t=>{r=n=>{e===n.channelName&&t(!0)},Gt(this,Tt,\"f\").on(\"connected\",r)}));try{if(i.count>0){i.gotConnectedEvent=await Promise.race([zt(i.count),o]);const t=await this.wire.sendAction(\"connect-to-channel\",{...n,retryInfo:i});return console.log(`Successfully connected to channelName: ${e}`),t.payload.data}const t=this.wire.sendAction(\"connect-to-channel\",n);i.originalMessageId=t.messageId;return(await t).payload.data}catch(n){if(!n.message.includes(\"internal-nack\"))throw n;t&&0===i.count&&console.warn(`No channel found for channelName: ${e}. Waiting for connection...`)}finally{i.count+=1,Gt(this,Tt,\"f\").removeListener(\"connected\",r)}}while(t);throw new Error(`No channel found for channelName: ${e}.`)}async connect(e,t={}){if(await Gt(this,$t,\"f\").getValue(),!e||\"string\"!=typeof e)throw new Error(\"Please provide a channelName string to connect to a channel.\");const n={wait:!0,...this.wire.environment.getDefaultChannelOptions().connect,...t},{offer:i,rtc:r}=await Gt(this,Lt,\"f\").createClientOffer(n);let o;(this.fin.me.isFrame||this.fin.me.isView||this.fin.me.isWindow)&&(o=(await this.fin.me.getInfo()).url);const s={channelName:e,...n,offer:i,connectionUrl:o},a=await this.safeConnect(e,n.wait,s),c=await Gt(this,Lt,\"f\").createClientStrategy(r,a),d=new Dt.ChannelClient(a,(()=>Dt.ChannelClient.wireClose(this.wire,a,a.endpointId)),c);return c.onEndpointDisconnect(a.channelId,(async()=>{try{await d.sendDisconnectAction()}catch(e){console.warn(`Something went wrong during disconnect for client with uuid: ${a.uuid} / name: ${a.name} / endpointId: ${a.endpointId}.`)}finally{Dt.ChannelClient.handleProviderDisconnect(a)}})),d}async create(e,t){if(!e)throw new Error(\"Please provide a channelName to create a channel\");const{payload:{data:n}}=await this.wire.sendAction(\"create-channel\",{channelName:e}),i=Gt(this,Lt,\"f\").createProvider(t,n);return this.on(\"client-disconnected\",(t=>{t.channelName===e&&Vt.ChannelProvider.handleClientDisconnection(i,t)})),i}}le.Channel=Kt,Lt=new WeakMap,Tt=new WeakMap,$t=new WeakMap,Object.defineProperty(de,\"__esModule\",{value:!0}),de.InterAppPayload=de.InterApplicationBus=void 0;const qt=t,Jt=d,Yt=he,Zt=le,Qt=O;class Xt extends Jt.Base{constructor(e){super(e),this.events={subscriberAdded:\"subscriber-added\",subscriberRemoved:\"subscriber-removed\"},this.refCounter=new Yt.RefCounter,this.Channel=new Zt.Channel(e),this.emitter=new qt.EventEmitter,e.registerMessageHandler(this.onmessage.bind(this)),this.on=this.emitter.on.bind(this.emitter),this.removeAllListeners=this.emitter.removeAllListeners.bind(this.emitter)}async publish(e,t){await this.wire.sendAction(\"publish-message\",{topic:e,message:t,sourceWindowName:this.me.name})}async send(e,t,n){const i=(0,Qt.validateIdentity)(e);if(i)throw new Error(i);await this.wire.sendAction(\"send-message\",{destinationUuid:e.uuid,destinationWindowName:e.name,topic:t,message:n,sourceWindowName:this.me.name})}subscribe(e,t,n){const i=this.createSubscriptionKey(e.uuid,e.name||\"*\",t);return this.emitter.on(i,n),this.refCounter.actOnFirst(i,(async()=>{await this.wire.sendAction(\"subscribe\",{sourceUuid:e.uuid,sourceWindowName:e.name||\"*\",topic:t,destinationWindowName:this.me.name})}),(()=>Promise.resolve()))}unsubscribe(e,t,n){const i=e.name||\"*\",r=this.createSubscriptionKey(e.uuid,i,t);return this.emitter.removeListener(r,n),this.refCounter.actOnLast(r,(async()=>{await this.wire.sendAction(\"unsubscribe\",{sourceUuid:e.uuid,sourceWindowName:i,topic:t,destinationWindowName:this.me.name})}),(()=>new Promise((e=>e)).then((()=>{}))))}processMessage(e){const{payload:{message:t,sourceWindowName:n,sourceUuid:i,topic:r}}=e,o=[this.createSubscriptionKey(i,n,r),this.createSubscriptionKey(i,\"*\",r),this.createSubscriptionKey(\"*\",\"*\",r)],s={uuid:i,name:n};o.forEach((e=>{this.emitter.emit(e,t,s)}))}emitSubscriverEvent(e,t){const{payload:{targetName:n,uuid:i,topic:r}}=t,o={name:n,uuid:i,topic:r};this.emitter.emit(e,o)}createSubscriptionKey(e,t,n){const i=t||\"*\";if(!(e&&i&&n))throw new Error(\"Missing uuid, name, or topic string\");return function(...e){return e.map((e=>Buffer.from(`${e}`).toString(\"base64\"))).join(\"/\")}(e,i,n)}onmessage(e){const{action:t}=e;switch(t){case\"process-message\":this.processMessage(e);break;case this.events.subscriberAdded:this.emitSubscriverEvent(this.events.subscriberAdded,e);break;case this.events.subscriberRemoved:this.emitSubscriverEvent(this.events.subscriberRemoved,e)}return!0}}de.InterApplicationBus=Xt;de.InterAppPayload=class{};var en={};Object.defineProperty(en,\"__esModule\",{value:!0}),en.Clipboard=void 0;const tn=d;class nn extends tn.Base{async writeText(e){await this.wire.sendAction(\"clipboard-write-text\",e)}async readText(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-text\",{type:e});return t.data}async writeImage(e){await this.wire.sendAction(\"clipboard-write-image\",e)}async readImage(e={format:\"dataURL\"}){const{payload:t}=await this.wire.sendAction(\"clipboard-read-image\",e);return t.data}async writeHtml(e){await this.wire.sendAction(\"clipboard-write-html\",e)}async readHtml(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-html\",{type:e});return t.data}async writeRtf(e){await this.wire.sendAction(\"clipboard-write-rtf\",e)}async readRtf(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-rtf\",{type:e});return t.data}async write(e){await this.wire.sendAction(\"clipboard-write\",e)}async getAvailableFormats(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-formats\",{type:e});return t.data}}en.Clipboard=nn;var rn={},on={},sn={};Object.defineProperty(sn,\"__esModule\",{value:!0}),sn.ExternalApplication=void 0;const an=d;class cn extends an.EmitterBase{constructor(e,t){super(e,\"external-application\",t.uuid),this.identity=t}getInfo(){return this.wire.sendAction(\"get-external-application-info\",this.identity).then((({payload:e})=>e.data))}}sn.ExternalApplication=cn,Object.defineProperty(on,\"__esModule\",{value:!0}),on.ExternalApplicationModule=void 0;const dn=d,hn=sn;class ln extends dn.Base{wrap(e){return this.wire.sendAction(\"external-application-wrap\").catch((e=>{})),Promise.resolve(new hn.ExternalApplication(this.wire,{uuid:e}))}wrapSync(e){return this.wire.sendAction(\"external-application-wrap-sync\").catch((e=>{})),new hn.ExternalApplication(this.wire,{uuid:e})}}on.ExternalApplicationModule=ln,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(on,e),n(sn,e)}(rn);var un={},pn={},wn={};Object.defineProperty(wn,\"__esModule\",{value:!0}),wn._Frame=void 0;const yn=d;class fn extends yn.EmitterBase{constructor(e,t){super(e,\"frame\",t.uuid,t.name),this.identity=t}getInfo(){return this.wire.sendAction(\"get-frame-info\",this.identity).then((({payload:e})=>e.data))}getParentWindow(){return this.wire.sendAction(\"get-parent-window\",this.identity).then((({payload:e})=>e.data))}}wn._Frame=fn,Object.defineProperty(pn,\"__esModule\",{value:!0}),pn._FrameModule=void 0;const gn=d,mn=O,vn=wn;class Cn extends gn.Base{async wrap(e){this.wire.sendAction(\"frame-wrap\").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}wrapSync(e){this.wire.sendAction(\"frame-wrap-sync\").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}getCurrent(){return this.wire.sendAction(\"frame-get-current\").catch((e=>{})),Promise.resolve(new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity()))}getCurrentSync(){return this.wire.sendAction(\"frame-get-current-sync\").catch((e=>{})),new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity())}}pn._FrameModule=Cn,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(pn,e),n(wn,e)}(un);var bn={};Object.defineProperty(bn,\"__esModule\",{value:!0}),bn.GlobalHotkey=void 0;const In=d;class En extends In.EmitterBase{constructor(e){super(e,\"global-hotkey\")}async register(e,t){await this.on(e,t),await this.wire.sendAction(\"global-hotkey-register\",{hotkey:e})}async unregister(e){await this.removeAllListeners(e),await this.wire.sendAction(\"global-hotkey-unregister\",{hotkey:e})}async unregisterAll(){await Promise.all(this.eventNames().filter((e=>!(\"registered\"===e||\"unregistered\"===e))).map((e=>this.removeAllListeners(e)))),await this.wire.sendAction(\"global-hotkey-unregister-all\",{})}async isRegistered(e){const{payload:{data:t}}=await this.wire.sendAction(\"global-hotkey-is-registered\",{hotkey:e});return t}}bn.GlobalHotkey=En;var xn,An={},Pn={},Mn={},_n=s&&s.__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)};Object.defineProperty(Mn,\"__esModule\",{value:!0}),Mn.Platform=void 0;const On=d,Sn=O,Rn=new Map;class Fn extends On.EmitterBase{constructor(e,t){super(t.wire,\"application\",e.uuid),this.getClient=e=>{this.wire.sendAction(\"platform-get-client\",this.identity).catch((e=>{}));const t=e||this.identity,{uuid:n}=t;if(!Rn.has(n)){const e=_n(this,xn,\"f\").call(this,n);Rn.set(n,e)}return Rn.get(n)},xn.set(this,(async e=>{try{const t=`custom-frame-${e}`,n=await this._channel.connect(t,{wait:!1});return n.onDisconnection((()=>{Rn.delete(e)})),n}catch(t){throw Rn.delete(e),new Error(\"The targeted Platform is not currently running. Listen for application-started event for the given Uuid.\")}})),this.launchLegacyManifest=this.launchContentManifest;const n=(0,Sn.validateIdentity)(e);if(n)throw new Error(n);this._channel=t,this.identity={uuid:e.uuid},this.Layout=this.fin.Platform.Layout,this.Application=this.fin.Application.wrapSync(this.identity)}async createView(e,t,n){this.wire.sendAction(\"platform-create-view\",this.identity).catch((e=>{}));const i=await this.getClient(),r=await i.dispatch(\"create-view\",{target:t,opts:e,targetView:n});if(!r||(0,Sn.validateIdentity)(r.identity))throw new Error(`When overwriting the createView call, please return an object that has a valid 'identity' property: ${JSON.stringify(r)}`);return this.fin.View.wrapSync(r.identity)}async createWindow(e){this.wire.sendAction(\"platform-create-window\",this.identity).catch((e=>{}));const t=await this.getClient();e.reason||(e.reason=\"api-call\");const n=await t.dispatch(\"create-view-container\",e);if(!n||(0,Sn.validateIdentity)(n.identity))throw new Error(`When overwriting the createWindow call, please return an object that has a valid 'identity' property: ${JSON.stringify(n)}`);const{identity:i}=n,r=this.fin.Window.wrapSync(i);return r.name=i.name,r.uuid=i.uuid,r}async quit(){this.wire.sendAction(\"platform-quit\",this.identity).catch((e=>{}));return(await this.getClient()).dispatch(\"quit\")}async closeView(e){this.wire.sendAction(\"platform-close-view\",this.identity).catch((e=>{}));const t=await this.getClient();await t.dispatch(\"close-view\",{view:e})}async reparentView(e,t){console.warn(\"Platform.reparentView has been deprecated, please use Platform.createView\"),this.wire.sendAction(\"platform-reparent-view\",this.identity).catch((e=>{}));const n={...e,uuid:e.uuid??this.identity.uuid},i=await this.fin.View.wrap(n),r=await i.getOptions();return this.createView(r,t)}async getSnapshot(){this.wire.sendAction(\"platform-get-snapshot\",this.identity).catch((e=>{}));return(await this.getClient()).dispatch(\"get-snapshot\")}async getViewSnapshot(e){return(await this.getClient()).dispatch(\"get-view-snapshot\",{viewIdentity:e})}async applySnapshot(e,t){this.wire.sendAction(\"platform-apply-snapshot\",this.identity).catch((e=>{}));const n=\"Requested snapshot must be a valid Snapshot object, or a url or filepath to such an object.\";let i;if(\"string\"==typeof e)try{i=(await this._channel.wire.sendAction(\"get-application-manifest\",{manifestUrl:e})).payload.data}catch(e){throw new Error(`${n}: ${e}`)}else i=e;if(!i.windows)throw new Error(n);const r=await this.getClient();return await r.dispatch(\"apply-snapshot\",{snapshot:i,options:t}),this}async fetchManifest(e){return(await this.getClient()).dispatch(\"platform-fetch-manifest\",{manifestUrl:e})}async launchContentManifest(e){this.wire.sendAction(\"platform-launch-content-manifest\",this.identity).catch((()=>{}));const t=await this.getClient(),n=await this.fetchManifest(e);return t.dispatch(\"launch-into-platform\",{manifest:n,manifestUrl:e}),this}async setWindowContext(e={},t){if(this.wire.sendAction(\"platform-set-window-context\",this.identity).catch((e=>{})),!e)throw new Error(\"Please provide a serializable object or string to set the context.\");const n=await this.getClient(),{entityType:i}=t?await this.fin.System.getEntityInfo(t.uuid,t.name):this.fin.me;await n.dispatch(\"set-window-context\",{context:e,entityType:i,target:t||{uuid:this.fin.me.uuid,name:this.fin.me.name}})}async getWindowContext(e){this.wire.sendAction(\"platform-get-window-context\",this.identity).catch((e=>{}));const t=await this.getClient(),{entityType:n}=e?await this.fin.System.getEntityInfo(e.uuid,e.name):this.fin.me;return t.dispatch(\"get-window-context\",{target:e||{uuid:this.fin.me.uuid,name:this.fin.me.name},entityType:n})}async closeWindow(e,t={skipBeforeUnload:!1}){this.wire.sendAction(\"platform-close-window\",this.identity).catch((e=>{}));return(await this.getClient()).dispatch(\"close-window\",{windowId:e,options:t})}}Mn.Platform=Fn,xn=new WeakMap;var jn={},kn={},Ln={},Tn={};function $n(e){switch(e){case\"columns\":case\"grid\":case\"rows\":case\"tabs\":return!0;default:return!1}}Object.defineProperty(Tn,\"__esModule\",{value:!0}),Tn.overrideFromComposables=Tn.isValidPresetType=void 0,Tn.isValidPresetType=$n,Tn.overrideFromComposables=function(...e){return t=>e.reduceRight(((e,t)=>n=>t(e(n))),(e=>e))(t)},Tn.default={isValidPresetType:$n};var Bn={},Gn={},Wn={};Object.defineProperty(Wn,\"__esModule\",{value:!0}),Wn.ApiConsumer=void 0;Wn.ApiConsumer=class{constructor(e){this.strategy=e,this.consume=async e=>(await this.strategy.getExposedFunctions(e)).reduce(((t,n)=>({...t,[n.key]:this.strategy.createFunction(n,e)})),{})}};var Hn={},Nn={};Object.defineProperty(Nn,\"__esModule\",{value:!0}),Nn.expose=Nn.getExposedProperties=void 0;const Dn=Symbol(\"exposedProperties\");Nn.getExposedProperties=e=>e[Dn]||e.prototype[Dn]||[];Nn.expose=e=>(t,n,i)=>{t[Dn]=t[Dn]||[],t[Dn].push({key:n,descriptor:i,options:e})},Object.defineProperty(Hn,\"__esModule\",{value:!0}),Hn.ApiExposer=void 0;const Un=Nn;Hn.ApiExposer=class{constructor(e){this.strategy=e,this.exposeInstance=async(e,t)=>{const n=(0,Un.getExposedProperties)(e),i=await Promise.all(n.map((async({key:n,options:i})=>({key:n,options:await this.strategy.exposeFunction(e[n].bind(e),{key:n,options:i,meta:t})}))));await this.strategy.exposeMeta(t,i)}}};var Vn={},zn={},Kn={};Object.defineProperty(Kn,\"__esModule\",{value:!0}),Kn.ChannelsConsumer=void 0;Kn.ChannelsConsumer=class{constructor(e){this.channel=e,this.getExposedFunctions=async e=>{const{id:t}=e,{props:n}=await this.channel.dispatch(`api-meta:${t}`);return n},this.createFunction=e=>(...t)=>{const{action:n}=e.options;return this.channel.dispatch(n,{args:t})}}};var qn={};Object.defineProperty(qn,\"__esModule\",{value:!0}),qn.ChannelsExposer=void 0;qn.ChannelsExposer=class{constructor(e){this.channelProviderOrClient=e,this.exposeFunction=async(e,t)=>{const{key:n,options:i,meta:r}=t,{id:o}=r,s=`${o}.${i?.action||n}`;return await this.channelProviderOrClient.register(s,(async({args:t})=>e(...t))),{action:s}},this.exposeMeta=async({id:e},t)=>{const n=`api-meta:${e}`;await this.channelProviderOrClient.register(n,(()=>({props:t})))}}},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Kn,e),n(qn,e)}(zn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(zn,e)}(Vn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Wn,e),n(Hn,e),n(Vn,e),n(Nn,e)}(Gn);var Jn={};Object.defineProperty(Jn,\"__esModule\",{value:!0}),Jn.createRelayedDispatch=exports.relayChannelClientApi_1=Jn.relayChannelClientApi=void 0;const Yn=[\"no longer connected\",\"RTCDataChannel closed unexpectedly\",\"The client you are trying to dispatch from is disconnected from the target provider\"];exports.relayChannelClientApi_1=Jn.relayChannelClientApi=async(e,t)=>{e.register(`relay:${t}`,(({action:t,target:n,payload:i})=>e.dispatch(n,t,i))),await Promise.resolve()};Jn.createRelayedDispatch=(e,t,n,i)=>async(r,o)=>{try{return await e.dispatch(`relay:${n}`,{action:r,payload:o,target:t})}catch(e){if(s=e.message,Yn.some((e=>s.includes(e)))&&i)throw new Error(i);throw e}var s};var Zn,Qn,Xn,ei=s&&s.__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},ti=s&&s.__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)};Object.defineProperty(Bn,\"__esModule\",{value:!0}),Bn.ColumnOrRow=Bn.TabStack=Bn.LayoutNode=void 0;const ni=Gn,ii=Jn;class ri{constructor(e,t){Zn.set(this,void 0),this.isRoot=()=>ti(this,Zn,\"f\").isRoot(this.entityId),this.exists=()=>ti(this,Zn,\"f\").exists(this.entityId),this.getParent=async()=>{const e=await ti(this,Zn,\"f\").getParent(this.entityId);if(e)return ri.getEntity(e,ti(this,Zn,\"f\"))},this.createAdjacentStack=async(e,t)=>{const n=await ti(this,Zn,\"f\").createAdjacentStack(this.entityId,e,t);return ri.getEntity({entityId:n,type:\"stack\"},ti(this,Zn,\"f\"))},this.getAdjacentStacks=async e=>(await ti(this,Zn,\"f\").getAdjacentStacks({targetId:this.entityId,edge:e})).map((e=>ri.getEntity({type:\"stack\",entityId:e.entityId},ti(this,Zn,\"f\")))),ei(this,Zn,e,\"f\"),this.entityId=t}}Bn.LayoutNode=ri,Zn=new WeakMap,ri.newLayoutEntitiesClient=async(e,t,n)=>{const i=(0,ii.createRelayedDispatch)(e,n,\"layout-relay\",\"You are trying to interact with a layout component on a window that does not exist or has been destroyed.\");return new ni.ApiConsumer(new ni.ChannelsConsumer({dispatch:i})).consume({id:t})},ri.getEntity=(e,t)=>{const{entityId:n,type:i}=e;switch(i){case\"column\":case\"row\":return new si(t,n,i);case\"stack\":return new oi(t,n);default:throw new Error(`Unrecognised Layout Entity encountered ('${JSON.stringify(e)})`)}};class oi extends ri{constructor(e,t){super(e,t),Qn.set(this,void 0),this.type=\"stack\",this.getViews=()=>ti(this,Qn,\"f\").getStackViews(this.entityId),this.addView=async(e,t={index:0})=>ti(this,Qn,\"f\").addViewToStack(this.entityId,e,t),this.removeView=async e=>{await ti(this,Qn,\"f\").removeViewFromStack(this.entityId,e)},this.setActiveView=async e=>{await ti(this,Qn,\"f\").setStackActiveView(this.entityId,e)},ei(this,Qn,e,\"f\")}}Bn.TabStack=oi,Qn=new WeakMap;class si extends ri{constructor(e,t,n){super(e,t),Xn.set(this,void 0),this.getContent=async()=>(await ti(this,Xn,\"f\").getContent(this.entityId)).map((e=>ri.getEntity(e,ti(this,Xn,\"f\")))),ei(this,Xn,e,\"f\"),this.type=n}}Bn.ColumnOrRow=si,Xn=new WeakMap;var ai={};Object.defineProperty(ai,\"__esModule\",{value:!0}),ai.DEFAULT_LAYOUT_KEY=ai.LAYOUT_CONTROLLER_ID=void 0,ai.LAYOUT_CONTROLLER_ID=\"layout-entities\",ai.DEFAULT_LAYOUT_KEY=\"__default__\";var ci,di,hi,li=s&&s.__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)};Object.defineProperty(Ln,\"__esModule\",{value:!0}),Ln.Layout=void 0;const ui=G,pi=O,wi=d,yi=Tn,fi=Bn,gi=ai;class mi extends wi.Base{static getClient(e){return li(e,di,\"f\").getValue()}constructor(e,t){super(t),ci.add(this),di.set(this,new ui.Lazy((async()=>fi.LayoutNode.newLayoutEntitiesClient(await this.platform.getClient(),gi.LAYOUT_CONTROLLER_ID,this.identity)))),this.replace=async e=>{this.wire.sendAction(\"layout-replace\").catch((e=>{}));const t=await this.platform.getClient();await t.dispatch(\"replace-layout\",{target:this.identity,opts:{layout:e}})},this.replaceView=async(e,t)=>{this.wire.sendAction(\"layout-replace-view\").catch((e=>{}));const n=await this.platform.getClient();await n.dispatch(\"replace-view\",{target:this.identity,opts:{viewToReplace:e,newView:t}})},this.applyPreset=async e=>{this.wire.sendAction(\"layout-apply-preset\").catch((e=>{}));const t=await this.platform.getClient(),{presetType:n}=e;if(!n||!(0,yi.isValidPresetType)(n))throw new Error(\"Cannot apply preset layout, please include an applicable presetType property in the PresetLayoutOptions.\");await t.dispatch(\"apply-preset-layout\",{target:this.identity,opts:{presetType:n}})};const n=(0,pi.validateIdentity)(e);if(n)throw new Error(n);this.identity=e,this.platform=this.fin.Platform.wrapSync({uuid:e.uuid}),e.uuid===this.fin.me.uuid&&e.name===this.fin.me.name&&(this.init=this.fin.Platform.Layout.init)}async getConfig(){this.wire.sendAction(\"layout-get-config\").catch((e=>{}));return(await this.platform.getClient()).dispatch(\"get-frame-snapshot\",{target:this.identity})}async getCurrentViews(){this.wire.sendAction(\"layout-get-views\").catch((e=>{}));const e=await this.platform.getClient();return(await e.dispatch(\"get-layout-views\",{target:this.identity})).map((e=>this.fin.View.wrapSync(e)))}async getRootItem(){this.wire.sendAction(\"layout-get-root-item\").catch((()=>{}));const e=await li(this,di,\"f\").getValue(),t=await e.getRoot(\"layoutName\"in this.identity?this.identity:void 0);return fi.LayoutNode.getEntity(t,e)}async getStackByViewIdentity(e){this.wire.sendAction(\"layout-get-stack-by-view\").catch((()=>{}));const t=await li(this,di,\"f\").getValue(),n=await t.getStackByView(e);if(!n)throw new Error(`No stack found for view: ${e.uuid}/${e.name}`);return fi.LayoutNode.getEntity(n,t)}async addView(e,{location:t,targetView:n}={}){this.wire.sendAction(\"layout-add-view\").catch((e=>{}));const{identity:i}=await li(this,ci,\"m\",hi).call(this,\"layout-add-view\",{viewOptions:e,location:t,targetView:n});return{identity:i}}async closeView(e){this.wire.sendAction(\"layout-close-view\").catch((e=>{})),await li(this,ci,\"m\",hi).call(this,\"layout-close-view\",{viewIdentity:e})}}Ln.Layout=mi,di=new WeakMap,ci=new WeakSet,hi=async function(e,t){return(await this.platform.getClient()).dispatch(e,{target:this.identity,opts:t})};var vi,Ci,bi,Ii,Ei,xi=s&&s.__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)},Ai=s&&s.__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};Object.defineProperty(kn,\"__esModule\",{value:!0}),kn.LayoutModule=void 0;const Pi=d,Mi=Ln,_i=ai;class Oi extends Pi.Base{constructor(){super(...arguments),vi.add(this),Ci.set(this,!1),bi.set(this,null),this.init=async(e={})=>{if(this.wire.sendAction(\"layout-init\").catch((e=>{})),!this.wire.environment.layoutAllowedInContext(this.fin))throw new Error(\"Layout.init can only be called from a Window context.\");if(xi(this,Ci,\"f\"))throw new Error(\"Layout.init was already called, please use Layout.create to add additional layouts.\");\"openfin\"===this.wire.environment.type&&await this.fin.Platform.getCurrentSync().getClient(),Ai(this,Ci,!0,\"f\"),Ai(this,bi,await this.wire.environment.initLayoutManager(this.fin,this.wire,e),\"f\"),await this.wire.environment.applyLayoutSnapshot(this.fin,xi(this,bi,\"f\"),e);const t={name:this.fin.me.name,uuid:this.fin.me.uuid};if(!e.layoutManagerOverride){const e={layoutName:_i.DEFAULT_LAYOUT_KEY,...t};return xi(this,Ii,\"f\").call(this,e)}return this.wrapSync(t)},Ii.set(this,(e=>{const t=\"[Layout] You are using a deprecated property `layoutManager` - it will throw if you access it starting in v37.\",n=new Proxy({},{get(e,n){throw console.warn(`[Layout-mgr-proxy] accessing ${n.toString()}`),new Error(t)}}),i=Object.assign(this.wrapSync(e),{layoutManager:n});return new Proxy(i,{get(e,n){if(\"layoutManager\"===n)throw console.warn(`[Layout-proxy] accessing ${n.toString()}`),new Error(t);return e[n]}})})),this.getCurrentLayoutManagerSync=()=>xi(this,vi,\"m\",Ei).call(this,\"fin.Platform.Layout.getCurrentLayoutManagerSync()\"),this.create=async e=>this.wire.environment.createLayout(xi(this,vi,\"m\",Ei).call(this,\"fin.Platform.Layout.create()\"),e),this.destroy=async e=>this.wire.environment.destroyLayout(xi(this,vi,\"m\",Ei).call(this,\"fin.Platform.Layout.destroy()\"),e)}async wrap(e){return this.wire.sendAction(\"layout-wrap\").catch((e=>{})),new Mi.Layout(e,this.wire)}wrapSync(e){return this.wire.sendAction(\"layout-wrap-sync\").catch((e=>{})),new Mi.Layout(e,this.wire)}async getCurrent(){if(this.wire.sendAction(\"layout-get-current\").catch((e=>{})),\"openfin\"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error(\"You are not in a Window context. Only Windows can have a Layout.\");const{uuid:e,name:t}=this.fin.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction(\"layout-get-current-sync\").catch((e=>{})),\"openfin\"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error(\"You are not in a Window context. Only Windows can have a Layout.\");const{uuid:e,name:t}=this.fin.me;return this.wrapSync({uuid:e,name:t})}async getLayoutByViewIdentity(e){this.wire.sendAction(\"layout-get-by-view-identity\").catch((()=>{}));let t=await this.wire.environment.getViewWindowIdentity(this.fin,e);t.identity&&(t=t.identity);try{const n=this.wrapSync(t),i=await Mi.Layout.getClient(n),r=await i.getLayoutIdentityForViewOrThrow(e);return this.wrapSync(r)}catch(n){if(![\"No action registered at target for\",\"getLayoutIdentityForViewOrThrow is not a function\"].some((e=>n.message.includes(e))))throw n;if(t.uuid===t.name)throw new Error(`View identity ${JSON.stringify(e)} is not attached to any layout in provider window ${JSON.stringify(t)}.`);return this.wrapSync(t)}}}kn.LayoutModule=Oi,Ci=new WeakMap,bi=new WeakMap,Ii=new WeakMap,vi=new WeakSet,Ei=function(e){if(!xi(this,bi,\"f\"))throw new Error(`You must call init before using the API ${e}`);return xi(this,bi,\"f\")},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(kn,e),n(Ln,e)}(jn),Object.defineProperty(Pn,\"__esModule\",{value:!0}),Pn.PlatformModule=void 0;const Si=d,Ri=Mn,Fi=jn;class ji extends Si.Base{constructor(e,t){super(e),this._channel=t,this.Layout=new Fi.LayoutModule(this.wire)}async init(e){if(!fin.__internal_.isPlatform||fin.me.name!==fin.me.uuid)throw new Error(\"fin.Platform.init should only be called from a custom platform provider running in the main window of the application.\");return this.wire.environment.initPlatform(this.fin,e)}async wrap(e){return this.wire.sendAction(\"platform-wrap\").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}wrapSync(e){return this.wire.sendAction(\"platform-wrap-sync\").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}async getCurrent(){return this.wire.sendAction(\"platform-get-current\").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction(\"platform-get-current-sync\").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}start(e){return this.wire.sendAction(\"platform-start\").catch((e=>{})),new Promise((async(t,n)=>{try{const{uuid:n}=e,i=await this.fin.Application._create({...e,isPlatformController:!0});i.once(\"platform-api-ready\",(()=>t(this.wrapSync({uuid:n})))),i._run({uuid:n})}catch(e){n(e)}}))}startFromManifest(e,t){return this.wire.sendAction(\"platform-start-from-manifest\").catch((e=>{})),new Promise((async(n,i)=>{try{const i=await this.fin.Application._createFromManifest(e);i.once(\"platform-api-ready\",(()=>n(this.wrapSync({uuid:i.identity.uuid})))),i._run(t)}catch(e){i(e)}}))}}Pn.PlatformModule=ji,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Pn,e),n(Mn,e)}(An);var ki={};!function(e){Object.defineProperty(e,\"__esModule\",{value:!0}),e.getMe=e.getBaseMe=e.environmentUnsupportedMessage=void 0;const t=J(),n=un,i=ie(),r=rn;function o(e,t,n){return{...{isView:\"view\"===e,isWindow:\"window\"===e,isFrame:\"iframe\"===e,isExternal:\"external connection\"===e},uuid:t,name:n,entityType:e}}e.environmentUnsupportedMessage=\"You are not running in OpenFin.\",e.getBaseMe=o,e.getMe=function(s){const{uuid:a,name:c,entityType:d}=s.me,h={setContext(){throw new Error(e.environmentUnsupportedMessage)},addContextHandler(){throw new Error(e.environmentUnsupportedMessage)},getContextGroups(){throw new Error(e.environmentUnsupportedMessage)},joinContextGroup(){throw new Error(e.environmentUnsupportedMessage)},removeFromContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getAllClientsInContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getInfoForContextGroup(){throw new Error(e.environmentUnsupportedMessage)}},l=\"Interop API has not been instantiated. Either connection has failed or you have not declared interop in your config.\",u={setContext(){throw new Error(l)},addContextHandler(){throw new Error(l)},getContextGroups(){throw new Error(l)},joinContextGroup(){throw new Error(l)},removeFromContextGroup(){throw new Error(l)},getAllClientsInContextGroup(){throw new Error(l)},getInfoForContextGroup(){throw new Error(l)}},p={eventNames:()=>{throw new Error(e.environmentUnsupportedMessage)},emit:()=>{throw new Error(e.environmentUnsupportedMessage)},listeners:()=>{throw new Error(e.environmentUnsupportedMessage)},listenerCount:()=>{throw new Error(e.environmentUnsupportedMessage)},on:()=>{throw new Error(e.environmentUnsupportedMessage)},addListener:()=>{throw new Error(e.environmentUnsupportedMessage)},once:()=>{throw new Error(e.environmentUnsupportedMessage)},prependListener:()=>{throw new Error(e.environmentUnsupportedMessage)},prependOnceListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeAllListeners:()=>{throw new Error(e.environmentUnsupportedMessage)}};switch(d){case\"view\":return Object.assign(new t.View(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case\"window\":return Object.assign(new i._Window(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case\"iframe\":return Object.assign(new n._Frame(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case\"external connection\":return Object.assign(new r.ExternalApplication(s,{uuid:a}),o(d,a,c),{interop:u,isOpenFin:!1});default:return{...o(d,a,c),...p,interop:h,isOpenFin:!1}}}}(ki);var Li={},Ti={},$i={};Object.defineProperty($i,\"__esModule\",{value:!0}),$i.createWarningObject=$i.createUnusableObject=void 0,$i.createUnusableObject=function(e){const t=()=>{throw new Error(e)};return new Proxy({},{apply:t,construct:t,defineProperty:t,deleteProperty:t,get:t,getOwnPropertyDescriptor:t,getPrototypeOf:t,has:t,isExtensible:t,ownKeys:t,preventExtensions:t,set:t,setPrototypeOf:t})},$i.createWarningObject=function(e,t){return new Proxy(t,{get:(...t)=>(console.warn(e),Reflect.get(...t)),set:(...t)=>(console.warn(e),Reflect.set(...t)),getOwnPropertyDescriptor:(...t)=>(console.warn(e),Reflect.getOwnPropertyDescriptor(...t)),ownKeys:(...t)=>(console.warn(e),Reflect.ownKeys(...t))})};var Bi,Gi={},Wi={};var Hi={};!function(e){Object.defineProperty(e,\"__esModule\",{value:!0}),e.wrapIntentHandler=e.BROKER_ERRORS=e.generateOverrideWarning=e.generateOverrideError=e.wrapContextHandler=e.wrapInTryCatch=e.generateId=void 0;e.generateId=()=>`${Math.random()}${Date.now()}`;e.wrapInTryCatch=(e,t)=>(...n)=>{try{return e(...n)}catch(e){throw new Error((t||\"\")+e)}};e.wrapContextHandler=(e,t)=>async n=>{try{await e(n)}catch(e){throw console.error(`Error thrown by handler ${t} for context type ${n.type}: ${e}`),e}};e.generateOverrideError=(e,t)=>`You have tried to to use ${e} but ${t} has not been overridden in the Interop Broker. Please override this function. Refer to our documentation for more info.`;e.generateOverrideWarning=(e,t,n,i)=>{const{uuid:r,name:o}=n;return i?`Entity with identity: ${r}/${o} has called ${i} or ${e} but ${t} has not been overridden.`:`Entity with identity: ${r}/${o} has called ${e} but ${t} has not been overridden.`},e.BROKER_ERRORS={fireIntent:(0,e.generateOverrideError)(\"fireIntent\",\"handleFiredIntent\"),fireIntentForContext:(0,e.generateOverrideError)(\"fireIntentForContext\",\"handleFiredIntentForContext\"),getInfoForIntent:(0,e.generateOverrideError)(\"getInfoForIntent\",\"handleInfoForIntent\"),getInfoForIntentsByContext:(0,e.generateOverrideError)(\"getInfoForIntentsByContext\",\"handleInfoForIntentsByContext\"),joinSessionContextGroupWithJoinContextGroup:\"The Context Group you have tried to join is a Session Context Group. Custom Context Groups can only be defined by the Interop Broker through code or manifest configuration. Please use joinSessionContextGroup.\",fdc3Open:(0,e.generateOverrideError)(\"fdc3.open\",\"fdc3HandleOpen\"),fdc3FindInstances:(0,e.generateOverrideError)(\"fdc3.findInstances\",\"fdc3HandleFindInstances\"),fdc3GetAppMetadata:(0,e.generateOverrideError)(\"fdc3.getAppMetadata\",\"fdc3HandleGetAppMetadata\"),fdc3GetInfo:(0,e.generateOverrideError)(\"fdc3.getInfo\",\"fdc3HandleGetInfo\")};e.wrapIntentHandler=(e,t)=>async n=>{try{return e(n)}catch(e){throw console.error(`Error thrown by handler ${t}: ${e}`),e}}}(Hi);var Ni,Di,Ui={};function Vi(){if(Di)return Gi;Di=1;var e,t,n,r=s&&s.__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},o=s&&s.__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)},a=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Gi,\"__esModule\",{value:!0}),Gi.InteropBroker=void 0;const c=d,h=a(function(){if(Bi)return Wi;Bi=1,Object.defineProperty(Wi,\"__esModule\",{value:!0});const e=Cr();return Wi.default=class{constructor(e,t){this.provider=e,this.id=t,this.lastContext=void 0,this.contextGroupMap=new Map,this.clients=new Map,this.registerListeners()}registerListeners(){this.provider.register(`sessionContextGroup:getContext-${this.id}`,this.getCurrentContext.bind(this)),this.provider.register(`sessionContextGroup:setContext-${this.id}`,this.setContext.bind(this)),this.provider.register(`sessionContextGroup:handlerAdded-${this.id}`,this.handlerAdded.bind(this)),this.provider.register(`sessionContextGroup:handlerRemoved-${this.id}`,this.handlerRemoved.bind(this))}getCurrentContext(e){return e.type?this.contextGroupMap.get(e.type):this.lastContext}setContext(t,n){const{context:i}=t,r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name} not in Session Client State Map`);this.contextGroupMap.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{e.contextHandlers.get(i.type)?.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getClientState(e){return this.clients.get(e.endpointId)}async handlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(i){const e=r.contextHandlers.get(i)||[];r.contextHandlers.set(i,[...e,n]);const o=this.contextGroupMap.get(i);o&&await this.provider.dispatch(t,n,o)}else{r.globalHandler=n;const e=[...this.contextGroupMap.keys()].map((async e=>{const i=this.contextGroupMap.get(e);i&&await this.provider.dispatch(t,n,i)}));await Promise.all(e)}}handlerRemoved(e,t){const{handlerId:n}=e,i=this.clients.get(t.endpointId);i?(Array.from(i.contextHandlers).forEach((([,e])=>{const t=e.indexOf(n);t>-1&&e.splice(t,1)})),i.globalHandler===n&&(i.globalHandler=void 0)):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={contextHandlers:new Map,clientIdentity:e,globalHandler:void 0};this.clients.set(e.endpointId,t)}}onDisconnection(e){this.clients.delete(e.endpointId)}},Wi}()),l=Hi,u=a(i),p=function(){if(Ni)return Ui;Ni=1,Object.defineProperty(Ui,\"__esModule\",{value:!0}),Ui.PrivateChannelProvider=void 0;const e=Vi();return Ui.PrivateChannelProvider=class t{constructor(e,t){this.provider=e,this.id=t,this.clients=new Map,this.registerListeners(),this.contextByContextType=new Map,this.lastContext=void 0,this.provider.onConnection((e=>this.registerNewClient(e))),this.provider.onDisconnection((async e=>{const{endpointId:t}=e;this.clients.has(t)&&await this.handleClientDisconnecting(e),0===(await this.provider.getAllClientInfo()).length&&this.provider.destroy()}))}getClientState(e){return this.clients.get(e.endpointId)}registerListeners(){this.provider.register(\"broadcast\",this.broadcast.bind(this)),this.provider.register(\"getCurrentContext\",this.getCurrentContext.bind(this)),this.provider.register(\"contextHandlerAdded\",this.contextHandlerAdded.bind(this)),this.provider.register(\"contextHandlerRemoved\",this.contextHandlerRemoved.bind(this)),this.provider.register(\"nonStandardHandlerRemoved\",this.nonStandardHandlerRemoved.bind(this)),this.provider.register(\"onAddContextHandlerAdded\",this.onAddContextHandlerAdded.bind(this)),this.provider.register(\"onDisconnectHandlerAdded\",this.onDisconnectHandlerAdded.bind(this)),this.provider.register(\"onUnsubscribeHandlerAdded\",this.onUnsubscribeHandlerAdded.bind(this)),this.provider.register(\"clientDisconnecting\",((e,t)=>{this.handleClientDisconnecting(t)}))}broadcast(t,n){const{context:i}=t;if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name}, tried to call broadcast, is not connected to this Private Channel`);const r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to broadcast - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);this.contextByContextType.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{const t=e.handlerIdsByContextTypes.get(i.type);t&&t.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getCurrentContext(e,t){const{contextType:n}=e;if(!this.getClientState(t))throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call getCurrentContext, is not connected to this Private Channel`);if(void 0!==n){return this.contextByContextType.get(n)||null}return this.lastContext?this.lastContext:null}contextHandlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call addContextListener, is not connected to this Private Channel`);if(i){const e=r.handlerIdsByContextTypes.get(i)||[];r.handlerIdsByContextTypes.set(i,[...e,n])}else r.globalHandler=n;Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&e.onAddContextListenerHandlerId&&this.provider.dispatch(e.clientIdentity,e.onAddContextListenerHandlerId,i)}))}async contextHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);if(i){let e;if(i.globalHandler===n)i.globalHandler=void 0;else for(const[t,r]of i.handlerIdsByContextTypes){const i=r.indexOf(n);i>-1&&(r.splice(i,1),e=t)}const r=(await this.getConnectedClients()).map((async n=>{const{clientIdentity:i,clientIdentity:{endpointId:r},onUnsubscribeHandlerId:o}=n;r!==t.endpointId&&o&&await this.provider.dispatch(i,o,e)}));try{await Promise.all(r)}catch(e){throw console.error(`Problem when attempting to dispatch to onUnsubscribeHandlers. Error: ${e} Removing Client: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}`),new Error(e)}}else console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}.`)}nonStandardHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);i?i.onDisconnectHandlerId===n?i.onDisconnectHandlerId=void 0:i.onAddContextListenerHandlerId===n?i.onAddContextListenerHandlerId=void 0:i.onUnsubscribeHandlerId===n&&(i.onUnsubscribeHandlerId=void 0):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}onAddContextHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onAddContextListener, is not connected to this Private Channel`);n.onAddContextListenerHandlerId=i,Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&Array.from(e.handlerIdsByContextTypes.keys()).forEach((e=>{this.provider.dispatch(t,i,e)}))}))}onDisconnectHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onDisconnect, is not connected to this Private Channel`);n.onDisconnectHandlerId=i}onUnsubscribeHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onUnsubscribe, is not connected to this Private Channel`);n.onUnsubscribeHandlerId=i}removeClient(e){const t=this.getClientState(e);if(!t)throw new Error(`Client with Identity: ${e.uuid} ${e.name}, tried to call disconnect, is not connected to this Private Channel`);t.handlerIdsByContextTypes.clear(),this.clients.delete(e.endpointId)}async fireOnDisconnectForOtherClients(e){const{endpointId:t}=e,n=(await this.getConnectedClients()).map((async e=>{const{clientIdentity:{endpointId:n},onDisconnectHandlerId:i}=e;n!==t&&i&&await this.provider.dispatch(e.clientIdentity,i)}));try{await Promise.all(n)}catch(t){throw console.error(`Problem when attempting to dispatch to onDisconnectHandlers. Error: ${t} Disconnecting Client: uuid: ${e.uuid}. name: ${e.name}. endpointId: ${e.endpointId}`),new Error(t)}}async unsubscribeAll(e){const{endpointId:t}=e,n=this.clients.get(t);if(n){const t=Array.from(n.handlerIdsByContextTypes.values()).flat(),i=n.globalHandler;if(t.length>0){const n=t.map((async t=>this.contextHandlerRemoved({handlerId:t},e)));try{await Promise.all(n)}catch(e){console.error(e.message)}}if(i)try{await this.contextHandlerRemoved({handlerId:i},e)}catch(e){console.error(e.message)}}}async handleClientDisconnecting(e){await this.unsubscribeAll(e),this.removeClient(e),await this.fireOnDisconnectForOtherClients(e)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={clientIdentity:e,handlerIdsByContextTypes:new Map,globalHandler:void 0,onAddContextListenerHandlerId:void 0,onUnsubscribeHandlerId:void 0,onDisconnectHandlerId:void 0};this.clients.set(e.endpointId,t)}}async getConnectedClients(){const e=await this.provider.getAllClientInfo();return Array.from(this.clients.values()).filter((t=>{const{uuid:n,name:i}=t.clientIdentity;return e.some((e=>i===e.name&&n===e.uuid))}))}static init(e,n){return new t(e,n)}},Ui}(),w=G,y=[{id:\"green\",displayMetadata:{color:\"#00CC88\",name:\"green\"}},{id:\"purple\",displayMetadata:{color:\"#8C61FF\",name:\"purple\"}},{id:\"orange\",displayMetadata:{color:\"#FF8C4C\",name:\"orange\"}},{id:\"red\",displayMetadata:{color:\"#FF5E60\",name:\"red\"}},{id:\"pink\",displayMetadata:{color:\"#FF8FB8\",name:\"pink\"}},{id:\"yellow\",displayMetadata:{color:\"#E9FF8F\",name:\"yellow\"}}];let f=class i extends c.Base{constructor(i,s,a){super(i),e.set(this,void 0),t.set(this,void 0),n.set(this,void 0),this.getProvider=()=>o(this,n,\"f\").getValue(),this.interopClients=new Map,this.contextGroupsById=new Map,r(this,t,a.contextGroups??[...y],\"f\"),r(this,e,a.fdc3Info,\"f\"),a?.logging&&(this.logging=a.logging),this.intentClientMap=new Map,this.lastContextMap=new Map,this.sessionContextGroupMap=new Map,r(this,n,new w.Lazy(s),\"f\"),this.setContextGroupMap(),this.setupChannelProvider()}static createClosedConstructor(...e){return class extends i{constructor(...t){if(t.length){const[n,i,r]=t;if(r&&\"object\"==typeof r&&!(0,u.default)(r,e[2]))return console.warn(\"You have modified the parameters of the InteropOverride constructor. This behavior is deprecated and will be removed in a future version. You can modify these options in your manifest. Please consult our Interop docs for guidance on migrating to the new override scheme.\"),void super(e[0],e[1],r);console.warn(\"You are attempting to pass arguments to the InteropOverride constructor. This is not necessary, and these passed arguments will be ignored. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.\")}super(...e)}}}setContext({context:e},t){this.wire.sendAction(\"interop-broker-set-context\").catch((e=>{}));const n=this.getClientState(t);if(!n||!n.contextGroupId)throw n?new Error(\"You must join a context group before you can set context.\"):new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);{const{contextGroupId:t}=n;this.setContextForGroup({context:e},t)}}setContextForGroup({context:e},t){this.wire.sendAction(\"interop-broker-set-context-for-group\").catch((e=>{}));const n=this.contextGroupsById.get(t);if(!n)throw new Error(`Unable to set context for context group that isn't in the context group mapping: ${t}.`);const r=i.checkContextIntegrity(e);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(e)}`);const o=e.type;n.set(o,e),this.lastContextMap.set(t,o);Array.from(this.interopClients.values()).filter((e=>e.contextGroupId===t)).forEach((t=>{for(const[,n]of t.contextHandlers)i.isContextTypeCompatible(o,n.contextType)&&this.invokeContextHandler(t.clientIdentity,n.handlerId,e)}))}getCurrentContext(e,t){this.wire.sendAction(\"interop-broker-get-current-context\").catch((e=>{}));const n=this.getClientState(t);if(!n?.contextGroupId)throw new Error(\"You must be a member of a context group to call getCurrentContext\");const{contextGroupId:i}=n,r=this.contextGroupsById.get(i),o=this.lastContextMap.get(i),s=e?.contextType??o;return r&&s?r.get(s):void 0}async joinContextGroup({contextGroupId:e,target:t},n){if(this.wire.sendAction(\"interop-broker-join-context-group\").catch((e=>{})),this.sessionContextGroupMap.has(e))throw new Error(l.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup);if(t){i.hasEndpointId(t)&&await this.addClientToContextGroup({contextGroupId:e},t);try{const n=this.channel.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name));if(!n.length)throw new Error(`Given Identity ${t.uuid} ${t.name} is not connected to the Interop Broker.`);n.length>1&&console.warn(`More than one connection found for identity ${t.uuid} ${t.name}`);const i=[];for(const t of n)i.push(this.addClientToContextGroup({contextGroupId:e},t));await Promise.all(i)}catch(e){throw new Error(e)}}else await this.addClientToContextGroup({contextGroupId:e},n)}async addClientToContextGroup({contextGroupId:e},t){this.wire.sendAction(\"interop-broker-add-client-to-context-group\").catch((e=>{}));const n=this.getClientState(t);if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(!this.getContextGroups().find((t=>t.id===e)))throw new Error(`Attempting to join a context group that does not exist: ${e}. You may only join existing context groups.`);if(n.contextGroupId!==e){n.contextGroupId=e,await this.setCurrentContextGroupInClientOptions(t,e);const i=this.contextGroupsById.get(e);for(const[,e]of n.contextHandlers){const{contextType:n,handlerId:r}=e;if(void 0===n)i.forEach(((e,n)=>{this.invokeContextHandler(t,r,e)}));else if(i.has(n)){const e=i.get(n);e&&this.invokeContextHandler(t,r,e)}}}}async removeFromContextGroup({target:e},t){if(this.wire.sendAction(\"interop-broker-remove-from-context-group\").catch((e=>{})),e){i.hasEndpointId(e)&&await this.removeClientFromContextGroup(e);try{const t=this.channel.connections.filter((t=>t.uuid===e.uuid&&t.name===e.name));if(!t.length)throw new Error(`No connection found for given Identity ${e.uuid} ${e.name}`);t.length>1&&console.warn(`More than one connection found for identity ${e.uuid} ${e.name}`);const n=[];for(const e of t)n.push(this.removeClientFromContextGroup(e));await Promise.all(n)}catch(e){throw new Error(e)}}else await this.removeClientFromContextGroup(t)}async removeClientFromContextGroup(e){this.wire.sendAction(\"interop-broker-remove-client-from-context-group\").catch((e=>{}));const t=this.getClientState(e);t&&(t.contextGroupId=void 0),await this.setCurrentContextGroupInClientOptions(e,null)}getContextGroups(){return this.wire.sendAction(\"interop-broker-get-context-groups\").catch((e=>{})),o(this,t,\"f\").map((e=>({...e})))}getInfoForContextGroup({contextGroupId:e}){return this.wire.sendAction(\"interop-broker-get-info-for-context-group\").catch((e=>{})),this.getContextGroups().find((t=>t.id===e))}getAllClientsInContextGroup({contextGroupId:e}){this.wire.sendAction(\"interop-broker-get-all-clients-in-context-group\").catch((e=>{}));return Array.from(this.interopClients.values()).filter((t=>t.contextGroupId===e)).map((e=>e.clientIdentity))}async handleFiredIntent(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.raiseIntent\",\"InteropBroker.handleFiredIntent\",t,\"interopClient.fireIntent\");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntent)}async setIntentTarget(e,t){this.wire.sendAction(\"interop-broker-set-intent-target\").catch((e=>{}));const n=this.intentClientMap.get(t.name),i=`intent-handler-${e.name}`;if(n){const t=n.get(i);if(t){if(t.pendingIntents.push(e),t.clientIdentity&&t.isReady){const{clientIdentity:e,pendingIntents:n}=t;try{const r=n[n.length-1];await this.invokeIntentHandler(e,i,r),t.pendingIntents=[]}catch(n){console.error(`Error invoking intent handler for client ${e.uuid}/${e.name}/${e.endpointId}`),t.isReady=!1}}}else n.set(i,{isReady:!1,pendingIntents:[e]})}else{this.intentClientMap.set(t.name,new Map);const n=this.intentClientMap.get(t.name);n&&n.set(i,{isReady:!1,pendingIntents:[e]})}}async handleInfoForIntent(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.findIntent\",\"InteropBroker.handleInfoForIntent\",t,\"interopClient.getInfoForIntent\");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntent)}async handleInfoForIntentsByContext(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.findIntentsByContext\",\"InteropBroker.handleInfoForIntentsByContext\",t,\"interopClient.getInfoForIntentsByContext\");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntentsByContext)}async handleFiredIntentForContext(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.raiseIntentForContext\",\"InteropBroker.handleFiredIntentForContext\",t,\"interopClient.fireIntentForContext\");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntentForContext)}async clientDisconnected(e){}async fdc3HandleOpen({app:e,context:t},n){const i=(0,l.generateOverrideWarning)(\"fdc3.open\",\"InteropBroker.fdc3HandleOpen\",n);throw console.warn(i),new Error(l.BROKER_ERRORS.fdc3Open)}async fdc3HandleFindInstances(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.open\",\"InteropBroker.fdc3HandleFindInstances\",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3FindInstances)}async fdc3HandleGetAppMetadata(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.getAppMetadata\",\"InteropBroker.fdc3HandleGetAppMetadata\",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3GetAppMetadata)}async invokeContextHandler(e,t,n){const i=await this.getProvider();try{await i.dispatch(e,t,n)}catch(i){console.error(`Error invoking context handler ${t} for context type ${n.type} in client ${e.uuid}/${e.name}/${e.endpointId}`,i)}}async invokeIntentHandler(e,t,n){const i=await this.getProvider();await i.dispatch(e,t,n)}async fdc3HandleGetInfo(t,n){const{fdc3Version:i}=t;return{fdc3Version:i,...o(this,e,\"f\"),optionalFeatures:{OriginatingAppMetadata:!1,UserChannelMembershipAPIs:!0},appMetadata:{appId:\"\",instanceId:\"\"}}}async getAllClientInfo(){return(await this.getProvider()).getAllClientInfo()}decorateSnapshot(e){return{...e,interopSnapshotDetails:{contextGroupStates:this.getContextGroupStates()}}}applySnapshot(e,t){const n=e?.interopSnapshotDetails?.contextGroupStates;n&&(t?.closeExistingWindows||this.updateExistingClients(n),this.rehydrateContextGroupStates(n))}updateExistingClients(e){this.interopClients.forEach((t=>{const{clientIdentity:n,contextGroupId:r,contextHandlers:o}=t;if(r){const t=e[r];for(const[,e]of Object.entries(t))o.forEach((t=>{const{handlerId:r,contextType:o}=t;i.isContextTypeCompatible(e.type,o)&&this.invokeContextHandler(n,r,e)}))}}))}getContextGroupStates(){return i.toObject(this.contextGroupsById)}rehydrateContextGroupStates(e){const t=Object.entries(e);for(const[e,n]of t){const t=Object.entries(n);for(const[n,i]of t)if(this.contextGroupsById.has(e)){this.contextGroupsById.get(e).set(n,i)}else console.warn(`Attempting to set a context group that isn't in the context group mapping. Skipping context group rehydration for: ${e}`)}}contextHandlerRegistered({contextType:e,handlerId:t},n){const i={contextType:e,handlerId:t},r=this.getClientState(n);if(r?.contextHandlers.set(t,i),r&&r.contextGroupId){const{contextGroupId:i}=r,o=this.contextGroupsById.get(i);if(void 0===e)o.forEach(((e,i)=>{this.invokeContextHandler(n,t,e)}));else if(o.has(e)){const i=o.get(e);i&&this.invokeContextHandler(n,t,i)}}}async intentHandlerRegistered(e,t){const{handlerId:n}=e,i=this.intentClientMap.get(t.name),r=i?.get(n);if(i)if(r){const{pendingIntents:e}=r;r.clientIdentity=t,r.isReady=!0;try{if(e.length>0){const i=e[e.length-1];await this.invokeIntentHandler(t,n,i),r.pendingIntents=[]}}catch(e){console.error(`Error invoking intent handler: ${n} for client ${t.uuid}/${t.name}/${t.endpointId}`)}}else i.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t});else{this.intentClientMap.set(t.name,new Map);const e=this.intentClientMap.get(t.name);e&&e.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t})}}removeContextHandler({handlerId:e},t){const n=this.getClientState(t);n&&n.contextHandlers.delete(e)}handleJoinSessionContextGroup({sessionContextGroupId:e},t){try{if(!e)throw new Error(\"Failed to join session context group: must specify group id.\");const n=this.sessionContextGroupMap.get(e);if(n)n.registerNewClient(t);else{const n=new h.default(this.channel,e);n.registerNewClient(t),this.sessionContextGroupMap.set(e,n)}return{hasConflict:this.contextGroupsById.has(e)}}catch(e){throw new Error(e)}}getClientState(e){return this.interopClients.get(e.endpointId)}static toObject(e){const t=Object.fromEntries(e),n={};return Object.entries(t).forEach((([e,t])=>{const i=Object.fromEntries(t);n[e]=i})),n}static checkContextIntegrity(e){if(!e)return{isValid:!1,reason:\"No context supplied\"};if(\"object\"!=typeof e)return{isValid:!1,reason:\"Context must be an Object\"};if(!e.type)return{isValid:!1,reason:\"Context must have a type property\"};if(e.id&&\"object\"!=typeof e.id)return{isValid:!1,reason:\"Context id must be an Object populated with key-value identifiers (if set)\"};if(e.id){const{id:t}=e,n=Object.keys(t);let i=!1;if(!n.length)return{isValid:!1,reason:\"Context id must have at least one key-value identifier\"};if(n.forEach((e=>{\"string\"==typeof e&&\"string\"==typeof t[e]||(i=!0)})),i)return{isValid:!1,reason:\"Context id key-value identifiers must be of type string\"}}return e.name&&\"string\"!=typeof e.name?{isValid:!1,reason:\"Context name must be of string type (if set)\"}:{isValid:!0}}static hasEndpointId(e){return void 0!==e.endpointId}static isContextTypeCompatible(e,t){return void 0===t||e===t}setContextGroupMap(){for(const e of this.getContextGroups())this.contextGroupsById.set(e.id,new Map)}async setCurrentContextGroupInClientOptions(e,t){try{const n=await this.fin.System.getEntityInfo(e.uuid,e.name);let i;\"view\"===n.entityType?i=await this.fin.View.wrap(e):\"window\"===n.entityType&&(i=await this.fin.Window.wrap(e)),i&&await i.updateOptions({interop:{currentContextGroup:t}})}catch(e){}}async setupChannelProvider(){try{const e=await this.getProvider();this.channel=e,this.wireChannel(e)}catch(e){throw new Error(`Error setting up Interop Broker Channel Provider: ${e}`)}}wireChannel(e){e.onConnection((async(e,t)=>{if(!await this.isConnectionAuthorized(e,t))throw new Error(`Connection not authorized for ${e.uuid}, ${e.name}`);if(!e.endpointId)throw new Error(\"Version too old to be compatible with Interop. Please upgrade your runtime to a more recent version.\");const n={contextGroupId:void 0,contextHandlers:new Map,clientIdentity:e};t?.currentContextGroup&&this.contextGroupsById.has(t.currentContextGroup)&&(n.contextGroupId=t?.currentContextGroup),this.interopClients.set(e.endpointId,n)})),e.onDisconnection((e=>{this.interopClients.delete(e.endpointId);const t=this.intentClientMap.get(e.name);t&&e.uuid===this.fin.me.uuid&&t.forEach((e=>{e.isReady=!1})),this.sessionContextGroupMap.forEach((t=>{t.onDisconnection(e)})),this.clientDisconnected(e)})),e.beforeAction((async(e,t,n)=>{if(!await this.isActionAuthorized(e,t,n))throw new Error(`Action (${e}) not authorized for ${n.uuid}, ${n.name}`);this.logging?.beforeAction?.enabled&&console.log(e,t,n)})),e.afterAction(((e,t,n)=>{this.logging?.afterAction?.enabled&&console.log(e,t,n)})),e.register(\"setContext\",this.setContext.bind(this)),e.register(\"fireIntent\",this.handleFiredIntent.bind(this)),e.register(\"getCurrentContext\",this.getCurrentContext.bind(this)),e.register(\"getInfoForIntent\",this.handleInfoForIntent.bind(this)),e.register(\"getInfoForIntentsByContext\",this.handleInfoForIntentsByContext.bind(this)),e.register(\"fireIntentForContext\",this.handleFiredIntentForContext.bind(this)),e.register(\"getContextGroups\",this.getContextGroups.bind(this)),e.register(\"joinContextGroup\",this.joinContextGroup.bind(this)),e.register(\"removeFromContextGroup\",this.removeFromContextGroup.bind(this)),e.register(\"getAllClientsInContextGroup\",this.getAllClientsInContextGroup.bind(this)),e.register(\"getInfoForContextGroup\",this.getInfoForContextGroup.bind(this)),e.register(\"contextHandlerRegistered\",this.contextHandlerRegistered.bind(this)),e.register(\"intentHandlerRegistered\",this.intentHandlerRegistered.bind(this)),e.register(\"removeContextHandler\",this.removeContextHandler.bind(this)),e.register(\"sessionContextGroup:createIfNeeded\",this.handleJoinSessionContextGroup.bind(this)),e.register(\"fdc3Open\",this.fdc3HandleOpen.bind(this)),e.register(\"fdc3v2FindIntentsByContext\",this.handleInfoForIntentsByContext.bind(this)),e.register(\"fdc3FindInstances\",this.fdc3HandleFindInstances.bind(this)),e.register(\"fdc3GetAppMetadata\",this.fdc3HandleGetAppMetadata.bind(this)),e.register(\"fdc3v2GetInfo\",(async(e,t)=>this.fdc3HandleGetInfo.bind(this)(e,t))),e.register(\"createPrivateChannelProvider\",(async e=>{const{channelId:t}=e,n=await this.fin.InterApplicationBus.Channel.create(t);p.PrivateChannelProvider.init(n,t)}))}isConnectionAuthorized(e,t){return this.wire.sendAction(\"interop-broker-is-connection-authorized\").catch((e=>{})),Promise.resolve(!0)}isActionAuthorized(e,t,n){return this.wire.sendAction(\"interop-broker-is-action-authorized\").catch((e=>{})),Promise.resolve(!0)}};return Gi.InteropBroker=f,e=new WeakMap,t=new WeakMap,n=new WeakMap,Gi}var zi,Ki={},qi={},Ji=s&&s.__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},Yi=s&&s.__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)};Object.defineProperty(qi,\"__esModule\",{value:!0});const Zi=d,Qi=Hi;class Xi extends Zi.Base{constructor(e,t,n){super(e),zi.set(this,void 0),this.id=n,Ji(this,zi,t,\"f\")}async setContext(e){this.wire.sendAction(\"interop-session-context-group-set-context\").catch((e=>{}));return(await Yi(this,zi,\"f\")).dispatch(`sessionContextGroup:setContext-${this.id}`,{sessionContextGroupId:this.id,context:e})}async getCurrentContext(e){this.wire.sendAction(\"interop-session-context-group-get-context\").catch((e=>{}));return(await Yi(this,zi,\"f\")).dispatch(`sessionContextGroup:getContext-${this.id}`,{sessionContextGroupId:this.id,type:e})}async addContextHandler(e,t){if(this.wire.sendAction(\"interop-session-context-group-add-handler\").catch((e=>{})),\"function\"!=typeof e)throw new Error(\"Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.\");const n=await Yi(this,zi,\"f\");let i;return i=t?`sessionContextHandler:invoke-${this.id}-${t}-${(0,Qi.generateId)()}`:`sessionContextHandler:invoke-${this.id}`,n.register(i,(0,Qi.wrapContextHandler)(e,i)),await n.dispatch(`sessionContextGroup:handlerAdded-${this.id}`,{handlerId:i,contextType:t}),{unsubscribe:await this.createUnsubscribeCb(i)}}async createUnsubscribeCb(e){const t=await Yi(this,zi,\"f\");return async()=>{t.remove(e),await t.dispatch(`sessionContextGroup:handlerRemoved-${this.id}`,{handlerId:e})}}getUserInstance(){return{id:this.id,setContext:(0,Qi.wrapInTryCatch)(this.setContext.bind(this),\"Failed to set context: \"),getCurrentContext:(0,Qi.wrapInTryCatch)(this.getCurrentContext.bind(this),\"Failed to get context: \"),addContextHandler:(0,Qi.wrapInTryCatch)(this.addContextHandler.bind(this),\"Failed to add context handler: \")}}}qi.default=Xi,zi=new WeakMap;var er={},tr={},nr={},ir={},rr=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),or=s&&s.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,\"default\",{enumerable:!0,value:t})}:function(e,t){e.default=t}),sr=s&&s.__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)&&rr(t,e,n);return or(t,e),t};Object.defineProperty(ir,\"__esModule\",{value:!0}),ir.PrivateChannelClient=void 0;const ar=sr(Hi);var cr,dr;function hr(){if(cr)return tr;cr=1;var e,t=s&&s.__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)},n=s&&s.__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},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(tr,\"__esModule\",{value:!0}),tr.FDC3ModuleBase=void 0;const o=nr,a=Hi,c=wr(),d=r(i);return tr.FDC3ModuleBase=class{get client(){return t(this,e,\"f\").call(this)}get fin(){return this.wire.getFin()}constructor(t,i){this.wire=i,e.set(this,void 0),n(this,e,t,\"f\")}async broadcast(e){return this.wire.sendAction(\"fdc3-broadcast\").catch((e=>{})),this.client.setContext(e)}async _open(e,t){this.wire.sendAction(\"fdc3-open\").catch((e=>{}));try{return await c.InteropClient.ferryFdc3Call(this.client,\"fdc3Open\",{app:e,context:t})}catch(e){const t=e.message===a.BROKER_ERRORS.fdc3Open?\"ResolverUnavailable\":e.message;throw new Error(t)}}async _getChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:\"system\",...(0,o.getUnsupportedChannelApis)()})))}async getOrCreateChannel(e){this.wire.sendAction(\"fdc3-get-or-create-channel\").catch((e=>{}));const t=(await this._getChannels()).find((t=>t.id===e));if(t)return{...t,type:\"system\",...(0,o.getUnsupportedChannelApis)()};try{const t=await this.client.joinSessionContextGroup(e);return(0,o.buildAppChannelObject)(t)}catch(e){throw console.error(e.message),new Error(o.ChannelError.CreationFailed)}}async getSystemChannels(){return this.wire.sendAction(\"fdc3-get-system-channels\").catch((e=>{})),this._getChannels()}async joinChannel(e){this.wire.sendAction(\"fdc3-join-channel\").catch((e=>{}));try{return await this.client.joinContextGroup(e)}catch(e){if(e.message===a.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup?console.error(\"The Channel you have tried to join is an App Channel. Custom Channels can only be defined by the Interop Broker through code or manifest configuration. Please use getOrCreateChannel.\"):console.error(e.message),e.message.startsWith(\"Attempting to join a context group that does not exist\"))throw new Error(o.ChannelError.NoChannelFound);throw new Error(o.ChannelError.AccessDenied)}}async getCurrentChannel(){this.wire.sendAction(\"fdc3-get-current-channel\").catch((e=>{}));const e=await this.getCurrentContextGroupInfo();return e?this.buildChannelObject(e):null}async leaveCurrentChannel(){return this.wire.sendAction(\"fdc3-leave-current-channel\").catch((e=>{})),this.client.removeFromContextGroup()}async getCurrentContextGroupInfo(){const e=await this.client.getContextGroups(),t=e.map((async e=>this.client.getAllClientsInContextGroup(e.id))),n=(await Promise.all(t)).findIndex((e=>e.some((e=>{const{uuid:t,name:n}=e;return this.wire.me.uuid===t&&this.wire.me.name===n}))));return e[n]}async buildChannelObject(e){return{...e,type:\"system\",addContextListener:(...[e,t])=>{let n,i;\"function\"==typeof e?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),n=e):(n=t,\"string\"==typeof e&&(i=e));const r=(async()=>{let e=!0;const t=await this.client.getCurrentContext(i);return this.client.addContextHandler(((i,r)=>{if(!e||(e=!1,!(0,d.default)(t,i)))return n(i,r)}),i)})();return{...r,unsubscribe:()=>r.then((e=>e.unsubscribe()))}},broadcast:this.broadcast.bind(this),getCurrentContext:async e=>{const t=await this.client.getCurrentContext(e);return void 0===t?null:t}}}},e=new WeakMap,tr}ir.PrivateChannelClient=class{constructor(e,t){this.id=t,this.client=e,this.listeners=new Map}async broadcast(e){return this.client.dispatch(\"broadcast\",{context:e})}async getCurrentContext(e){return this.client.dispatch(\"getCurrentContext\",{contextType:e})}async addContextListener(e,t){if(\"function\"!=typeof t)throw new Error(\"Non-function argument passed to the second parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.\");let n;n=e?`contextHandler:invoke-${this.id}-${e}-${ar.generateId()}`:`contextHandler:invoke-${this.id}-${ar.generateId()}`,this.client.register(n,ar.wrapContextHandler(t,n));const i={unsubscribe:await this.createContextUnsubscribeCb(n)};return this.listeners.set(n,i),await this.client.dispatch(\"contextHandlerAdded\",{handlerId:n,contextType:e}),i}createNonStandardUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch(\"nonStandardHandlerRemoved\",{handlerId:e})}}createContextUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch(\"contextHandlerRemoved\",{handlerId:e})}}onAddContextListener(e){const t=`onContextHandlerAdded:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch(\"onAddContextHandlerAdded\",{handlerId:t}),n}onDisconnect(e){const t=`onDisconnect:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch(\"onDisconnectHandlerAdded\",{handlerId:t}),n}onUnsubscribe(e){const t=`onUnsubscribe:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch(\"onUnsubscribeHandlerAdded\",{handlerId:t}),n}async cleanUpAllSubs(){Array.from(this.listeners.keys()).forEach((e=>{this.client.remove(e),this.listeners.delete(e)}))}async disconnect(){try{await this.client.dispatch(\"clientDisconnecting\"),await this.cleanUpAllSubs(),await this.client.disconnect()}catch(e){throw new Error(e.message)}}},function(e){var t=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,\"__esModule\",{value:!0}),e.getIntentResolution=e.isChannel=e.isContext=e.connectPrivateChannel=e.buildAppChannelObject=e.buildPrivateChannelObject=e.ChannelError=e.ResultError=e.UnsupportedChannelApiError=e.getUnsupportedChannelApis=void 0;const n=Hi,r=ir,o=t(i);e.getUnsupportedChannelApis=e=>({addContextListener:()=>{throw new a(\"Channel.addContextListener\",e)},broadcast:()=>{throw new a(\"Channel.broadcast\",e)},getCurrentContext:()=>{throw new a(\"Channel.getCurrentContext\",e)}});class a extends Error{constructor(e,t=\"System\"){super(e),this.message=`Calling ${e} on an instance of a ${t} Channel returned by fdc3.get${t}Channels is not supported. If you would like to use a ${t} Channel, please use fdc3.joinChannel, fdc3.addContextListener, and fdc3.broadcast instead.`}}var c,d;e.UnsupportedChannelApiError=a,function(e){e.NoResultReturned=\"NoResultReturned\",e.IntentHandlerRejected=\"IntentHandlerRejected\"}(c=e.ResultError||(e.ResultError={})),(d=e.ChannelError||(e.ChannelError={})).NoChannelFound=\"NoChannelFound\",d.AccessDenied=\"AccessDenied\",d.CreationFailed=\"CreationFailed\";e.buildPrivateChannelObject=e=>{let t=!1;const n=()=>{if(t)throw new Error(\"Private Channel Client has been disconnected from the Private Channel\")};return{id:e.id,type:\"private\",broadcast:async t=>(n(),e.broadcast(t)),getCurrentContext:async t=>(n(),e.getCurrentContext(t)),addContextListener:async(t,i)=>{n();let r=i,o=t;\"function\"==typeof t&&(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),r=t,o=null);return e.addContextListener(o,r)},onAddContextListener:t=>(n(),e.onAddContextListener(t)),disconnect:async()=>(n(),t=!0,e.disconnect()),onDisconnect:t=>(n(),e.onDisconnect(t)),onUnsubscribe:t=>(n(),e.onUnsubscribe(t))}};e.buildAppChannelObject=e=>({id:e.id,type:\"app\",broadcast:e.setContext,getCurrentContext:async t=>{const n=await e.getCurrentContext(t);return void 0===n?null:n},addContextListener:(t,n)=>{let i,r;\"function\"==typeof t?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),i=t):(i=n,\"string\"==typeof t&&(r=t));const s=(async()=>{let t=!0;const n=await e.getCurrentContext(r);return e.addContextHandler(((e,r)=>{if(!t||(t=!1,!(0,o.default)(n,e)))return i(e,r)}),r)})();return{...s,unsubscribe:()=>s.then((e=>e.unsubscribe()))}}});e.connectPrivateChannel=async t=>{try{const n=await fin.InterApplicationBus.Channel.connect(t),i=new r.PrivateChannelClient(n,t);return(0,e.buildPrivateChannelObject)(i)}catch(e){throw new Error(`Private Channel with id: ${t} doesn't exist`)}};e.isContext=e=>{if(e&&\"object\"==typeof e&&\"type\"in e){const{type:t}=e;return\"string\"==typeof t}return!1};e.isChannel=e=>{if(e&&\"object\"==typeof e&&\"type\"in e&&\"id\"in e){const{type:t,id:n}=e;return\"string\"==typeof t&&\"string\"==typeof n&&(\"app\"===t||\"private\"===t)}return!1};e.getIntentResolution=async(t,i,r,o)=>{const s=(0,n.generateId)(),a=new Promise(((e,t)=>{fin.InterApplicationBus.subscribe({uuid:\"*\"},s,(t=>{e(t)})).catch((()=>t(new Error(\"getResult is not supported in this environment\"))))})),d=r?{target:r,intentResolutionResultId:s}:{intentResolutionResultId:s},h=o?{name:o,context:i,metadata:d}:{...i,metadata:d},l=async()=>{let n=await a;if(!n||\"object\"!=typeof n)throw new Error(c.NoResultReturned);const{error:i}=n;if(i)throw new Error(c.IntentHandlerRejected);if((0,e.isChannel)(n)){const{id:i,type:r}=n;switch(r){case\"private\":n=await(0,e.connectPrivateChannel)(i);break;case\"app\":{const r=await t.joinSessionContextGroup(i);n=(0,e.buildAppChannelObject)(r);break}}}else if(!(0,e.isContext)(n))throw new Error(c.NoResultReturned);return n},u=o?await t.fireIntent(h):await t.fireIntentForContext(h);return\"object\"!=typeof u?{source:{appId:\"\",instanceId:\"\"},intent:\"\",version:\"2.0\",getResult:l}:{...u,getResult:l}}}(nr);var lr,ur,pr={};function wr(){if(ur)return Ki;ur=1;var e,t,n=s&&s.__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},i=s&&s.__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)},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ki,\"__esModule\",{value:!0}),Ki.InteropClient=void 0;const o=d,a=r(qi),c=function(){if(dr)return er;dr=1,Object.defineProperty(er,\"__esModule\",{value:!0}),er.Fdc3Module=void 0;const e=Hi,t=hr();class n extends t.FDC3ModuleBase{async open(e,t){await super._open(e,t)}addContextListener(e,t){let n;return this.wire.sendAction(\"fdc3-add-context-listener\").catch((e=>{})),\"function\"==typeof e?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),n=this.client.addContextHandler(e)):n=this.client.addContextHandler(t,null===e?void 0:e),{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}addIntentListener(e,t){this.wire.sendAction(\"fdc3-add-intent-listener\").catch((e=>{}));const n=this.client.registerIntentHandler((e=>{const{context:n,metadata:i}=e,{metadata:r}=n,o=i?.intentResolutionResultId||r?.intentResolutionResultId;o&&this.fin.InterApplicationBus.publish(o,null).catch((()=>null)),t(e.context)}),e,{fdc3Version:\"1.2\"});return{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}async raiseIntent(t,n,i){this.wire.sendAction(\"fdc3-raise-intent\").catch((e=>{}));const r=i?{name:t,context:n,metadata:{target:i}}:{name:t,context:n};try{return await this.client.fireIntent(r)}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntent?\"ResolverUnavailable\":t.message;throw new Error(n)}}async findIntent(t,n){this.wire.sendAction(\"fdc3-find-intent\").catch((e=>{}));try{return await this.client.getInfoForIntent({name:t,context:n})}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntent?\"ResolverUnavailable\":t.message;throw new Error(n)}}async findIntentsByContext(t){this.wire.sendAction(\"fdc3-find-intents-by-context\").catch((e=>{}));try{return await this.client.getInfoForIntentsByContext(t)}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntentsByContext?\"ResolverUnavailable\":t.message;throw new Error(n)}}async raiseIntentForContext(t,n){this.wire.sendAction(\"fdc3-raise-intent-for-context\").catch((e=>{}));try{return await this.client.fireIntentForContext({...t,metadata:{target:n}})}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntentForContext?\"ResolverUnavailable\":t.message;throw new Error(n)}}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}getInfo(){return this.wire.sendAction(\"fdc3-get-info\").catch((e=>{})),{providerVersion:this.wire.environment.getAdapterVersionSync(),provider:`openfin-${this.wire.me.uuid}`,fdc3Version:\"1.2\"}}}return er.Fdc3Module=n,er}(),h=function(){if(lr)return pr;lr=1,Object.defineProperty(pr,\"__esModule\",{value:!0}),pr.Fdc3Module2=void 0;const e=hr(),t=Hi,n=wr(),i=nr,r=ir;class o extends e.FDC3ModuleBase{async open(e,t){return\"string\"==typeof e&&console.warn(\"Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).\"),super._open(e,t)}async findInstances(e){this.wire.sendAction(\"fdc3-find-instances\").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,\"fdc3FindInstances\",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3FindInstances?\"ResolverUnavailable\":e.message;throw new Error(n)}}async getAppMetadata(e){this.wire.sendAction(\"fdc3-get-app-metadata\").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,\"fdc3GetAppMetadata\",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3GetAppMetadata?\"ResolverUnavailable\":e.message;throw new Error(n)}}async addContextListener(e,t){this.wire.sendAction(\"fdc3-add-context-listener\").catch((e=>{}));const n=e=>t=>{const{contextMetadata:n,...i}=t,r=n?[{...i},n]:[t,null];e(...r)};let i=t,r=n(i);return\"function\"==typeof e?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),i=e,r=n(i),this.client.addContextHandler(r)):this.client.addContextHandler(r,null===e?void 0:e)}async findIntent(e,n,i){this.wire.sendAction(\"fdc3-find-intent\").catch((e=>{}));try{return await this.client.getInfoForIntent({name:e,context:n,metadata:{resultType:i}})}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntent?\"ResolverUnavailable\":e.message;throw new Error(n)}}async findIntentsByContext(e,i){this.wire.sendAction(\"fdc3-find-intents-by-context\").catch((e=>{}));const r=i?{context:e,metadata:{resultType:i}}:e;try{return await n.InteropClient.ferryFdc3Call(this.client,\"fdc3v2FindIntentsByContext\",r)}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntentsByContext?\"ResolverUnavailable\":e.message;throw new Error(n)}}async raiseIntent(e,n,r){this.wire.sendAction(\"fdc3-raise-intent\").catch((e=>{}));try{return\"string\"==typeof r&&console.warn(\"Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).\"),(0,i.getIntentResolution)(this.client,n,r,e)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?\"ResolverUnavailable\":e.message;throw new Error(n)}}async raiseIntentForContext(e,n){this.wire.sendAction(\"fdc3-raise-intent-for-context\").catch((e=>{}));try{return\"string\"==typeof n&&console.warn(\"Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).\"),(0,i.getIntentResolution)(this.client,e,n)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?\"ResolverUnavailable\":e.message;throw new Error(n)}}async addIntentListener(e,t){if(this.wire.sendAction(\"fdc3-add-intent-listener\").catch((e=>{})),\"string\"!=typeof e)throw new Error(\"First argument must be an Intent name\");return this.client.registerIntentHandler((async e=>{let n,i;const{context:r,metadata:o}=e,{contextMetadata:s,metadata:a,...c}=r,d=o?.intentResolutionResultId||a?.intentResolutionResultId;try{const e=a?{metadata:a,...c}:{...c};n=await t(e,s),i=n}catch(e){n=e,i={error:!0}}if(d&&this.fin.InterApplicationBus.publish(d,i).catch((()=>null)),n instanceof Error)throw new Error(n.message);return n}),e,{fdc3Version:\"2.0\"})}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}async createPrivateChannel(){const e=(0,t.generateId)();await n.InteropClient.ferryFdc3Call(this.client,\"createPrivateChannelProvider\",{channelId:e});const o=await this.fin.InterApplicationBus.Channel.connect(e),s=new r.PrivateChannelClient(o,e);return(0,i.buildPrivateChannelObject)(s)}async getUserChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:\"user\",...(0,i.getUnsupportedChannelApis)(\"User\")})))}async getSystemChannels(){return console.warn(\"This API has been deprecated. Please use fdc3.getUserChannels instead.\"),super.getSystemChannels()}async joinUserChannel(e){return super.joinChannel(e)}async joinChannel(e){return console.warn(\"This API has been deprecated. Please use fdc3.joinUserChannel instead.\"),super.joinChannel(e)}async getCurrentChannel(){const e=await super.getCurrentChannel();return e?{...e,type:\"user\",broadcast:this.broadcast.bind(this)}:null}async getInfo(){return n.InteropClient.ferryFdc3Call(this.client,\"fdc3v2GetInfo\",{fdc3Version:\"2.0\"})}}return pr.Fdc3Module2=o,pr}(),l=Hi;let u=class extends o.Base{constructor(i,r){super(i),e.set(this,void 0),t.set(this,void 0),n(this,t,new Map,\"f\"),n(this,e,r,\"f\")}async setContext(t){this.wire.sendAction(\"interop-client-set-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"setContext\",{context:t})}async addContextHandler(t,n){if(this.wire.sendAction(\"interop-client-add-context-handler\").catch((e=>{})),\"function\"!=typeof t)throw new Error(\"Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.\");const r=await i(this,e,\"f\");let o;o=n?`invokeContextHandler-${n}-${(0,l.generateId)()}`:\"invokeContextHandler\";const s=(0,l.wrapContextHandler)(t,o);return r.register(o,s),await r.dispatch(\"contextHandlerRegistered\",{handlerId:o,contextType:n}),{unsubscribe:async()=>{r.remove(o),await r.dispatch(\"removeContextHandler\",{handlerId:o})}}}async getContextGroups(){this.wire.sendAction(\"interop-client-get-context-groups\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getContextGroups\")}async joinContextGroup(t,n){this.wire.sendAction(\"interop-client-join-context-group\").catch((e=>{}));const r=await i(this,e,\"f\");if(!t)throw new Error(\"No contextGroupId specified for joinContextGroup.\");return r.dispatch(\"joinContextGroup\",{contextGroupId:t,target:n})}async removeFromContextGroup(t){this.wire.sendAction(\"interop-client-remove-from-context-group\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"removeFromContextGroup\",{target:t})}async getAllClientsInContextGroup(t){this.wire.sendAction(\"interop-client-get-all-clients-in-context-group\").catch((e=>{}));const n=await i(this,e,\"f\");if(!t)throw new Error(\"No contextGroupId specified for getAllClientsInContextGroup.\");return n.dispatch(\"getAllClientsInContextGroup\",{contextGroupId:t})}async getInfoForContextGroup(t){this.wire.sendAction(\"interop-client-get-info-for-context-group\").catch((e=>{}));const n=await i(this,e,\"f\");if(!t)throw new Error(\"No contextGroupId specified for getInfoForContextGroup.\");return n.dispatch(\"getInfoForContextGroup\",{contextGroupId:t})}async fireIntent(t){this.wire.sendAction(\"interop-client-fire-intent\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"fireIntent\",t)}async registerIntentHandler(t,n,r){this.wire.sendAction(\"interop-client-register-intent-handler\").catch((e=>{}));const o=await i(this,e,\"f\"),s=`intent-handler-${n}`,a=(0,l.wrapIntentHandler)(t,s);try{await o.register(s,a),await o.dispatch(\"intentHandlerRegistered\",{handlerId:s,...r})}catch(e){throw new Error(\"Unable to register intent handler\")}return{unsubscribe:async()=>{o.remove(s)}}}async getCurrentContext(t){this.wire.sendAction(\"interop-client-get-current-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getCurrentContext\",{contextType:t})}async getInfoForIntent(t){this.wire.sendAction(\"interop-client-get-info-for-intent\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getInfoForIntent\",t)}async getInfoForIntentsByContext(t){this.wire.sendAction(\"interop-client-get-info-for-intents-by-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getInfoForIntentsByContext\",t)}async fireIntentForContext(t){this.wire.sendAction(\"interop-client-fire-intent-for-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"fireIntentForContext\",t)}async joinSessionContextGroup(n){try{const r=i(this,t,\"f\").get(n);if(r)return r.getUserInstance();const o=await i(this,e,\"f\"),{hasConflict:s}=await o.dispatch(\"sessionContextGroup:createIfNeeded\",{sessionContextGroupId:n});s&&console.warn(`A (non-session) context group with the name \"${n}\" already exists. If you are trying to join a Context Group, call joinContextGroup instead.`);const c=new a.default(this.wire,i(this,e,\"f\"),n);return i(this,t,\"f\").set(n,c),c.getUserInstance()}catch(e){throw console.error(`Error thrown trying to create Session Context Group with id \"${n}\": ${e}`),e}}async onDisconnection(t){this.wire.sendAction(\"interop-client-add-ondisconnection-listener\").catch((e=>{}));return(await i(this,e,\"f\")).onDisconnection((e=>{const{uuid:n}=e;t({type:\"interop-broker\",topic:\"disconnected\",brokerName:n})}))}getFDC3Sync(e){switch(e){case\"1.2\":return new c.Fdc3Module((()=>this),this.wire);case\"2.0\":return new h.Fdc3Module2((()=>this),this.wire);default:throw new Error(`Invalid FDC3 version provided: ${e}. Must be '1.2' or '2.0'`)}}async getFDC3(e){return this.getFDC3Sync(e)}static async ferryFdc3Call(t,n,r){return(await i(t,e,\"f\")).dispatch(n,r||null)}};return Ki.InteropClient=u,e=new WeakMap,t=new WeakMap,Ki}var yr,fr,gr,mr={};function vr(){if(yr)return mr;yr=1,Object.defineProperty(mr,\"__esModule\",{value:!0}),mr.overrideCheck=mr.checkFDC32Overrides=mr.getDefaultViewFdc3VersionFromAppInfo=void 0;const e=Vi();function t(t){return[\"fdc3HandleFindInstances\",\"handleInfoForIntent\",\"handleInfoForIntentsByContext\",\"fdc3HandleGetAppMetadata\",\"fdc3HandleGetInfo\",\"fdc3HandleOpen\",\"handleFiredIntent\",\"handleFiredIntentForContext\"].filter((n=>t[n]===e.InteropBroker.prototype[n]))}return mr.getDefaultViewFdc3VersionFromAppInfo=function({manifest:e,initialOptions:t}){const n=e?.platform?.defaultViewOptions?.fdc3InteropApi??t.defaultViewOptions?.fdc3InteropApi;return[\"1.2\",\"2.0\"].includes(n??\"\")?n:void 0},mr.checkFDC32Overrides=t,mr.overrideCheck=function(e,n){if(n&&\"2.0\"===n){const n=t(e);n.length>0&&console.warn(`WARNING: FDC3 2.0 has been set as a default option for Views in this Platform, but the required InteropBroker APIs for FDC3 2.0 compliance have not all been overridden.\\nThe following APIs need to be overridden:\\n${n.join(\"\\n\")}`)}},mr}function Cr(){return gr||(gr=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),i=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),i(function(){if(fr)return Ti;fr=1;var e=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ti,\"__esModule\",{value:!0}),Ti.InteropModule=void 0;const t=e(n),i=$i,r=d,o=Vi(),a=wr(),c=vr(),h=Tn,l=e=>new e,u=\"You have attempted to use or modify InteropBroker parameters, which is not allowed. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.\";class p extends r.Base{async init(e,n=l){this.wire.sendAction(\"interop-init\").catch((()=>{}));const r=await this.wire.environment.getInteropInfo(this.wire.getFin()),s=(0,i.createUnusableObject)(u),a=(0,i.createWarningObject)(u,(0,t.default)(r)),d=async()=>{throw new Error(u)},p=o.InteropBroker.createClosedConstructor(this.wire,(()=>this.fin.InterApplicationBus.Channel.create(`interop-broker-${e}`)),r);let w;return w=Array.isArray(n)?new((0,h.overrideFromComposables)(...n)(p))(s,d,a):await n(p,s,d,a),(0,c.overrideCheck)(w,r.fdc3Version),w}connectSync(e,t){return this.wire.sendAction(\"interop-connect-sync\").catch((()=>{})),new a.InteropClient(this.wire,this.wire.environment.whenReady().then((()=>this.fin.InterApplicationBus.Channel.connect(`interop-broker-${e}`,{payload:t}))))}}return Ti.InteropModule=p,Ti}(),e),i(wr(),e),i(Vi(),e)}(Li)),Li}var br={},Ir={},Er={},xr={};Object.defineProperty(xr,\"__esModule\",{value:!0}),xr.getSnapshotSourceChannelName=void 0;xr.getSnapshotSourceChannelName=e=>`snapshot-source-provider-${e.uuid}`;var Ar,Pr,Mr,_r,Or,Sr=s&&s.__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},Rr=s&&s.__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)};Object.defineProperty(Er,\"__esModule\",{value:!0}),Er.SnapshotSource=void 0;const Fr=d,jr=xr,kr=new Map;class Lr extends Fr.Base{constructor(e,t){super(e),Ar.set(this,void 0),Pr.set(this,(()=>(kr.has(this.identity.uuid)||kr.set(this.identity.uuid,{eventFired:null,clientPromise:null}),kr.get(this.identity.uuid)))),Mr.set(this,(()=>(Rr(this,Pr,\"f\").call(this).clientPromise||(Rr(this,Pr,\"f\").call(this).clientPromise=Rr(this,_r,\"f\").call(this)),Rr(this,Pr,\"f\").call(this).clientPromise))),_r.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);try{Rr(this,Pr,\"f\").call(this).eventFired||await Rr(this,Or,\"f\").call(this);const t=await this.fin.InterApplicationBus.Channel.connect(e,{wait:!1});return t.onDisconnection((()=>{Rr(this,Pr,\"f\").call(this).clientPromise=null,Rr(this,Pr,\"f\").call(this).eventFired=null})),t}catch(e){throw Rr(this,Pr,\"f\").call(this).clientPromise=null,new Error(\"The targeted SnapshotSource is not currently initialized. Await this object's ready() method.\")}})),Or.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);let t,n;const i=new Promise(((e,i)=>{t=e,n=i}));Rr(this,Pr,\"f\").call(this).eventFired=i;const r=async i=>{try{i.channelName===e&&(t(),await this.fin.InterApplicationBus.Channel.removeListener(\"connected\",r))}catch(e){n(e)}};await this.fin.InterApplicationBus.Channel.on(\"connected\",r)})),Sr(this,Ar,t,\"f\")}get identity(){return Rr(this,Ar,\"f\")}async ready(){this.wire.sendAction(\"snapshot-source-ready\").catch((e=>{}));try{await Rr(this,Mr,\"f\").call(this)}catch(e){await Rr(this,Pr,\"f\").call(this).eventFired}}async getSnapshot(){this.wire.sendAction(\"snapshot-source-get-snapshot\").catch((e=>{}));const e=await Rr(this,Mr,\"f\").call(this),t=await e.dispatch(\"get-snapshot\");return(await t).snapshot}async applySnapshot(e){this.wire.sendAction(\"snapshot-source-apply-snapshot\").catch((e=>{}));return(await Rr(this,Mr,\"f\").call(this)).dispatch(\"apply-snapshot\",{snapshot:e})}}Er.SnapshotSource=Lr,Ar=new WeakMap,Pr=new WeakMap,Mr=new WeakMap,_r=new WeakMap,Or=new WeakMap,Object.defineProperty(Ir,\"__esModule\",{value:!0}),Ir.SnapshotSourceModule=void 0;const Tr=d,$r=Er,Br=xr;class Gr extends Tr.Base{async init(e){if(this.wire.sendAction(\"snapshot-source-init\").catch((e=>{})),\"object\"!=typeof e||\"function\"!=typeof e.getSnapshot||\"function\"!=typeof e.applySnapshot)throw new Error(\"you must pass in a valid SnapshotProvider\");const t=await this.fin.InterApplicationBus.Channel.create((0,Br.getSnapshotSourceChannelName)(this.fin.me));t.register(\"get-snapshot\",(async()=>({snapshot:await e.getSnapshot()}))),t.register(\"apply-snapshot\",(({snapshot:t})=>e.applySnapshot(t)))}wrapSync(e){return this.wire.sendAction(\"snapshot-source-wrap-sync\").catch((e=>{})),new $r.SnapshotSource(this.wire,e)}async wrap(e){return this.wire.sendAction(\"snapshot-source-wrap\").catch((e=>{})),this.wrapSync(e)}}Ir.SnapshotSourceModule=Gr,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Ir,e),n(Er,e)}(br),Object.defineProperty(a,\"__esModule\",{value:!0});var Wr=a.Fin=void 0;const Hr=t,Nr=c,Dr=ie(),Ur=Z(),Vr=de,zr=en,Kr=rn,qr=un,Jr=bn,Yr=J(),Zr=An,Qr=ki,Xr=Cr(),eo=br;class to extends Hr.EventEmitter{constructor(e){super(),this.wire=e,this.System=new Nr.System(e),this.Window=new Dr._WindowModule(e),this.Application=new Ur.ApplicationModule(e),this.InterApplicationBus=new Vr.InterApplicationBus(e),this.Clipboard=new zr.Clipboard(e),this.ExternalApplication=new Kr.ExternalApplicationModule(e),this.Frame=new qr._FrameModule(e),this.GlobalHotkey=new Jr.GlobalHotkey(e),this.Platform=new Zr.PlatformModule(e,this.InterApplicationBus.Channel),this.View=new Yr.ViewModule(e),this.Interop=new Xr.InteropModule(e),this.SnapshotSource=new eo.SnapshotSourceModule(e),e.registerFin(this),this.me=(0,Qr.getMe)(e),e.on(\"disconnected\",(()=>{this.emit(\"disconnected\")}))}}Wr=a.Fin=to;var no={},io={};function ro(e){return\"string\"==typeof e.manifestUrl}function oo(e){return ao(e)&&\"string\"==typeof e.address}function so(e){return oo(e)&&\"string\"==typeof e.token}function ao(e){return\"string\"==typeof e.uuid}function co(e){return e.runtime&&\"string\"==typeof e.runtime.version}function ho(e){return ao(e)&&co(e)}Object.defineProperty(io,\"__esModule\",{value:!0}),io.isInternalConnectConfig=io.isPortDiscoveryConfig=io.isNewConnectConfig=io.isConfigWithReceiver=io.isRemoteConfig=io.isExistingConnectConfig=io.isExternalConfig=void 0,io.isExternalConfig=ro,io.isExistingConnectConfig=oo,io.isRemoteConfig=so,io.isConfigWithReceiver=function(e){return\"object\"==typeof e.receiver&&so({...e,address:\"\"})},io.isNewConnectConfig=ho,io.isPortDiscoveryConfig=function(e){return ro(e)&&co(e)||ho(e)},io.isInternalConnectConfig=function(e){return oo(e)||ho(e)};var lo={},uo={};Object.defineProperty(uo,\"__esModule\",{value:!0}),uo.EmitterMap=void 0;const po=t;function wo(e){return Buffer.from(e).toString(\"base64\")}uo.EmitterMap=class{constructor(){this.storage=new Map}hashKeys(e){return e.map(wo).join(\"/\")}getOrCreate(e){const t=this.hashKeys(e);return this.storage.has(t)||this.storage.set(t,new po.EventEmitter),this.storage.get(t)}has(e){return this.storage.has(this.hashKeys(e))}delete(e){const t=this.hashKeys(e);return this.storage.delete(t)}},Object.defineProperty(lo,\"__esModule\",{value:!0});const yo=uo;class fo extends yo.EmitterMap{constructor(){super(...arguments),this.dispatchEvent=e=>{if(function(e){return\"process-desktop-event\"===e.action}(e)){const{payload:t}=e,n=function(e){const{topic:t}=e;if(\"frame\"===t||\"window\"===t||\"view\"===t){const{uuid:n,name:i}=e;return[t,n,i]}if(\"application\"===t){const{uuid:n}=e;return[t,n]}return[t]}(t);if(this.has(n))return this.getOrCreate(n).emit(t.type,t),!0}return!1}}}lo.default=fo;var go,mo,vo=s&&s.__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},Co=s&&s.__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)},bo=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(no,\"__esModule\",{value:!0});var Io=no.Transport=void 0;const Eo=t,xo=io,Ao=g,Po=bo(lo),Mo=ki,_o=ke;class Oo extends Eo.EventEmitter{constructor(e,t,n){super(),this.wireListeners=new Map,this.topicRefMap=new Map,this.eventAggregator=new Po.default,this.messageHandlers=[this.eventAggregator.dispatchEvent],go.set(this,void 0),mo.set(this,void 0),this.connectSync=()=>{Co(this,go,\"f\").connectSync()},this.getPort=()=>Co(this,go,\"f\").getPort(),vo(this,go,new e(this.onmessage.bind(this)),\"f\"),this.environment=t,this.sendRaw=Co(this,go,\"f\").send.bind(Co(this,go,\"f\")),this.registerMessageHandler(this.handleMessage.bind(this)),Co(this,go,\"f\").on(\"disconnected\",(()=>{for(const[,{handleNack:e}]of this.wireListeners)e({reason:\"Remote connection has closed\"});this.wireListeners.clear(),this.emit(\"disconnected\")}));const{uuid:i,name:r}=n,o=this.environment.getCurrentEntityType();this.me=(0,Mo.getBaseMe)(o,i,r)}getFin(){if(!Co(this,mo,\"f\"))throw new Error(\"No Fin object registered for this transport\");return Co(this,mo,\"f\")}registerFin(e){if(Co(this,mo,\"f\"))throw new Error(\"Fin object has already been registered for this transport\");vo(this,mo,e,\"f\")}shutdown(){return Co(this,go,\"f\").shutdown()}async connect(e){if((0,xo.isConfigWithReceiver)(e))return await Co(this,go,\"f\").connect(e.receiver),this.authorize(e);if((0,xo.isRemoteConfig)(e))return this.connectRemote(e);if((0,xo.isExistingConnectConfig)(e))return this.connectByPort(e);if((0,xo.isNewConnectConfig)(e)){const t=await this.environment.retrievePort(e);return this.connectByPort({...e,address:`ws://localhost:${t}`})}}async connectRemote(e){return await Co(this,go,\"f\").connect(new(this.environment.getWsConstructor())(e.address)),this.authorize(e)}async connectByPort(e){const{address:t,uuid:n}=e,i={...e,type:\"file-token\"},r=Co(this,go,\"f\");await r.connect(new(this.environment.getWsConstructor())(e.address));const o=await this.sendAction(\"request-external-authorization\",{uuid:n,type:\"file-token\"},!0);if(\"external-authorization-response\"!==o.action)throw new Ao.UnexpectedActionError(o.action);return await this.environment.writeToken(o.payload.file,o.payload.token),this.authorize(i)}async authorize(e){const t=await this.sendAction(\"request-authorization\",e,!0);if(\"authorization-response\"!==t.action)throw new Ao.UnexpectedActionError(t.action);if(!0!==t.payload.success)throw new Ao.RuntimeError(t.payload)}sendAction(e,t={},n=!1){let i=()=>{};const r=Ao.RuntimeError.getCallSite(1),o=this.environment.getNextMessageId(),s=new Promise(((s,a)=>{i=a;const c={action:e,payload:t,messageId:o},d=Co(this,go,\"f\");return this.addWireListener(o,s,(e=>this.nackHandler(e,a,r)),n),d.send(c).catch(a)}));return Object.assign(s,{cancel:i,messageId:o})}nackHandler(e,t,n){t(\"string\"==typeof e?e:new Ao.RuntimeError(e,n))}ferryAction(e){return new Promise(((t,n)=>{const i=this.environment.getNextMessageId();e.messageId=i;const r=e=>{t(e.payload)};return Co(this,go,\"f\").send(e).then((()=>this.addWireListener(i,r,(e=>this.nackHandler(e,n)),!1))).catch(n)}))}registerMessageHandler(e){this.messageHandlers.push(e)}addWireListener(e,t,n,i){i?this.uncorrelatedListener=t:this.wireListeners.has(e)?n({reason:\"Duplicate handler id\",error:(0,_o.errorToPOJO)(new Ao.DuplicateCorrelationError(String(e)))}):this.wireListeners.set(e,{resolve:t,handleNack:n})}onmessage(e){for(const t of this.messageHandlers)t.call(null,e)}handleMessage(e){const t=e.correlationId||NaN;if(\"correlationId\"in e){if(!this.wireListeners.has(t))return!1;{const{resolve:n,handleNack:i}=this.wireListeners.get(t);\"ack\"!==e.action?i({reason:\"Did not receive ack action\",error:(0,_o.errorToPOJO)(new Ao.NoAckError(e.action))}):\"payload\"in e?e.payload.success?n.call(null,e):i(e.payload):\"string\"==typeof e.reason?i(e):(console.warn(\"Received invalid response from core\",e),i({reason:\"invalid response shape\"})),this.wireListeners.delete(t)}}else this.uncorrelatedListener&&this.uncorrelatedListener.call(null,e),this.uncorrelatedListener=()=>{};return!0}}Io=no.Transport=Oo,go=new WeakMap,mo=new WeakMap;const So=(...e)=>({log:(...t)=>console.debug(`[${(new Date).toISOString()}]`,...(e=>e.map((e=>`[${e}]`)))(e),...t),getLogger:(...t)=>So(...e,...t)}),Ro=So(\"@openfin/core-web/client\");function Fo(e,t){if(!function(e){return\"string\"==typeof e}(e))throw new Error(`Property ${t} has invalid type. Expected string, got ${typeof e}.`)}const jo=\"web-broker-ports-ready\",ko=Ro.getLogger(\"get-web-interop-ports\");function Lo(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)}function To(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}\"function\"==typeof SuppressedError&&SuppressedError;const $o=e=>{var n,i,r;return r=class extends t.EventEmitter{constructor(t){super(),n.set(this,void 0),i.set(this,!1),this.connectSync=()=>{Lo(this,i,\"f\")||(e.addEventListener(\"message\",(e=>{e.data?.topic?.startsWith(\"wire-message\")&&e.data.message&&Lo(this,n,\"f\").call(this,{...JSON.parse(e.data.message),ports:e.ports})})),e.start())},this.connect=async()=>{this.connectSync()},this.send=t=>(e.postMessage({topic:\"wire-message\",message:JSON.stringify(t)}),Promise.resolve()),this.shutdown=async()=>{e.close()},To(this,n,t,\"f\")}getPort(){return e}},n=new WeakMap,i=new WeakMap,r};var Bo={},Go={};Object.defineProperty(Go,\"__esModule\",{value:!0}),Go.BaseEnvironment=void 0;const Wo=vr();Go.BaseEnvironment=class{async getViewWindowIdentity(e,t){const{identity:n}=await e.View.wrapSync(t).getCurrentWindow();return n}async getInteropInfo(e){const t=await e.Application.getCurrentSync().getInfo().catch((()=>null)),n=t?.initialOptions?.interopBrokerConfiguration??{};return{fdc3Version:t?(0,Wo.getDefaultViewFdc3VersionFromAppInfo)(t):void 0,...n,fdc3Info:{providerVersion:await e.System.getVersion(),provider:\"OpenFin\"}}}},Object.defineProperty(Bo,\"__esModule\",{value:!0});var Ho=Bo.BrowserEnvironment=void 0;const No=Go;class Do extends No.BaseEnvironment{constructor(){super(...arguments),this.type=\"other\",this.getRandomId=()=>{const e=new Uint32Array(1);return window.crypto.getRandomValues(e)[0].toString(32)}}getAdapterVersionSync(){return\"\"}observeBounds(e,t){throw new Error(\"Method not implemented.\")}layoutAllowedInContext(e){return!1}initLayoutManager(e,t,n){throw new Error(\"Method not implemented.\")}applyLayoutSnapshot(e,t,n){throw new Error(\"Method not implemented.\")}createLayout(e,t){throw new Error(\"Method not implemented.\")}destroyLayout(e,t){throw new Error(\"Method not implemented.\")}resolveLayout(e,t){throw new Error(\"Method not implemented.\")}initPlatform(...e){throw new Error(\"Method not implemented.\")}writeToken(e,t){return Promise.resolve(\"\")}retrievePort(e){throw new Error(\"Method not implemented.\")}getNextMessageId(){return this.getRandomId()}createChildContent(e){throw new Error(\"Method not implemented.\")}getWebWindow(e){throw new Error(\"Method not implemented.\")}getCurrentEntityIdentity(){throw new Error(\"Method not implemented.\")}getCurrentEntityType(){return\"external connection\"}raiseEvent(e,t){throw new Error(\"Method not implemented.\")}getUrl(){return location.href}getDefaultChannelOptions(){return{create:{},connect:{}}}getRtcPeer(){return new RTCPeerConnection}getWsConstructor(){return WebSocket}whenReady(){return Promise.resolve()}}Ho=Bo.BrowserEnvironment=Do;const Uo=e=>\"platform\"in e&&void 0!==e.platform;var Vo,zo;class Ko extends Ho{constructor(e){super(),this.connectConfig=e,Vo.set(this,void 0),zo.set(this,new W((async()=>Promise.resolve().then((function(){return require(\"./main-b14f67c9.js\")}))))),Uo(e)&&this.validatePlatformOptions(e)}getAdapterVersionSync(){return\"0.39.21\"}validatePlatformOptions({platform:e}){if(!(\"layoutSnapshot\"in e))throw new Error(\"Platform options are missing layoutSnapshot. Please provide a layoutSnapshot in the platform options.\");if(\"windows\"in e||\"windows\"in e.layoutSnapshot)throw new Error(\"It appears you tried to call connect() with a snapshot object from an OpenFin desktop environment. Note that connect() expects to be called with a platform property with this structure: { platform: { layoutSnapshot } }. To get a layoutSnapshot of the expected structure, use fin.Platform.Layout.getCurrentLayoutManagerSync().getLayoutSnapshot() in v34+ in your desktop environment.\");const{layouts:t}=e.layoutSnapshot;Object.entries(t).map((([e,t])=>{if(\"object\"!=typeof t||null===t)throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must be an object.`);if(!(\"content\"in t))throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must contain a 'content' property.`)}))}async getInteropInfo(e){return{...{contextGroups:void 0,logging:{beforeAction:{enabled:!1},afterAction:{enabled:!1}}},fdc3Version:void 0,fdc3Info:{providerVersion:\"0.39.21\",provider:\"OpenFin Web\"}}}layoutAllowedInContext(e){return!0}async initLayoutManager(e,t,n){if(Lo(this,Vo,\"f\"))throw new Error(\"Layout already initialized.\");if(!Uo(this.connectConfig))throw new Error(\"Platform options are missing from connection config.\");const{WebLayoutEntryPoint:i}=await Lo(this,zo,\"f\").getValue();return To(this,Vo,new i(this.connectConfig),\"f\"),await Lo(this,Vo,\"f\").initLayoutManager(e,t,n)}async applyLayoutSnapshot(e,t,n){Lo(this,Vo,\"f\")?.applyLayoutSnapshot(e,t,n)}async createLayout(e,t){return Lo(this,Vo,\"f\")?.createLayout(e,t)}async destroyLayout(e,t){return Lo(this,Vo,\"f\")?.destroyLayout(e,t)}async getViewWindowIdentity(e,t){return Promise.resolve({uuid:t.uuid,name:t.uuid})}}Vo=new WeakMap,zo=new WeakMap;const qo=()=>{const e=((e,t)=>{const n=new RegExp(`^${t}<(?.*)>$`).exec(e)?.groups?.meta;if(n)try{return JSON.parse(atob(n))}catch(e){throw new Error(`Failed to decode JSON from ${n}.`)}})(window.name,\"of-frame\");if(e)try{const{name:t,uuid:n,brokerUrl:i,providerId:r,contextGroup:o}=e;return Fo(i,\"brokerUrl\"),Fo(n,\"uuid\"),Fo(t,\"name\"),{identity:{name:t,uuid:n},brokerUrl:i,interopConfig:{providerId:r,currentContextGroup:o}}}catch(e){throw new Error(`Unexpected error occurred when inferring platform information: ${e.stack}`)}},Jo=()=>{const e=r.v4();return{uuid:e,name:e}},Yo=async e=>{if(\"enabled\"===e.connectionInheritance){const t=await(async e=>{const t=qo();if(t){const{validateOptions:n=(()=>!0)}=e,{identity:i,...r}=t;if(!await n(r))throw new Error(\"Parent options were rejected by validateOptions.\");return t}})(e);if(t)return t}if(!e.options){const t=\"enabled\"===e.connectionInheritance?\"Broker URL was not specified nor provided by a platform container.\":\"Connection inheritance is disabled but no options were provided.\";throw new Error(t)}return{...e.options,identity:Jo()}};exports.__classPrivateFieldGet=Lo,exports.__classPrivateFieldSet=To,exports.apiExposer=Gn,exports.commonjsGlobal=s,exports.connect=async t=>{try{Ro.log(\"Establishing connection\",t);const{brokerUrl:n,identity:i,timeout:r,interopConfig:s}=await Yo(t),{workerPort:a,iframeBrokerPort:c}=await(async(e,t,n)=>{const{origin:i}=new URL(e),r=document.createElement(\"IFRAME\");let s;r.style.display=\"none\";try{return await new Promise(((a,c)=>{const d=e=>{if(e.source===r.contentWindow&&e.data?.topic===`ack-${jo}`){if(e.origin!==i)c(new Error(`Broker redirected to unexpected origin ${e.origin}, expected ${i}.`));else if(e.data.success){const[t,n]=e.ports;a({iframeBrokerPort:t,workerPort:n})}else c(new m(e.data));window.removeEventListener(\"message\",d),clearTimeout(s)}};window.addEventListener(\"message\",d),ko.log(`Connecting to broker ${e}`),r.setAttribute(\"src\",e),r.setAttribute(\"name\",o(t,\"of-broker\")),document.body.appendChild(r),ko.log(\"Iframe loaded, awaiting init message from iframe\"),n&&(s=setTimeout((()=>{window.removeEventListener(\"message\",d),document.body.removeChild(r),c(new Error(\"Worker did not initialize in time\"))}),n))}))}catch(e){throw new Error(`Failed to initialise Fin Web Client. ${e.message}`,{cause:e})}})(n,i,r);Ro.log(\"Successfully established connection to shared worker\");const d={entityType:\"external connection\",...i};a.start(),c.start();const h=((t,n,i)=>{const r=$o(n),o=new Ko(t),s=new Io(r,o,i);return s.connectSync(),window.Buffer=e.Buffer,new Wr(s)})(t,a,d);return s?.providerId&&(h.me.interop=h.Interop.connectSync(s.providerId),s?.currentContextGroup&&h.me.interop.joinContextGroup(s.currentContextGroup).catch((e=>{console.warn(`Error joining specified context group: ${s?.currentContextGroup}, continuing`,e)}))),{...h,me:{...h.me,identity:{uuid:h.me.uuid,name:h.me.name}}}}catch(e){throw new Error(`An error occured during web-interop connection: ${e.message}`)}},exports.decorators=Nn,exports.encodeOptions=o,exports.layout_constants=ai,exports.lazy=G;\n","\"use strict\";var t=require(\"./main-8cad4070.js\"),e=require(\"uuid\");require(\"buffer/\"),require(\"events\"),require(\"lodash/cloneDeep\"),require(\"lodash/isEqual\");var i={},n={};Object.defineProperty(n,\"__esModule\",{value:!0}),n.mapValuesAsync=n.mapEntriesAsync=void 0;const o=(t,[e,i])=>({...t,[e]:i});async function s(t,e){return(await Promise.all(e.map((async([e,i])=>[e,await t(i,e)])))).reduce(o,{})}n.mapEntriesAsync=s,n.mapValuesAsync=async function(t,e){let i;return i=e instanceof Map?[...e.entries()]:Object.entries(e),s(t,i)};var r,a,l,h,d=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldSet||function(t,e,i,n,o){if(\"m\"===n)throw new TypeError(\"Private method is not writable\");if(\"a\"===n&&!o)throw new TypeError(\"Private accessor was defined without a setter\");if(\"function\"==typeof e?t!==e||!o:!e.has(t))throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");return\"a\"===n?o.call(t,i):o?o.value=i:e.set(t,i),i},c=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldGet||function(t,e,i,n){if(\"a\"===i&&!n)throw new TypeError(\"Private accessor was defined without a getter\");if(\"function\"==typeof e?t!==e||!n:!e.has(t))throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");return\"m\"===i?n:\"a\"===i?n.call(t):n?n.value:e.get(t)};Object.defineProperty(i,\"__esModule\",{value:!0});var m=i.DefaultLayoutManager=void 0;const u=n;class p{constructor(t){a.set(this,void 0),l.set(this,new Map),d(this,a,t,\"f\")}size(){return c(this,l,\"f\").size}async applyLayoutSnapshot({layouts:t}){if(Object.keys(t).length>1)throw new Error(\"[LayoutManager] Tried to call applyLayoutSnapshot with more than 1 layout. When implementing multiple layouts via overridden LayoutManager class, you must override and fully implement the applyLayoutSnapshot method without calling super.applyLayoutSnapshot().\");const[[e,i]]=Object.entries(t);await p.createLayout(this,{layoutName:e,layout:i})}async showLayout({layoutName:t}){}async getLayoutSnapshot(){return{layouts:await(0,u.mapValuesAsync)((t=>t.getFrameSnapshot()),c(this,l,\"f\"))}}async removeLayout({layoutName:t}){}getLayoutIdentityForView(t){const e=[...c(this,l,\"f\").values()].find((e=>e.getCurrentViews().some((e=>e.name===t.name&&e.uuid===t.uuid))));return e?.identity??void 0}isLayoutVisible({layoutName:t}){return c(p,r,\"m\",h).call(p,this,t).isVisible()}resolveLayoutIdentity(t){if(t&&\"layoutName\"in t)return t;const e=[...c(this,l,\"f\").values()];if(1===e.length)return e[0].identity;const i=e.find((t=>t.isVisible()));return i?.identity??void 0}static async resolveLayout(t,e){const i=t.resolveLayoutIdentity(e);if(void 0===i||!(\"layoutName\"in i))throw new Error(\"[layout-manager] resolveLayout: Could not resolve the layout identity. Make sure you include 'layoutName' in the identity object.\");return c(p,r,\"m\",h).call(p,t,i.layoutName)}static async handleSharedView(t,e,i){await(0,u.mapValuesAsync)((async t=>{if(t.identity.layoutName!==e.layoutName){const e=t.getCurrentViews().find((t=>t.name===i.name));e&&await t.onViewDetached({viewIdentity:e,target:null}).catch(console.error)}}),c(t,l,\"f\"))}static async handleLastViewRemoved(t,e){await t.removeLayout(e),await c(t,a,\"f\").handleLastViewRemoved(t)}static async destroyLayout(t,{layoutName:e}){await c(p,r,\"m\",h).call(p,t,e).destroy(),c(t,l,\"f\").delete(e)}static async createLayout(t,e){const{layoutName:i}=e;if(c(t,l,\"f\").has(i))throw new Error(`Layout name ${i} already exists`);await c(t,a,\"f\").createLayout(e,t)}static registerLayout(t,e,i){c(t,l,\"f\").set(e,i)}static getAllLayouts(t){return[...c(t,l,\"f\").values()]}static setInitialSnapshot(t,e){c(t,a,\"f\").setInitialSnapshot(e)}static createClosedConstructor(...t){return class extends p{constructor(){super(...t)}}}}m=i.DefaultLayoutManager=p,r=p,a=new WeakMap,l=new WeakMap,h=function(t,e){const i=c(t,l,\"f\").get(e);if(!i)throw new Error(`[layout-manager] getLayoutByName: Could not locate layout with name '${e}'`);return i};var g={},f={},v={};Object.defineProperty(v,\"__esModule\",{value:!0}),v.ReversibleMap=void 0;v.ReversibleMap=class{constructor(){this.valueToKey=new Map,this.keyToValue=new Map,this.setUnique=(t,e)=>{if(this.hasKey(t)||this.hasValue(e))throw new Error(\"Key or value already in the map.\");this.keyToValue.set(t,e),this.valueToKey.set(e,t)},this.getKey=t=>{const e=this.valueToKey.get(t);if(!e)throw new Error(\"Value not found in the map.\");return e},this.deleteKey=t=>{const e=this.getValue(t);return this.keyToValue.delete(t),this.valueToKey.delete(e),e},this.deleteValue=t=>{const e=this.getKey(t);return this.keyToValue.delete(e),this.valueToKey.delete(t),e},this.hasKey=t=>this.keyToValue.has(t),this.hasValue=t=>this.valueToKey.has(t)}getValue(t){const e=this.keyToValue.get(t);if(!e)throw new Error(\"Key not found in the map.\");return e}},Object.defineProperty(f,\"__esModule\",{value:!0});var _=f.LayoutContentCache=void 0;const y=t.lazy,C=v;class w{constructor(){this.contentItemCache=new C.ReversibleMap,this.contentItemCacheId=0,this.createCacheKey=()=>{const t=`entity-${this.contentItemCacheId.toString()}`;return this.contentItemCacheId+=1,t},this.hasKey=t=>this.contentItemCache.hasKey(t),this.getItemOrUndefined=t=>{try{return this.getContentItemOrThrow(t)}catch(t){return}},this.getContentItemOrThrow=(t,e)=>{if(!this.contentItemCache.hasKey(t))throw new Error(\"Layout component has been destroyed or detached from the current layout.\");const i=this.contentItemCache.getValue(t);if(e&&!e.includes(i.type))throw new Error(`Layout item is not the expected type. Expected ${e.join(\", \")}, got ${i.type}.`);return i},this.getOrCreateEntityId=t=>{if(this.contentItemCache.hasValue(t))return this.contentItemCache.getKey(t);t.onDestroyed((()=>{this.contentItemCache.deleteValue(t)}));const e=this.createCacheKey();return this.contentItemCache.setUnique(e,t),e}}static getSingleInstance(){return w.singleton.getValue()}}_=f.LayoutContentCache=w,w.singleton=new y.Lazy((()=>new w));var I={},b={};!function(t){Object.defineProperty(t,\"__esModule\",{value:!0}),t.getAdjacentStacks=t.doShareEdge=t.getAdjacentItem=void 0;t.getAdjacentItem=(e,i)=>{const{parent:n}=e;if(e.isRoot()||!n)return;const o=[\"top\",\"bottom\"].includes(i)?\"column\":\"row\",s=[\"top\",\"left\"].includes(i)?-1:1;if(n.type===o){const t=n.contentItems.indexOf(e)+s;if(t>=0&&t{const n=t.getBounds(),o=e.getBounds();if(!n||!o)return!1;if([\"top\",\"bottom\"].includes(i)){return!(n.righto.right)}return!(n.bottomo.bottom)};t.getAdjacentStacks=(e,i)=>{const n=[\"top\",\"bottom\"].includes(i)?\"row\":\"column\",o=s=>\"stack\"===s.type?(0,t.doShareEdge)(e,s,i)?[s]:[]:\"root\"===s.type||\"ground\"===s.type?[]:s.type===n?s.contentItems.map((t=>o(t))).flat():s.type!==n?[\"top\",\"right\"].includes(i)?o(s.contentItems[s.contentItems.length-1]):o(s.contentItems[0]):[],s=(0,t.getAdjacentItem)(e,i);return s?o(s):[]}}(b);var S=t.commonjsGlobal&&t.commonjsGlobal.__decorate||function(t,e,i,n){var o,s=arguments.length,r=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if(\"object\"==typeof Reflect&&\"function\"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(s<3?o(r):s>3?o(e,i,r):o(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};Object.defineProperty(I,\"__esModule\",{value:!0}),I.LayoutEntitiesController=void 0;const E=t.decorators,x=b,L=i;class z{constructor(t,e,i){this.wire=t,this.layoutManager=e,this.layoutContentCache=i,this.analytics=t=>{this.wire.sendAction(`layout-controller-${t}`).catch((()=>{}))},this.getLayoutIdentityForViewOrThrow=async t=>{const e=this.layoutManager.getLayoutIdentityForView(t);if(!e)throw new Error(`View identity ${t.name} is not attached to any layouts.`);return e},this.getRoot=async t=>{this.analytics(\"get-root\");const e=(await this.getLayout(t)).getRoot();return{type:e.type,entityId:this.layoutContentCache.getOrCreateEntityId(e)}},this.getStackByView=async t=>{this.analytics(\"get-stack-by-view\");const e=await this.getLayoutIdentityForViewOrThrow(t),i=(await this.getLayout(e)).getStackByView(t);if(\"stack\"===i?.type)return{entityId:this.layoutContentCache.getOrCreateEntityId(i),type:\"stack\"}},this.getStackViews=t=>{this.analytics(\"get-stack-views\");return this.layoutContentCache.getContentItemOrThrow(t,[\"stack\"]).contentItems.map((t=>({name:t.viewName,uuid:this.wire.me.uuid})))},this.isRoot=t=>{this.analytics(\"is-root\");return this.layoutContentCache.getContentItemOrThrow(t).isRoot()},this.exists=t=>(this.analytics(\"exists\"),this.layoutContentCache.hasKey(t)),this.addViewToStack=async(t,e,{index:i}={index:0})=>{this.analytics(\"add-view-to-stack\");const n=this.layoutContentCache.getContentItemOrThrow(t);if(i&&i>n.contentItems.length+1)throw new Error(`Index '${i}' out of range, please exclude the index or specify a number between 0 and ${n.contentItems.length}`);const o={id:t,index:i},{identity:s}=await n.layout.platformCreateView(e,{location:o});return s},this.findViewInStack=(t,e)=>t.contentItems.find((t=>t.viewName===e.name)),this.removeViewFromStack=async(t,e)=>{this.analytics(\"remove-view-from-stack\");const i=this.layoutContentCache.getContentItemOrThrow(t,[\"stack\"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to remove a view ('${e.name}') which does not belong to the stack.`);await n.layout.platformCloseView(e)},this.createAdjacentStack=async(t,e,{position:i=\"right\"}={})=>{if(this.analytics(\"create-adjacent-stack\"),!Array.isArray(e)||0===e.length)throw new Error('The parameter \"views\" must be an array with at least 1 element.');if(![\"top\",\"bottom\",\"left\",\"right\"].includes(i))throw new Error(`Invalid position '${i}' specified.`);const n=this.layoutContentCache.getContentItemOrThrow(t).createAdjacentStack({position:i}),o=this.layoutContentCache.getOrCreateEntityId(n);return await Promise.all(e.reverse().map((t=>this.addViewToStack(o,t)))),o},this.getAdjacentStacks=async({targetId:t,edge:e})=>{this.analytics(\"get-adjacent-stacks\");const i=this.layoutContentCache.getContentItemOrThrow(t);return(0,x.getAdjacentStacks)(i,e).map((t=>({entityId:this.layoutContentCache.getOrCreateEntityId(t)})))},this.setStackActiveView=async(t,e)=>{this.analytics(\"set-stack-active-view\");const i=this.layoutContentCache.getContentItemOrThrow(t,[\"stack\"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to set a view ('${e.name}') as active when it does not belong to the stack.`);i.setActiveContentItem(n,!0)}}async getLayout(t){const e=await L.DefaultLayoutManager.resolveLayout(this.layoutManager,t);if(!e)throw new Error(`Could not resolve target layout identity ${JSON.stringify(t)}`);return e}getContent(t){this.analytics(\"get-content\");return this.layoutContentCache.getContentItemOrThrow(t,[\"column\",\"row\"]).contentItems.map((t=>({type:t.type,entityId:this.layoutContentCache.getOrCreateEntityId(t)})))}getParent(t){this.analytics(\"get-parent\");const e=this.layoutContentCache.getContentItemOrThrow(t);if(!e.isRoot())return e.parent?.contentItems.includes(e)?{type:e.parent.type,entityId:this.layoutContentCache.getOrCreateEntityId(e.parent)}:void 0}}S([(0,E.expose)()],z.prototype,\"getLayoutIdentityForViewOrThrow\",void 0),S([(0,E.expose)()],z.prototype,\"getRoot\",void 0),S([(0,E.expose)()],z.prototype,\"getStackByView\",void 0),S([(0,E.expose)()],z.prototype,\"getStackViews\",void 0),S([(0,E.expose)()],z.prototype,\"getContent\",null),S([(0,E.expose)()],z.prototype,\"getParent\",null),S([(0,E.expose)()],z.prototype,\"isRoot\",void 0),S([(0,E.expose)()],z.prototype,\"exists\",void 0),S([(0,E.expose)()],z.prototype,\"addViewToStack\",void 0),S([(0,E.expose)()],z.prototype,\"removeViewFromStack\",void 0),S([(0,E.expose)()],z.prototype,\"createAdjacentStack\",void 0),S([(0,E.expose)()],z.prototype,\"getAdjacentStacks\",void 0),S([(0,E.expose)()],z.prototype,\"setStackActiveView\",void 0),I.LayoutEntitiesController=z,Object.defineProperty(g,\"__esModule\",{value:!0});var M=g.initLayoutEndpoints=void 0;const P=t.apiExposer,T=t.layout_constants,A=f,k=I,D=i;M=g.initLayoutEndpoints=async function(t,e){const i=t.getFin(),n=await i.Platform.getCurrentSync().getClient(),o=new P.ChannelsExposer(n);await new P.ApiExposer(o).exposeInstance(new k.LayoutEntitiesController(t,e,A.LayoutContentCache.getSingleInstance()),{id:T.LAYOUT_CONTROLLER_ID}),await async function(t,e){const i=t=>async i=>{const n=await D.DefaultLayoutManager.resolveLayout(e,i.target);if(!n)throw new Error(`Could not resolve the layout target from payload ${JSON.stringify(i)}`);return t(n,i)},n=(e,n)=>{t.register(e,i(n))},o=(t,e)=>{n(t,e)};n(\"replace-view\",((t,e)=>t.replaceView(e))),n(\"replace-layout\",((t,{layout:e})=>t.replaceLayout(e))),n(\"add-view\",((t,e)=>t.insertView(e))),o(\"layout-add-view\",((t,{viewOptions:e,location:i,targetView:n})=>t.platformCreateView(e,{location:i,targetView:n}))),n(\"close-view\",((t,e)=>t.cleanupView(e.viewIdentity))),o(\"layout-close-view\",((t,e)=>t.platformCloseView(e.viewIdentity))),n(\"apply-preset-layout\",((t,e)=>t.applyPreset(e))),n(\"get-layout-views\",(t=>t.getCurrentViews())),n(\"get-frame-snapshot\",(t=>t.getFrameSnapshot())),n(\"is-visible\",(t=>t.isVisible())),n(\"destroy\",(t=>t.destroy())),t.register(\"get-layout-snapshot\",(()=>e.getLayoutSnapshot()))}(n,e)};var R={};Object.defineProperty(R,\"__esModule\",{value:!0});var U=R.BaseLayout=void 0;U=R.BaseLayout=class{};var O={};Object.defineProperty(O,\"__esModule\",{value:!0});var V=O.DOMEmitter=void 0;V=O.DOMEmitter=class{constructor(t){this.container=t}dispatchLocalEvent(t,e){const i={...e,type:t,tabSelector:`tab-${e.name}`,containerSelector:`container-${e.name}`,topic:\"openfin-DOM-event\"};this.container.dispatchEvent(new CustomEvent(t,{detail:i}))}};var B={};Object.defineProperty(B,\"__esModule\",{value:!0});var H=B.mapLayoutContentItemsImmutableSync=B.mapLayoutContentItemsImmutable=W=B.isVisible=void 0;var W=B.isVisible=t=>(0!==t.offsetWidth||0!==t.offsetHeight)&&\"hidden\"!==window.getComputedStyle(t).visibility&&t.offsetTop>=0&&t.offsetLeft>=0&&t.offsetTop<=window.innerHeight&&t.offsetLeft<=window.innerWidth;const F=t=>\"type\"in t&&\"component\"===t.type;B.mapLayoutContentItemsImmutable=async function t(e,i){return F(i)?e(i):{...i,content:await Promise.all(i.content?.map((i=>t(e,i))))}},H=B.mapLayoutContentItemsImmutableSync=function t(e,i){return F(i)?e(i):{...i,content:i.content?.map((i=>t(e,i)))}};class N extends Error{constructor(t,e){super(e),this.type=t}}class G extends N{constructor(t,e){super(\"Configuration\",t),this.node=e}}class j extends N{constructor(t){super(\"PopoutBlocked\",t)}}class $ extends N{constructor(t){super(\"API\",t)}}class Z extends N{constructor(t){super(\"Bind\",t)}}class q extends Error{constructor(t,e,i){super(`${t}: ${e}${void 0===i?\"\":\": \"+i}`)}}class X extends q{constructor(t,e){super(\"Assert\",t,e)}}class Y extends q{constructor(t,e,i){super(\"UnreachableCase\",t,`${e}${void 0===i?\"\":\": \"+i}`)}}class K extends q{constructor(t,e){super(\"UnexpectedNull\",t,e)}}class J extends q{constructor(t,e){super(\"UnexpectedUndefined\",t,e)}}var Q;!function(t){let e=!1;const i={PopoutCannotBeCreatedWithGroundItemConfig:{id:0,default:\"Popout cannot be created with ground ItemConfig\"},PleaseRegisterAConstructorFunction:{id:1,default:\"Please register a constructor function\"},ComponentTypeNotRegisteredAndBindComponentEventHandlerNotAssigned:{id:2,default:\"Component type not registered and BindComponentEvent handler not assigned\"},ComponentIsAlreadyRegistered:{id:3,default:\"Component is already registered\"},ComponentIsNotVirtuable:{id:4,default:\"Component is not virtuable. Requires rootHtmlElement field/getter\"},VirtualComponentDoesNotHaveRootHtmlElement:{id:5,default:'Virtual component does not have getter \"rootHtmlElement\"'},ItemConfigIsNotTypeComponent:{id:6,default:\"ItemConfig is not of type component\"},InvalidNumberPartInSizeString:{id:7,default:\"Invalid number part in size string\"},UnknownUnitInSizeString:{id:8,default:\"Unknown unit in size string\"},UnsupportedUnitInSizeString:{id:9,default:\"Unsupported unit in size string\"}};t.idCount=Object.keys(i).length;const n=Object.values(i);t.checkInitialise=function(){if(!e)for(let e=0;e=\"0\"&&t<=\"9\"}function Tt(t,e){const i=zt(e);t.style.width=i}function At(t,e){const i=zt(e);t.style.height=i}function kt(t){return{width:t.offsetWidth,height:t.offsetHeight}}function Dt(t,e){t.style.display=e?\"\":\"none\"}function Rt(t,e){if(void 0!==e)for(const i in e)if(e.hasOwnProperty(i)){const n=e[i],o=t[i];t[i]=Ut(o,n)}return t}function Ut(t,e){if(\"object\"!=typeof e)return e;if(Array.isArray(e)){const t=e.length,i=new Array(t);for(let n=0;n36)throw new Error(\"Too many keys in config minifier map\")},t.translateObject=n}(dt||(dt={})),function(t){t.defaults={type:at.ground,content:[],size:1,sizeUnit:ht.Fractional,minSize:void 0,minSizeUnit:ht.Pixel,id:\"\",isClosable:!0},t.createCopy=function(t,e){switch(t.type){case at.ground:case at.row:case at.column:return gt.createCopy(t,e);case at.stack:return ut.createCopy(t,e);case at.component:return pt.createCopy(t);default:throw new Y(\"CICC91354\",t.type,\"Invalid Config Item type specified\")}},t.createDefault=function(t){switch(t){case at.ground:throw new X(\"CICCDR91562\");case at.row:case at.column:return gt.createDefault(t);case at.stack:return ut.createDefault();case at.component:return pt.createDefault();default:throw new Y(\"CICCDD91563\",t,\"Invalid Config Item type specified\")}},t.isComponentItem=function(t){return t.type===at.component},t.isStackItem=function(t){return t.type===at.stack},t.isGroundItem=function(t){return t.type===at.ground}}(ct||(ct={})),function(t){t.defaultMaximised=!1,function(t){t.createCopy=function(t,e){return void 0===t?void 0:{show:null!=e?e:t.show,popout:t.popout,close:t.close,maximise:t.maximise,minimise:t.minimise,tabDropdown:t.tabDropdown}}}(t.Header||(t.Header={}))}(mt||(mt={})),function(t){function e(t){const e=t.length,i=new Array(e);for(let n=0;n\"__glMaximised\"===t));t>0&&(o=!0,n=n.splice(t,1)),e=n.length>0?n[0]:ct.defaults.id}else e=n;return i=void 0!==t.maximised?t.maximised:o,{id:e,maximised:i}}}(wt||(wt={})),function(t){function e(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0;return{resolved:!0,root:Et.resolve(i),openPopouts:t.resolveOpenPopouts(e.openPopouts),dimensions:t.Dimensions.resolve(e.dimensions),settings:t.Settings.resolve(e.settings),header:t.Header.resolve(e.header,e.settings,e.labels)}}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:Lt.fromResolvedArray(e.openPopouts),settings:_t.Settings.createCopy(e.settings),dimensions:t.Dimensions.fromResolved(e.dimensions),header:_t.Header.createCopy(e.header)}},t.isResolved=function(t){const e=t;return void 0!==e.resolved&&!0===e.resolved},t.resolveOpenPopouts=function(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0,{root:Et.resolve(o),openPopouts:xt.resolveOpenPopouts(e.openPopouts),dimensions:xt.Dimensions.resolve(e.dimensions),settings:xt.Settings.resolve(e.settings),header:xt.Header.resolve(e.header,e.settings,e.labels),parentId:null!==(i=e.parentId)&&void 0!==i?i:null,indexInParent:null!==(n=e.indexInParent)&&void 0!==n?n:null,window:t.Window.resolve(e.window,e.dimensions),resolved:!0}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:i(e.openPopouts),dimensions:xt.Dimensions.fromResolved(e.dimensions),settings:_t.Settings.createCopy(e.settings),header:_t.Header.createCopy(e.header),parentId:e.parentId,indexInParent:e.indexInParent,window:t.Window.fromResolved(e.window)}},t.fromResolvedArray=i}(Lt||(Lt={}));class Wt{constructor(){this._allEventSubscriptions=[],this._subscriptionsMap=new Map,this.unbind=this.removeEventListener,this.trigger=this.emit}tryBubbleEvent(t,e){}emit(t,...e){let i=this._subscriptionsMap.get(t);if(void 0!==i){i=i.slice();for(let t=0;t0){const n=e.slice();n.unshift(t);const o=this._allEventSubscriptions.slice();for(let t=0;t0?n.contentItems[0]:n,e=0);const o=this._layoutManager.createAndInitContentItem(i,t);t.addChild(o,e),this._layoutManager.layoutConfig.settings.popInOnClose?this._onClose():this.close()}createWindow(){const t=this.createUrl(),e=Math.floor(1e6*Math.random()).toString(36),i=this.serializeWindowFeatures({width:this._initialWindowSize.width,height:this._initialWindowSize.height,innerWidth:this._initialWindowSize.width,innerHeight:this._initialWindowSize.height,menubar:\"no\",toolbar:\"no\",location:\"no\",personalbar:\"no\",resizable:\"yes\",scrollbars:\"no\",status:\"no\"});if(this._popoutWindow=globalThis.open(t,e,i),this._popoutWindow)this._popoutWindow.addEventListener(\"load\",(()=>this.positionWindow()),{passive:!0}),this._popoutWindow.addEventListener(\"beforeunload\",(()=>{this._layoutManager.layoutConfig.settings.popInOnClose?this.popIn():this._onClose()}),{passive:!0}),this._checkReadyInterval=setInterval((()=>this.checkReady()),10);else if(!0===this._layoutManager.layoutConfig.settings.blockedPopoutsThrowError){throw new j(\"Popout blocked\")}}checkReady(){if(null===this._popoutWindow)throw new K(\"BPCR01844\");this._popoutWindow.__glInstance&&this._popoutWindow.__glInstance.isInitialised&&(this.onInitialised(),void 0!==this._checkReadyInterval&&(clearInterval(this._checkReadyInterval),this._checkReadyInterval=void 0))}serializeWindowFeatures(t){const e=[];for(const i in t)e.push(i+\"=\"+t[i].toString());return e.join(\",\")}createUrl(){const t=\"gl-window-config-\"+Ot(),e=_t.minifyConfig(this._config);try{localStorage.setItem(t,JSON.stringify(e))}catch(t){throw new Error(\"Error while writing to localStorage \"+function(t){return t instanceof Error?t.message:\"string\"==typeof t?t:\"Unknown Error\"}(t))}const i=new URL(location.href);return i.searchParams.set(\"gl-window\",t),i.toString()}positionWindow(){if(null===this._popoutWindow)throw new Error(\"BrowserPopout.positionWindow: null popoutWindow\");this._popoutWindow.moveTo(this._initialWindowSize.left,this._initialWindowSize.top),this._popoutWindow.focus()}onInitialised(){this._isInitialised=!0,this.getGlInstance().on(\"popIn\",(()=>this.popIn())),this.emit(\"initialised\")}_onClose(){setTimeout((()=>this.emit(\"closed\")),50)}}class Gt extends Wt{constructor(t,e,i,n){super(),this.layoutManager=t,this._parent=i,this._element=n,this._popInParentIds=[],this._type=e.type,this._id=e.id,this._isInitialised=!1,this.isGround=!1,this.isRow=!1,this.isColumn=!1,this.isStack=!1,this.isComponent=!1,this.size=e.size,this.sizeUnit=e.sizeUnit,this.minSize=e.minSize,this.minSizeUnit=e.minSizeUnit,this._isClosable=e.isClosable,this._pendingEventPropagations={},this._throttledEvents=[\"stateChanged\"],this._contentItems=this.createContentItems(e.content)}get type(){return this._type}get id(){return this._id}set id(t){this._id=t}get popInParentIds(){return this._popInParentIds}get parent(){return this._parent}get contentItems(){return this._contentItems}get isClosable(){return this._isClosable}get element(){return this._element}get isInitialised(){return this._isInitialised}static isStack(t){return t.isStack}static isComponentItem(t){return t.isComponent}static isComponentParentableItem(t){return t.isStack||t.isGround}removeChild(t,e=!1){const i=this._contentItems.indexOf(t);if(-1===i)throw new Error(\"Can't remove child item. Unknown content item\");if(e||this._contentItems[i].destroy(),this._contentItems.splice(i,1),this._contentItems.length>0)this.updateSize(!1);else if(!this.isGround&&!0===this._isClosable){if(null===this._parent)throw new K(\"CIUC00874\");this._parent.removeChild(this)}}addChild(t,e,i){return null!=e||(e=this._contentItems.length),this._contentItems.splice(e,0,t),t.setParent(this),!0===this._isInitialised&&!1===t._isInitialised&&t.init(),e}replaceChild(t,e,i=!1){const n=this._contentItems.indexOf(t),o=t._element.parentNode;if(-1===n)throw new X(\"CIRCI23232\",\"Can't replace child. oldChild is not child of this\");if(null===o)throw new K(\"CIRCP23232\");if(o.replaceChild(e._element,t._element),!0===i&&(t._parent=null,t.destroy()),this._contentItems[n]=e,e.setParent(this),e.size=t.size,e.sizeUnit=t.sizeUnit,e.minSize=t.minSize,e.minSizeUnit=t.minSizeUnit,null===e._parent)throw new K(\"CIRCNC45699\");!0===e._parent._isInitialised&&!1===e._isInitialised&&e.init(),this.updateSize(!1)}remove(){if(null===this._parent)throw new K(\"CIR11110\");this._parent.removeChild(this)}popout(){const t=Ot(),e=this.layoutManager.createPopoutFromContentItem(this,void 0,t,void 0);return this.emitBaseBubblingEvent(\"stateChanged\"),e}calculateConfigContent(){const t=this._contentItems,e=t.length,i=new Array(e);for(let n=0;nthis.propagateEventToLayoutManager(t,e))))}propagateEventToLayoutManager(t,e){this._pendingEventPropagations[t]=!1,this.layoutManager.emitUnknown(t,e)}}class jt extends Gt{constructor(t,e,i){super(t,e,i,document.createElement(\"div\")),this._parentItem=i,this._focused=!1,this.isComponent=!0,this._reorderEnabled=e.reorderEnabled,this.applyUpdatableConfig(e),this._initialWantMaximise=e.maximised;const n=document.createElement(\"div\");n.classList.add(\"lm_content\"),this.element.appendChild(n),this._container=new Ft(e,this,t,n,(t=>this.handleUpdateItemConfigEvent(t)),(()=>this.show()),(()=>this.hide()),(t=>this.focus(t)),(t=>this.blur(t)))}get componentName(){return this._container.componentType}get componentType(){return this._container.componentType}get reorderEnabled(){return this._reorderEnabled}get initialWantMaximise(){return this._initialWantMaximise}get component(){return this._container.component}get container(){return this._container}get parentItem(){return this._parentItem}get headerConfig(){return this._headerConfig}get title(){return this._title}get tab(){return this._tab}get focused(){return this._focused}destroy(){this._container.destroy(),super.destroy()}applyUpdatableConfig(t){this.setTitle(t.title),this._headerConfig=t.header}toConfig(){const t=this._container.stateRequestEvent,e=void 0===t?this._container.state:t();return{type:at.component,content:[],size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,maximised:!1,isClosable:this.isClosable,reorderEnabled:this._reorderEnabled,title:this._title,header:mt.Header.createCopy(this._headerConfig),componentType:pt.copyComponentType(this.componentType),componentState:e}}close(){if(null===this.parent)throw new K(\"CIC68883\");this.parent.removeChild(this,!1)}enterDragMode(t,e){Tt(this.element,t),At(this.element,e),this._container.enterDragMode(t,e)}exitDragMode(){this._container.exitDragMode()}enterStackMaximised(){this._container.enterStackMaximised()}exitStackMaximised(){this._container.exitStackMaximised()}drag(){this._container.drag()}updateSize(t){this.updateNodeSize(t)}init(){this.updateNodeSize(!1),super.init(),this._container.emit(\"open\"),this.initContentItems()}setTitle(t){this._title=t,this.emit(\"titleChanged\",t),this.emit(\"stateChanged\")}setTab(t){this._tab=t,this.emit(\"tab\",t),this._container.setTab(t)}hide(){super.hide(),this._container.setVisibility(!1)}show(){super.show(),this._container.setVisibility(!0)}focus(t=!1){this.parentItem.setActiveComponentItem(this,!0,t)}setFocused(t){this._focused=!0,this.tab.setFocused(),t||this.emitBaseBubblingEvent(\"focus\")}blur(t=!1){this._focused&&this.layoutManager.setFocusedComponentItem(void 0,t)}setBlurred(t){this._focused=!1,this.tab.setBlurred(),t||this.emitBaseBubblingEvent(\"blur\")}setParent(t){this._parentItem=t,super.setParent(t)}handleUpdateItemConfigEvent(t){this.applyUpdatableConfig(t)}updateNodeSize(t){if(\"none\"!==this.element.style.display){const{width:e,height:i}=kt(this.element);this._container.setSizeToNodeSize(e,i,t)}}}class $t extends Gt{constructor(){super(...arguments),this._focused=!1}get focused(){return this._focused}setFocusedValue(t){this._focused=t}}class Zt extends Wt{constructor(t,e){super(),this._eElement=t,this._pointerTracking=!1,this._pointerDownEventListener=t=>this.onPointerDown(t),this._pointerMoveEventListener=t=>this.onPointerMove(t),this._pointerUpEventListener=t=>this.onPointerUp(t),this._timeout=void 0,this._allowableTargets=[t,...e],this._oDocument=document,this._eBody=document.body,this._nDelay=1800,this._nDistance=10,this._nX=0,this._nY=0,this._nOriginalX=0,this._nOriginalY=0,this._dragging=!1,this._eElement.addEventListener(\"pointerdown\",this._pointerDownEventListener,{passive:!0})}destroy(){this.checkRemovePointerTrackingEventListeners(),this._eElement.removeEventListener(\"pointerdown\",this._pointerDownEventListener)}cancelDrag(){this.processDragStop(void 0)}onPointerDown(t){if(this._allowableTargets.includes(t.target)&&t.isPrimary){const e=this.getPointerCoordinates(t);this.processPointerDown(e)}}processPointerDown(t){this._nOriginalX=t.x,this._nOriginalY=t.y,this._oDocument.addEventListener(\"pointermove\",this._pointerMoveEventListener),this._oDocument.addEventListener(\"pointerup\",this._pointerUpEventListener,{passive:!0}),this._pointerTracking=!0,this._timeout=setTimeout((()=>{try{this.startDrag()}catch(t){throw console.error(t),t}}),this._nDelay)}onPointerMove(t){this._pointerTracking&&(this.processDragMove(t),t.preventDefault())}processDragMove(t){this._nX=t.pageX-this._nOriginalX,this._nY=t.pageY-this._nOriginalY,!1===this._dragging&&(Math.abs(this._nX)>this._nDistance||Math.abs(this._nY)>this._nDistance)&&this.startDrag(),this._dragging&&this.emit(\"drag\",this._nX,this._nY,t)}onPointerUp(t){this.processDragStop(t)}processDragStop(t){var e;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this.checkRemovePointerTrackingEventListeners(),!0===this._dragging&&(this._eBody.classList.remove(\"lm_dragging\"),this._eElement.classList.remove(\"lm_dragging\"),null===(e=this._oDocument.querySelector(\"iframe\"))||void 0===e||e.style.setProperty(\"pointer-events\",\"\"),this._dragging=!1,this.emit(\"dragStop\",t))}checkRemovePointerTrackingEventListeners(){this._pointerTracking&&(this._oDocument.removeEventListener(\"pointermove\",this._pointerMoveEventListener),this._oDocument.removeEventListener(\"pointerup\",this._pointerUpEventListener),this._pointerTracking=!1)}startDrag(){var t;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this._dragging=!0,this._eBody.classList.add(\"lm_dragging\"),this._eElement.classList.add(\"lm_dragging\"),null===(t=this._oDocument.querySelector(\"iframe\"))||void 0===t||t.style.setProperty(\"pointer-events\",\"none\"),this.emit(\"dragStart\",this._nOriginalX,this._nOriginalY)}getPointerCoordinates(t){return{x:t.pageX,y:t.pageY}}}class qt{constructor(t,e,i){this._isVertical=t,this._size=e,this._grabSize=i0){const i=this.createSplitter(Math.max(0,e-1)).element;e>0?(this.contentItems[e-1].element.insertAdjacentElement(\"afterend\",i),i.insertAdjacentElement(\"afterend\",t.element)):(this.contentItems[0].element.insertAdjacentElement(\"beforebegin\",i),i.insertAdjacentElement(\"beforebegin\",t.element))}else this._childElementContainer.appendChild(t.element);super.addChild(t,e);const n=1/this.contentItems.length*100;if(!0===i)return this.emitBaseBubblingEvent(\"stateChanged\"),e;for(let e=0;e0&&(this.calculateRelativeSizes(),this.setAbsoluteSizes()),this.emitBaseBubblingEvent(\"stateChanged\"),this.emit(\"resize\")}setAbsoluteSizes(){const t=this.calculateAbsoluteSizes();for(let e=0;e0&&t.itemSizes[e]++,this._isColumn?(Tt(this.contentItems[e].element,t.crossAxisSize),At(this.contentItems[e].element,t.itemSizes[e])):(Tt(this.contentItems[e].element,t.itemSizes[e]),At(this.contentItems[e].element,t.crossAxisSize))}calculateAbsoluteSizes(){const t=(this.contentItems.length-1)*this._splitterSize,{width:e,height:i}=kt(this.element);let n,o;this._isColumn?(n=i-t,o=e):(n=e-t,o=i);let s=0;const r=[];for(let t=0;t0){const n=100-t;for(let t=0;t100&&e.length>0){for(let t=0;te)return;{const r=i/e;let a=i;for(let e=0;ethis.onSplitterDrag(e,t,i))),e.on(\"dragStop\",(()=>this.onSplitterDragStop(e))),e.on(\"dragStart\",(()=>this.onSplitterDragStart(e))),this._splitter.splice(t,0,e),e}getSplitItems(t){const e=this._splitter.indexOf(t);return{before:this.contentItems[e],after:this.contentItems[e+1]}}calculateContentItemMinSize(t){const e=t.minSize;if(void 0!==e){if(t.minSizeUnit===ht.Pixel)return e;throw new X(\"ROCGMD98831\",JSON.stringify(t))}{const t=this.layoutManager.layoutConfig.dimensions;return this._isColumn?t.defaultMinItemHeight:t.defaultMinItemWidth}}calculateContentItemsTotalMinSize(t){let e=0;for(const i of t)e+=this.calculateContentItemMinSize(i);return e}onSplitterDragStart(t){const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=this.calculateContentItemsTotalMinSize(e.before.contentItems),s=this.calculateContentItemsTotalMinSize(e.after.contentItems);this._splitterPosition=0,this._splitterMinPosition=-1*(i-o),this._splitterMaxPosition=n-s}onSplitterDrag(t,e,i){let n=this._isColumn?i:e;if(null===this._splitterMinPosition||null===this._splitterMaxPosition)throw new K(\"ROCOSD59226\");n=Math.max(n,this._splitterMinPosition),n=Math.min(n,this._splitterMaxPosition),this._splitterPosition=n;const o=zt(n);this._isColumn?t.element.style.top=o:t.element.style.left=o}onSplitterDragStop(t){if(null===this._splitterPosition)throw new K(\"ROCOSDS66932\");{const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=(this._splitterPosition+i)/(i+n),s=e.before.size+e.after.size;e.before.size=o*s,e.after.size=(1-o)*s,t.element.style.top=zt(0),t.element.style.left=zt(0),globalThis.requestAnimationFrame((()=>this.updateSize(!1)))}}}!function(t){t.getElementDimensionSize=function(t,e){return\"width\"===e?function(t){return t.offsetWidth}(t):function(t){return t.offsetHeight}(t)},t.setElementDimensionSize=function(t,e,i){return\"width\"===e?Tt(t,i):At(t,i)},t.createElement=function(t,e){const i=t.createElement(\"div\");return i.classList.add(\"lm_item\"),e?i.classList.add(\"lm_column\"):i.classList.add(\"lm_row\"),i}}(Xt||(Xt={}));class Yt extends $t{constructor(t,e,i){super(t,vt.create(e),null,Yt.createElement(document)),this.isGround=!0,this._childElementContainer=this.element,this._containerElement=i;let n=null;for(;;){const t=n?n.previousSibling:this._containerElement.lastChild;if(!(t instanceof Element&&t.classList.contains(\"lm_content\")))break;n=t}this._containerElement.insertBefore(this.element,n)}init(){if(!0!==this.isInitialised){this.updateNodeSize();for(let t=0;t0?this.contentItems[0]:this,n.isComponent)throw new Error(\"Cannot add item as child to ComponentItem\");{const t=this.layoutManager.createAndInitContentItem(i,n);return e=n.addChild(t,e),n===this?-1:e}}loadComponentAsRoot(t){this.clearRoot();const e=Ct.resolve(t,!1);if(e.maximised)throw new Error(\"Root Component cannot be maximised\");{const t=new jt(this.layoutManager,e,this);t.init(),this.addChild(t,0)}}addChild(t,e){if(this.contentItems.length>0)throw new Error(\"Ground node can only have a single child\");return this._childElementContainer.appendChild(t.element),e=super.addChild(t,e),this.updateSize(!1),this.emitBaseBubblingEvent(\"stateChanged\"),e}calculateConfigContent(){const t=this.contentItems,e=t.length,i=new Array(e);for(let n=0;n0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e)),this.updateContentItemsSize(!1))}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}createSideAreas(){const t=Yt.Area.oppositeSides,e=new Array(Object.keys(t).length);let i=0;for(const n in t){const o=n,s=this.getElementArea();if(null===s)throw new K(\"RCSA77553\");s.side=o,\"2\"===t[o][1]?s[o]=s[t[o]]-50:s[o]=s[t[o]]+50,s.surface=(s.x2-s.x1)*(s.y2-s.y1),e[i++]=s}return e}highlightDropZone(t,e,i){this.layoutManager.tabDropPlaceholder.remove(),super.highlightDropZone(t,e,i)}onDrop(t,e){if(t.isComponent){const e=ut.createDefault(),i=t;e.header=mt.Header.createCopy(i.headerConfig);const n=this.layoutManager.createAndInitContentItem(e,this);n.addChild(t),t=n}if(0===this.contentItems.length)this.addChild(t);else{if(t.type===at.row||t.type===at.column){const e=ut.createDefault(),i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}const i=\"x\"==e.side[0]?at.row:at.column,n=\"2\"==e.side[1],o=this.contentItems[0];if(o instanceof Xt&&o.type===i){const e=o.contentItems[n?0:o.contentItems.length-1];o.addChild(t,n?0:void 0,!0),e.size*=.5,t.size=e.size,t.sizeUnit=ht.Percent,o.updateSize(!1)}else{const e=ct.createDefault(i),s=this.layoutManager.createContentItem(e,this);this.replaceChild(o,s),s.addChild(t,n?0:void 0,!0),s.addChild(o,n?void 0:0,!0),o.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}}dock(){throw new X(\"GID87731\")}validateDocking(){throw new X(\"GIVD87732\")}getAllContentItems(){const t=[this];return this.deepGetAllContentItems(this.contentItems,t),t}getConfigMaximisedItems(){const t=[];return this.deepFilterContentItems(this.contentItems,t,(t=>!(!Gt.isStack(t)||!t.initialWantMaximise)||!(!Gt.isComponentItem(t)||!t.initialWantMaximise))),t}getItemsByPopInParentId(t){const e=[];return this.deepFilterContentItems(this.contentItems,e,(e=>e.popInParentIds.includes(t))),e}toConfig(){throw new Error(\"Cannot generate GroundItem config\")}setActiveComponentItem(t,e,i){}updateNodeSize(){const{width:t,height:e}=kt(this._containerElement);Tt(this.element,t),At(this.element,e),this.contentItems.length>0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e))}deepGetAllContentItems(t,e){for(let i=0;ithis.onClick(t),this._touchStartEventListener=t=>this.onTouchStart(t),this._element=document.createElement(\"div\"),this._element.classList.add(i),this._element.title=e,this._header.on(\"destroy\",(()=>this.destroy())),this._element.addEventListener(\"click\",this._clickEventListener,{passive:!0}),this._element.addEventListener(\"touchstart\",this._touchStartEventListener,{passive:!0}),this._header.controlsContainerElement.appendChild(this._element)}get element(){return this._element}destroy(){var t;this._element.removeEventListener(\"click\",this._clickEventListener),this._element.removeEventListener(\"touchstart\",this._touchStartEventListener),null===(t=this._element.parentNode)||void 0===t||t.removeChild(this._element)}onClick(t){this._pushEvent(t)}onTouchStart(t){this._pushEvent(t)}}class Jt{constructor(t,e,i,n,o){var s;this._layoutManager=t,this._componentItem=e,this._closeEvent=i,this._focusEvent=n,this._dragStartEvent=o,this._isActive=!1,this._tabClickListener=t=>this.onTabClickDown(t),this._tabTouchStartListener=t=>this.onTabTouchStart(t),this._closeClickListener=()=>this.onCloseClick(),this._closeTouchStartListener=()=>this.onCloseTouchStart(),this._dragStartListener=(t,e)=>this.onDragStart(t,e),this._contentItemDestroyListener=()=>this.onContentItemDestroy(),this._tabTitleChangedListener=t=>this.setTitle(t),this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_tab\"),this._titleElement=document.createElement(\"span\"),this._titleElement.classList.add(\"lm_title\"),this._closeElement=document.createElement(\"div\"),this._closeElement.classList.add(\"lm_close_tab\"),this._element.appendChild(this._titleElement),this._element.appendChild(this._closeElement),e.isClosable?this._closeElement.style.display=\"\":this._closeElement.style.display=\"none\",this.setTitle(e.title),this._componentItem.on(\"titleChanged\",this._tabTitleChangedListener);(null!==(s=e.reorderEnabled)&&void 0!==s?s:this._layoutManager.layoutConfig.settings.reorderEnabled)&&this.enableReorder(),this._element.addEventListener(\"click\",this._tabClickListener,{passive:!0}),this._element.addEventListener(\"touchstart\",this._tabTouchStartListener,{passive:!0}),this._componentItem.isClosable?(this._closeElement.addEventListener(\"click\",this._closeClickListener,{passive:!0}),this._closeElement.addEventListener(\"touchstart\",this._closeTouchStartListener,{passive:!0})):(this._closeElement.remove(),this._closeElement=void 0),this._componentItem.setTab(this),this._layoutManager.emit(\"tabCreated\",this)}get isActive(){return this._isActive}get componentItem(){return this._componentItem}get contentItem(){return this._componentItem}get element(){return this._element}get titleElement(){return this._titleElement}get closeElement(){return this._closeElement}get reorderEnabled(){return void 0!==this._dragListener}set reorderEnabled(t){t!==this.reorderEnabled&&(t?this.enableReorder():this.disableReorder())}setTitle(t){this._titleElement.innerText=t,this._element.title=t}setActive(t){t!==this._isActive&&(this._isActive=t,t?this._element.classList.add(\"lm_active\"):this._element.classList.remove(\"lm_active\"))}destroy(){var t,e;this._closeEvent=void 0,this._focusEvent=void 0,this._dragStartEvent=void 0,this._element.removeEventListener(\"click\",this._tabClickListener),this._element.removeEventListener(\"touchstart\",this._tabTouchStartListener),null===(t=this._closeElement)||void 0===t||t.removeEventListener(\"click\",this._closeClickListener),null===(e=this._closeElement)||void 0===e||e.removeEventListener(\"touchstart\",this._closeTouchStartListener),this._componentItem.off(\"titleChanged\",this._tabTitleChangedListener),this.reorderEnabled&&this.disableReorder(),this._element.remove()}setBlurred(){this._element.classList.remove(\"lm_focused\"),this._titleElement.classList.remove(\"lm_focused\")}setFocused(){this._element.classList.add(\"lm_focused\"),this._titleElement.classList.add(\"lm_focused\")}onDragStart(t,e){if(void 0===this._dragListener)throw new J(\"TODSDLU10093\");if(void 0===this._dragStartEvent)throw new J(\"TODS23309\");this._dragStartEvent(t,e,this._dragListener,this.componentItem)}onContentItemDestroy(){void 0!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=void 0)}onTabClickDown(t){const e=t.target;e!==this._element&&e!==this._titleElement||(0===t.button?this.notifyFocus():1===t.button&&this._componentItem.isClosable&&this.notifyClose())}onTabTouchStart(t){t.target===this._element&&this.notifyFocus()}onCloseClick(){this.notifyClose()}onCloseTouchStart(){this.notifyClose()}notifyClose(){if(void 0===this._closeEvent)throw new J(\"TNC15007\");this._closeEvent(this._componentItem)}notifyFocus(){if(void 0===this._focusEvent)throw new J(\"TNA15007\");this._focusEvent(this._componentItem)}enableReorder(){this._dragListener=new Zt(this._element,[this._titleElement]),this._dragListener.on(\"dragStart\",this._dragStartListener),this._componentItem.on(\"destroy\",this._contentItemDestroyListener)}disableReorder(){if(void 0===this._dragListener)throw new J(\"TDR87745\");this._componentItem.off(\"destroy\",this._contentItemDestroyListener),this._dragListener.off(\"dragStart\",this._dragStartListener),this._dragListener=void 0}}class Qt{constructor(t,e,i,n,o){this._layoutManager=t,this._componentRemoveEvent=e,this._componentFocusEvent=i,this._componentDragStartEvent=n,this._dropdownActiveChangedEvent=o,this._tabs=[],this._lastVisibleTabIndex=-1,this._dropdownActive=!1,this._element=document.createElement(\"section\"),this._element.classList.add(\"lm_tabs\"),this._dropdownElement=document.createElement(\"section\"),this._dropdownElement.classList.add(\"lm_tabdropdown_list\"),this._dropdownElement.style.display=\"none\"}get tabs(){return this._tabs}get tabCount(){return this._tabs.length}get lastVisibleTabIndex(){return this._lastVisibleTabIndex}get element(){return this._element}get dropdownElement(){return this._dropdownElement}get dropdownActive(){return this._dropdownActive}destroy(){for(let t=0;tthis.handleTabCloseEvent(t)),(t=>this.handleTabFocusEvent(t)),((t,e,i,n)=>this.handleTabDragStartEvent(t,e,i,n)));void 0===e&&(e=this._tabs.length),this._tabs.splice(e,0,i),ethis._lastVisibleTabIndex){const t=this._tabs[e];for(let t=e;t>0;t--)this._tabs[t]=this._tabs[t-1];this._tabs[0]=t}}updateTabSizes(t,e){let i=!1;this.tryUpdateTabSizes(i,t,e)||(i=!0,this.tryUpdateTabSizes(i,t,e)),i!==this._dropdownActive&&(this._dropdownActive=i,this._dropdownActiveChangedEvent())}tryUpdateTabSizes(t,e,i){if(this._tabs.length>0){if(void 0===i)throw new Error(\"non-empty tabs must have active component item\");let n=0,o=!1;const s=this._layoutManager.layoutConfig.settings.tabOverlapAllowance,r=this._tabs.indexOf(i.tab),a=this._tabs[r];this._lastVisibleTabIndex=-1;for(let i=0;ie){if(o)i===r&&(l.style.zIndex=\"auto\",l.style.marginLeft=\"\",l.parentElement!==this._element&&this._element.appendChild(l));else{let t;if(t=r>0&&r<=i?(d-e)/(i-1):(d-e)/i,tthis.onClick(t),this._touchStartListener=t=>this.onTouchStart(t),this._rowColumnClosable=!0,this._closeButton=null,this._popoutButton=null,this._tabsContainer=new Qt(this._layoutManager,(t=>this.handleTabInitiatedComponentRemoveEvent(t)),(t=>this.handleTabInitiatedComponentFocusEvent(t)),((t,e,i,n)=>this.handleTabInitiatedDragStartEvent(t,e,i,n)),(()=>this.processTabDropdownActiveChanged())),this._show=i.show,this._popoutEnabled=i.popoutEnabled,this._popoutLabel=i.popoutLabel,this._maximiseEnabled=i.maximiseEnabled,this._maximiseLabel=i.maximiseLabel,this._minimiseEnabled=i.minimiseEnabled,this._minimiseLabel=i.minimiseLabel,this._closeEnabled=i.closeEnabled,this._closeLabel=i.closeLabel,this._tabDropdownEnabled=i.tabDropdownEnabled,this._tabDropdownLabel=i.tabDropdownLabel,this.setSide(i.side),this._canRemoveComponent=this._configClosable,this._element=document.createElement(\"section\"),this._element.classList.add(\"lm_header\"),this._controlsContainerElement=document.createElement(\"section\"),this._controlsContainerElement.classList.add(\"lm_controls\"),this._element.appendChild(this._tabsContainer.element),this._element.appendChild(this._controlsContainerElement),this._element.appendChild(this._tabsContainer.dropdownElement),this._element.addEventListener(\"click\",this._clickListener,{passive:!0}),this._element.addEventListener(\"touchstart\",this._touchStartListener,{passive:!0}),this._documentMouseUpListener=()=>this._tabsContainer.hideAdditionalTabsDropdown(),globalThis.document.addEventListener(\"mouseup\",this._documentMouseUpListener,{passive:!0}),this._tabControlOffset=this._layoutManager.layoutConfig.settings.tabControlOffset,this._tabDropdownEnabled&&(this._tabDropdownButton=new Kt(this,this._tabDropdownLabel,\"lm_tabdropdown\",(()=>this._tabsContainer.showAdditionalTabsDropdown()))),this._popoutEnabled&&(this._popoutButton=new Kt(this,this._popoutLabel,\"lm_popout\",(()=>this.handleButtonPopoutEvent()))),this._maximiseEnabled&&(this._maximiseButton=new Kt(this,this._maximiseLabel,\"lm_maximise\",(t=>this.handleButtonMaximiseToggleEvent(t)))),this._configClosable&&(this._closeButton=new Kt(this,this._closeLabel,\"lm_close\",(()=>s()))),this.processTabDropdownActiveChanged()}get show(){return this._show}get side(){return this._side}get leftRightSided(){return this._leftRightSided}get layoutManager(){return this._layoutManager}get parent(){return this._parent}get tabs(){return this._tabsContainer.tabs}get lastVisibleTabIndex(){return this._tabsContainer.lastVisibleTabIndex}get element(){return this._element}get tabsContainerElement(){return this._tabsContainer.element}get controlsContainerElement(){return this._controlsContainerElement}destroy(){this.emit(\"destroy\"),this._popoutEvent=void 0,this._maximiseToggleEvent=void 0,this._clickEvent=void 0,this._touchStartEvent=void 0,this._componentRemoveEvent=void 0,this._componentFocusEvent=void 0,this._componentDragStartEvent=void 0,this._tabsContainer.destroy(),globalThis.document.removeEventListener(\"mouseup\",this._documentMouseUpListener),this._element.remove()}createTab(t,e){this._tabsContainer.createTab(t,e)}removeTab(t){this._tabsContainer.removeTab(t)}processActiveComponentChanged(t){this._tabsContainer.processActiveComponentChanged(t),this.updateTabSizes()}setSide(t){this._side=t,this._leftRightSided=[nt.right,nt.left].includes(this._side)}setRowColumnClosable(t){this._rowColumnClosable=t,this.updateClosability()}updateClosability(){let t;if(this._configClosable)if(this._rowColumnClosable){t=!0;const e=this.tabs.length;for(let i=0;i1}applyFocusedValue(t){t?this._element.classList.add(\"lm_focused\"):this._element.classList.remove(\"lm_focused\")}processMaximised(){if(void 0===this._maximiseButton)throw new J(\"HPMAX16997\");this._maximiseButton.element.setAttribute(\"title\",this._minimiseLabel)}processMinimised(){if(void 0===this._maximiseButton)throw new J(\"HPMIN16997\");this._maximiseButton.element.setAttribute(\"title\",this._maximiseLabel)}updateTabSizes(){if(this._tabsContainer.tabCount>0){const t=this._show?this._layoutManager.layoutConfig.dimensions.headerHeight:0;let e;this._leftRightSided?(this._element.style.height=\"\",this._element.style.width=zt(t)):(this._element.style.width=\"\",this._element.style.height=zt(t)),e=this._leftRightSided?this._element.offsetHeight-this._controlsContainerElement.offsetHeight-this._tabControlOffset:this._element.offsetWidth-this._controlsContainerElement.offsetWidth-this._tabControlOffset,this._tabsContainer.updateTabSizes(e,this._getActiveComponentItemEvent())}}handleTabInitiatedComponentRemoveEvent(t){if(this._canRemoveComponent){if(void 0===this._componentRemoveEvent)throw new J(\"HHTCE22294\");this._componentRemoveEvent(t)}}handleTabInitiatedComponentFocusEvent(t){if(void 0===this._componentFocusEvent)throw new J(\"HHTAE22294\");this._componentFocusEvent(t)}handleTabInitiatedDragStartEvent(t,e,i,n){if(this._canRemoveComponent){if(void 0===this._componentDragStartEvent)throw new J(\"HHTDSE22294\");this._componentDragStartEvent(t,e,i,n)}else i.cancelDrag()}processTabDropdownActiveChanged(){void 0!==this._tabDropdownButton&&Dt(this._tabDropdownButton.element,this._tabsContainer.dropdownActive)}handleButtonPopoutEvent(){if(this._layoutManager.layoutConfig.settings.popoutWholeStack){if(void 0===this._popoutEvent)throw new J(\"HHBPOE17834\");this._popoutEvent()}else{const t=this._getActiveComponentItemEvent();t&&t.popout()}}handleButtonMaximiseToggleEvent(t){if(void 0===this._maximiseToggleEvent)throw new J(\"HHBMTE16834\");this._maximiseToggleEvent()}onClick(t){t.target===this._element&&this.notifyClick(t)}onTouchStart(t){t.target===this._element&&this.notifyTouchStart(t)}notifyClick(t){if(void 0===this._clickEvent)throw new J(\"HNHC46834\");this._clickEvent(t)}notifyTouchStart(t){if(void 0===this._touchStartEvent)throw new J(\"HNHTS46834\");this._touchStartEvent(t)}}class ee extends $t{constructor(t,e,i){var n,o,s,r,a,l,h,d,c,m,u,p,g,f,v,_,y,C,w;super(t,e,i,ee.createElement(document)),this._headerSideChanged=!1,this._resizeListener=()=>this.handleResize(),this._maximisedListener=()=>this.handleMaximised(),this._minimisedListener=()=>this.handleMinimised(),this._headerConfig=e.header;const I=t.layoutConfig.header,b=e.content;let S;if(1!==b.length)S=void 0;else{S=b[0].header}this._initialWantMaximise=e.maximised,this._initialActiveItemIndex=null!==(n=e.activeItemIndex)&&void 0!==n?n:0;const E=null!==(r=null!==(s=null===(o=this._headerConfig)||void 0===o?void 0:o.show)&&void 0!==s?s:null==S?void 0:S.show)&&void 0!==r?r:I.show,x=null!==(h=null!==(l=null===(a=this._headerConfig)||void 0===a?void 0:a.popout)&&void 0!==l?l:null==S?void 0:S.popout)&&void 0!==h?h:I.popout,L=null!==(m=null!==(c=null===(d=this._headerConfig)||void 0===d?void 0:d.maximise)&&void 0!==c?c:null==S?void 0:S.maximise)&&void 0!==m?m:I.maximise,z=null!==(g=null!==(p=null===(u=this._headerConfig)||void 0===u?void 0:u.close)&&void 0!==p?p:null==S?void 0:S.close)&&void 0!==g?g:I.close,M=null!==(_=null!==(v=null===(f=this._headerConfig)||void 0===f?void 0:f.minimise)&&void 0!==v?v:null==S?void 0:S.minimise)&&void 0!==_?_:I.minimise,P=null!==(w=null!==(C=null===(y=this._headerConfig)||void 0===y?void 0:y.tabDropdown)&&void 0!==C?C:null==S?void 0:S.tabDropdown)&&void 0!==w?w:I.tabDropdown;this._maximisedEnabled=!1!==L;const T={show:!1!==E,side:!1===E?nt.top:E,popoutEnabled:!1!==x,popoutLabel:!1===x?\"\":x,maximiseEnabled:this._maximisedEnabled,maximiseLabel:!1===L?\"\":L,closeEnabled:!1!==z,closeLabel:!1===z?\"\":z,minimiseEnabled:!0,minimiseLabel:M,tabDropdownEnabled:!1!==P,tabDropdownLabel:!1===P?\"\":P};this._header=new te(t,this,T,e.isClosable&&!1!==z,(()=>this.getActiveComponentItem()),(()=>this.remove()),(()=>this.handlePopoutEvent()),(()=>this.toggleMaximise()),(t=>this.handleHeaderClickEvent(t)),(t=>this.handleHeaderTouchStartEvent(t)),(t=>this.handleHeaderComponentRemoveEvent(t)),(t=>this.handleHeaderComponentFocusEvent(t)),((t,e,i,n)=>this.handleHeaderComponentStartDragEvent(t,e,i,n))),this.isStack=!0,this._childElementContainer=document.createElement(\"section\"),this._childElementContainer.classList.add(\"lm_items\"),this.on(\"resize\",this._resizeListener),this._maximisedEnabled&&(this.on(\"maximised\",this._maximisedListener),this.on(\"minimised\",this._minimisedListener)),this.element.appendChild(this._header.element),this.element.appendChild(this._childElementContainer),this.setupHeaderPosition(),this._header.updateClosability()}get childElementContainer(){return this._childElementContainer}get header(){return this._header}get headerShow(){return this._header.show}get headerSide(){return this._header.side}get headerLeftRightSided(){return this._header.leftRightSided}get contentAreaDimensions(){return this._contentAreaDimensions}get initialWantMaximise(){return this._initialWantMaximise}get isMaximised(){return this===this.layoutManager.maximisedStack}get stackParent(){if(!this.parent)throw new Error(\"Stack should always have a parent\");return this.parent}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}init(){if(!0===this.isInitialised)return;this.updateNodeSize();for(let t=0;t0){if(this._initialActiveItemIndex<0||this._initialActiveItemIndex>=e)throw new Error(`ActiveItemIndex out of range: ${this._initialActiveItemIndex} id: ${this.id}`);for(let i=0;ithis.contentItems.length)throw e-=1,new X(\"SAC99728\");if(t instanceof jt)return e=super.addChild(t,e),this._childElementContainer.appendChild(t.element),this._header.createTab(t,e),this.setActiveComponentItem(t,i),this._header.updateTabSizes(),this.updateSize(!1),t.container.setBaseLogicalZIndex(),this._header.updateClosability(),this.emitStateChangedEvent(),e;throw new X(\"SACC88532\")}removeChild(t,e){const i=t,n=this.contentItems.indexOf(i),o=1===this.contentItems.length;if(this._activeComponentItem===i&&(i.focused&&i.blur(),!o)){const t=0===n?1:n-1;this.setActiveComponentItem(this.contentItems[t],!1)}this._header.removeTab(i),super.removeChild(i,e),o||this._header.updateClosability(),this.emitStateChangedEvent()}toggleMaximise(){this.isMaximised?this.minimise():this.maximise()}maximise(){if(!this.isMaximised){this.layoutManager.setMaximisedStack(this);const t=this.contentItems,e=t.length;for(let i=0;i0&&void 0===t)throw new Error(\"expected non-empty stack to have an active component item\");return{type:\"stack\",content:this.calculateConfigContent(),size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,isClosable:this.isClosable,maximised:this.isMaximised,header:this.createHeaderConfig(),activeItemIndex:t}}onDrop(t,e){if(\"header\"===this._dropSegment){if(this.resetHeaderDropZone(),void 0===this._dropIndex)throw new J(\"SODDI68990\");return void this.addChild(t,this._dropIndex)}if(\"body\"===this._dropSegment)return void this.addChild(t,0,!0);const i=\"top\"===this._dropSegment||\"bottom\"===this._dropSegment,n=\"left\"===this._dropSegment||\"right\"===this._dropSegment,o=\"top\"===this._dropSegment||\"left\"===this._dropSegment,s=i&&this.stackParent.isColumn||n&&this.stackParent.isRow;if(t.isComponent){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createAndInitContentItem(e,this);i.addChild(t),t=i}if(t.type===at.row||t.type===at.column){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}if(s){const e=this.stackParent.contentItems.indexOf(this);this.stackParent.addChild(t,o?e:e+1,!0),this.size*=.5,t.size=this.size,t.sizeUnit=this.sizeUnit,this.stackParent.updateSize(!1)}else{const e=i?at.column:at.row,n=ct.createDefault(e),s=this.layoutManager.createContentItem(n,this);this.stackParent.replaceChild(this,s),s.addChild(t,o?0:void 0,!0),s.addChild(this,o?void 0:0,!0),this.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}highlightDropZone(t,e){for(const i in this._contentAreaDimensions){const n=i,o=this._contentAreaDimensions[n].hoverArea;if(o.x1t&&o.y1e)return void(\"header\"===n?(this._dropSegment=\"header\",this.highlightHeaderDropZone(this._header.leftRightSided?e:t)):(this.resetHeaderDropZone(),this.highlightBodyDropZone(n)))}}getArea(){if(\"none\"===this.element.style.display)return null;const t=super.getElementArea(this._header.element),e=super.getElementArea(this._childElementContainer);if(null===t||null===e)throw new K(\"SGAHC13086\");const i=e.x2-e.x1,n=e.y2-e.y1;return this._contentAreaDimensions={header:{hoverArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2},highlightArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2}}},0===this.contentItems.length?(this._contentAreaDimensions.body={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2}},super.getElementArea(this.element)):(this._contentAreaDimensions.left={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x1+.25*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x1+.5*i,y2:e.y2}},this._contentAreaDimensions.top={hoverArea:{x1:e.x1+.25*i,y1:e.y1,x2:e.x1+.75*i,y2:e.y1+.5*n},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y1+.5*n}},this._contentAreaDimensions.right={hoverArea:{x1:e.x1+.75*i,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1+.5*i,y1:e.y1,x2:e.x2,y2:e.y2}},this._contentAreaDimensions.bottom={hoverArea:{x1:e.x1+.25*i,y1:e.y1+.5*n,x2:e.x1+.75*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1+.5*n,x2:e.x2,y2:e.y2}},super.getElementArea(this.element))}positionHeader(t){this._header.side!==t&&(this._header.setSide(t),this._headerSideChanged=!0,this.setupHeaderPosition())}updateNodeSize(){if(\"none\"!==this.element.style.display){const t=kt(this.element);if(this._header.show){t[this._header.leftRightSided?it.width:it.height]-=this.layoutManager.layoutConfig.dimensions.headerHeight}this._childElementContainer.style.width=zt(t.width),this._childElementContainer.style.height=zt(t.height);for(let e=0;e=o&&tthis.onDrag(t,e,i))),this._dragListener.on(\"dragStop\",(()=>this.onDrop())),this.createDragProxyElements(t,e),null===this._componentItem.parent)throw new K(\"DPC10097\");this._componentItemFocused=this._componentItem.focused,this._componentItemFocused&&this._componentItem.blur(),this._componentItem.parent.removeChild(this._componentItem,!0),this.setDimensions(),document.body.appendChild(this._element),this.determineMinMaxXY(),this._layoutManager.calculateItemAreas(),this.setDropPosition(t,e)}get element(){return this._element}createDragProxyElements(t,e){this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_dragProxy\");const i=document.createElement(\"div\");i.classList.add(\"lm_header\");const n=document.createElement(\"div\");n.classList.add(\"lm_tabs\");const o=document.createElement(\"div\");o.classList.add(\"lm_tab\");const s=document.createElement(\"span\");s.classList.add(\"lm_title\"),o.appendChild(s),n.appendChild(o),i.appendChild(n),this._proxyContainerElement=document.createElement(\"div\"),this._proxyContainerElement.classList.add(\"lm_content\"),this._element.appendChild(i),this._element.appendChild(this._proxyContainerElement),this._originalParent instanceof ee&&this._originalParent.headerShow&&(this._sided=this._originalParent.headerLeftRightSided,this._element.classList.add(\"lm_\"+this._originalParent.headerSide),[nt.right,nt.bottom].indexOf(this._originalParent.headerSide)>=0&&this._proxyContainerElement.insertAdjacentElement(\"afterend\",i)),this._element.style.left=zt(t),this._element.style.top=zt(e),o.setAttribute(\"title\",this._componentItem.title),s.insertAdjacentText(\"afterbegin\",this._componentItem.title),this._proxyContainerElement.appendChild(this._componentItem.element)}determineMinMaxXY(){const t=this._layoutManager.groundItem;if(void 0===t)throw new J(\"DPDMMXY73109\");{const e=t.element.getBoundingClientRect();this._minX=e.left+document.body.scrollLeft,this._minY=e.top+document.body.scrollTop,this._maxX=this._minX+e.width,this._maxY=this._minY+e.height}}onDrag(t,e,i){const n=i.pageX,o=i.pageY;this.setDropPosition(n,o),this._componentItem.drag()}setDropPosition(t,e){this._layoutManager.layoutConfig.settings.constrainDragToContainer&&(t<=this._minX?t=Math.ceil(this._minX):t>=this._maxX&&(t=Math.floor(this._maxX)),e<=this._minY?e=Math.ceil(this._minY):e>=this._maxY&&(e=Math.floor(this._maxY))),this._element.style.left=zt(t),this._element.style.top=zt(e),this._area=this._layoutManager.getArea(t,e),null!==this._area&&(this._lastValidArea=this._area,this._area.contentItem.highlightDropZone(t,e,this._area))}onDrop(){const t=this._layoutManager.dropTargetIndicator;if(null===t)throw new K(\"DPOD30011\");let e;if(t.hide(),this._componentItem.exitDragMode(),null!==this._area)e=this._componentItem,this._area.contentItem.onDrop(e,this._area);else if(null!==this._lastValidArea){e=this._componentItem;this._lastValidArea.contentItem.onDrop(e,this._lastValidArea)}else this._originalParent?(e=this._componentItem,this._originalParent.addChild(e)):this._componentItem.destroy();this._element.remove(),this._layoutManager.emit(\"itemDropped\",this._componentItem),this._componentItemFocused&&void 0!==e&&e.focus()}setDimensions(){const t=this._layoutManager.layoutConfig.dimensions;if(void 0===t)throw new Error(\"DragProxy.setDimensions: dimensions undefined\");let e=t.dragProxyWidth,i=t.dragProxyHeight;if(void 0===e||void 0===i)throw new Error(\"DragProxy.setDimensions: width and/or height undefined\");const n=!1===this._layoutManager.layoutConfig.header.show?0:t.headerHeight;this._element.style.width=zt(e),this._element.style.height=zt(i),e-=this._sided?n:0,i-=this._sided?0:n,this._proxyContainerElement.style.width=zt(e),this._proxyContainerElement.style.height=zt(i),this._componentItem.enterDragMode(e,i),this._componentItem.show()}}class ne{constructor(t,e,i,n,o,s,r){this._layoutManager=t,this._element=e,this._extraAllowableChildTargets=i,this._componentTypeOrFtn=n,this._componentState=o,this._title=s,this._id=r,this._dragListener=null,this._dummyGroundContainer=document.createElement(\"div\");const a=gt.createDefault(\"row\");this._dummyGroundContentItem=new Yt(this._layoutManager,a,this._dummyGroundContainer),this.createDragListener()}destroy(){this.removeDragListener()}createDragListener(){this.removeDragListener(),this._dragListener=new Zt(this._element,this._extraAllowableChildTargets),this._dragListener.on(\"dragStart\",((t,e)=>this.onDragStart(t,e))),this._dragListener.on(\"dragStop\",(()=>this.onDragStop()))}onDragStart(t,e){var i;const n=\"component\";let o;if(\"function\"==typeof this._componentTypeOrFtn){const t=this._componentTypeOrFtn();o=ne.isDragSourceComponentItemConfig(t)?{type:n,componentState:t.state,componentType:t.type,title:null!==(i=t.title)&&void 0!==i?i:this._title}:t}else o={type:n,componentState:this._componentState,componentType:this._componentTypeOrFtn,title:this._title,id:this._id};const s=bt.resolve(o,!1),r=new jt(this._layoutManager,s,this._dummyGroundContentItem);if(this._dummyGroundContentItem.contentItems.push(r),null===this._dragListener)throw new K(\"DSODSD66746\");{const i=new ie(t,e,this._dragListener,this._layoutManager,r,this._dummyGroundContentItem),n=this._layoutManager.transitionIndicator;if(null===n)throw new K(\"DSODST66746\");n.transitionElements(this._element,i.element)}}onDragStop(){this.createDragListener()}removeDragListener(){null!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=null)}}!function(t){t.isDragSourceComponentItemConfig=function(t){return!(\"componentType\"in t)}}(ne||(ne={}));class oe{constructor(){this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_dropTargetIndicator\");const t=document.createElement(\"div\");t.classList.add(\"lm_inner\"),this._element.appendChild(t),document.body.appendChild(this._element)}destroy(){this._element.remove()}highlightArea(t,e){this._element.style.left=zt(t.x1+e),this._element.style.top=zt(t.y1+e),this._element.style.width=zt(t.x2-t.x1-e),this._element.style.height=zt(t.y2-t.y1-e),this._element.style.display=\"block\"}hide(){Dt(this._element,!1)}}class se{constructor(){this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_transition_indicator\"),document.body.appendChild(this._element),this._toElement=null,this._fromDimensions=null,this._totalAnimationDuration=200,this._animationStartTime=null}destroy(){this._element.remove()}transitionElements(t,e){}nextAnimationFrame(){}measure(t){const e=t.getBoundingClientRect();return{left:e.left,top:e.top,width:t.offsetWidth,height:t.offsetHeight}}}class re extends Wt{constructor(t){super(),this._layoutManager=t,this._childEventListener=t=>this.onEventFromChild(t),globalThis.addEventListener(re.ChildEventName,this._childEventListener,{passive:!0})}emit(t,...e){\"userBroadcast\"===t?this.emitUserBroadcast(...e):super.emit(t,...e)}emitUserBroadcast(...t){this.handleUserBroadcastEvent(\"userBroadcast\",t)}destroy(){globalThis.removeEventListener(re.ChildEventName,this._childEventListener)}handleUserBroadcastEvent(t,e){this._layoutManager.isSubWindow?this.propagateToParent(t,e):this.propagateToThisAndSubtree(t,e)}onEventFromChild(t){const e=t.detail;this.handleUserBroadcastEvent(e.eventName,e.args)}propagateToParent(t,e){const i={bubbles:!0,cancelable:!0,detail:{layoutManager:this._layoutManager,eventName:t,args:e}},n=new CustomEvent(re.ChildEventName,i),o=globalThis.opener;if(null===o)throw new K(\"EHPTP15778\");o.dispatchEvent(n)}propagateToThisAndSubtree(t,e){this.emitUnknown(t,...e);for(let i=0;ithis.handleContainerResize())),this._windowBeforeUnloadListener=()=>this.onBeforeUnload(),this._windowBeforeUnloadListening=!1,this._maximisedStackBeforeDestroyedListener=t=>this.cleanupBeforeMaximisedStackDestroyed(t),this.isSubWindow=t.isSubWindow,this._constructorOrSubWindowLayoutConfig=t.constructorOrSubWindowLayoutConfig,Q.checkInitialise(),dt.checkInitialise(),void 0!==t.containerElement&&(this._containerElement=t.containerElement)}get container(){return this._containerElement}get isInitialised(){return this._isInitialised}get groundItem(){return this._groundItem}get root(){return this._groundItem}get openPopouts(){return this._openPopouts}get dropTargetIndicator(){return this._dropTargetIndicator}get transitionIndicator(){return this._transitionIndicator}get width(){return this._width}get height(){return this._height}get eventHub(){return this._eventHub}get rootItem(){if(void 0===this._groundItem)throw new Error(\"Cannot access rootItem before init\");return 0===this._groundItem.contentItems.length?void 0:this._groundItem.contentItems[0]}get focusedComponentItem(){return this._focusedComponentItem}get tabDropPlaceholder(){return this._tabDropPlaceholder}get maximisedStack(){return this._maximisedStack}get deprecatedConstructor(){return!this.isSubWindow&&void 0!==this._constructorOrSubWindowLayoutConfig}destroy(){if(this._isInitialised){this._windowBeforeUnloadListening&&(globalThis.removeEventListener(\"beforeunload\",this._windowBeforeUnloadListener),this._windowBeforeUnloadListening=!1),!0===this.layoutConfig.settings.closePopoutsOnUnload&&this.closeAllOpenPopouts(),this._resizeObserver.disconnect(),this.checkClearResizeTimeout(),void 0!==this._groundItem&&this._groundItem.destroy(),this._tabDropPlaceholder.remove(),null!==this._dropTargetIndicator&&this._dropTargetIndicator.destroy(),null!==this._transitionIndicator&&this._transitionIndicator.destroy(),this._eventHub.destroy();for(const t of this._dragSources)t.destroy();this._dragSources=[],this._isInitialised=!1}}minifyConfig(t){return _t.minifyConfig(t)}unminifyConfig(t){return _t.unminifyConfig(t)}init(){let t;if(this.setContainer(),this._dropTargetIndicator=new oe,this._transitionIndicator=new se,this.updateSizeFromContainer(),this.isSubWindow){if(void 0===this._constructorOrSubWindowLayoutConfig)throw new J(\"LMIU07155\");{const e=this._constructorOrSubWindowLayoutConfig.root;if(void 0===e)throw new X(\"LMIC07156\");if(!Ct.isComponent(e))throw new X(\"LMIC07157\");t=e;const i=xt.resolve(this._constructorOrSubWindowLayoutConfig);this.layoutConfig=Object.assign(Object.assign({},i),{root:void 0})}}else void 0===this._constructorOrSubWindowLayoutConfig?this.layoutConfig=_t.createDefault():this.layoutConfig=xt.resolve(this._constructorOrSubWindowLayoutConfig);const e=this.layoutConfig;this._groundItem=new Yt(this,e.root,this._containerElement),this._groundItem.init(),this.checkLoadedLayoutMaximiseItem(),this._resizeObserver.observe(this._containerElement),this._isInitialised=!0,this.adjustColumnsResponsive(),this.emit(\"initialised\"),void 0!==t&&this.loadComponentAsRoot(t)}loadLayout(t){if(!this.isInitialised)throw new Error(\"GoldenLayout: Need to call init() if LayoutConfig with defined root passed to constructor\");if(void 0===this._groundItem)throw new J(\"LMLL11119\");this.createSubWindows(),this.layoutConfig=xt.resolve(t),this._groundItem.loadRoot(this.layoutConfig.root),this.checkLoadedLayoutMaximiseItem(),this.adjustColumnsResponsive()}saveLayout(){if(!1===this._isInitialised)throw new Error(\"Can't create config, layout not yet initialised\");if(void 0===this._groundItem)throw new J(\"LMTC18244\");{const t=this._groundItem.calculateConfigContent();let e;e=1!==t.length?void 0:t[0],this.reconcilePopoutWindows();const i=[];for(let t=0;t=0?n=this._groundItem.contentItems[0]:e=0;break;case at.row:case at.column:e=n.addItem(t,i.index);break;case at.stack:if(Ct.isComponent(t)){e=n.addItem(t,i.index);break}throw Error(tt[6]);case at.component:throw new X(\"LMAIALC87444602\");default:throw new Y(\"LMAIALU98881733\",n.type)}if(Ct.isComponent(t)){const t=n.contentItems[e];Gt.isStack(t)&&(n=t,e=0)}return i.parentItem=n,i.index=e,i}}}loadComponentAsRoot(t){if(void 0===this._groundItem)throw new Error(\"Cannot add item before init\");this._groundItem.loadComponentAsRoot(t)}updateSize(t,e){this.setSize(t,e)}setSize(t,e){if(this._width=t,this._height=e,!0===this._isInitialised){if(void 0===this._groundItem)throw new J(\"LMUS18881\");if(this._groundItem.setSize(this._width,this._height),this._maximisedStack){const{width:t,height:e}=kt(this._containerElement);Tt(this._maximisedStack.element,t),At(this._maximisedStack.element,e),this._maximisedStack.updateSize(!1)}this.adjustColumnsResponsive()}}beginSizeInvalidation(){this._sizeInvalidationBeginCount++}endSizeInvalidation(){0==--this._sizeInvalidationBeginCount&&this.updateSizeFromContainer()}updateSizeFromContainer(){const{width:t,height:e}=kt(this._containerElement);this.setSize(t,e)}updateRootSize(t=!1){if(void 0===this._groundItem)throw new J(\"LMURS28881\");this._groundItem.updateSize(t)}createAndInitContentItem(t,e){const i=this.createContentItem(t,e);return i.init(),i}createContentItem(t,e){if(\"string\"!=typeof t.type)throw new G(\"Missing parameter 'type'\",JSON.stringify(t));if(ct.isComponentItem(t)&&!(e instanceof ee)&&e&&!(!0===this.isSubWindow&&e instanceof Yt)){t={type:at.stack,content:[t],size:t.size,sizeUnit:t.sizeUnit,minSize:t.minSize,minSizeUnit:t.minSizeUnit,id:t.id,maximised:t.maximised,isClosable:t.isClosable,activeItemIndex:0,header:void 0}}return this.createContentItemFromConfig(t,e)}findFirstComponentItemById(t){if(void 0===this._groundItem)throw new J(\"LMFFCIBI82446\");return this.findFirstContentItemTypeByIdRecursive(at.component,t,this._groundItem)}createPopout(t,e,i,n){return t instanceof Gt?this.createPopoutFromContentItem(t,e,i,n):this.createPopoutFromItemConfig(t,e,i,n)}createPopoutFromContentItem(t,e,i,n){let o=t.parent,s=t;for(;null!==o&&1===o.contentItems.length&&!o.isGround;)s=o,o=o.parent;if(null===o)throw new K(\"LMCPFCI00834\");{if(void 0===n&&(n=o.contentItems.indexOf(s)),null!==i&&o.addPopInParentId(i),void 0===e){const i=globalThis.screenX||globalThis.screenLeft,n=globalThis.screenY||globalThis.screenTop,o=t.element.offsetLeft,s=t.element.offsetTop,{width:r,height:a}=kt(t.element);e={left:i+o,top:n+s,width:r,height:a}}const r=t.toConfig();if(t.remove(),ft.isRootItemConfig(r))return this.createPopoutFromItemConfig(r,e,i,n);throw new Error(`${tt[0]}`)}}beginVirtualSizedContainerAdding(){0==++this._virtualSizedContainerAddingBeginCount&&(this._virtualSizedContainers.length=0)}addVirtualSizedContainer(t){this._virtualSizedContainers.push(t)}endVirtualSizedContainerAdding(){if(0==--this._virtualSizedContainerAddingBeginCount){const t=this._virtualSizedContainers.length;if(t>0){this.fireBeforeVirtualRectingEvent(t);for(let e=0;ethis.emit(\"windowOpened\",a))),a.on(\"closed\",(()=>this.reconcilePopoutWindows())),this._openPopouts.push(a),this.layoutConfig.settings.closePopoutsOnUnload&&!this._windowBeforeUnloadListening&&(globalThis.addEventListener(\"beforeunload\",this._windowBeforeUnloadListener,{passive:!0}),this._windowBeforeUnloadListening=!0),a}closeAllOpenPopouts(){for(let t=0;tglobalThis.close()),1)}getArea(t,e){let i=null,n=1/0;for(let o=0;o=s.x1&&t=s.y1&&es.surface&&(n=s.surface,i=s)}return i}calculateItemAreas(){const t=this.getAllContentItems(),e=this._groundItem;if(void 0===e)throw new J(\"LMCIAR44365\");if(1!==t.length){e.contentItems[0].isStack?this._itemAreas=[]:this._itemAreas=e.createSideAreas();for(let e=0;e0){let e=t[0];if(Gt.isComponentItem(e)){const t=e.parent;if(null===t)throw new K(\"LMXLLMI69999\");e=t}if(!Gt.isStack(e))throw new X(\"LMCLLMI19993\");e.maximise()}}}processMaximiseStack(t){if(this._maximisedStack=t,t.on(\"beforeItemDestroyed\",this._maximisedStackBeforeDestroyedListener),t.element.classList.add(\"lm_maximised\"),t.element.insertAdjacentElement(\"afterend\",this._maximisePlaceholder),void 0===this._groundItem)throw new J(\"LMMXI19993\");{this._groundItem.element.prepend(t.element);const{width:e,height:i}=kt(this._containerElement);Tt(t.element,e),At(t.element,i),t.updateSize(!0),t.focusActiveContentItem(),this._maximisedStack.emit(\"maximised\"),this.emit(\"stateChanged\")}}processMinimiseMaximisedStack(){if(void 0===this._maximisedStack)throw new X(\"LMMMS74422\");{const t=this._maximisedStack;if(null===t.parent)throw new K(\"LMMI13668\");t.element.classList.remove(\"lm_maximised\"),this._maximisePlaceholder.insertAdjacentElement(\"afterend\",t.element),this._maximisePlaceholder.remove(),this.updateRootSize(!0),this._maximisedStack=void 0,t.off(\"beforeItemDestroyed\",this._maximisedStackBeforeDestroyedListener),t.emit(\"minimised\"),this.emit(\"stateChanged\")}}reconcilePopoutWindows(){const t=[];for(let e=0;e{this._resizeTimeoutId=void 0,this.beginSizeInvalidation(),this.endSizeInvalidation()}),this.resizeDebounceInterval))}checkClearResizeTimeout(){void 0!==this._resizeTimeoutId&&(clearTimeout(this._resizeTimeoutId),this._resizeTimeoutId=void 0)}setContainer(){var t;const e=document.body,i=null!==(t=this._containerElement)&&void 0!==t?t:e;if(i===e){this.resizeWithContainerAutomatically=!0;const t=document.documentElement;t.style.height=\"100%\",t.style.margin=\"0\",t.style.padding=\"0\",t.style.overflow=\"clip\",e.style.height=\"100%\",e.style.margin=\"0\",e.style.padding=\"0\",e.style.overflow=\"clip\"}this._containerElement=i}onBeforeUnload(){this.destroy()}adjustColumnsResponsive(){if(void 0===this._groundItem)throw new J(\"LMACR20883\");if(this._firstLoad=!1,this.useResponsiveLayout()&&!this._updatingColumnsResponsive&&this._groundItem.contentItems.length>0&&this._groundItem.contentItems[0].isRow){if(void 0===this._groundItem||null===this._width)throw new J(\"LMACR77412\");{const t=this._groundItem.contentItems[0].contentItems.length;if(t<=1)return;{const e=this.layoutConfig.dimensions.defaultMinItemWidth;if(t*e<=this._width)return;{this._updatingColumnsResponsive=!0;const i=t-Math.max(Math.floor(this._width/e),1),n=this._groundItem.contentItems[0],o=this.getAllStacks();if(0===o.length)throw new X(\"LMACRS77413\");{const t=o[0];for(let e=0;en?void 0:{parentItem:t,index:o}}}case 1:if(void 0===this._focusedComponentItem)return;{const t=this._focusedComponentItem.parentItem;return this.tryCreateLocationFromParentItem(t,e)}case 2:{const t=this.findFirstContentItemType(at.stack);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 3:{let t=this.findFirstContentItemType(at.row);return void 0!==t?this.tryCreateLocationFromParentItem(t,e):(t=this.findFirstContentItemType(at.column),void 0!==t?this.tryCreateLocationFromParentItem(t,e):void 0)}case 4:{const t=this.findFirstContentItemType(at.row);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 5:{const t=this.findFirstContentItemType(at.column);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 6:if(void 0===this._groundItem)throw new J(\"LMFLRIF18244\");return void 0!==this.rootItem?void 0:void 0===e||0===e?{parentItem:this._groundItem,index:0}:void 0;case 7:if(void 0===this._groundItem)throw new J(\"LMFLF18244\");{const t=this._groundItem.contentItems;if(0===t.length)return void 0===e||0===e?{parentItem:this._groundItem,index:0}:void 0;{const i=t[0];return this.tryCreateLocationFromParentItem(i,e)}}}}tryCreateLocationFromParentItem(t,e){const i=t.contentItems.length;return void 0===e?{parentItem:t,index:i}:e<0||e>i?void 0:{parentItem:t,index:e}}}!function(t){t.createMaximisePlaceElement=function(t){const e=t.createElement(\"div\");return e.classList.add(\"lm_maximise_place\"),e},t.createTabDropPlaceholderElement=function(t){const e=t.createElement(\"div\");return e.classList.add(\"lm_drop_tab_placeholder\"),e},t.defaultLocationSelectors=[{typeId:1,index:void 0},{typeId:2,index:void 0},{typeId:3,index:void 0},{typeId:7,index:void 0}],t.afterFocusedItemIfPossibleLocationSelectors=[{typeId:0,index:1},{typeId:2,index:void 0},{typeId:3,index:void 0},{typeId:7,index:void 0}]}(ae||(ae={}));class le extends ae{constructor(t,e,i,n){if(super(le.createLayoutManagerConstructorParameters(t,e)),this._bindComponentEventHanlderPassedInConstructor=!1,this._creationTimeoutPassed=!1,void 0!==e&&\"function\"==typeof e&&(this.bindComponentEvent=e,this._bindComponentEventHanlderPassedInConstructor=!0,void 0!==i&&(this.unbindComponentEvent=i)),!this._bindComponentEventHanlderPassedInConstructor&&this.isSubWindow){if(void 0===this._constructorOrSubWindowLayoutConfig)throw new J(\"VLC98823\");{const t=xt.resolve(this._constructorOrSubWindowLayoutConfig);this.layoutConfig=Object.assign(Object.assign({},t),{root:void 0})}}!0!==n&&(this.deprecatedConstructor||this.init())}destroy(){this.bindComponentEvent=void 0,this.unbindComponentEvent=void 0,super.destroy()}init(){if(this._bindComponentEventHanlderPassedInConstructor||\"loading\"!==document.readyState&&null!==document.body){if(!this._bindComponentEventHanlderPassedInConstructor&&!0===this.isSubWindow&&!this._creationTimeoutPassed)return setTimeout((()=>this.init()),7),void(this._creationTimeoutPassed=!0);!0===this.isSubWindow&&(this._bindComponentEventHanlderPassedInConstructor||this.clearHtmlAndAdjustStylesForSubWindow(),window.__glInstance=this),super.init()}else document.addEventListener(\"DOMContentLoaded\",(()=>this.init()),{passive:!0})}clearHtmlAndAdjustStylesForSubWindow(){const t=document.head,e=new Array(4);e[0]=document.querySelectorAll(\"body link\"),e[1]=document.querySelectorAll(\"body style\"),e[2]=document.querySelectorAll(\"template\"),e[3]=document.querySelectorAll(\".gl_keep\");for(let i=0;ithis.emit(\"popIn\"))),document.body.appendChild(t),!0}}bindComponent(t,e){if(void 0!==this.bindComponentEvent){return this.bindComponentEvent(t,e)}if(void 0!==this.getComponentEvent)return{virtual:!1,component:this.getComponentEvent(t,e)};{const t=`${tt[2]}: ${JSON.stringify(e)}`;throw new Z(t)}}unbindComponent(t,e,i){if(void 0!==this.unbindComponentEvent)this.unbindComponentEvent(t);else if(!e&&void 0!==this.releaseComponentEvent){if(void 0===i)throw new J(\"VCUCRCU333998\");this.releaseComponentEvent(t,i)}}}!function(t){let e=!1;t.createLayoutManagerConstructorParameters=function(t,i){const n=e?null:new URL(document.location.href).searchParams.get(\"gl-window\");e=!0;const o=null!==n;let s,r;if(null!==n){const e=localStorage.getItem(n);if(null===e)throw new Error(\"Null gl-window Config\");localStorage.removeItem(n);const i=JSON.parse(e),o=_t.unminifyConfig(i);r=xt.fromResolved(o),t instanceof HTMLElement&&(s=t)}else void 0===t?r=void 0:t instanceof HTMLElement?(r=void 0,s=t):r=t,void 0===s&&i instanceof HTMLElement&&(s=i);return{constructorOrSubWindowLayoutConfig:r,isSubWindow:o,containerElement:s}}}(le||(le={}));class he extends le{constructor(t,e,i){super(t,e,i,!0),this._componentTypesMap=new Map,this._registeredComponentMap=new Map,this._virtuableComponentMap=new Map,this._containerVirtualRectingRequiredEventListener=(t,e,i)=>this.handleContainerVirtualRectingRequiredEvent(t,e,i),this._containerVirtualVisibilityChangeRequiredEventListener=(t,e)=>this.handleContainerVirtualVisibilityChangeRequiredEvent(t,e),this._containerVirtualZIndexChangeRequiredEventListener=(t,e,i)=>this.handleContainerVirtualZIndexChangeRequiredEvent(t,e,i),this.deprecatedConstructor||this.init()}registerComponent(t,e,i=!1){if(\"function\"!=typeof e)throw new $(\"registerComponent() componentConstructorOrFactoryFtn parameter is not a function\");if(e.hasOwnProperty(\"prototype\")){const n=e;this.registerComponentConstructor(t,n,i)}else{const n=e;this.registerComponentFactoryFunction(t,n,i)}}registerComponentConstructor(t,e,i=!1){if(\"function\"!=typeof e)throw new Error(tt[1]);if(void 0!==this._componentTypesMap.get(t))throw new Z(`${tt[3]}: ${t}`);this._componentTypesMap.set(t,{constructor:e,factoryFunction:void 0,virtual:i})}registerComponentFactoryFunction(t,e,i=!1){if(\"function\"!=typeof e)throw new Z(\"Please register a constructor function\");if(void 0!==this._componentTypesMap.get(t))throw new Z(`${tt[3]}: ${t}`);this._componentTypesMap.set(t,{constructor:void 0,factoryFunction:e,virtual:i})}registerComponentFunction(t){this.registerGetComponentConstructorCallback(t)}registerGetComponentConstructorCallback(t){if(\"function\"!=typeof t)throw new Error(\"Please register a callback function\");void 0!==this._getComponentConstructorFtn&&console.warn(\"Multiple component functions are being registered. Only the final registered function will be used.\"),this._getComponentConstructorFtn=t}getRegisteredComponentTypeNames(){const t=this._componentTypesMap.keys();return Array.from(t)}getComponentInstantiator(t){let e;const i=pt.resolveComponentTypeName(t);return void 0!==i&&(e=this._componentTypesMap.get(i)),void 0===e&&void 0!==this._getComponentConstructorFtn&&(e={constructor:this._getComponentConstructorFtn(t),factoryFunction:void 0,virtual:!1}),e}bindComponent(t,e){let i;const n=pt.resolveComponentTypeName(e);let o;if(void 0!==n&&(i=this._componentTypesMap.get(n)),void 0===i&&void 0!==this._getComponentConstructorFtn&&(i={constructor:this._getComponentConstructorFtn(e),factoryFunction:void 0,virtual:!1}),void 0!==i){const s=i.virtual;let r,a;r=void 0===e.componentState?void 0:Ut({},e.componentState);const l=i.constructor;if(void 0!==l)a=new l(t,r,s);else{const e=i.factoryFunction;if(void 0===e)throw new X(\"LMBCFFU10008\");a=e(t,r,s)}if(s){if(void 0===a)throw new J(\"GLBCVCU988774\");{const e=a,i=e.rootHtmlElement;if(void 0===i)throw new Z(`${tt[5]}: ${n}`);!function(t){const e=\"absolute\";t.style.position!==e&&(t.style.position=e)}(i),this.container.appendChild(i),this._virtuableComponentMap.set(t,e),t.virtualRectingRequiredEvent=this._containerVirtualRectingRequiredEventListener,t.virtualVisibilityChangeRequiredEvent=this._containerVirtualVisibilityChangeRequiredEventListener,t.virtualZIndexChangeRequiredEvent=this._containerVirtualZIndexChangeRequiredEventListener}}this._registeredComponentMap.set(t,a),o={virtual:i.virtual,component:a}}else o=super.bindComponent(t,e);return o}unbindComponent(t,e,i){if(void 0===this._registeredComponentMap.get(t))super.unbindComponent(t,e,i);else{const e=this._virtuableComponentMap.get(t);if(void 0!==e){const i=e.rootHtmlElement;if(void 0===i)throw new X(\"GLUC77743\",t.title);this.container.removeChild(i),this._virtuableComponentMap.delete(t)}}}fireBeforeVirtualRectingEvent(t){this._goldenLayoutBoundingClientRect=this.container.getBoundingClientRect(),super.fireBeforeVirtualRectingEvent(t)}handleContainerVirtualRectingRequiredEvent(t,e,i){const n=this._virtuableComponentMap.get(t);if(void 0===n)throw new J(\"GLHCSCE55933\");{const o=n.rootHtmlElement;if(void 0===o)throw new Z(tt[4]+\" \"+t.title);{const n=t.element.getBoundingClientRect(),s=n.left-this._goldenLayoutBoundingClientRect.left;o.style.left=zt(s);const r=n.top-this._goldenLayoutBoundingClientRect.top;o.style.top=zt(r),Tt(o,e),At(o,i)}}}handleContainerVirtualVisibilityChangeRequiredEvent(t,e){const i=this._virtuableComponentMap.get(t);if(void 0===i)throw new J(\"GLHCVVCRE55934\");{const n=i.rootHtmlElement;if(void 0===n)throw new Z(tt[4]+\" \"+t.title);Dt(n,e)}}handleContainerVirtualZIndexChangeRequiredEvent(t,e,i){const n=this._virtuableComponentMap.get(t);if(void 0===n)throw new J(\"GLHCVZICRE55935\");{const e=n.rootHtmlElement;if(void 0===e)throw new Z(tt[4]+\" \"+t.title);e.style.zIndex=i}}}const de=\"initial_\",ce={show:\"top\",popout:!1,maximise:!1,close:\"close-tab-unused\"},me={headerHeight:31},ue={hasHeaders:!0,reorderEnabled:!0},pe={popoutWholeStack:!1,constrainDragToContainer:!1,constrainDragToHeaders:!1,preventDragout:!1,showMaximiseIcon:!1,showPopoutIcon:!1,showCloseIcon:!1,blockedPopoutsThrowError:!0,closePopoutsOnUnload:!0,selectionEnabled:!1};var ge,fe;class ve{constructor(e){this.layout=e,ge.set(this,void 0),fe.set(this,void 0),this.handleResize=t=>{t.forEach((t=>this.resizeElement(t.target)))},this.handleMutation=()=>{this.layout.viewComponentsByContainerElement.forEach((t=>{this.resizeElement(t.container.element)}))},t.__classPrivateFieldSet(this,ge,new ResizeObserver(this.handleResize),\"f\"),t.__classPrivateFieldSet(this,fe,new MutationObserver(this.handleMutation),\"f\")}observeMutations(e){t.__classPrivateFieldGet(this,fe,\"f\")?.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[\"class\"]})}destroy(){t.__classPrivateFieldGet(this,ge,\"f\").disconnect(),t.__classPrivateFieldGet(this,fe,\"f\").disconnect()}observeContainer(e){t.__classPrivateFieldGet(this,ge,\"f\").observe(e)}unobserveContainer(e){t.__classPrivateFieldGet(this,ge,\"f\").unobserve(e)}resizeElement(t){const e=this.layout.viewComponentsByContainerElement.get(t);e&&e.resize()}}ge=new WeakMap,fe=new WeakMap;var _e={};Object.defineProperty(_e,\"__esModule\",{value:!0});var ye=_e.BaseItem=void 0;class Ce{constructor(t,e,i){this._item=t,this._layout=e,this._wrap=i}get raw(){return this._item}get layout(){return this._layout}get type(){return this._item.type}get contentItems(){return(this._item.contentItems??[]).map((t=>this._wrap(t)))}get parent(){const t=this._item.parent;return t?this._wrap(t):null}setActiveContentItem(t,e){if(\"stack\"!==this.type)throw new Error(`Cannot call setActiveContentItem from a non-stack item: ${this.type}`);this._item.setActiveContentItem(t.raw,e)}static wrapInternal(t,e,i){const n=Ce.wrapCache.get(e);if(n)return n;const o=new t(e,i,(e=>Ce.wrapInternal(t,e,i)));return Ce.wrapCache.set(e,o),o}}ye=_e.BaseItem=Ce,Ce.wrapCache=new WeakMap;const we=t=>!!t&&\"contentItems\"in t&&(t.isRow||t.isColumn);class Ie extends ye{isRoot(){return!!this._item.parent?.isGround}getBounds(){return this._item.element.getBoundingClientRect()}get viewName(){if(this._item.isComponent){const{component:t}=this._item;return t.identity.name}throw new Error(\"View name not found\")}onDestroyed(t){const e=({target:i})=>{i===this._item&&(t(),this._item.off(\"itemDestroyed\",e))};this._item.on(\"itemDestroyed\",e)}createAdjacentStack({position:t=\"right\"}={}){const e=this.raw;if(ee.isStack(e)&&e.parent){const i=[\"top\",\"bottom\"].includes(t)?\"column\":\"row\",n=[\"left\",\"top\"].includes(t)?1:0,o=we(e.parent)?e.parent:e.layoutManager,s=o,r=e.parent.contentItems.indexOf(e);e.parent.isGround&&e.parent.removeChild(e,!0);const a=o.newItem({type:i,content:[{type:\"stack\",content:[]}]},r);if(!a)throw new Error(\"createAdjacentStack: Failed to create new container\");const l=a.contentItems[0];return a.addChild(this.raw,n),we(s)&&s.removeChild(e,!0),this._wrap(l)}throw new Error(`Cannot creat adjacent stacks for type: ${e.type}, must be type 'stack'`)}setActiveContentItem(t,e=!0){if(!ee.isStack(this._item))throw new Error(`Cannot call setActiveContentItem from a non-stack item: ${this.type}`);this._item.setActiveComponentItem(t.raw,!e)}static wrap(t,e){return ye.wrapInternal(Ie,t,e)}}function be(t=[],e){for(const i of t)\"component\"===i.type?Object.keys(e).forEach((t=>{t in i&&(i.componentState={[`${de}${t}`]:i[t],...i.componentState}),i[t]=e[t]})):be(i.content,e)}function Se(t=[],e,i){for(const n of t)if(\"component\"===n.type)Object.keys(e).forEach((t=>{if(`${de}${t}`in n.componentState)return n[t]=n.componentState[`${de}${t}`],void delete n.componentState[`${de}${t}`];n[t]=e[t]}));else{if(n.size&&(\"row\"===i||\"column\"===i)){n[\"row\"===i?\"width\":\"height\"]=n.size?.includes(\".\")?parseFloat(n.size):parseInt(n.size)}Se(n.content,e,n.type)}}function Ee(t){if(t.root){t.root.content&&Se([t.root],{componentName:\"view\",isClosable:!0});const e=t.root;t.content=[e],delete t.root}return t}const xe=e=>class extends e{connectedCallback(){if(!this.name||!this.uuid)throw new Error(\" Name or uuid attribute missing\");if(!this.src)throw new Error(\" missing 'src' attribute.\");this.#t||(this.#t=document.createElement(\"iframe\"),this.#t.src=this.src,this.#t.style.height=\"100%\",this.#t.style.width=\"100%\",this.#t.style.border=\"none\",this.forceFrameName?this.#t.setAttribute(\"name\",this.forceFrameName):this.#t.setAttribute(\"name\",t.encodeOptions({brokerUrl:this.brokerUrl,name:this.name,uuid:this.uuid,providerId:this.providerId,contextGroup:this.contextGroup},\"of-frame\")),this.#t.setAttribute(\"id\",this.name),this.appendChild(this.#t))}#t;get brokerUrl(){return this.getAttribute(\"of-broker\")}set brokerUrl(t){t&&this.setAttribute(\"of-broker\",t)}get name(){return this.getAttribute(\"of-name\")}set name(t){t&&this.setAttribute(\"of-name\",t)}get forceFrameName(){return this.getAttribute(\"forceFrameName\")}set forceFrameName(t){t&&this.setAttribute(\"forceFrameName\",t)}get uuid(){return this.getAttribute(\"of-uuid\")}set uuid(t){t&&this.setAttribute(\"of-uuid\",t)}get src(){return this.getAttribute(\"src\")}set src(t){t&&this.setAttribute(\"src\",t)}get providerId(){return this.getAttribute(\"of-provider-id\")}set providerId(t){t&&this.setAttribute(\"of-provider-id\",t)}get contextGroup(){return this.getAttribute(\"of-context-group\")}set contextGroup(t){t&&this.setAttribute(\"of-context-group\",t)}static get observedAttributes(){return[\"name\"]}};class Le{static create(t){const e=document.createElement(\"of-view\");return Object.entries(t).forEach((([t,i])=>{e.setAttribute(t,i)})),e}}customElements.define(\"of-view\",xe(HTMLElement));class ze{constructor(t,i,n,{brokerUrl:o,interopConfig:s},r){this.container=t,this.config=i,this.ofView=null,this.isDragging=()=>this.container.tab.element?.className.includes(\"lm_dragging\")??!1;const{url:a,web:l,interop:h,name:d}=i||{},c=d??`internal-generated-view-${e.v4()}`;if(this.identity={uuid:n,name:c},this.container.element.setAttribute(\"of-name\",c),this.container.element.id=`container-${c}`,this.container.parent.id=c,void 0===a)return void this.handleUrlMissing();const m=this.updateTitleIfNotSet(a),u={\"of-broker\":o,\"of-uuid\":n,\"of-name\":c,src:a};l?.frameName&&(u.forceFrameName=l.frameName);const p=h?.currentContextGroup??s?.currentContextGroup;p&&(u[\"of-context-group\"]=p),s?.providerId&&(u[\"of-provider-id\"]=s?.providerId),this.ofView=Le.create(u),this.ofView.title=m??`Iframe: ${a}`,r.appendChild(this.ofView),this.ofView.style.position=\"absolute\"}updateTitleIfNotSet(t){return\"view\"===this.container.parent.title&&this.container.parent.setTitle(t),this.container.parent.title}handleUrlMissing(){const t=document.createElement(\"div\");t.setAttribute(\"style\",\"padding: 20px\");t.innerText=\"No URL provided\",this.container.element.appendChild(t)}destroy(){this.ofView?.remove(),this.ofView=null}closeView(){this.container.close()}resize(){if(this.ofView){if(this.isDragging())return void(this.ofView.style.display=\"none\");const t=this.container.element.getBoundingClientRect();this.ofView.style.position=\"absolute\",this.ofView.style.height=`${t.height}px`,this.ofView.style.width=`${t.width}px`,this.ofView.style.inset=`${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`,this.ofView.style.display=\"block\"}}}class Me extends U{static overrideConfig(t){const e={...ue,...t.settings,...pe};return e.reorderEnabled?be(t.content,{isClosable:!0}):be(t.content,{reorderEnabled:!1}),{dimensions:me,...t,settings:e,header:{...ce,show:!1!==t.settings?.hasHeaders&&ce.show}}}constructor(t,e,i,{options:n},o,s){super(),this.identity=t,this.container=e,this.initialConfig=i,this.layoutManager=o,this.platformProvider=s,this.viewComponentsByContainerElement=new Map,this.layoutContentCache=_.getSingleInstance(),this.reparentingViews=new Set,this.goldenLayoutDestroyed=!1,this.createViewComponent=(t,e)=>{m.handleSharedView(this.layoutManager,this.identity,e);const i=new ze(t,e,this.identity.uuid,this.options,this.iframeContainer);return e&&!1===e[`${de}isClosable`]&&this.stylesheet.insertRule(`#tab-${i.identity.name} .lm_close_tab { display: none; }`),this.viewComponentsByContainerElement.set(t.element,i),this.resizeController.observeContainer(t.element),i},this.iframeContainer=document.createElement(\"div\"),this.iframeContainer.id=`openfin-layout-iframe-container-${this.identity.layoutName}`,this.domEmitter=new V(e),this.setupStylesheets(),this.layout=new he(this.container),this.layout.resizeWithContainerAutomatically=!0,this.options=n,this.layout.registerComponent(\"view\",this.createViewComponent),this.setupListeners(),this.resizeController=new ve(this),this.layout.loadLayout(Me.overrideConfig(i));const r=document.createElement(\"div\");r.id=`openfin-layout-shadow-container-${this.identity.layoutName}`,r.attachShadow({mode:\"open\",delegatesFocus:!1}).appendChild(this.iframeContainer),this.container.appendChild(r),this.resizeController.observeMutations(this.container)}getStackByView({name:t}){const e=this.layout.findFirstComponentItemById(t);if(e?.parent&&e?.parent?.isStack)return Ie.wrap(e.parent,this)}getRoot(){return Ie.wrap(this.layout.rootItem,this)}async platformCloseView(t){const e=[...this.viewComponentsByContainerElement.values()].find((e=>e.identity.name===t.name));if(!e)throw new Error(`View with name: ${t.name} not found in layout.`);e.closeView()}async platformCreateView(t,{location:e,targetView:i}={}){if(i)throw new Error(\"TargetView not supported in web\");const n={options:this.platformProvider.normalizeOptions(t),target:this.identity,location:e};return this.insertView(n)}setupStylesheets(){if(this.container.setAttribute(\"data-openfin-layout-name\",this.identity.layoutName),this.stylesheet=new CSSStyleSheet,this.stylesheet.insertRule(\".lm_close { display: none; }\"),document.adoptedStyleSheets.push(this.stylesheet),this.initialConfig.settings?.preventSplitterResize){const t=`\\n [data-openfin-layout-name='${this.identity.layoutName}'] .lm_splitter {\\n pointer-events: none;\\n }`;this.stylesheet.insertRule(t)}}insertView({options:t,location:e,targetView:i}){const n=e?this.layoutContentCache.getItemOrUndefined(e.id):void 0,o=i?this.layoutContentCache.getItemOrUndefined(i.name):void 0,s=n??o??Ie.wrap(this.layout.rootItem,this);let r;if(ee.isStack(s.raw))r=s.raw;else{if(!we(s.raw))throw new Error(\"Cannot add a view at the requested location\");r=s.raw.newItem({type:\"stack\",content:[]})}const a=Math.min(r.contentItems.length,e?.index??r.contentItems.length);let l=this.layout.findFirstComponentItemById(t.name);l?(l.parent&&l.parent.removeChild(l,!0),r.addChild(l,a)):l=r.newComponent(\"view\",t,t.title??t.url??\"Default Title\",a);const h=l.component.identity;return Promise.resolve({identity:h})}replaceView({viewToReplace:t,newView:e}){throw new Error(\"Method not implemented.\")}replaceLayout(t){throw new Error(\"Method not implemented.\")}async cleanupView(t){}applyPreset(t){throw new Error(\"Method not implemented.\")}getCurrentViews(){return[...this.viewComponentsByContainerElement.values()].map((t=>t.identity))}async getFrameSnapshot(){return Ee(xt.fromResolved(this.layout.toConfig()))}isVisible(){return W(this.container)}async onViewDetached({viewIdentity:t}){this.reparentingViews.add(t.name),this.platformCloseView(t)}async destroy(){this.goldenLayoutDestroyed||(this.goldenLayoutDestroyed=!0,this.layout.destroy()),this.iframeContainer.remove(),this.resizeController.destroy(),document.adoptedStyleSheets=document.adoptedStyleSheets.filter((t=>t!==this.stylesheet)),this.viewComponentsByContainerElement.clear()}setupListeners(){this.container.addEventListener(\"pointerdown\",(t=>{if(t.target instanceof HTMLElement){const e=t.target.classList;[\"lm_tab\",\"lm_title\",\"lm_splitter\",\"lm_drag_handle\"].some((t=>e.contains(t)))&&(this.handleDragStart(),2===t.button&&t.stopPropagation())}}),!0),document.addEventListener(\"pointerup\",(()=>this.handleDragEnd()),!0),this.layout.on(\"tabCreated\",(t=>{const e=t.componentItem.component;t.element.id=`tab-${e.identity.name}`,this.domEmitter.dispatchLocalEvent(\"tab-created\",e.identity)})),this.layout.on(\"itemCreated\",(({target:t})=>{const e=t;if(Gt.isComponentItem(e)){const t=e.component;this.domEmitter.dispatchLocalEvent(\"container-created\",t.identity)}})),this.layout.on(\"itemDestroyed\",(t=>{const e=t.target;if(Gt.isComponentItem(e)){const t=e.component;this.removeViewComponent(t)}})),this.layout.on(\"itemDropped\",(()=>{this.handleDragEnd()}))}handleDragStart(){this.iframeContainer.style.pointerEvents=\"none\"}handleDragEnd(){this.iframeContainer.style.pointerEvents=\"\"}removeViewComponent(t){if(t.config&&!1===t.config[`${de}isClosable`]){const e=[...this.stylesheet.cssRules].findIndex((e=>e.cssText.includes(`#tab-${t.identity.name}`)));this.stylesheet.deleteRule(e)}t.destroy(),this.viewComponentsByContainerElement.delete(t.container.element),this.resizeController.unobserveContainer(t.container.element),this.reparentingViews.has(t.identity.name)?this.reparentingViews.delete(t.identity.name):this.platformProvider.closeView(t.identity.name);0===this.getCurrentViews().length&&(this.goldenLayoutDestroyed||(this.goldenLayoutDestroyed=!0,m.handleLastViewRemoved(this.layoutManager,this.identity)))}}class Pe{constructor(t,e,i,n){this.windowIdentity=t,this.connectConfig=e,this.provider=i,this.fallbackContainer=n}async createLayout(t,e){if(!(\"container\"in t)&&!this.fallbackContainer)throw new Error(\"Container property is not optional in web\");const{layoutName:i}=t,n=t,o=this.provider.initLayoutViews(n),s=n.container??this.fallbackContainer,r={...this.windowIdentity,layoutName:i},a=new Me(r,s,o,this.connectConfig,e,this.provider);m.registerLayout(e,i,a),this.fallbackContainer=null}async getLayoutSnapshot(t){return t.getLayoutSnapshot()}async handleLastViewRemoved(t){}}class Te{static async init(e){const i=e.getFin().InterApplicationBus.Channel,n=await i.create(`custom-frame-${e.me.uuid}`);return n.setDefaultAction((async(t,{target:e,opts:i},o)=>{const s=n.connections.find((t=>t.name===e.name));if(s)return n.dispatch(s,t,{...i,target:e});throw new Error(`Client with name ${e.name} not found`)})),await t.relayChannelClientApi_1(n,\"layout-relay\"),new Te(e)}constructor(t){this.wire=t,this.viewNames=new Set}normalizeOptions(t,i=\"default\"){const n=this.wire.me.uuid;let{name:o=`internal-generated-view-${e.v4()}`}=t;return o.match(/^internal-generated-view-/)&&this.viewNames.has(o)&&\"duplicate\"===i&&(o=`internal-generated-view-${e.v4()}`),this.viewNames.add(o),{...t,name:o,uuid:n}}closeView(t){this.viewNames.delete(t)}initLayoutViews({layout:t,multiInstanceViewBehavior:e}){return H((t=>{if(\"component\"===t.type&&t.componentState){const i=this.normalizeOptions(t.componentState,e);return{...t,componentState:i}}return t}),t)}}var Ae;const ke=t=>t;Ae=new WeakMap,exports.WebLayoutEntryPoint=class{constructor(e){Ae.set(this,void 0),this.initLayoutManager=async(e,i,{container:n,layoutManagerOverride:o})=>{const s=await Te.init(i),r=o??ke,a=new Pe(i.me,t.__classPrivateFieldGet(this,Ae,\"f\"),s,n),l=new(r(m.createClosedConstructor(a)));return await M(i,l),l},this.applyLayoutSnapshot=async(e,i,n)=>{await i.applyLayoutSnapshot(t.__classPrivateFieldGet(this,Ae,\"f\").platform.layoutSnapshot)},this.createLayout=async(t,e)=>m.createLayout(t,e),this.destroyLayout=async(t,e)=>m.destroyLayout(t,e),t.__classPrivateFieldSet(this,Ae,e,\"f\")}};\n","'use strict'\n\nexports.byteLength = byteLength\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\nfor (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i]\n revLookup[code.charCodeAt(i)] = i\n}\n\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction getLens (b64) {\n var len = b64.length\n\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // Trim off extra bytes after placeholder bytes are found\n // See: https://github.com/beatgammit/base64-js/issues/42\n var validLen = b64.indexOf('=')\n if (validLen === -1) validLen = len\n\n var placeHoldersLen = validLen === len\n ? 0\n : 4 - (validLen % 4)\n\n return [validLen, placeHoldersLen]\n}\n\n// base64 is 4/3 + up to two characters of the original data\nfunction byteLength (b64) {\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction _byteLength (b64, validLen, placeHoldersLen) {\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction toByteArray (b64) {\n var tmp\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n\n var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))\n\n var curByte = 0\n\n // if there are placeholders, only get up to the last complete 4 chars\n var len = placeHoldersLen > 0\n ? validLen - 4\n : validLen\n\n var i\n for (i = 0; i < len; i += 4) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 18) |\n (revLookup[b64.charCodeAt(i + 1)] << 12) |\n (revLookup[b64.charCodeAt(i + 2)] << 6) |\n revLookup[b64.charCodeAt(i + 3)]\n arr[curByte++] = (tmp >> 16) & 0xFF\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 2) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 2) |\n (revLookup[b64.charCodeAt(i + 1)] >> 4)\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 1) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 10) |\n (revLookup[b64.charCodeAt(i + 1)] << 4) |\n (revLookup[b64.charCodeAt(i + 2)] >> 2)\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] +\n lookup[num >> 12 & 0x3F] +\n lookup[num >> 6 & 0x3F] +\n lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n var tmp\n var output = []\n for (var i = start; i < end; i += 3) {\n tmp =\n ((uint8[i] << 16) & 0xFF0000) +\n ((uint8[i + 1] << 8) & 0xFF00) +\n (uint8[i + 2] & 0xFF)\n output.push(tripletToBase64(tmp))\n }\n return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n var tmp\n var len = uint8.length\n var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n var parts = []\n var maxChunkLength = 16383 // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1]\n parts.push(\n lookup[tmp >> 2] +\n lookup[(tmp << 4) & 0x3F] +\n '=='\n )\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + uint8[len - 1]\n parts.push(\n lookup[tmp >> 10] +\n lookup[(tmp >> 4) & 0x3F] +\n lookup[(tmp << 2) & 0x3F] +\n '='\n )\n }\n\n return parts.join('')\n}\n","/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n/* eslint-disable no-proto */\n\n'use strict'\n\nconst base64 = require('base64-js')\nconst ieee754 = require('ieee754')\nconst customInspectSymbol =\n (typeof Symbol === 'function' && typeof Symbol['for'] === 'function') // eslint-disable-line dot-notation\n ? Symbol['for']('nodejs.util.inspect.custom') // eslint-disable-line dot-notation\n : null\n\nexports.Buffer = Buffer\nexports.SlowBuffer = SlowBuffer\nexports.INSPECT_MAX_BYTES = 50\n\nconst K_MAX_LENGTH = 0x7fffffff\nexports.kMaxLength = K_MAX_LENGTH\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Print warning and recommend using `buffer` v4.x which has an Object\n * implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * We report that the browser does not support typed arrays if the are not subclassable\n * using __proto__. Firefox 4-29 lacks support for adding new properties to `Uint8Array`\n * (See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438). IE 10 lacks support\n * for __proto__ and has a buggy typed array implementation.\n */\nBuffer.TYPED_ARRAY_SUPPORT = typedArraySupport()\n\nif (!Buffer.TYPED_ARRAY_SUPPORT && typeof console !== 'undefined' &&\n typeof console.error === 'function') {\n console.error(\n 'This browser lacks typed array (Uint8Array) support which is required by ' +\n '`buffer` v5.x. Use `buffer` v4.x if you require old browser support.'\n )\n}\n\nfunction typedArraySupport () {\n // Can typed array instances can be augmented?\n try {\n const arr = new Uint8Array(1)\n const proto = { foo: function () { return 42 } }\n Object.setPrototypeOf(proto, Uint8Array.prototype)\n Object.setPrototypeOf(arr, proto)\n return arr.foo() === 42\n } catch (e) {\n return false\n }\n}\n\nObject.defineProperty(Buffer.prototype, 'parent', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.buffer\n }\n})\n\nObject.defineProperty(Buffer.prototype, 'offset', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.byteOffset\n }\n})\n\nfunction createBuffer (length) {\n if (length > K_MAX_LENGTH) {\n throw new RangeError('The value \"' + length + '\" is invalid for option \"size\"')\n }\n // Return an augmented `Uint8Array` instance\n const buf = new Uint8Array(length)\n Object.setPrototypeOf(buf, Buffer.prototype)\n return buf\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new TypeError(\n 'The \"string\" argument must be of type string. Received type number'\n )\n }\n return allocUnsafe(arg)\n }\n return from(arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\nfunction from (value, encodingOrOffset, length) {\n if (typeof value === 'string') {\n return fromString(value, encodingOrOffset)\n }\n\n if (ArrayBuffer.isView(value)) {\n return fromArrayView(value)\n }\n\n if (value == null) {\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n }\n\n if (isInstance(value, ArrayBuffer) ||\n (value && isInstance(value.buffer, ArrayBuffer))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof SharedArrayBuffer !== 'undefined' &&\n (isInstance(value, SharedArrayBuffer) ||\n (value && isInstance(value.buffer, SharedArrayBuffer)))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof value === 'number') {\n throw new TypeError(\n 'The \"value\" argument must not be of type number. Received type number'\n )\n }\n\n const valueOf = value.valueOf && value.valueOf()\n if (valueOf != null && valueOf !== value) {\n return Buffer.from(valueOf, encodingOrOffset, length)\n }\n\n const b = fromObject(value)\n if (b) return b\n\n if (typeof Symbol !== 'undefined' && Symbol.toPrimitive != null &&\n typeof value[Symbol.toPrimitive] === 'function') {\n return Buffer.from(value[Symbol.toPrimitive]('string'), encodingOrOffset, length)\n }\n\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n return from(value, encodingOrOffset, length)\n}\n\n// Note: Change prototype *after* Buffer.from is defined to workaround Chrome bug:\n// https://github.com/feross/buffer/pull/148\nObject.setPrototypeOf(Buffer.prototype, Uint8Array.prototype)\nObject.setPrototypeOf(Buffer, Uint8Array)\n\nfunction assertSize (size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be of type number')\n } else if (size < 0) {\n throw new RangeError('The value \"' + size + '\" is invalid for option \"size\"')\n }\n}\n\nfunction alloc (size, fill, encoding) {\n assertSize(size)\n if (size <= 0) {\n return createBuffer(size)\n }\n if (fill !== undefined) {\n // Only pay attention to encoding if it's a string. This\n // prevents accidentally sending in a number that would\n // be interpreted as a start offset.\n return typeof encoding === 'string'\n ? createBuffer(size).fill(fill, encoding)\n : createBuffer(size).fill(fill)\n }\n return createBuffer(size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n return alloc(size, fill, encoding)\n}\n\nfunction allocUnsafe (size) {\n assertSize(size)\n return createBuffer(size < 0 ? 0 : checked(size) | 0)\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n return allocUnsafe(size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n return allocUnsafe(size)\n}\n\nfunction fromString (string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8'\n }\n\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n\n const length = byteLength(string, encoding) | 0\n let buf = createBuffer(length)\n\n const actual = buf.write(string, encoding)\n\n if (actual !== length) {\n // Writing a hex string, for example, that contains invalid characters will\n // cause everything after the first invalid character to be ignored. (e.g.\n // 'abxxcd' will be treated as 'ab')\n buf = buf.slice(0, actual)\n }\n\n return buf\n}\n\nfunction fromArrayLike (array) {\n const length = array.length < 0 ? 0 : checked(array.length) | 0\n const buf = createBuffer(length)\n for (let i = 0; i < length; i += 1) {\n buf[i] = array[i] & 255\n }\n return buf\n}\n\nfunction fromArrayView (arrayView) {\n if (isInstance(arrayView, Uint8Array)) {\n const copy = new Uint8Array(arrayView)\n return fromArrayBuffer(copy.buffer, copy.byteOffset, copy.byteLength)\n }\n return fromArrayLike(arrayView)\n}\n\nfunction fromArrayBuffer (array, byteOffset, length) {\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\"offset\" is outside of buffer bounds')\n }\n\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\"length\" is outside of buffer bounds')\n }\n\n let buf\n if (byteOffset === undefined && length === undefined) {\n buf = new Uint8Array(array)\n } else if (length === undefined) {\n buf = new Uint8Array(array, byteOffset)\n } else {\n buf = new Uint8Array(array, byteOffset, length)\n }\n\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(buf, Buffer.prototype)\n\n return buf\n}\n\nfunction fromObject (obj) {\n if (Buffer.isBuffer(obj)) {\n const len = checked(obj.length) | 0\n const buf = createBuffer(len)\n\n if (buf.length === 0) {\n return buf\n }\n\n obj.copy(buf, 0, 0, len)\n return buf\n }\n\n if (obj.length !== undefined) {\n if (typeof obj.length !== 'number' || numberIsNaN(obj.length)) {\n return createBuffer(0)\n }\n return fromArrayLike(obj)\n }\n\n if (obj.type === 'Buffer' && Array.isArray(obj.data)) {\n return fromArrayLike(obj.data)\n }\n}\n\nfunction checked (length) {\n // Note: cannot use `length < K_MAX_LENGTH` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= K_MAX_LENGTH) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + K_MAX_LENGTH.toString(16) + ' bytes')\n }\n return length | 0\n}\n\nfunction SlowBuffer (length) {\n if (+length != length) { // eslint-disable-line eqeqeq\n length = 0\n }\n return Buffer.alloc(+length)\n}\n\nBuffer.isBuffer = function isBuffer (b) {\n return b != null && b._isBuffer === true &&\n b !== Buffer.prototype // so Buffer.isBuffer(Buffer.prototype) will be false\n}\n\nBuffer.compare = function compare (a, b) {\n if (isInstance(a, Uint8Array)) a = Buffer.from(a, a.offset, a.byteLength)\n if (isInstance(b, Uint8Array)) b = Buffer.from(b, b.offset, b.byteLength)\n if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n throw new TypeError(\n 'The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array'\n )\n }\n\n if (a === b) return 0\n\n let x = a.length\n let y = b.length\n\n for (let i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i]\n y = b[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n switch (String(encoding).toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'latin1':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return true\n default:\n return false\n }\n}\n\nBuffer.concat = function concat (list, length) {\n if (!Array.isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n\n if (list.length === 0) {\n return Buffer.alloc(0)\n }\n\n let i\n if (length === undefined) {\n length = 0\n for (i = 0; i < list.length; ++i) {\n length += list[i].length\n }\n }\n\n const buffer = Buffer.allocUnsafe(length)\n let pos = 0\n for (i = 0; i < list.length; ++i) {\n let buf = list[i]\n if (isInstance(buf, Uint8Array)) {\n if (pos + buf.length > buffer.length) {\n if (!Buffer.isBuffer(buf)) buf = Buffer.from(buf)\n buf.copy(buffer, pos)\n } else {\n Uint8Array.prototype.set.call(\n buffer,\n buf,\n pos\n )\n }\n } else if (!Buffer.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n } else {\n buf.copy(buffer, pos)\n }\n pos += buf.length\n }\n return buffer\n}\n\nfunction byteLength (string, encoding) {\n if (Buffer.isBuffer(string)) {\n return string.length\n }\n if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) {\n return string.byteLength\n }\n if (typeof string !== 'string') {\n throw new TypeError(\n 'The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. ' +\n 'Received type ' + typeof string\n )\n }\n\n const len = string.length\n const mustMatch = (arguments.length > 2 && arguments[2] === true)\n if (!mustMatch && len === 0) return 0\n\n // Use a for loop to avoid recursion\n let loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'ascii':\n case 'latin1':\n case 'binary':\n return len\n case 'utf8':\n case 'utf-8':\n return utf8ToBytes(string).length\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return len * 2\n case 'hex':\n return len >>> 1\n case 'base64':\n return base64ToBytes(string).length\n default:\n if (loweredCase) {\n return mustMatch ? -1 : utf8ToBytes(string).length // assume utf8\n }\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n let loweredCase = false\n\n // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n // property of a typed array.\n\n // This behaves neither like String nor Uint8Array in that we set start/end\n // to their upper/lower bounds if the value passed is out of range.\n // undefined is handled specially as per ECMA-262 6th Edition,\n // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n if (start === undefined || start < 0) {\n start = 0\n }\n // Return early if start > this.length. Done here to prevent potential uint32\n // coercion fail below.\n if (start > this.length) {\n return ''\n }\n\n if (end === undefined || end > this.length) {\n end = this.length\n }\n\n if (end <= 0) {\n return ''\n }\n\n // Force coercion to uint32. This will also coerce falsey/NaN values to 0.\n end >>>= 0\n start >>>= 0\n\n if (end <= start) {\n return ''\n }\n\n if (!encoding) encoding = 'utf8'\n\n while (true) {\n switch (encoding) {\n case 'hex':\n return hexSlice(this, start, end)\n\n case 'utf8':\n case 'utf-8':\n return utf8Slice(this, start, end)\n\n case 'ascii':\n return asciiSlice(this, start, end)\n\n case 'latin1':\n case 'binary':\n return latin1Slice(this, start, end)\n\n case 'base64':\n return base64Slice(this, start, end)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return utf16leSlice(this, start, end)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = (encoding + '').toLowerCase()\n loweredCase = true\n }\n }\n}\n\n// This property is used by `Buffer.isBuffer` (and the `is-buffer` npm package)\n// to detect a Buffer instance. It's not possible to use `instanceof Buffer`\n// reliably in a browserify context because there could be multiple different\n// copies of the 'buffer' package in use. This method works even for Buffer\n// instances that were created from another copy of the `buffer` package.\n// See: https://github.com/feross/buffer/issues/154\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n const i = b[n]\n b[n] = b[m]\n b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n const len = this.length\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits')\n }\n for (let i = 0; i < len; i += 2) {\n swap(this, i, i + 1)\n }\n return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n const len = this.length\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits')\n }\n for (let i = 0; i < len; i += 4) {\n swap(this, i, i + 3)\n swap(this, i + 1, i + 2)\n }\n return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n const len = this.length\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits')\n }\n for (let i = 0; i < len; i += 8) {\n swap(this, i, i + 7)\n swap(this, i + 1, i + 6)\n swap(this, i + 2, i + 5)\n swap(this, i + 3, i + 4)\n }\n return this\n}\n\nBuffer.prototype.toString = function toString () {\n const length = this.length\n if (length === 0) return ''\n if (arguments.length === 0) return utf8Slice(this, 0, length)\n return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.toLocaleString = Buffer.prototype.toString\n\nBuffer.prototype.equals = function equals (b) {\n if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n if (this === b) return true\n return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n let str = ''\n const max = exports.INSPECT_MAX_BYTES\n str = this.toString('hex', 0, max).replace(/(.{2})/g, '$1 ').trim()\n if (this.length > max) str += ' ... '\n return ''\n}\nif (customInspectSymbol) {\n Buffer.prototype[customInspectSymbol] = Buffer.prototype.inspect\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n if (isInstance(target, Uint8Array)) {\n target = Buffer.from(target, target.offset, target.byteLength)\n }\n if (!Buffer.isBuffer(target)) {\n throw new TypeError(\n 'The \"target\" argument must be one of type Buffer or Uint8Array. ' +\n 'Received type ' + (typeof target)\n )\n }\n\n if (start === undefined) {\n start = 0\n }\n if (end === undefined) {\n end = target ? target.length : 0\n }\n if (thisStart === undefined) {\n thisStart = 0\n }\n if (thisEnd === undefined) {\n thisEnd = this.length\n }\n\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError('out of range index')\n }\n\n if (thisStart >= thisEnd && start >= end) {\n return 0\n }\n if (thisStart >= thisEnd) {\n return -1\n }\n if (start >= end) {\n return 1\n }\n\n start >>>= 0\n end >>>= 0\n thisStart >>>= 0\n thisEnd >>>= 0\n\n if (this === target) return 0\n\n let x = thisEnd - thisStart\n let y = end - start\n const len = Math.min(x, y)\n\n const thisCopy = this.slice(thisStart, thisEnd)\n const targetCopy = target.slice(start, end)\n\n for (let i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i]\n y = targetCopy[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (numberIsNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [val], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n let indexSize = 1\n let arrLength = arr.length\n let valLength = val.length\n\n if (encoding !== undefined) {\n encoding = String(encoding).toLowerCase()\n if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n encoding === 'utf16le' || encoding === 'utf-16le') {\n if (arr.length < 2 || val.length < 2) {\n return -1\n }\n indexSize = 2\n arrLength /= 2\n valLength /= 2\n byteOffset /= 2\n }\n }\n\n function read (buf, i) {\n if (indexSize === 1) {\n return buf[i]\n } else {\n return buf.readUInt16BE(i * indexSize)\n }\n }\n\n let i\n if (dir) {\n let foundIndex = -1\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1) foundIndex = i\n if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n } else {\n if (foundIndex !== -1) i -= i - foundIndex\n foundIndex = -1\n }\n }\n } else {\n if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n for (i = byteOffset; i >= 0; i--) {\n let found = true\n for (let j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false\n break\n }\n }\n if (found) return i\n }\n }\n\n return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n offset = Number(offset) || 0\n const remaining = buf.length - offset\n if (!length) {\n length = remaining\n } else {\n length = Number(length)\n if (length > remaining) {\n length = remaining\n }\n }\n\n const strLen = string.length\n\n if (length > strLen / 2) {\n length = strLen / 2\n }\n let i\n for (i = 0; i < length; ++i) {\n const parsed = parseInt(string.substr(i * 2, 2), 16)\n if (numberIsNaN(parsed)) return i\n buf[offset + i] = parsed\n }\n return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n // Buffer#write(string)\n if (offset === undefined) {\n encoding = 'utf8'\n length = this.length\n offset = 0\n // Buffer#write(string, encoding)\n } else if (length === undefined && typeof offset === 'string') {\n encoding = offset\n length = this.length\n offset = 0\n // Buffer#write(string, offset[, length][, encoding])\n } else if (isFinite(offset)) {\n offset = offset >>> 0\n if (isFinite(length)) {\n length = length >>> 0\n if (encoding === undefined) encoding = 'utf8'\n } else {\n encoding = length\n length = undefined\n }\n } else {\n throw new Error(\n 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n )\n }\n\n const remaining = this.length - offset\n if (length === undefined || length > remaining) length = remaining\n\n if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n throw new RangeError('Attempt to write outside buffer bounds')\n }\n\n if (!encoding) encoding = 'utf8'\n\n let loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'hex':\n return hexWrite(this, string, offset, length)\n\n case 'utf8':\n case 'utf-8':\n return utf8Write(this, string, offset, length)\n\n case 'ascii':\n case 'latin1':\n case 'binary':\n return asciiWrite(this, string, offset, length)\n\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return base64Write(this, string, offset, length)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return ucs2Write(this, string, offset, length)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0)\n }\n}\n\nfunction base64Slice (buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf)\n } else {\n return base64.fromByteArray(buf.slice(start, end))\n }\n}\n\nfunction utf8Slice (buf, start, end) {\n end = Math.min(buf.length, end)\n const res = []\n\n let i = start\n while (i < end) {\n const firstByte = buf[i]\n let codePoint = null\n let bytesPerSequence = (firstByte > 0xEF)\n ? 4\n : (firstByte > 0xDF)\n ? 3\n : (firstByte > 0xBF)\n ? 2\n : 1\n\n if (i + bytesPerSequence <= end) {\n let secondByte, thirdByte, fourthByte, tempCodePoint\n\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 0x80) {\n codePoint = firstByte\n }\n break\n case 2:\n secondByte = buf[i + 1]\n if ((secondByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n if (tempCodePoint > 0x7F) {\n codePoint = tempCodePoint\n }\n }\n break\n case 3:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n codePoint = tempCodePoint\n }\n }\n break\n case 4:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n fourthByte = buf[i + 3]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n codePoint = tempCodePoint\n }\n }\n }\n }\n\n if (codePoint === null) {\n // we did not generate a valid codePoint so insert a\n // replacement char (U+FFFD) and advance only 1 byte\n codePoint = 0xFFFD\n bytesPerSequence = 1\n } else if (codePoint > 0xFFFF) {\n // encode to utf16 (surrogate pair dance)\n codePoint -= 0x10000\n res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n codePoint = 0xDC00 | codePoint & 0x3FF\n }\n\n res.push(codePoint)\n i += bytesPerSequence\n }\n\n return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nconst MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n const len = codePoints.length\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n }\n\n // Decode in chunks to avoid \"call stack size exceeded\".\n let res = ''\n let i = 0\n while (i < len) {\n res += String.fromCharCode.apply(\n String,\n codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n )\n }\n return res\n}\n\nfunction asciiSlice (buf, start, end) {\n let ret = ''\n end = Math.min(buf.length, end)\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F)\n }\n return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n let ret = ''\n end = Math.min(buf.length, end)\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i])\n }\n return ret\n}\n\nfunction hexSlice (buf, start, end) {\n const len = buf.length\n\n if (!start || start < 0) start = 0\n if (!end || end < 0 || end > len) end = len\n\n let out = ''\n for (let i = start; i < end; ++i) {\n out += hexSliceLookupTable[buf[i]]\n }\n return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n const bytes = buf.slice(start, end)\n let res = ''\n // If bytes.length is odd, the last 8 bits must be ignored (same as node.js)\n for (let i = 0; i < bytes.length - 1; i += 2) {\n res += String.fromCharCode(bytes[i] + (bytes[i + 1] * 256))\n }\n return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n const len = this.length\n start = ~~start\n end = end === undefined ? len : ~~end\n\n if (start < 0) {\n start += len\n if (start < 0) start = 0\n } else if (start > len) {\n start = len\n }\n\n if (end < 0) {\n end += len\n if (end < 0) end = 0\n } else if (end > len) {\n end = len\n }\n\n if (end < start) end = start\n\n const newBuf = this.subarray(start, end)\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(newBuf, Buffer.prototype)\n\n return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUintLE =\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let val = this[offset]\n let mul = 1\n let i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUintBE =\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n checkOffset(offset, byteLength, this.length)\n }\n\n let val = this[offset + --byteLength]\n let mul = 1\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUint8 =\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n return this[offset]\n}\n\nBuffer.prototype.readUint16LE =\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUint16BE =\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUint32LE =\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return ((this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16)) +\n (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUint32BE =\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] * 0x1000000) +\n ((this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n this[offset + 3])\n}\n\nBuffer.prototype.readBigUInt64LE = defineBigIntMethod(function readBigUInt64LE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const lo = first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24\n\n const hi = this[++offset] +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n last * 2 ** 24\n\n return BigInt(lo) + (BigInt(hi) << BigInt(32))\n})\n\nBuffer.prototype.readBigUInt64BE = defineBigIntMethod(function readBigUInt64BE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const hi = first * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset]\n\n const lo = this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last\n\n return (BigInt(hi) << BigInt(32)) + BigInt(lo)\n})\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let val = this[offset]\n let mul = 1\n let i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let i = byteLength\n let mul = 1\n let val = this[offset + --i]\n while (i > 0 && (mul *= 0x100)) {\n val += this[offset + --i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n if (!(this[offset] & 0x80)) return (this[offset])\n return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n const val = this[offset] | (this[offset + 1] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n const val = this[offset + 1] | (this[offset] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16) |\n (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] << 24) |\n (this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n (this[offset + 3])\n}\n\nBuffer.prototype.readBigInt64LE = defineBigIntMethod(function readBigInt64LE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const val = this[offset + 4] +\n this[offset + 5] * 2 ** 8 +\n this[offset + 6] * 2 ** 16 +\n (last << 24) // Overflow\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24)\n})\n\nBuffer.prototype.readBigInt64BE = defineBigIntMethod(function readBigInt64BE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const val = (first << 24) + // Overflow\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset]\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last)\n})\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUintLE =\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n let mul = 1\n let i = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUintBE =\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n let i = byteLength - 1\n let mul = 1\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUint8 =\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeUint16LE =\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeUint16BE =\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeUint32LE =\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset + 3] = (value >>> 24)\n this[offset + 2] = (value >>> 16)\n this[offset + 1] = (value >>> 8)\n this[offset] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeUint32BE =\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nfunction wrtBigUInt64LE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7)\n\n let lo = Number(value & BigInt(0xffffffff))\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n return offset\n}\n\nfunction wrtBigUInt64BE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7)\n\n let lo = Number(value & BigInt(0xffffffff))\n buf[offset + 7] = lo\n lo = lo >> 8\n buf[offset + 6] = lo\n lo = lo >> 8\n buf[offset + 5] = lo\n lo = lo >> 8\n buf[offset + 4] = lo\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n buf[offset + 3] = hi\n hi = hi >> 8\n buf[offset + 2] = hi\n hi = hi >> 8\n buf[offset + 1] = hi\n hi = hi >> 8\n buf[offset] = hi\n return offset + 8\n}\n\nBuffer.prototype.writeBigUInt64LE = defineBigIntMethod(function writeBigUInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeBigUInt64BE = defineBigIntMethod(function writeBigUInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n let i = 0\n let mul = 1\n let sub = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n let i = byteLength - 1\n let mul = 1\n let sub = 0\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n if (value < 0) value = 0xff + value + 1\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n this[offset + 2] = (value >>> 16)\n this[offset + 3] = (value >>> 24)\n return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (value < 0) value = 0xffffffff + value + 1\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeBigInt64LE = defineBigIntMethod(function writeBigInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nBuffer.prototype.writeBigInt64BE = defineBigIntMethod(function writeBigInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n }\n ieee754.write(buf, value, offset, littleEndian, 23, 4)\n return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n }\n ieee754.write(buf, value, offset, littleEndian, 52, 8)\n return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n if (!Buffer.isBuffer(target)) throw new TypeError('argument should be a Buffer')\n if (!start) start = 0\n if (!end && end !== 0) end = this.length\n if (targetStart >= target.length) targetStart = target.length\n if (!targetStart) targetStart = 0\n if (end > 0 && end < start) end = start\n\n // Copy 0 bytes; we're done\n if (end === start) return 0\n if (target.length === 0 || this.length === 0) return 0\n\n // Fatal error conditions\n if (targetStart < 0) {\n throw new RangeError('targetStart out of bounds')\n }\n if (start < 0 || start >= this.length) throw new RangeError('Index out of range')\n if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n // Are we oob?\n if (end > this.length) end = this.length\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start\n }\n\n const len = end - start\n\n if (this === target && typeof Uint8Array.prototype.copyWithin === 'function') {\n // Use built-in when available, missing from IE11\n this.copyWithin(targetStart, start, end)\n } else {\n Uint8Array.prototype.set.call(\n target,\n this.subarray(start, end),\n targetStart\n )\n }\n\n return len\n}\n\n// Usage:\n// buffer.fill(number[, offset[, end]])\n// buffer.fill(buffer[, offset[, end]])\n// buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n // Handle string cases:\n if (typeof val === 'string') {\n if (typeof start === 'string') {\n encoding = start\n start = 0\n end = this.length\n } else if (typeof end === 'string') {\n encoding = end\n end = this.length\n }\n if (encoding !== undefined && typeof encoding !== 'string') {\n throw new TypeError('encoding must be a string')\n }\n if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n if (val.length === 1) {\n const code = val.charCodeAt(0)\n if ((encoding === 'utf8' && code < 128) ||\n encoding === 'latin1') {\n // Fast path: If `val` fits into a single byte, use that numeric value.\n val = code\n }\n }\n } else if (typeof val === 'number') {\n val = val & 255\n } else if (typeof val === 'boolean') {\n val = Number(val)\n }\n\n // Invalid ranges are not set to a default, so can range check early.\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError('Out of range index')\n }\n\n if (end <= start) {\n return this\n }\n\n start = start >>> 0\n end = end === undefined ? this.length : end >>> 0\n\n if (!val) val = 0\n\n let i\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val\n }\n } else {\n const bytes = Buffer.isBuffer(val)\n ? val\n : Buffer.from(val, encoding)\n const len = bytes.length\n if (len === 0) {\n throw new TypeError('The value \"' + val +\n '\" is invalid for argument \"value\"')\n }\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len]\n }\n }\n\n return this\n}\n\n// CUSTOM ERRORS\n// =============\n\n// Simplified versions from Node, changed for Buffer-only usage\nconst errors = {}\nfunction E (sym, getMessage, Base) {\n errors[sym] = class NodeError extends Base {\n constructor () {\n super()\n\n Object.defineProperty(this, 'message', {\n value: getMessage.apply(this, arguments),\n writable: true,\n configurable: true\n })\n\n // Add the error code to the name to include it in the stack trace.\n this.name = `${this.name} [${sym}]`\n // Access the stack to generate the error message including the error code\n // from the name.\n this.stack // eslint-disable-line no-unused-expressions\n // Reset the name to the actual name.\n delete this.name\n }\n\n get code () {\n return sym\n }\n\n set code (value) {\n Object.defineProperty(this, 'code', {\n configurable: true,\n enumerable: true,\n value,\n writable: true\n })\n }\n\n toString () {\n return `${this.name} [${sym}]: ${this.message}`\n }\n }\n}\n\nE('ERR_BUFFER_OUT_OF_BOUNDS',\n function (name) {\n if (name) {\n return `${name} is outside of buffer bounds`\n }\n\n return 'Attempt to access memory outside buffer bounds'\n }, RangeError)\nE('ERR_INVALID_ARG_TYPE',\n function (name, actual) {\n return `The \"${name}\" argument must be of type number. Received type ${typeof actual}`\n }, TypeError)\nE('ERR_OUT_OF_RANGE',\n function (str, range, input) {\n let msg = `The value of \"${str}\" is out of range.`\n let received = input\n if (Number.isInteger(input) && Math.abs(input) > 2 ** 32) {\n received = addNumericalSeparator(String(input))\n } else if (typeof input === 'bigint') {\n received = String(input)\n if (input > BigInt(2) ** BigInt(32) || input < -(BigInt(2) ** BigInt(32))) {\n received = addNumericalSeparator(received)\n }\n received += 'n'\n }\n msg += ` It must be ${range}. Received ${received}`\n return msg\n }, RangeError)\n\nfunction addNumericalSeparator (val) {\n let res = ''\n let i = val.length\n const start = val[0] === '-' ? 1 : 0\n for (; i >= start + 4; i -= 3) {\n res = `_${val.slice(i - 3, i)}${res}`\n }\n return `${val.slice(0, i)}${res}`\n}\n\n// CHECK FUNCTIONS\n// ===============\n\nfunction checkBounds (buf, offset, byteLength) {\n validateNumber(offset, 'offset')\n if (buf[offset] === undefined || buf[offset + byteLength] === undefined) {\n boundsError(offset, buf.length - (byteLength + 1))\n }\n}\n\nfunction checkIntBI (value, min, max, buf, offset, byteLength) {\n if (value > max || value < min) {\n const n = typeof min === 'bigint' ? 'n' : ''\n let range\n if (byteLength > 3) {\n if (min === 0 || min === BigInt(0)) {\n range = `>= 0${n} and < 2${n} ** ${(byteLength + 1) * 8}${n}`\n } else {\n range = `>= -(2${n} ** ${(byteLength + 1) * 8 - 1}${n}) and < 2 ** ` +\n `${(byteLength + 1) * 8 - 1}${n}`\n }\n } else {\n range = `>= ${min}${n} and <= ${max}${n}`\n }\n throw new errors.ERR_OUT_OF_RANGE('value', range, value)\n }\n checkBounds(buf, offset, byteLength)\n}\n\nfunction validateNumber (value, name) {\n if (typeof value !== 'number') {\n throw new errors.ERR_INVALID_ARG_TYPE(name, 'number', value)\n }\n}\n\nfunction boundsError (value, length, type) {\n if (Math.floor(value) !== value) {\n validateNumber(value, type)\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset', 'an integer', value)\n }\n\n if (length < 0) {\n throw new errors.ERR_BUFFER_OUT_OF_BOUNDS()\n }\n\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset',\n `>= ${type ? 1 : 0} and <= ${length}`,\n value)\n}\n\n// HELPER FUNCTIONS\n// ================\n\nconst INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n // Node takes equal signs as end of the Base64 encoding\n str = str.split('=')[0]\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = str.trim().replace(INVALID_BASE64_RE, '')\n // Node converts strings with length < 2 to ''\n if (str.length < 2) return ''\n // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n while (str.length % 4 !== 0) {\n str = str + '='\n }\n return str\n}\n\nfunction utf8ToBytes (string, units) {\n units = units || Infinity\n let codePoint\n const length = string.length\n let leadSurrogate = null\n const bytes = []\n\n for (let i = 0; i < length; ++i) {\n codePoint = string.charCodeAt(i)\n\n // is surrogate component\n if (codePoint > 0xD7FF && codePoint < 0xE000) {\n // last char was a lead\n if (!leadSurrogate) {\n // no lead yet\n if (codePoint > 0xDBFF) {\n // unexpected trail\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n } else if (i + 1 === length) {\n // unpaired lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n }\n\n // valid lead\n leadSurrogate = codePoint\n\n continue\n }\n\n // 2 leads in a row\n if (codePoint < 0xDC00) {\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n leadSurrogate = codePoint\n continue\n }\n\n // valid surrogate pair\n codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n } else if (leadSurrogate) {\n // valid bmp char, but last char was a lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n }\n\n leadSurrogate = null\n\n // encode utf8\n if (codePoint < 0x80) {\n if ((units -= 1) < 0) break\n bytes.push(codePoint)\n } else if (codePoint < 0x800) {\n if ((units -= 2) < 0) break\n bytes.push(\n codePoint >> 0x6 | 0xC0,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x10000) {\n if ((units -= 3) < 0) break\n bytes.push(\n codePoint >> 0xC | 0xE0,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x110000) {\n if ((units -= 4) < 0) break\n bytes.push(\n codePoint >> 0x12 | 0xF0,\n codePoint >> 0xC & 0x3F | 0x80,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else {\n throw new Error('Invalid code point')\n }\n }\n\n return bytes\n}\n\nfunction asciiToBytes (str) {\n const byteArray = []\n for (let i = 0; i < str.length; ++i) {\n // Node's code seems to be doing this and not & 0x7F..\n byteArray.push(str.charCodeAt(i) & 0xFF)\n }\n return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n let c, hi, lo\n const byteArray = []\n for (let i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0) break\n\n c = str.charCodeAt(i)\n hi = c >> 8\n lo = c % 256\n byteArray.push(lo)\n byteArray.push(hi)\n }\n\n return byteArray\n}\n\nfunction base64ToBytes (str) {\n return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n let i\n for (i = 0; i < length; ++i) {\n if ((i + offset >= dst.length) || (i >= src.length)) break\n dst[i + offset] = src[i]\n }\n return i\n}\n\n// ArrayBuffer or Uint8Array objects from other contexts (i.e. iframes) do not pass\n// the `instanceof` check but they should be treated as of that type.\n// See: https://github.com/feross/buffer/issues/166\nfunction isInstance (obj, type) {\n return obj instanceof type ||\n (obj != null && obj.constructor != null && obj.constructor.name != null &&\n obj.constructor.name === type.name)\n}\nfunction numberIsNaN (obj) {\n // For IE11 support\n return obj !== obj // eslint-disable-line no-self-compare\n}\n\n// Create lookup table for `toString('hex')`\n// See: https://github.com/feross/buffer/issues/219\nconst hexSliceLookupTable = (function () {\n const alphabet = '0123456789abcdef'\n const table = new Array(256)\n for (let i = 0; i < 16; ++i) {\n const i16 = i * 16\n for (let j = 0; j < 16; ++j) {\n table[i16 + j] = alphabet[i] + alphabet[j]\n }\n }\n return table\n})()\n\n// Return not function with Error if BigInt not supported\nfunction defineBigIntMethod (fn) {\n return typeof BigInt === 'undefined' ? BufferBigIntNotDefined : fn\n}\n\nfunction BufferBigIntNotDefined () {\n throw new Error('BigInt not supported')\n}\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\nvar R = typeof Reflect === 'object' ? Reflect : null\nvar ReflectApply = R && typeof R.apply === 'function'\n ? R.apply\n : function ReflectApply(target, receiver, args) {\n return Function.prototype.apply.call(target, receiver, args);\n }\n\nvar ReflectOwnKeys\nif (R && typeof R.ownKeys === 'function') {\n ReflectOwnKeys = R.ownKeys\n} else if (Object.getOwnPropertySymbols) {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target)\n .concat(Object.getOwnPropertySymbols(target));\n };\n} else {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target);\n };\n}\n\nfunction ProcessEmitWarning(warning) {\n if (console && console.warn) console.warn(warning);\n}\n\nvar NumberIsNaN = Number.isNaN || function NumberIsNaN(value) {\n return value !== value;\n}\n\nfunction EventEmitter() {\n EventEmitter.init.call(this);\n}\nmodule.exports = EventEmitter;\nmodule.exports.once = once;\n\n// Backwards-compat with node 0.10.x\nEventEmitter.EventEmitter = EventEmitter;\n\nEventEmitter.prototype._events = undefined;\nEventEmitter.prototype._eventsCount = 0;\nEventEmitter.prototype._maxListeners = undefined;\n\n// By default EventEmitters will print a warning if more than 10 listeners are\n// added to it. This is a useful default which helps finding memory leaks.\nvar defaultMaxListeners = 10;\n\nfunction checkListener(listener) {\n if (typeof listener !== 'function') {\n throw new TypeError('The \"listener\" argument must be of type Function. Received type ' + typeof listener);\n }\n}\n\nObject.defineProperty(EventEmitter, 'defaultMaxListeners', {\n enumerable: true,\n get: function() {\n return defaultMaxListeners;\n },\n set: function(arg) {\n if (typeof arg !== 'number' || arg < 0 || NumberIsNaN(arg)) {\n throw new RangeError('The value of \"defaultMaxListeners\" is out of range. It must be a non-negative number. Received ' + arg + '.');\n }\n defaultMaxListeners = arg;\n }\n});\n\nEventEmitter.init = function() {\n\n if (this._events === undefined ||\n this._events === Object.getPrototypeOf(this)._events) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n }\n\n this._maxListeners = this._maxListeners || undefined;\n};\n\n// Obviously not all Emitters should be limited to 10. This function allows\n// that to be increased. Set to zero for unlimited.\nEventEmitter.prototype.setMaxListeners = function setMaxListeners(n) {\n if (typeof n !== 'number' || n < 0 || NumberIsNaN(n)) {\n throw new RangeError('The value of \"n\" is out of range. It must be a non-negative number. Received ' + n + '.');\n }\n this._maxListeners = n;\n return this;\n};\n\nfunction _getMaxListeners(that) {\n if (that._maxListeners === undefined)\n return EventEmitter.defaultMaxListeners;\n return that._maxListeners;\n}\n\nEventEmitter.prototype.getMaxListeners = function getMaxListeners() {\n return _getMaxListeners(this);\n};\n\nEventEmitter.prototype.emit = function emit(type) {\n var args = [];\n for (var i = 1; i < arguments.length; i++) args.push(arguments[i]);\n var doError = (type === 'error');\n\n var events = this._events;\n if (events !== undefined)\n doError = (doError && events.error === undefined);\n else if (!doError)\n return false;\n\n // If there is no 'error' event listener then throw.\n if (doError) {\n var er;\n if (args.length > 0)\n er = args[0];\n if (er instanceof Error) {\n // Note: The comments on the `throw` lines are intentional, they show\n // up in Node's output if this results in an unhandled exception.\n throw er; // Unhandled 'error' event\n }\n // At least give some kind of context to the user\n var err = new Error('Unhandled error.' + (er ? ' (' + er.message + ')' : ''));\n err.context = er;\n throw err; // Unhandled 'error' event\n }\n\n var handler = events[type];\n\n if (handler === undefined)\n return false;\n\n if (typeof handler === 'function') {\n ReflectApply(handler, this, args);\n } else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n ReflectApply(listeners[i], this, args);\n }\n\n return true;\n};\n\nfunction _addListener(target, type, listener, prepend) {\n var m;\n var events;\n var existing;\n\n checkListener(listener);\n\n events = target._events;\n if (events === undefined) {\n events = target._events = Object.create(null);\n target._eventsCount = 0;\n } else {\n // To avoid recursion in the case that type === \"newListener\"! Before\n // adding it to the listeners, first emit \"newListener\".\n if (events.newListener !== undefined) {\n target.emit('newListener', type,\n listener.listener ? listener.listener : listener);\n\n // Re-assign `events` because a newListener handler could have caused the\n // this._events to be assigned to a new object\n events = target._events;\n }\n existing = events[type];\n }\n\n if (existing === undefined) {\n // Optimize the case of one listener. Don't need the extra array object.\n existing = events[type] = listener;\n ++target._eventsCount;\n } else {\n if (typeof existing === 'function') {\n // Adding the second element, need to change to array.\n existing = events[type] =\n prepend ? [listener, existing] : [existing, listener];\n // If we've already got an array, just append.\n } else if (prepend) {\n existing.unshift(listener);\n } else {\n existing.push(listener);\n }\n\n // Check for listener leak\n m = _getMaxListeners(target);\n if (m > 0 && existing.length > m && !existing.warned) {\n existing.warned = true;\n // No error code for this since it is a Warning\n // eslint-disable-next-line no-restricted-syntax\n var w = new Error('Possible EventEmitter memory leak detected. ' +\n existing.length + ' ' + String(type) + ' listeners ' +\n 'added. Use emitter.setMaxListeners() to ' +\n 'increase limit');\n w.name = 'MaxListenersExceededWarning';\n w.emitter = target;\n w.type = type;\n w.count = existing.length;\n ProcessEmitWarning(w);\n }\n }\n\n return target;\n}\n\nEventEmitter.prototype.addListener = function addListener(type, listener) {\n return _addListener(this, type, listener, false);\n};\n\nEventEmitter.prototype.on = EventEmitter.prototype.addListener;\n\nEventEmitter.prototype.prependListener =\n function prependListener(type, listener) {\n return _addListener(this, type, listener, true);\n };\n\nfunction onceWrapper() {\n if (!this.fired) {\n this.target.removeListener(this.type, this.wrapFn);\n this.fired = true;\n if (arguments.length === 0)\n return this.listener.call(this.target);\n return this.listener.apply(this.target, arguments);\n }\n}\n\nfunction _onceWrap(target, type, listener) {\n var state = { fired: false, wrapFn: undefined, target: target, type: type, listener: listener };\n var wrapped = onceWrapper.bind(state);\n wrapped.listener = listener;\n state.wrapFn = wrapped;\n return wrapped;\n}\n\nEventEmitter.prototype.once = function once(type, listener) {\n checkListener(listener);\n this.on(type, _onceWrap(this, type, listener));\n return this;\n};\n\nEventEmitter.prototype.prependOnceListener =\n function prependOnceListener(type, listener) {\n checkListener(listener);\n this.prependListener(type, _onceWrap(this, type, listener));\n return this;\n };\n\n// Emits a 'removeListener' event if and only if the listener was removed.\nEventEmitter.prototype.removeListener =\n function removeListener(type, listener) {\n var list, events, position, i, originalListener;\n\n checkListener(listener);\n\n events = this._events;\n if (events === undefined)\n return this;\n\n list = events[type];\n if (list === undefined)\n return this;\n\n if (list === listener || list.listener === listener) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else {\n delete events[type];\n if (events.removeListener)\n this.emit('removeListener', type, list.listener || listener);\n }\n } else if (typeof list !== 'function') {\n position = -1;\n\n for (i = list.length - 1; i >= 0; i--) {\n if (list[i] === listener || list[i].listener === listener) {\n originalListener = list[i].listener;\n position = i;\n break;\n }\n }\n\n if (position < 0)\n return this;\n\n if (position === 0)\n list.shift();\n else {\n spliceOne(list, position);\n }\n\n if (list.length === 1)\n events[type] = list[0];\n\n if (events.removeListener !== undefined)\n this.emit('removeListener', type, originalListener || listener);\n }\n\n return this;\n };\n\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\n\nEventEmitter.prototype.removeAllListeners =\n function removeAllListeners(type) {\n var listeners, events, i;\n\n events = this._events;\n if (events === undefined)\n return this;\n\n // not listening for removeListener, no need to emit\n if (events.removeListener === undefined) {\n if (arguments.length === 0) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n } else if (events[type] !== undefined) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else\n delete events[type];\n }\n return this;\n }\n\n // emit removeListener for all listeners on all events\n if (arguments.length === 0) {\n var keys = Object.keys(events);\n var key;\n for (i = 0; i < keys.length; ++i) {\n key = keys[i];\n if (key === 'removeListener') continue;\n this.removeAllListeners(key);\n }\n this.removeAllListeners('removeListener');\n this._events = Object.create(null);\n this._eventsCount = 0;\n return this;\n }\n\n listeners = events[type];\n\n if (typeof listeners === 'function') {\n this.removeListener(type, listeners);\n } else if (listeners !== undefined) {\n // LIFO order\n for (i = listeners.length - 1; i >= 0; i--) {\n this.removeListener(type, listeners[i]);\n }\n }\n\n return this;\n };\n\nfunction _listeners(target, type, unwrap) {\n var events = target._events;\n\n if (events === undefined)\n return [];\n\n var evlistener = events[type];\n if (evlistener === undefined)\n return [];\n\n if (typeof evlistener === 'function')\n return unwrap ? [evlistener.listener || evlistener] : [evlistener];\n\n return unwrap ?\n unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length);\n}\n\nEventEmitter.prototype.listeners = function listeners(type) {\n return _listeners(this, type, true);\n};\n\nEventEmitter.prototype.rawListeners = function rawListeners(type) {\n return _listeners(this, type, false);\n};\n\nEventEmitter.listenerCount = function(emitter, type) {\n if (typeof emitter.listenerCount === 'function') {\n return emitter.listenerCount(type);\n } else {\n return listenerCount.call(emitter, type);\n }\n};\n\nEventEmitter.prototype.listenerCount = listenerCount;\nfunction listenerCount(type) {\n var events = this._events;\n\n if (events !== undefined) {\n var evlistener = events[type];\n\n if (typeof evlistener === 'function') {\n return 1;\n } else if (evlistener !== undefined) {\n return evlistener.length;\n }\n }\n\n return 0;\n}\n\nEventEmitter.prototype.eventNames = function eventNames() {\n return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : [];\n};\n\nfunction arrayClone(arr, n) {\n var copy = new Array(n);\n for (var i = 0; i < n; ++i)\n copy[i] = arr[i];\n return copy;\n}\n\nfunction spliceOne(list, index) {\n for (; index + 1 < list.length; index++)\n list[index] = list[index + 1];\n list.pop();\n}\n\nfunction unwrapListeners(arr) {\n var ret = new Array(arr.length);\n for (var i = 0; i < ret.length; ++i) {\n ret[i] = arr[i].listener || arr[i];\n }\n return ret;\n}\n\nfunction once(emitter, name) {\n return new Promise(function (resolve, reject) {\n function errorListener(err) {\n emitter.removeListener(name, resolver);\n reject(err);\n }\n\n function resolver() {\n if (typeof emitter.removeListener === 'function') {\n emitter.removeListener('error', errorListener);\n }\n resolve([].slice.call(arguments));\n };\n\n eventTargetAgnosticAddListener(emitter, name, resolver, { once: true });\n if (name !== 'error') {\n addErrorHandlerIfEventEmitter(emitter, errorListener, { once: true });\n }\n });\n}\n\nfunction addErrorHandlerIfEventEmitter(emitter, handler, flags) {\n if (typeof emitter.on === 'function') {\n eventTargetAgnosticAddListener(emitter, 'error', handler, flags);\n }\n}\n\nfunction eventTargetAgnosticAddListener(emitter, name, listener, flags) {\n if (typeof emitter.on === 'function') {\n if (flags.once) {\n emitter.once(name, listener);\n } else {\n emitter.on(name, listener);\n }\n } else if (typeof emitter.addEventListener === 'function') {\n // EventTarget does not have `error` event semantics like Node\n // EventEmitters, we do not listen for `error` events here.\n emitter.addEventListener(name, function wrapListener(arg) {\n // IE does not have builtin `{ once: true }` support so we\n // have to do it manually.\n if (flags.once) {\n emitter.removeEventListener(name, wrapListener);\n }\n listener(arg);\n });\n } else {\n throw new TypeError('The \"emitter\" argument must be of type EventEmitter. Received type ' + typeof emitter);\n }\n}\n","/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */\nexports.read = function (buffer, offset, isLE, mLen, nBytes) {\n var e, m\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var nBits = -7\n var i = isLE ? (nBytes - 1) : 0\n var d = isLE ? -1 : 1\n var s = buffer[offset + i]\n\n i += d\n\n e = s & ((1 << (-nBits)) - 1)\n s >>= (-nBits)\n nBits += eLen\n for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & ((1 << (-nBits)) - 1)\n e >>= (-nBits)\n nBits += mLen\n for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias\n } else if (e === eMax) {\n return m ? NaN : ((s ? -1 : 1) * Infinity)\n } else {\n m = m + Math.pow(2, mLen)\n e = e - eBias\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n var i = isLE ? 0 : (nBytes - 1)\n var d = isLE ? 1 : -1\n var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n value = Math.abs(value)\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0\n e = eMax\n } else {\n e = Math.floor(Math.log(value) / Math.LN2)\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--\n c *= 2\n }\n if (e + eBias >= 1) {\n value += rt / c\n } else {\n value += rt * Math.pow(2, 1 - eBias)\n }\n if (value * c >= 2) {\n e++\n c /= 2\n }\n\n if (e + eBias >= eMax) {\n m = 0\n e = eMax\n } else if (e + eBias >= 1) {\n m = ((value * c) - 1) * Math.pow(2, mLen)\n e = e + eBias\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n e = 0\n }\n }\n\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n e = (e << mLen) | m\n eLen += mLen\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128\n}\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView');\n\nmodule.exports = DataView;\n","var hashClear = require('./_hashClear'),\n hashDelete = require('./_hashDelete'),\n hashGet = require('./_hashGet'),\n hashHas = require('./_hashHas'),\n hashSet = require('./_hashSet');\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\nmodule.exports = Hash;\n","var listCacheClear = require('./_listCacheClear'),\n listCacheDelete = require('./_listCacheDelete'),\n listCacheGet = require('./_listCacheGet'),\n listCacheHas = require('./_listCacheHas'),\n listCacheSet = require('./_listCacheSet');\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\nmodule.exports = ListCache;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map');\n\nmodule.exports = Map;\n","var mapCacheClear = require('./_mapCacheClear'),\n mapCacheDelete = require('./_mapCacheDelete'),\n mapCacheGet = require('./_mapCacheGet'),\n mapCacheHas = require('./_mapCacheHas'),\n mapCacheSet = require('./_mapCacheSet');\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\nmodule.exports = MapCache;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Promise = getNative(root, 'Promise');\n\nmodule.exports = Promise;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Set = getNative(root, 'Set');\n\nmodule.exports = Set;\n","var MapCache = require('./_MapCache'),\n setCacheAdd = require('./_setCacheAdd'),\n setCacheHas = require('./_setCacheHas');\n\n/**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\nfunction SetCache(values) {\n var index = -1,\n length = values == null ? 0 : values.length;\n\n this.__data__ = new MapCache;\n while (++index < length) {\n this.add(values[index]);\n }\n}\n\n// Add methods to `SetCache`.\nSetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\nSetCache.prototype.has = setCacheHas;\n\nmodule.exports = SetCache;\n","var ListCache = require('./_ListCache'),\n stackClear = require('./_stackClear'),\n stackDelete = require('./_stackDelete'),\n stackGet = require('./_stackGet'),\n stackHas = require('./_stackHas'),\n stackSet = require('./_stackSet');\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\nmodule.exports = Stack;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Uint8Array = root.Uint8Array;\n\nmodule.exports = Uint8Array;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar WeakMap = getNative(root, 'WeakMap');\n\nmodule.exports = WeakMap;\n","/**\n * A specialized version of `_.forEach` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\nfunction arrayEach(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (iteratee(array[index], index, array) === false) {\n break;\n }\n }\n return array;\n}\n\nmodule.exports = arrayEach;\n","/**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\nfunction arrayFilter(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result[resIndex++] = value;\n }\n }\n return result;\n}\n\nmodule.exports = arrayFilter;\n","var baseTimes = require('./_baseTimes'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isIndex = require('./_isIndex'),\n isTypedArray = require('./isTypedArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = arrayLikeKeys;\n","/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n}\n\nmodule.exports = arrayPush;\n","/**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\nfunction arraySome(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (predicate(array[index], index, array)) {\n return true;\n }\n }\n return false;\n}\n\nmodule.exports = arraySome;\n","var baseAssignValue = require('./_baseAssignValue'),\n eq = require('./eq');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\nmodule.exports = assignValue;\n","var eq = require('./eq');\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\nmodule.exports = assocIndexOf;\n","var copyObject = require('./_copyObject'),\n keys = require('./keys');\n\n/**\n * The base implementation of `_.assign` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssign(object, source) {\n return object && copyObject(source, keys(source), object);\n}\n\nmodule.exports = baseAssign;\n","var copyObject = require('./_copyObject'),\n keysIn = require('./keysIn');\n\n/**\n * The base implementation of `_.assignIn` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssignIn(object, source) {\n return object && copyObject(source, keysIn(source), object);\n}\n\nmodule.exports = baseAssignIn;\n","var defineProperty = require('./_defineProperty');\n\n/**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction baseAssignValue(object, key, value) {\n if (key == '__proto__' && defineProperty) {\n defineProperty(object, key, {\n 'configurable': true,\n 'enumerable': true,\n 'value': value,\n 'writable': true\n });\n } else {\n object[key] = value;\n }\n}\n\nmodule.exports = baseAssignValue;\n","var Stack = require('./_Stack'),\n arrayEach = require('./_arrayEach'),\n assignValue = require('./_assignValue'),\n baseAssign = require('./_baseAssign'),\n baseAssignIn = require('./_baseAssignIn'),\n cloneBuffer = require('./_cloneBuffer'),\n copyArray = require('./_copyArray'),\n copySymbols = require('./_copySymbols'),\n copySymbolsIn = require('./_copySymbolsIn'),\n getAllKeys = require('./_getAllKeys'),\n getAllKeysIn = require('./_getAllKeysIn'),\n getTag = require('./_getTag'),\n initCloneArray = require('./_initCloneArray'),\n initCloneByTag = require('./_initCloneByTag'),\n initCloneObject = require('./_initCloneObject'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isMap = require('./isMap'),\n isObject = require('./isObject'),\n isSet = require('./isSet'),\n keys = require('./keys'),\n keysIn = require('./keysIn');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_FLAT_FLAG = 2,\n CLONE_SYMBOLS_FLAG = 4;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values supported by `_.clone`. */\nvar cloneableTags = {};\ncloneableTags[argsTag] = cloneableTags[arrayTag] =\ncloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =\ncloneableTags[boolTag] = cloneableTags[dateTag] =\ncloneableTags[float32Tag] = cloneableTags[float64Tag] =\ncloneableTags[int8Tag] = cloneableTags[int16Tag] =\ncloneableTags[int32Tag] = cloneableTags[mapTag] =\ncloneableTags[numberTag] = cloneableTags[objectTag] =\ncloneableTags[regexpTag] = cloneableTags[setTag] =\ncloneableTags[stringTag] = cloneableTags[symbolTag] =\ncloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =\ncloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;\ncloneableTags[errorTag] = cloneableTags[funcTag] =\ncloneableTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.clone` and `_.cloneDeep` which tracks\n * traversed objects.\n *\n * @private\n * @param {*} value The value to clone.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Deep clone\n * 2 - Flatten inherited properties\n * 4 - Clone symbols\n * @param {Function} [customizer] The function to customize cloning.\n * @param {string} [key] The key of `value`.\n * @param {Object} [object] The parent object of `value`.\n * @param {Object} [stack] Tracks traversed objects and their clone counterparts.\n * @returns {*} Returns the cloned value.\n */\nfunction baseClone(value, bitmask, customizer, key, object, stack) {\n var result,\n isDeep = bitmask & CLONE_DEEP_FLAG,\n isFlat = bitmask & CLONE_FLAT_FLAG,\n isFull = bitmask & CLONE_SYMBOLS_FLAG;\n\n if (customizer) {\n result = object ? customizer(value, key, object, stack) : customizer(value);\n }\n if (result !== undefined) {\n return result;\n }\n if (!isObject(value)) {\n return value;\n }\n var isArr = isArray(value);\n if (isArr) {\n result = initCloneArray(value);\n if (!isDeep) {\n return copyArray(value, result);\n }\n } else {\n var tag = getTag(value),\n isFunc = tag == funcTag || tag == genTag;\n\n if (isBuffer(value)) {\n return cloneBuffer(value, isDeep);\n }\n if (tag == objectTag || tag == argsTag || (isFunc && !object)) {\n result = (isFlat || isFunc) ? {} : initCloneObject(value);\n if (!isDeep) {\n return isFlat\n ? copySymbolsIn(value, baseAssignIn(result, value))\n : copySymbols(value, baseAssign(result, value));\n }\n } else {\n if (!cloneableTags[tag]) {\n return object ? value : {};\n }\n result = initCloneByTag(value, tag, isDeep);\n }\n }\n // Check for circular references and return its corresponding clone.\n stack || (stack = new Stack);\n var stacked = stack.get(value);\n if (stacked) {\n return stacked;\n }\n stack.set(value, result);\n\n if (isSet(value)) {\n value.forEach(function(subValue) {\n result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));\n });\n } else if (isMap(value)) {\n value.forEach(function(subValue, key) {\n result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n }\n\n var keysFunc = isFull\n ? (isFlat ? getAllKeysIn : getAllKeys)\n : (isFlat ? keysIn : keys);\n\n var props = isArr ? undefined : keysFunc(value);\n arrayEach(props || value, function(subValue, key) {\n if (props) {\n key = subValue;\n subValue = value[key];\n }\n // Recursively populate clone (susceptible to call stack limits).\n assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n return result;\n}\n\nmodule.exports = baseClone;\n","var isObject = require('./isObject');\n\n/** Built-in value references. */\nvar objectCreate = Object.create;\n\n/**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} proto The object to inherit from.\n * @returns {Object} Returns the new object.\n */\nvar baseCreate = (function() {\n function object() {}\n return function(proto) {\n if (!isObject(proto)) {\n return {};\n }\n if (objectCreate) {\n return objectCreate(proto);\n }\n object.prototype = proto;\n var result = new object;\n object.prototype = undefined;\n return result;\n };\n}());\n\nmodule.exports = baseCreate;\n","var arrayPush = require('./_arrayPush'),\n isArray = require('./isArray');\n\n/**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction baseGetAllKeys(object, keysFunc, symbolsFunc) {\n var result = keysFunc(object);\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n}\n\nmodule.exports = baseGetAllKeys;\n","var Symbol = require('./_Symbol'),\n getRawTag = require('./_getRawTag'),\n objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]';\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\nmodule.exports = baseIsArguments;\n","var baseIsEqualDeep = require('./_baseIsEqualDeep'),\n isObjectLike = require('./isObjectLike');\n\n/**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Unordered comparison\n * 2 - Partial comparison\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\nfunction baseIsEqual(value, other, bitmask, customizer, stack) {\n if (value === other) {\n return true;\n }\n if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\n return value !== value && other !== other;\n }\n return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n}\n\nmodule.exports = baseIsEqual;\n","var Stack = require('./_Stack'),\n equalArrays = require('./_equalArrays'),\n equalByTag = require('./_equalByTag'),\n equalObjects = require('./_equalObjects'),\n getTag = require('./_getTag'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isTypedArray = require('./isTypedArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n var objIsArr = isArray(object),\n othIsArr = isArray(other),\n objTag = objIsArr ? arrayTag : getTag(object),\n othTag = othIsArr ? arrayTag : getTag(other);\n\n objTag = objTag == argsTag ? objectTag : objTag;\n othTag = othTag == argsTag ? objectTag : othTag;\n\n var objIsObj = objTag == objectTag,\n othIsObj = othTag == objectTag,\n isSameTag = objTag == othTag;\n\n if (isSameTag && isBuffer(object)) {\n if (!isBuffer(other)) {\n return false;\n }\n objIsArr = true;\n objIsObj = false;\n }\n if (isSameTag && !objIsObj) {\n stack || (stack = new Stack);\n return (objIsArr || isTypedArray(object))\n ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n }\n if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n if (objIsWrapped || othIsWrapped) {\n var objUnwrapped = objIsWrapped ? object.value() : object,\n othUnwrapped = othIsWrapped ? other.value() : other;\n\n stack || (stack = new Stack);\n return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n }\n }\n if (!isSameTag) {\n return false;\n }\n stack || (stack = new Stack);\n return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n}\n\nmodule.exports = baseIsEqualDeep;\n","var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]';\n\n/**\n * The base implementation of `_.isMap` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n */\nfunction baseIsMap(value) {\n return isObjectLike(value) && getTag(value) == mapTag;\n}\n\nmodule.exports = baseIsMap;\n","var isFunction = require('./isFunction'),\n isMasked = require('./_isMasked'),\n isObject = require('./isObject'),\n toSource = require('./_toSource');\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\nmodule.exports = baseIsNative;\n","var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar setTag = '[object Set]';\n\n/**\n * The base implementation of `_.isSet` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n */\nfunction baseIsSet(value) {\n return isObjectLike(value) && getTag(value) == setTag;\n}\n\nmodule.exports = baseIsSet;\n","var baseGetTag = require('./_baseGetTag'),\n isLength = require('./isLength'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n\nmodule.exports = baseIsTypedArray;\n","var isPrototype = require('./_isPrototype'),\n nativeKeys = require('./_nativeKeys');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeys;\n","var isObject = require('./isObject'),\n isPrototype = require('./_isPrototype'),\n nativeKeysIn = require('./_nativeKeysIn');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeysIn(object) {\n if (!isObject(object)) {\n return nativeKeysIn(object);\n }\n var isProto = isPrototype(object),\n result = [];\n\n for (var key in object) {\n if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeysIn;\n","/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\nmodule.exports = baseTimes;\n","/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n return function(value) {\n return func(value);\n };\n}\n\nmodule.exports = baseUnary;\n","/**\n * Checks if a `cache` value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction cacheHas(cache, key) {\n return cache.has(key);\n}\n\nmodule.exports = cacheHas;\n","var Uint8Array = require('./_Uint8Array');\n\n/**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\nfunction cloneArrayBuffer(arrayBuffer) {\n var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n return result;\n}\n\nmodule.exports = cloneArrayBuffer;\n","var root = require('./_root');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined,\n allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;\n\n/**\n * Creates a clone of `buffer`.\n *\n * @private\n * @param {Buffer} buffer The buffer to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Buffer} Returns the cloned buffer.\n */\nfunction cloneBuffer(buffer, isDeep) {\n if (isDeep) {\n return buffer.slice();\n }\n var length = buffer.length,\n result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\n\n buffer.copy(result);\n return result;\n}\n\nmodule.exports = cloneBuffer;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer');\n\n/**\n * Creates a clone of `dataView`.\n *\n * @private\n * @param {Object} dataView The data view to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned data view.\n */\nfunction cloneDataView(dataView, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;\n return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);\n}\n\nmodule.exports = cloneDataView;\n","/** Used to match `RegExp` flags from their coerced string values. */\nvar reFlags = /\\w*$/;\n\n/**\n * Creates a clone of `regexp`.\n *\n * @private\n * @param {Object} regexp The regexp to clone.\n * @returns {Object} Returns the cloned regexp.\n */\nfunction cloneRegExp(regexp) {\n var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));\n result.lastIndex = regexp.lastIndex;\n return result;\n}\n\nmodule.exports = cloneRegExp;\n","var Symbol = require('./_Symbol');\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * Creates a clone of the `symbol` object.\n *\n * @private\n * @param {Object} symbol The symbol object to clone.\n * @returns {Object} Returns the cloned symbol object.\n */\nfunction cloneSymbol(symbol) {\n return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};\n}\n\nmodule.exports = cloneSymbol;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer');\n\n/**\n * Creates a clone of `typedArray`.\n *\n * @private\n * @param {Object} typedArray The typed array to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned typed array.\n */\nfunction cloneTypedArray(typedArray, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n}\n\nmodule.exports = cloneTypedArray;\n","/**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\nfunction copyArray(source, array) {\n var index = -1,\n length = source.length;\n\n array || (array = Array(length));\n while (++index < length) {\n array[index] = source[index];\n }\n return array;\n}\n\nmodule.exports = copyArray;\n","var assignValue = require('./_assignValue'),\n baseAssignValue = require('./_baseAssignValue');\n\n/**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\nfunction copyObject(source, props, object, customizer) {\n var isNew = !object;\n object || (object = {});\n\n var index = -1,\n length = props.length;\n\n while (++index < length) {\n var key = props[index];\n\n var newValue = customizer\n ? customizer(object[key], source[key], key, object, source)\n : undefined;\n\n if (newValue === undefined) {\n newValue = source[key];\n }\n if (isNew) {\n baseAssignValue(object, key, newValue);\n } else {\n assignValue(object, key, newValue);\n }\n }\n return object;\n}\n\nmodule.exports = copyObject;\n","var copyObject = require('./_copyObject'),\n getSymbols = require('./_getSymbols');\n\n/**\n * Copies own symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbols(source, object) {\n return copyObject(source, getSymbols(source), object);\n}\n\nmodule.exports = copySymbols;\n","var copyObject = require('./_copyObject'),\n getSymbolsIn = require('./_getSymbolsIn');\n\n/**\n * Copies own and inherited symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbolsIn(source, object) {\n return copyObject(source, getSymbolsIn(source), object);\n}\n\nmodule.exports = copySymbolsIn;\n","var root = require('./_root');\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\nmodule.exports = coreJsData;\n","var getNative = require('./_getNative');\n\nvar defineProperty = (function() {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n}());\n\nmodule.exports = defineProperty;\n","var SetCache = require('./_SetCache'),\n arraySome = require('./_arraySome'),\n cacheHas = require('./_cacheHas');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\nfunction equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n arrLength = array.length,\n othLength = other.length;\n\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n return false;\n }\n // Check that cyclic values are equal.\n var arrStacked = stack.get(array);\n var othStacked = stack.get(other);\n if (arrStacked && othStacked) {\n return arrStacked == other && othStacked == array;\n }\n var index = -1,\n result = true,\n seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n stack.set(array, other);\n stack.set(other, array);\n\n // Ignore non-index properties.\n while (++index < arrLength) {\n var arrValue = array[index],\n othValue = other[index];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, arrValue, index, other, array, stack)\n : customizer(arrValue, othValue, index, array, other, stack);\n }\n if (compared !== undefined) {\n if (compared) {\n continue;\n }\n result = false;\n break;\n }\n // Recursively compare arrays (susceptible to call stack limits).\n if (seen) {\n if (!arraySome(other, function(othValue, othIndex) {\n if (!cacheHas(seen, othIndex) &&\n (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n return seen.push(othIndex);\n }\n })) {\n result = false;\n break;\n }\n } else if (!(\n arrValue === othValue ||\n equalFunc(arrValue, othValue, bitmask, customizer, stack)\n )) {\n result = false;\n break;\n }\n }\n stack['delete'](array);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalArrays;\n","var Symbol = require('./_Symbol'),\n Uint8Array = require('./_Uint8Array'),\n eq = require('./eq'),\n equalArrays = require('./_equalArrays'),\n mapToArray = require('./_mapToArray'),\n setToArray = require('./_setToArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]';\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n switch (tag) {\n case dataViewTag:\n if ((object.byteLength != other.byteLength) ||\n (object.byteOffset != other.byteOffset)) {\n return false;\n }\n object = object.buffer;\n other = other.buffer;\n\n case arrayBufferTag:\n if ((object.byteLength != other.byteLength) ||\n !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n return false;\n }\n return true;\n\n case boolTag:\n case dateTag:\n case numberTag:\n // Coerce booleans to `1` or `0` and dates to milliseconds.\n // Invalid dates are coerced to `NaN`.\n return eq(+object, +other);\n\n case errorTag:\n return object.name == other.name && object.message == other.message;\n\n case regexpTag:\n case stringTag:\n // Coerce regexes to strings and treat strings, primitives and objects,\n // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n // for more details.\n return object == (other + '');\n\n case mapTag:\n var convert = mapToArray;\n\n case setTag:\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n convert || (convert = setToArray);\n\n if (object.size != other.size && !isPartial) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked) {\n return stacked == other;\n }\n bitmask |= COMPARE_UNORDERED_FLAG;\n\n // Recursively compare objects (susceptible to call stack limits).\n stack.set(object, other);\n var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n stack['delete'](object);\n return result;\n\n case symbolTag:\n if (symbolValueOf) {\n return symbolValueOf.call(object) == symbolValueOf.call(other);\n }\n }\n return false;\n}\n\nmodule.exports = equalByTag;\n","var getAllKeys = require('./_getAllKeys');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n objProps = getAllKeys(object),\n objLength = objProps.length,\n othProps = getAllKeys(other),\n othLength = othProps.length;\n\n if (objLength != othLength && !isPartial) {\n return false;\n }\n var index = objLength;\n while (index--) {\n var key = objProps[index];\n if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n return false;\n }\n }\n // Check that cyclic values are equal.\n var objStacked = stack.get(object);\n var othStacked = stack.get(other);\n if (objStacked && othStacked) {\n return objStacked == other && othStacked == object;\n }\n var result = true;\n stack.set(object, other);\n stack.set(other, object);\n\n var skipCtor = isPartial;\n while (++index < objLength) {\n key = objProps[index];\n var objValue = object[key],\n othValue = other[key];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, objValue, key, other, object, stack)\n : customizer(objValue, othValue, key, object, other, stack);\n }\n // Recursively compare objects (susceptible to call stack limits).\n if (!(compared === undefined\n ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n : compared\n )) {\n result = false;\n break;\n }\n skipCtor || (skipCtor = key == 'constructor');\n }\n if (result && !skipCtor) {\n var objCtor = object.constructor,\n othCtor = other.constructor;\n\n // Non `Object` object instances with different constructors are not equal.\n if (objCtor != othCtor &&\n ('constructor' in object && 'constructor' in other) &&\n !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n result = false;\n }\n }\n stack['delete'](object);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalObjects;\n","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n","var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbols = require('./_getSymbols'),\n keys = require('./keys');\n\n/**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeys(object) {\n return baseGetAllKeys(object, keys, getSymbols);\n}\n\nmodule.exports = getAllKeys;\n","var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbolsIn = require('./_getSymbolsIn'),\n keysIn = require('./keysIn');\n\n/**\n * Creates an array of own and inherited enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeysIn(object) {\n return baseGetAllKeys(object, keysIn, getSymbolsIn);\n}\n\nmodule.exports = getAllKeysIn;\n","var isKeyable = require('./_isKeyable');\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\nmodule.exports = getMapData;\n","var baseIsNative = require('./_baseIsNative'),\n getValue = require('./_getValue');\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\nmodule.exports = getNative;\n","var overArg = require('./_overArg');\n\n/** Built-in value references. */\nvar getPrototype = overArg(Object.getPrototypeOf, Object);\n\nmodule.exports = getPrototype;\n","var Symbol = require('./_Symbol');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nmodule.exports = getRawTag;\n","var arrayFilter = require('./_arrayFilter'),\n stubArray = require('./stubArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n if (object == null) {\n return [];\n }\n object = Object(object);\n return arrayFilter(nativeGetSymbols(object), function(symbol) {\n return propertyIsEnumerable.call(object, symbol);\n });\n};\n\nmodule.exports = getSymbols;\n","var arrayPush = require('./_arrayPush'),\n getPrototype = require('./_getPrototype'),\n getSymbols = require('./_getSymbols'),\n stubArray = require('./stubArray');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own and inherited enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {\n var result = [];\n while (object) {\n arrayPush(result, getSymbols(object));\n object = getPrototype(object);\n }\n return result;\n};\n\nmodule.exports = getSymbolsIn;\n","var DataView = require('./_DataView'),\n Map = require('./_Map'),\n Promise = require('./_Promise'),\n Set = require('./_Set'),\n WeakMap = require('./_WeakMap'),\n baseGetTag = require('./_baseGetTag'),\n toSource = require('./_toSource');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n setTag = '[object Set]',\n weakMapTag = '[object WeakMap]';\n\nvar dataViewTag = '[object DataView]';\n\n/** Used to detect maps, sets, and weakmaps. */\nvar dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nvar getTag = baseGetTag;\n\n// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\nif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = baseGetTag(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : '';\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n}\n\nmodule.exports = getTag;\n","/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\nmodule.exports = getValue;\n","var nativeCreate = require('./_nativeCreate');\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n}\n\nmodule.exports = hashClear;\n","/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = hashDelete;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\nmodule.exports = hashGet;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\nmodule.exports = hashHas;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\nmodule.exports = hashSet;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Initializes an array clone.\n *\n * @private\n * @param {Array} array The array to clone.\n * @returns {Array} Returns the initialized clone.\n */\nfunction initCloneArray(array) {\n var length = array.length,\n result = new array.constructor(length);\n\n // Add properties assigned by `RegExp#exec`.\n if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {\n result.index = array.index;\n result.input = array.input;\n }\n return result;\n}\n\nmodule.exports = initCloneArray;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer'),\n cloneDataView = require('./_cloneDataView'),\n cloneRegExp = require('./_cloneRegExp'),\n cloneSymbol = require('./_cloneSymbol'),\n cloneTypedArray = require('./_cloneTypedArray');\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/**\n * Initializes an object clone based on its `toStringTag`.\n *\n * **Note:** This function only supports cloning values with tags of\n * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.\n *\n * @private\n * @param {Object} object The object to clone.\n * @param {string} tag The `toStringTag` of the object to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneByTag(object, tag, isDeep) {\n var Ctor = object.constructor;\n switch (tag) {\n case arrayBufferTag:\n return cloneArrayBuffer(object);\n\n case boolTag:\n case dateTag:\n return new Ctor(+object);\n\n case dataViewTag:\n return cloneDataView(object, isDeep);\n\n case float32Tag: case float64Tag:\n case int8Tag: case int16Tag: case int32Tag:\n case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:\n return cloneTypedArray(object, isDeep);\n\n case mapTag:\n return new Ctor;\n\n case numberTag:\n case stringTag:\n return new Ctor(object);\n\n case regexpTag:\n return cloneRegExp(object);\n\n case setTag:\n return new Ctor;\n\n case symbolTag:\n return cloneSymbol(object);\n }\n}\n\nmodule.exports = initCloneByTag;\n","var baseCreate = require('./_baseCreate'),\n getPrototype = require('./_getPrototype'),\n isPrototype = require('./_isPrototype');\n\n/**\n * Initializes an object clone.\n *\n * @private\n * @param {Object} object The object to clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneObject(object) {\n return (typeof object.constructor == 'function' && !isPrototype(object))\n ? baseCreate(getPrototype(object))\n : {};\n}\n\nmodule.exports = initCloneObject;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n var type = typeof value;\n length = length == null ? MAX_SAFE_INTEGER : length;\n\n return !!length &&\n (type == 'number' ||\n (type != 'symbol' && reIsUint.test(value))) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\nmodule.exports = isIndex;\n","/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\nmodule.exports = isKeyable;\n","var coreJsData = require('./_coreJsData');\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\nmodule.exports = isMasked;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\nmodule.exports = isPrototype;\n","/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n}\n\nmodule.exports = listCacheClear;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype;\n\n/** Built-in value references. */\nvar splice = arrayProto.splice;\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n}\n\nmodule.exports = listCacheDelete;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\nmodule.exports = listCacheGet;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\nmodule.exports = listCacheHas;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\nmodule.exports = listCacheSet;\n","var Hash = require('./_Hash'),\n ListCache = require('./_ListCache'),\n Map = require('./_Map');\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\nmodule.exports = mapCacheClear;\n","var getMapData = require('./_getMapData');\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = mapCacheDelete;\n","var getMapData = require('./_getMapData');\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\nmodule.exports = mapCacheGet;\n","var getMapData = require('./_getMapData');\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\nmodule.exports = mapCacheHas;\n","var getMapData = require('./_getMapData');\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n}\n\nmodule.exports = mapCacheSet;\n","/**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\nfunction mapToArray(map) {\n var index = -1,\n result = Array(map.size);\n\n map.forEach(function(value, key) {\n result[++index] = [key, value];\n });\n return result;\n}\n\nmodule.exports = mapToArray;\n","var getNative = require('./_getNative');\n\n/* Built-in method references that are verified to be native. */\nvar nativeCreate = getNative(Object, 'create');\n\nmodule.exports = nativeCreate;\n","var overArg = require('./_overArg');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeKeys = overArg(Object.keys, Object);\n\nmodule.exports = nativeKeys;\n","/**\n * This function is like\n * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * except that it includes inherited enumerable properties.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction nativeKeysIn(object) {\n var result = [];\n if (object != null) {\n for (var key in Object(object)) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = nativeKeysIn;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n try {\n // Use `util.types` for Node.js 10+.\n var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n if (types) {\n return types;\n }\n\n // Legacy `process.binding('util')` for Node.js < 10.\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n}());\n\nmodule.exports = nodeUtil;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n","/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\nmodule.exports = overArg;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n","/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\nfunction setCacheAdd(value) {\n this.__data__.set(value, HASH_UNDEFINED);\n return this;\n}\n\nmodule.exports = setCacheAdd;\n","/**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\nfunction setCacheHas(value) {\n return this.__data__.has(value);\n}\n\nmodule.exports = setCacheHas;\n","/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\nfunction setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n}\n\nmodule.exports = setToArray;\n","var ListCache = require('./_ListCache');\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}\n\nmodule.exports = stackClear;\n","/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n var data = this.__data__,\n result = data['delete'](key);\n\n this.size = data.size;\n return result;\n}\n\nmodule.exports = stackDelete;\n","/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n return this.__data__.get(key);\n}\n\nmodule.exports = stackGet;\n","/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n return this.__data__.has(key);\n}\n\nmodule.exports = stackHas;\n","var ListCache = require('./_ListCache'),\n Map = require('./_Map'),\n MapCache = require('./_MapCache');\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n var data = this.__data__;\n if (data instanceof ListCache) {\n var pairs = data.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n this.size = ++data.size;\n return this;\n }\n data = this.__data__ = new MapCache(pairs);\n }\n data.set(key, value);\n this.size = data.size;\n return this;\n}\n\nmodule.exports = stackSet;\n","/** Used for built-in method references. */\nvar funcProto = Function.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\nmodule.exports = toSource;\n","var baseClone = require('./_baseClone');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_SYMBOLS_FLAG = 4;\n\n/**\n * This method is like `_.clone` except that it recursively clones `value`.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Lang\n * @param {*} value The value to recursively clone.\n * @returns {*} Returns the deep cloned value.\n * @see _.clone\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var deep = _.cloneDeep(objects);\n * console.log(deep[0] === objects[0]);\n * // => false\n */\nfunction cloneDeep(value) {\n return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);\n}\n\nmodule.exports = cloneDeep;\n","/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\nmodule.exports = eq;\n","var baseIsArguments = require('./_baseIsArguments'),\n isObjectLike = require('./isObjectLike');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n};\n\nmodule.exports = isArguments;\n","/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\nmodule.exports = isArray;\n","var isFunction = require('./isFunction'),\n isLength = require('./isLength');\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\nmodule.exports = isArrayLike;\n","var root = require('./_root'),\n stubFalse = require('./stubFalse');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\nmodule.exports = isBuffer;\n","var baseIsEqual = require('./_baseIsEqual');\n\n/**\n * Performs a deep comparison between two values to determine if they are\n * equivalent.\n *\n * **Note:** This method supports comparing arrays, array buffers, booleans,\n * date objects, error objects, maps, numbers, `Object` objects, regexes,\n * sets, strings, symbols, and typed arrays. `Object` objects are compared\n * by their own, not inherited, enumerable properties. Functions and DOM\n * nodes are compared by strict equality, i.e. `===`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.isEqual(object, other);\n * // => true\n *\n * object === other;\n * // => false\n */\nfunction isEqual(value, other) {\n return baseIsEqual(value, other);\n}\n\nmodule.exports = isEqual;\n","var baseGetTag = require('./_baseGetTag'),\n isObject = require('./isObject');\n\n/** `Object#toString` result references. */\nvar asyncTag = '[object AsyncFunction]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n proxyTag = '[object Proxy]';\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\nmodule.exports = isFunction;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\nmodule.exports = isLength;\n","var baseIsMap = require('./_baseIsMap'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsMap = nodeUtil && nodeUtil.isMap;\n\n/**\n * Checks if `value` is classified as a `Map` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n * @example\n *\n * _.isMap(new Map);\n * // => true\n *\n * _.isMap(new WeakMap);\n * // => false\n */\nvar isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;\n\nmodule.exports = isMap;\n","/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n","var baseIsSet = require('./_baseIsSet'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsSet = nodeUtil && nodeUtil.isSet;\n\n/**\n * Checks if `value` is classified as a `Set` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n * @example\n *\n * _.isSet(new Set);\n * // => true\n *\n * _.isSet(new WeakSet);\n * // => false\n */\nvar isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;\n\nmodule.exports = isSet;\n","var baseIsTypedArray = require('./_baseIsTypedArray'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\nmodule.exports = isTypedArray;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeys = require('./_baseKeys'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\nmodule.exports = keys;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeysIn = require('./_baseKeysIn'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\nfunction keysIn(object) {\n return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n}\n\nmodule.exports = keysIn;\n","/**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\nfunction stubArray() {\n return [];\n}\n\nmodule.exports = stubArray;\n","/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n return false;\n}\n\nmodule.exports = stubFalse;\n","// Unique ID creation requires a high quality random # generator. In the browser we therefore\n// require the crypto API and do not support built-in fallback to lower quality random number\n// generators (like Math.random()).\nvar getRandomValues;\nvar rnds8 = new Uint8Array(16);\nexport default function rng() {\n // lazy load so that environments that need to polyfill have a chance to do so\n if (!getRandomValues) {\n // getRandomValues needs to be invoked in a context where \"this\" is a Crypto implementation. Also,\n // find the complete implementation of crypto (msCrypto) on IE11.\n getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto !== 'undefined' && typeof msCrypto.getRandomValues === 'function' && msCrypto.getRandomValues.bind(msCrypto);\n\n if (!getRandomValues) {\n throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');\n }\n }\n\n return getRandomValues(rnds8);\n}","export default /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;","import REGEX from './regex.js';\n\nfunction validate(uuid) {\n return typeof uuid === 'string' && REGEX.test(uuid);\n}\n\nexport default validate;","import validate from './validate.js';\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\n\nvar byteToHex = [];\n\nfor (var i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).substr(1));\n}\n\nfunction stringify(arr) {\n var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n var uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!validate(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n\n return uuid;\n}\n\nexport default stringify;","import rng from './rng.js';\nimport stringify from './stringify.js'; // **`v1()` - Generate time-based UUID**\n//\n// Inspired by https://github.com/LiosK/UUID.js\n// and http://docs.python.org/library/uuid.html\n\nvar _nodeId;\n\nvar _clockseq; // Previous uuid creation time\n\n\nvar _lastMSecs = 0;\nvar _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details\n\nfunction v1(options, buf, offset) {\n var i = buf && offset || 0;\n var b = buf || new Array(16);\n options = options || {};\n var node = options.node || _nodeId;\n var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not\n // specified. We do this lazily to minimize issues related to insufficient\n // system entropy. See #189\n\n if (node == null || clockseq == null) {\n var seedBytes = options.random || (options.rng || rng)();\n\n if (node == null) {\n // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)\n node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]];\n }\n\n if (clockseq == null) {\n // Per 4.2.2, randomize (14 bit) clockseq\n clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;\n }\n } // UUID timestamps are 100 nano-second units since the Gregorian epoch,\n // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so\n // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'\n // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.\n\n\n var msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock\n // cycle to simulate higher resolution clock\n\n var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs)\n\n var dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression\n\n if (dt < 0 && options.clockseq === undefined) {\n clockseq = clockseq + 1 & 0x3fff;\n } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new\n // time interval\n\n\n if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {\n nsecs = 0;\n } // Per 4.2.1.2 Throw error if too many uuids are requested\n\n\n if (nsecs >= 10000) {\n throw new Error(\"uuid.v1(): Can't create more than 10M uuids/sec\");\n }\n\n _lastMSecs = msecs;\n _lastNSecs = nsecs;\n _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch\n\n msecs += 12219292800000; // `time_low`\n\n var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;\n b[i++] = tl >>> 24 & 0xff;\n b[i++] = tl >>> 16 & 0xff;\n b[i++] = tl >>> 8 & 0xff;\n b[i++] = tl & 0xff; // `time_mid`\n\n var tmh = msecs / 0x100000000 * 10000 & 0xfffffff;\n b[i++] = tmh >>> 8 & 0xff;\n b[i++] = tmh & 0xff; // `time_high_and_version`\n\n b[i++] = tmh >>> 24 & 0xf | 0x10; // include version\n\n b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)\n\n b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low`\n\n b[i++] = clockseq & 0xff; // `node`\n\n for (var n = 0; n < 6; ++n) {\n b[i + n] = node[n];\n }\n\n return buf || stringify(b);\n}\n\nexport default v1;","import validate from './validate.js';\n\nfunction parse(uuid) {\n if (!validate(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n var v;\n var arr = new Uint8Array(16); // Parse ########-....-....-....-............\n\n arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24;\n arr[1] = v >>> 16 & 0xff;\n arr[2] = v >>> 8 & 0xff;\n arr[3] = v & 0xff; // Parse ........-####-....-....-............\n\n arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8;\n arr[5] = v & 0xff; // Parse ........-....-####-....-............\n\n arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8;\n arr[7] = v & 0xff; // Parse ........-....-....-####-............\n\n arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8;\n arr[9] = v & 0xff; // Parse ........-....-....-....-############\n // (Use \"/\" to avoid 32-bit truncation when bit-shifting high-order bytes)\n\n arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff;\n arr[11] = v / 0x100000000 & 0xff;\n arr[12] = v >>> 24 & 0xff;\n arr[13] = v >>> 16 & 0xff;\n arr[14] = v >>> 8 & 0xff;\n arr[15] = v & 0xff;\n return arr;\n}\n\nexport default parse;","import stringify from './stringify.js';\nimport parse from './parse.js';\n\nfunction stringToBytes(str) {\n str = unescape(encodeURIComponent(str)); // UTF8 escape\n\n var bytes = [];\n\n for (var i = 0; i < str.length; ++i) {\n bytes.push(str.charCodeAt(i));\n }\n\n return bytes;\n}\n\nexport var DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8';\nexport var URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8';\nexport default function (name, version, hashfunc) {\n function generateUUID(value, namespace, buf, offset) {\n if (typeof value === 'string') {\n value = stringToBytes(value);\n }\n\n if (typeof namespace === 'string') {\n namespace = parse(namespace);\n }\n\n if (namespace.length !== 16) {\n throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)');\n } // Compute hash of namespace and value, Per 4.3\n // Future: Use spread syntax when supported on all platforms, e.g. `bytes =\n // hashfunc([...namespace, ... value])`\n\n\n var bytes = new Uint8Array(16 + value.length);\n bytes.set(namespace);\n bytes.set(value, namespace.length);\n bytes = hashfunc(bytes);\n bytes[6] = bytes[6] & 0x0f | version;\n bytes[8] = bytes[8] & 0x3f | 0x80;\n\n if (buf) {\n offset = offset || 0;\n\n for (var i = 0; i < 16; ++i) {\n buf[offset + i] = bytes[i];\n }\n\n return buf;\n }\n\n return stringify(bytes);\n } // Function#name is not settable on some platforms (#270)\n\n\n try {\n generateUUID.name = name; // eslint-disable-next-line no-empty\n } catch (err) {} // For CommonJS default export support\n\n\n generateUUID.DNS = DNS;\n generateUUID.URL = URL;\n return generateUUID;\n}","/*\n * Browser-compatible JavaScript MD5\n *\n * Modification of JavaScript MD5\n * https://github.com/blueimp/JavaScript-MD5\n *\n * Copyright 2011, Sebastian Tschan\n * https://blueimp.net\n *\n * Licensed under the MIT license:\n * https://opensource.org/licenses/MIT\n *\n * Based on\n * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message\n * Digest Algorithm, as defined in RFC 1321.\n * Version 2.2 Copyright (C) Paul Johnston 1999 - 2009\n * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet\n * Distributed under the BSD License\n * See http://pajhome.org.uk/crypt/md5 for more info.\n */\nfunction md5(bytes) {\n if (typeof bytes === 'string') {\n var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape\n\n bytes = new Uint8Array(msg.length);\n\n for (var i = 0; i < msg.length; ++i) {\n bytes[i] = msg.charCodeAt(i);\n }\n }\n\n return md5ToHexEncodedArray(wordsToMd5(bytesToWords(bytes), bytes.length * 8));\n}\n/*\n * Convert an array of little-endian words to an array of bytes\n */\n\n\nfunction md5ToHexEncodedArray(input) {\n var output = [];\n var length32 = input.length * 32;\n var hexTab = '0123456789abcdef';\n\n for (var i = 0; i < length32; i += 8) {\n var x = input[i >> 5] >>> i % 32 & 0xff;\n var hex = parseInt(hexTab.charAt(x >>> 4 & 0x0f) + hexTab.charAt(x & 0x0f), 16);\n output.push(hex);\n }\n\n return output;\n}\n/**\n * Calculate output length with padding and bit length\n */\n\n\nfunction getOutputLength(inputLength8) {\n return (inputLength8 + 64 >>> 9 << 4) + 14 + 1;\n}\n/*\n * Calculate the MD5 of an array of little-endian words, and a bit length.\n */\n\n\nfunction wordsToMd5(x, len) {\n /* append padding */\n x[len >> 5] |= 0x80 << len % 32;\n x[getOutputLength(len) - 1] = len;\n var a = 1732584193;\n var b = -271733879;\n var c = -1732584194;\n var d = 271733878;\n\n for (var i = 0; i < x.length; i += 16) {\n var olda = a;\n var oldb = b;\n var oldc = c;\n var oldd = d;\n a = md5ff(a, b, c, d, x[i], 7, -680876936);\n d = md5ff(d, a, b, c, x[i + 1], 12, -389564586);\n c = md5ff(c, d, a, b, x[i + 2], 17, 606105819);\n b = md5ff(b, c, d, a, x[i + 3], 22, -1044525330);\n a = md5ff(a, b, c, d, x[i + 4], 7, -176418897);\n d = md5ff(d, a, b, c, x[i + 5], 12, 1200080426);\n c = md5ff(c, d, a, b, x[i + 6], 17, -1473231341);\n b = md5ff(b, c, d, a, x[i + 7], 22, -45705983);\n a = md5ff(a, b, c, d, x[i + 8], 7, 1770035416);\n d = md5ff(d, a, b, c, x[i + 9], 12, -1958414417);\n c = md5ff(c, d, a, b, x[i + 10], 17, -42063);\n b = md5ff(b, c, d, a, x[i + 11], 22, -1990404162);\n a = md5ff(a, b, c, d, x[i + 12], 7, 1804603682);\n d = md5ff(d, a, b, c, x[i + 13], 12, -40341101);\n c = md5ff(c, d, a, b, x[i + 14], 17, -1502002290);\n b = md5ff(b, c, d, a, x[i + 15], 22, 1236535329);\n a = md5gg(a, b, c, d, x[i + 1], 5, -165796510);\n d = md5gg(d, a, b, c, x[i + 6], 9, -1069501632);\n c = md5gg(c, d, a, b, x[i + 11], 14, 643717713);\n b = md5gg(b, c, d, a, x[i], 20, -373897302);\n a = md5gg(a, b, c, d, x[i + 5], 5, -701558691);\n d = md5gg(d, a, b, c, x[i + 10], 9, 38016083);\n c = md5gg(c, d, a, b, x[i + 15], 14, -660478335);\n b = md5gg(b, c, d, a, x[i + 4], 20, -405537848);\n a = md5gg(a, b, c, d, x[i + 9], 5, 568446438);\n d = md5gg(d, a, b, c, x[i + 14], 9, -1019803690);\n c = md5gg(c, d, a, b, x[i + 3], 14, -187363961);\n b = md5gg(b, c, d, a, x[i + 8], 20, 1163531501);\n a = md5gg(a, b, c, d, x[i + 13], 5, -1444681467);\n d = md5gg(d, a, b, c, x[i + 2], 9, -51403784);\n c = md5gg(c, d, a, b, x[i + 7], 14, 1735328473);\n b = md5gg(b, c, d, a, x[i + 12], 20, -1926607734);\n a = md5hh(a, b, c, d, x[i + 5], 4, -378558);\n d = md5hh(d, a, b, c, x[i + 8], 11, -2022574463);\n c = md5hh(c, d, a, b, x[i + 11], 16, 1839030562);\n b = md5hh(b, c, d, a, x[i + 14], 23, -35309556);\n a = md5hh(a, b, c, d, x[i + 1], 4, -1530992060);\n d = md5hh(d, a, b, c, x[i + 4], 11, 1272893353);\n c = md5hh(c, d, a, b, x[i + 7], 16, -155497632);\n b = md5hh(b, c, d, a, x[i + 10], 23, -1094730640);\n a = md5hh(a, b, c, d, x[i + 13], 4, 681279174);\n d = md5hh(d, a, b, c, x[i], 11, -358537222);\n c = md5hh(c, d, a, b, x[i + 3], 16, -722521979);\n b = md5hh(b, c, d, a, x[i + 6], 23, 76029189);\n a = md5hh(a, b, c, d, x[i + 9], 4, -640364487);\n d = md5hh(d, a, b, c, x[i + 12], 11, -421815835);\n c = md5hh(c, d, a, b, x[i + 15], 16, 530742520);\n b = md5hh(b, c, d, a, x[i + 2], 23, -995338651);\n a = md5ii(a, b, c, d, x[i], 6, -198630844);\n d = md5ii(d, a, b, c, x[i + 7], 10, 1126891415);\n c = md5ii(c, d, a, b, x[i + 14], 15, -1416354905);\n b = md5ii(b, c, d, a, x[i + 5], 21, -57434055);\n a = md5ii(a, b, c, d, x[i + 12], 6, 1700485571);\n d = md5ii(d, a, b, c, x[i + 3], 10, -1894986606);\n c = md5ii(c, d, a, b, x[i + 10], 15, -1051523);\n b = md5ii(b, c, d, a, x[i + 1], 21, -2054922799);\n a = md5ii(a, b, c, d, x[i + 8], 6, 1873313359);\n d = md5ii(d, a, b, c, x[i + 15], 10, -30611744);\n c = md5ii(c, d, a, b, x[i + 6], 15, -1560198380);\n b = md5ii(b, c, d, a, x[i + 13], 21, 1309151649);\n a = md5ii(a, b, c, d, x[i + 4], 6, -145523070);\n d = md5ii(d, a, b, c, x[i + 11], 10, -1120210379);\n c = md5ii(c, d, a, b, x[i + 2], 15, 718787259);\n b = md5ii(b, c, d, a, x[i + 9], 21, -343485551);\n a = safeAdd(a, olda);\n b = safeAdd(b, oldb);\n c = safeAdd(c, oldc);\n d = safeAdd(d, oldd);\n }\n\n return [a, b, c, d];\n}\n/*\n * Convert an array bytes to an array of little-endian words\n * Characters >255 have their high-byte silently ignored.\n */\n\n\nfunction bytesToWords(input) {\n if (input.length === 0) {\n return [];\n }\n\n var length8 = input.length * 8;\n var output = new Uint32Array(getOutputLength(length8));\n\n for (var i = 0; i < length8; i += 8) {\n output[i >> 5] |= (input[i / 8] & 0xff) << i % 32;\n }\n\n return output;\n}\n/*\n * Add integers, wrapping at 2^32. This uses 16-bit operations internally\n * to work around bugs in some JS interpreters.\n */\n\n\nfunction safeAdd(x, y) {\n var lsw = (x & 0xffff) + (y & 0xffff);\n var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n return msw << 16 | lsw & 0xffff;\n}\n/*\n * Bitwise rotate a 32-bit number to the left.\n */\n\n\nfunction bitRotateLeft(num, cnt) {\n return num << cnt | num >>> 32 - cnt;\n}\n/*\n * These functions implement the four basic operations the algorithm uses.\n */\n\n\nfunction md5cmn(q, a, b, x, s, t) {\n return safeAdd(bitRotateLeft(safeAdd(safeAdd(a, q), safeAdd(x, t)), s), b);\n}\n\nfunction md5ff(a, b, c, d, x, s, t) {\n return md5cmn(b & c | ~b & d, a, b, x, s, t);\n}\n\nfunction md5gg(a, b, c, d, x, s, t) {\n return md5cmn(b & d | c & ~d, a, b, x, s, t);\n}\n\nfunction md5hh(a, b, c, d, x, s, t) {\n return md5cmn(b ^ c ^ d, a, b, x, s, t);\n}\n\nfunction md5ii(a, b, c, d, x, s, t) {\n return md5cmn(c ^ (b | ~d), a, b, x, s, t);\n}\n\nexport default md5;","import v35 from './v35.js';\nimport md5 from './md5.js';\nvar v3 = v35('v3', 0x30, md5);\nexport default v3;","import rng from './rng.js';\nimport stringify from './stringify.js';\n\nfunction v4(options, buf, offset) {\n options = options || {};\n var rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n offset = offset || 0;\n\n for (var i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n\n return buf;\n }\n\n return stringify(rnds);\n}\n\nexport default v4;","// Adapted from Chris Veness' SHA1 code at\n// http://www.movable-type.co.uk/scripts/sha1.html\nfunction f(s, x, y, z) {\n switch (s) {\n case 0:\n return x & y ^ ~x & z;\n\n case 1:\n return x ^ y ^ z;\n\n case 2:\n return x & y ^ x & z ^ y & z;\n\n case 3:\n return x ^ y ^ z;\n }\n}\n\nfunction ROTL(x, n) {\n return x << n | x >>> 32 - n;\n}\n\nfunction sha1(bytes) {\n var K = [0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xca62c1d6];\n var H = [0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0];\n\n if (typeof bytes === 'string') {\n var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape\n\n bytes = [];\n\n for (var i = 0; i < msg.length; ++i) {\n bytes.push(msg.charCodeAt(i));\n }\n } else if (!Array.isArray(bytes)) {\n // Convert Array-like to Array\n bytes = Array.prototype.slice.call(bytes);\n }\n\n bytes.push(0x80);\n var l = bytes.length / 4 + 2;\n var N = Math.ceil(l / 16);\n var M = new Array(N);\n\n for (var _i = 0; _i < N; ++_i) {\n var arr = new Uint32Array(16);\n\n for (var j = 0; j < 16; ++j) {\n arr[j] = bytes[_i * 64 + j * 4] << 24 | bytes[_i * 64 + j * 4 + 1] << 16 | bytes[_i * 64 + j * 4 + 2] << 8 | bytes[_i * 64 + j * 4 + 3];\n }\n\n M[_i] = arr;\n }\n\n M[N - 1][14] = (bytes.length - 1) * 8 / Math.pow(2, 32);\n M[N - 1][14] = Math.floor(M[N - 1][14]);\n M[N - 1][15] = (bytes.length - 1) * 8 & 0xffffffff;\n\n for (var _i2 = 0; _i2 < N; ++_i2) {\n var W = new Uint32Array(80);\n\n for (var t = 0; t < 16; ++t) {\n W[t] = M[_i2][t];\n }\n\n for (var _t = 16; _t < 80; ++_t) {\n W[_t] = ROTL(W[_t - 3] ^ W[_t - 8] ^ W[_t - 14] ^ W[_t - 16], 1);\n }\n\n var a = H[0];\n var b = H[1];\n var c = H[2];\n var d = H[3];\n var e = H[4];\n\n for (var _t2 = 0; _t2 < 80; ++_t2) {\n var s = Math.floor(_t2 / 20);\n var T = ROTL(a, 5) + f(s, b, c, d) + e + K[s] + W[_t2] >>> 0;\n e = d;\n d = c;\n c = ROTL(b, 30) >>> 0;\n b = a;\n a = T;\n }\n\n H[0] = H[0] + a >>> 0;\n H[1] = H[1] + b >>> 0;\n H[2] = H[2] + c >>> 0;\n H[3] = H[3] + d >>> 0;\n H[4] = H[4] + e >>> 0;\n }\n\n return [H[0] >> 24 & 0xff, H[0] >> 16 & 0xff, H[0] >> 8 & 0xff, H[0] & 0xff, H[1] >> 24 & 0xff, H[1] >> 16 & 0xff, H[1] >> 8 & 0xff, H[1] & 0xff, H[2] >> 24 & 0xff, H[2] >> 16 & 0xff, H[2] >> 8 & 0xff, H[2] & 0xff, H[3] >> 24 & 0xff, H[3] >> 16 & 0xff, H[3] >> 8 & 0xff, H[3] & 0xff, H[4] >> 24 & 0xff, H[4] >> 16 & 0xff, H[4] >> 8 & 0xff, H[4] & 0xff];\n}\n\nexport default sha1;","import v35 from './v35.js';\nimport sha1 from './sha1.js';\nvar v5 = v35('v5', 0x50, sha1);\nexport default v5;","export default '00000000-0000-0000-0000-000000000000';","import validate from './validate.js';\n\nfunction version(uuid) {\n if (!validate(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n return parseInt(uuid.substr(14, 1), 16);\n}\n\nexport default version;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = (module) => {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","import { connect, type ConnectConfig } from \"@openfin/core-web\";\nimport type {\n\tAPIOptions,\n\tClientOptions,\n\tConnectOptionsRequestContext,\n\tDefaultAPIContainerShape,\n\tDefaultFDC3Type,\n\tDefaultFinType,\n\tRequestConnectOptions\n} from \"./client-shapes\";\n\nconst DEFAULT_LOGGER = {\n\terror: console.error,\n\twarn: console.warn,\n\tinfo: console.info\n};\n\nconst DEFAULT_CONNECT_OPTIONS: ConnectConfig = {\n\tconnectionInheritance: \"enabled\"\n};\n\nconst DEFAULT_OPTIONS: APIOptions = {\n\tfin: true,\n\tfdc3: true,\n\tfdc3Version: \"2.0\"\n};\n\n/**\n * Requests the connection options from the parent window.\n * @param options - The options to use when requesting the connection options.\n * @returns A promise that resolves with the connection options.\n */\nasync function requestConnectOptions(options: RequestConnectOptions): Promise {\n\treturn new Promise((resolve, reject) => {\n\t\tconst requestContext: ConnectOptionsRequestContext = {\n\t\t\ttype: \"openfin.coreWeb.connectConfig\"\n\t\t};\n\t\tconst timer = setTimeout(() => {\n\t\t\treject(new Error(\"Timed out waiting for connection options.\"));\n\t\t}, options.timeout ?? 3000);\n\t\t/**\n\t\t * Handles the message event and resolves the promise with the connection options.\n\t\t * @param event - The message event.\n\t\t */\n\t\tasync function messageHandler(event: MessageEvent): Promise {\n\t\t\tif (Array.isArray(options.receivingOrigin) && !options.receivingOrigin.includes(event.origin)) {\n\t\t\t\treject(new Error(`Received message from unexpected origin: ${event.origin}`));\n\t\t\t} else if (event.data && event.data.type === \"openfin.coreWeb.connectConfig\") {\n\t\t\t\twindow.removeEventListener(\"message\", messageHandler);\n\t\t\t\tconst connectConfig = event.data.connectConfig;\n\t\t\t\tif (connectConfig === undefined) {\n\t\t\t\t\treject(new Error(\"No connection options were provided.\"));\n\t\t\t\t} else {\n\t\t\t\t\tclearTimeout(timer);\n\t\t\t\t\tresolve(connectConfig);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\twindow.addEventListener(\"message\", messageHandler);\n\t\tlet target = window.top ?? window.parent;\n\t\tif (options.target === \"parent\") {\n\t\t\ttarget = window.parent;\n\t\t}\n\t\ttarget.postMessage(requestContext, options.targetOrigin ?? \"*\");\n\t});\n}\n\n/**\n * Initializes (if required) and returns the fin and fdc3 API objects based on the options provided.\n * @param options - The options to use when initializing the API objects.\n * @returns A promise that resolves with the fin and fdc3 API objects.\n */\nexport async function getAPI(\n\toptions: ClientOptions\n): Promise> {\n\tconst response: DefaultAPIContainerShape = {};\n\tlet finInitialized = false;\n\tlet fdc3Initialized = false;\n\n\tif (options.api === undefined) {\n\t\toptions.api = DEFAULT_OPTIONS;\n\t}\n\tif (options.logger === undefined) {\n\t\toptions.logger = DEFAULT_LOGGER;\n\t}\n\tif (options.api.fin) {\n\t\tif (\n\t\t\ttypeof window !== \"undefined\" &&\n\t\t\ttypeof (window as unknown as { fin: DefaultFinType }).fin === \"object\"\n\t\t) {\n\t\t\toptions.logger.info(\n\t\t\t\t\"Fin API instance already exists. Using the reference that exists in the window object.\"\n\t\t\t);\n\t\t\tresponse.fin = (window as unknown as { fin: DefaultFinType }).fin;\n\t\t} else {\n\t\t\tlet newFin: DefaultFinType | undefined;\n\t\t\ttry {\n\t\t\t\toptions.logger.info(\n\t\t\t\t\t`Creating Fin API instance through @openfin/core-web connect using the following options. \n\t\t\t\t\tConnect Options: \n\t\t\t\t\t${JSON.stringify(options.connectOptions)} \n\t\t\t\t\tRequest Connect Options:\n\t\t\t\t\t${JSON.stringify(options.requestConnectOptions)}`\n\t\t\t\t);\n\t\t\t\tif (options.connectOptions !== undefined) {\n\t\t\t\t\toptions.logger.info(\"Creating Fin API instance using the connect options provided.\");\n\t\t\t\t\tnewFin = (await connect(options.connectOptions)) as unknown as DefaultFinType;\n\t\t\t\t} else if (\n\t\t\t\t\toptions.requestConnectOptions !== undefined &&\n\t\t\t\t\toptions.requestConnectOptions.strategy === \"request\"\n\t\t\t\t) {\n\t\t\t\t\tconst connectConfig = await requestConnectOptions(options.requestConnectOptions);\n\t\t\t\t\toptions.logger.info(\"Creating Fin API instance using the request connect options provided.\");\n\t\t\t\t\tnewFin = (await connect(connectConfig)) as unknown as DefaultFinType;\n\t\t\t\t} else {\n\t\t\t\t\toptions.logger.info(\"Creating Fin API instance using the default connect options.\");\n\t\t\t\t\tnewFin = (await connect(DEFAULT_CONNECT_OPTIONS)) as unknown as DefaultFinType;\n\t\t\t\t}\n\t\t\t} catch (err) {\n\t\t\t\tif (\n\t\t\t\t\terr instanceof Error &&\n\t\t\t\t\terr.message.includes(\"Broker URL was not specified nor provided by a platform container\") &&\n\t\t\t\t\toptions.requestConnectOptions?.strategy === \"request-on-failure\"\n\t\t\t\t) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tconst requestedConnectConfig = await requestConnectOptions(options.requestConnectOptions);\n\t\t\t\t\t\toptions.logger.info(\n\t\t\t\t\t\t\t\"As the broker url was not specified nor provided by a platform provider and request-on-failure was specified as the requestConnectOptions strategy we will try to connect again using this strategy to see if it is supported by the platform.\"\n\t\t\t\t\t\t);\n\t\t\t\t\t\tnewFin = (await connect(requestedConnectConfig)) as unknown as DefaultFinType;\n\t\t\t\t\t} catch (requestError) {\n\t\t\t\t\t\toptions.logger.error(\n\t\t\t\t\t\t\t`Error creating Fin API instance through @openfin/core-web connect using the following using the request-on-failure strategy and the following options: \n\t\t\t\t\t\t\tConnect Options: \n\t\t\t\t\t\t\t${JSON.stringify(options.connectOptions)} \n\t\t\t\t\t\t\tRequest Connect Options:\n\t\t\t\t\t\t\t${JSON.stringify(options.requestConnectOptions)}`,\n\t\t\t\t\t\t\trequestError as Error\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\toptions.logger.error(\n\t\t\t\t\t\t`Error creating Fin API instance through @openfin/core-web connect using the following options: \n\t\t\t\t\t\tConnect Options: \n\t\t\t\t\t\t${JSON.stringify(options.connectOptions)} \n\t\t\t\t\t\tRequest Connect Options:\n\t\t\t\t\t\t${JSON.stringify(options.requestConnectOptions)}`,\n\t\t\t\t\t\terr as Error\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (newFin === undefined) {\n\t\t\t\tthrow new Error(\"Failed to create a fin API instance.\");\n\t\t\t}\n\t\t\tresponse.fin = newFin;\n\t\t\tfinInitialized = true;\n\t\t}\n\t}\n\n\tif (options.api.fdc3) {\n\t\tif (typeof window !== \"undefined\" && typeof (window as unknown as { fdc3: FDC3 }).fdc3 === \"object\") {\n\t\t\toptions.logger.info(\n\t\t\t\t\"fdc3 API instance already exists. Using the reference that exists in the window object.\"\n\t\t\t);\n\t\t\tresponse.fdc3 = (window as unknown as { fdc3: FDC3 }).fdc3;\n\t\t} else if (response.fin?.me?.interop?.getFDC3 !== undefined) {\n\t\t\tconst fdc3Version = options.api.fdc3Version ?? \"2.0\";\n\t\t\ttry {\n\t\t\t\toptions.logger.info(\n\t\t\t\t\t`Creating fdc3 API through the @openfin/core-web getFDC3 function specifying version ${fdc3Version}.`\n\t\t\t\t);\n\t\t\t\tresponse.fdc3 = (await response.fin.me.interop.getFDC3(fdc3Version)) as FDC3;\n\t\t\t\tfdc3Initialized = true;\n\t\t\t} catch (err) {\n\t\t\t\toptions.logger.error(\n\t\t\t\t\t`Error creating fdc3 API through the @openfin/core-web getFDC3 function specifying version ${fdc3Version}.`,\n\t\t\t\t\terr as Error\n\t\t\t\t);\n\t\t\t}\n\t\t} else {\n\t\t\toptions.logger.error(\n\t\t\t\t\"Creating an fdc3 API through the @openfin/core-web getFDC3 function isn't possible without the @openfin/core-web fin api being available. If you are running inside of a container please enable FDC3 for your view/window.\"\n\t\t\t);\n\t\t}\n\t}\n\n\tif (options.target !== undefined) {\n\t\tconst targetIsWindow = (options.target as unknown) === window;\n\t\tif (response.fin !== undefined) {\n\t\t\toptions.target.fin = response.fin;\n\n\t\t\tif (targetIsWindow && finInitialized) {\n\t\t\t\t// Create and dispatch the finReady event\n\t\t\t\tconst event = new CustomEvent(\"finReady\");\n\t\t\t\twindow.dispatchEvent(event);\n\t\t\t}\n\t\t}\n\t\tif (response.fdc3 !== undefined) {\n\t\t\toptions.target.fdc3 = response.fdc3;\n\t\t\tif (targetIsWindow && fdc3Initialized) {\n\t\t\t\t// Create and dispatch the FDC3Ready event\n\t\t\t\tconst event = new CustomEvent(\"fdc3Ready\");\n\t\t\t\twindow.dispatchEvent(event);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn response;\n}\n"],"names":["e","exports","connect","t","n","i","r","o","btoa","JSON","stringify","s","globalThis","window","g","self","a","c","d","h","async","l","push","Object","defineProperty","value","promiseMapSerial","serial","promiseMap","promisify","Promise","all","map","u","p","__classPrivateFieldSet","TypeError","has","call","set","w","__classPrivateFieldGet","get","Reply","EmitterBase","Base","y","f","constructor","this","isNodeEnvironment","wire","environment","type","isOpenFinEnvironment","isBrowserEnvironment","fin","getFin","me","super","topic","eventNames","hasEmitter","getOrCreateEmitter","emit","eventAggregator","getOrCreate","listeners","listenerCount","registerEventListener","identity","timestamp","Date","now","sendAction","deleteEmitterIfNothingRegistered","deregisterEventListener","catch","resolve","on","removeListener","addListener","once","prependListener","prependOnceListener","deregisterAllListeners","removeAllListeners","length","delete","WeakMap","m","RuntimeError","NotSupportedError","NotImplementedError","NoAckError","DuplicateCorrelationError","UnexpectedActionError","DisconnectedError","v","Error","readyState","C","b","I","E","x","A","message","name","stack","toString","keys","forEach","P","getCallSite","stackTraceLimit","prepareStackTrace","slice","reason","error","cause","M","_","O","validateIdentity","uuid","$","S","R","F","j","k","L","T","handleDeprecatedWarnings","contentNavigation","whitelist","blacklist","contentRedirect","console","warn","B","G","AsyncRetryableLazy","W","Lazy","producerFn","getValue","promise","H","WebContents","N","D","entityType","capturePage","options","then","payload","data","executeJavaScript","code","getZoomLevel","setZoomLevel","level","navigate","url","navigateBack","navigateForward","stopNavigation","reload","ignoreCache","print","findInPage","searchTerm","stopFindInPage","action","getPrinters","focus","emitSynthFocused","showDeveloperTools","getProcessInfo","getSharedWorkers","inspectSharedWorker","inspectSharedWorkerById","workerId","inspectServiceWorker","showPopupWindow","onPopupReady","popupName","Window","wrapSync","hasResultCallback","onPopupResult","hasReadyCallback","willOpen","create","initialOptions","result","U","V","z","K","q","J","__createBinding","getOwnPropertyDescriptor","__esModule","writable","configurable","enumerable","__exportStar","prototype","hasOwnProperty","ViewModule","childViews","createChildContent","wrap","View","getCurrent","isView","getCurrentSync","ie","Platform","getClient","attach","target","destroy","show","showAt","bounds","bringToFront","hide","setBounds","getBounds","getInfo","getParentLayout","Layout","getLayoutByViewIdentity","getOptions","updateOptions","getCurrentWindow","_Window","getCurrentStack","getStackByViewIdentity","triggerBeforeUnload","bindToElement","observeBounds","focusedWebViewWasChanged","Y","Application","windowListFromIdentityList","isRunning","quit","_close","force","some","includes","close","getChildWindows","getManifest","getParentUuid","getShortcuts","getViews","getWindow","registerUser","userName","appName","removeTrayIcon","restart","run","_run","manifestUrl","_manifestUrl","opts","scheduleRestart","sendApplicationLog","setJumpList","config","setTrayIcon","enabledIcon","setShortcuts","setShortcutQueryParams","setAppLogUsername","getTrayIconInfo","hasTrayIcon","terminate","wait","setFileDownloadLocation","downloadLocation","getFileDownloadLocation","showTrayIconPopupMenu","closeTrayIconPopupMenu","Z","ApplicationModule","_create","waitForPageLoad","autoShow","isPlatformController","start","startManyManifests","applications","startFromManifest","_createFromManifest","createFromManifest","platform","startup_app","X","ee","te","Q","ne","createWindow","promisifySubscription","success","httpResponseCode","apiInjected","networkErrorCode","cbPayload","getWebWindow","__internal_","openerSuccessCBCalled","reject","getAllFrames","center","blur","animate","transitions","setPrototypeOf","getNativeId","getCurrentViews","disableFrame","disableUserMovement","enableFrame","enableUserMovement","flash","stopFlashing","getLayout","layout","layoutSnapshot","getParentApplication","getParentWindow","getSnapshot","area","getState","isMainWindow","isShowing","maximize","minimize","moveBy","deltaLeft","deltaTop","positioningOptions","moveTo","left","top","resizeBy","deltaWidth","Math","floor","deltaHeight","anchor","resizeTo","width","height","restore","setAsForeground","authenticate","password","showPopupMenu","closePopupMenu","dispatchPopupResult","content","_WindowModule","isWindow","clearTimeout","setTimeout","finally","System","re","oe","se","ae","ce","sendExternalProcessRequest","listener","processUuid","exitCode","getVersion","clearCache","deleteCacheOnExit","exit","fetchManifest","flushCookieStore","getAllWindows","getAllApplications","getCommandLineArguments","getCrashReporterState","diagnosticMode","diagnosticsMode","startCrashReporter","getUniqueUserId","getEntityInfo","getEnvironmentVariable","environmentVariables","getFocusedWindow","isAppCertified","certifiedInfo","getInstalledRuntimes","runtimes","getInstalledApps","installedApps","getLog","getMachineId","getMinLogLevel","getLogList","getMonitorInfo","getMousePosition","getProcessList","getAllProcessInfo","getProxySettings","getRuntimeInfo","getRvmInfo","getHostSpecs","getOSInfo","launchExternalProcess","monitorExternalProcess","log","openUrlWithBrowser","registerCustomProtocol","unregisterCustomProtocol","protocolName","getCustomProtocolState","releaseExternalProcess","terminateExternalProcess","updateProxySettings","downloadAsset","getNextMessageId","downloadedBytes","totalBytes","err","assign","downloadId","downloadRuntime","downloadPreloadScripts","scripts","getAllExternalApplications","getAppAssetInfo","getCookies","getUrl","setMinLogLevel","resolveUuid","entityKey","executeOnRemote","requestingIdentity","ferryAction","readRegistryValue","rootKey","subkey","registerExternalConnection","getServiceConfiguration","getSystemAppConfig","registerShutdownHandler","proceed","raiseEvent","runRvmHealthCheck","launchManifest","subscribe","EventEmitter","appVersionId","find","manifest","queryPermissionForCurrentContext","apiName","enableNativeWindowIntegrationProvider","permissions","registerUsage","updateProcessLoggingOptions","getDomainSettings","setDomainSettings","domainSettings","refreshExtensions","getInstalledExtensions","de","he","RefCounter","topicRefMap","Map","incRefCount","decRefCount","actOnFirst","actOnLast","le","ue","pe","ChannelBase","ProtectedItems","we","providerIdentity","ye","defaultAction","subscriptions","processAction","preAction","postAction","errorMiddleware","beforeAction","onError","afterAction","remove","setDefaultAction","register","fe","ge","ve","Ce","ChannelClient","be","Ie","Ee","closeChannelByEndpointId","handleProviderDisconnect","values","channelId","disconnectListener","endpointId","receive","dispatch","isEndpointConnected","send","onDisconnection","disconnect","sendDisconnectAction","wireClose","channelName","xe","Ae","exhaustiveCheck","join","Pe","Me","_e","Oe","Se","Re","ClassicInfo","ClassicStrategy","messageReceiver","isLocalEndpointId","add","removeEndpoint","closeEndpoint","onEndpointDisconnect","addEndpoint","cancel","endpointIdentity","Set","isValidEndpointPayload","version","minimumVersion","Fe","je","ke","errorToPOJO","Le","Te","$e","Be","RTCEndpoint","Ge","rtc","responseMap","connectionStateChangeHandler","rtcClient","connectionState","removeEventListener","random","channels","request","messageId","response","addEventListener","ArrayBuffer","TextDecoder","decode","parse","onclose","onDisconnect","connected","We","He","Ne","De","Ue","Ve","EndpointStrategy","EndpointType","StrategyName","getEndpointById","RTCInfo","RTCStrategy","ze","Ke","qe","Je","RTCICEManager","Ye","Ze","ensureChannelOpened","createDataChannelPromise","channel","label","listenForProviderIce","createProviderEventName","raiseProviderIce","createRouteString","listenForClientIce","createClientEventName","raiseClientIce","cleanupIceListeners","createRtcPeer","getRtcPeer","startClientOffer","candidate","toJSON","addIceCandidate","createDataChannel","createOffer","setLocalDescription","offer","rtcConnectionId","channelsOpened","finishClientOffer","setRemoteDescription","createProviderAnswer","createAnswer","answer","Qe","Xe","et","split","reverse","entries","reduce","tt","nt","runtimeUuidMeetsMinimumRuntimeVersion","parseRuntimeUuid","meetsMinimumRuntimeVersion","it","rt","ot","st","at","ct","dt","ChannelProvider","ht","lt","ut","connections","handleClientDisconnection","filter","setProviderRemoval","removalMap","clientIsMultiRuntime","runtimeUuid","handleMultiRuntimeLegacyClient","checkForClientConnection","connectListener","getEndpointIdForOpenFinId","processConnection","publish","onConnection","getAllClientInfo","connectionUrl","isClientConnected","clientIdentityIncludesEndpointId","isLegacyClientConnected","pop","pt","MessageReceiver","wt","yt","ft","onmessage","processChannelMessage","endpointMap","latestEndpointIdByChannelId","registerMessageHandler","bind","senderIdentity","ackToSender","intendedTargetIdentity","sendRaw","checkForPreviousClientConnection","gt","ProtocolManager","ProtocolsInPreferenceOrder","DefaultClientProtocols","DefaultProviderProtocols","getClientProtocols","getProviderProtocols","getCompatibleProtocols","supportedProtocols","maxProtocols","mt","vt","combine","primary","secondary","default","Ct","bt","It","Et","xt","__importDefault","ConnectionManager","At","Pt","Mt","_t","Ot","St","Rt","Ft","jt","kt","getProtocolOptionsFromStrings","removeChannelFromProviderMap","providerMap","processChannelConnection","protocolManager","createProvider","getDefaultChannelOptions","protocols","provider","strategy","createClientOffer","createClientStrategy","clientIdentity","endpointPayloadPromise","Lt","Tt","$t","Bt","Gt","Channel","Wt","Ht","Nt","Dt","Ut","Vt","zt","min","Kt","getAllChannels","onChannelConnect","onChannelDisconnect","safeConnect","count","gotConnectedEvent","race","retryInfo","originalMessageId","isFrame","InterAppPayload","InterApplicationBus","qt","Jt","Yt","Zt","Qt","Xt","events","subscriberAdded","subscriberRemoved","refCounter","emitter","sourceWindowName","destinationUuid","destinationWindowName","createSubscriptionKey","sourceUuid","unsubscribe","processMessage","emitSubscriverEvent","targetName","Buffer","from","en","Clipboard","tn","nn","writeText","readText","writeImage","readImage","format","writeHtml","readHtml","writeRtf","readRtf","write","getAvailableFormats","rn","sn","ExternalApplication","an","cn","ExternalApplicationModule","dn","hn","ln","un","pn","wn","_Frame","yn","fn","_FrameModule","gn","mn","vn","Cn","getCurrentEntityIdentity","bn","GlobalHotkey","In","En","hotkey","unregister","unregisterAll","isRegistered","xn","An","Pn","Mn","_n","On","Sn","Rn","Fn","_channel","launchLegacyManifest","launchContentManifest","createView","targetView","closeView","view","reparentView","getViewSnapshot","viewIdentity","applySnapshot","windows","snapshot","setWindowContext","context","getWindowContext","closeWindow","skipBeforeUnload","windowId","jn","kn","Ln","Tn","$n","overrideFromComposables","isValidPresetType","reduceRight","Bn","Gn","Wn","ApiConsumer","consume","getExposedFunctions","key","createFunction","Hn","Nn","expose","getExposedProperties","Dn","Symbol","descriptor","ApiExposer","Un","exposeInstance","exposeFunction","meta","exposeMeta","Vn","zn","Kn","ChannelsConsumer","id","props","args","qn","ChannelsExposer","channelProviderOrClient","Jn","createRelayedDispatch","relayChannelClientApi_1","relayChannelClientApi","Yn","Zn","Qn","Xn","ei","ti","ColumnOrRow","TabStack","LayoutNode","ni","ii","ri","isRoot","entityId","exists","getParent","getEntity","createAdjacentStack","getAdjacentStacks","targetId","edge","newLayoutEntitiesClient","si","oi","getStackViews","addView","index","addViewToStack","removeView","removeViewFromStack","setActiveView","setStackActiveView","getContent","ai","DEFAULT_LAYOUT_KEY","LAYOUT_CONTROLLER_ID","ci","di","hi","li","ui","pi","wi","yi","fi","gi","mi","replace","replaceView","viewToReplace","newView","applyPreset","presetType","init","getConfig","getRootItem","getRoot","getStackByView","location","viewOptions","WeakSet","vi","Ci","bi","Ii","Ei","xi","Ai","LayoutModule","Pi","Mi","_i","Oi","arguments","layoutAllowedInContext","initLayoutManager","applyLayoutSnapshot","layoutManagerOverride","layoutName","Proxy","layoutManager","getCurrentLayoutManagerSync","createLayout","destroyLayout","getViewWindowIdentity","getLayoutIdentityForViewOrThrow","PlatformModule","Si","Ri","Fi","ji","isPlatform","initPlatform","ki","getMe","getBaseMe","environmentUnsupportedMessage","isExternal","setContext","addContextHandler","getContextGroups","joinContextGroup","removeFromContextGroup","getAllClientsInContextGroup","getInfoForContextGroup","interop","isOpenFin","Li","Ti","$i","createWarningObject","createUnusableObject","apply","construct","deleteProperty","getPrototypeOf","isExtensible","ownKeys","preventExtensions","Reflect","Bi","Gi","Wi","Hi","wrapIntentHandler","BROKER_ERRORS","generateOverrideWarning","generateOverrideError","wrapContextHandler","wrapInTryCatch","generateId","fireIntent","fireIntentForContext","getInfoForIntent","getInfoForIntentsByContext","joinSessionContextGroupWithJoinContextGroup","fdc3Open","fdc3FindInstances","fdc3GetAppMetadata","fdc3GetInfo","Ni","Di","Ui","Vi","InteropBroker","Cr","lastContext","contextGroupMap","clients","registerListeners","getCurrentContext","handlerAdded","handlerRemoved","checkContextIntegrity","isValid","getClientState","Array","contextHandlers","globalHandler","handlerId","contextType","indexOf","splice","registerNewClient","PrivateChannelProvider","contextByContextType","handleClientDisconnecting","broadcast","contextHandlerAdded","contextHandlerRemoved","nonStandardHandlerRemoved","onAddContextHandlerAdded","onDisconnectHandlerAdded","onUnsubscribeHandlerAdded","handlerIdsByContextTypes","onAddContextListenerHandlerId","getConnectedClients","onUnsubscribeHandlerId","onDisconnectHandlerId","removeClient","clear","fireOnDisconnectForOtherClients","unsubscribeAll","flat","displayMetadata","color","getProvider","interopClients","contextGroupsById","contextGroups","fdc3Info","logging","intentClientMap","lastContextMap","sessionContextGroupMap","setContextGroupMap","setupChannelProvider","createClosedConstructor","contextGroupId","setContextForGroup","isContextTypeCompatible","invokeContextHandler","hasEndpointId","addClientToContextGroup","setCurrentContextGroupInClientOptions","removeClientFromContextGroup","handleFiredIntent","setIntentTarget","pendingIntents","isReady","invokeIntentHandler","handleInfoForIntent","handleInfoForIntentsByContext","handleFiredIntentForContext","clientDisconnected","fdc3HandleOpen","app","fdc3HandleFindInstances","fdc3HandleGetAppMetadata","fdc3HandleGetInfo","fdc3Version","optionalFeatures","OriginatingAppMetadata","UserChannelMembershipAPIs","appMetadata","appId","instanceId","decorateSnapshot","interopSnapshotDetails","contextGroupStates","getContextGroupStates","closeExistingWindows","updateExistingClients","rehydrateContextGroupStates","toObject","contextHandlerRegistered","intentHandlerRegistered","removeContextHandler","handleJoinSessionContextGroup","sessionContextGroupId","hasConflict","fromEntries","currentContextGroup","wireChannel","isConnectionAuthorized","isActionAuthorized","enabled","zi","Ki","qi","Ji","Yi","Zi","Qi","Xi","createUnsubscribeCb","getUserInstance","er","tr","nr","ir","rr","or","__setModuleDefault","sr","__importStar","PrivateChannelClient","ar","cr","dr","hr","FDC3ModuleBase","wr","client","_open","InteropClient","ferryFdc3Call","_getChannels","getUnsupportedChannelApis","getOrCreateChannel","joinSessionContextGroup","buildAppChannelObject","ChannelError","CreationFailed","getSystemChannels","joinChannel","startsWith","NoChannelFound","AccessDenied","getCurrentChannel","getCurrentContextGroupInfo","buildChannelObject","leaveCurrentChannel","findIndex","addContextListener","createContextUnsubscribeCb","createNonStandardUnsubscribeCb","onAddContextListener","onUnsubscribe","cleanUpAllSubs","getIntentResolution","isChannel","isContext","connectPrivateChannel","buildPrivateChannelObject","ResultError","UnsupportedChannelApiError","NoResultReturned","IntentHandlerRejected","intentResolutionResultId","metadata","source","intent","getResult","lr","ur","pr","Fdc3Module","open","addIntentListener","registerIntentHandler","raiseIntent","findIntent","findIntentsByContext","raiseIntentForContext","providerVersion","getAdapterVersionSync","Fdc3Module2","findInstances","getAppMetadata","contextMetadata","resultType","createPrivateChannel","getUserChannels","joinUserChannel","brokerName","getFDC3Sync","getFDC3","yr","fr","gr","mr","vr","overrideCheck","checkFDC32Overrides","getDefaultViewFdc3VersionFromAppInfo","defaultViewOptions","fdc3InteropApi","InteropModule","getInteropInfo","isArray","connectSync","whenReady","br","Ir","Er","xr","getSnapshotSourceChannelName","Ar","Pr","Mr","_r","Or","Sr","Rr","SnapshotSource","Fr","jr","kr","Lr","eventFired","clientPromise","ready","SnapshotSourceModule","Tr","$r","Br","Gr","Wr","Fin","Hr","Nr","Dr","Ur","Vr","zr","Kr","qr","Jr","Yr","Zr","Qr","Xr","eo","to","Frame","Interop","registerFin","no","io","ro","oo","ao","address","so","token","co","runtime","ho","isInternalConnectConfig","isPortDiscoveryConfig","isNewConnectConfig","isConfigWithReceiver","isRemoteConfig","isExistingConnectConfig","isExternalConfig","receiver","lo","uo","EmitterMap","po","wo","storage","hashKeys","yo","fo","dispatchEvent","go","mo","vo","Co","bo","Io","Transport","Eo","xo","Ao","Po","Mo","_o","Oo","wireListeners","messageHandlers","getPort","handleMessage","handleNack","getCurrentEntityType","shutdown","authorize","connectRemote","connectByPort","retrievePort","getWsConstructor","writeToken","file","addWireListener","nackHandler","uncorrelatedListener","String","correlationId","NaN","So","debug","toISOString","getLogger","Ro","Fo","ko","Lo","To","SuppressedError","$o","ports","postMessage","Bo","Go","BaseEnvironment","Wo","interopBrokerConfiguration","Ho","BrowserEnvironment","No","Do","getRandomId","Uint32Array","crypto","getRandomValues","resolveLayout","href","RTCPeerConnection","WebSocket","Uo","Vo","zo","Ko","connectConfig","validatePlatformOptions","layouts","WebLayoutEntryPoint","Jo","v4","apiExposer","commonjsGlobal","brokerUrl","timeout","interopConfig","connectionInheritance","RegExp","exec","groups","atob","providerId","contextGroup","qo","validateOptions","Yo","workerPort","iframeBrokerPort","origin","URL","document","createElement","style","display","contentWindow","setAttribute","body","appendChild","removeChild","decorators","encodeOptions","layout_constants","lazy","mapValuesAsync","mapEntriesAsync","DefaultLayoutManager","size","showLayout","getLayoutSnapshot","getFrameSnapshot","removeLayout","getLayoutIdentityForView","isLayoutVisible","isVisible","resolveLayoutIdentity","handleSharedView","onViewDetached","handleLastViewRemoved","registerLayout","getAllLayouts","setInitialSnapshot","ReversibleMap","valueToKey","keyToValue","setUnique","hasKey","hasValue","getKey","deleteKey","deleteValue","LayoutContentCache","contentItemCache","contentItemCacheId","createCacheKey","getItemOrUndefined","getContentItemOrThrow","getOrCreateEntityId","onDestroyed","getSingleInstance","singleton","doShareEdge","getAdjacentItem","parent","contentItems","right","bottom","__decorate","decorate","LayoutEntitiesController","layoutContentCache","analytics","viewName","platformCreateView","findViewInStack","platformCloseView","position","setActiveContentItem","initLayoutEndpoints","replaceLayout","insertView","cleanupView","BaseLayout","DOMEmitter","container","dispatchLocalEvent","tabSelector","containerSelector","CustomEvent","detail","mapLayoutContentItemsImmutableSync","mapLayoutContentItemsImmutable","offsetWidth","offsetHeight","getComputedStyle","visibility","offsetTop","offsetLeft","innerHeight","innerWidth","node","PopoutCannotBeCreatedWithGroundItemConfig","PleaseRegisterAConstructorFunction","ComponentTypeNotRegisteredAndBindComponentEventHandlerNotAssigned","ComponentIsAlreadyRegistered","ComponentIsNotVirtuable","VirtualComponentDoesNotHaveRootHtmlElement","ItemConfigIsNotTypeComponent","InvalidNumberPartInSizeString","UnknownUnitInSizeString","UnsupportedUnitInSizeString","idCount","checkInitialise","defaultComponentBaseZIndex","defaultComponentDragZIndex","defaultComponentStackMaximisedZIndex","base","drag","stackMaximised","parseFloat","numericPart","firstNonNumericCharPart","trimStart","substring","trim","Number","parseInt","isNaN","tryParse","sizeUnit","isJson","isJsonObject","ground","row","column","component","none","always","onload","Pixel","Percent","Fractional","Em","substr","translateObject","defaults","minSize","minSizeUnit","isClosable","createCopy","createDefault","isComponentItem","isStackItem","isGroundItem","defaultMaximised","popout","maximise","minimise","tabDropdown","Header","defaultActiveItemIndex","maximised","activeItemIndex","header","copyContent","defaultReorderEnabled","resolveComponentTypeName","componentType","reorderEnabled","title","componentState","copyComponentType","isChildItemConfig","isRootItemConfig","Settings","constrainDragToContainer","popoutWholeStack","blockedPopoutsThrowError","closePopoutsOnUnload","responsiveMode","tabOverlapAllowance","reorderOnTabMenuClick","tabControlOffset","popInOnClose","Dimensions","borderWidth","borderGrabWidth","defaultMinItemHeight","defaultMinItemHeightUnit","defaultMinItemWidth","defaultMinItemWidthUnit","headerHeight","dragProxyWidth","dragProxyHeight","dock","isPopout","root","openPopouts","dimensions","settings","resolved","copyOpenPopouts","minifyConfig","unminifyConfig","parentId","indexInParent","resolveContent","resolveId","resolveSize","resolveMinSize","calculateSizeWidthHeightSpecificationType","isGround","isRow","isColumn","isStack","isComponent","resolveIdAndMaximised","fromResolved","minWidth","minHeight","hasHeaders","componentName","componentTypeToTitle","fromResolvedOrUndefined","resolveDefaultMinItemHeight","resolveDefaultMinItemWidth","showPopoutIcon","popin","showMaximiseIcon","showCloseIcon","resolveOpenPopouts","labels","fromResolvedArray","isResolved","_allEventSubscriptions","_subscriptionsMap","unbind","trigger","tryBubbleEvent","emitAllEvent","emitUnknown","emitBaseBubblingEvent","BubblingEvent","emitUnknownBubblingEvent","removeUnknownEventListener","off","addUnknownEventListener","ALL_EVENT","removeSubscription","unshift","headerClickEventName","headerTouchStartEventName","_name","_target","_isPropagationStopped","isPropagationStopped","stopPropagation","ClickBubblingEvent","_mouseEvent","mouseEvent","TouchStartBubblingEvent","_touchEvent","touchEvent","_config","_parent","_layoutManager","_element","_updateItemConfigEvent","_showEvent","_hideEvent","_focusEvent","_blurEvent","_stackMaximised","_width","_height","_visible","_isShownWithZeroDimensions","_componentType","_isClosable","_initialState","_state","_boundComponent","bindComponent","updateElementPositionPropertyFromBoundComponent","virtual","tab","_tab","isHidden","visible","state","initialState","element","releaseComponent","stateRequestEvent","getElement","setSize","updateSize","replaceComponent","virtualVisibilityChangeRequiredEvent","virtualRectingRequiredEvent","fireBeforeVirtualRectingEvent","fireAfterVirtualRectingEvent","setBaseLogicalZIndex","extendState","setState","setTitle","setTab","setVisibility","setSizeToNodeSize","emitShow","emitHide","setLogicalZIndex","_logicalZIndex","notifyVirtualZIndexChangeRequired","enterDragMode","exitDragMode","enterStackMaximised","exitStackMaximised","addVirtualSizedContainerToLayoutManager","checkShownFromZeroDimensions","notifyVirtualRectingRequired","virtualZIndexChangeRequiredEvent","beginVirtualSizedContainerAdding","addVirtualSizedContainer","endVirtualSizedContainerAdding","unbindComponent","_initialWindowSize","_isInitialised","_popoutWindow","toConfig","getGlInstance","saveLayout","screenX","screenLeft","screenY","screenTop","__glInstance","popIn","groundItem","getItemsByPopInParentId","createAndInitContentItem","addChild","layoutConfig","_onClose","createUrl","serializeWindowFeatures","menubar","toolbar","personalbar","resizable","scrollbars","status","positionWindow","passive","_checkReadyInterval","setInterval","checkReady","isInitialised","onInitialised","clearInterval","localStorage","setItem","searchParams","_popInParentIds","_type","_id","_pendingEventPropagations","_throttledEvents","_contentItems","createContentItems","popInParentIds","isComponentParentableItem","setParent","replaceChild","parentNode","createPopoutFromContentItem","calculateConfigContent","highlightDropZone","dropTargetIndicator","highlightArea","onDrop","beginSizeInvalidation","endSizeInvalidation","getElementArea","getBoundingClientRect","scrollTop","scrollLeft","x1","y1","x2","y2","surface","contentItem","addPopInParentId","initContentItems","updateContentItemsSize","createContentItem","propagateEvent","scheduleEventPropagationToLayoutManager","requestAnimationFrame","propagateEventToLayoutManager","_parentItem","_focused","_reorderEnabled","applyUpdatableConfig","_initialWantMaximise","classList","_container","handleUpdateItemConfigEvent","initialWantMaximise","parentItem","headerConfig","_headerConfig","_title","focused","updateNodeSize","setActiveComponentItem","setFocused","setFocusedComponentItem","setBlurred","setFocusedValue","_eElement","_pointerTracking","_pointerDownEventListener","onPointerDown","_pointerMoveEventListener","onPointerMove","_pointerUpEventListener","onPointerUp","_timeout","_allowableTargets","_oDocument","_eBody","_nDelay","_nDistance","_nX","_nY","_nOriginalX","_nOriginalY","_dragging","checkRemovePointerTrackingEventListeners","cancelDrag","processDragStop","isPrimary","getPointerCoordinates","processPointerDown","startDrag","processDragMove","preventDefault","pageX","pageY","abs","querySelector","setProperty","_isVertical","_size","_grabSize","_dragListener","_rowOrColumnParent","_splitter","_childElementContainer","_splitterSize","_splitterGrabSize","_isColumn","_dimension","_splitterPosition","_splitterMinPosition","_splitterMaxPosition","_configType","newComponent","newItem","addComponent","addItem","checkMinimiseMaximisedStack","createSplitter","max","insertAdjacentElement","calculateRelativeSizes","setAbsoluteSizes","calculateAbsoluteSizes","additionalPixel","itemSizes","crossAxisSize","totalSize","round","respectMinItemSize","calculateContentItemMinSize","onSplitterDrag","onSplitterDragStop","onSplitterDragStart","getSplitItems","before","after","calculateContentItemsTotalMinSize","getElementDimensionSize","setElementDimensionSize","_containerElement","previousSibling","lastChild","Element","contains","insertBefore","loadRoot","clearRoot","loadComponentAsRoot","createSideAreas","Area","oppositeSides","side","tabDropPlaceholder","validateDocking","getAllContentItems","deepGetAllContentItems","getConfigMaximisedItems","deepFilterContentItems","_header","_pushEvent","_clickEventListener","onClick","_touchStartEventListener","onTouchStart","controlsContainerElement","_componentItem","_closeEvent","_dragStartEvent","_isActive","_tabClickListener","onTabClickDown","_tabTouchStartListener","onTabTouchStart","_closeClickListener","onCloseClick","_closeTouchStartListener","onCloseTouchStart","_dragStartListener","onDragStart","_contentItemDestroyListener","onContentItemDestroy","_tabTitleChangedListener","_titleElement","_closeElement","enableReorder","isActive","componentItem","titleElement","closeElement","disableReorder","innerText","setActive","button","notifyFocus","notifyClose","_componentRemoveEvent","_componentFocusEvent","_componentDragStartEvent","_dropdownActiveChangedEvent","_tabs","_lastVisibleTabIndex","_dropdownActive","_dropdownElement","tabs","tabCount","lastVisibleTabIndex","dropdownElement","dropdownActive","createTab","handleTabCloseEvent","handleTabFocusEvent","handleTabDragStartEvent","childNodes","removeTab","processActiveComponentChanged","updateTabSizes","tryUpdateTabSizes","parentElement","marginRight","zIndex","marginLeft","showAdditionalTabsDropdown","hideAdditionalTabsDropdown","_configClosable","_getActiveComponentItemEvent","_popoutEvent","_maximiseToggleEvent","_clickEvent","_touchStartEvent","_clickListener","_touchStartListener","_rowColumnClosable","_closeButton","_popoutButton","_tabsContainer","handleTabInitiatedComponentRemoveEvent","handleTabInitiatedComponentFocusEvent","handleTabInitiatedDragStartEvent","processTabDropdownActiveChanged","_show","_popoutEnabled","popoutEnabled","_popoutLabel","popoutLabel","_maximiseEnabled","maximiseEnabled","_maximiseLabel","maximiseLabel","_minimiseEnabled","minimiseEnabled","_minimiseLabel","minimiseLabel","_closeEnabled","closeEnabled","_closeLabel","closeLabel","_tabDropdownEnabled","tabDropdownEnabled","_tabDropdownLabel","tabDropdownLabel","setSide","_canRemoveComponent","_controlsContainerElement","_documentMouseUpListener","_tabControlOffset","_tabDropdownButton","handleButtonPopoutEvent","_maximiseButton","handleButtonMaximiseToggleEvent","_side","leftRightSided","_leftRightSided","tabsContainerElement","setRowColumnClosable","updateClosability","applyFocusedValue","processMaximised","processMinimised","notifyClick","notifyTouchStart","_headerSideChanged","_resizeListener","handleResize","_maximisedListener","handleMaximised","_minimisedListener","handleMinimised","_initialActiveItemIndex","_maximisedEnabled","getActiveComponentItem","handlePopoutEvent","toggleMaximise","handleHeaderClickEvent","handleHeaderTouchStartEvent","handleHeaderComponentRemoveEvent","handleHeaderComponentFocusEvent","handleHeaderComponentStartDragEvent","setupHeaderPosition","childElementContainer","headerShow","headerSide","headerLeftRightSided","contentAreaDimensions","_contentAreaDimensions","isMaximised","maximisedStack","stackParent","_activeComponentItem","emitStateChangedEvent","getActiveContentItem","focusActiveContentItem","setMaximisedStack","createHeaderConfig","_dropSegment","resetHeaderDropZone","_dropIndex","hoverArea","highlightHeaderDropZone","highlightBodyDropZone","getArea","positionHeader","clientHeight","startComponentDrag","_originalParent","_area","_lastValidArea","onDrag","createDragProxyElements","_componentItemFocused","setDimensions","determineMinMaxXY","calculateItemAreas","setDropPosition","_proxyContainerElement","_sided","insertAdjacentText","_minX","_minY","_maxX","_maxY","ceil","_extraAllowableChildTargets","_componentTypeOrFtn","_componentState","_dummyGroundContainer","_dummyGroundContentItem","createDragListener","removeDragListener","onDragStop","isDragSourceComponentItemConfig","transitionIndicator","transitionElements","_toElement","_fromDimensions","_totalAnimationDuration","_animationStartTime","nextAnimationFrame","measure","_childEventListener","onEventFromChild","ChildEventName","emitUserBroadcast","handleUserBroadcastEvent","isSubWindow","propagateToParent","propagateToThisAndSubtree","eventName","bubbles","cancelable","opener","eventHub","resizeWithContainerAutomatically","resizeDebounceInterval","resizeDebounceExtendedWhenPossible","_groundItem","_openPopouts","_dropTargetIndicator","_transitionIndicator","_itemAreas","_maximisePlaceholder","createMaximisePlaceElement","_tabDropPlaceholder","createTabDropPlaceholderElement","_dragSources","_updatingColumnsResponsive","_firstLoad","_eventHub","_virtualSizedContainers","_virtualSizedContainerAddingBeginCount","_sizeInvalidationBeginCount","_resizeObserver","ResizeObserver","handleContainerResize","_windowBeforeUnloadListener","onBeforeUnload","_windowBeforeUnloadListening","_maximisedStackBeforeDestroyedListener","cleanupBeforeMaximisedStackDestroyed","_constructorOrSubWindowLayoutConfig","constructorOrSubWindowLayoutConfig","containerElement","rootItem","focusedComponentItem","_focusedComponentItem","_maximisedStack","deprecatedConstructor","closeAllOpenPopouts","checkClearResizeTimeout","setContainer","updateSizeFromContainer","checkLoadedLayoutMaximiseItem","observe","adjustColumnsResponsive","loadLayout","createSubWindows","reconcilePopoutWindows","newComponentAtLocation","addComponentAtLocation","addItemAtLocation","newItemAtLocation","defaultLocationSelectors","findFirstLocation","updateRootSize","createContentItemFromConfig","findFirstComponentItemById","findFirstContentItemTypeByIdRecursive","createPopout","createPopoutFromItemConfig","beforeVirtualRectingEvent","afterVirtualRectingEvent","createPopoutFromPopoutLayoutConfig","newDragSource","removeDragSource","focusComponent","clearComponentFocus","processMinimiseMaximisedStack","processMaximiseStack","prepend","closed","processResizeWithDebounce","_resizeTimeoutId","documentElement","margin","padding","overflow","useResponsiveLayout","getAllStacks","addChildContentItemsToContainer","findAllStacksRecursive","findFirstContentItemType","findFirstContentItemTypeRecursive","findLocation","typeId","tryCreateLocationFromParentItem","afterFocusedItemIfPossibleLocationSelectors","createLayoutManagerConstructorParameters","_bindComponentEventHanlderPassedInConstructor","_creationTimeoutPassed","bindComponentEvent","unbindComponentEvent","clearHtmlAndAdjustStylesForSubWindow","head","querySelectorAll","innerHTML","checkAddDefaultPopinButton","getComponentEvent","releaseComponentEvent","getItem","removeItem","HTMLElement","_componentTypesMap","_registeredComponentMap","_virtuableComponentMap","_containerVirtualRectingRequiredEventListener","handleContainerVirtualRectingRequiredEvent","_containerVirtualVisibilityChangeRequiredEventListener","handleContainerVirtualVisibilityChangeRequiredEvent","_containerVirtualZIndexChangeRequiredEventListener","handleContainerVirtualZIndexChangeRequiredEvent","registerComponent","registerComponentConstructor","registerComponentFactoryFunction","factoryFunction","registerComponentFunction","registerGetComponentConstructorCallback","_getComponentConstructorFtn","getRegisteredComponentTypeNames","getComponentInstantiator","rootHtmlElement","_goldenLayoutBoundingClientRect","constrainDragToHeaders","preventDragout","selectionEnabled","resizeElement","handleMutation","viewComponentsByContainerElement","MutationObserver","observeMutations","childList","subtree","attributes","attributeFilter","observeContainer","unobserveContainer","unobserve","resize","BaseItem","_item","_layout","_wrap","raw","wrapInternal","wrapCache","customElements","define","connectedCallback","src","border","forceFrameName","getAttribute","observedAttributes","ofView","isDragging","className","web","handleUrlMissing","updateTitleIfNotSet","frameName","inset","overrideConfig","initialConfig","platformProvider","reparentingViews","goldenLayoutDestroyed","createViewComponent","iframeContainer","stylesheet","insertRule","resizeController","domEmitter","setupStylesheets","setupListeners","attachShadow","mode","delegatesFocus","normalizeOptions","CSSStyleSheet","adoptedStyleSheets","preventSplitterResize","handleDragStart","handleDragEnd","removeViewComponent","pointerEvents","cssRules","cssText","deleteRule","windowIdentity","fallbackContainer","initLayoutViews","viewNames","match","multiInstanceViewBehavior","byteLength","b64","lens","getLens","validLen","placeHoldersLen","toByteArray","tmp","arr","Arr","_byteLength","curByte","len","revLookup","charCodeAt","fromByteArray","uint8","extraBytes","parts","maxChunkLength","len2","encodeChunk","lookup","Uint8Array","end","num","output","base64","ieee754","customInspectSymbol","SlowBuffer","alloc","INSPECT_MAX_BYTES","K_MAX_LENGTH","createBuffer","RangeError","buf","arg","encodingOrOffset","allocUnsafe","string","encoding","isEncoding","actual","fromString","arrayView","isInstance","copy","fromArrayBuffer","buffer","byteOffset","fromArrayLike","fromArrayView","SharedArrayBuffer","valueOf","obj","isBuffer","checked","undefined","numberIsNaN","fromObject","toPrimitive","assertSize","array","mustMatch","loweredCase","utf8ToBytes","base64ToBytes","toLowerCase","slowToString","hexSlice","utf8Slice","asciiSlice","latin1Slice","base64Slice","utf16leSlice","swap","bidirectionalIndexOf","val","dir","arrayIndexOf","lastIndexOf","indexSize","arrLength","valLength","read","readUInt16BE","foundIndex","found","hexWrite","offset","remaining","strLen","parsed","utf8Write","blitBuffer","asciiWrite","str","byteArray","asciiToBytes","base64Write","ucs2Write","units","utf16leToBytes","res","firstByte","codePoint","bytesPerSequence","secondByte","thirdByte","fourthByte","tempCodePoint","codePoints","MAX_ARGUMENTS_LENGTH","fromCharCode","decodeCodePointsArray","kMaxLength","TYPED_ARRAY_SUPPORT","proto","foo","typedArraySupport","poolSize","fill","allocUnsafeSlow","_isBuffer","compare","concat","list","pos","swap16","swap32","swap64","toLocaleString","equals","inspect","thisStart","thisEnd","thisCopy","targetCopy","isFinite","_arr","ret","out","hexSliceLookupTable","bytes","checkOffset","ext","checkInt","wrtBigUInt64LE","checkIntBI","BigInt","wrtBigUInt64BE","checkIEEE754","writeFloat","littleEndian","noAssert","writeDouble","newBuf","subarray","readUintLE","readUIntLE","mul","readUintBE","readUIntBE","readUint8","readUInt8","readUint16LE","readUInt16LE","readUint16BE","readUint32LE","readUInt32LE","readUint32BE","readUInt32BE","readBigUInt64LE","defineBigIntMethod","validateNumber","first","last","boundsError","readBigUInt64BE","readIntLE","pow","readIntBE","readInt8","readInt16LE","readInt16BE","readInt32LE","readInt32BE","readBigInt64LE","readBigInt64BE","readFloatLE","readFloatBE","readDoubleLE","readDoubleBE","writeUintLE","writeUIntLE","writeUintBE","writeUIntBE","writeUint8","writeUInt8","writeUint16LE","writeUInt16LE","writeUint16BE","writeUInt16BE","writeUint32LE","writeUInt32LE","writeUint32BE","writeUInt32BE","writeBigUInt64LE","writeBigUInt64BE","writeIntLE","limit","sub","writeIntBE","writeInt8","writeInt16LE","writeInt16BE","writeInt32LE","writeInt32BE","writeBigInt64LE","writeBigInt64BE","writeFloatLE","writeFloatBE","writeDoubleLE","writeDoubleBE","targetStart","copyWithin","errors","sym","getMessage","addNumericalSeparator","range","ERR_OUT_OF_RANGE","checkBounds","ERR_INVALID_ARG_TYPE","ERR_BUFFER_OUT_OF_BOUNDS","input","msg","received","isInteger","INVALID_BASE64_RE","Infinity","leadSurrogate","base64clean","dst","alphabet","table","i16","BufferBigIntNotDefined","ReflectOwnKeys","ReflectApply","Function","getOwnPropertySymbols","getOwnPropertyNames","NumberIsNaN","module","errorListener","resolver","eventTargetAgnosticAddListener","handler","addErrorHandlerIfEventEmitter","_events","_eventsCount","_maxListeners","defaultMaxListeners","checkListener","_getMaxListeners","that","_addListener","existing","warning","newListener","warned","onceWrapper","fired","wrapFn","_onceWrap","wrapped","_listeners","unwrap","evlistener","unwrapListeners","arrayClone","flags","wrapListener","setMaxListeners","getMaxListeners","doError","originalListener","shift","spliceOne","rawListeners","isLE","mLen","nBytes","eLen","eMax","eBias","nBits","LN2","DataView","getNative","hashClear","hashDelete","hashGet","hashHas","hashSet","Hash","entry","listCacheClear","listCacheDelete","listCacheGet","listCacheHas","listCacheSet","ListCache","mapCacheClear","mapCacheDelete","mapCacheGet","mapCacheHas","mapCacheSet","MapCache","setCacheAdd","setCacheHas","SetCache","__data__","stackClear","stackDelete","stackGet","stackHas","stackSet","Stack","iteratee","predicate","resIndex","baseTimes","isArguments","isIndex","isTypedArray","inherited","isArr","isArg","isBuff","isType","skipIndexes","baseAssignValue","eq","object","objValue","copyObject","keysIn","arrayEach","assignValue","baseAssign","baseAssignIn","cloneBuffer","copyArray","copySymbols","copySymbolsIn","getAllKeys","getAllKeysIn","getTag","initCloneArray","initCloneByTag","initCloneObject","isMap","isObject","isSet","argsTag","funcTag","objectTag","cloneableTags","baseClone","bitmask","customizer","isDeep","isFlat","isFull","tag","isFunc","stacked","subValue","objectCreate","baseCreate","arrayPush","keysFunc","symbolsFunc","getRawTag","objectToString","symToStringTag","toStringTag","baseGetTag","isObjectLike","baseIsEqualDeep","baseIsEqual","other","equalArrays","equalByTag","equalObjects","arrayTag","equalFunc","objIsArr","othIsArr","objTag","othTag","objIsObj","othIsObj","isSameTag","objIsWrapped","othIsWrapped","objUnwrapped","othUnwrapped","isFunction","isMasked","toSource","reIsHostCtor","funcProto","objectProto","funcToString","reIsNative","test","isLength","typedArrayTags","isPrototype","nativeKeys","nativeKeysIn","isProto","func","cache","arrayBuffer","freeExports","nodeType","freeModule","cloneArrayBuffer","dataView","reFlags","regexp","lastIndex","symbolProto","symbolValueOf","symbol","typedArray","isNew","newValue","getSymbols","getSymbolsIn","coreJsData","arraySome","cacheHas","isPartial","othLength","arrStacked","othStacked","seen","arrValue","othValue","compared","othIndex","mapToArray","setToArray","convert","objProps","objLength","objStacked","skipCtor","objCtor","othCtor","freeGlobal","baseGetAllKeys","isKeyable","baseIsNative","getPrototype","overArg","nativeObjectToString","isOwn","unmasked","arrayFilter","stubArray","propertyIsEnumerable","nativeGetSymbols","mapTag","promiseTag","setTag","weakMapTag","dataViewTag","dataViewCtorString","mapCtorString","promiseCtorString","setCtorString","weakMapCtorString","Ctor","ctorString","nativeCreate","cloneDataView","cloneRegExp","cloneSymbol","cloneTypedArray","reIsUint","uid","maskSrcKey","IE_PROTO","assocIndexOf","getMapData","freeProcess","process","nodeUtil","require","types","binding","transform","freeSelf","pairs","LARGE_ARRAY_SIZE","CLONE_DEEP_FLAG","baseIsArguments","stubFalse","baseIsMap","baseUnary","nodeIsMap","baseIsSet","nodeIsSet","baseIsTypedArray","nodeIsTypedArray","arrayLikeKeys","baseKeys","isArrayLike","baseKeysIn","rnds8","rng","msCrypto","byteToHex","_nodeId","_clockseq","_lastMSecs","_lastNSecs","clockseq","seedBytes","msecs","nsecs","tl","tmh","hashfunc","generateUUID","namespace","unescape","encodeURIComponent","stringToBytes","DNS","getOutputLength","inputLength8","safeAdd","lsw","md5cmn","cnt","md5ff","md5gg","md5hh","md5ii","v35","length32","hexTab","hex","charAt","md5ToHexEncodedArray","olda","oldb","oldc","oldd","wordsToMd5","length8","bytesToWords","rnds","ROTL","_i2","_t2","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","loaded","__webpack_modules__","definition","prop","nmd","paths","children","finInitialized","fdc3Initialized","api","DEFAULT_OPTIONS","logger","DEFAULT_LOGGER","info","newFin","connectOptions","requestConnectOptions","DEFAULT_CONNECT_OPTIONS","requestedConnectConfig","requestError","fdc3","targetIsWindow","event","timer","messageHandler","receivingOrigin","targetOrigin"],"sourceRoot":""} \ No newline at end of file diff --git a/web/v19.2.0/web-interop-basic/js/fdc3-view.bundle.js b/web/v19.2.0/web-interop-basic/js/fdc3-view.bundle.js index abb8afa..b39ef41 100644 --- a/web/v19.2.0/web-interop-basic/js/fdc3-view.bundle.js +++ b/web/v19.2.0/web-interop-basic/js/fdc3-view.bundle.js @@ -1,38 +1,38 @@ /******/ (() => { // webpackBootstrap /******/ var __webpack_modules__ = ({ -/***/ "./node_modules/@openfin/core-web/out/api-client.js": -/*!**********************************************************!*\ - !*** ./node_modules/@openfin/core-web/out/api-client.js ***! - \**********************************************************/ +/***/ "../../node_modules/@openfin/core-web/out/api-client.js": +/*!**************************************************************!*\ + !*** ../../node_modules/@openfin/core-web/out/api-client.js ***! + \**************************************************************/ /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; -var e=__webpack_require__(/*! ./main-8cad4070.js */ "./node_modules/@openfin/core-web/out/main-8cad4070.js");__webpack_require__(/*! buffer/ */ "../../node_modules/buffer/index.js"),__webpack_require__(/*! uuid */ "../../node_modules/uuid/dist/esm-browser/index.js"),__webpack_require__(/*! events */ "../../node_modules/events/events.js"),__webpack_require__(/*! lodash/cloneDeep */ "../../node_modules/lodash/cloneDeep.js"),__webpack_require__(/*! lodash/isEqual */ "../../node_modules/lodash/isEqual.js"),exports.connect=e.connect; +var e=__webpack_require__(/*! ./main-8cad4070.js */ "../../node_modules/@openfin/core-web/out/main-8cad4070.js");__webpack_require__(/*! buffer/ */ "../../node_modules/buffer/index.js"),__webpack_require__(/*! uuid */ "../../node_modules/uuid/dist/esm-browser/index.js"),__webpack_require__(/*! events */ "../../node_modules/events/events.js"),__webpack_require__(/*! lodash/cloneDeep */ "../../node_modules/lodash/cloneDeep.js"),__webpack_require__(/*! lodash/isEqual */ "../../node_modules/lodash/isEqual.js"),exports.connect=e.connect; /***/ }), -/***/ "./node_modules/@openfin/core-web/out/main-8cad4070.js": -/*!*************************************************************!*\ - !*** ./node_modules/@openfin/core-web/out/main-8cad4070.js ***! - \*************************************************************/ +/***/ "../../node_modules/@openfin/core-web/out/main-8cad4070.js": +/*!*****************************************************************!*\ + !*** ../../node_modules/@openfin/core-web/out/main-8cad4070.js ***! + \*****************************************************************/ /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; -var e=__webpack_require__(/*! buffer/ */ "../../node_modules/buffer/index.js"),t=__webpack_require__(/*! events */ "../../node_modules/events/events.js"),n=__webpack_require__(/*! lodash/cloneDeep */ "../../node_modules/lodash/cloneDeep.js"),i=__webpack_require__(/*! lodash/isEqual */ "../../node_modules/lodash/isEqual.js"),r=__webpack_require__(/*! uuid */ "../../node_modules/uuid/dist/esm-browser/index.js");const o=(e,t)=>`${t}<${btoa(JSON.stringify(e))}>`;var s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof __webpack_require__.g?__webpack_require__.g:"undefined"!=typeof self?self:{},a={},c={},d={},h={};async function l(e){const t=[];for(const n of e){const e=await n();t.push(e)}return t}Object.defineProperty(h,"__esModule",{value:!0}),h.promiseMapSerial=h.serial=h.promiseMap=h.promisify=void 0,h.promisify=function(e){return(...t)=>new Promise(((n,i)=>{e(...t,((e,t)=>e?i(e):n(t)))}))},h.promiseMap=async function(e,t){return Promise.all(e.map(t))},h.serial=l,h.promiseMapSerial=async function(e,t){return l(e.map(((e,n,i)=>()=>t(e,n,i))))};var u,p=s&&s.__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},w=s&&s.__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)};Object.defineProperty(d,"__esModule",{value:!0}),d.Reply=d.EmitterBase=d.Base=void 0;const y=h;class f{constructor(e){this.isNodeEnvironment=()=>"node"===this.wire.environment.type,this.isOpenFinEnvironment=()=>"openfin"===this.wire.environment.type,this.isBrowserEnvironment=()=>"other"===this.wire.environment.type,this.wire=e}get fin(){return this.wire.getFin()}get me(){return this.wire.me}}d.Base=f;d.EmitterBase=class extends f{constructor(e,t,...n){super(e),this.topic=t,u.set(this,void 0),this.eventNames=()=>this.hasEmitter()?this.getOrCreateEmitter().eventNames():[],this.emit=(e,t,...n)=>!!this.hasEmitter()&&this.getOrCreateEmitter().emit(e,t,...n),this.hasEmitter=()=>this.wire.eventAggregator.has(w(this,u,"f")),this.getOrCreateEmitter=()=>this.wire.eventAggregator.getOrCreate(w(this,u,"f")),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[],this.listenerCount=e=>this.hasEmitter()?this.getOrCreateEmitter().listenerCount(e):0,this.registerEventListener=async(e,t={},n,i)=>{const r={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e},o=this.getOrCreateEmitter();n(o);try{await this.wire.sendAction("subscribe-to-desktop-event",r)}catch(e){throw i(o),this.deleteEmitterIfNothingRegistered(o),e}},this.deregisterEventListener=async(e,t={})=>{if(this.hasEmitter()){const n={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e};await this.wire.sendAction("unsubscribe-to-desktop-event",n).catch((()=>null));return this.getOrCreateEmitter()}return Promise.resolve()},p(this,u,[t,...n],"f"),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[]}async on(e,t,n){return await this.registerEventListener(e,n,(n=>{n.on(e,t)}),(n=>{n.removeListener(e,t)})),this}async addListener(e,t,n){return this.on(e,t,n)}async once(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.once(e,i),n.once(e,t)}),(n=>{n.removeListener(e,i),n.removeListener(e,t)})),this}async prependListener(e,t,n){return await this.registerEventListener(e,n,(n=>{n.prependListener(e,t)}),(n=>{n.removeListener(e,t)})),this}async prependOnceListener(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.prependOnceListener(e,t),n.once(e,i)}),(n=>{n.removeListener(e,t),n.removeListener(e,i)})),this}async removeListener(e,t,n){const i=await this.deregisterEventListener(e,n);return i&&(i.removeListener(e,t),this.deleteEmitterIfNothingRegistered(i)),this}async deregisterAllListeners(e){const t={...this.identity,type:e,topic:this.topic};if(this.hasEmitter()){const e=this.getOrCreateEmitter(),n=e.listenerCount(t.type),i=[];for(let e=0;enull)));return await Promise.all(i),e}}async removeAllListeners(e){const t=async e=>{const t=await this.deregisterAllListeners(e);t&&(t.removeAllListeners(e),this.deleteEmitterIfNothingRegistered(t))};if(e)await t(e);else if(this.hasEmitter()){const e=this.getOrCreateEmitter().eventNames();await(0,y.promiseMap)(e,t)}return this}deleteEmitterIfNothingRegistered(e){0===e.eventNames().length&&this.wire.eventAggregator.delete(w(this,u,"f"))}},u=new WeakMap;d.Reply=class{};var g={};Object.defineProperty(g,"__esModule",{value:!0});var m=g.RuntimeError=g.NotSupportedError=g.NotImplementedError=g.NoAckError=g.DuplicateCorrelationError=g.UnexpectedActionError=g.DisconnectedError=void 0;class v extends Error{constructor(e){super(`Expected websocket state OPEN but found ${e}`),this.readyState=e}}g.DisconnectedError=v;class C extends Error{}g.UnexpectedActionError=C;class b extends Error{}g.DuplicateCorrelationError=b;class I extends Error{}g.NoAckError=I;class E extends Error{}g.NotImplementedError=E;class x extends Error{}g.NotSupportedError=x;class A extends Error{constructor(e){const{message:t,name:n,stack:i,...r}=e;super(t),this.name=n||"Error",this.stack=i??this.toString(),Object.keys(r).forEach((e=>{this[e]=r[e]}))}}class P extends Error{static getCallSite(e=0){const t=Error.stackTraceLimit,n=e+1;Error.stackTraceLimit=t+n;const i=Error.prepareStackTrace;Error.prepareStackTrace=(e,t)=>t;const r=(new Error).stack?.slice(n)??[];return Error.prepareStackTrace=i,Error.stackTraceLimit=t,r}static prepareStackTrace(e,t){if("function"==typeof Error.prepareStackTrace)return Error.prepareStackTrace(e,t);let n="";n+=e.name||"Error",n+=`: ${e.message||""}`;for(const e of t)n+=`\n at ${e.toString()}`;return n}constructor(e,t){const{reason:n,error:i}=e;super(n),this.name="RuntimeError",i?.stack&&(this.cause=new A(i)),t&&(this.stack=P.prepareStackTrace(this,t))}}m=g.RuntimeError=P;var M={},_={},O={};Object.defineProperty(O,"__esModule",{value:!0}),O.validateIdentity=void 0,O.validateIdentity=function(e){let t;return"object"==typeof e&&"string"==typeof e.uuid||(t="Not a valid identity object"),t};var S={},R={},F={},j={},k={},L={},T={};Object.defineProperty(T,"__esModule",{value:!0}),T.handleDeprecatedWarnings=void 0;var $;T.handleDeprecatedWarnings=e=>{(e.contentNavigation?.whitelist||e.contentNavigation?.blacklist||e.contentRedirect?.whitelist||e.contentRedirect?.blacklist)&&console.warn("The properties 'whitelist' and 'blacklist' have been marked as deprecated and will be removed in a future version. Please use 'allowlist' and 'denylist'.")};var B={},G={};Object.defineProperty(G,"__esModule",{value:!0}),G.AsyncRetryableLazy=W=G.Lazy=void 0;var W=G.Lazy=class{constructor(e){this.producerFn=e}getValue(){return this.value||(this.value=this.producerFn()),this.value}};G.AsyncRetryableLazy=class{constructor(e){this.producerFn=e}async getValue(){return this.promise||(this.promise=this.producerFn().catch((e=>{throw delete this.promise,e}))),this.promise}};var H={};Object.defineProperty(H,"__esModule",{value:!0}),H.WebContents=void 0;const N=d;class D extends N.EmitterBase{constructor(e,t,n){super(e,n,t.uuid,t.name),this.identity=t,this.entityType=n}capturePage(e){return this.wire.sendAction("capture-page",{options:e,...this.identity}).then((({payload:e})=>e.data))}executeJavaScript(e){return this.wire.sendAction("execute-javascript-in-window",{...this.identity,code:e}).then((({payload:e})=>e.data))}getZoomLevel(){return this.wire.sendAction("get-zoom-level",this.identity).then((({payload:e})=>e.data))}setZoomLevel(e){return this.wire.sendAction("set-zoom-level",{...this.identity,level:e}).then((()=>{}))}navigate(e){return this.wire.sendAction("navigate-window",{...this.identity,url:e}).then((()=>{}))}navigateBack(){return this.wire.sendAction("navigate-window-back",{...this.identity}).then((()=>{}))}async navigateForward(){await this.wire.sendAction("navigate-window-forward",{...this.identity})}stopNavigation(){return this.wire.sendAction("stop-window-navigation",{...this.identity}).then((()=>{}))}reload(e=!1){return this.wire.sendAction("reload-window",{ignoreCache:e,...this.identity}).then((()=>{}))}print(e={}){return this.wire.sendAction("print",{...this.identity,options:e}).then((()=>{}))}findInPage(e,t){return this.wire.sendAction("find-in-page",{...this.identity,searchTerm:e,options:t}).then((({payload:e})=>e.data))}stopFindInPage(e){return this.wire.sendAction("stop-find-in-page",{...this.identity,action:e}).then((()=>{}))}getPrinters(){return this.wire.sendAction("get-printers",{...this.identity}).then((({payload:e})=>e.data))}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){await this.wire.sendAction("focus-window",{emitSynthFocused:e,...this.identity})}async showDeveloperTools(){await this.wire.sendAction("show-developer-tools",this.identity)}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction("get-process-info",this.identity);return e}async getSharedWorkers(){return this.wire.sendAction("get-shared-workers",this.identity).then((({payload:e})=>e.data))}async inspectSharedWorker(){await this.wire.sendAction("inspect-shared-worker",{...this.identity})}async inspectSharedWorkerById(e){await this.wire.sendAction("inspect-shared-worker-by-id",{...this.identity,workerId:e})}async inspectServiceWorker(){await this.wire.sendAction("inspect-service-worker",{...this.identity})}async showPopupWindow(e){if(this.wire.sendAction(`${this.entityType}-show-popup-window`,this.identity).catch((()=>{})),e?.onPopupReady){const t=async({popupName:t})=>{try{const n=this.fin.Window.wrapSync({uuid:this.fin.me.uuid,name:t});await e.onPopupReady(n)}catch(e){throw new Error(`Something went wrong during onPopupReady execution: ${e}`)}};await this.once("popup-ready",t)}const{payload:t}=await this.wire.sendAction("try-create-popup-window",{options:{...e,hasResultCallback:!!e?.onPopupResult,hasReadyCallback:!!e?.onPopupReady},...this.identity}),{data:{willOpen:n,options:i}}=t;n&&await this.fin.Window.create(i.initialOptions);if(e?.onPopupResult){const t=async t=>{await e.onPopupResult((e=>{const{name:t,uuid:n,result:i,data:r}=e,o={identity:{name:t,uuid:n},result:i};return r&&(o.data=r),o})(t))},n=async()=>{await this.removeListener("popup-result",t)};await this.on("popup-result",t),await this.once("popup-teardown",n)}const{payload:r}=await this.wire.sendAction("show-popup-window",{options:i,...this.identity});return r.data}}var U,V,z,K,q;function J(){return V||(V=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(function(){if($)return L;$=1,Object.defineProperty(L,"__esModule",{value:!0}),L.ViewModule=void 0;const e=d,t=O,n=J(),i=T;class r extends e.Base{async create(e){const{uuid:t}=this.wire.me;if(!e.name||"string"!=typeof e.name)throw new Error("Please provide a name property as a string in order to create a View.");return(0,i.handleDeprecatedWarnings)(e),this.wire.environment.childViews?await this.wire.environment.createChildContent({entityType:"view",options:{...e,uuid:t}}):await this.wire.sendAction("create-view",{...e,uuid:t}),this.wrapSync({uuid:t,name:e.name})}async wrap(e){this.wire.sendAction("view-wrap").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}wrapSync(e){this.wire.sendAction("view-wrap-sync").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}getCurrent(){if(this.wire.sendAction("view-get-current").catch((e=>{})),!this.wire.me.isView)throw new Error("You are not in a View context");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction("view-get-current-sync").catch((e=>{})),!this.wire.me.isView)throw new Error("You are not in a View context");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return L.ViewModule=r,L}(),e),n(function(){if(U)return B;var e;U=1,Object.defineProperty(B,"__esModule",{value:!0}),B.View=void 0;const t=g,n=G,i=H,r=ie();class o extends i.WebContents{constructor(i,o){super(i,o,"view"),this.identity=o,e.set(this,new n.Lazy((()=>this.fin.Platform.wrapSync(this.identity).getClient()))),this.attach=async e=>{await this.wire.sendAction("attach-view",{target:e,...this.identity})},this.destroy=async()=>{await this.wire.sendAction("destroy-view",{...this.identity})},this.show=async()=>{await this.wire.sendAction("show-view",{...this.identity})},this.showAt=async(e,t={})=>{await this.wire.sendAction("show-view-at",{bounds:e,...this.identity,options:t})},this.bringToFront=async()=>{await this.wire.sendAction("bring-view-to-front",{...this.identity})},this.hide=async()=>{await this.wire.sendAction("hide-view",{...this.identity})},this.setBounds=async e=>{await this.wire.sendAction("set-view-bounds",{bounds:e,...this.identity})},this.getBounds=async()=>(await this.wire.sendAction("get-view-bounds",{...this.identity})).payload.data,this.getInfo=async()=>(await this.wire.sendAction("get-view-info",{...this.identity})).payload.data,this.getParentLayout=async()=>(this.wire.sendAction("view-get-parent-layout",{...this.identity}).catch((()=>{})),this.fin.Platform.Layout.getLayoutByViewIdentity(this.identity)),this.getOptions=async()=>this.wire.sendAction("get-view-options",{...this.identity}).then((({payload:e})=>e.data)),this.updateOptions=async e=>this.wire.sendAction("update-view-options",{options:e,...this.identity}).then((()=>{})),this.getCurrentWindow=async()=>{const{payload:{data:e}}=await this.wire.sendAction("get-view-window",{...this.identity});return new r._Window(this.wire,e)},this.getCurrentStack=async()=>{this.wire.sendAction("view-get-current-stack").catch((()=>{}));try{return(await this.getParentLayout()).getStackByViewIdentity(this.identity)}catch(e){throw new t.RuntimeError({reason:"This view does not belong to a stack.",error:e})}},this.triggerBeforeUnload=async()=>(await this.wire.sendAction("trigger-before-unload",{...this.identity})).payload.data,this.bindToElement=async e=>{if(!e)throw new Error("Element not found.");return this.wire.environment.observeBounds(e,(async e=>this.setBounds(e)))}}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){const t=await this.getCurrentWindow();await t.focusedWebViewWasChanged(),await super.focus({emitSynthFocused:e})}}return B.View=o,e=new WeakMap,B}(),e)}(k)),k}function Y(){if(z)return j;z=1,Object.defineProperty(j,"__esModule",{value:!0}),j.Application=void 0;const e=d,t=ie(),n=J();class i extends e.EmitterBase{constructor(e,n){super(e,"application",n.uuid),this.identity=n,this.window=new t._Window(this.wire,{uuid:this.identity.uuid,name:this.identity.uuid})}windowListFromIdentityList(e){const n=[];return e.forEach((e=>{n.push(new t._Window(this.wire,{uuid:e.uuid,name:e.name}))})),n}isRunning(){return this.wire.sendAction("is-application-running",this.identity).then((({payload:e})=>e.data))}async quit(e=!1){try{await this._close(e),await this.wire.sendAction("destroy-application",{force:e,...this.identity})}catch(e){if(!["Remote connection has closed","Could not locate the requested application"].some((t=>e.message.includes(t))))throw e}}async _close(e=!1){try{await this.wire.sendAction("close-application",{force:e,...this.identity})}catch(e){if(!e.message.includes("Remote connection has closed"))throw e}}close(e=!1){return console.warn("Deprecation Warning: Application.close is deprecated Please use Application.quit"),this.wire.sendAction("application-close",this.identity).catch((e=>{})),this._close(e)}getChildWindows(){return this.wire.sendAction("get-child-windows",this.identity).then((({payload:e})=>{const t=[];return e.data.forEach((e=>{t.push({uuid:this.identity.uuid,name:e})})),this.windowListFromIdentityList(t)}))}getManifest(){return this.wire.sendAction("get-application-manifest",this.identity).then((({payload:e})=>e.data))}getParentUuid(){return this.wire.sendAction("get-parent-application",this.identity).then((({payload:e})=>e.data))}getShortcuts(){return this.wire.sendAction("get-shortcuts",this.identity).then((({payload:e})=>e.data))}async getViews(){const{payload:e}=await this.wire.sendAction("application-get-views",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}getZoomLevel(){return this.wire.sendAction("get-application-zoom-level",this.identity).then((({payload:e})=>e.data))}getWindow(){return this.wire.sendAction("application-get-window",this.identity).catch((e=>{})),Promise.resolve(this.window)}registerUser(e,t){return this.wire.sendAction("register-user",{userName:e,appName:t,...this.identity}).then((()=>{}))}removeTrayIcon(){return this.wire.sendAction("remove-tray-icon",this.identity).then((()=>{}))}restart(){return this.wire.sendAction("restart-application",this.identity).then((()=>{}))}run(){return console.warn("Deprecation Warning: Application.run is deprecated Please use fin.Application.start"),this.wire.sendAction("application-run",this.identity).catch((e=>{})),this._run()}_run(e={}){return this.wire.sendAction("run-application",{manifestUrl:this._manifestUrl,opts:e,...this.identity}).then((()=>{}))}scheduleRestart(){return this.wire.sendAction("relaunch-on-close",this.identity).then((()=>{}))}async sendApplicationLog(){const{payload:e}=await this.wire.sendAction("send-application-log",this.identity);return e.data}async setJumpList(e){await this.wire.sendAction("set-jump-list",{config:e,...this.identity})}setTrayIcon(e){return this.wire.sendAction("set-tray-icon",{enabledIcon:e,...this.identity}).then((()=>{}))}setShortcuts(e){return this.wire.sendAction("set-shortcuts",{data:e,...this.identity}).then((()=>{}))}async setShortcutQueryParams(e){await this.wire.sendAction("set-shortcut-query-args",{data:e,...this.identity})}setZoomLevel(e){return this.wire.sendAction("set-application-zoom-level",{level:e,...this.identity}).then((()=>{}))}async setAppLogUsername(e){await this.wire.sendAction("set-app-log-username",{data:e,...this.identity})}getTrayIconInfo(){return this.wire.sendAction("get-tray-icon-info",this.identity).then((({payload:e})=>e.data))}hasTrayIcon(){return this.wire.sendAction("has-tray-icon",this.identity).then((({payload:e})=>e.data))}terminate(){return this.wire.sendAction("terminate-application",this.identity).then((()=>{}))}wait(){return this.wire.sendAction("wait-for-hung-application",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction("get-info",this.identity).then((({payload:e})=>e.data))}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction("application-get-process-info",this.identity);return e}async setFileDownloadLocation(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t};await this.wire.sendAction("set-file-download-location",{...n,downloadLocation:e})}async getFileDownloadLocation(){const{payload:{data:e}}=await this.wire.sendAction("get-file-download-location",this.identity);return e}async showTrayIconPopupMenu(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t},{payload:i}=await this.wire.sendAction("show-tray-icon-popup-menu",{...n,options:e});return i.data}async closeTrayIconPopupMenu(){const{name:e}=this.wire.me,t={uuid:this.identity.uuid,name:e};await this.wire.sendAction("close-tray-icon-popup-menu",{...t})}}return j.Application=i,j}function Z(){return q||(q=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(function(){if(K)return F;K=1,Object.defineProperty(F,"__esModule",{value:!0}),F.ApplicationModule=void 0;const e=d,t=O,n=Y();class i extends e.Base{async wrap(e){this.wire.sendAction("wrap-application").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}wrapSync(e){this.wire.sendAction("wrap-application-sync").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}async _create(e){return void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&void 0===e.isPlatformController&&(e.autoShow=!0),await this.wire.sendAction("create-application",e),this.wrap({uuid:e.uuid})}create(e){return console.warn("Deprecation Warning: fin.Application.create is deprecated. Please use fin.Application.start"),this.wire.sendAction("application-create").catch((e=>{})),this._create(e)}async start(e){this.wire.sendAction("start-application").catch((e=>{}));const t=await this._create(e);return await this.wire.sendAction("run-application",{uuid:e.uuid}),t}async startManyManifests(e,t){return this.wire.sendAction("run-applications",{applications:e,opts:t}).then((()=>{}))}getCurrent(){return this.wire.sendAction("get-current-application").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction("get-current-application-sync").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}async startFromManifest(e,t){this.wire.sendAction("application-start-from-manifest").catch((e=>{}));const n=await this._createFromManifest(e);return await n._run(t),n}createFromManifest(e){return console.warn("Deprecation Warning: fin.Application.createFromManifest is deprecated. Please use fin.Application.startFromManifest"),this.wire.sendAction("application-create-from-manifest").catch((e=>{})),this._createFromManifest(e)}_createFromManifest(e){return this.wire.sendAction("get-application-manifest",{manifestUrl:e}).then((({payload:e})=>{const t=e.data.platform?e.data.platform.uuid:e.data.startup_app.uuid;return this.wrap({uuid:t})})).then((t=>(t._manifestUrl=e,t)))}}return F.ApplicationModule=i,F}(),e),n(Y(),e)}(R)),R}H.WebContents=D;var Q={};Object.defineProperty(Q,"__esModule",{value:!0}),Q.promisifySubscription=void 0;var X,ee,te;function ne(){if(X)return S;X=1,Object.defineProperty(S,"__esModule",{value:!0}),S._Window=void 0;const e=Z(),t=H,n=J(),i=T,r=Q;class o extends t.WebContents{constructor(e,t){super(e,t,"window")}async createWindow(e){this.wire.sendAction("window-create-window",this.identity).catch((e=>{}));const t=await(0,r.promisifySubscription)(this,"fire-constructor-callback");void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&(e.autoShow=!0),(0,i.handleDeprecatedWarnings)(e);const n=this.wire.environment.createChildContent({entityType:"window",options:e}),[o]=await Promise.all([t.getValue(),n]);let s;const{success:a}=o,c=o.data,{message:d}=c;s=a?{httpResponseCode:c.httpResponseCode,apiInjected:c.apiInjected}:{message:c.message,networkErrorCode:c.networkErrorCode,stack:c.stack};const h={message:d,cbPayload:s,success:a};try{this.getWebWindow().fin.__internal_.openerSuccessCBCalled()}catch(e){}return h.success?this:Promise.reject(h)}getAllFrames(){return this.wire.sendAction("get-all-frames",this.identity).then((({payload:e})=>e.data))}getBounds(){return this.wire.sendAction("get-window-bounds",this.identity).then((({payload:e})=>e.data))}center(){return this.wire.sendAction("center-window",this.identity).then((()=>{}))}blur(){return this.wire.sendAction("blur-window",this.identity).then((()=>{}))}bringToFront(){return this.wire.sendAction("bring-window-to-front",this.identity).then((()=>{}))}animate(e,t){return this.wire.sendAction("animate-window",{transitions:e,options:t,...this.identity}).then((()=>{}))}hide(){return this.wire.sendAction("hide-window",this.identity).then((()=>{}))}close(e=!1){return this.wire.sendAction("close-window",{force:e,...this.identity}).then((()=>{Object.setPrototypeOf(this,null)}))}focusedWebViewWasChanged(){return this.wire.sendAction("focused-webview-changed",this.identity).then((()=>{}))}getNativeId(){return this.wire.sendAction("get-window-native-id",this.identity).then((({payload:e})=>e.data))}async getCurrentViews(){const{payload:e}=await this.wire.sendAction("window-get-views",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}disableFrame(){return console.warn("Function is deprecated; use disableUserMovement instead."),this.wire.sendAction("disable-window-frame",this.identity).then((()=>{}))}disableUserMovement(){return this.wire.sendAction("disable-window-frame",this.identity).then((()=>{}))}enableFrame(){return console.warn("Function is deprecated; use enableUserMovement instead."),this.wire.sendAction("enable-window-frame",this.identity).then((()=>{}))}enableUserMovement(){return this.wire.sendAction("enable-window-frame",this.identity).then((()=>{}))}flash(){return this.wire.sendAction("flash-window",this.identity).then((()=>{}))}stopFlashing(){return this.wire.sendAction("stop-flash-window",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction("get-window-info",this.identity).then((({payload:e})=>e.data))}async getLayout(e){this.wire.sendAction("window-get-layout",this.identity).catch((e=>{}));const t=await this.getOptions();if(!t.layout&&!t.layoutSnapshot)throw new Error("Window does not have a Layout");return this.fin.Platform.Layout.wrap(e??this.identity)}getOptions(){return this.wire.sendAction("get-window-options",this.identity).then((({payload:e})=>e.data))}getParentApplication(){return this.wire.sendAction("window-get-parent-application",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity))}getParentWindow(){return this.wire.sendAction("window-get-parent-window",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity)).then((e=>e.getWindow()))}async getSnapshot(e){const t={area:e,...this.identity};console.warn("Window.getSnapshot has been deprecated, please use Window.capturePage");return(await this.wire.sendAction("get-window-snapshot",t)).payload.data}getState(){return this.wire.sendAction("get-window-state",this.identity).then((({payload:e})=>e.data))}getWebWindow(){return this.wire.sendAction("window-get-web-window",this.identity).catch((e=>{})),this.wire.environment.getWebWindow(this.identity)}isMainWindow(){return this.wire.sendAction("window-is-main-window",this.identity).catch((e=>{})),this.me.uuid===this.me.name}isShowing(){return this.wire.sendAction("is-window-showing",this.identity).then((({payload:e})=>e.data))}maximize(){return this.wire.sendAction("maximize-window",this.identity).then((()=>{}))}minimize(){return this.wire.sendAction("minimize-window",this.identity).then((()=>{}))}moveBy(e,t,n){return this.wire.sendAction("move-window-by",{deltaLeft:e,deltaTop:t,positioningOptions:n,...this.identity}).then((()=>{}))}moveTo(e,t,n){return this.wire.sendAction("move-window",{left:e,top:t,positioningOptions:n,...this.identity}).then((()=>{}))}resizeBy(e,t,n,i){return this.wire.sendAction("resize-window-by",{deltaWidth:Math.floor(e),deltaHeight:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}resizeTo(e,t,n,i){return this.wire.sendAction("resize-window",{width:Math.floor(e),height:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}restore(){return this.wire.sendAction("restore-window",this.identity).then((()=>{}))}setAsForeground(){return this.wire.sendAction("set-foreground-window",this.identity).then((()=>{}))}setBounds(e,t){return this.wire.sendAction("set-window-bounds",{...e,...this.identity,positioningOptions:t}).then((()=>{}))}show(e=!1){return this.wire.sendAction("show-window",{force:e,...this.identity}).then((()=>{}))}showAt(e,t,n=!1){return this.wire.sendAction("show-at-window",{force:n,left:Math.floor(e),top:Math.floor(t),...this.identity}).then((()=>{}))}updateOptions(e){return this.wire.sendAction("update-window-options",{options:e,...this.identity}).then((()=>{}))}authenticate(e,t){return this.wire.sendAction("window-authenticate",{userName:e,password:t,...this.identity}).then((()=>{}))}async showPopupMenu(e){const{payload:t}=await this.wire.sendAction("show-popup-menu",{options:e,...this.identity});return t.data}async closePopupMenu(){return this.wire.sendAction("close-popup-menu",{...this.identity}).then((()=>{}))}async dispatchPopupResult(e){this.wire.sendAction("window-dispatch-popup-result",this.identity).catch((e=>{})),await this.wire.sendAction("dispatch-popup-result",{data:e,...this.identity})}async print(e={content:"self"}){switch(e.content){case void 0:case"self":return super.print(e);case"screenshot":return this.wire.sendAction("print-screenshot",this.identity).then((()=>{}));case"views":return this.wire.sendAction("print-views",{...this.identity,options:e}).then((()=>{}));default:return}}}return S._Window=o,S}function ie(){return te||(te=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(function(){if(ee)return _;ee=1,Object.defineProperty(_,"__esModule",{value:!0}),_._WindowModule=void 0;const e=d,t=O,n=ne();class i extends e.Base{async wrap(e){this.wire.sendAction("window-wrap").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}wrapSync(e){this.wire.sendAction("window-wrap-sync").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}create(e){return this.wire.sendAction("create-window").catch((e=>{})),new n._Window(this.wire,{uuid:this.me.uuid,name:e.name}).createWindow(e)}getCurrent(){if(this.wire.sendAction("get-current-window").catch((e=>{})),!this.wire.me.isWindow)throw new Error("You are not in a Window context");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction("get-current-window-sync").catch((e=>{})),!this.wire.me.isWindow)throw new Error("You are not in a Window context");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return _._WindowModule=i,_}(),e),n(ne(),e)}(M)),M}Q.promisifySubscription=async(e,t,n=(()=>!0),i)=>{let r,o,s;const a=new Promise(((e,t)=>{r=e,o=t})),c=e=>{n(e)&&(clearTimeout(s),r(e))};return await e.on(t,c),i&&(s=setTimeout((()=>o(new Error("event timed out"))),i)),a.finally((()=>{e.removeListener(t,c).catch((()=>null))})),{getValue:()=>a}},Object.defineProperty(c,"__esModule",{value:!0}),c.System=void 0;const re=d,oe=g,se=ie(),ae=t;class ce extends re.EmitterBase{constructor(e){super(e,"system")}sendExternalProcessRequest(e,t){return new Promise(((n,i)=>{const r="external-process-exited";let o,s,a,c;"function"==typeof t.listener&&(a=e=>{const n=e||{};s={topic:"exited",uuid:n.processUuid||"",exitCode:n.exitCode||0},o===e.processUuid&&(t.listener(s),c.removeListener(r,a))},this.wire.me.name||(this.wire.me.name=this.wire.me.uuid),c=new se._Window(this.wire,this.wire.me),c.on(r,a)),this.wire.sendAction(e,t).then((({payload:e})=>{o=e.data.uuid,n(e.data),s&&o===s.uuid&&(t.listener(s),c.removeListener(r,a))})).catch((e=>{c&&c.removeListener(r,a),i(e)}))}))}getVersion(){return this.wire.sendAction("get-version").then((({payload:e})=>e.data))}clearCache(e){return this.wire.sendAction("clear-cache",e).then((()=>{}))}deleteCacheOnExit(){return this.wire.sendAction("delete-cache-request").then((()=>{}))}exit(){return this.wire.sendAction("exit-desktop").then((()=>{}))}async fetchManifest(e){const{payload:{data:t}}=await this.wire.sendAction("fetch-manifest",{manifestUrl:e});return t}flushCookieStore(){return this.wire.sendAction("flush-cookie-store").then((()=>{}))}getAllWindows(){return this.wire.sendAction("get-all-windows").then((({payload:e})=>e.data))}getAllApplications(){return this.wire.sendAction("get-all-applications").then((({payload:e})=>e.data))}getCommandLineArguments(){return this.wire.sendAction("get-command-line-arguments").then((({payload:e})=>e.data))}async getCrashReporterState(){const{payload:{data:{diagnosticMode:e,isRunning:t}}}=await this.wire.sendAction("get-crash-reporter-state");return console.warn("diagnosticMode property is deprecated. It will be removed in a future version"),{diagnosticMode:e,diagnosticsMode:e,isRunning:t}}async startCrashReporter(e){const t=e,n={...t,diagnosticMode:t.diagnosticsMode||t.diagnosticMode},{payload:{data:{diagnosticMode:i,isRunning:r}}}=await this.wire.sendAction("start-crash-reporter",n);return{diagnosticMode:i,diagnosticsMode:i,isRunning:r}}getUniqueUserId(){return this.wire.sendAction("get-unique-user-id").then((({payload:e})=>e.data))}getEntityInfo(e,t){return this.wire.sendAction("get-entity-info",{uuid:e,name:t}).then((({payload:e})=>e.data))}getEnvironmentVariable(e){return this.wire.sendAction("get-environment-variable",{environmentVariables:e}).then((({payload:e})=>e.data))}getFocusedWindow(){return this.wire.sendAction("get-focused-window").then((({payload:e})=>e.data))}async isAppCertified(e){const{payload:{data:{certifiedInfo:t}}}=await this.wire.sendAction("is-app-certified",{manifestUrl:e});return t}getInstalledRuntimes(){return this.wire.sendAction("get-installed-runtimes").then((({payload:e})=>e.data.runtimes))}async getInstalledApps(){const{payload:{data:{installedApps:e}}}=await this.wire.sendAction("get-installed-apps");return e}getLog(e){return this.wire.sendAction("view-log",e).then((({payload:e})=>e.data))}getMachineId(){return this.wire.sendAction("get-machine-id").then((({payload:e})=>e.data))}getMinLogLevel(){return this.wire.sendAction("get-min-log-level").then((({payload:e})=>e.data))}getLogList(){return this.wire.sendAction("list-logs").then((({payload:e})=>e.data))}getMonitorInfo(){return this.wire.sendAction("get-monitor-info").then((({payload:e})=>e.data))}getMousePosition(){return this.wire.sendAction("get-mouse-position").then((({payload:e})=>e.data))}getProcessList(){return console.warn("System.getProcessList has been deprecated. Please consider using our new process APIs: Window.getProcessInfo, View.getProcessInfo, Application.getProcessInfo, System.getAllProcessInfo"),this.wire.sendAction("process-snapshot").then((({payload:e})=>e.data))}async getAllProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction("get-all-process-info",this.identity);return e}getProxySettings(){return this.wire.sendAction("get-proxy-settings").then((({payload:e})=>e.data))}getRuntimeInfo(){return this.wire.sendAction("get-runtime-info").then((({payload:e})=>e.data))}getRvmInfo(){return this.wire.sendAction("get-rvm-info").then((({payload:e})=>e.data))}getHostSpecs(){return this.wire.sendAction("get-host-specs").then((({payload:e})=>e.data))}getOSInfo(){return this.wire.sendAction("get-os-info").then((({payload:e})=>e.data))}launchExternalProcess(e){return this.sendExternalProcessRequest("launch-external-process",e)}monitorExternalProcess(e){return this.sendExternalProcessRequest("monitor-external-process",e)}log(e,t){return this.wire.sendAction("write-to-log",{level:e,message:t}).then((()=>{}))}openUrlWithBrowser(e){return this.wire.sendAction("open-url-with-browser",{url:e}).then((()=>{}))}async registerCustomProtocol(e){if("object"!=typeof e)throw new Error("Must provide an object with a `protocolName` property having a string value.");await this.wire.sendAction("register-custom-protocol",e)}async unregisterCustomProtocol(e){await this.wire.sendAction("unregister-custom-protocol",{protocolName:e})}async getCustomProtocolState(e){return this.wire.sendAction("get-custom-protocol-state",{protocolName:e}).then((({payload:e})=>e.data))}releaseExternalProcess(e){return this.wire.sendAction("release-external-process",{uuid:e}).then((()=>{}))}showDeveloperTools(e){return this.wire.sendAction("show-developer-tools",e).then((()=>{}))}terminateExternalProcess(e){return this.wire.sendAction("terminate-external-process",e).then((()=>{}))}updateProxySettings(e){return this.wire.sendAction("update-proxy",e).then((()=>{}))}async downloadAsset(e,t){const n=()=>{};let i=n,r=n;const o=new Promise(((e,t)=>{i=e,r=t}));if("openfin"!==this.wire.environment.type)throw new oe.NotSupportedError("downloadAsset only supported in an OpenFin Render process");const s=oe.RuntimeError.getCallSite(),a=this.wire.environment.getNextMessageId().toString(),c=`asset-download-progress-${a}`,d=`asset-download-error-${a}`,h=`asset-download-complete-${a}`,l=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},u=()=>{this.removeListener(c,l)};await Promise.all([this.on(c,l),this.once(d,(e=>{u();const{reason:t,err:n}=e;r(new oe.RuntimeError({reason:t,error:n},s))})),this.once(h,(()=>{u(),i()}))]);const p=Object.assign(e,{downloadId:a});return await this.wire.sendAction("download-asset",p).catch((e=>{throw u(),e})),o}downloadRuntime(e,t){const n=oe.RuntimeError.getCallSite();return new Promise(((i,r)=>{if("openfin"!==this.wire.environment.type)return void r(new oe.NotSupportedError("downloadRuntime only supported in an OpenFin Render process"));const o=this.wire.environment.getNextMessageId().toString(),s=`runtime-download-progress-${o}`,a=`runtime-download-error-${o}`,c=`runtime-download-complete-${o}`,d=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},h=()=>{this.removeListener(s,d)};this.on(s,d),this.once(a,(e=>{h();const{reason:t,err:i}=e;r(new oe.RuntimeError({reason:t,error:i},n))})),this.once(c,(()=>{h(),i()}));const l=Object.assign(e,{downloadId:o});this.wire.sendAction("download-runtime",l).catch((e=>{h(),r(e)}))}))}downloadPreloadScripts(e){return this.wire.sendAction("download-preload-scripts",{scripts:e}).then((({payload:e})=>e.data))}getAllExternalApplications(){return this.wire.sendAction("get-all-external-applications").then((({payload:e})=>e.data))}getAppAssetInfo(e){return this.wire.sendAction("get-app-asset-info",e).then((({payload:e})=>e.data))}getCookies(e){const t=this.wire.environment.getUrl(),n=Object.assign(e,{url:t});return this.wire.sendAction("get-cookies",n).then((({payload:e})=>e.data))}setMinLogLevel(e){return this.wire.sendAction("set-min-log-level",{level:e}).then((()=>{}))}resolveUuid(e){return this.wire.sendAction("resolve-uuid",{entityKey:e}).then((({payload:e})=>e.data))}executeOnRemote(e,t){return t.requestingIdentity=e,this.wire.ferryAction(t)}readRegistryValue(e,t,n){return this.wire.sendAction("read-registry-value",{rootKey:e,subkey:t,value:n}).then((({payload:e})=>e.data))}registerExternalConnection(e){return this.wire.sendAction("register-external-connection",{uuid:e}).then((({payload:e})=>e.data))}async getServiceConfiguration(e){if("string"!=typeof e.name)throw new Error("Must provide an object with a `name` property having a string value");const{name:t}=e;return this.wire.sendAction("get-service-configuration",{name:t}).then((({payload:e})=>e.data))}async getSystemAppConfig(e){if("string"!=typeof e)throw new Error("Must provide a string value for name of system app");return this.wire.sendAction("get-system-app-configuration",{name:e}).then((({payload:e})=>e.data))}async registerShutdownHandler(e){this.wire.sendAction("system-register-shutdown-handler").catch((e=>{}));const{uuid:t,name:n}=this.wire.me;this.on("system-shutdown",(i=>{e({proceed:()=>{this.wire.environment.raiseEvent("application/system-shutdown-handled",{uuid:t,name:n,topic:"application"})}})}))}runRvmHealthCheck(){return this.wire.sendAction("run-rvm-health-check").then((({payload:e})=>e.data))}async launchManifest(e,t={}){const{subscribe:n,...i}=t,r=i;if(n){const e=new ae.EventEmitter;n(e);const t="app-version-progress",i="runtime-status",o="app-version-complete",s="app-version-error",a=this.wire.environment.getNextMessageId().toString();r.appVersionId=a;const c=[o,t,i,s],d=e=>{const{appVersionId:t,topic:n,type:i,...r}=e;return{...r,type:c.find((e=>i.includes(e)))}},h=t=>{const n=d(t);e.emit(n.type,n)},l=()=>{this.removeListener(`${t}.${a}`,h),this.removeListener(`${i}.${a}`,h),this.removeListener(`${o}.${a}`,h),this.removeListener(`${s}.${a}`,h),this.removeListener(`${o}.${a}`,l),this.removeListener(`${s}.${a}`,l)};await Promise.all([this.on(`${t}.${a}`,h),this.on(`${i}.${a}`,h),this.once(`${o}.${a}`,h),this.once(`${s}.${a}`,h),this.once(`${o}.${a}`,l),this.once(`${s}.${a}`,l)])}return(await this.wire.sendAction("launch-manifest",{manifestUrl:e,opts:r})).payload.data.manifest}async queryPermissionForCurrentContext(e){const t={uuid:this.wire.me.uuid,name:this.wire.me.name};return(await this.wire.sendAction("query-permission-for-current-context",{apiName:e,identity:t})).payload.data}async enableNativeWindowIntegrationProvider(e){const{payload:t}=await this.wire.sendAction("enable-native-window-integration-provider",{permissions:e});return t.data}async registerUsage({data:e,type:t}){await this.wire.sendAction("register-usage",{data:e,type:t})}async getPrinters(){const{payload:e}=await this.wire.sendAction("system-get-printers");return e.data}async updateProcessLoggingOptions(e){await this.wire.sendAction("system-update-process-logging-options",{options:e})}async getDomainSettings(){const{payload:{data:e}}=await this.wire.sendAction("get-domain-settings",this.identity);return e}async setDomainSettings(e){await this.wire.sendAction("set-domain-settings",{domainSettings:e,...this.identity})}async refreshExtensions(){const{payload:e}=await this.wire.sendAction("refresh-extensions");return e.data}async getInstalledExtensions(){const{payload:e}=await this.wire.sendAction("get-installed-extensions");return e.data}}c.System=ce;var de={},he={};Object.defineProperty(he,"__esModule",{value:!0}),he.RefCounter=void 0;he.RefCounter=class{constructor(){this.topicRefMap=new Map}incRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t+1;n=i,this.topicRefMap.set(e,i)}else this.topicRefMap.set(e,1),n=1;return n}decRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t-1;this.topicRefMap.set(e,i),n=i}else n=-1;return n}actOnFirst(e,t,n){return 1===this.incRefCount(e)?t():n()}actOnLast(e,t,n){return 0===this.decRefCount(e)?t():n()}};var le={},ue={},pe={};Object.defineProperty(pe,"__esModule",{value:!0}),pe.ChannelBase=pe.ProtectedItems=void 0;const we=e=>async(t,n,i)=>{const r=await e(t,n,i);return void 0===r?n:r};pe.ProtectedItems=class{constructor(e,t){this.providerIdentity=e,this.close=t}};class ye{static defaultAction(e){throw new Error(`No action registered at target for ${e}`)}constructor(){this.subscriptions=new Map}async processAction(e,t,n){try{const i=this.subscriptions.has(e)?this.subscriptions.get(e):(t,n)=>(this.defaultAction??ye.defaultAction)(e,t,n),r=this.preAction?await this.preAction(e,t,n):t,o=await i(r,n);return this.postAction?await this.postAction(e,o,n):o}catch(t){if(this.errorMiddleware)return this.errorMiddleware(e,t,n);throw t}}beforeAction(e){if(this.preAction)throw new Error("Already registered beforeAction middleware");this.preAction=we(e)}onError(e){if(this.errorMiddleware)throw new Error("Already registered error middleware");this.errorMiddleware=e}afterAction(e){if(this.postAction)throw new Error("Already registered afterAction middleware");this.postAction=we(e)}remove(e){this.subscriptions.delete(e)}setDefaultAction(e){if(this.defaultAction)throw new Error("default action can only be set once");this.defaultAction=e}register(e,t){if(this.subscriptions.has(e))throw new Error(`Subscription already registered for action: ${e}. Unsubscribe before adding new subscription`);return this.subscriptions.set(e,t),!0}}pe.ChannelBase=ye;var fe,ge,me,ve=s&&s.__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)},Ce=s&&s.__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};Object.defineProperty(ue,"__esModule",{value:!0}),ue.ChannelClient=void 0;const be=pe,Ie=new Map;class Ee extends be.ChannelBase{static closeChannelByEndpointId(e){const t=Ie.get(e);t&&ve(t,me,"f").call(t)}static handleProviderDisconnect(e){for(const t of Ie.values())t.providerIdentity.channelId===e.channelId&&(t.disconnectListener(e),ve(t,me,"f").call(t))}constructor(e,t,n){super(),fe.set(this,void 0),ge.set(this,void 0),this.processAction=(e,t,n)=>super.processAction(e,t,n),me.set(this,(()=>{Ie.delete(this.endpointId),ve(this,ge,"f").close()})),Ce(this,fe,new be.ProtectedItems(e,t),"f"),this.disconnectListener=()=>{},this.endpointId=e.endpointId,Ce(this,ge,n,"f"),Ie.set(this.endpointId,this),n.receive(this.processAction)}get providerIdentity(){return ve(this,fe,"f").providerIdentity}async dispatch(e,t){if(ve(this,ge,"f").isEndpointConnected(this.providerIdentity.channelId))return ve(this,ge,"f").send(this.providerIdentity.channelId,e,t);throw new Error("The client you are trying to dispatch from is disconnected from the target provider.")}onDisconnection(e){this.disconnectListener=t=>{try{e(t)}catch(e){throw new Error(`Error while calling the onDisconnection callback: ${e.message}`)}finally{this.disconnectListener=()=>{}}}}async disconnect(){await this.sendDisconnectAction(),ve(this,me,"f").call(this)}async sendDisconnectAction(){const e=ve(this,fe,"f");await e.close()}static async wireClose(e,t,n){const{channelName:i,uuid:r,name:o}=t;await e.sendAction("disconnect-from-channel",{channelName:i,uuid:r,name:o,endpointId:n})}}ue.ChannelClient=Ee,fe=new WeakMap,ge=new WeakMap,me=new WeakMap;var xe={},Ae={};Object.defineProperty(Ae,"__esModule",{value:!0}),Ae.exhaustiveCheck=void 0,Ae.exhaustiveCheck=function(e,t){throw new Error(`Unsupported value: ${e}${t?`\n Supported values are: ${t.join("")}`:""}`)};var Pe,Me,_e,Oe={},Se=s&&s.__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},Re=s&&s.__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)};Object.defineProperty(Oe,"__esModule",{value:!0}),Oe.ClassicInfo=Oe.ClassicStrategy=void 0;Oe.ClassicStrategy=class{constructor(e,t,n,i){this.messageReceiver=t,this.endpointId=n,this.providerIdentity=i,Pe.set(this,void 0),Me.set(this,new Map),_e.set(this,new Map),this.send=async(e,t,n)=>{const i=Re(this,Me,"f").get(e);if(!i)throw new Error(`Could not locate routing info for endpoint ${e}`);const r={...i};r.isLocalEndpointId&&delete r.endpointId,delete r.isLocalEndpointId;const o=Re(this,Pe,"f").sendAction("send-channel-message",{...r,providerIdentity:this.providerIdentity,action:t,payload:n});Re(this,_e,"f").get(e)?.add(o);return(await o.catch((e=>{throw new Error(e.message)})).finally((()=>{Re(this,_e,"f").get(e)?.delete(o)}))).payload.data.result},this.close=async()=>{this.messageReceiver.removeEndpoint(this.providerIdentity.channelId,this.endpointId),[...Re(this,Me,"f").keys()].forEach((e=>this.closeEndpoint(e))),Se(this,Me,new Map,"f")},Se(this,Pe,e,"f")}onEndpointDisconnect(e,t){}receive(e){this.messageReceiver.addEndpoint(e,this.providerIdentity.channelId,this.endpointId)}async closeEndpoint(e){const t=Re(this,Me,"f").get(e);Re(this,Me,"f").delete(e);const n=Re(this,_e,"f").get(e);n?.forEach((n=>{const i=`Channel connection with identity uuid: ${t?.uuid} / name: ${t?.name} / endpointId: ${e} no longer connected.`;n.cancel(new Error(i))}))}isEndpointConnected(e){return Re(this,Me,"f").has(e)}addEndpoint(e,t){Re(this,Me,"f").set(e,t.endpointIdentity),Re(this,_e,"f").set(e,new Set)}isValidEndpointPayload(e){return"string"==typeof e?.endpointIdentity?.endpointId||"string"==typeof e?.endpointIdentity?.channelId}},Pe=new WeakMap,Me=new WeakMap,_e=new WeakMap,Oe.ClassicInfo={version:5,minimumVersion:0,type:"classic"};var Fe={},je={},ke={};Object.defineProperty(ke,"__esModule",{value:!0}),ke.errorToPOJO=void 0,ke.errorToPOJO=function(e){return{stack:e.stack,name:e.name,message:e.message,toString:()=>e.stack||e.toString()}};var Le,Te,$e=s&&s.__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)},Be=s&&s.__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};Object.defineProperty(je,"__esModule",{value:!0}),je.RTCEndpoint=void 0;const Ge=ke;je.RTCEndpoint=class{static isValidEndpointPayload(e){const t=e=>"object"==typeof e&&null!==e;return t(e)&&t(e.endpointIdentity)&&t(e.rtc)&&"string"==typeof e.endpointIdentity.endpointId}constructor({rtc:e,endpointIdentity:t}){this.responseMap=new Map,Le.set(this,null),Te.set(this,void 0),this.connectionStateChangeHandler=e=>{"connected"!==this.rtc.rtcClient.connectionState&&(this.rtc.rtcClient.removeEventListener("connectionstatechange",this.connectionStateChangeHandler),this.close(),$e(this,Te,"f")&&$e(this,Te,"f").call(this))},this.send=async(e,t)=>{const n=`message-${Math.random()}`,i=new Promise(((e,t)=>{this.responseMap.set(n,{resolve:e,reject:t})}));return this.rtc.channels.request.send(JSON.stringify({action:e,payload:t,messageId:n})),i},this.close=()=>{this.responseMap.forEach((e=>e.reject("Connection has closed."))),this.responseMap=new Map,this.rtc.channels.request.close(),this.rtc.channels.response.close(),this.rtc.rtcClient.close()},this.rtc=e,this.endpointIdentity=t,this.rtc.channels.response.addEventListener("message",(e=>{let{data:t}=e;e.data instanceof ArrayBuffer&&(t=(new TextDecoder).decode(e.data));const{messageId:n,payload:i,success:r,error:o}=JSON.parse(t),{resolve:s,reject:a}=this.responseMap.get(n)??{};s&&a?(this.responseMap.delete(n),r?s(i):a(o)):(console.log("Could not find id in responseMap."),console.log(e))})),this.rtc.channels.request.addEventListener("message",(async e=>{let{data:n}=e;e.data instanceof ArrayBuffer&&(n=(new TextDecoder).decode(e.data));const{messageId:i,action:r,payload:o}=JSON.parse(n);if($e(this,Le,"f"))try{const e=await $e(this,Le,"f").call(this,r,o,t);this.rtc.channels.response.send(JSON.stringify({messageId:i,payload:e,success:!0}))}catch(e){"open"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,error:(0,Ge.errorToPOJO)(e),success:!1}))}else"open"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,success:!1,error:"Connection not ready."}))})),this.rtc.rtcClient.addEventListener("connectionstatechange",this.connectionStateChangeHandler),Object.values(this.rtc.channels).forEach((e=>{e.onclose=e=>{[...this.responseMap.values()].forEach((e=>e.reject(new Error("RTCDataChannel closed unexpectedly, this is most commonly caused by message size. Note: RTC Channels have a message size limit of ~255kB.")))),this.close(),$e(this,Te,"f")&&$e(this,Te,"f").call(this)}}))}onDisconnect(e){if($e(this,Te,"f"))throw new Error("RTCEndpoint disconnectListener cannot be set twice.");Be(this,Te,e,"f")}receive(e){if($e(this,Le,"f"))throw new Error("You have already set a listener for this RTC Endpoint.");Be(this,Le,e,"f")}get connected(){return"connected"===this.rtc.rtcClient.connectionState}},Le=new WeakMap,Te=new WeakMap;var We,He,Ne,De={},Ue=s&&s.__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)},Ve=s&&s.__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};Object.defineProperty(De,"__esModule",{value:!0}),De.EndpointStrategy=void 0;De.EndpointStrategy=class{constructor(e,t,n){this.EndpointType=e,this.StrategyName=n,We.set(this,null),He.set(this,new Map),Ne.set(this,!0),this.send=async(e,t,n)=>this.getEndpointById(e).send(t,n),this.close=async()=>{Ue(this,Ne,"f")&&(Ue(this,He,"f").forEach((e=>e.close())),Ve(this,He,new Map,"f")),Ve(this,Ne,!1,"f")},this.isValidEndpointPayload=t}onEndpointDisconnect(e,t){this.getEndpointById(e).onDisconnect(t)}receive(e){if(Ue(this,We,"f"))throw new Error(`You have already set a listener for this ${this.StrategyName} Strategy`);Ve(this,We,e,"f"),Ue(this,He,"f").forEach((e=>e.receive(Ue(this,We,"f"))))}getEndpointById(e){const t=Ue(this,He,"f").get(e);if(!t)throw new Error(`Client with endpoint id ${e} is not connected`);return t}get connected(){return Ue(this,Ne,"f")}isEndpointConnected(e){return Ue(this,He,"f").has(e)}addEndpoint(e,t){if(!Ue(this,Ne,"f"))return void console.warn(`Adding endpoint to disconnected ${this.StrategyName} Strategy`);const n=new this.EndpointType(t);Ue(this,We,"f")&&n.receive(Ue(this,We,"f")),Ue(this,He,"f").set(e,n)}async closeEndpoint(e){Ue(this,He,"f").delete(e)}},We=new WeakMap,He=new WeakMap,Ne=new WeakMap,Object.defineProperty(Fe,"__esModule",{value:!0}),Fe.RTCInfo=Fe.RTCStrategy=void 0;const ze=je,Ke=De;class qe extends Ke.EndpointStrategy{constructor(){super(ze.RTCEndpoint,ze.RTCEndpoint.isValidEndpointPayload,"RTC")}}Fe.RTCStrategy=qe,Fe.RTCInfo={version:2,minimumVersion:0,type:"rtc"};var Je={};Object.defineProperty(Je,"__esModule",{value:!0}),Je.RTCICEManager=void 0;const Ye=d;class Ze extends Ye.EmitterBase{constructor(e){super(e,"channel"),this.ensureChannelOpened=e=>new Promise(((t,n)=>{if("open"===e.readyState)t();else if("connecting"===e.readyState){const n=()=>{e.removeEventListener("open",n),t()};e.addEventListener("open",n)}else n(new Error("This Channel has already closed"))}))}static createDataChannelPromise(e,t){let n;const i=new Promise((e=>{n=e})),r=i=>{const o=()=>{i.channel.removeEventListener("open",o),n(i.channel)};i.channel.label===e&&(i.channel.addEventListener("open",o),t.removeEventListener("datachannel",r))};return t.addEventListener("datachannel",r),i}async listenForProviderIce(e,t){await this.on(this.createProviderEventName(e),t,{timestamp:Date.now()})}async raiseProviderIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createProviderEventName(e)),t)}async listenForClientIce(e,t){await this.on(this.createClientEventName(e),t,{timestamp:Date.now()})}async raiseClientIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createClientEventName(e)),t)}cleanupIceListeners(e){this.removeAllListeners(this.createClientEventName(e)),this.removeAllListeners(this.createProviderEventName(e))}createClientEventName(e){return`ice-client-${e}`}createProviderEventName(e){return`ice-provider-${e}`}createRouteString(e){return`channel/${e}`}createRtcPeer(){return this.wire.environment.getRtcPeer()}async startClientOffer(){const e=Math.random().toString(),t=this.createRtcPeer();t.addEventListener("icecandidate",(async t=>{t.candidate&&await this.raiseClientIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForProviderIce(e,(async e=>{await t.addIceCandidate(e.candidate)}));const n={request:t.createDataChannel("request"),response:t.createDataChannel("response")},i=await t.createOffer();await t.setLocalDescription(i);const r=Promise.all([n.request,n.response].map(this.ensureChannelOpened)).then((()=>{}));return{rtcClient:t,channels:n,offer:i,rtcConnectionId:e,channelsOpened:r}}async finishClientOffer(e,t,n){return await e.setRemoteDescription(t),await n,!0}async createProviderAnswer(e,t){const n=this.createRtcPeer(),i=Ze.createDataChannelPromise("request",n),r=Ze.createDataChannelPromise("response",n);n.addEventListener("icecandidate",(async t=>{t.candidate&&await this.raiseProviderIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForClientIce(e,(async e=>{await n.addIceCandidate(e.candidate)})),await n.setRemoteDescription(t);const o=await n.createAnswer();await n.setLocalDescription(o);const s=Promise.all([i,r]).then((([t,n])=>(this.cleanupIceListeners(e),{request:t,response:n})));return{rtcClient:n,answer:o,channels:s}}}Je.RTCICEManager=Ze;var Qe={},Xe={};function et(e){return[...e.split(".").reverse().entries()].reduce(((e,[t,n])=>e+ +n*1e4**t),0)}function tt(e,t){return et(e)>=et(t)}function nt(e){return e.split("/")[0]}Object.defineProperty(Xe,"__esModule",{value:!0}),Xe.runtimeUuidMeetsMinimumRuntimeVersion=Xe.parseRuntimeUuid=Xe.meetsMinimumRuntimeVersion=void 0,Xe.meetsMinimumRuntimeVersion=tt,Xe.parseRuntimeUuid=nt,Xe.runtimeUuidMeetsMinimumRuntimeVersion=function(e,t){return tt(nt(e),t)};var it,rt,ot,st,at,ct=s&&s.__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)},dt=s&&s.__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};Object.defineProperty(Qe,"__esModule",{value:!0}),Qe.ChannelProvider=void 0;const ht=pe,lt=Xe;class ut extends ht.ChannelBase{get connections(){return[...ct(this,it,"f")]}static handleClientDisconnection(e,t){const n=e.connections.find((e=>e.endpointId===t.endpointId));if(n)ct(e,st,"f").call(e,n);else{e.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name)).forEach(ct(e,st,"f"))}e.disconnectListener(t)}static setProviderRemoval(e,t){ut.removalMap.set(e,t)}constructor(e,t,n){super(),it.set(this,void 0),rt.set(this,void 0),ot.set(this,void 0),st.set(this,(e=>{const t=this.connections.filter((t=>t.endpointId!==e.endpointId));ct(this,ot,"f").closeEndpoint(e.endpointId),dt(this,it,t,"f")})),this.processAction=async(e,t,n)=>(ut.clientIsMultiRuntime(n)&&!(0,lt.runtimeUuidMeetsMinimumRuntimeVersion)(n.runtimeUuid,"18.87.56.0")?this.handleMultiRuntimeLegacyClient(n):this.checkForClientConnection(n),super.processAction(e,t,n)),at.set(this,(()=>{ct(this,ot,"f").close();const e=ut.removalMap.get(this);e&&e()})),dt(this,rt,new ht.ProtectedItems(e,t),"f"),this.connectListener=()=>{},this.disconnectListener=()=>{},dt(this,it,[],"f"),dt(this,ot,n,"f"),n.receive(this.processAction)}dispatch(e,t,n){const i=e.endpointId??this.getEndpointIdForOpenFinId(e,t);return i&&ct(this,ot,"f").isEndpointConnected(i)?ct(this,ot,"f").send(i,t,n):Promise.reject(new Error(`Client connection with identity uuid: ${e.uuid} / name: ${e.name} / endpointId: ${i} no longer connected.`))}async processConnection(e,t){return ct(this,it,"f").push(e),this.connectListener(e,t)}publish(e,t){return this.connections.map((n=>ct(this,ot,"f").send(n.endpointId,e,t)))}onConnection(e){this.connectListener=e}onDisconnection(e){this.disconnectListener=e}async destroy(){const e=ct(this,rt,"f");e.providerIdentity,dt(this,it,[],"f"),await e.close(),ct(this,at,"f").call(this)}async getAllClientInfo(){return this.connections.map((e=>{const{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}=e;return{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}}))}checkForClientConnection(e){if(!this.isClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider.\n Client Identity: {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}isClientConnected(e){return ut.clientIdentityIncludesEndpointId(e)?this.connections.some((t=>t.endpointId===e.endpointId&&t.uuid===e.uuid&&t.name===e.name)):this.isLegacyClientConnected(e)}isLegacyClientConnected(e){return this.connections.some((t=>t.uuid===e.uuid&&t.name===e.name))}handleMultiRuntimeLegacyClient(e){if(!this.isLegacyClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider. Client Identity:\n {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}getEndpointIdForOpenFinId(e,t){const n=this.connections.filter((t=>t.name===e.name&&t.uuid===e.uuid));if(n.length>=2){const n=ct(this,rt,"f"),{uuid:i,name:r}=e,o=n?.providerIdentity.uuid,s=n?.providerIdentity.name;console.warn(`WARNING: Dispatch call may have unintended results. The "to" argument of your dispatch call is missing the\n "endpointId" parameter. The identity you are dispatching to ({uuid: ${i}, name: ${r}})\n has multiple channelClients for this channel. Your dispatched action: (${t}) from the provider:\n ({uuid: ${o}, name: ${s}}) will only be processed by the most recently-created client.`)}return n.pop()?.endpointId}static clientIdentityIncludesEndpointId(e){return void 0!==e.endpointId}static clientIsMultiRuntime(e){return void 0!==e.runtimeUuid}static async wireClose(e,t){await e.sendAction("destroy-channel",{channelName:t})}}Qe.ChannelProvider=ut,it=new WeakMap,rt=new WeakMap,ot=new WeakMap,st=new WeakMap,at=new WeakMap,ut.removalMap=new WeakMap;var pt={};Object.defineProperty(pt,"__esModule",{value:!0}),pt.MessageReceiver=void 0;const wt=ue,yt=d;class ft extends yt.Base{constructor(e){super(e),this.onmessage=e=>"process-channel-message"===e.action&&(this.processChannelMessage(e),!0),this.endpointMap=new Map,this.latestEndpointIdByChannelId=new Map,e.registerMessageHandler(this.onmessage.bind(this))}async processChannelMessage(e){const{senderIdentity:t,providerIdentity:n,action:i,ackToSender:r,payload:o,intendedTargetIdentity:s}=e.payload,a=s.channelId??s.endpointId??this.latestEndpointIdByChannelId.get(n.channelId),c=this.endpointMap.get(a);if(!c)return r.payload.success=!1,r.payload.reason=`Client connection with identity uuid: ${this.wire.me.uuid} / name: ${this.wire.me.name} / endpointId: ${a} no longer connected.`,this.wire.sendRaw(r);try{const e=await c(i,o,t);return r.payload.payload=r.payload.payload||{},r.payload.payload.result=e,this.wire.sendRaw(r)}catch(e){return r.payload.success=!1,r.payload.reason=e.message,this.wire.sendRaw(r)}}addEndpoint(e,t,n){this.endpointMap.set(n,e),t!==n&&this.latestEndpointIdByChannelId.set(t,n)}removeEndpoint(e,t){this.endpointMap.delete(t),this.latestEndpointIdByChannelId.get(e)===t&&this.latestEndpointIdByChannelId.delete(e)}checkForPreviousClientConnection(e){const t=this.latestEndpointIdByChannelId.get(e);t&&(wt.ChannelClient.closeChannelByEndpointId(t),console.warn("You have created a second connection to an older provider. First connection has been removed from the clientMap"),console.warn("If the provider calls publish(), you may receive multiple messages."))}}pt.MessageReceiver=ft;var gt={};Object.defineProperty(gt,"__esModule",{value:!0}),gt.ProtocolManager=void 0;gt.ProtocolManager=class{constructor(e){this.ProtocolsInPreferenceOrder=e,this.DefaultClientProtocols=["classic"],this.DefaultProviderProtocols=["classic"],this.getClientProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultClientProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(", ")}.`);return t},this.getProviderProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultProviderProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(", ")}.`);return t},this.getCompatibleProtocols=(e,t)=>t.supportedProtocols.filter((t=>e.some((e=>e.type===t.type&&t.version>=e.minimumVersion&&e.version>=(t.minimumVersion??0))))).slice(0,t.maxProtocols)}};var mt={};Object.defineProperty(mt,"__esModule",{value:!0});class vt{static combine(e,t){return new vt(e,t)}constructor(e,t){this.primary=e,this.secondary=t}onEndpointDisconnect(e,t){this.primary.onEndpointDisconnect(e,(()=>{this.secondary.isEndpointConnected(e)||t()})),this.secondary.onEndpointDisconnect(e,(()=>{this.primary.isEndpointConnected(e)||t()}))}isValidEndpointPayload(e){return this.primary.isValidEndpointPayload(e)||this.secondary.isValidEndpointPayload(e)}async closeEndpoint(e){await this.primary.closeEndpoint(e),await this.secondary.closeEndpoint(e)}isEndpointConnected(e){return this.primary.isEndpointConnected(e)||this.secondary.isEndpointConnected(e)}async addEndpoint(e,t){this.primary.isValidEndpointPayload(t)&&await this.primary.addEndpoint(e,t),this.secondary.isValidEndpointPayload(t)&&await this.secondary.addEndpoint(e,t)}receive(e){this.primary.receive(e),this.secondary.receive(e)}send(e,t,n){return this.primary.isEndpointConnected(e)?this.primary.send(e,t,n):this.secondary.send(e,t,n)}async close(){await Promise.all([this.primary.close(),this.secondary.close()])}}mt.default=vt;var Ct,bt,It=s&&s.__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},Et=s&&s.__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)},xt=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(xe,"__esModule",{value:!0}),xe.ConnectionManager=void 0;const At=Ae,Pt=d,Mt=Oe,_t=Fe,Ot=Je,St=Qe,Rt=pt,Ft=gt,jt=xt(mt);class kt extends Pt.Base{static getProtocolOptionsFromStrings(e){return e.map((e=>{switch(e){case"rtc":return _t.RTCInfo;case"classic":return Mt.ClassicInfo;default:return(0,At.exhaustiveCheck)(e,["rtc","classic"])}}))}constructor(e){super(e),Ct.set(this,void 0),bt.set(this,void 0),this.removeChannelFromProviderMap=e=>{this.providerMap.delete(e)},this.onmessage=e=>"process-channel-connection"===e.action&&(this.processChannelConnection(e),!0),this.providerMap=new Map,this.protocolManager=new Ft.ProtocolManager("node"===this.wire.environment.type?["classic"]:["rtc","classic"]),It(this,Ct,new Rt.MessageReceiver(e),"f"),It(this,bt,new Ot.RTCICEManager(e),"f"),e.registerMessageHandler(this.onmessage.bind(this))}createProvider(e,t){const n=Object.assign(this.wire.environment.getDefaultChannelOptions().create,e||{}),i=this.protocolManager.getProviderProtocols(n?.protocols),r=i.map((e=>{switch(e){case"rtc":return new _t.RTCStrategy;case"classic":return new Mt.ClassicStrategy(this.wire,Et(this,Ct,"f"),t.channelId,t);default:return(0,At.exhaustiveCheck)(e,["rtc","classic"])}}));let o;if(2===r.length){const[e,t]=r;o=jt.default.combine(e,t)}else{if(1!==r.length)throw new Error("failed to combine strategies");[o]=r}const s=new St.ChannelProvider(t,(()=>St.ChannelProvider.wireClose(this.wire,t.channelName)),o),a=t.channelId;return this.providerMap.set(a,{provider:s,strategy:o,supportedProtocols:kt.getProtocolOptionsFromStrings(i)}),St.ChannelProvider.setProviderRemoval(s,this.removeChannelFromProviderMap.bind(this)),s}async createClientOffer(e){const t=this.protocolManager.getClientProtocols(e?.protocols);let n;return{offer:{supportedProtocols:await Promise.all(t.map((async e=>{switch(e){case"rtc":{const{rtcClient:e,channels:t,offer:i,rtcConnectionId:r,channelsOpened:o}=await Et(this,bt,"f").startClientOffer();return n={rtcClient:e,channels:t,channelsOpened:o},{type:"rtc",version:_t.RTCInfo.version,payload:{offer:i,rtcConnectionId:r}}}case"classic":return{type:"classic",version:Mt.ClassicInfo.version};default:return(0,At.exhaustiveCheck)(e,["rtc","classic"])}}))),maxProtocols:2},rtc:n}}async createClientStrategy(e,t){t.endpointId||(t.endpointId=this.wire.environment.getNextMessageId(),Et(this,Ct,"f").checkForPreviousClientConnection(t.channelId));const n=t.answer??{supportedProtocols:[{type:"classic",version:1}]},i=(await Promise.all(n.supportedProtocols.map((async n=>"rtc"===n.type&&e?(await Et(this,bt,"f").finishClientOffer(e.rtcClient,n.payload.answer,e.channelsOpened),new _t.RTCStrategy):"classic"===n.type?new Mt.ClassicStrategy(this.wire,Et(this,Ct,"f"),t.endpointId,t):null)))).filter((e=>null!==e));let r;if(e&&!i.some((e=>e instanceof _t.RTCStrategy))&&e&&e.rtcClient.close(),i.length>=2)r=jt.default.combine(i[0],i[1]);else{if(!i.length)throw new Error("No compatible protocols");[r]=i}const o={endpointIdentity:t,rtc:e};return r.addEndpoint(t.channelId,o),r}async processChannelConnection(e){const{clientIdentity:t,providerIdentity:n,ackToSender:i,payload:r,offer:o}=e.payload;t.endpointId?t.isLocalEndpointId=!1:(t.endpointId=this.wire.environment.getNextMessageId(),t.isLocalEndpointId=!0);const s=n.channelId,a=this.providerMap.get(s);if(!a)return i.payload.success=!1,i.payload.reason=`Channel "${n.channelName}" has been destroyed.`,this.wire.sendRaw(i);const{provider:c,strategy:d,supportedProtocols:h}=a;try{if(!(c instanceof St.ChannelProvider))throw Error("Cannot connect to a channel client");const e=o??{supportedProtocols:[{type:"classic",version:1}],maxProtocols:1},n=this.protocolManager.getCompatibleProtocols(h,e);if(!n.length)throw new Error("This provider does not support any of the offered protocols.");const s=await c.processConnection(t,r);i.payload.payload=i.payload.payload||{};let a={supportedProtocols:[],endpointPayloadPromise:Promise.resolve({endpointIdentity:t})};return a=await n.reduce((async(e,t)=>{const n=await e;if("rtc"===t.type){const{answer:e,rtcClient:i,channels:r}=await Et(this,bt,"f").createProviderAnswer(t.payload.rtcConnectionId,t.payload.offer);n.supportedProtocols.push({type:"rtc",version:_t.RTCInfo.version,payload:{answer:e}}),n.endpointPayloadPromise=n.endpointPayloadPromise.then((e=>r.then((t=>({...e,rtc:{rtcClient:i,channels:t}})))))}else n.supportedProtocols.push({type:"classic",version:Mt.ClassicInfo.version});return n}),Promise.resolve(a)),a.endpointPayloadPromise.then((e=>d.addEndpoint(t.endpointId,e))),i.payload.payload.result=s,i.payload.payload.answer=a,this.wire.sendRaw(i)}catch(e){return i.payload.success=!1,i.payload.reason=e.message,this.wire.sendRaw(i)}}}xe.ConnectionManager=kt,Ct=new WeakMap,bt=new WeakMap;var Lt,Tt,$t,Bt=s&&s.__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},Gt=s&&s.__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)};Object.defineProperty(le,"__esModule",{value:!0}),le.Channel=void 0;const Wt=t,Ht=G,Nt=d,Dt=ue,Ut=xe,Vt=Qe;function zt(e){const t=Math.floor(e/10),n=Math.min(3e4,500*2**t);return new Promise((e=>{setTimeout((()=>{e(!1)}),n)}))}class Kt extends Nt.EmitterBase{constructor(e){super(e,"channel"),Lt.set(this,void 0),Tt.set(this,new Wt.EventEmitter),$t.set(this,new Ht.AsyncRetryableLazy((async()=>{await Promise.all([this.on("disconnected",(e=>{Dt.ChannelClient.handleProviderDisconnect(e)})),this.on("connected",((...e)=>{Gt(this,Tt,"f").emit("connected",...e)}))]).catch((()=>new Error("error setting up channel connection listeners")))}))),Bt(this,Lt,new Ut.ConnectionManager(e),"f")}async getAllChannels(){return this.wire.sendAction("get-all-channels").then((({payload:e})=>e.data))}async onChannelConnect(e){await this.on("connected",e)}async onChannelDisconnect(e){await this.on("disconnected",e)}async safeConnect(e,t,n){const i={count:0};do{let r=()=>{};const o=new Promise((t=>{r=n=>{e===n.channelName&&t(!0)},Gt(this,Tt,"f").on("connected",r)}));try{if(i.count>0){i.gotConnectedEvent=await Promise.race([zt(i.count),o]);const t=await this.wire.sendAction("connect-to-channel",{...n,retryInfo:i});return console.log(`Successfully connected to channelName: ${e}`),t.payload.data}const t=this.wire.sendAction("connect-to-channel",n);i.originalMessageId=t.messageId;return(await t).payload.data}catch(n){if(!n.message.includes("internal-nack"))throw n;t&&0===i.count&&console.warn(`No channel found for channelName: ${e}. Waiting for connection...`)}finally{i.count+=1,Gt(this,Tt,"f").removeListener("connected",r)}}while(t);throw new Error(`No channel found for channelName: ${e}.`)}async connect(e,t={}){if(await Gt(this,$t,"f").getValue(),!e||"string"!=typeof e)throw new Error("Please provide a channelName string to connect to a channel.");const n={wait:!0,...this.wire.environment.getDefaultChannelOptions().connect,...t},{offer:i,rtc:r}=await Gt(this,Lt,"f").createClientOffer(n);let o;(this.fin.me.isFrame||this.fin.me.isView||this.fin.me.isWindow)&&(o=(await this.fin.me.getInfo()).url);const s={channelName:e,...n,offer:i,connectionUrl:o},a=await this.safeConnect(e,n.wait,s),c=await Gt(this,Lt,"f").createClientStrategy(r,a),d=new Dt.ChannelClient(a,(()=>Dt.ChannelClient.wireClose(this.wire,a,a.endpointId)),c);return c.onEndpointDisconnect(a.channelId,(async()=>{try{await d.sendDisconnectAction()}catch(e){console.warn(`Something went wrong during disconnect for client with uuid: ${a.uuid} / name: ${a.name} / endpointId: ${a.endpointId}.`)}finally{Dt.ChannelClient.handleProviderDisconnect(a)}})),d}async create(e,t){if(!e)throw new Error("Please provide a channelName to create a channel");const{payload:{data:n}}=await this.wire.sendAction("create-channel",{channelName:e}),i=Gt(this,Lt,"f").createProvider(t,n);return this.on("client-disconnected",(t=>{t.channelName===e&&Vt.ChannelProvider.handleClientDisconnection(i,t)})),i}}le.Channel=Kt,Lt=new WeakMap,Tt=new WeakMap,$t=new WeakMap,Object.defineProperty(de,"__esModule",{value:!0}),de.InterAppPayload=de.InterApplicationBus=void 0;const qt=t,Jt=d,Yt=he,Zt=le,Qt=O;class Xt extends Jt.Base{constructor(e){super(e),this.events={subscriberAdded:"subscriber-added",subscriberRemoved:"subscriber-removed"},this.refCounter=new Yt.RefCounter,this.Channel=new Zt.Channel(e),this.emitter=new qt.EventEmitter,e.registerMessageHandler(this.onmessage.bind(this)),this.on=this.emitter.on.bind(this.emitter),this.removeAllListeners=this.emitter.removeAllListeners.bind(this.emitter)}async publish(e,t){await this.wire.sendAction("publish-message",{topic:e,message:t,sourceWindowName:this.me.name})}async send(e,t,n){const i=(0,Qt.validateIdentity)(e);if(i)throw new Error(i);await this.wire.sendAction("send-message",{destinationUuid:e.uuid,destinationWindowName:e.name,topic:t,message:n,sourceWindowName:this.me.name})}subscribe(e,t,n){const i=this.createSubscriptionKey(e.uuid,e.name||"*",t);return this.emitter.on(i,n),this.refCounter.actOnFirst(i,(async()=>{await this.wire.sendAction("subscribe",{sourceUuid:e.uuid,sourceWindowName:e.name||"*",topic:t,destinationWindowName:this.me.name})}),(()=>Promise.resolve()))}unsubscribe(e,t,n){const i=e.name||"*",r=this.createSubscriptionKey(e.uuid,i,t);return this.emitter.removeListener(r,n),this.refCounter.actOnLast(r,(async()=>{await this.wire.sendAction("unsubscribe",{sourceUuid:e.uuid,sourceWindowName:i,topic:t,destinationWindowName:this.me.name})}),(()=>new Promise((e=>e)).then((()=>{}))))}processMessage(e){const{payload:{message:t,sourceWindowName:n,sourceUuid:i,topic:r}}=e,o=[this.createSubscriptionKey(i,n,r),this.createSubscriptionKey(i,"*",r),this.createSubscriptionKey("*","*",r)],s={uuid:i,name:n};o.forEach((e=>{this.emitter.emit(e,t,s)}))}emitSubscriverEvent(e,t){const{payload:{targetName:n,uuid:i,topic:r}}=t,o={name:n,uuid:i,topic:r};this.emitter.emit(e,o)}createSubscriptionKey(e,t,n){const i=t||"*";if(!(e&&i&&n))throw new Error("Missing uuid, name, or topic string");return function(...e){return e.map((e=>Buffer.from(`${e}`).toString("base64"))).join("/")}(e,i,n)}onmessage(e){const{action:t}=e;switch(t){case"process-message":this.processMessage(e);break;case this.events.subscriberAdded:this.emitSubscriverEvent(this.events.subscriberAdded,e);break;case this.events.subscriberRemoved:this.emitSubscriverEvent(this.events.subscriberRemoved,e)}return!0}}de.InterApplicationBus=Xt;de.InterAppPayload=class{};var en={};Object.defineProperty(en,"__esModule",{value:!0}),en.Clipboard=void 0;const tn=d;class nn extends tn.Base{async writeText(e){await this.wire.sendAction("clipboard-write-text",e)}async readText(e){const{payload:t}=await this.wire.sendAction("clipboard-read-text",{type:e});return t.data}async writeImage(e){await this.wire.sendAction("clipboard-write-image",e)}async readImage(e={format:"dataURL"}){const{payload:t}=await this.wire.sendAction("clipboard-read-image",e);return t.data}async writeHtml(e){await this.wire.sendAction("clipboard-write-html",e)}async readHtml(e){const{payload:t}=await this.wire.sendAction("clipboard-read-html",{type:e});return t.data}async writeRtf(e){await this.wire.sendAction("clipboard-write-rtf",e)}async readRtf(e){const{payload:t}=await this.wire.sendAction("clipboard-read-rtf",{type:e});return t.data}async write(e){await this.wire.sendAction("clipboard-write",e)}async getAvailableFormats(e){const{payload:t}=await this.wire.sendAction("clipboard-read-formats",{type:e});return t.data}}en.Clipboard=nn;var rn={},on={},sn={};Object.defineProperty(sn,"__esModule",{value:!0}),sn.ExternalApplication=void 0;const an=d;class cn extends an.EmitterBase{constructor(e,t){super(e,"external-application",t.uuid),this.identity=t}getInfo(){return this.wire.sendAction("get-external-application-info",this.identity).then((({payload:e})=>e.data))}}sn.ExternalApplication=cn,Object.defineProperty(on,"__esModule",{value:!0}),on.ExternalApplicationModule=void 0;const dn=d,hn=sn;class ln extends dn.Base{wrap(e){return this.wire.sendAction("external-application-wrap").catch((e=>{})),Promise.resolve(new hn.ExternalApplication(this.wire,{uuid:e}))}wrapSync(e){return this.wire.sendAction("external-application-wrap-sync").catch((e=>{})),new hn.ExternalApplication(this.wire,{uuid:e})}}on.ExternalApplicationModule=ln,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(on,e),n(sn,e)}(rn);var un={},pn={},wn={};Object.defineProperty(wn,"__esModule",{value:!0}),wn._Frame=void 0;const yn=d;class fn extends yn.EmitterBase{constructor(e,t){super(e,"frame",t.uuid,t.name),this.identity=t}getInfo(){return this.wire.sendAction("get-frame-info",this.identity).then((({payload:e})=>e.data))}getParentWindow(){return this.wire.sendAction("get-parent-window",this.identity).then((({payload:e})=>e.data))}}wn._Frame=fn,Object.defineProperty(pn,"__esModule",{value:!0}),pn._FrameModule=void 0;const gn=d,mn=O,vn=wn;class Cn extends gn.Base{async wrap(e){this.wire.sendAction("frame-wrap").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}wrapSync(e){this.wire.sendAction("frame-wrap-sync").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}getCurrent(){return this.wire.sendAction("frame-get-current").catch((e=>{})),Promise.resolve(new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity()))}getCurrentSync(){return this.wire.sendAction("frame-get-current-sync").catch((e=>{})),new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity())}}pn._FrameModule=Cn,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(pn,e),n(wn,e)}(un);var bn={};Object.defineProperty(bn,"__esModule",{value:!0}),bn.GlobalHotkey=void 0;const In=d;class En extends In.EmitterBase{constructor(e){super(e,"global-hotkey")}async register(e,t){await this.on(e,t),await this.wire.sendAction("global-hotkey-register",{hotkey:e})}async unregister(e){await this.removeAllListeners(e),await this.wire.sendAction("global-hotkey-unregister",{hotkey:e})}async unregisterAll(){await Promise.all(this.eventNames().filter((e=>!("registered"===e||"unregistered"===e))).map((e=>this.removeAllListeners(e)))),await this.wire.sendAction("global-hotkey-unregister-all",{})}async isRegistered(e){const{payload:{data:t}}=await this.wire.sendAction("global-hotkey-is-registered",{hotkey:e});return t}}bn.GlobalHotkey=En;var xn,An={},Pn={},Mn={},_n=s&&s.__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)};Object.defineProperty(Mn,"__esModule",{value:!0}),Mn.Platform=void 0;const On=d,Sn=O,Rn=new Map;class Fn extends On.EmitterBase{constructor(e,t){super(t.wire,"application",e.uuid),this.getClient=e=>{this.wire.sendAction("platform-get-client",this.identity).catch((e=>{}));const t=e||this.identity,{uuid:n}=t;if(!Rn.has(n)){const e=_n(this,xn,"f").call(this,n);Rn.set(n,e)}return Rn.get(n)},xn.set(this,(async e=>{try{const t=`custom-frame-${e}`,n=await this._channel.connect(t,{wait:!1});return n.onDisconnection((()=>{Rn.delete(e)})),n}catch(t){throw Rn.delete(e),new Error("The targeted Platform is not currently running. Listen for application-started event for the given Uuid.")}})),this.launchLegacyManifest=this.launchContentManifest;const n=(0,Sn.validateIdentity)(e);if(n)throw new Error(n);this._channel=t,this.identity={uuid:e.uuid},this.Layout=this.fin.Platform.Layout,this.Application=this.fin.Application.wrapSync(this.identity)}async createView(e,t,n){this.wire.sendAction("platform-create-view",this.identity).catch((e=>{}));const i=await this.getClient(),r=await i.dispatch("create-view",{target:t,opts:e,targetView:n});if(!r||(0,Sn.validateIdentity)(r.identity))throw new Error(`When overwriting the createView call, please return an object that has a valid 'identity' property: ${JSON.stringify(r)}`);return this.fin.View.wrapSync(r.identity)}async createWindow(e){this.wire.sendAction("platform-create-window",this.identity).catch((e=>{}));const t=await this.getClient();e.reason||(e.reason="api-call");const n=await t.dispatch("create-view-container",e);if(!n||(0,Sn.validateIdentity)(n.identity))throw new Error(`When overwriting the createWindow call, please return an object that has a valid 'identity' property: ${JSON.stringify(n)}`);const{identity:i}=n,r=this.fin.Window.wrapSync(i);return r.name=i.name,r.uuid=i.uuid,r}async quit(){this.wire.sendAction("platform-quit",this.identity).catch((e=>{}));return(await this.getClient()).dispatch("quit")}async closeView(e){this.wire.sendAction("platform-close-view",this.identity).catch((e=>{}));const t=await this.getClient();await t.dispatch("close-view",{view:e})}async reparentView(e,t){console.warn("Platform.reparentView has been deprecated, please use Platform.createView"),this.wire.sendAction("platform-reparent-view",this.identity).catch((e=>{}));const n={...e,uuid:e.uuid??this.identity.uuid},i=await this.fin.View.wrap(n),r=await i.getOptions();return this.createView(r,t)}async getSnapshot(){this.wire.sendAction("platform-get-snapshot",this.identity).catch((e=>{}));return(await this.getClient()).dispatch("get-snapshot")}async getViewSnapshot(e){return(await this.getClient()).dispatch("get-view-snapshot",{viewIdentity:e})}async applySnapshot(e,t){this.wire.sendAction("platform-apply-snapshot",this.identity).catch((e=>{}));const n="Requested snapshot must be a valid Snapshot object, or a url or filepath to such an object.";let i;if("string"==typeof e)try{i=(await this._channel.wire.sendAction("get-application-manifest",{manifestUrl:e})).payload.data}catch(e){throw new Error(`${n}: ${e}`)}else i=e;if(!i.windows)throw new Error(n);const r=await this.getClient();return await r.dispatch("apply-snapshot",{snapshot:i,options:t}),this}async fetchManifest(e){return(await this.getClient()).dispatch("platform-fetch-manifest",{manifestUrl:e})}async launchContentManifest(e){this.wire.sendAction("platform-launch-content-manifest",this.identity).catch((()=>{}));const t=await this.getClient(),n=await this.fetchManifest(e);return t.dispatch("launch-into-platform",{manifest:n,manifestUrl:e}),this}async setWindowContext(e={},t){if(this.wire.sendAction("platform-set-window-context",this.identity).catch((e=>{})),!e)throw new Error("Please provide a serializable object or string to set the context.");const n=await this.getClient(),{entityType:i}=t?await this.fin.System.getEntityInfo(t.uuid,t.name):this.fin.me;await n.dispatch("set-window-context",{context:e,entityType:i,target:t||{uuid:this.fin.me.uuid,name:this.fin.me.name}})}async getWindowContext(e){this.wire.sendAction("platform-get-window-context",this.identity).catch((e=>{}));const t=await this.getClient(),{entityType:n}=e?await this.fin.System.getEntityInfo(e.uuid,e.name):this.fin.me;return t.dispatch("get-window-context",{target:e||{uuid:this.fin.me.uuid,name:this.fin.me.name},entityType:n})}async closeWindow(e,t={skipBeforeUnload:!1}){this.wire.sendAction("platform-close-window",this.identity).catch((e=>{}));return(await this.getClient()).dispatch("close-window",{windowId:e,options:t})}}Mn.Platform=Fn,xn=new WeakMap;var jn={},kn={},Ln={},Tn={};function $n(e){switch(e){case"columns":case"grid":case"rows":case"tabs":return!0;default:return!1}}Object.defineProperty(Tn,"__esModule",{value:!0}),Tn.overrideFromComposables=Tn.isValidPresetType=void 0,Tn.isValidPresetType=$n,Tn.overrideFromComposables=function(...e){return t=>e.reduceRight(((e,t)=>n=>t(e(n))),(e=>e))(t)},Tn.default={isValidPresetType:$n};var Bn={},Gn={},Wn={};Object.defineProperty(Wn,"__esModule",{value:!0}),Wn.ApiConsumer=void 0;Wn.ApiConsumer=class{constructor(e){this.strategy=e,this.consume=async e=>(await this.strategy.getExposedFunctions(e)).reduce(((t,n)=>({...t,[n.key]:this.strategy.createFunction(n,e)})),{})}};var Hn={},Nn={};Object.defineProperty(Nn,"__esModule",{value:!0}),Nn.expose=Nn.getExposedProperties=void 0;const Dn=Symbol("exposedProperties");Nn.getExposedProperties=e=>e[Dn]||e.prototype[Dn]||[];Nn.expose=e=>(t,n,i)=>{t[Dn]=t[Dn]||[],t[Dn].push({key:n,descriptor:i,options:e})},Object.defineProperty(Hn,"__esModule",{value:!0}),Hn.ApiExposer=void 0;const Un=Nn;Hn.ApiExposer=class{constructor(e){this.strategy=e,this.exposeInstance=async(e,t)=>{const n=(0,Un.getExposedProperties)(e),i=await Promise.all(n.map((async({key:n,options:i})=>({key:n,options:await this.strategy.exposeFunction(e[n].bind(e),{key:n,options:i,meta:t})}))));await this.strategy.exposeMeta(t,i)}}};var Vn={},zn={},Kn={};Object.defineProperty(Kn,"__esModule",{value:!0}),Kn.ChannelsConsumer=void 0;Kn.ChannelsConsumer=class{constructor(e){this.channel=e,this.getExposedFunctions=async e=>{const{id:t}=e,{props:n}=await this.channel.dispatch(`api-meta:${t}`);return n},this.createFunction=e=>(...t)=>{const{action:n}=e.options;return this.channel.dispatch(n,{args:t})}}};var qn={};Object.defineProperty(qn,"__esModule",{value:!0}),qn.ChannelsExposer=void 0;qn.ChannelsExposer=class{constructor(e){this.channelProviderOrClient=e,this.exposeFunction=async(e,t)=>{const{key:n,options:i,meta:r}=t,{id:o}=r,s=`${o}.${i?.action||n}`;return await this.channelProviderOrClient.register(s,(async({args:t})=>e(...t))),{action:s}},this.exposeMeta=async({id:e},t)=>{const n=`api-meta:${e}`;await this.channelProviderOrClient.register(n,(()=>({props:t})))}}},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Kn,e),n(qn,e)}(zn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(zn,e)}(Vn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Wn,e),n(Hn,e),n(Vn,e),n(Nn,e)}(Gn);var Jn={};Object.defineProperty(Jn,"__esModule",{value:!0}),Jn.createRelayedDispatch=exports.relayChannelClientApi_1=Jn.relayChannelClientApi=void 0;const Yn=["no longer connected","RTCDataChannel closed unexpectedly","The client you are trying to dispatch from is disconnected from the target provider"];exports.relayChannelClientApi_1=Jn.relayChannelClientApi=async(e,t)=>{e.register(`relay:${t}`,(({action:t,target:n,payload:i})=>e.dispatch(n,t,i))),await Promise.resolve()};Jn.createRelayedDispatch=(e,t,n,i)=>async(r,o)=>{try{return await e.dispatch(`relay:${n}`,{action:r,payload:o,target:t})}catch(e){if(s=e.message,Yn.some((e=>s.includes(e)))&&i)throw new Error(i);throw e}var s};var Zn,Qn,Xn,ei=s&&s.__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},ti=s&&s.__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)};Object.defineProperty(Bn,"__esModule",{value:!0}),Bn.ColumnOrRow=Bn.TabStack=Bn.LayoutNode=void 0;const ni=Gn,ii=Jn;class ri{constructor(e,t){Zn.set(this,void 0),this.isRoot=()=>ti(this,Zn,"f").isRoot(this.entityId),this.exists=()=>ti(this,Zn,"f").exists(this.entityId),this.getParent=async()=>{const e=await ti(this,Zn,"f").getParent(this.entityId);if(e)return ri.getEntity(e,ti(this,Zn,"f"))},this.createAdjacentStack=async(e,t)=>{const n=await ti(this,Zn,"f").createAdjacentStack(this.entityId,e,t);return ri.getEntity({entityId:n,type:"stack"},ti(this,Zn,"f"))},this.getAdjacentStacks=async e=>(await ti(this,Zn,"f").getAdjacentStacks({targetId:this.entityId,edge:e})).map((e=>ri.getEntity({type:"stack",entityId:e.entityId},ti(this,Zn,"f")))),ei(this,Zn,e,"f"),this.entityId=t}}Bn.LayoutNode=ri,Zn=new WeakMap,ri.newLayoutEntitiesClient=async(e,t,n)=>{const i=(0,ii.createRelayedDispatch)(e,n,"layout-relay","You are trying to interact with a layout component on a window that does not exist or has been destroyed.");return new ni.ApiConsumer(new ni.ChannelsConsumer({dispatch:i})).consume({id:t})},ri.getEntity=(e,t)=>{const{entityId:n,type:i}=e;switch(i){case"column":case"row":return new si(t,n,i);case"stack":return new oi(t,n);default:throw new Error(`Unrecognised Layout Entity encountered ('${JSON.stringify(e)})`)}};class oi extends ri{constructor(e,t){super(e,t),Qn.set(this,void 0),this.type="stack",this.getViews=()=>ti(this,Qn,"f").getStackViews(this.entityId),this.addView=async(e,t={index:0})=>ti(this,Qn,"f").addViewToStack(this.entityId,e,t),this.removeView=async e=>{await ti(this,Qn,"f").removeViewFromStack(this.entityId,e)},this.setActiveView=async e=>{await ti(this,Qn,"f").setStackActiveView(this.entityId,e)},ei(this,Qn,e,"f")}}Bn.TabStack=oi,Qn=new WeakMap;class si extends ri{constructor(e,t,n){super(e,t),Xn.set(this,void 0),this.getContent=async()=>(await ti(this,Xn,"f").getContent(this.entityId)).map((e=>ri.getEntity(e,ti(this,Xn,"f")))),ei(this,Xn,e,"f"),this.type=n}}Bn.ColumnOrRow=si,Xn=new WeakMap;var ai={};Object.defineProperty(ai,"__esModule",{value:!0}),ai.DEFAULT_LAYOUT_KEY=ai.LAYOUT_CONTROLLER_ID=void 0,ai.LAYOUT_CONTROLLER_ID="layout-entities",ai.DEFAULT_LAYOUT_KEY="__default__";var ci,di,hi,li=s&&s.__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)};Object.defineProperty(Ln,"__esModule",{value:!0}),Ln.Layout=void 0;const ui=G,pi=O,wi=d,yi=Tn,fi=Bn,gi=ai;class mi extends wi.Base{static getClient(e){return li(e,di,"f").getValue()}constructor(e,t){super(t),ci.add(this),di.set(this,new ui.Lazy((async()=>fi.LayoutNode.newLayoutEntitiesClient(await this.platform.getClient(),gi.LAYOUT_CONTROLLER_ID,this.identity)))),this.replace=async e=>{this.wire.sendAction("layout-replace").catch((e=>{}));const t=await this.platform.getClient();await t.dispatch("replace-layout",{target:this.identity,opts:{layout:e}})},this.replaceView=async(e,t)=>{this.wire.sendAction("layout-replace-view").catch((e=>{}));const n=await this.platform.getClient();await n.dispatch("replace-view",{target:this.identity,opts:{viewToReplace:e,newView:t}})},this.applyPreset=async e=>{this.wire.sendAction("layout-apply-preset").catch((e=>{}));const t=await this.platform.getClient(),{presetType:n}=e;if(!n||!(0,yi.isValidPresetType)(n))throw new Error("Cannot apply preset layout, please include an applicable presetType property in the PresetLayoutOptions.");await t.dispatch("apply-preset-layout",{target:this.identity,opts:{presetType:n}})};const n=(0,pi.validateIdentity)(e);if(n)throw new Error(n);this.identity=e,this.platform=this.fin.Platform.wrapSync({uuid:e.uuid}),e.uuid===this.fin.me.uuid&&e.name===this.fin.me.name&&(this.init=this.fin.Platform.Layout.init)}async getConfig(){this.wire.sendAction("layout-get-config").catch((e=>{}));return(await this.platform.getClient()).dispatch("get-frame-snapshot",{target:this.identity})}async getCurrentViews(){this.wire.sendAction("layout-get-views").catch((e=>{}));const e=await this.platform.getClient();return(await e.dispatch("get-layout-views",{target:this.identity})).map((e=>this.fin.View.wrapSync(e)))}async getRootItem(){this.wire.sendAction("layout-get-root-item").catch((()=>{}));const e=await li(this,di,"f").getValue(),t=await e.getRoot("layoutName"in this.identity?this.identity:void 0);return fi.LayoutNode.getEntity(t,e)}async getStackByViewIdentity(e){this.wire.sendAction("layout-get-stack-by-view").catch((()=>{}));const t=await li(this,di,"f").getValue(),n=await t.getStackByView(e);if(!n)throw new Error(`No stack found for view: ${e.uuid}/${e.name}`);return fi.LayoutNode.getEntity(n,t)}async addView(e,{location:t,targetView:n}={}){this.wire.sendAction("layout-add-view").catch((e=>{}));const{identity:i}=await li(this,ci,"m",hi).call(this,"layout-add-view",{viewOptions:e,location:t,targetView:n});return{identity:i}}async closeView(e){this.wire.sendAction("layout-close-view").catch((e=>{})),await li(this,ci,"m",hi).call(this,"layout-close-view",{viewIdentity:e})}}Ln.Layout=mi,di=new WeakMap,ci=new WeakSet,hi=async function(e,t){return(await this.platform.getClient()).dispatch(e,{target:this.identity,opts:t})};var vi,Ci,bi,Ii,Ei,xi=s&&s.__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)},Ai=s&&s.__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};Object.defineProperty(kn,"__esModule",{value:!0}),kn.LayoutModule=void 0;const Pi=d,Mi=Ln,_i=ai;class Oi extends Pi.Base{constructor(){super(...arguments),vi.add(this),Ci.set(this,!1),bi.set(this,null),this.init=async(e={})=>{if(this.wire.sendAction("layout-init").catch((e=>{})),!this.wire.environment.layoutAllowedInContext(this.fin))throw new Error("Layout.init can only be called from a Window context.");if(xi(this,Ci,"f"))throw new Error("Layout.init was already called, please use Layout.create to add additional layouts.");"openfin"===this.wire.environment.type&&await this.fin.Platform.getCurrentSync().getClient(),Ai(this,Ci,!0,"f"),Ai(this,bi,await this.wire.environment.initLayoutManager(this.fin,this.wire,e),"f"),await this.wire.environment.applyLayoutSnapshot(this.fin,xi(this,bi,"f"),e);const t={name:this.fin.me.name,uuid:this.fin.me.uuid};if(!e.layoutManagerOverride){const e={layoutName:_i.DEFAULT_LAYOUT_KEY,...t};return xi(this,Ii,"f").call(this,e)}return this.wrapSync(t)},Ii.set(this,(e=>{const t="[Layout] You are using a deprecated property `layoutManager` - it will throw if you access it starting in v37.",n=new Proxy({},{get(e,n){throw console.warn(`[Layout-mgr-proxy] accessing ${n.toString()}`),new Error(t)}}),i=Object.assign(this.wrapSync(e),{layoutManager:n});return new Proxy(i,{get(e,n){if("layoutManager"===n)throw console.warn(`[Layout-proxy] accessing ${n.toString()}`),new Error(t);return e[n]}})})),this.getCurrentLayoutManagerSync=()=>xi(this,vi,"m",Ei).call(this,"fin.Platform.Layout.getCurrentLayoutManagerSync()"),this.create=async e=>this.wire.environment.createLayout(xi(this,vi,"m",Ei).call(this,"fin.Platform.Layout.create()"),e),this.destroy=async e=>this.wire.environment.destroyLayout(xi(this,vi,"m",Ei).call(this,"fin.Platform.Layout.destroy()"),e)}async wrap(e){return this.wire.sendAction("layout-wrap").catch((e=>{})),new Mi.Layout(e,this.wire)}wrapSync(e){return this.wire.sendAction("layout-wrap-sync").catch((e=>{})),new Mi.Layout(e,this.wire)}async getCurrent(){if(this.wire.sendAction("layout-get-current").catch((e=>{})),"openfin"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error("You are not in a Window context. Only Windows can have a Layout.");const{uuid:e,name:t}=this.fin.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction("layout-get-current-sync").catch((e=>{})),"openfin"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error("You are not in a Window context. Only Windows can have a Layout.");const{uuid:e,name:t}=this.fin.me;return this.wrapSync({uuid:e,name:t})}async getLayoutByViewIdentity(e){this.wire.sendAction("layout-get-by-view-identity").catch((()=>{}));let t=await this.wire.environment.getViewWindowIdentity(this.fin,e);t.identity&&(t=t.identity);try{const n=this.wrapSync(t),i=await Mi.Layout.getClient(n),r=await i.getLayoutIdentityForViewOrThrow(e);return this.wrapSync(r)}catch(n){if(!["No action registered at target for","getLayoutIdentityForViewOrThrow is not a function"].some((e=>n.message.includes(e))))throw n;if(t.uuid===t.name)throw new Error(`View identity ${JSON.stringify(e)} is not attached to any layout in provider window ${JSON.stringify(t)}.`);return this.wrapSync(t)}}}kn.LayoutModule=Oi,Ci=new WeakMap,bi=new WeakMap,Ii=new WeakMap,vi=new WeakSet,Ei=function(e){if(!xi(this,bi,"f"))throw new Error(`You must call init before using the API ${e}`);return xi(this,bi,"f")},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(kn,e),n(Ln,e)}(jn),Object.defineProperty(Pn,"__esModule",{value:!0}),Pn.PlatformModule=void 0;const Si=d,Ri=Mn,Fi=jn;class ji extends Si.Base{constructor(e,t){super(e),this._channel=t,this.Layout=new Fi.LayoutModule(this.wire)}async init(e){if(!fin.__internal_.isPlatform||fin.me.name!==fin.me.uuid)throw new Error("fin.Platform.init should only be called from a custom platform provider running in the main window of the application.");return this.wire.environment.initPlatform(this.fin,e)}async wrap(e){return this.wire.sendAction("platform-wrap").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}wrapSync(e){return this.wire.sendAction("platform-wrap-sync").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}async getCurrent(){return this.wire.sendAction("platform-get-current").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction("platform-get-current-sync").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}start(e){return this.wire.sendAction("platform-start").catch((e=>{})),new Promise((async(t,n)=>{try{const{uuid:n}=e,i=await this.fin.Application._create({...e,isPlatformController:!0});i.once("platform-api-ready",(()=>t(this.wrapSync({uuid:n})))),i._run({uuid:n})}catch(e){n(e)}}))}startFromManifest(e,t){return this.wire.sendAction("platform-start-from-manifest").catch((e=>{})),new Promise((async(n,i)=>{try{const i=await this.fin.Application._createFromManifest(e);i.once("platform-api-ready",(()=>n(this.wrapSync({uuid:i.identity.uuid})))),i._run(t)}catch(e){i(e)}}))}}Pn.PlatformModule=ji,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Pn,e),n(Mn,e)}(An);var ki={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getMe=e.getBaseMe=e.environmentUnsupportedMessage=void 0;const t=J(),n=un,i=ie(),r=rn;function o(e,t,n){return{...{isView:"view"===e,isWindow:"window"===e,isFrame:"iframe"===e,isExternal:"external connection"===e},uuid:t,name:n,entityType:e}}e.environmentUnsupportedMessage="You are not running in OpenFin.",e.getBaseMe=o,e.getMe=function(s){const{uuid:a,name:c,entityType:d}=s.me,h={setContext(){throw new Error(e.environmentUnsupportedMessage)},addContextHandler(){throw new Error(e.environmentUnsupportedMessage)},getContextGroups(){throw new Error(e.environmentUnsupportedMessage)},joinContextGroup(){throw new Error(e.environmentUnsupportedMessage)},removeFromContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getAllClientsInContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getInfoForContextGroup(){throw new Error(e.environmentUnsupportedMessage)}},l="Interop API has not been instantiated. Either connection has failed or you have not declared interop in your config.",u={setContext(){throw new Error(l)},addContextHandler(){throw new Error(l)},getContextGroups(){throw new Error(l)},joinContextGroup(){throw new Error(l)},removeFromContextGroup(){throw new Error(l)},getAllClientsInContextGroup(){throw new Error(l)},getInfoForContextGroup(){throw new Error(l)}},p={eventNames:()=>{throw new Error(e.environmentUnsupportedMessage)},emit:()=>{throw new Error(e.environmentUnsupportedMessage)},listeners:()=>{throw new Error(e.environmentUnsupportedMessage)},listenerCount:()=>{throw new Error(e.environmentUnsupportedMessage)},on:()=>{throw new Error(e.environmentUnsupportedMessage)},addListener:()=>{throw new Error(e.environmentUnsupportedMessage)},once:()=>{throw new Error(e.environmentUnsupportedMessage)},prependListener:()=>{throw new Error(e.environmentUnsupportedMessage)},prependOnceListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeAllListeners:()=>{throw new Error(e.environmentUnsupportedMessage)}};switch(d){case"view":return Object.assign(new t.View(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case"window":return Object.assign(new i._Window(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case"iframe":return Object.assign(new n._Frame(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case"external connection":return Object.assign(new r.ExternalApplication(s,{uuid:a}),o(d,a,c),{interop:u,isOpenFin:!1});default:return{...o(d,a,c),...p,interop:h,isOpenFin:!1}}}}(ki);var Li={},Ti={},$i={};Object.defineProperty($i,"__esModule",{value:!0}),$i.createWarningObject=$i.createUnusableObject=void 0,$i.createUnusableObject=function(e){const t=()=>{throw new Error(e)};return new Proxy({},{apply:t,construct:t,defineProperty:t,deleteProperty:t,get:t,getOwnPropertyDescriptor:t,getPrototypeOf:t,has:t,isExtensible:t,ownKeys:t,preventExtensions:t,set:t,setPrototypeOf:t})},$i.createWarningObject=function(e,t){return new Proxy(t,{get:(...t)=>(console.warn(e),Reflect.get(...t)),set:(...t)=>(console.warn(e),Reflect.set(...t)),getOwnPropertyDescriptor:(...t)=>(console.warn(e),Reflect.getOwnPropertyDescriptor(...t)),ownKeys:(...t)=>(console.warn(e),Reflect.ownKeys(...t))})};var Bi,Gi={},Wi={};var Hi={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.wrapIntentHandler=e.BROKER_ERRORS=e.generateOverrideWarning=e.generateOverrideError=e.wrapContextHandler=e.wrapInTryCatch=e.generateId=void 0;e.generateId=()=>`${Math.random()}${Date.now()}`;e.wrapInTryCatch=(e,t)=>(...n)=>{try{return e(...n)}catch(e){throw new Error((t||"")+e)}};e.wrapContextHandler=(e,t)=>async n=>{try{await e(n)}catch(e){throw console.error(`Error thrown by handler ${t} for context type ${n.type}: ${e}`),e}};e.generateOverrideError=(e,t)=>`You have tried to to use ${e} but ${t} has not been overridden in the Interop Broker. Please override this function. Refer to our documentation for more info.`;e.generateOverrideWarning=(e,t,n,i)=>{const{uuid:r,name:o}=n;return i?`Entity with identity: ${r}/${o} has called ${i} or ${e} but ${t} has not been overridden.`:`Entity with identity: ${r}/${o} has called ${e} but ${t} has not been overridden.`},e.BROKER_ERRORS={fireIntent:(0,e.generateOverrideError)("fireIntent","handleFiredIntent"),fireIntentForContext:(0,e.generateOverrideError)("fireIntentForContext","handleFiredIntentForContext"),getInfoForIntent:(0,e.generateOverrideError)("getInfoForIntent","handleInfoForIntent"),getInfoForIntentsByContext:(0,e.generateOverrideError)("getInfoForIntentsByContext","handleInfoForIntentsByContext"),joinSessionContextGroupWithJoinContextGroup:"The Context Group you have tried to join is a Session Context Group. Custom Context Groups can only be defined by the Interop Broker through code or manifest configuration. Please use joinSessionContextGroup.",fdc3Open:(0,e.generateOverrideError)("fdc3.open","fdc3HandleOpen"),fdc3FindInstances:(0,e.generateOverrideError)("fdc3.findInstances","fdc3HandleFindInstances"),fdc3GetAppMetadata:(0,e.generateOverrideError)("fdc3.getAppMetadata","fdc3HandleGetAppMetadata"),fdc3GetInfo:(0,e.generateOverrideError)("fdc3.getInfo","fdc3HandleGetInfo")};e.wrapIntentHandler=(e,t)=>async n=>{try{return e(n)}catch(e){throw console.error(`Error thrown by handler ${t}: ${e}`),e}}}(Hi);var Ni,Di,Ui={};function Vi(){if(Di)return Gi;Di=1;var e,t,n,r=s&&s.__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},o=s&&s.__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)},a=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Gi,"__esModule",{value:!0}),Gi.InteropBroker=void 0;const c=d,h=a(function(){if(Bi)return Wi;Bi=1,Object.defineProperty(Wi,"__esModule",{value:!0});const e=Cr();return Wi.default=class{constructor(e,t){this.provider=e,this.id=t,this.lastContext=void 0,this.contextGroupMap=new Map,this.clients=new Map,this.registerListeners()}registerListeners(){this.provider.register(`sessionContextGroup:getContext-${this.id}`,this.getCurrentContext.bind(this)),this.provider.register(`sessionContextGroup:setContext-${this.id}`,this.setContext.bind(this)),this.provider.register(`sessionContextGroup:handlerAdded-${this.id}`,this.handlerAdded.bind(this)),this.provider.register(`sessionContextGroup:handlerRemoved-${this.id}`,this.handlerRemoved.bind(this))}getCurrentContext(e){return e.type?this.contextGroupMap.get(e.type):this.lastContext}setContext(t,n){const{context:i}=t,r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name} not in Session Client State Map`);this.contextGroupMap.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{e.contextHandlers.get(i.type)?.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getClientState(e){return this.clients.get(e.endpointId)}async handlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(i){const e=r.contextHandlers.get(i)||[];r.contextHandlers.set(i,[...e,n]);const o=this.contextGroupMap.get(i);o&&await this.provider.dispatch(t,n,o)}else{r.globalHandler=n;const e=[...this.contextGroupMap.keys()].map((async e=>{const i=this.contextGroupMap.get(e);i&&await this.provider.dispatch(t,n,i)}));await Promise.all(e)}}handlerRemoved(e,t){const{handlerId:n}=e,i=this.clients.get(t.endpointId);i?(Array.from(i.contextHandlers).forEach((([,e])=>{const t=e.indexOf(n);t>-1&&e.splice(t,1)})),i.globalHandler===n&&(i.globalHandler=void 0)):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={contextHandlers:new Map,clientIdentity:e,globalHandler:void 0};this.clients.set(e.endpointId,t)}}onDisconnection(e){this.clients.delete(e.endpointId)}},Wi}()),l=Hi,u=a(i),p=function(){if(Ni)return Ui;Ni=1,Object.defineProperty(Ui,"__esModule",{value:!0}),Ui.PrivateChannelProvider=void 0;const e=Vi();return Ui.PrivateChannelProvider=class t{constructor(e,t){this.provider=e,this.id=t,this.clients=new Map,this.registerListeners(),this.contextByContextType=new Map,this.lastContext=void 0,this.provider.onConnection((e=>this.registerNewClient(e))),this.provider.onDisconnection((async e=>{const{endpointId:t}=e;this.clients.has(t)&&await this.handleClientDisconnecting(e),0===(await this.provider.getAllClientInfo()).length&&this.provider.destroy()}))}getClientState(e){return this.clients.get(e.endpointId)}registerListeners(){this.provider.register("broadcast",this.broadcast.bind(this)),this.provider.register("getCurrentContext",this.getCurrentContext.bind(this)),this.provider.register("contextHandlerAdded",this.contextHandlerAdded.bind(this)),this.provider.register("contextHandlerRemoved",this.contextHandlerRemoved.bind(this)),this.provider.register("nonStandardHandlerRemoved",this.nonStandardHandlerRemoved.bind(this)),this.provider.register("onAddContextHandlerAdded",this.onAddContextHandlerAdded.bind(this)),this.provider.register("onDisconnectHandlerAdded",this.onDisconnectHandlerAdded.bind(this)),this.provider.register("onUnsubscribeHandlerAdded",this.onUnsubscribeHandlerAdded.bind(this)),this.provider.register("clientDisconnecting",((e,t)=>{this.handleClientDisconnecting(t)}))}broadcast(t,n){const{context:i}=t;if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name}, tried to call broadcast, is not connected to this Private Channel`);const r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to broadcast - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);this.contextByContextType.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{const t=e.handlerIdsByContextTypes.get(i.type);t&&t.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getCurrentContext(e,t){const{contextType:n}=e;if(!this.getClientState(t))throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call getCurrentContext, is not connected to this Private Channel`);if(void 0!==n){return this.contextByContextType.get(n)||null}return this.lastContext?this.lastContext:null}contextHandlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call addContextListener, is not connected to this Private Channel`);if(i){const e=r.handlerIdsByContextTypes.get(i)||[];r.handlerIdsByContextTypes.set(i,[...e,n])}else r.globalHandler=n;Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&e.onAddContextListenerHandlerId&&this.provider.dispatch(e.clientIdentity,e.onAddContextListenerHandlerId,i)}))}async contextHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);if(i){let e;if(i.globalHandler===n)i.globalHandler=void 0;else for(const[t,r]of i.handlerIdsByContextTypes){const i=r.indexOf(n);i>-1&&(r.splice(i,1),e=t)}const r=(await this.getConnectedClients()).map((async n=>{const{clientIdentity:i,clientIdentity:{endpointId:r},onUnsubscribeHandlerId:o}=n;r!==t.endpointId&&o&&await this.provider.dispatch(i,o,e)}));try{await Promise.all(r)}catch(e){throw console.error(`Problem when attempting to dispatch to onUnsubscribeHandlers. Error: ${e} Removing Client: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}`),new Error(e)}}else console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}.`)}nonStandardHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);i?i.onDisconnectHandlerId===n?i.onDisconnectHandlerId=void 0:i.onAddContextListenerHandlerId===n?i.onAddContextListenerHandlerId=void 0:i.onUnsubscribeHandlerId===n&&(i.onUnsubscribeHandlerId=void 0):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}onAddContextHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onAddContextListener, is not connected to this Private Channel`);n.onAddContextListenerHandlerId=i,Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&Array.from(e.handlerIdsByContextTypes.keys()).forEach((e=>{this.provider.dispatch(t,i,e)}))}))}onDisconnectHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onDisconnect, is not connected to this Private Channel`);n.onDisconnectHandlerId=i}onUnsubscribeHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onUnsubscribe, is not connected to this Private Channel`);n.onUnsubscribeHandlerId=i}removeClient(e){const t=this.getClientState(e);if(!t)throw new Error(`Client with Identity: ${e.uuid} ${e.name}, tried to call disconnect, is not connected to this Private Channel`);t.handlerIdsByContextTypes.clear(),this.clients.delete(e.endpointId)}async fireOnDisconnectForOtherClients(e){const{endpointId:t}=e,n=(await this.getConnectedClients()).map((async e=>{const{clientIdentity:{endpointId:n},onDisconnectHandlerId:i}=e;n!==t&&i&&await this.provider.dispatch(e.clientIdentity,i)}));try{await Promise.all(n)}catch(t){throw console.error(`Problem when attempting to dispatch to onDisconnectHandlers. Error: ${t} Disconnecting Client: uuid: ${e.uuid}. name: ${e.name}. endpointId: ${e.endpointId}`),new Error(t)}}async unsubscribeAll(e){const{endpointId:t}=e,n=this.clients.get(t);if(n){const t=Array.from(n.handlerIdsByContextTypes.values()).flat(),i=n.globalHandler;if(t.length>0){const n=t.map((async t=>this.contextHandlerRemoved({handlerId:t},e)));try{await Promise.all(n)}catch(e){console.error(e.message)}}if(i)try{await this.contextHandlerRemoved({handlerId:i},e)}catch(e){console.error(e.message)}}}async handleClientDisconnecting(e){await this.unsubscribeAll(e),this.removeClient(e),await this.fireOnDisconnectForOtherClients(e)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={clientIdentity:e,handlerIdsByContextTypes:new Map,globalHandler:void 0,onAddContextListenerHandlerId:void 0,onUnsubscribeHandlerId:void 0,onDisconnectHandlerId:void 0};this.clients.set(e.endpointId,t)}}async getConnectedClients(){const e=await this.provider.getAllClientInfo();return Array.from(this.clients.values()).filter((t=>{const{uuid:n,name:i}=t.clientIdentity;return e.some((e=>i===e.name&&n===e.uuid))}))}static init(e,n){return new t(e,n)}},Ui}(),w=G,y=[{id:"green",displayMetadata:{color:"#00CC88",name:"green"}},{id:"purple",displayMetadata:{color:"#8C61FF",name:"purple"}},{id:"orange",displayMetadata:{color:"#FF8C4C",name:"orange"}},{id:"red",displayMetadata:{color:"#FF5E60",name:"red"}},{id:"pink",displayMetadata:{color:"#FF8FB8",name:"pink"}},{id:"yellow",displayMetadata:{color:"#E9FF8F",name:"yellow"}}];let f=class i extends c.Base{constructor(i,s,a){super(i),e.set(this,void 0),t.set(this,void 0),n.set(this,void 0),this.getProvider=()=>o(this,n,"f").getValue(),this.interopClients=new Map,this.contextGroupsById=new Map,r(this,t,a.contextGroups??[...y],"f"),r(this,e,a.fdc3Info,"f"),a?.logging&&(this.logging=a.logging),this.intentClientMap=new Map,this.lastContextMap=new Map,this.sessionContextGroupMap=new Map,r(this,n,new w.Lazy(s),"f"),this.setContextGroupMap(),this.setupChannelProvider()}static createClosedConstructor(...e){return class extends i{constructor(...t){if(t.length){const[n,i,r]=t;if(r&&"object"==typeof r&&!(0,u.default)(r,e[2]))return console.warn("You have modified the parameters of the InteropOverride constructor. This behavior is deprecated and will be removed in a future version. You can modify these options in your manifest. Please consult our Interop docs for guidance on migrating to the new override scheme."),void super(e[0],e[1],r);console.warn("You are attempting to pass arguments to the InteropOverride constructor. This is not necessary, and these passed arguments will be ignored. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.")}super(...e)}}}setContext({context:e},t){this.wire.sendAction("interop-broker-set-context").catch((e=>{}));const n=this.getClientState(t);if(!n||!n.contextGroupId)throw n?new Error("You must join a context group before you can set context."):new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);{const{contextGroupId:t}=n;this.setContextForGroup({context:e},t)}}setContextForGroup({context:e},t){this.wire.sendAction("interop-broker-set-context-for-group").catch((e=>{}));const n=this.contextGroupsById.get(t);if(!n)throw new Error(`Unable to set context for context group that isn't in the context group mapping: ${t}.`);const r=i.checkContextIntegrity(e);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(e)}`);const o=e.type;n.set(o,e),this.lastContextMap.set(t,o);Array.from(this.interopClients.values()).filter((e=>e.contextGroupId===t)).forEach((t=>{for(const[,n]of t.contextHandlers)i.isContextTypeCompatible(o,n.contextType)&&this.invokeContextHandler(t.clientIdentity,n.handlerId,e)}))}getCurrentContext(e,t){this.wire.sendAction("interop-broker-get-current-context").catch((e=>{}));const n=this.getClientState(t);if(!n?.contextGroupId)throw new Error("You must be a member of a context group to call getCurrentContext");const{contextGroupId:i}=n,r=this.contextGroupsById.get(i),o=this.lastContextMap.get(i),s=e?.contextType??o;return r&&s?r.get(s):void 0}async joinContextGroup({contextGroupId:e,target:t},n){if(this.wire.sendAction("interop-broker-join-context-group").catch((e=>{})),this.sessionContextGroupMap.has(e))throw new Error(l.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup);if(t){i.hasEndpointId(t)&&await this.addClientToContextGroup({contextGroupId:e},t);try{const n=this.channel.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name));if(!n.length)throw new Error(`Given Identity ${t.uuid} ${t.name} is not connected to the Interop Broker.`);n.length>1&&console.warn(`More than one connection found for identity ${t.uuid} ${t.name}`);const i=[];for(const t of n)i.push(this.addClientToContextGroup({contextGroupId:e},t));await Promise.all(i)}catch(e){throw new Error(e)}}else await this.addClientToContextGroup({contextGroupId:e},n)}async addClientToContextGroup({contextGroupId:e},t){this.wire.sendAction("interop-broker-add-client-to-context-group").catch((e=>{}));const n=this.getClientState(t);if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(!this.getContextGroups().find((t=>t.id===e)))throw new Error(`Attempting to join a context group that does not exist: ${e}. You may only join existing context groups.`);if(n.contextGroupId!==e){n.contextGroupId=e,await this.setCurrentContextGroupInClientOptions(t,e);const i=this.contextGroupsById.get(e);for(const[,e]of n.contextHandlers){const{contextType:n,handlerId:r}=e;if(void 0===n)i.forEach(((e,n)=>{this.invokeContextHandler(t,r,e)}));else if(i.has(n)){const e=i.get(n);e&&this.invokeContextHandler(t,r,e)}}}}async removeFromContextGroup({target:e},t){if(this.wire.sendAction("interop-broker-remove-from-context-group").catch((e=>{})),e){i.hasEndpointId(e)&&await this.removeClientFromContextGroup(e);try{const t=this.channel.connections.filter((t=>t.uuid===e.uuid&&t.name===e.name));if(!t.length)throw new Error(`No connection found for given Identity ${e.uuid} ${e.name}`);t.length>1&&console.warn(`More than one connection found for identity ${e.uuid} ${e.name}`);const n=[];for(const e of t)n.push(this.removeClientFromContextGroup(e));await Promise.all(n)}catch(e){throw new Error(e)}}else await this.removeClientFromContextGroup(t)}async removeClientFromContextGroup(e){this.wire.sendAction("interop-broker-remove-client-from-context-group").catch((e=>{}));const t=this.getClientState(e);t&&(t.contextGroupId=void 0),await this.setCurrentContextGroupInClientOptions(e,null)}getContextGroups(){return this.wire.sendAction("interop-broker-get-context-groups").catch((e=>{})),o(this,t,"f").map((e=>({...e})))}getInfoForContextGroup({contextGroupId:e}){return this.wire.sendAction("interop-broker-get-info-for-context-group").catch((e=>{})),this.getContextGroups().find((t=>t.id===e))}getAllClientsInContextGroup({contextGroupId:e}){this.wire.sendAction("interop-broker-get-all-clients-in-context-group").catch((e=>{}));return Array.from(this.interopClients.values()).filter((t=>t.contextGroupId===e)).map((e=>e.clientIdentity))}async handleFiredIntent(e,t){const n=(0,l.generateOverrideWarning)("fdc3.raiseIntent","InteropBroker.handleFiredIntent",t,"interopClient.fireIntent");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntent)}async setIntentTarget(e,t){this.wire.sendAction("interop-broker-set-intent-target").catch((e=>{}));const n=this.intentClientMap.get(t.name),i=`intent-handler-${e.name}`;if(n){const t=n.get(i);if(t){if(t.pendingIntents.push(e),t.clientIdentity&&t.isReady){const{clientIdentity:e,pendingIntents:n}=t;try{const r=n[n.length-1];await this.invokeIntentHandler(e,i,r),t.pendingIntents=[]}catch(n){console.error(`Error invoking intent handler for client ${e.uuid}/${e.name}/${e.endpointId}`),t.isReady=!1}}}else n.set(i,{isReady:!1,pendingIntents:[e]})}else{this.intentClientMap.set(t.name,new Map);const n=this.intentClientMap.get(t.name);n&&n.set(i,{isReady:!1,pendingIntents:[e]})}}async handleInfoForIntent(e,t){const n=(0,l.generateOverrideWarning)("fdc3.findIntent","InteropBroker.handleInfoForIntent",t,"interopClient.getInfoForIntent");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntent)}async handleInfoForIntentsByContext(e,t){const n=(0,l.generateOverrideWarning)("fdc3.findIntentsByContext","InteropBroker.handleInfoForIntentsByContext",t,"interopClient.getInfoForIntentsByContext");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntentsByContext)}async handleFiredIntentForContext(e,t){const n=(0,l.generateOverrideWarning)("fdc3.raiseIntentForContext","InteropBroker.handleFiredIntentForContext",t,"interopClient.fireIntentForContext");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntentForContext)}async clientDisconnected(e){}async fdc3HandleOpen({app:e,context:t},n){const i=(0,l.generateOverrideWarning)("fdc3.open","InteropBroker.fdc3HandleOpen",n);throw console.warn(i),new Error(l.BROKER_ERRORS.fdc3Open)}async fdc3HandleFindInstances(e,t){const n=(0,l.generateOverrideWarning)("fdc3.open","InteropBroker.fdc3HandleFindInstances",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3FindInstances)}async fdc3HandleGetAppMetadata(e,t){const n=(0,l.generateOverrideWarning)("fdc3.getAppMetadata","InteropBroker.fdc3HandleGetAppMetadata",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3GetAppMetadata)}async invokeContextHandler(e,t,n){const i=await this.getProvider();try{await i.dispatch(e,t,n)}catch(i){console.error(`Error invoking context handler ${t} for context type ${n.type} in client ${e.uuid}/${e.name}/${e.endpointId}`,i)}}async invokeIntentHandler(e,t,n){const i=await this.getProvider();await i.dispatch(e,t,n)}async fdc3HandleGetInfo(t,n){const{fdc3Version:i}=t;return{fdc3Version:i,...o(this,e,"f"),optionalFeatures:{OriginatingAppMetadata:!1,UserChannelMembershipAPIs:!0},appMetadata:{appId:"",instanceId:""}}}async getAllClientInfo(){return(await this.getProvider()).getAllClientInfo()}decorateSnapshot(e){return{...e,interopSnapshotDetails:{contextGroupStates:this.getContextGroupStates()}}}applySnapshot(e,t){const n=e?.interopSnapshotDetails?.contextGroupStates;n&&(t?.closeExistingWindows||this.updateExistingClients(n),this.rehydrateContextGroupStates(n))}updateExistingClients(e){this.interopClients.forEach((t=>{const{clientIdentity:n,contextGroupId:r,contextHandlers:o}=t;if(r){const t=e[r];for(const[,e]of Object.entries(t))o.forEach((t=>{const{handlerId:r,contextType:o}=t;i.isContextTypeCompatible(e.type,o)&&this.invokeContextHandler(n,r,e)}))}}))}getContextGroupStates(){return i.toObject(this.contextGroupsById)}rehydrateContextGroupStates(e){const t=Object.entries(e);for(const[e,n]of t){const t=Object.entries(n);for(const[n,i]of t)if(this.contextGroupsById.has(e)){this.contextGroupsById.get(e).set(n,i)}else console.warn(`Attempting to set a context group that isn't in the context group mapping. Skipping context group rehydration for: ${e}`)}}contextHandlerRegistered({contextType:e,handlerId:t},n){const i={contextType:e,handlerId:t},r=this.getClientState(n);if(r?.contextHandlers.set(t,i),r&&r.contextGroupId){const{contextGroupId:i}=r,o=this.contextGroupsById.get(i);if(void 0===e)o.forEach(((e,i)=>{this.invokeContextHandler(n,t,e)}));else if(o.has(e)){const i=o.get(e);i&&this.invokeContextHandler(n,t,i)}}}async intentHandlerRegistered(e,t){const{handlerId:n}=e,i=this.intentClientMap.get(t.name),r=i?.get(n);if(i)if(r){const{pendingIntents:e}=r;r.clientIdentity=t,r.isReady=!0;try{if(e.length>0){const i=e[e.length-1];await this.invokeIntentHandler(t,n,i),r.pendingIntents=[]}}catch(e){console.error(`Error invoking intent handler: ${n} for client ${t.uuid}/${t.name}/${t.endpointId}`)}}else i.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t});else{this.intentClientMap.set(t.name,new Map);const e=this.intentClientMap.get(t.name);e&&e.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t})}}removeContextHandler({handlerId:e},t){const n=this.getClientState(t);n&&n.contextHandlers.delete(e)}handleJoinSessionContextGroup({sessionContextGroupId:e},t){try{if(!e)throw new Error("Failed to join session context group: must specify group id.");const n=this.sessionContextGroupMap.get(e);if(n)n.registerNewClient(t);else{const n=new h.default(this.channel,e);n.registerNewClient(t),this.sessionContextGroupMap.set(e,n)}return{hasConflict:this.contextGroupsById.has(e)}}catch(e){throw new Error(e)}}getClientState(e){return this.interopClients.get(e.endpointId)}static toObject(e){const t=Object.fromEntries(e),n={};return Object.entries(t).forEach((([e,t])=>{const i=Object.fromEntries(t);n[e]=i})),n}static checkContextIntegrity(e){if(!e)return{isValid:!1,reason:"No context supplied"};if("object"!=typeof e)return{isValid:!1,reason:"Context must be an Object"};if(!e.type)return{isValid:!1,reason:"Context must have a type property"};if(e.id&&"object"!=typeof e.id)return{isValid:!1,reason:"Context id must be an Object populated with key-value identifiers (if set)"};if(e.id){const{id:t}=e,n=Object.keys(t);let i=!1;if(!n.length)return{isValid:!1,reason:"Context id must have at least one key-value identifier"};if(n.forEach((e=>{"string"==typeof e&&"string"==typeof t[e]||(i=!0)})),i)return{isValid:!1,reason:"Context id key-value identifiers must be of type string"}}return e.name&&"string"!=typeof e.name?{isValid:!1,reason:"Context name must be of string type (if set)"}:{isValid:!0}}static hasEndpointId(e){return void 0!==e.endpointId}static isContextTypeCompatible(e,t){return void 0===t||e===t}setContextGroupMap(){for(const e of this.getContextGroups())this.contextGroupsById.set(e.id,new Map)}async setCurrentContextGroupInClientOptions(e,t){try{const n=await this.fin.System.getEntityInfo(e.uuid,e.name);let i;"view"===n.entityType?i=await this.fin.View.wrap(e):"window"===n.entityType&&(i=await this.fin.Window.wrap(e)),i&&await i.updateOptions({interop:{currentContextGroup:t}})}catch(e){}}async setupChannelProvider(){try{const e=await this.getProvider();this.channel=e,this.wireChannel(e)}catch(e){throw new Error(`Error setting up Interop Broker Channel Provider: ${e}`)}}wireChannel(e){e.onConnection((async(e,t)=>{if(!await this.isConnectionAuthorized(e,t))throw new Error(`Connection not authorized for ${e.uuid}, ${e.name}`);if(!e.endpointId)throw new Error("Version too old to be compatible with Interop. Please upgrade your runtime to a more recent version.");const n={contextGroupId:void 0,contextHandlers:new Map,clientIdentity:e};t?.currentContextGroup&&this.contextGroupsById.has(t.currentContextGroup)&&(n.contextGroupId=t?.currentContextGroup),this.interopClients.set(e.endpointId,n)})),e.onDisconnection((e=>{this.interopClients.delete(e.endpointId);const t=this.intentClientMap.get(e.name);t&&e.uuid===this.fin.me.uuid&&t.forEach((e=>{e.isReady=!1})),this.sessionContextGroupMap.forEach((t=>{t.onDisconnection(e)})),this.clientDisconnected(e)})),e.beforeAction((async(e,t,n)=>{if(!await this.isActionAuthorized(e,t,n))throw new Error(`Action (${e}) not authorized for ${n.uuid}, ${n.name}`);this.logging?.beforeAction?.enabled&&console.log(e,t,n)})),e.afterAction(((e,t,n)=>{this.logging?.afterAction?.enabled&&console.log(e,t,n)})),e.register("setContext",this.setContext.bind(this)),e.register("fireIntent",this.handleFiredIntent.bind(this)),e.register("getCurrentContext",this.getCurrentContext.bind(this)),e.register("getInfoForIntent",this.handleInfoForIntent.bind(this)),e.register("getInfoForIntentsByContext",this.handleInfoForIntentsByContext.bind(this)),e.register("fireIntentForContext",this.handleFiredIntentForContext.bind(this)),e.register("getContextGroups",this.getContextGroups.bind(this)),e.register("joinContextGroup",this.joinContextGroup.bind(this)),e.register("removeFromContextGroup",this.removeFromContextGroup.bind(this)),e.register("getAllClientsInContextGroup",this.getAllClientsInContextGroup.bind(this)),e.register("getInfoForContextGroup",this.getInfoForContextGroup.bind(this)),e.register("contextHandlerRegistered",this.contextHandlerRegistered.bind(this)),e.register("intentHandlerRegistered",this.intentHandlerRegistered.bind(this)),e.register("removeContextHandler",this.removeContextHandler.bind(this)),e.register("sessionContextGroup:createIfNeeded",this.handleJoinSessionContextGroup.bind(this)),e.register("fdc3Open",this.fdc3HandleOpen.bind(this)),e.register("fdc3v2FindIntentsByContext",this.handleInfoForIntentsByContext.bind(this)),e.register("fdc3FindInstances",this.fdc3HandleFindInstances.bind(this)),e.register("fdc3GetAppMetadata",this.fdc3HandleGetAppMetadata.bind(this)),e.register("fdc3v2GetInfo",(async(e,t)=>this.fdc3HandleGetInfo.bind(this)(e,t))),e.register("createPrivateChannelProvider",(async e=>{const{channelId:t}=e,n=await this.fin.InterApplicationBus.Channel.create(t);p.PrivateChannelProvider.init(n,t)}))}isConnectionAuthorized(e,t){return this.wire.sendAction("interop-broker-is-connection-authorized").catch((e=>{})),Promise.resolve(!0)}isActionAuthorized(e,t,n){return this.wire.sendAction("interop-broker-is-action-authorized").catch((e=>{})),Promise.resolve(!0)}};return Gi.InteropBroker=f,e=new WeakMap,t=new WeakMap,n=new WeakMap,Gi}var zi,Ki={},qi={},Ji=s&&s.__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},Yi=s&&s.__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)};Object.defineProperty(qi,"__esModule",{value:!0});const Zi=d,Qi=Hi;class Xi extends Zi.Base{constructor(e,t,n){super(e),zi.set(this,void 0),this.id=n,Ji(this,zi,t,"f")}async setContext(e){this.wire.sendAction("interop-session-context-group-set-context").catch((e=>{}));return(await Yi(this,zi,"f")).dispatch(`sessionContextGroup:setContext-${this.id}`,{sessionContextGroupId:this.id,context:e})}async getCurrentContext(e){this.wire.sendAction("interop-session-context-group-get-context").catch((e=>{}));return(await Yi(this,zi,"f")).dispatch(`sessionContextGroup:getContext-${this.id}`,{sessionContextGroupId:this.id,type:e})}async addContextHandler(e,t){if(this.wire.sendAction("interop-session-context-group-add-handler").catch((e=>{})),"function"!=typeof e)throw new Error("Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");const n=await Yi(this,zi,"f");let i;return i=t?`sessionContextHandler:invoke-${this.id}-${t}-${(0,Qi.generateId)()}`:`sessionContextHandler:invoke-${this.id}`,n.register(i,(0,Qi.wrapContextHandler)(e,i)),await n.dispatch(`sessionContextGroup:handlerAdded-${this.id}`,{handlerId:i,contextType:t}),{unsubscribe:await this.createUnsubscribeCb(i)}}async createUnsubscribeCb(e){const t=await Yi(this,zi,"f");return async()=>{t.remove(e),await t.dispatch(`sessionContextGroup:handlerRemoved-${this.id}`,{handlerId:e})}}getUserInstance(){return{id:this.id,setContext:(0,Qi.wrapInTryCatch)(this.setContext.bind(this),"Failed to set context: "),getCurrentContext:(0,Qi.wrapInTryCatch)(this.getCurrentContext.bind(this),"Failed to get context: "),addContextHandler:(0,Qi.wrapInTryCatch)(this.addContextHandler.bind(this),"Failed to add context handler: ")}}}qi.default=Xi,zi=new WeakMap;var er={},tr={},nr={},ir={},rr=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),or=s&&s.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),sr=s&&s.__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)&&rr(t,e,n);return or(t,e),t};Object.defineProperty(ir,"__esModule",{value:!0}),ir.PrivateChannelClient=void 0;const ar=sr(Hi);var cr,dr;function hr(){if(cr)return tr;cr=1;var e,t=s&&s.__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)},n=s&&s.__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},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(tr,"__esModule",{value:!0}),tr.FDC3ModuleBase=void 0;const o=nr,a=Hi,c=wr(),d=r(i);return tr.FDC3ModuleBase=class{get client(){return t(this,e,"f").call(this)}get fin(){return this.wire.getFin()}constructor(t,i){this.wire=i,e.set(this,void 0),n(this,e,t,"f")}async broadcast(e){return this.wire.sendAction("fdc3-broadcast").catch((e=>{})),this.client.setContext(e)}async _open(e,t){this.wire.sendAction("fdc3-open").catch((e=>{}));try{return await c.InteropClient.ferryFdc3Call(this.client,"fdc3Open",{app:e,context:t})}catch(e){const t=e.message===a.BROKER_ERRORS.fdc3Open?"ResolverUnavailable":e.message;throw new Error(t)}}async _getChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:"system",...(0,o.getUnsupportedChannelApis)()})))}async getOrCreateChannel(e){this.wire.sendAction("fdc3-get-or-create-channel").catch((e=>{}));const t=(await this._getChannels()).find((t=>t.id===e));if(t)return{...t,type:"system",...(0,o.getUnsupportedChannelApis)()};try{const t=await this.client.joinSessionContextGroup(e);return(0,o.buildAppChannelObject)(t)}catch(e){throw console.error(e.message),new Error(o.ChannelError.CreationFailed)}}async getSystemChannels(){return this.wire.sendAction("fdc3-get-system-channels").catch((e=>{})),this._getChannels()}async joinChannel(e){this.wire.sendAction("fdc3-join-channel").catch((e=>{}));try{return await this.client.joinContextGroup(e)}catch(e){if(e.message===a.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup?console.error("The Channel you have tried to join is an App Channel. Custom Channels can only be defined by the Interop Broker through code or manifest configuration. Please use getOrCreateChannel."):console.error(e.message),e.message.startsWith("Attempting to join a context group that does not exist"))throw new Error(o.ChannelError.NoChannelFound);throw new Error(o.ChannelError.AccessDenied)}}async getCurrentChannel(){this.wire.sendAction("fdc3-get-current-channel").catch((e=>{}));const e=await this.getCurrentContextGroupInfo();return e?this.buildChannelObject(e):null}async leaveCurrentChannel(){return this.wire.sendAction("fdc3-leave-current-channel").catch((e=>{})),this.client.removeFromContextGroup()}async getCurrentContextGroupInfo(){const e=await this.client.getContextGroups(),t=e.map((async e=>this.client.getAllClientsInContextGroup(e.id))),n=(await Promise.all(t)).findIndex((e=>e.some((e=>{const{uuid:t,name:n}=e;return this.wire.me.uuid===t&&this.wire.me.name===n}))));return e[n]}async buildChannelObject(e){return{...e,type:"system",addContextListener:(...[e,t])=>{let n,i;"function"==typeof e?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),n=e):(n=t,"string"==typeof e&&(i=e));const r=(async()=>{let e=!0;const t=await this.client.getCurrentContext(i);return this.client.addContextHandler(((i,r)=>{if(!e||(e=!1,!(0,d.default)(t,i)))return n(i,r)}),i)})();return{...r,unsubscribe:()=>r.then((e=>e.unsubscribe()))}},broadcast:this.broadcast.bind(this),getCurrentContext:async e=>{const t=await this.client.getCurrentContext(e);return void 0===t?null:t}}}},e=new WeakMap,tr}ir.PrivateChannelClient=class{constructor(e,t){this.id=t,this.client=e,this.listeners=new Map}async broadcast(e){return this.client.dispatch("broadcast",{context:e})}async getCurrentContext(e){return this.client.dispatch("getCurrentContext",{contextType:e})}async addContextListener(e,t){if("function"!=typeof t)throw new Error("Non-function argument passed to the second parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");let n;n=e?`contextHandler:invoke-${this.id}-${e}-${ar.generateId()}`:`contextHandler:invoke-${this.id}-${ar.generateId()}`,this.client.register(n,ar.wrapContextHandler(t,n));const i={unsubscribe:await this.createContextUnsubscribeCb(n)};return this.listeners.set(n,i),await this.client.dispatch("contextHandlerAdded",{handlerId:n,contextType:e}),i}createNonStandardUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch("nonStandardHandlerRemoved",{handlerId:e})}}createContextUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch("contextHandlerRemoved",{handlerId:e})}}onAddContextListener(e){const t=`onContextHandlerAdded:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch("onAddContextHandlerAdded",{handlerId:t}),n}onDisconnect(e){const t=`onDisconnect:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch("onDisconnectHandlerAdded",{handlerId:t}),n}onUnsubscribe(e){const t=`onUnsubscribe:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch("onUnsubscribeHandlerAdded",{handlerId:t}),n}async cleanUpAllSubs(){Array.from(this.listeners.keys()).forEach((e=>{this.client.remove(e),this.listeners.delete(e)}))}async disconnect(){try{await this.client.dispatch("clientDisconnecting"),await this.cleanUpAllSubs(),await this.client.disconnect()}catch(e){throw new Error(e.message)}}},function(e){var t=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.getIntentResolution=e.isChannel=e.isContext=e.connectPrivateChannel=e.buildAppChannelObject=e.buildPrivateChannelObject=e.ChannelError=e.ResultError=e.UnsupportedChannelApiError=e.getUnsupportedChannelApis=void 0;const n=Hi,r=ir,o=t(i);e.getUnsupportedChannelApis=e=>({addContextListener:()=>{throw new a("Channel.addContextListener",e)},broadcast:()=>{throw new a("Channel.broadcast",e)},getCurrentContext:()=>{throw new a("Channel.getCurrentContext",e)}});class a extends Error{constructor(e,t="System"){super(e),this.message=`Calling ${e} on an instance of a ${t} Channel returned by fdc3.get${t}Channels is not supported. If you would like to use a ${t} Channel, please use fdc3.joinChannel, fdc3.addContextListener, and fdc3.broadcast instead.`}}var c,d;e.UnsupportedChannelApiError=a,function(e){e.NoResultReturned="NoResultReturned",e.IntentHandlerRejected="IntentHandlerRejected"}(c=e.ResultError||(e.ResultError={})),(d=e.ChannelError||(e.ChannelError={})).NoChannelFound="NoChannelFound",d.AccessDenied="AccessDenied",d.CreationFailed="CreationFailed";e.buildPrivateChannelObject=e=>{let t=!1;const n=()=>{if(t)throw new Error("Private Channel Client has been disconnected from the Private Channel")};return{id:e.id,type:"private",broadcast:async t=>(n(),e.broadcast(t)),getCurrentContext:async t=>(n(),e.getCurrentContext(t)),addContextListener:async(t,i)=>{n();let r=i,o=t;"function"==typeof t&&(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),r=t,o=null);return e.addContextListener(o,r)},onAddContextListener:t=>(n(),e.onAddContextListener(t)),disconnect:async()=>(n(),t=!0,e.disconnect()),onDisconnect:t=>(n(),e.onDisconnect(t)),onUnsubscribe:t=>(n(),e.onUnsubscribe(t))}};e.buildAppChannelObject=e=>({id:e.id,type:"app",broadcast:e.setContext,getCurrentContext:async t=>{const n=await e.getCurrentContext(t);return void 0===n?null:n},addContextListener:(t,n)=>{let i,r;"function"==typeof t?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),i=t):(i=n,"string"==typeof t&&(r=t));const s=(async()=>{let t=!0;const n=await e.getCurrentContext(r);return e.addContextHandler(((e,r)=>{if(!t||(t=!1,!(0,o.default)(n,e)))return i(e,r)}),r)})();return{...s,unsubscribe:()=>s.then((e=>e.unsubscribe()))}}});e.connectPrivateChannel=async t=>{try{const n=await fin.InterApplicationBus.Channel.connect(t),i=new r.PrivateChannelClient(n,t);return(0,e.buildPrivateChannelObject)(i)}catch(e){throw new Error(`Private Channel with id: ${t} doesn't exist`)}};e.isContext=e=>{if(e&&"object"==typeof e&&"type"in e){const{type:t}=e;return"string"==typeof t}return!1};e.isChannel=e=>{if(e&&"object"==typeof e&&"type"in e&&"id"in e){const{type:t,id:n}=e;return"string"==typeof t&&"string"==typeof n&&("app"===t||"private"===t)}return!1};e.getIntentResolution=async(t,i,r,o)=>{const s=(0,n.generateId)(),a=new Promise(((e,t)=>{fin.InterApplicationBus.subscribe({uuid:"*"},s,(t=>{e(t)})).catch((()=>t(new Error("getResult is not supported in this environment"))))})),d=r?{target:r,intentResolutionResultId:s}:{intentResolutionResultId:s},h=o?{name:o,context:i,metadata:d}:{...i,metadata:d},l=async()=>{let n=await a;if(!n||"object"!=typeof n)throw new Error(c.NoResultReturned);const{error:i}=n;if(i)throw new Error(c.IntentHandlerRejected);if((0,e.isChannel)(n)){const{id:i,type:r}=n;switch(r){case"private":n=await(0,e.connectPrivateChannel)(i);break;case"app":{const r=await t.joinSessionContextGroup(i);n=(0,e.buildAppChannelObject)(r);break}}}else if(!(0,e.isContext)(n))throw new Error(c.NoResultReturned);return n},u=o?await t.fireIntent(h):await t.fireIntentForContext(h);return"object"!=typeof u?{source:{appId:"",instanceId:""},intent:"",version:"2.0",getResult:l}:{...u,getResult:l}}}(nr);var lr,ur,pr={};function wr(){if(ur)return Ki;ur=1;var e,t,n=s&&s.__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},i=s&&s.__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)},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ki,"__esModule",{value:!0}),Ki.InteropClient=void 0;const o=d,a=r(qi),c=function(){if(dr)return er;dr=1,Object.defineProperty(er,"__esModule",{value:!0}),er.Fdc3Module=void 0;const e=Hi,t=hr();class n extends t.FDC3ModuleBase{async open(e,t){await super._open(e,t)}addContextListener(e,t){let n;return this.wire.sendAction("fdc3-add-context-listener").catch((e=>{})),"function"==typeof e?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),n=this.client.addContextHandler(e)):n=this.client.addContextHandler(t,null===e?void 0:e),{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}addIntentListener(e,t){this.wire.sendAction("fdc3-add-intent-listener").catch((e=>{}));const n=this.client.registerIntentHandler((e=>{const{context:n,metadata:i}=e,{metadata:r}=n,o=i?.intentResolutionResultId||r?.intentResolutionResultId;o&&this.fin.InterApplicationBus.publish(o,null).catch((()=>null)),t(e.context)}),e,{fdc3Version:"1.2"});return{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}async raiseIntent(t,n,i){this.wire.sendAction("fdc3-raise-intent").catch((e=>{}));const r=i?{name:t,context:n,metadata:{target:i}}:{name:t,context:n};try{return await this.client.fireIntent(r)}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntent?"ResolverUnavailable":t.message;throw new Error(n)}}async findIntent(t,n){this.wire.sendAction("fdc3-find-intent").catch((e=>{}));try{return await this.client.getInfoForIntent({name:t,context:n})}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntent?"ResolverUnavailable":t.message;throw new Error(n)}}async findIntentsByContext(t){this.wire.sendAction("fdc3-find-intents-by-context").catch((e=>{}));try{return await this.client.getInfoForIntentsByContext(t)}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntentsByContext?"ResolverUnavailable":t.message;throw new Error(n)}}async raiseIntentForContext(t,n){this.wire.sendAction("fdc3-raise-intent-for-context").catch((e=>{}));try{return await this.client.fireIntentForContext({...t,metadata:{target:n}})}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntentForContext?"ResolverUnavailable":t.message;throw new Error(n)}}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}getInfo(){return this.wire.sendAction("fdc3-get-info").catch((e=>{})),{providerVersion:this.wire.environment.getAdapterVersionSync(),provider:`openfin-${this.wire.me.uuid}`,fdc3Version:"1.2"}}}return er.Fdc3Module=n,er}(),h=function(){if(lr)return pr;lr=1,Object.defineProperty(pr,"__esModule",{value:!0}),pr.Fdc3Module2=void 0;const e=hr(),t=Hi,n=wr(),i=nr,r=ir;class o extends e.FDC3ModuleBase{async open(e,t){return"string"==typeof e&&console.warn("Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string })."),super._open(e,t)}async findInstances(e){this.wire.sendAction("fdc3-find-instances").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,"fdc3FindInstances",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3FindInstances?"ResolverUnavailable":e.message;throw new Error(n)}}async getAppMetadata(e){this.wire.sendAction("fdc3-get-app-metadata").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,"fdc3GetAppMetadata",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3GetAppMetadata?"ResolverUnavailable":e.message;throw new Error(n)}}async addContextListener(e,t){this.wire.sendAction("fdc3-add-context-listener").catch((e=>{}));const n=e=>t=>{const{contextMetadata:n,...i}=t,r=n?[{...i},n]:[t,null];e(...r)};let i=t,r=n(i);return"function"==typeof e?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),i=e,r=n(i),this.client.addContextHandler(r)):this.client.addContextHandler(r,null===e?void 0:e)}async findIntent(e,n,i){this.wire.sendAction("fdc3-find-intent").catch((e=>{}));try{return await this.client.getInfoForIntent({name:e,context:n,metadata:{resultType:i}})}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntent?"ResolverUnavailable":e.message;throw new Error(n)}}async findIntentsByContext(e,i){this.wire.sendAction("fdc3-find-intents-by-context").catch((e=>{}));const r=i?{context:e,metadata:{resultType:i}}:e;try{return await n.InteropClient.ferryFdc3Call(this.client,"fdc3v2FindIntentsByContext",r)}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntentsByContext?"ResolverUnavailable":e.message;throw new Error(n)}}async raiseIntent(e,n,r){this.wire.sendAction("fdc3-raise-intent").catch((e=>{}));try{return"string"==typeof r&&console.warn("Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string })."),(0,i.getIntentResolution)(this.client,n,r,e)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?"ResolverUnavailable":e.message;throw new Error(n)}}async raiseIntentForContext(e,n){this.wire.sendAction("fdc3-raise-intent-for-context").catch((e=>{}));try{return"string"==typeof n&&console.warn("Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string })."),(0,i.getIntentResolution)(this.client,e,n)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?"ResolverUnavailable":e.message;throw new Error(n)}}async addIntentListener(e,t){if(this.wire.sendAction("fdc3-add-intent-listener").catch((e=>{})),"string"!=typeof e)throw new Error("First argument must be an Intent name");return this.client.registerIntentHandler((async e=>{let n,i;const{context:r,metadata:o}=e,{contextMetadata:s,metadata:a,...c}=r,d=o?.intentResolutionResultId||a?.intentResolutionResultId;try{const e=a?{metadata:a,...c}:{...c};n=await t(e,s),i=n}catch(e){n=e,i={error:!0}}if(d&&this.fin.InterApplicationBus.publish(d,i).catch((()=>null)),n instanceof Error)throw new Error(n.message);return n}),e,{fdc3Version:"2.0"})}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}async createPrivateChannel(){const e=(0,t.generateId)();await n.InteropClient.ferryFdc3Call(this.client,"createPrivateChannelProvider",{channelId:e});const o=await this.fin.InterApplicationBus.Channel.connect(e),s=new r.PrivateChannelClient(o,e);return(0,i.buildPrivateChannelObject)(s)}async getUserChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:"user",...(0,i.getUnsupportedChannelApis)("User")})))}async getSystemChannels(){return console.warn("This API has been deprecated. Please use fdc3.getUserChannels instead."),super.getSystemChannels()}async joinUserChannel(e){return super.joinChannel(e)}async joinChannel(e){return console.warn("This API has been deprecated. Please use fdc3.joinUserChannel instead."),super.joinChannel(e)}async getCurrentChannel(){const e=await super.getCurrentChannel();return e?{...e,type:"user",broadcast:this.broadcast.bind(this)}:null}async getInfo(){return n.InteropClient.ferryFdc3Call(this.client,"fdc3v2GetInfo",{fdc3Version:"2.0"})}}return pr.Fdc3Module2=o,pr}(),l=Hi;let u=class extends o.Base{constructor(i,r){super(i),e.set(this,void 0),t.set(this,void 0),n(this,t,new Map,"f"),n(this,e,r,"f")}async setContext(t){this.wire.sendAction("interop-client-set-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("setContext",{context:t})}async addContextHandler(t,n){if(this.wire.sendAction("interop-client-add-context-handler").catch((e=>{})),"function"!=typeof t)throw new Error("Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");const r=await i(this,e,"f");let o;o=n?`invokeContextHandler-${n}-${(0,l.generateId)()}`:"invokeContextHandler";const s=(0,l.wrapContextHandler)(t,o);return r.register(o,s),await r.dispatch("contextHandlerRegistered",{handlerId:o,contextType:n}),{unsubscribe:async()=>{r.remove(o),await r.dispatch("removeContextHandler",{handlerId:o})}}}async getContextGroups(){this.wire.sendAction("interop-client-get-context-groups").catch((e=>{}));return(await i(this,e,"f")).dispatch("getContextGroups")}async joinContextGroup(t,n){this.wire.sendAction("interop-client-join-context-group").catch((e=>{}));const r=await i(this,e,"f");if(!t)throw new Error("No contextGroupId specified for joinContextGroup.");return r.dispatch("joinContextGroup",{contextGroupId:t,target:n})}async removeFromContextGroup(t){this.wire.sendAction("interop-client-remove-from-context-group").catch((e=>{}));return(await i(this,e,"f")).dispatch("removeFromContextGroup",{target:t})}async getAllClientsInContextGroup(t){this.wire.sendAction("interop-client-get-all-clients-in-context-group").catch((e=>{}));const n=await i(this,e,"f");if(!t)throw new Error("No contextGroupId specified for getAllClientsInContextGroup.");return n.dispatch("getAllClientsInContextGroup",{contextGroupId:t})}async getInfoForContextGroup(t){this.wire.sendAction("interop-client-get-info-for-context-group").catch((e=>{}));const n=await i(this,e,"f");if(!t)throw new Error("No contextGroupId specified for getInfoForContextGroup.");return n.dispatch("getInfoForContextGroup",{contextGroupId:t})}async fireIntent(t){this.wire.sendAction("interop-client-fire-intent").catch((e=>{}));return(await i(this,e,"f")).dispatch("fireIntent",t)}async registerIntentHandler(t,n,r){this.wire.sendAction("interop-client-register-intent-handler").catch((e=>{}));const o=await i(this,e,"f"),s=`intent-handler-${n}`,a=(0,l.wrapIntentHandler)(t,s);try{await o.register(s,a),await o.dispatch("intentHandlerRegistered",{handlerId:s,...r})}catch(e){throw new Error("Unable to register intent handler")}return{unsubscribe:async()=>{o.remove(s)}}}async getCurrentContext(t){this.wire.sendAction("interop-client-get-current-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("getCurrentContext",{contextType:t})}async getInfoForIntent(t){this.wire.sendAction("interop-client-get-info-for-intent").catch((e=>{}));return(await i(this,e,"f")).dispatch("getInfoForIntent",t)}async getInfoForIntentsByContext(t){this.wire.sendAction("interop-client-get-info-for-intents-by-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("getInfoForIntentsByContext",t)}async fireIntentForContext(t){this.wire.sendAction("interop-client-fire-intent-for-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("fireIntentForContext",t)}async joinSessionContextGroup(n){try{const r=i(this,t,"f").get(n);if(r)return r.getUserInstance();const o=await i(this,e,"f"),{hasConflict:s}=await o.dispatch("sessionContextGroup:createIfNeeded",{sessionContextGroupId:n});s&&console.warn(`A (non-session) context group with the name "${n}" already exists. If you are trying to join a Context Group, call joinContextGroup instead.`);const c=new a.default(this.wire,i(this,e,"f"),n);return i(this,t,"f").set(n,c),c.getUserInstance()}catch(e){throw console.error(`Error thrown trying to create Session Context Group with id "${n}": ${e}`),e}}async onDisconnection(t){this.wire.sendAction("interop-client-add-ondisconnection-listener").catch((e=>{}));return(await i(this,e,"f")).onDisconnection((e=>{const{uuid:n}=e;t({type:"interop-broker",topic:"disconnected",brokerName:n})}))}getFDC3Sync(e){switch(e){case"1.2":return new c.Fdc3Module((()=>this),this.wire);case"2.0":return new h.Fdc3Module2((()=>this),this.wire);default:throw new Error(`Invalid FDC3 version provided: ${e}. Must be '1.2' or '2.0'`)}}async getFDC3(e){return this.getFDC3Sync(e)}static async ferryFdc3Call(t,n,r){return(await i(t,e,"f")).dispatch(n,r||null)}};return Ki.InteropClient=u,e=new WeakMap,t=new WeakMap,Ki}var yr,fr,gr,mr={};function vr(){if(yr)return mr;yr=1,Object.defineProperty(mr,"__esModule",{value:!0}),mr.overrideCheck=mr.checkFDC32Overrides=mr.getDefaultViewFdc3VersionFromAppInfo=void 0;const e=Vi();function t(t){return["fdc3HandleFindInstances","handleInfoForIntent","handleInfoForIntentsByContext","fdc3HandleGetAppMetadata","fdc3HandleGetInfo","fdc3HandleOpen","handleFiredIntent","handleFiredIntentForContext"].filter((n=>t[n]===e.InteropBroker.prototype[n]))}return mr.getDefaultViewFdc3VersionFromAppInfo=function({manifest:e,initialOptions:t}){const n=e?.platform?.defaultViewOptions?.fdc3InteropApi??t.defaultViewOptions?.fdc3InteropApi;return["1.2","2.0"].includes(n??"")?n:void 0},mr.checkFDC32Overrides=t,mr.overrideCheck=function(e,n){if(n&&"2.0"===n){const n=t(e);n.length>0&&console.warn(`WARNING: FDC3 2.0 has been set as a default option for Views in this Platform, but the required InteropBroker APIs for FDC3 2.0 compliance have not all been overridden.\nThe following APIs need to be overridden:\n${n.join("\n")}`)}},mr}function Cr(){return gr||(gr=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),i=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),i(function(){if(fr)return Ti;fr=1;var e=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ti,"__esModule",{value:!0}),Ti.InteropModule=void 0;const t=e(n),i=$i,r=d,o=Vi(),a=wr(),c=vr(),h=Tn,l=e=>new e,u="You have attempted to use or modify InteropBroker parameters, which is not allowed. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.";class p extends r.Base{async init(e,n=l){this.wire.sendAction("interop-init").catch((()=>{}));const r=await this.wire.environment.getInteropInfo(this.wire.getFin()),s=(0,i.createUnusableObject)(u),a=(0,i.createWarningObject)(u,(0,t.default)(r)),d=async()=>{throw new Error(u)},p=o.InteropBroker.createClosedConstructor(this.wire,(()=>this.fin.InterApplicationBus.Channel.create(`interop-broker-${e}`)),r);let w;return w=Array.isArray(n)?new((0,h.overrideFromComposables)(...n)(p))(s,d,a):await n(p,s,d,a),(0,c.overrideCheck)(w,r.fdc3Version),w}connectSync(e,t){return this.wire.sendAction("interop-connect-sync").catch((()=>{})),new a.InteropClient(this.wire,this.wire.environment.whenReady().then((()=>this.fin.InterApplicationBus.Channel.connect(`interop-broker-${e}`,{payload:t}))))}}return Ti.InteropModule=p,Ti}(),e),i(wr(),e),i(Vi(),e)}(Li)),Li}var br={},Ir={},Er={},xr={};Object.defineProperty(xr,"__esModule",{value:!0}),xr.getSnapshotSourceChannelName=void 0;xr.getSnapshotSourceChannelName=e=>`snapshot-source-provider-${e.uuid}`;var Ar,Pr,Mr,_r,Or,Sr=s&&s.__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},Rr=s&&s.__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)};Object.defineProperty(Er,"__esModule",{value:!0}),Er.SnapshotSource=void 0;const Fr=d,jr=xr,kr=new Map;class Lr extends Fr.Base{constructor(e,t){super(e),Ar.set(this,void 0),Pr.set(this,(()=>(kr.has(this.identity.uuid)||kr.set(this.identity.uuid,{eventFired:null,clientPromise:null}),kr.get(this.identity.uuid)))),Mr.set(this,(()=>(Rr(this,Pr,"f").call(this).clientPromise||(Rr(this,Pr,"f").call(this).clientPromise=Rr(this,_r,"f").call(this)),Rr(this,Pr,"f").call(this).clientPromise))),_r.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);try{Rr(this,Pr,"f").call(this).eventFired||await Rr(this,Or,"f").call(this);const t=await this.fin.InterApplicationBus.Channel.connect(e,{wait:!1});return t.onDisconnection((()=>{Rr(this,Pr,"f").call(this).clientPromise=null,Rr(this,Pr,"f").call(this).eventFired=null})),t}catch(e){throw Rr(this,Pr,"f").call(this).clientPromise=null,new Error("The targeted SnapshotSource is not currently initialized. Await this object's ready() method.")}})),Or.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);let t,n;const i=new Promise(((e,i)=>{t=e,n=i}));Rr(this,Pr,"f").call(this).eventFired=i;const r=async i=>{try{i.channelName===e&&(t(),await this.fin.InterApplicationBus.Channel.removeListener("connected",r))}catch(e){n(e)}};await this.fin.InterApplicationBus.Channel.on("connected",r)})),Sr(this,Ar,t,"f")}get identity(){return Rr(this,Ar,"f")}async ready(){this.wire.sendAction("snapshot-source-ready").catch((e=>{}));try{await Rr(this,Mr,"f").call(this)}catch(e){await Rr(this,Pr,"f").call(this).eventFired}}async getSnapshot(){this.wire.sendAction("snapshot-source-get-snapshot").catch((e=>{}));const e=await Rr(this,Mr,"f").call(this),t=await e.dispatch("get-snapshot");return(await t).snapshot}async applySnapshot(e){this.wire.sendAction("snapshot-source-apply-snapshot").catch((e=>{}));return(await Rr(this,Mr,"f").call(this)).dispatch("apply-snapshot",{snapshot:e})}}Er.SnapshotSource=Lr,Ar=new WeakMap,Pr=new WeakMap,Mr=new WeakMap,_r=new WeakMap,Or=new WeakMap,Object.defineProperty(Ir,"__esModule",{value:!0}),Ir.SnapshotSourceModule=void 0;const Tr=d,$r=Er,Br=xr;class Gr extends Tr.Base{async init(e){if(this.wire.sendAction("snapshot-source-init").catch((e=>{})),"object"!=typeof e||"function"!=typeof e.getSnapshot||"function"!=typeof e.applySnapshot)throw new Error("you must pass in a valid SnapshotProvider");const t=await this.fin.InterApplicationBus.Channel.create((0,Br.getSnapshotSourceChannelName)(this.fin.me));t.register("get-snapshot",(async()=>({snapshot:await e.getSnapshot()}))),t.register("apply-snapshot",(({snapshot:t})=>e.applySnapshot(t)))}wrapSync(e){return this.wire.sendAction("snapshot-source-wrap-sync").catch((e=>{})),new $r.SnapshotSource(this.wire,e)}async wrap(e){return this.wire.sendAction("snapshot-source-wrap").catch((e=>{})),this.wrapSync(e)}}Ir.SnapshotSourceModule=Gr,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Ir,e),n(Er,e)}(br),Object.defineProperty(a,"__esModule",{value:!0});var Wr=a.Fin=void 0;const Hr=t,Nr=c,Dr=ie(),Ur=Z(),Vr=de,zr=en,Kr=rn,qr=un,Jr=bn,Yr=J(),Zr=An,Qr=ki,Xr=Cr(),eo=br;class to extends Hr.EventEmitter{constructor(e){super(),this.wire=e,this.System=new Nr.System(e),this.Window=new Dr._WindowModule(e),this.Application=new Ur.ApplicationModule(e),this.InterApplicationBus=new Vr.InterApplicationBus(e),this.Clipboard=new zr.Clipboard(e),this.ExternalApplication=new Kr.ExternalApplicationModule(e),this.Frame=new qr._FrameModule(e),this.GlobalHotkey=new Jr.GlobalHotkey(e),this.Platform=new Zr.PlatformModule(e,this.InterApplicationBus.Channel),this.View=new Yr.ViewModule(e),this.Interop=new Xr.InteropModule(e),this.SnapshotSource=new eo.SnapshotSourceModule(e),e.registerFin(this),this.me=(0,Qr.getMe)(e),e.on("disconnected",(()=>{this.emit("disconnected")}))}}Wr=a.Fin=to;var no={},io={};function ro(e){return"string"==typeof e.manifestUrl}function oo(e){return ao(e)&&"string"==typeof e.address}function so(e){return oo(e)&&"string"==typeof e.token}function ao(e){return"string"==typeof e.uuid}function co(e){return e.runtime&&"string"==typeof e.runtime.version}function ho(e){return ao(e)&&co(e)}Object.defineProperty(io,"__esModule",{value:!0}),io.isInternalConnectConfig=io.isPortDiscoveryConfig=io.isNewConnectConfig=io.isConfigWithReceiver=io.isRemoteConfig=io.isExistingConnectConfig=io.isExternalConfig=void 0,io.isExternalConfig=ro,io.isExistingConnectConfig=oo,io.isRemoteConfig=so,io.isConfigWithReceiver=function(e){return"object"==typeof e.receiver&&so({...e,address:""})},io.isNewConnectConfig=ho,io.isPortDiscoveryConfig=function(e){return ro(e)&&co(e)||ho(e)},io.isInternalConnectConfig=function(e){return oo(e)||ho(e)};var lo={},uo={};Object.defineProperty(uo,"__esModule",{value:!0}),uo.EmitterMap=void 0;const po=t;function wo(e){return Buffer.from(e).toString("base64")}uo.EmitterMap=class{constructor(){this.storage=new Map}hashKeys(e){return e.map(wo).join("/")}getOrCreate(e){const t=this.hashKeys(e);return this.storage.has(t)||this.storage.set(t,new po.EventEmitter),this.storage.get(t)}has(e){return this.storage.has(this.hashKeys(e))}delete(e){const t=this.hashKeys(e);return this.storage.delete(t)}},Object.defineProperty(lo,"__esModule",{value:!0});const yo=uo;class fo extends yo.EmitterMap{constructor(){super(...arguments),this.dispatchEvent=e=>{if(function(e){return"process-desktop-event"===e.action}(e)){const{payload:t}=e,n=function(e){const{topic:t}=e;if("frame"===t||"window"===t||"view"===t){const{uuid:n,name:i}=e;return[t,n,i]}if("application"===t){const{uuid:n}=e;return[t,n]}return[t]}(t);if(this.has(n))return this.getOrCreate(n).emit(t.type,t),!0}return!1}}}lo.default=fo;var go,mo,vo=s&&s.__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},Co=s&&s.__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)},bo=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(no,"__esModule",{value:!0});var Io=no.Transport=void 0;const Eo=t,xo=io,Ao=g,Po=bo(lo),Mo=ki,_o=ke;class Oo extends Eo.EventEmitter{constructor(e,t,n){super(),this.wireListeners=new Map,this.topicRefMap=new Map,this.eventAggregator=new Po.default,this.messageHandlers=[this.eventAggregator.dispatchEvent],go.set(this,void 0),mo.set(this,void 0),this.connectSync=()=>{Co(this,go,"f").connectSync()},this.getPort=()=>Co(this,go,"f").getPort(),vo(this,go,new e(this.onmessage.bind(this)),"f"),this.environment=t,this.sendRaw=Co(this,go,"f").send.bind(Co(this,go,"f")),this.registerMessageHandler(this.handleMessage.bind(this)),Co(this,go,"f").on("disconnected",(()=>{for(const[,{handleNack:e}]of this.wireListeners)e({reason:"Remote connection has closed"});this.wireListeners.clear(),this.emit("disconnected")}));const{uuid:i,name:r}=n,o=this.environment.getCurrentEntityType();this.me=(0,Mo.getBaseMe)(o,i,r)}getFin(){if(!Co(this,mo,"f"))throw new Error("No Fin object registered for this transport");return Co(this,mo,"f")}registerFin(e){if(Co(this,mo,"f"))throw new Error("Fin object has already been registered for this transport");vo(this,mo,e,"f")}shutdown(){return Co(this,go,"f").shutdown()}async connect(e){if((0,xo.isConfigWithReceiver)(e))return await Co(this,go,"f").connect(e.receiver),this.authorize(e);if((0,xo.isRemoteConfig)(e))return this.connectRemote(e);if((0,xo.isExistingConnectConfig)(e))return this.connectByPort(e);if((0,xo.isNewConnectConfig)(e)){const t=await this.environment.retrievePort(e);return this.connectByPort({...e,address:`ws://localhost:${t}`})}}async connectRemote(e){return await Co(this,go,"f").connect(new(this.environment.getWsConstructor())(e.address)),this.authorize(e)}async connectByPort(e){const{address:t,uuid:n}=e,i={...e,type:"file-token"},r=Co(this,go,"f");await r.connect(new(this.environment.getWsConstructor())(e.address));const o=await this.sendAction("request-external-authorization",{uuid:n,type:"file-token"},!0);if("external-authorization-response"!==o.action)throw new Ao.UnexpectedActionError(o.action);return await this.environment.writeToken(o.payload.file,o.payload.token),this.authorize(i)}async authorize(e){const t=await this.sendAction("request-authorization",e,!0);if("authorization-response"!==t.action)throw new Ao.UnexpectedActionError(t.action);if(!0!==t.payload.success)throw new Ao.RuntimeError(t.payload)}sendAction(e,t={},n=!1){let i=()=>{};const r=Ao.RuntimeError.getCallSite(1),o=this.environment.getNextMessageId(),s=new Promise(((s,a)=>{i=a;const c={action:e,payload:t,messageId:o},d=Co(this,go,"f");return this.addWireListener(o,s,(e=>this.nackHandler(e,a,r)),n),d.send(c).catch(a)}));return Object.assign(s,{cancel:i,messageId:o})}nackHandler(e,t,n){t("string"==typeof e?e:new Ao.RuntimeError(e,n))}ferryAction(e){return new Promise(((t,n)=>{const i=this.environment.getNextMessageId();e.messageId=i;const r=e=>{t(e.payload)};return Co(this,go,"f").send(e).then((()=>this.addWireListener(i,r,(e=>this.nackHandler(e,n)),!1))).catch(n)}))}registerMessageHandler(e){this.messageHandlers.push(e)}addWireListener(e,t,n,i){i?this.uncorrelatedListener=t:this.wireListeners.has(e)?n({reason:"Duplicate handler id",error:(0,_o.errorToPOJO)(new Ao.DuplicateCorrelationError(String(e)))}):this.wireListeners.set(e,{resolve:t,handleNack:n})}onmessage(e){for(const t of this.messageHandlers)t.call(null,e)}handleMessage(e){const t=e.correlationId||NaN;if("correlationId"in e){if(!this.wireListeners.has(t))return!1;{const{resolve:n,handleNack:i}=this.wireListeners.get(t);"ack"!==e.action?i({reason:"Did not receive ack action",error:(0,_o.errorToPOJO)(new Ao.NoAckError(e.action))}):"payload"in e?e.payload.success?n.call(null,e):i(e.payload):"string"==typeof e.reason?i(e):(console.warn("Received invalid response from core",e),i({reason:"invalid response shape"})),this.wireListeners.delete(t)}}else this.uncorrelatedListener&&this.uncorrelatedListener.call(null,e),this.uncorrelatedListener=()=>{};return!0}}Io=no.Transport=Oo,go=new WeakMap,mo=new WeakMap;const So=(...e)=>({log:(...t)=>console.debug(`[${(new Date).toISOString()}]`,...(e=>e.map((e=>`[${e}]`)))(e),...t),getLogger:(...t)=>So(...e,...t)}),Ro=So("@openfin/core-web/client");function Fo(e,t){if(!function(e){return"string"==typeof e}(e))throw new Error(`Property ${t} has invalid type. Expected string, got ${typeof e}.`)}const jo="web-broker-ports-ready",ko=Ro.getLogger("get-web-interop-ports");function Lo(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)}function To(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}"function"==typeof SuppressedError&&SuppressedError;const $o=e=>{var n,i,r;return r=class extends t.EventEmitter{constructor(t){super(),n.set(this,void 0),i.set(this,!1),this.connectSync=()=>{Lo(this,i,"f")||(e.addEventListener("message",(e=>{e.data?.topic?.startsWith("wire-message")&&e.data.message&&Lo(this,n,"f").call(this,{...JSON.parse(e.data.message),ports:e.ports})})),e.start())},this.connect=async()=>{this.connectSync()},this.send=t=>(e.postMessage({topic:"wire-message",message:JSON.stringify(t)}),Promise.resolve()),this.shutdown=async()=>{e.close()},To(this,n,t,"f")}getPort(){return e}},n=new WeakMap,i=new WeakMap,r};var Bo={},Go={};Object.defineProperty(Go,"__esModule",{value:!0}),Go.BaseEnvironment=void 0;const Wo=vr();Go.BaseEnvironment=class{async getViewWindowIdentity(e,t){const{identity:n}=await e.View.wrapSync(t).getCurrentWindow();return n}async getInteropInfo(e){const t=await e.Application.getCurrentSync().getInfo().catch((()=>null)),n=t?.initialOptions?.interopBrokerConfiguration??{};return{fdc3Version:t?(0,Wo.getDefaultViewFdc3VersionFromAppInfo)(t):void 0,...n,fdc3Info:{providerVersion:await e.System.getVersion(),provider:"OpenFin"}}}},Object.defineProperty(Bo,"__esModule",{value:!0});var Ho=Bo.BrowserEnvironment=void 0;const No=Go;class Do extends No.BaseEnvironment{constructor(){super(...arguments),this.type="other",this.getRandomId=()=>{const e=new Uint32Array(1);return window.crypto.getRandomValues(e)[0].toString(32)}}getAdapterVersionSync(){return""}observeBounds(e,t){throw new Error("Method not implemented.")}layoutAllowedInContext(e){return!1}initLayoutManager(e,t,n){throw new Error("Method not implemented.")}applyLayoutSnapshot(e,t,n){throw new Error("Method not implemented.")}createLayout(e,t){throw new Error("Method not implemented.")}destroyLayout(e,t){throw new Error("Method not implemented.")}resolveLayout(e,t){throw new Error("Method not implemented.")}initPlatform(...e){throw new Error("Method not implemented.")}writeToken(e,t){return Promise.resolve("")}retrievePort(e){throw new Error("Method not implemented.")}getNextMessageId(){return this.getRandomId()}createChildContent(e){throw new Error("Method not implemented.")}getWebWindow(e){throw new Error("Method not implemented.")}getCurrentEntityIdentity(){throw new Error("Method not implemented.")}getCurrentEntityType(){return"external connection"}raiseEvent(e,t){throw new Error("Method not implemented.")}getUrl(){return location.href}getDefaultChannelOptions(){return{create:{},connect:{}}}getRtcPeer(){return new RTCPeerConnection}getWsConstructor(){return WebSocket}whenReady(){return Promise.resolve()}}Ho=Bo.BrowserEnvironment=Do;const Uo=e=>"platform"in e&&void 0!==e.platform;var Vo,zo;class Ko extends Ho{constructor(e){super(),this.connectConfig=e,Vo.set(this,void 0),zo.set(this,new W((async()=>Promise.resolve().then((function(){return __webpack_require__(/*! ./main-b14f67c9.js */ "./node_modules/@openfin/core-web/out/main-b14f67c9.js")}))))),Uo(e)&&this.validatePlatformOptions(e)}getAdapterVersionSync(){return"0.39.21"}validatePlatformOptions({platform:e}){if(!("layoutSnapshot"in e))throw new Error("Platform options are missing layoutSnapshot. Please provide a layoutSnapshot in the platform options.");if("windows"in e||"windows"in e.layoutSnapshot)throw new Error("It appears you tried to call connect() with a snapshot object from an OpenFin desktop environment. Note that connect() expects to be called with a platform property with this structure: { platform: { layoutSnapshot } }. To get a layoutSnapshot of the expected structure, use fin.Platform.Layout.getCurrentLayoutManagerSync().getLayoutSnapshot() in v34+ in your desktop environment.");const{layouts:t}=e.layoutSnapshot;Object.entries(t).map((([e,t])=>{if("object"!=typeof t||null===t)throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must be an object.`);if(!("content"in t))throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must contain a 'content' property.`)}))}async getInteropInfo(e){return{...{contextGroups:void 0,logging:{beforeAction:{enabled:!1},afterAction:{enabled:!1}}},fdc3Version:void 0,fdc3Info:{providerVersion:"0.39.21",provider:"OpenFin Web"}}}layoutAllowedInContext(e){return!0}async initLayoutManager(e,t,n){if(Lo(this,Vo,"f"))throw new Error("Layout already initialized.");if(!Uo(this.connectConfig))throw new Error("Platform options are missing from connection config.");const{WebLayoutEntryPoint:i}=await Lo(this,zo,"f").getValue();return To(this,Vo,new i(this.connectConfig),"f"),await Lo(this,Vo,"f").initLayoutManager(e,t,n)}async applyLayoutSnapshot(e,t,n){Lo(this,Vo,"f")?.applyLayoutSnapshot(e,t,n)}async createLayout(e,t){return Lo(this,Vo,"f")?.createLayout(e,t)}async destroyLayout(e,t){return Lo(this,Vo,"f")?.destroyLayout(e,t)}async getViewWindowIdentity(e,t){return Promise.resolve({uuid:t.uuid,name:t.uuid})}}Vo=new WeakMap,zo=new WeakMap;const qo=()=>{const e=((e,t)=>{const n=new RegExp(`^${t}<(?.*)>$`).exec(e)?.groups?.meta;if(n)try{return JSON.parse(atob(n))}catch(e){throw new Error(`Failed to decode JSON from ${n}.`)}})(window.name,"of-frame");if(e)try{const{name:t,uuid:n,brokerUrl:i,providerId:r,contextGroup:o}=e;return Fo(i,"brokerUrl"),Fo(n,"uuid"),Fo(t,"name"),{identity:{name:t,uuid:n},brokerUrl:i,interopConfig:{providerId:r,currentContextGroup:o}}}catch(e){throw new Error(`Unexpected error occurred when inferring platform information: ${e.stack}`)}},Jo=()=>{const e=r.v4();return{uuid:e,name:e}},Yo=async e=>{if("enabled"===e.connectionInheritance){const t=await(async e=>{const t=qo();if(t){const{validateOptions:n=(()=>!0)}=e,{identity:i,...r}=t;if(!await n(r))throw new Error("Parent options were rejected by validateOptions.");return t}})(e);if(t)return t}if(!e.options){const t="enabled"===e.connectionInheritance?"Broker URL was not specified nor provided by a platform container.":"Connection inheritance is disabled but no options were provided.";throw new Error(t)}return{...e.options,identity:Jo()}};exports.__classPrivateFieldGet=Lo,exports.__classPrivateFieldSet=To,exports.apiExposer=Gn,exports.commonjsGlobal=s,exports.connect=async t=>{try{Ro.log("Establishing connection",t);const{brokerUrl:n,identity:i,timeout:r,interopConfig:s}=await Yo(t),{workerPort:a,iframeBrokerPort:c}=await(async(e,t,n)=>{const{origin:i}=new URL(e),r=document.createElement("IFRAME");let s;r.style.display="none";try{return await new Promise(((a,c)=>{const d=e=>{if(e.source===r.contentWindow&&e.data?.topic===`ack-${jo}`){if(e.origin!==i)c(new Error(`Broker redirected to unexpected origin ${e.origin}, expected ${i}.`));else if(e.data.success){const[t,n]=e.ports;a({iframeBrokerPort:t,workerPort:n})}else c(new m(e.data));window.removeEventListener("message",d),clearTimeout(s)}};window.addEventListener("message",d),ko.log(`Connecting to broker ${e}`),r.setAttribute("src",e),r.setAttribute("name",o(t,"of-broker")),document.body.appendChild(r),ko.log("Iframe loaded, awaiting init message from iframe"),n&&(s=setTimeout((()=>{window.removeEventListener("message",d),document.body.removeChild(r),c(new Error("Worker did not initialize in time"))}),n))}))}catch(e){throw new Error(`Failed to initialise Fin Web Client. ${e.message}`,{cause:e})}})(n,i,r);Ro.log("Successfully established connection to shared worker");const d={entityType:"external connection",...i};a.start(),c.start();const h=((t,n,i)=>{const r=$o(n),o=new Ko(t),s=new Io(r,o,i);return s.connectSync(),window.Buffer=e.Buffer,new Wr(s)})(t,a,d);return s?.providerId&&(h.me.interop=h.Interop.connectSync(s.providerId),s?.currentContextGroup&&h.me.interop.joinContextGroup(s.currentContextGroup).catch((e=>{console.warn(`Error joining specified context group: ${s?.currentContextGroup}, continuing`,e)}))),{...h,me:{...h.me,identity:{uuid:h.me.uuid,name:h.me.name}}}}catch(e){throw new Error(`An error occured during web-interop connection: ${e.message}`)}},exports.decorators=Nn,exports.encodeOptions=o,exports.layout_constants=ai,exports.lazy=G; +var e=__webpack_require__(/*! buffer/ */ "../../node_modules/buffer/index.js"),t=__webpack_require__(/*! events */ "../../node_modules/events/events.js"),n=__webpack_require__(/*! lodash/cloneDeep */ "../../node_modules/lodash/cloneDeep.js"),i=__webpack_require__(/*! lodash/isEqual */ "../../node_modules/lodash/isEqual.js"),r=__webpack_require__(/*! uuid */ "../../node_modules/uuid/dist/esm-browser/index.js");const o=(e,t)=>`${t}<${btoa(JSON.stringify(e))}>`;var s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof __webpack_require__.g?__webpack_require__.g:"undefined"!=typeof self?self:{},a={},c={},d={},h={};async function l(e){const t=[];for(const n of e){const e=await n();t.push(e)}return t}Object.defineProperty(h,"__esModule",{value:!0}),h.promiseMapSerial=h.serial=h.promiseMap=h.promisify=void 0,h.promisify=function(e){return(...t)=>new Promise(((n,i)=>{e(...t,((e,t)=>e?i(e):n(t)))}))},h.promiseMap=async function(e,t){return Promise.all(e.map(t))},h.serial=l,h.promiseMapSerial=async function(e,t){return l(e.map(((e,n,i)=>()=>t(e,n,i))))};var u,p=s&&s.__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},w=s&&s.__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)};Object.defineProperty(d,"__esModule",{value:!0}),d.Reply=d.EmitterBase=d.Base=void 0;const y=h;class f{constructor(e){this.isNodeEnvironment=()=>"node"===this.wire.environment.type,this.isOpenFinEnvironment=()=>"openfin"===this.wire.environment.type,this.isBrowserEnvironment=()=>"other"===this.wire.environment.type,this.wire=e}get fin(){return this.wire.getFin()}get me(){return this.wire.me}}d.Base=f;d.EmitterBase=class extends f{constructor(e,t,...n){super(e),this.topic=t,u.set(this,void 0),this.eventNames=()=>this.hasEmitter()?this.getOrCreateEmitter().eventNames():[],this.emit=(e,t,...n)=>!!this.hasEmitter()&&this.getOrCreateEmitter().emit(e,t,...n),this.hasEmitter=()=>this.wire.eventAggregator.has(w(this,u,"f")),this.getOrCreateEmitter=()=>this.wire.eventAggregator.getOrCreate(w(this,u,"f")),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[],this.listenerCount=e=>this.hasEmitter()?this.getOrCreateEmitter().listenerCount(e):0,this.registerEventListener=async(e,t={},n,i)=>{const r={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e},o=this.getOrCreateEmitter();n(o);try{await this.wire.sendAction("subscribe-to-desktop-event",r)}catch(e){throw i(o),this.deleteEmitterIfNothingRegistered(o),e}},this.deregisterEventListener=async(e,t={})=>{if(this.hasEmitter()){const n={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e};await this.wire.sendAction("unsubscribe-to-desktop-event",n).catch((()=>null));return this.getOrCreateEmitter()}return Promise.resolve()},p(this,u,[t,...n],"f"),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[]}async on(e,t,n){return await this.registerEventListener(e,n,(n=>{n.on(e,t)}),(n=>{n.removeListener(e,t)})),this}async addListener(e,t,n){return this.on(e,t,n)}async once(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.once(e,i),n.once(e,t)}),(n=>{n.removeListener(e,i),n.removeListener(e,t)})),this}async prependListener(e,t,n){return await this.registerEventListener(e,n,(n=>{n.prependListener(e,t)}),(n=>{n.removeListener(e,t)})),this}async prependOnceListener(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.prependOnceListener(e,t),n.once(e,i)}),(n=>{n.removeListener(e,t),n.removeListener(e,i)})),this}async removeListener(e,t,n){const i=await this.deregisterEventListener(e,n);return i&&(i.removeListener(e,t),this.deleteEmitterIfNothingRegistered(i)),this}async deregisterAllListeners(e){const t={...this.identity,type:e,topic:this.topic};if(this.hasEmitter()){const e=this.getOrCreateEmitter(),n=e.listenerCount(t.type),i=[];for(let e=0;enull)));return await Promise.all(i),e}}async removeAllListeners(e){const t=async e=>{const t=await this.deregisterAllListeners(e);t&&(t.removeAllListeners(e),this.deleteEmitterIfNothingRegistered(t))};if(e)await t(e);else if(this.hasEmitter()){const e=this.getOrCreateEmitter().eventNames();await(0,y.promiseMap)(e,t)}return this}deleteEmitterIfNothingRegistered(e){0===e.eventNames().length&&this.wire.eventAggregator.delete(w(this,u,"f"))}},u=new WeakMap;d.Reply=class{};var g={};Object.defineProperty(g,"__esModule",{value:!0});var m=g.RuntimeError=g.NotSupportedError=g.NotImplementedError=g.NoAckError=g.DuplicateCorrelationError=g.UnexpectedActionError=g.DisconnectedError=void 0;class v extends Error{constructor(e){super(`Expected websocket state OPEN but found ${e}`),this.readyState=e}}g.DisconnectedError=v;class C extends Error{}g.UnexpectedActionError=C;class b extends Error{}g.DuplicateCorrelationError=b;class I extends Error{}g.NoAckError=I;class E extends Error{}g.NotImplementedError=E;class x extends Error{}g.NotSupportedError=x;class A extends Error{constructor(e){const{message:t,name:n,stack:i,...r}=e;super(t),this.name=n||"Error",this.stack=i??this.toString(),Object.keys(r).forEach((e=>{this[e]=r[e]}))}}class P extends Error{static getCallSite(e=0){const t=Error.stackTraceLimit,n=e+1;Error.stackTraceLimit=t+n;const i=Error.prepareStackTrace;Error.prepareStackTrace=(e,t)=>t;const r=(new Error).stack?.slice(n)??[];return Error.prepareStackTrace=i,Error.stackTraceLimit=t,r}static prepareStackTrace(e,t){if("function"==typeof Error.prepareStackTrace)return Error.prepareStackTrace(e,t);let n="";n+=e.name||"Error",n+=`: ${e.message||""}`;for(const e of t)n+=`\n at ${e.toString()}`;return n}constructor(e,t){const{reason:n,error:i}=e;super(n),this.name="RuntimeError",i?.stack&&(this.cause=new A(i)),t&&(this.stack=P.prepareStackTrace(this,t))}}m=g.RuntimeError=P;var M={},_={},O={};Object.defineProperty(O,"__esModule",{value:!0}),O.validateIdentity=void 0,O.validateIdentity=function(e){let t;return"object"==typeof e&&"string"==typeof e.uuid||(t="Not a valid identity object"),t};var S={},R={},F={},j={},k={},L={},T={};Object.defineProperty(T,"__esModule",{value:!0}),T.handleDeprecatedWarnings=void 0;var $;T.handleDeprecatedWarnings=e=>{(e.contentNavigation?.whitelist||e.contentNavigation?.blacklist||e.contentRedirect?.whitelist||e.contentRedirect?.blacklist)&&console.warn("The properties 'whitelist' and 'blacklist' have been marked as deprecated and will be removed in a future version. Please use 'allowlist' and 'denylist'.")};var B={},G={};Object.defineProperty(G,"__esModule",{value:!0}),G.AsyncRetryableLazy=W=G.Lazy=void 0;var W=G.Lazy=class{constructor(e){this.producerFn=e}getValue(){return this.value||(this.value=this.producerFn()),this.value}};G.AsyncRetryableLazy=class{constructor(e){this.producerFn=e}async getValue(){return this.promise||(this.promise=this.producerFn().catch((e=>{throw delete this.promise,e}))),this.promise}};var H={};Object.defineProperty(H,"__esModule",{value:!0}),H.WebContents=void 0;const N=d;class D extends N.EmitterBase{constructor(e,t,n){super(e,n,t.uuid,t.name),this.identity=t,this.entityType=n}capturePage(e){return this.wire.sendAction("capture-page",{options:e,...this.identity}).then((({payload:e})=>e.data))}executeJavaScript(e){return this.wire.sendAction("execute-javascript-in-window",{...this.identity,code:e}).then((({payload:e})=>e.data))}getZoomLevel(){return this.wire.sendAction("get-zoom-level",this.identity).then((({payload:e})=>e.data))}setZoomLevel(e){return this.wire.sendAction("set-zoom-level",{...this.identity,level:e}).then((()=>{}))}navigate(e){return this.wire.sendAction("navigate-window",{...this.identity,url:e}).then((()=>{}))}navigateBack(){return this.wire.sendAction("navigate-window-back",{...this.identity}).then((()=>{}))}async navigateForward(){await this.wire.sendAction("navigate-window-forward",{...this.identity})}stopNavigation(){return this.wire.sendAction("stop-window-navigation",{...this.identity}).then((()=>{}))}reload(e=!1){return this.wire.sendAction("reload-window",{ignoreCache:e,...this.identity}).then((()=>{}))}print(e={}){return this.wire.sendAction("print",{...this.identity,options:e}).then((()=>{}))}findInPage(e,t){return this.wire.sendAction("find-in-page",{...this.identity,searchTerm:e,options:t}).then((({payload:e})=>e.data))}stopFindInPage(e){return this.wire.sendAction("stop-find-in-page",{...this.identity,action:e}).then((()=>{}))}getPrinters(){return this.wire.sendAction("get-printers",{...this.identity}).then((({payload:e})=>e.data))}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){await this.wire.sendAction("focus-window",{emitSynthFocused:e,...this.identity})}async showDeveloperTools(){await this.wire.sendAction("show-developer-tools",this.identity)}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction("get-process-info",this.identity);return e}async getSharedWorkers(){return this.wire.sendAction("get-shared-workers",this.identity).then((({payload:e})=>e.data))}async inspectSharedWorker(){await this.wire.sendAction("inspect-shared-worker",{...this.identity})}async inspectSharedWorkerById(e){await this.wire.sendAction("inspect-shared-worker-by-id",{...this.identity,workerId:e})}async inspectServiceWorker(){await this.wire.sendAction("inspect-service-worker",{...this.identity})}async showPopupWindow(e){if(this.wire.sendAction(`${this.entityType}-show-popup-window`,this.identity).catch((()=>{})),e?.onPopupReady){const t=async({popupName:t})=>{try{const n=this.fin.Window.wrapSync({uuid:this.fin.me.uuid,name:t});await e.onPopupReady(n)}catch(e){throw new Error(`Something went wrong during onPopupReady execution: ${e}`)}};await this.once("popup-ready",t)}const{payload:t}=await this.wire.sendAction("try-create-popup-window",{options:{...e,hasResultCallback:!!e?.onPopupResult,hasReadyCallback:!!e?.onPopupReady},...this.identity}),{data:{willOpen:n,options:i}}=t;n&&await this.fin.Window.create(i.initialOptions);if(e?.onPopupResult){const t=async t=>{await e.onPopupResult((e=>{const{name:t,uuid:n,result:i,data:r}=e,o={identity:{name:t,uuid:n},result:i};return r&&(o.data=r),o})(t))},n=async()=>{await this.removeListener("popup-result",t)};await this.on("popup-result",t),await this.once("popup-teardown",n)}const{payload:r}=await this.wire.sendAction("show-popup-window",{options:i,...this.identity});return r.data}}var U,V,z,K,q;function J(){return V||(V=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(function(){if($)return L;$=1,Object.defineProperty(L,"__esModule",{value:!0}),L.ViewModule=void 0;const e=d,t=O,n=J(),i=T;class r extends e.Base{async create(e){const{uuid:t}=this.wire.me;if(!e.name||"string"!=typeof e.name)throw new Error("Please provide a name property as a string in order to create a View.");return(0,i.handleDeprecatedWarnings)(e),this.wire.environment.childViews?await this.wire.environment.createChildContent({entityType:"view",options:{...e,uuid:t}}):await this.wire.sendAction("create-view",{...e,uuid:t}),this.wrapSync({uuid:t,name:e.name})}async wrap(e){this.wire.sendAction("view-wrap").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}wrapSync(e){this.wire.sendAction("view-wrap-sync").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}getCurrent(){if(this.wire.sendAction("view-get-current").catch((e=>{})),!this.wire.me.isView)throw new Error("You are not in a View context");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction("view-get-current-sync").catch((e=>{})),!this.wire.me.isView)throw new Error("You are not in a View context");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return L.ViewModule=r,L}(),e),n(function(){if(U)return B;var e;U=1,Object.defineProperty(B,"__esModule",{value:!0}),B.View=void 0;const t=g,n=G,i=H,r=ie();class o extends i.WebContents{constructor(i,o){super(i,o,"view"),this.identity=o,e.set(this,new n.Lazy((()=>this.fin.Platform.wrapSync(this.identity).getClient()))),this.attach=async e=>{await this.wire.sendAction("attach-view",{target:e,...this.identity})},this.destroy=async()=>{await this.wire.sendAction("destroy-view",{...this.identity})},this.show=async()=>{await this.wire.sendAction("show-view",{...this.identity})},this.showAt=async(e,t={})=>{await this.wire.sendAction("show-view-at",{bounds:e,...this.identity,options:t})},this.bringToFront=async()=>{await this.wire.sendAction("bring-view-to-front",{...this.identity})},this.hide=async()=>{await this.wire.sendAction("hide-view",{...this.identity})},this.setBounds=async e=>{await this.wire.sendAction("set-view-bounds",{bounds:e,...this.identity})},this.getBounds=async()=>(await this.wire.sendAction("get-view-bounds",{...this.identity})).payload.data,this.getInfo=async()=>(await this.wire.sendAction("get-view-info",{...this.identity})).payload.data,this.getParentLayout=async()=>(this.wire.sendAction("view-get-parent-layout",{...this.identity}).catch((()=>{})),this.fin.Platform.Layout.getLayoutByViewIdentity(this.identity)),this.getOptions=async()=>this.wire.sendAction("get-view-options",{...this.identity}).then((({payload:e})=>e.data)),this.updateOptions=async e=>this.wire.sendAction("update-view-options",{options:e,...this.identity}).then((()=>{})),this.getCurrentWindow=async()=>{const{payload:{data:e}}=await this.wire.sendAction("get-view-window",{...this.identity});return new r._Window(this.wire,e)},this.getCurrentStack=async()=>{this.wire.sendAction("view-get-current-stack").catch((()=>{}));try{return(await this.getParentLayout()).getStackByViewIdentity(this.identity)}catch(e){throw new t.RuntimeError({reason:"This view does not belong to a stack.",error:e})}},this.triggerBeforeUnload=async()=>(await this.wire.sendAction("trigger-before-unload",{...this.identity})).payload.data,this.bindToElement=async e=>{if(!e)throw new Error("Element not found.");return this.wire.environment.observeBounds(e,(async e=>this.setBounds(e)))}}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){const t=await this.getCurrentWindow();await t.focusedWebViewWasChanged(),await super.focus({emitSynthFocused:e})}}return B.View=o,e=new WeakMap,B}(),e)}(k)),k}function Y(){if(z)return j;z=1,Object.defineProperty(j,"__esModule",{value:!0}),j.Application=void 0;const e=d,t=ie(),n=J();class i extends e.EmitterBase{constructor(e,n){super(e,"application",n.uuid),this.identity=n,this.window=new t._Window(this.wire,{uuid:this.identity.uuid,name:this.identity.uuid})}windowListFromIdentityList(e){const n=[];return e.forEach((e=>{n.push(new t._Window(this.wire,{uuid:e.uuid,name:e.name}))})),n}isRunning(){return this.wire.sendAction("is-application-running",this.identity).then((({payload:e})=>e.data))}async quit(e=!1){try{await this._close(e),await this.wire.sendAction("destroy-application",{force:e,...this.identity})}catch(e){if(!["Remote connection has closed","Could not locate the requested application"].some((t=>e.message.includes(t))))throw e}}async _close(e=!1){try{await this.wire.sendAction("close-application",{force:e,...this.identity})}catch(e){if(!e.message.includes("Remote connection has closed"))throw e}}close(e=!1){return console.warn("Deprecation Warning: Application.close is deprecated Please use Application.quit"),this.wire.sendAction("application-close",this.identity).catch((e=>{})),this._close(e)}getChildWindows(){return this.wire.sendAction("get-child-windows",this.identity).then((({payload:e})=>{const t=[];return e.data.forEach((e=>{t.push({uuid:this.identity.uuid,name:e})})),this.windowListFromIdentityList(t)}))}getManifest(){return this.wire.sendAction("get-application-manifest",this.identity).then((({payload:e})=>e.data))}getParentUuid(){return this.wire.sendAction("get-parent-application",this.identity).then((({payload:e})=>e.data))}getShortcuts(){return this.wire.sendAction("get-shortcuts",this.identity).then((({payload:e})=>e.data))}async getViews(){const{payload:e}=await this.wire.sendAction("application-get-views",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}getZoomLevel(){return this.wire.sendAction("get-application-zoom-level",this.identity).then((({payload:e})=>e.data))}getWindow(){return this.wire.sendAction("application-get-window",this.identity).catch((e=>{})),Promise.resolve(this.window)}registerUser(e,t){return this.wire.sendAction("register-user",{userName:e,appName:t,...this.identity}).then((()=>{}))}removeTrayIcon(){return this.wire.sendAction("remove-tray-icon",this.identity).then((()=>{}))}restart(){return this.wire.sendAction("restart-application",this.identity).then((()=>{}))}run(){return console.warn("Deprecation Warning: Application.run is deprecated Please use fin.Application.start"),this.wire.sendAction("application-run",this.identity).catch((e=>{})),this._run()}_run(e={}){return this.wire.sendAction("run-application",{manifestUrl:this._manifestUrl,opts:e,...this.identity}).then((()=>{}))}scheduleRestart(){return this.wire.sendAction("relaunch-on-close",this.identity).then((()=>{}))}async sendApplicationLog(){const{payload:e}=await this.wire.sendAction("send-application-log",this.identity);return e.data}async setJumpList(e){await this.wire.sendAction("set-jump-list",{config:e,...this.identity})}setTrayIcon(e){return this.wire.sendAction("set-tray-icon",{enabledIcon:e,...this.identity}).then((()=>{}))}setShortcuts(e){return this.wire.sendAction("set-shortcuts",{data:e,...this.identity}).then((()=>{}))}async setShortcutQueryParams(e){await this.wire.sendAction("set-shortcut-query-args",{data:e,...this.identity})}setZoomLevel(e){return this.wire.sendAction("set-application-zoom-level",{level:e,...this.identity}).then((()=>{}))}async setAppLogUsername(e){await this.wire.sendAction("set-app-log-username",{data:e,...this.identity})}getTrayIconInfo(){return this.wire.sendAction("get-tray-icon-info",this.identity).then((({payload:e})=>e.data))}hasTrayIcon(){return this.wire.sendAction("has-tray-icon",this.identity).then((({payload:e})=>e.data))}terminate(){return this.wire.sendAction("terminate-application",this.identity).then((()=>{}))}wait(){return this.wire.sendAction("wait-for-hung-application",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction("get-info",this.identity).then((({payload:e})=>e.data))}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction("application-get-process-info",this.identity);return e}async setFileDownloadLocation(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t};await this.wire.sendAction("set-file-download-location",{...n,downloadLocation:e})}async getFileDownloadLocation(){const{payload:{data:e}}=await this.wire.sendAction("get-file-download-location",this.identity);return e}async showTrayIconPopupMenu(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t},{payload:i}=await this.wire.sendAction("show-tray-icon-popup-menu",{...n,options:e});return i.data}async closeTrayIconPopupMenu(){const{name:e}=this.wire.me,t={uuid:this.identity.uuid,name:e};await this.wire.sendAction("close-tray-icon-popup-menu",{...t})}}return j.Application=i,j}function Z(){return q||(q=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(function(){if(K)return F;K=1,Object.defineProperty(F,"__esModule",{value:!0}),F.ApplicationModule=void 0;const e=d,t=O,n=Y();class i extends e.Base{async wrap(e){this.wire.sendAction("wrap-application").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}wrapSync(e){this.wire.sendAction("wrap-application-sync").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}async _create(e){return void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&void 0===e.isPlatformController&&(e.autoShow=!0),await this.wire.sendAction("create-application",e),this.wrap({uuid:e.uuid})}create(e){return console.warn("Deprecation Warning: fin.Application.create is deprecated. Please use fin.Application.start"),this.wire.sendAction("application-create").catch((e=>{})),this._create(e)}async start(e){this.wire.sendAction("start-application").catch((e=>{}));const t=await this._create(e);return await this.wire.sendAction("run-application",{uuid:e.uuid}),t}async startManyManifests(e,t){return this.wire.sendAction("run-applications",{applications:e,opts:t}).then((()=>{}))}getCurrent(){return this.wire.sendAction("get-current-application").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction("get-current-application-sync").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}async startFromManifest(e,t){this.wire.sendAction("application-start-from-manifest").catch((e=>{}));const n=await this._createFromManifest(e);return await n._run(t),n}createFromManifest(e){return console.warn("Deprecation Warning: fin.Application.createFromManifest is deprecated. Please use fin.Application.startFromManifest"),this.wire.sendAction("application-create-from-manifest").catch((e=>{})),this._createFromManifest(e)}_createFromManifest(e){return this.wire.sendAction("get-application-manifest",{manifestUrl:e}).then((({payload:e})=>{const t=e.data.platform?e.data.platform.uuid:e.data.startup_app.uuid;return this.wrap({uuid:t})})).then((t=>(t._manifestUrl=e,t)))}}return F.ApplicationModule=i,F}(),e),n(Y(),e)}(R)),R}H.WebContents=D;var Q={};Object.defineProperty(Q,"__esModule",{value:!0}),Q.promisifySubscription=void 0;var X,ee,te;function ne(){if(X)return S;X=1,Object.defineProperty(S,"__esModule",{value:!0}),S._Window=void 0;const e=Z(),t=H,n=J(),i=T,r=Q;class o extends t.WebContents{constructor(e,t){super(e,t,"window")}async createWindow(e){this.wire.sendAction("window-create-window",this.identity).catch((e=>{}));const t=await(0,r.promisifySubscription)(this,"fire-constructor-callback");void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&(e.autoShow=!0),(0,i.handleDeprecatedWarnings)(e);const n=this.wire.environment.createChildContent({entityType:"window",options:e}),[o]=await Promise.all([t.getValue(),n]);let s;const{success:a}=o,c=o.data,{message:d}=c;s=a?{httpResponseCode:c.httpResponseCode,apiInjected:c.apiInjected}:{message:c.message,networkErrorCode:c.networkErrorCode,stack:c.stack};const h={message:d,cbPayload:s,success:a};try{this.getWebWindow().fin.__internal_.openerSuccessCBCalled()}catch(e){}return h.success?this:Promise.reject(h)}getAllFrames(){return this.wire.sendAction("get-all-frames",this.identity).then((({payload:e})=>e.data))}getBounds(){return this.wire.sendAction("get-window-bounds",this.identity).then((({payload:e})=>e.data))}center(){return this.wire.sendAction("center-window",this.identity).then((()=>{}))}blur(){return this.wire.sendAction("blur-window",this.identity).then((()=>{}))}bringToFront(){return this.wire.sendAction("bring-window-to-front",this.identity).then((()=>{}))}animate(e,t){return this.wire.sendAction("animate-window",{transitions:e,options:t,...this.identity}).then((()=>{}))}hide(){return this.wire.sendAction("hide-window",this.identity).then((()=>{}))}close(e=!1){return this.wire.sendAction("close-window",{force:e,...this.identity}).then((()=>{Object.setPrototypeOf(this,null)}))}focusedWebViewWasChanged(){return this.wire.sendAction("focused-webview-changed",this.identity).then((()=>{}))}getNativeId(){return this.wire.sendAction("get-window-native-id",this.identity).then((({payload:e})=>e.data))}async getCurrentViews(){const{payload:e}=await this.wire.sendAction("window-get-views",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}disableFrame(){return console.warn("Function is deprecated; use disableUserMovement instead."),this.wire.sendAction("disable-window-frame",this.identity).then((()=>{}))}disableUserMovement(){return this.wire.sendAction("disable-window-frame",this.identity).then((()=>{}))}enableFrame(){return console.warn("Function is deprecated; use enableUserMovement instead."),this.wire.sendAction("enable-window-frame",this.identity).then((()=>{}))}enableUserMovement(){return this.wire.sendAction("enable-window-frame",this.identity).then((()=>{}))}flash(){return this.wire.sendAction("flash-window",this.identity).then((()=>{}))}stopFlashing(){return this.wire.sendAction("stop-flash-window",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction("get-window-info",this.identity).then((({payload:e})=>e.data))}async getLayout(e){this.wire.sendAction("window-get-layout",this.identity).catch((e=>{}));const t=await this.getOptions();if(!t.layout&&!t.layoutSnapshot)throw new Error("Window does not have a Layout");return this.fin.Platform.Layout.wrap(e??this.identity)}getOptions(){return this.wire.sendAction("get-window-options",this.identity).then((({payload:e})=>e.data))}getParentApplication(){return this.wire.sendAction("window-get-parent-application",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity))}getParentWindow(){return this.wire.sendAction("window-get-parent-window",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity)).then((e=>e.getWindow()))}async getSnapshot(e){const t={area:e,...this.identity};console.warn("Window.getSnapshot has been deprecated, please use Window.capturePage");return(await this.wire.sendAction("get-window-snapshot",t)).payload.data}getState(){return this.wire.sendAction("get-window-state",this.identity).then((({payload:e})=>e.data))}getWebWindow(){return this.wire.sendAction("window-get-web-window",this.identity).catch((e=>{})),this.wire.environment.getWebWindow(this.identity)}isMainWindow(){return this.wire.sendAction("window-is-main-window",this.identity).catch((e=>{})),this.me.uuid===this.me.name}isShowing(){return this.wire.sendAction("is-window-showing",this.identity).then((({payload:e})=>e.data))}maximize(){return this.wire.sendAction("maximize-window",this.identity).then((()=>{}))}minimize(){return this.wire.sendAction("minimize-window",this.identity).then((()=>{}))}moveBy(e,t,n){return this.wire.sendAction("move-window-by",{deltaLeft:e,deltaTop:t,positioningOptions:n,...this.identity}).then((()=>{}))}moveTo(e,t,n){return this.wire.sendAction("move-window",{left:e,top:t,positioningOptions:n,...this.identity}).then((()=>{}))}resizeBy(e,t,n,i){return this.wire.sendAction("resize-window-by",{deltaWidth:Math.floor(e),deltaHeight:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}resizeTo(e,t,n,i){return this.wire.sendAction("resize-window",{width:Math.floor(e),height:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}restore(){return this.wire.sendAction("restore-window",this.identity).then((()=>{}))}setAsForeground(){return this.wire.sendAction("set-foreground-window",this.identity).then((()=>{}))}setBounds(e,t){return this.wire.sendAction("set-window-bounds",{...e,...this.identity,positioningOptions:t}).then((()=>{}))}show(e=!1){return this.wire.sendAction("show-window",{force:e,...this.identity}).then((()=>{}))}showAt(e,t,n=!1){return this.wire.sendAction("show-at-window",{force:n,left:Math.floor(e),top:Math.floor(t),...this.identity}).then((()=>{}))}updateOptions(e){return this.wire.sendAction("update-window-options",{options:e,...this.identity}).then((()=>{}))}authenticate(e,t){return this.wire.sendAction("window-authenticate",{userName:e,password:t,...this.identity}).then((()=>{}))}async showPopupMenu(e){const{payload:t}=await this.wire.sendAction("show-popup-menu",{options:e,...this.identity});return t.data}async closePopupMenu(){return this.wire.sendAction("close-popup-menu",{...this.identity}).then((()=>{}))}async dispatchPopupResult(e){this.wire.sendAction("window-dispatch-popup-result",this.identity).catch((e=>{})),await this.wire.sendAction("dispatch-popup-result",{data:e,...this.identity})}async print(e={content:"self"}){switch(e.content){case void 0:case"self":return super.print(e);case"screenshot":return this.wire.sendAction("print-screenshot",this.identity).then((()=>{}));case"views":return this.wire.sendAction("print-views",{...this.identity,options:e}).then((()=>{}));default:return}}}return S._Window=o,S}function ie(){return te||(te=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(function(){if(ee)return _;ee=1,Object.defineProperty(_,"__esModule",{value:!0}),_._WindowModule=void 0;const e=d,t=O,n=ne();class i extends e.Base{async wrap(e){this.wire.sendAction("window-wrap").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}wrapSync(e){this.wire.sendAction("window-wrap-sync").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}create(e){return this.wire.sendAction("create-window").catch((e=>{})),new n._Window(this.wire,{uuid:this.me.uuid,name:e.name}).createWindow(e)}getCurrent(){if(this.wire.sendAction("get-current-window").catch((e=>{})),!this.wire.me.isWindow)throw new Error("You are not in a Window context");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction("get-current-window-sync").catch((e=>{})),!this.wire.me.isWindow)throw new Error("You are not in a Window context");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return _._WindowModule=i,_}(),e),n(ne(),e)}(M)),M}Q.promisifySubscription=async(e,t,n=(()=>!0),i)=>{let r,o,s;const a=new Promise(((e,t)=>{r=e,o=t})),c=e=>{n(e)&&(clearTimeout(s),r(e))};return await e.on(t,c),i&&(s=setTimeout((()=>o(new Error("event timed out"))),i)),a.finally((()=>{e.removeListener(t,c).catch((()=>null))})),{getValue:()=>a}},Object.defineProperty(c,"__esModule",{value:!0}),c.System=void 0;const re=d,oe=g,se=ie(),ae=t;class ce extends re.EmitterBase{constructor(e){super(e,"system")}sendExternalProcessRequest(e,t){return new Promise(((n,i)=>{const r="external-process-exited";let o,s,a,c;"function"==typeof t.listener&&(a=e=>{const n=e||{};s={topic:"exited",uuid:n.processUuid||"",exitCode:n.exitCode||0},o===e.processUuid&&(t.listener(s),c.removeListener(r,a))},this.wire.me.name||(this.wire.me.name=this.wire.me.uuid),c=new se._Window(this.wire,this.wire.me),c.on(r,a)),this.wire.sendAction(e,t).then((({payload:e})=>{o=e.data.uuid,n(e.data),s&&o===s.uuid&&(t.listener(s),c.removeListener(r,a))})).catch((e=>{c&&c.removeListener(r,a),i(e)}))}))}getVersion(){return this.wire.sendAction("get-version").then((({payload:e})=>e.data))}clearCache(e){return this.wire.sendAction("clear-cache",e).then((()=>{}))}deleteCacheOnExit(){return this.wire.sendAction("delete-cache-request").then((()=>{}))}exit(){return this.wire.sendAction("exit-desktop").then((()=>{}))}async fetchManifest(e){const{payload:{data:t}}=await this.wire.sendAction("fetch-manifest",{manifestUrl:e});return t}flushCookieStore(){return this.wire.sendAction("flush-cookie-store").then((()=>{}))}getAllWindows(){return this.wire.sendAction("get-all-windows").then((({payload:e})=>e.data))}getAllApplications(){return this.wire.sendAction("get-all-applications").then((({payload:e})=>e.data))}getCommandLineArguments(){return this.wire.sendAction("get-command-line-arguments").then((({payload:e})=>e.data))}async getCrashReporterState(){const{payload:{data:{diagnosticMode:e,isRunning:t}}}=await this.wire.sendAction("get-crash-reporter-state");return console.warn("diagnosticMode property is deprecated. It will be removed in a future version"),{diagnosticMode:e,diagnosticsMode:e,isRunning:t}}async startCrashReporter(e){const t=e,n={...t,diagnosticMode:t.diagnosticsMode||t.diagnosticMode},{payload:{data:{diagnosticMode:i,isRunning:r}}}=await this.wire.sendAction("start-crash-reporter",n);return{diagnosticMode:i,diagnosticsMode:i,isRunning:r}}getUniqueUserId(){return this.wire.sendAction("get-unique-user-id").then((({payload:e})=>e.data))}getEntityInfo(e,t){return this.wire.sendAction("get-entity-info",{uuid:e,name:t}).then((({payload:e})=>e.data))}getEnvironmentVariable(e){return this.wire.sendAction("get-environment-variable",{environmentVariables:e}).then((({payload:e})=>e.data))}getFocusedWindow(){return this.wire.sendAction("get-focused-window").then((({payload:e})=>e.data))}async isAppCertified(e){const{payload:{data:{certifiedInfo:t}}}=await this.wire.sendAction("is-app-certified",{manifestUrl:e});return t}getInstalledRuntimes(){return this.wire.sendAction("get-installed-runtimes").then((({payload:e})=>e.data.runtimes))}async getInstalledApps(){const{payload:{data:{installedApps:e}}}=await this.wire.sendAction("get-installed-apps");return e}getLog(e){return this.wire.sendAction("view-log",e).then((({payload:e})=>e.data))}getMachineId(){return this.wire.sendAction("get-machine-id").then((({payload:e})=>e.data))}getMinLogLevel(){return this.wire.sendAction("get-min-log-level").then((({payload:e})=>e.data))}getLogList(){return this.wire.sendAction("list-logs").then((({payload:e})=>e.data))}getMonitorInfo(){return this.wire.sendAction("get-monitor-info").then((({payload:e})=>e.data))}getMousePosition(){return this.wire.sendAction("get-mouse-position").then((({payload:e})=>e.data))}getProcessList(){return console.warn("System.getProcessList has been deprecated. Please consider using our new process APIs: Window.getProcessInfo, View.getProcessInfo, Application.getProcessInfo, System.getAllProcessInfo"),this.wire.sendAction("process-snapshot").then((({payload:e})=>e.data))}async getAllProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction("get-all-process-info",this.identity);return e}getProxySettings(){return this.wire.sendAction("get-proxy-settings").then((({payload:e})=>e.data))}getRuntimeInfo(){return this.wire.sendAction("get-runtime-info").then((({payload:e})=>e.data))}getRvmInfo(){return this.wire.sendAction("get-rvm-info").then((({payload:e})=>e.data))}getHostSpecs(){return this.wire.sendAction("get-host-specs").then((({payload:e})=>e.data))}getOSInfo(){return this.wire.sendAction("get-os-info").then((({payload:e})=>e.data))}launchExternalProcess(e){return this.sendExternalProcessRequest("launch-external-process",e)}monitorExternalProcess(e){return this.sendExternalProcessRequest("monitor-external-process",e)}log(e,t){return this.wire.sendAction("write-to-log",{level:e,message:t}).then((()=>{}))}openUrlWithBrowser(e){return this.wire.sendAction("open-url-with-browser",{url:e}).then((()=>{}))}async registerCustomProtocol(e){if("object"!=typeof e)throw new Error("Must provide an object with a `protocolName` property having a string value.");await this.wire.sendAction("register-custom-protocol",e)}async unregisterCustomProtocol(e){await this.wire.sendAction("unregister-custom-protocol",{protocolName:e})}async getCustomProtocolState(e){return this.wire.sendAction("get-custom-protocol-state",{protocolName:e}).then((({payload:e})=>e.data))}releaseExternalProcess(e){return this.wire.sendAction("release-external-process",{uuid:e}).then((()=>{}))}showDeveloperTools(e){return this.wire.sendAction("show-developer-tools",e).then((()=>{}))}terminateExternalProcess(e){return this.wire.sendAction("terminate-external-process",e).then((()=>{}))}updateProxySettings(e){return this.wire.sendAction("update-proxy",e).then((()=>{}))}async downloadAsset(e,t){const n=()=>{};let i=n,r=n;const o=new Promise(((e,t)=>{i=e,r=t}));if("openfin"!==this.wire.environment.type)throw new oe.NotSupportedError("downloadAsset only supported in an OpenFin Render process");const s=oe.RuntimeError.getCallSite(),a=this.wire.environment.getNextMessageId().toString(),c=`asset-download-progress-${a}`,d=`asset-download-error-${a}`,h=`asset-download-complete-${a}`,l=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},u=()=>{this.removeListener(c,l)};await Promise.all([this.on(c,l),this.once(d,(e=>{u();const{reason:t,err:n}=e;r(new oe.RuntimeError({reason:t,error:n},s))})),this.once(h,(()=>{u(),i()}))]);const p=Object.assign(e,{downloadId:a});return await this.wire.sendAction("download-asset",p).catch((e=>{throw u(),e})),o}downloadRuntime(e,t){const n=oe.RuntimeError.getCallSite();return new Promise(((i,r)=>{if("openfin"!==this.wire.environment.type)return void r(new oe.NotSupportedError("downloadRuntime only supported in an OpenFin Render process"));const o=this.wire.environment.getNextMessageId().toString(),s=`runtime-download-progress-${o}`,a=`runtime-download-error-${o}`,c=`runtime-download-complete-${o}`,d=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},h=()=>{this.removeListener(s,d)};this.on(s,d),this.once(a,(e=>{h();const{reason:t,err:i}=e;r(new oe.RuntimeError({reason:t,error:i},n))})),this.once(c,(()=>{h(),i()}));const l=Object.assign(e,{downloadId:o});this.wire.sendAction("download-runtime",l).catch((e=>{h(),r(e)}))}))}downloadPreloadScripts(e){return this.wire.sendAction("download-preload-scripts",{scripts:e}).then((({payload:e})=>e.data))}getAllExternalApplications(){return this.wire.sendAction("get-all-external-applications").then((({payload:e})=>e.data))}getAppAssetInfo(e){return this.wire.sendAction("get-app-asset-info",e).then((({payload:e})=>e.data))}getCookies(e){const t=this.wire.environment.getUrl(),n=Object.assign(e,{url:t});return this.wire.sendAction("get-cookies",n).then((({payload:e})=>e.data))}setMinLogLevel(e){return this.wire.sendAction("set-min-log-level",{level:e}).then((()=>{}))}resolveUuid(e){return this.wire.sendAction("resolve-uuid",{entityKey:e}).then((({payload:e})=>e.data))}executeOnRemote(e,t){return t.requestingIdentity=e,this.wire.ferryAction(t)}readRegistryValue(e,t,n){return this.wire.sendAction("read-registry-value",{rootKey:e,subkey:t,value:n}).then((({payload:e})=>e.data))}registerExternalConnection(e){return this.wire.sendAction("register-external-connection",{uuid:e}).then((({payload:e})=>e.data))}async getServiceConfiguration(e){if("string"!=typeof e.name)throw new Error("Must provide an object with a `name` property having a string value");const{name:t}=e;return this.wire.sendAction("get-service-configuration",{name:t}).then((({payload:e})=>e.data))}async getSystemAppConfig(e){if("string"!=typeof e)throw new Error("Must provide a string value for name of system app");return this.wire.sendAction("get-system-app-configuration",{name:e}).then((({payload:e})=>e.data))}async registerShutdownHandler(e){this.wire.sendAction("system-register-shutdown-handler").catch((e=>{}));const{uuid:t,name:n}=this.wire.me;this.on("system-shutdown",(i=>{e({proceed:()=>{this.wire.environment.raiseEvent("application/system-shutdown-handled",{uuid:t,name:n,topic:"application"})}})}))}runRvmHealthCheck(){return this.wire.sendAction("run-rvm-health-check").then((({payload:e})=>e.data))}async launchManifest(e,t={}){const{subscribe:n,...i}=t,r=i;if(n){const e=new ae.EventEmitter;n(e);const t="app-version-progress",i="runtime-status",o="app-version-complete",s="app-version-error",a=this.wire.environment.getNextMessageId().toString();r.appVersionId=a;const c=[o,t,i,s],d=e=>{const{appVersionId:t,topic:n,type:i,...r}=e;return{...r,type:c.find((e=>i.includes(e)))}},h=t=>{const n=d(t);e.emit(n.type,n)},l=()=>{this.removeListener(`${t}.${a}`,h),this.removeListener(`${i}.${a}`,h),this.removeListener(`${o}.${a}`,h),this.removeListener(`${s}.${a}`,h),this.removeListener(`${o}.${a}`,l),this.removeListener(`${s}.${a}`,l)};await Promise.all([this.on(`${t}.${a}`,h),this.on(`${i}.${a}`,h),this.once(`${o}.${a}`,h),this.once(`${s}.${a}`,h),this.once(`${o}.${a}`,l),this.once(`${s}.${a}`,l)])}return(await this.wire.sendAction("launch-manifest",{manifestUrl:e,opts:r})).payload.data.manifest}async queryPermissionForCurrentContext(e){const t={uuid:this.wire.me.uuid,name:this.wire.me.name};return(await this.wire.sendAction("query-permission-for-current-context",{apiName:e,identity:t})).payload.data}async enableNativeWindowIntegrationProvider(e){const{payload:t}=await this.wire.sendAction("enable-native-window-integration-provider",{permissions:e});return t.data}async registerUsage({data:e,type:t}){await this.wire.sendAction("register-usage",{data:e,type:t})}async getPrinters(){const{payload:e}=await this.wire.sendAction("system-get-printers");return e.data}async updateProcessLoggingOptions(e){await this.wire.sendAction("system-update-process-logging-options",{options:e})}async getDomainSettings(){const{payload:{data:e}}=await this.wire.sendAction("get-domain-settings",this.identity);return e}async setDomainSettings(e){await this.wire.sendAction("set-domain-settings",{domainSettings:e,...this.identity})}async refreshExtensions(){const{payload:e}=await this.wire.sendAction("refresh-extensions");return e.data}async getInstalledExtensions(){const{payload:e}=await this.wire.sendAction("get-installed-extensions");return e.data}}c.System=ce;var de={},he={};Object.defineProperty(he,"__esModule",{value:!0}),he.RefCounter=void 0;he.RefCounter=class{constructor(){this.topicRefMap=new Map}incRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t+1;n=i,this.topicRefMap.set(e,i)}else this.topicRefMap.set(e,1),n=1;return n}decRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t-1;this.topicRefMap.set(e,i),n=i}else n=-1;return n}actOnFirst(e,t,n){return 1===this.incRefCount(e)?t():n()}actOnLast(e,t,n){return 0===this.decRefCount(e)?t():n()}};var le={},ue={},pe={};Object.defineProperty(pe,"__esModule",{value:!0}),pe.ChannelBase=pe.ProtectedItems=void 0;const we=e=>async(t,n,i)=>{const r=await e(t,n,i);return void 0===r?n:r};pe.ProtectedItems=class{constructor(e,t){this.providerIdentity=e,this.close=t}};class ye{static defaultAction(e){throw new Error(`No action registered at target for ${e}`)}constructor(){this.subscriptions=new Map}async processAction(e,t,n){try{const i=this.subscriptions.has(e)?this.subscriptions.get(e):(t,n)=>(this.defaultAction??ye.defaultAction)(e,t,n),r=this.preAction?await this.preAction(e,t,n):t,o=await i(r,n);return this.postAction?await this.postAction(e,o,n):o}catch(t){if(this.errorMiddleware)return this.errorMiddleware(e,t,n);throw t}}beforeAction(e){if(this.preAction)throw new Error("Already registered beforeAction middleware");this.preAction=we(e)}onError(e){if(this.errorMiddleware)throw new Error("Already registered error middleware");this.errorMiddleware=e}afterAction(e){if(this.postAction)throw new Error("Already registered afterAction middleware");this.postAction=we(e)}remove(e){this.subscriptions.delete(e)}setDefaultAction(e){if(this.defaultAction)throw new Error("default action can only be set once");this.defaultAction=e}register(e,t){if(this.subscriptions.has(e))throw new Error(`Subscription already registered for action: ${e}. Unsubscribe before adding new subscription`);return this.subscriptions.set(e,t),!0}}pe.ChannelBase=ye;var fe,ge,me,ve=s&&s.__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)},Ce=s&&s.__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};Object.defineProperty(ue,"__esModule",{value:!0}),ue.ChannelClient=void 0;const be=pe,Ie=new Map;class Ee extends be.ChannelBase{static closeChannelByEndpointId(e){const t=Ie.get(e);t&&ve(t,me,"f").call(t)}static handleProviderDisconnect(e){for(const t of Ie.values())t.providerIdentity.channelId===e.channelId&&(t.disconnectListener(e),ve(t,me,"f").call(t))}constructor(e,t,n){super(),fe.set(this,void 0),ge.set(this,void 0),this.processAction=(e,t,n)=>super.processAction(e,t,n),me.set(this,(()=>{Ie.delete(this.endpointId),ve(this,ge,"f").close()})),Ce(this,fe,new be.ProtectedItems(e,t),"f"),this.disconnectListener=()=>{},this.endpointId=e.endpointId,Ce(this,ge,n,"f"),Ie.set(this.endpointId,this),n.receive(this.processAction)}get providerIdentity(){return ve(this,fe,"f").providerIdentity}async dispatch(e,t){if(ve(this,ge,"f").isEndpointConnected(this.providerIdentity.channelId))return ve(this,ge,"f").send(this.providerIdentity.channelId,e,t);throw new Error("The client you are trying to dispatch from is disconnected from the target provider.")}onDisconnection(e){this.disconnectListener=t=>{try{e(t)}catch(e){throw new Error(`Error while calling the onDisconnection callback: ${e.message}`)}finally{this.disconnectListener=()=>{}}}}async disconnect(){await this.sendDisconnectAction(),ve(this,me,"f").call(this)}async sendDisconnectAction(){const e=ve(this,fe,"f");await e.close()}static async wireClose(e,t,n){const{channelName:i,uuid:r,name:o}=t;await e.sendAction("disconnect-from-channel",{channelName:i,uuid:r,name:o,endpointId:n})}}ue.ChannelClient=Ee,fe=new WeakMap,ge=new WeakMap,me=new WeakMap;var xe={},Ae={};Object.defineProperty(Ae,"__esModule",{value:!0}),Ae.exhaustiveCheck=void 0,Ae.exhaustiveCheck=function(e,t){throw new Error(`Unsupported value: ${e}${t?`\n Supported values are: ${t.join("")}`:""}`)};var Pe,Me,_e,Oe={},Se=s&&s.__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},Re=s&&s.__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)};Object.defineProperty(Oe,"__esModule",{value:!0}),Oe.ClassicInfo=Oe.ClassicStrategy=void 0;Oe.ClassicStrategy=class{constructor(e,t,n,i){this.messageReceiver=t,this.endpointId=n,this.providerIdentity=i,Pe.set(this,void 0),Me.set(this,new Map),_e.set(this,new Map),this.send=async(e,t,n)=>{const i=Re(this,Me,"f").get(e);if(!i)throw new Error(`Could not locate routing info for endpoint ${e}`);const r={...i};r.isLocalEndpointId&&delete r.endpointId,delete r.isLocalEndpointId;const o=Re(this,Pe,"f").sendAction("send-channel-message",{...r,providerIdentity:this.providerIdentity,action:t,payload:n});Re(this,_e,"f").get(e)?.add(o);return(await o.catch((e=>{throw new Error(e.message)})).finally((()=>{Re(this,_e,"f").get(e)?.delete(o)}))).payload.data.result},this.close=async()=>{this.messageReceiver.removeEndpoint(this.providerIdentity.channelId,this.endpointId),[...Re(this,Me,"f").keys()].forEach((e=>this.closeEndpoint(e))),Se(this,Me,new Map,"f")},Se(this,Pe,e,"f")}onEndpointDisconnect(e,t){}receive(e){this.messageReceiver.addEndpoint(e,this.providerIdentity.channelId,this.endpointId)}async closeEndpoint(e){const t=Re(this,Me,"f").get(e);Re(this,Me,"f").delete(e);const n=Re(this,_e,"f").get(e);n?.forEach((n=>{const i=`Channel connection with identity uuid: ${t?.uuid} / name: ${t?.name} / endpointId: ${e} no longer connected.`;n.cancel(new Error(i))}))}isEndpointConnected(e){return Re(this,Me,"f").has(e)}addEndpoint(e,t){Re(this,Me,"f").set(e,t.endpointIdentity),Re(this,_e,"f").set(e,new Set)}isValidEndpointPayload(e){return"string"==typeof e?.endpointIdentity?.endpointId||"string"==typeof e?.endpointIdentity?.channelId}},Pe=new WeakMap,Me=new WeakMap,_e=new WeakMap,Oe.ClassicInfo={version:5,minimumVersion:0,type:"classic"};var Fe={},je={},ke={};Object.defineProperty(ke,"__esModule",{value:!0}),ke.errorToPOJO=void 0,ke.errorToPOJO=function(e){return{stack:e.stack,name:e.name,message:e.message,toString:()=>e.stack||e.toString()}};var Le,Te,$e=s&&s.__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)},Be=s&&s.__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};Object.defineProperty(je,"__esModule",{value:!0}),je.RTCEndpoint=void 0;const Ge=ke;je.RTCEndpoint=class{static isValidEndpointPayload(e){const t=e=>"object"==typeof e&&null!==e;return t(e)&&t(e.endpointIdentity)&&t(e.rtc)&&"string"==typeof e.endpointIdentity.endpointId}constructor({rtc:e,endpointIdentity:t}){this.responseMap=new Map,Le.set(this,null),Te.set(this,void 0),this.connectionStateChangeHandler=e=>{"connected"!==this.rtc.rtcClient.connectionState&&(this.rtc.rtcClient.removeEventListener("connectionstatechange",this.connectionStateChangeHandler),this.close(),$e(this,Te,"f")&&$e(this,Te,"f").call(this))},this.send=async(e,t)=>{const n=`message-${Math.random()}`,i=new Promise(((e,t)=>{this.responseMap.set(n,{resolve:e,reject:t})}));return this.rtc.channels.request.send(JSON.stringify({action:e,payload:t,messageId:n})),i},this.close=()=>{this.responseMap.forEach((e=>e.reject("Connection has closed."))),this.responseMap=new Map,this.rtc.channels.request.close(),this.rtc.channels.response.close(),this.rtc.rtcClient.close()},this.rtc=e,this.endpointIdentity=t,this.rtc.channels.response.addEventListener("message",(e=>{let{data:t}=e;e.data instanceof ArrayBuffer&&(t=(new TextDecoder).decode(e.data));const{messageId:n,payload:i,success:r,error:o}=JSON.parse(t),{resolve:s,reject:a}=this.responseMap.get(n)??{};s&&a?(this.responseMap.delete(n),r?s(i):a(o)):(console.log("Could not find id in responseMap."),console.log(e))})),this.rtc.channels.request.addEventListener("message",(async e=>{let{data:n}=e;e.data instanceof ArrayBuffer&&(n=(new TextDecoder).decode(e.data));const{messageId:i,action:r,payload:o}=JSON.parse(n);if($e(this,Le,"f"))try{const e=await $e(this,Le,"f").call(this,r,o,t);this.rtc.channels.response.send(JSON.stringify({messageId:i,payload:e,success:!0}))}catch(e){"open"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,error:(0,Ge.errorToPOJO)(e),success:!1}))}else"open"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,success:!1,error:"Connection not ready."}))})),this.rtc.rtcClient.addEventListener("connectionstatechange",this.connectionStateChangeHandler),Object.values(this.rtc.channels).forEach((e=>{e.onclose=e=>{[...this.responseMap.values()].forEach((e=>e.reject(new Error("RTCDataChannel closed unexpectedly, this is most commonly caused by message size. Note: RTC Channels have a message size limit of ~255kB.")))),this.close(),$e(this,Te,"f")&&$e(this,Te,"f").call(this)}}))}onDisconnect(e){if($e(this,Te,"f"))throw new Error("RTCEndpoint disconnectListener cannot be set twice.");Be(this,Te,e,"f")}receive(e){if($e(this,Le,"f"))throw new Error("You have already set a listener for this RTC Endpoint.");Be(this,Le,e,"f")}get connected(){return"connected"===this.rtc.rtcClient.connectionState}},Le=new WeakMap,Te=new WeakMap;var We,He,Ne,De={},Ue=s&&s.__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)},Ve=s&&s.__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};Object.defineProperty(De,"__esModule",{value:!0}),De.EndpointStrategy=void 0;De.EndpointStrategy=class{constructor(e,t,n){this.EndpointType=e,this.StrategyName=n,We.set(this,null),He.set(this,new Map),Ne.set(this,!0),this.send=async(e,t,n)=>this.getEndpointById(e).send(t,n),this.close=async()=>{Ue(this,Ne,"f")&&(Ue(this,He,"f").forEach((e=>e.close())),Ve(this,He,new Map,"f")),Ve(this,Ne,!1,"f")},this.isValidEndpointPayload=t}onEndpointDisconnect(e,t){this.getEndpointById(e).onDisconnect(t)}receive(e){if(Ue(this,We,"f"))throw new Error(`You have already set a listener for this ${this.StrategyName} Strategy`);Ve(this,We,e,"f"),Ue(this,He,"f").forEach((e=>e.receive(Ue(this,We,"f"))))}getEndpointById(e){const t=Ue(this,He,"f").get(e);if(!t)throw new Error(`Client with endpoint id ${e} is not connected`);return t}get connected(){return Ue(this,Ne,"f")}isEndpointConnected(e){return Ue(this,He,"f").has(e)}addEndpoint(e,t){if(!Ue(this,Ne,"f"))return void console.warn(`Adding endpoint to disconnected ${this.StrategyName} Strategy`);const n=new this.EndpointType(t);Ue(this,We,"f")&&n.receive(Ue(this,We,"f")),Ue(this,He,"f").set(e,n)}async closeEndpoint(e){Ue(this,He,"f").delete(e)}},We=new WeakMap,He=new WeakMap,Ne=new WeakMap,Object.defineProperty(Fe,"__esModule",{value:!0}),Fe.RTCInfo=Fe.RTCStrategy=void 0;const ze=je,Ke=De;class qe extends Ke.EndpointStrategy{constructor(){super(ze.RTCEndpoint,ze.RTCEndpoint.isValidEndpointPayload,"RTC")}}Fe.RTCStrategy=qe,Fe.RTCInfo={version:2,minimumVersion:0,type:"rtc"};var Je={};Object.defineProperty(Je,"__esModule",{value:!0}),Je.RTCICEManager=void 0;const Ye=d;class Ze extends Ye.EmitterBase{constructor(e){super(e,"channel"),this.ensureChannelOpened=e=>new Promise(((t,n)=>{if("open"===e.readyState)t();else if("connecting"===e.readyState){const n=()=>{e.removeEventListener("open",n),t()};e.addEventListener("open",n)}else n(new Error("This Channel has already closed"))}))}static createDataChannelPromise(e,t){let n;const i=new Promise((e=>{n=e})),r=i=>{const o=()=>{i.channel.removeEventListener("open",o),n(i.channel)};i.channel.label===e&&(i.channel.addEventListener("open",o),t.removeEventListener("datachannel",r))};return t.addEventListener("datachannel",r),i}async listenForProviderIce(e,t){await this.on(this.createProviderEventName(e),t,{timestamp:Date.now()})}async raiseProviderIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createProviderEventName(e)),t)}async listenForClientIce(e,t){await this.on(this.createClientEventName(e),t,{timestamp:Date.now()})}async raiseClientIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createClientEventName(e)),t)}cleanupIceListeners(e){this.removeAllListeners(this.createClientEventName(e)),this.removeAllListeners(this.createProviderEventName(e))}createClientEventName(e){return`ice-client-${e}`}createProviderEventName(e){return`ice-provider-${e}`}createRouteString(e){return`channel/${e}`}createRtcPeer(){return this.wire.environment.getRtcPeer()}async startClientOffer(){const e=Math.random().toString(),t=this.createRtcPeer();t.addEventListener("icecandidate",(async t=>{t.candidate&&await this.raiseClientIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForProviderIce(e,(async e=>{await t.addIceCandidate(e.candidate)}));const n={request:t.createDataChannel("request"),response:t.createDataChannel("response")},i=await t.createOffer();await t.setLocalDescription(i);const r=Promise.all([n.request,n.response].map(this.ensureChannelOpened)).then((()=>{}));return{rtcClient:t,channels:n,offer:i,rtcConnectionId:e,channelsOpened:r}}async finishClientOffer(e,t,n){return await e.setRemoteDescription(t),await n,!0}async createProviderAnswer(e,t){const n=this.createRtcPeer(),i=Ze.createDataChannelPromise("request",n),r=Ze.createDataChannelPromise("response",n);n.addEventListener("icecandidate",(async t=>{t.candidate&&await this.raiseProviderIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForClientIce(e,(async e=>{await n.addIceCandidate(e.candidate)})),await n.setRemoteDescription(t);const o=await n.createAnswer();await n.setLocalDescription(o);const s=Promise.all([i,r]).then((([t,n])=>(this.cleanupIceListeners(e),{request:t,response:n})));return{rtcClient:n,answer:o,channels:s}}}Je.RTCICEManager=Ze;var Qe={},Xe={};function et(e){return[...e.split(".").reverse().entries()].reduce(((e,[t,n])=>e+ +n*1e4**t),0)}function tt(e,t){return et(e)>=et(t)}function nt(e){return e.split("/")[0]}Object.defineProperty(Xe,"__esModule",{value:!0}),Xe.runtimeUuidMeetsMinimumRuntimeVersion=Xe.parseRuntimeUuid=Xe.meetsMinimumRuntimeVersion=void 0,Xe.meetsMinimumRuntimeVersion=tt,Xe.parseRuntimeUuid=nt,Xe.runtimeUuidMeetsMinimumRuntimeVersion=function(e,t){return tt(nt(e),t)};var it,rt,ot,st,at,ct=s&&s.__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)},dt=s&&s.__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};Object.defineProperty(Qe,"__esModule",{value:!0}),Qe.ChannelProvider=void 0;const ht=pe,lt=Xe;class ut extends ht.ChannelBase{get connections(){return[...ct(this,it,"f")]}static handleClientDisconnection(e,t){const n=e.connections.find((e=>e.endpointId===t.endpointId));if(n)ct(e,st,"f").call(e,n);else{e.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name)).forEach(ct(e,st,"f"))}e.disconnectListener(t)}static setProviderRemoval(e,t){ut.removalMap.set(e,t)}constructor(e,t,n){super(),it.set(this,void 0),rt.set(this,void 0),ot.set(this,void 0),st.set(this,(e=>{const t=this.connections.filter((t=>t.endpointId!==e.endpointId));ct(this,ot,"f").closeEndpoint(e.endpointId),dt(this,it,t,"f")})),this.processAction=async(e,t,n)=>(ut.clientIsMultiRuntime(n)&&!(0,lt.runtimeUuidMeetsMinimumRuntimeVersion)(n.runtimeUuid,"18.87.56.0")?this.handleMultiRuntimeLegacyClient(n):this.checkForClientConnection(n),super.processAction(e,t,n)),at.set(this,(()=>{ct(this,ot,"f").close();const e=ut.removalMap.get(this);e&&e()})),dt(this,rt,new ht.ProtectedItems(e,t),"f"),this.connectListener=()=>{},this.disconnectListener=()=>{},dt(this,it,[],"f"),dt(this,ot,n,"f"),n.receive(this.processAction)}dispatch(e,t,n){const i=e.endpointId??this.getEndpointIdForOpenFinId(e,t);return i&&ct(this,ot,"f").isEndpointConnected(i)?ct(this,ot,"f").send(i,t,n):Promise.reject(new Error(`Client connection with identity uuid: ${e.uuid} / name: ${e.name} / endpointId: ${i} no longer connected.`))}async processConnection(e,t){return ct(this,it,"f").push(e),this.connectListener(e,t)}publish(e,t){return this.connections.map((n=>ct(this,ot,"f").send(n.endpointId,e,t)))}onConnection(e){this.connectListener=e}onDisconnection(e){this.disconnectListener=e}async destroy(){const e=ct(this,rt,"f");e.providerIdentity,dt(this,it,[],"f"),await e.close(),ct(this,at,"f").call(this)}async getAllClientInfo(){return this.connections.map((e=>{const{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}=e;return{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}}))}checkForClientConnection(e){if(!this.isClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider.\n Client Identity: {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}isClientConnected(e){return ut.clientIdentityIncludesEndpointId(e)?this.connections.some((t=>t.endpointId===e.endpointId&&t.uuid===e.uuid&&t.name===e.name)):this.isLegacyClientConnected(e)}isLegacyClientConnected(e){return this.connections.some((t=>t.uuid===e.uuid&&t.name===e.name))}handleMultiRuntimeLegacyClient(e){if(!this.isLegacyClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider. Client Identity:\n {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}getEndpointIdForOpenFinId(e,t){const n=this.connections.filter((t=>t.name===e.name&&t.uuid===e.uuid));if(n.length>=2){const n=ct(this,rt,"f"),{uuid:i,name:r}=e,o=n?.providerIdentity.uuid,s=n?.providerIdentity.name;console.warn(`WARNING: Dispatch call may have unintended results. The "to" argument of your dispatch call is missing the\n "endpointId" parameter. The identity you are dispatching to ({uuid: ${i}, name: ${r}})\n has multiple channelClients for this channel. Your dispatched action: (${t}) from the provider:\n ({uuid: ${o}, name: ${s}}) will only be processed by the most recently-created client.`)}return n.pop()?.endpointId}static clientIdentityIncludesEndpointId(e){return void 0!==e.endpointId}static clientIsMultiRuntime(e){return void 0!==e.runtimeUuid}static async wireClose(e,t){await e.sendAction("destroy-channel",{channelName:t})}}Qe.ChannelProvider=ut,it=new WeakMap,rt=new WeakMap,ot=new WeakMap,st=new WeakMap,at=new WeakMap,ut.removalMap=new WeakMap;var pt={};Object.defineProperty(pt,"__esModule",{value:!0}),pt.MessageReceiver=void 0;const wt=ue,yt=d;class ft extends yt.Base{constructor(e){super(e),this.onmessage=e=>"process-channel-message"===e.action&&(this.processChannelMessage(e),!0),this.endpointMap=new Map,this.latestEndpointIdByChannelId=new Map,e.registerMessageHandler(this.onmessage.bind(this))}async processChannelMessage(e){const{senderIdentity:t,providerIdentity:n,action:i,ackToSender:r,payload:o,intendedTargetIdentity:s}=e.payload,a=s.channelId??s.endpointId??this.latestEndpointIdByChannelId.get(n.channelId),c=this.endpointMap.get(a);if(!c)return r.payload.success=!1,r.payload.reason=`Client connection with identity uuid: ${this.wire.me.uuid} / name: ${this.wire.me.name} / endpointId: ${a} no longer connected.`,this.wire.sendRaw(r);try{const e=await c(i,o,t);return r.payload.payload=r.payload.payload||{},r.payload.payload.result=e,this.wire.sendRaw(r)}catch(e){return r.payload.success=!1,r.payload.reason=e.message,this.wire.sendRaw(r)}}addEndpoint(e,t,n){this.endpointMap.set(n,e),t!==n&&this.latestEndpointIdByChannelId.set(t,n)}removeEndpoint(e,t){this.endpointMap.delete(t),this.latestEndpointIdByChannelId.get(e)===t&&this.latestEndpointIdByChannelId.delete(e)}checkForPreviousClientConnection(e){const t=this.latestEndpointIdByChannelId.get(e);t&&(wt.ChannelClient.closeChannelByEndpointId(t),console.warn("You have created a second connection to an older provider. First connection has been removed from the clientMap"),console.warn("If the provider calls publish(), you may receive multiple messages."))}}pt.MessageReceiver=ft;var gt={};Object.defineProperty(gt,"__esModule",{value:!0}),gt.ProtocolManager=void 0;gt.ProtocolManager=class{constructor(e){this.ProtocolsInPreferenceOrder=e,this.DefaultClientProtocols=["classic"],this.DefaultProviderProtocols=["classic"],this.getClientProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultClientProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(", ")}.`);return t},this.getProviderProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultProviderProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(", ")}.`);return t},this.getCompatibleProtocols=(e,t)=>t.supportedProtocols.filter((t=>e.some((e=>e.type===t.type&&t.version>=e.minimumVersion&&e.version>=(t.minimumVersion??0))))).slice(0,t.maxProtocols)}};var mt={};Object.defineProperty(mt,"__esModule",{value:!0});class vt{static combine(e,t){return new vt(e,t)}constructor(e,t){this.primary=e,this.secondary=t}onEndpointDisconnect(e,t){this.primary.onEndpointDisconnect(e,(()=>{this.secondary.isEndpointConnected(e)||t()})),this.secondary.onEndpointDisconnect(e,(()=>{this.primary.isEndpointConnected(e)||t()}))}isValidEndpointPayload(e){return this.primary.isValidEndpointPayload(e)||this.secondary.isValidEndpointPayload(e)}async closeEndpoint(e){await this.primary.closeEndpoint(e),await this.secondary.closeEndpoint(e)}isEndpointConnected(e){return this.primary.isEndpointConnected(e)||this.secondary.isEndpointConnected(e)}async addEndpoint(e,t){this.primary.isValidEndpointPayload(t)&&await this.primary.addEndpoint(e,t),this.secondary.isValidEndpointPayload(t)&&await this.secondary.addEndpoint(e,t)}receive(e){this.primary.receive(e),this.secondary.receive(e)}send(e,t,n){return this.primary.isEndpointConnected(e)?this.primary.send(e,t,n):this.secondary.send(e,t,n)}async close(){await Promise.all([this.primary.close(),this.secondary.close()])}}mt.default=vt;var Ct,bt,It=s&&s.__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},Et=s&&s.__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)},xt=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(xe,"__esModule",{value:!0}),xe.ConnectionManager=void 0;const At=Ae,Pt=d,Mt=Oe,_t=Fe,Ot=Je,St=Qe,Rt=pt,Ft=gt,jt=xt(mt);class kt extends Pt.Base{static getProtocolOptionsFromStrings(e){return e.map((e=>{switch(e){case"rtc":return _t.RTCInfo;case"classic":return Mt.ClassicInfo;default:return(0,At.exhaustiveCheck)(e,["rtc","classic"])}}))}constructor(e){super(e),Ct.set(this,void 0),bt.set(this,void 0),this.removeChannelFromProviderMap=e=>{this.providerMap.delete(e)},this.onmessage=e=>"process-channel-connection"===e.action&&(this.processChannelConnection(e),!0),this.providerMap=new Map,this.protocolManager=new Ft.ProtocolManager("node"===this.wire.environment.type?["classic"]:["rtc","classic"]),It(this,Ct,new Rt.MessageReceiver(e),"f"),It(this,bt,new Ot.RTCICEManager(e),"f"),e.registerMessageHandler(this.onmessage.bind(this))}createProvider(e,t){const n=Object.assign(this.wire.environment.getDefaultChannelOptions().create,e||{}),i=this.protocolManager.getProviderProtocols(n?.protocols),r=i.map((e=>{switch(e){case"rtc":return new _t.RTCStrategy;case"classic":return new Mt.ClassicStrategy(this.wire,Et(this,Ct,"f"),t.channelId,t);default:return(0,At.exhaustiveCheck)(e,["rtc","classic"])}}));let o;if(2===r.length){const[e,t]=r;o=jt.default.combine(e,t)}else{if(1!==r.length)throw new Error("failed to combine strategies");[o]=r}const s=new St.ChannelProvider(t,(()=>St.ChannelProvider.wireClose(this.wire,t.channelName)),o),a=t.channelId;return this.providerMap.set(a,{provider:s,strategy:o,supportedProtocols:kt.getProtocolOptionsFromStrings(i)}),St.ChannelProvider.setProviderRemoval(s,this.removeChannelFromProviderMap.bind(this)),s}async createClientOffer(e){const t=this.protocolManager.getClientProtocols(e?.protocols);let n;return{offer:{supportedProtocols:await Promise.all(t.map((async e=>{switch(e){case"rtc":{const{rtcClient:e,channels:t,offer:i,rtcConnectionId:r,channelsOpened:o}=await Et(this,bt,"f").startClientOffer();return n={rtcClient:e,channels:t,channelsOpened:o},{type:"rtc",version:_t.RTCInfo.version,payload:{offer:i,rtcConnectionId:r}}}case"classic":return{type:"classic",version:Mt.ClassicInfo.version};default:return(0,At.exhaustiveCheck)(e,["rtc","classic"])}}))),maxProtocols:2},rtc:n}}async createClientStrategy(e,t){t.endpointId||(t.endpointId=this.wire.environment.getNextMessageId(),Et(this,Ct,"f").checkForPreviousClientConnection(t.channelId));const n=t.answer??{supportedProtocols:[{type:"classic",version:1}]},i=(await Promise.all(n.supportedProtocols.map((async n=>"rtc"===n.type&&e?(await Et(this,bt,"f").finishClientOffer(e.rtcClient,n.payload.answer,e.channelsOpened),new _t.RTCStrategy):"classic"===n.type?new Mt.ClassicStrategy(this.wire,Et(this,Ct,"f"),t.endpointId,t):null)))).filter((e=>null!==e));let r;if(e&&!i.some((e=>e instanceof _t.RTCStrategy))&&e&&e.rtcClient.close(),i.length>=2)r=jt.default.combine(i[0],i[1]);else{if(!i.length)throw new Error("No compatible protocols");[r]=i}const o={endpointIdentity:t,rtc:e};return r.addEndpoint(t.channelId,o),r}async processChannelConnection(e){const{clientIdentity:t,providerIdentity:n,ackToSender:i,payload:r,offer:o}=e.payload;t.endpointId?t.isLocalEndpointId=!1:(t.endpointId=this.wire.environment.getNextMessageId(),t.isLocalEndpointId=!0);const s=n.channelId,a=this.providerMap.get(s);if(!a)return i.payload.success=!1,i.payload.reason=`Channel "${n.channelName}" has been destroyed.`,this.wire.sendRaw(i);const{provider:c,strategy:d,supportedProtocols:h}=a;try{if(!(c instanceof St.ChannelProvider))throw Error("Cannot connect to a channel client");const e=o??{supportedProtocols:[{type:"classic",version:1}],maxProtocols:1},n=this.protocolManager.getCompatibleProtocols(h,e);if(!n.length)throw new Error("This provider does not support any of the offered protocols.");const s=await c.processConnection(t,r);i.payload.payload=i.payload.payload||{};let a={supportedProtocols:[],endpointPayloadPromise:Promise.resolve({endpointIdentity:t})};return a=await n.reduce((async(e,t)=>{const n=await e;if("rtc"===t.type){const{answer:e,rtcClient:i,channels:r}=await Et(this,bt,"f").createProviderAnswer(t.payload.rtcConnectionId,t.payload.offer);n.supportedProtocols.push({type:"rtc",version:_t.RTCInfo.version,payload:{answer:e}}),n.endpointPayloadPromise=n.endpointPayloadPromise.then((e=>r.then((t=>({...e,rtc:{rtcClient:i,channels:t}})))))}else n.supportedProtocols.push({type:"classic",version:Mt.ClassicInfo.version});return n}),Promise.resolve(a)),a.endpointPayloadPromise.then((e=>d.addEndpoint(t.endpointId,e))),i.payload.payload.result=s,i.payload.payload.answer=a,this.wire.sendRaw(i)}catch(e){return i.payload.success=!1,i.payload.reason=e.message,this.wire.sendRaw(i)}}}xe.ConnectionManager=kt,Ct=new WeakMap,bt=new WeakMap;var Lt,Tt,$t,Bt=s&&s.__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},Gt=s&&s.__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)};Object.defineProperty(le,"__esModule",{value:!0}),le.Channel=void 0;const Wt=t,Ht=G,Nt=d,Dt=ue,Ut=xe,Vt=Qe;function zt(e){const t=Math.floor(e/10),n=Math.min(3e4,500*2**t);return new Promise((e=>{setTimeout((()=>{e(!1)}),n)}))}class Kt extends Nt.EmitterBase{constructor(e){super(e,"channel"),Lt.set(this,void 0),Tt.set(this,new Wt.EventEmitter),$t.set(this,new Ht.AsyncRetryableLazy((async()=>{await Promise.all([this.on("disconnected",(e=>{Dt.ChannelClient.handleProviderDisconnect(e)})),this.on("connected",((...e)=>{Gt(this,Tt,"f").emit("connected",...e)}))]).catch((()=>new Error("error setting up channel connection listeners")))}))),Bt(this,Lt,new Ut.ConnectionManager(e),"f")}async getAllChannels(){return this.wire.sendAction("get-all-channels").then((({payload:e})=>e.data))}async onChannelConnect(e){await this.on("connected",e)}async onChannelDisconnect(e){await this.on("disconnected",e)}async safeConnect(e,t,n){const i={count:0};do{let r=()=>{};const o=new Promise((t=>{r=n=>{e===n.channelName&&t(!0)},Gt(this,Tt,"f").on("connected",r)}));try{if(i.count>0){i.gotConnectedEvent=await Promise.race([zt(i.count),o]);const t=await this.wire.sendAction("connect-to-channel",{...n,retryInfo:i});return console.log(`Successfully connected to channelName: ${e}`),t.payload.data}const t=this.wire.sendAction("connect-to-channel",n);i.originalMessageId=t.messageId;return(await t).payload.data}catch(n){if(!n.message.includes("internal-nack"))throw n;t&&0===i.count&&console.warn(`No channel found for channelName: ${e}. Waiting for connection...`)}finally{i.count+=1,Gt(this,Tt,"f").removeListener("connected",r)}}while(t);throw new Error(`No channel found for channelName: ${e}.`)}async connect(e,t={}){if(await Gt(this,$t,"f").getValue(),!e||"string"!=typeof e)throw new Error("Please provide a channelName string to connect to a channel.");const n={wait:!0,...this.wire.environment.getDefaultChannelOptions().connect,...t},{offer:i,rtc:r}=await Gt(this,Lt,"f").createClientOffer(n);let o;(this.fin.me.isFrame||this.fin.me.isView||this.fin.me.isWindow)&&(o=(await this.fin.me.getInfo()).url);const s={channelName:e,...n,offer:i,connectionUrl:o},a=await this.safeConnect(e,n.wait,s),c=await Gt(this,Lt,"f").createClientStrategy(r,a),d=new Dt.ChannelClient(a,(()=>Dt.ChannelClient.wireClose(this.wire,a,a.endpointId)),c);return c.onEndpointDisconnect(a.channelId,(async()=>{try{await d.sendDisconnectAction()}catch(e){console.warn(`Something went wrong during disconnect for client with uuid: ${a.uuid} / name: ${a.name} / endpointId: ${a.endpointId}.`)}finally{Dt.ChannelClient.handleProviderDisconnect(a)}})),d}async create(e,t){if(!e)throw new Error("Please provide a channelName to create a channel");const{payload:{data:n}}=await this.wire.sendAction("create-channel",{channelName:e}),i=Gt(this,Lt,"f").createProvider(t,n);return this.on("client-disconnected",(t=>{t.channelName===e&&Vt.ChannelProvider.handleClientDisconnection(i,t)})),i}}le.Channel=Kt,Lt=new WeakMap,Tt=new WeakMap,$t=new WeakMap,Object.defineProperty(de,"__esModule",{value:!0}),de.InterAppPayload=de.InterApplicationBus=void 0;const qt=t,Jt=d,Yt=he,Zt=le,Qt=O;class Xt extends Jt.Base{constructor(e){super(e),this.events={subscriberAdded:"subscriber-added",subscriberRemoved:"subscriber-removed"},this.refCounter=new Yt.RefCounter,this.Channel=new Zt.Channel(e),this.emitter=new qt.EventEmitter,e.registerMessageHandler(this.onmessage.bind(this)),this.on=this.emitter.on.bind(this.emitter),this.removeAllListeners=this.emitter.removeAllListeners.bind(this.emitter)}async publish(e,t){await this.wire.sendAction("publish-message",{topic:e,message:t,sourceWindowName:this.me.name})}async send(e,t,n){const i=(0,Qt.validateIdentity)(e);if(i)throw new Error(i);await this.wire.sendAction("send-message",{destinationUuid:e.uuid,destinationWindowName:e.name,topic:t,message:n,sourceWindowName:this.me.name})}subscribe(e,t,n){const i=this.createSubscriptionKey(e.uuid,e.name||"*",t);return this.emitter.on(i,n),this.refCounter.actOnFirst(i,(async()=>{await this.wire.sendAction("subscribe",{sourceUuid:e.uuid,sourceWindowName:e.name||"*",topic:t,destinationWindowName:this.me.name})}),(()=>Promise.resolve()))}unsubscribe(e,t,n){const i=e.name||"*",r=this.createSubscriptionKey(e.uuid,i,t);return this.emitter.removeListener(r,n),this.refCounter.actOnLast(r,(async()=>{await this.wire.sendAction("unsubscribe",{sourceUuid:e.uuid,sourceWindowName:i,topic:t,destinationWindowName:this.me.name})}),(()=>new Promise((e=>e)).then((()=>{}))))}processMessage(e){const{payload:{message:t,sourceWindowName:n,sourceUuid:i,topic:r}}=e,o=[this.createSubscriptionKey(i,n,r),this.createSubscriptionKey(i,"*",r),this.createSubscriptionKey("*","*",r)],s={uuid:i,name:n};o.forEach((e=>{this.emitter.emit(e,t,s)}))}emitSubscriverEvent(e,t){const{payload:{targetName:n,uuid:i,topic:r}}=t,o={name:n,uuid:i,topic:r};this.emitter.emit(e,o)}createSubscriptionKey(e,t,n){const i=t||"*";if(!(e&&i&&n))throw new Error("Missing uuid, name, or topic string");return function(...e){return e.map((e=>Buffer.from(`${e}`).toString("base64"))).join("/")}(e,i,n)}onmessage(e){const{action:t}=e;switch(t){case"process-message":this.processMessage(e);break;case this.events.subscriberAdded:this.emitSubscriverEvent(this.events.subscriberAdded,e);break;case this.events.subscriberRemoved:this.emitSubscriverEvent(this.events.subscriberRemoved,e)}return!0}}de.InterApplicationBus=Xt;de.InterAppPayload=class{};var en={};Object.defineProperty(en,"__esModule",{value:!0}),en.Clipboard=void 0;const tn=d;class nn extends tn.Base{async writeText(e){await this.wire.sendAction("clipboard-write-text",e)}async readText(e){const{payload:t}=await this.wire.sendAction("clipboard-read-text",{type:e});return t.data}async writeImage(e){await this.wire.sendAction("clipboard-write-image",e)}async readImage(e={format:"dataURL"}){const{payload:t}=await this.wire.sendAction("clipboard-read-image",e);return t.data}async writeHtml(e){await this.wire.sendAction("clipboard-write-html",e)}async readHtml(e){const{payload:t}=await this.wire.sendAction("clipboard-read-html",{type:e});return t.data}async writeRtf(e){await this.wire.sendAction("clipboard-write-rtf",e)}async readRtf(e){const{payload:t}=await this.wire.sendAction("clipboard-read-rtf",{type:e});return t.data}async write(e){await this.wire.sendAction("clipboard-write",e)}async getAvailableFormats(e){const{payload:t}=await this.wire.sendAction("clipboard-read-formats",{type:e});return t.data}}en.Clipboard=nn;var rn={},on={},sn={};Object.defineProperty(sn,"__esModule",{value:!0}),sn.ExternalApplication=void 0;const an=d;class cn extends an.EmitterBase{constructor(e,t){super(e,"external-application",t.uuid),this.identity=t}getInfo(){return this.wire.sendAction("get-external-application-info",this.identity).then((({payload:e})=>e.data))}}sn.ExternalApplication=cn,Object.defineProperty(on,"__esModule",{value:!0}),on.ExternalApplicationModule=void 0;const dn=d,hn=sn;class ln extends dn.Base{wrap(e){return this.wire.sendAction("external-application-wrap").catch((e=>{})),Promise.resolve(new hn.ExternalApplication(this.wire,{uuid:e}))}wrapSync(e){return this.wire.sendAction("external-application-wrap-sync").catch((e=>{})),new hn.ExternalApplication(this.wire,{uuid:e})}}on.ExternalApplicationModule=ln,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(on,e),n(sn,e)}(rn);var un={},pn={},wn={};Object.defineProperty(wn,"__esModule",{value:!0}),wn._Frame=void 0;const yn=d;class fn extends yn.EmitterBase{constructor(e,t){super(e,"frame",t.uuid,t.name),this.identity=t}getInfo(){return this.wire.sendAction("get-frame-info",this.identity).then((({payload:e})=>e.data))}getParentWindow(){return this.wire.sendAction("get-parent-window",this.identity).then((({payload:e})=>e.data))}}wn._Frame=fn,Object.defineProperty(pn,"__esModule",{value:!0}),pn._FrameModule=void 0;const gn=d,mn=O,vn=wn;class Cn extends gn.Base{async wrap(e){this.wire.sendAction("frame-wrap").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}wrapSync(e){this.wire.sendAction("frame-wrap-sync").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}getCurrent(){return this.wire.sendAction("frame-get-current").catch((e=>{})),Promise.resolve(new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity()))}getCurrentSync(){return this.wire.sendAction("frame-get-current-sync").catch((e=>{})),new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity())}}pn._FrameModule=Cn,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(pn,e),n(wn,e)}(un);var bn={};Object.defineProperty(bn,"__esModule",{value:!0}),bn.GlobalHotkey=void 0;const In=d;class En extends In.EmitterBase{constructor(e){super(e,"global-hotkey")}async register(e,t){await this.on(e,t),await this.wire.sendAction("global-hotkey-register",{hotkey:e})}async unregister(e){await this.removeAllListeners(e),await this.wire.sendAction("global-hotkey-unregister",{hotkey:e})}async unregisterAll(){await Promise.all(this.eventNames().filter((e=>!("registered"===e||"unregistered"===e))).map((e=>this.removeAllListeners(e)))),await this.wire.sendAction("global-hotkey-unregister-all",{})}async isRegistered(e){const{payload:{data:t}}=await this.wire.sendAction("global-hotkey-is-registered",{hotkey:e});return t}}bn.GlobalHotkey=En;var xn,An={},Pn={},Mn={},_n=s&&s.__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)};Object.defineProperty(Mn,"__esModule",{value:!0}),Mn.Platform=void 0;const On=d,Sn=O,Rn=new Map;class Fn extends On.EmitterBase{constructor(e,t){super(t.wire,"application",e.uuid),this.getClient=e=>{this.wire.sendAction("platform-get-client",this.identity).catch((e=>{}));const t=e||this.identity,{uuid:n}=t;if(!Rn.has(n)){const e=_n(this,xn,"f").call(this,n);Rn.set(n,e)}return Rn.get(n)},xn.set(this,(async e=>{try{const t=`custom-frame-${e}`,n=await this._channel.connect(t,{wait:!1});return n.onDisconnection((()=>{Rn.delete(e)})),n}catch(t){throw Rn.delete(e),new Error("The targeted Platform is not currently running. Listen for application-started event for the given Uuid.")}})),this.launchLegacyManifest=this.launchContentManifest;const n=(0,Sn.validateIdentity)(e);if(n)throw new Error(n);this._channel=t,this.identity={uuid:e.uuid},this.Layout=this.fin.Platform.Layout,this.Application=this.fin.Application.wrapSync(this.identity)}async createView(e,t,n){this.wire.sendAction("platform-create-view",this.identity).catch((e=>{}));const i=await this.getClient(),r=await i.dispatch("create-view",{target:t,opts:e,targetView:n});if(!r||(0,Sn.validateIdentity)(r.identity))throw new Error(`When overwriting the createView call, please return an object that has a valid 'identity' property: ${JSON.stringify(r)}`);return this.fin.View.wrapSync(r.identity)}async createWindow(e){this.wire.sendAction("platform-create-window",this.identity).catch((e=>{}));const t=await this.getClient();e.reason||(e.reason="api-call");const n=await t.dispatch("create-view-container",e);if(!n||(0,Sn.validateIdentity)(n.identity))throw new Error(`When overwriting the createWindow call, please return an object that has a valid 'identity' property: ${JSON.stringify(n)}`);const{identity:i}=n,r=this.fin.Window.wrapSync(i);return r.name=i.name,r.uuid=i.uuid,r}async quit(){this.wire.sendAction("platform-quit",this.identity).catch((e=>{}));return(await this.getClient()).dispatch("quit")}async closeView(e){this.wire.sendAction("platform-close-view",this.identity).catch((e=>{}));const t=await this.getClient();await t.dispatch("close-view",{view:e})}async reparentView(e,t){console.warn("Platform.reparentView has been deprecated, please use Platform.createView"),this.wire.sendAction("platform-reparent-view",this.identity).catch((e=>{}));const n={...e,uuid:e.uuid??this.identity.uuid},i=await this.fin.View.wrap(n),r=await i.getOptions();return this.createView(r,t)}async getSnapshot(){this.wire.sendAction("platform-get-snapshot",this.identity).catch((e=>{}));return(await this.getClient()).dispatch("get-snapshot")}async getViewSnapshot(e){return(await this.getClient()).dispatch("get-view-snapshot",{viewIdentity:e})}async applySnapshot(e,t){this.wire.sendAction("platform-apply-snapshot",this.identity).catch((e=>{}));const n="Requested snapshot must be a valid Snapshot object, or a url or filepath to such an object.";let i;if("string"==typeof e)try{i=(await this._channel.wire.sendAction("get-application-manifest",{manifestUrl:e})).payload.data}catch(e){throw new Error(`${n}: ${e}`)}else i=e;if(!i.windows)throw new Error(n);const r=await this.getClient();return await r.dispatch("apply-snapshot",{snapshot:i,options:t}),this}async fetchManifest(e){return(await this.getClient()).dispatch("platform-fetch-manifest",{manifestUrl:e})}async launchContentManifest(e){this.wire.sendAction("platform-launch-content-manifest",this.identity).catch((()=>{}));const t=await this.getClient(),n=await this.fetchManifest(e);return t.dispatch("launch-into-platform",{manifest:n,manifestUrl:e}),this}async setWindowContext(e={},t){if(this.wire.sendAction("platform-set-window-context",this.identity).catch((e=>{})),!e)throw new Error("Please provide a serializable object or string to set the context.");const n=await this.getClient(),{entityType:i}=t?await this.fin.System.getEntityInfo(t.uuid,t.name):this.fin.me;await n.dispatch("set-window-context",{context:e,entityType:i,target:t||{uuid:this.fin.me.uuid,name:this.fin.me.name}})}async getWindowContext(e){this.wire.sendAction("platform-get-window-context",this.identity).catch((e=>{}));const t=await this.getClient(),{entityType:n}=e?await this.fin.System.getEntityInfo(e.uuid,e.name):this.fin.me;return t.dispatch("get-window-context",{target:e||{uuid:this.fin.me.uuid,name:this.fin.me.name},entityType:n})}async closeWindow(e,t={skipBeforeUnload:!1}){this.wire.sendAction("platform-close-window",this.identity).catch((e=>{}));return(await this.getClient()).dispatch("close-window",{windowId:e,options:t})}}Mn.Platform=Fn,xn=new WeakMap;var jn={},kn={},Ln={},Tn={};function $n(e){switch(e){case"columns":case"grid":case"rows":case"tabs":return!0;default:return!1}}Object.defineProperty(Tn,"__esModule",{value:!0}),Tn.overrideFromComposables=Tn.isValidPresetType=void 0,Tn.isValidPresetType=$n,Tn.overrideFromComposables=function(...e){return t=>e.reduceRight(((e,t)=>n=>t(e(n))),(e=>e))(t)},Tn.default={isValidPresetType:$n};var Bn={},Gn={},Wn={};Object.defineProperty(Wn,"__esModule",{value:!0}),Wn.ApiConsumer=void 0;Wn.ApiConsumer=class{constructor(e){this.strategy=e,this.consume=async e=>(await this.strategy.getExposedFunctions(e)).reduce(((t,n)=>({...t,[n.key]:this.strategy.createFunction(n,e)})),{})}};var Hn={},Nn={};Object.defineProperty(Nn,"__esModule",{value:!0}),Nn.expose=Nn.getExposedProperties=void 0;const Dn=Symbol("exposedProperties");Nn.getExposedProperties=e=>e[Dn]||e.prototype[Dn]||[];Nn.expose=e=>(t,n,i)=>{t[Dn]=t[Dn]||[],t[Dn].push({key:n,descriptor:i,options:e})},Object.defineProperty(Hn,"__esModule",{value:!0}),Hn.ApiExposer=void 0;const Un=Nn;Hn.ApiExposer=class{constructor(e){this.strategy=e,this.exposeInstance=async(e,t)=>{const n=(0,Un.getExposedProperties)(e),i=await Promise.all(n.map((async({key:n,options:i})=>({key:n,options:await this.strategy.exposeFunction(e[n].bind(e),{key:n,options:i,meta:t})}))));await this.strategy.exposeMeta(t,i)}}};var Vn={},zn={},Kn={};Object.defineProperty(Kn,"__esModule",{value:!0}),Kn.ChannelsConsumer=void 0;Kn.ChannelsConsumer=class{constructor(e){this.channel=e,this.getExposedFunctions=async e=>{const{id:t}=e,{props:n}=await this.channel.dispatch(`api-meta:${t}`);return n},this.createFunction=e=>(...t)=>{const{action:n}=e.options;return this.channel.dispatch(n,{args:t})}}};var qn={};Object.defineProperty(qn,"__esModule",{value:!0}),qn.ChannelsExposer=void 0;qn.ChannelsExposer=class{constructor(e){this.channelProviderOrClient=e,this.exposeFunction=async(e,t)=>{const{key:n,options:i,meta:r}=t,{id:o}=r,s=`${o}.${i?.action||n}`;return await this.channelProviderOrClient.register(s,(async({args:t})=>e(...t))),{action:s}},this.exposeMeta=async({id:e},t)=>{const n=`api-meta:${e}`;await this.channelProviderOrClient.register(n,(()=>({props:t})))}}},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Kn,e),n(qn,e)}(zn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(zn,e)}(Vn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Wn,e),n(Hn,e),n(Vn,e),n(Nn,e)}(Gn);var Jn={};Object.defineProperty(Jn,"__esModule",{value:!0}),Jn.createRelayedDispatch=exports.relayChannelClientApi_1=Jn.relayChannelClientApi=void 0;const Yn=["no longer connected","RTCDataChannel closed unexpectedly","The client you are trying to dispatch from is disconnected from the target provider"];exports.relayChannelClientApi_1=Jn.relayChannelClientApi=async(e,t)=>{e.register(`relay:${t}`,(({action:t,target:n,payload:i})=>e.dispatch(n,t,i))),await Promise.resolve()};Jn.createRelayedDispatch=(e,t,n,i)=>async(r,o)=>{try{return await e.dispatch(`relay:${n}`,{action:r,payload:o,target:t})}catch(e){if(s=e.message,Yn.some((e=>s.includes(e)))&&i)throw new Error(i);throw e}var s};var Zn,Qn,Xn,ei=s&&s.__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},ti=s&&s.__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)};Object.defineProperty(Bn,"__esModule",{value:!0}),Bn.ColumnOrRow=Bn.TabStack=Bn.LayoutNode=void 0;const ni=Gn,ii=Jn;class ri{constructor(e,t){Zn.set(this,void 0),this.isRoot=()=>ti(this,Zn,"f").isRoot(this.entityId),this.exists=()=>ti(this,Zn,"f").exists(this.entityId),this.getParent=async()=>{const e=await ti(this,Zn,"f").getParent(this.entityId);if(e)return ri.getEntity(e,ti(this,Zn,"f"))},this.createAdjacentStack=async(e,t)=>{const n=await ti(this,Zn,"f").createAdjacentStack(this.entityId,e,t);return ri.getEntity({entityId:n,type:"stack"},ti(this,Zn,"f"))},this.getAdjacentStacks=async e=>(await ti(this,Zn,"f").getAdjacentStacks({targetId:this.entityId,edge:e})).map((e=>ri.getEntity({type:"stack",entityId:e.entityId},ti(this,Zn,"f")))),ei(this,Zn,e,"f"),this.entityId=t}}Bn.LayoutNode=ri,Zn=new WeakMap,ri.newLayoutEntitiesClient=async(e,t,n)=>{const i=(0,ii.createRelayedDispatch)(e,n,"layout-relay","You are trying to interact with a layout component on a window that does not exist or has been destroyed.");return new ni.ApiConsumer(new ni.ChannelsConsumer({dispatch:i})).consume({id:t})},ri.getEntity=(e,t)=>{const{entityId:n,type:i}=e;switch(i){case"column":case"row":return new si(t,n,i);case"stack":return new oi(t,n);default:throw new Error(`Unrecognised Layout Entity encountered ('${JSON.stringify(e)})`)}};class oi extends ri{constructor(e,t){super(e,t),Qn.set(this,void 0),this.type="stack",this.getViews=()=>ti(this,Qn,"f").getStackViews(this.entityId),this.addView=async(e,t={index:0})=>ti(this,Qn,"f").addViewToStack(this.entityId,e,t),this.removeView=async e=>{await ti(this,Qn,"f").removeViewFromStack(this.entityId,e)},this.setActiveView=async e=>{await ti(this,Qn,"f").setStackActiveView(this.entityId,e)},ei(this,Qn,e,"f")}}Bn.TabStack=oi,Qn=new WeakMap;class si extends ri{constructor(e,t,n){super(e,t),Xn.set(this,void 0),this.getContent=async()=>(await ti(this,Xn,"f").getContent(this.entityId)).map((e=>ri.getEntity(e,ti(this,Xn,"f")))),ei(this,Xn,e,"f"),this.type=n}}Bn.ColumnOrRow=si,Xn=new WeakMap;var ai={};Object.defineProperty(ai,"__esModule",{value:!0}),ai.DEFAULT_LAYOUT_KEY=ai.LAYOUT_CONTROLLER_ID=void 0,ai.LAYOUT_CONTROLLER_ID="layout-entities",ai.DEFAULT_LAYOUT_KEY="__default__";var ci,di,hi,li=s&&s.__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)};Object.defineProperty(Ln,"__esModule",{value:!0}),Ln.Layout=void 0;const ui=G,pi=O,wi=d,yi=Tn,fi=Bn,gi=ai;class mi extends wi.Base{static getClient(e){return li(e,di,"f").getValue()}constructor(e,t){super(t),ci.add(this),di.set(this,new ui.Lazy((async()=>fi.LayoutNode.newLayoutEntitiesClient(await this.platform.getClient(),gi.LAYOUT_CONTROLLER_ID,this.identity)))),this.replace=async e=>{this.wire.sendAction("layout-replace").catch((e=>{}));const t=await this.platform.getClient();await t.dispatch("replace-layout",{target:this.identity,opts:{layout:e}})},this.replaceView=async(e,t)=>{this.wire.sendAction("layout-replace-view").catch((e=>{}));const n=await this.platform.getClient();await n.dispatch("replace-view",{target:this.identity,opts:{viewToReplace:e,newView:t}})},this.applyPreset=async e=>{this.wire.sendAction("layout-apply-preset").catch((e=>{}));const t=await this.platform.getClient(),{presetType:n}=e;if(!n||!(0,yi.isValidPresetType)(n))throw new Error("Cannot apply preset layout, please include an applicable presetType property in the PresetLayoutOptions.");await t.dispatch("apply-preset-layout",{target:this.identity,opts:{presetType:n}})};const n=(0,pi.validateIdentity)(e);if(n)throw new Error(n);this.identity=e,this.platform=this.fin.Platform.wrapSync({uuid:e.uuid}),e.uuid===this.fin.me.uuid&&e.name===this.fin.me.name&&(this.init=this.fin.Platform.Layout.init)}async getConfig(){this.wire.sendAction("layout-get-config").catch((e=>{}));return(await this.platform.getClient()).dispatch("get-frame-snapshot",{target:this.identity})}async getCurrentViews(){this.wire.sendAction("layout-get-views").catch((e=>{}));const e=await this.platform.getClient();return(await e.dispatch("get-layout-views",{target:this.identity})).map((e=>this.fin.View.wrapSync(e)))}async getRootItem(){this.wire.sendAction("layout-get-root-item").catch((()=>{}));const e=await li(this,di,"f").getValue(),t=await e.getRoot("layoutName"in this.identity?this.identity:void 0);return fi.LayoutNode.getEntity(t,e)}async getStackByViewIdentity(e){this.wire.sendAction("layout-get-stack-by-view").catch((()=>{}));const t=await li(this,di,"f").getValue(),n=await t.getStackByView(e);if(!n)throw new Error(`No stack found for view: ${e.uuid}/${e.name}`);return fi.LayoutNode.getEntity(n,t)}async addView(e,{location:t,targetView:n}={}){this.wire.sendAction("layout-add-view").catch((e=>{}));const{identity:i}=await li(this,ci,"m",hi).call(this,"layout-add-view",{viewOptions:e,location:t,targetView:n});return{identity:i}}async closeView(e){this.wire.sendAction("layout-close-view").catch((e=>{})),await li(this,ci,"m",hi).call(this,"layout-close-view",{viewIdentity:e})}}Ln.Layout=mi,di=new WeakMap,ci=new WeakSet,hi=async function(e,t){return(await this.platform.getClient()).dispatch(e,{target:this.identity,opts:t})};var vi,Ci,bi,Ii,Ei,xi=s&&s.__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)},Ai=s&&s.__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};Object.defineProperty(kn,"__esModule",{value:!0}),kn.LayoutModule=void 0;const Pi=d,Mi=Ln,_i=ai;class Oi extends Pi.Base{constructor(){super(...arguments),vi.add(this),Ci.set(this,!1),bi.set(this,null),this.init=async(e={})=>{if(this.wire.sendAction("layout-init").catch((e=>{})),!this.wire.environment.layoutAllowedInContext(this.fin))throw new Error("Layout.init can only be called from a Window context.");if(xi(this,Ci,"f"))throw new Error("Layout.init was already called, please use Layout.create to add additional layouts.");"openfin"===this.wire.environment.type&&await this.fin.Platform.getCurrentSync().getClient(),Ai(this,Ci,!0,"f"),Ai(this,bi,await this.wire.environment.initLayoutManager(this.fin,this.wire,e),"f"),await this.wire.environment.applyLayoutSnapshot(this.fin,xi(this,bi,"f"),e);const t={name:this.fin.me.name,uuid:this.fin.me.uuid};if(!e.layoutManagerOverride){const e={layoutName:_i.DEFAULT_LAYOUT_KEY,...t};return xi(this,Ii,"f").call(this,e)}return this.wrapSync(t)},Ii.set(this,(e=>{const t="[Layout] You are using a deprecated property `layoutManager` - it will throw if you access it starting in v37.",n=new Proxy({},{get(e,n){throw console.warn(`[Layout-mgr-proxy] accessing ${n.toString()}`),new Error(t)}}),i=Object.assign(this.wrapSync(e),{layoutManager:n});return new Proxy(i,{get(e,n){if("layoutManager"===n)throw console.warn(`[Layout-proxy] accessing ${n.toString()}`),new Error(t);return e[n]}})})),this.getCurrentLayoutManagerSync=()=>xi(this,vi,"m",Ei).call(this,"fin.Platform.Layout.getCurrentLayoutManagerSync()"),this.create=async e=>this.wire.environment.createLayout(xi(this,vi,"m",Ei).call(this,"fin.Platform.Layout.create()"),e),this.destroy=async e=>this.wire.environment.destroyLayout(xi(this,vi,"m",Ei).call(this,"fin.Platform.Layout.destroy()"),e)}async wrap(e){return this.wire.sendAction("layout-wrap").catch((e=>{})),new Mi.Layout(e,this.wire)}wrapSync(e){return this.wire.sendAction("layout-wrap-sync").catch((e=>{})),new Mi.Layout(e,this.wire)}async getCurrent(){if(this.wire.sendAction("layout-get-current").catch((e=>{})),"openfin"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error("You are not in a Window context. Only Windows can have a Layout.");const{uuid:e,name:t}=this.fin.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction("layout-get-current-sync").catch((e=>{})),"openfin"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error("You are not in a Window context. Only Windows can have a Layout.");const{uuid:e,name:t}=this.fin.me;return this.wrapSync({uuid:e,name:t})}async getLayoutByViewIdentity(e){this.wire.sendAction("layout-get-by-view-identity").catch((()=>{}));let t=await this.wire.environment.getViewWindowIdentity(this.fin,e);t.identity&&(t=t.identity);try{const n=this.wrapSync(t),i=await Mi.Layout.getClient(n),r=await i.getLayoutIdentityForViewOrThrow(e);return this.wrapSync(r)}catch(n){if(!["No action registered at target for","getLayoutIdentityForViewOrThrow is not a function"].some((e=>n.message.includes(e))))throw n;if(t.uuid===t.name)throw new Error(`View identity ${JSON.stringify(e)} is not attached to any layout in provider window ${JSON.stringify(t)}.`);return this.wrapSync(t)}}}kn.LayoutModule=Oi,Ci=new WeakMap,bi=new WeakMap,Ii=new WeakMap,vi=new WeakSet,Ei=function(e){if(!xi(this,bi,"f"))throw new Error(`You must call init before using the API ${e}`);return xi(this,bi,"f")},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(kn,e),n(Ln,e)}(jn),Object.defineProperty(Pn,"__esModule",{value:!0}),Pn.PlatformModule=void 0;const Si=d,Ri=Mn,Fi=jn;class ji extends Si.Base{constructor(e,t){super(e),this._channel=t,this.Layout=new Fi.LayoutModule(this.wire)}async init(e){if(!fin.__internal_.isPlatform||fin.me.name!==fin.me.uuid)throw new Error("fin.Platform.init should only be called from a custom platform provider running in the main window of the application.");return this.wire.environment.initPlatform(this.fin,e)}async wrap(e){return this.wire.sendAction("platform-wrap").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}wrapSync(e){return this.wire.sendAction("platform-wrap-sync").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}async getCurrent(){return this.wire.sendAction("platform-get-current").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction("platform-get-current-sync").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}start(e){return this.wire.sendAction("platform-start").catch((e=>{})),new Promise((async(t,n)=>{try{const{uuid:n}=e,i=await this.fin.Application._create({...e,isPlatformController:!0});i.once("platform-api-ready",(()=>t(this.wrapSync({uuid:n})))),i._run({uuid:n})}catch(e){n(e)}}))}startFromManifest(e,t){return this.wire.sendAction("platform-start-from-manifest").catch((e=>{})),new Promise((async(n,i)=>{try{const i=await this.fin.Application._createFromManifest(e);i.once("platform-api-ready",(()=>n(this.wrapSync({uuid:i.identity.uuid})))),i._run(t)}catch(e){i(e)}}))}}Pn.PlatformModule=ji,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Pn,e),n(Mn,e)}(An);var ki={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getMe=e.getBaseMe=e.environmentUnsupportedMessage=void 0;const t=J(),n=un,i=ie(),r=rn;function o(e,t,n){return{...{isView:"view"===e,isWindow:"window"===e,isFrame:"iframe"===e,isExternal:"external connection"===e},uuid:t,name:n,entityType:e}}e.environmentUnsupportedMessage="You are not running in OpenFin.",e.getBaseMe=o,e.getMe=function(s){const{uuid:a,name:c,entityType:d}=s.me,h={setContext(){throw new Error(e.environmentUnsupportedMessage)},addContextHandler(){throw new Error(e.environmentUnsupportedMessage)},getContextGroups(){throw new Error(e.environmentUnsupportedMessage)},joinContextGroup(){throw new Error(e.environmentUnsupportedMessage)},removeFromContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getAllClientsInContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getInfoForContextGroup(){throw new Error(e.environmentUnsupportedMessage)}},l="Interop API has not been instantiated. Either connection has failed or you have not declared interop in your config.",u={setContext(){throw new Error(l)},addContextHandler(){throw new Error(l)},getContextGroups(){throw new Error(l)},joinContextGroup(){throw new Error(l)},removeFromContextGroup(){throw new Error(l)},getAllClientsInContextGroup(){throw new Error(l)},getInfoForContextGroup(){throw new Error(l)}},p={eventNames:()=>{throw new Error(e.environmentUnsupportedMessage)},emit:()=>{throw new Error(e.environmentUnsupportedMessage)},listeners:()=>{throw new Error(e.environmentUnsupportedMessage)},listenerCount:()=>{throw new Error(e.environmentUnsupportedMessage)},on:()=>{throw new Error(e.environmentUnsupportedMessage)},addListener:()=>{throw new Error(e.environmentUnsupportedMessage)},once:()=>{throw new Error(e.environmentUnsupportedMessage)},prependListener:()=>{throw new Error(e.environmentUnsupportedMessage)},prependOnceListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeAllListeners:()=>{throw new Error(e.environmentUnsupportedMessage)}};switch(d){case"view":return Object.assign(new t.View(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case"window":return Object.assign(new i._Window(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case"iframe":return Object.assign(new n._Frame(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case"external connection":return Object.assign(new r.ExternalApplication(s,{uuid:a}),o(d,a,c),{interop:u,isOpenFin:!1});default:return{...o(d,a,c),...p,interop:h,isOpenFin:!1}}}}(ki);var Li={},Ti={},$i={};Object.defineProperty($i,"__esModule",{value:!0}),$i.createWarningObject=$i.createUnusableObject=void 0,$i.createUnusableObject=function(e){const t=()=>{throw new Error(e)};return new Proxy({},{apply:t,construct:t,defineProperty:t,deleteProperty:t,get:t,getOwnPropertyDescriptor:t,getPrototypeOf:t,has:t,isExtensible:t,ownKeys:t,preventExtensions:t,set:t,setPrototypeOf:t})},$i.createWarningObject=function(e,t){return new Proxy(t,{get:(...t)=>(console.warn(e),Reflect.get(...t)),set:(...t)=>(console.warn(e),Reflect.set(...t)),getOwnPropertyDescriptor:(...t)=>(console.warn(e),Reflect.getOwnPropertyDescriptor(...t)),ownKeys:(...t)=>(console.warn(e),Reflect.ownKeys(...t))})};var Bi,Gi={},Wi={};var Hi={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.wrapIntentHandler=e.BROKER_ERRORS=e.generateOverrideWarning=e.generateOverrideError=e.wrapContextHandler=e.wrapInTryCatch=e.generateId=void 0;e.generateId=()=>`${Math.random()}${Date.now()}`;e.wrapInTryCatch=(e,t)=>(...n)=>{try{return e(...n)}catch(e){throw new Error((t||"")+e)}};e.wrapContextHandler=(e,t)=>async n=>{try{await e(n)}catch(e){throw console.error(`Error thrown by handler ${t} for context type ${n.type}: ${e}`),e}};e.generateOverrideError=(e,t)=>`You have tried to to use ${e} but ${t} has not been overridden in the Interop Broker. Please override this function. Refer to our documentation for more info.`;e.generateOverrideWarning=(e,t,n,i)=>{const{uuid:r,name:o}=n;return i?`Entity with identity: ${r}/${o} has called ${i} or ${e} but ${t} has not been overridden.`:`Entity with identity: ${r}/${o} has called ${e} but ${t} has not been overridden.`},e.BROKER_ERRORS={fireIntent:(0,e.generateOverrideError)("fireIntent","handleFiredIntent"),fireIntentForContext:(0,e.generateOverrideError)("fireIntentForContext","handleFiredIntentForContext"),getInfoForIntent:(0,e.generateOverrideError)("getInfoForIntent","handleInfoForIntent"),getInfoForIntentsByContext:(0,e.generateOverrideError)("getInfoForIntentsByContext","handleInfoForIntentsByContext"),joinSessionContextGroupWithJoinContextGroup:"The Context Group you have tried to join is a Session Context Group. Custom Context Groups can only be defined by the Interop Broker through code or manifest configuration. Please use joinSessionContextGroup.",fdc3Open:(0,e.generateOverrideError)("fdc3.open","fdc3HandleOpen"),fdc3FindInstances:(0,e.generateOverrideError)("fdc3.findInstances","fdc3HandleFindInstances"),fdc3GetAppMetadata:(0,e.generateOverrideError)("fdc3.getAppMetadata","fdc3HandleGetAppMetadata"),fdc3GetInfo:(0,e.generateOverrideError)("fdc3.getInfo","fdc3HandleGetInfo")};e.wrapIntentHandler=(e,t)=>async n=>{try{return e(n)}catch(e){throw console.error(`Error thrown by handler ${t}: ${e}`),e}}}(Hi);var Ni,Di,Ui={};function Vi(){if(Di)return Gi;Di=1;var e,t,n,r=s&&s.__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},o=s&&s.__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)},a=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Gi,"__esModule",{value:!0}),Gi.InteropBroker=void 0;const c=d,h=a(function(){if(Bi)return Wi;Bi=1,Object.defineProperty(Wi,"__esModule",{value:!0});const e=Cr();return Wi.default=class{constructor(e,t){this.provider=e,this.id=t,this.lastContext=void 0,this.contextGroupMap=new Map,this.clients=new Map,this.registerListeners()}registerListeners(){this.provider.register(`sessionContextGroup:getContext-${this.id}`,this.getCurrentContext.bind(this)),this.provider.register(`sessionContextGroup:setContext-${this.id}`,this.setContext.bind(this)),this.provider.register(`sessionContextGroup:handlerAdded-${this.id}`,this.handlerAdded.bind(this)),this.provider.register(`sessionContextGroup:handlerRemoved-${this.id}`,this.handlerRemoved.bind(this))}getCurrentContext(e){return e.type?this.contextGroupMap.get(e.type):this.lastContext}setContext(t,n){const{context:i}=t,r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name} not in Session Client State Map`);this.contextGroupMap.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{e.contextHandlers.get(i.type)?.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getClientState(e){return this.clients.get(e.endpointId)}async handlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(i){const e=r.contextHandlers.get(i)||[];r.contextHandlers.set(i,[...e,n]);const o=this.contextGroupMap.get(i);o&&await this.provider.dispatch(t,n,o)}else{r.globalHandler=n;const e=[...this.contextGroupMap.keys()].map((async e=>{const i=this.contextGroupMap.get(e);i&&await this.provider.dispatch(t,n,i)}));await Promise.all(e)}}handlerRemoved(e,t){const{handlerId:n}=e,i=this.clients.get(t.endpointId);i?(Array.from(i.contextHandlers).forEach((([,e])=>{const t=e.indexOf(n);t>-1&&e.splice(t,1)})),i.globalHandler===n&&(i.globalHandler=void 0)):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={contextHandlers:new Map,clientIdentity:e,globalHandler:void 0};this.clients.set(e.endpointId,t)}}onDisconnection(e){this.clients.delete(e.endpointId)}},Wi}()),l=Hi,u=a(i),p=function(){if(Ni)return Ui;Ni=1,Object.defineProperty(Ui,"__esModule",{value:!0}),Ui.PrivateChannelProvider=void 0;const e=Vi();return Ui.PrivateChannelProvider=class t{constructor(e,t){this.provider=e,this.id=t,this.clients=new Map,this.registerListeners(),this.contextByContextType=new Map,this.lastContext=void 0,this.provider.onConnection((e=>this.registerNewClient(e))),this.provider.onDisconnection((async e=>{const{endpointId:t}=e;this.clients.has(t)&&await this.handleClientDisconnecting(e),0===(await this.provider.getAllClientInfo()).length&&this.provider.destroy()}))}getClientState(e){return this.clients.get(e.endpointId)}registerListeners(){this.provider.register("broadcast",this.broadcast.bind(this)),this.provider.register("getCurrentContext",this.getCurrentContext.bind(this)),this.provider.register("contextHandlerAdded",this.contextHandlerAdded.bind(this)),this.provider.register("contextHandlerRemoved",this.contextHandlerRemoved.bind(this)),this.provider.register("nonStandardHandlerRemoved",this.nonStandardHandlerRemoved.bind(this)),this.provider.register("onAddContextHandlerAdded",this.onAddContextHandlerAdded.bind(this)),this.provider.register("onDisconnectHandlerAdded",this.onDisconnectHandlerAdded.bind(this)),this.provider.register("onUnsubscribeHandlerAdded",this.onUnsubscribeHandlerAdded.bind(this)),this.provider.register("clientDisconnecting",((e,t)=>{this.handleClientDisconnecting(t)}))}broadcast(t,n){const{context:i}=t;if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name}, tried to call broadcast, is not connected to this Private Channel`);const r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to broadcast - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);this.contextByContextType.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{const t=e.handlerIdsByContextTypes.get(i.type);t&&t.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getCurrentContext(e,t){const{contextType:n}=e;if(!this.getClientState(t))throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call getCurrentContext, is not connected to this Private Channel`);if(void 0!==n){return this.contextByContextType.get(n)||null}return this.lastContext?this.lastContext:null}contextHandlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call addContextListener, is not connected to this Private Channel`);if(i){const e=r.handlerIdsByContextTypes.get(i)||[];r.handlerIdsByContextTypes.set(i,[...e,n])}else r.globalHandler=n;Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&e.onAddContextListenerHandlerId&&this.provider.dispatch(e.clientIdentity,e.onAddContextListenerHandlerId,i)}))}async contextHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);if(i){let e;if(i.globalHandler===n)i.globalHandler=void 0;else for(const[t,r]of i.handlerIdsByContextTypes){const i=r.indexOf(n);i>-1&&(r.splice(i,1),e=t)}const r=(await this.getConnectedClients()).map((async n=>{const{clientIdentity:i,clientIdentity:{endpointId:r},onUnsubscribeHandlerId:o}=n;r!==t.endpointId&&o&&await this.provider.dispatch(i,o,e)}));try{await Promise.all(r)}catch(e){throw console.error(`Problem when attempting to dispatch to onUnsubscribeHandlers. Error: ${e} Removing Client: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}`),new Error(e)}}else console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}.`)}nonStandardHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);i?i.onDisconnectHandlerId===n?i.onDisconnectHandlerId=void 0:i.onAddContextListenerHandlerId===n?i.onAddContextListenerHandlerId=void 0:i.onUnsubscribeHandlerId===n&&(i.onUnsubscribeHandlerId=void 0):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}onAddContextHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onAddContextListener, is not connected to this Private Channel`);n.onAddContextListenerHandlerId=i,Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&Array.from(e.handlerIdsByContextTypes.keys()).forEach((e=>{this.provider.dispatch(t,i,e)}))}))}onDisconnectHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onDisconnect, is not connected to this Private Channel`);n.onDisconnectHandlerId=i}onUnsubscribeHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onUnsubscribe, is not connected to this Private Channel`);n.onUnsubscribeHandlerId=i}removeClient(e){const t=this.getClientState(e);if(!t)throw new Error(`Client with Identity: ${e.uuid} ${e.name}, tried to call disconnect, is not connected to this Private Channel`);t.handlerIdsByContextTypes.clear(),this.clients.delete(e.endpointId)}async fireOnDisconnectForOtherClients(e){const{endpointId:t}=e,n=(await this.getConnectedClients()).map((async e=>{const{clientIdentity:{endpointId:n},onDisconnectHandlerId:i}=e;n!==t&&i&&await this.provider.dispatch(e.clientIdentity,i)}));try{await Promise.all(n)}catch(t){throw console.error(`Problem when attempting to dispatch to onDisconnectHandlers. Error: ${t} Disconnecting Client: uuid: ${e.uuid}. name: ${e.name}. endpointId: ${e.endpointId}`),new Error(t)}}async unsubscribeAll(e){const{endpointId:t}=e,n=this.clients.get(t);if(n){const t=Array.from(n.handlerIdsByContextTypes.values()).flat(),i=n.globalHandler;if(t.length>0){const n=t.map((async t=>this.contextHandlerRemoved({handlerId:t},e)));try{await Promise.all(n)}catch(e){console.error(e.message)}}if(i)try{await this.contextHandlerRemoved({handlerId:i},e)}catch(e){console.error(e.message)}}}async handleClientDisconnecting(e){await this.unsubscribeAll(e),this.removeClient(e),await this.fireOnDisconnectForOtherClients(e)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={clientIdentity:e,handlerIdsByContextTypes:new Map,globalHandler:void 0,onAddContextListenerHandlerId:void 0,onUnsubscribeHandlerId:void 0,onDisconnectHandlerId:void 0};this.clients.set(e.endpointId,t)}}async getConnectedClients(){const e=await this.provider.getAllClientInfo();return Array.from(this.clients.values()).filter((t=>{const{uuid:n,name:i}=t.clientIdentity;return e.some((e=>i===e.name&&n===e.uuid))}))}static init(e,n){return new t(e,n)}},Ui}(),w=G,y=[{id:"green",displayMetadata:{color:"#00CC88",name:"green"}},{id:"purple",displayMetadata:{color:"#8C61FF",name:"purple"}},{id:"orange",displayMetadata:{color:"#FF8C4C",name:"orange"}},{id:"red",displayMetadata:{color:"#FF5E60",name:"red"}},{id:"pink",displayMetadata:{color:"#FF8FB8",name:"pink"}},{id:"yellow",displayMetadata:{color:"#E9FF8F",name:"yellow"}}];let f=class i extends c.Base{constructor(i,s,a){super(i),e.set(this,void 0),t.set(this,void 0),n.set(this,void 0),this.getProvider=()=>o(this,n,"f").getValue(),this.interopClients=new Map,this.contextGroupsById=new Map,r(this,t,a.contextGroups??[...y],"f"),r(this,e,a.fdc3Info,"f"),a?.logging&&(this.logging=a.logging),this.intentClientMap=new Map,this.lastContextMap=new Map,this.sessionContextGroupMap=new Map,r(this,n,new w.Lazy(s),"f"),this.setContextGroupMap(),this.setupChannelProvider()}static createClosedConstructor(...e){return class extends i{constructor(...t){if(t.length){const[n,i,r]=t;if(r&&"object"==typeof r&&!(0,u.default)(r,e[2]))return console.warn("You have modified the parameters of the InteropOverride constructor. This behavior is deprecated and will be removed in a future version. You can modify these options in your manifest. Please consult our Interop docs for guidance on migrating to the new override scheme."),void super(e[0],e[1],r);console.warn("You are attempting to pass arguments to the InteropOverride constructor. This is not necessary, and these passed arguments will be ignored. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.")}super(...e)}}}setContext({context:e},t){this.wire.sendAction("interop-broker-set-context").catch((e=>{}));const n=this.getClientState(t);if(!n||!n.contextGroupId)throw n?new Error("You must join a context group before you can set context."):new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);{const{contextGroupId:t}=n;this.setContextForGroup({context:e},t)}}setContextForGroup({context:e},t){this.wire.sendAction("interop-broker-set-context-for-group").catch((e=>{}));const n=this.contextGroupsById.get(t);if(!n)throw new Error(`Unable to set context for context group that isn't in the context group mapping: ${t}.`);const r=i.checkContextIntegrity(e);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(e)}`);const o=e.type;n.set(o,e),this.lastContextMap.set(t,o);Array.from(this.interopClients.values()).filter((e=>e.contextGroupId===t)).forEach((t=>{for(const[,n]of t.contextHandlers)i.isContextTypeCompatible(o,n.contextType)&&this.invokeContextHandler(t.clientIdentity,n.handlerId,e)}))}getCurrentContext(e,t){this.wire.sendAction("interop-broker-get-current-context").catch((e=>{}));const n=this.getClientState(t);if(!n?.contextGroupId)throw new Error("You must be a member of a context group to call getCurrentContext");const{contextGroupId:i}=n,r=this.contextGroupsById.get(i),o=this.lastContextMap.get(i),s=e?.contextType??o;return r&&s?r.get(s):void 0}async joinContextGroup({contextGroupId:e,target:t},n){if(this.wire.sendAction("interop-broker-join-context-group").catch((e=>{})),this.sessionContextGroupMap.has(e))throw new Error(l.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup);if(t){i.hasEndpointId(t)&&await this.addClientToContextGroup({contextGroupId:e},t);try{const n=this.channel.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name));if(!n.length)throw new Error(`Given Identity ${t.uuid} ${t.name} is not connected to the Interop Broker.`);n.length>1&&console.warn(`More than one connection found for identity ${t.uuid} ${t.name}`);const i=[];for(const t of n)i.push(this.addClientToContextGroup({contextGroupId:e},t));await Promise.all(i)}catch(e){throw new Error(e)}}else await this.addClientToContextGroup({contextGroupId:e},n)}async addClientToContextGroup({contextGroupId:e},t){this.wire.sendAction("interop-broker-add-client-to-context-group").catch((e=>{}));const n=this.getClientState(t);if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(!this.getContextGroups().find((t=>t.id===e)))throw new Error(`Attempting to join a context group that does not exist: ${e}. You may only join existing context groups.`);if(n.contextGroupId!==e){n.contextGroupId=e,await this.setCurrentContextGroupInClientOptions(t,e);const i=this.contextGroupsById.get(e);for(const[,e]of n.contextHandlers){const{contextType:n,handlerId:r}=e;if(void 0===n)i.forEach(((e,n)=>{this.invokeContextHandler(t,r,e)}));else if(i.has(n)){const e=i.get(n);e&&this.invokeContextHandler(t,r,e)}}}}async removeFromContextGroup({target:e},t){if(this.wire.sendAction("interop-broker-remove-from-context-group").catch((e=>{})),e){i.hasEndpointId(e)&&await this.removeClientFromContextGroup(e);try{const t=this.channel.connections.filter((t=>t.uuid===e.uuid&&t.name===e.name));if(!t.length)throw new Error(`No connection found for given Identity ${e.uuid} ${e.name}`);t.length>1&&console.warn(`More than one connection found for identity ${e.uuid} ${e.name}`);const n=[];for(const e of t)n.push(this.removeClientFromContextGroup(e));await Promise.all(n)}catch(e){throw new Error(e)}}else await this.removeClientFromContextGroup(t)}async removeClientFromContextGroup(e){this.wire.sendAction("interop-broker-remove-client-from-context-group").catch((e=>{}));const t=this.getClientState(e);t&&(t.contextGroupId=void 0),await this.setCurrentContextGroupInClientOptions(e,null)}getContextGroups(){return this.wire.sendAction("interop-broker-get-context-groups").catch((e=>{})),o(this,t,"f").map((e=>({...e})))}getInfoForContextGroup({contextGroupId:e}){return this.wire.sendAction("interop-broker-get-info-for-context-group").catch((e=>{})),this.getContextGroups().find((t=>t.id===e))}getAllClientsInContextGroup({contextGroupId:e}){this.wire.sendAction("interop-broker-get-all-clients-in-context-group").catch((e=>{}));return Array.from(this.interopClients.values()).filter((t=>t.contextGroupId===e)).map((e=>e.clientIdentity))}async handleFiredIntent(e,t){const n=(0,l.generateOverrideWarning)("fdc3.raiseIntent","InteropBroker.handleFiredIntent",t,"interopClient.fireIntent");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntent)}async setIntentTarget(e,t){this.wire.sendAction("interop-broker-set-intent-target").catch((e=>{}));const n=this.intentClientMap.get(t.name),i=`intent-handler-${e.name}`;if(n){const t=n.get(i);if(t){if(t.pendingIntents.push(e),t.clientIdentity&&t.isReady){const{clientIdentity:e,pendingIntents:n}=t;try{const r=n[n.length-1];await this.invokeIntentHandler(e,i,r),t.pendingIntents=[]}catch(n){console.error(`Error invoking intent handler for client ${e.uuid}/${e.name}/${e.endpointId}`),t.isReady=!1}}}else n.set(i,{isReady:!1,pendingIntents:[e]})}else{this.intentClientMap.set(t.name,new Map);const n=this.intentClientMap.get(t.name);n&&n.set(i,{isReady:!1,pendingIntents:[e]})}}async handleInfoForIntent(e,t){const n=(0,l.generateOverrideWarning)("fdc3.findIntent","InteropBroker.handleInfoForIntent",t,"interopClient.getInfoForIntent");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntent)}async handleInfoForIntentsByContext(e,t){const n=(0,l.generateOverrideWarning)("fdc3.findIntentsByContext","InteropBroker.handleInfoForIntentsByContext",t,"interopClient.getInfoForIntentsByContext");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntentsByContext)}async handleFiredIntentForContext(e,t){const n=(0,l.generateOverrideWarning)("fdc3.raiseIntentForContext","InteropBroker.handleFiredIntentForContext",t,"interopClient.fireIntentForContext");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntentForContext)}async clientDisconnected(e){}async fdc3HandleOpen({app:e,context:t},n){const i=(0,l.generateOverrideWarning)("fdc3.open","InteropBroker.fdc3HandleOpen",n);throw console.warn(i),new Error(l.BROKER_ERRORS.fdc3Open)}async fdc3HandleFindInstances(e,t){const n=(0,l.generateOverrideWarning)("fdc3.open","InteropBroker.fdc3HandleFindInstances",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3FindInstances)}async fdc3HandleGetAppMetadata(e,t){const n=(0,l.generateOverrideWarning)("fdc3.getAppMetadata","InteropBroker.fdc3HandleGetAppMetadata",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3GetAppMetadata)}async invokeContextHandler(e,t,n){const i=await this.getProvider();try{await i.dispatch(e,t,n)}catch(i){console.error(`Error invoking context handler ${t} for context type ${n.type} in client ${e.uuid}/${e.name}/${e.endpointId}`,i)}}async invokeIntentHandler(e,t,n){const i=await this.getProvider();await i.dispatch(e,t,n)}async fdc3HandleGetInfo(t,n){const{fdc3Version:i}=t;return{fdc3Version:i,...o(this,e,"f"),optionalFeatures:{OriginatingAppMetadata:!1,UserChannelMembershipAPIs:!0},appMetadata:{appId:"",instanceId:""}}}async getAllClientInfo(){return(await this.getProvider()).getAllClientInfo()}decorateSnapshot(e){return{...e,interopSnapshotDetails:{contextGroupStates:this.getContextGroupStates()}}}applySnapshot(e,t){const n=e?.interopSnapshotDetails?.contextGroupStates;n&&(t?.closeExistingWindows||this.updateExistingClients(n),this.rehydrateContextGroupStates(n))}updateExistingClients(e){this.interopClients.forEach((t=>{const{clientIdentity:n,contextGroupId:r,contextHandlers:o}=t;if(r){const t=e[r];for(const[,e]of Object.entries(t))o.forEach((t=>{const{handlerId:r,contextType:o}=t;i.isContextTypeCompatible(e.type,o)&&this.invokeContextHandler(n,r,e)}))}}))}getContextGroupStates(){return i.toObject(this.contextGroupsById)}rehydrateContextGroupStates(e){const t=Object.entries(e);for(const[e,n]of t){const t=Object.entries(n);for(const[n,i]of t)if(this.contextGroupsById.has(e)){this.contextGroupsById.get(e).set(n,i)}else console.warn(`Attempting to set a context group that isn't in the context group mapping. Skipping context group rehydration for: ${e}`)}}contextHandlerRegistered({contextType:e,handlerId:t},n){const i={contextType:e,handlerId:t},r=this.getClientState(n);if(r?.contextHandlers.set(t,i),r&&r.contextGroupId){const{contextGroupId:i}=r,o=this.contextGroupsById.get(i);if(void 0===e)o.forEach(((e,i)=>{this.invokeContextHandler(n,t,e)}));else if(o.has(e)){const i=o.get(e);i&&this.invokeContextHandler(n,t,i)}}}async intentHandlerRegistered(e,t){const{handlerId:n}=e,i=this.intentClientMap.get(t.name),r=i?.get(n);if(i)if(r){const{pendingIntents:e}=r;r.clientIdentity=t,r.isReady=!0;try{if(e.length>0){const i=e[e.length-1];await this.invokeIntentHandler(t,n,i),r.pendingIntents=[]}}catch(e){console.error(`Error invoking intent handler: ${n} for client ${t.uuid}/${t.name}/${t.endpointId}`)}}else i.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t});else{this.intentClientMap.set(t.name,new Map);const e=this.intentClientMap.get(t.name);e&&e.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t})}}removeContextHandler({handlerId:e},t){const n=this.getClientState(t);n&&n.contextHandlers.delete(e)}handleJoinSessionContextGroup({sessionContextGroupId:e},t){try{if(!e)throw new Error("Failed to join session context group: must specify group id.");const n=this.sessionContextGroupMap.get(e);if(n)n.registerNewClient(t);else{const n=new h.default(this.channel,e);n.registerNewClient(t),this.sessionContextGroupMap.set(e,n)}return{hasConflict:this.contextGroupsById.has(e)}}catch(e){throw new Error(e)}}getClientState(e){return this.interopClients.get(e.endpointId)}static toObject(e){const t=Object.fromEntries(e),n={};return Object.entries(t).forEach((([e,t])=>{const i=Object.fromEntries(t);n[e]=i})),n}static checkContextIntegrity(e){if(!e)return{isValid:!1,reason:"No context supplied"};if("object"!=typeof e)return{isValid:!1,reason:"Context must be an Object"};if(!e.type)return{isValid:!1,reason:"Context must have a type property"};if(e.id&&"object"!=typeof e.id)return{isValid:!1,reason:"Context id must be an Object populated with key-value identifiers (if set)"};if(e.id){const{id:t}=e,n=Object.keys(t);let i=!1;if(!n.length)return{isValid:!1,reason:"Context id must have at least one key-value identifier"};if(n.forEach((e=>{"string"==typeof e&&"string"==typeof t[e]||(i=!0)})),i)return{isValid:!1,reason:"Context id key-value identifiers must be of type string"}}return e.name&&"string"!=typeof e.name?{isValid:!1,reason:"Context name must be of string type (if set)"}:{isValid:!0}}static hasEndpointId(e){return void 0!==e.endpointId}static isContextTypeCompatible(e,t){return void 0===t||e===t}setContextGroupMap(){for(const e of this.getContextGroups())this.contextGroupsById.set(e.id,new Map)}async setCurrentContextGroupInClientOptions(e,t){try{const n=await this.fin.System.getEntityInfo(e.uuid,e.name);let i;"view"===n.entityType?i=await this.fin.View.wrap(e):"window"===n.entityType&&(i=await this.fin.Window.wrap(e)),i&&await i.updateOptions({interop:{currentContextGroup:t}})}catch(e){}}async setupChannelProvider(){try{const e=await this.getProvider();this.channel=e,this.wireChannel(e)}catch(e){throw new Error(`Error setting up Interop Broker Channel Provider: ${e}`)}}wireChannel(e){e.onConnection((async(e,t)=>{if(!await this.isConnectionAuthorized(e,t))throw new Error(`Connection not authorized for ${e.uuid}, ${e.name}`);if(!e.endpointId)throw new Error("Version too old to be compatible with Interop. Please upgrade your runtime to a more recent version.");const n={contextGroupId:void 0,contextHandlers:new Map,clientIdentity:e};t?.currentContextGroup&&this.contextGroupsById.has(t.currentContextGroup)&&(n.contextGroupId=t?.currentContextGroup),this.interopClients.set(e.endpointId,n)})),e.onDisconnection((e=>{this.interopClients.delete(e.endpointId);const t=this.intentClientMap.get(e.name);t&&e.uuid===this.fin.me.uuid&&t.forEach((e=>{e.isReady=!1})),this.sessionContextGroupMap.forEach((t=>{t.onDisconnection(e)})),this.clientDisconnected(e)})),e.beforeAction((async(e,t,n)=>{if(!await this.isActionAuthorized(e,t,n))throw new Error(`Action (${e}) not authorized for ${n.uuid}, ${n.name}`);this.logging?.beforeAction?.enabled&&console.log(e,t,n)})),e.afterAction(((e,t,n)=>{this.logging?.afterAction?.enabled&&console.log(e,t,n)})),e.register("setContext",this.setContext.bind(this)),e.register("fireIntent",this.handleFiredIntent.bind(this)),e.register("getCurrentContext",this.getCurrentContext.bind(this)),e.register("getInfoForIntent",this.handleInfoForIntent.bind(this)),e.register("getInfoForIntentsByContext",this.handleInfoForIntentsByContext.bind(this)),e.register("fireIntentForContext",this.handleFiredIntentForContext.bind(this)),e.register("getContextGroups",this.getContextGroups.bind(this)),e.register("joinContextGroup",this.joinContextGroup.bind(this)),e.register("removeFromContextGroup",this.removeFromContextGroup.bind(this)),e.register("getAllClientsInContextGroup",this.getAllClientsInContextGroup.bind(this)),e.register("getInfoForContextGroup",this.getInfoForContextGroup.bind(this)),e.register("contextHandlerRegistered",this.contextHandlerRegistered.bind(this)),e.register("intentHandlerRegistered",this.intentHandlerRegistered.bind(this)),e.register("removeContextHandler",this.removeContextHandler.bind(this)),e.register("sessionContextGroup:createIfNeeded",this.handleJoinSessionContextGroup.bind(this)),e.register("fdc3Open",this.fdc3HandleOpen.bind(this)),e.register("fdc3v2FindIntentsByContext",this.handleInfoForIntentsByContext.bind(this)),e.register("fdc3FindInstances",this.fdc3HandleFindInstances.bind(this)),e.register("fdc3GetAppMetadata",this.fdc3HandleGetAppMetadata.bind(this)),e.register("fdc3v2GetInfo",(async(e,t)=>this.fdc3HandleGetInfo.bind(this)(e,t))),e.register("createPrivateChannelProvider",(async e=>{const{channelId:t}=e,n=await this.fin.InterApplicationBus.Channel.create(t);p.PrivateChannelProvider.init(n,t)}))}isConnectionAuthorized(e,t){return this.wire.sendAction("interop-broker-is-connection-authorized").catch((e=>{})),Promise.resolve(!0)}isActionAuthorized(e,t,n){return this.wire.sendAction("interop-broker-is-action-authorized").catch((e=>{})),Promise.resolve(!0)}};return Gi.InteropBroker=f,e=new WeakMap,t=new WeakMap,n=new WeakMap,Gi}var zi,Ki={},qi={},Ji=s&&s.__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},Yi=s&&s.__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)};Object.defineProperty(qi,"__esModule",{value:!0});const Zi=d,Qi=Hi;class Xi extends Zi.Base{constructor(e,t,n){super(e),zi.set(this,void 0),this.id=n,Ji(this,zi,t,"f")}async setContext(e){this.wire.sendAction("interop-session-context-group-set-context").catch((e=>{}));return(await Yi(this,zi,"f")).dispatch(`sessionContextGroup:setContext-${this.id}`,{sessionContextGroupId:this.id,context:e})}async getCurrentContext(e){this.wire.sendAction("interop-session-context-group-get-context").catch((e=>{}));return(await Yi(this,zi,"f")).dispatch(`sessionContextGroup:getContext-${this.id}`,{sessionContextGroupId:this.id,type:e})}async addContextHandler(e,t){if(this.wire.sendAction("interop-session-context-group-add-handler").catch((e=>{})),"function"!=typeof e)throw new Error("Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");const n=await Yi(this,zi,"f");let i;return i=t?`sessionContextHandler:invoke-${this.id}-${t}-${(0,Qi.generateId)()}`:`sessionContextHandler:invoke-${this.id}`,n.register(i,(0,Qi.wrapContextHandler)(e,i)),await n.dispatch(`sessionContextGroup:handlerAdded-${this.id}`,{handlerId:i,contextType:t}),{unsubscribe:await this.createUnsubscribeCb(i)}}async createUnsubscribeCb(e){const t=await Yi(this,zi,"f");return async()=>{t.remove(e),await t.dispatch(`sessionContextGroup:handlerRemoved-${this.id}`,{handlerId:e})}}getUserInstance(){return{id:this.id,setContext:(0,Qi.wrapInTryCatch)(this.setContext.bind(this),"Failed to set context: "),getCurrentContext:(0,Qi.wrapInTryCatch)(this.getCurrentContext.bind(this),"Failed to get context: "),addContextHandler:(0,Qi.wrapInTryCatch)(this.addContextHandler.bind(this),"Failed to add context handler: ")}}}qi.default=Xi,zi=new WeakMap;var er={},tr={},nr={},ir={},rr=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),or=s&&s.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),sr=s&&s.__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)&&rr(t,e,n);return or(t,e),t};Object.defineProperty(ir,"__esModule",{value:!0}),ir.PrivateChannelClient=void 0;const ar=sr(Hi);var cr,dr;function hr(){if(cr)return tr;cr=1;var e,t=s&&s.__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)},n=s&&s.__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},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(tr,"__esModule",{value:!0}),tr.FDC3ModuleBase=void 0;const o=nr,a=Hi,c=wr(),d=r(i);return tr.FDC3ModuleBase=class{get client(){return t(this,e,"f").call(this)}get fin(){return this.wire.getFin()}constructor(t,i){this.wire=i,e.set(this,void 0),n(this,e,t,"f")}async broadcast(e){return this.wire.sendAction("fdc3-broadcast").catch((e=>{})),this.client.setContext(e)}async _open(e,t){this.wire.sendAction("fdc3-open").catch((e=>{}));try{return await c.InteropClient.ferryFdc3Call(this.client,"fdc3Open",{app:e,context:t})}catch(e){const t=e.message===a.BROKER_ERRORS.fdc3Open?"ResolverUnavailable":e.message;throw new Error(t)}}async _getChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:"system",...(0,o.getUnsupportedChannelApis)()})))}async getOrCreateChannel(e){this.wire.sendAction("fdc3-get-or-create-channel").catch((e=>{}));const t=(await this._getChannels()).find((t=>t.id===e));if(t)return{...t,type:"system",...(0,o.getUnsupportedChannelApis)()};try{const t=await this.client.joinSessionContextGroup(e);return(0,o.buildAppChannelObject)(t)}catch(e){throw console.error(e.message),new Error(o.ChannelError.CreationFailed)}}async getSystemChannels(){return this.wire.sendAction("fdc3-get-system-channels").catch((e=>{})),this._getChannels()}async joinChannel(e){this.wire.sendAction("fdc3-join-channel").catch((e=>{}));try{return await this.client.joinContextGroup(e)}catch(e){if(e.message===a.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup?console.error("The Channel you have tried to join is an App Channel. Custom Channels can only be defined by the Interop Broker through code or manifest configuration. Please use getOrCreateChannel."):console.error(e.message),e.message.startsWith("Attempting to join a context group that does not exist"))throw new Error(o.ChannelError.NoChannelFound);throw new Error(o.ChannelError.AccessDenied)}}async getCurrentChannel(){this.wire.sendAction("fdc3-get-current-channel").catch((e=>{}));const e=await this.getCurrentContextGroupInfo();return e?this.buildChannelObject(e):null}async leaveCurrentChannel(){return this.wire.sendAction("fdc3-leave-current-channel").catch((e=>{})),this.client.removeFromContextGroup()}async getCurrentContextGroupInfo(){const e=await this.client.getContextGroups(),t=e.map((async e=>this.client.getAllClientsInContextGroup(e.id))),n=(await Promise.all(t)).findIndex((e=>e.some((e=>{const{uuid:t,name:n}=e;return this.wire.me.uuid===t&&this.wire.me.name===n}))));return e[n]}async buildChannelObject(e){return{...e,type:"system",addContextListener:(...[e,t])=>{let n,i;"function"==typeof e?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),n=e):(n=t,"string"==typeof e&&(i=e));const r=(async()=>{let e=!0;const t=await this.client.getCurrentContext(i);return this.client.addContextHandler(((i,r)=>{if(!e||(e=!1,!(0,d.default)(t,i)))return n(i,r)}),i)})();return{...r,unsubscribe:()=>r.then((e=>e.unsubscribe()))}},broadcast:this.broadcast.bind(this),getCurrentContext:async e=>{const t=await this.client.getCurrentContext(e);return void 0===t?null:t}}}},e=new WeakMap,tr}ir.PrivateChannelClient=class{constructor(e,t){this.id=t,this.client=e,this.listeners=new Map}async broadcast(e){return this.client.dispatch("broadcast",{context:e})}async getCurrentContext(e){return this.client.dispatch("getCurrentContext",{contextType:e})}async addContextListener(e,t){if("function"!=typeof t)throw new Error("Non-function argument passed to the second parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");let n;n=e?`contextHandler:invoke-${this.id}-${e}-${ar.generateId()}`:`contextHandler:invoke-${this.id}-${ar.generateId()}`,this.client.register(n,ar.wrapContextHandler(t,n));const i={unsubscribe:await this.createContextUnsubscribeCb(n)};return this.listeners.set(n,i),await this.client.dispatch("contextHandlerAdded",{handlerId:n,contextType:e}),i}createNonStandardUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch("nonStandardHandlerRemoved",{handlerId:e})}}createContextUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch("contextHandlerRemoved",{handlerId:e})}}onAddContextListener(e){const t=`onContextHandlerAdded:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch("onAddContextHandlerAdded",{handlerId:t}),n}onDisconnect(e){const t=`onDisconnect:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch("onDisconnectHandlerAdded",{handlerId:t}),n}onUnsubscribe(e){const t=`onUnsubscribe:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch("onUnsubscribeHandlerAdded",{handlerId:t}),n}async cleanUpAllSubs(){Array.from(this.listeners.keys()).forEach((e=>{this.client.remove(e),this.listeners.delete(e)}))}async disconnect(){try{await this.client.dispatch("clientDisconnecting"),await this.cleanUpAllSubs(),await this.client.disconnect()}catch(e){throw new Error(e.message)}}},function(e){var t=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.getIntentResolution=e.isChannel=e.isContext=e.connectPrivateChannel=e.buildAppChannelObject=e.buildPrivateChannelObject=e.ChannelError=e.ResultError=e.UnsupportedChannelApiError=e.getUnsupportedChannelApis=void 0;const n=Hi,r=ir,o=t(i);e.getUnsupportedChannelApis=e=>({addContextListener:()=>{throw new a("Channel.addContextListener",e)},broadcast:()=>{throw new a("Channel.broadcast",e)},getCurrentContext:()=>{throw new a("Channel.getCurrentContext",e)}});class a extends Error{constructor(e,t="System"){super(e),this.message=`Calling ${e} on an instance of a ${t} Channel returned by fdc3.get${t}Channels is not supported. If you would like to use a ${t} Channel, please use fdc3.joinChannel, fdc3.addContextListener, and fdc3.broadcast instead.`}}var c,d;e.UnsupportedChannelApiError=a,function(e){e.NoResultReturned="NoResultReturned",e.IntentHandlerRejected="IntentHandlerRejected"}(c=e.ResultError||(e.ResultError={})),(d=e.ChannelError||(e.ChannelError={})).NoChannelFound="NoChannelFound",d.AccessDenied="AccessDenied",d.CreationFailed="CreationFailed";e.buildPrivateChannelObject=e=>{let t=!1;const n=()=>{if(t)throw new Error("Private Channel Client has been disconnected from the Private Channel")};return{id:e.id,type:"private",broadcast:async t=>(n(),e.broadcast(t)),getCurrentContext:async t=>(n(),e.getCurrentContext(t)),addContextListener:async(t,i)=>{n();let r=i,o=t;"function"==typeof t&&(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),r=t,o=null);return e.addContextListener(o,r)},onAddContextListener:t=>(n(),e.onAddContextListener(t)),disconnect:async()=>(n(),t=!0,e.disconnect()),onDisconnect:t=>(n(),e.onDisconnect(t)),onUnsubscribe:t=>(n(),e.onUnsubscribe(t))}};e.buildAppChannelObject=e=>({id:e.id,type:"app",broadcast:e.setContext,getCurrentContext:async t=>{const n=await e.getCurrentContext(t);return void 0===n?null:n},addContextListener:(t,n)=>{let i,r;"function"==typeof t?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),i=t):(i=n,"string"==typeof t&&(r=t));const s=(async()=>{let t=!0;const n=await e.getCurrentContext(r);return e.addContextHandler(((e,r)=>{if(!t||(t=!1,!(0,o.default)(n,e)))return i(e,r)}),r)})();return{...s,unsubscribe:()=>s.then((e=>e.unsubscribe()))}}});e.connectPrivateChannel=async t=>{try{const n=await fin.InterApplicationBus.Channel.connect(t),i=new r.PrivateChannelClient(n,t);return(0,e.buildPrivateChannelObject)(i)}catch(e){throw new Error(`Private Channel with id: ${t} doesn't exist`)}};e.isContext=e=>{if(e&&"object"==typeof e&&"type"in e){const{type:t}=e;return"string"==typeof t}return!1};e.isChannel=e=>{if(e&&"object"==typeof e&&"type"in e&&"id"in e){const{type:t,id:n}=e;return"string"==typeof t&&"string"==typeof n&&("app"===t||"private"===t)}return!1};e.getIntentResolution=async(t,i,r,o)=>{const s=(0,n.generateId)(),a=new Promise(((e,t)=>{fin.InterApplicationBus.subscribe({uuid:"*"},s,(t=>{e(t)})).catch((()=>t(new Error("getResult is not supported in this environment"))))})),d=r?{target:r,intentResolutionResultId:s}:{intentResolutionResultId:s},h=o?{name:o,context:i,metadata:d}:{...i,metadata:d},l=async()=>{let n=await a;if(!n||"object"!=typeof n)throw new Error(c.NoResultReturned);const{error:i}=n;if(i)throw new Error(c.IntentHandlerRejected);if((0,e.isChannel)(n)){const{id:i,type:r}=n;switch(r){case"private":n=await(0,e.connectPrivateChannel)(i);break;case"app":{const r=await t.joinSessionContextGroup(i);n=(0,e.buildAppChannelObject)(r);break}}}else if(!(0,e.isContext)(n))throw new Error(c.NoResultReturned);return n},u=o?await t.fireIntent(h):await t.fireIntentForContext(h);return"object"!=typeof u?{source:{appId:"",instanceId:""},intent:"",version:"2.0",getResult:l}:{...u,getResult:l}}}(nr);var lr,ur,pr={};function wr(){if(ur)return Ki;ur=1;var e,t,n=s&&s.__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},i=s&&s.__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)},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ki,"__esModule",{value:!0}),Ki.InteropClient=void 0;const o=d,a=r(qi),c=function(){if(dr)return er;dr=1,Object.defineProperty(er,"__esModule",{value:!0}),er.Fdc3Module=void 0;const e=Hi,t=hr();class n extends t.FDC3ModuleBase{async open(e,t){await super._open(e,t)}addContextListener(e,t){let n;return this.wire.sendAction("fdc3-add-context-listener").catch((e=>{})),"function"==typeof e?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),n=this.client.addContextHandler(e)):n=this.client.addContextHandler(t,null===e?void 0:e),{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}addIntentListener(e,t){this.wire.sendAction("fdc3-add-intent-listener").catch((e=>{}));const n=this.client.registerIntentHandler((e=>{const{context:n,metadata:i}=e,{metadata:r}=n,o=i?.intentResolutionResultId||r?.intentResolutionResultId;o&&this.fin.InterApplicationBus.publish(o,null).catch((()=>null)),t(e.context)}),e,{fdc3Version:"1.2"});return{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}async raiseIntent(t,n,i){this.wire.sendAction("fdc3-raise-intent").catch((e=>{}));const r=i?{name:t,context:n,metadata:{target:i}}:{name:t,context:n};try{return await this.client.fireIntent(r)}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntent?"ResolverUnavailable":t.message;throw new Error(n)}}async findIntent(t,n){this.wire.sendAction("fdc3-find-intent").catch((e=>{}));try{return await this.client.getInfoForIntent({name:t,context:n})}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntent?"ResolverUnavailable":t.message;throw new Error(n)}}async findIntentsByContext(t){this.wire.sendAction("fdc3-find-intents-by-context").catch((e=>{}));try{return await this.client.getInfoForIntentsByContext(t)}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntentsByContext?"ResolverUnavailable":t.message;throw new Error(n)}}async raiseIntentForContext(t,n){this.wire.sendAction("fdc3-raise-intent-for-context").catch((e=>{}));try{return await this.client.fireIntentForContext({...t,metadata:{target:n}})}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntentForContext?"ResolverUnavailable":t.message;throw new Error(n)}}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}getInfo(){return this.wire.sendAction("fdc3-get-info").catch((e=>{})),{providerVersion:this.wire.environment.getAdapterVersionSync(),provider:`openfin-${this.wire.me.uuid}`,fdc3Version:"1.2"}}}return er.Fdc3Module=n,er}(),h=function(){if(lr)return pr;lr=1,Object.defineProperty(pr,"__esModule",{value:!0}),pr.Fdc3Module2=void 0;const e=hr(),t=Hi,n=wr(),i=nr,r=ir;class o extends e.FDC3ModuleBase{async open(e,t){return"string"==typeof e&&console.warn("Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string })."),super._open(e,t)}async findInstances(e){this.wire.sendAction("fdc3-find-instances").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,"fdc3FindInstances",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3FindInstances?"ResolverUnavailable":e.message;throw new Error(n)}}async getAppMetadata(e){this.wire.sendAction("fdc3-get-app-metadata").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,"fdc3GetAppMetadata",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3GetAppMetadata?"ResolverUnavailable":e.message;throw new Error(n)}}async addContextListener(e,t){this.wire.sendAction("fdc3-add-context-listener").catch((e=>{}));const n=e=>t=>{const{contextMetadata:n,...i}=t,r=n?[{...i},n]:[t,null];e(...r)};let i=t,r=n(i);return"function"==typeof e?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),i=e,r=n(i),this.client.addContextHandler(r)):this.client.addContextHandler(r,null===e?void 0:e)}async findIntent(e,n,i){this.wire.sendAction("fdc3-find-intent").catch((e=>{}));try{return await this.client.getInfoForIntent({name:e,context:n,metadata:{resultType:i}})}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntent?"ResolverUnavailable":e.message;throw new Error(n)}}async findIntentsByContext(e,i){this.wire.sendAction("fdc3-find-intents-by-context").catch((e=>{}));const r=i?{context:e,metadata:{resultType:i}}:e;try{return await n.InteropClient.ferryFdc3Call(this.client,"fdc3v2FindIntentsByContext",r)}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntentsByContext?"ResolverUnavailable":e.message;throw new Error(n)}}async raiseIntent(e,n,r){this.wire.sendAction("fdc3-raise-intent").catch((e=>{}));try{return"string"==typeof r&&console.warn("Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string })."),(0,i.getIntentResolution)(this.client,n,r,e)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?"ResolverUnavailable":e.message;throw new Error(n)}}async raiseIntentForContext(e,n){this.wire.sendAction("fdc3-raise-intent-for-context").catch((e=>{}));try{return"string"==typeof n&&console.warn("Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string })."),(0,i.getIntentResolution)(this.client,e,n)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?"ResolverUnavailable":e.message;throw new Error(n)}}async addIntentListener(e,t){if(this.wire.sendAction("fdc3-add-intent-listener").catch((e=>{})),"string"!=typeof e)throw new Error("First argument must be an Intent name");return this.client.registerIntentHandler((async e=>{let n,i;const{context:r,metadata:o}=e,{contextMetadata:s,metadata:a,...c}=r,d=o?.intentResolutionResultId||a?.intentResolutionResultId;try{const e=a?{metadata:a,...c}:{...c};n=await t(e,s),i=n}catch(e){n=e,i={error:!0}}if(d&&this.fin.InterApplicationBus.publish(d,i).catch((()=>null)),n instanceof Error)throw new Error(n.message);return n}),e,{fdc3Version:"2.0"})}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}async createPrivateChannel(){const e=(0,t.generateId)();await n.InteropClient.ferryFdc3Call(this.client,"createPrivateChannelProvider",{channelId:e});const o=await this.fin.InterApplicationBus.Channel.connect(e),s=new r.PrivateChannelClient(o,e);return(0,i.buildPrivateChannelObject)(s)}async getUserChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:"user",...(0,i.getUnsupportedChannelApis)("User")})))}async getSystemChannels(){return console.warn("This API has been deprecated. Please use fdc3.getUserChannels instead."),super.getSystemChannels()}async joinUserChannel(e){return super.joinChannel(e)}async joinChannel(e){return console.warn("This API has been deprecated. Please use fdc3.joinUserChannel instead."),super.joinChannel(e)}async getCurrentChannel(){const e=await super.getCurrentChannel();return e?{...e,type:"user",broadcast:this.broadcast.bind(this)}:null}async getInfo(){return n.InteropClient.ferryFdc3Call(this.client,"fdc3v2GetInfo",{fdc3Version:"2.0"})}}return pr.Fdc3Module2=o,pr}(),l=Hi;let u=class extends o.Base{constructor(i,r){super(i),e.set(this,void 0),t.set(this,void 0),n(this,t,new Map,"f"),n(this,e,r,"f")}async setContext(t){this.wire.sendAction("interop-client-set-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("setContext",{context:t})}async addContextHandler(t,n){if(this.wire.sendAction("interop-client-add-context-handler").catch((e=>{})),"function"!=typeof t)throw new Error("Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");const r=await i(this,e,"f");let o;o=n?`invokeContextHandler-${n}-${(0,l.generateId)()}`:"invokeContextHandler";const s=(0,l.wrapContextHandler)(t,o);return r.register(o,s),await r.dispatch("contextHandlerRegistered",{handlerId:o,contextType:n}),{unsubscribe:async()=>{r.remove(o),await r.dispatch("removeContextHandler",{handlerId:o})}}}async getContextGroups(){this.wire.sendAction("interop-client-get-context-groups").catch((e=>{}));return(await i(this,e,"f")).dispatch("getContextGroups")}async joinContextGroup(t,n){this.wire.sendAction("interop-client-join-context-group").catch((e=>{}));const r=await i(this,e,"f");if(!t)throw new Error("No contextGroupId specified for joinContextGroup.");return r.dispatch("joinContextGroup",{contextGroupId:t,target:n})}async removeFromContextGroup(t){this.wire.sendAction("interop-client-remove-from-context-group").catch((e=>{}));return(await i(this,e,"f")).dispatch("removeFromContextGroup",{target:t})}async getAllClientsInContextGroup(t){this.wire.sendAction("interop-client-get-all-clients-in-context-group").catch((e=>{}));const n=await i(this,e,"f");if(!t)throw new Error("No contextGroupId specified for getAllClientsInContextGroup.");return n.dispatch("getAllClientsInContextGroup",{contextGroupId:t})}async getInfoForContextGroup(t){this.wire.sendAction("interop-client-get-info-for-context-group").catch((e=>{}));const n=await i(this,e,"f");if(!t)throw new Error("No contextGroupId specified for getInfoForContextGroup.");return n.dispatch("getInfoForContextGroup",{contextGroupId:t})}async fireIntent(t){this.wire.sendAction("interop-client-fire-intent").catch((e=>{}));return(await i(this,e,"f")).dispatch("fireIntent",t)}async registerIntentHandler(t,n,r){this.wire.sendAction("interop-client-register-intent-handler").catch((e=>{}));const o=await i(this,e,"f"),s=`intent-handler-${n}`,a=(0,l.wrapIntentHandler)(t,s);try{await o.register(s,a),await o.dispatch("intentHandlerRegistered",{handlerId:s,...r})}catch(e){throw new Error("Unable to register intent handler")}return{unsubscribe:async()=>{o.remove(s)}}}async getCurrentContext(t){this.wire.sendAction("interop-client-get-current-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("getCurrentContext",{contextType:t})}async getInfoForIntent(t){this.wire.sendAction("interop-client-get-info-for-intent").catch((e=>{}));return(await i(this,e,"f")).dispatch("getInfoForIntent",t)}async getInfoForIntentsByContext(t){this.wire.sendAction("interop-client-get-info-for-intents-by-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("getInfoForIntentsByContext",t)}async fireIntentForContext(t){this.wire.sendAction("interop-client-fire-intent-for-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("fireIntentForContext",t)}async joinSessionContextGroup(n){try{const r=i(this,t,"f").get(n);if(r)return r.getUserInstance();const o=await i(this,e,"f"),{hasConflict:s}=await o.dispatch("sessionContextGroup:createIfNeeded",{sessionContextGroupId:n});s&&console.warn(`A (non-session) context group with the name "${n}" already exists. If you are trying to join a Context Group, call joinContextGroup instead.`);const c=new a.default(this.wire,i(this,e,"f"),n);return i(this,t,"f").set(n,c),c.getUserInstance()}catch(e){throw console.error(`Error thrown trying to create Session Context Group with id "${n}": ${e}`),e}}async onDisconnection(t){this.wire.sendAction("interop-client-add-ondisconnection-listener").catch((e=>{}));return(await i(this,e,"f")).onDisconnection((e=>{const{uuid:n}=e;t({type:"interop-broker",topic:"disconnected",brokerName:n})}))}getFDC3Sync(e){switch(e){case"1.2":return new c.Fdc3Module((()=>this),this.wire);case"2.0":return new h.Fdc3Module2((()=>this),this.wire);default:throw new Error(`Invalid FDC3 version provided: ${e}. Must be '1.2' or '2.0'`)}}async getFDC3(e){return this.getFDC3Sync(e)}static async ferryFdc3Call(t,n,r){return(await i(t,e,"f")).dispatch(n,r||null)}};return Ki.InteropClient=u,e=new WeakMap,t=new WeakMap,Ki}var yr,fr,gr,mr={};function vr(){if(yr)return mr;yr=1,Object.defineProperty(mr,"__esModule",{value:!0}),mr.overrideCheck=mr.checkFDC32Overrides=mr.getDefaultViewFdc3VersionFromAppInfo=void 0;const e=Vi();function t(t){return["fdc3HandleFindInstances","handleInfoForIntent","handleInfoForIntentsByContext","fdc3HandleGetAppMetadata","fdc3HandleGetInfo","fdc3HandleOpen","handleFiredIntent","handleFiredIntentForContext"].filter((n=>t[n]===e.InteropBroker.prototype[n]))}return mr.getDefaultViewFdc3VersionFromAppInfo=function({manifest:e,initialOptions:t}){const n=e?.platform?.defaultViewOptions?.fdc3InteropApi??t.defaultViewOptions?.fdc3InteropApi;return["1.2","2.0"].includes(n??"")?n:void 0},mr.checkFDC32Overrides=t,mr.overrideCheck=function(e,n){if(n&&"2.0"===n){const n=t(e);n.length>0&&console.warn(`WARNING: FDC3 2.0 has been set as a default option for Views in this Platform, but the required InteropBroker APIs for FDC3 2.0 compliance have not all been overridden.\nThe following APIs need to be overridden:\n${n.join("\n")}`)}},mr}function Cr(){return gr||(gr=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),i=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),i(function(){if(fr)return Ti;fr=1;var e=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ti,"__esModule",{value:!0}),Ti.InteropModule=void 0;const t=e(n),i=$i,r=d,o=Vi(),a=wr(),c=vr(),h=Tn,l=e=>new e,u="You have attempted to use or modify InteropBroker parameters, which is not allowed. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.";class p extends r.Base{async init(e,n=l){this.wire.sendAction("interop-init").catch((()=>{}));const r=await this.wire.environment.getInteropInfo(this.wire.getFin()),s=(0,i.createUnusableObject)(u),a=(0,i.createWarningObject)(u,(0,t.default)(r)),d=async()=>{throw new Error(u)},p=o.InteropBroker.createClosedConstructor(this.wire,(()=>this.fin.InterApplicationBus.Channel.create(`interop-broker-${e}`)),r);let w;return w=Array.isArray(n)?new((0,h.overrideFromComposables)(...n)(p))(s,d,a):await n(p,s,d,a),(0,c.overrideCheck)(w,r.fdc3Version),w}connectSync(e,t){return this.wire.sendAction("interop-connect-sync").catch((()=>{})),new a.InteropClient(this.wire,this.wire.environment.whenReady().then((()=>this.fin.InterApplicationBus.Channel.connect(`interop-broker-${e}`,{payload:t}))))}}return Ti.InteropModule=p,Ti}(),e),i(wr(),e),i(Vi(),e)}(Li)),Li}var br={},Ir={},Er={},xr={};Object.defineProperty(xr,"__esModule",{value:!0}),xr.getSnapshotSourceChannelName=void 0;xr.getSnapshotSourceChannelName=e=>`snapshot-source-provider-${e.uuid}`;var Ar,Pr,Mr,_r,Or,Sr=s&&s.__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},Rr=s&&s.__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)};Object.defineProperty(Er,"__esModule",{value:!0}),Er.SnapshotSource=void 0;const Fr=d,jr=xr,kr=new Map;class Lr extends Fr.Base{constructor(e,t){super(e),Ar.set(this,void 0),Pr.set(this,(()=>(kr.has(this.identity.uuid)||kr.set(this.identity.uuid,{eventFired:null,clientPromise:null}),kr.get(this.identity.uuid)))),Mr.set(this,(()=>(Rr(this,Pr,"f").call(this).clientPromise||(Rr(this,Pr,"f").call(this).clientPromise=Rr(this,_r,"f").call(this)),Rr(this,Pr,"f").call(this).clientPromise))),_r.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);try{Rr(this,Pr,"f").call(this).eventFired||await Rr(this,Or,"f").call(this);const t=await this.fin.InterApplicationBus.Channel.connect(e,{wait:!1});return t.onDisconnection((()=>{Rr(this,Pr,"f").call(this).clientPromise=null,Rr(this,Pr,"f").call(this).eventFired=null})),t}catch(e){throw Rr(this,Pr,"f").call(this).clientPromise=null,new Error("The targeted SnapshotSource is not currently initialized. Await this object's ready() method.")}})),Or.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);let t,n;const i=new Promise(((e,i)=>{t=e,n=i}));Rr(this,Pr,"f").call(this).eventFired=i;const r=async i=>{try{i.channelName===e&&(t(),await this.fin.InterApplicationBus.Channel.removeListener("connected",r))}catch(e){n(e)}};await this.fin.InterApplicationBus.Channel.on("connected",r)})),Sr(this,Ar,t,"f")}get identity(){return Rr(this,Ar,"f")}async ready(){this.wire.sendAction("snapshot-source-ready").catch((e=>{}));try{await Rr(this,Mr,"f").call(this)}catch(e){await Rr(this,Pr,"f").call(this).eventFired}}async getSnapshot(){this.wire.sendAction("snapshot-source-get-snapshot").catch((e=>{}));const e=await Rr(this,Mr,"f").call(this),t=await e.dispatch("get-snapshot");return(await t).snapshot}async applySnapshot(e){this.wire.sendAction("snapshot-source-apply-snapshot").catch((e=>{}));return(await Rr(this,Mr,"f").call(this)).dispatch("apply-snapshot",{snapshot:e})}}Er.SnapshotSource=Lr,Ar=new WeakMap,Pr=new WeakMap,Mr=new WeakMap,_r=new WeakMap,Or=new WeakMap,Object.defineProperty(Ir,"__esModule",{value:!0}),Ir.SnapshotSourceModule=void 0;const Tr=d,$r=Er,Br=xr;class Gr extends Tr.Base{async init(e){if(this.wire.sendAction("snapshot-source-init").catch((e=>{})),"object"!=typeof e||"function"!=typeof e.getSnapshot||"function"!=typeof e.applySnapshot)throw new Error("you must pass in a valid SnapshotProvider");const t=await this.fin.InterApplicationBus.Channel.create((0,Br.getSnapshotSourceChannelName)(this.fin.me));t.register("get-snapshot",(async()=>({snapshot:await e.getSnapshot()}))),t.register("apply-snapshot",(({snapshot:t})=>e.applySnapshot(t)))}wrapSync(e){return this.wire.sendAction("snapshot-source-wrap-sync").catch((e=>{})),new $r.SnapshotSource(this.wire,e)}async wrap(e){return this.wire.sendAction("snapshot-source-wrap").catch((e=>{})),this.wrapSync(e)}}Ir.SnapshotSourceModule=Gr,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Ir,e),n(Er,e)}(br),Object.defineProperty(a,"__esModule",{value:!0});var Wr=a.Fin=void 0;const Hr=t,Nr=c,Dr=ie(),Ur=Z(),Vr=de,zr=en,Kr=rn,qr=un,Jr=bn,Yr=J(),Zr=An,Qr=ki,Xr=Cr(),eo=br;class to extends Hr.EventEmitter{constructor(e){super(),this.wire=e,this.System=new Nr.System(e),this.Window=new Dr._WindowModule(e),this.Application=new Ur.ApplicationModule(e),this.InterApplicationBus=new Vr.InterApplicationBus(e),this.Clipboard=new zr.Clipboard(e),this.ExternalApplication=new Kr.ExternalApplicationModule(e),this.Frame=new qr._FrameModule(e),this.GlobalHotkey=new Jr.GlobalHotkey(e),this.Platform=new Zr.PlatformModule(e,this.InterApplicationBus.Channel),this.View=new Yr.ViewModule(e),this.Interop=new Xr.InteropModule(e),this.SnapshotSource=new eo.SnapshotSourceModule(e),e.registerFin(this),this.me=(0,Qr.getMe)(e),e.on("disconnected",(()=>{this.emit("disconnected")}))}}Wr=a.Fin=to;var no={},io={};function ro(e){return"string"==typeof e.manifestUrl}function oo(e){return ao(e)&&"string"==typeof e.address}function so(e){return oo(e)&&"string"==typeof e.token}function ao(e){return"string"==typeof e.uuid}function co(e){return e.runtime&&"string"==typeof e.runtime.version}function ho(e){return ao(e)&&co(e)}Object.defineProperty(io,"__esModule",{value:!0}),io.isInternalConnectConfig=io.isPortDiscoveryConfig=io.isNewConnectConfig=io.isConfigWithReceiver=io.isRemoteConfig=io.isExistingConnectConfig=io.isExternalConfig=void 0,io.isExternalConfig=ro,io.isExistingConnectConfig=oo,io.isRemoteConfig=so,io.isConfigWithReceiver=function(e){return"object"==typeof e.receiver&&so({...e,address:""})},io.isNewConnectConfig=ho,io.isPortDiscoveryConfig=function(e){return ro(e)&&co(e)||ho(e)},io.isInternalConnectConfig=function(e){return oo(e)||ho(e)};var lo={},uo={};Object.defineProperty(uo,"__esModule",{value:!0}),uo.EmitterMap=void 0;const po=t;function wo(e){return Buffer.from(e).toString("base64")}uo.EmitterMap=class{constructor(){this.storage=new Map}hashKeys(e){return e.map(wo).join("/")}getOrCreate(e){const t=this.hashKeys(e);return this.storage.has(t)||this.storage.set(t,new po.EventEmitter),this.storage.get(t)}has(e){return this.storage.has(this.hashKeys(e))}delete(e){const t=this.hashKeys(e);return this.storage.delete(t)}},Object.defineProperty(lo,"__esModule",{value:!0});const yo=uo;class fo extends yo.EmitterMap{constructor(){super(...arguments),this.dispatchEvent=e=>{if(function(e){return"process-desktop-event"===e.action}(e)){const{payload:t}=e,n=function(e){const{topic:t}=e;if("frame"===t||"window"===t||"view"===t){const{uuid:n,name:i}=e;return[t,n,i]}if("application"===t){const{uuid:n}=e;return[t,n]}return[t]}(t);if(this.has(n))return this.getOrCreate(n).emit(t.type,t),!0}return!1}}}lo.default=fo;var go,mo,vo=s&&s.__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},Co=s&&s.__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)},bo=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(no,"__esModule",{value:!0});var Io=no.Transport=void 0;const Eo=t,xo=io,Ao=g,Po=bo(lo),Mo=ki,_o=ke;class Oo extends Eo.EventEmitter{constructor(e,t,n){super(),this.wireListeners=new Map,this.topicRefMap=new Map,this.eventAggregator=new Po.default,this.messageHandlers=[this.eventAggregator.dispatchEvent],go.set(this,void 0),mo.set(this,void 0),this.connectSync=()=>{Co(this,go,"f").connectSync()},this.getPort=()=>Co(this,go,"f").getPort(),vo(this,go,new e(this.onmessage.bind(this)),"f"),this.environment=t,this.sendRaw=Co(this,go,"f").send.bind(Co(this,go,"f")),this.registerMessageHandler(this.handleMessage.bind(this)),Co(this,go,"f").on("disconnected",(()=>{for(const[,{handleNack:e}]of this.wireListeners)e({reason:"Remote connection has closed"});this.wireListeners.clear(),this.emit("disconnected")}));const{uuid:i,name:r}=n,o=this.environment.getCurrentEntityType();this.me=(0,Mo.getBaseMe)(o,i,r)}getFin(){if(!Co(this,mo,"f"))throw new Error("No Fin object registered for this transport");return Co(this,mo,"f")}registerFin(e){if(Co(this,mo,"f"))throw new Error("Fin object has already been registered for this transport");vo(this,mo,e,"f")}shutdown(){return Co(this,go,"f").shutdown()}async connect(e){if((0,xo.isConfigWithReceiver)(e))return await Co(this,go,"f").connect(e.receiver),this.authorize(e);if((0,xo.isRemoteConfig)(e))return this.connectRemote(e);if((0,xo.isExistingConnectConfig)(e))return this.connectByPort(e);if((0,xo.isNewConnectConfig)(e)){const t=await this.environment.retrievePort(e);return this.connectByPort({...e,address:`ws://localhost:${t}`})}}async connectRemote(e){return await Co(this,go,"f").connect(new(this.environment.getWsConstructor())(e.address)),this.authorize(e)}async connectByPort(e){const{address:t,uuid:n}=e,i={...e,type:"file-token"},r=Co(this,go,"f");await r.connect(new(this.environment.getWsConstructor())(e.address));const o=await this.sendAction("request-external-authorization",{uuid:n,type:"file-token"},!0);if("external-authorization-response"!==o.action)throw new Ao.UnexpectedActionError(o.action);return await this.environment.writeToken(o.payload.file,o.payload.token),this.authorize(i)}async authorize(e){const t=await this.sendAction("request-authorization",e,!0);if("authorization-response"!==t.action)throw new Ao.UnexpectedActionError(t.action);if(!0!==t.payload.success)throw new Ao.RuntimeError(t.payload)}sendAction(e,t={},n=!1){let i=()=>{};const r=Ao.RuntimeError.getCallSite(1),o=this.environment.getNextMessageId(),s=new Promise(((s,a)=>{i=a;const c={action:e,payload:t,messageId:o},d=Co(this,go,"f");return this.addWireListener(o,s,(e=>this.nackHandler(e,a,r)),n),d.send(c).catch(a)}));return Object.assign(s,{cancel:i,messageId:o})}nackHandler(e,t,n){t("string"==typeof e?e:new Ao.RuntimeError(e,n))}ferryAction(e){return new Promise(((t,n)=>{const i=this.environment.getNextMessageId();e.messageId=i;const r=e=>{t(e.payload)};return Co(this,go,"f").send(e).then((()=>this.addWireListener(i,r,(e=>this.nackHandler(e,n)),!1))).catch(n)}))}registerMessageHandler(e){this.messageHandlers.push(e)}addWireListener(e,t,n,i){i?this.uncorrelatedListener=t:this.wireListeners.has(e)?n({reason:"Duplicate handler id",error:(0,_o.errorToPOJO)(new Ao.DuplicateCorrelationError(String(e)))}):this.wireListeners.set(e,{resolve:t,handleNack:n})}onmessage(e){for(const t of this.messageHandlers)t.call(null,e)}handleMessage(e){const t=e.correlationId||NaN;if("correlationId"in e){if(!this.wireListeners.has(t))return!1;{const{resolve:n,handleNack:i}=this.wireListeners.get(t);"ack"!==e.action?i({reason:"Did not receive ack action",error:(0,_o.errorToPOJO)(new Ao.NoAckError(e.action))}):"payload"in e?e.payload.success?n.call(null,e):i(e.payload):"string"==typeof e.reason?i(e):(console.warn("Received invalid response from core",e),i({reason:"invalid response shape"})),this.wireListeners.delete(t)}}else this.uncorrelatedListener&&this.uncorrelatedListener.call(null,e),this.uncorrelatedListener=()=>{};return!0}}Io=no.Transport=Oo,go=new WeakMap,mo=new WeakMap;const So=(...e)=>({log:(...t)=>console.debug(`[${(new Date).toISOString()}]`,...(e=>e.map((e=>`[${e}]`)))(e),...t),getLogger:(...t)=>So(...e,...t)}),Ro=So("@openfin/core-web/client");function Fo(e,t){if(!function(e){return"string"==typeof e}(e))throw new Error(`Property ${t} has invalid type. Expected string, got ${typeof e}.`)}const jo="web-broker-ports-ready",ko=Ro.getLogger("get-web-interop-ports");function Lo(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)}function To(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}"function"==typeof SuppressedError&&SuppressedError;const $o=e=>{var n,i,r;return r=class extends t.EventEmitter{constructor(t){super(),n.set(this,void 0),i.set(this,!1),this.connectSync=()=>{Lo(this,i,"f")||(e.addEventListener("message",(e=>{e.data?.topic?.startsWith("wire-message")&&e.data.message&&Lo(this,n,"f").call(this,{...JSON.parse(e.data.message),ports:e.ports})})),e.start())},this.connect=async()=>{this.connectSync()},this.send=t=>(e.postMessage({topic:"wire-message",message:JSON.stringify(t)}),Promise.resolve()),this.shutdown=async()=>{e.close()},To(this,n,t,"f")}getPort(){return e}},n=new WeakMap,i=new WeakMap,r};var Bo={},Go={};Object.defineProperty(Go,"__esModule",{value:!0}),Go.BaseEnvironment=void 0;const Wo=vr();Go.BaseEnvironment=class{async getViewWindowIdentity(e,t){const{identity:n}=await e.View.wrapSync(t).getCurrentWindow();return n}async getInteropInfo(e){const t=await e.Application.getCurrentSync().getInfo().catch((()=>null)),n=t?.initialOptions?.interopBrokerConfiguration??{};return{fdc3Version:t?(0,Wo.getDefaultViewFdc3VersionFromAppInfo)(t):void 0,...n,fdc3Info:{providerVersion:await e.System.getVersion(),provider:"OpenFin"}}}},Object.defineProperty(Bo,"__esModule",{value:!0});var Ho=Bo.BrowserEnvironment=void 0;const No=Go;class Do extends No.BaseEnvironment{constructor(){super(...arguments),this.type="other",this.getRandomId=()=>{const e=new Uint32Array(1);return window.crypto.getRandomValues(e)[0].toString(32)}}getAdapterVersionSync(){return""}observeBounds(e,t){throw new Error("Method not implemented.")}layoutAllowedInContext(e){return!1}initLayoutManager(e,t,n){throw new Error("Method not implemented.")}applyLayoutSnapshot(e,t,n){throw new Error("Method not implemented.")}createLayout(e,t){throw new Error("Method not implemented.")}destroyLayout(e,t){throw new Error("Method not implemented.")}resolveLayout(e,t){throw new Error("Method not implemented.")}initPlatform(...e){throw new Error("Method not implemented.")}writeToken(e,t){return Promise.resolve("")}retrievePort(e){throw new Error("Method not implemented.")}getNextMessageId(){return this.getRandomId()}createChildContent(e){throw new Error("Method not implemented.")}getWebWindow(e){throw new Error("Method not implemented.")}getCurrentEntityIdentity(){throw new Error("Method not implemented.")}getCurrentEntityType(){return"external connection"}raiseEvent(e,t){throw new Error("Method not implemented.")}getUrl(){return location.href}getDefaultChannelOptions(){return{create:{},connect:{}}}getRtcPeer(){return new RTCPeerConnection}getWsConstructor(){return WebSocket}whenReady(){return Promise.resolve()}}Ho=Bo.BrowserEnvironment=Do;const Uo=e=>"platform"in e&&void 0!==e.platform;var Vo,zo;class Ko extends Ho{constructor(e){super(),this.connectConfig=e,Vo.set(this,void 0),zo.set(this,new W((async()=>Promise.resolve().then((function(){return __webpack_require__(/*! ./main-b14f67c9.js */ "../../node_modules/@openfin/core-web/out/main-b14f67c9.js")}))))),Uo(e)&&this.validatePlatformOptions(e)}getAdapterVersionSync(){return"0.39.21"}validatePlatformOptions({platform:e}){if(!("layoutSnapshot"in e))throw new Error("Platform options are missing layoutSnapshot. Please provide a layoutSnapshot in the platform options.");if("windows"in e||"windows"in e.layoutSnapshot)throw new Error("It appears you tried to call connect() with a snapshot object from an OpenFin desktop environment. Note that connect() expects to be called with a platform property with this structure: { platform: { layoutSnapshot } }. To get a layoutSnapshot of the expected structure, use fin.Platform.Layout.getCurrentLayoutManagerSync().getLayoutSnapshot() in v34+ in your desktop environment.");const{layouts:t}=e.layoutSnapshot;Object.entries(t).map((([e,t])=>{if("object"!=typeof t||null===t)throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must be an object.`);if(!("content"in t))throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must contain a 'content' property.`)}))}async getInteropInfo(e){return{...{contextGroups:void 0,logging:{beforeAction:{enabled:!1},afterAction:{enabled:!1}}},fdc3Version:void 0,fdc3Info:{providerVersion:"0.39.21",provider:"OpenFin Web"}}}layoutAllowedInContext(e){return!0}async initLayoutManager(e,t,n){if(Lo(this,Vo,"f"))throw new Error("Layout already initialized.");if(!Uo(this.connectConfig))throw new Error("Platform options are missing from connection config.");const{WebLayoutEntryPoint:i}=await Lo(this,zo,"f").getValue();return To(this,Vo,new i(this.connectConfig),"f"),await Lo(this,Vo,"f").initLayoutManager(e,t,n)}async applyLayoutSnapshot(e,t,n){Lo(this,Vo,"f")?.applyLayoutSnapshot(e,t,n)}async createLayout(e,t){return Lo(this,Vo,"f")?.createLayout(e,t)}async destroyLayout(e,t){return Lo(this,Vo,"f")?.destroyLayout(e,t)}async getViewWindowIdentity(e,t){return Promise.resolve({uuid:t.uuid,name:t.uuid})}}Vo=new WeakMap,zo=new WeakMap;const qo=()=>{const e=((e,t)=>{const n=new RegExp(`^${t}<(?.*)>$`).exec(e)?.groups?.meta;if(n)try{return JSON.parse(atob(n))}catch(e){throw new Error(`Failed to decode JSON from ${n}.`)}})(window.name,"of-frame");if(e)try{const{name:t,uuid:n,brokerUrl:i,providerId:r,contextGroup:o}=e;return Fo(i,"brokerUrl"),Fo(n,"uuid"),Fo(t,"name"),{identity:{name:t,uuid:n},brokerUrl:i,interopConfig:{providerId:r,currentContextGroup:o}}}catch(e){throw new Error(`Unexpected error occurred when inferring platform information: ${e.stack}`)}},Jo=()=>{const e=r.v4();return{uuid:e,name:e}},Yo=async e=>{if("enabled"===e.connectionInheritance){const t=await(async e=>{const t=qo();if(t){const{validateOptions:n=(()=>!0)}=e,{identity:i,...r}=t;if(!await n(r))throw new Error("Parent options were rejected by validateOptions.");return t}})(e);if(t)return t}if(!e.options){const t="enabled"===e.connectionInheritance?"Broker URL was not specified nor provided by a platform container.":"Connection inheritance is disabled but no options were provided.";throw new Error(t)}return{...e.options,identity:Jo()}};exports.__classPrivateFieldGet=Lo,exports.__classPrivateFieldSet=To,exports.apiExposer=Gn,exports.commonjsGlobal=s,exports.connect=async t=>{try{Ro.log("Establishing connection",t);const{brokerUrl:n,identity:i,timeout:r,interopConfig:s}=await Yo(t),{workerPort:a,iframeBrokerPort:c}=await(async(e,t,n)=>{const{origin:i}=new URL(e),r=document.createElement("IFRAME");let s;r.style.display="none";try{return await new Promise(((a,c)=>{const d=e=>{if(e.source===r.contentWindow&&e.data?.topic===`ack-${jo}`){if(e.origin!==i)c(new Error(`Broker redirected to unexpected origin ${e.origin}, expected ${i}.`));else if(e.data.success){const[t,n]=e.ports;a({iframeBrokerPort:t,workerPort:n})}else c(new m(e.data));window.removeEventListener("message",d),clearTimeout(s)}};window.addEventListener("message",d),ko.log(`Connecting to broker ${e}`),r.setAttribute("src",e),r.setAttribute("name",o(t,"of-broker")),document.body.appendChild(r),ko.log("Iframe loaded, awaiting init message from iframe"),n&&(s=setTimeout((()=>{window.removeEventListener("message",d),document.body.removeChild(r),c(new Error("Worker did not initialize in time"))}),n))}))}catch(e){throw new Error(`Failed to initialise Fin Web Client. ${e.message}`,{cause:e})}})(n,i,r);Ro.log("Successfully established connection to shared worker");const d={entityType:"external connection",...i};a.start(),c.start();const h=((t,n,i)=>{const r=$o(n),o=new Ko(t),s=new Io(r,o,i);return s.connectSync(),window.Buffer=e.Buffer,new Wr(s)})(t,a,d);return s?.providerId&&(h.me.interop=h.Interop.connectSync(s.providerId),s?.currentContextGroup&&h.me.interop.joinContextGroup(s.currentContextGroup).catch((e=>{console.warn(`Error joining specified context group: ${s?.currentContextGroup}, continuing`,e)}))),{...h,me:{...h.me,identity:{uuid:h.me.uuid,name:h.me.name}}}}catch(e){throw new Error(`An error occured during web-interop connection: ${e.message}`)}},exports.decorators=Nn,exports.encodeOptions=o,exports.layout_constants=ai,exports.lazy=G; /***/ }), -/***/ "./node_modules/@openfin/core-web/out/main-b14f67c9.js": -/*!*************************************************************!*\ - !*** ./node_modules/@openfin/core-web/out/main-b14f67c9.js ***! - \*************************************************************/ +/***/ "../../node_modules/@openfin/core-web/out/main-b14f67c9.js": +/*!*****************************************************************!*\ + !*** ../../node_modules/@openfin/core-web/out/main-b14f67c9.js ***! + \*****************************************************************/ /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; -var t=__webpack_require__(/*! ./main-8cad4070.js */ "./node_modules/@openfin/core-web/out/main-8cad4070.js"),e=__webpack_require__(/*! uuid */ "../../node_modules/uuid/dist/esm-browser/index.js");__webpack_require__(/*! buffer/ */ "../../node_modules/buffer/index.js"),__webpack_require__(/*! events */ "../../node_modules/events/events.js"),__webpack_require__(/*! lodash/cloneDeep */ "../../node_modules/lodash/cloneDeep.js"),__webpack_require__(/*! lodash/isEqual */ "../../node_modules/lodash/isEqual.js");var i={},n={};Object.defineProperty(n,"__esModule",{value:!0}),n.mapValuesAsync=n.mapEntriesAsync=void 0;const o=(t,[e,i])=>({...t,[e]:i});async function s(t,e){return(await Promise.all(e.map((async([e,i])=>[e,await t(i,e)])))).reduce(o,{})}n.mapEntriesAsync=s,n.mapValuesAsync=async function(t,e){let i;return i=e instanceof Map?[...e.entries()]:Object.entries(e),s(t,i)};var r,a,l,h,d=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldSet||function(t,e,i,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(t,i):o?o.value=i:e.set(t,i),i},c=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldGet||function(t,e,i,n){if("a"===i&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?n:"a"===i?n.call(t):n?n.value:e.get(t)};Object.defineProperty(i,"__esModule",{value:!0});var m=i.DefaultLayoutManager=void 0;const u=n;class p{constructor(t){a.set(this,void 0),l.set(this,new Map),d(this,a,t,"f")}size(){return c(this,l,"f").size}async applyLayoutSnapshot({layouts:t}){if(Object.keys(t).length>1)throw new Error("[LayoutManager] Tried to call applyLayoutSnapshot with more than 1 layout. When implementing multiple layouts via overridden LayoutManager class, you must override and fully implement the applyLayoutSnapshot method without calling super.applyLayoutSnapshot().");const[[e,i]]=Object.entries(t);await p.createLayout(this,{layoutName:e,layout:i})}async showLayout({layoutName:t}){}async getLayoutSnapshot(){return{layouts:await(0,u.mapValuesAsync)((t=>t.getFrameSnapshot()),c(this,l,"f"))}}async removeLayout({layoutName:t}){}getLayoutIdentityForView(t){const e=[...c(this,l,"f").values()].find((e=>e.getCurrentViews().some((e=>e.name===t.name&&e.uuid===t.uuid))));return e?.identity??void 0}isLayoutVisible({layoutName:t}){return c(p,r,"m",h).call(p,this,t).isVisible()}resolveLayoutIdentity(t){if(t&&"layoutName"in t)return t;const e=[...c(this,l,"f").values()];if(1===e.length)return e[0].identity;const i=e.find((t=>t.isVisible()));return i?.identity??void 0}static async resolveLayout(t,e){const i=t.resolveLayoutIdentity(e);if(void 0===i||!("layoutName"in i))throw new Error("[layout-manager] resolveLayout: Could not resolve the layout identity. Make sure you include 'layoutName' in the identity object.");return c(p,r,"m",h).call(p,t,i.layoutName)}static async handleSharedView(t,e,i){await(0,u.mapValuesAsync)((async t=>{if(t.identity.layoutName!==e.layoutName){const e=t.getCurrentViews().find((t=>t.name===i.name));e&&await t.onViewDetached({viewIdentity:e,target:null}).catch(console.error)}}),c(t,l,"f"))}static async handleLastViewRemoved(t,e){await t.removeLayout(e),await c(t,a,"f").handleLastViewRemoved(t)}static async destroyLayout(t,{layoutName:e}){await c(p,r,"m",h).call(p,t,e).destroy(),c(t,l,"f").delete(e)}static async createLayout(t,e){const{layoutName:i}=e;if(c(t,l,"f").has(i))throw new Error(`Layout name ${i} already exists`);await c(t,a,"f").createLayout(e,t)}static registerLayout(t,e,i){c(t,l,"f").set(e,i)}static getAllLayouts(t){return[...c(t,l,"f").values()]}static setInitialSnapshot(t,e){c(t,a,"f").setInitialSnapshot(e)}static createClosedConstructor(...t){return class extends p{constructor(){super(...t)}}}}m=i.DefaultLayoutManager=p,r=p,a=new WeakMap,l=new WeakMap,h=function(t,e){const i=c(t,l,"f").get(e);if(!i)throw new Error(`[layout-manager] getLayoutByName: Could not locate layout with name '${e}'`);return i};var g={},f={},v={};Object.defineProperty(v,"__esModule",{value:!0}),v.ReversibleMap=void 0;v.ReversibleMap=class{constructor(){this.valueToKey=new Map,this.keyToValue=new Map,this.setUnique=(t,e)=>{if(this.hasKey(t)||this.hasValue(e))throw new Error("Key or value already in the map.");this.keyToValue.set(t,e),this.valueToKey.set(e,t)},this.getKey=t=>{const e=this.valueToKey.get(t);if(!e)throw new Error("Value not found in the map.");return e},this.deleteKey=t=>{const e=this.getValue(t);return this.keyToValue.delete(t),this.valueToKey.delete(e),e},this.deleteValue=t=>{const e=this.getKey(t);return this.keyToValue.delete(e),this.valueToKey.delete(t),e},this.hasKey=t=>this.keyToValue.has(t),this.hasValue=t=>this.valueToKey.has(t)}getValue(t){const e=this.keyToValue.get(t);if(!e)throw new Error("Key not found in the map.");return e}},Object.defineProperty(f,"__esModule",{value:!0});var _=f.LayoutContentCache=void 0;const y=t.lazy,C=v;class w{constructor(){this.contentItemCache=new C.ReversibleMap,this.contentItemCacheId=0,this.createCacheKey=()=>{const t=`entity-${this.contentItemCacheId.toString()}`;return this.contentItemCacheId+=1,t},this.hasKey=t=>this.contentItemCache.hasKey(t),this.getItemOrUndefined=t=>{try{return this.getContentItemOrThrow(t)}catch(t){return}},this.getContentItemOrThrow=(t,e)=>{if(!this.contentItemCache.hasKey(t))throw new Error("Layout component has been destroyed or detached from the current layout.");const i=this.contentItemCache.getValue(t);if(e&&!e.includes(i.type))throw new Error(`Layout item is not the expected type. Expected ${e.join(", ")}, got ${i.type}.`);return i},this.getOrCreateEntityId=t=>{if(this.contentItemCache.hasValue(t))return this.contentItemCache.getKey(t);t.onDestroyed((()=>{this.contentItemCache.deleteValue(t)}));const e=this.createCacheKey();return this.contentItemCache.setUnique(e,t),e}}static getSingleInstance(){return w.singleton.getValue()}}_=f.LayoutContentCache=w,w.singleton=new y.Lazy((()=>new w));var I={},b={};!function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.getAdjacentStacks=t.doShareEdge=t.getAdjacentItem=void 0;t.getAdjacentItem=(e,i)=>{const{parent:n}=e;if(e.isRoot()||!n)return;const o=["top","bottom"].includes(i)?"column":"row",s=["top","left"].includes(i)?-1:1;if(n.type===o){const t=n.contentItems.indexOf(e)+s;if(t>=0&&t{const n=t.getBounds(),o=e.getBounds();if(!n||!o)return!1;if(["top","bottom"].includes(i)){return!(n.righto.right)}return!(n.bottomo.bottom)};t.getAdjacentStacks=(e,i)=>{const n=["top","bottom"].includes(i)?"row":"column",o=s=>"stack"===s.type?(0,t.doShareEdge)(e,s,i)?[s]:[]:"root"===s.type||"ground"===s.type?[]:s.type===n?s.contentItems.map((t=>o(t))).flat():s.type!==n?["top","right"].includes(i)?o(s.contentItems[s.contentItems.length-1]):o(s.contentItems[0]):[],s=(0,t.getAdjacentItem)(e,i);return s?o(s):[]}}(b);var S=t.commonjsGlobal&&t.commonjsGlobal.__decorate||function(t,e,i,n){var o,s=arguments.length,r=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(s<3?o(r):s>3?o(e,i,r):o(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};Object.defineProperty(I,"__esModule",{value:!0}),I.LayoutEntitiesController=void 0;const E=t.decorators,x=b,L=i;class z{constructor(t,e,i){this.wire=t,this.layoutManager=e,this.layoutContentCache=i,this.analytics=t=>{this.wire.sendAction(`layout-controller-${t}`).catch((()=>{}))},this.getLayoutIdentityForViewOrThrow=async t=>{const e=this.layoutManager.getLayoutIdentityForView(t);if(!e)throw new Error(`View identity ${t.name} is not attached to any layouts.`);return e},this.getRoot=async t=>{this.analytics("get-root");const e=(await this.getLayout(t)).getRoot();return{type:e.type,entityId:this.layoutContentCache.getOrCreateEntityId(e)}},this.getStackByView=async t=>{this.analytics("get-stack-by-view");const e=await this.getLayoutIdentityForViewOrThrow(t),i=(await this.getLayout(e)).getStackByView(t);if("stack"===i?.type)return{entityId:this.layoutContentCache.getOrCreateEntityId(i),type:"stack"}},this.getStackViews=t=>{this.analytics("get-stack-views");return this.layoutContentCache.getContentItemOrThrow(t,["stack"]).contentItems.map((t=>({name:t.viewName,uuid:this.wire.me.uuid})))},this.isRoot=t=>{this.analytics("is-root");return this.layoutContentCache.getContentItemOrThrow(t).isRoot()},this.exists=t=>(this.analytics("exists"),this.layoutContentCache.hasKey(t)),this.addViewToStack=async(t,e,{index:i}={index:0})=>{this.analytics("add-view-to-stack");const n=this.layoutContentCache.getContentItemOrThrow(t);if(i&&i>n.contentItems.length+1)throw new Error(`Index '${i}' out of range, please exclude the index or specify a number between 0 and ${n.contentItems.length}`);const o={id:t,index:i},{identity:s}=await n.layout.platformCreateView(e,{location:o});return s},this.findViewInStack=(t,e)=>t.contentItems.find((t=>t.viewName===e.name)),this.removeViewFromStack=async(t,e)=>{this.analytics("remove-view-from-stack");const i=this.layoutContentCache.getContentItemOrThrow(t,["stack"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to remove a view ('${e.name}') which does not belong to the stack.`);await n.layout.platformCloseView(e)},this.createAdjacentStack=async(t,e,{position:i="right"}={})=>{if(this.analytics("create-adjacent-stack"),!Array.isArray(e)||0===e.length)throw new Error('The parameter "views" must be an array with at least 1 element.');if(!["top","bottom","left","right"].includes(i))throw new Error(`Invalid position '${i}' specified.`);const n=this.layoutContentCache.getContentItemOrThrow(t).createAdjacentStack({position:i}),o=this.layoutContentCache.getOrCreateEntityId(n);return await Promise.all(e.reverse().map((t=>this.addViewToStack(o,t)))),o},this.getAdjacentStacks=async({targetId:t,edge:e})=>{this.analytics("get-adjacent-stacks");const i=this.layoutContentCache.getContentItemOrThrow(t);return(0,x.getAdjacentStacks)(i,e).map((t=>({entityId:this.layoutContentCache.getOrCreateEntityId(t)})))},this.setStackActiveView=async(t,e)=>{this.analytics("set-stack-active-view");const i=this.layoutContentCache.getContentItemOrThrow(t,["stack"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to set a view ('${e.name}') as active when it does not belong to the stack.`);i.setActiveContentItem(n,!0)}}async getLayout(t){const e=await L.DefaultLayoutManager.resolveLayout(this.layoutManager,t);if(!e)throw new Error(`Could not resolve target layout identity ${JSON.stringify(t)}`);return e}getContent(t){this.analytics("get-content");return this.layoutContentCache.getContentItemOrThrow(t,["column","row"]).contentItems.map((t=>({type:t.type,entityId:this.layoutContentCache.getOrCreateEntityId(t)})))}getParent(t){this.analytics("get-parent");const e=this.layoutContentCache.getContentItemOrThrow(t);if(!e.isRoot())return e.parent?.contentItems.includes(e)?{type:e.parent.type,entityId:this.layoutContentCache.getOrCreateEntityId(e.parent)}:void 0}}S([(0,E.expose)()],z.prototype,"getLayoutIdentityForViewOrThrow",void 0),S([(0,E.expose)()],z.prototype,"getRoot",void 0),S([(0,E.expose)()],z.prototype,"getStackByView",void 0),S([(0,E.expose)()],z.prototype,"getStackViews",void 0),S([(0,E.expose)()],z.prototype,"getContent",null),S([(0,E.expose)()],z.prototype,"getParent",null),S([(0,E.expose)()],z.prototype,"isRoot",void 0),S([(0,E.expose)()],z.prototype,"exists",void 0),S([(0,E.expose)()],z.prototype,"addViewToStack",void 0),S([(0,E.expose)()],z.prototype,"removeViewFromStack",void 0),S([(0,E.expose)()],z.prototype,"createAdjacentStack",void 0),S([(0,E.expose)()],z.prototype,"getAdjacentStacks",void 0),S([(0,E.expose)()],z.prototype,"setStackActiveView",void 0),I.LayoutEntitiesController=z,Object.defineProperty(g,"__esModule",{value:!0});var M=g.initLayoutEndpoints=void 0;const P=t.apiExposer,T=t.layout_constants,A=f,k=I,D=i;M=g.initLayoutEndpoints=async function(t,e){const i=t.getFin(),n=await i.Platform.getCurrentSync().getClient(),o=new P.ChannelsExposer(n);await new P.ApiExposer(o).exposeInstance(new k.LayoutEntitiesController(t,e,A.LayoutContentCache.getSingleInstance()),{id:T.LAYOUT_CONTROLLER_ID}),await async function(t,e){const i=t=>async i=>{const n=await D.DefaultLayoutManager.resolveLayout(e,i.target);if(!n)throw new Error(`Could not resolve the layout target from payload ${JSON.stringify(i)}`);return t(n,i)},n=(e,n)=>{t.register(e,i(n))},o=(t,e)=>{n(t,e)};n("replace-view",((t,e)=>t.replaceView(e))),n("replace-layout",((t,{layout:e})=>t.replaceLayout(e))),n("add-view",((t,e)=>t.insertView(e))),o("layout-add-view",((t,{viewOptions:e,location:i,targetView:n})=>t.platformCreateView(e,{location:i,targetView:n}))),n("close-view",((t,e)=>t.cleanupView(e.viewIdentity))),o("layout-close-view",((t,e)=>t.platformCloseView(e.viewIdentity))),n("apply-preset-layout",((t,e)=>t.applyPreset(e))),n("get-layout-views",(t=>t.getCurrentViews())),n("get-frame-snapshot",(t=>t.getFrameSnapshot())),n("is-visible",(t=>t.isVisible())),n("destroy",(t=>t.destroy())),t.register("get-layout-snapshot",(()=>e.getLayoutSnapshot()))}(n,e)};var R={};Object.defineProperty(R,"__esModule",{value:!0});var U=R.BaseLayout=void 0;U=R.BaseLayout=class{};var O={};Object.defineProperty(O,"__esModule",{value:!0});var V=O.DOMEmitter=void 0;V=O.DOMEmitter=class{constructor(t){this.container=t}dispatchLocalEvent(t,e){const i={...e,type:t,tabSelector:`tab-${e.name}`,containerSelector:`container-${e.name}`,topic:"openfin-DOM-event"};this.container.dispatchEvent(new CustomEvent(t,{detail:i}))}};var B={};Object.defineProperty(B,"__esModule",{value:!0});var H=B.mapLayoutContentItemsImmutableSync=B.mapLayoutContentItemsImmutable=W=B.isVisible=void 0;var W=B.isVisible=t=>(0!==t.offsetWidth||0!==t.offsetHeight)&&"hidden"!==window.getComputedStyle(t).visibility&&t.offsetTop>=0&&t.offsetLeft>=0&&t.offsetTop<=window.innerHeight&&t.offsetLeft<=window.innerWidth;const F=t=>"type"in t&&"component"===t.type;B.mapLayoutContentItemsImmutable=async function t(e,i){return F(i)?e(i):{...i,content:await Promise.all(i.content?.map((i=>t(e,i))))}},H=B.mapLayoutContentItemsImmutableSync=function t(e,i){return F(i)?e(i):{...i,content:i.content?.map((i=>t(e,i)))}};class N extends Error{constructor(t,e){super(e),this.type=t}}class G extends N{constructor(t,e){super("Configuration",t),this.node=e}}class j extends N{constructor(t){super("PopoutBlocked",t)}}class $ extends N{constructor(t){super("API",t)}}class Z extends N{constructor(t){super("Bind",t)}}class q extends Error{constructor(t,e,i){super(`${t}: ${e}${void 0===i?"":": "+i}`)}}class X extends q{constructor(t,e){super("Assert",t,e)}}class Y extends q{constructor(t,e,i){super("UnreachableCase",t,`${e}${void 0===i?"":": "+i}`)}}class K extends q{constructor(t,e){super("UnexpectedNull",t,e)}}class J extends q{constructor(t,e){super("UnexpectedUndefined",t,e)}}var Q;!function(t){let e=!1;const i={PopoutCannotBeCreatedWithGroundItemConfig:{id:0,default:"Popout cannot be created with ground ItemConfig"},PleaseRegisterAConstructorFunction:{id:1,default:"Please register a constructor function"},ComponentTypeNotRegisteredAndBindComponentEventHandlerNotAssigned:{id:2,default:"Component type not registered and BindComponentEvent handler not assigned"},ComponentIsAlreadyRegistered:{id:3,default:"Component is already registered"},ComponentIsNotVirtuable:{id:4,default:"Component is not virtuable. Requires rootHtmlElement field/getter"},VirtualComponentDoesNotHaveRootHtmlElement:{id:5,default:'Virtual component does not have getter "rootHtmlElement"'},ItemConfigIsNotTypeComponent:{id:6,default:"ItemConfig is not of type component"},InvalidNumberPartInSizeString:{id:7,default:"Invalid number part in size string"},UnknownUnitInSizeString:{id:8,default:"Unknown unit in size string"},UnsupportedUnitInSizeString:{id:9,default:"Unsupported unit in size string"}};t.idCount=Object.keys(i).length;const n=Object.values(i);t.checkInitialise=function(){if(!e)for(let e=0;e="0"&&t<="9"}function Tt(t,e){const i=zt(e);t.style.width=i}function At(t,e){const i=zt(e);t.style.height=i}function kt(t){return{width:t.offsetWidth,height:t.offsetHeight}}function Dt(t,e){t.style.display=e?"":"none"}function Rt(t,e){if(void 0!==e)for(const i in e)if(e.hasOwnProperty(i)){const n=e[i],o=t[i];t[i]=Ut(o,n)}return t}function Ut(t,e){if("object"!=typeof e)return e;if(Array.isArray(e)){const t=e.length,i=new Array(t);for(let n=0;n36)throw new Error("Too many keys in config minifier map")},t.translateObject=n}(dt||(dt={})),function(t){t.defaults={type:at.ground,content:[],size:1,sizeUnit:ht.Fractional,minSize:void 0,minSizeUnit:ht.Pixel,id:"",isClosable:!0},t.createCopy=function(t,e){switch(t.type){case at.ground:case at.row:case at.column:return gt.createCopy(t,e);case at.stack:return ut.createCopy(t,e);case at.component:return pt.createCopy(t);default:throw new Y("CICC91354",t.type,"Invalid Config Item type specified")}},t.createDefault=function(t){switch(t){case at.ground:throw new X("CICCDR91562");case at.row:case at.column:return gt.createDefault(t);case at.stack:return ut.createDefault();case at.component:return pt.createDefault();default:throw new Y("CICCDD91563",t,"Invalid Config Item type specified")}},t.isComponentItem=function(t){return t.type===at.component},t.isStackItem=function(t){return t.type===at.stack},t.isGroundItem=function(t){return t.type===at.ground}}(ct||(ct={})),function(t){t.defaultMaximised=!1,function(t){t.createCopy=function(t,e){return void 0===t?void 0:{show:null!=e?e:t.show,popout:t.popout,close:t.close,maximise:t.maximise,minimise:t.minimise,tabDropdown:t.tabDropdown}}}(t.Header||(t.Header={}))}(mt||(mt={})),function(t){function e(t){const e=t.length,i=new Array(e);for(let n=0;n"__glMaximised"===t));t>0&&(o=!0,n=n.splice(t,1)),e=n.length>0?n[0]:ct.defaults.id}else e=n;return i=void 0!==t.maximised?t.maximised:o,{id:e,maximised:i}}}(wt||(wt={})),function(t){function e(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0;return{resolved:!0,root:Et.resolve(i),openPopouts:t.resolveOpenPopouts(e.openPopouts),dimensions:t.Dimensions.resolve(e.dimensions),settings:t.Settings.resolve(e.settings),header:t.Header.resolve(e.header,e.settings,e.labels)}}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:Lt.fromResolvedArray(e.openPopouts),settings:_t.Settings.createCopy(e.settings),dimensions:t.Dimensions.fromResolved(e.dimensions),header:_t.Header.createCopy(e.header)}},t.isResolved=function(t){const e=t;return void 0!==e.resolved&&!0===e.resolved},t.resolveOpenPopouts=function(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0,{root:Et.resolve(o),openPopouts:xt.resolveOpenPopouts(e.openPopouts),dimensions:xt.Dimensions.resolve(e.dimensions),settings:xt.Settings.resolve(e.settings),header:xt.Header.resolve(e.header,e.settings,e.labels),parentId:null!==(i=e.parentId)&&void 0!==i?i:null,indexInParent:null!==(n=e.indexInParent)&&void 0!==n?n:null,window:t.Window.resolve(e.window,e.dimensions),resolved:!0}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:i(e.openPopouts),dimensions:xt.Dimensions.fromResolved(e.dimensions),settings:_t.Settings.createCopy(e.settings),header:_t.Header.createCopy(e.header),parentId:e.parentId,indexInParent:e.indexInParent,window:t.Window.fromResolved(e.window)}},t.fromResolvedArray=i}(Lt||(Lt={}));class Wt{constructor(){this._allEventSubscriptions=[],this._subscriptionsMap=new Map,this.unbind=this.removeEventListener,this.trigger=this.emit}tryBubbleEvent(t,e){}emit(t,...e){let i=this._subscriptionsMap.get(t);if(void 0!==i){i=i.slice();for(let t=0;t0){const n=e.slice();n.unshift(t);const o=this._allEventSubscriptions.slice();for(let t=0;t0?n.contentItems[0]:n,e=0);const o=this._layoutManager.createAndInitContentItem(i,t);t.addChild(o,e),this._layoutManager.layoutConfig.settings.popInOnClose?this._onClose():this.close()}createWindow(){const t=this.createUrl(),e=Math.floor(1e6*Math.random()).toString(36),i=this.serializeWindowFeatures({width:this._initialWindowSize.width,height:this._initialWindowSize.height,innerWidth:this._initialWindowSize.width,innerHeight:this._initialWindowSize.height,menubar:"no",toolbar:"no",location:"no",personalbar:"no",resizable:"yes",scrollbars:"no",status:"no"});if(this._popoutWindow=globalThis.open(t,e,i),this._popoutWindow)this._popoutWindow.addEventListener("load",(()=>this.positionWindow()),{passive:!0}),this._popoutWindow.addEventListener("beforeunload",(()=>{this._layoutManager.layoutConfig.settings.popInOnClose?this.popIn():this._onClose()}),{passive:!0}),this._checkReadyInterval=setInterval((()=>this.checkReady()),10);else if(!0===this._layoutManager.layoutConfig.settings.blockedPopoutsThrowError){throw new j("Popout blocked")}}checkReady(){if(null===this._popoutWindow)throw new K("BPCR01844");this._popoutWindow.__glInstance&&this._popoutWindow.__glInstance.isInitialised&&(this.onInitialised(),void 0!==this._checkReadyInterval&&(clearInterval(this._checkReadyInterval),this._checkReadyInterval=void 0))}serializeWindowFeatures(t){const e=[];for(const i in t)e.push(i+"="+t[i].toString());return e.join(",")}createUrl(){const t="gl-window-config-"+Ot(),e=_t.minifyConfig(this._config);try{localStorage.setItem(t,JSON.stringify(e))}catch(t){throw new Error("Error while writing to localStorage "+function(t){return t instanceof Error?t.message:"string"==typeof t?t:"Unknown Error"}(t))}const i=new URL(location.href);return i.searchParams.set("gl-window",t),i.toString()}positionWindow(){if(null===this._popoutWindow)throw new Error("BrowserPopout.positionWindow: null popoutWindow");this._popoutWindow.moveTo(this._initialWindowSize.left,this._initialWindowSize.top),this._popoutWindow.focus()}onInitialised(){this._isInitialised=!0,this.getGlInstance().on("popIn",(()=>this.popIn())),this.emit("initialised")}_onClose(){setTimeout((()=>this.emit("closed")),50)}}class Gt extends Wt{constructor(t,e,i,n){super(),this.layoutManager=t,this._parent=i,this._element=n,this._popInParentIds=[],this._type=e.type,this._id=e.id,this._isInitialised=!1,this.isGround=!1,this.isRow=!1,this.isColumn=!1,this.isStack=!1,this.isComponent=!1,this.size=e.size,this.sizeUnit=e.sizeUnit,this.minSize=e.minSize,this.minSizeUnit=e.minSizeUnit,this._isClosable=e.isClosable,this._pendingEventPropagations={},this._throttledEvents=["stateChanged"],this._contentItems=this.createContentItems(e.content)}get type(){return this._type}get id(){return this._id}set id(t){this._id=t}get popInParentIds(){return this._popInParentIds}get parent(){return this._parent}get contentItems(){return this._contentItems}get isClosable(){return this._isClosable}get element(){return this._element}get isInitialised(){return this._isInitialised}static isStack(t){return t.isStack}static isComponentItem(t){return t.isComponent}static isComponentParentableItem(t){return t.isStack||t.isGround}removeChild(t,e=!1){const i=this._contentItems.indexOf(t);if(-1===i)throw new Error("Can't remove child item. Unknown content item");if(e||this._contentItems[i].destroy(),this._contentItems.splice(i,1),this._contentItems.length>0)this.updateSize(!1);else if(!this.isGround&&!0===this._isClosable){if(null===this._parent)throw new K("CIUC00874");this._parent.removeChild(this)}}addChild(t,e,i){return null!=e||(e=this._contentItems.length),this._contentItems.splice(e,0,t),t.setParent(this),!0===this._isInitialised&&!1===t._isInitialised&&t.init(),e}replaceChild(t,e,i=!1){const n=this._contentItems.indexOf(t),o=t._element.parentNode;if(-1===n)throw new X("CIRCI23232","Can't replace child. oldChild is not child of this");if(null===o)throw new K("CIRCP23232");if(o.replaceChild(e._element,t._element),!0===i&&(t._parent=null,t.destroy()),this._contentItems[n]=e,e.setParent(this),e.size=t.size,e.sizeUnit=t.sizeUnit,e.minSize=t.minSize,e.minSizeUnit=t.minSizeUnit,null===e._parent)throw new K("CIRCNC45699");!0===e._parent._isInitialised&&!1===e._isInitialised&&e.init(),this.updateSize(!1)}remove(){if(null===this._parent)throw new K("CIR11110");this._parent.removeChild(this)}popout(){const t=Ot(),e=this.layoutManager.createPopoutFromContentItem(this,void 0,t,void 0);return this.emitBaseBubblingEvent("stateChanged"),e}calculateConfigContent(){const t=this._contentItems,e=t.length,i=new Array(e);for(let n=0;nthis.propagateEventToLayoutManager(t,e))))}propagateEventToLayoutManager(t,e){this._pendingEventPropagations[t]=!1,this.layoutManager.emitUnknown(t,e)}}class jt extends Gt{constructor(t,e,i){super(t,e,i,document.createElement("div")),this._parentItem=i,this._focused=!1,this.isComponent=!0,this._reorderEnabled=e.reorderEnabled,this.applyUpdatableConfig(e),this._initialWantMaximise=e.maximised;const n=document.createElement("div");n.classList.add("lm_content"),this.element.appendChild(n),this._container=new Ft(e,this,t,n,(t=>this.handleUpdateItemConfigEvent(t)),(()=>this.show()),(()=>this.hide()),(t=>this.focus(t)),(t=>this.blur(t)))}get componentName(){return this._container.componentType}get componentType(){return this._container.componentType}get reorderEnabled(){return this._reorderEnabled}get initialWantMaximise(){return this._initialWantMaximise}get component(){return this._container.component}get container(){return this._container}get parentItem(){return this._parentItem}get headerConfig(){return this._headerConfig}get title(){return this._title}get tab(){return this._tab}get focused(){return this._focused}destroy(){this._container.destroy(),super.destroy()}applyUpdatableConfig(t){this.setTitle(t.title),this._headerConfig=t.header}toConfig(){const t=this._container.stateRequestEvent,e=void 0===t?this._container.state:t();return{type:at.component,content:[],size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,maximised:!1,isClosable:this.isClosable,reorderEnabled:this._reorderEnabled,title:this._title,header:mt.Header.createCopy(this._headerConfig),componentType:pt.copyComponentType(this.componentType),componentState:e}}close(){if(null===this.parent)throw new K("CIC68883");this.parent.removeChild(this,!1)}enterDragMode(t,e){Tt(this.element,t),At(this.element,e),this._container.enterDragMode(t,e)}exitDragMode(){this._container.exitDragMode()}enterStackMaximised(){this._container.enterStackMaximised()}exitStackMaximised(){this._container.exitStackMaximised()}drag(){this._container.drag()}updateSize(t){this.updateNodeSize(t)}init(){this.updateNodeSize(!1),super.init(),this._container.emit("open"),this.initContentItems()}setTitle(t){this._title=t,this.emit("titleChanged",t),this.emit("stateChanged")}setTab(t){this._tab=t,this.emit("tab",t),this._container.setTab(t)}hide(){super.hide(),this._container.setVisibility(!1)}show(){super.show(),this._container.setVisibility(!0)}focus(t=!1){this.parentItem.setActiveComponentItem(this,!0,t)}setFocused(t){this._focused=!0,this.tab.setFocused(),t||this.emitBaseBubblingEvent("focus")}blur(t=!1){this._focused&&this.layoutManager.setFocusedComponentItem(void 0,t)}setBlurred(t){this._focused=!1,this.tab.setBlurred(),t||this.emitBaseBubblingEvent("blur")}setParent(t){this._parentItem=t,super.setParent(t)}handleUpdateItemConfigEvent(t){this.applyUpdatableConfig(t)}updateNodeSize(t){if("none"!==this.element.style.display){const{width:e,height:i}=kt(this.element);this._container.setSizeToNodeSize(e,i,t)}}}class $t extends Gt{constructor(){super(...arguments),this._focused=!1}get focused(){return this._focused}setFocusedValue(t){this._focused=t}}class Zt extends Wt{constructor(t,e){super(),this._eElement=t,this._pointerTracking=!1,this._pointerDownEventListener=t=>this.onPointerDown(t),this._pointerMoveEventListener=t=>this.onPointerMove(t),this._pointerUpEventListener=t=>this.onPointerUp(t),this._timeout=void 0,this._allowableTargets=[t,...e],this._oDocument=document,this._eBody=document.body,this._nDelay=1800,this._nDistance=10,this._nX=0,this._nY=0,this._nOriginalX=0,this._nOriginalY=0,this._dragging=!1,this._eElement.addEventListener("pointerdown",this._pointerDownEventListener,{passive:!0})}destroy(){this.checkRemovePointerTrackingEventListeners(),this._eElement.removeEventListener("pointerdown",this._pointerDownEventListener)}cancelDrag(){this.processDragStop(void 0)}onPointerDown(t){if(this._allowableTargets.includes(t.target)&&t.isPrimary){const e=this.getPointerCoordinates(t);this.processPointerDown(e)}}processPointerDown(t){this._nOriginalX=t.x,this._nOriginalY=t.y,this._oDocument.addEventListener("pointermove",this._pointerMoveEventListener),this._oDocument.addEventListener("pointerup",this._pointerUpEventListener,{passive:!0}),this._pointerTracking=!0,this._timeout=setTimeout((()=>{try{this.startDrag()}catch(t){throw console.error(t),t}}),this._nDelay)}onPointerMove(t){this._pointerTracking&&(this.processDragMove(t),t.preventDefault())}processDragMove(t){this._nX=t.pageX-this._nOriginalX,this._nY=t.pageY-this._nOriginalY,!1===this._dragging&&(Math.abs(this._nX)>this._nDistance||Math.abs(this._nY)>this._nDistance)&&this.startDrag(),this._dragging&&this.emit("drag",this._nX,this._nY,t)}onPointerUp(t){this.processDragStop(t)}processDragStop(t){var e;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this.checkRemovePointerTrackingEventListeners(),!0===this._dragging&&(this._eBody.classList.remove("lm_dragging"),this._eElement.classList.remove("lm_dragging"),null===(e=this._oDocument.querySelector("iframe"))||void 0===e||e.style.setProperty("pointer-events",""),this._dragging=!1,this.emit("dragStop",t))}checkRemovePointerTrackingEventListeners(){this._pointerTracking&&(this._oDocument.removeEventListener("pointermove",this._pointerMoveEventListener),this._oDocument.removeEventListener("pointerup",this._pointerUpEventListener),this._pointerTracking=!1)}startDrag(){var t;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this._dragging=!0,this._eBody.classList.add("lm_dragging"),this._eElement.classList.add("lm_dragging"),null===(t=this._oDocument.querySelector("iframe"))||void 0===t||t.style.setProperty("pointer-events","none"),this.emit("dragStart",this._nOriginalX,this._nOriginalY)}getPointerCoordinates(t){return{x:t.pageX,y:t.pageY}}}class qt{constructor(t,e,i){this._isVertical=t,this._size=e,this._grabSize=i0){const i=this.createSplitter(Math.max(0,e-1)).element;e>0?(this.contentItems[e-1].element.insertAdjacentElement("afterend",i),i.insertAdjacentElement("afterend",t.element)):(this.contentItems[0].element.insertAdjacentElement("beforebegin",i),i.insertAdjacentElement("beforebegin",t.element))}else this._childElementContainer.appendChild(t.element);super.addChild(t,e);const n=1/this.contentItems.length*100;if(!0===i)return this.emitBaseBubblingEvent("stateChanged"),e;for(let e=0;e0&&(this.calculateRelativeSizes(),this.setAbsoluteSizes()),this.emitBaseBubblingEvent("stateChanged"),this.emit("resize")}setAbsoluteSizes(){const t=this.calculateAbsoluteSizes();for(let e=0;e0&&t.itemSizes[e]++,this._isColumn?(Tt(this.contentItems[e].element,t.crossAxisSize),At(this.contentItems[e].element,t.itemSizes[e])):(Tt(this.contentItems[e].element,t.itemSizes[e]),At(this.contentItems[e].element,t.crossAxisSize))}calculateAbsoluteSizes(){const t=(this.contentItems.length-1)*this._splitterSize,{width:e,height:i}=kt(this.element);let n,o;this._isColumn?(n=i-t,o=e):(n=e-t,o=i);let s=0;const r=[];for(let t=0;t0){const n=100-t;for(let t=0;t100&&e.length>0){for(let t=0;te)return;{const r=i/e;let a=i;for(let e=0;ethis.onSplitterDrag(e,t,i))),e.on("dragStop",(()=>this.onSplitterDragStop(e))),e.on("dragStart",(()=>this.onSplitterDragStart(e))),this._splitter.splice(t,0,e),e}getSplitItems(t){const e=this._splitter.indexOf(t);return{before:this.contentItems[e],after:this.contentItems[e+1]}}calculateContentItemMinSize(t){const e=t.minSize;if(void 0!==e){if(t.minSizeUnit===ht.Pixel)return e;throw new X("ROCGMD98831",JSON.stringify(t))}{const t=this.layoutManager.layoutConfig.dimensions;return this._isColumn?t.defaultMinItemHeight:t.defaultMinItemWidth}}calculateContentItemsTotalMinSize(t){let e=0;for(const i of t)e+=this.calculateContentItemMinSize(i);return e}onSplitterDragStart(t){const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=this.calculateContentItemsTotalMinSize(e.before.contentItems),s=this.calculateContentItemsTotalMinSize(e.after.contentItems);this._splitterPosition=0,this._splitterMinPosition=-1*(i-o),this._splitterMaxPosition=n-s}onSplitterDrag(t,e,i){let n=this._isColumn?i:e;if(null===this._splitterMinPosition||null===this._splitterMaxPosition)throw new K("ROCOSD59226");n=Math.max(n,this._splitterMinPosition),n=Math.min(n,this._splitterMaxPosition),this._splitterPosition=n;const o=zt(n);this._isColumn?t.element.style.top=o:t.element.style.left=o}onSplitterDragStop(t){if(null===this._splitterPosition)throw new K("ROCOSDS66932");{const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=(this._splitterPosition+i)/(i+n),s=e.before.size+e.after.size;e.before.size=o*s,e.after.size=(1-o)*s,t.element.style.top=zt(0),t.element.style.left=zt(0),globalThis.requestAnimationFrame((()=>this.updateSize(!1)))}}}!function(t){t.getElementDimensionSize=function(t,e){return"width"===e?function(t){return t.offsetWidth}(t):function(t){return t.offsetHeight}(t)},t.setElementDimensionSize=function(t,e,i){return"width"===e?Tt(t,i):At(t,i)},t.createElement=function(t,e){const i=t.createElement("div");return i.classList.add("lm_item"),e?i.classList.add("lm_column"):i.classList.add("lm_row"),i}}(Xt||(Xt={}));class Yt extends $t{constructor(t,e,i){super(t,vt.create(e),null,Yt.createElement(document)),this.isGround=!0,this._childElementContainer=this.element,this._containerElement=i;let n=null;for(;;){const t=n?n.previousSibling:this._containerElement.lastChild;if(!(t instanceof Element&&t.classList.contains("lm_content")))break;n=t}this._containerElement.insertBefore(this.element,n)}init(){if(!0!==this.isInitialised){this.updateNodeSize();for(let t=0;t0?this.contentItems[0]:this,n.isComponent)throw new Error("Cannot add item as child to ComponentItem");{const t=this.layoutManager.createAndInitContentItem(i,n);return e=n.addChild(t,e),n===this?-1:e}}loadComponentAsRoot(t){this.clearRoot();const e=Ct.resolve(t,!1);if(e.maximised)throw new Error("Root Component cannot be maximised");{const t=new jt(this.layoutManager,e,this);t.init(),this.addChild(t,0)}}addChild(t,e){if(this.contentItems.length>0)throw new Error("Ground node can only have a single child");return this._childElementContainer.appendChild(t.element),e=super.addChild(t,e),this.updateSize(!1),this.emitBaseBubblingEvent("stateChanged"),e}calculateConfigContent(){const t=this.contentItems,e=t.length,i=new Array(e);for(let n=0;n0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e)),this.updateContentItemsSize(!1))}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}createSideAreas(){const t=Yt.Area.oppositeSides,e=new Array(Object.keys(t).length);let i=0;for(const n in t){const o=n,s=this.getElementArea();if(null===s)throw new K("RCSA77553");s.side=o,"2"===t[o][1]?s[o]=s[t[o]]-50:s[o]=s[t[o]]+50,s.surface=(s.x2-s.x1)*(s.y2-s.y1),e[i++]=s}return e}highlightDropZone(t,e,i){this.layoutManager.tabDropPlaceholder.remove(),super.highlightDropZone(t,e,i)}onDrop(t,e){if(t.isComponent){const e=ut.createDefault(),i=t;e.header=mt.Header.createCopy(i.headerConfig);const n=this.layoutManager.createAndInitContentItem(e,this);n.addChild(t),t=n}if(0===this.contentItems.length)this.addChild(t);else{if(t.type===at.row||t.type===at.column){const e=ut.createDefault(),i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}const i="x"==e.side[0]?at.row:at.column,n="2"==e.side[1],o=this.contentItems[0];if(o instanceof Xt&&o.type===i){const e=o.contentItems[n?0:o.contentItems.length-1];o.addChild(t,n?0:void 0,!0),e.size*=.5,t.size=e.size,t.sizeUnit=ht.Percent,o.updateSize(!1)}else{const e=ct.createDefault(i),s=this.layoutManager.createContentItem(e,this);this.replaceChild(o,s),s.addChild(t,n?0:void 0,!0),s.addChild(o,n?void 0:0,!0),o.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}}dock(){throw new X("GID87731")}validateDocking(){throw new X("GIVD87732")}getAllContentItems(){const t=[this];return this.deepGetAllContentItems(this.contentItems,t),t}getConfigMaximisedItems(){const t=[];return this.deepFilterContentItems(this.contentItems,t,(t=>!(!Gt.isStack(t)||!t.initialWantMaximise)||!(!Gt.isComponentItem(t)||!t.initialWantMaximise))),t}getItemsByPopInParentId(t){const e=[];return this.deepFilterContentItems(this.contentItems,e,(e=>e.popInParentIds.includes(t))),e}toConfig(){throw new Error("Cannot generate GroundItem config")}setActiveComponentItem(t,e,i){}updateNodeSize(){const{width:t,height:e}=kt(this._containerElement);Tt(this.element,t),At(this.element,e),this.contentItems.length>0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e))}deepGetAllContentItems(t,e){for(let i=0;ithis.onClick(t),this._touchStartEventListener=t=>this.onTouchStart(t),this._element=document.createElement("div"),this._element.classList.add(i),this._element.title=e,this._header.on("destroy",(()=>this.destroy())),this._element.addEventListener("click",this._clickEventListener,{passive:!0}),this._element.addEventListener("touchstart",this._touchStartEventListener,{passive:!0}),this._header.controlsContainerElement.appendChild(this._element)}get element(){return this._element}destroy(){var t;this._element.removeEventListener("click",this._clickEventListener),this._element.removeEventListener("touchstart",this._touchStartEventListener),null===(t=this._element.parentNode)||void 0===t||t.removeChild(this._element)}onClick(t){this._pushEvent(t)}onTouchStart(t){this._pushEvent(t)}}class Jt{constructor(t,e,i,n,o){var s;this._layoutManager=t,this._componentItem=e,this._closeEvent=i,this._focusEvent=n,this._dragStartEvent=o,this._isActive=!1,this._tabClickListener=t=>this.onTabClickDown(t),this._tabTouchStartListener=t=>this.onTabTouchStart(t),this._closeClickListener=()=>this.onCloseClick(),this._closeTouchStartListener=()=>this.onCloseTouchStart(),this._dragStartListener=(t,e)=>this.onDragStart(t,e),this._contentItemDestroyListener=()=>this.onContentItemDestroy(),this._tabTitleChangedListener=t=>this.setTitle(t),this._element=document.createElement("div"),this._element.classList.add("lm_tab"),this._titleElement=document.createElement("span"),this._titleElement.classList.add("lm_title"),this._closeElement=document.createElement("div"),this._closeElement.classList.add("lm_close_tab"),this._element.appendChild(this._titleElement),this._element.appendChild(this._closeElement),e.isClosable?this._closeElement.style.display="":this._closeElement.style.display="none",this.setTitle(e.title),this._componentItem.on("titleChanged",this._tabTitleChangedListener);(null!==(s=e.reorderEnabled)&&void 0!==s?s:this._layoutManager.layoutConfig.settings.reorderEnabled)&&this.enableReorder(),this._element.addEventListener("click",this._tabClickListener,{passive:!0}),this._element.addEventListener("touchstart",this._tabTouchStartListener,{passive:!0}),this._componentItem.isClosable?(this._closeElement.addEventListener("click",this._closeClickListener,{passive:!0}),this._closeElement.addEventListener("touchstart",this._closeTouchStartListener,{passive:!0})):(this._closeElement.remove(),this._closeElement=void 0),this._componentItem.setTab(this),this._layoutManager.emit("tabCreated",this)}get isActive(){return this._isActive}get componentItem(){return this._componentItem}get contentItem(){return this._componentItem}get element(){return this._element}get titleElement(){return this._titleElement}get closeElement(){return this._closeElement}get reorderEnabled(){return void 0!==this._dragListener}set reorderEnabled(t){t!==this.reorderEnabled&&(t?this.enableReorder():this.disableReorder())}setTitle(t){this._titleElement.innerText=t,this._element.title=t}setActive(t){t!==this._isActive&&(this._isActive=t,t?this._element.classList.add("lm_active"):this._element.classList.remove("lm_active"))}destroy(){var t,e;this._closeEvent=void 0,this._focusEvent=void 0,this._dragStartEvent=void 0,this._element.removeEventListener("click",this._tabClickListener),this._element.removeEventListener("touchstart",this._tabTouchStartListener),null===(t=this._closeElement)||void 0===t||t.removeEventListener("click",this._closeClickListener),null===(e=this._closeElement)||void 0===e||e.removeEventListener("touchstart",this._closeTouchStartListener),this._componentItem.off("titleChanged",this._tabTitleChangedListener),this.reorderEnabled&&this.disableReorder(),this._element.remove()}setBlurred(){this._element.classList.remove("lm_focused"),this._titleElement.classList.remove("lm_focused")}setFocused(){this._element.classList.add("lm_focused"),this._titleElement.classList.add("lm_focused")}onDragStart(t,e){if(void 0===this._dragListener)throw new J("TODSDLU10093");if(void 0===this._dragStartEvent)throw new J("TODS23309");this._dragStartEvent(t,e,this._dragListener,this.componentItem)}onContentItemDestroy(){void 0!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=void 0)}onTabClickDown(t){const e=t.target;e!==this._element&&e!==this._titleElement||(0===t.button?this.notifyFocus():1===t.button&&this._componentItem.isClosable&&this.notifyClose())}onTabTouchStart(t){t.target===this._element&&this.notifyFocus()}onCloseClick(){this.notifyClose()}onCloseTouchStart(){this.notifyClose()}notifyClose(){if(void 0===this._closeEvent)throw new J("TNC15007");this._closeEvent(this._componentItem)}notifyFocus(){if(void 0===this._focusEvent)throw new J("TNA15007");this._focusEvent(this._componentItem)}enableReorder(){this._dragListener=new Zt(this._element,[this._titleElement]),this._dragListener.on("dragStart",this._dragStartListener),this._componentItem.on("destroy",this._contentItemDestroyListener)}disableReorder(){if(void 0===this._dragListener)throw new J("TDR87745");this._componentItem.off("destroy",this._contentItemDestroyListener),this._dragListener.off("dragStart",this._dragStartListener),this._dragListener=void 0}}class Qt{constructor(t,e,i,n,o){this._layoutManager=t,this._componentRemoveEvent=e,this._componentFocusEvent=i,this._componentDragStartEvent=n,this._dropdownActiveChangedEvent=o,this._tabs=[],this._lastVisibleTabIndex=-1,this._dropdownActive=!1,this._element=document.createElement("section"),this._element.classList.add("lm_tabs"),this._dropdownElement=document.createElement("section"),this._dropdownElement.classList.add("lm_tabdropdown_list"),this._dropdownElement.style.display="none"}get tabs(){return this._tabs}get tabCount(){return this._tabs.length}get lastVisibleTabIndex(){return this._lastVisibleTabIndex}get element(){return this._element}get dropdownElement(){return this._dropdownElement}get dropdownActive(){return this._dropdownActive}destroy(){for(let t=0;tthis.handleTabCloseEvent(t)),(t=>this.handleTabFocusEvent(t)),((t,e,i,n)=>this.handleTabDragStartEvent(t,e,i,n)));void 0===e&&(e=this._tabs.length),this._tabs.splice(e,0,i),ethis._lastVisibleTabIndex){const t=this._tabs[e];for(let t=e;t>0;t--)this._tabs[t]=this._tabs[t-1];this._tabs[0]=t}}updateTabSizes(t,e){let i=!1;this.tryUpdateTabSizes(i,t,e)||(i=!0,this.tryUpdateTabSizes(i,t,e)),i!==this._dropdownActive&&(this._dropdownActive=i,this._dropdownActiveChangedEvent())}tryUpdateTabSizes(t,e,i){if(this._tabs.length>0){if(void 0===i)throw new Error("non-empty tabs must have active component item");let n=0,o=!1;const s=this._layoutManager.layoutConfig.settings.tabOverlapAllowance,r=this._tabs.indexOf(i.tab),a=this._tabs[r];this._lastVisibleTabIndex=-1;for(let i=0;ie){if(o)i===r&&(l.style.zIndex="auto",l.style.marginLeft="",l.parentElement!==this._element&&this._element.appendChild(l));else{let t;if(t=r>0&&r<=i?(d-e)/(i-1):(d-e)/i,tthis.onClick(t),this._touchStartListener=t=>this.onTouchStart(t),this._rowColumnClosable=!0,this._closeButton=null,this._popoutButton=null,this._tabsContainer=new Qt(this._layoutManager,(t=>this.handleTabInitiatedComponentRemoveEvent(t)),(t=>this.handleTabInitiatedComponentFocusEvent(t)),((t,e,i,n)=>this.handleTabInitiatedDragStartEvent(t,e,i,n)),(()=>this.processTabDropdownActiveChanged())),this._show=i.show,this._popoutEnabled=i.popoutEnabled,this._popoutLabel=i.popoutLabel,this._maximiseEnabled=i.maximiseEnabled,this._maximiseLabel=i.maximiseLabel,this._minimiseEnabled=i.minimiseEnabled,this._minimiseLabel=i.minimiseLabel,this._closeEnabled=i.closeEnabled,this._closeLabel=i.closeLabel,this._tabDropdownEnabled=i.tabDropdownEnabled,this._tabDropdownLabel=i.tabDropdownLabel,this.setSide(i.side),this._canRemoveComponent=this._configClosable,this._element=document.createElement("section"),this._element.classList.add("lm_header"),this._controlsContainerElement=document.createElement("section"),this._controlsContainerElement.classList.add("lm_controls"),this._element.appendChild(this._tabsContainer.element),this._element.appendChild(this._controlsContainerElement),this._element.appendChild(this._tabsContainer.dropdownElement),this._element.addEventListener("click",this._clickListener,{passive:!0}),this._element.addEventListener("touchstart",this._touchStartListener,{passive:!0}),this._documentMouseUpListener=()=>this._tabsContainer.hideAdditionalTabsDropdown(),globalThis.document.addEventListener("mouseup",this._documentMouseUpListener,{passive:!0}),this._tabControlOffset=this._layoutManager.layoutConfig.settings.tabControlOffset,this._tabDropdownEnabled&&(this._tabDropdownButton=new Kt(this,this._tabDropdownLabel,"lm_tabdropdown",(()=>this._tabsContainer.showAdditionalTabsDropdown()))),this._popoutEnabled&&(this._popoutButton=new Kt(this,this._popoutLabel,"lm_popout",(()=>this.handleButtonPopoutEvent()))),this._maximiseEnabled&&(this._maximiseButton=new Kt(this,this._maximiseLabel,"lm_maximise",(t=>this.handleButtonMaximiseToggleEvent(t)))),this._configClosable&&(this._closeButton=new Kt(this,this._closeLabel,"lm_close",(()=>s()))),this.processTabDropdownActiveChanged()}get show(){return this._show}get side(){return this._side}get leftRightSided(){return this._leftRightSided}get layoutManager(){return this._layoutManager}get parent(){return this._parent}get tabs(){return this._tabsContainer.tabs}get lastVisibleTabIndex(){return this._tabsContainer.lastVisibleTabIndex}get element(){return this._element}get tabsContainerElement(){return this._tabsContainer.element}get controlsContainerElement(){return this._controlsContainerElement}destroy(){this.emit("destroy"),this._popoutEvent=void 0,this._maximiseToggleEvent=void 0,this._clickEvent=void 0,this._touchStartEvent=void 0,this._componentRemoveEvent=void 0,this._componentFocusEvent=void 0,this._componentDragStartEvent=void 0,this._tabsContainer.destroy(),globalThis.document.removeEventListener("mouseup",this._documentMouseUpListener),this._element.remove()}createTab(t,e){this._tabsContainer.createTab(t,e)}removeTab(t){this._tabsContainer.removeTab(t)}processActiveComponentChanged(t){this._tabsContainer.processActiveComponentChanged(t),this.updateTabSizes()}setSide(t){this._side=t,this._leftRightSided=[nt.right,nt.left].includes(this._side)}setRowColumnClosable(t){this._rowColumnClosable=t,this.updateClosability()}updateClosability(){let t;if(this._configClosable)if(this._rowColumnClosable){t=!0;const e=this.tabs.length;for(let i=0;i1}applyFocusedValue(t){t?this._element.classList.add("lm_focused"):this._element.classList.remove("lm_focused")}processMaximised(){if(void 0===this._maximiseButton)throw new J("HPMAX16997");this._maximiseButton.element.setAttribute("title",this._minimiseLabel)}processMinimised(){if(void 0===this._maximiseButton)throw new J("HPMIN16997");this._maximiseButton.element.setAttribute("title",this._maximiseLabel)}updateTabSizes(){if(this._tabsContainer.tabCount>0){const t=this._show?this._layoutManager.layoutConfig.dimensions.headerHeight:0;let e;this._leftRightSided?(this._element.style.height="",this._element.style.width=zt(t)):(this._element.style.width="",this._element.style.height=zt(t)),e=this._leftRightSided?this._element.offsetHeight-this._controlsContainerElement.offsetHeight-this._tabControlOffset:this._element.offsetWidth-this._controlsContainerElement.offsetWidth-this._tabControlOffset,this._tabsContainer.updateTabSizes(e,this._getActiveComponentItemEvent())}}handleTabInitiatedComponentRemoveEvent(t){if(this._canRemoveComponent){if(void 0===this._componentRemoveEvent)throw new J("HHTCE22294");this._componentRemoveEvent(t)}}handleTabInitiatedComponentFocusEvent(t){if(void 0===this._componentFocusEvent)throw new J("HHTAE22294");this._componentFocusEvent(t)}handleTabInitiatedDragStartEvent(t,e,i,n){if(this._canRemoveComponent){if(void 0===this._componentDragStartEvent)throw new J("HHTDSE22294");this._componentDragStartEvent(t,e,i,n)}else i.cancelDrag()}processTabDropdownActiveChanged(){void 0!==this._tabDropdownButton&&Dt(this._tabDropdownButton.element,this._tabsContainer.dropdownActive)}handleButtonPopoutEvent(){if(this._layoutManager.layoutConfig.settings.popoutWholeStack){if(void 0===this._popoutEvent)throw new J("HHBPOE17834");this._popoutEvent()}else{const t=this._getActiveComponentItemEvent();t&&t.popout()}}handleButtonMaximiseToggleEvent(t){if(void 0===this._maximiseToggleEvent)throw new J("HHBMTE16834");this._maximiseToggleEvent()}onClick(t){t.target===this._element&&this.notifyClick(t)}onTouchStart(t){t.target===this._element&&this.notifyTouchStart(t)}notifyClick(t){if(void 0===this._clickEvent)throw new J("HNHC46834");this._clickEvent(t)}notifyTouchStart(t){if(void 0===this._touchStartEvent)throw new J("HNHTS46834");this._touchStartEvent(t)}}class ee extends $t{constructor(t,e,i){var n,o,s,r,a,l,h,d,c,m,u,p,g,f,v,_,y,C,w;super(t,e,i,ee.createElement(document)),this._headerSideChanged=!1,this._resizeListener=()=>this.handleResize(),this._maximisedListener=()=>this.handleMaximised(),this._minimisedListener=()=>this.handleMinimised(),this._headerConfig=e.header;const I=t.layoutConfig.header,b=e.content;let S;if(1!==b.length)S=void 0;else{S=b[0].header}this._initialWantMaximise=e.maximised,this._initialActiveItemIndex=null!==(n=e.activeItemIndex)&&void 0!==n?n:0;const E=null!==(r=null!==(s=null===(o=this._headerConfig)||void 0===o?void 0:o.show)&&void 0!==s?s:null==S?void 0:S.show)&&void 0!==r?r:I.show,x=null!==(h=null!==(l=null===(a=this._headerConfig)||void 0===a?void 0:a.popout)&&void 0!==l?l:null==S?void 0:S.popout)&&void 0!==h?h:I.popout,L=null!==(m=null!==(c=null===(d=this._headerConfig)||void 0===d?void 0:d.maximise)&&void 0!==c?c:null==S?void 0:S.maximise)&&void 0!==m?m:I.maximise,z=null!==(g=null!==(p=null===(u=this._headerConfig)||void 0===u?void 0:u.close)&&void 0!==p?p:null==S?void 0:S.close)&&void 0!==g?g:I.close,M=null!==(_=null!==(v=null===(f=this._headerConfig)||void 0===f?void 0:f.minimise)&&void 0!==v?v:null==S?void 0:S.minimise)&&void 0!==_?_:I.minimise,P=null!==(w=null!==(C=null===(y=this._headerConfig)||void 0===y?void 0:y.tabDropdown)&&void 0!==C?C:null==S?void 0:S.tabDropdown)&&void 0!==w?w:I.tabDropdown;this._maximisedEnabled=!1!==L;const T={show:!1!==E,side:!1===E?nt.top:E,popoutEnabled:!1!==x,popoutLabel:!1===x?"":x,maximiseEnabled:this._maximisedEnabled,maximiseLabel:!1===L?"":L,closeEnabled:!1!==z,closeLabel:!1===z?"":z,minimiseEnabled:!0,minimiseLabel:M,tabDropdownEnabled:!1!==P,tabDropdownLabel:!1===P?"":P};this._header=new te(t,this,T,e.isClosable&&!1!==z,(()=>this.getActiveComponentItem()),(()=>this.remove()),(()=>this.handlePopoutEvent()),(()=>this.toggleMaximise()),(t=>this.handleHeaderClickEvent(t)),(t=>this.handleHeaderTouchStartEvent(t)),(t=>this.handleHeaderComponentRemoveEvent(t)),(t=>this.handleHeaderComponentFocusEvent(t)),((t,e,i,n)=>this.handleHeaderComponentStartDragEvent(t,e,i,n))),this.isStack=!0,this._childElementContainer=document.createElement("section"),this._childElementContainer.classList.add("lm_items"),this.on("resize",this._resizeListener),this._maximisedEnabled&&(this.on("maximised",this._maximisedListener),this.on("minimised",this._minimisedListener)),this.element.appendChild(this._header.element),this.element.appendChild(this._childElementContainer),this.setupHeaderPosition(),this._header.updateClosability()}get childElementContainer(){return this._childElementContainer}get header(){return this._header}get headerShow(){return this._header.show}get headerSide(){return this._header.side}get headerLeftRightSided(){return this._header.leftRightSided}get contentAreaDimensions(){return this._contentAreaDimensions}get initialWantMaximise(){return this._initialWantMaximise}get isMaximised(){return this===this.layoutManager.maximisedStack}get stackParent(){if(!this.parent)throw new Error("Stack should always have a parent");return this.parent}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}init(){if(!0===this.isInitialised)return;this.updateNodeSize();for(let t=0;t0){if(this._initialActiveItemIndex<0||this._initialActiveItemIndex>=e)throw new Error(`ActiveItemIndex out of range: ${this._initialActiveItemIndex} id: ${this.id}`);for(let i=0;ithis.contentItems.length)throw e-=1,new X("SAC99728");if(t instanceof jt)return e=super.addChild(t,e),this._childElementContainer.appendChild(t.element),this._header.createTab(t,e),this.setActiveComponentItem(t,i),this._header.updateTabSizes(),this.updateSize(!1),t.container.setBaseLogicalZIndex(),this._header.updateClosability(),this.emitStateChangedEvent(),e;throw new X("SACC88532")}removeChild(t,e){const i=t,n=this.contentItems.indexOf(i),o=1===this.contentItems.length;if(this._activeComponentItem===i&&(i.focused&&i.blur(),!o)){const t=0===n?1:n-1;this.setActiveComponentItem(this.contentItems[t],!1)}this._header.removeTab(i),super.removeChild(i,e),o||this._header.updateClosability(),this.emitStateChangedEvent()}toggleMaximise(){this.isMaximised?this.minimise():this.maximise()}maximise(){if(!this.isMaximised){this.layoutManager.setMaximisedStack(this);const t=this.contentItems,e=t.length;for(let i=0;i0&&void 0===t)throw new Error("expected non-empty stack to have an active component item");return{type:"stack",content:this.calculateConfigContent(),size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,isClosable:this.isClosable,maximised:this.isMaximised,header:this.createHeaderConfig(),activeItemIndex:t}}onDrop(t,e){if("header"===this._dropSegment){if(this.resetHeaderDropZone(),void 0===this._dropIndex)throw new J("SODDI68990");return void this.addChild(t,this._dropIndex)}if("body"===this._dropSegment)return void this.addChild(t,0,!0);const i="top"===this._dropSegment||"bottom"===this._dropSegment,n="left"===this._dropSegment||"right"===this._dropSegment,o="top"===this._dropSegment||"left"===this._dropSegment,s=i&&this.stackParent.isColumn||n&&this.stackParent.isRow;if(t.isComponent){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createAndInitContentItem(e,this);i.addChild(t),t=i}if(t.type===at.row||t.type===at.column){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}if(s){const e=this.stackParent.contentItems.indexOf(this);this.stackParent.addChild(t,o?e:e+1,!0),this.size*=.5,t.size=this.size,t.sizeUnit=this.sizeUnit,this.stackParent.updateSize(!1)}else{const e=i?at.column:at.row,n=ct.createDefault(e),s=this.layoutManager.createContentItem(n,this);this.stackParent.replaceChild(this,s),s.addChild(t,o?0:void 0,!0),s.addChild(this,o?void 0:0,!0),this.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}highlightDropZone(t,e){for(const i in this._contentAreaDimensions){const n=i,o=this._contentAreaDimensions[n].hoverArea;if(o.x1t&&o.y1e)return void("header"===n?(this._dropSegment="header",this.highlightHeaderDropZone(this._header.leftRightSided?e:t)):(this.resetHeaderDropZone(),this.highlightBodyDropZone(n)))}}getArea(){if("none"===this.element.style.display)return null;const t=super.getElementArea(this._header.element),e=super.getElementArea(this._childElementContainer);if(null===t||null===e)throw new K("SGAHC13086");const i=e.x2-e.x1,n=e.y2-e.y1;return this._contentAreaDimensions={header:{hoverArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2},highlightArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2}}},0===this.contentItems.length?(this._contentAreaDimensions.body={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2}},super.getElementArea(this.element)):(this._contentAreaDimensions.left={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x1+.25*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x1+.5*i,y2:e.y2}},this._contentAreaDimensions.top={hoverArea:{x1:e.x1+.25*i,y1:e.y1,x2:e.x1+.75*i,y2:e.y1+.5*n},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y1+.5*n}},this._contentAreaDimensions.right={hoverArea:{x1:e.x1+.75*i,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1+.5*i,y1:e.y1,x2:e.x2,y2:e.y2}},this._contentAreaDimensions.bottom={hoverArea:{x1:e.x1+.25*i,y1:e.y1+.5*n,x2:e.x1+.75*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1+.5*n,x2:e.x2,y2:e.y2}},super.getElementArea(this.element))}positionHeader(t){this._header.side!==t&&(this._header.setSide(t),this._headerSideChanged=!0,this.setupHeaderPosition())}updateNodeSize(){if("none"!==this.element.style.display){const t=kt(this.element);if(this._header.show){t[this._header.leftRightSided?it.width:it.height]-=this.layoutManager.layoutConfig.dimensions.headerHeight}this._childElementContainer.style.width=zt(t.width),this._childElementContainer.style.height=zt(t.height);for(let e=0;e=o&&t({...t,[e]:i});async function s(t,e){return(await Promise.all(e.map((async([e,i])=>[e,await t(i,e)])))).reduce(o,{})}n.mapEntriesAsync=s,n.mapValuesAsync=async function(t,e){let i;return i=e instanceof Map?[...e.entries()]:Object.entries(e),s(t,i)};var r,a,l,h,d=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldSet||function(t,e,i,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(t,i):o?o.value=i:e.set(t,i),i},c=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldGet||function(t,e,i,n){if("a"===i&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?n:"a"===i?n.call(t):n?n.value:e.get(t)};Object.defineProperty(i,"__esModule",{value:!0});var m=i.DefaultLayoutManager=void 0;const u=n;class p{constructor(t){a.set(this,void 0),l.set(this,new Map),d(this,a,t,"f")}size(){return c(this,l,"f").size}async applyLayoutSnapshot({layouts:t}){if(Object.keys(t).length>1)throw new Error("[LayoutManager] Tried to call applyLayoutSnapshot with more than 1 layout. When implementing multiple layouts via overridden LayoutManager class, you must override and fully implement the applyLayoutSnapshot method without calling super.applyLayoutSnapshot().");const[[e,i]]=Object.entries(t);await p.createLayout(this,{layoutName:e,layout:i})}async showLayout({layoutName:t}){}async getLayoutSnapshot(){return{layouts:await(0,u.mapValuesAsync)((t=>t.getFrameSnapshot()),c(this,l,"f"))}}async removeLayout({layoutName:t}){}getLayoutIdentityForView(t){const e=[...c(this,l,"f").values()].find((e=>e.getCurrentViews().some((e=>e.name===t.name&&e.uuid===t.uuid))));return e?.identity??void 0}isLayoutVisible({layoutName:t}){return c(p,r,"m",h).call(p,this,t).isVisible()}resolveLayoutIdentity(t){if(t&&"layoutName"in t)return t;const e=[...c(this,l,"f").values()];if(1===e.length)return e[0].identity;const i=e.find((t=>t.isVisible()));return i?.identity??void 0}static async resolveLayout(t,e){const i=t.resolveLayoutIdentity(e);if(void 0===i||!("layoutName"in i))throw new Error("[layout-manager] resolveLayout: Could not resolve the layout identity. Make sure you include 'layoutName' in the identity object.");return c(p,r,"m",h).call(p,t,i.layoutName)}static async handleSharedView(t,e,i){await(0,u.mapValuesAsync)((async t=>{if(t.identity.layoutName!==e.layoutName){const e=t.getCurrentViews().find((t=>t.name===i.name));e&&await t.onViewDetached({viewIdentity:e,target:null}).catch(console.error)}}),c(t,l,"f"))}static async handleLastViewRemoved(t,e){await t.removeLayout(e),await c(t,a,"f").handleLastViewRemoved(t)}static async destroyLayout(t,{layoutName:e}){await c(p,r,"m",h).call(p,t,e).destroy(),c(t,l,"f").delete(e)}static async createLayout(t,e){const{layoutName:i}=e;if(c(t,l,"f").has(i))throw new Error(`Layout name ${i} already exists`);await c(t,a,"f").createLayout(e,t)}static registerLayout(t,e,i){c(t,l,"f").set(e,i)}static getAllLayouts(t){return[...c(t,l,"f").values()]}static setInitialSnapshot(t,e){c(t,a,"f").setInitialSnapshot(e)}static createClosedConstructor(...t){return class extends p{constructor(){super(...t)}}}}m=i.DefaultLayoutManager=p,r=p,a=new WeakMap,l=new WeakMap,h=function(t,e){const i=c(t,l,"f").get(e);if(!i)throw new Error(`[layout-manager] getLayoutByName: Could not locate layout with name '${e}'`);return i};var g={},f={},v={};Object.defineProperty(v,"__esModule",{value:!0}),v.ReversibleMap=void 0;v.ReversibleMap=class{constructor(){this.valueToKey=new Map,this.keyToValue=new Map,this.setUnique=(t,e)=>{if(this.hasKey(t)||this.hasValue(e))throw new Error("Key or value already in the map.");this.keyToValue.set(t,e),this.valueToKey.set(e,t)},this.getKey=t=>{const e=this.valueToKey.get(t);if(!e)throw new Error("Value not found in the map.");return e},this.deleteKey=t=>{const e=this.getValue(t);return this.keyToValue.delete(t),this.valueToKey.delete(e),e},this.deleteValue=t=>{const e=this.getKey(t);return this.keyToValue.delete(e),this.valueToKey.delete(t),e},this.hasKey=t=>this.keyToValue.has(t),this.hasValue=t=>this.valueToKey.has(t)}getValue(t){const e=this.keyToValue.get(t);if(!e)throw new Error("Key not found in the map.");return e}},Object.defineProperty(f,"__esModule",{value:!0});var _=f.LayoutContentCache=void 0;const y=t.lazy,C=v;class w{constructor(){this.contentItemCache=new C.ReversibleMap,this.contentItemCacheId=0,this.createCacheKey=()=>{const t=`entity-${this.contentItemCacheId.toString()}`;return this.contentItemCacheId+=1,t},this.hasKey=t=>this.contentItemCache.hasKey(t),this.getItemOrUndefined=t=>{try{return this.getContentItemOrThrow(t)}catch(t){return}},this.getContentItemOrThrow=(t,e)=>{if(!this.contentItemCache.hasKey(t))throw new Error("Layout component has been destroyed or detached from the current layout.");const i=this.contentItemCache.getValue(t);if(e&&!e.includes(i.type))throw new Error(`Layout item is not the expected type. Expected ${e.join(", ")}, got ${i.type}.`);return i},this.getOrCreateEntityId=t=>{if(this.contentItemCache.hasValue(t))return this.contentItemCache.getKey(t);t.onDestroyed((()=>{this.contentItemCache.deleteValue(t)}));const e=this.createCacheKey();return this.contentItemCache.setUnique(e,t),e}}static getSingleInstance(){return w.singleton.getValue()}}_=f.LayoutContentCache=w,w.singleton=new y.Lazy((()=>new w));var I={},b={};!function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.getAdjacentStacks=t.doShareEdge=t.getAdjacentItem=void 0;t.getAdjacentItem=(e,i)=>{const{parent:n}=e;if(e.isRoot()||!n)return;const o=["top","bottom"].includes(i)?"column":"row",s=["top","left"].includes(i)?-1:1;if(n.type===o){const t=n.contentItems.indexOf(e)+s;if(t>=0&&t{const n=t.getBounds(),o=e.getBounds();if(!n||!o)return!1;if(["top","bottom"].includes(i)){return!(n.righto.right)}return!(n.bottomo.bottom)};t.getAdjacentStacks=(e,i)=>{const n=["top","bottom"].includes(i)?"row":"column",o=s=>"stack"===s.type?(0,t.doShareEdge)(e,s,i)?[s]:[]:"root"===s.type||"ground"===s.type?[]:s.type===n?s.contentItems.map((t=>o(t))).flat():s.type!==n?["top","right"].includes(i)?o(s.contentItems[s.contentItems.length-1]):o(s.contentItems[0]):[],s=(0,t.getAdjacentItem)(e,i);return s?o(s):[]}}(b);var S=t.commonjsGlobal&&t.commonjsGlobal.__decorate||function(t,e,i,n){var o,s=arguments.length,r=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(s<3?o(r):s>3?o(e,i,r):o(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};Object.defineProperty(I,"__esModule",{value:!0}),I.LayoutEntitiesController=void 0;const E=t.decorators,x=b,L=i;class z{constructor(t,e,i){this.wire=t,this.layoutManager=e,this.layoutContentCache=i,this.analytics=t=>{this.wire.sendAction(`layout-controller-${t}`).catch((()=>{}))},this.getLayoutIdentityForViewOrThrow=async t=>{const e=this.layoutManager.getLayoutIdentityForView(t);if(!e)throw new Error(`View identity ${t.name} is not attached to any layouts.`);return e},this.getRoot=async t=>{this.analytics("get-root");const e=(await this.getLayout(t)).getRoot();return{type:e.type,entityId:this.layoutContentCache.getOrCreateEntityId(e)}},this.getStackByView=async t=>{this.analytics("get-stack-by-view");const e=await this.getLayoutIdentityForViewOrThrow(t),i=(await this.getLayout(e)).getStackByView(t);if("stack"===i?.type)return{entityId:this.layoutContentCache.getOrCreateEntityId(i),type:"stack"}},this.getStackViews=t=>{this.analytics("get-stack-views");return this.layoutContentCache.getContentItemOrThrow(t,["stack"]).contentItems.map((t=>({name:t.viewName,uuid:this.wire.me.uuid})))},this.isRoot=t=>{this.analytics("is-root");return this.layoutContentCache.getContentItemOrThrow(t).isRoot()},this.exists=t=>(this.analytics("exists"),this.layoutContentCache.hasKey(t)),this.addViewToStack=async(t,e,{index:i}={index:0})=>{this.analytics("add-view-to-stack");const n=this.layoutContentCache.getContentItemOrThrow(t);if(i&&i>n.contentItems.length+1)throw new Error(`Index '${i}' out of range, please exclude the index or specify a number between 0 and ${n.contentItems.length}`);const o={id:t,index:i},{identity:s}=await n.layout.platformCreateView(e,{location:o});return s},this.findViewInStack=(t,e)=>t.contentItems.find((t=>t.viewName===e.name)),this.removeViewFromStack=async(t,e)=>{this.analytics("remove-view-from-stack");const i=this.layoutContentCache.getContentItemOrThrow(t,["stack"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to remove a view ('${e.name}') which does not belong to the stack.`);await n.layout.platformCloseView(e)},this.createAdjacentStack=async(t,e,{position:i="right"}={})=>{if(this.analytics("create-adjacent-stack"),!Array.isArray(e)||0===e.length)throw new Error('The parameter "views" must be an array with at least 1 element.');if(!["top","bottom","left","right"].includes(i))throw new Error(`Invalid position '${i}' specified.`);const n=this.layoutContentCache.getContentItemOrThrow(t).createAdjacentStack({position:i}),o=this.layoutContentCache.getOrCreateEntityId(n);return await Promise.all(e.reverse().map((t=>this.addViewToStack(o,t)))),o},this.getAdjacentStacks=async({targetId:t,edge:e})=>{this.analytics("get-adjacent-stacks");const i=this.layoutContentCache.getContentItemOrThrow(t);return(0,x.getAdjacentStacks)(i,e).map((t=>({entityId:this.layoutContentCache.getOrCreateEntityId(t)})))},this.setStackActiveView=async(t,e)=>{this.analytics("set-stack-active-view");const i=this.layoutContentCache.getContentItemOrThrow(t,["stack"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to set a view ('${e.name}') as active when it does not belong to the stack.`);i.setActiveContentItem(n,!0)}}async getLayout(t){const e=await L.DefaultLayoutManager.resolveLayout(this.layoutManager,t);if(!e)throw new Error(`Could not resolve target layout identity ${JSON.stringify(t)}`);return e}getContent(t){this.analytics("get-content");return this.layoutContentCache.getContentItemOrThrow(t,["column","row"]).contentItems.map((t=>({type:t.type,entityId:this.layoutContentCache.getOrCreateEntityId(t)})))}getParent(t){this.analytics("get-parent");const e=this.layoutContentCache.getContentItemOrThrow(t);if(!e.isRoot())return e.parent?.contentItems.includes(e)?{type:e.parent.type,entityId:this.layoutContentCache.getOrCreateEntityId(e.parent)}:void 0}}S([(0,E.expose)()],z.prototype,"getLayoutIdentityForViewOrThrow",void 0),S([(0,E.expose)()],z.prototype,"getRoot",void 0),S([(0,E.expose)()],z.prototype,"getStackByView",void 0),S([(0,E.expose)()],z.prototype,"getStackViews",void 0),S([(0,E.expose)()],z.prototype,"getContent",null),S([(0,E.expose)()],z.prototype,"getParent",null),S([(0,E.expose)()],z.prototype,"isRoot",void 0),S([(0,E.expose)()],z.prototype,"exists",void 0),S([(0,E.expose)()],z.prototype,"addViewToStack",void 0),S([(0,E.expose)()],z.prototype,"removeViewFromStack",void 0),S([(0,E.expose)()],z.prototype,"createAdjacentStack",void 0),S([(0,E.expose)()],z.prototype,"getAdjacentStacks",void 0),S([(0,E.expose)()],z.prototype,"setStackActiveView",void 0),I.LayoutEntitiesController=z,Object.defineProperty(g,"__esModule",{value:!0});var M=g.initLayoutEndpoints=void 0;const P=t.apiExposer,T=t.layout_constants,A=f,k=I,D=i;M=g.initLayoutEndpoints=async function(t,e){const i=t.getFin(),n=await i.Platform.getCurrentSync().getClient(),o=new P.ChannelsExposer(n);await new P.ApiExposer(o).exposeInstance(new k.LayoutEntitiesController(t,e,A.LayoutContentCache.getSingleInstance()),{id:T.LAYOUT_CONTROLLER_ID}),await async function(t,e){const i=t=>async i=>{const n=await D.DefaultLayoutManager.resolveLayout(e,i.target);if(!n)throw new Error(`Could not resolve the layout target from payload ${JSON.stringify(i)}`);return t(n,i)},n=(e,n)=>{t.register(e,i(n))},o=(t,e)=>{n(t,e)};n("replace-view",((t,e)=>t.replaceView(e))),n("replace-layout",((t,{layout:e})=>t.replaceLayout(e))),n("add-view",((t,e)=>t.insertView(e))),o("layout-add-view",((t,{viewOptions:e,location:i,targetView:n})=>t.platformCreateView(e,{location:i,targetView:n}))),n("close-view",((t,e)=>t.cleanupView(e.viewIdentity))),o("layout-close-view",((t,e)=>t.platformCloseView(e.viewIdentity))),n("apply-preset-layout",((t,e)=>t.applyPreset(e))),n("get-layout-views",(t=>t.getCurrentViews())),n("get-frame-snapshot",(t=>t.getFrameSnapshot())),n("is-visible",(t=>t.isVisible())),n("destroy",(t=>t.destroy())),t.register("get-layout-snapshot",(()=>e.getLayoutSnapshot()))}(n,e)};var R={};Object.defineProperty(R,"__esModule",{value:!0});var U=R.BaseLayout=void 0;U=R.BaseLayout=class{};var O={};Object.defineProperty(O,"__esModule",{value:!0});var V=O.DOMEmitter=void 0;V=O.DOMEmitter=class{constructor(t){this.container=t}dispatchLocalEvent(t,e){const i={...e,type:t,tabSelector:`tab-${e.name}`,containerSelector:`container-${e.name}`,topic:"openfin-DOM-event"};this.container.dispatchEvent(new CustomEvent(t,{detail:i}))}};var B={};Object.defineProperty(B,"__esModule",{value:!0});var H=B.mapLayoutContentItemsImmutableSync=B.mapLayoutContentItemsImmutable=W=B.isVisible=void 0;var W=B.isVisible=t=>(0!==t.offsetWidth||0!==t.offsetHeight)&&"hidden"!==window.getComputedStyle(t).visibility&&t.offsetTop>=0&&t.offsetLeft>=0&&t.offsetTop<=window.innerHeight&&t.offsetLeft<=window.innerWidth;const F=t=>"type"in t&&"component"===t.type;B.mapLayoutContentItemsImmutable=async function t(e,i){return F(i)?e(i):{...i,content:await Promise.all(i.content?.map((i=>t(e,i))))}},H=B.mapLayoutContentItemsImmutableSync=function t(e,i){return F(i)?e(i):{...i,content:i.content?.map((i=>t(e,i)))}};class N extends Error{constructor(t,e){super(e),this.type=t}}class G extends N{constructor(t,e){super("Configuration",t),this.node=e}}class j extends N{constructor(t){super("PopoutBlocked",t)}}class $ extends N{constructor(t){super("API",t)}}class Z extends N{constructor(t){super("Bind",t)}}class q extends Error{constructor(t,e,i){super(`${t}: ${e}${void 0===i?"":": "+i}`)}}class X extends q{constructor(t,e){super("Assert",t,e)}}class Y extends q{constructor(t,e,i){super("UnreachableCase",t,`${e}${void 0===i?"":": "+i}`)}}class K extends q{constructor(t,e){super("UnexpectedNull",t,e)}}class J extends q{constructor(t,e){super("UnexpectedUndefined",t,e)}}var Q;!function(t){let e=!1;const i={PopoutCannotBeCreatedWithGroundItemConfig:{id:0,default:"Popout cannot be created with ground ItemConfig"},PleaseRegisterAConstructorFunction:{id:1,default:"Please register a constructor function"},ComponentTypeNotRegisteredAndBindComponentEventHandlerNotAssigned:{id:2,default:"Component type not registered and BindComponentEvent handler not assigned"},ComponentIsAlreadyRegistered:{id:3,default:"Component is already registered"},ComponentIsNotVirtuable:{id:4,default:"Component is not virtuable. Requires rootHtmlElement field/getter"},VirtualComponentDoesNotHaveRootHtmlElement:{id:5,default:'Virtual component does not have getter "rootHtmlElement"'},ItemConfigIsNotTypeComponent:{id:6,default:"ItemConfig is not of type component"},InvalidNumberPartInSizeString:{id:7,default:"Invalid number part in size string"},UnknownUnitInSizeString:{id:8,default:"Unknown unit in size string"},UnsupportedUnitInSizeString:{id:9,default:"Unsupported unit in size string"}};t.idCount=Object.keys(i).length;const n=Object.values(i);t.checkInitialise=function(){if(!e)for(let e=0;e="0"&&t<="9"}function Tt(t,e){const i=zt(e);t.style.width=i}function At(t,e){const i=zt(e);t.style.height=i}function kt(t){return{width:t.offsetWidth,height:t.offsetHeight}}function Dt(t,e){t.style.display=e?"":"none"}function Rt(t,e){if(void 0!==e)for(const i in e)if(e.hasOwnProperty(i)){const n=e[i],o=t[i];t[i]=Ut(o,n)}return t}function Ut(t,e){if("object"!=typeof e)return e;if(Array.isArray(e)){const t=e.length,i=new Array(t);for(let n=0;n36)throw new Error("Too many keys in config minifier map")},t.translateObject=n}(dt||(dt={})),function(t){t.defaults={type:at.ground,content:[],size:1,sizeUnit:ht.Fractional,minSize:void 0,minSizeUnit:ht.Pixel,id:"",isClosable:!0},t.createCopy=function(t,e){switch(t.type){case at.ground:case at.row:case at.column:return gt.createCopy(t,e);case at.stack:return ut.createCopy(t,e);case at.component:return pt.createCopy(t);default:throw new Y("CICC91354",t.type,"Invalid Config Item type specified")}},t.createDefault=function(t){switch(t){case at.ground:throw new X("CICCDR91562");case at.row:case at.column:return gt.createDefault(t);case at.stack:return ut.createDefault();case at.component:return pt.createDefault();default:throw new Y("CICCDD91563",t,"Invalid Config Item type specified")}},t.isComponentItem=function(t){return t.type===at.component},t.isStackItem=function(t){return t.type===at.stack},t.isGroundItem=function(t){return t.type===at.ground}}(ct||(ct={})),function(t){t.defaultMaximised=!1,function(t){t.createCopy=function(t,e){return void 0===t?void 0:{show:null!=e?e:t.show,popout:t.popout,close:t.close,maximise:t.maximise,minimise:t.minimise,tabDropdown:t.tabDropdown}}}(t.Header||(t.Header={}))}(mt||(mt={})),function(t){function e(t){const e=t.length,i=new Array(e);for(let n=0;n"__glMaximised"===t));t>0&&(o=!0,n=n.splice(t,1)),e=n.length>0?n[0]:ct.defaults.id}else e=n;return i=void 0!==t.maximised?t.maximised:o,{id:e,maximised:i}}}(wt||(wt={})),function(t){function e(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0;return{resolved:!0,root:Et.resolve(i),openPopouts:t.resolveOpenPopouts(e.openPopouts),dimensions:t.Dimensions.resolve(e.dimensions),settings:t.Settings.resolve(e.settings),header:t.Header.resolve(e.header,e.settings,e.labels)}}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:Lt.fromResolvedArray(e.openPopouts),settings:_t.Settings.createCopy(e.settings),dimensions:t.Dimensions.fromResolved(e.dimensions),header:_t.Header.createCopy(e.header)}},t.isResolved=function(t){const e=t;return void 0!==e.resolved&&!0===e.resolved},t.resolveOpenPopouts=function(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0,{root:Et.resolve(o),openPopouts:xt.resolveOpenPopouts(e.openPopouts),dimensions:xt.Dimensions.resolve(e.dimensions),settings:xt.Settings.resolve(e.settings),header:xt.Header.resolve(e.header,e.settings,e.labels),parentId:null!==(i=e.parentId)&&void 0!==i?i:null,indexInParent:null!==(n=e.indexInParent)&&void 0!==n?n:null,window:t.Window.resolve(e.window,e.dimensions),resolved:!0}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:i(e.openPopouts),dimensions:xt.Dimensions.fromResolved(e.dimensions),settings:_t.Settings.createCopy(e.settings),header:_t.Header.createCopy(e.header),parentId:e.parentId,indexInParent:e.indexInParent,window:t.Window.fromResolved(e.window)}},t.fromResolvedArray=i}(Lt||(Lt={}));class Wt{constructor(){this._allEventSubscriptions=[],this._subscriptionsMap=new Map,this.unbind=this.removeEventListener,this.trigger=this.emit}tryBubbleEvent(t,e){}emit(t,...e){let i=this._subscriptionsMap.get(t);if(void 0!==i){i=i.slice();for(let t=0;t0){const n=e.slice();n.unshift(t);const o=this._allEventSubscriptions.slice();for(let t=0;t0?n.contentItems[0]:n,e=0);const o=this._layoutManager.createAndInitContentItem(i,t);t.addChild(o,e),this._layoutManager.layoutConfig.settings.popInOnClose?this._onClose():this.close()}createWindow(){const t=this.createUrl(),e=Math.floor(1e6*Math.random()).toString(36),i=this.serializeWindowFeatures({width:this._initialWindowSize.width,height:this._initialWindowSize.height,innerWidth:this._initialWindowSize.width,innerHeight:this._initialWindowSize.height,menubar:"no",toolbar:"no",location:"no",personalbar:"no",resizable:"yes",scrollbars:"no",status:"no"});if(this._popoutWindow=globalThis.open(t,e,i),this._popoutWindow)this._popoutWindow.addEventListener("load",(()=>this.positionWindow()),{passive:!0}),this._popoutWindow.addEventListener("beforeunload",(()=>{this._layoutManager.layoutConfig.settings.popInOnClose?this.popIn():this._onClose()}),{passive:!0}),this._checkReadyInterval=setInterval((()=>this.checkReady()),10);else if(!0===this._layoutManager.layoutConfig.settings.blockedPopoutsThrowError){throw new j("Popout blocked")}}checkReady(){if(null===this._popoutWindow)throw new K("BPCR01844");this._popoutWindow.__glInstance&&this._popoutWindow.__glInstance.isInitialised&&(this.onInitialised(),void 0!==this._checkReadyInterval&&(clearInterval(this._checkReadyInterval),this._checkReadyInterval=void 0))}serializeWindowFeatures(t){const e=[];for(const i in t)e.push(i+"="+t[i].toString());return e.join(",")}createUrl(){const t="gl-window-config-"+Ot(),e=_t.minifyConfig(this._config);try{localStorage.setItem(t,JSON.stringify(e))}catch(t){throw new Error("Error while writing to localStorage "+function(t){return t instanceof Error?t.message:"string"==typeof t?t:"Unknown Error"}(t))}const i=new URL(location.href);return i.searchParams.set("gl-window",t),i.toString()}positionWindow(){if(null===this._popoutWindow)throw new Error("BrowserPopout.positionWindow: null popoutWindow");this._popoutWindow.moveTo(this._initialWindowSize.left,this._initialWindowSize.top),this._popoutWindow.focus()}onInitialised(){this._isInitialised=!0,this.getGlInstance().on("popIn",(()=>this.popIn())),this.emit("initialised")}_onClose(){setTimeout((()=>this.emit("closed")),50)}}class Gt extends Wt{constructor(t,e,i,n){super(),this.layoutManager=t,this._parent=i,this._element=n,this._popInParentIds=[],this._type=e.type,this._id=e.id,this._isInitialised=!1,this.isGround=!1,this.isRow=!1,this.isColumn=!1,this.isStack=!1,this.isComponent=!1,this.size=e.size,this.sizeUnit=e.sizeUnit,this.minSize=e.minSize,this.minSizeUnit=e.minSizeUnit,this._isClosable=e.isClosable,this._pendingEventPropagations={},this._throttledEvents=["stateChanged"],this._contentItems=this.createContentItems(e.content)}get type(){return this._type}get id(){return this._id}set id(t){this._id=t}get popInParentIds(){return this._popInParentIds}get parent(){return this._parent}get contentItems(){return this._contentItems}get isClosable(){return this._isClosable}get element(){return this._element}get isInitialised(){return this._isInitialised}static isStack(t){return t.isStack}static isComponentItem(t){return t.isComponent}static isComponentParentableItem(t){return t.isStack||t.isGround}removeChild(t,e=!1){const i=this._contentItems.indexOf(t);if(-1===i)throw new Error("Can't remove child item. Unknown content item");if(e||this._contentItems[i].destroy(),this._contentItems.splice(i,1),this._contentItems.length>0)this.updateSize(!1);else if(!this.isGround&&!0===this._isClosable){if(null===this._parent)throw new K("CIUC00874");this._parent.removeChild(this)}}addChild(t,e,i){return null!=e||(e=this._contentItems.length),this._contentItems.splice(e,0,t),t.setParent(this),!0===this._isInitialised&&!1===t._isInitialised&&t.init(),e}replaceChild(t,e,i=!1){const n=this._contentItems.indexOf(t),o=t._element.parentNode;if(-1===n)throw new X("CIRCI23232","Can't replace child. oldChild is not child of this");if(null===o)throw new K("CIRCP23232");if(o.replaceChild(e._element,t._element),!0===i&&(t._parent=null,t.destroy()),this._contentItems[n]=e,e.setParent(this),e.size=t.size,e.sizeUnit=t.sizeUnit,e.minSize=t.minSize,e.minSizeUnit=t.minSizeUnit,null===e._parent)throw new K("CIRCNC45699");!0===e._parent._isInitialised&&!1===e._isInitialised&&e.init(),this.updateSize(!1)}remove(){if(null===this._parent)throw new K("CIR11110");this._parent.removeChild(this)}popout(){const t=Ot(),e=this.layoutManager.createPopoutFromContentItem(this,void 0,t,void 0);return this.emitBaseBubblingEvent("stateChanged"),e}calculateConfigContent(){const t=this._contentItems,e=t.length,i=new Array(e);for(let n=0;nthis.propagateEventToLayoutManager(t,e))))}propagateEventToLayoutManager(t,e){this._pendingEventPropagations[t]=!1,this.layoutManager.emitUnknown(t,e)}}class jt extends Gt{constructor(t,e,i){super(t,e,i,document.createElement("div")),this._parentItem=i,this._focused=!1,this.isComponent=!0,this._reorderEnabled=e.reorderEnabled,this.applyUpdatableConfig(e),this._initialWantMaximise=e.maximised;const n=document.createElement("div");n.classList.add("lm_content"),this.element.appendChild(n),this._container=new Ft(e,this,t,n,(t=>this.handleUpdateItemConfigEvent(t)),(()=>this.show()),(()=>this.hide()),(t=>this.focus(t)),(t=>this.blur(t)))}get componentName(){return this._container.componentType}get componentType(){return this._container.componentType}get reorderEnabled(){return this._reorderEnabled}get initialWantMaximise(){return this._initialWantMaximise}get component(){return this._container.component}get container(){return this._container}get parentItem(){return this._parentItem}get headerConfig(){return this._headerConfig}get title(){return this._title}get tab(){return this._tab}get focused(){return this._focused}destroy(){this._container.destroy(),super.destroy()}applyUpdatableConfig(t){this.setTitle(t.title),this._headerConfig=t.header}toConfig(){const t=this._container.stateRequestEvent,e=void 0===t?this._container.state:t();return{type:at.component,content:[],size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,maximised:!1,isClosable:this.isClosable,reorderEnabled:this._reorderEnabled,title:this._title,header:mt.Header.createCopy(this._headerConfig),componentType:pt.copyComponentType(this.componentType),componentState:e}}close(){if(null===this.parent)throw new K("CIC68883");this.parent.removeChild(this,!1)}enterDragMode(t,e){Tt(this.element,t),At(this.element,e),this._container.enterDragMode(t,e)}exitDragMode(){this._container.exitDragMode()}enterStackMaximised(){this._container.enterStackMaximised()}exitStackMaximised(){this._container.exitStackMaximised()}drag(){this._container.drag()}updateSize(t){this.updateNodeSize(t)}init(){this.updateNodeSize(!1),super.init(),this._container.emit("open"),this.initContentItems()}setTitle(t){this._title=t,this.emit("titleChanged",t),this.emit("stateChanged")}setTab(t){this._tab=t,this.emit("tab",t),this._container.setTab(t)}hide(){super.hide(),this._container.setVisibility(!1)}show(){super.show(),this._container.setVisibility(!0)}focus(t=!1){this.parentItem.setActiveComponentItem(this,!0,t)}setFocused(t){this._focused=!0,this.tab.setFocused(),t||this.emitBaseBubblingEvent("focus")}blur(t=!1){this._focused&&this.layoutManager.setFocusedComponentItem(void 0,t)}setBlurred(t){this._focused=!1,this.tab.setBlurred(),t||this.emitBaseBubblingEvent("blur")}setParent(t){this._parentItem=t,super.setParent(t)}handleUpdateItemConfigEvent(t){this.applyUpdatableConfig(t)}updateNodeSize(t){if("none"!==this.element.style.display){const{width:e,height:i}=kt(this.element);this._container.setSizeToNodeSize(e,i,t)}}}class $t extends Gt{constructor(){super(...arguments),this._focused=!1}get focused(){return this._focused}setFocusedValue(t){this._focused=t}}class Zt extends Wt{constructor(t,e){super(),this._eElement=t,this._pointerTracking=!1,this._pointerDownEventListener=t=>this.onPointerDown(t),this._pointerMoveEventListener=t=>this.onPointerMove(t),this._pointerUpEventListener=t=>this.onPointerUp(t),this._timeout=void 0,this._allowableTargets=[t,...e],this._oDocument=document,this._eBody=document.body,this._nDelay=1800,this._nDistance=10,this._nX=0,this._nY=0,this._nOriginalX=0,this._nOriginalY=0,this._dragging=!1,this._eElement.addEventListener("pointerdown",this._pointerDownEventListener,{passive:!0})}destroy(){this.checkRemovePointerTrackingEventListeners(),this._eElement.removeEventListener("pointerdown",this._pointerDownEventListener)}cancelDrag(){this.processDragStop(void 0)}onPointerDown(t){if(this._allowableTargets.includes(t.target)&&t.isPrimary){const e=this.getPointerCoordinates(t);this.processPointerDown(e)}}processPointerDown(t){this._nOriginalX=t.x,this._nOriginalY=t.y,this._oDocument.addEventListener("pointermove",this._pointerMoveEventListener),this._oDocument.addEventListener("pointerup",this._pointerUpEventListener,{passive:!0}),this._pointerTracking=!0,this._timeout=setTimeout((()=>{try{this.startDrag()}catch(t){throw console.error(t),t}}),this._nDelay)}onPointerMove(t){this._pointerTracking&&(this.processDragMove(t),t.preventDefault())}processDragMove(t){this._nX=t.pageX-this._nOriginalX,this._nY=t.pageY-this._nOriginalY,!1===this._dragging&&(Math.abs(this._nX)>this._nDistance||Math.abs(this._nY)>this._nDistance)&&this.startDrag(),this._dragging&&this.emit("drag",this._nX,this._nY,t)}onPointerUp(t){this.processDragStop(t)}processDragStop(t){var e;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this.checkRemovePointerTrackingEventListeners(),!0===this._dragging&&(this._eBody.classList.remove("lm_dragging"),this._eElement.classList.remove("lm_dragging"),null===(e=this._oDocument.querySelector("iframe"))||void 0===e||e.style.setProperty("pointer-events",""),this._dragging=!1,this.emit("dragStop",t))}checkRemovePointerTrackingEventListeners(){this._pointerTracking&&(this._oDocument.removeEventListener("pointermove",this._pointerMoveEventListener),this._oDocument.removeEventListener("pointerup",this._pointerUpEventListener),this._pointerTracking=!1)}startDrag(){var t;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this._dragging=!0,this._eBody.classList.add("lm_dragging"),this._eElement.classList.add("lm_dragging"),null===(t=this._oDocument.querySelector("iframe"))||void 0===t||t.style.setProperty("pointer-events","none"),this.emit("dragStart",this._nOriginalX,this._nOriginalY)}getPointerCoordinates(t){return{x:t.pageX,y:t.pageY}}}class qt{constructor(t,e,i){this._isVertical=t,this._size=e,this._grabSize=i0){const i=this.createSplitter(Math.max(0,e-1)).element;e>0?(this.contentItems[e-1].element.insertAdjacentElement("afterend",i),i.insertAdjacentElement("afterend",t.element)):(this.contentItems[0].element.insertAdjacentElement("beforebegin",i),i.insertAdjacentElement("beforebegin",t.element))}else this._childElementContainer.appendChild(t.element);super.addChild(t,e);const n=1/this.contentItems.length*100;if(!0===i)return this.emitBaseBubblingEvent("stateChanged"),e;for(let e=0;e0&&(this.calculateRelativeSizes(),this.setAbsoluteSizes()),this.emitBaseBubblingEvent("stateChanged"),this.emit("resize")}setAbsoluteSizes(){const t=this.calculateAbsoluteSizes();for(let e=0;e0&&t.itemSizes[e]++,this._isColumn?(Tt(this.contentItems[e].element,t.crossAxisSize),At(this.contentItems[e].element,t.itemSizes[e])):(Tt(this.contentItems[e].element,t.itemSizes[e]),At(this.contentItems[e].element,t.crossAxisSize))}calculateAbsoluteSizes(){const t=(this.contentItems.length-1)*this._splitterSize,{width:e,height:i}=kt(this.element);let n,o;this._isColumn?(n=i-t,o=e):(n=e-t,o=i);let s=0;const r=[];for(let t=0;t0){const n=100-t;for(let t=0;t100&&e.length>0){for(let t=0;te)return;{const r=i/e;let a=i;for(let e=0;ethis.onSplitterDrag(e,t,i))),e.on("dragStop",(()=>this.onSplitterDragStop(e))),e.on("dragStart",(()=>this.onSplitterDragStart(e))),this._splitter.splice(t,0,e),e}getSplitItems(t){const e=this._splitter.indexOf(t);return{before:this.contentItems[e],after:this.contentItems[e+1]}}calculateContentItemMinSize(t){const e=t.minSize;if(void 0!==e){if(t.minSizeUnit===ht.Pixel)return e;throw new X("ROCGMD98831",JSON.stringify(t))}{const t=this.layoutManager.layoutConfig.dimensions;return this._isColumn?t.defaultMinItemHeight:t.defaultMinItemWidth}}calculateContentItemsTotalMinSize(t){let e=0;for(const i of t)e+=this.calculateContentItemMinSize(i);return e}onSplitterDragStart(t){const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=this.calculateContentItemsTotalMinSize(e.before.contentItems),s=this.calculateContentItemsTotalMinSize(e.after.contentItems);this._splitterPosition=0,this._splitterMinPosition=-1*(i-o),this._splitterMaxPosition=n-s}onSplitterDrag(t,e,i){let n=this._isColumn?i:e;if(null===this._splitterMinPosition||null===this._splitterMaxPosition)throw new K("ROCOSD59226");n=Math.max(n,this._splitterMinPosition),n=Math.min(n,this._splitterMaxPosition),this._splitterPosition=n;const o=zt(n);this._isColumn?t.element.style.top=o:t.element.style.left=o}onSplitterDragStop(t){if(null===this._splitterPosition)throw new K("ROCOSDS66932");{const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=(this._splitterPosition+i)/(i+n),s=e.before.size+e.after.size;e.before.size=o*s,e.after.size=(1-o)*s,t.element.style.top=zt(0),t.element.style.left=zt(0),globalThis.requestAnimationFrame((()=>this.updateSize(!1)))}}}!function(t){t.getElementDimensionSize=function(t,e){return"width"===e?function(t){return t.offsetWidth}(t):function(t){return t.offsetHeight}(t)},t.setElementDimensionSize=function(t,e,i){return"width"===e?Tt(t,i):At(t,i)},t.createElement=function(t,e){const i=t.createElement("div");return i.classList.add("lm_item"),e?i.classList.add("lm_column"):i.classList.add("lm_row"),i}}(Xt||(Xt={}));class Yt extends $t{constructor(t,e,i){super(t,vt.create(e),null,Yt.createElement(document)),this.isGround=!0,this._childElementContainer=this.element,this._containerElement=i;let n=null;for(;;){const t=n?n.previousSibling:this._containerElement.lastChild;if(!(t instanceof Element&&t.classList.contains("lm_content")))break;n=t}this._containerElement.insertBefore(this.element,n)}init(){if(!0!==this.isInitialised){this.updateNodeSize();for(let t=0;t0?this.contentItems[0]:this,n.isComponent)throw new Error("Cannot add item as child to ComponentItem");{const t=this.layoutManager.createAndInitContentItem(i,n);return e=n.addChild(t,e),n===this?-1:e}}loadComponentAsRoot(t){this.clearRoot();const e=Ct.resolve(t,!1);if(e.maximised)throw new Error("Root Component cannot be maximised");{const t=new jt(this.layoutManager,e,this);t.init(),this.addChild(t,0)}}addChild(t,e){if(this.contentItems.length>0)throw new Error("Ground node can only have a single child");return this._childElementContainer.appendChild(t.element),e=super.addChild(t,e),this.updateSize(!1),this.emitBaseBubblingEvent("stateChanged"),e}calculateConfigContent(){const t=this.contentItems,e=t.length,i=new Array(e);for(let n=0;n0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e)),this.updateContentItemsSize(!1))}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}createSideAreas(){const t=Yt.Area.oppositeSides,e=new Array(Object.keys(t).length);let i=0;for(const n in t){const o=n,s=this.getElementArea();if(null===s)throw new K("RCSA77553");s.side=o,"2"===t[o][1]?s[o]=s[t[o]]-50:s[o]=s[t[o]]+50,s.surface=(s.x2-s.x1)*(s.y2-s.y1),e[i++]=s}return e}highlightDropZone(t,e,i){this.layoutManager.tabDropPlaceholder.remove(),super.highlightDropZone(t,e,i)}onDrop(t,e){if(t.isComponent){const e=ut.createDefault(),i=t;e.header=mt.Header.createCopy(i.headerConfig);const n=this.layoutManager.createAndInitContentItem(e,this);n.addChild(t),t=n}if(0===this.contentItems.length)this.addChild(t);else{if(t.type===at.row||t.type===at.column){const e=ut.createDefault(),i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}const i="x"==e.side[0]?at.row:at.column,n="2"==e.side[1],o=this.contentItems[0];if(o instanceof Xt&&o.type===i){const e=o.contentItems[n?0:o.contentItems.length-1];o.addChild(t,n?0:void 0,!0),e.size*=.5,t.size=e.size,t.sizeUnit=ht.Percent,o.updateSize(!1)}else{const e=ct.createDefault(i),s=this.layoutManager.createContentItem(e,this);this.replaceChild(o,s),s.addChild(t,n?0:void 0,!0),s.addChild(o,n?void 0:0,!0),o.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}}dock(){throw new X("GID87731")}validateDocking(){throw new X("GIVD87732")}getAllContentItems(){const t=[this];return this.deepGetAllContentItems(this.contentItems,t),t}getConfigMaximisedItems(){const t=[];return this.deepFilterContentItems(this.contentItems,t,(t=>!(!Gt.isStack(t)||!t.initialWantMaximise)||!(!Gt.isComponentItem(t)||!t.initialWantMaximise))),t}getItemsByPopInParentId(t){const e=[];return this.deepFilterContentItems(this.contentItems,e,(e=>e.popInParentIds.includes(t))),e}toConfig(){throw new Error("Cannot generate GroundItem config")}setActiveComponentItem(t,e,i){}updateNodeSize(){const{width:t,height:e}=kt(this._containerElement);Tt(this.element,t),At(this.element,e),this.contentItems.length>0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e))}deepGetAllContentItems(t,e){for(let i=0;ithis.onClick(t),this._touchStartEventListener=t=>this.onTouchStart(t),this._element=document.createElement("div"),this._element.classList.add(i),this._element.title=e,this._header.on("destroy",(()=>this.destroy())),this._element.addEventListener("click",this._clickEventListener,{passive:!0}),this._element.addEventListener("touchstart",this._touchStartEventListener,{passive:!0}),this._header.controlsContainerElement.appendChild(this._element)}get element(){return this._element}destroy(){var t;this._element.removeEventListener("click",this._clickEventListener),this._element.removeEventListener("touchstart",this._touchStartEventListener),null===(t=this._element.parentNode)||void 0===t||t.removeChild(this._element)}onClick(t){this._pushEvent(t)}onTouchStart(t){this._pushEvent(t)}}class Jt{constructor(t,e,i,n,o){var s;this._layoutManager=t,this._componentItem=e,this._closeEvent=i,this._focusEvent=n,this._dragStartEvent=o,this._isActive=!1,this._tabClickListener=t=>this.onTabClickDown(t),this._tabTouchStartListener=t=>this.onTabTouchStart(t),this._closeClickListener=()=>this.onCloseClick(),this._closeTouchStartListener=()=>this.onCloseTouchStart(),this._dragStartListener=(t,e)=>this.onDragStart(t,e),this._contentItemDestroyListener=()=>this.onContentItemDestroy(),this._tabTitleChangedListener=t=>this.setTitle(t),this._element=document.createElement("div"),this._element.classList.add("lm_tab"),this._titleElement=document.createElement("span"),this._titleElement.classList.add("lm_title"),this._closeElement=document.createElement("div"),this._closeElement.classList.add("lm_close_tab"),this._element.appendChild(this._titleElement),this._element.appendChild(this._closeElement),e.isClosable?this._closeElement.style.display="":this._closeElement.style.display="none",this.setTitle(e.title),this._componentItem.on("titleChanged",this._tabTitleChangedListener);(null!==(s=e.reorderEnabled)&&void 0!==s?s:this._layoutManager.layoutConfig.settings.reorderEnabled)&&this.enableReorder(),this._element.addEventListener("click",this._tabClickListener,{passive:!0}),this._element.addEventListener("touchstart",this._tabTouchStartListener,{passive:!0}),this._componentItem.isClosable?(this._closeElement.addEventListener("click",this._closeClickListener,{passive:!0}),this._closeElement.addEventListener("touchstart",this._closeTouchStartListener,{passive:!0})):(this._closeElement.remove(),this._closeElement=void 0),this._componentItem.setTab(this),this._layoutManager.emit("tabCreated",this)}get isActive(){return this._isActive}get componentItem(){return this._componentItem}get contentItem(){return this._componentItem}get element(){return this._element}get titleElement(){return this._titleElement}get closeElement(){return this._closeElement}get reorderEnabled(){return void 0!==this._dragListener}set reorderEnabled(t){t!==this.reorderEnabled&&(t?this.enableReorder():this.disableReorder())}setTitle(t){this._titleElement.innerText=t,this._element.title=t}setActive(t){t!==this._isActive&&(this._isActive=t,t?this._element.classList.add("lm_active"):this._element.classList.remove("lm_active"))}destroy(){var t,e;this._closeEvent=void 0,this._focusEvent=void 0,this._dragStartEvent=void 0,this._element.removeEventListener("click",this._tabClickListener),this._element.removeEventListener("touchstart",this._tabTouchStartListener),null===(t=this._closeElement)||void 0===t||t.removeEventListener("click",this._closeClickListener),null===(e=this._closeElement)||void 0===e||e.removeEventListener("touchstart",this._closeTouchStartListener),this._componentItem.off("titleChanged",this._tabTitleChangedListener),this.reorderEnabled&&this.disableReorder(),this._element.remove()}setBlurred(){this._element.classList.remove("lm_focused"),this._titleElement.classList.remove("lm_focused")}setFocused(){this._element.classList.add("lm_focused"),this._titleElement.classList.add("lm_focused")}onDragStart(t,e){if(void 0===this._dragListener)throw new J("TODSDLU10093");if(void 0===this._dragStartEvent)throw new J("TODS23309");this._dragStartEvent(t,e,this._dragListener,this.componentItem)}onContentItemDestroy(){void 0!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=void 0)}onTabClickDown(t){const e=t.target;e!==this._element&&e!==this._titleElement||(0===t.button?this.notifyFocus():1===t.button&&this._componentItem.isClosable&&this.notifyClose())}onTabTouchStart(t){t.target===this._element&&this.notifyFocus()}onCloseClick(){this.notifyClose()}onCloseTouchStart(){this.notifyClose()}notifyClose(){if(void 0===this._closeEvent)throw new J("TNC15007");this._closeEvent(this._componentItem)}notifyFocus(){if(void 0===this._focusEvent)throw new J("TNA15007");this._focusEvent(this._componentItem)}enableReorder(){this._dragListener=new Zt(this._element,[this._titleElement]),this._dragListener.on("dragStart",this._dragStartListener),this._componentItem.on("destroy",this._contentItemDestroyListener)}disableReorder(){if(void 0===this._dragListener)throw new J("TDR87745");this._componentItem.off("destroy",this._contentItemDestroyListener),this._dragListener.off("dragStart",this._dragStartListener),this._dragListener=void 0}}class Qt{constructor(t,e,i,n,o){this._layoutManager=t,this._componentRemoveEvent=e,this._componentFocusEvent=i,this._componentDragStartEvent=n,this._dropdownActiveChangedEvent=o,this._tabs=[],this._lastVisibleTabIndex=-1,this._dropdownActive=!1,this._element=document.createElement("section"),this._element.classList.add("lm_tabs"),this._dropdownElement=document.createElement("section"),this._dropdownElement.classList.add("lm_tabdropdown_list"),this._dropdownElement.style.display="none"}get tabs(){return this._tabs}get tabCount(){return this._tabs.length}get lastVisibleTabIndex(){return this._lastVisibleTabIndex}get element(){return this._element}get dropdownElement(){return this._dropdownElement}get dropdownActive(){return this._dropdownActive}destroy(){for(let t=0;tthis.handleTabCloseEvent(t)),(t=>this.handleTabFocusEvent(t)),((t,e,i,n)=>this.handleTabDragStartEvent(t,e,i,n)));void 0===e&&(e=this._tabs.length),this._tabs.splice(e,0,i),ethis._lastVisibleTabIndex){const t=this._tabs[e];for(let t=e;t>0;t--)this._tabs[t]=this._tabs[t-1];this._tabs[0]=t}}updateTabSizes(t,e){let i=!1;this.tryUpdateTabSizes(i,t,e)||(i=!0,this.tryUpdateTabSizes(i,t,e)),i!==this._dropdownActive&&(this._dropdownActive=i,this._dropdownActiveChangedEvent())}tryUpdateTabSizes(t,e,i){if(this._tabs.length>0){if(void 0===i)throw new Error("non-empty tabs must have active component item");let n=0,o=!1;const s=this._layoutManager.layoutConfig.settings.tabOverlapAllowance,r=this._tabs.indexOf(i.tab),a=this._tabs[r];this._lastVisibleTabIndex=-1;for(let i=0;ie){if(o)i===r&&(l.style.zIndex="auto",l.style.marginLeft="",l.parentElement!==this._element&&this._element.appendChild(l));else{let t;if(t=r>0&&r<=i?(d-e)/(i-1):(d-e)/i,tthis.onClick(t),this._touchStartListener=t=>this.onTouchStart(t),this._rowColumnClosable=!0,this._closeButton=null,this._popoutButton=null,this._tabsContainer=new Qt(this._layoutManager,(t=>this.handleTabInitiatedComponentRemoveEvent(t)),(t=>this.handleTabInitiatedComponentFocusEvent(t)),((t,e,i,n)=>this.handleTabInitiatedDragStartEvent(t,e,i,n)),(()=>this.processTabDropdownActiveChanged())),this._show=i.show,this._popoutEnabled=i.popoutEnabled,this._popoutLabel=i.popoutLabel,this._maximiseEnabled=i.maximiseEnabled,this._maximiseLabel=i.maximiseLabel,this._minimiseEnabled=i.minimiseEnabled,this._minimiseLabel=i.minimiseLabel,this._closeEnabled=i.closeEnabled,this._closeLabel=i.closeLabel,this._tabDropdownEnabled=i.tabDropdownEnabled,this._tabDropdownLabel=i.tabDropdownLabel,this.setSide(i.side),this._canRemoveComponent=this._configClosable,this._element=document.createElement("section"),this._element.classList.add("lm_header"),this._controlsContainerElement=document.createElement("section"),this._controlsContainerElement.classList.add("lm_controls"),this._element.appendChild(this._tabsContainer.element),this._element.appendChild(this._controlsContainerElement),this._element.appendChild(this._tabsContainer.dropdownElement),this._element.addEventListener("click",this._clickListener,{passive:!0}),this._element.addEventListener("touchstart",this._touchStartListener,{passive:!0}),this._documentMouseUpListener=()=>this._tabsContainer.hideAdditionalTabsDropdown(),globalThis.document.addEventListener("mouseup",this._documentMouseUpListener,{passive:!0}),this._tabControlOffset=this._layoutManager.layoutConfig.settings.tabControlOffset,this._tabDropdownEnabled&&(this._tabDropdownButton=new Kt(this,this._tabDropdownLabel,"lm_tabdropdown",(()=>this._tabsContainer.showAdditionalTabsDropdown()))),this._popoutEnabled&&(this._popoutButton=new Kt(this,this._popoutLabel,"lm_popout",(()=>this.handleButtonPopoutEvent()))),this._maximiseEnabled&&(this._maximiseButton=new Kt(this,this._maximiseLabel,"lm_maximise",(t=>this.handleButtonMaximiseToggleEvent(t)))),this._configClosable&&(this._closeButton=new Kt(this,this._closeLabel,"lm_close",(()=>s()))),this.processTabDropdownActiveChanged()}get show(){return this._show}get side(){return this._side}get leftRightSided(){return this._leftRightSided}get layoutManager(){return this._layoutManager}get parent(){return this._parent}get tabs(){return this._tabsContainer.tabs}get lastVisibleTabIndex(){return this._tabsContainer.lastVisibleTabIndex}get element(){return this._element}get tabsContainerElement(){return this._tabsContainer.element}get controlsContainerElement(){return this._controlsContainerElement}destroy(){this.emit("destroy"),this._popoutEvent=void 0,this._maximiseToggleEvent=void 0,this._clickEvent=void 0,this._touchStartEvent=void 0,this._componentRemoveEvent=void 0,this._componentFocusEvent=void 0,this._componentDragStartEvent=void 0,this._tabsContainer.destroy(),globalThis.document.removeEventListener("mouseup",this._documentMouseUpListener),this._element.remove()}createTab(t,e){this._tabsContainer.createTab(t,e)}removeTab(t){this._tabsContainer.removeTab(t)}processActiveComponentChanged(t){this._tabsContainer.processActiveComponentChanged(t),this.updateTabSizes()}setSide(t){this._side=t,this._leftRightSided=[nt.right,nt.left].includes(this._side)}setRowColumnClosable(t){this._rowColumnClosable=t,this.updateClosability()}updateClosability(){let t;if(this._configClosable)if(this._rowColumnClosable){t=!0;const e=this.tabs.length;for(let i=0;i1}applyFocusedValue(t){t?this._element.classList.add("lm_focused"):this._element.classList.remove("lm_focused")}processMaximised(){if(void 0===this._maximiseButton)throw new J("HPMAX16997");this._maximiseButton.element.setAttribute("title",this._minimiseLabel)}processMinimised(){if(void 0===this._maximiseButton)throw new J("HPMIN16997");this._maximiseButton.element.setAttribute("title",this._maximiseLabel)}updateTabSizes(){if(this._tabsContainer.tabCount>0){const t=this._show?this._layoutManager.layoutConfig.dimensions.headerHeight:0;let e;this._leftRightSided?(this._element.style.height="",this._element.style.width=zt(t)):(this._element.style.width="",this._element.style.height=zt(t)),e=this._leftRightSided?this._element.offsetHeight-this._controlsContainerElement.offsetHeight-this._tabControlOffset:this._element.offsetWidth-this._controlsContainerElement.offsetWidth-this._tabControlOffset,this._tabsContainer.updateTabSizes(e,this._getActiveComponentItemEvent())}}handleTabInitiatedComponentRemoveEvent(t){if(this._canRemoveComponent){if(void 0===this._componentRemoveEvent)throw new J("HHTCE22294");this._componentRemoveEvent(t)}}handleTabInitiatedComponentFocusEvent(t){if(void 0===this._componentFocusEvent)throw new J("HHTAE22294");this._componentFocusEvent(t)}handleTabInitiatedDragStartEvent(t,e,i,n){if(this._canRemoveComponent){if(void 0===this._componentDragStartEvent)throw new J("HHTDSE22294");this._componentDragStartEvent(t,e,i,n)}else i.cancelDrag()}processTabDropdownActiveChanged(){void 0!==this._tabDropdownButton&&Dt(this._tabDropdownButton.element,this._tabsContainer.dropdownActive)}handleButtonPopoutEvent(){if(this._layoutManager.layoutConfig.settings.popoutWholeStack){if(void 0===this._popoutEvent)throw new J("HHBPOE17834");this._popoutEvent()}else{const t=this._getActiveComponentItemEvent();t&&t.popout()}}handleButtonMaximiseToggleEvent(t){if(void 0===this._maximiseToggleEvent)throw new J("HHBMTE16834");this._maximiseToggleEvent()}onClick(t){t.target===this._element&&this.notifyClick(t)}onTouchStart(t){t.target===this._element&&this.notifyTouchStart(t)}notifyClick(t){if(void 0===this._clickEvent)throw new J("HNHC46834");this._clickEvent(t)}notifyTouchStart(t){if(void 0===this._touchStartEvent)throw new J("HNHTS46834");this._touchStartEvent(t)}}class ee extends $t{constructor(t,e,i){var n,o,s,r,a,l,h,d,c,m,u,p,g,f,v,_,y,C,w;super(t,e,i,ee.createElement(document)),this._headerSideChanged=!1,this._resizeListener=()=>this.handleResize(),this._maximisedListener=()=>this.handleMaximised(),this._minimisedListener=()=>this.handleMinimised(),this._headerConfig=e.header;const I=t.layoutConfig.header,b=e.content;let S;if(1!==b.length)S=void 0;else{S=b[0].header}this._initialWantMaximise=e.maximised,this._initialActiveItemIndex=null!==(n=e.activeItemIndex)&&void 0!==n?n:0;const E=null!==(r=null!==(s=null===(o=this._headerConfig)||void 0===o?void 0:o.show)&&void 0!==s?s:null==S?void 0:S.show)&&void 0!==r?r:I.show,x=null!==(h=null!==(l=null===(a=this._headerConfig)||void 0===a?void 0:a.popout)&&void 0!==l?l:null==S?void 0:S.popout)&&void 0!==h?h:I.popout,L=null!==(m=null!==(c=null===(d=this._headerConfig)||void 0===d?void 0:d.maximise)&&void 0!==c?c:null==S?void 0:S.maximise)&&void 0!==m?m:I.maximise,z=null!==(g=null!==(p=null===(u=this._headerConfig)||void 0===u?void 0:u.close)&&void 0!==p?p:null==S?void 0:S.close)&&void 0!==g?g:I.close,M=null!==(_=null!==(v=null===(f=this._headerConfig)||void 0===f?void 0:f.minimise)&&void 0!==v?v:null==S?void 0:S.minimise)&&void 0!==_?_:I.minimise,P=null!==(w=null!==(C=null===(y=this._headerConfig)||void 0===y?void 0:y.tabDropdown)&&void 0!==C?C:null==S?void 0:S.tabDropdown)&&void 0!==w?w:I.tabDropdown;this._maximisedEnabled=!1!==L;const T={show:!1!==E,side:!1===E?nt.top:E,popoutEnabled:!1!==x,popoutLabel:!1===x?"":x,maximiseEnabled:this._maximisedEnabled,maximiseLabel:!1===L?"":L,closeEnabled:!1!==z,closeLabel:!1===z?"":z,minimiseEnabled:!0,minimiseLabel:M,tabDropdownEnabled:!1!==P,tabDropdownLabel:!1===P?"":P};this._header=new te(t,this,T,e.isClosable&&!1!==z,(()=>this.getActiveComponentItem()),(()=>this.remove()),(()=>this.handlePopoutEvent()),(()=>this.toggleMaximise()),(t=>this.handleHeaderClickEvent(t)),(t=>this.handleHeaderTouchStartEvent(t)),(t=>this.handleHeaderComponentRemoveEvent(t)),(t=>this.handleHeaderComponentFocusEvent(t)),((t,e,i,n)=>this.handleHeaderComponentStartDragEvent(t,e,i,n))),this.isStack=!0,this._childElementContainer=document.createElement("section"),this._childElementContainer.classList.add("lm_items"),this.on("resize",this._resizeListener),this._maximisedEnabled&&(this.on("maximised",this._maximisedListener),this.on("minimised",this._minimisedListener)),this.element.appendChild(this._header.element),this.element.appendChild(this._childElementContainer),this.setupHeaderPosition(),this._header.updateClosability()}get childElementContainer(){return this._childElementContainer}get header(){return this._header}get headerShow(){return this._header.show}get headerSide(){return this._header.side}get headerLeftRightSided(){return this._header.leftRightSided}get contentAreaDimensions(){return this._contentAreaDimensions}get initialWantMaximise(){return this._initialWantMaximise}get isMaximised(){return this===this.layoutManager.maximisedStack}get stackParent(){if(!this.parent)throw new Error("Stack should always have a parent");return this.parent}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}init(){if(!0===this.isInitialised)return;this.updateNodeSize();for(let t=0;t0){if(this._initialActiveItemIndex<0||this._initialActiveItemIndex>=e)throw new Error(`ActiveItemIndex out of range: ${this._initialActiveItemIndex} id: ${this.id}`);for(let i=0;ithis.contentItems.length)throw e-=1,new X("SAC99728");if(t instanceof jt)return e=super.addChild(t,e),this._childElementContainer.appendChild(t.element),this._header.createTab(t,e),this.setActiveComponentItem(t,i),this._header.updateTabSizes(),this.updateSize(!1),t.container.setBaseLogicalZIndex(),this._header.updateClosability(),this.emitStateChangedEvent(),e;throw new X("SACC88532")}removeChild(t,e){const i=t,n=this.contentItems.indexOf(i),o=1===this.contentItems.length;if(this._activeComponentItem===i&&(i.focused&&i.blur(),!o)){const t=0===n?1:n-1;this.setActiveComponentItem(this.contentItems[t],!1)}this._header.removeTab(i),super.removeChild(i,e),o||this._header.updateClosability(),this.emitStateChangedEvent()}toggleMaximise(){this.isMaximised?this.minimise():this.maximise()}maximise(){if(!this.isMaximised){this.layoutManager.setMaximisedStack(this);const t=this.contentItems,e=t.length;for(let i=0;i0&&void 0===t)throw new Error("expected non-empty stack to have an active component item");return{type:"stack",content:this.calculateConfigContent(),size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,isClosable:this.isClosable,maximised:this.isMaximised,header:this.createHeaderConfig(),activeItemIndex:t}}onDrop(t,e){if("header"===this._dropSegment){if(this.resetHeaderDropZone(),void 0===this._dropIndex)throw new J("SODDI68990");return void this.addChild(t,this._dropIndex)}if("body"===this._dropSegment)return void this.addChild(t,0,!0);const i="top"===this._dropSegment||"bottom"===this._dropSegment,n="left"===this._dropSegment||"right"===this._dropSegment,o="top"===this._dropSegment||"left"===this._dropSegment,s=i&&this.stackParent.isColumn||n&&this.stackParent.isRow;if(t.isComponent){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createAndInitContentItem(e,this);i.addChild(t),t=i}if(t.type===at.row||t.type===at.column){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}if(s){const e=this.stackParent.contentItems.indexOf(this);this.stackParent.addChild(t,o?e:e+1,!0),this.size*=.5,t.size=this.size,t.sizeUnit=this.sizeUnit,this.stackParent.updateSize(!1)}else{const e=i?at.column:at.row,n=ct.createDefault(e),s=this.layoutManager.createContentItem(n,this);this.stackParent.replaceChild(this,s),s.addChild(t,o?0:void 0,!0),s.addChild(this,o?void 0:0,!0),this.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}highlightDropZone(t,e){for(const i in this._contentAreaDimensions){const n=i,o=this._contentAreaDimensions[n].hoverArea;if(o.x1t&&o.y1e)return void("header"===n?(this._dropSegment="header",this.highlightHeaderDropZone(this._header.leftRightSided?e:t)):(this.resetHeaderDropZone(),this.highlightBodyDropZone(n)))}}getArea(){if("none"===this.element.style.display)return null;const t=super.getElementArea(this._header.element),e=super.getElementArea(this._childElementContainer);if(null===t||null===e)throw new K("SGAHC13086");const i=e.x2-e.x1,n=e.y2-e.y1;return this._contentAreaDimensions={header:{hoverArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2},highlightArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2}}},0===this.contentItems.length?(this._contentAreaDimensions.body={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2}},super.getElementArea(this.element)):(this._contentAreaDimensions.left={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x1+.25*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x1+.5*i,y2:e.y2}},this._contentAreaDimensions.top={hoverArea:{x1:e.x1+.25*i,y1:e.y1,x2:e.x1+.75*i,y2:e.y1+.5*n},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y1+.5*n}},this._contentAreaDimensions.right={hoverArea:{x1:e.x1+.75*i,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1+.5*i,y1:e.y1,x2:e.x2,y2:e.y2}},this._contentAreaDimensions.bottom={hoverArea:{x1:e.x1+.25*i,y1:e.y1+.5*n,x2:e.x1+.75*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1+.5*n,x2:e.x2,y2:e.y2}},super.getElementArea(this.element))}positionHeader(t){this._header.side!==t&&(this._header.setSide(t),this._headerSideChanged=!0,this.setupHeaderPosition())}updateNodeSize(){if("none"!==this.element.style.display){const t=kt(this.element);if(this._header.show){t[this._header.leftRightSided?it.width:it.height]-=this.layoutManager.layoutConfig.dimensions.headerHeight}this._childElementContainer.style.width=zt(t.width),this._childElementContainer.style.height=zt(t.height);for(let e=0;e=o&&tthis.onDrag(t,e,i))),this._dragListener.on("dragStop",(()=>this.onDrop())),this.createDragProxyElements(t,e),null===this._componentItem.parent)throw new K("DPC10097");this._componentItemFocused=this._componentItem.focused,this._componentItemFocused&&this._componentItem.blur(),this._componentItem.parent.removeChild(this._componentItem,!0),this.setDimensions(),document.body.appendChild(this._element),this.determineMinMaxXY(),this._layoutManager.calculateItemAreas(),this.setDropPosition(t,e)}get element(){return this._element}createDragProxyElements(t,e){this._element=document.createElement("div"),this._element.classList.add("lm_dragProxy");const i=document.createElement("div");i.classList.add("lm_header");const n=document.createElement("div");n.classList.add("lm_tabs");const o=document.createElement("div");o.classList.add("lm_tab");const s=document.createElement("span");s.classList.add("lm_title"),o.appendChild(s),n.appendChild(o),i.appendChild(n),this._proxyContainerElement=document.createElement("div"),this._proxyContainerElement.classList.add("lm_content"),this._element.appendChild(i),this._element.appendChild(this._proxyContainerElement),this._originalParent instanceof ee&&this._originalParent.headerShow&&(this._sided=this._originalParent.headerLeftRightSided,this._element.classList.add("lm_"+this._originalParent.headerSide),[nt.right,nt.bottom].indexOf(this._originalParent.headerSide)>=0&&this._proxyContainerElement.insertAdjacentElement("afterend",i)),this._element.style.left=zt(t),this._element.style.top=zt(e),o.setAttribute("title",this._componentItem.title),s.insertAdjacentText("afterbegin",this._componentItem.title),this._proxyContainerElement.appendChild(this._componentItem.element)}determineMinMaxXY(){const t=this._layoutManager.groundItem;if(void 0===t)throw new J("DPDMMXY73109");{const e=t.element.getBoundingClientRect();this._minX=e.left+document.body.scrollLeft,this._minY=e.top+document.body.scrollTop,this._maxX=this._minX+e.width,this._maxY=this._minY+e.height}}onDrag(t,e,i){const n=i.pageX,o=i.pageY;this.setDropPosition(n,o),this._componentItem.drag()}setDropPosition(t,e){this._layoutManager.layoutConfig.settings.constrainDragToContainer&&(t<=this._minX?t=Math.ceil(this._minX):t>=this._maxX&&(t=Math.floor(this._maxX)),e<=this._minY?e=Math.ceil(this._minY):e>=this._maxY&&(e=Math.floor(this._maxY))),this._element.style.left=zt(t),this._element.style.top=zt(e),this._area=this._layoutManager.getArea(t,e),null!==this._area&&(this._lastValidArea=this._area,this._area.contentItem.highlightDropZone(t,e,this._area))}onDrop(){const t=this._layoutManager.dropTargetIndicator;if(null===t)throw new K("DPOD30011");let e;if(t.hide(),this._componentItem.exitDragMode(),null!==this._area)e=this._componentItem,this._area.contentItem.onDrop(e,this._area);else if(null!==this._lastValidArea){e=this._componentItem;this._lastValidArea.contentItem.onDrop(e,this._lastValidArea)}else this._originalParent?(e=this._componentItem,this._originalParent.addChild(e)):this._componentItem.destroy();this._element.remove(),this._layoutManager.emit("itemDropped",this._componentItem),this._componentItemFocused&&void 0!==e&&e.focus()}setDimensions(){const t=this._layoutManager.layoutConfig.dimensions;if(void 0===t)throw new Error("DragProxy.setDimensions: dimensions undefined");let e=t.dragProxyWidth,i=t.dragProxyHeight;if(void 0===e||void 0===i)throw new Error("DragProxy.setDimensions: width and/or height undefined");const n=!1===this._layoutManager.layoutConfig.header.show?0:t.headerHeight;this._element.style.width=zt(e),this._element.style.height=zt(i),e-=this._sided?n:0,i-=this._sided?0:n,this._proxyContainerElement.style.width=zt(e),this._proxyContainerElement.style.height=zt(i),this._componentItem.enterDragMode(e,i),this._componentItem.show()}}class ne{constructor(t,e,i,n,o,s,r){this._layoutManager=t,this._element=e,this._extraAllowableChildTargets=i,this._componentTypeOrFtn=n,this._componentState=o,this._title=s,this._id=r,this._dragListener=null,this._dummyGroundContainer=document.createElement("div");const a=gt.createDefault("row");this._dummyGroundContentItem=new Yt(this._layoutManager,a,this._dummyGroundContainer),this.createDragListener()}destroy(){this.removeDragListener()}createDragListener(){this.removeDragListener(),this._dragListener=new Zt(this._element,this._extraAllowableChildTargets),this._dragListener.on("dragStart",((t,e)=>this.onDragStart(t,e))),this._dragListener.on("dragStop",(()=>this.onDragStop()))}onDragStart(t,e){var i;const n="component";let o;if("function"==typeof this._componentTypeOrFtn){const t=this._componentTypeOrFtn();o=ne.isDragSourceComponentItemConfig(t)?{type:n,componentState:t.state,componentType:t.type,title:null!==(i=t.title)&&void 0!==i?i:this._title}:t}else o={type:n,componentState:this._componentState,componentType:this._componentTypeOrFtn,title:this._title,id:this._id};const s=bt.resolve(o,!1),r=new jt(this._layoutManager,s,this._dummyGroundContentItem);if(this._dummyGroundContentItem.contentItems.push(r),null===this._dragListener)throw new K("DSODSD66746");{const i=new ie(t,e,this._dragListener,this._layoutManager,r,this._dummyGroundContentItem),n=this._layoutManager.transitionIndicator;if(null===n)throw new K("DSODST66746");n.transitionElements(this._element,i.element)}}onDragStop(){this.createDragListener()}removeDragListener(){null!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=null)}}!function(t){t.isDragSourceComponentItemConfig=function(t){return!("componentType"in t)}}(ne||(ne={}));class oe{constructor(){this._element=document.createElement("div"),this._element.classList.add("lm_dropTargetIndicator");const t=document.createElement("div");t.classList.add("lm_inner"),this._element.appendChild(t),document.body.appendChild(this._element)}destroy(){this._element.remove()}highlightArea(t,e){this._element.style.left=zt(t.x1+e),this._element.style.top=zt(t.y1+e),this._element.style.width=zt(t.x2-t.x1-e),this._element.style.height=zt(t.y2-t.y1-e),this._element.style.display="block"}hide(){Dt(this._element,!1)}}class se{constructor(){this._element=document.createElement("div"),this._element.classList.add("lm_transition_indicator"),document.body.appendChild(this._element),this._toElement=null,this._fromDimensions=null,this._totalAnimationDuration=200,this._animationStartTime=null}destroy(){this._element.remove()}transitionElements(t,e){}nextAnimationFrame(){}measure(t){const e=t.getBoundingClientRect();return{left:e.left,top:e.top,width:t.offsetWidth,height:t.offsetHeight}}}class re extends Wt{constructor(t){super(),this._layoutManager=t,this._childEventListener=t=>this.onEventFromChild(t),globalThis.addEventListener(re.ChildEventName,this._childEventListener,{passive:!0})}emit(t,...e){"userBroadcast"===t?this.emitUserBroadcast(...e):super.emit(t,...e)}emitUserBroadcast(...t){this.handleUserBroadcastEvent("userBroadcast",t)}destroy(){globalThis.removeEventListener(re.ChildEventName,this._childEventListener)}handleUserBroadcastEvent(t,e){this._layoutManager.isSubWindow?this.propagateToParent(t,e):this.propagateToThisAndSubtree(t,e)}onEventFromChild(t){const e=t.detail;this.handleUserBroadcastEvent(e.eventName,e.args)}propagateToParent(t,e){const i={bubbles:!0,cancelable:!0,detail:{layoutManager:this._layoutManager,eventName:t,args:e}},n=new CustomEvent(re.ChildEventName,i),o=globalThis.opener;if(null===o)throw new K("EHPTP15778");o.dispatchEvent(n)}propagateToThisAndSubtree(t,e){this.emitUnknown(t,...e);for(let i=0;ithis.handleContainerResize())),this._windowBeforeUnloadListener=()=>this.onBeforeUnload(),this._windowBeforeUnloadListening=!1,this._maximisedStackBeforeDestroyedListener=t=>this.cleanupBeforeMaximisedStackDestroyed(t),this.isSubWindow=t.isSubWindow,this._constructorOrSubWindowLayoutConfig=t.constructorOrSubWindowLayoutConfig,Q.checkInitialise(),dt.checkInitialise(),void 0!==t.containerElement&&(this._containerElement=t.containerElement)}get container(){return this._containerElement}get isInitialised(){return this._isInitialised}get groundItem(){return this._groundItem}get root(){return this._groundItem}get openPopouts(){return this._openPopouts}get dropTargetIndicator(){return this._dropTargetIndicator}get transitionIndicator(){return this._transitionIndicator}get width(){return this._width}get height(){return this._height}get eventHub(){return this._eventHub}get rootItem(){if(void 0===this._groundItem)throw new Error("Cannot access rootItem before init");return 0===this._groundItem.contentItems.length?void 0:this._groundItem.contentItems[0]}get focusedComponentItem(){return this._focusedComponentItem}get tabDropPlaceholder(){return this._tabDropPlaceholder}get maximisedStack(){return this._maximisedStack}get deprecatedConstructor(){return!this.isSubWindow&&void 0!==this._constructorOrSubWindowLayoutConfig}destroy(){if(this._isInitialised){this._windowBeforeUnloadListening&&(globalThis.removeEventListener("beforeunload",this._windowBeforeUnloadListener),this._windowBeforeUnloadListening=!1),!0===this.layoutConfig.settings.closePopoutsOnUnload&&this.closeAllOpenPopouts(),this._resizeObserver.disconnect(),this.checkClearResizeTimeout(),void 0!==this._groundItem&&this._groundItem.destroy(),this._tabDropPlaceholder.remove(),null!==this._dropTargetIndicator&&this._dropTargetIndicator.destroy(),null!==this._transitionIndicator&&this._transitionIndicator.destroy(),this._eventHub.destroy();for(const t of this._dragSources)t.destroy();this._dragSources=[],this._isInitialised=!1}}minifyConfig(t){return _t.minifyConfig(t)}unminifyConfig(t){return _t.unminifyConfig(t)}init(){let t;if(this.setContainer(),this._dropTargetIndicator=new oe,this._transitionIndicator=new se,this.updateSizeFromContainer(),this.isSubWindow){if(void 0===this._constructorOrSubWindowLayoutConfig)throw new J("LMIU07155");{const e=this._constructorOrSubWindowLayoutConfig.root;if(void 0===e)throw new X("LMIC07156");if(!Ct.isComponent(e))throw new X("LMIC07157");t=e;const i=xt.resolve(this._constructorOrSubWindowLayoutConfig);this.layoutConfig=Object.assign(Object.assign({},i),{root:void 0})}}else void 0===this._constructorOrSubWindowLayoutConfig?this.layoutConfig=_t.createDefault():this.layoutConfig=xt.resolve(this._constructorOrSubWindowLayoutConfig);const e=this.layoutConfig;this._groundItem=new Yt(this,e.root,this._containerElement),this._groundItem.init(),this.checkLoadedLayoutMaximiseItem(),this._resizeObserver.observe(this._containerElement),this._isInitialised=!0,this.adjustColumnsResponsive(),this.emit("initialised"),void 0!==t&&this.loadComponentAsRoot(t)}loadLayout(t){if(!this.isInitialised)throw new Error("GoldenLayout: Need to call init() if LayoutConfig with defined root passed to constructor");if(void 0===this._groundItem)throw new J("LMLL11119");this.createSubWindows(),this.layoutConfig=xt.resolve(t),this._groundItem.loadRoot(this.layoutConfig.root),this.checkLoadedLayoutMaximiseItem(),this.adjustColumnsResponsive()}saveLayout(){if(!1===this._isInitialised)throw new Error("Can't create config, layout not yet initialised");if(void 0===this._groundItem)throw new J("LMTC18244");{const t=this._groundItem.calculateConfigContent();let e;e=1!==t.length?void 0:t[0],this.reconcilePopoutWindows();const i=[];for(let t=0;t=0?n=this._groundItem.contentItems[0]:e=0;break;case at.row:case at.column:e=n.addItem(t,i.index);break;case at.stack:if(Ct.isComponent(t)){e=n.addItem(t,i.index);break}throw Error(tt[6]);case at.component:throw new X("LMAIALC87444602");default:throw new Y("LMAIALU98881733",n.type)}if(Ct.isComponent(t)){const t=n.contentItems[e];Gt.isStack(t)&&(n=t,e=0)}return i.parentItem=n,i.index=e,i}}}loadComponentAsRoot(t){if(void 0===this._groundItem)throw new Error("Cannot add item before init");this._groundItem.loadComponentAsRoot(t)}updateSize(t,e){this.setSize(t,e)}setSize(t,e){if(this._width=t,this._height=e,!0===this._isInitialised){if(void 0===this._groundItem)throw new J("LMUS18881");if(this._groundItem.setSize(this._width,this._height),this._maximisedStack){const{width:t,height:e}=kt(this._containerElement);Tt(this._maximisedStack.element,t),At(this._maximisedStack.element,e),this._maximisedStack.updateSize(!1)}this.adjustColumnsResponsive()}}beginSizeInvalidation(){this._sizeInvalidationBeginCount++}endSizeInvalidation(){0==--this._sizeInvalidationBeginCount&&this.updateSizeFromContainer()}updateSizeFromContainer(){const{width:t,height:e}=kt(this._containerElement);this.setSize(t,e)}updateRootSize(t=!1){if(void 0===this._groundItem)throw new J("LMURS28881");this._groundItem.updateSize(t)}createAndInitContentItem(t,e){const i=this.createContentItem(t,e);return i.init(),i}createContentItem(t,e){if("string"!=typeof t.type)throw new G("Missing parameter 'type'",JSON.stringify(t));if(ct.isComponentItem(t)&&!(e instanceof ee)&&e&&!(!0===this.isSubWindow&&e instanceof Yt)){t={type:at.stack,content:[t],size:t.size,sizeUnit:t.sizeUnit,minSize:t.minSize,minSizeUnit:t.minSizeUnit,id:t.id,maximised:t.maximised,isClosable:t.isClosable,activeItemIndex:0,header:void 0}}return this.createContentItemFromConfig(t,e)}findFirstComponentItemById(t){if(void 0===this._groundItem)throw new J("LMFFCIBI82446");return this.findFirstContentItemTypeByIdRecursive(at.component,t,this._groundItem)}createPopout(t,e,i,n){return t instanceof Gt?this.createPopoutFromContentItem(t,e,i,n):this.createPopoutFromItemConfig(t,e,i,n)}createPopoutFromContentItem(t,e,i,n){let o=t.parent,s=t;for(;null!==o&&1===o.contentItems.length&&!o.isGround;)s=o,o=o.parent;if(null===o)throw new K("LMCPFCI00834");{if(void 0===n&&(n=o.contentItems.indexOf(s)),null!==i&&o.addPopInParentId(i),void 0===e){const i=globalThis.screenX||globalThis.screenLeft,n=globalThis.screenY||globalThis.screenTop,o=t.element.offsetLeft,s=t.element.offsetTop,{width:r,height:a}=kt(t.element);e={left:i+o,top:n+s,width:r,height:a}}const r=t.toConfig();if(t.remove(),ft.isRootItemConfig(r))return this.createPopoutFromItemConfig(r,e,i,n);throw new Error(`${tt[0]}`)}}beginVirtualSizedContainerAdding(){0==++this._virtualSizedContainerAddingBeginCount&&(this._virtualSizedContainers.length=0)}addVirtualSizedContainer(t){this._virtualSizedContainers.push(t)}endVirtualSizedContainerAdding(){if(0==--this._virtualSizedContainerAddingBeginCount){const t=this._virtualSizedContainers.length;if(t>0){this.fireBeforeVirtualRectingEvent(t);for(let e=0;ethis.emit("windowOpened",a))),a.on("closed",(()=>this.reconcilePopoutWindows())),this._openPopouts.push(a),this.layoutConfig.settings.closePopoutsOnUnload&&!this._windowBeforeUnloadListening&&(globalThis.addEventListener("beforeunload",this._windowBeforeUnloadListener,{passive:!0}),this._windowBeforeUnloadListening=!0),a}closeAllOpenPopouts(){for(let t=0;tglobalThis.close()),1)}getArea(t,e){let i=null,n=1/0;for(let o=0;o=s.x1&&t=s.y1&&es.surface&&(n=s.surface,i=s)}return i}calculateItemAreas(){const t=this.getAllContentItems(),e=this._groundItem;if(void 0===e)throw new J("LMCIAR44365");if(1!==t.length){e.contentItems[0].isStack?this._itemAreas=[]:this._itemAreas=e.createSideAreas();for(let e=0;e0){let e=t[0];if(Gt.isComponentItem(e)){const t=e.parent;if(null===t)throw new K("LMXLLMI69999");e=t}if(!Gt.isStack(e))throw new X("LMCLLMI19993");e.maximise()}}}processMaximiseStack(t){if(this._maximisedStack=t,t.on("beforeItemDestroyed",this._maximisedStackBeforeDestroyedListener),t.element.classList.add("lm_maximised"),t.element.insertAdjacentElement("afterend",this._maximisePlaceholder),void 0===this._groundItem)throw new J("LMMXI19993");{this._groundItem.element.prepend(t.element);const{width:e,height:i}=kt(this._containerElement);Tt(t.element,e),At(t.element,i),t.updateSize(!0),t.focusActiveContentItem(),this._maximisedStack.emit("maximised"),this.emit("stateChanged")}}processMinimiseMaximisedStack(){if(void 0===this._maximisedStack)throw new X("LMMMS74422");{const t=this._maximisedStack;if(null===t.parent)throw new K("LMMI13668");t.element.classList.remove("lm_maximised"),this._maximisePlaceholder.insertAdjacentElement("afterend",t.element),this._maximisePlaceholder.remove(),this.updateRootSize(!0),this._maximisedStack=void 0,t.off("beforeItemDestroyed",this._maximisedStackBeforeDestroyedListener),t.emit("minimised"),this.emit("stateChanged")}}reconcilePopoutWindows(){const t=[];for(let e=0;e{this._resizeTimeoutId=void 0,this.beginSizeInvalidation(),this.endSizeInvalidation()}),this.resizeDebounceInterval))}checkClearResizeTimeout(){void 0!==this._resizeTimeoutId&&(clearTimeout(this._resizeTimeoutId),this._resizeTimeoutId=void 0)}setContainer(){var t;const e=document.body,i=null!==(t=this._containerElement)&&void 0!==t?t:e;if(i===e){this.resizeWithContainerAutomatically=!0;const t=document.documentElement;t.style.height="100%",t.style.margin="0",t.style.padding="0",t.style.overflow="clip",e.style.height="100%",e.style.margin="0",e.style.padding="0",e.style.overflow="clip"}this._containerElement=i}onBeforeUnload(){this.destroy()}adjustColumnsResponsive(){if(void 0===this._groundItem)throw new J("LMACR20883");if(this._firstLoad=!1,this.useResponsiveLayout()&&!this._updatingColumnsResponsive&&this._groundItem.contentItems.length>0&&this._groundItem.contentItems[0].isRow){if(void 0===this._groundItem||null===this._width)throw new J("LMACR77412");{const t=this._groundItem.contentItems[0].contentItems.length;if(t<=1)return;{const e=this.layoutConfig.dimensions.defaultMinItemWidth;if(t*e<=this._width)return;{this._updatingColumnsResponsive=!0;const i=t-Math.max(Math.floor(this._width/e),1),n=this._groundItem.contentItems[0],o=this.getAllStacks();if(0===o.length)throw new X("LMACRS77413");{const t=o[0];for(let e=0;en?void 0:{parentItem:t,index:o}}}case 1:if(void 0===this._focusedComponentItem)return;{const t=this._focusedComponentItem.parentItem;return this.tryCreateLocationFromParentItem(t,e)}case 2:{const t=this.findFirstContentItemType(at.stack);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 3:{let t=this.findFirstContentItemType(at.row);return void 0!==t?this.tryCreateLocationFromParentItem(t,e):(t=this.findFirstContentItemType(at.column),void 0!==t?this.tryCreateLocationFromParentItem(t,e):void 0)}case 4:{const t=this.findFirstContentItemType(at.row);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 5:{const t=this.findFirstContentItemType(at.column);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 6:if(void 0===this._groundItem)throw new J("LMFLRIF18244");return void 0!==this.rootItem?void 0:void 0===e||0===e?{parentItem:this._groundItem,index:0}:void 0;case 7:if(void 0===this._groundItem)throw new J("LMFLF18244");{const t=this._groundItem.contentItems;if(0===t.length)return void 0===e||0===e?{parentItem:this._groundItem,index:0}:void 0;{const i=t[0];return this.tryCreateLocationFromParentItem(i,e)}}}}tryCreateLocationFromParentItem(t,e){const i=t.contentItems.length;return void 0===e?{parentItem:t,index:i}:e<0||e>i?void 0:{parentItem:t,index:e}}}!function(t){t.createMaximisePlaceElement=function(t){const e=t.createElement("div");return e.classList.add("lm_maximise_place"),e},t.createTabDropPlaceholderElement=function(t){const e=t.createElement("div");return e.classList.add("lm_drop_tab_placeholder"),e},t.defaultLocationSelectors=[{typeId:1,index:void 0},{typeId:2,index:void 0},{typeId:3,index:void 0},{typeId:7,index:void 0}],t.afterFocusedItemIfPossibleLocationSelectors=[{typeId:0,index:1},{typeId:2,index:void 0},{typeId:3,index:void 0},{typeId:7,index:void 0}]}(ae||(ae={}));class le extends ae{constructor(t,e,i,n){if(super(le.createLayoutManagerConstructorParameters(t,e)),this._bindComponentEventHanlderPassedInConstructor=!1,this._creationTimeoutPassed=!1,void 0!==e&&"function"==typeof e&&(this.bindComponentEvent=e,this._bindComponentEventHanlderPassedInConstructor=!0,void 0!==i&&(this.unbindComponentEvent=i)),!this._bindComponentEventHanlderPassedInConstructor&&this.isSubWindow){if(void 0===this._constructorOrSubWindowLayoutConfig)throw new J("VLC98823");{const t=xt.resolve(this._constructorOrSubWindowLayoutConfig);this.layoutConfig=Object.assign(Object.assign({},t),{root:void 0})}}!0!==n&&(this.deprecatedConstructor||this.init())}destroy(){this.bindComponentEvent=void 0,this.unbindComponentEvent=void 0,super.destroy()}init(){if(this._bindComponentEventHanlderPassedInConstructor||"loading"!==document.readyState&&null!==document.body){if(!this._bindComponentEventHanlderPassedInConstructor&&!0===this.isSubWindow&&!this._creationTimeoutPassed)return setTimeout((()=>this.init()),7),void(this._creationTimeoutPassed=!0);!0===this.isSubWindow&&(this._bindComponentEventHanlderPassedInConstructor||this.clearHtmlAndAdjustStylesForSubWindow(),window.__glInstance=this),super.init()}else document.addEventListener("DOMContentLoaded",(()=>this.init()),{passive:!0})}clearHtmlAndAdjustStylesForSubWindow(){const t=document.head,e=new Array(4);e[0]=document.querySelectorAll("body link"),e[1]=document.querySelectorAll("body style"),e[2]=document.querySelectorAll("template"),e[3]=document.querySelectorAll(".gl_keep");for(let i=0;ithis.emit("popIn"))),document.body.appendChild(t),!0}}bindComponent(t,e){if(void 0!==this.bindComponentEvent){return this.bindComponentEvent(t,e)}if(void 0!==this.getComponentEvent)return{virtual:!1,component:this.getComponentEvent(t,e)};{const t=`${tt[2]}: ${JSON.stringify(e)}`;throw new Z(t)}}unbindComponent(t,e,i){if(void 0!==this.unbindComponentEvent)this.unbindComponentEvent(t);else if(!e&&void 0!==this.releaseComponentEvent){if(void 0===i)throw new J("VCUCRCU333998");this.releaseComponentEvent(t,i)}}}!function(t){let e=!1;t.createLayoutManagerConstructorParameters=function(t,i){const n=e?null:new URL(document.location.href).searchParams.get("gl-window");e=!0;const o=null!==n;let s,r;if(null!==n){const e=localStorage.getItem(n);if(null===e)throw new Error("Null gl-window Config");localStorage.removeItem(n);const i=JSON.parse(e),o=_t.unminifyConfig(i);r=xt.fromResolved(o),t instanceof HTMLElement&&(s=t)}else void 0===t?r=void 0:t instanceof HTMLElement?(r=void 0,s=t):r=t,void 0===s&&i instanceof HTMLElement&&(s=i);return{constructorOrSubWindowLayoutConfig:r,isSubWindow:o,containerElement:s}}}(le||(le={}));class he extends le{constructor(t,e,i){super(t,e,i,!0),this._componentTypesMap=new Map,this._registeredComponentMap=new Map,this._virtuableComponentMap=new Map,this._containerVirtualRectingRequiredEventListener=(t,e,i)=>this.handleContainerVirtualRectingRequiredEvent(t,e,i),this._containerVirtualVisibilityChangeRequiredEventListener=(t,e)=>this.handleContainerVirtualVisibilityChangeRequiredEvent(t,e),this._containerVirtualZIndexChangeRequiredEventListener=(t,e,i)=>this.handleContainerVirtualZIndexChangeRequiredEvent(t,e,i),this.deprecatedConstructor||this.init()}registerComponent(t,e,i=!1){if("function"!=typeof e)throw new $("registerComponent() componentConstructorOrFactoryFtn parameter is not a function");if(e.hasOwnProperty("prototype")){const n=e;this.registerComponentConstructor(t,n,i)}else{const n=e;this.registerComponentFactoryFunction(t,n,i)}}registerComponentConstructor(t,e,i=!1){if("function"!=typeof e)throw new Error(tt[1]);if(void 0!==this._componentTypesMap.get(t))throw new Z(`${tt[3]}: ${t}`);this._componentTypesMap.set(t,{constructor:e,factoryFunction:void 0,virtual:i})}registerComponentFactoryFunction(t,e,i=!1){if("function"!=typeof e)throw new Z("Please register a constructor function");if(void 0!==this._componentTypesMap.get(t))throw new Z(`${tt[3]}: ${t}`);this._componentTypesMap.set(t,{constructor:void 0,factoryFunction:e,virtual:i})}registerComponentFunction(t){this.registerGetComponentConstructorCallback(t)}registerGetComponentConstructorCallback(t){if("function"!=typeof t)throw new Error("Please register a callback function");void 0!==this._getComponentConstructorFtn&&console.warn("Multiple component functions are being registered. Only the final registered function will be used."),this._getComponentConstructorFtn=t}getRegisteredComponentTypeNames(){const t=this._componentTypesMap.keys();return Array.from(t)}getComponentInstantiator(t){let e;const i=pt.resolveComponentTypeName(t);return void 0!==i&&(e=this._componentTypesMap.get(i)),void 0===e&&void 0!==this._getComponentConstructorFtn&&(e={constructor:this._getComponentConstructorFtn(t),factoryFunction:void 0,virtual:!1}),e}bindComponent(t,e){let i;const n=pt.resolveComponentTypeName(e);let o;if(void 0!==n&&(i=this._componentTypesMap.get(n)),void 0===i&&void 0!==this._getComponentConstructorFtn&&(i={constructor:this._getComponentConstructorFtn(e),factoryFunction:void 0,virtual:!1}),void 0!==i){const s=i.virtual;let r,a;r=void 0===e.componentState?void 0:Ut({},e.componentState);const l=i.constructor;if(void 0!==l)a=new l(t,r,s);else{const e=i.factoryFunction;if(void 0===e)throw new X("LMBCFFU10008");a=e(t,r,s)}if(s){if(void 0===a)throw new J("GLBCVCU988774");{const e=a,i=e.rootHtmlElement;if(void 0===i)throw new Z(`${tt[5]}: ${n}`);!function(t){const e="absolute";t.style.position!==e&&(t.style.position=e)}(i),this.container.appendChild(i),this._virtuableComponentMap.set(t,e),t.virtualRectingRequiredEvent=this._containerVirtualRectingRequiredEventListener,t.virtualVisibilityChangeRequiredEvent=this._containerVirtualVisibilityChangeRequiredEventListener,t.virtualZIndexChangeRequiredEvent=this._containerVirtualZIndexChangeRequiredEventListener}}this._registeredComponentMap.set(t,a),o={virtual:i.virtual,component:a}}else o=super.bindComponent(t,e);return o}unbindComponent(t,e,i){if(void 0===this._registeredComponentMap.get(t))super.unbindComponent(t,e,i);else{const e=this._virtuableComponentMap.get(t);if(void 0!==e){const i=e.rootHtmlElement;if(void 0===i)throw new X("GLUC77743",t.title);this.container.removeChild(i),this._virtuableComponentMap.delete(t)}}}fireBeforeVirtualRectingEvent(t){this._goldenLayoutBoundingClientRect=this.container.getBoundingClientRect(),super.fireBeforeVirtualRectingEvent(t)}handleContainerVirtualRectingRequiredEvent(t,e,i){const n=this._virtuableComponentMap.get(t);if(void 0===n)throw new J("GLHCSCE55933");{const o=n.rootHtmlElement;if(void 0===o)throw new Z(tt[4]+" "+t.title);{const n=t.element.getBoundingClientRect(),s=n.left-this._goldenLayoutBoundingClientRect.left;o.style.left=zt(s);const r=n.top-this._goldenLayoutBoundingClientRect.top;o.style.top=zt(r),Tt(o,e),At(o,i)}}}handleContainerVirtualVisibilityChangeRequiredEvent(t,e){const i=this._virtuableComponentMap.get(t);if(void 0===i)throw new J("GLHCVVCRE55934");{const n=i.rootHtmlElement;if(void 0===n)throw new Z(tt[4]+" "+t.title);Dt(n,e)}}handleContainerVirtualZIndexChangeRequiredEvent(t,e,i){const n=this._virtuableComponentMap.get(t);if(void 0===n)throw new J("GLHCVZICRE55935");{const e=n.rootHtmlElement;if(void 0===e)throw new Z(tt[4]+" "+t.title);e.style.zIndex=i}}}const de="initial_",ce={show:"top",popout:!1,maximise:!1,close:"close-tab-unused"},me={headerHeight:31},ue={hasHeaders:!0,reorderEnabled:!0},pe={popoutWholeStack:!1,constrainDragToContainer:!1,constrainDragToHeaders:!1,preventDragout:!1,showMaximiseIcon:!1,showPopoutIcon:!1,showCloseIcon:!1,blockedPopoutsThrowError:!0,closePopoutsOnUnload:!0,selectionEnabled:!1};var ge,fe;class ve{constructor(e){this.layout=e,ge.set(this,void 0),fe.set(this,void 0),this.handleResize=t=>{t.forEach((t=>this.resizeElement(t.target)))},this.handleMutation=()=>{this.layout.viewComponentsByContainerElement.forEach((t=>{this.resizeElement(t.container.element)}))},t.__classPrivateFieldSet(this,ge,new ResizeObserver(this.handleResize),"f"),t.__classPrivateFieldSet(this,fe,new MutationObserver(this.handleMutation),"f")}observeMutations(e){t.__classPrivateFieldGet(this,fe,"f")?.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["class"]})}destroy(){t.__classPrivateFieldGet(this,ge,"f").disconnect(),t.__classPrivateFieldGet(this,fe,"f").disconnect()}observeContainer(e){t.__classPrivateFieldGet(this,ge,"f").observe(e)}unobserveContainer(e){t.__classPrivateFieldGet(this,ge,"f").unobserve(e)}resizeElement(t){const e=this.layout.viewComponentsByContainerElement.get(t);e&&e.resize()}}ge=new WeakMap,fe=new WeakMap;var _e={};Object.defineProperty(_e,"__esModule",{value:!0});var ye=_e.BaseItem=void 0;class Ce{constructor(t,e,i){this._item=t,this._layout=e,this._wrap=i}get raw(){return this._item}get layout(){return this._layout}get type(){return this._item.type}get contentItems(){return(this._item.contentItems??[]).map((t=>this._wrap(t)))}get parent(){const t=this._item.parent;return t?this._wrap(t):null}setActiveContentItem(t,e){if("stack"!==this.type)throw new Error(`Cannot call setActiveContentItem from a non-stack item: ${this.type}`);this._item.setActiveContentItem(t.raw,e)}static wrapInternal(t,e,i){const n=Ce.wrapCache.get(e);if(n)return n;const o=new t(e,i,(e=>Ce.wrapInternal(t,e,i)));return Ce.wrapCache.set(e,o),o}}ye=_e.BaseItem=Ce,Ce.wrapCache=new WeakMap;const we=t=>!!t&&"contentItems"in t&&(t.isRow||t.isColumn);class Ie extends ye{isRoot(){return!!this._item.parent?.isGround}getBounds(){return this._item.element.getBoundingClientRect()}get viewName(){if(this._item.isComponent){const{component:t}=this._item;return t.identity.name}throw new Error("View name not found")}onDestroyed(t){const e=({target:i})=>{i===this._item&&(t(),this._item.off("itemDestroyed",e))};this._item.on("itemDestroyed",e)}createAdjacentStack({position:t="right"}={}){const e=this.raw;if(ee.isStack(e)&&e.parent){const i=["top","bottom"].includes(t)?"column":"row",n=["left","top"].includes(t)?1:0,o=we(e.parent)?e.parent:e.layoutManager,s=o,r=e.parent.contentItems.indexOf(e);e.parent.isGround&&e.parent.removeChild(e,!0);const a=o.newItem({type:i,content:[{type:"stack",content:[]}]},r);if(!a)throw new Error("createAdjacentStack: Failed to create new container");const l=a.contentItems[0];return a.addChild(this.raw,n),we(s)&&s.removeChild(e,!0),this._wrap(l)}throw new Error(`Cannot creat adjacent stacks for type: ${e.type}, must be type 'stack'`)}setActiveContentItem(t,e=!0){if(!ee.isStack(this._item))throw new Error(`Cannot call setActiveContentItem from a non-stack item: ${this.type}`);this._item.setActiveComponentItem(t.raw,!e)}static wrap(t,e){return ye.wrapInternal(Ie,t,e)}}function be(t=[],e){for(const i of t)"component"===i.type?Object.keys(e).forEach((t=>{t in i&&(i.componentState={[`${de}${t}`]:i[t],...i.componentState}),i[t]=e[t]})):be(i.content,e)}function Se(t=[],e,i){for(const n of t)if("component"===n.type)Object.keys(e).forEach((t=>{if(`${de}${t}`in n.componentState)return n[t]=n.componentState[`${de}${t}`],void delete n.componentState[`${de}${t}`];n[t]=e[t]}));else{if(n.size&&("row"===i||"column"===i)){n["row"===i?"width":"height"]=n.size?.includes(".")?parseFloat(n.size):parseInt(n.size)}Se(n.content,e,n.type)}}function Ee(t){if(t.root){t.root.content&&Se([t.root],{componentName:"view",isClosable:!0});const e=t.root;t.content=[e],delete t.root}return t}const xe=e=>class extends e{connectedCallback(){if(!this.name||!this.uuid)throw new Error(" Name or uuid attribute missing");if(!this.src)throw new Error(" missing 'src' attribute.");this.#t||(this.#t=document.createElement("iframe"),this.#t.src=this.src,this.#t.style.height="100%",this.#t.style.width="100%",this.#t.style.border="none",this.forceFrameName?this.#t.setAttribute("name",this.forceFrameName):this.#t.setAttribute("name",t.encodeOptions({brokerUrl:this.brokerUrl,name:this.name,uuid:this.uuid,providerId:this.providerId,contextGroup:this.contextGroup},"of-frame")),this.#t.setAttribute("id",this.name),this.appendChild(this.#t))}#t;get brokerUrl(){return this.getAttribute("of-broker")}set brokerUrl(t){t&&this.setAttribute("of-broker",t)}get name(){return this.getAttribute("of-name")}set name(t){t&&this.setAttribute("of-name",t)}get forceFrameName(){return this.getAttribute("forceFrameName")}set forceFrameName(t){t&&this.setAttribute("forceFrameName",t)}get uuid(){return this.getAttribute("of-uuid")}set uuid(t){t&&this.setAttribute("of-uuid",t)}get src(){return this.getAttribute("src")}set src(t){t&&this.setAttribute("src",t)}get providerId(){return this.getAttribute("of-provider-id")}set providerId(t){t&&this.setAttribute("of-provider-id",t)}get contextGroup(){return this.getAttribute("of-context-group")}set contextGroup(t){t&&this.setAttribute("of-context-group",t)}static get observedAttributes(){return["name"]}};class Le{static create(t){const e=document.createElement("of-view");return Object.entries(t).forEach((([t,i])=>{e.setAttribute(t,i)})),e}}customElements.define("of-view",xe(HTMLElement));class ze{constructor(t,i,n,{brokerUrl:o,interopConfig:s},r){this.container=t,this.config=i,this.ofView=null,this.isDragging=()=>this.container.tab.element?.className.includes("lm_dragging")??!1;const{url:a,web:l,interop:h,name:d}=i||{},c=d??`internal-generated-view-${e.v4()}`;if(this.identity={uuid:n,name:c},this.container.element.setAttribute("of-name",c),this.container.element.id=`container-${c}`,this.container.parent.id=c,void 0===a)return void this.handleUrlMissing();const m=this.updateTitleIfNotSet(a),u={"of-broker":o,"of-uuid":n,"of-name":c,src:a};l?.frameName&&(u.forceFrameName=l.frameName);const p=h?.currentContextGroup??s?.currentContextGroup;p&&(u["of-context-group"]=p),s?.providerId&&(u["of-provider-id"]=s?.providerId),this.ofView=Le.create(u),this.ofView.title=m??`Iframe: ${a}`,r.appendChild(this.ofView),this.ofView.style.position="absolute"}updateTitleIfNotSet(t){return"view"===this.container.parent.title&&this.container.parent.setTitle(t),this.container.parent.title}handleUrlMissing(){const t=document.createElement("div");t.setAttribute("style","padding: 20px");t.innerText="No URL provided",this.container.element.appendChild(t)}destroy(){this.ofView?.remove(),this.ofView=null}closeView(){this.container.close()}resize(){if(this.ofView){if(this.isDragging())return void(this.ofView.style.display="none");const t=this.container.element.getBoundingClientRect();this.ofView.style.position="absolute",this.ofView.style.height=`${t.height}px`,this.ofView.style.width=`${t.width}px`,this.ofView.style.inset=`${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`,this.ofView.style.display="block"}}}class Me extends U{static overrideConfig(t){const e={...ue,...t.settings,...pe};return e.reorderEnabled?be(t.content,{isClosable:!0}):be(t.content,{reorderEnabled:!1}),{dimensions:me,...t,settings:e,header:{...ce,show:!1!==t.settings?.hasHeaders&&ce.show}}}constructor(t,e,i,{options:n},o,s){super(),this.identity=t,this.container=e,this.initialConfig=i,this.layoutManager=o,this.platformProvider=s,this.viewComponentsByContainerElement=new Map,this.layoutContentCache=_.getSingleInstance(),this.reparentingViews=new Set,this.goldenLayoutDestroyed=!1,this.createViewComponent=(t,e)=>{m.handleSharedView(this.layoutManager,this.identity,e);const i=new ze(t,e,this.identity.uuid,this.options,this.iframeContainer);return e&&!1===e[`${de}isClosable`]&&this.stylesheet.insertRule(`#tab-${i.identity.name} .lm_close_tab { display: none; }`),this.viewComponentsByContainerElement.set(t.element,i),this.resizeController.observeContainer(t.element),i},this.iframeContainer=document.createElement("div"),this.iframeContainer.id=`openfin-layout-iframe-container-${this.identity.layoutName}`,this.domEmitter=new V(e),this.setupStylesheets(),this.layout=new he(this.container),this.layout.resizeWithContainerAutomatically=!0,this.options=n,this.layout.registerComponent("view",this.createViewComponent),this.setupListeners(),this.resizeController=new ve(this),this.layout.loadLayout(Me.overrideConfig(i));const r=document.createElement("div");r.id=`openfin-layout-shadow-container-${this.identity.layoutName}`,r.attachShadow({mode:"open",delegatesFocus:!1}).appendChild(this.iframeContainer),this.container.appendChild(r),this.resizeController.observeMutations(this.container)}getStackByView({name:t}){const e=this.layout.findFirstComponentItemById(t);if(e?.parent&&e?.parent?.isStack)return Ie.wrap(e.parent,this)}getRoot(){return Ie.wrap(this.layout.rootItem,this)}async platformCloseView(t){const e=[...this.viewComponentsByContainerElement.values()].find((e=>e.identity.name===t.name));if(!e)throw new Error(`View with name: ${t.name} not found in layout.`);e.closeView()}async platformCreateView(t,{location:e,targetView:i}={}){if(i)throw new Error("TargetView not supported in web");const n={options:this.platformProvider.normalizeOptions(t),target:this.identity,location:e};return this.insertView(n)}setupStylesheets(){if(this.container.setAttribute("data-openfin-layout-name",this.identity.layoutName),this.stylesheet=new CSSStyleSheet,this.stylesheet.insertRule(".lm_close { display: none; }"),document.adoptedStyleSheets.push(this.stylesheet),this.initialConfig.settings?.preventSplitterResize){const t=`\n [data-openfin-layout-name='${this.identity.layoutName}'] .lm_splitter {\n pointer-events: none;\n }`;this.stylesheet.insertRule(t)}}insertView({options:t,location:e,targetView:i}){const n=e?this.layoutContentCache.getItemOrUndefined(e.id):void 0,o=i?this.layoutContentCache.getItemOrUndefined(i.name):void 0,s=n??o??Ie.wrap(this.layout.rootItem,this);let r;if(ee.isStack(s.raw))r=s.raw;else{if(!we(s.raw))throw new Error("Cannot add a view at the requested location");r=s.raw.newItem({type:"stack",content:[]})}const a=Math.min(r.contentItems.length,e?.index??r.contentItems.length);let l=this.layout.findFirstComponentItemById(t.name);l?(l.parent&&l.parent.removeChild(l,!0),r.addChild(l,a)):l=r.newComponent("view",t,t.title??t.url??"Default Title",a);const h=l.component.identity;return Promise.resolve({identity:h})}replaceView({viewToReplace:t,newView:e}){throw new Error("Method not implemented.")}replaceLayout(t){throw new Error("Method not implemented.")}async cleanupView(t){}applyPreset(t){throw new Error("Method not implemented.")}getCurrentViews(){return[...this.viewComponentsByContainerElement.values()].map((t=>t.identity))}async getFrameSnapshot(){return Ee(xt.fromResolved(this.layout.toConfig()))}isVisible(){return W(this.container)}async onViewDetached({viewIdentity:t}){this.reparentingViews.add(t.name),this.platformCloseView(t)}async destroy(){this.goldenLayoutDestroyed||(this.goldenLayoutDestroyed=!0,this.layout.destroy()),this.iframeContainer.remove(),this.resizeController.destroy(),document.adoptedStyleSheets=document.adoptedStyleSheets.filter((t=>t!==this.stylesheet)),this.viewComponentsByContainerElement.clear()}setupListeners(){this.container.addEventListener("pointerdown",(t=>{if(t.target instanceof HTMLElement){const e=t.target.classList;["lm_tab","lm_title","lm_splitter","lm_drag_handle"].some((t=>e.contains(t)))&&(this.handleDragStart(),2===t.button&&t.stopPropagation())}}),!0),document.addEventListener("pointerup",(()=>this.handleDragEnd()),!0),this.layout.on("tabCreated",(t=>{const e=t.componentItem.component;t.element.id=`tab-${e.identity.name}`,this.domEmitter.dispatchLocalEvent("tab-created",e.identity)})),this.layout.on("itemCreated",(({target:t})=>{const e=t;if(Gt.isComponentItem(e)){const t=e.component;this.domEmitter.dispatchLocalEvent("container-created",t.identity)}})),this.layout.on("itemDestroyed",(t=>{const e=t.target;if(Gt.isComponentItem(e)){const t=e.component;this.removeViewComponent(t)}})),this.layout.on("itemDropped",(()=>{this.handleDragEnd()}))}handleDragStart(){this.iframeContainer.style.pointerEvents="none"}handleDragEnd(){this.iframeContainer.style.pointerEvents=""}removeViewComponent(t){if(t.config&&!1===t.config[`${de}isClosable`]){const e=[...this.stylesheet.cssRules].findIndex((e=>e.cssText.includes(`#tab-${t.identity.name}`)));this.stylesheet.deleteRule(e)}t.destroy(),this.viewComponentsByContainerElement.delete(t.container.element),this.resizeController.unobserveContainer(t.container.element),this.reparentingViews.has(t.identity.name)?this.reparentingViews.delete(t.identity.name):this.platformProvider.closeView(t.identity.name);0===this.getCurrentViews().length&&(this.goldenLayoutDestroyed||(this.goldenLayoutDestroyed=!0,m.handleLastViewRemoved(this.layoutManager,this.identity)))}}class Pe{constructor(t,e,i,n){this.windowIdentity=t,this.connectConfig=e,this.provider=i,this.fallbackContainer=n}async createLayout(t,e){if(!("container"in t)&&!this.fallbackContainer)throw new Error("Container property is not optional in web");const{layoutName:i}=t,n=t,o=this.provider.initLayoutViews(n),s=n.container??this.fallbackContainer,r={...this.windowIdentity,layoutName:i},a=new Me(r,s,o,this.connectConfig,e,this.provider);m.registerLayout(e,i,a),this.fallbackContainer=null}async getLayoutSnapshot(t){return t.getLayoutSnapshot()}async handleLastViewRemoved(t){}}class Te{static async init(e){const i=e.getFin().InterApplicationBus.Channel,n=await i.create(`custom-frame-${e.me.uuid}`);return n.setDefaultAction((async(t,{target:e,opts:i},o)=>{const s=n.connections.find((t=>t.name===e.name));if(s)return n.dispatch(s,t,{...i,target:e});throw new Error(`Client with name ${e.name} not found`)})),await t.relayChannelClientApi_1(n,"layout-relay"),new Te(e)}constructor(t){this.wire=t,this.viewNames=new Set}normalizeOptions(t,i="default"){const n=this.wire.me.uuid;let{name:o=`internal-generated-view-${e.v4()}`}=t;return o.match(/^internal-generated-view-/)&&this.viewNames.has(o)&&"duplicate"===i&&(o=`internal-generated-view-${e.v4()}`),this.viewNames.add(o),{...t,name:o,uuid:n}}closeView(t){this.viewNames.delete(t)}initLayoutViews({layout:t,multiInstanceViewBehavior:e}){return H((t=>{if("component"===t.type&&t.componentState){const i=this.normalizeOptions(t.componentState,e);return{...t,componentState:i}}return t}),t)}}var Ae;const ke=t=>t;Ae=new WeakMap,exports.WebLayoutEntryPoint=class{constructor(e){Ae.set(this,void 0),this.initLayoutManager=async(e,i,{container:n,layoutManagerOverride:o})=>{const s=await Te.init(i),r=o??ke,a=new Pe(i.me,t.__classPrivateFieldGet(this,Ae,"f"),s,n),l=new(r(m.createClosedConstructor(a)));return await M(i,l),l},this.applyLayoutSnapshot=async(e,i,n)=>{await i.applyLayoutSnapshot(t.__classPrivateFieldGet(this,Ae,"f").platform.layoutSnapshot)},this.createLayout=async(t,e)=>m.createLayout(t,e),this.destroyLayout=async(t,e)=>m.destroyLayout(t,e),t.__classPrivateFieldSet(this,Ae,e,"f")}}; @@ -7340,7 +7340,7 @@ module.exports = stubFalse; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.init = init; -const core_web_1 = __webpack_require__(/*! @openfin/core-web */ "./node_modules/@openfin/core-web/out/api-client.js"); +const core_web_1 = __webpack_require__(/*! @openfin/core-web */ "../../node_modules/@openfin/core-web/out/api-client.js"); const settings_1 = __webpack_require__(/*! ./settings */ "./client/src/platform/settings.ts"); /** * Initializes the OpenFin Web Broker connection. @@ -8343,7 +8343,7 @@ function version(uuid) { /******/ /************************************************************************/ var __webpack_exports__ = {}; -// This entry need to be wrapped in an IIFE because it need to be in strict mode. +// This entry needs to be wrapped in an IIFE because it needs to be in strict mode. (() => { "use strict"; var exports = __webpack_exports__; diff --git a/web/v19.2.0/web-interop-basic/js/fdc3-view.bundle.js.map b/web/v19.2.0/web-interop-basic/js/fdc3-view.bundle.js.map index c5496ab..8bf1515 100644 --- a/web/v19.2.0/web-interop-basic/js/fdc3-view.bundle.js.map +++ b/web/v19.2.0/web-interop-basic/js/fdc3-view.bundle.js.map @@ -1 +1 @@ -{"version":3,"file":"fdc3-view.bundle.js","mappings":";;;;;;;;;;AAAa,MAAM,mBAAO,CAAC,iFAAoB,EAAE,mBAAO,CAAC,mDAAS,EAAE,mBAAO,CAAC,+DAAM,EAAE,mBAAO,CAAC,mDAAQ,EAAE,mBAAO,CAAC,gEAAkB,EAAE,mBAAO,CAAC,4DAAgB,EAAE,eAAe;;;;;;;;;;;;ACA9J,MAAM,mBAAO,CAAC,mDAAS,IAAI,mBAAO,CAAC,mDAAQ,IAAI,mBAAO,CAAC,gEAAkB,IAAI,mBAAO,CAAC,4DAAgB,IAAI,mBAAO,CAAC,+DAAM,EAAE,kBAAkB,EAAE,GAAG,wBAAwB,GAAG,sGAAsG,qBAAM,CAAC,qBAAM,iCAAiC,KAAK,KAAK,KAAK,MAAM,oBAAoB,WAAW,kBAAkB,kBAAkB,UAAU,SAAS,sCAAsC,SAAS,sFAAsF,mCAAmC,6BAA6B,GAAG,kCAAkC,6BAA6B,mDAAmD,0CAA0C,yDAAyD,iEAAiE,oFAAoF,2IAA2I,mDAAmD,kDAAkD,oFAAoF,4IAA4I,sDAAsD,sCAAsC,SAAS,sCAAsC,UAAU,QAAQ,eAAe,mNAAmN,UAAU,0BAA0B,SAAS,qBAAqB,SAAS,8BAA8B,sBAAsB,yiBAAyiB,QAAQ,SAAS,2EAA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AEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,cAAc,SAAS;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,2CAA2C,UAAU;AACrD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;ACrJA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEY;;AAEZ,eAAe,mBAAO,CAAC,wDAAW;AAClC,gBAAgB,mBAAO,CAAC,oDAAS;AACjC;AACA;AACA;AACA;;AAEA,cAAc;AACd,kBAAkB;AAClB,yBAAyB;;AAEzB;AACA,kBAAkB;;AAElB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,kBAAkB,YAAY;AAC9B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA,wCAAwC,SAAS;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;;AAEA;AACA;AACA,cAAc,iBAAiB;AAC/B;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,iDAAiD,EAAE;AACnD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C;AAC1C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA,yBAAyB,eAAe;AACxC;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,yBAAyB,QAAQ;AACjC;AACA,sBAAsB,eAAe;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc,YAAY;AAC1B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB,sBAAsB;AACxC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,mBAAmB;AACnB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA,oBAAoB,SAAS;AAC7B;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA,qBAAqB,WAAW,GAAG,IAAI;AACvC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA,gBAAgB,WAAW,GAAG,IAAI,KAAK,aAAa;AACpD;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;;AAEA;AACA,GAAG;AACH;AACA;AACA,mBAAmB,KAAK,mDAAmD,cAAc;AACzF,GAAG;AACH;AACA;AACA,+BAA+B,IAAI;AACnC;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,MAAM,aAAa,SAAS;AACtD;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,SAAS,gBAAgB;AACzB,cAAc,oBAAoB,EAAE,IAAI;AACxC;AACA,YAAY,gBAAgB,EAAE,IAAI;AAClC;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,GAAG,SAAS,GAAG,KAAK,qBAAqB,EAAE,EAAE;AACpE,QAAQ;AACR,yBAAyB,GAAG,KAAK,yBAAyB,EAAE,EAAE;AAC9D,mBAAmB,yBAAyB,EAAE,EAAE;AAChD;AACA,MAAM;AACN,oBAAoB,IAAI,EAAE,GAAG,SAAS,IAAI,EAAE,EAAE;AAC9C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,0CAA0C,cAAc,SAAS,OAAO;AACxE;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,kBAAkB,YAAY;AAC9B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,kBAAkB,gBAAgB;AAClC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,kBAAkB,gBAAgB;AAClC;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,cAAc,YAAY;AAC1B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,QAAQ;AAC1B;AACA,oBAAoB,QAAQ;AAC5B;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;;;;;ACzjEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEa;;AAEb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB;;AAEnB;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,sBAAsB;AACxC;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA,eAAe;AACf;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA,oBAAoB,SAAS;AAC7B;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;;AAEA,kCAAkC,QAAQ;AAC1C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oBAAoB,iBAAiB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,QAAQ;AACR;AACA,uCAAuC,QAAQ;AAC/C;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,OAAO;AACzB;AACA;AACA;;AAEA;AACA,SAAS,yBAAyB;AAClC;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,gBAAgB;AAClC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,8DAA8D,YAAY;AAC1E;AACA,8DAA8D,YAAY;AAC1E;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,qCAAqC,YAAY;AACjD;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;AACA;;;;;;;;;;;AChfA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,SAAS,WAAW;;AAEpB;AACA;AACA;AACA,SAAS,WAAW;;AAEpB;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA,SAAS,WAAW;;AAEpB;AACA;AACA,SAAS,UAAU;;AAEnB;AACA;;;;;;;;;;;ACpFA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,WAAW,mBAAO,CAAC,mDAAS;;AAE5B;AACA;;AAEA;;;;;;;;;;;ACNA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,cAAc,mBAAO,CAAC,yDAAY;AAClC,cAAc,mBAAO,CAAC,yDAAY;AAClC,cAAc,mBAAO,CAAC,yDAAY;;AAElC;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;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ACpB;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa,GAAG;AAChB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;AACA,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;;;;;;;;;;ACrKA,eAAe,mBAAO,CAAC,yDAAY;;AAEnC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;;;;;;;;;;AC7BA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,cAAc,mBAAO,CAAC,uDAAW;;AAEjC;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACnBA,aAAa,mBAAO,CAAC,uDAAW;AAChC,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,qBAAqB,mBAAO,CAAC,uEAAmB;;AAEhD;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC3BA,iBAAiB,m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iEAAgB;;AAE3C;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA,iBAAiB,mBAAO,CAAC,6DAAc;AACvC,eAAe,mBAAO,CAAC,2DAAa;AACpC,eAAe,mBAAO,CAAC,yDAAY;AACnC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;AACA;AACA;AACA,oCAAoC;;AAEpC;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC9CA,aAAa,mBAAO,CAAC,uDAAW;AAChC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,eAAe,mBAAO,CAAC,yDAAY;AACnC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC3DA,kBAAkB,mBAAO,CAAC,iEAAgB;AAC1C,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;A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;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC/GA,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACzFA;AACA,wBAAwB,qBAAM,gBAAgB,qBAAM,IAAI,qBAAM,sBAAsB,qBAAM;;AAE1F;;;;;;;;;;;ACHA,qBAAqB,mBAAO,CAAC,uEAAmB;AAChD,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,WAAW,mBAAO,CAAC,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A;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,GAAG;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC7BA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACtBA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACtBA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACzBA,uBAAuB,mBAAO,CAAC,2EAAqB;AACpD,oBAAoB,mBAAO,CAAC,qEAAkB;AAC9C,kBAAkB,mBAAO,CAAC,iEAAgB;AAC1C,kBAAkB,mBAAO,CAAC,iEAAgB;AAC1C,sBAAsB,mBAAO,CAAC,yEAAoB;;AAElD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC5EA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,mBAAmB,mBAAO,CAAC,mEAAiB;AAC5C,kBAAkB,mBAAO,CAAC,iEAAgB;;AAE1C;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACxBA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACdA,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACnBA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACZA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClCA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,GAAG;AAChB;AACA;AACA;AACA;;AAEA;AACA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;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;;;;;;;;;;ACjBA,gBAAgB,mBAAO,CAAC,6DAAc;;AAEtC;AACA;;AAEA;;;;;;;;;;;ACLA,cAAc,mBAAO,CAAC,yDAAY;;AAElC;AACA;;AAEA;;;;;;;;;;;ACLA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACnBA,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA,kBAAkB,KAA0B;;AAE5C;AACA,gCAAgC,QAAa;;AAE7C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ,CAAC;;AAED;;;;;;;;;;;AC7BA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACrBA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,aAAa,UAAU;AACvB;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACdA,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;ACRA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACbA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;;;;;;;;;;ACjBA,gBAAgB,mBAAO,CAAC,6DAAc;;AAEtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACdA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,GAAG;AAChB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACbA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACbA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,UAAU,mBAAO,CAAC,iDAAQ;AAC1B,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjCA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;;;;;;;;;;;ACzBA,gBAAgB,mBAAO,CAAC,6DAAc;;AAEtC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,GAAG;AAChB;AACA;AACA;AACA,oBAAoB,QAAQ,IAAI,QAAQ;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,kBAAkB;AAClB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpCA,sBAAsB,mBAAO,CAAC,yEAAoB;AAClD,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA,8BAA8B,mBAAmB;AACjD;AACA;AACA;AACA;AACA;AACA,+CAA+C,mBAAmB;AAClE;AACA;AACA;;AAEA;;;;;;;;;;;ACnCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACzBA,iBAAiB,mBAAO,CAAC,6DAAc;AACvC,eAAe,mBAAO,CAAC,yDAAY;;AAEnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AChCA,WAAW,mBAAO,CAAC,mDAAS;AAC5B,gBAAgB,mBAAO,CAAC,2DAAa;;AAErC;AACA,kBAAkB,KAA0B;;AAE5C;AACA,gCAAgC,QAAa;;AAE7C;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACrCA,kBAAkB,mBAAO,CAAC,iEAAgB;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,kBAAkB;AAClB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClCA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,eAAe,mBAAO,CAAC,yDAAY;;AAEnC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpCA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClCA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC1BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC9BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC5BA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC1BA,uBAAuB,mBAAO,CAAC,2EAAqB;AACpD,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC1BA,oBAAoB,mBAAO,CAAC,qEAAkB;AAC9C,eAAe,mBAAO,CAAC,2DAAa;AACpC,kBAAkB,mBAAO,CAAC,+DAAe;;AAEzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpCA,oBAAoB,mBAAO,CAAC,qEAAkB;AAC9C,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,kBAAkB,mBAAO,CAAC,+DAAe;;AAEzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC/BA;AACA;AACA;AACA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W,CAAC,WAAW,CAAC,CAAC;QAC3C,MAAM,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IAC7B,CAAC;AACF,CAAC;;;;;;;;;;;;;;AC3BD,kCASC;AAbD;;;GAGG;AACI,KAAK,UAAU,WAAW;IAChC,OAAO;QACN,QAAQ,EAAE;YACT,eAAe,EAAE,kDAAkD;YACnE,SAAS,EAAE,mDAAmD;YAC9D,UAAU,EAAE,mBAAmB;YAC/B,mBAAmB,EAAE,OAAO;SAC5B;KACD,CAAC;AACH,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACfuC;AACA;AACA;AACA;AACE;AACQ;AACE;AACE;;;;;;;;;;;;;;;;ACPtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD;;AAEnD;;AAEA,oBAAoB,gBAAgB;AACpC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA,kBAAkB,cAAc;AAChC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,kBAAkB,cAAc;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;AACA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S,iBAAiB,CAAC,OAAgB;IAC1C,MAAM,eAAe,GAAG,QAAQ,CAAC,aAAa,CAAkB,cAAc,CAAC,CAAC;IAChF,MAAM,eAAe,GAAG,QAAQ,CAAC,aAAa,CAAkB,cAAc,CAAC,CAAC;IAChF,MAAM,cAAc,GAAG,QAAQ,CAAC,aAAa,CAAiB,cAAc,CAAC,CAAC;IAE9E,IAAI,eAAe,KAAK,IAAI,IAAI,eAAe,KAAK,IAAI,IAAI,cAAc,KAAK,IAAI,EAAE,CAAC;QACrF,eAAe,CAAC,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;QAC3C,eAAe,CAAC,WAAW,GAAG,OAAO,CAAC,IAAI,IAAI,mBAAmB,CAAC;QAClE,cAAc,CAAC,WAAW,GAAG,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;IAC/D,CAAC;AACF,CAAC;AAED;;GAEG;AACH,KAAK,UAAU,aAAa;IAC3B,MAAM,eAAe,GAAG,QAAQ,CAAC,aAAa,CAAoB,YAAY,CAAC,CAAC;IAEhF,IAAI,eAAe,KAAK,IAAI,EAAE,CAAC;QAC9B,eAAe,CAAC,gBAAgB,CAAC,OAAO,EAAE,KAAK,IAAI,EAAE;YACpD,MAAM,gBAAgB,EAAE,CAAC;QAC1B,CAAC,CAAC,CAAC;IACJ,CAAC;IAED,MAAM,eAAe,EAAE,CAAC;AACzB,CAAC","sources":["webpack://openfin-web--web-interop-basic/./node_modules/@openfin/core-web/out/api-client.js","webpack://openfin-web--web-interop-basic/./node_modules/@openfin/core-web/out/main-8cad4070.js","webpack://openfin-web--web-interop-basic/./node_modules/@openfin/core-web/out/main-b14f67c9.js","webpack://openfin-web--web-interop-basic/../../node_modules/base64-js/index.js","webpack://openfin-web--web-interop-basic/../../node_modules/buffer/index.js","webpack://openfin-web--web-interop-basic/../../node_modules/events/events.js","webpack://openfin-web--web-interop-basic/../../node_modules/ieee754/index.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_DataView.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_Hash.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_ListCache.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_Map.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_MapCache.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_Promise.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_Set.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_SetCache.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_Stack.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_Symbol.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_Uint8Array.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_WeakMap.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_arrayEach.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_arrayFilter.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_arrayLikeKeys.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_arrayPush.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_arraySome.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_assignValue.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_assocIndexOf.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_baseAssign.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_baseAssignIn.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_baseAssignValue.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_baseClone.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_baseCreate.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_baseGetAllKeys.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_baseGetTag.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_baseIsArguments.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_baseIsEqual.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_baseIsEqualDeep.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_baseIsMap.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_baseIsNative.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_baseIsSet.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_baseIsTypedArray.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_baseKeys.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_baseKeysIn.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_baseTimes.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_baseUnary.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_cacheHas.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_cloneArrayBuffer.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_cloneBuffer.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_cloneDataView.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_cloneRegExp.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_cloneSymbol.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_cloneTypedArray.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_copyArray.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_copyObject.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_copySymbols.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_copySymbolsIn.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_coreJsData.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_defineProperty.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_equalArrays.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_equalByTag.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_equalObjects.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_freeGlobal.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_getAllKeys.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_getAllKeysIn.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_getMapData.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_getNative.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_getPrototype.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_getRawTag.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_getSymbols.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_getSymbolsIn.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_getTag.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_getValue.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_hashClear.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_hashDelete.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_hashGet.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_hashHas.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_hashSet.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_initCloneArray.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_initCloneByTag.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_initCloneObject.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_isIndex.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_isKeyable.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_isMasked.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_isPrototype.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_listCacheClear.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_listCacheDelete.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_listCacheGet.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_listCacheHas.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_listCacheSet.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_mapCacheClear.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_mapCacheDelete.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_mapCacheGet.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_mapCacheHas.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_mapCacheSet.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_mapToArray.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_nativeCreate.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_nativeKeys.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_nativeKeysIn.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_nodeUtil.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_objectToString.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_overArg.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_root.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_setCacheAdd.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_setCacheHas.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_setToArray.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_stackClear.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_stackDelete.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_stackGet.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_stackHas.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_stackSet.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_toSource.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/cloneDeep.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/eq.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/isArguments.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/isArray.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/isArrayLike.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/isBuffer.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/isEqual.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/isFunction.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/isLength.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/isMap.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/isObject.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/isObjectLike.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/isSet.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/isTypedArray.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/keys.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/keysIn.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/stubArray.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/stubFalse.js","webpack://openfin-web--web-interop-basic/./client/src/platform/api.ts","webpack://openfin-web--web-interop-basic/./client/src/platform/settings.ts","webpack://openfin-web--web-interop-basic/../../node_modules/uuid/dist/esm-browser/index.js","webpack://openfin-web--web-interop-basic/../../node_modules/uuid/dist/esm-browser/md5.js","webpack://openfin-web--web-interop-basic/../../node_modules/uuid/dist/esm-browser/nil.js","webpack://openfin-web--web-interop-basic/../../node_modules/uuid/dist/esm-browser/parse.js","webpack://openfin-web--web-interop-basic/../../node_modules/uuid/dist/esm-browser/regex.js","webpack://openfin-web--web-interop-basic/../../node_modules/uuid/dist/esm-browser/rng.js","webpack://openfin-web--web-interop-basic/../../node_modules/uuid/dist/esm-browser/sha1.js","webpack://openfin-web--web-interop-basic/../../node_modules/uuid/dist/esm-browser/stringify.js","webpack://openfin-web--web-interop-basic/../../node_modules/uuid/dist/esm-browser/v1.js","webpack://openfin-web--web-interop-basic/../../node_modules/uuid/dist/esm-browser/v3.js","webpack://openfin-web--web-interop-basic/../../node_modules/uuid/dist/esm-browser/v35.js","webpack://openfin-web--web-interop-basic/../../node_modules/uuid/dist/esm-browser/v4.js","webpack://openfin-web--web-interop-basic/../../node_modules/uuid/dist/esm-browser/v5.js","webpack://openfin-web--web-interop-basic/../../node_modules/uuid/dist/esm-browser/validate.js","webpack://openfin-web--web-interop-basic/../../node_modules/uuid/dist/esm-browser/version.js","webpack://openfin-web--web-interop-basic/webpack/bootstrap","webpack://openfin-web--web-interop-basic/webpack/runtime/define property getters","webpack://openfin-web--web-interop-basic/webpack/runtime/global","webpack://openfin-web--web-interop-basic/webpack/runtime/hasOwnProperty shorthand","webpack://openfin-web--web-interop-basic/webpack/runtime/make namespace object","webpack://openfin-web--web-interop-basic/webpack/runtime/node module decorator","webpack://openfin-web--web-interop-basic/./client/src/content/fdc3-view.ts"],"sourcesContent":["\"use strict\";var e=require(\"./main-8cad4070.js\");require(\"buffer/\"),require(\"uuid\"),require(\"events\"),require(\"lodash/cloneDeep\"),require(\"lodash/isEqual\"),exports.connect=e.connect;\n","\"use strict\";var e=require(\"buffer/\"),t=require(\"events\"),n=require(\"lodash/cloneDeep\"),i=require(\"lodash/isEqual\"),r=require(\"uuid\");const o=(e,t)=>`${t}<${btoa(JSON.stringify(e))}>`;var s=\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof window?window:\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:{},a={},c={},d={},h={};async function l(e){const t=[];for(const n of e){const e=await n();t.push(e)}return t}Object.defineProperty(h,\"__esModule\",{value:!0}),h.promiseMapSerial=h.serial=h.promiseMap=h.promisify=void 0,h.promisify=function(e){return(...t)=>new Promise(((n,i)=>{e(...t,((e,t)=>e?i(e):n(t)))}))},h.promiseMap=async function(e,t){return Promise.all(e.map(t))},h.serial=l,h.promiseMapSerial=async function(e,t){return l(e.map(((e,n,i)=>()=>t(e,n,i))))};var u,p=s&&s.__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},w=s&&s.__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)};Object.defineProperty(d,\"__esModule\",{value:!0}),d.Reply=d.EmitterBase=d.Base=void 0;const y=h;class f{constructor(e){this.isNodeEnvironment=()=>\"node\"===this.wire.environment.type,this.isOpenFinEnvironment=()=>\"openfin\"===this.wire.environment.type,this.isBrowserEnvironment=()=>\"other\"===this.wire.environment.type,this.wire=e}get fin(){return this.wire.getFin()}get me(){return this.wire.me}}d.Base=f;d.EmitterBase=class extends f{constructor(e,t,...n){super(e),this.topic=t,u.set(this,void 0),this.eventNames=()=>this.hasEmitter()?this.getOrCreateEmitter().eventNames():[],this.emit=(e,t,...n)=>!!this.hasEmitter()&&this.getOrCreateEmitter().emit(e,t,...n),this.hasEmitter=()=>this.wire.eventAggregator.has(w(this,u,\"f\")),this.getOrCreateEmitter=()=>this.wire.eventAggregator.getOrCreate(w(this,u,\"f\")),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[],this.listenerCount=e=>this.hasEmitter()?this.getOrCreateEmitter().listenerCount(e):0,this.registerEventListener=async(e,t={},n,i)=>{const r={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e},o=this.getOrCreateEmitter();n(o);try{await this.wire.sendAction(\"subscribe-to-desktop-event\",r)}catch(e){throw i(o),this.deleteEmitterIfNothingRegistered(o),e}},this.deregisterEventListener=async(e,t={})=>{if(this.hasEmitter()){const n={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e};await this.wire.sendAction(\"unsubscribe-to-desktop-event\",n).catch((()=>null));return this.getOrCreateEmitter()}return Promise.resolve()},p(this,u,[t,...n],\"f\"),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[]}async on(e,t,n){return await this.registerEventListener(e,n,(n=>{n.on(e,t)}),(n=>{n.removeListener(e,t)})),this}async addListener(e,t,n){return this.on(e,t,n)}async once(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.once(e,i),n.once(e,t)}),(n=>{n.removeListener(e,i),n.removeListener(e,t)})),this}async prependListener(e,t,n){return await this.registerEventListener(e,n,(n=>{n.prependListener(e,t)}),(n=>{n.removeListener(e,t)})),this}async prependOnceListener(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.prependOnceListener(e,t),n.once(e,i)}),(n=>{n.removeListener(e,t),n.removeListener(e,i)})),this}async removeListener(e,t,n){const i=await this.deregisterEventListener(e,n);return i&&(i.removeListener(e,t),this.deleteEmitterIfNothingRegistered(i)),this}async deregisterAllListeners(e){const t={...this.identity,type:e,topic:this.topic};if(this.hasEmitter()){const e=this.getOrCreateEmitter(),n=e.listenerCount(t.type),i=[];for(let e=0;enull)));return await Promise.all(i),e}}async removeAllListeners(e){const t=async e=>{const t=await this.deregisterAllListeners(e);t&&(t.removeAllListeners(e),this.deleteEmitterIfNothingRegistered(t))};if(e)await t(e);else if(this.hasEmitter()){const e=this.getOrCreateEmitter().eventNames();await(0,y.promiseMap)(e,t)}return this}deleteEmitterIfNothingRegistered(e){0===e.eventNames().length&&this.wire.eventAggregator.delete(w(this,u,\"f\"))}},u=new WeakMap;d.Reply=class{};var g={};Object.defineProperty(g,\"__esModule\",{value:!0});var m=g.RuntimeError=g.NotSupportedError=g.NotImplementedError=g.NoAckError=g.DuplicateCorrelationError=g.UnexpectedActionError=g.DisconnectedError=void 0;class v extends Error{constructor(e){super(`Expected websocket state OPEN but found ${e}`),this.readyState=e}}g.DisconnectedError=v;class C extends Error{}g.UnexpectedActionError=C;class b extends Error{}g.DuplicateCorrelationError=b;class I extends Error{}g.NoAckError=I;class E extends Error{}g.NotImplementedError=E;class x extends Error{}g.NotSupportedError=x;class A extends Error{constructor(e){const{message:t,name:n,stack:i,...r}=e;super(t),this.name=n||\"Error\",this.stack=i??this.toString(),Object.keys(r).forEach((e=>{this[e]=r[e]}))}}class P extends Error{static getCallSite(e=0){const t=Error.stackTraceLimit,n=e+1;Error.stackTraceLimit=t+n;const i=Error.prepareStackTrace;Error.prepareStackTrace=(e,t)=>t;const r=(new Error).stack?.slice(n)??[];return Error.prepareStackTrace=i,Error.stackTraceLimit=t,r}static prepareStackTrace(e,t){if(\"function\"==typeof Error.prepareStackTrace)return Error.prepareStackTrace(e,t);let n=\"\";n+=e.name||\"Error\",n+=`: ${e.message||\"\"}`;for(const e of t)n+=`\\n at ${e.toString()}`;return n}constructor(e,t){const{reason:n,error:i}=e;super(n),this.name=\"RuntimeError\",i?.stack&&(this.cause=new A(i)),t&&(this.stack=P.prepareStackTrace(this,t))}}m=g.RuntimeError=P;var M={},_={},O={};Object.defineProperty(O,\"__esModule\",{value:!0}),O.validateIdentity=void 0,O.validateIdentity=function(e){let t;return\"object\"==typeof e&&\"string\"==typeof e.uuid||(t=\"Not a valid identity object\"),t};var S={},R={},F={},j={},k={},L={},T={};Object.defineProperty(T,\"__esModule\",{value:!0}),T.handleDeprecatedWarnings=void 0;var $;T.handleDeprecatedWarnings=e=>{(e.contentNavigation?.whitelist||e.contentNavigation?.blacklist||e.contentRedirect?.whitelist||e.contentRedirect?.blacklist)&&console.warn(\"The properties 'whitelist' and 'blacklist' have been marked as deprecated and will be removed in a future version. Please use 'allowlist' and 'denylist'.\")};var B={},G={};Object.defineProperty(G,\"__esModule\",{value:!0}),G.AsyncRetryableLazy=W=G.Lazy=void 0;var W=G.Lazy=class{constructor(e){this.producerFn=e}getValue(){return this.value||(this.value=this.producerFn()),this.value}};G.AsyncRetryableLazy=class{constructor(e){this.producerFn=e}async getValue(){return this.promise||(this.promise=this.producerFn().catch((e=>{throw delete this.promise,e}))),this.promise}};var H={};Object.defineProperty(H,\"__esModule\",{value:!0}),H.WebContents=void 0;const N=d;class D extends N.EmitterBase{constructor(e,t,n){super(e,n,t.uuid,t.name),this.identity=t,this.entityType=n}capturePage(e){return this.wire.sendAction(\"capture-page\",{options:e,...this.identity}).then((({payload:e})=>e.data))}executeJavaScript(e){return this.wire.sendAction(\"execute-javascript-in-window\",{...this.identity,code:e}).then((({payload:e})=>e.data))}getZoomLevel(){return this.wire.sendAction(\"get-zoom-level\",this.identity).then((({payload:e})=>e.data))}setZoomLevel(e){return this.wire.sendAction(\"set-zoom-level\",{...this.identity,level:e}).then((()=>{}))}navigate(e){return this.wire.sendAction(\"navigate-window\",{...this.identity,url:e}).then((()=>{}))}navigateBack(){return this.wire.sendAction(\"navigate-window-back\",{...this.identity}).then((()=>{}))}async navigateForward(){await this.wire.sendAction(\"navigate-window-forward\",{...this.identity})}stopNavigation(){return this.wire.sendAction(\"stop-window-navigation\",{...this.identity}).then((()=>{}))}reload(e=!1){return this.wire.sendAction(\"reload-window\",{ignoreCache:e,...this.identity}).then((()=>{}))}print(e={}){return this.wire.sendAction(\"print\",{...this.identity,options:e}).then((()=>{}))}findInPage(e,t){return this.wire.sendAction(\"find-in-page\",{...this.identity,searchTerm:e,options:t}).then((({payload:e})=>e.data))}stopFindInPage(e){return this.wire.sendAction(\"stop-find-in-page\",{...this.identity,action:e}).then((()=>{}))}getPrinters(){return this.wire.sendAction(\"get-printers\",{...this.identity}).then((({payload:e})=>e.data))}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){await this.wire.sendAction(\"focus-window\",{emitSynthFocused:e,...this.identity})}async showDeveloperTools(){await this.wire.sendAction(\"show-developer-tools\",this.identity)}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction(\"get-process-info\",this.identity);return e}async getSharedWorkers(){return this.wire.sendAction(\"get-shared-workers\",this.identity).then((({payload:e})=>e.data))}async inspectSharedWorker(){await this.wire.sendAction(\"inspect-shared-worker\",{...this.identity})}async inspectSharedWorkerById(e){await this.wire.sendAction(\"inspect-shared-worker-by-id\",{...this.identity,workerId:e})}async inspectServiceWorker(){await this.wire.sendAction(\"inspect-service-worker\",{...this.identity})}async showPopupWindow(e){if(this.wire.sendAction(`${this.entityType}-show-popup-window`,this.identity).catch((()=>{})),e?.onPopupReady){const t=async({popupName:t})=>{try{const n=this.fin.Window.wrapSync({uuid:this.fin.me.uuid,name:t});await e.onPopupReady(n)}catch(e){throw new Error(`Something went wrong during onPopupReady execution: ${e}`)}};await this.once(\"popup-ready\",t)}const{payload:t}=await this.wire.sendAction(\"try-create-popup-window\",{options:{...e,hasResultCallback:!!e?.onPopupResult,hasReadyCallback:!!e?.onPopupReady},...this.identity}),{data:{willOpen:n,options:i}}=t;n&&await this.fin.Window.create(i.initialOptions);if(e?.onPopupResult){const t=async t=>{await e.onPopupResult((e=>{const{name:t,uuid:n,result:i,data:r}=e,o={identity:{name:t,uuid:n},result:i};return r&&(o.data=r),o})(t))},n=async()=>{await this.removeListener(\"popup-result\",t)};await this.on(\"popup-result\",t),await this.once(\"popup-teardown\",n)}const{payload:r}=await this.wire.sendAction(\"show-popup-window\",{options:i,...this.identity});return r.data}}var U,V,z,K,q;function J(){return V||(V=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(function(){if($)return L;$=1,Object.defineProperty(L,\"__esModule\",{value:!0}),L.ViewModule=void 0;const e=d,t=O,n=J(),i=T;class r extends e.Base{async create(e){const{uuid:t}=this.wire.me;if(!e.name||\"string\"!=typeof e.name)throw new Error(\"Please provide a name property as a string in order to create a View.\");return(0,i.handleDeprecatedWarnings)(e),this.wire.environment.childViews?await this.wire.environment.createChildContent({entityType:\"view\",options:{...e,uuid:t}}):await this.wire.sendAction(\"create-view\",{...e,uuid:t}),this.wrapSync({uuid:t,name:e.name})}async wrap(e){this.wire.sendAction(\"view-wrap\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}wrapSync(e){this.wire.sendAction(\"view-wrap-sync\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}getCurrent(){if(this.wire.sendAction(\"view-get-current\").catch((e=>{})),!this.wire.me.isView)throw new Error(\"You are not in a View context\");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction(\"view-get-current-sync\").catch((e=>{})),!this.wire.me.isView)throw new Error(\"You are not in a View context\");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return L.ViewModule=r,L}(),e),n(function(){if(U)return B;var e;U=1,Object.defineProperty(B,\"__esModule\",{value:!0}),B.View=void 0;const t=g,n=G,i=H,r=ie();class o extends i.WebContents{constructor(i,o){super(i,o,\"view\"),this.identity=o,e.set(this,new n.Lazy((()=>this.fin.Platform.wrapSync(this.identity).getClient()))),this.attach=async e=>{await this.wire.sendAction(\"attach-view\",{target:e,...this.identity})},this.destroy=async()=>{await this.wire.sendAction(\"destroy-view\",{...this.identity})},this.show=async()=>{await this.wire.sendAction(\"show-view\",{...this.identity})},this.showAt=async(e,t={})=>{await this.wire.sendAction(\"show-view-at\",{bounds:e,...this.identity,options:t})},this.bringToFront=async()=>{await this.wire.sendAction(\"bring-view-to-front\",{...this.identity})},this.hide=async()=>{await this.wire.sendAction(\"hide-view\",{...this.identity})},this.setBounds=async e=>{await this.wire.sendAction(\"set-view-bounds\",{bounds:e,...this.identity})},this.getBounds=async()=>(await this.wire.sendAction(\"get-view-bounds\",{...this.identity})).payload.data,this.getInfo=async()=>(await this.wire.sendAction(\"get-view-info\",{...this.identity})).payload.data,this.getParentLayout=async()=>(this.wire.sendAction(\"view-get-parent-layout\",{...this.identity}).catch((()=>{})),this.fin.Platform.Layout.getLayoutByViewIdentity(this.identity)),this.getOptions=async()=>this.wire.sendAction(\"get-view-options\",{...this.identity}).then((({payload:e})=>e.data)),this.updateOptions=async e=>this.wire.sendAction(\"update-view-options\",{options:e,...this.identity}).then((()=>{})),this.getCurrentWindow=async()=>{const{payload:{data:e}}=await this.wire.sendAction(\"get-view-window\",{...this.identity});return new r._Window(this.wire,e)},this.getCurrentStack=async()=>{this.wire.sendAction(\"view-get-current-stack\").catch((()=>{}));try{return(await this.getParentLayout()).getStackByViewIdentity(this.identity)}catch(e){throw new t.RuntimeError({reason:\"This view does not belong to a stack.\",error:e})}},this.triggerBeforeUnload=async()=>(await this.wire.sendAction(\"trigger-before-unload\",{...this.identity})).payload.data,this.bindToElement=async e=>{if(!e)throw new Error(\"Element not found.\");return this.wire.environment.observeBounds(e,(async e=>this.setBounds(e)))}}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){const t=await this.getCurrentWindow();await t.focusedWebViewWasChanged(),await super.focus({emitSynthFocused:e})}}return B.View=o,e=new WeakMap,B}(),e)}(k)),k}function Y(){if(z)return j;z=1,Object.defineProperty(j,\"__esModule\",{value:!0}),j.Application=void 0;const e=d,t=ie(),n=J();class i extends e.EmitterBase{constructor(e,n){super(e,\"application\",n.uuid),this.identity=n,this.window=new t._Window(this.wire,{uuid:this.identity.uuid,name:this.identity.uuid})}windowListFromIdentityList(e){const n=[];return e.forEach((e=>{n.push(new t._Window(this.wire,{uuid:e.uuid,name:e.name}))})),n}isRunning(){return this.wire.sendAction(\"is-application-running\",this.identity).then((({payload:e})=>e.data))}async quit(e=!1){try{await this._close(e),await this.wire.sendAction(\"destroy-application\",{force:e,...this.identity})}catch(e){if(![\"Remote connection has closed\",\"Could not locate the requested application\"].some((t=>e.message.includes(t))))throw e}}async _close(e=!1){try{await this.wire.sendAction(\"close-application\",{force:e,...this.identity})}catch(e){if(!e.message.includes(\"Remote connection has closed\"))throw e}}close(e=!1){return console.warn(\"Deprecation Warning: Application.close is deprecated Please use Application.quit\"),this.wire.sendAction(\"application-close\",this.identity).catch((e=>{})),this._close(e)}getChildWindows(){return this.wire.sendAction(\"get-child-windows\",this.identity).then((({payload:e})=>{const t=[];return e.data.forEach((e=>{t.push({uuid:this.identity.uuid,name:e})})),this.windowListFromIdentityList(t)}))}getManifest(){return this.wire.sendAction(\"get-application-manifest\",this.identity).then((({payload:e})=>e.data))}getParentUuid(){return this.wire.sendAction(\"get-parent-application\",this.identity).then((({payload:e})=>e.data))}getShortcuts(){return this.wire.sendAction(\"get-shortcuts\",this.identity).then((({payload:e})=>e.data))}async getViews(){const{payload:e}=await this.wire.sendAction(\"application-get-views\",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}getZoomLevel(){return this.wire.sendAction(\"get-application-zoom-level\",this.identity).then((({payload:e})=>e.data))}getWindow(){return this.wire.sendAction(\"application-get-window\",this.identity).catch((e=>{})),Promise.resolve(this.window)}registerUser(e,t){return this.wire.sendAction(\"register-user\",{userName:e,appName:t,...this.identity}).then((()=>{}))}removeTrayIcon(){return this.wire.sendAction(\"remove-tray-icon\",this.identity).then((()=>{}))}restart(){return this.wire.sendAction(\"restart-application\",this.identity).then((()=>{}))}run(){return console.warn(\"Deprecation Warning: Application.run is deprecated Please use fin.Application.start\"),this.wire.sendAction(\"application-run\",this.identity).catch((e=>{})),this._run()}_run(e={}){return this.wire.sendAction(\"run-application\",{manifestUrl:this._manifestUrl,opts:e,...this.identity}).then((()=>{}))}scheduleRestart(){return this.wire.sendAction(\"relaunch-on-close\",this.identity).then((()=>{}))}async sendApplicationLog(){const{payload:e}=await this.wire.sendAction(\"send-application-log\",this.identity);return e.data}async setJumpList(e){await this.wire.sendAction(\"set-jump-list\",{config:e,...this.identity})}setTrayIcon(e){return this.wire.sendAction(\"set-tray-icon\",{enabledIcon:e,...this.identity}).then((()=>{}))}setShortcuts(e){return this.wire.sendAction(\"set-shortcuts\",{data:e,...this.identity}).then((()=>{}))}async setShortcutQueryParams(e){await this.wire.sendAction(\"set-shortcut-query-args\",{data:e,...this.identity})}setZoomLevel(e){return this.wire.sendAction(\"set-application-zoom-level\",{level:e,...this.identity}).then((()=>{}))}async setAppLogUsername(e){await this.wire.sendAction(\"set-app-log-username\",{data:e,...this.identity})}getTrayIconInfo(){return this.wire.sendAction(\"get-tray-icon-info\",this.identity).then((({payload:e})=>e.data))}hasTrayIcon(){return this.wire.sendAction(\"has-tray-icon\",this.identity).then((({payload:e})=>e.data))}terminate(){return this.wire.sendAction(\"terminate-application\",this.identity).then((()=>{}))}wait(){return this.wire.sendAction(\"wait-for-hung-application\",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction(\"get-info\",this.identity).then((({payload:e})=>e.data))}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction(\"application-get-process-info\",this.identity);return e}async setFileDownloadLocation(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t};await this.wire.sendAction(\"set-file-download-location\",{...n,downloadLocation:e})}async getFileDownloadLocation(){const{payload:{data:e}}=await this.wire.sendAction(\"get-file-download-location\",this.identity);return e}async showTrayIconPopupMenu(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t},{payload:i}=await this.wire.sendAction(\"show-tray-icon-popup-menu\",{...n,options:e});return i.data}async closeTrayIconPopupMenu(){const{name:e}=this.wire.me,t={uuid:this.identity.uuid,name:e};await this.wire.sendAction(\"close-tray-icon-popup-menu\",{...t})}}return j.Application=i,j}function Z(){return q||(q=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(function(){if(K)return F;K=1,Object.defineProperty(F,\"__esModule\",{value:!0}),F.ApplicationModule=void 0;const e=d,t=O,n=Y();class i extends e.Base{async wrap(e){this.wire.sendAction(\"wrap-application\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}wrapSync(e){this.wire.sendAction(\"wrap-application-sync\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}async _create(e){return void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&void 0===e.isPlatformController&&(e.autoShow=!0),await this.wire.sendAction(\"create-application\",e),this.wrap({uuid:e.uuid})}create(e){return console.warn(\"Deprecation Warning: fin.Application.create is deprecated. Please use fin.Application.start\"),this.wire.sendAction(\"application-create\").catch((e=>{})),this._create(e)}async start(e){this.wire.sendAction(\"start-application\").catch((e=>{}));const t=await this._create(e);return await this.wire.sendAction(\"run-application\",{uuid:e.uuid}),t}async startManyManifests(e,t){return this.wire.sendAction(\"run-applications\",{applications:e,opts:t}).then((()=>{}))}getCurrent(){return this.wire.sendAction(\"get-current-application\").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction(\"get-current-application-sync\").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}async startFromManifest(e,t){this.wire.sendAction(\"application-start-from-manifest\").catch((e=>{}));const n=await this._createFromManifest(e);return await n._run(t),n}createFromManifest(e){return console.warn(\"Deprecation Warning: fin.Application.createFromManifest is deprecated. Please use fin.Application.startFromManifest\"),this.wire.sendAction(\"application-create-from-manifest\").catch((e=>{})),this._createFromManifest(e)}_createFromManifest(e){return this.wire.sendAction(\"get-application-manifest\",{manifestUrl:e}).then((({payload:e})=>{const t=e.data.platform?e.data.platform.uuid:e.data.startup_app.uuid;return this.wrap({uuid:t})})).then((t=>(t._manifestUrl=e,t)))}}return F.ApplicationModule=i,F}(),e),n(Y(),e)}(R)),R}H.WebContents=D;var Q={};Object.defineProperty(Q,\"__esModule\",{value:!0}),Q.promisifySubscription=void 0;var X,ee,te;function ne(){if(X)return S;X=1,Object.defineProperty(S,\"__esModule\",{value:!0}),S._Window=void 0;const e=Z(),t=H,n=J(),i=T,r=Q;class o extends t.WebContents{constructor(e,t){super(e,t,\"window\")}async createWindow(e){this.wire.sendAction(\"window-create-window\",this.identity).catch((e=>{}));const t=await(0,r.promisifySubscription)(this,\"fire-constructor-callback\");void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&(e.autoShow=!0),(0,i.handleDeprecatedWarnings)(e);const n=this.wire.environment.createChildContent({entityType:\"window\",options:e}),[o]=await Promise.all([t.getValue(),n]);let s;const{success:a}=o,c=o.data,{message:d}=c;s=a?{httpResponseCode:c.httpResponseCode,apiInjected:c.apiInjected}:{message:c.message,networkErrorCode:c.networkErrorCode,stack:c.stack};const h={message:d,cbPayload:s,success:a};try{this.getWebWindow().fin.__internal_.openerSuccessCBCalled()}catch(e){}return h.success?this:Promise.reject(h)}getAllFrames(){return this.wire.sendAction(\"get-all-frames\",this.identity).then((({payload:e})=>e.data))}getBounds(){return this.wire.sendAction(\"get-window-bounds\",this.identity).then((({payload:e})=>e.data))}center(){return this.wire.sendAction(\"center-window\",this.identity).then((()=>{}))}blur(){return this.wire.sendAction(\"blur-window\",this.identity).then((()=>{}))}bringToFront(){return this.wire.sendAction(\"bring-window-to-front\",this.identity).then((()=>{}))}animate(e,t){return this.wire.sendAction(\"animate-window\",{transitions:e,options:t,...this.identity}).then((()=>{}))}hide(){return this.wire.sendAction(\"hide-window\",this.identity).then((()=>{}))}close(e=!1){return this.wire.sendAction(\"close-window\",{force:e,...this.identity}).then((()=>{Object.setPrototypeOf(this,null)}))}focusedWebViewWasChanged(){return this.wire.sendAction(\"focused-webview-changed\",this.identity).then((()=>{}))}getNativeId(){return this.wire.sendAction(\"get-window-native-id\",this.identity).then((({payload:e})=>e.data))}async getCurrentViews(){const{payload:e}=await this.wire.sendAction(\"window-get-views\",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}disableFrame(){return console.warn(\"Function is deprecated; use disableUserMovement instead.\"),this.wire.sendAction(\"disable-window-frame\",this.identity).then((()=>{}))}disableUserMovement(){return this.wire.sendAction(\"disable-window-frame\",this.identity).then((()=>{}))}enableFrame(){return console.warn(\"Function is deprecated; use enableUserMovement instead.\"),this.wire.sendAction(\"enable-window-frame\",this.identity).then((()=>{}))}enableUserMovement(){return this.wire.sendAction(\"enable-window-frame\",this.identity).then((()=>{}))}flash(){return this.wire.sendAction(\"flash-window\",this.identity).then((()=>{}))}stopFlashing(){return this.wire.sendAction(\"stop-flash-window\",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction(\"get-window-info\",this.identity).then((({payload:e})=>e.data))}async getLayout(e){this.wire.sendAction(\"window-get-layout\",this.identity).catch((e=>{}));const t=await this.getOptions();if(!t.layout&&!t.layoutSnapshot)throw new Error(\"Window does not have a Layout\");return this.fin.Platform.Layout.wrap(e??this.identity)}getOptions(){return this.wire.sendAction(\"get-window-options\",this.identity).then((({payload:e})=>e.data))}getParentApplication(){return this.wire.sendAction(\"window-get-parent-application\",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity))}getParentWindow(){return this.wire.sendAction(\"window-get-parent-window\",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity)).then((e=>e.getWindow()))}async getSnapshot(e){const t={area:e,...this.identity};console.warn(\"Window.getSnapshot has been deprecated, please use Window.capturePage\");return(await this.wire.sendAction(\"get-window-snapshot\",t)).payload.data}getState(){return this.wire.sendAction(\"get-window-state\",this.identity).then((({payload:e})=>e.data))}getWebWindow(){return this.wire.sendAction(\"window-get-web-window\",this.identity).catch((e=>{})),this.wire.environment.getWebWindow(this.identity)}isMainWindow(){return this.wire.sendAction(\"window-is-main-window\",this.identity).catch((e=>{})),this.me.uuid===this.me.name}isShowing(){return this.wire.sendAction(\"is-window-showing\",this.identity).then((({payload:e})=>e.data))}maximize(){return this.wire.sendAction(\"maximize-window\",this.identity).then((()=>{}))}minimize(){return this.wire.sendAction(\"minimize-window\",this.identity).then((()=>{}))}moveBy(e,t,n){return this.wire.sendAction(\"move-window-by\",{deltaLeft:e,deltaTop:t,positioningOptions:n,...this.identity}).then((()=>{}))}moveTo(e,t,n){return this.wire.sendAction(\"move-window\",{left:e,top:t,positioningOptions:n,...this.identity}).then((()=>{}))}resizeBy(e,t,n,i){return this.wire.sendAction(\"resize-window-by\",{deltaWidth:Math.floor(e),deltaHeight:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}resizeTo(e,t,n,i){return this.wire.sendAction(\"resize-window\",{width:Math.floor(e),height:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}restore(){return this.wire.sendAction(\"restore-window\",this.identity).then((()=>{}))}setAsForeground(){return this.wire.sendAction(\"set-foreground-window\",this.identity).then((()=>{}))}setBounds(e,t){return this.wire.sendAction(\"set-window-bounds\",{...e,...this.identity,positioningOptions:t}).then((()=>{}))}show(e=!1){return this.wire.sendAction(\"show-window\",{force:e,...this.identity}).then((()=>{}))}showAt(e,t,n=!1){return this.wire.sendAction(\"show-at-window\",{force:n,left:Math.floor(e),top:Math.floor(t),...this.identity}).then((()=>{}))}updateOptions(e){return this.wire.sendAction(\"update-window-options\",{options:e,...this.identity}).then((()=>{}))}authenticate(e,t){return this.wire.sendAction(\"window-authenticate\",{userName:e,password:t,...this.identity}).then((()=>{}))}async showPopupMenu(e){const{payload:t}=await this.wire.sendAction(\"show-popup-menu\",{options:e,...this.identity});return t.data}async closePopupMenu(){return this.wire.sendAction(\"close-popup-menu\",{...this.identity}).then((()=>{}))}async dispatchPopupResult(e){this.wire.sendAction(\"window-dispatch-popup-result\",this.identity).catch((e=>{})),await this.wire.sendAction(\"dispatch-popup-result\",{data:e,...this.identity})}async print(e={content:\"self\"}){switch(e.content){case void 0:case\"self\":return super.print(e);case\"screenshot\":return this.wire.sendAction(\"print-screenshot\",this.identity).then((()=>{}));case\"views\":return this.wire.sendAction(\"print-views\",{...this.identity,options:e}).then((()=>{}));default:return}}}return S._Window=o,S}function ie(){return te||(te=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(function(){if(ee)return _;ee=1,Object.defineProperty(_,\"__esModule\",{value:!0}),_._WindowModule=void 0;const e=d,t=O,n=ne();class i extends e.Base{async wrap(e){this.wire.sendAction(\"window-wrap\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}wrapSync(e){this.wire.sendAction(\"window-wrap-sync\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}create(e){return this.wire.sendAction(\"create-window\").catch((e=>{})),new n._Window(this.wire,{uuid:this.me.uuid,name:e.name}).createWindow(e)}getCurrent(){if(this.wire.sendAction(\"get-current-window\").catch((e=>{})),!this.wire.me.isWindow)throw new Error(\"You are not in a Window context\");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction(\"get-current-window-sync\").catch((e=>{})),!this.wire.me.isWindow)throw new Error(\"You are not in a Window context\");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return _._WindowModule=i,_}(),e),n(ne(),e)}(M)),M}Q.promisifySubscription=async(e,t,n=(()=>!0),i)=>{let r,o,s;const a=new Promise(((e,t)=>{r=e,o=t})),c=e=>{n(e)&&(clearTimeout(s),r(e))};return await e.on(t,c),i&&(s=setTimeout((()=>o(new Error(\"event timed out\"))),i)),a.finally((()=>{e.removeListener(t,c).catch((()=>null))})),{getValue:()=>a}},Object.defineProperty(c,\"__esModule\",{value:!0}),c.System=void 0;const re=d,oe=g,se=ie(),ae=t;class ce extends re.EmitterBase{constructor(e){super(e,\"system\")}sendExternalProcessRequest(e,t){return new Promise(((n,i)=>{const r=\"external-process-exited\";let o,s,a,c;\"function\"==typeof t.listener&&(a=e=>{const n=e||{};s={topic:\"exited\",uuid:n.processUuid||\"\",exitCode:n.exitCode||0},o===e.processUuid&&(t.listener(s),c.removeListener(r,a))},this.wire.me.name||(this.wire.me.name=this.wire.me.uuid),c=new se._Window(this.wire,this.wire.me),c.on(r,a)),this.wire.sendAction(e,t).then((({payload:e})=>{o=e.data.uuid,n(e.data),s&&o===s.uuid&&(t.listener(s),c.removeListener(r,a))})).catch((e=>{c&&c.removeListener(r,a),i(e)}))}))}getVersion(){return this.wire.sendAction(\"get-version\").then((({payload:e})=>e.data))}clearCache(e){return this.wire.sendAction(\"clear-cache\",e).then((()=>{}))}deleteCacheOnExit(){return this.wire.sendAction(\"delete-cache-request\").then((()=>{}))}exit(){return this.wire.sendAction(\"exit-desktop\").then((()=>{}))}async fetchManifest(e){const{payload:{data:t}}=await this.wire.sendAction(\"fetch-manifest\",{manifestUrl:e});return t}flushCookieStore(){return this.wire.sendAction(\"flush-cookie-store\").then((()=>{}))}getAllWindows(){return this.wire.sendAction(\"get-all-windows\").then((({payload:e})=>e.data))}getAllApplications(){return this.wire.sendAction(\"get-all-applications\").then((({payload:e})=>e.data))}getCommandLineArguments(){return this.wire.sendAction(\"get-command-line-arguments\").then((({payload:e})=>e.data))}async getCrashReporterState(){const{payload:{data:{diagnosticMode:e,isRunning:t}}}=await this.wire.sendAction(\"get-crash-reporter-state\");return console.warn(\"diagnosticMode property is deprecated. It will be removed in a future version\"),{diagnosticMode:e,diagnosticsMode:e,isRunning:t}}async startCrashReporter(e){const t=e,n={...t,diagnosticMode:t.diagnosticsMode||t.diagnosticMode},{payload:{data:{diagnosticMode:i,isRunning:r}}}=await this.wire.sendAction(\"start-crash-reporter\",n);return{diagnosticMode:i,diagnosticsMode:i,isRunning:r}}getUniqueUserId(){return this.wire.sendAction(\"get-unique-user-id\").then((({payload:e})=>e.data))}getEntityInfo(e,t){return this.wire.sendAction(\"get-entity-info\",{uuid:e,name:t}).then((({payload:e})=>e.data))}getEnvironmentVariable(e){return this.wire.sendAction(\"get-environment-variable\",{environmentVariables:e}).then((({payload:e})=>e.data))}getFocusedWindow(){return this.wire.sendAction(\"get-focused-window\").then((({payload:e})=>e.data))}async isAppCertified(e){const{payload:{data:{certifiedInfo:t}}}=await this.wire.sendAction(\"is-app-certified\",{manifestUrl:e});return t}getInstalledRuntimes(){return this.wire.sendAction(\"get-installed-runtimes\").then((({payload:e})=>e.data.runtimes))}async getInstalledApps(){const{payload:{data:{installedApps:e}}}=await this.wire.sendAction(\"get-installed-apps\");return e}getLog(e){return this.wire.sendAction(\"view-log\",e).then((({payload:e})=>e.data))}getMachineId(){return this.wire.sendAction(\"get-machine-id\").then((({payload:e})=>e.data))}getMinLogLevel(){return this.wire.sendAction(\"get-min-log-level\").then((({payload:e})=>e.data))}getLogList(){return this.wire.sendAction(\"list-logs\").then((({payload:e})=>e.data))}getMonitorInfo(){return this.wire.sendAction(\"get-monitor-info\").then((({payload:e})=>e.data))}getMousePosition(){return this.wire.sendAction(\"get-mouse-position\").then((({payload:e})=>e.data))}getProcessList(){return console.warn(\"System.getProcessList has been deprecated. Please consider using our new process APIs: Window.getProcessInfo, View.getProcessInfo, Application.getProcessInfo, System.getAllProcessInfo\"),this.wire.sendAction(\"process-snapshot\").then((({payload:e})=>e.data))}async getAllProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction(\"get-all-process-info\",this.identity);return e}getProxySettings(){return this.wire.sendAction(\"get-proxy-settings\").then((({payload:e})=>e.data))}getRuntimeInfo(){return this.wire.sendAction(\"get-runtime-info\").then((({payload:e})=>e.data))}getRvmInfo(){return this.wire.sendAction(\"get-rvm-info\").then((({payload:e})=>e.data))}getHostSpecs(){return this.wire.sendAction(\"get-host-specs\").then((({payload:e})=>e.data))}getOSInfo(){return this.wire.sendAction(\"get-os-info\").then((({payload:e})=>e.data))}launchExternalProcess(e){return this.sendExternalProcessRequest(\"launch-external-process\",e)}monitorExternalProcess(e){return this.sendExternalProcessRequest(\"monitor-external-process\",e)}log(e,t){return this.wire.sendAction(\"write-to-log\",{level:e,message:t}).then((()=>{}))}openUrlWithBrowser(e){return this.wire.sendAction(\"open-url-with-browser\",{url:e}).then((()=>{}))}async registerCustomProtocol(e){if(\"object\"!=typeof e)throw new Error(\"Must provide an object with a `protocolName` property having a string value.\");await this.wire.sendAction(\"register-custom-protocol\",e)}async unregisterCustomProtocol(e){await this.wire.sendAction(\"unregister-custom-protocol\",{protocolName:e})}async getCustomProtocolState(e){return this.wire.sendAction(\"get-custom-protocol-state\",{protocolName:e}).then((({payload:e})=>e.data))}releaseExternalProcess(e){return this.wire.sendAction(\"release-external-process\",{uuid:e}).then((()=>{}))}showDeveloperTools(e){return this.wire.sendAction(\"show-developer-tools\",e).then((()=>{}))}terminateExternalProcess(e){return this.wire.sendAction(\"terminate-external-process\",e).then((()=>{}))}updateProxySettings(e){return this.wire.sendAction(\"update-proxy\",e).then((()=>{}))}async downloadAsset(e,t){const n=()=>{};let i=n,r=n;const o=new Promise(((e,t)=>{i=e,r=t}));if(\"openfin\"!==this.wire.environment.type)throw new oe.NotSupportedError(\"downloadAsset only supported in an OpenFin Render process\");const s=oe.RuntimeError.getCallSite(),a=this.wire.environment.getNextMessageId().toString(),c=`asset-download-progress-${a}`,d=`asset-download-error-${a}`,h=`asset-download-complete-${a}`,l=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},u=()=>{this.removeListener(c,l)};await Promise.all([this.on(c,l),this.once(d,(e=>{u();const{reason:t,err:n}=e;r(new oe.RuntimeError({reason:t,error:n},s))})),this.once(h,(()=>{u(),i()}))]);const p=Object.assign(e,{downloadId:a});return await this.wire.sendAction(\"download-asset\",p).catch((e=>{throw u(),e})),o}downloadRuntime(e,t){const n=oe.RuntimeError.getCallSite();return new Promise(((i,r)=>{if(\"openfin\"!==this.wire.environment.type)return void r(new oe.NotSupportedError(\"downloadRuntime only supported in an OpenFin Render process\"));const o=this.wire.environment.getNextMessageId().toString(),s=`runtime-download-progress-${o}`,a=`runtime-download-error-${o}`,c=`runtime-download-complete-${o}`,d=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},h=()=>{this.removeListener(s,d)};this.on(s,d),this.once(a,(e=>{h();const{reason:t,err:i}=e;r(new oe.RuntimeError({reason:t,error:i},n))})),this.once(c,(()=>{h(),i()}));const l=Object.assign(e,{downloadId:o});this.wire.sendAction(\"download-runtime\",l).catch((e=>{h(),r(e)}))}))}downloadPreloadScripts(e){return this.wire.sendAction(\"download-preload-scripts\",{scripts:e}).then((({payload:e})=>e.data))}getAllExternalApplications(){return this.wire.sendAction(\"get-all-external-applications\").then((({payload:e})=>e.data))}getAppAssetInfo(e){return this.wire.sendAction(\"get-app-asset-info\",e).then((({payload:e})=>e.data))}getCookies(e){const t=this.wire.environment.getUrl(),n=Object.assign(e,{url:t});return this.wire.sendAction(\"get-cookies\",n).then((({payload:e})=>e.data))}setMinLogLevel(e){return this.wire.sendAction(\"set-min-log-level\",{level:e}).then((()=>{}))}resolveUuid(e){return this.wire.sendAction(\"resolve-uuid\",{entityKey:e}).then((({payload:e})=>e.data))}executeOnRemote(e,t){return t.requestingIdentity=e,this.wire.ferryAction(t)}readRegistryValue(e,t,n){return this.wire.sendAction(\"read-registry-value\",{rootKey:e,subkey:t,value:n}).then((({payload:e})=>e.data))}registerExternalConnection(e){return this.wire.sendAction(\"register-external-connection\",{uuid:e}).then((({payload:e})=>e.data))}async getServiceConfiguration(e){if(\"string\"!=typeof e.name)throw new Error(\"Must provide an object with a `name` property having a string value\");const{name:t}=e;return this.wire.sendAction(\"get-service-configuration\",{name:t}).then((({payload:e})=>e.data))}async getSystemAppConfig(e){if(\"string\"!=typeof e)throw new Error(\"Must provide a string value for name of system app\");return this.wire.sendAction(\"get-system-app-configuration\",{name:e}).then((({payload:e})=>e.data))}async registerShutdownHandler(e){this.wire.sendAction(\"system-register-shutdown-handler\").catch((e=>{}));const{uuid:t,name:n}=this.wire.me;this.on(\"system-shutdown\",(i=>{e({proceed:()=>{this.wire.environment.raiseEvent(\"application/system-shutdown-handled\",{uuid:t,name:n,topic:\"application\"})}})}))}runRvmHealthCheck(){return this.wire.sendAction(\"run-rvm-health-check\").then((({payload:e})=>e.data))}async launchManifest(e,t={}){const{subscribe:n,...i}=t,r=i;if(n){const e=new ae.EventEmitter;n(e);const t=\"app-version-progress\",i=\"runtime-status\",o=\"app-version-complete\",s=\"app-version-error\",a=this.wire.environment.getNextMessageId().toString();r.appVersionId=a;const c=[o,t,i,s],d=e=>{const{appVersionId:t,topic:n,type:i,...r}=e;return{...r,type:c.find((e=>i.includes(e)))}},h=t=>{const n=d(t);e.emit(n.type,n)},l=()=>{this.removeListener(`${t}.${a}`,h),this.removeListener(`${i}.${a}`,h),this.removeListener(`${o}.${a}`,h),this.removeListener(`${s}.${a}`,h),this.removeListener(`${o}.${a}`,l),this.removeListener(`${s}.${a}`,l)};await Promise.all([this.on(`${t}.${a}`,h),this.on(`${i}.${a}`,h),this.once(`${o}.${a}`,h),this.once(`${s}.${a}`,h),this.once(`${o}.${a}`,l),this.once(`${s}.${a}`,l)])}return(await this.wire.sendAction(\"launch-manifest\",{manifestUrl:e,opts:r})).payload.data.manifest}async queryPermissionForCurrentContext(e){const t={uuid:this.wire.me.uuid,name:this.wire.me.name};return(await this.wire.sendAction(\"query-permission-for-current-context\",{apiName:e,identity:t})).payload.data}async enableNativeWindowIntegrationProvider(e){const{payload:t}=await this.wire.sendAction(\"enable-native-window-integration-provider\",{permissions:e});return t.data}async registerUsage({data:e,type:t}){await this.wire.sendAction(\"register-usage\",{data:e,type:t})}async getPrinters(){const{payload:e}=await this.wire.sendAction(\"system-get-printers\");return e.data}async updateProcessLoggingOptions(e){await this.wire.sendAction(\"system-update-process-logging-options\",{options:e})}async getDomainSettings(){const{payload:{data:e}}=await this.wire.sendAction(\"get-domain-settings\",this.identity);return e}async setDomainSettings(e){await this.wire.sendAction(\"set-domain-settings\",{domainSettings:e,...this.identity})}async refreshExtensions(){const{payload:e}=await this.wire.sendAction(\"refresh-extensions\");return e.data}async getInstalledExtensions(){const{payload:e}=await this.wire.sendAction(\"get-installed-extensions\");return e.data}}c.System=ce;var de={},he={};Object.defineProperty(he,\"__esModule\",{value:!0}),he.RefCounter=void 0;he.RefCounter=class{constructor(){this.topicRefMap=new Map}incRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t+1;n=i,this.topicRefMap.set(e,i)}else this.topicRefMap.set(e,1),n=1;return n}decRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t-1;this.topicRefMap.set(e,i),n=i}else n=-1;return n}actOnFirst(e,t,n){return 1===this.incRefCount(e)?t():n()}actOnLast(e,t,n){return 0===this.decRefCount(e)?t():n()}};var le={},ue={},pe={};Object.defineProperty(pe,\"__esModule\",{value:!0}),pe.ChannelBase=pe.ProtectedItems=void 0;const we=e=>async(t,n,i)=>{const r=await e(t,n,i);return void 0===r?n:r};pe.ProtectedItems=class{constructor(e,t){this.providerIdentity=e,this.close=t}};class ye{static defaultAction(e){throw new Error(`No action registered at target for ${e}`)}constructor(){this.subscriptions=new Map}async processAction(e,t,n){try{const i=this.subscriptions.has(e)?this.subscriptions.get(e):(t,n)=>(this.defaultAction??ye.defaultAction)(e,t,n),r=this.preAction?await this.preAction(e,t,n):t,o=await i(r,n);return this.postAction?await this.postAction(e,o,n):o}catch(t){if(this.errorMiddleware)return this.errorMiddleware(e,t,n);throw t}}beforeAction(e){if(this.preAction)throw new Error(\"Already registered beforeAction middleware\");this.preAction=we(e)}onError(e){if(this.errorMiddleware)throw new Error(\"Already registered error middleware\");this.errorMiddleware=e}afterAction(e){if(this.postAction)throw new Error(\"Already registered afterAction middleware\");this.postAction=we(e)}remove(e){this.subscriptions.delete(e)}setDefaultAction(e){if(this.defaultAction)throw new Error(\"default action can only be set once\");this.defaultAction=e}register(e,t){if(this.subscriptions.has(e))throw new Error(`Subscription already registered for action: ${e}. Unsubscribe before adding new subscription`);return this.subscriptions.set(e,t),!0}}pe.ChannelBase=ye;var fe,ge,me,ve=s&&s.__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)},Ce=s&&s.__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};Object.defineProperty(ue,\"__esModule\",{value:!0}),ue.ChannelClient=void 0;const be=pe,Ie=new Map;class Ee extends be.ChannelBase{static closeChannelByEndpointId(e){const t=Ie.get(e);t&&ve(t,me,\"f\").call(t)}static handleProviderDisconnect(e){for(const t of Ie.values())t.providerIdentity.channelId===e.channelId&&(t.disconnectListener(e),ve(t,me,\"f\").call(t))}constructor(e,t,n){super(),fe.set(this,void 0),ge.set(this,void 0),this.processAction=(e,t,n)=>super.processAction(e,t,n),me.set(this,(()=>{Ie.delete(this.endpointId),ve(this,ge,\"f\").close()})),Ce(this,fe,new be.ProtectedItems(e,t),\"f\"),this.disconnectListener=()=>{},this.endpointId=e.endpointId,Ce(this,ge,n,\"f\"),Ie.set(this.endpointId,this),n.receive(this.processAction)}get providerIdentity(){return ve(this,fe,\"f\").providerIdentity}async dispatch(e,t){if(ve(this,ge,\"f\").isEndpointConnected(this.providerIdentity.channelId))return ve(this,ge,\"f\").send(this.providerIdentity.channelId,e,t);throw new Error(\"The client you are trying to dispatch from is disconnected from the target provider.\")}onDisconnection(e){this.disconnectListener=t=>{try{e(t)}catch(e){throw new Error(`Error while calling the onDisconnection callback: ${e.message}`)}finally{this.disconnectListener=()=>{}}}}async disconnect(){await this.sendDisconnectAction(),ve(this,me,\"f\").call(this)}async sendDisconnectAction(){const e=ve(this,fe,\"f\");await e.close()}static async wireClose(e,t,n){const{channelName:i,uuid:r,name:o}=t;await e.sendAction(\"disconnect-from-channel\",{channelName:i,uuid:r,name:o,endpointId:n})}}ue.ChannelClient=Ee,fe=new WeakMap,ge=new WeakMap,me=new WeakMap;var xe={},Ae={};Object.defineProperty(Ae,\"__esModule\",{value:!0}),Ae.exhaustiveCheck=void 0,Ae.exhaustiveCheck=function(e,t){throw new Error(`Unsupported value: ${e}${t?`\\n Supported values are: ${t.join(\"\")}`:\"\"}`)};var Pe,Me,_e,Oe={},Se=s&&s.__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},Re=s&&s.__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)};Object.defineProperty(Oe,\"__esModule\",{value:!0}),Oe.ClassicInfo=Oe.ClassicStrategy=void 0;Oe.ClassicStrategy=class{constructor(e,t,n,i){this.messageReceiver=t,this.endpointId=n,this.providerIdentity=i,Pe.set(this,void 0),Me.set(this,new Map),_e.set(this,new Map),this.send=async(e,t,n)=>{const i=Re(this,Me,\"f\").get(e);if(!i)throw new Error(`Could not locate routing info for endpoint ${e}`);const r={...i};r.isLocalEndpointId&&delete r.endpointId,delete r.isLocalEndpointId;const o=Re(this,Pe,\"f\").sendAction(\"send-channel-message\",{...r,providerIdentity:this.providerIdentity,action:t,payload:n});Re(this,_e,\"f\").get(e)?.add(o);return(await o.catch((e=>{throw new Error(e.message)})).finally((()=>{Re(this,_e,\"f\").get(e)?.delete(o)}))).payload.data.result},this.close=async()=>{this.messageReceiver.removeEndpoint(this.providerIdentity.channelId,this.endpointId),[...Re(this,Me,\"f\").keys()].forEach((e=>this.closeEndpoint(e))),Se(this,Me,new Map,\"f\")},Se(this,Pe,e,\"f\")}onEndpointDisconnect(e,t){}receive(e){this.messageReceiver.addEndpoint(e,this.providerIdentity.channelId,this.endpointId)}async closeEndpoint(e){const t=Re(this,Me,\"f\").get(e);Re(this,Me,\"f\").delete(e);const n=Re(this,_e,\"f\").get(e);n?.forEach((n=>{const i=`Channel connection with identity uuid: ${t?.uuid} / name: ${t?.name} / endpointId: ${e} no longer connected.`;n.cancel(new Error(i))}))}isEndpointConnected(e){return Re(this,Me,\"f\").has(e)}addEndpoint(e,t){Re(this,Me,\"f\").set(e,t.endpointIdentity),Re(this,_e,\"f\").set(e,new Set)}isValidEndpointPayload(e){return\"string\"==typeof e?.endpointIdentity?.endpointId||\"string\"==typeof e?.endpointIdentity?.channelId}},Pe=new WeakMap,Me=new WeakMap,_e=new WeakMap,Oe.ClassicInfo={version:5,minimumVersion:0,type:\"classic\"};var Fe={},je={},ke={};Object.defineProperty(ke,\"__esModule\",{value:!0}),ke.errorToPOJO=void 0,ke.errorToPOJO=function(e){return{stack:e.stack,name:e.name,message:e.message,toString:()=>e.stack||e.toString()}};var Le,Te,$e=s&&s.__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)},Be=s&&s.__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};Object.defineProperty(je,\"__esModule\",{value:!0}),je.RTCEndpoint=void 0;const Ge=ke;je.RTCEndpoint=class{static isValidEndpointPayload(e){const t=e=>\"object\"==typeof e&&null!==e;return t(e)&&t(e.endpointIdentity)&&t(e.rtc)&&\"string\"==typeof e.endpointIdentity.endpointId}constructor({rtc:e,endpointIdentity:t}){this.responseMap=new Map,Le.set(this,null),Te.set(this,void 0),this.connectionStateChangeHandler=e=>{\"connected\"!==this.rtc.rtcClient.connectionState&&(this.rtc.rtcClient.removeEventListener(\"connectionstatechange\",this.connectionStateChangeHandler),this.close(),$e(this,Te,\"f\")&&$e(this,Te,\"f\").call(this))},this.send=async(e,t)=>{const n=`message-${Math.random()}`,i=new Promise(((e,t)=>{this.responseMap.set(n,{resolve:e,reject:t})}));return this.rtc.channels.request.send(JSON.stringify({action:e,payload:t,messageId:n})),i},this.close=()=>{this.responseMap.forEach((e=>e.reject(\"Connection has closed.\"))),this.responseMap=new Map,this.rtc.channels.request.close(),this.rtc.channels.response.close(),this.rtc.rtcClient.close()},this.rtc=e,this.endpointIdentity=t,this.rtc.channels.response.addEventListener(\"message\",(e=>{let{data:t}=e;e.data instanceof ArrayBuffer&&(t=(new TextDecoder).decode(e.data));const{messageId:n,payload:i,success:r,error:o}=JSON.parse(t),{resolve:s,reject:a}=this.responseMap.get(n)??{};s&&a?(this.responseMap.delete(n),r?s(i):a(o)):(console.log(\"Could not find id in responseMap.\"),console.log(e))})),this.rtc.channels.request.addEventListener(\"message\",(async e=>{let{data:n}=e;e.data instanceof ArrayBuffer&&(n=(new TextDecoder).decode(e.data));const{messageId:i,action:r,payload:o}=JSON.parse(n);if($e(this,Le,\"f\"))try{const e=await $e(this,Le,\"f\").call(this,r,o,t);this.rtc.channels.response.send(JSON.stringify({messageId:i,payload:e,success:!0}))}catch(e){\"open\"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,error:(0,Ge.errorToPOJO)(e),success:!1}))}else\"open\"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,success:!1,error:\"Connection not ready.\"}))})),this.rtc.rtcClient.addEventListener(\"connectionstatechange\",this.connectionStateChangeHandler),Object.values(this.rtc.channels).forEach((e=>{e.onclose=e=>{[...this.responseMap.values()].forEach((e=>e.reject(new Error(\"RTCDataChannel closed unexpectedly, this is most commonly caused by message size. Note: RTC Channels have a message size limit of ~255kB.\")))),this.close(),$e(this,Te,\"f\")&&$e(this,Te,\"f\").call(this)}}))}onDisconnect(e){if($e(this,Te,\"f\"))throw new Error(\"RTCEndpoint disconnectListener cannot be set twice.\");Be(this,Te,e,\"f\")}receive(e){if($e(this,Le,\"f\"))throw new Error(\"You have already set a listener for this RTC Endpoint.\");Be(this,Le,e,\"f\")}get connected(){return\"connected\"===this.rtc.rtcClient.connectionState}},Le=new WeakMap,Te=new WeakMap;var We,He,Ne,De={},Ue=s&&s.__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)},Ve=s&&s.__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};Object.defineProperty(De,\"__esModule\",{value:!0}),De.EndpointStrategy=void 0;De.EndpointStrategy=class{constructor(e,t,n){this.EndpointType=e,this.StrategyName=n,We.set(this,null),He.set(this,new Map),Ne.set(this,!0),this.send=async(e,t,n)=>this.getEndpointById(e).send(t,n),this.close=async()=>{Ue(this,Ne,\"f\")&&(Ue(this,He,\"f\").forEach((e=>e.close())),Ve(this,He,new Map,\"f\")),Ve(this,Ne,!1,\"f\")},this.isValidEndpointPayload=t}onEndpointDisconnect(e,t){this.getEndpointById(e).onDisconnect(t)}receive(e){if(Ue(this,We,\"f\"))throw new Error(`You have already set a listener for this ${this.StrategyName} Strategy`);Ve(this,We,e,\"f\"),Ue(this,He,\"f\").forEach((e=>e.receive(Ue(this,We,\"f\"))))}getEndpointById(e){const t=Ue(this,He,\"f\").get(e);if(!t)throw new Error(`Client with endpoint id ${e} is not connected`);return t}get connected(){return Ue(this,Ne,\"f\")}isEndpointConnected(e){return Ue(this,He,\"f\").has(e)}addEndpoint(e,t){if(!Ue(this,Ne,\"f\"))return void console.warn(`Adding endpoint to disconnected ${this.StrategyName} Strategy`);const n=new this.EndpointType(t);Ue(this,We,\"f\")&&n.receive(Ue(this,We,\"f\")),Ue(this,He,\"f\").set(e,n)}async closeEndpoint(e){Ue(this,He,\"f\").delete(e)}},We=new WeakMap,He=new WeakMap,Ne=new WeakMap,Object.defineProperty(Fe,\"__esModule\",{value:!0}),Fe.RTCInfo=Fe.RTCStrategy=void 0;const ze=je,Ke=De;class qe extends Ke.EndpointStrategy{constructor(){super(ze.RTCEndpoint,ze.RTCEndpoint.isValidEndpointPayload,\"RTC\")}}Fe.RTCStrategy=qe,Fe.RTCInfo={version:2,minimumVersion:0,type:\"rtc\"};var Je={};Object.defineProperty(Je,\"__esModule\",{value:!0}),Je.RTCICEManager=void 0;const Ye=d;class Ze extends Ye.EmitterBase{constructor(e){super(e,\"channel\"),this.ensureChannelOpened=e=>new Promise(((t,n)=>{if(\"open\"===e.readyState)t();else if(\"connecting\"===e.readyState){const n=()=>{e.removeEventListener(\"open\",n),t()};e.addEventListener(\"open\",n)}else n(new Error(\"This Channel has already closed\"))}))}static createDataChannelPromise(e,t){let n;const i=new Promise((e=>{n=e})),r=i=>{const o=()=>{i.channel.removeEventListener(\"open\",o),n(i.channel)};i.channel.label===e&&(i.channel.addEventListener(\"open\",o),t.removeEventListener(\"datachannel\",r))};return t.addEventListener(\"datachannel\",r),i}async listenForProviderIce(e,t){await this.on(this.createProviderEventName(e),t,{timestamp:Date.now()})}async raiseProviderIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createProviderEventName(e)),t)}async listenForClientIce(e,t){await this.on(this.createClientEventName(e),t,{timestamp:Date.now()})}async raiseClientIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createClientEventName(e)),t)}cleanupIceListeners(e){this.removeAllListeners(this.createClientEventName(e)),this.removeAllListeners(this.createProviderEventName(e))}createClientEventName(e){return`ice-client-${e}`}createProviderEventName(e){return`ice-provider-${e}`}createRouteString(e){return`channel/${e}`}createRtcPeer(){return this.wire.environment.getRtcPeer()}async startClientOffer(){const e=Math.random().toString(),t=this.createRtcPeer();t.addEventListener(\"icecandidate\",(async t=>{t.candidate&&await this.raiseClientIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForProviderIce(e,(async e=>{await t.addIceCandidate(e.candidate)}));const n={request:t.createDataChannel(\"request\"),response:t.createDataChannel(\"response\")},i=await t.createOffer();await t.setLocalDescription(i);const r=Promise.all([n.request,n.response].map(this.ensureChannelOpened)).then((()=>{}));return{rtcClient:t,channels:n,offer:i,rtcConnectionId:e,channelsOpened:r}}async finishClientOffer(e,t,n){return await e.setRemoteDescription(t),await n,!0}async createProviderAnswer(e,t){const n=this.createRtcPeer(),i=Ze.createDataChannelPromise(\"request\",n),r=Ze.createDataChannelPromise(\"response\",n);n.addEventListener(\"icecandidate\",(async t=>{t.candidate&&await this.raiseProviderIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForClientIce(e,(async e=>{await n.addIceCandidate(e.candidate)})),await n.setRemoteDescription(t);const o=await n.createAnswer();await n.setLocalDescription(o);const s=Promise.all([i,r]).then((([t,n])=>(this.cleanupIceListeners(e),{request:t,response:n})));return{rtcClient:n,answer:o,channels:s}}}Je.RTCICEManager=Ze;var Qe={},Xe={};function et(e){return[...e.split(\".\").reverse().entries()].reduce(((e,[t,n])=>e+ +n*1e4**t),0)}function tt(e,t){return et(e)>=et(t)}function nt(e){return e.split(\"/\")[0]}Object.defineProperty(Xe,\"__esModule\",{value:!0}),Xe.runtimeUuidMeetsMinimumRuntimeVersion=Xe.parseRuntimeUuid=Xe.meetsMinimumRuntimeVersion=void 0,Xe.meetsMinimumRuntimeVersion=tt,Xe.parseRuntimeUuid=nt,Xe.runtimeUuidMeetsMinimumRuntimeVersion=function(e,t){return tt(nt(e),t)};var it,rt,ot,st,at,ct=s&&s.__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)},dt=s&&s.__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};Object.defineProperty(Qe,\"__esModule\",{value:!0}),Qe.ChannelProvider=void 0;const ht=pe,lt=Xe;class ut extends ht.ChannelBase{get connections(){return[...ct(this,it,\"f\")]}static handleClientDisconnection(e,t){const n=e.connections.find((e=>e.endpointId===t.endpointId));if(n)ct(e,st,\"f\").call(e,n);else{e.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name)).forEach(ct(e,st,\"f\"))}e.disconnectListener(t)}static setProviderRemoval(e,t){ut.removalMap.set(e,t)}constructor(e,t,n){super(),it.set(this,void 0),rt.set(this,void 0),ot.set(this,void 0),st.set(this,(e=>{const t=this.connections.filter((t=>t.endpointId!==e.endpointId));ct(this,ot,\"f\").closeEndpoint(e.endpointId),dt(this,it,t,\"f\")})),this.processAction=async(e,t,n)=>(ut.clientIsMultiRuntime(n)&&!(0,lt.runtimeUuidMeetsMinimumRuntimeVersion)(n.runtimeUuid,\"18.87.56.0\")?this.handleMultiRuntimeLegacyClient(n):this.checkForClientConnection(n),super.processAction(e,t,n)),at.set(this,(()=>{ct(this,ot,\"f\").close();const e=ut.removalMap.get(this);e&&e()})),dt(this,rt,new ht.ProtectedItems(e,t),\"f\"),this.connectListener=()=>{},this.disconnectListener=()=>{},dt(this,it,[],\"f\"),dt(this,ot,n,\"f\"),n.receive(this.processAction)}dispatch(e,t,n){const i=e.endpointId??this.getEndpointIdForOpenFinId(e,t);return i&&ct(this,ot,\"f\").isEndpointConnected(i)?ct(this,ot,\"f\").send(i,t,n):Promise.reject(new Error(`Client connection with identity uuid: ${e.uuid} / name: ${e.name} / endpointId: ${i} no longer connected.`))}async processConnection(e,t){return ct(this,it,\"f\").push(e),this.connectListener(e,t)}publish(e,t){return this.connections.map((n=>ct(this,ot,\"f\").send(n.endpointId,e,t)))}onConnection(e){this.connectListener=e}onDisconnection(e){this.disconnectListener=e}async destroy(){const e=ct(this,rt,\"f\");e.providerIdentity,dt(this,it,[],\"f\"),await e.close(),ct(this,at,\"f\").call(this)}async getAllClientInfo(){return this.connections.map((e=>{const{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}=e;return{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}}))}checkForClientConnection(e){if(!this.isClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider.\\n Client Identity: {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}isClientConnected(e){return ut.clientIdentityIncludesEndpointId(e)?this.connections.some((t=>t.endpointId===e.endpointId&&t.uuid===e.uuid&&t.name===e.name)):this.isLegacyClientConnected(e)}isLegacyClientConnected(e){return this.connections.some((t=>t.uuid===e.uuid&&t.name===e.name))}handleMultiRuntimeLegacyClient(e){if(!this.isLegacyClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider. Client Identity:\\n {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}getEndpointIdForOpenFinId(e,t){const n=this.connections.filter((t=>t.name===e.name&&t.uuid===e.uuid));if(n.length>=2){const n=ct(this,rt,\"f\"),{uuid:i,name:r}=e,o=n?.providerIdentity.uuid,s=n?.providerIdentity.name;console.warn(`WARNING: Dispatch call may have unintended results. The \"to\" argument of your dispatch call is missing the\\n \"endpointId\" parameter. The identity you are dispatching to ({uuid: ${i}, name: ${r}})\\n has multiple channelClients for this channel. Your dispatched action: (${t}) from the provider:\\n ({uuid: ${o}, name: ${s}}) will only be processed by the most recently-created client.`)}return n.pop()?.endpointId}static clientIdentityIncludesEndpointId(e){return void 0!==e.endpointId}static clientIsMultiRuntime(e){return void 0!==e.runtimeUuid}static async wireClose(e,t){await e.sendAction(\"destroy-channel\",{channelName:t})}}Qe.ChannelProvider=ut,it=new WeakMap,rt=new WeakMap,ot=new WeakMap,st=new WeakMap,at=new WeakMap,ut.removalMap=new WeakMap;var pt={};Object.defineProperty(pt,\"__esModule\",{value:!0}),pt.MessageReceiver=void 0;const wt=ue,yt=d;class ft extends yt.Base{constructor(e){super(e),this.onmessage=e=>\"process-channel-message\"===e.action&&(this.processChannelMessage(e),!0),this.endpointMap=new Map,this.latestEndpointIdByChannelId=new Map,e.registerMessageHandler(this.onmessage.bind(this))}async processChannelMessage(e){const{senderIdentity:t,providerIdentity:n,action:i,ackToSender:r,payload:o,intendedTargetIdentity:s}=e.payload,a=s.channelId??s.endpointId??this.latestEndpointIdByChannelId.get(n.channelId),c=this.endpointMap.get(a);if(!c)return r.payload.success=!1,r.payload.reason=`Client connection with identity uuid: ${this.wire.me.uuid} / name: ${this.wire.me.name} / endpointId: ${a} no longer connected.`,this.wire.sendRaw(r);try{const e=await c(i,o,t);return r.payload.payload=r.payload.payload||{},r.payload.payload.result=e,this.wire.sendRaw(r)}catch(e){return r.payload.success=!1,r.payload.reason=e.message,this.wire.sendRaw(r)}}addEndpoint(e,t,n){this.endpointMap.set(n,e),t!==n&&this.latestEndpointIdByChannelId.set(t,n)}removeEndpoint(e,t){this.endpointMap.delete(t),this.latestEndpointIdByChannelId.get(e)===t&&this.latestEndpointIdByChannelId.delete(e)}checkForPreviousClientConnection(e){const t=this.latestEndpointIdByChannelId.get(e);t&&(wt.ChannelClient.closeChannelByEndpointId(t),console.warn(\"You have created a second connection to an older provider. First connection has been removed from the clientMap\"),console.warn(\"If the provider calls publish(), you may receive multiple messages.\"))}}pt.MessageReceiver=ft;var gt={};Object.defineProperty(gt,\"__esModule\",{value:!0}),gt.ProtocolManager=void 0;gt.ProtocolManager=class{constructor(e){this.ProtocolsInPreferenceOrder=e,this.DefaultClientProtocols=[\"classic\"],this.DefaultProviderProtocols=[\"classic\"],this.getClientProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultClientProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(\", \")}.`);return t},this.getProviderProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultProviderProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(\", \")}.`);return t},this.getCompatibleProtocols=(e,t)=>t.supportedProtocols.filter((t=>e.some((e=>e.type===t.type&&t.version>=e.minimumVersion&&e.version>=(t.minimumVersion??0))))).slice(0,t.maxProtocols)}};var mt={};Object.defineProperty(mt,\"__esModule\",{value:!0});class vt{static combine(e,t){return new vt(e,t)}constructor(e,t){this.primary=e,this.secondary=t}onEndpointDisconnect(e,t){this.primary.onEndpointDisconnect(e,(()=>{this.secondary.isEndpointConnected(e)||t()})),this.secondary.onEndpointDisconnect(e,(()=>{this.primary.isEndpointConnected(e)||t()}))}isValidEndpointPayload(e){return this.primary.isValidEndpointPayload(e)||this.secondary.isValidEndpointPayload(e)}async closeEndpoint(e){await this.primary.closeEndpoint(e),await this.secondary.closeEndpoint(e)}isEndpointConnected(e){return this.primary.isEndpointConnected(e)||this.secondary.isEndpointConnected(e)}async addEndpoint(e,t){this.primary.isValidEndpointPayload(t)&&await this.primary.addEndpoint(e,t),this.secondary.isValidEndpointPayload(t)&&await this.secondary.addEndpoint(e,t)}receive(e){this.primary.receive(e),this.secondary.receive(e)}send(e,t,n){return this.primary.isEndpointConnected(e)?this.primary.send(e,t,n):this.secondary.send(e,t,n)}async close(){await Promise.all([this.primary.close(),this.secondary.close()])}}mt.default=vt;var Ct,bt,It=s&&s.__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},Et=s&&s.__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)},xt=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(xe,\"__esModule\",{value:!0}),xe.ConnectionManager=void 0;const At=Ae,Pt=d,Mt=Oe,_t=Fe,Ot=Je,St=Qe,Rt=pt,Ft=gt,jt=xt(mt);class kt extends Pt.Base{static getProtocolOptionsFromStrings(e){return e.map((e=>{switch(e){case\"rtc\":return _t.RTCInfo;case\"classic\":return Mt.ClassicInfo;default:return(0,At.exhaustiveCheck)(e,[\"rtc\",\"classic\"])}}))}constructor(e){super(e),Ct.set(this,void 0),bt.set(this,void 0),this.removeChannelFromProviderMap=e=>{this.providerMap.delete(e)},this.onmessage=e=>\"process-channel-connection\"===e.action&&(this.processChannelConnection(e),!0),this.providerMap=new Map,this.protocolManager=new Ft.ProtocolManager(\"node\"===this.wire.environment.type?[\"classic\"]:[\"rtc\",\"classic\"]),It(this,Ct,new Rt.MessageReceiver(e),\"f\"),It(this,bt,new Ot.RTCICEManager(e),\"f\"),e.registerMessageHandler(this.onmessage.bind(this))}createProvider(e,t){const n=Object.assign(this.wire.environment.getDefaultChannelOptions().create,e||{}),i=this.protocolManager.getProviderProtocols(n?.protocols),r=i.map((e=>{switch(e){case\"rtc\":return new _t.RTCStrategy;case\"classic\":return new Mt.ClassicStrategy(this.wire,Et(this,Ct,\"f\"),t.channelId,t);default:return(0,At.exhaustiveCheck)(e,[\"rtc\",\"classic\"])}}));let o;if(2===r.length){const[e,t]=r;o=jt.default.combine(e,t)}else{if(1!==r.length)throw new Error(\"failed to combine strategies\");[o]=r}const s=new St.ChannelProvider(t,(()=>St.ChannelProvider.wireClose(this.wire,t.channelName)),o),a=t.channelId;return this.providerMap.set(a,{provider:s,strategy:o,supportedProtocols:kt.getProtocolOptionsFromStrings(i)}),St.ChannelProvider.setProviderRemoval(s,this.removeChannelFromProviderMap.bind(this)),s}async createClientOffer(e){const t=this.protocolManager.getClientProtocols(e?.protocols);let n;return{offer:{supportedProtocols:await Promise.all(t.map((async e=>{switch(e){case\"rtc\":{const{rtcClient:e,channels:t,offer:i,rtcConnectionId:r,channelsOpened:o}=await Et(this,bt,\"f\").startClientOffer();return n={rtcClient:e,channels:t,channelsOpened:o},{type:\"rtc\",version:_t.RTCInfo.version,payload:{offer:i,rtcConnectionId:r}}}case\"classic\":return{type:\"classic\",version:Mt.ClassicInfo.version};default:return(0,At.exhaustiveCheck)(e,[\"rtc\",\"classic\"])}}))),maxProtocols:2},rtc:n}}async createClientStrategy(e,t){t.endpointId||(t.endpointId=this.wire.environment.getNextMessageId(),Et(this,Ct,\"f\").checkForPreviousClientConnection(t.channelId));const n=t.answer??{supportedProtocols:[{type:\"classic\",version:1}]},i=(await Promise.all(n.supportedProtocols.map((async n=>\"rtc\"===n.type&&e?(await Et(this,bt,\"f\").finishClientOffer(e.rtcClient,n.payload.answer,e.channelsOpened),new _t.RTCStrategy):\"classic\"===n.type?new Mt.ClassicStrategy(this.wire,Et(this,Ct,\"f\"),t.endpointId,t):null)))).filter((e=>null!==e));let r;if(e&&!i.some((e=>e instanceof _t.RTCStrategy))&&e&&e.rtcClient.close(),i.length>=2)r=jt.default.combine(i[0],i[1]);else{if(!i.length)throw new Error(\"No compatible protocols\");[r]=i}const o={endpointIdentity:t,rtc:e};return r.addEndpoint(t.channelId,o),r}async processChannelConnection(e){const{clientIdentity:t,providerIdentity:n,ackToSender:i,payload:r,offer:o}=e.payload;t.endpointId?t.isLocalEndpointId=!1:(t.endpointId=this.wire.environment.getNextMessageId(),t.isLocalEndpointId=!0);const s=n.channelId,a=this.providerMap.get(s);if(!a)return i.payload.success=!1,i.payload.reason=`Channel \"${n.channelName}\" has been destroyed.`,this.wire.sendRaw(i);const{provider:c,strategy:d,supportedProtocols:h}=a;try{if(!(c instanceof St.ChannelProvider))throw Error(\"Cannot connect to a channel client\");const e=o??{supportedProtocols:[{type:\"classic\",version:1}],maxProtocols:1},n=this.protocolManager.getCompatibleProtocols(h,e);if(!n.length)throw new Error(\"This provider does not support any of the offered protocols.\");const s=await c.processConnection(t,r);i.payload.payload=i.payload.payload||{};let a={supportedProtocols:[],endpointPayloadPromise:Promise.resolve({endpointIdentity:t})};return a=await n.reduce((async(e,t)=>{const n=await e;if(\"rtc\"===t.type){const{answer:e,rtcClient:i,channels:r}=await Et(this,bt,\"f\").createProviderAnswer(t.payload.rtcConnectionId,t.payload.offer);n.supportedProtocols.push({type:\"rtc\",version:_t.RTCInfo.version,payload:{answer:e}}),n.endpointPayloadPromise=n.endpointPayloadPromise.then((e=>r.then((t=>({...e,rtc:{rtcClient:i,channels:t}})))))}else n.supportedProtocols.push({type:\"classic\",version:Mt.ClassicInfo.version});return n}),Promise.resolve(a)),a.endpointPayloadPromise.then((e=>d.addEndpoint(t.endpointId,e))),i.payload.payload.result=s,i.payload.payload.answer=a,this.wire.sendRaw(i)}catch(e){return i.payload.success=!1,i.payload.reason=e.message,this.wire.sendRaw(i)}}}xe.ConnectionManager=kt,Ct=new WeakMap,bt=new WeakMap;var Lt,Tt,$t,Bt=s&&s.__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},Gt=s&&s.__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)};Object.defineProperty(le,\"__esModule\",{value:!0}),le.Channel=void 0;const Wt=t,Ht=G,Nt=d,Dt=ue,Ut=xe,Vt=Qe;function zt(e){const t=Math.floor(e/10),n=Math.min(3e4,500*2**t);return new Promise((e=>{setTimeout((()=>{e(!1)}),n)}))}class Kt extends Nt.EmitterBase{constructor(e){super(e,\"channel\"),Lt.set(this,void 0),Tt.set(this,new Wt.EventEmitter),$t.set(this,new Ht.AsyncRetryableLazy((async()=>{await Promise.all([this.on(\"disconnected\",(e=>{Dt.ChannelClient.handleProviderDisconnect(e)})),this.on(\"connected\",((...e)=>{Gt(this,Tt,\"f\").emit(\"connected\",...e)}))]).catch((()=>new Error(\"error setting up channel connection listeners\")))}))),Bt(this,Lt,new Ut.ConnectionManager(e),\"f\")}async getAllChannels(){return this.wire.sendAction(\"get-all-channels\").then((({payload:e})=>e.data))}async onChannelConnect(e){await this.on(\"connected\",e)}async onChannelDisconnect(e){await this.on(\"disconnected\",e)}async safeConnect(e,t,n){const i={count:0};do{let r=()=>{};const o=new Promise((t=>{r=n=>{e===n.channelName&&t(!0)},Gt(this,Tt,\"f\").on(\"connected\",r)}));try{if(i.count>0){i.gotConnectedEvent=await Promise.race([zt(i.count),o]);const t=await this.wire.sendAction(\"connect-to-channel\",{...n,retryInfo:i});return console.log(`Successfully connected to channelName: ${e}`),t.payload.data}const t=this.wire.sendAction(\"connect-to-channel\",n);i.originalMessageId=t.messageId;return(await t).payload.data}catch(n){if(!n.message.includes(\"internal-nack\"))throw n;t&&0===i.count&&console.warn(`No channel found for channelName: ${e}. Waiting for connection...`)}finally{i.count+=1,Gt(this,Tt,\"f\").removeListener(\"connected\",r)}}while(t);throw new Error(`No channel found for channelName: ${e}.`)}async connect(e,t={}){if(await Gt(this,$t,\"f\").getValue(),!e||\"string\"!=typeof e)throw new Error(\"Please provide a channelName string to connect to a channel.\");const n={wait:!0,...this.wire.environment.getDefaultChannelOptions().connect,...t},{offer:i,rtc:r}=await Gt(this,Lt,\"f\").createClientOffer(n);let o;(this.fin.me.isFrame||this.fin.me.isView||this.fin.me.isWindow)&&(o=(await this.fin.me.getInfo()).url);const s={channelName:e,...n,offer:i,connectionUrl:o},a=await this.safeConnect(e,n.wait,s),c=await Gt(this,Lt,\"f\").createClientStrategy(r,a),d=new Dt.ChannelClient(a,(()=>Dt.ChannelClient.wireClose(this.wire,a,a.endpointId)),c);return c.onEndpointDisconnect(a.channelId,(async()=>{try{await d.sendDisconnectAction()}catch(e){console.warn(`Something went wrong during disconnect for client with uuid: ${a.uuid} / name: ${a.name} / endpointId: ${a.endpointId}.`)}finally{Dt.ChannelClient.handleProviderDisconnect(a)}})),d}async create(e,t){if(!e)throw new Error(\"Please provide a channelName to create a channel\");const{payload:{data:n}}=await this.wire.sendAction(\"create-channel\",{channelName:e}),i=Gt(this,Lt,\"f\").createProvider(t,n);return this.on(\"client-disconnected\",(t=>{t.channelName===e&&Vt.ChannelProvider.handleClientDisconnection(i,t)})),i}}le.Channel=Kt,Lt=new WeakMap,Tt=new WeakMap,$t=new WeakMap,Object.defineProperty(de,\"__esModule\",{value:!0}),de.InterAppPayload=de.InterApplicationBus=void 0;const qt=t,Jt=d,Yt=he,Zt=le,Qt=O;class Xt extends Jt.Base{constructor(e){super(e),this.events={subscriberAdded:\"subscriber-added\",subscriberRemoved:\"subscriber-removed\"},this.refCounter=new Yt.RefCounter,this.Channel=new Zt.Channel(e),this.emitter=new qt.EventEmitter,e.registerMessageHandler(this.onmessage.bind(this)),this.on=this.emitter.on.bind(this.emitter),this.removeAllListeners=this.emitter.removeAllListeners.bind(this.emitter)}async publish(e,t){await this.wire.sendAction(\"publish-message\",{topic:e,message:t,sourceWindowName:this.me.name})}async send(e,t,n){const i=(0,Qt.validateIdentity)(e);if(i)throw new Error(i);await this.wire.sendAction(\"send-message\",{destinationUuid:e.uuid,destinationWindowName:e.name,topic:t,message:n,sourceWindowName:this.me.name})}subscribe(e,t,n){const i=this.createSubscriptionKey(e.uuid,e.name||\"*\",t);return this.emitter.on(i,n),this.refCounter.actOnFirst(i,(async()=>{await this.wire.sendAction(\"subscribe\",{sourceUuid:e.uuid,sourceWindowName:e.name||\"*\",topic:t,destinationWindowName:this.me.name})}),(()=>Promise.resolve()))}unsubscribe(e,t,n){const i=e.name||\"*\",r=this.createSubscriptionKey(e.uuid,i,t);return this.emitter.removeListener(r,n),this.refCounter.actOnLast(r,(async()=>{await this.wire.sendAction(\"unsubscribe\",{sourceUuid:e.uuid,sourceWindowName:i,topic:t,destinationWindowName:this.me.name})}),(()=>new Promise((e=>e)).then((()=>{}))))}processMessage(e){const{payload:{message:t,sourceWindowName:n,sourceUuid:i,topic:r}}=e,o=[this.createSubscriptionKey(i,n,r),this.createSubscriptionKey(i,\"*\",r),this.createSubscriptionKey(\"*\",\"*\",r)],s={uuid:i,name:n};o.forEach((e=>{this.emitter.emit(e,t,s)}))}emitSubscriverEvent(e,t){const{payload:{targetName:n,uuid:i,topic:r}}=t,o={name:n,uuid:i,topic:r};this.emitter.emit(e,o)}createSubscriptionKey(e,t,n){const i=t||\"*\";if(!(e&&i&&n))throw new Error(\"Missing uuid, name, or topic string\");return function(...e){return e.map((e=>Buffer.from(`${e}`).toString(\"base64\"))).join(\"/\")}(e,i,n)}onmessage(e){const{action:t}=e;switch(t){case\"process-message\":this.processMessage(e);break;case this.events.subscriberAdded:this.emitSubscriverEvent(this.events.subscriberAdded,e);break;case this.events.subscriberRemoved:this.emitSubscriverEvent(this.events.subscriberRemoved,e)}return!0}}de.InterApplicationBus=Xt;de.InterAppPayload=class{};var en={};Object.defineProperty(en,\"__esModule\",{value:!0}),en.Clipboard=void 0;const tn=d;class nn extends tn.Base{async writeText(e){await this.wire.sendAction(\"clipboard-write-text\",e)}async readText(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-text\",{type:e});return t.data}async writeImage(e){await this.wire.sendAction(\"clipboard-write-image\",e)}async readImage(e={format:\"dataURL\"}){const{payload:t}=await this.wire.sendAction(\"clipboard-read-image\",e);return t.data}async writeHtml(e){await this.wire.sendAction(\"clipboard-write-html\",e)}async readHtml(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-html\",{type:e});return t.data}async writeRtf(e){await this.wire.sendAction(\"clipboard-write-rtf\",e)}async readRtf(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-rtf\",{type:e});return t.data}async write(e){await this.wire.sendAction(\"clipboard-write\",e)}async getAvailableFormats(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-formats\",{type:e});return t.data}}en.Clipboard=nn;var rn={},on={},sn={};Object.defineProperty(sn,\"__esModule\",{value:!0}),sn.ExternalApplication=void 0;const an=d;class cn extends an.EmitterBase{constructor(e,t){super(e,\"external-application\",t.uuid),this.identity=t}getInfo(){return this.wire.sendAction(\"get-external-application-info\",this.identity).then((({payload:e})=>e.data))}}sn.ExternalApplication=cn,Object.defineProperty(on,\"__esModule\",{value:!0}),on.ExternalApplicationModule=void 0;const dn=d,hn=sn;class ln extends dn.Base{wrap(e){return this.wire.sendAction(\"external-application-wrap\").catch((e=>{})),Promise.resolve(new hn.ExternalApplication(this.wire,{uuid:e}))}wrapSync(e){return this.wire.sendAction(\"external-application-wrap-sync\").catch((e=>{})),new hn.ExternalApplication(this.wire,{uuid:e})}}on.ExternalApplicationModule=ln,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(on,e),n(sn,e)}(rn);var un={},pn={},wn={};Object.defineProperty(wn,\"__esModule\",{value:!0}),wn._Frame=void 0;const yn=d;class fn extends yn.EmitterBase{constructor(e,t){super(e,\"frame\",t.uuid,t.name),this.identity=t}getInfo(){return this.wire.sendAction(\"get-frame-info\",this.identity).then((({payload:e})=>e.data))}getParentWindow(){return this.wire.sendAction(\"get-parent-window\",this.identity).then((({payload:e})=>e.data))}}wn._Frame=fn,Object.defineProperty(pn,\"__esModule\",{value:!0}),pn._FrameModule=void 0;const gn=d,mn=O,vn=wn;class Cn extends gn.Base{async wrap(e){this.wire.sendAction(\"frame-wrap\").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}wrapSync(e){this.wire.sendAction(\"frame-wrap-sync\").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}getCurrent(){return this.wire.sendAction(\"frame-get-current\").catch((e=>{})),Promise.resolve(new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity()))}getCurrentSync(){return this.wire.sendAction(\"frame-get-current-sync\").catch((e=>{})),new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity())}}pn._FrameModule=Cn,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(pn,e),n(wn,e)}(un);var bn={};Object.defineProperty(bn,\"__esModule\",{value:!0}),bn.GlobalHotkey=void 0;const In=d;class En extends In.EmitterBase{constructor(e){super(e,\"global-hotkey\")}async register(e,t){await this.on(e,t),await this.wire.sendAction(\"global-hotkey-register\",{hotkey:e})}async unregister(e){await this.removeAllListeners(e),await this.wire.sendAction(\"global-hotkey-unregister\",{hotkey:e})}async unregisterAll(){await Promise.all(this.eventNames().filter((e=>!(\"registered\"===e||\"unregistered\"===e))).map((e=>this.removeAllListeners(e)))),await this.wire.sendAction(\"global-hotkey-unregister-all\",{})}async isRegistered(e){const{payload:{data:t}}=await this.wire.sendAction(\"global-hotkey-is-registered\",{hotkey:e});return t}}bn.GlobalHotkey=En;var xn,An={},Pn={},Mn={},_n=s&&s.__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)};Object.defineProperty(Mn,\"__esModule\",{value:!0}),Mn.Platform=void 0;const On=d,Sn=O,Rn=new Map;class Fn extends On.EmitterBase{constructor(e,t){super(t.wire,\"application\",e.uuid),this.getClient=e=>{this.wire.sendAction(\"platform-get-client\",this.identity).catch((e=>{}));const t=e||this.identity,{uuid:n}=t;if(!Rn.has(n)){const e=_n(this,xn,\"f\").call(this,n);Rn.set(n,e)}return Rn.get(n)},xn.set(this,(async e=>{try{const t=`custom-frame-${e}`,n=await this._channel.connect(t,{wait:!1});return n.onDisconnection((()=>{Rn.delete(e)})),n}catch(t){throw Rn.delete(e),new Error(\"The targeted Platform is not currently running. Listen for application-started event for the given Uuid.\")}})),this.launchLegacyManifest=this.launchContentManifest;const n=(0,Sn.validateIdentity)(e);if(n)throw new Error(n);this._channel=t,this.identity={uuid:e.uuid},this.Layout=this.fin.Platform.Layout,this.Application=this.fin.Application.wrapSync(this.identity)}async createView(e,t,n){this.wire.sendAction(\"platform-create-view\",this.identity).catch((e=>{}));const i=await this.getClient(),r=await i.dispatch(\"create-view\",{target:t,opts:e,targetView:n});if(!r||(0,Sn.validateIdentity)(r.identity))throw new Error(`When overwriting the createView call, please return an object that has a valid 'identity' property: ${JSON.stringify(r)}`);return this.fin.View.wrapSync(r.identity)}async createWindow(e){this.wire.sendAction(\"platform-create-window\",this.identity).catch((e=>{}));const t=await this.getClient();e.reason||(e.reason=\"api-call\");const n=await t.dispatch(\"create-view-container\",e);if(!n||(0,Sn.validateIdentity)(n.identity))throw new Error(`When overwriting the createWindow call, please return an object that has a valid 'identity' property: ${JSON.stringify(n)}`);const{identity:i}=n,r=this.fin.Window.wrapSync(i);return r.name=i.name,r.uuid=i.uuid,r}async quit(){this.wire.sendAction(\"platform-quit\",this.identity).catch((e=>{}));return(await this.getClient()).dispatch(\"quit\")}async closeView(e){this.wire.sendAction(\"platform-close-view\",this.identity).catch((e=>{}));const t=await this.getClient();await t.dispatch(\"close-view\",{view:e})}async reparentView(e,t){console.warn(\"Platform.reparentView has been deprecated, please use Platform.createView\"),this.wire.sendAction(\"platform-reparent-view\",this.identity).catch((e=>{}));const n={...e,uuid:e.uuid??this.identity.uuid},i=await this.fin.View.wrap(n),r=await i.getOptions();return this.createView(r,t)}async getSnapshot(){this.wire.sendAction(\"platform-get-snapshot\",this.identity).catch((e=>{}));return(await this.getClient()).dispatch(\"get-snapshot\")}async getViewSnapshot(e){return(await this.getClient()).dispatch(\"get-view-snapshot\",{viewIdentity:e})}async applySnapshot(e,t){this.wire.sendAction(\"platform-apply-snapshot\",this.identity).catch((e=>{}));const n=\"Requested snapshot must be a valid Snapshot object, or a url or filepath to such an object.\";let i;if(\"string\"==typeof e)try{i=(await this._channel.wire.sendAction(\"get-application-manifest\",{manifestUrl:e})).payload.data}catch(e){throw new Error(`${n}: ${e}`)}else i=e;if(!i.windows)throw new Error(n);const r=await this.getClient();return await r.dispatch(\"apply-snapshot\",{snapshot:i,options:t}),this}async fetchManifest(e){return(await this.getClient()).dispatch(\"platform-fetch-manifest\",{manifestUrl:e})}async launchContentManifest(e){this.wire.sendAction(\"platform-launch-content-manifest\",this.identity).catch((()=>{}));const t=await this.getClient(),n=await this.fetchManifest(e);return t.dispatch(\"launch-into-platform\",{manifest:n,manifestUrl:e}),this}async setWindowContext(e={},t){if(this.wire.sendAction(\"platform-set-window-context\",this.identity).catch((e=>{})),!e)throw new Error(\"Please provide a serializable object or string to set the context.\");const n=await this.getClient(),{entityType:i}=t?await this.fin.System.getEntityInfo(t.uuid,t.name):this.fin.me;await n.dispatch(\"set-window-context\",{context:e,entityType:i,target:t||{uuid:this.fin.me.uuid,name:this.fin.me.name}})}async getWindowContext(e){this.wire.sendAction(\"platform-get-window-context\",this.identity).catch((e=>{}));const t=await this.getClient(),{entityType:n}=e?await this.fin.System.getEntityInfo(e.uuid,e.name):this.fin.me;return t.dispatch(\"get-window-context\",{target:e||{uuid:this.fin.me.uuid,name:this.fin.me.name},entityType:n})}async closeWindow(e,t={skipBeforeUnload:!1}){this.wire.sendAction(\"platform-close-window\",this.identity).catch((e=>{}));return(await this.getClient()).dispatch(\"close-window\",{windowId:e,options:t})}}Mn.Platform=Fn,xn=new WeakMap;var jn={},kn={},Ln={},Tn={};function $n(e){switch(e){case\"columns\":case\"grid\":case\"rows\":case\"tabs\":return!0;default:return!1}}Object.defineProperty(Tn,\"__esModule\",{value:!0}),Tn.overrideFromComposables=Tn.isValidPresetType=void 0,Tn.isValidPresetType=$n,Tn.overrideFromComposables=function(...e){return t=>e.reduceRight(((e,t)=>n=>t(e(n))),(e=>e))(t)},Tn.default={isValidPresetType:$n};var Bn={},Gn={},Wn={};Object.defineProperty(Wn,\"__esModule\",{value:!0}),Wn.ApiConsumer=void 0;Wn.ApiConsumer=class{constructor(e){this.strategy=e,this.consume=async e=>(await this.strategy.getExposedFunctions(e)).reduce(((t,n)=>({...t,[n.key]:this.strategy.createFunction(n,e)})),{})}};var Hn={},Nn={};Object.defineProperty(Nn,\"__esModule\",{value:!0}),Nn.expose=Nn.getExposedProperties=void 0;const Dn=Symbol(\"exposedProperties\");Nn.getExposedProperties=e=>e[Dn]||e.prototype[Dn]||[];Nn.expose=e=>(t,n,i)=>{t[Dn]=t[Dn]||[],t[Dn].push({key:n,descriptor:i,options:e})},Object.defineProperty(Hn,\"__esModule\",{value:!0}),Hn.ApiExposer=void 0;const Un=Nn;Hn.ApiExposer=class{constructor(e){this.strategy=e,this.exposeInstance=async(e,t)=>{const n=(0,Un.getExposedProperties)(e),i=await Promise.all(n.map((async({key:n,options:i})=>({key:n,options:await this.strategy.exposeFunction(e[n].bind(e),{key:n,options:i,meta:t})}))));await this.strategy.exposeMeta(t,i)}}};var Vn={},zn={},Kn={};Object.defineProperty(Kn,\"__esModule\",{value:!0}),Kn.ChannelsConsumer=void 0;Kn.ChannelsConsumer=class{constructor(e){this.channel=e,this.getExposedFunctions=async e=>{const{id:t}=e,{props:n}=await this.channel.dispatch(`api-meta:${t}`);return n},this.createFunction=e=>(...t)=>{const{action:n}=e.options;return this.channel.dispatch(n,{args:t})}}};var qn={};Object.defineProperty(qn,\"__esModule\",{value:!0}),qn.ChannelsExposer=void 0;qn.ChannelsExposer=class{constructor(e){this.channelProviderOrClient=e,this.exposeFunction=async(e,t)=>{const{key:n,options:i,meta:r}=t,{id:o}=r,s=`${o}.${i?.action||n}`;return await this.channelProviderOrClient.register(s,(async({args:t})=>e(...t))),{action:s}},this.exposeMeta=async({id:e},t)=>{const n=`api-meta:${e}`;await this.channelProviderOrClient.register(n,(()=>({props:t})))}}},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Kn,e),n(qn,e)}(zn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(zn,e)}(Vn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Wn,e),n(Hn,e),n(Vn,e),n(Nn,e)}(Gn);var Jn={};Object.defineProperty(Jn,\"__esModule\",{value:!0}),Jn.createRelayedDispatch=exports.relayChannelClientApi_1=Jn.relayChannelClientApi=void 0;const Yn=[\"no longer connected\",\"RTCDataChannel closed unexpectedly\",\"The client you are trying to dispatch from is disconnected from the target provider\"];exports.relayChannelClientApi_1=Jn.relayChannelClientApi=async(e,t)=>{e.register(`relay:${t}`,(({action:t,target:n,payload:i})=>e.dispatch(n,t,i))),await Promise.resolve()};Jn.createRelayedDispatch=(e,t,n,i)=>async(r,o)=>{try{return await e.dispatch(`relay:${n}`,{action:r,payload:o,target:t})}catch(e){if(s=e.message,Yn.some((e=>s.includes(e)))&&i)throw new Error(i);throw e}var s};var Zn,Qn,Xn,ei=s&&s.__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},ti=s&&s.__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)};Object.defineProperty(Bn,\"__esModule\",{value:!0}),Bn.ColumnOrRow=Bn.TabStack=Bn.LayoutNode=void 0;const ni=Gn,ii=Jn;class ri{constructor(e,t){Zn.set(this,void 0),this.isRoot=()=>ti(this,Zn,\"f\").isRoot(this.entityId),this.exists=()=>ti(this,Zn,\"f\").exists(this.entityId),this.getParent=async()=>{const e=await ti(this,Zn,\"f\").getParent(this.entityId);if(e)return ri.getEntity(e,ti(this,Zn,\"f\"))},this.createAdjacentStack=async(e,t)=>{const n=await ti(this,Zn,\"f\").createAdjacentStack(this.entityId,e,t);return ri.getEntity({entityId:n,type:\"stack\"},ti(this,Zn,\"f\"))},this.getAdjacentStacks=async e=>(await ti(this,Zn,\"f\").getAdjacentStacks({targetId:this.entityId,edge:e})).map((e=>ri.getEntity({type:\"stack\",entityId:e.entityId},ti(this,Zn,\"f\")))),ei(this,Zn,e,\"f\"),this.entityId=t}}Bn.LayoutNode=ri,Zn=new WeakMap,ri.newLayoutEntitiesClient=async(e,t,n)=>{const i=(0,ii.createRelayedDispatch)(e,n,\"layout-relay\",\"You are trying to interact with a layout component on a window that does not exist or has been destroyed.\");return new ni.ApiConsumer(new ni.ChannelsConsumer({dispatch:i})).consume({id:t})},ri.getEntity=(e,t)=>{const{entityId:n,type:i}=e;switch(i){case\"column\":case\"row\":return new si(t,n,i);case\"stack\":return new oi(t,n);default:throw new Error(`Unrecognised Layout Entity encountered ('${JSON.stringify(e)})`)}};class oi extends ri{constructor(e,t){super(e,t),Qn.set(this,void 0),this.type=\"stack\",this.getViews=()=>ti(this,Qn,\"f\").getStackViews(this.entityId),this.addView=async(e,t={index:0})=>ti(this,Qn,\"f\").addViewToStack(this.entityId,e,t),this.removeView=async e=>{await ti(this,Qn,\"f\").removeViewFromStack(this.entityId,e)},this.setActiveView=async e=>{await ti(this,Qn,\"f\").setStackActiveView(this.entityId,e)},ei(this,Qn,e,\"f\")}}Bn.TabStack=oi,Qn=new WeakMap;class si extends ri{constructor(e,t,n){super(e,t),Xn.set(this,void 0),this.getContent=async()=>(await ti(this,Xn,\"f\").getContent(this.entityId)).map((e=>ri.getEntity(e,ti(this,Xn,\"f\")))),ei(this,Xn,e,\"f\"),this.type=n}}Bn.ColumnOrRow=si,Xn=new WeakMap;var ai={};Object.defineProperty(ai,\"__esModule\",{value:!0}),ai.DEFAULT_LAYOUT_KEY=ai.LAYOUT_CONTROLLER_ID=void 0,ai.LAYOUT_CONTROLLER_ID=\"layout-entities\",ai.DEFAULT_LAYOUT_KEY=\"__default__\";var ci,di,hi,li=s&&s.__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)};Object.defineProperty(Ln,\"__esModule\",{value:!0}),Ln.Layout=void 0;const ui=G,pi=O,wi=d,yi=Tn,fi=Bn,gi=ai;class mi extends wi.Base{static getClient(e){return li(e,di,\"f\").getValue()}constructor(e,t){super(t),ci.add(this),di.set(this,new ui.Lazy((async()=>fi.LayoutNode.newLayoutEntitiesClient(await this.platform.getClient(),gi.LAYOUT_CONTROLLER_ID,this.identity)))),this.replace=async e=>{this.wire.sendAction(\"layout-replace\").catch((e=>{}));const t=await this.platform.getClient();await t.dispatch(\"replace-layout\",{target:this.identity,opts:{layout:e}})},this.replaceView=async(e,t)=>{this.wire.sendAction(\"layout-replace-view\").catch((e=>{}));const n=await this.platform.getClient();await n.dispatch(\"replace-view\",{target:this.identity,opts:{viewToReplace:e,newView:t}})},this.applyPreset=async e=>{this.wire.sendAction(\"layout-apply-preset\").catch((e=>{}));const t=await this.platform.getClient(),{presetType:n}=e;if(!n||!(0,yi.isValidPresetType)(n))throw new Error(\"Cannot apply preset layout, please include an applicable presetType property in the PresetLayoutOptions.\");await t.dispatch(\"apply-preset-layout\",{target:this.identity,opts:{presetType:n}})};const n=(0,pi.validateIdentity)(e);if(n)throw new Error(n);this.identity=e,this.platform=this.fin.Platform.wrapSync({uuid:e.uuid}),e.uuid===this.fin.me.uuid&&e.name===this.fin.me.name&&(this.init=this.fin.Platform.Layout.init)}async getConfig(){this.wire.sendAction(\"layout-get-config\").catch((e=>{}));return(await this.platform.getClient()).dispatch(\"get-frame-snapshot\",{target:this.identity})}async getCurrentViews(){this.wire.sendAction(\"layout-get-views\").catch((e=>{}));const e=await this.platform.getClient();return(await e.dispatch(\"get-layout-views\",{target:this.identity})).map((e=>this.fin.View.wrapSync(e)))}async getRootItem(){this.wire.sendAction(\"layout-get-root-item\").catch((()=>{}));const e=await li(this,di,\"f\").getValue(),t=await e.getRoot(\"layoutName\"in this.identity?this.identity:void 0);return fi.LayoutNode.getEntity(t,e)}async getStackByViewIdentity(e){this.wire.sendAction(\"layout-get-stack-by-view\").catch((()=>{}));const t=await li(this,di,\"f\").getValue(),n=await t.getStackByView(e);if(!n)throw new Error(`No stack found for view: ${e.uuid}/${e.name}`);return fi.LayoutNode.getEntity(n,t)}async addView(e,{location:t,targetView:n}={}){this.wire.sendAction(\"layout-add-view\").catch((e=>{}));const{identity:i}=await li(this,ci,\"m\",hi).call(this,\"layout-add-view\",{viewOptions:e,location:t,targetView:n});return{identity:i}}async closeView(e){this.wire.sendAction(\"layout-close-view\").catch((e=>{})),await li(this,ci,\"m\",hi).call(this,\"layout-close-view\",{viewIdentity:e})}}Ln.Layout=mi,di=new WeakMap,ci=new WeakSet,hi=async function(e,t){return(await this.platform.getClient()).dispatch(e,{target:this.identity,opts:t})};var vi,Ci,bi,Ii,Ei,xi=s&&s.__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)},Ai=s&&s.__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};Object.defineProperty(kn,\"__esModule\",{value:!0}),kn.LayoutModule=void 0;const Pi=d,Mi=Ln,_i=ai;class Oi extends Pi.Base{constructor(){super(...arguments),vi.add(this),Ci.set(this,!1),bi.set(this,null),this.init=async(e={})=>{if(this.wire.sendAction(\"layout-init\").catch((e=>{})),!this.wire.environment.layoutAllowedInContext(this.fin))throw new Error(\"Layout.init can only be called from a Window context.\");if(xi(this,Ci,\"f\"))throw new Error(\"Layout.init was already called, please use Layout.create to add additional layouts.\");\"openfin\"===this.wire.environment.type&&await this.fin.Platform.getCurrentSync().getClient(),Ai(this,Ci,!0,\"f\"),Ai(this,bi,await this.wire.environment.initLayoutManager(this.fin,this.wire,e),\"f\"),await this.wire.environment.applyLayoutSnapshot(this.fin,xi(this,bi,\"f\"),e);const t={name:this.fin.me.name,uuid:this.fin.me.uuid};if(!e.layoutManagerOverride){const e={layoutName:_i.DEFAULT_LAYOUT_KEY,...t};return xi(this,Ii,\"f\").call(this,e)}return this.wrapSync(t)},Ii.set(this,(e=>{const t=\"[Layout] You are using a deprecated property `layoutManager` - it will throw if you access it starting in v37.\",n=new Proxy({},{get(e,n){throw console.warn(`[Layout-mgr-proxy] accessing ${n.toString()}`),new Error(t)}}),i=Object.assign(this.wrapSync(e),{layoutManager:n});return new Proxy(i,{get(e,n){if(\"layoutManager\"===n)throw console.warn(`[Layout-proxy] accessing ${n.toString()}`),new Error(t);return e[n]}})})),this.getCurrentLayoutManagerSync=()=>xi(this,vi,\"m\",Ei).call(this,\"fin.Platform.Layout.getCurrentLayoutManagerSync()\"),this.create=async e=>this.wire.environment.createLayout(xi(this,vi,\"m\",Ei).call(this,\"fin.Platform.Layout.create()\"),e),this.destroy=async e=>this.wire.environment.destroyLayout(xi(this,vi,\"m\",Ei).call(this,\"fin.Platform.Layout.destroy()\"),e)}async wrap(e){return this.wire.sendAction(\"layout-wrap\").catch((e=>{})),new Mi.Layout(e,this.wire)}wrapSync(e){return this.wire.sendAction(\"layout-wrap-sync\").catch((e=>{})),new Mi.Layout(e,this.wire)}async getCurrent(){if(this.wire.sendAction(\"layout-get-current\").catch((e=>{})),\"openfin\"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error(\"You are not in a Window context. Only Windows can have a Layout.\");const{uuid:e,name:t}=this.fin.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction(\"layout-get-current-sync\").catch((e=>{})),\"openfin\"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error(\"You are not in a Window context. Only Windows can have a Layout.\");const{uuid:e,name:t}=this.fin.me;return this.wrapSync({uuid:e,name:t})}async getLayoutByViewIdentity(e){this.wire.sendAction(\"layout-get-by-view-identity\").catch((()=>{}));let t=await this.wire.environment.getViewWindowIdentity(this.fin,e);t.identity&&(t=t.identity);try{const n=this.wrapSync(t),i=await Mi.Layout.getClient(n),r=await i.getLayoutIdentityForViewOrThrow(e);return this.wrapSync(r)}catch(n){if(![\"No action registered at target for\",\"getLayoutIdentityForViewOrThrow is not a function\"].some((e=>n.message.includes(e))))throw n;if(t.uuid===t.name)throw new Error(`View identity ${JSON.stringify(e)} is not attached to any layout in provider window ${JSON.stringify(t)}.`);return this.wrapSync(t)}}}kn.LayoutModule=Oi,Ci=new WeakMap,bi=new WeakMap,Ii=new WeakMap,vi=new WeakSet,Ei=function(e){if(!xi(this,bi,\"f\"))throw new Error(`You must call init before using the API ${e}`);return xi(this,bi,\"f\")},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(kn,e),n(Ln,e)}(jn),Object.defineProperty(Pn,\"__esModule\",{value:!0}),Pn.PlatformModule=void 0;const Si=d,Ri=Mn,Fi=jn;class ji extends Si.Base{constructor(e,t){super(e),this._channel=t,this.Layout=new Fi.LayoutModule(this.wire)}async init(e){if(!fin.__internal_.isPlatform||fin.me.name!==fin.me.uuid)throw new Error(\"fin.Platform.init should only be called from a custom platform provider running in the main window of the application.\");return this.wire.environment.initPlatform(this.fin,e)}async wrap(e){return this.wire.sendAction(\"platform-wrap\").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}wrapSync(e){return this.wire.sendAction(\"platform-wrap-sync\").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}async getCurrent(){return this.wire.sendAction(\"platform-get-current\").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction(\"platform-get-current-sync\").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}start(e){return this.wire.sendAction(\"platform-start\").catch((e=>{})),new Promise((async(t,n)=>{try{const{uuid:n}=e,i=await this.fin.Application._create({...e,isPlatformController:!0});i.once(\"platform-api-ready\",(()=>t(this.wrapSync({uuid:n})))),i._run({uuid:n})}catch(e){n(e)}}))}startFromManifest(e,t){return this.wire.sendAction(\"platform-start-from-manifest\").catch((e=>{})),new Promise((async(n,i)=>{try{const i=await this.fin.Application._createFromManifest(e);i.once(\"platform-api-ready\",(()=>n(this.wrapSync({uuid:i.identity.uuid})))),i._run(t)}catch(e){i(e)}}))}}Pn.PlatformModule=ji,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Pn,e),n(Mn,e)}(An);var ki={};!function(e){Object.defineProperty(e,\"__esModule\",{value:!0}),e.getMe=e.getBaseMe=e.environmentUnsupportedMessage=void 0;const t=J(),n=un,i=ie(),r=rn;function o(e,t,n){return{...{isView:\"view\"===e,isWindow:\"window\"===e,isFrame:\"iframe\"===e,isExternal:\"external connection\"===e},uuid:t,name:n,entityType:e}}e.environmentUnsupportedMessage=\"You are not running in OpenFin.\",e.getBaseMe=o,e.getMe=function(s){const{uuid:a,name:c,entityType:d}=s.me,h={setContext(){throw new Error(e.environmentUnsupportedMessage)},addContextHandler(){throw new Error(e.environmentUnsupportedMessage)},getContextGroups(){throw new Error(e.environmentUnsupportedMessage)},joinContextGroup(){throw new Error(e.environmentUnsupportedMessage)},removeFromContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getAllClientsInContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getInfoForContextGroup(){throw new Error(e.environmentUnsupportedMessage)}},l=\"Interop API has not been instantiated. Either connection has failed or you have not declared interop in your config.\",u={setContext(){throw new Error(l)},addContextHandler(){throw new Error(l)},getContextGroups(){throw new Error(l)},joinContextGroup(){throw new Error(l)},removeFromContextGroup(){throw new Error(l)},getAllClientsInContextGroup(){throw new Error(l)},getInfoForContextGroup(){throw new Error(l)}},p={eventNames:()=>{throw new Error(e.environmentUnsupportedMessage)},emit:()=>{throw new Error(e.environmentUnsupportedMessage)},listeners:()=>{throw new Error(e.environmentUnsupportedMessage)},listenerCount:()=>{throw new Error(e.environmentUnsupportedMessage)},on:()=>{throw new Error(e.environmentUnsupportedMessage)},addListener:()=>{throw new Error(e.environmentUnsupportedMessage)},once:()=>{throw new Error(e.environmentUnsupportedMessage)},prependListener:()=>{throw new Error(e.environmentUnsupportedMessage)},prependOnceListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeAllListeners:()=>{throw new Error(e.environmentUnsupportedMessage)}};switch(d){case\"view\":return Object.assign(new t.View(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case\"window\":return Object.assign(new i._Window(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case\"iframe\":return Object.assign(new n._Frame(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case\"external connection\":return Object.assign(new r.ExternalApplication(s,{uuid:a}),o(d,a,c),{interop:u,isOpenFin:!1});default:return{...o(d,a,c),...p,interop:h,isOpenFin:!1}}}}(ki);var Li={},Ti={},$i={};Object.defineProperty($i,\"__esModule\",{value:!0}),$i.createWarningObject=$i.createUnusableObject=void 0,$i.createUnusableObject=function(e){const t=()=>{throw new Error(e)};return new Proxy({},{apply:t,construct:t,defineProperty:t,deleteProperty:t,get:t,getOwnPropertyDescriptor:t,getPrototypeOf:t,has:t,isExtensible:t,ownKeys:t,preventExtensions:t,set:t,setPrototypeOf:t})},$i.createWarningObject=function(e,t){return new Proxy(t,{get:(...t)=>(console.warn(e),Reflect.get(...t)),set:(...t)=>(console.warn(e),Reflect.set(...t)),getOwnPropertyDescriptor:(...t)=>(console.warn(e),Reflect.getOwnPropertyDescriptor(...t)),ownKeys:(...t)=>(console.warn(e),Reflect.ownKeys(...t))})};var Bi,Gi={},Wi={};var Hi={};!function(e){Object.defineProperty(e,\"__esModule\",{value:!0}),e.wrapIntentHandler=e.BROKER_ERRORS=e.generateOverrideWarning=e.generateOverrideError=e.wrapContextHandler=e.wrapInTryCatch=e.generateId=void 0;e.generateId=()=>`${Math.random()}${Date.now()}`;e.wrapInTryCatch=(e,t)=>(...n)=>{try{return e(...n)}catch(e){throw new Error((t||\"\")+e)}};e.wrapContextHandler=(e,t)=>async n=>{try{await e(n)}catch(e){throw console.error(`Error thrown by handler ${t} for context type ${n.type}: ${e}`),e}};e.generateOverrideError=(e,t)=>`You have tried to to use ${e} but ${t} has not been overridden in the Interop Broker. Please override this function. Refer to our documentation for more info.`;e.generateOverrideWarning=(e,t,n,i)=>{const{uuid:r,name:o}=n;return i?`Entity with identity: ${r}/${o} has called ${i} or ${e} but ${t} has not been overridden.`:`Entity with identity: ${r}/${o} has called ${e} but ${t} has not been overridden.`},e.BROKER_ERRORS={fireIntent:(0,e.generateOverrideError)(\"fireIntent\",\"handleFiredIntent\"),fireIntentForContext:(0,e.generateOverrideError)(\"fireIntentForContext\",\"handleFiredIntentForContext\"),getInfoForIntent:(0,e.generateOverrideError)(\"getInfoForIntent\",\"handleInfoForIntent\"),getInfoForIntentsByContext:(0,e.generateOverrideError)(\"getInfoForIntentsByContext\",\"handleInfoForIntentsByContext\"),joinSessionContextGroupWithJoinContextGroup:\"The Context Group you have tried to join is a Session Context Group. Custom Context Groups can only be defined by the Interop Broker through code or manifest configuration. Please use joinSessionContextGroup.\",fdc3Open:(0,e.generateOverrideError)(\"fdc3.open\",\"fdc3HandleOpen\"),fdc3FindInstances:(0,e.generateOverrideError)(\"fdc3.findInstances\",\"fdc3HandleFindInstances\"),fdc3GetAppMetadata:(0,e.generateOverrideError)(\"fdc3.getAppMetadata\",\"fdc3HandleGetAppMetadata\"),fdc3GetInfo:(0,e.generateOverrideError)(\"fdc3.getInfo\",\"fdc3HandleGetInfo\")};e.wrapIntentHandler=(e,t)=>async n=>{try{return e(n)}catch(e){throw console.error(`Error thrown by handler ${t}: ${e}`),e}}}(Hi);var Ni,Di,Ui={};function Vi(){if(Di)return Gi;Di=1;var e,t,n,r=s&&s.__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},o=s&&s.__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)},a=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Gi,\"__esModule\",{value:!0}),Gi.InteropBroker=void 0;const c=d,h=a(function(){if(Bi)return Wi;Bi=1,Object.defineProperty(Wi,\"__esModule\",{value:!0});const e=Cr();return Wi.default=class{constructor(e,t){this.provider=e,this.id=t,this.lastContext=void 0,this.contextGroupMap=new Map,this.clients=new Map,this.registerListeners()}registerListeners(){this.provider.register(`sessionContextGroup:getContext-${this.id}`,this.getCurrentContext.bind(this)),this.provider.register(`sessionContextGroup:setContext-${this.id}`,this.setContext.bind(this)),this.provider.register(`sessionContextGroup:handlerAdded-${this.id}`,this.handlerAdded.bind(this)),this.provider.register(`sessionContextGroup:handlerRemoved-${this.id}`,this.handlerRemoved.bind(this))}getCurrentContext(e){return e.type?this.contextGroupMap.get(e.type):this.lastContext}setContext(t,n){const{context:i}=t,r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name} not in Session Client State Map`);this.contextGroupMap.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{e.contextHandlers.get(i.type)?.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getClientState(e){return this.clients.get(e.endpointId)}async handlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(i){const e=r.contextHandlers.get(i)||[];r.contextHandlers.set(i,[...e,n]);const o=this.contextGroupMap.get(i);o&&await this.provider.dispatch(t,n,o)}else{r.globalHandler=n;const e=[...this.contextGroupMap.keys()].map((async e=>{const i=this.contextGroupMap.get(e);i&&await this.provider.dispatch(t,n,i)}));await Promise.all(e)}}handlerRemoved(e,t){const{handlerId:n}=e,i=this.clients.get(t.endpointId);i?(Array.from(i.contextHandlers).forEach((([,e])=>{const t=e.indexOf(n);t>-1&&e.splice(t,1)})),i.globalHandler===n&&(i.globalHandler=void 0)):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={contextHandlers:new Map,clientIdentity:e,globalHandler:void 0};this.clients.set(e.endpointId,t)}}onDisconnection(e){this.clients.delete(e.endpointId)}},Wi}()),l=Hi,u=a(i),p=function(){if(Ni)return Ui;Ni=1,Object.defineProperty(Ui,\"__esModule\",{value:!0}),Ui.PrivateChannelProvider=void 0;const e=Vi();return Ui.PrivateChannelProvider=class t{constructor(e,t){this.provider=e,this.id=t,this.clients=new Map,this.registerListeners(),this.contextByContextType=new Map,this.lastContext=void 0,this.provider.onConnection((e=>this.registerNewClient(e))),this.provider.onDisconnection((async e=>{const{endpointId:t}=e;this.clients.has(t)&&await this.handleClientDisconnecting(e),0===(await this.provider.getAllClientInfo()).length&&this.provider.destroy()}))}getClientState(e){return this.clients.get(e.endpointId)}registerListeners(){this.provider.register(\"broadcast\",this.broadcast.bind(this)),this.provider.register(\"getCurrentContext\",this.getCurrentContext.bind(this)),this.provider.register(\"contextHandlerAdded\",this.contextHandlerAdded.bind(this)),this.provider.register(\"contextHandlerRemoved\",this.contextHandlerRemoved.bind(this)),this.provider.register(\"nonStandardHandlerRemoved\",this.nonStandardHandlerRemoved.bind(this)),this.provider.register(\"onAddContextHandlerAdded\",this.onAddContextHandlerAdded.bind(this)),this.provider.register(\"onDisconnectHandlerAdded\",this.onDisconnectHandlerAdded.bind(this)),this.provider.register(\"onUnsubscribeHandlerAdded\",this.onUnsubscribeHandlerAdded.bind(this)),this.provider.register(\"clientDisconnecting\",((e,t)=>{this.handleClientDisconnecting(t)}))}broadcast(t,n){const{context:i}=t;if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name}, tried to call broadcast, is not connected to this Private Channel`);const r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to broadcast - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);this.contextByContextType.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{const t=e.handlerIdsByContextTypes.get(i.type);t&&t.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getCurrentContext(e,t){const{contextType:n}=e;if(!this.getClientState(t))throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call getCurrentContext, is not connected to this Private Channel`);if(void 0!==n){return this.contextByContextType.get(n)||null}return this.lastContext?this.lastContext:null}contextHandlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call addContextListener, is not connected to this Private Channel`);if(i){const e=r.handlerIdsByContextTypes.get(i)||[];r.handlerIdsByContextTypes.set(i,[...e,n])}else r.globalHandler=n;Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&e.onAddContextListenerHandlerId&&this.provider.dispatch(e.clientIdentity,e.onAddContextListenerHandlerId,i)}))}async contextHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);if(i){let e;if(i.globalHandler===n)i.globalHandler=void 0;else for(const[t,r]of i.handlerIdsByContextTypes){const i=r.indexOf(n);i>-1&&(r.splice(i,1),e=t)}const r=(await this.getConnectedClients()).map((async n=>{const{clientIdentity:i,clientIdentity:{endpointId:r},onUnsubscribeHandlerId:o}=n;r!==t.endpointId&&o&&await this.provider.dispatch(i,o,e)}));try{await Promise.all(r)}catch(e){throw console.error(`Problem when attempting to dispatch to onUnsubscribeHandlers. Error: ${e} Removing Client: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}`),new Error(e)}}else console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}.`)}nonStandardHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);i?i.onDisconnectHandlerId===n?i.onDisconnectHandlerId=void 0:i.onAddContextListenerHandlerId===n?i.onAddContextListenerHandlerId=void 0:i.onUnsubscribeHandlerId===n&&(i.onUnsubscribeHandlerId=void 0):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}onAddContextHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onAddContextListener, is not connected to this Private Channel`);n.onAddContextListenerHandlerId=i,Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&Array.from(e.handlerIdsByContextTypes.keys()).forEach((e=>{this.provider.dispatch(t,i,e)}))}))}onDisconnectHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onDisconnect, is not connected to this Private Channel`);n.onDisconnectHandlerId=i}onUnsubscribeHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onUnsubscribe, is not connected to this Private Channel`);n.onUnsubscribeHandlerId=i}removeClient(e){const t=this.getClientState(e);if(!t)throw new Error(`Client with Identity: ${e.uuid} ${e.name}, tried to call disconnect, is not connected to this Private Channel`);t.handlerIdsByContextTypes.clear(),this.clients.delete(e.endpointId)}async fireOnDisconnectForOtherClients(e){const{endpointId:t}=e,n=(await this.getConnectedClients()).map((async e=>{const{clientIdentity:{endpointId:n},onDisconnectHandlerId:i}=e;n!==t&&i&&await this.provider.dispatch(e.clientIdentity,i)}));try{await Promise.all(n)}catch(t){throw console.error(`Problem when attempting to dispatch to onDisconnectHandlers. Error: ${t} Disconnecting Client: uuid: ${e.uuid}. name: ${e.name}. endpointId: ${e.endpointId}`),new Error(t)}}async unsubscribeAll(e){const{endpointId:t}=e,n=this.clients.get(t);if(n){const t=Array.from(n.handlerIdsByContextTypes.values()).flat(),i=n.globalHandler;if(t.length>0){const n=t.map((async t=>this.contextHandlerRemoved({handlerId:t},e)));try{await Promise.all(n)}catch(e){console.error(e.message)}}if(i)try{await this.contextHandlerRemoved({handlerId:i},e)}catch(e){console.error(e.message)}}}async handleClientDisconnecting(e){await this.unsubscribeAll(e),this.removeClient(e),await this.fireOnDisconnectForOtherClients(e)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={clientIdentity:e,handlerIdsByContextTypes:new Map,globalHandler:void 0,onAddContextListenerHandlerId:void 0,onUnsubscribeHandlerId:void 0,onDisconnectHandlerId:void 0};this.clients.set(e.endpointId,t)}}async getConnectedClients(){const e=await this.provider.getAllClientInfo();return Array.from(this.clients.values()).filter((t=>{const{uuid:n,name:i}=t.clientIdentity;return e.some((e=>i===e.name&&n===e.uuid))}))}static init(e,n){return new t(e,n)}},Ui}(),w=G,y=[{id:\"green\",displayMetadata:{color:\"#00CC88\",name:\"green\"}},{id:\"purple\",displayMetadata:{color:\"#8C61FF\",name:\"purple\"}},{id:\"orange\",displayMetadata:{color:\"#FF8C4C\",name:\"orange\"}},{id:\"red\",displayMetadata:{color:\"#FF5E60\",name:\"red\"}},{id:\"pink\",displayMetadata:{color:\"#FF8FB8\",name:\"pink\"}},{id:\"yellow\",displayMetadata:{color:\"#E9FF8F\",name:\"yellow\"}}];let f=class i extends c.Base{constructor(i,s,a){super(i),e.set(this,void 0),t.set(this,void 0),n.set(this,void 0),this.getProvider=()=>o(this,n,\"f\").getValue(),this.interopClients=new Map,this.contextGroupsById=new Map,r(this,t,a.contextGroups??[...y],\"f\"),r(this,e,a.fdc3Info,\"f\"),a?.logging&&(this.logging=a.logging),this.intentClientMap=new Map,this.lastContextMap=new Map,this.sessionContextGroupMap=new Map,r(this,n,new w.Lazy(s),\"f\"),this.setContextGroupMap(),this.setupChannelProvider()}static createClosedConstructor(...e){return class extends i{constructor(...t){if(t.length){const[n,i,r]=t;if(r&&\"object\"==typeof r&&!(0,u.default)(r,e[2]))return console.warn(\"You have modified the parameters of the InteropOverride constructor. This behavior is deprecated and will be removed in a future version. You can modify these options in your manifest. Please consult our Interop docs for guidance on migrating to the new override scheme.\"),void super(e[0],e[1],r);console.warn(\"You are attempting to pass arguments to the InteropOverride constructor. This is not necessary, and these passed arguments will be ignored. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.\")}super(...e)}}}setContext({context:e},t){this.wire.sendAction(\"interop-broker-set-context\").catch((e=>{}));const n=this.getClientState(t);if(!n||!n.contextGroupId)throw n?new Error(\"You must join a context group before you can set context.\"):new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);{const{contextGroupId:t}=n;this.setContextForGroup({context:e},t)}}setContextForGroup({context:e},t){this.wire.sendAction(\"interop-broker-set-context-for-group\").catch((e=>{}));const n=this.contextGroupsById.get(t);if(!n)throw new Error(`Unable to set context for context group that isn't in the context group mapping: ${t}.`);const r=i.checkContextIntegrity(e);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(e)}`);const o=e.type;n.set(o,e),this.lastContextMap.set(t,o);Array.from(this.interopClients.values()).filter((e=>e.contextGroupId===t)).forEach((t=>{for(const[,n]of t.contextHandlers)i.isContextTypeCompatible(o,n.contextType)&&this.invokeContextHandler(t.clientIdentity,n.handlerId,e)}))}getCurrentContext(e,t){this.wire.sendAction(\"interop-broker-get-current-context\").catch((e=>{}));const n=this.getClientState(t);if(!n?.contextGroupId)throw new Error(\"You must be a member of a context group to call getCurrentContext\");const{contextGroupId:i}=n,r=this.contextGroupsById.get(i),o=this.lastContextMap.get(i),s=e?.contextType??o;return r&&s?r.get(s):void 0}async joinContextGroup({contextGroupId:e,target:t},n){if(this.wire.sendAction(\"interop-broker-join-context-group\").catch((e=>{})),this.sessionContextGroupMap.has(e))throw new Error(l.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup);if(t){i.hasEndpointId(t)&&await this.addClientToContextGroup({contextGroupId:e},t);try{const n=this.channel.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name));if(!n.length)throw new Error(`Given Identity ${t.uuid} ${t.name} is not connected to the Interop Broker.`);n.length>1&&console.warn(`More than one connection found for identity ${t.uuid} ${t.name}`);const i=[];for(const t of n)i.push(this.addClientToContextGroup({contextGroupId:e},t));await Promise.all(i)}catch(e){throw new Error(e)}}else await this.addClientToContextGroup({contextGroupId:e},n)}async addClientToContextGroup({contextGroupId:e},t){this.wire.sendAction(\"interop-broker-add-client-to-context-group\").catch((e=>{}));const n=this.getClientState(t);if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(!this.getContextGroups().find((t=>t.id===e)))throw new Error(`Attempting to join a context group that does not exist: ${e}. You may only join existing context groups.`);if(n.contextGroupId!==e){n.contextGroupId=e,await this.setCurrentContextGroupInClientOptions(t,e);const i=this.contextGroupsById.get(e);for(const[,e]of n.contextHandlers){const{contextType:n,handlerId:r}=e;if(void 0===n)i.forEach(((e,n)=>{this.invokeContextHandler(t,r,e)}));else if(i.has(n)){const e=i.get(n);e&&this.invokeContextHandler(t,r,e)}}}}async removeFromContextGroup({target:e},t){if(this.wire.sendAction(\"interop-broker-remove-from-context-group\").catch((e=>{})),e){i.hasEndpointId(e)&&await this.removeClientFromContextGroup(e);try{const t=this.channel.connections.filter((t=>t.uuid===e.uuid&&t.name===e.name));if(!t.length)throw new Error(`No connection found for given Identity ${e.uuid} ${e.name}`);t.length>1&&console.warn(`More than one connection found for identity ${e.uuid} ${e.name}`);const n=[];for(const e of t)n.push(this.removeClientFromContextGroup(e));await Promise.all(n)}catch(e){throw new Error(e)}}else await this.removeClientFromContextGroup(t)}async removeClientFromContextGroup(e){this.wire.sendAction(\"interop-broker-remove-client-from-context-group\").catch((e=>{}));const t=this.getClientState(e);t&&(t.contextGroupId=void 0),await this.setCurrentContextGroupInClientOptions(e,null)}getContextGroups(){return this.wire.sendAction(\"interop-broker-get-context-groups\").catch((e=>{})),o(this,t,\"f\").map((e=>({...e})))}getInfoForContextGroup({contextGroupId:e}){return this.wire.sendAction(\"interop-broker-get-info-for-context-group\").catch((e=>{})),this.getContextGroups().find((t=>t.id===e))}getAllClientsInContextGroup({contextGroupId:e}){this.wire.sendAction(\"interop-broker-get-all-clients-in-context-group\").catch((e=>{}));return Array.from(this.interopClients.values()).filter((t=>t.contextGroupId===e)).map((e=>e.clientIdentity))}async handleFiredIntent(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.raiseIntent\",\"InteropBroker.handleFiredIntent\",t,\"interopClient.fireIntent\");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntent)}async setIntentTarget(e,t){this.wire.sendAction(\"interop-broker-set-intent-target\").catch((e=>{}));const n=this.intentClientMap.get(t.name),i=`intent-handler-${e.name}`;if(n){const t=n.get(i);if(t){if(t.pendingIntents.push(e),t.clientIdentity&&t.isReady){const{clientIdentity:e,pendingIntents:n}=t;try{const r=n[n.length-1];await this.invokeIntentHandler(e,i,r),t.pendingIntents=[]}catch(n){console.error(`Error invoking intent handler for client ${e.uuid}/${e.name}/${e.endpointId}`),t.isReady=!1}}}else n.set(i,{isReady:!1,pendingIntents:[e]})}else{this.intentClientMap.set(t.name,new Map);const n=this.intentClientMap.get(t.name);n&&n.set(i,{isReady:!1,pendingIntents:[e]})}}async handleInfoForIntent(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.findIntent\",\"InteropBroker.handleInfoForIntent\",t,\"interopClient.getInfoForIntent\");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntent)}async handleInfoForIntentsByContext(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.findIntentsByContext\",\"InteropBroker.handleInfoForIntentsByContext\",t,\"interopClient.getInfoForIntentsByContext\");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntentsByContext)}async handleFiredIntentForContext(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.raiseIntentForContext\",\"InteropBroker.handleFiredIntentForContext\",t,\"interopClient.fireIntentForContext\");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntentForContext)}async clientDisconnected(e){}async fdc3HandleOpen({app:e,context:t},n){const i=(0,l.generateOverrideWarning)(\"fdc3.open\",\"InteropBroker.fdc3HandleOpen\",n);throw console.warn(i),new Error(l.BROKER_ERRORS.fdc3Open)}async fdc3HandleFindInstances(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.open\",\"InteropBroker.fdc3HandleFindInstances\",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3FindInstances)}async fdc3HandleGetAppMetadata(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.getAppMetadata\",\"InteropBroker.fdc3HandleGetAppMetadata\",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3GetAppMetadata)}async invokeContextHandler(e,t,n){const i=await this.getProvider();try{await i.dispatch(e,t,n)}catch(i){console.error(`Error invoking context handler ${t} for context type ${n.type} in client ${e.uuid}/${e.name}/${e.endpointId}`,i)}}async invokeIntentHandler(e,t,n){const i=await this.getProvider();await i.dispatch(e,t,n)}async fdc3HandleGetInfo(t,n){const{fdc3Version:i}=t;return{fdc3Version:i,...o(this,e,\"f\"),optionalFeatures:{OriginatingAppMetadata:!1,UserChannelMembershipAPIs:!0},appMetadata:{appId:\"\",instanceId:\"\"}}}async getAllClientInfo(){return(await this.getProvider()).getAllClientInfo()}decorateSnapshot(e){return{...e,interopSnapshotDetails:{contextGroupStates:this.getContextGroupStates()}}}applySnapshot(e,t){const n=e?.interopSnapshotDetails?.contextGroupStates;n&&(t?.closeExistingWindows||this.updateExistingClients(n),this.rehydrateContextGroupStates(n))}updateExistingClients(e){this.interopClients.forEach((t=>{const{clientIdentity:n,contextGroupId:r,contextHandlers:o}=t;if(r){const t=e[r];for(const[,e]of Object.entries(t))o.forEach((t=>{const{handlerId:r,contextType:o}=t;i.isContextTypeCompatible(e.type,o)&&this.invokeContextHandler(n,r,e)}))}}))}getContextGroupStates(){return i.toObject(this.contextGroupsById)}rehydrateContextGroupStates(e){const t=Object.entries(e);for(const[e,n]of t){const t=Object.entries(n);for(const[n,i]of t)if(this.contextGroupsById.has(e)){this.contextGroupsById.get(e).set(n,i)}else console.warn(`Attempting to set a context group that isn't in the context group mapping. Skipping context group rehydration for: ${e}`)}}contextHandlerRegistered({contextType:e,handlerId:t},n){const i={contextType:e,handlerId:t},r=this.getClientState(n);if(r?.contextHandlers.set(t,i),r&&r.contextGroupId){const{contextGroupId:i}=r,o=this.contextGroupsById.get(i);if(void 0===e)o.forEach(((e,i)=>{this.invokeContextHandler(n,t,e)}));else if(o.has(e)){const i=o.get(e);i&&this.invokeContextHandler(n,t,i)}}}async intentHandlerRegistered(e,t){const{handlerId:n}=e,i=this.intentClientMap.get(t.name),r=i?.get(n);if(i)if(r){const{pendingIntents:e}=r;r.clientIdentity=t,r.isReady=!0;try{if(e.length>0){const i=e[e.length-1];await this.invokeIntentHandler(t,n,i),r.pendingIntents=[]}}catch(e){console.error(`Error invoking intent handler: ${n} for client ${t.uuid}/${t.name}/${t.endpointId}`)}}else i.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t});else{this.intentClientMap.set(t.name,new Map);const e=this.intentClientMap.get(t.name);e&&e.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t})}}removeContextHandler({handlerId:e},t){const n=this.getClientState(t);n&&n.contextHandlers.delete(e)}handleJoinSessionContextGroup({sessionContextGroupId:e},t){try{if(!e)throw new Error(\"Failed to join session context group: must specify group id.\");const n=this.sessionContextGroupMap.get(e);if(n)n.registerNewClient(t);else{const n=new h.default(this.channel,e);n.registerNewClient(t),this.sessionContextGroupMap.set(e,n)}return{hasConflict:this.contextGroupsById.has(e)}}catch(e){throw new Error(e)}}getClientState(e){return this.interopClients.get(e.endpointId)}static toObject(e){const t=Object.fromEntries(e),n={};return Object.entries(t).forEach((([e,t])=>{const i=Object.fromEntries(t);n[e]=i})),n}static checkContextIntegrity(e){if(!e)return{isValid:!1,reason:\"No context supplied\"};if(\"object\"!=typeof e)return{isValid:!1,reason:\"Context must be an Object\"};if(!e.type)return{isValid:!1,reason:\"Context must have a type property\"};if(e.id&&\"object\"!=typeof e.id)return{isValid:!1,reason:\"Context id must be an Object populated with key-value identifiers (if set)\"};if(e.id){const{id:t}=e,n=Object.keys(t);let i=!1;if(!n.length)return{isValid:!1,reason:\"Context id must have at least one key-value identifier\"};if(n.forEach((e=>{\"string\"==typeof e&&\"string\"==typeof t[e]||(i=!0)})),i)return{isValid:!1,reason:\"Context id key-value identifiers must be of type string\"}}return e.name&&\"string\"!=typeof e.name?{isValid:!1,reason:\"Context name must be of string type (if set)\"}:{isValid:!0}}static hasEndpointId(e){return void 0!==e.endpointId}static isContextTypeCompatible(e,t){return void 0===t||e===t}setContextGroupMap(){for(const e of this.getContextGroups())this.contextGroupsById.set(e.id,new Map)}async setCurrentContextGroupInClientOptions(e,t){try{const n=await this.fin.System.getEntityInfo(e.uuid,e.name);let i;\"view\"===n.entityType?i=await this.fin.View.wrap(e):\"window\"===n.entityType&&(i=await this.fin.Window.wrap(e)),i&&await i.updateOptions({interop:{currentContextGroup:t}})}catch(e){}}async setupChannelProvider(){try{const e=await this.getProvider();this.channel=e,this.wireChannel(e)}catch(e){throw new Error(`Error setting up Interop Broker Channel Provider: ${e}`)}}wireChannel(e){e.onConnection((async(e,t)=>{if(!await this.isConnectionAuthorized(e,t))throw new Error(`Connection not authorized for ${e.uuid}, ${e.name}`);if(!e.endpointId)throw new Error(\"Version too old to be compatible with Interop. Please upgrade your runtime to a more recent version.\");const n={contextGroupId:void 0,contextHandlers:new Map,clientIdentity:e};t?.currentContextGroup&&this.contextGroupsById.has(t.currentContextGroup)&&(n.contextGroupId=t?.currentContextGroup),this.interopClients.set(e.endpointId,n)})),e.onDisconnection((e=>{this.interopClients.delete(e.endpointId);const t=this.intentClientMap.get(e.name);t&&e.uuid===this.fin.me.uuid&&t.forEach((e=>{e.isReady=!1})),this.sessionContextGroupMap.forEach((t=>{t.onDisconnection(e)})),this.clientDisconnected(e)})),e.beforeAction((async(e,t,n)=>{if(!await this.isActionAuthorized(e,t,n))throw new Error(`Action (${e}) not authorized for ${n.uuid}, ${n.name}`);this.logging?.beforeAction?.enabled&&console.log(e,t,n)})),e.afterAction(((e,t,n)=>{this.logging?.afterAction?.enabled&&console.log(e,t,n)})),e.register(\"setContext\",this.setContext.bind(this)),e.register(\"fireIntent\",this.handleFiredIntent.bind(this)),e.register(\"getCurrentContext\",this.getCurrentContext.bind(this)),e.register(\"getInfoForIntent\",this.handleInfoForIntent.bind(this)),e.register(\"getInfoForIntentsByContext\",this.handleInfoForIntentsByContext.bind(this)),e.register(\"fireIntentForContext\",this.handleFiredIntentForContext.bind(this)),e.register(\"getContextGroups\",this.getContextGroups.bind(this)),e.register(\"joinContextGroup\",this.joinContextGroup.bind(this)),e.register(\"removeFromContextGroup\",this.removeFromContextGroup.bind(this)),e.register(\"getAllClientsInContextGroup\",this.getAllClientsInContextGroup.bind(this)),e.register(\"getInfoForContextGroup\",this.getInfoForContextGroup.bind(this)),e.register(\"contextHandlerRegistered\",this.contextHandlerRegistered.bind(this)),e.register(\"intentHandlerRegistered\",this.intentHandlerRegistered.bind(this)),e.register(\"removeContextHandler\",this.removeContextHandler.bind(this)),e.register(\"sessionContextGroup:createIfNeeded\",this.handleJoinSessionContextGroup.bind(this)),e.register(\"fdc3Open\",this.fdc3HandleOpen.bind(this)),e.register(\"fdc3v2FindIntentsByContext\",this.handleInfoForIntentsByContext.bind(this)),e.register(\"fdc3FindInstances\",this.fdc3HandleFindInstances.bind(this)),e.register(\"fdc3GetAppMetadata\",this.fdc3HandleGetAppMetadata.bind(this)),e.register(\"fdc3v2GetInfo\",(async(e,t)=>this.fdc3HandleGetInfo.bind(this)(e,t))),e.register(\"createPrivateChannelProvider\",(async e=>{const{channelId:t}=e,n=await this.fin.InterApplicationBus.Channel.create(t);p.PrivateChannelProvider.init(n,t)}))}isConnectionAuthorized(e,t){return this.wire.sendAction(\"interop-broker-is-connection-authorized\").catch((e=>{})),Promise.resolve(!0)}isActionAuthorized(e,t,n){return this.wire.sendAction(\"interop-broker-is-action-authorized\").catch((e=>{})),Promise.resolve(!0)}};return Gi.InteropBroker=f,e=new WeakMap,t=new WeakMap,n=new WeakMap,Gi}var zi,Ki={},qi={},Ji=s&&s.__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},Yi=s&&s.__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)};Object.defineProperty(qi,\"__esModule\",{value:!0});const Zi=d,Qi=Hi;class Xi extends Zi.Base{constructor(e,t,n){super(e),zi.set(this,void 0),this.id=n,Ji(this,zi,t,\"f\")}async setContext(e){this.wire.sendAction(\"interop-session-context-group-set-context\").catch((e=>{}));return(await Yi(this,zi,\"f\")).dispatch(`sessionContextGroup:setContext-${this.id}`,{sessionContextGroupId:this.id,context:e})}async getCurrentContext(e){this.wire.sendAction(\"interop-session-context-group-get-context\").catch((e=>{}));return(await Yi(this,zi,\"f\")).dispatch(`sessionContextGroup:getContext-${this.id}`,{sessionContextGroupId:this.id,type:e})}async addContextHandler(e,t){if(this.wire.sendAction(\"interop-session-context-group-add-handler\").catch((e=>{})),\"function\"!=typeof e)throw new Error(\"Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.\");const n=await Yi(this,zi,\"f\");let i;return i=t?`sessionContextHandler:invoke-${this.id}-${t}-${(0,Qi.generateId)()}`:`sessionContextHandler:invoke-${this.id}`,n.register(i,(0,Qi.wrapContextHandler)(e,i)),await n.dispatch(`sessionContextGroup:handlerAdded-${this.id}`,{handlerId:i,contextType:t}),{unsubscribe:await this.createUnsubscribeCb(i)}}async createUnsubscribeCb(e){const t=await Yi(this,zi,\"f\");return async()=>{t.remove(e),await t.dispatch(`sessionContextGroup:handlerRemoved-${this.id}`,{handlerId:e})}}getUserInstance(){return{id:this.id,setContext:(0,Qi.wrapInTryCatch)(this.setContext.bind(this),\"Failed to set context: \"),getCurrentContext:(0,Qi.wrapInTryCatch)(this.getCurrentContext.bind(this),\"Failed to get context: \"),addContextHandler:(0,Qi.wrapInTryCatch)(this.addContextHandler.bind(this),\"Failed to add context handler: \")}}}qi.default=Xi,zi=new WeakMap;var er={},tr={},nr={},ir={},rr=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),or=s&&s.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,\"default\",{enumerable:!0,value:t})}:function(e,t){e.default=t}),sr=s&&s.__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)&&rr(t,e,n);return or(t,e),t};Object.defineProperty(ir,\"__esModule\",{value:!0}),ir.PrivateChannelClient=void 0;const ar=sr(Hi);var cr,dr;function hr(){if(cr)return tr;cr=1;var e,t=s&&s.__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)},n=s&&s.__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},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(tr,\"__esModule\",{value:!0}),tr.FDC3ModuleBase=void 0;const o=nr,a=Hi,c=wr(),d=r(i);return tr.FDC3ModuleBase=class{get client(){return t(this,e,\"f\").call(this)}get fin(){return this.wire.getFin()}constructor(t,i){this.wire=i,e.set(this,void 0),n(this,e,t,\"f\")}async broadcast(e){return this.wire.sendAction(\"fdc3-broadcast\").catch((e=>{})),this.client.setContext(e)}async _open(e,t){this.wire.sendAction(\"fdc3-open\").catch((e=>{}));try{return await c.InteropClient.ferryFdc3Call(this.client,\"fdc3Open\",{app:e,context:t})}catch(e){const t=e.message===a.BROKER_ERRORS.fdc3Open?\"ResolverUnavailable\":e.message;throw new Error(t)}}async _getChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:\"system\",...(0,o.getUnsupportedChannelApis)()})))}async getOrCreateChannel(e){this.wire.sendAction(\"fdc3-get-or-create-channel\").catch((e=>{}));const t=(await this._getChannels()).find((t=>t.id===e));if(t)return{...t,type:\"system\",...(0,o.getUnsupportedChannelApis)()};try{const t=await this.client.joinSessionContextGroup(e);return(0,o.buildAppChannelObject)(t)}catch(e){throw console.error(e.message),new Error(o.ChannelError.CreationFailed)}}async getSystemChannels(){return this.wire.sendAction(\"fdc3-get-system-channels\").catch((e=>{})),this._getChannels()}async joinChannel(e){this.wire.sendAction(\"fdc3-join-channel\").catch((e=>{}));try{return await this.client.joinContextGroup(e)}catch(e){if(e.message===a.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup?console.error(\"The Channel you have tried to join is an App Channel. Custom Channels can only be defined by the Interop Broker through code or manifest configuration. Please use getOrCreateChannel.\"):console.error(e.message),e.message.startsWith(\"Attempting to join a context group that does not exist\"))throw new Error(o.ChannelError.NoChannelFound);throw new Error(o.ChannelError.AccessDenied)}}async getCurrentChannel(){this.wire.sendAction(\"fdc3-get-current-channel\").catch((e=>{}));const e=await this.getCurrentContextGroupInfo();return e?this.buildChannelObject(e):null}async leaveCurrentChannel(){return this.wire.sendAction(\"fdc3-leave-current-channel\").catch((e=>{})),this.client.removeFromContextGroup()}async getCurrentContextGroupInfo(){const e=await this.client.getContextGroups(),t=e.map((async e=>this.client.getAllClientsInContextGroup(e.id))),n=(await Promise.all(t)).findIndex((e=>e.some((e=>{const{uuid:t,name:n}=e;return this.wire.me.uuid===t&&this.wire.me.name===n}))));return e[n]}async buildChannelObject(e){return{...e,type:\"system\",addContextListener:(...[e,t])=>{let n,i;\"function\"==typeof e?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),n=e):(n=t,\"string\"==typeof e&&(i=e));const r=(async()=>{let e=!0;const t=await this.client.getCurrentContext(i);return this.client.addContextHandler(((i,r)=>{if(!e||(e=!1,!(0,d.default)(t,i)))return n(i,r)}),i)})();return{...r,unsubscribe:()=>r.then((e=>e.unsubscribe()))}},broadcast:this.broadcast.bind(this),getCurrentContext:async e=>{const t=await this.client.getCurrentContext(e);return void 0===t?null:t}}}},e=new WeakMap,tr}ir.PrivateChannelClient=class{constructor(e,t){this.id=t,this.client=e,this.listeners=new Map}async broadcast(e){return this.client.dispatch(\"broadcast\",{context:e})}async getCurrentContext(e){return this.client.dispatch(\"getCurrentContext\",{contextType:e})}async addContextListener(e,t){if(\"function\"!=typeof t)throw new Error(\"Non-function argument passed to the second parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.\");let n;n=e?`contextHandler:invoke-${this.id}-${e}-${ar.generateId()}`:`contextHandler:invoke-${this.id}-${ar.generateId()}`,this.client.register(n,ar.wrapContextHandler(t,n));const i={unsubscribe:await this.createContextUnsubscribeCb(n)};return this.listeners.set(n,i),await this.client.dispatch(\"contextHandlerAdded\",{handlerId:n,contextType:e}),i}createNonStandardUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch(\"nonStandardHandlerRemoved\",{handlerId:e})}}createContextUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch(\"contextHandlerRemoved\",{handlerId:e})}}onAddContextListener(e){const t=`onContextHandlerAdded:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch(\"onAddContextHandlerAdded\",{handlerId:t}),n}onDisconnect(e){const t=`onDisconnect:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch(\"onDisconnectHandlerAdded\",{handlerId:t}),n}onUnsubscribe(e){const t=`onUnsubscribe:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch(\"onUnsubscribeHandlerAdded\",{handlerId:t}),n}async cleanUpAllSubs(){Array.from(this.listeners.keys()).forEach((e=>{this.client.remove(e),this.listeners.delete(e)}))}async disconnect(){try{await this.client.dispatch(\"clientDisconnecting\"),await this.cleanUpAllSubs(),await this.client.disconnect()}catch(e){throw new Error(e.message)}}},function(e){var t=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,\"__esModule\",{value:!0}),e.getIntentResolution=e.isChannel=e.isContext=e.connectPrivateChannel=e.buildAppChannelObject=e.buildPrivateChannelObject=e.ChannelError=e.ResultError=e.UnsupportedChannelApiError=e.getUnsupportedChannelApis=void 0;const n=Hi,r=ir,o=t(i);e.getUnsupportedChannelApis=e=>({addContextListener:()=>{throw new a(\"Channel.addContextListener\",e)},broadcast:()=>{throw new a(\"Channel.broadcast\",e)},getCurrentContext:()=>{throw new a(\"Channel.getCurrentContext\",e)}});class a extends Error{constructor(e,t=\"System\"){super(e),this.message=`Calling ${e} on an instance of a ${t} Channel returned by fdc3.get${t}Channels is not supported. If you would like to use a ${t} Channel, please use fdc3.joinChannel, fdc3.addContextListener, and fdc3.broadcast instead.`}}var c,d;e.UnsupportedChannelApiError=a,function(e){e.NoResultReturned=\"NoResultReturned\",e.IntentHandlerRejected=\"IntentHandlerRejected\"}(c=e.ResultError||(e.ResultError={})),(d=e.ChannelError||(e.ChannelError={})).NoChannelFound=\"NoChannelFound\",d.AccessDenied=\"AccessDenied\",d.CreationFailed=\"CreationFailed\";e.buildPrivateChannelObject=e=>{let t=!1;const n=()=>{if(t)throw new Error(\"Private Channel Client has been disconnected from the Private Channel\")};return{id:e.id,type:\"private\",broadcast:async t=>(n(),e.broadcast(t)),getCurrentContext:async t=>(n(),e.getCurrentContext(t)),addContextListener:async(t,i)=>{n();let r=i,o=t;\"function\"==typeof t&&(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),r=t,o=null);return e.addContextListener(o,r)},onAddContextListener:t=>(n(),e.onAddContextListener(t)),disconnect:async()=>(n(),t=!0,e.disconnect()),onDisconnect:t=>(n(),e.onDisconnect(t)),onUnsubscribe:t=>(n(),e.onUnsubscribe(t))}};e.buildAppChannelObject=e=>({id:e.id,type:\"app\",broadcast:e.setContext,getCurrentContext:async t=>{const n=await e.getCurrentContext(t);return void 0===n?null:n},addContextListener:(t,n)=>{let i,r;\"function\"==typeof t?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),i=t):(i=n,\"string\"==typeof t&&(r=t));const s=(async()=>{let t=!0;const n=await e.getCurrentContext(r);return e.addContextHandler(((e,r)=>{if(!t||(t=!1,!(0,o.default)(n,e)))return i(e,r)}),r)})();return{...s,unsubscribe:()=>s.then((e=>e.unsubscribe()))}}});e.connectPrivateChannel=async t=>{try{const n=await fin.InterApplicationBus.Channel.connect(t),i=new r.PrivateChannelClient(n,t);return(0,e.buildPrivateChannelObject)(i)}catch(e){throw new Error(`Private Channel with id: ${t} doesn't exist`)}};e.isContext=e=>{if(e&&\"object\"==typeof e&&\"type\"in e){const{type:t}=e;return\"string\"==typeof t}return!1};e.isChannel=e=>{if(e&&\"object\"==typeof e&&\"type\"in e&&\"id\"in e){const{type:t,id:n}=e;return\"string\"==typeof t&&\"string\"==typeof n&&(\"app\"===t||\"private\"===t)}return!1};e.getIntentResolution=async(t,i,r,o)=>{const s=(0,n.generateId)(),a=new Promise(((e,t)=>{fin.InterApplicationBus.subscribe({uuid:\"*\"},s,(t=>{e(t)})).catch((()=>t(new Error(\"getResult is not supported in this environment\"))))})),d=r?{target:r,intentResolutionResultId:s}:{intentResolutionResultId:s},h=o?{name:o,context:i,metadata:d}:{...i,metadata:d},l=async()=>{let n=await a;if(!n||\"object\"!=typeof n)throw new Error(c.NoResultReturned);const{error:i}=n;if(i)throw new Error(c.IntentHandlerRejected);if((0,e.isChannel)(n)){const{id:i,type:r}=n;switch(r){case\"private\":n=await(0,e.connectPrivateChannel)(i);break;case\"app\":{const r=await t.joinSessionContextGroup(i);n=(0,e.buildAppChannelObject)(r);break}}}else if(!(0,e.isContext)(n))throw new Error(c.NoResultReturned);return n},u=o?await t.fireIntent(h):await t.fireIntentForContext(h);return\"object\"!=typeof u?{source:{appId:\"\",instanceId:\"\"},intent:\"\",version:\"2.0\",getResult:l}:{...u,getResult:l}}}(nr);var lr,ur,pr={};function wr(){if(ur)return Ki;ur=1;var e,t,n=s&&s.__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},i=s&&s.__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)},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ki,\"__esModule\",{value:!0}),Ki.InteropClient=void 0;const o=d,a=r(qi),c=function(){if(dr)return er;dr=1,Object.defineProperty(er,\"__esModule\",{value:!0}),er.Fdc3Module=void 0;const e=Hi,t=hr();class n extends t.FDC3ModuleBase{async open(e,t){await super._open(e,t)}addContextListener(e,t){let n;return this.wire.sendAction(\"fdc3-add-context-listener\").catch((e=>{})),\"function\"==typeof e?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),n=this.client.addContextHandler(e)):n=this.client.addContextHandler(t,null===e?void 0:e),{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}addIntentListener(e,t){this.wire.sendAction(\"fdc3-add-intent-listener\").catch((e=>{}));const n=this.client.registerIntentHandler((e=>{const{context:n,metadata:i}=e,{metadata:r}=n,o=i?.intentResolutionResultId||r?.intentResolutionResultId;o&&this.fin.InterApplicationBus.publish(o,null).catch((()=>null)),t(e.context)}),e,{fdc3Version:\"1.2\"});return{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}async raiseIntent(t,n,i){this.wire.sendAction(\"fdc3-raise-intent\").catch((e=>{}));const r=i?{name:t,context:n,metadata:{target:i}}:{name:t,context:n};try{return await this.client.fireIntent(r)}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntent?\"ResolverUnavailable\":t.message;throw new Error(n)}}async findIntent(t,n){this.wire.sendAction(\"fdc3-find-intent\").catch((e=>{}));try{return await this.client.getInfoForIntent({name:t,context:n})}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntent?\"ResolverUnavailable\":t.message;throw new Error(n)}}async findIntentsByContext(t){this.wire.sendAction(\"fdc3-find-intents-by-context\").catch((e=>{}));try{return await this.client.getInfoForIntentsByContext(t)}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntentsByContext?\"ResolverUnavailable\":t.message;throw new Error(n)}}async raiseIntentForContext(t,n){this.wire.sendAction(\"fdc3-raise-intent-for-context\").catch((e=>{}));try{return await this.client.fireIntentForContext({...t,metadata:{target:n}})}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntentForContext?\"ResolverUnavailable\":t.message;throw new Error(n)}}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}getInfo(){return this.wire.sendAction(\"fdc3-get-info\").catch((e=>{})),{providerVersion:this.wire.environment.getAdapterVersionSync(),provider:`openfin-${this.wire.me.uuid}`,fdc3Version:\"1.2\"}}}return er.Fdc3Module=n,er}(),h=function(){if(lr)return pr;lr=1,Object.defineProperty(pr,\"__esModule\",{value:!0}),pr.Fdc3Module2=void 0;const e=hr(),t=Hi,n=wr(),i=nr,r=ir;class o extends e.FDC3ModuleBase{async open(e,t){return\"string\"==typeof e&&console.warn(\"Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).\"),super._open(e,t)}async findInstances(e){this.wire.sendAction(\"fdc3-find-instances\").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,\"fdc3FindInstances\",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3FindInstances?\"ResolverUnavailable\":e.message;throw new Error(n)}}async getAppMetadata(e){this.wire.sendAction(\"fdc3-get-app-metadata\").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,\"fdc3GetAppMetadata\",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3GetAppMetadata?\"ResolverUnavailable\":e.message;throw new Error(n)}}async addContextListener(e,t){this.wire.sendAction(\"fdc3-add-context-listener\").catch((e=>{}));const n=e=>t=>{const{contextMetadata:n,...i}=t,r=n?[{...i},n]:[t,null];e(...r)};let i=t,r=n(i);return\"function\"==typeof e?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),i=e,r=n(i),this.client.addContextHandler(r)):this.client.addContextHandler(r,null===e?void 0:e)}async findIntent(e,n,i){this.wire.sendAction(\"fdc3-find-intent\").catch((e=>{}));try{return await this.client.getInfoForIntent({name:e,context:n,metadata:{resultType:i}})}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntent?\"ResolverUnavailable\":e.message;throw new Error(n)}}async findIntentsByContext(e,i){this.wire.sendAction(\"fdc3-find-intents-by-context\").catch((e=>{}));const r=i?{context:e,metadata:{resultType:i}}:e;try{return await n.InteropClient.ferryFdc3Call(this.client,\"fdc3v2FindIntentsByContext\",r)}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntentsByContext?\"ResolverUnavailable\":e.message;throw new Error(n)}}async raiseIntent(e,n,r){this.wire.sendAction(\"fdc3-raise-intent\").catch((e=>{}));try{return\"string\"==typeof r&&console.warn(\"Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).\"),(0,i.getIntentResolution)(this.client,n,r,e)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?\"ResolverUnavailable\":e.message;throw new Error(n)}}async raiseIntentForContext(e,n){this.wire.sendAction(\"fdc3-raise-intent-for-context\").catch((e=>{}));try{return\"string\"==typeof n&&console.warn(\"Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).\"),(0,i.getIntentResolution)(this.client,e,n)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?\"ResolverUnavailable\":e.message;throw new Error(n)}}async addIntentListener(e,t){if(this.wire.sendAction(\"fdc3-add-intent-listener\").catch((e=>{})),\"string\"!=typeof e)throw new Error(\"First argument must be an Intent name\");return this.client.registerIntentHandler((async e=>{let n,i;const{context:r,metadata:o}=e,{contextMetadata:s,metadata:a,...c}=r,d=o?.intentResolutionResultId||a?.intentResolutionResultId;try{const e=a?{metadata:a,...c}:{...c};n=await t(e,s),i=n}catch(e){n=e,i={error:!0}}if(d&&this.fin.InterApplicationBus.publish(d,i).catch((()=>null)),n instanceof Error)throw new Error(n.message);return n}),e,{fdc3Version:\"2.0\"})}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}async createPrivateChannel(){const e=(0,t.generateId)();await n.InteropClient.ferryFdc3Call(this.client,\"createPrivateChannelProvider\",{channelId:e});const o=await this.fin.InterApplicationBus.Channel.connect(e),s=new r.PrivateChannelClient(o,e);return(0,i.buildPrivateChannelObject)(s)}async getUserChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:\"user\",...(0,i.getUnsupportedChannelApis)(\"User\")})))}async getSystemChannels(){return console.warn(\"This API has been deprecated. Please use fdc3.getUserChannels instead.\"),super.getSystemChannels()}async joinUserChannel(e){return super.joinChannel(e)}async joinChannel(e){return console.warn(\"This API has been deprecated. Please use fdc3.joinUserChannel instead.\"),super.joinChannel(e)}async getCurrentChannel(){const e=await super.getCurrentChannel();return e?{...e,type:\"user\",broadcast:this.broadcast.bind(this)}:null}async getInfo(){return n.InteropClient.ferryFdc3Call(this.client,\"fdc3v2GetInfo\",{fdc3Version:\"2.0\"})}}return pr.Fdc3Module2=o,pr}(),l=Hi;let u=class extends o.Base{constructor(i,r){super(i),e.set(this,void 0),t.set(this,void 0),n(this,t,new Map,\"f\"),n(this,e,r,\"f\")}async setContext(t){this.wire.sendAction(\"interop-client-set-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"setContext\",{context:t})}async addContextHandler(t,n){if(this.wire.sendAction(\"interop-client-add-context-handler\").catch((e=>{})),\"function\"!=typeof t)throw new Error(\"Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.\");const r=await i(this,e,\"f\");let o;o=n?`invokeContextHandler-${n}-${(0,l.generateId)()}`:\"invokeContextHandler\";const s=(0,l.wrapContextHandler)(t,o);return r.register(o,s),await r.dispatch(\"contextHandlerRegistered\",{handlerId:o,contextType:n}),{unsubscribe:async()=>{r.remove(o),await r.dispatch(\"removeContextHandler\",{handlerId:o})}}}async getContextGroups(){this.wire.sendAction(\"interop-client-get-context-groups\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getContextGroups\")}async joinContextGroup(t,n){this.wire.sendAction(\"interop-client-join-context-group\").catch((e=>{}));const r=await i(this,e,\"f\");if(!t)throw new Error(\"No contextGroupId specified for joinContextGroup.\");return r.dispatch(\"joinContextGroup\",{contextGroupId:t,target:n})}async removeFromContextGroup(t){this.wire.sendAction(\"interop-client-remove-from-context-group\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"removeFromContextGroup\",{target:t})}async getAllClientsInContextGroup(t){this.wire.sendAction(\"interop-client-get-all-clients-in-context-group\").catch((e=>{}));const n=await i(this,e,\"f\");if(!t)throw new Error(\"No contextGroupId specified for getAllClientsInContextGroup.\");return n.dispatch(\"getAllClientsInContextGroup\",{contextGroupId:t})}async getInfoForContextGroup(t){this.wire.sendAction(\"interop-client-get-info-for-context-group\").catch((e=>{}));const n=await i(this,e,\"f\");if(!t)throw new Error(\"No contextGroupId specified for getInfoForContextGroup.\");return n.dispatch(\"getInfoForContextGroup\",{contextGroupId:t})}async fireIntent(t){this.wire.sendAction(\"interop-client-fire-intent\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"fireIntent\",t)}async registerIntentHandler(t,n,r){this.wire.sendAction(\"interop-client-register-intent-handler\").catch((e=>{}));const o=await i(this,e,\"f\"),s=`intent-handler-${n}`,a=(0,l.wrapIntentHandler)(t,s);try{await o.register(s,a),await o.dispatch(\"intentHandlerRegistered\",{handlerId:s,...r})}catch(e){throw new Error(\"Unable to register intent handler\")}return{unsubscribe:async()=>{o.remove(s)}}}async getCurrentContext(t){this.wire.sendAction(\"interop-client-get-current-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getCurrentContext\",{contextType:t})}async getInfoForIntent(t){this.wire.sendAction(\"interop-client-get-info-for-intent\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getInfoForIntent\",t)}async getInfoForIntentsByContext(t){this.wire.sendAction(\"interop-client-get-info-for-intents-by-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getInfoForIntentsByContext\",t)}async fireIntentForContext(t){this.wire.sendAction(\"interop-client-fire-intent-for-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"fireIntentForContext\",t)}async joinSessionContextGroup(n){try{const r=i(this,t,\"f\").get(n);if(r)return r.getUserInstance();const o=await i(this,e,\"f\"),{hasConflict:s}=await o.dispatch(\"sessionContextGroup:createIfNeeded\",{sessionContextGroupId:n});s&&console.warn(`A (non-session) context group with the name \"${n}\" already exists. If you are trying to join a Context Group, call joinContextGroup instead.`);const c=new a.default(this.wire,i(this,e,\"f\"),n);return i(this,t,\"f\").set(n,c),c.getUserInstance()}catch(e){throw console.error(`Error thrown trying to create Session Context Group with id \"${n}\": ${e}`),e}}async onDisconnection(t){this.wire.sendAction(\"interop-client-add-ondisconnection-listener\").catch((e=>{}));return(await i(this,e,\"f\")).onDisconnection((e=>{const{uuid:n}=e;t({type:\"interop-broker\",topic:\"disconnected\",brokerName:n})}))}getFDC3Sync(e){switch(e){case\"1.2\":return new c.Fdc3Module((()=>this),this.wire);case\"2.0\":return new h.Fdc3Module2((()=>this),this.wire);default:throw new Error(`Invalid FDC3 version provided: ${e}. Must be '1.2' or '2.0'`)}}async getFDC3(e){return this.getFDC3Sync(e)}static async ferryFdc3Call(t,n,r){return(await i(t,e,\"f\")).dispatch(n,r||null)}};return Ki.InteropClient=u,e=new WeakMap,t=new WeakMap,Ki}var yr,fr,gr,mr={};function vr(){if(yr)return mr;yr=1,Object.defineProperty(mr,\"__esModule\",{value:!0}),mr.overrideCheck=mr.checkFDC32Overrides=mr.getDefaultViewFdc3VersionFromAppInfo=void 0;const e=Vi();function t(t){return[\"fdc3HandleFindInstances\",\"handleInfoForIntent\",\"handleInfoForIntentsByContext\",\"fdc3HandleGetAppMetadata\",\"fdc3HandleGetInfo\",\"fdc3HandleOpen\",\"handleFiredIntent\",\"handleFiredIntentForContext\"].filter((n=>t[n]===e.InteropBroker.prototype[n]))}return mr.getDefaultViewFdc3VersionFromAppInfo=function({manifest:e,initialOptions:t}){const n=e?.platform?.defaultViewOptions?.fdc3InteropApi??t.defaultViewOptions?.fdc3InteropApi;return[\"1.2\",\"2.0\"].includes(n??\"\")?n:void 0},mr.checkFDC32Overrides=t,mr.overrideCheck=function(e,n){if(n&&\"2.0\"===n){const n=t(e);n.length>0&&console.warn(`WARNING: FDC3 2.0 has been set as a default option for Views in this Platform, but the required InteropBroker APIs for FDC3 2.0 compliance have not all been overridden.\\nThe following APIs need to be overridden:\\n${n.join(\"\\n\")}`)}},mr}function Cr(){return gr||(gr=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),i=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),i(function(){if(fr)return Ti;fr=1;var e=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ti,\"__esModule\",{value:!0}),Ti.InteropModule=void 0;const t=e(n),i=$i,r=d,o=Vi(),a=wr(),c=vr(),h=Tn,l=e=>new e,u=\"You have attempted to use or modify InteropBroker parameters, which is not allowed. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.\";class p extends r.Base{async init(e,n=l){this.wire.sendAction(\"interop-init\").catch((()=>{}));const r=await this.wire.environment.getInteropInfo(this.wire.getFin()),s=(0,i.createUnusableObject)(u),a=(0,i.createWarningObject)(u,(0,t.default)(r)),d=async()=>{throw new Error(u)},p=o.InteropBroker.createClosedConstructor(this.wire,(()=>this.fin.InterApplicationBus.Channel.create(`interop-broker-${e}`)),r);let w;return w=Array.isArray(n)?new((0,h.overrideFromComposables)(...n)(p))(s,d,a):await n(p,s,d,a),(0,c.overrideCheck)(w,r.fdc3Version),w}connectSync(e,t){return this.wire.sendAction(\"interop-connect-sync\").catch((()=>{})),new a.InteropClient(this.wire,this.wire.environment.whenReady().then((()=>this.fin.InterApplicationBus.Channel.connect(`interop-broker-${e}`,{payload:t}))))}}return Ti.InteropModule=p,Ti}(),e),i(wr(),e),i(Vi(),e)}(Li)),Li}var br={},Ir={},Er={},xr={};Object.defineProperty(xr,\"__esModule\",{value:!0}),xr.getSnapshotSourceChannelName=void 0;xr.getSnapshotSourceChannelName=e=>`snapshot-source-provider-${e.uuid}`;var Ar,Pr,Mr,_r,Or,Sr=s&&s.__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},Rr=s&&s.__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)};Object.defineProperty(Er,\"__esModule\",{value:!0}),Er.SnapshotSource=void 0;const Fr=d,jr=xr,kr=new Map;class Lr extends Fr.Base{constructor(e,t){super(e),Ar.set(this,void 0),Pr.set(this,(()=>(kr.has(this.identity.uuid)||kr.set(this.identity.uuid,{eventFired:null,clientPromise:null}),kr.get(this.identity.uuid)))),Mr.set(this,(()=>(Rr(this,Pr,\"f\").call(this).clientPromise||(Rr(this,Pr,\"f\").call(this).clientPromise=Rr(this,_r,\"f\").call(this)),Rr(this,Pr,\"f\").call(this).clientPromise))),_r.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);try{Rr(this,Pr,\"f\").call(this).eventFired||await Rr(this,Or,\"f\").call(this);const t=await this.fin.InterApplicationBus.Channel.connect(e,{wait:!1});return t.onDisconnection((()=>{Rr(this,Pr,\"f\").call(this).clientPromise=null,Rr(this,Pr,\"f\").call(this).eventFired=null})),t}catch(e){throw Rr(this,Pr,\"f\").call(this).clientPromise=null,new Error(\"The targeted SnapshotSource is not currently initialized. Await this object's ready() method.\")}})),Or.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);let t,n;const i=new Promise(((e,i)=>{t=e,n=i}));Rr(this,Pr,\"f\").call(this).eventFired=i;const r=async i=>{try{i.channelName===e&&(t(),await this.fin.InterApplicationBus.Channel.removeListener(\"connected\",r))}catch(e){n(e)}};await this.fin.InterApplicationBus.Channel.on(\"connected\",r)})),Sr(this,Ar,t,\"f\")}get identity(){return Rr(this,Ar,\"f\")}async ready(){this.wire.sendAction(\"snapshot-source-ready\").catch((e=>{}));try{await Rr(this,Mr,\"f\").call(this)}catch(e){await Rr(this,Pr,\"f\").call(this).eventFired}}async getSnapshot(){this.wire.sendAction(\"snapshot-source-get-snapshot\").catch((e=>{}));const e=await Rr(this,Mr,\"f\").call(this),t=await e.dispatch(\"get-snapshot\");return(await t).snapshot}async applySnapshot(e){this.wire.sendAction(\"snapshot-source-apply-snapshot\").catch((e=>{}));return(await Rr(this,Mr,\"f\").call(this)).dispatch(\"apply-snapshot\",{snapshot:e})}}Er.SnapshotSource=Lr,Ar=new WeakMap,Pr=new WeakMap,Mr=new WeakMap,_r=new WeakMap,Or=new WeakMap,Object.defineProperty(Ir,\"__esModule\",{value:!0}),Ir.SnapshotSourceModule=void 0;const Tr=d,$r=Er,Br=xr;class Gr extends Tr.Base{async init(e){if(this.wire.sendAction(\"snapshot-source-init\").catch((e=>{})),\"object\"!=typeof e||\"function\"!=typeof e.getSnapshot||\"function\"!=typeof e.applySnapshot)throw new Error(\"you must pass in a valid SnapshotProvider\");const t=await this.fin.InterApplicationBus.Channel.create((0,Br.getSnapshotSourceChannelName)(this.fin.me));t.register(\"get-snapshot\",(async()=>({snapshot:await e.getSnapshot()}))),t.register(\"apply-snapshot\",(({snapshot:t})=>e.applySnapshot(t)))}wrapSync(e){return this.wire.sendAction(\"snapshot-source-wrap-sync\").catch((e=>{})),new $r.SnapshotSource(this.wire,e)}async wrap(e){return this.wire.sendAction(\"snapshot-source-wrap\").catch((e=>{})),this.wrapSync(e)}}Ir.SnapshotSourceModule=Gr,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Ir,e),n(Er,e)}(br),Object.defineProperty(a,\"__esModule\",{value:!0});var Wr=a.Fin=void 0;const Hr=t,Nr=c,Dr=ie(),Ur=Z(),Vr=de,zr=en,Kr=rn,qr=un,Jr=bn,Yr=J(),Zr=An,Qr=ki,Xr=Cr(),eo=br;class to extends Hr.EventEmitter{constructor(e){super(),this.wire=e,this.System=new Nr.System(e),this.Window=new Dr._WindowModule(e),this.Application=new Ur.ApplicationModule(e),this.InterApplicationBus=new Vr.InterApplicationBus(e),this.Clipboard=new zr.Clipboard(e),this.ExternalApplication=new Kr.ExternalApplicationModule(e),this.Frame=new qr._FrameModule(e),this.GlobalHotkey=new Jr.GlobalHotkey(e),this.Platform=new Zr.PlatformModule(e,this.InterApplicationBus.Channel),this.View=new Yr.ViewModule(e),this.Interop=new Xr.InteropModule(e),this.SnapshotSource=new eo.SnapshotSourceModule(e),e.registerFin(this),this.me=(0,Qr.getMe)(e),e.on(\"disconnected\",(()=>{this.emit(\"disconnected\")}))}}Wr=a.Fin=to;var no={},io={};function ro(e){return\"string\"==typeof e.manifestUrl}function oo(e){return ao(e)&&\"string\"==typeof e.address}function so(e){return oo(e)&&\"string\"==typeof e.token}function ao(e){return\"string\"==typeof e.uuid}function co(e){return e.runtime&&\"string\"==typeof e.runtime.version}function ho(e){return ao(e)&&co(e)}Object.defineProperty(io,\"__esModule\",{value:!0}),io.isInternalConnectConfig=io.isPortDiscoveryConfig=io.isNewConnectConfig=io.isConfigWithReceiver=io.isRemoteConfig=io.isExistingConnectConfig=io.isExternalConfig=void 0,io.isExternalConfig=ro,io.isExistingConnectConfig=oo,io.isRemoteConfig=so,io.isConfigWithReceiver=function(e){return\"object\"==typeof e.receiver&&so({...e,address:\"\"})},io.isNewConnectConfig=ho,io.isPortDiscoveryConfig=function(e){return ro(e)&&co(e)||ho(e)},io.isInternalConnectConfig=function(e){return oo(e)||ho(e)};var lo={},uo={};Object.defineProperty(uo,\"__esModule\",{value:!0}),uo.EmitterMap=void 0;const po=t;function wo(e){return Buffer.from(e).toString(\"base64\")}uo.EmitterMap=class{constructor(){this.storage=new Map}hashKeys(e){return e.map(wo).join(\"/\")}getOrCreate(e){const t=this.hashKeys(e);return this.storage.has(t)||this.storage.set(t,new po.EventEmitter),this.storage.get(t)}has(e){return this.storage.has(this.hashKeys(e))}delete(e){const t=this.hashKeys(e);return this.storage.delete(t)}},Object.defineProperty(lo,\"__esModule\",{value:!0});const yo=uo;class fo extends yo.EmitterMap{constructor(){super(...arguments),this.dispatchEvent=e=>{if(function(e){return\"process-desktop-event\"===e.action}(e)){const{payload:t}=e,n=function(e){const{topic:t}=e;if(\"frame\"===t||\"window\"===t||\"view\"===t){const{uuid:n,name:i}=e;return[t,n,i]}if(\"application\"===t){const{uuid:n}=e;return[t,n]}return[t]}(t);if(this.has(n))return this.getOrCreate(n).emit(t.type,t),!0}return!1}}}lo.default=fo;var go,mo,vo=s&&s.__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},Co=s&&s.__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)},bo=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(no,\"__esModule\",{value:!0});var Io=no.Transport=void 0;const Eo=t,xo=io,Ao=g,Po=bo(lo),Mo=ki,_o=ke;class Oo extends Eo.EventEmitter{constructor(e,t,n){super(),this.wireListeners=new Map,this.topicRefMap=new Map,this.eventAggregator=new Po.default,this.messageHandlers=[this.eventAggregator.dispatchEvent],go.set(this,void 0),mo.set(this,void 0),this.connectSync=()=>{Co(this,go,\"f\").connectSync()},this.getPort=()=>Co(this,go,\"f\").getPort(),vo(this,go,new e(this.onmessage.bind(this)),\"f\"),this.environment=t,this.sendRaw=Co(this,go,\"f\").send.bind(Co(this,go,\"f\")),this.registerMessageHandler(this.handleMessage.bind(this)),Co(this,go,\"f\").on(\"disconnected\",(()=>{for(const[,{handleNack:e}]of this.wireListeners)e({reason:\"Remote connection has closed\"});this.wireListeners.clear(),this.emit(\"disconnected\")}));const{uuid:i,name:r}=n,o=this.environment.getCurrentEntityType();this.me=(0,Mo.getBaseMe)(o,i,r)}getFin(){if(!Co(this,mo,\"f\"))throw new Error(\"No Fin object registered for this transport\");return Co(this,mo,\"f\")}registerFin(e){if(Co(this,mo,\"f\"))throw new Error(\"Fin object has already been registered for this transport\");vo(this,mo,e,\"f\")}shutdown(){return Co(this,go,\"f\").shutdown()}async connect(e){if((0,xo.isConfigWithReceiver)(e))return await Co(this,go,\"f\").connect(e.receiver),this.authorize(e);if((0,xo.isRemoteConfig)(e))return this.connectRemote(e);if((0,xo.isExistingConnectConfig)(e))return this.connectByPort(e);if((0,xo.isNewConnectConfig)(e)){const t=await this.environment.retrievePort(e);return this.connectByPort({...e,address:`ws://localhost:${t}`})}}async connectRemote(e){return await Co(this,go,\"f\").connect(new(this.environment.getWsConstructor())(e.address)),this.authorize(e)}async connectByPort(e){const{address:t,uuid:n}=e,i={...e,type:\"file-token\"},r=Co(this,go,\"f\");await r.connect(new(this.environment.getWsConstructor())(e.address));const o=await this.sendAction(\"request-external-authorization\",{uuid:n,type:\"file-token\"},!0);if(\"external-authorization-response\"!==o.action)throw new Ao.UnexpectedActionError(o.action);return await this.environment.writeToken(o.payload.file,o.payload.token),this.authorize(i)}async authorize(e){const t=await this.sendAction(\"request-authorization\",e,!0);if(\"authorization-response\"!==t.action)throw new Ao.UnexpectedActionError(t.action);if(!0!==t.payload.success)throw new Ao.RuntimeError(t.payload)}sendAction(e,t={},n=!1){let i=()=>{};const r=Ao.RuntimeError.getCallSite(1),o=this.environment.getNextMessageId(),s=new Promise(((s,a)=>{i=a;const c={action:e,payload:t,messageId:o},d=Co(this,go,\"f\");return this.addWireListener(o,s,(e=>this.nackHandler(e,a,r)),n),d.send(c).catch(a)}));return Object.assign(s,{cancel:i,messageId:o})}nackHandler(e,t,n){t(\"string\"==typeof e?e:new Ao.RuntimeError(e,n))}ferryAction(e){return new Promise(((t,n)=>{const i=this.environment.getNextMessageId();e.messageId=i;const r=e=>{t(e.payload)};return Co(this,go,\"f\").send(e).then((()=>this.addWireListener(i,r,(e=>this.nackHandler(e,n)),!1))).catch(n)}))}registerMessageHandler(e){this.messageHandlers.push(e)}addWireListener(e,t,n,i){i?this.uncorrelatedListener=t:this.wireListeners.has(e)?n({reason:\"Duplicate handler id\",error:(0,_o.errorToPOJO)(new Ao.DuplicateCorrelationError(String(e)))}):this.wireListeners.set(e,{resolve:t,handleNack:n})}onmessage(e){for(const t of this.messageHandlers)t.call(null,e)}handleMessage(e){const t=e.correlationId||NaN;if(\"correlationId\"in e){if(!this.wireListeners.has(t))return!1;{const{resolve:n,handleNack:i}=this.wireListeners.get(t);\"ack\"!==e.action?i({reason:\"Did not receive ack action\",error:(0,_o.errorToPOJO)(new Ao.NoAckError(e.action))}):\"payload\"in e?e.payload.success?n.call(null,e):i(e.payload):\"string\"==typeof e.reason?i(e):(console.warn(\"Received invalid response from core\",e),i({reason:\"invalid response shape\"})),this.wireListeners.delete(t)}}else this.uncorrelatedListener&&this.uncorrelatedListener.call(null,e),this.uncorrelatedListener=()=>{};return!0}}Io=no.Transport=Oo,go=new WeakMap,mo=new WeakMap;const So=(...e)=>({log:(...t)=>console.debug(`[${(new Date).toISOString()}]`,...(e=>e.map((e=>`[${e}]`)))(e),...t),getLogger:(...t)=>So(...e,...t)}),Ro=So(\"@openfin/core-web/client\");function Fo(e,t){if(!function(e){return\"string\"==typeof e}(e))throw new Error(`Property ${t} has invalid type. Expected string, got ${typeof e}.`)}const jo=\"web-broker-ports-ready\",ko=Ro.getLogger(\"get-web-interop-ports\");function Lo(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)}function To(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}\"function\"==typeof SuppressedError&&SuppressedError;const $o=e=>{var n,i,r;return r=class extends t.EventEmitter{constructor(t){super(),n.set(this,void 0),i.set(this,!1),this.connectSync=()=>{Lo(this,i,\"f\")||(e.addEventListener(\"message\",(e=>{e.data?.topic?.startsWith(\"wire-message\")&&e.data.message&&Lo(this,n,\"f\").call(this,{...JSON.parse(e.data.message),ports:e.ports})})),e.start())},this.connect=async()=>{this.connectSync()},this.send=t=>(e.postMessage({topic:\"wire-message\",message:JSON.stringify(t)}),Promise.resolve()),this.shutdown=async()=>{e.close()},To(this,n,t,\"f\")}getPort(){return e}},n=new WeakMap,i=new WeakMap,r};var Bo={},Go={};Object.defineProperty(Go,\"__esModule\",{value:!0}),Go.BaseEnvironment=void 0;const Wo=vr();Go.BaseEnvironment=class{async getViewWindowIdentity(e,t){const{identity:n}=await e.View.wrapSync(t).getCurrentWindow();return n}async getInteropInfo(e){const t=await e.Application.getCurrentSync().getInfo().catch((()=>null)),n=t?.initialOptions?.interopBrokerConfiguration??{};return{fdc3Version:t?(0,Wo.getDefaultViewFdc3VersionFromAppInfo)(t):void 0,...n,fdc3Info:{providerVersion:await e.System.getVersion(),provider:\"OpenFin\"}}}},Object.defineProperty(Bo,\"__esModule\",{value:!0});var Ho=Bo.BrowserEnvironment=void 0;const No=Go;class Do extends No.BaseEnvironment{constructor(){super(...arguments),this.type=\"other\",this.getRandomId=()=>{const e=new Uint32Array(1);return window.crypto.getRandomValues(e)[0].toString(32)}}getAdapterVersionSync(){return\"\"}observeBounds(e,t){throw new Error(\"Method not implemented.\")}layoutAllowedInContext(e){return!1}initLayoutManager(e,t,n){throw new Error(\"Method not implemented.\")}applyLayoutSnapshot(e,t,n){throw new Error(\"Method not implemented.\")}createLayout(e,t){throw new Error(\"Method not implemented.\")}destroyLayout(e,t){throw new Error(\"Method not implemented.\")}resolveLayout(e,t){throw new Error(\"Method not implemented.\")}initPlatform(...e){throw new Error(\"Method not implemented.\")}writeToken(e,t){return Promise.resolve(\"\")}retrievePort(e){throw new Error(\"Method not implemented.\")}getNextMessageId(){return this.getRandomId()}createChildContent(e){throw new Error(\"Method not implemented.\")}getWebWindow(e){throw new Error(\"Method not implemented.\")}getCurrentEntityIdentity(){throw new Error(\"Method not implemented.\")}getCurrentEntityType(){return\"external connection\"}raiseEvent(e,t){throw new Error(\"Method not implemented.\")}getUrl(){return location.href}getDefaultChannelOptions(){return{create:{},connect:{}}}getRtcPeer(){return new RTCPeerConnection}getWsConstructor(){return WebSocket}whenReady(){return Promise.resolve()}}Ho=Bo.BrowserEnvironment=Do;const Uo=e=>\"platform\"in e&&void 0!==e.platform;var Vo,zo;class Ko extends Ho{constructor(e){super(),this.connectConfig=e,Vo.set(this,void 0),zo.set(this,new W((async()=>Promise.resolve().then((function(){return require(\"./main-b14f67c9.js\")}))))),Uo(e)&&this.validatePlatformOptions(e)}getAdapterVersionSync(){return\"0.39.21\"}validatePlatformOptions({platform:e}){if(!(\"layoutSnapshot\"in e))throw new Error(\"Platform options are missing layoutSnapshot. Please provide a layoutSnapshot in the platform options.\");if(\"windows\"in e||\"windows\"in e.layoutSnapshot)throw new Error(\"It appears you tried to call connect() with a snapshot object from an OpenFin desktop environment. Note that connect() expects to be called with a platform property with this structure: { platform: { layoutSnapshot } }. To get a layoutSnapshot of the expected structure, use fin.Platform.Layout.getCurrentLayoutManagerSync().getLayoutSnapshot() in v34+ in your desktop environment.\");const{layouts:t}=e.layoutSnapshot;Object.entries(t).map((([e,t])=>{if(\"object\"!=typeof t||null===t)throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must be an object.`);if(!(\"content\"in t))throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must contain a 'content' property.`)}))}async getInteropInfo(e){return{...{contextGroups:void 0,logging:{beforeAction:{enabled:!1},afterAction:{enabled:!1}}},fdc3Version:void 0,fdc3Info:{providerVersion:\"0.39.21\",provider:\"OpenFin Web\"}}}layoutAllowedInContext(e){return!0}async initLayoutManager(e,t,n){if(Lo(this,Vo,\"f\"))throw new Error(\"Layout already initialized.\");if(!Uo(this.connectConfig))throw new Error(\"Platform options are missing from connection config.\");const{WebLayoutEntryPoint:i}=await Lo(this,zo,\"f\").getValue();return To(this,Vo,new i(this.connectConfig),\"f\"),await Lo(this,Vo,\"f\").initLayoutManager(e,t,n)}async applyLayoutSnapshot(e,t,n){Lo(this,Vo,\"f\")?.applyLayoutSnapshot(e,t,n)}async createLayout(e,t){return Lo(this,Vo,\"f\")?.createLayout(e,t)}async destroyLayout(e,t){return Lo(this,Vo,\"f\")?.destroyLayout(e,t)}async getViewWindowIdentity(e,t){return Promise.resolve({uuid:t.uuid,name:t.uuid})}}Vo=new WeakMap,zo=new WeakMap;const qo=()=>{const e=((e,t)=>{const n=new RegExp(`^${t}<(?.*)>$`).exec(e)?.groups?.meta;if(n)try{return JSON.parse(atob(n))}catch(e){throw new Error(`Failed to decode JSON from ${n}.`)}})(window.name,\"of-frame\");if(e)try{const{name:t,uuid:n,brokerUrl:i,providerId:r,contextGroup:o}=e;return Fo(i,\"brokerUrl\"),Fo(n,\"uuid\"),Fo(t,\"name\"),{identity:{name:t,uuid:n},brokerUrl:i,interopConfig:{providerId:r,currentContextGroup:o}}}catch(e){throw new Error(`Unexpected error occurred when inferring platform information: ${e.stack}`)}},Jo=()=>{const e=r.v4();return{uuid:e,name:e}},Yo=async e=>{if(\"enabled\"===e.connectionInheritance){const t=await(async e=>{const t=qo();if(t){const{validateOptions:n=(()=>!0)}=e,{identity:i,...r}=t;if(!await n(r))throw new Error(\"Parent options were rejected by validateOptions.\");return t}})(e);if(t)return t}if(!e.options){const t=\"enabled\"===e.connectionInheritance?\"Broker URL was not specified nor provided by a platform container.\":\"Connection inheritance is disabled but no options were provided.\";throw new Error(t)}return{...e.options,identity:Jo()}};exports.__classPrivateFieldGet=Lo,exports.__classPrivateFieldSet=To,exports.apiExposer=Gn,exports.commonjsGlobal=s,exports.connect=async t=>{try{Ro.log(\"Establishing connection\",t);const{brokerUrl:n,identity:i,timeout:r,interopConfig:s}=await Yo(t),{workerPort:a,iframeBrokerPort:c}=await(async(e,t,n)=>{const{origin:i}=new URL(e),r=document.createElement(\"IFRAME\");let s;r.style.display=\"none\";try{return await new Promise(((a,c)=>{const d=e=>{if(e.source===r.contentWindow&&e.data?.topic===`ack-${jo}`){if(e.origin!==i)c(new Error(`Broker redirected to unexpected origin ${e.origin}, expected ${i}.`));else if(e.data.success){const[t,n]=e.ports;a({iframeBrokerPort:t,workerPort:n})}else c(new m(e.data));window.removeEventListener(\"message\",d),clearTimeout(s)}};window.addEventListener(\"message\",d),ko.log(`Connecting to broker ${e}`),r.setAttribute(\"src\",e),r.setAttribute(\"name\",o(t,\"of-broker\")),document.body.appendChild(r),ko.log(\"Iframe loaded, awaiting init message from iframe\"),n&&(s=setTimeout((()=>{window.removeEventListener(\"message\",d),document.body.removeChild(r),c(new Error(\"Worker did not initialize in time\"))}),n))}))}catch(e){throw new Error(`Failed to initialise Fin Web Client. ${e.message}`,{cause:e})}})(n,i,r);Ro.log(\"Successfully established connection to shared worker\");const d={entityType:\"external connection\",...i};a.start(),c.start();const h=((t,n,i)=>{const r=$o(n),o=new Ko(t),s=new Io(r,o,i);return s.connectSync(),window.Buffer=e.Buffer,new Wr(s)})(t,a,d);return s?.providerId&&(h.me.interop=h.Interop.connectSync(s.providerId),s?.currentContextGroup&&h.me.interop.joinContextGroup(s.currentContextGroup).catch((e=>{console.warn(`Error joining specified context group: ${s?.currentContextGroup}, continuing`,e)}))),{...h,me:{...h.me,identity:{uuid:h.me.uuid,name:h.me.name}}}}catch(e){throw new Error(`An error occured during web-interop connection: ${e.message}`)}},exports.decorators=Nn,exports.encodeOptions=o,exports.layout_constants=ai,exports.lazy=G;\n","\"use strict\";var t=require(\"./main-8cad4070.js\"),e=require(\"uuid\");require(\"buffer/\"),require(\"events\"),require(\"lodash/cloneDeep\"),require(\"lodash/isEqual\");var i={},n={};Object.defineProperty(n,\"__esModule\",{value:!0}),n.mapValuesAsync=n.mapEntriesAsync=void 0;const o=(t,[e,i])=>({...t,[e]:i});async function s(t,e){return(await Promise.all(e.map((async([e,i])=>[e,await t(i,e)])))).reduce(o,{})}n.mapEntriesAsync=s,n.mapValuesAsync=async function(t,e){let i;return i=e instanceof Map?[...e.entries()]:Object.entries(e),s(t,i)};var r,a,l,h,d=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldSet||function(t,e,i,n,o){if(\"m\"===n)throw new TypeError(\"Private method is not writable\");if(\"a\"===n&&!o)throw new TypeError(\"Private accessor was defined without a setter\");if(\"function\"==typeof e?t!==e||!o:!e.has(t))throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");return\"a\"===n?o.call(t,i):o?o.value=i:e.set(t,i),i},c=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldGet||function(t,e,i,n){if(\"a\"===i&&!n)throw new TypeError(\"Private accessor was defined without a getter\");if(\"function\"==typeof e?t!==e||!n:!e.has(t))throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");return\"m\"===i?n:\"a\"===i?n.call(t):n?n.value:e.get(t)};Object.defineProperty(i,\"__esModule\",{value:!0});var m=i.DefaultLayoutManager=void 0;const u=n;class p{constructor(t){a.set(this,void 0),l.set(this,new Map),d(this,a,t,\"f\")}size(){return c(this,l,\"f\").size}async applyLayoutSnapshot({layouts:t}){if(Object.keys(t).length>1)throw new Error(\"[LayoutManager] Tried to call applyLayoutSnapshot with more than 1 layout. When implementing multiple layouts via overridden LayoutManager class, you must override and fully implement the applyLayoutSnapshot method without calling super.applyLayoutSnapshot().\");const[[e,i]]=Object.entries(t);await p.createLayout(this,{layoutName:e,layout:i})}async showLayout({layoutName:t}){}async getLayoutSnapshot(){return{layouts:await(0,u.mapValuesAsync)((t=>t.getFrameSnapshot()),c(this,l,\"f\"))}}async removeLayout({layoutName:t}){}getLayoutIdentityForView(t){const e=[...c(this,l,\"f\").values()].find((e=>e.getCurrentViews().some((e=>e.name===t.name&&e.uuid===t.uuid))));return e?.identity??void 0}isLayoutVisible({layoutName:t}){return c(p,r,\"m\",h).call(p,this,t).isVisible()}resolveLayoutIdentity(t){if(t&&\"layoutName\"in t)return t;const e=[...c(this,l,\"f\").values()];if(1===e.length)return e[0].identity;const i=e.find((t=>t.isVisible()));return i?.identity??void 0}static async resolveLayout(t,e){const i=t.resolveLayoutIdentity(e);if(void 0===i||!(\"layoutName\"in i))throw new Error(\"[layout-manager] resolveLayout: Could not resolve the layout identity. Make sure you include 'layoutName' in the identity object.\");return c(p,r,\"m\",h).call(p,t,i.layoutName)}static async handleSharedView(t,e,i){await(0,u.mapValuesAsync)((async t=>{if(t.identity.layoutName!==e.layoutName){const e=t.getCurrentViews().find((t=>t.name===i.name));e&&await t.onViewDetached({viewIdentity:e,target:null}).catch(console.error)}}),c(t,l,\"f\"))}static async handleLastViewRemoved(t,e){await t.removeLayout(e),await c(t,a,\"f\").handleLastViewRemoved(t)}static async destroyLayout(t,{layoutName:e}){await c(p,r,\"m\",h).call(p,t,e).destroy(),c(t,l,\"f\").delete(e)}static async createLayout(t,e){const{layoutName:i}=e;if(c(t,l,\"f\").has(i))throw new Error(`Layout name ${i} already exists`);await c(t,a,\"f\").createLayout(e,t)}static registerLayout(t,e,i){c(t,l,\"f\").set(e,i)}static getAllLayouts(t){return[...c(t,l,\"f\").values()]}static setInitialSnapshot(t,e){c(t,a,\"f\").setInitialSnapshot(e)}static createClosedConstructor(...t){return class extends p{constructor(){super(...t)}}}}m=i.DefaultLayoutManager=p,r=p,a=new WeakMap,l=new WeakMap,h=function(t,e){const i=c(t,l,\"f\").get(e);if(!i)throw new Error(`[layout-manager] getLayoutByName: Could not locate layout with name '${e}'`);return i};var g={},f={},v={};Object.defineProperty(v,\"__esModule\",{value:!0}),v.ReversibleMap=void 0;v.ReversibleMap=class{constructor(){this.valueToKey=new Map,this.keyToValue=new Map,this.setUnique=(t,e)=>{if(this.hasKey(t)||this.hasValue(e))throw new Error(\"Key or value already in the map.\");this.keyToValue.set(t,e),this.valueToKey.set(e,t)},this.getKey=t=>{const e=this.valueToKey.get(t);if(!e)throw new Error(\"Value not found in the map.\");return e},this.deleteKey=t=>{const e=this.getValue(t);return this.keyToValue.delete(t),this.valueToKey.delete(e),e},this.deleteValue=t=>{const e=this.getKey(t);return this.keyToValue.delete(e),this.valueToKey.delete(t),e},this.hasKey=t=>this.keyToValue.has(t),this.hasValue=t=>this.valueToKey.has(t)}getValue(t){const e=this.keyToValue.get(t);if(!e)throw new Error(\"Key not found in the map.\");return e}},Object.defineProperty(f,\"__esModule\",{value:!0});var _=f.LayoutContentCache=void 0;const y=t.lazy,C=v;class w{constructor(){this.contentItemCache=new C.ReversibleMap,this.contentItemCacheId=0,this.createCacheKey=()=>{const t=`entity-${this.contentItemCacheId.toString()}`;return this.contentItemCacheId+=1,t},this.hasKey=t=>this.contentItemCache.hasKey(t),this.getItemOrUndefined=t=>{try{return this.getContentItemOrThrow(t)}catch(t){return}},this.getContentItemOrThrow=(t,e)=>{if(!this.contentItemCache.hasKey(t))throw new Error(\"Layout component has been destroyed or detached from the current layout.\");const i=this.contentItemCache.getValue(t);if(e&&!e.includes(i.type))throw new Error(`Layout item is not the expected type. Expected ${e.join(\", \")}, got ${i.type}.`);return i},this.getOrCreateEntityId=t=>{if(this.contentItemCache.hasValue(t))return this.contentItemCache.getKey(t);t.onDestroyed((()=>{this.contentItemCache.deleteValue(t)}));const e=this.createCacheKey();return this.contentItemCache.setUnique(e,t),e}}static getSingleInstance(){return w.singleton.getValue()}}_=f.LayoutContentCache=w,w.singleton=new y.Lazy((()=>new w));var I={},b={};!function(t){Object.defineProperty(t,\"__esModule\",{value:!0}),t.getAdjacentStacks=t.doShareEdge=t.getAdjacentItem=void 0;t.getAdjacentItem=(e,i)=>{const{parent:n}=e;if(e.isRoot()||!n)return;const o=[\"top\",\"bottom\"].includes(i)?\"column\":\"row\",s=[\"top\",\"left\"].includes(i)?-1:1;if(n.type===o){const t=n.contentItems.indexOf(e)+s;if(t>=0&&t{const n=t.getBounds(),o=e.getBounds();if(!n||!o)return!1;if([\"top\",\"bottom\"].includes(i)){return!(n.righto.right)}return!(n.bottomo.bottom)};t.getAdjacentStacks=(e,i)=>{const n=[\"top\",\"bottom\"].includes(i)?\"row\":\"column\",o=s=>\"stack\"===s.type?(0,t.doShareEdge)(e,s,i)?[s]:[]:\"root\"===s.type||\"ground\"===s.type?[]:s.type===n?s.contentItems.map((t=>o(t))).flat():s.type!==n?[\"top\",\"right\"].includes(i)?o(s.contentItems[s.contentItems.length-1]):o(s.contentItems[0]):[],s=(0,t.getAdjacentItem)(e,i);return s?o(s):[]}}(b);var S=t.commonjsGlobal&&t.commonjsGlobal.__decorate||function(t,e,i,n){var o,s=arguments.length,r=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if(\"object\"==typeof Reflect&&\"function\"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(s<3?o(r):s>3?o(e,i,r):o(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};Object.defineProperty(I,\"__esModule\",{value:!0}),I.LayoutEntitiesController=void 0;const E=t.decorators,x=b,L=i;class z{constructor(t,e,i){this.wire=t,this.layoutManager=e,this.layoutContentCache=i,this.analytics=t=>{this.wire.sendAction(`layout-controller-${t}`).catch((()=>{}))},this.getLayoutIdentityForViewOrThrow=async t=>{const e=this.layoutManager.getLayoutIdentityForView(t);if(!e)throw new Error(`View identity ${t.name} is not attached to any layouts.`);return e},this.getRoot=async t=>{this.analytics(\"get-root\");const e=(await this.getLayout(t)).getRoot();return{type:e.type,entityId:this.layoutContentCache.getOrCreateEntityId(e)}},this.getStackByView=async t=>{this.analytics(\"get-stack-by-view\");const e=await this.getLayoutIdentityForViewOrThrow(t),i=(await this.getLayout(e)).getStackByView(t);if(\"stack\"===i?.type)return{entityId:this.layoutContentCache.getOrCreateEntityId(i),type:\"stack\"}},this.getStackViews=t=>{this.analytics(\"get-stack-views\");return this.layoutContentCache.getContentItemOrThrow(t,[\"stack\"]).contentItems.map((t=>({name:t.viewName,uuid:this.wire.me.uuid})))},this.isRoot=t=>{this.analytics(\"is-root\");return this.layoutContentCache.getContentItemOrThrow(t).isRoot()},this.exists=t=>(this.analytics(\"exists\"),this.layoutContentCache.hasKey(t)),this.addViewToStack=async(t,e,{index:i}={index:0})=>{this.analytics(\"add-view-to-stack\");const n=this.layoutContentCache.getContentItemOrThrow(t);if(i&&i>n.contentItems.length+1)throw new Error(`Index '${i}' out of range, please exclude the index or specify a number between 0 and ${n.contentItems.length}`);const o={id:t,index:i},{identity:s}=await n.layout.platformCreateView(e,{location:o});return s},this.findViewInStack=(t,e)=>t.contentItems.find((t=>t.viewName===e.name)),this.removeViewFromStack=async(t,e)=>{this.analytics(\"remove-view-from-stack\");const i=this.layoutContentCache.getContentItemOrThrow(t,[\"stack\"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to remove a view ('${e.name}') which does not belong to the stack.`);await n.layout.platformCloseView(e)},this.createAdjacentStack=async(t,e,{position:i=\"right\"}={})=>{if(this.analytics(\"create-adjacent-stack\"),!Array.isArray(e)||0===e.length)throw new Error('The parameter \"views\" must be an array with at least 1 element.');if(![\"top\",\"bottom\",\"left\",\"right\"].includes(i))throw new Error(`Invalid position '${i}' specified.`);const n=this.layoutContentCache.getContentItemOrThrow(t).createAdjacentStack({position:i}),o=this.layoutContentCache.getOrCreateEntityId(n);return await Promise.all(e.reverse().map((t=>this.addViewToStack(o,t)))),o},this.getAdjacentStacks=async({targetId:t,edge:e})=>{this.analytics(\"get-adjacent-stacks\");const i=this.layoutContentCache.getContentItemOrThrow(t);return(0,x.getAdjacentStacks)(i,e).map((t=>({entityId:this.layoutContentCache.getOrCreateEntityId(t)})))},this.setStackActiveView=async(t,e)=>{this.analytics(\"set-stack-active-view\");const i=this.layoutContentCache.getContentItemOrThrow(t,[\"stack\"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to set a view ('${e.name}') as active when it does not belong to the stack.`);i.setActiveContentItem(n,!0)}}async getLayout(t){const e=await L.DefaultLayoutManager.resolveLayout(this.layoutManager,t);if(!e)throw new Error(`Could not resolve target layout identity ${JSON.stringify(t)}`);return e}getContent(t){this.analytics(\"get-content\");return this.layoutContentCache.getContentItemOrThrow(t,[\"column\",\"row\"]).contentItems.map((t=>({type:t.type,entityId:this.layoutContentCache.getOrCreateEntityId(t)})))}getParent(t){this.analytics(\"get-parent\");const e=this.layoutContentCache.getContentItemOrThrow(t);if(!e.isRoot())return e.parent?.contentItems.includes(e)?{type:e.parent.type,entityId:this.layoutContentCache.getOrCreateEntityId(e.parent)}:void 0}}S([(0,E.expose)()],z.prototype,\"getLayoutIdentityForViewOrThrow\",void 0),S([(0,E.expose)()],z.prototype,\"getRoot\",void 0),S([(0,E.expose)()],z.prototype,\"getStackByView\",void 0),S([(0,E.expose)()],z.prototype,\"getStackViews\",void 0),S([(0,E.expose)()],z.prototype,\"getContent\",null),S([(0,E.expose)()],z.prototype,\"getParent\",null),S([(0,E.expose)()],z.prototype,\"isRoot\",void 0),S([(0,E.expose)()],z.prototype,\"exists\",void 0),S([(0,E.expose)()],z.prototype,\"addViewToStack\",void 0),S([(0,E.expose)()],z.prototype,\"removeViewFromStack\",void 0),S([(0,E.expose)()],z.prototype,\"createAdjacentStack\",void 0),S([(0,E.expose)()],z.prototype,\"getAdjacentStacks\",void 0),S([(0,E.expose)()],z.prototype,\"setStackActiveView\",void 0),I.LayoutEntitiesController=z,Object.defineProperty(g,\"__esModule\",{value:!0});var M=g.initLayoutEndpoints=void 0;const P=t.apiExposer,T=t.layout_constants,A=f,k=I,D=i;M=g.initLayoutEndpoints=async function(t,e){const i=t.getFin(),n=await i.Platform.getCurrentSync().getClient(),o=new P.ChannelsExposer(n);await new P.ApiExposer(o).exposeInstance(new k.LayoutEntitiesController(t,e,A.LayoutContentCache.getSingleInstance()),{id:T.LAYOUT_CONTROLLER_ID}),await async function(t,e){const i=t=>async i=>{const n=await D.DefaultLayoutManager.resolveLayout(e,i.target);if(!n)throw new Error(`Could not resolve the layout target from payload ${JSON.stringify(i)}`);return t(n,i)},n=(e,n)=>{t.register(e,i(n))},o=(t,e)=>{n(t,e)};n(\"replace-view\",((t,e)=>t.replaceView(e))),n(\"replace-layout\",((t,{layout:e})=>t.replaceLayout(e))),n(\"add-view\",((t,e)=>t.insertView(e))),o(\"layout-add-view\",((t,{viewOptions:e,location:i,targetView:n})=>t.platformCreateView(e,{location:i,targetView:n}))),n(\"close-view\",((t,e)=>t.cleanupView(e.viewIdentity))),o(\"layout-close-view\",((t,e)=>t.platformCloseView(e.viewIdentity))),n(\"apply-preset-layout\",((t,e)=>t.applyPreset(e))),n(\"get-layout-views\",(t=>t.getCurrentViews())),n(\"get-frame-snapshot\",(t=>t.getFrameSnapshot())),n(\"is-visible\",(t=>t.isVisible())),n(\"destroy\",(t=>t.destroy())),t.register(\"get-layout-snapshot\",(()=>e.getLayoutSnapshot()))}(n,e)};var R={};Object.defineProperty(R,\"__esModule\",{value:!0});var U=R.BaseLayout=void 0;U=R.BaseLayout=class{};var O={};Object.defineProperty(O,\"__esModule\",{value:!0});var V=O.DOMEmitter=void 0;V=O.DOMEmitter=class{constructor(t){this.container=t}dispatchLocalEvent(t,e){const i={...e,type:t,tabSelector:`tab-${e.name}`,containerSelector:`container-${e.name}`,topic:\"openfin-DOM-event\"};this.container.dispatchEvent(new CustomEvent(t,{detail:i}))}};var B={};Object.defineProperty(B,\"__esModule\",{value:!0});var H=B.mapLayoutContentItemsImmutableSync=B.mapLayoutContentItemsImmutable=W=B.isVisible=void 0;var W=B.isVisible=t=>(0!==t.offsetWidth||0!==t.offsetHeight)&&\"hidden\"!==window.getComputedStyle(t).visibility&&t.offsetTop>=0&&t.offsetLeft>=0&&t.offsetTop<=window.innerHeight&&t.offsetLeft<=window.innerWidth;const F=t=>\"type\"in t&&\"component\"===t.type;B.mapLayoutContentItemsImmutable=async function t(e,i){return F(i)?e(i):{...i,content:await Promise.all(i.content?.map((i=>t(e,i))))}},H=B.mapLayoutContentItemsImmutableSync=function t(e,i){return F(i)?e(i):{...i,content:i.content?.map((i=>t(e,i)))}};class N extends Error{constructor(t,e){super(e),this.type=t}}class G extends N{constructor(t,e){super(\"Configuration\",t),this.node=e}}class j extends N{constructor(t){super(\"PopoutBlocked\",t)}}class $ extends N{constructor(t){super(\"API\",t)}}class Z extends N{constructor(t){super(\"Bind\",t)}}class q extends Error{constructor(t,e,i){super(`${t}: ${e}${void 0===i?\"\":\": \"+i}`)}}class X extends q{constructor(t,e){super(\"Assert\",t,e)}}class Y extends q{constructor(t,e,i){super(\"UnreachableCase\",t,`${e}${void 0===i?\"\":\": \"+i}`)}}class K extends q{constructor(t,e){super(\"UnexpectedNull\",t,e)}}class J extends q{constructor(t,e){super(\"UnexpectedUndefined\",t,e)}}var Q;!function(t){let e=!1;const i={PopoutCannotBeCreatedWithGroundItemConfig:{id:0,default:\"Popout cannot be created with ground ItemConfig\"},PleaseRegisterAConstructorFunction:{id:1,default:\"Please register a constructor function\"},ComponentTypeNotRegisteredAndBindComponentEventHandlerNotAssigned:{id:2,default:\"Component type not registered and BindComponentEvent handler not assigned\"},ComponentIsAlreadyRegistered:{id:3,default:\"Component is already registered\"},ComponentIsNotVirtuable:{id:4,default:\"Component is not virtuable. Requires rootHtmlElement field/getter\"},VirtualComponentDoesNotHaveRootHtmlElement:{id:5,default:'Virtual component does not have getter \"rootHtmlElement\"'},ItemConfigIsNotTypeComponent:{id:6,default:\"ItemConfig is not of type component\"},InvalidNumberPartInSizeString:{id:7,default:\"Invalid number part in size string\"},UnknownUnitInSizeString:{id:8,default:\"Unknown unit in size string\"},UnsupportedUnitInSizeString:{id:9,default:\"Unsupported unit in size string\"}};t.idCount=Object.keys(i).length;const n=Object.values(i);t.checkInitialise=function(){if(!e)for(let e=0;e=\"0\"&&t<=\"9\"}function Tt(t,e){const i=zt(e);t.style.width=i}function At(t,e){const i=zt(e);t.style.height=i}function kt(t){return{width:t.offsetWidth,height:t.offsetHeight}}function Dt(t,e){t.style.display=e?\"\":\"none\"}function Rt(t,e){if(void 0!==e)for(const i in e)if(e.hasOwnProperty(i)){const n=e[i],o=t[i];t[i]=Ut(o,n)}return t}function Ut(t,e){if(\"object\"!=typeof e)return e;if(Array.isArray(e)){const t=e.length,i=new Array(t);for(let n=0;n36)throw new Error(\"Too many keys in config minifier map\")},t.translateObject=n}(dt||(dt={})),function(t){t.defaults={type:at.ground,content:[],size:1,sizeUnit:ht.Fractional,minSize:void 0,minSizeUnit:ht.Pixel,id:\"\",isClosable:!0},t.createCopy=function(t,e){switch(t.type){case at.ground:case at.row:case at.column:return gt.createCopy(t,e);case at.stack:return ut.createCopy(t,e);case at.component:return pt.createCopy(t);default:throw new Y(\"CICC91354\",t.type,\"Invalid Config Item type specified\")}},t.createDefault=function(t){switch(t){case at.ground:throw new X(\"CICCDR91562\");case at.row:case at.column:return gt.createDefault(t);case at.stack:return ut.createDefault();case at.component:return pt.createDefault();default:throw new Y(\"CICCDD91563\",t,\"Invalid Config Item type specified\")}},t.isComponentItem=function(t){return t.type===at.component},t.isStackItem=function(t){return t.type===at.stack},t.isGroundItem=function(t){return t.type===at.ground}}(ct||(ct={})),function(t){t.defaultMaximised=!1,function(t){t.createCopy=function(t,e){return void 0===t?void 0:{show:null!=e?e:t.show,popout:t.popout,close:t.close,maximise:t.maximise,minimise:t.minimise,tabDropdown:t.tabDropdown}}}(t.Header||(t.Header={}))}(mt||(mt={})),function(t){function e(t){const e=t.length,i=new Array(e);for(let n=0;n\"__glMaximised\"===t));t>0&&(o=!0,n=n.splice(t,1)),e=n.length>0?n[0]:ct.defaults.id}else e=n;return i=void 0!==t.maximised?t.maximised:o,{id:e,maximised:i}}}(wt||(wt={})),function(t){function e(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0;return{resolved:!0,root:Et.resolve(i),openPopouts:t.resolveOpenPopouts(e.openPopouts),dimensions:t.Dimensions.resolve(e.dimensions),settings:t.Settings.resolve(e.settings),header:t.Header.resolve(e.header,e.settings,e.labels)}}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:Lt.fromResolvedArray(e.openPopouts),settings:_t.Settings.createCopy(e.settings),dimensions:t.Dimensions.fromResolved(e.dimensions),header:_t.Header.createCopy(e.header)}},t.isResolved=function(t){const e=t;return void 0!==e.resolved&&!0===e.resolved},t.resolveOpenPopouts=function(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0,{root:Et.resolve(o),openPopouts:xt.resolveOpenPopouts(e.openPopouts),dimensions:xt.Dimensions.resolve(e.dimensions),settings:xt.Settings.resolve(e.settings),header:xt.Header.resolve(e.header,e.settings,e.labels),parentId:null!==(i=e.parentId)&&void 0!==i?i:null,indexInParent:null!==(n=e.indexInParent)&&void 0!==n?n:null,window:t.Window.resolve(e.window,e.dimensions),resolved:!0}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:i(e.openPopouts),dimensions:xt.Dimensions.fromResolved(e.dimensions),settings:_t.Settings.createCopy(e.settings),header:_t.Header.createCopy(e.header),parentId:e.parentId,indexInParent:e.indexInParent,window:t.Window.fromResolved(e.window)}},t.fromResolvedArray=i}(Lt||(Lt={}));class Wt{constructor(){this._allEventSubscriptions=[],this._subscriptionsMap=new Map,this.unbind=this.removeEventListener,this.trigger=this.emit}tryBubbleEvent(t,e){}emit(t,...e){let i=this._subscriptionsMap.get(t);if(void 0!==i){i=i.slice();for(let t=0;t0){const n=e.slice();n.unshift(t);const o=this._allEventSubscriptions.slice();for(let t=0;t0?n.contentItems[0]:n,e=0);const o=this._layoutManager.createAndInitContentItem(i,t);t.addChild(o,e),this._layoutManager.layoutConfig.settings.popInOnClose?this._onClose():this.close()}createWindow(){const t=this.createUrl(),e=Math.floor(1e6*Math.random()).toString(36),i=this.serializeWindowFeatures({width:this._initialWindowSize.width,height:this._initialWindowSize.height,innerWidth:this._initialWindowSize.width,innerHeight:this._initialWindowSize.height,menubar:\"no\",toolbar:\"no\",location:\"no\",personalbar:\"no\",resizable:\"yes\",scrollbars:\"no\",status:\"no\"});if(this._popoutWindow=globalThis.open(t,e,i),this._popoutWindow)this._popoutWindow.addEventListener(\"load\",(()=>this.positionWindow()),{passive:!0}),this._popoutWindow.addEventListener(\"beforeunload\",(()=>{this._layoutManager.layoutConfig.settings.popInOnClose?this.popIn():this._onClose()}),{passive:!0}),this._checkReadyInterval=setInterval((()=>this.checkReady()),10);else if(!0===this._layoutManager.layoutConfig.settings.blockedPopoutsThrowError){throw new j(\"Popout blocked\")}}checkReady(){if(null===this._popoutWindow)throw new K(\"BPCR01844\");this._popoutWindow.__glInstance&&this._popoutWindow.__glInstance.isInitialised&&(this.onInitialised(),void 0!==this._checkReadyInterval&&(clearInterval(this._checkReadyInterval),this._checkReadyInterval=void 0))}serializeWindowFeatures(t){const e=[];for(const i in t)e.push(i+\"=\"+t[i].toString());return e.join(\",\")}createUrl(){const t=\"gl-window-config-\"+Ot(),e=_t.minifyConfig(this._config);try{localStorage.setItem(t,JSON.stringify(e))}catch(t){throw new Error(\"Error while writing to localStorage \"+function(t){return t instanceof Error?t.message:\"string\"==typeof t?t:\"Unknown Error\"}(t))}const i=new URL(location.href);return i.searchParams.set(\"gl-window\",t),i.toString()}positionWindow(){if(null===this._popoutWindow)throw new Error(\"BrowserPopout.positionWindow: null popoutWindow\");this._popoutWindow.moveTo(this._initialWindowSize.left,this._initialWindowSize.top),this._popoutWindow.focus()}onInitialised(){this._isInitialised=!0,this.getGlInstance().on(\"popIn\",(()=>this.popIn())),this.emit(\"initialised\")}_onClose(){setTimeout((()=>this.emit(\"closed\")),50)}}class Gt extends Wt{constructor(t,e,i,n){super(),this.layoutManager=t,this._parent=i,this._element=n,this._popInParentIds=[],this._type=e.type,this._id=e.id,this._isInitialised=!1,this.isGround=!1,this.isRow=!1,this.isColumn=!1,this.isStack=!1,this.isComponent=!1,this.size=e.size,this.sizeUnit=e.sizeUnit,this.minSize=e.minSize,this.minSizeUnit=e.minSizeUnit,this._isClosable=e.isClosable,this._pendingEventPropagations={},this._throttledEvents=[\"stateChanged\"],this._contentItems=this.createContentItems(e.content)}get type(){return this._type}get id(){return this._id}set id(t){this._id=t}get popInParentIds(){return this._popInParentIds}get parent(){return this._parent}get contentItems(){return this._contentItems}get isClosable(){return this._isClosable}get element(){return this._element}get isInitialised(){return this._isInitialised}static isStack(t){return t.isStack}static isComponentItem(t){return t.isComponent}static isComponentParentableItem(t){return t.isStack||t.isGround}removeChild(t,e=!1){const i=this._contentItems.indexOf(t);if(-1===i)throw new Error(\"Can't remove child item. Unknown content item\");if(e||this._contentItems[i].destroy(),this._contentItems.splice(i,1),this._contentItems.length>0)this.updateSize(!1);else if(!this.isGround&&!0===this._isClosable){if(null===this._parent)throw new K(\"CIUC00874\");this._parent.removeChild(this)}}addChild(t,e,i){return null!=e||(e=this._contentItems.length),this._contentItems.splice(e,0,t),t.setParent(this),!0===this._isInitialised&&!1===t._isInitialised&&t.init(),e}replaceChild(t,e,i=!1){const n=this._contentItems.indexOf(t),o=t._element.parentNode;if(-1===n)throw new X(\"CIRCI23232\",\"Can't replace child. oldChild is not child of this\");if(null===o)throw new K(\"CIRCP23232\");if(o.replaceChild(e._element,t._element),!0===i&&(t._parent=null,t.destroy()),this._contentItems[n]=e,e.setParent(this),e.size=t.size,e.sizeUnit=t.sizeUnit,e.minSize=t.minSize,e.minSizeUnit=t.minSizeUnit,null===e._parent)throw new K(\"CIRCNC45699\");!0===e._parent._isInitialised&&!1===e._isInitialised&&e.init(),this.updateSize(!1)}remove(){if(null===this._parent)throw new K(\"CIR11110\");this._parent.removeChild(this)}popout(){const t=Ot(),e=this.layoutManager.createPopoutFromContentItem(this,void 0,t,void 0);return this.emitBaseBubblingEvent(\"stateChanged\"),e}calculateConfigContent(){const t=this._contentItems,e=t.length,i=new Array(e);for(let n=0;nthis.propagateEventToLayoutManager(t,e))))}propagateEventToLayoutManager(t,e){this._pendingEventPropagations[t]=!1,this.layoutManager.emitUnknown(t,e)}}class jt extends Gt{constructor(t,e,i){super(t,e,i,document.createElement(\"div\")),this._parentItem=i,this._focused=!1,this.isComponent=!0,this._reorderEnabled=e.reorderEnabled,this.applyUpdatableConfig(e),this._initialWantMaximise=e.maximised;const n=document.createElement(\"div\");n.classList.add(\"lm_content\"),this.element.appendChild(n),this._container=new Ft(e,this,t,n,(t=>this.handleUpdateItemConfigEvent(t)),(()=>this.show()),(()=>this.hide()),(t=>this.focus(t)),(t=>this.blur(t)))}get componentName(){return this._container.componentType}get componentType(){return this._container.componentType}get reorderEnabled(){return this._reorderEnabled}get initialWantMaximise(){return this._initialWantMaximise}get component(){return this._container.component}get container(){return this._container}get parentItem(){return this._parentItem}get headerConfig(){return this._headerConfig}get title(){return this._title}get tab(){return this._tab}get focused(){return this._focused}destroy(){this._container.destroy(),super.destroy()}applyUpdatableConfig(t){this.setTitle(t.title),this._headerConfig=t.header}toConfig(){const t=this._container.stateRequestEvent,e=void 0===t?this._container.state:t();return{type:at.component,content:[],size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,maximised:!1,isClosable:this.isClosable,reorderEnabled:this._reorderEnabled,title:this._title,header:mt.Header.createCopy(this._headerConfig),componentType:pt.copyComponentType(this.componentType),componentState:e}}close(){if(null===this.parent)throw new K(\"CIC68883\");this.parent.removeChild(this,!1)}enterDragMode(t,e){Tt(this.element,t),At(this.element,e),this._container.enterDragMode(t,e)}exitDragMode(){this._container.exitDragMode()}enterStackMaximised(){this._container.enterStackMaximised()}exitStackMaximised(){this._container.exitStackMaximised()}drag(){this._container.drag()}updateSize(t){this.updateNodeSize(t)}init(){this.updateNodeSize(!1),super.init(),this._container.emit(\"open\"),this.initContentItems()}setTitle(t){this._title=t,this.emit(\"titleChanged\",t),this.emit(\"stateChanged\")}setTab(t){this._tab=t,this.emit(\"tab\",t),this._container.setTab(t)}hide(){super.hide(),this._container.setVisibility(!1)}show(){super.show(),this._container.setVisibility(!0)}focus(t=!1){this.parentItem.setActiveComponentItem(this,!0,t)}setFocused(t){this._focused=!0,this.tab.setFocused(),t||this.emitBaseBubblingEvent(\"focus\")}blur(t=!1){this._focused&&this.layoutManager.setFocusedComponentItem(void 0,t)}setBlurred(t){this._focused=!1,this.tab.setBlurred(),t||this.emitBaseBubblingEvent(\"blur\")}setParent(t){this._parentItem=t,super.setParent(t)}handleUpdateItemConfigEvent(t){this.applyUpdatableConfig(t)}updateNodeSize(t){if(\"none\"!==this.element.style.display){const{width:e,height:i}=kt(this.element);this._container.setSizeToNodeSize(e,i,t)}}}class $t extends Gt{constructor(){super(...arguments),this._focused=!1}get focused(){return this._focused}setFocusedValue(t){this._focused=t}}class Zt extends Wt{constructor(t,e){super(),this._eElement=t,this._pointerTracking=!1,this._pointerDownEventListener=t=>this.onPointerDown(t),this._pointerMoveEventListener=t=>this.onPointerMove(t),this._pointerUpEventListener=t=>this.onPointerUp(t),this._timeout=void 0,this._allowableTargets=[t,...e],this._oDocument=document,this._eBody=document.body,this._nDelay=1800,this._nDistance=10,this._nX=0,this._nY=0,this._nOriginalX=0,this._nOriginalY=0,this._dragging=!1,this._eElement.addEventListener(\"pointerdown\",this._pointerDownEventListener,{passive:!0})}destroy(){this.checkRemovePointerTrackingEventListeners(),this._eElement.removeEventListener(\"pointerdown\",this._pointerDownEventListener)}cancelDrag(){this.processDragStop(void 0)}onPointerDown(t){if(this._allowableTargets.includes(t.target)&&t.isPrimary){const e=this.getPointerCoordinates(t);this.processPointerDown(e)}}processPointerDown(t){this._nOriginalX=t.x,this._nOriginalY=t.y,this._oDocument.addEventListener(\"pointermove\",this._pointerMoveEventListener),this._oDocument.addEventListener(\"pointerup\",this._pointerUpEventListener,{passive:!0}),this._pointerTracking=!0,this._timeout=setTimeout((()=>{try{this.startDrag()}catch(t){throw console.error(t),t}}),this._nDelay)}onPointerMove(t){this._pointerTracking&&(this.processDragMove(t),t.preventDefault())}processDragMove(t){this._nX=t.pageX-this._nOriginalX,this._nY=t.pageY-this._nOriginalY,!1===this._dragging&&(Math.abs(this._nX)>this._nDistance||Math.abs(this._nY)>this._nDistance)&&this.startDrag(),this._dragging&&this.emit(\"drag\",this._nX,this._nY,t)}onPointerUp(t){this.processDragStop(t)}processDragStop(t){var e;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this.checkRemovePointerTrackingEventListeners(),!0===this._dragging&&(this._eBody.classList.remove(\"lm_dragging\"),this._eElement.classList.remove(\"lm_dragging\"),null===(e=this._oDocument.querySelector(\"iframe\"))||void 0===e||e.style.setProperty(\"pointer-events\",\"\"),this._dragging=!1,this.emit(\"dragStop\",t))}checkRemovePointerTrackingEventListeners(){this._pointerTracking&&(this._oDocument.removeEventListener(\"pointermove\",this._pointerMoveEventListener),this._oDocument.removeEventListener(\"pointerup\",this._pointerUpEventListener),this._pointerTracking=!1)}startDrag(){var t;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this._dragging=!0,this._eBody.classList.add(\"lm_dragging\"),this._eElement.classList.add(\"lm_dragging\"),null===(t=this._oDocument.querySelector(\"iframe\"))||void 0===t||t.style.setProperty(\"pointer-events\",\"none\"),this.emit(\"dragStart\",this._nOriginalX,this._nOriginalY)}getPointerCoordinates(t){return{x:t.pageX,y:t.pageY}}}class qt{constructor(t,e,i){this._isVertical=t,this._size=e,this._grabSize=i0){const i=this.createSplitter(Math.max(0,e-1)).element;e>0?(this.contentItems[e-1].element.insertAdjacentElement(\"afterend\",i),i.insertAdjacentElement(\"afterend\",t.element)):(this.contentItems[0].element.insertAdjacentElement(\"beforebegin\",i),i.insertAdjacentElement(\"beforebegin\",t.element))}else this._childElementContainer.appendChild(t.element);super.addChild(t,e);const n=1/this.contentItems.length*100;if(!0===i)return this.emitBaseBubblingEvent(\"stateChanged\"),e;for(let e=0;e0&&(this.calculateRelativeSizes(),this.setAbsoluteSizes()),this.emitBaseBubblingEvent(\"stateChanged\"),this.emit(\"resize\")}setAbsoluteSizes(){const t=this.calculateAbsoluteSizes();for(let e=0;e0&&t.itemSizes[e]++,this._isColumn?(Tt(this.contentItems[e].element,t.crossAxisSize),At(this.contentItems[e].element,t.itemSizes[e])):(Tt(this.contentItems[e].element,t.itemSizes[e]),At(this.contentItems[e].element,t.crossAxisSize))}calculateAbsoluteSizes(){const t=(this.contentItems.length-1)*this._splitterSize,{width:e,height:i}=kt(this.element);let n,o;this._isColumn?(n=i-t,o=e):(n=e-t,o=i);let s=0;const r=[];for(let t=0;t0){const n=100-t;for(let t=0;t100&&e.length>0){for(let t=0;te)return;{const r=i/e;let a=i;for(let e=0;ethis.onSplitterDrag(e,t,i))),e.on(\"dragStop\",(()=>this.onSplitterDragStop(e))),e.on(\"dragStart\",(()=>this.onSplitterDragStart(e))),this._splitter.splice(t,0,e),e}getSplitItems(t){const e=this._splitter.indexOf(t);return{before:this.contentItems[e],after:this.contentItems[e+1]}}calculateContentItemMinSize(t){const e=t.minSize;if(void 0!==e){if(t.minSizeUnit===ht.Pixel)return e;throw new X(\"ROCGMD98831\",JSON.stringify(t))}{const t=this.layoutManager.layoutConfig.dimensions;return this._isColumn?t.defaultMinItemHeight:t.defaultMinItemWidth}}calculateContentItemsTotalMinSize(t){let e=0;for(const i of t)e+=this.calculateContentItemMinSize(i);return e}onSplitterDragStart(t){const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=this.calculateContentItemsTotalMinSize(e.before.contentItems),s=this.calculateContentItemsTotalMinSize(e.after.contentItems);this._splitterPosition=0,this._splitterMinPosition=-1*(i-o),this._splitterMaxPosition=n-s}onSplitterDrag(t,e,i){let n=this._isColumn?i:e;if(null===this._splitterMinPosition||null===this._splitterMaxPosition)throw new K(\"ROCOSD59226\");n=Math.max(n,this._splitterMinPosition),n=Math.min(n,this._splitterMaxPosition),this._splitterPosition=n;const o=zt(n);this._isColumn?t.element.style.top=o:t.element.style.left=o}onSplitterDragStop(t){if(null===this._splitterPosition)throw new K(\"ROCOSDS66932\");{const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=(this._splitterPosition+i)/(i+n),s=e.before.size+e.after.size;e.before.size=o*s,e.after.size=(1-o)*s,t.element.style.top=zt(0),t.element.style.left=zt(0),globalThis.requestAnimationFrame((()=>this.updateSize(!1)))}}}!function(t){t.getElementDimensionSize=function(t,e){return\"width\"===e?function(t){return t.offsetWidth}(t):function(t){return t.offsetHeight}(t)},t.setElementDimensionSize=function(t,e,i){return\"width\"===e?Tt(t,i):At(t,i)},t.createElement=function(t,e){const i=t.createElement(\"div\");return i.classList.add(\"lm_item\"),e?i.classList.add(\"lm_column\"):i.classList.add(\"lm_row\"),i}}(Xt||(Xt={}));class Yt extends $t{constructor(t,e,i){super(t,vt.create(e),null,Yt.createElement(document)),this.isGround=!0,this._childElementContainer=this.element,this._containerElement=i;let n=null;for(;;){const t=n?n.previousSibling:this._containerElement.lastChild;if(!(t instanceof Element&&t.classList.contains(\"lm_content\")))break;n=t}this._containerElement.insertBefore(this.element,n)}init(){if(!0!==this.isInitialised){this.updateNodeSize();for(let t=0;t0?this.contentItems[0]:this,n.isComponent)throw new Error(\"Cannot add item as child to ComponentItem\");{const t=this.layoutManager.createAndInitContentItem(i,n);return e=n.addChild(t,e),n===this?-1:e}}loadComponentAsRoot(t){this.clearRoot();const e=Ct.resolve(t,!1);if(e.maximised)throw new Error(\"Root Component cannot be maximised\");{const t=new jt(this.layoutManager,e,this);t.init(),this.addChild(t,0)}}addChild(t,e){if(this.contentItems.length>0)throw new Error(\"Ground node can only have a single child\");return this._childElementContainer.appendChild(t.element),e=super.addChild(t,e),this.updateSize(!1),this.emitBaseBubblingEvent(\"stateChanged\"),e}calculateConfigContent(){const t=this.contentItems,e=t.length,i=new Array(e);for(let n=0;n0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e)),this.updateContentItemsSize(!1))}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}createSideAreas(){const t=Yt.Area.oppositeSides,e=new Array(Object.keys(t).length);let i=0;for(const n in t){const o=n,s=this.getElementArea();if(null===s)throw new K(\"RCSA77553\");s.side=o,\"2\"===t[o][1]?s[o]=s[t[o]]-50:s[o]=s[t[o]]+50,s.surface=(s.x2-s.x1)*(s.y2-s.y1),e[i++]=s}return e}highlightDropZone(t,e,i){this.layoutManager.tabDropPlaceholder.remove(),super.highlightDropZone(t,e,i)}onDrop(t,e){if(t.isComponent){const e=ut.createDefault(),i=t;e.header=mt.Header.createCopy(i.headerConfig);const n=this.layoutManager.createAndInitContentItem(e,this);n.addChild(t),t=n}if(0===this.contentItems.length)this.addChild(t);else{if(t.type===at.row||t.type===at.column){const e=ut.createDefault(),i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}const i=\"x\"==e.side[0]?at.row:at.column,n=\"2\"==e.side[1],o=this.contentItems[0];if(o instanceof Xt&&o.type===i){const e=o.contentItems[n?0:o.contentItems.length-1];o.addChild(t,n?0:void 0,!0),e.size*=.5,t.size=e.size,t.sizeUnit=ht.Percent,o.updateSize(!1)}else{const e=ct.createDefault(i),s=this.layoutManager.createContentItem(e,this);this.replaceChild(o,s),s.addChild(t,n?0:void 0,!0),s.addChild(o,n?void 0:0,!0),o.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}}dock(){throw new X(\"GID87731\")}validateDocking(){throw new X(\"GIVD87732\")}getAllContentItems(){const t=[this];return this.deepGetAllContentItems(this.contentItems,t),t}getConfigMaximisedItems(){const t=[];return this.deepFilterContentItems(this.contentItems,t,(t=>!(!Gt.isStack(t)||!t.initialWantMaximise)||!(!Gt.isComponentItem(t)||!t.initialWantMaximise))),t}getItemsByPopInParentId(t){const e=[];return this.deepFilterContentItems(this.contentItems,e,(e=>e.popInParentIds.includes(t))),e}toConfig(){throw new Error(\"Cannot generate GroundItem config\")}setActiveComponentItem(t,e,i){}updateNodeSize(){const{width:t,height:e}=kt(this._containerElement);Tt(this.element,t),At(this.element,e),this.contentItems.length>0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e))}deepGetAllContentItems(t,e){for(let i=0;ithis.onClick(t),this._touchStartEventListener=t=>this.onTouchStart(t),this._element=document.createElement(\"div\"),this._element.classList.add(i),this._element.title=e,this._header.on(\"destroy\",(()=>this.destroy())),this._element.addEventListener(\"click\",this._clickEventListener,{passive:!0}),this._element.addEventListener(\"touchstart\",this._touchStartEventListener,{passive:!0}),this._header.controlsContainerElement.appendChild(this._element)}get element(){return this._element}destroy(){var t;this._element.removeEventListener(\"click\",this._clickEventListener),this._element.removeEventListener(\"touchstart\",this._touchStartEventListener),null===(t=this._element.parentNode)||void 0===t||t.removeChild(this._element)}onClick(t){this._pushEvent(t)}onTouchStart(t){this._pushEvent(t)}}class Jt{constructor(t,e,i,n,o){var s;this._layoutManager=t,this._componentItem=e,this._closeEvent=i,this._focusEvent=n,this._dragStartEvent=o,this._isActive=!1,this._tabClickListener=t=>this.onTabClickDown(t),this._tabTouchStartListener=t=>this.onTabTouchStart(t),this._closeClickListener=()=>this.onCloseClick(),this._closeTouchStartListener=()=>this.onCloseTouchStart(),this._dragStartListener=(t,e)=>this.onDragStart(t,e),this._contentItemDestroyListener=()=>this.onContentItemDestroy(),this._tabTitleChangedListener=t=>this.setTitle(t),this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_tab\"),this._titleElement=document.createElement(\"span\"),this._titleElement.classList.add(\"lm_title\"),this._closeElement=document.createElement(\"div\"),this._closeElement.classList.add(\"lm_close_tab\"),this._element.appendChild(this._titleElement),this._element.appendChild(this._closeElement),e.isClosable?this._closeElement.style.display=\"\":this._closeElement.style.display=\"none\",this.setTitle(e.title),this._componentItem.on(\"titleChanged\",this._tabTitleChangedListener);(null!==(s=e.reorderEnabled)&&void 0!==s?s:this._layoutManager.layoutConfig.settings.reorderEnabled)&&this.enableReorder(),this._element.addEventListener(\"click\",this._tabClickListener,{passive:!0}),this._element.addEventListener(\"touchstart\",this._tabTouchStartListener,{passive:!0}),this._componentItem.isClosable?(this._closeElement.addEventListener(\"click\",this._closeClickListener,{passive:!0}),this._closeElement.addEventListener(\"touchstart\",this._closeTouchStartListener,{passive:!0})):(this._closeElement.remove(),this._closeElement=void 0),this._componentItem.setTab(this),this._layoutManager.emit(\"tabCreated\",this)}get isActive(){return this._isActive}get componentItem(){return this._componentItem}get contentItem(){return this._componentItem}get element(){return this._element}get titleElement(){return this._titleElement}get closeElement(){return this._closeElement}get reorderEnabled(){return void 0!==this._dragListener}set reorderEnabled(t){t!==this.reorderEnabled&&(t?this.enableReorder():this.disableReorder())}setTitle(t){this._titleElement.innerText=t,this._element.title=t}setActive(t){t!==this._isActive&&(this._isActive=t,t?this._element.classList.add(\"lm_active\"):this._element.classList.remove(\"lm_active\"))}destroy(){var t,e;this._closeEvent=void 0,this._focusEvent=void 0,this._dragStartEvent=void 0,this._element.removeEventListener(\"click\",this._tabClickListener),this._element.removeEventListener(\"touchstart\",this._tabTouchStartListener),null===(t=this._closeElement)||void 0===t||t.removeEventListener(\"click\",this._closeClickListener),null===(e=this._closeElement)||void 0===e||e.removeEventListener(\"touchstart\",this._closeTouchStartListener),this._componentItem.off(\"titleChanged\",this._tabTitleChangedListener),this.reorderEnabled&&this.disableReorder(),this._element.remove()}setBlurred(){this._element.classList.remove(\"lm_focused\"),this._titleElement.classList.remove(\"lm_focused\")}setFocused(){this._element.classList.add(\"lm_focused\"),this._titleElement.classList.add(\"lm_focused\")}onDragStart(t,e){if(void 0===this._dragListener)throw new J(\"TODSDLU10093\");if(void 0===this._dragStartEvent)throw new J(\"TODS23309\");this._dragStartEvent(t,e,this._dragListener,this.componentItem)}onContentItemDestroy(){void 0!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=void 0)}onTabClickDown(t){const e=t.target;e!==this._element&&e!==this._titleElement||(0===t.button?this.notifyFocus():1===t.button&&this._componentItem.isClosable&&this.notifyClose())}onTabTouchStart(t){t.target===this._element&&this.notifyFocus()}onCloseClick(){this.notifyClose()}onCloseTouchStart(){this.notifyClose()}notifyClose(){if(void 0===this._closeEvent)throw new J(\"TNC15007\");this._closeEvent(this._componentItem)}notifyFocus(){if(void 0===this._focusEvent)throw new J(\"TNA15007\");this._focusEvent(this._componentItem)}enableReorder(){this._dragListener=new Zt(this._element,[this._titleElement]),this._dragListener.on(\"dragStart\",this._dragStartListener),this._componentItem.on(\"destroy\",this._contentItemDestroyListener)}disableReorder(){if(void 0===this._dragListener)throw new J(\"TDR87745\");this._componentItem.off(\"destroy\",this._contentItemDestroyListener),this._dragListener.off(\"dragStart\",this._dragStartListener),this._dragListener=void 0}}class Qt{constructor(t,e,i,n,o){this._layoutManager=t,this._componentRemoveEvent=e,this._componentFocusEvent=i,this._componentDragStartEvent=n,this._dropdownActiveChangedEvent=o,this._tabs=[],this._lastVisibleTabIndex=-1,this._dropdownActive=!1,this._element=document.createElement(\"section\"),this._element.classList.add(\"lm_tabs\"),this._dropdownElement=document.createElement(\"section\"),this._dropdownElement.classList.add(\"lm_tabdropdown_list\"),this._dropdownElement.style.display=\"none\"}get tabs(){return this._tabs}get tabCount(){return this._tabs.length}get lastVisibleTabIndex(){return this._lastVisibleTabIndex}get element(){return this._element}get dropdownElement(){return this._dropdownElement}get dropdownActive(){return this._dropdownActive}destroy(){for(let t=0;tthis.handleTabCloseEvent(t)),(t=>this.handleTabFocusEvent(t)),((t,e,i,n)=>this.handleTabDragStartEvent(t,e,i,n)));void 0===e&&(e=this._tabs.length),this._tabs.splice(e,0,i),ethis._lastVisibleTabIndex){const t=this._tabs[e];for(let t=e;t>0;t--)this._tabs[t]=this._tabs[t-1];this._tabs[0]=t}}updateTabSizes(t,e){let i=!1;this.tryUpdateTabSizes(i,t,e)||(i=!0,this.tryUpdateTabSizes(i,t,e)),i!==this._dropdownActive&&(this._dropdownActive=i,this._dropdownActiveChangedEvent())}tryUpdateTabSizes(t,e,i){if(this._tabs.length>0){if(void 0===i)throw new Error(\"non-empty tabs must have active component item\");let n=0,o=!1;const s=this._layoutManager.layoutConfig.settings.tabOverlapAllowance,r=this._tabs.indexOf(i.tab),a=this._tabs[r];this._lastVisibleTabIndex=-1;for(let i=0;ie){if(o)i===r&&(l.style.zIndex=\"auto\",l.style.marginLeft=\"\",l.parentElement!==this._element&&this._element.appendChild(l));else{let t;if(t=r>0&&r<=i?(d-e)/(i-1):(d-e)/i,tthis.onClick(t),this._touchStartListener=t=>this.onTouchStart(t),this._rowColumnClosable=!0,this._closeButton=null,this._popoutButton=null,this._tabsContainer=new Qt(this._layoutManager,(t=>this.handleTabInitiatedComponentRemoveEvent(t)),(t=>this.handleTabInitiatedComponentFocusEvent(t)),((t,e,i,n)=>this.handleTabInitiatedDragStartEvent(t,e,i,n)),(()=>this.processTabDropdownActiveChanged())),this._show=i.show,this._popoutEnabled=i.popoutEnabled,this._popoutLabel=i.popoutLabel,this._maximiseEnabled=i.maximiseEnabled,this._maximiseLabel=i.maximiseLabel,this._minimiseEnabled=i.minimiseEnabled,this._minimiseLabel=i.minimiseLabel,this._closeEnabled=i.closeEnabled,this._closeLabel=i.closeLabel,this._tabDropdownEnabled=i.tabDropdownEnabled,this._tabDropdownLabel=i.tabDropdownLabel,this.setSide(i.side),this._canRemoveComponent=this._configClosable,this._element=document.createElement(\"section\"),this._element.classList.add(\"lm_header\"),this._controlsContainerElement=document.createElement(\"section\"),this._controlsContainerElement.classList.add(\"lm_controls\"),this._element.appendChild(this._tabsContainer.element),this._element.appendChild(this._controlsContainerElement),this._element.appendChild(this._tabsContainer.dropdownElement),this._element.addEventListener(\"click\",this._clickListener,{passive:!0}),this._element.addEventListener(\"touchstart\",this._touchStartListener,{passive:!0}),this._documentMouseUpListener=()=>this._tabsContainer.hideAdditionalTabsDropdown(),globalThis.document.addEventListener(\"mouseup\",this._documentMouseUpListener,{passive:!0}),this._tabControlOffset=this._layoutManager.layoutConfig.settings.tabControlOffset,this._tabDropdownEnabled&&(this._tabDropdownButton=new Kt(this,this._tabDropdownLabel,\"lm_tabdropdown\",(()=>this._tabsContainer.showAdditionalTabsDropdown()))),this._popoutEnabled&&(this._popoutButton=new Kt(this,this._popoutLabel,\"lm_popout\",(()=>this.handleButtonPopoutEvent()))),this._maximiseEnabled&&(this._maximiseButton=new Kt(this,this._maximiseLabel,\"lm_maximise\",(t=>this.handleButtonMaximiseToggleEvent(t)))),this._configClosable&&(this._closeButton=new Kt(this,this._closeLabel,\"lm_close\",(()=>s()))),this.processTabDropdownActiveChanged()}get show(){return this._show}get side(){return this._side}get leftRightSided(){return this._leftRightSided}get layoutManager(){return this._layoutManager}get parent(){return this._parent}get tabs(){return this._tabsContainer.tabs}get lastVisibleTabIndex(){return this._tabsContainer.lastVisibleTabIndex}get element(){return this._element}get tabsContainerElement(){return this._tabsContainer.element}get controlsContainerElement(){return this._controlsContainerElement}destroy(){this.emit(\"destroy\"),this._popoutEvent=void 0,this._maximiseToggleEvent=void 0,this._clickEvent=void 0,this._touchStartEvent=void 0,this._componentRemoveEvent=void 0,this._componentFocusEvent=void 0,this._componentDragStartEvent=void 0,this._tabsContainer.destroy(),globalThis.document.removeEventListener(\"mouseup\",this._documentMouseUpListener),this._element.remove()}createTab(t,e){this._tabsContainer.createTab(t,e)}removeTab(t){this._tabsContainer.removeTab(t)}processActiveComponentChanged(t){this._tabsContainer.processActiveComponentChanged(t),this.updateTabSizes()}setSide(t){this._side=t,this._leftRightSided=[nt.right,nt.left].includes(this._side)}setRowColumnClosable(t){this._rowColumnClosable=t,this.updateClosability()}updateClosability(){let t;if(this._configClosable)if(this._rowColumnClosable){t=!0;const e=this.tabs.length;for(let i=0;i1}applyFocusedValue(t){t?this._element.classList.add(\"lm_focused\"):this._element.classList.remove(\"lm_focused\")}processMaximised(){if(void 0===this._maximiseButton)throw new J(\"HPMAX16997\");this._maximiseButton.element.setAttribute(\"title\",this._minimiseLabel)}processMinimised(){if(void 0===this._maximiseButton)throw new J(\"HPMIN16997\");this._maximiseButton.element.setAttribute(\"title\",this._maximiseLabel)}updateTabSizes(){if(this._tabsContainer.tabCount>0){const t=this._show?this._layoutManager.layoutConfig.dimensions.headerHeight:0;let e;this._leftRightSided?(this._element.style.height=\"\",this._element.style.width=zt(t)):(this._element.style.width=\"\",this._element.style.height=zt(t)),e=this._leftRightSided?this._element.offsetHeight-this._controlsContainerElement.offsetHeight-this._tabControlOffset:this._element.offsetWidth-this._controlsContainerElement.offsetWidth-this._tabControlOffset,this._tabsContainer.updateTabSizes(e,this._getActiveComponentItemEvent())}}handleTabInitiatedComponentRemoveEvent(t){if(this._canRemoveComponent){if(void 0===this._componentRemoveEvent)throw new J(\"HHTCE22294\");this._componentRemoveEvent(t)}}handleTabInitiatedComponentFocusEvent(t){if(void 0===this._componentFocusEvent)throw new J(\"HHTAE22294\");this._componentFocusEvent(t)}handleTabInitiatedDragStartEvent(t,e,i,n){if(this._canRemoveComponent){if(void 0===this._componentDragStartEvent)throw new J(\"HHTDSE22294\");this._componentDragStartEvent(t,e,i,n)}else i.cancelDrag()}processTabDropdownActiveChanged(){void 0!==this._tabDropdownButton&&Dt(this._tabDropdownButton.element,this._tabsContainer.dropdownActive)}handleButtonPopoutEvent(){if(this._layoutManager.layoutConfig.settings.popoutWholeStack){if(void 0===this._popoutEvent)throw new J(\"HHBPOE17834\");this._popoutEvent()}else{const t=this._getActiveComponentItemEvent();t&&t.popout()}}handleButtonMaximiseToggleEvent(t){if(void 0===this._maximiseToggleEvent)throw new J(\"HHBMTE16834\");this._maximiseToggleEvent()}onClick(t){t.target===this._element&&this.notifyClick(t)}onTouchStart(t){t.target===this._element&&this.notifyTouchStart(t)}notifyClick(t){if(void 0===this._clickEvent)throw new J(\"HNHC46834\");this._clickEvent(t)}notifyTouchStart(t){if(void 0===this._touchStartEvent)throw new J(\"HNHTS46834\");this._touchStartEvent(t)}}class ee extends $t{constructor(t,e,i){var n,o,s,r,a,l,h,d,c,m,u,p,g,f,v,_,y,C,w;super(t,e,i,ee.createElement(document)),this._headerSideChanged=!1,this._resizeListener=()=>this.handleResize(),this._maximisedListener=()=>this.handleMaximised(),this._minimisedListener=()=>this.handleMinimised(),this._headerConfig=e.header;const I=t.layoutConfig.header,b=e.content;let S;if(1!==b.length)S=void 0;else{S=b[0].header}this._initialWantMaximise=e.maximised,this._initialActiveItemIndex=null!==(n=e.activeItemIndex)&&void 0!==n?n:0;const E=null!==(r=null!==(s=null===(o=this._headerConfig)||void 0===o?void 0:o.show)&&void 0!==s?s:null==S?void 0:S.show)&&void 0!==r?r:I.show,x=null!==(h=null!==(l=null===(a=this._headerConfig)||void 0===a?void 0:a.popout)&&void 0!==l?l:null==S?void 0:S.popout)&&void 0!==h?h:I.popout,L=null!==(m=null!==(c=null===(d=this._headerConfig)||void 0===d?void 0:d.maximise)&&void 0!==c?c:null==S?void 0:S.maximise)&&void 0!==m?m:I.maximise,z=null!==(g=null!==(p=null===(u=this._headerConfig)||void 0===u?void 0:u.close)&&void 0!==p?p:null==S?void 0:S.close)&&void 0!==g?g:I.close,M=null!==(_=null!==(v=null===(f=this._headerConfig)||void 0===f?void 0:f.minimise)&&void 0!==v?v:null==S?void 0:S.minimise)&&void 0!==_?_:I.minimise,P=null!==(w=null!==(C=null===(y=this._headerConfig)||void 0===y?void 0:y.tabDropdown)&&void 0!==C?C:null==S?void 0:S.tabDropdown)&&void 0!==w?w:I.tabDropdown;this._maximisedEnabled=!1!==L;const T={show:!1!==E,side:!1===E?nt.top:E,popoutEnabled:!1!==x,popoutLabel:!1===x?\"\":x,maximiseEnabled:this._maximisedEnabled,maximiseLabel:!1===L?\"\":L,closeEnabled:!1!==z,closeLabel:!1===z?\"\":z,minimiseEnabled:!0,minimiseLabel:M,tabDropdownEnabled:!1!==P,tabDropdownLabel:!1===P?\"\":P};this._header=new te(t,this,T,e.isClosable&&!1!==z,(()=>this.getActiveComponentItem()),(()=>this.remove()),(()=>this.handlePopoutEvent()),(()=>this.toggleMaximise()),(t=>this.handleHeaderClickEvent(t)),(t=>this.handleHeaderTouchStartEvent(t)),(t=>this.handleHeaderComponentRemoveEvent(t)),(t=>this.handleHeaderComponentFocusEvent(t)),((t,e,i,n)=>this.handleHeaderComponentStartDragEvent(t,e,i,n))),this.isStack=!0,this._childElementContainer=document.createElement(\"section\"),this._childElementContainer.classList.add(\"lm_items\"),this.on(\"resize\",this._resizeListener),this._maximisedEnabled&&(this.on(\"maximised\",this._maximisedListener),this.on(\"minimised\",this._minimisedListener)),this.element.appendChild(this._header.element),this.element.appendChild(this._childElementContainer),this.setupHeaderPosition(),this._header.updateClosability()}get childElementContainer(){return this._childElementContainer}get header(){return this._header}get headerShow(){return this._header.show}get headerSide(){return this._header.side}get headerLeftRightSided(){return this._header.leftRightSided}get contentAreaDimensions(){return this._contentAreaDimensions}get initialWantMaximise(){return this._initialWantMaximise}get isMaximised(){return this===this.layoutManager.maximisedStack}get stackParent(){if(!this.parent)throw new Error(\"Stack should always have a parent\");return this.parent}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}init(){if(!0===this.isInitialised)return;this.updateNodeSize();for(let t=0;t0){if(this._initialActiveItemIndex<0||this._initialActiveItemIndex>=e)throw new Error(`ActiveItemIndex out of range: ${this._initialActiveItemIndex} id: ${this.id}`);for(let i=0;ithis.contentItems.length)throw e-=1,new X(\"SAC99728\");if(t instanceof jt)return e=super.addChild(t,e),this._childElementContainer.appendChild(t.element),this._header.createTab(t,e),this.setActiveComponentItem(t,i),this._header.updateTabSizes(),this.updateSize(!1),t.container.setBaseLogicalZIndex(),this._header.updateClosability(),this.emitStateChangedEvent(),e;throw new X(\"SACC88532\")}removeChild(t,e){const i=t,n=this.contentItems.indexOf(i),o=1===this.contentItems.length;if(this._activeComponentItem===i&&(i.focused&&i.blur(),!o)){const t=0===n?1:n-1;this.setActiveComponentItem(this.contentItems[t],!1)}this._header.removeTab(i),super.removeChild(i,e),o||this._header.updateClosability(),this.emitStateChangedEvent()}toggleMaximise(){this.isMaximised?this.minimise():this.maximise()}maximise(){if(!this.isMaximised){this.layoutManager.setMaximisedStack(this);const t=this.contentItems,e=t.length;for(let i=0;i0&&void 0===t)throw new Error(\"expected non-empty stack to have an active component item\");return{type:\"stack\",content:this.calculateConfigContent(),size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,isClosable:this.isClosable,maximised:this.isMaximised,header:this.createHeaderConfig(),activeItemIndex:t}}onDrop(t,e){if(\"header\"===this._dropSegment){if(this.resetHeaderDropZone(),void 0===this._dropIndex)throw new J(\"SODDI68990\");return void this.addChild(t,this._dropIndex)}if(\"body\"===this._dropSegment)return void this.addChild(t,0,!0);const i=\"top\"===this._dropSegment||\"bottom\"===this._dropSegment,n=\"left\"===this._dropSegment||\"right\"===this._dropSegment,o=\"top\"===this._dropSegment||\"left\"===this._dropSegment,s=i&&this.stackParent.isColumn||n&&this.stackParent.isRow;if(t.isComponent){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createAndInitContentItem(e,this);i.addChild(t),t=i}if(t.type===at.row||t.type===at.column){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}if(s){const e=this.stackParent.contentItems.indexOf(this);this.stackParent.addChild(t,o?e:e+1,!0),this.size*=.5,t.size=this.size,t.sizeUnit=this.sizeUnit,this.stackParent.updateSize(!1)}else{const e=i?at.column:at.row,n=ct.createDefault(e),s=this.layoutManager.createContentItem(n,this);this.stackParent.replaceChild(this,s),s.addChild(t,o?0:void 0,!0),s.addChild(this,o?void 0:0,!0),this.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}highlightDropZone(t,e){for(const i in this._contentAreaDimensions){const n=i,o=this._contentAreaDimensions[n].hoverArea;if(o.x1t&&o.y1e)return void(\"header\"===n?(this._dropSegment=\"header\",this.highlightHeaderDropZone(this._header.leftRightSided?e:t)):(this.resetHeaderDropZone(),this.highlightBodyDropZone(n)))}}getArea(){if(\"none\"===this.element.style.display)return null;const t=super.getElementArea(this._header.element),e=super.getElementArea(this._childElementContainer);if(null===t||null===e)throw new K(\"SGAHC13086\");const i=e.x2-e.x1,n=e.y2-e.y1;return this._contentAreaDimensions={header:{hoverArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2},highlightArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2}}},0===this.contentItems.length?(this._contentAreaDimensions.body={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2}},super.getElementArea(this.element)):(this._contentAreaDimensions.left={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x1+.25*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x1+.5*i,y2:e.y2}},this._contentAreaDimensions.top={hoverArea:{x1:e.x1+.25*i,y1:e.y1,x2:e.x1+.75*i,y2:e.y1+.5*n},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y1+.5*n}},this._contentAreaDimensions.right={hoverArea:{x1:e.x1+.75*i,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1+.5*i,y1:e.y1,x2:e.x2,y2:e.y2}},this._contentAreaDimensions.bottom={hoverArea:{x1:e.x1+.25*i,y1:e.y1+.5*n,x2:e.x1+.75*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1+.5*n,x2:e.x2,y2:e.y2}},super.getElementArea(this.element))}positionHeader(t){this._header.side!==t&&(this._header.setSide(t),this._headerSideChanged=!0,this.setupHeaderPosition())}updateNodeSize(){if(\"none\"!==this.element.style.display){const t=kt(this.element);if(this._header.show){t[this._header.leftRightSided?it.width:it.height]-=this.layoutManager.layoutConfig.dimensions.headerHeight}this._childElementContainer.style.width=zt(t.width),this._childElementContainer.style.height=zt(t.height);for(let e=0;e=o&&tthis.onDrag(t,e,i))),this._dragListener.on(\"dragStop\",(()=>this.onDrop())),this.createDragProxyElements(t,e),null===this._componentItem.parent)throw new K(\"DPC10097\");this._componentItemFocused=this._componentItem.focused,this._componentItemFocused&&this._componentItem.blur(),this._componentItem.parent.removeChild(this._componentItem,!0),this.setDimensions(),document.body.appendChild(this._element),this.determineMinMaxXY(),this._layoutManager.calculateItemAreas(),this.setDropPosition(t,e)}get element(){return this._element}createDragProxyElements(t,e){this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_dragProxy\");const i=document.createElement(\"div\");i.classList.add(\"lm_header\");const n=document.createElement(\"div\");n.classList.add(\"lm_tabs\");const o=document.createElement(\"div\");o.classList.add(\"lm_tab\");const s=document.createElement(\"span\");s.classList.add(\"lm_title\"),o.appendChild(s),n.appendChild(o),i.appendChild(n),this._proxyContainerElement=document.createElement(\"div\"),this._proxyContainerElement.classList.add(\"lm_content\"),this._element.appendChild(i),this._element.appendChild(this._proxyContainerElement),this._originalParent instanceof ee&&this._originalParent.headerShow&&(this._sided=this._originalParent.headerLeftRightSided,this._element.classList.add(\"lm_\"+this._originalParent.headerSide),[nt.right,nt.bottom].indexOf(this._originalParent.headerSide)>=0&&this._proxyContainerElement.insertAdjacentElement(\"afterend\",i)),this._element.style.left=zt(t),this._element.style.top=zt(e),o.setAttribute(\"title\",this._componentItem.title),s.insertAdjacentText(\"afterbegin\",this._componentItem.title),this._proxyContainerElement.appendChild(this._componentItem.element)}determineMinMaxXY(){const t=this._layoutManager.groundItem;if(void 0===t)throw new J(\"DPDMMXY73109\");{const e=t.element.getBoundingClientRect();this._minX=e.left+document.body.scrollLeft,this._minY=e.top+document.body.scrollTop,this._maxX=this._minX+e.width,this._maxY=this._minY+e.height}}onDrag(t,e,i){const n=i.pageX,o=i.pageY;this.setDropPosition(n,o),this._componentItem.drag()}setDropPosition(t,e){this._layoutManager.layoutConfig.settings.constrainDragToContainer&&(t<=this._minX?t=Math.ceil(this._minX):t>=this._maxX&&(t=Math.floor(this._maxX)),e<=this._minY?e=Math.ceil(this._minY):e>=this._maxY&&(e=Math.floor(this._maxY))),this._element.style.left=zt(t),this._element.style.top=zt(e),this._area=this._layoutManager.getArea(t,e),null!==this._area&&(this._lastValidArea=this._area,this._area.contentItem.highlightDropZone(t,e,this._area))}onDrop(){const t=this._layoutManager.dropTargetIndicator;if(null===t)throw new K(\"DPOD30011\");let e;if(t.hide(),this._componentItem.exitDragMode(),null!==this._area)e=this._componentItem,this._area.contentItem.onDrop(e,this._area);else if(null!==this._lastValidArea){e=this._componentItem;this._lastValidArea.contentItem.onDrop(e,this._lastValidArea)}else this._originalParent?(e=this._componentItem,this._originalParent.addChild(e)):this._componentItem.destroy();this._element.remove(),this._layoutManager.emit(\"itemDropped\",this._componentItem),this._componentItemFocused&&void 0!==e&&e.focus()}setDimensions(){const t=this._layoutManager.layoutConfig.dimensions;if(void 0===t)throw new Error(\"DragProxy.setDimensions: dimensions undefined\");let e=t.dragProxyWidth,i=t.dragProxyHeight;if(void 0===e||void 0===i)throw new Error(\"DragProxy.setDimensions: width and/or height undefined\");const n=!1===this._layoutManager.layoutConfig.header.show?0:t.headerHeight;this._element.style.width=zt(e),this._element.style.height=zt(i),e-=this._sided?n:0,i-=this._sided?0:n,this._proxyContainerElement.style.width=zt(e),this._proxyContainerElement.style.height=zt(i),this._componentItem.enterDragMode(e,i),this._componentItem.show()}}class ne{constructor(t,e,i,n,o,s,r){this._layoutManager=t,this._element=e,this._extraAllowableChildTargets=i,this._componentTypeOrFtn=n,this._componentState=o,this._title=s,this._id=r,this._dragListener=null,this._dummyGroundContainer=document.createElement(\"div\");const a=gt.createDefault(\"row\");this._dummyGroundContentItem=new Yt(this._layoutManager,a,this._dummyGroundContainer),this.createDragListener()}destroy(){this.removeDragListener()}createDragListener(){this.removeDragListener(),this._dragListener=new Zt(this._element,this._extraAllowableChildTargets),this._dragListener.on(\"dragStart\",((t,e)=>this.onDragStart(t,e))),this._dragListener.on(\"dragStop\",(()=>this.onDragStop()))}onDragStart(t,e){var i;const n=\"component\";let o;if(\"function\"==typeof this._componentTypeOrFtn){const t=this._componentTypeOrFtn();o=ne.isDragSourceComponentItemConfig(t)?{type:n,componentState:t.state,componentType:t.type,title:null!==(i=t.title)&&void 0!==i?i:this._title}:t}else o={type:n,componentState:this._componentState,componentType:this._componentTypeOrFtn,title:this._title,id:this._id};const s=bt.resolve(o,!1),r=new jt(this._layoutManager,s,this._dummyGroundContentItem);if(this._dummyGroundContentItem.contentItems.push(r),null===this._dragListener)throw new K(\"DSODSD66746\");{const i=new ie(t,e,this._dragListener,this._layoutManager,r,this._dummyGroundContentItem),n=this._layoutManager.transitionIndicator;if(null===n)throw new K(\"DSODST66746\");n.transitionElements(this._element,i.element)}}onDragStop(){this.createDragListener()}removeDragListener(){null!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=null)}}!function(t){t.isDragSourceComponentItemConfig=function(t){return!(\"componentType\"in t)}}(ne||(ne={}));class oe{constructor(){this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_dropTargetIndicator\");const t=document.createElement(\"div\");t.classList.add(\"lm_inner\"),this._element.appendChild(t),document.body.appendChild(this._element)}destroy(){this._element.remove()}highlightArea(t,e){this._element.style.left=zt(t.x1+e),this._element.style.top=zt(t.y1+e),this._element.style.width=zt(t.x2-t.x1-e),this._element.style.height=zt(t.y2-t.y1-e),this._element.style.display=\"block\"}hide(){Dt(this._element,!1)}}class se{constructor(){this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_transition_indicator\"),document.body.appendChild(this._element),this._toElement=null,this._fromDimensions=null,this._totalAnimationDuration=200,this._animationStartTime=null}destroy(){this._element.remove()}transitionElements(t,e){}nextAnimationFrame(){}measure(t){const e=t.getBoundingClientRect();return{left:e.left,top:e.top,width:t.offsetWidth,height:t.offsetHeight}}}class re extends Wt{constructor(t){super(),this._layoutManager=t,this._childEventListener=t=>this.onEventFromChild(t),globalThis.addEventListener(re.ChildEventName,this._childEventListener,{passive:!0})}emit(t,...e){\"userBroadcast\"===t?this.emitUserBroadcast(...e):super.emit(t,...e)}emitUserBroadcast(...t){this.handleUserBroadcastEvent(\"userBroadcast\",t)}destroy(){globalThis.removeEventListener(re.ChildEventName,this._childEventListener)}handleUserBroadcastEvent(t,e){this._layoutManager.isSubWindow?this.propagateToParent(t,e):this.propagateToThisAndSubtree(t,e)}onEventFromChild(t){const e=t.detail;this.handleUserBroadcastEvent(e.eventName,e.args)}propagateToParent(t,e){const i={bubbles:!0,cancelable:!0,detail:{layoutManager:this._layoutManager,eventName:t,args:e}},n=new CustomEvent(re.ChildEventName,i),o=globalThis.opener;if(null===o)throw new K(\"EHPTP15778\");o.dispatchEvent(n)}propagateToThisAndSubtree(t,e){this.emitUnknown(t,...e);for(let i=0;ithis.handleContainerResize())),this._windowBeforeUnloadListener=()=>this.onBeforeUnload(),this._windowBeforeUnloadListening=!1,this._maximisedStackBeforeDestroyedListener=t=>this.cleanupBeforeMaximisedStackDestroyed(t),this.isSubWindow=t.isSubWindow,this._constructorOrSubWindowLayoutConfig=t.constructorOrSubWindowLayoutConfig,Q.checkInitialise(),dt.checkInitialise(),void 0!==t.containerElement&&(this._containerElement=t.containerElement)}get container(){return this._containerElement}get isInitialised(){return this._isInitialised}get groundItem(){return this._groundItem}get root(){return this._groundItem}get openPopouts(){return this._openPopouts}get dropTargetIndicator(){return this._dropTargetIndicator}get transitionIndicator(){return this._transitionIndicator}get width(){return this._width}get height(){return this._height}get eventHub(){return this._eventHub}get rootItem(){if(void 0===this._groundItem)throw new Error(\"Cannot access rootItem before init\");return 0===this._groundItem.contentItems.length?void 0:this._groundItem.contentItems[0]}get focusedComponentItem(){return this._focusedComponentItem}get tabDropPlaceholder(){return this._tabDropPlaceholder}get maximisedStack(){return this._maximisedStack}get deprecatedConstructor(){return!this.isSubWindow&&void 0!==this._constructorOrSubWindowLayoutConfig}destroy(){if(this._isInitialised){this._windowBeforeUnloadListening&&(globalThis.removeEventListener(\"beforeunload\",this._windowBeforeUnloadListener),this._windowBeforeUnloadListening=!1),!0===this.layoutConfig.settings.closePopoutsOnUnload&&this.closeAllOpenPopouts(),this._resizeObserver.disconnect(),this.checkClearResizeTimeout(),void 0!==this._groundItem&&this._groundItem.destroy(),this._tabDropPlaceholder.remove(),null!==this._dropTargetIndicator&&this._dropTargetIndicator.destroy(),null!==this._transitionIndicator&&this._transitionIndicator.destroy(),this._eventHub.destroy();for(const t of this._dragSources)t.destroy();this._dragSources=[],this._isInitialised=!1}}minifyConfig(t){return _t.minifyConfig(t)}unminifyConfig(t){return _t.unminifyConfig(t)}init(){let t;if(this.setContainer(),this._dropTargetIndicator=new oe,this._transitionIndicator=new se,this.updateSizeFromContainer(),this.isSubWindow){if(void 0===this._constructorOrSubWindowLayoutConfig)throw new J(\"LMIU07155\");{const e=this._constructorOrSubWindowLayoutConfig.root;if(void 0===e)throw new X(\"LMIC07156\");if(!Ct.isComponent(e))throw new X(\"LMIC07157\");t=e;const i=xt.resolve(this._constructorOrSubWindowLayoutConfig);this.layoutConfig=Object.assign(Object.assign({},i),{root:void 0})}}else void 0===this._constructorOrSubWindowLayoutConfig?this.layoutConfig=_t.createDefault():this.layoutConfig=xt.resolve(this._constructorOrSubWindowLayoutConfig);const e=this.layoutConfig;this._groundItem=new Yt(this,e.root,this._containerElement),this._groundItem.init(),this.checkLoadedLayoutMaximiseItem(),this._resizeObserver.observe(this._containerElement),this._isInitialised=!0,this.adjustColumnsResponsive(),this.emit(\"initialised\"),void 0!==t&&this.loadComponentAsRoot(t)}loadLayout(t){if(!this.isInitialised)throw new Error(\"GoldenLayout: Need to call init() if LayoutConfig with defined root passed to constructor\");if(void 0===this._groundItem)throw new J(\"LMLL11119\");this.createSubWindows(),this.layoutConfig=xt.resolve(t),this._groundItem.loadRoot(this.layoutConfig.root),this.checkLoadedLayoutMaximiseItem(),this.adjustColumnsResponsive()}saveLayout(){if(!1===this._isInitialised)throw new Error(\"Can't create config, layout not yet initialised\");if(void 0===this._groundItem)throw new J(\"LMTC18244\");{const t=this._groundItem.calculateConfigContent();let e;e=1!==t.length?void 0:t[0],this.reconcilePopoutWindows();const i=[];for(let t=0;t=0?n=this._groundItem.contentItems[0]:e=0;break;case at.row:case at.column:e=n.addItem(t,i.index);break;case at.stack:if(Ct.isComponent(t)){e=n.addItem(t,i.index);break}throw Error(tt[6]);case at.component:throw new X(\"LMAIALC87444602\");default:throw new Y(\"LMAIALU98881733\",n.type)}if(Ct.isComponent(t)){const t=n.contentItems[e];Gt.isStack(t)&&(n=t,e=0)}return i.parentItem=n,i.index=e,i}}}loadComponentAsRoot(t){if(void 0===this._groundItem)throw new Error(\"Cannot add item before init\");this._groundItem.loadComponentAsRoot(t)}updateSize(t,e){this.setSize(t,e)}setSize(t,e){if(this._width=t,this._height=e,!0===this._isInitialised){if(void 0===this._groundItem)throw new J(\"LMUS18881\");if(this._groundItem.setSize(this._width,this._height),this._maximisedStack){const{width:t,height:e}=kt(this._containerElement);Tt(this._maximisedStack.element,t),At(this._maximisedStack.element,e),this._maximisedStack.updateSize(!1)}this.adjustColumnsResponsive()}}beginSizeInvalidation(){this._sizeInvalidationBeginCount++}endSizeInvalidation(){0==--this._sizeInvalidationBeginCount&&this.updateSizeFromContainer()}updateSizeFromContainer(){const{width:t,height:e}=kt(this._containerElement);this.setSize(t,e)}updateRootSize(t=!1){if(void 0===this._groundItem)throw new J(\"LMURS28881\");this._groundItem.updateSize(t)}createAndInitContentItem(t,e){const i=this.createContentItem(t,e);return i.init(),i}createContentItem(t,e){if(\"string\"!=typeof t.type)throw new G(\"Missing parameter 'type'\",JSON.stringify(t));if(ct.isComponentItem(t)&&!(e instanceof ee)&&e&&!(!0===this.isSubWindow&&e instanceof Yt)){t={type:at.stack,content:[t],size:t.size,sizeUnit:t.sizeUnit,minSize:t.minSize,minSizeUnit:t.minSizeUnit,id:t.id,maximised:t.maximised,isClosable:t.isClosable,activeItemIndex:0,header:void 0}}return this.createContentItemFromConfig(t,e)}findFirstComponentItemById(t){if(void 0===this._groundItem)throw new J(\"LMFFCIBI82446\");return this.findFirstContentItemTypeByIdRecursive(at.component,t,this._groundItem)}createPopout(t,e,i,n){return t instanceof Gt?this.createPopoutFromContentItem(t,e,i,n):this.createPopoutFromItemConfig(t,e,i,n)}createPopoutFromContentItem(t,e,i,n){let o=t.parent,s=t;for(;null!==o&&1===o.contentItems.length&&!o.isGround;)s=o,o=o.parent;if(null===o)throw new K(\"LMCPFCI00834\");{if(void 0===n&&(n=o.contentItems.indexOf(s)),null!==i&&o.addPopInParentId(i),void 0===e){const i=globalThis.screenX||globalThis.screenLeft,n=globalThis.screenY||globalThis.screenTop,o=t.element.offsetLeft,s=t.element.offsetTop,{width:r,height:a}=kt(t.element);e={left:i+o,top:n+s,width:r,height:a}}const r=t.toConfig();if(t.remove(),ft.isRootItemConfig(r))return this.createPopoutFromItemConfig(r,e,i,n);throw new Error(`${tt[0]}`)}}beginVirtualSizedContainerAdding(){0==++this._virtualSizedContainerAddingBeginCount&&(this._virtualSizedContainers.length=0)}addVirtualSizedContainer(t){this._virtualSizedContainers.push(t)}endVirtualSizedContainerAdding(){if(0==--this._virtualSizedContainerAddingBeginCount){const t=this._virtualSizedContainers.length;if(t>0){this.fireBeforeVirtualRectingEvent(t);for(let e=0;ethis.emit(\"windowOpened\",a))),a.on(\"closed\",(()=>this.reconcilePopoutWindows())),this._openPopouts.push(a),this.layoutConfig.settings.closePopoutsOnUnload&&!this._windowBeforeUnloadListening&&(globalThis.addEventListener(\"beforeunload\",this._windowBeforeUnloadListener,{passive:!0}),this._windowBeforeUnloadListening=!0),a}closeAllOpenPopouts(){for(let t=0;tglobalThis.close()),1)}getArea(t,e){let i=null,n=1/0;for(let o=0;o=s.x1&&t=s.y1&&es.surface&&(n=s.surface,i=s)}return i}calculateItemAreas(){const t=this.getAllContentItems(),e=this._groundItem;if(void 0===e)throw new J(\"LMCIAR44365\");if(1!==t.length){e.contentItems[0].isStack?this._itemAreas=[]:this._itemAreas=e.createSideAreas();for(let e=0;e0){let e=t[0];if(Gt.isComponentItem(e)){const t=e.parent;if(null===t)throw new K(\"LMXLLMI69999\");e=t}if(!Gt.isStack(e))throw new X(\"LMCLLMI19993\");e.maximise()}}}processMaximiseStack(t){if(this._maximisedStack=t,t.on(\"beforeItemDestroyed\",this._maximisedStackBeforeDestroyedListener),t.element.classList.add(\"lm_maximised\"),t.element.insertAdjacentElement(\"afterend\",this._maximisePlaceholder),void 0===this._groundItem)throw new J(\"LMMXI19993\");{this._groundItem.element.prepend(t.element);const{width:e,height:i}=kt(this._containerElement);Tt(t.element,e),At(t.element,i),t.updateSize(!0),t.focusActiveContentItem(),this._maximisedStack.emit(\"maximised\"),this.emit(\"stateChanged\")}}processMinimiseMaximisedStack(){if(void 0===this._maximisedStack)throw new X(\"LMMMS74422\");{const t=this._maximisedStack;if(null===t.parent)throw new K(\"LMMI13668\");t.element.classList.remove(\"lm_maximised\"),this._maximisePlaceholder.insertAdjacentElement(\"afterend\",t.element),this._maximisePlaceholder.remove(),this.updateRootSize(!0),this._maximisedStack=void 0,t.off(\"beforeItemDestroyed\",this._maximisedStackBeforeDestroyedListener),t.emit(\"minimised\"),this.emit(\"stateChanged\")}}reconcilePopoutWindows(){const t=[];for(let e=0;e{this._resizeTimeoutId=void 0,this.beginSizeInvalidation(),this.endSizeInvalidation()}),this.resizeDebounceInterval))}checkClearResizeTimeout(){void 0!==this._resizeTimeoutId&&(clearTimeout(this._resizeTimeoutId),this._resizeTimeoutId=void 0)}setContainer(){var t;const e=document.body,i=null!==(t=this._containerElement)&&void 0!==t?t:e;if(i===e){this.resizeWithContainerAutomatically=!0;const t=document.documentElement;t.style.height=\"100%\",t.style.margin=\"0\",t.style.padding=\"0\",t.style.overflow=\"clip\",e.style.height=\"100%\",e.style.margin=\"0\",e.style.padding=\"0\",e.style.overflow=\"clip\"}this._containerElement=i}onBeforeUnload(){this.destroy()}adjustColumnsResponsive(){if(void 0===this._groundItem)throw new J(\"LMACR20883\");if(this._firstLoad=!1,this.useResponsiveLayout()&&!this._updatingColumnsResponsive&&this._groundItem.contentItems.length>0&&this._groundItem.contentItems[0].isRow){if(void 0===this._groundItem||null===this._width)throw new J(\"LMACR77412\");{const t=this._groundItem.contentItems[0].contentItems.length;if(t<=1)return;{const e=this.layoutConfig.dimensions.defaultMinItemWidth;if(t*e<=this._width)return;{this._updatingColumnsResponsive=!0;const i=t-Math.max(Math.floor(this._width/e),1),n=this._groundItem.contentItems[0],o=this.getAllStacks();if(0===o.length)throw new X(\"LMACRS77413\");{const t=o[0];for(let e=0;en?void 0:{parentItem:t,index:o}}}case 1:if(void 0===this._focusedComponentItem)return;{const t=this._focusedComponentItem.parentItem;return this.tryCreateLocationFromParentItem(t,e)}case 2:{const t=this.findFirstContentItemType(at.stack);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 3:{let t=this.findFirstContentItemType(at.row);return void 0!==t?this.tryCreateLocationFromParentItem(t,e):(t=this.findFirstContentItemType(at.column),void 0!==t?this.tryCreateLocationFromParentItem(t,e):void 0)}case 4:{const t=this.findFirstContentItemType(at.row);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 5:{const t=this.findFirstContentItemType(at.column);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 6:if(void 0===this._groundItem)throw new J(\"LMFLRIF18244\");return void 0!==this.rootItem?void 0:void 0===e||0===e?{parentItem:this._groundItem,index:0}:void 0;case 7:if(void 0===this._groundItem)throw new J(\"LMFLF18244\");{const t=this._groundItem.contentItems;if(0===t.length)return void 0===e||0===e?{parentItem:this._groundItem,index:0}:void 0;{const i=t[0];return this.tryCreateLocationFromParentItem(i,e)}}}}tryCreateLocationFromParentItem(t,e){const i=t.contentItems.length;return void 0===e?{parentItem:t,index:i}:e<0||e>i?void 0:{parentItem:t,index:e}}}!function(t){t.createMaximisePlaceElement=function(t){const e=t.createElement(\"div\");return e.classList.add(\"lm_maximise_place\"),e},t.createTabDropPlaceholderElement=function(t){const e=t.createElement(\"div\");return e.classList.add(\"lm_drop_tab_placeholder\"),e},t.defaultLocationSelectors=[{typeId:1,index:void 0},{typeId:2,index:void 0},{typeId:3,index:void 0},{typeId:7,index:void 0}],t.afterFocusedItemIfPossibleLocationSelectors=[{typeId:0,index:1},{typeId:2,index:void 0},{typeId:3,index:void 0},{typeId:7,index:void 0}]}(ae||(ae={}));class le extends ae{constructor(t,e,i,n){if(super(le.createLayoutManagerConstructorParameters(t,e)),this._bindComponentEventHanlderPassedInConstructor=!1,this._creationTimeoutPassed=!1,void 0!==e&&\"function\"==typeof e&&(this.bindComponentEvent=e,this._bindComponentEventHanlderPassedInConstructor=!0,void 0!==i&&(this.unbindComponentEvent=i)),!this._bindComponentEventHanlderPassedInConstructor&&this.isSubWindow){if(void 0===this._constructorOrSubWindowLayoutConfig)throw new J(\"VLC98823\");{const t=xt.resolve(this._constructorOrSubWindowLayoutConfig);this.layoutConfig=Object.assign(Object.assign({},t),{root:void 0})}}!0!==n&&(this.deprecatedConstructor||this.init())}destroy(){this.bindComponentEvent=void 0,this.unbindComponentEvent=void 0,super.destroy()}init(){if(this._bindComponentEventHanlderPassedInConstructor||\"loading\"!==document.readyState&&null!==document.body){if(!this._bindComponentEventHanlderPassedInConstructor&&!0===this.isSubWindow&&!this._creationTimeoutPassed)return setTimeout((()=>this.init()),7),void(this._creationTimeoutPassed=!0);!0===this.isSubWindow&&(this._bindComponentEventHanlderPassedInConstructor||this.clearHtmlAndAdjustStylesForSubWindow(),window.__glInstance=this),super.init()}else document.addEventListener(\"DOMContentLoaded\",(()=>this.init()),{passive:!0})}clearHtmlAndAdjustStylesForSubWindow(){const t=document.head,e=new Array(4);e[0]=document.querySelectorAll(\"body link\"),e[1]=document.querySelectorAll(\"body style\"),e[2]=document.querySelectorAll(\"template\"),e[3]=document.querySelectorAll(\".gl_keep\");for(let i=0;ithis.emit(\"popIn\"))),document.body.appendChild(t),!0}}bindComponent(t,e){if(void 0!==this.bindComponentEvent){return this.bindComponentEvent(t,e)}if(void 0!==this.getComponentEvent)return{virtual:!1,component:this.getComponentEvent(t,e)};{const t=`${tt[2]}: ${JSON.stringify(e)}`;throw new Z(t)}}unbindComponent(t,e,i){if(void 0!==this.unbindComponentEvent)this.unbindComponentEvent(t);else if(!e&&void 0!==this.releaseComponentEvent){if(void 0===i)throw new J(\"VCUCRCU333998\");this.releaseComponentEvent(t,i)}}}!function(t){let e=!1;t.createLayoutManagerConstructorParameters=function(t,i){const n=e?null:new URL(document.location.href).searchParams.get(\"gl-window\");e=!0;const o=null!==n;let s,r;if(null!==n){const e=localStorage.getItem(n);if(null===e)throw new Error(\"Null gl-window Config\");localStorage.removeItem(n);const i=JSON.parse(e),o=_t.unminifyConfig(i);r=xt.fromResolved(o),t instanceof HTMLElement&&(s=t)}else void 0===t?r=void 0:t instanceof HTMLElement?(r=void 0,s=t):r=t,void 0===s&&i instanceof HTMLElement&&(s=i);return{constructorOrSubWindowLayoutConfig:r,isSubWindow:o,containerElement:s}}}(le||(le={}));class he extends le{constructor(t,e,i){super(t,e,i,!0),this._componentTypesMap=new Map,this._registeredComponentMap=new Map,this._virtuableComponentMap=new Map,this._containerVirtualRectingRequiredEventListener=(t,e,i)=>this.handleContainerVirtualRectingRequiredEvent(t,e,i),this._containerVirtualVisibilityChangeRequiredEventListener=(t,e)=>this.handleContainerVirtualVisibilityChangeRequiredEvent(t,e),this._containerVirtualZIndexChangeRequiredEventListener=(t,e,i)=>this.handleContainerVirtualZIndexChangeRequiredEvent(t,e,i),this.deprecatedConstructor||this.init()}registerComponent(t,e,i=!1){if(\"function\"!=typeof e)throw new $(\"registerComponent() componentConstructorOrFactoryFtn parameter is not a function\");if(e.hasOwnProperty(\"prototype\")){const n=e;this.registerComponentConstructor(t,n,i)}else{const n=e;this.registerComponentFactoryFunction(t,n,i)}}registerComponentConstructor(t,e,i=!1){if(\"function\"!=typeof e)throw new Error(tt[1]);if(void 0!==this._componentTypesMap.get(t))throw new Z(`${tt[3]}: ${t}`);this._componentTypesMap.set(t,{constructor:e,factoryFunction:void 0,virtual:i})}registerComponentFactoryFunction(t,e,i=!1){if(\"function\"!=typeof e)throw new Z(\"Please register a constructor function\");if(void 0!==this._componentTypesMap.get(t))throw new Z(`${tt[3]}: ${t}`);this._componentTypesMap.set(t,{constructor:void 0,factoryFunction:e,virtual:i})}registerComponentFunction(t){this.registerGetComponentConstructorCallback(t)}registerGetComponentConstructorCallback(t){if(\"function\"!=typeof t)throw new Error(\"Please register a callback function\");void 0!==this._getComponentConstructorFtn&&console.warn(\"Multiple component functions are being registered. Only the final registered function will be used.\"),this._getComponentConstructorFtn=t}getRegisteredComponentTypeNames(){const t=this._componentTypesMap.keys();return Array.from(t)}getComponentInstantiator(t){let e;const i=pt.resolveComponentTypeName(t);return void 0!==i&&(e=this._componentTypesMap.get(i)),void 0===e&&void 0!==this._getComponentConstructorFtn&&(e={constructor:this._getComponentConstructorFtn(t),factoryFunction:void 0,virtual:!1}),e}bindComponent(t,e){let i;const n=pt.resolveComponentTypeName(e);let o;if(void 0!==n&&(i=this._componentTypesMap.get(n)),void 0===i&&void 0!==this._getComponentConstructorFtn&&(i={constructor:this._getComponentConstructorFtn(e),factoryFunction:void 0,virtual:!1}),void 0!==i){const s=i.virtual;let r,a;r=void 0===e.componentState?void 0:Ut({},e.componentState);const l=i.constructor;if(void 0!==l)a=new l(t,r,s);else{const e=i.factoryFunction;if(void 0===e)throw new X(\"LMBCFFU10008\");a=e(t,r,s)}if(s){if(void 0===a)throw new J(\"GLBCVCU988774\");{const e=a,i=e.rootHtmlElement;if(void 0===i)throw new Z(`${tt[5]}: ${n}`);!function(t){const e=\"absolute\";t.style.position!==e&&(t.style.position=e)}(i),this.container.appendChild(i),this._virtuableComponentMap.set(t,e),t.virtualRectingRequiredEvent=this._containerVirtualRectingRequiredEventListener,t.virtualVisibilityChangeRequiredEvent=this._containerVirtualVisibilityChangeRequiredEventListener,t.virtualZIndexChangeRequiredEvent=this._containerVirtualZIndexChangeRequiredEventListener}}this._registeredComponentMap.set(t,a),o={virtual:i.virtual,component:a}}else o=super.bindComponent(t,e);return o}unbindComponent(t,e,i){if(void 0===this._registeredComponentMap.get(t))super.unbindComponent(t,e,i);else{const e=this._virtuableComponentMap.get(t);if(void 0!==e){const i=e.rootHtmlElement;if(void 0===i)throw new X(\"GLUC77743\",t.title);this.container.removeChild(i),this._virtuableComponentMap.delete(t)}}}fireBeforeVirtualRectingEvent(t){this._goldenLayoutBoundingClientRect=this.container.getBoundingClientRect(),super.fireBeforeVirtualRectingEvent(t)}handleContainerVirtualRectingRequiredEvent(t,e,i){const n=this._virtuableComponentMap.get(t);if(void 0===n)throw new J(\"GLHCSCE55933\");{const o=n.rootHtmlElement;if(void 0===o)throw new Z(tt[4]+\" \"+t.title);{const n=t.element.getBoundingClientRect(),s=n.left-this._goldenLayoutBoundingClientRect.left;o.style.left=zt(s);const r=n.top-this._goldenLayoutBoundingClientRect.top;o.style.top=zt(r),Tt(o,e),At(o,i)}}}handleContainerVirtualVisibilityChangeRequiredEvent(t,e){const i=this._virtuableComponentMap.get(t);if(void 0===i)throw new J(\"GLHCVVCRE55934\");{const n=i.rootHtmlElement;if(void 0===n)throw new Z(tt[4]+\" \"+t.title);Dt(n,e)}}handleContainerVirtualZIndexChangeRequiredEvent(t,e,i){const n=this._virtuableComponentMap.get(t);if(void 0===n)throw new J(\"GLHCVZICRE55935\");{const e=n.rootHtmlElement;if(void 0===e)throw new Z(tt[4]+\" \"+t.title);e.style.zIndex=i}}}const de=\"initial_\",ce={show:\"top\",popout:!1,maximise:!1,close:\"close-tab-unused\"},me={headerHeight:31},ue={hasHeaders:!0,reorderEnabled:!0},pe={popoutWholeStack:!1,constrainDragToContainer:!1,constrainDragToHeaders:!1,preventDragout:!1,showMaximiseIcon:!1,showPopoutIcon:!1,showCloseIcon:!1,blockedPopoutsThrowError:!0,closePopoutsOnUnload:!0,selectionEnabled:!1};var ge,fe;class ve{constructor(e){this.layout=e,ge.set(this,void 0),fe.set(this,void 0),this.handleResize=t=>{t.forEach((t=>this.resizeElement(t.target)))},this.handleMutation=()=>{this.layout.viewComponentsByContainerElement.forEach((t=>{this.resizeElement(t.container.element)}))},t.__classPrivateFieldSet(this,ge,new ResizeObserver(this.handleResize),\"f\"),t.__classPrivateFieldSet(this,fe,new MutationObserver(this.handleMutation),\"f\")}observeMutations(e){t.__classPrivateFieldGet(this,fe,\"f\")?.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[\"class\"]})}destroy(){t.__classPrivateFieldGet(this,ge,\"f\").disconnect(),t.__classPrivateFieldGet(this,fe,\"f\").disconnect()}observeContainer(e){t.__classPrivateFieldGet(this,ge,\"f\").observe(e)}unobserveContainer(e){t.__classPrivateFieldGet(this,ge,\"f\").unobserve(e)}resizeElement(t){const e=this.layout.viewComponentsByContainerElement.get(t);e&&e.resize()}}ge=new WeakMap,fe=new WeakMap;var _e={};Object.defineProperty(_e,\"__esModule\",{value:!0});var ye=_e.BaseItem=void 0;class Ce{constructor(t,e,i){this._item=t,this._layout=e,this._wrap=i}get raw(){return this._item}get layout(){return this._layout}get type(){return this._item.type}get contentItems(){return(this._item.contentItems??[]).map((t=>this._wrap(t)))}get parent(){const t=this._item.parent;return t?this._wrap(t):null}setActiveContentItem(t,e){if(\"stack\"!==this.type)throw new Error(`Cannot call setActiveContentItem from a non-stack item: ${this.type}`);this._item.setActiveContentItem(t.raw,e)}static wrapInternal(t,e,i){const n=Ce.wrapCache.get(e);if(n)return n;const o=new t(e,i,(e=>Ce.wrapInternal(t,e,i)));return Ce.wrapCache.set(e,o),o}}ye=_e.BaseItem=Ce,Ce.wrapCache=new WeakMap;const we=t=>!!t&&\"contentItems\"in t&&(t.isRow||t.isColumn);class Ie extends ye{isRoot(){return!!this._item.parent?.isGround}getBounds(){return this._item.element.getBoundingClientRect()}get viewName(){if(this._item.isComponent){const{component:t}=this._item;return t.identity.name}throw new Error(\"View name not found\")}onDestroyed(t){const e=({target:i})=>{i===this._item&&(t(),this._item.off(\"itemDestroyed\",e))};this._item.on(\"itemDestroyed\",e)}createAdjacentStack({position:t=\"right\"}={}){const e=this.raw;if(ee.isStack(e)&&e.parent){const i=[\"top\",\"bottom\"].includes(t)?\"column\":\"row\",n=[\"left\",\"top\"].includes(t)?1:0,o=we(e.parent)?e.parent:e.layoutManager,s=o,r=e.parent.contentItems.indexOf(e);e.parent.isGround&&e.parent.removeChild(e,!0);const a=o.newItem({type:i,content:[{type:\"stack\",content:[]}]},r);if(!a)throw new Error(\"createAdjacentStack: Failed to create new container\");const l=a.contentItems[0];return a.addChild(this.raw,n),we(s)&&s.removeChild(e,!0),this._wrap(l)}throw new Error(`Cannot creat adjacent stacks for type: ${e.type}, must be type 'stack'`)}setActiveContentItem(t,e=!0){if(!ee.isStack(this._item))throw new Error(`Cannot call setActiveContentItem from a non-stack item: ${this.type}`);this._item.setActiveComponentItem(t.raw,!e)}static wrap(t,e){return ye.wrapInternal(Ie,t,e)}}function be(t=[],e){for(const i of t)\"component\"===i.type?Object.keys(e).forEach((t=>{t in i&&(i.componentState={[`${de}${t}`]:i[t],...i.componentState}),i[t]=e[t]})):be(i.content,e)}function Se(t=[],e,i){for(const n of t)if(\"component\"===n.type)Object.keys(e).forEach((t=>{if(`${de}${t}`in n.componentState)return n[t]=n.componentState[`${de}${t}`],void delete n.componentState[`${de}${t}`];n[t]=e[t]}));else{if(n.size&&(\"row\"===i||\"column\"===i)){n[\"row\"===i?\"width\":\"height\"]=n.size?.includes(\".\")?parseFloat(n.size):parseInt(n.size)}Se(n.content,e,n.type)}}function Ee(t){if(t.root){t.root.content&&Se([t.root],{componentName:\"view\",isClosable:!0});const e=t.root;t.content=[e],delete t.root}return t}const xe=e=>class extends e{connectedCallback(){if(!this.name||!this.uuid)throw new Error(\" Name or uuid attribute missing\");if(!this.src)throw new Error(\" missing 'src' attribute.\");this.#t||(this.#t=document.createElement(\"iframe\"),this.#t.src=this.src,this.#t.style.height=\"100%\",this.#t.style.width=\"100%\",this.#t.style.border=\"none\",this.forceFrameName?this.#t.setAttribute(\"name\",this.forceFrameName):this.#t.setAttribute(\"name\",t.encodeOptions({brokerUrl:this.brokerUrl,name:this.name,uuid:this.uuid,providerId:this.providerId,contextGroup:this.contextGroup},\"of-frame\")),this.#t.setAttribute(\"id\",this.name),this.appendChild(this.#t))}#t;get brokerUrl(){return this.getAttribute(\"of-broker\")}set brokerUrl(t){t&&this.setAttribute(\"of-broker\",t)}get name(){return this.getAttribute(\"of-name\")}set name(t){t&&this.setAttribute(\"of-name\",t)}get forceFrameName(){return this.getAttribute(\"forceFrameName\")}set forceFrameName(t){t&&this.setAttribute(\"forceFrameName\",t)}get uuid(){return this.getAttribute(\"of-uuid\")}set uuid(t){t&&this.setAttribute(\"of-uuid\",t)}get src(){return this.getAttribute(\"src\")}set src(t){t&&this.setAttribute(\"src\",t)}get providerId(){return this.getAttribute(\"of-provider-id\")}set providerId(t){t&&this.setAttribute(\"of-provider-id\",t)}get contextGroup(){return this.getAttribute(\"of-context-group\")}set contextGroup(t){t&&this.setAttribute(\"of-context-group\",t)}static get observedAttributes(){return[\"name\"]}};class Le{static create(t){const e=document.createElement(\"of-view\");return Object.entries(t).forEach((([t,i])=>{e.setAttribute(t,i)})),e}}customElements.define(\"of-view\",xe(HTMLElement));class ze{constructor(t,i,n,{brokerUrl:o,interopConfig:s},r){this.container=t,this.config=i,this.ofView=null,this.isDragging=()=>this.container.tab.element?.className.includes(\"lm_dragging\")??!1;const{url:a,web:l,interop:h,name:d}=i||{},c=d??`internal-generated-view-${e.v4()}`;if(this.identity={uuid:n,name:c},this.container.element.setAttribute(\"of-name\",c),this.container.element.id=`container-${c}`,this.container.parent.id=c,void 0===a)return void this.handleUrlMissing();const m=this.updateTitleIfNotSet(a),u={\"of-broker\":o,\"of-uuid\":n,\"of-name\":c,src:a};l?.frameName&&(u.forceFrameName=l.frameName);const p=h?.currentContextGroup??s?.currentContextGroup;p&&(u[\"of-context-group\"]=p),s?.providerId&&(u[\"of-provider-id\"]=s?.providerId),this.ofView=Le.create(u),this.ofView.title=m??`Iframe: ${a}`,r.appendChild(this.ofView),this.ofView.style.position=\"absolute\"}updateTitleIfNotSet(t){return\"view\"===this.container.parent.title&&this.container.parent.setTitle(t),this.container.parent.title}handleUrlMissing(){const t=document.createElement(\"div\");t.setAttribute(\"style\",\"padding: 20px\");t.innerText=\"No URL provided\",this.container.element.appendChild(t)}destroy(){this.ofView?.remove(),this.ofView=null}closeView(){this.container.close()}resize(){if(this.ofView){if(this.isDragging())return void(this.ofView.style.display=\"none\");const t=this.container.element.getBoundingClientRect();this.ofView.style.position=\"absolute\",this.ofView.style.height=`${t.height}px`,this.ofView.style.width=`${t.width}px`,this.ofView.style.inset=`${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`,this.ofView.style.display=\"block\"}}}class Me extends U{static overrideConfig(t){const e={...ue,...t.settings,...pe};return e.reorderEnabled?be(t.content,{isClosable:!0}):be(t.content,{reorderEnabled:!1}),{dimensions:me,...t,settings:e,header:{...ce,show:!1!==t.settings?.hasHeaders&&ce.show}}}constructor(t,e,i,{options:n},o,s){super(),this.identity=t,this.container=e,this.initialConfig=i,this.layoutManager=o,this.platformProvider=s,this.viewComponentsByContainerElement=new Map,this.layoutContentCache=_.getSingleInstance(),this.reparentingViews=new Set,this.goldenLayoutDestroyed=!1,this.createViewComponent=(t,e)=>{m.handleSharedView(this.layoutManager,this.identity,e);const i=new ze(t,e,this.identity.uuid,this.options,this.iframeContainer);return e&&!1===e[`${de}isClosable`]&&this.stylesheet.insertRule(`#tab-${i.identity.name} .lm_close_tab { display: none; }`),this.viewComponentsByContainerElement.set(t.element,i),this.resizeController.observeContainer(t.element),i},this.iframeContainer=document.createElement(\"div\"),this.iframeContainer.id=`openfin-layout-iframe-container-${this.identity.layoutName}`,this.domEmitter=new V(e),this.setupStylesheets(),this.layout=new he(this.container),this.layout.resizeWithContainerAutomatically=!0,this.options=n,this.layout.registerComponent(\"view\",this.createViewComponent),this.setupListeners(),this.resizeController=new ve(this),this.layout.loadLayout(Me.overrideConfig(i));const r=document.createElement(\"div\");r.id=`openfin-layout-shadow-container-${this.identity.layoutName}`,r.attachShadow({mode:\"open\",delegatesFocus:!1}).appendChild(this.iframeContainer),this.container.appendChild(r),this.resizeController.observeMutations(this.container)}getStackByView({name:t}){const e=this.layout.findFirstComponentItemById(t);if(e?.parent&&e?.parent?.isStack)return Ie.wrap(e.parent,this)}getRoot(){return Ie.wrap(this.layout.rootItem,this)}async platformCloseView(t){const e=[...this.viewComponentsByContainerElement.values()].find((e=>e.identity.name===t.name));if(!e)throw new Error(`View with name: ${t.name} not found in layout.`);e.closeView()}async platformCreateView(t,{location:e,targetView:i}={}){if(i)throw new Error(\"TargetView not supported in web\");const n={options:this.platformProvider.normalizeOptions(t),target:this.identity,location:e};return this.insertView(n)}setupStylesheets(){if(this.container.setAttribute(\"data-openfin-layout-name\",this.identity.layoutName),this.stylesheet=new CSSStyleSheet,this.stylesheet.insertRule(\".lm_close { display: none; }\"),document.adoptedStyleSheets.push(this.stylesheet),this.initialConfig.settings?.preventSplitterResize){const t=`\\n [data-openfin-layout-name='${this.identity.layoutName}'] .lm_splitter {\\n pointer-events: none;\\n }`;this.stylesheet.insertRule(t)}}insertView({options:t,location:e,targetView:i}){const n=e?this.layoutContentCache.getItemOrUndefined(e.id):void 0,o=i?this.layoutContentCache.getItemOrUndefined(i.name):void 0,s=n??o??Ie.wrap(this.layout.rootItem,this);let r;if(ee.isStack(s.raw))r=s.raw;else{if(!we(s.raw))throw new Error(\"Cannot add a view at the requested location\");r=s.raw.newItem({type:\"stack\",content:[]})}const a=Math.min(r.contentItems.length,e?.index??r.contentItems.length);let l=this.layout.findFirstComponentItemById(t.name);l?(l.parent&&l.parent.removeChild(l,!0),r.addChild(l,a)):l=r.newComponent(\"view\",t,t.title??t.url??\"Default Title\",a);const h=l.component.identity;return Promise.resolve({identity:h})}replaceView({viewToReplace:t,newView:e}){throw new Error(\"Method not implemented.\")}replaceLayout(t){throw new Error(\"Method not implemented.\")}async cleanupView(t){}applyPreset(t){throw new Error(\"Method not implemented.\")}getCurrentViews(){return[...this.viewComponentsByContainerElement.values()].map((t=>t.identity))}async getFrameSnapshot(){return Ee(xt.fromResolved(this.layout.toConfig()))}isVisible(){return W(this.container)}async onViewDetached({viewIdentity:t}){this.reparentingViews.add(t.name),this.platformCloseView(t)}async destroy(){this.goldenLayoutDestroyed||(this.goldenLayoutDestroyed=!0,this.layout.destroy()),this.iframeContainer.remove(),this.resizeController.destroy(),document.adoptedStyleSheets=document.adoptedStyleSheets.filter((t=>t!==this.stylesheet)),this.viewComponentsByContainerElement.clear()}setupListeners(){this.container.addEventListener(\"pointerdown\",(t=>{if(t.target instanceof HTMLElement){const e=t.target.classList;[\"lm_tab\",\"lm_title\",\"lm_splitter\",\"lm_drag_handle\"].some((t=>e.contains(t)))&&(this.handleDragStart(),2===t.button&&t.stopPropagation())}}),!0),document.addEventListener(\"pointerup\",(()=>this.handleDragEnd()),!0),this.layout.on(\"tabCreated\",(t=>{const e=t.componentItem.component;t.element.id=`tab-${e.identity.name}`,this.domEmitter.dispatchLocalEvent(\"tab-created\",e.identity)})),this.layout.on(\"itemCreated\",(({target:t})=>{const e=t;if(Gt.isComponentItem(e)){const t=e.component;this.domEmitter.dispatchLocalEvent(\"container-created\",t.identity)}})),this.layout.on(\"itemDestroyed\",(t=>{const e=t.target;if(Gt.isComponentItem(e)){const t=e.component;this.removeViewComponent(t)}})),this.layout.on(\"itemDropped\",(()=>{this.handleDragEnd()}))}handleDragStart(){this.iframeContainer.style.pointerEvents=\"none\"}handleDragEnd(){this.iframeContainer.style.pointerEvents=\"\"}removeViewComponent(t){if(t.config&&!1===t.config[`${de}isClosable`]){const e=[...this.stylesheet.cssRules].findIndex((e=>e.cssText.includes(`#tab-${t.identity.name}`)));this.stylesheet.deleteRule(e)}t.destroy(),this.viewComponentsByContainerElement.delete(t.container.element),this.resizeController.unobserveContainer(t.container.element),this.reparentingViews.has(t.identity.name)?this.reparentingViews.delete(t.identity.name):this.platformProvider.closeView(t.identity.name);0===this.getCurrentViews().length&&(this.goldenLayoutDestroyed||(this.goldenLayoutDestroyed=!0,m.handleLastViewRemoved(this.layoutManager,this.identity)))}}class Pe{constructor(t,e,i,n){this.windowIdentity=t,this.connectConfig=e,this.provider=i,this.fallbackContainer=n}async createLayout(t,e){if(!(\"container\"in t)&&!this.fallbackContainer)throw new Error(\"Container property is not optional in web\");const{layoutName:i}=t,n=t,o=this.provider.initLayoutViews(n),s=n.container??this.fallbackContainer,r={...this.windowIdentity,layoutName:i},a=new Me(r,s,o,this.connectConfig,e,this.provider);m.registerLayout(e,i,a),this.fallbackContainer=null}async getLayoutSnapshot(t){return t.getLayoutSnapshot()}async handleLastViewRemoved(t){}}class Te{static async init(e){const i=e.getFin().InterApplicationBus.Channel,n=await i.create(`custom-frame-${e.me.uuid}`);return n.setDefaultAction((async(t,{target:e,opts:i},o)=>{const s=n.connections.find((t=>t.name===e.name));if(s)return n.dispatch(s,t,{...i,target:e});throw new Error(`Client with name ${e.name} not found`)})),await t.relayChannelClientApi_1(n,\"layout-relay\"),new Te(e)}constructor(t){this.wire=t,this.viewNames=new Set}normalizeOptions(t,i=\"default\"){const n=this.wire.me.uuid;let{name:o=`internal-generated-view-${e.v4()}`}=t;return o.match(/^internal-generated-view-/)&&this.viewNames.has(o)&&\"duplicate\"===i&&(o=`internal-generated-view-${e.v4()}`),this.viewNames.add(o),{...t,name:o,uuid:n}}closeView(t){this.viewNames.delete(t)}initLayoutViews({layout:t,multiInstanceViewBehavior:e}){return H((t=>{if(\"component\"===t.type&&t.componentState){const i=this.normalizeOptions(t.componentState,e);return{...t,componentState:i}}return t}),t)}}var Ae;const ke=t=>t;Ae=new WeakMap,exports.WebLayoutEntryPoint=class{constructor(e){Ae.set(this,void 0),this.initLayoutManager=async(e,i,{container:n,layoutManagerOverride:o})=>{const s=await Te.init(i),r=o??ke,a=new Pe(i.me,t.__classPrivateFieldGet(this,Ae,\"f\"),s,n),l=new(r(m.createClosedConstructor(a)));return await M(i,l),l},this.applyLayoutSnapshot=async(e,i,n)=>{await i.applyLayoutSnapshot(t.__classPrivateFieldGet(this,Ae,\"f\").platform.layoutSnapshot)},this.createLayout=async(t,e)=>m.createLayout(t,e),this.destroyLayout=async(t,e)=>m.destroyLayout(t,e),t.__classPrivateFieldSet(this,Ae,e,\"f\")}};\n","'use strict'\n\nexports.byteLength = byteLength\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\nfor (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i]\n revLookup[code.charCodeAt(i)] = i\n}\n\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction getLens (b64) {\n var len = b64.length\n\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // Trim off extra bytes after placeholder bytes are found\n // See: https://github.com/beatgammit/base64-js/issues/42\n var validLen = b64.indexOf('=')\n if (validLen === -1) validLen = len\n\n var placeHoldersLen = validLen === len\n ? 0\n : 4 - (validLen % 4)\n\n return [validLen, placeHoldersLen]\n}\n\n// base64 is 4/3 + up to two characters of the original data\nfunction byteLength (b64) {\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction _byteLength (b64, validLen, placeHoldersLen) {\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction toByteArray (b64) {\n var tmp\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n\n var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))\n\n var curByte = 0\n\n // if there are placeholders, only get up to the last complete 4 chars\n var len = placeHoldersLen > 0\n ? validLen - 4\n : validLen\n\n var i\n for (i = 0; i < len; i += 4) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 18) |\n (revLookup[b64.charCodeAt(i + 1)] << 12) |\n (revLookup[b64.charCodeAt(i + 2)] << 6) |\n revLookup[b64.charCodeAt(i + 3)]\n arr[curByte++] = (tmp >> 16) & 0xFF\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 2) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 2) |\n (revLookup[b64.charCodeAt(i + 1)] >> 4)\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 1) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 10) |\n (revLookup[b64.charCodeAt(i + 1)] << 4) |\n (revLookup[b64.charCodeAt(i + 2)] >> 2)\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] +\n lookup[num >> 12 & 0x3F] +\n lookup[num >> 6 & 0x3F] +\n lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n var tmp\n var output = []\n for (var i = start; i < end; i += 3) {\n tmp =\n ((uint8[i] << 16) & 0xFF0000) +\n ((uint8[i + 1] << 8) & 0xFF00) +\n (uint8[i + 2] & 0xFF)\n output.push(tripletToBase64(tmp))\n }\n return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n var tmp\n var len = uint8.length\n var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n var parts = []\n var maxChunkLength = 16383 // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1]\n parts.push(\n lookup[tmp >> 2] +\n lookup[(tmp << 4) & 0x3F] +\n '=='\n )\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + uint8[len - 1]\n parts.push(\n lookup[tmp >> 10] +\n lookup[(tmp >> 4) & 0x3F] +\n lookup[(tmp << 2) & 0x3F] +\n '='\n )\n }\n\n return parts.join('')\n}\n","/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n/* eslint-disable no-proto */\n\n'use strict'\n\nconst base64 = require('base64-js')\nconst ieee754 = require('ieee754')\nconst customInspectSymbol =\n (typeof Symbol === 'function' && typeof Symbol['for'] === 'function') // eslint-disable-line dot-notation\n ? Symbol['for']('nodejs.util.inspect.custom') // eslint-disable-line dot-notation\n : null\n\nexports.Buffer = Buffer\nexports.SlowBuffer = SlowBuffer\nexports.INSPECT_MAX_BYTES = 50\n\nconst K_MAX_LENGTH = 0x7fffffff\nexports.kMaxLength = K_MAX_LENGTH\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Print warning and recommend using `buffer` v4.x which has an Object\n * implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * We report that the browser does not support typed arrays if the are not subclassable\n * using __proto__. Firefox 4-29 lacks support for adding new properties to `Uint8Array`\n * (See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438). IE 10 lacks support\n * for __proto__ and has a buggy typed array implementation.\n */\nBuffer.TYPED_ARRAY_SUPPORT = typedArraySupport()\n\nif (!Buffer.TYPED_ARRAY_SUPPORT && typeof console !== 'undefined' &&\n typeof console.error === 'function') {\n console.error(\n 'This browser lacks typed array (Uint8Array) support which is required by ' +\n '`buffer` v5.x. Use `buffer` v4.x if you require old browser support.'\n )\n}\n\nfunction typedArraySupport () {\n // Can typed array instances can be augmented?\n try {\n const arr = new Uint8Array(1)\n const proto = { foo: function () { return 42 } }\n Object.setPrototypeOf(proto, Uint8Array.prototype)\n Object.setPrototypeOf(arr, proto)\n return arr.foo() === 42\n } catch (e) {\n return false\n }\n}\n\nObject.defineProperty(Buffer.prototype, 'parent', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.buffer\n }\n})\n\nObject.defineProperty(Buffer.prototype, 'offset', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.byteOffset\n }\n})\n\nfunction createBuffer (length) {\n if (length > K_MAX_LENGTH) {\n throw new RangeError('The value \"' + length + '\" is invalid for option \"size\"')\n }\n // Return an augmented `Uint8Array` instance\n const buf = new Uint8Array(length)\n Object.setPrototypeOf(buf, Buffer.prototype)\n return buf\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new TypeError(\n 'The \"string\" argument must be of type string. Received type number'\n )\n }\n return allocUnsafe(arg)\n }\n return from(arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\nfunction from (value, encodingOrOffset, length) {\n if (typeof value === 'string') {\n return fromString(value, encodingOrOffset)\n }\n\n if (ArrayBuffer.isView(value)) {\n return fromArrayView(value)\n }\n\n if (value == null) {\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n }\n\n if (isInstance(value, ArrayBuffer) ||\n (value && isInstance(value.buffer, ArrayBuffer))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof SharedArrayBuffer !== 'undefined' &&\n (isInstance(value, SharedArrayBuffer) ||\n (value && isInstance(value.buffer, SharedArrayBuffer)))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof value === 'number') {\n throw new TypeError(\n 'The \"value\" argument must not be of type number. Received type number'\n )\n }\n\n const valueOf = value.valueOf && value.valueOf()\n if (valueOf != null && valueOf !== value) {\n return Buffer.from(valueOf, encodingOrOffset, length)\n }\n\n const b = fromObject(value)\n if (b) return b\n\n if (typeof Symbol !== 'undefined' && Symbol.toPrimitive != null &&\n typeof value[Symbol.toPrimitive] === 'function') {\n return Buffer.from(value[Symbol.toPrimitive]('string'), encodingOrOffset, length)\n }\n\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n return from(value, encodingOrOffset, length)\n}\n\n// Note: Change prototype *after* Buffer.from is defined to workaround Chrome bug:\n// https://github.com/feross/buffer/pull/148\nObject.setPrototypeOf(Buffer.prototype, Uint8Array.prototype)\nObject.setPrototypeOf(Buffer, Uint8Array)\n\nfunction assertSize (size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be of type number')\n } else if (size < 0) {\n throw new RangeError('The value \"' + size + '\" is invalid for option \"size\"')\n }\n}\n\nfunction alloc (size, fill, encoding) {\n assertSize(size)\n if (size <= 0) {\n return createBuffer(size)\n }\n if (fill !== undefined) {\n // Only pay attention to encoding if it's a string. This\n // prevents accidentally sending in a number that would\n // be interpreted as a start offset.\n return typeof encoding === 'string'\n ? createBuffer(size).fill(fill, encoding)\n : createBuffer(size).fill(fill)\n }\n return createBuffer(size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n return alloc(size, fill, encoding)\n}\n\nfunction allocUnsafe (size) {\n assertSize(size)\n return createBuffer(size < 0 ? 0 : checked(size) | 0)\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n return allocUnsafe(size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n return allocUnsafe(size)\n}\n\nfunction fromString (string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8'\n }\n\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n\n const length = byteLength(string, encoding) | 0\n let buf = createBuffer(length)\n\n const actual = buf.write(string, encoding)\n\n if (actual !== length) {\n // Writing a hex string, for example, that contains invalid characters will\n // cause everything after the first invalid character to be ignored. (e.g.\n // 'abxxcd' will be treated as 'ab')\n buf = buf.slice(0, actual)\n }\n\n return buf\n}\n\nfunction fromArrayLike (array) {\n const length = array.length < 0 ? 0 : checked(array.length) | 0\n const buf = createBuffer(length)\n for (let i = 0; i < length; i += 1) {\n buf[i] = array[i] & 255\n }\n return buf\n}\n\nfunction fromArrayView (arrayView) {\n if (isInstance(arrayView, Uint8Array)) {\n const copy = new Uint8Array(arrayView)\n return fromArrayBuffer(copy.buffer, copy.byteOffset, copy.byteLength)\n }\n return fromArrayLike(arrayView)\n}\n\nfunction fromArrayBuffer (array, byteOffset, length) {\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\"offset\" is outside of buffer bounds')\n }\n\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\"length\" is outside of buffer bounds')\n }\n\n let buf\n if (byteOffset === undefined && length === undefined) {\n buf = new Uint8Array(array)\n } else if (length === undefined) {\n buf = new Uint8Array(array, byteOffset)\n } else {\n buf = new Uint8Array(array, byteOffset, length)\n }\n\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(buf, Buffer.prototype)\n\n return buf\n}\n\nfunction fromObject (obj) {\n if (Buffer.isBuffer(obj)) {\n const len = checked(obj.length) | 0\n const buf = createBuffer(len)\n\n if (buf.length === 0) {\n return buf\n }\n\n obj.copy(buf, 0, 0, len)\n return buf\n }\n\n if (obj.length !== undefined) {\n if (typeof obj.length !== 'number' || numberIsNaN(obj.length)) {\n return createBuffer(0)\n }\n return fromArrayLike(obj)\n }\n\n if (obj.type === 'Buffer' && Array.isArray(obj.data)) {\n return fromArrayLike(obj.data)\n }\n}\n\nfunction checked (length) {\n // Note: cannot use `length < K_MAX_LENGTH` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= K_MAX_LENGTH) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + K_MAX_LENGTH.toString(16) + ' bytes')\n }\n return length | 0\n}\n\nfunction SlowBuffer (length) {\n if (+length != length) { // eslint-disable-line eqeqeq\n length = 0\n }\n return Buffer.alloc(+length)\n}\n\nBuffer.isBuffer = function isBuffer (b) {\n return b != null && b._isBuffer === true &&\n b !== Buffer.prototype // so Buffer.isBuffer(Buffer.prototype) will be false\n}\n\nBuffer.compare = function compare (a, b) {\n if (isInstance(a, Uint8Array)) a = Buffer.from(a, a.offset, a.byteLength)\n if (isInstance(b, Uint8Array)) b = Buffer.from(b, b.offset, b.byteLength)\n if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n throw new TypeError(\n 'The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array'\n )\n }\n\n if (a === b) return 0\n\n let x = a.length\n let y = b.length\n\n for (let i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i]\n y = b[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n switch (String(encoding).toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'latin1':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return true\n default:\n return false\n }\n}\n\nBuffer.concat = function concat (list, length) {\n if (!Array.isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n\n if (list.length === 0) {\n return Buffer.alloc(0)\n }\n\n let i\n if (length === undefined) {\n length = 0\n for (i = 0; i < list.length; ++i) {\n length += list[i].length\n }\n }\n\n const buffer = Buffer.allocUnsafe(length)\n let pos = 0\n for (i = 0; i < list.length; ++i) {\n let buf = list[i]\n if (isInstance(buf, Uint8Array)) {\n if (pos + buf.length > buffer.length) {\n if (!Buffer.isBuffer(buf)) buf = Buffer.from(buf)\n buf.copy(buffer, pos)\n } else {\n Uint8Array.prototype.set.call(\n buffer,\n buf,\n pos\n )\n }\n } else if (!Buffer.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n } else {\n buf.copy(buffer, pos)\n }\n pos += buf.length\n }\n return buffer\n}\n\nfunction byteLength (string, encoding) {\n if (Buffer.isBuffer(string)) {\n return string.length\n }\n if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) {\n return string.byteLength\n }\n if (typeof string !== 'string') {\n throw new TypeError(\n 'The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. ' +\n 'Received type ' + typeof string\n )\n }\n\n const len = string.length\n const mustMatch = (arguments.length > 2 && arguments[2] === true)\n if (!mustMatch && len === 0) return 0\n\n // Use a for loop to avoid recursion\n let loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'ascii':\n case 'latin1':\n case 'binary':\n return len\n case 'utf8':\n case 'utf-8':\n return utf8ToBytes(string).length\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return len * 2\n case 'hex':\n return len >>> 1\n case 'base64':\n return base64ToBytes(string).length\n default:\n if (loweredCase) {\n return mustMatch ? -1 : utf8ToBytes(string).length // assume utf8\n }\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n let loweredCase = false\n\n // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n // property of a typed array.\n\n // This behaves neither like String nor Uint8Array in that we set start/end\n // to their upper/lower bounds if the value passed is out of range.\n // undefined is handled specially as per ECMA-262 6th Edition,\n // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n if (start === undefined || start < 0) {\n start = 0\n }\n // Return early if start > this.length. Done here to prevent potential uint32\n // coercion fail below.\n if (start > this.length) {\n return ''\n }\n\n if (end === undefined || end > this.length) {\n end = this.length\n }\n\n if (end <= 0) {\n return ''\n }\n\n // Force coercion to uint32. This will also coerce falsey/NaN values to 0.\n end >>>= 0\n start >>>= 0\n\n if (end <= start) {\n return ''\n }\n\n if (!encoding) encoding = 'utf8'\n\n while (true) {\n switch (encoding) {\n case 'hex':\n return hexSlice(this, start, end)\n\n case 'utf8':\n case 'utf-8':\n return utf8Slice(this, start, end)\n\n case 'ascii':\n return asciiSlice(this, start, end)\n\n case 'latin1':\n case 'binary':\n return latin1Slice(this, start, end)\n\n case 'base64':\n return base64Slice(this, start, end)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return utf16leSlice(this, start, end)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = (encoding + '').toLowerCase()\n loweredCase = true\n }\n }\n}\n\n// This property is used by `Buffer.isBuffer` (and the `is-buffer` npm package)\n// to detect a Buffer instance. It's not possible to use `instanceof Buffer`\n// reliably in a browserify context because there could be multiple different\n// copies of the 'buffer' package in use. This method works even for Buffer\n// instances that were created from another copy of the `buffer` package.\n// See: https://github.com/feross/buffer/issues/154\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n const i = b[n]\n b[n] = b[m]\n b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n const len = this.length\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits')\n }\n for (let i = 0; i < len; i += 2) {\n swap(this, i, i + 1)\n }\n return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n const len = this.length\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits')\n }\n for (let i = 0; i < len; i += 4) {\n swap(this, i, i + 3)\n swap(this, i + 1, i + 2)\n }\n return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n const len = this.length\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits')\n }\n for (let i = 0; i < len; i += 8) {\n swap(this, i, i + 7)\n swap(this, i + 1, i + 6)\n swap(this, i + 2, i + 5)\n swap(this, i + 3, i + 4)\n }\n return this\n}\n\nBuffer.prototype.toString = function toString () {\n const length = this.length\n if (length === 0) return ''\n if (arguments.length === 0) return utf8Slice(this, 0, length)\n return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.toLocaleString = Buffer.prototype.toString\n\nBuffer.prototype.equals = function equals (b) {\n if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n if (this === b) return true\n return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n let str = ''\n const max = exports.INSPECT_MAX_BYTES\n str = this.toString('hex', 0, max).replace(/(.{2})/g, '$1 ').trim()\n if (this.length > max) str += ' ... '\n return ''\n}\nif (customInspectSymbol) {\n Buffer.prototype[customInspectSymbol] = Buffer.prototype.inspect\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n if (isInstance(target, Uint8Array)) {\n target = Buffer.from(target, target.offset, target.byteLength)\n }\n if (!Buffer.isBuffer(target)) {\n throw new TypeError(\n 'The \"target\" argument must be one of type Buffer or Uint8Array. ' +\n 'Received type ' + (typeof target)\n )\n }\n\n if (start === undefined) {\n start = 0\n }\n if (end === undefined) {\n end = target ? target.length : 0\n }\n if (thisStart === undefined) {\n thisStart = 0\n }\n if (thisEnd === undefined) {\n thisEnd = this.length\n }\n\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError('out of range index')\n }\n\n if (thisStart >= thisEnd && start >= end) {\n return 0\n }\n if (thisStart >= thisEnd) {\n return -1\n }\n if (start >= end) {\n return 1\n }\n\n start >>>= 0\n end >>>= 0\n thisStart >>>= 0\n thisEnd >>>= 0\n\n if (this === target) return 0\n\n let x = thisEnd - thisStart\n let y = end - start\n const len = Math.min(x, y)\n\n const thisCopy = this.slice(thisStart, thisEnd)\n const targetCopy = target.slice(start, end)\n\n for (let i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i]\n y = targetCopy[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (numberIsNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [val], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n let indexSize = 1\n let arrLength = arr.length\n let valLength = val.length\n\n if (encoding !== undefined) {\n encoding = String(encoding).toLowerCase()\n if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n encoding === 'utf16le' || encoding === 'utf-16le') {\n if (arr.length < 2 || val.length < 2) {\n return -1\n }\n indexSize = 2\n arrLength /= 2\n valLength /= 2\n byteOffset /= 2\n }\n }\n\n function read (buf, i) {\n if (indexSize === 1) {\n return buf[i]\n } else {\n return buf.readUInt16BE(i * indexSize)\n }\n }\n\n let i\n if (dir) {\n let foundIndex = -1\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1) foundIndex = i\n if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n } else {\n if (foundIndex !== -1) i -= i - foundIndex\n foundIndex = -1\n }\n }\n } else {\n if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n for (i = byteOffset; i >= 0; i--) {\n let found = true\n for (let j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false\n break\n }\n }\n if (found) return i\n }\n }\n\n return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n offset = Number(offset) || 0\n const remaining = buf.length - offset\n if (!length) {\n length = remaining\n } else {\n length = Number(length)\n if (length > remaining) {\n length = remaining\n }\n }\n\n const strLen = string.length\n\n if (length > strLen / 2) {\n length = strLen / 2\n }\n let i\n for (i = 0; i < length; ++i) {\n const parsed = parseInt(string.substr(i * 2, 2), 16)\n if (numberIsNaN(parsed)) return i\n buf[offset + i] = parsed\n }\n return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n // Buffer#write(string)\n if (offset === undefined) {\n encoding = 'utf8'\n length = this.length\n offset = 0\n // Buffer#write(string, encoding)\n } else if (length === undefined && typeof offset === 'string') {\n encoding = offset\n length = this.length\n offset = 0\n // Buffer#write(string, offset[, length][, encoding])\n } else if (isFinite(offset)) {\n offset = offset >>> 0\n if (isFinite(length)) {\n length = length >>> 0\n if (encoding === undefined) encoding = 'utf8'\n } else {\n encoding = length\n length = undefined\n }\n } else {\n throw new Error(\n 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n )\n }\n\n const remaining = this.length - offset\n if (length === undefined || length > remaining) length = remaining\n\n if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n throw new RangeError('Attempt to write outside buffer bounds')\n }\n\n if (!encoding) encoding = 'utf8'\n\n let loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'hex':\n return hexWrite(this, string, offset, length)\n\n case 'utf8':\n case 'utf-8':\n return utf8Write(this, string, offset, length)\n\n case 'ascii':\n case 'latin1':\n case 'binary':\n return asciiWrite(this, string, offset, length)\n\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return base64Write(this, string, offset, length)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return ucs2Write(this, string, offset, length)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0)\n }\n}\n\nfunction base64Slice (buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf)\n } else {\n return base64.fromByteArray(buf.slice(start, end))\n }\n}\n\nfunction utf8Slice (buf, start, end) {\n end = Math.min(buf.length, end)\n const res = []\n\n let i = start\n while (i < end) {\n const firstByte = buf[i]\n let codePoint = null\n let bytesPerSequence = (firstByte > 0xEF)\n ? 4\n : (firstByte > 0xDF)\n ? 3\n : (firstByte > 0xBF)\n ? 2\n : 1\n\n if (i + bytesPerSequence <= end) {\n let secondByte, thirdByte, fourthByte, tempCodePoint\n\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 0x80) {\n codePoint = firstByte\n }\n break\n case 2:\n secondByte = buf[i + 1]\n if ((secondByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n if (tempCodePoint > 0x7F) {\n codePoint = tempCodePoint\n }\n }\n break\n case 3:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n codePoint = tempCodePoint\n }\n }\n break\n case 4:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n fourthByte = buf[i + 3]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n codePoint = tempCodePoint\n }\n }\n }\n }\n\n if (codePoint === null) {\n // we did not generate a valid codePoint so insert a\n // replacement char (U+FFFD) and advance only 1 byte\n codePoint = 0xFFFD\n bytesPerSequence = 1\n } else if (codePoint > 0xFFFF) {\n // encode to utf16 (surrogate pair dance)\n codePoint -= 0x10000\n res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n codePoint = 0xDC00 | codePoint & 0x3FF\n }\n\n res.push(codePoint)\n i += bytesPerSequence\n }\n\n return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nconst MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n const len = codePoints.length\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n }\n\n // Decode in chunks to avoid \"call stack size exceeded\".\n let res = ''\n let i = 0\n while (i < len) {\n res += String.fromCharCode.apply(\n String,\n codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n )\n }\n return res\n}\n\nfunction asciiSlice (buf, start, end) {\n let ret = ''\n end = Math.min(buf.length, end)\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F)\n }\n return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n let ret = ''\n end = Math.min(buf.length, end)\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i])\n }\n return ret\n}\n\nfunction hexSlice (buf, start, end) {\n const len = buf.length\n\n if (!start || start < 0) start = 0\n if (!end || end < 0 || end > len) end = len\n\n let out = ''\n for (let i = start; i < end; ++i) {\n out += hexSliceLookupTable[buf[i]]\n }\n return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n const bytes = buf.slice(start, end)\n let res = ''\n // If bytes.length is odd, the last 8 bits must be ignored (same as node.js)\n for (let i = 0; i < bytes.length - 1; i += 2) {\n res += String.fromCharCode(bytes[i] + (bytes[i + 1] * 256))\n }\n return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n const len = this.length\n start = ~~start\n end = end === undefined ? len : ~~end\n\n if (start < 0) {\n start += len\n if (start < 0) start = 0\n } else if (start > len) {\n start = len\n }\n\n if (end < 0) {\n end += len\n if (end < 0) end = 0\n } else if (end > len) {\n end = len\n }\n\n if (end < start) end = start\n\n const newBuf = this.subarray(start, end)\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(newBuf, Buffer.prototype)\n\n return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUintLE =\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let val = this[offset]\n let mul = 1\n let i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUintBE =\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n checkOffset(offset, byteLength, this.length)\n }\n\n let val = this[offset + --byteLength]\n let mul = 1\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUint8 =\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n return this[offset]\n}\n\nBuffer.prototype.readUint16LE =\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUint16BE =\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUint32LE =\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return ((this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16)) +\n (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUint32BE =\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] * 0x1000000) +\n ((this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n this[offset + 3])\n}\n\nBuffer.prototype.readBigUInt64LE = defineBigIntMethod(function readBigUInt64LE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const lo = first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24\n\n const hi = this[++offset] +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n last * 2 ** 24\n\n return BigInt(lo) + (BigInt(hi) << BigInt(32))\n})\n\nBuffer.prototype.readBigUInt64BE = defineBigIntMethod(function readBigUInt64BE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const hi = first * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset]\n\n const lo = this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last\n\n return (BigInt(hi) << BigInt(32)) + BigInt(lo)\n})\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let val = this[offset]\n let mul = 1\n let i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let i = byteLength\n let mul = 1\n let val = this[offset + --i]\n while (i > 0 && (mul *= 0x100)) {\n val += this[offset + --i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n if (!(this[offset] & 0x80)) return (this[offset])\n return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n const val = this[offset] | (this[offset + 1] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n const val = this[offset + 1] | (this[offset] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16) |\n (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] << 24) |\n (this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n (this[offset + 3])\n}\n\nBuffer.prototype.readBigInt64LE = defineBigIntMethod(function readBigInt64LE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const val = this[offset + 4] +\n this[offset + 5] * 2 ** 8 +\n this[offset + 6] * 2 ** 16 +\n (last << 24) // Overflow\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24)\n})\n\nBuffer.prototype.readBigInt64BE = defineBigIntMethod(function readBigInt64BE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const val = (first << 24) + // Overflow\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset]\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last)\n})\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUintLE =\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n let mul = 1\n let i = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUintBE =\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n let i = byteLength - 1\n let mul = 1\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUint8 =\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeUint16LE =\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeUint16BE =\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeUint32LE =\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset + 3] = (value >>> 24)\n this[offset + 2] = (value >>> 16)\n this[offset + 1] = (value >>> 8)\n this[offset] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeUint32BE =\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nfunction wrtBigUInt64LE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7)\n\n let lo = Number(value & BigInt(0xffffffff))\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n return offset\n}\n\nfunction wrtBigUInt64BE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7)\n\n let lo = Number(value & BigInt(0xffffffff))\n buf[offset + 7] = lo\n lo = lo >> 8\n buf[offset + 6] = lo\n lo = lo >> 8\n buf[offset + 5] = lo\n lo = lo >> 8\n buf[offset + 4] = lo\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n buf[offset + 3] = hi\n hi = hi >> 8\n buf[offset + 2] = hi\n hi = hi >> 8\n buf[offset + 1] = hi\n hi = hi >> 8\n buf[offset] = hi\n return offset + 8\n}\n\nBuffer.prototype.writeBigUInt64LE = defineBigIntMethod(function writeBigUInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeBigUInt64BE = defineBigIntMethod(function writeBigUInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n let i = 0\n let mul = 1\n let sub = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n let i = byteLength - 1\n let mul = 1\n let sub = 0\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n if (value < 0) value = 0xff + value + 1\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n this[offset + 2] = (value >>> 16)\n this[offset + 3] = (value >>> 24)\n return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (value < 0) value = 0xffffffff + value + 1\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeBigInt64LE = defineBigIntMethod(function writeBigInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nBuffer.prototype.writeBigInt64BE = defineBigIntMethod(function writeBigInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n }\n ieee754.write(buf, value, offset, littleEndian, 23, 4)\n return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n }\n ieee754.write(buf, value, offset, littleEndian, 52, 8)\n return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n if (!Buffer.isBuffer(target)) throw new TypeError('argument should be a Buffer')\n if (!start) start = 0\n if (!end && end !== 0) end = this.length\n if (targetStart >= target.length) targetStart = target.length\n if (!targetStart) targetStart = 0\n if (end > 0 && end < start) end = start\n\n // Copy 0 bytes; we're done\n if (end === start) return 0\n if (target.length === 0 || this.length === 0) return 0\n\n // Fatal error conditions\n if (targetStart < 0) {\n throw new RangeError('targetStart out of bounds')\n }\n if (start < 0 || start >= this.length) throw new RangeError('Index out of range')\n if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n // Are we oob?\n if (end > this.length) end = this.length\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start\n }\n\n const len = end - start\n\n if (this === target && typeof Uint8Array.prototype.copyWithin === 'function') {\n // Use built-in when available, missing from IE11\n this.copyWithin(targetStart, start, end)\n } else {\n Uint8Array.prototype.set.call(\n target,\n this.subarray(start, end),\n targetStart\n )\n }\n\n return len\n}\n\n// Usage:\n// buffer.fill(number[, offset[, end]])\n// buffer.fill(buffer[, offset[, end]])\n// buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n // Handle string cases:\n if (typeof val === 'string') {\n if (typeof start === 'string') {\n encoding = start\n start = 0\n end = this.length\n } else if (typeof end === 'string') {\n encoding = end\n end = this.length\n }\n if (encoding !== undefined && typeof encoding !== 'string') {\n throw new TypeError('encoding must be a string')\n }\n if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n if (val.length === 1) {\n const code = val.charCodeAt(0)\n if ((encoding === 'utf8' && code < 128) ||\n encoding === 'latin1') {\n // Fast path: If `val` fits into a single byte, use that numeric value.\n val = code\n }\n }\n } else if (typeof val === 'number') {\n val = val & 255\n } else if (typeof val === 'boolean') {\n val = Number(val)\n }\n\n // Invalid ranges are not set to a default, so can range check early.\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError('Out of range index')\n }\n\n if (end <= start) {\n return this\n }\n\n start = start >>> 0\n end = end === undefined ? this.length : end >>> 0\n\n if (!val) val = 0\n\n let i\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val\n }\n } else {\n const bytes = Buffer.isBuffer(val)\n ? val\n : Buffer.from(val, encoding)\n const len = bytes.length\n if (len === 0) {\n throw new TypeError('The value \"' + val +\n '\" is invalid for argument \"value\"')\n }\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len]\n }\n }\n\n return this\n}\n\n// CUSTOM ERRORS\n// =============\n\n// Simplified versions from Node, changed for Buffer-only usage\nconst errors = {}\nfunction E (sym, getMessage, Base) {\n errors[sym] = class NodeError extends Base {\n constructor () {\n super()\n\n Object.defineProperty(this, 'message', {\n value: getMessage.apply(this, arguments),\n writable: true,\n configurable: true\n })\n\n // Add the error code to the name to include it in the stack trace.\n this.name = `${this.name} [${sym}]`\n // Access the stack to generate the error message including the error code\n // from the name.\n this.stack // eslint-disable-line no-unused-expressions\n // Reset the name to the actual name.\n delete this.name\n }\n\n get code () {\n return sym\n }\n\n set code (value) {\n Object.defineProperty(this, 'code', {\n configurable: true,\n enumerable: true,\n value,\n writable: true\n })\n }\n\n toString () {\n return `${this.name} [${sym}]: ${this.message}`\n }\n }\n}\n\nE('ERR_BUFFER_OUT_OF_BOUNDS',\n function (name) {\n if (name) {\n return `${name} is outside of buffer bounds`\n }\n\n return 'Attempt to access memory outside buffer bounds'\n }, RangeError)\nE('ERR_INVALID_ARG_TYPE',\n function (name, actual) {\n return `The \"${name}\" argument must be of type number. Received type ${typeof actual}`\n }, TypeError)\nE('ERR_OUT_OF_RANGE',\n function (str, range, input) {\n let msg = `The value of \"${str}\" is out of range.`\n let received = input\n if (Number.isInteger(input) && Math.abs(input) > 2 ** 32) {\n received = addNumericalSeparator(String(input))\n } else if (typeof input === 'bigint') {\n received = String(input)\n if (input > BigInt(2) ** BigInt(32) || input < -(BigInt(2) ** BigInt(32))) {\n received = addNumericalSeparator(received)\n }\n received += 'n'\n }\n msg += ` It must be ${range}. Received ${received}`\n return msg\n }, RangeError)\n\nfunction addNumericalSeparator (val) {\n let res = ''\n let i = val.length\n const start = val[0] === '-' ? 1 : 0\n for (; i >= start + 4; i -= 3) {\n res = `_${val.slice(i - 3, i)}${res}`\n }\n return `${val.slice(0, i)}${res}`\n}\n\n// CHECK FUNCTIONS\n// ===============\n\nfunction checkBounds (buf, offset, byteLength) {\n validateNumber(offset, 'offset')\n if (buf[offset] === undefined || buf[offset + byteLength] === undefined) {\n boundsError(offset, buf.length - (byteLength + 1))\n }\n}\n\nfunction checkIntBI (value, min, max, buf, offset, byteLength) {\n if (value > max || value < min) {\n const n = typeof min === 'bigint' ? 'n' : ''\n let range\n if (byteLength > 3) {\n if (min === 0 || min === BigInt(0)) {\n range = `>= 0${n} and < 2${n} ** ${(byteLength + 1) * 8}${n}`\n } else {\n range = `>= -(2${n} ** ${(byteLength + 1) * 8 - 1}${n}) and < 2 ** ` +\n `${(byteLength + 1) * 8 - 1}${n}`\n }\n } else {\n range = `>= ${min}${n} and <= ${max}${n}`\n }\n throw new errors.ERR_OUT_OF_RANGE('value', range, value)\n }\n checkBounds(buf, offset, byteLength)\n}\n\nfunction validateNumber (value, name) {\n if (typeof value !== 'number') {\n throw new errors.ERR_INVALID_ARG_TYPE(name, 'number', value)\n }\n}\n\nfunction boundsError (value, length, type) {\n if (Math.floor(value) !== value) {\n validateNumber(value, type)\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset', 'an integer', value)\n }\n\n if (length < 0) {\n throw new errors.ERR_BUFFER_OUT_OF_BOUNDS()\n }\n\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset',\n `>= ${type ? 1 : 0} and <= ${length}`,\n value)\n}\n\n// HELPER FUNCTIONS\n// ================\n\nconst INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n // Node takes equal signs as end of the Base64 encoding\n str = str.split('=')[0]\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = str.trim().replace(INVALID_BASE64_RE, '')\n // Node converts strings with length < 2 to ''\n if (str.length < 2) return ''\n // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n while (str.length % 4 !== 0) {\n str = str + '='\n }\n return str\n}\n\nfunction utf8ToBytes (string, units) {\n units = units || Infinity\n let codePoint\n const length = string.length\n let leadSurrogate = null\n const bytes = []\n\n for (let i = 0; i < length; ++i) {\n codePoint = string.charCodeAt(i)\n\n // is surrogate component\n if (codePoint > 0xD7FF && codePoint < 0xE000) {\n // last char was a lead\n if (!leadSurrogate) {\n // no lead yet\n if (codePoint > 0xDBFF) {\n // unexpected trail\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n } else if (i + 1 === length) {\n // unpaired lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n }\n\n // valid lead\n leadSurrogate = codePoint\n\n continue\n }\n\n // 2 leads in a row\n if (codePoint < 0xDC00) {\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n leadSurrogate = codePoint\n continue\n }\n\n // valid surrogate pair\n codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n } else if (leadSurrogate) {\n // valid bmp char, but last char was a lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n }\n\n leadSurrogate = null\n\n // encode utf8\n if (codePoint < 0x80) {\n if ((units -= 1) < 0) break\n bytes.push(codePoint)\n } else if (codePoint < 0x800) {\n if ((units -= 2) < 0) break\n bytes.push(\n codePoint >> 0x6 | 0xC0,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x10000) {\n if ((units -= 3) < 0) break\n bytes.push(\n codePoint >> 0xC | 0xE0,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x110000) {\n if ((units -= 4) < 0) break\n bytes.push(\n codePoint >> 0x12 | 0xF0,\n codePoint >> 0xC & 0x3F | 0x80,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else {\n throw new Error('Invalid code point')\n }\n }\n\n return bytes\n}\n\nfunction asciiToBytes (str) {\n const byteArray = []\n for (let i = 0; i < str.length; ++i) {\n // Node's code seems to be doing this and not & 0x7F..\n byteArray.push(str.charCodeAt(i) & 0xFF)\n }\n return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n let c, hi, lo\n const byteArray = []\n for (let i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0) break\n\n c = str.charCodeAt(i)\n hi = c >> 8\n lo = c % 256\n byteArray.push(lo)\n byteArray.push(hi)\n }\n\n return byteArray\n}\n\nfunction base64ToBytes (str) {\n return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n let i\n for (i = 0; i < length; ++i) {\n if ((i + offset >= dst.length) || (i >= src.length)) break\n dst[i + offset] = src[i]\n }\n return i\n}\n\n// ArrayBuffer or Uint8Array objects from other contexts (i.e. iframes) do not pass\n// the `instanceof` check but they should be treated as of that type.\n// See: https://github.com/feross/buffer/issues/166\nfunction isInstance (obj, type) {\n return obj instanceof type ||\n (obj != null && obj.constructor != null && obj.constructor.name != null &&\n obj.constructor.name === type.name)\n}\nfunction numberIsNaN (obj) {\n // For IE11 support\n return obj !== obj // eslint-disable-line no-self-compare\n}\n\n// Create lookup table for `toString('hex')`\n// See: https://github.com/feross/buffer/issues/219\nconst hexSliceLookupTable = (function () {\n const alphabet = '0123456789abcdef'\n const table = new Array(256)\n for (let i = 0; i < 16; ++i) {\n const i16 = i * 16\n for (let j = 0; j < 16; ++j) {\n table[i16 + j] = alphabet[i] + alphabet[j]\n }\n }\n return table\n})()\n\n// Return not function with Error if BigInt not supported\nfunction defineBigIntMethod (fn) {\n return typeof BigInt === 'undefined' ? BufferBigIntNotDefined : fn\n}\n\nfunction BufferBigIntNotDefined () {\n throw new Error('BigInt not supported')\n}\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\nvar R = typeof Reflect === 'object' ? Reflect : null\nvar ReflectApply = R && typeof R.apply === 'function'\n ? R.apply\n : function ReflectApply(target, receiver, args) {\n return Function.prototype.apply.call(target, receiver, args);\n }\n\nvar ReflectOwnKeys\nif (R && typeof R.ownKeys === 'function') {\n ReflectOwnKeys = R.ownKeys\n} else if (Object.getOwnPropertySymbols) {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target)\n .concat(Object.getOwnPropertySymbols(target));\n };\n} else {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target);\n };\n}\n\nfunction ProcessEmitWarning(warning) {\n if (console && console.warn) console.warn(warning);\n}\n\nvar NumberIsNaN = Number.isNaN || function NumberIsNaN(value) {\n return value !== value;\n}\n\nfunction EventEmitter() {\n EventEmitter.init.call(this);\n}\nmodule.exports = EventEmitter;\nmodule.exports.once = once;\n\n// Backwards-compat with node 0.10.x\nEventEmitter.EventEmitter = EventEmitter;\n\nEventEmitter.prototype._events = undefined;\nEventEmitter.prototype._eventsCount = 0;\nEventEmitter.prototype._maxListeners = undefined;\n\n// By default EventEmitters will print a warning if more than 10 listeners are\n// added to it. This is a useful default which helps finding memory leaks.\nvar defaultMaxListeners = 10;\n\nfunction checkListener(listener) {\n if (typeof listener !== 'function') {\n throw new TypeError('The \"listener\" argument must be of type Function. Received type ' + typeof listener);\n }\n}\n\nObject.defineProperty(EventEmitter, 'defaultMaxListeners', {\n enumerable: true,\n get: function() {\n return defaultMaxListeners;\n },\n set: function(arg) {\n if (typeof arg !== 'number' || arg < 0 || NumberIsNaN(arg)) {\n throw new RangeError('The value of \"defaultMaxListeners\" is out of range. It must be a non-negative number. Received ' + arg + '.');\n }\n defaultMaxListeners = arg;\n }\n});\n\nEventEmitter.init = function() {\n\n if (this._events === undefined ||\n this._events === Object.getPrototypeOf(this)._events) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n }\n\n this._maxListeners = this._maxListeners || undefined;\n};\n\n// Obviously not all Emitters should be limited to 10. This function allows\n// that to be increased. Set to zero for unlimited.\nEventEmitter.prototype.setMaxListeners = function setMaxListeners(n) {\n if (typeof n !== 'number' || n < 0 || NumberIsNaN(n)) {\n throw new RangeError('The value of \"n\" is out of range. It must be a non-negative number. Received ' + n + '.');\n }\n this._maxListeners = n;\n return this;\n};\n\nfunction _getMaxListeners(that) {\n if (that._maxListeners === undefined)\n return EventEmitter.defaultMaxListeners;\n return that._maxListeners;\n}\n\nEventEmitter.prototype.getMaxListeners = function getMaxListeners() {\n return _getMaxListeners(this);\n};\n\nEventEmitter.prototype.emit = function emit(type) {\n var args = [];\n for (var i = 1; i < arguments.length; i++) args.push(arguments[i]);\n var doError = (type === 'error');\n\n var events = this._events;\n if (events !== undefined)\n doError = (doError && events.error === undefined);\n else if (!doError)\n return false;\n\n // If there is no 'error' event listener then throw.\n if (doError) {\n var er;\n if (args.length > 0)\n er = args[0];\n if (er instanceof Error) {\n // Note: The comments on the `throw` lines are intentional, they show\n // up in Node's output if this results in an unhandled exception.\n throw er; // Unhandled 'error' event\n }\n // At least give some kind of context to the user\n var err = new Error('Unhandled error.' + (er ? ' (' + er.message + ')' : ''));\n err.context = er;\n throw err; // Unhandled 'error' event\n }\n\n var handler = events[type];\n\n if (handler === undefined)\n return false;\n\n if (typeof handler === 'function') {\n ReflectApply(handler, this, args);\n } else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n ReflectApply(listeners[i], this, args);\n }\n\n return true;\n};\n\nfunction _addListener(target, type, listener, prepend) {\n var m;\n var events;\n var existing;\n\n checkListener(listener);\n\n events = target._events;\n if (events === undefined) {\n events = target._events = Object.create(null);\n target._eventsCount = 0;\n } else {\n // To avoid recursion in the case that type === \"newListener\"! Before\n // adding it to the listeners, first emit \"newListener\".\n if (events.newListener !== undefined) {\n target.emit('newListener', type,\n listener.listener ? listener.listener : listener);\n\n // Re-assign `events` because a newListener handler could have caused the\n // this._events to be assigned to a new object\n events = target._events;\n }\n existing = events[type];\n }\n\n if (existing === undefined) {\n // Optimize the case of one listener. Don't need the extra array object.\n existing = events[type] = listener;\n ++target._eventsCount;\n } else {\n if (typeof existing === 'function') {\n // Adding the second element, need to change to array.\n existing = events[type] =\n prepend ? [listener, existing] : [existing, listener];\n // If we've already got an array, just append.\n } else if (prepend) {\n existing.unshift(listener);\n } else {\n existing.push(listener);\n }\n\n // Check for listener leak\n m = _getMaxListeners(target);\n if (m > 0 && existing.length > m && !existing.warned) {\n existing.warned = true;\n // No error code for this since it is a Warning\n // eslint-disable-next-line no-restricted-syntax\n var w = new Error('Possible EventEmitter memory leak detected. ' +\n existing.length + ' ' + String(type) + ' listeners ' +\n 'added. Use emitter.setMaxListeners() to ' +\n 'increase limit');\n w.name = 'MaxListenersExceededWarning';\n w.emitter = target;\n w.type = type;\n w.count = existing.length;\n ProcessEmitWarning(w);\n }\n }\n\n return target;\n}\n\nEventEmitter.prototype.addListener = function addListener(type, listener) {\n return _addListener(this, type, listener, false);\n};\n\nEventEmitter.prototype.on = EventEmitter.prototype.addListener;\n\nEventEmitter.prototype.prependListener =\n function prependListener(type, listener) {\n return _addListener(this, type, listener, true);\n };\n\nfunction onceWrapper() {\n if (!this.fired) {\n this.target.removeListener(this.type, this.wrapFn);\n this.fired = true;\n if (arguments.length === 0)\n return this.listener.call(this.target);\n return this.listener.apply(this.target, arguments);\n }\n}\n\nfunction _onceWrap(target, type, listener) {\n var state = { fired: false, wrapFn: undefined, target: target, type: type, listener: listener };\n var wrapped = onceWrapper.bind(state);\n wrapped.listener = listener;\n state.wrapFn = wrapped;\n return wrapped;\n}\n\nEventEmitter.prototype.once = function once(type, listener) {\n checkListener(listener);\n this.on(type, _onceWrap(this, type, listener));\n return this;\n};\n\nEventEmitter.prototype.prependOnceListener =\n function prependOnceListener(type, listener) {\n checkListener(listener);\n this.prependListener(type, _onceWrap(this, type, listener));\n return this;\n };\n\n// Emits a 'removeListener' event if and only if the listener was removed.\nEventEmitter.prototype.removeListener =\n function removeListener(type, listener) {\n var list, events, position, i, originalListener;\n\n checkListener(listener);\n\n events = this._events;\n if (events === undefined)\n return this;\n\n list = events[type];\n if (list === undefined)\n return this;\n\n if (list === listener || list.listener === listener) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else {\n delete events[type];\n if (events.removeListener)\n this.emit('removeListener', type, list.listener || listener);\n }\n } else if (typeof list !== 'function') {\n position = -1;\n\n for (i = list.length - 1; i >= 0; i--) {\n if (list[i] === listener || list[i].listener === listener) {\n originalListener = list[i].listener;\n position = i;\n break;\n }\n }\n\n if (position < 0)\n return this;\n\n if (position === 0)\n list.shift();\n else {\n spliceOne(list, position);\n }\n\n if (list.length === 1)\n events[type] = list[0];\n\n if (events.removeListener !== undefined)\n this.emit('removeListener', type, originalListener || listener);\n }\n\n return this;\n };\n\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\n\nEventEmitter.prototype.removeAllListeners =\n function removeAllListeners(type) {\n var listeners, events, i;\n\n events = this._events;\n if (events === undefined)\n return this;\n\n // not listening for removeListener, no need to emit\n if (events.removeListener === undefined) {\n if (arguments.length === 0) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n } else if (events[type] !== undefined) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else\n delete events[type];\n }\n return this;\n }\n\n // emit removeListener for all listeners on all events\n if (arguments.length === 0) {\n var keys = Object.keys(events);\n var key;\n for (i = 0; i < keys.length; ++i) {\n key = keys[i];\n if (key === 'removeListener') continue;\n this.removeAllListeners(key);\n }\n this.removeAllListeners('removeListener');\n this._events = Object.create(null);\n this._eventsCount = 0;\n return this;\n }\n\n listeners = events[type];\n\n if (typeof listeners === 'function') {\n this.removeListener(type, listeners);\n } else if (listeners !== undefined) {\n // LIFO order\n for (i = listeners.length - 1; i >= 0; i--) {\n this.removeListener(type, listeners[i]);\n }\n }\n\n return this;\n };\n\nfunction _listeners(target, type, unwrap) {\n var events = target._events;\n\n if (events === undefined)\n return [];\n\n var evlistener = events[type];\n if (evlistener === undefined)\n return [];\n\n if (typeof evlistener === 'function')\n return unwrap ? [evlistener.listener || evlistener] : [evlistener];\n\n return unwrap ?\n unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length);\n}\n\nEventEmitter.prototype.listeners = function listeners(type) {\n return _listeners(this, type, true);\n};\n\nEventEmitter.prototype.rawListeners = function rawListeners(type) {\n return _listeners(this, type, false);\n};\n\nEventEmitter.listenerCount = function(emitter, type) {\n if (typeof emitter.listenerCount === 'function') {\n return emitter.listenerCount(type);\n } else {\n return listenerCount.call(emitter, type);\n }\n};\n\nEventEmitter.prototype.listenerCount = listenerCount;\nfunction listenerCount(type) {\n var events = this._events;\n\n if (events !== undefined) {\n var evlistener = events[type];\n\n if (typeof evlistener === 'function') {\n return 1;\n } else if (evlistener !== undefined) {\n return evlistener.length;\n }\n }\n\n return 0;\n}\n\nEventEmitter.prototype.eventNames = function eventNames() {\n return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : [];\n};\n\nfunction arrayClone(arr, n) {\n var copy = new Array(n);\n for (var i = 0; i < n; ++i)\n copy[i] = arr[i];\n return copy;\n}\n\nfunction spliceOne(list, index) {\n for (; index + 1 < list.length; index++)\n list[index] = list[index + 1];\n list.pop();\n}\n\nfunction unwrapListeners(arr) {\n var ret = new Array(arr.length);\n for (var i = 0; i < ret.length; ++i) {\n ret[i] = arr[i].listener || arr[i];\n }\n return ret;\n}\n\nfunction once(emitter, name) {\n return new Promise(function (resolve, reject) {\n function errorListener(err) {\n emitter.removeListener(name, resolver);\n reject(err);\n }\n\n function resolver() {\n if (typeof emitter.removeListener === 'function') {\n emitter.removeListener('error', errorListener);\n }\n resolve([].slice.call(arguments));\n };\n\n eventTargetAgnosticAddListener(emitter, name, resolver, { once: true });\n if (name !== 'error') {\n addErrorHandlerIfEventEmitter(emitter, errorListener, { once: true });\n }\n });\n}\n\nfunction addErrorHandlerIfEventEmitter(emitter, handler, flags) {\n if (typeof emitter.on === 'function') {\n eventTargetAgnosticAddListener(emitter, 'error', handler, flags);\n }\n}\n\nfunction eventTargetAgnosticAddListener(emitter, name, listener, flags) {\n if (typeof emitter.on === 'function') {\n if (flags.once) {\n emitter.once(name, listener);\n } else {\n emitter.on(name, listener);\n }\n } else if (typeof emitter.addEventListener === 'function') {\n // EventTarget does not have `error` event semantics like Node\n // EventEmitters, we do not listen for `error` events here.\n emitter.addEventListener(name, function wrapListener(arg) {\n // IE does not have builtin `{ once: true }` support so we\n // have to do it manually.\n if (flags.once) {\n emitter.removeEventListener(name, wrapListener);\n }\n listener(arg);\n });\n } else {\n throw new TypeError('The \"emitter\" argument must be of type EventEmitter. Received type ' + typeof emitter);\n }\n}\n","/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */\nexports.read = function (buffer, offset, isLE, mLen, nBytes) {\n var e, m\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var nBits = -7\n var i = isLE ? (nBytes - 1) : 0\n var d = isLE ? -1 : 1\n var s = buffer[offset + i]\n\n i += d\n\n e = s & ((1 << (-nBits)) - 1)\n s >>= (-nBits)\n nBits += eLen\n for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & ((1 << (-nBits)) - 1)\n e >>= (-nBits)\n nBits += mLen\n for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias\n } else if (e === eMax) {\n return m ? NaN : ((s ? -1 : 1) * Infinity)\n } else {\n m = m + Math.pow(2, mLen)\n e = e - eBias\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n var i = isLE ? 0 : (nBytes - 1)\n var d = isLE ? 1 : -1\n var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n value = Math.abs(value)\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0\n e = eMax\n } else {\n e = Math.floor(Math.log(value) / Math.LN2)\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--\n c *= 2\n }\n if (e + eBias >= 1) {\n value += rt / c\n } else {\n value += rt * Math.pow(2, 1 - eBias)\n }\n if (value * c >= 2) {\n e++\n c /= 2\n }\n\n if (e + eBias >= eMax) {\n m = 0\n e = eMax\n } else if (e + eBias >= 1) {\n m = ((value * c) - 1) * Math.pow(2, mLen)\n e = e + eBias\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n e = 0\n }\n }\n\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n e = (e << mLen) | m\n eLen += mLen\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128\n}\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView');\n\nmodule.exports = DataView;\n","var hashClear = require('./_hashClear'),\n hashDelete = require('./_hashDelete'),\n hashGet = require('./_hashGet'),\n hashHas = require('./_hashHas'),\n hashSet = require('./_hashSet');\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\nmodule.exports = Hash;\n","var listCacheClear = require('./_listCacheClear'),\n listCacheDelete = require('./_listCacheDelete'),\n listCacheGet = require('./_listCacheGet'),\n listCacheHas = require('./_listCacheHas'),\n listCacheSet = require('./_listCacheSet');\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\nmodule.exports = ListCache;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map');\n\nmodule.exports = Map;\n","var mapCacheClear = require('./_mapCacheClear'),\n mapCacheDelete = require('./_mapCacheDelete'),\n mapCacheGet = require('./_mapCacheGet'),\n mapCacheHas = require('./_mapCacheHas'),\n mapCacheSet = require('./_mapCacheSet');\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\nmodule.exports = MapCache;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Promise = getNative(root, 'Promise');\n\nmodule.exports = Promise;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Set = getNative(root, 'Set');\n\nmodule.exports = Set;\n","var MapCache = require('./_MapCache'),\n setCacheAdd = require('./_setCacheAdd'),\n setCacheHas = require('./_setCacheHas');\n\n/**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\nfunction SetCache(values) {\n var index = -1,\n length = values == null ? 0 : values.length;\n\n this.__data__ = new MapCache;\n while (++index < length) {\n this.add(values[index]);\n }\n}\n\n// Add methods to `SetCache`.\nSetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\nSetCache.prototype.has = setCacheHas;\n\nmodule.exports = SetCache;\n","var ListCache = require('./_ListCache'),\n stackClear = require('./_stackClear'),\n stackDelete = require('./_stackDelete'),\n stackGet = require('./_stackGet'),\n stackHas = require('./_stackHas'),\n stackSet = require('./_stackSet');\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\nmodule.exports = Stack;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Uint8Array = root.Uint8Array;\n\nmodule.exports = Uint8Array;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar WeakMap = getNative(root, 'WeakMap');\n\nmodule.exports = WeakMap;\n","/**\n * A specialized version of `_.forEach` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\nfunction arrayEach(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (iteratee(array[index], index, array) === false) {\n break;\n }\n }\n return array;\n}\n\nmodule.exports = arrayEach;\n","/**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\nfunction arrayFilter(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result[resIndex++] = value;\n }\n }\n return result;\n}\n\nmodule.exports = arrayFilter;\n","var baseTimes = require('./_baseTimes'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isIndex = require('./_isIndex'),\n isTypedArray = require('./isTypedArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = arrayLikeKeys;\n","/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n}\n\nmodule.exports = arrayPush;\n","/**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\nfunction arraySome(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (predicate(array[index], index, array)) {\n return true;\n }\n }\n return false;\n}\n\nmodule.exports = arraySome;\n","var baseAssignValue = require('./_baseAssignValue'),\n eq = require('./eq');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\nmodule.exports = assignValue;\n","var eq = require('./eq');\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\nmodule.exports = assocIndexOf;\n","var copyObject = require('./_copyObject'),\n keys = require('./keys');\n\n/**\n * The base implementation of `_.assign` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssign(object, source) {\n return object && copyObject(source, keys(source), object);\n}\n\nmodule.exports = baseAssign;\n","var copyObject = require('./_copyObject'),\n keysIn = require('./keysIn');\n\n/**\n * The base implementation of `_.assignIn` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssignIn(object, source) {\n return object && copyObject(source, keysIn(source), object);\n}\n\nmodule.exports = baseAssignIn;\n","var defineProperty = require('./_defineProperty');\n\n/**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction baseAssignValue(object, key, value) {\n if (key == '__proto__' && defineProperty) {\n defineProperty(object, key, {\n 'configurable': true,\n 'enumerable': true,\n 'value': value,\n 'writable': true\n });\n } else {\n object[key] = value;\n }\n}\n\nmodule.exports = baseAssignValue;\n","var Stack = require('./_Stack'),\n arrayEach = require('./_arrayEach'),\n assignValue = require('./_assignValue'),\n baseAssign = require('./_baseAssign'),\n baseAssignIn = require('./_baseAssignIn'),\n cloneBuffer = require('./_cloneBuffer'),\n copyArray = require('./_copyArray'),\n copySymbols = require('./_copySymbols'),\n copySymbolsIn = require('./_copySymbolsIn'),\n getAllKeys = require('./_getAllKeys'),\n getAllKeysIn = require('./_getAllKeysIn'),\n getTag = require('./_getTag'),\n initCloneArray = require('./_initCloneArray'),\n initCloneByTag = require('./_initCloneByTag'),\n initCloneObject = require('./_initCloneObject'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isMap = require('./isMap'),\n isObject = require('./isObject'),\n isSet = require('./isSet'),\n keys = require('./keys'),\n keysIn = require('./keysIn');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_FLAT_FLAG = 2,\n CLONE_SYMBOLS_FLAG = 4;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values supported by `_.clone`. */\nvar cloneableTags = {};\ncloneableTags[argsTag] = cloneableTags[arrayTag] =\ncloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =\ncloneableTags[boolTag] = cloneableTags[dateTag] =\ncloneableTags[float32Tag] = cloneableTags[float64Tag] =\ncloneableTags[int8Tag] = cloneableTags[int16Tag] =\ncloneableTags[int32Tag] = cloneableTags[mapTag] =\ncloneableTags[numberTag] = cloneableTags[objectTag] =\ncloneableTags[regexpTag] = cloneableTags[setTag] =\ncloneableTags[stringTag] = cloneableTags[symbolTag] =\ncloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =\ncloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;\ncloneableTags[errorTag] = cloneableTags[funcTag] =\ncloneableTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.clone` and `_.cloneDeep` which tracks\n * traversed objects.\n *\n * @private\n * @param {*} value The value to clone.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Deep clone\n * 2 - Flatten inherited properties\n * 4 - Clone symbols\n * @param {Function} [customizer] The function to customize cloning.\n * @param {string} [key] The key of `value`.\n * @param {Object} [object] The parent object of `value`.\n * @param {Object} [stack] Tracks traversed objects and their clone counterparts.\n * @returns {*} Returns the cloned value.\n */\nfunction baseClone(value, bitmask, customizer, key, object, stack) {\n var result,\n isDeep = bitmask & CLONE_DEEP_FLAG,\n isFlat = bitmask & CLONE_FLAT_FLAG,\n isFull = bitmask & CLONE_SYMBOLS_FLAG;\n\n if (customizer) {\n result = object ? customizer(value, key, object, stack) : customizer(value);\n }\n if (result !== undefined) {\n return result;\n }\n if (!isObject(value)) {\n return value;\n }\n var isArr = isArray(value);\n if (isArr) {\n result = initCloneArray(value);\n if (!isDeep) {\n return copyArray(value, result);\n }\n } else {\n var tag = getTag(value),\n isFunc = tag == funcTag || tag == genTag;\n\n if (isBuffer(value)) {\n return cloneBuffer(value, isDeep);\n }\n if (tag == objectTag || tag == argsTag || (isFunc && !object)) {\n result = (isFlat || isFunc) ? {} : initCloneObject(value);\n if (!isDeep) {\n return isFlat\n ? copySymbolsIn(value, baseAssignIn(result, value))\n : copySymbols(value, baseAssign(result, value));\n }\n } else {\n if (!cloneableTags[tag]) {\n return object ? value : {};\n }\n result = initCloneByTag(value, tag, isDeep);\n }\n }\n // Check for circular references and return its corresponding clone.\n stack || (stack = new Stack);\n var stacked = stack.get(value);\n if (stacked) {\n return stacked;\n }\n stack.set(value, result);\n\n if (isSet(value)) {\n value.forEach(function(subValue) {\n result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));\n });\n } else if (isMap(value)) {\n value.forEach(function(subValue, key) {\n result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n }\n\n var keysFunc = isFull\n ? (isFlat ? getAllKeysIn : getAllKeys)\n : (isFlat ? keysIn : keys);\n\n var props = isArr ? undefined : keysFunc(value);\n arrayEach(props || value, function(subValue, key) {\n if (props) {\n key = subValue;\n subValue = value[key];\n }\n // Recursively populate clone (susceptible to call stack limits).\n assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n return result;\n}\n\nmodule.exports = baseClone;\n","var isObject = require('./isObject');\n\n/** Built-in value references. */\nvar objectCreate = Object.create;\n\n/**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} proto The object to inherit from.\n * @returns {Object} Returns the new object.\n */\nvar baseCreate = (function() {\n function object() {}\n return function(proto) {\n if (!isObject(proto)) {\n return {};\n }\n if (objectCreate) {\n return objectCreate(proto);\n }\n object.prototype = proto;\n var result = new object;\n object.prototype = undefined;\n return result;\n };\n}());\n\nmodule.exports = baseCreate;\n","var arrayPush = require('./_arrayPush'),\n isArray = require('./isArray');\n\n/**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction baseGetAllKeys(object, keysFunc, symbolsFunc) {\n var result = keysFunc(object);\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n}\n\nmodule.exports = baseGetAllKeys;\n","var Symbol = require('./_Symbol'),\n getRawTag = require('./_getRawTag'),\n objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]';\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\nmodule.exports = baseIsArguments;\n","var baseIsEqualDeep = require('./_baseIsEqualDeep'),\n isObjectLike = require('./isObjectLike');\n\n/**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Unordered comparison\n * 2 - Partial comparison\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\nfunction baseIsEqual(value, other, bitmask, customizer, stack) {\n if (value === other) {\n return true;\n }\n if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\n return value !== value && other !== other;\n }\n return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n}\n\nmodule.exports = baseIsEqual;\n","var Stack = require('./_Stack'),\n equalArrays = require('./_equalArrays'),\n equalByTag = require('./_equalByTag'),\n equalObjects = require('./_equalObjects'),\n getTag = require('./_getTag'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isTypedArray = require('./isTypedArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n var objIsArr = isArray(object),\n othIsArr = isArray(other),\n objTag = objIsArr ? arrayTag : getTag(object),\n othTag = othIsArr ? arrayTag : getTag(other);\n\n objTag = objTag == argsTag ? objectTag : objTag;\n othTag = othTag == argsTag ? objectTag : othTag;\n\n var objIsObj = objTag == objectTag,\n othIsObj = othTag == objectTag,\n isSameTag = objTag == othTag;\n\n if (isSameTag && isBuffer(object)) {\n if (!isBuffer(other)) {\n return false;\n }\n objIsArr = true;\n objIsObj = false;\n }\n if (isSameTag && !objIsObj) {\n stack || (stack = new Stack);\n return (objIsArr || isTypedArray(object))\n ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n }\n if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n if (objIsWrapped || othIsWrapped) {\n var objUnwrapped = objIsWrapped ? object.value() : object,\n othUnwrapped = othIsWrapped ? other.value() : other;\n\n stack || (stack = new Stack);\n return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n }\n }\n if (!isSameTag) {\n return false;\n }\n stack || (stack = new Stack);\n return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n}\n\nmodule.exports = baseIsEqualDeep;\n","var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]';\n\n/**\n * The base implementation of `_.isMap` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n */\nfunction baseIsMap(value) {\n return isObjectLike(value) && getTag(value) == mapTag;\n}\n\nmodule.exports = baseIsMap;\n","var isFunction = require('./isFunction'),\n isMasked = require('./_isMasked'),\n isObject = require('./isObject'),\n toSource = require('./_toSource');\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\nmodule.exports = baseIsNative;\n","var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar setTag = '[object Set]';\n\n/**\n * The base implementation of `_.isSet` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n */\nfunction baseIsSet(value) {\n return isObjectLike(value) && getTag(value) == setTag;\n}\n\nmodule.exports = baseIsSet;\n","var baseGetTag = require('./_baseGetTag'),\n isLength = require('./isLength'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n\nmodule.exports = baseIsTypedArray;\n","var isPrototype = require('./_isPrototype'),\n nativeKeys = require('./_nativeKeys');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeys;\n","var isObject = require('./isObject'),\n isPrototype = require('./_isPrototype'),\n nativeKeysIn = require('./_nativeKeysIn');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeysIn(object) {\n if (!isObject(object)) {\n return nativeKeysIn(object);\n }\n var isProto = isPrototype(object),\n result = [];\n\n for (var key in object) {\n if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeysIn;\n","/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\nmodule.exports = baseTimes;\n","/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n return function(value) {\n return func(value);\n };\n}\n\nmodule.exports = baseUnary;\n","/**\n * Checks if a `cache` value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction cacheHas(cache, key) {\n return cache.has(key);\n}\n\nmodule.exports = cacheHas;\n","var Uint8Array = require('./_Uint8Array');\n\n/**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\nfunction cloneArrayBuffer(arrayBuffer) {\n var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n return result;\n}\n\nmodule.exports = cloneArrayBuffer;\n","var root = require('./_root');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined,\n allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;\n\n/**\n * Creates a clone of `buffer`.\n *\n * @private\n * @param {Buffer} buffer The buffer to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Buffer} Returns the cloned buffer.\n */\nfunction cloneBuffer(buffer, isDeep) {\n if (isDeep) {\n return buffer.slice();\n }\n var length = buffer.length,\n result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\n\n buffer.copy(result);\n return result;\n}\n\nmodule.exports = cloneBuffer;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer');\n\n/**\n * Creates a clone of `dataView`.\n *\n * @private\n * @param {Object} dataView The data view to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned data view.\n */\nfunction cloneDataView(dataView, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;\n return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);\n}\n\nmodule.exports = cloneDataView;\n","/** Used to match `RegExp` flags from their coerced string values. */\nvar reFlags = /\\w*$/;\n\n/**\n * Creates a clone of `regexp`.\n *\n * @private\n * @param {Object} regexp The regexp to clone.\n * @returns {Object} Returns the cloned regexp.\n */\nfunction cloneRegExp(regexp) {\n var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));\n result.lastIndex = regexp.lastIndex;\n return result;\n}\n\nmodule.exports = cloneRegExp;\n","var Symbol = require('./_Symbol');\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * Creates a clone of the `symbol` object.\n *\n * @private\n * @param {Object} symbol The symbol object to clone.\n * @returns {Object} Returns the cloned symbol object.\n */\nfunction cloneSymbol(symbol) {\n return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};\n}\n\nmodule.exports = cloneSymbol;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer');\n\n/**\n * Creates a clone of `typedArray`.\n *\n * @private\n * @param {Object} typedArray The typed array to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned typed array.\n */\nfunction cloneTypedArray(typedArray, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n}\n\nmodule.exports = cloneTypedArray;\n","/**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\nfunction copyArray(source, array) {\n var index = -1,\n length = source.length;\n\n array || (array = Array(length));\n while (++index < length) {\n array[index] = source[index];\n }\n return array;\n}\n\nmodule.exports = copyArray;\n","var assignValue = require('./_assignValue'),\n baseAssignValue = require('./_baseAssignValue');\n\n/**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\nfunction copyObject(source, props, object, customizer) {\n var isNew = !object;\n object || (object = {});\n\n var index = -1,\n length = props.length;\n\n while (++index < length) {\n var key = props[index];\n\n var newValue = customizer\n ? customizer(object[key], source[key], key, object, source)\n : undefined;\n\n if (newValue === undefined) {\n newValue = source[key];\n }\n if (isNew) {\n baseAssignValue(object, key, newValue);\n } else {\n assignValue(object, key, newValue);\n }\n }\n return object;\n}\n\nmodule.exports = copyObject;\n","var copyObject = require('./_copyObject'),\n getSymbols = require('./_getSymbols');\n\n/**\n * Copies own symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbols(source, object) {\n return copyObject(source, getSymbols(source), object);\n}\n\nmodule.exports = copySymbols;\n","var copyObject = require('./_copyObject'),\n getSymbolsIn = require('./_getSymbolsIn');\n\n/**\n * Copies own and inherited symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbolsIn(source, object) {\n return copyObject(source, getSymbolsIn(source), object);\n}\n\nmodule.exports = copySymbolsIn;\n","var root = require('./_root');\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\nmodule.exports = coreJsData;\n","var getNative = require('./_getNative');\n\nvar defineProperty = (function() {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n}());\n\nmodule.exports = defineProperty;\n","var SetCache = require('./_SetCache'),\n arraySome = require('./_arraySome'),\n cacheHas = require('./_cacheHas');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\nfunction equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n arrLength = array.length,\n othLength = other.length;\n\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n return false;\n }\n // Check that cyclic values are equal.\n var arrStacked = stack.get(array);\n var othStacked = stack.get(other);\n if (arrStacked && othStacked) {\n return arrStacked == other && othStacked == array;\n }\n var index = -1,\n result = true,\n seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n stack.set(array, other);\n stack.set(other, array);\n\n // Ignore non-index properties.\n while (++index < arrLength) {\n var arrValue = array[index],\n othValue = other[index];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, arrValue, index, other, array, stack)\n : customizer(arrValue, othValue, index, array, other, stack);\n }\n if (compared !== undefined) {\n if (compared) {\n continue;\n }\n result = false;\n break;\n }\n // Recursively compare arrays (susceptible to call stack limits).\n if (seen) {\n if (!arraySome(other, function(othValue, othIndex) {\n if (!cacheHas(seen, othIndex) &&\n (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n return seen.push(othIndex);\n }\n })) {\n result = false;\n break;\n }\n } else if (!(\n arrValue === othValue ||\n equalFunc(arrValue, othValue, bitmask, customizer, stack)\n )) {\n result = false;\n break;\n }\n }\n stack['delete'](array);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalArrays;\n","var Symbol = require('./_Symbol'),\n Uint8Array = require('./_Uint8Array'),\n eq = require('./eq'),\n equalArrays = require('./_equalArrays'),\n mapToArray = require('./_mapToArray'),\n setToArray = require('./_setToArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]';\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n switch (tag) {\n case dataViewTag:\n if ((object.byteLength != other.byteLength) ||\n (object.byteOffset != other.byteOffset)) {\n return false;\n }\n object = object.buffer;\n other = other.buffer;\n\n case arrayBufferTag:\n if ((object.byteLength != other.byteLength) ||\n !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n return false;\n }\n return true;\n\n case boolTag:\n case dateTag:\n case numberTag:\n // Coerce booleans to `1` or `0` and dates to milliseconds.\n // Invalid dates are coerced to `NaN`.\n return eq(+object, +other);\n\n case errorTag:\n return object.name == other.name && object.message == other.message;\n\n case regexpTag:\n case stringTag:\n // Coerce regexes to strings and treat strings, primitives and objects,\n // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n // for more details.\n return object == (other + '');\n\n case mapTag:\n var convert = mapToArray;\n\n case setTag:\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n convert || (convert = setToArray);\n\n if (object.size != other.size && !isPartial) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked) {\n return stacked == other;\n }\n bitmask |= COMPARE_UNORDERED_FLAG;\n\n // Recursively compare objects (susceptible to call stack limits).\n stack.set(object, other);\n var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n stack['delete'](object);\n return result;\n\n case symbolTag:\n if (symbolValueOf) {\n return symbolValueOf.call(object) == symbolValueOf.call(other);\n }\n }\n return false;\n}\n\nmodule.exports = equalByTag;\n","var getAllKeys = require('./_getAllKeys');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n objProps = getAllKeys(object),\n objLength = objProps.length,\n othProps = getAllKeys(other),\n othLength = othProps.length;\n\n if (objLength != othLength && !isPartial) {\n return false;\n }\n var index = objLength;\n while (index--) {\n var key = objProps[index];\n if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n return false;\n }\n }\n // Check that cyclic values are equal.\n var objStacked = stack.get(object);\n var othStacked = stack.get(other);\n if (objStacked && othStacked) {\n return objStacked == other && othStacked == object;\n }\n var result = true;\n stack.set(object, other);\n stack.set(other, object);\n\n var skipCtor = isPartial;\n while (++index < objLength) {\n key = objProps[index];\n var objValue = object[key],\n othValue = other[key];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, objValue, key, other, object, stack)\n : customizer(objValue, othValue, key, object, other, stack);\n }\n // Recursively compare objects (susceptible to call stack limits).\n if (!(compared === undefined\n ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n : compared\n )) {\n result = false;\n break;\n }\n skipCtor || (skipCtor = key == 'constructor');\n }\n if (result && !skipCtor) {\n var objCtor = object.constructor,\n othCtor = other.constructor;\n\n // Non `Object` object instances with different constructors are not equal.\n if (objCtor != othCtor &&\n ('constructor' in object && 'constructor' in other) &&\n !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n result = false;\n }\n }\n stack['delete'](object);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalObjects;\n","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n","var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbols = require('./_getSymbols'),\n keys = require('./keys');\n\n/**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeys(object) {\n return baseGetAllKeys(object, keys, getSymbols);\n}\n\nmodule.exports = getAllKeys;\n","var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbolsIn = require('./_getSymbolsIn'),\n keysIn = require('./keysIn');\n\n/**\n * Creates an array of own and inherited enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeysIn(object) {\n return baseGetAllKeys(object, keysIn, getSymbolsIn);\n}\n\nmodule.exports = getAllKeysIn;\n","var isKeyable = require('./_isKeyable');\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\nmodule.exports = getMapData;\n","var baseIsNative = require('./_baseIsNative'),\n getValue = require('./_getValue');\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\nmodule.exports = getNative;\n","var overArg = require('./_overArg');\n\n/** Built-in value references. */\nvar getPrototype = overArg(Object.getPrototypeOf, Object);\n\nmodule.exports = getPrototype;\n","var Symbol = require('./_Symbol');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nmodule.exports = getRawTag;\n","var arrayFilter = require('./_arrayFilter'),\n stubArray = require('./stubArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n if (object == null) {\n return [];\n }\n object = Object(object);\n return arrayFilter(nativeGetSymbols(object), function(symbol) {\n return propertyIsEnumerable.call(object, symbol);\n });\n};\n\nmodule.exports = getSymbols;\n","var arrayPush = require('./_arrayPush'),\n getPrototype = require('./_getPrototype'),\n getSymbols = require('./_getSymbols'),\n stubArray = require('./stubArray');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own and inherited enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {\n var result = [];\n while (object) {\n arrayPush(result, getSymbols(object));\n object = getPrototype(object);\n }\n return result;\n};\n\nmodule.exports = getSymbolsIn;\n","var DataView = require('./_DataView'),\n Map = require('./_Map'),\n Promise = require('./_Promise'),\n Set = require('./_Set'),\n WeakMap = require('./_WeakMap'),\n baseGetTag = require('./_baseGetTag'),\n toSource = require('./_toSource');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n setTag = '[object Set]',\n weakMapTag = '[object WeakMap]';\n\nvar dataViewTag = '[object DataView]';\n\n/** Used to detect maps, sets, and weakmaps. */\nvar dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nvar getTag = baseGetTag;\n\n// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\nif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = baseGetTag(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : '';\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n}\n\nmodule.exports = getTag;\n","/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\nmodule.exports = getValue;\n","var nativeCreate = require('./_nativeCreate');\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n}\n\nmodule.exports = hashClear;\n","/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = hashDelete;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\nmodule.exports = hashGet;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\nmodule.exports = hashHas;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\nmodule.exports = hashSet;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Initializes an array clone.\n *\n * @private\n * @param {Array} array The array to clone.\n * @returns {Array} Returns the initialized clone.\n */\nfunction initCloneArray(array) {\n var length = array.length,\n result = new array.constructor(length);\n\n // Add properties assigned by `RegExp#exec`.\n if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {\n result.index = array.index;\n result.input = array.input;\n }\n return result;\n}\n\nmodule.exports = initCloneArray;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer'),\n cloneDataView = require('./_cloneDataView'),\n cloneRegExp = require('./_cloneRegExp'),\n cloneSymbol = require('./_cloneSymbol'),\n cloneTypedArray = require('./_cloneTypedArray');\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/**\n * Initializes an object clone based on its `toStringTag`.\n *\n * **Note:** This function only supports cloning values with tags of\n * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.\n *\n * @private\n * @param {Object} object The object to clone.\n * @param {string} tag The `toStringTag` of the object to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneByTag(object, tag, isDeep) {\n var Ctor = object.constructor;\n switch (tag) {\n case arrayBufferTag:\n return cloneArrayBuffer(object);\n\n case boolTag:\n case dateTag:\n return new Ctor(+object);\n\n case dataViewTag:\n return cloneDataView(object, isDeep);\n\n case float32Tag: case float64Tag:\n case int8Tag: case int16Tag: case int32Tag:\n case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:\n return cloneTypedArray(object, isDeep);\n\n case mapTag:\n return new Ctor;\n\n case numberTag:\n case stringTag:\n return new Ctor(object);\n\n case regexpTag:\n return cloneRegExp(object);\n\n case setTag:\n return new Ctor;\n\n case symbolTag:\n return cloneSymbol(object);\n }\n}\n\nmodule.exports = initCloneByTag;\n","var baseCreate = require('./_baseCreate'),\n getPrototype = require('./_getPrototype'),\n isPrototype = require('./_isPrototype');\n\n/**\n * Initializes an object clone.\n *\n * @private\n * @param {Object} object The object to clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneObject(object) {\n return (typeof object.constructor == 'function' && !isPrototype(object))\n ? baseCreate(getPrototype(object))\n : {};\n}\n\nmodule.exports = initCloneObject;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n var type = typeof value;\n length = length == null ? MAX_SAFE_INTEGER : length;\n\n return !!length &&\n (type == 'number' ||\n (type != 'symbol' && reIsUint.test(value))) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\nmodule.exports = isIndex;\n","/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\nmodule.exports = isKeyable;\n","var coreJsData = require('./_coreJsData');\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\nmodule.exports = isMasked;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\nmodule.exports = isPrototype;\n","/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n}\n\nmodule.exports = listCacheClear;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype;\n\n/** Built-in value references. */\nvar splice = arrayProto.splice;\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n}\n\nmodule.exports = listCacheDelete;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\nmodule.exports = listCacheGet;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\nmodule.exports = listCacheHas;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\nmodule.exports = listCacheSet;\n","var Hash = require('./_Hash'),\n ListCache = require('./_ListCache'),\n Map = require('./_Map');\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\nmodule.exports = mapCacheClear;\n","var getMapData = require('./_getMapData');\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = mapCacheDelete;\n","var getMapData = require('./_getMapData');\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\nmodule.exports = mapCacheGet;\n","var getMapData = require('./_getMapData');\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\nmodule.exports = mapCacheHas;\n","var getMapData = require('./_getMapData');\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n}\n\nmodule.exports = mapCacheSet;\n","/**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\nfunction mapToArray(map) {\n var index = -1,\n result = Array(map.size);\n\n map.forEach(function(value, key) {\n result[++index] = [key, value];\n });\n return result;\n}\n\nmodule.exports = mapToArray;\n","var getNative = require('./_getNative');\n\n/* Built-in method references that are verified to be native. */\nvar nativeCreate = getNative(Object, 'create');\n\nmodule.exports = nativeCreate;\n","var overArg = require('./_overArg');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeKeys = overArg(Object.keys, Object);\n\nmodule.exports = nativeKeys;\n","/**\n * This function is like\n * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * except that it includes inherited enumerable properties.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction nativeKeysIn(object) {\n var result = [];\n if (object != null) {\n for (var key in Object(object)) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = nativeKeysIn;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n try {\n // Use `util.types` for Node.js 10+.\n var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n if (types) {\n return types;\n }\n\n // Legacy `process.binding('util')` for Node.js < 10.\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n}());\n\nmodule.exports = nodeUtil;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n","/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\nmodule.exports = overArg;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n","/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\nfunction setCacheAdd(value) {\n this.__data__.set(value, HASH_UNDEFINED);\n return this;\n}\n\nmodule.exports = setCacheAdd;\n","/**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\nfunction setCacheHas(value) {\n return this.__data__.has(value);\n}\n\nmodule.exports = setCacheHas;\n","/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\nfunction setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n}\n\nmodule.exports = setToArray;\n","var ListCache = require('./_ListCache');\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}\n\nmodule.exports = stackClear;\n","/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n var data = this.__data__,\n result = data['delete'](key);\n\n this.size = data.size;\n return result;\n}\n\nmodule.exports = stackDelete;\n","/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n return this.__data__.get(key);\n}\n\nmodule.exports = stackGet;\n","/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n return this.__data__.has(key);\n}\n\nmodule.exports = stackHas;\n","var ListCache = require('./_ListCache'),\n Map = require('./_Map'),\n MapCache = require('./_MapCache');\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n var data = this.__data__;\n if (data instanceof ListCache) {\n var pairs = data.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n this.size = ++data.size;\n return this;\n }\n data = this.__data__ = new MapCache(pairs);\n }\n data.set(key, value);\n this.size = data.size;\n return this;\n}\n\nmodule.exports = stackSet;\n","/** Used for built-in method references. */\nvar funcProto = Function.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\nmodule.exports = toSource;\n","var baseClone = require('./_baseClone');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_SYMBOLS_FLAG = 4;\n\n/**\n * This method is like `_.clone` except that it recursively clones `value`.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Lang\n * @param {*} value The value to recursively clone.\n * @returns {*} Returns the deep cloned value.\n * @see _.clone\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var deep = _.cloneDeep(objects);\n * console.log(deep[0] === objects[0]);\n * // => false\n */\nfunction cloneDeep(value) {\n return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);\n}\n\nmodule.exports = cloneDeep;\n","/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\nmodule.exports = eq;\n","var baseIsArguments = require('./_baseIsArguments'),\n isObjectLike = require('./isObjectLike');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n};\n\nmodule.exports = isArguments;\n","/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\nmodule.exports = isArray;\n","var isFunction = require('./isFunction'),\n isLength = require('./isLength');\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\nmodule.exports = isArrayLike;\n","var root = require('./_root'),\n stubFalse = require('./stubFalse');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\nmodule.exports = isBuffer;\n","var baseIsEqual = require('./_baseIsEqual');\n\n/**\n * Performs a deep comparison between two values to determine if they are\n * equivalent.\n *\n * **Note:** This method supports comparing arrays, array buffers, booleans,\n * date objects, error objects, maps, numbers, `Object` objects, regexes,\n * sets, strings, symbols, and typed arrays. `Object` objects are compared\n * by their own, not inherited, enumerable properties. Functions and DOM\n * nodes are compared by strict equality, i.e. `===`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.isEqual(object, other);\n * // => true\n *\n * object === other;\n * // => false\n */\nfunction isEqual(value, other) {\n return baseIsEqual(value, other);\n}\n\nmodule.exports = isEqual;\n","var baseGetTag = require('./_baseGetTag'),\n isObject = require('./isObject');\n\n/** `Object#toString` result references. */\nvar asyncTag = '[object AsyncFunction]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n proxyTag = '[object Proxy]';\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\nmodule.exports = isFunction;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\nmodule.exports = isLength;\n","var baseIsMap = require('./_baseIsMap'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsMap = nodeUtil && nodeUtil.isMap;\n\n/**\n * Checks if `value` is classified as a `Map` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n * @example\n *\n * _.isMap(new Map);\n * // => true\n *\n * _.isMap(new WeakMap);\n * // => false\n */\nvar isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;\n\nmodule.exports = isMap;\n","/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n","var baseIsSet = require('./_baseIsSet'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsSet = nodeUtil && nodeUtil.isSet;\n\n/**\n * Checks if `value` is classified as a `Set` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n * @example\n *\n * _.isSet(new Set);\n * // => true\n *\n * _.isSet(new WeakSet);\n * // => false\n */\nvar isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;\n\nmodule.exports = isSet;\n","var baseIsTypedArray = require('./_baseIsTypedArray'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\nmodule.exports = isTypedArray;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeys = require('./_baseKeys'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\nmodule.exports = keys;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeysIn = require('./_baseKeysIn'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\nfunction keysIn(object) {\n return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n}\n\nmodule.exports = keysIn;\n","/**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\nfunction stubArray() {\n return [];\n}\n\nmodule.exports = stubArray;\n","/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n return false;\n}\n\nmodule.exports = stubFalse;\n","import { connect } from \"@openfin/core-web\";\nimport { getSettings } from \"./settings\";\n\n/**\n * Initializes the OpenFin Web Broker connection.\n */\nexport async function init(): Promise {\n\t// Set window.fin to the `fin` object.\n\tif (window.fin === undefined) {\n\t\tconst settings = await getSettings();\n\t\t// Specify an interopConfig with a specific provider ID and a context group to initialize the `fin.me.interop` client on connection.\n\t\twindow.fin = await connect({\n\t\t\toptions: {\n\t\t\t\tbrokerUrl: settings.platform.brokerUrl,\n\t\t\t\tinteropConfig: {\n\t\t\t\t\tproviderId: settings.platform.providerId,\n\t\t\t\t\tcurrentContextGroup: settings.platform.defaultContextGroup\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tconsole.log(\"Finished initializing the fin API.\");\n\t\t// Create and dispatch the finReady event\n\t\tconst event = new CustomEvent(\"finReady\");\n\t\twindow.dispatchEvent(event);\n\t}\n\n\tif (window.fdc3 === undefined && window?.fin?.me.interop?.getFDC3Sync !== undefined) {\n\t\twindow.fdc3 = fin.me.interop.getFDC3Sync(\"2.0\");\n\t\tconsole.log(\"Finished initializing the fdc3 API.\");\n\t\t// Create and dispatch the FDC3Ready event\n\t\tconst event = new CustomEvent(\"fdc3Ready\");\n\t\twindow.dispatchEvent(event);\n\t}\n}\n","import type { Settings } from \"../shapes/setting-shapes\";\n\n/**\n * Fetches the settings for the application.\n * @returns The settings for the application.\n */\nexport async function getSettings(): Promise {\n\treturn {\n\t\tplatform: {\n\t\t\tsharedWorkerUrl: \"http://localhost:6060/js/shared-worker.bundle.js\",\n\t\t\tbrokerUrl: \"http://localhost:6060/platform/iframe-broker.html\",\n\t\t\tproviderId: \"web-interop-basic\",\n\t\t\tdefaultContextGroup: \"green\"\n\t\t}\n\t};\n}\n","export { default as v1 } from './v1.js';\nexport { default as v3 } from './v3.js';\nexport { default as v4 } from './v4.js';\nexport { default as v5 } from './v5.js';\nexport { default as NIL } from './nil.js';\nexport { default as version } from './version.js';\nexport { default as validate } from './validate.js';\nexport { default as stringify } from './stringify.js';\nexport { default as parse } from './parse.js';","/*\n * Browser-compatible JavaScript MD5\n *\n * Modification of JavaScript MD5\n * https://github.com/blueimp/JavaScript-MD5\n *\n * Copyright 2011, Sebastian Tschan\n * https://blueimp.net\n *\n * Licensed under the MIT license:\n * https://opensource.org/licenses/MIT\n *\n * Based on\n * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message\n * Digest Algorithm, as defined in RFC 1321.\n * Version 2.2 Copyright (C) Paul Johnston 1999 - 2009\n * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet\n * Distributed under the BSD License\n * See http://pajhome.org.uk/crypt/md5 for more info.\n */\nfunction md5(bytes) {\n if (typeof bytes === 'string') {\n var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape\n\n bytes = new Uint8Array(msg.length);\n\n for (var i = 0; i < msg.length; ++i) {\n bytes[i] = msg.charCodeAt(i);\n }\n }\n\n return md5ToHexEncodedArray(wordsToMd5(bytesToWords(bytes), bytes.length * 8));\n}\n/*\n * Convert an array of little-endian words to an array of bytes\n */\n\n\nfunction md5ToHexEncodedArray(input) {\n var output = [];\n var length32 = input.length * 32;\n var hexTab = '0123456789abcdef';\n\n for (var i = 0; i < length32; i += 8) {\n var x = input[i >> 5] >>> i % 32 & 0xff;\n var hex = parseInt(hexTab.charAt(x >>> 4 & 0x0f) + hexTab.charAt(x & 0x0f), 16);\n output.push(hex);\n }\n\n return output;\n}\n/**\n * Calculate output length with padding and bit length\n */\n\n\nfunction getOutputLength(inputLength8) {\n return (inputLength8 + 64 >>> 9 << 4) + 14 + 1;\n}\n/*\n * Calculate the MD5 of an array of little-endian words, and a bit length.\n */\n\n\nfunction wordsToMd5(x, len) {\n /* append padding */\n x[len >> 5] |= 0x80 << len % 32;\n x[getOutputLength(len) - 1] = len;\n var a = 1732584193;\n var b = -271733879;\n var c = -1732584194;\n var d = 271733878;\n\n for (var i = 0; i < x.length; i += 16) {\n var olda = a;\n var oldb = b;\n var oldc = c;\n var oldd = d;\n a = md5ff(a, b, c, d, x[i], 7, -680876936);\n d = md5ff(d, a, b, c, x[i + 1], 12, -389564586);\n c = md5ff(c, d, a, b, x[i + 2], 17, 606105819);\n b = md5ff(b, c, d, a, x[i + 3], 22, -1044525330);\n a = md5ff(a, b, c, d, x[i + 4], 7, -176418897);\n d = md5ff(d, a, b, c, x[i + 5], 12, 1200080426);\n c = md5ff(c, d, a, b, x[i + 6], 17, -1473231341);\n b = md5ff(b, c, d, a, x[i + 7], 22, -45705983);\n a = md5ff(a, b, c, d, x[i + 8], 7, 1770035416);\n d = md5ff(d, a, b, c, x[i + 9], 12, -1958414417);\n c = md5ff(c, d, a, b, x[i + 10], 17, -42063);\n b = md5ff(b, c, d, a, x[i + 11], 22, -1990404162);\n a = md5ff(a, b, c, d, x[i + 12], 7, 1804603682);\n d = md5ff(d, a, b, c, x[i + 13], 12, -40341101);\n c = md5ff(c, d, a, b, x[i + 14], 17, -1502002290);\n b = md5ff(b, c, d, a, x[i + 15], 22, 1236535329);\n a = md5gg(a, b, c, d, x[i + 1], 5, -165796510);\n d = md5gg(d, a, b, c, x[i + 6], 9, -1069501632);\n c = md5gg(c, d, a, b, x[i + 11], 14, 643717713);\n b = md5gg(b, c, d, a, x[i], 20, -373897302);\n a = md5gg(a, b, c, d, x[i + 5], 5, -701558691);\n d = md5gg(d, a, b, c, x[i + 10], 9, 38016083);\n c = md5gg(c, d, a, b, x[i + 15], 14, -660478335);\n b = md5gg(b, c, d, a, x[i + 4], 20, -405537848);\n a = md5gg(a, b, c, d, x[i + 9], 5, 568446438);\n d = md5gg(d, a, b, c, x[i + 14], 9, -1019803690);\n c = md5gg(c, d, a, b, x[i + 3], 14, -187363961);\n b = md5gg(b, c, d, a, x[i + 8], 20, 1163531501);\n a = md5gg(a, b, c, d, x[i + 13], 5, -1444681467);\n d = md5gg(d, a, b, c, x[i + 2], 9, -51403784);\n c = md5gg(c, d, a, b, x[i + 7], 14, 1735328473);\n b = md5gg(b, c, d, a, x[i + 12], 20, -1926607734);\n a = md5hh(a, b, c, d, x[i + 5], 4, -378558);\n d = md5hh(d, a, b, c, x[i + 8], 11, -2022574463);\n c = md5hh(c, d, a, b, x[i + 11], 16, 1839030562);\n b = md5hh(b, c, d, a, x[i + 14], 23, -35309556);\n a = md5hh(a, b, c, d, x[i + 1], 4, -1530992060);\n d = md5hh(d, a, b, c, x[i + 4], 11, 1272893353);\n c = md5hh(c, d, a, b, x[i + 7], 16, -155497632);\n b = md5hh(b, c, d, a, x[i + 10], 23, -1094730640);\n a = md5hh(a, b, c, d, x[i + 13], 4, 681279174);\n d = md5hh(d, a, b, c, x[i], 11, -358537222);\n c = md5hh(c, d, a, b, x[i + 3], 16, -722521979);\n b = md5hh(b, c, d, a, x[i + 6], 23, 76029189);\n a = md5hh(a, b, c, d, x[i + 9], 4, -640364487);\n d = md5hh(d, a, b, c, x[i + 12], 11, -421815835);\n c = md5hh(c, d, a, b, x[i + 15], 16, 530742520);\n b = md5hh(b, c, d, a, x[i + 2], 23, -995338651);\n a = md5ii(a, b, c, d, x[i], 6, -198630844);\n d = md5ii(d, a, b, c, x[i + 7], 10, 1126891415);\n c = md5ii(c, d, a, b, x[i + 14], 15, -1416354905);\n b = md5ii(b, c, d, a, x[i + 5], 21, -57434055);\n a = md5ii(a, b, c, d, x[i + 12], 6, 1700485571);\n d = md5ii(d, a, b, c, x[i + 3], 10, -1894986606);\n c = md5ii(c, d, a, b, x[i + 10], 15, -1051523);\n b = md5ii(b, c, d, a, x[i + 1], 21, -2054922799);\n a = md5ii(a, b, c, d, x[i + 8], 6, 1873313359);\n d = md5ii(d, a, b, c, x[i + 15], 10, -30611744);\n c = md5ii(c, d, a, b, x[i + 6], 15, -1560198380);\n b = md5ii(b, c, d, a, x[i + 13], 21, 1309151649);\n a = md5ii(a, b, c, d, x[i + 4], 6, -145523070);\n d = md5ii(d, a, b, c, x[i + 11], 10, -1120210379);\n c = md5ii(c, d, a, b, x[i + 2], 15, 718787259);\n b = md5ii(b, c, d, a, x[i + 9], 21, -343485551);\n a = safeAdd(a, olda);\n b = safeAdd(b, oldb);\n c = safeAdd(c, oldc);\n d = safeAdd(d, oldd);\n }\n\n return [a, b, c, d];\n}\n/*\n * Convert an array bytes to an array of little-endian words\n * Characters >255 have their high-byte silently ignored.\n */\n\n\nfunction bytesToWords(input) {\n if (input.length === 0) {\n return [];\n }\n\n var length8 = input.length * 8;\n var output = new Uint32Array(getOutputLength(length8));\n\n for (var i = 0; i < length8; i += 8) {\n output[i >> 5] |= (input[i / 8] & 0xff) << i % 32;\n }\n\n return output;\n}\n/*\n * Add integers, wrapping at 2^32. This uses 16-bit operations internally\n * to work around bugs in some JS interpreters.\n */\n\n\nfunction safeAdd(x, y) {\n var lsw = (x & 0xffff) + (y & 0xffff);\n var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n return msw << 16 | lsw & 0xffff;\n}\n/*\n * Bitwise rotate a 32-bit number to the left.\n */\n\n\nfunction bitRotateLeft(num, cnt) {\n return num << cnt | num >>> 32 - cnt;\n}\n/*\n * These functions implement the four basic operations the algorithm uses.\n */\n\n\nfunction md5cmn(q, a, b, x, s, t) {\n return safeAdd(bitRotateLeft(safeAdd(safeAdd(a, q), safeAdd(x, t)), s), b);\n}\n\nfunction md5ff(a, b, c, d, x, s, t) {\n return md5cmn(b & c | ~b & d, a, b, x, s, t);\n}\n\nfunction md5gg(a, b, c, d, x, s, t) {\n return md5cmn(b & d | c & ~d, a, b, x, s, t);\n}\n\nfunction md5hh(a, b, c, d, x, s, t) {\n return md5cmn(b ^ c ^ d, a, b, x, s, t);\n}\n\nfunction md5ii(a, b, c, d, x, s, t) {\n return md5cmn(c ^ (b | ~d), a, b, x, s, t);\n}\n\nexport default md5;","export default '00000000-0000-0000-0000-000000000000';","import validate from './validate.js';\n\nfunction parse(uuid) {\n if (!validate(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n var v;\n var arr = new Uint8Array(16); // Parse ########-....-....-....-............\n\n arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24;\n arr[1] = v >>> 16 & 0xff;\n arr[2] = v >>> 8 & 0xff;\n arr[3] = v & 0xff; // Parse ........-####-....-....-............\n\n arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8;\n arr[5] = v & 0xff; // Parse ........-....-####-....-............\n\n arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8;\n arr[7] = v & 0xff; // Parse ........-....-....-####-............\n\n arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8;\n arr[9] = v & 0xff; // Parse ........-....-....-....-############\n // (Use \"/\" to avoid 32-bit truncation when bit-shifting high-order bytes)\n\n arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff;\n arr[11] = v / 0x100000000 & 0xff;\n arr[12] = v >>> 24 & 0xff;\n arr[13] = v >>> 16 & 0xff;\n arr[14] = v >>> 8 & 0xff;\n arr[15] = v & 0xff;\n return arr;\n}\n\nexport default parse;","export default /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;","// Unique ID creation requires a high quality random # generator. In the browser we therefore\n// require the crypto API and do not support built-in fallback to lower quality random number\n// generators (like Math.random()).\nvar getRandomValues;\nvar rnds8 = new Uint8Array(16);\nexport default function rng() {\n // lazy load so that environments that need to polyfill have a chance to do so\n if (!getRandomValues) {\n // getRandomValues needs to be invoked in a context where \"this\" is a Crypto implementation. Also,\n // find the complete implementation of crypto (msCrypto) on IE11.\n getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto !== 'undefined' && typeof msCrypto.getRandomValues === 'function' && msCrypto.getRandomValues.bind(msCrypto);\n\n if (!getRandomValues) {\n throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');\n }\n }\n\n return getRandomValues(rnds8);\n}","// Adapted from Chris Veness' SHA1 code at\n// http://www.movable-type.co.uk/scripts/sha1.html\nfunction f(s, x, y, z) {\n switch (s) {\n case 0:\n return x & y ^ ~x & z;\n\n case 1:\n return x ^ y ^ z;\n\n case 2:\n return x & y ^ x & z ^ y & z;\n\n case 3:\n return x ^ y ^ z;\n }\n}\n\nfunction ROTL(x, n) {\n return x << n | x >>> 32 - n;\n}\n\nfunction sha1(bytes) {\n var K = [0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xca62c1d6];\n var H = [0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0];\n\n if (typeof bytes === 'string') {\n var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape\n\n bytes = [];\n\n for (var i = 0; i < msg.length; ++i) {\n bytes.push(msg.charCodeAt(i));\n }\n } else if (!Array.isArray(bytes)) {\n // Convert Array-like to Array\n bytes = Array.prototype.slice.call(bytes);\n }\n\n bytes.push(0x80);\n var l = bytes.length / 4 + 2;\n var N = Math.ceil(l / 16);\n var M = new Array(N);\n\n for (var _i = 0; _i < N; ++_i) {\n var arr = new Uint32Array(16);\n\n for (var j = 0; j < 16; ++j) {\n arr[j] = bytes[_i * 64 + j * 4] << 24 | bytes[_i * 64 + j * 4 + 1] << 16 | bytes[_i * 64 + j * 4 + 2] << 8 | bytes[_i * 64 + j * 4 + 3];\n }\n\n M[_i] = arr;\n }\n\n M[N - 1][14] = (bytes.length - 1) * 8 / Math.pow(2, 32);\n M[N - 1][14] = Math.floor(M[N - 1][14]);\n M[N - 1][15] = (bytes.length - 1) * 8 & 0xffffffff;\n\n for (var _i2 = 0; _i2 < N; ++_i2) {\n var W = new Uint32Array(80);\n\n for (var t = 0; t < 16; ++t) {\n W[t] = M[_i2][t];\n }\n\n for (var _t = 16; _t < 80; ++_t) {\n W[_t] = ROTL(W[_t - 3] ^ W[_t - 8] ^ W[_t - 14] ^ W[_t - 16], 1);\n }\n\n var a = H[0];\n var b = H[1];\n var c = H[2];\n var d = H[3];\n var e = H[4];\n\n for (var _t2 = 0; _t2 < 80; ++_t2) {\n var s = Math.floor(_t2 / 20);\n var T = ROTL(a, 5) + f(s, b, c, d) + e + K[s] + W[_t2] >>> 0;\n e = d;\n d = c;\n c = ROTL(b, 30) >>> 0;\n b = a;\n a = T;\n }\n\n H[0] = H[0] + a >>> 0;\n H[1] = H[1] + b >>> 0;\n H[2] = H[2] + c >>> 0;\n H[3] = H[3] + d >>> 0;\n H[4] = H[4] + e >>> 0;\n }\n\n return [H[0] >> 24 & 0xff, H[0] >> 16 & 0xff, H[0] >> 8 & 0xff, H[0] & 0xff, H[1] >> 24 & 0xff, H[1] >> 16 & 0xff, H[1] >> 8 & 0xff, H[1] & 0xff, H[2] >> 24 & 0xff, H[2] >> 16 & 0xff, H[2] >> 8 & 0xff, H[2] & 0xff, H[3] >> 24 & 0xff, H[3] >> 16 & 0xff, H[3] >> 8 & 0xff, H[3] & 0xff, H[4] >> 24 & 0xff, H[4] >> 16 & 0xff, H[4] >> 8 & 0xff, H[4] & 0xff];\n}\n\nexport default sha1;","import validate from './validate.js';\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\n\nvar byteToHex = [];\n\nfor (var i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).substr(1));\n}\n\nfunction stringify(arr) {\n var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n var uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!validate(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n\n return uuid;\n}\n\nexport default stringify;","import rng from './rng.js';\nimport stringify from './stringify.js'; // **`v1()` - Generate time-based UUID**\n//\n// Inspired by https://github.com/LiosK/UUID.js\n// and http://docs.python.org/library/uuid.html\n\nvar _nodeId;\n\nvar _clockseq; // Previous uuid creation time\n\n\nvar _lastMSecs = 0;\nvar _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details\n\nfunction v1(options, buf, offset) {\n var i = buf && offset || 0;\n var b = buf || new Array(16);\n options = options || {};\n var node = options.node || _nodeId;\n var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not\n // specified. We do this lazily to minimize issues related to insufficient\n // system entropy. See #189\n\n if (node == null || clockseq == null) {\n var seedBytes = options.random || (options.rng || rng)();\n\n if (node == null) {\n // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)\n node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]];\n }\n\n if (clockseq == null) {\n // Per 4.2.2, randomize (14 bit) clockseq\n clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;\n }\n } // UUID timestamps are 100 nano-second units since the Gregorian epoch,\n // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so\n // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'\n // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.\n\n\n var msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock\n // cycle to simulate higher resolution clock\n\n var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs)\n\n var dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression\n\n if (dt < 0 && options.clockseq === undefined) {\n clockseq = clockseq + 1 & 0x3fff;\n } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new\n // time interval\n\n\n if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {\n nsecs = 0;\n } // Per 4.2.1.2 Throw error if too many uuids are requested\n\n\n if (nsecs >= 10000) {\n throw new Error(\"uuid.v1(): Can't create more than 10M uuids/sec\");\n }\n\n _lastMSecs = msecs;\n _lastNSecs = nsecs;\n _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch\n\n msecs += 12219292800000; // `time_low`\n\n var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;\n b[i++] = tl >>> 24 & 0xff;\n b[i++] = tl >>> 16 & 0xff;\n b[i++] = tl >>> 8 & 0xff;\n b[i++] = tl & 0xff; // `time_mid`\n\n var tmh = msecs / 0x100000000 * 10000 & 0xfffffff;\n b[i++] = tmh >>> 8 & 0xff;\n b[i++] = tmh & 0xff; // `time_high_and_version`\n\n b[i++] = tmh >>> 24 & 0xf | 0x10; // include version\n\n b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)\n\n b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low`\n\n b[i++] = clockseq & 0xff; // `node`\n\n for (var n = 0; n < 6; ++n) {\n b[i + n] = node[n];\n }\n\n return buf || stringify(b);\n}\n\nexport default v1;","import v35 from './v35.js';\nimport md5 from './md5.js';\nvar v3 = v35('v3', 0x30, md5);\nexport default v3;","import stringify from './stringify.js';\nimport parse from './parse.js';\n\nfunction stringToBytes(str) {\n str = unescape(encodeURIComponent(str)); // UTF8 escape\n\n var bytes = [];\n\n for (var i = 0; i < str.length; ++i) {\n bytes.push(str.charCodeAt(i));\n }\n\n return bytes;\n}\n\nexport var DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8';\nexport var URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8';\nexport default function (name, version, hashfunc) {\n function generateUUID(value, namespace, buf, offset) {\n if (typeof value === 'string') {\n value = stringToBytes(value);\n }\n\n if (typeof namespace === 'string') {\n namespace = parse(namespace);\n }\n\n if (namespace.length !== 16) {\n throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)');\n } // Compute hash of namespace and value, Per 4.3\n // Future: Use spread syntax when supported on all platforms, e.g. `bytes =\n // hashfunc([...namespace, ... value])`\n\n\n var bytes = new Uint8Array(16 + value.length);\n bytes.set(namespace);\n bytes.set(value, namespace.length);\n bytes = hashfunc(bytes);\n bytes[6] = bytes[6] & 0x0f | version;\n bytes[8] = bytes[8] & 0x3f | 0x80;\n\n if (buf) {\n offset = offset || 0;\n\n for (var i = 0; i < 16; ++i) {\n buf[offset + i] = bytes[i];\n }\n\n return buf;\n }\n\n return stringify(bytes);\n } // Function#name is not settable on some platforms (#270)\n\n\n try {\n generateUUID.name = name; // eslint-disable-next-line no-empty\n } catch (err) {} // For CommonJS default export support\n\n\n generateUUID.DNS = DNS;\n generateUUID.URL = URL;\n return generateUUID;\n}","import rng from './rng.js';\nimport stringify from './stringify.js';\n\nfunction v4(options, buf, offset) {\n options = options || {};\n var rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n offset = offset || 0;\n\n for (var i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n\n return buf;\n }\n\n return stringify(rnds);\n}\n\nexport default v4;","import v35 from './v35.js';\nimport sha1 from './sha1.js';\nvar v5 = v35('v5', 0x50, sha1);\nexport default v5;","import REGEX from './regex.js';\n\nfunction validate(uuid) {\n return typeof uuid === 'string' && REGEX.test(uuid);\n}\n\nexport default validate;","import validate from './validate.js';\n\nfunction version(uuid) {\n if (!validate(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n return parseInt(uuid.substr(14, 1), 16);\n}\n\nexport default version;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = (module) => {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","import type { Context } from \"@finos/fdc3\";\nimport { init } from \"../platform/api\";\n\nwindow.addEventListener(\"DOMContentLoaded\", async () => {\n\tawait init();\n\tawait initializeDOM();\n});\n\n/**\n * Broadcasts a context using FDC3.\n */\nasync function broadcastContext(): Promise {\n\tconst contextType = \"fdc3.instrument\";\n\tconst contextName = \"Apple\";\n\tconst idData = {\n\t\tticker: \"AAPL\"\n\t};\n\tconst context = {\n\t\ttype: contextType,\n\t\tname: contextName,\n\t\tid: idData\n\t};\n\tif (window.fdc3) {\n\t\tawait window.fdc3.broadcast(context);\n\t\tconsole.log(`Broadcasted context: ${contextType} - ${contextName}`);\n\t} else {\n\t\twindow.addEventListener(\"fdc3Ready\", async () => {\n\t\t\tawait window.fdc3.broadcast(context);\n\t\t\tconsole.log(`Broadcasted context: ${contextType} - ${contextName}`);\n\t\t});\n\t}\n}\n\n/**\n * Adds an FDC3 context listener to the window.\n */\nasync function addFDC3Listener(): Promise {\n\tif (window.fdc3) {\n\t\tawait window.fdc3.addContextListener(null, (context) => {\n\t\t\tupdateDOMElements(context);\n\t\t});\n\t} else {\n\t\twindow.addEventListener(\"fdc3Ready\", async () => {\n\t\t\tawait window.fdc3.addContextListener(null, (context) => {\n\t\t\t\tupdateDOMElements(context);\n\t\t\t});\n\t\t});\n\t}\n}\n\n/**\n * Updates the DOM elements with the provided context.\n * @param context The context to update the DOM elements with.\n */\nfunction updateDOMElements(context: Context): void {\n\tconst contextTypeSpan = document.querySelector(\"#contextType\");\n\tconst contextNameSpan = document.querySelector(\"#contextName\");\n\tconst contextBodyPre = document.querySelector(\"#contextBody\");\n\n\tif (contextTypeSpan !== null && contextNameSpan !== null && contextBodyPre !== null) {\n\t\tcontextTypeSpan.textContent = context.type;\n\t\tcontextNameSpan.textContent = context.name ?? \"No name provided.\";\n\t\tcontextBodyPre.textContent = JSON.stringify(context, null, 2);\n\t}\n}\n\n/**\n * Initialize the DOM elements.\n */\nasync function initializeDOM(): Promise {\n\tconst broadcastButton = document.querySelector(\"#broadcast\");\n\n\tif (broadcastButton !== null) {\n\t\tbroadcastButton.addEventListener(\"click\", async () => {\n\t\t\tawait broadcastContext();\n\t\t});\n\t}\n\n\tawait addFDC3Listener();\n}\n"],"names":[],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"fdc3-view.bundle.js","mappings":";;;;;;;;;;AAAa,MAAM,mBAAO,CAAC,qFAAoB,EAAE,mBAAO,CAAC,mDAAS,EAAE,mBAAO,CAAC,+DAAM,EAAE,mBAAO,CAAC,mDAAQ,EAAE,mBAAO,CAAC,gEAAkB,EAAE,mBAAO,CAAC,4DAAgB,EAAE,eAAe;;;;;;;;;;;;ACA9J,MAAM,mBAAO,CAAC,mDAAS,IAAI,mBAAO,CAAC,mDAAQ,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IAAI,kCAAkC,OAAO,EAAE,GAAG,mHAAmH,OAAO,0BAA0B,oBAAoB,aAAa,yBAAyB,iBAAiB,qCAAqC,EAAE,cAAc,2CAA2C,kDAAkD,OAAO,uBAAuB,SAAS,MAAM,OAAO,cAAc,eAAe,2BAA2B,OAAO,eAAe,sDAAsD,oCAAoC,IAAI,iIAAiI,sBAAsB,yCAAyC,2FAA2F;;;;;;;;;;;;ACFv6nD;;AAEZ,kBAAkB;AAClB,mBAAmB;AACnB,qBAAqB;;AAErB;AACA;AACA;;AAEA;AACA,mCAAmC,SAAS;AAC5C;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,cAAc,SAAS;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,2CAA2C,UAAU;AACrD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;ACrJA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEY;;AAEZ,eAAe,mBAAO,CAAC,wDAAW;AAClC,gBAAgB,mBAAO,CAAC,oDAAS;AACjC;AACA;AACA;AACA;;AAEA,cAAc;AACd,kBAAkB;AAClB,yBAAyB;;AAEzB;AACA,kBAAkB;;AAElB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,kBAAkB,YAAY;AAC9B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA,wCAAwC,SAAS;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;;AAEA;AACA;AACA,cAAc,iBAAiB;AAC/B;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,iDAAiD,EAAE;AACnD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C;AAC1C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA,yBAAyB,eAAe;AACxC;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,yBAAyB,QAAQ;AACjC;AACA,sBAAsB,eAAe;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc,YAAY;AAC1B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB,sBAAsB;AACxC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,mBAAmB;AACnB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA,oBAAoB,SAAS;AAC7B;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA,qBAAqB,WAAW,GAAG,IAAI;AACvC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA,gBAAgB,WAAW,GAAG,IAAI,KAAK,aAAa;AACpD;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;;AAEA;AACA,GAAG;AACH;AACA;AACA,mBAAmB,KAAK,mDAAmD,cAAc;AACzF,GAAG;AACH;AACA;AACA,+BAA+B,IAAI;AACnC;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,MAAM,aAAa,SAAS;AACtD;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,SAAS,gBAAgB;AACzB,cAAc,oBAAoB,EAAE,IAAI;AACxC;AACA,YAAY,gBAAgB,EAAE,IAAI;AAClC;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,GAAG,SAAS,GAAG,KAAK,qBAAqB,EAAE,EAAE;AACpE,QAAQ;AACR,yBAAyB,GAAG,KAAK,yBAAyB,EAAE,EAAE;AAC9D,mBAAmB,yBAAyB,EAAE,EAAE;AAChD;AACA,MAAM;AACN,oBAAoB,IAAI,EAAE,GAAG,SAAS,IAAI,EAAE,EAAE;AAC9C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,0CAA0C,cAAc,SAAS,OAAO;AACxE;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,kBAAkB,YAAY;AAC9B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,kBAAkB,gBAAgB;AAClC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,kBAAkB,gBAAgB;AAClC;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,cAAc,YAAY;AAC1B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,QAAQ;AAC1B;AACA,oBAAoB,QAAQ;AAC5B;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;;;;;ACzjEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEa;;AAEb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB;;AAEnB;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,sBAAsB;AACxC;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA,eAAe;AACf;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA,oBAAoB,SAAS;AAC7B;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;;AAEA,kCAAkC,QAAQ;AAC1C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oBAAoB,iBAAiB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,QAAQ;AACR;AACA,uCAAuC,QAAQ;AAC/C;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,OAAO;AACzB;AACA;AACA;;AAEA;AACA,SAAS,yBAAyB;AAClC;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,gBAAgB;AAClC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,8DAA8D,YAAY;AAC1E;AACA,8DAA8D,YAAY;AAC1E;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,qCAAqC,YAAY;AACjD;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;AACA;;;;;;;;;;;AChfA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,SAAS,WAAW;;AAEpB;AACA;AACA;AACA,SAAS,WAAW;;AAEpB;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;A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A,WAAW,OAAO;AAClB,WAAW,UAAU;AACrB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACxBA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,kBAAkB,mBAAO,CAAC,+DAAe;AACzC,cAAc,mBAAO,CAAC,uDAAW;AACjC,eAAe,mBAAO,CAAC,yDAAY;AACnC,cAAc,mBAAO,CAAC,yDAAY;AAClC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,SAAS;AACpB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AChDA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACnBA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,UAAU;AACrB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACtBA,sBAAsB,mBAAO,CAAC,yEAAoB;AAClD,SAAS,mBAAO,CAAC,6CAAM;;AAEvB;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC3BA,SAAS,mBAAO,CAAC,6CAAM;;AAEvB;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,GAAG;AACd,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mBAAO,CAAC,uDAAW;AACjC,eAAe,mBAAO,CAAC,yDAAY;AACnC,YAAY,mBAAO,CAAC,mDAAS;AAC7B,eAAe,mBAAO,CAAC,yDAAY;AACnC,YAAY,mBAAO,CAAC,mDAAS;AAC7B,WAAW,mBAAO,CAAC,iDAAQ;AAC3B,aAAa,mBAAO,CAAC,qDAAU;;AAE/B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,SAAS;AACpB;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa,GAAG;AAChB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;AACA,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;;;;;;;;;;ACrKA,eAAe,mBAAO,CAAC,yDAAY;;AAEnC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,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iEAAgB;;AAE3C;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClFA,aAAa,mBAAO,CAAC,uDAAW;AAChC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA,iBAAiB,mBAAO,CAAC,6DAAc;AACvC,eAAe,mBAAO,CAAC,2DAAa;AACpC,eAAe,mBAAO,CAAC,yDAAY;AACnC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;AACA;AACA;AACA,oCAAoC;;AAEpC;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC9CA,aAAa,mBAAO,CAAC,uDAAW;AAChC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,eAAe,mBAAO,CAAC,yDAAY;AACnC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC3DA,kBAAkB,mBAAO,CAAC,iEAAgB;AAC1C,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC7BA,eAAe,mBAAO,CAAC,yDAAY;AACnC,kBAAkB,mBAAO,CAAC,iEAAgB;AAC1C,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AChCA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACnBA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,aAAa,UAAU;AACvB;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACbA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;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EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACnFA,aAAa,mBAAO,CAAC,uDAAW;AAChC,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,SAAS,mBAAO,CAAC,6CAAM;AACvB,kBAAkB,mBAAO,CAAC,iEAAgB;AAC1C,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC/GA,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,aAAa,SAAS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A;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACzDA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa,GAAG;AAChB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACZA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACdA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AChBA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,GAAG;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC7BA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACtBA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACtBA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACzBA,uBAAuB,mBAAO,CAAC,2EAAqB;AACpD,oBAAoB,mBAAO,CAAC,qEAAkB;AAC9C,kBAAkB,mBAAO,CAAC,iEAAgB;AAC1C,kBAAkB,mBAAO,CAAC,iEAAgB;AAC1C,sBAAsB,mBAAO,CAAC,yEAAoB;;AAElD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC5EA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,mBAAmB,mBAAO,CAAC,mEAAiB;AAC5C,kBAAkB,mBAAO,CAAC,iEAAgB;;AAE1C;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACxBA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACdA,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACnBA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACZA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClCA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,GAAG;AAChB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;AClBA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACfA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACzBA,WAAW,mBAAO,CAAC,mDAAS;AAC5B,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,UAAU,mBAAO,CAAC,iDAAQ;;AAE1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpBA,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;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;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,aAAa,UAAU;AACvB;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACdA,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;ACRA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACbA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;;;;;;;;;;ACjBA,gBAAgB,mBAAO,CAAC,6DAAc;;AAEtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACdA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,GAAG;AAChB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACbA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACbA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,UAAU,mBAAO,CAAC,iDAAQ;AAC1B,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjCA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;;;;;;;;;;;ACzBA,gBAAgB,mBAAO,CAAC,6DAAc;;AAEtC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,GAAG;AAChB;AACA;AACA;AACA,oBAAoB,QAAQ,IAAI,QAAQ;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,kBAAkB;AAClB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpCA,sBAAsB,mBAAO,CAAC,yEAAoB;AAClD,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA,8BAA8B,mBAAmB;AACjD;AACA;AACA;AACA;AACA;AACA,+CAA+C,mBAAmB;AAClE;AACA;AACA;;AAEA;;;;;;;;;;;ACnCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACzBA,iBAAiB,mBAAO,CAAC,6DAAc;AACvC,eAAe,mBAAO,CAAC,yDAAY;;AAEnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AChCA,WAAW,mBAAO,CAAC,mDAAS;AAC5B,gBAAgB,mBAAO,CAAC,2DAAa;;AAErC;AACA,kBAAkB,KAA0B;;AAE5C;AACA,gCAAgC,QAAa;;AAE7C;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACrCA,kBAAkB,mBAAO,CAAC,iEAAgB;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,kBAAkB;AAClB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClCA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,eAAe,mBAAO,CAAC,yDAAY;;AAEnC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpCA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClCA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC1BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC9BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC5BA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC1BA,uBAAuB,mBAAO,CAAC,2EAAqB;AACpD,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC1BA,oBAAoB,mBAAO,CAAC,qEAAkB;AAC9C,eAAe,mBAAO,CAAC,2DAAa;AACpC,kBAAkB,mBAAO,CAA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;;AAGA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,kBAAkB,cAAc;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,kBAAkB,aAAa;AAC/B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,iEAAe,GAAG;;;;;;;;;;;;;;;ACtNlB,iEAAe,sCAAsC;;;;;;;;;;;;;;;;ACAhB;;AAErC;AACA,OAAO,wDAAQ;AACf;AACA;;AAEA;AACA,gCAAgC;;AAEhC;AACA;AACA;AACA,qBAAqB;;AAErB;AACA,qBAAqB;;AAErB;AACA,qBAAqB;;AAErB;AACA,qBAAqB;AACrB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,iEAAe,KAAK;;;;;;;;;;;;;;;AClCpB,iEAAe,cAAc,EAAE,UAAU,EAAE,eAAe,EAAE,gBAAgB,EAAE,UAAU,GAAG,yCAAyC;;;;;;;;;;;;;;;ACApI;AACA;AACA;AACA;AACA;AACe;AACf;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA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9B,eAAe,CAAC,gBAAgB,CAAC,OAAO,EAAE,KAAK,IAAI,EAAE;YACpD,MAAM,gBAAgB,EAAE,CAAC;QAC1B,CAAC,CAAC,CAAC;IACJ,CAAC;IAED,MAAM,eAAe,EAAE,CAAC;AACzB,CAAC","sources":["webpack://openfin-web--web-interop-basic/../../node_modules/@openfin/core-web/out/api-client.js","webpack://openfin-web--web-interop-basic/../../node_modules/@openfin/core-web/out/main-8cad4070.js","webpack://openfin-web--web-interop-basic/../../node_modules/@openfin/core-web/out/main-b14f67c9.js","webpack://openfin-web--web-interop-basic/../../node_modules/base64-js/index.js","webpack://openfin-web--web-interop-basic/../../node_modules/buffer/index.js","webpack://openfin-web--web-interop-basic/../../node_modules/events/events.js","webpack://openfin-web--web-interop-basic/../../node_modules/ieee754/index.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_DataView.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_Hash.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_ListCache.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_Map.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_MapCache.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_Promise.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_Set.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_SetCache.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_Stack.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_Symbol.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_Uint8Array.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_WeakMap.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_arrayEach.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_arrayFilter.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_arrayLikeKeys.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_arrayPush.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_arraySome.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_assignValue.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_assocIndexOf.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_baseAssign.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_baseAssignIn.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_baseAssignValue.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_baseClone.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_baseCreate.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_baseGetAllKeys.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_baseGetTag.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_baseIsArguments.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_baseIsEqual.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_baseIsEqualDeep.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_baseIsMap.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_baseIsNative.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_baseIsSet.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_baseIsTypedArray.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_baseKeys.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_baseKeysIn.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_baseTimes.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_baseUnary.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_cacheHas.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_cloneArrayBuffer.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_cloneBuffer.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_cloneDataView.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_cloneRegExp.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_cloneSymbol.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_cloneTypedArray.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_copyArray.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_copyObject.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_copySymbols.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_copySymbolsIn.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_coreJsData.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_defineProperty.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_equalArrays.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_equalByTag.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_equalObjects.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_freeGlobal.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_getAllKeys.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_getAllKeysIn.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_getMapData.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_getNative.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_getPrototype.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_getRawTag.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_getSymbols.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_getSymbolsIn.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_getTag.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_getValue.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_hashClear.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_hashDelete.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_hashGet.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_hashHas.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_hashSet.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_initCloneArray.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_initCloneByTag.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_initCloneObject.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_isIndex.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_isKeyable.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_isMasked.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_isPrototype.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_listCacheClear.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_listCacheDelete.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_listCacheGet.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_listCacheHas.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_listCacheSet.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_mapCacheClear.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_mapCacheDelete.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_mapCacheGet.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_mapCacheHas.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_mapCacheSet.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_mapToArray.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_nativeCreate.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_nativeKeys.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_nativeKeysIn.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_nodeUtil.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_objectToString.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_overArg.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_root.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_setCacheAdd.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_setCacheHas.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_setToArray.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_stackClear.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_stackDelete.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_stackGet.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_stackHas.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_stackSet.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_toSource.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/cloneDeep.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/eq.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/isArguments.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/isArray.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/isArrayLike.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/isBuffer.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/isEqual.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/isFunction.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/isLength.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/isMap.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/isObject.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/isObjectLike.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/isSet.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/isTypedArray.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/keys.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/keysIn.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/stubArray.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/stubFalse.js","webpack://openfin-web--web-interop-basic/./client/src/platform/api.ts","webpack://openfin-web--web-interop-basic/./client/src/platform/settings.ts","webpack://openfin-web--web-interop-basic/../../node_modules/uuid/dist/esm-browser/index.js","webpack://openfin-web--web-interop-basic/../../node_modules/uuid/dist/esm-browser/md5.js","webpack://openfin-web--web-interop-basic/../../node_modules/uuid/dist/esm-browser/nil.js","webpack://openfin-web--web-interop-basic/../../node_modules/uuid/dist/esm-browser/parse.js","webpack://openfin-web--web-interop-basic/../../node_modules/uuid/dist/esm-browser/regex.js","webpack://openfin-web--web-interop-basic/../../node_modules/uuid/dist/esm-browser/rng.js","webpack://openfin-web--web-interop-basic/../../node_modules/uuid/dist/esm-browser/sha1.js","webpack://openfin-web--web-interop-basic/../../node_modules/uuid/dist/esm-browser/stringify.js","webpack://openfin-web--web-interop-basic/../../node_modules/uuid/dist/esm-browser/v1.js","webpack://openfin-web--web-interop-basic/../../node_modules/uuid/dist/esm-browser/v3.js","webpack://openfin-web--web-interop-basic/../../node_modules/uuid/dist/esm-browser/v35.js","webpack://openfin-web--web-interop-basic/../../node_modules/uuid/dist/esm-browser/v4.js","webpack://openfin-web--web-interop-basic/../../node_modules/uuid/dist/esm-browser/v5.js","webpack://openfin-web--web-interop-basic/../../node_modules/uuid/dist/esm-browser/validate.js","webpack://openfin-web--web-interop-basic/../../node_modules/uuid/dist/esm-browser/version.js","webpack://openfin-web--web-interop-basic/webpack/bootstrap","webpack://openfin-web--web-interop-basic/webpack/runtime/define property getters","webpack://openfin-web--web-interop-basic/webpack/runtime/global","webpack://openfin-web--web-interop-basic/webpack/runtime/hasOwnProperty shorthand","webpack://openfin-web--web-interop-basic/webpack/runtime/make namespace object","webpack://openfin-web--web-interop-basic/webpack/runtime/node module decorator","webpack://openfin-web--web-interop-basic/./client/src/content/fdc3-view.ts"],"sourcesContent":["\"use strict\";var e=require(\"./main-8cad4070.js\");require(\"buffer/\"),require(\"uuid\"),require(\"events\"),require(\"lodash/cloneDeep\"),require(\"lodash/isEqual\"),exports.connect=e.connect;\n","\"use strict\";var e=require(\"buffer/\"),t=require(\"events\"),n=require(\"lodash/cloneDeep\"),i=require(\"lodash/isEqual\"),r=require(\"uuid\");const o=(e,t)=>`${t}<${btoa(JSON.stringify(e))}>`;var s=\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof window?window:\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:{},a={},c={},d={},h={};async function l(e){const t=[];for(const n of e){const e=await n();t.push(e)}return t}Object.defineProperty(h,\"__esModule\",{value:!0}),h.promiseMapSerial=h.serial=h.promiseMap=h.promisify=void 0,h.promisify=function(e){return(...t)=>new Promise(((n,i)=>{e(...t,((e,t)=>e?i(e):n(t)))}))},h.promiseMap=async function(e,t){return Promise.all(e.map(t))},h.serial=l,h.promiseMapSerial=async function(e,t){return l(e.map(((e,n,i)=>()=>t(e,n,i))))};var u,p=s&&s.__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},w=s&&s.__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)};Object.defineProperty(d,\"__esModule\",{value:!0}),d.Reply=d.EmitterBase=d.Base=void 0;const y=h;class f{constructor(e){this.isNodeEnvironment=()=>\"node\"===this.wire.environment.type,this.isOpenFinEnvironment=()=>\"openfin\"===this.wire.environment.type,this.isBrowserEnvironment=()=>\"other\"===this.wire.environment.type,this.wire=e}get fin(){return this.wire.getFin()}get me(){return this.wire.me}}d.Base=f;d.EmitterBase=class extends f{constructor(e,t,...n){super(e),this.topic=t,u.set(this,void 0),this.eventNames=()=>this.hasEmitter()?this.getOrCreateEmitter().eventNames():[],this.emit=(e,t,...n)=>!!this.hasEmitter()&&this.getOrCreateEmitter().emit(e,t,...n),this.hasEmitter=()=>this.wire.eventAggregator.has(w(this,u,\"f\")),this.getOrCreateEmitter=()=>this.wire.eventAggregator.getOrCreate(w(this,u,\"f\")),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[],this.listenerCount=e=>this.hasEmitter()?this.getOrCreateEmitter().listenerCount(e):0,this.registerEventListener=async(e,t={},n,i)=>{const r={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e},o=this.getOrCreateEmitter();n(o);try{await this.wire.sendAction(\"subscribe-to-desktop-event\",r)}catch(e){throw i(o),this.deleteEmitterIfNothingRegistered(o),e}},this.deregisterEventListener=async(e,t={})=>{if(this.hasEmitter()){const n={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e};await this.wire.sendAction(\"unsubscribe-to-desktop-event\",n).catch((()=>null));return this.getOrCreateEmitter()}return Promise.resolve()},p(this,u,[t,...n],\"f\"),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[]}async on(e,t,n){return await this.registerEventListener(e,n,(n=>{n.on(e,t)}),(n=>{n.removeListener(e,t)})),this}async addListener(e,t,n){return this.on(e,t,n)}async once(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.once(e,i),n.once(e,t)}),(n=>{n.removeListener(e,i),n.removeListener(e,t)})),this}async prependListener(e,t,n){return await this.registerEventListener(e,n,(n=>{n.prependListener(e,t)}),(n=>{n.removeListener(e,t)})),this}async prependOnceListener(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.prependOnceListener(e,t),n.once(e,i)}),(n=>{n.removeListener(e,t),n.removeListener(e,i)})),this}async removeListener(e,t,n){const i=await this.deregisterEventListener(e,n);return i&&(i.removeListener(e,t),this.deleteEmitterIfNothingRegistered(i)),this}async deregisterAllListeners(e){const t={...this.identity,type:e,topic:this.topic};if(this.hasEmitter()){const e=this.getOrCreateEmitter(),n=e.listenerCount(t.type),i=[];for(let e=0;enull)));return await Promise.all(i),e}}async removeAllListeners(e){const t=async e=>{const t=await this.deregisterAllListeners(e);t&&(t.removeAllListeners(e),this.deleteEmitterIfNothingRegistered(t))};if(e)await t(e);else if(this.hasEmitter()){const e=this.getOrCreateEmitter().eventNames();await(0,y.promiseMap)(e,t)}return this}deleteEmitterIfNothingRegistered(e){0===e.eventNames().length&&this.wire.eventAggregator.delete(w(this,u,\"f\"))}},u=new WeakMap;d.Reply=class{};var g={};Object.defineProperty(g,\"__esModule\",{value:!0});var m=g.RuntimeError=g.NotSupportedError=g.NotImplementedError=g.NoAckError=g.DuplicateCorrelationError=g.UnexpectedActionError=g.DisconnectedError=void 0;class v extends Error{constructor(e){super(`Expected websocket state OPEN but found ${e}`),this.readyState=e}}g.DisconnectedError=v;class C extends Error{}g.UnexpectedActionError=C;class b extends Error{}g.DuplicateCorrelationError=b;class I extends Error{}g.NoAckError=I;class E extends Error{}g.NotImplementedError=E;class x extends Error{}g.NotSupportedError=x;class A extends Error{constructor(e){const{message:t,name:n,stack:i,...r}=e;super(t),this.name=n||\"Error\",this.stack=i??this.toString(),Object.keys(r).forEach((e=>{this[e]=r[e]}))}}class P extends Error{static getCallSite(e=0){const t=Error.stackTraceLimit,n=e+1;Error.stackTraceLimit=t+n;const i=Error.prepareStackTrace;Error.prepareStackTrace=(e,t)=>t;const r=(new Error).stack?.slice(n)??[];return Error.prepareStackTrace=i,Error.stackTraceLimit=t,r}static prepareStackTrace(e,t){if(\"function\"==typeof Error.prepareStackTrace)return Error.prepareStackTrace(e,t);let n=\"\";n+=e.name||\"Error\",n+=`: ${e.message||\"\"}`;for(const e of t)n+=`\\n at ${e.toString()}`;return n}constructor(e,t){const{reason:n,error:i}=e;super(n),this.name=\"RuntimeError\",i?.stack&&(this.cause=new A(i)),t&&(this.stack=P.prepareStackTrace(this,t))}}m=g.RuntimeError=P;var M={},_={},O={};Object.defineProperty(O,\"__esModule\",{value:!0}),O.validateIdentity=void 0,O.validateIdentity=function(e){let t;return\"object\"==typeof e&&\"string\"==typeof e.uuid||(t=\"Not a valid identity object\"),t};var S={},R={},F={},j={},k={},L={},T={};Object.defineProperty(T,\"__esModule\",{value:!0}),T.handleDeprecatedWarnings=void 0;var $;T.handleDeprecatedWarnings=e=>{(e.contentNavigation?.whitelist||e.contentNavigation?.blacklist||e.contentRedirect?.whitelist||e.contentRedirect?.blacklist)&&console.warn(\"The properties 'whitelist' and 'blacklist' have been marked as deprecated and will be removed in a future version. Please use 'allowlist' and 'denylist'.\")};var B={},G={};Object.defineProperty(G,\"__esModule\",{value:!0}),G.AsyncRetryableLazy=W=G.Lazy=void 0;var W=G.Lazy=class{constructor(e){this.producerFn=e}getValue(){return this.value||(this.value=this.producerFn()),this.value}};G.AsyncRetryableLazy=class{constructor(e){this.producerFn=e}async getValue(){return this.promise||(this.promise=this.producerFn().catch((e=>{throw delete this.promise,e}))),this.promise}};var H={};Object.defineProperty(H,\"__esModule\",{value:!0}),H.WebContents=void 0;const N=d;class D extends N.EmitterBase{constructor(e,t,n){super(e,n,t.uuid,t.name),this.identity=t,this.entityType=n}capturePage(e){return this.wire.sendAction(\"capture-page\",{options:e,...this.identity}).then((({payload:e})=>e.data))}executeJavaScript(e){return this.wire.sendAction(\"execute-javascript-in-window\",{...this.identity,code:e}).then((({payload:e})=>e.data))}getZoomLevel(){return this.wire.sendAction(\"get-zoom-level\",this.identity).then((({payload:e})=>e.data))}setZoomLevel(e){return this.wire.sendAction(\"set-zoom-level\",{...this.identity,level:e}).then((()=>{}))}navigate(e){return this.wire.sendAction(\"navigate-window\",{...this.identity,url:e}).then((()=>{}))}navigateBack(){return this.wire.sendAction(\"navigate-window-back\",{...this.identity}).then((()=>{}))}async navigateForward(){await this.wire.sendAction(\"navigate-window-forward\",{...this.identity})}stopNavigation(){return this.wire.sendAction(\"stop-window-navigation\",{...this.identity}).then((()=>{}))}reload(e=!1){return this.wire.sendAction(\"reload-window\",{ignoreCache:e,...this.identity}).then((()=>{}))}print(e={}){return this.wire.sendAction(\"print\",{...this.identity,options:e}).then((()=>{}))}findInPage(e,t){return this.wire.sendAction(\"find-in-page\",{...this.identity,searchTerm:e,options:t}).then((({payload:e})=>e.data))}stopFindInPage(e){return this.wire.sendAction(\"stop-find-in-page\",{...this.identity,action:e}).then((()=>{}))}getPrinters(){return this.wire.sendAction(\"get-printers\",{...this.identity}).then((({payload:e})=>e.data))}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){await this.wire.sendAction(\"focus-window\",{emitSynthFocused:e,...this.identity})}async showDeveloperTools(){await this.wire.sendAction(\"show-developer-tools\",this.identity)}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction(\"get-process-info\",this.identity);return e}async getSharedWorkers(){return this.wire.sendAction(\"get-shared-workers\",this.identity).then((({payload:e})=>e.data))}async inspectSharedWorker(){await this.wire.sendAction(\"inspect-shared-worker\",{...this.identity})}async inspectSharedWorkerById(e){await this.wire.sendAction(\"inspect-shared-worker-by-id\",{...this.identity,workerId:e})}async inspectServiceWorker(){await this.wire.sendAction(\"inspect-service-worker\",{...this.identity})}async showPopupWindow(e){if(this.wire.sendAction(`${this.entityType}-show-popup-window`,this.identity).catch((()=>{})),e?.onPopupReady){const t=async({popupName:t})=>{try{const n=this.fin.Window.wrapSync({uuid:this.fin.me.uuid,name:t});await e.onPopupReady(n)}catch(e){throw new Error(`Something went wrong during onPopupReady execution: ${e}`)}};await this.once(\"popup-ready\",t)}const{payload:t}=await this.wire.sendAction(\"try-create-popup-window\",{options:{...e,hasResultCallback:!!e?.onPopupResult,hasReadyCallback:!!e?.onPopupReady},...this.identity}),{data:{willOpen:n,options:i}}=t;n&&await this.fin.Window.create(i.initialOptions);if(e?.onPopupResult){const t=async t=>{await e.onPopupResult((e=>{const{name:t,uuid:n,result:i,data:r}=e,o={identity:{name:t,uuid:n},result:i};return r&&(o.data=r),o})(t))},n=async()=>{await this.removeListener(\"popup-result\",t)};await this.on(\"popup-result\",t),await this.once(\"popup-teardown\",n)}const{payload:r}=await this.wire.sendAction(\"show-popup-window\",{options:i,...this.identity});return r.data}}var U,V,z,K,q;function J(){return V||(V=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(function(){if($)return L;$=1,Object.defineProperty(L,\"__esModule\",{value:!0}),L.ViewModule=void 0;const e=d,t=O,n=J(),i=T;class r extends e.Base{async create(e){const{uuid:t}=this.wire.me;if(!e.name||\"string\"!=typeof e.name)throw new Error(\"Please provide a name property as a string in order to create a View.\");return(0,i.handleDeprecatedWarnings)(e),this.wire.environment.childViews?await this.wire.environment.createChildContent({entityType:\"view\",options:{...e,uuid:t}}):await this.wire.sendAction(\"create-view\",{...e,uuid:t}),this.wrapSync({uuid:t,name:e.name})}async wrap(e){this.wire.sendAction(\"view-wrap\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}wrapSync(e){this.wire.sendAction(\"view-wrap-sync\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}getCurrent(){if(this.wire.sendAction(\"view-get-current\").catch((e=>{})),!this.wire.me.isView)throw new Error(\"You are not in a View context\");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction(\"view-get-current-sync\").catch((e=>{})),!this.wire.me.isView)throw new Error(\"You are not in a View context\");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return L.ViewModule=r,L}(),e),n(function(){if(U)return B;var e;U=1,Object.defineProperty(B,\"__esModule\",{value:!0}),B.View=void 0;const t=g,n=G,i=H,r=ie();class o extends i.WebContents{constructor(i,o){super(i,o,\"view\"),this.identity=o,e.set(this,new n.Lazy((()=>this.fin.Platform.wrapSync(this.identity).getClient()))),this.attach=async e=>{await this.wire.sendAction(\"attach-view\",{target:e,...this.identity})},this.destroy=async()=>{await this.wire.sendAction(\"destroy-view\",{...this.identity})},this.show=async()=>{await this.wire.sendAction(\"show-view\",{...this.identity})},this.showAt=async(e,t={})=>{await this.wire.sendAction(\"show-view-at\",{bounds:e,...this.identity,options:t})},this.bringToFront=async()=>{await this.wire.sendAction(\"bring-view-to-front\",{...this.identity})},this.hide=async()=>{await this.wire.sendAction(\"hide-view\",{...this.identity})},this.setBounds=async e=>{await this.wire.sendAction(\"set-view-bounds\",{bounds:e,...this.identity})},this.getBounds=async()=>(await this.wire.sendAction(\"get-view-bounds\",{...this.identity})).payload.data,this.getInfo=async()=>(await this.wire.sendAction(\"get-view-info\",{...this.identity})).payload.data,this.getParentLayout=async()=>(this.wire.sendAction(\"view-get-parent-layout\",{...this.identity}).catch((()=>{})),this.fin.Platform.Layout.getLayoutByViewIdentity(this.identity)),this.getOptions=async()=>this.wire.sendAction(\"get-view-options\",{...this.identity}).then((({payload:e})=>e.data)),this.updateOptions=async e=>this.wire.sendAction(\"update-view-options\",{options:e,...this.identity}).then((()=>{})),this.getCurrentWindow=async()=>{const{payload:{data:e}}=await this.wire.sendAction(\"get-view-window\",{...this.identity});return new r._Window(this.wire,e)},this.getCurrentStack=async()=>{this.wire.sendAction(\"view-get-current-stack\").catch((()=>{}));try{return(await this.getParentLayout()).getStackByViewIdentity(this.identity)}catch(e){throw new t.RuntimeError({reason:\"This view does not belong to a stack.\",error:e})}},this.triggerBeforeUnload=async()=>(await this.wire.sendAction(\"trigger-before-unload\",{...this.identity})).payload.data,this.bindToElement=async e=>{if(!e)throw new Error(\"Element not found.\");return this.wire.environment.observeBounds(e,(async e=>this.setBounds(e)))}}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){const t=await this.getCurrentWindow();await t.focusedWebViewWasChanged(),await super.focus({emitSynthFocused:e})}}return B.View=o,e=new WeakMap,B}(),e)}(k)),k}function Y(){if(z)return j;z=1,Object.defineProperty(j,\"__esModule\",{value:!0}),j.Application=void 0;const e=d,t=ie(),n=J();class i extends e.EmitterBase{constructor(e,n){super(e,\"application\",n.uuid),this.identity=n,this.window=new t._Window(this.wire,{uuid:this.identity.uuid,name:this.identity.uuid})}windowListFromIdentityList(e){const n=[];return e.forEach((e=>{n.push(new t._Window(this.wire,{uuid:e.uuid,name:e.name}))})),n}isRunning(){return this.wire.sendAction(\"is-application-running\",this.identity).then((({payload:e})=>e.data))}async quit(e=!1){try{await this._close(e),await this.wire.sendAction(\"destroy-application\",{force:e,...this.identity})}catch(e){if(![\"Remote connection has closed\",\"Could not locate the requested application\"].some((t=>e.message.includes(t))))throw e}}async _close(e=!1){try{await this.wire.sendAction(\"close-application\",{force:e,...this.identity})}catch(e){if(!e.message.includes(\"Remote connection has closed\"))throw e}}close(e=!1){return console.warn(\"Deprecation Warning: Application.close is deprecated Please use Application.quit\"),this.wire.sendAction(\"application-close\",this.identity).catch((e=>{})),this._close(e)}getChildWindows(){return this.wire.sendAction(\"get-child-windows\",this.identity).then((({payload:e})=>{const t=[];return e.data.forEach((e=>{t.push({uuid:this.identity.uuid,name:e})})),this.windowListFromIdentityList(t)}))}getManifest(){return this.wire.sendAction(\"get-application-manifest\",this.identity).then((({payload:e})=>e.data))}getParentUuid(){return this.wire.sendAction(\"get-parent-application\",this.identity).then((({payload:e})=>e.data))}getShortcuts(){return this.wire.sendAction(\"get-shortcuts\",this.identity).then((({payload:e})=>e.data))}async getViews(){const{payload:e}=await this.wire.sendAction(\"application-get-views\",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}getZoomLevel(){return this.wire.sendAction(\"get-application-zoom-level\",this.identity).then((({payload:e})=>e.data))}getWindow(){return this.wire.sendAction(\"application-get-window\",this.identity).catch((e=>{})),Promise.resolve(this.window)}registerUser(e,t){return this.wire.sendAction(\"register-user\",{userName:e,appName:t,...this.identity}).then((()=>{}))}removeTrayIcon(){return this.wire.sendAction(\"remove-tray-icon\",this.identity).then((()=>{}))}restart(){return this.wire.sendAction(\"restart-application\",this.identity).then((()=>{}))}run(){return console.warn(\"Deprecation Warning: Application.run is deprecated Please use fin.Application.start\"),this.wire.sendAction(\"application-run\",this.identity).catch((e=>{})),this._run()}_run(e={}){return this.wire.sendAction(\"run-application\",{manifestUrl:this._manifestUrl,opts:e,...this.identity}).then((()=>{}))}scheduleRestart(){return this.wire.sendAction(\"relaunch-on-close\",this.identity).then((()=>{}))}async sendApplicationLog(){const{payload:e}=await this.wire.sendAction(\"send-application-log\",this.identity);return e.data}async setJumpList(e){await this.wire.sendAction(\"set-jump-list\",{config:e,...this.identity})}setTrayIcon(e){return this.wire.sendAction(\"set-tray-icon\",{enabledIcon:e,...this.identity}).then((()=>{}))}setShortcuts(e){return this.wire.sendAction(\"set-shortcuts\",{data:e,...this.identity}).then((()=>{}))}async setShortcutQueryParams(e){await this.wire.sendAction(\"set-shortcut-query-args\",{data:e,...this.identity})}setZoomLevel(e){return this.wire.sendAction(\"set-application-zoom-level\",{level:e,...this.identity}).then((()=>{}))}async setAppLogUsername(e){await this.wire.sendAction(\"set-app-log-username\",{data:e,...this.identity})}getTrayIconInfo(){return this.wire.sendAction(\"get-tray-icon-info\",this.identity).then((({payload:e})=>e.data))}hasTrayIcon(){return this.wire.sendAction(\"has-tray-icon\",this.identity).then((({payload:e})=>e.data))}terminate(){return this.wire.sendAction(\"terminate-application\",this.identity).then((()=>{}))}wait(){return this.wire.sendAction(\"wait-for-hung-application\",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction(\"get-info\",this.identity).then((({payload:e})=>e.data))}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction(\"application-get-process-info\",this.identity);return e}async setFileDownloadLocation(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t};await this.wire.sendAction(\"set-file-download-location\",{...n,downloadLocation:e})}async getFileDownloadLocation(){const{payload:{data:e}}=await this.wire.sendAction(\"get-file-download-location\",this.identity);return e}async showTrayIconPopupMenu(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t},{payload:i}=await this.wire.sendAction(\"show-tray-icon-popup-menu\",{...n,options:e});return i.data}async closeTrayIconPopupMenu(){const{name:e}=this.wire.me,t={uuid:this.identity.uuid,name:e};await this.wire.sendAction(\"close-tray-icon-popup-menu\",{...t})}}return j.Application=i,j}function Z(){return q||(q=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(function(){if(K)return F;K=1,Object.defineProperty(F,\"__esModule\",{value:!0}),F.ApplicationModule=void 0;const e=d,t=O,n=Y();class i extends e.Base{async wrap(e){this.wire.sendAction(\"wrap-application\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}wrapSync(e){this.wire.sendAction(\"wrap-application-sync\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}async _create(e){return void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&void 0===e.isPlatformController&&(e.autoShow=!0),await this.wire.sendAction(\"create-application\",e),this.wrap({uuid:e.uuid})}create(e){return console.warn(\"Deprecation Warning: fin.Application.create is deprecated. Please use fin.Application.start\"),this.wire.sendAction(\"application-create\").catch((e=>{})),this._create(e)}async start(e){this.wire.sendAction(\"start-application\").catch((e=>{}));const t=await this._create(e);return await this.wire.sendAction(\"run-application\",{uuid:e.uuid}),t}async startManyManifests(e,t){return this.wire.sendAction(\"run-applications\",{applications:e,opts:t}).then((()=>{}))}getCurrent(){return this.wire.sendAction(\"get-current-application\").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction(\"get-current-application-sync\").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}async startFromManifest(e,t){this.wire.sendAction(\"application-start-from-manifest\").catch((e=>{}));const n=await this._createFromManifest(e);return await n._run(t),n}createFromManifest(e){return console.warn(\"Deprecation Warning: fin.Application.createFromManifest is deprecated. Please use fin.Application.startFromManifest\"),this.wire.sendAction(\"application-create-from-manifest\").catch((e=>{})),this._createFromManifest(e)}_createFromManifest(e){return this.wire.sendAction(\"get-application-manifest\",{manifestUrl:e}).then((({payload:e})=>{const t=e.data.platform?e.data.platform.uuid:e.data.startup_app.uuid;return this.wrap({uuid:t})})).then((t=>(t._manifestUrl=e,t)))}}return F.ApplicationModule=i,F}(),e),n(Y(),e)}(R)),R}H.WebContents=D;var Q={};Object.defineProperty(Q,\"__esModule\",{value:!0}),Q.promisifySubscription=void 0;var X,ee,te;function ne(){if(X)return S;X=1,Object.defineProperty(S,\"__esModule\",{value:!0}),S._Window=void 0;const e=Z(),t=H,n=J(),i=T,r=Q;class o extends t.WebContents{constructor(e,t){super(e,t,\"window\")}async createWindow(e){this.wire.sendAction(\"window-create-window\",this.identity).catch((e=>{}));const t=await(0,r.promisifySubscription)(this,\"fire-constructor-callback\");void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&(e.autoShow=!0),(0,i.handleDeprecatedWarnings)(e);const n=this.wire.environment.createChildContent({entityType:\"window\",options:e}),[o]=await Promise.all([t.getValue(),n]);let s;const{success:a}=o,c=o.data,{message:d}=c;s=a?{httpResponseCode:c.httpResponseCode,apiInjected:c.apiInjected}:{message:c.message,networkErrorCode:c.networkErrorCode,stack:c.stack};const h={message:d,cbPayload:s,success:a};try{this.getWebWindow().fin.__internal_.openerSuccessCBCalled()}catch(e){}return h.success?this:Promise.reject(h)}getAllFrames(){return this.wire.sendAction(\"get-all-frames\",this.identity).then((({payload:e})=>e.data))}getBounds(){return this.wire.sendAction(\"get-window-bounds\",this.identity).then((({payload:e})=>e.data))}center(){return this.wire.sendAction(\"center-window\",this.identity).then((()=>{}))}blur(){return this.wire.sendAction(\"blur-window\",this.identity).then((()=>{}))}bringToFront(){return this.wire.sendAction(\"bring-window-to-front\",this.identity).then((()=>{}))}animate(e,t){return this.wire.sendAction(\"animate-window\",{transitions:e,options:t,...this.identity}).then((()=>{}))}hide(){return this.wire.sendAction(\"hide-window\",this.identity).then((()=>{}))}close(e=!1){return this.wire.sendAction(\"close-window\",{force:e,...this.identity}).then((()=>{Object.setPrototypeOf(this,null)}))}focusedWebViewWasChanged(){return this.wire.sendAction(\"focused-webview-changed\",this.identity).then((()=>{}))}getNativeId(){return this.wire.sendAction(\"get-window-native-id\",this.identity).then((({payload:e})=>e.data))}async getCurrentViews(){const{payload:e}=await this.wire.sendAction(\"window-get-views\",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}disableFrame(){return console.warn(\"Function is deprecated; use disableUserMovement instead.\"),this.wire.sendAction(\"disable-window-frame\",this.identity).then((()=>{}))}disableUserMovement(){return this.wire.sendAction(\"disable-window-frame\",this.identity).then((()=>{}))}enableFrame(){return console.warn(\"Function is deprecated; use enableUserMovement instead.\"),this.wire.sendAction(\"enable-window-frame\",this.identity).then((()=>{}))}enableUserMovement(){return this.wire.sendAction(\"enable-window-frame\",this.identity).then((()=>{}))}flash(){return this.wire.sendAction(\"flash-window\",this.identity).then((()=>{}))}stopFlashing(){return this.wire.sendAction(\"stop-flash-window\",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction(\"get-window-info\",this.identity).then((({payload:e})=>e.data))}async getLayout(e){this.wire.sendAction(\"window-get-layout\",this.identity).catch((e=>{}));const t=await this.getOptions();if(!t.layout&&!t.layoutSnapshot)throw new Error(\"Window does not have a Layout\");return this.fin.Platform.Layout.wrap(e??this.identity)}getOptions(){return this.wire.sendAction(\"get-window-options\",this.identity).then((({payload:e})=>e.data))}getParentApplication(){return this.wire.sendAction(\"window-get-parent-application\",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity))}getParentWindow(){return this.wire.sendAction(\"window-get-parent-window\",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity)).then((e=>e.getWindow()))}async getSnapshot(e){const t={area:e,...this.identity};console.warn(\"Window.getSnapshot has been deprecated, please use Window.capturePage\");return(await this.wire.sendAction(\"get-window-snapshot\",t)).payload.data}getState(){return this.wire.sendAction(\"get-window-state\",this.identity).then((({payload:e})=>e.data))}getWebWindow(){return this.wire.sendAction(\"window-get-web-window\",this.identity).catch((e=>{})),this.wire.environment.getWebWindow(this.identity)}isMainWindow(){return this.wire.sendAction(\"window-is-main-window\",this.identity).catch((e=>{})),this.me.uuid===this.me.name}isShowing(){return this.wire.sendAction(\"is-window-showing\",this.identity).then((({payload:e})=>e.data))}maximize(){return this.wire.sendAction(\"maximize-window\",this.identity).then((()=>{}))}minimize(){return this.wire.sendAction(\"minimize-window\",this.identity).then((()=>{}))}moveBy(e,t,n){return this.wire.sendAction(\"move-window-by\",{deltaLeft:e,deltaTop:t,positioningOptions:n,...this.identity}).then((()=>{}))}moveTo(e,t,n){return this.wire.sendAction(\"move-window\",{left:e,top:t,positioningOptions:n,...this.identity}).then((()=>{}))}resizeBy(e,t,n,i){return this.wire.sendAction(\"resize-window-by\",{deltaWidth:Math.floor(e),deltaHeight:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}resizeTo(e,t,n,i){return this.wire.sendAction(\"resize-window\",{width:Math.floor(e),height:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}restore(){return this.wire.sendAction(\"restore-window\",this.identity).then((()=>{}))}setAsForeground(){return this.wire.sendAction(\"set-foreground-window\",this.identity).then((()=>{}))}setBounds(e,t){return this.wire.sendAction(\"set-window-bounds\",{...e,...this.identity,positioningOptions:t}).then((()=>{}))}show(e=!1){return this.wire.sendAction(\"show-window\",{force:e,...this.identity}).then((()=>{}))}showAt(e,t,n=!1){return this.wire.sendAction(\"show-at-window\",{force:n,left:Math.floor(e),top:Math.floor(t),...this.identity}).then((()=>{}))}updateOptions(e){return this.wire.sendAction(\"update-window-options\",{options:e,...this.identity}).then((()=>{}))}authenticate(e,t){return this.wire.sendAction(\"window-authenticate\",{userName:e,password:t,...this.identity}).then((()=>{}))}async showPopupMenu(e){const{payload:t}=await this.wire.sendAction(\"show-popup-menu\",{options:e,...this.identity});return t.data}async closePopupMenu(){return this.wire.sendAction(\"close-popup-menu\",{...this.identity}).then((()=>{}))}async dispatchPopupResult(e){this.wire.sendAction(\"window-dispatch-popup-result\",this.identity).catch((e=>{})),await this.wire.sendAction(\"dispatch-popup-result\",{data:e,...this.identity})}async print(e={content:\"self\"}){switch(e.content){case void 0:case\"self\":return super.print(e);case\"screenshot\":return this.wire.sendAction(\"print-screenshot\",this.identity).then((()=>{}));case\"views\":return this.wire.sendAction(\"print-views\",{...this.identity,options:e}).then((()=>{}));default:return}}}return S._Window=o,S}function ie(){return te||(te=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(function(){if(ee)return _;ee=1,Object.defineProperty(_,\"__esModule\",{value:!0}),_._WindowModule=void 0;const e=d,t=O,n=ne();class i extends e.Base{async wrap(e){this.wire.sendAction(\"window-wrap\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}wrapSync(e){this.wire.sendAction(\"window-wrap-sync\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}create(e){return this.wire.sendAction(\"create-window\").catch((e=>{})),new n._Window(this.wire,{uuid:this.me.uuid,name:e.name}).createWindow(e)}getCurrent(){if(this.wire.sendAction(\"get-current-window\").catch((e=>{})),!this.wire.me.isWindow)throw new Error(\"You are not in a Window context\");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction(\"get-current-window-sync\").catch((e=>{})),!this.wire.me.isWindow)throw new Error(\"You are not in a Window context\");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return _._WindowModule=i,_}(),e),n(ne(),e)}(M)),M}Q.promisifySubscription=async(e,t,n=(()=>!0),i)=>{let r,o,s;const a=new Promise(((e,t)=>{r=e,o=t})),c=e=>{n(e)&&(clearTimeout(s),r(e))};return await e.on(t,c),i&&(s=setTimeout((()=>o(new Error(\"event timed out\"))),i)),a.finally((()=>{e.removeListener(t,c).catch((()=>null))})),{getValue:()=>a}},Object.defineProperty(c,\"__esModule\",{value:!0}),c.System=void 0;const re=d,oe=g,se=ie(),ae=t;class ce extends re.EmitterBase{constructor(e){super(e,\"system\")}sendExternalProcessRequest(e,t){return new Promise(((n,i)=>{const r=\"external-process-exited\";let o,s,a,c;\"function\"==typeof t.listener&&(a=e=>{const n=e||{};s={topic:\"exited\",uuid:n.processUuid||\"\",exitCode:n.exitCode||0},o===e.processUuid&&(t.listener(s),c.removeListener(r,a))},this.wire.me.name||(this.wire.me.name=this.wire.me.uuid),c=new se._Window(this.wire,this.wire.me),c.on(r,a)),this.wire.sendAction(e,t).then((({payload:e})=>{o=e.data.uuid,n(e.data),s&&o===s.uuid&&(t.listener(s),c.removeListener(r,a))})).catch((e=>{c&&c.removeListener(r,a),i(e)}))}))}getVersion(){return this.wire.sendAction(\"get-version\").then((({payload:e})=>e.data))}clearCache(e){return this.wire.sendAction(\"clear-cache\",e).then((()=>{}))}deleteCacheOnExit(){return this.wire.sendAction(\"delete-cache-request\").then((()=>{}))}exit(){return this.wire.sendAction(\"exit-desktop\").then((()=>{}))}async fetchManifest(e){const{payload:{data:t}}=await this.wire.sendAction(\"fetch-manifest\",{manifestUrl:e});return t}flushCookieStore(){return this.wire.sendAction(\"flush-cookie-store\").then((()=>{}))}getAllWindows(){return this.wire.sendAction(\"get-all-windows\").then((({payload:e})=>e.data))}getAllApplications(){return this.wire.sendAction(\"get-all-applications\").then((({payload:e})=>e.data))}getCommandLineArguments(){return this.wire.sendAction(\"get-command-line-arguments\").then((({payload:e})=>e.data))}async getCrashReporterState(){const{payload:{data:{diagnosticMode:e,isRunning:t}}}=await this.wire.sendAction(\"get-crash-reporter-state\");return console.warn(\"diagnosticMode property is deprecated. It will be removed in a future version\"),{diagnosticMode:e,diagnosticsMode:e,isRunning:t}}async startCrashReporter(e){const t=e,n={...t,diagnosticMode:t.diagnosticsMode||t.diagnosticMode},{payload:{data:{diagnosticMode:i,isRunning:r}}}=await this.wire.sendAction(\"start-crash-reporter\",n);return{diagnosticMode:i,diagnosticsMode:i,isRunning:r}}getUniqueUserId(){return this.wire.sendAction(\"get-unique-user-id\").then((({payload:e})=>e.data))}getEntityInfo(e,t){return this.wire.sendAction(\"get-entity-info\",{uuid:e,name:t}).then((({payload:e})=>e.data))}getEnvironmentVariable(e){return this.wire.sendAction(\"get-environment-variable\",{environmentVariables:e}).then((({payload:e})=>e.data))}getFocusedWindow(){return this.wire.sendAction(\"get-focused-window\").then((({payload:e})=>e.data))}async isAppCertified(e){const{payload:{data:{certifiedInfo:t}}}=await this.wire.sendAction(\"is-app-certified\",{manifestUrl:e});return t}getInstalledRuntimes(){return this.wire.sendAction(\"get-installed-runtimes\").then((({payload:e})=>e.data.runtimes))}async getInstalledApps(){const{payload:{data:{installedApps:e}}}=await this.wire.sendAction(\"get-installed-apps\");return e}getLog(e){return this.wire.sendAction(\"view-log\",e).then((({payload:e})=>e.data))}getMachineId(){return this.wire.sendAction(\"get-machine-id\").then((({payload:e})=>e.data))}getMinLogLevel(){return this.wire.sendAction(\"get-min-log-level\").then((({payload:e})=>e.data))}getLogList(){return this.wire.sendAction(\"list-logs\").then((({payload:e})=>e.data))}getMonitorInfo(){return this.wire.sendAction(\"get-monitor-info\").then((({payload:e})=>e.data))}getMousePosition(){return this.wire.sendAction(\"get-mouse-position\").then((({payload:e})=>e.data))}getProcessList(){return console.warn(\"System.getProcessList has been deprecated. Please consider using our new process APIs: Window.getProcessInfo, View.getProcessInfo, Application.getProcessInfo, System.getAllProcessInfo\"),this.wire.sendAction(\"process-snapshot\").then((({payload:e})=>e.data))}async getAllProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction(\"get-all-process-info\",this.identity);return e}getProxySettings(){return this.wire.sendAction(\"get-proxy-settings\").then((({payload:e})=>e.data))}getRuntimeInfo(){return this.wire.sendAction(\"get-runtime-info\").then((({payload:e})=>e.data))}getRvmInfo(){return this.wire.sendAction(\"get-rvm-info\").then((({payload:e})=>e.data))}getHostSpecs(){return this.wire.sendAction(\"get-host-specs\").then((({payload:e})=>e.data))}getOSInfo(){return this.wire.sendAction(\"get-os-info\").then((({payload:e})=>e.data))}launchExternalProcess(e){return this.sendExternalProcessRequest(\"launch-external-process\",e)}monitorExternalProcess(e){return this.sendExternalProcessRequest(\"monitor-external-process\",e)}log(e,t){return this.wire.sendAction(\"write-to-log\",{level:e,message:t}).then((()=>{}))}openUrlWithBrowser(e){return this.wire.sendAction(\"open-url-with-browser\",{url:e}).then((()=>{}))}async registerCustomProtocol(e){if(\"object\"!=typeof e)throw new Error(\"Must provide an object with a `protocolName` property having a string value.\");await this.wire.sendAction(\"register-custom-protocol\",e)}async unregisterCustomProtocol(e){await this.wire.sendAction(\"unregister-custom-protocol\",{protocolName:e})}async getCustomProtocolState(e){return this.wire.sendAction(\"get-custom-protocol-state\",{protocolName:e}).then((({payload:e})=>e.data))}releaseExternalProcess(e){return this.wire.sendAction(\"release-external-process\",{uuid:e}).then((()=>{}))}showDeveloperTools(e){return this.wire.sendAction(\"show-developer-tools\",e).then((()=>{}))}terminateExternalProcess(e){return this.wire.sendAction(\"terminate-external-process\",e).then((()=>{}))}updateProxySettings(e){return this.wire.sendAction(\"update-proxy\",e).then((()=>{}))}async downloadAsset(e,t){const n=()=>{};let i=n,r=n;const o=new Promise(((e,t)=>{i=e,r=t}));if(\"openfin\"!==this.wire.environment.type)throw new oe.NotSupportedError(\"downloadAsset only supported in an OpenFin Render process\");const s=oe.RuntimeError.getCallSite(),a=this.wire.environment.getNextMessageId().toString(),c=`asset-download-progress-${a}`,d=`asset-download-error-${a}`,h=`asset-download-complete-${a}`,l=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},u=()=>{this.removeListener(c,l)};await Promise.all([this.on(c,l),this.once(d,(e=>{u();const{reason:t,err:n}=e;r(new oe.RuntimeError({reason:t,error:n},s))})),this.once(h,(()=>{u(),i()}))]);const p=Object.assign(e,{downloadId:a});return await this.wire.sendAction(\"download-asset\",p).catch((e=>{throw u(),e})),o}downloadRuntime(e,t){const n=oe.RuntimeError.getCallSite();return new Promise(((i,r)=>{if(\"openfin\"!==this.wire.environment.type)return void r(new oe.NotSupportedError(\"downloadRuntime only supported in an OpenFin Render process\"));const o=this.wire.environment.getNextMessageId().toString(),s=`runtime-download-progress-${o}`,a=`runtime-download-error-${o}`,c=`runtime-download-complete-${o}`,d=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},h=()=>{this.removeListener(s,d)};this.on(s,d),this.once(a,(e=>{h();const{reason:t,err:i}=e;r(new oe.RuntimeError({reason:t,error:i},n))})),this.once(c,(()=>{h(),i()}));const l=Object.assign(e,{downloadId:o});this.wire.sendAction(\"download-runtime\",l).catch((e=>{h(),r(e)}))}))}downloadPreloadScripts(e){return this.wire.sendAction(\"download-preload-scripts\",{scripts:e}).then((({payload:e})=>e.data))}getAllExternalApplications(){return this.wire.sendAction(\"get-all-external-applications\").then((({payload:e})=>e.data))}getAppAssetInfo(e){return this.wire.sendAction(\"get-app-asset-info\",e).then((({payload:e})=>e.data))}getCookies(e){const t=this.wire.environment.getUrl(),n=Object.assign(e,{url:t});return this.wire.sendAction(\"get-cookies\",n).then((({payload:e})=>e.data))}setMinLogLevel(e){return this.wire.sendAction(\"set-min-log-level\",{level:e}).then((()=>{}))}resolveUuid(e){return this.wire.sendAction(\"resolve-uuid\",{entityKey:e}).then((({payload:e})=>e.data))}executeOnRemote(e,t){return t.requestingIdentity=e,this.wire.ferryAction(t)}readRegistryValue(e,t,n){return this.wire.sendAction(\"read-registry-value\",{rootKey:e,subkey:t,value:n}).then((({payload:e})=>e.data))}registerExternalConnection(e){return this.wire.sendAction(\"register-external-connection\",{uuid:e}).then((({payload:e})=>e.data))}async getServiceConfiguration(e){if(\"string\"!=typeof e.name)throw new Error(\"Must provide an object with a `name` property having a string value\");const{name:t}=e;return this.wire.sendAction(\"get-service-configuration\",{name:t}).then((({payload:e})=>e.data))}async getSystemAppConfig(e){if(\"string\"!=typeof e)throw new Error(\"Must provide a string value for name of system app\");return this.wire.sendAction(\"get-system-app-configuration\",{name:e}).then((({payload:e})=>e.data))}async registerShutdownHandler(e){this.wire.sendAction(\"system-register-shutdown-handler\").catch((e=>{}));const{uuid:t,name:n}=this.wire.me;this.on(\"system-shutdown\",(i=>{e({proceed:()=>{this.wire.environment.raiseEvent(\"application/system-shutdown-handled\",{uuid:t,name:n,topic:\"application\"})}})}))}runRvmHealthCheck(){return this.wire.sendAction(\"run-rvm-health-check\").then((({payload:e})=>e.data))}async launchManifest(e,t={}){const{subscribe:n,...i}=t,r=i;if(n){const e=new ae.EventEmitter;n(e);const t=\"app-version-progress\",i=\"runtime-status\",o=\"app-version-complete\",s=\"app-version-error\",a=this.wire.environment.getNextMessageId().toString();r.appVersionId=a;const c=[o,t,i,s],d=e=>{const{appVersionId:t,topic:n,type:i,...r}=e;return{...r,type:c.find((e=>i.includes(e)))}},h=t=>{const n=d(t);e.emit(n.type,n)},l=()=>{this.removeListener(`${t}.${a}`,h),this.removeListener(`${i}.${a}`,h),this.removeListener(`${o}.${a}`,h),this.removeListener(`${s}.${a}`,h),this.removeListener(`${o}.${a}`,l),this.removeListener(`${s}.${a}`,l)};await Promise.all([this.on(`${t}.${a}`,h),this.on(`${i}.${a}`,h),this.once(`${o}.${a}`,h),this.once(`${s}.${a}`,h),this.once(`${o}.${a}`,l),this.once(`${s}.${a}`,l)])}return(await this.wire.sendAction(\"launch-manifest\",{manifestUrl:e,opts:r})).payload.data.manifest}async queryPermissionForCurrentContext(e){const t={uuid:this.wire.me.uuid,name:this.wire.me.name};return(await this.wire.sendAction(\"query-permission-for-current-context\",{apiName:e,identity:t})).payload.data}async enableNativeWindowIntegrationProvider(e){const{payload:t}=await this.wire.sendAction(\"enable-native-window-integration-provider\",{permissions:e});return t.data}async registerUsage({data:e,type:t}){await this.wire.sendAction(\"register-usage\",{data:e,type:t})}async getPrinters(){const{payload:e}=await this.wire.sendAction(\"system-get-printers\");return e.data}async updateProcessLoggingOptions(e){await this.wire.sendAction(\"system-update-process-logging-options\",{options:e})}async getDomainSettings(){const{payload:{data:e}}=await this.wire.sendAction(\"get-domain-settings\",this.identity);return e}async setDomainSettings(e){await this.wire.sendAction(\"set-domain-settings\",{domainSettings:e,...this.identity})}async refreshExtensions(){const{payload:e}=await this.wire.sendAction(\"refresh-extensions\");return e.data}async getInstalledExtensions(){const{payload:e}=await this.wire.sendAction(\"get-installed-extensions\");return e.data}}c.System=ce;var de={},he={};Object.defineProperty(he,\"__esModule\",{value:!0}),he.RefCounter=void 0;he.RefCounter=class{constructor(){this.topicRefMap=new Map}incRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t+1;n=i,this.topicRefMap.set(e,i)}else this.topicRefMap.set(e,1),n=1;return n}decRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t-1;this.topicRefMap.set(e,i),n=i}else n=-1;return n}actOnFirst(e,t,n){return 1===this.incRefCount(e)?t():n()}actOnLast(e,t,n){return 0===this.decRefCount(e)?t():n()}};var le={},ue={},pe={};Object.defineProperty(pe,\"__esModule\",{value:!0}),pe.ChannelBase=pe.ProtectedItems=void 0;const we=e=>async(t,n,i)=>{const r=await e(t,n,i);return void 0===r?n:r};pe.ProtectedItems=class{constructor(e,t){this.providerIdentity=e,this.close=t}};class ye{static defaultAction(e){throw new Error(`No action registered at target for ${e}`)}constructor(){this.subscriptions=new Map}async processAction(e,t,n){try{const i=this.subscriptions.has(e)?this.subscriptions.get(e):(t,n)=>(this.defaultAction??ye.defaultAction)(e,t,n),r=this.preAction?await this.preAction(e,t,n):t,o=await i(r,n);return this.postAction?await this.postAction(e,o,n):o}catch(t){if(this.errorMiddleware)return this.errorMiddleware(e,t,n);throw t}}beforeAction(e){if(this.preAction)throw new Error(\"Already registered beforeAction middleware\");this.preAction=we(e)}onError(e){if(this.errorMiddleware)throw new Error(\"Already registered error middleware\");this.errorMiddleware=e}afterAction(e){if(this.postAction)throw new Error(\"Already registered afterAction middleware\");this.postAction=we(e)}remove(e){this.subscriptions.delete(e)}setDefaultAction(e){if(this.defaultAction)throw new Error(\"default action can only be set once\");this.defaultAction=e}register(e,t){if(this.subscriptions.has(e))throw new Error(`Subscription already registered for action: ${e}. Unsubscribe before adding new subscription`);return this.subscriptions.set(e,t),!0}}pe.ChannelBase=ye;var fe,ge,me,ve=s&&s.__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)},Ce=s&&s.__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};Object.defineProperty(ue,\"__esModule\",{value:!0}),ue.ChannelClient=void 0;const be=pe,Ie=new Map;class Ee extends be.ChannelBase{static closeChannelByEndpointId(e){const t=Ie.get(e);t&&ve(t,me,\"f\").call(t)}static handleProviderDisconnect(e){for(const t of Ie.values())t.providerIdentity.channelId===e.channelId&&(t.disconnectListener(e),ve(t,me,\"f\").call(t))}constructor(e,t,n){super(),fe.set(this,void 0),ge.set(this,void 0),this.processAction=(e,t,n)=>super.processAction(e,t,n),me.set(this,(()=>{Ie.delete(this.endpointId),ve(this,ge,\"f\").close()})),Ce(this,fe,new be.ProtectedItems(e,t),\"f\"),this.disconnectListener=()=>{},this.endpointId=e.endpointId,Ce(this,ge,n,\"f\"),Ie.set(this.endpointId,this),n.receive(this.processAction)}get providerIdentity(){return ve(this,fe,\"f\").providerIdentity}async dispatch(e,t){if(ve(this,ge,\"f\").isEndpointConnected(this.providerIdentity.channelId))return ve(this,ge,\"f\").send(this.providerIdentity.channelId,e,t);throw new Error(\"The client you are trying to dispatch from is disconnected from the target provider.\")}onDisconnection(e){this.disconnectListener=t=>{try{e(t)}catch(e){throw new Error(`Error while calling the onDisconnection callback: ${e.message}`)}finally{this.disconnectListener=()=>{}}}}async disconnect(){await this.sendDisconnectAction(),ve(this,me,\"f\").call(this)}async sendDisconnectAction(){const e=ve(this,fe,\"f\");await e.close()}static async wireClose(e,t,n){const{channelName:i,uuid:r,name:o}=t;await e.sendAction(\"disconnect-from-channel\",{channelName:i,uuid:r,name:o,endpointId:n})}}ue.ChannelClient=Ee,fe=new WeakMap,ge=new WeakMap,me=new WeakMap;var xe={},Ae={};Object.defineProperty(Ae,\"__esModule\",{value:!0}),Ae.exhaustiveCheck=void 0,Ae.exhaustiveCheck=function(e,t){throw new Error(`Unsupported value: ${e}${t?`\\n Supported values are: ${t.join(\"\")}`:\"\"}`)};var Pe,Me,_e,Oe={},Se=s&&s.__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},Re=s&&s.__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)};Object.defineProperty(Oe,\"__esModule\",{value:!0}),Oe.ClassicInfo=Oe.ClassicStrategy=void 0;Oe.ClassicStrategy=class{constructor(e,t,n,i){this.messageReceiver=t,this.endpointId=n,this.providerIdentity=i,Pe.set(this,void 0),Me.set(this,new Map),_e.set(this,new Map),this.send=async(e,t,n)=>{const i=Re(this,Me,\"f\").get(e);if(!i)throw new Error(`Could not locate routing info for endpoint ${e}`);const r={...i};r.isLocalEndpointId&&delete r.endpointId,delete r.isLocalEndpointId;const o=Re(this,Pe,\"f\").sendAction(\"send-channel-message\",{...r,providerIdentity:this.providerIdentity,action:t,payload:n});Re(this,_e,\"f\").get(e)?.add(o);return(await o.catch((e=>{throw new Error(e.message)})).finally((()=>{Re(this,_e,\"f\").get(e)?.delete(o)}))).payload.data.result},this.close=async()=>{this.messageReceiver.removeEndpoint(this.providerIdentity.channelId,this.endpointId),[...Re(this,Me,\"f\").keys()].forEach((e=>this.closeEndpoint(e))),Se(this,Me,new Map,\"f\")},Se(this,Pe,e,\"f\")}onEndpointDisconnect(e,t){}receive(e){this.messageReceiver.addEndpoint(e,this.providerIdentity.channelId,this.endpointId)}async closeEndpoint(e){const t=Re(this,Me,\"f\").get(e);Re(this,Me,\"f\").delete(e);const n=Re(this,_e,\"f\").get(e);n?.forEach((n=>{const i=`Channel connection with identity uuid: ${t?.uuid} / name: ${t?.name} / endpointId: ${e} no longer connected.`;n.cancel(new Error(i))}))}isEndpointConnected(e){return Re(this,Me,\"f\").has(e)}addEndpoint(e,t){Re(this,Me,\"f\").set(e,t.endpointIdentity),Re(this,_e,\"f\").set(e,new Set)}isValidEndpointPayload(e){return\"string\"==typeof e?.endpointIdentity?.endpointId||\"string\"==typeof e?.endpointIdentity?.channelId}},Pe=new WeakMap,Me=new WeakMap,_e=new WeakMap,Oe.ClassicInfo={version:5,minimumVersion:0,type:\"classic\"};var Fe={},je={},ke={};Object.defineProperty(ke,\"__esModule\",{value:!0}),ke.errorToPOJO=void 0,ke.errorToPOJO=function(e){return{stack:e.stack,name:e.name,message:e.message,toString:()=>e.stack||e.toString()}};var Le,Te,$e=s&&s.__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)},Be=s&&s.__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};Object.defineProperty(je,\"__esModule\",{value:!0}),je.RTCEndpoint=void 0;const Ge=ke;je.RTCEndpoint=class{static isValidEndpointPayload(e){const t=e=>\"object\"==typeof e&&null!==e;return t(e)&&t(e.endpointIdentity)&&t(e.rtc)&&\"string\"==typeof e.endpointIdentity.endpointId}constructor({rtc:e,endpointIdentity:t}){this.responseMap=new Map,Le.set(this,null),Te.set(this,void 0),this.connectionStateChangeHandler=e=>{\"connected\"!==this.rtc.rtcClient.connectionState&&(this.rtc.rtcClient.removeEventListener(\"connectionstatechange\",this.connectionStateChangeHandler),this.close(),$e(this,Te,\"f\")&&$e(this,Te,\"f\").call(this))},this.send=async(e,t)=>{const n=`message-${Math.random()}`,i=new Promise(((e,t)=>{this.responseMap.set(n,{resolve:e,reject:t})}));return this.rtc.channels.request.send(JSON.stringify({action:e,payload:t,messageId:n})),i},this.close=()=>{this.responseMap.forEach((e=>e.reject(\"Connection has closed.\"))),this.responseMap=new Map,this.rtc.channels.request.close(),this.rtc.channels.response.close(),this.rtc.rtcClient.close()},this.rtc=e,this.endpointIdentity=t,this.rtc.channels.response.addEventListener(\"message\",(e=>{let{data:t}=e;e.data instanceof ArrayBuffer&&(t=(new TextDecoder).decode(e.data));const{messageId:n,payload:i,success:r,error:o}=JSON.parse(t),{resolve:s,reject:a}=this.responseMap.get(n)??{};s&&a?(this.responseMap.delete(n),r?s(i):a(o)):(console.log(\"Could not find id in responseMap.\"),console.log(e))})),this.rtc.channels.request.addEventListener(\"message\",(async e=>{let{data:n}=e;e.data instanceof ArrayBuffer&&(n=(new TextDecoder).decode(e.data));const{messageId:i,action:r,payload:o}=JSON.parse(n);if($e(this,Le,\"f\"))try{const e=await $e(this,Le,\"f\").call(this,r,o,t);this.rtc.channels.response.send(JSON.stringify({messageId:i,payload:e,success:!0}))}catch(e){\"open\"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,error:(0,Ge.errorToPOJO)(e),success:!1}))}else\"open\"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,success:!1,error:\"Connection not ready.\"}))})),this.rtc.rtcClient.addEventListener(\"connectionstatechange\",this.connectionStateChangeHandler),Object.values(this.rtc.channels).forEach((e=>{e.onclose=e=>{[...this.responseMap.values()].forEach((e=>e.reject(new Error(\"RTCDataChannel closed unexpectedly, this is most commonly caused by message size. Note: RTC Channels have a message size limit of ~255kB.\")))),this.close(),$e(this,Te,\"f\")&&$e(this,Te,\"f\").call(this)}}))}onDisconnect(e){if($e(this,Te,\"f\"))throw new Error(\"RTCEndpoint disconnectListener cannot be set twice.\");Be(this,Te,e,\"f\")}receive(e){if($e(this,Le,\"f\"))throw new Error(\"You have already set a listener for this RTC Endpoint.\");Be(this,Le,e,\"f\")}get connected(){return\"connected\"===this.rtc.rtcClient.connectionState}},Le=new WeakMap,Te=new WeakMap;var We,He,Ne,De={},Ue=s&&s.__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)},Ve=s&&s.__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};Object.defineProperty(De,\"__esModule\",{value:!0}),De.EndpointStrategy=void 0;De.EndpointStrategy=class{constructor(e,t,n){this.EndpointType=e,this.StrategyName=n,We.set(this,null),He.set(this,new Map),Ne.set(this,!0),this.send=async(e,t,n)=>this.getEndpointById(e).send(t,n),this.close=async()=>{Ue(this,Ne,\"f\")&&(Ue(this,He,\"f\").forEach((e=>e.close())),Ve(this,He,new Map,\"f\")),Ve(this,Ne,!1,\"f\")},this.isValidEndpointPayload=t}onEndpointDisconnect(e,t){this.getEndpointById(e).onDisconnect(t)}receive(e){if(Ue(this,We,\"f\"))throw new Error(`You have already set a listener for this ${this.StrategyName} Strategy`);Ve(this,We,e,\"f\"),Ue(this,He,\"f\").forEach((e=>e.receive(Ue(this,We,\"f\"))))}getEndpointById(e){const t=Ue(this,He,\"f\").get(e);if(!t)throw new Error(`Client with endpoint id ${e} is not connected`);return t}get connected(){return Ue(this,Ne,\"f\")}isEndpointConnected(e){return Ue(this,He,\"f\").has(e)}addEndpoint(e,t){if(!Ue(this,Ne,\"f\"))return void console.warn(`Adding endpoint to disconnected ${this.StrategyName} Strategy`);const n=new this.EndpointType(t);Ue(this,We,\"f\")&&n.receive(Ue(this,We,\"f\")),Ue(this,He,\"f\").set(e,n)}async closeEndpoint(e){Ue(this,He,\"f\").delete(e)}},We=new WeakMap,He=new WeakMap,Ne=new WeakMap,Object.defineProperty(Fe,\"__esModule\",{value:!0}),Fe.RTCInfo=Fe.RTCStrategy=void 0;const ze=je,Ke=De;class qe extends Ke.EndpointStrategy{constructor(){super(ze.RTCEndpoint,ze.RTCEndpoint.isValidEndpointPayload,\"RTC\")}}Fe.RTCStrategy=qe,Fe.RTCInfo={version:2,minimumVersion:0,type:\"rtc\"};var Je={};Object.defineProperty(Je,\"__esModule\",{value:!0}),Je.RTCICEManager=void 0;const Ye=d;class Ze extends Ye.EmitterBase{constructor(e){super(e,\"channel\"),this.ensureChannelOpened=e=>new Promise(((t,n)=>{if(\"open\"===e.readyState)t();else if(\"connecting\"===e.readyState){const n=()=>{e.removeEventListener(\"open\",n),t()};e.addEventListener(\"open\",n)}else n(new Error(\"This Channel has already closed\"))}))}static createDataChannelPromise(e,t){let n;const i=new Promise((e=>{n=e})),r=i=>{const o=()=>{i.channel.removeEventListener(\"open\",o),n(i.channel)};i.channel.label===e&&(i.channel.addEventListener(\"open\",o),t.removeEventListener(\"datachannel\",r))};return t.addEventListener(\"datachannel\",r),i}async listenForProviderIce(e,t){await this.on(this.createProviderEventName(e),t,{timestamp:Date.now()})}async raiseProviderIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createProviderEventName(e)),t)}async listenForClientIce(e,t){await this.on(this.createClientEventName(e),t,{timestamp:Date.now()})}async raiseClientIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createClientEventName(e)),t)}cleanupIceListeners(e){this.removeAllListeners(this.createClientEventName(e)),this.removeAllListeners(this.createProviderEventName(e))}createClientEventName(e){return`ice-client-${e}`}createProviderEventName(e){return`ice-provider-${e}`}createRouteString(e){return`channel/${e}`}createRtcPeer(){return this.wire.environment.getRtcPeer()}async startClientOffer(){const e=Math.random().toString(),t=this.createRtcPeer();t.addEventListener(\"icecandidate\",(async t=>{t.candidate&&await this.raiseClientIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForProviderIce(e,(async e=>{await t.addIceCandidate(e.candidate)}));const n={request:t.createDataChannel(\"request\"),response:t.createDataChannel(\"response\")},i=await t.createOffer();await t.setLocalDescription(i);const r=Promise.all([n.request,n.response].map(this.ensureChannelOpened)).then((()=>{}));return{rtcClient:t,channels:n,offer:i,rtcConnectionId:e,channelsOpened:r}}async finishClientOffer(e,t,n){return await e.setRemoteDescription(t),await n,!0}async createProviderAnswer(e,t){const n=this.createRtcPeer(),i=Ze.createDataChannelPromise(\"request\",n),r=Ze.createDataChannelPromise(\"response\",n);n.addEventListener(\"icecandidate\",(async t=>{t.candidate&&await this.raiseProviderIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForClientIce(e,(async e=>{await n.addIceCandidate(e.candidate)})),await n.setRemoteDescription(t);const o=await n.createAnswer();await n.setLocalDescription(o);const s=Promise.all([i,r]).then((([t,n])=>(this.cleanupIceListeners(e),{request:t,response:n})));return{rtcClient:n,answer:o,channels:s}}}Je.RTCICEManager=Ze;var Qe={},Xe={};function et(e){return[...e.split(\".\").reverse().entries()].reduce(((e,[t,n])=>e+ +n*1e4**t),0)}function tt(e,t){return et(e)>=et(t)}function nt(e){return e.split(\"/\")[0]}Object.defineProperty(Xe,\"__esModule\",{value:!0}),Xe.runtimeUuidMeetsMinimumRuntimeVersion=Xe.parseRuntimeUuid=Xe.meetsMinimumRuntimeVersion=void 0,Xe.meetsMinimumRuntimeVersion=tt,Xe.parseRuntimeUuid=nt,Xe.runtimeUuidMeetsMinimumRuntimeVersion=function(e,t){return tt(nt(e),t)};var it,rt,ot,st,at,ct=s&&s.__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)},dt=s&&s.__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};Object.defineProperty(Qe,\"__esModule\",{value:!0}),Qe.ChannelProvider=void 0;const ht=pe,lt=Xe;class ut extends ht.ChannelBase{get connections(){return[...ct(this,it,\"f\")]}static handleClientDisconnection(e,t){const n=e.connections.find((e=>e.endpointId===t.endpointId));if(n)ct(e,st,\"f\").call(e,n);else{e.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name)).forEach(ct(e,st,\"f\"))}e.disconnectListener(t)}static setProviderRemoval(e,t){ut.removalMap.set(e,t)}constructor(e,t,n){super(),it.set(this,void 0),rt.set(this,void 0),ot.set(this,void 0),st.set(this,(e=>{const t=this.connections.filter((t=>t.endpointId!==e.endpointId));ct(this,ot,\"f\").closeEndpoint(e.endpointId),dt(this,it,t,\"f\")})),this.processAction=async(e,t,n)=>(ut.clientIsMultiRuntime(n)&&!(0,lt.runtimeUuidMeetsMinimumRuntimeVersion)(n.runtimeUuid,\"18.87.56.0\")?this.handleMultiRuntimeLegacyClient(n):this.checkForClientConnection(n),super.processAction(e,t,n)),at.set(this,(()=>{ct(this,ot,\"f\").close();const e=ut.removalMap.get(this);e&&e()})),dt(this,rt,new ht.ProtectedItems(e,t),\"f\"),this.connectListener=()=>{},this.disconnectListener=()=>{},dt(this,it,[],\"f\"),dt(this,ot,n,\"f\"),n.receive(this.processAction)}dispatch(e,t,n){const i=e.endpointId??this.getEndpointIdForOpenFinId(e,t);return i&&ct(this,ot,\"f\").isEndpointConnected(i)?ct(this,ot,\"f\").send(i,t,n):Promise.reject(new Error(`Client connection with identity uuid: ${e.uuid} / name: ${e.name} / endpointId: ${i} no longer connected.`))}async processConnection(e,t){return ct(this,it,\"f\").push(e),this.connectListener(e,t)}publish(e,t){return this.connections.map((n=>ct(this,ot,\"f\").send(n.endpointId,e,t)))}onConnection(e){this.connectListener=e}onDisconnection(e){this.disconnectListener=e}async destroy(){const e=ct(this,rt,\"f\");e.providerIdentity,dt(this,it,[],\"f\"),await e.close(),ct(this,at,\"f\").call(this)}async getAllClientInfo(){return this.connections.map((e=>{const{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}=e;return{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}}))}checkForClientConnection(e){if(!this.isClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider.\\n Client Identity: {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}isClientConnected(e){return ut.clientIdentityIncludesEndpointId(e)?this.connections.some((t=>t.endpointId===e.endpointId&&t.uuid===e.uuid&&t.name===e.name)):this.isLegacyClientConnected(e)}isLegacyClientConnected(e){return this.connections.some((t=>t.uuid===e.uuid&&t.name===e.name))}handleMultiRuntimeLegacyClient(e){if(!this.isLegacyClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider. Client Identity:\\n {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}getEndpointIdForOpenFinId(e,t){const n=this.connections.filter((t=>t.name===e.name&&t.uuid===e.uuid));if(n.length>=2){const n=ct(this,rt,\"f\"),{uuid:i,name:r}=e,o=n?.providerIdentity.uuid,s=n?.providerIdentity.name;console.warn(`WARNING: Dispatch call may have unintended results. The \"to\" argument of your dispatch call is missing the\\n \"endpointId\" parameter. The identity you are dispatching to ({uuid: ${i}, name: ${r}})\\n has multiple channelClients for this channel. Your dispatched action: (${t}) from the provider:\\n ({uuid: ${o}, name: ${s}}) will only be processed by the most recently-created client.`)}return n.pop()?.endpointId}static clientIdentityIncludesEndpointId(e){return void 0!==e.endpointId}static clientIsMultiRuntime(e){return void 0!==e.runtimeUuid}static async wireClose(e,t){await e.sendAction(\"destroy-channel\",{channelName:t})}}Qe.ChannelProvider=ut,it=new WeakMap,rt=new WeakMap,ot=new WeakMap,st=new WeakMap,at=new WeakMap,ut.removalMap=new WeakMap;var pt={};Object.defineProperty(pt,\"__esModule\",{value:!0}),pt.MessageReceiver=void 0;const wt=ue,yt=d;class ft extends yt.Base{constructor(e){super(e),this.onmessage=e=>\"process-channel-message\"===e.action&&(this.processChannelMessage(e),!0),this.endpointMap=new Map,this.latestEndpointIdByChannelId=new Map,e.registerMessageHandler(this.onmessage.bind(this))}async processChannelMessage(e){const{senderIdentity:t,providerIdentity:n,action:i,ackToSender:r,payload:o,intendedTargetIdentity:s}=e.payload,a=s.channelId??s.endpointId??this.latestEndpointIdByChannelId.get(n.channelId),c=this.endpointMap.get(a);if(!c)return r.payload.success=!1,r.payload.reason=`Client connection with identity uuid: ${this.wire.me.uuid} / name: ${this.wire.me.name} / endpointId: ${a} no longer connected.`,this.wire.sendRaw(r);try{const e=await c(i,o,t);return r.payload.payload=r.payload.payload||{},r.payload.payload.result=e,this.wire.sendRaw(r)}catch(e){return r.payload.success=!1,r.payload.reason=e.message,this.wire.sendRaw(r)}}addEndpoint(e,t,n){this.endpointMap.set(n,e),t!==n&&this.latestEndpointIdByChannelId.set(t,n)}removeEndpoint(e,t){this.endpointMap.delete(t),this.latestEndpointIdByChannelId.get(e)===t&&this.latestEndpointIdByChannelId.delete(e)}checkForPreviousClientConnection(e){const t=this.latestEndpointIdByChannelId.get(e);t&&(wt.ChannelClient.closeChannelByEndpointId(t),console.warn(\"You have created a second connection to an older provider. First connection has been removed from the clientMap\"),console.warn(\"If the provider calls publish(), you may receive multiple messages.\"))}}pt.MessageReceiver=ft;var gt={};Object.defineProperty(gt,\"__esModule\",{value:!0}),gt.ProtocolManager=void 0;gt.ProtocolManager=class{constructor(e){this.ProtocolsInPreferenceOrder=e,this.DefaultClientProtocols=[\"classic\"],this.DefaultProviderProtocols=[\"classic\"],this.getClientProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultClientProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(\", \")}.`);return t},this.getProviderProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultProviderProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(\", \")}.`);return t},this.getCompatibleProtocols=(e,t)=>t.supportedProtocols.filter((t=>e.some((e=>e.type===t.type&&t.version>=e.minimumVersion&&e.version>=(t.minimumVersion??0))))).slice(0,t.maxProtocols)}};var mt={};Object.defineProperty(mt,\"__esModule\",{value:!0});class vt{static combine(e,t){return new vt(e,t)}constructor(e,t){this.primary=e,this.secondary=t}onEndpointDisconnect(e,t){this.primary.onEndpointDisconnect(e,(()=>{this.secondary.isEndpointConnected(e)||t()})),this.secondary.onEndpointDisconnect(e,(()=>{this.primary.isEndpointConnected(e)||t()}))}isValidEndpointPayload(e){return this.primary.isValidEndpointPayload(e)||this.secondary.isValidEndpointPayload(e)}async closeEndpoint(e){await this.primary.closeEndpoint(e),await this.secondary.closeEndpoint(e)}isEndpointConnected(e){return this.primary.isEndpointConnected(e)||this.secondary.isEndpointConnected(e)}async addEndpoint(e,t){this.primary.isValidEndpointPayload(t)&&await this.primary.addEndpoint(e,t),this.secondary.isValidEndpointPayload(t)&&await this.secondary.addEndpoint(e,t)}receive(e){this.primary.receive(e),this.secondary.receive(e)}send(e,t,n){return this.primary.isEndpointConnected(e)?this.primary.send(e,t,n):this.secondary.send(e,t,n)}async close(){await Promise.all([this.primary.close(),this.secondary.close()])}}mt.default=vt;var Ct,bt,It=s&&s.__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},Et=s&&s.__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)},xt=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(xe,\"__esModule\",{value:!0}),xe.ConnectionManager=void 0;const At=Ae,Pt=d,Mt=Oe,_t=Fe,Ot=Je,St=Qe,Rt=pt,Ft=gt,jt=xt(mt);class kt extends Pt.Base{static getProtocolOptionsFromStrings(e){return e.map((e=>{switch(e){case\"rtc\":return _t.RTCInfo;case\"classic\":return Mt.ClassicInfo;default:return(0,At.exhaustiveCheck)(e,[\"rtc\",\"classic\"])}}))}constructor(e){super(e),Ct.set(this,void 0),bt.set(this,void 0),this.removeChannelFromProviderMap=e=>{this.providerMap.delete(e)},this.onmessage=e=>\"process-channel-connection\"===e.action&&(this.processChannelConnection(e),!0),this.providerMap=new Map,this.protocolManager=new Ft.ProtocolManager(\"node\"===this.wire.environment.type?[\"classic\"]:[\"rtc\",\"classic\"]),It(this,Ct,new Rt.MessageReceiver(e),\"f\"),It(this,bt,new Ot.RTCICEManager(e),\"f\"),e.registerMessageHandler(this.onmessage.bind(this))}createProvider(e,t){const n=Object.assign(this.wire.environment.getDefaultChannelOptions().create,e||{}),i=this.protocolManager.getProviderProtocols(n?.protocols),r=i.map((e=>{switch(e){case\"rtc\":return new _t.RTCStrategy;case\"classic\":return new Mt.ClassicStrategy(this.wire,Et(this,Ct,\"f\"),t.channelId,t);default:return(0,At.exhaustiveCheck)(e,[\"rtc\",\"classic\"])}}));let o;if(2===r.length){const[e,t]=r;o=jt.default.combine(e,t)}else{if(1!==r.length)throw new Error(\"failed to combine strategies\");[o]=r}const s=new St.ChannelProvider(t,(()=>St.ChannelProvider.wireClose(this.wire,t.channelName)),o),a=t.channelId;return this.providerMap.set(a,{provider:s,strategy:o,supportedProtocols:kt.getProtocolOptionsFromStrings(i)}),St.ChannelProvider.setProviderRemoval(s,this.removeChannelFromProviderMap.bind(this)),s}async createClientOffer(e){const t=this.protocolManager.getClientProtocols(e?.protocols);let n;return{offer:{supportedProtocols:await Promise.all(t.map((async e=>{switch(e){case\"rtc\":{const{rtcClient:e,channels:t,offer:i,rtcConnectionId:r,channelsOpened:o}=await Et(this,bt,\"f\").startClientOffer();return n={rtcClient:e,channels:t,channelsOpened:o},{type:\"rtc\",version:_t.RTCInfo.version,payload:{offer:i,rtcConnectionId:r}}}case\"classic\":return{type:\"classic\",version:Mt.ClassicInfo.version};default:return(0,At.exhaustiveCheck)(e,[\"rtc\",\"classic\"])}}))),maxProtocols:2},rtc:n}}async createClientStrategy(e,t){t.endpointId||(t.endpointId=this.wire.environment.getNextMessageId(),Et(this,Ct,\"f\").checkForPreviousClientConnection(t.channelId));const n=t.answer??{supportedProtocols:[{type:\"classic\",version:1}]},i=(await Promise.all(n.supportedProtocols.map((async n=>\"rtc\"===n.type&&e?(await Et(this,bt,\"f\").finishClientOffer(e.rtcClient,n.payload.answer,e.channelsOpened),new _t.RTCStrategy):\"classic\"===n.type?new Mt.ClassicStrategy(this.wire,Et(this,Ct,\"f\"),t.endpointId,t):null)))).filter((e=>null!==e));let r;if(e&&!i.some((e=>e instanceof _t.RTCStrategy))&&e&&e.rtcClient.close(),i.length>=2)r=jt.default.combine(i[0],i[1]);else{if(!i.length)throw new Error(\"No compatible protocols\");[r]=i}const o={endpointIdentity:t,rtc:e};return r.addEndpoint(t.channelId,o),r}async processChannelConnection(e){const{clientIdentity:t,providerIdentity:n,ackToSender:i,payload:r,offer:o}=e.payload;t.endpointId?t.isLocalEndpointId=!1:(t.endpointId=this.wire.environment.getNextMessageId(),t.isLocalEndpointId=!0);const s=n.channelId,a=this.providerMap.get(s);if(!a)return i.payload.success=!1,i.payload.reason=`Channel \"${n.channelName}\" has been destroyed.`,this.wire.sendRaw(i);const{provider:c,strategy:d,supportedProtocols:h}=a;try{if(!(c instanceof St.ChannelProvider))throw Error(\"Cannot connect to a channel client\");const e=o??{supportedProtocols:[{type:\"classic\",version:1}],maxProtocols:1},n=this.protocolManager.getCompatibleProtocols(h,e);if(!n.length)throw new Error(\"This provider does not support any of the offered protocols.\");const s=await c.processConnection(t,r);i.payload.payload=i.payload.payload||{};let a={supportedProtocols:[],endpointPayloadPromise:Promise.resolve({endpointIdentity:t})};return a=await n.reduce((async(e,t)=>{const n=await e;if(\"rtc\"===t.type){const{answer:e,rtcClient:i,channels:r}=await Et(this,bt,\"f\").createProviderAnswer(t.payload.rtcConnectionId,t.payload.offer);n.supportedProtocols.push({type:\"rtc\",version:_t.RTCInfo.version,payload:{answer:e}}),n.endpointPayloadPromise=n.endpointPayloadPromise.then((e=>r.then((t=>({...e,rtc:{rtcClient:i,channels:t}})))))}else n.supportedProtocols.push({type:\"classic\",version:Mt.ClassicInfo.version});return n}),Promise.resolve(a)),a.endpointPayloadPromise.then((e=>d.addEndpoint(t.endpointId,e))),i.payload.payload.result=s,i.payload.payload.answer=a,this.wire.sendRaw(i)}catch(e){return i.payload.success=!1,i.payload.reason=e.message,this.wire.sendRaw(i)}}}xe.ConnectionManager=kt,Ct=new WeakMap,bt=new WeakMap;var Lt,Tt,$t,Bt=s&&s.__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},Gt=s&&s.__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)};Object.defineProperty(le,\"__esModule\",{value:!0}),le.Channel=void 0;const Wt=t,Ht=G,Nt=d,Dt=ue,Ut=xe,Vt=Qe;function zt(e){const t=Math.floor(e/10),n=Math.min(3e4,500*2**t);return new Promise((e=>{setTimeout((()=>{e(!1)}),n)}))}class Kt extends Nt.EmitterBase{constructor(e){super(e,\"channel\"),Lt.set(this,void 0),Tt.set(this,new Wt.EventEmitter),$t.set(this,new Ht.AsyncRetryableLazy((async()=>{await Promise.all([this.on(\"disconnected\",(e=>{Dt.ChannelClient.handleProviderDisconnect(e)})),this.on(\"connected\",((...e)=>{Gt(this,Tt,\"f\").emit(\"connected\",...e)}))]).catch((()=>new Error(\"error setting up channel connection listeners\")))}))),Bt(this,Lt,new Ut.ConnectionManager(e),\"f\")}async getAllChannels(){return this.wire.sendAction(\"get-all-channels\").then((({payload:e})=>e.data))}async onChannelConnect(e){await this.on(\"connected\",e)}async onChannelDisconnect(e){await this.on(\"disconnected\",e)}async safeConnect(e,t,n){const i={count:0};do{let r=()=>{};const o=new Promise((t=>{r=n=>{e===n.channelName&&t(!0)},Gt(this,Tt,\"f\").on(\"connected\",r)}));try{if(i.count>0){i.gotConnectedEvent=await Promise.race([zt(i.count),o]);const t=await this.wire.sendAction(\"connect-to-channel\",{...n,retryInfo:i});return console.log(`Successfully connected to channelName: ${e}`),t.payload.data}const t=this.wire.sendAction(\"connect-to-channel\",n);i.originalMessageId=t.messageId;return(await t).payload.data}catch(n){if(!n.message.includes(\"internal-nack\"))throw n;t&&0===i.count&&console.warn(`No channel found for channelName: ${e}. Waiting for connection...`)}finally{i.count+=1,Gt(this,Tt,\"f\").removeListener(\"connected\",r)}}while(t);throw new Error(`No channel found for channelName: ${e}.`)}async connect(e,t={}){if(await Gt(this,$t,\"f\").getValue(),!e||\"string\"!=typeof e)throw new Error(\"Please provide a channelName string to connect to a channel.\");const n={wait:!0,...this.wire.environment.getDefaultChannelOptions().connect,...t},{offer:i,rtc:r}=await Gt(this,Lt,\"f\").createClientOffer(n);let o;(this.fin.me.isFrame||this.fin.me.isView||this.fin.me.isWindow)&&(o=(await this.fin.me.getInfo()).url);const s={channelName:e,...n,offer:i,connectionUrl:o},a=await this.safeConnect(e,n.wait,s),c=await Gt(this,Lt,\"f\").createClientStrategy(r,a),d=new Dt.ChannelClient(a,(()=>Dt.ChannelClient.wireClose(this.wire,a,a.endpointId)),c);return c.onEndpointDisconnect(a.channelId,(async()=>{try{await d.sendDisconnectAction()}catch(e){console.warn(`Something went wrong during disconnect for client with uuid: ${a.uuid} / name: ${a.name} / endpointId: ${a.endpointId}.`)}finally{Dt.ChannelClient.handleProviderDisconnect(a)}})),d}async create(e,t){if(!e)throw new Error(\"Please provide a channelName to create a channel\");const{payload:{data:n}}=await this.wire.sendAction(\"create-channel\",{channelName:e}),i=Gt(this,Lt,\"f\").createProvider(t,n);return this.on(\"client-disconnected\",(t=>{t.channelName===e&&Vt.ChannelProvider.handleClientDisconnection(i,t)})),i}}le.Channel=Kt,Lt=new WeakMap,Tt=new WeakMap,$t=new WeakMap,Object.defineProperty(de,\"__esModule\",{value:!0}),de.InterAppPayload=de.InterApplicationBus=void 0;const qt=t,Jt=d,Yt=he,Zt=le,Qt=O;class Xt extends Jt.Base{constructor(e){super(e),this.events={subscriberAdded:\"subscriber-added\",subscriberRemoved:\"subscriber-removed\"},this.refCounter=new Yt.RefCounter,this.Channel=new Zt.Channel(e),this.emitter=new qt.EventEmitter,e.registerMessageHandler(this.onmessage.bind(this)),this.on=this.emitter.on.bind(this.emitter),this.removeAllListeners=this.emitter.removeAllListeners.bind(this.emitter)}async publish(e,t){await this.wire.sendAction(\"publish-message\",{topic:e,message:t,sourceWindowName:this.me.name})}async send(e,t,n){const i=(0,Qt.validateIdentity)(e);if(i)throw new Error(i);await this.wire.sendAction(\"send-message\",{destinationUuid:e.uuid,destinationWindowName:e.name,topic:t,message:n,sourceWindowName:this.me.name})}subscribe(e,t,n){const i=this.createSubscriptionKey(e.uuid,e.name||\"*\",t);return this.emitter.on(i,n),this.refCounter.actOnFirst(i,(async()=>{await this.wire.sendAction(\"subscribe\",{sourceUuid:e.uuid,sourceWindowName:e.name||\"*\",topic:t,destinationWindowName:this.me.name})}),(()=>Promise.resolve()))}unsubscribe(e,t,n){const i=e.name||\"*\",r=this.createSubscriptionKey(e.uuid,i,t);return this.emitter.removeListener(r,n),this.refCounter.actOnLast(r,(async()=>{await this.wire.sendAction(\"unsubscribe\",{sourceUuid:e.uuid,sourceWindowName:i,topic:t,destinationWindowName:this.me.name})}),(()=>new Promise((e=>e)).then((()=>{}))))}processMessage(e){const{payload:{message:t,sourceWindowName:n,sourceUuid:i,topic:r}}=e,o=[this.createSubscriptionKey(i,n,r),this.createSubscriptionKey(i,\"*\",r),this.createSubscriptionKey(\"*\",\"*\",r)],s={uuid:i,name:n};o.forEach((e=>{this.emitter.emit(e,t,s)}))}emitSubscriverEvent(e,t){const{payload:{targetName:n,uuid:i,topic:r}}=t,o={name:n,uuid:i,topic:r};this.emitter.emit(e,o)}createSubscriptionKey(e,t,n){const i=t||\"*\";if(!(e&&i&&n))throw new Error(\"Missing uuid, name, or topic string\");return function(...e){return e.map((e=>Buffer.from(`${e}`).toString(\"base64\"))).join(\"/\")}(e,i,n)}onmessage(e){const{action:t}=e;switch(t){case\"process-message\":this.processMessage(e);break;case this.events.subscriberAdded:this.emitSubscriverEvent(this.events.subscriberAdded,e);break;case this.events.subscriberRemoved:this.emitSubscriverEvent(this.events.subscriberRemoved,e)}return!0}}de.InterApplicationBus=Xt;de.InterAppPayload=class{};var en={};Object.defineProperty(en,\"__esModule\",{value:!0}),en.Clipboard=void 0;const tn=d;class nn extends tn.Base{async writeText(e){await this.wire.sendAction(\"clipboard-write-text\",e)}async readText(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-text\",{type:e});return t.data}async writeImage(e){await this.wire.sendAction(\"clipboard-write-image\",e)}async readImage(e={format:\"dataURL\"}){const{payload:t}=await this.wire.sendAction(\"clipboard-read-image\",e);return t.data}async writeHtml(e){await this.wire.sendAction(\"clipboard-write-html\",e)}async readHtml(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-html\",{type:e});return t.data}async writeRtf(e){await this.wire.sendAction(\"clipboard-write-rtf\",e)}async readRtf(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-rtf\",{type:e});return t.data}async write(e){await this.wire.sendAction(\"clipboard-write\",e)}async getAvailableFormats(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-formats\",{type:e});return t.data}}en.Clipboard=nn;var rn={},on={},sn={};Object.defineProperty(sn,\"__esModule\",{value:!0}),sn.ExternalApplication=void 0;const an=d;class cn extends an.EmitterBase{constructor(e,t){super(e,\"external-application\",t.uuid),this.identity=t}getInfo(){return this.wire.sendAction(\"get-external-application-info\",this.identity).then((({payload:e})=>e.data))}}sn.ExternalApplication=cn,Object.defineProperty(on,\"__esModule\",{value:!0}),on.ExternalApplicationModule=void 0;const dn=d,hn=sn;class ln extends dn.Base{wrap(e){return this.wire.sendAction(\"external-application-wrap\").catch((e=>{})),Promise.resolve(new hn.ExternalApplication(this.wire,{uuid:e}))}wrapSync(e){return this.wire.sendAction(\"external-application-wrap-sync\").catch((e=>{})),new hn.ExternalApplication(this.wire,{uuid:e})}}on.ExternalApplicationModule=ln,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(on,e),n(sn,e)}(rn);var un={},pn={},wn={};Object.defineProperty(wn,\"__esModule\",{value:!0}),wn._Frame=void 0;const yn=d;class fn extends yn.EmitterBase{constructor(e,t){super(e,\"frame\",t.uuid,t.name),this.identity=t}getInfo(){return this.wire.sendAction(\"get-frame-info\",this.identity).then((({payload:e})=>e.data))}getParentWindow(){return this.wire.sendAction(\"get-parent-window\",this.identity).then((({payload:e})=>e.data))}}wn._Frame=fn,Object.defineProperty(pn,\"__esModule\",{value:!0}),pn._FrameModule=void 0;const gn=d,mn=O,vn=wn;class Cn extends gn.Base{async wrap(e){this.wire.sendAction(\"frame-wrap\").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}wrapSync(e){this.wire.sendAction(\"frame-wrap-sync\").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}getCurrent(){return this.wire.sendAction(\"frame-get-current\").catch((e=>{})),Promise.resolve(new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity()))}getCurrentSync(){return this.wire.sendAction(\"frame-get-current-sync\").catch((e=>{})),new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity())}}pn._FrameModule=Cn,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(pn,e),n(wn,e)}(un);var bn={};Object.defineProperty(bn,\"__esModule\",{value:!0}),bn.GlobalHotkey=void 0;const In=d;class En extends In.EmitterBase{constructor(e){super(e,\"global-hotkey\")}async register(e,t){await this.on(e,t),await this.wire.sendAction(\"global-hotkey-register\",{hotkey:e})}async unregister(e){await this.removeAllListeners(e),await this.wire.sendAction(\"global-hotkey-unregister\",{hotkey:e})}async unregisterAll(){await Promise.all(this.eventNames().filter((e=>!(\"registered\"===e||\"unregistered\"===e))).map((e=>this.removeAllListeners(e)))),await this.wire.sendAction(\"global-hotkey-unregister-all\",{})}async isRegistered(e){const{payload:{data:t}}=await this.wire.sendAction(\"global-hotkey-is-registered\",{hotkey:e});return t}}bn.GlobalHotkey=En;var xn,An={},Pn={},Mn={},_n=s&&s.__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)};Object.defineProperty(Mn,\"__esModule\",{value:!0}),Mn.Platform=void 0;const On=d,Sn=O,Rn=new Map;class Fn extends On.EmitterBase{constructor(e,t){super(t.wire,\"application\",e.uuid),this.getClient=e=>{this.wire.sendAction(\"platform-get-client\",this.identity).catch((e=>{}));const t=e||this.identity,{uuid:n}=t;if(!Rn.has(n)){const e=_n(this,xn,\"f\").call(this,n);Rn.set(n,e)}return Rn.get(n)},xn.set(this,(async e=>{try{const t=`custom-frame-${e}`,n=await this._channel.connect(t,{wait:!1});return n.onDisconnection((()=>{Rn.delete(e)})),n}catch(t){throw Rn.delete(e),new Error(\"The targeted Platform is not currently running. Listen for application-started event for the given Uuid.\")}})),this.launchLegacyManifest=this.launchContentManifest;const n=(0,Sn.validateIdentity)(e);if(n)throw new Error(n);this._channel=t,this.identity={uuid:e.uuid},this.Layout=this.fin.Platform.Layout,this.Application=this.fin.Application.wrapSync(this.identity)}async createView(e,t,n){this.wire.sendAction(\"platform-create-view\",this.identity).catch((e=>{}));const i=await this.getClient(),r=await i.dispatch(\"create-view\",{target:t,opts:e,targetView:n});if(!r||(0,Sn.validateIdentity)(r.identity))throw new Error(`When overwriting the createView call, please return an object that has a valid 'identity' property: ${JSON.stringify(r)}`);return this.fin.View.wrapSync(r.identity)}async createWindow(e){this.wire.sendAction(\"platform-create-window\",this.identity).catch((e=>{}));const t=await this.getClient();e.reason||(e.reason=\"api-call\");const n=await t.dispatch(\"create-view-container\",e);if(!n||(0,Sn.validateIdentity)(n.identity))throw new Error(`When overwriting the createWindow call, please return an object that has a valid 'identity' property: ${JSON.stringify(n)}`);const{identity:i}=n,r=this.fin.Window.wrapSync(i);return r.name=i.name,r.uuid=i.uuid,r}async quit(){this.wire.sendAction(\"platform-quit\",this.identity).catch((e=>{}));return(await this.getClient()).dispatch(\"quit\")}async closeView(e){this.wire.sendAction(\"platform-close-view\",this.identity).catch((e=>{}));const t=await this.getClient();await t.dispatch(\"close-view\",{view:e})}async reparentView(e,t){console.warn(\"Platform.reparentView has been deprecated, please use Platform.createView\"),this.wire.sendAction(\"platform-reparent-view\",this.identity).catch((e=>{}));const n={...e,uuid:e.uuid??this.identity.uuid},i=await this.fin.View.wrap(n),r=await i.getOptions();return this.createView(r,t)}async getSnapshot(){this.wire.sendAction(\"platform-get-snapshot\",this.identity).catch((e=>{}));return(await this.getClient()).dispatch(\"get-snapshot\")}async getViewSnapshot(e){return(await this.getClient()).dispatch(\"get-view-snapshot\",{viewIdentity:e})}async applySnapshot(e,t){this.wire.sendAction(\"platform-apply-snapshot\",this.identity).catch((e=>{}));const n=\"Requested snapshot must be a valid Snapshot object, or a url or filepath to such an object.\";let i;if(\"string\"==typeof e)try{i=(await this._channel.wire.sendAction(\"get-application-manifest\",{manifestUrl:e})).payload.data}catch(e){throw new Error(`${n}: ${e}`)}else i=e;if(!i.windows)throw new Error(n);const r=await this.getClient();return await r.dispatch(\"apply-snapshot\",{snapshot:i,options:t}),this}async fetchManifest(e){return(await this.getClient()).dispatch(\"platform-fetch-manifest\",{manifestUrl:e})}async launchContentManifest(e){this.wire.sendAction(\"platform-launch-content-manifest\",this.identity).catch((()=>{}));const t=await this.getClient(),n=await this.fetchManifest(e);return t.dispatch(\"launch-into-platform\",{manifest:n,manifestUrl:e}),this}async setWindowContext(e={},t){if(this.wire.sendAction(\"platform-set-window-context\",this.identity).catch((e=>{})),!e)throw new Error(\"Please provide a serializable object or string to set the context.\");const n=await this.getClient(),{entityType:i}=t?await this.fin.System.getEntityInfo(t.uuid,t.name):this.fin.me;await n.dispatch(\"set-window-context\",{context:e,entityType:i,target:t||{uuid:this.fin.me.uuid,name:this.fin.me.name}})}async getWindowContext(e){this.wire.sendAction(\"platform-get-window-context\",this.identity).catch((e=>{}));const t=await this.getClient(),{entityType:n}=e?await this.fin.System.getEntityInfo(e.uuid,e.name):this.fin.me;return t.dispatch(\"get-window-context\",{target:e||{uuid:this.fin.me.uuid,name:this.fin.me.name},entityType:n})}async closeWindow(e,t={skipBeforeUnload:!1}){this.wire.sendAction(\"platform-close-window\",this.identity).catch((e=>{}));return(await this.getClient()).dispatch(\"close-window\",{windowId:e,options:t})}}Mn.Platform=Fn,xn=new WeakMap;var jn={},kn={},Ln={},Tn={};function $n(e){switch(e){case\"columns\":case\"grid\":case\"rows\":case\"tabs\":return!0;default:return!1}}Object.defineProperty(Tn,\"__esModule\",{value:!0}),Tn.overrideFromComposables=Tn.isValidPresetType=void 0,Tn.isValidPresetType=$n,Tn.overrideFromComposables=function(...e){return t=>e.reduceRight(((e,t)=>n=>t(e(n))),(e=>e))(t)},Tn.default={isValidPresetType:$n};var Bn={},Gn={},Wn={};Object.defineProperty(Wn,\"__esModule\",{value:!0}),Wn.ApiConsumer=void 0;Wn.ApiConsumer=class{constructor(e){this.strategy=e,this.consume=async e=>(await this.strategy.getExposedFunctions(e)).reduce(((t,n)=>({...t,[n.key]:this.strategy.createFunction(n,e)})),{})}};var Hn={},Nn={};Object.defineProperty(Nn,\"__esModule\",{value:!0}),Nn.expose=Nn.getExposedProperties=void 0;const Dn=Symbol(\"exposedProperties\");Nn.getExposedProperties=e=>e[Dn]||e.prototype[Dn]||[];Nn.expose=e=>(t,n,i)=>{t[Dn]=t[Dn]||[],t[Dn].push({key:n,descriptor:i,options:e})},Object.defineProperty(Hn,\"__esModule\",{value:!0}),Hn.ApiExposer=void 0;const Un=Nn;Hn.ApiExposer=class{constructor(e){this.strategy=e,this.exposeInstance=async(e,t)=>{const n=(0,Un.getExposedProperties)(e),i=await Promise.all(n.map((async({key:n,options:i})=>({key:n,options:await this.strategy.exposeFunction(e[n].bind(e),{key:n,options:i,meta:t})}))));await this.strategy.exposeMeta(t,i)}}};var Vn={},zn={},Kn={};Object.defineProperty(Kn,\"__esModule\",{value:!0}),Kn.ChannelsConsumer=void 0;Kn.ChannelsConsumer=class{constructor(e){this.channel=e,this.getExposedFunctions=async e=>{const{id:t}=e,{props:n}=await this.channel.dispatch(`api-meta:${t}`);return n},this.createFunction=e=>(...t)=>{const{action:n}=e.options;return this.channel.dispatch(n,{args:t})}}};var qn={};Object.defineProperty(qn,\"__esModule\",{value:!0}),qn.ChannelsExposer=void 0;qn.ChannelsExposer=class{constructor(e){this.channelProviderOrClient=e,this.exposeFunction=async(e,t)=>{const{key:n,options:i,meta:r}=t,{id:o}=r,s=`${o}.${i?.action||n}`;return await this.channelProviderOrClient.register(s,(async({args:t})=>e(...t))),{action:s}},this.exposeMeta=async({id:e},t)=>{const n=`api-meta:${e}`;await this.channelProviderOrClient.register(n,(()=>({props:t})))}}},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Kn,e),n(qn,e)}(zn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(zn,e)}(Vn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Wn,e),n(Hn,e),n(Vn,e),n(Nn,e)}(Gn);var Jn={};Object.defineProperty(Jn,\"__esModule\",{value:!0}),Jn.createRelayedDispatch=exports.relayChannelClientApi_1=Jn.relayChannelClientApi=void 0;const Yn=[\"no longer connected\",\"RTCDataChannel closed unexpectedly\",\"The client you are trying to dispatch from is disconnected from the target provider\"];exports.relayChannelClientApi_1=Jn.relayChannelClientApi=async(e,t)=>{e.register(`relay:${t}`,(({action:t,target:n,payload:i})=>e.dispatch(n,t,i))),await Promise.resolve()};Jn.createRelayedDispatch=(e,t,n,i)=>async(r,o)=>{try{return await e.dispatch(`relay:${n}`,{action:r,payload:o,target:t})}catch(e){if(s=e.message,Yn.some((e=>s.includes(e)))&&i)throw new Error(i);throw e}var s};var Zn,Qn,Xn,ei=s&&s.__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},ti=s&&s.__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)};Object.defineProperty(Bn,\"__esModule\",{value:!0}),Bn.ColumnOrRow=Bn.TabStack=Bn.LayoutNode=void 0;const ni=Gn,ii=Jn;class ri{constructor(e,t){Zn.set(this,void 0),this.isRoot=()=>ti(this,Zn,\"f\").isRoot(this.entityId),this.exists=()=>ti(this,Zn,\"f\").exists(this.entityId),this.getParent=async()=>{const e=await ti(this,Zn,\"f\").getParent(this.entityId);if(e)return ri.getEntity(e,ti(this,Zn,\"f\"))},this.createAdjacentStack=async(e,t)=>{const n=await ti(this,Zn,\"f\").createAdjacentStack(this.entityId,e,t);return ri.getEntity({entityId:n,type:\"stack\"},ti(this,Zn,\"f\"))},this.getAdjacentStacks=async e=>(await ti(this,Zn,\"f\").getAdjacentStacks({targetId:this.entityId,edge:e})).map((e=>ri.getEntity({type:\"stack\",entityId:e.entityId},ti(this,Zn,\"f\")))),ei(this,Zn,e,\"f\"),this.entityId=t}}Bn.LayoutNode=ri,Zn=new WeakMap,ri.newLayoutEntitiesClient=async(e,t,n)=>{const i=(0,ii.createRelayedDispatch)(e,n,\"layout-relay\",\"You are trying to interact with a layout component on a window that does not exist or has been destroyed.\");return new ni.ApiConsumer(new ni.ChannelsConsumer({dispatch:i})).consume({id:t})},ri.getEntity=(e,t)=>{const{entityId:n,type:i}=e;switch(i){case\"column\":case\"row\":return new si(t,n,i);case\"stack\":return new oi(t,n);default:throw new Error(`Unrecognised Layout Entity encountered ('${JSON.stringify(e)})`)}};class oi extends ri{constructor(e,t){super(e,t),Qn.set(this,void 0),this.type=\"stack\",this.getViews=()=>ti(this,Qn,\"f\").getStackViews(this.entityId),this.addView=async(e,t={index:0})=>ti(this,Qn,\"f\").addViewToStack(this.entityId,e,t),this.removeView=async e=>{await ti(this,Qn,\"f\").removeViewFromStack(this.entityId,e)},this.setActiveView=async e=>{await ti(this,Qn,\"f\").setStackActiveView(this.entityId,e)},ei(this,Qn,e,\"f\")}}Bn.TabStack=oi,Qn=new WeakMap;class si extends ri{constructor(e,t,n){super(e,t),Xn.set(this,void 0),this.getContent=async()=>(await ti(this,Xn,\"f\").getContent(this.entityId)).map((e=>ri.getEntity(e,ti(this,Xn,\"f\")))),ei(this,Xn,e,\"f\"),this.type=n}}Bn.ColumnOrRow=si,Xn=new WeakMap;var ai={};Object.defineProperty(ai,\"__esModule\",{value:!0}),ai.DEFAULT_LAYOUT_KEY=ai.LAYOUT_CONTROLLER_ID=void 0,ai.LAYOUT_CONTROLLER_ID=\"layout-entities\",ai.DEFAULT_LAYOUT_KEY=\"__default__\";var ci,di,hi,li=s&&s.__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)};Object.defineProperty(Ln,\"__esModule\",{value:!0}),Ln.Layout=void 0;const ui=G,pi=O,wi=d,yi=Tn,fi=Bn,gi=ai;class mi extends wi.Base{static getClient(e){return li(e,di,\"f\").getValue()}constructor(e,t){super(t),ci.add(this),di.set(this,new ui.Lazy((async()=>fi.LayoutNode.newLayoutEntitiesClient(await this.platform.getClient(),gi.LAYOUT_CONTROLLER_ID,this.identity)))),this.replace=async e=>{this.wire.sendAction(\"layout-replace\").catch((e=>{}));const t=await this.platform.getClient();await t.dispatch(\"replace-layout\",{target:this.identity,opts:{layout:e}})},this.replaceView=async(e,t)=>{this.wire.sendAction(\"layout-replace-view\").catch((e=>{}));const n=await this.platform.getClient();await n.dispatch(\"replace-view\",{target:this.identity,opts:{viewToReplace:e,newView:t}})},this.applyPreset=async e=>{this.wire.sendAction(\"layout-apply-preset\").catch((e=>{}));const t=await this.platform.getClient(),{presetType:n}=e;if(!n||!(0,yi.isValidPresetType)(n))throw new Error(\"Cannot apply preset layout, please include an applicable presetType property in the PresetLayoutOptions.\");await t.dispatch(\"apply-preset-layout\",{target:this.identity,opts:{presetType:n}})};const n=(0,pi.validateIdentity)(e);if(n)throw new Error(n);this.identity=e,this.platform=this.fin.Platform.wrapSync({uuid:e.uuid}),e.uuid===this.fin.me.uuid&&e.name===this.fin.me.name&&(this.init=this.fin.Platform.Layout.init)}async getConfig(){this.wire.sendAction(\"layout-get-config\").catch((e=>{}));return(await this.platform.getClient()).dispatch(\"get-frame-snapshot\",{target:this.identity})}async getCurrentViews(){this.wire.sendAction(\"layout-get-views\").catch((e=>{}));const e=await this.platform.getClient();return(await e.dispatch(\"get-layout-views\",{target:this.identity})).map((e=>this.fin.View.wrapSync(e)))}async getRootItem(){this.wire.sendAction(\"layout-get-root-item\").catch((()=>{}));const e=await li(this,di,\"f\").getValue(),t=await e.getRoot(\"layoutName\"in this.identity?this.identity:void 0);return fi.LayoutNode.getEntity(t,e)}async getStackByViewIdentity(e){this.wire.sendAction(\"layout-get-stack-by-view\").catch((()=>{}));const t=await li(this,di,\"f\").getValue(),n=await t.getStackByView(e);if(!n)throw new Error(`No stack found for view: ${e.uuid}/${e.name}`);return fi.LayoutNode.getEntity(n,t)}async addView(e,{location:t,targetView:n}={}){this.wire.sendAction(\"layout-add-view\").catch((e=>{}));const{identity:i}=await li(this,ci,\"m\",hi).call(this,\"layout-add-view\",{viewOptions:e,location:t,targetView:n});return{identity:i}}async closeView(e){this.wire.sendAction(\"layout-close-view\").catch((e=>{})),await li(this,ci,\"m\",hi).call(this,\"layout-close-view\",{viewIdentity:e})}}Ln.Layout=mi,di=new WeakMap,ci=new WeakSet,hi=async function(e,t){return(await this.platform.getClient()).dispatch(e,{target:this.identity,opts:t})};var vi,Ci,bi,Ii,Ei,xi=s&&s.__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)},Ai=s&&s.__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};Object.defineProperty(kn,\"__esModule\",{value:!0}),kn.LayoutModule=void 0;const Pi=d,Mi=Ln,_i=ai;class Oi extends Pi.Base{constructor(){super(...arguments),vi.add(this),Ci.set(this,!1),bi.set(this,null),this.init=async(e={})=>{if(this.wire.sendAction(\"layout-init\").catch((e=>{})),!this.wire.environment.layoutAllowedInContext(this.fin))throw new Error(\"Layout.init can only be called from a Window context.\");if(xi(this,Ci,\"f\"))throw new Error(\"Layout.init was already called, please use Layout.create to add additional layouts.\");\"openfin\"===this.wire.environment.type&&await this.fin.Platform.getCurrentSync().getClient(),Ai(this,Ci,!0,\"f\"),Ai(this,bi,await this.wire.environment.initLayoutManager(this.fin,this.wire,e),\"f\"),await this.wire.environment.applyLayoutSnapshot(this.fin,xi(this,bi,\"f\"),e);const t={name:this.fin.me.name,uuid:this.fin.me.uuid};if(!e.layoutManagerOverride){const e={layoutName:_i.DEFAULT_LAYOUT_KEY,...t};return xi(this,Ii,\"f\").call(this,e)}return this.wrapSync(t)},Ii.set(this,(e=>{const t=\"[Layout] You are using a deprecated property `layoutManager` - it will throw if you access it starting in v37.\",n=new Proxy({},{get(e,n){throw console.warn(`[Layout-mgr-proxy] accessing ${n.toString()}`),new Error(t)}}),i=Object.assign(this.wrapSync(e),{layoutManager:n});return new Proxy(i,{get(e,n){if(\"layoutManager\"===n)throw console.warn(`[Layout-proxy] accessing ${n.toString()}`),new Error(t);return e[n]}})})),this.getCurrentLayoutManagerSync=()=>xi(this,vi,\"m\",Ei).call(this,\"fin.Platform.Layout.getCurrentLayoutManagerSync()\"),this.create=async e=>this.wire.environment.createLayout(xi(this,vi,\"m\",Ei).call(this,\"fin.Platform.Layout.create()\"),e),this.destroy=async e=>this.wire.environment.destroyLayout(xi(this,vi,\"m\",Ei).call(this,\"fin.Platform.Layout.destroy()\"),e)}async wrap(e){return this.wire.sendAction(\"layout-wrap\").catch((e=>{})),new Mi.Layout(e,this.wire)}wrapSync(e){return this.wire.sendAction(\"layout-wrap-sync\").catch((e=>{})),new Mi.Layout(e,this.wire)}async getCurrent(){if(this.wire.sendAction(\"layout-get-current\").catch((e=>{})),\"openfin\"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error(\"You are not in a Window context. Only Windows can have a Layout.\");const{uuid:e,name:t}=this.fin.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction(\"layout-get-current-sync\").catch((e=>{})),\"openfin\"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error(\"You are not in a Window context. Only Windows can have a Layout.\");const{uuid:e,name:t}=this.fin.me;return this.wrapSync({uuid:e,name:t})}async getLayoutByViewIdentity(e){this.wire.sendAction(\"layout-get-by-view-identity\").catch((()=>{}));let t=await this.wire.environment.getViewWindowIdentity(this.fin,e);t.identity&&(t=t.identity);try{const n=this.wrapSync(t),i=await Mi.Layout.getClient(n),r=await i.getLayoutIdentityForViewOrThrow(e);return this.wrapSync(r)}catch(n){if(![\"No action registered at target for\",\"getLayoutIdentityForViewOrThrow is not a function\"].some((e=>n.message.includes(e))))throw n;if(t.uuid===t.name)throw new Error(`View identity ${JSON.stringify(e)} is not attached to any layout in provider window ${JSON.stringify(t)}.`);return this.wrapSync(t)}}}kn.LayoutModule=Oi,Ci=new WeakMap,bi=new WeakMap,Ii=new WeakMap,vi=new WeakSet,Ei=function(e){if(!xi(this,bi,\"f\"))throw new Error(`You must call init before using the API ${e}`);return xi(this,bi,\"f\")},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(kn,e),n(Ln,e)}(jn),Object.defineProperty(Pn,\"__esModule\",{value:!0}),Pn.PlatformModule=void 0;const Si=d,Ri=Mn,Fi=jn;class ji extends Si.Base{constructor(e,t){super(e),this._channel=t,this.Layout=new Fi.LayoutModule(this.wire)}async init(e){if(!fin.__internal_.isPlatform||fin.me.name!==fin.me.uuid)throw new Error(\"fin.Platform.init should only be called from a custom platform provider running in the main window of the application.\");return this.wire.environment.initPlatform(this.fin,e)}async wrap(e){return this.wire.sendAction(\"platform-wrap\").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}wrapSync(e){return this.wire.sendAction(\"platform-wrap-sync\").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}async getCurrent(){return this.wire.sendAction(\"platform-get-current\").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction(\"platform-get-current-sync\").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}start(e){return this.wire.sendAction(\"platform-start\").catch((e=>{})),new Promise((async(t,n)=>{try{const{uuid:n}=e,i=await this.fin.Application._create({...e,isPlatformController:!0});i.once(\"platform-api-ready\",(()=>t(this.wrapSync({uuid:n})))),i._run({uuid:n})}catch(e){n(e)}}))}startFromManifest(e,t){return this.wire.sendAction(\"platform-start-from-manifest\").catch((e=>{})),new Promise((async(n,i)=>{try{const i=await this.fin.Application._createFromManifest(e);i.once(\"platform-api-ready\",(()=>n(this.wrapSync({uuid:i.identity.uuid})))),i._run(t)}catch(e){i(e)}}))}}Pn.PlatformModule=ji,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Pn,e),n(Mn,e)}(An);var ki={};!function(e){Object.defineProperty(e,\"__esModule\",{value:!0}),e.getMe=e.getBaseMe=e.environmentUnsupportedMessage=void 0;const t=J(),n=un,i=ie(),r=rn;function o(e,t,n){return{...{isView:\"view\"===e,isWindow:\"window\"===e,isFrame:\"iframe\"===e,isExternal:\"external connection\"===e},uuid:t,name:n,entityType:e}}e.environmentUnsupportedMessage=\"You are not running in OpenFin.\",e.getBaseMe=o,e.getMe=function(s){const{uuid:a,name:c,entityType:d}=s.me,h={setContext(){throw new Error(e.environmentUnsupportedMessage)},addContextHandler(){throw new Error(e.environmentUnsupportedMessage)},getContextGroups(){throw new Error(e.environmentUnsupportedMessage)},joinContextGroup(){throw new Error(e.environmentUnsupportedMessage)},removeFromContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getAllClientsInContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getInfoForContextGroup(){throw new Error(e.environmentUnsupportedMessage)}},l=\"Interop API has not been instantiated. Either connection has failed or you have not declared interop in your config.\",u={setContext(){throw new Error(l)},addContextHandler(){throw new Error(l)},getContextGroups(){throw new Error(l)},joinContextGroup(){throw new Error(l)},removeFromContextGroup(){throw new Error(l)},getAllClientsInContextGroup(){throw new Error(l)},getInfoForContextGroup(){throw new Error(l)}},p={eventNames:()=>{throw new Error(e.environmentUnsupportedMessage)},emit:()=>{throw new Error(e.environmentUnsupportedMessage)},listeners:()=>{throw new Error(e.environmentUnsupportedMessage)},listenerCount:()=>{throw new Error(e.environmentUnsupportedMessage)},on:()=>{throw new Error(e.environmentUnsupportedMessage)},addListener:()=>{throw new Error(e.environmentUnsupportedMessage)},once:()=>{throw new Error(e.environmentUnsupportedMessage)},prependListener:()=>{throw new Error(e.environmentUnsupportedMessage)},prependOnceListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeAllListeners:()=>{throw new Error(e.environmentUnsupportedMessage)}};switch(d){case\"view\":return Object.assign(new t.View(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case\"window\":return Object.assign(new i._Window(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case\"iframe\":return Object.assign(new n._Frame(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case\"external connection\":return Object.assign(new r.ExternalApplication(s,{uuid:a}),o(d,a,c),{interop:u,isOpenFin:!1});default:return{...o(d,a,c),...p,interop:h,isOpenFin:!1}}}}(ki);var Li={},Ti={},$i={};Object.defineProperty($i,\"__esModule\",{value:!0}),$i.createWarningObject=$i.createUnusableObject=void 0,$i.createUnusableObject=function(e){const t=()=>{throw new Error(e)};return new Proxy({},{apply:t,construct:t,defineProperty:t,deleteProperty:t,get:t,getOwnPropertyDescriptor:t,getPrototypeOf:t,has:t,isExtensible:t,ownKeys:t,preventExtensions:t,set:t,setPrototypeOf:t})},$i.createWarningObject=function(e,t){return new Proxy(t,{get:(...t)=>(console.warn(e),Reflect.get(...t)),set:(...t)=>(console.warn(e),Reflect.set(...t)),getOwnPropertyDescriptor:(...t)=>(console.warn(e),Reflect.getOwnPropertyDescriptor(...t)),ownKeys:(...t)=>(console.warn(e),Reflect.ownKeys(...t))})};var Bi,Gi={},Wi={};var Hi={};!function(e){Object.defineProperty(e,\"__esModule\",{value:!0}),e.wrapIntentHandler=e.BROKER_ERRORS=e.generateOverrideWarning=e.generateOverrideError=e.wrapContextHandler=e.wrapInTryCatch=e.generateId=void 0;e.generateId=()=>`${Math.random()}${Date.now()}`;e.wrapInTryCatch=(e,t)=>(...n)=>{try{return e(...n)}catch(e){throw new Error((t||\"\")+e)}};e.wrapContextHandler=(e,t)=>async n=>{try{await e(n)}catch(e){throw console.error(`Error thrown by handler ${t} for context type ${n.type}: ${e}`),e}};e.generateOverrideError=(e,t)=>`You have tried to to use ${e} but ${t} has not been overridden in the Interop Broker. Please override this function. Refer to our documentation for more info.`;e.generateOverrideWarning=(e,t,n,i)=>{const{uuid:r,name:o}=n;return i?`Entity with identity: ${r}/${o} has called ${i} or ${e} but ${t} has not been overridden.`:`Entity with identity: ${r}/${o} has called ${e} but ${t} has not been overridden.`},e.BROKER_ERRORS={fireIntent:(0,e.generateOverrideError)(\"fireIntent\",\"handleFiredIntent\"),fireIntentForContext:(0,e.generateOverrideError)(\"fireIntentForContext\",\"handleFiredIntentForContext\"),getInfoForIntent:(0,e.generateOverrideError)(\"getInfoForIntent\",\"handleInfoForIntent\"),getInfoForIntentsByContext:(0,e.generateOverrideError)(\"getInfoForIntentsByContext\",\"handleInfoForIntentsByContext\"),joinSessionContextGroupWithJoinContextGroup:\"The Context Group you have tried to join is a Session Context Group. Custom Context Groups can only be defined by the Interop Broker through code or manifest configuration. Please use joinSessionContextGroup.\",fdc3Open:(0,e.generateOverrideError)(\"fdc3.open\",\"fdc3HandleOpen\"),fdc3FindInstances:(0,e.generateOverrideError)(\"fdc3.findInstances\",\"fdc3HandleFindInstances\"),fdc3GetAppMetadata:(0,e.generateOverrideError)(\"fdc3.getAppMetadata\",\"fdc3HandleGetAppMetadata\"),fdc3GetInfo:(0,e.generateOverrideError)(\"fdc3.getInfo\",\"fdc3HandleGetInfo\")};e.wrapIntentHandler=(e,t)=>async n=>{try{return e(n)}catch(e){throw console.error(`Error thrown by handler ${t}: ${e}`),e}}}(Hi);var Ni,Di,Ui={};function Vi(){if(Di)return Gi;Di=1;var e,t,n,r=s&&s.__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},o=s&&s.__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)},a=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Gi,\"__esModule\",{value:!0}),Gi.InteropBroker=void 0;const c=d,h=a(function(){if(Bi)return Wi;Bi=1,Object.defineProperty(Wi,\"__esModule\",{value:!0});const e=Cr();return Wi.default=class{constructor(e,t){this.provider=e,this.id=t,this.lastContext=void 0,this.contextGroupMap=new Map,this.clients=new Map,this.registerListeners()}registerListeners(){this.provider.register(`sessionContextGroup:getContext-${this.id}`,this.getCurrentContext.bind(this)),this.provider.register(`sessionContextGroup:setContext-${this.id}`,this.setContext.bind(this)),this.provider.register(`sessionContextGroup:handlerAdded-${this.id}`,this.handlerAdded.bind(this)),this.provider.register(`sessionContextGroup:handlerRemoved-${this.id}`,this.handlerRemoved.bind(this))}getCurrentContext(e){return e.type?this.contextGroupMap.get(e.type):this.lastContext}setContext(t,n){const{context:i}=t,r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name} not in Session Client State Map`);this.contextGroupMap.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{e.contextHandlers.get(i.type)?.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getClientState(e){return this.clients.get(e.endpointId)}async handlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(i){const e=r.contextHandlers.get(i)||[];r.contextHandlers.set(i,[...e,n]);const o=this.contextGroupMap.get(i);o&&await this.provider.dispatch(t,n,o)}else{r.globalHandler=n;const e=[...this.contextGroupMap.keys()].map((async e=>{const i=this.contextGroupMap.get(e);i&&await this.provider.dispatch(t,n,i)}));await Promise.all(e)}}handlerRemoved(e,t){const{handlerId:n}=e,i=this.clients.get(t.endpointId);i?(Array.from(i.contextHandlers).forEach((([,e])=>{const t=e.indexOf(n);t>-1&&e.splice(t,1)})),i.globalHandler===n&&(i.globalHandler=void 0)):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={contextHandlers:new Map,clientIdentity:e,globalHandler:void 0};this.clients.set(e.endpointId,t)}}onDisconnection(e){this.clients.delete(e.endpointId)}},Wi}()),l=Hi,u=a(i),p=function(){if(Ni)return Ui;Ni=1,Object.defineProperty(Ui,\"__esModule\",{value:!0}),Ui.PrivateChannelProvider=void 0;const e=Vi();return Ui.PrivateChannelProvider=class t{constructor(e,t){this.provider=e,this.id=t,this.clients=new Map,this.registerListeners(),this.contextByContextType=new Map,this.lastContext=void 0,this.provider.onConnection((e=>this.registerNewClient(e))),this.provider.onDisconnection((async e=>{const{endpointId:t}=e;this.clients.has(t)&&await this.handleClientDisconnecting(e),0===(await this.provider.getAllClientInfo()).length&&this.provider.destroy()}))}getClientState(e){return this.clients.get(e.endpointId)}registerListeners(){this.provider.register(\"broadcast\",this.broadcast.bind(this)),this.provider.register(\"getCurrentContext\",this.getCurrentContext.bind(this)),this.provider.register(\"contextHandlerAdded\",this.contextHandlerAdded.bind(this)),this.provider.register(\"contextHandlerRemoved\",this.contextHandlerRemoved.bind(this)),this.provider.register(\"nonStandardHandlerRemoved\",this.nonStandardHandlerRemoved.bind(this)),this.provider.register(\"onAddContextHandlerAdded\",this.onAddContextHandlerAdded.bind(this)),this.provider.register(\"onDisconnectHandlerAdded\",this.onDisconnectHandlerAdded.bind(this)),this.provider.register(\"onUnsubscribeHandlerAdded\",this.onUnsubscribeHandlerAdded.bind(this)),this.provider.register(\"clientDisconnecting\",((e,t)=>{this.handleClientDisconnecting(t)}))}broadcast(t,n){const{context:i}=t;if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name}, tried to call broadcast, is not connected to this Private Channel`);const r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to broadcast - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);this.contextByContextType.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{const t=e.handlerIdsByContextTypes.get(i.type);t&&t.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getCurrentContext(e,t){const{contextType:n}=e;if(!this.getClientState(t))throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call getCurrentContext, is not connected to this Private Channel`);if(void 0!==n){return this.contextByContextType.get(n)||null}return this.lastContext?this.lastContext:null}contextHandlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call addContextListener, is not connected to this Private Channel`);if(i){const e=r.handlerIdsByContextTypes.get(i)||[];r.handlerIdsByContextTypes.set(i,[...e,n])}else r.globalHandler=n;Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&e.onAddContextListenerHandlerId&&this.provider.dispatch(e.clientIdentity,e.onAddContextListenerHandlerId,i)}))}async contextHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);if(i){let e;if(i.globalHandler===n)i.globalHandler=void 0;else for(const[t,r]of i.handlerIdsByContextTypes){const i=r.indexOf(n);i>-1&&(r.splice(i,1),e=t)}const r=(await this.getConnectedClients()).map((async n=>{const{clientIdentity:i,clientIdentity:{endpointId:r},onUnsubscribeHandlerId:o}=n;r!==t.endpointId&&o&&await this.provider.dispatch(i,o,e)}));try{await Promise.all(r)}catch(e){throw console.error(`Problem when attempting to dispatch to onUnsubscribeHandlers. Error: ${e} Removing Client: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}`),new Error(e)}}else console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}.`)}nonStandardHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);i?i.onDisconnectHandlerId===n?i.onDisconnectHandlerId=void 0:i.onAddContextListenerHandlerId===n?i.onAddContextListenerHandlerId=void 0:i.onUnsubscribeHandlerId===n&&(i.onUnsubscribeHandlerId=void 0):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}onAddContextHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onAddContextListener, is not connected to this Private Channel`);n.onAddContextListenerHandlerId=i,Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&Array.from(e.handlerIdsByContextTypes.keys()).forEach((e=>{this.provider.dispatch(t,i,e)}))}))}onDisconnectHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onDisconnect, is not connected to this Private Channel`);n.onDisconnectHandlerId=i}onUnsubscribeHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onUnsubscribe, is not connected to this Private Channel`);n.onUnsubscribeHandlerId=i}removeClient(e){const t=this.getClientState(e);if(!t)throw new Error(`Client with Identity: ${e.uuid} ${e.name}, tried to call disconnect, is not connected to this Private Channel`);t.handlerIdsByContextTypes.clear(),this.clients.delete(e.endpointId)}async fireOnDisconnectForOtherClients(e){const{endpointId:t}=e,n=(await this.getConnectedClients()).map((async e=>{const{clientIdentity:{endpointId:n},onDisconnectHandlerId:i}=e;n!==t&&i&&await this.provider.dispatch(e.clientIdentity,i)}));try{await Promise.all(n)}catch(t){throw console.error(`Problem when attempting to dispatch to onDisconnectHandlers. Error: ${t} Disconnecting Client: uuid: ${e.uuid}. name: ${e.name}. endpointId: ${e.endpointId}`),new Error(t)}}async unsubscribeAll(e){const{endpointId:t}=e,n=this.clients.get(t);if(n){const t=Array.from(n.handlerIdsByContextTypes.values()).flat(),i=n.globalHandler;if(t.length>0){const n=t.map((async t=>this.contextHandlerRemoved({handlerId:t},e)));try{await Promise.all(n)}catch(e){console.error(e.message)}}if(i)try{await this.contextHandlerRemoved({handlerId:i},e)}catch(e){console.error(e.message)}}}async handleClientDisconnecting(e){await this.unsubscribeAll(e),this.removeClient(e),await this.fireOnDisconnectForOtherClients(e)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={clientIdentity:e,handlerIdsByContextTypes:new Map,globalHandler:void 0,onAddContextListenerHandlerId:void 0,onUnsubscribeHandlerId:void 0,onDisconnectHandlerId:void 0};this.clients.set(e.endpointId,t)}}async getConnectedClients(){const e=await this.provider.getAllClientInfo();return Array.from(this.clients.values()).filter((t=>{const{uuid:n,name:i}=t.clientIdentity;return e.some((e=>i===e.name&&n===e.uuid))}))}static init(e,n){return new t(e,n)}},Ui}(),w=G,y=[{id:\"green\",displayMetadata:{color:\"#00CC88\",name:\"green\"}},{id:\"purple\",displayMetadata:{color:\"#8C61FF\",name:\"purple\"}},{id:\"orange\",displayMetadata:{color:\"#FF8C4C\",name:\"orange\"}},{id:\"red\",displayMetadata:{color:\"#FF5E60\",name:\"red\"}},{id:\"pink\",displayMetadata:{color:\"#FF8FB8\",name:\"pink\"}},{id:\"yellow\",displayMetadata:{color:\"#E9FF8F\",name:\"yellow\"}}];let f=class i extends c.Base{constructor(i,s,a){super(i),e.set(this,void 0),t.set(this,void 0),n.set(this,void 0),this.getProvider=()=>o(this,n,\"f\").getValue(),this.interopClients=new Map,this.contextGroupsById=new Map,r(this,t,a.contextGroups??[...y],\"f\"),r(this,e,a.fdc3Info,\"f\"),a?.logging&&(this.logging=a.logging),this.intentClientMap=new Map,this.lastContextMap=new Map,this.sessionContextGroupMap=new Map,r(this,n,new w.Lazy(s),\"f\"),this.setContextGroupMap(),this.setupChannelProvider()}static createClosedConstructor(...e){return class extends i{constructor(...t){if(t.length){const[n,i,r]=t;if(r&&\"object\"==typeof r&&!(0,u.default)(r,e[2]))return console.warn(\"You have modified the parameters of the InteropOverride constructor. This behavior is deprecated and will be removed in a future version. You can modify these options in your manifest. Please consult our Interop docs for guidance on migrating to the new override scheme.\"),void super(e[0],e[1],r);console.warn(\"You are attempting to pass arguments to the InteropOverride constructor. This is not necessary, and these passed arguments will be ignored. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.\")}super(...e)}}}setContext({context:e},t){this.wire.sendAction(\"interop-broker-set-context\").catch((e=>{}));const n=this.getClientState(t);if(!n||!n.contextGroupId)throw n?new Error(\"You must join a context group before you can set context.\"):new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);{const{contextGroupId:t}=n;this.setContextForGroup({context:e},t)}}setContextForGroup({context:e},t){this.wire.sendAction(\"interop-broker-set-context-for-group\").catch((e=>{}));const n=this.contextGroupsById.get(t);if(!n)throw new Error(`Unable to set context for context group that isn't in the context group mapping: ${t}.`);const r=i.checkContextIntegrity(e);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(e)}`);const o=e.type;n.set(o,e),this.lastContextMap.set(t,o);Array.from(this.interopClients.values()).filter((e=>e.contextGroupId===t)).forEach((t=>{for(const[,n]of t.contextHandlers)i.isContextTypeCompatible(o,n.contextType)&&this.invokeContextHandler(t.clientIdentity,n.handlerId,e)}))}getCurrentContext(e,t){this.wire.sendAction(\"interop-broker-get-current-context\").catch((e=>{}));const n=this.getClientState(t);if(!n?.contextGroupId)throw new Error(\"You must be a member of a context group to call getCurrentContext\");const{contextGroupId:i}=n,r=this.contextGroupsById.get(i),o=this.lastContextMap.get(i),s=e?.contextType??o;return r&&s?r.get(s):void 0}async joinContextGroup({contextGroupId:e,target:t},n){if(this.wire.sendAction(\"interop-broker-join-context-group\").catch((e=>{})),this.sessionContextGroupMap.has(e))throw new Error(l.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup);if(t){i.hasEndpointId(t)&&await this.addClientToContextGroup({contextGroupId:e},t);try{const n=this.channel.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name));if(!n.length)throw new Error(`Given Identity ${t.uuid} ${t.name} is not connected to the Interop Broker.`);n.length>1&&console.warn(`More than one connection found for identity ${t.uuid} ${t.name}`);const i=[];for(const t of n)i.push(this.addClientToContextGroup({contextGroupId:e},t));await Promise.all(i)}catch(e){throw new Error(e)}}else await this.addClientToContextGroup({contextGroupId:e},n)}async addClientToContextGroup({contextGroupId:e},t){this.wire.sendAction(\"interop-broker-add-client-to-context-group\").catch((e=>{}));const n=this.getClientState(t);if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(!this.getContextGroups().find((t=>t.id===e)))throw new Error(`Attempting to join a context group that does not exist: ${e}. You may only join existing context groups.`);if(n.contextGroupId!==e){n.contextGroupId=e,await this.setCurrentContextGroupInClientOptions(t,e);const i=this.contextGroupsById.get(e);for(const[,e]of n.contextHandlers){const{contextType:n,handlerId:r}=e;if(void 0===n)i.forEach(((e,n)=>{this.invokeContextHandler(t,r,e)}));else if(i.has(n)){const e=i.get(n);e&&this.invokeContextHandler(t,r,e)}}}}async removeFromContextGroup({target:e},t){if(this.wire.sendAction(\"interop-broker-remove-from-context-group\").catch((e=>{})),e){i.hasEndpointId(e)&&await this.removeClientFromContextGroup(e);try{const t=this.channel.connections.filter((t=>t.uuid===e.uuid&&t.name===e.name));if(!t.length)throw new Error(`No connection found for given Identity ${e.uuid} ${e.name}`);t.length>1&&console.warn(`More than one connection found for identity ${e.uuid} ${e.name}`);const n=[];for(const e of t)n.push(this.removeClientFromContextGroup(e));await Promise.all(n)}catch(e){throw new Error(e)}}else await this.removeClientFromContextGroup(t)}async removeClientFromContextGroup(e){this.wire.sendAction(\"interop-broker-remove-client-from-context-group\").catch((e=>{}));const t=this.getClientState(e);t&&(t.contextGroupId=void 0),await this.setCurrentContextGroupInClientOptions(e,null)}getContextGroups(){return this.wire.sendAction(\"interop-broker-get-context-groups\").catch((e=>{})),o(this,t,\"f\").map((e=>({...e})))}getInfoForContextGroup({contextGroupId:e}){return this.wire.sendAction(\"interop-broker-get-info-for-context-group\").catch((e=>{})),this.getContextGroups().find((t=>t.id===e))}getAllClientsInContextGroup({contextGroupId:e}){this.wire.sendAction(\"interop-broker-get-all-clients-in-context-group\").catch((e=>{}));return Array.from(this.interopClients.values()).filter((t=>t.contextGroupId===e)).map((e=>e.clientIdentity))}async handleFiredIntent(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.raiseIntent\",\"InteropBroker.handleFiredIntent\",t,\"interopClient.fireIntent\");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntent)}async setIntentTarget(e,t){this.wire.sendAction(\"interop-broker-set-intent-target\").catch((e=>{}));const n=this.intentClientMap.get(t.name),i=`intent-handler-${e.name}`;if(n){const t=n.get(i);if(t){if(t.pendingIntents.push(e),t.clientIdentity&&t.isReady){const{clientIdentity:e,pendingIntents:n}=t;try{const r=n[n.length-1];await this.invokeIntentHandler(e,i,r),t.pendingIntents=[]}catch(n){console.error(`Error invoking intent handler for client ${e.uuid}/${e.name}/${e.endpointId}`),t.isReady=!1}}}else n.set(i,{isReady:!1,pendingIntents:[e]})}else{this.intentClientMap.set(t.name,new Map);const n=this.intentClientMap.get(t.name);n&&n.set(i,{isReady:!1,pendingIntents:[e]})}}async handleInfoForIntent(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.findIntent\",\"InteropBroker.handleInfoForIntent\",t,\"interopClient.getInfoForIntent\");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntent)}async handleInfoForIntentsByContext(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.findIntentsByContext\",\"InteropBroker.handleInfoForIntentsByContext\",t,\"interopClient.getInfoForIntentsByContext\");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntentsByContext)}async handleFiredIntentForContext(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.raiseIntentForContext\",\"InteropBroker.handleFiredIntentForContext\",t,\"interopClient.fireIntentForContext\");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntentForContext)}async clientDisconnected(e){}async fdc3HandleOpen({app:e,context:t},n){const i=(0,l.generateOverrideWarning)(\"fdc3.open\",\"InteropBroker.fdc3HandleOpen\",n);throw console.warn(i),new Error(l.BROKER_ERRORS.fdc3Open)}async fdc3HandleFindInstances(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.open\",\"InteropBroker.fdc3HandleFindInstances\",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3FindInstances)}async fdc3HandleGetAppMetadata(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.getAppMetadata\",\"InteropBroker.fdc3HandleGetAppMetadata\",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3GetAppMetadata)}async invokeContextHandler(e,t,n){const i=await this.getProvider();try{await i.dispatch(e,t,n)}catch(i){console.error(`Error invoking context handler ${t} for context type ${n.type} in client ${e.uuid}/${e.name}/${e.endpointId}`,i)}}async invokeIntentHandler(e,t,n){const i=await this.getProvider();await i.dispatch(e,t,n)}async fdc3HandleGetInfo(t,n){const{fdc3Version:i}=t;return{fdc3Version:i,...o(this,e,\"f\"),optionalFeatures:{OriginatingAppMetadata:!1,UserChannelMembershipAPIs:!0},appMetadata:{appId:\"\",instanceId:\"\"}}}async getAllClientInfo(){return(await this.getProvider()).getAllClientInfo()}decorateSnapshot(e){return{...e,interopSnapshotDetails:{contextGroupStates:this.getContextGroupStates()}}}applySnapshot(e,t){const n=e?.interopSnapshotDetails?.contextGroupStates;n&&(t?.closeExistingWindows||this.updateExistingClients(n),this.rehydrateContextGroupStates(n))}updateExistingClients(e){this.interopClients.forEach((t=>{const{clientIdentity:n,contextGroupId:r,contextHandlers:o}=t;if(r){const t=e[r];for(const[,e]of Object.entries(t))o.forEach((t=>{const{handlerId:r,contextType:o}=t;i.isContextTypeCompatible(e.type,o)&&this.invokeContextHandler(n,r,e)}))}}))}getContextGroupStates(){return i.toObject(this.contextGroupsById)}rehydrateContextGroupStates(e){const t=Object.entries(e);for(const[e,n]of t){const t=Object.entries(n);for(const[n,i]of t)if(this.contextGroupsById.has(e)){this.contextGroupsById.get(e).set(n,i)}else console.warn(`Attempting to set a context group that isn't in the context group mapping. Skipping context group rehydration for: ${e}`)}}contextHandlerRegistered({contextType:e,handlerId:t},n){const i={contextType:e,handlerId:t},r=this.getClientState(n);if(r?.contextHandlers.set(t,i),r&&r.contextGroupId){const{contextGroupId:i}=r,o=this.contextGroupsById.get(i);if(void 0===e)o.forEach(((e,i)=>{this.invokeContextHandler(n,t,e)}));else if(o.has(e)){const i=o.get(e);i&&this.invokeContextHandler(n,t,i)}}}async intentHandlerRegistered(e,t){const{handlerId:n}=e,i=this.intentClientMap.get(t.name),r=i?.get(n);if(i)if(r){const{pendingIntents:e}=r;r.clientIdentity=t,r.isReady=!0;try{if(e.length>0){const i=e[e.length-1];await this.invokeIntentHandler(t,n,i),r.pendingIntents=[]}}catch(e){console.error(`Error invoking intent handler: ${n} for client ${t.uuid}/${t.name}/${t.endpointId}`)}}else i.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t});else{this.intentClientMap.set(t.name,new Map);const e=this.intentClientMap.get(t.name);e&&e.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t})}}removeContextHandler({handlerId:e},t){const n=this.getClientState(t);n&&n.contextHandlers.delete(e)}handleJoinSessionContextGroup({sessionContextGroupId:e},t){try{if(!e)throw new Error(\"Failed to join session context group: must specify group id.\");const n=this.sessionContextGroupMap.get(e);if(n)n.registerNewClient(t);else{const n=new h.default(this.channel,e);n.registerNewClient(t),this.sessionContextGroupMap.set(e,n)}return{hasConflict:this.contextGroupsById.has(e)}}catch(e){throw new Error(e)}}getClientState(e){return this.interopClients.get(e.endpointId)}static toObject(e){const t=Object.fromEntries(e),n={};return Object.entries(t).forEach((([e,t])=>{const i=Object.fromEntries(t);n[e]=i})),n}static checkContextIntegrity(e){if(!e)return{isValid:!1,reason:\"No context supplied\"};if(\"object\"!=typeof e)return{isValid:!1,reason:\"Context must be an Object\"};if(!e.type)return{isValid:!1,reason:\"Context must have a type property\"};if(e.id&&\"object\"!=typeof e.id)return{isValid:!1,reason:\"Context id must be an Object populated with key-value identifiers (if set)\"};if(e.id){const{id:t}=e,n=Object.keys(t);let i=!1;if(!n.length)return{isValid:!1,reason:\"Context id must have at least one key-value identifier\"};if(n.forEach((e=>{\"string\"==typeof e&&\"string\"==typeof t[e]||(i=!0)})),i)return{isValid:!1,reason:\"Context id key-value identifiers must be of type string\"}}return e.name&&\"string\"!=typeof e.name?{isValid:!1,reason:\"Context name must be of string type (if set)\"}:{isValid:!0}}static hasEndpointId(e){return void 0!==e.endpointId}static isContextTypeCompatible(e,t){return void 0===t||e===t}setContextGroupMap(){for(const e of this.getContextGroups())this.contextGroupsById.set(e.id,new Map)}async setCurrentContextGroupInClientOptions(e,t){try{const n=await this.fin.System.getEntityInfo(e.uuid,e.name);let i;\"view\"===n.entityType?i=await this.fin.View.wrap(e):\"window\"===n.entityType&&(i=await this.fin.Window.wrap(e)),i&&await i.updateOptions({interop:{currentContextGroup:t}})}catch(e){}}async setupChannelProvider(){try{const e=await this.getProvider();this.channel=e,this.wireChannel(e)}catch(e){throw new Error(`Error setting up Interop Broker Channel Provider: ${e}`)}}wireChannel(e){e.onConnection((async(e,t)=>{if(!await this.isConnectionAuthorized(e,t))throw new Error(`Connection not authorized for ${e.uuid}, ${e.name}`);if(!e.endpointId)throw new Error(\"Version too old to be compatible with Interop. Please upgrade your runtime to a more recent version.\");const n={contextGroupId:void 0,contextHandlers:new Map,clientIdentity:e};t?.currentContextGroup&&this.contextGroupsById.has(t.currentContextGroup)&&(n.contextGroupId=t?.currentContextGroup),this.interopClients.set(e.endpointId,n)})),e.onDisconnection((e=>{this.interopClients.delete(e.endpointId);const t=this.intentClientMap.get(e.name);t&&e.uuid===this.fin.me.uuid&&t.forEach((e=>{e.isReady=!1})),this.sessionContextGroupMap.forEach((t=>{t.onDisconnection(e)})),this.clientDisconnected(e)})),e.beforeAction((async(e,t,n)=>{if(!await this.isActionAuthorized(e,t,n))throw new Error(`Action (${e}) not authorized for ${n.uuid}, ${n.name}`);this.logging?.beforeAction?.enabled&&console.log(e,t,n)})),e.afterAction(((e,t,n)=>{this.logging?.afterAction?.enabled&&console.log(e,t,n)})),e.register(\"setContext\",this.setContext.bind(this)),e.register(\"fireIntent\",this.handleFiredIntent.bind(this)),e.register(\"getCurrentContext\",this.getCurrentContext.bind(this)),e.register(\"getInfoForIntent\",this.handleInfoForIntent.bind(this)),e.register(\"getInfoForIntentsByContext\",this.handleInfoForIntentsByContext.bind(this)),e.register(\"fireIntentForContext\",this.handleFiredIntentForContext.bind(this)),e.register(\"getContextGroups\",this.getContextGroups.bind(this)),e.register(\"joinContextGroup\",this.joinContextGroup.bind(this)),e.register(\"removeFromContextGroup\",this.removeFromContextGroup.bind(this)),e.register(\"getAllClientsInContextGroup\",this.getAllClientsInContextGroup.bind(this)),e.register(\"getInfoForContextGroup\",this.getInfoForContextGroup.bind(this)),e.register(\"contextHandlerRegistered\",this.contextHandlerRegistered.bind(this)),e.register(\"intentHandlerRegistered\",this.intentHandlerRegistered.bind(this)),e.register(\"removeContextHandler\",this.removeContextHandler.bind(this)),e.register(\"sessionContextGroup:createIfNeeded\",this.handleJoinSessionContextGroup.bind(this)),e.register(\"fdc3Open\",this.fdc3HandleOpen.bind(this)),e.register(\"fdc3v2FindIntentsByContext\",this.handleInfoForIntentsByContext.bind(this)),e.register(\"fdc3FindInstances\",this.fdc3HandleFindInstances.bind(this)),e.register(\"fdc3GetAppMetadata\",this.fdc3HandleGetAppMetadata.bind(this)),e.register(\"fdc3v2GetInfo\",(async(e,t)=>this.fdc3HandleGetInfo.bind(this)(e,t))),e.register(\"createPrivateChannelProvider\",(async e=>{const{channelId:t}=e,n=await this.fin.InterApplicationBus.Channel.create(t);p.PrivateChannelProvider.init(n,t)}))}isConnectionAuthorized(e,t){return this.wire.sendAction(\"interop-broker-is-connection-authorized\").catch((e=>{})),Promise.resolve(!0)}isActionAuthorized(e,t,n){return this.wire.sendAction(\"interop-broker-is-action-authorized\").catch((e=>{})),Promise.resolve(!0)}};return Gi.InteropBroker=f,e=new WeakMap,t=new WeakMap,n=new WeakMap,Gi}var zi,Ki={},qi={},Ji=s&&s.__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},Yi=s&&s.__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)};Object.defineProperty(qi,\"__esModule\",{value:!0});const Zi=d,Qi=Hi;class Xi extends Zi.Base{constructor(e,t,n){super(e),zi.set(this,void 0),this.id=n,Ji(this,zi,t,\"f\")}async setContext(e){this.wire.sendAction(\"interop-session-context-group-set-context\").catch((e=>{}));return(await Yi(this,zi,\"f\")).dispatch(`sessionContextGroup:setContext-${this.id}`,{sessionContextGroupId:this.id,context:e})}async getCurrentContext(e){this.wire.sendAction(\"interop-session-context-group-get-context\").catch((e=>{}));return(await Yi(this,zi,\"f\")).dispatch(`sessionContextGroup:getContext-${this.id}`,{sessionContextGroupId:this.id,type:e})}async addContextHandler(e,t){if(this.wire.sendAction(\"interop-session-context-group-add-handler\").catch((e=>{})),\"function\"!=typeof e)throw new Error(\"Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.\");const n=await Yi(this,zi,\"f\");let i;return i=t?`sessionContextHandler:invoke-${this.id}-${t}-${(0,Qi.generateId)()}`:`sessionContextHandler:invoke-${this.id}`,n.register(i,(0,Qi.wrapContextHandler)(e,i)),await n.dispatch(`sessionContextGroup:handlerAdded-${this.id}`,{handlerId:i,contextType:t}),{unsubscribe:await this.createUnsubscribeCb(i)}}async createUnsubscribeCb(e){const t=await Yi(this,zi,\"f\");return async()=>{t.remove(e),await t.dispatch(`sessionContextGroup:handlerRemoved-${this.id}`,{handlerId:e})}}getUserInstance(){return{id:this.id,setContext:(0,Qi.wrapInTryCatch)(this.setContext.bind(this),\"Failed to set context: \"),getCurrentContext:(0,Qi.wrapInTryCatch)(this.getCurrentContext.bind(this),\"Failed to get context: \"),addContextHandler:(0,Qi.wrapInTryCatch)(this.addContextHandler.bind(this),\"Failed to add context handler: \")}}}qi.default=Xi,zi=new WeakMap;var er={},tr={},nr={},ir={},rr=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),or=s&&s.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,\"default\",{enumerable:!0,value:t})}:function(e,t){e.default=t}),sr=s&&s.__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)&&rr(t,e,n);return or(t,e),t};Object.defineProperty(ir,\"__esModule\",{value:!0}),ir.PrivateChannelClient=void 0;const ar=sr(Hi);var cr,dr;function hr(){if(cr)return tr;cr=1;var e,t=s&&s.__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)},n=s&&s.__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},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(tr,\"__esModule\",{value:!0}),tr.FDC3ModuleBase=void 0;const o=nr,a=Hi,c=wr(),d=r(i);return tr.FDC3ModuleBase=class{get client(){return t(this,e,\"f\").call(this)}get fin(){return this.wire.getFin()}constructor(t,i){this.wire=i,e.set(this,void 0),n(this,e,t,\"f\")}async broadcast(e){return this.wire.sendAction(\"fdc3-broadcast\").catch((e=>{})),this.client.setContext(e)}async _open(e,t){this.wire.sendAction(\"fdc3-open\").catch((e=>{}));try{return await c.InteropClient.ferryFdc3Call(this.client,\"fdc3Open\",{app:e,context:t})}catch(e){const t=e.message===a.BROKER_ERRORS.fdc3Open?\"ResolverUnavailable\":e.message;throw new Error(t)}}async _getChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:\"system\",...(0,o.getUnsupportedChannelApis)()})))}async getOrCreateChannel(e){this.wire.sendAction(\"fdc3-get-or-create-channel\").catch((e=>{}));const t=(await this._getChannels()).find((t=>t.id===e));if(t)return{...t,type:\"system\",...(0,o.getUnsupportedChannelApis)()};try{const t=await this.client.joinSessionContextGroup(e);return(0,o.buildAppChannelObject)(t)}catch(e){throw console.error(e.message),new Error(o.ChannelError.CreationFailed)}}async getSystemChannels(){return this.wire.sendAction(\"fdc3-get-system-channels\").catch((e=>{})),this._getChannels()}async joinChannel(e){this.wire.sendAction(\"fdc3-join-channel\").catch((e=>{}));try{return await this.client.joinContextGroup(e)}catch(e){if(e.message===a.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup?console.error(\"The Channel you have tried to join is an App Channel. Custom Channels can only be defined by the Interop Broker through code or manifest configuration. Please use getOrCreateChannel.\"):console.error(e.message),e.message.startsWith(\"Attempting to join a context group that does not exist\"))throw new Error(o.ChannelError.NoChannelFound);throw new Error(o.ChannelError.AccessDenied)}}async getCurrentChannel(){this.wire.sendAction(\"fdc3-get-current-channel\").catch((e=>{}));const e=await this.getCurrentContextGroupInfo();return e?this.buildChannelObject(e):null}async leaveCurrentChannel(){return this.wire.sendAction(\"fdc3-leave-current-channel\").catch((e=>{})),this.client.removeFromContextGroup()}async getCurrentContextGroupInfo(){const e=await this.client.getContextGroups(),t=e.map((async e=>this.client.getAllClientsInContextGroup(e.id))),n=(await Promise.all(t)).findIndex((e=>e.some((e=>{const{uuid:t,name:n}=e;return this.wire.me.uuid===t&&this.wire.me.name===n}))));return e[n]}async buildChannelObject(e){return{...e,type:\"system\",addContextListener:(...[e,t])=>{let n,i;\"function\"==typeof e?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),n=e):(n=t,\"string\"==typeof e&&(i=e));const r=(async()=>{let e=!0;const t=await this.client.getCurrentContext(i);return this.client.addContextHandler(((i,r)=>{if(!e||(e=!1,!(0,d.default)(t,i)))return n(i,r)}),i)})();return{...r,unsubscribe:()=>r.then((e=>e.unsubscribe()))}},broadcast:this.broadcast.bind(this),getCurrentContext:async e=>{const t=await this.client.getCurrentContext(e);return void 0===t?null:t}}}},e=new WeakMap,tr}ir.PrivateChannelClient=class{constructor(e,t){this.id=t,this.client=e,this.listeners=new Map}async broadcast(e){return this.client.dispatch(\"broadcast\",{context:e})}async getCurrentContext(e){return this.client.dispatch(\"getCurrentContext\",{contextType:e})}async addContextListener(e,t){if(\"function\"!=typeof t)throw new Error(\"Non-function argument passed to the second parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.\");let n;n=e?`contextHandler:invoke-${this.id}-${e}-${ar.generateId()}`:`contextHandler:invoke-${this.id}-${ar.generateId()}`,this.client.register(n,ar.wrapContextHandler(t,n));const i={unsubscribe:await this.createContextUnsubscribeCb(n)};return this.listeners.set(n,i),await this.client.dispatch(\"contextHandlerAdded\",{handlerId:n,contextType:e}),i}createNonStandardUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch(\"nonStandardHandlerRemoved\",{handlerId:e})}}createContextUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch(\"contextHandlerRemoved\",{handlerId:e})}}onAddContextListener(e){const t=`onContextHandlerAdded:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch(\"onAddContextHandlerAdded\",{handlerId:t}),n}onDisconnect(e){const t=`onDisconnect:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch(\"onDisconnectHandlerAdded\",{handlerId:t}),n}onUnsubscribe(e){const t=`onUnsubscribe:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch(\"onUnsubscribeHandlerAdded\",{handlerId:t}),n}async cleanUpAllSubs(){Array.from(this.listeners.keys()).forEach((e=>{this.client.remove(e),this.listeners.delete(e)}))}async disconnect(){try{await this.client.dispatch(\"clientDisconnecting\"),await this.cleanUpAllSubs(),await this.client.disconnect()}catch(e){throw new Error(e.message)}}},function(e){var t=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,\"__esModule\",{value:!0}),e.getIntentResolution=e.isChannel=e.isContext=e.connectPrivateChannel=e.buildAppChannelObject=e.buildPrivateChannelObject=e.ChannelError=e.ResultError=e.UnsupportedChannelApiError=e.getUnsupportedChannelApis=void 0;const n=Hi,r=ir,o=t(i);e.getUnsupportedChannelApis=e=>({addContextListener:()=>{throw new a(\"Channel.addContextListener\",e)},broadcast:()=>{throw new a(\"Channel.broadcast\",e)},getCurrentContext:()=>{throw new a(\"Channel.getCurrentContext\",e)}});class a extends Error{constructor(e,t=\"System\"){super(e),this.message=`Calling ${e} on an instance of a ${t} Channel returned by fdc3.get${t}Channels is not supported. If you would like to use a ${t} Channel, please use fdc3.joinChannel, fdc3.addContextListener, and fdc3.broadcast instead.`}}var c,d;e.UnsupportedChannelApiError=a,function(e){e.NoResultReturned=\"NoResultReturned\",e.IntentHandlerRejected=\"IntentHandlerRejected\"}(c=e.ResultError||(e.ResultError={})),(d=e.ChannelError||(e.ChannelError={})).NoChannelFound=\"NoChannelFound\",d.AccessDenied=\"AccessDenied\",d.CreationFailed=\"CreationFailed\";e.buildPrivateChannelObject=e=>{let t=!1;const n=()=>{if(t)throw new Error(\"Private Channel Client has been disconnected from the Private Channel\")};return{id:e.id,type:\"private\",broadcast:async t=>(n(),e.broadcast(t)),getCurrentContext:async t=>(n(),e.getCurrentContext(t)),addContextListener:async(t,i)=>{n();let r=i,o=t;\"function\"==typeof t&&(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),r=t,o=null);return e.addContextListener(o,r)},onAddContextListener:t=>(n(),e.onAddContextListener(t)),disconnect:async()=>(n(),t=!0,e.disconnect()),onDisconnect:t=>(n(),e.onDisconnect(t)),onUnsubscribe:t=>(n(),e.onUnsubscribe(t))}};e.buildAppChannelObject=e=>({id:e.id,type:\"app\",broadcast:e.setContext,getCurrentContext:async t=>{const n=await e.getCurrentContext(t);return void 0===n?null:n},addContextListener:(t,n)=>{let i,r;\"function\"==typeof t?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),i=t):(i=n,\"string\"==typeof t&&(r=t));const s=(async()=>{let t=!0;const n=await e.getCurrentContext(r);return e.addContextHandler(((e,r)=>{if(!t||(t=!1,!(0,o.default)(n,e)))return i(e,r)}),r)})();return{...s,unsubscribe:()=>s.then((e=>e.unsubscribe()))}}});e.connectPrivateChannel=async t=>{try{const n=await fin.InterApplicationBus.Channel.connect(t),i=new r.PrivateChannelClient(n,t);return(0,e.buildPrivateChannelObject)(i)}catch(e){throw new Error(`Private Channel with id: ${t} doesn't exist`)}};e.isContext=e=>{if(e&&\"object\"==typeof e&&\"type\"in e){const{type:t}=e;return\"string\"==typeof t}return!1};e.isChannel=e=>{if(e&&\"object\"==typeof e&&\"type\"in e&&\"id\"in e){const{type:t,id:n}=e;return\"string\"==typeof t&&\"string\"==typeof n&&(\"app\"===t||\"private\"===t)}return!1};e.getIntentResolution=async(t,i,r,o)=>{const s=(0,n.generateId)(),a=new Promise(((e,t)=>{fin.InterApplicationBus.subscribe({uuid:\"*\"},s,(t=>{e(t)})).catch((()=>t(new Error(\"getResult is not supported in this environment\"))))})),d=r?{target:r,intentResolutionResultId:s}:{intentResolutionResultId:s},h=o?{name:o,context:i,metadata:d}:{...i,metadata:d},l=async()=>{let n=await a;if(!n||\"object\"!=typeof n)throw new Error(c.NoResultReturned);const{error:i}=n;if(i)throw new Error(c.IntentHandlerRejected);if((0,e.isChannel)(n)){const{id:i,type:r}=n;switch(r){case\"private\":n=await(0,e.connectPrivateChannel)(i);break;case\"app\":{const r=await t.joinSessionContextGroup(i);n=(0,e.buildAppChannelObject)(r);break}}}else if(!(0,e.isContext)(n))throw new Error(c.NoResultReturned);return n},u=o?await t.fireIntent(h):await t.fireIntentForContext(h);return\"object\"!=typeof u?{source:{appId:\"\",instanceId:\"\"},intent:\"\",version:\"2.0\",getResult:l}:{...u,getResult:l}}}(nr);var lr,ur,pr={};function wr(){if(ur)return Ki;ur=1;var e,t,n=s&&s.__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},i=s&&s.__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)},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ki,\"__esModule\",{value:!0}),Ki.InteropClient=void 0;const o=d,a=r(qi),c=function(){if(dr)return er;dr=1,Object.defineProperty(er,\"__esModule\",{value:!0}),er.Fdc3Module=void 0;const e=Hi,t=hr();class n extends t.FDC3ModuleBase{async open(e,t){await super._open(e,t)}addContextListener(e,t){let n;return this.wire.sendAction(\"fdc3-add-context-listener\").catch((e=>{})),\"function\"==typeof e?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),n=this.client.addContextHandler(e)):n=this.client.addContextHandler(t,null===e?void 0:e),{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}addIntentListener(e,t){this.wire.sendAction(\"fdc3-add-intent-listener\").catch((e=>{}));const n=this.client.registerIntentHandler((e=>{const{context:n,metadata:i}=e,{metadata:r}=n,o=i?.intentResolutionResultId||r?.intentResolutionResultId;o&&this.fin.InterApplicationBus.publish(o,null).catch((()=>null)),t(e.context)}),e,{fdc3Version:\"1.2\"});return{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}async raiseIntent(t,n,i){this.wire.sendAction(\"fdc3-raise-intent\").catch((e=>{}));const r=i?{name:t,context:n,metadata:{target:i}}:{name:t,context:n};try{return await this.client.fireIntent(r)}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntent?\"ResolverUnavailable\":t.message;throw new Error(n)}}async findIntent(t,n){this.wire.sendAction(\"fdc3-find-intent\").catch((e=>{}));try{return await this.client.getInfoForIntent({name:t,context:n})}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntent?\"ResolverUnavailable\":t.message;throw new Error(n)}}async findIntentsByContext(t){this.wire.sendAction(\"fdc3-find-intents-by-context\").catch((e=>{}));try{return await this.client.getInfoForIntentsByContext(t)}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntentsByContext?\"ResolverUnavailable\":t.message;throw new Error(n)}}async raiseIntentForContext(t,n){this.wire.sendAction(\"fdc3-raise-intent-for-context\").catch((e=>{}));try{return await this.client.fireIntentForContext({...t,metadata:{target:n}})}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntentForContext?\"ResolverUnavailable\":t.message;throw new Error(n)}}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}getInfo(){return this.wire.sendAction(\"fdc3-get-info\").catch((e=>{})),{providerVersion:this.wire.environment.getAdapterVersionSync(),provider:`openfin-${this.wire.me.uuid}`,fdc3Version:\"1.2\"}}}return er.Fdc3Module=n,er}(),h=function(){if(lr)return pr;lr=1,Object.defineProperty(pr,\"__esModule\",{value:!0}),pr.Fdc3Module2=void 0;const e=hr(),t=Hi,n=wr(),i=nr,r=ir;class o extends e.FDC3ModuleBase{async open(e,t){return\"string\"==typeof e&&console.warn(\"Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).\"),super._open(e,t)}async findInstances(e){this.wire.sendAction(\"fdc3-find-instances\").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,\"fdc3FindInstances\",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3FindInstances?\"ResolverUnavailable\":e.message;throw new Error(n)}}async getAppMetadata(e){this.wire.sendAction(\"fdc3-get-app-metadata\").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,\"fdc3GetAppMetadata\",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3GetAppMetadata?\"ResolverUnavailable\":e.message;throw new Error(n)}}async addContextListener(e,t){this.wire.sendAction(\"fdc3-add-context-listener\").catch((e=>{}));const n=e=>t=>{const{contextMetadata:n,...i}=t,r=n?[{...i},n]:[t,null];e(...r)};let i=t,r=n(i);return\"function\"==typeof e?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),i=e,r=n(i),this.client.addContextHandler(r)):this.client.addContextHandler(r,null===e?void 0:e)}async findIntent(e,n,i){this.wire.sendAction(\"fdc3-find-intent\").catch((e=>{}));try{return await this.client.getInfoForIntent({name:e,context:n,metadata:{resultType:i}})}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntent?\"ResolverUnavailable\":e.message;throw new Error(n)}}async findIntentsByContext(e,i){this.wire.sendAction(\"fdc3-find-intents-by-context\").catch((e=>{}));const r=i?{context:e,metadata:{resultType:i}}:e;try{return await n.InteropClient.ferryFdc3Call(this.client,\"fdc3v2FindIntentsByContext\",r)}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntentsByContext?\"ResolverUnavailable\":e.message;throw new Error(n)}}async raiseIntent(e,n,r){this.wire.sendAction(\"fdc3-raise-intent\").catch((e=>{}));try{return\"string\"==typeof r&&console.warn(\"Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).\"),(0,i.getIntentResolution)(this.client,n,r,e)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?\"ResolverUnavailable\":e.message;throw new Error(n)}}async raiseIntentForContext(e,n){this.wire.sendAction(\"fdc3-raise-intent-for-context\").catch((e=>{}));try{return\"string\"==typeof n&&console.warn(\"Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).\"),(0,i.getIntentResolution)(this.client,e,n)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?\"ResolverUnavailable\":e.message;throw new Error(n)}}async addIntentListener(e,t){if(this.wire.sendAction(\"fdc3-add-intent-listener\").catch((e=>{})),\"string\"!=typeof e)throw new Error(\"First argument must be an Intent name\");return this.client.registerIntentHandler((async e=>{let n,i;const{context:r,metadata:o}=e,{contextMetadata:s,metadata:a,...c}=r,d=o?.intentResolutionResultId||a?.intentResolutionResultId;try{const e=a?{metadata:a,...c}:{...c};n=await t(e,s),i=n}catch(e){n=e,i={error:!0}}if(d&&this.fin.InterApplicationBus.publish(d,i).catch((()=>null)),n instanceof Error)throw new Error(n.message);return n}),e,{fdc3Version:\"2.0\"})}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}async createPrivateChannel(){const e=(0,t.generateId)();await n.InteropClient.ferryFdc3Call(this.client,\"createPrivateChannelProvider\",{channelId:e});const o=await this.fin.InterApplicationBus.Channel.connect(e),s=new r.PrivateChannelClient(o,e);return(0,i.buildPrivateChannelObject)(s)}async getUserChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:\"user\",...(0,i.getUnsupportedChannelApis)(\"User\")})))}async getSystemChannels(){return console.warn(\"This API has been deprecated. Please use fdc3.getUserChannels instead.\"),super.getSystemChannels()}async joinUserChannel(e){return super.joinChannel(e)}async joinChannel(e){return console.warn(\"This API has been deprecated. Please use fdc3.joinUserChannel instead.\"),super.joinChannel(e)}async getCurrentChannel(){const e=await super.getCurrentChannel();return e?{...e,type:\"user\",broadcast:this.broadcast.bind(this)}:null}async getInfo(){return n.InteropClient.ferryFdc3Call(this.client,\"fdc3v2GetInfo\",{fdc3Version:\"2.0\"})}}return pr.Fdc3Module2=o,pr}(),l=Hi;let u=class extends o.Base{constructor(i,r){super(i),e.set(this,void 0),t.set(this,void 0),n(this,t,new Map,\"f\"),n(this,e,r,\"f\")}async setContext(t){this.wire.sendAction(\"interop-client-set-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"setContext\",{context:t})}async addContextHandler(t,n){if(this.wire.sendAction(\"interop-client-add-context-handler\").catch((e=>{})),\"function\"!=typeof t)throw new Error(\"Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.\");const r=await i(this,e,\"f\");let o;o=n?`invokeContextHandler-${n}-${(0,l.generateId)()}`:\"invokeContextHandler\";const s=(0,l.wrapContextHandler)(t,o);return r.register(o,s),await r.dispatch(\"contextHandlerRegistered\",{handlerId:o,contextType:n}),{unsubscribe:async()=>{r.remove(o),await r.dispatch(\"removeContextHandler\",{handlerId:o})}}}async getContextGroups(){this.wire.sendAction(\"interop-client-get-context-groups\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getContextGroups\")}async joinContextGroup(t,n){this.wire.sendAction(\"interop-client-join-context-group\").catch((e=>{}));const r=await i(this,e,\"f\");if(!t)throw new Error(\"No contextGroupId specified for joinContextGroup.\");return r.dispatch(\"joinContextGroup\",{contextGroupId:t,target:n})}async removeFromContextGroup(t){this.wire.sendAction(\"interop-client-remove-from-context-group\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"removeFromContextGroup\",{target:t})}async getAllClientsInContextGroup(t){this.wire.sendAction(\"interop-client-get-all-clients-in-context-group\").catch((e=>{}));const n=await i(this,e,\"f\");if(!t)throw new Error(\"No contextGroupId specified for getAllClientsInContextGroup.\");return n.dispatch(\"getAllClientsInContextGroup\",{contextGroupId:t})}async getInfoForContextGroup(t){this.wire.sendAction(\"interop-client-get-info-for-context-group\").catch((e=>{}));const n=await i(this,e,\"f\");if(!t)throw new Error(\"No contextGroupId specified for getInfoForContextGroup.\");return n.dispatch(\"getInfoForContextGroup\",{contextGroupId:t})}async fireIntent(t){this.wire.sendAction(\"interop-client-fire-intent\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"fireIntent\",t)}async registerIntentHandler(t,n,r){this.wire.sendAction(\"interop-client-register-intent-handler\").catch((e=>{}));const o=await i(this,e,\"f\"),s=`intent-handler-${n}`,a=(0,l.wrapIntentHandler)(t,s);try{await o.register(s,a),await o.dispatch(\"intentHandlerRegistered\",{handlerId:s,...r})}catch(e){throw new Error(\"Unable to register intent handler\")}return{unsubscribe:async()=>{o.remove(s)}}}async getCurrentContext(t){this.wire.sendAction(\"interop-client-get-current-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getCurrentContext\",{contextType:t})}async getInfoForIntent(t){this.wire.sendAction(\"interop-client-get-info-for-intent\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getInfoForIntent\",t)}async getInfoForIntentsByContext(t){this.wire.sendAction(\"interop-client-get-info-for-intents-by-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getInfoForIntentsByContext\",t)}async fireIntentForContext(t){this.wire.sendAction(\"interop-client-fire-intent-for-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"fireIntentForContext\",t)}async joinSessionContextGroup(n){try{const r=i(this,t,\"f\").get(n);if(r)return r.getUserInstance();const o=await i(this,e,\"f\"),{hasConflict:s}=await o.dispatch(\"sessionContextGroup:createIfNeeded\",{sessionContextGroupId:n});s&&console.warn(`A (non-session) context group with the name \"${n}\" already exists. If you are trying to join a Context Group, call joinContextGroup instead.`);const c=new a.default(this.wire,i(this,e,\"f\"),n);return i(this,t,\"f\").set(n,c),c.getUserInstance()}catch(e){throw console.error(`Error thrown trying to create Session Context Group with id \"${n}\": ${e}`),e}}async onDisconnection(t){this.wire.sendAction(\"interop-client-add-ondisconnection-listener\").catch((e=>{}));return(await i(this,e,\"f\")).onDisconnection((e=>{const{uuid:n}=e;t({type:\"interop-broker\",topic:\"disconnected\",brokerName:n})}))}getFDC3Sync(e){switch(e){case\"1.2\":return new c.Fdc3Module((()=>this),this.wire);case\"2.0\":return new h.Fdc3Module2((()=>this),this.wire);default:throw new Error(`Invalid FDC3 version provided: ${e}. Must be '1.2' or '2.0'`)}}async getFDC3(e){return this.getFDC3Sync(e)}static async ferryFdc3Call(t,n,r){return(await i(t,e,\"f\")).dispatch(n,r||null)}};return Ki.InteropClient=u,e=new WeakMap,t=new WeakMap,Ki}var yr,fr,gr,mr={};function vr(){if(yr)return mr;yr=1,Object.defineProperty(mr,\"__esModule\",{value:!0}),mr.overrideCheck=mr.checkFDC32Overrides=mr.getDefaultViewFdc3VersionFromAppInfo=void 0;const e=Vi();function t(t){return[\"fdc3HandleFindInstances\",\"handleInfoForIntent\",\"handleInfoForIntentsByContext\",\"fdc3HandleGetAppMetadata\",\"fdc3HandleGetInfo\",\"fdc3HandleOpen\",\"handleFiredIntent\",\"handleFiredIntentForContext\"].filter((n=>t[n]===e.InteropBroker.prototype[n]))}return mr.getDefaultViewFdc3VersionFromAppInfo=function({manifest:e,initialOptions:t}){const n=e?.platform?.defaultViewOptions?.fdc3InteropApi??t.defaultViewOptions?.fdc3InteropApi;return[\"1.2\",\"2.0\"].includes(n??\"\")?n:void 0},mr.checkFDC32Overrides=t,mr.overrideCheck=function(e,n){if(n&&\"2.0\"===n){const n=t(e);n.length>0&&console.warn(`WARNING: FDC3 2.0 has been set as a default option for Views in this Platform, but the required InteropBroker APIs for FDC3 2.0 compliance have not all been overridden.\\nThe following APIs need to be overridden:\\n${n.join(\"\\n\")}`)}},mr}function Cr(){return gr||(gr=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),i=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),i(function(){if(fr)return Ti;fr=1;var e=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ti,\"__esModule\",{value:!0}),Ti.InteropModule=void 0;const t=e(n),i=$i,r=d,o=Vi(),a=wr(),c=vr(),h=Tn,l=e=>new e,u=\"You have attempted to use or modify InteropBroker parameters, which is not allowed. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.\";class p extends r.Base{async init(e,n=l){this.wire.sendAction(\"interop-init\").catch((()=>{}));const r=await this.wire.environment.getInteropInfo(this.wire.getFin()),s=(0,i.createUnusableObject)(u),a=(0,i.createWarningObject)(u,(0,t.default)(r)),d=async()=>{throw new Error(u)},p=o.InteropBroker.createClosedConstructor(this.wire,(()=>this.fin.InterApplicationBus.Channel.create(`interop-broker-${e}`)),r);let w;return w=Array.isArray(n)?new((0,h.overrideFromComposables)(...n)(p))(s,d,a):await n(p,s,d,a),(0,c.overrideCheck)(w,r.fdc3Version),w}connectSync(e,t){return this.wire.sendAction(\"interop-connect-sync\").catch((()=>{})),new a.InteropClient(this.wire,this.wire.environment.whenReady().then((()=>this.fin.InterApplicationBus.Channel.connect(`interop-broker-${e}`,{payload:t}))))}}return Ti.InteropModule=p,Ti}(),e),i(wr(),e),i(Vi(),e)}(Li)),Li}var br={},Ir={},Er={},xr={};Object.defineProperty(xr,\"__esModule\",{value:!0}),xr.getSnapshotSourceChannelName=void 0;xr.getSnapshotSourceChannelName=e=>`snapshot-source-provider-${e.uuid}`;var Ar,Pr,Mr,_r,Or,Sr=s&&s.__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},Rr=s&&s.__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)};Object.defineProperty(Er,\"__esModule\",{value:!0}),Er.SnapshotSource=void 0;const Fr=d,jr=xr,kr=new Map;class Lr extends Fr.Base{constructor(e,t){super(e),Ar.set(this,void 0),Pr.set(this,(()=>(kr.has(this.identity.uuid)||kr.set(this.identity.uuid,{eventFired:null,clientPromise:null}),kr.get(this.identity.uuid)))),Mr.set(this,(()=>(Rr(this,Pr,\"f\").call(this).clientPromise||(Rr(this,Pr,\"f\").call(this).clientPromise=Rr(this,_r,\"f\").call(this)),Rr(this,Pr,\"f\").call(this).clientPromise))),_r.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);try{Rr(this,Pr,\"f\").call(this).eventFired||await Rr(this,Or,\"f\").call(this);const t=await this.fin.InterApplicationBus.Channel.connect(e,{wait:!1});return t.onDisconnection((()=>{Rr(this,Pr,\"f\").call(this).clientPromise=null,Rr(this,Pr,\"f\").call(this).eventFired=null})),t}catch(e){throw Rr(this,Pr,\"f\").call(this).clientPromise=null,new Error(\"The targeted SnapshotSource is not currently initialized. Await this object's ready() method.\")}})),Or.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);let t,n;const i=new Promise(((e,i)=>{t=e,n=i}));Rr(this,Pr,\"f\").call(this).eventFired=i;const r=async i=>{try{i.channelName===e&&(t(),await this.fin.InterApplicationBus.Channel.removeListener(\"connected\",r))}catch(e){n(e)}};await this.fin.InterApplicationBus.Channel.on(\"connected\",r)})),Sr(this,Ar,t,\"f\")}get identity(){return Rr(this,Ar,\"f\")}async ready(){this.wire.sendAction(\"snapshot-source-ready\").catch((e=>{}));try{await Rr(this,Mr,\"f\").call(this)}catch(e){await Rr(this,Pr,\"f\").call(this).eventFired}}async getSnapshot(){this.wire.sendAction(\"snapshot-source-get-snapshot\").catch((e=>{}));const e=await Rr(this,Mr,\"f\").call(this),t=await e.dispatch(\"get-snapshot\");return(await t).snapshot}async applySnapshot(e){this.wire.sendAction(\"snapshot-source-apply-snapshot\").catch((e=>{}));return(await Rr(this,Mr,\"f\").call(this)).dispatch(\"apply-snapshot\",{snapshot:e})}}Er.SnapshotSource=Lr,Ar=new WeakMap,Pr=new WeakMap,Mr=new WeakMap,_r=new WeakMap,Or=new WeakMap,Object.defineProperty(Ir,\"__esModule\",{value:!0}),Ir.SnapshotSourceModule=void 0;const Tr=d,$r=Er,Br=xr;class Gr extends Tr.Base{async init(e){if(this.wire.sendAction(\"snapshot-source-init\").catch((e=>{})),\"object\"!=typeof e||\"function\"!=typeof e.getSnapshot||\"function\"!=typeof e.applySnapshot)throw new Error(\"you must pass in a valid SnapshotProvider\");const t=await this.fin.InterApplicationBus.Channel.create((0,Br.getSnapshotSourceChannelName)(this.fin.me));t.register(\"get-snapshot\",(async()=>({snapshot:await e.getSnapshot()}))),t.register(\"apply-snapshot\",(({snapshot:t})=>e.applySnapshot(t)))}wrapSync(e){return this.wire.sendAction(\"snapshot-source-wrap-sync\").catch((e=>{})),new $r.SnapshotSource(this.wire,e)}async wrap(e){return this.wire.sendAction(\"snapshot-source-wrap\").catch((e=>{})),this.wrapSync(e)}}Ir.SnapshotSourceModule=Gr,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Ir,e),n(Er,e)}(br),Object.defineProperty(a,\"__esModule\",{value:!0});var Wr=a.Fin=void 0;const Hr=t,Nr=c,Dr=ie(),Ur=Z(),Vr=de,zr=en,Kr=rn,qr=un,Jr=bn,Yr=J(),Zr=An,Qr=ki,Xr=Cr(),eo=br;class to extends Hr.EventEmitter{constructor(e){super(),this.wire=e,this.System=new Nr.System(e),this.Window=new Dr._WindowModule(e),this.Application=new Ur.ApplicationModule(e),this.InterApplicationBus=new Vr.InterApplicationBus(e),this.Clipboard=new zr.Clipboard(e),this.ExternalApplication=new Kr.ExternalApplicationModule(e),this.Frame=new qr._FrameModule(e),this.GlobalHotkey=new Jr.GlobalHotkey(e),this.Platform=new Zr.PlatformModule(e,this.InterApplicationBus.Channel),this.View=new Yr.ViewModule(e),this.Interop=new Xr.InteropModule(e),this.SnapshotSource=new eo.SnapshotSourceModule(e),e.registerFin(this),this.me=(0,Qr.getMe)(e),e.on(\"disconnected\",(()=>{this.emit(\"disconnected\")}))}}Wr=a.Fin=to;var no={},io={};function ro(e){return\"string\"==typeof e.manifestUrl}function oo(e){return ao(e)&&\"string\"==typeof e.address}function so(e){return oo(e)&&\"string\"==typeof e.token}function ao(e){return\"string\"==typeof e.uuid}function co(e){return e.runtime&&\"string\"==typeof e.runtime.version}function ho(e){return ao(e)&&co(e)}Object.defineProperty(io,\"__esModule\",{value:!0}),io.isInternalConnectConfig=io.isPortDiscoveryConfig=io.isNewConnectConfig=io.isConfigWithReceiver=io.isRemoteConfig=io.isExistingConnectConfig=io.isExternalConfig=void 0,io.isExternalConfig=ro,io.isExistingConnectConfig=oo,io.isRemoteConfig=so,io.isConfigWithReceiver=function(e){return\"object\"==typeof e.receiver&&so({...e,address:\"\"})},io.isNewConnectConfig=ho,io.isPortDiscoveryConfig=function(e){return ro(e)&&co(e)||ho(e)},io.isInternalConnectConfig=function(e){return oo(e)||ho(e)};var lo={},uo={};Object.defineProperty(uo,\"__esModule\",{value:!0}),uo.EmitterMap=void 0;const po=t;function wo(e){return Buffer.from(e).toString(\"base64\")}uo.EmitterMap=class{constructor(){this.storage=new Map}hashKeys(e){return e.map(wo).join(\"/\")}getOrCreate(e){const t=this.hashKeys(e);return this.storage.has(t)||this.storage.set(t,new po.EventEmitter),this.storage.get(t)}has(e){return this.storage.has(this.hashKeys(e))}delete(e){const t=this.hashKeys(e);return this.storage.delete(t)}},Object.defineProperty(lo,\"__esModule\",{value:!0});const yo=uo;class fo extends yo.EmitterMap{constructor(){super(...arguments),this.dispatchEvent=e=>{if(function(e){return\"process-desktop-event\"===e.action}(e)){const{payload:t}=e,n=function(e){const{topic:t}=e;if(\"frame\"===t||\"window\"===t||\"view\"===t){const{uuid:n,name:i}=e;return[t,n,i]}if(\"application\"===t){const{uuid:n}=e;return[t,n]}return[t]}(t);if(this.has(n))return this.getOrCreate(n).emit(t.type,t),!0}return!1}}}lo.default=fo;var go,mo,vo=s&&s.__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},Co=s&&s.__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)},bo=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(no,\"__esModule\",{value:!0});var Io=no.Transport=void 0;const Eo=t,xo=io,Ao=g,Po=bo(lo),Mo=ki,_o=ke;class Oo extends Eo.EventEmitter{constructor(e,t,n){super(),this.wireListeners=new Map,this.topicRefMap=new Map,this.eventAggregator=new Po.default,this.messageHandlers=[this.eventAggregator.dispatchEvent],go.set(this,void 0),mo.set(this,void 0),this.connectSync=()=>{Co(this,go,\"f\").connectSync()},this.getPort=()=>Co(this,go,\"f\").getPort(),vo(this,go,new e(this.onmessage.bind(this)),\"f\"),this.environment=t,this.sendRaw=Co(this,go,\"f\").send.bind(Co(this,go,\"f\")),this.registerMessageHandler(this.handleMessage.bind(this)),Co(this,go,\"f\").on(\"disconnected\",(()=>{for(const[,{handleNack:e}]of this.wireListeners)e({reason:\"Remote connection has closed\"});this.wireListeners.clear(),this.emit(\"disconnected\")}));const{uuid:i,name:r}=n,o=this.environment.getCurrentEntityType();this.me=(0,Mo.getBaseMe)(o,i,r)}getFin(){if(!Co(this,mo,\"f\"))throw new Error(\"No Fin object registered for this transport\");return Co(this,mo,\"f\")}registerFin(e){if(Co(this,mo,\"f\"))throw new Error(\"Fin object has already been registered for this transport\");vo(this,mo,e,\"f\")}shutdown(){return Co(this,go,\"f\").shutdown()}async connect(e){if((0,xo.isConfigWithReceiver)(e))return await Co(this,go,\"f\").connect(e.receiver),this.authorize(e);if((0,xo.isRemoteConfig)(e))return this.connectRemote(e);if((0,xo.isExistingConnectConfig)(e))return this.connectByPort(e);if((0,xo.isNewConnectConfig)(e)){const t=await this.environment.retrievePort(e);return this.connectByPort({...e,address:`ws://localhost:${t}`})}}async connectRemote(e){return await Co(this,go,\"f\").connect(new(this.environment.getWsConstructor())(e.address)),this.authorize(e)}async connectByPort(e){const{address:t,uuid:n}=e,i={...e,type:\"file-token\"},r=Co(this,go,\"f\");await r.connect(new(this.environment.getWsConstructor())(e.address));const o=await this.sendAction(\"request-external-authorization\",{uuid:n,type:\"file-token\"},!0);if(\"external-authorization-response\"!==o.action)throw new Ao.UnexpectedActionError(o.action);return await this.environment.writeToken(o.payload.file,o.payload.token),this.authorize(i)}async authorize(e){const t=await this.sendAction(\"request-authorization\",e,!0);if(\"authorization-response\"!==t.action)throw new Ao.UnexpectedActionError(t.action);if(!0!==t.payload.success)throw new Ao.RuntimeError(t.payload)}sendAction(e,t={},n=!1){let i=()=>{};const r=Ao.RuntimeError.getCallSite(1),o=this.environment.getNextMessageId(),s=new Promise(((s,a)=>{i=a;const c={action:e,payload:t,messageId:o},d=Co(this,go,\"f\");return this.addWireListener(o,s,(e=>this.nackHandler(e,a,r)),n),d.send(c).catch(a)}));return Object.assign(s,{cancel:i,messageId:o})}nackHandler(e,t,n){t(\"string\"==typeof e?e:new Ao.RuntimeError(e,n))}ferryAction(e){return new Promise(((t,n)=>{const i=this.environment.getNextMessageId();e.messageId=i;const r=e=>{t(e.payload)};return Co(this,go,\"f\").send(e).then((()=>this.addWireListener(i,r,(e=>this.nackHandler(e,n)),!1))).catch(n)}))}registerMessageHandler(e){this.messageHandlers.push(e)}addWireListener(e,t,n,i){i?this.uncorrelatedListener=t:this.wireListeners.has(e)?n({reason:\"Duplicate handler id\",error:(0,_o.errorToPOJO)(new Ao.DuplicateCorrelationError(String(e)))}):this.wireListeners.set(e,{resolve:t,handleNack:n})}onmessage(e){for(const t of this.messageHandlers)t.call(null,e)}handleMessage(e){const t=e.correlationId||NaN;if(\"correlationId\"in e){if(!this.wireListeners.has(t))return!1;{const{resolve:n,handleNack:i}=this.wireListeners.get(t);\"ack\"!==e.action?i({reason:\"Did not receive ack action\",error:(0,_o.errorToPOJO)(new Ao.NoAckError(e.action))}):\"payload\"in e?e.payload.success?n.call(null,e):i(e.payload):\"string\"==typeof e.reason?i(e):(console.warn(\"Received invalid response from core\",e),i({reason:\"invalid response shape\"})),this.wireListeners.delete(t)}}else this.uncorrelatedListener&&this.uncorrelatedListener.call(null,e),this.uncorrelatedListener=()=>{};return!0}}Io=no.Transport=Oo,go=new WeakMap,mo=new WeakMap;const So=(...e)=>({log:(...t)=>console.debug(`[${(new Date).toISOString()}]`,...(e=>e.map((e=>`[${e}]`)))(e),...t),getLogger:(...t)=>So(...e,...t)}),Ro=So(\"@openfin/core-web/client\");function Fo(e,t){if(!function(e){return\"string\"==typeof e}(e))throw new Error(`Property ${t} has invalid type. Expected string, got ${typeof e}.`)}const jo=\"web-broker-ports-ready\",ko=Ro.getLogger(\"get-web-interop-ports\");function Lo(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)}function To(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}\"function\"==typeof SuppressedError&&SuppressedError;const $o=e=>{var n,i,r;return r=class extends t.EventEmitter{constructor(t){super(),n.set(this,void 0),i.set(this,!1),this.connectSync=()=>{Lo(this,i,\"f\")||(e.addEventListener(\"message\",(e=>{e.data?.topic?.startsWith(\"wire-message\")&&e.data.message&&Lo(this,n,\"f\").call(this,{...JSON.parse(e.data.message),ports:e.ports})})),e.start())},this.connect=async()=>{this.connectSync()},this.send=t=>(e.postMessage({topic:\"wire-message\",message:JSON.stringify(t)}),Promise.resolve()),this.shutdown=async()=>{e.close()},To(this,n,t,\"f\")}getPort(){return e}},n=new WeakMap,i=new WeakMap,r};var Bo={},Go={};Object.defineProperty(Go,\"__esModule\",{value:!0}),Go.BaseEnvironment=void 0;const Wo=vr();Go.BaseEnvironment=class{async getViewWindowIdentity(e,t){const{identity:n}=await e.View.wrapSync(t).getCurrentWindow();return n}async getInteropInfo(e){const t=await e.Application.getCurrentSync().getInfo().catch((()=>null)),n=t?.initialOptions?.interopBrokerConfiguration??{};return{fdc3Version:t?(0,Wo.getDefaultViewFdc3VersionFromAppInfo)(t):void 0,...n,fdc3Info:{providerVersion:await e.System.getVersion(),provider:\"OpenFin\"}}}},Object.defineProperty(Bo,\"__esModule\",{value:!0});var Ho=Bo.BrowserEnvironment=void 0;const No=Go;class Do extends No.BaseEnvironment{constructor(){super(...arguments),this.type=\"other\",this.getRandomId=()=>{const e=new Uint32Array(1);return window.crypto.getRandomValues(e)[0].toString(32)}}getAdapterVersionSync(){return\"\"}observeBounds(e,t){throw new Error(\"Method not implemented.\")}layoutAllowedInContext(e){return!1}initLayoutManager(e,t,n){throw new Error(\"Method not implemented.\")}applyLayoutSnapshot(e,t,n){throw new Error(\"Method not implemented.\")}createLayout(e,t){throw new Error(\"Method not implemented.\")}destroyLayout(e,t){throw new Error(\"Method not implemented.\")}resolveLayout(e,t){throw new Error(\"Method not implemented.\")}initPlatform(...e){throw new Error(\"Method not implemented.\")}writeToken(e,t){return Promise.resolve(\"\")}retrievePort(e){throw new Error(\"Method not implemented.\")}getNextMessageId(){return this.getRandomId()}createChildContent(e){throw new Error(\"Method not implemented.\")}getWebWindow(e){throw new Error(\"Method not implemented.\")}getCurrentEntityIdentity(){throw new Error(\"Method not implemented.\")}getCurrentEntityType(){return\"external connection\"}raiseEvent(e,t){throw new Error(\"Method not implemented.\")}getUrl(){return location.href}getDefaultChannelOptions(){return{create:{},connect:{}}}getRtcPeer(){return new RTCPeerConnection}getWsConstructor(){return WebSocket}whenReady(){return Promise.resolve()}}Ho=Bo.BrowserEnvironment=Do;const Uo=e=>\"platform\"in e&&void 0!==e.platform;var Vo,zo;class Ko extends Ho{constructor(e){super(),this.connectConfig=e,Vo.set(this,void 0),zo.set(this,new W((async()=>Promise.resolve().then((function(){return require(\"./main-b14f67c9.js\")}))))),Uo(e)&&this.validatePlatformOptions(e)}getAdapterVersionSync(){return\"0.39.21\"}validatePlatformOptions({platform:e}){if(!(\"layoutSnapshot\"in e))throw new Error(\"Platform options are missing layoutSnapshot. Please provide a layoutSnapshot in the platform options.\");if(\"windows\"in e||\"windows\"in e.layoutSnapshot)throw new Error(\"It appears you tried to call connect() with a snapshot object from an OpenFin desktop environment. Note that connect() expects to be called with a platform property with this structure: { platform: { layoutSnapshot } }. To get a layoutSnapshot of the expected structure, use fin.Platform.Layout.getCurrentLayoutManagerSync().getLayoutSnapshot() in v34+ in your desktop environment.\");const{layouts:t}=e.layoutSnapshot;Object.entries(t).map((([e,t])=>{if(\"object\"!=typeof t||null===t)throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must be an object.`);if(!(\"content\"in t))throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must contain a 'content' property.`)}))}async getInteropInfo(e){return{...{contextGroups:void 0,logging:{beforeAction:{enabled:!1},afterAction:{enabled:!1}}},fdc3Version:void 0,fdc3Info:{providerVersion:\"0.39.21\",provider:\"OpenFin Web\"}}}layoutAllowedInContext(e){return!0}async initLayoutManager(e,t,n){if(Lo(this,Vo,\"f\"))throw new Error(\"Layout already initialized.\");if(!Uo(this.connectConfig))throw new Error(\"Platform options are missing from connection config.\");const{WebLayoutEntryPoint:i}=await Lo(this,zo,\"f\").getValue();return To(this,Vo,new i(this.connectConfig),\"f\"),await Lo(this,Vo,\"f\").initLayoutManager(e,t,n)}async applyLayoutSnapshot(e,t,n){Lo(this,Vo,\"f\")?.applyLayoutSnapshot(e,t,n)}async createLayout(e,t){return Lo(this,Vo,\"f\")?.createLayout(e,t)}async destroyLayout(e,t){return Lo(this,Vo,\"f\")?.destroyLayout(e,t)}async getViewWindowIdentity(e,t){return Promise.resolve({uuid:t.uuid,name:t.uuid})}}Vo=new WeakMap,zo=new WeakMap;const qo=()=>{const e=((e,t)=>{const n=new RegExp(`^${t}<(?.*)>$`).exec(e)?.groups?.meta;if(n)try{return JSON.parse(atob(n))}catch(e){throw new Error(`Failed to decode JSON from ${n}.`)}})(window.name,\"of-frame\");if(e)try{const{name:t,uuid:n,brokerUrl:i,providerId:r,contextGroup:o}=e;return Fo(i,\"brokerUrl\"),Fo(n,\"uuid\"),Fo(t,\"name\"),{identity:{name:t,uuid:n},brokerUrl:i,interopConfig:{providerId:r,currentContextGroup:o}}}catch(e){throw new Error(`Unexpected error occurred when inferring platform information: ${e.stack}`)}},Jo=()=>{const e=r.v4();return{uuid:e,name:e}},Yo=async e=>{if(\"enabled\"===e.connectionInheritance){const t=await(async e=>{const t=qo();if(t){const{validateOptions:n=(()=>!0)}=e,{identity:i,...r}=t;if(!await n(r))throw new Error(\"Parent options were rejected by validateOptions.\");return t}})(e);if(t)return t}if(!e.options){const t=\"enabled\"===e.connectionInheritance?\"Broker URL was not specified nor provided by a platform container.\":\"Connection inheritance is disabled but no options were provided.\";throw new Error(t)}return{...e.options,identity:Jo()}};exports.__classPrivateFieldGet=Lo,exports.__classPrivateFieldSet=To,exports.apiExposer=Gn,exports.commonjsGlobal=s,exports.connect=async t=>{try{Ro.log(\"Establishing connection\",t);const{brokerUrl:n,identity:i,timeout:r,interopConfig:s}=await Yo(t),{workerPort:a,iframeBrokerPort:c}=await(async(e,t,n)=>{const{origin:i}=new URL(e),r=document.createElement(\"IFRAME\");let s;r.style.display=\"none\";try{return await new Promise(((a,c)=>{const d=e=>{if(e.source===r.contentWindow&&e.data?.topic===`ack-${jo}`){if(e.origin!==i)c(new Error(`Broker redirected to unexpected origin ${e.origin}, expected ${i}.`));else if(e.data.success){const[t,n]=e.ports;a({iframeBrokerPort:t,workerPort:n})}else c(new m(e.data));window.removeEventListener(\"message\",d),clearTimeout(s)}};window.addEventListener(\"message\",d),ko.log(`Connecting to broker ${e}`),r.setAttribute(\"src\",e),r.setAttribute(\"name\",o(t,\"of-broker\")),document.body.appendChild(r),ko.log(\"Iframe loaded, awaiting init message from iframe\"),n&&(s=setTimeout((()=>{window.removeEventListener(\"message\",d),document.body.removeChild(r),c(new Error(\"Worker did not initialize in time\"))}),n))}))}catch(e){throw new Error(`Failed to initialise Fin Web Client. ${e.message}`,{cause:e})}})(n,i,r);Ro.log(\"Successfully established connection to shared worker\");const d={entityType:\"external connection\",...i};a.start(),c.start();const h=((t,n,i)=>{const r=$o(n),o=new Ko(t),s=new Io(r,o,i);return s.connectSync(),window.Buffer=e.Buffer,new Wr(s)})(t,a,d);return s?.providerId&&(h.me.interop=h.Interop.connectSync(s.providerId),s?.currentContextGroup&&h.me.interop.joinContextGroup(s.currentContextGroup).catch((e=>{console.warn(`Error joining specified context group: ${s?.currentContextGroup}, continuing`,e)}))),{...h,me:{...h.me,identity:{uuid:h.me.uuid,name:h.me.name}}}}catch(e){throw new Error(`An error occured during web-interop connection: ${e.message}`)}},exports.decorators=Nn,exports.encodeOptions=o,exports.layout_constants=ai,exports.lazy=G;\n","\"use strict\";var t=require(\"./main-8cad4070.js\"),e=require(\"uuid\");require(\"buffer/\"),require(\"events\"),require(\"lodash/cloneDeep\"),require(\"lodash/isEqual\");var i={},n={};Object.defineProperty(n,\"__esModule\",{value:!0}),n.mapValuesAsync=n.mapEntriesAsync=void 0;const o=(t,[e,i])=>({...t,[e]:i});async function s(t,e){return(await Promise.all(e.map((async([e,i])=>[e,await t(i,e)])))).reduce(o,{})}n.mapEntriesAsync=s,n.mapValuesAsync=async function(t,e){let i;return i=e instanceof Map?[...e.entries()]:Object.entries(e),s(t,i)};var r,a,l,h,d=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldSet||function(t,e,i,n,o){if(\"m\"===n)throw new TypeError(\"Private method is not writable\");if(\"a\"===n&&!o)throw new TypeError(\"Private accessor was defined without a setter\");if(\"function\"==typeof e?t!==e||!o:!e.has(t))throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");return\"a\"===n?o.call(t,i):o?o.value=i:e.set(t,i),i},c=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldGet||function(t,e,i,n){if(\"a\"===i&&!n)throw new TypeError(\"Private accessor was defined without a getter\");if(\"function\"==typeof e?t!==e||!n:!e.has(t))throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");return\"m\"===i?n:\"a\"===i?n.call(t):n?n.value:e.get(t)};Object.defineProperty(i,\"__esModule\",{value:!0});var m=i.DefaultLayoutManager=void 0;const u=n;class p{constructor(t){a.set(this,void 0),l.set(this,new Map),d(this,a,t,\"f\")}size(){return c(this,l,\"f\").size}async applyLayoutSnapshot({layouts:t}){if(Object.keys(t).length>1)throw new Error(\"[LayoutManager] Tried to call applyLayoutSnapshot with more than 1 layout. When implementing multiple layouts via overridden LayoutManager class, you must override and fully implement the applyLayoutSnapshot method without calling super.applyLayoutSnapshot().\");const[[e,i]]=Object.entries(t);await p.createLayout(this,{layoutName:e,layout:i})}async showLayout({layoutName:t}){}async getLayoutSnapshot(){return{layouts:await(0,u.mapValuesAsync)((t=>t.getFrameSnapshot()),c(this,l,\"f\"))}}async removeLayout({layoutName:t}){}getLayoutIdentityForView(t){const e=[...c(this,l,\"f\").values()].find((e=>e.getCurrentViews().some((e=>e.name===t.name&&e.uuid===t.uuid))));return e?.identity??void 0}isLayoutVisible({layoutName:t}){return c(p,r,\"m\",h).call(p,this,t).isVisible()}resolveLayoutIdentity(t){if(t&&\"layoutName\"in t)return t;const e=[...c(this,l,\"f\").values()];if(1===e.length)return e[0].identity;const i=e.find((t=>t.isVisible()));return i?.identity??void 0}static async resolveLayout(t,e){const i=t.resolveLayoutIdentity(e);if(void 0===i||!(\"layoutName\"in i))throw new Error(\"[layout-manager] resolveLayout: Could not resolve the layout identity. Make sure you include 'layoutName' in the identity object.\");return c(p,r,\"m\",h).call(p,t,i.layoutName)}static async handleSharedView(t,e,i){await(0,u.mapValuesAsync)((async t=>{if(t.identity.layoutName!==e.layoutName){const e=t.getCurrentViews().find((t=>t.name===i.name));e&&await t.onViewDetached({viewIdentity:e,target:null}).catch(console.error)}}),c(t,l,\"f\"))}static async handleLastViewRemoved(t,e){await t.removeLayout(e),await c(t,a,\"f\").handleLastViewRemoved(t)}static async destroyLayout(t,{layoutName:e}){await c(p,r,\"m\",h).call(p,t,e).destroy(),c(t,l,\"f\").delete(e)}static async createLayout(t,e){const{layoutName:i}=e;if(c(t,l,\"f\").has(i))throw new Error(`Layout name ${i} already exists`);await c(t,a,\"f\").createLayout(e,t)}static registerLayout(t,e,i){c(t,l,\"f\").set(e,i)}static getAllLayouts(t){return[...c(t,l,\"f\").values()]}static setInitialSnapshot(t,e){c(t,a,\"f\").setInitialSnapshot(e)}static createClosedConstructor(...t){return class extends p{constructor(){super(...t)}}}}m=i.DefaultLayoutManager=p,r=p,a=new WeakMap,l=new WeakMap,h=function(t,e){const i=c(t,l,\"f\").get(e);if(!i)throw new Error(`[layout-manager] getLayoutByName: Could not locate layout with name '${e}'`);return i};var g={},f={},v={};Object.defineProperty(v,\"__esModule\",{value:!0}),v.ReversibleMap=void 0;v.ReversibleMap=class{constructor(){this.valueToKey=new Map,this.keyToValue=new Map,this.setUnique=(t,e)=>{if(this.hasKey(t)||this.hasValue(e))throw new Error(\"Key or value already in the map.\");this.keyToValue.set(t,e),this.valueToKey.set(e,t)},this.getKey=t=>{const e=this.valueToKey.get(t);if(!e)throw new Error(\"Value not found in the map.\");return e},this.deleteKey=t=>{const e=this.getValue(t);return this.keyToValue.delete(t),this.valueToKey.delete(e),e},this.deleteValue=t=>{const e=this.getKey(t);return this.keyToValue.delete(e),this.valueToKey.delete(t),e},this.hasKey=t=>this.keyToValue.has(t),this.hasValue=t=>this.valueToKey.has(t)}getValue(t){const e=this.keyToValue.get(t);if(!e)throw new Error(\"Key not found in the map.\");return e}},Object.defineProperty(f,\"__esModule\",{value:!0});var _=f.LayoutContentCache=void 0;const y=t.lazy,C=v;class w{constructor(){this.contentItemCache=new C.ReversibleMap,this.contentItemCacheId=0,this.createCacheKey=()=>{const t=`entity-${this.contentItemCacheId.toString()}`;return this.contentItemCacheId+=1,t},this.hasKey=t=>this.contentItemCache.hasKey(t),this.getItemOrUndefined=t=>{try{return this.getContentItemOrThrow(t)}catch(t){return}},this.getContentItemOrThrow=(t,e)=>{if(!this.contentItemCache.hasKey(t))throw new Error(\"Layout component has been destroyed or detached from the current layout.\");const i=this.contentItemCache.getValue(t);if(e&&!e.includes(i.type))throw new Error(`Layout item is not the expected type. Expected ${e.join(\", \")}, got ${i.type}.`);return i},this.getOrCreateEntityId=t=>{if(this.contentItemCache.hasValue(t))return this.contentItemCache.getKey(t);t.onDestroyed((()=>{this.contentItemCache.deleteValue(t)}));const e=this.createCacheKey();return this.contentItemCache.setUnique(e,t),e}}static getSingleInstance(){return w.singleton.getValue()}}_=f.LayoutContentCache=w,w.singleton=new y.Lazy((()=>new w));var I={},b={};!function(t){Object.defineProperty(t,\"__esModule\",{value:!0}),t.getAdjacentStacks=t.doShareEdge=t.getAdjacentItem=void 0;t.getAdjacentItem=(e,i)=>{const{parent:n}=e;if(e.isRoot()||!n)return;const o=[\"top\",\"bottom\"].includes(i)?\"column\":\"row\",s=[\"top\",\"left\"].includes(i)?-1:1;if(n.type===o){const t=n.contentItems.indexOf(e)+s;if(t>=0&&t{const n=t.getBounds(),o=e.getBounds();if(!n||!o)return!1;if([\"top\",\"bottom\"].includes(i)){return!(n.righto.right)}return!(n.bottomo.bottom)};t.getAdjacentStacks=(e,i)=>{const n=[\"top\",\"bottom\"].includes(i)?\"row\":\"column\",o=s=>\"stack\"===s.type?(0,t.doShareEdge)(e,s,i)?[s]:[]:\"root\"===s.type||\"ground\"===s.type?[]:s.type===n?s.contentItems.map((t=>o(t))).flat():s.type!==n?[\"top\",\"right\"].includes(i)?o(s.contentItems[s.contentItems.length-1]):o(s.contentItems[0]):[],s=(0,t.getAdjacentItem)(e,i);return s?o(s):[]}}(b);var S=t.commonjsGlobal&&t.commonjsGlobal.__decorate||function(t,e,i,n){var o,s=arguments.length,r=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if(\"object\"==typeof Reflect&&\"function\"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(s<3?o(r):s>3?o(e,i,r):o(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};Object.defineProperty(I,\"__esModule\",{value:!0}),I.LayoutEntitiesController=void 0;const E=t.decorators,x=b,L=i;class z{constructor(t,e,i){this.wire=t,this.layoutManager=e,this.layoutContentCache=i,this.analytics=t=>{this.wire.sendAction(`layout-controller-${t}`).catch((()=>{}))},this.getLayoutIdentityForViewOrThrow=async t=>{const e=this.layoutManager.getLayoutIdentityForView(t);if(!e)throw new Error(`View identity ${t.name} is not attached to any layouts.`);return e},this.getRoot=async t=>{this.analytics(\"get-root\");const e=(await this.getLayout(t)).getRoot();return{type:e.type,entityId:this.layoutContentCache.getOrCreateEntityId(e)}},this.getStackByView=async t=>{this.analytics(\"get-stack-by-view\");const e=await this.getLayoutIdentityForViewOrThrow(t),i=(await this.getLayout(e)).getStackByView(t);if(\"stack\"===i?.type)return{entityId:this.layoutContentCache.getOrCreateEntityId(i),type:\"stack\"}},this.getStackViews=t=>{this.analytics(\"get-stack-views\");return this.layoutContentCache.getContentItemOrThrow(t,[\"stack\"]).contentItems.map((t=>({name:t.viewName,uuid:this.wire.me.uuid})))},this.isRoot=t=>{this.analytics(\"is-root\");return this.layoutContentCache.getContentItemOrThrow(t).isRoot()},this.exists=t=>(this.analytics(\"exists\"),this.layoutContentCache.hasKey(t)),this.addViewToStack=async(t,e,{index:i}={index:0})=>{this.analytics(\"add-view-to-stack\");const n=this.layoutContentCache.getContentItemOrThrow(t);if(i&&i>n.contentItems.length+1)throw new Error(`Index '${i}' out of range, please exclude the index or specify a number between 0 and ${n.contentItems.length}`);const o={id:t,index:i},{identity:s}=await n.layout.platformCreateView(e,{location:o});return s},this.findViewInStack=(t,e)=>t.contentItems.find((t=>t.viewName===e.name)),this.removeViewFromStack=async(t,e)=>{this.analytics(\"remove-view-from-stack\");const i=this.layoutContentCache.getContentItemOrThrow(t,[\"stack\"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to remove a view ('${e.name}') which does not belong to the stack.`);await n.layout.platformCloseView(e)},this.createAdjacentStack=async(t,e,{position:i=\"right\"}={})=>{if(this.analytics(\"create-adjacent-stack\"),!Array.isArray(e)||0===e.length)throw new Error('The parameter \"views\" must be an array with at least 1 element.');if(![\"top\",\"bottom\",\"left\",\"right\"].includes(i))throw new Error(`Invalid position '${i}' specified.`);const n=this.layoutContentCache.getContentItemOrThrow(t).createAdjacentStack({position:i}),o=this.layoutContentCache.getOrCreateEntityId(n);return await Promise.all(e.reverse().map((t=>this.addViewToStack(o,t)))),o},this.getAdjacentStacks=async({targetId:t,edge:e})=>{this.analytics(\"get-adjacent-stacks\");const i=this.layoutContentCache.getContentItemOrThrow(t);return(0,x.getAdjacentStacks)(i,e).map((t=>({entityId:this.layoutContentCache.getOrCreateEntityId(t)})))},this.setStackActiveView=async(t,e)=>{this.analytics(\"set-stack-active-view\");const i=this.layoutContentCache.getContentItemOrThrow(t,[\"stack\"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to set a view ('${e.name}') as active when it does not belong to the stack.`);i.setActiveContentItem(n,!0)}}async getLayout(t){const e=await L.DefaultLayoutManager.resolveLayout(this.layoutManager,t);if(!e)throw new Error(`Could not resolve target layout identity ${JSON.stringify(t)}`);return e}getContent(t){this.analytics(\"get-content\");return this.layoutContentCache.getContentItemOrThrow(t,[\"column\",\"row\"]).contentItems.map((t=>({type:t.type,entityId:this.layoutContentCache.getOrCreateEntityId(t)})))}getParent(t){this.analytics(\"get-parent\");const e=this.layoutContentCache.getContentItemOrThrow(t);if(!e.isRoot())return e.parent?.contentItems.includes(e)?{type:e.parent.type,entityId:this.layoutContentCache.getOrCreateEntityId(e.parent)}:void 0}}S([(0,E.expose)()],z.prototype,\"getLayoutIdentityForViewOrThrow\",void 0),S([(0,E.expose)()],z.prototype,\"getRoot\",void 0),S([(0,E.expose)()],z.prototype,\"getStackByView\",void 0),S([(0,E.expose)()],z.prototype,\"getStackViews\",void 0),S([(0,E.expose)()],z.prototype,\"getContent\",null),S([(0,E.expose)()],z.prototype,\"getParent\",null),S([(0,E.expose)()],z.prototype,\"isRoot\",void 0),S([(0,E.expose)()],z.prototype,\"exists\",void 0),S([(0,E.expose)()],z.prototype,\"addViewToStack\",void 0),S([(0,E.expose)()],z.prototype,\"removeViewFromStack\",void 0),S([(0,E.expose)()],z.prototype,\"createAdjacentStack\",void 0),S([(0,E.expose)()],z.prototype,\"getAdjacentStacks\",void 0),S([(0,E.expose)()],z.prototype,\"setStackActiveView\",void 0),I.LayoutEntitiesController=z,Object.defineProperty(g,\"__esModule\",{value:!0});var M=g.initLayoutEndpoints=void 0;const P=t.apiExposer,T=t.layout_constants,A=f,k=I,D=i;M=g.initLayoutEndpoints=async function(t,e){const i=t.getFin(),n=await i.Platform.getCurrentSync().getClient(),o=new P.ChannelsExposer(n);await new P.ApiExposer(o).exposeInstance(new k.LayoutEntitiesController(t,e,A.LayoutContentCache.getSingleInstance()),{id:T.LAYOUT_CONTROLLER_ID}),await async function(t,e){const i=t=>async i=>{const n=await D.DefaultLayoutManager.resolveLayout(e,i.target);if(!n)throw new Error(`Could not resolve the layout target from payload ${JSON.stringify(i)}`);return t(n,i)},n=(e,n)=>{t.register(e,i(n))},o=(t,e)=>{n(t,e)};n(\"replace-view\",((t,e)=>t.replaceView(e))),n(\"replace-layout\",((t,{layout:e})=>t.replaceLayout(e))),n(\"add-view\",((t,e)=>t.insertView(e))),o(\"layout-add-view\",((t,{viewOptions:e,location:i,targetView:n})=>t.platformCreateView(e,{location:i,targetView:n}))),n(\"close-view\",((t,e)=>t.cleanupView(e.viewIdentity))),o(\"layout-close-view\",((t,e)=>t.platformCloseView(e.viewIdentity))),n(\"apply-preset-layout\",((t,e)=>t.applyPreset(e))),n(\"get-layout-views\",(t=>t.getCurrentViews())),n(\"get-frame-snapshot\",(t=>t.getFrameSnapshot())),n(\"is-visible\",(t=>t.isVisible())),n(\"destroy\",(t=>t.destroy())),t.register(\"get-layout-snapshot\",(()=>e.getLayoutSnapshot()))}(n,e)};var R={};Object.defineProperty(R,\"__esModule\",{value:!0});var U=R.BaseLayout=void 0;U=R.BaseLayout=class{};var O={};Object.defineProperty(O,\"__esModule\",{value:!0});var V=O.DOMEmitter=void 0;V=O.DOMEmitter=class{constructor(t){this.container=t}dispatchLocalEvent(t,e){const i={...e,type:t,tabSelector:`tab-${e.name}`,containerSelector:`container-${e.name}`,topic:\"openfin-DOM-event\"};this.container.dispatchEvent(new CustomEvent(t,{detail:i}))}};var B={};Object.defineProperty(B,\"__esModule\",{value:!0});var H=B.mapLayoutContentItemsImmutableSync=B.mapLayoutContentItemsImmutable=W=B.isVisible=void 0;var W=B.isVisible=t=>(0!==t.offsetWidth||0!==t.offsetHeight)&&\"hidden\"!==window.getComputedStyle(t).visibility&&t.offsetTop>=0&&t.offsetLeft>=0&&t.offsetTop<=window.innerHeight&&t.offsetLeft<=window.innerWidth;const F=t=>\"type\"in t&&\"component\"===t.type;B.mapLayoutContentItemsImmutable=async function t(e,i){return F(i)?e(i):{...i,content:await Promise.all(i.content?.map((i=>t(e,i))))}},H=B.mapLayoutContentItemsImmutableSync=function t(e,i){return F(i)?e(i):{...i,content:i.content?.map((i=>t(e,i)))}};class N extends Error{constructor(t,e){super(e),this.type=t}}class G extends N{constructor(t,e){super(\"Configuration\",t),this.node=e}}class j extends N{constructor(t){super(\"PopoutBlocked\",t)}}class $ extends N{constructor(t){super(\"API\",t)}}class Z extends N{constructor(t){super(\"Bind\",t)}}class q extends Error{constructor(t,e,i){super(`${t}: ${e}${void 0===i?\"\":\": \"+i}`)}}class X extends q{constructor(t,e){super(\"Assert\",t,e)}}class Y extends q{constructor(t,e,i){super(\"UnreachableCase\",t,`${e}${void 0===i?\"\":\": \"+i}`)}}class K extends q{constructor(t,e){super(\"UnexpectedNull\",t,e)}}class J extends q{constructor(t,e){super(\"UnexpectedUndefined\",t,e)}}var Q;!function(t){let e=!1;const i={PopoutCannotBeCreatedWithGroundItemConfig:{id:0,default:\"Popout cannot be created with ground ItemConfig\"},PleaseRegisterAConstructorFunction:{id:1,default:\"Please register a constructor function\"},ComponentTypeNotRegisteredAndBindComponentEventHandlerNotAssigned:{id:2,default:\"Component type not registered and BindComponentEvent handler not assigned\"},ComponentIsAlreadyRegistered:{id:3,default:\"Component is already registered\"},ComponentIsNotVirtuable:{id:4,default:\"Component is not virtuable. Requires rootHtmlElement field/getter\"},VirtualComponentDoesNotHaveRootHtmlElement:{id:5,default:'Virtual component does not have getter \"rootHtmlElement\"'},ItemConfigIsNotTypeComponent:{id:6,default:\"ItemConfig is not of type component\"},InvalidNumberPartInSizeString:{id:7,default:\"Invalid number part in size string\"},UnknownUnitInSizeString:{id:8,default:\"Unknown unit in size string\"},UnsupportedUnitInSizeString:{id:9,default:\"Unsupported unit in size string\"}};t.idCount=Object.keys(i).length;const n=Object.values(i);t.checkInitialise=function(){if(!e)for(let e=0;e=\"0\"&&t<=\"9\"}function Tt(t,e){const i=zt(e);t.style.width=i}function At(t,e){const i=zt(e);t.style.height=i}function kt(t){return{width:t.offsetWidth,height:t.offsetHeight}}function Dt(t,e){t.style.display=e?\"\":\"none\"}function Rt(t,e){if(void 0!==e)for(const i in e)if(e.hasOwnProperty(i)){const n=e[i],o=t[i];t[i]=Ut(o,n)}return t}function Ut(t,e){if(\"object\"!=typeof e)return e;if(Array.isArray(e)){const t=e.length,i=new Array(t);for(let n=0;n36)throw new Error(\"Too many keys in config minifier map\")},t.translateObject=n}(dt||(dt={})),function(t){t.defaults={type:at.ground,content:[],size:1,sizeUnit:ht.Fractional,minSize:void 0,minSizeUnit:ht.Pixel,id:\"\",isClosable:!0},t.createCopy=function(t,e){switch(t.type){case at.ground:case at.row:case at.column:return gt.createCopy(t,e);case at.stack:return ut.createCopy(t,e);case at.component:return pt.createCopy(t);default:throw new Y(\"CICC91354\",t.type,\"Invalid Config Item type specified\")}},t.createDefault=function(t){switch(t){case at.ground:throw new X(\"CICCDR91562\");case at.row:case at.column:return gt.createDefault(t);case at.stack:return ut.createDefault();case at.component:return pt.createDefault();default:throw new Y(\"CICCDD91563\",t,\"Invalid Config Item type specified\")}},t.isComponentItem=function(t){return t.type===at.component},t.isStackItem=function(t){return t.type===at.stack},t.isGroundItem=function(t){return t.type===at.ground}}(ct||(ct={})),function(t){t.defaultMaximised=!1,function(t){t.createCopy=function(t,e){return void 0===t?void 0:{show:null!=e?e:t.show,popout:t.popout,close:t.close,maximise:t.maximise,minimise:t.minimise,tabDropdown:t.tabDropdown}}}(t.Header||(t.Header={}))}(mt||(mt={})),function(t){function e(t){const e=t.length,i=new Array(e);for(let n=0;n\"__glMaximised\"===t));t>0&&(o=!0,n=n.splice(t,1)),e=n.length>0?n[0]:ct.defaults.id}else e=n;return i=void 0!==t.maximised?t.maximised:o,{id:e,maximised:i}}}(wt||(wt={})),function(t){function e(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0;return{resolved:!0,root:Et.resolve(i),openPopouts:t.resolveOpenPopouts(e.openPopouts),dimensions:t.Dimensions.resolve(e.dimensions),settings:t.Settings.resolve(e.settings),header:t.Header.resolve(e.header,e.settings,e.labels)}}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:Lt.fromResolvedArray(e.openPopouts),settings:_t.Settings.createCopy(e.settings),dimensions:t.Dimensions.fromResolved(e.dimensions),header:_t.Header.createCopy(e.header)}},t.isResolved=function(t){const e=t;return void 0!==e.resolved&&!0===e.resolved},t.resolveOpenPopouts=function(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0,{root:Et.resolve(o),openPopouts:xt.resolveOpenPopouts(e.openPopouts),dimensions:xt.Dimensions.resolve(e.dimensions),settings:xt.Settings.resolve(e.settings),header:xt.Header.resolve(e.header,e.settings,e.labels),parentId:null!==(i=e.parentId)&&void 0!==i?i:null,indexInParent:null!==(n=e.indexInParent)&&void 0!==n?n:null,window:t.Window.resolve(e.window,e.dimensions),resolved:!0}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:i(e.openPopouts),dimensions:xt.Dimensions.fromResolved(e.dimensions),settings:_t.Settings.createCopy(e.settings),header:_t.Header.createCopy(e.header),parentId:e.parentId,indexInParent:e.indexInParent,window:t.Window.fromResolved(e.window)}},t.fromResolvedArray=i}(Lt||(Lt={}));class Wt{constructor(){this._allEventSubscriptions=[],this._subscriptionsMap=new Map,this.unbind=this.removeEventListener,this.trigger=this.emit}tryBubbleEvent(t,e){}emit(t,...e){let i=this._subscriptionsMap.get(t);if(void 0!==i){i=i.slice();for(let t=0;t0){const n=e.slice();n.unshift(t);const o=this._allEventSubscriptions.slice();for(let t=0;t0?n.contentItems[0]:n,e=0);const o=this._layoutManager.createAndInitContentItem(i,t);t.addChild(o,e),this._layoutManager.layoutConfig.settings.popInOnClose?this._onClose():this.close()}createWindow(){const t=this.createUrl(),e=Math.floor(1e6*Math.random()).toString(36),i=this.serializeWindowFeatures({width:this._initialWindowSize.width,height:this._initialWindowSize.height,innerWidth:this._initialWindowSize.width,innerHeight:this._initialWindowSize.height,menubar:\"no\",toolbar:\"no\",location:\"no\",personalbar:\"no\",resizable:\"yes\",scrollbars:\"no\",status:\"no\"});if(this._popoutWindow=globalThis.open(t,e,i),this._popoutWindow)this._popoutWindow.addEventListener(\"load\",(()=>this.positionWindow()),{passive:!0}),this._popoutWindow.addEventListener(\"beforeunload\",(()=>{this._layoutManager.layoutConfig.settings.popInOnClose?this.popIn():this._onClose()}),{passive:!0}),this._checkReadyInterval=setInterval((()=>this.checkReady()),10);else if(!0===this._layoutManager.layoutConfig.settings.blockedPopoutsThrowError){throw new j(\"Popout blocked\")}}checkReady(){if(null===this._popoutWindow)throw new K(\"BPCR01844\");this._popoutWindow.__glInstance&&this._popoutWindow.__glInstance.isInitialised&&(this.onInitialised(),void 0!==this._checkReadyInterval&&(clearInterval(this._checkReadyInterval),this._checkReadyInterval=void 0))}serializeWindowFeatures(t){const e=[];for(const i in t)e.push(i+\"=\"+t[i].toString());return e.join(\",\")}createUrl(){const t=\"gl-window-config-\"+Ot(),e=_t.minifyConfig(this._config);try{localStorage.setItem(t,JSON.stringify(e))}catch(t){throw new Error(\"Error while writing to localStorage \"+function(t){return t instanceof Error?t.message:\"string\"==typeof t?t:\"Unknown Error\"}(t))}const i=new URL(location.href);return i.searchParams.set(\"gl-window\",t),i.toString()}positionWindow(){if(null===this._popoutWindow)throw new Error(\"BrowserPopout.positionWindow: null popoutWindow\");this._popoutWindow.moveTo(this._initialWindowSize.left,this._initialWindowSize.top),this._popoutWindow.focus()}onInitialised(){this._isInitialised=!0,this.getGlInstance().on(\"popIn\",(()=>this.popIn())),this.emit(\"initialised\")}_onClose(){setTimeout((()=>this.emit(\"closed\")),50)}}class Gt extends Wt{constructor(t,e,i,n){super(),this.layoutManager=t,this._parent=i,this._element=n,this._popInParentIds=[],this._type=e.type,this._id=e.id,this._isInitialised=!1,this.isGround=!1,this.isRow=!1,this.isColumn=!1,this.isStack=!1,this.isComponent=!1,this.size=e.size,this.sizeUnit=e.sizeUnit,this.minSize=e.minSize,this.minSizeUnit=e.minSizeUnit,this._isClosable=e.isClosable,this._pendingEventPropagations={},this._throttledEvents=[\"stateChanged\"],this._contentItems=this.createContentItems(e.content)}get type(){return this._type}get id(){return this._id}set id(t){this._id=t}get popInParentIds(){return this._popInParentIds}get parent(){return this._parent}get contentItems(){return this._contentItems}get isClosable(){return this._isClosable}get element(){return this._element}get isInitialised(){return this._isInitialised}static isStack(t){return t.isStack}static isComponentItem(t){return t.isComponent}static isComponentParentableItem(t){return t.isStack||t.isGround}removeChild(t,e=!1){const i=this._contentItems.indexOf(t);if(-1===i)throw new Error(\"Can't remove child item. Unknown content item\");if(e||this._contentItems[i].destroy(),this._contentItems.splice(i,1),this._contentItems.length>0)this.updateSize(!1);else if(!this.isGround&&!0===this._isClosable){if(null===this._parent)throw new K(\"CIUC00874\");this._parent.removeChild(this)}}addChild(t,e,i){return null!=e||(e=this._contentItems.length),this._contentItems.splice(e,0,t),t.setParent(this),!0===this._isInitialised&&!1===t._isInitialised&&t.init(),e}replaceChild(t,e,i=!1){const n=this._contentItems.indexOf(t),o=t._element.parentNode;if(-1===n)throw new X(\"CIRCI23232\",\"Can't replace child. oldChild is not child of this\");if(null===o)throw new K(\"CIRCP23232\");if(o.replaceChild(e._element,t._element),!0===i&&(t._parent=null,t.destroy()),this._contentItems[n]=e,e.setParent(this),e.size=t.size,e.sizeUnit=t.sizeUnit,e.minSize=t.minSize,e.minSizeUnit=t.minSizeUnit,null===e._parent)throw new K(\"CIRCNC45699\");!0===e._parent._isInitialised&&!1===e._isInitialised&&e.init(),this.updateSize(!1)}remove(){if(null===this._parent)throw new K(\"CIR11110\");this._parent.removeChild(this)}popout(){const t=Ot(),e=this.layoutManager.createPopoutFromContentItem(this,void 0,t,void 0);return this.emitBaseBubblingEvent(\"stateChanged\"),e}calculateConfigContent(){const t=this._contentItems,e=t.length,i=new Array(e);for(let n=0;nthis.propagateEventToLayoutManager(t,e))))}propagateEventToLayoutManager(t,e){this._pendingEventPropagations[t]=!1,this.layoutManager.emitUnknown(t,e)}}class jt extends Gt{constructor(t,e,i){super(t,e,i,document.createElement(\"div\")),this._parentItem=i,this._focused=!1,this.isComponent=!0,this._reorderEnabled=e.reorderEnabled,this.applyUpdatableConfig(e),this._initialWantMaximise=e.maximised;const n=document.createElement(\"div\");n.classList.add(\"lm_content\"),this.element.appendChild(n),this._container=new Ft(e,this,t,n,(t=>this.handleUpdateItemConfigEvent(t)),(()=>this.show()),(()=>this.hide()),(t=>this.focus(t)),(t=>this.blur(t)))}get componentName(){return this._container.componentType}get componentType(){return this._container.componentType}get reorderEnabled(){return this._reorderEnabled}get initialWantMaximise(){return this._initialWantMaximise}get component(){return this._container.component}get container(){return this._container}get parentItem(){return this._parentItem}get headerConfig(){return this._headerConfig}get title(){return this._title}get tab(){return this._tab}get focused(){return this._focused}destroy(){this._container.destroy(),super.destroy()}applyUpdatableConfig(t){this.setTitle(t.title),this._headerConfig=t.header}toConfig(){const t=this._container.stateRequestEvent,e=void 0===t?this._container.state:t();return{type:at.component,content:[],size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,maximised:!1,isClosable:this.isClosable,reorderEnabled:this._reorderEnabled,title:this._title,header:mt.Header.createCopy(this._headerConfig),componentType:pt.copyComponentType(this.componentType),componentState:e}}close(){if(null===this.parent)throw new K(\"CIC68883\");this.parent.removeChild(this,!1)}enterDragMode(t,e){Tt(this.element,t),At(this.element,e),this._container.enterDragMode(t,e)}exitDragMode(){this._container.exitDragMode()}enterStackMaximised(){this._container.enterStackMaximised()}exitStackMaximised(){this._container.exitStackMaximised()}drag(){this._container.drag()}updateSize(t){this.updateNodeSize(t)}init(){this.updateNodeSize(!1),super.init(),this._container.emit(\"open\"),this.initContentItems()}setTitle(t){this._title=t,this.emit(\"titleChanged\",t),this.emit(\"stateChanged\")}setTab(t){this._tab=t,this.emit(\"tab\",t),this._container.setTab(t)}hide(){super.hide(),this._container.setVisibility(!1)}show(){super.show(),this._container.setVisibility(!0)}focus(t=!1){this.parentItem.setActiveComponentItem(this,!0,t)}setFocused(t){this._focused=!0,this.tab.setFocused(),t||this.emitBaseBubblingEvent(\"focus\")}blur(t=!1){this._focused&&this.layoutManager.setFocusedComponentItem(void 0,t)}setBlurred(t){this._focused=!1,this.tab.setBlurred(),t||this.emitBaseBubblingEvent(\"blur\")}setParent(t){this._parentItem=t,super.setParent(t)}handleUpdateItemConfigEvent(t){this.applyUpdatableConfig(t)}updateNodeSize(t){if(\"none\"!==this.element.style.display){const{width:e,height:i}=kt(this.element);this._container.setSizeToNodeSize(e,i,t)}}}class $t extends Gt{constructor(){super(...arguments),this._focused=!1}get focused(){return this._focused}setFocusedValue(t){this._focused=t}}class Zt extends Wt{constructor(t,e){super(),this._eElement=t,this._pointerTracking=!1,this._pointerDownEventListener=t=>this.onPointerDown(t),this._pointerMoveEventListener=t=>this.onPointerMove(t),this._pointerUpEventListener=t=>this.onPointerUp(t),this._timeout=void 0,this._allowableTargets=[t,...e],this._oDocument=document,this._eBody=document.body,this._nDelay=1800,this._nDistance=10,this._nX=0,this._nY=0,this._nOriginalX=0,this._nOriginalY=0,this._dragging=!1,this._eElement.addEventListener(\"pointerdown\",this._pointerDownEventListener,{passive:!0})}destroy(){this.checkRemovePointerTrackingEventListeners(),this._eElement.removeEventListener(\"pointerdown\",this._pointerDownEventListener)}cancelDrag(){this.processDragStop(void 0)}onPointerDown(t){if(this._allowableTargets.includes(t.target)&&t.isPrimary){const e=this.getPointerCoordinates(t);this.processPointerDown(e)}}processPointerDown(t){this._nOriginalX=t.x,this._nOriginalY=t.y,this._oDocument.addEventListener(\"pointermove\",this._pointerMoveEventListener),this._oDocument.addEventListener(\"pointerup\",this._pointerUpEventListener,{passive:!0}),this._pointerTracking=!0,this._timeout=setTimeout((()=>{try{this.startDrag()}catch(t){throw console.error(t),t}}),this._nDelay)}onPointerMove(t){this._pointerTracking&&(this.processDragMove(t),t.preventDefault())}processDragMove(t){this._nX=t.pageX-this._nOriginalX,this._nY=t.pageY-this._nOriginalY,!1===this._dragging&&(Math.abs(this._nX)>this._nDistance||Math.abs(this._nY)>this._nDistance)&&this.startDrag(),this._dragging&&this.emit(\"drag\",this._nX,this._nY,t)}onPointerUp(t){this.processDragStop(t)}processDragStop(t){var e;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this.checkRemovePointerTrackingEventListeners(),!0===this._dragging&&(this._eBody.classList.remove(\"lm_dragging\"),this._eElement.classList.remove(\"lm_dragging\"),null===(e=this._oDocument.querySelector(\"iframe\"))||void 0===e||e.style.setProperty(\"pointer-events\",\"\"),this._dragging=!1,this.emit(\"dragStop\",t))}checkRemovePointerTrackingEventListeners(){this._pointerTracking&&(this._oDocument.removeEventListener(\"pointermove\",this._pointerMoveEventListener),this._oDocument.removeEventListener(\"pointerup\",this._pointerUpEventListener),this._pointerTracking=!1)}startDrag(){var t;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this._dragging=!0,this._eBody.classList.add(\"lm_dragging\"),this._eElement.classList.add(\"lm_dragging\"),null===(t=this._oDocument.querySelector(\"iframe\"))||void 0===t||t.style.setProperty(\"pointer-events\",\"none\"),this.emit(\"dragStart\",this._nOriginalX,this._nOriginalY)}getPointerCoordinates(t){return{x:t.pageX,y:t.pageY}}}class qt{constructor(t,e,i){this._isVertical=t,this._size=e,this._grabSize=i0){const i=this.createSplitter(Math.max(0,e-1)).element;e>0?(this.contentItems[e-1].element.insertAdjacentElement(\"afterend\",i),i.insertAdjacentElement(\"afterend\",t.element)):(this.contentItems[0].element.insertAdjacentElement(\"beforebegin\",i),i.insertAdjacentElement(\"beforebegin\",t.element))}else this._childElementContainer.appendChild(t.element);super.addChild(t,e);const n=1/this.contentItems.length*100;if(!0===i)return this.emitBaseBubblingEvent(\"stateChanged\"),e;for(let e=0;e0&&(this.calculateRelativeSizes(),this.setAbsoluteSizes()),this.emitBaseBubblingEvent(\"stateChanged\"),this.emit(\"resize\")}setAbsoluteSizes(){const t=this.calculateAbsoluteSizes();for(let e=0;e0&&t.itemSizes[e]++,this._isColumn?(Tt(this.contentItems[e].element,t.crossAxisSize),At(this.contentItems[e].element,t.itemSizes[e])):(Tt(this.contentItems[e].element,t.itemSizes[e]),At(this.contentItems[e].element,t.crossAxisSize))}calculateAbsoluteSizes(){const t=(this.contentItems.length-1)*this._splitterSize,{width:e,height:i}=kt(this.element);let n,o;this._isColumn?(n=i-t,o=e):(n=e-t,o=i);let s=0;const r=[];for(let t=0;t0){const n=100-t;for(let t=0;t100&&e.length>0){for(let t=0;te)return;{const r=i/e;let a=i;for(let e=0;ethis.onSplitterDrag(e,t,i))),e.on(\"dragStop\",(()=>this.onSplitterDragStop(e))),e.on(\"dragStart\",(()=>this.onSplitterDragStart(e))),this._splitter.splice(t,0,e),e}getSplitItems(t){const e=this._splitter.indexOf(t);return{before:this.contentItems[e],after:this.contentItems[e+1]}}calculateContentItemMinSize(t){const e=t.minSize;if(void 0!==e){if(t.minSizeUnit===ht.Pixel)return e;throw new X(\"ROCGMD98831\",JSON.stringify(t))}{const t=this.layoutManager.layoutConfig.dimensions;return this._isColumn?t.defaultMinItemHeight:t.defaultMinItemWidth}}calculateContentItemsTotalMinSize(t){let e=0;for(const i of t)e+=this.calculateContentItemMinSize(i);return e}onSplitterDragStart(t){const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=this.calculateContentItemsTotalMinSize(e.before.contentItems),s=this.calculateContentItemsTotalMinSize(e.after.contentItems);this._splitterPosition=0,this._splitterMinPosition=-1*(i-o),this._splitterMaxPosition=n-s}onSplitterDrag(t,e,i){let n=this._isColumn?i:e;if(null===this._splitterMinPosition||null===this._splitterMaxPosition)throw new K(\"ROCOSD59226\");n=Math.max(n,this._splitterMinPosition),n=Math.min(n,this._splitterMaxPosition),this._splitterPosition=n;const o=zt(n);this._isColumn?t.element.style.top=o:t.element.style.left=o}onSplitterDragStop(t){if(null===this._splitterPosition)throw new K(\"ROCOSDS66932\");{const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=(this._splitterPosition+i)/(i+n),s=e.before.size+e.after.size;e.before.size=o*s,e.after.size=(1-o)*s,t.element.style.top=zt(0),t.element.style.left=zt(0),globalThis.requestAnimationFrame((()=>this.updateSize(!1)))}}}!function(t){t.getElementDimensionSize=function(t,e){return\"width\"===e?function(t){return t.offsetWidth}(t):function(t){return t.offsetHeight}(t)},t.setElementDimensionSize=function(t,e,i){return\"width\"===e?Tt(t,i):At(t,i)},t.createElement=function(t,e){const i=t.createElement(\"div\");return i.classList.add(\"lm_item\"),e?i.classList.add(\"lm_column\"):i.classList.add(\"lm_row\"),i}}(Xt||(Xt={}));class Yt extends $t{constructor(t,e,i){super(t,vt.create(e),null,Yt.createElement(document)),this.isGround=!0,this._childElementContainer=this.element,this._containerElement=i;let n=null;for(;;){const t=n?n.previousSibling:this._containerElement.lastChild;if(!(t instanceof Element&&t.classList.contains(\"lm_content\")))break;n=t}this._containerElement.insertBefore(this.element,n)}init(){if(!0!==this.isInitialised){this.updateNodeSize();for(let t=0;t0?this.contentItems[0]:this,n.isComponent)throw new Error(\"Cannot add item as child to ComponentItem\");{const t=this.layoutManager.createAndInitContentItem(i,n);return e=n.addChild(t,e),n===this?-1:e}}loadComponentAsRoot(t){this.clearRoot();const e=Ct.resolve(t,!1);if(e.maximised)throw new Error(\"Root Component cannot be maximised\");{const t=new jt(this.layoutManager,e,this);t.init(),this.addChild(t,0)}}addChild(t,e){if(this.contentItems.length>0)throw new Error(\"Ground node can only have a single child\");return this._childElementContainer.appendChild(t.element),e=super.addChild(t,e),this.updateSize(!1),this.emitBaseBubblingEvent(\"stateChanged\"),e}calculateConfigContent(){const t=this.contentItems,e=t.length,i=new Array(e);for(let n=0;n0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e)),this.updateContentItemsSize(!1))}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}createSideAreas(){const t=Yt.Area.oppositeSides,e=new Array(Object.keys(t).length);let i=0;for(const n in t){const o=n,s=this.getElementArea();if(null===s)throw new K(\"RCSA77553\");s.side=o,\"2\"===t[o][1]?s[o]=s[t[o]]-50:s[o]=s[t[o]]+50,s.surface=(s.x2-s.x1)*(s.y2-s.y1),e[i++]=s}return e}highlightDropZone(t,e,i){this.layoutManager.tabDropPlaceholder.remove(),super.highlightDropZone(t,e,i)}onDrop(t,e){if(t.isComponent){const e=ut.createDefault(),i=t;e.header=mt.Header.createCopy(i.headerConfig);const n=this.layoutManager.createAndInitContentItem(e,this);n.addChild(t),t=n}if(0===this.contentItems.length)this.addChild(t);else{if(t.type===at.row||t.type===at.column){const e=ut.createDefault(),i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}const i=\"x\"==e.side[0]?at.row:at.column,n=\"2\"==e.side[1],o=this.contentItems[0];if(o instanceof Xt&&o.type===i){const e=o.contentItems[n?0:o.contentItems.length-1];o.addChild(t,n?0:void 0,!0),e.size*=.5,t.size=e.size,t.sizeUnit=ht.Percent,o.updateSize(!1)}else{const e=ct.createDefault(i),s=this.layoutManager.createContentItem(e,this);this.replaceChild(o,s),s.addChild(t,n?0:void 0,!0),s.addChild(o,n?void 0:0,!0),o.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}}dock(){throw new X(\"GID87731\")}validateDocking(){throw new X(\"GIVD87732\")}getAllContentItems(){const t=[this];return this.deepGetAllContentItems(this.contentItems,t),t}getConfigMaximisedItems(){const t=[];return this.deepFilterContentItems(this.contentItems,t,(t=>!(!Gt.isStack(t)||!t.initialWantMaximise)||!(!Gt.isComponentItem(t)||!t.initialWantMaximise))),t}getItemsByPopInParentId(t){const e=[];return this.deepFilterContentItems(this.contentItems,e,(e=>e.popInParentIds.includes(t))),e}toConfig(){throw new Error(\"Cannot generate GroundItem config\")}setActiveComponentItem(t,e,i){}updateNodeSize(){const{width:t,height:e}=kt(this._containerElement);Tt(this.element,t),At(this.element,e),this.contentItems.length>0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e))}deepGetAllContentItems(t,e){for(let i=0;ithis.onClick(t),this._touchStartEventListener=t=>this.onTouchStart(t),this._element=document.createElement(\"div\"),this._element.classList.add(i),this._element.title=e,this._header.on(\"destroy\",(()=>this.destroy())),this._element.addEventListener(\"click\",this._clickEventListener,{passive:!0}),this._element.addEventListener(\"touchstart\",this._touchStartEventListener,{passive:!0}),this._header.controlsContainerElement.appendChild(this._element)}get element(){return this._element}destroy(){var t;this._element.removeEventListener(\"click\",this._clickEventListener),this._element.removeEventListener(\"touchstart\",this._touchStartEventListener),null===(t=this._element.parentNode)||void 0===t||t.removeChild(this._element)}onClick(t){this._pushEvent(t)}onTouchStart(t){this._pushEvent(t)}}class Jt{constructor(t,e,i,n,o){var s;this._layoutManager=t,this._componentItem=e,this._closeEvent=i,this._focusEvent=n,this._dragStartEvent=o,this._isActive=!1,this._tabClickListener=t=>this.onTabClickDown(t),this._tabTouchStartListener=t=>this.onTabTouchStart(t),this._closeClickListener=()=>this.onCloseClick(),this._closeTouchStartListener=()=>this.onCloseTouchStart(),this._dragStartListener=(t,e)=>this.onDragStart(t,e),this._contentItemDestroyListener=()=>this.onContentItemDestroy(),this._tabTitleChangedListener=t=>this.setTitle(t),this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_tab\"),this._titleElement=document.createElement(\"span\"),this._titleElement.classList.add(\"lm_title\"),this._closeElement=document.createElement(\"div\"),this._closeElement.classList.add(\"lm_close_tab\"),this._element.appendChild(this._titleElement),this._element.appendChild(this._closeElement),e.isClosable?this._closeElement.style.display=\"\":this._closeElement.style.display=\"none\",this.setTitle(e.title),this._componentItem.on(\"titleChanged\",this._tabTitleChangedListener);(null!==(s=e.reorderEnabled)&&void 0!==s?s:this._layoutManager.layoutConfig.settings.reorderEnabled)&&this.enableReorder(),this._element.addEventListener(\"click\",this._tabClickListener,{passive:!0}),this._element.addEventListener(\"touchstart\",this._tabTouchStartListener,{passive:!0}),this._componentItem.isClosable?(this._closeElement.addEventListener(\"click\",this._closeClickListener,{passive:!0}),this._closeElement.addEventListener(\"touchstart\",this._closeTouchStartListener,{passive:!0})):(this._closeElement.remove(),this._closeElement=void 0),this._componentItem.setTab(this),this._layoutManager.emit(\"tabCreated\",this)}get isActive(){return this._isActive}get componentItem(){return this._componentItem}get contentItem(){return this._componentItem}get element(){return this._element}get titleElement(){return this._titleElement}get closeElement(){return this._closeElement}get reorderEnabled(){return void 0!==this._dragListener}set reorderEnabled(t){t!==this.reorderEnabled&&(t?this.enableReorder():this.disableReorder())}setTitle(t){this._titleElement.innerText=t,this._element.title=t}setActive(t){t!==this._isActive&&(this._isActive=t,t?this._element.classList.add(\"lm_active\"):this._element.classList.remove(\"lm_active\"))}destroy(){var t,e;this._closeEvent=void 0,this._focusEvent=void 0,this._dragStartEvent=void 0,this._element.removeEventListener(\"click\",this._tabClickListener),this._element.removeEventListener(\"touchstart\",this._tabTouchStartListener),null===(t=this._closeElement)||void 0===t||t.removeEventListener(\"click\",this._closeClickListener),null===(e=this._closeElement)||void 0===e||e.removeEventListener(\"touchstart\",this._closeTouchStartListener),this._componentItem.off(\"titleChanged\",this._tabTitleChangedListener),this.reorderEnabled&&this.disableReorder(),this._element.remove()}setBlurred(){this._element.classList.remove(\"lm_focused\"),this._titleElement.classList.remove(\"lm_focused\")}setFocused(){this._element.classList.add(\"lm_focused\"),this._titleElement.classList.add(\"lm_focused\")}onDragStart(t,e){if(void 0===this._dragListener)throw new J(\"TODSDLU10093\");if(void 0===this._dragStartEvent)throw new J(\"TODS23309\");this._dragStartEvent(t,e,this._dragListener,this.componentItem)}onContentItemDestroy(){void 0!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=void 0)}onTabClickDown(t){const e=t.target;e!==this._element&&e!==this._titleElement||(0===t.button?this.notifyFocus():1===t.button&&this._componentItem.isClosable&&this.notifyClose())}onTabTouchStart(t){t.target===this._element&&this.notifyFocus()}onCloseClick(){this.notifyClose()}onCloseTouchStart(){this.notifyClose()}notifyClose(){if(void 0===this._closeEvent)throw new J(\"TNC15007\");this._closeEvent(this._componentItem)}notifyFocus(){if(void 0===this._focusEvent)throw new J(\"TNA15007\");this._focusEvent(this._componentItem)}enableReorder(){this._dragListener=new Zt(this._element,[this._titleElement]),this._dragListener.on(\"dragStart\",this._dragStartListener),this._componentItem.on(\"destroy\",this._contentItemDestroyListener)}disableReorder(){if(void 0===this._dragListener)throw new J(\"TDR87745\");this._componentItem.off(\"destroy\",this._contentItemDestroyListener),this._dragListener.off(\"dragStart\",this._dragStartListener),this._dragListener=void 0}}class Qt{constructor(t,e,i,n,o){this._layoutManager=t,this._componentRemoveEvent=e,this._componentFocusEvent=i,this._componentDragStartEvent=n,this._dropdownActiveChangedEvent=o,this._tabs=[],this._lastVisibleTabIndex=-1,this._dropdownActive=!1,this._element=document.createElement(\"section\"),this._element.classList.add(\"lm_tabs\"),this._dropdownElement=document.createElement(\"section\"),this._dropdownElement.classList.add(\"lm_tabdropdown_list\"),this._dropdownElement.style.display=\"none\"}get tabs(){return this._tabs}get tabCount(){return this._tabs.length}get lastVisibleTabIndex(){return this._lastVisibleTabIndex}get element(){return this._element}get dropdownElement(){return this._dropdownElement}get dropdownActive(){return this._dropdownActive}destroy(){for(let t=0;tthis.handleTabCloseEvent(t)),(t=>this.handleTabFocusEvent(t)),((t,e,i,n)=>this.handleTabDragStartEvent(t,e,i,n)));void 0===e&&(e=this._tabs.length),this._tabs.splice(e,0,i),ethis._lastVisibleTabIndex){const t=this._tabs[e];for(let t=e;t>0;t--)this._tabs[t]=this._tabs[t-1];this._tabs[0]=t}}updateTabSizes(t,e){let i=!1;this.tryUpdateTabSizes(i,t,e)||(i=!0,this.tryUpdateTabSizes(i,t,e)),i!==this._dropdownActive&&(this._dropdownActive=i,this._dropdownActiveChangedEvent())}tryUpdateTabSizes(t,e,i){if(this._tabs.length>0){if(void 0===i)throw new Error(\"non-empty tabs must have active component item\");let n=0,o=!1;const s=this._layoutManager.layoutConfig.settings.tabOverlapAllowance,r=this._tabs.indexOf(i.tab),a=this._tabs[r];this._lastVisibleTabIndex=-1;for(let i=0;ie){if(o)i===r&&(l.style.zIndex=\"auto\",l.style.marginLeft=\"\",l.parentElement!==this._element&&this._element.appendChild(l));else{let t;if(t=r>0&&r<=i?(d-e)/(i-1):(d-e)/i,tthis.onClick(t),this._touchStartListener=t=>this.onTouchStart(t),this._rowColumnClosable=!0,this._closeButton=null,this._popoutButton=null,this._tabsContainer=new Qt(this._layoutManager,(t=>this.handleTabInitiatedComponentRemoveEvent(t)),(t=>this.handleTabInitiatedComponentFocusEvent(t)),((t,e,i,n)=>this.handleTabInitiatedDragStartEvent(t,e,i,n)),(()=>this.processTabDropdownActiveChanged())),this._show=i.show,this._popoutEnabled=i.popoutEnabled,this._popoutLabel=i.popoutLabel,this._maximiseEnabled=i.maximiseEnabled,this._maximiseLabel=i.maximiseLabel,this._minimiseEnabled=i.minimiseEnabled,this._minimiseLabel=i.minimiseLabel,this._closeEnabled=i.closeEnabled,this._closeLabel=i.closeLabel,this._tabDropdownEnabled=i.tabDropdownEnabled,this._tabDropdownLabel=i.tabDropdownLabel,this.setSide(i.side),this._canRemoveComponent=this._configClosable,this._element=document.createElement(\"section\"),this._element.classList.add(\"lm_header\"),this._controlsContainerElement=document.createElement(\"section\"),this._controlsContainerElement.classList.add(\"lm_controls\"),this._element.appendChild(this._tabsContainer.element),this._element.appendChild(this._controlsContainerElement),this._element.appendChild(this._tabsContainer.dropdownElement),this._element.addEventListener(\"click\",this._clickListener,{passive:!0}),this._element.addEventListener(\"touchstart\",this._touchStartListener,{passive:!0}),this._documentMouseUpListener=()=>this._tabsContainer.hideAdditionalTabsDropdown(),globalThis.document.addEventListener(\"mouseup\",this._documentMouseUpListener,{passive:!0}),this._tabControlOffset=this._layoutManager.layoutConfig.settings.tabControlOffset,this._tabDropdownEnabled&&(this._tabDropdownButton=new Kt(this,this._tabDropdownLabel,\"lm_tabdropdown\",(()=>this._tabsContainer.showAdditionalTabsDropdown()))),this._popoutEnabled&&(this._popoutButton=new Kt(this,this._popoutLabel,\"lm_popout\",(()=>this.handleButtonPopoutEvent()))),this._maximiseEnabled&&(this._maximiseButton=new Kt(this,this._maximiseLabel,\"lm_maximise\",(t=>this.handleButtonMaximiseToggleEvent(t)))),this._configClosable&&(this._closeButton=new Kt(this,this._closeLabel,\"lm_close\",(()=>s()))),this.processTabDropdownActiveChanged()}get show(){return this._show}get side(){return this._side}get leftRightSided(){return this._leftRightSided}get layoutManager(){return this._layoutManager}get parent(){return this._parent}get tabs(){return this._tabsContainer.tabs}get lastVisibleTabIndex(){return this._tabsContainer.lastVisibleTabIndex}get element(){return this._element}get tabsContainerElement(){return this._tabsContainer.element}get controlsContainerElement(){return this._controlsContainerElement}destroy(){this.emit(\"destroy\"),this._popoutEvent=void 0,this._maximiseToggleEvent=void 0,this._clickEvent=void 0,this._touchStartEvent=void 0,this._componentRemoveEvent=void 0,this._componentFocusEvent=void 0,this._componentDragStartEvent=void 0,this._tabsContainer.destroy(),globalThis.document.removeEventListener(\"mouseup\",this._documentMouseUpListener),this._element.remove()}createTab(t,e){this._tabsContainer.createTab(t,e)}removeTab(t){this._tabsContainer.removeTab(t)}processActiveComponentChanged(t){this._tabsContainer.processActiveComponentChanged(t),this.updateTabSizes()}setSide(t){this._side=t,this._leftRightSided=[nt.right,nt.left].includes(this._side)}setRowColumnClosable(t){this._rowColumnClosable=t,this.updateClosability()}updateClosability(){let t;if(this._configClosable)if(this._rowColumnClosable){t=!0;const e=this.tabs.length;for(let i=0;i1}applyFocusedValue(t){t?this._element.classList.add(\"lm_focused\"):this._element.classList.remove(\"lm_focused\")}processMaximised(){if(void 0===this._maximiseButton)throw new J(\"HPMAX16997\");this._maximiseButton.element.setAttribute(\"title\",this._minimiseLabel)}processMinimised(){if(void 0===this._maximiseButton)throw new J(\"HPMIN16997\");this._maximiseButton.element.setAttribute(\"title\",this._maximiseLabel)}updateTabSizes(){if(this._tabsContainer.tabCount>0){const t=this._show?this._layoutManager.layoutConfig.dimensions.headerHeight:0;let e;this._leftRightSided?(this._element.style.height=\"\",this._element.style.width=zt(t)):(this._element.style.width=\"\",this._element.style.height=zt(t)),e=this._leftRightSided?this._element.offsetHeight-this._controlsContainerElement.offsetHeight-this._tabControlOffset:this._element.offsetWidth-this._controlsContainerElement.offsetWidth-this._tabControlOffset,this._tabsContainer.updateTabSizes(e,this._getActiveComponentItemEvent())}}handleTabInitiatedComponentRemoveEvent(t){if(this._canRemoveComponent){if(void 0===this._componentRemoveEvent)throw new J(\"HHTCE22294\");this._componentRemoveEvent(t)}}handleTabInitiatedComponentFocusEvent(t){if(void 0===this._componentFocusEvent)throw new J(\"HHTAE22294\");this._componentFocusEvent(t)}handleTabInitiatedDragStartEvent(t,e,i,n){if(this._canRemoveComponent){if(void 0===this._componentDragStartEvent)throw new J(\"HHTDSE22294\");this._componentDragStartEvent(t,e,i,n)}else i.cancelDrag()}processTabDropdownActiveChanged(){void 0!==this._tabDropdownButton&&Dt(this._tabDropdownButton.element,this._tabsContainer.dropdownActive)}handleButtonPopoutEvent(){if(this._layoutManager.layoutConfig.settings.popoutWholeStack){if(void 0===this._popoutEvent)throw new J(\"HHBPOE17834\");this._popoutEvent()}else{const t=this._getActiveComponentItemEvent();t&&t.popout()}}handleButtonMaximiseToggleEvent(t){if(void 0===this._maximiseToggleEvent)throw new J(\"HHBMTE16834\");this._maximiseToggleEvent()}onClick(t){t.target===this._element&&this.notifyClick(t)}onTouchStart(t){t.target===this._element&&this.notifyTouchStart(t)}notifyClick(t){if(void 0===this._clickEvent)throw new J(\"HNHC46834\");this._clickEvent(t)}notifyTouchStart(t){if(void 0===this._touchStartEvent)throw new J(\"HNHTS46834\");this._touchStartEvent(t)}}class ee extends $t{constructor(t,e,i){var n,o,s,r,a,l,h,d,c,m,u,p,g,f,v,_,y,C,w;super(t,e,i,ee.createElement(document)),this._headerSideChanged=!1,this._resizeListener=()=>this.handleResize(),this._maximisedListener=()=>this.handleMaximised(),this._minimisedListener=()=>this.handleMinimised(),this._headerConfig=e.header;const I=t.layoutConfig.header,b=e.content;let S;if(1!==b.length)S=void 0;else{S=b[0].header}this._initialWantMaximise=e.maximised,this._initialActiveItemIndex=null!==(n=e.activeItemIndex)&&void 0!==n?n:0;const E=null!==(r=null!==(s=null===(o=this._headerConfig)||void 0===o?void 0:o.show)&&void 0!==s?s:null==S?void 0:S.show)&&void 0!==r?r:I.show,x=null!==(h=null!==(l=null===(a=this._headerConfig)||void 0===a?void 0:a.popout)&&void 0!==l?l:null==S?void 0:S.popout)&&void 0!==h?h:I.popout,L=null!==(m=null!==(c=null===(d=this._headerConfig)||void 0===d?void 0:d.maximise)&&void 0!==c?c:null==S?void 0:S.maximise)&&void 0!==m?m:I.maximise,z=null!==(g=null!==(p=null===(u=this._headerConfig)||void 0===u?void 0:u.close)&&void 0!==p?p:null==S?void 0:S.close)&&void 0!==g?g:I.close,M=null!==(_=null!==(v=null===(f=this._headerConfig)||void 0===f?void 0:f.minimise)&&void 0!==v?v:null==S?void 0:S.minimise)&&void 0!==_?_:I.minimise,P=null!==(w=null!==(C=null===(y=this._headerConfig)||void 0===y?void 0:y.tabDropdown)&&void 0!==C?C:null==S?void 0:S.tabDropdown)&&void 0!==w?w:I.tabDropdown;this._maximisedEnabled=!1!==L;const T={show:!1!==E,side:!1===E?nt.top:E,popoutEnabled:!1!==x,popoutLabel:!1===x?\"\":x,maximiseEnabled:this._maximisedEnabled,maximiseLabel:!1===L?\"\":L,closeEnabled:!1!==z,closeLabel:!1===z?\"\":z,minimiseEnabled:!0,minimiseLabel:M,tabDropdownEnabled:!1!==P,tabDropdownLabel:!1===P?\"\":P};this._header=new te(t,this,T,e.isClosable&&!1!==z,(()=>this.getActiveComponentItem()),(()=>this.remove()),(()=>this.handlePopoutEvent()),(()=>this.toggleMaximise()),(t=>this.handleHeaderClickEvent(t)),(t=>this.handleHeaderTouchStartEvent(t)),(t=>this.handleHeaderComponentRemoveEvent(t)),(t=>this.handleHeaderComponentFocusEvent(t)),((t,e,i,n)=>this.handleHeaderComponentStartDragEvent(t,e,i,n))),this.isStack=!0,this._childElementContainer=document.createElement(\"section\"),this._childElementContainer.classList.add(\"lm_items\"),this.on(\"resize\",this._resizeListener),this._maximisedEnabled&&(this.on(\"maximised\",this._maximisedListener),this.on(\"minimised\",this._minimisedListener)),this.element.appendChild(this._header.element),this.element.appendChild(this._childElementContainer),this.setupHeaderPosition(),this._header.updateClosability()}get childElementContainer(){return this._childElementContainer}get header(){return this._header}get headerShow(){return this._header.show}get headerSide(){return this._header.side}get headerLeftRightSided(){return this._header.leftRightSided}get contentAreaDimensions(){return this._contentAreaDimensions}get initialWantMaximise(){return this._initialWantMaximise}get isMaximised(){return this===this.layoutManager.maximisedStack}get stackParent(){if(!this.parent)throw new Error(\"Stack should always have a parent\");return this.parent}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}init(){if(!0===this.isInitialised)return;this.updateNodeSize();for(let t=0;t0){if(this._initialActiveItemIndex<0||this._initialActiveItemIndex>=e)throw new Error(`ActiveItemIndex out of range: ${this._initialActiveItemIndex} id: ${this.id}`);for(let i=0;ithis.contentItems.length)throw e-=1,new X(\"SAC99728\");if(t instanceof jt)return e=super.addChild(t,e),this._childElementContainer.appendChild(t.element),this._header.createTab(t,e),this.setActiveComponentItem(t,i),this._header.updateTabSizes(),this.updateSize(!1),t.container.setBaseLogicalZIndex(),this._header.updateClosability(),this.emitStateChangedEvent(),e;throw new X(\"SACC88532\")}removeChild(t,e){const i=t,n=this.contentItems.indexOf(i),o=1===this.contentItems.length;if(this._activeComponentItem===i&&(i.focused&&i.blur(),!o)){const t=0===n?1:n-1;this.setActiveComponentItem(this.contentItems[t],!1)}this._header.removeTab(i),super.removeChild(i,e),o||this._header.updateClosability(),this.emitStateChangedEvent()}toggleMaximise(){this.isMaximised?this.minimise():this.maximise()}maximise(){if(!this.isMaximised){this.layoutManager.setMaximisedStack(this);const t=this.contentItems,e=t.length;for(let i=0;i0&&void 0===t)throw new Error(\"expected non-empty stack to have an active component item\");return{type:\"stack\",content:this.calculateConfigContent(),size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,isClosable:this.isClosable,maximised:this.isMaximised,header:this.createHeaderConfig(),activeItemIndex:t}}onDrop(t,e){if(\"header\"===this._dropSegment){if(this.resetHeaderDropZone(),void 0===this._dropIndex)throw new J(\"SODDI68990\");return void this.addChild(t,this._dropIndex)}if(\"body\"===this._dropSegment)return void this.addChild(t,0,!0);const i=\"top\"===this._dropSegment||\"bottom\"===this._dropSegment,n=\"left\"===this._dropSegment||\"right\"===this._dropSegment,o=\"top\"===this._dropSegment||\"left\"===this._dropSegment,s=i&&this.stackParent.isColumn||n&&this.stackParent.isRow;if(t.isComponent){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createAndInitContentItem(e,this);i.addChild(t),t=i}if(t.type===at.row||t.type===at.column){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}if(s){const e=this.stackParent.contentItems.indexOf(this);this.stackParent.addChild(t,o?e:e+1,!0),this.size*=.5,t.size=this.size,t.sizeUnit=this.sizeUnit,this.stackParent.updateSize(!1)}else{const e=i?at.column:at.row,n=ct.createDefault(e),s=this.layoutManager.createContentItem(n,this);this.stackParent.replaceChild(this,s),s.addChild(t,o?0:void 0,!0),s.addChild(this,o?void 0:0,!0),this.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}highlightDropZone(t,e){for(const i in this._contentAreaDimensions){const n=i,o=this._contentAreaDimensions[n].hoverArea;if(o.x1t&&o.y1e)return void(\"header\"===n?(this._dropSegment=\"header\",this.highlightHeaderDropZone(this._header.leftRightSided?e:t)):(this.resetHeaderDropZone(),this.highlightBodyDropZone(n)))}}getArea(){if(\"none\"===this.element.style.display)return null;const t=super.getElementArea(this._header.element),e=super.getElementArea(this._childElementContainer);if(null===t||null===e)throw new K(\"SGAHC13086\");const i=e.x2-e.x1,n=e.y2-e.y1;return this._contentAreaDimensions={header:{hoverArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2},highlightArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2}}},0===this.contentItems.length?(this._contentAreaDimensions.body={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2}},super.getElementArea(this.element)):(this._contentAreaDimensions.left={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x1+.25*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x1+.5*i,y2:e.y2}},this._contentAreaDimensions.top={hoverArea:{x1:e.x1+.25*i,y1:e.y1,x2:e.x1+.75*i,y2:e.y1+.5*n},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y1+.5*n}},this._contentAreaDimensions.right={hoverArea:{x1:e.x1+.75*i,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1+.5*i,y1:e.y1,x2:e.x2,y2:e.y2}},this._contentAreaDimensions.bottom={hoverArea:{x1:e.x1+.25*i,y1:e.y1+.5*n,x2:e.x1+.75*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1+.5*n,x2:e.x2,y2:e.y2}},super.getElementArea(this.element))}positionHeader(t){this._header.side!==t&&(this._header.setSide(t),this._headerSideChanged=!0,this.setupHeaderPosition())}updateNodeSize(){if(\"none\"!==this.element.style.display){const t=kt(this.element);if(this._header.show){t[this._header.leftRightSided?it.width:it.height]-=this.layoutManager.layoutConfig.dimensions.headerHeight}this._childElementContainer.style.width=zt(t.width),this._childElementContainer.style.height=zt(t.height);for(let e=0;e=o&&tthis.onDrag(t,e,i))),this._dragListener.on(\"dragStop\",(()=>this.onDrop())),this.createDragProxyElements(t,e),null===this._componentItem.parent)throw new K(\"DPC10097\");this._componentItemFocused=this._componentItem.focused,this._componentItemFocused&&this._componentItem.blur(),this._componentItem.parent.removeChild(this._componentItem,!0),this.setDimensions(),document.body.appendChild(this._element),this.determineMinMaxXY(),this._layoutManager.calculateItemAreas(),this.setDropPosition(t,e)}get element(){return this._element}createDragProxyElements(t,e){this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_dragProxy\");const i=document.createElement(\"div\");i.classList.add(\"lm_header\");const n=document.createElement(\"div\");n.classList.add(\"lm_tabs\");const o=document.createElement(\"div\");o.classList.add(\"lm_tab\");const s=document.createElement(\"span\");s.classList.add(\"lm_title\"),o.appendChild(s),n.appendChild(o),i.appendChild(n),this._proxyContainerElement=document.createElement(\"div\"),this._proxyContainerElement.classList.add(\"lm_content\"),this._element.appendChild(i),this._element.appendChild(this._proxyContainerElement),this._originalParent instanceof ee&&this._originalParent.headerShow&&(this._sided=this._originalParent.headerLeftRightSided,this._element.classList.add(\"lm_\"+this._originalParent.headerSide),[nt.right,nt.bottom].indexOf(this._originalParent.headerSide)>=0&&this._proxyContainerElement.insertAdjacentElement(\"afterend\",i)),this._element.style.left=zt(t),this._element.style.top=zt(e),o.setAttribute(\"title\",this._componentItem.title),s.insertAdjacentText(\"afterbegin\",this._componentItem.title),this._proxyContainerElement.appendChild(this._componentItem.element)}determineMinMaxXY(){const t=this._layoutManager.groundItem;if(void 0===t)throw new J(\"DPDMMXY73109\");{const e=t.element.getBoundingClientRect();this._minX=e.left+document.body.scrollLeft,this._minY=e.top+document.body.scrollTop,this._maxX=this._minX+e.width,this._maxY=this._minY+e.height}}onDrag(t,e,i){const n=i.pageX,o=i.pageY;this.setDropPosition(n,o),this._componentItem.drag()}setDropPosition(t,e){this._layoutManager.layoutConfig.settings.constrainDragToContainer&&(t<=this._minX?t=Math.ceil(this._minX):t>=this._maxX&&(t=Math.floor(this._maxX)),e<=this._minY?e=Math.ceil(this._minY):e>=this._maxY&&(e=Math.floor(this._maxY))),this._element.style.left=zt(t),this._element.style.top=zt(e),this._area=this._layoutManager.getArea(t,e),null!==this._area&&(this._lastValidArea=this._area,this._area.contentItem.highlightDropZone(t,e,this._area))}onDrop(){const t=this._layoutManager.dropTargetIndicator;if(null===t)throw new K(\"DPOD30011\");let e;if(t.hide(),this._componentItem.exitDragMode(),null!==this._area)e=this._componentItem,this._area.contentItem.onDrop(e,this._area);else if(null!==this._lastValidArea){e=this._componentItem;this._lastValidArea.contentItem.onDrop(e,this._lastValidArea)}else this._originalParent?(e=this._componentItem,this._originalParent.addChild(e)):this._componentItem.destroy();this._element.remove(),this._layoutManager.emit(\"itemDropped\",this._componentItem),this._componentItemFocused&&void 0!==e&&e.focus()}setDimensions(){const t=this._layoutManager.layoutConfig.dimensions;if(void 0===t)throw new Error(\"DragProxy.setDimensions: dimensions undefined\");let e=t.dragProxyWidth,i=t.dragProxyHeight;if(void 0===e||void 0===i)throw new Error(\"DragProxy.setDimensions: width and/or height undefined\");const n=!1===this._layoutManager.layoutConfig.header.show?0:t.headerHeight;this._element.style.width=zt(e),this._element.style.height=zt(i),e-=this._sided?n:0,i-=this._sided?0:n,this._proxyContainerElement.style.width=zt(e),this._proxyContainerElement.style.height=zt(i),this._componentItem.enterDragMode(e,i),this._componentItem.show()}}class ne{constructor(t,e,i,n,o,s,r){this._layoutManager=t,this._element=e,this._extraAllowableChildTargets=i,this._componentTypeOrFtn=n,this._componentState=o,this._title=s,this._id=r,this._dragListener=null,this._dummyGroundContainer=document.createElement(\"div\");const a=gt.createDefault(\"row\");this._dummyGroundContentItem=new Yt(this._layoutManager,a,this._dummyGroundContainer),this.createDragListener()}destroy(){this.removeDragListener()}createDragListener(){this.removeDragListener(),this._dragListener=new Zt(this._element,this._extraAllowableChildTargets),this._dragListener.on(\"dragStart\",((t,e)=>this.onDragStart(t,e))),this._dragListener.on(\"dragStop\",(()=>this.onDragStop()))}onDragStart(t,e){var i;const n=\"component\";let o;if(\"function\"==typeof this._componentTypeOrFtn){const t=this._componentTypeOrFtn();o=ne.isDragSourceComponentItemConfig(t)?{type:n,componentState:t.state,componentType:t.type,title:null!==(i=t.title)&&void 0!==i?i:this._title}:t}else o={type:n,componentState:this._componentState,componentType:this._componentTypeOrFtn,title:this._title,id:this._id};const s=bt.resolve(o,!1),r=new jt(this._layoutManager,s,this._dummyGroundContentItem);if(this._dummyGroundContentItem.contentItems.push(r),null===this._dragListener)throw new K(\"DSODSD66746\");{const i=new ie(t,e,this._dragListener,this._layoutManager,r,this._dummyGroundContentItem),n=this._layoutManager.transitionIndicator;if(null===n)throw new K(\"DSODST66746\");n.transitionElements(this._element,i.element)}}onDragStop(){this.createDragListener()}removeDragListener(){null!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=null)}}!function(t){t.isDragSourceComponentItemConfig=function(t){return!(\"componentType\"in t)}}(ne||(ne={}));class oe{constructor(){this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_dropTargetIndicator\");const t=document.createElement(\"div\");t.classList.add(\"lm_inner\"),this._element.appendChild(t),document.body.appendChild(this._element)}destroy(){this._element.remove()}highlightArea(t,e){this._element.style.left=zt(t.x1+e),this._element.style.top=zt(t.y1+e),this._element.style.width=zt(t.x2-t.x1-e),this._element.style.height=zt(t.y2-t.y1-e),this._element.style.display=\"block\"}hide(){Dt(this._element,!1)}}class se{constructor(){this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_transition_indicator\"),document.body.appendChild(this._element),this._toElement=null,this._fromDimensions=null,this._totalAnimationDuration=200,this._animationStartTime=null}destroy(){this._element.remove()}transitionElements(t,e){}nextAnimationFrame(){}measure(t){const e=t.getBoundingClientRect();return{left:e.left,top:e.top,width:t.offsetWidth,height:t.offsetHeight}}}class re extends Wt{constructor(t){super(),this._layoutManager=t,this._childEventListener=t=>this.onEventFromChild(t),globalThis.addEventListener(re.ChildEventName,this._childEventListener,{passive:!0})}emit(t,...e){\"userBroadcast\"===t?this.emitUserBroadcast(...e):super.emit(t,...e)}emitUserBroadcast(...t){this.handleUserBroadcastEvent(\"userBroadcast\",t)}destroy(){globalThis.removeEventListener(re.ChildEventName,this._childEventListener)}handleUserBroadcastEvent(t,e){this._layoutManager.isSubWindow?this.propagateToParent(t,e):this.propagateToThisAndSubtree(t,e)}onEventFromChild(t){const e=t.detail;this.handleUserBroadcastEvent(e.eventName,e.args)}propagateToParent(t,e){const i={bubbles:!0,cancelable:!0,detail:{layoutManager:this._layoutManager,eventName:t,args:e}},n=new CustomEvent(re.ChildEventName,i),o=globalThis.opener;if(null===o)throw new K(\"EHPTP15778\");o.dispatchEvent(n)}propagateToThisAndSubtree(t,e){this.emitUnknown(t,...e);for(let i=0;ithis.handleContainerResize())),this._windowBeforeUnloadListener=()=>this.onBeforeUnload(),this._windowBeforeUnloadListening=!1,this._maximisedStackBeforeDestroyedListener=t=>this.cleanupBeforeMaximisedStackDestroyed(t),this.isSubWindow=t.isSubWindow,this._constructorOrSubWindowLayoutConfig=t.constructorOrSubWindowLayoutConfig,Q.checkInitialise(),dt.checkInitialise(),void 0!==t.containerElement&&(this._containerElement=t.containerElement)}get container(){return this._containerElement}get isInitialised(){return this._isInitialised}get groundItem(){return this._groundItem}get root(){return this._groundItem}get openPopouts(){return this._openPopouts}get dropTargetIndicator(){return this._dropTargetIndicator}get transitionIndicator(){return this._transitionIndicator}get width(){return this._width}get height(){return this._height}get eventHub(){return this._eventHub}get rootItem(){if(void 0===this._groundItem)throw new Error(\"Cannot access rootItem before init\");return 0===this._groundItem.contentItems.length?void 0:this._groundItem.contentItems[0]}get focusedComponentItem(){return this._focusedComponentItem}get tabDropPlaceholder(){return this._tabDropPlaceholder}get maximisedStack(){return this._maximisedStack}get deprecatedConstructor(){return!this.isSubWindow&&void 0!==this._constructorOrSubWindowLayoutConfig}destroy(){if(this._isInitialised){this._windowBeforeUnloadListening&&(globalThis.removeEventListener(\"beforeunload\",this._windowBeforeUnloadListener),this._windowBeforeUnloadListening=!1),!0===this.layoutConfig.settings.closePopoutsOnUnload&&this.closeAllOpenPopouts(),this._resizeObserver.disconnect(),this.checkClearResizeTimeout(),void 0!==this._groundItem&&this._groundItem.destroy(),this._tabDropPlaceholder.remove(),null!==this._dropTargetIndicator&&this._dropTargetIndicator.destroy(),null!==this._transitionIndicator&&this._transitionIndicator.destroy(),this._eventHub.destroy();for(const t of this._dragSources)t.destroy();this._dragSources=[],this._isInitialised=!1}}minifyConfig(t){return _t.minifyConfig(t)}unminifyConfig(t){return _t.unminifyConfig(t)}init(){let t;if(this.setContainer(),this._dropTargetIndicator=new oe,this._transitionIndicator=new se,this.updateSizeFromContainer(),this.isSubWindow){if(void 0===this._constructorOrSubWindowLayoutConfig)throw new J(\"LMIU07155\");{const e=this._constructorOrSubWindowLayoutConfig.root;if(void 0===e)throw new X(\"LMIC07156\");if(!Ct.isComponent(e))throw new X(\"LMIC07157\");t=e;const i=xt.resolve(this._constructorOrSubWindowLayoutConfig);this.layoutConfig=Object.assign(Object.assign({},i),{root:void 0})}}else void 0===this._constructorOrSubWindowLayoutConfig?this.layoutConfig=_t.createDefault():this.layoutConfig=xt.resolve(this._constructorOrSubWindowLayoutConfig);const e=this.layoutConfig;this._groundItem=new Yt(this,e.root,this._containerElement),this._groundItem.init(),this.checkLoadedLayoutMaximiseItem(),this._resizeObserver.observe(this._containerElement),this._isInitialised=!0,this.adjustColumnsResponsive(),this.emit(\"initialised\"),void 0!==t&&this.loadComponentAsRoot(t)}loadLayout(t){if(!this.isInitialised)throw new Error(\"GoldenLayout: Need to call init() if LayoutConfig with defined root passed to constructor\");if(void 0===this._groundItem)throw new J(\"LMLL11119\");this.createSubWindows(),this.layoutConfig=xt.resolve(t),this._groundItem.loadRoot(this.layoutConfig.root),this.checkLoadedLayoutMaximiseItem(),this.adjustColumnsResponsive()}saveLayout(){if(!1===this._isInitialised)throw new Error(\"Can't create config, layout not yet initialised\");if(void 0===this._groundItem)throw new J(\"LMTC18244\");{const t=this._groundItem.calculateConfigContent();let e;e=1!==t.length?void 0:t[0],this.reconcilePopoutWindows();const i=[];for(let t=0;t=0?n=this._groundItem.contentItems[0]:e=0;break;case at.row:case at.column:e=n.addItem(t,i.index);break;case at.stack:if(Ct.isComponent(t)){e=n.addItem(t,i.index);break}throw Error(tt[6]);case at.component:throw new X(\"LMAIALC87444602\");default:throw new Y(\"LMAIALU98881733\",n.type)}if(Ct.isComponent(t)){const t=n.contentItems[e];Gt.isStack(t)&&(n=t,e=0)}return i.parentItem=n,i.index=e,i}}}loadComponentAsRoot(t){if(void 0===this._groundItem)throw new Error(\"Cannot add item before init\");this._groundItem.loadComponentAsRoot(t)}updateSize(t,e){this.setSize(t,e)}setSize(t,e){if(this._width=t,this._height=e,!0===this._isInitialised){if(void 0===this._groundItem)throw new J(\"LMUS18881\");if(this._groundItem.setSize(this._width,this._height),this._maximisedStack){const{width:t,height:e}=kt(this._containerElement);Tt(this._maximisedStack.element,t),At(this._maximisedStack.element,e),this._maximisedStack.updateSize(!1)}this.adjustColumnsResponsive()}}beginSizeInvalidation(){this._sizeInvalidationBeginCount++}endSizeInvalidation(){0==--this._sizeInvalidationBeginCount&&this.updateSizeFromContainer()}updateSizeFromContainer(){const{width:t,height:e}=kt(this._containerElement);this.setSize(t,e)}updateRootSize(t=!1){if(void 0===this._groundItem)throw new J(\"LMURS28881\");this._groundItem.updateSize(t)}createAndInitContentItem(t,e){const i=this.createContentItem(t,e);return i.init(),i}createContentItem(t,e){if(\"string\"!=typeof t.type)throw new G(\"Missing parameter 'type'\",JSON.stringify(t));if(ct.isComponentItem(t)&&!(e instanceof ee)&&e&&!(!0===this.isSubWindow&&e instanceof Yt)){t={type:at.stack,content:[t],size:t.size,sizeUnit:t.sizeUnit,minSize:t.minSize,minSizeUnit:t.minSizeUnit,id:t.id,maximised:t.maximised,isClosable:t.isClosable,activeItemIndex:0,header:void 0}}return this.createContentItemFromConfig(t,e)}findFirstComponentItemById(t){if(void 0===this._groundItem)throw new J(\"LMFFCIBI82446\");return this.findFirstContentItemTypeByIdRecursive(at.component,t,this._groundItem)}createPopout(t,e,i,n){return t instanceof Gt?this.createPopoutFromContentItem(t,e,i,n):this.createPopoutFromItemConfig(t,e,i,n)}createPopoutFromContentItem(t,e,i,n){let o=t.parent,s=t;for(;null!==o&&1===o.contentItems.length&&!o.isGround;)s=o,o=o.parent;if(null===o)throw new K(\"LMCPFCI00834\");{if(void 0===n&&(n=o.contentItems.indexOf(s)),null!==i&&o.addPopInParentId(i),void 0===e){const i=globalThis.screenX||globalThis.screenLeft,n=globalThis.screenY||globalThis.screenTop,o=t.element.offsetLeft,s=t.element.offsetTop,{width:r,height:a}=kt(t.element);e={left:i+o,top:n+s,width:r,height:a}}const r=t.toConfig();if(t.remove(),ft.isRootItemConfig(r))return this.createPopoutFromItemConfig(r,e,i,n);throw new Error(`${tt[0]}`)}}beginVirtualSizedContainerAdding(){0==++this._virtualSizedContainerAddingBeginCount&&(this._virtualSizedContainers.length=0)}addVirtualSizedContainer(t){this._virtualSizedContainers.push(t)}endVirtualSizedContainerAdding(){if(0==--this._virtualSizedContainerAddingBeginCount){const t=this._virtualSizedContainers.length;if(t>0){this.fireBeforeVirtualRectingEvent(t);for(let e=0;ethis.emit(\"windowOpened\",a))),a.on(\"closed\",(()=>this.reconcilePopoutWindows())),this._openPopouts.push(a),this.layoutConfig.settings.closePopoutsOnUnload&&!this._windowBeforeUnloadListening&&(globalThis.addEventListener(\"beforeunload\",this._windowBeforeUnloadListener,{passive:!0}),this._windowBeforeUnloadListening=!0),a}closeAllOpenPopouts(){for(let t=0;tglobalThis.close()),1)}getArea(t,e){let i=null,n=1/0;for(let o=0;o=s.x1&&t=s.y1&&es.surface&&(n=s.surface,i=s)}return i}calculateItemAreas(){const t=this.getAllContentItems(),e=this._groundItem;if(void 0===e)throw new J(\"LMCIAR44365\");if(1!==t.length){e.contentItems[0].isStack?this._itemAreas=[]:this._itemAreas=e.createSideAreas();for(let e=0;e0){let e=t[0];if(Gt.isComponentItem(e)){const t=e.parent;if(null===t)throw new K(\"LMXLLMI69999\");e=t}if(!Gt.isStack(e))throw new X(\"LMCLLMI19993\");e.maximise()}}}processMaximiseStack(t){if(this._maximisedStack=t,t.on(\"beforeItemDestroyed\",this._maximisedStackBeforeDestroyedListener),t.element.classList.add(\"lm_maximised\"),t.element.insertAdjacentElement(\"afterend\",this._maximisePlaceholder),void 0===this._groundItem)throw new J(\"LMMXI19993\");{this._groundItem.element.prepend(t.element);const{width:e,height:i}=kt(this._containerElement);Tt(t.element,e),At(t.element,i),t.updateSize(!0),t.focusActiveContentItem(),this._maximisedStack.emit(\"maximised\"),this.emit(\"stateChanged\")}}processMinimiseMaximisedStack(){if(void 0===this._maximisedStack)throw new X(\"LMMMS74422\");{const t=this._maximisedStack;if(null===t.parent)throw new K(\"LMMI13668\");t.element.classList.remove(\"lm_maximised\"),this._maximisePlaceholder.insertAdjacentElement(\"afterend\",t.element),this._maximisePlaceholder.remove(),this.updateRootSize(!0),this._maximisedStack=void 0,t.off(\"beforeItemDestroyed\",this._maximisedStackBeforeDestroyedListener),t.emit(\"minimised\"),this.emit(\"stateChanged\")}}reconcilePopoutWindows(){const t=[];for(let e=0;e{this._resizeTimeoutId=void 0,this.beginSizeInvalidation(),this.endSizeInvalidation()}),this.resizeDebounceInterval))}checkClearResizeTimeout(){void 0!==this._resizeTimeoutId&&(clearTimeout(this._resizeTimeoutId),this._resizeTimeoutId=void 0)}setContainer(){var t;const e=document.body,i=null!==(t=this._containerElement)&&void 0!==t?t:e;if(i===e){this.resizeWithContainerAutomatically=!0;const t=document.documentElement;t.style.height=\"100%\",t.style.margin=\"0\",t.style.padding=\"0\",t.style.overflow=\"clip\",e.style.height=\"100%\",e.style.margin=\"0\",e.style.padding=\"0\",e.style.overflow=\"clip\"}this._containerElement=i}onBeforeUnload(){this.destroy()}adjustColumnsResponsive(){if(void 0===this._groundItem)throw new J(\"LMACR20883\");if(this._firstLoad=!1,this.useResponsiveLayout()&&!this._updatingColumnsResponsive&&this._groundItem.contentItems.length>0&&this._groundItem.contentItems[0].isRow){if(void 0===this._groundItem||null===this._width)throw new J(\"LMACR77412\");{const t=this._groundItem.contentItems[0].contentItems.length;if(t<=1)return;{const e=this.layoutConfig.dimensions.defaultMinItemWidth;if(t*e<=this._width)return;{this._updatingColumnsResponsive=!0;const i=t-Math.max(Math.floor(this._width/e),1),n=this._groundItem.contentItems[0],o=this.getAllStacks();if(0===o.length)throw new X(\"LMACRS77413\");{const t=o[0];for(let e=0;en?void 0:{parentItem:t,index:o}}}case 1:if(void 0===this._focusedComponentItem)return;{const t=this._focusedComponentItem.parentItem;return this.tryCreateLocationFromParentItem(t,e)}case 2:{const t=this.findFirstContentItemType(at.stack);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 3:{let t=this.findFirstContentItemType(at.row);return void 0!==t?this.tryCreateLocationFromParentItem(t,e):(t=this.findFirstContentItemType(at.column),void 0!==t?this.tryCreateLocationFromParentItem(t,e):void 0)}case 4:{const t=this.findFirstContentItemType(at.row);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 5:{const t=this.findFirstContentItemType(at.column);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 6:if(void 0===this._groundItem)throw new J(\"LMFLRIF18244\");return void 0!==this.rootItem?void 0:void 0===e||0===e?{parentItem:this._groundItem,index:0}:void 0;case 7:if(void 0===this._groundItem)throw new J(\"LMFLF18244\");{const t=this._groundItem.contentItems;if(0===t.length)return void 0===e||0===e?{parentItem:this._groundItem,index:0}:void 0;{const i=t[0];return this.tryCreateLocationFromParentItem(i,e)}}}}tryCreateLocationFromParentItem(t,e){const i=t.contentItems.length;return void 0===e?{parentItem:t,index:i}:e<0||e>i?void 0:{parentItem:t,index:e}}}!function(t){t.createMaximisePlaceElement=function(t){const e=t.createElement(\"div\");return e.classList.add(\"lm_maximise_place\"),e},t.createTabDropPlaceholderElement=function(t){const e=t.createElement(\"div\");return e.classList.add(\"lm_drop_tab_placeholder\"),e},t.defaultLocationSelectors=[{typeId:1,index:void 0},{typeId:2,index:void 0},{typeId:3,index:void 0},{typeId:7,index:void 0}],t.afterFocusedItemIfPossibleLocationSelectors=[{typeId:0,index:1},{typeId:2,index:void 0},{typeId:3,index:void 0},{typeId:7,index:void 0}]}(ae||(ae={}));class le extends ae{constructor(t,e,i,n){if(super(le.createLayoutManagerConstructorParameters(t,e)),this._bindComponentEventHanlderPassedInConstructor=!1,this._creationTimeoutPassed=!1,void 0!==e&&\"function\"==typeof e&&(this.bindComponentEvent=e,this._bindComponentEventHanlderPassedInConstructor=!0,void 0!==i&&(this.unbindComponentEvent=i)),!this._bindComponentEventHanlderPassedInConstructor&&this.isSubWindow){if(void 0===this._constructorOrSubWindowLayoutConfig)throw new J(\"VLC98823\");{const t=xt.resolve(this._constructorOrSubWindowLayoutConfig);this.layoutConfig=Object.assign(Object.assign({},t),{root:void 0})}}!0!==n&&(this.deprecatedConstructor||this.init())}destroy(){this.bindComponentEvent=void 0,this.unbindComponentEvent=void 0,super.destroy()}init(){if(this._bindComponentEventHanlderPassedInConstructor||\"loading\"!==document.readyState&&null!==document.body){if(!this._bindComponentEventHanlderPassedInConstructor&&!0===this.isSubWindow&&!this._creationTimeoutPassed)return setTimeout((()=>this.init()),7),void(this._creationTimeoutPassed=!0);!0===this.isSubWindow&&(this._bindComponentEventHanlderPassedInConstructor||this.clearHtmlAndAdjustStylesForSubWindow(),window.__glInstance=this),super.init()}else document.addEventListener(\"DOMContentLoaded\",(()=>this.init()),{passive:!0})}clearHtmlAndAdjustStylesForSubWindow(){const t=document.head,e=new Array(4);e[0]=document.querySelectorAll(\"body link\"),e[1]=document.querySelectorAll(\"body style\"),e[2]=document.querySelectorAll(\"template\"),e[3]=document.querySelectorAll(\".gl_keep\");for(let i=0;ithis.emit(\"popIn\"))),document.body.appendChild(t),!0}}bindComponent(t,e){if(void 0!==this.bindComponentEvent){return this.bindComponentEvent(t,e)}if(void 0!==this.getComponentEvent)return{virtual:!1,component:this.getComponentEvent(t,e)};{const t=`${tt[2]}: ${JSON.stringify(e)}`;throw new Z(t)}}unbindComponent(t,e,i){if(void 0!==this.unbindComponentEvent)this.unbindComponentEvent(t);else if(!e&&void 0!==this.releaseComponentEvent){if(void 0===i)throw new J(\"VCUCRCU333998\");this.releaseComponentEvent(t,i)}}}!function(t){let e=!1;t.createLayoutManagerConstructorParameters=function(t,i){const n=e?null:new URL(document.location.href).searchParams.get(\"gl-window\");e=!0;const o=null!==n;let s,r;if(null!==n){const e=localStorage.getItem(n);if(null===e)throw new Error(\"Null gl-window Config\");localStorage.removeItem(n);const i=JSON.parse(e),o=_t.unminifyConfig(i);r=xt.fromResolved(o),t instanceof HTMLElement&&(s=t)}else void 0===t?r=void 0:t instanceof HTMLElement?(r=void 0,s=t):r=t,void 0===s&&i instanceof HTMLElement&&(s=i);return{constructorOrSubWindowLayoutConfig:r,isSubWindow:o,containerElement:s}}}(le||(le={}));class he extends le{constructor(t,e,i){super(t,e,i,!0),this._componentTypesMap=new Map,this._registeredComponentMap=new Map,this._virtuableComponentMap=new Map,this._containerVirtualRectingRequiredEventListener=(t,e,i)=>this.handleContainerVirtualRectingRequiredEvent(t,e,i),this._containerVirtualVisibilityChangeRequiredEventListener=(t,e)=>this.handleContainerVirtualVisibilityChangeRequiredEvent(t,e),this._containerVirtualZIndexChangeRequiredEventListener=(t,e,i)=>this.handleContainerVirtualZIndexChangeRequiredEvent(t,e,i),this.deprecatedConstructor||this.init()}registerComponent(t,e,i=!1){if(\"function\"!=typeof e)throw new $(\"registerComponent() componentConstructorOrFactoryFtn parameter is not a function\");if(e.hasOwnProperty(\"prototype\")){const n=e;this.registerComponentConstructor(t,n,i)}else{const n=e;this.registerComponentFactoryFunction(t,n,i)}}registerComponentConstructor(t,e,i=!1){if(\"function\"!=typeof e)throw new Error(tt[1]);if(void 0!==this._componentTypesMap.get(t))throw new Z(`${tt[3]}: ${t}`);this._componentTypesMap.set(t,{constructor:e,factoryFunction:void 0,virtual:i})}registerComponentFactoryFunction(t,e,i=!1){if(\"function\"!=typeof e)throw new Z(\"Please register a constructor function\");if(void 0!==this._componentTypesMap.get(t))throw new Z(`${tt[3]}: ${t}`);this._componentTypesMap.set(t,{constructor:void 0,factoryFunction:e,virtual:i})}registerComponentFunction(t){this.registerGetComponentConstructorCallback(t)}registerGetComponentConstructorCallback(t){if(\"function\"!=typeof t)throw new Error(\"Please register a callback function\");void 0!==this._getComponentConstructorFtn&&console.warn(\"Multiple component functions are being registered. Only the final registered function will be used.\"),this._getComponentConstructorFtn=t}getRegisteredComponentTypeNames(){const t=this._componentTypesMap.keys();return Array.from(t)}getComponentInstantiator(t){let e;const i=pt.resolveComponentTypeName(t);return void 0!==i&&(e=this._componentTypesMap.get(i)),void 0===e&&void 0!==this._getComponentConstructorFtn&&(e={constructor:this._getComponentConstructorFtn(t),factoryFunction:void 0,virtual:!1}),e}bindComponent(t,e){let i;const n=pt.resolveComponentTypeName(e);let o;if(void 0!==n&&(i=this._componentTypesMap.get(n)),void 0===i&&void 0!==this._getComponentConstructorFtn&&(i={constructor:this._getComponentConstructorFtn(e),factoryFunction:void 0,virtual:!1}),void 0!==i){const s=i.virtual;let r,a;r=void 0===e.componentState?void 0:Ut({},e.componentState);const l=i.constructor;if(void 0!==l)a=new l(t,r,s);else{const e=i.factoryFunction;if(void 0===e)throw new X(\"LMBCFFU10008\");a=e(t,r,s)}if(s){if(void 0===a)throw new J(\"GLBCVCU988774\");{const e=a,i=e.rootHtmlElement;if(void 0===i)throw new Z(`${tt[5]}: ${n}`);!function(t){const e=\"absolute\";t.style.position!==e&&(t.style.position=e)}(i),this.container.appendChild(i),this._virtuableComponentMap.set(t,e),t.virtualRectingRequiredEvent=this._containerVirtualRectingRequiredEventListener,t.virtualVisibilityChangeRequiredEvent=this._containerVirtualVisibilityChangeRequiredEventListener,t.virtualZIndexChangeRequiredEvent=this._containerVirtualZIndexChangeRequiredEventListener}}this._registeredComponentMap.set(t,a),o={virtual:i.virtual,component:a}}else o=super.bindComponent(t,e);return o}unbindComponent(t,e,i){if(void 0===this._registeredComponentMap.get(t))super.unbindComponent(t,e,i);else{const e=this._virtuableComponentMap.get(t);if(void 0!==e){const i=e.rootHtmlElement;if(void 0===i)throw new X(\"GLUC77743\",t.title);this.container.removeChild(i),this._virtuableComponentMap.delete(t)}}}fireBeforeVirtualRectingEvent(t){this._goldenLayoutBoundingClientRect=this.container.getBoundingClientRect(),super.fireBeforeVirtualRectingEvent(t)}handleContainerVirtualRectingRequiredEvent(t,e,i){const n=this._virtuableComponentMap.get(t);if(void 0===n)throw new J(\"GLHCSCE55933\");{const o=n.rootHtmlElement;if(void 0===o)throw new Z(tt[4]+\" \"+t.title);{const n=t.element.getBoundingClientRect(),s=n.left-this._goldenLayoutBoundingClientRect.left;o.style.left=zt(s);const r=n.top-this._goldenLayoutBoundingClientRect.top;o.style.top=zt(r),Tt(o,e),At(o,i)}}}handleContainerVirtualVisibilityChangeRequiredEvent(t,e){const i=this._virtuableComponentMap.get(t);if(void 0===i)throw new J(\"GLHCVVCRE55934\");{const n=i.rootHtmlElement;if(void 0===n)throw new Z(tt[4]+\" \"+t.title);Dt(n,e)}}handleContainerVirtualZIndexChangeRequiredEvent(t,e,i){const n=this._virtuableComponentMap.get(t);if(void 0===n)throw new J(\"GLHCVZICRE55935\");{const e=n.rootHtmlElement;if(void 0===e)throw new Z(tt[4]+\" \"+t.title);e.style.zIndex=i}}}const de=\"initial_\",ce={show:\"top\",popout:!1,maximise:!1,close:\"close-tab-unused\"},me={headerHeight:31},ue={hasHeaders:!0,reorderEnabled:!0},pe={popoutWholeStack:!1,constrainDragToContainer:!1,constrainDragToHeaders:!1,preventDragout:!1,showMaximiseIcon:!1,showPopoutIcon:!1,showCloseIcon:!1,blockedPopoutsThrowError:!0,closePopoutsOnUnload:!0,selectionEnabled:!1};var ge,fe;class ve{constructor(e){this.layout=e,ge.set(this,void 0),fe.set(this,void 0),this.handleResize=t=>{t.forEach((t=>this.resizeElement(t.target)))},this.handleMutation=()=>{this.layout.viewComponentsByContainerElement.forEach((t=>{this.resizeElement(t.container.element)}))},t.__classPrivateFieldSet(this,ge,new ResizeObserver(this.handleResize),\"f\"),t.__classPrivateFieldSet(this,fe,new MutationObserver(this.handleMutation),\"f\")}observeMutations(e){t.__classPrivateFieldGet(this,fe,\"f\")?.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[\"class\"]})}destroy(){t.__classPrivateFieldGet(this,ge,\"f\").disconnect(),t.__classPrivateFieldGet(this,fe,\"f\").disconnect()}observeContainer(e){t.__classPrivateFieldGet(this,ge,\"f\").observe(e)}unobserveContainer(e){t.__classPrivateFieldGet(this,ge,\"f\").unobserve(e)}resizeElement(t){const e=this.layout.viewComponentsByContainerElement.get(t);e&&e.resize()}}ge=new WeakMap,fe=new WeakMap;var _e={};Object.defineProperty(_e,\"__esModule\",{value:!0});var ye=_e.BaseItem=void 0;class Ce{constructor(t,e,i){this._item=t,this._layout=e,this._wrap=i}get raw(){return this._item}get layout(){return this._layout}get type(){return this._item.type}get contentItems(){return(this._item.contentItems??[]).map((t=>this._wrap(t)))}get parent(){const t=this._item.parent;return t?this._wrap(t):null}setActiveContentItem(t,e){if(\"stack\"!==this.type)throw new Error(`Cannot call setActiveContentItem from a non-stack item: ${this.type}`);this._item.setActiveContentItem(t.raw,e)}static wrapInternal(t,e,i){const n=Ce.wrapCache.get(e);if(n)return n;const o=new t(e,i,(e=>Ce.wrapInternal(t,e,i)));return Ce.wrapCache.set(e,o),o}}ye=_e.BaseItem=Ce,Ce.wrapCache=new WeakMap;const we=t=>!!t&&\"contentItems\"in t&&(t.isRow||t.isColumn);class Ie extends ye{isRoot(){return!!this._item.parent?.isGround}getBounds(){return this._item.element.getBoundingClientRect()}get viewName(){if(this._item.isComponent){const{component:t}=this._item;return t.identity.name}throw new Error(\"View name not found\")}onDestroyed(t){const e=({target:i})=>{i===this._item&&(t(),this._item.off(\"itemDestroyed\",e))};this._item.on(\"itemDestroyed\",e)}createAdjacentStack({position:t=\"right\"}={}){const e=this.raw;if(ee.isStack(e)&&e.parent){const i=[\"top\",\"bottom\"].includes(t)?\"column\":\"row\",n=[\"left\",\"top\"].includes(t)?1:0,o=we(e.parent)?e.parent:e.layoutManager,s=o,r=e.parent.contentItems.indexOf(e);e.parent.isGround&&e.parent.removeChild(e,!0);const a=o.newItem({type:i,content:[{type:\"stack\",content:[]}]},r);if(!a)throw new Error(\"createAdjacentStack: Failed to create new container\");const l=a.contentItems[0];return a.addChild(this.raw,n),we(s)&&s.removeChild(e,!0),this._wrap(l)}throw new Error(`Cannot creat adjacent stacks for type: ${e.type}, must be type 'stack'`)}setActiveContentItem(t,e=!0){if(!ee.isStack(this._item))throw new Error(`Cannot call setActiveContentItem from a non-stack item: ${this.type}`);this._item.setActiveComponentItem(t.raw,!e)}static wrap(t,e){return ye.wrapInternal(Ie,t,e)}}function be(t=[],e){for(const i of t)\"component\"===i.type?Object.keys(e).forEach((t=>{t in i&&(i.componentState={[`${de}${t}`]:i[t],...i.componentState}),i[t]=e[t]})):be(i.content,e)}function Se(t=[],e,i){for(const n of t)if(\"component\"===n.type)Object.keys(e).forEach((t=>{if(`${de}${t}`in n.componentState)return n[t]=n.componentState[`${de}${t}`],void delete n.componentState[`${de}${t}`];n[t]=e[t]}));else{if(n.size&&(\"row\"===i||\"column\"===i)){n[\"row\"===i?\"width\":\"height\"]=n.size?.includes(\".\")?parseFloat(n.size):parseInt(n.size)}Se(n.content,e,n.type)}}function Ee(t){if(t.root){t.root.content&&Se([t.root],{componentName:\"view\",isClosable:!0});const e=t.root;t.content=[e],delete t.root}return t}const xe=e=>class extends e{connectedCallback(){if(!this.name||!this.uuid)throw new Error(\" Name or uuid attribute missing\");if(!this.src)throw new Error(\" missing 'src' attribute.\");this.#t||(this.#t=document.createElement(\"iframe\"),this.#t.src=this.src,this.#t.style.height=\"100%\",this.#t.style.width=\"100%\",this.#t.style.border=\"none\",this.forceFrameName?this.#t.setAttribute(\"name\",this.forceFrameName):this.#t.setAttribute(\"name\",t.encodeOptions({brokerUrl:this.brokerUrl,name:this.name,uuid:this.uuid,providerId:this.providerId,contextGroup:this.contextGroup},\"of-frame\")),this.#t.setAttribute(\"id\",this.name),this.appendChild(this.#t))}#t;get brokerUrl(){return this.getAttribute(\"of-broker\")}set brokerUrl(t){t&&this.setAttribute(\"of-broker\",t)}get name(){return this.getAttribute(\"of-name\")}set name(t){t&&this.setAttribute(\"of-name\",t)}get forceFrameName(){return this.getAttribute(\"forceFrameName\")}set forceFrameName(t){t&&this.setAttribute(\"forceFrameName\",t)}get uuid(){return this.getAttribute(\"of-uuid\")}set uuid(t){t&&this.setAttribute(\"of-uuid\",t)}get src(){return this.getAttribute(\"src\")}set src(t){t&&this.setAttribute(\"src\",t)}get providerId(){return this.getAttribute(\"of-provider-id\")}set providerId(t){t&&this.setAttribute(\"of-provider-id\",t)}get contextGroup(){return this.getAttribute(\"of-context-group\")}set contextGroup(t){t&&this.setAttribute(\"of-context-group\",t)}static get observedAttributes(){return[\"name\"]}};class Le{static create(t){const e=document.createElement(\"of-view\");return Object.entries(t).forEach((([t,i])=>{e.setAttribute(t,i)})),e}}customElements.define(\"of-view\",xe(HTMLElement));class ze{constructor(t,i,n,{brokerUrl:o,interopConfig:s},r){this.container=t,this.config=i,this.ofView=null,this.isDragging=()=>this.container.tab.element?.className.includes(\"lm_dragging\")??!1;const{url:a,web:l,interop:h,name:d}=i||{},c=d??`internal-generated-view-${e.v4()}`;if(this.identity={uuid:n,name:c},this.container.element.setAttribute(\"of-name\",c),this.container.element.id=`container-${c}`,this.container.parent.id=c,void 0===a)return void this.handleUrlMissing();const m=this.updateTitleIfNotSet(a),u={\"of-broker\":o,\"of-uuid\":n,\"of-name\":c,src:a};l?.frameName&&(u.forceFrameName=l.frameName);const p=h?.currentContextGroup??s?.currentContextGroup;p&&(u[\"of-context-group\"]=p),s?.providerId&&(u[\"of-provider-id\"]=s?.providerId),this.ofView=Le.create(u),this.ofView.title=m??`Iframe: ${a}`,r.appendChild(this.ofView),this.ofView.style.position=\"absolute\"}updateTitleIfNotSet(t){return\"view\"===this.container.parent.title&&this.container.parent.setTitle(t),this.container.parent.title}handleUrlMissing(){const t=document.createElement(\"div\");t.setAttribute(\"style\",\"padding: 20px\");t.innerText=\"No URL provided\",this.container.element.appendChild(t)}destroy(){this.ofView?.remove(),this.ofView=null}closeView(){this.container.close()}resize(){if(this.ofView){if(this.isDragging())return void(this.ofView.style.display=\"none\");const t=this.container.element.getBoundingClientRect();this.ofView.style.position=\"absolute\",this.ofView.style.height=`${t.height}px`,this.ofView.style.width=`${t.width}px`,this.ofView.style.inset=`${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`,this.ofView.style.display=\"block\"}}}class Me extends U{static overrideConfig(t){const e={...ue,...t.settings,...pe};return e.reorderEnabled?be(t.content,{isClosable:!0}):be(t.content,{reorderEnabled:!1}),{dimensions:me,...t,settings:e,header:{...ce,show:!1!==t.settings?.hasHeaders&&ce.show}}}constructor(t,e,i,{options:n},o,s){super(),this.identity=t,this.container=e,this.initialConfig=i,this.layoutManager=o,this.platformProvider=s,this.viewComponentsByContainerElement=new Map,this.layoutContentCache=_.getSingleInstance(),this.reparentingViews=new Set,this.goldenLayoutDestroyed=!1,this.createViewComponent=(t,e)=>{m.handleSharedView(this.layoutManager,this.identity,e);const i=new ze(t,e,this.identity.uuid,this.options,this.iframeContainer);return e&&!1===e[`${de}isClosable`]&&this.stylesheet.insertRule(`#tab-${i.identity.name} .lm_close_tab { display: none; }`),this.viewComponentsByContainerElement.set(t.element,i),this.resizeController.observeContainer(t.element),i},this.iframeContainer=document.createElement(\"div\"),this.iframeContainer.id=`openfin-layout-iframe-container-${this.identity.layoutName}`,this.domEmitter=new V(e),this.setupStylesheets(),this.layout=new he(this.container),this.layout.resizeWithContainerAutomatically=!0,this.options=n,this.layout.registerComponent(\"view\",this.createViewComponent),this.setupListeners(),this.resizeController=new ve(this),this.layout.loadLayout(Me.overrideConfig(i));const r=document.createElement(\"div\");r.id=`openfin-layout-shadow-container-${this.identity.layoutName}`,r.attachShadow({mode:\"open\",delegatesFocus:!1}).appendChild(this.iframeContainer),this.container.appendChild(r),this.resizeController.observeMutations(this.container)}getStackByView({name:t}){const e=this.layout.findFirstComponentItemById(t);if(e?.parent&&e?.parent?.isStack)return Ie.wrap(e.parent,this)}getRoot(){return Ie.wrap(this.layout.rootItem,this)}async platformCloseView(t){const e=[...this.viewComponentsByContainerElement.values()].find((e=>e.identity.name===t.name));if(!e)throw new Error(`View with name: ${t.name} not found in layout.`);e.closeView()}async platformCreateView(t,{location:e,targetView:i}={}){if(i)throw new Error(\"TargetView not supported in web\");const n={options:this.platformProvider.normalizeOptions(t),target:this.identity,location:e};return this.insertView(n)}setupStylesheets(){if(this.container.setAttribute(\"data-openfin-layout-name\",this.identity.layoutName),this.stylesheet=new CSSStyleSheet,this.stylesheet.insertRule(\".lm_close { display: none; }\"),document.adoptedStyleSheets.push(this.stylesheet),this.initialConfig.settings?.preventSplitterResize){const t=`\\n [data-openfin-layout-name='${this.identity.layoutName}'] .lm_splitter {\\n pointer-events: none;\\n }`;this.stylesheet.insertRule(t)}}insertView({options:t,location:e,targetView:i}){const n=e?this.layoutContentCache.getItemOrUndefined(e.id):void 0,o=i?this.layoutContentCache.getItemOrUndefined(i.name):void 0,s=n??o??Ie.wrap(this.layout.rootItem,this);let r;if(ee.isStack(s.raw))r=s.raw;else{if(!we(s.raw))throw new Error(\"Cannot add a view at the requested location\");r=s.raw.newItem({type:\"stack\",content:[]})}const a=Math.min(r.contentItems.length,e?.index??r.contentItems.length);let l=this.layout.findFirstComponentItemById(t.name);l?(l.parent&&l.parent.removeChild(l,!0),r.addChild(l,a)):l=r.newComponent(\"view\",t,t.title??t.url??\"Default Title\",a);const h=l.component.identity;return Promise.resolve({identity:h})}replaceView({viewToReplace:t,newView:e}){throw new Error(\"Method not implemented.\")}replaceLayout(t){throw new Error(\"Method not implemented.\")}async cleanupView(t){}applyPreset(t){throw new Error(\"Method not implemented.\")}getCurrentViews(){return[...this.viewComponentsByContainerElement.values()].map((t=>t.identity))}async getFrameSnapshot(){return Ee(xt.fromResolved(this.layout.toConfig()))}isVisible(){return W(this.container)}async onViewDetached({viewIdentity:t}){this.reparentingViews.add(t.name),this.platformCloseView(t)}async destroy(){this.goldenLayoutDestroyed||(this.goldenLayoutDestroyed=!0,this.layout.destroy()),this.iframeContainer.remove(),this.resizeController.destroy(),document.adoptedStyleSheets=document.adoptedStyleSheets.filter((t=>t!==this.stylesheet)),this.viewComponentsByContainerElement.clear()}setupListeners(){this.container.addEventListener(\"pointerdown\",(t=>{if(t.target instanceof HTMLElement){const e=t.target.classList;[\"lm_tab\",\"lm_title\",\"lm_splitter\",\"lm_drag_handle\"].some((t=>e.contains(t)))&&(this.handleDragStart(),2===t.button&&t.stopPropagation())}}),!0),document.addEventListener(\"pointerup\",(()=>this.handleDragEnd()),!0),this.layout.on(\"tabCreated\",(t=>{const e=t.componentItem.component;t.element.id=`tab-${e.identity.name}`,this.domEmitter.dispatchLocalEvent(\"tab-created\",e.identity)})),this.layout.on(\"itemCreated\",(({target:t})=>{const e=t;if(Gt.isComponentItem(e)){const t=e.component;this.domEmitter.dispatchLocalEvent(\"container-created\",t.identity)}})),this.layout.on(\"itemDestroyed\",(t=>{const e=t.target;if(Gt.isComponentItem(e)){const t=e.component;this.removeViewComponent(t)}})),this.layout.on(\"itemDropped\",(()=>{this.handleDragEnd()}))}handleDragStart(){this.iframeContainer.style.pointerEvents=\"none\"}handleDragEnd(){this.iframeContainer.style.pointerEvents=\"\"}removeViewComponent(t){if(t.config&&!1===t.config[`${de}isClosable`]){const e=[...this.stylesheet.cssRules].findIndex((e=>e.cssText.includes(`#tab-${t.identity.name}`)));this.stylesheet.deleteRule(e)}t.destroy(),this.viewComponentsByContainerElement.delete(t.container.element),this.resizeController.unobserveContainer(t.container.element),this.reparentingViews.has(t.identity.name)?this.reparentingViews.delete(t.identity.name):this.platformProvider.closeView(t.identity.name);0===this.getCurrentViews().length&&(this.goldenLayoutDestroyed||(this.goldenLayoutDestroyed=!0,m.handleLastViewRemoved(this.layoutManager,this.identity)))}}class Pe{constructor(t,e,i,n){this.windowIdentity=t,this.connectConfig=e,this.provider=i,this.fallbackContainer=n}async createLayout(t,e){if(!(\"container\"in t)&&!this.fallbackContainer)throw new Error(\"Container property is not optional in web\");const{layoutName:i}=t,n=t,o=this.provider.initLayoutViews(n),s=n.container??this.fallbackContainer,r={...this.windowIdentity,layoutName:i},a=new Me(r,s,o,this.connectConfig,e,this.provider);m.registerLayout(e,i,a),this.fallbackContainer=null}async getLayoutSnapshot(t){return t.getLayoutSnapshot()}async handleLastViewRemoved(t){}}class Te{static async init(e){const i=e.getFin().InterApplicationBus.Channel,n=await i.create(`custom-frame-${e.me.uuid}`);return n.setDefaultAction((async(t,{target:e,opts:i},o)=>{const s=n.connections.find((t=>t.name===e.name));if(s)return n.dispatch(s,t,{...i,target:e});throw new Error(`Client with name ${e.name} not found`)})),await t.relayChannelClientApi_1(n,\"layout-relay\"),new Te(e)}constructor(t){this.wire=t,this.viewNames=new Set}normalizeOptions(t,i=\"default\"){const n=this.wire.me.uuid;let{name:o=`internal-generated-view-${e.v4()}`}=t;return o.match(/^internal-generated-view-/)&&this.viewNames.has(o)&&\"duplicate\"===i&&(o=`internal-generated-view-${e.v4()}`),this.viewNames.add(o),{...t,name:o,uuid:n}}closeView(t){this.viewNames.delete(t)}initLayoutViews({layout:t,multiInstanceViewBehavior:e}){return H((t=>{if(\"component\"===t.type&&t.componentState){const i=this.normalizeOptions(t.componentState,e);return{...t,componentState:i}}return t}),t)}}var Ae;const ke=t=>t;Ae=new WeakMap,exports.WebLayoutEntryPoint=class{constructor(e){Ae.set(this,void 0),this.initLayoutManager=async(e,i,{container:n,layoutManagerOverride:o})=>{const s=await Te.init(i),r=o??ke,a=new Pe(i.me,t.__classPrivateFieldGet(this,Ae,\"f\"),s,n),l=new(r(m.createClosedConstructor(a)));return await M(i,l),l},this.applyLayoutSnapshot=async(e,i,n)=>{await i.applyLayoutSnapshot(t.__classPrivateFieldGet(this,Ae,\"f\").platform.layoutSnapshot)},this.createLayout=async(t,e)=>m.createLayout(t,e),this.destroyLayout=async(t,e)=>m.destroyLayout(t,e),t.__classPrivateFieldSet(this,Ae,e,\"f\")}};\n","'use strict'\n\nexports.byteLength = byteLength\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\nfor (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i]\n revLookup[code.charCodeAt(i)] = i\n}\n\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction getLens (b64) {\n var len = b64.length\n\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // Trim off extra bytes after placeholder bytes are found\n // See: https://github.com/beatgammit/base64-js/issues/42\n var validLen = b64.indexOf('=')\n if (validLen === -1) validLen = len\n\n var placeHoldersLen = validLen === len\n ? 0\n : 4 - (validLen % 4)\n\n return [validLen, placeHoldersLen]\n}\n\n// base64 is 4/3 + up to two characters of the original data\nfunction byteLength (b64) {\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction _byteLength (b64, validLen, placeHoldersLen) {\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction toByteArray (b64) {\n var tmp\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n\n var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))\n\n var curByte = 0\n\n // if there are placeholders, only get up to the last complete 4 chars\n var len = placeHoldersLen > 0\n ? validLen - 4\n : validLen\n\n var i\n for (i = 0; i < len; i += 4) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 18) |\n (revLookup[b64.charCodeAt(i + 1)] << 12) |\n (revLookup[b64.charCodeAt(i + 2)] << 6) |\n revLookup[b64.charCodeAt(i + 3)]\n arr[curByte++] = (tmp >> 16) & 0xFF\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 2) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 2) |\n (revLookup[b64.charCodeAt(i + 1)] >> 4)\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 1) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 10) |\n (revLookup[b64.charCodeAt(i + 1)] << 4) |\n (revLookup[b64.charCodeAt(i + 2)] >> 2)\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] +\n lookup[num >> 12 & 0x3F] +\n lookup[num >> 6 & 0x3F] +\n lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n var tmp\n var output = []\n for (var i = start; i < end; i += 3) {\n tmp =\n ((uint8[i] << 16) & 0xFF0000) +\n ((uint8[i + 1] << 8) & 0xFF00) +\n (uint8[i + 2] & 0xFF)\n output.push(tripletToBase64(tmp))\n }\n return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n var tmp\n var len = uint8.length\n var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n var parts = []\n var maxChunkLength = 16383 // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1]\n parts.push(\n lookup[tmp >> 2] +\n lookup[(tmp << 4) & 0x3F] +\n '=='\n )\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + uint8[len - 1]\n parts.push(\n lookup[tmp >> 10] +\n lookup[(tmp >> 4) & 0x3F] +\n lookup[(tmp << 2) & 0x3F] +\n '='\n )\n }\n\n return parts.join('')\n}\n","/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n/* eslint-disable no-proto */\n\n'use strict'\n\nconst base64 = require('base64-js')\nconst ieee754 = require('ieee754')\nconst customInspectSymbol =\n (typeof Symbol === 'function' && typeof Symbol['for'] === 'function') // eslint-disable-line dot-notation\n ? Symbol['for']('nodejs.util.inspect.custom') // eslint-disable-line dot-notation\n : null\n\nexports.Buffer = Buffer\nexports.SlowBuffer = SlowBuffer\nexports.INSPECT_MAX_BYTES = 50\n\nconst K_MAX_LENGTH = 0x7fffffff\nexports.kMaxLength = K_MAX_LENGTH\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Print warning and recommend using `buffer` v4.x which has an Object\n * implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * We report that the browser does not support typed arrays if the are not subclassable\n * using __proto__. Firefox 4-29 lacks support for adding new properties to `Uint8Array`\n * (See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438). IE 10 lacks support\n * for __proto__ and has a buggy typed array implementation.\n */\nBuffer.TYPED_ARRAY_SUPPORT = typedArraySupport()\n\nif (!Buffer.TYPED_ARRAY_SUPPORT && typeof console !== 'undefined' &&\n typeof console.error === 'function') {\n console.error(\n 'This browser lacks typed array (Uint8Array) support which is required by ' +\n '`buffer` v5.x. Use `buffer` v4.x if you require old browser support.'\n )\n}\n\nfunction typedArraySupport () {\n // Can typed array instances can be augmented?\n try {\n const arr = new Uint8Array(1)\n const proto = { foo: function () { return 42 } }\n Object.setPrototypeOf(proto, Uint8Array.prototype)\n Object.setPrototypeOf(arr, proto)\n return arr.foo() === 42\n } catch (e) {\n return false\n }\n}\n\nObject.defineProperty(Buffer.prototype, 'parent', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.buffer\n }\n})\n\nObject.defineProperty(Buffer.prototype, 'offset', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.byteOffset\n }\n})\n\nfunction createBuffer (length) {\n if (length > K_MAX_LENGTH) {\n throw new RangeError('The value \"' + length + '\" is invalid for option \"size\"')\n }\n // Return an augmented `Uint8Array` instance\n const buf = new Uint8Array(length)\n Object.setPrototypeOf(buf, Buffer.prototype)\n return buf\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new TypeError(\n 'The \"string\" argument must be of type string. Received type number'\n )\n }\n return allocUnsafe(arg)\n }\n return from(arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\nfunction from (value, encodingOrOffset, length) {\n if (typeof value === 'string') {\n return fromString(value, encodingOrOffset)\n }\n\n if (ArrayBuffer.isView(value)) {\n return fromArrayView(value)\n }\n\n if (value == null) {\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n }\n\n if (isInstance(value, ArrayBuffer) ||\n (value && isInstance(value.buffer, ArrayBuffer))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof SharedArrayBuffer !== 'undefined' &&\n (isInstance(value, SharedArrayBuffer) ||\n (value && isInstance(value.buffer, SharedArrayBuffer)))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof value === 'number') {\n throw new TypeError(\n 'The \"value\" argument must not be of type number. Received type number'\n )\n }\n\n const valueOf = value.valueOf && value.valueOf()\n if (valueOf != null && valueOf !== value) {\n return Buffer.from(valueOf, encodingOrOffset, length)\n }\n\n const b = fromObject(value)\n if (b) return b\n\n if (typeof Symbol !== 'undefined' && Symbol.toPrimitive != null &&\n typeof value[Symbol.toPrimitive] === 'function') {\n return Buffer.from(value[Symbol.toPrimitive]('string'), encodingOrOffset, length)\n }\n\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n return from(value, encodingOrOffset, length)\n}\n\n// Note: Change prototype *after* Buffer.from is defined to workaround Chrome bug:\n// https://github.com/feross/buffer/pull/148\nObject.setPrototypeOf(Buffer.prototype, Uint8Array.prototype)\nObject.setPrototypeOf(Buffer, Uint8Array)\n\nfunction assertSize (size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be of type number')\n } else if (size < 0) {\n throw new RangeError('The value \"' + size + '\" is invalid for option \"size\"')\n }\n}\n\nfunction alloc (size, fill, encoding) {\n assertSize(size)\n if (size <= 0) {\n return createBuffer(size)\n }\n if (fill !== undefined) {\n // Only pay attention to encoding if it's a string. This\n // prevents accidentally sending in a number that would\n // be interpreted as a start offset.\n return typeof encoding === 'string'\n ? createBuffer(size).fill(fill, encoding)\n : createBuffer(size).fill(fill)\n }\n return createBuffer(size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n return alloc(size, fill, encoding)\n}\n\nfunction allocUnsafe (size) {\n assertSize(size)\n return createBuffer(size < 0 ? 0 : checked(size) | 0)\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n return allocUnsafe(size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n return allocUnsafe(size)\n}\n\nfunction fromString (string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8'\n }\n\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n\n const length = byteLength(string, encoding) | 0\n let buf = createBuffer(length)\n\n const actual = buf.write(string, encoding)\n\n if (actual !== length) {\n // Writing a hex string, for example, that contains invalid characters will\n // cause everything after the first invalid character to be ignored. (e.g.\n // 'abxxcd' will be treated as 'ab')\n buf = buf.slice(0, actual)\n }\n\n return buf\n}\n\nfunction fromArrayLike (array) {\n const length = array.length < 0 ? 0 : checked(array.length) | 0\n const buf = createBuffer(length)\n for (let i = 0; i < length; i += 1) {\n buf[i] = array[i] & 255\n }\n return buf\n}\n\nfunction fromArrayView (arrayView) {\n if (isInstance(arrayView, Uint8Array)) {\n const copy = new Uint8Array(arrayView)\n return fromArrayBuffer(copy.buffer, copy.byteOffset, copy.byteLength)\n }\n return fromArrayLike(arrayView)\n}\n\nfunction fromArrayBuffer (array, byteOffset, length) {\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\"offset\" is outside of buffer bounds')\n }\n\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\"length\" is outside of buffer bounds')\n }\n\n let buf\n if (byteOffset === undefined && length === undefined) {\n buf = new Uint8Array(array)\n } else if (length === undefined) {\n buf = new Uint8Array(array, byteOffset)\n } else {\n buf = new Uint8Array(array, byteOffset, length)\n }\n\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(buf, Buffer.prototype)\n\n return buf\n}\n\nfunction fromObject (obj) {\n if (Buffer.isBuffer(obj)) {\n const len = checked(obj.length) | 0\n const buf = createBuffer(len)\n\n if (buf.length === 0) {\n return buf\n }\n\n obj.copy(buf, 0, 0, len)\n return buf\n }\n\n if (obj.length !== undefined) {\n if (typeof obj.length !== 'number' || numberIsNaN(obj.length)) {\n return createBuffer(0)\n }\n return fromArrayLike(obj)\n }\n\n if (obj.type === 'Buffer' && Array.isArray(obj.data)) {\n return fromArrayLike(obj.data)\n }\n}\n\nfunction checked (length) {\n // Note: cannot use `length < K_MAX_LENGTH` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= K_MAX_LENGTH) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + K_MAX_LENGTH.toString(16) + ' bytes')\n }\n return length | 0\n}\n\nfunction SlowBuffer (length) {\n if (+length != length) { // eslint-disable-line eqeqeq\n length = 0\n }\n return Buffer.alloc(+length)\n}\n\nBuffer.isBuffer = function isBuffer (b) {\n return b != null && b._isBuffer === true &&\n b !== Buffer.prototype // so Buffer.isBuffer(Buffer.prototype) will be false\n}\n\nBuffer.compare = function compare (a, b) {\n if (isInstance(a, Uint8Array)) a = Buffer.from(a, a.offset, a.byteLength)\n if (isInstance(b, Uint8Array)) b = Buffer.from(b, b.offset, b.byteLength)\n if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n throw new TypeError(\n 'The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array'\n )\n }\n\n if (a === b) return 0\n\n let x = a.length\n let y = b.length\n\n for (let i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i]\n y = b[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n switch (String(encoding).toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'latin1':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return true\n default:\n return false\n }\n}\n\nBuffer.concat = function concat (list, length) {\n if (!Array.isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n\n if (list.length === 0) {\n return Buffer.alloc(0)\n }\n\n let i\n if (length === undefined) {\n length = 0\n for (i = 0; i < list.length; ++i) {\n length += list[i].length\n }\n }\n\n const buffer = Buffer.allocUnsafe(length)\n let pos = 0\n for (i = 0; i < list.length; ++i) {\n let buf = list[i]\n if (isInstance(buf, Uint8Array)) {\n if (pos + buf.length > buffer.length) {\n if (!Buffer.isBuffer(buf)) buf = Buffer.from(buf)\n buf.copy(buffer, pos)\n } else {\n Uint8Array.prototype.set.call(\n buffer,\n buf,\n pos\n )\n }\n } else if (!Buffer.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n } else {\n buf.copy(buffer, pos)\n }\n pos += buf.length\n }\n return buffer\n}\n\nfunction byteLength (string, encoding) {\n if (Buffer.isBuffer(string)) {\n return string.length\n }\n if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) {\n return string.byteLength\n }\n if (typeof string !== 'string') {\n throw new TypeError(\n 'The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. ' +\n 'Received type ' + typeof string\n )\n }\n\n const len = string.length\n const mustMatch = (arguments.length > 2 && arguments[2] === true)\n if (!mustMatch && len === 0) return 0\n\n // Use a for loop to avoid recursion\n let loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'ascii':\n case 'latin1':\n case 'binary':\n return len\n case 'utf8':\n case 'utf-8':\n return utf8ToBytes(string).length\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return len * 2\n case 'hex':\n return len >>> 1\n case 'base64':\n return base64ToBytes(string).length\n default:\n if (loweredCase) {\n return mustMatch ? -1 : utf8ToBytes(string).length // assume utf8\n }\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n let loweredCase = false\n\n // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n // property of a typed array.\n\n // This behaves neither like String nor Uint8Array in that we set start/end\n // to their upper/lower bounds if the value passed is out of range.\n // undefined is handled specially as per ECMA-262 6th Edition,\n // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n if (start === undefined || start < 0) {\n start = 0\n }\n // Return early if start > this.length. Done here to prevent potential uint32\n // coercion fail below.\n if (start > this.length) {\n return ''\n }\n\n if (end === undefined || end > this.length) {\n end = this.length\n }\n\n if (end <= 0) {\n return ''\n }\n\n // Force coercion to uint32. This will also coerce falsey/NaN values to 0.\n end >>>= 0\n start >>>= 0\n\n if (end <= start) {\n return ''\n }\n\n if (!encoding) encoding = 'utf8'\n\n while (true) {\n switch (encoding) {\n case 'hex':\n return hexSlice(this, start, end)\n\n case 'utf8':\n case 'utf-8':\n return utf8Slice(this, start, end)\n\n case 'ascii':\n return asciiSlice(this, start, end)\n\n case 'latin1':\n case 'binary':\n return latin1Slice(this, start, end)\n\n case 'base64':\n return base64Slice(this, start, end)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return utf16leSlice(this, start, end)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = (encoding + '').toLowerCase()\n loweredCase = true\n }\n }\n}\n\n// This property is used by `Buffer.isBuffer` (and the `is-buffer` npm package)\n// to detect a Buffer instance. It's not possible to use `instanceof Buffer`\n// reliably in a browserify context because there could be multiple different\n// copies of the 'buffer' package in use. This method works even for Buffer\n// instances that were created from another copy of the `buffer` package.\n// See: https://github.com/feross/buffer/issues/154\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n const i = b[n]\n b[n] = b[m]\n b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n const len = this.length\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits')\n }\n for (let i = 0; i < len; i += 2) {\n swap(this, i, i + 1)\n }\n return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n const len = this.length\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits')\n }\n for (let i = 0; i < len; i += 4) {\n swap(this, i, i + 3)\n swap(this, i + 1, i + 2)\n }\n return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n const len = this.length\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits')\n }\n for (let i = 0; i < len; i += 8) {\n swap(this, i, i + 7)\n swap(this, i + 1, i + 6)\n swap(this, i + 2, i + 5)\n swap(this, i + 3, i + 4)\n }\n return this\n}\n\nBuffer.prototype.toString = function toString () {\n const length = this.length\n if (length === 0) return ''\n if (arguments.length === 0) return utf8Slice(this, 0, length)\n return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.toLocaleString = Buffer.prototype.toString\n\nBuffer.prototype.equals = function equals (b) {\n if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n if (this === b) return true\n return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n let str = ''\n const max = exports.INSPECT_MAX_BYTES\n str = this.toString('hex', 0, max).replace(/(.{2})/g, '$1 ').trim()\n if (this.length > max) str += ' ... '\n return ''\n}\nif (customInspectSymbol) {\n Buffer.prototype[customInspectSymbol] = Buffer.prototype.inspect\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n if (isInstance(target, Uint8Array)) {\n target = Buffer.from(target, target.offset, target.byteLength)\n }\n if (!Buffer.isBuffer(target)) {\n throw new TypeError(\n 'The \"target\" argument must be one of type Buffer or Uint8Array. ' +\n 'Received type ' + (typeof target)\n )\n }\n\n if (start === undefined) {\n start = 0\n }\n if (end === undefined) {\n end = target ? target.length : 0\n }\n if (thisStart === undefined) {\n thisStart = 0\n }\n if (thisEnd === undefined) {\n thisEnd = this.length\n }\n\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError('out of range index')\n }\n\n if (thisStart >= thisEnd && start >= end) {\n return 0\n }\n if (thisStart >= thisEnd) {\n return -1\n }\n if (start >= end) {\n return 1\n }\n\n start >>>= 0\n end >>>= 0\n thisStart >>>= 0\n thisEnd >>>= 0\n\n if (this === target) return 0\n\n let x = thisEnd - thisStart\n let y = end - start\n const len = Math.min(x, y)\n\n const thisCopy = this.slice(thisStart, thisEnd)\n const targetCopy = target.slice(start, end)\n\n for (let i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i]\n y = targetCopy[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (numberIsNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [val], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n let indexSize = 1\n let arrLength = arr.length\n let valLength = val.length\n\n if (encoding !== undefined) {\n encoding = String(encoding).toLowerCase()\n if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n encoding === 'utf16le' || encoding === 'utf-16le') {\n if (arr.length < 2 || val.length < 2) {\n return -1\n }\n indexSize = 2\n arrLength /= 2\n valLength /= 2\n byteOffset /= 2\n }\n }\n\n function read (buf, i) {\n if (indexSize === 1) {\n return buf[i]\n } else {\n return buf.readUInt16BE(i * indexSize)\n }\n }\n\n let i\n if (dir) {\n let foundIndex = -1\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1) foundIndex = i\n if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n } else {\n if (foundIndex !== -1) i -= i - foundIndex\n foundIndex = -1\n }\n }\n } else {\n if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n for (i = byteOffset; i >= 0; i--) {\n let found = true\n for (let j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false\n break\n }\n }\n if (found) return i\n }\n }\n\n return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n offset = Number(offset) || 0\n const remaining = buf.length - offset\n if (!length) {\n length = remaining\n } else {\n length = Number(length)\n if (length > remaining) {\n length = remaining\n }\n }\n\n const strLen = string.length\n\n if (length > strLen / 2) {\n length = strLen / 2\n }\n let i\n for (i = 0; i < length; ++i) {\n const parsed = parseInt(string.substr(i * 2, 2), 16)\n if (numberIsNaN(parsed)) return i\n buf[offset + i] = parsed\n }\n return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n // Buffer#write(string)\n if (offset === undefined) {\n encoding = 'utf8'\n length = this.length\n offset = 0\n // Buffer#write(string, encoding)\n } else if (length === undefined && typeof offset === 'string') {\n encoding = offset\n length = this.length\n offset = 0\n // Buffer#write(string, offset[, length][, encoding])\n } else if (isFinite(offset)) {\n offset = offset >>> 0\n if (isFinite(length)) {\n length = length >>> 0\n if (encoding === undefined) encoding = 'utf8'\n } else {\n encoding = length\n length = undefined\n }\n } else {\n throw new Error(\n 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n )\n }\n\n const remaining = this.length - offset\n if (length === undefined || length > remaining) length = remaining\n\n if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n throw new RangeError('Attempt to write outside buffer bounds')\n }\n\n if (!encoding) encoding = 'utf8'\n\n let loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'hex':\n return hexWrite(this, string, offset, length)\n\n case 'utf8':\n case 'utf-8':\n return utf8Write(this, string, offset, length)\n\n case 'ascii':\n case 'latin1':\n case 'binary':\n return asciiWrite(this, string, offset, length)\n\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return base64Write(this, string, offset, length)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return ucs2Write(this, string, offset, length)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0)\n }\n}\n\nfunction base64Slice (buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf)\n } else {\n return base64.fromByteArray(buf.slice(start, end))\n }\n}\n\nfunction utf8Slice (buf, start, end) {\n end = Math.min(buf.length, end)\n const res = []\n\n let i = start\n while (i < end) {\n const firstByte = buf[i]\n let codePoint = null\n let bytesPerSequence = (firstByte > 0xEF)\n ? 4\n : (firstByte > 0xDF)\n ? 3\n : (firstByte > 0xBF)\n ? 2\n : 1\n\n if (i + bytesPerSequence <= end) {\n let secondByte, thirdByte, fourthByte, tempCodePoint\n\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 0x80) {\n codePoint = firstByte\n }\n break\n case 2:\n secondByte = buf[i + 1]\n if ((secondByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n if (tempCodePoint > 0x7F) {\n codePoint = tempCodePoint\n }\n }\n break\n case 3:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n codePoint = tempCodePoint\n }\n }\n break\n case 4:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n fourthByte = buf[i + 3]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n codePoint = tempCodePoint\n }\n }\n }\n }\n\n if (codePoint === null) {\n // we did not generate a valid codePoint so insert a\n // replacement char (U+FFFD) and advance only 1 byte\n codePoint = 0xFFFD\n bytesPerSequence = 1\n } else if (codePoint > 0xFFFF) {\n // encode to utf16 (surrogate pair dance)\n codePoint -= 0x10000\n res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n codePoint = 0xDC00 | codePoint & 0x3FF\n }\n\n res.push(codePoint)\n i += bytesPerSequence\n }\n\n return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nconst MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n const len = codePoints.length\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n }\n\n // Decode in chunks to avoid \"call stack size exceeded\".\n let res = ''\n let i = 0\n while (i < len) {\n res += String.fromCharCode.apply(\n String,\n codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n )\n }\n return res\n}\n\nfunction asciiSlice (buf, start, end) {\n let ret = ''\n end = Math.min(buf.length, end)\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F)\n }\n return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n let ret = ''\n end = Math.min(buf.length, end)\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i])\n }\n return ret\n}\n\nfunction hexSlice (buf, start, end) {\n const len = buf.length\n\n if (!start || start < 0) start = 0\n if (!end || end < 0 || end > len) end = len\n\n let out = ''\n for (let i = start; i < end; ++i) {\n out += hexSliceLookupTable[buf[i]]\n }\n return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n const bytes = buf.slice(start, end)\n let res = ''\n // If bytes.length is odd, the last 8 bits must be ignored (same as node.js)\n for (let i = 0; i < bytes.length - 1; i += 2) {\n res += String.fromCharCode(bytes[i] + (bytes[i + 1] * 256))\n }\n return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n const len = this.length\n start = ~~start\n end = end === undefined ? len : ~~end\n\n if (start < 0) {\n start += len\n if (start < 0) start = 0\n } else if (start > len) {\n start = len\n }\n\n if (end < 0) {\n end += len\n if (end < 0) end = 0\n } else if (end > len) {\n end = len\n }\n\n if (end < start) end = start\n\n const newBuf = this.subarray(start, end)\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(newBuf, Buffer.prototype)\n\n return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUintLE =\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let val = this[offset]\n let mul = 1\n let i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUintBE =\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n checkOffset(offset, byteLength, this.length)\n }\n\n let val = this[offset + --byteLength]\n let mul = 1\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUint8 =\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n return this[offset]\n}\n\nBuffer.prototype.readUint16LE =\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUint16BE =\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUint32LE =\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return ((this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16)) +\n (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUint32BE =\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] * 0x1000000) +\n ((this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n this[offset + 3])\n}\n\nBuffer.prototype.readBigUInt64LE = defineBigIntMethod(function readBigUInt64LE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const lo = first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24\n\n const hi = this[++offset] +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n last * 2 ** 24\n\n return BigInt(lo) + (BigInt(hi) << BigInt(32))\n})\n\nBuffer.prototype.readBigUInt64BE = defineBigIntMethod(function readBigUInt64BE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const hi = first * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset]\n\n const lo = this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last\n\n return (BigInt(hi) << BigInt(32)) + BigInt(lo)\n})\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let val = this[offset]\n let mul = 1\n let i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let i = byteLength\n let mul = 1\n let val = this[offset + --i]\n while (i > 0 && (mul *= 0x100)) {\n val += this[offset + --i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n if (!(this[offset] & 0x80)) return (this[offset])\n return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n const val = this[offset] | (this[offset + 1] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n const val = this[offset + 1] | (this[offset] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16) |\n (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] << 24) |\n (this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n (this[offset + 3])\n}\n\nBuffer.prototype.readBigInt64LE = defineBigIntMethod(function readBigInt64LE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const val = this[offset + 4] +\n this[offset + 5] * 2 ** 8 +\n this[offset + 6] * 2 ** 16 +\n (last << 24) // Overflow\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24)\n})\n\nBuffer.prototype.readBigInt64BE = defineBigIntMethod(function readBigInt64BE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const val = (first << 24) + // Overflow\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset]\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last)\n})\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUintLE =\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n let mul = 1\n let i = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUintBE =\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n let i = byteLength - 1\n let mul = 1\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUint8 =\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeUint16LE =\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeUint16BE =\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeUint32LE =\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset + 3] = (value >>> 24)\n this[offset + 2] = (value >>> 16)\n this[offset + 1] = (value >>> 8)\n this[offset] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeUint32BE =\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nfunction wrtBigUInt64LE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7)\n\n let lo = Number(value & BigInt(0xffffffff))\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n return offset\n}\n\nfunction wrtBigUInt64BE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7)\n\n let lo = Number(value & BigInt(0xffffffff))\n buf[offset + 7] = lo\n lo = lo >> 8\n buf[offset + 6] = lo\n lo = lo >> 8\n buf[offset + 5] = lo\n lo = lo >> 8\n buf[offset + 4] = lo\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n buf[offset + 3] = hi\n hi = hi >> 8\n buf[offset + 2] = hi\n hi = hi >> 8\n buf[offset + 1] = hi\n hi = hi >> 8\n buf[offset] = hi\n return offset + 8\n}\n\nBuffer.prototype.writeBigUInt64LE = defineBigIntMethod(function writeBigUInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeBigUInt64BE = defineBigIntMethod(function writeBigUInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n let i = 0\n let mul = 1\n let sub = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n let i = byteLength - 1\n let mul = 1\n let sub = 0\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n if (value < 0) value = 0xff + value + 1\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n this[offset + 2] = (value >>> 16)\n this[offset + 3] = (value >>> 24)\n return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (value < 0) value = 0xffffffff + value + 1\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeBigInt64LE = defineBigIntMethod(function writeBigInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nBuffer.prototype.writeBigInt64BE = defineBigIntMethod(function writeBigInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n }\n ieee754.write(buf, value, offset, littleEndian, 23, 4)\n return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n }\n ieee754.write(buf, value, offset, littleEndian, 52, 8)\n return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n if (!Buffer.isBuffer(target)) throw new TypeError('argument should be a Buffer')\n if (!start) start = 0\n if (!end && end !== 0) end = this.length\n if (targetStart >= target.length) targetStart = target.length\n if (!targetStart) targetStart = 0\n if (end > 0 && end < start) end = start\n\n // Copy 0 bytes; we're done\n if (end === start) return 0\n if (target.length === 0 || this.length === 0) return 0\n\n // Fatal error conditions\n if (targetStart < 0) {\n throw new RangeError('targetStart out of bounds')\n }\n if (start < 0 || start >= this.length) throw new RangeError('Index out of range')\n if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n // Are we oob?\n if (end > this.length) end = this.length\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start\n }\n\n const len = end - start\n\n if (this === target && typeof Uint8Array.prototype.copyWithin === 'function') {\n // Use built-in when available, missing from IE11\n this.copyWithin(targetStart, start, end)\n } else {\n Uint8Array.prototype.set.call(\n target,\n this.subarray(start, end),\n targetStart\n )\n }\n\n return len\n}\n\n// Usage:\n// buffer.fill(number[, offset[, end]])\n// buffer.fill(buffer[, offset[, end]])\n// buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n // Handle string cases:\n if (typeof val === 'string') {\n if (typeof start === 'string') {\n encoding = start\n start = 0\n end = this.length\n } else if (typeof end === 'string') {\n encoding = end\n end = this.length\n }\n if (encoding !== undefined && typeof encoding !== 'string') {\n throw new TypeError('encoding must be a string')\n }\n if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n if (val.length === 1) {\n const code = val.charCodeAt(0)\n if ((encoding === 'utf8' && code < 128) ||\n encoding === 'latin1') {\n // Fast path: If `val` fits into a single byte, use that numeric value.\n val = code\n }\n }\n } else if (typeof val === 'number') {\n val = val & 255\n } else if (typeof val === 'boolean') {\n val = Number(val)\n }\n\n // Invalid ranges are not set to a default, so can range check early.\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError('Out of range index')\n }\n\n if (end <= start) {\n return this\n }\n\n start = start >>> 0\n end = end === undefined ? this.length : end >>> 0\n\n if (!val) val = 0\n\n let i\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val\n }\n } else {\n const bytes = Buffer.isBuffer(val)\n ? val\n : Buffer.from(val, encoding)\n const len = bytes.length\n if (len === 0) {\n throw new TypeError('The value \"' + val +\n '\" is invalid for argument \"value\"')\n }\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len]\n }\n }\n\n return this\n}\n\n// CUSTOM ERRORS\n// =============\n\n// Simplified versions from Node, changed for Buffer-only usage\nconst errors = {}\nfunction E (sym, getMessage, Base) {\n errors[sym] = class NodeError extends Base {\n constructor () {\n super()\n\n Object.defineProperty(this, 'message', {\n value: getMessage.apply(this, arguments),\n writable: true,\n configurable: true\n })\n\n // Add the error code to the name to include it in the stack trace.\n this.name = `${this.name} [${sym}]`\n // Access the stack to generate the error message including the error code\n // from the name.\n this.stack // eslint-disable-line no-unused-expressions\n // Reset the name to the actual name.\n delete this.name\n }\n\n get code () {\n return sym\n }\n\n set code (value) {\n Object.defineProperty(this, 'code', {\n configurable: true,\n enumerable: true,\n value,\n writable: true\n })\n }\n\n toString () {\n return `${this.name} [${sym}]: ${this.message}`\n }\n }\n}\n\nE('ERR_BUFFER_OUT_OF_BOUNDS',\n function (name) {\n if (name) {\n return `${name} is outside of buffer bounds`\n }\n\n return 'Attempt to access memory outside buffer bounds'\n }, RangeError)\nE('ERR_INVALID_ARG_TYPE',\n function (name, actual) {\n return `The \"${name}\" argument must be of type number. Received type ${typeof actual}`\n }, TypeError)\nE('ERR_OUT_OF_RANGE',\n function (str, range, input) {\n let msg = `The value of \"${str}\" is out of range.`\n let received = input\n if (Number.isInteger(input) && Math.abs(input) > 2 ** 32) {\n received = addNumericalSeparator(String(input))\n } else if (typeof input === 'bigint') {\n received = String(input)\n if (input > BigInt(2) ** BigInt(32) || input < -(BigInt(2) ** BigInt(32))) {\n received = addNumericalSeparator(received)\n }\n received += 'n'\n }\n msg += ` It must be ${range}. Received ${received}`\n return msg\n }, RangeError)\n\nfunction addNumericalSeparator (val) {\n let res = ''\n let i = val.length\n const start = val[0] === '-' ? 1 : 0\n for (; i >= start + 4; i -= 3) {\n res = `_${val.slice(i - 3, i)}${res}`\n }\n return `${val.slice(0, i)}${res}`\n}\n\n// CHECK FUNCTIONS\n// ===============\n\nfunction checkBounds (buf, offset, byteLength) {\n validateNumber(offset, 'offset')\n if (buf[offset] === undefined || buf[offset + byteLength] === undefined) {\n boundsError(offset, buf.length - (byteLength + 1))\n }\n}\n\nfunction checkIntBI (value, min, max, buf, offset, byteLength) {\n if (value > max || value < min) {\n const n = typeof min === 'bigint' ? 'n' : ''\n let range\n if (byteLength > 3) {\n if (min === 0 || min === BigInt(0)) {\n range = `>= 0${n} and < 2${n} ** ${(byteLength + 1) * 8}${n}`\n } else {\n range = `>= -(2${n} ** ${(byteLength + 1) * 8 - 1}${n}) and < 2 ** ` +\n `${(byteLength + 1) * 8 - 1}${n}`\n }\n } else {\n range = `>= ${min}${n} and <= ${max}${n}`\n }\n throw new errors.ERR_OUT_OF_RANGE('value', range, value)\n }\n checkBounds(buf, offset, byteLength)\n}\n\nfunction validateNumber (value, name) {\n if (typeof value !== 'number') {\n throw new errors.ERR_INVALID_ARG_TYPE(name, 'number', value)\n }\n}\n\nfunction boundsError (value, length, type) {\n if (Math.floor(value) !== value) {\n validateNumber(value, type)\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset', 'an integer', value)\n }\n\n if (length < 0) {\n throw new errors.ERR_BUFFER_OUT_OF_BOUNDS()\n }\n\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset',\n `>= ${type ? 1 : 0} and <= ${length}`,\n value)\n}\n\n// HELPER FUNCTIONS\n// ================\n\nconst INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n // Node takes equal signs as end of the Base64 encoding\n str = str.split('=')[0]\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = str.trim().replace(INVALID_BASE64_RE, '')\n // Node converts strings with length < 2 to ''\n if (str.length < 2) return ''\n // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n while (str.length % 4 !== 0) {\n str = str + '='\n }\n return str\n}\n\nfunction utf8ToBytes (string, units) {\n units = units || Infinity\n let codePoint\n const length = string.length\n let leadSurrogate = null\n const bytes = []\n\n for (let i = 0; i < length; ++i) {\n codePoint = string.charCodeAt(i)\n\n // is surrogate component\n if (codePoint > 0xD7FF && codePoint < 0xE000) {\n // last char was a lead\n if (!leadSurrogate) {\n // no lead yet\n if (codePoint > 0xDBFF) {\n // unexpected trail\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n } else if (i + 1 === length) {\n // unpaired lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n }\n\n // valid lead\n leadSurrogate = codePoint\n\n continue\n }\n\n // 2 leads in a row\n if (codePoint < 0xDC00) {\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n leadSurrogate = codePoint\n continue\n }\n\n // valid surrogate pair\n codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n } else if (leadSurrogate) {\n // valid bmp char, but last char was a lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n }\n\n leadSurrogate = null\n\n // encode utf8\n if (codePoint < 0x80) {\n if ((units -= 1) < 0) break\n bytes.push(codePoint)\n } else if (codePoint < 0x800) {\n if ((units -= 2) < 0) break\n bytes.push(\n codePoint >> 0x6 | 0xC0,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x10000) {\n if ((units -= 3) < 0) break\n bytes.push(\n codePoint >> 0xC | 0xE0,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x110000) {\n if ((units -= 4) < 0) break\n bytes.push(\n codePoint >> 0x12 | 0xF0,\n codePoint >> 0xC & 0x3F | 0x80,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else {\n throw new Error('Invalid code point')\n }\n }\n\n return bytes\n}\n\nfunction asciiToBytes (str) {\n const byteArray = []\n for (let i = 0; i < str.length; ++i) {\n // Node's code seems to be doing this and not & 0x7F..\n byteArray.push(str.charCodeAt(i) & 0xFF)\n }\n return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n let c, hi, lo\n const byteArray = []\n for (let i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0) break\n\n c = str.charCodeAt(i)\n hi = c >> 8\n lo = c % 256\n byteArray.push(lo)\n byteArray.push(hi)\n }\n\n return byteArray\n}\n\nfunction base64ToBytes (str) {\n return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n let i\n for (i = 0; i < length; ++i) {\n if ((i + offset >= dst.length) || (i >= src.length)) break\n dst[i + offset] = src[i]\n }\n return i\n}\n\n// ArrayBuffer or Uint8Array objects from other contexts (i.e. iframes) do not pass\n// the `instanceof` check but they should be treated as of that type.\n// See: https://github.com/feross/buffer/issues/166\nfunction isInstance (obj, type) {\n return obj instanceof type ||\n (obj != null && obj.constructor != null && obj.constructor.name != null &&\n obj.constructor.name === type.name)\n}\nfunction numberIsNaN (obj) {\n // For IE11 support\n return obj !== obj // eslint-disable-line no-self-compare\n}\n\n// Create lookup table for `toString('hex')`\n// See: https://github.com/feross/buffer/issues/219\nconst hexSliceLookupTable = (function () {\n const alphabet = '0123456789abcdef'\n const table = new Array(256)\n for (let i = 0; i < 16; ++i) {\n const i16 = i * 16\n for (let j = 0; j < 16; ++j) {\n table[i16 + j] = alphabet[i] + alphabet[j]\n }\n }\n return table\n})()\n\n// Return not function with Error if BigInt not supported\nfunction defineBigIntMethod (fn) {\n return typeof BigInt === 'undefined' ? BufferBigIntNotDefined : fn\n}\n\nfunction BufferBigIntNotDefined () {\n throw new Error('BigInt not supported')\n}\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\nvar R = typeof Reflect === 'object' ? Reflect : null\nvar ReflectApply = R && typeof R.apply === 'function'\n ? R.apply\n : function ReflectApply(target, receiver, args) {\n return Function.prototype.apply.call(target, receiver, args);\n }\n\nvar ReflectOwnKeys\nif (R && typeof R.ownKeys === 'function') {\n ReflectOwnKeys = R.ownKeys\n} else if (Object.getOwnPropertySymbols) {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target)\n .concat(Object.getOwnPropertySymbols(target));\n };\n} else {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target);\n };\n}\n\nfunction ProcessEmitWarning(warning) {\n if (console && console.warn) console.warn(warning);\n}\n\nvar NumberIsNaN = Number.isNaN || function NumberIsNaN(value) {\n return value !== value;\n}\n\nfunction EventEmitter() {\n EventEmitter.init.call(this);\n}\nmodule.exports = EventEmitter;\nmodule.exports.once = once;\n\n// Backwards-compat with node 0.10.x\nEventEmitter.EventEmitter = EventEmitter;\n\nEventEmitter.prototype._events = undefined;\nEventEmitter.prototype._eventsCount = 0;\nEventEmitter.prototype._maxListeners = undefined;\n\n// By default EventEmitters will print a warning if more than 10 listeners are\n// added to it. This is a useful default which helps finding memory leaks.\nvar defaultMaxListeners = 10;\n\nfunction checkListener(listener) {\n if (typeof listener !== 'function') {\n throw new TypeError('The \"listener\" argument must be of type Function. Received type ' + typeof listener);\n }\n}\n\nObject.defineProperty(EventEmitter, 'defaultMaxListeners', {\n enumerable: true,\n get: function() {\n return defaultMaxListeners;\n },\n set: function(arg) {\n if (typeof arg !== 'number' || arg < 0 || NumberIsNaN(arg)) {\n throw new RangeError('The value of \"defaultMaxListeners\" is out of range. It must be a non-negative number. Received ' + arg + '.');\n }\n defaultMaxListeners = arg;\n }\n});\n\nEventEmitter.init = function() {\n\n if (this._events === undefined ||\n this._events === Object.getPrototypeOf(this)._events) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n }\n\n this._maxListeners = this._maxListeners || undefined;\n};\n\n// Obviously not all Emitters should be limited to 10. This function allows\n// that to be increased. Set to zero for unlimited.\nEventEmitter.prototype.setMaxListeners = function setMaxListeners(n) {\n if (typeof n !== 'number' || n < 0 || NumberIsNaN(n)) {\n throw new RangeError('The value of \"n\" is out of range. It must be a non-negative number. Received ' + n + '.');\n }\n this._maxListeners = n;\n return this;\n};\n\nfunction _getMaxListeners(that) {\n if (that._maxListeners === undefined)\n return EventEmitter.defaultMaxListeners;\n return that._maxListeners;\n}\n\nEventEmitter.prototype.getMaxListeners = function getMaxListeners() {\n return _getMaxListeners(this);\n};\n\nEventEmitter.prototype.emit = function emit(type) {\n var args = [];\n for (var i = 1; i < arguments.length; i++) args.push(arguments[i]);\n var doError = (type === 'error');\n\n var events = this._events;\n if (events !== undefined)\n doError = (doError && events.error === undefined);\n else if (!doError)\n return false;\n\n // If there is no 'error' event listener then throw.\n if (doError) {\n var er;\n if (args.length > 0)\n er = args[0];\n if (er instanceof Error) {\n // Note: The comments on the `throw` lines are intentional, they show\n // up in Node's output if this results in an unhandled exception.\n throw er; // Unhandled 'error' event\n }\n // At least give some kind of context to the user\n var err = new Error('Unhandled error.' + (er ? ' (' + er.message + ')' : ''));\n err.context = er;\n throw err; // Unhandled 'error' event\n }\n\n var handler = events[type];\n\n if (handler === undefined)\n return false;\n\n if (typeof handler === 'function') {\n ReflectApply(handler, this, args);\n } else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n ReflectApply(listeners[i], this, args);\n }\n\n return true;\n};\n\nfunction _addListener(target, type, listener, prepend) {\n var m;\n var events;\n var existing;\n\n checkListener(listener);\n\n events = target._events;\n if (events === undefined) {\n events = target._events = Object.create(null);\n target._eventsCount = 0;\n } else {\n // To avoid recursion in the case that type === \"newListener\"! Before\n // adding it to the listeners, first emit \"newListener\".\n if (events.newListener !== undefined) {\n target.emit('newListener', type,\n listener.listener ? listener.listener : listener);\n\n // Re-assign `events` because a newListener handler could have caused the\n // this._events to be assigned to a new object\n events = target._events;\n }\n existing = events[type];\n }\n\n if (existing === undefined) {\n // Optimize the case of one listener. Don't need the extra array object.\n existing = events[type] = listener;\n ++target._eventsCount;\n } else {\n if (typeof existing === 'function') {\n // Adding the second element, need to change to array.\n existing = events[type] =\n prepend ? [listener, existing] : [existing, listener];\n // If we've already got an array, just append.\n } else if (prepend) {\n existing.unshift(listener);\n } else {\n existing.push(listener);\n }\n\n // Check for listener leak\n m = _getMaxListeners(target);\n if (m > 0 && existing.length > m && !existing.warned) {\n existing.warned = true;\n // No error code for this since it is a Warning\n // eslint-disable-next-line no-restricted-syntax\n var w = new Error('Possible EventEmitter memory leak detected. ' +\n existing.length + ' ' + String(type) + ' listeners ' +\n 'added. Use emitter.setMaxListeners() to ' +\n 'increase limit');\n w.name = 'MaxListenersExceededWarning';\n w.emitter = target;\n w.type = type;\n w.count = existing.length;\n ProcessEmitWarning(w);\n }\n }\n\n return target;\n}\n\nEventEmitter.prototype.addListener = function addListener(type, listener) {\n return _addListener(this, type, listener, false);\n};\n\nEventEmitter.prototype.on = EventEmitter.prototype.addListener;\n\nEventEmitter.prototype.prependListener =\n function prependListener(type, listener) {\n return _addListener(this, type, listener, true);\n };\n\nfunction onceWrapper() {\n if (!this.fired) {\n this.target.removeListener(this.type, this.wrapFn);\n this.fired = true;\n if (arguments.length === 0)\n return this.listener.call(this.target);\n return this.listener.apply(this.target, arguments);\n }\n}\n\nfunction _onceWrap(target, type, listener) {\n var state = { fired: false, wrapFn: undefined, target: target, type: type, listener: listener };\n var wrapped = onceWrapper.bind(state);\n wrapped.listener = listener;\n state.wrapFn = wrapped;\n return wrapped;\n}\n\nEventEmitter.prototype.once = function once(type, listener) {\n checkListener(listener);\n this.on(type, _onceWrap(this, type, listener));\n return this;\n};\n\nEventEmitter.prototype.prependOnceListener =\n function prependOnceListener(type, listener) {\n checkListener(listener);\n this.prependListener(type, _onceWrap(this, type, listener));\n return this;\n };\n\n// Emits a 'removeListener' event if and only if the listener was removed.\nEventEmitter.prototype.removeListener =\n function removeListener(type, listener) {\n var list, events, position, i, originalListener;\n\n checkListener(listener);\n\n events = this._events;\n if (events === undefined)\n return this;\n\n list = events[type];\n if (list === undefined)\n return this;\n\n if (list === listener || list.listener === listener) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else {\n delete events[type];\n if (events.removeListener)\n this.emit('removeListener', type, list.listener || listener);\n }\n } else if (typeof list !== 'function') {\n position = -1;\n\n for (i = list.length - 1; i >= 0; i--) {\n if (list[i] === listener || list[i].listener === listener) {\n originalListener = list[i].listener;\n position = i;\n break;\n }\n }\n\n if (position < 0)\n return this;\n\n if (position === 0)\n list.shift();\n else {\n spliceOne(list, position);\n }\n\n if (list.length === 1)\n events[type] = list[0];\n\n if (events.removeListener !== undefined)\n this.emit('removeListener', type, originalListener || listener);\n }\n\n return this;\n };\n\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\n\nEventEmitter.prototype.removeAllListeners =\n function removeAllListeners(type) {\n var listeners, events, i;\n\n events = this._events;\n if (events === undefined)\n return this;\n\n // not listening for removeListener, no need to emit\n if (events.removeListener === undefined) {\n if (arguments.length === 0) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n } else if (events[type] !== undefined) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else\n delete events[type];\n }\n return this;\n }\n\n // emit removeListener for all listeners on all events\n if (arguments.length === 0) {\n var keys = Object.keys(events);\n var key;\n for (i = 0; i < keys.length; ++i) {\n key = keys[i];\n if (key === 'removeListener') continue;\n this.removeAllListeners(key);\n }\n this.removeAllListeners('removeListener');\n this._events = Object.create(null);\n this._eventsCount = 0;\n return this;\n }\n\n listeners = events[type];\n\n if (typeof listeners === 'function') {\n this.removeListener(type, listeners);\n } else if (listeners !== undefined) {\n // LIFO order\n for (i = listeners.length - 1; i >= 0; i--) {\n this.removeListener(type, listeners[i]);\n }\n }\n\n return this;\n };\n\nfunction _listeners(target, type, unwrap) {\n var events = target._events;\n\n if (events === undefined)\n return [];\n\n var evlistener = events[type];\n if (evlistener === undefined)\n return [];\n\n if (typeof evlistener === 'function')\n return unwrap ? [evlistener.listener || evlistener] : [evlistener];\n\n return unwrap ?\n unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length);\n}\n\nEventEmitter.prototype.listeners = function listeners(type) {\n return _listeners(this, type, true);\n};\n\nEventEmitter.prototype.rawListeners = function rawListeners(type) {\n return _listeners(this, type, false);\n};\n\nEventEmitter.listenerCount = function(emitter, type) {\n if (typeof emitter.listenerCount === 'function') {\n return emitter.listenerCount(type);\n } else {\n return listenerCount.call(emitter, type);\n }\n};\n\nEventEmitter.prototype.listenerCount = listenerCount;\nfunction listenerCount(type) {\n var events = this._events;\n\n if (events !== undefined) {\n var evlistener = events[type];\n\n if (typeof evlistener === 'function') {\n return 1;\n } else if (evlistener !== undefined) {\n return evlistener.length;\n }\n }\n\n return 0;\n}\n\nEventEmitter.prototype.eventNames = function eventNames() {\n return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : [];\n};\n\nfunction arrayClone(arr, n) {\n var copy = new Array(n);\n for (var i = 0; i < n; ++i)\n copy[i] = arr[i];\n return copy;\n}\n\nfunction spliceOne(list, index) {\n for (; index + 1 < list.length; index++)\n list[index] = list[index + 1];\n list.pop();\n}\n\nfunction unwrapListeners(arr) {\n var ret = new Array(arr.length);\n for (var i = 0; i < ret.length; ++i) {\n ret[i] = arr[i].listener || arr[i];\n }\n return ret;\n}\n\nfunction once(emitter, name) {\n return new Promise(function (resolve, reject) {\n function errorListener(err) {\n emitter.removeListener(name, resolver);\n reject(err);\n }\n\n function resolver() {\n if (typeof emitter.removeListener === 'function') {\n emitter.removeListener('error', errorListener);\n }\n resolve([].slice.call(arguments));\n };\n\n eventTargetAgnosticAddListener(emitter, name, resolver, { once: true });\n if (name !== 'error') {\n addErrorHandlerIfEventEmitter(emitter, errorListener, { once: true });\n }\n });\n}\n\nfunction addErrorHandlerIfEventEmitter(emitter, handler, flags) {\n if (typeof emitter.on === 'function') {\n eventTargetAgnosticAddListener(emitter, 'error', handler, flags);\n }\n}\n\nfunction eventTargetAgnosticAddListener(emitter, name, listener, flags) {\n if (typeof emitter.on === 'function') {\n if (flags.once) {\n emitter.once(name, listener);\n } else {\n emitter.on(name, listener);\n }\n } else if (typeof emitter.addEventListener === 'function') {\n // EventTarget does not have `error` event semantics like Node\n // EventEmitters, we do not listen for `error` events here.\n emitter.addEventListener(name, function wrapListener(arg) {\n // IE does not have builtin `{ once: true }` support so we\n // have to do it manually.\n if (flags.once) {\n emitter.removeEventListener(name, wrapListener);\n }\n listener(arg);\n });\n } else {\n throw new TypeError('The \"emitter\" argument must be of type EventEmitter. Received type ' + typeof emitter);\n }\n}\n","/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */\nexports.read = function (buffer, offset, isLE, mLen, nBytes) {\n var e, m\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var nBits = -7\n var i = isLE ? (nBytes - 1) : 0\n var d = isLE ? -1 : 1\n var s = buffer[offset + i]\n\n i += d\n\n e = s & ((1 << (-nBits)) - 1)\n s >>= (-nBits)\n nBits += eLen\n for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & ((1 << (-nBits)) - 1)\n e >>= (-nBits)\n nBits += mLen\n for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias\n } else if (e === eMax) {\n return m ? NaN : ((s ? -1 : 1) * Infinity)\n } else {\n m = m + Math.pow(2, mLen)\n e = e - eBias\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n var i = isLE ? 0 : (nBytes - 1)\n var d = isLE ? 1 : -1\n var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n value = Math.abs(value)\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0\n e = eMax\n } else {\n e = Math.floor(Math.log(value) / Math.LN2)\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--\n c *= 2\n }\n if (e + eBias >= 1) {\n value += rt / c\n } else {\n value += rt * Math.pow(2, 1 - eBias)\n }\n if (value * c >= 2) {\n e++\n c /= 2\n }\n\n if (e + eBias >= eMax) {\n m = 0\n e = eMax\n } else if (e + eBias >= 1) {\n m = ((value * c) - 1) * Math.pow(2, mLen)\n e = e + eBias\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n e = 0\n }\n }\n\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n e = (e << mLen) | m\n eLen += mLen\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128\n}\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView');\n\nmodule.exports = DataView;\n","var hashClear = require('./_hashClear'),\n hashDelete = require('./_hashDelete'),\n hashGet = require('./_hashGet'),\n hashHas = require('./_hashHas'),\n hashSet = require('./_hashSet');\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\nmodule.exports = Hash;\n","var listCacheClear = require('./_listCacheClear'),\n listCacheDelete = require('./_listCacheDelete'),\n listCacheGet = require('./_listCacheGet'),\n listCacheHas = require('./_listCacheHas'),\n listCacheSet = require('./_listCacheSet');\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\nmodule.exports = ListCache;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map');\n\nmodule.exports = Map;\n","var mapCacheClear = require('./_mapCacheClear'),\n mapCacheDelete = require('./_mapCacheDelete'),\n mapCacheGet = require('./_mapCacheGet'),\n mapCacheHas = require('./_mapCacheHas'),\n mapCacheSet = require('./_mapCacheSet');\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\nmodule.exports = MapCache;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Promise = getNative(root, 'Promise');\n\nmodule.exports = Promise;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Set = getNative(root, 'Set');\n\nmodule.exports = Set;\n","var MapCache = require('./_MapCache'),\n setCacheAdd = require('./_setCacheAdd'),\n setCacheHas = require('./_setCacheHas');\n\n/**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\nfunction SetCache(values) {\n var index = -1,\n length = values == null ? 0 : values.length;\n\n this.__data__ = new MapCache;\n while (++index < length) {\n this.add(values[index]);\n }\n}\n\n// Add methods to `SetCache`.\nSetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\nSetCache.prototype.has = setCacheHas;\n\nmodule.exports = SetCache;\n","var ListCache = require('./_ListCache'),\n stackClear = require('./_stackClear'),\n stackDelete = require('./_stackDelete'),\n stackGet = require('./_stackGet'),\n stackHas = require('./_stackHas'),\n stackSet = require('./_stackSet');\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\nmodule.exports = Stack;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Uint8Array = root.Uint8Array;\n\nmodule.exports = Uint8Array;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar WeakMap = getNative(root, 'WeakMap');\n\nmodule.exports = WeakMap;\n","/**\n * A specialized version of `_.forEach` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\nfunction arrayEach(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (iteratee(array[index], index, array) === false) {\n break;\n }\n }\n return array;\n}\n\nmodule.exports = arrayEach;\n","/**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\nfunction arrayFilter(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result[resIndex++] = value;\n }\n }\n return result;\n}\n\nmodule.exports = arrayFilter;\n","var baseTimes = require('./_baseTimes'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isIndex = require('./_isIndex'),\n isTypedArray = require('./isTypedArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = arrayLikeKeys;\n","/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n}\n\nmodule.exports = arrayPush;\n","/**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\nfunction arraySome(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (predicate(array[index], index, array)) {\n return true;\n }\n }\n return false;\n}\n\nmodule.exports = arraySome;\n","var baseAssignValue = require('./_baseAssignValue'),\n eq = require('./eq');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\nmodule.exports = assignValue;\n","var eq = require('./eq');\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\nmodule.exports = assocIndexOf;\n","var copyObject = require('./_copyObject'),\n keys = require('./keys');\n\n/**\n * The base implementation of `_.assign` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssign(object, source) {\n return object && copyObject(source, keys(source), object);\n}\n\nmodule.exports = baseAssign;\n","var copyObject = require('./_copyObject'),\n keysIn = require('./keysIn');\n\n/**\n * The base implementation of `_.assignIn` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssignIn(object, source) {\n return object && copyObject(source, keysIn(source), object);\n}\n\nmodule.exports = baseAssignIn;\n","var defineProperty = require('./_defineProperty');\n\n/**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction baseAssignValue(object, key, value) {\n if (key == '__proto__' && defineProperty) {\n defineProperty(object, key, {\n 'configurable': true,\n 'enumerable': true,\n 'value': value,\n 'writable': true\n });\n } else {\n object[key] = value;\n }\n}\n\nmodule.exports = baseAssignValue;\n","var Stack = require('./_Stack'),\n arrayEach = require('./_arrayEach'),\n assignValue = require('./_assignValue'),\n baseAssign = require('./_baseAssign'),\n baseAssignIn = require('./_baseAssignIn'),\n cloneBuffer = require('./_cloneBuffer'),\n copyArray = require('./_copyArray'),\n copySymbols = require('./_copySymbols'),\n copySymbolsIn = require('./_copySymbolsIn'),\n getAllKeys = require('./_getAllKeys'),\n getAllKeysIn = require('./_getAllKeysIn'),\n getTag = require('./_getTag'),\n initCloneArray = require('./_initCloneArray'),\n initCloneByTag = require('./_initCloneByTag'),\n initCloneObject = require('./_initCloneObject'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isMap = require('./isMap'),\n isObject = require('./isObject'),\n isSet = require('./isSet'),\n keys = require('./keys'),\n keysIn = require('./keysIn');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_FLAT_FLAG = 2,\n CLONE_SYMBOLS_FLAG = 4;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values supported by `_.clone`. */\nvar cloneableTags = {};\ncloneableTags[argsTag] = cloneableTags[arrayTag] =\ncloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =\ncloneableTags[boolTag] = cloneableTags[dateTag] =\ncloneableTags[float32Tag] = cloneableTags[float64Tag] =\ncloneableTags[int8Tag] = cloneableTags[int16Tag] =\ncloneableTags[int32Tag] = cloneableTags[mapTag] =\ncloneableTags[numberTag] = cloneableTags[objectTag] =\ncloneableTags[regexpTag] = cloneableTags[setTag] =\ncloneableTags[stringTag] = cloneableTags[symbolTag] =\ncloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =\ncloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;\ncloneableTags[errorTag] = cloneableTags[funcTag] =\ncloneableTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.clone` and `_.cloneDeep` which tracks\n * traversed objects.\n *\n * @private\n * @param {*} value The value to clone.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Deep clone\n * 2 - Flatten inherited properties\n * 4 - Clone symbols\n * @param {Function} [customizer] The function to customize cloning.\n * @param {string} [key] The key of `value`.\n * @param {Object} [object] The parent object of `value`.\n * @param {Object} [stack] Tracks traversed objects and their clone counterparts.\n * @returns {*} Returns the cloned value.\n */\nfunction baseClone(value, bitmask, customizer, key, object, stack) {\n var result,\n isDeep = bitmask & CLONE_DEEP_FLAG,\n isFlat = bitmask & CLONE_FLAT_FLAG,\n isFull = bitmask & CLONE_SYMBOLS_FLAG;\n\n if (customizer) {\n result = object ? customizer(value, key, object, stack) : customizer(value);\n }\n if (result !== undefined) {\n return result;\n }\n if (!isObject(value)) {\n return value;\n }\n var isArr = isArray(value);\n if (isArr) {\n result = initCloneArray(value);\n if (!isDeep) {\n return copyArray(value, result);\n }\n } else {\n var tag = getTag(value),\n isFunc = tag == funcTag || tag == genTag;\n\n if (isBuffer(value)) {\n return cloneBuffer(value, isDeep);\n }\n if (tag == objectTag || tag == argsTag || (isFunc && !object)) {\n result = (isFlat || isFunc) ? {} : initCloneObject(value);\n if (!isDeep) {\n return isFlat\n ? copySymbolsIn(value, baseAssignIn(result, value))\n : copySymbols(value, baseAssign(result, value));\n }\n } else {\n if (!cloneableTags[tag]) {\n return object ? value : {};\n }\n result = initCloneByTag(value, tag, isDeep);\n }\n }\n // Check for circular references and return its corresponding clone.\n stack || (stack = new Stack);\n var stacked = stack.get(value);\n if (stacked) {\n return stacked;\n }\n stack.set(value, result);\n\n if (isSet(value)) {\n value.forEach(function(subValue) {\n result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));\n });\n } else if (isMap(value)) {\n value.forEach(function(subValue, key) {\n result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n }\n\n var keysFunc = isFull\n ? (isFlat ? getAllKeysIn : getAllKeys)\n : (isFlat ? keysIn : keys);\n\n var props = isArr ? undefined : keysFunc(value);\n arrayEach(props || value, function(subValue, key) {\n if (props) {\n key = subValue;\n subValue = value[key];\n }\n // Recursively populate clone (susceptible to call stack limits).\n assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n return result;\n}\n\nmodule.exports = baseClone;\n","var isObject = require('./isObject');\n\n/** Built-in value references. */\nvar objectCreate = Object.create;\n\n/**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} proto The object to inherit from.\n * @returns {Object} Returns the new object.\n */\nvar baseCreate = (function() {\n function object() {}\n return function(proto) {\n if (!isObject(proto)) {\n return {};\n }\n if (objectCreate) {\n return objectCreate(proto);\n }\n object.prototype = proto;\n var result = new object;\n object.prototype = undefined;\n return result;\n };\n}());\n\nmodule.exports = baseCreate;\n","var arrayPush = require('./_arrayPush'),\n isArray = require('./isArray');\n\n/**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction baseGetAllKeys(object, keysFunc, symbolsFunc) {\n var result = keysFunc(object);\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n}\n\nmodule.exports = baseGetAllKeys;\n","var Symbol = require('./_Symbol'),\n getRawTag = require('./_getRawTag'),\n objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]';\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\nmodule.exports = baseIsArguments;\n","var baseIsEqualDeep = require('./_baseIsEqualDeep'),\n isObjectLike = require('./isObjectLike');\n\n/**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Unordered comparison\n * 2 - Partial comparison\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\nfunction baseIsEqual(value, other, bitmask, customizer, stack) {\n if (value === other) {\n return true;\n }\n if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\n return value !== value && other !== other;\n }\n return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n}\n\nmodule.exports = baseIsEqual;\n","var Stack = require('./_Stack'),\n equalArrays = require('./_equalArrays'),\n equalByTag = require('./_equalByTag'),\n equalObjects = require('./_equalObjects'),\n getTag = require('./_getTag'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isTypedArray = require('./isTypedArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n var objIsArr = isArray(object),\n othIsArr = isArray(other),\n objTag = objIsArr ? arrayTag : getTag(object),\n othTag = othIsArr ? arrayTag : getTag(other);\n\n objTag = objTag == argsTag ? objectTag : objTag;\n othTag = othTag == argsTag ? objectTag : othTag;\n\n var objIsObj = objTag == objectTag,\n othIsObj = othTag == objectTag,\n isSameTag = objTag == othTag;\n\n if (isSameTag && isBuffer(object)) {\n if (!isBuffer(other)) {\n return false;\n }\n objIsArr = true;\n objIsObj = false;\n }\n if (isSameTag && !objIsObj) {\n stack || (stack = new Stack);\n return (objIsArr || isTypedArray(object))\n ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n }\n if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n if (objIsWrapped || othIsWrapped) {\n var objUnwrapped = objIsWrapped ? object.value() : object,\n othUnwrapped = othIsWrapped ? other.value() : other;\n\n stack || (stack = new Stack);\n return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n }\n }\n if (!isSameTag) {\n return false;\n }\n stack || (stack = new Stack);\n return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n}\n\nmodule.exports = baseIsEqualDeep;\n","var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]';\n\n/**\n * The base implementation of `_.isMap` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n */\nfunction baseIsMap(value) {\n return isObjectLike(value) && getTag(value) == mapTag;\n}\n\nmodule.exports = baseIsMap;\n","var isFunction = require('./isFunction'),\n isMasked = require('./_isMasked'),\n isObject = require('./isObject'),\n toSource = require('./_toSource');\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\nmodule.exports = baseIsNative;\n","var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar setTag = '[object Set]';\n\n/**\n * The base implementation of `_.isSet` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n */\nfunction baseIsSet(value) {\n return isObjectLike(value) && getTag(value) == setTag;\n}\n\nmodule.exports = baseIsSet;\n","var baseGetTag = require('./_baseGetTag'),\n isLength = require('./isLength'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n\nmodule.exports = baseIsTypedArray;\n","var isPrototype = require('./_isPrototype'),\n nativeKeys = require('./_nativeKeys');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeys;\n","var isObject = require('./isObject'),\n isPrototype = require('./_isPrototype'),\n nativeKeysIn = require('./_nativeKeysIn');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeysIn(object) {\n if (!isObject(object)) {\n return nativeKeysIn(object);\n }\n var isProto = isPrototype(object),\n result = [];\n\n for (var key in object) {\n if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeysIn;\n","/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\nmodule.exports = baseTimes;\n","/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n return function(value) {\n return func(value);\n };\n}\n\nmodule.exports = baseUnary;\n","/**\n * Checks if a `cache` value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction cacheHas(cache, key) {\n return cache.has(key);\n}\n\nmodule.exports = cacheHas;\n","var Uint8Array = require('./_Uint8Array');\n\n/**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\nfunction cloneArrayBuffer(arrayBuffer) {\n var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n return result;\n}\n\nmodule.exports = cloneArrayBuffer;\n","var root = require('./_root');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined,\n allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;\n\n/**\n * Creates a clone of `buffer`.\n *\n * @private\n * @param {Buffer} buffer The buffer to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Buffer} Returns the cloned buffer.\n */\nfunction cloneBuffer(buffer, isDeep) {\n if (isDeep) {\n return buffer.slice();\n }\n var length = buffer.length,\n result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\n\n buffer.copy(result);\n return result;\n}\n\nmodule.exports = cloneBuffer;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer');\n\n/**\n * Creates a clone of `dataView`.\n *\n * @private\n * @param {Object} dataView The data view to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned data view.\n */\nfunction cloneDataView(dataView, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;\n return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);\n}\n\nmodule.exports = cloneDataView;\n","/** Used to match `RegExp` flags from their coerced string values. */\nvar reFlags = /\\w*$/;\n\n/**\n * Creates a clone of `regexp`.\n *\n * @private\n * @param {Object} regexp The regexp to clone.\n * @returns {Object} Returns the cloned regexp.\n */\nfunction cloneRegExp(regexp) {\n var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));\n result.lastIndex = regexp.lastIndex;\n return result;\n}\n\nmodule.exports = cloneRegExp;\n","var Symbol = require('./_Symbol');\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * Creates a clone of the `symbol` object.\n *\n * @private\n * @param {Object} symbol The symbol object to clone.\n * @returns {Object} Returns the cloned symbol object.\n */\nfunction cloneSymbol(symbol) {\n return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};\n}\n\nmodule.exports = cloneSymbol;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer');\n\n/**\n * Creates a clone of `typedArray`.\n *\n * @private\n * @param {Object} typedArray The typed array to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned typed array.\n */\nfunction cloneTypedArray(typedArray, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n}\n\nmodule.exports = cloneTypedArray;\n","/**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\nfunction copyArray(source, array) {\n var index = -1,\n length = source.length;\n\n array || (array = Array(length));\n while (++index < length) {\n array[index] = source[index];\n }\n return array;\n}\n\nmodule.exports = copyArray;\n","var assignValue = require('./_assignValue'),\n baseAssignValue = require('./_baseAssignValue');\n\n/**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\nfunction copyObject(source, props, object, customizer) {\n var isNew = !object;\n object || (object = {});\n\n var index = -1,\n length = props.length;\n\n while (++index < length) {\n var key = props[index];\n\n var newValue = customizer\n ? customizer(object[key], source[key], key, object, source)\n : undefined;\n\n if (newValue === undefined) {\n newValue = source[key];\n }\n if (isNew) {\n baseAssignValue(object, key, newValue);\n } else {\n assignValue(object, key, newValue);\n }\n }\n return object;\n}\n\nmodule.exports = copyObject;\n","var copyObject = require('./_copyObject'),\n getSymbols = require('./_getSymbols');\n\n/**\n * Copies own symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbols(source, object) {\n return copyObject(source, getSymbols(source), object);\n}\n\nmodule.exports = copySymbols;\n","var copyObject = require('./_copyObject'),\n getSymbolsIn = require('./_getSymbolsIn');\n\n/**\n * Copies own and inherited symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbolsIn(source, object) {\n return copyObject(source, getSymbolsIn(source), object);\n}\n\nmodule.exports = copySymbolsIn;\n","var root = require('./_root');\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\nmodule.exports = coreJsData;\n","var getNative = require('./_getNative');\n\nvar defineProperty = (function() {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n}());\n\nmodule.exports = defineProperty;\n","var SetCache = require('./_SetCache'),\n arraySome = require('./_arraySome'),\n cacheHas = require('./_cacheHas');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\nfunction equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n arrLength = array.length,\n othLength = other.length;\n\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n return false;\n }\n // Check that cyclic values are equal.\n var arrStacked = stack.get(array);\n var othStacked = stack.get(other);\n if (arrStacked && othStacked) {\n return arrStacked == other && othStacked == array;\n }\n var index = -1,\n result = true,\n seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n stack.set(array, other);\n stack.set(other, array);\n\n // Ignore non-index properties.\n while (++index < arrLength) {\n var arrValue = array[index],\n othValue = other[index];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, arrValue, index, other, array, stack)\n : customizer(arrValue, othValue, index, array, other, stack);\n }\n if (compared !== undefined) {\n if (compared) {\n continue;\n }\n result = false;\n break;\n }\n // Recursively compare arrays (susceptible to call stack limits).\n if (seen) {\n if (!arraySome(other, function(othValue, othIndex) {\n if (!cacheHas(seen, othIndex) &&\n (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n return seen.push(othIndex);\n }\n })) {\n result = false;\n break;\n }\n } else if (!(\n arrValue === othValue ||\n equalFunc(arrValue, othValue, bitmask, customizer, stack)\n )) {\n result = false;\n break;\n }\n }\n stack['delete'](array);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalArrays;\n","var Symbol = require('./_Symbol'),\n Uint8Array = require('./_Uint8Array'),\n eq = require('./eq'),\n equalArrays = require('./_equalArrays'),\n mapToArray = require('./_mapToArray'),\n setToArray = require('./_setToArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]';\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n switch (tag) {\n case dataViewTag:\n if ((object.byteLength != other.byteLength) ||\n (object.byteOffset != other.byteOffset)) {\n return false;\n }\n object = object.buffer;\n other = other.buffer;\n\n case arrayBufferTag:\n if ((object.byteLength != other.byteLength) ||\n !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n return false;\n }\n return true;\n\n case boolTag:\n case dateTag:\n case numberTag:\n // Coerce booleans to `1` or `0` and dates to milliseconds.\n // Invalid dates are coerced to `NaN`.\n return eq(+object, +other);\n\n case errorTag:\n return object.name == other.name && object.message == other.message;\n\n case regexpTag:\n case stringTag:\n // Coerce regexes to strings and treat strings, primitives and objects,\n // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n // for more details.\n return object == (other + '');\n\n case mapTag:\n var convert = mapToArray;\n\n case setTag:\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n convert || (convert = setToArray);\n\n if (object.size != other.size && !isPartial) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked) {\n return stacked == other;\n }\n bitmask |= COMPARE_UNORDERED_FLAG;\n\n // Recursively compare objects (susceptible to call stack limits).\n stack.set(object, other);\n var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n stack['delete'](object);\n return result;\n\n case symbolTag:\n if (symbolValueOf) {\n return symbolValueOf.call(object) == symbolValueOf.call(other);\n }\n }\n return false;\n}\n\nmodule.exports = equalByTag;\n","var getAllKeys = require('./_getAllKeys');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n objProps = getAllKeys(object),\n objLength = objProps.length,\n othProps = getAllKeys(other),\n othLength = othProps.length;\n\n if (objLength != othLength && !isPartial) {\n return false;\n }\n var index = objLength;\n while (index--) {\n var key = objProps[index];\n if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n return false;\n }\n }\n // Check that cyclic values are equal.\n var objStacked = stack.get(object);\n var othStacked = stack.get(other);\n if (objStacked && othStacked) {\n return objStacked == other && othStacked == object;\n }\n var result = true;\n stack.set(object, other);\n stack.set(other, object);\n\n var skipCtor = isPartial;\n while (++index < objLength) {\n key = objProps[index];\n var objValue = object[key],\n othValue = other[key];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, objValue, key, other, object, stack)\n : customizer(objValue, othValue, key, object, other, stack);\n }\n // Recursively compare objects (susceptible to call stack limits).\n if (!(compared === undefined\n ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n : compared\n )) {\n result = false;\n break;\n }\n skipCtor || (skipCtor = key == 'constructor');\n }\n if (result && !skipCtor) {\n var objCtor = object.constructor,\n othCtor = other.constructor;\n\n // Non `Object` object instances with different constructors are not equal.\n if (objCtor != othCtor &&\n ('constructor' in object && 'constructor' in other) &&\n !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n result = false;\n }\n }\n stack['delete'](object);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalObjects;\n","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n","var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbols = require('./_getSymbols'),\n keys = require('./keys');\n\n/**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeys(object) {\n return baseGetAllKeys(object, keys, getSymbols);\n}\n\nmodule.exports = getAllKeys;\n","var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbolsIn = require('./_getSymbolsIn'),\n keysIn = require('./keysIn');\n\n/**\n * Creates an array of own and inherited enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeysIn(object) {\n return baseGetAllKeys(object, keysIn, getSymbolsIn);\n}\n\nmodule.exports = getAllKeysIn;\n","var isKeyable = require('./_isKeyable');\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\nmodule.exports = getMapData;\n","var baseIsNative = require('./_baseIsNative'),\n getValue = require('./_getValue');\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\nmodule.exports = getNative;\n","var overArg = require('./_overArg');\n\n/** Built-in value references. */\nvar getPrototype = overArg(Object.getPrototypeOf, Object);\n\nmodule.exports = getPrototype;\n","var Symbol = require('./_Symbol');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nmodule.exports = getRawTag;\n","var arrayFilter = require('./_arrayFilter'),\n stubArray = require('./stubArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n if (object == null) {\n return [];\n }\n object = Object(object);\n return arrayFilter(nativeGetSymbols(object), function(symbol) {\n return propertyIsEnumerable.call(object, symbol);\n });\n};\n\nmodule.exports = getSymbols;\n","var arrayPush = require('./_arrayPush'),\n getPrototype = require('./_getPrototype'),\n getSymbols = require('./_getSymbols'),\n stubArray = require('./stubArray');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own and inherited enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {\n var result = [];\n while (object) {\n arrayPush(result, getSymbols(object));\n object = getPrototype(object);\n }\n return result;\n};\n\nmodule.exports = getSymbolsIn;\n","var DataView = require('./_DataView'),\n Map = require('./_Map'),\n Promise = require('./_Promise'),\n Set = require('./_Set'),\n WeakMap = require('./_WeakMap'),\n baseGetTag = require('./_baseGetTag'),\n toSource = require('./_toSource');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n setTag = '[object Set]',\n weakMapTag = '[object WeakMap]';\n\nvar dataViewTag = '[object DataView]';\n\n/** Used to detect maps, sets, and weakmaps. */\nvar dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nvar getTag = baseGetTag;\n\n// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\nif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = baseGetTag(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : '';\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n}\n\nmodule.exports = getTag;\n","/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\nmodule.exports = getValue;\n","var nativeCreate = require('./_nativeCreate');\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n}\n\nmodule.exports = hashClear;\n","/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = hashDelete;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\nmodule.exports = hashGet;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\nmodule.exports = hashHas;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\nmodule.exports = hashSet;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Initializes an array clone.\n *\n * @private\n * @param {Array} array The array to clone.\n * @returns {Array} Returns the initialized clone.\n */\nfunction initCloneArray(array) {\n var length = array.length,\n result = new array.constructor(length);\n\n // Add properties assigned by `RegExp#exec`.\n if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {\n result.index = array.index;\n result.input = array.input;\n }\n return result;\n}\n\nmodule.exports = initCloneArray;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer'),\n cloneDataView = require('./_cloneDataView'),\n cloneRegExp = require('./_cloneRegExp'),\n cloneSymbol = require('./_cloneSymbol'),\n cloneTypedArray = require('./_cloneTypedArray');\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/**\n * Initializes an object clone based on its `toStringTag`.\n *\n * **Note:** This function only supports cloning values with tags of\n * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.\n *\n * @private\n * @param {Object} object The object to clone.\n * @param {string} tag The `toStringTag` of the object to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneByTag(object, tag, isDeep) {\n var Ctor = object.constructor;\n switch (tag) {\n case arrayBufferTag:\n return cloneArrayBuffer(object);\n\n case boolTag:\n case dateTag:\n return new Ctor(+object);\n\n case dataViewTag:\n return cloneDataView(object, isDeep);\n\n case float32Tag: case float64Tag:\n case int8Tag: case int16Tag: case int32Tag:\n case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:\n return cloneTypedArray(object, isDeep);\n\n case mapTag:\n return new Ctor;\n\n case numberTag:\n case stringTag:\n return new Ctor(object);\n\n case regexpTag:\n return cloneRegExp(object);\n\n case setTag:\n return new Ctor;\n\n case symbolTag:\n return cloneSymbol(object);\n }\n}\n\nmodule.exports = initCloneByTag;\n","var baseCreate = require('./_baseCreate'),\n getPrototype = require('./_getPrototype'),\n isPrototype = require('./_isPrototype');\n\n/**\n * Initializes an object clone.\n *\n * @private\n * @param {Object} object The object to clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneObject(object) {\n return (typeof object.constructor == 'function' && !isPrototype(object))\n ? baseCreate(getPrototype(object))\n : {};\n}\n\nmodule.exports = initCloneObject;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n var type = typeof value;\n length = length == null ? MAX_SAFE_INTEGER : length;\n\n return !!length &&\n (type == 'number' ||\n (type != 'symbol' && reIsUint.test(value))) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\nmodule.exports = isIndex;\n","/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\nmodule.exports = isKeyable;\n","var coreJsData = require('./_coreJsData');\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\nmodule.exports = isMasked;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\nmodule.exports = isPrototype;\n","/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n}\n\nmodule.exports = listCacheClear;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype;\n\n/** Built-in value references. */\nvar splice = arrayProto.splice;\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n}\n\nmodule.exports = listCacheDelete;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\nmodule.exports = listCacheGet;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\nmodule.exports = listCacheHas;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\nmodule.exports = listCacheSet;\n","var Hash = require('./_Hash'),\n ListCache = require('./_ListCache'),\n Map = require('./_Map');\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\nmodule.exports = mapCacheClear;\n","var getMapData = require('./_getMapData');\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = mapCacheDelete;\n","var getMapData = require('./_getMapData');\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\nmodule.exports = mapCacheGet;\n","var getMapData = require('./_getMapData');\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\nmodule.exports = mapCacheHas;\n","var getMapData = require('./_getMapData');\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n}\n\nmodule.exports = mapCacheSet;\n","/**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\nfunction mapToArray(map) {\n var index = -1,\n result = Array(map.size);\n\n map.forEach(function(value, key) {\n result[++index] = [key, value];\n });\n return result;\n}\n\nmodule.exports = mapToArray;\n","var getNative = require('./_getNative');\n\n/* Built-in method references that are verified to be native. */\nvar nativeCreate = getNative(Object, 'create');\n\nmodule.exports = nativeCreate;\n","var overArg = require('./_overArg');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeKeys = overArg(Object.keys, Object);\n\nmodule.exports = nativeKeys;\n","/**\n * This function is like\n * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * except that it includes inherited enumerable properties.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction nativeKeysIn(object) {\n var result = [];\n if (object != null) {\n for (var key in Object(object)) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = nativeKeysIn;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n try {\n // Use `util.types` for Node.js 10+.\n var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n if (types) {\n return types;\n }\n\n // Legacy `process.binding('util')` for Node.js < 10.\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n}());\n\nmodule.exports = nodeUtil;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n","/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\nmodule.exports = overArg;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n","/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\nfunction setCacheAdd(value) {\n this.__data__.set(value, HASH_UNDEFINED);\n return this;\n}\n\nmodule.exports = setCacheAdd;\n","/**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\nfunction setCacheHas(value) {\n return this.__data__.has(value);\n}\n\nmodule.exports = setCacheHas;\n","/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\nfunction setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n}\n\nmodule.exports = setToArray;\n","var ListCache = require('./_ListCache');\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}\n\nmodule.exports = stackClear;\n","/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n var data = this.__data__,\n result = data['delete'](key);\n\n this.size = data.size;\n return result;\n}\n\nmodule.exports = stackDelete;\n","/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n return this.__data__.get(key);\n}\n\nmodule.exports = stackGet;\n","/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n return this.__data__.has(key);\n}\n\nmodule.exports = stackHas;\n","var ListCache = require('./_ListCache'),\n Map = require('./_Map'),\n MapCache = require('./_MapCache');\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n var data = this.__data__;\n if (data instanceof ListCache) {\n var pairs = data.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n this.size = ++data.size;\n return this;\n }\n data = this.__data__ = new MapCache(pairs);\n }\n data.set(key, value);\n this.size = data.size;\n return this;\n}\n\nmodule.exports = stackSet;\n","/** Used for built-in method references. */\nvar funcProto = Function.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\nmodule.exports = toSource;\n","var baseClone = require('./_baseClone');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_SYMBOLS_FLAG = 4;\n\n/**\n * This method is like `_.clone` except that it recursively clones `value`.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Lang\n * @param {*} value The value to recursively clone.\n * @returns {*} Returns the deep cloned value.\n * @see _.clone\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var deep = _.cloneDeep(objects);\n * console.log(deep[0] === objects[0]);\n * // => false\n */\nfunction cloneDeep(value) {\n return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);\n}\n\nmodule.exports = cloneDeep;\n","/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\nmodule.exports = eq;\n","var baseIsArguments = require('./_baseIsArguments'),\n isObjectLike = require('./isObjectLike');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n};\n\nmodule.exports = isArguments;\n","/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\nmodule.exports = isArray;\n","var isFunction = require('./isFunction'),\n isLength = require('./isLength');\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\nmodule.exports = isArrayLike;\n","var root = require('./_root'),\n stubFalse = require('./stubFalse');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\nmodule.exports = isBuffer;\n","var baseIsEqual = require('./_baseIsEqual');\n\n/**\n * Performs a deep comparison between two values to determine if they are\n * equivalent.\n *\n * **Note:** This method supports comparing arrays, array buffers, booleans,\n * date objects, error objects, maps, numbers, `Object` objects, regexes,\n * sets, strings, symbols, and typed arrays. `Object` objects are compared\n * by their own, not inherited, enumerable properties. Functions and DOM\n * nodes are compared by strict equality, i.e. `===`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.isEqual(object, other);\n * // => true\n *\n * object === other;\n * // => false\n */\nfunction isEqual(value, other) {\n return baseIsEqual(value, other);\n}\n\nmodule.exports = isEqual;\n","var baseGetTag = require('./_baseGetTag'),\n isObject = require('./isObject');\n\n/** `Object#toString` result references. */\nvar asyncTag = '[object AsyncFunction]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n proxyTag = '[object Proxy]';\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\nmodule.exports = isFunction;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\nmodule.exports = isLength;\n","var baseIsMap = require('./_baseIsMap'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsMap = nodeUtil && nodeUtil.isMap;\n\n/**\n * Checks if `value` is classified as a `Map` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n * @example\n *\n * _.isMap(new Map);\n * // => true\n *\n * _.isMap(new WeakMap);\n * // => false\n */\nvar isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;\n\nmodule.exports = isMap;\n","/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n","var baseIsSet = require('./_baseIsSet'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsSet = nodeUtil && nodeUtil.isSet;\n\n/**\n * Checks if `value` is classified as a `Set` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n * @example\n *\n * _.isSet(new Set);\n * // => true\n *\n * _.isSet(new WeakSet);\n * // => false\n */\nvar isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;\n\nmodule.exports = isSet;\n","var baseIsTypedArray = require('./_baseIsTypedArray'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\nmodule.exports = isTypedArray;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeys = require('./_baseKeys'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\nmodule.exports = keys;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeysIn = require('./_baseKeysIn'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\nfunction keysIn(object) {\n return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n}\n\nmodule.exports = keysIn;\n","/**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\nfunction stubArray() {\n return [];\n}\n\nmodule.exports = stubArray;\n","/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n return false;\n}\n\nmodule.exports = stubFalse;\n","import { connect } from \"@openfin/core-web\";\nimport { getSettings } from \"./settings\";\n\n/**\n * Initializes the OpenFin Web Broker connection.\n */\nexport async function init(): Promise {\n\t// Set window.fin to the `fin` object.\n\tif (window.fin === undefined) {\n\t\tconst settings = await getSettings();\n\t\t// Specify an interopConfig with a specific provider ID and a context group to initialize the `fin.me.interop` client on connection.\n\t\twindow.fin = await connect({\n\t\t\toptions: {\n\t\t\t\tbrokerUrl: settings.platform.brokerUrl,\n\t\t\t\tinteropConfig: {\n\t\t\t\t\tproviderId: settings.platform.providerId,\n\t\t\t\t\tcurrentContextGroup: settings.platform.defaultContextGroup\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tconsole.log(\"Finished initializing the fin API.\");\n\t\t// Create and dispatch the finReady event\n\t\tconst event = new CustomEvent(\"finReady\");\n\t\twindow.dispatchEvent(event);\n\t}\n\n\tif (window.fdc3 === undefined && window?.fin?.me.interop?.getFDC3Sync !== undefined) {\n\t\twindow.fdc3 = fin.me.interop.getFDC3Sync(\"2.0\");\n\t\tconsole.log(\"Finished initializing the fdc3 API.\");\n\t\t// Create and dispatch the FDC3Ready event\n\t\tconst event = new CustomEvent(\"fdc3Ready\");\n\t\twindow.dispatchEvent(event);\n\t}\n}\n","import type { Settings } from \"../shapes/setting-shapes\";\n\n/**\n * Fetches the settings for the application.\n * @returns The settings for the application.\n */\nexport async function getSettings(): Promise {\n\treturn {\n\t\tplatform: {\n\t\t\tsharedWorkerUrl: \"http://localhost:6060/js/shared-worker.bundle.js\",\n\t\t\tbrokerUrl: \"http://localhost:6060/platform/iframe-broker.html\",\n\t\t\tproviderId: \"web-interop-basic\",\n\t\t\tdefaultContextGroup: \"green\"\n\t\t}\n\t};\n}\n","export { default as v1 } from './v1.js';\nexport { default as v3 } from './v3.js';\nexport { default as v4 } from './v4.js';\nexport { default as v5 } from './v5.js';\nexport { default as NIL } from './nil.js';\nexport { default as version } from './version.js';\nexport { default as validate } from './validate.js';\nexport { default as stringify } from './stringify.js';\nexport { default as parse } from './parse.js';","/*\n * Browser-compatible JavaScript MD5\n *\n * Modification of JavaScript MD5\n * https://github.com/blueimp/JavaScript-MD5\n *\n * Copyright 2011, Sebastian Tschan\n * https://blueimp.net\n *\n * Licensed under the MIT license:\n * https://opensource.org/licenses/MIT\n *\n * Based on\n * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message\n * Digest Algorithm, as defined in RFC 1321.\n * Version 2.2 Copyright (C) Paul Johnston 1999 - 2009\n * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet\n * Distributed under the BSD License\n * See http://pajhome.org.uk/crypt/md5 for more info.\n */\nfunction md5(bytes) {\n if (typeof bytes === 'string') {\n var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape\n\n bytes = new Uint8Array(msg.length);\n\n for (var i = 0; i < msg.length; ++i) {\n bytes[i] = msg.charCodeAt(i);\n }\n }\n\n return md5ToHexEncodedArray(wordsToMd5(bytesToWords(bytes), bytes.length * 8));\n}\n/*\n * Convert an array of little-endian words to an array of bytes\n */\n\n\nfunction md5ToHexEncodedArray(input) {\n var output = [];\n var length32 = input.length * 32;\n var hexTab = '0123456789abcdef';\n\n for (var i = 0; i < length32; i += 8) {\n var x = input[i >> 5] >>> i % 32 & 0xff;\n var hex = parseInt(hexTab.charAt(x >>> 4 & 0x0f) + hexTab.charAt(x & 0x0f), 16);\n output.push(hex);\n }\n\n return output;\n}\n/**\n * Calculate output length with padding and bit length\n */\n\n\nfunction getOutputLength(inputLength8) {\n return (inputLength8 + 64 >>> 9 << 4) + 14 + 1;\n}\n/*\n * Calculate the MD5 of an array of little-endian words, and a bit length.\n */\n\n\nfunction wordsToMd5(x, len) {\n /* append padding */\n x[len >> 5] |= 0x80 << len % 32;\n x[getOutputLength(len) - 1] = len;\n var a = 1732584193;\n var b = -271733879;\n var c = -1732584194;\n var d = 271733878;\n\n for (var i = 0; i < x.length; i += 16) {\n var olda = a;\n var oldb = b;\n var oldc = c;\n var oldd = d;\n a = md5ff(a, b, c, d, x[i], 7, -680876936);\n d = md5ff(d, a, b, c, x[i + 1], 12, -389564586);\n c = md5ff(c, d, a, b, x[i + 2], 17, 606105819);\n b = md5ff(b, c, d, a, x[i + 3], 22, -1044525330);\n a = md5ff(a, b, c, d, x[i + 4], 7, -176418897);\n d = md5ff(d, a, b, c, x[i + 5], 12, 1200080426);\n c = md5ff(c, d, a, b, x[i + 6], 17, -1473231341);\n b = md5ff(b, c, d, a, x[i + 7], 22, -45705983);\n a = md5ff(a, b, c, d, x[i + 8], 7, 1770035416);\n d = md5ff(d, a, b, c, x[i + 9], 12, -1958414417);\n c = md5ff(c, d, a, b, x[i + 10], 17, -42063);\n b = md5ff(b, c, d, a, x[i + 11], 22, -1990404162);\n a = md5ff(a, b, c, d, x[i + 12], 7, 1804603682);\n d = md5ff(d, a, b, c, x[i + 13], 12, -40341101);\n c = md5ff(c, d, a, b, x[i + 14], 17, -1502002290);\n b = md5ff(b, c, d, a, x[i + 15], 22, 1236535329);\n a = md5gg(a, b, c, d, x[i + 1], 5, -165796510);\n d = md5gg(d, a, b, c, x[i + 6], 9, -1069501632);\n c = md5gg(c, d, a, b, x[i + 11], 14, 643717713);\n b = md5gg(b, c, d, a, x[i], 20, -373897302);\n a = md5gg(a, b, c, d, x[i + 5], 5, -701558691);\n d = md5gg(d, a, b, c, x[i + 10], 9, 38016083);\n c = md5gg(c, d, a, b, x[i + 15], 14, -660478335);\n b = md5gg(b, c, d, a, x[i + 4], 20, -405537848);\n a = md5gg(a, b, c, d, x[i + 9], 5, 568446438);\n d = md5gg(d, a, b, c, x[i + 14], 9, -1019803690);\n c = md5gg(c, d, a, b, x[i + 3], 14, -187363961);\n b = md5gg(b, c, d, a, x[i + 8], 20, 1163531501);\n a = md5gg(a, b, c, d, x[i + 13], 5, -1444681467);\n d = md5gg(d, a, b, c, x[i + 2], 9, -51403784);\n c = md5gg(c, d, a, b, x[i + 7], 14, 1735328473);\n b = md5gg(b, c, d, a, x[i + 12], 20, -1926607734);\n a = md5hh(a, b, c, d, x[i + 5], 4, -378558);\n d = md5hh(d, a, b, c, x[i + 8], 11, -2022574463);\n c = md5hh(c, d, a, b, x[i + 11], 16, 1839030562);\n b = md5hh(b, c, d, a, x[i + 14], 23, -35309556);\n a = md5hh(a, b, c, d, x[i + 1], 4, -1530992060);\n d = md5hh(d, a, b, c, x[i + 4], 11, 1272893353);\n c = md5hh(c, d, a, b, x[i + 7], 16, -155497632);\n b = md5hh(b, c, d, a, x[i + 10], 23, -1094730640);\n a = md5hh(a, b, c, d, x[i + 13], 4, 681279174);\n d = md5hh(d, a, b, c, x[i], 11, -358537222);\n c = md5hh(c, d, a, b, x[i + 3], 16, -722521979);\n b = md5hh(b, c, d, a, x[i + 6], 23, 76029189);\n a = md5hh(a, b, c, d, x[i + 9], 4, -640364487);\n d = md5hh(d, a, b, c, x[i + 12], 11, -421815835);\n c = md5hh(c, d, a, b, x[i + 15], 16, 530742520);\n b = md5hh(b, c, d, a, x[i + 2], 23, -995338651);\n a = md5ii(a, b, c, d, x[i], 6, -198630844);\n d = md5ii(d, a, b, c, x[i + 7], 10, 1126891415);\n c = md5ii(c, d, a, b, x[i + 14], 15, -1416354905);\n b = md5ii(b, c, d, a, x[i + 5], 21, -57434055);\n a = md5ii(a, b, c, d, x[i + 12], 6, 1700485571);\n d = md5ii(d, a, b, c, x[i + 3], 10, -1894986606);\n c = md5ii(c, d, a, b, x[i + 10], 15, -1051523);\n b = md5ii(b, c, d, a, x[i + 1], 21, -2054922799);\n a = md5ii(a, b, c, d, x[i + 8], 6, 1873313359);\n d = md5ii(d, a, b, c, x[i + 15], 10, -30611744);\n c = md5ii(c, d, a, b, x[i + 6], 15, -1560198380);\n b = md5ii(b, c, d, a, x[i + 13], 21, 1309151649);\n a = md5ii(a, b, c, d, x[i + 4], 6, -145523070);\n d = md5ii(d, a, b, c, x[i + 11], 10, -1120210379);\n c = md5ii(c, d, a, b, x[i + 2], 15, 718787259);\n b = md5ii(b, c, d, a, x[i + 9], 21, -343485551);\n a = safeAdd(a, olda);\n b = safeAdd(b, oldb);\n c = safeAdd(c, oldc);\n d = safeAdd(d, oldd);\n }\n\n return [a, b, c, d];\n}\n/*\n * Convert an array bytes to an array of little-endian words\n * Characters >255 have their high-byte silently ignored.\n */\n\n\nfunction bytesToWords(input) {\n if (input.length === 0) {\n return [];\n }\n\n var length8 = input.length * 8;\n var output = new Uint32Array(getOutputLength(length8));\n\n for (var i = 0; i < length8; i += 8) {\n output[i >> 5] |= (input[i / 8] & 0xff) << i % 32;\n }\n\n return output;\n}\n/*\n * Add integers, wrapping at 2^32. This uses 16-bit operations internally\n * to work around bugs in some JS interpreters.\n */\n\n\nfunction safeAdd(x, y) {\n var lsw = (x & 0xffff) + (y & 0xffff);\n var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n return msw << 16 | lsw & 0xffff;\n}\n/*\n * Bitwise rotate a 32-bit number to the left.\n */\n\n\nfunction bitRotateLeft(num, cnt) {\n return num << cnt | num >>> 32 - cnt;\n}\n/*\n * These functions implement the four basic operations the algorithm uses.\n */\n\n\nfunction md5cmn(q, a, b, x, s, t) {\n return safeAdd(bitRotateLeft(safeAdd(safeAdd(a, q), safeAdd(x, t)), s), b);\n}\n\nfunction md5ff(a, b, c, d, x, s, t) {\n return md5cmn(b & c | ~b & d, a, b, x, s, t);\n}\n\nfunction md5gg(a, b, c, d, x, s, t) {\n return md5cmn(b & d | c & ~d, a, b, x, s, t);\n}\n\nfunction md5hh(a, b, c, d, x, s, t) {\n return md5cmn(b ^ c ^ d, a, b, x, s, t);\n}\n\nfunction md5ii(a, b, c, d, x, s, t) {\n return md5cmn(c ^ (b | ~d), a, b, x, s, t);\n}\n\nexport default md5;","export default '00000000-0000-0000-0000-000000000000';","import validate from './validate.js';\n\nfunction parse(uuid) {\n if (!validate(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n var v;\n var arr = new Uint8Array(16); // Parse ########-....-....-....-............\n\n arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24;\n arr[1] = v >>> 16 & 0xff;\n arr[2] = v >>> 8 & 0xff;\n arr[3] = v & 0xff; // Parse ........-####-....-....-............\n\n arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8;\n arr[5] = v & 0xff; // Parse ........-....-####-....-............\n\n arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8;\n arr[7] = v & 0xff; // Parse ........-....-....-####-............\n\n arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8;\n arr[9] = v & 0xff; // Parse ........-....-....-....-############\n // (Use \"/\" to avoid 32-bit truncation when bit-shifting high-order bytes)\n\n arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff;\n arr[11] = v / 0x100000000 & 0xff;\n arr[12] = v >>> 24 & 0xff;\n arr[13] = v >>> 16 & 0xff;\n arr[14] = v >>> 8 & 0xff;\n arr[15] = v & 0xff;\n return arr;\n}\n\nexport default parse;","export default /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;","// Unique ID creation requires a high quality random # generator. In the browser we therefore\n// require the crypto API and do not support built-in fallback to lower quality random number\n// generators (like Math.random()).\nvar getRandomValues;\nvar rnds8 = new Uint8Array(16);\nexport default function rng() {\n // lazy load so that environments that need to polyfill have a chance to do so\n if (!getRandomValues) {\n // getRandomValues needs to be invoked in a context where \"this\" is a Crypto implementation. Also,\n // find the complete implementation of crypto (msCrypto) on IE11.\n getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto !== 'undefined' && typeof msCrypto.getRandomValues === 'function' && msCrypto.getRandomValues.bind(msCrypto);\n\n if (!getRandomValues) {\n throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');\n }\n }\n\n return getRandomValues(rnds8);\n}","// Adapted from Chris Veness' SHA1 code at\n// http://www.movable-type.co.uk/scripts/sha1.html\nfunction f(s, x, y, z) {\n switch (s) {\n case 0:\n return x & y ^ ~x & z;\n\n case 1:\n return x ^ y ^ z;\n\n case 2:\n return x & y ^ x & z ^ y & z;\n\n case 3:\n return x ^ y ^ z;\n }\n}\n\nfunction ROTL(x, n) {\n return x << n | x >>> 32 - n;\n}\n\nfunction sha1(bytes) {\n var K = [0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xca62c1d6];\n var H = [0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0];\n\n if (typeof bytes === 'string') {\n var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape\n\n bytes = [];\n\n for (var i = 0; i < msg.length; ++i) {\n bytes.push(msg.charCodeAt(i));\n }\n } else if (!Array.isArray(bytes)) {\n // Convert Array-like to Array\n bytes = Array.prototype.slice.call(bytes);\n }\n\n bytes.push(0x80);\n var l = bytes.length / 4 + 2;\n var N = Math.ceil(l / 16);\n var M = new Array(N);\n\n for (var _i = 0; _i < N; ++_i) {\n var arr = new Uint32Array(16);\n\n for (var j = 0; j < 16; ++j) {\n arr[j] = bytes[_i * 64 + j * 4] << 24 | bytes[_i * 64 + j * 4 + 1] << 16 | bytes[_i * 64 + j * 4 + 2] << 8 | bytes[_i * 64 + j * 4 + 3];\n }\n\n M[_i] = arr;\n }\n\n M[N - 1][14] = (bytes.length - 1) * 8 / Math.pow(2, 32);\n M[N - 1][14] = Math.floor(M[N - 1][14]);\n M[N - 1][15] = (bytes.length - 1) * 8 & 0xffffffff;\n\n for (var _i2 = 0; _i2 < N; ++_i2) {\n var W = new Uint32Array(80);\n\n for (var t = 0; t < 16; ++t) {\n W[t] = M[_i2][t];\n }\n\n for (var _t = 16; _t < 80; ++_t) {\n W[_t] = ROTL(W[_t - 3] ^ W[_t - 8] ^ W[_t - 14] ^ W[_t - 16], 1);\n }\n\n var a = H[0];\n var b = H[1];\n var c = H[2];\n var d = H[3];\n var e = H[4];\n\n for (var _t2 = 0; _t2 < 80; ++_t2) {\n var s = Math.floor(_t2 / 20);\n var T = ROTL(a, 5) + f(s, b, c, d) + e + K[s] + W[_t2] >>> 0;\n e = d;\n d = c;\n c = ROTL(b, 30) >>> 0;\n b = a;\n a = T;\n }\n\n H[0] = H[0] + a >>> 0;\n H[1] = H[1] + b >>> 0;\n H[2] = H[2] + c >>> 0;\n H[3] = H[3] + d >>> 0;\n H[4] = H[4] + e >>> 0;\n }\n\n return [H[0] >> 24 & 0xff, H[0] >> 16 & 0xff, H[0] >> 8 & 0xff, H[0] & 0xff, H[1] >> 24 & 0xff, H[1] >> 16 & 0xff, H[1] >> 8 & 0xff, H[1] & 0xff, H[2] >> 24 & 0xff, H[2] >> 16 & 0xff, H[2] >> 8 & 0xff, H[2] & 0xff, H[3] >> 24 & 0xff, H[3] >> 16 & 0xff, H[3] >> 8 & 0xff, H[3] & 0xff, H[4] >> 24 & 0xff, H[4] >> 16 & 0xff, H[4] >> 8 & 0xff, H[4] & 0xff];\n}\n\nexport default sha1;","import validate from './validate.js';\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\n\nvar byteToHex = [];\n\nfor (var i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).substr(1));\n}\n\nfunction stringify(arr) {\n var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n var uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!validate(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n\n return uuid;\n}\n\nexport default stringify;","import rng from './rng.js';\nimport stringify from './stringify.js'; // **`v1()` - Generate time-based UUID**\n//\n// Inspired by https://github.com/LiosK/UUID.js\n// and http://docs.python.org/library/uuid.html\n\nvar _nodeId;\n\nvar _clockseq; // Previous uuid creation time\n\n\nvar _lastMSecs = 0;\nvar _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details\n\nfunction v1(options, buf, offset) {\n var i = buf && offset || 0;\n var b = buf || new Array(16);\n options = options || {};\n var node = options.node || _nodeId;\n var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not\n // specified. We do this lazily to minimize issues related to insufficient\n // system entropy. See #189\n\n if (node == null || clockseq == null) {\n var seedBytes = options.random || (options.rng || rng)();\n\n if (node == null) {\n // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)\n node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]];\n }\n\n if (clockseq == null) {\n // Per 4.2.2, randomize (14 bit) clockseq\n clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;\n }\n } // UUID timestamps are 100 nano-second units since the Gregorian epoch,\n // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so\n // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'\n // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.\n\n\n var msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock\n // cycle to simulate higher resolution clock\n\n var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs)\n\n var dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression\n\n if (dt < 0 && options.clockseq === undefined) {\n clockseq = clockseq + 1 & 0x3fff;\n } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new\n // time interval\n\n\n if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {\n nsecs = 0;\n } // Per 4.2.1.2 Throw error if too many uuids are requested\n\n\n if (nsecs >= 10000) {\n throw new Error(\"uuid.v1(): Can't create more than 10M uuids/sec\");\n }\n\n _lastMSecs = msecs;\n _lastNSecs = nsecs;\n _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch\n\n msecs += 12219292800000; // `time_low`\n\n var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;\n b[i++] = tl >>> 24 & 0xff;\n b[i++] = tl >>> 16 & 0xff;\n b[i++] = tl >>> 8 & 0xff;\n b[i++] = tl & 0xff; // `time_mid`\n\n var tmh = msecs / 0x100000000 * 10000 & 0xfffffff;\n b[i++] = tmh >>> 8 & 0xff;\n b[i++] = tmh & 0xff; // `time_high_and_version`\n\n b[i++] = tmh >>> 24 & 0xf | 0x10; // include version\n\n b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)\n\n b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low`\n\n b[i++] = clockseq & 0xff; // `node`\n\n for (var n = 0; n < 6; ++n) {\n b[i + n] = node[n];\n }\n\n return buf || stringify(b);\n}\n\nexport default v1;","import v35 from './v35.js';\nimport md5 from './md5.js';\nvar v3 = v35('v3', 0x30, md5);\nexport default v3;","import stringify from './stringify.js';\nimport parse from './parse.js';\n\nfunction stringToBytes(str) {\n str = unescape(encodeURIComponent(str)); // UTF8 escape\n\n var bytes = [];\n\n for (var i = 0; i < str.length; ++i) {\n bytes.push(str.charCodeAt(i));\n }\n\n return bytes;\n}\n\nexport var DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8';\nexport var URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8';\nexport default function (name, version, hashfunc) {\n function generateUUID(value, namespace, buf, offset) {\n if (typeof value === 'string') {\n value = stringToBytes(value);\n }\n\n if (typeof namespace === 'string') {\n namespace = parse(namespace);\n }\n\n if (namespace.length !== 16) {\n throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)');\n } // Compute hash of namespace and value, Per 4.3\n // Future: Use spread syntax when supported on all platforms, e.g. `bytes =\n // hashfunc([...namespace, ... value])`\n\n\n var bytes = new Uint8Array(16 + value.length);\n bytes.set(namespace);\n bytes.set(value, namespace.length);\n bytes = hashfunc(bytes);\n bytes[6] = bytes[6] & 0x0f | version;\n bytes[8] = bytes[8] & 0x3f | 0x80;\n\n if (buf) {\n offset = offset || 0;\n\n for (var i = 0; i < 16; ++i) {\n buf[offset + i] = bytes[i];\n }\n\n return buf;\n }\n\n return stringify(bytes);\n } // Function#name is not settable on some platforms (#270)\n\n\n try {\n generateUUID.name = name; // eslint-disable-next-line no-empty\n } catch (err) {} // For CommonJS default export support\n\n\n generateUUID.DNS = DNS;\n generateUUID.URL = URL;\n return generateUUID;\n}","import rng from './rng.js';\nimport stringify from './stringify.js';\n\nfunction v4(options, buf, offset) {\n options = options || {};\n var rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n offset = offset || 0;\n\n for (var i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n\n return buf;\n }\n\n return stringify(rnds);\n}\n\nexport default v4;","import v35 from './v35.js';\nimport sha1 from './sha1.js';\nvar v5 = v35('v5', 0x50, sha1);\nexport default v5;","import REGEX from './regex.js';\n\nfunction validate(uuid) {\n return typeof uuid === 'string' && REGEX.test(uuid);\n}\n\nexport default validate;","import validate from './validate.js';\n\nfunction version(uuid) {\n if (!validate(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n return parseInt(uuid.substr(14, 1), 16);\n}\n\nexport default version;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = (module) => {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","import type { Context } from \"@finos/fdc3\";\nimport { init } from \"../platform/api\";\n\nwindow.addEventListener(\"DOMContentLoaded\", async () => {\n\tawait init();\n\tawait initializeDOM();\n});\n\n/**\n * Broadcasts a context using FDC3.\n */\nasync function broadcastContext(): Promise {\n\tconst contextType = \"fdc3.instrument\";\n\tconst contextName = \"Apple\";\n\tconst idData = {\n\t\tticker: \"AAPL\"\n\t};\n\tconst context = {\n\t\ttype: contextType,\n\t\tname: contextName,\n\t\tid: idData\n\t};\n\tif (window.fdc3) {\n\t\tawait window.fdc3.broadcast(context);\n\t\tconsole.log(`Broadcasted context: ${contextType} - ${contextName}`);\n\t} else {\n\t\twindow.addEventListener(\"fdc3Ready\", async () => {\n\t\t\tawait window.fdc3.broadcast(context);\n\t\t\tconsole.log(`Broadcasted context: ${contextType} - ${contextName}`);\n\t\t});\n\t}\n}\n\n/**\n * Adds an FDC3 context listener to the window.\n */\nasync function addFDC3Listener(): Promise {\n\tif (window.fdc3) {\n\t\tawait window.fdc3.addContextListener(null, (context) => {\n\t\t\tupdateDOMElements(context);\n\t\t});\n\t} else {\n\t\twindow.addEventListener(\"fdc3Ready\", async () => {\n\t\t\tawait window.fdc3.addContextListener(null, (context) => {\n\t\t\t\tupdateDOMElements(context);\n\t\t\t});\n\t\t});\n\t}\n}\n\n/**\n * Updates the DOM elements with the provided context.\n * @param context The context to update the DOM elements with.\n */\nfunction updateDOMElements(context: Context): void {\n\tconst contextTypeSpan = document.querySelector(\"#contextType\");\n\tconst contextNameSpan = document.querySelector(\"#contextName\");\n\tconst contextBodyPre = document.querySelector(\"#contextBody\");\n\n\tif (contextTypeSpan !== null && contextNameSpan !== null && contextBodyPre !== null) {\n\t\tcontextTypeSpan.textContent = context.type;\n\t\tcontextNameSpan.textContent = context.name ?? \"No name provided.\";\n\t\tcontextBodyPre.textContent = JSON.stringify(context, null, 2);\n\t}\n}\n\n/**\n * Initialize the DOM elements.\n */\nasync function initializeDOM(): Promise {\n\tconst broadcastButton = document.querySelector(\"#broadcast\");\n\n\tif (broadcastButton !== null) {\n\t\tbroadcastButton.addEventListener(\"click\", async () => {\n\t\t\tawait broadcastContext();\n\t\t});\n\t}\n\n\tawait addFDC3Listener();\n}\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/web/v19.2.0/web-interop-basic/js/iframe-broker.bundle.js b/web/v19.2.0/web-interop-basic/js/iframe-broker.bundle.js index 71c0fdc..93f34a1 100644 --- a/web/v19.2.0/web-interop-basic/js/iframe-broker.bundle.js +++ b/web/v19.2.0/web-interop-basic/js/iframe-broker.bundle.js @@ -2,10 +2,10 @@ /******/ "use strict"; /******/ var __webpack_modules__ = ({ -/***/ "./node_modules/@openfin/core-web/out/iframe-broker.js": -/*!*************************************************************!*\ - !*** ./node_modules/@openfin/core-web/out/iframe-broker.js ***! - \*************************************************************/ +/***/ "../../node_modules/@openfin/core-web/out/iframe-broker.js": +/*!*****************************************************************!*\ + !*** ../../node_modules/@openfin/core-web/out/iframe-broker.js ***! + \*****************************************************************/ /***/ ((__unused_webpack_module, exports) => { const e="web-broker-ports-ready",t="worker-initialize-connection",i="create-fallback-connection",r="request-fallback-connection",n=e=>`ack-${e}`,o=(...e)=>({log:(...t)=>console.debug(`[${(new Date).toISOString()}]`,...(e=>e.map((e=>`[${e}]`)))(e),...t),getLogger:(...t)=>o(...e,...t)}),s=e=>window.top===e,a=(e,t)=>{try{return e.origin===t.origin}catch(e){return!1}},c="openfin/web-shared-worker";class d{static get lockApi(){return navigator.locks}constructor(e){this.name=e,this.releaseCallback=null,d.pending.add(this),this.lockAcquiredPromise=new Promise(((e,t)=>{this.lockReleasedPromise=d.lockApi.request(this.name,(()=>(d.pending.delete(this),e(),new Promise((e=>{d.held.add(this),this.releaseCallback=e}))))).catch((e=>{throw t(e),e}))}))}async acquired(){await this.lockAcquiredPromise}async release(){if(!this.releaseCallback)throw new Error(`Lock ${this.name} not acquired.`);this.releaseCallback(),this.releaseCallback=null,await this.lockReleasedPromise,d.held.delete(this)}async onReleased(e){if(!this.lockReleasedPromise)throw new Error(`Lock ${this.name} not queued.`);return this.lockReleasedPromise.then(e)}autoRelease(){this.acquired().then((()=>this.release()))}static async releaseAll(){const e=Promise.all([...this.pending].map((async e=>{await e.acquired(),await e.release()})));await Promise.all([...this.held].map((async e=>{await e.release()}))),await e}}d.pending=new Set,d.held=new Set;class l{constructor(e=100,t=2){this.pingIntervalMs=e,this.allowedMissedPings=t,this.lockSelf=async e=>{const t=new d((e=>`__OPENFIN__${e.uuid}_${e.name}`)(e));return await t.acquired(),t}}async lockProxiedConnection(e,t){let i=0;t.addEventListener("message",(e=>{"pong"===e.data.topic&&i--}));const r=await this.lockSelf(e);let n=setInterval((()=>{i>=this.allowedMissedPings?(r.release(),clearInterval(n)):(i++,t.postMessage({topic:"ping"}))}),this.pingIntervalMs);t.start()}registerProxiedConnection(e){e.addEventListener("message",(t=>{"ping"===t.data.topic&&e.postMessage({topic:"pong"})})),e.start()}}class h{constructor(e,t,o){this.workerUrl=e,this.iframeWindow=t,this.forceWorker=o,this.identityDisconnectionController=new l,this.isSharedWorkerSupported=()=>!this.forceWorker&&!!window.SharedWorker,this.state="ready",this.establishWorkerConnectionViaWindow=async(e,t)=>{if(a(this.iframeWindow,e)){const o=new MessageChannel,s=new MessageChannel;return this.identityDisconnectionController.registerProxiedConnection(s.port1),new Promise(((a,c)=>{o.port1.addEventListener("message",(e=>{e.data.topic===n(i)&&(e.data.success?a(o.port1):c(e.data.reason))})),o.port1.start();const d={topic:r,payload:{identity:t}};e.postMessage(d,location.origin,[o.port2,s.port2])}))}throw new Error("Could not connect via top level browsing context as its origin does not much the web interop broker.")},this.listenForNestedConnections=e=>{"top-window"===this.state&&a(this.iframeWindow,this.iframeWindow.parent)&&this.iframeWindow.parent.addEventListener("message",(async t=>{const{data:n}=t;if(t.origin===location.origin&&n.topic===r){const[r,...o]=t.ports;if(o.length>0&&n.payload?.identity){const[e]=o;await this.identityDisconnectionController.lockProxiedConnection(n.payload.identity,e)}const s={topic:i};e.postMessage(s,[r])}}))},this.initialize=async e=>{if("ready"!==this.state)throw new Error("Worker connection already initialized");return(e=>{const t=i=>!(!(e=>{try{return!e.origin}catch(e){return!0}})(i)&&i.origin===e.origin)||!s(i)&&t(i.parent);return!s(e)&&t(e.parent)})(this.iframeWindow)&&a(this.iframeWindow,this.iframeWindow.top)?this.state="partitioned-frame":s(this.iframeWindow.parent)?this.state="top-window":this.state="frame",this.connect(e)}}async connect(e){if("ready"===this.state)throw new Error("Must call initialize before connect");switch(this.state){case"partitioned-frame":return this.establishWorkerConnectionViaWindow(this.iframeWindow.top,e);case"top-window":{let t;return t=this.isSharedWorkerSupported()?new SharedWorker(this.workerUrl,c).port:new Worker(this.workerUrl),await this.identityDisconnectionController.lockSelf(e),this.listenForNestedConnections(t),t}case"frame":{if(!this.isSharedWorkerSupported())try{return await this.establishWorkerConnectionViaWindow(this.iframeWindow.top,e)}catch(e){throw new Error(`SharedWorker is not supported and an unexpected error occured when trying to connect via fallback mechanism: ${e.message}`,{cause:e})}await this.identityDisconnectionController.lockSelf(e);const{port:t}=new SharedWorker(this.workerUrl,c);return t}default:throw this.state,new Error(`Invalid state: ${this.state}`)}}}const w=o("@openfin/core-web/iframe-broker"),p=()=>{const e=((e,t)=>{const i=new RegExp(`^${t}<(?.*)>$`).exec(e)?.groups?.meta;if(i)try{return JSON.parse(atob(i))}catch(e){throw new Error(`Failed to decode JSON from ${i}.`)}})(window.name,"of-broker");if(!e)throw new Error("Invalid or missing identity string in iframe context. Ensure that this iframe is being renderered via the @openfin/core-web library.");return e};function g(t){const i={topic:n(e),success:!1,reason:t?.reason??"Connection Rejected"};window.parent.postMessage(i,"*")}exports.init=async i=>{try{const{sharedWorkerUrl:r}=i;await("loading"===document.readyState?new Promise((e=>{const t=()=>{e(),window.removeEventListener("DOMContentLoaded",t)};window.addEventListener("DOMContentLoaded",t)})):Promise.resolve());const o=p(),s=new h(r,window,"same-site"!==i.experimental?.crossTab),a=await s.initialize(o);w.log(`Loading ${r} in ${s.state} mode...`);const c=await(async(i,r,o)=>{const s=new MessageChannel,a=new MessageChannel,c={topic:t,payload:{identity:o}};await new Promise(((e,i)=>{r.addEventListener("message",(r=>{r.data.topic===n(t)&&(r.data.success?e():i(new Error(r.data.reason)))})),r.start?.(),r.postMessage(c,[a.port2])}));const d={topic:n(e),success:!0,payload:{identity:o}};return i.postMessage(d,"*",[s.port2,a.port1]),s.port1})(window.parent,a,o);c.start(),a.start?.(),w.log(`Port transfer complete in ${s.state} mode. Connection established with identity ${JSON.stringify(o)}. SharedWorker support=${s.isSharedWorkerSupported()}`)}catch(e){const t=new Error(`An unexpected error occured during initialization. ${e.message}`);g({reason:t.message}),console.error(t)}},exports.rejectConnections=g; @@ -68,7 +68,7 @@ async function getSettings() { /******/ /************************************************************************/ var __webpack_exports__ = {}; -// This entry need to be wrapped in an IIFE because it uses a non-standard name for the exports (exports). +// This entry needs to be wrapped in an IIFE because it needs to be isolated against other modules in the chunk. (() => { var exports = __webpack_exports__; /*!**********************************************!*\ @@ -76,7 +76,7 @@ var exports = __webpack_exports__; \**********************************************/ Object.defineProperty(exports, "__esModule", ({ value: true })); -const iframe_broker_1 = __webpack_require__(/*! @openfin/core-web/iframe-broker */ "./node_modules/@openfin/core-web/out/iframe-broker.js"); +const iframe_broker_1 = __webpack_require__(/*! @openfin/core-web/iframe-broker */ "../../node_modules/@openfin/core-web/out/iframe-broker.js"); const settings_1 = __webpack_require__(/*! ./settings */ "./client/src/platform/settings.ts"); /** * Initializes the OpenFin Web Broker connection. diff --git a/web/v19.2.0/web-interop-basic/js/iframe-broker.bundle.js.map b/web/v19.2.0/web-interop-basic/js/iframe-broker.bundle.js.map index fe5199d..c4e46c0 100644 --- a/web/v19.2.0/web-interop-basic/js/iframe-broker.bundle.js.map +++ b/web/v19.2.0/web-interop-basic/js/iframe-broker.bundle.js.map @@ -1 +1 @@ -{"version":3,"file":"iframe-broker.bundle.js","mappings":";;;;;;;;;;AAAa,6IAA6I,EAAE,cAAc,8BAA8B,yBAAyB,wBAAwB,EAAE,8CAA8C,gCAAgC,IAAI,2BAA2B,SAAS,UAAU,+BAA+B,QAAQ,qBAAqB,uBAAuB,eAAe,wGAAwG,uGAAuG,wCAAwC,iBAAiB,aAAa,GAAG,GAAG,iBAAiB,+BAA+B,gB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B,GAAG,SAAS,wEAAwE,UAAU,GAAG,GAAG,iBAAiB,oBAAoB,CAAC,yBAAyB;;;;;;;;;;;;;ACMloM,kCASC;AAbD;;;GAGG;AACI,KAAK,UAAU,WAAW;IAChC,OAAO;QACN,QAAQ,EAAE;YACT,eAAe,EAAE,kDAAkD;YACnE,SAAS,EAAE,mDAAmD;YAC9D,UAAU,EAAE,mBAAmB;YAC/B,mBAAmB,EAAE,OAAO;SAC5B;KACD,CAAC;AACH,CAAC;;;;;;;UCfD;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;;;;;;;;ACtBA,4IAA+E;AAC/E,8FAAyC;AAEzC;;;GAGG;AACH,KAAK,UAAU,IAAI;IAClB,MAAM,QAAQ,GAAG,MAAM,0BAAW,GAAE,CAAC;IACrC,OAAO,wBAAoB,EAAC;QAC3B,eAAe,EAAE,QAAQ,CAAC,QAAQ,CAAC,eAAe;KAClD,CAAC,CAAC;AACJ,CAAC;AAED,IAAI,EAAE;KACJ,IAAI,CAAC,GAAG,EAAE;IACV,OAAO,CAAC,GAAG,CAAC,6CAA6C,CAAC,CAAC;IAC3D,OAAO,IAAI,CAAC;AACb,CAAC,CAAC;KACD,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC","sources":["webpack://openfin-web--web-interop-basic/./node_modules/@openfin/core-web/out/iframe-broker.js","webpack://openfin-web--web-interop-basic/./client/src/platform/settings.ts","webpack://openfin-web--web-interop-basic/webpack/bootstrap","webpack://openfin-web--web-interop-basic/./client/src/platform/iframe-broker.ts"],"sourcesContent":["\"use strict\";const e=\"web-broker-ports-ready\",t=\"worker-initialize-connection\",i=\"create-fallback-connection\",r=\"request-fallback-connection\",n=e=>`ack-${e}`,o=(...e)=>({log:(...t)=>console.debug(`[${(new Date).toISOString()}]`,...(e=>e.map((e=>`[${e}]`)))(e),...t),getLogger:(...t)=>o(...e,...t)}),s=e=>window.top===e,a=(e,t)=>{try{return e.origin===t.origin}catch(e){return!1}},c=\"openfin/web-shared-worker\";class d{static get lockApi(){return navigator.locks}constructor(e){this.name=e,this.releaseCallback=null,d.pending.add(this),this.lockAcquiredPromise=new Promise(((e,t)=>{this.lockReleasedPromise=d.lockApi.request(this.name,(()=>(d.pending.delete(this),e(),new Promise((e=>{d.held.add(this),this.releaseCallback=e}))))).catch((e=>{throw t(e),e}))}))}async acquired(){await this.lockAcquiredPromise}async release(){if(!this.releaseCallback)throw new Error(`Lock ${this.name} not acquired.`);this.releaseCallback(),this.releaseCallback=null,await this.lockReleasedPromise,d.held.delete(this)}async onReleased(e){if(!this.lockReleasedPromise)throw new Error(`Lock ${this.name} not queued.`);return this.lockReleasedPromise.then(e)}autoRelease(){this.acquired().then((()=>this.release()))}static async releaseAll(){const e=Promise.all([...this.pending].map((async e=>{await e.acquired(),await e.release()})));await Promise.all([...this.held].map((async e=>{await e.release()}))),await e}}d.pending=new Set,d.held=new Set;class l{constructor(e=100,t=2){this.pingIntervalMs=e,this.allowedMissedPings=t,this.lockSelf=async e=>{const t=new d((e=>`__OPENFIN__${e.uuid}_${e.name}`)(e));return await t.acquired(),t}}async lockProxiedConnection(e,t){let i=0;t.addEventListener(\"message\",(e=>{\"pong\"===e.data.topic&&i--}));const r=await this.lockSelf(e);let n=setInterval((()=>{i>=this.allowedMissedPings?(r.release(),clearInterval(n)):(i++,t.postMessage({topic:\"ping\"}))}),this.pingIntervalMs);t.start()}registerProxiedConnection(e){e.addEventListener(\"message\",(t=>{\"ping\"===t.data.topic&&e.postMessage({topic:\"pong\"})})),e.start()}}class h{constructor(e,t,o){this.workerUrl=e,this.iframeWindow=t,this.forceWorker=o,this.identityDisconnectionController=new l,this.isSharedWorkerSupported=()=>!this.forceWorker&&!!window.SharedWorker,this.state=\"ready\",this.establishWorkerConnectionViaWindow=async(e,t)=>{if(a(this.iframeWindow,e)){const o=new MessageChannel,s=new MessageChannel;return this.identityDisconnectionController.registerProxiedConnection(s.port1),new Promise(((a,c)=>{o.port1.addEventListener(\"message\",(e=>{e.data.topic===n(i)&&(e.data.success?a(o.port1):c(e.data.reason))})),o.port1.start();const d={topic:r,payload:{identity:t}};e.postMessage(d,location.origin,[o.port2,s.port2])}))}throw new Error(\"Could not connect via top level browsing context as its origin does not much the web interop broker.\")},this.listenForNestedConnections=e=>{\"top-window\"===this.state&&a(this.iframeWindow,this.iframeWindow.parent)&&this.iframeWindow.parent.addEventListener(\"message\",(async t=>{const{data:n}=t;if(t.origin===location.origin&&n.topic===r){const[r,...o]=t.ports;if(o.length>0&&n.payload?.identity){const[e]=o;await this.identityDisconnectionController.lockProxiedConnection(n.payload.identity,e)}const s={topic:i};e.postMessage(s,[r])}}))},this.initialize=async e=>{if(\"ready\"!==this.state)throw new Error(\"Worker connection already initialized\");return(e=>{const t=i=>!(!(e=>{try{return!e.origin}catch(e){return!0}})(i)&&i.origin===e.origin)||!s(i)&&t(i.parent);return!s(e)&&t(e.parent)})(this.iframeWindow)&&a(this.iframeWindow,this.iframeWindow.top)?this.state=\"partitioned-frame\":s(this.iframeWindow.parent)?this.state=\"top-window\":this.state=\"frame\",this.connect(e)}}async connect(e){if(\"ready\"===this.state)throw new Error(\"Must call initialize before connect\");switch(this.state){case\"partitioned-frame\":return this.establishWorkerConnectionViaWindow(this.iframeWindow.top,e);case\"top-window\":{let t;return t=this.isSharedWorkerSupported()?new SharedWorker(this.workerUrl,c).port:new Worker(this.workerUrl),await this.identityDisconnectionController.lockSelf(e),this.listenForNestedConnections(t),t}case\"frame\":{if(!this.isSharedWorkerSupported())try{return await this.establishWorkerConnectionViaWindow(this.iframeWindow.top,e)}catch(e){throw new Error(`SharedWorker is not supported and an unexpected error occured when trying to connect via fallback mechanism: ${e.message}`,{cause:e})}await this.identityDisconnectionController.lockSelf(e);const{port:t}=new SharedWorker(this.workerUrl,c);return t}default:throw this.state,new Error(`Invalid state: ${this.state}`)}}}const w=o(\"@openfin/core-web/iframe-broker\"),p=()=>{const e=((e,t)=>{const i=new RegExp(`^${t}<(?.*)>$`).exec(e)?.groups?.meta;if(i)try{return JSON.parse(atob(i))}catch(e){throw new Error(`Failed to decode JSON from ${i}.`)}})(window.name,\"of-broker\");if(!e)throw new Error(\"Invalid or missing identity string in iframe context. Ensure that this iframe is being renderered via the @openfin/core-web library.\");return e};function g(t){const i={topic:n(e),success:!1,reason:t?.reason??\"Connection Rejected\"};window.parent.postMessage(i,\"*\")}exports.init=async i=>{try{const{sharedWorkerUrl:r}=i;await(\"loading\"===document.readyState?new Promise((e=>{const t=()=>{e(),window.removeEventListener(\"DOMContentLoaded\",t)};window.addEventListener(\"DOMContentLoaded\",t)})):Promise.resolve());const o=p(),s=new h(r,window,\"same-site\"!==i.experimental?.crossTab),a=await s.initialize(o);w.log(`Loading ${r} in ${s.state} mode...`);const c=await(async(i,r,o)=>{const s=new MessageChannel,a=new MessageChannel,c={topic:t,payload:{identity:o}};await new Promise(((e,i)=>{r.addEventListener(\"message\",(r=>{r.data.topic===n(t)&&(r.data.success?e():i(new Error(r.data.reason)))})),r.start?.(),r.postMessage(c,[a.port2])}));const d={topic:n(e),success:!0,payload:{identity:o}};return i.postMessage(d,\"*\",[s.port2,a.port1]),s.port1})(window.parent,a,o);c.start(),a.start?.(),w.log(`Port transfer complete in ${s.state} mode. Connection established with identity ${JSON.stringify(o)}. SharedWorker support=${s.isSharedWorkerSupported()}`)}catch(e){const t=new Error(`An unexpected error occured during initialization. ${e.message}`);g({reason:t.message}),console.error(t)}},exports.rejectConnections=g;\n","import type { Settings } from \"../shapes/setting-shapes\";\n\n/**\n * Fetches the settings for the application.\n * @returns The settings for the application.\n */\nexport async function getSettings(): Promise {\n\treturn {\n\t\tplatform: {\n\t\t\tsharedWorkerUrl: \"http://localhost:6060/js/shared-worker.bundle.js\",\n\t\t\tbrokerUrl: \"http://localhost:6060/platform/iframe-broker.html\",\n\t\t\tproviderId: \"web-interop-basic\",\n\t\t\tdefaultContextGroup: \"green\"\n\t\t}\n\t};\n}\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","import { init as initBrokerConnection } from \"@openfin/core-web/iframe-broker\";\nimport { getSettings } from \"./settings\";\n\n/**\n * Initializes the OpenFin Web Broker connection.\n * @returns A promise that resolves when the connection is established.\n */\nasync function init(): Promise {\n\tconst settings = await getSettings();\n\treturn initBrokerConnection({\n\t\tsharedWorkerUrl: settings.platform.sharedWorkerUrl\n\t});\n}\n\ninit()\n\t.then(() => {\n\t\tconsole.log(\"Connected to the OpenFin IFrame Web Broker.\");\n\t\treturn true;\n\t})\n\t.catch((err) => console.error(err));\n"],"names":[],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"iframe-broker.bundle.js","mappings":";;;;;;;;;;AAAa,6IAA6I,EAAE,cAAc,8BAA8B,yBAAyB,wBAAwB,EAAE,8CAA8C,gCAAgC,IAAI,2BAA2B,SAAS,UAAU,+BAA+B,QAAQ,qBAAqB,uBAAuB,eAAe,wGAAwG,uGAAuG,wCAAwC,iBAAiB,aAAa,GAAG,GAAG,iBAAiB,+BAA+B,gBAAgB,iDAAiD,WAAW,gBAAgB,oGAAoG,oBAAoB,qDAAqD,WAAW,cAAc,wCAAwC,cAAc,2CAA2C,0BAA0B,qDAAqD,qCAAqC,IAAI,gDAAgD,kBAAkB,aAAa,iCAAiC,QAAQ,uBAAuB,wEAAwE,gCAAgC,OAAO,GAAG,O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,SAAS,EAAE,mDAAmD;YAC9D,UAAU,EAAE,mBAAmB;YAC/B,mBAAmB,EAAE,OAAO;SAC5B;KACD,CAAC;AACH,CAAC;;;;;;;UCfD;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;;;;;;;;ACtBA,gJAA+E;AAC/E,8FAAyC;AAEzC;;;GAGG;AACH,KAAK,UAAU,IAAI;IAClB,MAAM,QAAQ,GAAG,MAAM,0BAAW,GAAE,CAAC;IACrC,OAAO,wBAAoB,EAAC;QAC3B,eAAe,EAAE,QAAQ,CAAC,QAAQ,CAAC,eAAe;KAClD,CAAC,CAAC;AACJ,CAAC;AAED,IAAI,EAAE;KACJ,IAAI,CAAC,GAAG,EAAE;IACV,OAAO,CAAC,GAAG,CAAC,6CAA6C,CAAC,CAAC;IAC3D,OAAO,IAAI,CAAC;AACb,CAAC,CAAC;KACD,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC","sources":["webpack://openfin-web--web-interop-basic/../../node_modules/@openfin/core-web/out/iframe-broker.js","webpack://openfin-web--web-interop-basic/./client/src/platform/settings.ts","webpack://openfin-web--web-interop-basic/webpack/bootstrap","webpack://openfin-web--web-interop-basic/./client/src/platform/iframe-broker.ts"],"sourcesContent":["\"use strict\";const e=\"web-broker-ports-ready\",t=\"worker-initialize-connection\",i=\"create-fallback-connection\",r=\"request-fallback-connection\",n=e=>`ack-${e}`,o=(...e)=>({log:(...t)=>console.debug(`[${(new Date).toISOString()}]`,...(e=>e.map((e=>`[${e}]`)))(e),...t),getLogger:(...t)=>o(...e,...t)}),s=e=>window.top===e,a=(e,t)=>{try{return e.origin===t.origin}catch(e){return!1}},c=\"openfin/web-shared-worker\";class d{static get lockApi(){return navigator.locks}constructor(e){this.name=e,this.releaseCallback=null,d.pending.add(this),this.lockAcquiredPromise=new Promise(((e,t)=>{this.lockReleasedPromise=d.lockApi.request(this.name,(()=>(d.pending.delete(this),e(),new Promise((e=>{d.held.add(this),this.releaseCallback=e}))))).catch((e=>{throw t(e),e}))}))}async acquired(){await this.lockAcquiredPromise}async release(){if(!this.releaseCallback)throw new Error(`Lock ${this.name} not acquired.`);this.releaseCallback(),this.releaseCallback=null,await this.lockReleasedPromise,d.held.delete(this)}async onReleased(e){if(!this.lockReleasedPromise)throw new Error(`Lock ${this.name} not queued.`);return this.lockReleasedPromise.then(e)}autoRelease(){this.acquired().then((()=>this.release()))}static async releaseAll(){const e=Promise.all([...this.pending].map((async e=>{await e.acquired(),await e.release()})));await Promise.all([...this.held].map((async e=>{await e.release()}))),await e}}d.pending=new Set,d.held=new Set;class l{constructor(e=100,t=2){this.pingIntervalMs=e,this.allowedMissedPings=t,this.lockSelf=async e=>{const t=new d((e=>`__OPENFIN__${e.uuid}_${e.name}`)(e));return await t.acquired(),t}}async lockProxiedConnection(e,t){let i=0;t.addEventListener(\"message\",(e=>{\"pong\"===e.data.topic&&i--}));const r=await this.lockSelf(e);let n=setInterval((()=>{i>=this.allowedMissedPings?(r.release(),clearInterval(n)):(i++,t.postMessage({topic:\"ping\"}))}),this.pingIntervalMs);t.start()}registerProxiedConnection(e){e.addEventListener(\"message\",(t=>{\"ping\"===t.data.topic&&e.postMessage({topic:\"pong\"})})),e.start()}}class h{constructor(e,t,o){this.workerUrl=e,this.iframeWindow=t,this.forceWorker=o,this.identityDisconnectionController=new l,this.isSharedWorkerSupported=()=>!this.forceWorker&&!!window.SharedWorker,this.state=\"ready\",this.establishWorkerConnectionViaWindow=async(e,t)=>{if(a(this.iframeWindow,e)){const o=new MessageChannel,s=new MessageChannel;return this.identityDisconnectionController.registerProxiedConnection(s.port1),new Promise(((a,c)=>{o.port1.addEventListener(\"message\",(e=>{e.data.topic===n(i)&&(e.data.success?a(o.port1):c(e.data.reason))})),o.port1.start();const d={topic:r,payload:{identity:t}};e.postMessage(d,location.origin,[o.port2,s.port2])}))}throw new Error(\"Could not connect via top level browsing context as its origin does not much the web interop broker.\")},this.listenForNestedConnections=e=>{\"top-window\"===this.state&&a(this.iframeWindow,this.iframeWindow.parent)&&this.iframeWindow.parent.addEventListener(\"message\",(async t=>{const{data:n}=t;if(t.origin===location.origin&&n.topic===r){const[r,...o]=t.ports;if(o.length>0&&n.payload?.identity){const[e]=o;await this.identityDisconnectionController.lockProxiedConnection(n.payload.identity,e)}const s={topic:i};e.postMessage(s,[r])}}))},this.initialize=async e=>{if(\"ready\"!==this.state)throw new Error(\"Worker connection already initialized\");return(e=>{const t=i=>!(!(e=>{try{return!e.origin}catch(e){return!0}})(i)&&i.origin===e.origin)||!s(i)&&t(i.parent);return!s(e)&&t(e.parent)})(this.iframeWindow)&&a(this.iframeWindow,this.iframeWindow.top)?this.state=\"partitioned-frame\":s(this.iframeWindow.parent)?this.state=\"top-window\":this.state=\"frame\",this.connect(e)}}async connect(e){if(\"ready\"===this.state)throw new Error(\"Must call initialize before connect\");switch(this.state){case\"partitioned-frame\":return this.establishWorkerConnectionViaWindow(this.iframeWindow.top,e);case\"top-window\":{let t;return t=this.isSharedWorkerSupported()?new SharedWorker(this.workerUrl,c).port:new Worker(this.workerUrl),await this.identityDisconnectionController.lockSelf(e),this.listenForNestedConnections(t),t}case\"frame\":{if(!this.isSharedWorkerSupported())try{return await this.establishWorkerConnectionViaWindow(this.iframeWindow.top,e)}catch(e){throw new Error(`SharedWorker is not supported and an unexpected error occured when trying to connect via fallback mechanism: ${e.message}`,{cause:e})}await this.identityDisconnectionController.lockSelf(e);const{port:t}=new SharedWorker(this.workerUrl,c);return t}default:throw this.state,new Error(`Invalid state: ${this.state}`)}}}const w=o(\"@openfin/core-web/iframe-broker\"),p=()=>{const e=((e,t)=>{const i=new RegExp(`^${t}<(?.*)>$`).exec(e)?.groups?.meta;if(i)try{return JSON.parse(atob(i))}catch(e){throw new Error(`Failed to decode JSON from ${i}.`)}})(window.name,\"of-broker\");if(!e)throw new Error(\"Invalid or missing identity string in iframe context. Ensure that this iframe is being renderered via the @openfin/core-web library.\");return e};function g(t){const i={topic:n(e),success:!1,reason:t?.reason??\"Connection Rejected\"};window.parent.postMessage(i,\"*\")}exports.init=async i=>{try{const{sharedWorkerUrl:r}=i;await(\"loading\"===document.readyState?new Promise((e=>{const t=()=>{e(),window.removeEventListener(\"DOMContentLoaded\",t)};window.addEventListener(\"DOMContentLoaded\",t)})):Promise.resolve());const o=p(),s=new h(r,window,\"same-site\"!==i.experimental?.crossTab),a=await s.initialize(o);w.log(`Loading ${r} in ${s.state} mode...`);const c=await(async(i,r,o)=>{const s=new MessageChannel,a=new MessageChannel,c={topic:t,payload:{identity:o}};await new Promise(((e,i)=>{r.addEventListener(\"message\",(r=>{r.data.topic===n(t)&&(r.data.success?e():i(new Error(r.data.reason)))})),r.start?.(),r.postMessage(c,[a.port2])}));const d={topic:n(e),success:!0,payload:{identity:o}};return i.postMessage(d,\"*\",[s.port2,a.port1]),s.port1})(window.parent,a,o);c.start(),a.start?.(),w.log(`Port transfer complete in ${s.state} mode. Connection established with identity ${JSON.stringify(o)}. SharedWorker support=${s.isSharedWorkerSupported()}`)}catch(e){const t=new Error(`An unexpected error occured during initialization. ${e.message}`);g({reason:t.message}),console.error(t)}},exports.rejectConnections=g;\n","import type { Settings } from \"../shapes/setting-shapes\";\n\n/**\n * Fetches the settings for the application.\n * @returns The settings for the application.\n */\nexport async function getSettings(): Promise {\n\treturn {\n\t\tplatform: {\n\t\t\tsharedWorkerUrl: \"http://localhost:6060/js/shared-worker.bundle.js\",\n\t\t\tbrokerUrl: \"http://localhost:6060/platform/iframe-broker.html\",\n\t\t\tproviderId: \"web-interop-basic\",\n\t\t\tdefaultContextGroup: \"green\"\n\t\t}\n\t};\n}\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","import { init as initBrokerConnection } from \"@openfin/core-web/iframe-broker\";\nimport { getSettings } from \"./settings\";\n\n/**\n * Initializes the OpenFin Web Broker connection.\n * @returns A promise that resolves when the connection is established.\n */\nasync function init(): Promise {\n\tconst settings = await getSettings();\n\treturn initBrokerConnection({\n\t\tsharedWorkerUrl: settings.platform.sharedWorkerUrl\n\t});\n}\n\ninit()\n\t.then(() => {\n\t\tconsole.log(\"Connected to the OpenFin IFrame Web Broker.\");\n\t\treturn true;\n\t})\n\t.catch((err) => console.error(err));\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/web/v19.2.0/web-interop-basic/js/interop-view.bundle.js b/web/v19.2.0/web-interop-basic/js/interop-view.bundle.js index 34dd211..5c69bcc 100644 --- a/web/v19.2.0/web-interop-basic/js/interop-view.bundle.js +++ b/web/v19.2.0/web-interop-basic/js/interop-view.bundle.js @@ -1,38 +1,38 @@ /******/ (() => { // webpackBootstrap /******/ var __webpack_modules__ = ({ -/***/ "./node_modules/@openfin/core-web/out/api-client.js": -/*!**********************************************************!*\ - !*** ./node_modules/@openfin/core-web/out/api-client.js ***! - \**********************************************************/ +/***/ "../../node_modules/@openfin/core-web/out/api-client.js": +/*!**************************************************************!*\ + !*** ../../node_modules/@openfin/core-web/out/api-client.js ***! + \**************************************************************/ /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; -var e=__webpack_require__(/*! ./main-8cad4070.js */ "./node_modules/@openfin/core-web/out/main-8cad4070.js");__webpack_require__(/*! buffer/ */ "../../node_modules/buffer/index.js"),__webpack_require__(/*! uuid */ "../../node_modules/uuid/dist/esm-browser/index.js"),__webpack_require__(/*! events */ "../../node_modules/events/events.js"),__webpack_require__(/*! lodash/cloneDeep */ "../../node_modules/lodash/cloneDeep.js"),__webpack_require__(/*! lodash/isEqual */ "../../node_modules/lodash/isEqual.js"),exports.connect=e.connect; +var e=__webpack_require__(/*! ./main-8cad4070.js */ "../../node_modules/@openfin/core-web/out/main-8cad4070.js");__webpack_require__(/*! buffer/ */ "../../node_modules/buffer/index.js"),__webpack_require__(/*! uuid */ "../../node_modules/uuid/dist/esm-browser/index.js"),__webpack_require__(/*! events */ "../../node_modules/events/events.js"),__webpack_require__(/*! lodash/cloneDeep */ "../../node_modules/lodash/cloneDeep.js"),__webpack_require__(/*! lodash/isEqual */ "../../node_modules/lodash/isEqual.js"),exports.connect=e.connect; /***/ }), -/***/ "./node_modules/@openfin/core-web/out/main-8cad4070.js": -/*!*************************************************************!*\ - !*** ./node_modules/@openfin/core-web/out/main-8cad4070.js ***! - \*************************************************************/ +/***/ "../../node_modules/@openfin/core-web/out/main-8cad4070.js": +/*!*****************************************************************!*\ + !*** ../../node_modules/@openfin/core-web/out/main-8cad4070.js ***! + \*****************************************************************/ /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; -var e=__webpack_require__(/*! buffer/ */ "../../node_modules/buffer/index.js"),t=__webpack_require__(/*! events */ "../../node_modules/events/events.js"),n=__webpack_require__(/*! lodash/cloneDeep */ "../../node_modules/lodash/cloneDeep.js"),i=__webpack_require__(/*! lodash/isEqual */ "../../node_modules/lodash/isEqual.js"),r=__webpack_require__(/*! uuid */ "../../node_modules/uuid/dist/esm-browser/index.js");const o=(e,t)=>`${t}<${btoa(JSON.stringify(e))}>`;var s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof __webpack_require__.g?__webpack_require__.g:"undefined"!=typeof self?self:{},a={},c={},d={},h={};async function l(e){const t=[];for(const n of e){const e=await n();t.push(e)}return t}Object.defineProperty(h,"__esModule",{value:!0}),h.promiseMapSerial=h.serial=h.promiseMap=h.promisify=void 0,h.promisify=function(e){return(...t)=>new Promise(((n,i)=>{e(...t,((e,t)=>e?i(e):n(t)))}))},h.promiseMap=async function(e,t){return Promise.all(e.map(t))},h.serial=l,h.promiseMapSerial=async function(e,t){return l(e.map(((e,n,i)=>()=>t(e,n,i))))};var u,p=s&&s.__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},w=s&&s.__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)};Object.defineProperty(d,"__esModule",{value:!0}),d.Reply=d.EmitterBase=d.Base=void 0;const y=h;class f{constructor(e){this.isNodeEnvironment=()=>"node"===this.wire.environment.type,this.isOpenFinEnvironment=()=>"openfin"===this.wire.environment.type,this.isBrowserEnvironment=()=>"other"===this.wire.environment.type,this.wire=e}get fin(){return this.wire.getFin()}get me(){return this.wire.me}}d.Base=f;d.EmitterBase=class extends f{constructor(e,t,...n){super(e),this.topic=t,u.set(this,void 0),this.eventNames=()=>this.hasEmitter()?this.getOrCreateEmitter().eventNames():[],this.emit=(e,t,...n)=>!!this.hasEmitter()&&this.getOrCreateEmitter().emit(e,t,...n),this.hasEmitter=()=>this.wire.eventAggregator.has(w(this,u,"f")),this.getOrCreateEmitter=()=>this.wire.eventAggregator.getOrCreate(w(this,u,"f")),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[],this.listenerCount=e=>this.hasEmitter()?this.getOrCreateEmitter().listenerCount(e):0,this.registerEventListener=async(e,t={},n,i)=>{const r={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e},o=this.getOrCreateEmitter();n(o);try{await this.wire.sendAction("subscribe-to-desktop-event",r)}catch(e){throw i(o),this.deleteEmitterIfNothingRegistered(o),e}},this.deregisterEventListener=async(e,t={})=>{if(this.hasEmitter()){const n={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e};await this.wire.sendAction("unsubscribe-to-desktop-event",n).catch((()=>null));return this.getOrCreateEmitter()}return Promise.resolve()},p(this,u,[t,...n],"f"),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[]}async on(e,t,n){return await this.registerEventListener(e,n,(n=>{n.on(e,t)}),(n=>{n.removeListener(e,t)})),this}async addListener(e,t,n){return this.on(e,t,n)}async once(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.once(e,i),n.once(e,t)}),(n=>{n.removeListener(e,i),n.removeListener(e,t)})),this}async prependListener(e,t,n){return await this.registerEventListener(e,n,(n=>{n.prependListener(e,t)}),(n=>{n.removeListener(e,t)})),this}async prependOnceListener(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.prependOnceListener(e,t),n.once(e,i)}),(n=>{n.removeListener(e,t),n.removeListener(e,i)})),this}async removeListener(e,t,n){const i=await this.deregisterEventListener(e,n);return i&&(i.removeListener(e,t),this.deleteEmitterIfNothingRegistered(i)),this}async deregisterAllListeners(e){const t={...this.identity,type:e,topic:this.topic};if(this.hasEmitter()){const e=this.getOrCreateEmitter(),n=e.listenerCount(t.type),i=[];for(let e=0;enull)));return await Promise.all(i),e}}async removeAllListeners(e){const t=async e=>{const t=await this.deregisterAllListeners(e);t&&(t.removeAllListeners(e),this.deleteEmitterIfNothingRegistered(t))};if(e)await t(e);else if(this.hasEmitter()){const e=this.getOrCreateEmitter().eventNames();await(0,y.promiseMap)(e,t)}return this}deleteEmitterIfNothingRegistered(e){0===e.eventNames().length&&this.wire.eventAggregator.delete(w(this,u,"f"))}},u=new WeakMap;d.Reply=class{};var g={};Object.defineProperty(g,"__esModule",{value:!0});var m=g.RuntimeError=g.NotSupportedError=g.NotImplementedError=g.NoAckError=g.DuplicateCorrelationError=g.UnexpectedActionError=g.DisconnectedError=void 0;class v extends Error{constructor(e){super(`Expected websocket state OPEN but found ${e}`),this.readyState=e}}g.DisconnectedError=v;class C extends Error{}g.UnexpectedActionError=C;class b extends Error{}g.DuplicateCorrelationError=b;class I extends Error{}g.NoAckError=I;class E extends Error{}g.NotImplementedError=E;class x extends Error{}g.NotSupportedError=x;class A extends Error{constructor(e){const{message:t,name:n,stack:i,...r}=e;super(t),this.name=n||"Error",this.stack=i??this.toString(),Object.keys(r).forEach((e=>{this[e]=r[e]}))}}class P extends Error{static getCallSite(e=0){const t=Error.stackTraceLimit,n=e+1;Error.stackTraceLimit=t+n;const i=Error.prepareStackTrace;Error.prepareStackTrace=(e,t)=>t;const r=(new Error).stack?.slice(n)??[];return Error.prepareStackTrace=i,Error.stackTraceLimit=t,r}static prepareStackTrace(e,t){if("function"==typeof Error.prepareStackTrace)return Error.prepareStackTrace(e,t);let n="";n+=e.name||"Error",n+=`: ${e.message||""}`;for(const e of t)n+=`\n at ${e.toString()}`;return n}constructor(e,t){const{reason:n,error:i}=e;super(n),this.name="RuntimeError",i?.stack&&(this.cause=new A(i)),t&&(this.stack=P.prepareStackTrace(this,t))}}m=g.RuntimeError=P;var M={},_={},O={};Object.defineProperty(O,"__esModule",{value:!0}),O.validateIdentity=void 0,O.validateIdentity=function(e){let t;return"object"==typeof e&&"string"==typeof e.uuid||(t="Not a valid identity object"),t};var S={},R={},F={},j={},k={},L={},T={};Object.defineProperty(T,"__esModule",{value:!0}),T.handleDeprecatedWarnings=void 0;var $;T.handleDeprecatedWarnings=e=>{(e.contentNavigation?.whitelist||e.contentNavigation?.blacklist||e.contentRedirect?.whitelist||e.contentRedirect?.blacklist)&&console.warn("The properties 'whitelist' and 'blacklist' have been marked as deprecated and will be removed in a future version. Please use 'allowlist' and 'denylist'.")};var B={},G={};Object.defineProperty(G,"__esModule",{value:!0}),G.AsyncRetryableLazy=W=G.Lazy=void 0;var W=G.Lazy=class{constructor(e){this.producerFn=e}getValue(){return this.value||(this.value=this.producerFn()),this.value}};G.AsyncRetryableLazy=class{constructor(e){this.producerFn=e}async getValue(){return this.promise||(this.promise=this.producerFn().catch((e=>{throw delete this.promise,e}))),this.promise}};var H={};Object.defineProperty(H,"__esModule",{value:!0}),H.WebContents=void 0;const N=d;class D extends N.EmitterBase{constructor(e,t,n){super(e,n,t.uuid,t.name),this.identity=t,this.entityType=n}capturePage(e){return this.wire.sendAction("capture-page",{options:e,...this.identity}).then((({payload:e})=>e.data))}executeJavaScript(e){return this.wire.sendAction("execute-javascript-in-window",{...this.identity,code:e}).then((({payload:e})=>e.data))}getZoomLevel(){return this.wire.sendAction("get-zoom-level",this.identity).then((({payload:e})=>e.data))}setZoomLevel(e){return this.wire.sendAction("set-zoom-level",{...this.identity,level:e}).then((()=>{}))}navigate(e){return this.wire.sendAction("navigate-window",{...this.identity,url:e}).then((()=>{}))}navigateBack(){return this.wire.sendAction("navigate-window-back",{...this.identity}).then((()=>{}))}async navigateForward(){await this.wire.sendAction("navigate-window-forward",{...this.identity})}stopNavigation(){return this.wire.sendAction("stop-window-navigation",{...this.identity}).then((()=>{}))}reload(e=!1){return this.wire.sendAction("reload-window",{ignoreCache:e,...this.identity}).then((()=>{}))}print(e={}){return this.wire.sendAction("print",{...this.identity,options:e}).then((()=>{}))}findInPage(e,t){return this.wire.sendAction("find-in-page",{...this.identity,searchTerm:e,options:t}).then((({payload:e})=>e.data))}stopFindInPage(e){return this.wire.sendAction("stop-find-in-page",{...this.identity,action:e}).then((()=>{}))}getPrinters(){return this.wire.sendAction("get-printers",{...this.identity}).then((({payload:e})=>e.data))}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){await this.wire.sendAction("focus-window",{emitSynthFocused:e,...this.identity})}async showDeveloperTools(){await this.wire.sendAction("show-developer-tools",this.identity)}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction("get-process-info",this.identity);return e}async getSharedWorkers(){return this.wire.sendAction("get-shared-workers",this.identity).then((({payload:e})=>e.data))}async inspectSharedWorker(){await this.wire.sendAction("inspect-shared-worker",{...this.identity})}async inspectSharedWorkerById(e){await this.wire.sendAction("inspect-shared-worker-by-id",{...this.identity,workerId:e})}async inspectServiceWorker(){await this.wire.sendAction("inspect-service-worker",{...this.identity})}async showPopupWindow(e){if(this.wire.sendAction(`${this.entityType}-show-popup-window`,this.identity).catch((()=>{})),e?.onPopupReady){const t=async({popupName:t})=>{try{const n=this.fin.Window.wrapSync({uuid:this.fin.me.uuid,name:t});await e.onPopupReady(n)}catch(e){throw new Error(`Something went wrong during onPopupReady execution: ${e}`)}};await this.once("popup-ready",t)}const{payload:t}=await this.wire.sendAction("try-create-popup-window",{options:{...e,hasResultCallback:!!e?.onPopupResult,hasReadyCallback:!!e?.onPopupReady},...this.identity}),{data:{willOpen:n,options:i}}=t;n&&await this.fin.Window.create(i.initialOptions);if(e?.onPopupResult){const t=async t=>{await e.onPopupResult((e=>{const{name:t,uuid:n,result:i,data:r}=e,o={identity:{name:t,uuid:n},result:i};return r&&(o.data=r),o})(t))},n=async()=>{await this.removeListener("popup-result",t)};await this.on("popup-result",t),await this.once("popup-teardown",n)}const{payload:r}=await this.wire.sendAction("show-popup-window",{options:i,...this.identity});return r.data}}var U,V,z,K,q;function J(){return V||(V=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(function(){if($)return L;$=1,Object.defineProperty(L,"__esModule",{value:!0}),L.ViewModule=void 0;const e=d,t=O,n=J(),i=T;class r extends e.Base{async create(e){const{uuid:t}=this.wire.me;if(!e.name||"string"!=typeof e.name)throw new Error("Please provide a name property as a string in order to create a View.");return(0,i.handleDeprecatedWarnings)(e),this.wire.environment.childViews?await this.wire.environment.createChildContent({entityType:"view",options:{...e,uuid:t}}):await this.wire.sendAction("create-view",{...e,uuid:t}),this.wrapSync({uuid:t,name:e.name})}async wrap(e){this.wire.sendAction("view-wrap").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}wrapSync(e){this.wire.sendAction("view-wrap-sync").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}getCurrent(){if(this.wire.sendAction("view-get-current").catch((e=>{})),!this.wire.me.isView)throw new Error("You are not in a View context");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction("view-get-current-sync").catch((e=>{})),!this.wire.me.isView)throw new Error("You are not in a View context");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return L.ViewModule=r,L}(),e),n(function(){if(U)return B;var e;U=1,Object.defineProperty(B,"__esModule",{value:!0}),B.View=void 0;const t=g,n=G,i=H,r=ie();class o extends i.WebContents{constructor(i,o){super(i,o,"view"),this.identity=o,e.set(this,new n.Lazy((()=>this.fin.Platform.wrapSync(this.identity).getClient()))),this.attach=async e=>{await this.wire.sendAction("attach-view",{target:e,...this.identity})},this.destroy=async()=>{await this.wire.sendAction("destroy-view",{...this.identity})},this.show=async()=>{await this.wire.sendAction("show-view",{...this.identity})},this.showAt=async(e,t={})=>{await this.wire.sendAction("show-view-at",{bounds:e,...this.identity,options:t})},this.bringToFront=async()=>{await this.wire.sendAction("bring-view-to-front",{...this.identity})},this.hide=async()=>{await this.wire.sendAction("hide-view",{...this.identity})},this.setBounds=async e=>{await this.wire.sendAction("set-view-bounds",{bounds:e,...this.identity})},this.getBounds=async()=>(await this.wire.sendAction("get-view-bounds",{...this.identity})).payload.data,this.getInfo=async()=>(await this.wire.sendAction("get-view-info",{...this.identity})).payload.data,this.getParentLayout=async()=>(this.wire.sendAction("view-get-parent-layout",{...this.identity}).catch((()=>{})),this.fin.Platform.Layout.getLayoutByViewIdentity(this.identity)),this.getOptions=async()=>this.wire.sendAction("get-view-options",{...this.identity}).then((({payload:e})=>e.data)),this.updateOptions=async e=>this.wire.sendAction("update-view-options",{options:e,...this.identity}).then((()=>{})),this.getCurrentWindow=async()=>{const{payload:{data:e}}=await this.wire.sendAction("get-view-window",{...this.identity});return new r._Window(this.wire,e)},this.getCurrentStack=async()=>{this.wire.sendAction("view-get-current-stack").catch((()=>{}));try{return(await this.getParentLayout()).getStackByViewIdentity(this.identity)}catch(e){throw new t.RuntimeError({reason:"This view does not belong to a stack.",error:e})}},this.triggerBeforeUnload=async()=>(await this.wire.sendAction("trigger-before-unload",{...this.identity})).payload.data,this.bindToElement=async e=>{if(!e)throw new Error("Element not found.");return this.wire.environment.observeBounds(e,(async e=>this.setBounds(e)))}}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){const t=await this.getCurrentWindow();await t.focusedWebViewWasChanged(),await super.focus({emitSynthFocused:e})}}return B.View=o,e=new WeakMap,B}(),e)}(k)),k}function Y(){if(z)return j;z=1,Object.defineProperty(j,"__esModule",{value:!0}),j.Application=void 0;const e=d,t=ie(),n=J();class i extends e.EmitterBase{constructor(e,n){super(e,"application",n.uuid),this.identity=n,this.window=new t._Window(this.wire,{uuid:this.identity.uuid,name:this.identity.uuid})}windowListFromIdentityList(e){const n=[];return e.forEach((e=>{n.push(new t._Window(this.wire,{uuid:e.uuid,name:e.name}))})),n}isRunning(){return this.wire.sendAction("is-application-running",this.identity).then((({payload:e})=>e.data))}async quit(e=!1){try{await this._close(e),await this.wire.sendAction("destroy-application",{force:e,...this.identity})}catch(e){if(!["Remote connection has closed","Could not locate the requested application"].some((t=>e.message.includes(t))))throw e}}async _close(e=!1){try{await this.wire.sendAction("close-application",{force:e,...this.identity})}catch(e){if(!e.message.includes("Remote connection has closed"))throw e}}close(e=!1){return console.warn("Deprecation Warning: Application.close is deprecated Please use Application.quit"),this.wire.sendAction("application-close",this.identity).catch((e=>{})),this._close(e)}getChildWindows(){return this.wire.sendAction("get-child-windows",this.identity).then((({payload:e})=>{const t=[];return e.data.forEach((e=>{t.push({uuid:this.identity.uuid,name:e})})),this.windowListFromIdentityList(t)}))}getManifest(){return this.wire.sendAction("get-application-manifest",this.identity).then((({payload:e})=>e.data))}getParentUuid(){return this.wire.sendAction("get-parent-application",this.identity).then((({payload:e})=>e.data))}getShortcuts(){return this.wire.sendAction("get-shortcuts",this.identity).then((({payload:e})=>e.data))}async getViews(){const{payload:e}=await this.wire.sendAction("application-get-views",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}getZoomLevel(){return this.wire.sendAction("get-application-zoom-level",this.identity).then((({payload:e})=>e.data))}getWindow(){return this.wire.sendAction("application-get-window",this.identity).catch((e=>{})),Promise.resolve(this.window)}registerUser(e,t){return this.wire.sendAction("register-user",{userName:e,appName:t,...this.identity}).then((()=>{}))}removeTrayIcon(){return this.wire.sendAction("remove-tray-icon",this.identity).then((()=>{}))}restart(){return this.wire.sendAction("restart-application",this.identity).then((()=>{}))}run(){return console.warn("Deprecation Warning: Application.run is deprecated Please use fin.Application.start"),this.wire.sendAction("application-run",this.identity).catch((e=>{})),this._run()}_run(e={}){return this.wire.sendAction("run-application",{manifestUrl:this._manifestUrl,opts:e,...this.identity}).then((()=>{}))}scheduleRestart(){return this.wire.sendAction("relaunch-on-close",this.identity).then((()=>{}))}async sendApplicationLog(){const{payload:e}=await this.wire.sendAction("send-application-log",this.identity);return e.data}async setJumpList(e){await this.wire.sendAction("set-jump-list",{config:e,...this.identity})}setTrayIcon(e){return this.wire.sendAction("set-tray-icon",{enabledIcon:e,...this.identity}).then((()=>{}))}setShortcuts(e){return this.wire.sendAction("set-shortcuts",{data:e,...this.identity}).then((()=>{}))}async setShortcutQueryParams(e){await this.wire.sendAction("set-shortcut-query-args",{data:e,...this.identity})}setZoomLevel(e){return this.wire.sendAction("set-application-zoom-level",{level:e,...this.identity}).then((()=>{}))}async setAppLogUsername(e){await this.wire.sendAction("set-app-log-username",{data:e,...this.identity})}getTrayIconInfo(){return this.wire.sendAction("get-tray-icon-info",this.identity).then((({payload:e})=>e.data))}hasTrayIcon(){return this.wire.sendAction("has-tray-icon",this.identity).then((({payload:e})=>e.data))}terminate(){return this.wire.sendAction("terminate-application",this.identity).then((()=>{}))}wait(){return this.wire.sendAction("wait-for-hung-application",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction("get-info",this.identity).then((({payload:e})=>e.data))}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction("application-get-process-info",this.identity);return e}async setFileDownloadLocation(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t};await this.wire.sendAction("set-file-download-location",{...n,downloadLocation:e})}async getFileDownloadLocation(){const{payload:{data:e}}=await this.wire.sendAction("get-file-download-location",this.identity);return e}async showTrayIconPopupMenu(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t},{payload:i}=await this.wire.sendAction("show-tray-icon-popup-menu",{...n,options:e});return i.data}async closeTrayIconPopupMenu(){const{name:e}=this.wire.me,t={uuid:this.identity.uuid,name:e};await this.wire.sendAction("close-tray-icon-popup-menu",{...t})}}return j.Application=i,j}function Z(){return q||(q=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(function(){if(K)return F;K=1,Object.defineProperty(F,"__esModule",{value:!0}),F.ApplicationModule=void 0;const e=d,t=O,n=Y();class i extends e.Base{async wrap(e){this.wire.sendAction("wrap-application").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}wrapSync(e){this.wire.sendAction("wrap-application-sync").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}async _create(e){return void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&void 0===e.isPlatformController&&(e.autoShow=!0),await this.wire.sendAction("create-application",e),this.wrap({uuid:e.uuid})}create(e){return console.warn("Deprecation Warning: fin.Application.create is deprecated. Please use fin.Application.start"),this.wire.sendAction("application-create").catch((e=>{})),this._create(e)}async start(e){this.wire.sendAction("start-application").catch((e=>{}));const t=await this._create(e);return await this.wire.sendAction("run-application",{uuid:e.uuid}),t}async startManyManifests(e,t){return this.wire.sendAction("run-applications",{applications:e,opts:t}).then((()=>{}))}getCurrent(){return this.wire.sendAction("get-current-application").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction("get-current-application-sync").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}async startFromManifest(e,t){this.wire.sendAction("application-start-from-manifest").catch((e=>{}));const n=await this._createFromManifest(e);return await n._run(t),n}createFromManifest(e){return console.warn("Deprecation Warning: fin.Application.createFromManifest is deprecated. Please use fin.Application.startFromManifest"),this.wire.sendAction("application-create-from-manifest").catch((e=>{})),this._createFromManifest(e)}_createFromManifest(e){return this.wire.sendAction("get-application-manifest",{manifestUrl:e}).then((({payload:e})=>{const t=e.data.platform?e.data.platform.uuid:e.data.startup_app.uuid;return this.wrap({uuid:t})})).then((t=>(t._manifestUrl=e,t)))}}return F.ApplicationModule=i,F}(),e),n(Y(),e)}(R)),R}H.WebContents=D;var Q={};Object.defineProperty(Q,"__esModule",{value:!0}),Q.promisifySubscription=void 0;var X,ee,te;function ne(){if(X)return S;X=1,Object.defineProperty(S,"__esModule",{value:!0}),S._Window=void 0;const e=Z(),t=H,n=J(),i=T,r=Q;class o extends t.WebContents{constructor(e,t){super(e,t,"window")}async createWindow(e){this.wire.sendAction("window-create-window",this.identity).catch((e=>{}));const t=await(0,r.promisifySubscription)(this,"fire-constructor-callback");void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&(e.autoShow=!0),(0,i.handleDeprecatedWarnings)(e);const n=this.wire.environment.createChildContent({entityType:"window",options:e}),[o]=await Promise.all([t.getValue(),n]);let s;const{success:a}=o,c=o.data,{message:d}=c;s=a?{httpResponseCode:c.httpResponseCode,apiInjected:c.apiInjected}:{message:c.message,networkErrorCode:c.networkErrorCode,stack:c.stack};const h={message:d,cbPayload:s,success:a};try{this.getWebWindow().fin.__internal_.openerSuccessCBCalled()}catch(e){}return h.success?this:Promise.reject(h)}getAllFrames(){return this.wire.sendAction("get-all-frames",this.identity).then((({payload:e})=>e.data))}getBounds(){return this.wire.sendAction("get-window-bounds",this.identity).then((({payload:e})=>e.data))}center(){return this.wire.sendAction("center-window",this.identity).then((()=>{}))}blur(){return this.wire.sendAction("blur-window",this.identity).then((()=>{}))}bringToFront(){return this.wire.sendAction("bring-window-to-front",this.identity).then((()=>{}))}animate(e,t){return this.wire.sendAction("animate-window",{transitions:e,options:t,...this.identity}).then((()=>{}))}hide(){return this.wire.sendAction("hide-window",this.identity).then((()=>{}))}close(e=!1){return this.wire.sendAction("close-window",{force:e,...this.identity}).then((()=>{Object.setPrototypeOf(this,null)}))}focusedWebViewWasChanged(){return this.wire.sendAction("focused-webview-changed",this.identity).then((()=>{}))}getNativeId(){return this.wire.sendAction("get-window-native-id",this.identity).then((({payload:e})=>e.data))}async getCurrentViews(){const{payload:e}=await this.wire.sendAction("window-get-views",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}disableFrame(){return console.warn("Function is deprecated; use disableUserMovement instead."),this.wire.sendAction("disable-window-frame",this.identity).then((()=>{}))}disableUserMovement(){return this.wire.sendAction("disable-window-frame",this.identity).then((()=>{}))}enableFrame(){return console.warn("Function is deprecated; use enableUserMovement instead."),this.wire.sendAction("enable-window-frame",this.identity).then((()=>{}))}enableUserMovement(){return this.wire.sendAction("enable-window-frame",this.identity).then((()=>{}))}flash(){return this.wire.sendAction("flash-window",this.identity).then((()=>{}))}stopFlashing(){return this.wire.sendAction("stop-flash-window",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction("get-window-info",this.identity).then((({payload:e})=>e.data))}async getLayout(e){this.wire.sendAction("window-get-layout",this.identity).catch((e=>{}));const t=await this.getOptions();if(!t.layout&&!t.layoutSnapshot)throw new Error("Window does not have a Layout");return this.fin.Platform.Layout.wrap(e??this.identity)}getOptions(){return this.wire.sendAction("get-window-options",this.identity).then((({payload:e})=>e.data))}getParentApplication(){return this.wire.sendAction("window-get-parent-application",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity))}getParentWindow(){return this.wire.sendAction("window-get-parent-window",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity)).then((e=>e.getWindow()))}async getSnapshot(e){const t={area:e,...this.identity};console.warn("Window.getSnapshot has been deprecated, please use Window.capturePage");return(await this.wire.sendAction("get-window-snapshot",t)).payload.data}getState(){return this.wire.sendAction("get-window-state",this.identity).then((({payload:e})=>e.data))}getWebWindow(){return this.wire.sendAction("window-get-web-window",this.identity).catch((e=>{})),this.wire.environment.getWebWindow(this.identity)}isMainWindow(){return this.wire.sendAction("window-is-main-window",this.identity).catch((e=>{})),this.me.uuid===this.me.name}isShowing(){return this.wire.sendAction("is-window-showing",this.identity).then((({payload:e})=>e.data))}maximize(){return this.wire.sendAction("maximize-window",this.identity).then((()=>{}))}minimize(){return this.wire.sendAction("minimize-window",this.identity).then((()=>{}))}moveBy(e,t,n){return this.wire.sendAction("move-window-by",{deltaLeft:e,deltaTop:t,positioningOptions:n,...this.identity}).then((()=>{}))}moveTo(e,t,n){return this.wire.sendAction("move-window",{left:e,top:t,positioningOptions:n,...this.identity}).then((()=>{}))}resizeBy(e,t,n,i){return this.wire.sendAction("resize-window-by",{deltaWidth:Math.floor(e),deltaHeight:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}resizeTo(e,t,n,i){return this.wire.sendAction("resize-window",{width:Math.floor(e),height:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}restore(){return this.wire.sendAction("restore-window",this.identity).then((()=>{}))}setAsForeground(){return this.wire.sendAction("set-foreground-window",this.identity).then((()=>{}))}setBounds(e,t){return this.wire.sendAction("set-window-bounds",{...e,...this.identity,positioningOptions:t}).then((()=>{}))}show(e=!1){return this.wire.sendAction("show-window",{force:e,...this.identity}).then((()=>{}))}showAt(e,t,n=!1){return this.wire.sendAction("show-at-window",{force:n,left:Math.floor(e),top:Math.floor(t),...this.identity}).then((()=>{}))}updateOptions(e){return this.wire.sendAction("update-window-options",{options:e,...this.identity}).then((()=>{}))}authenticate(e,t){return this.wire.sendAction("window-authenticate",{userName:e,password:t,...this.identity}).then((()=>{}))}async showPopupMenu(e){const{payload:t}=await this.wire.sendAction("show-popup-menu",{options:e,...this.identity});return t.data}async closePopupMenu(){return this.wire.sendAction("close-popup-menu",{...this.identity}).then((()=>{}))}async dispatchPopupResult(e){this.wire.sendAction("window-dispatch-popup-result",this.identity).catch((e=>{})),await this.wire.sendAction("dispatch-popup-result",{data:e,...this.identity})}async print(e={content:"self"}){switch(e.content){case void 0:case"self":return super.print(e);case"screenshot":return this.wire.sendAction("print-screenshot",this.identity).then((()=>{}));case"views":return this.wire.sendAction("print-views",{...this.identity,options:e}).then((()=>{}));default:return}}}return S._Window=o,S}function ie(){return te||(te=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(function(){if(ee)return _;ee=1,Object.defineProperty(_,"__esModule",{value:!0}),_._WindowModule=void 0;const e=d,t=O,n=ne();class i extends e.Base{async wrap(e){this.wire.sendAction("window-wrap").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}wrapSync(e){this.wire.sendAction("window-wrap-sync").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}create(e){return this.wire.sendAction("create-window").catch((e=>{})),new n._Window(this.wire,{uuid:this.me.uuid,name:e.name}).createWindow(e)}getCurrent(){if(this.wire.sendAction("get-current-window").catch((e=>{})),!this.wire.me.isWindow)throw new Error("You are not in a Window context");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction("get-current-window-sync").catch((e=>{})),!this.wire.me.isWindow)throw new Error("You are not in a Window context");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return _._WindowModule=i,_}(),e),n(ne(),e)}(M)),M}Q.promisifySubscription=async(e,t,n=(()=>!0),i)=>{let r,o,s;const a=new Promise(((e,t)=>{r=e,o=t})),c=e=>{n(e)&&(clearTimeout(s),r(e))};return await e.on(t,c),i&&(s=setTimeout((()=>o(new Error("event timed out"))),i)),a.finally((()=>{e.removeListener(t,c).catch((()=>null))})),{getValue:()=>a}},Object.defineProperty(c,"__esModule",{value:!0}),c.System=void 0;const re=d,oe=g,se=ie(),ae=t;class ce extends re.EmitterBase{constructor(e){super(e,"system")}sendExternalProcessRequest(e,t){return new Promise(((n,i)=>{const r="external-process-exited";let o,s,a,c;"function"==typeof t.listener&&(a=e=>{const n=e||{};s={topic:"exited",uuid:n.processUuid||"",exitCode:n.exitCode||0},o===e.processUuid&&(t.listener(s),c.removeListener(r,a))},this.wire.me.name||(this.wire.me.name=this.wire.me.uuid),c=new se._Window(this.wire,this.wire.me),c.on(r,a)),this.wire.sendAction(e,t).then((({payload:e})=>{o=e.data.uuid,n(e.data),s&&o===s.uuid&&(t.listener(s),c.removeListener(r,a))})).catch((e=>{c&&c.removeListener(r,a),i(e)}))}))}getVersion(){return this.wire.sendAction("get-version").then((({payload:e})=>e.data))}clearCache(e){return this.wire.sendAction("clear-cache",e).then((()=>{}))}deleteCacheOnExit(){return this.wire.sendAction("delete-cache-request").then((()=>{}))}exit(){return this.wire.sendAction("exit-desktop").then((()=>{}))}async fetchManifest(e){const{payload:{data:t}}=await this.wire.sendAction("fetch-manifest",{manifestUrl:e});return t}flushCookieStore(){return this.wire.sendAction("flush-cookie-store").then((()=>{}))}getAllWindows(){return this.wire.sendAction("get-all-windows").then((({payload:e})=>e.data))}getAllApplications(){return this.wire.sendAction("get-all-applications").then((({payload:e})=>e.data))}getCommandLineArguments(){return this.wire.sendAction("get-command-line-arguments").then((({payload:e})=>e.data))}async getCrashReporterState(){const{payload:{data:{diagnosticMode:e,isRunning:t}}}=await this.wire.sendAction("get-crash-reporter-state");return console.warn("diagnosticMode property is deprecated. It will be removed in a future version"),{diagnosticMode:e,diagnosticsMode:e,isRunning:t}}async startCrashReporter(e){const t=e,n={...t,diagnosticMode:t.diagnosticsMode||t.diagnosticMode},{payload:{data:{diagnosticMode:i,isRunning:r}}}=await this.wire.sendAction("start-crash-reporter",n);return{diagnosticMode:i,diagnosticsMode:i,isRunning:r}}getUniqueUserId(){return this.wire.sendAction("get-unique-user-id").then((({payload:e})=>e.data))}getEntityInfo(e,t){return this.wire.sendAction("get-entity-info",{uuid:e,name:t}).then((({payload:e})=>e.data))}getEnvironmentVariable(e){return this.wire.sendAction("get-environment-variable",{environmentVariables:e}).then((({payload:e})=>e.data))}getFocusedWindow(){return this.wire.sendAction("get-focused-window").then((({payload:e})=>e.data))}async isAppCertified(e){const{payload:{data:{certifiedInfo:t}}}=await this.wire.sendAction("is-app-certified",{manifestUrl:e});return t}getInstalledRuntimes(){return this.wire.sendAction("get-installed-runtimes").then((({payload:e})=>e.data.runtimes))}async getInstalledApps(){const{payload:{data:{installedApps:e}}}=await this.wire.sendAction("get-installed-apps");return e}getLog(e){return this.wire.sendAction("view-log",e).then((({payload:e})=>e.data))}getMachineId(){return this.wire.sendAction("get-machine-id").then((({payload:e})=>e.data))}getMinLogLevel(){return this.wire.sendAction("get-min-log-level").then((({payload:e})=>e.data))}getLogList(){return this.wire.sendAction("list-logs").then((({payload:e})=>e.data))}getMonitorInfo(){return this.wire.sendAction("get-monitor-info").then((({payload:e})=>e.data))}getMousePosition(){return this.wire.sendAction("get-mouse-position").then((({payload:e})=>e.data))}getProcessList(){return console.warn("System.getProcessList has been deprecated. Please consider using our new process APIs: Window.getProcessInfo, View.getProcessInfo, Application.getProcessInfo, System.getAllProcessInfo"),this.wire.sendAction("process-snapshot").then((({payload:e})=>e.data))}async getAllProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction("get-all-process-info",this.identity);return e}getProxySettings(){return this.wire.sendAction("get-proxy-settings").then((({payload:e})=>e.data))}getRuntimeInfo(){return this.wire.sendAction("get-runtime-info").then((({payload:e})=>e.data))}getRvmInfo(){return this.wire.sendAction("get-rvm-info").then((({payload:e})=>e.data))}getHostSpecs(){return this.wire.sendAction("get-host-specs").then((({payload:e})=>e.data))}getOSInfo(){return this.wire.sendAction("get-os-info").then((({payload:e})=>e.data))}launchExternalProcess(e){return this.sendExternalProcessRequest("launch-external-process",e)}monitorExternalProcess(e){return this.sendExternalProcessRequest("monitor-external-process",e)}log(e,t){return this.wire.sendAction("write-to-log",{level:e,message:t}).then((()=>{}))}openUrlWithBrowser(e){return this.wire.sendAction("open-url-with-browser",{url:e}).then((()=>{}))}async registerCustomProtocol(e){if("object"!=typeof e)throw new Error("Must provide an object with a `protocolName` property having a string value.");await this.wire.sendAction("register-custom-protocol",e)}async unregisterCustomProtocol(e){await this.wire.sendAction("unregister-custom-protocol",{protocolName:e})}async getCustomProtocolState(e){return this.wire.sendAction("get-custom-protocol-state",{protocolName:e}).then((({payload:e})=>e.data))}releaseExternalProcess(e){return this.wire.sendAction("release-external-process",{uuid:e}).then((()=>{}))}showDeveloperTools(e){return this.wire.sendAction("show-developer-tools",e).then((()=>{}))}terminateExternalProcess(e){return this.wire.sendAction("terminate-external-process",e).then((()=>{}))}updateProxySettings(e){return this.wire.sendAction("update-proxy",e).then((()=>{}))}async downloadAsset(e,t){const n=()=>{};let i=n,r=n;const o=new Promise(((e,t)=>{i=e,r=t}));if("openfin"!==this.wire.environment.type)throw new oe.NotSupportedError("downloadAsset only supported in an OpenFin Render process");const s=oe.RuntimeError.getCallSite(),a=this.wire.environment.getNextMessageId().toString(),c=`asset-download-progress-${a}`,d=`asset-download-error-${a}`,h=`asset-download-complete-${a}`,l=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},u=()=>{this.removeListener(c,l)};await Promise.all([this.on(c,l),this.once(d,(e=>{u();const{reason:t,err:n}=e;r(new oe.RuntimeError({reason:t,error:n},s))})),this.once(h,(()=>{u(),i()}))]);const p=Object.assign(e,{downloadId:a});return await this.wire.sendAction("download-asset",p).catch((e=>{throw u(),e})),o}downloadRuntime(e,t){const n=oe.RuntimeError.getCallSite();return new Promise(((i,r)=>{if("openfin"!==this.wire.environment.type)return void r(new oe.NotSupportedError("downloadRuntime only supported in an OpenFin Render process"));const o=this.wire.environment.getNextMessageId().toString(),s=`runtime-download-progress-${o}`,a=`runtime-download-error-${o}`,c=`runtime-download-complete-${o}`,d=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},h=()=>{this.removeListener(s,d)};this.on(s,d),this.once(a,(e=>{h();const{reason:t,err:i}=e;r(new oe.RuntimeError({reason:t,error:i},n))})),this.once(c,(()=>{h(),i()}));const l=Object.assign(e,{downloadId:o});this.wire.sendAction("download-runtime",l).catch((e=>{h(),r(e)}))}))}downloadPreloadScripts(e){return this.wire.sendAction("download-preload-scripts",{scripts:e}).then((({payload:e})=>e.data))}getAllExternalApplications(){return this.wire.sendAction("get-all-external-applications").then((({payload:e})=>e.data))}getAppAssetInfo(e){return this.wire.sendAction("get-app-asset-info",e).then((({payload:e})=>e.data))}getCookies(e){const t=this.wire.environment.getUrl(),n=Object.assign(e,{url:t});return this.wire.sendAction("get-cookies",n).then((({payload:e})=>e.data))}setMinLogLevel(e){return this.wire.sendAction("set-min-log-level",{level:e}).then((()=>{}))}resolveUuid(e){return this.wire.sendAction("resolve-uuid",{entityKey:e}).then((({payload:e})=>e.data))}executeOnRemote(e,t){return t.requestingIdentity=e,this.wire.ferryAction(t)}readRegistryValue(e,t,n){return this.wire.sendAction("read-registry-value",{rootKey:e,subkey:t,value:n}).then((({payload:e})=>e.data))}registerExternalConnection(e){return this.wire.sendAction("register-external-connection",{uuid:e}).then((({payload:e})=>e.data))}async getServiceConfiguration(e){if("string"!=typeof e.name)throw new Error("Must provide an object with a `name` property having a string value");const{name:t}=e;return this.wire.sendAction("get-service-configuration",{name:t}).then((({payload:e})=>e.data))}async getSystemAppConfig(e){if("string"!=typeof e)throw new Error("Must provide a string value for name of system app");return this.wire.sendAction("get-system-app-configuration",{name:e}).then((({payload:e})=>e.data))}async registerShutdownHandler(e){this.wire.sendAction("system-register-shutdown-handler").catch((e=>{}));const{uuid:t,name:n}=this.wire.me;this.on("system-shutdown",(i=>{e({proceed:()=>{this.wire.environment.raiseEvent("application/system-shutdown-handled",{uuid:t,name:n,topic:"application"})}})}))}runRvmHealthCheck(){return this.wire.sendAction("run-rvm-health-check").then((({payload:e})=>e.data))}async launchManifest(e,t={}){const{subscribe:n,...i}=t,r=i;if(n){const e=new ae.EventEmitter;n(e);const t="app-version-progress",i="runtime-status",o="app-version-complete",s="app-version-error",a=this.wire.environment.getNextMessageId().toString();r.appVersionId=a;const c=[o,t,i,s],d=e=>{const{appVersionId:t,topic:n,type:i,...r}=e;return{...r,type:c.find((e=>i.includes(e)))}},h=t=>{const n=d(t);e.emit(n.type,n)},l=()=>{this.removeListener(`${t}.${a}`,h),this.removeListener(`${i}.${a}`,h),this.removeListener(`${o}.${a}`,h),this.removeListener(`${s}.${a}`,h),this.removeListener(`${o}.${a}`,l),this.removeListener(`${s}.${a}`,l)};await Promise.all([this.on(`${t}.${a}`,h),this.on(`${i}.${a}`,h),this.once(`${o}.${a}`,h),this.once(`${s}.${a}`,h),this.once(`${o}.${a}`,l),this.once(`${s}.${a}`,l)])}return(await this.wire.sendAction("launch-manifest",{manifestUrl:e,opts:r})).payload.data.manifest}async queryPermissionForCurrentContext(e){const t={uuid:this.wire.me.uuid,name:this.wire.me.name};return(await this.wire.sendAction("query-permission-for-current-context",{apiName:e,identity:t})).payload.data}async enableNativeWindowIntegrationProvider(e){const{payload:t}=await this.wire.sendAction("enable-native-window-integration-provider",{permissions:e});return t.data}async registerUsage({data:e,type:t}){await this.wire.sendAction("register-usage",{data:e,type:t})}async getPrinters(){const{payload:e}=await this.wire.sendAction("system-get-printers");return e.data}async updateProcessLoggingOptions(e){await this.wire.sendAction("system-update-process-logging-options",{options:e})}async getDomainSettings(){const{payload:{data:e}}=await this.wire.sendAction("get-domain-settings",this.identity);return e}async setDomainSettings(e){await this.wire.sendAction("set-domain-settings",{domainSettings:e,...this.identity})}async refreshExtensions(){const{payload:e}=await this.wire.sendAction("refresh-extensions");return e.data}async getInstalledExtensions(){const{payload:e}=await this.wire.sendAction("get-installed-extensions");return e.data}}c.System=ce;var de={},he={};Object.defineProperty(he,"__esModule",{value:!0}),he.RefCounter=void 0;he.RefCounter=class{constructor(){this.topicRefMap=new Map}incRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t+1;n=i,this.topicRefMap.set(e,i)}else this.topicRefMap.set(e,1),n=1;return n}decRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t-1;this.topicRefMap.set(e,i),n=i}else n=-1;return n}actOnFirst(e,t,n){return 1===this.incRefCount(e)?t():n()}actOnLast(e,t,n){return 0===this.decRefCount(e)?t():n()}};var le={},ue={},pe={};Object.defineProperty(pe,"__esModule",{value:!0}),pe.ChannelBase=pe.ProtectedItems=void 0;const we=e=>async(t,n,i)=>{const r=await e(t,n,i);return void 0===r?n:r};pe.ProtectedItems=class{constructor(e,t){this.providerIdentity=e,this.close=t}};class ye{static defaultAction(e){throw new Error(`No action registered at target for ${e}`)}constructor(){this.subscriptions=new Map}async processAction(e,t,n){try{const i=this.subscriptions.has(e)?this.subscriptions.get(e):(t,n)=>(this.defaultAction??ye.defaultAction)(e,t,n),r=this.preAction?await this.preAction(e,t,n):t,o=await i(r,n);return this.postAction?await this.postAction(e,o,n):o}catch(t){if(this.errorMiddleware)return this.errorMiddleware(e,t,n);throw t}}beforeAction(e){if(this.preAction)throw new Error("Already registered beforeAction middleware");this.preAction=we(e)}onError(e){if(this.errorMiddleware)throw new Error("Already registered error middleware");this.errorMiddleware=e}afterAction(e){if(this.postAction)throw new Error("Already registered afterAction middleware");this.postAction=we(e)}remove(e){this.subscriptions.delete(e)}setDefaultAction(e){if(this.defaultAction)throw new Error("default action can only be set once");this.defaultAction=e}register(e,t){if(this.subscriptions.has(e))throw new Error(`Subscription already registered for action: ${e}. Unsubscribe before adding new subscription`);return this.subscriptions.set(e,t),!0}}pe.ChannelBase=ye;var fe,ge,me,ve=s&&s.__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)},Ce=s&&s.__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};Object.defineProperty(ue,"__esModule",{value:!0}),ue.ChannelClient=void 0;const be=pe,Ie=new Map;class Ee extends be.ChannelBase{static closeChannelByEndpointId(e){const t=Ie.get(e);t&&ve(t,me,"f").call(t)}static handleProviderDisconnect(e){for(const t of Ie.values())t.providerIdentity.channelId===e.channelId&&(t.disconnectListener(e),ve(t,me,"f").call(t))}constructor(e,t,n){super(),fe.set(this,void 0),ge.set(this,void 0),this.processAction=(e,t,n)=>super.processAction(e,t,n),me.set(this,(()=>{Ie.delete(this.endpointId),ve(this,ge,"f").close()})),Ce(this,fe,new be.ProtectedItems(e,t),"f"),this.disconnectListener=()=>{},this.endpointId=e.endpointId,Ce(this,ge,n,"f"),Ie.set(this.endpointId,this),n.receive(this.processAction)}get providerIdentity(){return ve(this,fe,"f").providerIdentity}async dispatch(e,t){if(ve(this,ge,"f").isEndpointConnected(this.providerIdentity.channelId))return ve(this,ge,"f").send(this.providerIdentity.channelId,e,t);throw new Error("The client you are trying to dispatch from is disconnected from the target provider.")}onDisconnection(e){this.disconnectListener=t=>{try{e(t)}catch(e){throw new Error(`Error while calling the onDisconnection callback: ${e.message}`)}finally{this.disconnectListener=()=>{}}}}async disconnect(){await this.sendDisconnectAction(),ve(this,me,"f").call(this)}async sendDisconnectAction(){const e=ve(this,fe,"f");await e.close()}static async wireClose(e,t,n){const{channelName:i,uuid:r,name:o}=t;await e.sendAction("disconnect-from-channel",{channelName:i,uuid:r,name:o,endpointId:n})}}ue.ChannelClient=Ee,fe=new WeakMap,ge=new WeakMap,me=new WeakMap;var xe={},Ae={};Object.defineProperty(Ae,"__esModule",{value:!0}),Ae.exhaustiveCheck=void 0,Ae.exhaustiveCheck=function(e,t){throw new Error(`Unsupported value: ${e}${t?`\n Supported values are: ${t.join("")}`:""}`)};var Pe,Me,_e,Oe={},Se=s&&s.__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},Re=s&&s.__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)};Object.defineProperty(Oe,"__esModule",{value:!0}),Oe.ClassicInfo=Oe.ClassicStrategy=void 0;Oe.ClassicStrategy=class{constructor(e,t,n,i){this.messageReceiver=t,this.endpointId=n,this.providerIdentity=i,Pe.set(this,void 0),Me.set(this,new Map),_e.set(this,new Map),this.send=async(e,t,n)=>{const i=Re(this,Me,"f").get(e);if(!i)throw new Error(`Could not locate routing info for endpoint ${e}`);const r={...i};r.isLocalEndpointId&&delete r.endpointId,delete r.isLocalEndpointId;const o=Re(this,Pe,"f").sendAction("send-channel-message",{...r,providerIdentity:this.providerIdentity,action:t,payload:n});Re(this,_e,"f").get(e)?.add(o);return(await o.catch((e=>{throw new Error(e.message)})).finally((()=>{Re(this,_e,"f").get(e)?.delete(o)}))).payload.data.result},this.close=async()=>{this.messageReceiver.removeEndpoint(this.providerIdentity.channelId,this.endpointId),[...Re(this,Me,"f").keys()].forEach((e=>this.closeEndpoint(e))),Se(this,Me,new Map,"f")},Se(this,Pe,e,"f")}onEndpointDisconnect(e,t){}receive(e){this.messageReceiver.addEndpoint(e,this.providerIdentity.channelId,this.endpointId)}async closeEndpoint(e){const t=Re(this,Me,"f").get(e);Re(this,Me,"f").delete(e);const n=Re(this,_e,"f").get(e);n?.forEach((n=>{const i=`Channel connection with identity uuid: ${t?.uuid} / name: ${t?.name} / endpointId: ${e} no longer connected.`;n.cancel(new Error(i))}))}isEndpointConnected(e){return Re(this,Me,"f").has(e)}addEndpoint(e,t){Re(this,Me,"f").set(e,t.endpointIdentity),Re(this,_e,"f").set(e,new Set)}isValidEndpointPayload(e){return"string"==typeof e?.endpointIdentity?.endpointId||"string"==typeof e?.endpointIdentity?.channelId}},Pe=new WeakMap,Me=new WeakMap,_e=new WeakMap,Oe.ClassicInfo={version:5,minimumVersion:0,type:"classic"};var Fe={},je={},ke={};Object.defineProperty(ke,"__esModule",{value:!0}),ke.errorToPOJO=void 0,ke.errorToPOJO=function(e){return{stack:e.stack,name:e.name,message:e.message,toString:()=>e.stack||e.toString()}};var Le,Te,$e=s&&s.__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)},Be=s&&s.__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};Object.defineProperty(je,"__esModule",{value:!0}),je.RTCEndpoint=void 0;const Ge=ke;je.RTCEndpoint=class{static isValidEndpointPayload(e){const t=e=>"object"==typeof e&&null!==e;return t(e)&&t(e.endpointIdentity)&&t(e.rtc)&&"string"==typeof e.endpointIdentity.endpointId}constructor({rtc:e,endpointIdentity:t}){this.responseMap=new Map,Le.set(this,null),Te.set(this,void 0),this.connectionStateChangeHandler=e=>{"connected"!==this.rtc.rtcClient.connectionState&&(this.rtc.rtcClient.removeEventListener("connectionstatechange",this.connectionStateChangeHandler),this.close(),$e(this,Te,"f")&&$e(this,Te,"f").call(this))},this.send=async(e,t)=>{const n=`message-${Math.random()}`,i=new Promise(((e,t)=>{this.responseMap.set(n,{resolve:e,reject:t})}));return this.rtc.channels.request.send(JSON.stringify({action:e,payload:t,messageId:n})),i},this.close=()=>{this.responseMap.forEach((e=>e.reject("Connection has closed."))),this.responseMap=new Map,this.rtc.channels.request.close(),this.rtc.channels.response.close(),this.rtc.rtcClient.close()},this.rtc=e,this.endpointIdentity=t,this.rtc.channels.response.addEventListener("message",(e=>{let{data:t}=e;e.data instanceof ArrayBuffer&&(t=(new TextDecoder).decode(e.data));const{messageId:n,payload:i,success:r,error:o}=JSON.parse(t),{resolve:s,reject:a}=this.responseMap.get(n)??{};s&&a?(this.responseMap.delete(n),r?s(i):a(o)):(console.log("Could not find id in responseMap."),console.log(e))})),this.rtc.channels.request.addEventListener("message",(async e=>{let{data:n}=e;e.data instanceof ArrayBuffer&&(n=(new TextDecoder).decode(e.data));const{messageId:i,action:r,payload:o}=JSON.parse(n);if($e(this,Le,"f"))try{const e=await $e(this,Le,"f").call(this,r,o,t);this.rtc.channels.response.send(JSON.stringify({messageId:i,payload:e,success:!0}))}catch(e){"open"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,error:(0,Ge.errorToPOJO)(e),success:!1}))}else"open"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,success:!1,error:"Connection not ready."}))})),this.rtc.rtcClient.addEventListener("connectionstatechange",this.connectionStateChangeHandler),Object.values(this.rtc.channels).forEach((e=>{e.onclose=e=>{[...this.responseMap.values()].forEach((e=>e.reject(new Error("RTCDataChannel closed unexpectedly, this is most commonly caused by message size. Note: RTC Channels have a message size limit of ~255kB.")))),this.close(),$e(this,Te,"f")&&$e(this,Te,"f").call(this)}}))}onDisconnect(e){if($e(this,Te,"f"))throw new Error("RTCEndpoint disconnectListener cannot be set twice.");Be(this,Te,e,"f")}receive(e){if($e(this,Le,"f"))throw new Error("You have already set a listener for this RTC Endpoint.");Be(this,Le,e,"f")}get connected(){return"connected"===this.rtc.rtcClient.connectionState}},Le=new WeakMap,Te=new WeakMap;var We,He,Ne,De={},Ue=s&&s.__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)},Ve=s&&s.__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};Object.defineProperty(De,"__esModule",{value:!0}),De.EndpointStrategy=void 0;De.EndpointStrategy=class{constructor(e,t,n){this.EndpointType=e,this.StrategyName=n,We.set(this,null),He.set(this,new Map),Ne.set(this,!0),this.send=async(e,t,n)=>this.getEndpointById(e).send(t,n),this.close=async()=>{Ue(this,Ne,"f")&&(Ue(this,He,"f").forEach((e=>e.close())),Ve(this,He,new Map,"f")),Ve(this,Ne,!1,"f")},this.isValidEndpointPayload=t}onEndpointDisconnect(e,t){this.getEndpointById(e).onDisconnect(t)}receive(e){if(Ue(this,We,"f"))throw new Error(`You have already set a listener for this ${this.StrategyName} Strategy`);Ve(this,We,e,"f"),Ue(this,He,"f").forEach((e=>e.receive(Ue(this,We,"f"))))}getEndpointById(e){const t=Ue(this,He,"f").get(e);if(!t)throw new Error(`Client with endpoint id ${e} is not connected`);return t}get connected(){return Ue(this,Ne,"f")}isEndpointConnected(e){return Ue(this,He,"f").has(e)}addEndpoint(e,t){if(!Ue(this,Ne,"f"))return void console.warn(`Adding endpoint to disconnected ${this.StrategyName} Strategy`);const n=new this.EndpointType(t);Ue(this,We,"f")&&n.receive(Ue(this,We,"f")),Ue(this,He,"f").set(e,n)}async closeEndpoint(e){Ue(this,He,"f").delete(e)}},We=new WeakMap,He=new WeakMap,Ne=new WeakMap,Object.defineProperty(Fe,"__esModule",{value:!0}),Fe.RTCInfo=Fe.RTCStrategy=void 0;const ze=je,Ke=De;class qe extends Ke.EndpointStrategy{constructor(){super(ze.RTCEndpoint,ze.RTCEndpoint.isValidEndpointPayload,"RTC")}}Fe.RTCStrategy=qe,Fe.RTCInfo={version:2,minimumVersion:0,type:"rtc"};var Je={};Object.defineProperty(Je,"__esModule",{value:!0}),Je.RTCICEManager=void 0;const Ye=d;class Ze extends Ye.EmitterBase{constructor(e){super(e,"channel"),this.ensureChannelOpened=e=>new Promise(((t,n)=>{if("open"===e.readyState)t();else if("connecting"===e.readyState){const n=()=>{e.removeEventListener("open",n),t()};e.addEventListener("open",n)}else n(new Error("This Channel has already closed"))}))}static createDataChannelPromise(e,t){let n;const i=new Promise((e=>{n=e})),r=i=>{const o=()=>{i.channel.removeEventListener("open",o),n(i.channel)};i.channel.label===e&&(i.channel.addEventListener("open",o),t.removeEventListener("datachannel",r))};return t.addEventListener("datachannel",r),i}async listenForProviderIce(e,t){await this.on(this.createProviderEventName(e),t,{timestamp:Date.now()})}async raiseProviderIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createProviderEventName(e)),t)}async listenForClientIce(e,t){await this.on(this.createClientEventName(e),t,{timestamp:Date.now()})}async raiseClientIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createClientEventName(e)),t)}cleanupIceListeners(e){this.removeAllListeners(this.createClientEventName(e)),this.removeAllListeners(this.createProviderEventName(e))}createClientEventName(e){return`ice-client-${e}`}createProviderEventName(e){return`ice-provider-${e}`}createRouteString(e){return`channel/${e}`}createRtcPeer(){return this.wire.environment.getRtcPeer()}async startClientOffer(){const e=Math.random().toString(),t=this.createRtcPeer();t.addEventListener("icecandidate",(async t=>{t.candidate&&await this.raiseClientIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForProviderIce(e,(async e=>{await t.addIceCandidate(e.candidate)}));const n={request:t.createDataChannel("request"),response:t.createDataChannel("response")},i=await t.createOffer();await t.setLocalDescription(i);const r=Promise.all([n.request,n.response].map(this.ensureChannelOpened)).then((()=>{}));return{rtcClient:t,channels:n,offer:i,rtcConnectionId:e,channelsOpened:r}}async finishClientOffer(e,t,n){return await e.setRemoteDescription(t),await n,!0}async createProviderAnswer(e,t){const n=this.createRtcPeer(),i=Ze.createDataChannelPromise("request",n),r=Ze.createDataChannelPromise("response",n);n.addEventListener("icecandidate",(async t=>{t.candidate&&await this.raiseProviderIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForClientIce(e,(async e=>{await n.addIceCandidate(e.candidate)})),await n.setRemoteDescription(t);const o=await n.createAnswer();await n.setLocalDescription(o);const s=Promise.all([i,r]).then((([t,n])=>(this.cleanupIceListeners(e),{request:t,response:n})));return{rtcClient:n,answer:o,channels:s}}}Je.RTCICEManager=Ze;var Qe={},Xe={};function et(e){return[...e.split(".").reverse().entries()].reduce(((e,[t,n])=>e+ +n*1e4**t),0)}function tt(e,t){return et(e)>=et(t)}function nt(e){return e.split("/")[0]}Object.defineProperty(Xe,"__esModule",{value:!0}),Xe.runtimeUuidMeetsMinimumRuntimeVersion=Xe.parseRuntimeUuid=Xe.meetsMinimumRuntimeVersion=void 0,Xe.meetsMinimumRuntimeVersion=tt,Xe.parseRuntimeUuid=nt,Xe.runtimeUuidMeetsMinimumRuntimeVersion=function(e,t){return tt(nt(e),t)};var it,rt,ot,st,at,ct=s&&s.__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)},dt=s&&s.__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};Object.defineProperty(Qe,"__esModule",{value:!0}),Qe.ChannelProvider=void 0;const ht=pe,lt=Xe;class ut extends ht.ChannelBase{get connections(){return[...ct(this,it,"f")]}static handleClientDisconnection(e,t){const n=e.connections.find((e=>e.endpointId===t.endpointId));if(n)ct(e,st,"f").call(e,n);else{e.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name)).forEach(ct(e,st,"f"))}e.disconnectListener(t)}static setProviderRemoval(e,t){ut.removalMap.set(e,t)}constructor(e,t,n){super(),it.set(this,void 0),rt.set(this,void 0),ot.set(this,void 0),st.set(this,(e=>{const t=this.connections.filter((t=>t.endpointId!==e.endpointId));ct(this,ot,"f").closeEndpoint(e.endpointId),dt(this,it,t,"f")})),this.processAction=async(e,t,n)=>(ut.clientIsMultiRuntime(n)&&!(0,lt.runtimeUuidMeetsMinimumRuntimeVersion)(n.runtimeUuid,"18.87.56.0")?this.handleMultiRuntimeLegacyClient(n):this.checkForClientConnection(n),super.processAction(e,t,n)),at.set(this,(()=>{ct(this,ot,"f").close();const e=ut.removalMap.get(this);e&&e()})),dt(this,rt,new ht.ProtectedItems(e,t),"f"),this.connectListener=()=>{},this.disconnectListener=()=>{},dt(this,it,[],"f"),dt(this,ot,n,"f"),n.receive(this.processAction)}dispatch(e,t,n){const i=e.endpointId??this.getEndpointIdForOpenFinId(e,t);return i&&ct(this,ot,"f").isEndpointConnected(i)?ct(this,ot,"f").send(i,t,n):Promise.reject(new Error(`Client connection with identity uuid: ${e.uuid} / name: ${e.name} / endpointId: ${i} no longer connected.`))}async processConnection(e,t){return ct(this,it,"f").push(e),this.connectListener(e,t)}publish(e,t){return this.connections.map((n=>ct(this,ot,"f").send(n.endpointId,e,t)))}onConnection(e){this.connectListener=e}onDisconnection(e){this.disconnectListener=e}async destroy(){const e=ct(this,rt,"f");e.providerIdentity,dt(this,it,[],"f"),await e.close(),ct(this,at,"f").call(this)}async getAllClientInfo(){return this.connections.map((e=>{const{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}=e;return{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}}))}checkForClientConnection(e){if(!this.isClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider.\n Client Identity: {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}isClientConnected(e){return ut.clientIdentityIncludesEndpointId(e)?this.connections.some((t=>t.endpointId===e.endpointId&&t.uuid===e.uuid&&t.name===e.name)):this.isLegacyClientConnected(e)}isLegacyClientConnected(e){return this.connections.some((t=>t.uuid===e.uuid&&t.name===e.name))}handleMultiRuntimeLegacyClient(e){if(!this.isLegacyClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider. Client Identity:\n {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}getEndpointIdForOpenFinId(e,t){const n=this.connections.filter((t=>t.name===e.name&&t.uuid===e.uuid));if(n.length>=2){const n=ct(this,rt,"f"),{uuid:i,name:r}=e,o=n?.providerIdentity.uuid,s=n?.providerIdentity.name;console.warn(`WARNING: Dispatch call may have unintended results. The "to" argument of your dispatch call is missing the\n "endpointId" parameter. The identity you are dispatching to ({uuid: ${i}, name: ${r}})\n has multiple channelClients for this channel. Your dispatched action: (${t}) from the provider:\n ({uuid: ${o}, name: ${s}}) will only be processed by the most recently-created client.`)}return n.pop()?.endpointId}static clientIdentityIncludesEndpointId(e){return void 0!==e.endpointId}static clientIsMultiRuntime(e){return void 0!==e.runtimeUuid}static async wireClose(e,t){await e.sendAction("destroy-channel",{channelName:t})}}Qe.ChannelProvider=ut,it=new WeakMap,rt=new WeakMap,ot=new WeakMap,st=new WeakMap,at=new WeakMap,ut.removalMap=new WeakMap;var pt={};Object.defineProperty(pt,"__esModule",{value:!0}),pt.MessageReceiver=void 0;const wt=ue,yt=d;class ft extends yt.Base{constructor(e){super(e),this.onmessage=e=>"process-channel-message"===e.action&&(this.processChannelMessage(e),!0),this.endpointMap=new Map,this.latestEndpointIdByChannelId=new Map,e.registerMessageHandler(this.onmessage.bind(this))}async processChannelMessage(e){const{senderIdentity:t,providerIdentity:n,action:i,ackToSender:r,payload:o,intendedTargetIdentity:s}=e.payload,a=s.channelId??s.endpointId??this.latestEndpointIdByChannelId.get(n.channelId),c=this.endpointMap.get(a);if(!c)return r.payload.success=!1,r.payload.reason=`Client connection with identity uuid: ${this.wire.me.uuid} / name: ${this.wire.me.name} / endpointId: ${a} no longer connected.`,this.wire.sendRaw(r);try{const e=await c(i,o,t);return r.payload.payload=r.payload.payload||{},r.payload.payload.result=e,this.wire.sendRaw(r)}catch(e){return r.payload.success=!1,r.payload.reason=e.message,this.wire.sendRaw(r)}}addEndpoint(e,t,n){this.endpointMap.set(n,e),t!==n&&this.latestEndpointIdByChannelId.set(t,n)}removeEndpoint(e,t){this.endpointMap.delete(t),this.latestEndpointIdByChannelId.get(e)===t&&this.latestEndpointIdByChannelId.delete(e)}checkForPreviousClientConnection(e){const t=this.latestEndpointIdByChannelId.get(e);t&&(wt.ChannelClient.closeChannelByEndpointId(t),console.warn("You have created a second connection to an older provider. First connection has been removed from the clientMap"),console.warn("If the provider calls publish(), you may receive multiple messages."))}}pt.MessageReceiver=ft;var gt={};Object.defineProperty(gt,"__esModule",{value:!0}),gt.ProtocolManager=void 0;gt.ProtocolManager=class{constructor(e){this.ProtocolsInPreferenceOrder=e,this.DefaultClientProtocols=["classic"],this.DefaultProviderProtocols=["classic"],this.getClientProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultClientProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(", ")}.`);return t},this.getProviderProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultProviderProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(", ")}.`);return t},this.getCompatibleProtocols=(e,t)=>t.supportedProtocols.filter((t=>e.some((e=>e.type===t.type&&t.version>=e.minimumVersion&&e.version>=(t.minimumVersion??0))))).slice(0,t.maxProtocols)}};var mt={};Object.defineProperty(mt,"__esModule",{value:!0});class vt{static combine(e,t){return new vt(e,t)}constructor(e,t){this.primary=e,this.secondary=t}onEndpointDisconnect(e,t){this.primary.onEndpointDisconnect(e,(()=>{this.secondary.isEndpointConnected(e)||t()})),this.secondary.onEndpointDisconnect(e,(()=>{this.primary.isEndpointConnected(e)||t()}))}isValidEndpointPayload(e){return this.primary.isValidEndpointPayload(e)||this.secondary.isValidEndpointPayload(e)}async closeEndpoint(e){await this.primary.closeEndpoint(e),await this.secondary.closeEndpoint(e)}isEndpointConnected(e){return this.primary.isEndpointConnected(e)||this.secondary.isEndpointConnected(e)}async addEndpoint(e,t){this.primary.isValidEndpointPayload(t)&&await this.primary.addEndpoint(e,t),this.secondary.isValidEndpointPayload(t)&&await this.secondary.addEndpoint(e,t)}receive(e){this.primary.receive(e),this.secondary.receive(e)}send(e,t,n){return this.primary.isEndpointConnected(e)?this.primary.send(e,t,n):this.secondary.send(e,t,n)}async close(){await Promise.all([this.primary.close(),this.secondary.close()])}}mt.default=vt;var Ct,bt,It=s&&s.__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},Et=s&&s.__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)},xt=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(xe,"__esModule",{value:!0}),xe.ConnectionManager=void 0;const At=Ae,Pt=d,Mt=Oe,_t=Fe,Ot=Je,St=Qe,Rt=pt,Ft=gt,jt=xt(mt);class kt extends Pt.Base{static getProtocolOptionsFromStrings(e){return e.map((e=>{switch(e){case"rtc":return _t.RTCInfo;case"classic":return Mt.ClassicInfo;default:return(0,At.exhaustiveCheck)(e,["rtc","classic"])}}))}constructor(e){super(e),Ct.set(this,void 0),bt.set(this,void 0),this.removeChannelFromProviderMap=e=>{this.providerMap.delete(e)},this.onmessage=e=>"process-channel-connection"===e.action&&(this.processChannelConnection(e),!0),this.providerMap=new Map,this.protocolManager=new Ft.ProtocolManager("node"===this.wire.environment.type?["classic"]:["rtc","classic"]),It(this,Ct,new Rt.MessageReceiver(e),"f"),It(this,bt,new Ot.RTCICEManager(e),"f"),e.registerMessageHandler(this.onmessage.bind(this))}createProvider(e,t){const n=Object.assign(this.wire.environment.getDefaultChannelOptions().create,e||{}),i=this.protocolManager.getProviderProtocols(n?.protocols),r=i.map((e=>{switch(e){case"rtc":return new _t.RTCStrategy;case"classic":return new Mt.ClassicStrategy(this.wire,Et(this,Ct,"f"),t.channelId,t);default:return(0,At.exhaustiveCheck)(e,["rtc","classic"])}}));let o;if(2===r.length){const[e,t]=r;o=jt.default.combine(e,t)}else{if(1!==r.length)throw new Error("failed to combine strategies");[o]=r}const s=new St.ChannelProvider(t,(()=>St.ChannelProvider.wireClose(this.wire,t.channelName)),o),a=t.channelId;return this.providerMap.set(a,{provider:s,strategy:o,supportedProtocols:kt.getProtocolOptionsFromStrings(i)}),St.ChannelProvider.setProviderRemoval(s,this.removeChannelFromProviderMap.bind(this)),s}async createClientOffer(e){const t=this.protocolManager.getClientProtocols(e?.protocols);let n;return{offer:{supportedProtocols:await Promise.all(t.map((async e=>{switch(e){case"rtc":{const{rtcClient:e,channels:t,offer:i,rtcConnectionId:r,channelsOpened:o}=await Et(this,bt,"f").startClientOffer();return n={rtcClient:e,channels:t,channelsOpened:o},{type:"rtc",version:_t.RTCInfo.version,payload:{offer:i,rtcConnectionId:r}}}case"classic":return{type:"classic",version:Mt.ClassicInfo.version};default:return(0,At.exhaustiveCheck)(e,["rtc","classic"])}}))),maxProtocols:2},rtc:n}}async createClientStrategy(e,t){t.endpointId||(t.endpointId=this.wire.environment.getNextMessageId(),Et(this,Ct,"f").checkForPreviousClientConnection(t.channelId));const n=t.answer??{supportedProtocols:[{type:"classic",version:1}]},i=(await Promise.all(n.supportedProtocols.map((async n=>"rtc"===n.type&&e?(await Et(this,bt,"f").finishClientOffer(e.rtcClient,n.payload.answer,e.channelsOpened),new _t.RTCStrategy):"classic"===n.type?new Mt.ClassicStrategy(this.wire,Et(this,Ct,"f"),t.endpointId,t):null)))).filter((e=>null!==e));let r;if(e&&!i.some((e=>e instanceof _t.RTCStrategy))&&e&&e.rtcClient.close(),i.length>=2)r=jt.default.combine(i[0],i[1]);else{if(!i.length)throw new Error("No compatible protocols");[r]=i}const o={endpointIdentity:t,rtc:e};return r.addEndpoint(t.channelId,o),r}async processChannelConnection(e){const{clientIdentity:t,providerIdentity:n,ackToSender:i,payload:r,offer:o}=e.payload;t.endpointId?t.isLocalEndpointId=!1:(t.endpointId=this.wire.environment.getNextMessageId(),t.isLocalEndpointId=!0);const s=n.channelId,a=this.providerMap.get(s);if(!a)return i.payload.success=!1,i.payload.reason=`Channel "${n.channelName}" has been destroyed.`,this.wire.sendRaw(i);const{provider:c,strategy:d,supportedProtocols:h}=a;try{if(!(c instanceof St.ChannelProvider))throw Error("Cannot connect to a channel client");const e=o??{supportedProtocols:[{type:"classic",version:1}],maxProtocols:1},n=this.protocolManager.getCompatibleProtocols(h,e);if(!n.length)throw new Error("This provider does not support any of the offered protocols.");const s=await c.processConnection(t,r);i.payload.payload=i.payload.payload||{};let a={supportedProtocols:[],endpointPayloadPromise:Promise.resolve({endpointIdentity:t})};return a=await n.reduce((async(e,t)=>{const n=await e;if("rtc"===t.type){const{answer:e,rtcClient:i,channels:r}=await Et(this,bt,"f").createProviderAnswer(t.payload.rtcConnectionId,t.payload.offer);n.supportedProtocols.push({type:"rtc",version:_t.RTCInfo.version,payload:{answer:e}}),n.endpointPayloadPromise=n.endpointPayloadPromise.then((e=>r.then((t=>({...e,rtc:{rtcClient:i,channels:t}})))))}else n.supportedProtocols.push({type:"classic",version:Mt.ClassicInfo.version});return n}),Promise.resolve(a)),a.endpointPayloadPromise.then((e=>d.addEndpoint(t.endpointId,e))),i.payload.payload.result=s,i.payload.payload.answer=a,this.wire.sendRaw(i)}catch(e){return i.payload.success=!1,i.payload.reason=e.message,this.wire.sendRaw(i)}}}xe.ConnectionManager=kt,Ct=new WeakMap,bt=new WeakMap;var Lt,Tt,$t,Bt=s&&s.__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},Gt=s&&s.__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)};Object.defineProperty(le,"__esModule",{value:!0}),le.Channel=void 0;const Wt=t,Ht=G,Nt=d,Dt=ue,Ut=xe,Vt=Qe;function zt(e){const t=Math.floor(e/10),n=Math.min(3e4,500*2**t);return new Promise((e=>{setTimeout((()=>{e(!1)}),n)}))}class Kt extends Nt.EmitterBase{constructor(e){super(e,"channel"),Lt.set(this,void 0),Tt.set(this,new Wt.EventEmitter),$t.set(this,new Ht.AsyncRetryableLazy((async()=>{await Promise.all([this.on("disconnected",(e=>{Dt.ChannelClient.handleProviderDisconnect(e)})),this.on("connected",((...e)=>{Gt(this,Tt,"f").emit("connected",...e)}))]).catch((()=>new Error("error setting up channel connection listeners")))}))),Bt(this,Lt,new Ut.ConnectionManager(e),"f")}async getAllChannels(){return this.wire.sendAction("get-all-channels").then((({payload:e})=>e.data))}async onChannelConnect(e){await this.on("connected",e)}async onChannelDisconnect(e){await this.on("disconnected",e)}async safeConnect(e,t,n){const i={count:0};do{let r=()=>{};const o=new Promise((t=>{r=n=>{e===n.channelName&&t(!0)},Gt(this,Tt,"f").on("connected",r)}));try{if(i.count>0){i.gotConnectedEvent=await Promise.race([zt(i.count),o]);const t=await this.wire.sendAction("connect-to-channel",{...n,retryInfo:i});return console.log(`Successfully connected to channelName: ${e}`),t.payload.data}const t=this.wire.sendAction("connect-to-channel",n);i.originalMessageId=t.messageId;return(await t).payload.data}catch(n){if(!n.message.includes("internal-nack"))throw n;t&&0===i.count&&console.warn(`No channel found for channelName: ${e}. Waiting for connection...`)}finally{i.count+=1,Gt(this,Tt,"f").removeListener("connected",r)}}while(t);throw new Error(`No channel found for channelName: ${e}.`)}async connect(e,t={}){if(await Gt(this,$t,"f").getValue(),!e||"string"!=typeof e)throw new Error("Please provide a channelName string to connect to a channel.");const n={wait:!0,...this.wire.environment.getDefaultChannelOptions().connect,...t},{offer:i,rtc:r}=await Gt(this,Lt,"f").createClientOffer(n);let o;(this.fin.me.isFrame||this.fin.me.isView||this.fin.me.isWindow)&&(o=(await this.fin.me.getInfo()).url);const s={channelName:e,...n,offer:i,connectionUrl:o},a=await this.safeConnect(e,n.wait,s),c=await Gt(this,Lt,"f").createClientStrategy(r,a),d=new Dt.ChannelClient(a,(()=>Dt.ChannelClient.wireClose(this.wire,a,a.endpointId)),c);return c.onEndpointDisconnect(a.channelId,(async()=>{try{await d.sendDisconnectAction()}catch(e){console.warn(`Something went wrong during disconnect for client with uuid: ${a.uuid} / name: ${a.name} / endpointId: ${a.endpointId}.`)}finally{Dt.ChannelClient.handleProviderDisconnect(a)}})),d}async create(e,t){if(!e)throw new Error("Please provide a channelName to create a channel");const{payload:{data:n}}=await this.wire.sendAction("create-channel",{channelName:e}),i=Gt(this,Lt,"f").createProvider(t,n);return this.on("client-disconnected",(t=>{t.channelName===e&&Vt.ChannelProvider.handleClientDisconnection(i,t)})),i}}le.Channel=Kt,Lt=new WeakMap,Tt=new WeakMap,$t=new WeakMap,Object.defineProperty(de,"__esModule",{value:!0}),de.InterAppPayload=de.InterApplicationBus=void 0;const qt=t,Jt=d,Yt=he,Zt=le,Qt=O;class Xt extends Jt.Base{constructor(e){super(e),this.events={subscriberAdded:"subscriber-added",subscriberRemoved:"subscriber-removed"},this.refCounter=new Yt.RefCounter,this.Channel=new Zt.Channel(e),this.emitter=new qt.EventEmitter,e.registerMessageHandler(this.onmessage.bind(this)),this.on=this.emitter.on.bind(this.emitter),this.removeAllListeners=this.emitter.removeAllListeners.bind(this.emitter)}async publish(e,t){await this.wire.sendAction("publish-message",{topic:e,message:t,sourceWindowName:this.me.name})}async send(e,t,n){const i=(0,Qt.validateIdentity)(e);if(i)throw new Error(i);await this.wire.sendAction("send-message",{destinationUuid:e.uuid,destinationWindowName:e.name,topic:t,message:n,sourceWindowName:this.me.name})}subscribe(e,t,n){const i=this.createSubscriptionKey(e.uuid,e.name||"*",t);return this.emitter.on(i,n),this.refCounter.actOnFirst(i,(async()=>{await this.wire.sendAction("subscribe",{sourceUuid:e.uuid,sourceWindowName:e.name||"*",topic:t,destinationWindowName:this.me.name})}),(()=>Promise.resolve()))}unsubscribe(e,t,n){const i=e.name||"*",r=this.createSubscriptionKey(e.uuid,i,t);return this.emitter.removeListener(r,n),this.refCounter.actOnLast(r,(async()=>{await this.wire.sendAction("unsubscribe",{sourceUuid:e.uuid,sourceWindowName:i,topic:t,destinationWindowName:this.me.name})}),(()=>new Promise((e=>e)).then((()=>{}))))}processMessage(e){const{payload:{message:t,sourceWindowName:n,sourceUuid:i,topic:r}}=e,o=[this.createSubscriptionKey(i,n,r),this.createSubscriptionKey(i,"*",r),this.createSubscriptionKey("*","*",r)],s={uuid:i,name:n};o.forEach((e=>{this.emitter.emit(e,t,s)}))}emitSubscriverEvent(e,t){const{payload:{targetName:n,uuid:i,topic:r}}=t,o={name:n,uuid:i,topic:r};this.emitter.emit(e,o)}createSubscriptionKey(e,t,n){const i=t||"*";if(!(e&&i&&n))throw new Error("Missing uuid, name, or topic string");return function(...e){return e.map((e=>Buffer.from(`${e}`).toString("base64"))).join("/")}(e,i,n)}onmessage(e){const{action:t}=e;switch(t){case"process-message":this.processMessage(e);break;case this.events.subscriberAdded:this.emitSubscriverEvent(this.events.subscriberAdded,e);break;case this.events.subscriberRemoved:this.emitSubscriverEvent(this.events.subscriberRemoved,e)}return!0}}de.InterApplicationBus=Xt;de.InterAppPayload=class{};var en={};Object.defineProperty(en,"__esModule",{value:!0}),en.Clipboard=void 0;const tn=d;class nn extends tn.Base{async writeText(e){await this.wire.sendAction("clipboard-write-text",e)}async readText(e){const{payload:t}=await this.wire.sendAction("clipboard-read-text",{type:e});return t.data}async writeImage(e){await this.wire.sendAction("clipboard-write-image",e)}async readImage(e={format:"dataURL"}){const{payload:t}=await this.wire.sendAction("clipboard-read-image",e);return t.data}async writeHtml(e){await this.wire.sendAction("clipboard-write-html",e)}async readHtml(e){const{payload:t}=await this.wire.sendAction("clipboard-read-html",{type:e});return t.data}async writeRtf(e){await this.wire.sendAction("clipboard-write-rtf",e)}async readRtf(e){const{payload:t}=await this.wire.sendAction("clipboard-read-rtf",{type:e});return t.data}async write(e){await this.wire.sendAction("clipboard-write",e)}async getAvailableFormats(e){const{payload:t}=await this.wire.sendAction("clipboard-read-formats",{type:e});return t.data}}en.Clipboard=nn;var rn={},on={},sn={};Object.defineProperty(sn,"__esModule",{value:!0}),sn.ExternalApplication=void 0;const an=d;class cn extends an.EmitterBase{constructor(e,t){super(e,"external-application",t.uuid),this.identity=t}getInfo(){return this.wire.sendAction("get-external-application-info",this.identity).then((({payload:e})=>e.data))}}sn.ExternalApplication=cn,Object.defineProperty(on,"__esModule",{value:!0}),on.ExternalApplicationModule=void 0;const dn=d,hn=sn;class ln extends dn.Base{wrap(e){return this.wire.sendAction("external-application-wrap").catch((e=>{})),Promise.resolve(new hn.ExternalApplication(this.wire,{uuid:e}))}wrapSync(e){return this.wire.sendAction("external-application-wrap-sync").catch((e=>{})),new hn.ExternalApplication(this.wire,{uuid:e})}}on.ExternalApplicationModule=ln,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(on,e),n(sn,e)}(rn);var un={},pn={},wn={};Object.defineProperty(wn,"__esModule",{value:!0}),wn._Frame=void 0;const yn=d;class fn extends yn.EmitterBase{constructor(e,t){super(e,"frame",t.uuid,t.name),this.identity=t}getInfo(){return this.wire.sendAction("get-frame-info",this.identity).then((({payload:e})=>e.data))}getParentWindow(){return this.wire.sendAction("get-parent-window",this.identity).then((({payload:e})=>e.data))}}wn._Frame=fn,Object.defineProperty(pn,"__esModule",{value:!0}),pn._FrameModule=void 0;const gn=d,mn=O,vn=wn;class Cn extends gn.Base{async wrap(e){this.wire.sendAction("frame-wrap").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}wrapSync(e){this.wire.sendAction("frame-wrap-sync").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}getCurrent(){return this.wire.sendAction("frame-get-current").catch((e=>{})),Promise.resolve(new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity()))}getCurrentSync(){return this.wire.sendAction("frame-get-current-sync").catch((e=>{})),new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity())}}pn._FrameModule=Cn,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(pn,e),n(wn,e)}(un);var bn={};Object.defineProperty(bn,"__esModule",{value:!0}),bn.GlobalHotkey=void 0;const In=d;class En extends In.EmitterBase{constructor(e){super(e,"global-hotkey")}async register(e,t){await this.on(e,t),await this.wire.sendAction("global-hotkey-register",{hotkey:e})}async unregister(e){await this.removeAllListeners(e),await this.wire.sendAction("global-hotkey-unregister",{hotkey:e})}async unregisterAll(){await Promise.all(this.eventNames().filter((e=>!("registered"===e||"unregistered"===e))).map((e=>this.removeAllListeners(e)))),await this.wire.sendAction("global-hotkey-unregister-all",{})}async isRegistered(e){const{payload:{data:t}}=await this.wire.sendAction("global-hotkey-is-registered",{hotkey:e});return t}}bn.GlobalHotkey=En;var xn,An={},Pn={},Mn={},_n=s&&s.__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)};Object.defineProperty(Mn,"__esModule",{value:!0}),Mn.Platform=void 0;const On=d,Sn=O,Rn=new Map;class Fn extends On.EmitterBase{constructor(e,t){super(t.wire,"application",e.uuid),this.getClient=e=>{this.wire.sendAction("platform-get-client",this.identity).catch((e=>{}));const t=e||this.identity,{uuid:n}=t;if(!Rn.has(n)){const e=_n(this,xn,"f").call(this,n);Rn.set(n,e)}return Rn.get(n)},xn.set(this,(async e=>{try{const t=`custom-frame-${e}`,n=await this._channel.connect(t,{wait:!1});return n.onDisconnection((()=>{Rn.delete(e)})),n}catch(t){throw Rn.delete(e),new Error("The targeted Platform is not currently running. Listen for application-started event for the given Uuid.")}})),this.launchLegacyManifest=this.launchContentManifest;const n=(0,Sn.validateIdentity)(e);if(n)throw new Error(n);this._channel=t,this.identity={uuid:e.uuid},this.Layout=this.fin.Platform.Layout,this.Application=this.fin.Application.wrapSync(this.identity)}async createView(e,t,n){this.wire.sendAction("platform-create-view",this.identity).catch((e=>{}));const i=await this.getClient(),r=await i.dispatch("create-view",{target:t,opts:e,targetView:n});if(!r||(0,Sn.validateIdentity)(r.identity))throw new Error(`When overwriting the createView call, please return an object that has a valid 'identity' property: ${JSON.stringify(r)}`);return this.fin.View.wrapSync(r.identity)}async createWindow(e){this.wire.sendAction("platform-create-window",this.identity).catch((e=>{}));const t=await this.getClient();e.reason||(e.reason="api-call");const n=await t.dispatch("create-view-container",e);if(!n||(0,Sn.validateIdentity)(n.identity))throw new Error(`When overwriting the createWindow call, please return an object that has a valid 'identity' property: ${JSON.stringify(n)}`);const{identity:i}=n,r=this.fin.Window.wrapSync(i);return r.name=i.name,r.uuid=i.uuid,r}async quit(){this.wire.sendAction("platform-quit",this.identity).catch((e=>{}));return(await this.getClient()).dispatch("quit")}async closeView(e){this.wire.sendAction("platform-close-view",this.identity).catch((e=>{}));const t=await this.getClient();await t.dispatch("close-view",{view:e})}async reparentView(e,t){console.warn("Platform.reparentView has been deprecated, please use Platform.createView"),this.wire.sendAction("platform-reparent-view",this.identity).catch((e=>{}));const n={...e,uuid:e.uuid??this.identity.uuid},i=await this.fin.View.wrap(n),r=await i.getOptions();return this.createView(r,t)}async getSnapshot(){this.wire.sendAction("platform-get-snapshot",this.identity).catch((e=>{}));return(await this.getClient()).dispatch("get-snapshot")}async getViewSnapshot(e){return(await this.getClient()).dispatch("get-view-snapshot",{viewIdentity:e})}async applySnapshot(e,t){this.wire.sendAction("platform-apply-snapshot",this.identity).catch((e=>{}));const n="Requested snapshot must be a valid Snapshot object, or a url or filepath to such an object.";let i;if("string"==typeof e)try{i=(await this._channel.wire.sendAction("get-application-manifest",{manifestUrl:e})).payload.data}catch(e){throw new Error(`${n}: ${e}`)}else i=e;if(!i.windows)throw new Error(n);const r=await this.getClient();return await r.dispatch("apply-snapshot",{snapshot:i,options:t}),this}async fetchManifest(e){return(await this.getClient()).dispatch("platform-fetch-manifest",{manifestUrl:e})}async launchContentManifest(e){this.wire.sendAction("platform-launch-content-manifest",this.identity).catch((()=>{}));const t=await this.getClient(),n=await this.fetchManifest(e);return t.dispatch("launch-into-platform",{manifest:n,manifestUrl:e}),this}async setWindowContext(e={},t){if(this.wire.sendAction("platform-set-window-context",this.identity).catch((e=>{})),!e)throw new Error("Please provide a serializable object or string to set the context.");const n=await this.getClient(),{entityType:i}=t?await this.fin.System.getEntityInfo(t.uuid,t.name):this.fin.me;await n.dispatch("set-window-context",{context:e,entityType:i,target:t||{uuid:this.fin.me.uuid,name:this.fin.me.name}})}async getWindowContext(e){this.wire.sendAction("platform-get-window-context",this.identity).catch((e=>{}));const t=await this.getClient(),{entityType:n}=e?await this.fin.System.getEntityInfo(e.uuid,e.name):this.fin.me;return t.dispatch("get-window-context",{target:e||{uuid:this.fin.me.uuid,name:this.fin.me.name},entityType:n})}async closeWindow(e,t={skipBeforeUnload:!1}){this.wire.sendAction("platform-close-window",this.identity).catch((e=>{}));return(await this.getClient()).dispatch("close-window",{windowId:e,options:t})}}Mn.Platform=Fn,xn=new WeakMap;var jn={},kn={},Ln={},Tn={};function $n(e){switch(e){case"columns":case"grid":case"rows":case"tabs":return!0;default:return!1}}Object.defineProperty(Tn,"__esModule",{value:!0}),Tn.overrideFromComposables=Tn.isValidPresetType=void 0,Tn.isValidPresetType=$n,Tn.overrideFromComposables=function(...e){return t=>e.reduceRight(((e,t)=>n=>t(e(n))),(e=>e))(t)},Tn.default={isValidPresetType:$n};var Bn={},Gn={},Wn={};Object.defineProperty(Wn,"__esModule",{value:!0}),Wn.ApiConsumer=void 0;Wn.ApiConsumer=class{constructor(e){this.strategy=e,this.consume=async e=>(await this.strategy.getExposedFunctions(e)).reduce(((t,n)=>({...t,[n.key]:this.strategy.createFunction(n,e)})),{})}};var Hn={},Nn={};Object.defineProperty(Nn,"__esModule",{value:!0}),Nn.expose=Nn.getExposedProperties=void 0;const Dn=Symbol("exposedProperties");Nn.getExposedProperties=e=>e[Dn]||e.prototype[Dn]||[];Nn.expose=e=>(t,n,i)=>{t[Dn]=t[Dn]||[],t[Dn].push({key:n,descriptor:i,options:e})},Object.defineProperty(Hn,"__esModule",{value:!0}),Hn.ApiExposer=void 0;const Un=Nn;Hn.ApiExposer=class{constructor(e){this.strategy=e,this.exposeInstance=async(e,t)=>{const n=(0,Un.getExposedProperties)(e),i=await Promise.all(n.map((async({key:n,options:i})=>({key:n,options:await this.strategy.exposeFunction(e[n].bind(e),{key:n,options:i,meta:t})}))));await this.strategy.exposeMeta(t,i)}}};var Vn={},zn={},Kn={};Object.defineProperty(Kn,"__esModule",{value:!0}),Kn.ChannelsConsumer=void 0;Kn.ChannelsConsumer=class{constructor(e){this.channel=e,this.getExposedFunctions=async e=>{const{id:t}=e,{props:n}=await this.channel.dispatch(`api-meta:${t}`);return n},this.createFunction=e=>(...t)=>{const{action:n}=e.options;return this.channel.dispatch(n,{args:t})}}};var qn={};Object.defineProperty(qn,"__esModule",{value:!0}),qn.ChannelsExposer=void 0;qn.ChannelsExposer=class{constructor(e){this.channelProviderOrClient=e,this.exposeFunction=async(e,t)=>{const{key:n,options:i,meta:r}=t,{id:o}=r,s=`${o}.${i?.action||n}`;return await this.channelProviderOrClient.register(s,(async({args:t})=>e(...t))),{action:s}},this.exposeMeta=async({id:e},t)=>{const n=`api-meta:${e}`;await this.channelProviderOrClient.register(n,(()=>({props:t})))}}},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Kn,e),n(qn,e)}(zn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(zn,e)}(Vn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Wn,e),n(Hn,e),n(Vn,e),n(Nn,e)}(Gn);var Jn={};Object.defineProperty(Jn,"__esModule",{value:!0}),Jn.createRelayedDispatch=exports.relayChannelClientApi_1=Jn.relayChannelClientApi=void 0;const Yn=["no longer connected","RTCDataChannel closed unexpectedly","The client you are trying to dispatch from is disconnected from the target provider"];exports.relayChannelClientApi_1=Jn.relayChannelClientApi=async(e,t)=>{e.register(`relay:${t}`,(({action:t,target:n,payload:i})=>e.dispatch(n,t,i))),await Promise.resolve()};Jn.createRelayedDispatch=(e,t,n,i)=>async(r,o)=>{try{return await e.dispatch(`relay:${n}`,{action:r,payload:o,target:t})}catch(e){if(s=e.message,Yn.some((e=>s.includes(e)))&&i)throw new Error(i);throw e}var s};var Zn,Qn,Xn,ei=s&&s.__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},ti=s&&s.__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)};Object.defineProperty(Bn,"__esModule",{value:!0}),Bn.ColumnOrRow=Bn.TabStack=Bn.LayoutNode=void 0;const ni=Gn,ii=Jn;class ri{constructor(e,t){Zn.set(this,void 0),this.isRoot=()=>ti(this,Zn,"f").isRoot(this.entityId),this.exists=()=>ti(this,Zn,"f").exists(this.entityId),this.getParent=async()=>{const e=await ti(this,Zn,"f").getParent(this.entityId);if(e)return ri.getEntity(e,ti(this,Zn,"f"))},this.createAdjacentStack=async(e,t)=>{const n=await ti(this,Zn,"f").createAdjacentStack(this.entityId,e,t);return ri.getEntity({entityId:n,type:"stack"},ti(this,Zn,"f"))},this.getAdjacentStacks=async e=>(await ti(this,Zn,"f").getAdjacentStacks({targetId:this.entityId,edge:e})).map((e=>ri.getEntity({type:"stack",entityId:e.entityId},ti(this,Zn,"f")))),ei(this,Zn,e,"f"),this.entityId=t}}Bn.LayoutNode=ri,Zn=new WeakMap,ri.newLayoutEntitiesClient=async(e,t,n)=>{const i=(0,ii.createRelayedDispatch)(e,n,"layout-relay","You are trying to interact with a layout component on a window that does not exist or has been destroyed.");return new ni.ApiConsumer(new ni.ChannelsConsumer({dispatch:i})).consume({id:t})},ri.getEntity=(e,t)=>{const{entityId:n,type:i}=e;switch(i){case"column":case"row":return new si(t,n,i);case"stack":return new oi(t,n);default:throw new Error(`Unrecognised Layout Entity encountered ('${JSON.stringify(e)})`)}};class oi extends ri{constructor(e,t){super(e,t),Qn.set(this,void 0),this.type="stack",this.getViews=()=>ti(this,Qn,"f").getStackViews(this.entityId),this.addView=async(e,t={index:0})=>ti(this,Qn,"f").addViewToStack(this.entityId,e,t),this.removeView=async e=>{await ti(this,Qn,"f").removeViewFromStack(this.entityId,e)},this.setActiveView=async e=>{await ti(this,Qn,"f").setStackActiveView(this.entityId,e)},ei(this,Qn,e,"f")}}Bn.TabStack=oi,Qn=new WeakMap;class si extends ri{constructor(e,t,n){super(e,t),Xn.set(this,void 0),this.getContent=async()=>(await ti(this,Xn,"f").getContent(this.entityId)).map((e=>ri.getEntity(e,ti(this,Xn,"f")))),ei(this,Xn,e,"f"),this.type=n}}Bn.ColumnOrRow=si,Xn=new WeakMap;var ai={};Object.defineProperty(ai,"__esModule",{value:!0}),ai.DEFAULT_LAYOUT_KEY=ai.LAYOUT_CONTROLLER_ID=void 0,ai.LAYOUT_CONTROLLER_ID="layout-entities",ai.DEFAULT_LAYOUT_KEY="__default__";var ci,di,hi,li=s&&s.__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)};Object.defineProperty(Ln,"__esModule",{value:!0}),Ln.Layout=void 0;const ui=G,pi=O,wi=d,yi=Tn,fi=Bn,gi=ai;class mi extends wi.Base{static getClient(e){return li(e,di,"f").getValue()}constructor(e,t){super(t),ci.add(this),di.set(this,new ui.Lazy((async()=>fi.LayoutNode.newLayoutEntitiesClient(await this.platform.getClient(),gi.LAYOUT_CONTROLLER_ID,this.identity)))),this.replace=async e=>{this.wire.sendAction("layout-replace").catch((e=>{}));const t=await this.platform.getClient();await t.dispatch("replace-layout",{target:this.identity,opts:{layout:e}})},this.replaceView=async(e,t)=>{this.wire.sendAction("layout-replace-view").catch((e=>{}));const n=await this.platform.getClient();await n.dispatch("replace-view",{target:this.identity,opts:{viewToReplace:e,newView:t}})},this.applyPreset=async e=>{this.wire.sendAction("layout-apply-preset").catch((e=>{}));const t=await this.platform.getClient(),{presetType:n}=e;if(!n||!(0,yi.isValidPresetType)(n))throw new Error("Cannot apply preset layout, please include an applicable presetType property in the PresetLayoutOptions.");await t.dispatch("apply-preset-layout",{target:this.identity,opts:{presetType:n}})};const n=(0,pi.validateIdentity)(e);if(n)throw new Error(n);this.identity=e,this.platform=this.fin.Platform.wrapSync({uuid:e.uuid}),e.uuid===this.fin.me.uuid&&e.name===this.fin.me.name&&(this.init=this.fin.Platform.Layout.init)}async getConfig(){this.wire.sendAction("layout-get-config").catch((e=>{}));return(await this.platform.getClient()).dispatch("get-frame-snapshot",{target:this.identity})}async getCurrentViews(){this.wire.sendAction("layout-get-views").catch((e=>{}));const e=await this.platform.getClient();return(await e.dispatch("get-layout-views",{target:this.identity})).map((e=>this.fin.View.wrapSync(e)))}async getRootItem(){this.wire.sendAction("layout-get-root-item").catch((()=>{}));const e=await li(this,di,"f").getValue(),t=await e.getRoot("layoutName"in this.identity?this.identity:void 0);return fi.LayoutNode.getEntity(t,e)}async getStackByViewIdentity(e){this.wire.sendAction("layout-get-stack-by-view").catch((()=>{}));const t=await li(this,di,"f").getValue(),n=await t.getStackByView(e);if(!n)throw new Error(`No stack found for view: ${e.uuid}/${e.name}`);return fi.LayoutNode.getEntity(n,t)}async addView(e,{location:t,targetView:n}={}){this.wire.sendAction("layout-add-view").catch((e=>{}));const{identity:i}=await li(this,ci,"m",hi).call(this,"layout-add-view",{viewOptions:e,location:t,targetView:n});return{identity:i}}async closeView(e){this.wire.sendAction("layout-close-view").catch((e=>{})),await li(this,ci,"m",hi).call(this,"layout-close-view",{viewIdentity:e})}}Ln.Layout=mi,di=new WeakMap,ci=new WeakSet,hi=async function(e,t){return(await this.platform.getClient()).dispatch(e,{target:this.identity,opts:t})};var vi,Ci,bi,Ii,Ei,xi=s&&s.__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)},Ai=s&&s.__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};Object.defineProperty(kn,"__esModule",{value:!0}),kn.LayoutModule=void 0;const Pi=d,Mi=Ln,_i=ai;class Oi extends Pi.Base{constructor(){super(...arguments),vi.add(this),Ci.set(this,!1),bi.set(this,null),this.init=async(e={})=>{if(this.wire.sendAction("layout-init").catch((e=>{})),!this.wire.environment.layoutAllowedInContext(this.fin))throw new Error("Layout.init can only be called from a Window context.");if(xi(this,Ci,"f"))throw new Error("Layout.init was already called, please use Layout.create to add additional layouts.");"openfin"===this.wire.environment.type&&await this.fin.Platform.getCurrentSync().getClient(),Ai(this,Ci,!0,"f"),Ai(this,bi,await this.wire.environment.initLayoutManager(this.fin,this.wire,e),"f"),await this.wire.environment.applyLayoutSnapshot(this.fin,xi(this,bi,"f"),e);const t={name:this.fin.me.name,uuid:this.fin.me.uuid};if(!e.layoutManagerOverride){const e={layoutName:_i.DEFAULT_LAYOUT_KEY,...t};return xi(this,Ii,"f").call(this,e)}return this.wrapSync(t)},Ii.set(this,(e=>{const t="[Layout] You are using a deprecated property `layoutManager` - it will throw if you access it starting in v37.",n=new Proxy({},{get(e,n){throw console.warn(`[Layout-mgr-proxy] accessing ${n.toString()}`),new Error(t)}}),i=Object.assign(this.wrapSync(e),{layoutManager:n});return new Proxy(i,{get(e,n){if("layoutManager"===n)throw console.warn(`[Layout-proxy] accessing ${n.toString()}`),new Error(t);return e[n]}})})),this.getCurrentLayoutManagerSync=()=>xi(this,vi,"m",Ei).call(this,"fin.Platform.Layout.getCurrentLayoutManagerSync()"),this.create=async e=>this.wire.environment.createLayout(xi(this,vi,"m",Ei).call(this,"fin.Platform.Layout.create()"),e),this.destroy=async e=>this.wire.environment.destroyLayout(xi(this,vi,"m",Ei).call(this,"fin.Platform.Layout.destroy()"),e)}async wrap(e){return this.wire.sendAction("layout-wrap").catch((e=>{})),new Mi.Layout(e,this.wire)}wrapSync(e){return this.wire.sendAction("layout-wrap-sync").catch((e=>{})),new Mi.Layout(e,this.wire)}async getCurrent(){if(this.wire.sendAction("layout-get-current").catch((e=>{})),"openfin"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error("You are not in a Window context. Only Windows can have a Layout.");const{uuid:e,name:t}=this.fin.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction("layout-get-current-sync").catch((e=>{})),"openfin"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error("You are not in a Window context. Only Windows can have a Layout.");const{uuid:e,name:t}=this.fin.me;return this.wrapSync({uuid:e,name:t})}async getLayoutByViewIdentity(e){this.wire.sendAction("layout-get-by-view-identity").catch((()=>{}));let t=await this.wire.environment.getViewWindowIdentity(this.fin,e);t.identity&&(t=t.identity);try{const n=this.wrapSync(t),i=await Mi.Layout.getClient(n),r=await i.getLayoutIdentityForViewOrThrow(e);return this.wrapSync(r)}catch(n){if(!["No action registered at target for","getLayoutIdentityForViewOrThrow is not a function"].some((e=>n.message.includes(e))))throw n;if(t.uuid===t.name)throw new Error(`View identity ${JSON.stringify(e)} is not attached to any layout in provider window ${JSON.stringify(t)}.`);return this.wrapSync(t)}}}kn.LayoutModule=Oi,Ci=new WeakMap,bi=new WeakMap,Ii=new WeakMap,vi=new WeakSet,Ei=function(e){if(!xi(this,bi,"f"))throw new Error(`You must call init before using the API ${e}`);return xi(this,bi,"f")},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(kn,e),n(Ln,e)}(jn),Object.defineProperty(Pn,"__esModule",{value:!0}),Pn.PlatformModule=void 0;const Si=d,Ri=Mn,Fi=jn;class ji extends Si.Base{constructor(e,t){super(e),this._channel=t,this.Layout=new Fi.LayoutModule(this.wire)}async init(e){if(!fin.__internal_.isPlatform||fin.me.name!==fin.me.uuid)throw new Error("fin.Platform.init should only be called from a custom platform provider running in the main window of the application.");return this.wire.environment.initPlatform(this.fin,e)}async wrap(e){return this.wire.sendAction("platform-wrap").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}wrapSync(e){return this.wire.sendAction("platform-wrap-sync").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}async getCurrent(){return this.wire.sendAction("platform-get-current").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction("platform-get-current-sync").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}start(e){return this.wire.sendAction("platform-start").catch((e=>{})),new Promise((async(t,n)=>{try{const{uuid:n}=e,i=await this.fin.Application._create({...e,isPlatformController:!0});i.once("platform-api-ready",(()=>t(this.wrapSync({uuid:n})))),i._run({uuid:n})}catch(e){n(e)}}))}startFromManifest(e,t){return this.wire.sendAction("platform-start-from-manifest").catch((e=>{})),new Promise((async(n,i)=>{try{const i=await this.fin.Application._createFromManifest(e);i.once("platform-api-ready",(()=>n(this.wrapSync({uuid:i.identity.uuid})))),i._run(t)}catch(e){i(e)}}))}}Pn.PlatformModule=ji,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Pn,e),n(Mn,e)}(An);var ki={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getMe=e.getBaseMe=e.environmentUnsupportedMessage=void 0;const t=J(),n=un,i=ie(),r=rn;function o(e,t,n){return{...{isView:"view"===e,isWindow:"window"===e,isFrame:"iframe"===e,isExternal:"external connection"===e},uuid:t,name:n,entityType:e}}e.environmentUnsupportedMessage="You are not running in OpenFin.",e.getBaseMe=o,e.getMe=function(s){const{uuid:a,name:c,entityType:d}=s.me,h={setContext(){throw new Error(e.environmentUnsupportedMessage)},addContextHandler(){throw new Error(e.environmentUnsupportedMessage)},getContextGroups(){throw new Error(e.environmentUnsupportedMessage)},joinContextGroup(){throw new Error(e.environmentUnsupportedMessage)},removeFromContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getAllClientsInContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getInfoForContextGroup(){throw new Error(e.environmentUnsupportedMessage)}},l="Interop API has not been instantiated. Either connection has failed or you have not declared interop in your config.",u={setContext(){throw new Error(l)},addContextHandler(){throw new Error(l)},getContextGroups(){throw new Error(l)},joinContextGroup(){throw new Error(l)},removeFromContextGroup(){throw new Error(l)},getAllClientsInContextGroup(){throw new Error(l)},getInfoForContextGroup(){throw new Error(l)}},p={eventNames:()=>{throw new Error(e.environmentUnsupportedMessage)},emit:()=>{throw new Error(e.environmentUnsupportedMessage)},listeners:()=>{throw new Error(e.environmentUnsupportedMessage)},listenerCount:()=>{throw new Error(e.environmentUnsupportedMessage)},on:()=>{throw new Error(e.environmentUnsupportedMessage)},addListener:()=>{throw new Error(e.environmentUnsupportedMessage)},once:()=>{throw new Error(e.environmentUnsupportedMessage)},prependListener:()=>{throw new Error(e.environmentUnsupportedMessage)},prependOnceListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeAllListeners:()=>{throw new Error(e.environmentUnsupportedMessage)}};switch(d){case"view":return Object.assign(new t.View(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case"window":return Object.assign(new i._Window(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case"iframe":return Object.assign(new n._Frame(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case"external connection":return Object.assign(new r.ExternalApplication(s,{uuid:a}),o(d,a,c),{interop:u,isOpenFin:!1});default:return{...o(d,a,c),...p,interop:h,isOpenFin:!1}}}}(ki);var Li={},Ti={},$i={};Object.defineProperty($i,"__esModule",{value:!0}),$i.createWarningObject=$i.createUnusableObject=void 0,$i.createUnusableObject=function(e){const t=()=>{throw new Error(e)};return new Proxy({},{apply:t,construct:t,defineProperty:t,deleteProperty:t,get:t,getOwnPropertyDescriptor:t,getPrototypeOf:t,has:t,isExtensible:t,ownKeys:t,preventExtensions:t,set:t,setPrototypeOf:t})},$i.createWarningObject=function(e,t){return new Proxy(t,{get:(...t)=>(console.warn(e),Reflect.get(...t)),set:(...t)=>(console.warn(e),Reflect.set(...t)),getOwnPropertyDescriptor:(...t)=>(console.warn(e),Reflect.getOwnPropertyDescriptor(...t)),ownKeys:(...t)=>(console.warn(e),Reflect.ownKeys(...t))})};var Bi,Gi={},Wi={};var Hi={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.wrapIntentHandler=e.BROKER_ERRORS=e.generateOverrideWarning=e.generateOverrideError=e.wrapContextHandler=e.wrapInTryCatch=e.generateId=void 0;e.generateId=()=>`${Math.random()}${Date.now()}`;e.wrapInTryCatch=(e,t)=>(...n)=>{try{return e(...n)}catch(e){throw new Error((t||"")+e)}};e.wrapContextHandler=(e,t)=>async n=>{try{await e(n)}catch(e){throw console.error(`Error thrown by handler ${t} for context type ${n.type}: ${e}`),e}};e.generateOverrideError=(e,t)=>`You have tried to to use ${e} but ${t} has not been overridden in the Interop Broker. Please override this function. Refer to our documentation for more info.`;e.generateOverrideWarning=(e,t,n,i)=>{const{uuid:r,name:o}=n;return i?`Entity with identity: ${r}/${o} has called ${i} or ${e} but ${t} has not been overridden.`:`Entity with identity: ${r}/${o} has called ${e} but ${t} has not been overridden.`},e.BROKER_ERRORS={fireIntent:(0,e.generateOverrideError)("fireIntent","handleFiredIntent"),fireIntentForContext:(0,e.generateOverrideError)("fireIntentForContext","handleFiredIntentForContext"),getInfoForIntent:(0,e.generateOverrideError)("getInfoForIntent","handleInfoForIntent"),getInfoForIntentsByContext:(0,e.generateOverrideError)("getInfoForIntentsByContext","handleInfoForIntentsByContext"),joinSessionContextGroupWithJoinContextGroup:"The Context Group you have tried to join is a Session Context Group. Custom Context Groups can only be defined by the Interop Broker through code or manifest configuration. Please use joinSessionContextGroup.",fdc3Open:(0,e.generateOverrideError)("fdc3.open","fdc3HandleOpen"),fdc3FindInstances:(0,e.generateOverrideError)("fdc3.findInstances","fdc3HandleFindInstances"),fdc3GetAppMetadata:(0,e.generateOverrideError)("fdc3.getAppMetadata","fdc3HandleGetAppMetadata"),fdc3GetInfo:(0,e.generateOverrideError)("fdc3.getInfo","fdc3HandleGetInfo")};e.wrapIntentHandler=(e,t)=>async n=>{try{return e(n)}catch(e){throw console.error(`Error thrown by handler ${t}: ${e}`),e}}}(Hi);var Ni,Di,Ui={};function Vi(){if(Di)return Gi;Di=1;var e,t,n,r=s&&s.__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},o=s&&s.__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)},a=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Gi,"__esModule",{value:!0}),Gi.InteropBroker=void 0;const c=d,h=a(function(){if(Bi)return Wi;Bi=1,Object.defineProperty(Wi,"__esModule",{value:!0});const e=Cr();return Wi.default=class{constructor(e,t){this.provider=e,this.id=t,this.lastContext=void 0,this.contextGroupMap=new Map,this.clients=new Map,this.registerListeners()}registerListeners(){this.provider.register(`sessionContextGroup:getContext-${this.id}`,this.getCurrentContext.bind(this)),this.provider.register(`sessionContextGroup:setContext-${this.id}`,this.setContext.bind(this)),this.provider.register(`sessionContextGroup:handlerAdded-${this.id}`,this.handlerAdded.bind(this)),this.provider.register(`sessionContextGroup:handlerRemoved-${this.id}`,this.handlerRemoved.bind(this))}getCurrentContext(e){return e.type?this.contextGroupMap.get(e.type):this.lastContext}setContext(t,n){const{context:i}=t,r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name} not in Session Client State Map`);this.contextGroupMap.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{e.contextHandlers.get(i.type)?.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getClientState(e){return this.clients.get(e.endpointId)}async handlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(i){const e=r.contextHandlers.get(i)||[];r.contextHandlers.set(i,[...e,n]);const o=this.contextGroupMap.get(i);o&&await this.provider.dispatch(t,n,o)}else{r.globalHandler=n;const e=[...this.contextGroupMap.keys()].map((async e=>{const i=this.contextGroupMap.get(e);i&&await this.provider.dispatch(t,n,i)}));await Promise.all(e)}}handlerRemoved(e,t){const{handlerId:n}=e,i=this.clients.get(t.endpointId);i?(Array.from(i.contextHandlers).forEach((([,e])=>{const t=e.indexOf(n);t>-1&&e.splice(t,1)})),i.globalHandler===n&&(i.globalHandler=void 0)):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={contextHandlers:new Map,clientIdentity:e,globalHandler:void 0};this.clients.set(e.endpointId,t)}}onDisconnection(e){this.clients.delete(e.endpointId)}},Wi}()),l=Hi,u=a(i),p=function(){if(Ni)return Ui;Ni=1,Object.defineProperty(Ui,"__esModule",{value:!0}),Ui.PrivateChannelProvider=void 0;const e=Vi();return Ui.PrivateChannelProvider=class t{constructor(e,t){this.provider=e,this.id=t,this.clients=new Map,this.registerListeners(),this.contextByContextType=new Map,this.lastContext=void 0,this.provider.onConnection((e=>this.registerNewClient(e))),this.provider.onDisconnection((async e=>{const{endpointId:t}=e;this.clients.has(t)&&await this.handleClientDisconnecting(e),0===(await this.provider.getAllClientInfo()).length&&this.provider.destroy()}))}getClientState(e){return this.clients.get(e.endpointId)}registerListeners(){this.provider.register("broadcast",this.broadcast.bind(this)),this.provider.register("getCurrentContext",this.getCurrentContext.bind(this)),this.provider.register("contextHandlerAdded",this.contextHandlerAdded.bind(this)),this.provider.register("contextHandlerRemoved",this.contextHandlerRemoved.bind(this)),this.provider.register("nonStandardHandlerRemoved",this.nonStandardHandlerRemoved.bind(this)),this.provider.register("onAddContextHandlerAdded",this.onAddContextHandlerAdded.bind(this)),this.provider.register("onDisconnectHandlerAdded",this.onDisconnectHandlerAdded.bind(this)),this.provider.register("onUnsubscribeHandlerAdded",this.onUnsubscribeHandlerAdded.bind(this)),this.provider.register("clientDisconnecting",((e,t)=>{this.handleClientDisconnecting(t)}))}broadcast(t,n){const{context:i}=t;if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name}, tried to call broadcast, is not connected to this Private Channel`);const r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to broadcast - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);this.contextByContextType.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{const t=e.handlerIdsByContextTypes.get(i.type);t&&t.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getCurrentContext(e,t){const{contextType:n}=e;if(!this.getClientState(t))throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call getCurrentContext, is not connected to this Private Channel`);if(void 0!==n){return this.contextByContextType.get(n)||null}return this.lastContext?this.lastContext:null}contextHandlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call addContextListener, is not connected to this Private Channel`);if(i){const e=r.handlerIdsByContextTypes.get(i)||[];r.handlerIdsByContextTypes.set(i,[...e,n])}else r.globalHandler=n;Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&e.onAddContextListenerHandlerId&&this.provider.dispatch(e.clientIdentity,e.onAddContextListenerHandlerId,i)}))}async contextHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);if(i){let e;if(i.globalHandler===n)i.globalHandler=void 0;else for(const[t,r]of i.handlerIdsByContextTypes){const i=r.indexOf(n);i>-1&&(r.splice(i,1),e=t)}const r=(await this.getConnectedClients()).map((async n=>{const{clientIdentity:i,clientIdentity:{endpointId:r},onUnsubscribeHandlerId:o}=n;r!==t.endpointId&&o&&await this.provider.dispatch(i,o,e)}));try{await Promise.all(r)}catch(e){throw console.error(`Problem when attempting to dispatch to onUnsubscribeHandlers. Error: ${e} Removing Client: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}`),new Error(e)}}else console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}.`)}nonStandardHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);i?i.onDisconnectHandlerId===n?i.onDisconnectHandlerId=void 0:i.onAddContextListenerHandlerId===n?i.onAddContextListenerHandlerId=void 0:i.onUnsubscribeHandlerId===n&&(i.onUnsubscribeHandlerId=void 0):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}onAddContextHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onAddContextListener, is not connected to this Private Channel`);n.onAddContextListenerHandlerId=i,Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&Array.from(e.handlerIdsByContextTypes.keys()).forEach((e=>{this.provider.dispatch(t,i,e)}))}))}onDisconnectHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onDisconnect, is not connected to this Private Channel`);n.onDisconnectHandlerId=i}onUnsubscribeHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onUnsubscribe, is not connected to this Private Channel`);n.onUnsubscribeHandlerId=i}removeClient(e){const t=this.getClientState(e);if(!t)throw new Error(`Client with Identity: ${e.uuid} ${e.name}, tried to call disconnect, is not connected to this Private Channel`);t.handlerIdsByContextTypes.clear(),this.clients.delete(e.endpointId)}async fireOnDisconnectForOtherClients(e){const{endpointId:t}=e,n=(await this.getConnectedClients()).map((async e=>{const{clientIdentity:{endpointId:n},onDisconnectHandlerId:i}=e;n!==t&&i&&await this.provider.dispatch(e.clientIdentity,i)}));try{await Promise.all(n)}catch(t){throw console.error(`Problem when attempting to dispatch to onDisconnectHandlers. Error: ${t} Disconnecting Client: uuid: ${e.uuid}. name: ${e.name}. endpointId: ${e.endpointId}`),new Error(t)}}async unsubscribeAll(e){const{endpointId:t}=e,n=this.clients.get(t);if(n){const t=Array.from(n.handlerIdsByContextTypes.values()).flat(),i=n.globalHandler;if(t.length>0){const n=t.map((async t=>this.contextHandlerRemoved({handlerId:t},e)));try{await Promise.all(n)}catch(e){console.error(e.message)}}if(i)try{await this.contextHandlerRemoved({handlerId:i},e)}catch(e){console.error(e.message)}}}async handleClientDisconnecting(e){await this.unsubscribeAll(e),this.removeClient(e),await this.fireOnDisconnectForOtherClients(e)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={clientIdentity:e,handlerIdsByContextTypes:new Map,globalHandler:void 0,onAddContextListenerHandlerId:void 0,onUnsubscribeHandlerId:void 0,onDisconnectHandlerId:void 0};this.clients.set(e.endpointId,t)}}async getConnectedClients(){const e=await this.provider.getAllClientInfo();return Array.from(this.clients.values()).filter((t=>{const{uuid:n,name:i}=t.clientIdentity;return e.some((e=>i===e.name&&n===e.uuid))}))}static init(e,n){return new t(e,n)}},Ui}(),w=G,y=[{id:"green",displayMetadata:{color:"#00CC88",name:"green"}},{id:"purple",displayMetadata:{color:"#8C61FF",name:"purple"}},{id:"orange",displayMetadata:{color:"#FF8C4C",name:"orange"}},{id:"red",displayMetadata:{color:"#FF5E60",name:"red"}},{id:"pink",displayMetadata:{color:"#FF8FB8",name:"pink"}},{id:"yellow",displayMetadata:{color:"#E9FF8F",name:"yellow"}}];let f=class i extends c.Base{constructor(i,s,a){super(i),e.set(this,void 0),t.set(this,void 0),n.set(this,void 0),this.getProvider=()=>o(this,n,"f").getValue(),this.interopClients=new Map,this.contextGroupsById=new Map,r(this,t,a.contextGroups??[...y],"f"),r(this,e,a.fdc3Info,"f"),a?.logging&&(this.logging=a.logging),this.intentClientMap=new Map,this.lastContextMap=new Map,this.sessionContextGroupMap=new Map,r(this,n,new w.Lazy(s),"f"),this.setContextGroupMap(),this.setupChannelProvider()}static createClosedConstructor(...e){return class extends i{constructor(...t){if(t.length){const[n,i,r]=t;if(r&&"object"==typeof r&&!(0,u.default)(r,e[2]))return console.warn("You have modified the parameters of the InteropOverride constructor. This behavior is deprecated and will be removed in a future version. You can modify these options in your manifest. Please consult our Interop docs for guidance on migrating to the new override scheme."),void super(e[0],e[1],r);console.warn("You are attempting to pass arguments to the InteropOverride constructor. This is not necessary, and these passed arguments will be ignored. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.")}super(...e)}}}setContext({context:e},t){this.wire.sendAction("interop-broker-set-context").catch((e=>{}));const n=this.getClientState(t);if(!n||!n.contextGroupId)throw n?new Error("You must join a context group before you can set context."):new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);{const{contextGroupId:t}=n;this.setContextForGroup({context:e},t)}}setContextForGroup({context:e},t){this.wire.sendAction("interop-broker-set-context-for-group").catch((e=>{}));const n=this.contextGroupsById.get(t);if(!n)throw new Error(`Unable to set context for context group that isn't in the context group mapping: ${t}.`);const r=i.checkContextIntegrity(e);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(e)}`);const o=e.type;n.set(o,e),this.lastContextMap.set(t,o);Array.from(this.interopClients.values()).filter((e=>e.contextGroupId===t)).forEach((t=>{for(const[,n]of t.contextHandlers)i.isContextTypeCompatible(o,n.contextType)&&this.invokeContextHandler(t.clientIdentity,n.handlerId,e)}))}getCurrentContext(e,t){this.wire.sendAction("interop-broker-get-current-context").catch((e=>{}));const n=this.getClientState(t);if(!n?.contextGroupId)throw new Error("You must be a member of a context group to call getCurrentContext");const{contextGroupId:i}=n,r=this.contextGroupsById.get(i),o=this.lastContextMap.get(i),s=e?.contextType??o;return r&&s?r.get(s):void 0}async joinContextGroup({contextGroupId:e,target:t},n){if(this.wire.sendAction("interop-broker-join-context-group").catch((e=>{})),this.sessionContextGroupMap.has(e))throw new Error(l.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup);if(t){i.hasEndpointId(t)&&await this.addClientToContextGroup({contextGroupId:e},t);try{const n=this.channel.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name));if(!n.length)throw new Error(`Given Identity ${t.uuid} ${t.name} is not connected to the Interop Broker.`);n.length>1&&console.warn(`More than one connection found for identity ${t.uuid} ${t.name}`);const i=[];for(const t of n)i.push(this.addClientToContextGroup({contextGroupId:e},t));await Promise.all(i)}catch(e){throw new Error(e)}}else await this.addClientToContextGroup({contextGroupId:e},n)}async addClientToContextGroup({contextGroupId:e},t){this.wire.sendAction("interop-broker-add-client-to-context-group").catch((e=>{}));const n=this.getClientState(t);if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(!this.getContextGroups().find((t=>t.id===e)))throw new Error(`Attempting to join a context group that does not exist: ${e}. You may only join existing context groups.`);if(n.contextGroupId!==e){n.contextGroupId=e,await this.setCurrentContextGroupInClientOptions(t,e);const i=this.contextGroupsById.get(e);for(const[,e]of n.contextHandlers){const{contextType:n,handlerId:r}=e;if(void 0===n)i.forEach(((e,n)=>{this.invokeContextHandler(t,r,e)}));else if(i.has(n)){const e=i.get(n);e&&this.invokeContextHandler(t,r,e)}}}}async removeFromContextGroup({target:e},t){if(this.wire.sendAction("interop-broker-remove-from-context-group").catch((e=>{})),e){i.hasEndpointId(e)&&await this.removeClientFromContextGroup(e);try{const t=this.channel.connections.filter((t=>t.uuid===e.uuid&&t.name===e.name));if(!t.length)throw new Error(`No connection found for given Identity ${e.uuid} ${e.name}`);t.length>1&&console.warn(`More than one connection found for identity ${e.uuid} ${e.name}`);const n=[];for(const e of t)n.push(this.removeClientFromContextGroup(e));await Promise.all(n)}catch(e){throw new Error(e)}}else await this.removeClientFromContextGroup(t)}async removeClientFromContextGroup(e){this.wire.sendAction("interop-broker-remove-client-from-context-group").catch((e=>{}));const t=this.getClientState(e);t&&(t.contextGroupId=void 0),await this.setCurrentContextGroupInClientOptions(e,null)}getContextGroups(){return this.wire.sendAction("interop-broker-get-context-groups").catch((e=>{})),o(this,t,"f").map((e=>({...e})))}getInfoForContextGroup({contextGroupId:e}){return this.wire.sendAction("interop-broker-get-info-for-context-group").catch((e=>{})),this.getContextGroups().find((t=>t.id===e))}getAllClientsInContextGroup({contextGroupId:e}){this.wire.sendAction("interop-broker-get-all-clients-in-context-group").catch((e=>{}));return Array.from(this.interopClients.values()).filter((t=>t.contextGroupId===e)).map((e=>e.clientIdentity))}async handleFiredIntent(e,t){const n=(0,l.generateOverrideWarning)("fdc3.raiseIntent","InteropBroker.handleFiredIntent",t,"interopClient.fireIntent");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntent)}async setIntentTarget(e,t){this.wire.sendAction("interop-broker-set-intent-target").catch((e=>{}));const n=this.intentClientMap.get(t.name),i=`intent-handler-${e.name}`;if(n){const t=n.get(i);if(t){if(t.pendingIntents.push(e),t.clientIdentity&&t.isReady){const{clientIdentity:e,pendingIntents:n}=t;try{const r=n[n.length-1];await this.invokeIntentHandler(e,i,r),t.pendingIntents=[]}catch(n){console.error(`Error invoking intent handler for client ${e.uuid}/${e.name}/${e.endpointId}`),t.isReady=!1}}}else n.set(i,{isReady:!1,pendingIntents:[e]})}else{this.intentClientMap.set(t.name,new Map);const n=this.intentClientMap.get(t.name);n&&n.set(i,{isReady:!1,pendingIntents:[e]})}}async handleInfoForIntent(e,t){const n=(0,l.generateOverrideWarning)("fdc3.findIntent","InteropBroker.handleInfoForIntent",t,"interopClient.getInfoForIntent");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntent)}async handleInfoForIntentsByContext(e,t){const n=(0,l.generateOverrideWarning)("fdc3.findIntentsByContext","InteropBroker.handleInfoForIntentsByContext",t,"interopClient.getInfoForIntentsByContext");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntentsByContext)}async handleFiredIntentForContext(e,t){const n=(0,l.generateOverrideWarning)("fdc3.raiseIntentForContext","InteropBroker.handleFiredIntentForContext",t,"interopClient.fireIntentForContext");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntentForContext)}async clientDisconnected(e){}async fdc3HandleOpen({app:e,context:t},n){const i=(0,l.generateOverrideWarning)("fdc3.open","InteropBroker.fdc3HandleOpen",n);throw console.warn(i),new Error(l.BROKER_ERRORS.fdc3Open)}async fdc3HandleFindInstances(e,t){const n=(0,l.generateOverrideWarning)("fdc3.open","InteropBroker.fdc3HandleFindInstances",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3FindInstances)}async fdc3HandleGetAppMetadata(e,t){const n=(0,l.generateOverrideWarning)("fdc3.getAppMetadata","InteropBroker.fdc3HandleGetAppMetadata",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3GetAppMetadata)}async invokeContextHandler(e,t,n){const i=await this.getProvider();try{await i.dispatch(e,t,n)}catch(i){console.error(`Error invoking context handler ${t} for context type ${n.type} in client ${e.uuid}/${e.name}/${e.endpointId}`,i)}}async invokeIntentHandler(e,t,n){const i=await this.getProvider();await i.dispatch(e,t,n)}async fdc3HandleGetInfo(t,n){const{fdc3Version:i}=t;return{fdc3Version:i,...o(this,e,"f"),optionalFeatures:{OriginatingAppMetadata:!1,UserChannelMembershipAPIs:!0},appMetadata:{appId:"",instanceId:""}}}async getAllClientInfo(){return(await this.getProvider()).getAllClientInfo()}decorateSnapshot(e){return{...e,interopSnapshotDetails:{contextGroupStates:this.getContextGroupStates()}}}applySnapshot(e,t){const n=e?.interopSnapshotDetails?.contextGroupStates;n&&(t?.closeExistingWindows||this.updateExistingClients(n),this.rehydrateContextGroupStates(n))}updateExistingClients(e){this.interopClients.forEach((t=>{const{clientIdentity:n,contextGroupId:r,contextHandlers:o}=t;if(r){const t=e[r];for(const[,e]of Object.entries(t))o.forEach((t=>{const{handlerId:r,contextType:o}=t;i.isContextTypeCompatible(e.type,o)&&this.invokeContextHandler(n,r,e)}))}}))}getContextGroupStates(){return i.toObject(this.contextGroupsById)}rehydrateContextGroupStates(e){const t=Object.entries(e);for(const[e,n]of t){const t=Object.entries(n);for(const[n,i]of t)if(this.contextGroupsById.has(e)){this.contextGroupsById.get(e).set(n,i)}else console.warn(`Attempting to set a context group that isn't in the context group mapping. Skipping context group rehydration for: ${e}`)}}contextHandlerRegistered({contextType:e,handlerId:t},n){const i={contextType:e,handlerId:t},r=this.getClientState(n);if(r?.contextHandlers.set(t,i),r&&r.contextGroupId){const{contextGroupId:i}=r,o=this.contextGroupsById.get(i);if(void 0===e)o.forEach(((e,i)=>{this.invokeContextHandler(n,t,e)}));else if(o.has(e)){const i=o.get(e);i&&this.invokeContextHandler(n,t,i)}}}async intentHandlerRegistered(e,t){const{handlerId:n}=e,i=this.intentClientMap.get(t.name),r=i?.get(n);if(i)if(r){const{pendingIntents:e}=r;r.clientIdentity=t,r.isReady=!0;try{if(e.length>0){const i=e[e.length-1];await this.invokeIntentHandler(t,n,i),r.pendingIntents=[]}}catch(e){console.error(`Error invoking intent handler: ${n} for client ${t.uuid}/${t.name}/${t.endpointId}`)}}else i.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t});else{this.intentClientMap.set(t.name,new Map);const e=this.intentClientMap.get(t.name);e&&e.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t})}}removeContextHandler({handlerId:e},t){const n=this.getClientState(t);n&&n.contextHandlers.delete(e)}handleJoinSessionContextGroup({sessionContextGroupId:e},t){try{if(!e)throw new Error("Failed to join session context group: must specify group id.");const n=this.sessionContextGroupMap.get(e);if(n)n.registerNewClient(t);else{const n=new h.default(this.channel,e);n.registerNewClient(t),this.sessionContextGroupMap.set(e,n)}return{hasConflict:this.contextGroupsById.has(e)}}catch(e){throw new Error(e)}}getClientState(e){return this.interopClients.get(e.endpointId)}static toObject(e){const t=Object.fromEntries(e),n={};return Object.entries(t).forEach((([e,t])=>{const i=Object.fromEntries(t);n[e]=i})),n}static checkContextIntegrity(e){if(!e)return{isValid:!1,reason:"No context supplied"};if("object"!=typeof e)return{isValid:!1,reason:"Context must be an Object"};if(!e.type)return{isValid:!1,reason:"Context must have a type property"};if(e.id&&"object"!=typeof e.id)return{isValid:!1,reason:"Context id must be an Object populated with key-value identifiers (if set)"};if(e.id){const{id:t}=e,n=Object.keys(t);let i=!1;if(!n.length)return{isValid:!1,reason:"Context id must have at least one key-value identifier"};if(n.forEach((e=>{"string"==typeof e&&"string"==typeof t[e]||(i=!0)})),i)return{isValid:!1,reason:"Context id key-value identifiers must be of type string"}}return e.name&&"string"!=typeof e.name?{isValid:!1,reason:"Context name must be of string type (if set)"}:{isValid:!0}}static hasEndpointId(e){return void 0!==e.endpointId}static isContextTypeCompatible(e,t){return void 0===t||e===t}setContextGroupMap(){for(const e of this.getContextGroups())this.contextGroupsById.set(e.id,new Map)}async setCurrentContextGroupInClientOptions(e,t){try{const n=await this.fin.System.getEntityInfo(e.uuid,e.name);let i;"view"===n.entityType?i=await this.fin.View.wrap(e):"window"===n.entityType&&(i=await this.fin.Window.wrap(e)),i&&await i.updateOptions({interop:{currentContextGroup:t}})}catch(e){}}async setupChannelProvider(){try{const e=await this.getProvider();this.channel=e,this.wireChannel(e)}catch(e){throw new Error(`Error setting up Interop Broker Channel Provider: ${e}`)}}wireChannel(e){e.onConnection((async(e,t)=>{if(!await this.isConnectionAuthorized(e,t))throw new Error(`Connection not authorized for ${e.uuid}, ${e.name}`);if(!e.endpointId)throw new Error("Version too old to be compatible with Interop. Please upgrade your runtime to a more recent version.");const n={contextGroupId:void 0,contextHandlers:new Map,clientIdentity:e};t?.currentContextGroup&&this.contextGroupsById.has(t.currentContextGroup)&&(n.contextGroupId=t?.currentContextGroup),this.interopClients.set(e.endpointId,n)})),e.onDisconnection((e=>{this.interopClients.delete(e.endpointId);const t=this.intentClientMap.get(e.name);t&&e.uuid===this.fin.me.uuid&&t.forEach((e=>{e.isReady=!1})),this.sessionContextGroupMap.forEach((t=>{t.onDisconnection(e)})),this.clientDisconnected(e)})),e.beforeAction((async(e,t,n)=>{if(!await this.isActionAuthorized(e,t,n))throw new Error(`Action (${e}) not authorized for ${n.uuid}, ${n.name}`);this.logging?.beforeAction?.enabled&&console.log(e,t,n)})),e.afterAction(((e,t,n)=>{this.logging?.afterAction?.enabled&&console.log(e,t,n)})),e.register("setContext",this.setContext.bind(this)),e.register("fireIntent",this.handleFiredIntent.bind(this)),e.register("getCurrentContext",this.getCurrentContext.bind(this)),e.register("getInfoForIntent",this.handleInfoForIntent.bind(this)),e.register("getInfoForIntentsByContext",this.handleInfoForIntentsByContext.bind(this)),e.register("fireIntentForContext",this.handleFiredIntentForContext.bind(this)),e.register("getContextGroups",this.getContextGroups.bind(this)),e.register("joinContextGroup",this.joinContextGroup.bind(this)),e.register("removeFromContextGroup",this.removeFromContextGroup.bind(this)),e.register("getAllClientsInContextGroup",this.getAllClientsInContextGroup.bind(this)),e.register("getInfoForContextGroup",this.getInfoForContextGroup.bind(this)),e.register("contextHandlerRegistered",this.contextHandlerRegistered.bind(this)),e.register("intentHandlerRegistered",this.intentHandlerRegistered.bind(this)),e.register("removeContextHandler",this.removeContextHandler.bind(this)),e.register("sessionContextGroup:createIfNeeded",this.handleJoinSessionContextGroup.bind(this)),e.register("fdc3Open",this.fdc3HandleOpen.bind(this)),e.register("fdc3v2FindIntentsByContext",this.handleInfoForIntentsByContext.bind(this)),e.register("fdc3FindInstances",this.fdc3HandleFindInstances.bind(this)),e.register("fdc3GetAppMetadata",this.fdc3HandleGetAppMetadata.bind(this)),e.register("fdc3v2GetInfo",(async(e,t)=>this.fdc3HandleGetInfo.bind(this)(e,t))),e.register("createPrivateChannelProvider",(async e=>{const{channelId:t}=e,n=await this.fin.InterApplicationBus.Channel.create(t);p.PrivateChannelProvider.init(n,t)}))}isConnectionAuthorized(e,t){return this.wire.sendAction("interop-broker-is-connection-authorized").catch((e=>{})),Promise.resolve(!0)}isActionAuthorized(e,t,n){return this.wire.sendAction("interop-broker-is-action-authorized").catch((e=>{})),Promise.resolve(!0)}};return Gi.InteropBroker=f,e=new WeakMap,t=new WeakMap,n=new WeakMap,Gi}var zi,Ki={},qi={},Ji=s&&s.__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},Yi=s&&s.__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)};Object.defineProperty(qi,"__esModule",{value:!0});const Zi=d,Qi=Hi;class Xi extends Zi.Base{constructor(e,t,n){super(e),zi.set(this,void 0),this.id=n,Ji(this,zi,t,"f")}async setContext(e){this.wire.sendAction("interop-session-context-group-set-context").catch((e=>{}));return(await Yi(this,zi,"f")).dispatch(`sessionContextGroup:setContext-${this.id}`,{sessionContextGroupId:this.id,context:e})}async getCurrentContext(e){this.wire.sendAction("interop-session-context-group-get-context").catch((e=>{}));return(await Yi(this,zi,"f")).dispatch(`sessionContextGroup:getContext-${this.id}`,{sessionContextGroupId:this.id,type:e})}async addContextHandler(e,t){if(this.wire.sendAction("interop-session-context-group-add-handler").catch((e=>{})),"function"!=typeof e)throw new Error("Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");const n=await Yi(this,zi,"f");let i;return i=t?`sessionContextHandler:invoke-${this.id}-${t}-${(0,Qi.generateId)()}`:`sessionContextHandler:invoke-${this.id}`,n.register(i,(0,Qi.wrapContextHandler)(e,i)),await n.dispatch(`sessionContextGroup:handlerAdded-${this.id}`,{handlerId:i,contextType:t}),{unsubscribe:await this.createUnsubscribeCb(i)}}async createUnsubscribeCb(e){const t=await Yi(this,zi,"f");return async()=>{t.remove(e),await t.dispatch(`sessionContextGroup:handlerRemoved-${this.id}`,{handlerId:e})}}getUserInstance(){return{id:this.id,setContext:(0,Qi.wrapInTryCatch)(this.setContext.bind(this),"Failed to set context: "),getCurrentContext:(0,Qi.wrapInTryCatch)(this.getCurrentContext.bind(this),"Failed to get context: "),addContextHandler:(0,Qi.wrapInTryCatch)(this.addContextHandler.bind(this),"Failed to add context handler: ")}}}qi.default=Xi,zi=new WeakMap;var er={},tr={},nr={},ir={},rr=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),or=s&&s.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),sr=s&&s.__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)&&rr(t,e,n);return or(t,e),t};Object.defineProperty(ir,"__esModule",{value:!0}),ir.PrivateChannelClient=void 0;const ar=sr(Hi);var cr,dr;function hr(){if(cr)return tr;cr=1;var e,t=s&&s.__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)},n=s&&s.__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},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(tr,"__esModule",{value:!0}),tr.FDC3ModuleBase=void 0;const o=nr,a=Hi,c=wr(),d=r(i);return tr.FDC3ModuleBase=class{get client(){return t(this,e,"f").call(this)}get fin(){return this.wire.getFin()}constructor(t,i){this.wire=i,e.set(this,void 0),n(this,e,t,"f")}async broadcast(e){return this.wire.sendAction("fdc3-broadcast").catch((e=>{})),this.client.setContext(e)}async _open(e,t){this.wire.sendAction("fdc3-open").catch((e=>{}));try{return await c.InteropClient.ferryFdc3Call(this.client,"fdc3Open",{app:e,context:t})}catch(e){const t=e.message===a.BROKER_ERRORS.fdc3Open?"ResolverUnavailable":e.message;throw new Error(t)}}async _getChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:"system",...(0,o.getUnsupportedChannelApis)()})))}async getOrCreateChannel(e){this.wire.sendAction("fdc3-get-or-create-channel").catch((e=>{}));const t=(await this._getChannels()).find((t=>t.id===e));if(t)return{...t,type:"system",...(0,o.getUnsupportedChannelApis)()};try{const t=await this.client.joinSessionContextGroup(e);return(0,o.buildAppChannelObject)(t)}catch(e){throw console.error(e.message),new Error(o.ChannelError.CreationFailed)}}async getSystemChannels(){return this.wire.sendAction("fdc3-get-system-channels").catch((e=>{})),this._getChannels()}async joinChannel(e){this.wire.sendAction("fdc3-join-channel").catch((e=>{}));try{return await this.client.joinContextGroup(e)}catch(e){if(e.message===a.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup?console.error("The Channel you have tried to join is an App Channel. Custom Channels can only be defined by the Interop Broker through code or manifest configuration. Please use getOrCreateChannel."):console.error(e.message),e.message.startsWith("Attempting to join a context group that does not exist"))throw new Error(o.ChannelError.NoChannelFound);throw new Error(o.ChannelError.AccessDenied)}}async getCurrentChannel(){this.wire.sendAction("fdc3-get-current-channel").catch((e=>{}));const e=await this.getCurrentContextGroupInfo();return e?this.buildChannelObject(e):null}async leaveCurrentChannel(){return this.wire.sendAction("fdc3-leave-current-channel").catch((e=>{})),this.client.removeFromContextGroup()}async getCurrentContextGroupInfo(){const e=await this.client.getContextGroups(),t=e.map((async e=>this.client.getAllClientsInContextGroup(e.id))),n=(await Promise.all(t)).findIndex((e=>e.some((e=>{const{uuid:t,name:n}=e;return this.wire.me.uuid===t&&this.wire.me.name===n}))));return e[n]}async buildChannelObject(e){return{...e,type:"system",addContextListener:(...[e,t])=>{let n,i;"function"==typeof e?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),n=e):(n=t,"string"==typeof e&&(i=e));const r=(async()=>{let e=!0;const t=await this.client.getCurrentContext(i);return this.client.addContextHandler(((i,r)=>{if(!e||(e=!1,!(0,d.default)(t,i)))return n(i,r)}),i)})();return{...r,unsubscribe:()=>r.then((e=>e.unsubscribe()))}},broadcast:this.broadcast.bind(this),getCurrentContext:async e=>{const t=await this.client.getCurrentContext(e);return void 0===t?null:t}}}},e=new WeakMap,tr}ir.PrivateChannelClient=class{constructor(e,t){this.id=t,this.client=e,this.listeners=new Map}async broadcast(e){return this.client.dispatch("broadcast",{context:e})}async getCurrentContext(e){return this.client.dispatch("getCurrentContext",{contextType:e})}async addContextListener(e,t){if("function"!=typeof t)throw new Error("Non-function argument passed to the second parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");let n;n=e?`contextHandler:invoke-${this.id}-${e}-${ar.generateId()}`:`contextHandler:invoke-${this.id}-${ar.generateId()}`,this.client.register(n,ar.wrapContextHandler(t,n));const i={unsubscribe:await this.createContextUnsubscribeCb(n)};return this.listeners.set(n,i),await this.client.dispatch("contextHandlerAdded",{handlerId:n,contextType:e}),i}createNonStandardUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch("nonStandardHandlerRemoved",{handlerId:e})}}createContextUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch("contextHandlerRemoved",{handlerId:e})}}onAddContextListener(e){const t=`onContextHandlerAdded:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch("onAddContextHandlerAdded",{handlerId:t}),n}onDisconnect(e){const t=`onDisconnect:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch("onDisconnectHandlerAdded",{handlerId:t}),n}onUnsubscribe(e){const t=`onUnsubscribe:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch("onUnsubscribeHandlerAdded",{handlerId:t}),n}async cleanUpAllSubs(){Array.from(this.listeners.keys()).forEach((e=>{this.client.remove(e),this.listeners.delete(e)}))}async disconnect(){try{await this.client.dispatch("clientDisconnecting"),await this.cleanUpAllSubs(),await this.client.disconnect()}catch(e){throw new Error(e.message)}}},function(e){var t=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.getIntentResolution=e.isChannel=e.isContext=e.connectPrivateChannel=e.buildAppChannelObject=e.buildPrivateChannelObject=e.ChannelError=e.ResultError=e.UnsupportedChannelApiError=e.getUnsupportedChannelApis=void 0;const n=Hi,r=ir,o=t(i);e.getUnsupportedChannelApis=e=>({addContextListener:()=>{throw new a("Channel.addContextListener",e)},broadcast:()=>{throw new a("Channel.broadcast",e)},getCurrentContext:()=>{throw new a("Channel.getCurrentContext",e)}});class a extends Error{constructor(e,t="System"){super(e),this.message=`Calling ${e} on an instance of a ${t} Channel returned by fdc3.get${t}Channels is not supported. If you would like to use a ${t} Channel, please use fdc3.joinChannel, fdc3.addContextListener, and fdc3.broadcast instead.`}}var c,d;e.UnsupportedChannelApiError=a,function(e){e.NoResultReturned="NoResultReturned",e.IntentHandlerRejected="IntentHandlerRejected"}(c=e.ResultError||(e.ResultError={})),(d=e.ChannelError||(e.ChannelError={})).NoChannelFound="NoChannelFound",d.AccessDenied="AccessDenied",d.CreationFailed="CreationFailed";e.buildPrivateChannelObject=e=>{let t=!1;const n=()=>{if(t)throw new Error("Private Channel Client has been disconnected from the Private Channel")};return{id:e.id,type:"private",broadcast:async t=>(n(),e.broadcast(t)),getCurrentContext:async t=>(n(),e.getCurrentContext(t)),addContextListener:async(t,i)=>{n();let r=i,o=t;"function"==typeof t&&(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),r=t,o=null);return e.addContextListener(o,r)},onAddContextListener:t=>(n(),e.onAddContextListener(t)),disconnect:async()=>(n(),t=!0,e.disconnect()),onDisconnect:t=>(n(),e.onDisconnect(t)),onUnsubscribe:t=>(n(),e.onUnsubscribe(t))}};e.buildAppChannelObject=e=>({id:e.id,type:"app",broadcast:e.setContext,getCurrentContext:async t=>{const n=await e.getCurrentContext(t);return void 0===n?null:n},addContextListener:(t,n)=>{let i,r;"function"==typeof t?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),i=t):(i=n,"string"==typeof t&&(r=t));const s=(async()=>{let t=!0;const n=await e.getCurrentContext(r);return e.addContextHandler(((e,r)=>{if(!t||(t=!1,!(0,o.default)(n,e)))return i(e,r)}),r)})();return{...s,unsubscribe:()=>s.then((e=>e.unsubscribe()))}}});e.connectPrivateChannel=async t=>{try{const n=await fin.InterApplicationBus.Channel.connect(t),i=new r.PrivateChannelClient(n,t);return(0,e.buildPrivateChannelObject)(i)}catch(e){throw new Error(`Private Channel with id: ${t} doesn't exist`)}};e.isContext=e=>{if(e&&"object"==typeof e&&"type"in e){const{type:t}=e;return"string"==typeof t}return!1};e.isChannel=e=>{if(e&&"object"==typeof e&&"type"in e&&"id"in e){const{type:t,id:n}=e;return"string"==typeof t&&"string"==typeof n&&("app"===t||"private"===t)}return!1};e.getIntentResolution=async(t,i,r,o)=>{const s=(0,n.generateId)(),a=new Promise(((e,t)=>{fin.InterApplicationBus.subscribe({uuid:"*"},s,(t=>{e(t)})).catch((()=>t(new Error("getResult is not supported in this environment"))))})),d=r?{target:r,intentResolutionResultId:s}:{intentResolutionResultId:s},h=o?{name:o,context:i,metadata:d}:{...i,metadata:d},l=async()=>{let n=await a;if(!n||"object"!=typeof n)throw new Error(c.NoResultReturned);const{error:i}=n;if(i)throw new Error(c.IntentHandlerRejected);if((0,e.isChannel)(n)){const{id:i,type:r}=n;switch(r){case"private":n=await(0,e.connectPrivateChannel)(i);break;case"app":{const r=await t.joinSessionContextGroup(i);n=(0,e.buildAppChannelObject)(r);break}}}else if(!(0,e.isContext)(n))throw new Error(c.NoResultReturned);return n},u=o?await t.fireIntent(h):await t.fireIntentForContext(h);return"object"!=typeof u?{source:{appId:"",instanceId:""},intent:"",version:"2.0",getResult:l}:{...u,getResult:l}}}(nr);var lr,ur,pr={};function wr(){if(ur)return Ki;ur=1;var e,t,n=s&&s.__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},i=s&&s.__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)},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ki,"__esModule",{value:!0}),Ki.InteropClient=void 0;const o=d,a=r(qi),c=function(){if(dr)return er;dr=1,Object.defineProperty(er,"__esModule",{value:!0}),er.Fdc3Module=void 0;const e=Hi,t=hr();class n extends t.FDC3ModuleBase{async open(e,t){await super._open(e,t)}addContextListener(e,t){let n;return this.wire.sendAction("fdc3-add-context-listener").catch((e=>{})),"function"==typeof e?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),n=this.client.addContextHandler(e)):n=this.client.addContextHandler(t,null===e?void 0:e),{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}addIntentListener(e,t){this.wire.sendAction("fdc3-add-intent-listener").catch((e=>{}));const n=this.client.registerIntentHandler((e=>{const{context:n,metadata:i}=e,{metadata:r}=n,o=i?.intentResolutionResultId||r?.intentResolutionResultId;o&&this.fin.InterApplicationBus.publish(o,null).catch((()=>null)),t(e.context)}),e,{fdc3Version:"1.2"});return{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}async raiseIntent(t,n,i){this.wire.sendAction("fdc3-raise-intent").catch((e=>{}));const r=i?{name:t,context:n,metadata:{target:i}}:{name:t,context:n};try{return await this.client.fireIntent(r)}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntent?"ResolverUnavailable":t.message;throw new Error(n)}}async findIntent(t,n){this.wire.sendAction("fdc3-find-intent").catch((e=>{}));try{return await this.client.getInfoForIntent({name:t,context:n})}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntent?"ResolverUnavailable":t.message;throw new Error(n)}}async findIntentsByContext(t){this.wire.sendAction("fdc3-find-intents-by-context").catch((e=>{}));try{return await this.client.getInfoForIntentsByContext(t)}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntentsByContext?"ResolverUnavailable":t.message;throw new Error(n)}}async raiseIntentForContext(t,n){this.wire.sendAction("fdc3-raise-intent-for-context").catch((e=>{}));try{return await this.client.fireIntentForContext({...t,metadata:{target:n}})}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntentForContext?"ResolverUnavailable":t.message;throw new Error(n)}}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}getInfo(){return this.wire.sendAction("fdc3-get-info").catch((e=>{})),{providerVersion:this.wire.environment.getAdapterVersionSync(),provider:`openfin-${this.wire.me.uuid}`,fdc3Version:"1.2"}}}return er.Fdc3Module=n,er}(),h=function(){if(lr)return pr;lr=1,Object.defineProperty(pr,"__esModule",{value:!0}),pr.Fdc3Module2=void 0;const e=hr(),t=Hi,n=wr(),i=nr,r=ir;class o extends e.FDC3ModuleBase{async open(e,t){return"string"==typeof e&&console.warn("Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string })."),super._open(e,t)}async findInstances(e){this.wire.sendAction("fdc3-find-instances").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,"fdc3FindInstances",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3FindInstances?"ResolverUnavailable":e.message;throw new Error(n)}}async getAppMetadata(e){this.wire.sendAction("fdc3-get-app-metadata").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,"fdc3GetAppMetadata",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3GetAppMetadata?"ResolverUnavailable":e.message;throw new Error(n)}}async addContextListener(e,t){this.wire.sendAction("fdc3-add-context-listener").catch((e=>{}));const n=e=>t=>{const{contextMetadata:n,...i}=t,r=n?[{...i},n]:[t,null];e(...r)};let i=t,r=n(i);return"function"==typeof e?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),i=e,r=n(i),this.client.addContextHandler(r)):this.client.addContextHandler(r,null===e?void 0:e)}async findIntent(e,n,i){this.wire.sendAction("fdc3-find-intent").catch((e=>{}));try{return await this.client.getInfoForIntent({name:e,context:n,metadata:{resultType:i}})}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntent?"ResolverUnavailable":e.message;throw new Error(n)}}async findIntentsByContext(e,i){this.wire.sendAction("fdc3-find-intents-by-context").catch((e=>{}));const r=i?{context:e,metadata:{resultType:i}}:e;try{return await n.InteropClient.ferryFdc3Call(this.client,"fdc3v2FindIntentsByContext",r)}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntentsByContext?"ResolverUnavailable":e.message;throw new Error(n)}}async raiseIntent(e,n,r){this.wire.sendAction("fdc3-raise-intent").catch((e=>{}));try{return"string"==typeof r&&console.warn("Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string })."),(0,i.getIntentResolution)(this.client,n,r,e)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?"ResolverUnavailable":e.message;throw new Error(n)}}async raiseIntentForContext(e,n){this.wire.sendAction("fdc3-raise-intent-for-context").catch((e=>{}));try{return"string"==typeof n&&console.warn("Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string })."),(0,i.getIntentResolution)(this.client,e,n)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?"ResolverUnavailable":e.message;throw new Error(n)}}async addIntentListener(e,t){if(this.wire.sendAction("fdc3-add-intent-listener").catch((e=>{})),"string"!=typeof e)throw new Error("First argument must be an Intent name");return this.client.registerIntentHandler((async e=>{let n,i;const{context:r,metadata:o}=e,{contextMetadata:s,metadata:a,...c}=r,d=o?.intentResolutionResultId||a?.intentResolutionResultId;try{const e=a?{metadata:a,...c}:{...c};n=await t(e,s),i=n}catch(e){n=e,i={error:!0}}if(d&&this.fin.InterApplicationBus.publish(d,i).catch((()=>null)),n instanceof Error)throw new Error(n.message);return n}),e,{fdc3Version:"2.0"})}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}async createPrivateChannel(){const e=(0,t.generateId)();await n.InteropClient.ferryFdc3Call(this.client,"createPrivateChannelProvider",{channelId:e});const o=await this.fin.InterApplicationBus.Channel.connect(e),s=new r.PrivateChannelClient(o,e);return(0,i.buildPrivateChannelObject)(s)}async getUserChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:"user",...(0,i.getUnsupportedChannelApis)("User")})))}async getSystemChannels(){return console.warn("This API has been deprecated. Please use fdc3.getUserChannels instead."),super.getSystemChannels()}async joinUserChannel(e){return super.joinChannel(e)}async joinChannel(e){return console.warn("This API has been deprecated. Please use fdc3.joinUserChannel instead."),super.joinChannel(e)}async getCurrentChannel(){const e=await super.getCurrentChannel();return e?{...e,type:"user",broadcast:this.broadcast.bind(this)}:null}async getInfo(){return n.InteropClient.ferryFdc3Call(this.client,"fdc3v2GetInfo",{fdc3Version:"2.0"})}}return pr.Fdc3Module2=o,pr}(),l=Hi;let u=class extends o.Base{constructor(i,r){super(i),e.set(this,void 0),t.set(this,void 0),n(this,t,new Map,"f"),n(this,e,r,"f")}async setContext(t){this.wire.sendAction("interop-client-set-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("setContext",{context:t})}async addContextHandler(t,n){if(this.wire.sendAction("interop-client-add-context-handler").catch((e=>{})),"function"!=typeof t)throw new Error("Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");const r=await i(this,e,"f");let o;o=n?`invokeContextHandler-${n}-${(0,l.generateId)()}`:"invokeContextHandler";const s=(0,l.wrapContextHandler)(t,o);return r.register(o,s),await r.dispatch("contextHandlerRegistered",{handlerId:o,contextType:n}),{unsubscribe:async()=>{r.remove(o),await r.dispatch("removeContextHandler",{handlerId:o})}}}async getContextGroups(){this.wire.sendAction("interop-client-get-context-groups").catch((e=>{}));return(await i(this,e,"f")).dispatch("getContextGroups")}async joinContextGroup(t,n){this.wire.sendAction("interop-client-join-context-group").catch((e=>{}));const r=await i(this,e,"f");if(!t)throw new Error("No contextGroupId specified for joinContextGroup.");return r.dispatch("joinContextGroup",{contextGroupId:t,target:n})}async removeFromContextGroup(t){this.wire.sendAction("interop-client-remove-from-context-group").catch((e=>{}));return(await i(this,e,"f")).dispatch("removeFromContextGroup",{target:t})}async getAllClientsInContextGroup(t){this.wire.sendAction("interop-client-get-all-clients-in-context-group").catch((e=>{}));const n=await i(this,e,"f");if(!t)throw new Error("No contextGroupId specified for getAllClientsInContextGroup.");return n.dispatch("getAllClientsInContextGroup",{contextGroupId:t})}async getInfoForContextGroup(t){this.wire.sendAction("interop-client-get-info-for-context-group").catch((e=>{}));const n=await i(this,e,"f");if(!t)throw new Error("No contextGroupId specified for getInfoForContextGroup.");return n.dispatch("getInfoForContextGroup",{contextGroupId:t})}async fireIntent(t){this.wire.sendAction("interop-client-fire-intent").catch((e=>{}));return(await i(this,e,"f")).dispatch("fireIntent",t)}async registerIntentHandler(t,n,r){this.wire.sendAction("interop-client-register-intent-handler").catch((e=>{}));const o=await i(this,e,"f"),s=`intent-handler-${n}`,a=(0,l.wrapIntentHandler)(t,s);try{await o.register(s,a),await o.dispatch("intentHandlerRegistered",{handlerId:s,...r})}catch(e){throw new Error("Unable to register intent handler")}return{unsubscribe:async()=>{o.remove(s)}}}async getCurrentContext(t){this.wire.sendAction("interop-client-get-current-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("getCurrentContext",{contextType:t})}async getInfoForIntent(t){this.wire.sendAction("interop-client-get-info-for-intent").catch((e=>{}));return(await i(this,e,"f")).dispatch("getInfoForIntent",t)}async getInfoForIntentsByContext(t){this.wire.sendAction("interop-client-get-info-for-intents-by-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("getInfoForIntentsByContext",t)}async fireIntentForContext(t){this.wire.sendAction("interop-client-fire-intent-for-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("fireIntentForContext",t)}async joinSessionContextGroup(n){try{const r=i(this,t,"f").get(n);if(r)return r.getUserInstance();const o=await i(this,e,"f"),{hasConflict:s}=await o.dispatch("sessionContextGroup:createIfNeeded",{sessionContextGroupId:n});s&&console.warn(`A (non-session) context group with the name "${n}" already exists. If you are trying to join a Context Group, call joinContextGroup instead.`);const c=new a.default(this.wire,i(this,e,"f"),n);return i(this,t,"f").set(n,c),c.getUserInstance()}catch(e){throw console.error(`Error thrown trying to create Session Context Group with id "${n}": ${e}`),e}}async onDisconnection(t){this.wire.sendAction("interop-client-add-ondisconnection-listener").catch((e=>{}));return(await i(this,e,"f")).onDisconnection((e=>{const{uuid:n}=e;t({type:"interop-broker",topic:"disconnected",brokerName:n})}))}getFDC3Sync(e){switch(e){case"1.2":return new c.Fdc3Module((()=>this),this.wire);case"2.0":return new h.Fdc3Module2((()=>this),this.wire);default:throw new Error(`Invalid FDC3 version provided: ${e}. Must be '1.2' or '2.0'`)}}async getFDC3(e){return this.getFDC3Sync(e)}static async ferryFdc3Call(t,n,r){return(await i(t,e,"f")).dispatch(n,r||null)}};return Ki.InteropClient=u,e=new WeakMap,t=new WeakMap,Ki}var yr,fr,gr,mr={};function vr(){if(yr)return mr;yr=1,Object.defineProperty(mr,"__esModule",{value:!0}),mr.overrideCheck=mr.checkFDC32Overrides=mr.getDefaultViewFdc3VersionFromAppInfo=void 0;const e=Vi();function t(t){return["fdc3HandleFindInstances","handleInfoForIntent","handleInfoForIntentsByContext","fdc3HandleGetAppMetadata","fdc3HandleGetInfo","fdc3HandleOpen","handleFiredIntent","handleFiredIntentForContext"].filter((n=>t[n]===e.InteropBroker.prototype[n]))}return mr.getDefaultViewFdc3VersionFromAppInfo=function({manifest:e,initialOptions:t}){const n=e?.platform?.defaultViewOptions?.fdc3InteropApi??t.defaultViewOptions?.fdc3InteropApi;return["1.2","2.0"].includes(n??"")?n:void 0},mr.checkFDC32Overrides=t,mr.overrideCheck=function(e,n){if(n&&"2.0"===n){const n=t(e);n.length>0&&console.warn(`WARNING: FDC3 2.0 has been set as a default option for Views in this Platform, but the required InteropBroker APIs for FDC3 2.0 compliance have not all been overridden.\nThe following APIs need to be overridden:\n${n.join("\n")}`)}},mr}function Cr(){return gr||(gr=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),i=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),i(function(){if(fr)return Ti;fr=1;var e=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ti,"__esModule",{value:!0}),Ti.InteropModule=void 0;const t=e(n),i=$i,r=d,o=Vi(),a=wr(),c=vr(),h=Tn,l=e=>new e,u="You have attempted to use or modify InteropBroker parameters, which is not allowed. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.";class p extends r.Base{async init(e,n=l){this.wire.sendAction("interop-init").catch((()=>{}));const r=await this.wire.environment.getInteropInfo(this.wire.getFin()),s=(0,i.createUnusableObject)(u),a=(0,i.createWarningObject)(u,(0,t.default)(r)),d=async()=>{throw new Error(u)},p=o.InteropBroker.createClosedConstructor(this.wire,(()=>this.fin.InterApplicationBus.Channel.create(`interop-broker-${e}`)),r);let w;return w=Array.isArray(n)?new((0,h.overrideFromComposables)(...n)(p))(s,d,a):await n(p,s,d,a),(0,c.overrideCheck)(w,r.fdc3Version),w}connectSync(e,t){return this.wire.sendAction("interop-connect-sync").catch((()=>{})),new a.InteropClient(this.wire,this.wire.environment.whenReady().then((()=>this.fin.InterApplicationBus.Channel.connect(`interop-broker-${e}`,{payload:t}))))}}return Ti.InteropModule=p,Ti}(),e),i(wr(),e),i(Vi(),e)}(Li)),Li}var br={},Ir={},Er={},xr={};Object.defineProperty(xr,"__esModule",{value:!0}),xr.getSnapshotSourceChannelName=void 0;xr.getSnapshotSourceChannelName=e=>`snapshot-source-provider-${e.uuid}`;var Ar,Pr,Mr,_r,Or,Sr=s&&s.__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},Rr=s&&s.__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)};Object.defineProperty(Er,"__esModule",{value:!0}),Er.SnapshotSource=void 0;const Fr=d,jr=xr,kr=new Map;class Lr extends Fr.Base{constructor(e,t){super(e),Ar.set(this,void 0),Pr.set(this,(()=>(kr.has(this.identity.uuid)||kr.set(this.identity.uuid,{eventFired:null,clientPromise:null}),kr.get(this.identity.uuid)))),Mr.set(this,(()=>(Rr(this,Pr,"f").call(this).clientPromise||(Rr(this,Pr,"f").call(this).clientPromise=Rr(this,_r,"f").call(this)),Rr(this,Pr,"f").call(this).clientPromise))),_r.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);try{Rr(this,Pr,"f").call(this).eventFired||await Rr(this,Or,"f").call(this);const t=await this.fin.InterApplicationBus.Channel.connect(e,{wait:!1});return t.onDisconnection((()=>{Rr(this,Pr,"f").call(this).clientPromise=null,Rr(this,Pr,"f").call(this).eventFired=null})),t}catch(e){throw Rr(this,Pr,"f").call(this).clientPromise=null,new Error("The targeted SnapshotSource is not currently initialized. Await this object's ready() method.")}})),Or.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);let t,n;const i=new Promise(((e,i)=>{t=e,n=i}));Rr(this,Pr,"f").call(this).eventFired=i;const r=async i=>{try{i.channelName===e&&(t(),await this.fin.InterApplicationBus.Channel.removeListener("connected",r))}catch(e){n(e)}};await this.fin.InterApplicationBus.Channel.on("connected",r)})),Sr(this,Ar,t,"f")}get identity(){return Rr(this,Ar,"f")}async ready(){this.wire.sendAction("snapshot-source-ready").catch((e=>{}));try{await Rr(this,Mr,"f").call(this)}catch(e){await Rr(this,Pr,"f").call(this).eventFired}}async getSnapshot(){this.wire.sendAction("snapshot-source-get-snapshot").catch((e=>{}));const e=await Rr(this,Mr,"f").call(this),t=await e.dispatch("get-snapshot");return(await t).snapshot}async applySnapshot(e){this.wire.sendAction("snapshot-source-apply-snapshot").catch((e=>{}));return(await Rr(this,Mr,"f").call(this)).dispatch("apply-snapshot",{snapshot:e})}}Er.SnapshotSource=Lr,Ar=new WeakMap,Pr=new WeakMap,Mr=new WeakMap,_r=new WeakMap,Or=new WeakMap,Object.defineProperty(Ir,"__esModule",{value:!0}),Ir.SnapshotSourceModule=void 0;const Tr=d,$r=Er,Br=xr;class Gr extends Tr.Base{async init(e){if(this.wire.sendAction("snapshot-source-init").catch((e=>{})),"object"!=typeof e||"function"!=typeof e.getSnapshot||"function"!=typeof e.applySnapshot)throw new Error("you must pass in a valid SnapshotProvider");const t=await this.fin.InterApplicationBus.Channel.create((0,Br.getSnapshotSourceChannelName)(this.fin.me));t.register("get-snapshot",(async()=>({snapshot:await e.getSnapshot()}))),t.register("apply-snapshot",(({snapshot:t})=>e.applySnapshot(t)))}wrapSync(e){return this.wire.sendAction("snapshot-source-wrap-sync").catch((e=>{})),new $r.SnapshotSource(this.wire,e)}async wrap(e){return this.wire.sendAction("snapshot-source-wrap").catch((e=>{})),this.wrapSync(e)}}Ir.SnapshotSourceModule=Gr,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Ir,e),n(Er,e)}(br),Object.defineProperty(a,"__esModule",{value:!0});var Wr=a.Fin=void 0;const Hr=t,Nr=c,Dr=ie(),Ur=Z(),Vr=de,zr=en,Kr=rn,qr=un,Jr=bn,Yr=J(),Zr=An,Qr=ki,Xr=Cr(),eo=br;class to extends Hr.EventEmitter{constructor(e){super(),this.wire=e,this.System=new Nr.System(e),this.Window=new Dr._WindowModule(e),this.Application=new Ur.ApplicationModule(e),this.InterApplicationBus=new Vr.InterApplicationBus(e),this.Clipboard=new zr.Clipboard(e),this.ExternalApplication=new Kr.ExternalApplicationModule(e),this.Frame=new qr._FrameModule(e),this.GlobalHotkey=new Jr.GlobalHotkey(e),this.Platform=new Zr.PlatformModule(e,this.InterApplicationBus.Channel),this.View=new Yr.ViewModule(e),this.Interop=new Xr.InteropModule(e),this.SnapshotSource=new eo.SnapshotSourceModule(e),e.registerFin(this),this.me=(0,Qr.getMe)(e),e.on("disconnected",(()=>{this.emit("disconnected")}))}}Wr=a.Fin=to;var no={},io={};function ro(e){return"string"==typeof e.manifestUrl}function oo(e){return ao(e)&&"string"==typeof e.address}function so(e){return oo(e)&&"string"==typeof e.token}function ao(e){return"string"==typeof e.uuid}function co(e){return e.runtime&&"string"==typeof e.runtime.version}function ho(e){return ao(e)&&co(e)}Object.defineProperty(io,"__esModule",{value:!0}),io.isInternalConnectConfig=io.isPortDiscoveryConfig=io.isNewConnectConfig=io.isConfigWithReceiver=io.isRemoteConfig=io.isExistingConnectConfig=io.isExternalConfig=void 0,io.isExternalConfig=ro,io.isExistingConnectConfig=oo,io.isRemoteConfig=so,io.isConfigWithReceiver=function(e){return"object"==typeof e.receiver&&so({...e,address:""})},io.isNewConnectConfig=ho,io.isPortDiscoveryConfig=function(e){return ro(e)&&co(e)||ho(e)},io.isInternalConnectConfig=function(e){return oo(e)||ho(e)};var lo={},uo={};Object.defineProperty(uo,"__esModule",{value:!0}),uo.EmitterMap=void 0;const po=t;function wo(e){return Buffer.from(e).toString("base64")}uo.EmitterMap=class{constructor(){this.storage=new Map}hashKeys(e){return e.map(wo).join("/")}getOrCreate(e){const t=this.hashKeys(e);return this.storage.has(t)||this.storage.set(t,new po.EventEmitter),this.storage.get(t)}has(e){return this.storage.has(this.hashKeys(e))}delete(e){const t=this.hashKeys(e);return this.storage.delete(t)}},Object.defineProperty(lo,"__esModule",{value:!0});const yo=uo;class fo extends yo.EmitterMap{constructor(){super(...arguments),this.dispatchEvent=e=>{if(function(e){return"process-desktop-event"===e.action}(e)){const{payload:t}=e,n=function(e){const{topic:t}=e;if("frame"===t||"window"===t||"view"===t){const{uuid:n,name:i}=e;return[t,n,i]}if("application"===t){const{uuid:n}=e;return[t,n]}return[t]}(t);if(this.has(n))return this.getOrCreate(n).emit(t.type,t),!0}return!1}}}lo.default=fo;var go,mo,vo=s&&s.__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},Co=s&&s.__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)},bo=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(no,"__esModule",{value:!0});var Io=no.Transport=void 0;const Eo=t,xo=io,Ao=g,Po=bo(lo),Mo=ki,_o=ke;class Oo extends Eo.EventEmitter{constructor(e,t,n){super(),this.wireListeners=new Map,this.topicRefMap=new Map,this.eventAggregator=new Po.default,this.messageHandlers=[this.eventAggregator.dispatchEvent],go.set(this,void 0),mo.set(this,void 0),this.connectSync=()=>{Co(this,go,"f").connectSync()},this.getPort=()=>Co(this,go,"f").getPort(),vo(this,go,new e(this.onmessage.bind(this)),"f"),this.environment=t,this.sendRaw=Co(this,go,"f").send.bind(Co(this,go,"f")),this.registerMessageHandler(this.handleMessage.bind(this)),Co(this,go,"f").on("disconnected",(()=>{for(const[,{handleNack:e}]of this.wireListeners)e({reason:"Remote connection has closed"});this.wireListeners.clear(),this.emit("disconnected")}));const{uuid:i,name:r}=n,o=this.environment.getCurrentEntityType();this.me=(0,Mo.getBaseMe)(o,i,r)}getFin(){if(!Co(this,mo,"f"))throw new Error("No Fin object registered for this transport");return Co(this,mo,"f")}registerFin(e){if(Co(this,mo,"f"))throw new Error("Fin object has already been registered for this transport");vo(this,mo,e,"f")}shutdown(){return Co(this,go,"f").shutdown()}async connect(e){if((0,xo.isConfigWithReceiver)(e))return await Co(this,go,"f").connect(e.receiver),this.authorize(e);if((0,xo.isRemoteConfig)(e))return this.connectRemote(e);if((0,xo.isExistingConnectConfig)(e))return this.connectByPort(e);if((0,xo.isNewConnectConfig)(e)){const t=await this.environment.retrievePort(e);return this.connectByPort({...e,address:`ws://localhost:${t}`})}}async connectRemote(e){return await Co(this,go,"f").connect(new(this.environment.getWsConstructor())(e.address)),this.authorize(e)}async connectByPort(e){const{address:t,uuid:n}=e,i={...e,type:"file-token"},r=Co(this,go,"f");await r.connect(new(this.environment.getWsConstructor())(e.address));const o=await this.sendAction("request-external-authorization",{uuid:n,type:"file-token"},!0);if("external-authorization-response"!==o.action)throw new Ao.UnexpectedActionError(o.action);return await this.environment.writeToken(o.payload.file,o.payload.token),this.authorize(i)}async authorize(e){const t=await this.sendAction("request-authorization",e,!0);if("authorization-response"!==t.action)throw new Ao.UnexpectedActionError(t.action);if(!0!==t.payload.success)throw new Ao.RuntimeError(t.payload)}sendAction(e,t={},n=!1){let i=()=>{};const r=Ao.RuntimeError.getCallSite(1),o=this.environment.getNextMessageId(),s=new Promise(((s,a)=>{i=a;const c={action:e,payload:t,messageId:o},d=Co(this,go,"f");return this.addWireListener(o,s,(e=>this.nackHandler(e,a,r)),n),d.send(c).catch(a)}));return Object.assign(s,{cancel:i,messageId:o})}nackHandler(e,t,n){t("string"==typeof e?e:new Ao.RuntimeError(e,n))}ferryAction(e){return new Promise(((t,n)=>{const i=this.environment.getNextMessageId();e.messageId=i;const r=e=>{t(e.payload)};return Co(this,go,"f").send(e).then((()=>this.addWireListener(i,r,(e=>this.nackHandler(e,n)),!1))).catch(n)}))}registerMessageHandler(e){this.messageHandlers.push(e)}addWireListener(e,t,n,i){i?this.uncorrelatedListener=t:this.wireListeners.has(e)?n({reason:"Duplicate handler id",error:(0,_o.errorToPOJO)(new Ao.DuplicateCorrelationError(String(e)))}):this.wireListeners.set(e,{resolve:t,handleNack:n})}onmessage(e){for(const t of this.messageHandlers)t.call(null,e)}handleMessage(e){const t=e.correlationId||NaN;if("correlationId"in e){if(!this.wireListeners.has(t))return!1;{const{resolve:n,handleNack:i}=this.wireListeners.get(t);"ack"!==e.action?i({reason:"Did not receive ack action",error:(0,_o.errorToPOJO)(new Ao.NoAckError(e.action))}):"payload"in e?e.payload.success?n.call(null,e):i(e.payload):"string"==typeof e.reason?i(e):(console.warn("Received invalid response from core",e),i({reason:"invalid response shape"})),this.wireListeners.delete(t)}}else this.uncorrelatedListener&&this.uncorrelatedListener.call(null,e),this.uncorrelatedListener=()=>{};return!0}}Io=no.Transport=Oo,go=new WeakMap,mo=new WeakMap;const So=(...e)=>({log:(...t)=>console.debug(`[${(new Date).toISOString()}]`,...(e=>e.map((e=>`[${e}]`)))(e),...t),getLogger:(...t)=>So(...e,...t)}),Ro=So("@openfin/core-web/client");function Fo(e,t){if(!function(e){return"string"==typeof e}(e))throw new Error(`Property ${t} has invalid type. Expected string, got ${typeof e}.`)}const jo="web-broker-ports-ready",ko=Ro.getLogger("get-web-interop-ports");function Lo(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)}function To(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}"function"==typeof SuppressedError&&SuppressedError;const $o=e=>{var n,i,r;return r=class extends t.EventEmitter{constructor(t){super(),n.set(this,void 0),i.set(this,!1),this.connectSync=()=>{Lo(this,i,"f")||(e.addEventListener("message",(e=>{e.data?.topic?.startsWith("wire-message")&&e.data.message&&Lo(this,n,"f").call(this,{...JSON.parse(e.data.message),ports:e.ports})})),e.start())},this.connect=async()=>{this.connectSync()},this.send=t=>(e.postMessage({topic:"wire-message",message:JSON.stringify(t)}),Promise.resolve()),this.shutdown=async()=>{e.close()},To(this,n,t,"f")}getPort(){return e}},n=new WeakMap,i=new WeakMap,r};var Bo={},Go={};Object.defineProperty(Go,"__esModule",{value:!0}),Go.BaseEnvironment=void 0;const Wo=vr();Go.BaseEnvironment=class{async getViewWindowIdentity(e,t){const{identity:n}=await e.View.wrapSync(t).getCurrentWindow();return n}async getInteropInfo(e){const t=await e.Application.getCurrentSync().getInfo().catch((()=>null)),n=t?.initialOptions?.interopBrokerConfiguration??{};return{fdc3Version:t?(0,Wo.getDefaultViewFdc3VersionFromAppInfo)(t):void 0,...n,fdc3Info:{providerVersion:await e.System.getVersion(),provider:"OpenFin"}}}},Object.defineProperty(Bo,"__esModule",{value:!0});var Ho=Bo.BrowserEnvironment=void 0;const No=Go;class Do extends No.BaseEnvironment{constructor(){super(...arguments),this.type="other",this.getRandomId=()=>{const e=new Uint32Array(1);return window.crypto.getRandomValues(e)[0].toString(32)}}getAdapterVersionSync(){return""}observeBounds(e,t){throw new Error("Method not implemented.")}layoutAllowedInContext(e){return!1}initLayoutManager(e,t,n){throw new Error("Method not implemented.")}applyLayoutSnapshot(e,t,n){throw new Error("Method not implemented.")}createLayout(e,t){throw new Error("Method not implemented.")}destroyLayout(e,t){throw new Error("Method not implemented.")}resolveLayout(e,t){throw new Error("Method not implemented.")}initPlatform(...e){throw new Error("Method not implemented.")}writeToken(e,t){return Promise.resolve("")}retrievePort(e){throw new Error("Method not implemented.")}getNextMessageId(){return this.getRandomId()}createChildContent(e){throw new Error("Method not implemented.")}getWebWindow(e){throw new Error("Method not implemented.")}getCurrentEntityIdentity(){throw new Error("Method not implemented.")}getCurrentEntityType(){return"external connection"}raiseEvent(e,t){throw new Error("Method not implemented.")}getUrl(){return location.href}getDefaultChannelOptions(){return{create:{},connect:{}}}getRtcPeer(){return new RTCPeerConnection}getWsConstructor(){return WebSocket}whenReady(){return Promise.resolve()}}Ho=Bo.BrowserEnvironment=Do;const Uo=e=>"platform"in e&&void 0!==e.platform;var Vo,zo;class Ko extends Ho{constructor(e){super(),this.connectConfig=e,Vo.set(this,void 0),zo.set(this,new W((async()=>Promise.resolve().then((function(){return __webpack_require__(/*! ./main-b14f67c9.js */ "./node_modules/@openfin/core-web/out/main-b14f67c9.js")}))))),Uo(e)&&this.validatePlatformOptions(e)}getAdapterVersionSync(){return"0.39.21"}validatePlatformOptions({platform:e}){if(!("layoutSnapshot"in e))throw new Error("Platform options are missing layoutSnapshot. Please provide a layoutSnapshot in the platform options.");if("windows"in e||"windows"in e.layoutSnapshot)throw new Error("It appears you tried to call connect() with a snapshot object from an OpenFin desktop environment. Note that connect() expects to be called with a platform property with this structure: { platform: { layoutSnapshot } }. To get a layoutSnapshot of the expected structure, use fin.Platform.Layout.getCurrentLayoutManagerSync().getLayoutSnapshot() in v34+ in your desktop environment.");const{layouts:t}=e.layoutSnapshot;Object.entries(t).map((([e,t])=>{if("object"!=typeof t||null===t)throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must be an object.`);if(!("content"in t))throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must contain a 'content' property.`)}))}async getInteropInfo(e){return{...{contextGroups:void 0,logging:{beforeAction:{enabled:!1},afterAction:{enabled:!1}}},fdc3Version:void 0,fdc3Info:{providerVersion:"0.39.21",provider:"OpenFin Web"}}}layoutAllowedInContext(e){return!0}async initLayoutManager(e,t,n){if(Lo(this,Vo,"f"))throw new Error("Layout already initialized.");if(!Uo(this.connectConfig))throw new Error("Platform options are missing from connection config.");const{WebLayoutEntryPoint:i}=await Lo(this,zo,"f").getValue();return To(this,Vo,new i(this.connectConfig),"f"),await Lo(this,Vo,"f").initLayoutManager(e,t,n)}async applyLayoutSnapshot(e,t,n){Lo(this,Vo,"f")?.applyLayoutSnapshot(e,t,n)}async createLayout(e,t){return Lo(this,Vo,"f")?.createLayout(e,t)}async destroyLayout(e,t){return Lo(this,Vo,"f")?.destroyLayout(e,t)}async getViewWindowIdentity(e,t){return Promise.resolve({uuid:t.uuid,name:t.uuid})}}Vo=new WeakMap,zo=new WeakMap;const qo=()=>{const e=((e,t)=>{const n=new RegExp(`^${t}<(?.*)>$`).exec(e)?.groups?.meta;if(n)try{return JSON.parse(atob(n))}catch(e){throw new Error(`Failed to decode JSON from ${n}.`)}})(window.name,"of-frame");if(e)try{const{name:t,uuid:n,brokerUrl:i,providerId:r,contextGroup:o}=e;return Fo(i,"brokerUrl"),Fo(n,"uuid"),Fo(t,"name"),{identity:{name:t,uuid:n},brokerUrl:i,interopConfig:{providerId:r,currentContextGroup:o}}}catch(e){throw new Error(`Unexpected error occurred when inferring platform information: ${e.stack}`)}},Jo=()=>{const e=r.v4();return{uuid:e,name:e}},Yo=async e=>{if("enabled"===e.connectionInheritance){const t=await(async e=>{const t=qo();if(t){const{validateOptions:n=(()=>!0)}=e,{identity:i,...r}=t;if(!await n(r))throw new Error("Parent options were rejected by validateOptions.");return t}})(e);if(t)return t}if(!e.options){const t="enabled"===e.connectionInheritance?"Broker URL was not specified nor provided by a platform container.":"Connection inheritance is disabled but no options were provided.";throw new Error(t)}return{...e.options,identity:Jo()}};exports.__classPrivateFieldGet=Lo,exports.__classPrivateFieldSet=To,exports.apiExposer=Gn,exports.commonjsGlobal=s,exports.connect=async t=>{try{Ro.log("Establishing connection",t);const{brokerUrl:n,identity:i,timeout:r,interopConfig:s}=await Yo(t),{workerPort:a,iframeBrokerPort:c}=await(async(e,t,n)=>{const{origin:i}=new URL(e),r=document.createElement("IFRAME");let s;r.style.display="none";try{return await new Promise(((a,c)=>{const d=e=>{if(e.source===r.contentWindow&&e.data?.topic===`ack-${jo}`){if(e.origin!==i)c(new Error(`Broker redirected to unexpected origin ${e.origin}, expected ${i}.`));else if(e.data.success){const[t,n]=e.ports;a({iframeBrokerPort:t,workerPort:n})}else c(new m(e.data));window.removeEventListener("message",d),clearTimeout(s)}};window.addEventListener("message",d),ko.log(`Connecting to broker ${e}`),r.setAttribute("src",e),r.setAttribute("name",o(t,"of-broker")),document.body.appendChild(r),ko.log("Iframe loaded, awaiting init message from iframe"),n&&(s=setTimeout((()=>{window.removeEventListener("message",d),document.body.removeChild(r),c(new Error("Worker did not initialize in time"))}),n))}))}catch(e){throw new Error(`Failed to initialise Fin Web Client. ${e.message}`,{cause:e})}})(n,i,r);Ro.log("Successfully established connection to shared worker");const d={entityType:"external connection",...i};a.start(),c.start();const h=((t,n,i)=>{const r=$o(n),o=new Ko(t),s=new Io(r,o,i);return s.connectSync(),window.Buffer=e.Buffer,new Wr(s)})(t,a,d);return s?.providerId&&(h.me.interop=h.Interop.connectSync(s.providerId),s?.currentContextGroup&&h.me.interop.joinContextGroup(s.currentContextGroup).catch((e=>{console.warn(`Error joining specified context group: ${s?.currentContextGroup}, continuing`,e)}))),{...h,me:{...h.me,identity:{uuid:h.me.uuid,name:h.me.name}}}}catch(e){throw new Error(`An error occured during web-interop connection: ${e.message}`)}},exports.decorators=Nn,exports.encodeOptions=o,exports.layout_constants=ai,exports.lazy=G; +var e=__webpack_require__(/*! buffer/ */ "../../node_modules/buffer/index.js"),t=__webpack_require__(/*! events */ "../../node_modules/events/events.js"),n=__webpack_require__(/*! lodash/cloneDeep */ "../../node_modules/lodash/cloneDeep.js"),i=__webpack_require__(/*! lodash/isEqual */ "../../node_modules/lodash/isEqual.js"),r=__webpack_require__(/*! uuid */ "../../node_modules/uuid/dist/esm-browser/index.js");const o=(e,t)=>`${t}<${btoa(JSON.stringify(e))}>`;var s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof __webpack_require__.g?__webpack_require__.g:"undefined"!=typeof self?self:{},a={},c={},d={},h={};async function l(e){const t=[];for(const n of e){const e=await n();t.push(e)}return t}Object.defineProperty(h,"__esModule",{value:!0}),h.promiseMapSerial=h.serial=h.promiseMap=h.promisify=void 0,h.promisify=function(e){return(...t)=>new Promise(((n,i)=>{e(...t,((e,t)=>e?i(e):n(t)))}))},h.promiseMap=async function(e,t){return Promise.all(e.map(t))},h.serial=l,h.promiseMapSerial=async function(e,t){return l(e.map(((e,n,i)=>()=>t(e,n,i))))};var u,p=s&&s.__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},w=s&&s.__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)};Object.defineProperty(d,"__esModule",{value:!0}),d.Reply=d.EmitterBase=d.Base=void 0;const y=h;class f{constructor(e){this.isNodeEnvironment=()=>"node"===this.wire.environment.type,this.isOpenFinEnvironment=()=>"openfin"===this.wire.environment.type,this.isBrowserEnvironment=()=>"other"===this.wire.environment.type,this.wire=e}get fin(){return this.wire.getFin()}get me(){return this.wire.me}}d.Base=f;d.EmitterBase=class extends f{constructor(e,t,...n){super(e),this.topic=t,u.set(this,void 0),this.eventNames=()=>this.hasEmitter()?this.getOrCreateEmitter().eventNames():[],this.emit=(e,t,...n)=>!!this.hasEmitter()&&this.getOrCreateEmitter().emit(e,t,...n),this.hasEmitter=()=>this.wire.eventAggregator.has(w(this,u,"f")),this.getOrCreateEmitter=()=>this.wire.eventAggregator.getOrCreate(w(this,u,"f")),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[],this.listenerCount=e=>this.hasEmitter()?this.getOrCreateEmitter().listenerCount(e):0,this.registerEventListener=async(e,t={},n,i)=>{const r={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e},o=this.getOrCreateEmitter();n(o);try{await this.wire.sendAction("subscribe-to-desktop-event",r)}catch(e){throw i(o),this.deleteEmitterIfNothingRegistered(o),e}},this.deregisterEventListener=async(e,t={})=>{if(this.hasEmitter()){const n={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e};await this.wire.sendAction("unsubscribe-to-desktop-event",n).catch((()=>null));return this.getOrCreateEmitter()}return Promise.resolve()},p(this,u,[t,...n],"f"),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[]}async on(e,t,n){return await this.registerEventListener(e,n,(n=>{n.on(e,t)}),(n=>{n.removeListener(e,t)})),this}async addListener(e,t,n){return this.on(e,t,n)}async once(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.once(e,i),n.once(e,t)}),(n=>{n.removeListener(e,i),n.removeListener(e,t)})),this}async prependListener(e,t,n){return await this.registerEventListener(e,n,(n=>{n.prependListener(e,t)}),(n=>{n.removeListener(e,t)})),this}async prependOnceListener(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.prependOnceListener(e,t),n.once(e,i)}),(n=>{n.removeListener(e,t),n.removeListener(e,i)})),this}async removeListener(e,t,n){const i=await this.deregisterEventListener(e,n);return i&&(i.removeListener(e,t),this.deleteEmitterIfNothingRegistered(i)),this}async deregisterAllListeners(e){const t={...this.identity,type:e,topic:this.topic};if(this.hasEmitter()){const e=this.getOrCreateEmitter(),n=e.listenerCount(t.type),i=[];for(let e=0;enull)));return await Promise.all(i),e}}async removeAllListeners(e){const t=async e=>{const t=await this.deregisterAllListeners(e);t&&(t.removeAllListeners(e),this.deleteEmitterIfNothingRegistered(t))};if(e)await t(e);else if(this.hasEmitter()){const e=this.getOrCreateEmitter().eventNames();await(0,y.promiseMap)(e,t)}return this}deleteEmitterIfNothingRegistered(e){0===e.eventNames().length&&this.wire.eventAggregator.delete(w(this,u,"f"))}},u=new WeakMap;d.Reply=class{};var g={};Object.defineProperty(g,"__esModule",{value:!0});var m=g.RuntimeError=g.NotSupportedError=g.NotImplementedError=g.NoAckError=g.DuplicateCorrelationError=g.UnexpectedActionError=g.DisconnectedError=void 0;class v extends Error{constructor(e){super(`Expected websocket state OPEN but found ${e}`),this.readyState=e}}g.DisconnectedError=v;class C extends Error{}g.UnexpectedActionError=C;class b extends Error{}g.DuplicateCorrelationError=b;class I extends Error{}g.NoAckError=I;class E extends Error{}g.NotImplementedError=E;class x extends Error{}g.NotSupportedError=x;class A extends Error{constructor(e){const{message:t,name:n,stack:i,...r}=e;super(t),this.name=n||"Error",this.stack=i??this.toString(),Object.keys(r).forEach((e=>{this[e]=r[e]}))}}class P extends Error{static getCallSite(e=0){const t=Error.stackTraceLimit,n=e+1;Error.stackTraceLimit=t+n;const i=Error.prepareStackTrace;Error.prepareStackTrace=(e,t)=>t;const r=(new Error).stack?.slice(n)??[];return Error.prepareStackTrace=i,Error.stackTraceLimit=t,r}static prepareStackTrace(e,t){if("function"==typeof Error.prepareStackTrace)return Error.prepareStackTrace(e,t);let n="";n+=e.name||"Error",n+=`: ${e.message||""}`;for(const e of t)n+=`\n at ${e.toString()}`;return n}constructor(e,t){const{reason:n,error:i}=e;super(n),this.name="RuntimeError",i?.stack&&(this.cause=new A(i)),t&&(this.stack=P.prepareStackTrace(this,t))}}m=g.RuntimeError=P;var M={},_={},O={};Object.defineProperty(O,"__esModule",{value:!0}),O.validateIdentity=void 0,O.validateIdentity=function(e){let t;return"object"==typeof e&&"string"==typeof e.uuid||(t="Not a valid identity object"),t};var S={},R={},F={},j={},k={},L={},T={};Object.defineProperty(T,"__esModule",{value:!0}),T.handleDeprecatedWarnings=void 0;var $;T.handleDeprecatedWarnings=e=>{(e.contentNavigation?.whitelist||e.contentNavigation?.blacklist||e.contentRedirect?.whitelist||e.contentRedirect?.blacklist)&&console.warn("The properties 'whitelist' and 'blacklist' have been marked as deprecated and will be removed in a future version. Please use 'allowlist' and 'denylist'.")};var B={},G={};Object.defineProperty(G,"__esModule",{value:!0}),G.AsyncRetryableLazy=W=G.Lazy=void 0;var W=G.Lazy=class{constructor(e){this.producerFn=e}getValue(){return this.value||(this.value=this.producerFn()),this.value}};G.AsyncRetryableLazy=class{constructor(e){this.producerFn=e}async getValue(){return this.promise||(this.promise=this.producerFn().catch((e=>{throw delete this.promise,e}))),this.promise}};var H={};Object.defineProperty(H,"__esModule",{value:!0}),H.WebContents=void 0;const N=d;class D extends N.EmitterBase{constructor(e,t,n){super(e,n,t.uuid,t.name),this.identity=t,this.entityType=n}capturePage(e){return this.wire.sendAction("capture-page",{options:e,...this.identity}).then((({payload:e})=>e.data))}executeJavaScript(e){return this.wire.sendAction("execute-javascript-in-window",{...this.identity,code:e}).then((({payload:e})=>e.data))}getZoomLevel(){return this.wire.sendAction("get-zoom-level",this.identity).then((({payload:e})=>e.data))}setZoomLevel(e){return this.wire.sendAction("set-zoom-level",{...this.identity,level:e}).then((()=>{}))}navigate(e){return this.wire.sendAction("navigate-window",{...this.identity,url:e}).then((()=>{}))}navigateBack(){return this.wire.sendAction("navigate-window-back",{...this.identity}).then((()=>{}))}async navigateForward(){await this.wire.sendAction("navigate-window-forward",{...this.identity})}stopNavigation(){return this.wire.sendAction("stop-window-navigation",{...this.identity}).then((()=>{}))}reload(e=!1){return this.wire.sendAction("reload-window",{ignoreCache:e,...this.identity}).then((()=>{}))}print(e={}){return this.wire.sendAction("print",{...this.identity,options:e}).then((()=>{}))}findInPage(e,t){return this.wire.sendAction("find-in-page",{...this.identity,searchTerm:e,options:t}).then((({payload:e})=>e.data))}stopFindInPage(e){return this.wire.sendAction("stop-find-in-page",{...this.identity,action:e}).then((()=>{}))}getPrinters(){return this.wire.sendAction("get-printers",{...this.identity}).then((({payload:e})=>e.data))}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){await this.wire.sendAction("focus-window",{emitSynthFocused:e,...this.identity})}async showDeveloperTools(){await this.wire.sendAction("show-developer-tools",this.identity)}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction("get-process-info",this.identity);return e}async getSharedWorkers(){return this.wire.sendAction("get-shared-workers",this.identity).then((({payload:e})=>e.data))}async inspectSharedWorker(){await this.wire.sendAction("inspect-shared-worker",{...this.identity})}async inspectSharedWorkerById(e){await this.wire.sendAction("inspect-shared-worker-by-id",{...this.identity,workerId:e})}async inspectServiceWorker(){await this.wire.sendAction("inspect-service-worker",{...this.identity})}async showPopupWindow(e){if(this.wire.sendAction(`${this.entityType}-show-popup-window`,this.identity).catch((()=>{})),e?.onPopupReady){const t=async({popupName:t})=>{try{const n=this.fin.Window.wrapSync({uuid:this.fin.me.uuid,name:t});await e.onPopupReady(n)}catch(e){throw new Error(`Something went wrong during onPopupReady execution: ${e}`)}};await this.once("popup-ready",t)}const{payload:t}=await this.wire.sendAction("try-create-popup-window",{options:{...e,hasResultCallback:!!e?.onPopupResult,hasReadyCallback:!!e?.onPopupReady},...this.identity}),{data:{willOpen:n,options:i}}=t;n&&await this.fin.Window.create(i.initialOptions);if(e?.onPopupResult){const t=async t=>{await e.onPopupResult((e=>{const{name:t,uuid:n,result:i,data:r}=e,o={identity:{name:t,uuid:n},result:i};return r&&(o.data=r),o})(t))},n=async()=>{await this.removeListener("popup-result",t)};await this.on("popup-result",t),await this.once("popup-teardown",n)}const{payload:r}=await this.wire.sendAction("show-popup-window",{options:i,...this.identity});return r.data}}var U,V,z,K,q;function J(){return V||(V=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(function(){if($)return L;$=1,Object.defineProperty(L,"__esModule",{value:!0}),L.ViewModule=void 0;const e=d,t=O,n=J(),i=T;class r extends e.Base{async create(e){const{uuid:t}=this.wire.me;if(!e.name||"string"!=typeof e.name)throw new Error("Please provide a name property as a string in order to create a View.");return(0,i.handleDeprecatedWarnings)(e),this.wire.environment.childViews?await this.wire.environment.createChildContent({entityType:"view",options:{...e,uuid:t}}):await this.wire.sendAction("create-view",{...e,uuid:t}),this.wrapSync({uuid:t,name:e.name})}async wrap(e){this.wire.sendAction("view-wrap").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}wrapSync(e){this.wire.sendAction("view-wrap-sync").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}getCurrent(){if(this.wire.sendAction("view-get-current").catch((e=>{})),!this.wire.me.isView)throw new Error("You are not in a View context");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction("view-get-current-sync").catch((e=>{})),!this.wire.me.isView)throw new Error("You are not in a View context");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return L.ViewModule=r,L}(),e),n(function(){if(U)return B;var e;U=1,Object.defineProperty(B,"__esModule",{value:!0}),B.View=void 0;const t=g,n=G,i=H,r=ie();class o extends i.WebContents{constructor(i,o){super(i,o,"view"),this.identity=o,e.set(this,new n.Lazy((()=>this.fin.Platform.wrapSync(this.identity).getClient()))),this.attach=async e=>{await this.wire.sendAction("attach-view",{target:e,...this.identity})},this.destroy=async()=>{await this.wire.sendAction("destroy-view",{...this.identity})},this.show=async()=>{await this.wire.sendAction("show-view",{...this.identity})},this.showAt=async(e,t={})=>{await this.wire.sendAction("show-view-at",{bounds:e,...this.identity,options:t})},this.bringToFront=async()=>{await this.wire.sendAction("bring-view-to-front",{...this.identity})},this.hide=async()=>{await this.wire.sendAction("hide-view",{...this.identity})},this.setBounds=async e=>{await this.wire.sendAction("set-view-bounds",{bounds:e,...this.identity})},this.getBounds=async()=>(await this.wire.sendAction("get-view-bounds",{...this.identity})).payload.data,this.getInfo=async()=>(await this.wire.sendAction("get-view-info",{...this.identity})).payload.data,this.getParentLayout=async()=>(this.wire.sendAction("view-get-parent-layout",{...this.identity}).catch((()=>{})),this.fin.Platform.Layout.getLayoutByViewIdentity(this.identity)),this.getOptions=async()=>this.wire.sendAction("get-view-options",{...this.identity}).then((({payload:e})=>e.data)),this.updateOptions=async e=>this.wire.sendAction("update-view-options",{options:e,...this.identity}).then((()=>{})),this.getCurrentWindow=async()=>{const{payload:{data:e}}=await this.wire.sendAction("get-view-window",{...this.identity});return new r._Window(this.wire,e)},this.getCurrentStack=async()=>{this.wire.sendAction("view-get-current-stack").catch((()=>{}));try{return(await this.getParentLayout()).getStackByViewIdentity(this.identity)}catch(e){throw new t.RuntimeError({reason:"This view does not belong to a stack.",error:e})}},this.triggerBeforeUnload=async()=>(await this.wire.sendAction("trigger-before-unload",{...this.identity})).payload.data,this.bindToElement=async e=>{if(!e)throw new Error("Element not found.");return this.wire.environment.observeBounds(e,(async e=>this.setBounds(e)))}}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){const t=await this.getCurrentWindow();await t.focusedWebViewWasChanged(),await super.focus({emitSynthFocused:e})}}return B.View=o,e=new WeakMap,B}(),e)}(k)),k}function Y(){if(z)return j;z=1,Object.defineProperty(j,"__esModule",{value:!0}),j.Application=void 0;const e=d,t=ie(),n=J();class i extends e.EmitterBase{constructor(e,n){super(e,"application",n.uuid),this.identity=n,this.window=new t._Window(this.wire,{uuid:this.identity.uuid,name:this.identity.uuid})}windowListFromIdentityList(e){const n=[];return e.forEach((e=>{n.push(new t._Window(this.wire,{uuid:e.uuid,name:e.name}))})),n}isRunning(){return this.wire.sendAction("is-application-running",this.identity).then((({payload:e})=>e.data))}async quit(e=!1){try{await this._close(e),await this.wire.sendAction("destroy-application",{force:e,...this.identity})}catch(e){if(!["Remote connection has closed","Could not locate the requested application"].some((t=>e.message.includes(t))))throw e}}async _close(e=!1){try{await this.wire.sendAction("close-application",{force:e,...this.identity})}catch(e){if(!e.message.includes("Remote connection has closed"))throw e}}close(e=!1){return console.warn("Deprecation Warning: Application.close is deprecated Please use Application.quit"),this.wire.sendAction("application-close",this.identity).catch((e=>{})),this._close(e)}getChildWindows(){return this.wire.sendAction("get-child-windows",this.identity).then((({payload:e})=>{const t=[];return e.data.forEach((e=>{t.push({uuid:this.identity.uuid,name:e})})),this.windowListFromIdentityList(t)}))}getManifest(){return this.wire.sendAction("get-application-manifest",this.identity).then((({payload:e})=>e.data))}getParentUuid(){return this.wire.sendAction("get-parent-application",this.identity).then((({payload:e})=>e.data))}getShortcuts(){return this.wire.sendAction("get-shortcuts",this.identity).then((({payload:e})=>e.data))}async getViews(){const{payload:e}=await this.wire.sendAction("application-get-views",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}getZoomLevel(){return this.wire.sendAction("get-application-zoom-level",this.identity).then((({payload:e})=>e.data))}getWindow(){return this.wire.sendAction("application-get-window",this.identity).catch((e=>{})),Promise.resolve(this.window)}registerUser(e,t){return this.wire.sendAction("register-user",{userName:e,appName:t,...this.identity}).then((()=>{}))}removeTrayIcon(){return this.wire.sendAction("remove-tray-icon",this.identity).then((()=>{}))}restart(){return this.wire.sendAction("restart-application",this.identity).then((()=>{}))}run(){return console.warn("Deprecation Warning: Application.run is deprecated Please use fin.Application.start"),this.wire.sendAction("application-run",this.identity).catch((e=>{})),this._run()}_run(e={}){return this.wire.sendAction("run-application",{manifestUrl:this._manifestUrl,opts:e,...this.identity}).then((()=>{}))}scheduleRestart(){return this.wire.sendAction("relaunch-on-close",this.identity).then((()=>{}))}async sendApplicationLog(){const{payload:e}=await this.wire.sendAction("send-application-log",this.identity);return e.data}async setJumpList(e){await this.wire.sendAction("set-jump-list",{config:e,...this.identity})}setTrayIcon(e){return this.wire.sendAction("set-tray-icon",{enabledIcon:e,...this.identity}).then((()=>{}))}setShortcuts(e){return this.wire.sendAction("set-shortcuts",{data:e,...this.identity}).then((()=>{}))}async setShortcutQueryParams(e){await this.wire.sendAction("set-shortcut-query-args",{data:e,...this.identity})}setZoomLevel(e){return this.wire.sendAction("set-application-zoom-level",{level:e,...this.identity}).then((()=>{}))}async setAppLogUsername(e){await this.wire.sendAction("set-app-log-username",{data:e,...this.identity})}getTrayIconInfo(){return this.wire.sendAction("get-tray-icon-info",this.identity).then((({payload:e})=>e.data))}hasTrayIcon(){return this.wire.sendAction("has-tray-icon",this.identity).then((({payload:e})=>e.data))}terminate(){return this.wire.sendAction("terminate-application",this.identity).then((()=>{}))}wait(){return this.wire.sendAction("wait-for-hung-application",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction("get-info",this.identity).then((({payload:e})=>e.data))}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction("application-get-process-info",this.identity);return e}async setFileDownloadLocation(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t};await this.wire.sendAction("set-file-download-location",{...n,downloadLocation:e})}async getFileDownloadLocation(){const{payload:{data:e}}=await this.wire.sendAction("get-file-download-location",this.identity);return e}async showTrayIconPopupMenu(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t},{payload:i}=await this.wire.sendAction("show-tray-icon-popup-menu",{...n,options:e});return i.data}async closeTrayIconPopupMenu(){const{name:e}=this.wire.me,t={uuid:this.identity.uuid,name:e};await this.wire.sendAction("close-tray-icon-popup-menu",{...t})}}return j.Application=i,j}function Z(){return q||(q=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(function(){if(K)return F;K=1,Object.defineProperty(F,"__esModule",{value:!0}),F.ApplicationModule=void 0;const e=d,t=O,n=Y();class i extends e.Base{async wrap(e){this.wire.sendAction("wrap-application").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}wrapSync(e){this.wire.sendAction("wrap-application-sync").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}async _create(e){return void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&void 0===e.isPlatformController&&(e.autoShow=!0),await this.wire.sendAction("create-application",e),this.wrap({uuid:e.uuid})}create(e){return console.warn("Deprecation Warning: fin.Application.create is deprecated. Please use fin.Application.start"),this.wire.sendAction("application-create").catch((e=>{})),this._create(e)}async start(e){this.wire.sendAction("start-application").catch((e=>{}));const t=await this._create(e);return await this.wire.sendAction("run-application",{uuid:e.uuid}),t}async startManyManifests(e,t){return this.wire.sendAction("run-applications",{applications:e,opts:t}).then((()=>{}))}getCurrent(){return this.wire.sendAction("get-current-application").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction("get-current-application-sync").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}async startFromManifest(e,t){this.wire.sendAction("application-start-from-manifest").catch((e=>{}));const n=await this._createFromManifest(e);return await n._run(t),n}createFromManifest(e){return console.warn("Deprecation Warning: fin.Application.createFromManifest is deprecated. Please use fin.Application.startFromManifest"),this.wire.sendAction("application-create-from-manifest").catch((e=>{})),this._createFromManifest(e)}_createFromManifest(e){return this.wire.sendAction("get-application-manifest",{manifestUrl:e}).then((({payload:e})=>{const t=e.data.platform?e.data.platform.uuid:e.data.startup_app.uuid;return this.wrap({uuid:t})})).then((t=>(t._manifestUrl=e,t)))}}return F.ApplicationModule=i,F}(),e),n(Y(),e)}(R)),R}H.WebContents=D;var Q={};Object.defineProperty(Q,"__esModule",{value:!0}),Q.promisifySubscription=void 0;var X,ee,te;function ne(){if(X)return S;X=1,Object.defineProperty(S,"__esModule",{value:!0}),S._Window=void 0;const e=Z(),t=H,n=J(),i=T,r=Q;class o extends t.WebContents{constructor(e,t){super(e,t,"window")}async createWindow(e){this.wire.sendAction("window-create-window",this.identity).catch((e=>{}));const t=await(0,r.promisifySubscription)(this,"fire-constructor-callback");void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&(e.autoShow=!0),(0,i.handleDeprecatedWarnings)(e);const n=this.wire.environment.createChildContent({entityType:"window",options:e}),[o]=await Promise.all([t.getValue(),n]);let s;const{success:a}=o,c=o.data,{message:d}=c;s=a?{httpResponseCode:c.httpResponseCode,apiInjected:c.apiInjected}:{message:c.message,networkErrorCode:c.networkErrorCode,stack:c.stack};const h={message:d,cbPayload:s,success:a};try{this.getWebWindow().fin.__internal_.openerSuccessCBCalled()}catch(e){}return h.success?this:Promise.reject(h)}getAllFrames(){return this.wire.sendAction("get-all-frames",this.identity).then((({payload:e})=>e.data))}getBounds(){return this.wire.sendAction("get-window-bounds",this.identity).then((({payload:e})=>e.data))}center(){return this.wire.sendAction("center-window",this.identity).then((()=>{}))}blur(){return this.wire.sendAction("blur-window",this.identity).then((()=>{}))}bringToFront(){return this.wire.sendAction("bring-window-to-front",this.identity).then((()=>{}))}animate(e,t){return this.wire.sendAction("animate-window",{transitions:e,options:t,...this.identity}).then((()=>{}))}hide(){return this.wire.sendAction("hide-window",this.identity).then((()=>{}))}close(e=!1){return this.wire.sendAction("close-window",{force:e,...this.identity}).then((()=>{Object.setPrototypeOf(this,null)}))}focusedWebViewWasChanged(){return this.wire.sendAction("focused-webview-changed",this.identity).then((()=>{}))}getNativeId(){return this.wire.sendAction("get-window-native-id",this.identity).then((({payload:e})=>e.data))}async getCurrentViews(){const{payload:e}=await this.wire.sendAction("window-get-views",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}disableFrame(){return console.warn("Function is deprecated; use disableUserMovement instead."),this.wire.sendAction("disable-window-frame",this.identity).then((()=>{}))}disableUserMovement(){return this.wire.sendAction("disable-window-frame",this.identity).then((()=>{}))}enableFrame(){return console.warn("Function is deprecated; use enableUserMovement instead."),this.wire.sendAction("enable-window-frame",this.identity).then((()=>{}))}enableUserMovement(){return this.wire.sendAction("enable-window-frame",this.identity).then((()=>{}))}flash(){return this.wire.sendAction("flash-window",this.identity).then((()=>{}))}stopFlashing(){return this.wire.sendAction("stop-flash-window",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction("get-window-info",this.identity).then((({payload:e})=>e.data))}async getLayout(e){this.wire.sendAction("window-get-layout",this.identity).catch((e=>{}));const t=await this.getOptions();if(!t.layout&&!t.layoutSnapshot)throw new Error("Window does not have a Layout");return this.fin.Platform.Layout.wrap(e??this.identity)}getOptions(){return this.wire.sendAction("get-window-options",this.identity).then((({payload:e})=>e.data))}getParentApplication(){return this.wire.sendAction("window-get-parent-application",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity))}getParentWindow(){return this.wire.sendAction("window-get-parent-window",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity)).then((e=>e.getWindow()))}async getSnapshot(e){const t={area:e,...this.identity};console.warn("Window.getSnapshot has been deprecated, please use Window.capturePage");return(await this.wire.sendAction("get-window-snapshot",t)).payload.data}getState(){return this.wire.sendAction("get-window-state",this.identity).then((({payload:e})=>e.data))}getWebWindow(){return this.wire.sendAction("window-get-web-window",this.identity).catch((e=>{})),this.wire.environment.getWebWindow(this.identity)}isMainWindow(){return this.wire.sendAction("window-is-main-window",this.identity).catch((e=>{})),this.me.uuid===this.me.name}isShowing(){return this.wire.sendAction("is-window-showing",this.identity).then((({payload:e})=>e.data))}maximize(){return this.wire.sendAction("maximize-window",this.identity).then((()=>{}))}minimize(){return this.wire.sendAction("minimize-window",this.identity).then((()=>{}))}moveBy(e,t,n){return this.wire.sendAction("move-window-by",{deltaLeft:e,deltaTop:t,positioningOptions:n,...this.identity}).then((()=>{}))}moveTo(e,t,n){return this.wire.sendAction("move-window",{left:e,top:t,positioningOptions:n,...this.identity}).then((()=>{}))}resizeBy(e,t,n,i){return this.wire.sendAction("resize-window-by",{deltaWidth:Math.floor(e),deltaHeight:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}resizeTo(e,t,n,i){return this.wire.sendAction("resize-window",{width:Math.floor(e),height:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}restore(){return this.wire.sendAction("restore-window",this.identity).then((()=>{}))}setAsForeground(){return this.wire.sendAction("set-foreground-window",this.identity).then((()=>{}))}setBounds(e,t){return this.wire.sendAction("set-window-bounds",{...e,...this.identity,positioningOptions:t}).then((()=>{}))}show(e=!1){return this.wire.sendAction("show-window",{force:e,...this.identity}).then((()=>{}))}showAt(e,t,n=!1){return this.wire.sendAction("show-at-window",{force:n,left:Math.floor(e),top:Math.floor(t),...this.identity}).then((()=>{}))}updateOptions(e){return this.wire.sendAction("update-window-options",{options:e,...this.identity}).then((()=>{}))}authenticate(e,t){return this.wire.sendAction("window-authenticate",{userName:e,password:t,...this.identity}).then((()=>{}))}async showPopupMenu(e){const{payload:t}=await this.wire.sendAction("show-popup-menu",{options:e,...this.identity});return t.data}async closePopupMenu(){return this.wire.sendAction("close-popup-menu",{...this.identity}).then((()=>{}))}async dispatchPopupResult(e){this.wire.sendAction("window-dispatch-popup-result",this.identity).catch((e=>{})),await this.wire.sendAction("dispatch-popup-result",{data:e,...this.identity})}async print(e={content:"self"}){switch(e.content){case void 0:case"self":return super.print(e);case"screenshot":return this.wire.sendAction("print-screenshot",this.identity).then((()=>{}));case"views":return this.wire.sendAction("print-views",{...this.identity,options:e}).then((()=>{}));default:return}}}return S._Window=o,S}function ie(){return te||(te=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(function(){if(ee)return _;ee=1,Object.defineProperty(_,"__esModule",{value:!0}),_._WindowModule=void 0;const e=d,t=O,n=ne();class i extends e.Base{async wrap(e){this.wire.sendAction("window-wrap").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}wrapSync(e){this.wire.sendAction("window-wrap-sync").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}create(e){return this.wire.sendAction("create-window").catch((e=>{})),new n._Window(this.wire,{uuid:this.me.uuid,name:e.name}).createWindow(e)}getCurrent(){if(this.wire.sendAction("get-current-window").catch((e=>{})),!this.wire.me.isWindow)throw new Error("You are not in a Window context");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction("get-current-window-sync").catch((e=>{})),!this.wire.me.isWindow)throw new Error("You are not in a Window context");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return _._WindowModule=i,_}(),e),n(ne(),e)}(M)),M}Q.promisifySubscription=async(e,t,n=(()=>!0),i)=>{let r,o,s;const a=new Promise(((e,t)=>{r=e,o=t})),c=e=>{n(e)&&(clearTimeout(s),r(e))};return await e.on(t,c),i&&(s=setTimeout((()=>o(new Error("event timed out"))),i)),a.finally((()=>{e.removeListener(t,c).catch((()=>null))})),{getValue:()=>a}},Object.defineProperty(c,"__esModule",{value:!0}),c.System=void 0;const re=d,oe=g,se=ie(),ae=t;class ce extends re.EmitterBase{constructor(e){super(e,"system")}sendExternalProcessRequest(e,t){return new Promise(((n,i)=>{const r="external-process-exited";let o,s,a,c;"function"==typeof t.listener&&(a=e=>{const n=e||{};s={topic:"exited",uuid:n.processUuid||"",exitCode:n.exitCode||0},o===e.processUuid&&(t.listener(s),c.removeListener(r,a))},this.wire.me.name||(this.wire.me.name=this.wire.me.uuid),c=new se._Window(this.wire,this.wire.me),c.on(r,a)),this.wire.sendAction(e,t).then((({payload:e})=>{o=e.data.uuid,n(e.data),s&&o===s.uuid&&(t.listener(s),c.removeListener(r,a))})).catch((e=>{c&&c.removeListener(r,a),i(e)}))}))}getVersion(){return this.wire.sendAction("get-version").then((({payload:e})=>e.data))}clearCache(e){return this.wire.sendAction("clear-cache",e).then((()=>{}))}deleteCacheOnExit(){return this.wire.sendAction("delete-cache-request").then((()=>{}))}exit(){return this.wire.sendAction("exit-desktop").then((()=>{}))}async fetchManifest(e){const{payload:{data:t}}=await this.wire.sendAction("fetch-manifest",{manifestUrl:e});return t}flushCookieStore(){return this.wire.sendAction("flush-cookie-store").then((()=>{}))}getAllWindows(){return this.wire.sendAction("get-all-windows").then((({payload:e})=>e.data))}getAllApplications(){return this.wire.sendAction("get-all-applications").then((({payload:e})=>e.data))}getCommandLineArguments(){return this.wire.sendAction("get-command-line-arguments").then((({payload:e})=>e.data))}async getCrashReporterState(){const{payload:{data:{diagnosticMode:e,isRunning:t}}}=await this.wire.sendAction("get-crash-reporter-state");return console.warn("diagnosticMode property is deprecated. It will be removed in a future version"),{diagnosticMode:e,diagnosticsMode:e,isRunning:t}}async startCrashReporter(e){const t=e,n={...t,diagnosticMode:t.diagnosticsMode||t.diagnosticMode},{payload:{data:{diagnosticMode:i,isRunning:r}}}=await this.wire.sendAction("start-crash-reporter",n);return{diagnosticMode:i,diagnosticsMode:i,isRunning:r}}getUniqueUserId(){return this.wire.sendAction("get-unique-user-id").then((({payload:e})=>e.data))}getEntityInfo(e,t){return this.wire.sendAction("get-entity-info",{uuid:e,name:t}).then((({payload:e})=>e.data))}getEnvironmentVariable(e){return this.wire.sendAction("get-environment-variable",{environmentVariables:e}).then((({payload:e})=>e.data))}getFocusedWindow(){return this.wire.sendAction("get-focused-window").then((({payload:e})=>e.data))}async isAppCertified(e){const{payload:{data:{certifiedInfo:t}}}=await this.wire.sendAction("is-app-certified",{manifestUrl:e});return t}getInstalledRuntimes(){return this.wire.sendAction("get-installed-runtimes").then((({payload:e})=>e.data.runtimes))}async getInstalledApps(){const{payload:{data:{installedApps:e}}}=await this.wire.sendAction("get-installed-apps");return e}getLog(e){return this.wire.sendAction("view-log",e).then((({payload:e})=>e.data))}getMachineId(){return this.wire.sendAction("get-machine-id").then((({payload:e})=>e.data))}getMinLogLevel(){return this.wire.sendAction("get-min-log-level").then((({payload:e})=>e.data))}getLogList(){return this.wire.sendAction("list-logs").then((({payload:e})=>e.data))}getMonitorInfo(){return this.wire.sendAction("get-monitor-info").then((({payload:e})=>e.data))}getMousePosition(){return this.wire.sendAction("get-mouse-position").then((({payload:e})=>e.data))}getProcessList(){return console.warn("System.getProcessList has been deprecated. Please consider using our new process APIs: Window.getProcessInfo, View.getProcessInfo, Application.getProcessInfo, System.getAllProcessInfo"),this.wire.sendAction("process-snapshot").then((({payload:e})=>e.data))}async getAllProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction("get-all-process-info",this.identity);return e}getProxySettings(){return this.wire.sendAction("get-proxy-settings").then((({payload:e})=>e.data))}getRuntimeInfo(){return this.wire.sendAction("get-runtime-info").then((({payload:e})=>e.data))}getRvmInfo(){return this.wire.sendAction("get-rvm-info").then((({payload:e})=>e.data))}getHostSpecs(){return this.wire.sendAction("get-host-specs").then((({payload:e})=>e.data))}getOSInfo(){return this.wire.sendAction("get-os-info").then((({payload:e})=>e.data))}launchExternalProcess(e){return this.sendExternalProcessRequest("launch-external-process",e)}monitorExternalProcess(e){return this.sendExternalProcessRequest("monitor-external-process",e)}log(e,t){return this.wire.sendAction("write-to-log",{level:e,message:t}).then((()=>{}))}openUrlWithBrowser(e){return this.wire.sendAction("open-url-with-browser",{url:e}).then((()=>{}))}async registerCustomProtocol(e){if("object"!=typeof e)throw new Error("Must provide an object with a `protocolName` property having a string value.");await this.wire.sendAction("register-custom-protocol",e)}async unregisterCustomProtocol(e){await this.wire.sendAction("unregister-custom-protocol",{protocolName:e})}async getCustomProtocolState(e){return this.wire.sendAction("get-custom-protocol-state",{protocolName:e}).then((({payload:e})=>e.data))}releaseExternalProcess(e){return this.wire.sendAction("release-external-process",{uuid:e}).then((()=>{}))}showDeveloperTools(e){return this.wire.sendAction("show-developer-tools",e).then((()=>{}))}terminateExternalProcess(e){return this.wire.sendAction("terminate-external-process",e).then((()=>{}))}updateProxySettings(e){return this.wire.sendAction("update-proxy",e).then((()=>{}))}async downloadAsset(e,t){const n=()=>{};let i=n,r=n;const o=new Promise(((e,t)=>{i=e,r=t}));if("openfin"!==this.wire.environment.type)throw new oe.NotSupportedError("downloadAsset only supported in an OpenFin Render process");const s=oe.RuntimeError.getCallSite(),a=this.wire.environment.getNextMessageId().toString(),c=`asset-download-progress-${a}`,d=`asset-download-error-${a}`,h=`asset-download-complete-${a}`,l=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},u=()=>{this.removeListener(c,l)};await Promise.all([this.on(c,l),this.once(d,(e=>{u();const{reason:t,err:n}=e;r(new oe.RuntimeError({reason:t,error:n},s))})),this.once(h,(()=>{u(),i()}))]);const p=Object.assign(e,{downloadId:a});return await this.wire.sendAction("download-asset",p).catch((e=>{throw u(),e})),o}downloadRuntime(e,t){const n=oe.RuntimeError.getCallSite();return new Promise(((i,r)=>{if("openfin"!==this.wire.environment.type)return void r(new oe.NotSupportedError("downloadRuntime only supported in an OpenFin Render process"));const o=this.wire.environment.getNextMessageId().toString(),s=`runtime-download-progress-${o}`,a=`runtime-download-error-${o}`,c=`runtime-download-complete-${o}`,d=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},h=()=>{this.removeListener(s,d)};this.on(s,d),this.once(a,(e=>{h();const{reason:t,err:i}=e;r(new oe.RuntimeError({reason:t,error:i},n))})),this.once(c,(()=>{h(),i()}));const l=Object.assign(e,{downloadId:o});this.wire.sendAction("download-runtime",l).catch((e=>{h(),r(e)}))}))}downloadPreloadScripts(e){return this.wire.sendAction("download-preload-scripts",{scripts:e}).then((({payload:e})=>e.data))}getAllExternalApplications(){return this.wire.sendAction("get-all-external-applications").then((({payload:e})=>e.data))}getAppAssetInfo(e){return this.wire.sendAction("get-app-asset-info",e).then((({payload:e})=>e.data))}getCookies(e){const t=this.wire.environment.getUrl(),n=Object.assign(e,{url:t});return this.wire.sendAction("get-cookies",n).then((({payload:e})=>e.data))}setMinLogLevel(e){return this.wire.sendAction("set-min-log-level",{level:e}).then((()=>{}))}resolveUuid(e){return this.wire.sendAction("resolve-uuid",{entityKey:e}).then((({payload:e})=>e.data))}executeOnRemote(e,t){return t.requestingIdentity=e,this.wire.ferryAction(t)}readRegistryValue(e,t,n){return this.wire.sendAction("read-registry-value",{rootKey:e,subkey:t,value:n}).then((({payload:e})=>e.data))}registerExternalConnection(e){return this.wire.sendAction("register-external-connection",{uuid:e}).then((({payload:e})=>e.data))}async getServiceConfiguration(e){if("string"!=typeof e.name)throw new Error("Must provide an object with a `name` property having a string value");const{name:t}=e;return this.wire.sendAction("get-service-configuration",{name:t}).then((({payload:e})=>e.data))}async getSystemAppConfig(e){if("string"!=typeof e)throw new Error("Must provide a string value for name of system app");return this.wire.sendAction("get-system-app-configuration",{name:e}).then((({payload:e})=>e.data))}async registerShutdownHandler(e){this.wire.sendAction("system-register-shutdown-handler").catch((e=>{}));const{uuid:t,name:n}=this.wire.me;this.on("system-shutdown",(i=>{e({proceed:()=>{this.wire.environment.raiseEvent("application/system-shutdown-handled",{uuid:t,name:n,topic:"application"})}})}))}runRvmHealthCheck(){return this.wire.sendAction("run-rvm-health-check").then((({payload:e})=>e.data))}async launchManifest(e,t={}){const{subscribe:n,...i}=t,r=i;if(n){const e=new ae.EventEmitter;n(e);const t="app-version-progress",i="runtime-status",o="app-version-complete",s="app-version-error",a=this.wire.environment.getNextMessageId().toString();r.appVersionId=a;const c=[o,t,i,s],d=e=>{const{appVersionId:t,topic:n,type:i,...r}=e;return{...r,type:c.find((e=>i.includes(e)))}},h=t=>{const n=d(t);e.emit(n.type,n)},l=()=>{this.removeListener(`${t}.${a}`,h),this.removeListener(`${i}.${a}`,h),this.removeListener(`${o}.${a}`,h),this.removeListener(`${s}.${a}`,h),this.removeListener(`${o}.${a}`,l),this.removeListener(`${s}.${a}`,l)};await Promise.all([this.on(`${t}.${a}`,h),this.on(`${i}.${a}`,h),this.once(`${o}.${a}`,h),this.once(`${s}.${a}`,h),this.once(`${o}.${a}`,l),this.once(`${s}.${a}`,l)])}return(await this.wire.sendAction("launch-manifest",{manifestUrl:e,opts:r})).payload.data.manifest}async queryPermissionForCurrentContext(e){const t={uuid:this.wire.me.uuid,name:this.wire.me.name};return(await this.wire.sendAction("query-permission-for-current-context",{apiName:e,identity:t})).payload.data}async enableNativeWindowIntegrationProvider(e){const{payload:t}=await this.wire.sendAction("enable-native-window-integration-provider",{permissions:e});return t.data}async registerUsage({data:e,type:t}){await this.wire.sendAction("register-usage",{data:e,type:t})}async getPrinters(){const{payload:e}=await this.wire.sendAction("system-get-printers");return e.data}async updateProcessLoggingOptions(e){await this.wire.sendAction("system-update-process-logging-options",{options:e})}async getDomainSettings(){const{payload:{data:e}}=await this.wire.sendAction("get-domain-settings",this.identity);return e}async setDomainSettings(e){await this.wire.sendAction("set-domain-settings",{domainSettings:e,...this.identity})}async refreshExtensions(){const{payload:e}=await this.wire.sendAction("refresh-extensions");return e.data}async getInstalledExtensions(){const{payload:e}=await this.wire.sendAction("get-installed-extensions");return e.data}}c.System=ce;var de={},he={};Object.defineProperty(he,"__esModule",{value:!0}),he.RefCounter=void 0;he.RefCounter=class{constructor(){this.topicRefMap=new Map}incRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t+1;n=i,this.topicRefMap.set(e,i)}else this.topicRefMap.set(e,1),n=1;return n}decRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t-1;this.topicRefMap.set(e,i),n=i}else n=-1;return n}actOnFirst(e,t,n){return 1===this.incRefCount(e)?t():n()}actOnLast(e,t,n){return 0===this.decRefCount(e)?t():n()}};var le={},ue={},pe={};Object.defineProperty(pe,"__esModule",{value:!0}),pe.ChannelBase=pe.ProtectedItems=void 0;const we=e=>async(t,n,i)=>{const r=await e(t,n,i);return void 0===r?n:r};pe.ProtectedItems=class{constructor(e,t){this.providerIdentity=e,this.close=t}};class ye{static defaultAction(e){throw new Error(`No action registered at target for ${e}`)}constructor(){this.subscriptions=new Map}async processAction(e,t,n){try{const i=this.subscriptions.has(e)?this.subscriptions.get(e):(t,n)=>(this.defaultAction??ye.defaultAction)(e,t,n),r=this.preAction?await this.preAction(e,t,n):t,o=await i(r,n);return this.postAction?await this.postAction(e,o,n):o}catch(t){if(this.errorMiddleware)return this.errorMiddleware(e,t,n);throw t}}beforeAction(e){if(this.preAction)throw new Error("Already registered beforeAction middleware");this.preAction=we(e)}onError(e){if(this.errorMiddleware)throw new Error("Already registered error middleware");this.errorMiddleware=e}afterAction(e){if(this.postAction)throw new Error("Already registered afterAction middleware");this.postAction=we(e)}remove(e){this.subscriptions.delete(e)}setDefaultAction(e){if(this.defaultAction)throw new Error("default action can only be set once");this.defaultAction=e}register(e,t){if(this.subscriptions.has(e))throw new Error(`Subscription already registered for action: ${e}. Unsubscribe before adding new subscription`);return this.subscriptions.set(e,t),!0}}pe.ChannelBase=ye;var fe,ge,me,ve=s&&s.__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)},Ce=s&&s.__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};Object.defineProperty(ue,"__esModule",{value:!0}),ue.ChannelClient=void 0;const be=pe,Ie=new Map;class Ee extends be.ChannelBase{static closeChannelByEndpointId(e){const t=Ie.get(e);t&&ve(t,me,"f").call(t)}static handleProviderDisconnect(e){for(const t of Ie.values())t.providerIdentity.channelId===e.channelId&&(t.disconnectListener(e),ve(t,me,"f").call(t))}constructor(e,t,n){super(),fe.set(this,void 0),ge.set(this,void 0),this.processAction=(e,t,n)=>super.processAction(e,t,n),me.set(this,(()=>{Ie.delete(this.endpointId),ve(this,ge,"f").close()})),Ce(this,fe,new be.ProtectedItems(e,t),"f"),this.disconnectListener=()=>{},this.endpointId=e.endpointId,Ce(this,ge,n,"f"),Ie.set(this.endpointId,this),n.receive(this.processAction)}get providerIdentity(){return ve(this,fe,"f").providerIdentity}async dispatch(e,t){if(ve(this,ge,"f").isEndpointConnected(this.providerIdentity.channelId))return ve(this,ge,"f").send(this.providerIdentity.channelId,e,t);throw new Error("The client you are trying to dispatch from is disconnected from the target provider.")}onDisconnection(e){this.disconnectListener=t=>{try{e(t)}catch(e){throw new Error(`Error while calling the onDisconnection callback: ${e.message}`)}finally{this.disconnectListener=()=>{}}}}async disconnect(){await this.sendDisconnectAction(),ve(this,me,"f").call(this)}async sendDisconnectAction(){const e=ve(this,fe,"f");await e.close()}static async wireClose(e,t,n){const{channelName:i,uuid:r,name:o}=t;await e.sendAction("disconnect-from-channel",{channelName:i,uuid:r,name:o,endpointId:n})}}ue.ChannelClient=Ee,fe=new WeakMap,ge=new WeakMap,me=new WeakMap;var xe={},Ae={};Object.defineProperty(Ae,"__esModule",{value:!0}),Ae.exhaustiveCheck=void 0,Ae.exhaustiveCheck=function(e,t){throw new Error(`Unsupported value: ${e}${t?`\n Supported values are: ${t.join("")}`:""}`)};var Pe,Me,_e,Oe={},Se=s&&s.__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},Re=s&&s.__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)};Object.defineProperty(Oe,"__esModule",{value:!0}),Oe.ClassicInfo=Oe.ClassicStrategy=void 0;Oe.ClassicStrategy=class{constructor(e,t,n,i){this.messageReceiver=t,this.endpointId=n,this.providerIdentity=i,Pe.set(this,void 0),Me.set(this,new Map),_e.set(this,new Map),this.send=async(e,t,n)=>{const i=Re(this,Me,"f").get(e);if(!i)throw new Error(`Could not locate routing info for endpoint ${e}`);const r={...i};r.isLocalEndpointId&&delete r.endpointId,delete r.isLocalEndpointId;const o=Re(this,Pe,"f").sendAction("send-channel-message",{...r,providerIdentity:this.providerIdentity,action:t,payload:n});Re(this,_e,"f").get(e)?.add(o);return(await o.catch((e=>{throw new Error(e.message)})).finally((()=>{Re(this,_e,"f").get(e)?.delete(o)}))).payload.data.result},this.close=async()=>{this.messageReceiver.removeEndpoint(this.providerIdentity.channelId,this.endpointId),[...Re(this,Me,"f").keys()].forEach((e=>this.closeEndpoint(e))),Se(this,Me,new Map,"f")},Se(this,Pe,e,"f")}onEndpointDisconnect(e,t){}receive(e){this.messageReceiver.addEndpoint(e,this.providerIdentity.channelId,this.endpointId)}async closeEndpoint(e){const t=Re(this,Me,"f").get(e);Re(this,Me,"f").delete(e);const n=Re(this,_e,"f").get(e);n?.forEach((n=>{const i=`Channel connection with identity uuid: ${t?.uuid} / name: ${t?.name} / endpointId: ${e} no longer connected.`;n.cancel(new Error(i))}))}isEndpointConnected(e){return Re(this,Me,"f").has(e)}addEndpoint(e,t){Re(this,Me,"f").set(e,t.endpointIdentity),Re(this,_e,"f").set(e,new Set)}isValidEndpointPayload(e){return"string"==typeof e?.endpointIdentity?.endpointId||"string"==typeof e?.endpointIdentity?.channelId}},Pe=new WeakMap,Me=new WeakMap,_e=new WeakMap,Oe.ClassicInfo={version:5,minimumVersion:0,type:"classic"};var Fe={},je={},ke={};Object.defineProperty(ke,"__esModule",{value:!0}),ke.errorToPOJO=void 0,ke.errorToPOJO=function(e){return{stack:e.stack,name:e.name,message:e.message,toString:()=>e.stack||e.toString()}};var Le,Te,$e=s&&s.__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)},Be=s&&s.__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};Object.defineProperty(je,"__esModule",{value:!0}),je.RTCEndpoint=void 0;const Ge=ke;je.RTCEndpoint=class{static isValidEndpointPayload(e){const t=e=>"object"==typeof e&&null!==e;return t(e)&&t(e.endpointIdentity)&&t(e.rtc)&&"string"==typeof e.endpointIdentity.endpointId}constructor({rtc:e,endpointIdentity:t}){this.responseMap=new Map,Le.set(this,null),Te.set(this,void 0),this.connectionStateChangeHandler=e=>{"connected"!==this.rtc.rtcClient.connectionState&&(this.rtc.rtcClient.removeEventListener("connectionstatechange",this.connectionStateChangeHandler),this.close(),$e(this,Te,"f")&&$e(this,Te,"f").call(this))},this.send=async(e,t)=>{const n=`message-${Math.random()}`,i=new Promise(((e,t)=>{this.responseMap.set(n,{resolve:e,reject:t})}));return this.rtc.channels.request.send(JSON.stringify({action:e,payload:t,messageId:n})),i},this.close=()=>{this.responseMap.forEach((e=>e.reject("Connection has closed."))),this.responseMap=new Map,this.rtc.channels.request.close(),this.rtc.channels.response.close(),this.rtc.rtcClient.close()},this.rtc=e,this.endpointIdentity=t,this.rtc.channels.response.addEventListener("message",(e=>{let{data:t}=e;e.data instanceof ArrayBuffer&&(t=(new TextDecoder).decode(e.data));const{messageId:n,payload:i,success:r,error:o}=JSON.parse(t),{resolve:s,reject:a}=this.responseMap.get(n)??{};s&&a?(this.responseMap.delete(n),r?s(i):a(o)):(console.log("Could not find id in responseMap."),console.log(e))})),this.rtc.channels.request.addEventListener("message",(async e=>{let{data:n}=e;e.data instanceof ArrayBuffer&&(n=(new TextDecoder).decode(e.data));const{messageId:i,action:r,payload:o}=JSON.parse(n);if($e(this,Le,"f"))try{const e=await $e(this,Le,"f").call(this,r,o,t);this.rtc.channels.response.send(JSON.stringify({messageId:i,payload:e,success:!0}))}catch(e){"open"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,error:(0,Ge.errorToPOJO)(e),success:!1}))}else"open"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,success:!1,error:"Connection not ready."}))})),this.rtc.rtcClient.addEventListener("connectionstatechange",this.connectionStateChangeHandler),Object.values(this.rtc.channels).forEach((e=>{e.onclose=e=>{[...this.responseMap.values()].forEach((e=>e.reject(new Error("RTCDataChannel closed unexpectedly, this is most commonly caused by message size. Note: RTC Channels have a message size limit of ~255kB.")))),this.close(),$e(this,Te,"f")&&$e(this,Te,"f").call(this)}}))}onDisconnect(e){if($e(this,Te,"f"))throw new Error("RTCEndpoint disconnectListener cannot be set twice.");Be(this,Te,e,"f")}receive(e){if($e(this,Le,"f"))throw new Error("You have already set a listener for this RTC Endpoint.");Be(this,Le,e,"f")}get connected(){return"connected"===this.rtc.rtcClient.connectionState}},Le=new WeakMap,Te=new WeakMap;var We,He,Ne,De={},Ue=s&&s.__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)},Ve=s&&s.__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};Object.defineProperty(De,"__esModule",{value:!0}),De.EndpointStrategy=void 0;De.EndpointStrategy=class{constructor(e,t,n){this.EndpointType=e,this.StrategyName=n,We.set(this,null),He.set(this,new Map),Ne.set(this,!0),this.send=async(e,t,n)=>this.getEndpointById(e).send(t,n),this.close=async()=>{Ue(this,Ne,"f")&&(Ue(this,He,"f").forEach((e=>e.close())),Ve(this,He,new Map,"f")),Ve(this,Ne,!1,"f")},this.isValidEndpointPayload=t}onEndpointDisconnect(e,t){this.getEndpointById(e).onDisconnect(t)}receive(e){if(Ue(this,We,"f"))throw new Error(`You have already set a listener for this ${this.StrategyName} Strategy`);Ve(this,We,e,"f"),Ue(this,He,"f").forEach((e=>e.receive(Ue(this,We,"f"))))}getEndpointById(e){const t=Ue(this,He,"f").get(e);if(!t)throw new Error(`Client with endpoint id ${e} is not connected`);return t}get connected(){return Ue(this,Ne,"f")}isEndpointConnected(e){return Ue(this,He,"f").has(e)}addEndpoint(e,t){if(!Ue(this,Ne,"f"))return void console.warn(`Adding endpoint to disconnected ${this.StrategyName} Strategy`);const n=new this.EndpointType(t);Ue(this,We,"f")&&n.receive(Ue(this,We,"f")),Ue(this,He,"f").set(e,n)}async closeEndpoint(e){Ue(this,He,"f").delete(e)}},We=new WeakMap,He=new WeakMap,Ne=new WeakMap,Object.defineProperty(Fe,"__esModule",{value:!0}),Fe.RTCInfo=Fe.RTCStrategy=void 0;const ze=je,Ke=De;class qe extends Ke.EndpointStrategy{constructor(){super(ze.RTCEndpoint,ze.RTCEndpoint.isValidEndpointPayload,"RTC")}}Fe.RTCStrategy=qe,Fe.RTCInfo={version:2,minimumVersion:0,type:"rtc"};var Je={};Object.defineProperty(Je,"__esModule",{value:!0}),Je.RTCICEManager=void 0;const Ye=d;class Ze extends Ye.EmitterBase{constructor(e){super(e,"channel"),this.ensureChannelOpened=e=>new Promise(((t,n)=>{if("open"===e.readyState)t();else if("connecting"===e.readyState){const n=()=>{e.removeEventListener("open",n),t()};e.addEventListener("open",n)}else n(new Error("This Channel has already closed"))}))}static createDataChannelPromise(e,t){let n;const i=new Promise((e=>{n=e})),r=i=>{const o=()=>{i.channel.removeEventListener("open",o),n(i.channel)};i.channel.label===e&&(i.channel.addEventListener("open",o),t.removeEventListener("datachannel",r))};return t.addEventListener("datachannel",r),i}async listenForProviderIce(e,t){await this.on(this.createProviderEventName(e),t,{timestamp:Date.now()})}async raiseProviderIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createProviderEventName(e)),t)}async listenForClientIce(e,t){await this.on(this.createClientEventName(e),t,{timestamp:Date.now()})}async raiseClientIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createClientEventName(e)),t)}cleanupIceListeners(e){this.removeAllListeners(this.createClientEventName(e)),this.removeAllListeners(this.createProviderEventName(e))}createClientEventName(e){return`ice-client-${e}`}createProviderEventName(e){return`ice-provider-${e}`}createRouteString(e){return`channel/${e}`}createRtcPeer(){return this.wire.environment.getRtcPeer()}async startClientOffer(){const e=Math.random().toString(),t=this.createRtcPeer();t.addEventListener("icecandidate",(async t=>{t.candidate&&await this.raiseClientIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForProviderIce(e,(async e=>{await t.addIceCandidate(e.candidate)}));const n={request:t.createDataChannel("request"),response:t.createDataChannel("response")},i=await t.createOffer();await t.setLocalDescription(i);const r=Promise.all([n.request,n.response].map(this.ensureChannelOpened)).then((()=>{}));return{rtcClient:t,channels:n,offer:i,rtcConnectionId:e,channelsOpened:r}}async finishClientOffer(e,t,n){return await e.setRemoteDescription(t),await n,!0}async createProviderAnswer(e,t){const n=this.createRtcPeer(),i=Ze.createDataChannelPromise("request",n),r=Ze.createDataChannelPromise("response",n);n.addEventListener("icecandidate",(async t=>{t.candidate&&await this.raiseProviderIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForClientIce(e,(async e=>{await n.addIceCandidate(e.candidate)})),await n.setRemoteDescription(t);const o=await n.createAnswer();await n.setLocalDescription(o);const s=Promise.all([i,r]).then((([t,n])=>(this.cleanupIceListeners(e),{request:t,response:n})));return{rtcClient:n,answer:o,channels:s}}}Je.RTCICEManager=Ze;var Qe={},Xe={};function et(e){return[...e.split(".").reverse().entries()].reduce(((e,[t,n])=>e+ +n*1e4**t),0)}function tt(e,t){return et(e)>=et(t)}function nt(e){return e.split("/")[0]}Object.defineProperty(Xe,"__esModule",{value:!0}),Xe.runtimeUuidMeetsMinimumRuntimeVersion=Xe.parseRuntimeUuid=Xe.meetsMinimumRuntimeVersion=void 0,Xe.meetsMinimumRuntimeVersion=tt,Xe.parseRuntimeUuid=nt,Xe.runtimeUuidMeetsMinimumRuntimeVersion=function(e,t){return tt(nt(e),t)};var it,rt,ot,st,at,ct=s&&s.__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)},dt=s&&s.__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};Object.defineProperty(Qe,"__esModule",{value:!0}),Qe.ChannelProvider=void 0;const ht=pe,lt=Xe;class ut extends ht.ChannelBase{get connections(){return[...ct(this,it,"f")]}static handleClientDisconnection(e,t){const n=e.connections.find((e=>e.endpointId===t.endpointId));if(n)ct(e,st,"f").call(e,n);else{e.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name)).forEach(ct(e,st,"f"))}e.disconnectListener(t)}static setProviderRemoval(e,t){ut.removalMap.set(e,t)}constructor(e,t,n){super(),it.set(this,void 0),rt.set(this,void 0),ot.set(this,void 0),st.set(this,(e=>{const t=this.connections.filter((t=>t.endpointId!==e.endpointId));ct(this,ot,"f").closeEndpoint(e.endpointId),dt(this,it,t,"f")})),this.processAction=async(e,t,n)=>(ut.clientIsMultiRuntime(n)&&!(0,lt.runtimeUuidMeetsMinimumRuntimeVersion)(n.runtimeUuid,"18.87.56.0")?this.handleMultiRuntimeLegacyClient(n):this.checkForClientConnection(n),super.processAction(e,t,n)),at.set(this,(()=>{ct(this,ot,"f").close();const e=ut.removalMap.get(this);e&&e()})),dt(this,rt,new ht.ProtectedItems(e,t),"f"),this.connectListener=()=>{},this.disconnectListener=()=>{},dt(this,it,[],"f"),dt(this,ot,n,"f"),n.receive(this.processAction)}dispatch(e,t,n){const i=e.endpointId??this.getEndpointIdForOpenFinId(e,t);return i&&ct(this,ot,"f").isEndpointConnected(i)?ct(this,ot,"f").send(i,t,n):Promise.reject(new Error(`Client connection with identity uuid: ${e.uuid} / name: ${e.name} / endpointId: ${i} no longer connected.`))}async processConnection(e,t){return ct(this,it,"f").push(e),this.connectListener(e,t)}publish(e,t){return this.connections.map((n=>ct(this,ot,"f").send(n.endpointId,e,t)))}onConnection(e){this.connectListener=e}onDisconnection(e){this.disconnectListener=e}async destroy(){const e=ct(this,rt,"f");e.providerIdentity,dt(this,it,[],"f"),await e.close(),ct(this,at,"f").call(this)}async getAllClientInfo(){return this.connections.map((e=>{const{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}=e;return{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}}))}checkForClientConnection(e){if(!this.isClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider.\n Client Identity: {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}isClientConnected(e){return ut.clientIdentityIncludesEndpointId(e)?this.connections.some((t=>t.endpointId===e.endpointId&&t.uuid===e.uuid&&t.name===e.name)):this.isLegacyClientConnected(e)}isLegacyClientConnected(e){return this.connections.some((t=>t.uuid===e.uuid&&t.name===e.name))}handleMultiRuntimeLegacyClient(e){if(!this.isLegacyClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider. Client Identity:\n {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}getEndpointIdForOpenFinId(e,t){const n=this.connections.filter((t=>t.name===e.name&&t.uuid===e.uuid));if(n.length>=2){const n=ct(this,rt,"f"),{uuid:i,name:r}=e,o=n?.providerIdentity.uuid,s=n?.providerIdentity.name;console.warn(`WARNING: Dispatch call may have unintended results. The "to" argument of your dispatch call is missing the\n "endpointId" parameter. The identity you are dispatching to ({uuid: ${i}, name: ${r}})\n has multiple channelClients for this channel. Your dispatched action: (${t}) from the provider:\n ({uuid: ${o}, name: ${s}}) will only be processed by the most recently-created client.`)}return n.pop()?.endpointId}static clientIdentityIncludesEndpointId(e){return void 0!==e.endpointId}static clientIsMultiRuntime(e){return void 0!==e.runtimeUuid}static async wireClose(e,t){await e.sendAction("destroy-channel",{channelName:t})}}Qe.ChannelProvider=ut,it=new WeakMap,rt=new WeakMap,ot=new WeakMap,st=new WeakMap,at=new WeakMap,ut.removalMap=new WeakMap;var pt={};Object.defineProperty(pt,"__esModule",{value:!0}),pt.MessageReceiver=void 0;const wt=ue,yt=d;class ft extends yt.Base{constructor(e){super(e),this.onmessage=e=>"process-channel-message"===e.action&&(this.processChannelMessage(e),!0),this.endpointMap=new Map,this.latestEndpointIdByChannelId=new Map,e.registerMessageHandler(this.onmessage.bind(this))}async processChannelMessage(e){const{senderIdentity:t,providerIdentity:n,action:i,ackToSender:r,payload:o,intendedTargetIdentity:s}=e.payload,a=s.channelId??s.endpointId??this.latestEndpointIdByChannelId.get(n.channelId),c=this.endpointMap.get(a);if(!c)return r.payload.success=!1,r.payload.reason=`Client connection with identity uuid: ${this.wire.me.uuid} / name: ${this.wire.me.name} / endpointId: ${a} no longer connected.`,this.wire.sendRaw(r);try{const e=await c(i,o,t);return r.payload.payload=r.payload.payload||{},r.payload.payload.result=e,this.wire.sendRaw(r)}catch(e){return r.payload.success=!1,r.payload.reason=e.message,this.wire.sendRaw(r)}}addEndpoint(e,t,n){this.endpointMap.set(n,e),t!==n&&this.latestEndpointIdByChannelId.set(t,n)}removeEndpoint(e,t){this.endpointMap.delete(t),this.latestEndpointIdByChannelId.get(e)===t&&this.latestEndpointIdByChannelId.delete(e)}checkForPreviousClientConnection(e){const t=this.latestEndpointIdByChannelId.get(e);t&&(wt.ChannelClient.closeChannelByEndpointId(t),console.warn("You have created a second connection to an older provider. First connection has been removed from the clientMap"),console.warn("If the provider calls publish(), you may receive multiple messages."))}}pt.MessageReceiver=ft;var gt={};Object.defineProperty(gt,"__esModule",{value:!0}),gt.ProtocolManager=void 0;gt.ProtocolManager=class{constructor(e){this.ProtocolsInPreferenceOrder=e,this.DefaultClientProtocols=["classic"],this.DefaultProviderProtocols=["classic"],this.getClientProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultClientProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(", ")}.`);return t},this.getProviderProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultProviderProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(", ")}.`);return t},this.getCompatibleProtocols=(e,t)=>t.supportedProtocols.filter((t=>e.some((e=>e.type===t.type&&t.version>=e.minimumVersion&&e.version>=(t.minimumVersion??0))))).slice(0,t.maxProtocols)}};var mt={};Object.defineProperty(mt,"__esModule",{value:!0});class vt{static combine(e,t){return new vt(e,t)}constructor(e,t){this.primary=e,this.secondary=t}onEndpointDisconnect(e,t){this.primary.onEndpointDisconnect(e,(()=>{this.secondary.isEndpointConnected(e)||t()})),this.secondary.onEndpointDisconnect(e,(()=>{this.primary.isEndpointConnected(e)||t()}))}isValidEndpointPayload(e){return this.primary.isValidEndpointPayload(e)||this.secondary.isValidEndpointPayload(e)}async closeEndpoint(e){await this.primary.closeEndpoint(e),await this.secondary.closeEndpoint(e)}isEndpointConnected(e){return this.primary.isEndpointConnected(e)||this.secondary.isEndpointConnected(e)}async addEndpoint(e,t){this.primary.isValidEndpointPayload(t)&&await this.primary.addEndpoint(e,t),this.secondary.isValidEndpointPayload(t)&&await this.secondary.addEndpoint(e,t)}receive(e){this.primary.receive(e),this.secondary.receive(e)}send(e,t,n){return this.primary.isEndpointConnected(e)?this.primary.send(e,t,n):this.secondary.send(e,t,n)}async close(){await Promise.all([this.primary.close(),this.secondary.close()])}}mt.default=vt;var Ct,bt,It=s&&s.__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},Et=s&&s.__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)},xt=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(xe,"__esModule",{value:!0}),xe.ConnectionManager=void 0;const At=Ae,Pt=d,Mt=Oe,_t=Fe,Ot=Je,St=Qe,Rt=pt,Ft=gt,jt=xt(mt);class kt extends Pt.Base{static getProtocolOptionsFromStrings(e){return e.map((e=>{switch(e){case"rtc":return _t.RTCInfo;case"classic":return Mt.ClassicInfo;default:return(0,At.exhaustiveCheck)(e,["rtc","classic"])}}))}constructor(e){super(e),Ct.set(this,void 0),bt.set(this,void 0),this.removeChannelFromProviderMap=e=>{this.providerMap.delete(e)},this.onmessage=e=>"process-channel-connection"===e.action&&(this.processChannelConnection(e),!0),this.providerMap=new Map,this.protocolManager=new Ft.ProtocolManager("node"===this.wire.environment.type?["classic"]:["rtc","classic"]),It(this,Ct,new Rt.MessageReceiver(e),"f"),It(this,bt,new Ot.RTCICEManager(e),"f"),e.registerMessageHandler(this.onmessage.bind(this))}createProvider(e,t){const n=Object.assign(this.wire.environment.getDefaultChannelOptions().create,e||{}),i=this.protocolManager.getProviderProtocols(n?.protocols),r=i.map((e=>{switch(e){case"rtc":return new _t.RTCStrategy;case"classic":return new Mt.ClassicStrategy(this.wire,Et(this,Ct,"f"),t.channelId,t);default:return(0,At.exhaustiveCheck)(e,["rtc","classic"])}}));let o;if(2===r.length){const[e,t]=r;o=jt.default.combine(e,t)}else{if(1!==r.length)throw new Error("failed to combine strategies");[o]=r}const s=new St.ChannelProvider(t,(()=>St.ChannelProvider.wireClose(this.wire,t.channelName)),o),a=t.channelId;return this.providerMap.set(a,{provider:s,strategy:o,supportedProtocols:kt.getProtocolOptionsFromStrings(i)}),St.ChannelProvider.setProviderRemoval(s,this.removeChannelFromProviderMap.bind(this)),s}async createClientOffer(e){const t=this.protocolManager.getClientProtocols(e?.protocols);let n;return{offer:{supportedProtocols:await Promise.all(t.map((async e=>{switch(e){case"rtc":{const{rtcClient:e,channels:t,offer:i,rtcConnectionId:r,channelsOpened:o}=await Et(this,bt,"f").startClientOffer();return n={rtcClient:e,channels:t,channelsOpened:o},{type:"rtc",version:_t.RTCInfo.version,payload:{offer:i,rtcConnectionId:r}}}case"classic":return{type:"classic",version:Mt.ClassicInfo.version};default:return(0,At.exhaustiveCheck)(e,["rtc","classic"])}}))),maxProtocols:2},rtc:n}}async createClientStrategy(e,t){t.endpointId||(t.endpointId=this.wire.environment.getNextMessageId(),Et(this,Ct,"f").checkForPreviousClientConnection(t.channelId));const n=t.answer??{supportedProtocols:[{type:"classic",version:1}]},i=(await Promise.all(n.supportedProtocols.map((async n=>"rtc"===n.type&&e?(await Et(this,bt,"f").finishClientOffer(e.rtcClient,n.payload.answer,e.channelsOpened),new _t.RTCStrategy):"classic"===n.type?new Mt.ClassicStrategy(this.wire,Et(this,Ct,"f"),t.endpointId,t):null)))).filter((e=>null!==e));let r;if(e&&!i.some((e=>e instanceof _t.RTCStrategy))&&e&&e.rtcClient.close(),i.length>=2)r=jt.default.combine(i[0],i[1]);else{if(!i.length)throw new Error("No compatible protocols");[r]=i}const o={endpointIdentity:t,rtc:e};return r.addEndpoint(t.channelId,o),r}async processChannelConnection(e){const{clientIdentity:t,providerIdentity:n,ackToSender:i,payload:r,offer:o}=e.payload;t.endpointId?t.isLocalEndpointId=!1:(t.endpointId=this.wire.environment.getNextMessageId(),t.isLocalEndpointId=!0);const s=n.channelId,a=this.providerMap.get(s);if(!a)return i.payload.success=!1,i.payload.reason=`Channel "${n.channelName}" has been destroyed.`,this.wire.sendRaw(i);const{provider:c,strategy:d,supportedProtocols:h}=a;try{if(!(c instanceof St.ChannelProvider))throw Error("Cannot connect to a channel client");const e=o??{supportedProtocols:[{type:"classic",version:1}],maxProtocols:1},n=this.protocolManager.getCompatibleProtocols(h,e);if(!n.length)throw new Error("This provider does not support any of the offered protocols.");const s=await c.processConnection(t,r);i.payload.payload=i.payload.payload||{};let a={supportedProtocols:[],endpointPayloadPromise:Promise.resolve({endpointIdentity:t})};return a=await n.reduce((async(e,t)=>{const n=await e;if("rtc"===t.type){const{answer:e,rtcClient:i,channels:r}=await Et(this,bt,"f").createProviderAnswer(t.payload.rtcConnectionId,t.payload.offer);n.supportedProtocols.push({type:"rtc",version:_t.RTCInfo.version,payload:{answer:e}}),n.endpointPayloadPromise=n.endpointPayloadPromise.then((e=>r.then((t=>({...e,rtc:{rtcClient:i,channels:t}})))))}else n.supportedProtocols.push({type:"classic",version:Mt.ClassicInfo.version});return n}),Promise.resolve(a)),a.endpointPayloadPromise.then((e=>d.addEndpoint(t.endpointId,e))),i.payload.payload.result=s,i.payload.payload.answer=a,this.wire.sendRaw(i)}catch(e){return i.payload.success=!1,i.payload.reason=e.message,this.wire.sendRaw(i)}}}xe.ConnectionManager=kt,Ct=new WeakMap,bt=new WeakMap;var Lt,Tt,$t,Bt=s&&s.__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},Gt=s&&s.__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)};Object.defineProperty(le,"__esModule",{value:!0}),le.Channel=void 0;const Wt=t,Ht=G,Nt=d,Dt=ue,Ut=xe,Vt=Qe;function zt(e){const t=Math.floor(e/10),n=Math.min(3e4,500*2**t);return new Promise((e=>{setTimeout((()=>{e(!1)}),n)}))}class Kt extends Nt.EmitterBase{constructor(e){super(e,"channel"),Lt.set(this,void 0),Tt.set(this,new Wt.EventEmitter),$t.set(this,new Ht.AsyncRetryableLazy((async()=>{await Promise.all([this.on("disconnected",(e=>{Dt.ChannelClient.handleProviderDisconnect(e)})),this.on("connected",((...e)=>{Gt(this,Tt,"f").emit("connected",...e)}))]).catch((()=>new Error("error setting up channel connection listeners")))}))),Bt(this,Lt,new Ut.ConnectionManager(e),"f")}async getAllChannels(){return this.wire.sendAction("get-all-channels").then((({payload:e})=>e.data))}async onChannelConnect(e){await this.on("connected",e)}async onChannelDisconnect(e){await this.on("disconnected",e)}async safeConnect(e,t,n){const i={count:0};do{let r=()=>{};const o=new Promise((t=>{r=n=>{e===n.channelName&&t(!0)},Gt(this,Tt,"f").on("connected",r)}));try{if(i.count>0){i.gotConnectedEvent=await Promise.race([zt(i.count),o]);const t=await this.wire.sendAction("connect-to-channel",{...n,retryInfo:i});return console.log(`Successfully connected to channelName: ${e}`),t.payload.data}const t=this.wire.sendAction("connect-to-channel",n);i.originalMessageId=t.messageId;return(await t).payload.data}catch(n){if(!n.message.includes("internal-nack"))throw n;t&&0===i.count&&console.warn(`No channel found for channelName: ${e}. Waiting for connection...`)}finally{i.count+=1,Gt(this,Tt,"f").removeListener("connected",r)}}while(t);throw new Error(`No channel found for channelName: ${e}.`)}async connect(e,t={}){if(await Gt(this,$t,"f").getValue(),!e||"string"!=typeof e)throw new Error("Please provide a channelName string to connect to a channel.");const n={wait:!0,...this.wire.environment.getDefaultChannelOptions().connect,...t},{offer:i,rtc:r}=await Gt(this,Lt,"f").createClientOffer(n);let o;(this.fin.me.isFrame||this.fin.me.isView||this.fin.me.isWindow)&&(o=(await this.fin.me.getInfo()).url);const s={channelName:e,...n,offer:i,connectionUrl:o},a=await this.safeConnect(e,n.wait,s),c=await Gt(this,Lt,"f").createClientStrategy(r,a),d=new Dt.ChannelClient(a,(()=>Dt.ChannelClient.wireClose(this.wire,a,a.endpointId)),c);return c.onEndpointDisconnect(a.channelId,(async()=>{try{await d.sendDisconnectAction()}catch(e){console.warn(`Something went wrong during disconnect for client with uuid: ${a.uuid} / name: ${a.name} / endpointId: ${a.endpointId}.`)}finally{Dt.ChannelClient.handleProviderDisconnect(a)}})),d}async create(e,t){if(!e)throw new Error("Please provide a channelName to create a channel");const{payload:{data:n}}=await this.wire.sendAction("create-channel",{channelName:e}),i=Gt(this,Lt,"f").createProvider(t,n);return this.on("client-disconnected",(t=>{t.channelName===e&&Vt.ChannelProvider.handleClientDisconnection(i,t)})),i}}le.Channel=Kt,Lt=new WeakMap,Tt=new WeakMap,$t=new WeakMap,Object.defineProperty(de,"__esModule",{value:!0}),de.InterAppPayload=de.InterApplicationBus=void 0;const qt=t,Jt=d,Yt=he,Zt=le,Qt=O;class Xt extends Jt.Base{constructor(e){super(e),this.events={subscriberAdded:"subscriber-added",subscriberRemoved:"subscriber-removed"},this.refCounter=new Yt.RefCounter,this.Channel=new Zt.Channel(e),this.emitter=new qt.EventEmitter,e.registerMessageHandler(this.onmessage.bind(this)),this.on=this.emitter.on.bind(this.emitter),this.removeAllListeners=this.emitter.removeAllListeners.bind(this.emitter)}async publish(e,t){await this.wire.sendAction("publish-message",{topic:e,message:t,sourceWindowName:this.me.name})}async send(e,t,n){const i=(0,Qt.validateIdentity)(e);if(i)throw new Error(i);await this.wire.sendAction("send-message",{destinationUuid:e.uuid,destinationWindowName:e.name,topic:t,message:n,sourceWindowName:this.me.name})}subscribe(e,t,n){const i=this.createSubscriptionKey(e.uuid,e.name||"*",t);return this.emitter.on(i,n),this.refCounter.actOnFirst(i,(async()=>{await this.wire.sendAction("subscribe",{sourceUuid:e.uuid,sourceWindowName:e.name||"*",topic:t,destinationWindowName:this.me.name})}),(()=>Promise.resolve()))}unsubscribe(e,t,n){const i=e.name||"*",r=this.createSubscriptionKey(e.uuid,i,t);return this.emitter.removeListener(r,n),this.refCounter.actOnLast(r,(async()=>{await this.wire.sendAction("unsubscribe",{sourceUuid:e.uuid,sourceWindowName:i,topic:t,destinationWindowName:this.me.name})}),(()=>new Promise((e=>e)).then((()=>{}))))}processMessage(e){const{payload:{message:t,sourceWindowName:n,sourceUuid:i,topic:r}}=e,o=[this.createSubscriptionKey(i,n,r),this.createSubscriptionKey(i,"*",r),this.createSubscriptionKey("*","*",r)],s={uuid:i,name:n};o.forEach((e=>{this.emitter.emit(e,t,s)}))}emitSubscriverEvent(e,t){const{payload:{targetName:n,uuid:i,topic:r}}=t,o={name:n,uuid:i,topic:r};this.emitter.emit(e,o)}createSubscriptionKey(e,t,n){const i=t||"*";if(!(e&&i&&n))throw new Error("Missing uuid, name, or topic string");return function(...e){return e.map((e=>Buffer.from(`${e}`).toString("base64"))).join("/")}(e,i,n)}onmessage(e){const{action:t}=e;switch(t){case"process-message":this.processMessage(e);break;case this.events.subscriberAdded:this.emitSubscriverEvent(this.events.subscriberAdded,e);break;case this.events.subscriberRemoved:this.emitSubscriverEvent(this.events.subscriberRemoved,e)}return!0}}de.InterApplicationBus=Xt;de.InterAppPayload=class{};var en={};Object.defineProperty(en,"__esModule",{value:!0}),en.Clipboard=void 0;const tn=d;class nn extends tn.Base{async writeText(e){await this.wire.sendAction("clipboard-write-text",e)}async readText(e){const{payload:t}=await this.wire.sendAction("clipboard-read-text",{type:e});return t.data}async writeImage(e){await this.wire.sendAction("clipboard-write-image",e)}async readImage(e={format:"dataURL"}){const{payload:t}=await this.wire.sendAction("clipboard-read-image",e);return t.data}async writeHtml(e){await this.wire.sendAction("clipboard-write-html",e)}async readHtml(e){const{payload:t}=await this.wire.sendAction("clipboard-read-html",{type:e});return t.data}async writeRtf(e){await this.wire.sendAction("clipboard-write-rtf",e)}async readRtf(e){const{payload:t}=await this.wire.sendAction("clipboard-read-rtf",{type:e});return t.data}async write(e){await this.wire.sendAction("clipboard-write",e)}async getAvailableFormats(e){const{payload:t}=await this.wire.sendAction("clipboard-read-formats",{type:e});return t.data}}en.Clipboard=nn;var rn={},on={},sn={};Object.defineProperty(sn,"__esModule",{value:!0}),sn.ExternalApplication=void 0;const an=d;class cn extends an.EmitterBase{constructor(e,t){super(e,"external-application",t.uuid),this.identity=t}getInfo(){return this.wire.sendAction("get-external-application-info",this.identity).then((({payload:e})=>e.data))}}sn.ExternalApplication=cn,Object.defineProperty(on,"__esModule",{value:!0}),on.ExternalApplicationModule=void 0;const dn=d,hn=sn;class ln extends dn.Base{wrap(e){return this.wire.sendAction("external-application-wrap").catch((e=>{})),Promise.resolve(new hn.ExternalApplication(this.wire,{uuid:e}))}wrapSync(e){return this.wire.sendAction("external-application-wrap-sync").catch((e=>{})),new hn.ExternalApplication(this.wire,{uuid:e})}}on.ExternalApplicationModule=ln,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(on,e),n(sn,e)}(rn);var un={},pn={},wn={};Object.defineProperty(wn,"__esModule",{value:!0}),wn._Frame=void 0;const yn=d;class fn extends yn.EmitterBase{constructor(e,t){super(e,"frame",t.uuid,t.name),this.identity=t}getInfo(){return this.wire.sendAction("get-frame-info",this.identity).then((({payload:e})=>e.data))}getParentWindow(){return this.wire.sendAction("get-parent-window",this.identity).then((({payload:e})=>e.data))}}wn._Frame=fn,Object.defineProperty(pn,"__esModule",{value:!0}),pn._FrameModule=void 0;const gn=d,mn=O,vn=wn;class Cn extends gn.Base{async wrap(e){this.wire.sendAction("frame-wrap").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}wrapSync(e){this.wire.sendAction("frame-wrap-sync").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}getCurrent(){return this.wire.sendAction("frame-get-current").catch((e=>{})),Promise.resolve(new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity()))}getCurrentSync(){return this.wire.sendAction("frame-get-current-sync").catch((e=>{})),new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity())}}pn._FrameModule=Cn,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(pn,e),n(wn,e)}(un);var bn={};Object.defineProperty(bn,"__esModule",{value:!0}),bn.GlobalHotkey=void 0;const In=d;class En extends In.EmitterBase{constructor(e){super(e,"global-hotkey")}async register(e,t){await this.on(e,t),await this.wire.sendAction("global-hotkey-register",{hotkey:e})}async unregister(e){await this.removeAllListeners(e),await this.wire.sendAction("global-hotkey-unregister",{hotkey:e})}async unregisterAll(){await Promise.all(this.eventNames().filter((e=>!("registered"===e||"unregistered"===e))).map((e=>this.removeAllListeners(e)))),await this.wire.sendAction("global-hotkey-unregister-all",{})}async isRegistered(e){const{payload:{data:t}}=await this.wire.sendAction("global-hotkey-is-registered",{hotkey:e});return t}}bn.GlobalHotkey=En;var xn,An={},Pn={},Mn={},_n=s&&s.__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)};Object.defineProperty(Mn,"__esModule",{value:!0}),Mn.Platform=void 0;const On=d,Sn=O,Rn=new Map;class Fn extends On.EmitterBase{constructor(e,t){super(t.wire,"application",e.uuid),this.getClient=e=>{this.wire.sendAction("platform-get-client",this.identity).catch((e=>{}));const t=e||this.identity,{uuid:n}=t;if(!Rn.has(n)){const e=_n(this,xn,"f").call(this,n);Rn.set(n,e)}return Rn.get(n)},xn.set(this,(async e=>{try{const t=`custom-frame-${e}`,n=await this._channel.connect(t,{wait:!1});return n.onDisconnection((()=>{Rn.delete(e)})),n}catch(t){throw Rn.delete(e),new Error("The targeted Platform is not currently running. Listen for application-started event for the given Uuid.")}})),this.launchLegacyManifest=this.launchContentManifest;const n=(0,Sn.validateIdentity)(e);if(n)throw new Error(n);this._channel=t,this.identity={uuid:e.uuid},this.Layout=this.fin.Platform.Layout,this.Application=this.fin.Application.wrapSync(this.identity)}async createView(e,t,n){this.wire.sendAction("platform-create-view",this.identity).catch((e=>{}));const i=await this.getClient(),r=await i.dispatch("create-view",{target:t,opts:e,targetView:n});if(!r||(0,Sn.validateIdentity)(r.identity))throw new Error(`When overwriting the createView call, please return an object that has a valid 'identity' property: ${JSON.stringify(r)}`);return this.fin.View.wrapSync(r.identity)}async createWindow(e){this.wire.sendAction("platform-create-window",this.identity).catch((e=>{}));const t=await this.getClient();e.reason||(e.reason="api-call");const n=await t.dispatch("create-view-container",e);if(!n||(0,Sn.validateIdentity)(n.identity))throw new Error(`When overwriting the createWindow call, please return an object that has a valid 'identity' property: ${JSON.stringify(n)}`);const{identity:i}=n,r=this.fin.Window.wrapSync(i);return r.name=i.name,r.uuid=i.uuid,r}async quit(){this.wire.sendAction("platform-quit",this.identity).catch((e=>{}));return(await this.getClient()).dispatch("quit")}async closeView(e){this.wire.sendAction("platform-close-view",this.identity).catch((e=>{}));const t=await this.getClient();await t.dispatch("close-view",{view:e})}async reparentView(e,t){console.warn("Platform.reparentView has been deprecated, please use Platform.createView"),this.wire.sendAction("platform-reparent-view",this.identity).catch((e=>{}));const n={...e,uuid:e.uuid??this.identity.uuid},i=await this.fin.View.wrap(n),r=await i.getOptions();return this.createView(r,t)}async getSnapshot(){this.wire.sendAction("platform-get-snapshot",this.identity).catch((e=>{}));return(await this.getClient()).dispatch("get-snapshot")}async getViewSnapshot(e){return(await this.getClient()).dispatch("get-view-snapshot",{viewIdentity:e})}async applySnapshot(e,t){this.wire.sendAction("platform-apply-snapshot",this.identity).catch((e=>{}));const n="Requested snapshot must be a valid Snapshot object, or a url or filepath to such an object.";let i;if("string"==typeof e)try{i=(await this._channel.wire.sendAction("get-application-manifest",{manifestUrl:e})).payload.data}catch(e){throw new Error(`${n}: ${e}`)}else i=e;if(!i.windows)throw new Error(n);const r=await this.getClient();return await r.dispatch("apply-snapshot",{snapshot:i,options:t}),this}async fetchManifest(e){return(await this.getClient()).dispatch("platform-fetch-manifest",{manifestUrl:e})}async launchContentManifest(e){this.wire.sendAction("platform-launch-content-manifest",this.identity).catch((()=>{}));const t=await this.getClient(),n=await this.fetchManifest(e);return t.dispatch("launch-into-platform",{manifest:n,manifestUrl:e}),this}async setWindowContext(e={},t){if(this.wire.sendAction("platform-set-window-context",this.identity).catch((e=>{})),!e)throw new Error("Please provide a serializable object or string to set the context.");const n=await this.getClient(),{entityType:i}=t?await this.fin.System.getEntityInfo(t.uuid,t.name):this.fin.me;await n.dispatch("set-window-context",{context:e,entityType:i,target:t||{uuid:this.fin.me.uuid,name:this.fin.me.name}})}async getWindowContext(e){this.wire.sendAction("platform-get-window-context",this.identity).catch((e=>{}));const t=await this.getClient(),{entityType:n}=e?await this.fin.System.getEntityInfo(e.uuid,e.name):this.fin.me;return t.dispatch("get-window-context",{target:e||{uuid:this.fin.me.uuid,name:this.fin.me.name},entityType:n})}async closeWindow(e,t={skipBeforeUnload:!1}){this.wire.sendAction("platform-close-window",this.identity).catch((e=>{}));return(await this.getClient()).dispatch("close-window",{windowId:e,options:t})}}Mn.Platform=Fn,xn=new WeakMap;var jn={},kn={},Ln={},Tn={};function $n(e){switch(e){case"columns":case"grid":case"rows":case"tabs":return!0;default:return!1}}Object.defineProperty(Tn,"__esModule",{value:!0}),Tn.overrideFromComposables=Tn.isValidPresetType=void 0,Tn.isValidPresetType=$n,Tn.overrideFromComposables=function(...e){return t=>e.reduceRight(((e,t)=>n=>t(e(n))),(e=>e))(t)},Tn.default={isValidPresetType:$n};var Bn={},Gn={},Wn={};Object.defineProperty(Wn,"__esModule",{value:!0}),Wn.ApiConsumer=void 0;Wn.ApiConsumer=class{constructor(e){this.strategy=e,this.consume=async e=>(await this.strategy.getExposedFunctions(e)).reduce(((t,n)=>({...t,[n.key]:this.strategy.createFunction(n,e)})),{})}};var Hn={},Nn={};Object.defineProperty(Nn,"__esModule",{value:!0}),Nn.expose=Nn.getExposedProperties=void 0;const Dn=Symbol("exposedProperties");Nn.getExposedProperties=e=>e[Dn]||e.prototype[Dn]||[];Nn.expose=e=>(t,n,i)=>{t[Dn]=t[Dn]||[],t[Dn].push({key:n,descriptor:i,options:e})},Object.defineProperty(Hn,"__esModule",{value:!0}),Hn.ApiExposer=void 0;const Un=Nn;Hn.ApiExposer=class{constructor(e){this.strategy=e,this.exposeInstance=async(e,t)=>{const n=(0,Un.getExposedProperties)(e),i=await Promise.all(n.map((async({key:n,options:i})=>({key:n,options:await this.strategy.exposeFunction(e[n].bind(e),{key:n,options:i,meta:t})}))));await this.strategy.exposeMeta(t,i)}}};var Vn={},zn={},Kn={};Object.defineProperty(Kn,"__esModule",{value:!0}),Kn.ChannelsConsumer=void 0;Kn.ChannelsConsumer=class{constructor(e){this.channel=e,this.getExposedFunctions=async e=>{const{id:t}=e,{props:n}=await this.channel.dispatch(`api-meta:${t}`);return n},this.createFunction=e=>(...t)=>{const{action:n}=e.options;return this.channel.dispatch(n,{args:t})}}};var qn={};Object.defineProperty(qn,"__esModule",{value:!0}),qn.ChannelsExposer=void 0;qn.ChannelsExposer=class{constructor(e){this.channelProviderOrClient=e,this.exposeFunction=async(e,t)=>{const{key:n,options:i,meta:r}=t,{id:o}=r,s=`${o}.${i?.action||n}`;return await this.channelProviderOrClient.register(s,(async({args:t})=>e(...t))),{action:s}},this.exposeMeta=async({id:e},t)=>{const n=`api-meta:${e}`;await this.channelProviderOrClient.register(n,(()=>({props:t})))}}},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Kn,e),n(qn,e)}(zn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(zn,e)}(Vn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Wn,e),n(Hn,e),n(Vn,e),n(Nn,e)}(Gn);var Jn={};Object.defineProperty(Jn,"__esModule",{value:!0}),Jn.createRelayedDispatch=exports.relayChannelClientApi_1=Jn.relayChannelClientApi=void 0;const Yn=["no longer connected","RTCDataChannel closed unexpectedly","The client you are trying to dispatch from is disconnected from the target provider"];exports.relayChannelClientApi_1=Jn.relayChannelClientApi=async(e,t)=>{e.register(`relay:${t}`,(({action:t,target:n,payload:i})=>e.dispatch(n,t,i))),await Promise.resolve()};Jn.createRelayedDispatch=(e,t,n,i)=>async(r,o)=>{try{return await e.dispatch(`relay:${n}`,{action:r,payload:o,target:t})}catch(e){if(s=e.message,Yn.some((e=>s.includes(e)))&&i)throw new Error(i);throw e}var s};var Zn,Qn,Xn,ei=s&&s.__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},ti=s&&s.__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)};Object.defineProperty(Bn,"__esModule",{value:!0}),Bn.ColumnOrRow=Bn.TabStack=Bn.LayoutNode=void 0;const ni=Gn,ii=Jn;class ri{constructor(e,t){Zn.set(this,void 0),this.isRoot=()=>ti(this,Zn,"f").isRoot(this.entityId),this.exists=()=>ti(this,Zn,"f").exists(this.entityId),this.getParent=async()=>{const e=await ti(this,Zn,"f").getParent(this.entityId);if(e)return ri.getEntity(e,ti(this,Zn,"f"))},this.createAdjacentStack=async(e,t)=>{const n=await ti(this,Zn,"f").createAdjacentStack(this.entityId,e,t);return ri.getEntity({entityId:n,type:"stack"},ti(this,Zn,"f"))},this.getAdjacentStacks=async e=>(await ti(this,Zn,"f").getAdjacentStacks({targetId:this.entityId,edge:e})).map((e=>ri.getEntity({type:"stack",entityId:e.entityId},ti(this,Zn,"f")))),ei(this,Zn,e,"f"),this.entityId=t}}Bn.LayoutNode=ri,Zn=new WeakMap,ri.newLayoutEntitiesClient=async(e,t,n)=>{const i=(0,ii.createRelayedDispatch)(e,n,"layout-relay","You are trying to interact with a layout component on a window that does not exist or has been destroyed.");return new ni.ApiConsumer(new ni.ChannelsConsumer({dispatch:i})).consume({id:t})},ri.getEntity=(e,t)=>{const{entityId:n,type:i}=e;switch(i){case"column":case"row":return new si(t,n,i);case"stack":return new oi(t,n);default:throw new Error(`Unrecognised Layout Entity encountered ('${JSON.stringify(e)})`)}};class oi extends ri{constructor(e,t){super(e,t),Qn.set(this,void 0),this.type="stack",this.getViews=()=>ti(this,Qn,"f").getStackViews(this.entityId),this.addView=async(e,t={index:0})=>ti(this,Qn,"f").addViewToStack(this.entityId,e,t),this.removeView=async e=>{await ti(this,Qn,"f").removeViewFromStack(this.entityId,e)},this.setActiveView=async e=>{await ti(this,Qn,"f").setStackActiveView(this.entityId,e)},ei(this,Qn,e,"f")}}Bn.TabStack=oi,Qn=new WeakMap;class si extends ri{constructor(e,t,n){super(e,t),Xn.set(this,void 0),this.getContent=async()=>(await ti(this,Xn,"f").getContent(this.entityId)).map((e=>ri.getEntity(e,ti(this,Xn,"f")))),ei(this,Xn,e,"f"),this.type=n}}Bn.ColumnOrRow=si,Xn=new WeakMap;var ai={};Object.defineProperty(ai,"__esModule",{value:!0}),ai.DEFAULT_LAYOUT_KEY=ai.LAYOUT_CONTROLLER_ID=void 0,ai.LAYOUT_CONTROLLER_ID="layout-entities",ai.DEFAULT_LAYOUT_KEY="__default__";var ci,di,hi,li=s&&s.__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)};Object.defineProperty(Ln,"__esModule",{value:!0}),Ln.Layout=void 0;const ui=G,pi=O,wi=d,yi=Tn,fi=Bn,gi=ai;class mi extends wi.Base{static getClient(e){return li(e,di,"f").getValue()}constructor(e,t){super(t),ci.add(this),di.set(this,new ui.Lazy((async()=>fi.LayoutNode.newLayoutEntitiesClient(await this.platform.getClient(),gi.LAYOUT_CONTROLLER_ID,this.identity)))),this.replace=async e=>{this.wire.sendAction("layout-replace").catch((e=>{}));const t=await this.platform.getClient();await t.dispatch("replace-layout",{target:this.identity,opts:{layout:e}})},this.replaceView=async(e,t)=>{this.wire.sendAction("layout-replace-view").catch((e=>{}));const n=await this.platform.getClient();await n.dispatch("replace-view",{target:this.identity,opts:{viewToReplace:e,newView:t}})},this.applyPreset=async e=>{this.wire.sendAction("layout-apply-preset").catch((e=>{}));const t=await this.platform.getClient(),{presetType:n}=e;if(!n||!(0,yi.isValidPresetType)(n))throw new Error("Cannot apply preset layout, please include an applicable presetType property in the PresetLayoutOptions.");await t.dispatch("apply-preset-layout",{target:this.identity,opts:{presetType:n}})};const n=(0,pi.validateIdentity)(e);if(n)throw new Error(n);this.identity=e,this.platform=this.fin.Platform.wrapSync({uuid:e.uuid}),e.uuid===this.fin.me.uuid&&e.name===this.fin.me.name&&(this.init=this.fin.Platform.Layout.init)}async getConfig(){this.wire.sendAction("layout-get-config").catch((e=>{}));return(await this.platform.getClient()).dispatch("get-frame-snapshot",{target:this.identity})}async getCurrentViews(){this.wire.sendAction("layout-get-views").catch((e=>{}));const e=await this.platform.getClient();return(await e.dispatch("get-layout-views",{target:this.identity})).map((e=>this.fin.View.wrapSync(e)))}async getRootItem(){this.wire.sendAction("layout-get-root-item").catch((()=>{}));const e=await li(this,di,"f").getValue(),t=await e.getRoot("layoutName"in this.identity?this.identity:void 0);return fi.LayoutNode.getEntity(t,e)}async getStackByViewIdentity(e){this.wire.sendAction("layout-get-stack-by-view").catch((()=>{}));const t=await li(this,di,"f").getValue(),n=await t.getStackByView(e);if(!n)throw new Error(`No stack found for view: ${e.uuid}/${e.name}`);return fi.LayoutNode.getEntity(n,t)}async addView(e,{location:t,targetView:n}={}){this.wire.sendAction("layout-add-view").catch((e=>{}));const{identity:i}=await li(this,ci,"m",hi).call(this,"layout-add-view",{viewOptions:e,location:t,targetView:n});return{identity:i}}async closeView(e){this.wire.sendAction("layout-close-view").catch((e=>{})),await li(this,ci,"m",hi).call(this,"layout-close-view",{viewIdentity:e})}}Ln.Layout=mi,di=new WeakMap,ci=new WeakSet,hi=async function(e,t){return(await this.platform.getClient()).dispatch(e,{target:this.identity,opts:t})};var vi,Ci,bi,Ii,Ei,xi=s&&s.__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)},Ai=s&&s.__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};Object.defineProperty(kn,"__esModule",{value:!0}),kn.LayoutModule=void 0;const Pi=d,Mi=Ln,_i=ai;class Oi extends Pi.Base{constructor(){super(...arguments),vi.add(this),Ci.set(this,!1),bi.set(this,null),this.init=async(e={})=>{if(this.wire.sendAction("layout-init").catch((e=>{})),!this.wire.environment.layoutAllowedInContext(this.fin))throw new Error("Layout.init can only be called from a Window context.");if(xi(this,Ci,"f"))throw new Error("Layout.init was already called, please use Layout.create to add additional layouts.");"openfin"===this.wire.environment.type&&await this.fin.Platform.getCurrentSync().getClient(),Ai(this,Ci,!0,"f"),Ai(this,bi,await this.wire.environment.initLayoutManager(this.fin,this.wire,e),"f"),await this.wire.environment.applyLayoutSnapshot(this.fin,xi(this,bi,"f"),e);const t={name:this.fin.me.name,uuid:this.fin.me.uuid};if(!e.layoutManagerOverride){const e={layoutName:_i.DEFAULT_LAYOUT_KEY,...t};return xi(this,Ii,"f").call(this,e)}return this.wrapSync(t)},Ii.set(this,(e=>{const t="[Layout] You are using a deprecated property `layoutManager` - it will throw if you access it starting in v37.",n=new Proxy({},{get(e,n){throw console.warn(`[Layout-mgr-proxy] accessing ${n.toString()}`),new Error(t)}}),i=Object.assign(this.wrapSync(e),{layoutManager:n});return new Proxy(i,{get(e,n){if("layoutManager"===n)throw console.warn(`[Layout-proxy] accessing ${n.toString()}`),new Error(t);return e[n]}})})),this.getCurrentLayoutManagerSync=()=>xi(this,vi,"m",Ei).call(this,"fin.Platform.Layout.getCurrentLayoutManagerSync()"),this.create=async e=>this.wire.environment.createLayout(xi(this,vi,"m",Ei).call(this,"fin.Platform.Layout.create()"),e),this.destroy=async e=>this.wire.environment.destroyLayout(xi(this,vi,"m",Ei).call(this,"fin.Platform.Layout.destroy()"),e)}async wrap(e){return this.wire.sendAction("layout-wrap").catch((e=>{})),new Mi.Layout(e,this.wire)}wrapSync(e){return this.wire.sendAction("layout-wrap-sync").catch((e=>{})),new Mi.Layout(e,this.wire)}async getCurrent(){if(this.wire.sendAction("layout-get-current").catch((e=>{})),"openfin"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error("You are not in a Window context. Only Windows can have a Layout.");const{uuid:e,name:t}=this.fin.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction("layout-get-current-sync").catch((e=>{})),"openfin"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error("You are not in a Window context. Only Windows can have a Layout.");const{uuid:e,name:t}=this.fin.me;return this.wrapSync({uuid:e,name:t})}async getLayoutByViewIdentity(e){this.wire.sendAction("layout-get-by-view-identity").catch((()=>{}));let t=await this.wire.environment.getViewWindowIdentity(this.fin,e);t.identity&&(t=t.identity);try{const n=this.wrapSync(t),i=await Mi.Layout.getClient(n),r=await i.getLayoutIdentityForViewOrThrow(e);return this.wrapSync(r)}catch(n){if(!["No action registered at target for","getLayoutIdentityForViewOrThrow is not a function"].some((e=>n.message.includes(e))))throw n;if(t.uuid===t.name)throw new Error(`View identity ${JSON.stringify(e)} is not attached to any layout in provider window ${JSON.stringify(t)}.`);return this.wrapSync(t)}}}kn.LayoutModule=Oi,Ci=new WeakMap,bi=new WeakMap,Ii=new WeakMap,vi=new WeakSet,Ei=function(e){if(!xi(this,bi,"f"))throw new Error(`You must call init before using the API ${e}`);return xi(this,bi,"f")},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(kn,e),n(Ln,e)}(jn),Object.defineProperty(Pn,"__esModule",{value:!0}),Pn.PlatformModule=void 0;const Si=d,Ri=Mn,Fi=jn;class ji extends Si.Base{constructor(e,t){super(e),this._channel=t,this.Layout=new Fi.LayoutModule(this.wire)}async init(e){if(!fin.__internal_.isPlatform||fin.me.name!==fin.me.uuid)throw new Error("fin.Platform.init should only be called from a custom platform provider running in the main window of the application.");return this.wire.environment.initPlatform(this.fin,e)}async wrap(e){return this.wire.sendAction("platform-wrap").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}wrapSync(e){return this.wire.sendAction("platform-wrap-sync").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}async getCurrent(){return this.wire.sendAction("platform-get-current").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction("platform-get-current-sync").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}start(e){return this.wire.sendAction("platform-start").catch((e=>{})),new Promise((async(t,n)=>{try{const{uuid:n}=e,i=await this.fin.Application._create({...e,isPlatformController:!0});i.once("platform-api-ready",(()=>t(this.wrapSync({uuid:n})))),i._run({uuid:n})}catch(e){n(e)}}))}startFromManifest(e,t){return this.wire.sendAction("platform-start-from-manifest").catch((e=>{})),new Promise((async(n,i)=>{try{const i=await this.fin.Application._createFromManifest(e);i.once("platform-api-ready",(()=>n(this.wrapSync({uuid:i.identity.uuid})))),i._run(t)}catch(e){i(e)}}))}}Pn.PlatformModule=ji,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Pn,e),n(Mn,e)}(An);var ki={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getMe=e.getBaseMe=e.environmentUnsupportedMessage=void 0;const t=J(),n=un,i=ie(),r=rn;function o(e,t,n){return{...{isView:"view"===e,isWindow:"window"===e,isFrame:"iframe"===e,isExternal:"external connection"===e},uuid:t,name:n,entityType:e}}e.environmentUnsupportedMessage="You are not running in OpenFin.",e.getBaseMe=o,e.getMe=function(s){const{uuid:a,name:c,entityType:d}=s.me,h={setContext(){throw new Error(e.environmentUnsupportedMessage)},addContextHandler(){throw new Error(e.environmentUnsupportedMessage)},getContextGroups(){throw new Error(e.environmentUnsupportedMessage)},joinContextGroup(){throw new Error(e.environmentUnsupportedMessage)},removeFromContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getAllClientsInContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getInfoForContextGroup(){throw new Error(e.environmentUnsupportedMessage)}},l="Interop API has not been instantiated. Either connection has failed or you have not declared interop in your config.",u={setContext(){throw new Error(l)},addContextHandler(){throw new Error(l)},getContextGroups(){throw new Error(l)},joinContextGroup(){throw new Error(l)},removeFromContextGroup(){throw new Error(l)},getAllClientsInContextGroup(){throw new Error(l)},getInfoForContextGroup(){throw new Error(l)}},p={eventNames:()=>{throw new Error(e.environmentUnsupportedMessage)},emit:()=>{throw new Error(e.environmentUnsupportedMessage)},listeners:()=>{throw new Error(e.environmentUnsupportedMessage)},listenerCount:()=>{throw new Error(e.environmentUnsupportedMessage)},on:()=>{throw new Error(e.environmentUnsupportedMessage)},addListener:()=>{throw new Error(e.environmentUnsupportedMessage)},once:()=>{throw new Error(e.environmentUnsupportedMessage)},prependListener:()=>{throw new Error(e.environmentUnsupportedMessage)},prependOnceListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeAllListeners:()=>{throw new Error(e.environmentUnsupportedMessage)}};switch(d){case"view":return Object.assign(new t.View(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case"window":return Object.assign(new i._Window(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case"iframe":return Object.assign(new n._Frame(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case"external connection":return Object.assign(new r.ExternalApplication(s,{uuid:a}),o(d,a,c),{interop:u,isOpenFin:!1});default:return{...o(d,a,c),...p,interop:h,isOpenFin:!1}}}}(ki);var Li={},Ti={},$i={};Object.defineProperty($i,"__esModule",{value:!0}),$i.createWarningObject=$i.createUnusableObject=void 0,$i.createUnusableObject=function(e){const t=()=>{throw new Error(e)};return new Proxy({},{apply:t,construct:t,defineProperty:t,deleteProperty:t,get:t,getOwnPropertyDescriptor:t,getPrototypeOf:t,has:t,isExtensible:t,ownKeys:t,preventExtensions:t,set:t,setPrototypeOf:t})},$i.createWarningObject=function(e,t){return new Proxy(t,{get:(...t)=>(console.warn(e),Reflect.get(...t)),set:(...t)=>(console.warn(e),Reflect.set(...t)),getOwnPropertyDescriptor:(...t)=>(console.warn(e),Reflect.getOwnPropertyDescriptor(...t)),ownKeys:(...t)=>(console.warn(e),Reflect.ownKeys(...t))})};var Bi,Gi={},Wi={};var Hi={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.wrapIntentHandler=e.BROKER_ERRORS=e.generateOverrideWarning=e.generateOverrideError=e.wrapContextHandler=e.wrapInTryCatch=e.generateId=void 0;e.generateId=()=>`${Math.random()}${Date.now()}`;e.wrapInTryCatch=(e,t)=>(...n)=>{try{return e(...n)}catch(e){throw new Error((t||"")+e)}};e.wrapContextHandler=(e,t)=>async n=>{try{await e(n)}catch(e){throw console.error(`Error thrown by handler ${t} for context type ${n.type}: ${e}`),e}};e.generateOverrideError=(e,t)=>`You have tried to to use ${e} but ${t} has not been overridden in the Interop Broker. Please override this function. Refer to our documentation for more info.`;e.generateOverrideWarning=(e,t,n,i)=>{const{uuid:r,name:o}=n;return i?`Entity with identity: ${r}/${o} has called ${i} or ${e} but ${t} has not been overridden.`:`Entity with identity: ${r}/${o} has called ${e} but ${t} has not been overridden.`},e.BROKER_ERRORS={fireIntent:(0,e.generateOverrideError)("fireIntent","handleFiredIntent"),fireIntentForContext:(0,e.generateOverrideError)("fireIntentForContext","handleFiredIntentForContext"),getInfoForIntent:(0,e.generateOverrideError)("getInfoForIntent","handleInfoForIntent"),getInfoForIntentsByContext:(0,e.generateOverrideError)("getInfoForIntentsByContext","handleInfoForIntentsByContext"),joinSessionContextGroupWithJoinContextGroup:"The Context Group you have tried to join is a Session Context Group. Custom Context Groups can only be defined by the Interop Broker through code or manifest configuration. Please use joinSessionContextGroup.",fdc3Open:(0,e.generateOverrideError)("fdc3.open","fdc3HandleOpen"),fdc3FindInstances:(0,e.generateOverrideError)("fdc3.findInstances","fdc3HandleFindInstances"),fdc3GetAppMetadata:(0,e.generateOverrideError)("fdc3.getAppMetadata","fdc3HandleGetAppMetadata"),fdc3GetInfo:(0,e.generateOverrideError)("fdc3.getInfo","fdc3HandleGetInfo")};e.wrapIntentHandler=(e,t)=>async n=>{try{return e(n)}catch(e){throw console.error(`Error thrown by handler ${t}: ${e}`),e}}}(Hi);var Ni,Di,Ui={};function Vi(){if(Di)return Gi;Di=1;var e,t,n,r=s&&s.__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},o=s&&s.__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)},a=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Gi,"__esModule",{value:!0}),Gi.InteropBroker=void 0;const c=d,h=a(function(){if(Bi)return Wi;Bi=1,Object.defineProperty(Wi,"__esModule",{value:!0});const e=Cr();return Wi.default=class{constructor(e,t){this.provider=e,this.id=t,this.lastContext=void 0,this.contextGroupMap=new Map,this.clients=new Map,this.registerListeners()}registerListeners(){this.provider.register(`sessionContextGroup:getContext-${this.id}`,this.getCurrentContext.bind(this)),this.provider.register(`sessionContextGroup:setContext-${this.id}`,this.setContext.bind(this)),this.provider.register(`sessionContextGroup:handlerAdded-${this.id}`,this.handlerAdded.bind(this)),this.provider.register(`sessionContextGroup:handlerRemoved-${this.id}`,this.handlerRemoved.bind(this))}getCurrentContext(e){return e.type?this.contextGroupMap.get(e.type):this.lastContext}setContext(t,n){const{context:i}=t,r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name} not in Session Client State Map`);this.contextGroupMap.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{e.contextHandlers.get(i.type)?.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getClientState(e){return this.clients.get(e.endpointId)}async handlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(i){const e=r.contextHandlers.get(i)||[];r.contextHandlers.set(i,[...e,n]);const o=this.contextGroupMap.get(i);o&&await this.provider.dispatch(t,n,o)}else{r.globalHandler=n;const e=[...this.contextGroupMap.keys()].map((async e=>{const i=this.contextGroupMap.get(e);i&&await this.provider.dispatch(t,n,i)}));await Promise.all(e)}}handlerRemoved(e,t){const{handlerId:n}=e,i=this.clients.get(t.endpointId);i?(Array.from(i.contextHandlers).forEach((([,e])=>{const t=e.indexOf(n);t>-1&&e.splice(t,1)})),i.globalHandler===n&&(i.globalHandler=void 0)):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={contextHandlers:new Map,clientIdentity:e,globalHandler:void 0};this.clients.set(e.endpointId,t)}}onDisconnection(e){this.clients.delete(e.endpointId)}},Wi}()),l=Hi,u=a(i),p=function(){if(Ni)return Ui;Ni=1,Object.defineProperty(Ui,"__esModule",{value:!0}),Ui.PrivateChannelProvider=void 0;const e=Vi();return Ui.PrivateChannelProvider=class t{constructor(e,t){this.provider=e,this.id=t,this.clients=new Map,this.registerListeners(),this.contextByContextType=new Map,this.lastContext=void 0,this.provider.onConnection((e=>this.registerNewClient(e))),this.provider.onDisconnection((async e=>{const{endpointId:t}=e;this.clients.has(t)&&await this.handleClientDisconnecting(e),0===(await this.provider.getAllClientInfo()).length&&this.provider.destroy()}))}getClientState(e){return this.clients.get(e.endpointId)}registerListeners(){this.provider.register("broadcast",this.broadcast.bind(this)),this.provider.register("getCurrentContext",this.getCurrentContext.bind(this)),this.provider.register("contextHandlerAdded",this.contextHandlerAdded.bind(this)),this.provider.register("contextHandlerRemoved",this.contextHandlerRemoved.bind(this)),this.provider.register("nonStandardHandlerRemoved",this.nonStandardHandlerRemoved.bind(this)),this.provider.register("onAddContextHandlerAdded",this.onAddContextHandlerAdded.bind(this)),this.provider.register("onDisconnectHandlerAdded",this.onDisconnectHandlerAdded.bind(this)),this.provider.register("onUnsubscribeHandlerAdded",this.onUnsubscribeHandlerAdded.bind(this)),this.provider.register("clientDisconnecting",((e,t)=>{this.handleClientDisconnecting(t)}))}broadcast(t,n){const{context:i}=t;if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name}, tried to call broadcast, is not connected to this Private Channel`);const r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to broadcast - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);this.contextByContextType.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{const t=e.handlerIdsByContextTypes.get(i.type);t&&t.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getCurrentContext(e,t){const{contextType:n}=e;if(!this.getClientState(t))throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call getCurrentContext, is not connected to this Private Channel`);if(void 0!==n){return this.contextByContextType.get(n)||null}return this.lastContext?this.lastContext:null}contextHandlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call addContextListener, is not connected to this Private Channel`);if(i){const e=r.handlerIdsByContextTypes.get(i)||[];r.handlerIdsByContextTypes.set(i,[...e,n])}else r.globalHandler=n;Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&e.onAddContextListenerHandlerId&&this.provider.dispatch(e.clientIdentity,e.onAddContextListenerHandlerId,i)}))}async contextHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);if(i){let e;if(i.globalHandler===n)i.globalHandler=void 0;else for(const[t,r]of i.handlerIdsByContextTypes){const i=r.indexOf(n);i>-1&&(r.splice(i,1),e=t)}const r=(await this.getConnectedClients()).map((async n=>{const{clientIdentity:i,clientIdentity:{endpointId:r},onUnsubscribeHandlerId:o}=n;r!==t.endpointId&&o&&await this.provider.dispatch(i,o,e)}));try{await Promise.all(r)}catch(e){throw console.error(`Problem when attempting to dispatch to onUnsubscribeHandlers. Error: ${e} Removing Client: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}`),new Error(e)}}else console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}.`)}nonStandardHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);i?i.onDisconnectHandlerId===n?i.onDisconnectHandlerId=void 0:i.onAddContextListenerHandlerId===n?i.onAddContextListenerHandlerId=void 0:i.onUnsubscribeHandlerId===n&&(i.onUnsubscribeHandlerId=void 0):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}onAddContextHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onAddContextListener, is not connected to this Private Channel`);n.onAddContextListenerHandlerId=i,Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&Array.from(e.handlerIdsByContextTypes.keys()).forEach((e=>{this.provider.dispatch(t,i,e)}))}))}onDisconnectHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onDisconnect, is not connected to this Private Channel`);n.onDisconnectHandlerId=i}onUnsubscribeHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onUnsubscribe, is not connected to this Private Channel`);n.onUnsubscribeHandlerId=i}removeClient(e){const t=this.getClientState(e);if(!t)throw new Error(`Client with Identity: ${e.uuid} ${e.name}, tried to call disconnect, is not connected to this Private Channel`);t.handlerIdsByContextTypes.clear(),this.clients.delete(e.endpointId)}async fireOnDisconnectForOtherClients(e){const{endpointId:t}=e,n=(await this.getConnectedClients()).map((async e=>{const{clientIdentity:{endpointId:n},onDisconnectHandlerId:i}=e;n!==t&&i&&await this.provider.dispatch(e.clientIdentity,i)}));try{await Promise.all(n)}catch(t){throw console.error(`Problem when attempting to dispatch to onDisconnectHandlers. Error: ${t} Disconnecting Client: uuid: ${e.uuid}. name: ${e.name}. endpointId: ${e.endpointId}`),new Error(t)}}async unsubscribeAll(e){const{endpointId:t}=e,n=this.clients.get(t);if(n){const t=Array.from(n.handlerIdsByContextTypes.values()).flat(),i=n.globalHandler;if(t.length>0){const n=t.map((async t=>this.contextHandlerRemoved({handlerId:t},e)));try{await Promise.all(n)}catch(e){console.error(e.message)}}if(i)try{await this.contextHandlerRemoved({handlerId:i},e)}catch(e){console.error(e.message)}}}async handleClientDisconnecting(e){await this.unsubscribeAll(e),this.removeClient(e),await this.fireOnDisconnectForOtherClients(e)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={clientIdentity:e,handlerIdsByContextTypes:new Map,globalHandler:void 0,onAddContextListenerHandlerId:void 0,onUnsubscribeHandlerId:void 0,onDisconnectHandlerId:void 0};this.clients.set(e.endpointId,t)}}async getConnectedClients(){const e=await this.provider.getAllClientInfo();return Array.from(this.clients.values()).filter((t=>{const{uuid:n,name:i}=t.clientIdentity;return e.some((e=>i===e.name&&n===e.uuid))}))}static init(e,n){return new t(e,n)}},Ui}(),w=G,y=[{id:"green",displayMetadata:{color:"#00CC88",name:"green"}},{id:"purple",displayMetadata:{color:"#8C61FF",name:"purple"}},{id:"orange",displayMetadata:{color:"#FF8C4C",name:"orange"}},{id:"red",displayMetadata:{color:"#FF5E60",name:"red"}},{id:"pink",displayMetadata:{color:"#FF8FB8",name:"pink"}},{id:"yellow",displayMetadata:{color:"#E9FF8F",name:"yellow"}}];let f=class i extends c.Base{constructor(i,s,a){super(i),e.set(this,void 0),t.set(this,void 0),n.set(this,void 0),this.getProvider=()=>o(this,n,"f").getValue(),this.interopClients=new Map,this.contextGroupsById=new Map,r(this,t,a.contextGroups??[...y],"f"),r(this,e,a.fdc3Info,"f"),a?.logging&&(this.logging=a.logging),this.intentClientMap=new Map,this.lastContextMap=new Map,this.sessionContextGroupMap=new Map,r(this,n,new w.Lazy(s),"f"),this.setContextGroupMap(),this.setupChannelProvider()}static createClosedConstructor(...e){return class extends i{constructor(...t){if(t.length){const[n,i,r]=t;if(r&&"object"==typeof r&&!(0,u.default)(r,e[2]))return console.warn("You have modified the parameters of the InteropOverride constructor. This behavior is deprecated and will be removed in a future version. You can modify these options in your manifest. Please consult our Interop docs for guidance on migrating to the new override scheme."),void super(e[0],e[1],r);console.warn("You are attempting to pass arguments to the InteropOverride constructor. This is not necessary, and these passed arguments will be ignored. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.")}super(...e)}}}setContext({context:e},t){this.wire.sendAction("interop-broker-set-context").catch((e=>{}));const n=this.getClientState(t);if(!n||!n.contextGroupId)throw n?new Error("You must join a context group before you can set context."):new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);{const{contextGroupId:t}=n;this.setContextForGroup({context:e},t)}}setContextForGroup({context:e},t){this.wire.sendAction("interop-broker-set-context-for-group").catch((e=>{}));const n=this.contextGroupsById.get(t);if(!n)throw new Error(`Unable to set context for context group that isn't in the context group mapping: ${t}.`);const r=i.checkContextIntegrity(e);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(e)}`);const o=e.type;n.set(o,e),this.lastContextMap.set(t,o);Array.from(this.interopClients.values()).filter((e=>e.contextGroupId===t)).forEach((t=>{for(const[,n]of t.contextHandlers)i.isContextTypeCompatible(o,n.contextType)&&this.invokeContextHandler(t.clientIdentity,n.handlerId,e)}))}getCurrentContext(e,t){this.wire.sendAction("interop-broker-get-current-context").catch((e=>{}));const n=this.getClientState(t);if(!n?.contextGroupId)throw new Error("You must be a member of a context group to call getCurrentContext");const{contextGroupId:i}=n,r=this.contextGroupsById.get(i),o=this.lastContextMap.get(i),s=e?.contextType??o;return r&&s?r.get(s):void 0}async joinContextGroup({contextGroupId:e,target:t},n){if(this.wire.sendAction("interop-broker-join-context-group").catch((e=>{})),this.sessionContextGroupMap.has(e))throw new Error(l.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup);if(t){i.hasEndpointId(t)&&await this.addClientToContextGroup({contextGroupId:e},t);try{const n=this.channel.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name));if(!n.length)throw new Error(`Given Identity ${t.uuid} ${t.name} is not connected to the Interop Broker.`);n.length>1&&console.warn(`More than one connection found for identity ${t.uuid} ${t.name}`);const i=[];for(const t of n)i.push(this.addClientToContextGroup({contextGroupId:e},t));await Promise.all(i)}catch(e){throw new Error(e)}}else await this.addClientToContextGroup({contextGroupId:e},n)}async addClientToContextGroup({contextGroupId:e},t){this.wire.sendAction("interop-broker-add-client-to-context-group").catch((e=>{}));const n=this.getClientState(t);if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(!this.getContextGroups().find((t=>t.id===e)))throw new Error(`Attempting to join a context group that does not exist: ${e}. You may only join existing context groups.`);if(n.contextGroupId!==e){n.contextGroupId=e,await this.setCurrentContextGroupInClientOptions(t,e);const i=this.contextGroupsById.get(e);for(const[,e]of n.contextHandlers){const{contextType:n,handlerId:r}=e;if(void 0===n)i.forEach(((e,n)=>{this.invokeContextHandler(t,r,e)}));else if(i.has(n)){const e=i.get(n);e&&this.invokeContextHandler(t,r,e)}}}}async removeFromContextGroup({target:e},t){if(this.wire.sendAction("interop-broker-remove-from-context-group").catch((e=>{})),e){i.hasEndpointId(e)&&await this.removeClientFromContextGroup(e);try{const t=this.channel.connections.filter((t=>t.uuid===e.uuid&&t.name===e.name));if(!t.length)throw new Error(`No connection found for given Identity ${e.uuid} ${e.name}`);t.length>1&&console.warn(`More than one connection found for identity ${e.uuid} ${e.name}`);const n=[];for(const e of t)n.push(this.removeClientFromContextGroup(e));await Promise.all(n)}catch(e){throw new Error(e)}}else await this.removeClientFromContextGroup(t)}async removeClientFromContextGroup(e){this.wire.sendAction("interop-broker-remove-client-from-context-group").catch((e=>{}));const t=this.getClientState(e);t&&(t.contextGroupId=void 0),await this.setCurrentContextGroupInClientOptions(e,null)}getContextGroups(){return this.wire.sendAction("interop-broker-get-context-groups").catch((e=>{})),o(this,t,"f").map((e=>({...e})))}getInfoForContextGroup({contextGroupId:e}){return this.wire.sendAction("interop-broker-get-info-for-context-group").catch((e=>{})),this.getContextGroups().find((t=>t.id===e))}getAllClientsInContextGroup({contextGroupId:e}){this.wire.sendAction("interop-broker-get-all-clients-in-context-group").catch((e=>{}));return Array.from(this.interopClients.values()).filter((t=>t.contextGroupId===e)).map((e=>e.clientIdentity))}async handleFiredIntent(e,t){const n=(0,l.generateOverrideWarning)("fdc3.raiseIntent","InteropBroker.handleFiredIntent",t,"interopClient.fireIntent");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntent)}async setIntentTarget(e,t){this.wire.sendAction("interop-broker-set-intent-target").catch((e=>{}));const n=this.intentClientMap.get(t.name),i=`intent-handler-${e.name}`;if(n){const t=n.get(i);if(t){if(t.pendingIntents.push(e),t.clientIdentity&&t.isReady){const{clientIdentity:e,pendingIntents:n}=t;try{const r=n[n.length-1];await this.invokeIntentHandler(e,i,r),t.pendingIntents=[]}catch(n){console.error(`Error invoking intent handler for client ${e.uuid}/${e.name}/${e.endpointId}`),t.isReady=!1}}}else n.set(i,{isReady:!1,pendingIntents:[e]})}else{this.intentClientMap.set(t.name,new Map);const n=this.intentClientMap.get(t.name);n&&n.set(i,{isReady:!1,pendingIntents:[e]})}}async handleInfoForIntent(e,t){const n=(0,l.generateOverrideWarning)("fdc3.findIntent","InteropBroker.handleInfoForIntent",t,"interopClient.getInfoForIntent");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntent)}async handleInfoForIntentsByContext(e,t){const n=(0,l.generateOverrideWarning)("fdc3.findIntentsByContext","InteropBroker.handleInfoForIntentsByContext",t,"interopClient.getInfoForIntentsByContext");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntentsByContext)}async handleFiredIntentForContext(e,t){const n=(0,l.generateOverrideWarning)("fdc3.raiseIntentForContext","InteropBroker.handleFiredIntentForContext",t,"interopClient.fireIntentForContext");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntentForContext)}async clientDisconnected(e){}async fdc3HandleOpen({app:e,context:t},n){const i=(0,l.generateOverrideWarning)("fdc3.open","InteropBroker.fdc3HandleOpen",n);throw console.warn(i),new Error(l.BROKER_ERRORS.fdc3Open)}async fdc3HandleFindInstances(e,t){const n=(0,l.generateOverrideWarning)("fdc3.open","InteropBroker.fdc3HandleFindInstances",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3FindInstances)}async fdc3HandleGetAppMetadata(e,t){const n=(0,l.generateOverrideWarning)("fdc3.getAppMetadata","InteropBroker.fdc3HandleGetAppMetadata",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3GetAppMetadata)}async invokeContextHandler(e,t,n){const i=await this.getProvider();try{await i.dispatch(e,t,n)}catch(i){console.error(`Error invoking context handler ${t} for context type ${n.type} in client ${e.uuid}/${e.name}/${e.endpointId}`,i)}}async invokeIntentHandler(e,t,n){const i=await this.getProvider();await i.dispatch(e,t,n)}async fdc3HandleGetInfo(t,n){const{fdc3Version:i}=t;return{fdc3Version:i,...o(this,e,"f"),optionalFeatures:{OriginatingAppMetadata:!1,UserChannelMembershipAPIs:!0},appMetadata:{appId:"",instanceId:""}}}async getAllClientInfo(){return(await this.getProvider()).getAllClientInfo()}decorateSnapshot(e){return{...e,interopSnapshotDetails:{contextGroupStates:this.getContextGroupStates()}}}applySnapshot(e,t){const n=e?.interopSnapshotDetails?.contextGroupStates;n&&(t?.closeExistingWindows||this.updateExistingClients(n),this.rehydrateContextGroupStates(n))}updateExistingClients(e){this.interopClients.forEach((t=>{const{clientIdentity:n,contextGroupId:r,contextHandlers:o}=t;if(r){const t=e[r];for(const[,e]of Object.entries(t))o.forEach((t=>{const{handlerId:r,contextType:o}=t;i.isContextTypeCompatible(e.type,o)&&this.invokeContextHandler(n,r,e)}))}}))}getContextGroupStates(){return i.toObject(this.contextGroupsById)}rehydrateContextGroupStates(e){const t=Object.entries(e);for(const[e,n]of t){const t=Object.entries(n);for(const[n,i]of t)if(this.contextGroupsById.has(e)){this.contextGroupsById.get(e).set(n,i)}else console.warn(`Attempting to set a context group that isn't in the context group mapping. Skipping context group rehydration for: ${e}`)}}contextHandlerRegistered({contextType:e,handlerId:t},n){const i={contextType:e,handlerId:t},r=this.getClientState(n);if(r?.contextHandlers.set(t,i),r&&r.contextGroupId){const{contextGroupId:i}=r,o=this.contextGroupsById.get(i);if(void 0===e)o.forEach(((e,i)=>{this.invokeContextHandler(n,t,e)}));else if(o.has(e)){const i=o.get(e);i&&this.invokeContextHandler(n,t,i)}}}async intentHandlerRegistered(e,t){const{handlerId:n}=e,i=this.intentClientMap.get(t.name),r=i?.get(n);if(i)if(r){const{pendingIntents:e}=r;r.clientIdentity=t,r.isReady=!0;try{if(e.length>0){const i=e[e.length-1];await this.invokeIntentHandler(t,n,i),r.pendingIntents=[]}}catch(e){console.error(`Error invoking intent handler: ${n} for client ${t.uuid}/${t.name}/${t.endpointId}`)}}else i.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t});else{this.intentClientMap.set(t.name,new Map);const e=this.intentClientMap.get(t.name);e&&e.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t})}}removeContextHandler({handlerId:e},t){const n=this.getClientState(t);n&&n.contextHandlers.delete(e)}handleJoinSessionContextGroup({sessionContextGroupId:e},t){try{if(!e)throw new Error("Failed to join session context group: must specify group id.");const n=this.sessionContextGroupMap.get(e);if(n)n.registerNewClient(t);else{const n=new h.default(this.channel,e);n.registerNewClient(t),this.sessionContextGroupMap.set(e,n)}return{hasConflict:this.contextGroupsById.has(e)}}catch(e){throw new Error(e)}}getClientState(e){return this.interopClients.get(e.endpointId)}static toObject(e){const t=Object.fromEntries(e),n={};return Object.entries(t).forEach((([e,t])=>{const i=Object.fromEntries(t);n[e]=i})),n}static checkContextIntegrity(e){if(!e)return{isValid:!1,reason:"No context supplied"};if("object"!=typeof e)return{isValid:!1,reason:"Context must be an Object"};if(!e.type)return{isValid:!1,reason:"Context must have a type property"};if(e.id&&"object"!=typeof e.id)return{isValid:!1,reason:"Context id must be an Object populated with key-value identifiers (if set)"};if(e.id){const{id:t}=e,n=Object.keys(t);let i=!1;if(!n.length)return{isValid:!1,reason:"Context id must have at least one key-value identifier"};if(n.forEach((e=>{"string"==typeof e&&"string"==typeof t[e]||(i=!0)})),i)return{isValid:!1,reason:"Context id key-value identifiers must be of type string"}}return e.name&&"string"!=typeof e.name?{isValid:!1,reason:"Context name must be of string type (if set)"}:{isValid:!0}}static hasEndpointId(e){return void 0!==e.endpointId}static isContextTypeCompatible(e,t){return void 0===t||e===t}setContextGroupMap(){for(const e of this.getContextGroups())this.contextGroupsById.set(e.id,new Map)}async setCurrentContextGroupInClientOptions(e,t){try{const n=await this.fin.System.getEntityInfo(e.uuid,e.name);let i;"view"===n.entityType?i=await this.fin.View.wrap(e):"window"===n.entityType&&(i=await this.fin.Window.wrap(e)),i&&await i.updateOptions({interop:{currentContextGroup:t}})}catch(e){}}async setupChannelProvider(){try{const e=await this.getProvider();this.channel=e,this.wireChannel(e)}catch(e){throw new Error(`Error setting up Interop Broker Channel Provider: ${e}`)}}wireChannel(e){e.onConnection((async(e,t)=>{if(!await this.isConnectionAuthorized(e,t))throw new Error(`Connection not authorized for ${e.uuid}, ${e.name}`);if(!e.endpointId)throw new Error("Version too old to be compatible with Interop. Please upgrade your runtime to a more recent version.");const n={contextGroupId:void 0,contextHandlers:new Map,clientIdentity:e};t?.currentContextGroup&&this.contextGroupsById.has(t.currentContextGroup)&&(n.contextGroupId=t?.currentContextGroup),this.interopClients.set(e.endpointId,n)})),e.onDisconnection((e=>{this.interopClients.delete(e.endpointId);const t=this.intentClientMap.get(e.name);t&&e.uuid===this.fin.me.uuid&&t.forEach((e=>{e.isReady=!1})),this.sessionContextGroupMap.forEach((t=>{t.onDisconnection(e)})),this.clientDisconnected(e)})),e.beforeAction((async(e,t,n)=>{if(!await this.isActionAuthorized(e,t,n))throw new Error(`Action (${e}) not authorized for ${n.uuid}, ${n.name}`);this.logging?.beforeAction?.enabled&&console.log(e,t,n)})),e.afterAction(((e,t,n)=>{this.logging?.afterAction?.enabled&&console.log(e,t,n)})),e.register("setContext",this.setContext.bind(this)),e.register("fireIntent",this.handleFiredIntent.bind(this)),e.register("getCurrentContext",this.getCurrentContext.bind(this)),e.register("getInfoForIntent",this.handleInfoForIntent.bind(this)),e.register("getInfoForIntentsByContext",this.handleInfoForIntentsByContext.bind(this)),e.register("fireIntentForContext",this.handleFiredIntentForContext.bind(this)),e.register("getContextGroups",this.getContextGroups.bind(this)),e.register("joinContextGroup",this.joinContextGroup.bind(this)),e.register("removeFromContextGroup",this.removeFromContextGroup.bind(this)),e.register("getAllClientsInContextGroup",this.getAllClientsInContextGroup.bind(this)),e.register("getInfoForContextGroup",this.getInfoForContextGroup.bind(this)),e.register("contextHandlerRegistered",this.contextHandlerRegistered.bind(this)),e.register("intentHandlerRegistered",this.intentHandlerRegistered.bind(this)),e.register("removeContextHandler",this.removeContextHandler.bind(this)),e.register("sessionContextGroup:createIfNeeded",this.handleJoinSessionContextGroup.bind(this)),e.register("fdc3Open",this.fdc3HandleOpen.bind(this)),e.register("fdc3v2FindIntentsByContext",this.handleInfoForIntentsByContext.bind(this)),e.register("fdc3FindInstances",this.fdc3HandleFindInstances.bind(this)),e.register("fdc3GetAppMetadata",this.fdc3HandleGetAppMetadata.bind(this)),e.register("fdc3v2GetInfo",(async(e,t)=>this.fdc3HandleGetInfo.bind(this)(e,t))),e.register("createPrivateChannelProvider",(async e=>{const{channelId:t}=e,n=await this.fin.InterApplicationBus.Channel.create(t);p.PrivateChannelProvider.init(n,t)}))}isConnectionAuthorized(e,t){return this.wire.sendAction("interop-broker-is-connection-authorized").catch((e=>{})),Promise.resolve(!0)}isActionAuthorized(e,t,n){return this.wire.sendAction("interop-broker-is-action-authorized").catch((e=>{})),Promise.resolve(!0)}};return Gi.InteropBroker=f,e=new WeakMap,t=new WeakMap,n=new WeakMap,Gi}var zi,Ki={},qi={},Ji=s&&s.__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},Yi=s&&s.__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)};Object.defineProperty(qi,"__esModule",{value:!0});const Zi=d,Qi=Hi;class Xi extends Zi.Base{constructor(e,t,n){super(e),zi.set(this,void 0),this.id=n,Ji(this,zi,t,"f")}async setContext(e){this.wire.sendAction("interop-session-context-group-set-context").catch((e=>{}));return(await Yi(this,zi,"f")).dispatch(`sessionContextGroup:setContext-${this.id}`,{sessionContextGroupId:this.id,context:e})}async getCurrentContext(e){this.wire.sendAction("interop-session-context-group-get-context").catch((e=>{}));return(await Yi(this,zi,"f")).dispatch(`sessionContextGroup:getContext-${this.id}`,{sessionContextGroupId:this.id,type:e})}async addContextHandler(e,t){if(this.wire.sendAction("interop-session-context-group-add-handler").catch((e=>{})),"function"!=typeof e)throw new Error("Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");const n=await Yi(this,zi,"f");let i;return i=t?`sessionContextHandler:invoke-${this.id}-${t}-${(0,Qi.generateId)()}`:`sessionContextHandler:invoke-${this.id}`,n.register(i,(0,Qi.wrapContextHandler)(e,i)),await n.dispatch(`sessionContextGroup:handlerAdded-${this.id}`,{handlerId:i,contextType:t}),{unsubscribe:await this.createUnsubscribeCb(i)}}async createUnsubscribeCb(e){const t=await Yi(this,zi,"f");return async()=>{t.remove(e),await t.dispatch(`sessionContextGroup:handlerRemoved-${this.id}`,{handlerId:e})}}getUserInstance(){return{id:this.id,setContext:(0,Qi.wrapInTryCatch)(this.setContext.bind(this),"Failed to set context: "),getCurrentContext:(0,Qi.wrapInTryCatch)(this.getCurrentContext.bind(this),"Failed to get context: "),addContextHandler:(0,Qi.wrapInTryCatch)(this.addContextHandler.bind(this),"Failed to add context handler: ")}}}qi.default=Xi,zi=new WeakMap;var er={},tr={},nr={},ir={},rr=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),or=s&&s.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),sr=s&&s.__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)&&rr(t,e,n);return or(t,e),t};Object.defineProperty(ir,"__esModule",{value:!0}),ir.PrivateChannelClient=void 0;const ar=sr(Hi);var cr,dr;function hr(){if(cr)return tr;cr=1;var e,t=s&&s.__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)},n=s&&s.__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},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(tr,"__esModule",{value:!0}),tr.FDC3ModuleBase=void 0;const o=nr,a=Hi,c=wr(),d=r(i);return tr.FDC3ModuleBase=class{get client(){return t(this,e,"f").call(this)}get fin(){return this.wire.getFin()}constructor(t,i){this.wire=i,e.set(this,void 0),n(this,e,t,"f")}async broadcast(e){return this.wire.sendAction("fdc3-broadcast").catch((e=>{})),this.client.setContext(e)}async _open(e,t){this.wire.sendAction("fdc3-open").catch((e=>{}));try{return await c.InteropClient.ferryFdc3Call(this.client,"fdc3Open",{app:e,context:t})}catch(e){const t=e.message===a.BROKER_ERRORS.fdc3Open?"ResolverUnavailable":e.message;throw new Error(t)}}async _getChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:"system",...(0,o.getUnsupportedChannelApis)()})))}async getOrCreateChannel(e){this.wire.sendAction("fdc3-get-or-create-channel").catch((e=>{}));const t=(await this._getChannels()).find((t=>t.id===e));if(t)return{...t,type:"system",...(0,o.getUnsupportedChannelApis)()};try{const t=await this.client.joinSessionContextGroup(e);return(0,o.buildAppChannelObject)(t)}catch(e){throw console.error(e.message),new Error(o.ChannelError.CreationFailed)}}async getSystemChannels(){return this.wire.sendAction("fdc3-get-system-channels").catch((e=>{})),this._getChannels()}async joinChannel(e){this.wire.sendAction("fdc3-join-channel").catch((e=>{}));try{return await this.client.joinContextGroup(e)}catch(e){if(e.message===a.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup?console.error("The Channel you have tried to join is an App Channel. Custom Channels can only be defined by the Interop Broker through code or manifest configuration. Please use getOrCreateChannel."):console.error(e.message),e.message.startsWith("Attempting to join a context group that does not exist"))throw new Error(o.ChannelError.NoChannelFound);throw new Error(o.ChannelError.AccessDenied)}}async getCurrentChannel(){this.wire.sendAction("fdc3-get-current-channel").catch((e=>{}));const e=await this.getCurrentContextGroupInfo();return e?this.buildChannelObject(e):null}async leaveCurrentChannel(){return this.wire.sendAction("fdc3-leave-current-channel").catch((e=>{})),this.client.removeFromContextGroup()}async getCurrentContextGroupInfo(){const e=await this.client.getContextGroups(),t=e.map((async e=>this.client.getAllClientsInContextGroup(e.id))),n=(await Promise.all(t)).findIndex((e=>e.some((e=>{const{uuid:t,name:n}=e;return this.wire.me.uuid===t&&this.wire.me.name===n}))));return e[n]}async buildChannelObject(e){return{...e,type:"system",addContextListener:(...[e,t])=>{let n,i;"function"==typeof e?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),n=e):(n=t,"string"==typeof e&&(i=e));const r=(async()=>{let e=!0;const t=await this.client.getCurrentContext(i);return this.client.addContextHandler(((i,r)=>{if(!e||(e=!1,!(0,d.default)(t,i)))return n(i,r)}),i)})();return{...r,unsubscribe:()=>r.then((e=>e.unsubscribe()))}},broadcast:this.broadcast.bind(this),getCurrentContext:async e=>{const t=await this.client.getCurrentContext(e);return void 0===t?null:t}}}},e=new WeakMap,tr}ir.PrivateChannelClient=class{constructor(e,t){this.id=t,this.client=e,this.listeners=new Map}async broadcast(e){return this.client.dispatch("broadcast",{context:e})}async getCurrentContext(e){return this.client.dispatch("getCurrentContext",{contextType:e})}async addContextListener(e,t){if("function"!=typeof t)throw new Error("Non-function argument passed to the second parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");let n;n=e?`contextHandler:invoke-${this.id}-${e}-${ar.generateId()}`:`contextHandler:invoke-${this.id}-${ar.generateId()}`,this.client.register(n,ar.wrapContextHandler(t,n));const i={unsubscribe:await this.createContextUnsubscribeCb(n)};return this.listeners.set(n,i),await this.client.dispatch("contextHandlerAdded",{handlerId:n,contextType:e}),i}createNonStandardUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch("nonStandardHandlerRemoved",{handlerId:e})}}createContextUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch("contextHandlerRemoved",{handlerId:e})}}onAddContextListener(e){const t=`onContextHandlerAdded:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch("onAddContextHandlerAdded",{handlerId:t}),n}onDisconnect(e){const t=`onDisconnect:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch("onDisconnectHandlerAdded",{handlerId:t}),n}onUnsubscribe(e){const t=`onUnsubscribe:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch("onUnsubscribeHandlerAdded",{handlerId:t}),n}async cleanUpAllSubs(){Array.from(this.listeners.keys()).forEach((e=>{this.client.remove(e),this.listeners.delete(e)}))}async disconnect(){try{await this.client.dispatch("clientDisconnecting"),await this.cleanUpAllSubs(),await this.client.disconnect()}catch(e){throw new Error(e.message)}}},function(e){var t=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.getIntentResolution=e.isChannel=e.isContext=e.connectPrivateChannel=e.buildAppChannelObject=e.buildPrivateChannelObject=e.ChannelError=e.ResultError=e.UnsupportedChannelApiError=e.getUnsupportedChannelApis=void 0;const n=Hi,r=ir,o=t(i);e.getUnsupportedChannelApis=e=>({addContextListener:()=>{throw new a("Channel.addContextListener",e)},broadcast:()=>{throw new a("Channel.broadcast",e)},getCurrentContext:()=>{throw new a("Channel.getCurrentContext",e)}});class a extends Error{constructor(e,t="System"){super(e),this.message=`Calling ${e} on an instance of a ${t} Channel returned by fdc3.get${t}Channels is not supported. If you would like to use a ${t} Channel, please use fdc3.joinChannel, fdc3.addContextListener, and fdc3.broadcast instead.`}}var c,d;e.UnsupportedChannelApiError=a,function(e){e.NoResultReturned="NoResultReturned",e.IntentHandlerRejected="IntentHandlerRejected"}(c=e.ResultError||(e.ResultError={})),(d=e.ChannelError||(e.ChannelError={})).NoChannelFound="NoChannelFound",d.AccessDenied="AccessDenied",d.CreationFailed="CreationFailed";e.buildPrivateChannelObject=e=>{let t=!1;const n=()=>{if(t)throw new Error("Private Channel Client has been disconnected from the Private Channel")};return{id:e.id,type:"private",broadcast:async t=>(n(),e.broadcast(t)),getCurrentContext:async t=>(n(),e.getCurrentContext(t)),addContextListener:async(t,i)=>{n();let r=i,o=t;"function"==typeof t&&(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),r=t,o=null);return e.addContextListener(o,r)},onAddContextListener:t=>(n(),e.onAddContextListener(t)),disconnect:async()=>(n(),t=!0,e.disconnect()),onDisconnect:t=>(n(),e.onDisconnect(t)),onUnsubscribe:t=>(n(),e.onUnsubscribe(t))}};e.buildAppChannelObject=e=>({id:e.id,type:"app",broadcast:e.setContext,getCurrentContext:async t=>{const n=await e.getCurrentContext(t);return void 0===n?null:n},addContextListener:(t,n)=>{let i,r;"function"==typeof t?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),i=t):(i=n,"string"==typeof t&&(r=t));const s=(async()=>{let t=!0;const n=await e.getCurrentContext(r);return e.addContextHandler(((e,r)=>{if(!t||(t=!1,!(0,o.default)(n,e)))return i(e,r)}),r)})();return{...s,unsubscribe:()=>s.then((e=>e.unsubscribe()))}}});e.connectPrivateChannel=async t=>{try{const n=await fin.InterApplicationBus.Channel.connect(t),i=new r.PrivateChannelClient(n,t);return(0,e.buildPrivateChannelObject)(i)}catch(e){throw new Error(`Private Channel with id: ${t} doesn't exist`)}};e.isContext=e=>{if(e&&"object"==typeof e&&"type"in e){const{type:t}=e;return"string"==typeof t}return!1};e.isChannel=e=>{if(e&&"object"==typeof e&&"type"in e&&"id"in e){const{type:t,id:n}=e;return"string"==typeof t&&"string"==typeof n&&("app"===t||"private"===t)}return!1};e.getIntentResolution=async(t,i,r,o)=>{const s=(0,n.generateId)(),a=new Promise(((e,t)=>{fin.InterApplicationBus.subscribe({uuid:"*"},s,(t=>{e(t)})).catch((()=>t(new Error("getResult is not supported in this environment"))))})),d=r?{target:r,intentResolutionResultId:s}:{intentResolutionResultId:s},h=o?{name:o,context:i,metadata:d}:{...i,metadata:d},l=async()=>{let n=await a;if(!n||"object"!=typeof n)throw new Error(c.NoResultReturned);const{error:i}=n;if(i)throw new Error(c.IntentHandlerRejected);if((0,e.isChannel)(n)){const{id:i,type:r}=n;switch(r){case"private":n=await(0,e.connectPrivateChannel)(i);break;case"app":{const r=await t.joinSessionContextGroup(i);n=(0,e.buildAppChannelObject)(r);break}}}else if(!(0,e.isContext)(n))throw new Error(c.NoResultReturned);return n},u=o?await t.fireIntent(h):await t.fireIntentForContext(h);return"object"!=typeof u?{source:{appId:"",instanceId:""},intent:"",version:"2.0",getResult:l}:{...u,getResult:l}}}(nr);var lr,ur,pr={};function wr(){if(ur)return Ki;ur=1;var e,t,n=s&&s.__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},i=s&&s.__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)},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ki,"__esModule",{value:!0}),Ki.InteropClient=void 0;const o=d,a=r(qi),c=function(){if(dr)return er;dr=1,Object.defineProperty(er,"__esModule",{value:!0}),er.Fdc3Module=void 0;const e=Hi,t=hr();class n extends t.FDC3ModuleBase{async open(e,t){await super._open(e,t)}addContextListener(e,t){let n;return this.wire.sendAction("fdc3-add-context-listener").catch((e=>{})),"function"==typeof e?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),n=this.client.addContextHandler(e)):n=this.client.addContextHandler(t,null===e?void 0:e),{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}addIntentListener(e,t){this.wire.sendAction("fdc3-add-intent-listener").catch((e=>{}));const n=this.client.registerIntentHandler((e=>{const{context:n,metadata:i}=e,{metadata:r}=n,o=i?.intentResolutionResultId||r?.intentResolutionResultId;o&&this.fin.InterApplicationBus.publish(o,null).catch((()=>null)),t(e.context)}),e,{fdc3Version:"1.2"});return{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}async raiseIntent(t,n,i){this.wire.sendAction("fdc3-raise-intent").catch((e=>{}));const r=i?{name:t,context:n,metadata:{target:i}}:{name:t,context:n};try{return await this.client.fireIntent(r)}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntent?"ResolverUnavailable":t.message;throw new Error(n)}}async findIntent(t,n){this.wire.sendAction("fdc3-find-intent").catch((e=>{}));try{return await this.client.getInfoForIntent({name:t,context:n})}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntent?"ResolverUnavailable":t.message;throw new Error(n)}}async findIntentsByContext(t){this.wire.sendAction("fdc3-find-intents-by-context").catch((e=>{}));try{return await this.client.getInfoForIntentsByContext(t)}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntentsByContext?"ResolverUnavailable":t.message;throw new Error(n)}}async raiseIntentForContext(t,n){this.wire.sendAction("fdc3-raise-intent-for-context").catch((e=>{}));try{return await this.client.fireIntentForContext({...t,metadata:{target:n}})}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntentForContext?"ResolverUnavailable":t.message;throw new Error(n)}}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}getInfo(){return this.wire.sendAction("fdc3-get-info").catch((e=>{})),{providerVersion:this.wire.environment.getAdapterVersionSync(),provider:`openfin-${this.wire.me.uuid}`,fdc3Version:"1.2"}}}return er.Fdc3Module=n,er}(),h=function(){if(lr)return pr;lr=1,Object.defineProperty(pr,"__esModule",{value:!0}),pr.Fdc3Module2=void 0;const e=hr(),t=Hi,n=wr(),i=nr,r=ir;class o extends e.FDC3ModuleBase{async open(e,t){return"string"==typeof e&&console.warn("Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string })."),super._open(e,t)}async findInstances(e){this.wire.sendAction("fdc3-find-instances").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,"fdc3FindInstances",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3FindInstances?"ResolverUnavailable":e.message;throw new Error(n)}}async getAppMetadata(e){this.wire.sendAction("fdc3-get-app-metadata").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,"fdc3GetAppMetadata",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3GetAppMetadata?"ResolverUnavailable":e.message;throw new Error(n)}}async addContextListener(e,t){this.wire.sendAction("fdc3-add-context-listener").catch((e=>{}));const n=e=>t=>{const{contextMetadata:n,...i}=t,r=n?[{...i},n]:[t,null];e(...r)};let i=t,r=n(i);return"function"==typeof e?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),i=e,r=n(i),this.client.addContextHandler(r)):this.client.addContextHandler(r,null===e?void 0:e)}async findIntent(e,n,i){this.wire.sendAction("fdc3-find-intent").catch((e=>{}));try{return await this.client.getInfoForIntent({name:e,context:n,metadata:{resultType:i}})}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntent?"ResolverUnavailable":e.message;throw new Error(n)}}async findIntentsByContext(e,i){this.wire.sendAction("fdc3-find-intents-by-context").catch((e=>{}));const r=i?{context:e,metadata:{resultType:i}}:e;try{return await n.InteropClient.ferryFdc3Call(this.client,"fdc3v2FindIntentsByContext",r)}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntentsByContext?"ResolverUnavailable":e.message;throw new Error(n)}}async raiseIntent(e,n,r){this.wire.sendAction("fdc3-raise-intent").catch((e=>{}));try{return"string"==typeof r&&console.warn("Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string })."),(0,i.getIntentResolution)(this.client,n,r,e)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?"ResolverUnavailable":e.message;throw new Error(n)}}async raiseIntentForContext(e,n){this.wire.sendAction("fdc3-raise-intent-for-context").catch((e=>{}));try{return"string"==typeof n&&console.warn("Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string })."),(0,i.getIntentResolution)(this.client,e,n)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?"ResolverUnavailable":e.message;throw new Error(n)}}async addIntentListener(e,t){if(this.wire.sendAction("fdc3-add-intent-listener").catch((e=>{})),"string"!=typeof e)throw new Error("First argument must be an Intent name");return this.client.registerIntentHandler((async e=>{let n,i;const{context:r,metadata:o}=e,{contextMetadata:s,metadata:a,...c}=r,d=o?.intentResolutionResultId||a?.intentResolutionResultId;try{const e=a?{metadata:a,...c}:{...c};n=await t(e,s),i=n}catch(e){n=e,i={error:!0}}if(d&&this.fin.InterApplicationBus.publish(d,i).catch((()=>null)),n instanceof Error)throw new Error(n.message);return n}),e,{fdc3Version:"2.0"})}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}async createPrivateChannel(){const e=(0,t.generateId)();await n.InteropClient.ferryFdc3Call(this.client,"createPrivateChannelProvider",{channelId:e});const o=await this.fin.InterApplicationBus.Channel.connect(e),s=new r.PrivateChannelClient(o,e);return(0,i.buildPrivateChannelObject)(s)}async getUserChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:"user",...(0,i.getUnsupportedChannelApis)("User")})))}async getSystemChannels(){return console.warn("This API has been deprecated. Please use fdc3.getUserChannels instead."),super.getSystemChannels()}async joinUserChannel(e){return super.joinChannel(e)}async joinChannel(e){return console.warn("This API has been deprecated. Please use fdc3.joinUserChannel instead."),super.joinChannel(e)}async getCurrentChannel(){const e=await super.getCurrentChannel();return e?{...e,type:"user",broadcast:this.broadcast.bind(this)}:null}async getInfo(){return n.InteropClient.ferryFdc3Call(this.client,"fdc3v2GetInfo",{fdc3Version:"2.0"})}}return pr.Fdc3Module2=o,pr}(),l=Hi;let u=class extends o.Base{constructor(i,r){super(i),e.set(this,void 0),t.set(this,void 0),n(this,t,new Map,"f"),n(this,e,r,"f")}async setContext(t){this.wire.sendAction("interop-client-set-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("setContext",{context:t})}async addContextHandler(t,n){if(this.wire.sendAction("interop-client-add-context-handler").catch((e=>{})),"function"!=typeof t)throw new Error("Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");const r=await i(this,e,"f");let o;o=n?`invokeContextHandler-${n}-${(0,l.generateId)()}`:"invokeContextHandler";const s=(0,l.wrapContextHandler)(t,o);return r.register(o,s),await r.dispatch("contextHandlerRegistered",{handlerId:o,contextType:n}),{unsubscribe:async()=>{r.remove(o),await r.dispatch("removeContextHandler",{handlerId:o})}}}async getContextGroups(){this.wire.sendAction("interop-client-get-context-groups").catch((e=>{}));return(await i(this,e,"f")).dispatch("getContextGroups")}async joinContextGroup(t,n){this.wire.sendAction("interop-client-join-context-group").catch((e=>{}));const r=await i(this,e,"f");if(!t)throw new Error("No contextGroupId specified for joinContextGroup.");return r.dispatch("joinContextGroup",{contextGroupId:t,target:n})}async removeFromContextGroup(t){this.wire.sendAction("interop-client-remove-from-context-group").catch((e=>{}));return(await i(this,e,"f")).dispatch("removeFromContextGroup",{target:t})}async getAllClientsInContextGroup(t){this.wire.sendAction("interop-client-get-all-clients-in-context-group").catch((e=>{}));const n=await i(this,e,"f");if(!t)throw new Error("No contextGroupId specified for getAllClientsInContextGroup.");return n.dispatch("getAllClientsInContextGroup",{contextGroupId:t})}async getInfoForContextGroup(t){this.wire.sendAction("interop-client-get-info-for-context-group").catch((e=>{}));const n=await i(this,e,"f");if(!t)throw new Error("No contextGroupId specified for getInfoForContextGroup.");return n.dispatch("getInfoForContextGroup",{contextGroupId:t})}async fireIntent(t){this.wire.sendAction("interop-client-fire-intent").catch((e=>{}));return(await i(this,e,"f")).dispatch("fireIntent",t)}async registerIntentHandler(t,n,r){this.wire.sendAction("interop-client-register-intent-handler").catch((e=>{}));const o=await i(this,e,"f"),s=`intent-handler-${n}`,a=(0,l.wrapIntentHandler)(t,s);try{await o.register(s,a),await o.dispatch("intentHandlerRegistered",{handlerId:s,...r})}catch(e){throw new Error("Unable to register intent handler")}return{unsubscribe:async()=>{o.remove(s)}}}async getCurrentContext(t){this.wire.sendAction("interop-client-get-current-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("getCurrentContext",{contextType:t})}async getInfoForIntent(t){this.wire.sendAction("interop-client-get-info-for-intent").catch((e=>{}));return(await i(this,e,"f")).dispatch("getInfoForIntent",t)}async getInfoForIntentsByContext(t){this.wire.sendAction("interop-client-get-info-for-intents-by-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("getInfoForIntentsByContext",t)}async fireIntentForContext(t){this.wire.sendAction("interop-client-fire-intent-for-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("fireIntentForContext",t)}async joinSessionContextGroup(n){try{const r=i(this,t,"f").get(n);if(r)return r.getUserInstance();const o=await i(this,e,"f"),{hasConflict:s}=await o.dispatch("sessionContextGroup:createIfNeeded",{sessionContextGroupId:n});s&&console.warn(`A (non-session) context group with the name "${n}" already exists. If you are trying to join a Context Group, call joinContextGroup instead.`);const c=new a.default(this.wire,i(this,e,"f"),n);return i(this,t,"f").set(n,c),c.getUserInstance()}catch(e){throw console.error(`Error thrown trying to create Session Context Group with id "${n}": ${e}`),e}}async onDisconnection(t){this.wire.sendAction("interop-client-add-ondisconnection-listener").catch((e=>{}));return(await i(this,e,"f")).onDisconnection((e=>{const{uuid:n}=e;t({type:"interop-broker",topic:"disconnected",brokerName:n})}))}getFDC3Sync(e){switch(e){case"1.2":return new c.Fdc3Module((()=>this),this.wire);case"2.0":return new h.Fdc3Module2((()=>this),this.wire);default:throw new Error(`Invalid FDC3 version provided: ${e}. Must be '1.2' or '2.0'`)}}async getFDC3(e){return this.getFDC3Sync(e)}static async ferryFdc3Call(t,n,r){return(await i(t,e,"f")).dispatch(n,r||null)}};return Ki.InteropClient=u,e=new WeakMap,t=new WeakMap,Ki}var yr,fr,gr,mr={};function vr(){if(yr)return mr;yr=1,Object.defineProperty(mr,"__esModule",{value:!0}),mr.overrideCheck=mr.checkFDC32Overrides=mr.getDefaultViewFdc3VersionFromAppInfo=void 0;const e=Vi();function t(t){return["fdc3HandleFindInstances","handleInfoForIntent","handleInfoForIntentsByContext","fdc3HandleGetAppMetadata","fdc3HandleGetInfo","fdc3HandleOpen","handleFiredIntent","handleFiredIntentForContext"].filter((n=>t[n]===e.InteropBroker.prototype[n]))}return mr.getDefaultViewFdc3VersionFromAppInfo=function({manifest:e,initialOptions:t}){const n=e?.platform?.defaultViewOptions?.fdc3InteropApi??t.defaultViewOptions?.fdc3InteropApi;return["1.2","2.0"].includes(n??"")?n:void 0},mr.checkFDC32Overrides=t,mr.overrideCheck=function(e,n){if(n&&"2.0"===n){const n=t(e);n.length>0&&console.warn(`WARNING: FDC3 2.0 has been set as a default option for Views in this Platform, but the required InteropBroker APIs for FDC3 2.0 compliance have not all been overridden.\nThe following APIs need to be overridden:\n${n.join("\n")}`)}},mr}function Cr(){return gr||(gr=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),i=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),i(function(){if(fr)return Ti;fr=1;var e=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ti,"__esModule",{value:!0}),Ti.InteropModule=void 0;const t=e(n),i=$i,r=d,o=Vi(),a=wr(),c=vr(),h=Tn,l=e=>new e,u="You have attempted to use or modify InteropBroker parameters, which is not allowed. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.";class p extends r.Base{async init(e,n=l){this.wire.sendAction("interop-init").catch((()=>{}));const r=await this.wire.environment.getInteropInfo(this.wire.getFin()),s=(0,i.createUnusableObject)(u),a=(0,i.createWarningObject)(u,(0,t.default)(r)),d=async()=>{throw new Error(u)},p=o.InteropBroker.createClosedConstructor(this.wire,(()=>this.fin.InterApplicationBus.Channel.create(`interop-broker-${e}`)),r);let w;return w=Array.isArray(n)?new((0,h.overrideFromComposables)(...n)(p))(s,d,a):await n(p,s,d,a),(0,c.overrideCheck)(w,r.fdc3Version),w}connectSync(e,t){return this.wire.sendAction("interop-connect-sync").catch((()=>{})),new a.InteropClient(this.wire,this.wire.environment.whenReady().then((()=>this.fin.InterApplicationBus.Channel.connect(`interop-broker-${e}`,{payload:t}))))}}return Ti.InteropModule=p,Ti}(),e),i(wr(),e),i(Vi(),e)}(Li)),Li}var br={},Ir={},Er={},xr={};Object.defineProperty(xr,"__esModule",{value:!0}),xr.getSnapshotSourceChannelName=void 0;xr.getSnapshotSourceChannelName=e=>`snapshot-source-provider-${e.uuid}`;var Ar,Pr,Mr,_r,Or,Sr=s&&s.__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},Rr=s&&s.__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)};Object.defineProperty(Er,"__esModule",{value:!0}),Er.SnapshotSource=void 0;const Fr=d,jr=xr,kr=new Map;class Lr extends Fr.Base{constructor(e,t){super(e),Ar.set(this,void 0),Pr.set(this,(()=>(kr.has(this.identity.uuid)||kr.set(this.identity.uuid,{eventFired:null,clientPromise:null}),kr.get(this.identity.uuid)))),Mr.set(this,(()=>(Rr(this,Pr,"f").call(this).clientPromise||(Rr(this,Pr,"f").call(this).clientPromise=Rr(this,_r,"f").call(this)),Rr(this,Pr,"f").call(this).clientPromise))),_r.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);try{Rr(this,Pr,"f").call(this).eventFired||await Rr(this,Or,"f").call(this);const t=await this.fin.InterApplicationBus.Channel.connect(e,{wait:!1});return t.onDisconnection((()=>{Rr(this,Pr,"f").call(this).clientPromise=null,Rr(this,Pr,"f").call(this).eventFired=null})),t}catch(e){throw Rr(this,Pr,"f").call(this).clientPromise=null,new Error("The targeted SnapshotSource is not currently initialized. Await this object's ready() method.")}})),Or.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);let t,n;const i=new Promise(((e,i)=>{t=e,n=i}));Rr(this,Pr,"f").call(this).eventFired=i;const r=async i=>{try{i.channelName===e&&(t(),await this.fin.InterApplicationBus.Channel.removeListener("connected",r))}catch(e){n(e)}};await this.fin.InterApplicationBus.Channel.on("connected",r)})),Sr(this,Ar,t,"f")}get identity(){return Rr(this,Ar,"f")}async ready(){this.wire.sendAction("snapshot-source-ready").catch((e=>{}));try{await Rr(this,Mr,"f").call(this)}catch(e){await Rr(this,Pr,"f").call(this).eventFired}}async getSnapshot(){this.wire.sendAction("snapshot-source-get-snapshot").catch((e=>{}));const e=await Rr(this,Mr,"f").call(this),t=await e.dispatch("get-snapshot");return(await t).snapshot}async applySnapshot(e){this.wire.sendAction("snapshot-source-apply-snapshot").catch((e=>{}));return(await Rr(this,Mr,"f").call(this)).dispatch("apply-snapshot",{snapshot:e})}}Er.SnapshotSource=Lr,Ar=new WeakMap,Pr=new WeakMap,Mr=new WeakMap,_r=new WeakMap,Or=new WeakMap,Object.defineProperty(Ir,"__esModule",{value:!0}),Ir.SnapshotSourceModule=void 0;const Tr=d,$r=Er,Br=xr;class Gr extends Tr.Base{async init(e){if(this.wire.sendAction("snapshot-source-init").catch((e=>{})),"object"!=typeof e||"function"!=typeof e.getSnapshot||"function"!=typeof e.applySnapshot)throw new Error("you must pass in a valid SnapshotProvider");const t=await this.fin.InterApplicationBus.Channel.create((0,Br.getSnapshotSourceChannelName)(this.fin.me));t.register("get-snapshot",(async()=>({snapshot:await e.getSnapshot()}))),t.register("apply-snapshot",(({snapshot:t})=>e.applySnapshot(t)))}wrapSync(e){return this.wire.sendAction("snapshot-source-wrap-sync").catch((e=>{})),new $r.SnapshotSource(this.wire,e)}async wrap(e){return this.wire.sendAction("snapshot-source-wrap").catch((e=>{})),this.wrapSync(e)}}Ir.SnapshotSourceModule=Gr,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Ir,e),n(Er,e)}(br),Object.defineProperty(a,"__esModule",{value:!0});var Wr=a.Fin=void 0;const Hr=t,Nr=c,Dr=ie(),Ur=Z(),Vr=de,zr=en,Kr=rn,qr=un,Jr=bn,Yr=J(),Zr=An,Qr=ki,Xr=Cr(),eo=br;class to extends Hr.EventEmitter{constructor(e){super(),this.wire=e,this.System=new Nr.System(e),this.Window=new Dr._WindowModule(e),this.Application=new Ur.ApplicationModule(e),this.InterApplicationBus=new Vr.InterApplicationBus(e),this.Clipboard=new zr.Clipboard(e),this.ExternalApplication=new Kr.ExternalApplicationModule(e),this.Frame=new qr._FrameModule(e),this.GlobalHotkey=new Jr.GlobalHotkey(e),this.Platform=new Zr.PlatformModule(e,this.InterApplicationBus.Channel),this.View=new Yr.ViewModule(e),this.Interop=new Xr.InteropModule(e),this.SnapshotSource=new eo.SnapshotSourceModule(e),e.registerFin(this),this.me=(0,Qr.getMe)(e),e.on("disconnected",(()=>{this.emit("disconnected")}))}}Wr=a.Fin=to;var no={},io={};function ro(e){return"string"==typeof e.manifestUrl}function oo(e){return ao(e)&&"string"==typeof e.address}function so(e){return oo(e)&&"string"==typeof e.token}function ao(e){return"string"==typeof e.uuid}function co(e){return e.runtime&&"string"==typeof e.runtime.version}function ho(e){return ao(e)&&co(e)}Object.defineProperty(io,"__esModule",{value:!0}),io.isInternalConnectConfig=io.isPortDiscoveryConfig=io.isNewConnectConfig=io.isConfigWithReceiver=io.isRemoteConfig=io.isExistingConnectConfig=io.isExternalConfig=void 0,io.isExternalConfig=ro,io.isExistingConnectConfig=oo,io.isRemoteConfig=so,io.isConfigWithReceiver=function(e){return"object"==typeof e.receiver&&so({...e,address:""})},io.isNewConnectConfig=ho,io.isPortDiscoveryConfig=function(e){return ro(e)&&co(e)||ho(e)},io.isInternalConnectConfig=function(e){return oo(e)||ho(e)};var lo={},uo={};Object.defineProperty(uo,"__esModule",{value:!0}),uo.EmitterMap=void 0;const po=t;function wo(e){return Buffer.from(e).toString("base64")}uo.EmitterMap=class{constructor(){this.storage=new Map}hashKeys(e){return e.map(wo).join("/")}getOrCreate(e){const t=this.hashKeys(e);return this.storage.has(t)||this.storage.set(t,new po.EventEmitter),this.storage.get(t)}has(e){return this.storage.has(this.hashKeys(e))}delete(e){const t=this.hashKeys(e);return this.storage.delete(t)}},Object.defineProperty(lo,"__esModule",{value:!0});const yo=uo;class fo extends yo.EmitterMap{constructor(){super(...arguments),this.dispatchEvent=e=>{if(function(e){return"process-desktop-event"===e.action}(e)){const{payload:t}=e,n=function(e){const{topic:t}=e;if("frame"===t||"window"===t||"view"===t){const{uuid:n,name:i}=e;return[t,n,i]}if("application"===t){const{uuid:n}=e;return[t,n]}return[t]}(t);if(this.has(n))return this.getOrCreate(n).emit(t.type,t),!0}return!1}}}lo.default=fo;var go,mo,vo=s&&s.__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},Co=s&&s.__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)},bo=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(no,"__esModule",{value:!0});var Io=no.Transport=void 0;const Eo=t,xo=io,Ao=g,Po=bo(lo),Mo=ki,_o=ke;class Oo extends Eo.EventEmitter{constructor(e,t,n){super(),this.wireListeners=new Map,this.topicRefMap=new Map,this.eventAggregator=new Po.default,this.messageHandlers=[this.eventAggregator.dispatchEvent],go.set(this,void 0),mo.set(this,void 0),this.connectSync=()=>{Co(this,go,"f").connectSync()},this.getPort=()=>Co(this,go,"f").getPort(),vo(this,go,new e(this.onmessage.bind(this)),"f"),this.environment=t,this.sendRaw=Co(this,go,"f").send.bind(Co(this,go,"f")),this.registerMessageHandler(this.handleMessage.bind(this)),Co(this,go,"f").on("disconnected",(()=>{for(const[,{handleNack:e}]of this.wireListeners)e({reason:"Remote connection has closed"});this.wireListeners.clear(),this.emit("disconnected")}));const{uuid:i,name:r}=n,o=this.environment.getCurrentEntityType();this.me=(0,Mo.getBaseMe)(o,i,r)}getFin(){if(!Co(this,mo,"f"))throw new Error("No Fin object registered for this transport");return Co(this,mo,"f")}registerFin(e){if(Co(this,mo,"f"))throw new Error("Fin object has already been registered for this transport");vo(this,mo,e,"f")}shutdown(){return Co(this,go,"f").shutdown()}async connect(e){if((0,xo.isConfigWithReceiver)(e))return await Co(this,go,"f").connect(e.receiver),this.authorize(e);if((0,xo.isRemoteConfig)(e))return this.connectRemote(e);if((0,xo.isExistingConnectConfig)(e))return this.connectByPort(e);if((0,xo.isNewConnectConfig)(e)){const t=await this.environment.retrievePort(e);return this.connectByPort({...e,address:`ws://localhost:${t}`})}}async connectRemote(e){return await Co(this,go,"f").connect(new(this.environment.getWsConstructor())(e.address)),this.authorize(e)}async connectByPort(e){const{address:t,uuid:n}=e,i={...e,type:"file-token"},r=Co(this,go,"f");await r.connect(new(this.environment.getWsConstructor())(e.address));const o=await this.sendAction("request-external-authorization",{uuid:n,type:"file-token"},!0);if("external-authorization-response"!==o.action)throw new Ao.UnexpectedActionError(o.action);return await this.environment.writeToken(o.payload.file,o.payload.token),this.authorize(i)}async authorize(e){const t=await this.sendAction("request-authorization",e,!0);if("authorization-response"!==t.action)throw new Ao.UnexpectedActionError(t.action);if(!0!==t.payload.success)throw new Ao.RuntimeError(t.payload)}sendAction(e,t={},n=!1){let i=()=>{};const r=Ao.RuntimeError.getCallSite(1),o=this.environment.getNextMessageId(),s=new Promise(((s,a)=>{i=a;const c={action:e,payload:t,messageId:o},d=Co(this,go,"f");return this.addWireListener(o,s,(e=>this.nackHandler(e,a,r)),n),d.send(c).catch(a)}));return Object.assign(s,{cancel:i,messageId:o})}nackHandler(e,t,n){t("string"==typeof e?e:new Ao.RuntimeError(e,n))}ferryAction(e){return new Promise(((t,n)=>{const i=this.environment.getNextMessageId();e.messageId=i;const r=e=>{t(e.payload)};return Co(this,go,"f").send(e).then((()=>this.addWireListener(i,r,(e=>this.nackHandler(e,n)),!1))).catch(n)}))}registerMessageHandler(e){this.messageHandlers.push(e)}addWireListener(e,t,n,i){i?this.uncorrelatedListener=t:this.wireListeners.has(e)?n({reason:"Duplicate handler id",error:(0,_o.errorToPOJO)(new Ao.DuplicateCorrelationError(String(e)))}):this.wireListeners.set(e,{resolve:t,handleNack:n})}onmessage(e){for(const t of this.messageHandlers)t.call(null,e)}handleMessage(e){const t=e.correlationId||NaN;if("correlationId"in e){if(!this.wireListeners.has(t))return!1;{const{resolve:n,handleNack:i}=this.wireListeners.get(t);"ack"!==e.action?i({reason:"Did not receive ack action",error:(0,_o.errorToPOJO)(new Ao.NoAckError(e.action))}):"payload"in e?e.payload.success?n.call(null,e):i(e.payload):"string"==typeof e.reason?i(e):(console.warn("Received invalid response from core",e),i({reason:"invalid response shape"})),this.wireListeners.delete(t)}}else this.uncorrelatedListener&&this.uncorrelatedListener.call(null,e),this.uncorrelatedListener=()=>{};return!0}}Io=no.Transport=Oo,go=new WeakMap,mo=new WeakMap;const So=(...e)=>({log:(...t)=>console.debug(`[${(new Date).toISOString()}]`,...(e=>e.map((e=>`[${e}]`)))(e),...t),getLogger:(...t)=>So(...e,...t)}),Ro=So("@openfin/core-web/client");function Fo(e,t){if(!function(e){return"string"==typeof e}(e))throw new Error(`Property ${t} has invalid type. Expected string, got ${typeof e}.`)}const jo="web-broker-ports-ready",ko=Ro.getLogger("get-web-interop-ports");function Lo(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)}function To(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}"function"==typeof SuppressedError&&SuppressedError;const $o=e=>{var n,i,r;return r=class extends t.EventEmitter{constructor(t){super(),n.set(this,void 0),i.set(this,!1),this.connectSync=()=>{Lo(this,i,"f")||(e.addEventListener("message",(e=>{e.data?.topic?.startsWith("wire-message")&&e.data.message&&Lo(this,n,"f").call(this,{...JSON.parse(e.data.message),ports:e.ports})})),e.start())},this.connect=async()=>{this.connectSync()},this.send=t=>(e.postMessage({topic:"wire-message",message:JSON.stringify(t)}),Promise.resolve()),this.shutdown=async()=>{e.close()},To(this,n,t,"f")}getPort(){return e}},n=new WeakMap,i=new WeakMap,r};var Bo={},Go={};Object.defineProperty(Go,"__esModule",{value:!0}),Go.BaseEnvironment=void 0;const Wo=vr();Go.BaseEnvironment=class{async getViewWindowIdentity(e,t){const{identity:n}=await e.View.wrapSync(t).getCurrentWindow();return n}async getInteropInfo(e){const t=await e.Application.getCurrentSync().getInfo().catch((()=>null)),n=t?.initialOptions?.interopBrokerConfiguration??{};return{fdc3Version:t?(0,Wo.getDefaultViewFdc3VersionFromAppInfo)(t):void 0,...n,fdc3Info:{providerVersion:await e.System.getVersion(),provider:"OpenFin"}}}},Object.defineProperty(Bo,"__esModule",{value:!0});var Ho=Bo.BrowserEnvironment=void 0;const No=Go;class Do extends No.BaseEnvironment{constructor(){super(...arguments),this.type="other",this.getRandomId=()=>{const e=new Uint32Array(1);return window.crypto.getRandomValues(e)[0].toString(32)}}getAdapterVersionSync(){return""}observeBounds(e,t){throw new Error("Method not implemented.")}layoutAllowedInContext(e){return!1}initLayoutManager(e,t,n){throw new Error("Method not implemented.")}applyLayoutSnapshot(e,t,n){throw new Error("Method not implemented.")}createLayout(e,t){throw new Error("Method not implemented.")}destroyLayout(e,t){throw new Error("Method not implemented.")}resolveLayout(e,t){throw new Error("Method not implemented.")}initPlatform(...e){throw new Error("Method not implemented.")}writeToken(e,t){return Promise.resolve("")}retrievePort(e){throw new Error("Method not implemented.")}getNextMessageId(){return this.getRandomId()}createChildContent(e){throw new Error("Method not implemented.")}getWebWindow(e){throw new Error("Method not implemented.")}getCurrentEntityIdentity(){throw new Error("Method not implemented.")}getCurrentEntityType(){return"external connection"}raiseEvent(e,t){throw new Error("Method not implemented.")}getUrl(){return location.href}getDefaultChannelOptions(){return{create:{},connect:{}}}getRtcPeer(){return new RTCPeerConnection}getWsConstructor(){return WebSocket}whenReady(){return Promise.resolve()}}Ho=Bo.BrowserEnvironment=Do;const Uo=e=>"platform"in e&&void 0!==e.platform;var Vo,zo;class Ko extends Ho{constructor(e){super(),this.connectConfig=e,Vo.set(this,void 0),zo.set(this,new W((async()=>Promise.resolve().then((function(){return __webpack_require__(/*! ./main-b14f67c9.js */ "../../node_modules/@openfin/core-web/out/main-b14f67c9.js")}))))),Uo(e)&&this.validatePlatformOptions(e)}getAdapterVersionSync(){return"0.39.21"}validatePlatformOptions({platform:e}){if(!("layoutSnapshot"in e))throw new Error("Platform options are missing layoutSnapshot. Please provide a layoutSnapshot in the platform options.");if("windows"in e||"windows"in e.layoutSnapshot)throw new Error("It appears you tried to call connect() with a snapshot object from an OpenFin desktop environment. Note that connect() expects to be called with a platform property with this structure: { platform: { layoutSnapshot } }. To get a layoutSnapshot of the expected structure, use fin.Platform.Layout.getCurrentLayoutManagerSync().getLayoutSnapshot() in v34+ in your desktop environment.");const{layouts:t}=e.layoutSnapshot;Object.entries(t).map((([e,t])=>{if("object"!=typeof t||null===t)throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must be an object.`);if(!("content"in t))throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must contain a 'content' property.`)}))}async getInteropInfo(e){return{...{contextGroups:void 0,logging:{beforeAction:{enabled:!1},afterAction:{enabled:!1}}},fdc3Version:void 0,fdc3Info:{providerVersion:"0.39.21",provider:"OpenFin Web"}}}layoutAllowedInContext(e){return!0}async initLayoutManager(e,t,n){if(Lo(this,Vo,"f"))throw new Error("Layout already initialized.");if(!Uo(this.connectConfig))throw new Error("Platform options are missing from connection config.");const{WebLayoutEntryPoint:i}=await Lo(this,zo,"f").getValue();return To(this,Vo,new i(this.connectConfig),"f"),await Lo(this,Vo,"f").initLayoutManager(e,t,n)}async applyLayoutSnapshot(e,t,n){Lo(this,Vo,"f")?.applyLayoutSnapshot(e,t,n)}async createLayout(e,t){return Lo(this,Vo,"f")?.createLayout(e,t)}async destroyLayout(e,t){return Lo(this,Vo,"f")?.destroyLayout(e,t)}async getViewWindowIdentity(e,t){return Promise.resolve({uuid:t.uuid,name:t.uuid})}}Vo=new WeakMap,zo=new WeakMap;const qo=()=>{const e=((e,t)=>{const n=new RegExp(`^${t}<(?.*)>$`).exec(e)?.groups?.meta;if(n)try{return JSON.parse(atob(n))}catch(e){throw new Error(`Failed to decode JSON from ${n}.`)}})(window.name,"of-frame");if(e)try{const{name:t,uuid:n,brokerUrl:i,providerId:r,contextGroup:o}=e;return Fo(i,"brokerUrl"),Fo(n,"uuid"),Fo(t,"name"),{identity:{name:t,uuid:n},brokerUrl:i,interopConfig:{providerId:r,currentContextGroup:o}}}catch(e){throw new Error(`Unexpected error occurred when inferring platform information: ${e.stack}`)}},Jo=()=>{const e=r.v4();return{uuid:e,name:e}},Yo=async e=>{if("enabled"===e.connectionInheritance){const t=await(async e=>{const t=qo();if(t){const{validateOptions:n=(()=>!0)}=e,{identity:i,...r}=t;if(!await n(r))throw new Error("Parent options were rejected by validateOptions.");return t}})(e);if(t)return t}if(!e.options){const t="enabled"===e.connectionInheritance?"Broker URL was not specified nor provided by a platform container.":"Connection inheritance is disabled but no options were provided.";throw new Error(t)}return{...e.options,identity:Jo()}};exports.__classPrivateFieldGet=Lo,exports.__classPrivateFieldSet=To,exports.apiExposer=Gn,exports.commonjsGlobal=s,exports.connect=async t=>{try{Ro.log("Establishing connection",t);const{brokerUrl:n,identity:i,timeout:r,interopConfig:s}=await Yo(t),{workerPort:a,iframeBrokerPort:c}=await(async(e,t,n)=>{const{origin:i}=new URL(e),r=document.createElement("IFRAME");let s;r.style.display="none";try{return await new Promise(((a,c)=>{const d=e=>{if(e.source===r.contentWindow&&e.data?.topic===`ack-${jo}`){if(e.origin!==i)c(new Error(`Broker redirected to unexpected origin ${e.origin}, expected ${i}.`));else if(e.data.success){const[t,n]=e.ports;a({iframeBrokerPort:t,workerPort:n})}else c(new m(e.data));window.removeEventListener("message",d),clearTimeout(s)}};window.addEventListener("message",d),ko.log(`Connecting to broker ${e}`),r.setAttribute("src",e),r.setAttribute("name",o(t,"of-broker")),document.body.appendChild(r),ko.log("Iframe loaded, awaiting init message from iframe"),n&&(s=setTimeout((()=>{window.removeEventListener("message",d),document.body.removeChild(r),c(new Error("Worker did not initialize in time"))}),n))}))}catch(e){throw new Error(`Failed to initialise Fin Web Client. ${e.message}`,{cause:e})}})(n,i,r);Ro.log("Successfully established connection to shared worker");const d={entityType:"external connection",...i};a.start(),c.start();const h=((t,n,i)=>{const r=$o(n),o=new Ko(t),s=new Io(r,o,i);return s.connectSync(),window.Buffer=e.Buffer,new Wr(s)})(t,a,d);return s?.providerId&&(h.me.interop=h.Interop.connectSync(s.providerId),s?.currentContextGroup&&h.me.interop.joinContextGroup(s.currentContextGroup).catch((e=>{console.warn(`Error joining specified context group: ${s?.currentContextGroup}, continuing`,e)}))),{...h,me:{...h.me,identity:{uuid:h.me.uuid,name:h.me.name}}}}catch(e){throw new Error(`An error occured during web-interop connection: ${e.message}`)}},exports.decorators=Nn,exports.encodeOptions=o,exports.layout_constants=ai,exports.lazy=G; /***/ }), -/***/ "./node_modules/@openfin/core-web/out/main-b14f67c9.js": -/*!*************************************************************!*\ - !*** ./node_modules/@openfin/core-web/out/main-b14f67c9.js ***! - \*************************************************************/ +/***/ "../../node_modules/@openfin/core-web/out/main-b14f67c9.js": +/*!*****************************************************************!*\ + !*** ../../node_modules/@openfin/core-web/out/main-b14f67c9.js ***! + \*****************************************************************/ /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; -var t=__webpack_require__(/*! ./main-8cad4070.js */ "./node_modules/@openfin/core-web/out/main-8cad4070.js"),e=__webpack_require__(/*! uuid */ "../../node_modules/uuid/dist/esm-browser/index.js");__webpack_require__(/*! buffer/ */ "../../node_modules/buffer/index.js"),__webpack_require__(/*! events */ "../../node_modules/events/events.js"),__webpack_require__(/*! lodash/cloneDeep */ "../../node_modules/lodash/cloneDeep.js"),__webpack_require__(/*! lodash/isEqual */ "../../node_modules/lodash/isEqual.js");var i={},n={};Object.defineProperty(n,"__esModule",{value:!0}),n.mapValuesAsync=n.mapEntriesAsync=void 0;const o=(t,[e,i])=>({...t,[e]:i});async function s(t,e){return(await Promise.all(e.map((async([e,i])=>[e,await t(i,e)])))).reduce(o,{})}n.mapEntriesAsync=s,n.mapValuesAsync=async function(t,e){let i;return i=e instanceof Map?[...e.entries()]:Object.entries(e),s(t,i)};var r,a,l,h,d=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldSet||function(t,e,i,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(t,i):o?o.value=i:e.set(t,i),i},c=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldGet||function(t,e,i,n){if("a"===i&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?n:"a"===i?n.call(t):n?n.value:e.get(t)};Object.defineProperty(i,"__esModule",{value:!0});var m=i.DefaultLayoutManager=void 0;const u=n;class p{constructor(t){a.set(this,void 0),l.set(this,new Map),d(this,a,t,"f")}size(){return c(this,l,"f").size}async applyLayoutSnapshot({layouts:t}){if(Object.keys(t).length>1)throw new Error("[LayoutManager] Tried to call applyLayoutSnapshot with more than 1 layout. When implementing multiple layouts via overridden LayoutManager class, you must override and fully implement the applyLayoutSnapshot method without calling super.applyLayoutSnapshot().");const[[e,i]]=Object.entries(t);await p.createLayout(this,{layoutName:e,layout:i})}async showLayout({layoutName:t}){}async getLayoutSnapshot(){return{layouts:await(0,u.mapValuesAsync)((t=>t.getFrameSnapshot()),c(this,l,"f"))}}async removeLayout({layoutName:t}){}getLayoutIdentityForView(t){const e=[...c(this,l,"f").values()].find((e=>e.getCurrentViews().some((e=>e.name===t.name&&e.uuid===t.uuid))));return e?.identity??void 0}isLayoutVisible({layoutName:t}){return c(p,r,"m",h).call(p,this,t).isVisible()}resolveLayoutIdentity(t){if(t&&"layoutName"in t)return t;const e=[...c(this,l,"f").values()];if(1===e.length)return e[0].identity;const i=e.find((t=>t.isVisible()));return i?.identity??void 0}static async resolveLayout(t,e){const i=t.resolveLayoutIdentity(e);if(void 0===i||!("layoutName"in i))throw new Error("[layout-manager] resolveLayout: Could not resolve the layout identity. Make sure you include 'layoutName' in the identity object.");return c(p,r,"m",h).call(p,t,i.layoutName)}static async handleSharedView(t,e,i){await(0,u.mapValuesAsync)((async t=>{if(t.identity.layoutName!==e.layoutName){const e=t.getCurrentViews().find((t=>t.name===i.name));e&&await t.onViewDetached({viewIdentity:e,target:null}).catch(console.error)}}),c(t,l,"f"))}static async handleLastViewRemoved(t,e){await t.removeLayout(e),await c(t,a,"f").handleLastViewRemoved(t)}static async destroyLayout(t,{layoutName:e}){await c(p,r,"m",h).call(p,t,e).destroy(),c(t,l,"f").delete(e)}static async createLayout(t,e){const{layoutName:i}=e;if(c(t,l,"f").has(i))throw new Error(`Layout name ${i} already exists`);await c(t,a,"f").createLayout(e,t)}static registerLayout(t,e,i){c(t,l,"f").set(e,i)}static getAllLayouts(t){return[...c(t,l,"f").values()]}static setInitialSnapshot(t,e){c(t,a,"f").setInitialSnapshot(e)}static createClosedConstructor(...t){return class extends p{constructor(){super(...t)}}}}m=i.DefaultLayoutManager=p,r=p,a=new WeakMap,l=new WeakMap,h=function(t,e){const i=c(t,l,"f").get(e);if(!i)throw new Error(`[layout-manager] getLayoutByName: Could not locate layout with name '${e}'`);return i};var g={},f={},v={};Object.defineProperty(v,"__esModule",{value:!0}),v.ReversibleMap=void 0;v.ReversibleMap=class{constructor(){this.valueToKey=new Map,this.keyToValue=new Map,this.setUnique=(t,e)=>{if(this.hasKey(t)||this.hasValue(e))throw new Error("Key or value already in the map.");this.keyToValue.set(t,e),this.valueToKey.set(e,t)},this.getKey=t=>{const e=this.valueToKey.get(t);if(!e)throw new Error("Value not found in the map.");return e},this.deleteKey=t=>{const e=this.getValue(t);return this.keyToValue.delete(t),this.valueToKey.delete(e),e},this.deleteValue=t=>{const e=this.getKey(t);return this.keyToValue.delete(e),this.valueToKey.delete(t),e},this.hasKey=t=>this.keyToValue.has(t),this.hasValue=t=>this.valueToKey.has(t)}getValue(t){const e=this.keyToValue.get(t);if(!e)throw new Error("Key not found in the map.");return e}},Object.defineProperty(f,"__esModule",{value:!0});var _=f.LayoutContentCache=void 0;const y=t.lazy,C=v;class w{constructor(){this.contentItemCache=new C.ReversibleMap,this.contentItemCacheId=0,this.createCacheKey=()=>{const t=`entity-${this.contentItemCacheId.toString()}`;return this.contentItemCacheId+=1,t},this.hasKey=t=>this.contentItemCache.hasKey(t),this.getItemOrUndefined=t=>{try{return this.getContentItemOrThrow(t)}catch(t){return}},this.getContentItemOrThrow=(t,e)=>{if(!this.contentItemCache.hasKey(t))throw new Error("Layout component has been destroyed or detached from the current layout.");const i=this.contentItemCache.getValue(t);if(e&&!e.includes(i.type))throw new Error(`Layout item is not the expected type. Expected ${e.join(", ")}, got ${i.type}.`);return i},this.getOrCreateEntityId=t=>{if(this.contentItemCache.hasValue(t))return this.contentItemCache.getKey(t);t.onDestroyed((()=>{this.contentItemCache.deleteValue(t)}));const e=this.createCacheKey();return this.contentItemCache.setUnique(e,t),e}}static getSingleInstance(){return w.singleton.getValue()}}_=f.LayoutContentCache=w,w.singleton=new y.Lazy((()=>new w));var I={},b={};!function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.getAdjacentStacks=t.doShareEdge=t.getAdjacentItem=void 0;t.getAdjacentItem=(e,i)=>{const{parent:n}=e;if(e.isRoot()||!n)return;const o=["top","bottom"].includes(i)?"column":"row",s=["top","left"].includes(i)?-1:1;if(n.type===o){const t=n.contentItems.indexOf(e)+s;if(t>=0&&t{const n=t.getBounds(),o=e.getBounds();if(!n||!o)return!1;if(["top","bottom"].includes(i)){return!(n.righto.right)}return!(n.bottomo.bottom)};t.getAdjacentStacks=(e,i)=>{const n=["top","bottom"].includes(i)?"row":"column",o=s=>"stack"===s.type?(0,t.doShareEdge)(e,s,i)?[s]:[]:"root"===s.type||"ground"===s.type?[]:s.type===n?s.contentItems.map((t=>o(t))).flat():s.type!==n?["top","right"].includes(i)?o(s.contentItems[s.contentItems.length-1]):o(s.contentItems[0]):[],s=(0,t.getAdjacentItem)(e,i);return s?o(s):[]}}(b);var S=t.commonjsGlobal&&t.commonjsGlobal.__decorate||function(t,e,i,n){var o,s=arguments.length,r=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(s<3?o(r):s>3?o(e,i,r):o(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};Object.defineProperty(I,"__esModule",{value:!0}),I.LayoutEntitiesController=void 0;const E=t.decorators,x=b,L=i;class z{constructor(t,e,i){this.wire=t,this.layoutManager=e,this.layoutContentCache=i,this.analytics=t=>{this.wire.sendAction(`layout-controller-${t}`).catch((()=>{}))},this.getLayoutIdentityForViewOrThrow=async t=>{const e=this.layoutManager.getLayoutIdentityForView(t);if(!e)throw new Error(`View identity ${t.name} is not attached to any layouts.`);return e},this.getRoot=async t=>{this.analytics("get-root");const e=(await this.getLayout(t)).getRoot();return{type:e.type,entityId:this.layoutContentCache.getOrCreateEntityId(e)}},this.getStackByView=async t=>{this.analytics("get-stack-by-view");const e=await this.getLayoutIdentityForViewOrThrow(t),i=(await this.getLayout(e)).getStackByView(t);if("stack"===i?.type)return{entityId:this.layoutContentCache.getOrCreateEntityId(i),type:"stack"}},this.getStackViews=t=>{this.analytics("get-stack-views");return this.layoutContentCache.getContentItemOrThrow(t,["stack"]).contentItems.map((t=>({name:t.viewName,uuid:this.wire.me.uuid})))},this.isRoot=t=>{this.analytics("is-root");return this.layoutContentCache.getContentItemOrThrow(t).isRoot()},this.exists=t=>(this.analytics("exists"),this.layoutContentCache.hasKey(t)),this.addViewToStack=async(t,e,{index:i}={index:0})=>{this.analytics("add-view-to-stack");const n=this.layoutContentCache.getContentItemOrThrow(t);if(i&&i>n.contentItems.length+1)throw new Error(`Index '${i}' out of range, please exclude the index or specify a number between 0 and ${n.contentItems.length}`);const o={id:t,index:i},{identity:s}=await n.layout.platformCreateView(e,{location:o});return s},this.findViewInStack=(t,e)=>t.contentItems.find((t=>t.viewName===e.name)),this.removeViewFromStack=async(t,e)=>{this.analytics("remove-view-from-stack");const i=this.layoutContentCache.getContentItemOrThrow(t,["stack"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to remove a view ('${e.name}') which does not belong to the stack.`);await n.layout.platformCloseView(e)},this.createAdjacentStack=async(t,e,{position:i="right"}={})=>{if(this.analytics("create-adjacent-stack"),!Array.isArray(e)||0===e.length)throw new Error('The parameter "views" must be an array with at least 1 element.');if(!["top","bottom","left","right"].includes(i))throw new Error(`Invalid position '${i}' specified.`);const n=this.layoutContentCache.getContentItemOrThrow(t).createAdjacentStack({position:i}),o=this.layoutContentCache.getOrCreateEntityId(n);return await Promise.all(e.reverse().map((t=>this.addViewToStack(o,t)))),o},this.getAdjacentStacks=async({targetId:t,edge:e})=>{this.analytics("get-adjacent-stacks");const i=this.layoutContentCache.getContentItemOrThrow(t);return(0,x.getAdjacentStacks)(i,e).map((t=>({entityId:this.layoutContentCache.getOrCreateEntityId(t)})))},this.setStackActiveView=async(t,e)=>{this.analytics("set-stack-active-view");const i=this.layoutContentCache.getContentItemOrThrow(t,["stack"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to set a view ('${e.name}') as active when it does not belong to the stack.`);i.setActiveContentItem(n,!0)}}async getLayout(t){const e=await L.DefaultLayoutManager.resolveLayout(this.layoutManager,t);if(!e)throw new Error(`Could not resolve target layout identity ${JSON.stringify(t)}`);return e}getContent(t){this.analytics("get-content");return this.layoutContentCache.getContentItemOrThrow(t,["column","row"]).contentItems.map((t=>({type:t.type,entityId:this.layoutContentCache.getOrCreateEntityId(t)})))}getParent(t){this.analytics("get-parent");const e=this.layoutContentCache.getContentItemOrThrow(t);if(!e.isRoot())return e.parent?.contentItems.includes(e)?{type:e.parent.type,entityId:this.layoutContentCache.getOrCreateEntityId(e.parent)}:void 0}}S([(0,E.expose)()],z.prototype,"getLayoutIdentityForViewOrThrow",void 0),S([(0,E.expose)()],z.prototype,"getRoot",void 0),S([(0,E.expose)()],z.prototype,"getStackByView",void 0),S([(0,E.expose)()],z.prototype,"getStackViews",void 0),S([(0,E.expose)()],z.prototype,"getContent",null),S([(0,E.expose)()],z.prototype,"getParent",null),S([(0,E.expose)()],z.prototype,"isRoot",void 0),S([(0,E.expose)()],z.prototype,"exists",void 0),S([(0,E.expose)()],z.prototype,"addViewToStack",void 0),S([(0,E.expose)()],z.prototype,"removeViewFromStack",void 0),S([(0,E.expose)()],z.prototype,"createAdjacentStack",void 0),S([(0,E.expose)()],z.prototype,"getAdjacentStacks",void 0),S([(0,E.expose)()],z.prototype,"setStackActiveView",void 0),I.LayoutEntitiesController=z,Object.defineProperty(g,"__esModule",{value:!0});var M=g.initLayoutEndpoints=void 0;const P=t.apiExposer,T=t.layout_constants,A=f,k=I,D=i;M=g.initLayoutEndpoints=async function(t,e){const i=t.getFin(),n=await i.Platform.getCurrentSync().getClient(),o=new P.ChannelsExposer(n);await new P.ApiExposer(o).exposeInstance(new k.LayoutEntitiesController(t,e,A.LayoutContentCache.getSingleInstance()),{id:T.LAYOUT_CONTROLLER_ID}),await async function(t,e){const i=t=>async i=>{const n=await D.DefaultLayoutManager.resolveLayout(e,i.target);if(!n)throw new Error(`Could not resolve the layout target from payload ${JSON.stringify(i)}`);return t(n,i)},n=(e,n)=>{t.register(e,i(n))},o=(t,e)=>{n(t,e)};n("replace-view",((t,e)=>t.replaceView(e))),n("replace-layout",((t,{layout:e})=>t.replaceLayout(e))),n("add-view",((t,e)=>t.insertView(e))),o("layout-add-view",((t,{viewOptions:e,location:i,targetView:n})=>t.platformCreateView(e,{location:i,targetView:n}))),n("close-view",((t,e)=>t.cleanupView(e.viewIdentity))),o("layout-close-view",((t,e)=>t.platformCloseView(e.viewIdentity))),n("apply-preset-layout",((t,e)=>t.applyPreset(e))),n("get-layout-views",(t=>t.getCurrentViews())),n("get-frame-snapshot",(t=>t.getFrameSnapshot())),n("is-visible",(t=>t.isVisible())),n("destroy",(t=>t.destroy())),t.register("get-layout-snapshot",(()=>e.getLayoutSnapshot()))}(n,e)};var R={};Object.defineProperty(R,"__esModule",{value:!0});var U=R.BaseLayout=void 0;U=R.BaseLayout=class{};var O={};Object.defineProperty(O,"__esModule",{value:!0});var V=O.DOMEmitter=void 0;V=O.DOMEmitter=class{constructor(t){this.container=t}dispatchLocalEvent(t,e){const i={...e,type:t,tabSelector:`tab-${e.name}`,containerSelector:`container-${e.name}`,topic:"openfin-DOM-event"};this.container.dispatchEvent(new CustomEvent(t,{detail:i}))}};var B={};Object.defineProperty(B,"__esModule",{value:!0});var H=B.mapLayoutContentItemsImmutableSync=B.mapLayoutContentItemsImmutable=W=B.isVisible=void 0;var W=B.isVisible=t=>(0!==t.offsetWidth||0!==t.offsetHeight)&&"hidden"!==window.getComputedStyle(t).visibility&&t.offsetTop>=0&&t.offsetLeft>=0&&t.offsetTop<=window.innerHeight&&t.offsetLeft<=window.innerWidth;const F=t=>"type"in t&&"component"===t.type;B.mapLayoutContentItemsImmutable=async function t(e,i){return F(i)?e(i):{...i,content:await Promise.all(i.content?.map((i=>t(e,i))))}},H=B.mapLayoutContentItemsImmutableSync=function t(e,i){return F(i)?e(i):{...i,content:i.content?.map((i=>t(e,i)))}};class N extends Error{constructor(t,e){super(e),this.type=t}}class G extends N{constructor(t,e){super("Configuration",t),this.node=e}}class j extends N{constructor(t){super("PopoutBlocked",t)}}class $ extends N{constructor(t){super("API",t)}}class Z extends N{constructor(t){super("Bind",t)}}class q extends Error{constructor(t,e,i){super(`${t}: ${e}${void 0===i?"":": "+i}`)}}class X extends q{constructor(t,e){super("Assert",t,e)}}class Y extends q{constructor(t,e,i){super("UnreachableCase",t,`${e}${void 0===i?"":": "+i}`)}}class K extends q{constructor(t,e){super("UnexpectedNull",t,e)}}class J extends q{constructor(t,e){super("UnexpectedUndefined",t,e)}}var Q;!function(t){let e=!1;const i={PopoutCannotBeCreatedWithGroundItemConfig:{id:0,default:"Popout cannot be created with ground ItemConfig"},PleaseRegisterAConstructorFunction:{id:1,default:"Please register a constructor function"},ComponentTypeNotRegisteredAndBindComponentEventHandlerNotAssigned:{id:2,default:"Component type not registered and BindComponentEvent handler not assigned"},ComponentIsAlreadyRegistered:{id:3,default:"Component is already registered"},ComponentIsNotVirtuable:{id:4,default:"Component is not virtuable. Requires rootHtmlElement field/getter"},VirtualComponentDoesNotHaveRootHtmlElement:{id:5,default:'Virtual component does not have getter "rootHtmlElement"'},ItemConfigIsNotTypeComponent:{id:6,default:"ItemConfig is not of type component"},InvalidNumberPartInSizeString:{id:7,default:"Invalid number part in size string"},UnknownUnitInSizeString:{id:8,default:"Unknown unit in size string"},UnsupportedUnitInSizeString:{id:9,default:"Unsupported unit in size string"}};t.idCount=Object.keys(i).length;const n=Object.values(i);t.checkInitialise=function(){if(!e)for(let e=0;e="0"&&t<="9"}function Tt(t,e){const i=zt(e);t.style.width=i}function At(t,e){const i=zt(e);t.style.height=i}function kt(t){return{width:t.offsetWidth,height:t.offsetHeight}}function Dt(t,e){t.style.display=e?"":"none"}function Rt(t,e){if(void 0!==e)for(const i in e)if(e.hasOwnProperty(i)){const n=e[i],o=t[i];t[i]=Ut(o,n)}return t}function Ut(t,e){if("object"!=typeof e)return e;if(Array.isArray(e)){const t=e.length,i=new Array(t);for(let n=0;n36)throw new Error("Too many keys in config minifier map")},t.translateObject=n}(dt||(dt={})),function(t){t.defaults={type:at.ground,content:[],size:1,sizeUnit:ht.Fractional,minSize:void 0,minSizeUnit:ht.Pixel,id:"",isClosable:!0},t.createCopy=function(t,e){switch(t.type){case at.ground:case at.row:case at.column:return gt.createCopy(t,e);case at.stack:return ut.createCopy(t,e);case at.component:return pt.createCopy(t);default:throw new Y("CICC91354",t.type,"Invalid Config Item type specified")}},t.createDefault=function(t){switch(t){case at.ground:throw new X("CICCDR91562");case at.row:case at.column:return gt.createDefault(t);case at.stack:return ut.createDefault();case at.component:return pt.createDefault();default:throw new Y("CICCDD91563",t,"Invalid Config Item type specified")}},t.isComponentItem=function(t){return t.type===at.component},t.isStackItem=function(t){return t.type===at.stack},t.isGroundItem=function(t){return t.type===at.ground}}(ct||(ct={})),function(t){t.defaultMaximised=!1,function(t){t.createCopy=function(t,e){return void 0===t?void 0:{show:null!=e?e:t.show,popout:t.popout,close:t.close,maximise:t.maximise,minimise:t.minimise,tabDropdown:t.tabDropdown}}}(t.Header||(t.Header={}))}(mt||(mt={})),function(t){function e(t){const e=t.length,i=new Array(e);for(let n=0;n"__glMaximised"===t));t>0&&(o=!0,n=n.splice(t,1)),e=n.length>0?n[0]:ct.defaults.id}else e=n;return i=void 0!==t.maximised?t.maximised:o,{id:e,maximised:i}}}(wt||(wt={})),function(t){function e(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0;return{resolved:!0,root:Et.resolve(i),openPopouts:t.resolveOpenPopouts(e.openPopouts),dimensions:t.Dimensions.resolve(e.dimensions),settings:t.Settings.resolve(e.settings),header:t.Header.resolve(e.header,e.settings,e.labels)}}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:Lt.fromResolvedArray(e.openPopouts),settings:_t.Settings.createCopy(e.settings),dimensions:t.Dimensions.fromResolved(e.dimensions),header:_t.Header.createCopy(e.header)}},t.isResolved=function(t){const e=t;return void 0!==e.resolved&&!0===e.resolved},t.resolveOpenPopouts=function(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0,{root:Et.resolve(o),openPopouts:xt.resolveOpenPopouts(e.openPopouts),dimensions:xt.Dimensions.resolve(e.dimensions),settings:xt.Settings.resolve(e.settings),header:xt.Header.resolve(e.header,e.settings,e.labels),parentId:null!==(i=e.parentId)&&void 0!==i?i:null,indexInParent:null!==(n=e.indexInParent)&&void 0!==n?n:null,window:t.Window.resolve(e.window,e.dimensions),resolved:!0}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:i(e.openPopouts),dimensions:xt.Dimensions.fromResolved(e.dimensions),settings:_t.Settings.createCopy(e.settings),header:_t.Header.createCopy(e.header),parentId:e.parentId,indexInParent:e.indexInParent,window:t.Window.fromResolved(e.window)}},t.fromResolvedArray=i}(Lt||(Lt={}));class Wt{constructor(){this._allEventSubscriptions=[],this._subscriptionsMap=new Map,this.unbind=this.removeEventListener,this.trigger=this.emit}tryBubbleEvent(t,e){}emit(t,...e){let i=this._subscriptionsMap.get(t);if(void 0!==i){i=i.slice();for(let t=0;t0){const n=e.slice();n.unshift(t);const o=this._allEventSubscriptions.slice();for(let t=0;t0?n.contentItems[0]:n,e=0);const o=this._layoutManager.createAndInitContentItem(i,t);t.addChild(o,e),this._layoutManager.layoutConfig.settings.popInOnClose?this._onClose():this.close()}createWindow(){const t=this.createUrl(),e=Math.floor(1e6*Math.random()).toString(36),i=this.serializeWindowFeatures({width:this._initialWindowSize.width,height:this._initialWindowSize.height,innerWidth:this._initialWindowSize.width,innerHeight:this._initialWindowSize.height,menubar:"no",toolbar:"no",location:"no",personalbar:"no",resizable:"yes",scrollbars:"no",status:"no"});if(this._popoutWindow=globalThis.open(t,e,i),this._popoutWindow)this._popoutWindow.addEventListener("load",(()=>this.positionWindow()),{passive:!0}),this._popoutWindow.addEventListener("beforeunload",(()=>{this._layoutManager.layoutConfig.settings.popInOnClose?this.popIn():this._onClose()}),{passive:!0}),this._checkReadyInterval=setInterval((()=>this.checkReady()),10);else if(!0===this._layoutManager.layoutConfig.settings.blockedPopoutsThrowError){throw new j("Popout blocked")}}checkReady(){if(null===this._popoutWindow)throw new K("BPCR01844");this._popoutWindow.__glInstance&&this._popoutWindow.__glInstance.isInitialised&&(this.onInitialised(),void 0!==this._checkReadyInterval&&(clearInterval(this._checkReadyInterval),this._checkReadyInterval=void 0))}serializeWindowFeatures(t){const e=[];for(const i in t)e.push(i+"="+t[i].toString());return e.join(",")}createUrl(){const t="gl-window-config-"+Ot(),e=_t.minifyConfig(this._config);try{localStorage.setItem(t,JSON.stringify(e))}catch(t){throw new Error("Error while writing to localStorage "+function(t){return t instanceof Error?t.message:"string"==typeof t?t:"Unknown Error"}(t))}const i=new URL(location.href);return i.searchParams.set("gl-window",t),i.toString()}positionWindow(){if(null===this._popoutWindow)throw new Error("BrowserPopout.positionWindow: null popoutWindow");this._popoutWindow.moveTo(this._initialWindowSize.left,this._initialWindowSize.top),this._popoutWindow.focus()}onInitialised(){this._isInitialised=!0,this.getGlInstance().on("popIn",(()=>this.popIn())),this.emit("initialised")}_onClose(){setTimeout((()=>this.emit("closed")),50)}}class Gt extends Wt{constructor(t,e,i,n){super(),this.layoutManager=t,this._parent=i,this._element=n,this._popInParentIds=[],this._type=e.type,this._id=e.id,this._isInitialised=!1,this.isGround=!1,this.isRow=!1,this.isColumn=!1,this.isStack=!1,this.isComponent=!1,this.size=e.size,this.sizeUnit=e.sizeUnit,this.minSize=e.minSize,this.minSizeUnit=e.minSizeUnit,this._isClosable=e.isClosable,this._pendingEventPropagations={},this._throttledEvents=["stateChanged"],this._contentItems=this.createContentItems(e.content)}get type(){return this._type}get id(){return this._id}set id(t){this._id=t}get popInParentIds(){return this._popInParentIds}get parent(){return this._parent}get contentItems(){return this._contentItems}get isClosable(){return this._isClosable}get element(){return this._element}get isInitialised(){return this._isInitialised}static isStack(t){return t.isStack}static isComponentItem(t){return t.isComponent}static isComponentParentableItem(t){return t.isStack||t.isGround}removeChild(t,e=!1){const i=this._contentItems.indexOf(t);if(-1===i)throw new Error("Can't remove child item. Unknown content item");if(e||this._contentItems[i].destroy(),this._contentItems.splice(i,1),this._contentItems.length>0)this.updateSize(!1);else if(!this.isGround&&!0===this._isClosable){if(null===this._parent)throw new K("CIUC00874");this._parent.removeChild(this)}}addChild(t,e,i){return null!=e||(e=this._contentItems.length),this._contentItems.splice(e,0,t),t.setParent(this),!0===this._isInitialised&&!1===t._isInitialised&&t.init(),e}replaceChild(t,e,i=!1){const n=this._contentItems.indexOf(t),o=t._element.parentNode;if(-1===n)throw new X("CIRCI23232","Can't replace child. oldChild is not child of this");if(null===o)throw new K("CIRCP23232");if(o.replaceChild(e._element,t._element),!0===i&&(t._parent=null,t.destroy()),this._contentItems[n]=e,e.setParent(this),e.size=t.size,e.sizeUnit=t.sizeUnit,e.minSize=t.minSize,e.minSizeUnit=t.minSizeUnit,null===e._parent)throw new K("CIRCNC45699");!0===e._parent._isInitialised&&!1===e._isInitialised&&e.init(),this.updateSize(!1)}remove(){if(null===this._parent)throw new K("CIR11110");this._parent.removeChild(this)}popout(){const t=Ot(),e=this.layoutManager.createPopoutFromContentItem(this,void 0,t,void 0);return this.emitBaseBubblingEvent("stateChanged"),e}calculateConfigContent(){const t=this._contentItems,e=t.length,i=new Array(e);for(let n=0;nthis.propagateEventToLayoutManager(t,e))))}propagateEventToLayoutManager(t,e){this._pendingEventPropagations[t]=!1,this.layoutManager.emitUnknown(t,e)}}class jt extends Gt{constructor(t,e,i){super(t,e,i,document.createElement("div")),this._parentItem=i,this._focused=!1,this.isComponent=!0,this._reorderEnabled=e.reorderEnabled,this.applyUpdatableConfig(e),this._initialWantMaximise=e.maximised;const n=document.createElement("div");n.classList.add("lm_content"),this.element.appendChild(n),this._container=new Ft(e,this,t,n,(t=>this.handleUpdateItemConfigEvent(t)),(()=>this.show()),(()=>this.hide()),(t=>this.focus(t)),(t=>this.blur(t)))}get componentName(){return this._container.componentType}get componentType(){return this._container.componentType}get reorderEnabled(){return this._reorderEnabled}get initialWantMaximise(){return this._initialWantMaximise}get component(){return this._container.component}get container(){return this._container}get parentItem(){return this._parentItem}get headerConfig(){return this._headerConfig}get title(){return this._title}get tab(){return this._tab}get focused(){return this._focused}destroy(){this._container.destroy(),super.destroy()}applyUpdatableConfig(t){this.setTitle(t.title),this._headerConfig=t.header}toConfig(){const t=this._container.stateRequestEvent,e=void 0===t?this._container.state:t();return{type:at.component,content:[],size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,maximised:!1,isClosable:this.isClosable,reorderEnabled:this._reorderEnabled,title:this._title,header:mt.Header.createCopy(this._headerConfig),componentType:pt.copyComponentType(this.componentType),componentState:e}}close(){if(null===this.parent)throw new K("CIC68883");this.parent.removeChild(this,!1)}enterDragMode(t,e){Tt(this.element,t),At(this.element,e),this._container.enterDragMode(t,e)}exitDragMode(){this._container.exitDragMode()}enterStackMaximised(){this._container.enterStackMaximised()}exitStackMaximised(){this._container.exitStackMaximised()}drag(){this._container.drag()}updateSize(t){this.updateNodeSize(t)}init(){this.updateNodeSize(!1),super.init(),this._container.emit("open"),this.initContentItems()}setTitle(t){this._title=t,this.emit("titleChanged",t),this.emit("stateChanged")}setTab(t){this._tab=t,this.emit("tab",t),this._container.setTab(t)}hide(){super.hide(),this._container.setVisibility(!1)}show(){super.show(),this._container.setVisibility(!0)}focus(t=!1){this.parentItem.setActiveComponentItem(this,!0,t)}setFocused(t){this._focused=!0,this.tab.setFocused(),t||this.emitBaseBubblingEvent("focus")}blur(t=!1){this._focused&&this.layoutManager.setFocusedComponentItem(void 0,t)}setBlurred(t){this._focused=!1,this.tab.setBlurred(),t||this.emitBaseBubblingEvent("blur")}setParent(t){this._parentItem=t,super.setParent(t)}handleUpdateItemConfigEvent(t){this.applyUpdatableConfig(t)}updateNodeSize(t){if("none"!==this.element.style.display){const{width:e,height:i}=kt(this.element);this._container.setSizeToNodeSize(e,i,t)}}}class $t extends Gt{constructor(){super(...arguments),this._focused=!1}get focused(){return this._focused}setFocusedValue(t){this._focused=t}}class Zt extends Wt{constructor(t,e){super(),this._eElement=t,this._pointerTracking=!1,this._pointerDownEventListener=t=>this.onPointerDown(t),this._pointerMoveEventListener=t=>this.onPointerMove(t),this._pointerUpEventListener=t=>this.onPointerUp(t),this._timeout=void 0,this._allowableTargets=[t,...e],this._oDocument=document,this._eBody=document.body,this._nDelay=1800,this._nDistance=10,this._nX=0,this._nY=0,this._nOriginalX=0,this._nOriginalY=0,this._dragging=!1,this._eElement.addEventListener("pointerdown",this._pointerDownEventListener,{passive:!0})}destroy(){this.checkRemovePointerTrackingEventListeners(),this._eElement.removeEventListener("pointerdown",this._pointerDownEventListener)}cancelDrag(){this.processDragStop(void 0)}onPointerDown(t){if(this._allowableTargets.includes(t.target)&&t.isPrimary){const e=this.getPointerCoordinates(t);this.processPointerDown(e)}}processPointerDown(t){this._nOriginalX=t.x,this._nOriginalY=t.y,this._oDocument.addEventListener("pointermove",this._pointerMoveEventListener),this._oDocument.addEventListener("pointerup",this._pointerUpEventListener,{passive:!0}),this._pointerTracking=!0,this._timeout=setTimeout((()=>{try{this.startDrag()}catch(t){throw console.error(t),t}}),this._nDelay)}onPointerMove(t){this._pointerTracking&&(this.processDragMove(t),t.preventDefault())}processDragMove(t){this._nX=t.pageX-this._nOriginalX,this._nY=t.pageY-this._nOriginalY,!1===this._dragging&&(Math.abs(this._nX)>this._nDistance||Math.abs(this._nY)>this._nDistance)&&this.startDrag(),this._dragging&&this.emit("drag",this._nX,this._nY,t)}onPointerUp(t){this.processDragStop(t)}processDragStop(t){var e;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this.checkRemovePointerTrackingEventListeners(),!0===this._dragging&&(this._eBody.classList.remove("lm_dragging"),this._eElement.classList.remove("lm_dragging"),null===(e=this._oDocument.querySelector("iframe"))||void 0===e||e.style.setProperty("pointer-events",""),this._dragging=!1,this.emit("dragStop",t))}checkRemovePointerTrackingEventListeners(){this._pointerTracking&&(this._oDocument.removeEventListener("pointermove",this._pointerMoveEventListener),this._oDocument.removeEventListener("pointerup",this._pointerUpEventListener),this._pointerTracking=!1)}startDrag(){var t;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this._dragging=!0,this._eBody.classList.add("lm_dragging"),this._eElement.classList.add("lm_dragging"),null===(t=this._oDocument.querySelector("iframe"))||void 0===t||t.style.setProperty("pointer-events","none"),this.emit("dragStart",this._nOriginalX,this._nOriginalY)}getPointerCoordinates(t){return{x:t.pageX,y:t.pageY}}}class qt{constructor(t,e,i){this._isVertical=t,this._size=e,this._grabSize=i0){const i=this.createSplitter(Math.max(0,e-1)).element;e>0?(this.contentItems[e-1].element.insertAdjacentElement("afterend",i),i.insertAdjacentElement("afterend",t.element)):(this.contentItems[0].element.insertAdjacentElement("beforebegin",i),i.insertAdjacentElement("beforebegin",t.element))}else this._childElementContainer.appendChild(t.element);super.addChild(t,e);const n=1/this.contentItems.length*100;if(!0===i)return this.emitBaseBubblingEvent("stateChanged"),e;for(let e=0;e0&&(this.calculateRelativeSizes(),this.setAbsoluteSizes()),this.emitBaseBubblingEvent("stateChanged"),this.emit("resize")}setAbsoluteSizes(){const t=this.calculateAbsoluteSizes();for(let e=0;e0&&t.itemSizes[e]++,this._isColumn?(Tt(this.contentItems[e].element,t.crossAxisSize),At(this.contentItems[e].element,t.itemSizes[e])):(Tt(this.contentItems[e].element,t.itemSizes[e]),At(this.contentItems[e].element,t.crossAxisSize))}calculateAbsoluteSizes(){const t=(this.contentItems.length-1)*this._splitterSize,{width:e,height:i}=kt(this.element);let n,o;this._isColumn?(n=i-t,o=e):(n=e-t,o=i);let s=0;const r=[];for(let t=0;t0){const n=100-t;for(let t=0;t100&&e.length>0){for(let t=0;te)return;{const r=i/e;let a=i;for(let e=0;ethis.onSplitterDrag(e,t,i))),e.on("dragStop",(()=>this.onSplitterDragStop(e))),e.on("dragStart",(()=>this.onSplitterDragStart(e))),this._splitter.splice(t,0,e),e}getSplitItems(t){const e=this._splitter.indexOf(t);return{before:this.contentItems[e],after:this.contentItems[e+1]}}calculateContentItemMinSize(t){const e=t.minSize;if(void 0!==e){if(t.minSizeUnit===ht.Pixel)return e;throw new X("ROCGMD98831",JSON.stringify(t))}{const t=this.layoutManager.layoutConfig.dimensions;return this._isColumn?t.defaultMinItemHeight:t.defaultMinItemWidth}}calculateContentItemsTotalMinSize(t){let e=0;for(const i of t)e+=this.calculateContentItemMinSize(i);return e}onSplitterDragStart(t){const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=this.calculateContentItemsTotalMinSize(e.before.contentItems),s=this.calculateContentItemsTotalMinSize(e.after.contentItems);this._splitterPosition=0,this._splitterMinPosition=-1*(i-o),this._splitterMaxPosition=n-s}onSplitterDrag(t,e,i){let n=this._isColumn?i:e;if(null===this._splitterMinPosition||null===this._splitterMaxPosition)throw new K("ROCOSD59226");n=Math.max(n,this._splitterMinPosition),n=Math.min(n,this._splitterMaxPosition),this._splitterPosition=n;const o=zt(n);this._isColumn?t.element.style.top=o:t.element.style.left=o}onSplitterDragStop(t){if(null===this._splitterPosition)throw new K("ROCOSDS66932");{const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=(this._splitterPosition+i)/(i+n),s=e.before.size+e.after.size;e.before.size=o*s,e.after.size=(1-o)*s,t.element.style.top=zt(0),t.element.style.left=zt(0),globalThis.requestAnimationFrame((()=>this.updateSize(!1)))}}}!function(t){t.getElementDimensionSize=function(t,e){return"width"===e?function(t){return t.offsetWidth}(t):function(t){return t.offsetHeight}(t)},t.setElementDimensionSize=function(t,e,i){return"width"===e?Tt(t,i):At(t,i)},t.createElement=function(t,e){const i=t.createElement("div");return i.classList.add("lm_item"),e?i.classList.add("lm_column"):i.classList.add("lm_row"),i}}(Xt||(Xt={}));class Yt extends $t{constructor(t,e,i){super(t,vt.create(e),null,Yt.createElement(document)),this.isGround=!0,this._childElementContainer=this.element,this._containerElement=i;let n=null;for(;;){const t=n?n.previousSibling:this._containerElement.lastChild;if(!(t instanceof Element&&t.classList.contains("lm_content")))break;n=t}this._containerElement.insertBefore(this.element,n)}init(){if(!0!==this.isInitialised){this.updateNodeSize();for(let t=0;t0?this.contentItems[0]:this,n.isComponent)throw new Error("Cannot add item as child to ComponentItem");{const t=this.layoutManager.createAndInitContentItem(i,n);return e=n.addChild(t,e),n===this?-1:e}}loadComponentAsRoot(t){this.clearRoot();const e=Ct.resolve(t,!1);if(e.maximised)throw new Error("Root Component cannot be maximised");{const t=new jt(this.layoutManager,e,this);t.init(),this.addChild(t,0)}}addChild(t,e){if(this.contentItems.length>0)throw new Error("Ground node can only have a single child");return this._childElementContainer.appendChild(t.element),e=super.addChild(t,e),this.updateSize(!1),this.emitBaseBubblingEvent("stateChanged"),e}calculateConfigContent(){const t=this.contentItems,e=t.length,i=new Array(e);for(let n=0;n0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e)),this.updateContentItemsSize(!1))}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}createSideAreas(){const t=Yt.Area.oppositeSides,e=new Array(Object.keys(t).length);let i=0;for(const n in t){const o=n,s=this.getElementArea();if(null===s)throw new K("RCSA77553");s.side=o,"2"===t[o][1]?s[o]=s[t[o]]-50:s[o]=s[t[o]]+50,s.surface=(s.x2-s.x1)*(s.y2-s.y1),e[i++]=s}return e}highlightDropZone(t,e,i){this.layoutManager.tabDropPlaceholder.remove(),super.highlightDropZone(t,e,i)}onDrop(t,e){if(t.isComponent){const e=ut.createDefault(),i=t;e.header=mt.Header.createCopy(i.headerConfig);const n=this.layoutManager.createAndInitContentItem(e,this);n.addChild(t),t=n}if(0===this.contentItems.length)this.addChild(t);else{if(t.type===at.row||t.type===at.column){const e=ut.createDefault(),i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}const i="x"==e.side[0]?at.row:at.column,n="2"==e.side[1],o=this.contentItems[0];if(o instanceof Xt&&o.type===i){const e=o.contentItems[n?0:o.contentItems.length-1];o.addChild(t,n?0:void 0,!0),e.size*=.5,t.size=e.size,t.sizeUnit=ht.Percent,o.updateSize(!1)}else{const e=ct.createDefault(i),s=this.layoutManager.createContentItem(e,this);this.replaceChild(o,s),s.addChild(t,n?0:void 0,!0),s.addChild(o,n?void 0:0,!0),o.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}}dock(){throw new X("GID87731")}validateDocking(){throw new X("GIVD87732")}getAllContentItems(){const t=[this];return this.deepGetAllContentItems(this.contentItems,t),t}getConfigMaximisedItems(){const t=[];return this.deepFilterContentItems(this.contentItems,t,(t=>!(!Gt.isStack(t)||!t.initialWantMaximise)||!(!Gt.isComponentItem(t)||!t.initialWantMaximise))),t}getItemsByPopInParentId(t){const e=[];return this.deepFilterContentItems(this.contentItems,e,(e=>e.popInParentIds.includes(t))),e}toConfig(){throw new Error("Cannot generate GroundItem config")}setActiveComponentItem(t,e,i){}updateNodeSize(){const{width:t,height:e}=kt(this._containerElement);Tt(this.element,t),At(this.element,e),this.contentItems.length>0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e))}deepGetAllContentItems(t,e){for(let i=0;ithis.onClick(t),this._touchStartEventListener=t=>this.onTouchStart(t),this._element=document.createElement("div"),this._element.classList.add(i),this._element.title=e,this._header.on("destroy",(()=>this.destroy())),this._element.addEventListener("click",this._clickEventListener,{passive:!0}),this._element.addEventListener("touchstart",this._touchStartEventListener,{passive:!0}),this._header.controlsContainerElement.appendChild(this._element)}get element(){return this._element}destroy(){var t;this._element.removeEventListener("click",this._clickEventListener),this._element.removeEventListener("touchstart",this._touchStartEventListener),null===(t=this._element.parentNode)||void 0===t||t.removeChild(this._element)}onClick(t){this._pushEvent(t)}onTouchStart(t){this._pushEvent(t)}}class Jt{constructor(t,e,i,n,o){var s;this._layoutManager=t,this._componentItem=e,this._closeEvent=i,this._focusEvent=n,this._dragStartEvent=o,this._isActive=!1,this._tabClickListener=t=>this.onTabClickDown(t),this._tabTouchStartListener=t=>this.onTabTouchStart(t),this._closeClickListener=()=>this.onCloseClick(),this._closeTouchStartListener=()=>this.onCloseTouchStart(),this._dragStartListener=(t,e)=>this.onDragStart(t,e),this._contentItemDestroyListener=()=>this.onContentItemDestroy(),this._tabTitleChangedListener=t=>this.setTitle(t),this._element=document.createElement("div"),this._element.classList.add("lm_tab"),this._titleElement=document.createElement("span"),this._titleElement.classList.add("lm_title"),this._closeElement=document.createElement("div"),this._closeElement.classList.add("lm_close_tab"),this._element.appendChild(this._titleElement),this._element.appendChild(this._closeElement),e.isClosable?this._closeElement.style.display="":this._closeElement.style.display="none",this.setTitle(e.title),this._componentItem.on("titleChanged",this._tabTitleChangedListener);(null!==(s=e.reorderEnabled)&&void 0!==s?s:this._layoutManager.layoutConfig.settings.reorderEnabled)&&this.enableReorder(),this._element.addEventListener("click",this._tabClickListener,{passive:!0}),this._element.addEventListener("touchstart",this._tabTouchStartListener,{passive:!0}),this._componentItem.isClosable?(this._closeElement.addEventListener("click",this._closeClickListener,{passive:!0}),this._closeElement.addEventListener("touchstart",this._closeTouchStartListener,{passive:!0})):(this._closeElement.remove(),this._closeElement=void 0),this._componentItem.setTab(this),this._layoutManager.emit("tabCreated",this)}get isActive(){return this._isActive}get componentItem(){return this._componentItem}get contentItem(){return this._componentItem}get element(){return this._element}get titleElement(){return this._titleElement}get closeElement(){return this._closeElement}get reorderEnabled(){return void 0!==this._dragListener}set reorderEnabled(t){t!==this.reorderEnabled&&(t?this.enableReorder():this.disableReorder())}setTitle(t){this._titleElement.innerText=t,this._element.title=t}setActive(t){t!==this._isActive&&(this._isActive=t,t?this._element.classList.add("lm_active"):this._element.classList.remove("lm_active"))}destroy(){var t,e;this._closeEvent=void 0,this._focusEvent=void 0,this._dragStartEvent=void 0,this._element.removeEventListener("click",this._tabClickListener),this._element.removeEventListener("touchstart",this._tabTouchStartListener),null===(t=this._closeElement)||void 0===t||t.removeEventListener("click",this._closeClickListener),null===(e=this._closeElement)||void 0===e||e.removeEventListener("touchstart",this._closeTouchStartListener),this._componentItem.off("titleChanged",this._tabTitleChangedListener),this.reorderEnabled&&this.disableReorder(),this._element.remove()}setBlurred(){this._element.classList.remove("lm_focused"),this._titleElement.classList.remove("lm_focused")}setFocused(){this._element.classList.add("lm_focused"),this._titleElement.classList.add("lm_focused")}onDragStart(t,e){if(void 0===this._dragListener)throw new J("TODSDLU10093");if(void 0===this._dragStartEvent)throw new J("TODS23309");this._dragStartEvent(t,e,this._dragListener,this.componentItem)}onContentItemDestroy(){void 0!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=void 0)}onTabClickDown(t){const e=t.target;e!==this._element&&e!==this._titleElement||(0===t.button?this.notifyFocus():1===t.button&&this._componentItem.isClosable&&this.notifyClose())}onTabTouchStart(t){t.target===this._element&&this.notifyFocus()}onCloseClick(){this.notifyClose()}onCloseTouchStart(){this.notifyClose()}notifyClose(){if(void 0===this._closeEvent)throw new J("TNC15007");this._closeEvent(this._componentItem)}notifyFocus(){if(void 0===this._focusEvent)throw new J("TNA15007");this._focusEvent(this._componentItem)}enableReorder(){this._dragListener=new Zt(this._element,[this._titleElement]),this._dragListener.on("dragStart",this._dragStartListener),this._componentItem.on("destroy",this._contentItemDestroyListener)}disableReorder(){if(void 0===this._dragListener)throw new J("TDR87745");this._componentItem.off("destroy",this._contentItemDestroyListener),this._dragListener.off("dragStart",this._dragStartListener),this._dragListener=void 0}}class Qt{constructor(t,e,i,n,o){this._layoutManager=t,this._componentRemoveEvent=e,this._componentFocusEvent=i,this._componentDragStartEvent=n,this._dropdownActiveChangedEvent=o,this._tabs=[],this._lastVisibleTabIndex=-1,this._dropdownActive=!1,this._element=document.createElement("section"),this._element.classList.add("lm_tabs"),this._dropdownElement=document.createElement("section"),this._dropdownElement.classList.add("lm_tabdropdown_list"),this._dropdownElement.style.display="none"}get tabs(){return this._tabs}get tabCount(){return this._tabs.length}get lastVisibleTabIndex(){return this._lastVisibleTabIndex}get element(){return this._element}get dropdownElement(){return this._dropdownElement}get dropdownActive(){return this._dropdownActive}destroy(){for(let t=0;tthis.handleTabCloseEvent(t)),(t=>this.handleTabFocusEvent(t)),((t,e,i,n)=>this.handleTabDragStartEvent(t,e,i,n)));void 0===e&&(e=this._tabs.length),this._tabs.splice(e,0,i),ethis._lastVisibleTabIndex){const t=this._tabs[e];for(let t=e;t>0;t--)this._tabs[t]=this._tabs[t-1];this._tabs[0]=t}}updateTabSizes(t,e){let i=!1;this.tryUpdateTabSizes(i,t,e)||(i=!0,this.tryUpdateTabSizes(i,t,e)),i!==this._dropdownActive&&(this._dropdownActive=i,this._dropdownActiveChangedEvent())}tryUpdateTabSizes(t,e,i){if(this._tabs.length>0){if(void 0===i)throw new Error("non-empty tabs must have active component item");let n=0,o=!1;const s=this._layoutManager.layoutConfig.settings.tabOverlapAllowance,r=this._tabs.indexOf(i.tab),a=this._tabs[r];this._lastVisibleTabIndex=-1;for(let i=0;ie){if(o)i===r&&(l.style.zIndex="auto",l.style.marginLeft="",l.parentElement!==this._element&&this._element.appendChild(l));else{let t;if(t=r>0&&r<=i?(d-e)/(i-1):(d-e)/i,tthis.onClick(t),this._touchStartListener=t=>this.onTouchStart(t),this._rowColumnClosable=!0,this._closeButton=null,this._popoutButton=null,this._tabsContainer=new Qt(this._layoutManager,(t=>this.handleTabInitiatedComponentRemoveEvent(t)),(t=>this.handleTabInitiatedComponentFocusEvent(t)),((t,e,i,n)=>this.handleTabInitiatedDragStartEvent(t,e,i,n)),(()=>this.processTabDropdownActiveChanged())),this._show=i.show,this._popoutEnabled=i.popoutEnabled,this._popoutLabel=i.popoutLabel,this._maximiseEnabled=i.maximiseEnabled,this._maximiseLabel=i.maximiseLabel,this._minimiseEnabled=i.minimiseEnabled,this._minimiseLabel=i.minimiseLabel,this._closeEnabled=i.closeEnabled,this._closeLabel=i.closeLabel,this._tabDropdownEnabled=i.tabDropdownEnabled,this._tabDropdownLabel=i.tabDropdownLabel,this.setSide(i.side),this._canRemoveComponent=this._configClosable,this._element=document.createElement("section"),this._element.classList.add("lm_header"),this._controlsContainerElement=document.createElement("section"),this._controlsContainerElement.classList.add("lm_controls"),this._element.appendChild(this._tabsContainer.element),this._element.appendChild(this._controlsContainerElement),this._element.appendChild(this._tabsContainer.dropdownElement),this._element.addEventListener("click",this._clickListener,{passive:!0}),this._element.addEventListener("touchstart",this._touchStartListener,{passive:!0}),this._documentMouseUpListener=()=>this._tabsContainer.hideAdditionalTabsDropdown(),globalThis.document.addEventListener("mouseup",this._documentMouseUpListener,{passive:!0}),this._tabControlOffset=this._layoutManager.layoutConfig.settings.tabControlOffset,this._tabDropdownEnabled&&(this._tabDropdownButton=new Kt(this,this._tabDropdownLabel,"lm_tabdropdown",(()=>this._tabsContainer.showAdditionalTabsDropdown()))),this._popoutEnabled&&(this._popoutButton=new Kt(this,this._popoutLabel,"lm_popout",(()=>this.handleButtonPopoutEvent()))),this._maximiseEnabled&&(this._maximiseButton=new Kt(this,this._maximiseLabel,"lm_maximise",(t=>this.handleButtonMaximiseToggleEvent(t)))),this._configClosable&&(this._closeButton=new Kt(this,this._closeLabel,"lm_close",(()=>s()))),this.processTabDropdownActiveChanged()}get show(){return this._show}get side(){return this._side}get leftRightSided(){return this._leftRightSided}get layoutManager(){return this._layoutManager}get parent(){return this._parent}get tabs(){return this._tabsContainer.tabs}get lastVisibleTabIndex(){return this._tabsContainer.lastVisibleTabIndex}get element(){return this._element}get tabsContainerElement(){return this._tabsContainer.element}get controlsContainerElement(){return this._controlsContainerElement}destroy(){this.emit("destroy"),this._popoutEvent=void 0,this._maximiseToggleEvent=void 0,this._clickEvent=void 0,this._touchStartEvent=void 0,this._componentRemoveEvent=void 0,this._componentFocusEvent=void 0,this._componentDragStartEvent=void 0,this._tabsContainer.destroy(),globalThis.document.removeEventListener("mouseup",this._documentMouseUpListener),this._element.remove()}createTab(t,e){this._tabsContainer.createTab(t,e)}removeTab(t){this._tabsContainer.removeTab(t)}processActiveComponentChanged(t){this._tabsContainer.processActiveComponentChanged(t),this.updateTabSizes()}setSide(t){this._side=t,this._leftRightSided=[nt.right,nt.left].includes(this._side)}setRowColumnClosable(t){this._rowColumnClosable=t,this.updateClosability()}updateClosability(){let t;if(this._configClosable)if(this._rowColumnClosable){t=!0;const e=this.tabs.length;for(let i=0;i1}applyFocusedValue(t){t?this._element.classList.add("lm_focused"):this._element.classList.remove("lm_focused")}processMaximised(){if(void 0===this._maximiseButton)throw new J("HPMAX16997");this._maximiseButton.element.setAttribute("title",this._minimiseLabel)}processMinimised(){if(void 0===this._maximiseButton)throw new J("HPMIN16997");this._maximiseButton.element.setAttribute("title",this._maximiseLabel)}updateTabSizes(){if(this._tabsContainer.tabCount>0){const t=this._show?this._layoutManager.layoutConfig.dimensions.headerHeight:0;let e;this._leftRightSided?(this._element.style.height="",this._element.style.width=zt(t)):(this._element.style.width="",this._element.style.height=zt(t)),e=this._leftRightSided?this._element.offsetHeight-this._controlsContainerElement.offsetHeight-this._tabControlOffset:this._element.offsetWidth-this._controlsContainerElement.offsetWidth-this._tabControlOffset,this._tabsContainer.updateTabSizes(e,this._getActiveComponentItemEvent())}}handleTabInitiatedComponentRemoveEvent(t){if(this._canRemoveComponent){if(void 0===this._componentRemoveEvent)throw new J("HHTCE22294");this._componentRemoveEvent(t)}}handleTabInitiatedComponentFocusEvent(t){if(void 0===this._componentFocusEvent)throw new J("HHTAE22294");this._componentFocusEvent(t)}handleTabInitiatedDragStartEvent(t,e,i,n){if(this._canRemoveComponent){if(void 0===this._componentDragStartEvent)throw new J("HHTDSE22294");this._componentDragStartEvent(t,e,i,n)}else i.cancelDrag()}processTabDropdownActiveChanged(){void 0!==this._tabDropdownButton&&Dt(this._tabDropdownButton.element,this._tabsContainer.dropdownActive)}handleButtonPopoutEvent(){if(this._layoutManager.layoutConfig.settings.popoutWholeStack){if(void 0===this._popoutEvent)throw new J("HHBPOE17834");this._popoutEvent()}else{const t=this._getActiveComponentItemEvent();t&&t.popout()}}handleButtonMaximiseToggleEvent(t){if(void 0===this._maximiseToggleEvent)throw new J("HHBMTE16834");this._maximiseToggleEvent()}onClick(t){t.target===this._element&&this.notifyClick(t)}onTouchStart(t){t.target===this._element&&this.notifyTouchStart(t)}notifyClick(t){if(void 0===this._clickEvent)throw new J("HNHC46834");this._clickEvent(t)}notifyTouchStart(t){if(void 0===this._touchStartEvent)throw new J("HNHTS46834");this._touchStartEvent(t)}}class ee extends $t{constructor(t,e,i){var n,o,s,r,a,l,h,d,c,m,u,p,g,f,v,_,y,C,w;super(t,e,i,ee.createElement(document)),this._headerSideChanged=!1,this._resizeListener=()=>this.handleResize(),this._maximisedListener=()=>this.handleMaximised(),this._minimisedListener=()=>this.handleMinimised(),this._headerConfig=e.header;const I=t.layoutConfig.header,b=e.content;let S;if(1!==b.length)S=void 0;else{S=b[0].header}this._initialWantMaximise=e.maximised,this._initialActiveItemIndex=null!==(n=e.activeItemIndex)&&void 0!==n?n:0;const E=null!==(r=null!==(s=null===(o=this._headerConfig)||void 0===o?void 0:o.show)&&void 0!==s?s:null==S?void 0:S.show)&&void 0!==r?r:I.show,x=null!==(h=null!==(l=null===(a=this._headerConfig)||void 0===a?void 0:a.popout)&&void 0!==l?l:null==S?void 0:S.popout)&&void 0!==h?h:I.popout,L=null!==(m=null!==(c=null===(d=this._headerConfig)||void 0===d?void 0:d.maximise)&&void 0!==c?c:null==S?void 0:S.maximise)&&void 0!==m?m:I.maximise,z=null!==(g=null!==(p=null===(u=this._headerConfig)||void 0===u?void 0:u.close)&&void 0!==p?p:null==S?void 0:S.close)&&void 0!==g?g:I.close,M=null!==(_=null!==(v=null===(f=this._headerConfig)||void 0===f?void 0:f.minimise)&&void 0!==v?v:null==S?void 0:S.minimise)&&void 0!==_?_:I.minimise,P=null!==(w=null!==(C=null===(y=this._headerConfig)||void 0===y?void 0:y.tabDropdown)&&void 0!==C?C:null==S?void 0:S.tabDropdown)&&void 0!==w?w:I.tabDropdown;this._maximisedEnabled=!1!==L;const T={show:!1!==E,side:!1===E?nt.top:E,popoutEnabled:!1!==x,popoutLabel:!1===x?"":x,maximiseEnabled:this._maximisedEnabled,maximiseLabel:!1===L?"":L,closeEnabled:!1!==z,closeLabel:!1===z?"":z,minimiseEnabled:!0,minimiseLabel:M,tabDropdownEnabled:!1!==P,tabDropdownLabel:!1===P?"":P};this._header=new te(t,this,T,e.isClosable&&!1!==z,(()=>this.getActiveComponentItem()),(()=>this.remove()),(()=>this.handlePopoutEvent()),(()=>this.toggleMaximise()),(t=>this.handleHeaderClickEvent(t)),(t=>this.handleHeaderTouchStartEvent(t)),(t=>this.handleHeaderComponentRemoveEvent(t)),(t=>this.handleHeaderComponentFocusEvent(t)),((t,e,i,n)=>this.handleHeaderComponentStartDragEvent(t,e,i,n))),this.isStack=!0,this._childElementContainer=document.createElement("section"),this._childElementContainer.classList.add("lm_items"),this.on("resize",this._resizeListener),this._maximisedEnabled&&(this.on("maximised",this._maximisedListener),this.on("minimised",this._minimisedListener)),this.element.appendChild(this._header.element),this.element.appendChild(this._childElementContainer),this.setupHeaderPosition(),this._header.updateClosability()}get childElementContainer(){return this._childElementContainer}get header(){return this._header}get headerShow(){return this._header.show}get headerSide(){return this._header.side}get headerLeftRightSided(){return this._header.leftRightSided}get contentAreaDimensions(){return this._contentAreaDimensions}get initialWantMaximise(){return this._initialWantMaximise}get isMaximised(){return this===this.layoutManager.maximisedStack}get stackParent(){if(!this.parent)throw new Error("Stack should always have a parent");return this.parent}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}init(){if(!0===this.isInitialised)return;this.updateNodeSize();for(let t=0;t0){if(this._initialActiveItemIndex<0||this._initialActiveItemIndex>=e)throw new Error(`ActiveItemIndex out of range: ${this._initialActiveItemIndex} id: ${this.id}`);for(let i=0;ithis.contentItems.length)throw e-=1,new X("SAC99728");if(t instanceof jt)return e=super.addChild(t,e),this._childElementContainer.appendChild(t.element),this._header.createTab(t,e),this.setActiveComponentItem(t,i),this._header.updateTabSizes(),this.updateSize(!1),t.container.setBaseLogicalZIndex(),this._header.updateClosability(),this.emitStateChangedEvent(),e;throw new X("SACC88532")}removeChild(t,e){const i=t,n=this.contentItems.indexOf(i),o=1===this.contentItems.length;if(this._activeComponentItem===i&&(i.focused&&i.blur(),!o)){const t=0===n?1:n-1;this.setActiveComponentItem(this.contentItems[t],!1)}this._header.removeTab(i),super.removeChild(i,e),o||this._header.updateClosability(),this.emitStateChangedEvent()}toggleMaximise(){this.isMaximised?this.minimise():this.maximise()}maximise(){if(!this.isMaximised){this.layoutManager.setMaximisedStack(this);const t=this.contentItems,e=t.length;for(let i=0;i0&&void 0===t)throw new Error("expected non-empty stack to have an active component item");return{type:"stack",content:this.calculateConfigContent(),size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,isClosable:this.isClosable,maximised:this.isMaximised,header:this.createHeaderConfig(),activeItemIndex:t}}onDrop(t,e){if("header"===this._dropSegment){if(this.resetHeaderDropZone(),void 0===this._dropIndex)throw new J("SODDI68990");return void this.addChild(t,this._dropIndex)}if("body"===this._dropSegment)return void this.addChild(t,0,!0);const i="top"===this._dropSegment||"bottom"===this._dropSegment,n="left"===this._dropSegment||"right"===this._dropSegment,o="top"===this._dropSegment||"left"===this._dropSegment,s=i&&this.stackParent.isColumn||n&&this.stackParent.isRow;if(t.isComponent){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createAndInitContentItem(e,this);i.addChild(t),t=i}if(t.type===at.row||t.type===at.column){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}if(s){const e=this.stackParent.contentItems.indexOf(this);this.stackParent.addChild(t,o?e:e+1,!0),this.size*=.5,t.size=this.size,t.sizeUnit=this.sizeUnit,this.stackParent.updateSize(!1)}else{const e=i?at.column:at.row,n=ct.createDefault(e),s=this.layoutManager.createContentItem(n,this);this.stackParent.replaceChild(this,s),s.addChild(t,o?0:void 0,!0),s.addChild(this,o?void 0:0,!0),this.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}highlightDropZone(t,e){for(const i in this._contentAreaDimensions){const n=i,o=this._contentAreaDimensions[n].hoverArea;if(o.x1t&&o.y1e)return void("header"===n?(this._dropSegment="header",this.highlightHeaderDropZone(this._header.leftRightSided?e:t)):(this.resetHeaderDropZone(),this.highlightBodyDropZone(n)))}}getArea(){if("none"===this.element.style.display)return null;const t=super.getElementArea(this._header.element),e=super.getElementArea(this._childElementContainer);if(null===t||null===e)throw new K("SGAHC13086");const i=e.x2-e.x1,n=e.y2-e.y1;return this._contentAreaDimensions={header:{hoverArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2},highlightArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2}}},0===this.contentItems.length?(this._contentAreaDimensions.body={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2}},super.getElementArea(this.element)):(this._contentAreaDimensions.left={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x1+.25*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x1+.5*i,y2:e.y2}},this._contentAreaDimensions.top={hoverArea:{x1:e.x1+.25*i,y1:e.y1,x2:e.x1+.75*i,y2:e.y1+.5*n},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y1+.5*n}},this._contentAreaDimensions.right={hoverArea:{x1:e.x1+.75*i,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1+.5*i,y1:e.y1,x2:e.x2,y2:e.y2}},this._contentAreaDimensions.bottom={hoverArea:{x1:e.x1+.25*i,y1:e.y1+.5*n,x2:e.x1+.75*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1+.5*n,x2:e.x2,y2:e.y2}},super.getElementArea(this.element))}positionHeader(t){this._header.side!==t&&(this._header.setSide(t),this._headerSideChanged=!0,this.setupHeaderPosition())}updateNodeSize(){if("none"!==this.element.style.display){const t=kt(this.element);if(this._header.show){t[this._header.leftRightSided?it.width:it.height]-=this.layoutManager.layoutConfig.dimensions.headerHeight}this._childElementContainer.style.width=zt(t.width),this._childElementContainer.style.height=zt(t.height);for(let e=0;e=o&&t({...t,[e]:i});async function s(t,e){return(await Promise.all(e.map((async([e,i])=>[e,await t(i,e)])))).reduce(o,{})}n.mapEntriesAsync=s,n.mapValuesAsync=async function(t,e){let i;return i=e instanceof Map?[...e.entries()]:Object.entries(e),s(t,i)};var r,a,l,h,d=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldSet||function(t,e,i,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(t,i):o?o.value=i:e.set(t,i),i},c=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldGet||function(t,e,i,n){if("a"===i&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?n:"a"===i?n.call(t):n?n.value:e.get(t)};Object.defineProperty(i,"__esModule",{value:!0});var m=i.DefaultLayoutManager=void 0;const u=n;class p{constructor(t){a.set(this,void 0),l.set(this,new Map),d(this,a,t,"f")}size(){return c(this,l,"f").size}async applyLayoutSnapshot({layouts:t}){if(Object.keys(t).length>1)throw new Error("[LayoutManager] Tried to call applyLayoutSnapshot with more than 1 layout. When implementing multiple layouts via overridden LayoutManager class, you must override and fully implement the applyLayoutSnapshot method without calling super.applyLayoutSnapshot().");const[[e,i]]=Object.entries(t);await p.createLayout(this,{layoutName:e,layout:i})}async showLayout({layoutName:t}){}async getLayoutSnapshot(){return{layouts:await(0,u.mapValuesAsync)((t=>t.getFrameSnapshot()),c(this,l,"f"))}}async removeLayout({layoutName:t}){}getLayoutIdentityForView(t){const e=[...c(this,l,"f").values()].find((e=>e.getCurrentViews().some((e=>e.name===t.name&&e.uuid===t.uuid))));return e?.identity??void 0}isLayoutVisible({layoutName:t}){return c(p,r,"m",h).call(p,this,t).isVisible()}resolveLayoutIdentity(t){if(t&&"layoutName"in t)return t;const e=[...c(this,l,"f").values()];if(1===e.length)return e[0].identity;const i=e.find((t=>t.isVisible()));return i?.identity??void 0}static async resolveLayout(t,e){const i=t.resolveLayoutIdentity(e);if(void 0===i||!("layoutName"in i))throw new Error("[layout-manager] resolveLayout: Could not resolve the layout identity. Make sure you include 'layoutName' in the identity object.");return c(p,r,"m",h).call(p,t,i.layoutName)}static async handleSharedView(t,e,i){await(0,u.mapValuesAsync)((async t=>{if(t.identity.layoutName!==e.layoutName){const e=t.getCurrentViews().find((t=>t.name===i.name));e&&await t.onViewDetached({viewIdentity:e,target:null}).catch(console.error)}}),c(t,l,"f"))}static async handleLastViewRemoved(t,e){await t.removeLayout(e),await c(t,a,"f").handleLastViewRemoved(t)}static async destroyLayout(t,{layoutName:e}){await c(p,r,"m",h).call(p,t,e).destroy(),c(t,l,"f").delete(e)}static async createLayout(t,e){const{layoutName:i}=e;if(c(t,l,"f").has(i))throw new Error(`Layout name ${i} already exists`);await c(t,a,"f").createLayout(e,t)}static registerLayout(t,e,i){c(t,l,"f").set(e,i)}static getAllLayouts(t){return[...c(t,l,"f").values()]}static setInitialSnapshot(t,e){c(t,a,"f").setInitialSnapshot(e)}static createClosedConstructor(...t){return class extends p{constructor(){super(...t)}}}}m=i.DefaultLayoutManager=p,r=p,a=new WeakMap,l=new WeakMap,h=function(t,e){const i=c(t,l,"f").get(e);if(!i)throw new Error(`[layout-manager] getLayoutByName: Could not locate layout with name '${e}'`);return i};var g={},f={},v={};Object.defineProperty(v,"__esModule",{value:!0}),v.ReversibleMap=void 0;v.ReversibleMap=class{constructor(){this.valueToKey=new Map,this.keyToValue=new Map,this.setUnique=(t,e)=>{if(this.hasKey(t)||this.hasValue(e))throw new Error("Key or value already in the map.");this.keyToValue.set(t,e),this.valueToKey.set(e,t)},this.getKey=t=>{const e=this.valueToKey.get(t);if(!e)throw new Error("Value not found in the map.");return e},this.deleteKey=t=>{const e=this.getValue(t);return this.keyToValue.delete(t),this.valueToKey.delete(e),e},this.deleteValue=t=>{const e=this.getKey(t);return this.keyToValue.delete(e),this.valueToKey.delete(t),e},this.hasKey=t=>this.keyToValue.has(t),this.hasValue=t=>this.valueToKey.has(t)}getValue(t){const e=this.keyToValue.get(t);if(!e)throw new Error("Key not found in the map.");return e}},Object.defineProperty(f,"__esModule",{value:!0});var _=f.LayoutContentCache=void 0;const y=t.lazy,C=v;class w{constructor(){this.contentItemCache=new C.ReversibleMap,this.contentItemCacheId=0,this.createCacheKey=()=>{const t=`entity-${this.contentItemCacheId.toString()}`;return this.contentItemCacheId+=1,t},this.hasKey=t=>this.contentItemCache.hasKey(t),this.getItemOrUndefined=t=>{try{return this.getContentItemOrThrow(t)}catch(t){return}},this.getContentItemOrThrow=(t,e)=>{if(!this.contentItemCache.hasKey(t))throw new Error("Layout component has been destroyed or detached from the current layout.");const i=this.contentItemCache.getValue(t);if(e&&!e.includes(i.type))throw new Error(`Layout item is not the expected type. Expected ${e.join(", ")}, got ${i.type}.`);return i},this.getOrCreateEntityId=t=>{if(this.contentItemCache.hasValue(t))return this.contentItemCache.getKey(t);t.onDestroyed((()=>{this.contentItemCache.deleteValue(t)}));const e=this.createCacheKey();return this.contentItemCache.setUnique(e,t),e}}static getSingleInstance(){return w.singleton.getValue()}}_=f.LayoutContentCache=w,w.singleton=new y.Lazy((()=>new w));var I={},b={};!function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.getAdjacentStacks=t.doShareEdge=t.getAdjacentItem=void 0;t.getAdjacentItem=(e,i)=>{const{parent:n}=e;if(e.isRoot()||!n)return;const o=["top","bottom"].includes(i)?"column":"row",s=["top","left"].includes(i)?-1:1;if(n.type===o){const t=n.contentItems.indexOf(e)+s;if(t>=0&&t{const n=t.getBounds(),o=e.getBounds();if(!n||!o)return!1;if(["top","bottom"].includes(i)){return!(n.righto.right)}return!(n.bottomo.bottom)};t.getAdjacentStacks=(e,i)=>{const n=["top","bottom"].includes(i)?"row":"column",o=s=>"stack"===s.type?(0,t.doShareEdge)(e,s,i)?[s]:[]:"root"===s.type||"ground"===s.type?[]:s.type===n?s.contentItems.map((t=>o(t))).flat():s.type!==n?["top","right"].includes(i)?o(s.contentItems[s.contentItems.length-1]):o(s.contentItems[0]):[],s=(0,t.getAdjacentItem)(e,i);return s?o(s):[]}}(b);var S=t.commonjsGlobal&&t.commonjsGlobal.__decorate||function(t,e,i,n){var o,s=arguments.length,r=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(s<3?o(r):s>3?o(e,i,r):o(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};Object.defineProperty(I,"__esModule",{value:!0}),I.LayoutEntitiesController=void 0;const E=t.decorators,x=b,L=i;class z{constructor(t,e,i){this.wire=t,this.layoutManager=e,this.layoutContentCache=i,this.analytics=t=>{this.wire.sendAction(`layout-controller-${t}`).catch((()=>{}))},this.getLayoutIdentityForViewOrThrow=async t=>{const e=this.layoutManager.getLayoutIdentityForView(t);if(!e)throw new Error(`View identity ${t.name} is not attached to any layouts.`);return e},this.getRoot=async t=>{this.analytics("get-root");const e=(await this.getLayout(t)).getRoot();return{type:e.type,entityId:this.layoutContentCache.getOrCreateEntityId(e)}},this.getStackByView=async t=>{this.analytics("get-stack-by-view");const e=await this.getLayoutIdentityForViewOrThrow(t),i=(await this.getLayout(e)).getStackByView(t);if("stack"===i?.type)return{entityId:this.layoutContentCache.getOrCreateEntityId(i),type:"stack"}},this.getStackViews=t=>{this.analytics("get-stack-views");return this.layoutContentCache.getContentItemOrThrow(t,["stack"]).contentItems.map((t=>({name:t.viewName,uuid:this.wire.me.uuid})))},this.isRoot=t=>{this.analytics("is-root");return this.layoutContentCache.getContentItemOrThrow(t).isRoot()},this.exists=t=>(this.analytics("exists"),this.layoutContentCache.hasKey(t)),this.addViewToStack=async(t,e,{index:i}={index:0})=>{this.analytics("add-view-to-stack");const n=this.layoutContentCache.getContentItemOrThrow(t);if(i&&i>n.contentItems.length+1)throw new Error(`Index '${i}' out of range, please exclude the index or specify a number between 0 and ${n.contentItems.length}`);const o={id:t,index:i},{identity:s}=await n.layout.platformCreateView(e,{location:o});return s},this.findViewInStack=(t,e)=>t.contentItems.find((t=>t.viewName===e.name)),this.removeViewFromStack=async(t,e)=>{this.analytics("remove-view-from-stack");const i=this.layoutContentCache.getContentItemOrThrow(t,["stack"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to remove a view ('${e.name}') which does not belong to the stack.`);await n.layout.platformCloseView(e)},this.createAdjacentStack=async(t,e,{position:i="right"}={})=>{if(this.analytics("create-adjacent-stack"),!Array.isArray(e)||0===e.length)throw new Error('The parameter "views" must be an array with at least 1 element.');if(!["top","bottom","left","right"].includes(i))throw new Error(`Invalid position '${i}' specified.`);const n=this.layoutContentCache.getContentItemOrThrow(t).createAdjacentStack({position:i}),o=this.layoutContentCache.getOrCreateEntityId(n);return await Promise.all(e.reverse().map((t=>this.addViewToStack(o,t)))),o},this.getAdjacentStacks=async({targetId:t,edge:e})=>{this.analytics("get-adjacent-stacks");const i=this.layoutContentCache.getContentItemOrThrow(t);return(0,x.getAdjacentStacks)(i,e).map((t=>({entityId:this.layoutContentCache.getOrCreateEntityId(t)})))},this.setStackActiveView=async(t,e)=>{this.analytics("set-stack-active-view");const i=this.layoutContentCache.getContentItemOrThrow(t,["stack"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to set a view ('${e.name}') as active when it does not belong to the stack.`);i.setActiveContentItem(n,!0)}}async getLayout(t){const e=await L.DefaultLayoutManager.resolveLayout(this.layoutManager,t);if(!e)throw new Error(`Could not resolve target layout identity ${JSON.stringify(t)}`);return e}getContent(t){this.analytics("get-content");return this.layoutContentCache.getContentItemOrThrow(t,["column","row"]).contentItems.map((t=>({type:t.type,entityId:this.layoutContentCache.getOrCreateEntityId(t)})))}getParent(t){this.analytics("get-parent");const e=this.layoutContentCache.getContentItemOrThrow(t);if(!e.isRoot())return e.parent?.contentItems.includes(e)?{type:e.parent.type,entityId:this.layoutContentCache.getOrCreateEntityId(e.parent)}:void 0}}S([(0,E.expose)()],z.prototype,"getLayoutIdentityForViewOrThrow",void 0),S([(0,E.expose)()],z.prototype,"getRoot",void 0),S([(0,E.expose)()],z.prototype,"getStackByView",void 0),S([(0,E.expose)()],z.prototype,"getStackViews",void 0),S([(0,E.expose)()],z.prototype,"getContent",null),S([(0,E.expose)()],z.prototype,"getParent",null),S([(0,E.expose)()],z.prototype,"isRoot",void 0),S([(0,E.expose)()],z.prototype,"exists",void 0),S([(0,E.expose)()],z.prototype,"addViewToStack",void 0),S([(0,E.expose)()],z.prototype,"removeViewFromStack",void 0),S([(0,E.expose)()],z.prototype,"createAdjacentStack",void 0),S([(0,E.expose)()],z.prototype,"getAdjacentStacks",void 0),S([(0,E.expose)()],z.prototype,"setStackActiveView",void 0),I.LayoutEntitiesController=z,Object.defineProperty(g,"__esModule",{value:!0});var M=g.initLayoutEndpoints=void 0;const P=t.apiExposer,T=t.layout_constants,A=f,k=I,D=i;M=g.initLayoutEndpoints=async function(t,e){const i=t.getFin(),n=await i.Platform.getCurrentSync().getClient(),o=new P.ChannelsExposer(n);await new P.ApiExposer(o).exposeInstance(new k.LayoutEntitiesController(t,e,A.LayoutContentCache.getSingleInstance()),{id:T.LAYOUT_CONTROLLER_ID}),await async function(t,e){const i=t=>async i=>{const n=await D.DefaultLayoutManager.resolveLayout(e,i.target);if(!n)throw new Error(`Could not resolve the layout target from payload ${JSON.stringify(i)}`);return t(n,i)},n=(e,n)=>{t.register(e,i(n))},o=(t,e)=>{n(t,e)};n("replace-view",((t,e)=>t.replaceView(e))),n("replace-layout",((t,{layout:e})=>t.replaceLayout(e))),n("add-view",((t,e)=>t.insertView(e))),o("layout-add-view",((t,{viewOptions:e,location:i,targetView:n})=>t.platformCreateView(e,{location:i,targetView:n}))),n("close-view",((t,e)=>t.cleanupView(e.viewIdentity))),o("layout-close-view",((t,e)=>t.platformCloseView(e.viewIdentity))),n("apply-preset-layout",((t,e)=>t.applyPreset(e))),n("get-layout-views",(t=>t.getCurrentViews())),n("get-frame-snapshot",(t=>t.getFrameSnapshot())),n("is-visible",(t=>t.isVisible())),n("destroy",(t=>t.destroy())),t.register("get-layout-snapshot",(()=>e.getLayoutSnapshot()))}(n,e)};var R={};Object.defineProperty(R,"__esModule",{value:!0});var U=R.BaseLayout=void 0;U=R.BaseLayout=class{};var O={};Object.defineProperty(O,"__esModule",{value:!0});var V=O.DOMEmitter=void 0;V=O.DOMEmitter=class{constructor(t){this.container=t}dispatchLocalEvent(t,e){const i={...e,type:t,tabSelector:`tab-${e.name}`,containerSelector:`container-${e.name}`,topic:"openfin-DOM-event"};this.container.dispatchEvent(new CustomEvent(t,{detail:i}))}};var B={};Object.defineProperty(B,"__esModule",{value:!0});var H=B.mapLayoutContentItemsImmutableSync=B.mapLayoutContentItemsImmutable=W=B.isVisible=void 0;var W=B.isVisible=t=>(0!==t.offsetWidth||0!==t.offsetHeight)&&"hidden"!==window.getComputedStyle(t).visibility&&t.offsetTop>=0&&t.offsetLeft>=0&&t.offsetTop<=window.innerHeight&&t.offsetLeft<=window.innerWidth;const F=t=>"type"in t&&"component"===t.type;B.mapLayoutContentItemsImmutable=async function t(e,i){return F(i)?e(i):{...i,content:await Promise.all(i.content?.map((i=>t(e,i))))}},H=B.mapLayoutContentItemsImmutableSync=function t(e,i){return F(i)?e(i):{...i,content:i.content?.map((i=>t(e,i)))}};class N extends Error{constructor(t,e){super(e),this.type=t}}class G extends N{constructor(t,e){super("Configuration",t),this.node=e}}class j extends N{constructor(t){super("PopoutBlocked",t)}}class $ extends N{constructor(t){super("API",t)}}class Z extends N{constructor(t){super("Bind",t)}}class q extends Error{constructor(t,e,i){super(`${t}: ${e}${void 0===i?"":": "+i}`)}}class X extends q{constructor(t,e){super("Assert",t,e)}}class Y extends q{constructor(t,e,i){super("UnreachableCase",t,`${e}${void 0===i?"":": "+i}`)}}class K extends q{constructor(t,e){super("UnexpectedNull",t,e)}}class J extends q{constructor(t,e){super("UnexpectedUndefined",t,e)}}var Q;!function(t){let e=!1;const i={PopoutCannotBeCreatedWithGroundItemConfig:{id:0,default:"Popout cannot be created with ground ItemConfig"},PleaseRegisterAConstructorFunction:{id:1,default:"Please register a constructor function"},ComponentTypeNotRegisteredAndBindComponentEventHandlerNotAssigned:{id:2,default:"Component type not registered and BindComponentEvent handler not assigned"},ComponentIsAlreadyRegistered:{id:3,default:"Component is already registered"},ComponentIsNotVirtuable:{id:4,default:"Component is not virtuable. Requires rootHtmlElement field/getter"},VirtualComponentDoesNotHaveRootHtmlElement:{id:5,default:'Virtual component does not have getter "rootHtmlElement"'},ItemConfigIsNotTypeComponent:{id:6,default:"ItemConfig is not of type component"},InvalidNumberPartInSizeString:{id:7,default:"Invalid number part in size string"},UnknownUnitInSizeString:{id:8,default:"Unknown unit in size string"},UnsupportedUnitInSizeString:{id:9,default:"Unsupported unit in size string"}};t.idCount=Object.keys(i).length;const n=Object.values(i);t.checkInitialise=function(){if(!e)for(let e=0;e="0"&&t<="9"}function Tt(t,e){const i=zt(e);t.style.width=i}function At(t,e){const i=zt(e);t.style.height=i}function kt(t){return{width:t.offsetWidth,height:t.offsetHeight}}function Dt(t,e){t.style.display=e?"":"none"}function Rt(t,e){if(void 0!==e)for(const i in e)if(e.hasOwnProperty(i)){const n=e[i],o=t[i];t[i]=Ut(o,n)}return t}function Ut(t,e){if("object"!=typeof e)return e;if(Array.isArray(e)){const t=e.length,i=new Array(t);for(let n=0;n36)throw new Error("Too many keys in config minifier map")},t.translateObject=n}(dt||(dt={})),function(t){t.defaults={type:at.ground,content:[],size:1,sizeUnit:ht.Fractional,minSize:void 0,minSizeUnit:ht.Pixel,id:"",isClosable:!0},t.createCopy=function(t,e){switch(t.type){case at.ground:case at.row:case at.column:return gt.createCopy(t,e);case at.stack:return ut.createCopy(t,e);case at.component:return pt.createCopy(t);default:throw new Y("CICC91354",t.type,"Invalid Config Item type specified")}},t.createDefault=function(t){switch(t){case at.ground:throw new X("CICCDR91562");case at.row:case at.column:return gt.createDefault(t);case at.stack:return ut.createDefault();case at.component:return pt.createDefault();default:throw new Y("CICCDD91563",t,"Invalid Config Item type specified")}},t.isComponentItem=function(t){return t.type===at.component},t.isStackItem=function(t){return t.type===at.stack},t.isGroundItem=function(t){return t.type===at.ground}}(ct||(ct={})),function(t){t.defaultMaximised=!1,function(t){t.createCopy=function(t,e){return void 0===t?void 0:{show:null!=e?e:t.show,popout:t.popout,close:t.close,maximise:t.maximise,minimise:t.minimise,tabDropdown:t.tabDropdown}}}(t.Header||(t.Header={}))}(mt||(mt={})),function(t){function e(t){const e=t.length,i=new Array(e);for(let n=0;n"__glMaximised"===t));t>0&&(o=!0,n=n.splice(t,1)),e=n.length>0?n[0]:ct.defaults.id}else e=n;return i=void 0!==t.maximised?t.maximised:o,{id:e,maximised:i}}}(wt||(wt={})),function(t){function e(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0;return{resolved:!0,root:Et.resolve(i),openPopouts:t.resolveOpenPopouts(e.openPopouts),dimensions:t.Dimensions.resolve(e.dimensions),settings:t.Settings.resolve(e.settings),header:t.Header.resolve(e.header,e.settings,e.labels)}}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:Lt.fromResolvedArray(e.openPopouts),settings:_t.Settings.createCopy(e.settings),dimensions:t.Dimensions.fromResolved(e.dimensions),header:_t.Header.createCopy(e.header)}},t.isResolved=function(t){const e=t;return void 0!==e.resolved&&!0===e.resolved},t.resolveOpenPopouts=function(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0,{root:Et.resolve(o),openPopouts:xt.resolveOpenPopouts(e.openPopouts),dimensions:xt.Dimensions.resolve(e.dimensions),settings:xt.Settings.resolve(e.settings),header:xt.Header.resolve(e.header,e.settings,e.labels),parentId:null!==(i=e.parentId)&&void 0!==i?i:null,indexInParent:null!==(n=e.indexInParent)&&void 0!==n?n:null,window:t.Window.resolve(e.window,e.dimensions),resolved:!0}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:i(e.openPopouts),dimensions:xt.Dimensions.fromResolved(e.dimensions),settings:_t.Settings.createCopy(e.settings),header:_t.Header.createCopy(e.header),parentId:e.parentId,indexInParent:e.indexInParent,window:t.Window.fromResolved(e.window)}},t.fromResolvedArray=i}(Lt||(Lt={}));class Wt{constructor(){this._allEventSubscriptions=[],this._subscriptionsMap=new Map,this.unbind=this.removeEventListener,this.trigger=this.emit}tryBubbleEvent(t,e){}emit(t,...e){let i=this._subscriptionsMap.get(t);if(void 0!==i){i=i.slice();for(let t=0;t0){const n=e.slice();n.unshift(t);const o=this._allEventSubscriptions.slice();for(let t=0;t0?n.contentItems[0]:n,e=0);const o=this._layoutManager.createAndInitContentItem(i,t);t.addChild(o,e),this._layoutManager.layoutConfig.settings.popInOnClose?this._onClose():this.close()}createWindow(){const t=this.createUrl(),e=Math.floor(1e6*Math.random()).toString(36),i=this.serializeWindowFeatures({width:this._initialWindowSize.width,height:this._initialWindowSize.height,innerWidth:this._initialWindowSize.width,innerHeight:this._initialWindowSize.height,menubar:"no",toolbar:"no",location:"no",personalbar:"no",resizable:"yes",scrollbars:"no",status:"no"});if(this._popoutWindow=globalThis.open(t,e,i),this._popoutWindow)this._popoutWindow.addEventListener("load",(()=>this.positionWindow()),{passive:!0}),this._popoutWindow.addEventListener("beforeunload",(()=>{this._layoutManager.layoutConfig.settings.popInOnClose?this.popIn():this._onClose()}),{passive:!0}),this._checkReadyInterval=setInterval((()=>this.checkReady()),10);else if(!0===this._layoutManager.layoutConfig.settings.blockedPopoutsThrowError){throw new j("Popout blocked")}}checkReady(){if(null===this._popoutWindow)throw new K("BPCR01844");this._popoutWindow.__glInstance&&this._popoutWindow.__glInstance.isInitialised&&(this.onInitialised(),void 0!==this._checkReadyInterval&&(clearInterval(this._checkReadyInterval),this._checkReadyInterval=void 0))}serializeWindowFeatures(t){const e=[];for(const i in t)e.push(i+"="+t[i].toString());return e.join(",")}createUrl(){const t="gl-window-config-"+Ot(),e=_t.minifyConfig(this._config);try{localStorage.setItem(t,JSON.stringify(e))}catch(t){throw new Error("Error while writing to localStorage "+function(t){return t instanceof Error?t.message:"string"==typeof t?t:"Unknown Error"}(t))}const i=new URL(location.href);return i.searchParams.set("gl-window",t),i.toString()}positionWindow(){if(null===this._popoutWindow)throw new Error("BrowserPopout.positionWindow: null popoutWindow");this._popoutWindow.moveTo(this._initialWindowSize.left,this._initialWindowSize.top),this._popoutWindow.focus()}onInitialised(){this._isInitialised=!0,this.getGlInstance().on("popIn",(()=>this.popIn())),this.emit("initialised")}_onClose(){setTimeout((()=>this.emit("closed")),50)}}class Gt extends Wt{constructor(t,e,i,n){super(),this.layoutManager=t,this._parent=i,this._element=n,this._popInParentIds=[],this._type=e.type,this._id=e.id,this._isInitialised=!1,this.isGround=!1,this.isRow=!1,this.isColumn=!1,this.isStack=!1,this.isComponent=!1,this.size=e.size,this.sizeUnit=e.sizeUnit,this.minSize=e.minSize,this.minSizeUnit=e.minSizeUnit,this._isClosable=e.isClosable,this._pendingEventPropagations={},this._throttledEvents=["stateChanged"],this._contentItems=this.createContentItems(e.content)}get type(){return this._type}get id(){return this._id}set id(t){this._id=t}get popInParentIds(){return this._popInParentIds}get parent(){return this._parent}get contentItems(){return this._contentItems}get isClosable(){return this._isClosable}get element(){return this._element}get isInitialised(){return this._isInitialised}static isStack(t){return t.isStack}static isComponentItem(t){return t.isComponent}static isComponentParentableItem(t){return t.isStack||t.isGround}removeChild(t,e=!1){const i=this._contentItems.indexOf(t);if(-1===i)throw new Error("Can't remove child item. Unknown content item");if(e||this._contentItems[i].destroy(),this._contentItems.splice(i,1),this._contentItems.length>0)this.updateSize(!1);else if(!this.isGround&&!0===this._isClosable){if(null===this._parent)throw new K("CIUC00874");this._parent.removeChild(this)}}addChild(t,e,i){return null!=e||(e=this._contentItems.length),this._contentItems.splice(e,0,t),t.setParent(this),!0===this._isInitialised&&!1===t._isInitialised&&t.init(),e}replaceChild(t,e,i=!1){const n=this._contentItems.indexOf(t),o=t._element.parentNode;if(-1===n)throw new X("CIRCI23232","Can't replace child. oldChild is not child of this");if(null===o)throw new K("CIRCP23232");if(o.replaceChild(e._element,t._element),!0===i&&(t._parent=null,t.destroy()),this._contentItems[n]=e,e.setParent(this),e.size=t.size,e.sizeUnit=t.sizeUnit,e.minSize=t.minSize,e.minSizeUnit=t.minSizeUnit,null===e._parent)throw new K("CIRCNC45699");!0===e._parent._isInitialised&&!1===e._isInitialised&&e.init(),this.updateSize(!1)}remove(){if(null===this._parent)throw new K("CIR11110");this._parent.removeChild(this)}popout(){const t=Ot(),e=this.layoutManager.createPopoutFromContentItem(this,void 0,t,void 0);return this.emitBaseBubblingEvent("stateChanged"),e}calculateConfigContent(){const t=this._contentItems,e=t.length,i=new Array(e);for(let n=0;nthis.propagateEventToLayoutManager(t,e))))}propagateEventToLayoutManager(t,e){this._pendingEventPropagations[t]=!1,this.layoutManager.emitUnknown(t,e)}}class jt extends Gt{constructor(t,e,i){super(t,e,i,document.createElement("div")),this._parentItem=i,this._focused=!1,this.isComponent=!0,this._reorderEnabled=e.reorderEnabled,this.applyUpdatableConfig(e),this._initialWantMaximise=e.maximised;const n=document.createElement("div");n.classList.add("lm_content"),this.element.appendChild(n),this._container=new Ft(e,this,t,n,(t=>this.handleUpdateItemConfigEvent(t)),(()=>this.show()),(()=>this.hide()),(t=>this.focus(t)),(t=>this.blur(t)))}get componentName(){return this._container.componentType}get componentType(){return this._container.componentType}get reorderEnabled(){return this._reorderEnabled}get initialWantMaximise(){return this._initialWantMaximise}get component(){return this._container.component}get container(){return this._container}get parentItem(){return this._parentItem}get headerConfig(){return this._headerConfig}get title(){return this._title}get tab(){return this._tab}get focused(){return this._focused}destroy(){this._container.destroy(),super.destroy()}applyUpdatableConfig(t){this.setTitle(t.title),this._headerConfig=t.header}toConfig(){const t=this._container.stateRequestEvent,e=void 0===t?this._container.state:t();return{type:at.component,content:[],size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,maximised:!1,isClosable:this.isClosable,reorderEnabled:this._reorderEnabled,title:this._title,header:mt.Header.createCopy(this._headerConfig),componentType:pt.copyComponentType(this.componentType),componentState:e}}close(){if(null===this.parent)throw new K("CIC68883");this.parent.removeChild(this,!1)}enterDragMode(t,e){Tt(this.element,t),At(this.element,e),this._container.enterDragMode(t,e)}exitDragMode(){this._container.exitDragMode()}enterStackMaximised(){this._container.enterStackMaximised()}exitStackMaximised(){this._container.exitStackMaximised()}drag(){this._container.drag()}updateSize(t){this.updateNodeSize(t)}init(){this.updateNodeSize(!1),super.init(),this._container.emit("open"),this.initContentItems()}setTitle(t){this._title=t,this.emit("titleChanged",t),this.emit("stateChanged")}setTab(t){this._tab=t,this.emit("tab",t),this._container.setTab(t)}hide(){super.hide(),this._container.setVisibility(!1)}show(){super.show(),this._container.setVisibility(!0)}focus(t=!1){this.parentItem.setActiveComponentItem(this,!0,t)}setFocused(t){this._focused=!0,this.tab.setFocused(),t||this.emitBaseBubblingEvent("focus")}blur(t=!1){this._focused&&this.layoutManager.setFocusedComponentItem(void 0,t)}setBlurred(t){this._focused=!1,this.tab.setBlurred(),t||this.emitBaseBubblingEvent("blur")}setParent(t){this._parentItem=t,super.setParent(t)}handleUpdateItemConfigEvent(t){this.applyUpdatableConfig(t)}updateNodeSize(t){if("none"!==this.element.style.display){const{width:e,height:i}=kt(this.element);this._container.setSizeToNodeSize(e,i,t)}}}class $t extends Gt{constructor(){super(...arguments),this._focused=!1}get focused(){return this._focused}setFocusedValue(t){this._focused=t}}class Zt extends Wt{constructor(t,e){super(),this._eElement=t,this._pointerTracking=!1,this._pointerDownEventListener=t=>this.onPointerDown(t),this._pointerMoveEventListener=t=>this.onPointerMove(t),this._pointerUpEventListener=t=>this.onPointerUp(t),this._timeout=void 0,this._allowableTargets=[t,...e],this._oDocument=document,this._eBody=document.body,this._nDelay=1800,this._nDistance=10,this._nX=0,this._nY=0,this._nOriginalX=0,this._nOriginalY=0,this._dragging=!1,this._eElement.addEventListener("pointerdown",this._pointerDownEventListener,{passive:!0})}destroy(){this.checkRemovePointerTrackingEventListeners(),this._eElement.removeEventListener("pointerdown",this._pointerDownEventListener)}cancelDrag(){this.processDragStop(void 0)}onPointerDown(t){if(this._allowableTargets.includes(t.target)&&t.isPrimary){const e=this.getPointerCoordinates(t);this.processPointerDown(e)}}processPointerDown(t){this._nOriginalX=t.x,this._nOriginalY=t.y,this._oDocument.addEventListener("pointermove",this._pointerMoveEventListener),this._oDocument.addEventListener("pointerup",this._pointerUpEventListener,{passive:!0}),this._pointerTracking=!0,this._timeout=setTimeout((()=>{try{this.startDrag()}catch(t){throw console.error(t),t}}),this._nDelay)}onPointerMove(t){this._pointerTracking&&(this.processDragMove(t),t.preventDefault())}processDragMove(t){this._nX=t.pageX-this._nOriginalX,this._nY=t.pageY-this._nOriginalY,!1===this._dragging&&(Math.abs(this._nX)>this._nDistance||Math.abs(this._nY)>this._nDistance)&&this.startDrag(),this._dragging&&this.emit("drag",this._nX,this._nY,t)}onPointerUp(t){this.processDragStop(t)}processDragStop(t){var e;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this.checkRemovePointerTrackingEventListeners(),!0===this._dragging&&(this._eBody.classList.remove("lm_dragging"),this._eElement.classList.remove("lm_dragging"),null===(e=this._oDocument.querySelector("iframe"))||void 0===e||e.style.setProperty("pointer-events",""),this._dragging=!1,this.emit("dragStop",t))}checkRemovePointerTrackingEventListeners(){this._pointerTracking&&(this._oDocument.removeEventListener("pointermove",this._pointerMoveEventListener),this._oDocument.removeEventListener("pointerup",this._pointerUpEventListener),this._pointerTracking=!1)}startDrag(){var t;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this._dragging=!0,this._eBody.classList.add("lm_dragging"),this._eElement.classList.add("lm_dragging"),null===(t=this._oDocument.querySelector("iframe"))||void 0===t||t.style.setProperty("pointer-events","none"),this.emit("dragStart",this._nOriginalX,this._nOriginalY)}getPointerCoordinates(t){return{x:t.pageX,y:t.pageY}}}class qt{constructor(t,e,i){this._isVertical=t,this._size=e,this._grabSize=i0){const i=this.createSplitter(Math.max(0,e-1)).element;e>0?(this.contentItems[e-1].element.insertAdjacentElement("afterend",i),i.insertAdjacentElement("afterend",t.element)):(this.contentItems[0].element.insertAdjacentElement("beforebegin",i),i.insertAdjacentElement("beforebegin",t.element))}else this._childElementContainer.appendChild(t.element);super.addChild(t,e);const n=1/this.contentItems.length*100;if(!0===i)return this.emitBaseBubblingEvent("stateChanged"),e;for(let e=0;e0&&(this.calculateRelativeSizes(),this.setAbsoluteSizes()),this.emitBaseBubblingEvent("stateChanged"),this.emit("resize")}setAbsoluteSizes(){const t=this.calculateAbsoluteSizes();for(let e=0;e0&&t.itemSizes[e]++,this._isColumn?(Tt(this.contentItems[e].element,t.crossAxisSize),At(this.contentItems[e].element,t.itemSizes[e])):(Tt(this.contentItems[e].element,t.itemSizes[e]),At(this.contentItems[e].element,t.crossAxisSize))}calculateAbsoluteSizes(){const t=(this.contentItems.length-1)*this._splitterSize,{width:e,height:i}=kt(this.element);let n,o;this._isColumn?(n=i-t,o=e):(n=e-t,o=i);let s=0;const r=[];for(let t=0;t0){const n=100-t;for(let t=0;t100&&e.length>0){for(let t=0;te)return;{const r=i/e;let a=i;for(let e=0;ethis.onSplitterDrag(e,t,i))),e.on("dragStop",(()=>this.onSplitterDragStop(e))),e.on("dragStart",(()=>this.onSplitterDragStart(e))),this._splitter.splice(t,0,e),e}getSplitItems(t){const e=this._splitter.indexOf(t);return{before:this.contentItems[e],after:this.contentItems[e+1]}}calculateContentItemMinSize(t){const e=t.minSize;if(void 0!==e){if(t.minSizeUnit===ht.Pixel)return e;throw new X("ROCGMD98831",JSON.stringify(t))}{const t=this.layoutManager.layoutConfig.dimensions;return this._isColumn?t.defaultMinItemHeight:t.defaultMinItemWidth}}calculateContentItemsTotalMinSize(t){let e=0;for(const i of t)e+=this.calculateContentItemMinSize(i);return e}onSplitterDragStart(t){const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=this.calculateContentItemsTotalMinSize(e.before.contentItems),s=this.calculateContentItemsTotalMinSize(e.after.contentItems);this._splitterPosition=0,this._splitterMinPosition=-1*(i-o),this._splitterMaxPosition=n-s}onSplitterDrag(t,e,i){let n=this._isColumn?i:e;if(null===this._splitterMinPosition||null===this._splitterMaxPosition)throw new K("ROCOSD59226");n=Math.max(n,this._splitterMinPosition),n=Math.min(n,this._splitterMaxPosition),this._splitterPosition=n;const o=zt(n);this._isColumn?t.element.style.top=o:t.element.style.left=o}onSplitterDragStop(t){if(null===this._splitterPosition)throw new K("ROCOSDS66932");{const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=(this._splitterPosition+i)/(i+n),s=e.before.size+e.after.size;e.before.size=o*s,e.after.size=(1-o)*s,t.element.style.top=zt(0),t.element.style.left=zt(0),globalThis.requestAnimationFrame((()=>this.updateSize(!1)))}}}!function(t){t.getElementDimensionSize=function(t,e){return"width"===e?function(t){return t.offsetWidth}(t):function(t){return t.offsetHeight}(t)},t.setElementDimensionSize=function(t,e,i){return"width"===e?Tt(t,i):At(t,i)},t.createElement=function(t,e){const i=t.createElement("div");return i.classList.add("lm_item"),e?i.classList.add("lm_column"):i.classList.add("lm_row"),i}}(Xt||(Xt={}));class Yt extends $t{constructor(t,e,i){super(t,vt.create(e),null,Yt.createElement(document)),this.isGround=!0,this._childElementContainer=this.element,this._containerElement=i;let n=null;for(;;){const t=n?n.previousSibling:this._containerElement.lastChild;if(!(t instanceof Element&&t.classList.contains("lm_content")))break;n=t}this._containerElement.insertBefore(this.element,n)}init(){if(!0!==this.isInitialised){this.updateNodeSize();for(let t=0;t0?this.contentItems[0]:this,n.isComponent)throw new Error("Cannot add item as child to ComponentItem");{const t=this.layoutManager.createAndInitContentItem(i,n);return e=n.addChild(t,e),n===this?-1:e}}loadComponentAsRoot(t){this.clearRoot();const e=Ct.resolve(t,!1);if(e.maximised)throw new Error("Root Component cannot be maximised");{const t=new jt(this.layoutManager,e,this);t.init(),this.addChild(t,0)}}addChild(t,e){if(this.contentItems.length>0)throw new Error("Ground node can only have a single child");return this._childElementContainer.appendChild(t.element),e=super.addChild(t,e),this.updateSize(!1),this.emitBaseBubblingEvent("stateChanged"),e}calculateConfigContent(){const t=this.contentItems,e=t.length,i=new Array(e);for(let n=0;n0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e)),this.updateContentItemsSize(!1))}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}createSideAreas(){const t=Yt.Area.oppositeSides,e=new Array(Object.keys(t).length);let i=0;for(const n in t){const o=n,s=this.getElementArea();if(null===s)throw new K("RCSA77553");s.side=o,"2"===t[o][1]?s[o]=s[t[o]]-50:s[o]=s[t[o]]+50,s.surface=(s.x2-s.x1)*(s.y2-s.y1),e[i++]=s}return e}highlightDropZone(t,e,i){this.layoutManager.tabDropPlaceholder.remove(),super.highlightDropZone(t,e,i)}onDrop(t,e){if(t.isComponent){const e=ut.createDefault(),i=t;e.header=mt.Header.createCopy(i.headerConfig);const n=this.layoutManager.createAndInitContentItem(e,this);n.addChild(t),t=n}if(0===this.contentItems.length)this.addChild(t);else{if(t.type===at.row||t.type===at.column){const e=ut.createDefault(),i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}const i="x"==e.side[0]?at.row:at.column,n="2"==e.side[1],o=this.contentItems[0];if(o instanceof Xt&&o.type===i){const e=o.contentItems[n?0:o.contentItems.length-1];o.addChild(t,n?0:void 0,!0),e.size*=.5,t.size=e.size,t.sizeUnit=ht.Percent,o.updateSize(!1)}else{const e=ct.createDefault(i),s=this.layoutManager.createContentItem(e,this);this.replaceChild(o,s),s.addChild(t,n?0:void 0,!0),s.addChild(o,n?void 0:0,!0),o.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}}dock(){throw new X("GID87731")}validateDocking(){throw new X("GIVD87732")}getAllContentItems(){const t=[this];return this.deepGetAllContentItems(this.contentItems,t),t}getConfigMaximisedItems(){const t=[];return this.deepFilterContentItems(this.contentItems,t,(t=>!(!Gt.isStack(t)||!t.initialWantMaximise)||!(!Gt.isComponentItem(t)||!t.initialWantMaximise))),t}getItemsByPopInParentId(t){const e=[];return this.deepFilterContentItems(this.contentItems,e,(e=>e.popInParentIds.includes(t))),e}toConfig(){throw new Error("Cannot generate GroundItem config")}setActiveComponentItem(t,e,i){}updateNodeSize(){const{width:t,height:e}=kt(this._containerElement);Tt(this.element,t),At(this.element,e),this.contentItems.length>0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e))}deepGetAllContentItems(t,e){for(let i=0;ithis.onClick(t),this._touchStartEventListener=t=>this.onTouchStart(t),this._element=document.createElement("div"),this._element.classList.add(i),this._element.title=e,this._header.on("destroy",(()=>this.destroy())),this._element.addEventListener("click",this._clickEventListener,{passive:!0}),this._element.addEventListener("touchstart",this._touchStartEventListener,{passive:!0}),this._header.controlsContainerElement.appendChild(this._element)}get element(){return this._element}destroy(){var t;this._element.removeEventListener("click",this._clickEventListener),this._element.removeEventListener("touchstart",this._touchStartEventListener),null===(t=this._element.parentNode)||void 0===t||t.removeChild(this._element)}onClick(t){this._pushEvent(t)}onTouchStart(t){this._pushEvent(t)}}class Jt{constructor(t,e,i,n,o){var s;this._layoutManager=t,this._componentItem=e,this._closeEvent=i,this._focusEvent=n,this._dragStartEvent=o,this._isActive=!1,this._tabClickListener=t=>this.onTabClickDown(t),this._tabTouchStartListener=t=>this.onTabTouchStart(t),this._closeClickListener=()=>this.onCloseClick(),this._closeTouchStartListener=()=>this.onCloseTouchStart(),this._dragStartListener=(t,e)=>this.onDragStart(t,e),this._contentItemDestroyListener=()=>this.onContentItemDestroy(),this._tabTitleChangedListener=t=>this.setTitle(t),this._element=document.createElement("div"),this._element.classList.add("lm_tab"),this._titleElement=document.createElement("span"),this._titleElement.classList.add("lm_title"),this._closeElement=document.createElement("div"),this._closeElement.classList.add("lm_close_tab"),this._element.appendChild(this._titleElement),this._element.appendChild(this._closeElement),e.isClosable?this._closeElement.style.display="":this._closeElement.style.display="none",this.setTitle(e.title),this._componentItem.on("titleChanged",this._tabTitleChangedListener);(null!==(s=e.reorderEnabled)&&void 0!==s?s:this._layoutManager.layoutConfig.settings.reorderEnabled)&&this.enableReorder(),this._element.addEventListener("click",this._tabClickListener,{passive:!0}),this._element.addEventListener("touchstart",this._tabTouchStartListener,{passive:!0}),this._componentItem.isClosable?(this._closeElement.addEventListener("click",this._closeClickListener,{passive:!0}),this._closeElement.addEventListener("touchstart",this._closeTouchStartListener,{passive:!0})):(this._closeElement.remove(),this._closeElement=void 0),this._componentItem.setTab(this),this._layoutManager.emit("tabCreated",this)}get isActive(){return this._isActive}get componentItem(){return this._componentItem}get contentItem(){return this._componentItem}get element(){return this._element}get titleElement(){return this._titleElement}get closeElement(){return this._closeElement}get reorderEnabled(){return void 0!==this._dragListener}set reorderEnabled(t){t!==this.reorderEnabled&&(t?this.enableReorder():this.disableReorder())}setTitle(t){this._titleElement.innerText=t,this._element.title=t}setActive(t){t!==this._isActive&&(this._isActive=t,t?this._element.classList.add("lm_active"):this._element.classList.remove("lm_active"))}destroy(){var t,e;this._closeEvent=void 0,this._focusEvent=void 0,this._dragStartEvent=void 0,this._element.removeEventListener("click",this._tabClickListener),this._element.removeEventListener("touchstart",this._tabTouchStartListener),null===(t=this._closeElement)||void 0===t||t.removeEventListener("click",this._closeClickListener),null===(e=this._closeElement)||void 0===e||e.removeEventListener("touchstart",this._closeTouchStartListener),this._componentItem.off("titleChanged",this._tabTitleChangedListener),this.reorderEnabled&&this.disableReorder(),this._element.remove()}setBlurred(){this._element.classList.remove("lm_focused"),this._titleElement.classList.remove("lm_focused")}setFocused(){this._element.classList.add("lm_focused"),this._titleElement.classList.add("lm_focused")}onDragStart(t,e){if(void 0===this._dragListener)throw new J("TODSDLU10093");if(void 0===this._dragStartEvent)throw new J("TODS23309");this._dragStartEvent(t,e,this._dragListener,this.componentItem)}onContentItemDestroy(){void 0!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=void 0)}onTabClickDown(t){const e=t.target;e!==this._element&&e!==this._titleElement||(0===t.button?this.notifyFocus():1===t.button&&this._componentItem.isClosable&&this.notifyClose())}onTabTouchStart(t){t.target===this._element&&this.notifyFocus()}onCloseClick(){this.notifyClose()}onCloseTouchStart(){this.notifyClose()}notifyClose(){if(void 0===this._closeEvent)throw new J("TNC15007");this._closeEvent(this._componentItem)}notifyFocus(){if(void 0===this._focusEvent)throw new J("TNA15007");this._focusEvent(this._componentItem)}enableReorder(){this._dragListener=new Zt(this._element,[this._titleElement]),this._dragListener.on("dragStart",this._dragStartListener),this._componentItem.on("destroy",this._contentItemDestroyListener)}disableReorder(){if(void 0===this._dragListener)throw new J("TDR87745");this._componentItem.off("destroy",this._contentItemDestroyListener),this._dragListener.off("dragStart",this._dragStartListener),this._dragListener=void 0}}class Qt{constructor(t,e,i,n,o){this._layoutManager=t,this._componentRemoveEvent=e,this._componentFocusEvent=i,this._componentDragStartEvent=n,this._dropdownActiveChangedEvent=o,this._tabs=[],this._lastVisibleTabIndex=-1,this._dropdownActive=!1,this._element=document.createElement("section"),this._element.classList.add("lm_tabs"),this._dropdownElement=document.createElement("section"),this._dropdownElement.classList.add("lm_tabdropdown_list"),this._dropdownElement.style.display="none"}get tabs(){return this._tabs}get tabCount(){return this._tabs.length}get lastVisibleTabIndex(){return this._lastVisibleTabIndex}get element(){return this._element}get dropdownElement(){return this._dropdownElement}get dropdownActive(){return this._dropdownActive}destroy(){for(let t=0;tthis.handleTabCloseEvent(t)),(t=>this.handleTabFocusEvent(t)),((t,e,i,n)=>this.handleTabDragStartEvent(t,e,i,n)));void 0===e&&(e=this._tabs.length),this._tabs.splice(e,0,i),ethis._lastVisibleTabIndex){const t=this._tabs[e];for(let t=e;t>0;t--)this._tabs[t]=this._tabs[t-1];this._tabs[0]=t}}updateTabSizes(t,e){let i=!1;this.tryUpdateTabSizes(i,t,e)||(i=!0,this.tryUpdateTabSizes(i,t,e)),i!==this._dropdownActive&&(this._dropdownActive=i,this._dropdownActiveChangedEvent())}tryUpdateTabSizes(t,e,i){if(this._tabs.length>0){if(void 0===i)throw new Error("non-empty tabs must have active component item");let n=0,o=!1;const s=this._layoutManager.layoutConfig.settings.tabOverlapAllowance,r=this._tabs.indexOf(i.tab),a=this._tabs[r];this._lastVisibleTabIndex=-1;for(let i=0;ie){if(o)i===r&&(l.style.zIndex="auto",l.style.marginLeft="",l.parentElement!==this._element&&this._element.appendChild(l));else{let t;if(t=r>0&&r<=i?(d-e)/(i-1):(d-e)/i,tthis.onClick(t),this._touchStartListener=t=>this.onTouchStart(t),this._rowColumnClosable=!0,this._closeButton=null,this._popoutButton=null,this._tabsContainer=new Qt(this._layoutManager,(t=>this.handleTabInitiatedComponentRemoveEvent(t)),(t=>this.handleTabInitiatedComponentFocusEvent(t)),((t,e,i,n)=>this.handleTabInitiatedDragStartEvent(t,e,i,n)),(()=>this.processTabDropdownActiveChanged())),this._show=i.show,this._popoutEnabled=i.popoutEnabled,this._popoutLabel=i.popoutLabel,this._maximiseEnabled=i.maximiseEnabled,this._maximiseLabel=i.maximiseLabel,this._minimiseEnabled=i.minimiseEnabled,this._minimiseLabel=i.minimiseLabel,this._closeEnabled=i.closeEnabled,this._closeLabel=i.closeLabel,this._tabDropdownEnabled=i.tabDropdownEnabled,this._tabDropdownLabel=i.tabDropdownLabel,this.setSide(i.side),this._canRemoveComponent=this._configClosable,this._element=document.createElement("section"),this._element.classList.add("lm_header"),this._controlsContainerElement=document.createElement("section"),this._controlsContainerElement.classList.add("lm_controls"),this._element.appendChild(this._tabsContainer.element),this._element.appendChild(this._controlsContainerElement),this._element.appendChild(this._tabsContainer.dropdownElement),this._element.addEventListener("click",this._clickListener,{passive:!0}),this._element.addEventListener("touchstart",this._touchStartListener,{passive:!0}),this._documentMouseUpListener=()=>this._tabsContainer.hideAdditionalTabsDropdown(),globalThis.document.addEventListener("mouseup",this._documentMouseUpListener,{passive:!0}),this._tabControlOffset=this._layoutManager.layoutConfig.settings.tabControlOffset,this._tabDropdownEnabled&&(this._tabDropdownButton=new Kt(this,this._tabDropdownLabel,"lm_tabdropdown",(()=>this._tabsContainer.showAdditionalTabsDropdown()))),this._popoutEnabled&&(this._popoutButton=new Kt(this,this._popoutLabel,"lm_popout",(()=>this.handleButtonPopoutEvent()))),this._maximiseEnabled&&(this._maximiseButton=new Kt(this,this._maximiseLabel,"lm_maximise",(t=>this.handleButtonMaximiseToggleEvent(t)))),this._configClosable&&(this._closeButton=new Kt(this,this._closeLabel,"lm_close",(()=>s()))),this.processTabDropdownActiveChanged()}get show(){return this._show}get side(){return this._side}get leftRightSided(){return this._leftRightSided}get layoutManager(){return this._layoutManager}get parent(){return this._parent}get tabs(){return this._tabsContainer.tabs}get lastVisibleTabIndex(){return this._tabsContainer.lastVisibleTabIndex}get element(){return this._element}get tabsContainerElement(){return this._tabsContainer.element}get controlsContainerElement(){return this._controlsContainerElement}destroy(){this.emit("destroy"),this._popoutEvent=void 0,this._maximiseToggleEvent=void 0,this._clickEvent=void 0,this._touchStartEvent=void 0,this._componentRemoveEvent=void 0,this._componentFocusEvent=void 0,this._componentDragStartEvent=void 0,this._tabsContainer.destroy(),globalThis.document.removeEventListener("mouseup",this._documentMouseUpListener),this._element.remove()}createTab(t,e){this._tabsContainer.createTab(t,e)}removeTab(t){this._tabsContainer.removeTab(t)}processActiveComponentChanged(t){this._tabsContainer.processActiveComponentChanged(t),this.updateTabSizes()}setSide(t){this._side=t,this._leftRightSided=[nt.right,nt.left].includes(this._side)}setRowColumnClosable(t){this._rowColumnClosable=t,this.updateClosability()}updateClosability(){let t;if(this._configClosable)if(this._rowColumnClosable){t=!0;const e=this.tabs.length;for(let i=0;i1}applyFocusedValue(t){t?this._element.classList.add("lm_focused"):this._element.classList.remove("lm_focused")}processMaximised(){if(void 0===this._maximiseButton)throw new J("HPMAX16997");this._maximiseButton.element.setAttribute("title",this._minimiseLabel)}processMinimised(){if(void 0===this._maximiseButton)throw new J("HPMIN16997");this._maximiseButton.element.setAttribute("title",this._maximiseLabel)}updateTabSizes(){if(this._tabsContainer.tabCount>0){const t=this._show?this._layoutManager.layoutConfig.dimensions.headerHeight:0;let e;this._leftRightSided?(this._element.style.height="",this._element.style.width=zt(t)):(this._element.style.width="",this._element.style.height=zt(t)),e=this._leftRightSided?this._element.offsetHeight-this._controlsContainerElement.offsetHeight-this._tabControlOffset:this._element.offsetWidth-this._controlsContainerElement.offsetWidth-this._tabControlOffset,this._tabsContainer.updateTabSizes(e,this._getActiveComponentItemEvent())}}handleTabInitiatedComponentRemoveEvent(t){if(this._canRemoveComponent){if(void 0===this._componentRemoveEvent)throw new J("HHTCE22294");this._componentRemoveEvent(t)}}handleTabInitiatedComponentFocusEvent(t){if(void 0===this._componentFocusEvent)throw new J("HHTAE22294");this._componentFocusEvent(t)}handleTabInitiatedDragStartEvent(t,e,i,n){if(this._canRemoveComponent){if(void 0===this._componentDragStartEvent)throw new J("HHTDSE22294");this._componentDragStartEvent(t,e,i,n)}else i.cancelDrag()}processTabDropdownActiveChanged(){void 0!==this._tabDropdownButton&&Dt(this._tabDropdownButton.element,this._tabsContainer.dropdownActive)}handleButtonPopoutEvent(){if(this._layoutManager.layoutConfig.settings.popoutWholeStack){if(void 0===this._popoutEvent)throw new J("HHBPOE17834");this._popoutEvent()}else{const t=this._getActiveComponentItemEvent();t&&t.popout()}}handleButtonMaximiseToggleEvent(t){if(void 0===this._maximiseToggleEvent)throw new J("HHBMTE16834");this._maximiseToggleEvent()}onClick(t){t.target===this._element&&this.notifyClick(t)}onTouchStart(t){t.target===this._element&&this.notifyTouchStart(t)}notifyClick(t){if(void 0===this._clickEvent)throw new J("HNHC46834");this._clickEvent(t)}notifyTouchStart(t){if(void 0===this._touchStartEvent)throw new J("HNHTS46834");this._touchStartEvent(t)}}class ee extends $t{constructor(t,e,i){var n,o,s,r,a,l,h,d,c,m,u,p,g,f,v,_,y,C,w;super(t,e,i,ee.createElement(document)),this._headerSideChanged=!1,this._resizeListener=()=>this.handleResize(),this._maximisedListener=()=>this.handleMaximised(),this._minimisedListener=()=>this.handleMinimised(),this._headerConfig=e.header;const I=t.layoutConfig.header,b=e.content;let S;if(1!==b.length)S=void 0;else{S=b[0].header}this._initialWantMaximise=e.maximised,this._initialActiveItemIndex=null!==(n=e.activeItemIndex)&&void 0!==n?n:0;const E=null!==(r=null!==(s=null===(o=this._headerConfig)||void 0===o?void 0:o.show)&&void 0!==s?s:null==S?void 0:S.show)&&void 0!==r?r:I.show,x=null!==(h=null!==(l=null===(a=this._headerConfig)||void 0===a?void 0:a.popout)&&void 0!==l?l:null==S?void 0:S.popout)&&void 0!==h?h:I.popout,L=null!==(m=null!==(c=null===(d=this._headerConfig)||void 0===d?void 0:d.maximise)&&void 0!==c?c:null==S?void 0:S.maximise)&&void 0!==m?m:I.maximise,z=null!==(g=null!==(p=null===(u=this._headerConfig)||void 0===u?void 0:u.close)&&void 0!==p?p:null==S?void 0:S.close)&&void 0!==g?g:I.close,M=null!==(_=null!==(v=null===(f=this._headerConfig)||void 0===f?void 0:f.minimise)&&void 0!==v?v:null==S?void 0:S.minimise)&&void 0!==_?_:I.minimise,P=null!==(w=null!==(C=null===(y=this._headerConfig)||void 0===y?void 0:y.tabDropdown)&&void 0!==C?C:null==S?void 0:S.tabDropdown)&&void 0!==w?w:I.tabDropdown;this._maximisedEnabled=!1!==L;const T={show:!1!==E,side:!1===E?nt.top:E,popoutEnabled:!1!==x,popoutLabel:!1===x?"":x,maximiseEnabled:this._maximisedEnabled,maximiseLabel:!1===L?"":L,closeEnabled:!1!==z,closeLabel:!1===z?"":z,minimiseEnabled:!0,minimiseLabel:M,tabDropdownEnabled:!1!==P,tabDropdownLabel:!1===P?"":P};this._header=new te(t,this,T,e.isClosable&&!1!==z,(()=>this.getActiveComponentItem()),(()=>this.remove()),(()=>this.handlePopoutEvent()),(()=>this.toggleMaximise()),(t=>this.handleHeaderClickEvent(t)),(t=>this.handleHeaderTouchStartEvent(t)),(t=>this.handleHeaderComponentRemoveEvent(t)),(t=>this.handleHeaderComponentFocusEvent(t)),((t,e,i,n)=>this.handleHeaderComponentStartDragEvent(t,e,i,n))),this.isStack=!0,this._childElementContainer=document.createElement("section"),this._childElementContainer.classList.add("lm_items"),this.on("resize",this._resizeListener),this._maximisedEnabled&&(this.on("maximised",this._maximisedListener),this.on("minimised",this._minimisedListener)),this.element.appendChild(this._header.element),this.element.appendChild(this._childElementContainer),this.setupHeaderPosition(),this._header.updateClosability()}get childElementContainer(){return this._childElementContainer}get header(){return this._header}get headerShow(){return this._header.show}get headerSide(){return this._header.side}get headerLeftRightSided(){return this._header.leftRightSided}get contentAreaDimensions(){return this._contentAreaDimensions}get initialWantMaximise(){return this._initialWantMaximise}get isMaximised(){return this===this.layoutManager.maximisedStack}get stackParent(){if(!this.parent)throw new Error("Stack should always have a parent");return this.parent}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}init(){if(!0===this.isInitialised)return;this.updateNodeSize();for(let t=0;t0){if(this._initialActiveItemIndex<0||this._initialActiveItemIndex>=e)throw new Error(`ActiveItemIndex out of range: ${this._initialActiveItemIndex} id: ${this.id}`);for(let i=0;ithis.contentItems.length)throw e-=1,new X("SAC99728");if(t instanceof jt)return e=super.addChild(t,e),this._childElementContainer.appendChild(t.element),this._header.createTab(t,e),this.setActiveComponentItem(t,i),this._header.updateTabSizes(),this.updateSize(!1),t.container.setBaseLogicalZIndex(),this._header.updateClosability(),this.emitStateChangedEvent(),e;throw new X("SACC88532")}removeChild(t,e){const i=t,n=this.contentItems.indexOf(i),o=1===this.contentItems.length;if(this._activeComponentItem===i&&(i.focused&&i.blur(),!o)){const t=0===n?1:n-1;this.setActiveComponentItem(this.contentItems[t],!1)}this._header.removeTab(i),super.removeChild(i,e),o||this._header.updateClosability(),this.emitStateChangedEvent()}toggleMaximise(){this.isMaximised?this.minimise():this.maximise()}maximise(){if(!this.isMaximised){this.layoutManager.setMaximisedStack(this);const t=this.contentItems,e=t.length;for(let i=0;i0&&void 0===t)throw new Error("expected non-empty stack to have an active component item");return{type:"stack",content:this.calculateConfigContent(),size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,isClosable:this.isClosable,maximised:this.isMaximised,header:this.createHeaderConfig(),activeItemIndex:t}}onDrop(t,e){if("header"===this._dropSegment){if(this.resetHeaderDropZone(),void 0===this._dropIndex)throw new J("SODDI68990");return void this.addChild(t,this._dropIndex)}if("body"===this._dropSegment)return void this.addChild(t,0,!0);const i="top"===this._dropSegment||"bottom"===this._dropSegment,n="left"===this._dropSegment||"right"===this._dropSegment,o="top"===this._dropSegment||"left"===this._dropSegment,s=i&&this.stackParent.isColumn||n&&this.stackParent.isRow;if(t.isComponent){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createAndInitContentItem(e,this);i.addChild(t),t=i}if(t.type===at.row||t.type===at.column){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}if(s){const e=this.stackParent.contentItems.indexOf(this);this.stackParent.addChild(t,o?e:e+1,!0),this.size*=.5,t.size=this.size,t.sizeUnit=this.sizeUnit,this.stackParent.updateSize(!1)}else{const e=i?at.column:at.row,n=ct.createDefault(e),s=this.layoutManager.createContentItem(n,this);this.stackParent.replaceChild(this,s),s.addChild(t,o?0:void 0,!0),s.addChild(this,o?void 0:0,!0),this.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}highlightDropZone(t,e){for(const i in this._contentAreaDimensions){const n=i,o=this._contentAreaDimensions[n].hoverArea;if(o.x1t&&o.y1e)return void("header"===n?(this._dropSegment="header",this.highlightHeaderDropZone(this._header.leftRightSided?e:t)):(this.resetHeaderDropZone(),this.highlightBodyDropZone(n)))}}getArea(){if("none"===this.element.style.display)return null;const t=super.getElementArea(this._header.element),e=super.getElementArea(this._childElementContainer);if(null===t||null===e)throw new K("SGAHC13086");const i=e.x2-e.x1,n=e.y2-e.y1;return this._contentAreaDimensions={header:{hoverArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2},highlightArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2}}},0===this.contentItems.length?(this._contentAreaDimensions.body={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2}},super.getElementArea(this.element)):(this._contentAreaDimensions.left={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x1+.25*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x1+.5*i,y2:e.y2}},this._contentAreaDimensions.top={hoverArea:{x1:e.x1+.25*i,y1:e.y1,x2:e.x1+.75*i,y2:e.y1+.5*n},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y1+.5*n}},this._contentAreaDimensions.right={hoverArea:{x1:e.x1+.75*i,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1+.5*i,y1:e.y1,x2:e.x2,y2:e.y2}},this._contentAreaDimensions.bottom={hoverArea:{x1:e.x1+.25*i,y1:e.y1+.5*n,x2:e.x1+.75*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1+.5*n,x2:e.x2,y2:e.y2}},super.getElementArea(this.element))}positionHeader(t){this._header.side!==t&&(this._header.setSide(t),this._headerSideChanged=!0,this.setupHeaderPosition())}updateNodeSize(){if("none"!==this.element.style.display){const t=kt(this.element);if(this._header.show){t[this._header.leftRightSided?it.width:it.height]-=this.layoutManager.layoutConfig.dimensions.headerHeight}this._childElementContainer.style.width=zt(t.width),this._childElementContainer.style.height=zt(t.height);for(let e=0;e=o&&tthis.onDrag(t,e,i))),this._dragListener.on("dragStop",(()=>this.onDrop())),this.createDragProxyElements(t,e),null===this._componentItem.parent)throw new K("DPC10097");this._componentItemFocused=this._componentItem.focused,this._componentItemFocused&&this._componentItem.blur(),this._componentItem.parent.removeChild(this._componentItem,!0),this.setDimensions(),document.body.appendChild(this._element),this.determineMinMaxXY(),this._layoutManager.calculateItemAreas(),this.setDropPosition(t,e)}get element(){return this._element}createDragProxyElements(t,e){this._element=document.createElement("div"),this._element.classList.add("lm_dragProxy");const i=document.createElement("div");i.classList.add("lm_header");const n=document.createElement("div");n.classList.add("lm_tabs");const o=document.createElement("div");o.classList.add("lm_tab");const s=document.createElement("span");s.classList.add("lm_title"),o.appendChild(s),n.appendChild(o),i.appendChild(n),this._proxyContainerElement=document.createElement("div"),this._proxyContainerElement.classList.add("lm_content"),this._element.appendChild(i),this._element.appendChild(this._proxyContainerElement),this._originalParent instanceof ee&&this._originalParent.headerShow&&(this._sided=this._originalParent.headerLeftRightSided,this._element.classList.add("lm_"+this._originalParent.headerSide),[nt.right,nt.bottom].indexOf(this._originalParent.headerSide)>=0&&this._proxyContainerElement.insertAdjacentElement("afterend",i)),this._element.style.left=zt(t),this._element.style.top=zt(e),o.setAttribute("title",this._componentItem.title),s.insertAdjacentText("afterbegin",this._componentItem.title),this._proxyContainerElement.appendChild(this._componentItem.element)}determineMinMaxXY(){const t=this._layoutManager.groundItem;if(void 0===t)throw new J("DPDMMXY73109");{const e=t.element.getBoundingClientRect();this._minX=e.left+document.body.scrollLeft,this._minY=e.top+document.body.scrollTop,this._maxX=this._minX+e.width,this._maxY=this._minY+e.height}}onDrag(t,e,i){const n=i.pageX,o=i.pageY;this.setDropPosition(n,o),this._componentItem.drag()}setDropPosition(t,e){this._layoutManager.layoutConfig.settings.constrainDragToContainer&&(t<=this._minX?t=Math.ceil(this._minX):t>=this._maxX&&(t=Math.floor(this._maxX)),e<=this._minY?e=Math.ceil(this._minY):e>=this._maxY&&(e=Math.floor(this._maxY))),this._element.style.left=zt(t),this._element.style.top=zt(e),this._area=this._layoutManager.getArea(t,e),null!==this._area&&(this._lastValidArea=this._area,this._area.contentItem.highlightDropZone(t,e,this._area))}onDrop(){const t=this._layoutManager.dropTargetIndicator;if(null===t)throw new K("DPOD30011");let e;if(t.hide(),this._componentItem.exitDragMode(),null!==this._area)e=this._componentItem,this._area.contentItem.onDrop(e,this._area);else if(null!==this._lastValidArea){e=this._componentItem;this._lastValidArea.contentItem.onDrop(e,this._lastValidArea)}else this._originalParent?(e=this._componentItem,this._originalParent.addChild(e)):this._componentItem.destroy();this._element.remove(),this._layoutManager.emit("itemDropped",this._componentItem),this._componentItemFocused&&void 0!==e&&e.focus()}setDimensions(){const t=this._layoutManager.layoutConfig.dimensions;if(void 0===t)throw new Error("DragProxy.setDimensions: dimensions undefined");let e=t.dragProxyWidth,i=t.dragProxyHeight;if(void 0===e||void 0===i)throw new Error("DragProxy.setDimensions: width and/or height undefined");const n=!1===this._layoutManager.layoutConfig.header.show?0:t.headerHeight;this._element.style.width=zt(e),this._element.style.height=zt(i),e-=this._sided?n:0,i-=this._sided?0:n,this._proxyContainerElement.style.width=zt(e),this._proxyContainerElement.style.height=zt(i),this._componentItem.enterDragMode(e,i),this._componentItem.show()}}class ne{constructor(t,e,i,n,o,s,r){this._layoutManager=t,this._element=e,this._extraAllowableChildTargets=i,this._componentTypeOrFtn=n,this._componentState=o,this._title=s,this._id=r,this._dragListener=null,this._dummyGroundContainer=document.createElement("div");const a=gt.createDefault("row");this._dummyGroundContentItem=new Yt(this._layoutManager,a,this._dummyGroundContainer),this.createDragListener()}destroy(){this.removeDragListener()}createDragListener(){this.removeDragListener(),this._dragListener=new Zt(this._element,this._extraAllowableChildTargets),this._dragListener.on("dragStart",((t,e)=>this.onDragStart(t,e))),this._dragListener.on("dragStop",(()=>this.onDragStop()))}onDragStart(t,e){var i;const n="component";let o;if("function"==typeof this._componentTypeOrFtn){const t=this._componentTypeOrFtn();o=ne.isDragSourceComponentItemConfig(t)?{type:n,componentState:t.state,componentType:t.type,title:null!==(i=t.title)&&void 0!==i?i:this._title}:t}else o={type:n,componentState:this._componentState,componentType:this._componentTypeOrFtn,title:this._title,id:this._id};const s=bt.resolve(o,!1),r=new jt(this._layoutManager,s,this._dummyGroundContentItem);if(this._dummyGroundContentItem.contentItems.push(r),null===this._dragListener)throw new K("DSODSD66746");{const i=new ie(t,e,this._dragListener,this._layoutManager,r,this._dummyGroundContentItem),n=this._layoutManager.transitionIndicator;if(null===n)throw new K("DSODST66746");n.transitionElements(this._element,i.element)}}onDragStop(){this.createDragListener()}removeDragListener(){null!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=null)}}!function(t){t.isDragSourceComponentItemConfig=function(t){return!("componentType"in t)}}(ne||(ne={}));class oe{constructor(){this._element=document.createElement("div"),this._element.classList.add("lm_dropTargetIndicator");const t=document.createElement("div");t.classList.add("lm_inner"),this._element.appendChild(t),document.body.appendChild(this._element)}destroy(){this._element.remove()}highlightArea(t,e){this._element.style.left=zt(t.x1+e),this._element.style.top=zt(t.y1+e),this._element.style.width=zt(t.x2-t.x1-e),this._element.style.height=zt(t.y2-t.y1-e),this._element.style.display="block"}hide(){Dt(this._element,!1)}}class se{constructor(){this._element=document.createElement("div"),this._element.classList.add("lm_transition_indicator"),document.body.appendChild(this._element),this._toElement=null,this._fromDimensions=null,this._totalAnimationDuration=200,this._animationStartTime=null}destroy(){this._element.remove()}transitionElements(t,e){}nextAnimationFrame(){}measure(t){const e=t.getBoundingClientRect();return{left:e.left,top:e.top,width:t.offsetWidth,height:t.offsetHeight}}}class re extends Wt{constructor(t){super(),this._layoutManager=t,this._childEventListener=t=>this.onEventFromChild(t),globalThis.addEventListener(re.ChildEventName,this._childEventListener,{passive:!0})}emit(t,...e){"userBroadcast"===t?this.emitUserBroadcast(...e):super.emit(t,...e)}emitUserBroadcast(...t){this.handleUserBroadcastEvent("userBroadcast",t)}destroy(){globalThis.removeEventListener(re.ChildEventName,this._childEventListener)}handleUserBroadcastEvent(t,e){this._layoutManager.isSubWindow?this.propagateToParent(t,e):this.propagateToThisAndSubtree(t,e)}onEventFromChild(t){const e=t.detail;this.handleUserBroadcastEvent(e.eventName,e.args)}propagateToParent(t,e){const i={bubbles:!0,cancelable:!0,detail:{layoutManager:this._layoutManager,eventName:t,args:e}},n=new CustomEvent(re.ChildEventName,i),o=globalThis.opener;if(null===o)throw new K("EHPTP15778");o.dispatchEvent(n)}propagateToThisAndSubtree(t,e){this.emitUnknown(t,...e);for(let i=0;ithis.handleContainerResize())),this._windowBeforeUnloadListener=()=>this.onBeforeUnload(),this._windowBeforeUnloadListening=!1,this._maximisedStackBeforeDestroyedListener=t=>this.cleanupBeforeMaximisedStackDestroyed(t),this.isSubWindow=t.isSubWindow,this._constructorOrSubWindowLayoutConfig=t.constructorOrSubWindowLayoutConfig,Q.checkInitialise(),dt.checkInitialise(),void 0!==t.containerElement&&(this._containerElement=t.containerElement)}get container(){return this._containerElement}get isInitialised(){return this._isInitialised}get groundItem(){return this._groundItem}get root(){return this._groundItem}get openPopouts(){return this._openPopouts}get dropTargetIndicator(){return this._dropTargetIndicator}get transitionIndicator(){return this._transitionIndicator}get width(){return this._width}get height(){return this._height}get eventHub(){return this._eventHub}get rootItem(){if(void 0===this._groundItem)throw new Error("Cannot access rootItem before init");return 0===this._groundItem.contentItems.length?void 0:this._groundItem.contentItems[0]}get focusedComponentItem(){return this._focusedComponentItem}get tabDropPlaceholder(){return this._tabDropPlaceholder}get maximisedStack(){return this._maximisedStack}get deprecatedConstructor(){return!this.isSubWindow&&void 0!==this._constructorOrSubWindowLayoutConfig}destroy(){if(this._isInitialised){this._windowBeforeUnloadListening&&(globalThis.removeEventListener("beforeunload",this._windowBeforeUnloadListener),this._windowBeforeUnloadListening=!1),!0===this.layoutConfig.settings.closePopoutsOnUnload&&this.closeAllOpenPopouts(),this._resizeObserver.disconnect(),this.checkClearResizeTimeout(),void 0!==this._groundItem&&this._groundItem.destroy(),this._tabDropPlaceholder.remove(),null!==this._dropTargetIndicator&&this._dropTargetIndicator.destroy(),null!==this._transitionIndicator&&this._transitionIndicator.destroy(),this._eventHub.destroy();for(const t of this._dragSources)t.destroy();this._dragSources=[],this._isInitialised=!1}}minifyConfig(t){return _t.minifyConfig(t)}unminifyConfig(t){return _t.unminifyConfig(t)}init(){let t;if(this.setContainer(),this._dropTargetIndicator=new oe,this._transitionIndicator=new se,this.updateSizeFromContainer(),this.isSubWindow){if(void 0===this._constructorOrSubWindowLayoutConfig)throw new J("LMIU07155");{const e=this._constructorOrSubWindowLayoutConfig.root;if(void 0===e)throw new X("LMIC07156");if(!Ct.isComponent(e))throw new X("LMIC07157");t=e;const i=xt.resolve(this._constructorOrSubWindowLayoutConfig);this.layoutConfig=Object.assign(Object.assign({},i),{root:void 0})}}else void 0===this._constructorOrSubWindowLayoutConfig?this.layoutConfig=_t.createDefault():this.layoutConfig=xt.resolve(this._constructorOrSubWindowLayoutConfig);const e=this.layoutConfig;this._groundItem=new Yt(this,e.root,this._containerElement),this._groundItem.init(),this.checkLoadedLayoutMaximiseItem(),this._resizeObserver.observe(this._containerElement),this._isInitialised=!0,this.adjustColumnsResponsive(),this.emit("initialised"),void 0!==t&&this.loadComponentAsRoot(t)}loadLayout(t){if(!this.isInitialised)throw new Error("GoldenLayout: Need to call init() if LayoutConfig with defined root passed to constructor");if(void 0===this._groundItem)throw new J("LMLL11119");this.createSubWindows(),this.layoutConfig=xt.resolve(t),this._groundItem.loadRoot(this.layoutConfig.root),this.checkLoadedLayoutMaximiseItem(),this.adjustColumnsResponsive()}saveLayout(){if(!1===this._isInitialised)throw new Error("Can't create config, layout not yet initialised");if(void 0===this._groundItem)throw new J("LMTC18244");{const t=this._groundItem.calculateConfigContent();let e;e=1!==t.length?void 0:t[0],this.reconcilePopoutWindows();const i=[];for(let t=0;t=0?n=this._groundItem.contentItems[0]:e=0;break;case at.row:case at.column:e=n.addItem(t,i.index);break;case at.stack:if(Ct.isComponent(t)){e=n.addItem(t,i.index);break}throw Error(tt[6]);case at.component:throw new X("LMAIALC87444602");default:throw new Y("LMAIALU98881733",n.type)}if(Ct.isComponent(t)){const t=n.contentItems[e];Gt.isStack(t)&&(n=t,e=0)}return i.parentItem=n,i.index=e,i}}}loadComponentAsRoot(t){if(void 0===this._groundItem)throw new Error("Cannot add item before init");this._groundItem.loadComponentAsRoot(t)}updateSize(t,e){this.setSize(t,e)}setSize(t,e){if(this._width=t,this._height=e,!0===this._isInitialised){if(void 0===this._groundItem)throw new J("LMUS18881");if(this._groundItem.setSize(this._width,this._height),this._maximisedStack){const{width:t,height:e}=kt(this._containerElement);Tt(this._maximisedStack.element,t),At(this._maximisedStack.element,e),this._maximisedStack.updateSize(!1)}this.adjustColumnsResponsive()}}beginSizeInvalidation(){this._sizeInvalidationBeginCount++}endSizeInvalidation(){0==--this._sizeInvalidationBeginCount&&this.updateSizeFromContainer()}updateSizeFromContainer(){const{width:t,height:e}=kt(this._containerElement);this.setSize(t,e)}updateRootSize(t=!1){if(void 0===this._groundItem)throw new J("LMURS28881");this._groundItem.updateSize(t)}createAndInitContentItem(t,e){const i=this.createContentItem(t,e);return i.init(),i}createContentItem(t,e){if("string"!=typeof t.type)throw new G("Missing parameter 'type'",JSON.stringify(t));if(ct.isComponentItem(t)&&!(e instanceof ee)&&e&&!(!0===this.isSubWindow&&e instanceof Yt)){t={type:at.stack,content:[t],size:t.size,sizeUnit:t.sizeUnit,minSize:t.minSize,minSizeUnit:t.minSizeUnit,id:t.id,maximised:t.maximised,isClosable:t.isClosable,activeItemIndex:0,header:void 0}}return this.createContentItemFromConfig(t,e)}findFirstComponentItemById(t){if(void 0===this._groundItem)throw new J("LMFFCIBI82446");return this.findFirstContentItemTypeByIdRecursive(at.component,t,this._groundItem)}createPopout(t,e,i,n){return t instanceof Gt?this.createPopoutFromContentItem(t,e,i,n):this.createPopoutFromItemConfig(t,e,i,n)}createPopoutFromContentItem(t,e,i,n){let o=t.parent,s=t;for(;null!==o&&1===o.contentItems.length&&!o.isGround;)s=o,o=o.parent;if(null===o)throw new K("LMCPFCI00834");{if(void 0===n&&(n=o.contentItems.indexOf(s)),null!==i&&o.addPopInParentId(i),void 0===e){const i=globalThis.screenX||globalThis.screenLeft,n=globalThis.screenY||globalThis.screenTop,o=t.element.offsetLeft,s=t.element.offsetTop,{width:r,height:a}=kt(t.element);e={left:i+o,top:n+s,width:r,height:a}}const r=t.toConfig();if(t.remove(),ft.isRootItemConfig(r))return this.createPopoutFromItemConfig(r,e,i,n);throw new Error(`${tt[0]}`)}}beginVirtualSizedContainerAdding(){0==++this._virtualSizedContainerAddingBeginCount&&(this._virtualSizedContainers.length=0)}addVirtualSizedContainer(t){this._virtualSizedContainers.push(t)}endVirtualSizedContainerAdding(){if(0==--this._virtualSizedContainerAddingBeginCount){const t=this._virtualSizedContainers.length;if(t>0){this.fireBeforeVirtualRectingEvent(t);for(let e=0;ethis.emit("windowOpened",a))),a.on("closed",(()=>this.reconcilePopoutWindows())),this._openPopouts.push(a),this.layoutConfig.settings.closePopoutsOnUnload&&!this._windowBeforeUnloadListening&&(globalThis.addEventListener("beforeunload",this._windowBeforeUnloadListener,{passive:!0}),this._windowBeforeUnloadListening=!0),a}closeAllOpenPopouts(){for(let t=0;tglobalThis.close()),1)}getArea(t,e){let i=null,n=1/0;for(let o=0;o=s.x1&&t=s.y1&&es.surface&&(n=s.surface,i=s)}return i}calculateItemAreas(){const t=this.getAllContentItems(),e=this._groundItem;if(void 0===e)throw new J("LMCIAR44365");if(1!==t.length){e.contentItems[0].isStack?this._itemAreas=[]:this._itemAreas=e.createSideAreas();for(let e=0;e0){let e=t[0];if(Gt.isComponentItem(e)){const t=e.parent;if(null===t)throw new K("LMXLLMI69999");e=t}if(!Gt.isStack(e))throw new X("LMCLLMI19993");e.maximise()}}}processMaximiseStack(t){if(this._maximisedStack=t,t.on("beforeItemDestroyed",this._maximisedStackBeforeDestroyedListener),t.element.classList.add("lm_maximised"),t.element.insertAdjacentElement("afterend",this._maximisePlaceholder),void 0===this._groundItem)throw new J("LMMXI19993");{this._groundItem.element.prepend(t.element);const{width:e,height:i}=kt(this._containerElement);Tt(t.element,e),At(t.element,i),t.updateSize(!0),t.focusActiveContentItem(),this._maximisedStack.emit("maximised"),this.emit("stateChanged")}}processMinimiseMaximisedStack(){if(void 0===this._maximisedStack)throw new X("LMMMS74422");{const t=this._maximisedStack;if(null===t.parent)throw new K("LMMI13668");t.element.classList.remove("lm_maximised"),this._maximisePlaceholder.insertAdjacentElement("afterend",t.element),this._maximisePlaceholder.remove(),this.updateRootSize(!0),this._maximisedStack=void 0,t.off("beforeItemDestroyed",this._maximisedStackBeforeDestroyedListener),t.emit("minimised"),this.emit("stateChanged")}}reconcilePopoutWindows(){const t=[];for(let e=0;e{this._resizeTimeoutId=void 0,this.beginSizeInvalidation(),this.endSizeInvalidation()}),this.resizeDebounceInterval))}checkClearResizeTimeout(){void 0!==this._resizeTimeoutId&&(clearTimeout(this._resizeTimeoutId),this._resizeTimeoutId=void 0)}setContainer(){var t;const e=document.body,i=null!==(t=this._containerElement)&&void 0!==t?t:e;if(i===e){this.resizeWithContainerAutomatically=!0;const t=document.documentElement;t.style.height="100%",t.style.margin="0",t.style.padding="0",t.style.overflow="clip",e.style.height="100%",e.style.margin="0",e.style.padding="0",e.style.overflow="clip"}this._containerElement=i}onBeforeUnload(){this.destroy()}adjustColumnsResponsive(){if(void 0===this._groundItem)throw new J("LMACR20883");if(this._firstLoad=!1,this.useResponsiveLayout()&&!this._updatingColumnsResponsive&&this._groundItem.contentItems.length>0&&this._groundItem.contentItems[0].isRow){if(void 0===this._groundItem||null===this._width)throw new J("LMACR77412");{const t=this._groundItem.contentItems[0].contentItems.length;if(t<=1)return;{const e=this.layoutConfig.dimensions.defaultMinItemWidth;if(t*e<=this._width)return;{this._updatingColumnsResponsive=!0;const i=t-Math.max(Math.floor(this._width/e),1),n=this._groundItem.contentItems[0],o=this.getAllStacks();if(0===o.length)throw new X("LMACRS77413");{const t=o[0];for(let e=0;en?void 0:{parentItem:t,index:o}}}case 1:if(void 0===this._focusedComponentItem)return;{const t=this._focusedComponentItem.parentItem;return this.tryCreateLocationFromParentItem(t,e)}case 2:{const t=this.findFirstContentItemType(at.stack);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 3:{let t=this.findFirstContentItemType(at.row);return void 0!==t?this.tryCreateLocationFromParentItem(t,e):(t=this.findFirstContentItemType(at.column),void 0!==t?this.tryCreateLocationFromParentItem(t,e):void 0)}case 4:{const t=this.findFirstContentItemType(at.row);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 5:{const t=this.findFirstContentItemType(at.column);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 6:if(void 0===this._groundItem)throw new J("LMFLRIF18244");return void 0!==this.rootItem?void 0:void 0===e||0===e?{parentItem:this._groundItem,index:0}:void 0;case 7:if(void 0===this._groundItem)throw new J("LMFLF18244");{const t=this._groundItem.contentItems;if(0===t.length)return void 0===e||0===e?{parentItem:this._groundItem,index:0}:void 0;{const i=t[0];return this.tryCreateLocationFromParentItem(i,e)}}}}tryCreateLocationFromParentItem(t,e){const i=t.contentItems.length;return void 0===e?{parentItem:t,index:i}:e<0||e>i?void 0:{parentItem:t,index:e}}}!function(t){t.createMaximisePlaceElement=function(t){const e=t.createElement("div");return e.classList.add("lm_maximise_place"),e},t.createTabDropPlaceholderElement=function(t){const e=t.createElement("div");return e.classList.add("lm_drop_tab_placeholder"),e},t.defaultLocationSelectors=[{typeId:1,index:void 0},{typeId:2,index:void 0},{typeId:3,index:void 0},{typeId:7,index:void 0}],t.afterFocusedItemIfPossibleLocationSelectors=[{typeId:0,index:1},{typeId:2,index:void 0},{typeId:3,index:void 0},{typeId:7,index:void 0}]}(ae||(ae={}));class le extends ae{constructor(t,e,i,n){if(super(le.createLayoutManagerConstructorParameters(t,e)),this._bindComponentEventHanlderPassedInConstructor=!1,this._creationTimeoutPassed=!1,void 0!==e&&"function"==typeof e&&(this.bindComponentEvent=e,this._bindComponentEventHanlderPassedInConstructor=!0,void 0!==i&&(this.unbindComponentEvent=i)),!this._bindComponentEventHanlderPassedInConstructor&&this.isSubWindow){if(void 0===this._constructorOrSubWindowLayoutConfig)throw new J("VLC98823");{const t=xt.resolve(this._constructorOrSubWindowLayoutConfig);this.layoutConfig=Object.assign(Object.assign({},t),{root:void 0})}}!0!==n&&(this.deprecatedConstructor||this.init())}destroy(){this.bindComponentEvent=void 0,this.unbindComponentEvent=void 0,super.destroy()}init(){if(this._bindComponentEventHanlderPassedInConstructor||"loading"!==document.readyState&&null!==document.body){if(!this._bindComponentEventHanlderPassedInConstructor&&!0===this.isSubWindow&&!this._creationTimeoutPassed)return setTimeout((()=>this.init()),7),void(this._creationTimeoutPassed=!0);!0===this.isSubWindow&&(this._bindComponentEventHanlderPassedInConstructor||this.clearHtmlAndAdjustStylesForSubWindow(),window.__glInstance=this),super.init()}else document.addEventListener("DOMContentLoaded",(()=>this.init()),{passive:!0})}clearHtmlAndAdjustStylesForSubWindow(){const t=document.head,e=new Array(4);e[0]=document.querySelectorAll("body link"),e[1]=document.querySelectorAll("body style"),e[2]=document.querySelectorAll("template"),e[3]=document.querySelectorAll(".gl_keep");for(let i=0;ithis.emit("popIn"))),document.body.appendChild(t),!0}}bindComponent(t,e){if(void 0!==this.bindComponentEvent){return this.bindComponentEvent(t,e)}if(void 0!==this.getComponentEvent)return{virtual:!1,component:this.getComponentEvent(t,e)};{const t=`${tt[2]}: ${JSON.stringify(e)}`;throw new Z(t)}}unbindComponent(t,e,i){if(void 0!==this.unbindComponentEvent)this.unbindComponentEvent(t);else if(!e&&void 0!==this.releaseComponentEvent){if(void 0===i)throw new J("VCUCRCU333998");this.releaseComponentEvent(t,i)}}}!function(t){let e=!1;t.createLayoutManagerConstructorParameters=function(t,i){const n=e?null:new URL(document.location.href).searchParams.get("gl-window");e=!0;const o=null!==n;let s,r;if(null!==n){const e=localStorage.getItem(n);if(null===e)throw new Error("Null gl-window Config");localStorage.removeItem(n);const i=JSON.parse(e),o=_t.unminifyConfig(i);r=xt.fromResolved(o),t instanceof HTMLElement&&(s=t)}else void 0===t?r=void 0:t instanceof HTMLElement?(r=void 0,s=t):r=t,void 0===s&&i instanceof HTMLElement&&(s=i);return{constructorOrSubWindowLayoutConfig:r,isSubWindow:o,containerElement:s}}}(le||(le={}));class he extends le{constructor(t,e,i){super(t,e,i,!0),this._componentTypesMap=new Map,this._registeredComponentMap=new Map,this._virtuableComponentMap=new Map,this._containerVirtualRectingRequiredEventListener=(t,e,i)=>this.handleContainerVirtualRectingRequiredEvent(t,e,i),this._containerVirtualVisibilityChangeRequiredEventListener=(t,e)=>this.handleContainerVirtualVisibilityChangeRequiredEvent(t,e),this._containerVirtualZIndexChangeRequiredEventListener=(t,e,i)=>this.handleContainerVirtualZIndexChangeRequiredEvent(t,e,i),this.deprecatedConstructor||this.init()}registerComponent(t,e,i=!1){if("function"!=typeof e)throw new $("registerComponent() componentConstructorOrFactoryFtn parameter is not a function");if(e.hasOwnProperty("prototype")){const n=e;this.registerComponentConstructor(t,n,i)}else{const n=e;this.registerComponentFactoryFunction(t,n,i)}}registerComponentConstructor(t,e,i=!1){if("function"!=typeof e)throw new Error(tt[1]);if(void 0!==this._componentTypesMap.get(t))throw new Z(`${tt[3]}: ${t}`);this._componentTypesMap.set(t,{constructor:e,factoryFunction:void 0,virtual:i})}registerComponentFactoryFunction(t,e,i=!1){if("function"!=typeof e)throw new Z("Please register a constructor function");if(void 0!==this._componentTypesMap.get(t))throw new Z(`${tt[3]}: ${t}`);this._componentTypesMap.set(t,{constructor:void 0,factoryFunction:e,virtual:i})}registerComponentFunction(t){this.registerGetComponentConstructorCallback(t)}registerGetComponentConstructorCallback(t){if("function"!=typeof t)throw new Error("Please register a callback function");void 0!==this._getComponentConstructorFtn&&console.warn("Multiple component functions are being registered. Only the final registered function will be used."),this._getComponentConstructorFtn=t}getRegisteredComponentTypeNames(){const t=this._componentTypesMap.keys();return Array.from(t)}getComponentInstantiator(t){let e;const i=pt.resolveComponentTypeName(t);return void 0!==i&&(e=this._componentTypesMap.get(i)),void 0===e&&void 0!==this._getComponentConstructorFtn&&(e={constructor:this._getComponentConstructorFtn(t),factoryFunction:void 0,virtual:!1}),e}bindComponent(t,e){let i;const n=pt.resolveComponentTypeName(e);let o;if(void 0!==n&&(i=this._componentTypesMap.get(n)),void 0===i&&void 0!==this._getComponentConstructorFtn&&(i={constructor:this._getComponentConstructorFtn(e),factoryFunction:void 0,virtual:!1}),void 0!==i){const s=i.virtual;let r,a;r=void 0===e.componentState?void 0:Ut({},e.componentState);const l=i.constructor;if(void 0!==l)a=new l(t,r,s);else{const e=i.factoryFunction;if(void 0===e)throw new X("LMBCFFU10008");a=e(t,r,s)}if(s){if(void 0===a)throw new J("GLBCVCU988774");{const e=a,i=e.rootHtmlElement;if(void 0===i)throw new Z(`${tt[5]}: ${n}`);!function(t){const e="absolute";t.style.position!==e&&(t.style.position=e)}(i),this.container.appendChild(i),this._virtuableComponentMap.set(t,e),t.virtualRectingRequiredEvent=this._containerVirtualRectingRequiredEventListener,t.virtualVisibilityChangeRequiredEvent=this._containerVirtualVisibilityChangeRequiredEventListener,t.virtualZIndexChangeRequiredEvent=this._containerVirtualZIndexChangeRequiredEventListener}}this._registeredComponentMap.set(t,a),o={virtual:i.virtual,component:a}}else o=super.bindComponent(t,e);return o}unbindComponent(t,e,i){if(void 0===this._registeredComponentMap.get(t))super.unbindComponent(t,e,i);else{const e=this._virtuableComponentMap.get(t);if(void 0!==e){const i=e.rootHtmlElement;if(void 0===i)throw new X("GLUC77743",t.title);this.container.removeChild(i),this._virtuableComponentMap.delete(t)}}}fireBeforeVirtualRectingEvent(t){this._goldenLayoutBoundingClientRect=this.container.getBoundingClientRect(),super.fireBeforeVirtualRectingEvent(t)}handleContainerVirtualRectingRequiredEvent(t,e,i){const n=this._virtuableComponentMap.get(t);if(void 0===n)throw new J("GLHCSCE55933");{const o=n.rootHtmlElement;if(void 0===o)throw new Z(tt[4]+" "+t.title);{const n=t.element.getBoundingClientRect(),s=n.left-this._goldenLayoutBoundingClientRect.left;o.style.left=zt(s);const r=n.top-this._goldenLayoutBoundingClientRect.top;o.style.top=zt(r),Tt(o,e),At(o,i)}}}handleContainerVirtualVisibilityChangeRequiredEvent(t,e){const i=this._virtuableComponentMap.get(t);if(void 0===i)throw new J("GLHCVVCRE55934");{const n=i.rootHtmlElement;if(void 0===n)throw new Z(tt[4]+" "+t.title);Dt(n,e)}}handleContainerVirtualZIndexChangeRequiredEvent(t,e,i){const n=this._virtuableComponentMap.get(t);if(void 0===n)throw new J("GLHCVZICRE55935");{const e=n.rootHtmlElement;if(void 0===e)throw new Z(tt[4]+" "+t.title);e.style.zIndex=i}}}const de="initial_",ce={show:"top",popout:!1,maximise:!1,close:"close-tab-unused"},me={headerHeight:31},ue={hasHeaders:!0,reorderEnabled:!0},pe={popoutWholeStack:!1,constrainDragToContainer:!1,constrainDragToHeaders:!1,preventDragout:!1,showMaximiseIcon:!1,showPopoutIcon:!1,showCloseIcon:!1,blockedPopoutsThrowError:!0,closePopoutsOnUnload:!0,selectionEnabled:!1};var ge,fe;class ve{constructor(e){this.layout=e,ge.set(this,void 0),fe.set(this,void 0),this.handleResize=t=>{t.forEach((t=>this.resizeElement(t.target)))},this.handleMutation=()=>{this.layout.viewComponentsByContainerElement.forEach((t=>{this.resizeElement(t.container.element)}))},t.__classPrivateFieldSet(this,ge,new ResizeObserver(this.handleResize),"f"),t.__classPrivateFieldSet(this,fe,new MutationObserver(this.handleMutation),"f")}observeMutations(e){t.__classPrivateFieldGet(this,fe,"f")?.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["class"]})}destroy(){t.__classPrivateFieldGet(this,ge,"f").disconnect(),t.__classPrivateFieldGet(this,fe,"f").disconnect()}observeContainer(e){t.__classPrivateFieldGet(this,ge,"f").observe(e)}unobserveContainer(e){t.__classPrivateFieldGet(this,ge,"f").unobserve(e)}resizeElement(t){const e=this.layout.viewComponentsByContainerElement.get(t);e&&e.resize()}}ge=new WeakMap,fe=new WeakMap;var _e={};Object.defineProperty(_e,"__esModule",{value:!0});var ye=_e.BaseItem=void 0;class Ce{constructor(t,e,i){this._item=t,this._layout=e,this._wrap=i}get raw(){return this._item}get layout(){return this._layout}get type(){return this._item.type}get contentItems(){return(this._item.contentItems??[]).map((t=>this._wrap(t)))}get parent(){const t=this._item.parent;return t?this._wrap(t):null}setActiveContentItem(t,e){if("stack"!==this.type)throw new Error(`Cannot call setActiveContentItem from a non-stack item: ${this.type}`);this._item.setActiveContentItem(t.raw,e)}static wrapInternal(t,e,i){const n=Ce.wrapCache.get(e);if(n)return n;const o=new t(e,i,(e=>Ce.wrapInternal(t,e,i)));return Ce.wrapCache.set(e,o),o}}ye=_e.BaseItem=Ce,Ce.wrapCache=new WeakMap;const we=t=>!!t&&"contentItems"in t&&(t.isRow||t.isColumn);class Ie extends ye{isRoot(){return!!this._item.parent?.isGround}getBounds(){return this._item.element.getBoundingClientRect()}get viewName(){if(this._item.isComponent){const{component:t}=this._item;return t.identity.name}throw new Error("View name not found")}onDestroyed(t){const e=({target:i})=>{i===this._item&&(t(),this._item.off("itemDestroyed",e))};this._item.on("itemDestroyed",e)}createAdjacentStack({position:t="right"}={}){const e=this.raw;if(ee.isStack(e)&&e.parent){const i=["top","bottom"].includes(t)?"column":"row",n=["left","top"].includes(t)?1:0,o=we(e.parent)?e.parent:e.layoutManager,s=o,r=e.parent.contentItems.indexOf(e);e.parent.isGround&&e.parent.removeChild(e,!0);const a=o.newItem({type:i,content:[{type:"stack",content:[]}]},r);if(!a)throw new Error("createAdjacentStack: Failed to create new container");const l=a.contentItems[0];return a.addChild(this.raw,n),we(s)&&s.removeChild(e,!0),this._wrap(l)}throw new Error(`Cannot creat adjacent stacks for type: ${e.type}, must be type 'stack'`)}setActiveContentItem(t,e=!0){if(!ee.isStack(this._item))throw new Error(`Cannot call setActiveContentItem from a non-stack item: ${this.type}`);this._item.setActiveComponentItem(t.raw,!e)}static wrap(t,e){return ye.wrapInternal(Ie,t,e)}}function be(t=[],e){for(const i of t)"component"===i.type?Object.keys(e).forEach((t=>{t in i&&(i.componentState={[`${de}${t}`]:i[t],...i.componentState}),i[t]=e[t]})):be(i.content,e)}function Se(t=[],e,i){for(const n of t)if("component"===n.type)Object.keys(e).forEach((t=>{if(`${de}${t}`in n.componentState)return n[t]=n.componentState[`${de}${t}`],void delete n.componentState[`${de}${t}`];n[t]=e[t]}));else{if(n.size&&("row"===i||"column"===i)){n["row"===i?"width":"height"]=n.size?.includes(".")?parseFloat(n.size):parseInt(n.size)}Se(n.content,e,n.type)}}function Ee(t){if(t.root){t.root.content&&Se([t.root],{componentName:"view",isClosable:!0});const e=t.root;t.content=[e],delete t.root}return t}const xe=e=>class extends e{connectedCallback(){if(!this.name||!this.uuid)throw new Error(" Name or uuid attribute missing");if(!this.src)throw new Error(" missing 'src' attribute.");this.#t||(this.#t=document.createElement("iframe"),this.#t.src=this.src,this.#t.style.height="100%",this.#t.style.width="100%",this.#t.style.border="none",this.forceFrameName?this.#t.setAttribute("name",this.forceFrameName):this.#t.setAttribute("name",t.encodeOptions({brokerUrl:this.brokerUrl,name:this.name,uuid:this.uuid,providerId:this.providerId,contextGroup:this.contextGroup},"of-frame")),this.#t.setAttribute("id",this.name),this.appendChild(this.#t))}#t;get brokerUrl(){return this.getAttribute("of-broker")}set brokerUrl(t){t&&this.setAttribute("of-broker",t)}get name(){return this.getAttribute("of-name")}set name(t){t&&this.setAttribute("of-name",t)}get forceFrameName(){return this.getAttribute("forceFrameName")}set forceFrameName(t){t&&this.setAttribute("forceFrameName",t)}get uuid(){return this.getAttribute("of-uuid")}set uuid(t){t&&this.setAttribute("of-uuid",t)}get src(){return this.getAttribute("src")}set src(t){t&&this.setAttribute("src",t)}get providerId(){return this.getAttribute("of-provider-id")}set providerId(t){t&&this.setAttribute("of-provider-id",t)}get contextGroup(){return this.getAttribute("of-context-group")}set contextGroup(t){t&&this.setAttribute("of-context-group",t)}static get observedAttributes(){return["name"]}};class Le{static create(t){const e=document.createElement("of-view");return Object.entries(t).forEach((([t,i])=>{e.setAttribute(t,i)})),e}}customElements.define("of-view",xe(HTMLElement));class ze{constructor(t,i,n,{brokerUrl:o,interopConfig:s},r){this.container=t,this.config=i,this.ofView=null,this.isDragging=()=>this.container.tab.element?.className.includes("lm_dragging")??!1;const{url:a,web:l,interop:h,name:d}=i||{},c=d??`internal-generated-view-${e.v4()}`;if(this.identity={uuid:n,name:c},this.container.element.setAttribute("of-name",c),this.container.element.id=`container-${c}`,this.container.parent.id=c,void 0===a)return void this.handleUrlMissing();const m=this.updateTitleIfNotSet(a),u={"of-broker":o,"of-uuid":n,"of-name":c,src:a};l?.frameName&&(u.forceFrameName=l.frameName);const p=h?.currentContextGroup??s?.currentContextGroup;p&&(u["of-context-group"]=p),s?.providerId&&(u["of-provider-id"]=s?.providerId),this.ofView=Le.create(u),this.ofView.title=m??`Iframe: ${a}`,r.appendChild(this.ofView),this.ofView.style.position="absolute"}updateTitleIfNotSet(t){return"view"===this.container.parent.title&&this.container.parent.setTitle(t),this.container.parent.title}handleUrlMissing(){const t=document.createElement("div");t.setAttribute("style","padding: 20px");t.innerText="No URL provided",this.container.element.appendChild(t)}destroy(){this.ofView?.remove(),this.ofView=null}closeView(){this.container.close()}resize(){if(this.ofView){if(this.isDragging())return void(this.ofView.style.display="none");const t=this.container.element.getBoundingClientRect();this.ofView.style.position="absolute",this.ofView.style.height=`${t.height}px`,this.ofView.style.width=`${t.width}px`,this.ofView.style.inset=`${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`,this.ofView.style.display="block"}}}class Me extends U{static overrideConfig(t){const e={...ue,...t.settings,...pe};return e.reorderEnabled?be(t.content,{isClosable:!0}):be(t.content,{reorderEnabled:!1}),{dimensions:me,...t,settings:e,header:{...ce,show:!1!==t.settings?.hasHeaders&&ce.show}}}constructor(t,e,i,{options:n},o,s){super(),this.identity=t,this.container=e,this.initialConfig=i,this.layoutManager=o,this.platformProvider=s,this.viewComponentsByContainerElement=new Map,this.layoutContentCache=_.getSingleInstance(),this.reparentingViews=new Set,this.goldenLayoutDestroyed=!1,this.createViewComponent=(t,e)=>{m.handleSharedView(this.layoutManager,this.identity,e);const i=new ze(t,e,this.identity.uuid,this.options,this.iframeContainer);return e&&!1===e[`${de}isClosable`]&&this.stylesheet.insertRule(`#tab-${i.identity.name} .lm_close_tab { display: none; }`),this.viewComponentsByContainerElement.set(t.element,i),this.resizeController.observeContainer(t.element),i},this.iframeContainer=document.createElement("div"),this.iframeContainer.id=`openfin-layout-iframe-container-${this.identity.layoutName}`,this.domEmitter=new V(e),this.setupStylesheets(),this.layout=new he(this.container),this.layout.resizeWithContainerAutomatically=!0,this.options=n,this.layout.registerComponent("view",this.createViewComponent),this.setupListeners(),this.resizeController=new ve(this),this.layout.loadLayout(Me.overrideConfig(i));const r=document.createElement("div");r.id=`openfin-layout-shadow-container-${this.identity.layoutName}`,r.attachShadow({mode:"open",delegatesFocus:!1}).appendChild(this.iframeContainer),this.container.appendChild(r),this.resizeController.observeMutations(this.container)}getStackByView({name:t}){const e=this.layout.findFirstComponentItemById(t);if(e?.parent&&e?.parent?.isStack)return Ie.wrap(e.parent,this)}getRoot(){return Ie.wrap(this.layout.rootItem,this)}async platformCloseView(t){const e=[...this.viewComponentsByContainerElement.values()].find((e=>e.identity.name===t.name));if(!e)throw new Error(`View with name: ${t.name} not found in layout.`);e.closeView()}async platformCreateView(t,{location:e,targetView:i}={}){if(i)throw new Error("TargetView not supported in web");const n={options:this.platformProvider.normalizeOptions(t),target:this.identity,location:e};return this.insertView(n)}setupStylesheets(){if(this.container.setAttribute("data-openfin-layout-name",this.identity.layoutName),this.stylesheet=new CSSStyleSheet,this.stylesheet.insertRule(".lm_close { display: none; }"),document.adoptedStyleSheets.push(this.stylesheet),this.initialConfig.settings?.preventSplitterResize){const t=`\n [data-openfin-layout-name='${this.identity.layoutName}'] .lm_splitter {\n pointer-events: none;\n }`;this.stylesheet.insertRule(t)}}insertView({options:t,location:e,targetView:i}){const n=e?this.layoutContentCache.getItemOrUndefined(e.id):void 0,o=i?this.layoutContentCache.getItemOrUndefined(i.name):void 0,s=n??o??Ie.wrap(this.layout.rootItem,this);let r;if(ee.isStack(s.raw))r=s.raw;else{if(!we(s.raw))throw new Error("Cannot add a view at the requested location");r=s.raw.newItem({type:"stack",content:[]})}const a=Math.min(r.contentItems.length,e?.index??r.contentItems.length);let l=this.layout.findFirstComponentItemById(t.name);l?(l.parent&&l.parent.removeChild(l,!0),r.addChild(l,a)):l=r.newComponent("view",t,t.title??t.url??"Default Title",a);const h=l.component.identity;return Promise.resolve({identity:h})}replaceView({viewToReplace:t,newView:e}){throw new Error("Method not implemented.")}replaceLayout(t){throw new Error("Method not implemented.")}async cleanupView(t){}applyPreset(t){throw new Error("Method not implemented.")}getCurrentViews(){return[...this.viewComponentsByContainerElement.values()].map((t=>t.identity))}async getFrameSnapshot(){return Ee(xt.fromResolved(this.layout.toConfig()))}isVisible(){return W(this.container)}async onViewDetached({viewIdentity:t}){this.reparentingViews.add(t.name),this.platformCloseView(t)}async destroy(){this.goldenLayoutDestroyed||(this.goldenLayoutDestroyed=!0,this.layout.destroy()),this.iframeContainer.remove(),this.resizeController.destroy(),document.adoptedStyleSheets=document.adoptedStyleSheets.filter((t=>t!==this.stylesheet)),this.viewComponentsByContainerElement.clear()}setupListeners(){this.container.addEventListener("pointerdown",(t=>{if(t.target instanceof HTMLElement){const e=t.target.classList;["lm_tab","lm_title","lm_splitter","lm_drag_handle"].some((t=>e.contains(t)))&&(this.handleDragStart(),2===t.button&&t.stopPropagation())}}),!0),document.addEventListener("pointerup",(()=>this.handleDragEnd()),!0),this.layout.on("tabCreated",(t=>{const e=t.componentItem.component;t.element.id=`tab-${e.identity.name}`,this.domEmitter.dispatchLocalEvent("tab-created",e.identity)})),this.layout.on("itemCreated",(({target:t})=>{const e=t;if(Gt.isComponentItem(e)){const t=e.component;this.domEmitter.dispatchLocalEvent("container-created",t.identity)}})),this.layout.on("itemDestroyed",(t=>{const e=t.target;if(Gt.isComponentItem(e)){const t=e.component;this.removeViewComponent(t)}})),this.layout.on("itemDropped",(()=>{this.handleDragEnd()}))}handleDragStart(){this.iframeContainer.style.pointerEvents="none"}handleDragEnd(){this.iframeContainer.style.pointerEvents=""}removeViewComponent(t){if(t.config&&!1===t.config[`${de}isClosable`]){const e=[...this.stylesheet.cssRules].findIndex((e=>e.cssText.includes(`#tab-${t.identity.name}`)));this.stylesheet.deleteRule(e)}t.destroy(),this.viewComponentsByContainerElement.delete(t.container.element),this.resizeController.unobserveContainer(t.container.element),this.reparentingViews.has(t.identity.name)?this.reparentingViews.delete(t.identity.name):this.platformProvider.closeView(t.identity.name);0===this.getCurrentViews().length&&(this.goldenLayoutDestroyed||(this.goldenLayoutDestroyed=!0,m.handleLastViewRemoved(this.layoutManager,this.identity)))}}class Pe{constructor(t,e,i,n){this.windowIdentity=t,this.connectConfig=e,this.provider=i,this.fallbackContainer=n}async createLayout(t,e){if(!("container"in t)&&!this.fallbackContainer)throw new Error("Container property is not optional in web");const{layoutName:i}=t,n=t,o=this.provider.initLayoutViews(n),s=n.container??this.fallbackContainer,r={...this.windowIdentity,layoutName:i},a=new Me(r,s,o,this.connectConfig,e,this.provider);m.registerLayout(e,i,a),this.fallbackContainer=null}async getLayoutSnapshot(t){return t.getLayoutSnapshot()}async handleLastViewRemoved(t){}}class Te{static async init(e){const i=e.getFin().InterApplicationBus.Channel,n=await i.create(`custom-frame-${e.me.uuid}`);return n.setDefaultAction((async(t,{target:e,opts:i},o)=>{const s=n.connections.find((t=>t.name===e.name));if(s)return n.dispatch(s,t,{...i,target:e});throw new Error(`Client with name ${e.name} not found`)})),await t.relayChannelClientApi_1(n,"layout-relay"),new Te(e)}constructor(t){this.wire=t,this.viewNames=new Set}normalizeOptions(t,i="default"){const n=this.wire.me.uuid;let{name:o=`internal-generated-view-${e.v4()}`}=t;return o.match(/^internal-generated-view-/)&&this.viewNames.has(o)&&"duplicate"===i&&(o=`internal-generated-view-${e.v4()}`),this.viewNames.add(o),{...t,name:o,uuid:n}}closeView(t){this.viewNames.delete(t)}initLayoutViews({layout:t,multiInstanceViewBehavior:e}){return H((t=>{if("component"===t.type&&t.componentState){const i=this.normalizeOptions(t.componentState,e);return{...t,componentState:i}}return t}),t)}}var Ae;const ke=t=>t;Ae=new WeakMap,exports.WebLayoutEntryPoint=class{constructor(e){Ae.set(this,void 0),this.initLayoutManager=async(e,i,{container:n,layoutManagerOverride:o})=>{const s=await Te.init(i),r=o??ke,a=new Pe(i.me,t.__classPrivateFieldGet(this,Ae,"f"),s,n),l=new(r(m.createClosedConstructor(a)));return await M(i,l),l},this.applyLayoutSnapshot=async(e,i,n)=>{await i.applyLayoutSnapshot(t.__classPrivateFieldGet(this,Ae,"f").platform.layoutSnapshot)},this.createLayout=async(t,e)=>m.createLayout(t,e),this.destroyLayout=async(t,e)=>m.destroyLayout(t,e),t.__classPrivateFieldSet(this,Ae,e,"f")}}; @@ -7340,7 +7340,7 @@ module.exports = stubFalse; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.init = init; -const core_web_1 = __webpack_require__(/*! @openfin/core-web */ "./node_modules/@openfin/core-web/out/api-client.js"); +const core_web_1 = __webpack_require__(/*! @openfin/core-web */ "../../node_modules/@openfin/core-web/out/api-client.js"); const settings_1 = __webpack_require__(/*! ./settings */ "./client/src/platform/settings.ts"); /** * Initializes the OpenFin Web Broker connection. @@ -8343,7 +8343,7 @@ function version(uuid) { /******/ /************************************************************************/ var __webpack_exports__ = {}; -// This entry need to be wrapped in an IIFE because it need to be in strict mode. +// This entry needs to be wrapped in an IIFE because it needs to be in strict mode. (() => { "use strict"; var exports = __webpack_exports__; diff --git a/web/v19.2.0/web-interop-basic/js/interop-view.bundle.js.map b/web/v19.2.0/web-interop-basic/js/interop-view.bundle.js.map index 04f5b10..8dc39dc 100644 --- a/web/v19.2.0/web-interop-basic/js/interop-view.bundle.js.map +++ b/web/v19.2.0/web-interop-basic/js/interop-view.bundle.js.map @@ -1 +1 @@ -{"version":3,"file":"interop-view.bundle.js","mappings":";;;;;;;;;;AAAa,MAAM,mBAAO,CAAC,iFAAo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AACA;;AAEA;AACA;;;;;;;;;;;;ACrJA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEY;;AAEZ,eAAe,mBAAO,CAAC,wDAAW;AAClC,gBAAgB,mBAAO,CAAC,oDAAS;AACjC;AACA;AACA;AACA;;AAEA,cAAc;AACd,kBAAkB;AAClB,yBAAyB;;AAEzB;AACA,kBAAkB;;AAElB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,kBAAkB,YAAY;AAC9B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA,wCAAwC,SAAS;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;;AAEA;AACA;AACA,cAAc,iBAAiB;AAC/B;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,iDAAiD,EAAE;AACnD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C;AAC1C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA,yBAAyB,eAAe;AACxC;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,yBAAyB,QAAQ;AACjC;AACA,sBAAsB,eAAe;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc,YAAY;AAC1B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB,sBAAsB;AACxC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,mBAAmB;AACnB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA,oBAAoB,SAAS;AAC7B;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA,qBAAqB,WAAW,GAAG,IAAI;AACvC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA,gBAAgB,WAAW,GAAG,IAAI,KAAK,aAAa;AACpD;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;;AAEA;AACA,GAAG;AACH;AACA;AACA,mBAAmB,KAAK,mDAAmD,cAAc;AACzF,GAAG;AACH;AACA;AACA,+BAA+B,IAAI;AACnC;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,MAAM,aAAa,SAAS;AACtD;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,SAAS,gBAAgB;AACzB,cAAc,oBAAoB,EAAE,IAAI;AACxC;AACA,YAAY,gBAAgB,EAAE,IAAI;AAClC;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,GAAG,SAAS,GAAG,KAAK,qBAAqB,EAAE,EAAE;AACpE,QAAQ;AACR,yBAAyB,GAAG,KAAK,yBAAyB,EAAE,EAAE;AAC9D,mBAAmB,yBAAyB,EAAE,EAAE;AAChD;AACA,MAAM;AACN,oBAAoB,IAAI,EAAE,GAAG,SAAS,IAAI,EAAE,EAAE;AAC9C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,0CAA0C,cAAc,SAAS,OAAO;AACxE;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,kBAAkB,YAAY;AAC9B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,kBAAkB,gBAAgB;AAClC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,kBAAkB,gBAAgB;AAClC;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,cAAc,YAAY;AAC1B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,QAAQ;AAC1B;AACA,oBAAoB,QAAQ;AAC5B;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;;;;;ACzjEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEa;;AAEb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB;;AAEnB;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,sBAAsB;AACxC;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA,eAAe;AACf;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA,oBAAoB,SAAS;AAC7B;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;;AAEA,kCAAkC,QAAQ;AAC1C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oBAAoB,iBAAiB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,QAAQ;AACR;AACA,uCAAuC,QAAQ;AAC/C;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,OAAO;AACzB;AACA;AACA;;AAEA;AACA,SAAS,yBAAyB;AAClC;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,gBAAgB;AAClC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,8DAA8D,YAAY;AAC1E;AACA,8DAA8D,YAAY;AAC1E;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,qCAAqC,YAAY;AACjD;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;AACA;;;;;;;;;;;AChfA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,SAAS,WAAW;;AAEpB;AACA;AACA;AACA,SAAS,WAAW;;AAEpB;AACA;AACA,IAAI;AACJ;AACA,I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C,mDAAS;;AAE5B;AACA;;AAEA;;;;;;;;;;;ACNA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,UAAU;AACrB,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACrBA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,UAAU;AACrB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACxBA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,kBAAkB,mBAAO,CAAC,+DAAe;AACzC,cAAc,mBAAO,CAAC,uDAAW;AACjC,eAAe,mBAAO,CAAC,yDAAY;AACnC,cAAc,mBAAO,CAAC,yDAAY;AAClC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,SAAS;AACpB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AChDA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACnBA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,UAAU;AACrB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACtBA,sBAAsB,mBAAO,CAAC,yEAAoB;AAClD,SAAS,mBAAO,CAAC,6CAAM;;AAEvB;AACA;;AAEA;AACA;;AAEA;AACA;AACA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AC9C,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,mBAAmB,mBAAO,CAAC,mEAAiB;AAC5C,aAAa,mBAAO,CAAC,uDAAW;AAChC,qBAAqB,mBAAO,CAAC,uEAAmB;AAChD,qBAAqB,mBAAO,CAAC,uEAAmB;AAChD,sBAAsB,mBAAO,CAAC,yEAAoB;AAClD,cAAc,mBAAO,CAAC,uDAAW;AACjC,eAAe,mBAAO,CAAC,yDAAY;AACnC,YAAY,mBAAO,CAAC,mDAAS;AAC7B,eAAe,mBAAO,CAAC,yDAAY;AACnC,YAAY,mBAAO,CAAC,mDAAS;AAC7B,WAAW,mBAAO,CAAC,iDAAQ;AAC3B,aAAa,mBAAO,CAAC,qDAAU;;AAE/B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,SAAS;AACpB;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa,GAAG;AAChB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;AACA,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA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aAAa,mBAAO,CAAC,uDAAW;AAChC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,eAAe,mBAAO,CAAC,yDAAY;AACnC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC3DA,kBAAkB,mBAAO,CAAC,iEAAgB;AAC1C,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC7BA,eAAe,mBAAO,CAAC,yDAAY;AACnC,kBAAkB,mBAAO,CAAC,iEAAgB;AAC1C,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AChCA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;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AW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACnFA,aAAa,mBAAO,CAAC,uDAAW;AAChC,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,SAAS,mBAAO,CAAC,6CAAM;AACvB,kBAAkB,mBAAO,CAAC,iEAAgB;AAC1C,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC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mBAAO,CAAC,+DAAe;AACxC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACzDA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa,GAAG;AAChB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACZA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACdA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AChBA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,GAAG;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC7BA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACtBA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AAC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AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ,CAAC;;AAED;;;;;;;;;;;AC7BA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACrBA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,aAAa,UAAU;AACvB;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACdA,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;ACRA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACbA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;;;;;;;;;;ACjBA,gBAAgB,mBAAO,CAAC,6DAAc;;AAEtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACdA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,GAAG;AAChB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACbA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACbA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,UAAU,mBAAO,CAAC,iDAAQ;AAC1B,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjCA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;;;;;;;;;;;ACzBA,gBAAgB,mBAAO,CAAC,6DAAc;;AAEtC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,GAAG;AAChB;AACA;AACA;AACA,oBAAoB,QAAQ,IAAI,QAAQ;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,kBAAkB;AAClB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpCA,sBAAsB,mBAAO,CAAC,yEAAoB;AAClD,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA,8BAA8B,mBAAmB;AACjD;AACA;AACA;AACA;AACA;AACA,+CAA+C,mBAAmB;AAClE;AACA;AACA;;AAEA;;;;;;;;;;;ACnCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACzBA,iBAAiB,mBAAO,CAAC,6DAAc;AACvC,eAAe,mBAAO,CAAC,yDAAY;;AAEnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AChCA,WAAW,mBAAO,CAAC,mDAAS;AAC5B,gBAAgB,mBAAO,CAAC,2DAAa;;AAErC;AACA,kBAAkB,KAA0B;;AAE5C;AACA,gCAAgC,QAAa;;AAE7C;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACrCA,kBAAkB,mBAAO,CAAC,iEAAgB;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,kBAAkB;AAClB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClCA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,eAAe,mBAAO,CAAC,yDAAY;;AAEnC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpCA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClCA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC1BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC9BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC5BA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC1BA,uBAAuB,mBAAO,CAAC,2EAAqB;AACpD,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC1BA,oBAAoB,mBAAO,CAAC,qEAAkB;AAC9C,eAAe,mBAAO,CAAC,2DAAa;AACpC,kBAAkB,mBAAO,CAAC,+DAAe;;AAEzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpCA,oBAAoB,mBAAO,CAAC,qEAAkB;AAC9C,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,kBAAkB,mBAAO,CAAC,+DAAe;;AAEzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC/BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;;;ACXA,oBA2BC;AAjCD,sHAA4C;AAC5C,8FAAyC;AAEzC;;GAEG;AACI,KAAK,UAAU,IAAI;IACzB,sCAAsC;IACtC,IAAI,MAAM,CAAC,GAAG,KAAK,SAAS,EAAE,CAAC;QAC9B,MAAM,QAAQ,GAAG,MAAM,0BAAW,GAAE,CAAC;QACrC,oIAAoI;QACpI,MAAM,CAAC,GAAG,GAAG,MAAM,sBAAO,E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A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD;;AAEnD;;AAEA,oBAAoB,gBAAgB;AACpC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA,kBAAkB,cAAc;AAChC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,kBAAkB,cAAc;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,kBAAkB,aAAa;AAC/B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,iEAAe,GAAG;;;;;;;;;;;;;;;ACtNlB,iEAAe,sCAAsC;;;;;;;;;;;;;;;;ACAhB;;AAErC;AACA,OAAO,wDAAQ;AACf;AACA;;AAEA;AACA,gCAAgC;;AAEhC;AACA;AACA;AACA,qBAAqB;;AAErB;AACA,qBAAqB;;AAErB;AACA,qBAAqB;;AAErB;AACA,qBAAqB;AACrB;;AAEA;AACA;AACA;AACA;AACA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,EAAE,CAAC;QACrF,eAAe,CAAC,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;QAC3C,eAAe,CAAC,WAAW,GAAG,OAAO,CAAC,IAAI,IAAI,mBAAmB,CAAC;QAClE,cAAc,CAAC,WAAW,GAAG,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;IAC/D,CAAC;AACF,CAAC;AAED;;GAEG;AACH,KAAK,UAAU,aAAa;IAC3B,MAAM,gBAAgB,GAAG,QAAQ,CAAC,aAAa,CAAoB,aAAa,CAAC,CAAC;IAElF,IAAI,gBAAgB,KAAK,IAAI,EAAE,CAAC;QAC/B,gBAAgB,CAAC,gBAAgB,CAAC,OAAO,EAAE,KAAK,IAAI,EAAE;YACrD,MAAM,UAAU,EAAE,CAAC;QACpB,CAAC,CAAC,CAAC;IACJ,CAAC;IAED,MAAM,kBAAkB,EAAE,CAAC;AAC5B,CAAC","sources":["webpack://openfin-web--web-interop-basic/./node_modules/@openfin/core-web/out/api-client.js","webpack://openfin-web--web-interop-basic/./node_modules/@openfin/core-web/out/main-8cad4070.js","webpack://openfin-web--web-interop-basic/./node_modules/@openfin/core-web/out/main-b14f67c9.js","webpack://openfin-web--web-interop-basic/../../node_modules/base64-js/index.js","webpack://openfin-web--web-interop-basic/../../node_modules/buffer/index.js","webpack://openfin-web--web-interop-basic/../../node_modules/events/events.js","webpack://openfin-web--web-interop-basic/../../node_modules/ieee754/index.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_DataView.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_Hash.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_ListCache.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_Map.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_MapCache.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_Promise.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_Set.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_SetCache.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_Stack.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_Symbol.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_Uint8Array.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_WeakMap.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_arrayEach.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_arrayFilter.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_arrayLikeKeys.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_arrayPush.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_arraySome.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_assignValue.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_assocIndexOf.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_baseAssign.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_baseAssignIn.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_baseAssignValue.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_baseClone.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_baseCreate.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_baseGetAllKeys.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_baseGetTag.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_baseIsArguments.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_baseIsEqual.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_baseIsEqualDeep.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_baseIsMap.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_baseIsNative.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_baseIsSet.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_baseIsTypedArray.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_baseKeys.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_baseKeysIn.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_baseTimes.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_baseUnary.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_cacheHas.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_cloneArrayBuffer.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_cloneBuffer.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_cloneDataView.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_cloneRegExp.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_cloneSymbol.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_cloneTypedArray.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_copyArray.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_copyObject.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_copySymbols.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_copySymbolsIn.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_coreJsData.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_defineProperty.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_equalArrays.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_equalByTag.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_equalObjects.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_freeGlobal.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_getAllKeys.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_getAllKeysIn.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_getMapData.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_getNative.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_getPrototype.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_getRawTag.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_getSymbols.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_getSymbolsIn.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_getTag.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_getValue.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_hashClear.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_hashDelete.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_hashGet.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_hashHas.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_hashSet.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_initCloneArray.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_initCloneByTag.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_initCloneObject.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_isIndex.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_isKeyable.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_isMasked.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_isPrototype.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_listCacheClear.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_listCacheDelete.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_listCacheGet.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_listCacheHas.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_listCacheSet.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_mapCacheClear.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_mapCacheDelete.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_mapCacheGet.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_mapCacheHas.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_mapCacheSet.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_mapToArray.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_nativeCreate.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_nativeKeys.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_nativeKeysIn.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_nodeUtil.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_objectToString.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_overArg.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_root.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_setCacheAdd.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_setCacheHas.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_setToArray.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_stackClear.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_stackDelete.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_stackGet.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_stackHas.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_stackSet.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_toSource.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/cloneDeep.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/eq.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/isArguments.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/isArray.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/isArrayLike.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/isBuffer.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/isEqual.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/isFunction.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/isLength.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/isMap.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/isObject.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/isObjectLike.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/isSet.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/isTypedArray.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/keys.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/keysIn.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/stubArray.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/stubFalse.js","webpack://openfin-web--web-interop-basic/./client/src/platform/api.ts","webpack://openfin-web--web-interop-basic/./client/src/platform/settings.ts","webpack://openfin-web--web-interop-basic/../../node_modules/uuid/dist/esm-browser/index.js","webpack://openfin-web--web-interop-basic/../../node_modules/uuid/dist/esm-browser/md5.js","webpack://openfin-web--web-interop-basic/../../node_modules/uuid/dist/esm-browser/nil.js","webpack://openfin-web--web-interop-basic/../../node_modules/uuid/dist/esm-browser/parse.js","webpack://openfin-web--web-interop-basic/../../node_modules/uuid/dist/esm-browser/regex.js","webpack://openfin-web--web-interop-basic/../../node_modules/uuid/dist/esm-browser/rng.js","webpack://openfin-web--web-interop-basic/../../node_modules/uuid/dist/esm-browser/sha1.js","webpack://openfin-web--web-interop-basic/../../node_modules/uuid/dist/esm-browser/stringify.js","webpack://openfin-web--web-interop-basic/../../node_modules/uuid/dist/esm-browser/v1.js","webpack://openfin-web--web-interop-basic/../../node_modules/uuid/dist/esm-browser/v3.js","webpack://openfin-web--web-interop-basic/../../node_modules/uuid/dist/esm-browser/v35.js","webpack://openfin-web--web-interop-basic/../../node_modules/uuid/dist/esm-browser/v4.js","webpack://openfin-web--web-interop-basic/../../node_modules/uuid/dist/esm-browser/v5.js","webpack://openfin-web--web-interop-basic/../../node_modules/uuid/dist/esm-browser/validate.js","webpack://openfin-web--web-interop-basic/../../node_modules/uuid/dist/esm-browser/version.js","webpack://openfin-web--web-interop-basic/webpack/bootstrap","webpack://openfin-web--web-interop-basic/webpack/runtime/define property getters","webpack://openfin-web--web-interop-basic/webpack/runtime/global","webpack://openfin-web--web-interop-basic/webpack/runtime/hasOwnProperty shorthand","webpack://openfin-web--web-interop-basic/webpack/runtime/make namespace object","webpack://openfin-web--web-interop-basic/webpack/runtime/node module decorator","webpack://openfin-web--web-interop-basic/./client/src/content/interop-view.ts"],"sourcesContent":["\"use strict\";var e=require(\"./main-8cad4070.js\");require(\"buffer/\"),require(\"uuid\"),require(\"events\"),require(\"lodash/cloneDeep\"),require(\"lodash/isEqual\"),exports.connect=e.connect;\n","\"use strict\";var e=require(\"buffer/\"),t=require(\"events\"),n=require(\"lodash/cloneDeep\"),i=require(\"lodash/isEqual\"),r=require(\"uuid\");const o=(e,t)=>`${t}<${btoa(JSON.stringify(e))}>`;var s=\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof window?window:\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:{},a={},c={},d={},h={};async function l(e){const t=[];for(const n of e){const e=await n();t.push(e)}return t}Object.defineProperty(h,\"__esModule\",{value:!0}),h.promiseMapSerial=h.serial=h.promiseMap=h.promisify=void 0,h.promisify=function(e){return(...t)=>new Promise(((n,i)=>{e(...t,((e,t)=>e?i(e):n(t)))}))},h.promiseMap=async function(e,t){return Promise.all(e.map(t))},h.serial=l,h.promiseMapSerial=async function(e,t){return l(e.map(((e,n,i)=>()=>t(e,n,i))))};var u,p=s&&s.__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},w=s&&s.__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)};Object.defineProperty(d,\"__esModule\",{value:!0}),d.Reply=d.EmitterBase=d.Base=void 0;const y=h;class f{constructor(e){this.isNodeEnvironment=()=>\"node\"===this.wire.environment.type,this.isOpenFinEnvironment=()=>\"openfin\"===this.wire.environment.type,this.isBrowserEnvironment=()=>\"other\"===this.wire.environment.type,this.wire=e}get fin(){return this.wire.getFin()}get me(){return this.wire.me}}d.Base=f;d.EmitterBase=class extends f{constructor(e,t,...n){super(e),this.topic=t,u.set(this,void 0),this.eventNames=()=>this.hasEmitter()?this.getOrCreateEmitter().eventNames():[],this.emit=(e,t,...n)=>!!this.hasEmitter()&&this.getOrCreateEmitter().emit(e,t,...n),this.hasEmitter=()=>this.wire.eventAggregator.has(w(this,u,\"f\")),this.getOrCreateEmitter=()=>this.wire.eventAggregator.getOrCreate(w(this,u,\"f\")),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[],this.listenerCount=e=>this.hasEmitter()?this.getOrCreateEmitter().listenerCount(e):0,this.registerEventListener=async(e,t={},n,i)=>{const r={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e},o=this.getOrCreateEmitter();n(o);try{await this.wire.sendAction(\"subscribe-to-desktop-event\",r)}catch(e){throw i(o),this.deleteEmitterIfNothingRegistered(o),e}},this.deregisterEventListener=async(e,t={})=>{if(this.hasEmitter()){const n={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e};await this.wire.sendAction(\"unsubscribe-to-desktop-event\",n).catch((()=>null));return this.getOrCreateEmitter()}return Promise.resolve()},p(this,u,[t,...n],\"f\"),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[]}async on(e,t,n){return await this.registerEventListener(e,n,(n=>{n.on(e,t)}),(n=>{n.removeListener(e,t)})),this}async addListener(e,t,n){return this.on(e,t,n)}async once(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.once(e,i),n.once(e,t)}),(n=>{n.removeListener(e,i),n.removeListener(e,t)})),this}async prependListener(e,t,n){return await this.registerEventListener(e,n,(n=>{n.prependListener(e,t)}),(n=>{n.removeListener(e,t)})),this}async prependOnceListener(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.prependOnceListener(e,t),n.once(e,i)}),(n=>{n.removeListener(e,t),n.removeListener(e,i)})),this}async removeListener(e,t,n){const i=await this.deregisterEventListener(e,n);return i&&(i.removeListener(e,t),this.deleteEmitterIfNothingRegistered(i)),this}async deregisterAllListeners(e){const t={...this.identity,type:e,topic:this.topic};if(this.hasEmitter()){const e=this.getOrCreateEmitter(),n=e.listenerCount(t.type),i=[];for(let e=0;enull)));return await Promise.all(i),e}}async removeAllListeners(e){const t=async e=>{const t=await this.deregisterAllListeners(e);t&&(t.removeAllListeners(e),this.deleteEmitterIfNothingRegistered(t))};if(e)await t(e);else if(this.hasEmitter()){const e=this.getOrCreateEmitter().eventNames();await(0,y.promiseMap)(e,t)}return this}deleteEmitterIfNothingRegistered(e){0===e.eventNames().length&&this.wire.eventAggregator.delete(w(this,u,\"f\"))}},u=new WeakMap;d.Reply=class{};var g={};Object.defineProperty(g,\"__esModule\",{value:!0});var m=g.RuntimeError=g.NotSupportedError=g.NotImplementedError=g.NoAckError=g.DuplicateCorrelationError=g.UnexpectedActionError=g.DisconnectedError=void 0;class v extends Error{constructor(e){super(`Expected websocket state OPEN but found ${e}`),this.readyState=e}}g.DisconnectedError=v;class C extends Error{}g.UnexpectedActionError=C;class b extends Error{}g.DuplicateCorrelationError=b;class I extends Error{}g.NoAckError=I;class E extends Error{}g.NotImplementedError=E;class x extends Error{}g.NotSupportedError=x;class A extends Error{constructor(e){const{message:t,name:n,stack:i,...r}=e;super(t),this.name=n||\"Error\",this.stack=i??this.toString(),Object.keys(r).forEach((e=>{this[e]=r[e]}))}}class P extends Error{static getCallSite(e=0){const t=Error.stackTraceLimit,n=e+1;Error.stackTraceLimit=t+n;const i=Error.prepareStackTrace;Error.prepareStackTrace=(e,t)=>t;const r=(new Error).stack?.slice(n)??[];return Error.prepareStackTrace=i,Error.stackTraceLimit=t,r}static prepareStackTrace(e,t){if(\"function\"==typeof Error.prepareStackTrace)return Error.prepareStackTrace(e,t);let n=\"\";n+=e.name||\"Error\",n+=`: ${e.message||\"\"}`;for(const e of t)n+=`\\n at ${e.toString()}`;return n}constructor(e,t){const{reason:n,error:i}=e;super(n),this.name=\"RuntimeError\",i?.stack&&(this.cause=new A(i)),t&&(this.stack=P.prepareStackTrace(this,t))}}m=g.RuntimeError=P;var M={},_={},O={};Object.defineProperty(O,\"__esModule\",{value:!0}),O.validateIdentity=void 0,O.validateIdentity=function(e){let t;return\"object\"==typeof e&&\"string\"==typeof e.uuid||(t=\"Not a valid identity object\"),t};var S={},R={},F={},j={},k={},L={},T={};Object.defineProperty(T,\"__esModule\",{value:!0}),T.handleDeprecatedWarnings=void 0;var $;T.handleDeprecatedWarnings=e=>{(e.contentNavigation?.whitelist||e.contentNavigation?.blacklist||e.contentRedirect?.whitelist||e.contentRedirect?.blacklist)&&console.warn(\"The properties 'whitelist' and 'blacklist' have been marked as deprecated and will be removed in a future version. Please use 'allowlist' and 'denylist'.\")};var B={},G={};Object.defineProperty(G,\"__esModule\",{value:!0}),G.AsyncRetryableLazy=W=G.Lazy=void 0;var W=G.Lazy=class{constructor(e){this.producerFn=e}getValue(){return this.value||(this.value=this.producerFn()),this.value}};G.AsyncRetryableLazy=class{constructor(e){this.producerFn=e}async getValue(){return this.promise||(this.promise=this.producerFn().catch((e=>{throw delete this.promise,e}))),this.promise}};var H={};Object.defineProperty(H,\"__esModule\",{value:!0}),H.WebContents=void 0;const N=d;class D extends N.EmitterBase{constructor(e,t,n){super(e,n,t.uuid,t.name),this.identity=t,this.entityType=n}capturePage(e){return this.wire.sendAction(\"capture-page\",{options:e,...this.identity}).then((({payload:e})=>e.data))}executeJavaScript(e){return this.wire.sendAction(\"execute-javascript-in-window\",{...this.identity,code:e}).then((({payload:e})=>e.data))}getZoomLevel(){return this.wire.sendAction(\"get-zoom-level\",this.identity).then((({payload:e})=>e.data))}setZoomLevel(e){return this.wire.sendAction(\"set-zoom-level\",{...this.identity,level:e}).then((()=>{}))}navigate(e){return this.wire.sendAction(\"navigate-window\",{...this.identity,url:e}).then((()=>{}))}navigateBack(){return this.wire.sendAction(\"navigate-window-back\",{...this.identity}).then((()=>{}))}async navigateForward(){await this.wire.sendAction(\"navigate-window-forward\",{...this.identity})}stopNavigation(){return this.wire.sendAction(\"stop-window-navigation\",{...this.identity}).then((()=>{}))}reload(e=!1){return this.wire.sendAction(\"reload-window\",{ignoreCache:e,...this.identity}).then((()=>{}))}print(e={}){return this.wire.sendAction(\"print\",{...this.identity,options:e}).then((()=>{}))}findInPage(e,t){return this.wire.sendAction(\"find-in-page\",{...this.identity,searchTerm:e,options:t}).then((({payload:e})=>e.data))}stopFindInPage(e){return this.wire.sendAction(\"stop-find-in-page\",{...this.identity,action:e}).then((()=>{}))}getPrinters(){return this.wire.sendAction(\"get-printers\",{...this.identity}).then((({payload:e})=>e.data))}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){await this.wire.sendAction(\"focus-window\",{emitSynthFocused:e,...this.identity})}async showDeveloperTools(){await this.wire.sendAction(\"show-developer-tools\",this.identity)}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction(\"get-process-info\",this.identity);return e}async getSharedWorkers(){return this.wire.sendAction(\"get-shared-workers\",this.identity).then((({payload:e})=>e.data))}async inspectSharedWorker(){await this.wire.sendAction(\"inspect-shared-worker\",{...this.identity})}async inspectSharedWorkerById(e){await this.wire.sendAction(\"inspect-shared-worker-by-id\",{...this.identity,workerId:e})}async inspectServiceWorker(){await this.wire.sendAction(\"inspect-service-worker\",{...this.identity})}async showPopupWindow(e){if(this.wire.sendAction(`${this.entityType}-show-popup-window`,this.identity).catch((()=>{})),e?.onPopupReady){const t=async({popupName:t})=>{try{const n=this.fin.Window.wrapSync({uuid:this.fin.me.uuid,name:t});await e.onPopupReady(n)}catch(e){throw new Error(`Something went wrong during onPopupReady execution: ${e}`)}};await this.once(\"popup-ready\",t)}const{payload:t}=await this.wire.sendAction(\"try-create-popup-window\",{options:{...e,hasResultCallback:!!e?.onPopupResult,hasReadyCallback:!!e?.onPopupReady},...this.identity}),{data:{willOpen:n,options:i}}=t;n&&await this.fin.Window.create(i.initialOptions);if(e?.onPopupResult){const t=async t=>{await e.onPopupResult((e=>{const{name:t,uuid:n,result:i,data:r}=e,o={identity:{name:t,uuid:n},result:i};return r&&(o.data=r),o})(t))},n=async()=>{await this.removeListener(\"popup-result\",t)};await this.on(\"popup-result\",t),await this.once(\"popup-teardown\",n)}const{payload:r}=await this.wire.sendAction(\"show-popup-window\",{options:i,...this.identity});return r.data}}var U,V,z,K,q;function J(){return V||(V=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(function(){if($)return L;$=1,Object.defineProperty(L,\"__esModule\",{value:!0}),L.ViewModule=void 0;const e=d,t=O,n=J(),i=T;class r extends e.Base{async create(e){const{uuid:t}=this.wire.me;if(!e.name||\"string\"!=typeof e.name)throw new Error(\"Please provide a name property as a string in order to create a View.\");return(0,i.handleDeprecatedWarnings)(e),this.wire.environment.childViews?await this.wire.environment.createChildContent({entityType:\"view\",options:{...e,uuid:t}}):await this.wire.sendAction(\"create-view\",{...e,uuid:t}),this.wrapSync({uuid:t,name:e.name})}async wrap(e){this.wire.sendAction(\"view-wrap\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}wrapSync(e){this.wire.sendAction(\"view-wrap-sync\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}getCurrent(){if(this.wire.sendAction(\"view-get-current\").catch((e=>{})),!this.wire.me.isView)throw new Error(\"You are not in a View context\");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction(\"view-get-current-sync\").catch((e=>{})),!this.wire.me.isView)throw new Error(\"You are not in a View context\");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return L.ViewModule=r,L}(),e),n(function(){if(U)return B;var e;U=1,Object.defineProperty(B,\"__esModule\",{value:!0}),B.View=void 0;const t=g,n=G,i=H,r=ie();class o extends i.WebContents{constructor(i,o){super(i,o,\"view\"),this.identity=o,e.set(this,new n.Lazy((()=>this.fin.Platform.wrapSync(this.identity).getClient()))),this.attach=async e=>{await this.wire.sendAction(\"attach-view\",{target:e,...this.identity})},this.destroy=async()=>{await this.wire.sendAction(\"destroy-view\",{...this.identity})},this.show=async()=>{await this.wire.sendAction(\"show-view\",{...this.identity})},this.showAt=async(e,t={})=>{await this.wire.sendAction(\"show-view-at\",{bounds:e,...this.identity,options:t})},this.bringToFront=async()=>{await this.wire.sendAction(\"bring-view-to-front\",{...this.identity})},this.hide=async()=>{await this.wire.sendAction(\"hide-view\",{...this.identity})},this.setBounds=async e=>{await this.wire.sendAction(\"set-view-bounds\",{bounds:e,...this.identity})},this.getBounds=async()=>(await this.wire.sendAction(\"get-view-bounds\",{...this.identity})).payload.data,this.getInfo=async()=>(await this.wire.sendAction(\"get-view-info\",{...this.identity})).payload.data,this.getParentLayout=async()=>(this.wire.sendAction(\"view-get-parent-layout\",{...this.identity}).catch((()=>{})),this.fin.Platform.Layout.getLayoutByViewIdentity(this.identity)),this.getOptions=async()=>this.wire.sendAction(\"get-view-options\",{...this.identity}).then((({payload:e})=>e.data)),this.updateOptions=async e=>this.wire.sendAction(\"update-view-options\",{options:e,...this.identity}).then((()=>{})),this.getCurrentWindow=async()=>{const{payload:{data:e}}=await this.wire.sendAction(\"get-view-window\",{...this.identity});return new r._Window(this.wire,e)},this.getCurrentStack=async()=>{this.wire.sendAction(\"view-get-current-stack\").catch((()=>{}));try{return(await this.getParentLayout()).getStackByViewIdentity(this.identity)}catch(e){throw new t.RuntimeError({reason:\"This view does not belong to a stack.\",error:e})}},this.triggerBeforeUnload=async()=>(await this.wire.sendAction(\"trigger-before-unload\",{...this.identity})).payload.data,this.bindToElement=async e=>{if(!e)throw new Error(\"Element not found.\");return this.wire.environment.observeBounds(e,(async e=>this.setBounds(e)))}}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){const t=await this.getCurrentWindow();await t.focusedWebViewWasChanged(),await super.focus({emitSynthFocused:e})}}return B.View=o,e=new WeakMap,B}(),e)}(k)),k}function Y(){if(z)return j;z=1,Object.defineProperty(j,\"__esModule\",{value:!0}),j.Application=void 0;const e=d,t=ie(),n=J();class i extends e.EmitterBase{constructor(e,n){super(e,\"application\",n.uuid),this.identity=n,this.window=new t._Window(this.wire,{uuid:this.identity.uuid,name:this.identity.uuid})}windowListFromIdentityList(e){const n=[];return e.forEach((e=>{n.push(new t._Window(this.wire,{uuid:e.uuid,name:e.name}))})),n}isRunning(){return this.wire.sendAction(\"is-application-running\",this.identity).then((({payload:e})=>e.data))}async quit(e=!1){try{await this._close(e),await this.wire.sendAction(\"destroy-application\",{force:e,...this.identity})}catch(e){if(![\"Remote connection has closed\",\"Could not locate the requested application\"].some((t=>e.message.includes(t))))throw e}}async _close(e=!1){try{await this.wire.sendAction(\"close-application\",{force:e,...this.identity})}catch(e){if(!e.message.includes(\"Remote connection has closed\"))throw e}}close(e=!1){return console.warn(\"Deprecation Warning: Application.close is deprecated Please use Application.quit\"),this.wire.sendAction(\"application-close\",this.identity).catch((e=>{})),this._close(e)}getChildWindows(){return this.wire.sendAction(\"get-child-windows\",this.identity).then((({payload:e})=>{const t=[];return e.data.forEach((e=>{t.push({uuid:this.identity.uuid,name:e})})),this.windowListFromIdentityList(t)}))}getManifest(){return this.wire.sendAction(\"get-application-manifest\",this.identity).then((({payload:e})=>e.data))}getParentUuid(){return this.wire.sendAction(\"get-parent-application\",this.identity).then((({payload:e})=>e.data))}getShortcuts(){return this.wire.sendAction(\"get-shortcuts\",this.identity).then((({payload:e})=>e.data))}async getViews(){const{payload:e}=await this.wire.sendAction(\"application-get-views\",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}getZoomLevel(){return this.wire.sendAction(\"get-application-zoom-level\",this.identity).then((({payload:e})=>e.data))}getWindow(){return this.wire.sendAction(\"application-get-window\",this.identity).catch((e=>{})),Promise.resolve(this.window)}registerUser(e,t){return this.wire.sendAction(\"register-user\",{userName:e,appName:t,...this.identity}).then((()=>{}))}removeTrayIcon(){return this.wire.sendAction(\"remove-tray-icon\",this.identity).then((()=>{}))}restart(){return this.wire.sendAction(\"restart-application\",this.identity).then((()=>{}))}run(){return console.warn(\"Deprecation Warning: Application.run is deprecated Please use fin.Application.start\"),this.wire.sendAction(\"application-run\",this.identity).catch((e=>{})),this._run()}_run(e={}){return this.wire.sendAction(\"run-application\",{manifestUrl:this._manifestUrl,opts:e,...this.identity}).then((()=>{}))}scheduleRestart(){return this.wire.sendAction(\"relaunch-on-close\",this.identity).then((()=>{}))}async sendApplicationLog(){const{payload:e}=await this.wire.sendAction(\"send-application-log\",this.identity);return e.data}async setJumpList(e){await this.wire.sendAction(\"set-jump-list\",{config:e,...this.identity})}setTrayIcon(e){return this.wire.sendAction(\"set-tray-icon\",{enabledIcon:e,...this.identity}).then((()=>{}))}setShortcuts(e){return this.wire.sendAction(\"set-shortcuts\",{data:e,...this.identity}).then((()=>{}))}async setShortcutQueryParams(e){await this.wire.sendAction(\"set-shortcut-query-args\",{data:e,...this.identity})}setZoomLevel(e){return this.wire.sendAction(\"set-application-zoom-level\",{level:e,...this.identity}).then((()=>{}))}async setAppLogUsername(e){await this.wire.sendAction(\"set-app-log-username\",{data:e,...this.identity})}getTrayIconInfo(){return this.wire.sendAction(\"get-tray-icon-info\",this.identity).then((({payload:e})=>e.data))}hasTrayIcon(){return this.wire.sendAction(\"has-tray-icon\",this.identity).then((({payload:e})=>e.data))}terminate(){return this.wire.sendAction(\"terminate-application\",this.identity).then((()=>{}))}wait(){return this.wire.sendAction(\"wait-for-hung-application\",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction(\"get-info\",this.identity).then((({payload:e})=>e.data))}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction(\"application-get-process-info\",this.identity);return e}async setFileDownloadLocation(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t};await this.wire.sendAction(\"set-file-download-location\",{...n,downloadLocation:e})}async getFileDownloadLocation(){const{payload:{data:e}}=await this.wire.sendAction(\"get-file-download-location\",this.identity);return e}async showTrayIconPopupMenu(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t},{payload:i}=await this.wire.sendAction(\"show-tray-icon-popup-menu\",{...n,options:e});return i.data}async closeTrayIconPopupMenu(){const{name:e}=this.wire.me,t={uuid:this.identity.uuid,name:e};await this.wire.sendAction(\"close-tray-icon-popup-menu\",{...t})}}return j.Application=i,j}function Z(){return q||(q=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(function(){if(K)return F;K=1,Object.defineProperty(F,\"__esModule\",{value:!0}),F.ApplicationModule=void 0;const e=d,t=O,n=Y();class i extends e.Base{async wrap(e){this.wire.sendAction(\"wrap-application\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}wrapSync(e){this.wire.sendAction(\"wrap-application-sync\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}async _create(e){return void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&void 0===e.isPlatformController&&(e.autoShow=!0),await this.wire.sendAction(\"create-application\",e),this.wrap({uuid:e.uuid})}create(e){return console.warn(\"Deprecation Warning: fin.Application.create is deprecated. Please use fin.Application.start\"),this.wire.sendAction(\"application-create\").catch((e=>{})),this._create(e)}async start(e){this.wire.sendAction(\"start-application\").catch((e=>{}));const t=await this._create(e);return await this.wire.sendAction(\"run-application\",{uuid:e.uuid}),t}async startManyManifests(e,t){return this.wire.sendAction(\"run-applications\",{applications:e,opts:t}).then((()=>{}))}getCurrent(){return this.wire.sendAction(\"get-current-application\").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction(\"get-current-application-sync\").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}async startFromManifest(e,t){this.wire.sendAction(\"application-start-from-manifest\").catch((e=>{}));const n=await this._createFromManifest(e);return await n._run(t),n}createFromManifest(e){return console.warn(\"Deprecation Warning: fin.Application.createFromManifest is deprecated. Please use fin.Application.startFromManifest\"),this.wire.sendAction(\"application-create-from-manifest\").catch((e=>{})),this._createFromManifest(e)}_createFromManifest(e){return this.wire.sendAction(\"get-application-manifest\",{manifestUrl:e}).then((({payload:e})=>{const t=e.data.platform?e.data.platform.uuid:e.data.startup_app.uuid;return this.wrap({uuid:t})})).then((t=>(t._manifestUrl=e,t)))}}return F.ApplicationModule=i,F}(),e),n(Y(),e)}(R)),R}H.WebContents=D;var Q={};Object.defineProperty(Q,\"__esModule\",{value:!0}),Q.promisifySubscription=void 0;var X,ee,te;function ne(){if(X)return S;X=1,Object.defineProperty(S,\"__esModule\",{value:!0}),S._Window=void 0;const e=Z(),t=H,n=J(),i=T,r=Q;class o extends t.WebContents{constructor(e,t){super(e,t,\"window\")}async createWindow(e){this.wire.sendAction(\"window-create-window\",this.identity).catch((e=>{}));const t=await(0,r.promisifySubscription)(this,\"fire-constructor-callback\");void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&(e.autoShow=!0),(0,i.handleDeprecatedWarnings)(e);const n=this.wire.environment.createChildContent({entityType:\"window\",options:e}),[o]=await Promise.all([t.getValue(),n]);let s;const{success:a}=o,c=o.data,{message:d}=c;s=a?{httpResponseCode:c.httpResponseCode,apiInjected:c.apiInjected}:{message:c.message,networkErrorCode:c.networkErrorCode,stack:c.stack};const h={message:d,cbPayload:s,success:a};try{this.getWebWindow().fin.__internal_.openerSuccessCBCalled()}catch(e){}return h.success?this:Promise.reject(h)}getAllFrames(){return this.wire.sendAction(\"get-all-frames\",this.identity).then((({payload:e})=>e.data))}getBounds(){return this.wire.sendAction(\"get-window-bounds\",this.identity).then((({payload:e})=>e.data))}center(){return this.wire.sendAction(\"center-window\",this.identity).then((()=>{}))}blur(){return this.wire.sendAction(\"blur-window\",this.identity).then((()=>{}))}bringToFront(){return this.wire.sendAction(\"bring-window-to-front\",this.identity).then((()=>{}))}animate(e,t){return this.wire.sendAction(\"animate-window\",{transitions:e,options:t,...this.identity}).then((()=>{}))}hide(){return this.wire.sendAction(\"hide-window\",this.identity).then((()=>{}))}close(e=!1){return this.wire.sendAction(\"close-window\",{force:e,...this.identity}).then((()=>{Object.setPrototypeOf(this,null)}))}focusedWebViewWasChanged(){return this.wire.sendAction(\"focused-webview-changed\",this.identity).then((()=>{}))}getNativeId(){return this.wire.sendAction(\"get-window-native-id\",this.identity).then((({payload:e})=>e.data))}async getCurrentViews(){const{payload:e}=await this.wire.sendAction(\"window-get-views\",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}disableFrame(){return console.warn(\"Function is deprecated; use disableUserMovement instead.\"),this.wire.sendAction(\"disable-window-frame\",this.identity).then((()=>{}))}disableUserMovement(){return this.wire.sendAction(\"disable-window-frame\",this.identity).then((()=>{}))}enableFrame(){return console.warn(\"Function is deprecated; use enableUserMovement instead.\"),this.wire.sendAction(\"enable-window-frame\",this.identity).then((()=>{}))}enableUserMovement(){return this.wire.sendAction(\"enable-window-frame\",this.identity).then((()=>{}))}flash(){return this.wire.sendAction(\"flash-window\",this.identity).then((()=>{}))}stopFlashing(){return this.wire.sendAction(\"stop-flash-window\",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction(\"get-window-info\",this.identity).then((({payload:e})=>e.data))}async getLayout(e){this.wire.sendAction(\"window-get-layout\",this.identity).catch((e=>{}));const t=await this.getOptions();if(!t.layout&&!t.layoutSnapshot)throw new Error(\"Window does not have a Layout\");return this.fin.Platform.Layout.wrap(e??this.identity)}getOptions(){return this.wire.sendAction(\"get-window-options\",this.identity).then((({payload:e})=>e.data))}getParentApplication(){return this.wire.sendAction(\"window-get-parent-application\",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity))}getParentWindow(){return this.wire.sendAction(\"window-get-parent-window\",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity)).then((e=>e.getWindow()))}async getSnapshot(e){const t={area:e,...this.identity};console.warn(\"Window.getSnapshot has been deprecated, please use Window.capturePage\");return(await this.wire.sendAction(\"get-window-snapshot\",t)).payload.data}getState(){return this.wire.sendAction(\"get-window-state\",this.identity).then((({payload:e})=>e.data))}getWebWindow(){return this.wire.sendAction(\"window-get-web-window\",this.identity).catch((e=>{})),this.wire.environment.getWebWindow(this.identity)}isMainWindow(){return this.wire.sendAction(\"window-is-main-window\",this.identity).catch((e=>{})),this.me.uuid===this.me.name}isShowing(){return this.wire.sendAction(\"is-window-showing\",this.identity).then((({payload:e})=>e.data))}maximize(){return this.wire.sendAction(\"maximize-window\",this.identity).then((()=>{}))}minimize(){return this.wire.sendAction(\"minimize-window\",this.identity).then((()=>{}))}moveBy(e,t,n){return this.wire.sendAction(\"move-window-by\",{deltaLeft:e,deltaTop:t,positioningOptions:n,...this.identity}).then((()=>{}))}moveTo(e,t,n){return this.wire.sendAction(\"move-window\",{left:e,top:t,positioningOptions:n,...this.identity}).then((()=>{}))}resizeBy(e,t,n,i){return this.wire.sendAction(\"resize-window-by\",{deltaWidth:Math.floor(e),deltaHeight:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}resizeTo(e,t,n,i){return this.wire.sendAction(\"resize-window\",{width:Math.floor(e),height:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}restore(){return this.wire.sendAction(\"restore-window\",this.identity).then((()=>{}))}setAsForeground(){return this.wire.sendAction(\"set-foreground-window\",this.identity).then((()=>{}))}setBounds(e,t){return this.wire.sendAction(\"set-window-bounds\",{...e,...this.identity,positioningOptions:t}).then((()=>{}))}show(e=!1){return this.wire.sendAction(\"show-window\",{force:e,...this.identity}).then((()=>{}))}showAt(e,t,n=!1){return this.wire.sendAction(\"show-at-window\",{force:n,left:Math.floor(e),top:Math.floor(t),...this.identity}).then((()=>{}))}updateOptions(e){return this.wire.sendAction(\"update-window-options\",{options:e,...this.identity}).then((()=>{}))}authenticate(e,t){return this.wire.sendAction(\"window-authenticate\",{userName:e,password:t,...this.identity}).then((()=>{}))}async showPopupMenu(e){const{payload:t}=await this.wire.sendAction(\"show-popup-menu\",{options:e,...this.identity});return t.data}async closePopupMenu(){return this.wire.sendAction(\"close-popup-menu\",{...this.identity}).then((()=>{}))}async dispatchPopupResult(e){this.wire.sendAction(\"window-dispatch-popup-result\",this.identity).catch((e=>{})),await this.wire.sendAction(\"dispatch-popup-result\",{data:e,...this.identity})}async print(e={content:\"self\"}){switch(e.content){case void 0:case\"self\":return super.print(e);case\"screenshot\":return this.wire.sendAction(\"print-screenshot\",this.identity).then((()=>{}));case\"views\":return this.wire.sendAction(\"print-views\",{...this.identity,options:e}).then((()=>{}));default:return}}}return S._Window=o,S}function ie(){return te||(te=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(function(){if(ee)return _;ee=1,Object.defineProperty(_,\"__esModule\",{value:!0}),_._WindowModule=void 0;const e=d,t=O,n=ne();class i extends e.Base{async wrap(e){this.wire.sendAction(\"window-wrap\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}wrapSync(e){this.wire.sendAction(\"window-wrap-sync\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}create(e){return this.wire.sendAction(\"create-window\").catch((e=>{})),new n._Window(this.wire,{uuid:this.me.uuid,name:e.name}).createWindow(e)}getCurrent(){if(this.wire.sendAction(\"get-current-window\").catch((e=>{})),!this.wire.me.isWindow)throw new Error(\"You are not in a Window context\");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction(\"get-current-window-sync\").catch((e=>{})),!this.wire.me.isWindow)throw new Error(\"You are not in a Window context\");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return _._WindowModule=i,_}(),e),n(ne(),e)}(M)),M}Q.promisifySubscription=async(e,t,n=(()=>!0),i)=>{let r,o,s;const a=new Promise(((e,t)=>{r=e,o=t})),c=e=>{n(e)&&(clearTimeout(s),r(e))};return await e.on(t,c),i&&(s=setTimeout((()=>o(new Error(\"event timed out\"))),i)),a.finally((()=>{e.removeListener(t,c).catch((()=>null))})),{getValue:()=>a}},Object.defineProperty(c,\"__esModule\",{value:!0}),c.System=void 0;const re=d,oe=g,se=ie(),ae=t;class ce extends re.EmitterBase{constructor(e){super(e,\"system\")}sendExternalProcessRequest(e,t){return new Promise(((n,i)=>{const r=\"external-process-exited\";let o,s,a,c;\"function\"==typeof t.listener&&(a=e=>{const n=e||{};s={topic:\"exited\",uuid:n.processUuid||\"\",exitCode:n.exitCode||0},o===e.processUuid&&(t.listener(s),c.removeListener(r,a))},this.wire.me.name||(this.wire.me.name=this.wire.me.uuid),c=new se._Window(this.wire,this.wire.me),c.on(r,a)),this.wire.sendAction(e,t).then((({payload:e})=>{o=e.data.uuid,n(e.data),s&&o===s.uuid&&(t.listener(s),c.removeListener(r,a))})).catch((e=>{c&&c.removeListener(r,a),i(e)}))}))}getVersion(){return this.wire.sendAction(\"get-version\").then((({payload:e})=>e.data))}clearCache(e){return this.wire.sendAction(\"clear-cache\",e).then((()=>{}))}deleteCacheOnExit(){return this.wire.sendAction(\"delete-cache-request\").then((()=>{}))}exit(){return this.wire.sendAction(\"exit-desktop\").then((()=>{}))}async fetchManifest(e){const{payload:{data:t}}=await this.wire.sendAction(\"fetch-manifest\",{manifestUrl:e});return t}flushCookieStore(){return this.wire.sendAction(\"flush-cookie-store\").then((()=>{}))}getAllWindows(){return this.wire.sendAction(\"get-all-windows\").then((({payload:e})=>e.data))}getAllApplications(){return this.wire.sendAction(\"get-all-applications\").then((({payload:e})=>e.data))}getCommandLineArguments(){return this.wire.sendAction(\"get-command-line-arguments\").then((({payload:e})=>e.data))}async getCrashReporterState(){const{payload:{data:{diagnosticMode:e,isRunning:t}}}=await this.wire.sendAction(\"get-crash-reporter-state\");return console.warn(\"diagnosticMode property is deprecated. It will be removed in a future version\"),{diagnosticMode:e,diagnosticsMode:e,isRunning:t}}async startCrashReporter(e){const t=e,n={...t,diagnosticMode:t.diagnosticsMode||t.diagnosticMode},{payload:{data:{diagnosticMode:i,isRunning:r}}}=await this.wire.sendAction(\"start-crash-reporter\",n);return{diagnosticMode:i,diagnosticsMode:i,isRunning:r}}getUniqueUserId(){return this.wire.sendAction(\"get-unique-user-id\").then((({payload:e})=>e.data))}getEntityInfo(e,t){return this.wire.sendAction(\"get-entity-info\",{uuid:e,name:t}).then((({payload:e})=>e.data))}getEnvironmentVariable(e){return this.wire.sendAction(\"get-environment-variable\",{environmentVariables:e}).then((({payload:e})=>e.data))}getFocusedWindow(){return this.wire.sendAction(\"get-focused-window\").then((({payload:e})=>e.data))}async isAppCertified(e){const{payload:{data:{certifiedInfo:t}}}=await this.wire.sendAction(\"is-app-certified\",{manifestUrl:e});return t}getInstalledRuntimes(){return this.wire.sendAction(\"get-installed-runtimes\").then((({payload:e})=>e.data.runtimes))}async getInstalledApps(){const{payload:{data:{installedApps:e}}}=await this.wire.sendAction(\"get-installed-apps\");return e}getLog(e){return this.wire.sendAction(\"view-log\",e).then((({payload:e})=>e.data))}getMachineId(){return this.wire.sendAction(\"get-machine-id\").then((({payload:e})=>e.data))}getMinLogLevel(){return this.wire.sendAction(\"get-min-log-level\").then((({payload:e})=>e.data))}getLogList(){return this.wire.sendAction(\"list-logs\").then((({payload:e})=>e.data))}getMonitorInfo(){return this.wire.sendAction(\"get-monitor-info\").then((({payload:e})=>e.data))}getMousePosition(){return this.wire.sendAction(\"get-mouse-position\").then((({payload:e})=>e.data))}getProcessList(){return console.warn(\"System.getProcessList has been deprecated. Please consider using our new process APIs: Window.getProcessInfo, View.getProcessInfo, Application.getProcessInfo, System.getAllProcessInfo\"),this.wire.sendAction(\"process-snapshot\").then((({payload:e})=>e.data))}async getAllProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction(\"get-all-process-info\",this.identity);return e}getProxySettings(){return this.wire.sendAction(\"get-proxy-settings\").then((({payload:e})=>e.data))}getRuntimeInfo(){return this.wire.sendAction(\"get-runtime-info\").then((({payload:e})=>e.data))}getRvmInfo(){return this.wire.sendAction(\"get-rvm-info\").then((({payload:e})=>e.data))}getHostSpecs(){return this.wire.sendAction(\"get-host-specs\").then((({payload:e})=>e.data))}getOSInfo(){return this.wire.sendAction(\"get-os-info\").then((({payload:e})=>e.data))}launchExternalProcess(e){return this.sendExternalProcessRequest(\"launch-external-process\",e)}monitorExternalProcess(e){return this.sendExternalProcessRequest(\"monitor-external-process\",e)}log(e,t){return this.wire.sendAction(\"write-to-log\",{level:e,message:t}).then((()=>{}))}openUrlWithBrowser(e){return this.wire.sendAction(\"open-url-with-browser\",{url:e}).then((()=>{}))}async registerCustomProtocol(e){if(\"object\"!=typeof e)throw new Error(\"Must provide an object with a `protocolName` property having a string value.\");await this.wire.sendAction(\"register-custom-protocol\",e)}async unregisterCustomProtocol(e){await this.wire.sendAction(\"unregister-custom-protocol\",{protocolName:e})}async getCustomProtocolState(e){return this.wire.sendAction(\"get-custom-protocol-state\",{protocolName:e}).then((({payload:e})=>e.data))}releaseExternalProcess(e){return this.wire.sendAction(\"release-external-process\",{uuid:e}).then((()=>{}))}showDeveloperTools(e){return this.wire.sendAction(\"show-developer-tools\",e).then((()=>{}))}terminateExternalProcess(e){return this.wire.sendAction(\"terminate-external-process\",e).then((()=>{}))}updateProxySettings(e){return this.wire.sendAction(\"update-proxy\",e).then((()=>{}))}async downloadAsset(e,t){const n=()=>{};let i=n,r=n;const o=new Promise(((e,t)=>{i=e,r=t}));if(\"openfin\"!==this.wire.environment.type)throw new oe.NotSupportedError(\"downloadAsset only supported in an OpenFin Render process\");const s=oe.RuntimeError.getCallSite(),a=this.wire.environment.getNextMessageId().toString(),c=`asset-download-progress-${a}`,d=`asset-download-error-${a}`,h=`asset-download-complete-${a}`,l=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},u=()=>{this.removeListener(c,l)};await Promise.all([this.on(c,l),this.once(d,(e=>{u();const{reason:t,err:n}=e;r(new oe.RuntimeError({reason:t,error:n},s))})),this.once(h,(()=>{u(),i()}))]);const p=Object.assign(e,{downloadId:a});return await this.wire.sendAction(\"download-asset\",p).catch((e=>{throw u(),e})),o}downloadRuntime(e,t){const n=oe.RuntimeError.getCallSite();return new Promise(((i,r)=>{if(\"openfin\"!==this.wire.environment.type)return void r(new oe.NotSupportedError(\"downloadRuntime only supported in an OpenFin Render process\"));const o=this.wire.environment.getNextMessageId().toString(),s=`runtime-download-progress-${o}`,a=`runtime-download-error-${o}`,c=`runtime-download-complete-${o}`,d=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},h=()=>{this.removeListener(s,d)};this.on(s,d),this.once(a,(e=>{h();const{reason:t,err:i}=e;r(new oe.RuntimeError({reason:t,error:i},n))})),this.once(c,(()=>{h(),i()}));const l=Object.assign(e,{downloadId:o});this.wire.sendAction(\"download-runtime\",l).catch((e=>{h(),r(e)}))}))}downloadPreloadScripts(e){return this.wire.sendAction(\"download-preload-scripts\",{scripts:e}).then((({payload:e})=>e.data))}getAllExternalApplications(){return this.wire.sendAction(\"get-all-external-applications\").then((({payload:e})=>e.data))}getAppAssetInfo(e){return this.wire.sendAction(\"get-app-asset-info\",e).then((({payload:e})=>e.data))}getCookies(e){const t=this.wire.environment.getUrl(),n=Object.assign(e,{url:t});return this.wire.sendAction(\"get-cookies\",n).then((({payload:e})=>e.data))}setMinLogLevel(e){return this.wire.sendAction(\"set-min-log-level\",{level:e}).then((()=>{}))}resolveUuid(e){return this.wire.sendAction(\"resolve-uuid\",{entityKey:e}).then((({payload:e})=>e.data))}executeOnRemote(e,t){return t.requestingIdentity=e,this.wire.ferryAction(t)}readRegistryValue(e,t,n){return this.wire.sendAction(\"read-registry-value\",{rootKey:e,subkey:t,value:n}).then((({payload:e})=>e.data))}registerExternalConnection(e){return this.wire.sendAction(\"register-external-connection\",{uuid:e}).then((({payload:e})=>e.data))}async getServiceConfiguration(e){if(\"string\"!=typeof e.name)throw new Error(\"Must provide an object with a `name` property having a string value\");const{name:t}=e;return this.wire.sendAction(\"get-service-configuration\",{name:t}).then((({payload:e})=>e.data))}async getSystemAppConfig(e){if(\"string\"!=typeof e)throw new Error(\"Must provide a string value for name of system app\");return this.wire.sendAction(\"get-system-app-configuration\",{name:e}).then((({payload:e})=>e.data))}async registerShutdownHandler(e){this.wire.sendAction(\"system-register-shutdown-handler\").catch((e=>{}));const{uuid:t,name:n}=this.wire.me;this.on(\"system-shutdown\",(i=>{e({proceed:()=>{this.wire.environment.raiseEvent(\"application/system-shutdown-handled\",{uuid:t,name:n,topic:\"application\"})}})}))}runRvmHealthCheck(){return this.wire.sendAction(\"run-rvm-health-check\").then((({payload:e})=>e.data))}async launchManifest(e,t={}){const{subscribe:n,...i}=t,r=i;if(n){const e=new ae.EventEmitter;n(e);const t=\"app-version-progress\",i=\"runtime-status\",o=\"app-version-complete\",s=\"app-version-error\",a=this.wire.environment.getNextMessageId().toString();r.appVersionId=a;const c=[o,t,i,s],d=e=>{const{appVersionId:t,topic:n,type:i,...r}=e;return{...r,type:c.find((e=>i.includes(e)))}},h=t=>{const n=d(t);e.emit(n.type,n)},l=()=>{this.removeListener(`${t}.${a}`,h),this.removeListener(`${i}.${a}`,h),this.removeListener(`${o}.${a}`,h),this.removeListener(`${s}.${a}`,h),this.removeListener(`${o}.${a}`,l),this.removeListener(`${s}.${a}`,l)};await Promise.all([this.on(`${t}.${a}`,h),this.on(`${i}.${a}`,h),this.once(`${o}.${a}`,h),this.once(`${s}.${a}`,h),this.once(`${o}.${a}`,l),this.once(`${s}.${a}`,l)])}return(await this.wire.sendAction(\"launch-manifest\",{manifestUrl:e,opts:r})).payload.data.manifest}async queryPermissionForCurrentContext(e){const t={uuid:this.wire.me.uuid,name:this.wire.me.name};return(await this.wire.sendAction(\"query-permission-for-current-context\",{apiName:e,identity:t})).payload.data}async enableNativeWindowIntegrationProvider(e){const{payload:t}=await this.wire.sendAction(\"enable-native-window-integration-provider\",{permissions:e});return t.data}async registerUsage({data:e,type:t}){await this.wire.sendAction(\"register-usage\",{data:e,type:t})}async getPrinters(){const{payload:e}=await this.wire.sendAction(\"system-get-printers\");return e.data}async updateProcessLoggingOptions(e){await this.wire.sendAction(\"system-update-process-logging-options\",{options:e})}async getDomainSettings(){const{payload:{data:e}}=await this.wire.sendAction(\"get-domain-settings\",this.identity);return e}async setDomainSettings(e){await this.wire.sendAction(\"set-domain-settings\",{domainSettings:e,...this.identity})}async refreshExtensions(){const{payload:e}=await this.wire.sendAction(\"refresh-extensions\");return e.data}async getInstalledExtensions(){const{payload:e}=await this.wire.sendAction(\"get-installed-extensions\");return e.data}}c.System=ce;var de={},he={};Object.defineProperty(he,\"__esModule\",{value:!0}),he.RefCounter=void 0;he.RefCounter=class{constructor(){this.topicRefMap=new Map}incRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t+1;n=i,this.topicRefMap.set(e,i)}else this.topicRefMap.set(e,1),n=1;return n}decRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t-1;this.topicRefMap.set(e,i),n=i}else n=-1;return n}actOnFirst(e,t,n){return 1===this.incRefCount(e)?t():n()}actOnLast(e,t,n){return 0===this.decRefCount(e)?t():n()}};var le={},ue={},pe={};Object.defineProperty(pe,\"__esModule\",{value:!0}),pe.ChannelBase=pe.ProtectedItems=void 0;const we=e=>async(t,n,i)=>{const r=await e(t,n,i);return void 0===r?n:r};pe.ProtectedItems=class{constructor(e,t){this.providerIdentity=e,this.close=t}};class ye{static defaultAction(e){throw new Error(`No action registered at target for ${e}`)}constructor(){this.subscriptions=new Map}async processAction(e,t,n){try{const i=this.subscriptions.has(e)?this.subscriptions.get(e):(t,n)=>(this.defaultAction??ye.defaultAction)(e,t,n),r=this.preAction?await this.preAction(e,t,n):t,o=await i(r,n);return this.postAction?await this.postAction(e,o,n):o}catch(t){if(this.errorMiddleware)return this.errorMiddleware(e,t,n);throw t}}beforeAction(e){if(this.preAction)throw new Error(\"Already registered beforeAction middleware\");this.preAction=we(e)}onError(e){if(this.errorMiddleware)throw new Error(\"Already registered error middleware\");this.errorMiddleware=e}afterAction(e){if(this.postAction)throw new Error(\"Already registered afterAction middleware\");this.postAction=we(e)}remove(e){this.subscriptions.delete(e)}setDefaultAction(e){if(this.defaultAction)throw new Error(\"default action can only be set once\");this.defaultAction=e}register(e,t){if(this.subscriptions.has(e))throw new Error(`Subscription already registered for action: ${e}. Unsubscribe before adding new subscription`);return this.subscriptions.set(e,t),!0}}pe.ChannelBase=ye;var fe,ge,me,ve=s&&s.__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)},Ce=s&&s.__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};Object.defineProperty(ue,\"__esModule\",{value:!0}),ue.ChannelClient=void 0;const be=pe,Ie=new Map;class Ee extends be.ChannelBase{static closeChannelByEndpointId(e){const t=Ie.get(e);t&&ve(t,me,\"f\").call(t)}static handleProviderDisconnect(e){for(const t of Ie.values())t.providerIdentity.channelId===e.channelId&&(t.disconnectListener(e),ve(t,me,\"f\").call(t))}constructor(e,t,n){super(),fe.set(this,void 0),ge.set(this,void 0),this.processAction=(e,t,n)=>super.processAction(e,t,n),me.set(this,(()=>{Ie.delete(this.endpointId),ve(this,ge,\"f\").close()})),Ce(this,fe,new be.ProtectedItems(e,t),\"f\"),this.disconnectListener=()=>{},this.endpointId=e.endpointId,Ce(this,ge,n,\"f\"),Ie.set(this.endpointId,this),n.receive(this.processAction)}get providerIdentity(){return ve(this,fe,\"f\").providerIdentity}async dispatch(e,t){if(ve(this,ge,\"f\").isEndpointConnected(this.providerIdentity.channelId))return ve(this,ge,\"f\").send(this.providerIdentity.channelId,e,t);throw new Error(\"The client you are trying to dispatch from is disconnected from the target provider.\")}onDisconnection(e){this.disconnectListener=t=>{try{e(t)}catch(e){throw new Error(`Error while calling the onDisconnection callback: ${e.message}`)}finally{this.disconnectListener=()=>{}}}}async disconnect(){await this.sendDisconnectAction(),ve(this,me,\"f\").call(this)}async sendDisconnectAction(){const e=ve(this,fe,\"f\");await e.close()}static async wireClose(e,t,n){const{channelName:i,uuid:r,name:o}=t;await e.sendAction(\"disconnect-from-channel\",{channelName:i,uuid:r,name:o,endpointId:n})}}ue.ChannelClient=Ee,fe=new WeakMap,ge=new WeakMap,me=new WeakMap;var xe={},Ae={};Object.defineProperty(Ae,\"__esModule\",{value:!0}),Ae.exhaustiveCheck=void 0,Ae.exhaustiveCheck=function(e,t){throw new Error(`Unsupported value: ${e}${t?`\\n Supported values are: ${t.join(\"\")}`:\"\"}`)};var Pe,Me,_e,Oe={},Se=s&&s.__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},Re=s&&s.__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)};Object.defineProperty(Oe,\"__esModule\",{value:!0}),Oe.ClassicInfo=Oe.ClassicStrategy=void 0;Oe.ClassicStrategy=class{constructor(e,t,n,i){this.messageReceiver=t,this.endpointId=n,this.providerIdentity=i,Pe.set(this,void 0),Me.set(this,new Map),_e.set(this,new Map),this.send=async(e,t,n)=>{const i=Re(this,Me,\"f\").get(e);if(!i)throw new Error(`Could not locate routing info for endpoint ${e}`);const r={...i};r.isLocalEndpointId&&delete r.endpointId,delete r.isLocalEndpointId;const o=Re(this,Pe,\"f\").sendAction(\"send-channel-message\",{...r,providerIdentity:this.providerIdentity,action:t,payload:n});Re(this,_e,\"f\").get(e)?.add(o);return(await o.catch((e=>{throw new Error(e.message)})).finally((()=>{Re(this,_e,\"f\").get(e)?.delete(o)}))).payload.data.result},this.close=async()=>{this.messageReceiver.removeEndpoint(this.providerIdentity.channelId,this.endpointId),[...Re(this,Me,\"f\").keys()].forEach((e=>this.closeEndpoint(e))),Se(this,Me,new Map,\"f\")},Se(this,Pe,e,\"f\")}onEndpointDisconnect(e,t){}receive(e){this.messageReceiver.addEndpoint(e,this.providerIdentity.channelId,this.endpointId)}async closeEndpoint(e){const t=Re(this,Me,\"f\").get(e);Re(this,Me,\"f\").delete(e);const n=Re(this,_e,\"f\").get(e);n?.forEach((n=>{const i=`Channel connection with identity uuid: ${t?.uuid} / name: ${t?.name} / endpointId: ${e} no longer connected.`;n.cancel(new Error(i))}))}isEndpointConnected(e){return Re(this,Me,\"f\").has(e)}addEndpoint(e,t){Re(this,Me,\"f\").set(e,t.endpointIdentity),Re(this,_e,\"f\").set(e,new Set)}isValidEndpointPayload(e){return\"string\"==typeof e?.endpointIdentity?.endpointId||\"string\"==typeof e?.endpointIdentity?.channelId}},Pe=new WeakMap,Me=new WeakMap,_e=new WeakMap,Oe.ClassicInfo={version:5,minimumVersion:0,type:\"classic\"};var Fe={},je={},ke={};Object.defineProperty(ke,\"__esModule\",{value:!0}),ke.errorToPOJO=void 0,ke.errorToPOJO=function(e){return{stack:e.stack,name:e.name,message:e.message,toString:()=>e.stack||e.toString()}};var Le,Te,$e=s&&s.__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)},Be=s&&s.__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};Object.defineProperty(je,\"__esModule\",{value:!0}),je.RTCEndpoint=void 0;const Ge=ke;je.RTCEndpoint=class{static isValidEndpointPayload(e){const t=e=>\"object\"==typeof e&&null!==e;return t(e)&&t(e.endpointIdentity)&&t(e.rtc)&&\"string\"==typeof e.endpointIdentity.endpointId}constructor({rtc:e,endpointIdentity:t}){this.responseMap=new Map,Le.set(this,null),Te.set(this,void 0),this.connectionStateChangeHandler=e=>{\"connected\"!==this.rtc.rtcClient.connectionState&&(this.rtc.rtcClient.removeEventListener(\"connectionstatechange\",this.connectionStateChangeHandler),this.close(),$e(this,Te,\"f\")&&$e(this,Te,\"f\").call(this))},this.send=async(e,t)=>{const n=`message-${Math.random()}`,i=new Promise(((e,t)=>{this.responseMap.set(n,{resolve:e,reject:t})}));return this.rtc.channels.request.send(JSON.stringify({action:e,payload:t,messageId:n})),i},this.close=()=>{this.responseMap.forEach((e=>e.reject(\"Connection has closed.\"))),this.responseMap=new Map,this.rtc.channels.request.close(),this.rtc.channels.response.close(),this.rtc.rtcClient.close()},this.rtc=e,this.endpointIdentity=t,this.rtc.channels.response.addEventListener(\"message\",(e=>{let{data:t}=e;e.data instanceof ArrayBuffer&&(t=(new TextDecoder).decode(e.data));const{messageId:n,payload:i,success:r,error:o}=JSON.parse(t),{resolve:s,reject:a}=this.responseMap.get(n)??{};s&&a?(this.responseMap.delete(n),r?s(i):a(o)):(console.log(\"Could not find id in responseMap.\"),console.log(e))})),this.rtc.channels.request.addEventListener(\"message\",(async e=>{let{data:n}=e;e.data instanceof ArrayBuffer&&(n=(new TextDecoder).decode(e.data));const{messageId:i,action:r,payload:o}=JSON.parse(n);if($e(this,Le,\"f\"))try{const e=await $e(this,Le,\"f\").call(this,r,o,t);this.rtc.channels.response.send(JSON.stringify({messageId:i,payload:e,success:!0}))}catch(e){\"open\"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,error:(0,Ge.errorToPOJO)(e),success:!1}))}else\"open\"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,success:!1,error:\"Connection not ready.\"}))})),this.rtc.rtcClient.addEventListener(\"connectionstatechange\",this.connectionStateChangeHandler),Object.values(this.rtc.channels).forEach((e=>{e.onclose=e=>{[...this.responseMap.values()].forEach((e=>e.reject(new Error(\"RTCDataChannel closed unexpectedly, this is most commonly caused by message size. Note: RTC Channels have a message size limit of ~255kB.\")))),this.close(),$e(this,Te,\"f\")&&$e(this,Te,\"f\").call(this)}}))}onDisconnect(e){if($e(this,Te,\"f\"))throw new Error(\"RTCEndpoint disconnectListener cannot be set twice.\");Be(this,Te,e,\"f\")}receive(e){if($e(this,Le,\"f\"))throw new Error(\"You have already set a listener for this RTC Endpoint.\");Be(this,Le,e,\"f\")}get connected(){return\"connected\"===this.rtc.rtcClient.connectionState}},Le=new WeakMap,Te=new WeakMap;var We,He,Ne,De={},Ue=s&&s.__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)},Ve=s&&s.__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};Object.defineProperty(De,\"__esModule\",{value:!0}),De.EndpointStrategy=void 0;De.EndpointStrategy=class{constructor(e,t,n){this.EndpointType=e,this.StrategyName=n,We.set(this,null),He.set(this,new Map),Ne.set(this,!0),this.send=async(e,t,n)=>this.getEndpointById(e).send(t,n),this.close=async()=>{Ue(this,Ne,\"f\")&&(Ue(this,He,\"f\").forEach((e=>e.close())),Ve(this,He,new Map,\"f\")),Ve(this,Ne,!1,\"f\")},this.isValidEndpointPayload=t}onEndpointDisconnect(e,t){this.getEndpointById(e).onDisconnect(t)}receive(e){if(Ue(this,We,\"f\"))throw new Error(`You have already set a listener for this ${this.StrategyName} Strategy`);Ve(this,We,e,\"f\"),Ue(this,He,\"f\").forEach((e=>e.receive(Ue(this,We,\"f\"))))}getEndpointById(e){const t=Ue(this,He,\"f\").get(e);if(!t)throw new Error(`Client with endpoint id ${e} is not connected`);return t}get connected(){return Ue(this,Ne,\"f\")}isEndpointConnected(e){return Ue(this,He,\"f\").has(e)}addEndpoint(e,t){if(!Ue(this,Ne,\"f\"))return void console.warn(`Adding endpoint to disconnected ${this.StrategyName} Strategy`);const n=new this.EndpointType(t);Ue(this,We,\"f\")&&n.receive(Ue(this,We,\"f\")),Ue(this,He,\"f\").set(e,n)}async closeEndpoint(e){Ue(this,He,\"f\").delete(e)}},We=new WeakMap,He=new WeakMap,Ne=new WeakMap,Object.defineProperty(Fe,\"__esModule\",{value:!0}),Fe.RTCInfo=Fe.RTCStrategy=void 0;const ze=je,Ke=De;class qe extends Ke.EndpointStrategy{constructor(){super(ze.RTCEndpoint,ze.RTCEndpoint.isValidEndpointPayload,\"RTC\")}}Fe.RTCStrategy=qe,Fe.RTCInfo={version:2,minimumVersion:0,type:\"rtc\"};var Je={};Object.defineProperty(Je,\"__esModule\",{value:!0}),Je.RTCICEManager=void 0;const Ye=d;class Ze extends Ye.EmitterBase{constructor(e){super(e,\"channel\"),this.ensureChannelOpened=e=>new Promise(((t,n)=>{if(\"open\"===e.readyState)t();else if(\"connecting\"===e.readyState){const n=()=>{e.removeEventListener(\"open\",n),t()};e.addEventListener(\"open\",n)}else n(new Error(\"This Channel has already closed\"))}))}static createDataChannelPromise(e,t){let n;const i=new Promise((e=>{n=e})),r=i=>{const o=()=>{i.channel.removeEventListener(\"open\",o),n(i.channel)};i.channel.label===e&&(i.channel.addEventListener(\"open\",o),t.removeEventListener(\"datachannel\",r))};return t.addEventListener(\"datachannel\",r),i}async listenForProviderIce(e,t){await this.on(this.createProviderEventName(e),t,{timestamp:Date.now()})}async raiseProviderIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createProviderEventName(e)),t)}async listenForClientIce(e,t){await this.on(this.createClientEventName(e),t,{timestamp:Date.now()})}async raiseClientIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createClientEventName(e)),t)}cleanupIceListeners(e){this.removeAllListeners(this.createClientEventName(e)),this.removeAllListeners(this.createProviderEventName(e))}createClientEventName(e){return`ice-client-${e}`}createProviderEventName(e){return`ice-provider-${e}`}createRouteString(e){return`channel/${e}`}createRtcPeer(){return this.wire.environment.getRtcPeer()}async startClientOffer(){const e=Math.random().toString(),t=this.createRtcPeer();t.addEventListener(\"icecandidate\",(async t=>{t.candidate&&await this.raiseClientIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForProviderIce(e,(async e=>{await t.addIceCandidate(e.candidate)}));const n={request:t.createDataChannel(\"request\"),response:t.createDataChannel(\"response\")},i=await t.createOffer();await t.setLocalDescription(i);const r=Promise.all([n.request,n.response].map(this.ensureChannelOpened)).then((()=>{}));return{rtcClient:t,channels:n,offer:i,rtcConnectionId:e,channelsOpened:r}}async finishClientOffer(e,t,n){return await e.setRemoteDescription(t),await n,!0}async createProviderAnswer(e,t){const n=this.createRtcPeer(),i=Ze.createDataChannelPromise(\"request\",n),r=Ze.createDataChannelPromise(\"response\",n);n.addEventListener(\"icecandidate\",(async t=>{t.candidate&&await this.raiseProviderIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForClientIce(e,(async e=>{await n.addIceCandidate(e.candidate)})),await n.setRemoteDescription(t);const o=await n.createAnswer();await n.setLocalDescription(o);const s=Promise.all([i,r]).then((([t,n])=>(this.cleanupIceListeners(e),{request:t,response:n})));return{rtcClient:n,answer:o,channels:s}}}Je.RTCICEManager=Ze;var Qe={},Xe={};function et(e){return[...e.split(\".\").reverse().entries()].reduce(((e,[t,n])=>e+ +n*1e4**t),0)}function tt(e,t){return et(e)>=et(t)}function nt(e){return e.split(\"/\")[0]}Object.defineProperty(Xe,\"__esModule\",{value:!0}),Xe.runtimeUuidMeetsMinimumRuntimeVersion=Xe.parseRuntimeUuid=Xe.meetsMinimumRuntimeVersion=void 0,Xe.meetsMinimumRuntimeVersion=tt,Xe.parseRuntimeUuid=nt,Xe.runtimeUuidMeetsMinimumRuntimeVersion=function(e,t){return tt(nt(e),t)};var it,rt,ot,st,at,ct=s&&s.__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)},dt=s&&s.__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};Object.defineProperty(Qe,\"__esModule\",{value:!0}),Qe.ChannelProvider=void 0;const ht=pe,lt=Xe;class ut extends ht.ChannelBase{get connections(){return[...ct(this,it,\"f\")]}static handleClientDisconnection(e,t){const n=e.connections.find((e=>e.endpointId===t.endpointId));if(n)ct(e,st,\"f\").call(e,n);else{e.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name)).forEach(ct(e,st,\"f\"))}e.disconnectListener(t)}static setProviderRemoval(e,t){ut.removalMap.set(e,t)}constructor(e,t,n){super(),it.set(this,void 0),rt.set(this,void 0),ot.set(this,void 0),st.set(this,(e=>{const t=this.connections.filter((t=>t.endpointId!==e.endpointId));ct(this,ot,\"f\").closeEndpoint(e.endpointId),dt(this,it,t,\"f\")})),this.processAction=async(e,t,n)=>(ut.clientIsMultiRuntime(n)&&!(0,lt.runtimeUuidMeetsMinimumRuntimeVersion)(n.runtimeUuid,\"18.87.56.0\")?this.handleMultiRuntimeLegacyClient(n):this.checkForClientConnection(n),super.processAction(e,t,n)),at.set(this,(()=>{ct(this,ot,\"f\").close();const e=ut.removalMap.get(this);e&&e()})),dt(this,rt,new ht.ProtectedItems(e,t),\"f\"),this.connectListener=()=>{},this.disconnectListener=()=>{},dt(this,it,[],\"f\"),dt(this,ot,n,\"f\"),n.receive(this.processAction)}dispatch(e,t,n){const i=e.endpointId??this.getEndpointIdForOpenFinId(e,t);return i&&ct(this,ot,\"f\").isEndpointConnected(i)?ct(this,ot,\"f\").send(i,t,n):Promise.reject(new Error(`Client connection with identity uuid: ${e.uuid} / name: ${e.name} / endpointId: ${i} no longer connected.`))}async processConnection(e,t){return ct(this,it,\"f\").push(e),this.connectListener(e,t)}publish(e,t){return this.connections.map((n=>ct(this,ot,\"f\").send(n.endpointId,e,t)))}onConnection(e){this.connectListener=e}onDisconnection(e){this.disconnectListener=e}async destroy(){const e=ct(this,rt,\"f\");e.providerIdentity,dt(this,it,[],\"f\"),await e.close(),ct(this,at,\"f\").call(this)}async getAllClientInfo(){return this.connections.map((e=>{const{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}=e;return{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}}))}checkForClientConnection(e){if(!this.isClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider.\\n Client Identity: {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}isClientConnected(e){return ut.clientIdentityIncludesEndpointId(e)?this.connections.some((t=>t.endpointId===e.endpointId&&t.uuid===e.uuid&&t.name===e.name)):this.isLegacyClientConnected(e)}isLegacyClientConnected(e){return this.connections.some((t=>t.uuid===e.uuid&&t.name===e.name))}handleMultiRuntimeLegacyClient(e){if(!this.isLegacyClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider. Client Identity:\\n {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}getEndpointIdForOpenFinId(e,t){const n=this.connections.filter((t=>t.name===e.name&&t.uuid===e.uuid));if(n.length>=2){const n=ct(this,rt,\"f\"),{uuid:i,name:r}=e,o=n?.providerIdentity.uuid,s=n?.providerIdentity.name;console.warn(`WARNING: Dispatch call may have unintended results. The \"to\" argument of your dispatch call is missing the\\n \"endpointId\" parameter. The identity you are dispatching to ({uuid: ${i}, name: ${r}})\\n has multiple channelClients for this channel. Your dispatched action: (${t}) from the provider:\\n ({uuid: ${o}, name: ${s}}) will only be processed by the most recently-created client.`)}return n.pop()?.endpointId}static clientIdentityIncludesEndpointId(e){return void 0!==e.endpointId}static clientIsMultiRuntime(e){return void 0!==e.runtimeUuid}static async wireClose(e,t){await e.sendAction(\"destroy-channel\",{channelName:t})}}Qe.ChannelProvider=ut,it=new WeakMap,rt=new WeakMap,ot=new WeakMap,st=new WeakMap,at=new WeakMap,ut.removalMap=new WeakMap;var pt={};Object.defineProperty(pt,\"__esModule\",{value:!0}),pt.MessageReceiver=void 0;const wt=ue,yt=d;class ft extends yt.Base{constructor(e){super(e),this.onmessage=e=>\"process-channel-message\"===e.action&&(this.processChannelMessage(e),!0),this.endpointMap=new Map,this.latestEndpointIdByChannelId=new Map,e.registerMessageHandler(this.onmessage.bind(this))}async processChannelMessage(e){const{senderIdentity:t,providerIdentity:n,action:i,ackToSender:r,payload:o,intendedTargetIdentity:s}=e.payload,a=s.channelId??s.endpointId??this.latestEndpointIdByChannelId.get(n.channelId),c=this.endpointMap.get(a);if(!c)return r.payload.success=!1,r.payload.reason=`Client connection with identity uuid: ${this.wire.me.uuid} / name: ${this.wire.me.name} / endpointId: ${a} no longer connected.`,this.wire.sendRaw(r);try{const e=await c(i,o,t);return r.payload.payload=r.payload.payload||{},r.payload.payload.result=e,this.wire.sendRaw(r)}catch(e){return r.payload.success=!1,r.payload.reason=e.message,this.wire.sendRaw(r)}}addEndpoint(e,t,n){this.endpointMap.set(n,e),t!==n&&this.latestEndpointIdByChannelId.set(t,n)}removeEndpoint(e,t){this.endpointMap.delete(t),this.latestEndpointIdByChannelId.get(e)===t&&this.latestEndpointIdByChannelId.delete(e)}checkForPreviousClientConnection(e){const t=this.latestEndpointIdByChannelId.get(e);t&&(wt.ChannelClient.closeChannelByEndpointId(t),console.warn(\"You have created a second connection to an older provider. First connection has been removed from the clientMap\"),console.warn(\"If the provider calls publish(), you may receive multiple messages.\"))}}pt.MessageReceiver=ft;var gt={};Object.defineProperty(gt,\"__esModule\",{value:!0}),gt.ProtocolManager=void 0;gt.ProtocolManager=class{constructor(e){this.ProtocolsInPreferenceOrder=e,this.DefaultClientProtocols=[\"classic\"],this.DefaultProviderProtocols=[\"classic\"],this.getClientProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultClientProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(\", \")}.`);return t},this.getProviderProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultProviderProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(\", \")}.`);return t},this.getCompatibleProtocols=(e,t)=>t.supportedProtocols.filter((t=>e.some((e=>e.type===t.type&&t.version>=e.minimumVersion&&e.version>=(t.minimumVersion??0))))).slice(0,t.maxProtocols)}};var mt={};Object.defineProperty(mt,\"__esModule\",{value:!0});class vt{static combine(e,t){return new vt(e,t)}constructor(e,t){this.primary=e,this.secondary=t}onEndpointDisconnect(e,t){this.primary.onEndpointDisconnect(e,(()=>{this.secondary.isEndpointConnected(e)||t()})),this.secondary.onEndpointDisconnect(e,(()=>{this.primary.isEndpointConnected(e)||t()}))}isValidEndpointPayload(e){return this.primary.isValidEndpointPayload(e)||this.secondary.isValidEndpointPayload(e)}async closeEndpoint(e){await this.primary.closeEndpoint(e),await this.secondary.closeEndpoint(e)}isEndpointConnected(e){return this.primary.isEndpointConnected(e)||this.secondary.isEndpointConnected(e)}async addEndpoint(e,t){this.primary.isValidEndpointPayload(t)&&await this.primary.addEndpoint(e,t),this.secondary.isValidEndpointPayload(t)&&await this.secondary.addEndpoint(e,t)}receive(e){this.primary.receive(e),this.secondary.receive(e)}send(e,t,n){return this.primary.isEndpointConnected(e)?this.primary.send(e,t,n):this.secondary.send(e,t,n)}async close(){await Promise.all([this.primary.close(),this.secondary.close()])}}mt.default=vt;var Ct,bt,It=s&&s.__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},Et=s&&s.__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)},xt=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(xe,\"__esModule\",{value:!0}),xe.ConnectionManager=void 0;const At=Ae,Pt=d,Mt=Oe,_t=Fe,Ot=Je,St=Qe,Rt=pt,Ft=gt,jt=xt(mt);class kt extends Pt.Base{static getProtocolOptionsFromStrings(e){return e.map((e=>{switch(e){case\"rtc\":return _t.RTCInfo;case\"classic\":return Mt.ClassicInfo;default:return(0,At.exhaustiveCheck)(e,[\"rtc\",\"classic\"])}}))}constructor(e){super(e),Ct.set(this,void 0),bt.set(this,void 0),this.removeChannelFromProviderMap=e=>{this.providerMap.delete(e)},this.onmessage=e=>\"process-channel-connection\"===e.action&&(this.processChannelConnection(e),!0),this.providerMap=new Map,this.protocolManager=new Ft.ProtocolManager(\"node\"===this.wire.environment.type?[\"classic\"]:[\"rtc\",\"classic\"]),It(this,Ct,new Rt.MessageReceiver(e),\"f\"),It(this,bt,new Ot.RTCICEManager(e),\"f\"),e.registerMessageHandler(this.onmessage.bind(this))}createProvider(e,t){const n=Object.assign(this.wire.environment.getDefaultChannelOptions().create,e||{}),i=this.protocolManager.getProviderProtocols(n?.protocols),r=i.map((e=>{switch(e){case\"rtc\":return new _t.RTCStrategy;case\"classic\":return new Mt.ClassicStrategy(this.wire,Et(this,Ct,\"f\"),t.channelId,t);default:return(0,At.exhaustiveCheck)(e,[\"rtc\",\"classic\"])}}));let o;if(2===r.length){const[e,t]=r;o=jt.default.combine(e,t)}else{if(1!==r.length)throw new Error(\"failed to combine strategies\");[o]=r}const s=new St.ChannelProvider(t,(()=>St.ChannelProvider.wireClose(this.wire,t.channelName)),o),a=t.channelId;return this.providerMap.set(a,{provider:s,strategy:o,supportedProtocols:kt.getProtocolOptionsFromStrings(i)}),St.ChannelProvider.setProviderRemoval(s,this.removeChannelFromProviderMap.bind(this)),s}async createClientOffer(e){const t=this.protocolManager.getClientProtocols(e?.protocols);let n;return{offer:{supportedProtocols:await Promise.all(t.map((async e=>{switch(e){case\"rtc\":{const{rtcClient:e,channels:t,offer:i,rtcConnectionId:r,channelsOpened:o}=await Et(this,bt,\"f\").startClientOffer();return n={rtcClient:e,channels:t,channelsOpened:o},{type:\"rtc\",version:_t.RTCInfo.version,payload:{offer:i,rtcConnectionId:r}}}case\"classic\":return{type:\"classic\",version:Mt.ClassicInfo.version};default:return(0,At.exhaustiveCheck)(e,[\"rtc\",\"classic\"])}}))),maxProtocols:2},rtc:n}}async createClientStrategy(e,t){t.endpointId||(t.endpointId=this.wire.environment.getNextMessageId(),Et(this,Ct,\"f\").checkForPreviousClientConnection(t.channelId));const n=t.answer??{supportedProtocols:[{type:\"classic\",version:1}]},i=(await Promise.all(n.supportedProtocols.map((async n=>\"rtc\"===n.type&&e?(await Et(this,bt,\"f\").finishClientOffer(e.rtcClient,n.payload.answer,e.channelsOpened),new _t.RTCStrategy):\"classic\"===n.type?new Mt.ClassicStrategy(this.wire,Et(this,Ct,\"f\"),t.endpointId,t):null)))).filter((e=>null!==e));let r;if(e&&!i.some((e=>e instanceof _t.RTCStrategy))&&e&&e.rtcClient.close(),i.length>=2)r=jt.default.combine(i[0],i[1]);else{if(!i.length)throw new Error(\"No compatible protocols\");[r]=i}const o={endpointIdentity:t,rtc:e};return r.addEndpoint(t.channelId,o),r}async processChannelConnection(e){const{clientIdentity:t,providerIdentity:n,ackToSender:i,payload:r,offer:o}=e.payload;t.endpointId?t.isLocalEndpointId=!1:(t.endpointId=this.wire.environment.getNextMessageId(),t.isLocalEndpointId=!0);const s=n.channelId,a=this.providerMap.get(s);if(!a)return i.payload.success=!1,i.payload.reason=`Channel \"${n.channelName}\" has been destroyed.`,this.wire.sendRaw(i);const{provider:c,strategy:d,supportedProtocols:h}=a;try{if(!(c instanceof St.ChannelProvider))throw Error(\"Cannot connect to a channel client\");const e=o??{supportedProtocols:[{type:\"classic\",version:1}],maxProtocols:1},n=this.protocolManager.getCompatibleProtocols(h,e);if(!n.length)throw new Error(\"This provider does not support any of the offered protocols.\");const s=await c.processConnection(t,r);i.payload.payload=i.payload.payload||{};let a={supportedProtocols:[],endpointPayloadPromise:Promise.resolve({endpointIdentity:t})};return a=await n.reduce((async(e,t)=>{const n=await e;if(\"rtc\"===t.type){const{answer:e,rtcClient:i,channels:r}=await Et(this,bt,\"f\").createProviderAnswer(t.payload.rtcConnectionId,t.payload.offer);n.supportedProtocols.push({type:\"rtc\",version:_t.RTCInfo.version,payload:{answer:e}}),n.endpointPayloadPromise=n.endpointPayloadPromise.then((e=>r.then((t=>({...e,rtc:{rtcClient:i,channels:t}})))))}else n.supportedProtocols.push({type:\"classic\",version:Mt.ClassicInfo.version});return n}),Promise.resolve(a)),a.endpointPayloadPromise.then((e=>d.addEndpoint(t.endpointId,e))),i.payload.payload.result=s,i.payload.payload.answer=a,this.wire.sendRaw(i)}catch(e){return i.payload.success=!1,i.payload.reason=e.message,this.wire.sendRaw(i)}}}xe.ConnectionManager=kt,Ct=new WeakMap,bt=new WeakMap;var Lt,Tt,$t,Bt=s&&s.__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},Gt=s&&s.__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)};Object.defineProperty(le,\"__esModule\",{value:!0}),le.Channel=void 0;const Wt=t,Ht=G,Nt=d,Dt=ue,Ut=xe,Vt=Qe;function zt(e){const t=Math.floor(e/10),n=Math.min(3e4,500*2**t);return new Promise((e=>{setTimeout((()=>{e(!1)}),n)}))}class Kt extends Nt.EmitterBase{constructor(e){super(e,\"channel\"),Lt.set(this,void 0),Tt.set(this,new Wt.EventEmitter),$t.set(this,new Ht.AsyncRetryableLazy((async()=>{await Promise.all([this.on(\"disconnected\",(e=>{Dt.ChannelClient.handleProviderDisconnect(e)})),this.on(\"connected\",((...e)=>{Gt(this,Tt,\"f\").emit(\"connected\",...e)}))]).catch((()=>new Error(\"error setting up channel connection listeners\")))}))),Bt(this,Lt,new Ut.ConnectionManager(e),\"f\")}async getAllChannels(){return this.wire.sendAction(\"get-all-channels\").then((({payload:e})=>e.data))}async onChannelConnect(e){await this.on(\"connected\",e)}async onChannelDisconnect(e){await this.on(\"disconnected\",e)}async safeConnect(e,t,n){const i={count:0};do{let r=()=>{};const o=new Promise((t=>{r=n=>{e===n.channelName&&t(!0)},Gt(this,Tt,\"f\").on(\"connected\",r)}));try{if(i.count>0){i.gotConnectedEvent=await Promise.race([zt(i.count),o]);const t=await this.wire.sendAction(\"connect-to-channel\",{...n,retryInfo:i});return console.log(`Successfully connected to channelName: ${e}`),t.payload.data}const t=this.wire.sendAction(\"connect-to-channel\",n);i.originalMessageId=t.messageId;return(await t).payload.data}catch(n){if(!n.message.includes(\"internal-nack\"))throw n;t&&0===i.count&&console.warn(`No channel found for channelName: ${e}. Waiting for connection...`)}finally{i.count+=1,Gt(this,Tt,\"f\").removeListener(\"connected\",r)}}while(t);throw new Error(`No channel found for channelName: ${e}.`)}async connect(e,t={}){if(await Gt(this,$t,\"f\").getValue(),!e||\"string\"!=typeof e)throw new Error(\"Please provide a channelName string to connect to a channel.\");const n={wait:!0,...this.wire.environment.getDefaultChannelOptions().connect,...t},{offer:i,rtc:r}=await Gt(this,Lt,\"f\").createClientOffer(n);let o;(this.fin.me.isFrame||this.fin.me.isView||this.fin.me.isWindow)&&(o=(await this.fin.me.getInfo()).url);const s={channelName:e,...n,offer:i,connectionUrl:o},a=await this.safeConnect(e,n.wait,s),c=await Gt(this,Lt,\"f\").createClientStrategy(r,a),d=new Dt.ChannelClient(a,(()=>Dt.ChannelClient.wireClose(this.wire,a,a.endpointId)),c);return c.onEndpointDisconnect(a.channelId,(async()=>{try{await d.sendDisconnectAction()}catch(e){console.warn(`Something went wrong during disconnect for client with uuid: ${a.uuid} / name: ${a.name} / endpointId: ${a.endpointId}.`)}finally{Dt.ChannelClient.handleProviderDisconnect(a)}})),d}async create(e,t){if(!e)throw new Error(\"Please provide a channelName to create a channel\");const{payload:{data:n}}=await this.wire.sendAction(\"create-channel\",{channelName:e}),i=Gt(this,Lt,\"f\").createProvider(t,n);return this.on(\"client-disconnected\",(t=>{t.channelName===e&&Vt.ChannelProvider.handleClientDisconnection(i,t)})),i}}le.Channel=Kt,Lt=new WeakMap,Tt=new WeakMap,$t=new WeakMap,Object.defineProperty(de,\"__esModule\",{value:!0}),de.InterAppPayload=de.InterApplicationBus=void 0;const qt=t,Jt=d,Yt=he,Zt=le,Qt=O;class Xt extends Jt.Base{constructor(e){super(e),this.events={subscriberAdded:\"subscriber-added\",subscriberRemoved:\"subscriber-removed\"},this.refCounter=new Yt.RefCounter,this.Channel=new Zt.Channel(e),this.emitter=new qt.EventEmitter,e.registerMessageHandler(this.onmessage.bind(this)),this.on=this.emitter.on.bind(this.emitter),this.removeAllListeners=this.emitter.removeAllListeners.bind(this.emitter)}async publish(e,t){await this.wire.sendAction(\"publish-message\",{topic:e,message:t,sourceWindowName:this.me.name})}async send(e,t,n){const i=(0,Qt.validateIdentity)(e);if(i)throw new Error(i);await this.wire.sendAction(\"send-message\",{destinationUuid:e.uuid,destinationWindowName:e.name,topic:t,message:n,sourceWindowName:this.me.name})}subscribe(e,t,n){const i=this.createSubscriptionKey(e.uuid,e.name||\"*\",t);return this.emitter.on(i,n),this.refCounter.actOnFirst(i,(async()=>{await this.wire.sendAction(\"subscribe\",{sourceUuid:e.uuid,sourceWindowName:e.name||\"*\",topic:t,destinationWindowName:this.me.name})}),(()=>Promise.resolve()))}unsubscribe(e,t,n){const i=e.name||\"*\",r=this.createSubscriptionKey(e.uuid,i,t);return this.emitter.removeListener(r,n),this.refCounter.actOnLast(r,(async()=>{await this.wire.sendAction(\"unsubscribe\",{sourceUuid:e.uuid,sourceWindowName:i,topic:t,destinationWindowName:this.me.name})}),(()=>new Promise((e=>e)).then((()=>{}))))}processMessage(e){const{payload:{message:t,sourceWindowName:n,sourceUuid:i,topic:r}}=e,o=[this.createSubscriptionKey(i,n,r),this.createSubscriptionKey(i,\"*\",r),this.createSubscriptionKey(\"*\",\"*\",r)],s={uuid:i,name:n};o.forEach((e=>{this.emitter.emit(e,t,s)}))}emitSubscriverEvent(e,t){const{payload:{targetName:n,uuid:i,topic:r}}=t,o={name:n,uuid:i,topic:r};this.emitter.emit(e,o)}createSubscriptionKey(e,t,n){const i=t||\"*\";if(!(e&&i&&n))throw new Error(\"Missing uuid, name, or topic string\");return function(...e){return e.map((e=>Buffer.from(`${e}`).toString(\"base64\"))).join(\"/\")}(e,i,n)}onmessage(e){const{action:t}=e;switch(t){case\"process-message\":this.processMessage(e);break;case this.events.subscriberAdded:this.emitSubscriverEvent(this.events.subscriberAdded,e);break;case this.events.subscriberRemoved:this.emitSubscriverEvent(this.events.subscriberRemoved,e)}return!0}}de.InterApplicationBus=Xt;de.InterAppPayload=class{};var en={};Object.defineProperty(en,\"__esModule\",{value:!0}),en.Clipboard=void 0;const tn=d;class nn extends tn.Base{async writeText(e){await this.wire.sendAction(\"clipboard-write-text\",e)}async readText(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-text\",{type:e});return t.data}async writeImage(e){await this.wire.sendAction(\"clipboard-write-image\",e)}async readImage(e={format:\"dataURL\"}){const{payload:t}=await this.wire.sendAction(\"clipboard-read-image\",e);return t.data}async writeHtml(e){await this.wire.sendAction(\"clipboard-write-html\",e)}async readHtml(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-html\",{type:e});return t.data}async writeRtf(e){await this.wire.sendAction(\"clipboard-write-rtf\",e)}async readRtf(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-rtf\",{type:e});return t.data}async write(e){await this.wire.sendAction(\"clipboard-write\",e)}async getAvailableFormats(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-formats\",{type:e});return t.data}}en.Clipboard=nn;var rn={},on={},sn={};Object.defineProperty(sn,\"__esModule\",{value:!0}),sn.ExternalApplication=void 0;const an=d;class cn extends an.EmitterBase{constructor(e,t){super(e,\"external-application\",t.uuid),this.identity=t}getInfo(){return this.wire.sendAction(\"get-external-application-info\",this.identity).then((({payload:e})=>e.data))}}sn.ExternalApplication=cn,Object.defineProperty(on,\"__esModule\",{value:!0}),on.ExternalApplicationModule=void 0;const dn=d,hn=sn;class ln extends dn.Base{wrap(e){return this.wire.sendAction(\"external-application-wrap\").catch((e=>{})),Promise.resolve(new hn.ExternalApplication(this.wire,{uuid:e}))}wrapSync(e){return this.wire.sendAction(\"external-application-wrap-sync\").catch((e=>{})),new hn.ExternalApplication(this.wire,{uuid:e})}}on.ExternalApplicationModule=ln,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(on,e),n(sn,e)}(rn);var un={},pn={},wn={};Object.defineProperty(wn,\"__esModule\",{value:!0}),wn._Frame=void 0;const yn=d;class fn extends yn.EmitterBase{constructor(e,t){super(e,\"frame\",t.uuid,t.name),this.identity=t}getInfo(){return this.wire.sendAction(\"get-frame-info\",this.identity).then((({payload:e})=>e.data))}getParentWindow(){return this.wire.sendAction(\"get-parent-window\",this.identity).then((({payload:e})=>e.data))}}wn._Frame=fn,Object.defineProperty(pn,\"__esModule\",{value:!0}),pn._FrameModule=void 0;const gn=d,mn=O,vn=wn;class Cn extends gn.Base{async wrap(e){this.wire.sendAction(\"frame-wrap\").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}wrapSync(e){this.wire.sendAction(\"frame-wrap-sync\").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}getCurrent(){return this.wire.sendAction(\"frame-get-current\").catch((e=>{})),Promise.resolve(new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity()))}getCurrentSync(){return this.wire.sendAction(\"frame-get-current-sync\").catch((e=>{})),new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity())}}pn._FrameModule=Cn,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(pn,e),n(wn,e)}(un);var bn={};Object.defineProperty(bn,\"__esModule\",{value:!0}),bn.GlobalHotkey=void 0;const In=d;class En extends In.EmitterBase{constructor(e){super(e,\"global-hotkey\")}async register(e,t){await this.on(e,t),await this.wire.sendAction(\"global-hotkey-register\",{hotkey:e})}async unregister(e){await this.removeAllListeners(e),await this.wire.sendAction(\"global-hotkey-unregister\",{hotkey:e})}async unregisterAll(){await Promise.all(this.eventNames().filter((e=>!(\"registered\"===e||\"unregistered\"===e))).map((e=>this.removeAllListeners(e)))),await this.wire.sendAction(\"global-hotkey-unregister-all\",{})}async isRegistered(e){const{payload:{data:t}}=await this.wire.sendAction(\"global-hotkey-is-registered\",{hotkey:e});return t}}bn.GlobalHotkey=En;var xn,An={},Pn={},Mn={},_n=s&&s.__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)};Object.defineProperty(Mn,\"__esModule\",{value:!0}),Mn.Platform=void 0;const On=d,Sn=O,Rn=new Map;class Fn extends On.EmitterBase{constructor(e,t){super(t.wire,\"application\",e.uuid),this.getClient=e=>{this.wire.sendAction(\"platform-get-client\",this.identity).catch((e=>{}));const t=e||this.identity,{uuid:n}=t;if(!Rn.has(n)){const e=_n(this,xn,\"f\").call(this,n);Rn.set(n,e)}return Rn.get(n)},xn.set(this,(async e=>{try{const t=`custom-frame-${e}`,n=await this._channel.connect(t,{wait:!1});return n.onDisconnection((()=>{Rn.delete(e)})),n}catch(t){throw Rn.delete(e),new Error(\"The targeted Platform is not currently running. Listen for application-started event for the given Uuid.\")}})),this.launchLegacyManifest=this.launchContentManifest;const n=(0,Sn.validateIdentity)(e);if(n)throw new Error(n);this._channel=t,this.identity={uuid:e.uuid},this.Layout=this.fin.Platform.Layout,this.Application=this.fin.Application.wrapSync(this.identity)}async createView(e,t,n){this.wire.sendAction(\"platform-create-view\",this.identity).catch((e=>{}));const i=await this.getClient(),r=await i.dispatch(\"create-view\",{target:t,opts:e,targetView:n});if(!r||(0,Sn.validateIdentity)(r.identity))throw new Error(`When overwriting the createView call, please return an object that has a valid 'identity' property: ${JSON.stringify(r)}`);return this.fin.View.wrapSync(r.identity)}async createWindow(e){this.wire.sendAction(\"platform-create-window\",this.identity).catch((e=>{}));const t=await this.getClient();e.reason||(e.reason=\"api-call\");const n=await t.dispatch(\"create-view-container\",e);if(!n||(0,Sn.validateIdentity)(n.identity))throw new Error(`When overwriting the createWindow call, please return an object that has a valid 'identity' property: ${JSON.stringify(n)}`);const{identity:i}=n,r=this.fin.Window.wrapSync(i);return r.name=i.name,r.uuid=i.uuid,r}async quit(){this.wire.sendAction(\"platform-quit\",this.identity).catch((e=>{}));return(await this.getClient()).dispatch(\"quit\")}async closeView(e){this.wire.sendAction(\"platform-close-view\",this.identity).catch((e=>{}));const t=await this.getClient();await t.dispatch(\"close-view\",{view:e})}async reparentView(e,t){console.warn(\"Platform.reparentView has been deprecated, please use Platform.createView\"),this.wire.sendAction(\"platform-reparent-view\",this.identity).catch((e=>{}));const n={...e,uuid:e.uuid??this.identity.uuid},i=await this.fin.View.wrap(n),r=await i.getOptions();return this.createView(r,t)}async getSnapshot(){this.wire.sendAction(\"platform-get-snapshot\",this.identity).catch((e=>{}));return(await this.getClient()).dispatch(\"get-snapshot\")}async getViewSnapshot(e){return(await this.getClient()).dispatch(\"get-view-snapshot\",{viewIdentity:e})}async applySnapshot(e,t){this.wire.sendAction(\"platform-apply-snapshot\",this.identity).catch((e=>{}));const n=\"Requested snapshot must be a valid Snapshot object, or a url or filepath to such an object.\";let i;if(\"string\"==typeof e)try{i=(await this._channel.wire.sendAction(\"get-application-manifest\",{manifestUrl:e})).payload.data}catch(e){throw new Error(`${n}: ${e}`)}else i=e;if(!i.windows)throw new Error(n);const r=await this.getClient();return await r.dispatch(\"apply-snapshot\",{snapshot:i,options:t}),this}async fetchManifest(e){return(await this.getClient()).dispatch(\"platform-fetch-manifest\",{manifestUrl:e})}async launchContentManifest(e){this.wire.sendAction(\"platform-launch-content-manifest\",this.identity).catch((()=>{}));const t=await this.getClient(),n=await this.fetchManifest(e);return t.dispatch(\"launch-into-platform\",{manifest:n,manifestUrl:e}),this}async setWindowContext(e={},t){if(this.wire.sendAction(\"platform-set-window-context\",this.identity).catch((e=>{})),!e)throw new Error(\"Please provide a serializable object or string to set the context.\");const n=await this.getClient(),{entityType:i}=t?await this.fin.System.getEntityInfo(t.uuid,t.name):this.fin.me;await n.dispatch(\"set-window-context\",{context:e,entityType:i,target:t||{uuid:this.fin.me.uuid,name:this.fin.me.name}})}async getWindowContext(e){this.wire.sendAction(\"platform-get-window-context\",this.identity).catch((e=>{}));const t=await this.getClient(),{entityType:n}=e?await this.fin.System.getEntityInfo(e.uuid,e.name):this.fin.me;return t.dispatch(\"get-window-context\",{target:e||{uuid:this.fin.me.uuid,name:this.fin.me.name},entityType:n})}async closeWindow(e,t={skipBeforeUnload:!1}){this.wire.sendAction(\"platform-close-window\",this.identity).catch((e=>{}));return(await this.getClient()).dispatch(\"close-window\",{windowId:e,options:t})}}Mn.Platform=Fn,xn=new WeakMap;var jn={},kn={},Ln={},Tn={};function $n(e){switch(e){case\"columns\":case\"grid\":case\"rows\":case\"tabs\":return!0;default:return!1}}Object.defineProperty(Tn,\"__esModule\",{value:!0}),Tn.overrideFromComposables=Tn.isValidPresetType=void 0,Tn.isValidPresetType=$n,Tn.overrideFromComposables=function(...e){return t=>e.reduceRight(((e,t)=>n=>t(e(n))),(e=>e))(t)},Tn.default={isValidPresetType:$n};var Bn={},Gn={},Wn={};Object.defineProperty(Wn,\"__esModule\",{value:!0}),Wn.ApiConsumer=void 0;Wn.ApiConsumer=class{constructor(e){this.strategy=e,this.consume=async e=>(await this.strategy.getExposedFunctions(e)).reduce(((t,n)=>({...t,[n.key]:this.strategy.createFunction(n,e)})),{})}};var Hn={},Nn={};Object.defineProperty(Nn,\"__esModule\",{value:!0}),Nn.expose=Nn.getExposedProperties=void 0;const Dn=Symbol(\"exposedProperties\");Nn.getExposedProperties=e=>e[Dn]||e.prototype[Dn]||[];Nn.expose=e=>(t,n,i)=>{t[Dn]=t[Dn]||[],t[Dn].push({key:n,descriptor:i,options:e})},Object.defineProperty(Hn,\"__esModule\",{value:!0}),Hn.ApiExposer=void 0;const Un=Nn;Hn.ApiExposer=class{constructor(e){this.strategy=e,this.exposeInstance=async(e,t)=>{const n=(0,Un.getExposedProperties)(e),i=await Promise.all(n.map((async({key:n,options:i})=>({key:n,options:await this.strategy.exposeFunction(e[n].bind(e),{key:n,options:i,meta:t})}))));await this.strategy.exposeMeta(t,i)}}};var Vn={},zn={},Kn={};Object.defineProperty(Kn,\"__esModule\",{value:!0}),Kn.ChannelsConsumer=void 0;Kn.ChannelsConsumer=class{constructor(e){this.channel=e,this.getExposedFunctions=async e=>{const{id:t}=e,{props:n}=await this.channel.dispatch(`api-meta:${t}`);return n},this.createFunction=e=>(...t)=>{const{action:n}=e.options;return this.channel.dispatch(n,{args:t})}}};var qn={};Object.defineProperty(qn,\"__esModule\",{value:!0}),qn.ChannelsExposer=void 0;qn.ChannelsExposer=class{constructor(e){this.channelProviderOrClient=e,this.exposeFunction=async(e,t)=>{const{key:n,options:i,meta:r}=t,{id:o}=r,s=`${o}.${i?.action||n}`;return await this.channelProviderOrClient.register(s,(async({args:t})=>e(...t))),{action:s}},this.exposeMeta=async({id:e},t)=>{const n=`api-meta:${e}`;await this.channelProviderOrClient.register(n,(()=>({props:t})))}}},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Kn,e),n(qn,e)}(zn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(zn,e)}(Vn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Wn,e),n(Hn,e),n(Vn,e),n(Nn,e)}(Gn);var Jn={};Object.defineProperty(Jn,\"__esModule\",{value:!0}),Jn.createRelayedDispatch=exports.relayChannelClientApi_1=Jn.relayChannelClientApi=void 0;const Yn=[\"no longer connected\",\"RTCDataChannel closed unexpectedly\",\"The client you are trying to dispatch from is disconnected from the target provider\"];exports.relayChannelClientApi_1=Jn.relayChannelClientApi=async(e,t)=>{e.register(`relay:${t}`,(({action:t,target:n,payload:i})=>e.dispatch(n,t,i))),await Promise.resolve()};Jn.createRelayedDispatch=(e,t,n,i)=>async(r,o)=>{try{return await e.dispatch(`relay:${n}`,{action:r,payload:o,target:t})}catch(e){if(s=e.message,Yn.some((e=>s.includes(e)))&&i)throw new Error(i);throw e}var s};var Zn,Qn,Xn,ei=s&&s.__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},ti=s&&s.__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)};Object.defineProperty(Bn,\"__esModule\",{value:!0}),Bn.ColumnOrRow=Bn.TabStack=Bn.LayoutNode=void 0;const ni=Gn,ii=Jn;class ri{constructor(e,t){Zn.set(this,void 0),this.isRoot=()=>ti(this,Zn,\"f\").isRoot(this.entityId),this.exists=()=>ti(this,Zn,\"f\").exists(this.entityId),this.getParent=async()=>{const e=await ti(this,Zn,\"f\").getParent(this.entityId);if(e)return ri.getEntity(e,ti(this,Zn,\"f\"))},this.createAdjacentStack=async(e,t)=>{const n=await ti(this,Zn,\"f\").createAdjacentStack(this.entityId,e,t);return ri.getEntity({entityId:n,type:\"stack\"},ti(this,Zn,\"f\"))},this.getAdjacentStacks=async e=>(await ti(this,Zn,\"f\").getAdjacentStacks({targetId:this.entityId,edge:e})).map((e=>ri.getEntity({type:\"stack\",entityId:e.entityId},ti(this,Zn,\"f\")))),ei(this,Zn,e,\"f\"),this.entityId=t}}Bn.LayoutNode=ri,Zn=new WeakMap,ri.newLayoutEntitiesClient=async(e,t,n)=>{const i=(0,ii.createRelayedDispatch)(e,n,\"layout-relay\",\"You are trying to interact with a layout component on a window that does not exist or has been destroyed.\");return new ni.ApiConsumer(new ni.ChannelsConsumer({dispatch:i})).consume({id:t})},ri.getEntity=(e,t)=>{const{entityId:n,type:i}=e;switch(i){case\"column\":case\"row\":return new si(t,n,i);case\"stack\":return new oi(t,n);default:throw new Error(`Unrecognised Layout Entity encountered ('${JSON.stringify(e)})`)}};class oi extends ri{constructor(e,t){super(e,t),Qn.set(this,void 0),this.type=\"stack\",this.getViews=()=>ti(this,Qn,\"f\").getStackViews(this.entityId),this.addView=async(e,t={index:0})=>ti(this,Qn,\"f\").addViewToStack(this.entityId,e,t),this.removeView=async e=>{await ti(this,Qn,\"f\").removeViewFromStack(this.entityId,e)},this.setActiveView=async e=>{await ti(this,Qn,\"f\").setStackActiveView(this.entityId,e)},ei(this,Qn,e,\"f\")}}Bn.TabStack=oi,Qn=new WeakMap;class si extends ri{constructor(e,t,n){super(e,t),Xn.set(this,void 0),this.getContent=async()=>(await ti(this,Xn,\"f\").getContent(this.entityId)).map((e=>ri.getEntity(e,ti(this,Xn,\"f\")))),ei(this,Xn,e,\"f\"),this.type=n}}Bn.ColumnOrRow=si,Xn=new WeakMap;var ai={};Object.defineProperty(ai,\"__esModule\",{value:!0}),ai.DEFAULT_LAYOUT_KEY=ai.LAYOUT_CONTROLLER_ID=void 0,ai.LAYOUT_CONTROLLER_ID=\"layout-entities\",ai.DEFAULT_LAYOUT_KEY=\"__default__\";var ci,di,hi,li=s&&s.__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)};Object.defineProperty(Ln,\"__esModule\",{value:!0}),Ln.Layout=void 0;const ui=G,pi=O,wi=d,yi=Tn,fi=Bn,gi=ai;class mi extends wi.Base{static getClient(e){return li(e,di,\"f\").getValue()}constructor(e,t){super(t),ci.add(this),di.set(this,new ui.Lazy((async()=>fi.LayoutNode.newLayoutEntitiesClient(await this.platform.getClient(),gi.LAYOUT_CONTROLLER_ID,this.identity)))),this.replace=async e=>{this.wire.sendAction(\"layout-replace\").catch((e=>{}));const t=await this.platform.getClient();await t.dispatch(\"replace-layout\",{target:this.identity,opts:{layout:e}})},this.replaceView=async(e,t)=>{this.wire.sendAction(\"layout-replace-view\").catch((e=>{}));const n=await this.platform.getClient();await n.dispatch(\"replace-view\",{target:this.identity,opts:{viewToReplace:e,newView:t}})},this.applyPreset=async e=>{this.wire.sendAction(\"layout-apply-preset\").catch((e=>{}));const t=await this.platform.getClient(),{presetType:n}=e;if(!n||!(0,yi.isValidPresetType)(n))throw new Error(\"Cannot apply preset layout, please include an applicable presetType property in the PresetLayoutOptions.\");await t.dispatch(\"apply-preset-layout\",{target:this.identity,opts:{presetType:n}})};const n=(0,pi.validateIdentity)(e);if(n)throw new Error(n);this.identity=e,this.platform=this.fin.Platform.wrapSync({uuid:e.uuid}),e.uuid===this.fin.me.uuid&&e.name===this.fin.me.name&&(this.init=this.fin.Platform.Layout.init)}async getConfig(){this.wire.sendAction(\"layout-get-config\").catch((e=>{}));return(await this.platform.getClient()).dispatch(\"get-frame-snapshot\",{target:this.identity})}async getCurrentViews(){this.wire.sendAction(\"layout-get-views\").catch((e=>{}));const e=await this.platform.getClient();return(await e.dispatch(\"get-layout-views\",{target:this.identity})).map((e=>this.fin.View.wrapSync(e)))}async getRootItem(){this.wire.sendAction(\"layout-get-root-item\").catch((()=>{}));const e=await li(this,di,\"f\").getValue(),t=await e.getRoot(\"layoutName\"in this.identity?this.identity:void 0);return fi.LayoutNode.getEntity(t,e)}async getStackByViewIdentity(e){this.wire.sendAction(\"layout-get-stack-by-view\").catch((()=>{}));const t=await li(this,di,\"f\").getValue(),n=await t.getStackByView(e);if(!n)throw new Error(`No stack found for view: ${e.uuid}/${e.name}`);return fi.LayoutNode.getEntity(n,t)}async addView(e,{location:t,targetView:n}={}){this.wire.sendAction(\"layout-add-view\").catch((e=>{}));const{identity:i}=await li(this,ci,\"m\",hi).call(this,\"layout-add-view\",{viewOptions:e,location:t,targetView:n});return{identity:i}}async closeView(e){this.wire.sendAction(\"layout-close-view\").catch((e=>{})),await li(this,ci,\"m\",hi).call(this,\"layout-close-view\",{viewIdentity:e})}}Ln.Layout=mi,di=new WeakMap,ci=new WeakSet,hi=async function(e,t){return(await this.platform.getClient()).dispatch(e,{target:this.identity,opts:t})};var vi,Ci,bi,Ii,Ei,xi=s&&s.__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)},Ai=s&&s.__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};Object.defineProperty(kn,\"__esModule\",{value:!0}),kn.LayoutModule=void 0;const Pi=d,Mi=Ln,_i=ai;class Oi extends Pi.Base{constructor(){super(...arguments),vi.add(this),Ci.set(this,!1),bi.set(this,null),this.init=async(e={})=>{if(this.wire.sendAction(\"layout-init\").catch((e=>{})),!this.wire.environment.layoutAllowedInContext(this.fin))throw new Error(\"Layout.init can only be called from a Window context.\");if(xi(this,Ci,\"f\"))throw new Error(\"Layout.init was already called, please use Layout.create to add additional layouts.\");\"openfin\"===this.wire.environment.type&&await this.fin.Platform.getCurrentSync().getClient(),Ai(this,Ci,!0,\"f\"),Ai(this,bi,await this.wire.environment.initLayoutManager(this.fin,this.wire,e),\"f\"),await this.wire.environment.applyLayoutSnapshot(this.fin,xi(this,bi,\"f\"),e);const t={name:this.fin.me.name,uuid:this.fin.me.uuid};if(!e.layoutManagerOverride){const e={layoutName:_i.DEFAULT_LAYOUT_KEY,...t};return xi(this,Ii,\"f\").call(this,e)}return this.wrapSync(t)},Ii.set(this,(e=>{const t=\"[Layout] You are using a deprecated property `layoutManager` - it will throw if you access it starting in v37.\",n=new Proxy({},{get(e,n){throw console.warn(`[Layout-mgr-proxy] accessing ${n.toString()}`),new Error(t)}}),i=Object.assign(this.wrapSync(e),{layoutManager:n});return new Proxy(i,{get(e,n){if(\"layoutManager\"===n)throw console.warn(`[Layout-proxy] accessing ${n.toString()}`),new Error(t);return e[n]}})})),this.getCurrentLayoutManagerSync=()=>xi(this,vi,\"m\",Ei).call(this,\"fin.Platform.Layout.getCurrentLayoutManagerSync()\"),this.create=async e=>this.wire.environment.createLayout(xi(this,vi,\"m\",Ei).call(this,\"fin.Platform.Layout.create()\"),e),this.destroy=async e=>this.wire.environment.destroyLayout(xi(this,vi,\"m\",Ei).call(this,\"fin.Platform.Layout.destroy()\"),e)}async wrap(e){return this.wire.sendAction(\"layout-wrap\").catch((e=>{})),new Mi.Layout(e,this.wire)}wrapSync(e){return this.wire.sendAction(\"layout-wrap-sync\").catch((e=>{})),new Mi.Layout(e,this.wire)}async getCurrent(){if(this.wire.sendAction(\"layout-get-current\").catch((e=>{})),\"openfin\"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error(\"You are not in a Window context. Only Windows can have a Layout.\");const{uuid:e,name:t}=this.fin.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction(\"layout-get-current-sync\").catch((e=>{})),\"openfin\"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error(\"You are not in a Window context. Only Windows can have a Layout.\");const{uuid:e,name:t}=this.fin.me;return this.wrapSync({uuid:e,name:t})}async getLayoutByViewIdentity(e){this.wire.sendAction(\"layout-get-by-view-identity\").catch((()=>{}));let t=await this.wire.environment.getViewWindowIdentity(this.fin,e);t.identity&&(t=t.identity);try{const n=this.wrapSync(t),i=await Mi.Layout.getClient(n),r=await i.getLayoutIdentityForViewOrThrow(e);return this.wrapSync(r)}catch(n){if(![\"No action registered at target for\",\"getLayoutIdentityForViewOrThrow is not a function\"].some((e=>n.message.includes(e))))throw n;if(t.uuid===t.name)throw new Error(`View identity ${JSON.stringify(e)} is not attached to any layout in provider window ${JSON.stringify(t)}.`);return this.wrapSync(t)}}}kn.LayoutModule=Oi,Ci=new WeakMap,bi=new WeakMap,Ii=new WeakMap,vi=new WeakSet,Ei=function(e){if(!xi(this,bi,\"f\"))throw new Error(`You must call init before using the API ${e}`);return xi(this,bi,\"f\")},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(kn,e),n(Ln,e)}(jn),Object.defineProperty(Pn,\"__esModule\",{value:!0}),Pn.PlatformModule=void 0;const Si=d,Ri=Mn,Fi=jn;class ji extends Si.Base{constructor(e,t){super(e),this._channel=t,this.Layout=new Fi.LayoutModule(this.wire)}async init(e){if(!fin.__internal_.isPlatform||fin.me.name!==fin.me.uuid)throw new Error(\"fin.Platform.init should only be called from a custom platform provider running in the main window of the application.\");return this.wire.environment.initPlatform(this.fin,e)}async wrap(e){return this.wire.sendAction(\"platform-wrap\").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}wrapSync(e){return this.wire.sendAction(\"platform-wrap-sync\").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}async getCurrent(){return this.wire.sendAction(\"platform-get-current\").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction(\"platform-get-current-sync\").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}start(e){return this.wire.sendAction(\"platform-start\").catch((e=>{})),new Promise((async(t,n)=>{try{const{uuid:n}=e,i=await this.fin.Application._create({...e,isPlatformController:!0});i.once(\"platform-api-ready\",(()=>t(this.wrapSync({uuid:n})))),i._run({uuid:n})}catch(e){n(e)}}))}startFromManifest(e,t){return this.wire.sendAction(\"platform-start-from-manifest\").catch((e=>{})),new Promise((async(n,i)=>{try{const i=await this.fin.Application._createFromManifest(e);i.once(\"platform-api-ready\",(()=>n(this.wrapSync({uuid:i.identity.uuid})))),i._run(t)}catch(e){i(e)}}))}}Pn.PlatformModule=ji,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Pn,e),n(Mn,e)}(An);var ki={};!function(e){Object.defineProperty(e,\"__esModule\",{value:!0}),e.getMe=e.getBaseMe=e.environmentUnsupportedMessage=void 0;const t=J(),n=un,i=ie(),r=rn;function o(e,t,n){return{...{isView:\"view\"===e,isWindow:\"window\"===e,isFrame:\"iframe\"===e,isExternal:\"external connection\"===e},uuid:t,name:n,entityType:e}}e.environmentUnsupportedMessage=\"You are not running in OpenFin.\",e.getBaseMe=o,e.getMe=function(s){const{uuid:a,name:c,entityType:d}=s.me,h={setContext(){throw new Error(e.environmentUnsupportedMessage)},addContextHandler(){throw new Error(e.environmentUnsupportedMessage)},getContextGroups(){throw new Error(e.environmentUnsupportedMessage)},joinContextGroup(){throw new Error(e.environmentUnsupportedMessage)},removeFromContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getAllClientsInContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getInfoForContextGroup(){throw new Error(e.environmentUnsupportedMessage)}},l=\"Interop API has not been instantiated. Either connection has failed or you have not declared interop in your config.\",u={setContext(){throw new Error(l)},addContextHandler(){throw new Error(l)},getContextGroups(){throw new Error(l)},joinContextGroup(){throw new Error(l)},removeFromContextGroup(){throw new Error(l)},getAllClientsInContextGroup(){throw new Error(l)},getInfoForContextGroup(){throw new Error(l)}},p={eventNames:()=>{throw new Error(e.environmentUnsupportedMessage)},emit:()=>{throw new Error(e.environmentUnsupportedMessage)},listeners:()=>{throw new Error(e.environmentUnsupportedMessage)},listenerCount:()=>{throw new Error(e.environmentUnsupportedMessage)},on:()=>{throw new Error(e.environmentUnsupportedMessage)},addListener:()=>{throw new Error(e.environmentUnsupportedMessage)},once:()=>{throw new Error(e.environmentUnsupportedMessage)},prependListener:()=>{throw new Error(e.environmentUnsupportedMessage)},prependOnceListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeAllListeners:()=>{throw new Error(e.environmentUnsupportedMessage)}};switch(d){case\"view\":return Object.assign(new t.View(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case\"window\":return Object.assign(new i._Window(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case\"iframe\":return Object.assign(new n._Frame(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case\"external connection\":return Object.assign(new r.ExternalApplication(s,{uuid:a}),o(d,a,c),{interop:u,isOpenFin:!1});default:return{...o(d,a,c),...p,interop:h,isOpenFin:!1}}}}(ki);var Li={},Ti={},$i={};Object.defineProperty($i,\"__esModule\",{value:!0}),$i.createWarningObject=$i.createUnusableObject=void 0,$i.createUnusableObject=function(e){const t=()=>{throw new Error(e)};return new Proxy({},{apply:t,construct:t,defineProperty:t,deleteProperty:t,get:t,getOwnPropertyDescriptor:t,getPrototypeOf:t,has:t,isExtensible:t,ownKeys:t,preventExtensions:t,set:t,setPrototypeOf:t})},$i.createWarningObject=function(e,t){return new Proxy(t,{get:(...t)=>(console.warn(e),Reflect.get(...t)),set:(...t)=>(console.warn(e),Reflect.set(...t)),getOwnPropertyDescriptor:(...t)=>(console.warn(e),Reflect.getOwnPropertyDescriptor(...t)),ownKeys:(...t)=>(console.warn(e),Reflect.ownKeys(...t))})};var Bi,Gi={},Wi={};var Hi={};!function(e){Object.defineProperty(e,\"__esModule\",{value:!0}),e.wrapIntentHandler=e.BROKER_ERRORS=e.generateOverrideWarning=e.generateOverrideError=e.wrapContextHandler=e.wrapInTryCatch=e.generateId=void 0;e.generateId=()=>`${Math.random()}${Date.now()}`;e.wrapInTryCatch=(e,t)=>(...n)=>{try{return e(...n)}catch(e){throw new Error((t||\"\")+e)}};e.wrapContextHandler=(e,t)=>async n=>{try{await e(n)}catch(e){throw console.error(`Error thrown by handler ${t} for context type ${n.type}: ${e}`),e}};e.generateOverrideError=(e,t)=>`You have tried to to use ${e} but ${t} has not been overridden in the Interop Broker. Please override this function. Refer to our documentation for more info.`;e.generateOverrideWarning=(e,t,n,i)=>{const{uuid:r,name:o}=n;return i?`Entity with identity: ${r}/${o} has called ${i} or ${e} but ${t} has not been overridden.`:`Entity with identity: ${r}/${o} has called ${e} but ${t} has not been overridden.`},e.BROKER_ERRORS={fireIntent:(0,e.generateOverrideError)(\"fireIntent\",\"handleFiredIntent\"),fireIntentForContext:(0,e.generateOverrideError)(\"fireIntentForContext\",\"handleFiredIntentForContext\"),getInfoForIntent:(0,e.generateOverrideError)(\"getInfoForIntent\",\"handleInfoForIntent\"),getInfoForIntentsByContext:(0,e.generateOverrideError)(\"getInfoForIntentsByContext\",\"handleInfoForIntentsByContext\"),joinSessionContextGroupWithJoinContextGroup:\"The Context Group you have tried to join is a Session Context Group. Custom Context Groups can only be defined by the Interop Broker through code or manifest configuration. Please use joinSessionContextGroup.\",fdc3Open:(0,e.generateOverrideError)(\"fdc3.open\",\"fdc3HandleOpen\"),fdc3FindInstances:(0,e.generateOverrideError)(\"fdc3.findInstances\",\"fdc3HandleFindInstances\"),fdc3GetAppMetadata:(0,e.generateOverrideError)(\"fdc3.getAppMetadata\",\"fdc3HandleGetAppMetadata\"),fdc3GetInfo:(0,e.generateOverrideError)(\"fdc3.getInfo\",\"fdc3HandleGetInfo\")};e.wrapIntentHandler=(e,t)=>async n=>{try{return e(n)}catch(e){throw console.error(`Error thrown by handler ${t}: ${e}`),e}}}(Hi);var Ni,Di,Ui={};function Vi(){if(Di)return Gi;Di=1;var e,t,n,r=s&&s.__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},o=s&&s.__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)},a=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Gi,\"__esModule\",{value:!0}),Gi.InteropBroker=void 0;const c=d,h=a(function(){if(Bi)return Wi;Bi=1,Object.defineProperty(Wi,\"__esModule\",{value:!0});const e=Cr();return Wi.default=class{constructor(e,t){this.provider=e,this.id=t,this.lastContext=void 0,this.contextGroupMap=new Map,this.clients=new Map,this.registerListeners()}registerListeners(){this.provider.register(`sessionContextGroup:getContext-${this.id}`,this.getCurrentContext.bind(this)),this.provider.register(`sessionContextGroup:setContext-${this.id}`,this.setContext.bind(this)),this.provider.register(`sessionContextGroup:handlerAdded-${this.id}`,this.handlerAdded.bind(this)),this.provider.register(`sessionContextGroup:handlerRemoved-${this.id}`,this.handlerRemoved.bind(this))}getCurrentContext(e){return e.type?this.contextGroupMap.get(e.type):this.lastContext}setContext(t,n){const{context:i}=t,r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name} not in Session Client State Map`);this.contextGroupMap.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{e.contextHandlers.get(i.type)?.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getClientState(e){return this.clients.get(e.endpointId)}async handlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(i){const e=r.contextHandlers.get(i)||[];r.contextHandlers.set(i,[...e,n]);const o=this.contextGroupMap.get(i);o&&await this.provider.dispatch(t,n,o)}else{r.globalHandler=n;const e=[...this.contextGroupMap.keys()].map((async e=>{const i=this.contextGroupMap.get(e);i&&await this.provider.dispatch(t,n,i)}));await Promise.all(e)}}handlerRemoved(e,t){const{handlerId:n}=e,i=this.clients.get(t.endpointId);i?(Array.from(i.contextHandlers).forEach((([,e])=>{const t=e.indexOf(n);t>-1&&e.splice(t,1)})),i.globalHandler===n&&(i.globalHandler=void 0)):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={contextHandlers:new Map,clientIdentity:e,globalHandler:void 0};this.clients.set(e.endpointId,t)}}onDisconnection(e){this.clients.delete(e.endpointId)}},Wi}()),l=Hi,u=a(i),p=function(){if(Ni)return Ui;Ni=1,Object.defineProperty(Ui,\"__esModule\",{value:!0}),Ui.PrivateChannelProvider=void 0;const e=Vi();return Ui.PrivateChannelProvider=class t{constructor(e,t){this.provider=e,this.id=t,this.clients=new Map,this.registerListeners(),this.contextByContextType=new Map,this.lastContext=void 0,this.provider.onConnection((e=>this.registerNewClient(e))),this.provider.onDisconnection((async e=>{const{endpointId:t}=e;this.clients.has(t)&&await this.handleClientDisconnecting(e),0===(await this.provider.getAllClientInfo()).length&&this.provider.destroy()}))}getClientState(e){return this.clients.get(e.endpointId)}registerListeners(){this.provider.register(\"broadcast\",this.broadcast.bind(this)),this.provider.register(\"getCurrentContext\",this.getCurrentContext.bind(this)),this.provider.register(\"contextHandlerAdded\",this.contextHandlerAdded.bind(this)),this.provider.register(\"contextHandlerRemoved\",this.contextHandlerRemoved.bind(this)),this.provider.register(\"nonStandardHandlerRemoved\",this.nonStandardHandlerRemoved.bind(this)),this.provider.register(\"onAddContextHandlerAdded\",this.onAddContextHandlerAdded.bind(this)),this.provider.register(\"onDisconnectHandlerAdded\",this.onDisconnectHandlerAdded.bind(this)),this.provider.register(\"onUnsubscribeHandlerAdded\",this.onUnsubscribeHandlerAdded.bind(this)),this.provider.register(\"clientDisconnecting\",((e,t)=>{this.handleClientDisconnecting(t)}))}broadcast(t,n){const{context:i}=t;if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name}, tried to call broadcast, is not connected to this Private Channel`);const r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to broadcast - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);this.contextByContextType.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{const t=e.handlerIdsByContextTypes.get(i.type);t&&t.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getCurrentContext(e,t){const{contextType:n}=e;if(!this.getClientState(t))throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call getCurrentContext, is not connected to this Private Channel`);if(void 0!==n){return this.contextByContextType.get(n)||null}return this.lastContext?this.lastContext:null}contextHandlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call addContextListener, is not connected to this Private Channel`);if(i){const e=r.handlerIdsByContextTypes.get(i)||[];r.handlerIdsByContextTypes.set(i,[...e,n])}else r.globalHandler=n;Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&e.onAddContextListenerHandlerId&&this.provider.dispatch(e.clientIdentity,e.onAddContextListenerHandlerId,i)}))}async contextHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);if(i){let e;if(i.globalHandler===n)i.globalHandler=void 0;else for(const[t,r]of i.handlerIdsByContextTypes){const i=r.indexOf(n);i>-1&&(r.splice(i,1),e=t)}const r=(await this.getConnectedClients()).map((async n=>{const{clientIdentity:i,clientIdentity:{endpointId:r},onUnsubscribeHandlerId:o}=n;r!==t.endpointId&&o&&await this.provider.dispatch(i,o,e)}));try{await Promise.all(r)}catch(e){throw console.error(`Problem when attempting to dispatch to onUnsubscribeHandlers. Error: ${e} Removing Client: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}`),new Error(e)}}else console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}.`)}nonStandardHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);i?i.onDisconnectHandlerId===n?i.onDisconnectHandlerId=void 0:i.onAddContextListenerHandlerId===n?i.onAddContextListenerHandlerId=void 0:i.onUnsubscribeHandlerId===n&&(i.onUnsubscribeHandlerId=void 0):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}onAddContextHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onAddContextListener, is not connected to this Private Channel`);n.onAddContextListenerHandlerId=i,Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&Array.from(e.handlerIdsByContextTypes.keys()).forEach((e=>{this.provider.dispatch(t,i,e)}))}))}onDisconnectHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onDisconnect, is not connected to this Private Channel`);n.onDisconnectHandlerId=i}onUnsubscribeHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onUnsubscribe, is not connected to this Private Channel`);n.onUnsubscribeHandlerId=i}removeClient(e){const t=this.getClientState(e);if(!t)throw new Error(`Client with Identity: ${e.uuid} ${e.name}, tried to call disconnect, is not connected to this Private Channel`);t.handlerIdsByContextTypes.clear(),this.clients.delete(e.endpointId)}async fireOnDisconnectForOtherClients(e){const{endpointId:t}=e,n=(await this.getConnectedClients()).map((async e=>{const{clientIdentity:{endpointId:n},onDisconnectHandlerId:i}=e;n!==t&&i&&await this.provider.dispatch(e.clientIdentity,i)}));try{await Promise.all(n)}catch(t){throw console.error(`Problem when attempting to dispatch to onDisconnectHandlers. Error: ${t} Disconnecting Client: uuid: ${e.uuid}. name: ${e.name}. endpointId: ${e.endpointId}`),new Error(t)}}async unsubscribeAll(e){const{endpointId:t}=e,n=this.clients.get(t);if(n){const t=Array.from(n.handlerIdsByContextTypes.values()).flat(),i=n.globalHandler;if(t.length>0){const n=t.map((async t=>this.contextHandlerRemoved({handlerId:t},e)));try{await Promise.all(n)}catch(e){console.error(e.message)}}if(i)try{await this.contextHandlerRemoved({handlerId:i},e)}catch(e){console.error(e.message)}}}async handleClientDisconnecting(e){await this.unsubscribeAll(e),this.removeClient(e),await this.fireOnDisconnectForOtherClients(e)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={clientIdentity:e,handlerIdsByContextTypes:new Map,globalHandler:void 0,onAddContextListenerHandlerId:void 0,onUnsubscribeHandlerId:void 0,onDisconnectHandlerId:void 0};this.clients.set(e.endpointId,t)}}async getConnectedClients(){const e=await this.provider.getAllClientInfo();return Array.from(this.clients.values()).filter((t=>{const{uuid:n,name:i}=t.clientIdentity;return e.some((e=>i===e.name&&n===e.uuid))}))}static init(e,n){return new t(e,n)}},Ui}(),w=G,y=[{id:\"green\",displayMetadata:{color:\"#00CC88\",name:\"green\"}},{id:\"purple\",displayMetadata:{color:\"#8C61FF\",name:\"purple\"}},{id:\"orange\",displayMetadata:{color:\"#FF8C4C\",name:\"orange\"}},{id:\"red\",displayMetadata:{color:\"#FF5E60\",name:\"red\"}},{id:\"pink\",displayMetadata:{color:\"#FF8FB8\",name:\"pink\"}},{id:\"yellow\",displayMetadata:{color:\"#E9FF8F\",name:\"yellow\"}}];let f=class i extends c.Base{constructor(i,s,a){super(i),e.set(this,void 0),t.set(this,void 0),n.set(this,void 0),this.getProvider=()=>o(this,n,\"f\").getValue(),this.interopClients=new Map,this.contextGroupsById=new Map,r(this,t,a.contextGroups??[...y],\"f\"),r(this,e,a.fdc3Info,\"f\"),a?.logging&&(this.logging=a.logging),this.intentClientMap=new Map,this.lastContextMap=new Map,this.sessionContextGroupMap=new Map,r(this,n,new w.Lazy(s),\"f\"),this.setContextGroupMap(),this.setupChannelProvider()}static createClosedConstructor(...e){return class extends i{constructor(...t){if(t.length){const[n,i,r]=t;if(r&&\"object\"==typeof r&&!(0,u.default)(r,e[2]))return console.warn(\"You have modified the parameters of the InteropOverride constructor. This behavior is deprecated and will be removed in a future version. You can modify these options in your manifest. Please consult our Interop docs for guidance on migrating to the new override scheme.\"),void super(e[0],e[1],r);console.warn(\"You are attempting to pass arguments to the InteropOverride constructor. This is not necessary, and these passed arguments will be ignored. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.\")}super(...e)}}}setContext({context:e},t){this.wire.sendAction(\"interop-broker-set-context\").catch((e=>{}));const n=this.getClientState(t);if(!n||!n.contextGroupId)throw n?new Error(\"You must join a context group before you can set context.\"):new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);{const{contextGroupId:t}=n;this.setContextForGroup({context:e},t)}}setContextForGroup({context:e},t){this.wire.sendAction(\"interop-broker-set-context-for-group\").catch((e=>{}));const n=this.contextGroupsById.get(t);if(!n)throw new Error(`Unable to set context for context group that isn't in the context group mapping: ${t}.`);const r=i.checkContextIntegrity(e);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(e)}`);const o=e.type;n.set(o,e),this.lastContextMap.set(t,o);Array.from(this.interopClients.values()).filter((e=>e.contextGroupId===t)).forEach((t=>{for(const[,n]of t.contextHandlers)i.isContextTypeCompatible(o,n.contextType)&&this.invokeContextHandler(t.clientIdentity,n.handlerId,e)}))}getCurrentContext(e,t){this.wire.sendAction(\"interop-broker-get-current-context\").catch((e=>{}));const n=this.getClientState(t);if(!n?.contextGroupId)throw new Error(\"You must be a member of a context group to call getCurrentContext\");const{contextGroupId:i}=n,r=this.contextGroupsById.get(i),o=this.lastContextMap.get(i),s=e?.contextType??o;return r&&s?r.get(s):void 0}async joinContextGroup({contextGroupId:e,target:t},n){if(this.wire.sendAction(\"interop-broker-join-context-group\").catch((e=>{})),this.sessionContextGroupMap.has(e))throw new Error(l.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup);if(t){i.hasEndpointId(t)&&await this.addClientToContextGroup({contextGroupId:e},t);try{const n=this.channel.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name));if(!n.length)throw new Error(`Given Identity ${t.uuid} ${t.name} is not connected to the Interop Broker.`);n.length>1&&console.warn(`More than one connection found for identity ${t.uuid} ${t.name}`);const i=[];for(const t of n)i.push(this.addClientToContextGroup({contextGroupId:e},t));await Promise.all(i)}catch(e){throw new Error(e)}}else await this.addClientToContextGroup({contextGroupId:e},n)}async addClientToContextGroup({contextGroupId:e},t){this.wire.sendAction(\"interop-broker-add-client-to-context-group\").catch((e=>{}));const n=this.getClientState(t);if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(!this.getContextGroups().find((t=>t.id===e)))throw new Error(`Attempting to join a context group that does not exist: ${e}. You may only join existing context groups.`);if(n.contextGroupId!==e){n.contextGroupId=e,await this.setCurrentContextGroupInClientOptions(t,e);const i=this.contextGroupsById.get(e);for(const[,e]of n.contextHandlers){const{contextType:n,handlerId:r}=e;if(void 0===n)i.forEach(((e,n)=>{this.invokeContextHandler(t,r,e)}));else if(i.has(n)){const e=i.get(n);e&&this.invokeContextHandler(t,r,e)}}}}async removeFromContextGroup({target:e},t){if(this.wire.sendAction(\"interop-broker-remove-from-context-group\").catch((e=>{})),e){i.hasEndpointId(e)&&await this.removeClientFromContextGroup(e);try{const t=this.channel.connections.filter((t=>t.uuid===e.uuid&&t.name===e.name));if(!t.length)throw new Error(`No connection found for given Identity ${e.uuid} ${e.name}`);t.length>1&&console.warn(`More than one connection found for identity ${e.uuid} ${e.name}`);const n=[];for(const e of t)n.push(this.removeClientFromContextGroup(e));await Promise.all(n)}catch(e){throw new Error(e)}}else await this.removeClientFromContextGroup(t)}async removeClientFromContextGroup(e){this.wire.sendAction(\"interop-broker-remove-client-from-context-group\").catch((e=>{}));const t=this.getClientState(e);t&&(t.contextGroupId=void 0),await this.setCurrentContextGroupInClientOptions(e,null)}getContextGroups(){return this.wire.sendAction(\"interop-broker-get-context-groups\").catch((e=>{})),o(this,t,\"f\").map((e=>({...e})))}getInfoForContextGroup({contextGroupId:e}){return this.wire.sendAction(\"interop-broker-get-info-for-context-group\").catch((e=>{})),this.getContextGroups().find((t=>t.id===e))}getAllClientsInContextGroup({contextGroupId:e}){this.wire.sendAction(\"interop-broker-get-all-clients-in-context-group\").catch((e=>{}));return Array.from(this.interopClients.values()).filter((t=>t.contextGroupId===e)).map((e=>e.clientIdentity))}async handleFiredIntent(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.raiseIntent\",\"InteropBroker.handleFiredIntent\",t,\"interopClient.fireIntent\");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntent)}async setIntentTarget(e,t){this.wire.sendAction(\"interop-broker-set-intent-target\").catch((e=>{}));const n=this.intentClientMap.get(t.name),i=`intent-handler-${e.name}`;if(n){const t=n.get(i);if(t){if(t.pendingIntents.push(e),t.clientIdentity&&t.isReady){const{clientIdentity:e,pendingIntents:n}=t;try{const r=n[n.length-1];await this.invokeIntentHandler(e,i,r),t.pendingIntents=[]}catch(n){console.error(`Error invoking intent handler for client ${e.uuid}/${e.name}/${e.endpointId}`),t.isReady=!1}}}else n.set(i,{isReady:!1,pendingIntents:[e]})}else{this.intentClientMap.set(t.name,new Map);const n=this.intentClientMap.get(t.name);n&&n.set(i,{isReady:!1,pendingIntents:[e]})}}async handleInfoForIntent(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.findIntent\",\"InteropBroker.handleInfoForIntent\",t,\"interopClient.getInfoForIntent\");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntent)}async handleInfoForIntentsByContext(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.findIntentsByContext\",\"InteropBroker.handleInfoForIntentsByContext\",t,\"interopClient.getInfoForIntentsByContext\");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntentsByContext)}async handleFiredIntentForContext(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.raiseIntentForContext\",\"InteropBroker.handleFiredIntentForContext\",t,\"interopClient.fireIntentForContext\");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntentForContext)}async clientDisconnected(e){}async fdc3HandleOpen({app:e,context:t},n){const i=(0,l.generateOverrideWarning)(\"fdc3.open\",\"InteropBroker.fdc3HandleOpen\",n);throw console.warn(i),new Error(l.BROKER_ERRORS.fdc3Open)}async fdc3HandleFindInstances(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.open\",\"InteropBroker.fdc3HandleFindInstances\",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3FindInstances)}async fdc3HandleGetAppMetadata(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.getAppMetadata\",\"InteropBroker.fdc3HandleGetAppMetadata\",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3GetAppMetadata)}async invokeContextHandler(e,t,n){const i=await this.getProvider();try{await i.dispatch(e,t,n)}catch(i){console.error(`Error invoking context handler ${t} for context type ${n.type} in client ${e.uuid}/${e.name}/${e.endpointId}`,i)}}async invokeIntentHandler(e,t,n){const i=await this.getProvider();await i.dispatch(e,t,n)}async fdc3HandleGetInfo(t,n){const{fdc3Version:i}=t;return{fdc3Version:i,...o(this,e,\"f\"),optionalFeatures:{OriginatingAppMetadata:!1,UserChannelMembershipAPIs:!0},appMetadata:{appId:\"\",instanceId:\"\"}}}async getAllClientInfo(){return(await this.getProvider()).getAllClientInfo()}decorateSnapshot(e){return{...e,interopSnapshotDetails:{contextGroupStates:this.getContextGroupStates()}}}applySnapshot(e,t){const n=e?.interopSnapshotDetails?.contextGroupStates;n&&(t?.closeExistingWindows||this.updateExistingClients(n),this.rehydrateContextGroupStates(n))}updateExistingClients(e){this.interopClients.forEach((t=>{const{clientIdentity:n,contextGroupId:r,contextHandlers:o}=t;if(r){const t=e[r];for(const[,e]of Object.entries(t))o.forEach((t=>{const{handlerId:r,contextType:o}=t;i.isContextTypeCompatible(e.type,o)&&this.invokeContextHandler(n,r,e)}))}}))}getContextGroupStates(){return i.toObject(this.contextGroupsById)}rehydrateContextGroupStates(e){const t=Object.entries(e);for(const[e,n]of t){const t=Object.entries(n);for(const[n,i]of t)if(this.contextGroupsById.has(e)){this.contextGroupsById.get(e).set(n,i)}else console.warn(`Attempting to set a context group that isn't in the context group mapping. Skipping context group rehydration for: ${e}`)}}contextHandlerRegistered({contextType:e,handlerId:t},n){const i={contextType:e,handlerId:t},r=this.getClientState(n);if(r?.contextHandlers.set(t,i),r&&r.contextGroupId){const{contextGroupId:i}=r,o=this.contextGroupsById.get(i);if(void 0===e)o.forEach(((e,i)=>{this.invokeContextHandler(n,t,e)}));else if(o.has(e)){const i=o.get(e);i&&this.invokeContextHandler(n,t,i)}}}async intentHandlerRegistered(e,t){const{handlerId:n}=e,i=this.intentClientMap.get(t.name),r=i?.get(n);if(i)if(r){const{pendingIntents:e}=r;r.clientIdentity=t,r.isReady=!0;try{if(e.length>0){const i=e[e.length-1];await this.invokeIntentHandler(t,n,i),r.pendingIntents=[]}}catch(e){console.error(`Error invoking intent handler: ${n} for client ${t.uuid}/${t.name}/${t.endpointId}`)}}else i.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t});else{this.intentClientMap.set(t.name,new Map);const e=this.intentClientMap.get(t.name);e&&e.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t})}}removeContextHandler({handlerId:e},t){const n=this.getClientState(t);n&&n.contextHandlers.delete(e)}handleJoinSessionContextGroup({sessionContextGroupId:e},t){try{if(!e)throw new Error(\"Failed to join session context group: must specify group id.\");const n=this.sessionContextGroupMap.get(e);if(n)n.registerNewClient(t);else{const n=new h.default(this.channel,e);n.registerNewClient(t),this.sessionContextGroupMap.set(e,n)}return{hasConflict:this.contextGroupsById.has(e)}}catch(e){throw new Error(e)}}getClientState(e){return this.interopClients.get(e.endpointId)}static toObject(e){const t=Object.fromEntries(e),n={};return Object.entries(t).forEach((([e,t])=>{const i=Object.fromEntries(t);n[e]=i})),n}static checkContextIntegrity(e){if(!e)return{isValid:!1,reason:\"No context supplied\"};if(\"object\"!=typeof e)return{isValid:!1,reason:\"Context must be an Object\"};if(!e.type)return{isValid:!1,reason:\"Context must have a type property\"};if(e.id&&\"object\"!=typeof e.id)return{isValid:!1,reason:\"Context id must be an Object populated with key-value identifiers (if set)\"};if(e.id){const{id:t}=e,n=Object.keys(t);let i=!1;if(!n.length)return{isValid:!1,reason:\"Context id must have at least one key-value identifier\"};if(n.forEach((e=>{\"string\"==typeof e&&\"string\"==typeof t[e]||(i=!0)})),i)return{isValid:!1,reason:\"Context id key-value identifiers must be of type string\"}}return e.name&&\"string\"!=typeof e.name?{isValid:!1,reason:\"Context name must be of string type (if set)\"}:{isValid:!0}}static hasEndpointId(e){return void 0!==e.endpointId}static isContextTypeCompatible(e,t){return void 0===t||e===t}setContextGroupMap(){for(const e of this.getContextGroups())this.contextGroupsById.set(e.id,new Map)}async setCurrentContextGroupInClientOptions(e,t){try{const n=await this.fin.System.getEntityInfo(e.uuid,e.name);let i;\"view\"===n.entityType?i=await this.fin.View.wrap(e):\"window\"===n.entityType&&(i=await this.fin.Window.wrap(e)),i&&await i.updateOptions({interop:{currentContextGroup:t}})}catch(e){}}async setupChannelProvider(){try{const e=await this.getProvider();this.channel=e,this.wireChannel(e)}catch(e){throw new Error(`Error setting up Interop Broker Channel Provider: ${e}`)}}wireChannel(e){e.onConnection((async(e,t)=>{if(!await this.isConnectionAuthorized(e,t))throw new Error(`Connection not authorized for ${e.uuid}, ${e.name}`);if(!e.endpointId)throw new Error(\"Version too old to be compatible with Interop. Please upgrade your runtime to a more recent version.\");const n={contextGroupId:void 0,contextHandlers:new Map,clientIdentity:e};t?.currentContextGroup&&this.contextGroupsById.has(t.currentContextGroup)&&(n.contextGroupId=t?.currentContextGroup),this.interopClients.set(e.endpointId,n)})),e.onDisconnection((e=>{this.interopClients.delete(e.endpointId);const t=this.intentClientMap.get(e.name);t&&e.uuid===this.fin.me.uuid&&t.forEach((e=>{e.isReady=!1})),this.sessionContextGroupMap.forEach((t=>{t.onDisconnection(e)})),this.clientDisconnected(e)})),e.beforeAction((async(e,t,n)=>{if(!await this.isActionAuthorized(e,t,n))throw new Error(`Action (${e}) not authorized for ${n.uuid}, ${n.name}`);this.logging?.beforeAction?.enabled&&console.log(e,t,n)})),e.afterAction(((e,t,n)=>{this.logging?.afterAction?.enabled&&console.log(e,t,n)})),e.register(\"setContext\",this.setContext.bind(this)),e.register(\"fireIntent\",this.handleFiredIntent.bind(this)),e.register(\"getCurrentContext\",this.getCurrentContext.bind(this)),e.register(\"getInfoForIntent\",this.handleInfoForIntent.bind(this)),e.register(\"getInfoForIntentsByContext\",this.handleInfoForIntentsByContext.bind(this)),e.register(\"fireIntentForContext\",this.handleFiredIntentForContext.bind(this)),e.register(\"getContextGroups\",this.getContextGroups.bind(this)),e.register(\"joinContextGroup\",this.joinContextGroup.bind(this)),e.register(\"removeFromContextGroup\",this.removeFromContextGroup.bind(this)),e.register(\"getAllClientsInContextGroup\",this.getAllClientsInContextGroup.bind(this)),e.register(\"getInfoForContextGroup\",this.getInfoForContextGroup.bind(this)),e.register(\"contextHandlerRegistered\",this.contextHandlerRegistered.bind(this)),e.register(\"intentHandlerRegistered\",this.intentHandlerRegistered.bind(this)),e.register(\"removeContextHandler\",this.removeContextHandler.bind(this)),e.register(\"sessionContextGroup:createIfNeeded\",this.handleJoinSessionContextGroup.bind(this)),e.register(\"fdc3Open\",this.fdc3HandleOpen.bind(this)),e.register(\"fdc3v2FindIntentsByContext\",this.handleInfoForIntentsByContext.bind(this)),e.register(\"fdc3FindInstances\",this.fdc3HandleFindInstances.bind(this)),e.register(\"fdc3GetAppMetadata\",this.fdc3HandleGetAppMetadata.bind(this)),e.register(\"fdc3v2GetInfo\",(async(e,t)=>this.fdc3HandleGetInfo.bind(this)(e,t))),e.register(\"createPrivateChannelProvider\",(async e=>{const{channelId:t}=e,n=await this.fin.InterApplicationBus.Channel.create(t);p.PrivateChannelProvider.init(n,t)}))}isConnectionAuthorized(e,t){return this.wire.sendAction(\"interop-broker-is-connection-authorized\").catch((e=>{})),Promise.resolve(!0)}isActionAuthorized(e,t,n){return this.wire.sendAction(\"interop-broker-is-action-authorized\").catch((e=>{})),Promise.resolve(!0)}};return Gi.InteropBroker=f,e=new WeakMap,t=new WeakMap,n=new WeakMap,Gi}var zi,Ki={},qi={},Ji=s&&s.__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},Yi=s&&s.__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)};Object.defineProperty(qi,\"__esModule\",{value:!0});const Zi=d,Qi=Hi;class Xi extends Zi.Base{constructor(e,t,n){super(e),zi.set(this,void 0),this.id=n,Ji(this,zi,t,\"f\")}async setContext(e){this.wire.sendAction(\"interop-session-context-group-set-context\").catch((e=>{}));return(await Yi(this,zi,\"f\")).dispatch(`sessionContextGroup:setContext-${this.id}`,{sessionContextGroupId:this.id,context:e})}async getCurrentContext(e){this.wire.sendAction(\"interop-session-context-group-get-context\").catch((e=>{}));return(await Yi(this,zi,\"f\")).dispatch(`sessionContextGroup:getContext-${this.id}`,{sessionContextGroupId:this.id,type:e})}async addContextHandler(e,t){if(this.wire.sendAction(\"interop-session-context-group-add-handler\").catch((e=>{})),\"function\"!=typeof e)throw new Error(\"Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.\");const n=await Yi(this,zi,\"f\");let i;return i=t?`sessionContextHandler:invoke-${this.id}-${t}-${(0,Qi.generateId)()}`:`sessionContextHandler:invoke-${this.id}`,n.register(i,(0,Qi.wrapContextHandler)(e,i)),await n.dispatch(`sessionContextGroup:handlerAdded-${this.id}`,{handlerId:i,contextType:t}),{unsubscribe:await this.createUnsubscribeCb(i)}}async createUnsubscribeCb(e){const t=await Yi(this,zi,\"f\");return async()=>{t.remove(e),await t.dispatch(`sessionContextGroup:handlerRemoved-${this.id}`,{handlerId:e})}}getUserInstance(){return{id:this.id,setContext:(0,Qi.wrapInTryCatch)(this.setContext.bind(this),\"Failed to set context: \"),getCurrentContext:(0,Qi.wrapInTryCatch)(this.getCurrentContext.bind(this),\"Failed to get context: \"),addContextHandler:(0,Qi.wrapInTryCatch)(this.addContextHandler.bind(this),\"Failed to add context handler: \")}}}qi.default=Xi,zi=new WeakMap;var er={},tr={},nr={},ir={},rr=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),or=s&&s.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,\"default\",{enumerable:!0,value:t})}:function(e,t){e.default=t}),sr=s&&s.__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)&&rr(t,e,n);return or(t,e),t};Object.defineProperty(ir,\"__esModule\",{value:!0}),ir.PrivateChannelClient=void 0;const ar=sr(Hi);var cr,dr;function hr(){if(cr)return tr;cr=1;var e,t=s&&s.__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)},n=s&&s.__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},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(tr,\"__esModule\",{value:!0}),tr.FDC3ModuleBase=void 0;const o=nr,a=Hi,c=wr(),d=r(i);return tr.FDC3ModuleBase=class{get client(){return t(this,e,\"f\").call(this)}get fin(){return this.wire.getFin()}constructor(t,i){this.wire=i,e.set(this,void 0),n(this,e,t,\"f\")}async broadcast(e){return this.wire.sendAction(\"fdc3-broadcast\").catch((e=>{})),this.client.setContext(e)}async _open(e,t){this.wire.sendAction(\"fdc3-open\").catch((e=>{}));try{return await c.InteropClient.ferryFdc3Call(this.client,\"fdc3Open\",{app:e,context:t})}catch(e){const t=e.message===a.BROKER_ERRORS.fdc3Open?\"ResolverUnavailable\":e.message;throw new Error(t)}}async _getChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:\"system\",...(0,o.getUnsupportedChannelApis)()})))}async getOrCreateChannel(e){this.wire.sendAction(\"fdc3-get-or-create-channel\").catch((e=>{}));const t=(await this._getChannels()).find((t=>t.id===e));if(t)return{...t,type:\"system\",...(0,o.getUnsupportedChannelApis)()};try{const t=await this.client.joinSessionContextGroup(e);return(0,o.buildAppChannelObject)(t)}catch(e){throw console.error(e.message),new Error(o.ChannelError.CreationFailed)}}async getSystemChannels(){return this.wire.sendAction(\"fdc3-get-system-channels\").catch((e=>{})),this._getChannels()}async joinChannel(e){this.wire.sendAction(\"fdc3-join-channel\").catch((e=>{}));try{return await this.client.joinContextGroup(e)}catch(e){if(e.message===a.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup?console.error(\"The Channel you have tried to join is an App Channel. Custom Channels can only be defined by the Interop Broker through code or manifest configuration. Please use getOrCreateChannel.\"):console.error(e.message),e.message.startsWith(\"Attempting to join a context group that does not exist\"))throw new Error(o.ChannelError.NoChannelFound);throw new Error(o.ChannelError.AccessDenied)}}async getCurrentChannel(){this.wire.sendAction(\"fdc3-get-current-channel\").catch((e=>{}));const e=await this.getCurrentContextGroupInfo();return e?this.buildChannelObject(e):null}async leaveCurrentChannel(){return this.wire.sendAction(\"fdc3-leave-current-channel\").catch((e=>{})),this.client.removeFromContextGroup()}async getCurrentContextGroupInfo(){const e=await this.client.getContextGroups(),t=e.map((async e=>this.client.getAllClientsInContextGroup(e.id))),n=(await Promise.all(t)).findIndex((e=>e.some((e=>{const{uuid:t,name:n}=e;return this.wire.me.uuid===t&&this.wire.me.name===n}))));return e[n]}async buildChannelObject(e){return{...e,type:\"system\",addContextListener:(...[e,t])=>{let n,i;\"function\"==typeof e?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),n=e):(n=t,\"string\"==typeof e&&(i=e));const r=(async()=>{let e=!0;const t=await this.client.getCurrentContext(i);return this.client.addContextHandler(((i,r)=>{if(!e||(e=!1,!(0,d.default)(t,i)))return n(i,r)}),i)})();return{...r,unsubscribe:()=>r.then((e=>e.unsubscribe()))}},broadcast:this.broadcast.bind(this),getCurrentContext:async e=>{const t=await this.client.getCurrentContext(e);return void 0===t?null:t}}}},e=new WeakMap,tr}ir.PrivateChannelClient=class{constructor(e,t){this.id=t,this.client=e,this.listeners=new Map}async broadcast(e){return this.client.dispatch(\"broadcast\",{context:e})}async getCurrentContext(e){return this.client.dispatch(\"getCurrentContext\",{contextType:e})}async addContextListener(e,t){if(\"function\"!=typeof t)throw new Error(\"Non-function argument passed to the second parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.\");let n;n=e?`contextHandler:invoke-${this.id}-${e}-${ar.generateId()}`:`contextHandler:invoke-${this.id}-${ar.generateId()}`,this.client.register(n,ar.wrapContextHandler(t,n));const i={unsubscribe:await this.createContextUnsubscribeCb(n)};return this.listeners.set(n,i),await this.client.dispatch(\"contextHandlerAdded\",{handlerId:n,contextType:e}),i}createNonStandardUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch(\"nonStandardHandlerRemoved\",{handlerId:e})}}createContextUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch(\"contextHandlerRemoved\",{handlerId:e})}}onAddContextListener(e){const t=`onContextHandlerAdded:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch(\"onAddContextHandlerAdded\",{handlerId:t}),n}onDisconnect(e){const t=`onDisconnect:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch(\"onDisconnectHandlerAdded\",{handlerId:t}),n}onUnsubscribe(e){const t=`onUnsubscribe:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch(\"onUnsubscribeHandlerAdded\",{handlerId:t}),n}async cleanUpAllSubs(){Array.from(this.listeners.keys()).forEach((e=>{this.client.remove(e),this.listeners.delete(e)}))}async disconnect(){try{await this.client.dispatch(\"clientDisconnecting\"),await this.cleanUpAllSubs(),await this.client.disconnect()}catch(e){throw new Error(e.message)}}},function(e){var t=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,\"__esModule\",{value:!0}),e.getIntentResolution=e.isChannel=e.isContext=e.connectPrivateChannel=e.buildAppChannelObject=e.buildPrivateChannelObject=e.ChannelError=e.ResultError=e.UnsupportedChannelApiError=e.getUnsupportedChannelApis=void 0;const n=Hi,r=ir,o=t(i);e.getUnsupportedChannelApis=e=>({addContextListener:()=>{throw new a(\"Channel.addContextListener\",e)},broadcast:()=>{throw new a(\"Channel.broadcast\",e)},getCurrentContext:()=>{throw new a(\"Channel.getCurrentContext\",e)}});class a extends Error{constructor(e,t=\"System\"){super(e),this.message=`Calling ${e} on an instance of a ${t} Channel returned by fdc3.get${t}Channels is not supported. If you would like to use a ${t} Channel, please use fdc3.joinChannel, fdc3.addContextListener, and fdc3.broadcast instead.`}}var c,d;e.UnsupportedChannelApiError=a,function(e){e.NoResultReturned=\"NoResultReturned\",e.IntentHandlerRejected=\"IntentHandlerRejected\"}(c=e.ResultError||(e.ResultError={})),(d=e.ChannelError||(e.ChannelError={})).NoChannelFound=\"NoChannelFound\",d.AccessDenied=\"AccessDenied\",d.CreationFailed=\"CreationFailed\";e.buildPrivateChannelObject=e=>{let t=!1;const n=()=>{if(t)throw new Error(\"Private Channel Client has been disconnected from the Private Channel\")};return{id:e.id,type:\"private\",broadcast:async t=>(n(),e.broadcast(t)),getCurrentContext:async t=>(n(),e.getCurrentContext(t)),addContextListener:async(t,i)=>{n();let r=i,o=t;\"function\"==typeof t&&(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),r=t,o=null);return e.addContextListener(o,r)},onAddContextListener:t=>(n(),e.onAddContextListener(t)),disconnect:async()=>(n(),t=!0,e.disconnect()),onDisconnect:t=>(n(),e.onDisconnect(t)),onUnsubscribe:t=>(n(),e.onUnsubscribe(t))}};e.buildAppChannelObject=e=>({id:e.id,type:\"app\",broadcast:e.setContext,getCurrentContext:async t=>{const n=await e.getCurrentContext(t);return void 0===n?null:n},addContextListener:(t,n)=>{let i,r;\"function\"==typeof t?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),i=t):(i=n,\"string\"==typeof t&&(r=t));const s=(async()=>{let t=!0;const n=await e.getCurrentContext(r);return e.addContextHandler(((e,r)=>{if(!t||(t=!1,!(0,o.default)(n,e)))return i(e,r)}),r)})();return{...s,unsubscribe:()=>s.then((e=>e.unsubscribe()))}}});e.connectPrivateChannel=async t=>{try{const n=await fin.InterApplicationBus.Channel.connect(t),i=new r.PrivateChannelClient(n,t);return(0,e.buildPrivateChannelObject)(i)}catch(e){throw new Error(`Private Channel with id: ${t} doesn't exist`)}};e.isContext=e=>{if(e&&\"object\"==typeof e&&\"type\"in e){const{type:t}=e;return\"string\"==typeof t}return!1};e.isChannel=e=>{if(e&&\"object\"==typeof e&&\"type\"in e&&\"id\"in e){const{type:t,id:n}=e;return\"string\"==typeof t&&\"string\"==typeof n&&(\"app\"===t||\"private\"===t)}return!1};e.getIntentResolution=async(t,i,r,o)=>{const s=(0,n.generateId)(),a=new Promise(((e,t)=>{fin.InterApplicationBus.subscribe({uuid:\"*\"},s,(t=>{e(t)})).catch((()=>t(new Error(\"getResult is not supported in this environment\"))))})),d=r?{target:r,intentResolutionResultId:s}:{intentResolutionResultId:s},h=o?{name:o,context:i,metadata:d}:{...i,metadata:d},l=async()=>{let n=await a;if(!n||\"object\"!=typeof n)throw new Error(c.NoResultReturned);const{error:i}=n;if(i)throw new Error(c.IntentHandlerRejected);if((0,e.isChannel)(n)){const{id:i,type:r}=n;switch(r){case\"private\":n=await(0,e.connectPrivateChannel)(i);break;case\"app\":{const r=await t.joinSessionContextGroup(i);n=(0,e.buildAppChannelObject)(r);break}}}else if(!(0,e.isContext)(n))throw new Error(c.NoResultReturned);return n},u=o?await t.fireIntent(h):await t.fireIntentForContext(h);return\"object\"!=typeof u?{source:{appId:\"\",instanceId:\"\"},intent:\"\",version:\"2.0\",getResult:l}:{...u,getResult:l}}}(nr);var lr,ur,pr={};function wr(){if(ur)return Ki;ur=1;var e,t,n=s&&s.__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},i=s&&s.__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)},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ki,\"__esModule\",{value:!0}),Ki.InteropClient=void 0;const o=d,a=r(qi),c=function(){if(dr)return er;dr=1,Object.defineProperty(er,\"__esModule\",{value:!0}),er.Fdc3Module=void 0;const e=Hi,t=hr();class n extends t.FDC3ModuleBase{async open(e,t){await super._open(e,t)}addContextListener(e,t){let n;return this.wire.sendAction(\"fdc3-add-context-listener\").catch((e=>{})),\"function\"==typeof e?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),n=this.client.addContextHandler(e)):n=this.client.addContextHandler(t,null===e?void 0:e),{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}addIntentListener(e,t){this.wire.sendAction(\"fdc3-add-intent-listener\").catch((e=>{}));const n=this.client.registerIntentHandler((e=>{const{context:n,metadata:i}=e,{metadata:r}=n,o=i?.intentResolutionResultId||r?.intentResolutionResultId;o&&this.fin.InterApplicationBus.publish(o,null).catch((()=>null)),t(e.context)}),e,{fdc3Version:\"1.2\"});return{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}async raiseIntent(t,n,i){this.wire.sendAction(\"fdc3-raise-intent\").catch((e=>{}));const r=i?{name:t,context:n,metadata:{target:i}}:{name:t,context:n};try{return await this.client.fireIntent(r)}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntent?\"ResolverUnavailable\":t.message;throw new Error(n)}}async findIntent(t,n){this.wire.sendAction(\"fdc3-find-intent\").catch((e=>{}));try{return await this.client.getInfoForIntent({name:t,context:n})}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntent?\"ResolverUnavailable\":t.message;throw new Error(n)}}async findIntentsByContext(t){this.wire.sendAction(\"fdc3-find-intents-by-context\").catch((e=>{}));try{return await this.client.getInfoForIntentsByContext(t)}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntentsByContext?\"ResolverUnavailable\":t.message;throw new Error(n)}}async raiseIntentForContext(t,n){this.wire.sendAction(\"fdc3-raise-intent-for-context\").catch((e=>{}));try{return await this.client.fireIntentForContext({...t,metadata:{target:n}})}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntentForContext?\"ResolverUnavailable\":t.message;throw new Error(n)}}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}getInfo(){return this.wire.sendAction(\"fdc3-get-info\").catch((e=>{})),{providerVersion:this.wire.environment.getAdapterVersionSync(),provider:`openfin-${this.wire.me.uuid}`,fdc3Version:\"1.2\"}}}return er.Fdc3Module=n,er}(),h=function(){if(lr)return pr;lr=1,Object.defineProperty(pr,\"__esModule\",{value:!0}),pr.Fdc3Module2=void 0;const e=hr(),t=Hi,n=wr(),i=nr,r=ir;class o extends e.FDC3ModuleBase{async open(e,t){return\"string\"==typeof e&&console.warn(\"Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).\"),super._open(e,t)}async findInstances(e){this.wire.sendAction(\"fdc3-find-instances\").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,\"fdc3FindInstances\",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3FindInstances?\"ResolverUnavailable\":e.message;throw new Error(n)}}async getAppMetadata(e){this.wire.sendAction(\"fdc3-get-app-metadata\").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,\"fdc3GetAppMetadata\",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3GetAppMetadata?\"ResolverUnavailable\":e.message;throw new Error(n)}}async addContextListener(e,t){this.wire.sendAction(\"fdc3-add-context-listener\").catch((e=>{}));const n=e=>t=>{const{contextMetadata:n,...i}=t,r=n?[{...i},n]:[t,null];e(...r)};let i=t,r=n(i);return\"function\"==typeof e?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),i=e,r=n(i),this.client.addContextHandler(r)):this.client.addContextHandler(r,null===e?void 0:e)}async findIntent(e,n,i){this.wire.sendAction(\"fdc3-find-intent\").catch((e=>{}));try{return await this.client.getInfoForIntent({name:e,context:n,metadata:{resultType:i}})}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntent?\"ResolverUnavailable\":e.message;throw new Error(n)}}async findIntentsByContext(e,i){this.wire.sendAction(\"fdc3-find-intents-by-context\").catch((e=>{}));const r=i?{context:e,metadata:{resultType:i}}:e;try{return await n.InteropClient.ferryFdc3Call(this.client,\"fdc3v2FindIntentsByContext\",r)}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntentsByContext?\"ResolverUnavailable\":e.message;throw new Error(n)}}async raiseIntent(e,n,r){this.wire.sendAction(\"fdc3-raise-intent\").catch((e=>{}));try{return\"string\"==typeof r&&console.warn(\"Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).\"),(0,i.getIntentResolution)(this.client,n,r,e)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?\"ResolverUnavailable\":e.message;throw new Error(n)}}async raiseIntentForContext(e,n){this.wire.sendAction(\"fdc3-raise-intent-for-context\").catch((e=>{}));try{return\"string\"==typeof n&&console.warn(\"Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).\"),(0,i.getIntentResolution)(this.client,e,n)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?\"ResolverUnavailable\":e.message;throw new Error(n)}}async addIntentListener(e,t){if(this.wire.sendAction(\"fdc3-add-intent-listener\").catch((e=>{})),\"string\"!=typeof e)throw new Error(\"First argument must be an Intent name\");return this.client.registerIntentHandler((async e=>{let n,i;const{context:r,metadata:o}=e,{contextMetadata:s,metadata:a,...c}=r,d=o?.intentResolutionResultId||a?.intentResolutionResultId;try{const e=a?{metadata:a,...c}:{...c};n=await t(e,s),i=n}catch(e){n=e,i={error:!0}}if(d&&this.fin.InterApplicationBus.publish(d,i).catch((()=>null)),n instanceof Error)throw new Error(n.message);return n}),e,{fdc3Version:\"2.0\"})}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}async createPrivateChannel(){const e=(0,t.generateId)();await n.InteropClient.ferryFdc3Call(this.client,\"createPrivateChannelProvider\",{channelId:e});const o=await this.fin.InterApplicationBus.Channel.connect(e),s=new r.PrivateChannelClient(o,e);return(0,i.buildPrivateChannelObject)(s)}async getUserChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:\"user\",...(0,i.getUnsupportedChannelApis)(\"User\")})))}async getSystemChannels(){return console.warn(\"This API has been deprecated. Please use fdc3.getUserChannels instead.\"),super.getSystemChannels()}async joinUserChannel(e){return super.joinChannel(e)}async joinChannel(e){return console.warn(\"This API has been deprecated. Please use fdc3.joinUserChannel instead.\"),super.joinChannel(e)}async getCurrentChannel(){const e=await super.getCurrentChannel();return e?{...e,type:\"user\",broadcast:this.broadcast.bind(this)}:null}async getInfo(){return n.InteropClient.ferryFdc3Call(this.client,\"fdc3v2GetInfo\",{fdc3Version:\"2.0\"})}}return pr.Fdc3Module2=o,pr}(),l=Hi;let u=class extends o.Base{constructor(i,r){super(i),e.set(this,void 0),t.set(this,void 0),n(this,t,new Map,\"f\"),n(this,e,r,\"f\")}async setContext(t){this.wire.sendAction(\"interop-client-set-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"setContext\",{context:t})}async addContextHandler(t,n){if(this.wire.sendAction(\"interop-client-add-context-handler\").catch((e=>{})),\"function\"!=typeof t)throw new Error(\"Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.\");const r=await i(this,e,\"f\");let o;o=n?`invokeContextHandler-${n}-${(0,l.generateId)()}`:\"invokeContextHandler\";const s=(0,l.wrapContextHandler)(t,o);return r.register(o,s),await r.dispatch(\"contextHandlerRegistered\",{handlerId:o,contextType:n}),{unsubscribe:async()=>{r.remove(o),await r.dispatch(\"removeContextHandler\",{handlerId:o})}}}async getContextGroups(){this.wire.sendAction(\"interop-client-get-context-groups\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getContextGroups\")}async joinContextGroup(t,n){this.wire.sendAction(\"interop-client-join-context-group\").catch((e=>{}));const r=await i(this,e,\"f\");if(!t)throw new Error(\"No contextGroupId specified for joinContextGroup.\");return r.dispatch(\"joinContextGroup\",{contextGroupId:t,target:n})}async removeFromContextGroup(t){this.wire.sendAction(\"interop-client-remove-from-context-group\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"removeFromContextGroup\",{target:t})}async getAllClientsInContextGroup(t){this.wire.sendAction(\"interop-client-get-all-clients-in-context-group\").catch((e=>{}));const n=await i(this,e,\"f\");if(!t)throw new Error(\"No contextGroupId specified for getAllClientsInContextGroup.\");return n.dispatch(\"getAllClientsInContextGroup\",{contextGroupId:t})}async getInfoForContextGroup(t){this.wire.sendAction(\"interop-client-get-info-for-context-group\").catch((e=>{}));const n=await i(this,e,\"f\");if(!t)throw new Error(\"No contextGroupId specified for getInfoForContextGroup.\");return n.dispatch(\"getInfoForContextGroup\",{contextGroupId:t})}async fireIntent(t){this.wire.sendAction(\"interop-client-fire-intent\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"fireIntent\",t)}async registerIntentHandler(t,n,r){this.wire.sendAction(\"interop-client-register-intent-handler\").catch((e=>{}));const o=await i(this,e,\"f\"),s=`intent-handler-${n}`,a=(0,l.wrapIntentHandler)(t,s);try{await o.register(s,a),await o.dispatch(\"intentHandlerRegistered\",{handlerId:s,...r})}catch(e){throw new Error(\"Unable to register intent handler\")}return{unsubscribe:async()=>{o.remove(s)}}}async getCurrentContext(t){this.wire.sendAction(\"interop-client-get-current-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getCurrentContext\",{contextType:t})}async getInfoForIntent(t){this.wire.sendAction(\"interop-client-get-info-for-intent\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getInfoForIntent\",t)}async getInfoForIntentsByContext(t){this.wire.sendAction(\"interop-client-get-info-for-intents-by-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getInfoForIntentsByContext\",t)}async fireIntentForContext(t){this.wire.sendAction(\"interop-client-fire-intent-for-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"fireIntentForContext\",t)}async joinSessionContextGroup(n){try{const r=i(this,t,\"f\").get(n);if(r)return r.getUserInstance();const o=await i(this,e,\"f\"),{hasConflict:s}=await o.dispatch(\"sessionContextGroup:createIfNeeded\",{sessionContextGroupId:n});s&&console.warn(`A (non-session) context group with the name \"${n}\" already exists. If you are trying to join a Context Group, call joinContextGroup instead.`);const c=new a.default(this.wire,i(this,e,\"f\"),n);return i(this,t,\"f\").set(n,c),c.getUserInstance()}catch(e){throw console.error(`Error thrown trying to create Session Context Group with id \"${n}\": ${e}`),e}}async onDisconnection(t){this.wire.sendAction(\"interop-client-add-ondisconnection-listener\").catch((e=>{}));return(await i(this,e,\"f\")).onDisconnection((e=>{const{uuid:n}=e;t({type:\"interop-broker\",topic:\"disconnected\",brokerName:n})}))}getFDC3Sync(e){switch(e){case\"1.2\":return new c.Fdc3Module((()=>this),this.wire);case\"2.0\":return new h.Fdc3Module2((()=>this),this.wire);default:throw new Error(`Invalid FDC3 version provided: ${e}. Must be '1.2' or '2.0'`)}}async getFDC3(e){return this.getFDC3Sync(e)}static async ferryFdc3Call(t,n,r){return(await i(t,e,\"f\")).dispatch(n,r||null)}};return Ki.InteropClient=u,e=new WeakMap,t=new WeakMap,Ki}var yr,fr,gr,mr={};function vr(){if(yr)return mr;yr=1,Object.defineProperty(mr,\"__esModule\",{value:!0}),mr.overrideCheck=mr.checkFDC32Overrides=mr.getDefaultViewFdc3VersionFromAppInfo=void 0;const e=Vi();function t(t){return[\"fdc3HandleFindInstances\",\"handleInfoForIntent\",\"handleInfoForIntentsByContext\",\"fdc3HandleGetAppMetadata\",\"fdc3HandleGetInfo\",\"fdc3HandleOpen\",\"handleFiredIntent\",\"handleFiredIntentForContext\"].filter((n=>t[n]===e.InteropBroker.prototype[n]))}return mr.getDefaultViewFdc3VersionFromAppInfo=function({manifest:e,initialOptions:t}){const n=e?.platform?.defaultViewOptions?.fdc3InteropApi??t.defaultViewOptions?.fdc3InteropApi;return[\"1.2\",\"2.0\"].includes(n??\"\")?n:void 0},mr.checkFDC32Overrides=t,mr.overrideCheck=function(e,n){if(n&&\"2.0\"===n){const n=t(e);n.length>0&&console.warn(`WARNING: FDC3 2.0 has been set as a default option for Views in this Platform, but the required InteropBroker APIs for FDC3 2.0 compliance have not all been overridden.\\nThe following APIs need to be overridden:\\n${n.join(\"\\n\")}`)}},mr}function Cr(){return gr||(gr=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),i=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),i(function(){if(fr)return Ti;fr=1;var e=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ti,\"__esModule\",{value:!0}),Ti.InteropModule=void 0;const t=e(n),i=$i,r=d,o=Vi(),a=wr(),c=vr(),h=Tn,l=e=>new e,u=\"You have attempted to use or modify InteropBroker parameters, which is not allowed. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.\";class p extends r.Base{async init(e,n=l){this.wire.sendAction(\"interop-init\").catch((()=>{}));const r=await this.wire.environment.getInteropInfo(this.wire.getFin()),s=(0,i.createUnusableObject)(u),a=(0,i.createWarningObject)(u,(0,t.default)(r)),d=async()=>{throw new Error(u)},p=o.InteropBroker.createClosedConstructor(this.wire,(()=>this.fin.InterApplicationBus.Channel.create(`interop-broker-${e}`)),r);let w;return w=Array.isArray(n)?new((0,h.overrideFromComposables)(...n)(p))(s,d,a):await n(p,s,d,a),(0,c.overrideCheck)(w,r.fdc3Version),w}connectSync(e,t){return this.wire.sendAction(\"interop-connect-sync\").catch((()=>{})),new a.InteropClient(this.wire,this.wire.environment.whenReady().then((()=>this.fin.InterApplicationBus.Channel.connect(`interop-broker-${e}`,{payload:t}))))}}return Ti.InteropModule=p,Ti}(),e),i(wr(),e),i(Vi(),e)}(Li)),Li}var br={},Ir={},Er={},xr={};Object.defineProperty(xr,\"__esModule\",{value:!0}),xr.getSnapshotSourceChannelName=void 0;xr.getSnapshotSourceChannelName=e=>`snapshot-source-provider-${e.uuid}`;var Ar,Pr,Mr,_r,Or,Sr=s&&s.__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},Rr=s&&s.__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)};Object.defineProperty(Er,\"__esModule\",{value:!0}),Er.SnapshotSource=void 0;const Fr=d,jr=xr,kr=new Map;class Lr extends Fr.Base{constructor(e,t){super(e),Ar.set(this,void 0),Pr.set(this,(()=>(kr.has(this.identity.uuid)||kr.set(this.identity.uuid,{eventFired:null,clientPromise:null}),kr.get(this.identity.uuid)))),Mr.set(this,(()=>(Rr(this,Pr,\"f\").call(this).clientPromise||(Rr(this,Pr,\"f\").call(this).clientPromise=Rr(this,_r,\"f\").call(this)),Rr(this,Pr,\"f\").call(this).clientPromise))),_r.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);try{Rr(this,Pr,\"f\").call(this).eventFired||await Rr(this,Or,\"f\").call(this);const t=await this.fin.InterApplicationBus.Channel.connect(e,{wait:!1});return t.onDisconnection((()=>{Rr(this,Pr,\"f\").call(this).clientPromise=null,Rr(this,Pr,\"f\").call(this).eventFired=null})),t}catch(e){throw Rr(this,Pr,\"f\").call(this).clientPromise=null,new Error(\"The targeted SnapshotSource is not currently initialized. Await this object's ready() method.\")}})),Or.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);let t,n;const i=new Promise(((e,i)=>{t=e,n=i}));Rr(this,Pr,\"f\").call(this).eventFired=i;const r=async i=>{try{i.channelName===e&&(t(),await this.fin.InterApplicationBus.Channel.removeListener(\"connected\",r))}catch(e){n(e)}};await this.fin.InterApplicationBus.Channel.on(\"connected\",r)})),Sr(this,Ar,t,\"f\")}get identity(){return Rr(this,Ar,\"f\")}async ready(){this.wire.sendAction(\"snapshot-source-ready\").catch((e=>{}));try{await Rr(this,Mr,\"f\").call(this)}catch(e){await Rr(this,Pr,\"f\").call(this).eventFired}}async getSnapshot(){this.wire.sendAction(\"snapshot-source-get-snapshot\").catch((e=>{}));const e=await Rr(this,Mr,\"f\").call(this),t=await e.dispatch(\"get-snapshot\");return(await t).snapshot}async applySnapshot(e){this.wire.sendAction(\"snapshot-source-apply-snapshot\").catch((e=>{}));return(await Rr(this,Mr,\"f\").call(this)).dispatch(\"apply-snapshot\",{snapshot:e})}}Er.SnapshotSource=Lr,Ar=new WeakMap,Pr=new WeakMap,Mr=new WeakMap,_r=new WeakMap,Or=new WeakMap,Object.defineProperty(Ir,\"__esModule\",{value:!0}),Ir.SnapshotSourceModule=void 0;const Tr=d,$r=Er,Br=xr;class Gr extends Tr.Base{async init(e){if(this.wire.sendAction(\"snapshot-source-init\").catch((e=>{})),\"object\"!=typeof e||\"function\"!=typeof e.getSnapshot||\"function\"!=typeof e.applySnapshot)throw new Error(\"you must pass in a valid SnapshotProvider\");const t=await this.fin.InterApplicationBus.Channel.create((0,Br.getSnapshotSourceChannelName)(this.fin.me));t.register(\"get-snapshot\",(async()=>({snapshot:await e.getSnapshot()}))),t.register(\"apply-snapshot\",(({snapshot:t})=>e.applySnapshot(t)))}wrapSync(e){return this.wire.sendAction(\"snapshot-source-wrap-sync\").catch((e=>{})),new $r.SnapshotSource(this.wire,e)}async wrap(e){return this.wire.sendAction(\"snapshot-source-wrap\").catch((e=>{})),this.wrapSync(e)}}Ir.SnapshotSourceModule=Gr,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Ir,e),n(Er,e)}(br),Object.defineProperty(a,\"__esModule\",{value:!0});var Wr=a.Fin=void 0;const Hr=t,Nr=c,Dr=ie(),Ur=Z(),Vr=de,zr=en,Kr=rn,qr=un,Jr=bn,Yr=J(),Zr=An,Qr=ki,Xr=Cr(),eo=br;class to extends Hr.EventEmitter{constructor(e){super(),this.wire=e,this.System=new Nr.System(e),this.Window=new Dr._WindowModule(e),this.Application=new Ur.ApplicationModule(e),this.InterApplicationBus=new Vr.InterApplicationBus(e),this.Clipboard=new zr.Clipboard(e),this.ExternalApplication=new Kr.ExternalApplicationModule(e),this.Frame=new qr._FrameModule(e),this.GlobalHotkey=new Jr.GlobalHotkey(e),this.Platform=new Zr.PlatformModule(e,this.InterApplicationBus.Channel),this.View=new Yr.ViewModule(e),this.Interop=new Xr.InteropModule(e),this.SnapshotSource=new eo.SnapshotSourceModule(e),e.registerFin(this),this.me=(0,Qr.getMe)(e),e.on(\"disconnected\",(()=>{this.emit(\"disconnected\")}))}}Wr=a.Fin=to;var no={},io={};function ro(e){return\"string\"==typeof e.manifestUrl}function oo(e){return ao(e)&&\"string\"==typeof e.address}function so(e){return oo(e)&&\"string\"==typeof e.token}function ao(e){return\"string\"==typeof e.uuid}function co(e){return e.runtime&&\"string\"==typeof e.runtime.version}function ho(e){return ao(e)&&co(e)}Object.defineProperty(io,\"__esModule\",{value:!0}),io.isInternalConnectConfig=io.isPortDiscoveryConfig=io.isNewConnectConfig=io.isConfigWithReceiver=io.isRemoteConfig=io.isExistingConnectConfig=io.isExternalConfig=void 0,io.isExternalConfig=ro,io.isExistingConnectConfig=oo,io.isRemoteConfig=so,io.isConfigWithReceiver=function(e){return\"object\"==typeof e.receiver&&so({...e,address:\"\"})},io.isNewConnectConfig=ho,io.isPortDiscoveryConfig=function(e){return ro(e)&&co(e)||ho(e)},io.isInternalConnectConfig=function(e){return oo(e)||ho(e)};var lo={},uo={};Object.defineProperty(uo,\"__esModule\",{value:!0}),uo.EmitterMap=void 0;const po=t;function wo(e){return Buffer.from(e).toString(\"base64\")}uo.EmitterMap=class{constructor(){this.storage=new Map}hashKeys(e){return e.map(wo).join(\"/\")}getOrCreate(e){const t=this.hashKeys(e);return this.storage.has(t)||this.storage.set(t,new po.EventEmitter),this.storage.get(t)}has(e){return this.storage.has(this.hashKeys(e))}delete(e){const t=this.hashKeys(e);return this.storage.delete(t)}},Object.defineProperty(lo,\"__esModule\",{value:!0});const yo=uo;class fo extends yo.EmitterMap{constructor(){super(...arguments),this.dispatchEvent=e=>{if(function(e){return\"process-desktop-event\"===e.action}(e)){const{payload:t}=e,n=function(e){const{topic:t}=e;if(\"frame\"===t||\"window\"===t||\"view\"===t){const{uuid:n,name:i}=e;return[t,n,i]}if(\"application\"===t){const{uuid:n}=e;return[t,n]}return[t]}(t);if(this.has(n))return this.getOrCreate(n).emit(t.type,t),!0}return!1}}}lo.default=fo;var go,mo,vo=s&&s.__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},Co=s&&s.__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)},bo=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(no,\"__esModule\",{value:!0});var Io=no.Transport=void 0;const Eo=t,xo=io,Ao=g,Po=bo(lo),Mo=ki,_o=ke;class Oo extends Eo.EventEmitter{constructor(e,t,n){super(),this.wireListeners=new Map,this.topicRefMap=new Map,this.eventAggregator=new Po.default,this.messageHandlers=[this.eventAggregator.dispatchEvent],go.set(this,void 0),mo.set(this,void 0),this.connectSync=()=>{Co(this,go,\"f\").connectSync()},this.getPort=()=>Co(this,go,\"f\").getPort(),vo(this,go,new e(this.onmessage.bind(this)),\"f\"),this.environment=t,this.sendRaw=Co(this,go,\"f\").send.bind(Co(this,go,\"f\")),this.registerMessageHandler(this.handleMessage.bind(this)),Co(this,go,\"f\").on(\"disconnected\",(()=>{for(const[,{handleNack:e}]of this.wireListeners)e({reason:\"Remote connection has closed\"});this.wireListeners.clear(),this.emit(\"disconnected\")}));const{uuid:i,name:r}=n,o=this.environment.getCurrentEntityType();this.me=(0,Mo.getBaseMe)(o,i,r)}getFin(){if(!Co(this,mo,\"f\"))throw new Error(\"No Fin object registered for this transport\");return Co(this,mo,\"f\")}registerFin(e){if(Co(this,mo,\"f\"))throw new Error(\"Fin object has already been registered for this transport\");vo(this,mo,e,\"f\")}shutdown(){return Co(this,go,\"f\").shutdown()}async connect(e){if((0,xo.isConfigWithReceiver)(e))return await Co(this,go,\"f\").connect(e.receiver),this.authorize(e);if((0,xo.isRemoteConfig)(e))return this.connectRemote(e);if((0,xo.isExistingConnectConfig)(e))return this.connectByPort(e);if((0,xo.isNewConnectConfig)(e)){const t=await this.environment.retrievePort(e);return this.connectByPort({...e,address:`ws://localhost:${t}`})}}async connectRemote(e){return await Co(this,go,\"f\").connect(new(this.environment.getWsConstructor())(e.address)),this.authorize(e)}async connectByPort(e){const{address:t,uuid:n}=e,i={...e,type:\"file-token\"},r=Co(this,go,\"f\");await r.connect(new(this.environment.getWsConstructor())(e.address));const o=await this.sendAction(\"request-external-authorization\",{uuid:n,type:\"file-token\"},!0);if(\"external-authorization-response\"!==o.action)throw new Ao.UnexpectedActionError(o.action);return await this.environment.writeToken(o.payload.file,o.payload.token),this.authorize(i)}async authorize(e){const t=await this.sendAction(\"request-authorization\",e,!0);if(\"authorization-response\"!==t.action)throw new Ao.UnexpectedActionError(t.action);if(!0!==t.payload.success)throw new Ao.RuntimeError(t.payload)}sendAction(e,t={},n=!1){let i=()=>{};const r=Ao.RuntimeError.getCallSite(1),o=this.environment.getNextMessageId(),s=new Promise(((s,a)=>{i=a;const c={action:e,payload:t,messageId:o},d=Co(this,go,\"f\");return this.addWireListener(o,s,(e=>this.nackHandler(e,a,r)),n),d.send(c).catch(a)}));return Object.assign(s,{cancel:i,messageId:o})}nackHandler(e,t,n){t(\"string\"==typeof e?e:new Ao.RuntimeError(e,n))}ferryAction(e){return new Promise(((t,n)=>{const i=this.environment.getNextMessageId();e.messageId=i;const r=e=>{t(e.payload)};return Co(this,go,\"f\").send(e).then((()=>this.addWireListener(i,r,(e=>this.nackHandler(e,n)),!1))).catch(n)}))}registerMessageHandler(e){this.messageHandlers.push(e)}addWireListener(e,t,n,i){i?this.uncorrelatedListener=t:this.wireListeners.has(e)?n({reason:\"Duplicate handler id\",error:(0,_o.errorToPOJO)(new Ao.DuplicateCorrelationError(String(e)))}):this.wireListeners.set(e,{resolve:t,handleNack:n})}onmessage(e){for(const t of this.messageHandlers)t.call(null,e)}handleMessage(e){const t=e.correlationId||NaN;if(\"correlationId\"in e){if(!this.wireListeners.has(t))return!1;{const{resolve:n,handleNack:i}=this.wireListeners.get(t);\"ack\"!==e.action?i({reason:\"Did not receive ack action\",error:(0,_o.errorToPOJO)(new Ao.NoAckError(e.action))}):\"payload\"in e?e.payload.success?n.call(null,e):i(e.payload):\"string\"==typeof e.reason?i(e):(console.warn(\"Received invalid response from core\",e),i({reason:\"invalid response shape\"})),this.wireListeners.delete(t)}}else this.uncorrelatedListener&&this.uncorrelatedListener.call(null,e),this.uncorrelatedListener=()=>{};return!0}}Io=no.Transport=Oo,go=new WeakMap,mo=new WeakMap;const So=(...e)=>({log:(...t)=>console.debug(`[${(new Date).toISOString()}]`,...(e=>e.map((e=>`[${e}]`)))(e),...t),getLogger:(...t)=>So(...e,...t)}),Ro=So(\"@openfin/core-web/client\");function Fo(e,t){if(!function(e){return\"string\"==typeof e}(e))throw new Error(`Property ${t} has invalid type. Expected string, got ${typeof e}.`)}const jo=\"web-broker-ports-ready\",ko=Ro.getLogger(\"get-web-interop-ports\");function Lo(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)}function To(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}\"function\"==typeof SuppressedError&&SuppressedError;const $o=e=>{var n,i,r;return r=class extends t.EventEmitter{constructor(t){super(),n.set(this,void 0),i.set(this,!1),this.connectSync=()=>{Lo(this,i,\"f\")||(e.addEventListener(\"message\",(e=>{e.data?.topic?.startsWith(\"wire-message\")&&e.data.message&&Lo(this,n,\"f\").call(this,{...JSON.parse(e.data.message),ports:e.ports})})),e.start())},this.connect=async()=>{this.connectSync()},this.send=t=>(e.postMessage({topic:\"wire-message\",message:JSON.stringify(t)}),Promise.resolve()),this.shutdown=async()=>{e.close()},To(this,n,t,\"f\")}getPort(){return e}},n=new WeakMap,i=new WeakMap,r};var Bo={},Go={};Object.defineProperty(Go,\"__esModule\",{value:!0}),Go.BaseEnvironment=void 0;const Wo=vr();Go.BaseEnvironment=class{async getViewWindowIdentity(e,t){const{identity:n}=await e.View.wrapSync(t).getCurrentWindow();return n}async getInteropInfo(e){const t=await e.Application.getCurrentSync().getInfo().catch((()=>null)),n=t?.initialOptions?.interopBrokerConfiguration??{};return{fdc3Version:t?(0,Wo.getDefaultViewFdc3VersionFromAppInfo)(t):void 0,...n,fdc3Info:{providerVersion:await e.System.getVersion(),provider:\"OpenFin\"}}}},Object.defineProperty(Bo,\"__esModule\",{value:!0});var Ho=Bo.BrowserEnvironment=void 0;const No=Go;class Do extends No.BaseEnvironment{constructor(){super(...arguments),this.type=\"other\",this.getRandomId=()=>{const e=new Uint32Array(1);return window.crypto.getRandomValues(e)[0].toString(32)}}getAdapterVersionSync(){return\"\"}observeBounds(e,t){throw new Error(\"Method not implemented.\")}layoutAllowedInContext(e){return!1}initLayoutManager(e,t,n){throw new Error(\"Method not implemented.\")}applyLayoutSnapshot(e,t,n){throw new Error(\"Method not implemented.\")}createLayout(e,t){throw new Error(\"Method not implemented.\")}destroyLayout(e,t){throw new Error(\"Method not implemented.\")}resolveLayout(e,t){throw new Error(\"Method not implemented.\")}initPlatform(...e){throw new Error(\"Method not implemented.\")}writeToken(e,t){return Promise.resolve(\"\")}retrievePort(e){throw new Error(\"Method not implemented.\")}getNextMessageId(){return this.getRandomId()}createChildContent(e){throw new Error(\"Method not implemented.\")}getWebWindow(e){throw new Error(\"Method not implemented.\")}getCurrentEntityIdentity(){throw new Error(\"Method not implemented.\")}getCurrentEntityType(){return\"external connection\"}raiseEvent(e,t){throw new Error(\"Method not implemented.\")}getUrl(){return location.href}getDefaultChannelOptions(){return{create:{},connect:{}}}getRtcPeer(){return new RTCPeerConnection}getWsConstructor(){return WebSocket}whenReady(){return Promise.resolve()}}Ho=Bo.BrowserEnvironment=Do;const Uo=e=>\"platform\"in e&&void 0!==e.platform;var Vo,zo;class Ko extends Ho{constructor(e){super(),this.connectConfig=e,Vo.set(this,void 0),zo.set(this,new W((async()=>Promise.resolve().then((function(){return require(\"./main-b14f67c9.js\")}))))),Uo(e)&&this.validatePlatformOptions(e)}getAdapterVersionSync(){return\"0.39.21\"}validatePlatformOptions({platform:e}){if(!(\"layoutSnapshot\"in e))throw new Error(\"Platform options are missing layoutSnapshot. Please provide a layoutSnapshot in the platform options.\");if(\"windows\"in e||\"windows\"in e.layoutSnapshot)throw new Error(\"It appears you tried to call connect() with a snapshot object from an OpenFin desktop environment. Note that connect() expects to be called with a platform property with this structure: { platform: { layoutSnapshot } }. To get a layoutSnapshot of the expected structure, use fin.Platform.Layout.getCurrentLayoutManagerSync().getLayoutSnapshot() in v34+ in your desktop environment.\");const{layouts:t}=e.layoutSnapshot;Object.entries(t).map((([e,t])=>{if(\"object\"!=typeof t||null===t)throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must be an object.`);if(!(\"content\"in t))throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must contain a 'content' property.`)}))}async getInteropInfo(e){return{...{contextGroups:void 0,logging:{beforeAction:{enabled:!1},afterAction:{enabled:!1}}},fdc3Version:void 0,fdc3Info:{providerVersion:\"0.39.21\",provider:\"OpenFin Web\"}}}layoutAllowedInContext(e){return!0}async initLayoutManager(e,t,n){if(Lo(this,Vo,\"f\"))throw new Error(\"Layout already initialized.\");if(!Uo(this.connectConfig))throw new Error(\"Platform options are missing from connection config.\");const{WebLayoutEntryPoint:i}=await Lo(this,zo,\"f\").getValue();return To(this,Vo,new i(this.connectConfig),\"f\"),await Lo(this,Vo,\"f\").initLayoutManager(e,t,n)}async applyLayoutSnapshot(e,t,n){Lo(this,Vo,\"f\")?.applyLayoutSnapshot(e,t,n)}async createLayout(e,t){return Lo(this,Vo,\"f\")?.createLayout(e,t)}async destroyLayout(e,t){return Lo(this,Vo,\"f\")?.destroyLayout(e,t)}async getViewWindowIdentity(e,t){return Promise.resolve({uuid:t.uuid,name:t.uuid})}}Vo=new WeakMap,zo=new WeakMap;const qo=()=>{const e=((e,t)=>{const n=new RegExp(`^${t}<(?.*)>$`).exec(e)?.groups?.meta;if(n)try{return JSON.parse(atob(n))}catch(e){throw new Error(`Failed to decode JSON from ${n}.`)}})(window.name,\"of-frame\");if(e)try{const{name:t,uuid:n,brokerUrl:i,providerId:r,contextGroup:o}=e;return Fo(i,\"brokerUrl\"),Fo(n,\"uuid\"),Fo(t,\"name\"),{identity:{name:t,uuid:n},brokerUrl:i,interopConfig:{providerId:r,currentContextGroup:o}}}catch(e){throw new Error(`Unexpected error occurred when inferring platform information: ${e.stack}`)}},Jo=()=>{const e=r.v4();return{uuid:e,name:e}},Yo=async e=>{if(\"enabled\"===e.connectionInheritance){const t=await(async e=>{const t=qo();if(t){const{validateOptions:n=(()=>!0)}=e,{identity:i,...r}=t;if(!await n(r))throw new Error(\"Parent options were rejected by validateOptions.\");return t}})(e);if(t)return t}if(!e.options){const t=\"enabled\"===e.connectionInheritance?\"Broker URL was not specified nor provided by a platform container.\":\"Connection inheritance is disabled but no options were provided.\";throw new Error(t)}return{...e.options,identity:Jo()}};exports.__classPrivateFieldGet=Lo,exports.__classPrivateFieldSet=To,exports.apiExposer=Gn,exports.commonjsGlobal=s,exports.connect=async t=>{try{Ro.log(\"Establishing connection\",t);const{brokerUrl:n,identity:i,timeout:r,interopConfig:s}=await Yo(t),{workerPort:a,iframeBrokerPort:c}=await(async(e,t,n)=>{const{origin:i}=new URL(e),r=document.createElement(\"IFRAME\");let s;r.style.display=\"none\";try{return await new Promise(((a,c)=>{const d=e=>{if(e.source===r.contentWindow&&e.data?.topic===`ack-${jo}`){if(e.origin!==i)c(new Error(`Broker redirected to unexpected origin ${e.origin}, expected ${i}.`));else if(e.data.success){const[t,n]=e.ports;a({iframeBrokerPort:t,workerPort:n})}else c(new m(e.data));window.removeEventListener(\"message\",d),clearTimeout(s)}};window.addEventListener(\"message\",d),ko.log(`Connecting to broker ${e}`),r.setAttribute(\"src\",e),r.setAttribute(\"name\",o(t,\"of-broker\")),document.body.appendChild(r),ko.log(\"Iframe loaded, awaiting init message from iframe\"),n&&(s=setTimeout((()=>{window.removeEventListener(\"message\",d),document.body.removeChild(r),c(new Error(\"Worker did not initialize in time\"))}),n))}))}catch(e){throw new Error(`Failed to initialise Fin Web Client. ${e.message}`,{cause:e})}})(n,i,r);Ro.log(\"Successfully established connection to shared worker\");const d={entityType:\"external connection\",...i};a.start(),c.start();const h=((t,n,i)=>{const r=$o(n),o=new Ko(t),s=new Io(r,o,i);return s.connectSync(),window.Buffer=e.Buffer,new Wr(s)})(t,a,d);return s?.providerId&&(h.me.interop=h.Interop.connectSync(s.providerId),s?.currentContextGroup&&h.me.interop.joinContextGroup(s.currentContextGroup).catch((e=>{console.warn(`Error joining specified context group: ${s?.currentContextGroup}, continuing`,e)}))),{...h,me:{...h.me,identity:{uuid:h.me.uuid,name:h.me.name}}}}catch(e){throw new Error(`An error occured during web-interop connection: ${e.message}`)}},exports.decorators=Nn,exports.encodeOptions=o,exports.layout_constants=ai,exports.lazy=G;\n","\"use strict\";var t=require(\"./main-8cad4070.js\"),e=require(\"uuid\");require(\"buffer/\"),require(\"events\"),require(\"lodash/cloneDeep\"),require(\"lodash/isEqual\");var i={},n={};Object.defineProperty(n,\"__esModule\",{value:!0}),n.mapValuesAsync=n.mapEntriesAsync=void 0;const o=(t,[e,i])=>({...t,[e]:i});async function s(t,e){return(await Promise.all(e.map((async([e,i])=>[e,await t(i,e)])))).reduce(o,{})}n.mapEntriesAsync=s,n.mapValuesAsync=async function(t,e){let i;return i=e instanceof Map?[...e.entries()]:Object.entries(e),s(t,i)};var r,a,l,h,d=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldSet||function(t,e,i,n,o){if(\"m\"===n)throw new TypeError(\"Private method is not writable\");if(\"a\"===n&&!o)throw new TypeError(\"Private accessor was defined without a setter\");if(\"function\"==typeof e?t!==e||!o:!e.has(t))throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");return\"a\"===n?o.call(t,i):o?o.value=i:e.set(t,i),i},c=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldGet||function(t,e,i,n){if(\"a\"===i&&!n)throw new TypeError(\"Private accessor was defined without a getter\");if(\"function\"==typeof e?t!==e||!n:!e.has(t))throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");return\"m\"===i?n:\"a\"===i?n.call(t):n?n.value:e.get(t)};Object.defineProperty(i,\"__esModule\",{value:!0});var m=i.DefaultLayoutManager=void 0;const u=n;class p{constructor(t){a.set(this,void 0),l.set(this,new Map),d(this,a,t,\"f\")}size(){return c(this,l,\"f\").size}async applyLayoutSnapshot({layouts:t}){if(Object.keys(t).length>1)throw new Error(\"[LayoutManager] Tried to call applyLayoutSnapshot with more than 1 layout. When implementing multiple layouts via overridden LayoutManager class, you must override and fully implement the applyLayoutSnapshot method without calling super.applyLayoutSnapshot().\");const[[e,i]]=Object.entries(t);await p.createLayout(this,{layoutName:e,layout:i})}async showLayout({layoutName:t}){}async getLayoutSnapshot(){return{layouts:await(0,u.mapValuesAsync)((t=>t.getFrameSnapshot()),c(this,l,\"f\"))}}async removeLayout({layoutName:t}){}getLayoutIdentityForView(t){const e=[...c(this,l,\"f\").values()].find((e=>e.getCurrentViews().some((e=>e.name===t.name&&e.uuid===t.uuid))));return e?.identity??void 0}isLayoutVisible({layoutName:t}){return c(p,r,\"m\",h).call(p,this,t).isVisible()}resolveLayoutIdentity(t){if(t&&\"layoutName\"in t)return t;const e=[...c(this,l,\"f\").values()];if(1===e.length)return e[0].identity;const i=e.find((t=>t.isVisible()));return i?.identity??void 0}static async resolveLayout(t,e){const i=t.resolveLayoutIdentity(e);if(void 0===i||!(\"layoutName\"in i))throw new Error(\"[layout-manager] resolveLayout: Could not resolve the layout identity. Make sure you include 'layoutName' in the identity object.\");return c(p,r,\"m\",h).call(p,t,i.layoutName)}static async handleSharedView(t,e,i){await(0,u.mapValuesAsync)((async t=>{if(t.identity.layoutName!==e.layoutName){const e=t.getCurrentViews().find((t=>t.name===i.name));e&&await t.onViewDetached({viewIdentity:e,target:null}).catch(console.error)}}),c(t,l,\"f\"))}static async handleLastViewRemoved(t,e){await t.removeLayout(e),await c(t,a,\"f\").handleLastViewRemoved(t)}static async destroyLayout(t,{layoutName:e}){await c(p,r,\"m\",h).call(p,t,e).destroy(),c(t,l,\"f\").delete(e)}static async createLayout(t,e){const{layoutName:i}=e;if(c(t,l,\"f\").has(i))throw new Error(`Layout name ${i} already exists`);await c(t,a,\"f\").createLayout(e,t)}static registerLayout(t,e,i){c(t,l,\"f\").set(e,i)}static getAllLayouts(t){return[...c(t,l,\"f\").values()]}static setInitialSnapshot(t,e){c(t,a,\"f\").setInitialSnapshot(e)}static createClosedConstructor(...t){return class extends p{constructor(){super(...t)}}}}m=i.DefaultLayoutManager=p,r=p,a=new WeakMap,l=new WeakMap,h=function(t,e){const i=c(t,l,\"f\").get(e);if(!i)throw new Error(`[layout-manager] getLayoutByName: Could not locate layout with name '${e}'`);return i};var g={},f={},v={};Object.defineProperty(v,\"__esModule\",{value:!0}),v.ReversibleMap=void 0;v.ReversibleMap=class{constructor(){this.valueToKey=new Map,this.keyToValue=new Map,this.setUnique=(t,e)=>{if(this.hasKey(t)||this.hasValue(e))throw new Error(\"Key or value already in the map.\");this.keyToValue.set(t,e),this.valueToKey.set(e,t)},this.getKey=t=>{const e=this.valueToKey.get(t);if(!e)throw new Error(\"Value not found in the map.\");return e},this.deleteKey=t=>{const e=this.getValue(t);return this.keyToValue.delete(t),this.valueToKey.delete(e),e},this.deleteValue=t=>{const e=this.getKey(t);return this.keyToValue.delete(e),this.valueToKey.delete(t),e},this.hasKey=t=>this.keyToValue.has(t),this.hasValue=t=>this.valueToKey.has(t)}getValue(t){const e=this.keyToValue.get(t);if(!e)throw new Error(\"Key not found in the map.\");return e}},Object.defineProperty(f,\"__esModule\",{value:!0});var _=f.LayoutContentCache=void 0;const y=t.lazy,C=v;class w{constructor(){this.contentItemCache=new C.ReversibleMap,this.contentItemCacheId=0,this.createCacheKey=()=>{const t=`entity-${this.contentItemCacheId.toString()}`;return this.contentItemCacheId+=1,t},this.hasKey=t=>this.contentItemCache.hasKey(t),this.getItemOrUndefined=t=>{try{return this.getContentItemOrThrow(t)}catch(t){return}},this.getContentItemOrThrow=(t,e)=>{if(!this.contentItemCache.hasKey(t))throw new Error(\"Layout component has been destroyed or detached from the current layout.\");const i=this.contentItemCache.getValue(t);if(e&&!e.includes(i.type))throw new Error(`Layout item is not the expected type. Expected ${e.join(\", \")}, got ${i.type}.`);return i},this.getOrCreateEntityId=t=>{if(this.contentItemCache.hasValue(t))return this.contentItemCache.getKey(t);t.onDestroyed((()=>{this.contentItemCache.deleteValue(t)}));const e=this.createCacheKey();return this.contentItemCache.setUnique(e,t),e}}static getSingleInstance(){return w.singleton.getValue()}}_=f.LayoutContentCache=w,w.singleton=new y.Lazy((()=>new w));var I={},b={};!function(t){Object.defineProperty(t,\"__esModule\",{value:!0}),t.getAdjacentStacks=t.doShareEdge=t.getAdjacentItem=void 0;t.getAdjacentItem=(e,i)=>{const{parent:n}=e;if(e.isRoot()||!n)return;const o=[\"top\",\"bottom\"].includes(i)?\"column\":\"row\",s=[\"top\",\"left\"].includes(i)?-1:1;if(n.type===o){const t=n.contentItems.indexOf(e)+s;if(t>=0&&t{const n=t.getBounds(),o=e.getBounds();if(!n||!o)return!1;if([\"top\",\"bottom\"].includes(i)){return!(n.righto.right)}return!(n.bottomo.bottom)};t.getAdjacentStacks=(e,i)=>{const n=[\"top\",\"bottom\"].includes(i)?\"row\":\"column\",o=s=>\"stack\"===s.type?(0,t.doShareEdge)(e,s,i)?[s]:[]:\"root\"===s.type||\"ground\"===s.type?[]:s.type===n?s.contentItems.map((t=>o(t))).flat():s.type!==n?[\"top\",\"right\"].includes(i)?o(s.contentItems[s.contentItems.length-1]):o(s.contentItems[0]):[],s=(0,t.getAdjacentItem)(e,i);return s?o(s):[]}}(b);var S=t.commonjsGlobal&&t.commonjsGlobal.__decorate||function(t,e,i,n){var o,s=arguments.length,r=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if(\"object\"==typeof Reflect&&\"function\"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(s<3?o(r):s>3?o(e,i,r):o(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};Object.defineProperty(I,\"__esModule\",{value:!0}),I.LayoutEntitiesController=void 0;const E=t.decorators,x=b,L=i;class z{constructor(t,e,i){this.wire=t,this.layoutManager=e,this.layoutContentCache=i,this.analytics=t=>{this.wire.sendAction(`layout-controller-${t}`).catch((()=>{}))},this.getLayoutIdentityForViewOrThrow=async t=>{const e=this.layoutManager.getLayoutIdentityForView(t);if(!e)throw new Error(`View identity ${t.name} is not attached to any layouts.`);return e},this.getRoot=async t=>{this.analytics(\"get-root\");const e=(await this.getLayout(t)).getRoot();return{type:e.type,entityId:this.layoutContentCache.getOrCreateEntityId(e)}},this.getStackByView=async t=>{this.analytics(\"get-stack-by-view\");const e=await this.getLayoutIdentityForViewOrThrow(t),i=(await this.getLayout(e)).getStackByView(t);if(\"stack\"===i?.type)return{entityId:this.layoutContentCache.getOrCreateEntityId(i),type:\"stack\"}},this.getStackViews=t=>{this.analytics(\"get-stack-views\");return this.layoutContentCache.getContentItemOrThrow(t,[\"stack\"]).contentItems.map((t=>({name:t.viewName,uuid:this.wire.me.uuid})))},this.isRoot=t=>{this.analytics(\"is-root\");return this.layoutContentCache.getContentItemOrThrow(t).isRoot()},this.exists=t=>(this.analytics(\"exists\"),this.layoutContentCache.hasKey(t)),this.addViewToStack=async(t,e,{index:i}={index:0})=>{this.analytics(\"add-view-to-stack\");const n=this.layoutContentCache.getContentItemOrThrow(t);if(i&&i>n.contentItems.length+1)throw new Error(`Index '${i}' out of range, please exclude the index or specify a number between 0 and ${n.contentItems.length}`);const o={id:t,index:i},{identity:s}=await n.layout.platformCreateView(e,{location:o});return s},this.findViewInStack=(t,e)=>t.contentItems.find((t=>t.viewName===e.name)),this.removeViewFromStack=async(t,e)=>{this.analytics(\"remove-view-from-stack\");const i=this.layoutContentCache.getContentItemOrThrow(t,[\"stack\"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to remove a view ('${e.name}') which does not belong to the stack.`);await n.layout.platformCloseView(e)},this.createAdjacentStack=async(t,e,{position:i=\"right\"}={})=>{if(this.analytics(\"create-adjacent-stack\"),!Array.isArray(e)||0===e.length)throw new Error('The parameter \"views\" must be an array with at least 1 element.');if(![\"top\",\"bottom\",\"left\",\"right\"].includes(i))throw new Error(`Invalid position '${i}' specified.`);const n=this.layoutContentCache.getContentItemOrThrow(t).createAdjacentStack({position:i}),o=this.layoutContentCache.getOrCreateEntityId(n);return await Promise.all(e.reverse().map((t=>this.addViewToStack(o,t)))),o},this.getAdjacentStacks=async({targetId:t,edge:e})=>{this.analytics(\"get-adjacent-stacks\");const i=this.layoutContentCache.getContentItemOrThrow(t);return(0,x.getAdjacentStacks)(i,e).map((t=>({entityId:this.layoutContentCache.getOrCreateEntityId(t)})))},this.setStackActiveView=async(t,e)=>{this.analytics(\"set-stack-active-view\");const i=this.layoutContentCache.getContentItemOrThrow(t,[\"stack\"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to set a view ('${e.name}') as active when it does not belong to the stack.`);i.setActiveContentItem(n,!0)}}async getLayout(t){const e=await L.DefaultLayoutManager.resolveLayout(this.layoutManager,t);if(!e)throw new Error(`Could not resolve target layout identity ${JSON.stringify(t)}`);return e}getContent(t){this.analytics(\"get-content\");return this.layoutContentCache.getContentItemOrThrow(t,[\"column\",\"row\"]).contentItems.map((t=>({type:t.type,entityId:this.layoutContentCache.getOrCreateEntityId(t)})))}getParent(t){this.analytics(\"get-parent\");const e=this.layoutContentCache.getContentItemOrThrow(t);if(!e.isRoot())return e.parent?.contentItems.includes(e)?{type:e.parent.type,entityId:this.layoutContentCache.getOrCreateEntityId(e.parent)}:void 0}}S([(0,E.expose)()],z.prototype,\"getLayoutIdentityForViewOrThrow\",void 0),S([(0,E.expose)()],z.prototype,\"getRoot\",void 0),S([(0,E.expose)()],z.prototype,\"getStackByView\",void 0),S([(0,E.expose)()],z.prototype,\"getStackViews\",void 0),S([(0,E.expose)()],z.prototype,\"getContent\",null),S([(0,E.expose)()],z.prototype,\"getParent\",null),S([(0,E.expose)()],z.prototype,\"isRoot\",void 0),S([(0,E.expose)()],z.prototype,\"exists\",void 0),S([(0,E.expose)()],z.prototype,\"addViewToStack\",void 0),S([(0,E.expose)()],z.prototype,\"removeViewFromStack\",void 0),S([(0,E.expose)()],z.prototype,\"createAdjacentStack\",void 0),S([(0,E.expose)()],z.prototype,\"getAdjacentStacks\",void 0),S([(0,E.expose)()],z.prototype,\"setStackActiveView\",void 0),I.LayoutEntitiesController=z,Object.defineProperty(g,\"__esModule\",{value:!0});var M=g.initLayoutEndpoints=void 0;const P=t.apiExposer,T=t.layout_constants,A=f,k=I,D=i;M=g.initLayoutEndpoints=async function(t,e){const i=t.getFin(),n=await i.Platform.getCurrentSync().getClient(),o=new P.ChannelsExposer(n);await new P.ApiExposer(o).exposeInstance(new k.LayoutEntitiesController(t,e,A.LayoutContentCache.getSingleInstance()),{id:T.LAYOUT_CONTROLLER_ID}),await async function(t,e){const i=t=>async i=>{const n=await D.DefaultLayoutManager.resolveLayout(e,i.target);if(!n)throw new Error(`Could not resolve the layout target from payload ${JSON.stringify(i)}`);return t(n,i)},n=(e,n)=>{t.register(e,i(n))},o=(t,e)=>{n(t,e)};n(\"replace-view\",((t,e)=>t.replaceView(e))),n(\"replace-layout\",((t,{layout:e})=>t.replaceLayout(e))),n(\"add-view\",((t,e)=>t.insertView(e))),o(\"layout-add-view\",((t,{viewOptions:e,location:i,targetView:n})=>t.platformCreateView(e,{location:i,targetView:n}))),n(\"close-view\",((t,e)=>t.cleanupView(e.viewIdentity))),o(\"layout-close-view\",((t,e)=>t.platformCloseView(e.viewIdentity))),n(\"apply-preset-layout\",((t,e)=>t.applyPreset(e))),n(\"get-layout-views\",(t=>t.getCurrentViews())),n(\"get-frame-snapshot\",(t=>t.getFrameSnapshot())),n(\"is-visible\",(t=>t.isVisible())),n(\"destroy\",(t=>t.destroy())),t.register(\"get-layout-snapshot\",(()=>e.getLayoutSnapshot()))}(n,e)};var R={};Object.defineProperty(R,\"__esModule\",{value:!0});var U=R.BaseLayout=void 0;U=R.BaseLayout=class{};var O={};Object.defineProperty(O,\"__esModule\",{value:!0});var V=O.DOMEmitter=void 0;V=O.DOMEmitter=class{constructor(t){this.container=t}dispatchLocalEvent(t,e){const i={...e,type:t,tabSelector:`tab-${e.name}`,containerSelector:`container-${e.name}`,topic:\"openfin-DOM-event\"};this.container.dispatchEvent(new CustomEvent(t,{detail:i}))}};var B={};Object.defineProperty(B,\"__esModule\",{value:!0});var H=B.mapLayoutContentItemsImmutableSync=B.mapLayoutContentItemsImmutable=W=B.isVisible=void 0;var W=B.isVisible=t=>(0!==t.offsetWidth||0!==t.offsetHeight)&&\"hidden\"!==window.getComputedStyle(t).visibility&&t.offsetTop>=0&&t.offsetLeft>=0&&t.offsetTop<=window.innerHeight&&t.offsetLeft<=window.innerWidth;const F=t=>\"type\"in t&&\"component\"===t.type;B.mapLayoutContentItemsImmutable=async function t(e,i){return F(i)?e(i):{...i,content:await Promise.all(i.content?.map((i=>t(e,i))))}},H=B.mapLayoutContentItemsImmutableSync=function t(e,i){return F(i)?e(i):{...i,content:i.content?.map((i=>t(e,i)))}};class N extends Error{constructor(t,e){super(e),this.type=t}}class G extends N{constructor(t,e){super(\"Configuration\",t),this.node=e}}class j extends N{constructor(t){super(\"PopoutBlocked\",t)}}class $ extends N{constructor(t){super(\"API\",t)}}class Z extends N{constructor(t){super(\"Bind\",t)}}class q extends Error{constructor(t,e,i){super(`${t}: ${e}${void 0===i?\"\":\": \"+i}`)}}class X extends q{constructor(t,e){super(\"Assert\",t,e)}}class Y extends q{constructor(t,e,i){super(\"UnreachableCase\",t,`${e}${void 0===i?\"\":\": \"+i}`)}}class K extends q{constructor(t,e){super(\"UnexpectedNull\",t,e)}}class J extends q{constructor(t,e){super(\"UnexpectedUndefined\",t,e)}}var Q;!function(t){let e=!1;const i={PopoutCannotBeCreatedWithGroundItemConfig:{id:0,default:\"Popout cannot be created with ground ItemConfig\"},PleaseRegisterAConstructorFunction:{id:1,default:\"Please register a constructor function\"},ComponentTypeNotRegisteredAndBindComponentEventHandlerNotAssigned:{id:2,default:\"Component type not registered and BindComponentEvent handler not assigned\"},ComponentIsAlreadyRegistered:{id:3,default:\"Component is already registered\"},ComponentIsNotVirtuable:{id:4,default:\"Component is not virtuable. Requires rootHtmlElement field/getter\"},VirtualComponentDoesNotHaveRootHtmlElement:{id:5,default:'Virtual component does not have getter \"rootHtmlElement\"'},ItemConfigIsNotTypeComponent:{id:6,default:\"ItemConfig is not of type component\"},InvalidNumberPartInSizeString:{id:7,default:\"Invalid number part in size string\"},UnknownUnitInSizeString:{id:8,default:\"Unknown unit in size string\"},UnsupportedUnitInSizeString:{id:9,default:\"Unsupported unit in size string\"}};t.idCount=Object.keys(i).length;const n=Object.values(i);t.checkInitialise=function(){if(!e)for(let e=0;e=\"0\"&&t<=\"9\"}function Tt(t,e){const i=zt(e);t.style.width=i}function At(t,e){const i=zt(e);t.style.height=i}function kt(t){return{width:t.offsetWidth,height:t.offsetHeight}}function Dt(t,e){t.style.display=e?\"\":\"none\"}function Rt(t,e){if(void 0!==e)for(const i in e)if(e.hasOwnProperty(i)){const n=e[i],o=t[i];t[i]=Ut(o,n)}return t}function Ut(t,e){if(\"object\"!=typeof e)return e;if(Array.isArray(e)){const t=e.length,i=new Array(t);for(let n=0;n36)throw new Error(\"Too many keys in config minifier map\")},t.translateObject=n}(dt||(dt={})),function(t){t.defaults={type:at.ground,content:[],size:1,sizeUnit:ht.Fractional,minSize:void 0,minSizeUnit:ht.Pixel,id:\"\",isClosable:!0},t.createCopy=function(t,e){switch(t.type){case at.ground:case at.row:case at.column:return gt.createCopy(t,e);case at.stack:return ut.createCopy(t,e);case at.component:return pt.createCopy(t);default:throw new Y(\"CICC91354\",t.type,\"Invalid Config Item type specified\")}},t.createDefault=function(t){switch(t){case at.ground:throw new X(\"CICCDR91562\");case at.row:case at.column:return gt.createDefault(t);case at.stack:return ut.createDefault();case at.component:return pt.createDefault();default:throw new Y(\"CICCDD91563\",t,\"Invalid Config Item type specified\")}},t.isComponentItem=function(t){return t.type===at.component},t.isStackItem=function(t){return t.type===at.stack},t.isGroundItem=function(t){return t.type===at.ground}}(ct||(ct={})),function(t){t.defaultMaximised=!1,function(t){t.createCopy=function(t,e){return void 0===t?void 0:{show:null!=e?e:t.show,popout:t.popout,close:t.close,maximise:t.maximise,minimise:t.minimise,tabDropdown:t.tabDropdown}}}(t.Header||(t.Header={}))}(mt||(mt={})),function(t){function e(t){const e=t.length,i=new Array(e);for(let n=0;n\"__glMaximised\"===t));t>0&&(o=!0,n=n.splice(t,1)),e=n.length>0?n[0]:ct.defaults.id}else e=n;return i=void 0!==t.maximised?t.maximised:o,{id:e,maximised:i}}}(wt||(wt={})),function(t){function e(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0;return{resolved:!0,root:Et.resolve(i),openPopouts:t.resolveOpenPopouts(e.openPopouts),dimensions:t.Dimensions.resolve(e.dimensions),settings:t.Settings.resolve(e.settings),header:t.Header.resolve(e.header,e.settings,e.labels)}}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:Lt.fromResolvedArray(e.openPopouts),settings:_t.Settings.createCopy(e.settings),dimensions:t.Dimensions.fromResolved(e.dimensions),header:_t.Header.createCopy(e.header)}},t.isResolved=function(t){const e=t;return void 0!==e.resolved&&!0===e.resolved},t.resolveOpenPopouts=function(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0,{root:Et.resolve(o),openPopouts:xt.resolveOpenPopouts(e.openPopouts),dimensions:xt.Dimensions.resolve(e.dimensions),settings:xt.Settings.resolve(e.settings),header:xt.Header.resolve(e.header,e.settings,e.labels),parentId:null!==(i=e.parentId)&&void 0!==i?i:null,indexInParent:null!==(n=e.indexInParent)&&void 0!==n?n:null,window:t.Window.resolve(e.window,e.dimensions),resolved:!0}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:i(e.openPopouts),dimensions:xt.Dimensions.fromResolved(e.dimensions),settings:_t.Settings.createCopy(e.settings),header:_t.Header.createCopy(e.header),parentId:e.parentId,indexInParent:e.indexInParent,window:t.Window.fromResolved(e.window)}},t.fromResolvedArray=i}(Lt||(Lt={}));class Wt{constructor(){this._allEventSubscriptions=[],this._subscriptionsMap=new Map,this.unbind=this.removeEventListener,this.trigger=this.emit}tryBubbleEvent(t,e){}emit(t,...e){let i=this._subscriptionsMap.get(t);if(void 0!==i){i=i.slice();for(let t=0;t0){const n=e.slice();n.unshift(t);const o=this._allEventSubscriptions.slice();for(let t=0;t0?n.contentItems[0]:n,e=0);const o=this._layoutManager.createAndInitContentItem(i,t);t.addChild(o,e),this._layoutManager.layoutConfig.settings.popInOnClose?this._onClose():this.close()}createWindow(){const t=this.createUrl(),e=Math.floor(1e6*Math.random()).toString(36),i=this.serializeWindowFeatures({width:this._initialWindowSize.width,height:this._initialWindowSize.height,innerWidth:this._initialWindowSize.width,innerHeight:this._initialWindowSize.height,menubar:\"no\",toolbar:\"no\",location:\"no\",personalbar:\"no\",resizable:\"yes\",scrollbars:\"no\",status:\"no\"});if(this._popoutWindow=globalThis.open(t,e,i),this._popoutWindow)this._popoutWindow.addEventListener(\"load\",(()=>this.positionWindow()),{passive:!0}),this._popoutWindow.addEventListener(\"beforeunload\",(()=>{this._layoutManager.layoutConfig.settings.popInOnClose?this.popIn():this._onClose()}),{passive:!0}),this._checkReadyInterval=setInterval((()=>this.checkReady()),10);else if(!0===this._layoutManager.layoutConfig.settings.blockedPopoutsThrowError){throw new j(\"Popout blocked\")}}checkReady(){if(null===this._popoutWindow)throw new K(\"BPCR01844\");this._popoutWindow.__glInstance&&this._popoutWindow.__glInstance.isInitialised&&(this.onInitialised(),void 0!==this._checkReadyInterval&&(clearInterval(this._checkReadyInterval),this._checkReadyInterval=void 0))}serializeWindowFeatures(t){const e=[];for(const i in t)e.push(i+\"=\"+t[i].toString());return e.join(\",\")}createUrl(){const t=\"gl-window-config-\"+Ot(),e=_t.minifyConfig(this._config);try{localStorage.setItem(t,JSON.stringify(e))}catch(t){throw new Error(\"Error while writing to localStorage \"+function(t){return t instanceof Error?t.message:\"string\"==typeof t?t:\"Unknown Error\"}(t))}const i=new URL(location.href);return i.searchParams.set(\"gl-window\",t),i.toString()}positionWindow(){if(null===this._popoutWindow)throw new Error(\"BrowserPopout.positionWindow: null popoutWindow\");this._popoutWindow.moveTo(this._initialWindowSize.left,this._initialWindowSize.top),this._popoutWindow.focus()}onInitialised(){this._isInitialised=!0,this.getGlInstance().on(\"popIn\",(()=>this.popIn())),this.emit(\"initialised\")}_onClose(){setTimeout((()=>this.emit(\"closed\")),50)}}class Gt extends Wt{constructor(t,e,i,n){super(),this.layoutManager=t,this._parent=i,this._element=n,this._popInParentIds=[],this._type=e.type,this._id=e.id,this._isInitialised=!1,this.isGround=!1,this.isRow=!1,this.isColumn=!1,this.isStack=!1,this.isComponent=!1,this.size=e.size,this.sizeUnit=e.sizeUnit,this.minSize=e.minSize,this.minSizeUnit=e.minSizeUnit,this._isClosable=e.isClosable,this._pendingEventPropagations={},this._throttledEvents=[\"stateChanged\"],this._contentItems=this.createContentItems(e.content)}get type(){return this._type}get id(){return this._id}set id(t){this._id=t}get popInParentIds(){return this._popInParentIds}get parent(){return this._parent}get contentItems(){return this._contentItems}get isClosable(){return this._isClosable}get element(){return this._element}get isInitialised(){return this._isInitialised}static isStack(t){return t.isStack}static isComponentItem(t){return t.isComponent}static isComponentParentableItem(t){return t.isStack||t.isGround}removeChild(t,e=!1){const i=this._contentItems.indexOf(t);if(-1===i)throw new Error(\"Can't remove child item. Unknown content item\");if(e||this._contentItems[i].destroy(),this._contentItems.splice(i,1),this._contentItems.length>0)this.updateSize(!1);else if(!this.isGround&&!0===this._isClosable){if(null===this._parent)throw new K(\"CIUC00874\");this._parent.removeChild(this)}}addChild(t,e,i){return null!=e||(e=this._contentItems.length),this._contentItems.splice(e,0,t),t.setParent(this),!0===this._isInitialised&&!1===t._isInitialised&&t.init(),e}replaceChild(t,e,i=!1){const n=this._contentItems.indexOf(t),o=t._element.parentNode;if(-1===n)throw new X(\"CIRCI23232\",\"Can't replace child. oldChild is not child of this\");if(null===o)throw new K(\"CIRCP23232\");if(o.replaceChild(e._element,t._element),!0===i&&(t._parent=null,t.destroy()),this._contentItems[n]=e,e.setParent(this),e.size=t.size,e.sizeUnit=t.sizeUnit,e.minSize=t.minSize,e.minSizeUnit=t.minSizeUnit,null===e._parent)throw new K(\"CIRCNC45699\");!0===e._parent._isInitialised&&!1===e._isInitialised&&e.init(),this.updateSize(!1)}remove(){if(null===this._parent)throw new K(\"CIR11110\");this._parent.removeChild(this)}popout(){const t=Ot(),e=this.layoutManager.createPopoutFromContentItem(this,void 0,t,void 0);return this.emitBaseBubblingEvent(\"stateChanged\"),e}calculateConfigContent(){const t=this._contentItems,e=t.length,i=new Array(e);for(let n=0;nthis.propagateEventToLayoutManager(t,e))))}propagateEventToLayoutManager(t,e){this._pendingEventPropagations[t]=!1,this.layoutManager.emitUnknown(t,e)}}class jt extends Gt{constructor(t,e,i){super(t,e,i,document.createElement(\"div\")),this._parentItem=i,this._focused=!1,this.isComponent=!0,this._reorderEnabled=e.reorderEnabled,this.applyUpdatableConfig(e),this._initialWantMaximise=e.maximised;const n=document.createElement(\"div\");n.classList.add(\"lm_content\"),this.element.appendChild(n),this._container=new Ft(e,this,t,n,(t=>this.handleUpdateItemConfigEvent(t)),(()=>this.show()),(()=>this.hide()),(t=>this.focus(t)),(t=>this.blur(t)))}get componentName(){return this._container.componentType}get componentType(){return this._container.componentType}get reorderEnabled(){return this._reorderEnabled}get initialWantMaximise(){return this._initialWantMaximise}get component(){return this._container.component}get container(){return this._container}get parentItem(){return this._parentItem}get headerConfig(){return this._headerConfig}get title(){return this._title}get tab(){return this._tab}get focused(){return this._focused}destroy(){this._container.destroy(),super.destroy()}applyUpdatableConfig(t){this.setTitle(t.title),this._headerConfig=t.header}toConfig(){const t=this._container.stateRequestEvent,e=void 0===t?this._container.state:t();return{type:at.component,content:[],size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,maximised:!1,isClosable:this.isClosable,reorderEnabled:this._reorderEnabled,title:this._title,header:mt.Header.createCopy(this._headerConfig),componentType:pt.copyComponentType(this.componentType),componentState:e}}close(){if(null===this.parent)throw new K(\"CIC68883\");this.parent.removeChild(this,!1)}enterDragMode(t,e){Tt(this.element,t),At(this.element,e),this._container.enterDragMode(t,e)}exitDragMode(){this._container.exitDragMode()}enterStackMaximised(){this._container.enterStackMaximised()}exitStackMaximised(){this._container.exitStackMaximised()}drag(){this._container.drag()}updateSize(t){this.updateNodeSize(t)}init(){this.updateNodeSize(!1),super.init(),this._container.emit(\"open\"),this.initContentItems()}setTitle(t){this._title=t,this.emit(\"titleChanged\",t),this.emit(\"stateChanged\")}setTab(t){this._tab=t,this.emit(\"tab\",t),this._container.setTab(t)}hide(){super.hide(),this._container.setVisibility(!1)}show(){super.show(),this._container.setVisibility(!0)}focus(t=!1){this.parentItem.setActiveComponentItem(this,!0,t)}setFocused(t){this._focused=!0,this.tab.setFocused(),t||this.emitBaseBubblingEvent(\"focus\")}blur(t=!1){this._focused&&this.layoutManager.setFocusedComponentItem(void 0,t)}setBlurred(t){this._focused=!1,this.tab.setBlurred(),t||this.emitBaseBubblingEvent(\"blur\")}setParent(t){this._parentItem=t,super.setParent(t)}handleUpdateItemConfigEvent(t){this.applyUpdatableConfig(t)}updateNodeSize(t){if(\"none\"!==this.element.style.display){const{width:e,height:i}=kt(this.element);this._container.setSizeToNodeSize(e,i,t)}}}class $t extends Gt{constructor(){super(...arguments),this._focused=!1}get focused(){return this._focused}setFocusedValue(t){this._focused=t}}class Zt extends Wt{constructor(t,e){super(),this._eElement=t,this._pointerTracking=!1,this._pointerDownEventListener=t=>this.onPointerDown(t),this._pointerMoveEventListener=t=>this.onPointerMove(t),this._pointerUpEventListener=t=>this.onPointerUp(t),this._timeout=void 0,this._allowableTargets=[t,...e],this._oDocument=document,this._eBody=document.body,this._nDelay=1800,this._nDistance=10,this._nX=0,this._nY=0,this._nOriginalX=0,this._nOriginalY=0,this._dragging=!1,this._eElement.addEventListener(\"pointerdown\",this._pointerDownEventListener,{passive:!0})}destroy(){this.checkRemovePointerTrackingEventListeners(),this._eElement.removeEventListener(\"pointerdown\",this._pointerDownEventListener)}cancelDrag(){this.processDragStop(void 0)}onPointerDown(t){if(this._allowableTargets.includes(t.target)&&t.isPrimary){const e=this.getPointerCoordinates(t);this.processPointerDown(e)}}processPointerDown(t){this._nOriginalX=t.x,this._nOriginalY=t.y,this._oDocument.addEventListener(\"pointermove\",this._pointerMoveEventListener),this._oDocument.addEventListener(\"pointerup\",this._pointerUpEventListener,{passive:!0}),this._pointerTracking=!0,this._timeout=setTimeout((()=>{try{this.startDrag()}catch(t){throw console.error(t),t}}),this._nDelay)}onPointerMove(t){this._pointerTracking&&(this.processDragMove(t),t.preventDefault())}processDragMove(t){this._nX=t.pageX-this._nOriginalX,this._nY=t.pageY-this._nOriginalY,!1===this._dragging&&(Math.abs(this._nX)>this._nDistance||Math.abs(this._nY)>this._nDistance)&&this.startDrag(),this._dragging&&this.emit(\"drag\",this._nX,this._nY,t)}onPointerUp(t){this.processDragStop(t)}processDragStop(t){var e;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this.checkRemovePointerTrackingEventListeners(),!0===this._dragging&&(this._eBody.classList.remove(\"lm_dragging\"),this._eElement.classList.remove(\"lm_dragging\"),null===(e=this._oDocument.querySelector(\"iframe\"))||void 0===e||e.style.setProperty(\"pointer-events\",\"\"),this._dragging=!1,this.emit(\"dragStop\",t))}checkRemovePointerTrackingEventListeners(){this._pointerTracking&&(this._oDocument.removeEventListener(\"pointermove\",this._pointerMoveEventListener),this._oDocument.removeEventListener(\"pointerup\",this._pointerUpEventListener),this._pointerTracking=!1)}startDrag(){var t;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this._dragging=!0,this._eBody.classList.add(\"lm_dragging\"),this._eElement.classList.add(\"lm_dragging\"),null===(t=this._oDocument.querySelector(\"iframe\"))||void 0===t||t.style.setProperty(\"pointer-events\",\"none\"),this.emit(\"dragStart\",this._nOriginalX,this._nOriginalY)}getPointerCoordinates(t){return{x:t.pageX,y:t.pageY}}}class qt{constructor(t,e,i){this._isVertical=t,this._size=e,this._grabSize=i0){const i=this.createSplitter(Math.max(0,e-1)).element;e>0?(this.contentItems[e-1].element.insertAdjacentElement(\"afterend\",i),i.insertAdjacentElement(\"afterend\",t.element)):(this.contentItems[0].element.insertAdjacentElement(\"beforebegin\",i),i.insertAdjacentElement(\"beforebegin\",t.element))}else this._childElementContainer.appendChild(t.element);super.addChild(t,e);const n=1/this.contentItems.length*100;if(!0===i)return this.emitBaseBubblingEvent(\"stateChanged\"),e;for(let e=0;e0&&(this.calculateRelativeSizes(),this.setAbsoluteSizes()),this.emitBaseBubblingEvent(\"stateChanged\"),this.emit(\"resize\")}setAbsoluteSizes(){const t=this.calculateAbsoluteSizes();for(let e=0;e0&&t.itemSizes[e]++,this._isColumn?(Tt(this.contentItems[e].element,t.crossAxisSize),At(this.contentItems[e].element,t.itemSizes[e])):(Tt(this.contentItems[e].element,t.itemSizes[e]),At(this.contentItems[e].element,t.crossAxisSize))}calculateAbsoluteSizes(){const t=(this.contentItems.length-1)*this._splitterSize,{width:e,height:i}=kt(this.element);let n,o;this._isColumn?(n=i-t,o=e):(n=e-t,o=i);let s=0;const r=[];for(let t=0;t0){const n=100-t;for(let t=0;t100&&e.length>0){for(let t=0;te)return;{const r=i/e;let a=i;for(let e=0;ethis.onSplitterDrag(e,t,i))),e.on(\"dragStop\",(()=>this.onSplitterDragStop(e))),e.on(\"dragStart\",(()=>this.onSplitterDragStart(e))),this._splitter.splice(t,0,e),e}getSplitItems(t){const e=this._splitter.indexOf(t);return{before:this.contentItems[e],after:this.contentItems[e+1]}}calculateContentItemMinSize(t){const e=t.minSize;if(void 0!==e){if(t.minSizeUnit===ht.Pixel)return e;throw new X(\"ROCGMD98831\",JSON.stringify(t))}{const t=this.layoutManager.layoutConfig.dimensions;return this._isColumn?t.defaultMinItemHeight:t.defaultMinItemWidth}}calculateContentItemsTotalMinSize(t){let e=0;for(const i of t)e+=this.calculateContentItemMinSize(i);return e}onSplitterDragStart(t){const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=this.calculateContentItemsTotalMinSize(e.before.contentItems),s=this.calculateContentItemsTotalMinSize(e.after.contentItems);this._splitterPosition=0,this._splitterMinPosition=-1*(i-o),this._splitterMaxPosition=n-s}onSplitterDrag(t,e,i){let n=this._isColumn?i:e;if(null===this._splitterMinPosition||null===this._splitterMaxPosition)throw new K(\"ROCOSD59226\");n=Math.max(n,this._splitterMinPosition),n=Math.min(n,this._splitterMaxPosition),this._splitterPosition=n;const o=zt(n);this._isColumn?t.element.style.top=o:t.element.style.left=o}onSplitterDragStop(t){if(null===this._splitterPosition)throw new K(\"ROCOSDS66932\");{const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=(this._splitterPosition+i)/(i+n),s=e.before.size+e.after.size;e.before.size=o*s,e.after.size=(1-o)*s,t.element.style.top=zt(0),t.element.style.left=zt(0),globalThis.requestAnimationFrame((()=>this.updateSize(!1)))}}}!function(t){t.getElementDimensionSize=function(t,e){return\"width\"===e?function(t){return t.offsetWidth}(t):function(t){return t.offsetHeight}(t)},t.setElementDimensionSize=function(t,e,i){return\"width\"===e?Tt(t,i):At(t,i)},t.createElement=function(t,e){const i=t.createElement(\"div\");return i.classList.add(\"lm_item\"),e?i.classList.add(\"lm_column\"):i.classList.add(\"lm_row\"),i}}(Xt||(Xt={}));class Yt extends $t{constructor(t,e,i){super(t,vt.create(e),null,Yt.createElement(document)),this.isGround=!0,this._childElementContainer=this.element,this._containerElement=i;let n=null;for(;;){const t=n?n.previousSibling:this._containerElement.lastChild;if(!(t instanceof Element&&t.classList.contains(\"lm_content\")))break;n=t}this._containerElement.insertBefore(this.element,n)}init(){if(!0!==this.isInitialised){this.updateNodeSize();for(let t=0;t0?this.contentItems[0]:this,n.isComponent)throw new Error(\"Cannot add item as child to ComponentItem\");{const t=this.layoutManager.createAndInitContentItem(i,n);return e=n.addChild(t,e),n===this?-1:e}}loadComponentAsRoot(t){this.clearRoot();const e=Ct.resolve(t,!1);if(e.maximised)throw new Error(\"Root Component cannot be maximised\");{const t=new jt(this.layoutManager,e,this);t.init(),this.addChild(t,0)}}addChild(t,e){if(this.contentItems.length>0)throw new Error(\"Ground node can only have a single child\");return this._childElementContainer.appendChild(t.element),e=super.addChild(t,e),this.updateSize(!1),this.emitBaseBubblingEvent(\"stateChanged\"),e}calculateConfigContent(){const t=this.contentItems,e=t.length,i=new Array(e);for(let n=0;n0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e)),this.updateContentItemsSize(!1))}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}createSideAreas(){const t=Yt.Area.oppositeSides,e=new Array(Object.keys(t).length);let i=0;for(const n in t){const o=n,s=this.getElementArea();if(null===s)throw new K(\"RCSA77553\");s.side=o,\"2\"===t[o][1]?s[o]=s[t[o]]-50:s[o]=s[t[o]]+50,s.surface=(s.x2-s.x1)*(s.y2-s.y1),e[i++]=s}return e}highlightDropZone(t,e,i){this.layoutManager.tabDropPlaceholder.remove(),super.highlightDropZone(t,e,i)}onDrop(t,e){if(t.isComponent){const e=ut.createDefault(),i=t;e.header=mt.Header.createCopy(i.headerConfig);const n=this.layoutManager.createAndInitContentItem(e,this);n.addChild(t),t=n}if(0===this.contentItems.length)this.addChild(t);else{if(t.type===at.row||t.type===at.column){const e=ut.createDefault(),i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}const i=\"x\"==e.side[0]?at.row:at.column,n=\"2\"==e.side[1],o=this.contentItems[0];if(o instanceof Xt&&o.type===i){const e=o.contentItems[n?0:o.contentItems.length-1];o.addChild(t,n?0:void 0,!0),e.size*=.5,t.size=e.size,t.sizeUnit=ht.Percent,o.updateSize(!1)}else{const e=ct.createDefault(i),s=this.layoutManager.createContentItem(e,this);this.replaceChild(o,s),s.addChild(t,n?0:void 0,!0),s.addChild(o,n?void 0:0,!0),o.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}}dock(){throw new X(\"GID87731\")}validateDocking(){throw new X(\"GIVD87732\")}getAllContentItems(){const t=[this];return this.deepGetAllContentItems(this.contentItems,t),t}getConfigMaximisedItems(){const t=[];return this.deepFilterContentItems(this.contentItems,t,(t=>!(!Gt.isStack(t)||!t.initialWantMaximise)||!(!Gt.isComponentItem(t)||!t.initialWantMaximise))),t}getItemsByPopInParentId(t){const e=[];return this.deepFilterContentItems(this.contentItems,e,(e=>e.popInParentIds.includes(t))),e}toConfig(){throw new Error(\"Cannot generate GroundItem config\")}setActiveComponentItem(t,e,i){}updateNodeSize(){const{width:t,height:e}=kt(this._containerElement);Tt(this.element,t),At(this.element,e),this.contentItems.length>0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e))}deepGetAllContentItems(t,e){for(let i=0;ithis.onClick(t),this._touchStartEventListener=t=>this.onTouchStart(t),this._element=document.createElement(\"div\"),this._element.classList.add(i),this._element.title=e,this._header.on(\"destroy\",(()=>this.destroy())),this._element.addEventListener(\"click\",this._clickEventListener,{passive:!0}),this._element.addEventListener(\"touchstart\",this._touchStartEventListener,{passive:!0}),this._header.controlsContainerElement.appendChild(this._element)}get element(){return this._element}destroy(){var t;this._element.removeEventListener(\"click\",this._clickEventListener),this._element.removeEventListener(\"touchstart\",this._touchStartEventListener),null===(t=this._element.parentNode)||void 0===t||t.removeChild(this._element)}onClick(t){this._pushEvent(t)}onTouchStart(t){this._pushEvent(t)}}class Jt{constructor(t,e,i,n,o){var s;this._layoutManager=t,this._componentItem=e,this._closeEvent=i,this._focusEvent=n,this._dragStartEvent=o,this._isActive=!1,this._tabClickListener=t=>this.onTabClickDown(t),this._tabTouchStartListener=t=>this.onTabTouchStart(t),this._closeClickListener=()=>this.onCloseClick(),this._closeTouchStartListener=()=>this.onCloseTouchStart(),this._dragStartListener=(t,e)=>this.onDragStart(t,e),this._contentItemDestroyListener=()=>this.onContentItemDestroy(),this._tabTitleChangedListener=t=>this.setTitle(t),this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_tab\"),this._titleElement=document.createElement(\"span\"),this._titleElement.classList.add(\"lm_title\"),this._closeElement=document.createElement(\"div\"),this._closeElement.classList.add(\"lm_close_tab\"),this._element.appendChild(this._titleElement),this._element.appendChild(this._closeElement),e.isClosable?this._closeElement.style.display=\"\":this._closeElement.style.display=\"none\",this.setTitle(e.title),this._componentItem.on(\"titleChanged\",this._tabTitleChangedListener);(null!==(s=e.reorderEnabled)&&void 0!==s?s:this._layoutManager.layoutConfig.settings.reorderEnabled)&&this.enableReorder(),this._element.addEventListener(\"click\",this._tabClickListener,{passive:!0}),this._element.addEventListener(\"touchstart\",this._tabTouchStartListener,{passive:!0}),this._componentItem.isClosable?(this._closeElement.addEventListener(\"click\",this._closeClickListener,{passive:!0}),this._closeElement.addEventListener(\"touchstart\",this._closeTouchStartListener,{passive:!0})):(this._closeElement.remove(),this._closeElement=void 0),this._componentItem.setTab(this),this._layoutManager.emit(\"tabCreated\",this)}get isActive(){return this._isActive}get componentItem(){return this._componentItem}get contentItem(){return this._componentItem}get element(){return this._element}get titleElement(){return this._titleElement}get closeElement(){return this._closeElement}get reorderEnabled(){return void 0!==this._dragListener}set reorderEnabled(t){t!==this.reorderEnabled&&(t?this.enableReorder():this.disableReorder())}setTitle(t){this._titleElement.innerText=t,this._element.title=t}setActive(t){t!==this._isActive&&(this._isActive=t,t?this._element.classList.add(\"lm_active\"):this._element.classList.remove(\"lm_active\"))}destroy(){var t,e;this._closeEvent=void 0,this._focusEvent=void 0,this._dragStartEvent=void 0,this._element.removeEventListener(\"click\",this._tabClickListener),this._element.removeEventListener(\"touchstart\",this._tabTouchStartListener),null===(t=this._closeElement)||void 0===t||t.removeEventListener(\"click\",this._closeClickListener),null===(e=this._closeElement)||void 0===e||e.removeEventListener(\"touchstart\",this._closeTouchStartListener),this._componentItem.off(\"titleChanged\",this._tabTitleChangedListener),this.reorderEnabled&&this.disableReorder(),this._element.remove()}setBlurred(){this._element.classList.remove(\"lm_focused\"),this._titleElement.classList.remove(\"lm_focused\")}setFocused(){this._element.classList.add(\"lm_focused\"),this._titleElement.classList.add(\"lm_focused\")}onDragStart(t,e){if(void 0===this._dragListener)throw new J(\"TODSDLU10093\");if(void 0===this._dragStartEvent)throw new J(\"TODS23309\");this._dragStartEvent(t,e,this._dragListener,this.componentItem)}onContentItemDestroy(){void 0!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=void 0)}onTabClickDown(t){const e=t.target;e!==this._element&&e!==this._titleElement||(0===t.button?this.notifyFocus():1===t.button&&this._componentItem.isClosable&&this.notifyClose())}onTabTouchStart(t){t.target===this._element&&this.notifyFocus()}onCloseClick(){this.notifyClose()}onCloseTouchStart(){this.notifyClose()}notifyClose(){if(void 0===this._closeEvent)throw new J(\"TNC15007\");this._closeEvent(this._componentItem)}notifyFocus(){if(void 0===this._focusEvent)throw new J(\"TNA15007\");this._focusEvent(this._componentItem)}enableReorder(){this._dragListener=new Zt(this._element,[this._titleElement]),this._dragListener.on(\"dragStart\",this._dragStartListener),this._componentItem.on(\"destroy\",this._contentItemDestroyListener)}disableReorder(){if(void 0===this._dragListener)throw new J(\"TDR87745\");this._componentItem.off(\"destroy\",this._contentItemDestroyListener),this._dragListener.off(\"dragStart\",this._dragStartListener),this._dragListener=void 0}}class Qt{constructor(t,e,i,n,o){this._layoutManager=t,this._componentRemoveEvent=e,this._componentFocusEvent=i,this._componentDragStartEvent=n,this._dropdownActiveChangedEvent=o,this._tabs=[],this._lastVisibleTabIndex=-1,this._dropdownActive=!1,this._element=document.createElement(\"section\"),this._element.classList.add(\"lm_tabs\"),this._dropdownElement=document.createElement(\"section\"),this._dropdownElement.classList.add(\"lm_tabdropdown_list\"),this._dropdownElement.style.display=\"none\"}get tabs(){return this._tabs}get tabCount(){return this._tabs.length}get lastVisibleTabIndex(){return this._lastVisibleTabIndex}get element(){return this._element}get dropdownElement(){return this._dropdownElement}get dropdownActive(){return this._dropdownActive}destroy(){for(let t=0;tthis.handleTabCloseEvent(t)),(t=>this.handleTabFocusEvent(t)),((t,e,i,n)=>this.handleTabDragStartEvent(t,e,i,n)));void 0===e&&(e=this._tabs.length),this._tabs.splice(e,0,i),ethis._lastVisibleTabIndex){const t=this._tabs[e];for(let t=e;t>0;t--)this._tabs[t]=this._tabs[t-1];this._tabs[0]=t}}updateTabSizes(t,e){let i=!1;this.tryUpdateTabSizes(i,t,e)||(i=!0,this.tryUpdateTabSizes(i,t,e)),i!==this._dropdownActive&&(this._dropdownActive=i,this._dropdownActiveChangedEvent())}tryUpdateTabSizes(t,e,i){if(this._tabs.length>0){if(void 0===i)throw new Error(\"non-empty tabs must have active component item\");let n=0,o=!1;const s=this._layoutManager.layoutConfig.settings.tabOverlapAllowance,r=this._tabs.indexOf(i.tab),a=this._tabs[r];this._lastVisibleTabIndex=-1;for(let i=0;ie){if(o)i===r&&(l.style.zIndex=\"auto\",l.style.marginLeft=\"\",l.parentElement!==this._element&&this._element.appendChild(l));else{let t;if(t=r>0&&r<=i?(d-e)/(i-1):(d-e)/i,tthis.onClick(t),this._touchStartListener=t=>this.onTouchStart(t),this._rowColumnClosable=!0,this._closeButton=null,this._popoutButton=null,this._tabsContainer=new Qt(this._layoutManager,(t=>this.handleTabInitiatedComponentRemoveEvent(t)),(t=>this.handleTabInitiatedComponentFocusEvent(t)),((t,e,i,n)=>this.handleTabInitiatedDragStartEvent(t,e,i,n)),(()=>this.processTabDropdownActiveChanged())),this._show=i.show,this._popoutEnabled=i.popoutEnabled,this._popoutLabel=i.popoutLabel,this._maximiseEnabled=i.maximiseEnabled,this._maximiseLabel=i.maximiseLabel,this._minimiseEnabled=i.minimiseEnabled,this._minimiseLabel=i.minimiseLabel,this._closeEnabled=i.closeEnabled,this._closeLabel=i.closeLabel,this._tabDropdownEnabled=i.tabDropdownEnabled,this._tabDropdownLabel=i.tabDropdownLabel,this.setSide(i.side),this._canRemoveComponent=this._configClosable,this._element=document.createElement(\"section\"),this._element.classList.add(\"lm_header\"),this._controlsContainerElement=document.createElement(\"section\"),this._controlsContainerElement.classList.add(\"lm_controls\"),this._element.appendChild(this._tabsContainer.element),this._element.appendChild(this._controlsContainerElement),this._element.appendChild(this._tabsContainer.dropdownElement),this._element.addEventListener(\"click\",this._clickListener,{passive:!0}),this._element.addEventListener(\"touchstart\",this._touchStartListener,{passive:!0}),this._documentMouseUpListener=()=>this._tabsContainer.hideAdditionalTabsDropdown(),globalThis.document.addEventListener(\"mouseup\",this._documentMouseUpListener,{passive:!0}),this._tabControlOffset=this._layoutManager.layoutConfig.settings.tabControlOffset,this._tabDropdownEnabled&&(this._tabDropdownButton=new Kt(this,this._tabDropdownLabel,\"lm_tabdropdown\",(()=>this._tabsContainer.showAdditionalTabsDropdown()))),this._popoutEnabled&&(this._popoutButton=new Kt(this,this._popoutLabel,\"lm_popout\",(()=>this.handleButtonPopoutEvent()))),this._maximiseEnabled&&(this._maximiseButton=new Kt(this,this._maximiseLabel,\"lm_maximise\",(t=>this.handleButtonMaximiseToggleEvent(t)))),this._configClosable&&(this._closeButton=new Kt(this,this._closeLabel,\"lm_close\",(()=>s()))),this.processTabDropdownActiveChanged()}get show(){return this._show}get side(){return this._side}get leftRightSided(){return this._leftRightSided}get layoutManager(){return this._layoutManager}get parent(){return this._parent}get tabs(){return this._tabsContainer.tabs}get lastVisibleTabIndex(){return this._tabsContainer.lastVisibleTabIndex}get element(){return this._element}get tabsContainerElement(){return this._tabsContainer.element}get controlsContainerElement(){return this._controlsContainerElement}destroy(){this.emit(\"destroy\"),this._popoutEvent=void 0,this._maximiseToggleEvent=void 0,this._clickEvent=void 0,this._touchStartEvent=void 0,this._componentRemoveEvent=void 0,this._componentFocusEvent=void 0,this._componentDragStartEvent=void 0,this._tabsContainer.destroy(),globalThis.document.removeEventListener(\"mouseup\",this._documentMouseUpListener),this._element.remove()}createTab(t,e){this._tabsContainer.createTab(t,e)}removeTab(t){this._tabsContainer.removeTab(t)}processActiveComponentChanged(t){this._tabsContainer.processActiveComponentChanged(t),this.updateTabSizes()}setSide(t){this._side=t,this._leftRightSided=[nt.right,nt.left].includes(this._side)}setRowColumnClosable(t){this._rowColumnClosable=t,this.updateClosability()}updateClosability(){let t;if(this._configClosable)if(this._rowColumnClosable){t=!0;const e=this.tabs.length;for(let i=0;i1}applyFocusedValue(t){t?this._element.classList.add(\"lm_focused\"):this._element.classList.remove(\"lm_focused\")}processMaximised(){if(void 0===this._maximiseButton)throw new J(\"HPMAX16997\");this._maximiseButton.element.setAttribute(\"title\",this._minimiseLabel)}processMinimised(){if(void 0===this._maximiseButton)throw new J(\"HPMIN16997\");this._maximiseButton.element.setAttribute(\"title\",this._maximiseLabel)}updateTabSizes(){if(this._tabsContainer.tabCount>0){const t=this._show?this._layoutManager.layoutConfig.dimensions.headerHeight:0;let e;this._leftRightSided?(this._element.style.height=\"\",this._element.style.width=zt(t)):(this._element.style.width=\"\",this._element.style.height=zt(t)),e=this._leftRightSided?this._element.offsetHeight-this._controlsContainerElement.offsetHeight-this._tabControlOffset:this._element.offsetWidth-this._controlsContainerElement.offsetWidth-this._tabControlOffset,this._tabsContainer.updateTabSizes(e,this._getActiveComponentItemEvent())}}handleTabInitiatedComponentRemoveEvent(t){if(this._canRemoveComponent){if(void 0===this._componentRemoveEvent)throw new J(\"HHTCE22294\");this._componentRemoveEvent(t)}}handleTabInitiatedComponentFocusEvent(t){if(void 0===this._componentFocusEvent)throw new J(\"HHTAE22294\");this._componentFocusEvent(t)}handleTabInitiatedDragStartEvent(t,e,i,n){if(this._canRemoveComponent){if(void 0===this._componentDragStartEvent)throw new J(\"HHTDSE22294\");this._componentDragStartEvent(t,e,i,n)}else i.cancelDrag()}processTabDropdownActiveChanged(){void 0!==this._tabDropdownButton&&Dt(this._tabDropdownButton.element,this._tabsContainer.dropdownActive)}handleButtonPopoutEvent(){if(this._layoutManager.layoutConfig.settings.popoutWholeStack){if(void 0===this._popoutEvent)throw new J(\"HHBPOE17834\");this._popoutEvent()}else{const t=this._getActiveComponentItemEvent();t&&t.popout()}}handleButtonMaximiseToggleEvent(t){if(void 0===this._maximiseToggleEvent)throw new J(\"HHBMTE16834\");this._maximiseToggleEvent()}onClick(t){t.target===this._element&&this.notifyClick(t)}onTouchStart(t){t.target===this._element&&this.notifyTouchStart(t)}notifyClick(t){if(void 0===this._clickEvent)throw new J(\"HNHC46834\");this._clickEvent(t)}notifyTouchStart(t){if(void 0===this._touchStartEvent)throw new J(\"HNHTS46834\");this._touchStartEvent(t)}}class ee extends $t{constructor(t,e,i){var n,o,s,r,a,l,h,d,c,m,u,p,g,f,v,_,y,C,w;super(t,e,i,ee.createElement(document)),this._headerSideChanged=!1,this._resizeListener=()=>this.handleResize(),this._maximisedListener=()=>this.handleMaximised(),this._minimisedListener=()=>this.handleMinimised(),this._headerConfig=e.header;const I=t.layoutConfig.header,b=e.content;let S;if(1!==b.length)S=void 0;else{S=b[0].header}this._initialWantMaximise=e.maximised,this._initialActiveItemIndex=null!==(n=e.activeItemIndex)&&void 0!==n?n:0;const E=null!==(r=null!==(s=null===(o=this._headerConfig)||void 0===o?void 0:o.show)&&void 0!==s?s:null==S?void 0:S.show)&&void 0!==r?r:I.show,x=null!==(h=null!==(l=null===(a=this._headerConfig)||void 0===a?void 0:a.popout)&&void 0!==l?l:null==S?void 0:S.popout)&&void 0!==h?h:I.popout,L=null!==(m=null!==(c=null===(d=this._headerConfig)||void 0===d?void 0:d.maximise)&&void 0!==c?c:null==S?void 0:S.maximise)&&void 0!==m?m:I.maximise,z=null!==(g=null!==(p=null===(u=this._headerConfig)||void 0===u?void 0:u.close)&&void 0!==p?p:null==S?void 0:S.close)&&void 0!==g?g:I.close,M=null!==(_=null!==(v=null===(f=this._headerConfig)||void 0===f?void 0:f.minimise)&&void 0!==v?v:null==S?void 0:S.minimise)&&void 0!==_?_:I.minimise,P=null!==(w=null!==(C=null===(y=this._headerConfig)||void 0===y?void 0:y.tabDropdown)&&void 0!==C?C:null==S?void 0:S.tabDropdown)&&void 0!==w?w:I.tabDropdown;this._maximisedEnabled=!1!==L;const T={show:!1!==E,side:!1===E?nt.top:E,popoutEnabled:!1!==x,popoutLabel:!1===x?\"\":x,maximiseEnabled:this._maximisedEnabled,maximiseLabel:!1===L?\"\":L,closeEnabled:!1!==z,closeLabel:!1===z?\"\":z,minimiseEnabled:!0,minimiseLabel:M,tabDropdownEnabled:!1!==P,tabDropdownLabel:!1===P?\"\":P};this._header=new te(t,this,T,e.isClosable&&!1!==z,(()=>this.getActiveComponentItem()),(()=>this.remove()),(()=>this.handlePopoutEvent()),(()=>this.toggleMaximise()),(t=>this.handleHeaderClickEvent(t)),(t=>this.handleHeaderTouchStartEvent(t)),(t=>this.handleHeaderComponentRemoveEvent(t)),(t=>this.handleHeaderComponentFocusEvent(t)),((t,e,i,n)=>this.handleHeaderComponentStartDragEvent(t,e,i,n))),this.isStack=!0,this._childElementContainer=document.createElement(\"section\"),this._childElementContainer.classList.add(\"lm_items\"),this.on(\"resize\",this._resizeListener),this._maximisedEnabled&&(this.on(\"maximised\",this._maximisedListener),this.on(\"minimised\",this._minimisedListener)),this.element.appendChild(this._header.element),this.element.appendChild(this._childElementContainer),this.setupHeaderPosition(),this._header.updateClosability()}get childElementContainer(){return this._childElementContainer}get header(){return this._header}get headerShow(){return this._header.show}get headerSide(){return this._header.side}get headerLeftRightSided(){return this._header.leftRightSided}get contentAreaDimensions(){return this._contentAreaDimensions}get initialWantMaximise(){return this._initialWantMaximise}get isMaximised(){return this===this.layoutManager.maximisedStack}get stackParent(){if(!this.parent)throw new Error(\"Stack should always have a parent\");return this.parent}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}init(){if(!0===this.isInitialised)return;this.updateNodeSize();for(let t=0;t0){if(this._initialActiveItemIndex<0||this._initialActiveItemIndex>=e)throw new Error(`ActiveItemIndex out of range: ${this._initialActiveItemIndex} id: ${this.id}`);for(let i=0;ithis.contentItems.length)throw e-=1,new X(\"SAC99728\");if(t instanceof jt)return e=super.addChild(t,e),this._childElementContainer.appendChild(t.element),this._header.createTab(t,e),this.setActiveComponentItem(t,i),this._header.updateTabSizes(),this.updateSize(!1),t.container.setBaseLogicalZIndex(),this._header.updateClosability(),this.emitStateChangedEvent(),e;throw new X(\"SACC88532\")}removeChild(t,e){const i=t,n=this.contentItems.indexOf(i),o=1===this.contentItems.length;if(this._activeComponentItem===i&&(i.focused&&i.blur(),!o)){const t=0===n?1:n-1;this.setActiveComponentItem(this.contentItems[t],!1)}this._header.removeTab(i),super.removeChild(i,e),o||this._header.updateClosability(),this.emitStateChangedEvent()}toggleMaximise(){this.isMaximised?this.minimise():this.maximise()}maximise(){if(!this.isMaximised){this.layoutManager.setMaximisedStack(this);const t=this.contentItems,e=t.length;for(let i=0;i0&&void 0===t)throw new Error(\"expected non-empty stack to have an active component item\");return{type:\"stack\",content:this.calculateConfigContent(),size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,isClosable:this.isClosable,maximised:this.isMaximised,header:this.createHeaderConfig(),activeItemIndex:t}}onDrop(t,e){if(\"header\"===this._dropSegment){if(this.resetHeaderDropZone(),void 0===this._dropIndex)throw new J(\"SODDI68990\");return void this.addChild(t,this._dropIndex)}if(\"body\"===this._dropSegment)return void this.addChild(t,0,!0);const i=\"top\"===this._dropSegment||\"bottom\"===this._dropSegment,n=\"left\"===this._dropSegment||\"right\"===this._dropSegment,o=\"top\"===this._dropSegment||\"left\"===this._dropSegment,s=i&&this.stackParent.isColumn||n&&this.stackParent.isRow;if(t.isComponent){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createAndInitContentItem(e,this);i.addChild(t),t=i}if(t.type===at.row||t.type===at.column){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}if(s){const e=this.stackParent.contentItems.indexOf(this);this.stackParent.addChild(t,o?e:e+1,!0),this.size*=.5,t.size=this.size,t.sizeUnit=this.sizeUnit,this.stackParent.updateSize(!1)}else{const e=i?at.column:at.row,n=ct.createDefault(e),s=this.layoutManager.createContentItem(n,this);this.stackParent.replaceChild(this,s),s.addChild(t,o?0:void 0,!0),s.addChild(this,o?void 0:0,!0),this.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}highlightDropZone(t,e){for(const i in this._contentAreaDimensions){const n=i,o=this._contentAreaDimensions[n].hoverArea;if(o.x1t&&o.y1e)return void(\"header\"===n?(this._dropSegment=\"header\",this.highlightHeaderDropZone(this._header.leftRightSided?e:t)):(this.resetHeaderDropZone(),this.highlightBodyDropZone(n)))}}getArea(){if(\"none\"===this.element.style.display)return null;const t=super.getElementArea(this._header.element),e=super.getElementArea(this._childElementContainer);if(null===t||null===e)throw new K(\"SGAHC13086\");const i=e.x2-e.x1,n=e.y2-e.y1;return this._contentAreaDimensions={header:{hoverArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2},highlightArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2}}},0===this.contentItems.length?(this._contentAreaDimensions.body={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2}},super.getElementArea(this.element)):(this._contentAreaDimensions.left={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x1+.25*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x1+.5*i,y2:e.y2}},this._contentAreaDimensions.top={hoverArea:{x1:e.x1+.25*i,y1:e.y1,x2:e.x1+.75*i,y2:e.y1+.5*n},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y1+.5*n}},this._contentAreaDimensions.right={hoverArea:{x1:e.x1+.75*i,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1+.5*i,y1:e.y1,x2:e.x2,y2:e.y2}},this._contentAreaDimensions.bottom={hoverArea:{x1:e.x1+.25*i,y1:e.y1+.5*n,x2:e.x1+.75*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1+.5*n,x2:e.x2,y2:e.y2}},super.getElementArea(this.element))}positionHeader(t){this._header.side!==t&&(this._header.setSide(t),this._headerSideChanged=!0,this.setupHeaderPosition())}updateNodeSize(){if(\"none\"!==this.element.style.display){const t=kt(this.element);if(this._header.show){t[this._header.leftRightSided?it.width:it.height]-=this.layoutManager.layoutConfig.dimensions.headerHeight}this._childElementContainer.style.width=zt(t.width),this._childElementContainer.style.height=zt(t.height);for(let e=0;e=o&&tthis.onDrag(t,e,i))),this._dragListener.on(\"dragStop\",(()=>this.onDrop())),this.createDragProxyElements(t,e),null===this._componentItem.parent)throw new K(\"DPC10097\");this._componentItemFocused=this._componentItem.focused,this._componentItemFocused&&this._componentItem.blur(),this._componentItem.parent.removeChild(this._componentItem,!0),this.setDimensions(),document.body.appendChild(this._element),this.determineMinMaxXY(),this._layoutManager.calculateItemAreas(),this.setDropPosition(t,e)}get element(){return this._element}createDragProxyElements(t,e){this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_dragProxy\");const i=document.createElement(\"div\");i.classList.add(\"lm_header\");const n=document.createElement(\"div\");n.classList.add(\"lm_tabs\");const o=document.createElement(\"div\");o.classList.add(\"lm_tab\");const s=document.createElement(\"span\");s.classList.add(\"lm_title\"),o.appendChild(s),n.appendChild(o),i.appendChild(n),this._proxyContainerElement=document.createElement(\"div\"),this._proxyContainerElement.classList.add(\"lm_content\"),this._element.appendChild(i),this._element.appendChild(this._proxyContainerElement),this._originalParent instanceof ee&&this._originalParent.headerShow&&(this._sided=this._originalParent.headerLeftRightSided,this._element.classList.add(\"lm_\"+this._originalParent.headerSide),[nt.right,nt.bottom].indexOf(this._originalParent.headerSide)>=0&&this._proxyContainerElement.insertAdjacentElement(\"afterend\",i)),this._element.style.left=zt(t),this._element.style.top=zt(e),o.setAttribute(\"title\",this._componentItem.title),s.insertAdjacentText(\"afterbegin\",this._componentItem.title),this._proxyContainerElement.appendChild(this._componentItem.element)}determineMinMaxXY(){const t=this._layoutManager.groundItem;if(void 0===t)throw new J(\"DPDMMXY73109\");{const e=t.element.getBoundingClientRect();this._minX=e.left+document.body.scrollLeft,this._minY=e.top+document.body.scrollTop,this._maxX=this._minX+e.width,this._maxY=this._minY+e.height}}onDrag(t,e,i){const n=i.pageX,o=i.pageY;this.setDropPosition(n,o),this._componentItem.drag()}setDropPosition(t,e){this._layoutManager.layoutConfig.settings.constrainDragToContainer&&(t<=this._minX?t=Math.ceil(this._minX):t>=this._maxX&&(t=Math.floor(this._maxX)),e<=this._minY?e=Math.ceil(this._minY):e>=this._maxY&&(e=Math.floor(this._maxY))),this._element.style.left=zt(t),this._element.style.top=zt(e),this._area=this._layoutManager.getArea(t,e),null!==this._area&&(this._lastValidArea=this._area,this._area.contentItem.highlightDropZone(t,e,this._area))}onDrop(){const t=this._layoutManager.dropTargetIndicator;if(null===t)throw new K(\"DPOD30011\");let e;if(t.hide(),this._componentItem.exitDragMode(),null!==this._area)e=this._componentItem,this._area.contentItem.onDrop(e,this._area);else if(null!==this._lastValidArea){e=this._componentItem;this._lastValidArea.contentItem.onDrop(e,this._lastValidArea)}else this._originalParent?(e=this._componentItem,this._originalParent.addChild(e)):this._componentItem.destroy();this._element.remove(),this._layoutManager.emit(\"itemDropped\",this._componentItem),this._componentItemFocused&&void 0!==e&&e.focus()}setDimensions(){const t=this._layoutManager.layoutConfig.dimensions;if(void 0===t)throw new Error(\"DragProxy.setDimensions: dimensions undefined\");let e=t.dragProxyWidth,i=t.dragProxyHeight;if(void 0===e||void 0===i)throw new Error(\"DragProxy.setDimensions: width and/or height undefined\");const n=!1===this._layoutManager.layoutConfig.header.show?0:t.headerHeight;this._element.style.width=zt(e),this._element.style.height=zt(i),e-=this._sided?n:0,i-=this._sided?0:n,this._proxyContainerElement.style.width=zt(e),this._proxyContainerElement.style.height=zt(i),this._componentItem.enterDragMode(e,i),this._componentItem.show()}}class ne{constructor(t,e,i,n,o,s,r){this._layoutManager=t,this._element=e,this._extraAllowableChildTargets=i,this._componentTypeOrFtn=n,this._componentState=o,this._title=s,this._id=r,this._dragListener=null,this._dummyGroundContainer=document.createElement(\"div\");const a=gt.createDefault(\"row\");this._dummyGroundContentItem=new Yt(this._layoutManager,a,this._dummyGroundContainer),this.createDragListener()}destroy(){this.removeDragListener()}createDragListener(){this.removeDragListener(),this._dragListener=new Zt(this._element,this._extraAllowableChildTargets),this._dragListener.on(\"dragStart\",((t,e)=>this.onDragStart(t,e))),this._dragListener.on(\"dragStop\",(()=>this.onDragStop()))}onDragStart(t,e){var i;const n=\"component\";let o;if(\"function\"==typeof this._componentTypeOrFtn){const t=this._componentTypeOrFtn();o=ne.isDragSourceComponentItemConfig(t)?{type:n,componentState:t.state,componentType:t.type,title:null!==(i=t.title)&&void 0!==i?i:this._title}:t}else o={type:n,componentState:this._componentState,componentType:this._componentTypeOrFtn,title:this._title,id:this._id};const s=bt.resolve(o,!1),r=new jt(this._layoutManager,s,this._dummyGroundContentItem);if(this._dummyGroundContentItem.contentItems.push(r),null===this._dragListener)throw new K(\"DSODSD66746\");{const i=new ie(t,e,this._dragListener,this._layoutManager,r,this._dummyGroundContentItem),n=this._layoutManager.transitionIndicator;if(null===n)throw new K(\"DSODST66746\");n.transitionElements(this._element,i.element)}}onDragStop(){this.createDragListener()}removeDragListener(){null!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=null)}}!function(t){t.isDragSourceComponentItemConfig=function(t){return!(\"componentType\"in t)}}(ne||(ne={}));class oe{constructor(){this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_dropTargetIndicator\");const t=document.createElement(\"div\");t.classList.add(\"lm_inner\"),this._element.appendChild(t),document.body.appendChild(this._element)}destroy(){this._element.remove()}highlightArea(t,e){this._element.style.left=zt(t.x1+e),this._element.style.top=zt(t.y1+e),this._element.style.width=zt(t.x2-t.x1-e),this._element.style.height=zt(t.y2-t.y1-e),this._element.style.display=\"block\"}hide(){Dt(this._element,!1)}}class se{constructor(){this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_transition_indicator\"),document.body.appendChild(this._element),this._toElement=null,this._fromDimensions=null,this._totalAnimationDuration=200,this._animationStartTime=null}destroy(){this._element.remove()}transitionElements(t,e){}nextAnimationFrame(){}measure(t){const e=t.getBoundingClientRect();return{left:e.left,top:e.top,width:t.offsetWidth,height:t.offsetHeight}}}class re extends Wt{constructor(t){super(),this._layoutManager=t,this._childEventListener=t=>this.onEventFromChild(t),globalThis.addEventListener(re.ChildEventName,this._childEventListener,{passive:!0})}emit(t,...e){\"userBroadcast\"===t?this.emitUserBroadcast(...e):super.emit(t,...e)}emitUserBroadcast(...t){this.handleUserBroadcastEvent(\"userBroadcast\",t)}destroy(){globalThis.removeEventListener(re.ChildEventName,this._childEventListener)}handleUserBroadcastEvent(t,e){this._layoutManager.isSubWindow?this.propagateToParent(t,e):this.propagateToThisAndSubtree(t,e)}onEventFromChild(t){const e=t.detail;this.handleUserBroadcastEvent(e.eventName,e.args)}propagateToParent(t,e){const i={bubbles:!0,cancelable:!0,detail:{layoutManager:this._layoutManager,eventName:t,args:e}},n=new CustomEvent(re.ChildEventName,i),o=globalThis.opener;if(null===o)throw new K(\"EHPTP15778\");o.dispatchEvent(n)}propagateToThisAndSubtree(t,e){this.emitUnknown(t,...e);for(let i=0;ithis.handleContainerResize())),this._windowBeforeUnloadListener=()=>this.onBeforeUnload(),this._windowBeforeUnloadListening=!1,this._maximisedStackBeforeDestroyedListener=t=>this.cleanupBeforeMaximisedStackDestroyed(t),this.isSubWindow=t.isSubWindow,this._constructorOrSubWindowLayoutConfig=t.constructorOrSubWindowLayoutConfig,Q.checkInitialise(),dt.checkInitialise(),void 0!==t.containerElement&&(this._containerElement=t.containerElement)}get container(){return this._containerElement}get isInitialised(){return this._isInitialised}get groundItem(){return this._groundItem}get root(){return this._groundItem}get openPopouts(){return this._openPopouts}get dropTargetIndicator(){return this._dropTargetIndicator}get transitionIndicator(){return this._transitionIndicator}get width(){return this._width}get height(){return this._height}get eventHub(){return this._eventHub}get rootItem(){if(void 0===this._groundItem)throw new Error(\"Cannot access rootItem before init\");return 0===this._groundItem.contentItems.length?void 0:this._groundItem.contentItems[0]}get focusedComponentItem(){return this._focusedComponentItem}get tabDropPlaceholder(){return this._tabDropPlaceholder}get maximisedStack(){return this._maximisedStack}get deprecatedConstructor(){return!this.isSubWindow&&void 0!==this._constructorOrSubWindowLayoutConfig}destroy(){if(this._isInitialised){this._windowBeforeUnloadListening&&(globalThis.removeEventListener(\"beforeunload\",this._windowBeforeUnloadListener),this._windowBeforeUnloadListening=!1),!0===this.layoutConfig.settings.closePopoutsOnUnload&&this.closeAllOpenPopouts(),this._resizeObserver.disconnect(),this.checkClearResizeTimeout(),void 0!==this._groundItem&&this._groundItem.destroy(),this._tabDropPlaceholder.remove(),null!==this._dropTargetIndicator&&this._dropTargetIndicator.destroy(),null!==this._transitionIndicator&&this._transitionIndicator.destroy(),this._eventHub.destroy();for(const t of this._dragSources)t.destroy();this._dragSources=[],this._isInitialised=!1}}minifyConfig(t){return _t.minifyConfig(t)}unminifyConfig(t){return _t.unminifyConfig(t)}init(){let t;if(this.setContainer(),this._dropTargetIndicator=new oe,this._transitionIndicator=new se,this.updateSizeFromContainer(),this.isSubWindow){if(void 0===this._constructorOrSubWindowLayoutConfig)throw new J(\"LMIU07155\");{const e=this._constructorOrSubWindowLayoutConfig.root;if(void 0===e)throw new X(\"LMIC07156\");if(!Ct.isComponent(e))throw new X(\"LMIC07157\");t=e;const i=xt.resolve(this._constructorOrSubWindowLayoutConfig);this.layoutConfig=Object.assign(Object.assign({},i),{root:void 0})}}else void 0===this._constructorOrSubWindowLayoutConfig?this.layoutConfig=_t.createDefault():this.layoutConfig=xt.resolve(this._constructorOrSubWindowLayoutConfig);const e=this.layoutConfig;this._groundItem=new Yt(this,e.root,this._containerElement),this._groundItem.init(),this.checkLoadedLayoutMaximiseItem(),this._resizeObserver.observe(this._containerElement),this._isInitialised=!0,this.adjustColumnsResponsive(),this.emit(\"initialised\"),void 0!==t&&this.loadComponentAsRoot(t)}loadLayout(t){if(!this.isInitialised)throw new Error(\"GoldenLayout: Need to call init() if LayoutConfig with defined root passed to constructor\");if(void 0===this._groundItem)throw new J(\"LMLL11119\");this.createSubWindows(),this.layoutConfig=xt.resolve(t),this._groundItem.loadRoot(this.layoutConfig.root),this.checkLoadedLayoutMaximiseItem(),this.adjustColumnsResponsive()}saveLayout(){if(!1===this._isInitialised)throw new Error(\"Can't create config, layout not yet initialised\");if(void 0===this._groundItem)throw new J(\"LMTC18244\");{const t=this._groundItem.calculateConfigContent();let e;e=1!==t.length?void 0:t[0],this.reconcilePopoutWindows();const i=[];for(let t=0;t=0?n=this._groundItem.contentItems[0]:e=0;break;case at.row:case at.column:e=n.addItem(t,i.index);break;case at.stack:if(Ct.isComponent(t)){e=n.addItem(t,i.index);break}throw Error(tt[6]);case at.component:throw new X(\"LMAIALC87444602\");default:throw new Y(\"LMAIALU98881733\",n.type)}if(Ct.isComponent(t)){const t=n.contentItems[e];Gt.isStack(t)&&(n=t,e=0)}return i.parentItem=n,i.index=e,i}}}loadComponentAsRoot(t){if(void 0===this._groundItem)throw new Error(\"Cannot add item before init\");this._groundItem.loadComponentAsRoot(t)}updateSize(t,e){this.setSize(t,e)}setSize(t,e){if(this._width=t,this._height=e,!0===this._isInitialised){if(void 0===this._groundItem)throw new J(\"LMUS18881\");if(this._groundItem.setSize(this._width,this._height),this._maximisedStack){const{width:t,height:e}=kt(this._containerElement);Tt(this._maximisedStack.element,t),At(this._maximisedStack.element,e),this._maximisedStack.updateSize(!1)}this.adjustColumnsResponsive()}}beginSizeInvalidation(){this._sizeInvalidationBeginCount++}endSizeInvalidation(){0==--this._sizeInvalidationBeginCount&&this.updateSizeFromContainer()}updateSizeFromContainer(){const{width:t,height:e}=kt(this._containerElement);this.setSize(t,e)}updateRootSize(t=!1){if(void 0===this._groundItem)throw new J(\"LMURS28881\");this._groundItem.updateSize(t)}createAndInitContentItem(t,e){const i=this.createContentItem(t,e);return i.init(),i}createContentItem(t,e){if(\"string\"!=typeof t.type)throw new G(\"Missing parameter 'type'\",JSON.stringify(t));if(ct.isComponentItem(t)&&!(e instanceof ee)&&e&&!(!0===this.isSubWindow&&e instanceof Yt)){t={type:at.stack,content:[t],size:t.size,sizeUnit:t.sizeUnit,minSize:t.minSize,minSizeUnit:t.minSizeUnit,id:t.id,maximised:t.maximised,isClosable:t.isClosable,activeItemIndex:0,header:void 0}}return this.createContentItemFromConfig(t,e)}findFirstComponentItemById(t){if(void 0===this._groundItem)throw new J(\"LMFFCIBI82446\");return this.findFirstContentItemTypeByIdRecursive(at.component,t,this._groundItem)}createPopout(t,e,i,n){return t instanceof Gt?this.createPopoutFromContentItem(t,e,i,n):this.createPopoutFromItemConfig(t,e,i,n)}createPopoutFromContentItem(t,e,i,n){let o=t.parent,s=t;for(;null!==o&&1===o.contentItems.length&&!o.isGround;)s=o,o=o.parent;if(null===o)throw new K(\"LMCPFCI00834\");{if(void 0===n&&(n=o.contentItems.indexOf(s)),null!==i&&o.addPopInParentId(i),void 0===e){const i=globalThis.screenX||globalThis.screenLeft,n=globalThis.screenY||globalThis.screenTop,o=t.element.offsetLeft,s=t.element.offsetTop,{width:r,height:a}=kt(t.element);e={left:i+o,top:n+s,width:r,height:a}}const r=t.toConfig();if(t.remove(),ft.isRootItemConfig(r))return this.createPopoutFromItemConfig(r,e,i,n);throw new Error(`${tt[0]}`)}}beginVirtualSizedContainerAdding(){0==++this._virtualSizedContainerAddingBeginCount&&(this._virtualSizedContainers.length=0)}addVirtualSizedContainer(t){this._virtualSizedContainers.push(t)}endVirtualSizedContainerAdding(){if(0==--this._virtualSizedContainerAddingBeginCount){const t=this._virtualSizedContainers.length;if(t>0){this.fireBeforeVirtualRectingEvent(t);for(let e=0;ethis.emit(\"windowOpened\",a))),a.on(\"closed\",(()=>this.reconcilePopoutWindows())),this._openPopouts.push(a),this.layoutConfig.settings.closePopoutsOnUnload&&!this._windowBeforeUnloadListening&&(globalThis.addEventListener(\"beforeunload\",this._windowBeforeUnloadListener,{passive:!0}),this._windowBeforeUnloadListening=!0),a}closeAllOpenPopouts(){for(let t=0;tglobalThis.close()),1)}getArea(t,e){let i=null,n=1/0;for(let o=0;o=s.x1&&t=s.y1&&es.surface&&(n=s.surface,i=s)}return i}calculateItemAreas(){const t=this.getAllContentItems(),e=this._groundItem;if(void 0===e)throw new J(\"LMCIAR44365\");if(1!==t.length){e.contentItems[0].isStack?this._itemAreas=[]:this._itemAreas=e.createSideAreas();for(let e=0;e0){let e=t[0];if(Gt.isComponentItem(e)){const t=e.parent;if(null===t)throw new K(\"LMXLLMI69999\");e=t}if(!Gt.isStack(e))throw new X(\"LMCLLMI19993\");e.maximise()}}}processMaximiseStack(t){if(this._maximisedStack=t,t.on(\"beforeItemDestroyed\",this._maximisedStackBeforeDestroyedListener),t.element.classList.add(\"lm_maximised\"),t.element.insertAdjacentElement(\"afterend\",this._maximisePlaceholder),void 0===this._groundItem)throw new J(\"LMMXI19993\");{this._groundItem.element.prepend(t.element);const{width:e,height:i}=kt(this._containerElement);Tt(t.element,e),At(t.element,i),t.updateSize(!0),t.focusActiveContentItem(),this._maximisedStack.emit(\"maximised\"),this.emit(\"stateChanged\")}}processMinimiseMaximisedStack(){if(void 0===this._maximisedStack)throw new X(\"LMMMS74422\");{const t=this._maximisedStack;if(null===t.parent)throw new K(\"LMMI13668\");t.element.classList.remove(\"lm_maximised\"),this._maximisePlaceholder.insertAdjacentElement(\"afterend\",t.element),this._maximisePlaceholder.remove(),this.updateRootSize(!0),this._maximisedStack=void 0,t.off(\"beforeItemDestroyed\",this._maximisedStackBeforeDestroyedListener),t.emit(\"minimised\"),this.emit(\"stateChanged\")}}reconcilePopoutWindows(){const t=[];for(let e=0;e{this._resizeTimeoutId=void 0,this.beginSizeInvalidation(),this.endSizeInvalidation()}),this.resizeDebounceInterval))}checkClearResizeTimeout(){void 0!==this._resizeTimeoutId&&(clearTimeout(this._resizeTimeoutId),this._resizeTimeoutId=void 0)}setContainer(){var t;const e=document.body,i=null!==(t=this._containerElement)&&void 0!==t?t:e;if(i===e){this.resizeWithContainerAutomatically=!0;const t=document.documentElement;t.style.height=\"100%\",t.style.margin=\"0\",t.style.padding=\"0\",t.style.overflow=\"clip\",e.style.height=\"100%\",e.style.margin=\"0\",e.style.padding=\"0\",e.style.overflow=\"clip\"}this._containerElement=i}onBeforeUnload(){this.destroy()}adjustColumnsResponsive(){if(void 0===this._groundItem)throw new J(\"LMACR20883\");if(this._firstLoad=!1,this.useResponsiveLayout()&&!this._updatingColumnsResponsive&&this._groundItem.contentItems.length>0&&this._groundItem.contentItems[0].isRow){if(void 0===this._groundItem||null===this._width)throw new J(\"LMACR77412\");{const t=this._groundItem.contentItems[0].contentItems.length;if(t<=1)return;{const e=this.layoutConfig.dimensions.defaultMinItemWidth;if(t*e<=this._width)return;{this._updatingColumnsResponsive=!0;const i=t-Math.max(Math.floor(this._width/e),1),n=this._groundItem.contentItems[0],o=this.getAllStacks();if(0===o.length)throw new X(\"LMACRS77413\");{const t=o[0];for(let e=0;en?void 0:{parentItem:t,index:o}}}case 1:if(void 0===this._focusedComponentItem)return;{const t=this._focusedComponentItem.parentItem;return this.tryCreateLocationFromParentItem(t,e)}case 2:{const t=this.findFirstContentItemType(at.stack);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 3:{let t=this.findFirstContentItemType(at.row);return void 0!==t?this.tryCreateLocationFromParentItem(t,e):(t=this.findFirstContentItemType(at.column),void 0!==t?this.tryCreateLocationFromParentItem(t,e):void 0)}case 4:{const t=this.findFirstContentItemType(at.row);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 5:{const t=this.findFirstContentItemType(at.column);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 6:if(void 0===this._groundItem)throw new J(\"LMFLRIF18244\");return void 0!==this.rootItem?void 0:void 0===e||0===e?{parentItem:this._groundItem,index:0}:void 0;case 7:if(void 0===this._groundItem)throw new J(\"LMFLF18244\");{const t=this._groundItem.contentItems;if(0===t.length)return void 0===e||0===e?{parentItem:this._groundItem,index:0}:void 0;{const i=t[0];return this.tryCreateLocationFromParentItem(i,e)}}}}tryCreateLocationFromParentItem(t,e){const i=t.contentItems.length;return void 0===e?{parentItem:t,index:i}:e<0||e>i?void 0:{parentItem:t,index:e}}}!function(t){t.createMaximisePlaceElement=function(t){const e=t.createElement(\"div\");return e.classList.add(\"lm_maximise_place\"),e},t.createTabDropPlaceholderElement=function(t){const e=t.createElement(\"div\");return e.classList.add(\"lm_drop_tab_placeholder\"),e},t.defaultLocationSelectors=[{typeId:1,index:void 0},{typeId:2,index:void 0},{typeId:3,index:void 0},{typeId:7,index:void 0}],t.afterFocusedItemIfPossibleLocationSelectors=[{typeId:0,index:1},{typeId:2,index:void 0},{typeId:3,index:void 0},{typeId:7,index:void 0}]}(ae||(ae={}));class le extends ae{constructor(t,e,i,n){if(super(le.createLayoutManagerConstructorParameters(t,e)),this._bindComponentEventHanlderPassedInConstructor=!1,this._creationTimeoutPassed=!1,void 0!==e&&\"function\"==typeof e&&(this.bindComponentEvent=e,this._bindComponentEventHanlderPassedInConstructor=!0,void 0!==i&&(this.unbindComponentEvent=i)),!this._bindComponentEventHanlderPassedInConstructor&&this.isSubWindow){if(void 0===this._constructorOrSubWindowLayoutConfig)throw new J(\"VLC98823\");{const t=xt.resolve(this._constructorOrSubWindowLayoutConfig);this.layoutConfig=Object.assign(Object.assign({},t),{root:void 0})}}!0!==n&&(this.deprecatedConstructor||this.init())}destroy(){this.bindComponentEvent=void 0,this.unbindComponentEvent=void 0,super.destroy()}init(){if(this._bindComponentEventHanlderPassedInConstructor||\"loading\"!==document.readyState&&null!==document.body){if(!this._bindComponentEventHanlderPassedInConstructor&&!0===this.isSubWindow&&!this._creationTimeoutPassed)return setTimeout((()=>this.init()),7),void(this._creationTimeoutPassed=!0);!0===this.isSubWindow&&(this._bindComponentEventHanlderPassedInConstructor||this.clearHtmlAndAdjustStylesForSubWindow(),window.__glInstance=this),super.init()}else document.addEventListener(\"DOMContentLoaded\",(()=>this.init()),{passive:!0})}clearHtmlAndAdjustStylesForSubWindow(){const t=document.head,e=new Array(4);e[0]=document.querySelectorAll(\"body link\"),e[1]=document.querySelectorAll(\"body style\"),e[2]=document.querySelectorAll(\"template\"),e[3]=document.querySelectorAll(\".gl_keep\");for(let i=0;ithis.emit(\"popIn\"))),document.body.appendChild(t),!0}}bindComponent(t,e){if(void 0!==this.bindComponentEvent){return this.bindComponentEvent(t,e)}if(void 0!==this.getComponentEvent)return{virtual:!1,component:this.getComponentEvent(t,e)};{const t=`${tt[2]}: ${JSON.stringify(e)}`;throw new Z(t)}}unbindComponent(t,e,i){if(void 0!==this.unbindComponentEvent)this.unbindComponentEvent(t);else if(!e&&void 0!==this.releaseComponentEvent){if(void 0===i)throw new J(\"VCUCRCU333998\");this.releaseComponentEvent(t,i)}}}!function(t){let e=!1;t.createLayoutManagerConstructorParameters=function(t,i){const n=e?null:new URL(document.location.href).searchParams.get(\"gl-window\");e=!0;const o=null!==n;let s,r;if(null!==n){const e=localStorage.getItem(n);if(null===e)throw new Error(\"Null gl-window Config\");localStorage.removeItem(n);const i=JSON.parse(e),o=_t.unminifyConfig(i);r=xt.fromResolved(o),t instanceof HTMLElement&&(s=t)}else void 0===t?r=void 0:t instanceof HTMLElement?(r=void 0,s=t):r=t,void 0===s&&i instanceof HTMLElement&&(s=i);return{constructorOrSubWindowLayoutConfig:r,isSubWindow:o,containerElement:s}}}(le||(le={}));class he extends le{constructor(t,e,i){super(t,e,i,!0),this._componentTypesMap=new Map,this._registeredComponentMap=new Map,this._virtuableComponentMap=new Map,this._containerVirtualRectingRequiredEventListener=(t,e,i)=>this.handleContainerVirtualRectingRequiredEvent(t,e,i),this._containerVirtualVisibilityChangeRequiredEventListener=(t,e)=>this.handleContainerVirtualVisibilityChangeRequiredEvent(t,e),this._containerVirtualZIndexChangeRequiredEventListener=(t,e,i)=>this.handleContainerVirtualZIndexChangeRequiredEvent(t,e,i),this.deprecatedConstructor||this.init()}registerComponent(t,e,i=!1){if(\"function\"!=typeof e)throw new $(\"registerComponent() componentConstructorOrFactoryFtn parameter is not a function\");if(e.hasOwnProperty(\"prototype\")){const n=e;this.registerComponentConstructor(t,n,i)}else{const n=e;this.registerComponentFactoryFunction(t,n,i)}}registerComponentConstructor(t,e,i=!1){if(\"function\"!=typeof e)throw new Error(tt[1]);if(void 0!==this._componentTypesMap.get(t))throw new Z(`${tt[3]}: ${t}`);this._componentTypesMap.set(t,{constructor:e,factoryFunction:void 0,virtual:i})}registerComponentFactoryFunction(t,e,i=!1){if(\"function\"!=typeof e)throw new Z(\"Please register a constructor function\");if(void 0!==this._componentTypesMap.get(t))throw new Z(`${tt[3]}: ${t}`);this._componentTypesMap.set(t,{constructor:void 0,factoryFunction:e,virtual:i})}registerComponentFunction(t){this.registerGetComponentConstructorCallback(t)}registerGetComponentConstructorCallback(t){if(\"function\"!=typeof t)throw new Error(\"Please register a callback function\");void 0!==this._getComponentConstructorFtn&&console.warn(\"Multiple component functions are being registered. Only the final registered function will be used.\"),this._getComponentConstructorFtn=t}getRegisteredComponentTypeNames(){const t=this._componentTypesMap.keys();return Array.from(t)}getComponentInstantiator(t){let e;const i=pt.resolveComponentTypeName(t);return void 0!==i&&(e=this._componentTypesMap.get(i)),void 0===e&&void 0!==this._getComponentConstructorFtn&&(e={constructor:this._getComponentConstructorFtn(t),factoryFunction:void 0,virtual:!1}),e}bindComponent(t,e){let i;const n=pt.resolveComponentTypeName(e);let o;if(void 0!==n&&(i=this._componentTypesMap.get(n)),void 0===i&&void 0!==this._getComponentConstructorFtn&&(i={constructor:this._getComponentConstructorFtn(e),factoryFunction:void 0,virtual:!1}),void 0!==i){const s=i.virtual;let r,a;r=void 0===e.componentState?void 0:Ut({},e.componentState);const l=i.constructor;if(void 0!==l)a=new l(t,r,s);else{const e=i.factoryFunction;if(void 0===e)throw new X(\"LMBCFFU10008\");a=e(t,r,s)}if(s){if(void 0===a)throw new J(\"GLBCVCU988774\");{const e=a,i=e.rootHtmlElement;if(void 0===i)throw new Z(`${tt[5]}: ${n}`);!function(t){const e=\"absolute\";t.style.position!==e&&(t.style.position=e)}(i),this.container.appendChild(i),this._virtuableComponentMap.set(t,e),t.virtualRectingRequiredEvent=this._containerVirtualRectingRequiredEventListener,t.virtualVisibilityChangeRequiredEvent=this._containerVirtualVisibilityChangeRequiredEventListener,t.virtualZIndexChangeRequiredEvent=this._containerVirtualZIndexChangeRequiredEventListener}}this._registeredComponentMap.set(t,a),o={virtual:i.virtual,component:a}}else o=super.bindComponent(t,e);return o}unbindComponent(t,e,i){if(void 0===this._registeredComponentMap.get(t))super.unbindComponent(t,e,i);else{const e=this._virtuableComponentMap.get(t);if(void 0!==e){const i=e.rootHtmlElement;if(void 0===i)throw new X(\"GLUC77743\",t.title);this.container.removeChild(i),this._virtuableComponentMap.delete(t)}}}fireBeforeVirtualRectingEvent(t){this._goldenLayoutBoundingClientRect=this.container.getBoundingClientRect(),super.fireBeforeVirtualRectingEvent(t)}handleContainerVirtualRectingRequiredEvent(t,e,i){const n=this._virtuableComponentMap.get(t);if(void 0===n)throw new J(\"GLHCSCE55933\");{const o=n.rootHtmlElement;if(void 0===o)throw new Z(tt[4]+\" \"+t.title);{const n=t.element.getBoundingClientRect(),s=n.left-this._goldenLayoutBoundingClientRect.left;o.style.left=zt(s);const r=n.top-this._goldenLayoutBoundingClientRect.top;o.style.top=zt(r),Tt(o,e),At(o,i)}}}handleContainerVirtualVisibilityChangeRequiredEvent(t,e){const i=this._virtuableComponentMap.get(t);if(void 0===i)throw new J(\"GLHCVVCRE55934\");{const n=i.rootHtmlElement;if(void 0===n)throw new Z(tt[4]+\" \"+t.title);Dt(n,e)}}handleContainerVirtualZIndexChangeRequiredEvent(t,e,i){const n=this._virtuableComponentMap.get(t);if(void 0===n)throw new J(\"GLHCVZICRE55935\");{const e=n.rootHtmlElement;if(void 0===e)throw new Z(tt[4]+\" \"+t.title);e.style.zIndex=i}}}const de=\"initial_\",ce={show:\"top\",popout:!1,maximise:!1,close:\"close-tab-unused\"},me={headerHeight:31},ue={hasHeaders:!0,reorderEnabled:!0},pe={popoutWholeStack:!1,constrainDragToContainer:!1,constrainDragToHeaders:!1,preventDragout:!1,showMaximiseIcon:!1,showPopoutIcon:!1,showCloseIcon:!1,blockedPopoutsThrowError:!0,closePopoutsOnUnload:!0,selectionEnabled:!1};var ge,fe;class ve{constructor(e){this.layout=e,ge.set(this,void 0),fe.set(this,void 0),this.handleResize=t=>{t.forEach((t=>this.resizeElement(t.target)))},this.handleMutation=()=>{this.layout.viewComponentsByContainerElement.forEach((t=>{this.resizeElement(t.container.element)}))},t.__classPrivateFieldSet(this,ge,new ResizeObserver(this.handleResize),\"f\"),t.__classPrivateFieldSet(this,fe,new MutationObserver(this.handleMutation),\"f\")}observeMutations(e){t.__classPrivateFieldGet(this,fe,\"f\")?.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[\"class\"]})}destroy(){t.__classPrivateFieldGet(this,ge,\"f\").disconnect(),t.__classPrivateFieldGet(this,fe,\"f\").disconnect()}observeContainer(e){t.__classPrivateFieldGet(this,ge,\"f\").observe(e)}unobserveContainer(e){t.__classPrivateFieldGet(this,ge,\"f\").unobserve(e)}resizeElement(t){const e=this.layout.viewComponentsByContainerElement.get(t);e&&e.resize()}}ge=new WeakMap,fe=new WeakMap;var _e={};Object.defineProperty(_e,\"__esModule\",{value:!0});var ye=_e.BaseItem=void 0;class Ce{constructor(t,e,i){this._item=t,this._layout=e,this._wrap=i}get raw(){return this._item}get layout(){return this._layout}get type(){return this._item.type}get contentItems(){return(this._item.contentItems??[]).map((t=>this._wrap(t)))}get parent(){const t=this._item.parent;return t?this._wrap(t):null}setActiveContentItem(t,e){if(\"stack\"!==this.type)throw new Error(`Cannot call setActiveContentItem from a non-stack item: ${this.type}`);this._item.setActiveContentItem(t.raw,e)}static wrapInternal(t,e,i){const n=Ce.wrapCache.get(e);if(n)return n;const o=new t(e,i,(e=>Ce.wrapInternal(t,e,i)));return Ce.wrapCache.set(e,o),o}}ye=_e.BaseItem=Ce,Ce.wrapCache=new WeakMap;const we=t=>!!t&&\"contentItems\"in t&&(t.isRow||t.isColumn);class Ie extends ye{isRoot(){return!!this._item.parent?.isGround}getBounds(){return this._item.element.getBoundingClientRect()}get viewName(){if(this._item.isComponent){const{component:t}=this._item;return t.identity.name}throw new Error(\"View name not found\")}onDestroyed(t){const e=({target:i})=>{i===this._item&&(t(),this._item.off(\"itemDestroyed\",e))};this._item.on(\"itemDestroyed\",e)}createAdjacentStack({position:t=\"right\"}={}){const e=this.raw;if(ee.isStack(e)&&e.parent){const i=[\"top\",\"bottom\"].includes(t)?\"column\":\"row\",n=[\"left\",\"top\"].includes(t)?1:0,o=we(e.parent)?e.parent:e.layoutManager,s=o,r=e.parent.contentItems.indexOf(e);e.parent.isGround&&e.parent.removeChild(e,!0);const a=o.newItem({type:i,content:[{type:\"stack\",content:[]}]},r);if(!a)throw new Error(\"createAdjacentStack: Failed to create new container\");const l=a.contentItems[0];return a.addChild(this.raw,n),we(s)&&s.removeChild(e,!0),this._wrap(l)}throw new Error(`Cannot creat adjacent stacks for type: ${e.type}, must be type 'stack'`)}setActiveContentItem(t,e=!0){if(!ee.isStack(this._item))throw new Error(`Cannot call setActiveContentItem from a non-stack item: ${this.type}`);this._item.setActiveComponentItem(t.raw,!e)}static wrap(t,e){return ye.wrapInternal(Ie,t,e)}}function be(t=[],e){for(const i of t)\"component\"===i.type?Object.keys(e).forEach((t=>{t in i&&(i.componentState={[`${de}${t}`]:i[t],...i.componentState}),i[t]=e[t]})):be(i.content,e)}function Se(t=[],e,i){for(const n of t)if(\"component\"===n.type)Object.keys(e).forEach((t=>{if(`${de}${t}`in n.componentState)return n[t]=n.componentState[`${de}${t}`],void delete n.componentState[`${de}${t}`];n[t]=e[t]}));else{if(n.size&&(\"row\"===i||\"column\"===i)){n[\"row\"===i?\"width\":\"height\"]=n.size?.includes(\".\")?parseFloat(n.size):parseInt(n.size)}Se(n.content,e,n.type)}}function Ee(t){if(t.root){t.root.content&&Se([t.root],{componentName:\"view\",isClosable:!0});const e=t.root;t.content=[e],delete t.root}return t}const xe=e=>class extends e{connectedCallback(){if(!this.name||!this.uuid)throw new Error(\" Name or uuid attribute missing\");if(!this.src)throw new Error(\" missing 'src' attribute.\");this.#t||(this.#t=document.createElement(\"iframe\"),this.#t.src=this.src,this.#t.style.height=\"100%\",this.#t.style.width=\"100%\",this.#t.style.border=\"none\",this.forceFrameName?this.#t.setAttribute(\"name\",this.forceFrameName):this.#t.setAttribute(\"name\",t.encodeOptions({brokerUrl:this.brokerUrl,name:this.name,uuid:this.uuid,providerId:this.providerId,contextGroup:this.contextGroup},\"of-frame\")),this.#t.setAttribute(\"id\",this.name),this.appendChild(this.#t))}#t;get brokerUrl(){return this.getAttribute(\"of-broker\")}set brokerUrl(t){t&&this.setAttribute(\"of-broker\",t)}get name(){return this.getAttribute(\"of-name\")}set name(t){t&&this.setAttribute(\"of-name\",t)}get forceFrameName(){return this.getAttribute(\"forceFrameName\")}set forceFrameName(t){t&&this.setAttribute(\"forceFrameName\",t)}get uuid(){return this.getAttribute(\"of-uuid\")}set uuid(t){t&&this.setAttribute(\"of-uuid\",t)}get src(){return this.getAttribute(\"src\")}set src(t){t&&this.setAttribute(\"src\",t)}get providerId(){return this.getAttribute(\"of-provider-id\")}set providerId(t){t&&this.setAttribute(\"of-provider-id\",t)}get contextGroup(){return this.getAttribute(\"of-context-group\")}set contextGroup(t){t&&this.setAttribute(\"of-context-group\",t)}static get observedAttributes(){return[\"name\"]}};class Le{static create(t){const e=document.createElement(\"of-view\");return Object.entries(t).forEach((([t,i])=>{e.setAttribute(t,i)})),e}}customElements.define(\"of-view\",xe(HTMLElement));class ze{constructor(t,i,n,{brokerUrl:o,interopConfig:s},r){this.container=t,this.config=i,this.ofView=null,this.isDragging=()=>this.container.tab.element?.className.includes(\"lm_dragging\")??!1;const{url:a,web:l,interop:h,name:d}=i||{},c=d??`internal-generated-view-${e.v4()}`;if(this.identity={uuid:n,name:c},this.container.element.setAttribute(\"of-name\",c),this.container.element.id=`container-${c}`,this.container.parent.id=c,void 0===a)return void this.handleUrlMissing();const m=this.updateTitleIfNotSet(a),u={\"of-broker\":o,\"of-uuid\":n,\"of-name\":c,src:a};l?.frameName&&(u.forceFrameName=l.frameName);const p=h?.currentContextGroup??s?.currentContextGroup;p&&(u[\"of-context-group\"]=p),s?.providerId&&(u[\"of-provider-id\"]=s?.providerId),this.ofView=Le.create(u),this.ofView.title=m??`Iframe: ${a}`,r.appendChild(this.ofView),this.ofView.style.position=\"absolute\"}updateTitleIfNotSet(t){return\"view\"===this.container.parent.title&&this.container.parent.setTitle(t),this.container.parent.title}handleUrlMissing(){const t=document.createElement(\"div\");t.setAttribute(\"style\",\"padding: 20px\");t.innerText=\"No URL provided\",this.container.element.appendChild(t)}destroy(){this.ofView?.remove(),this.ofView=null}closeView(){this.container.close()}resize(){if(this.ofView){if(this.isDragging())return void(this.ofView.style.display=\"none\");const t=this.container.element.getBoundingClientRect();this.ofView.style.position=\"absolute\",this.ofView.style.height=`${t.height}px`,this.ofView.style.width=`${t.width}px`,this.ofView.style.inset=`${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`,this.ofView.style.display=\"block\"}}}class Me extends U{static overrideConfig(t){const e={...ue,...t.settings,...pe};return e.reorderEnabled?be(t.content,{isClosable:!0}):be(t.content,{reorderEnabled:!1}),{dimensions:me,...t,settings:e,header:{...ce,show:!1!==t.settings?.hasHeaders&&ce.show}}}constructor(t,e,i,{options:n},o,s){super(),this.identity=t,this.container=e,this.initialConfig=i,this.layoutManager=o,this.platformProvider=s,this.viewComponentsByContainerElement=new Map,this.layoutContentCache=_.getSingleInstance(),this.reparentingViews=new Set,this.goldenLayoutDestroyed=!1,this.createViewComponent=(t,e)=>{m.handleSharedView(this.layoutManager,this.identity,e);const i=new ze(t,e,this.identity.uuid,this.options,this.iframeContainer);return e&&!1===e[`${de}isClosable`]&&this.stylesheet.insertRule(`#tab-${i.identity.name} .lm_close_tab { display: none; }`),this.viewComponentsByContainerElement.set(t.element,i),this.resizeController.observeContainer(t.element),i},this.iframeContainer=document.createElement(\"div\"),this.iframeContainer.id=`openfin-layout-iframe-container-${this.identity.layoutName}`,this.domEmitter=new V(e),this.setupStylesheets(),this.layout=new he(this.container),this.layout.resizeWithContainerAutomatically=!0,this.options=n,this.layout.registerComponent(\"view\",this.createViewComponent),this.setupListeners(),this.resizeController=new ve(this),this.layout.loadLayout(Me.overrideConfig(i));const r=document.createElement(\"div\");r.id=`openfin-layout-shadow-container-${this.identity.layoutName}`,r.attachShadow({mode:\"open\",delegatesFocus:!1}).appendChild(this.iframeContainer),this.container.appendChild(r),this.resizeController.observeMutations(this.container)}getStackByView({name:t}){const e=this.layout.findFirstComponentItemById(t);if(e?.parent&&e?.parent?.isStack)return Ie.wrap(e.parent,this)}getRoot(){return Ie.wrap(this.layout.rootItem,this)}async platformCloseView(t){const e=[...this.viewComponentsByContainerElement.values()].find((e=>e.identity.name===t.name));if(!e)throw new Error(`View with name: ${t.name} not found in layout.`);e.closeView()}async platformCreateView(t,{location:e,targetView:i}={}){if(i)throw new Error(\"TargetView not supported in web\");const n={options:this.platformProvider.normalizeOptions(t),target:this.identity,location:e};return this.insertView(n)}setupStylesheets(){if(this.container.setAttribute(\"data-openfin-layout-name\",this.identity.layoutName),this.stylesheet=new CSSStyleSheet,this.stylesheet.insertRule(\".lm_close { display: none; }\"),document.adoptedStyleSheets.push(this.stylesheet),this.initialConfig.settings?.preventSplitterResize){const t=`\\n [data-openfin-layout-name='${this.identity.layoutName}'] .lm_splitter {\\n pointer-events: none;\\n }`;this.stylesheet.insertRule(t)}}insertView({options:t,location:e,targetView:i}){const n=e?this.layoutContentCache.getItemOrUndefined(e.id):void 0,o=i?this.layoutContentCache.getItemOrUndefined(i.name):void 0,s=n??o??Ie.wrap(this.layout.rootItem,this);let r;if(ee.isStack(s.raw))r=s.raw;else{if(!we(s.raw))throw new Error(\"Cannot add a view at the requested location\");r=s.raw.newItem({type:\"stack\",content:[]})}const a=Math.min(r.contentItems.length,e?.index??r.contentItems.length);let l=this.layout.findFirstComponentItemById(t.name);l?(l.parent&&l.parent.removeChild(l,!0),r.addChild(l,a)):l=r.newComponent(\"view\",t,t.title??t.url??\"Default Title\",a);const h=l.component.identity;return Promise.resolve({identity:h})}replaceView({viewToReplace:t,newView:e}){throw new Error(\"Method not implemented.\")}replaceLayout(t){throw new Error(\"Method not implemented.\")}async cleanupView(t){}applyPreset(t){throw new Error(\"Method not implemented.\")}getCurrentViews(){return[...this.viewComponentsByContainerElement.values()].map((t=>t.identity))}async getFrameSnapshot(){return Ee(xt.fromResolved(this.layout.toConfig()))}isVisible(){return W(this.container)}async onViewDetached({viewIdentity:t}){this.reparentingViews.add(t.name),this.platformCloseView(t)}async destroy(){this.goldenLayoutDestroyed||(this.goldenLayoutDestroyed=!0,this.layout.destroy()),this.iframeContainer.remove(),this.resizeController.destroy(),document.adoptedStyleSheets=document.adoptedStyleSheets.filter((t=>t!==this.stylesheet)),this.viewComponentsByContainerElement.clear()}setupListeners(){this.container.addEventListener(\"pointerdown\",(t=>{if(t.target instanceof HTMLElement){const e=t.target.classList;[\"lm_tab\",\"lm_title\",\"lm_splitter\",\"lm_drag_handle\"].some((t=>e.contains(t)))&&(this.handleDragStart(),2===t.button&&t.stopPropagation())}}),!0),document.addEventListener(\"pointerup\",(()=>this.handleDragEnd()),!0),this.layout.on(\"tabCreated\",(t=>{const e=t.componentItem.component;t.element.id=`tab-${e.identity.name}`,this.domEmitter.dispatchLocalEvent(\"tab-created\",e.identity)})),this.layout.on(\"itemCreated\",(({target:t})=>{const e=t;if(Gt.isComponentItem(e)){const t=e.component;this.domEmitter.dispatchLocalEvent(\"container-created\",t.identity)}})),this.layout.on(\"itemDestroyed\",(t=>{const e=t.target;if(Gt.isComponentItem(e)){const t=e.component;this.removeViewComponent(t)}})),this.layout.on(\"itemDropped\",(()=>{this.handleDragEnd()}))}handleDragStart(){this.iframeContainer.style.pointerEvents=\"none\"}handleDragEnd(){this.iframeContainer.style.pointerEvents=\"\"}removeViewComponent(t){if(t.config&&!1===t.config[`${de}isClosable`]){const e=[...this.stylesheet.cssRules].findIndex((e=>e.cssText.includes(`#tab-${t.identity.name}`)));this.stylesheet.deleteRule(e)}t.destroy(),this.viewComponentsByContainerElement.delete(t.container.element),this.resizeController.unobserveContainer(t.container.element),this.reparentingViews.has(t.identity.name)?this.reparentingViews.delete(t.identity.name):this.platformProvider.closeView(t.identity.name);0===this.getCurrentViews().length&&(this.goldenLayoutDestroyed||(this.goldenLayoutDestroyed=!0,m.handleLastViewRemoved(this.layoutManager,this.identity)))}}class Pe{constructor(t,e,i,n){this.windowIdentity=t,this.connectConfig=e,this.provider=i,this.fallbackContainer=n}async createLayout(t,e){if(!(\"container\"in t)&&!this.fallbackContainer)throw new Error(\"Container property is not optional in web\");const{layoutName:i}=t,n=t,o=this.provider.initLayoutViews(n),s=n.container??this.fallbackContainer,r={...this.windowIdentity,layoutName:i},a=new Me(r,s,o,this.connectConfig,e,this.provider);m.registerLayout(e,i,a),this.fallbackContainer=null}async getLayoutSnapshot(t){return t.getLayoutSnapshot()}async handleLastViewRemoved(t){}}class Te{static async init(e){const i=e.getFin().InterApplicationBus.Channel,n=await i.create(`custom-frame-${e.me.uuid}`);return n.setDefaultAction((async(t,{target:e,opts:i},o)=>{const s=n.connections.find((t=>t.name===e.name));if(s)return n.dispatch(s,t,{...i,target:e});throw new Error(`Client with name ${e.name} not found`)})),await t.relayChannelClientApi_1(n,\"layout-relay\"),new Te(e)}constructor(t){this.wire=t,this.viewNames=new Set}normalizeOptions(t,i=\"default\"){const n=this.wire.me.uuid;let{name:o=`internal-generated-view-${e.v4()}`}=t;return o.match(/^internal-generated-view-/)&&this.viewNames.has(o)&&\"duplicate\"===i&&(o=`internal-generated-view-${e.v4()}`),this.viewNames.add(o),{...t,name:o,uuid:n}}closeView(t){this.viewNames.delete(t)}initLayoutViews({layout:t,multiInstanceViewBehavior:e}){return H((t=>{if(\"component\"===t.type&&t.componentState){const i=this.normalizeOptions(t.componentState,e);return{...t,componentState:i}}return t}),t)}}var Ae;const ke=t=>t;Ae=new WeakMap,exports.WebLayoutEntryPoint=class{constructor(e){Ae.set(this,void 0),this.initLayoutManager=async(e,i,{container:n,layoutManagerOverride:o})=>{const s=await Te.init(i),r=o??ke,a=new Pe(i.me,t.__classPrivateFieldGet(this,Ae,\"f\"),s,n),l=new(r(m.createClosedConstructor(a)));return await M(i,l),l},this.applyLayoutSnapshot=async(e,i,n)=>{await i.applyLayoutSnapshot(t.__classPrivateFieldGet(this,Ae,\"f\").platform.layoutSnapshot)},this.createLayout=async(t,e)=>m.createLayout(t,e),this.destroyLayout=async(t,e)=>m.destroyLayout(t,e),t.__classPrivateFieldSet(this,Ae,e,\"f\")}};\n","'use strict'\n\nexports.byteLength = byteLength\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\nfor (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i]\n revLookup[code.charCodeAt(i)] = i\n}\n\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction getLens (b64) {\n var len = b64.length\n\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // Trim off extra bytes after placeholder bytes are found\n // See: https://github.com/beatgammit/base64-js/issues/42\n var validLen = b64.indexOf('=')\n if (validLen === -1) validLen = len\n\n var placeHoldersLen = validLen === len\n ? 0\n : 4 - (validLen % 4)\n\n return [validLen, placeHoldersLen]\n}\n\n// base64 is 4/3 + up to two characters of the original data\nfunction byteLength (b64) {\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction _byteLength (b64, validLen, placeHoldersLen) {\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction toByteArray (b64) {\n var tmp\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n\n var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))\n\n var curByte = 0\n\n // if there are placeholders, only get up to the last complete 4 chars\n var len = placeHoldersLen > 0\n ? validLen - 4\n : validLen\n\n var i\n for (i = 0; i < len; i += 4) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 18) |\n (revLookup[b64.charCodeAt(i + 1)] << 12) |\n (revLookup[b64.charCodeAt(i + 2)] << 6) |\n revLookup[b64.charCodeAt(i + 3)]\n arr[curByte++] = (tmp >> 16) & 0xFF\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 2) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 2) |\n (revLookup[b64.charCodeAt(i + 1)] >> 4)\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 1) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 10) |\n (revLookup[b64.charCodeAt(i + 1)] << 4) |\n (revLookup[b64.charCodeAt(i + 2)] >> 2)\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] +\n lookup[num >> 12 & 0x3F] +\n lookup[num >> 6 & 0x3F] +\n lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n var tmp\n var output = []\n for (var i = start; i < end; i += 3) {\n tmp =\n ((uint8[i] << 16) & 0xFF0000) +\n ((uint8[i + 1] << 8) & 0xFF00) +\n (uint8[i + 2] & 0xFF)\n output.push(tripletToBase64(tmp))\n }\n return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n var tmp\n var len = uint8.length\n var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n var parts = []\n var maxChunkLength = 16383 // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1]\n parts.push(\n lookup[tmp >> 2] +\n lookup[(tmp << 4) & 0x3F] +\n '=='\n )\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + uint8[len - 1]\n parts.push(\n lookup[tmp >> 10] +\n lookup[(tmp >> 4) & 0x3F] +\n lookup[(tmp << 2) & 0x3F] +\n '='\n )\n }\n\n return parts.join('')\n}\n","/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n/* eslint-disable no-proto */\n\n'use strict'\n\nconst base64 = require('base64-js')\nconst ieee754 = require('ieee754')\nconst customInspectSymbol =\n (typeof Symbol === 'function' && typeof Symbol['for'] === 'function') // eslint-disable-line dot-notation\n ? Symbol['for']('nodejs.util.inspect.custom') // eslint-disable-line dot-notation\n : null\n\nexports.Buffer = Buffer\nexports.SlowBuffer = SlowBuffer\nexports.INSPECT_MAX_BYTES = 50\n\nconst K_MAX_LENGTH = 0x7fffffff\nexports.kMaxLength = K_MAX_LENGTH\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Print warning and recommend using `buffer` v4.x which has an Object\n * implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * We report that the browser does not support typed arrays if the are not subclassable\n * using __proto__. Firefox 4-29 lacks support for adding new properties to `Uint8Array`\n * (See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438). IE 10 lacks support\n * for __proto__ and has a buggy typed array implementation.\n */\nBuffer.TYPED_ARRAY_SUPPORT = typedArraySupport()\n\nif (!Buffer.TYPED_ARRAY_SUPPORT && typeof console !== 'undefined' &&\n typeof console.error === 'function') {\n console.error(\n 'This browser lacks typed array (Uint8Array) support which is required by ' +\n '`buffer` v5.x. Use `buffer` v4.x if you require old browser support.'\n )\n}\n\nfunction typedArraySupport () {\n // Can typed array instances can be augmented?\n try {\n const arr = new Uint8Array(1)\n const proto = { foo: function () { return 42 } }\n Object.setPrototypeOf(proto, Uint8Array.prototype)\n Object.setPrototypeOf(arr, proto)\n return arr.foo() === 42\n } catch (e) {\n return false\n }\n}\n\nObject.defineProperty(Buffer.prototype, 'parent', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.buffer\n }\n})\n\nObject.defineProperty(Buffer.prototype, 'offset', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.byteOffset\n }\n})\n\nfunction createBuffer (length) {\n if (length > K_MAX_LENGTH) {\n throw new RangeError('The value \"' + length + '\" is invalid for option \"size\"')\n }\n // Return an augmented `Uint8Array` instance\n const buf = new Uint8Array(length)\n Object.setPrototypeOf(buf, Buffer.prototype)\n return buf\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new TypeError(\n 'The \"string\" argument must be of type string. Received type number'\n )\n }\n return allocUnsafe(arg)\n }\n return from(arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\nfunction from (value, encodingOrOffset, length) {\n if (typeof value === 'string') {\n return fromString(value, encodingOrOffset)\n }\n\n if (ArrayBuffer.isView(value)) {\n return fromArrayView(value)\n }\n\n if (value == null) {\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n }\n\n if (isInstance(value, ArrayBuffer) ||\n (value && isInstance(value.buffer, ArrayBuffer))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof SharedArrayBuffer !== 'undefined' &&\n (isInstance(value, SharedArrayBuffer) ||\n (value && isInstance(value.buffer, SharedArrayBuffer)))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof value === 'number') {\n throw new TypeError(\n 'The \"value\" argument must not be of type number. Received type number'\n )\n }\n\n const valueOf = value.valueOf && value.valueOf()\n if (valueOf != null && valueOf !== value) {\n return Buffer.from(valueOf, encodingOrOffset, length)\n }\n\n const b = fromObject(value)\n if (b) return b\n\n if (typeof Symbol !== 'undefined' && Symbol.toPrimitive != null &&\n typeof value[Symbol.toPrimitive] === 'function') {\n return Buffer.from(value[Symbol.toPrimitive]('string'), encodingOrOffset, length)\n }\n\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n return from(value, encodingOrOffset, length)\n}\n\n// Note: Change prototype *after* Buffer.from is defined to workaround Chrome bug:\n// https://github.com/feross/buffer/pull/148\nObject.setPrototypeOf(Buffer.prototype, Uint8Array.prototype)\nObject.setPrototypeOf(Buffer, Uint8Array)\n\nfunction assertSize (size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be of type number')\n } else if (size < 0) {\n throw new RangeError('The value \"' + size + '\" is invalid for option \"size\"')\n }\n}\n\nfunction alloc (size, fill, encoding) {\n assertSize(size)\n if (size <= 0) {\n return createBuffer(size)\n }\n if (fill !== undefined) {\n // Only pay attention to encoding if it's a string. This\n // prevents accidentally sending in a number that would\n // be interpreted as a start offset.\n return typeof encoding === 'string'\n ? createBuffer(size).fill(fill, encoding)\n : createBuffer(size).fill(fill)\n }\n return createBuffer(size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n return alloc(size, fill, encoding)\n}\n\nfunction allocUnsafe (size) {\n assertSize(size)\n return createBuffer(size < 0 ? 0 : checked(size) | 0)\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n return allocUnsafe(size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n return allocUnsafe(size)\n}\n\nfunction fromString (string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8'\n }\n\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n\n const length = byteLength(string, encoding) | 0\n let buf = createBuffer(length)\n\n const actual = buf.write(string, encoding)\n\n if (actual !== length) {\n // Writing a hex string, for example, that contains invalid characters will\n // cause everything after the first invalid character to be ignored. (e.g.\n // 'abxxcd' will be treated as 'ab')\n buf = buf.slice(0, actual)\n }\n\n return buf\n}\n\nfunction fromArrayLike (array) {\n const length = array.length < 0 ? 0 : checked(array.length) | 0\n const buf = createBuffer(length)\n for (let i = 0; i < length; i += 1) {\n buf[i] = array[i] & 255\n }\n return buf\n}\n\nfunction fromArrayView (arrayView) {\n if (isInstance(arrayView, Uint8Array)) {\n const copy = new Uint8Array(arrayView)\n return fromArrayBuffer(copy.buffer, copy.byteOffset, copy.byteLength)\n }\n return fromArrayLike(arrayView)\n}\n\nfunction fromArrayBuffer (array, byteOffset, length) {\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\"offset\" is outside of buffer bounds')\n }\n\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\"length\" is outside of buffer bounds')\n }\n\n let buf\n if (byteOffset === undefined && length === undefined) {\n buf = new Uint8Array(array)\n } else if (length === undefined) {\n buf = new Uint8Array(array, byteOffset)\n } else {\n buf = new Uint8Array(array, byteOffset, length)\n }\n\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(buf, Buffer.prototype)\n\n return buf\n}\n\nfunction fromObject (obj) {\n if (Buffer.isBuffer(obj)) {\n const len = checked(obj.length) | 0\n const buf = createBuffer(len)\n\n if (buf.length === 0) {\n return buf\n }\n\n obj.copy(buf, 0, 0, len)\n return buf\n }\n\n if (obj.length !== undefined) {\n if (typeof obj.length !== 'number' || numberIsNaN(obj.length)) {\n return createBuffer(0)\n }\n return fromArrayLike(obj)\n }\n\n if (obj.type === 'Buffer' && Array.isArray(obj.data)) {\n return fromArrayLike(obj.data)\n }\n}\n\nfunction checked (length) {\n // Note: cannot use `length < K_MAX_LENGTH` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= K_MAX_LENGTH) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + K_MAX_LENGTH.toString(16) + ' bytes')\n }\n return length | 0\n}\n\nfunction SlowBuffer (length) {\n if (+length != length) { // eslint-disable-line eqeqeq\n length = 0\n }\n return Buffer.alloc(+length)\n}\n\nBuffer.isBuffer = function isBuffer (b) {\n return b != null && b._isBuffer === true &&\n b !== Buffer.prototype // so Buffer.isBuffer(Buffer.prototype) will be false\n}\n\nBuffer.compare = function compare (a, b) {\n if (isInstance(a, Uint8Array)) a = Buffer.from(a, a.offset, a.byteLength)\n if (isInstance(b, Uint8Array)) b = Buffer.from(b, b.offset, b.byteLength)\n if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n throw new TypeError(\n 'The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array'\n )\n }\n\n if (a === b) return 0\n\n let x = a.length\n let y = b.length\n\n for (let i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i]\n y = b[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n switch (String(encoding).toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'latin1':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return true\n default:\n return false\n }\n}\n\nBuffer.concat = function concat (list, length) {\n if (!Array.isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n\n if (list.length === 0) {\n return Buffer.alloc(0)\n }\n\n let i\n if (length === undefined) {\n length = 0\n for (i = 0; i < list.length; ++i) {\n length += list[i].length\n }\n }\n\n const buffer = Buffer.allocUnsafe(length)\n let pos = 0\n for (i = 0; i < list.length; ++i) {\n let buf = list[i]\n if (isInstance(buf, Uint8Array)) {\n if (pos + buf.length > buffer.length) {\n if (!Buffer.isBuffer(buf)) buf = Buffer.from(buf)\n buf.copy(buffer, pos)\n } else {\n Uint8Array.prototype.set.call(\n buffer,\n buf,\n pos\n )\n }\n } else if (!Buffer.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n } else {\n buf.copy(buffer, pos)\n }\n pos += buf.length\n }\n return buffer\n}\n\nfunction byteLength (string, encoding) {\n if (Buffer.isBuffer(string)) {\n return string.length\n }\n if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) {\n return string.byteLength\n }\n if (typeof string !== 'string') {\n throw new TypeError(\n 'The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. ' +\n 'Received type ' + typeof string\n )\n }\n\n const len = string.length\n const mustMatch = (arguments.length > 2 && arguments[2] === true)\n if (!mustMatch && len === 0) return 0\n\n // Use a for loop to avoid recursion\n let loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'ascii':\n case 'latin1':\n case 'binary':\n return len\n case 'utf8':\n case 'utf-8':\n return utf8ToBytes(string).length\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return len * 2\n case 'hex':\n return len >>> 1\n case 'base64':\n return base64ToBytes(string).length\n default:\n if (loweredCase) {\n return mustMatch ? -1 : utf8ToBytes(string).length // assume utf8\n }\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n let loweredCase = false\n\n // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n // property of a typed array.\n\n // This behaves neither like String nor Uint8Array in that we set start/end\n // to their upper/lower bounds if the value passed is out of range.\n // undefined is handled specially as per ECMA-262 6th Edition,\n // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n if (start === undefined || start < 0) {\n start = 0\n }\n // Return early if start > this.length. Done here to prevent potential uint32\n // coercion fail below.\n if (start > this.length) {\n return ''\n }\n\n if (end === undefined || end > this.length) {\n end = this.length\n }\n\n if (end <= 0) {\n return ''\n }\n\n // Force coercion to uint32. This will also coerce falsey/NaN values to 0.\n end >>>= 0\n start >>>= 0\n\n if (end <= start) {\n return ''\n }\n\n if (!encoding) encoding = 'utf8'\n\n while (true) {\n switch (encoding) {\n case 'hex':\n return hexSlice(this, start, end)\n\n case 'utf8':\n case 'utf-8':\n return utf8Slice(this, start, end)\n\n case 'ascii':\n return asciiSlice(this, start, end)\n\n case 'latin1':\n case 'binary':\n return latin1Slice(this, start, end)\n\n case 'base64':\n return base64Slice(this, start, end)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return utf16leSlice(this, start, end)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = (encoding + '').toLowerCase()\n loweredCase = true\n }\n }\n}\n\n// This property is used by `Buffer.isBuffer` (and the `is-buffer` npm package)\n// to detect a Buffer instance. It's not possible to use `instanceof Buffer`\n// reliably in a browserify context because there could be multiple different\n// copies of the 'buffer' package in use. This method works even for Buffer\n// instances that were created from another copy of the `buffer` package.\n// See: https://github.com/feross/buffer/issues/154\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n const i = b[n]\n b[n] = b[m]\n b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n const len = this.length\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits')\n }\n for (let i = 0; i < len; i += 2) {\n swap(this, i, i + 1)\n }\n return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n const len = this.length\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits')\n }\n for (let i = 0; i < len; i += 4) {\n swap(this, i, i + 3)\n swap(this, i + 1, i + 2)\n }\n return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n const len = this.length\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits')\n }\n for (let i = 0; i < len; i += 8) {\n swap(this, i, i + 7)\n swap(this, i + 1, i + 6)\n swap(this, i + 2, i + 5)\n swap(this, i + 3, i + 4)\n }\n return this\n}\n\nBuffer.prototype.toString = function toString () {\n const length = this.length\n if (length === 0) return ''\n if (arguments.length === 0) return utf8Slice(this, 0, length)\n return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.toLocaleString = Buffer.prototype.toString\n\nBuffer.prototype.equals = function equals (b) {\n if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n if (this === b) return true\n return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n let str = ''\n const max = exports.INSPECT_MAX_BYTES\n str = this.toString('hex', 0, max).replace(/(.{2})/g, '$1 ').trim()\n if (this.length > max) str += ' ... '\n return ''\n}\nif (customInspectSymbol) {\n Buffer.prototype[customInspectSymbol] = Buffer.prototype.inspect\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n if (isInstance(target, Uint8Array)) {\n target = Buffer.from(target, target.offset, target.byteLength)\n }\n if (!Buffer.isBuffer(target)) {\n throw new TypeError(\n 'The \"target\" argument must be one of type Buffer or Uint8Array. ' +\n 'Received type ' + (typeof target)\n )\n }\n\n if (start === undefined) {\n start = 0\n }\n if (end === undefined) {\n end = target ? target.length : 0\n }\n if (thisStart === undefined) {\n thisStart = 0\n }\n if (thisEnd === undefined) {\n thisEnd = this.length\n }\n\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError('out of range index')\n }\n\n if (thisStart >= thisEnd && start >= end) {\n return 0\n }\n if (thisStart >= thisEnd) {\n return -1\n }\n if (start >= end) {\n return 1\n }\n\n start >>>= 0\n end >>>= 0\n thisStart >>>= 0\n thisEnd >>>= 0\n\n if (this === target) return 0\n\n let x = thisEnd - thisStart\n let y = end - start\n const len = Math.min(x, y)\n\n const thisCopy = this.slice(thisStart, thisEnd)\n const targetCopy = target.slice(start, end)\n\n for (let i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i]\n y = targetCopy[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (numberIsNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [val], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n let indexSize = 1\n let arrLength = arr.length\n let valLength = val.length\n\n if (encoding !== undefined) {\n encoding = String(encoding).toLowerCase()\n if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n encoding === 'utf16le' || encoding === 'utf-16le') {\n if (arr.length < 2 || val.length < 2) {\n return -1\n }\n indexSize = 2\n arrLength /= 2\n valLength /= 2\n byteOffset /= 2\n }\n }\n\n function read (buf, i) {\n if (indexSize === 1) {\n return buf[i]\n } else {\n return buf.readUInt16BE(i * indexSize)\n }\n }\n\n let i\n if (dir) {\n let foundIndex = -1\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1) foundIndex = i\n if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n } else {\n if (foundIndex !== -1) i -= i - foundIndex\n foundIndex = -1\n }\n }\n } else {\n if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n for (i = byteOffset; i >= 0; i--) {\n let found = true\n for (let j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false\n break\n }\n }\n if (found) return i\n }\n }\n\n return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n offset = Number(offset) || 0\n const remaining = buf.length - offset\n if (!length) {\n length = remaining\n } else {\n length = Number(length)\n if (length > remaining) {\n length = remaining\n }\n }\n\n const strLen = string.length\n\n if (length > strLen / 2) {\n length = strLen / 2\n }\n let i\n for (i = 0; i < length; ++i) {\n const parsed = parseInt(string.substr(i * 2, 2), 16)\n if (numberIsNaN(parsed)) return i\n buf[offset + i] = parsed\n }\n return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n // Buffer#write(string)\n if (offset === undefined) {\n encoding = 'utf8'\n length = this.length\n offset = 0\n // Buffer#write(string, encoding)\n } else if (length === undefined && typeof offset === 'string') {\n encoding = offset\n length = this.length\n offset = 0\n // Buffer#write(string, offset[, length][, encoding])\n } else if (isFinite(offset)) {\n offset = offset >>> 0\n if (isFinite(length)) {\n length = length >>> 0\n if (encoding === undefined) encoding = 'utf8'\n } else {\n encoding = length\n length = undefined\n }\n } else {\n throw new Error(\n 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n )\n }\n\n const remaining = this.length - offset\n if (length === undefined || length > remaining) length = remaining\n\n if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n throw new RangeError('Attempt to write outside buffer bounds')\n }\n\n if (!encoding) encoding = 'utf8'\n\n let loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'hex':\n return hexWrite(this, string, offset, length)\n\n case 'utf8':\n case 'utf-8':\n return utf8Write(this, string, offset, length)\n\n case 'ascii':\n case 'latin1':\n case 'binary':\n return asciiWrite(this, string, offset, length)\n\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return base64Write(this, string, offset, length)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return ucs2Write(this, string, offset, length)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0)\n }\n}\n\nfunction base64Slice (buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf)\n } else {\n return base64.fromByteArray(buf.slice(start, end))\n }\n}\n\nfunction utf8Slice (buf, start, end) {\n end = Math.min(buf.length, end)\n const res = []\n\n let i = start\n while (i < end) {\n const firstByte = buf[i]\n let codePoint = null\n let bytesPerSequence = (firstByte > 0xEF)\n ? 4\n : (firstByte > 0xDF)\n ? 3\n : (firstByte > 0xBF)\n ? 2\n : 1\n\n if (i + bytesPerSequence <= end) {\n let secondByte, thirdByte, fourthByte, tempCodePoint\n\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 0x80) {\n codePoint = firstByte\n }\n break\n case 2:\n secondByte = buf[i + 1]\n if ((secondByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n if (tempCodePoint > 0x7F) {\n codePoint = tempCodePoint\n }\n }\n break\n case 3:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n codePoint = tempCodePoint\n }\n }\n break\n case 4:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n fourthByte = buf[i + 3]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n codePoint = tempCodePoint\n }\n }\n }\n }\n\n if (codePoint === null) {\n // we did not generate a valid codePoint so insert a\n // replacement char (U+FFFD) and advance only 1 byte\n codePoint = 0xFFFD\n bytesPerSequence = 1\n } else if (codePoint > 0xFFFF) {\n // encode to utf16 (surrogate pair dance)\n codePoint -= 0x10000\n res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n codePoint = 0xDC00 | codePoint & 0x3FF\n }\n\n res.push(codePoint)\n i += bytesPerSequence\n }\n\n return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nconst MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n const len = codePoints.length\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n }\n\n // Decode in chunks to avoid \"call stack size exceeded\".\n let res = ''\n let i = 0\n while (i < len) {\n res += String.fromCharCode.apply(\n String,\n codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n )\n }\n return res\n}\n\nfunction asciiSlice (buf, start, end) {\n let ret = ''\n end = Math.min(buf.length, end)\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F)\n }\n return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n let ret = ''\n end = Math.min(buf.length, end)\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i])\n }\n return ret\n}\n\nfunction hexSlice (buf, start, end) {\n const len = buf.length\n\n if (!start || start < 0) start = 0\n if (!end || end < 0 || end > len) end = len\n\n let out = ''\n for (let i = start; i < end; ++i) {\n out += hexSliceLookupTable[buf[i]]\n }\n return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n const bytes = buf.slice(start, end)\n let res = ''\n // If bytes.length is odd, the last 8 bits must be ignored (same as node.js)\n for (let i = 0; i < bytes.length - 1; i += 2) {\n res += String.fromCharCode(bytes[i] + (bytes[i + 1] * 256))\n }\n return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n const len = this.length\n start = ~~start\n end = end === undefined ? len : ~~end\n\n if (start < 0) {\n start += len\n if (start < 0) start = 0\n } else if (start > len) {\n start = len\n }\n\n if (end < 0) {\n end += len\n if (end < 0) end = 0\n } else if (end > len) {\n end = len\n }\n\n if (end < start) end = start\n\n const newBuf = this.subarray(start, end)\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(newBuf, Buffer.prototype)\n\n return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUintLE =\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let val = this[offset]\n let mul = 1\n let i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUintBE =\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n checkOffset(offset, byteLength, this.length)\n }\n\n let val = this[offset + --byteLength]\n let mul = 1\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUint8 =\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n return this[offset]\n}\n\nBuffer.prototype.readUint16LE =\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUint16BE =\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUint32LE =\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return ((this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16)) +\n (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUint32BE =\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] * 0x1000000) +\n ((this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n this[offset + 3])\n}\n\nBuffer.prototype.readBigUInt64LE = defineBigIntMethod(function readBigUInt64LE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const lo = first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24\n\n const hi = this[++offset] +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n last * 2 ** 24\n\n return BigInt(lo) + (BigInt(hi) << BigInt(32))\n})\n\nBuffer.prototype.readBigUInt64BE = defineBigIntMethod(function readBigUInt64BE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const hi = first * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset]\n\n const lo = this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last\n\n return (BigInt(hi) << BigInt(32)) + BigInt(lo)\n})\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let val = this[offset]\n let mul = 1\n let i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let i = byteLength\n let mul = 1\n let val = this[offset + --i]\n while (i > 0 && (mul *= 0x100)) {\n val += this[offset + --i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n if (!(this[offset] & 0x80)) return (this[offset])\n return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n const val = this[offset] | (this[offset + 1] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n const val = this[offset + 1] | (this[offset] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16) |\n (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] << 24) |\n (this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n (this[offset + 3])\n}\n\nBuffer.prototype.readBigInt64LE = defineBigIntMethod(function readBigInt64LE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const val = this[offset + 4] +\n this[offset + 5] * 2 ** 8 +\n this[offset + 6] * 2 ** 16 +\n (last << 24) // Overflow\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24)\n})\n\nBuffer.prototype.readBigInt64BE = defineBigIntMethod(function readBigInt64BE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const val = (first << 24) + // Overflow\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset]\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last)\n})\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUintLE =\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n let mul = 1\n let i = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUintBE =\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n let i = byteLength - 1\n let mul = 1\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUint8 =\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeUint16LE =\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeUint16BE =\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeUint32LE =\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset + 3] = (value >>> 24)\n this[offset + 2] = (value >>> 16)\n this[offset + 1] = (value >>> 8)\n this[offset] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeUint32BE =\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nfunction wrtBigUInt64LE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7)\n\n let lo = Number(value & BigInt(0xffffffff))\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n return offset\n}\n\nfunction wrtBigUInt64BE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7)\n\n let lo = Number(value & BigInt(0xffffffff))\n buf[offset + 7] = lo\n lo = lo >> 8\n buf[offset + 6] = lo\n lo = lo >> 8\n buf[offset + 5] = lo\n lo = lo >> 8\n buf[offset + 4] = lo\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n buf[offset + 3] = hi\n hi = hi >> 8\n buf[offset + 2] = hi\n hi = hi >> 8\n buf[offset + 1] = hi\n hi = hi >> 8\n buf[offset] = hi\n return offset + 8\n}\n\nBuffer.prototype.writeBigUInt64LE = defineBigIntMethod(function writeBigUInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeBigUInt64BE = defineBigIntMethod(function writeBigUInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n let i = 0\n let mul = 1\n let sub = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n let i = byteLength - 1\n let mul = 1\n let sub = 0\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n if (value < 0) value = 0xff + value + 1\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n this[offset + 2] = (value >>> 16)\n this[offset + 3] = (value >>> 24)\n return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (value < 0) value = 0xffffffff + value + 1\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeBigInt64LE = defineBigIntMethod(function writeBigInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nBuffer.prototype.writeBigInt64BE = defineBigIntMethod(function writeBigInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n }\n ieee754.write(buf, value, offset, littleEndian, 23, 4)\n return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n }\n ieee754.write(buf, value, offset, littleEndian, 52, 8)\n return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n if (!Buffer.isBuffer(target)) throw new TypeError('argument should be a Buffer')\n if (!start) start = 0\n if (!end && end !== 0) end = this.length\n if (targetStart >= target.length) targetStart = target.length\n if (!targetStart) targetStart = 0\n if (end > 0 && end < start) end = start\n\n // Copy 0 bytes; we're done\n if (end === start) return 0\n if (target.length === 0 || this.length === 0) return 0\n\n // Fatal error conditions\n if (targetStart < 0) {\n throw new RangeError('targetStart out of bounds')\n }\n if (start < 0 || start >= this.length) throw new RangeError('Index out of range')\n if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n // Are we oob?\n if (end > this.length) end = this.length\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start\n }\n\n const len = end - start\n\n if (this === target && typeof Uint8Array.prototype.copyWithin === 'function') {\n // Use built-in when available, missing from IE11\n this.copyWithin(targetStart, start, end)\n } else {\n Uint8Array.prototype.set.call(\n target,\n this.subarray(start, end),\n targetStart\n )\n }\n\n return len\n}\n\n// Usage:\n// buffer.fill(number[, offset[, end]])\n// buffer.fill(buffer[, offset[, end]])\n// buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n // Handle string cases:\n if (typeof val === 'string') {\n if (typeof start === 'string') {\n encoding = start\n start = 0\n end = this.length\n } else if (typeof end === 'string') {\n encoding = end\n end = this.length\n }\n if (encoding !== undefined && typeof encoding !== 'string') {\n throw new TypeError('encoding must be a string')\n }\n if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n if (val.length === 1) {\n const code = val.charCodeAt(0)\n if ((encoding === 'utf8' && code < 128) ||\n encoding === 'latin1') {\n // Fast path: If `val` fits into a single byte, use that numeric value.\n val = code\n }\n }\n } else if (typeof val === 'number') {\n val = val & 255\n } else if (typeof val === 'boolean') {\n val = Number(val)\n }\n\n // Invalid ranges are not set to a default, so can range check early.\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError('Out of range index')\n }\n\n if (end <= start) {\n return this\n }\n\n start = start >>> 0\n end = end === undefined ? this.length : end >>> 0\n\n if (!val) val = 0\n\n let i\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val\n }\n } else {\n const bytes = Buffer.isBuffer(val)\n ? val\n : Buffer.from(val, encoding)\n const len = bytes.length\n if (len === 0) {\n throw new TypeError('The value \"' + val +\n '\" is invalid for argument \"value\"')\n }\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len]\n }\n }\n\n return this\n}\n\n// CUSTOM ERRORS\n// =============\n\n// Simplified versions from Node, changed for Buffer-only usage\nconst errors = {}\nfunction E (sym, getMessage, Base) {\n errors[sym] = class NodeError extends Base {\n constructor () {\n super()\n\n Object.defineProperty(this, 'message', {\n value: getMessage.apply(this, arguments),\n writable: true,\n configurable: true\n })\n\n // Add the error code to the name to include it in the stack trace.\n this.name = `${this.name} [${sym}]`\n // Access the stack to generate the error message including the error code\n // from the name.\n this.stack // eslint-disable-line no-unused-expressions\n // Reset the name to the actual name.\n delete this.name\n }\n\n get code () {\n return sym\n }\n\n set code (value) {\n Object.defineProperty(this, 'code', {\n configurable: true,\n enumerable: true,\n value,\n writable: true\n })\n }\n\n toString () {\n return `${this.name} [${sym}]: ${this.message}`\n }\n }\n}\n\nE('ERR_BUFFER_OUT_OF_BOUNDS',\n function (name) {\n if (name) {\n return `${name} is outside of buffer bounds`\n }\n\n return 'Attempt to access memory outside buffer bounds'\n }, RangeError)\nE('ERR_INVALID_ARG_TYPE',\n function (name, actual) {\n return `The \"${name}\" argument must be of type number. Received type ${typeof actual}`\n }, TypeError)\nE('ERR_OUT_OF_RANGE',\n function (str, range, input) {\n let msg = `The value of \"${str}\" is out of range.`\n let received = input\n if (Number.isInteger(input) && Math.abs(input) > 2 ** 32) {\n received = addNumericalSeparator(String(input))\n } else if (typeof input === 'bigint') {\n received = String(input)\n if (input > BigInt(2) ** BigInt(32) || input < -(BigInt(2) ** BigInt(32))) {\n received = addNumericalSeparator(received)\n }\n received += 'n'\n }\n msg += ` It must be ${range}. Received ${received}`\n return msg\n }, RangeError)\n\nfunction addNumericalSeparator (val) {\n let res = ''\n let i = val.length\n const start = val[0] === '-' ? 1 : 0\n for (; i >= start + 4; i -= 3) {\n res = `_${val.slice(i - 3, i)}${res}`\n }\n return `${val.slice(0, i)}${res}`\n}\n\n// CHECK FUNCTIONS\n// ===============\n\nfunction checkBounds (buf, offset, byteLength) {\n validateNumber(offset, 'offset')\n if (buf[offset] === undefined || buf[offset + byteLength] === undefined) {\n boundsError(offset, buf.length - (byteLength + 1))\n }\n}\n\nfunction checkIntBI (value, min, max, buf, offset, byteLength) {\n if (value > max || value < min) {\n const n = typeof min === 'bigint' ? 'n' : ''\n let range\n if (byteLength > 3) {\n if (min === 0 || min === BigInt(0)) {\n range = `>= 0${n} and < 2${n} ** ${(byteLength + 1) * 8}${n}`\n } else {\n range = `>= -(2${n} ** ${(byteLength + 1) * 8 - 1}${n}) and < 2 ** ` +\n `${(byteLength + 1) * 8 - 1}${n}`\n }\n } else {\n range = `>= ${min}${n} and <= ${max}${n}`\n }\n throw new errors.ERR_OUT_OF_RANGE('value', range, value)\n }\n checkBounds(buf, offset, byteLength)\n}\n\nfunction validateNumber (value, name) {\n if (typeof value !== 'number') {\n throw new errors.ERR_INVALID_ARG_TYPE(name, 'number', value)\n }\n}\n\nfunction boundsError (value, length, type) {\n if (Math.floor(value) !== value) {\n validateNumber(value, type)\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset', 'an integer', value)\n }\n\n if (length < 0) {\n throw new errors.ERR_BUFFER_OUT_OF_BOUNDS()\n }\n\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset',\n `>= ${type ? 1 : 0} and <= ${length}`,\n value)\n}\n\n// HELPER FUNCTIONS\n// ================\n\nconst INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n // Node takes equal signs as end of the Base64 encoding\n str = str.split('=')[0]\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = str.trim().replace(INVALID_BASE64_RE, '')\n // Node converts strings with length < 2 to ''\n if (str.length < 2) return ''\n // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n while (str.length % 4 !== 0) {\n str = str + '='\n }\n return str\n}\n\nfunction utf8ToBytes (string, units) {\n units = units || Infinity\n let codePoint\n const length = string.length\n let leadSurrogate = null\n const bytes = []\n\n for (let i = 0; i < length; ++i) {\n codePoint = string.charCodeAt(i)\n\n // is surrogate component\n if (codePoint > 0xD7FF && codePoint < 0xE000) {\n // last char was a lead\n if (!leadSurrogate) {\n // no lead yet\n if (codePoint > 0xDBFF) {\n // unexpected trail\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n } else if (i + 1 === length) {\n // unpaired lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n }\n\n // valid lead\n leadSurrogate = codePoint\n\n continue\n }\n\n // 2 leads in a row\n if (codePoint < 0xDC00) {\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n leadSurrogate = codePoint\n continue\n }\n\n // valid surrogate pair\n codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n } else if (leadSurrogate) {\n // valid bmp char, but last char was a lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n }\n\n leadSurrogate = null\n\n // encode utf8\n if (codePoint < 0x80) {\n if ((units -= 1) < 0) break\n bytes.push(codePoint)\n } else if (codePoint < 0x800) {\n if ((units -= 2) < 0) break\n bytes.push(\n codePoint >> 0x6 | 0xC0,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x10000) {\n if ((units -= 3) < 0) break\n bytes.push(\n codePoint >> 0xC | 0xE0,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x110000) {\n if ((units -= 4) < 0) break\n bytes.push(\n codePoint >> 0x12 | 0xF0,\n codePoint >> 0xC & 0x3F | 0x80,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else {\n throw new Error('Invalid code point')\n }\n }\n\n return bytes\n}\n\nfunction asciiToBytes (str) {\n const byteArray = []\n for (let i = 0; i < str.length; ++i) {\n // Node's code seems to be doing this and not & 0x7F..\n byteArray.push(str.charCodeAt(i) & 0xFF)\n }\n return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n let c, hi, lo\n const byteArray = []\n for (let i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0) break\n\n c = str.charCodeAt(i)\n hi = c >> 8\n lo = c % 256\n byteArray.push(lo)\n byteArray.push(hi)\n }\n\n return byteArray\n}\n\nfunction base64ToBytes (str) {\n return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n let i\n for (i = 0; i < length; ++i) {\n if ((i + offset >= dst.length) || (i >= src.length)) break\n dst[i + offset] = src[i]\n }\n return i\n}\n\n// ArrayBuffer or Uint8Array objects from other contexts (i.e. iframes) do not pass\n// the `instanceof` check but they should be treated as of that type.\n// See: https://github.com/feross/buffer/issues/166\nfunction isInstance (obj, type) {\n return obj instanceof type ||\n (obj != null && obj.constructor != null && obj.constructor.name != null &&\n obj.constructor.name === type.name)\n}\nfunction numberIsNaN (obj) {\n // For IE11 support\n return obj !== obj // eslint-disable-line no-self-compare\n}\n\n// Create lookup table for `toString('hex')`\n// See: https://github.com/feross/buffer/issues/219\nconst hexSliceLookupTable = (function () {\n const alphabet = '0123456789abcdef'\n const table = new Array(256)\n for (let i = 0; i < 16; ++i) {\n const i16 = i * 16\n for (let j = 0; j < 16; ++j) {\n table[i16 + j] = alphabet[i] + alphabet[j]\n }\n }\n return table\n})()\n\n// Return not function with Error if BigInt not supported\nfunction defineBigIntMethod (fn) {\n return typeof BigInt === 'undefined' ? BufferBigIntNotDefined : fn\n}\n\nfunction BufferBigIntNotDefined () {\n throw new Error('BigInt not supported')\n}\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\nvar R = typeof Reflect === 'object' ? Reflect : null\nvar ReflectApply = R && typeof R.apply === 'function'\n ? R.apply\n : function ReflectApply(target, receiver, args) {\n return Function.prototype.apply.call(target, receiver, args);\n }\n\nvar ReflectOwnKeys\nif (R && typeof R.ownKeys === 'function') {\n ReflectOwnKeys = R.ownKeys\n} else if (Object.getOwnPropertySymbols) {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target)\n .concat(Object.getOwnPropertySymbols(target));\n };\n} else {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target);\n };\n}\n\nfunction ProcessEmitWarning(warning) {\n if (console && console.warn) console.warn(warning);\n}\n\nvar NumberIsNaN = Number.isNaN || function NumberIsNaN(value) {\n return value !== value;\n}\n\nfunction EventEmitter() {\n EventEmitter.init.call(this);\n}\nmodule.exports = EventEmitter;\nmodule.exports.once = once;\n\n// Backwards-compat with node 0.10.x\nEventEmitter.EventEmitter = EventEmitter;\n\nEventEmitter.prototype._events = undefined;\nEventEmitter.prototype._eventsCount = 0;\nEventEmitter.prototype._maxListeners = undefined;\n\n// By default EventEmitters will print a warning if more than 10 listeners are\n// added to it. This is a useful default which helps finding memory leaks.\nvar defaultMaxListeners = 10;\n\nfunction checkListener(listener) {\n if (typeof listener !== 'function') {\n throw new TypeError('The \"listener\" argument must be of type Function. Received type ' + typeof listener);\n }\n}\n\nObject.defineProperty(EventEmitter, 'defaultMaxListeners', {\n enumerable: true,\n get: function() {\n return defaultMaxListeners;\n },\n set: function(arg) {\n if (typeof arg !== 'number' || arg < 0 || NumberIsNaN(arg)) {\n throw new RangeError('The value of \"defaultMaxListeners\" is out of range. It must be a non-negative number. Received ' + arg + '.');\n }\n defaultMaxListeners = arg;\n }\n});\n\nEventEmitter.init = function() {\n\n if (this._events === undefined ||\n this._events === Object.getPrototypeOf(this)._events) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n }\n\n this._maxListeners = this._maxListeners || undefined;\n};\n\n// Obviously not all Emitters should be limited to 10. This function allows\n// that to be increased. Set to zero for unlimited.\nEventEmitter.prototype.setMaxListeners = function setMaxListeners(n) {\n if (typeof n !== 'number' || n < 0 || NumberIsNaN(n)) {\n throw new RangeError('The value of \"n\" is out of range. It must be a non-negative number. Received ' + n + '.');\n }\n this._maxListeners = n;\n return this;\n};\n\nfunction _getMaxListeners(that) {\n if (that._maxListeners === undefined)\n return EventEmitter.defaultMaxListeners;\n return that._maxListeners;\n}\n\nEventEmitter.prototype.getMaxListeners = function getMaxListeners() {\n return _getMaxListeners(this);\n};\n\nEventEmitter.prototype.emit = function emit(type) {\n var args = [];\n for (var i = 1; i < arguments.length; i++) args.push(arguments[i]);\n var doError = (type === 'error');\n\n var events = this._events;\n if (events !== undefined)\n doError = (doError && events.error === undefined);\n else if (!doError)\n return false;\n\n // If there is no 'error' event listener then throw.\n if (doError) {\n var er;\n if (args.length > 0)\n er = args[0];\n if (er instanceof Error) {\n // Note: The comments on the `throw` lines are intentional, they show\n // up in Node's output if this results in an unhandled exception.\n throw er; // Unhandled 'error' event\n }\n // At least give some kind of context to the user\n var err = new Error('Unhandled error.' + (er ? ' (' + er.message + ')' : ''));\n err.context = er;\n throw err; // Unhandled 'error' event\n }\n\n var handler = events[type];\n\n if (handler === undefined)\n return false;\n\n if (typeof handler === 'function') {\n ReflectApply(handler, this, args);\n } else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n ReflectApply(listeners[i], this, args);\n }\n\n return true;\n};\n\nfunction _addListener(target, type, listener, prepend) {\n var m;\n var events;\n var existing;\n\n checkListener(listener);\n\n events = target._events;\n if (events === undefined) {\n events = target._events = Object.create(null);\n target._eventsCount = 0;\n } else {\n // To avoid recursion in the case that type === \"newListener\"! Before\n // adding it to the listeners, first emit \"newListener\".\n if (events.newListener !== undefined) {\n target.emit('newListener', type,\n listener.listener ? listener.listener : listener);\n\n // Re-assign `events` because a newListener handler could have caused the\n // this._events to be assigned to a new object\n events = target._events;\n }\n existing = events[type];\n }\n\n if (existing === undefined) {\n // Optimize the case of one listener. Don't need the extra array object.\n existing = events[type] = listener;\n ++target._eventsCount;\n } else {\n if (typeof existing === 'function') {\n // Adding the second element, need to change to array.\n existing = events[type] =\n prepend ? [listener, existing] : [existing, listener];\n // If we've already got an array, just append.\n } else if (prepend) {\n existing.unshift(listener);\n } else {\n existing.push(listener);\n }\n\n // Check for listener leak\n m = _getMaxListeners(target);\n if (m > 0 && existing.length > m && !existing.warned) {\n existing.warned = true;\n // No error code for this since it is a Warning\n // eslint-disable-next-line no-restricted-syntax\n var w = new Error('Possible EventEmitter memory leak detected. ' +\n existing.length + ' ' + String(type) + ' listeners ' +\n 'added. Use emitter.setMaxListeners() to ' +\n 'increase limit');\n w.name = 'MaxListenersExceededWarning';\n w.emitter = target;\n w.type = type;\n w.count = existing.length;\n ProcessEmitWarning(w);\n }\n }\n\n return target;\n}\n\nEventEmitter.prototype.addListener = function addListener(type, listener) {\n return _addListener(this, type, listener, false);\n};\n\nEventEmitter.prototype.on = EventEmitter.prototype.addListener;\n\nEventEmitter.prototype.prependListener =\n function prependListener(type, listener) {\n return _addListener(this, type, listener, true);\n };\n\nfunction onceWrapper() {\n if (!this.fired) {\n this.target.removeListener(this.type, this.wrapFn);\n this.fired = true;\n if (arguments.length === 0)\n return this.listener.call(this.target);\n return this.listener.apply(this.target, arguments);\n }\n}\n\nfunction _onceWrap(target, type, listener) {\n var state = { fired: false, wrapFn: undefined, target: target, type: type, listener: listener };\n var wrapped = onceWrapper.bind(state);\n wrapped.listener = listener;\n state.wrapFn = wrapped;\n return wrapped;\n}\n\nEventEmitter.prototype.once = function once(type, listener) {\n checkListener(listener);\n this.on(type, _onceWrap(this, type, listener));\n return this;\n};\n\nEventEmitter.prototype.prependOnceListener =\n function prependOnceListener(type, listener) {\n checkListener(listener);\n this.prependListener(type, _onceWrap(this, type, listener));\n return this;\n };\n\n// Emits a 'removeListener' event if and only if the listener was removed.\nEventEmitter.prototype.removeListener =\n function removeListener(type, listener) {\n var list, events, position, i, originalListener;\n\n checkListener(listener);\n\n events = this._events;\n if (events === undefined)\n return this;\n\n list = events[type];\n if (list === undefined)\n return this;\n\n if (list === listener || list.listener === listener) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else {\n delete events[type];\n if (events.removeListener)\n this.emit('removeListener', type, list.listener || listener);\n }\n } else if (typeof list !== 'function') {\n position = -1;\n\n for (i = list.length - 1; i >= 0; i--) {\n if (list[i] === listener || list[i].listener === listener) {\n originalListener = list[i].listener;\n position = i;\n break;\n }\n }\n\n if (position < 0)\n return this;\n\n if (position === 0)\n list.shift();\n else {\n spliceOne(list, position);\n }\n\n if (list.length === 1)\n events[type] = list[0];\n\n if (events.removeListener !== undefined)\n this.emit('removeListener', type, originalListener || listener);\n }\n\n return this;\n };\n\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\n\nEventEmitter.prototype.removeAllListeners =\n function removeAllListeners(type) {\n var listeners, events, i;\n\n events = this._events;\n if (events === undefined)\n return this;\n\n // not listening for removeListener, no need to emit\n if (events.removeListener === undefined) {\n if (arguments.length === 0) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n } else if (events[type] !== undefined) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else\n delete events[type];\n }\n return this;\n }\n\n // emit removeListener for all listeners on all events\n if (arguments.length === 0) {\n var keys = Object.keys(events);\n var key;\n for (i = 0; i < keys.length; ++i) {\n key = keys[i];\n if (key === 'removeListener') continue;\n this.removeAllListeners(key);\n }\n this.removeAllListeners('removeListener');\n this._events = Object.create(null);\n this._eventsCount = 0;\n return this;\n }\n\n listeners = events[type];\n\n if (typeof listeners === 'function') {\n this.removeListener(type, listeners);\n } else if (listeners !== undefined) {\n // LIFO order\n for (i = listeners.length - 1; i >= 0; i--) {\n this.removeListener(type, listeners[i]);\n }\n }\n\n return this;\n };\n\nfunction _listeners(target, type, unwrap) {\n var events = target._events;\n\n if (events === undefined)\n return [];\n\n var evlistener = events[type];\n if (evlistener === undefined)\n return [];\n\n if (typeof evlistener === 'function')\n return unwrap ? [evlistener.listener || evlistener] : [evlistener];\n\n return unwrap ?\n unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length);\n}\n\nEventEmitter.prototype.listeners = function listeners(type) {\n return _listeners(this, type, true);\n};\n\nEventEmitter.prototype.rawListeners = function rawListeners(type) {\n return _listeners(this, type, false);\n};\n\nEventEmitter.listenerCount = function(emitter, type) {\n if (typeof emitter.listenerCount === 'function') {\n return emitter.listenerCount(type);\n } else {\n return listenerCount.call(emitter, type);\n }\n};\n\nEventEmitter.prototype.listenerCount = listenerCount;\nfunction listenerCount(type) {\n var events = this._events;\n\n if (events !== undefined) {\n var evlistener = events[type];\n\n if (typeof evlistener === 'function') {\n return 1;\n } else if (evlistener !== undefined) {\n return evlistener.length;\n }\n }\n\n return 0;\n}\n\nEventEmitter.prototype.eventNames = function eventNames() {\n return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : [];\n};\n\nfunction arrayClone(arr, n) {\n var copy = new Array(n);\n for (var i = 0; i < n; ++i)\n copy[i] = arr[i];\n return copy;\n}\n\nfunction spliceOne(list, index) {\n for (; index + 1 < list.length; index++)\n list[index] = list[index + 1];\n list.pop();\n}\n\nfunction unwrapListeners(arr) {\n var ret = new Array(arr.length);\n for (var i = 0; i < ret.length; ++i) {\n ret[i] = arr[i].listener || arr[i];\n }\n return ret;\n}\n\nfunction once(emitter, name) {\n return new Promise(function (resolve, reject) {\n function errorListener(err) {\n emitter.removeListener(name, resolver);\n reject(err);\n }\n\n function resolver() {\n if (typeof emitter.removeListener === 'function') {\n emitter.removeListener('error', errorListener);\n }\n resolve([].slice.call(arguments));\n };\n\n eventTargetAgnosticAddListener(emitter, name, resolver, { once: true });\n if (name !== 'error') {\n addErrorHandlerIfEventEmitter(emitter, errorListener, { once: true });\n }\n });\n}\n\nfunction addErrorHandlerIfEventEmitter(emitter, handler, flags) {\n if (typeof emitter.on === 'function') {\n eventTargetAgnosticAddListener(emitter, 'error', handler, flags);\n }\n}\n\nfunction eventTargetAgnosticAddListener(emitter, name, listener, flags) {\n if (typeof emitter.on === 'function') {\n if (flags.once) {\n emitter.once(name, listener);\n } else {\n emitter.on(name, listener);\n }\n } else if (typeof emitter.addEventListener === 'function') {\n // EventTarget does not have `error` event semantics like Node\n // EventEmitters, we do not listen for `error` events here.\n emitter.addEventListener(name, function wrapListener(arg) {\n // IE does not have builtin `{ once: true }` support so we\n // have to do it manually.\n if (flags.once) {\n emitter.removeEventListener(name, wrapListener);\n }\n listener(arg);\n });\n } else {\n throw new TypeError('The \"emitter\" argument must be of type EventEmitter. Received type ' + typeof emitter);\n }\n}\n","/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */\nexports.read = function (buffer, offset, isLE, mLen, nBytes) {\n var e, m\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var nBits = -7\n var i = isLE ? (nBytes - 1) : 0\n var d = isLE ? -1 : 1\n var s = buffer[offset + i]\n\n i += d\n\n e = s & ((1 << (-nBits)) - 1)\n s >>= (-nBits)\n nBits += eLen\n for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & ((1 << (-nBits)) - 1)\n e >>= (-nBits)\n nBits += mLen\n for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias\n } else if (e === eMax) {\n return m ? NaN : ((s ? -1 : 1) * Infinity)\n } else {\n m = m + Math.pow(2, mLen)\n e = e - eBias\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n var i = isLE ? 0 : (nBytes - 1)\n var d = isLE ? 1 : -1\n var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n value = Math.abs(value)\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0\n e = eMax\n } else {\n e = Math.floor(Math.log(value) / Math.LN2)\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--\n c *= 2\n }\n if (e + eBias >= 1) {\n value += rt / c\n } else {\n value += rt * Math.pow(2, 1 - eBias)\n }\n if (value * c >= 2) {\n e++\n c /= 2\n }\n\n if (e + eBias >= eMax) {\n m = 0\n e = eMax\n } else if (e + eBias >= 1) {\n m = ((value * c) - 1) * Math.pow(2, mLen)\n e = e + eBias\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n e = 0\n }\n }\n\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n e = (e << mLen) | m\n eLen += mLen\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128\n}\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView');\n\nmodule.exports = DataView;\n","var hashClear = require('./_hashClear'),\n hashDelete = require('./_hashDelete'),\n hashGet = require('./_hashGet'),\n hashHas = require('./_hashHas'),\n hashSet = require('./_hashSet');\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\nmodule.exports = Hash;\n","var listCacheClear = require('./_listCacheClear'),\n listCacheDelete = require('./_listCacheDelete'),\n listCacheGet = require('./_listCacheGet'),\n listCacheHas = require('./_listCacheHas'),\n listCacheSet = require('./_listCacheSet');\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\nmodule.exports = ListCache;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map');\n\nmodule.exports = Map;\n","var mapCacheClear = require('./_mapCacheClear'),\n mapCacheDelete = require('./_mapCacheDelete'),\n mapCacheGet = require('./_mapCacheGet'),\n mapCacheHas = require('./_mapCacheHas'),\n mapCacheSet = require('./_mapCacheSet');\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\nmodule.exports = MapCache;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Promise = getNative(root, 'Promise');\n\nmodule.exports = Promise;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Set = getNative(root, 'Set');\n\nmodule.exports = Set;\n","var MapCache = require('./_MapCache'),\n setCacheAdd = require('./_setCacheAdd'),\n setCacheHas = require('./_setCacheHas');\n\n/**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\nfunction SetCache(values) {\n var index = -1,\n length = values == null ? 0 : values.length;\n\n this.__data__ = new MapCache;\n while (++index < length) {\n this.add(values[index]);\n }\n}\n\n// Add methods to `SetCache`.\nSetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\nSetCache.prototype.has = setCacheHas;\n\nmodule.exports = SetCache;\n","var ListCache = require('./_ListCache'),\n stackClear = require('./_stackClear'),\n stackDelete = require('./_stackDelete'),\n stackGet = require('./_stackGet'),\n stackHas = require('./_stackHas'),\n stackSet = require('./_stackSet');\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\nmodule.exports = Stack;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Uint8Array = root.Uint8Array;\n\nmodule.exports = Uint8Array;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar WeakMap = getNative(root, 'WeakMap');\n\nmodule.exports = WeakMap;\n","/**\n * A specialized version of `_.forEach` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\nfunction arrayEach(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (iteratee(array[index], index, array) === false) {\n break;\n }\n }\n return array;\n}\n\nmodule.exports = arrayEach;\n","/**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\nfunction arrayFilter(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result[resIndex++] = value;\n }\n }\n return result;\n}\n\nmodule.exports = arrayFilter;\n","var baseTimes = require('./_baseTimes'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isIndex = require('./_isIndex'),\n isTypedArray = require('./isTypedArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = arrayLikeKeys;\n","/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n}\n\nmodule.exports = arrayPush;\n","/**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\nfunction arraySome(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (predicate(array[index], index, array)) {\n return true;\n }\n }\n return false;\n}\n\nmodule.exports = arraySome;\n","var baseAssignValue = require('./_baseAssignValue'),\n eq = require('./eq');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\nmodule.exports = assignValue;\n","var eq = require('./eq');\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\nmodule.exports = assocIndexOf;\n","var copyObject = require('./_copyObject'),\n keys = require('./keys');\n\n/**\n * The base implementation of `_.assign` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssign(object, source) {\n return object && copyObject(source, keys(source), object);\n}\n\nmodule.exports = baseAssign;\n","var copyObject = require('./_copyObject'),\n keysIn = require('./keysIn');\n\n/**\n * The base implementation of `_.assignIn` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssignIn(object, source) {\n return object && copyObject(source, keysIn(source), object);\n}\n\nmodule.exports = baseAssignIn;\n","var defineProperty = require('./_defineProperty');\n\n/**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction baseAssignValue(object, key, value) {\n if (key == '__proto__' && defineProperty) {\n defineProperty(object, key, {\n 'configurable': true,\n 'enumerable': true,\n 'value': value,\n 'writable': true\n });\n } else {\n object[key] = value;\n }\n}\n\nmodule.exports = baseAssignValue;\n","var Stack = require('./_Stack'),\n arrayEach = require('./_arrayEach'),\n assignValue = require('./_assignValue'),\n baseAssign = require('./_baseAssign'),\n baseAssignIn = require('./_baseAssignIn'),\n cloneBuffer = require('./_cloneBuffer'),\n copyArray = require('./_copyArray'),\n copySymbols = require('./_copySymbols'),\n copySymbolsIn = require('./_copySymbolsIn'),\n getAllKeys = require('./_getAllKeys'),\n getAllKeysIn = require('./_getAllKeysIn'),\n getTag = require('./_getTag'),\n initCloneArray = require('./_initCloneArray'),\n initCloneByTag = require('./_initCloneByTag'),\n initCloneObject = require('./_initCloneObject'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isMap = require('./isMap'),\n isObject = require('./isObject'),\n isSet = require('./isSet'),\n keys = require('./keys'),\n keysIn = require('./keysIn');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_FLAT_FLAG = 2,\n CLONE_SYMBOLS_FLAG = 4;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values supported by `_.clone`. */\nvar cloneableTags = {};\ncloneableTags[argsTag] = cloneableTags[arrayTag] =\ncloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =\ncloneableTags[boolTag] = cloneableTags[dateTag] =\ncloneableTags[float32Tag] = cloneableTags[float64Tag] =\ncloneableTags[int8Tag] = cloneableTags[int16Tag] =\ncloneableTags[int32Tag] = cloneableTags[mapTag] =\ncloneableTags[numberTag] = cloneableTags[objectTag] =\ncloneableTags[regexpTag] = cloneableTags[setTag] =\ncloneableTags[stringTag] = cloneableTags[symbolTag] =\ncloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =\ncloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;\ncloneableTags[errorTag] = cloneableTags[funcTag] =\ncloneableTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.clone` and `_.cloneDeep` which tracks\n * traversed objects.\n *\n * @private\n * @param {*} value The value to clone.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Deep clone\n * 2 - Flatten inherited properties\n * 4 - Clone symbols\n * @param {Function} [customizer] The function to customize cloning.\n * @param {string} [key] The key of `value`.\n * @param {Object} [object] The parent object of `value`.\n * @param {Object} [stack] Tracks traversed objects and their clone counterparts.\n * @returns {*} Returns the cloned value.\n */\nfunction baseClone(value, bitmask, customizer, key, object, stack) {\n var result,\n isDeep = bitmask & CLONE_DEEP_FLAG,\n isFlat = bitmask & CLONE_FLAT_FLAG,\n isFull = bitmask & CLONE_SYMBOLS_FLAG;\n\n if (customizer) {\n result = object ? customizer(value, key, object, stack) : customizer(value);\n }\n if (result !== undefined) {\n return result;\n }\n if (!isObject(value)) {\n return value;\n }\n var isArr = isArray(value);\n if (isArr) {\n result = initCloneArray(value);\n if (!isDeep) {\n return copyArray(value, result);\n }\n } else {\n var tag = getTag(value),\n isFunc = tag == funcTag || tag == genTag;\n\n if (isBuffer(value)) {\n return cloneBuffer(value, isDeep);\n }\n if (tag == objectTag || tag == argsTag || (isFunc && !object)) {\n result = (isFlat || isFunc) ? {} : initCloneObject(value);\n if (!isDeep) {\n return isFlat\n ? copySymbolsIn(value, baseAssignIn(result, value))\n : copySymbols(value, baseAssign(result, value));\n }\n } else {\n if (!cloneableTags[tag]) {\n return object ? value : {};\n }\n result = initCloneByTag(value, tag, isDeep);\n }\n }\n // Check for circular references and return its corresponding clone.\n stack || (stack = new Stack);\n var stacked = stack.get(value);\n if (stacked) {\n return stacked;\n }\n stack.set(value, result);\n\n if (isSet(value)) {\n value.forEach(function(subValue) {\n result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));\n });\n } else if (isMap(value)) {\n value.forEach(function(subValue, key) {\n result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n }\n\n var keysFunc = isFull\n ? (isFlat ? getAllKeysIn : getAllKeys)\n : (isFlat ? keysIn : keys);\n\n var props = isArr ? undefined : keysFunc(value);\n arrayEach(props || value, function(subValue, key) {\n if (props) {\n key = subValue;\n subValue = value[key];\n }\n // Recursively populate clone (susceptible to call stack limits).\n assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n return result;\n}\n\nmodule.exports = baseClone;\n","var isObject = require('./isObject');\n\n/** Built-in value references. */\nvar objectCreate = Object.create;\n\n/**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} proto The object to inherit from.\n * @returns {Object} Returns the new object.\n */\nvar baseCreate = (function() {\n function object() {}\n return function(proto) {\n if (!isObject(proto)) {\n return {};\n }\n if (objectCreate) {\n return objectCreate(proto);\n }\n object.prototype = proto;\n var result = new object;\n object.prototype = undefined;\n return result;\n };\n}());\n\nmodule.exports = baseCreate;\n","var arrayPush = require('./_arrayPush'),\n isArray = require('./isArray');\n\n/**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction baseGetAllKeys(object, keysFunc, symbolsFunc) {\n var result = keysFunc(object);\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n}\n\nmodule.exports = baseGetAllKeys;\n","var Symbol = require('./_Symbol'),\n getRawTag = require('./_getRawTag'),\n objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]';\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\nmodule.exports = baseIsArguments;\n","var baseIsEqualDeep = require('./_baseIsEqualDeep'),\n isObjectLike = require('./isObjectLike');\n\n/**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Unordered comparison\n * 2 - Partial comparison\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\nfunction baseIsEqual(value, other, bitmask, customizer, stack) {\n if (value === other) {\n return true;\n }\n if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\n return value !== value && other !== other;\n }\n return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n}\n\nmodule.exports = baseIsEqual;\n","var Stack = require('./_Stack'),\n equalArrays = require('./_equalArrays'),\n equalByTag = require('./_equalByTag'),\n equalObjects = require('./_equalObjects'),\n getTag = require('./_getTag'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isTypedArray = require('./isTypedArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n var objIsArr = isArray(object),\n othIsArr = isArray(other),\n objTag = objIsArr ? arrayTag : getTag(object),\n othTag = othIsArr ? arrayTag : getTag(other);\n\n objTag = objTag == argsTag ? objectTag : objTag;\n othTag = othTag == argsTag ? objectTag : othTag;\n\n var objIsObj = objTag == objectTag,\n othIsObj = othTag == objectTag,\n isSameTag = objTag == othTag;\n\n if (isSameTag && isBuffer(object)) {\n if (!isBuffer(other)) {\n return false;\n }\n objIsArr = true;\n objIsObj = false;\n }\n if (isSameTag && !objIsObj) {\n stack || (stack = new Stack);\n return (objIsArr || isTypedArray(object))\n ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n }\n if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n if (objIsWrapped || othIsWrapped) {\n var objUnwrapped = objIsWrapped ? object.value() : object,\n othUnwrapped = othIsWrapped ? other.value() : other;\n\n stack || (stack = new Stack);\n return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n }\n }\n if (!isSameTag) {\n return false;\n }\n stack || (stack = new Stack);\n return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n}\n\nmodule.exports = baseIsEqualDeep;\n","var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]';\n\n/**\n * The base implementation of `_.isMap` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n */\nfunction baseIsMap(value) {\n return isObjectLike(value) && getTag(value) == mapTag;\n}\n\nmodule.exports = baseIsMap;\n","var isFunction = require('./isFunction'),\n isMasked = require('./_isMasked'),\n isObject = require('./isObject'),\n toSource = require('./_toSource');\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\nmodule.exports = baseIsNative;\n","var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar setTag = '[object Set]';\n\n/**\n * The base implementation of `_.isSet` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n */\nfunction baseIsSet(value) {\n return isObjectLike(value) && getTag(value) == setTag;\n}\n\nmodule.exports = baseIsSet;\n","var baseGetTag = require('./_baseGetTag'),\n isLength = require('./isLength'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n\nmodule.exports = baseIsTypedArray;\n","var isPrototype = require('./_isPrototype'),\n nativeKeys = require('./_nativeKeys');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeys;\n","var isObject = require('./isObject'),\n isPrototype = require('./_isPrototype'),\n nativeKeysIn = require('./_nativeKeysIn');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeysIn(object) {\n if (!isObject(object)) {\n return nativeKeysIn(object);\n }\n var isProto = isPrototype(object),\n result = [];\n\n for (var key in object) {\n if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeysIn;\n","/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\nmodule.exports = baseTimes;\n","/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n return function(value) {\n return func(value);\n };\n}\n\nmodule.exports = baseUnary;\n","/**\n * Checks if a `cache` value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction cacheHas(cache, key) {\n return cache.has(key);\n}\n\nmodule.exports = cacheHas;\n","var Uint8Array = require('./_Uint8Array');\n\n/**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\nfunction cloneArrayBuffer(arrayBuffer) {\n var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n return result;\n}\n\nmodule.exports = cloneArrayBuffer;\n","var root = require('./_root');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined,\n allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;\n\n/**\n * Creates a clone of `buffer`.\n *\n * @private\n * @param {Buffer} buffer The buffer to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Buffer} Returns the cloned buffer.\n */\nfunction cloneBuffer(buffer, isDeep) {\n if (isDeep) {\n return buffer.slice();\n }\n var length = buffer.length,\n result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\n\n buffer.copy(result);\n return result;\n}\n\nmodule.exports = cloneBuffer;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer');\n\n/**\n * Creates a clone of `dataView`.\n *\n * @private\n * @param {Object} dataView The data view to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned data view.\n */\nfunction cloneDataView(dataView, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;\n return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);\n}\n\nmodule.exports = cloneDataView;\n","/** Used to match `RegExp` flags from their coerced string values. */\nvar reFlags = /\\w*$/;\n\n/**\n * Creates a clone of `regexp`.\n *\n * @private\n * @param {Object} regexp The regexp to clone.\n * @returns {Object} Returns the cloned regexp.\n */\nfunction cloneRegExp(regexp) {\n var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));\n result.lastIndex = regexp.lastIndex;\n return result;\n}\n\nmodule.exports = cloneRegExp;\n","var Symbol = require('./_Symbol');\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * Creates a clone of the `symbol` object.\n *\n * @private\n * @param {Object} symbol The symbol object to clone.\n * @returns {Object} Returns the cloned symbol object.\n */\nfunction cloneSymbol(symbol) {\n return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};\n}\n\nmodule.exports = cloneSymbol;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer');\n\n/**\n * Creates a clone of `typedArray`.\n *\n * @private\n * @param {Object} typedArray The typed array to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned typed array.\n */\nfunction cloneTypedArray(typedArray, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n}\n\nmodule.exports = cloneTypedArray;\n","/**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\nfunction copyArray(source, array) {\n var index = -1,\n length = source.length;\n\n array || (array = Array(length));\n while (++index < length) {\n array[index] = source[index];\n }\n return array;\n}\n\nmodule.exports = copyArray;\n","var assignValue = require('./_assignValue'),\n baseAssignValue = require('./_baseAssignValue');\n\n/**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\nfunction copyObject(source, props, object, customizer) {\n var isNew = !object;\n object || (object = {});\n\n var index = -1,\n length = props.length;\n\n while (++index < length) {\n var key = props[index];\n\n var newValue = customizer\n ? customizer(object[key], source[key], key, object, source)\n : undefined;\n\n if (newValue === undefined) {\n newValue = source[key];\n }\n if (isNew) {\n baseAssignValue(object, key, newValue);\n } else {\n assignValue(object, key, newValue);\n }\n }\n return object;\n}\n\nmodule.exports = copyObject;\n","var copyObject = require('./_copyObject'),\n getSymbols = require('./_getSymbols');\n\n/**\n * Copies own symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbols(source, object) {\n return copyObject(source, getSymbols(source), object);\n}\n\nmodule.exports = copySymbols;\n","var copyObject = require('./_copyObject'),\n getSymbolsIn = require('./_getSymbolsIn');\n\n/**\n * Copies own and inherited symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbolsIn(source, object) {\n return copyObject(source, getSymbolsIn(source), object);\n}\n\nmodule.exports = copySymbolsIn;\n","var root = require('./_root');\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\nmodule.exports = coreJsData;\n","var getNative = require('./_getNative');\n\nvar defineProperty = (function() {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n}());\n\nmodule.exports = defineProperty;\n","var SetCache = require('./_SetCache'),\n arraySome = require('./_arraySome'),\n cacheHas = require('./_cacheHas');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\nfunction equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n arrLength = array.length,\n othLength = other.length;\n\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n return false;\n }\n // Check that cyclic values are equal.\n var arrStacked = stack.get(array);\n var othStacked = stack.get(other);\n if (arrStacked && othStacked) {\n return arrStacked == other && othStacked == array;\n }\n var index = -1,\n result = true,\n seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n stack.set(array, other);\n stack.set(other, array);\n\n // Ignore non-index properties.\n while (++index < arrLength) {\n var arrValue = array[index],\n othValue = other[index];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, arrValue, index, other, array, stack)\n : customizer(arrValue, othValue, index, array, other, stack);\n }\n if (compared !== undefined) {\n if (compared) {\n continue;\n }\n result = false;\n break;\n }\n // Recursively compare arrays (susceptible to call stack limits).\n if (seen) {\n if (!arraySome(other, function(othValue, othIndex) {\n if (!cacheHas(seen, othIndex) &&\n (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n return seen.push(othIndex);\n }\n })) {\n result = false;\n break;\n }\n } else if (!(\n arrValue === othValue ||\n equalFunc(arrValue, othValue, bitmask, customizer, stack)\n )) {\n result = false;\n break;\n }\n }\n stack['delete'](array);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalArrays;\n","var Symbol = require('./_Symbol'),\n Uint8Array = require('./_Uint8Array'),\n eq = require('./eq'),\n equalArrays = require('./_equalArrays'),\n mapToArray = require('./_mapToArray'),\n setToArray = require('./_setToArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]';\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n switch (tag) {\n case dataViewTag:\n if ((object.byteLength != other.byteLength) ||\n (object.byteOffset != other.byteOffset)) {\n return false;\n }\n object = object.buffer;\n other = other.buffer;\n\n case arrayBufferTag:\n if ((object.byteLength != other.byteLength) ||\n !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n return false;\n }\n return true;\n\n case boolTag:\n case dateTag:\n case numberTag:\n // Coerce booleans to `1` or `0` and dates to milliseconds.\n // Invalid dates are coerced to `NaN`.\n return eq(+object, +other);\n\n case errorTag:\n return object.name == other.name && object.message == other.message;\n\n case regexpTag:\n case stringTag:\n // Coerce regexes to strings and treat strings, primitives and objects,\n // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n // for more details.\n return object == (other + '');\n\n case mapTag:\n var convert = mapToArray;\n\n case setTag:\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n convert || (convert = setToArray);\n\n if (object.size != other.size && !isPartial) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked) {\n return stacked == other;\n }\n bitmask |= COMPARE_UNORDERED_FLAG;\n\n // Recursively compare objects (susceptible to call stack limits).\n stack.set(object, other);\n var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n stack['delete'](object);\n return result;\n\n case symbolTag:\n if (symbolValueOf) {\n return symbolValueOf.call(object) == symbolValueOf.call(other);\n }\n }\n return false;\n}\n\nmodule.exports = equalByTag;\n","var getAllKeys = require('./_getAllKeys');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n objProps = getAllKeys(object),\n objLength = objProps.length,\n othProps = getAllKeys(other),\n othLength = othProps.length;\n\n if (objLength != othLength && !isPartial) {\n return false;\n }\n var index = objLength;\n while (index--) {\n var key = objProps[index];\n if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n return false;\n }\n }\n // Check that cyclic values are equal.\n var objStacked = stack.get(object);\n var othStacked = stack.get(other);\n if (objStacked && othStacked) {\n return objStacked == other && othStacked == object;\n }\n var result = true;\n stack.set(object, other);\n stack.set(other, object);\n\n var skipCtor = isPartial;\n while (++index < objLength) {\n key = objProps[index];\n var objValue = object[key],\n othValue = other[key];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, objValue, key, other, object, stack)\n : customizer(objValue, othValue, key, object, other, stack);\n }\n // Recursively compare objects (susceptible to call stack limits).\n if (!(compared === undefined\n ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n : compared\n )) {\n result = false;\n break;\n }\n skipCtor || (skipCtor = key == 'constructor');\n }\n if (result && !skipCtor) {\n var objCtor = object.constructor,\n othCtor = other.constructor;\n\n // Non `Object` object instances with different constructors are not equal.\n if (objCtor != othCtor &&\n ('constructor' in object && 'constructor' in other) &&\n !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n result = false;\n }\n }\n stack['delete'](object);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalObjects;\n","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n","var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbols = require('./_getSymbols'),\n keys = require('./keys');\n\n/**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeys(object) {\n return baseGetAllKeys(object, keys, getSymbols);\n}\n\nmodule.exports = getAllKeys;\n","var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbolsIn = require('./_getSymbolsIn'),\n keysIn = require('./keysIn');\n\n/**\n * Creates an array of own and inherited enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeysIn(object) {\n return baseGetAllKeys(object, keysIn, getSymbolsIn);\n}\n\nmodule.exports = getAllKeysIn;\n","var isKeyable = require('./_isKeyable');\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\nmodule.exports = getMapData;\n","var baseIsNative = require('./_baseIsNative'),\n getValue = require('./_getValue');\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\nmodule.exports = getNative;\n","var overArg = require('./_overArg');\n\n/** Built-in value references. */\nvar getPrototype = overArg(Object.getPrototypeOf, Object);\n\nmodule.exports = getPrototype;\n","var Symbol = require('./_Symbol');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nmodule.exports = getRawTag;\n","var arrayFilter = require('./_arrayFilter'),\n stubArray = require('./stubArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n if (object == null) {\n return [];\n }\n object = Object(object);\n return arrayFilter(nativeGetSymbols(object), function(symbol) {\n return propertyIsEnumerable.call(object, symbol);\n });\n};\n\nmodule.exports = getSymbols;\n","var arrayPush = require('./_arrayPush'),\n getPrototype = require('./_getPrototype'),\n getSymbols = require('./_getSymbols'),\n stubArray = require('./stubArray');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own and inherited enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {\n var result = [];\n while (object) {\n arrayPush(result, getSymbols(object));\n object = getPrototype(object);\n }\n return result;\n};\n\nmodule.exports = getSymbolsIn;\n","var DataView = require('./_DataView'),\n Map = require('./_Map'),\n Promise = require('./_Promise'),\n Set = require('./_Set'),\n WeakMap = require('./_WeakMap'),\n baseGetTag = require('./_baseGetTag'),\n toSource = require('./_toSource');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n setTag = '[object Set]',\n weakMapTag = '[object WeakMap]';\n\nvar dataViewTag = '[object DataView]';\n\n/** Used to detect maps, sets, and weakmaps. */\nvar dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nvar getTag = baseGetTag;\n\n// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\nif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = baseGetTag(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : '';\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n}\n\nmodule.exports = getTag;\n","/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\nmodule.exports = getValue;\n","var nativeCreate = require('./_nativeCreate');\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n}\n\nmodule.exports = hashClear;\n","/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = hashDelete;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\nmodule.exports = hashGet;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\nmodule.exports = hashHas;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\nmodule.exports = hashSet;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Initializes an array clone.\n *\n * @private\n * @param {Array} array The array to clone.\n * @returns {Array} Returns the initialized clone.\n */\nfunction initCloneArray(array) {\n var length = array.length,\n result = new array.constructor(length);\n\n // Add properties assigned by `RegExp#exec`.\n if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {\n result.index = array.index;\n result.input = array.input;\n }\n return result;\n}\n\nmodule.exports = initCloneArray;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer'),\n cloneDataView = require('./_cloneDataView'),\n cloneRegExp = require('./_cloneRegExp'),\n cloneSymbol = require('./_cloneSymbol'),\n cloneTypedArray = require('./_cloneTypedArray');\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/**\n * Initializes an object clone based on its `toStringTag`.\n *\n * **Note:** This function only supports cloning values with tags of\n * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.\n *\n * @private\n * @param {Object} object The object to clone.\n * @param {string} tag The `toStringTag` of the object to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneByTag(object, tag, isDeep) {\n var Ctor = object.constructor;\n switch (tag) {\n case arrayBufferTag:\n return cloneArrayBuffer(object);\n\n case boolTag:\n case dateTag:\n return new Ctor(+object);\n\n case dataViewTag:\n return cloneDataView(object, isDeep);\n\n case float32Tag: case float64Tag:\n case int8Tag: case int16Tag: case int32Tag:\n case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:\n return cloneTypedArray(object, isDeep);\n\n case mapTag:\n return new Ctor;\n\n case numberTag:\n case stringTag:\n return new Ctor(object);\n\n case regexpTag:\n return cloneRegExp(object);\n\n case setTag:\n return new Ctor;\n\n case symbolTag:\n return cloneSymbol(object);\n }\n}\n\nmodule.exports = initCloneByTag;\n","var baseCreate = require('./_baseCreate'),\n getPrototype = require('./_getPrototype'),\n isPrototype = require('./_isPrototype');\n\n/**\n * Initializes an object clone.\n *\n * @private\n * @param {Object} object The object to clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneObject(object) {\n return (typeof object.constructor == 'function' && !isPrototype(object))\n ? baseCreate(getPrototype(object))\n : {};\n}\n\nmodule.exports = initCloneObject;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n var type = typeof value;\n length = length == null ? MAX_SAFE_INTEGER : length;\n\n return !!length &&\n (type == 'number' ||\n (type != 'symbol' && reIsUint.test(value))) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\nmodule.exports = isIndex;\n","/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\nmodule.exports = isKeyable;\n","var coreJsData = require('./_coreJsData');\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\nmodule.exports = isMasked;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\nmodule.exports = isPrototype;\n","/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n}\n\nmodule.exports = listCacheClear;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype;\n\n/** Built-in value references. */\nvar splice = arrayProto.splice;\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n}\n\nmodule.exports = listCacheDelete;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\nmodule.exports = listCacheGet;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\nmodule.exports = listCacheHas;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\nmodule.exports = listCacheSet;\n","var Hash = require('./_Hash'),\n ListCache = require('./_ListCache'),\n Map = require('./_Map');\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\nmodule.exports = mapCacheClear;\n","var getMapData = require('./_getMapData');\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = mapCacheDelete;\n","var getMapData = require('./_getMapData');\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\nmodule.exports = mapCacheGet;\n","var getMapData = require('./_getMapData');\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\nmodule.exports = mapCacheHas;\n","var getMapData = require('./_getMapData');\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n}\n\nmodule.exports = mapCacheSet;\n","/**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\nfunction mapToArray(map) {\n var index = -1,\n result = Array(map.size);\n\n map.forEach(function(value, key) {\n result[++index] = [key, value];\n });\n return result;\n}\n\nmodule.exports = mapToArray;\n","var getNative = require('./_getNative');\n\n/* Built-in method references that are verified to be native. */\nvar nativeCreate = getNative(Object, 'create');\n\nmodule.exports = nativeCreate;\n","var overArg = require('./_overArg');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeKeys = overArg(Object.keys, Object);\n\nmodule.exports = nativeKeys;\n","/**\n * This function is like\n * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * except that it includes inherited enumerable properties.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction nativeKeysIn(object) {\n var result = [];\n if (object != null) {\n for (var key in Object(object)) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = nativeKeysIn;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n try {\n // Use `util.types` for Node.js 10+.\n var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n if (types) {\n return types;\n }\n\n // Legacy `process.binding('util')` for Node.js < 10.\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n}());\n\nmodule.exports = nodeUtil;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n","/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\nmodule.exports = overArg;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n","/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\nfunction setCacheAdd(value) {\n this.__data__.set(value, HASH_UNDEFINED);\n return this;\n}\n\nmodule.exports = setCacheAdd;\n","/**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\nfunction setCacheHas(value) {\n return this.__data__.has(value);\n}\n\nmodule.exports = setCacheHas;\n","/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\nfunction setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n}\n\nmodule.exports = setToArray;\n","var ListCache = require('./_ListCache');\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}\n\nmodule.exports = stackClear;\n","/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n var data = this.__data__,\n result = data['delete'](key);\n\n this.size = data.size;\n return result;\n}\n\nmodule.exports = stackDelete;\n","/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n return this.__data__.get(key);\n}\n\nmodule.exports = stackGet;\n","/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n return this.__data__.has(key);\n}\n\nmodule.exports = stackHas;\n","var ListCache = require('./_ListCache'),\n Map = require('./_Map'),\n MapCache = require('./_MapCache');\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n var data = this.__data__;\n if (data instanceof ListCache) {\n var pairs = data.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n this.size = ++data.size;\n return this;\n }\n data = this.__data__ = new MapCache(pairs);\n }\n data.set(key, value);\n this.size = data.size;\n return this;\n}\n\nmodule.exports = stackSet;\n","/** Used for built-in method references. */\nvar funcProto = Function.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\nmodule.exports = toSource;\n","var baseClone = require('./_baseClone');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_SYMBOLS_FLAG = 4;\n\n/**\n * This method is like `_.clone` except that it recursively clones `value`.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Lang\n * @param {*} value The value to recursively clone.\n * @returns {*} Returns the deep cloned value.\n * @see _.clone\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var deep = _.cloneDeep(objects);\n * console.log(deep[0] === objects[0]);\n * // => false\n */\nfunction cloneDeep(value) {\n return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);\n}\n\nmodule.exports = cloneDeep;\n","/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\nmodule.exports = eq;\n","var baseIsArguments = require('./_baseIsArguments'),\n isObjectLike = require('./isObjectLike');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n};\n\nmodule.exports = isArguments;\n","/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\nmodule.exports = isArray;\n","var isFunction = require('./isFunction'),\n isLength = require('./isLength');\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\nmodule.exports = isArrayLike;\n","var root = require('./_root'),\n stubFalse = require('./stubFalse');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\nmodule.exports = isBuffer;\n","var baseIsEqual = require('./_baseIsEqual');\n\n/**\n * Performs a deep comparison between two values to determine if they are\n * equivalent.\n *\n * **Note:** This method supports comparing arrays, array buffers, booleans,\n * date objects, error objects, maps, numbers, `Object` objects, regexes,\n * sets, strings, symbols, and typed arrays. `Object` objects are compared\n * by their own, not inherited, enumerable properties. Functions and DOM\n * nodes are compared by strict equality, i.e. `===`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.isEqual(object, other);\n * // => true\n *\n * object === other;\n * // => false\n */\nfunction isEqual(value, other) {\n return baseIsEqual(value, other);\n}\n\nmodule.exports = isEqual;\n","var baseGetTag = require('./_baseGetTag'),\n isObject = require('./isObject');\n\n/** `Object#toString` result references. */\nvar asyncTag = '[object AsyncFunction]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n proxyTag = '[object Proxy]';\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\nmodule.exports = isFunction;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\nmodule.exports = isLength;\n","var baseIsMap = require('./_baseIsMap'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsMap = nodeUtil && nodeUtil.isMap;\n\n/**\n * Checks if `value` is classified as a `Map` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n * @example\n *\n * _.isMap(new Map);\n * // => true\n *\n * _.isMap(new WeakMap);\n * // => false\n */\nvar isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;\n\nmodule.exports = isMap;\n","/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n","var baseIsSet = require('./_baseIsSet'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsSet = nodeUtil && nodeUtil.isSet;\n\n/**\n * Checks if `value` is classified as a `Set` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n * @example\n *\n * _.isSet(new Set);\n * // => true\n *\n * _.isSet(new WeakSet);\n * // => false\n */\nvar isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;\n\nmodule.exports = isSet;\n","var baseIsTypedArray = require('./_baseIsTypedArray'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\nmodule.exports = isTypedArray;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeys = require('./_baseKeys'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\nmodule.exports = keys;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeysIn = require('./_baseKeysIn'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\nfunction keysIn(object) {\n return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n}\n\nmodule.exports = keysIn;\n","/**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\nfunction stubArray() {\n return [];\n}\n\nmodule.exports = stubArray;\n","/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n return false;\n}\n\nmodule.exports = stubFalse;\n","import { connect } from \"@openfin/core-web\";\nimport { getSettings } from \"./settings\";\n\n/**\n * Initializes the OpenFin Web Broker connection.\n */\nexport async function init(): Promise {\n\t// Set window.fin to the `fin` object.\n\tif (window.fin === undefined) {\n\t\tconst settings = await getSettings();\n\t\t// Specify an interopConfig with a specific provider ID and a context group to initialize the `fin.me.interop` client on connection.\n\t\twindow.fin = await connect({\n\t\t\toptions: {\n\t\t\t\tbrokerUrl: settings.platform.brokerUrl,\n\t\t\t\tinteropConfig: {\n\t\t\t\t\tproviderId: settings.platform.providerId,\n\t\t\t\t\tcurrentContextGroup: settings.platform.defaultContextGroup\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tconsole.log(\"Finished initializing the fin API.\");\n\t\t// Create and dispatch the finReady event\n\t\tconst event = new CustomEvent(\"finReady\");\n\t\twindow.dispatchEvent(event);\n\t}\n\n\tif (window.fdc3 === undefined && window?.fin?.me.interop?.getFDC3Sync !== undefined) {\n\t\twindow.fdc3 = fin.me.interop.getFDC3Sync(\"2.0\");\n\t\tconsole.log(\"Finished initializing the fdc3 API.\");\n\t\t// Create and dispatch the FDC3Ready event\n\t\tconst event = new CustomEvent(\"fdc3Ready\");\n\t\twindow.dispatchEvent(event);\n\t}\n}\n","import type { Settings } from \"../shapes/setting-shapes\";\n\n/**\n * Fetches the settings for the application.\n * @returns The settings for the application.\n */\nexport async function getSettings(): Promise {\n\treturn {\n\t\tplatform: {\n\t\t\tsharedWorkerUrl: \"http://localhost:6060/js/shared-worker.bundle.js\",\n\t\t\tbrokerUrl: \"http://localhost:6060/platform/iframe-broker.html\",\n\t\t\tproviderId: \"web-interop-basic\",\n\t\t\tdefaultContextGroup: \"green\"\n\t\t}\n\t};\n}\n","export { default as v1 } from './v1.js';\nexport { default as v3 } from './v3.js';\nexport { default as v4 } from './v4.js';\nexport { default as v5 } from './v5.js';\nexport { default as NIL } from './nil.js';\nexport { default as version } from './version.js';\nexport { default as validate } from './validate.js';\nexport { default as stringify } from './stringify.js';\nexport { default as parse } from './parse.js';","/*\n * Browser-compatible JavaScript MD5\n *\n * Modification of JavaScript MD5\n * https://github.com/blueimp/JavaScript-MD5\n *\n * Copyright 2011, Sebastian Tschan\n * https://blueimp.net\n *\n * Licensed under the MIT license:\n * https://opensource.org/licenses/MIT\n *\n * Based on\n * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message\n * Digest Algorithm, as defined in RFC 1321.\n * Version 2.2 Copyright (C) Paul Johnston 1999 - 2009\n * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet\n * Distributed under the BSD License\n * See http://pajhome.org.uk/crypt/md5 for more info.\n */\nfunction md5(bytes) {\n if (typeof bytes === 'string') {\n var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape\n\n bytes = new Uint8Array(msg.length);\n\n for (var i = 0; i < msg.length; ++i) {\n bytes[i] = msg.charCodeAt(i);\n }\n }\n\n return md5ToHexEncodedArray(wordsToMd5(bytesToWords(bytes), bytes.length * 8));\n}\n/*\n * Convert an array of little-endian words to an array of bytes\n */\n\n\nfunction md5ToHexEncodedArray(input) {\n var output = [];\n var length32 = input.length * 32;\n var hexTab = '0123456789abcdef';\n\n for (var i = 0; i < length32; i += 8) {\n var x = input[i >> 5] >>> i % 32 & 0xff;\n var hex = parseInt(hexTab.charAt(x >>> 4 & 0x0f) + hexTab.charAt(x & 0x0f), 16);\n output.push(hex);\n }\n\n return output;\n}\n/**\n * Calculate output length with padding and bit length\n */\n\n\nfunction getOutputLength(inputLength8) {\n return (inputLength8 + 64 >>> 9 << 4) + 14 + 1;\n}\n/*\n * Calculate the MD5 of an array of little-endian words, and a bit length.\n */\n\n\nfunction wordsToMd5(x, len) {\n /* append padding */\n x[len >> 5] |= 0x80 << len % 32;\n x[getOutputLength(len) - 1] = len;\n var a = 1732584193;\n var b = -271733879;\n var c = -1732584194;\n var d = 271733878;\n\n for (var i = 0; i < x.length; i += 16) {\n var olda = a;\n var oldb = b;\n var oldc = c;\n var oldd = d;\n a = md5ff(a, b, c, d, x[i], 7, -680876936);\n d = md5ff(d, a, b, c, x[i + 1], 12, -389564586);\n c = md5ff(c, d, a, b, x[i + 2], 17, 606105819);\n b = md5ff(b, c, d, a, x[i + 3], 22, -1044525330);\n a = md5ff(a, b, c, d, x[i + 4], 7, -176418897);\n d = md5ff(d, a, b, c, x[i + 5], 12, 1200080426);\n c = md5ff(c, d, a, b, x[i + 6], 17, -1473231341);\n b = md5ff(b, c, d, a, x[i + 7], 22, -45705983);\n a = md5ff(a, b, c, d, x[i + 8], 7, 1770035416);\n d = md5ff(d, a, b, c, x[i + 9], 12, -1958414417);\n c = md5ff(c, d, a, b, x[i + 10], 17, -42063);\n b = md5ff(b, c, d, a, x[i + 11], 22, -1990404162);\n a = md5ff(a, b, c, d, x[i + 12], 7, 1804603682);\n d = md5ff(d, a, b, c, x[i + 13], 12, -40341101);\n c = md5ff(c, d, a, b, x[i + 14], 17, -1502002290);\n b = md5ff(b, c, d, a, x[i + 15], 22, 1236535329);\n a = md5gg(a, b, c, d, x[i + 1], 5, -165796510);\n d = md5gg(d, a, b, c, x[i + 6], 9, -1069501632);\n c = md5gg(c, d, a, b, x[i + 11], 14, 643717713);\n b = md5gg(b, c, d, a, x[i], 20, -373897302);\n a = md5gg(a, b, c, d, x[i + 5], 5, -701558691);\n d = md5gg(d, a, b, c, x[i + 10], 9, 38016083);\n c = md5gg(c, d, a, b, x[i + 15], 14, -660478335);\n b = md5gg(b, c, d, a, x[i + 4], 20, -405537848);\n a = md5gg(a, b, c, d, x[i + 9], 5, 568446438);\n d = md5gg(d, a, b, c, x[i + 14], 9, -1019803690);\n c = md5gg(c, d, a, b, x[i + 3], 14, -187363961);\n b = md5gg(b, c, d, a, x[i + 8], 20, 1163531501);\n a = md5gg(a, b, c, d, x[i + 13], 5, -1444681467);\n d = md5gg(d, a, b, c, x[i + 2], 9, -51403784);\n c = md5gg(c, d, a, b, x[i + 7], 14, 1735328473);\n b = md5gg(b, c, d, a, x[i + 12], 20, -1926607734);\n a = md5hh(a, b, c, d, x[i + 5], 4, -378558);\n d = md5hh(d, a, b, c, x[i + 8], 11, -2022574463);\n c = md5hh(c, d, a, b, x[i + 11], 16, 1839030562);\n b = md5hh(b, c, d, a, x[i + 14], 23, -35309556);\n a = md5hh(a, b, c, d, x[i + 1], 4, -1530992060);\n d = md5hh(d, a, b, c, x[i + 4], 11, 1272893353);\n c = md5hh(c, d, a, b, x[i + 7], 16, -155497632);\n b = md5hh(b, c, d, a, x[i + 10], 23, -1094730640);\n a = md5hh(a, b, c, d, x[i + 13], 4, 681279174);\n d = md5hh(d, a, b, c, x[i], 11, -358537222);\n c = md5hh(c, d, a, b, x[i + 3], 16, -722521979);\n b = md5hh(b, c, d, a, x[i + 6], 23, 76029189);\n a = md5hh(a, b, c, d, x[i + 9], 4, -640364487);\n d = md5hh(d, a, b, c, x[i + 12], 11, -421815835);\n c = md5hh(c, d, a, b, x[i + 15], 16, 530742520);\n b = md5hh(b, c, d, a, x[i + 2], 23, -995338651);\n a = md5ii(a, b, c, d, x[i], 6, -198630844);\n d = md5ii(d, a, b, c, x[i + 7], 10, 1126891415);\n c = md5ii(c, d, a, b, x[i + 14], 15, -1416354905);\n b = md5ii(b, c, d, a, x[i + 5], 21, -57434055);\n a = md5ii(a, b, c, d, x[i + 12], 6, 1700485571);\n d = md5ii(d, a, b, c, x[i + 3], 10, -1894986606);\n c = md5ii(c, d, a, b, x[i + 10], 15, -1051523);\n b = md5ii(b, c, d, a, x[i + 1], 21, -2054922799);\n a = md5ii(a, b, c, d, x[i + 8], 6, 1873313359);\n d = md5ii(d, a, b, c, x[i + 15], 10, -30611744);\n c = md5ii(c, d, a, b, x[i + 6], 15, -1560198380);\n b = md5ii(b, c, d, a, x[i + 13], 21, 1309151649);\n a = md5ii(a, b, c, d, x[i + 4], 6, -145523070);\n d = md5ii(d, a, b, c, x[i + 11], 10, -1120210379);\n c = md5ii(c, d, a, b, x[i + 2], 15, 718787259);\n b = md5ii(b, c, d, a, x[i + 9], 21, -343485551);\n a = safeAdd(a, olda);\n b = safeAdd(b, oldb);\n c = safeAdd(c, oldc);\n d = safeAdd(d, oldd);\n }\n\n return [a, b, c, d];\n}\n/*\n * Convert an array bytes to an array of little-endian words\n * Characters >255 have their high-byte silently ignored.\n */\n\n\nfunction bytesToWords(input) {\n if (input.length === 0) {\n return [];\n }\n\n var length8 = input.length * 8;\n var output = new Uint32Array(getOutputLength(length8));\n\n for (var i = 0; i < length8; i += 8) {\n output[i >> 5] |= (input[i / 8] & 0xff) << i % 32;\n }\n\n return output;\n}\n/*\n * Add integers, wrapping at 2^32. This uses 16-bit operations internally\n * to work around bugs in some JS interpreters.\n */\n\n\nfunction safeAdd(x, y) {\n var lsw = (x & 0xffff) + (y & 0xffff);\n var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n return msw << 16 | lsw & 0xffff;\n}\n/*\n * Bitwise rotate a 32-bit number to the left.\n */\n\n\nfunction bitRotateLeft(num, cnt) {\n return num << cnt | num >>> 32 - cnt;\n}\n/*\n * These functions implement the four basic operations the algorithm uses.\n */\n\n\nfunction md5cmn(q, a, b, x, s, t) {\n return safeAdd(bitRotateLeft(safeAdd(safeAdd(a, q), safeAdd(x, t)), s), b);\n}\n\nfunction md5ff(a, b, c, d, x, s, t) {\n return md5cmn(b & c | ~b & d, a, b, x, s, t);\n}\n\nfunction md5gg(a, b, c, d, x, s, t) {\n return md5cmn(b & d | c & ~d, a, b, x, s, t);\n}\n\nfunction md5hh(a, b, c, d, x, s, t) {\n return md5cmn(b ^ c ^ d, a, b, x, s, t);\n}\n\nfunction md5ii(a, b, c, d, x, s, t) {\n return md5cmn(c ^ (b | ~d), a, b, x, s, t);\n}\n\nexport default md5;","export default '00000000-0000-0000-0000-000000000000';","import validate from './validate.js';\n\nfunction parse(uuid) {\n if (!validate(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n var v;\n var arr = new Uint8Array(16); // Parse ########-....-....-....-............\n\n arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24;\n arr[1] = v >>> 16 & 0xff;\n arr[2] = v >>> 8 & 0xff;\n arr[3] = v & 0xff; // Parse ........-####-....-....-............\n\n arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8;\n arr[5] = v & 0xff; // Parse ........-....-####-....-............\n\n arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8;\n arr[7] = v & 0xff; // Parse ........-....-....-####-............\n\n arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8;\n arr[9] = v & 0xff; // Parse ........-....-....-....-############\n // (Use \"/\" to avoid 32-bit truncation when bit-shifting high-order bytes)\n\n arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff;\n arr[11] = v / 0x100000000 & 0xff;\n arr[12] = v >>> 24 & 0xff;\n arr[13] = v >>> 16 & 0xff;\n arr[14] = v >>> 8 & 0xff;\n arr[15] = v & 0xff;\n return arr;\n}\n\nexport default parse;","export default /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;","// Unique ID creation requires a high quality random # generator. In the browser we therefore\n// require the crypto API and do not support built-in fallback to lower quality random number\n// generators (like Math.random()).\nvar getRandomValues;\nvar rnds8 = new Uint8Array(16);\nexport default function rng() {\n // lazy load so that environments that need to polyfill have a chance to do so\n if (!getRandomValues) {\n // getRandomValues needs to be invoked in a context where \"this\" is a Crypto implementation. Also,\n // find the complete implementation of crypto (msCrypto) on IE11.\n getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto !== 'undefined' && typeof msCrypto.getRandomValues === 'function' && msCrypto.getRandomValues.bind(msCrypto);\n\n if (!getRandomValues) {\n throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');\n }\n }\n\n return getRandomValues(rnds8);\n}","// Adapted from Chris Veness' SHA1 code at\n// http://www.movable-type.co.uk/scripts/sha1.html\nfunction f(s, x, y, z) {\n switch (s) {\n case 0:\n return x & y ^ ~x & z;\n\n case 1:\n return x ^ y ^ z;\n\n case 2:\n return x & y ^ x & z ^ y & z;\n\n case 3:\n return x ^ y ^ z;\n }\n}\n\nfunction ROTL(x, n) {\n return x << n | x >>> 32 - n;\n}\n\nfunction sha1(bytes) {\n var K = [0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xca62c1d6];\n var H = [0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0];\n\n if (typeof bytes === 'string') {\n var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape\n\n bytes = [];\n\n for (var i = 0; i < msg.length; ++i) {\n bytes.push(msg.charCodeAt(i));\n }\n } else if (!Array.isArray(bytes)) {\n // Convert Array-like to Array\n bytes = Array.prototype.slice.call(bytes);\n }\n\n bytes.push(0x80);\n var l = bytes.length / 4 + 2;\n var N = Math.ceil(l / 16);\n var M = new Array(N);\n\n for (var _i = 0; _i < N; ++_i) {\n var arr = new Uint32Array(16);\n\n for (var j = 0; j < 16; ++j) {\n arr[j] = bytes[_i * 64 + j * 4] << 24 | bytes[_i * 64 + j * 4 + 1] << 16 | bytes[_i * 64 + j * 4 + 2] << 8 | bytes[_i * 64 + j * 4 + 3];\n }\n\n M[_i] = arr;\n }\n\n M[N - 1][14] = (bytes.length - 1) * 8 / Math.pow(2, 32);\n M[N - 1][14] = Math.floor(M[N - 1][14]);\n M[N - 1][15] = (bytes.length - 1) * 8 & 0xffffffff;\n\n for (var _i2 = 0; _i2 < N; ++_i2) {\n var W = new Uint32Array(80);\n\n for (var t = 0; t < 16; ++t) {\n W[t] = M[_i2][t];\n }\n\n for (var _t = 16; _t < 80; ++_t) {\n W[_t] = ROTL(W[_t - 3] ^ W[_t - 8] ^ W[_t - 14] ^ W[_t - 16], 1);\n }\n\n var a = H[0];\n var b = H[1];\n var c = H[2];\n var d = H[3];\n var e = H[4];\n\n for (var _t2 = 0; _t2 < 80; ++_t2) {\n var s = Math.floor(_t2 / 20);\n var T = ROTL(a, 5) + f(s, b, c, d) + e + K[s] + W[_t2] >>> 0;\n e = d;\n d = c;\n c = ROTL(b, 30) >>> 0;\n b = a;\n a = T;\n }\n\n H[0] = H[0] + a >>> 0;\n H[1] = H[1] + b >>> 0;\n H[2] = H[2] + c >>> 0;\n H[3] = H[3] + d >>> 0;\n H[4] = H[4] + e >>> 0;\n }\n\n return [H[0] >> 24 & 0xff, H[0] >> 16 & 0xff, H[0] >> 8 & 0xff, H[0] & 0xff, H[1] >> 24 & 0xff, H[1] >> 16 & 0xff, H[1] >> 8 & 0xff, H[1] & 0xff, H[2] >> 24 & 0xff, H[2] >> 16 & 0xff, H[2] >> 8 & 0xff, H[2] & 0xff, H[3] >> 24 & 0xff, H[3] >> 16 & 0xff, H[3] >> 8 & 0xff, H[3] & 0xff, H[4] >> 24 & 0xff, H[4] >> 16 & 0xff, H[4] >> 8 & 0xff, H[4] & 0xff];\n}\n\nexport default sha1;","import validate from './validate.js';\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\n\nvar byteToHex = [];\n\nfor (var i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).substr(1));\n}\n\nfunction stringify(arr) {\n var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n var uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!validate(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n\n return uuid;\n}\n\nexport default stringify;","import rng from './rng.js';\nimport stringify from './stringify.js'; // **`v1()` - Generate time-based UUID**\n//\n// Inspired by https://github.com/LiosK/UUID.js\n// and http://docs.python.org/library/uuid.html\n\nvar _nodeId;\n\nvar _clockseq; // Previous uuid creation time\n\n\nvar _lastMSecs = 0;\nvar _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details\n\nfunction v1(options, buf, offset) {\n var i = buf && offset || 0;\n var b = buf || new Array(16);\n options = options || {};\n var node = options.node || _nodeId;\n var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not\n // specified. We do this lazily to minimize issues related to insufficient\n // system entropy. See #189\n\n if (node == null || clockseq == null) {\n var seedBytes = options.random || (options.rng || rng)();\n\n if (node == null) {\n // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)\n node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]];\n }\n\n if (clockseq == null) {\n // Per 4.2.2, randomize (14 bit) clockseq\n clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;\n }\n } // UUID timestamps are 100 nano-second units since the Gregorian epoch,\n // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so\n // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'\n // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.\n\n\n var msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock\n // cycle to simulate higher resolution clock\n\n var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs)\n\n var dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression\n\n if (dt < 0 && options.clockseq === undefined) {\n clockseq = clockseq + 1 & 0x3fff;\n } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new\n // time interval\n\n\n if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {\n nsecs = 0;\n } // Per 4.2.1.2 Throw error if too many uuids are requested\n\n\n if (nsecs >= 10000) {\n throw new Error(\"uuid.v1(): Can't create more than 10M uuids/sec\");\n }\n\n _lastMSecs = msecs;\n _lastNSecs = nsecs;\n _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch\n\n msecs += 12219292800000; // `time_low`\n\n var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;\n b[i++] = tl >>> 24 & 0xff;\n b[i++] = tl >>> 16 & 0xff;\n b[i++] = tl >>> 8 & 0xff;\n b[i++] = tl & 0xff; // `time_mid`\n\n var tmh = msecs / 0x100000000 * 10000 & 0xfffffff;\n b[i++] = tmh >>> 8 & 0xff;\n b[i++] = tmh & 0xff; // `time_high_and_version`\n\n b[i++] = tmh >>> 24 & 0xf | 0x10; // include version\n\n b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)\n\n b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low`\n\n b[i++] = clockseq & 0xff; // `node`\n\n for (var n = 0; n < 6; ++n) {\n b[i + n] = node[n];\n }\n\n return buf || stringify(b);\n}\n\nexport default v1;","import v35 from './v35.js';\nimport md5 from './md5.js';\nvar v3 = v35('v3', 0x30, md5);\nexport default v3;","import stringify from './stringify.js';\nimport parse from './parse.js';\n\nfunction stringToBytes(str) {\n str = unescape(encodeURIComponent(str)); // UTF8 escape\n\n var bytes = [];\n\n for (var i = 0; i < str.length; ++i) {\n bytes.push(str.charCodeAt(i));\n }\n\n return bytes;\n}\n\nexport var DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8';\nexport var URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8';\nexport default function (name, version, hashfunc) {\n function generateUUID(value, namespace, buf, offset) {\n if (typeof value === 'string') {\n value = stringToBytes(value);\n }\n\n if (typeof namespace === 'string') {\n namespace = parse(namespace);\n }\n\n if (namespace.length !== 16) {\n throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)');\n } // Compute hash of namespace and value, Per 4.3\n // Future: Use spread syntax when supported on all platforms, e.g. `bytes =\n // hashfunc([...namespace, ... value])`\n\n\n var bytes = new Uint8Array(16 + value.length);\n bytes.set(namespace);\n bytes.set(value, namespace.length);\n bytes = hashfunc(bytes);\n bytes[6] = bytes[6] & 0x0f | version;\n bytes[8] = bytes[8] & 0x3f | 0x80;\n\n if (buf) {\n offset = offset || 0;\n\n for (var i = 0; i < 16; ++i) {\n buf[offset + i] = bytes[i];\n }\n\n return buf;\n }\n\n return stringify(bytes);\n } // Function#name is not settable on some platforms (#270)\n\n\n try {\n generateUUID.name = name; // eslint-disable-next-line no-empty\n } catch (err) {} // For CommonJS default export support\n\n\n generateUUID.DNS = DNS;\n generateUUID.URL = URL;\n return generateUUID;\n}","import rng from './rng.js';\nimport stringify from './stringify.js';\n\nfunction v4(options, buf, offset) {\n options = options || {};\n var rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n offset = offset || 0;\n\n for (var i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n\n return buf;\n }\n\n return stringify(rnds);\n}\n\nexport default v4;","import v35 from './v35.js';\nimport sha1 from './sha1.js';\nvar v5 = v35('v5', 0x50, sha1);\nexport default v5;","import REGEX from './regex.js';\n\nfunction validate(uuid) {\n return typeof uuid === 'string' && REGEX.test(uuid);\n}\n\nexport default validate;","import validate from './validate.js';\n\nfunction version(uuid) {\n if (!validate(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n return parseInt(uuid.substr(14, 1), 16);\n}\n\nexport default version;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = (module) => {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","import type { Context } from \"@finos/fdc3\";\nimport { init } from \"../platform/api\";\n\nwindow.addEventListener(\"DOMContentLoaded\", async () => {\n\tawait init();\n\tawait initializeDOM();\n});\n\n/**\n * Broadcasts a context using FDC3.\n */\nasync function setContext(): Promise {\n\tconst contextType = \"fdc3.instrument\";\n\tconst contextName = \"Tesla Inc.\";\n\tconst idData = {\n\t\tticker: \"TSLA\"\n\t};\n\tconst context = {\n\t\ttype: contextType,\n\t\tname: contextName,\n\t\tid: idData\n\t};\n\tif (window.fin) {\n\t\tawait window.fin.me.interop.setContext(context);\n\t\tconsole.log(`Set context: ${contextType} - ${contextName}`);\n\t} else {\n\t\twindow.addEventListener(\"finReady\", async () => {\n\t\t\tif (window.fin) {\n\t\t\t\tawait window.fin.me.interop.setContext(context);\n\t\t\t\tconsole.log(`Set context: ${contextType} - ${contextName}`);\n\t\t\t}\n\t\t});\n\t}\n}\n\n/**\n * Adds an interop context listener to the window.\n */\nasync function addContextListener(): Promise {\n\tif (window.fin) {\n\t\tawait window.fin.me.interop.addContextHandler((context: Context) => {\n\t\t\tupdateDOMElements(context);\n\t\t});\n\t} else {\n\t\twindow.addEventListener(\"finReady\", async () => {\n\t\t\tif (window.fin) {\n\t\t\t\tawait window.fin.me.interop.addContextHandler((context: Context) => {\n\t\t\t\t\tupdateDOMElements(context);\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t}\n}\n\n/**\n * Updates the DOM elements with the provided context.\n * @param context The context to update the DOM elements with.\n */\nfunction updateDOMElements(context: Context): void {\n\tconst contextTypeSpan = document.querySelector(\"#contextType\");\n\tconst contextNameSpan = document.querySelector(\"#contextName\");\n\tconst contextBodyPre = document.querySelector(\"#contextBody\");\n\n\tif (contextTypeSpan !== null && contextNameSpan !== null && contextBodyPre !== null) {\n\t\tcontextTypeSpan.textContent = context.type;\n\t\tcontextNameSpan.textContent = context.name ?? \"No name provided.\";\n\t\tcontextBodyPre.textContent = JSON.stringify(context, null, 2);\n\t}\n}\n\n/**\n * Initialize the DOM elements.\n */\nasync function initializeDOM(): Promise {\n\tconst setContextButton = document.querySelector(\"#setContext\");\n\n\tif (setContextButton !== null) {\n\t\tsetContextButton.addEventListener(\"click\", async () => {\n\t\t\tawait setContext();\n\t\t});\n\t}\n\n\tawait addContextListener();\n}\n"],"names":[],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"interop-view.bundle.js","mappings":";;;;;;;;;;AAAa,MAAM,mBAAO,CAAC,qFAAoB,EAAE,mBAAO,CAAC,mDAAS,EAAE,mBAAO,CAAC,+DAAM,EAAE,mBAAO,CAAC,mDAAQ,EAAE,mBAAO,CAAC,gEAAkB,EAAE,mBAAO,CAAC,4DAAgB,EAAE,eAAe;;;;;;;;;;;;ACA9J,MAAM,mBAAO,CAAC,mDAAS,IAAI,mBAAO,CAAC,mDAAQ,IAAI,mBAAO,CAAC,gEAAkB,IAAI,mBAAO,CAAC,4DAAgB,IAAI,mBAAO,CAAC,+DAAM,EAAE,kBAAkB,EAAE,GAAG,wBAAwB,GAAG,sGAAsG,qBAAM,CAAC,qBAAM,iCAAiC,KAAK,KAAK,KAAK,MAAM,oBAAoB,WAAW,kBAAkB,kBAAkB,UAAU,SAAS,sCAAsC,SAAS,sFAAsF,mCAAmC,6BA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v6nD;;AAEZ,kBAAkB;AAClB,mBAAmB;AACnB,qBAAqB;;AAErB;AACA;AACA;;AAEA;AACA,mCAAmC,SAAS;AAC5C;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,cAAc,SAAS;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,2CAA2C,UAAU;AACrD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;ACrJA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEY;;AAEZ,eAAe,mBAAO,CAAC,wDAAW;AAClC,gBAAgB,mBAAO,CAAC,oDAAS;AACjC;AACA;AACA;AACA;;AAEA,cAAc;AACd,kBAAkB;AAClB,yBAAyB;;AAEzB;AACA,kBAAkB;;AAElB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,kBAAkB,YAAY;AAC9B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA,wCAAwC,SAAS;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;;AAEA;AACA;AACA,cAAc,iBAAiB;AAC/B;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,iDAAiD,EAAE;AACnD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C;AAC1C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA,yBAAyB,eAAe;AACxC;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,yBAAyB,QAAQ;AACjC;AACA,sBAAsB,eAAe;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc,YAAY;AAC1B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB,sBAAsB;AACxC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,mBAAmB;AACnB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA,oBAAoB,SAAS;AAC7B;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA,qBAAqB,WAAW,GAAG,IAAI;AACvC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA,gBAAgB,WAAW,GAAG,IAAI,KAAK,aAAa;AACpD;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;;AAEA;AACA,GAAG;AACH;AACA;AACA,mBAAmB,KAAK,mDAAmD,cAAc;AACzF,GAAG;AACH;AACA;AACA,+BAA+B,IAAI;AACnC;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,MAAM,aAAa,SAAS;AACtD;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,SAAS,gBAAgB;AACzB,cAAc,oBAAoB,EAAE,IAAI;AACxC;AACA,YAAY,gBAAgB,EAAE,IAAI;AAClC;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,GAAG,SAAS,GAAG,KAAK,qBAAqB,EAAE,EAAE;AACpE,QAAQ;AACR,yBAAyB,GAAG,KAAK,yBAAyB,EAAE,EAAE;AAC9D,mBAAmB,yBAAyB,EAAE,EAAE;AAChD;AACA,MAAM;AACN,oBAAoB,IAAI,EAAE,GAAG,SAAS,IAAI,EAAE,EAAE;AAC9C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,0CAA0C,cAAc,SAAS,OAAO;AACxE;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,kBAAkB,YAAY;AAC9B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,kBAAkB,gBAAgB;AAClC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,kBAAkB,gBAAgB;AAClC;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,cAAc,YAAY;AAC1B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,QAAQ;AAC1B;AACA,oBAAoB,QAAQ;AAC5B;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;;;;;ACzjEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEa;;AAEb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB;;AAEnB;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,sBAAsB;AACxC;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA,eAAe;AACf;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA,oBAAoB,SAAS;AAC7B;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;;AAEA,kCAAkC,QAAQ;AAC1C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oBAAoB,iBAAiB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,QAAQ;AACR;AACA,uCAAuC,QAAQ;AAC/C;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,OAAO;AACzB;AACA;AACA;;AAEA;AACA,SAAS,yBAAyB;AAClC;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,gBAAgB;AAClC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,8DAA8D,YAAY;AAC1E;AACA,8DAA8D,YAAY;AAC1E;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,qCAAqC,YAAY;AACjD;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;AACA;;;;;;;;;;;AChfA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,SAAS,WAAW;;AAEpB;AACA;AACA;AACA,SAAS,WAAW;;AAEpB;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA,SAAS,WAAW;;AAEpB;AACA;AACA,SAAS,UAAU;;AAEnB;AACA;;;;;;;;;;;ACpFA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,WAAW,mBAAO,CAAC,mDAAS;;AAE5B;AACA;;AAEA;;;;;;;;;;;ACNA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,iBAAiB,mBA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,CAAC,yDAAY;AACnC,cAAc,mBAAO,CAAC,yDAAY;AAClC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,SAAS;AACpB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AChDA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACnBA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,UAAU;AACrB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACtBA,sBAAsB,mBAAO,CAAC,yEAAoB;AAClD,SAAS,mBAAO,CAAC,6CAAM;;AAEvB;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC3BA,SAAS,mBAAO,CAAC,6CAAM;;AAEvB;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpBA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,WAAW,mBAAO,CAAC,iDAAQ;;AAE3B;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA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A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,SAAS;AACpB;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa,GAAG;AAChB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;AACA,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;;;;;;;;;;ACrKA,eAAe,mBAAO,CAAC,yDAAY;;AAEnC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;;;;;;;;;;AC7BA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,cAAc,mBAAO,CAAC,uDAAW;;AAEjC;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACnBA,aAAa,mBAAO,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EA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClFA,aAAa,mBAAO,CAAC,uDAAW;AAChC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA,iBAAiB,mBAAO,CAAC,6DAAc;AACvC,eAAe,mBAAO,CAAC,2DAAa;AACpC,eAAe,mBAAO,CAAC,yDAAY;AACnC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;AACA;AACA;AACA,oCAAoC;;AAEpC;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC9CA,aAAa,mBAAO,CAAC,uDAAW;AAChC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,eAAe,mBAAO,CAAC,yDAAY;AACnC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA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AAe;AACxC,SAAS,mBAAO,CAAC,6CAAM;AACvB,kBAAkB,mBAAO,CAAC,iEAAgB;AAC1C,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC/GA,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;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AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACdA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AChBA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,GAAG;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC7BA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACtBA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACtBA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACzBA,uBAAuB,mBAAO,CAAC,2EAAqB;AACpD,oBAAoB,mBAAO,CAAC,qEAAkB;AAC9C,kBAAkB,mBAAO,CAAC,iEAAgB;AAC1C,kBAAkB,mBAAO,CAAC,iEAAgB;AAC1C,sBAAsB,mBAAO,CAAC,yEAAoB;;AAElD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC5EA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,mBAAmB,mBAAO,CAAC,mEAAiB;AAC5C,kBAAkB,mBAAO,CAAC,iEAAgB;;AAE1C;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACxBA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACdA,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACnBA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACZA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAA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d,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACbA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;;;;;;;;;;ACjBA,gBAAgB,mBAAO,CAAC,6DAAc;;AAEtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACdA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,GAAG;AAChB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACbA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACbA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,UAAU,mBAAO,CAAC,iDAAQ;AAC1B,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjCA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;;;;;;;;;;;ACzBA,gBAAgB,mBAAO,CAAC,6DAAc;;AAEtC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,GAAG;AAChB;AACA;AACA;AACA,oBAAoB,QAAQ,IAAI,QAAQ;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,kBAAkB;AAClB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpCA,sBAAsB,mBAAO,CAAC,yEAAoB;AAClD,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA,8BAA8B,mBAAmB;AACjD;AACA;AACA;AACA;AACA;AACA,+CAA+C,mBAAmB;AAClE;AACA;AACA;;AAEA;;;;;;;;;;;ACnCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACzBA,iBAAiB,mBAAO,CAAC,6DAAc;AACvC,eAAe,mBAAO,CAAC,yDAAY;;AAEnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AChCA,WAAW,mBAAO,CAAC,mDAAS;AAC5B,gBAAgB,mBAAO,CAAC,2DAAa;;AAErC;AACA,kBAAkB,KAA0B;;AAE5C;AACA,gCAAgC,QAAa;;AAE7C;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACrCA,kBAAkB,mBAAO,CAAC,iEAAgB;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,kBAAkB;AAClB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClCA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,eAAe,mBAAO,CAAC,yDAAY;;AAEnC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpCA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClCA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC1BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC9BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC5BA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC1BA,uBAAuB,mBAAO,CAAC,2EAAqB;AACpD,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC1BA,oBAAoB,mBAAO,CAAC,qEAAkB;AAC9C,eAAe,mBAAO,CAAC,2DAAa;AACpC,kBAAkB,mBAAO,CAAC,+DAAe;;AAEzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpCA,oBAAoB,mBAAO,CAAC,qEAAkB;AAC9C,iBAAiB,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,EAAE,CAAC,OAAO,EAAE,WAAW,KAAK,SAAS,EAAE,CAAC;QACrF,MAAM,CAAC,IAAI,GAAG,GAAG,CAAC,EAAE,CAAC,OAAO,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;QAChD,OAAO,CAAC,GAAG,CAAC,qCAAqC,CAAC,CAAC;QACnD,0CAA0C;QAC1C,MAAM,KAAK,GAAG,IAAI,WAAW,CAAC,WAAW,CAAC,CAAC;QAC3C,MAAM,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IAC7B,CAAC;AACF,CAAC;;;;;;;;;;;;;;AC3BD,kCASC;AAbD;;;GAGG;AACI,KAAK,UAAU,WAAW;IAChC,OAAO;QACN,QAAQ,EAAE;YACT,eAAe,EAAE,kDAAkD;YACnE,SAAS,EAAE,mDAAmD;YAC9D,UAAU,EAAE,mBAAmB;YAC/B,mBAAmB,EAAE,OAAO;SAC5B;KACD,CAAC;AACH,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACfuC;AACA;AACA;AACA;AACE;AACQ;AACE;AACE;;;;;;;;;;;;;;;;ACPtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD;;AAEnD;;AAEA,oBAAoB,gBAAgB;AACpC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA,kBAAkB,cAAc;AAChC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,kBAAkB,cAAc;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,kBAAkB,aAAa;AAC/B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,iEAAe,GAAG;;;;;;;;;;;;;;;ACtNlB,iEAAe,sCAAsC;;;;;;;;;;;;;;;;ACAhB;;AAErC;AACA,OAAO,wDAAQ;AACf;AACA;;AAEA;AACA,gCAAgC;;AAEhC;AACA;AACA;AACA,qBAAqB;;AAErB;AACA,qBAAqB;;AAErB;AACA,qBAAqB;;AAErB;AACA,qBAAqB;AACrB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,iEAAe,KAAK;;;;;;;;;;;;;;;AClCpB,iEAAe,cAAc,EAAE,UAAU,EAAE,eAAe,EAAE,gBAAgB,EAAE,UAAU,GAAG,yCAAyC;;;;;;;;;;;;;;;ACApI;AACA;AACA;AACA;AACA;AACe;AACf;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;AClBA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,mDAAmD;;AAEnD;;AAEA,oBAAoB,gBAAgB;AACpC;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA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UAAU,EAAE,CAAC;QACpB,CAAC,CAAC,CAAC;IACJ,CAAC;IAED,MAAM,kBAAkB,EAAE,CAAC;AAC5B,CAAC","sources":["webpack://openfin-web--web-interop-basic/../../node_modules/@openfin/core-web/out/api-client.js","webpack://openfin-web--web-interop-basic/../../node_modules/@openfin/core-web/out/main-8cad4070.js","webpack://openfin-web--web-interop-basic/../../node_modules/@openfin/core-web/out/main-b14f67c9.js","webpack://openfin-web--web-interop-basic/../../node_modules/base64-js/index.js","webpack://openfin-web--web-interop-basic/../../node_modules/buffer/index.js","webpack://openfin-web--web-interop-basic/../../node_modules/events/events.js","webpack://openfin-web--web-interop-basic/../../node_modules/ieee754/index.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_DataView.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_Hash.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_ListCache.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_Map.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_MapCache.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_Promise.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_Set.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_SetCache.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_Stack.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_Symbol.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_Uint8Array.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_WeakMap.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_arrayEach.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_arrayFilter.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_arrayLikeKeys.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_arrayPush.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_arraySome.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_assignValue.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_assocIndexOf.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_baseAssign.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_baseAssignIn.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_baseAssignValue.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_baseClone.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_baseCreate.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_baseGetAllKeys.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_baseGetTag.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_baseIsArguments.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_baseIsEqual.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_baseIsEqualDeep.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_baseIsMap.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_baseIsNative.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_baseIsSet.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_baseIsTypedArray.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_baseKeys.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_baseKeysIn.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_baseTimes.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_baseUnary.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_cacheHas.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_cloneArrayBuffer.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_cloneBuffer.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_cloneDataView.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_cloneRegExp.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_cloneSymbol.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_cloneTypedArray.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_copyArray.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_copyObject.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_copySymbols.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_copySymbolsIn.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_coreJsData.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_defineProperty.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_equalArrays.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_equalByTag.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_equalObjects.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_freeGlobal.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_getAllKeys.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_getAllKeysIn.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_getMapData.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_getNative.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_getPrototype.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_getRawTag.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_getSymbols.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_getSymbolsIn.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_getTag.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_getValue.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_hashClear.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_hashDelete.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_hashGet.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_hashHas.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_hashSet.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_initCloneArray.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_initCloneByTag.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_initCloneObject.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_isIndex.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_isKeyable.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_isMasked.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_isPrototype.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_listCacheClear.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_listCacheDelete.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_listCacheGet.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_listCacheHas.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_listCacheSet.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_mapCacheClear.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_mapCacheDelete.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_mapCacheGet.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_mapCacheHas.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_mapCacheSet.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_mapToArray.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_nativeCreate.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_nativeKeys.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_nativeKeysIn.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_nodeUtil.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_objectToString.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_overArg.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_root.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_setCacheAdd.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_setCacheHas.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_setToArray.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_stackClear.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_stackDelete.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_stackGet.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_stackHas.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_stackSet.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_toSource.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/cloneDeep.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/eq.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/isArguments.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/isArray.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/isArrayLike.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/isBuffer.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/isEqual.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/isFunction.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/isLength.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/isMap.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/isObject.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/isObjectLike.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/isSet.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/isTypedArray.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/keys.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/keysIn.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/stubArray.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/stubFalse.js","webpack://openfin-web--web-interop-basic/./client/src/platform/api.ts","webpack://openfin-web--web-interop-basic/./client/src/platform/settings.ts","webpack://openfin-web--web-interop-basic/../../node_modules/uuid/dist/esm-browser/index.js","webpack://openfin-web--web-interop-basic/../../node_modules/uuid/dist/esm-browser/md5.js","webpack://openfin-web--web-interop-basic/../../node_modules/uuid/dist/esm-browser/nil.js","webpack://openfin-web--web-interop-basic/../../node_modules/uuid/dist/esm-browser/parse.js","webpack://openfin-web--web-interop-basic/../../node_modules/uuid/dist/esm-browser/regex.js","webpack://openfin-web--web-interop-basic/../../node_modules/uuid/dist/esm-browser/rng.js","webpack://openfin-web--web-interop-basic/../../node_modules/uuid/dist/esm-browser/sha1.js","webpack://openfin-web--web-interop-basic/../../node_modules/uuid/dist/esm-browser/stringify.js","webpack://openfin-web--web-interop-basic/../../node_modules/uuid/dist/esm-browser/v1.js","webpack://openfin-web--web-interop-basic/../../node_modules/uuid/dist/esm-browser/v3.js","webpack://openfin-web--web-interop-basic/../../node_modules/uuid/dist/esm-browser/v35.js","webpack://openfin-web--web-interop-basic/../../node_modules/uuid/dist/esm-browser/v4.js","webpack://openfin-web--web-interop-basic/../../node_modules/uuid/dist/esm-browser/v5.js","webpack://openfin-web--web-interop-basic/../../node_modules/uuid/dist/esm-browser/validate.js","webpack://openfin-web--web-interop-basic/../../node_modules/uuid/dist/esm-browser/version.js","webpack://openfin-web--web-interop-basic/webpack/bootstrap","webpack://openfin-web--web-interop-basic/webpack/runtime/define property getters","webpack://openfin-web--web-interop-basic/webpack/runtime/global","webpack://openfin-web--web-interop-basic/webpack/runtime/hasOwnProperty shorthand","webpack://openfin-web--web-interop-basic/webpack/runtime/make namespace object","webpack://openfin-web--web-interop-basic/webpack/runtime/node module decorator","webpack://openfin-web--web-interop-basic/./client/src/content/interop-view.ts"],"sourcesContent":["\"use strict\";var e=require(\"./main-8cad4070.js\");require(\"buffer/\"),require(\"uuid\"),require(\"events\"),require(\"lodash/cloneDeep\"),require(\"lodash/isEqual\"),exports.connect=e.connect;\n","\"use strict\";var e=require(\"buffer/\"),t=require(\"events\"),n=require(\"lodash/cloneDeep\"),i=require(\"lodash/isEqual\"),r=require(\"uuid\");const o=(e,t)=>`${t}<${btoa(JSON.stringify(e))}>`;var s=\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof window?window:\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:{},a={},c={},d={},h={};async function l(e){const t=[];for(const n of e){const e=await n();t.push(e)}return t}Object.defineProperty(h,\"__esModule\",{value:!0}),h.promiseMapSerial=h.serial=h.promiseMap=h.promisify=void 0,h.promisify=function(e){return(...t)=>new Promise(((n,i)=>{e(...t,((e,t)=>e?i(e):n(t)))}))},h.promiseMap=async function(e,t){return Promise.all(e.map(t))},h.serial=l,h.promiseMapSerial=async function(e,t){return l(e.map(((e,n,i)=>()=>t(e,n,i))))};var u,p=s&&s.__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},w=s&&s.__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)};Object.defineProperty(d,\"__esModule\",{value:!0}),d.Reply=d.EmitterBase=d.Base=void 0;const y=h;class f{constructor(e){this.isNodeEnvironment=()=>\"node\"===this.wire.environment.type,this.isOpenFinEnvironment=()=>\"openfin\"===this.wire.environment.type,this.isBrowserEnvironment=()=>\"other\"===this.wire.environment.type,this.wire=e}get fin(){return this.wire.getFin()}get me(){return this.wire.me}}d.Base=f;d.EmitterBase=class extends f{constructor(e,t,...n){super(e),this.topic=t,u.set(this,void 0),this.eventNames=()=>this.hasEmitter()?this.getOrCreateEmitter().eventNames():[],this.emit=(e,t,...n)=>!!this.hasEmitter()&&this.getOrCreateEmitter().emit(e,t,...n),this.hasEmitter=()=>this.wire.eventAggregator.has(w(this,u,\"f\")),this.getOrCreateEmitter=()=>this.wire.eventAggregator.getOrCreate(w(this,u,\"f\")),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[],this.listenerCount=e=>this.hasEmitter()?this.getOrCreateEmitter().listenerCount(e):0,this.registerEventListener=async(e,t={},n,i)=>{const r={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e},o=this.getOrCreateEmitter();n(o);try{await this.wire.sendAction(\"subscribe-to-desktop-event\",r)}catch(e){throw i(o),this.deleteEmitterIfNothingRegistered(o),e}},this.deregisterEventListener=async(e,t={})=>{if(this.hasEmitter()){const n={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e};await this.wire.sendAction(\"unsubscribe-to-desktop-event\",n).catch((()=>null));return this.getOrCreateEmitter()}return Promise.resolve()},p(this,u,[t,...n],\"f\"),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[]}async on(e,t,n){return await this.registerEventListener(e,n,(n=>{n.on(e,t)}),(n=>{n.removeListener(e,t)})),this}async addListener(e,t,n){return this.on(e,t,n)}async once(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.once(e,i),n.once(e,t)}),(n=>{n.removeListener(e,i),n.removeListener(e,t)})),this}async prependListener(e,t,n){return await this.registerEventListener(e,n,(n=>{n.prependListener(e,t)}),(n=>{n.removeListener(e,t)})),this}async prependOnceListener(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.prependOnceListener(e,t),n.once(e,i)}),(n=>{n.removeListener(e,t),n.removeListener(e,i)})),this}async removeListener(e,t,n){const i=await this.deregisterEventListener(e,n);return i&&(i.removeListener(e,t),this.deleteEmitterIfNothingRegistered(i)),this}async deregisterAllListeners(e){const t={...this.identity,type:e,topic:this.topic};if(this.hasEmitter()){const e=this.getOrCreateEmitter(),n=e.listenerCount(t.type),i=[];for(let e=0;enull)));return await Promise.all(i),e}}async removeAllListeners(e){const t=async e=>{const t=await this.deregisterAllListeners(e);t&&(t.removeAllListeners(e),this.deleteEmitterIfNothingRegistered(t))};if(e)await t(e);else if(this.hasEmitter()){const e=this.getOrCreateEmitter().eventNames();await(0,y.promiseMap)(e,t)}return this}deleteEmitterIfNothingRegistered(e){0===e.eventNames().length&&this.wire.eventAggregator.delete(w(this,u,\"f\"))}},u=new WeakMap;d.Reply=class{};var g={};Object.defineProperty(g,\"__esModule\",{value:!0});var m=g.RuntimeError=g.NotSupportedError=g.NotImplementedError=g.NoAckError=g.DuplicateCorrelationError=g.UnexpectedActionError=g.DisconnectedError=void 0;class v extends Error{constructor(e){super(`Expected websocket state OPEN but found ${e}`),this.readyState=e}}g.DisconnectedError=v;class C extends Error{}g.UnexpectedActionError=C;class b extends Error{}g.DuplicateCorrelationError=b;class I extends Error{}g.NoAckError=I;class E extends Error{}g.NotImplementedError=E;class x extends Error{}g.NotSupportedError=x;class A extends Error{constructor(e){const{message:t,name:n,stack:i,...r}=e;super(t),this.name=n||\"Error\",this.stack=i??this.toString(),Object.keys(r).forEach((e=>{this[e]=r[e]}))}}class P extends Error{static getCallSite(e=0){const t=Error.stackTraceLimit,n=e+1;Error.stackTraceLimit=t+n;const i=Error.prepareStackTrace;Error.prepareStackTrace=(e,t)=>t;const r=(new Error).stack?.slice(n)??[];return Error.prepareStackTrace=i,Error.stackTraceLimit=t,r}static prepareStackTrace(e,t){if(\"function\"==typeof Error.prepareStackTrace)return Error.prepareStackTrace(e,t);let n=\"\";n+=e.name||\"Error\",n+=`: ${e.message||\"\"}`;for(const e of t)n+=`\\n at ${e.toString()}`;return n}constructor(e,t){const{reason:n,error:i}=e;super(n),this.name=\"RuntimeError\",i?.stack&&(this.cause=new A(i)),t&&(this.stack=P.prepareStackTrace(this,t))}}m=g.RuntimeError=P;var M={},_={},O={};Object.defineProperty(O,\"__esModule\",{value:!0}),O.validateIdentity=void 0,O.validateIdentity=function(e){let t;return\"object\"==typeof e&&\"string\"==typeof e.uuid||(t=\"Not a valid identity object\"),t};var S={},R={},F={},j={},k={},L={},T={};Object.defineProperty(T,\"__esModule\",{value:!0}),T.handleDeprecatedWarnings=void 0;var $;T.handleDeprecatedWarnings=e=>{(e.contentNavigation?.whitelist||e.contentNavigation?.blacklist||e.contentRedirect?.whitelist||e.contentRedirect?.blacklist)&&console.warn(\"The properties 'whitelist' and 'blacklist' have been marked as deprecated and will be removed in a future version. Please use 'allowlist' and 'denylist'.\")};var B={},G={};Object.defineProperty(G,\"__esModule\",{value:!0}),G.AsyncRetryableLazy=W=G.Lazy=void 0;var W=G.Lazy=class{constructor(e){this.producerFn=e}getValue(){return this.value||(this.value=this.producerFn()),this.value}};G.AsyncRetryableLazy=class{constructor(e){this.producerFn=e}async getValue(){return this.promise||(this.promise=this.producerFn().catch((e=>{throw delete this.promise,e}))),this.promise}};var H={};Object.defineProperty(H,\"__esModule\",{value:!0}),H.WebContents=void 0;const N=d;class D extends N.EmitterBase{constructor(e,t,n){super(e,n,t.uuid,t.name),this.identity=t,this.entityType=n}capturePage(e){return this.wire.sendAction(\"capture-page\",{options:e,...this.identity}).then((({payload:e})=>e.data))}executeJavaScript(e){return this.wire.sendAction(\"execute-javascript-in-window\",{...this.identity,code:e}).then((({payload:e})=>e.data))}getZoomLevel(){return this.wire.sendAction(\"get-zoom-level\",this.identity).then((({payload:e})=>e.data))}setZoomLevel(e){return this.wire.sendAction(\"set-zoom-level\",{...this.identity,level:e}).then((()=>{}))}navigate(e){return this.wire.sendAction(\"navigate-window\",{...this.identity,url:e}).then((()=>{}))}navigateBack(){return this.wire.sendAction(\"navigate-window-back\",{...this.identity}).then((()=>{}))}async navigateForward(){await this.wire.sendAction(\"navigate-window-forward\",{...this.identity})}stopNavigation(){return this.wire.sendAction(\"stop-window-navigation\",{...this.identity}).then((()=>{}))}reload(e=!1){return this.wire.sendAction(\"reload-window\",{ignoreCache:e,...this.identity}).then((()=>{}))}print(e={}){return this.wire.sendAction(\"print\",{...this.identity,options:e}).then((()=>{}))}findInPage(e,t){return this.wire.sendAction(\"find-in-page\",{...this.identity,searchTerm:e,options:t}).then((({payload:e})=>e.data))}stopFindInPage(e){return this.wire.sendAction(\"stop-find-in-page\",{...this.identity,action:e}).then((()=>{}))}getPrinters(){return this.wire.sendAction(\"get-printers\",{...this.identity}).then((({payload:e})=>e.data))}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){await this.wire.sendAction(\"focus-window\",{emitSynthFocused:e,...this.identity})}async showDeveloperTools(){await this.wire.sendAction(\"show-developer-tools\",this.identity)}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction(\"get-process-info\",this.identity);return e}async getSharedWorkers(){return this.wire.sendAction(\"get-shared-workers\",this.identity).then((({payload:e})=>e.data))}async inspectSharedWorker(){await this.wire.sendAction(\"inspect-shared-worker\",{...this.identity})}async inspectSharedWorkerById(e){await this.wire.sendAction(\"inspect-shared-worker-by-id\",{...this.identity,workerId:e})}async inspectServiceWorker(){await this.wire.sendAction(\"inspect-service-worker\",{...this.identity})}async showPopupWindow(e){if(this.wire.sendAction(`${this.entityType}-show-popup-window`,this.identity).catch((()=>{})),e?.onPopupReady){const t=async({popupName:t})=>{try{const n=this.fin.Window.wrapSync({uuid:this.fin.me.uuid,name:t});await e.onPopupReady(n)}catch(e){throw new Error(`Something went wrong during onPopupReady execution: ${e}`)}};await this.once(\"popup-ready\",t)}const{payload:t}=await this.wire.sendAction(\"try-create-popup-window\",{options:{...e,hasResultCallback:!!e?.onPopupResult,hasReadyCallback:!!e?.onPopupReady},...this.identity}),{data:{willOpen:n,options:i}}=t;n&&await this.fin.Window.create(i.initialOptions);if(e?.onPopupResult){const t=async t=>{await e.onPopupResult((e=>{const{name:t,uuid:n,result:i,data:r}=e,o={identity:{name:t,uuid:n},result:i};return r&&(o.data=r),o})(t))},n=async()=>{await this.removeListener(\"popup-result\",t)};await this.on(\"popup-result\",t),await this.once(\"popup-teardown\",n)}const{payload:r}=await this.wire.sendAction(\"show-popup-window\",{options:i,...this.identity});return r.data}}var U,V,z,K,q;function J(){return V||(V=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(function(){if($)return L;$=1,Object.defineProperty(L,\"__esModule\",{value:!0}),L.ViewModule=void 0;const e=d,t=O,n=J(),i=T;class r extends e.Base{async create(e){const{uuid:t}=this.wire.me;if(!e.name||\"string\"!=typeof e.name)throw new Error(\"Please provide a name property as a string in order to create a View.\");return(0,i.handleDeprecatedWarnings)(e),this.wire.environment.childViews?await this.wire.environment.createChildContent({entityType:\"view\",options:{...e,uuid:t}}):await this.wire.sendAction(\"create-view\",{...e,uuid:t}),this.wrapSync({uuid:t,name:e.name})}async wrap(e){this.wire.sendAction(\"view-wrap\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}wrapSync(e){this.wire.sendAction(\"view-wrap-sync\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}getCurrent(){if(this.wire.sendAction(\"view-get-current\").catch((e=>{})),!this.wire.me.isView)throw new Error(\"You are not in a View context\");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction(\"view-get-current-sync\").catch((e=>{})),!this.wire.me.isView)throw new Error(\"You are not in a View context\");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return L.ViewModule=r,L}(),e),n(function(){if(U)return B;var e;U=1,Object.defineProperty(B,\"__esModule\",{value:!0}),B.View=void 0;const t=g,n=G,i=H,r=ie();class o extends i.WebContents{constructor(i,o){super(i,o,\"view\"),this.identity=o,e.set(this,new n.Lazy((()=>this.fin.Platform.wrapSync(this.identity).getClient()))),this.attach=async e=>{await this.wire.sendAction(\"attach-view\",{target:e,...this.identity})},this.destroy=async()=>{await this.wire.sendAction(\"destroy-view\",{...this.identity})},this.show=async()=>{await this.wire.sendAction(\"show-view\",{...this.identity})},this.showAt=async(e,t={})=>{await this.wire.sendAction(\"show-view-at\",{bounds:e,...this.identity,options:t})},this.bringToFront=async()=>{await this.wire.sendAction(\"bring-view-to-front\",{...this.identity})},this.hide=async()=>{await this.wire.sendAction(\"hide-view\",{...this.identity})},this.setBounds=async e=>{await this.wire.sendAction(\"set-view-bounds\",{bounds:e,...this.identity})},this.getBounds=async()=>(await this.wire.sendAction(\"get-view-bounds\",{...this.identity})).payload.data,this.getInfo=async()=>(await this.wire.sendAction(\"get-view-info\",{...this.identity})).payload.data,this.getParentLayout=async()=>(this.wire.sendAction(\"view-get-parent-layout\",{...this.identity}).catch((()=>{})),this.fin.Platform.Layout.getLayoutByViewIdentity(this.identity)),this.getOptions=async()=>this.wire.sendAction(\"get-view-options\",{...this.identity}).then((({payload:e})=>e.data)),this.updateOptions=async e=>this.wire.sendAction(\"update-view-options\",{options:e,...this.identity}).then((()=>{})),this.getCurrentWindow=async()=>{const{payload:{data:e}}=await this.wire.sendAction(\"get-view-window\",{...this.identity});return new r._Window(this.wire,e)},this.getCurrentStack=async()=>{this.wire.sendAction(\"view-get-current-stack\").catch((()=>{}));try{return(await this.getParentLayout()).getStackByViewIdentity(this.identity)}catch(e){throw new t.RuntimeError({reason:\"This view does not belong to a stack.\",error:e})}},this.triggerBeforeUnload=async()=>(await this.wire.sendAction(\"trigger-before-unload\",{...this.identity})).payload.data,this.bindToElement=async e=>{if(!e)throw new Error(\"Element not found.\");return this.wire.environment.observeBounds(e,(async e=>this.setBounds(e)))}}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){const t=await this.getCurrentWindow();await t.focusedWebViewWasChanged(),await super.focus({emitSynthFocused:e})}}return B.View=o,e=new WeakMap,B}(),e)}(k)),k}function Y(){if(z)return j;z=1,Object.defineProperty(j,\"__esModule\",{value:!0}),j.Application=void 0;const e=d,t=ie(),n=J();class i extends e.EmitterBase{constructor(e,n){super(e,\"application\",n.uuid),this.identity=n,this.window=new t._Window(this.wire,{uuid:this.identity.uuid,name:this.identity.uuid})}windowListFromIdentityList(e){const n=[];return e.forEach((e=>{n.push(new t._Window(this.wire,{uuid:e.uuid,name:e.name}))})),n}isRunning(){return this.wire.sendAction(\"is-application-running\",this.identity).then((({payload:e})=>e.data))}async quit(e=!1){try{await this._close(e),await this.wire.sendAction(\"destroy-application\",{force:e,...this.identity})}catch(e){if(![\"Remote connection has closed\",\"Could not locate the requested application\"].some((t=>e.message.includes(t))))throw e}}async _close(e=!1){try{await this.wire.sendAction(\"close-application\",{force:e,...this.identity})}catch(e){if(!e.message.includes(\"Remote connection has closed\"))throw e}}close(e=!1){return console.warn(\"Deprecation Warning: Application.close is deprecated Please use Application.quit\"),this.wire.sendAction(\"application-close\",this.identity).catch((e=>{})),this._close(e)}getChildWindows(){return this.wire.sendAction(\"get-child-windows\",this.identity).then((({payload:e})=>{const t=[];return e.data.forEach((e=>{t.push({uuid:this.identity.uuid,name:e})})),this.windowListFromIdentityList(t)}))}getManifest(){return this.wire.sendAction(\"get-application-manifest\",this.identity).then((({payload:e})=>e.data))}getParentUuid(){return this.wire.sendAction(\"get-parent-application\",this.identity).then((({payload:e})=>e.data))}getShortcuts(){return this.wire.sendAction(\"get-shortcuts\",this.identity).then((({payload:e})=>e.data))}async getViews(){const{payload:e}=await this.wire.sendAction(\"application-get-views\",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}getZoomLevel(){return this.wire.sendAction(\"get-application-zoom-level\",this.identity).then((({payload:e})=>e.data))}getWindow(){return this.wire.sendAction(\"application-get-window\",this.identity).catch((e=>{})),Promise.resolve(this.window)}registerUser(e,t){return this.wire.sendAction(\"register-user\",{userName:e,appName:t,...this.identity}).then((()=>{}))}removeTrayIcon(){return this.wire.sendAction(\"remove-tray-icon\",this.identity).then((()=>{}))}restart(){return this.wire.sendAction(\"restart-application\",this.identity).then((()=>{}))}run(){return console.warn(\"Deprecation Warning: Application.run is deprecated Please use fin.Application.start\"),this.wire.sendAction(\"application-run\",this.identity).catch((e=>{})),this._run()}_run(e={}){return this.wire.sendAction(\"run-application\",{manifestUrl:this._manifestUrl,opts:e,...this.identity}).then((()=>{}))}scheduleRestart(){return this.wire.sendAction(\"relaunch-on-close\",this.identity).then((()=>{}))}async sendApplicationLog(){const{payload:e}=await this.wire.sendAction(\"send-application-log\",this.identity);return e.data}async setJumpList(e){await this.wire.sendAction(\"set-jump-list\",{config:e,...this.identity})}setTrayIcon(e){return this.wire.sendAction(\"set-tray-icon\",{enabledIcon:e,...this.identity}).then((()=>{}))}setShortcuts(e){return this.wire.sendAction(\"set-shortcuts\",{data:e,...this.identity}).then((()=>{}))}async setShortcutQueryParams(e){await this.wire.sendAction(\"set-shortcut-query-args\",{data:e,...this.identity})}setZoomLevel(e){return this.wire.sendAction(\"set-application-zoom-level\",{level:e,...this.identity}).then((()=>{}))}async setAppLogUsername(e){await this.wire.sendAction(\"set-app-log-username\",{data:e,...this.identity})}getTrayIconInfo(){return this.wire.sendAction(\"get-tray-icon-info\",this.identity).then((({payload:e})=>e.data))}hasTrayIcon(){return this.wire.sendAction(\"has-tray-icon\",this.identity).then((({payload:e})=>e.data))}terminate(){return this.wire.sendAction(\"terminate-application\",this.identity).then((()=>{}))}wait(){return this.wire.sendAction(\"wait-for-hung-application\",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction(\"get-info\",this.identity).then((({payload:e})=>e.data))}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction(\"application-get-process-info\",this.identity);return e}async setFileDownloadLocation(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t};await this.wire.sendAction(\"set-file-download-location\",{...n,downloadLocation:e})}async getFileDownloadLocation(){const{payload:{data:e}}=await this.wire.sendAction(\"get-file-download-location\",this.identity);return e}async showTrayIconPopupMenu(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t},{payload:i}=await this.wire.sendAction(\"show-tray-icon-popup-menu\",{...n,options:e});return i.data}async closeTrayIconPopupMenu(){const{name:e}=this.wire.me,t={uuid:this.identity.uuid,name:e};await this.wire.sendAction(\"close-tray-icon-popup-menu\",{...t})}}return j.Application=i,j}function Z(){return q||(q=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(function(){if(K)return F;K=1,Object.defineProperty(F,\"__esModule\",{value:!0}),F.ApplicationModule=void 0;const e=d,t=O,n=Y();class i extends e.Base{async wrap(e){this.wire.sendAction(\"wrap-application\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}wrapSync(e){this.wire.sendAction(\"wrap-application-sync\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}async _create(e){return void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&void 0===e.isPlatformController&&(e.autoShow=!0),await this.wire.sendAction(\"create-application\",e),this.wrap({uuid:e.uuid})}create(e){return console.warn(\"Deprecation Warning: fin.Application.create is deprecated. Please use fin.Application.start\"),this.wire.sendAction(\"application-create\").catch((e=>{})),this._create(e)}async start(e){this.wire.sendAction(\"start-application\").catch((e=>{}));const t=await this._create(e);return await this.wire.sendAction(\"run-application\",{uuid:e.uuid}),t}async startManyManifests(e,t){return this.wire.sendAction(\"run-applications\",{applications:e,opts:t}).then((()=>{}))}getCurrent(){return this.wire.sendAction(\"get-current-application\").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction(\"get-current-application-sync\").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}async startFromManifest(e,t){this.wire.sendAction(\"application-start-from-manifest\").catch((e=>{}));const n=await this._createFromManifest(e);return await n._run(t),n}createFromManifest(e){return console.warn(\"Deprecation Warning: fin.Application.createFromManifest is deprecated. Please use fin.Application.startFromManifest\"),this.wire.sendAction(\"application-create-from-manifest\").catch((e=>{})),this._createFromManifest(e)}_createFromManifest(e){return this.wire.sendAction(\"get-application-manifest\",{manifestUrl:e}).then((({payload:e})=>{const t=e.data.platform?e.data.platform.uuid:e.data.startup_app.uuid;return this.wrap({uuid:t})})).then((t=>(t._manifestUrl=e,t)))}}return F.ApplicationModule=i,F}(),e),n(Y(),e)}(R)),R}H.WebContents=D;var Q={};Object.defineProperty(Q,\"__esModule\",{value:!0}),Q.promisifySubscription=void 0;var X,ee,te;function ne(){if(X)return S;X=1,Object.defineProperty(S,\"__esModule\",{value:!0}),S._Window=void 0;const e=Z(),t=H,n=J(),i=T,r=Q;class o extends t.WebContents{constructor(e,t){super(e,t,\"window\")}async createWindow(e){this.wire.sendAction(\"window-create-window\",this.identity).catch((e=>{}));const t=await(0,r.promisifySubscription)(this,\"fire-constructor-callback\");void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&(e.autoShow=!0),(0,i.handleDeprecatedWarnings)(e);const n=this.wire.environment.createChildContent({entityType:\"window\",options:e}),[o]=await Promise.all([t.getValue(),n]);let s;const{success:a}=o,c=o.data,{message:d}=c;s=a?{httpResponseCode:c.httpResponseCode,apiInjected:c.apiInjected}:{message:c.message,networkErrorCode:c.networkErrorCode,stack:c.stack};const h={message:d,cbPayload:s,success:a};try{this.getWebWindow().fin.__internal_.openerSuccessCBCalled()}catch(e){}return h.success?this:Promise.reject(h)}getAllFrames(){return this.wire.sendAction(\"get-all-frames\",this.identity).then((({payload:e})=>e.data))}getBounds(){return this.wire.sendAction(\"get-window-bounds\",this.identity).then((({payload:e})=>e.data))}center(){return this.wire.sendAction(\"center-window\",this.identity).then((()=>{}))}blur(){return this.wire.sendAction(\"blur-window\",this.identity).then((()=>{}))}bringToFront(){return this.wire.sendAction(\"bring-window-to-front\",this.identity).then((()=>{}))}animate(e,t){return this.wire.sendAction(\"animate-window\",{transitions:e,options:t,...this.identity}).then((()=>{}))}hide(){return this.wire.sendAction(\"hide-window\",this.identity).then((()=>{}))}close(e=!1){return this.wire.sendAction(\"close-window\",{force:e,...this.identity}).then((()=>{Object.setPrototypeOf(this,null)}))}focusedWebViewWasChanged(){return this.wire.sendAction(\"focused-webview-changed\",this.identity).then((()=>{}))}getNativeId(){return this.wire.sendAction(\"get-window-native-id\",this.identity).then((({payload:e})=>e.data))}async getCurrentViews(){const{payload:e}=await this.wire.sendAction(\"window-get-views\",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}disableFrame(){return console.warn(\"Function is deprecated; use disableUserMovement instead.\"),this.wire.sendAction(\"disable-window-frame\",this.identity).then((()=>{}))}disableUserMovement(){return this.wire.sendAction(\"disable-window-frame\",this.identity).then((()=>{}))}enableFrame(){return console.warn(\"Function is deprecated; use enableUserMovement instead.\"),this.wire.sendAction(\"enable-window-frame\",this.identity).then((()=>{}))}enableUserMovement(){return this.wire.sendAction(\"enable-window-frame\",this.identity).then((()=>{}))}flash(){return this.wire.sendAction(\"flash-window\",this.identity).then((()=>{}))}stopFlashing(){return this.wire.sendAction(\"stop-flash-window\",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction(\"get-window-info\",this.identity).then((({payload:e})=>e.data))}async getLayout(e){this.wire.sendAction(\"window-get-layout\",this.identity).catch((e=>{}));const t=await this.getOptions();if(!t.layout&&!t.layoutSnapshot)throw new Error(\"Window does not have a Layout\");return this.fin.Platform.Layout.wrap(e??this.identity)}getOptions(){return this.wire.sendAction(\"get-window-options\",this.identity).then((({payload:e})=>e.data))}getParentApplication(){return this.wire.sendAction(\"window-get-parent-application\",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity))}getParentWindow(){return this.wire.sendAction(\"window-get-parent-window\",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity)).then((e=>e.getWindow()))}async getSnapshot(e){const t={area:e,...this.identity};console.warn(\"Window.getSnapshot has been deprecated, please use Window.capturePage\");return(await this.wire.sendAction(\"get-window-snapshot\",t)).payload.data}getState(){return this.wire.sendAction(\"get-window-state\",this.identity).then((({payload:e})=>e.data))}getWebWindow(){return this.wire.sendAction(\"window-get-web-window\",this.identity).catch((e=>{})),this.wire.environment.getWebWindow(this.identity)}isMainWindow(){return this.wire.sendAction(\"window-is-main-window\",this.identity).catch((e=>{})),this.me.uuid===this.me.name}isShowing(){return this.wire.sendAction(\"is-window-showing\",this.identity).then((({payload:e})=>e.data))}maximize(){return this.wire.sendAction(\"maximize-window\",this.identity).then((()=>{}))}minimize(){return this.wire.sendAction(\"minimize-window\",this.identity).then((()=>{}))}moveBy(e,t,n){return this.wire.sendAction(\"move-window-by\",{deltaLeft:e,deltaTop:t,positioningOptions:n,...this.identity}).then((()=>{}))}moveTo(e,t,n){return this.wire.sendAction(\"move-window\",{left:e,top:t,positioningOptions:n,...this.identity}).then((()=>{}))}resizeBy(e,t,n,i){return this.wire.sendAction(\"resize-window-by\",{deltaWidth:Math.floor(e),deltaHeight:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}resizeTo(e,t,n,i){return this.wire.sendAction(\"resize-window\",{width:Math.floor(e),height:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}restore(){return this.wire.sendAction(\"restore-window\",this.identity).then((()=>{}))}setAsForeground(){return this.wire.sendAction(\"set-foreground-window\",this.identity).then((()=>{}))}setBounds(e,t){return this.wire.sendAction(\"set-window-bounds\",{...e,...this.identity,positioningOptions:t}).then((()=>{}))}show(e=!1){return this.wire.sendAction(\"show-window\",{force:e,...this.identity}).then((()=>{}))}showAt(e,t,n=!1){return this.wire.sendAction(\"show-at-window\",{force:n,left:Math.floor(e),top:Math.floor(t),...this.identity}).then((()=>{}))}updateOptions(e){return this.wire.sendAction(\"update-window-options\",{options:e,...this.identity}).then((()=>{}))}authenticate(e,t){return this.wire.sendAction(\"window-authenticate\",{userName:e,password:t,...this.identity}).then((()=>{}))}async showPopupMenu(e){const{payload:t}=await this.wire.sendAction(\"show-popup-menu\",{options:e,...this.identity});return t.data}async closePopupMenu(){return this.wire.sendAction(\"close-popup-menu\",{...this.identity}).then((()=>{}))}async dispatchPopupResult(e){this.wire.sendAction(\"window-dispatch-popup-result\",this.identity).catch((e=>{})),await this.wire.sendAction(\"dispatch-popup-result\",{data:e,...this.identity})}async print(e={content:\"self\"}){switch(e.content){case void 0:case\"self\":return super.print(e);case\"screenshot\":return this.wire.sendAction(\"print-screenshot\",this.identity).then((()=>{}));case\"views\":return this.wire.sendAction(\"print-views\",{...this.identity,options:e}).then((()=>{}));default:return}}}return S._Window=o,S}function ie(){return te||(te=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(function(){if(ee)return _;ee=1,Object.defineProperty(_,\"__esModule\",{value:!0}),_._WindowModule=void 0;const e=d,t=O,n=ne();class i extends e.Base{async wrap(e){this.wire.sendAction(\"window-wrap\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}wrapSync(e){this.wire.sendAction(\"window-wrap-sync\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}create(e){return this.wire.sendAction(\"create-window\").catch((e=>{})),new n._Window(this.wire,{uuid:this.me.uuid,name:e.name}).createWindow(e)}getCurrent(){if(this.wire.sendAction(\"get-current-window\").catch((e=>{})),!this.wire.me.isWindow)throw new Error(\"You are not in a Window context\");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction(\"get-current-window-sync\").catch((e=>{})),!this.wire.me.isWindow)throw new Error(\"You are not in a Window context\");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return _._WindowModule=i,_}(),e),n(ne(),e)}(M)),M}Q.promisifySubscription=async(e,t,n=(()=>!0),i)=>{let r,o,s;const a=new Promise(((e,t)=>{r=e,o=t})),c=e=>{n(e)&&(clearTimeout(s),r(e))};return await e.on(t,c),i&&(s=setTimeout((()=>o(new Error(\"event timed out\"))),i)),a.finally((()=>{e.removeListener(t,c).catch((()=>null))})),{getValue:()=>a}},Object.defineProperty(c,\"__esModule\",{value:!0}),c.System=void 0;const re=d,oe=g,se=ie(),ae=t;class ce extends re.EmitterBase{constructor(e){super(e,\"system\")}sendExternalProcessRequest(e,t){return new Promise(((n,i)=>{const r=\"external-process-exited\";let o,s,a,c;\"function\"==typeof t.listener&&(a=e=>{const n=e||{};s={topic:\"exited\",uuid:n.processUuid||\"\",exitCode:n.exitCode||0},o===e.processUuid&&(t.listener(s),c.removeListener(r,a))},this.wire.me.name||(this.wire.me.name=this.wire.me.uuid),c=new se._Window(this.wire,this.wire.me),c.on(r,a)),this.wire.sendAction(e,t).then((({payload:e})=>{o=e.data.uuid,n(e.data),s&&o===s.uuid&&(t.listener(s),c.removeListener(r,a))})).catch((e=>{c&&c.removeListener(r,a),i(e)}))}))}getVersion(){return this.wire.sendAction(\"get-version\").then((({payload:e})=>e.data))}clearCache(e){return this.wire.sendAction(\"clear-cache\",e).then((()=>{}))}deleteCacheOnExit(){return this.wire.sendAction(\"delete-cache-request\").then((()=>{}))}exit(){return this.wire.sendAction(\"exit-desktop\").then((()=>{}))}async fetchManifest(e){const{payload:{data:t}}=await this.wire.sendAction(\"fetch-manifest\",{manifestUrl:e});return t}flushCookieStore(){return this.wire.sendAction(\"flush-cookie-store\").then((()=>{}))}getAllWindows(){return this.wire.sendAction(\"get-all-windows\").then((({payload:e})=>e.data))}getAllApplications(){return this.wire.sendAction(\"get-all-applications\").then((({payload:e})=>e.data))}getCommandLineArguments(){return this.wire.sendAction(\"get-command-line-arguments\").then((({payload:e})=>e.data))}async getCrashReporterState(){const{payload:{data:{diagnosticMode:e,isRunning:t}}}=await this.wire.sendAction(\"get-crash-reporter-state\");return console.warn(\"diagnosticMode property is deprecated. It will be removed in a future version\"),{diagnosticMode:e,diagnosticsMode:e,isRunning:t}}async startCrashReporter(e){const t=e,n={...t,diagnosticMode:t.diagnosticsMode||t.diagnosticMode},{payload:{data:{diagnosticMode:i,isRunning:r}}}=await this.wire.sendAction(\"start-crash-reporter\",n);return{diagnosticMode:i,diagnosticsMode:i,isRunning:r}}getUniqueUserId(){return this.wire.sendAction(\"get-unique-user-id\").then((({payload:e})=>e.data))}getEntityInfo(e,t){return this.wire.sendAction(\"get-entity-info\",{uuid:e,name:t}).then((({payload:e})=>e.data))}getEnvironmentVariable(e){return this.wire.sendAction(\"get-environment-variable\",{environmentVariables:e}).then((({payload:e})=>e.data))}getFocusedWindow(){return this.wire.sendAction(\"get-focused-window\").then((({payload:e})=>e.data))}async isAppCertified(e){const{payload:{data:{certifiedInfo:t}}}=await this.wire.sendAction(\"is-app-certified\",{manifestUrl:e});return t}getInstalledRuntimes(){return this.wire.sendAction(\"get-installed-runtimes\").then((({payload:e})=>e.data.runtimes))}async getInstalledApps(){const{payload:{data:{installedApps:e}}}=await this.wire.sendAction(\"get-installed-apps\");return e}getLog(e){return this.wire.sendAction(\"view-log\",e).then((({payload:e})=>e.data))}getMachineId(){return this.wire.sendAction(\"get-machine-id\").then((({payload:e})=>e.data))}getMinLogLevel(){return this.wire.sendAction(\"get-min-log-level\").then((({payload:e})=>e.data))}getLogList(){return this.wire.sendAction(\"list-logs\").then((({payload:e})=>e.data))}getMonitorInfo(){return this.wire.sendAction(\"get-monitor-info\").then((({payload:e})=>e.data))}getMousePosition(){return this.wire.sendAction(\"get-mouse-position\").then((({payload:e})=>e.data))}getProcessList(){return console.warn(\"System.getProcessList has been deprecated. Please consider using our new process APIs: Window.getProcessInfo, View.getProcessInfo, Application.getProcessInfo, System.getAllProcessInfo\"),this.wire.sendAction(\"process-snapshot\").then((({payload:e})=>e.data))}async getAllProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction(\"get-all-process-info\",this.identity);return e}getProxySettings(){return this.wire.sendAction(\"get-proxy-settings\").then((({payload:e})=>e.data))}getRuntimeInfo(){return this.wire.sendAction(\"get-runtime-info\").then((({payload:e})=>e.data))}getRvmInfo(){return this.wire.sendAction(\"get-rvm-info\").then((({payload:e})=>e.data))}getHostSpecs(){return this.wire.sendAction(\"get-host-specs\").then((({payload:e})=>e.data))}getOSInfo(){return this.wire.sendAction(\"get-os-info\").then((({payload:e})=>e.data))}launchExternalProcess(e){return this.sendExternalProcessRequest(\"launch-external-process\",e)}monitorExternalProcess(e){return this.sendExternalProcessRequest(\"monitor-external-process\",e)}log(e,t){return this.wire.sendAction(\"write-to-log\",{level:e,message:t}).then((()=>{}))}openUrlWithBrowser(e){return this.wire.sendAction(\"open-url-with-browser\",{url:e}).then((()=>{}))}async registerCustomProtocol(e){if(\"object\"!=typeof e)throw new Error(\"Must provide an object with a `protocolName` property having a string value.\");await this.wire.sendAction(\"register-custom-protocol\",e)}async unregisterCustomProtocol(e){await this.wire.sendAction(\"unregister-custom-protocol\",{protocolName:e})}async getCustomProtocolState(e){return this.wire.sendAction(\"get-custom-protocol-state\",{protocolName:e}).then((({payload:e})=>e.data))}releaseExternalProcess(e){return this.wire.sendAction(\"release-external-process\",{uuid:e}).then((()=>{}))}showDeveloperTools(e){return this.wire.sendAction(\"show-developer-tools\",e).then((()=>{}))}terminateExternalProcess(e){return this.wire.sendAction(\"terminate-external-process\",e).then((()=>{}))}updateProxySettings(e){return this.wire.sendAction(\"update-proxy\",e).then((()=>{}))}async downloadAsset(e,t){const n=()=>{};let i=n,r=n;const o=new Promise(((e,t)=>{i=e,r=t}));if(\"openfin\"!==this.wire.environment.type)throw new oe.NotSupportedError(\"downloadAsset only supported in an OpenFin Render process\");const s=oe.RuntimeError.getCallSite(),a=this.wire.environment.getNextMessageId().toString(),c=`asset-download-progress-${a}`,d=`asset-download-error-${a}`,h=`asset-download-complete-${a}`,l=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},u=()=>{this.removeListener(c,l)};await Promise.all([this.on(c,l),this.once(d,(e=>{u();const{reason:t,err:n}=e;r(new oe.RuntimeError({reason:t,error:n},s))})),this.once(h,(()=>{u(),i()}))]);const p=Object.assign(e,{downloadId:a});return await this.wire.sendAction(\"download-asset\",p).catch((e=>{throw u(),e})),o}downloadRuntime(e,t){const n=oe.RuntimeError.getCallSite();return new Promise(((i,r)=>{if(\"openfin\"!==this.wire.environment.type)return void r(new oe.NotSupportedError(\"downloadRuntime only supported in an OpenFin Render process\"));const o=this.wire.environment.getNextMessageId().toString(),s=`runtime-download-progress-${o}`,a=`runtime-download-error-${o}`,c=`runtime-download-complete-${o}`,d=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},h=()=>{this.removeListener(s,d)};this.on(s,d),this.once(a,(e=>{h();const{reason:t,err:i}=e;r(new oe.RuntimeError({reason:t,error:i},n))})),this.once(c,(()=>{h(),i()}));const l=Object.assign(e,{downloadId:o});this.wire.sendAction(\"download-runtime\",l).catch((e=>{h(),r(e)}))}))}downloadPreloadScripts(e){return this.wire.sendAction(\"download-preload-scripts\",{scripts:e}).then((({payload:e})=>e.data))}getAllExternalApplications(){return this.wire.sendAction(\"get-all-external-applications\").then((({payload:e})=>e.data))}getAppAssetInfo(e){return this.wire.sendAction(\"get-app-asset-info\",e).then((({payload:e})=>e.data))}getCookies(e){const t=this.wire.environment.getUrl(),n=Object.assign(e,{url:t});return this.wire.sendAction(\"get-cookies\",n).then((({payload:e})=>e.data))}setMinLogLevel(e){return this.wire.sendAction(\"set-min-log-level\",{level:e}).then((()=>{}))}resolveUuid(e){return this.wire.sendAction(\"resolve-uuid\",{entityKey:e}).then((({payload:e})=>e.data))}executeOnRemote(e,t){return t.requestingIdentity=e,this.wire.ferryAction(t)}readRegistryValue(e,t,n){return this.wire.sendAction(\"read-registry-value\",{rootKey:e,subkey:t,value:n}).then((({payload:e})=>e.data))}registerExternalConnection(e){return this.wire.sendAction(\"register-external-connection\",{uuid:e}).then((({payload:e})=>e.data))}async getServiceConfiguration(e){if(\"string\"!=typeof e.name)throw new Error(\"Must provide an object with a `name` property having a string value\");const{name:t}=e;return this.wire.sendAction(\"get-service-configuration\",{name:t}).then((({payload:e})=>e.data))}async getSystemAppConfig(e){if(\"string\"!=typeof e)throw new Error(\"Must provide a string value for name of system app\");return this.wire.sendAction(\"get-system-app-configuration\",{name:e}).then((({payload:e})=>e.data))}async registerShutdownHandler(e){this.wire.sendAction(\"system-register-shutdown-handler\").catch((e=>{}));const{uuid:t,name:n}=this.wire.me;this.on(\"system-shutdown\",(i=>{e({proceed:()=>{this.wire.environment.raiseEvent(\"application/system-shutdown-handled\",{uuid:t,name:n,topic:\"application\"})}})}))}runRvmHealthCheck(){return this.wire.sendAction(\"run-rvm-health-check\").then((({payload:e})=>e.data))}async launchManifest(e,t={}){const{subscribe:n,...i}=t,r=i;if(n){const e=new ae.EventEmitter;n(e);const t=\"app-version-progress\",i=\"runtime-status\",o=\"app-version-complete\",s=\"app-version-error\",a=this.wire.environment.getNextMessageId().toString();r.appVersionId=a;const c=[o,t,i,s],d=e=>{const{appVersionId:t,topic:n,type:i,...r}=e;return{...r,type:c.find((e=>i.includes(e)))}},h=t=>{const n=d(t);e.emit(n.type,n)},l=()=>{this.removeListener(`${t}.${a}`,h),this.removeListener(`${i}.${a}`,h),this.removeListener(`${o}.${a}`,h),this.removeListener(`${s}.${a}`,h),this.removeListener(`${o}.${a}`,l),this.removeListener(`${s}.${a}`,l)};await Promise.all([this.on(`${t}.${a}`,h),this.on(`${i}.${a}`,h),this.once(`${o}.${a}`,h),this.once(`${s}.${a}`,h),this.once(`${o}.${a}`,l),this.once(`${s}.${a}`,l)])}return(await this.wire.sendAction(\"launch-manifest\",{manifestUrl:e,opts:r})).payload.data.manifest}async queryPermissionForCurrentContext(e){const t={uuid:this.wire.me.uuid,name:this.wire.me.name};return(await this.wire.sendAction(\"query-permission-for-current-context\",{apiName:e,identity:t})).payload.data}async enableNativeWindowIntegrationProvider(e){const{payload:t}=await this.wire.sendAction(\"enable-native-window-integration-provider\",{permissions:e});return t.data}async registerUsage({data:e,type:t}){await this.wire.sendAction(\"register-usage\",{data:e,type:t})}async getPrinters(){const{payload:e}=await this.wire.sendAction(\"system-get-printers\");return e.data}async updateProcessLoggingOptions(e){await this.wire.sendAction(\"system-update-process-logging-options\",{options:e})}async getDomainSettings(){const{payload:{data:e}}=await this.wire.sendAction(\"get-domain-settings\",this.identity);return e}async setDomainSettings(e){await this.wire.sendAction(\"set-domain-settings\",{domainSettings:e,...this.identity})}async refreshExtensions(){const{payload:e}=await this.wire.sendAction(\"refresh-extensions\");return e.data}async getInstalledExtensions(){const{payload:e}=await this.wire.sendAction(\"get-installed-extensions\");return e.data}}c.System=ce;var de={},he={};Object.defineProperty(he,\"__esModule\",{value:!0}),he.RefCounter=void 0;he.RefCounter=class{constructor(){this.topicRefMap=new Map}incRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t+1;n=i,this.topicRefMap.set(e,i)}else this.topicRefMap.set(e,1),n=1;return n}decRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t-1;this.topicRefMap.set(e,i),n=i}else n=-1;return n}actOnFirst(e,t,n){return 1===this.incRefCount(e)?t():n()}actOnLast(e,t,n){return 0===this.decRefCount(e)?t():n()}};var le={},ue={},pe={};Object.defineProperty(pe,\"__esModule\",{value:!0}),pe.ChannelBase=pe.ProtectedItems=void 0;const we=e=>async(t,n,i)=>{const r=await e(t,n,i);return void 0===r?n:r};pe.ProtectedItems=class{constructor(e,t){this.providerIdentity=e,this.close=t}};class ye{static defaultAction(e){throw new Error(`No action registered at target for ${e}`)}constructor(){this.subscriptions=new Map}async processAction(e,t,n){try{const i=this.subscriptions.has(e)?this.subscriptions.get(e):(t,n)=>(this.defaultAction??ye.defaultAction)(e,t,n),r=this.preAction?await this.preAction(e,t,n):t,o=await i(r,n);return this.postAction?await this.postAction(e,o,n):o}catch(t){if(this.errorMiddleware)return this.errorMiddleware(e,t,n);throw t}}beforeAction(e){if(this.preAction)throw new Error(\"Already registered beforeAction middleware\");this.preAction=we(e)}onError(e){if(this.errorMiddleware)throw new Error(\"Already registered error middleware\");this.errorMiddleware=e}afterAction(e){if(this.postAction)throw new Error(\"Already registered afterAction middleware\");this.postAction=we(e)}remove(e){this.subscriptions.delete(e)}setDefaultAction(e){if(this.defaultAction)throw new Error(\"default action can only be set once\");this.defaultAction=e}register(e,t){if(this.subscriptions.has(e))throw new Error(`Subscription already registered for action: ${e}. Unsubscribe before adding new subscription`);return this.subscriptions.set(e,t),!0}}pe.ChannelBase=ye;var fe,ge,me,ve=s&&s.__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)},Ce=s&&s.__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};Object.defineProperty(ue,\"__esModule\",{value:!0}),ue.ChannelClient=void 0;const be=pe,Ie=new Map;class Ee extends be.ChannelBase{static closeChannelByEndpointId(e){const t=Ie.get(e);t&&ve(t,me,\"f\").call(t)}static handleProviderDisconnect(e){for(const t of Ie.values())t.providerIdentity.channelId===e.channelId&&(t.disconnectListener(e),ve(t,me,\"f\").call(t))}constructor(e,t,n){super(),fe.set(this,void 0),ge.set(this,void 0),this.processAction=(e,t,n)=>super.processAction(e,t,n),me.set(this,(()=>{Ie.delete(this.endpointId),ve(this,ge,\"f\").close()})),Ce(this,fe,new be.ProtectedItems(e,t),\"f\"),this.disconnectListener=()=>{},this.endpointId=e.endpointId,Ce(this,ge,n,\"f\"),Ie.set(this.endpointId,this),n.receive(this.processAction)}get providerIdentity(){return ve(this,fe,\"f\").providerIdentity}async dispatch(e,t){if(ve(this,ge,\"f\").isEndpointConnected(this.providerIdentity.channelId))return ve(this,ge,\"f\").send(this.providerIdentity.channelId,e,t);throw new Error(\"The client you are trying to dispatch from is disconnected from the target provider.\")}onDisconnection(e){this.disconnectListener=t=>{try{e(t)}catch(e){throw new Error(`Error while calling the onDisconnection callback: ${e.message}`)}finally{this.disconnectListener=()=>{}}}}async disconnect(){await this.sendDisconnectAction(),ve(this,me,\"f\").call(this)}async sendDisconnectAction(){const e=ve(this,fe,\"f\");await e.close()}static async wireClose(e,t,n){const{channelName:i,uuid:r,name:o}=t;await e.sendAction(\"disconnect-from-channel\",{channelName:i,uuid:r,name:o,endpointId:n})}}ue.ChannelClient=Ee,fe=new WeakMap,ge=new WeakMap,me=new WeakMap;var xe={},Ae={};Object.defineProperty(Ae,\"__esModule\",{value:!0}),Ae.exhaustiveCheck=void 0,Ae.exhaustiveCheck=function(e,t){throw new Error(`Unsupported value: ${e}${t?`\\n Supported values are: ${t.join(\"\")}`:\"\"}`)};var Pe,Me,_e,Oe={},Se=s&&s.__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},Re=s&&s.__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)};Object.defineProperty(Oe,\"__esModule\",{value:!0}),Oe.ClassicInfo=Oe.ClassicStrategy=void 0;Oe.ClassicStrategy=class{constructor(e,t,n,i){this.messageReceiver=t,this.endpointId=n,this.providerIdentity=i,Pe.set(this,void 0),Me.set(this,new Map),_e.set(this,new Map),this.send=async(e,t,n)=>{const i=Re(this,Me,\"f\").get(e);if(!i)throw new Error(`Could not locate routing info for endpoint ${e}`);const r={...i};r.isLocalEndpointId&&delete r.endpointId,delete r.isLocalEndpointId;const o=Re(this,Pe,\"f\").sendAction(\"send-channel-message\",{...r,providerIdentity:this.providerIdentity,action:t,payload:n});Re(this,_e,\"f\").get(e)?.add(o);return(await o.catch((e=>{throw new Error(e.message)})).finally((()=>{Re(this,_e,\"f\").get(e)?.delete(o)}))).payload.data.result},this.close=async()=>{this.messageReceiver.removeEndpoint(this.providerIdentity.channelId,this.endpointId),[...Re(this,Me,\"f\").keys()].forEach((e=>this.closeEndpoint(e))),Se(this,Me,new Map,\"f\")},Se(this,Pe,e,\"f\")}onEndpointDisconnect(e,t){}receive(e){this.messageReceiver.addEndpoint(e,this.providerIdentity.channelId,this.endpointId)}async closeEndpoint(e){const t=Re(this,Me,\"f\").get(e);Re(this,Me,\"f\").delete(e);const n=Re(this,_e,\"f\").get(e);n?.forEach((n=>{const i=`Channel connection with identity uuid: ${t?.uuid} / name: ${t?.name} / endpointId: ${e} no longer connected.`;n.cancel(new Error(i))}))}isEndpointConnected(e){return Re(this,Me,\"f\").has(e)}addEndpoint(e,t){Re(this,Me,\"f\").set(e,t.endpointIdentity),Re(this,_e,\"f\").set(e,new Set)}isValidEndpointPayload(e){return\"string\"==typeof e?.endpointIdentity?.endpointId||\"string\"==typeof e?.endpointIdentity?.channelId}},Pe=new WeakMap,Me=new WeakMap,_e=new WeakMap,Oe.ClassicInfo={version:5,minimumVersion:0,type:\"classic\"};var Fe={},je={},ke={};Object.defineProperty(ke,\"__esModule\",{value:!0}),ke.errorToPOJO=void 0,ke.errorToPOJO=function(e){return{stack:e.stack,name:e.name,message:e.message,toString:()=>e.stack||e.toString()}};var Le,Te,$e=s&&s.__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)},Be=s&&s.__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};Object.defineProperty(je,\"__esModule\",{value:!0}),je.RTCEndpoint=void 0;const Ge=ke;je.RTCEndpoint=class{static isValidEndpointPayload(e){const t=e=>\"object\"==typeof e&&null!==e;return t(e)&&t(e.endpointIdentity)&&t(e.rtc)&&\"string\"==typeof e.endpointIdentity.endpointId}constructor({rtc:e,endpointIdentity:t}){this.responseMap=new Map,Le.set(this,null),Te.set(this,void 0),this.connectionStateChangeHandler=e=>{\"connected\"!==this.rtc.rtcClient.connectionState&&(this.rtc.rtcClient.removeEventListener(\"connectionstatechange\",this.connectionStateChangeHandler),this.close(),$e(this,Te,\"f\")&&$e(this,Te,\"f\").call(this))},this.send=async(e,t)=>{const n=`message-${Math.random()}`,i=new Promise(((e,t)=>{this.responseMap.set(n,{resolve:e,reject:t})}));return this.rtc.channels.request.send(JSON.stringify({action:e,payload:t,messageId:n})),i},this.close=()=>{this.responseMap.forEach((e=>e.reject(\"Connection has closed.\"))),this.responseMap=new Map,this.rtc.channels.request.close(),this.rtc.channels.response.close(),this.rtc.rtcClient.close()},this.rtc=e,this.endpointIdentity=t,this.rtc.channels.response.addEventListener(\"message\",(e=>{let{data:t}=e;e.data instanceof ArrayBuffer&&(t=(new TextDecoder).decode(e.data));const{messageId:n,payload:i,success:r,error:o}=JSON.parse(t),{resolve:s,reject:a}=this.responseMap.get(n)??{};s&&a?(this.responseMap.delete(n),r?s(i):a(o)):(console.log(\"Could not find id in responseMap.\"),console.log(e))})),this.rtc.channels.request.addEventListener(\"message\",(async e=>{let{data:n}=e;e.data instanceof ArrayBuffer&&(n=(new TextDecoder).decode(e.data));const{messageId:i,action:r,payload:o}=JSON.parse(n);if($e(this,Le,\"f\"))try{const e=await $e(this,Le,\"f\").call(this,r,o,t);this.rtc.channels.response.send(JSON.stringify({messageId:i,payload:e,success:!0}))}catch(e){\"open\"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,error:(0,Ge.errorToPOJO)(e),success:!1}))}else\"open\"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,success:!1,error:\"Connection not ready.\"}))})),this.rtc.rtcClient.addEventListener(\"connectionstatechange\",this.connectionStateChangeHandler),Object.values(this.rtc.channels).forEach((e=>{e.onclose=e=>{[...this.responseMap.values()].forEach((e=>e.reject(new Error(\"RTCDataChannel closed unexpectedly, this is most commonly caused by message size. Note: RTC Channels have a message size limit of ~255kB.\")))),this.close(),$e(this,Te,\"f\")&&$e(this,Te,\"f\").call(this)}}))}onDisconnect(e){if($e(this,Te,\"f\"))throw new Error(\"RTCEndpoint disconnectListener cannot be set twice.\");Be(this,Te,e,\"f\")}receive(e){if($e(this,Le,\"f\"))throw new Error(\"You have already set a listener for this RTC Endpoint.\");Be(this,Le,e,\"f\")}get connected(){return\"connected\"===this.rtc.rtcClient.connectionState}},Le=new WeakMap,Te=new WeakMap;var We,He,Ne,De={},Ue=s&&s.__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)},Ve=s&&s.__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};Object.defineProperty(De,\"__esModule\",{value:!0}),De.EndpointStrategy=void 0;De.EndpointStrategy=class{constructor(e,t,n){this.EndpointType=e,this.StrategyName=n,We.set(this,null),He.set(this,new Map),Ne.set(this,!0),this.send=async(e,t,n)=>this.getEndpointById(e).send(t,n),this.close=async()=>{Ue(this,Ne,\"f\")&&(Ue(this,He,\"f\").forEach((e=>e.close())),Ve(this,He,new Map,\"f\")),Ve(this,Ne,!1,\"f\")},this.isValidEndpointPayload=t}onEndpointDisconnect(e,t){this.getEndpointById(e).onDisconnect(t)}receive(e){if(Ue(this,We,\"f\"))throw new Error(`You have already set a listener for this ${this.StrategyName} Strategy`);Ve(this,We,e,\"f\"),Ue(this,He,\"f\").forEach((e=>e.receive(Ue(this,We,\"f\"))))}getEndpointById(e){const t=Ue(this,He,\"f\").get(e);if(!t)throw new Error(`Client with endpoint id ${e} is not connected`);return t}get connected(){return Ue(this,Ne,\"f\")}isEndpointConnected(e){return Ue(this,He,\"f\").has(e)}addEndpoint(e,t){if(!Ue(this,Ne,\"f\"))return void console.warn(`Adding endpoint to disconnected ${this.StrategyName} Strategy`);const n=new this.EndpointType(t);Ue(this,We,\"f\")&&n.receive(Ue(this,We,\"f\")),Ue(this,He,\"f\").set(e,n)}async closeEndpoint(e){Ue(this,He,\"f\").delete(e)}},We=new WeakMap,He=new WeakMap,Ne=new WeakMap,Object.defineProperty(Fe,\"__esModule\",{value:!0}),Fe.RTCInfo=Fe.RTCStrategy=void 0;const ze=je,Ke=De;class qe extends Ke.EndpointStrategy{constructor(){super(ze.RTCEndpoint,ze.RTCEndpoint.isValidEndpointPayload,\"RTC\")}}Fe.RTCStrategy=qe,Fe.RTCInfo={version:2,minimumVersion:0,type:\"rtc\"};var Je={};Object.defineProperty(Je,\"__esModule\",{value:!0}),Je.RTCICEManager=void 0;const Ye=d;class Ze extends Ye.EmitterBase{constructor(e){super(e,\"channel\"),this.ensureChannelOpened=e=>new Promise(((t,n)=>{if(\"open\"===e.readyState)t();else if(\"connecting\"===e.readyState){const n=()=>{e.removeEventListener(\"open\",n),t()};e.addEventListener(\"open\",n)}else n(new Error(\"This Channel has already closed\"))}))}static createDataChannelPromise(e,t){let n;const i=new Promise((e=>{n=e})),r=i=>{const o=()=>{i.channel.removeEventListener(\"open\",o),n(i.channel)};i.channel.label===e&&(i.channel.addEventListener(\"open\",o),t.removeEventListener(\"datachannel\",r))};return t.addEventListener(\"datachannel\",r),i}async listenForProviderIce(e,t){await this.on(this.createProviderEventName(e),t,{timestamp:Date.now()})}async raiseProviderIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createProviderEventName(e)),t)}async listenForClientIce(e,t){await this.on(this.createClientEventName(e),t,{timestamp:Date.now()})}async raiseClientIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createClientEventName(e)),t)}cleanupIceListeners(e){this.removeAllListeners(this.createClientEventName(e)),this.removeAllListeners(this.createProviderEventName(e))}createClientEventName(e){return`ice-client-${e}`}createProviderEventName(e){return`ice-provider-${e}`}createRouteString(e){return`channel/${e}`}createRtcPeer(){return this.wire.environment.getRtcPeer()}async startClientOffer(){const e=Math.random().toString(),t=this.createRtcPeer();t.addEventListener(\"icecandidate\",(async t=>{t.candidate&&await this.raiseClientIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForProviderIce(e,(async e=>{await t.addIceCandidate(e.candidate)}));const n={request:t.createDataChannel(\"request\"),response:t.createDataChannel(\"response\")},i=await t.createOffer();await t.setLocalDescription(i);const r=Promise.all([n.request,n.response].map(this.ensureChannelOpened)).then((()=>{}));return{rtcClient:t,channels:n,offer:i,rtcConnectionId:e,channelsOpened:r}}async finishClientOffer(e,t,n){return await e.setRemoteDescription(t),await n,!0}async createProviderAnswer(e,t){const n=this.createRtcPeer(),i=Ze.createDataChannelPromise(\"request\",n),r=Ze.createDataChannelPromise(\"response\",n);n.addEventListener(\"icecandidate\",(async t=>{t.candidate&&await this.raiseProviderIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForClientIce(e,(async e=>{await n.addIceCandidate(e.candidate)})),await n.setRemoteDescription(t);const o=await n.createAnswer();await n.setLocalDescription(o);const s=Promise.all([i,r]).then((([t,n])=>(this.cleanupIceListeners(e),{request:t,response:n})));return{rtcClient:n,answer:o,channels:s}}}Je.RTCICEManager=Ze;var Qe={},Xe={};function et(e){return[...e.split(\".\").reverse().entries()].reduce(((e,[t,n])=>e+ +n*1e4**t),0)}function tt(e,t){return et(e)>=et(t)}function nt(e){return e.split(\"/\")[0]}Object.defineProperty(Xe,\"__esModule\",{value:!0}),Xe.runtimeUuidMeetsMinimumRuntimeVersion=Xe.parseRuntimeUuid=Xe.meetsMinimumRuntimeVersion=void 0,Xe.meetsMinimumRuntimeVersion=tt,Xe.parseRuntimeUuid=nt,Xe.runtimeUuidMeetsMinimumRuntimeVersion=function(e,t){return tt(nt(e),t)};var it,rt,ot,st,at,ct=s&&s.__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)},dt=s&&s.__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};Object.defineProperty(Qe,\"__esModule\",{value:!0}),Qe.ChannelProvider=void 0;const ht=pe,lt=Xe;class ut extends ht.ChannelBase{get connections(){return[...ct(this,it,\"f\")]}static handleClientDisconnection(e,t){const n=e.connections.find((e=>e.endpointId===t.endpointId));if(n)ct(e,st,\"f\").call(e,n);else{e.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name)).forEach(ct(e,st,\"f\"))}e.disconnectListener(t)}static setProviderRemoval(e,t){ut.removalMap.set(e,t)}constructor(e,t,n){super(),it.set(this,void 0),rt.set(this,void 0),ot.set(this,void 0),st.set(this,(e=>{const t=this.connections.filter((t=>t.endpointId!==e.endpointId));ct(this,ot,\"f\").closeEndpoint(e.endpointId),dt(this,it,t,\"f\")})),this.processAction=async(e,t,n)=>(ut.clientIsMultiRuntime(n)&&!(0,lt.runtimeUuidMeetsMinimumRuntimeVersion)(n.runtimeUuid,\"18.87.56.0\")?this.handleMultiRuntimeLegacyClient(n):this.checkForClientConnection(n),super.processAction(e,t,n)),at.set(this,(()=>{ct(this,ot,\"f\").close();const e=ut.removalMap.get(this);e&&e()})),dt(this,rt,new ht.ProtectedItems(e,t),\"f\"),this.connectListener=()=>{},this.disconnectListener=()=>{},dt(this,it,[],\"f\"),dt(this,ot,n,\"f\"),n.receive(this.processAction)}dispatch(e,t,n){const i=e.endpointId??this.getEndpointIdForOpenFinId(e,t);return i&&ct(this,ot,\"f\").isEndpointConnected(i)?ct(this,ot,\"f\").send(i,t,n):Promise.reject(new Error(`Client connection with identity uuid: ${e.uuid} / name: ${e.name} / endpointId: ${i} no longer connected.`))}async processConnection(e,t){return ct(this,it,\"f\").push(e),this.connectListener(e,t)}publish(e,t){return this.connections.map((n=>ct(this,ot,\"f\").send(n.endpointId,e,t)))}onConnection(e){this.connectListener=e}onDisconnection(e){this.disconnectListener=e}async destroy(){const e=ct(this,rt,\"f\");e.providerIdentity,dt(this,it,[],\"f\"),await e.close(),ct(this,at,\"f\").call(this)}async getAllClientInfo(){return this.connections.map((e=>{const{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}=e;return{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}}))}checkForClientConnection(e){if(!this.isClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider.\\n Client Identity: {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}isClientConnected(e){return ut.clientIdentityIncludesEndpointId(e)?this.connections.some((t=>t.endpointId===e.endpointId&&t.uuid===e.uuid&&t.name===e.name)):this.isLegacyClientConnected(e)}isLegacyClientConnected(e){return this.connections.some((t=>t.uuid===e.uuid&&t.name===e.name))}handleMultiRuntimeLegacyClient(e){if(!this.isLegacyClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider. Client Identity:\\n {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}getEndpointIdForOpenFinId(e,t){const n=this.connections.filter((t=>t.name===e.name&&t.uuid===e.uuid));if(n.length>=2){const n=ct(this,rt,\"f\"),{uuid:i,name:r}=e,o=n?.providerIdentity.uuid,s=n?.providerIdentity.name;console.warn(`WARNING: Dispatch call may have unintended results. The \"to\" argument of your dispatch call is missing the\\n \"endpointId\" parameter. The identity you are dispatching to ({uuid: ${i}, name: ${r}})\\n has multiple channelClients for this channel. Your dispatched action: (${t}) from the provider:\\n ({uuid: ${o}, name: ${s}}) will only be processed by the most recently-created client.`)}return n.pop()?.endpointId}static clientIdentityIncludesEndpointId(e){return void 0!==e.endpointId}static clientIsMultiRuntime(e){return void 0!==e.runtimeUuid}static async wireClose(e,t){await e.sendAction(\"destroy-channel\",{channelName:t})}}Qe.ChannelProvider=ut,it=new WeakMap,rt=new WeakMap,ot=new WeakMap,st=new WeakMap,at=new WeakMap,ut.removalMap=new WeakMap;var pt={};Object.defineProperty(pt,\"__esModule\",{value:!0}),pt.MessageReceiver=void 0;const wt=ue,yt=d;class ft extends yt.Base{constructor(e){super(e),this.onmessage=e=>\"process-channel-message\"===e.action&&(this.processChannelMessage(e),!0),this.endpointMap=new Map,this.latestEndpointIdByChannelId=new Map,e.registerMessageHandler(this.onmessage.bind(this))}async processChannelMessage(e){const{senderIdentity:t,providerIdentity:n,action:i,ackToSender:r,payload:o,intendedTargetIdentity:s}=e.payload,a=s.channelId??s.endpointId??this.latestEndpointIdByChannelId.get(n.channelId),c=this.endpointMap.get(a);if(!c)return r.payload.success=!1,r.payload.reason=`Client connection with identity uuid: ${this.wire.me.uuid} / name: ${this.wire.me.name} / endpointId: ${a} no longer connected.`,this.wire.sendRaw(r);try{const e=await c(i,o,t);return r.payload.payload=r.payload.payload||{},r.payload.payload.result=e,this.wire.sendRaw(r)}catch(e){return r.payload.success=!1,r.payload.reason=e.message,this.wire.sendRaw(r)}}addEndpoint(e,t,n){this.endpointMap.set(n,e),t!==n&&this.latestEndpointIdByChannelId.set(t,n)}removeEndpoint(e,t){this.endpointMap.delete(t),this.latestEndpointIdByChannelId.get(e)===t&&this.latestEndpointIdByChannelId.delete(e)}checkForPreviousClientConnection(e){const t=this.latestEndpointIdByChannelId.get(e);t&&(wt.ChannelClient.closeChannelByEndpointId(t),console.warn(\"You have created a second connection to an older provider. First connection has been removed from the clientMap\"),console.warn(\"If the provider calls publish(), you may receive multiple messages.\"))}}pt.MessageReceiver=ft;var gt={};Object.defineProperty(gt,\"__esModule\",{value:!0}),gt.ProtocolManager=void 0;gt.ProtocolManager=class{constructor(e){this.ProtocolsInPreferenceOrder=e,this.DefaultClientProtocols=[\"classic\"],this.DefaultProviderProtocols=[\"classic\"],this.getClientProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultClientProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(\", \")}.`);return t},this.getProviderProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultProviderProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(\", \")}.`);return t},this.getCompatibleProtocols=(e,t)=>t.supportedProtocols.filter((t=>e.some((e=>e.type===t.type&&t.version>=e.minimumVersion&&e.version>=(t.minimumVersion??0))))).slice(0,t.maxProtocols)}};var mt={};Object.defineProperty(mt,\"__esModule\",{value:!0});class vt{static combine(e,t){return new vt(e,t)}constructor(e,t){this.primary=e,this.secondary=t}onEndpointDisconnect(e,t){this.primary.onEndpointDisconnect(e,(()=>{this.secondary.isEndpointConnected(e)||t()})),this.secondary.onEndpointDisconnect(e,(()=>{this.primary.isEndpointConnected(e)||t()}))}isValidEndpointPayload(e){return this.primary.isValidEndpointPayload(e)||this.secondary.isValidEndpointPayload(e)}async closeEndpoint(e){await this.primary.closeEndpoint(e),await this.secondary.closeEndpoint(e)}isEndpointConnected(e){return this.primary.isEndpointConnected(e)||this.secondary.isEndpointConnected(e)}async addEndpoint(e,t){this.primary.isValidEndpointPayload(t)&&await this.primary.addEndpoint(e,t),this.secondary.isValidEndpointPayload(t)&&await this.secondary.addEndpoint(e,t)}receive(e){this.primary.receive(e),this.secondary.receive(e)}send(e,t,n){return this.primary.isEndpointConnected(e)?this.primary.send(e,t,n):this.secondary.send(e,t,n)}async close(){await Promise.all([this.primary.close(),this.secondary.close()])}}mt.default=vt;var Ct,bt,It=s&&s.__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},Et=s&&s.__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)},xt=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(xe,\"__esModule\",{value:!0}),xe.ConnectionManager=void 0;const At=Ae,Pt=d,Mt=Oe,_t=Fe,Ot=Je,St=Qe,Rt=pt,Ft=gt,jt=xt(mt);class kt extends Pt.Base{static getProtocolOptionsFromStrings(e){return e.map((e=>{switch(e){case\"rtc\":return _t.RTCInfo;case\"classic\":return Mt.ClassicInfo;default:return(0,At.exhaustiveCheck)(e,[\"rtc\",\"classic\"])}}))}constructor(e){super(e),Ct.set(this,void 0),bt.set(this,void 0),this.removeChannelFromProviderMap=e=>{this.providerMap.delete(e)},this.onmessage=e=>\"process-channel-connection\"===e.action&&(this.processChannelConnection(e),!0),this.providerMap=new Map,this.protocolManager=new Ft.ProtocolManager(\"node\"===this.wire.environment.type?[\"classic\"]:[\"rtc\",\"classic\"]),It(this,Ct,new Rt.MessageReceiver(e),\"f\"),It(this,bt,new Ot.RTCICEManager(e),\"f\"),e.registerMessageHandler(this.onmessage.bind(this))}createProvider(e,t){const n=Object.assign(this.wire.environment.getDefaultChannelOptions().create,e||{}),i=this.protocolManager.getProviderProtocols(n?.protocols),r=i.map((e=>{switch(e){case\"rtc\":return new _t.RTCStrategy;case\"classic\":return new Mt.ClassicStrategy(this.wire,Et(this,Ct,\"f\"),t.channelId,t);default:return(0,At.exhaustiveCheck)(e,[\"rtc\",\"classic\"])}}));let o;if(2===r.length){const[e,t]=r;o=jt.default.combine(e,t)}else{if(1!==r.length)throw new Error(\"failed to combine strategies\");[o]=r}const s=new St.ChannelProvider(t,(()=>St.ChannelProvider.wireClose(this.wire,t.channelName)),o),a=t.channelId;return this.providerMap.set(a,{provider:s,strategy:o,supportedProtocols:kt.getProtocolOptionsFromStrings(i)}),St.ChannelProvider.setProviderRemoval(s,this.removeChannelFromProviderMap.bind(this)),s}async createClientOffer(e){const t=this.protocolManager.getClientProtocols(e?.protocols);let n;return{offer:{supportedProtocols:await Promise.all(t.map((async e=>{switch(e){case\"rtc\":{const{rtcClient:e,channels:t,offer:i,rtcConnectionId:r,channelsOpened:o}=await Et(this,bt,\"f\").startClientOffer();return n={rtcClient:e,channels:t,channelsOpened:o},{type:\"rtc\",version:_t.RTCInfo.version,payload:{offer:i,rtcConnectionId:r}}}case\"classic\":return{type:\"classic\",version:Mt.ClassicInfo.version};default:return(0,At.exhaustiveCheck)(e,[\"rtc\",\"classic\"])}}))),maxProtocols:2},rtc:n}}async createClientStrategy(e,t){t.endpointId||(t.endpointId=this.wire.environment.getNextMessageId(),Et(this,Ct,\"f\").checkForPreviousClientConnection(t.channelId));const n=t.answer??{supportedProtocols:[{type:\"classic\",version:1}]},i=(await Promise.all(n.supportedProtocols.map((async n=>\"rtc\"===n.type&&e?(await Et(this,bt,\"f\").finishClientOffer(e.rtcClient,n.payload.answer,e.channelsOpened),new _t.RTCStrategy):\"classic\"===n.type?new Mt.ClassicStrategy(this.wire,Et(this,Ct,\"f\"),t.endpointId,t):null)))).filter((e=>null!==e));let r;if(e&&!i.some((e=>e instanceof _t.RTCStrategy))&&e&&e.rtcClient.close(),i.length>=2)r=jt.default.combine(i[0],i[1]);else{if(!i.length)throw new Error(\"No compatible protocols\");[r]=i}const o={endpointIdentity:t,rtc:e};return r.addEndpoint(t.channelId,o),r}async processChannelConnection(e){const{clientIdentity:t,providerIdentity:n,ackToSender:i,payload:r,offer:o}=e.payload;t.endpointId?t.isLocalEndpointId=!1:(t.endpointId=this.wire.environment.getNextMessageId(),t.isLocalEndpointId=!0);const s=n.channelId,a=this.providerMap.get(s);if(!a)return i.payload.success=!1,i.payload.reason=`Channel \"${n.channelName}\" has been destroyed.`,this.wire.sendRaw(i);const{provider:c,strategy:d,supportedProtocols:h}=a;try{if(!(c instanceof St.ChannelProvider))throw Error(\"Cannot connect to a channel client\");const e=o??{supportedProtocols:[{type:\"classic\",version:1}],maxProtocols:1},n=this.protocolManager.getCompatibleProtocols(h,e);if(!n.length)throw new Error(\"This provider does not support any of the offered protocols.\");const s=await c.processConnection(t,r);i.payload.payload=i.payload.payload||{};let a={supportedProtocols:[],endpointPayloadPromise:Promise.resolve({endpointIdentity:t})};return a=await n.reduce((async(e,t)=>{const n=await e;if(\"rtc\"===t.type){const{answer:e,rtcClient:i,channels:r}=await Et(this,bt,\"f\").createProviderAnswer(t.payload.rtcConnectionId,t.payload.offer);n.supportedProtocols.push({type:\"rtc\",version:_t.RTCInfo.version,payload:{answer:e}}),n.endpointPayloadPromise=n.endpointPayloadPromise.then((e=>r.then((t=>({...e,rtc:{rtcClient:i,channels:t}})))))}else n.supportedProtocols.push({type:\"classic\",version:Mt.ClassicInfo.version});return n}),Promise.resolve(a)),a.endpointPayloadPromise.then((e=>d.addEndpoint(t.endpointId,e))),i.payload.payload.result=s,i.payload.payload.answer=a,this.wire.sendRaw(i)}catch(e){return i.payload.success=!1,i.payload.reason=e.message,this.wire.sendRaw(i)}}}xe.ConnectionManager=kt,Ct=new WeakMap,bt=new WeakMap;var Lt,Tt,$t,Bt=s&&s.__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},Gt=s&&s.__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)};Object.defineProperty(le,\"__esModule\",{value:!0}),le.Channel=void 0;const Wt=t,Ht=G,Nt=d,Dt=ue,Ut=xe,Vt=Qe;function zt(e){const t=Math.floor(e/10),n=Math.min(3e4,500*2**t);return new Promise((e=>{setTimeout((()=>{e(!1)}),n)}))}class Kt extends Nt.EmitterBase{constructor(e){super(e,\"channel\"),Lt.set(this,void 0),Tt.set(this,new Wt.EventEmitter),$t.set(this,new Ht.AsyncRetryableLazy((async()=>{await Promise.all([this.on(\"disconnected\",(e=>{Dt.ChannelClient.handleProviderDisconnect(e)})),this.on(\"connected\",((...e)=>{Gt(this,Tt,\"f\").emit(\"connected\",...e)}))]).catch((()=>new Error(\"error setting up channel connection listeners\")))}))),Bt(this,Lt,new Ut.ConnectionManager(e),\"f\")}async getAllChannels(){return this.wire.sendAction(\"get-all-channels\").then((({payload:e})=>e.data))}async onChannelConnect(e){await this.on(\"connected\",e)}async onChannelDisconnect(e){await this.on(\"disconnected\",e)}async safeConnect(e,t,n){const i={count:0};do{let r=()=>{};const o=new Promise((t=>{r=n=>{e===n.channelName&&t(!0)},Gt(this,Tt,\"f\").on(\"connected\",r)}));try{if(i.count>0){i.gotConnectedEvent=await Promise.race([zt(i.count),o]);const t=await this.wire.sendAction(\"connect-to-channel\",{...n,retryInfo:i});return console.log(`Successfully connected to channelName: ${e}`),t.payload.data}const t=this.wire.sendAction(\"connect-to-channel\",n);i.originalMessageId=t.messageId;return(await t).payload.data}catch(n){if(!n.message.includes(\"internal-nack\"))throw n;t&&0===i.count&&console.warn(`No channel found for channelName: ${e}. Waiting for connection...`)}finally{i.count+=1,Gt(this,Tt,\"f\").removeListener(\"connected\",r)}}while(t);throw new Error(`No channel found for channelName: ${e}.`)}async connect(e,t={}){if(await Gt(this,$t,\"f\").getValue(),!e||\"string\"!=typeof e)throw new Error(\"Please provide a channelName string to connect to a channel.\");const n={wait:!0,...this.wire.environment.getDefaultChannelOptions().connect,...t},{offer:i,rtc:r}=await Gt(this,Lt,\"f\").createClientOffer(n);let o;(this.fin.me.isFrame||this.fin.me.isView||this.fin.me.isWindow)&&(o=(await this.fin.me.getInfo()).url);const s={channelName:e,...n,offer:i,connectionUrl:o},a=await this.safeConnect(e,n.wait,s),c=await Gt(this,Lt,\"f\").createClientStrategy(r,a),d=new Dt.ChannelClient(a,(()=>Dt.ChannelClient.wireClose(this.wire,a,a.endpointId)),c);return c.onEndpointDisconnect(a.channelId,(async()=>{try{await d.sendDisconnectAction()}catch(e){console.warn(`Something went wrong during disconnect for client with uuid: ${a.uuid} / name: ${a.name} / endpointId: ${a.endpointId}.`)}finally{Dt.ChannelClient.handleProviderDisconnect(a)}})),d}async create(e,t){if(!e)throw new Error(\"Please provide a channelName to create a channel\");const{payload:{data:n}}=await this.wire.sendAction(\"create-channel\",{channelName:e}),i=Gt(this,Lt,\"f\").createProvider(t,n);return this.on(\"client-disconnected\",(t=>{t.channelName===e&&Vt.ChannelProvider.handleClientDisconnection(i,t)})),i}}le.Channel=Kt,Lt=new WeakMap,Tt=new WeakMap,$t=new WeakMap,Object.defineProperty(de,\"__esModule\",{value:!0}),de.InterAppPayload=de.InterApplicationBus=void 0;const qt=t,Jt=d,Yt=he,Zt=le,Qt=O;class Xt extends Jt.Base{constructor(e){super(e),this.events={subscriberAdded:\"subscriber-added\",subscriberRemoved:\"subscriber-removed\"},this.refCounter=new Yt.RefCounter,this.Channel=new Zt.Channel(e),this.emitter=new qt.EventEmitter,e.registerMessageHandler(this.onmessage.bind(this)),this.on=this.emitter.on.bind(this.emitter),this.removeAllListeners=this.emitter.removeAllListeners.bind(this.emitter)}async publish(e,t){await this.wire.sendAction(\"publish-message\",{topic:e,message:t,sourceWindowName:this.me.name})}async send(e,t,n){const i=(0,Qt.validateIdentity)(e);if(i)throw new Error(i);await this.wire.sendAction(\"send-message\",{destinationUuid:e.uuid,destinationWindowName:e.name,topic:t,message:n,sourceWindowName:this.me.name})}subscribe(e,t,n){const i=this.createSubscriptionKey(e.uuid,e.name||\"*\",t);return this.emitter.on(i,n),this.refCounter.actOnFirst(i,(async()=>{await this.wire.sendAction(\"subscribe\",{sourceUuid:e.uuid,sourceWindowName:e.name||\"*\",topic:t,destinationWindowName:this.me.name})}),(()=>Promise.resolve()))}unsubscribe(e,t,n){const i=e.name||\"*\",r=this.createSubscriptionKey(e.uuid,i,t);return this.emitter.removeListener(r,n),this.refCounter.actOnLast(r,(async()=>{await this.wire.sendAction(\"unsubscribe\",{sourceUuid:e.uuid,sourceWindowName:i,topic:t,destinationWindowName:this.me.name})}),(()=>new Promise((e=>e)).then((()=>{}))))}processMessage(e){const{payload:{message:t,sourceWindowName:n,sourceUuid:i,topic:r}}=e,o=[this.createSubscriptionKey(i,n,r),this.createSubscriptionKey(i,\"*\",r),this.createSubscriptionKey(\"*\",\"*\",r)],s={uuid:i,name:n};o.forEach((e=>{this.emitter.emit(e,t,s)}))}emitSubscriverEvent(e,t){const{payload:{targetName:n,uuid:i,topic:r}}=t,o={name:n,uuid:i,topic:r};this.emitter.emit(e,o)}createSubscriptionKey(e,t,n){const i=t||\"*\";if(!(e&&i&&n))throw new Error(\"Missing uuid, name, or topic string\");return function(...e){return e.map((e=>Buffer.from(`${e}`).toString(\"base64\"))).join(\"/\")}(e,i,n)}onmessage(e){const{action:t}=e;switch(t){case\"process-message\":this.processMessage(e);break;case this.events.subscriberAdded:this.emitSubscriverEvent(this.events.subscriberAdded,e);break;case this.events.subscriberRemoved:this.emitSubscriverEvent(this.events.subscriberRemoved,e)}return!0}}de.InterApplicationBus=Xt;de.InterAppPayload=class{};var en={};Object.defineProperty(en,\"__esModule\",{value:!0}),en.Clipboard=void 0;const tn=d;class nn extends tn.Base{async writeText(e){await this.wire.sendAction(\"clipboard-write-text\",e)}async readText(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-text\",{type:e});return t.data}async writeImage(e){await this.wire.sendAction(\"clipboard-write-image\",e)}async readImage(e={format:\"dataURL\"}){const{payload:t}=await this.wire.sendAction(\"clipboard-read-image\",e);return t.data}async writeHtml(e){await this.wire.sendAction(\"clipboard-write-html\",e)}async readHtml(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-html\",{type:e});return t.data}async writeRtf(e){await this.wire.sendAction(\"clipboard-write-rtf\",e)}async readRtf(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-rtf\",{type:e});return t.data}async write(e){await this.wire.sendAction(\"clipboard-write\",e)}async getAvailableFormats(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-formats\",{type:e});return t.data}}en.Clipboard=nn;var rn={},on={},sn={};Object.defineProperty(sn,\"__esModule\",{value:!0}),sn.ExternalApplication=void 0;const an=d;class cn extends an.EmitterBase{constructor(e,t){super(e,\"external-application\",t.uuid),this.identity=t}getInfo(){return this.wire.sendAction(\"get-external-application-info\",this.identity).then((({payload:e})=>e.data))}}sn.ExternalApplication=cn,Object.defineProperty(on,\"__esModule\",{value:!0}),on.ExternalApplicationModule=void 0;const dn=d,hn=sn;class ln extends dn.Base{wrap(e){return this.wire.sendAction(\"external-application-wrap\").catch((e=>{})),Promise.resolve(new hn.ExternalApplication(this.wire,{uuid:e}))}wrapSync(e){return this.wire.sendAction(\"external-application-wrap-sync\").catch((e=>{})),new hn.ExternalApplication(this.wire,{uuid:e})}}on.ExternalApplicationModule=ln,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(on,e),n(sn,e)}(rn);var un={},pn={},wn={};Object.defineProperty(wn,\"__esModule\",{value:!0}),wn._Frame=void 0;const yn=d;class fn extends yn.EmitterBase{constructor(e,t){super(e,\"frame\",t.uuid,t.name),this.identity=t}getInfo(){return this.wire.sendAction(\"get-frame-info\",this.identity).then((({payload:e})=>e.data))}getParentWindow(){return this.wire.sendAction(\"get-parent-window\",this.identity).then((({payload:e})=>e.data))}}wn._Frame=fn,Object.defineProperty(pn,\"__esModule\",{value:!0}),pn._FrameModule=void 0;const gn=d,mn=O,vn=wn;class Cn extends gn.Base{async wrap(e){this.wire.sendAction(\"frame-wrap\").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}wrapSync(e){this.wire.sendAction(\"frame-wrap-sync\").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}getCurrent(){return this.wire.sendAction(\"frame-get-current\").catch((e=>{})),Promise.resolve(new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity()))}getCurrentSync(){return this.wire.sendAction(\"frame-get-current-sync\").catch((e=>{})),new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity())}}pn._FrameModule=Cn,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(pn,e),n(wn,e)}(un);var bn={};Object.defineProperty(bn,\"__esModule\",{value:!0}),bn.GlobalHotkey=void 0;const In=d;class En extends In.EmitterBase{constructor(e){super(e,\"global-hotkey\")}async register(e,t){await this.on(e,t),await this.wire.sendAction(\"global-hotkey-register\",{hotkey:e})}async unregister(e){await this.removeAllListeners(e),await this.wire.sendAction(\"global-hotkey-unregister\",{hotkey:e})}async unregisterAll(){await Promise.all(this.eventNames().filter((e=>!(\"registered\"===e||\"unregistered\"===e))).map((e=>this.removeAllListeners(e)))),await this.wire.sendAction(\"global-hotkey-unregister-all\",{})}async isRegistered(e){const{payload:{data:t}}=await this.wire.sendAction(\"global-hotkey-is-registered\",{hotkey:e});return t}}bn.GlobalHotkey=En;var xn,An={},Pn={},Mn={},_n=s&&s.__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)};Object.defineProperty(Mn,\"__esModule\",{value:!0}),Mn.Platform=void 0;const On=d,Sn=O,Rn=new Map;class Fn extends On.EmitterBase{constructor(e,t){super(t.wire,\"application\",e.uuid),this.getClient=e=>{this.wire.sendAction(\"platform-get-client\",this.identity).catch((e=>{}));const t=e||this.identity,{uuid:n}=t;if(!Rn.has(n)){const e=_n(this,xn,\"f\").call(this,n);Rn.set(n,e)}return Rn.get(n)},xn.set(this,(async e=>{try{const t=`custom-frame-${e}`,n=await this._channel.connect(t,{wait:!1});return n.onDisconnection((()=>{Rn.delete(e)})),n}catch(t){throw Rn.delete(e),new Error(\"The targeted Platform is not currently running. Listen for application-started event for the given Uuid.\")}})),this.launchLegacyManifest=this.launchContentManifest;const n=(0,Sn.validateIdentity)(e);if(n)throw new Error(n);this._channel=t,this.identity={uuid:e.uuid},this.Layout=this.fin.Platform.Layout,this.Application=this.fin.Application.wrapSync(this.identity)}async createView(e,t,n){this.wire.sendAction(\"platform-create-view\",this.identity).catch((e=>{}));const i=await this.getClient(),r=await i.dispatch(\"create-view\",{target:t,opts:e,targetView:n});if(!r||(0,Sn.validateIdentity)(r.identity))throw new Error(`When overwriting the createView call, please return an object that has a valid 'identity' property: ${JSON.stringify(r)}`);return this.fin.View.wrapSync(r.identity)}async createWindow(e){this.wire.sendAction(\"platform-create-window\",this.identity).catch((e=>{}));const t=await this.getClient();e.reason||(e.reason=\"api-call\");const n=await t.dispatch(\"create-view-container\",e);if(!n||(0,Sn.validateIdentity)(n.identity))throw new Error(`When overwriting the createWindow call, please return an object that has a valid 'identity' property: ${JSON.stringify(n)}`);const{identity:i}=n,r=this.fin.Window.wrapSync(i);return r.name=i.name,r.uuid=i.uuid,r}async quit(){this.wire.sendAction(\"platform-quit\",this.identity).catch((e=>{}));return(await this.getClient()).dispatch(\"quit\")}async closeView(e){this.wire.sendAction(\"platform-close-view\",this.identity).catch((e=>{}));const t=await this.getClient();await t.dispatch(\"close-view\",{view:e})}async reparentView(e,t){console.warn(\"Platform.reparentView has been deprecated, please use Platform.createView\"),this.wire.sendAction(\"platform-reparent-view\",this.identity).catch((e=>{}));const n={...e,uuid:e.uuid??this.identity.uuid},i=await this.fin.View.wrap(n),r=await i.getOptions();return this.createView(r,t)}async getSnapshot(){this.wire.sendAction(\"platform-get-snapshot\",this.identity).catch((e=>{}));return(await this.getClient()).dispatch(\"get-snapshot\")}async getViewSnapshot(e){return(await this.getClient()).dispatch(\"get-view-snapshot\",{viewIdentity:e})}async applySnapshot(e,t){this.wire.sendAction(\"platform-apply-snapshot\",this.identity).catch((e=>{}));const n=\"Requested snapshot must be a valid Snapshot object, or a url or filepath to such an object.\";let i;if(\"string\"==typeof e)try{i=(await this._channel.wire.sendAction(\"get-application-manifest\",{manifestUrl:e})).payload.data}catch(e){throw new Error(`${n}: ${e}`)}else i=e;if(!i.windows)throw new Error(n);const r=await this.getClient();return await r.dispatch(\"apply-snapshot\",{snapshot:i,options:t}),this}async fetchManifest(e){return(await this.getClient()).dispatch(\"platform-fetch-manifest\",{manifestUrl:e})}async launchContentManifest(e){this.wire.sendAction(\"platform-launch-content-manifest\",this.identity).catch((()=>{}));const t=await this.getClient(),n=await this.fetchManifest(e);return t.dispatch(\"launch-into-platform\",{manifest:n,manifestUrl:e}),this}async setWindowContext(e={},t){if(this.wire.sendAction(\"platform-set-window-context\",this.identity).catch((e=>{})),!e)throw new Error(\"Please provide a serializable object or string to set the context.\");const n=await this.getClient(),{entityType:i}=t?await this.fin.System.getEntityInfo(t.uuid,t.name):this.fin.me;await n.dispatch(\"set-window-context\",{context:e,entityType:i,target:t||{uuid:this.fin.me.uuid,name:this.fin.me.name}})}async getWindowContext(e){this.wire.sendAction(\"platform-get-window-context\",this.identity).catch((e=>{}));const t=await this.getClient(),{entityType:n}=e?await this.fin.System.getEntityInfo(e.uuid,e.name):this.fin.me;return t.dispatch(\"get-window-context\",{target:e||{uuid:this.fin.me.uuid,name:this.fin.me.name},entityType:n})}async closeWindow(e,t={skipBeforeUnload:!1}){this.wire.sendAction(\"platform-close-window\",this.identity).catch((e=>{}));return(await this.getClient()).dispatch(\"close-window\",{windowId:e,options:t})}}Mn.Platform=Fn,xn=new WeakMap;var jn={},kn={},Ln={},Tn={};function $n(e){switch(e){case\"columns\":case\"grid\":case\"rows\":case\"tabs\":return!0;default:return!1}}Object.defineProperty(Tn,\"__esModule\",{value:!0}),Tn.overrideFromComposables=Tn.isValidPresetType=void 0,Tn.isValidPresetType=$n,Tn.overrideFromComposables=function(...e){return t=>e.reduceRight(((e,t)=>n=>t(e(n))),(e=>e))(t)},Tn.default={isValidPresetType:$n};var Bn={},Gn={},Wn={};Object.defineProperty(Wn,\"__esModule\",{value:!0}),Wn.ApiConsumer=void 0;Wn.ApiConsumer=class{constructor(e){this.strategy=e,this.consume=async e=>(await this.strategy.getExposedFunctions(e)).reduce(((t,n)=>({...t,[n.key]:this.strategy.createFunction(n,e)})),{})}};var Hn={},Nn={};Object.defineProperty(Nn,\"__esModule\",{value:!0}),Nn.expose=Nn.getExposedProperties=void 0;const Dn=Symbol(\"exposedProperties\");Nn.getExposedProperties=e=>e[Dn]||e.prototype[Dn]||[];Nn.expose=e=>(t,n,i)=>{t[Dn]=t[Dn]||[],t[Dn].push({key:n,descriptor:i,options:e})},Object.defineProperty(Hn,\"__esModule\",{value:!0}),Hn.ApiExposer=void 0;const Un=Nn;Hn.ApiExposer=class{constructor(e){this.strategy=e,this.exposeInstance=async(e,t)=>{const n=(0,Un.getExposedProperties)(e),i=await Promise.all(n.map((async({key:n,options:i})=>({key:n,options:await this.strategy.exposeFunction(e[n].bind(e),{key:n,options:i,meta:t})}))));await this.strategy.exposeMeta(t,i)}}};var Vn={},zn={},Kn={};Object.defineProperty(Kn,\"__esModule\",{value:!0}),Kn.ChannelsConsumer=void 0;Kn.ChannelsConsumer=class{constructor(e){this.channel=e,this.getExposedFunctions=async e=>{const{id:t}=e,{props:n}=await this.channel.dispatch(`api-meta:${t}`);return n},this.createFunction=e=>(...t)=>{const{action:n}=e.options;return this.channel.dispatch(n,{args:t})}}};var qn={};Object.defineProperty(qn,\"__esModule\",{value:!0}),qn.ChannelsExposer=void 0;qn.ChannelsExposer=class{constructor(e){this.channelProviderOrClient=e,this.exposeFunction=async(e,t)=>{const{key:n,options:i,meta:r}=t,{id:o}=r,s=`${o}.${i?.action||n}`;return await this.channelProviderOrClient.register(s,(async({args:t})=>e(...t))),{action:s}},this.exposeMeta=async({id:e},t)=>{const n=`api-meta:${e}`;await this.channelProviderOrClient.register(n,(()=>({props:t})))}}},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Kn,e),n(qn,e)}(zn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(zn,e)}(Vn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Wn,e),n(Hn,e),n(Vn,e),n(Nn,e)}(Gn);var Jn={};Object.defineProperty(Jn,\"__esModule\",{value:!0}),Jn.createRelayedDispatch=exports.relayChannelClientApi_1=Jn.relayChannelClientApi=void 0;const Yn=[\"no longer connected\",\"RTCDataChannel closed unexpectedly\",\"The client you are trying to dispatch from is disconnected from the target provider\"];exports.relayChannelClientApi_1=Jn.relayChannelClientApi=async(e,t)=>{e.register(`relay:${t}`,(({action:t,target:n,payload:i})=>e.dispatch(n,t,i))),await Promise.resolve()};Jn.createRelayedDispatch=(e,t,n,i)=>async(r,o)=>{try{return await e.dispatch(`relay:${n}`,{action:r,payload:o,target:t})}catch(e){if(s=e.message,Yn.some((e=>s.includes(e)))&&i)throw new Error(i);throw e}var s};var Zn,Qn,Xn,ei=s&&s.__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},ti=s&&s.__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)};Object.defineProperty(Bn,\"__esModule\",{value:!0}),Bn.ColumnOrRow=Bn.TabStack=Bn.LayoutNode=void 0;const ni=Gn,ii=Jn;class ri{constructor(e,t){Zn.set(this,void 0),this.isRoot=()=>ti(this,Zn,\"f\").isRoot(this.entityId),this.exists=()=>ti(this,Zn,\"f\").exists(this.entityId),this.getParent=async()=>{const e=await ti(this,Zn,\"f\").getParent(this.entityId);if(e)return ri.getEntity(e,ti(this,Zn,\"f\"))},this.createAdjacentStack=async(e,t)=>{const n=await ti(this,Zn,\"f\").createAdjacentStack(this.entityId,e,t);return ri.getEntity({entityId:n,type:\"stack\"},ti(this,Zn,\"f\"))},this.getAdjacentStacks=async e=>(await ti(this,Zn,\"f\").getAdjacentStacks({targetId:this.entityId,edge:e})).map((e=>ri.getEntity({type:\"stack\",entityId:e.entityId},ti(this,Zn,\"f\")))),ei(this,Zn,e,\"f\"),this.entityId=t}}Bn.LayoutNode=ri,Zn=new WeakMap,ri.newLayoutEntitiesClient=async(e,t,n)=>{const i=(0,ii.createRelayedDispatch)(e,n,\"layout-relay\",\"You are trying to interact with a layout component on a window that does not exist or has been destroyed.\");return new ni.ApiConsumer(new ni.ChannelsConsumer({dispatch:i})).consume({id:t})},ri.getEntity=(e,t)=>{const{entityId:n,type:i}=e;switch(i){case\"column\":case\"row\":return new si(t,n,i);case\"stack\":return new oi(t,n);default:throw new Error(`Unrecognised Layout Entity encountered ('${JSON.stringify(e)})`)}};class oi extends ri{constructor(e,t){super(e,t),Qn.set(this,void 0),this.type=\"stack\",this.getViews=()=>ti(this,Qn,\"f\").getStackViews(this.entityId),this.addView=async(e,t={index:0})=>ti(this,Qn,\"f\").addViewToStack(this.entityId,e,t),this.removeView=async e=>{await ti(this,Qn,\"f\").removeViewFromStack(this.entityId,e)},this.setActiveView=async e=>{await ti(this,Qn,\"f\").setStackActiveView(this.entityId,e)},ei(this,Qn,e,\"f\")}}Bn.TabStack=oi,Qn=new WeakMap;class si extends ri{constructor(e,t,n){super(e,t),Xn.set(this,void 0),this.getContent=async()=>(await ti(this,Xn,\"f\").getContent(this.entityId)).map((e=>ri.getEntity(e,ti(this,Xn,\"f\")))),ei(this,Xn,e,\"f\"),this.type=n}}Bn.ColumnOrRow=si,Xn=new WeakMap;var ai={};Object.defineProperty(ai,\"__esModule\",{value:!0}),ai.DEFAULT_LAYOUT_KEY=ai.LAYOUT_CONTROLLER_ID=void 0,ai.LAYOUT_CONTROLLER_ID=\"layout-entities\",ai.DEFAULT_LAYOUT_KEY=\"__default__\";var ci,di,hi,li=s&&s.__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)};Object.defineProperty(Ln,\"__esModule\",{value:!0}),Ln.Layout=void 0;const ui=G,pi=O,wi=d,yi=Tn,fi=Bn,gi=ai;class mi extends wi.Base{static getClient(e){return li(e,di,\"f\").getValue()}constructor(e,t){super(t),ci.add(this),di.set(this,new ui.Lazy((async()=>fi.LayoutNode.newLayoutEntitiesClient(await this.platform.getClient(),gi.LAYOUT_CONTROLLER_ID,this.identity)))),this.replace=async e=>{this.wire.sendAction(\"layout-replace\").catch((e=>{}));const t=await this.platform.getClient();await t.dispatch(\"replace-layout\",{target:this.identity,opts:{layout:e}})},this.replaceView=async(e,t)=>{this.wire.sendAction(\"layout-replace-view\").catch((e=>{}));const n=await this.platform.getClient();await n.dispatch(\"replace-view\",{target:this.identity,opts:{viewToReplace:e,newView:t}})},this.applyPreset=async e=>{this.wire.sendAction(\"layout-apply-preset\").catch((e=>{}));const t=await this.platform.getClient(),{presetType:n}=e;if(!n||!(0,yi.isValidPresetType)(n))throw new Error(\"Cannot apply preset layout, please include an applicable presetType property in the PresetLayoutOptions.\");await t.dispatch(\"apply-preset-layout\",{target:this.identity,opts:{presetType:n}})};const n=(0,pi.validateIdentity)(e);if(n)throw new Error(n);this.identity=e,this.platform=this.fin.Platform.wrapSync({uuid:e.uuid}),e.uuid===this.fin.me.uuid&&e.name===this.fin.me.name&&(this.init=this.fin.Platform.Layout.init)}async getConfig(){this.wire.sendAction(\"layout-get-config\").catch((e=>{}));return(await this.platform.getClient()).dispatch(\"get-frame-snapshot\",{target:this.identity})}async getCurrentViews(){this.wire.sendAction(\"layout-get-views\").catch((e=>{}));const e=await this.platform.getClient();return(await e.dispatch(\"get-layout-views\",{target:this.identity})).map((e=>this.fin.View.wrapSync(e)))}async getRootItem(){this.wire.sendAction(\"layout-get-root-item\").catch((()=>{}));const e=await li(this,di,\"f\").getValue(),t=await e.getRoot(\"layoutName\"in this.identity?this.identity:void 0);return fi.LayoutNode.getEntity(t,e)}async getStackByViewIdentity(e){this.wire.sendAction(\"layout-get-stack-by-view\").catch((()=>{}));const t=await li(this,di,\"f\").getValue(),n=await t.getStackByView(e);if(!n)throw new Error(`No stack found for view: ${e.uuid}/${e.name}`);return fi.LayoutNode.getEntity(n,t)}async addView(e,{location:t,targetView:n}={}){this.wire.sendAction(\"layout-add-view\").catch((e=>{}));const{identity:i}=await li(this,ci,\"m\",hi).call(this,\"layout-add-view\",{viewOptions:e,location:t,targetView:n});return{identity:i}}async closeView(e){this.wire.sendAction(\"layout-close-view\").catch((e=>{})),await li(this,ci,\"m\",hi).call(this,\"layout-close-view\",{viewIdentity:e})}}Ln.Layout=mi,di=new WeakMap,ci=new WeakSet,hi=async function(e,t){return(await this.platform.getClient()).dispatch(e,{target:this.identity,opts:t})};var vi,Ci,bi,Ii,Ei,xi=s&&s.__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)},Ai=s&&s.__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};Object.defineProperty(kn,\"__esModule\",{value:!0}),kn.LayoutModule=void 0;const Pi=d,Mi=Ln,_i=ai;class Oi extends Pi.Base{constructor(){super(...arguments),vi.add(this),Ci.set(this,!1),bi.set(this,null),this.init=async(e={})=>{if(this.wire.sendAction(\"layout-init\").catch((e=>{})),!this.wire.environment.layoutAllowedInContext(this.fin))throw new Error(\"Layout.init can only be called from a Window context.\");if(xi(this,Ci,\"f\"))throw new Error(\"Layout.init was already called, please use Layout.create to add additional layouts.\");\"openfin\"===this.wire.environment.type&&await this.fin.Platform.getCurrentSync().getClient(),Ai(this,Ci,!0,\"f\"),Ai(this,bi,await this.wire.environment.initLayoutManager(this.fin,this.wire,e),\"f\"),await this.wire.environment.applyLayoutSnapshot(this.fin,xi(this,bi,\"f\"),e);const t={name:this.fin.me.name,uuid:this.fin.me.uuid};if(!e.layoutManagerOverride){const e={layoutName:_i.DEFAULT_LAYOUT_KEY,...t};return xi(this,Ii,\"f\").call(this,e)}return this.wrapSync(t)},Ii.set(this,(e=>{const t=\"[Layout] You are using a deprecated property `layoutManager` - it will throw if you access it starting in v37.\",n=new Proxy({},{get(e,n){throw console.warn(`[Layout-mgr-proxy] accessing ${n.toString()}`),new Error(t)}}),i=Object.assign(this.wrapSync(e),{layoutManager:n});return new Proxy(i,{get(e,n){if(\"layoutManager\"===n)throw console.warn(`[Layout-proxy] accessing ${n.toString()}`),new Error(t);return e[n]}})})),this.getCurrentLayoutManagerSync=()=>xi(this,vi,\"m\",Ei).call(this,\"fin.Platform.Layout.getCurrentLayoutManagerSync()\"),this.create=async e=>this.wire.environment.createLayout(xi(this,vi,\"m\",Ei).call(this,\"fin.Platform.Layout.create()\"),e),this.destroy=async e=>this.wire.environment.destroyLayout(xi(this,vi,\"m\",Ei).call(this,\"fin.Platform.Layout.destroy()\"),e)}async wrap(e){return this.wire.sendAction(\"layout-wrap\").catch((e=>{})),new Mi.Layout(e,this.wire)}wrapSync(e){return this.wire.sendAction(\"layout-wrap-sync\").catch((e=>{})),new Mi.Layout(e,this.wire)}async getCurrent(){if(this.wire.sendAction(\"layout-get-current\").catch((e=>{})),\"openfin\"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error(\"You are not in a Window context. Only Windows can have a Layout.\");const{uuid:e,name:t}=this.fin.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction(\"layout-get-current-sync\").catch((e=>{})),\"openfin\"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error(\"You are not in a Window context. Only Windows can have a Layout.\");const{uuid:e,name:t}=this.fin.me;return this.wrapSync({uuid:e,name:t})}async getLayoutByViewIdentity(e){this.wire.sendAction(\"layout-get-by-view-identity\").catch((()=>{}));let t=await this.wire.environment.getViewWindowIdentity(this.fin,e);t.identity&&(t=t.identity);try{const n=this.wrapSync(t),i=await Mi.Layout.getClient(n),r=await i.getLayoutIdentityForViewOrThrow(e);return this.wrapSync(r)}catch(n){if(![\"No action registered at target for\",\"getLayoutIdentityForViewOrThrow is not a function\"].some((e=>n.message.includes(e))))throw n;if(t.uuid===t.name)throw new Error(`View identity ${JSON.stringify(e)} is not attached to any layout in provider window ${JSON.stringify(t)}.`);return this.wrapSync(t)}}}kn.LayoutModule=Oi,Ci=new WeakMap,bi=new WeakMap,Ii=new WeakMap,vi=new WeakSet,Ei=function(e){if(!xi(this,bi,\"f\"))throw new Error(`You must call init before using the API ${e}`);return xi(this,bi,\"f\")},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(kn,e),n(Ln,e)}(jn),Object.defineProperty(Pn,\"__esModule\",{value:!0}),Pn.PlatformModule=void 0;const Si=d,Ri=Mn,Fi=jn;class ji extends Si.Base{constructor(e,t){super(e),this._channel=t,this.Layout=new Fi.LayoutModule(this.wire)}async init(e){if(!fin.__internal_.isPlatform||fin.me.name!==fin.me.uuid)throw new Error(\"fin.Platform.init should only be called from a custom platform provider running in the main window of the application.\");return this.wire.environment.initPlatform(this.fin,e)}async wrap(e){return this.wire.sendAction(\"platform-wrap\").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}wrapSync(e){return this.wire.sendAction(\"platform-wrap-sync\").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}async getCurrent(){return this.wire.sendAction(\"platform-get-current\").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction(\"platform-get-current-sync\").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}start(e){return this.wire.sendAction(\"platform-start\").catch((e=>{})),new Promise((async(t,n)=>{try{const{uuid:n}=e,i=await this.fin.Application._create({...e,isPlatformController:!0});i.once(\"platform-api-ready\",(()=>t(this.wrapSync({uuid:n})))),i._run({uuid:n})}catch(e){n(e)}}))}startFromManifest(e,t){return this.wire.sendAction(\"platform-start-from-manifest\").catch((e=>{})),new Promise((async(n,i)=>{try{const i=await this.fin.Application._createFromManifest(e);i.once(\"platform-api-ready\",(()=>n(this.wrapSync({uuid:i.identity.uuid})))),i._run(t)}catch(e){i(e)}}))}}Pn.PlatformModule=ji,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Pn,e),n(Mn,e)}(An);var ki={};!function(e){Object.defineProperty(e,\"__esModule\",{value:!0}),e.getMe=e.getBaseMe=e.environmentUnsupportedMessage=void 0;const t=J(),n=un,i=ie(),r=rn;function o(e,t,n){return{...{isView:\"view\"===e,isWindow:\"window\"===e,isFrame:\"iframe\"===e,isExternal:\"external connection\"===e},uuid:t,name:n,entityType:e}}e.environmentUnsupportedMessage=\"You are not running in OpenFin.\",e.getBaseMe=o,e.getMe=function(s){const{uuid:a,name:c,entityType:d}=s.me,h={setContext(){throw new Error(e.environmentUnsupportedMessage)},addContextHandler(){throw new Error(e.environmentUnsupportedMessage)},getContextGroups(){throw new Error(e.environmentUnsupportedMessage)},joinContextGroup(){throw new Error(e.environmentUnsupportedMessage)},removeFromContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getAllClientsInContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getInfoForContextGroup(){throw new Error(e.environmentUnsupportedMessage)}},l=\"Interop API has not been instantiated. Either connection has failed or you have not declared interop in your config.\",u={setContext(){throw new Error(l)},addContextHandler(){throw new Error(l)},getContextGroups(){throw new Error(l)},joinContextGroup(){throw new Error(l)},removeFromContextGroup(){throw new Error(l)},getAllClientsInContextGroup(){throw new Error(l)},getInfoForContextGroup(){throw new Error(l)}},p={eventNames:()=>{throw new Error(e.environmentUnsupportedMessage)},emit:()=>{throw new Error(e.environmentUnsupportedMessage)},listeners:()=>{throw new Error(e.environmentUnsupportedMessage)},listenerCount:()=>{throw new Error(e.environmentUnsupportedMessage)},on:()=>{throw new Error(e.environmentUnsupportedMessage)},addListener:()=>{throw new Error(e.environmentUnsupportedMessage)},once:()=>{throw new Error(e.environmentUnsupportedMessage)},prependListener:()=>{throw new Error(e.environmentUnsupportedMessage)},prependOnceListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeAllListeners:()=>{throw new Error(e.environmentUnsupportedMessage)}};switch(d){case\"view\":return Object.assign(new t.View(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case\"window\":return Object.assign(new i._Window(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case\"iframe\":return Object.assign(new n._Frame(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case\"external connection\":return Object.assign(new r.ExternalApplication(s,{uuid:a}),o(d,a,c),{interop:u,isOpenFin:!1});default:return{...o(d,a,c),...p,interop:h,isOpenFin:!1}}}}(ki);var Li={},Ti={},$i={};Object.defineProperty($i,\"__esModule\",{value:!0}),$i.createWarningObject=$i.createUnusableObject=void 0,$i.createUnusableObject=function(e){const t=()=>{throw new Error(e)};return new Proxy({},{apply:t,construct:t,defineProperty:t,deleteProperty:t,get:t,getOwnPropertyDescriptor:t,getPrototypeOf:t,has:t,isExtensible:t,ownKeys:t,preventExtensions:t,set:t,setPrototypeOf:t})},$i.createWarningObject=function(e,t){return new Proxy(t,{get:(...t)=>(console.warn(e),Reflect.get(...t)),set:(...t)=>(console.warn(e),Reflect.set(...t)),getOwnPropertyDescriptor:(...t)=>(console.warn(e),Reflect.getOwnPropertyDescriptor(...t)),ownKeys:(...t)=>(console.warn(e),Reflect.ownKeys(...t))})};var Bi,Gi={},Wi={};var Hi={};!function(e){Object.defineProperty(e,\"__esModule\",{value:!0}),e.wrapIntentHandler=e.BROKER_ERRORS=e.generateOverrideWarning=e.generateOverrideError=e.wrapContextHandler=e.wrapInTryCatch=e.generateId=void 0;e.generateId=()=>`${Math.random()}${Date.now()}`;e.wrapInTryCatch=(e,t)=>(...n)=>{try{return e(...n)}catch(e){throw new Error((t||\"\")+e)}};e.wrapContextHandler=(e,t)=>async n=>{try{await e(n)}catch(e){throw console.error(`Error thrown by handler ${t} for context type ${n.type}: ${e}`),e}};e.generateOverrideError=(e,t)=>`You have tried to to use ${e} but ${t} has not been overridden in the Interop Broker. Please override this function. Refer to our documentation for more info.`;e.generateOverrideWarning=(e,t,n,i)=>{const{uuid:r,name:o}=n;return i?`Entity with identity: ${r}/${o} has called ${i} or ${e} but ${t} has not been overridden.`:`Entity with identity: ${r}/${o} has called ${e} but ${t} has not been overridden.`},e.BROKER_ERRORS={fireIntent:(0,e.generateOverrideError)(\"fireIntent\",\"handleFiredIntent\"),fireIntentForContext:(0,e.generateOverrideError)(\"fireIntentForContext\",\"handleFiredIntentForContext\"),getInfoForIntent:(0,e.generateOverrideError)(\"getInfoForIntent\",\"handleInfoForIntent\"),getInfoForIntentsByContext:(0,e.generateOverrideError)(\"getInfoForIntentsByContext\",\"handleInfoForIntentsByContext\"),joinSessionContextGroupWithJoinContextGroup:\"The Context Group you have tried to join is a Session Context Group. Custom Context Groups can only be defined by the Interop Broker through code or manifest configuration. Please use joinSessionContextGroup.\",fdc3Open:(0,e.generateOverrideError)(\"fdc3.open\",\"fdc3HandleOpen\"),fdc3FindInstances:(0,e.generateOverrideError)(\"fdc3.findInstances\",\"fdc3HandleFindInstances\"),fdc3GetAppMetadata:(0,e.generateOverrideError)(\"fdc3.getAppMetadata\",\"fdc3HandleGetAppMetadata\"),fdc3GetInfo:(0,e.generateOverrideError)(\"fdc3.getInfo\",\"fdc3HandleGetInfo\")};e.wrapIntentHandler=(e,t)=>async n=>{try{return e(n)}catch(e){throw console.error(`Error thrown by handler ${t}: ${e}`),e}}}(Hi);var Ni,Di,Ui={};function Vi(){if(Di)return Gi;Di=1;var e,t,n,r=s&&s.__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},o=s&&s.__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)},a=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Gi,\"__esModule\",{value:!0}),Gi.InteropBroker=void 0;const c=d,h=a(function(){if(Bi)return Wi;Bi=1,Object.defineProperty(Wi,\"__esModule\",{value:!0});const e=Cr();return Wi.default=class{constructor(e,t){this.provider=e,this.id=t,this.lastContext=void 0,this.contextGroupMap=new Map,this.clients=new Map,this.registerListeners()}registerListeners(){this.provider.register(`sessionContextGroup:getContext-${this.id}`,this.getCurrentContext.bind(this)),this.provider.register(`sessionContextGroup:setContext-${this.id}`,this.setContext.bind(this)),this.provider.register(`sessionContextGroup:handlerAdded-${this.id}`,this.handlerAdded.bind(this)),this.provider.register(`sessionContextGroup:handlerRemoved-${this.id}`,this.handlerRemoved.bind(this))}getCurrentContext(e){return e.type?this.contextGroupMap.get(e.type):this.lastContext}setContext(t,n){const{context:i}=t,r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name} not in Session Client State Map`);this.contextGroupMap.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{e.contextHandlers.get(i.type)?.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getClientState(e){return this.clients.get(e.endpointId)}async handlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(i){const e=r.contextHandlers.get(i)||[];r.contextHandlers.set(i,[...e,n]);const o=this.contextGroupMap.get(i);o&&await this.provider.dispatch(t,n,o)}else{r.globalHandler=n;const e=[...this.contextGroupMap.keys()].map((async e=>{const i=this.contextGroupMap.get(e);i&&await this.provider.dispatch(t,n,i)}));await Promise.all(e)}}handlerRemoved(e,t){const{handlerId:n}=e,i=this.clients.get(t.endpointId);i?(Array.from(i.contextHandlers).forEach((([,e])=>{const t=e.indexOf(n);t>-1&&e.splice(t,1)})),i.globalHandler===n&&(i.globalHandler=void 0)):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={contextHandlers:new Map,clientIdentity:e,globalHandler:void 0};this.clients.set(e.endpointId,t)}}onDisconnection(e){this.clients.delete(e.endpointId)}},Wi}()),l=Hi,u=a(i),p=function(){if(Ni)return Ui;Ni=1,Object.defineProperty(Ui,\"__esModule\",{value:!0}),Ui.PrivateChannelProvider=void 0;const e=Vi();return Ui.PrivateChannelProvider=class t{constructor(e,t){this.provider=e,this.id=t,this.clients=new Map,this.registerListeners(),this.contextByContextType=new Map,this.lastContext=void 0,this.provider.onConnection((e=>this.registerNewClient(e))),this.provider.onDisconnection((async e=>{const{endpointId:t}=e;this.clients.has(t)&&await this.handleClientDisconnecting(e),0===(await this.provider.getAllClientInfo()).length&&this.provider.destroy()}))}getClientState(e){return this.clients.get(e.endpointId)}registerListeners(){this.provider.register(\"broadcast\",this.broadcast.bind(this)),this.provider.register(\"getCurrentContext\",this.getCurrentContext.bind(this)),this.provider.register(\"contextHandlerAdded\",this.contextHandlerAdded.bind(this)),this.provider.register(\"contextHandlerRemoved\",this.contextHandlerRemoved.bind(this)),this.provider.register(\"nonStandardHandlerRemoved\",this.nonStandardHandlerRemoved.bind(this)),this.provider.register(\"onAddContextHandlerAdded\",this.onAddContextHandlerAdded.bind(this)),this.provider.register(\"onDisconnectHandlerAdded\",this.onDisconnectHandlerAdded.bind(this)),this.provider.register(\"onUnsubscribeHandlerAdded\",this.onUnsubscribeHandlerAdded.bind(this)),this.provider.register(\"clientDisconnecting\",((e,t)=>{this.handleClientDisconnecting(t)}))}broadcast(t,n){const{context:i}=t;if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name}, tried to call broadcast, is not connected to this Private Channel`);const r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to broadcast - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);this.contextByContextType.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{const t=e.handlerIdsByContextTypes.get(i.type);t&&t.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getCurrentContext(e,t){const{contextType:n}=e;if(!this.getClientState(t))throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call getCurrentContext, is not connected to this Private Channel`);if(void 0!==n){return this.contextByContextType.get(n)||null}return this.lastContext?this.lastContext:null}contextHandlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call addContextListener, is not connected to this Private Channel`);if(i){const e=r.handlerIdsByContextTypes.get(i)||[];r.handlerIdsByContextTypes.set(i,[...e,n])}else r.globalHandler=n;Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&e.onAddContextListenerHandlerId&&this.provider.dispatch(e.clientIdentity,e.onAddContextListenerHandlerId,i)}))}async contextHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);if(i){let e;if(i.globalHandler===n)i.globalHandler=void 0;else for(const[t,r]of i.handlerIdsByContextTypes){const i=r.indexOf(n);i>-1&&(r.splice(i,1),e=t)}const r=(await this.getConnectedClients()).map((async n=>{const{clientIdentity:i,clientIdentity:{endpointId:r},onUnsubscribeHandlerId:o}=n;r!==t.endpointId&&o&&await this.provider.dispatch(i,o,e)}));try{await Promise.all(r)}catch(e){throw console.error(`Problem when attempting to dispatch to onUnsubscribeHandlers. Error: ${e} Removing Client: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}`),new Error(e)}}else console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}.`)}nonStandardHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);i?i.onDisconnectHandlerId===n?i.onDisconnectHandlerId=void 0:i.onAddContextListenerHandlerId===n?i.onAddContextListenerHandlerId=void 0:i.onUnsubscribeHandlerId===n&&(i.onUnsubscribeHandlerId=void 0):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}onAddContextHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onAddContextListener, is not connected to this Private Channel`);n.onAddContextListenerHandlerId=i,Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&Array.from(e.handlerIdsByContextTypes.keys()).forEach((e=>{this.provider.dispatch(t,i,e)}))}))}onDisconnectHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onDisconnect, is not connected to this Private Channel`);n.onDisconnectHandlerId=i}onUnsubscribeHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onUnsubscribe, is not connected to this Private Channel`);n.onUnsubscribeHandlerId=i}removeClient(e){const t=this.getClientState(e);if(!t)throw new Error(`Client with Identity: ${e.uuid} ${e.name}, tried to call disconnect, is not connected to this Private Channel`);t.handlerIdsByContextTypes.clear(),this.clients.delete(e.endpointId)}async fireOnDisconnectForOtherClients(e){const{endpointId:t}=e,n=(await this.getConnectedClients()).map((async e=>{const{clientIdentity:{endpointId:n},onDisconnectHandlerId:i}=e;n!==t&&i&&await this.provider.dispatch(e.clientIdentity,i)}));try{await Promise.all(n)}catch(t){throw console.error(`Problem when attempting to dispatch to onDisconnectHandlers. Error: ${t} Disconnecting Client: uuid: ${e.uuid}. name: ${e.name}. endpointId: ${e.endpointId}`),new Error(t)}}async unsubscribeAll(e){const{endpointId:t}=e,n=this.clients.get(t);if(n){const t=Array.from(n.handlerIdsByContextTypes.values()).flat(),i=n.globalHandler;if(t.length>0){const n=t.map((async t=>this.contextHandlerRemoved({handlerId:t},e)));try{await Promise.all(n)}catch(e){console.error(e.message)}}if(i)try{await this.contextHandlerRemoved({handlerId:i},e)}catch(e){console.error(e.message)}}}async handleClientDisconnecting(e){await this.unsubscribeAll(e),this.removeClient(e),await this.fireOnDisconnectForOtherClients(e)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={clientIdentity:e,handlerIdsByContextTypes:new Map,globalHandler:void 0,onAddContextListenerHandlerId:void 0,onUnsubscribeHandlerId:void 0,onDisconnectHandlerId:void 0};this.clients.set(e.endpointId,t)}}async getConnectedClients(){const e=await this.provider.getAllClientInfo();return Array.from(this.clients.values()).filter((t=>{const{uuid:n,name:i}=t.clientIdentity;return e.some((e=>i===e.name&&n===e.uuid))}))}static init(e,n){return new t(e,n)}},Ui}(),w=G,y=[{id:\"green\",displayMetadata:{color:\"#00CC88\",name:\"green\"}},{id:\"purple\",displayMetadata:{color:\"#8C61FF\",name:\"purple\"}},{id:\"orange\",displayMetadata:{color:\"#FF8C4C\",name:\"orange\"}},{id:\"red\",displayMetadata:{color:\"#FF5E60\",name:\"red\"}},{id:\"pink\",displayMetadata:{color:\"#FF8FB8\",name:\"pink\"}},{id:\"yellow\",displayMetadata:{color:\"#E9FF8F\",name:\"yellow\"}}];let f=class i extends c.Base{constructor(i,s,a){super(i),e.set(this,void 0),t.set(this,void 0),n.set(this,void 0),this.getProvider=()=>o(this,n,\"f\").getValue(),this.interopClients=new Map,this.contextGroupsById=new Map,r(this,t,a.contextGroups??[...y],\"f\"),r(this,e,a.fdc3Info,\"f\"),a?.logging&&(this.logging=a.logging),this.intentClientMap=new Map,this.lastContextMap=new Map,this.sessionContextGroupMap=new Map,r(this,n,new w.Lazy(s),\"f\"),this.setContextGroupMap(),this.setupChannelProvider()}static createClosedConstructor(...e){return class extends i{constructor(...t){if(t.length){const[n,i,r]=t;if(r&&\"object\"==typeof r&&!(0,u.default)(r,e[2]))return console.warn(\"You have modified the parameters of the InteropOverride constructor. This behavior is deprecated and will be removed in a future version. You can modify these options in your manifest. Please consult our Interop docs for guidance on migrating to the new override scheme.\"),void super(e[0],e[1],r);console.warn(\"You are attempting to pass arguments to the InteropOverride constructor. This is not necessary, and these passed arguments will be ignored. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.\")}super(...e)}}}setContext({context:e},t){this.wire.sendAction(\"interop-broker-set-context\").catch((e=>{}));const n=this.getClientState(t);if(!n||!n.contextGroupId)throw n?new Error(\"You must join a context group before you can set context.\"):new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);{const{contextGroupId:t}=n;this.setContextForGroup({context:e},t)}}setContextForGroup({context:e},t){this.wire.sendAction(\"interop-broker-set-context-for-group\").catch((e=>{}));const n=this.contextGroupsById.get(t);if(!n)throw new Error(`Unable to set context for context group that isn't in the context group mapping: ${t}.`);const r=i.checkContextIntegrity(e);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(e)}`);const o=e.type;n.set(o,e),this.lastContextMap.set(t,o);Array.from(this.interopClients.values()).filter((e=>e.contextGroupId===t)).forEach((t=>{for(const[,n]of t.contextHandlers)i.isContextTypeCompatible(o,n.contextType)&&this.invokeContextHandler(t.clientIdentity,n.handlerId,e)}))}getCurrentContext(e,t){this.wire.sendAction(\"interop-broker-get-current-context\").catch((e=>{}));const n=this.getClientState(t);if(!n?.contextGroupId)throw new Error(\"You must be a member of a context group to call getCurrentContext\");const{contextGroupId:i}=n,r=this.contextGroupsById.get(i),o=this.lastContextMap.get(i),s=e?.contextType??o;return r&&s?r.get(s):void 0}async joinContextGroup({contextGroupId:e,target:t},n){if(this.wire.sendAction(\"interop-broker-join-context-group\").catch((e=>{})),this.sessionContextGroupMap.has(e))throw new Error(l.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup);if(t){i.hasEndpointId(t)&&await this.addClientToContextGroup({contextGroupId:e},t);try{const n=this.channel.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name));if(!n.length)throw new Error(`Given Identity ${t.uuid} ${t.name} is not connected to the Interop Broker.`);n.length>1&&console.warn(`More than one connection found for identity ${t.uuid} ${t.name}`);const i=[];for(const t of n)i.push(this.addClientToContextGroup({contextGroupId:e},t));await Promise.all(i)}catch(e){throw new Error(e)}}else await this.addClientToContextGroup({contextGroupId:e},n)}async addClientToContextGroup({contextGroupId:e},t){this.wire.sendAction(\"interop-broker-add-client-to-context-group\").catch((e=>{}));const n=this.getClientState(t);if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(!this.getContextGroups().find((t=>t.id===e)))throw new Error(`Attempting to join a context group that does not exist: ${e}. You may only join existing context groups.`);if(n.contextGroupId!==e){n.contextGroupId=e,await this.setCurrentContextGroupInClientOptions(t,e);const i=this.contextGroupsById.get(e);for(const[,e]of n.contextHandlers){const{contextType:n,handlerId:r}=e;if(void 0===n)i.forEach(((e,n)=>{this.invokeContextHandler(t,r,e)}));else if(i.has(n)){const e=i.get(n);e&&this.invokeContextHandler(t,r,e)}}}}async removeFromContextGroup({target:e},t){if(this.wire.sendAction(\"interop-broker-remove-from-context-group\").catch((e=>{})),e){i.hasEndpointId(e)&&await this.removeClientFromContextGroup(e);try{const t=this.channel.connections.filter((t=>t.uuid===e.uuid&&t.name===e.name));if(!t.length)throw new Error(`No connection found for given Identity ${e.uuid} ${e.name}`);t.length>1&&console.warn(`More than one connection found for identity ${e.uuid} ${e.name}`);const n=[];for(const e of t)n.push(this.removeClientFromContextGroup(e));await Promise.all(n)}catch(e){throw new Error(e)}}else await this.removeClientFromContextGroup(t)}async removeClientFromContextGroup(e){this.wire.sendAction(\"interop-broker-remove-client-from-context-group\").catch((e=>{}));const t=this.getClientState(e);t&&(t.contextGroupId=void 0),await this.setCurrentContextGroupInClientOptions(e,null)}getContextGroups(){return this.wire.sendAction(\"interop-broker-get-context-groups\").catch((e=>{})),o(this,t,\"f\").map((e=>({...e})))}getInfoForContextGroup({contextGroupId:e}){return this.wire.sendAction(\"interop-broker-get-info-for-context-group\").catch((e=>{})),this.getContextGroups().find((t=>t.id===e))}getAllClientsInContextGroup({contextGroupId:e}){this.wire.sendAction(\"interop-broker-get-all-clients-in-context-group\").catch((e=>{}));return Array.from(this.interopClients.values()).filter((t=>t.contextGroupId===e)).map((e=>e.clientIdentity))}async handleFiredIntent(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.raiseIntent\",\"InteropBroker.handleFiredIntent\",t,\"interopClient.fireIntent\");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntent)}async setIntentTarget(e,t){this.wire.sendAction(\"interop-broker-set-intent-target\").catch((e=>{}));const n=this.intentClientMap.get(t.name),i=`intent-handler-${e.name}`;if(n){const t=n.get(i);if(t){if(t.pendingIntents.push(e),t.clientIdentity&&t.isReady){const{clientIdentity:e,pendingIntents:n}=t;try{const r=n[n.length-1];await this.invokeIntentHandler(e,i,r),t.pendingIntents=[]}catch(n){console.error(`Error invoking intent handler for client ${e.uuid}/${e.name}/${e.endpointId}`),t.isReady=!1}}}else n.set(i,{isReady:!1,pendingIntents:[e]})}else{this.intentClientMap.set(t.name,new Map);const n=this.intentClientMap.get(t.name);n&&n.set(i,{isReady:!1,pendingIntents:[e]})}}async handleInfoForIntent(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.findIntent\",\"InteropBroker.handleInfoForIntent\",t,\"interopClient.getInfoForIntent\");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntent)}async handleInfoForIntentsByContext(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.findIntentsByContext\",\"InteropBroker.handleInfoForIntentsByContext\",t,\"interopClient.getInfoForIntentsByContext\");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntentsByContext)}async handleFiredIntentForContext(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.raiseIntentForContext\",\"InteropBroker.handleFiredIntentForContext\",t,\"interopClient.fireIntentForContext\");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntentForContext)}async clientDisconnected(e){}async fdc3HandleOpen({app:e,context:t},n){const i=(0,l.generateOverrideWarning)(\"fdc3.open\",\"InteropBroker.fdc3HandleOpen\",n);throw console.warn(i),new Error(l.BROKER_ERRORS.fdc3Open)}async fdc3HandleFindInstances(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.open\",\"InteropBroker.fdc3HandleFindInstances\",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3FindInstances)}async fdc3HandleGetAppMetadata(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.getAppMetadata\",\"InteropBroker.fdc3HandleGetAppMetadata\",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3GetAppMetadata)}async invokeContextHandler(e,t,n){const i=await this.getProvider();try{await i.dispatch(e,t,n)}catch(i){console.error(`Error invoking context handler ${t} for context type ${n.type} in client ${e.uuid}/${e.name}/${e.endpointId}`,i)}}async invokeIntentHandler(e,t,n){const i=await this.getProvider();await i.dispatch(e,t,n)}async fdc3HandleGetInfo(t,n){const{fdc3Version:i}=t;return{fdc3Version:i,...o(this,e,\"f\"),optionalFeatures:{OriginatingAppMetadata:!1,UserChannelMembershipAPIs:!0},appMetadata:{appId:\"\",instanceId:\"\"}}}async getAllClientInfo(){return(await this.getProvider()).getAllClientInfo()}decorateSnapshot(e){return{...e,interopSnapshotDetails:{contextGroupStates:this.getContextGroupStates()}}}applySnapshot(e,t){const n=e?.interopSnapshotDetails?.contextGroupStates;n&&(t?.closeExistingWindows||this.updateExistingClients(n),this.rehydrateContextGroupStates(n))}updateExistingClients(e){this.interopClients.forEach((t=>{const{clientIdentity:n,contextGroupId:r,contextHandlers:o}=t;if(r){const t=e[r];for(const[,e]of Object.entries(t))o.forEach((t=>{const{handlerId:r,contextType:o}=t;i.isContextTypeCompatible(e.type,o)&&this.invokeContextHandler(n,r,e)}))}}))}getContextGroupStates(){return i.toObject(this.contextGroupsById)}rehydrateContextGroupStates(e){const t=Object.entries(e);for(const[e,n]of t){const t=Object.entries(n);for(const[n,i]of t)if(this.contextGroupsById.has(e)){this.contextGroupsById.get(e).set(n,i)}else console.warn(`Attempting to set a context group that isn't in the context group mapping. Skipping context group rehydration for: ${e}`)}}contextHandlerRegistered({contextType:e,handlerId:t},n){const i={contextType:e,handlerId:t},r=this.getClientState(n);if(r?.contextHandlers.set(t,i),r&&r.contextGroupId){const{contextGroupId:i}=r,o=this.contextGroupsById.get(i);if(void 0===e)o.forEach(((e,i)=>{this.invokeContextHandler(n,t,e)}));else if(o.has(e)){const i=o.get(e);i&&this.invokeContextHandler(n,t,i)}}}async intentHandlerRegistered(e,t){const{handlerId:n}=e,i=this.intentClientMap.get(t.name),r=i?.get(n);if(i)if(r){const{pendingIntents:e}=r;r.clientIdentity=t,r.isReady=!0;try{if(e.length>0){const i=e[e.length-1];await this.invokeIntentHandler(t,n,i),r.pendingIntents=[]}}catch(e){console.error(`Error invoking intent handler: ${n} for client ${t.uuid}/${t.name}/${t.endpointId}`)}}else i.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t});else{this.intentClientMap.set(t.name,new Map);const e=this.intentClientMap.get(t.name);e&&e.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t})}}removeContextHandler({handlerId:e},t){const n=this.getClientState(t);n&&n.contextHandlers.delete(e)}handleJoinSessionContextGroup({sessionContextGroupId:e},t){try{if(!e)throw new Error(\"Failed to join session context group: must specify group id.\");const n=this.sessionContextGroupMap.get(e);if(n)n.registerNewClient(t);else{const n=new h.default(this.channel,e);n.registerNewClient(t),this.sessionContextGroupMap.set(e,n)}return{hasConflict:this.contextGroupsById.has(e)}}catch(e){throw new Error(e)}}getClientState(e){return this.interopClients.get(e.endpointId)}static toObject(e){const t=Object.fromEntries(e),n={};return Object.entries(t).forEach((([e,t])=>{const i=Object.fromEntries(t);n[e]=i})),n}static checkContextIntegrity(e){if(!e)return{isValid:!1,reason:\"No context supplied\"};if(\"object\"!=typeof e)return{isValid:!1,reason:\"Context must be an Object\"};if(!e.type)return{isValid:!1,reason:\"Context must have a type property\"};if(e.id&&\"object\"!=typeof e.id)return{isValid:!1,reason:\"Context id must be an Object populated with key-value identifiers (if set)\"};if(e.id){const{id:t}=e,n=Object.keys(t);let i=!1;if(!n.length)return{isValid:!1,reason:\"Context id must have at least one key-value identifier\"};if(n.forEach((e=>{\"string\"==typeof e&&\"string\"==typeof t[e]||(i=!0)})),i)return{isValid:!1,reason:\"Context id key-value identifiers must be of type string\"}}return e.name&&\"string\"!=typeof e.name?{isValid:!1,reason:\"Context name must be of string type (if set)\"}:{isValid:!0}}static hasEndpointId(e){return void 0!==e.endpointId}static isContextTypeCompatible(e,t){return void 0===t||e===t}setContextGroupMap(){for(const e of this.getContextGroups())this.contextGroupsById.set(e.id,new Map)}async setCurrentContextGroupInClientOptions(e,t){try{const n=await this.fin.System.getEntityInfo(e.uuid,e.name);let i;\"view\"===n.entityType?i=await this.fin.View.wrap(e):\"window\"===n.entityType&&(i=await this.fin.Window.wrap(e)),i&&await i.updateOptions({interop:{currentContextGroup:t}})}catch(e){}}async setupChannelProvider(){try{const e=await this.getProvider();this.channel=e,this.wireChannel(e)}catch(e){throw new Error(`Error setting up Interop Broker Channel Provider: ${e}`)}}wireChannel(e){e.onConnection((async(e,t)=>{if(!await this.isConnectionAuthorized(e,t))throw new Error(`Connection not authorized for ${e.uuid}, ${e.name}`);if(!e.endpointId)throw new Error(\"Version too old to be compatible with Interop. Please upgrade your runtime to a more recent version.\");const n={contextGroupId:void 0,contextHandlers:new Map,clientIdentity:e};t?.currentContextGroup&&this.contextGroupsById.has(t.currentContextGroup)&&(n.contextGroupId=t?.currentContextGroup),this.interopClients.set(e.endpointId,n)})),e.onDisconnection((e=>{this.interopClients.delete(e.endpointId);const t=this.intentClientMap.get(e.name);t&&e.uuid===this.fin.me.uuid&&t.forEach((e=>{e.isReady=!1})),this.sessionContextGroupMap.forEach((t=>{t.onDisconnection(e)})),this.clientDisconnected(e)})),e.beforeAction((async(e,t,n)=>{if(!await this.isActionAuthorized(e,t,n))throw new Error(`Action (${e}) not authorized for ${n.uuid}, ${n.name}`);this.logging?.beforeAction?.enabled&&console.log(e,t,n)})),e.afterAction(((e,t,n)=>{this.logging?.afterAction?.enabled&&console.log(e,t,n)})),e.register(\"setContext\",this.setContext.bind(this)),e.register(\"fireIntent\",this.handleFiredIntent.bind(this)),e.register(\"getCurrentContext\",this.getCurrentContext.bind(this)),e.register(\"getInfoForIntent\",this.handleInfoForIntent.bind(this)),e.register(\"getInfoForIntentsByContext\",this.handleInfoForIntentsByContext.bind(this)),e.register(\"fireIntentForContext\",this.handleFiredIntentForContext.bind(this)),e.register(\"getContextGroups\",this.getContextGroups.bind(this)),e.register(\"joinContextGroup\",this.joinContextGroup.bind(this)),e.register(\"removeFromContextGroup\",this.removeFromContextGroup.bind(this)),e.register(\"getAllClientsInContextGroup\",this.getAllClientsInContextGroup.bind(this)),e.register(\"getInfoForContextGroup\",this.getInfoForContextGroup.bind(this)),e.register(\"contextHandlerRegistered\",this.contextHandlerRegistered.bind(this)),e.register(\"intentHandlerRegistered\",this.intentHandlerRegistered.bind(this)),e.register(\"removeContextHandler\",this.removeContextHandler.bind(this)),e.register(\"sessionContextGroup:createIfNeeded\",this.handleJoinSessionContextGroup.bind(this)),e.register(\"fdc3Open\",this.fdc3HandleOpen.bind(this)),e.register(\"fdc3v2FindIntentsByContext\",this.handleInfoForIntentsByContext.bind(this)),e.register(\"fdc3FindInstances\",this.fdc3HandleFindInstances.bind(this)),e.register(\"fdc3GetAppMetadata\",this.fdc3HandleGetAppMetadata.bind(this)),e.register(\"fdc3v2GetInfo\",(async(e,t)=>this.fdc3HandleGetInfo.bind(this)(e,t))),e.register(\"createPrivateChannelProvider\",(async e=>{const{channelId:t}=e,n=await this.fin.InterApplicationBus.Channel.create(t);p.PrivateChannelProvider.init(n,t)}))}isConnectionAuthorized(e,t){return this.wire.sendAction(\"interop-broker-is-connection-authorized\").catch((e=>{})),Promise.resolve(!0)}isActionAuthorized(e,t,n){return this.wire.sendAction(\"interop-broker-is-action-authorized\").catch((e=>{})),Promise.resolve(!0)}};return Gi.InteropBroker=f,e=new WeakMap,t=new WeakMap,n=new WeakMap,Gi}var zi,Ki={},qi={},Ji=s&&s.__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},Yi=s&&s.__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)};Object.defineProperty(qi,\"__esModule\",{value:!0});const Zi=d,Qi=Hi;class Xi extends Zi.Base{constructor(e,t,n){super(e),zi.set(this,void 0),this.id=n,Ji(this,zi,t,\"f\")}async setContext(e){this.wire.sendAction(\"interop-session-context-group-set-context\").catch((e=>{}));return(await Yi(this,zi,\"f\")).dispatch(`sessionContextGroup:setContext-${this.id}`,{sessionContextGroupId:this.id,context:e})}async getCurrentContext(e){this.wire.sendAction(\"interop-session-context-group-get-context\").catch((e=>{}));return(await Yi(this,zi,\"f\")).dispatch(`sessionContextGroup:getContext-${this.id}`,{sessionContextGroupId:this.id,type:e})}async addContextHandler(e,t){if(this.wire.sendAction(\"interop-session-context-group-add-handler\").catch((e=>{})),\"function\"!=typeof e)throw new Error(\"Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.\");const n=await Yi(this,zi,\"f\");let i;return i=t?`sessionContextHandler:invoke-${this.id}-${t}-${(0,Qi.generateId)()}`:`sessionContextHandler:invoke-${this.id}`,n.register(i,(0,Qi.wrapContextHandler)(e,i)),await n.dispatch(`sessionContextGroup:handlerAdded-${this.id}`,{handlerId:i,contextType:t}),{unsubscribe:await this.createUnsubscribeCb(i)}}async createUnsubscribeCb(e){const t=await Yi(this,zi,\"f\");return async()=>{t.remove(e),await t.dispatch(`sessionContextGroup:handlerRemoved-${this.id}`,{handlerId:e})}}getUserInstance(){return{id:this.id,setContext:(0,Qi.wrapInTryCatch)(this.setContext.bind(this),\"Failed to set context: \"),getCurrentContext:(0,Qi.wrapInTryCatch)(this.getCurrentContext.bind(this),\"Failed to get context: \"),addContextHandler:(0,Qi.wrapInTryCatch)(this.addContextHandler.bind(this),\"Failed to add context handler: \")}}}qi.default=Xi,zi=new WeakMap;var er={},tr={},nr={},ir={},rr=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),or=s&&s.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,\"default\",{enumerable:!0,value:t})}:function(e,t){e.default=t}),sr=s&&s.__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)&&rr(t,e,n);return or(t,e),t};Object.defineProperty(ir,\"__esModule\",{value:!0}),ir.PrivateChannelClient=void 0;const ar=sr(Hi);var cr,dr;function hr(){if(cr)return tr;cr=1;var e,t=s&&s.__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)},n=s&&s.__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},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(tr,\"__esModule\",{value:!0}),tr.FDC3ModuleBase=void 0;const o=nr,a=Hi,c=wr(),d=r(i);return tr.FDC3ModuleBase=class{get client(){return t(this,e,\"f\").call(this)}get fin(){return this.wire.getFin()}constructor(t,i){this.wire=i,e.set(this,void 0),n(this,e,t,\"f\")}async broadcast(e){return this.wire.sendAction(\"fdc3-broadcast\").catch((e=>{})),this.client.setContext(e)}async _open(e,t){this.wire.sendAction(\"fdc3-open\").catch((e=>{}));try{return await c.InteropClient.ferryFdc3Call(this.client,\"fdc3Open\",{app:e,context:t})}catch(e){const t=e.message===a.BROKER_ERRORS.fdc3Open?\"ResolverUnavailable\":e.message;throw new Error(t)}}async _getChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:\"system\",...(0,o.getUnsupportedChannelApis)()})))}async getOrCreateChannel(e){this.wire.sendAction(\"fdc3-get-or-create-channel\").catch((e=>{}));const t=(await this._getChannels()).find((t=>t.id===e));if(t)return{...t,type:\"system\",...(0,o.getUnsupportedChannelApis)()};try{const t=await this.client.joinSessionContextGroup(e);return(0,o.buildAppChannelObject)(t)}catch(e){throw console.error(e.message),new Error(o.ChannelError.CreationFailed)}}async getSystemChannels(){return this.wire.sendAction(\"fdc3-get-system-channels\").catch((e=>{})),this._getChannels()}async joinChannel(e){this.wire.sendAction(\"fdc3-join-channel\").catch((e=>{}));try{return await this.client.joinContextGroup(e)}catch(e){if(e.message===a.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup?console.error(\"The Channel you have tried to join is an App Channel. Custom Channels can only be defined by the Interop Broker through code or manifest configuration. Please use getOrCreateChannel.\"):console.error(e.message),e.message.startsWith(\"Attempting to join a context group that does not exist\"))throw new Error(o.ChannelError.NoChannelFound);throw new Error(o.ChannelError.AccessDenied)}}async getCurrentChannel(){this.wire.sendAction(\"fdc3-get-current-channel\").catch((e=>{}));const e=await this.getCurrentContextGroupInfo();return e?this.buildChannelObject(e):null}async leaveCurrentChannel(){return this.wire.sendAction(\"fdc3-leave-current-channel\").catch((e=>{})),this.client.removeFromContextGroup()}async getCurrentContextGroupInfo(){const e=await this.client.getContextGroups(),t=e.map((async e=>this.client.getAllClientsInContextGroup(e.id))),n=(await Promise.all(t)).findIndex((e=>e.some((e=>{const{uuid:t,name:n}=e;return this.wire.me.uuid===t&&this.wire.me.name===n}))));return e[n]}async buildChannelObject(e){return{...e,type:\"system\",addContextListener:(...[e,t])=>{let n,i;\"function\"==typeof e?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),n=e):(n=t,\"string\"==typeof e&&(i=e));const r=(async()=>{let e=!0;const t=await this.client.getCurrentContext(i);return this.client.addContextHandler(((i,r)=>{if(!e||(e=!1,!(0,d.default)(t,i)))return n(i,r)}),i)})();return{...r,unsubscribe:()=>r.then((e=>e.unsubscribe()))}},broadcast:this.broadcast.bind(this),getCurrentContext:async e=>{const t=await this.client.getCurrentContext(e);return void 0===t?null:t}}}},e=new WeakMap,tr}ir.PrivateChannelClient=class{constructor(e,t){this.id=t,this.client=e,this.listeners=new Map}async broadcast(e){return this.client.dispatch(\"broadcast\",{context:e})}async getCurrentContext(e){return this.client.dispatch(\"getCurrentContext\",{contextType:e})}async addContextListener(e,t){if(\"function\"!=typeof t)throw new Error(\"Non-function argument passed to the second parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.\");let n;n=e?`contextHandler:invoke-${this.id}-${e}-${ar.generateId()}`:`contextHandler:invoke-${this.id}-${ar.generateId()}`,this.client.register(n,ar.wrapContextHandler(t,n));const i={unsubscribe:await this.createContextUnsubscribeCb(n)};return this.listeners.set(n,i),await this.client.dispatch(\"contextHandlerAdded\",{handlerId:n,contextType:e}),i}createNonStandardUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch(\"nonStandardHandlerRemoved\",{handlerId:e})}}createContextUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch(\"contextHandlerRemoved\",{handlerId:e})}}onAddContextListener(e){const t=`onContextHandlerAdded:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch(\"onAddContextHandlerAdded\",{handlerId:t}),n}onDisconnect(e){const t=`onDisconnect:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch(\"onDisconnectHandlerAdded\",{handlerId:t}),n}onUnsubscribe(e){const t=`onUnsubscribe:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch(\"onUnsubscribeHandlerAdded\",{handlerId:t}),n}async cleanUpAllSubs(){Array.from(this.listeners.keys()).forEach((e=>{this.client.remove(e),this.listeners.delete(e)}))}async disconnect(){try{await this.client.dispatch(\"clientDisconnecting\"),await this.cleanUpAllSubs(),await this.client.disconnect()}catch(e){throw new Error(e.message)}}},function(e){var t=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,\"__esModule\",{value:!0}),e.getIntentResolution=e.isChannel=e.isContext=e.connectPrivateChannel=e.buildAppChannelObject=e.buildPrivateChannelObject=e.ChannelError=e.ResultError=e.UnsupportedChannelApiError=e.getUnsupportedChannelApis=void 0;const n=Hi,r=ir,o=t(i);e.getUnsupportedChannelApis=e=>({addContextListener:()=>{throw new a(\"Channel.addContextListener\",e)},broadcast:()=>{throw new a(\"Channel.broadcast\",e)},getCurrentContext:()=>{throw new a(\"Channel.getCurrentContext\",e)}});class a extends Error{constructor(e,t=\"System\"){super(e),this.message=`Calling ${e} on an instance of a ${t} Channel returned by fdc3.get${t}Channels is not supported. If you would like to use a ${t} Channel, please use fdc3.joinChannel, fdc3.addContextListener, and fdc3.broadcast instead.`}}var c,d;e.UnsupportedChannelApiError=a,function(e){e.NoResultReturned=\"NoResultReturned\",e.IntentHandlerRejected=\"IntentHandlerRejected\"}(c=e.ResultError||(e.ResultError={})),(d=e.ChannelError||(e.ChannelError={})).NoChannelFound=\"NoChannelFound\",d.AccessDenied=\"AccessDenied\",d.CreationFailed=\"CreationFailed\";e.buildPrivateChannelObject=e=>{let t=!1;const n=()=>{if(t)throw new Error(\"Private Channel Client has been disconnected from the Private Channel\")};return{id:e.id,type:\"private\",broadcast:async t=>(n(),e.broadcast(t)),getCurrentContext:async t=>(n(),e.getCurrentContext(t)),addContextListener:async(t,i)=>{n();let r=i,o=t;\"function\"==typeof t&&(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),r=t,o=null);return e.addContextListener(o,r)},onAddContextListener:t=>(n(),e.onAddContextListener(t)),disconnect:async()=>(n(),t=!0,e.disconnect()),onDisconnect:t=>(n(),e.onDisconnect(t)),onUnsubscribe:t=>(n(),e.onUnsubscribe(t))}};e.buildAppChannelObject=e=>({id:e.id,type:\"app\",broadcast:e.setContext,getCurrentContext:async t=>{const n=await e.getCurrentContext(t);return void 0===n?null:n},addContextListener:(t,n)=>{let i,r;\"function\"==typeof t?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),i=t):(i=n,\"string\"==typeof t&&(r=t));const s=(async()=>{let t=!0;const n=await e.getCurrentContext(r);return e.addContextHandler(((e,r)=>{if(!t||(t=!1,!(0,o.default)(n,e)))return i(e,r)}),r)})();return{...s,unsubscribe:()=>s.then((e=>e.unsubscribe()))}}});e.connectPrivateChannel=async t=>{try{const n=await fin.InterApplicationBus.Channel.connect(t),i=new r.PrivateChannelClient(n,t);return(0,e.buildPrivateChannelObject)(i)}catch(e){throw new Error(`Private Channel with id: ${t} doesn't exist`)}};e.isContext=e=>{if(e&&\"object\"==typeof e&&\"type\"in e){const{type:t}=e;return\"string\"==typeof t}return!1};e.isChannel=e=>{if(e&&\"object\"==typeof e&&\"type\"in e&&\"id\"in e){const{type:t,id:n}=e;return\"string\"==typeof t&&\"string\"==typeof n&&(\"app\"===t||\"private\"===t)}return!1};e.getIntentResolution=async(t,i,r,o)=>{const s=(0,n.generateId)(),a=new Promise(((e,t)=>{fin.InterApplicationBus.subscribe({uuid:\"*\"},s,(t=>{e(t)})).catch((()=>t(new Error(\"getResult is not supported in this environment\"))))})),d=r?{target:r,intentResolutionResultId:s}:{intentResolutionResultId:s},h=o?{name:o,context:i,metadata:d}:{...i,metadata:d},l=async()=>{let n=await a;if(!n||\"object\"!=typeof n)throw new Error(c.NoResultReturned);const{error:i}=n;if(i)throw new Error(c.IntentHandlerRejected);if((0,e.isChannel)(n)){const{id:i,type:r}=n;switch(r){case\"private\":n=await(0,e.connectPrivateChannel)(i);break;case\"app\":{const r=await t.joinSessionContextGroup(i);n=(0,e.buildAppChannelObject)(r);break}}}else if(!(0,e.isContext)(n))throw new Error(c.NoResultReturned);return n},u=o?await t.fireIntent(h):await t.fireIntentForContext(h);return\"object\"!=typeof u?{source:{appId:\"\",instanceId:\"\"},intent:\"\",version:\"2.0\",getResult:l}:{...u,getResult:l}}}(nr);var lr,ur,pr={};function wr(){if(ur)return Ki;ur=1;var e,t,n=s&&s.__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},i=s&&s.__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)},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ki,\"__esModule\",{value:!0}),Ki.InteropClient=void 0;const o=d,a=r(qi),c=function(){if(dr)return er;dr=1,Object.defineProperty(er,\"__esModule\",{value:!0}),er.Fdc3Module=void 0;const e=Hi,t=hr();class n extends t.FDC3ModuleBase{async open(e,t){await super._open(e,t)}addContextListener(e,t){let n;return this.wire.sendAction(\"fdc3-add-context-listener\").catch((e=>{})),\"function\"==typeof e?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),n=this.client.addContextHandler(e)):n=this.client.addContextHandler(t,null===e?void 0:e),{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}addIntentListener(e,t){this.wire.sendAction(\"fdc3-add-intent-listener\").catch((e=>{}));const n=this.client.registerIntentHandler((e=>{const{context:n,metadata:i}=e,{metadata:r}=n,o=i?.intentResolutionResultId||r?.intentResolutionResultId;o&&this.fin.InterApplicationBus.publish(o,null).catch((()=>null)),t(e.context)}),e,{fdc3Version:\"1.2\"});return{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}async raiseIntent(t,n,i){this.wire.sendAction(\"fdc3-raise-intent\").catch((e=>{}));const r=i?{name:t,context:n,metadata:{target:i}}:{name:t,context:n};try{return await this.client.fireIntent(r)}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntent?\"ResolverUnavailable\":t.message;throw new Error(n)}}async findIntent(t,n){this.wire.sendAction(\"fdc3-find-intent\").catch((e=>{}));try{return await this.client.getInfoForIntent({name:t,context:n})}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntent?\"ResolverUnavailable\":t.message;throw new Error(n)}}async findIntentsByContext(t){this.wire.sendAction(\"fdc3-find-intents-by-context\").catch((e=>{}));try{return await this.client.getInfoForIntentsByContext(t)}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntentsByContext?\"ResolverUnavailable\":t.message;throw new Error(n)}}async raiseIntentForContext(t,n){this.wire.sendAction(\"fdc3-raise-intent-for-context\").catch((e=>{}));try{return await this.client.fireIntentForContext({...t,metadata:{target:n}})}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntentForContext?\"ResolverUnavailable\":t.message;throw new Error(n)}}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}getInfo(){return this.wire.sendAction(\"fdc3-get-info\").catch((e=>{})),{providerVersion:this.wire.environment.getAdapterVersionSync(),provider:`openfin-${this.wire.me.uuid}`,fdc3Version:\"1.2\"}}}return er.Fdc3Module=n,er}(),h=function(){if(lr)return pr;lr=1,Object.defineProperty(pr,\"__esModule\",{value:!0}),pr.Fdc3Module2=void 0;const e=hr(),t=Hi,n=wr(),i=nr,r=ir;class o extends e.FDC3ModuleBase{async open(e,t){return\"string\"==typeof e&&console.warn(\"Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).\"),super._open(e,t)}async findInstances(e){this.wire.sendAction(\"fdc3-find-instances\").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,\"fdc3FindInstances\",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3FindInstances?\"ResolverUnavailable\":e.message;throw new Error(n)}}async getAppMetadata(e){this.wire.sendAction(\"fdc3-get-app-metadata\").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,\"fdc3GetAppMetadata\",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3GetAppMetadata?\"ResolverUnavailable\":e.message;throw new Error(n)}}async addContextListener(e,t){this.wire.sendAction(\"fdc3-add-context-listener\").catch((e=>{}));const n=e=>t=>{const{contextMetadata:n,...i}=t,r=n?[{...i},n]:[t,null];e(...r)};let i=t,r=n(i);return\"function\"==typeof e?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),i=e,r=n(i),this.client.addContextHandler(r)):this.client.addContextHandler(r,null===e?void 0:e)}async findIntent(e,n,i){this.wire.sendAction(\"fdc3-find-intent\").catch((e=>{}));try{return await this.client.getInfoForIntent({name:e,context:n,metadata:{resultType:i}})}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntent?\"ResolverUnavailable\":e.message;throw new Error(n)}}async findIntentsByContext(e,i){this.wire.sendAction(\"fdc3-find-intents-by-context\").catch((e=>{}));const r=i?{context:e,metadata:{resultType:i}}:e;try{return await n.InteropClient.ferryFdc3Call(this.client,\"fdc3v2FindIntentsByContext\",r)}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntentsByContext?\"ResolverUnavailable\":e.message;throw new Error(n)}}async raiseIntent(e,n,r){this.wire.sendAction(\"fdc3-raise-intent\").catch((e=>{}));try{return\"string\"==typeof r&&console.warn(\"Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).\"),(0,i.getIntentResolution)(this.client,n,r,e)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?\"ResolverUnavailable\":e.message;throw new Error(n)}}async raiseIntentForContext(e,n){this.wire.sendAction(\"fdc3-raise-intent-for-context\").catch((e=>{}));try{return\"string\"==typeof n&&console.warn(\"Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).\"),(0,i.getIntentResolution)(this.client,e,n)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?\"ResolverUnavailable\":e.message;throw new Error(n)}}async addIntentListener(e,t){if(this.wire.sendAction(\"fdc3-add-intent-listener\").catch((e=>{})),\"string\"!=typeof e)throw new Error(\"First argument must be an Intent name\");return this.client.registerIntentHandler((async e=>{let n,i;const{context:r,metadata:o}=e,{contextMetadata:s,metadata:a,...c}=r,d=o?.intentResolutionResultId||a?.intentResolutionResultId;try{const e=a?{metadata:a,...c}:{...c};n=await t(e,s),i=n}catch(e){n=e,i={error:!0}}if(d&&this.fin.InterApplicationBus.publish(d,i).catch((()=>null)),n instanceof Error)throw new Error(n.message);return n}),e,{fdc3Version:\"2.0\"})}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}async createPrivateChannel(){const e=(0,t.generateId)();await n.InteropClient.ferryFdc3Call(this.client,\"createPrivateChannelProvider\",{channelId:e});const o=await this.fin.InterApplicationBus.Channel.connect(e),s=new r.PrivateChannelClient(o,e);return(0,i.buildPrivateChannelObject)(s)}async getUserChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:\"user\",...(0,i.getUnsupportedChannelApis)(\"User\")})))}async getSystemChannels(){return console.warn(\"This API has been deprecated. Please use fdc3.getUserChannels instead.\"),super.getSystemChannels()}async joinUserChannel(e){return super.joinChannel(e)}async joinChannel(e){return console.warn(\"This API has been deprecated. Please use fdc3.joinUserChannel instead.\"),super.joinChannel(e)}async getCurrentChannel(){const e=await super.getCurrentChannel();return e?{...e,type:\"user\",broadcast:this.broadcast.bind(this)}:null}async getInfo(){return n.InteropClient.ferryFdc3Call(this.client,\"fdc3v2GetInfo\",{fdc3Version:\"2.0\"})}}return pr.Fdc3Module2=o,pr}(),l=Hi;let u=class extends o.Base{constructor(i,r){super(i),e.set(this,void 0),t.set(this,void 0),n(this,t,new Map,\"f\"),n(this,e,r,\"f\")}async setContext(t){this.wire.sendAction(\"interop-client-set-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"setContext\",{context:t})}async addContextHandler(t,n){if(this.wire.sendAction(\"interop-client-add-context-handler\").catch((e=>{})),\"function\"!=typeof t)throw new Error(\"Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.\");const r=await i(this,e,\"f\");let o;o=n?`invokeContextHandler-${n}-${(0,l.generateId)()}`:\"invokeContextHandler\";const s=(0,l.wrapContextHandler)(t,o);return r.register(o,s),await r.dispatch(\"contextHandlerRegistered\",{handlerId:o,contextType:n}),{unsubscribe:async()=>{r.remove(o),await r.dispatch(\"removeContextHandler\",{handlerId:o})}}}async getContextGroups(){this.wire.sendAction(\"interop-client-get-context-groups\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getContextGroups\")}async joinContextGroup(t,n){this.wire.sendAction(\"interop-client-join-context-group\").catch((e=>{}));const r=await i(this,e,\"f\");if(!t)throw new Error(\"No contextGroupId specified for joinContextGroup.\");return r.dispatch(\"joinContextGroup\",{contextGroupId:t,target:n})}async removeFromContextGroup(t){this.wire.sendAction(\"interop-client-remove-from-context-group\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"removeFromContextGroup\",{target:t})}async getAllClientsInContextGroup(t){this.wire.sendAction(\"interop-client-get-all-clients-in-context-group\").catch((e=>{}));const n=await i(this,e,\"f\");if(!t)throw new Error(\"No contextGroupId specified for getAllClientsInContextGroup.\");return n.dispatch(\"getAllClientsInContextGroup\",{contextGroupId:t})}async getInfoForContextGroup(t){this.wire.sendAction(\"interop-client-get-info-for-context-group\").catch((e=>{}));const n=await i(this,e,\"f\");if(!t)throw new Error(\"No contextGroupId specified for getInfoForContextGroup.\");return n.dispatch(\"getInfoForContextGroup\",{contextGroupId:t})}async fireIntent(t){this.wire.sendAction(\"interop-client-fire-intent\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"fireIntent\",t)}async registerIntentHandler(t,n,r){this.wire.sendAction(\"interop-client-register-intent-handler\").catch((e=>{}));const o=await i(this,e,\"f\"),s=`intent-handler-${n}`,a=(0,l.wrapIntentHandler)(t,s);try{await o.register(s,a),await o.dispatch(\"intentHandlerRegistered\",{handlerId:s,...r})}catch(e){throw new Error(\"Unable to register intent handler\")}return{unsubscribe:async()=>{o.remove(s)}}}async getCurrentContext(t){this.wire.sendAction(\"interop-client-get-current-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getCurrentContext\",{contextType:t})}async getInfoForIntent(t){this.wire.sendAction(\"interop-client-get-info-for-intent\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getInfoForIntent\",t)}async getInfoForIntentsByContext(t){this.wire.sendAction(\"interop-client-get-info-for-intents-by-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getInfoForIntentsByContext\",t)}async fireIntentForContext(t){this.wire.sendAction(\"interop-client-fire-intent-for-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"fireIntentForContext\",t)}async joinSessionContextGroup(n){try{const r=i(this,t,\"f\").get(n);if(r)return r.getUserInstance();const o=await i(this,e,\"f\"),{hasConflict:s}=await o.dispatch(\"sessionContextGroup:createIfNeeded\",{sessionContextGroupId:n});s&&console.warn(`A (non-session) context group with the name \"${n}\" already exists. If you are trying to join a Context Group, call joinContextGroup instead.`);const c=new a.default(this.wire,i(this,e,\"f\"),n);return i(this,t,\"f\").set(n,c),c.getUserInstance()}catch(e){throw console.error(`Error thrown trying to create Session Context Group with id \"${n}\": ${e}`),e}}async onDisconnection(t){this.wire.sendAction(\"interop-client-add-ondisconnection-listener\").catch((e=>{}));return(await i(this,e,\"f\")).onDisconnection((e=>{const{uuid:n}=e;t({type:\"interop-broker\",topic:\"disconnected\",brokerName:n})}))}getFDC3Sync(e){switch(e){case\"1.2\":return new c.Fdc3Module((()=>this),this.wire);case\"2.0\":return new h.Fdc3Module2((()=>this),this.wire);default:throw new Error(`Invalid FDC3 version provided: ${e}. Must be '1.2' or '2.0'`)}}async getFDC3(e){return this.getFDC3Sync(e)}static async ferryFdc3Call(t,n,r){return(await i(t,e,\"f\")).dispatch(n,r||null)}};return Ki.InteropClient=u,e=new WeakMap,t=new WeakMap,Ki}var yr,fr,gr,mr={};function vr(){if(yr)return mr;yr=1,Object.defineProperty(mr,\"__esModule\",{value:!0}),mr.overrideCheck=mr.checkFDC32Overrides=mr.getDefaultViewFdc3VersionFromAppInfo=void 0;const e=Vi();function t(t){return[\"fdc3HandleFindInstances\",\"handleInfoForIntent\",\"handleInfoForIntentsByContext\",\"fdc3HandleGetAppMetadata\",\"fdc3HandleGetInfo\",\"fdc3HandleOpen\",\"handleFiredIntent\",\"handleFiredIntentForContext\"].filter((n=>t[n]===e.InteropBroker.prototype[n]))}return mr.getDefaultViewFdc3VersionFromAppInfo=function({manifest:e,initialOptions:t}){const n=e?.platform?.defaultViewOptions?.fdc3InteropApi??t.defaultViewOptions?.fdc3InteropApi;return[\"1.2\",\"2.0\"].includes(n??\"\")?n:void 0},mr.checkFDC32Overrides=t,mr.overrideCheck=function(e,n){if(n&&\"2.0\"===n){const n=t(e);n.length>0&&console.warn(`WARNING: FDC3 2.0 has been set as a default option for Views in this Platform, but the required InteropBroker APIs for FDC3 2.0 compliance have not all been overridden.\\nThe following APIs need to be overridden:\\n${n.join(\"\\n\")}`)}},mr}function Cr(){return gr||(gr=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),i=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),i(function(){if(fr)return Ti;fr=1;var e=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ti,\"__esModule\",{value:!0}),Ti.InteropModule=void 0;const t=e(n),i=$i,r=d,o=Vi(),a=wr(),c=vr(),h=Tn,l=e=>new e,u=\"You have attempted to use or modify InteropBroker parameters, which is not allowed. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.\";class p extends r.Base{async init(e,n=l){this.wire.sendAction(\"interop-init\").catch((()=>{}));const r=await this.wire.environment.getInteropInfo(this.wire.getFin()),s=(0,i.createUnusableObject)(u),a=(0,i.createWarningObject)(u,(0,t.default)(r)),d=async()=>{throw new Error(u)},p=o.InteropBroker.createClosedConstructor(this.wire,(()=>this.fin.InterApplicationBus.Channel.create(`interop-broker-${e}`)),r);let w;return w=Array.isArray(n)?new((0,h.overrideFromComposables)(...n)(p))(s,d,a):await n(p,s,d,a),(0,c.overrideCheck)(w,r.fdc3Version),w}connectSync(e,t){return this.wire.sendAction(\"interop-connect-sync\").catch((()=>{})),new a.InteropClient(this.wire,this.wire.environment.whenReady().then((()=>this.fin.InterApplicationBus.Channel.connect(`interop-broker-${e}`,{payload:t}))))}}return Ti.InteropModule=p,Ti}(),e),i(wr(),e),i(Vi(),e)}(Li)),Li}var br={},Ir={},Er={},xr={};Object.defineProperty(xr,\"__esModule\",{value:!0}),xr.getSnapshotSourceChannelName=void 0;xr.getSnapshotSourceChannelName=e=>`snapshot-source-provider-${e.uuid}`;var Ar,Pr,Mr,_r,Or,Sr=s&&s.__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},Rr=s&&s.__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)};Object.defineProperty(Er,\"__esModule\",{value:!0}),Er.SnapshotSource=void 0;const Fr=d,jr=xr,kr=new Map;class Lr extends Fr.Base{constructor(e,t){super(e),Ar.set(this,void 0),Pr.set(this,(()=>(kr.has(this.identity.uuid)||kr.set(this.identity.uuid,{eventFired:null,clientPromise:null}),kr.get(this.identity.uuid)))),Mr.set(this,(()=>(Rr(this,Pr,\"f\").call(this).clientPromise||(Rr(this,Pr,\"f\").call(this).clientPromise=Rr(this,_r,\"f\").call(this)),Rr(this,Pr,\"f\").call(this).clientPromise))),_r.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);try{Rr(this,Pr,\"f\").call(this).eventFired||await Rr(this,Or,\"f\").call(this);const t=await this.fin.InterApplicationBus.Channel.connect(e,{wait:!1});return t.onDisconnection((()=>{Rr(this,Pr,\"f\").call(this).clientPromise=null,Rr(this,Pr,\"f\").call(this).eventFired=null})),t}catch(e){throw Rr(this,Pr,\"f\").call(this).clientPromise=null,new Error(\"The targeted SnapshotSource is not currently initialized. Await this object's ready() method.\")}})),Or.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);let t,n;const i=new Promise(((e,i)=>{t=e,n=i}));Rr(this,Pr,\"f\").call(this).eventFired=i;const r=async i=>{try{i.channelName===e&&(t(),await this.fin.InterApplicationBus.Channel.removeListener(\"connected\",r))}catch(e){n(e)}};await this.fin.InterApplicationBus.Channel.on(\"connected\",r)})),Sr(this,Ar,t,\"f\")}get identity(){return Rr(this,Ar,\"f\")}async ready(){this.wire.sendAction(\"snapshot-source-ready\").catch((e=>{}));try{await Rr(this,Mr,\"f\").call(this)}catch(e){await Rr(this,Pr,\"f\").call(this).eventFired}}async getSnapshot(){this.wire.sendAction(\"snapshot-source-get-snapshot\").catch((e=>{}));const e=await Rr(this,Mr,\"f\").call(this),t=await e.dispatch(\"get-snapshot\");return(await t).snapshot}async applySnapshot(e){this.wire.sendAction(\"snapshot-source-apply-snapshot\").catch((e=>{}));return(await Rr(this,Mr,\"f\").call(this)).dispatch(\"apply-snapshot\",{snapshot:e})}}Er.SnapshotSource=Lr,Ar=new WeakMap,Pr=new WeakMap,Mr=new WeakMap,_r=new WeakMap,Or=new WeakMap,Object.defineProperty(Ir,\"__esModule\",{value:!0}),Ir.SnapshotSourceModule=void 0;const Tr=d,$r=Er,Br=xr;class Gr extends Tr.Base{async init(e){if(this.wire.sendAction(\"snapshot-source-init\").catch((e=>{})),\"object\"!=typeof e||\"function\"!=typeof e.getSnapshot||\"function\"!=typeof e.applySnapshot)throw new Error(\"you must pass in a valid SnapshotProvider\");const t=await this.fin.InterApplicationBus.Channel.create((0,Br.getSnapshotSourceChannelName)(this.fin.me));t.register(\"get-snapshot\",(async()=>({snapshot:await e.getSnapshot()}))),t.register(\"apply-snapshot\",(({snapshot:t})=>e.applySnapshot(t)))}wrapSync(e){return this.wire.sendAction(\"snapshot-source-wrap-sync\").catch((e=>{})),new $r.SnapshotSource(this.wire,e)}async wrap(e){return this.wire.sendAction(\"snapshot-source-wrap\").catch((e=>{})),this.wrapSync(e)}}Ir.SnapshotSourceModule=Gr,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Ir,e),n(Er,e)}(br),Object.defineProperty(a,\"__esModule\",{value:!0});var Wr=a.Fin=void 0;const Hr=t,Nr=c,Dr=ie(),Ur=Z(),Vr=de,zr=en,Kr=rn,qr=un,Jr=bn,Yr=J(),Zr=An,Qr=ki,Xr=Cr(),eo=br;class to extends Hr.EventEmitter{constructor(e){super(),this.wire=e,this.System=new Nr.System(e),this.Window=new Dr._WindowModule(e),this.Application=new Ur.ApplicationModule(e),this.InterApplicationBus=new Vr.InterApplicationBus(e),this.Clipboard=new zr.Clipboard(e),this.ExternalApplication=new Kr.ExternalApplicationModule(e),this.Frame=new qr._FrameModule(e),this.GlobalHotkey=new Jr.GlobalHotkey(e),this.Platform=new Zr.PlatformModule(e,this.InterApplicationBus.Channel),this.View=new Yr.ViewModule(e),this.Interop=new Xr.InteropModule(e),this.SnapshotSource=new eo.SnapshotSourceModule(e),e.registerFin(this),this.me=(0,Qr.getMe)(e),e.on(\"disconnected\",(()=>{this.emit(\"disconnected\")}))}}Wr=a.Fin=to;var no={},io={};function ro(e){return\"string\"==typeof e.manifestUrl}function oo(e){return ao(e)&&\"string\"==typeof e.address}function so(e){return oo(e)&&\"string\"==typeof e.token}function ao(e){return\"string\"==typeof e.uuid}function co(e){return e.runtime&&\"string\"==typeof e.runtime.version}function ho(e){return ao(e)&&co(e)}Object.defineProperty(io,\"__esModule\",{value:!0}),io.isInternalConnectConfig=io.isPortDiscoveryConfig=io.isNewConnectConfig=io.isConfigWithReceiver=io.isRemoteConfig=io.isExistingConnectConfig=io.isExternalConfig=void 0,io.isExternalConfig=ro,io.isExistingConnectConfig=oo,io.isRemoteConfig=so,io.isConfigWithReceiver=function(e){return\"object\"==typeof e.receiver&&so({...e,address:\"\"})},io.isNewConnectConfig=ho,io.isPortDiscoveryConfig=function(e){return ro(e)&&co(e)||ho(e)},io.isInternalConnectConfig=function(e){return oo(e)||ho(e)};var lo={},uo={};Object.defineProperty(uo,\"__esModule\",{value:!0}),uo.EmitterMap=void 0;const po=t;function wo(e){return Buffer.from(e).toString(\"base64\")}uo.EmitterMap=class{constructor(){this.storage=new Map}hashKeys(e){return e.map(wo).join(\"/\")}getOrCreate(e){const t=this.hashKeys(e);return this.storage.has(t)||this.storage.set(t,new po.EventEmitter),this.storage.get(t)}has(e){return this.storage.has(this.hashKeys(e))}delete(e){const t=this.hashKeys(e);return this.storage.delete(t)}},Object.defineProperty(lo,\"__esModule\",{value:!0});const yo=uo;class fo extends yo.EmitterMap{constructor(){super(...arguments),this.dispatchEvent=e=>{if(function(e){return\"process-desktop-event\"===e.action}(e)){const{payload:t}=e,n=function(e){const{topic:t}=e;if(\"frame\"===t||\"window\"===t||\"view\"===t){const{uuid:n,name:i}=e;return[t,n,i]}if(\"application\"===t){const{uuid:n}=e;return[t,n]}return[t]}(t);if(this.has(n))return this.getOrCreate(n).emit(t.type,t),!0}return!1}}}lo.default=fo;var go,mo,vo=s&&s.__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},Co=s&&s.__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)},bo=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(no,\"__esModule\",{value:!0});var Io=no.Transport=void 0;const Eo=t,xo=io,Ao=g,Po=bo(lo),Mo=ki,_o=ke;class Oo extends Eo.EventEmitter{constructor(e,t,n){super(),this.wireListeners=new Map,this.topicRefMap=new Map,this.eventAggregator=new Po.default,this.messageHandlers=[this.eventAggregator.dispatchEvent],go.set(this,void 0),mo.set(this,void 0),this.connectSync=()=>{Co(this,go,\"f\").connectSync()},this.getPort=()=>Co(this,go,\"f\").getPort(),vo(this,go,new e(this.onmessage.bind(this)),\"f\"),this.environment=t,this.sendRaw=Co(this,go,\"f\").send.bind(Co(this,go,\"f\")),this.registerMessageHandler(this.handleMessage.bind(this)),Co(this,go,\"f\").on(\"disconnected\",(()=>{for(const[,{handleNack:e}]of this.wireListeners)e({reason:\"Remote connection has closed\"});this.wireListeners.clear(),this.emit(\"disconnected\")}));const{uuid:i,name:r}=n,o=this.environment.getCurrentEntityType();this.me=(0,Mo.getBaseMe)(o,i,r)}getFin(){if(!Co(this,mo,\"f\"))throw new Error(\"No Fin object registered for this transport\");return Co(this,mo,\"f\")}registerFin(e){if(Co(this,mo,\"f\"))throw new Error(\"Fin object has already been registered for this transport\");vo(this,mo,e,\"f\")}shutdown(){return Co(this,go,\"f\").shutdown()}async connect(e){if((0,xo.isConfigWithReceiver)(e))return await Co(this,go,\"f\").connect(e.receiver),this.authorize(e);if((0,xo.isRemoteConfig)(e))return this.connectRemote(e);if((0,xo.isExistingConnectConfig)(e))return this.connectByPort(e);if((0,xo.isNewConnectConfig)(e)){const t=await this.environment.retrievePort(e);return this.connectByPort({...e,address:`ws://localhost:${t}`})}}async connectRemote(e){return await Co(this,go,\"f\").connect(new(this.environment.getWsConstructor())(e.address)),this.authorize(e)}async connectByPort(e){const{address:t,uuid:n}=e,i={...e,type:\"file-token\"},r=Co(this,go,\"f\");await r.connect(new(this.environment.getWsConstructor())(e.address));const o=await this.sendAction(\"request-external-authorization\",{uuid:n,type:\"file-token\"},!0);if(\"external-authorization-response\"!==o.action)throw new Ao.UnexpectedActionError(o.action);return await this.environment.writeToken(o.payload.file,o.payload.token),this.authorize(i)}async authorize(e){const t=await this.sendAction(\"request-authorization\",e,!0);if(\"authorization-response\"!==t.action)throw new Ao.UnexpectedActionError(t.action);if(!0!==t.payload.success)throw new Ao.RuntimeError(t.payload)}sendAction(e,t={},n=!1){let i=()=>{};const r=Ao.RuntimeError.getCallSite(1),o=this.environment.getNextMessageId(),s=new Promise(((s,a)=>{i=a;const c={action:e,payload:t,messageId:o},d=Co(this,go,\"f\");return this.addWireListener(o,s,(e=>this.nackHandler(e,a,r)),n),d.send(c).catch(a)}));return Object.assign(s,{cancel:i,messageId:o})}nackHandler(e,t,n){t(\"string\"==typeof e?e:new Ao.RuntimeError(e,n))}ferryAction(e){return new Promise(((t,n)=>{const i=this.environment.getNextMessageId();e.messageId=i;const r=e=>{t(e.payload)};return Co(this,go,\"f\").send(e).then((()=>this.addWireListener(i,r,(e=>this.nackHandler(e,n)),!1))).catch(n)}))}registerMessageHandler(e){this.messageHandlers.push(e)}addWireListener(e,t,n,i){i?this.uncorrelatedListener=t:this.wireListeners.has(e)?n({reason:\"Duplicate handler id\",error:(0,_o.errorToPOJO)(new Ao.DuplicateCorrelationError(String(e)))}):this.wireListeners.set(e,{resolve:t,handleNack:n})}onmessage(e){for(const t of this.messageHandlers)t.call(null,e)}handleMessage(e){const t=e.correlationId||NaN;if(\"correlationId\"in e){if(!this.wireListeners.has(t))return!1;{const{resolve:n,handleNack:i}=this.wireListeners.get(t);\"ack\"!==e.action?i({reason:\"Did not receive ack action\",error:(0,_o.errorToPOJO)(new Ao.NoAckError(e.action))}):\"payload\"in e?e.payload.success?n.call(null,e):i(e.payload):\"string\"==typeof e.reason?i(e):(console.warn(\"Received invalid response from core\",e),i({reason:\"invalid response shape\"})),this.wireListeners.delete(t)}}else this.uncorrelatedListener&&this.uncorrelatedListener.call(null,e),this.uncorrelatedListener=()=>{};return!0}}Io=no.Transport=Oo,go=new WeakMap,mo=new WeakMap;const So=(...e)=>({log:(...t)=>console.debug(`[${(new Date).toISOString()}]`,...(e=>e.map((e=>`[${e}]`)))(e),...t),getLogger:(...t)=>So(...e,...t)}),Ro=So(\"@openfin/core-web/client\");function Fo(e,t){if(!function(e){return\"string\"==typeof e}(e))throw new Error(`Property ${t} has invalid type. Expected string, got ${typeof e}.`)}const jo=\"web-broker-ports-ready\",ko=Ro.getLogger(\"get-web-interop-ports\");function Lo(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)}function To(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}\"function\"==typeof SuppressedError&&SuppressedError;const $o=e=>{var n,i,r;return r=class extends t.EventEmitter{constructor(t){super(),n.set(this,void 0),i.set(this,!1),this.connectSync=()=>{Lo(this,i,\"f\")||(e.addEventListener(\"message\",(e=>{e.data?.topic?.startsWith(\"wire-message\")&&e.data.message&&Lo(this,n,\"f\").call(this,{...JSON.parse(e.data.message),ports:e.ports})})),e.start())},this.connect=async()=>{this.connectSync()},this.send=t=>(e.postMessage({topic:\"wire-message\",message:JSON.stringify(t)}),Promise.resolve()),this.shutdown=async()=>{e.close()},To(this,n,t,\"f\")}getPort(){return e}},n=new WeakMap,i=new WeakMap,r};var Bo={},Go={};Object.defineProperty(Go,\"__esModule\",{value:!0}),Go.BaseEnvironment=void 0;const Wo=vr();Go.BaseEnvironment=class{async getViewWindowIdentity(e,t){const{identity:n}=await e.View.wrapSync(t).getCurrentWindow();return n}async getInteropInfo(e){const t=await e.Application.getCurrentSync().getInfo().catch((()=>null)),n=t?.initialOptions?.interopBrokerConfiguration??{};return{fdc3Version:t?(0,Wo.getDefaultViewFdc3VersionFromAppInfo)(t):void 0,...n,fdc3Info:{providerVersion:await e.System.getVersion(),provider:\"OpenFin\"}}}},Object.defineProperty(Bo,\"__esModule\",{value:!0});var Ho=Bo.BrowserEnvironment=void 0;const No=Go;class Do extends No.BaseEnvironment{constructor(){super(...arguments),this.type=\"other\",this.getRandomId=()=>{const e=new Uint32Array(1);return window.crypto.getRandomValues(e)[0].toString(32)}}getAdapterVersionSync(){return\"\"}observeBounds(e,t){throw new Error(\"Method not implemented.\")}layoutAllowedInContext(e){return!1}initLayoutManager(e,t,n){throw new Error(\"Method not implemented.\")}applyLayoutSnapshot(e,t,n){throw new Error(\"Method not implemented.\")}createLayout(e,t){throw new Error(\"Method not implemented.\")}destroyLayout(e,t){throw new Error(\"Method not implemented.\")}resolveLayout(e,t){throw new Error(\"Method not implemented.\")}initPlatform(...e){throw new Error(\"Method not implemented.\")}writeToken(e,t){return Promise.resolve(\"\")}retrievePort(e){throw new Error(\"Method not implemented.\")}getNextMessageId(){return this.getRandomId()}createChildContent(e){throw new Error(\"Method not implemented.\")}getWebWindow(e){throw new Error(\"Method not implemented.\")}getCurrentEntityIdentity(){throw new Error(\"Method not implemented.\")}getCurrentEntityType(){return\"external connection\"}raiseEvent(e,t){throw new Error(\"Method not implemented.\")}getUrl(){return location.href}getDefaultChannelOptions(){return{create:{},connect:{}}}getRtcPeer(){return new RTCPeerConnection}getWsConstructor(){return WebSocket}whenReady(){return Promise.resolve()}}Ho=Bo.BrowserEnvironment=Do;const Uo=e=>\"platform\"in e&&void 0!==e.platform;var Vo,zo;class Ko extends Ho{constructor(e){super(),this.connectConfig=e,Vo.set(this,void 0),zo.set(this,new W((async()=>Promise.resolve().then((function(){return require(\"./main-b14f67c9.js\")}))))),Uo(e)&&this.validatePlatformOptions(e)}getAdapterVersionSync(){return\"0.39.21\"}validatePlatformOptions({platform:e}){if(!(\"layoutSnapshot\"in e))throw new Error(\"Platform options are missing layoutSnapshot. Please provide a layoutSnapshot in the platform options.\");if(\"windows\"in e||\"windows\"in e.layoutSnapshot)throw new Error(\"It appears you tried to call connect() with a snapshot object from an OpenFin desktop environment. Note that connect() expects to be called with a platform property with this structure: { platform: { layoutSnapshot } }. To get a layoutSnapshot of the expected structure, use fin.Platform.Layout.getCurrentLayoutManagerSync().getLayoutSnapshot() in v34+ in your desktop environment.\");const{layouts:t}=e.layoutSnapshot;Object.entries(t).map((([e,t])=>{if(\"object\"!=typeof t||null===t)throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must be an object.`);if(!(\"content\"in t))throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must contain a 'content' property.`)}))}async getInteropInfo(e){return{...{contextGroups:void 0,logging:{beforeAction:{enabled:!1},afterAction:{enabled:!1}}},fdc3Version:void 0,fdc3Info:{providerVersion:\"0.39.21\",provider:\"OpenFin Web\"}}}layoutAllowedInContext(e){return!0}async initLayoutManager(e,t,n){if(Lo(this,Vo,\"f\"))throw new Error(\"Layout already initialized.\");if(!Uo(this.connectConfig))throw new Error(\"Platform options are missing from connection config.\");const{WebLayoutEntryPoint:i}=await Lo(this,zo,\"f\").getValue();return To(this,Vo,new i(this.connectConfig),\"f\"),await Lo(this,Vo,\"f\").initLayoutManager(e,t,n)}async applyLayoutSnapshot(e,t,n){Lo(this,Vo,\"f\")?.applyLayoutSnapshot(e,t,n)}async createLayout(e,t){return Lo(this,Vo,\"f\")?.createLayout(e,t)}async destroyLayout(e,t){return Lo(this,Vo,\"f\")?.destroyLayout(e,t)}async getViewWindowIdentity(e,t){return Promise.resolve({uuid:t.uuid,name:t.uuid})}}Vo=new WeakMap,zo=new WeakMap;const qo=()=>{const e=((e,t)=>{const n=new RegExp(`^${t}<(?.*)>$`).exec(e)?.groups?.meta;if(n)try{return JSON.parse(atob(n))}catch(e){throw new Error(`Failed to decode JSON from ${n}.`)}})(window.name,\"of-frame\");if(e)try{const{name:t,uuid:n,brokerUrl:i,providerId:r,contextGroup:o}=e;return Fo(i,\"brokerUrl\"),Fo(n,\"uuid\"),Fo(t,\"name\"),{identity:{name:t,uuid:n},brokerUrl:i,interopConfig:{providerId:r,currentContextGroup:o}}}catch(e){throw new Error(`Unexpected error occurred when inferring platform information: ${e.stack}`)}},Jo=()=>{const e=r.v4();return{uuid:e,name:e}},Yo=async e=>{if(\"enabled\"===e.connectionInheritance){const t=await(async e=>{const t=qo();if(t){const{validateOptions:n=(()=>!0)}=e,{identity:i,...r}=t;if(!await n(r))throw new Error(\"Parent options were rejected by validateOptions.\");return t}})(e);if(t)return t}if(!e.options){const t=\"enabled\"===e.connectionInheritance?\"Broker URL was not specified nor provided by a platform container.\":\"Connection inheritance is disabled but no options were provided.\";throw new Error(t)}return{...e.options,identity:Jo()}};exports.__classPrivateFieldGet=Lo,exports.__classPrivateFieldSet=To,exports.apiExposer=Gn,exports.commonjsGlobal=s,exports.connect=async t=>{try{Ro.log(\"Establishing connection\",t);const{brokerUrl:n,identity:i,timeout:r,interopConfig:s}=await Yo(t),{workerPort:a,iframeBrokerPort:c}=await(async(e,t,n)=>{const{origin:i}=new URL(e),r=document.createElement(\"IFRAME\");let s;r.style.display=\"none\";try{return await new Promise(((a,c)=>{const d=e=>{if(e.source===r.contentWindow&&e.data?.topic===`ack-${jo}`){if(e.origin!==i)c(new Error(`Broker redirected to unexpected origin ${e.origin}, expected ${i}.`));else if(e.data.success){const[t,n]=e.ports;a({iframeBrokerPort:t,workerPort:n})}else c(new m(e.data));window.removeEventListener(\"message\",d),clearTimeout(s)}};window.addEventListener(\"message\",d),ko.log(`Connecting to broker ${e}`),r.setAttribute(\"src\",e),r.setAttribute(\"name\",o(t,\"of-broker\")),document.body.appendChild(r),ko.log(\"Iframe loaded, awaiting init message from iframe\"),n&&(s=setTimeout((()=>{window.removeEventListener(\"message\",d),document.body.removeChild(r),c(new Error(\"Worker did not initialize in time\"))}),n))}))}catch(e){throw new Error(`Failed to initialise Fin Web Client. ${e.message}`,{cause:e})}})(n,i,r);Ro.log(\"Successfully established connection to shared worker\");const d={entityType:\"external connection\",...i};a.start(),c.start();const h=((t,n,i)=>{const r=$o(n),o=new Ko(t),s=new Io(r,o,i);return s.connectSync(),window.Buffer=e.Buffer,new Wr(s)})(t,a,d);return s?.providerId&&(h.me.interop=h.Interop.connectSync(s.providerId),s?.currentContextGroup&&h.me.interop.joinContextGroup(s.currentContextGroup).catch((e=>{console.warn(`Error joining specified context group: ${s?.currentContextGroup}, continuing`,e)}))),{...h,me:{...h.me,identity:{uuid:h.me.uuid,name:h.me.name}}}}catch(e){throw new Error(`An error occured during web-interop connection: ${e.message}`)}},exports.decorators=Nn,exports.encodeOptions=o,exports.layout_constants=ai,exports.lazy=G;\n","\"use strict\";var t=require(\"./main-8cad4070.js\"),e=require(\"uuid\");require(\"buffer/\"),require(\"events\"),require(\"lodash/cloneDeep\"),require(\"lodash/isEqual\");var i={},n={};Object.defineProperty(n,\"__esModule\",{value:!0}),n.mapValuesAsync=n.mapEntriesAsync=void 0;const o=(t,[e,i])=>({...t,[e]:i});async function s(t,e){return(await Promise.all(e.map((async([e,i])=>[e,await t(i,e)])))).reduce(o,{})}n.mapEntriesAsync=s,n.mapValuesAsync=async function(t,e){let i;return i=e instanceof Map?[...e.entries()]:Object.entries(e),s(t,i)};var r,a,l,h,d=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldSet||function(t,e,i,n,o){if(\"m\"===n)throw new TypeError(\"Private method is not writable\");if(\"a\"===n&&!o)throw new TypeError(\"Private accessor was defined without a setter\");if(\"function\"==typeof e?t!==e||!o:!e.has(t))throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");return\"a\"===n?o.call(t,i):o?o.value=i:e.set(t,i),i},c=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldGet||function(t,e,i,n){if(\"a\"===i&&!n)throw new TypeError(\"Private accessor was defined without a getter\");if(\"function\"==typeof e?t!==e||!n:!e.has(t))throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");return\"m\"===i?n:\"a\"===i?n.call(t):n?n.value:e.get(t)};Object.defineProperty(i,\"__esModule\",{value:!0});var m=i.DefaultLayoutManager=void 0;const u=n;class p{constructor(t){a.set(this,void 0),l.set(this,new Map),d(this,a,t,\"f\")}size(){return c(this,l,\"f\").size}async applyLayoutSnapshot({layouts:t}){if(Object.keys(t).length>1)throw new Error(\"[LayoutManager] Tried to call applyLayoutSnapshot with more than 1 layout. When implementing multiple layouts via overridden LayoutManager class, you must override and fully implement the applyLayoutSnapshot method without calling super.applyLayoutSnapshot().\");const[[e,i]]=Object.entries(t);await p.createLayout(this,{layoutName:e,layout:i})}async showLayout({layoutName:t}){}async getLayoutSnapshot(){return{layouts:await(0,u.mapValuesAsync)((t=>t.getFrameSnapshot()),c(this,l,\"f\"))}}async removeLayout({layoutName:t}){}getLayoutIdentityForView(t){const e=[...c(this,l,\"f\").values()].find((e=>e.getCurrentViews().some((e=>e.name===t.name&&e.uuid===t.uuid))));return e?.identity??void 0}isLayoutVisible({layoutName:t}){return c(p,r,\"m\",h).call(p,this,t).isVisible()}resolveLayoutIdentity(t){if(t&&\"layoutName\"in t)return t;const e=[...c(this,l,\"f\").values()];if(1===e.length)return e[0].identity;const i=e.find((t=>t.isVisible()));return i?.identity??void 0}static async resolveLayout(t,e){const i=t.resolveLayoutIdentity(e);if(void 0===i||!(\"layoutName\"in i))throw new Error(\"[layout-manager] resolveLayout: Could not resolve the layout identity. Make sure you include 'layoutName' in the identity object.\");return c(p,r,\"m\",h).call(p,t,i.layoutName)}static async handleSharedView(t,e,i){await(0,u.mapValuesAsync)((async t=>{if(t.identity.layoutName!==e.layoutName){const e=t.getCurrentViews().find((t=>t.name===i.name));e&&await t.onViewDetached({viewIdentity:e,target:null}).catch(console.error)}}),c(t,l,\"f\"))}static async handleLastViewRemoved(t,e){await t.removeLayout(e),await c(t,a,\"f\").handleLastViewRemoved(t)}static async destroyLayout(t,{layoutName:e}){await c(p,r,\"m\",h).call(p,t,e).destroy(),c(t,l,\"f\").delete(e)}static async createLayout(t,e){const{layoutName:i}=e;if(c(t,l,\"f\").has(i))throw new Error(`Layout name ${i} already exists`);await c(t,a,\"f\").createLayout(e,t)}static registerLayout(t,e,i){c(t,l,\"f\").set(e,i)}static getAllLayouts(t){return[...c(t,l,\"f\").values()]}static setInitialSnapshot(t,e){c(t,a,\"f\").setInitialSnapshot(e)}static createClosedConstructor(...t){return class extends p{constructor(){super(...t)}}}}m=i.DefaultLayoutManager=p,r=p,a=new WeakMap,l=new WeakMap,h=function(t,e){const i=c(t,l,\"f\").get(e);if(!i)throw new Error(`[layout-manager] getLayoutByName: Could not locate layout with name '${e}'`);return i};var g={},f={},v={};Object.defineProperty(v,\"__esModule\",{value:!0}),v.ReversibleMap=void 0;v.ReversibleMap=class{constructor(){this.valueToKey=new Map,this.keyToValue=new Map,this.setUnique=(t,e)=>{if(this.hasKey(t)||this.hasValue(e))throw new Error(\"Key or value already in the map.\");this.keyToValue.set(t,e),this.valueToKey.set(e,t)},this.getKey=t=>{const e=this.valueToKey.get(t);if(!e)throw new Error(\"Value not found in the map.\");return e},this.deleteKey=t=>{const e=this.getValue(t);return this.keyToValue.delete(t),this.valueToKey.delete(e),e},this.deleteValue=t=>{const e=this.getKey(t);return this.keyToValue.delete(e),this.valueToKey.delete(t),e},this.hasKey=t=>this.keyToValue.has(t),this.hasValue=t=>this.valueToKey.has(t)}getValue(t){const e=this.keyToValue.get(t);if(!e)throw new Error(\"Key not found in the map.\");return e}},Object.defineProperty(f,\"__esModule\",{value:!0});var _=f.LayoutContentCache=void 0;const y=t.lazy,C=v;class w{constructor(){this.contentItemCache=new C.ReversibleMap,this.contentItemCacheId=0,this.createCacheKey=()=>{const t=`entity-${this.contentItemCacheId.toString()}`;return this.contentItemCacheId+=1,t},this.hasKey=t=>this.contentItemCache.hasKey(t),this.getItemOrUndefined=t=>{try{return this.getContentItemOrThrow(t)}catch(t){return}},this.getContentItemOrThrow=(t,e)=>{if(!this.contentItemCache.hasKey(t))throw new Error(\"Layout component has been destroyed or detached from the current layout.\");const i=this.contentItemCache.getValue(t);if(e&&!e.includes(i.type))throw new Error(`Layout item is not the expected type. Expected ${e.join(\", \")}, got ${i.type}.`);return i},this.getOrCreateEntityId=t=>{if(this.contentItemCache.hasValue(t))return this.contentItemCache.getKey(t);t.onDestroyed((()=>{this.contentItemCache.deleteValue(t)}));const e=this.createCacheKey();return this.contentItemCache.setUnique(e,t),e}}static getSingleInstance(){return w.singleton.getValue()}}_=f.LayoutContentCache=w,w.singleton=new y.Lazy((()=>new w));var I={},b={};!function(t){Object.defineProperty(t,\"__esModule\",{value:!0}),t.getAdjacentStacks=t.doShareEdge=t.getAdjacentItem=void 0;t.getAdjacentItem=(e,i)=>{const{parent:n}=e;if(e.isRoot()||!n)return;const o=[\"top\",\"bottom\"].includes(i)?\"column\":\"row\",s=[\"top\",\"left\"].includes(i)?-1:1;if(n.type===o){const t=n.contentItems.indexOf(e)+s;if(t>=0&&t{const n=t.getBounds(),o=e.getBounds();if(!n||!o)return!1;if([\"top\",\"bottom\"].includes(i)){return!(n.righto.right)}return!(n.bottomo.bottom)};t.getAdjacentStacks=(e,i)=>{const n=[\"top\",\"bottom\"].includes(i)?\"row\":\"column\",o=s=>\"stack\"===s.type?(0,t.doShareEdge)(e,s,i)?[s]:[]:\"root\"===s.type||\"ground\"===s.type?[]:s.type===n?s.contentItems.map((t=>o(t))).flat():s.type!==n?[\"top\",\"right\"].includes(i)?o(s.contentItems[s.contentItems.length-1]):o(s.contentItems[0]):[],s=(0,t.getAdjacentItem)(e,i);return s?o(s):[]}}(b);var S=t.commonjsGlobal&&t.commonjsGlobal.__decorate||function(t,e,i,n){var o,s=arguments.length,r=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if(\"object\"==typeof Reflect&&\"function\"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(s<3?o(r):s>3?o(e,i,r):o(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};Object.defineProperty(I,\"__esModule\",{value:!0}),I.LayoutEntitiesController=void 0;const E=t.decorators,x=b,L=i;class z{constructor(t,e,i){this.wire=t,this.layoutManager=e,this.layoutContentCache=i,this.analytics=t=>{this.wire.sendAction(`layout-controller-${t}`).catch((()=>{}))},this.getLayoutIdentityForViewOrThrow=async t=>{const e=this.layoutManager.getLayoutIdentityForView(t);if(!e)throw new Error(`View identity ${t.name} is not attached to any layouts.`);return e},this.getRoot=async t=>{this.analytics(\"get-root\");const e=(await this.getLayout(t)).getRoot();return{type:e.type,entityId:this.layoutContentCache.getOrCreateEntityId(e)}},this.getStackByView=async t=>{this.analytics(\"get-stack-by-view\");const e=await this.getLayoutIdentityForViewOrThrow(t),i=(await this.getLayout(e)).getStackByView(t);if(\"stack\"===i?.type)return{entityId:this.layoutContentCache.getOrCreateEntityId(i),type:\"stack\"}},this.getStackViews=t=>{this.analytics(\"get-stack-views\");return this.layoutContentCache.getContentItemOrThrow(t,[\"stack\"]).contentItems.map((t=>({name:t.viewName,uuid:this.wire.me.uuid})))},this.isRoot=t=>{this.analytics(\"is-root\");return this.layoutContentCache.getContentItemOrThrow(t).isRoot()},this.exists=t=>(this.analytics(\"exists\"),this.layoutContentCache.hasKey(t)),this.addViewToStack=async(t,e,{index:i}={index:0})=>{this.analytics(\"add-view-to-stack\");const n=this.layoutContentCache.getContentItemOrThrow(t);if(i&&i>n.contentItems.length+1)throw new Error(`Index '${i}' out of range, please exclude the index or specify a number between 0 and ${n.contentItems.length}`);const o={id:t,index:i},{identity:s}=await n.layout.platformCreateView(e,{location:o});return s},this.findViewInStack=(t,e)=>t.contentItems.find((t=>t.viewName===e.name)),this.removeViewFromStack=async(t,e)=>{this.analytics(\"remove-view-from-stack\");const i=this.layoutContentCache.getContentItemOrThrow(t,[\"stack\"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to remove a view ('${e.name}') which does not belong to the stack.`);await n.layout.platformCloseView(e)},this.createAdjacentStack=async(t,e,{position:i=\"right\"}={})=>{if(this.analytics(\"create-adjacent-stack\"),!Array.isArray(e)||0===e.length)throw new Error('The parameter \"views\" must be an array with at least 1 element.');if(![\"top\",\"bottom\",\"left\",\"right\"].includes(i))throw new Error(`Invalid position '${i}' specified.`);const n=this.layoutContentCache.getContentItemOrThrow(t).createAdjacentStack({position:i}),o=this.layoutContentCache.getOrCreateEntityId(n);return await Promise.all(e.reverse().map((t=>this.addViewToStack(o,t)))),o},this.getAdjacentStacks=async({targetId:t,edge:e})=>{this.analytics(\"get-adjacent-stacks\");const i=this.layoutContentCache.getContentItemOrThrow(t);return(0,x.getAdjacentStacks)(i,e).map((t=>({entityId:this.layoutContentCache.getOrCreateEntityId(t)})))},this.setStackActiveView=async(t,e)=>{this.analytics(\"set-stack-active-view\");const i=this.layoutContentCache.getContentItemOrThrow(t,[\"stack\"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to set a view ('${e.name}') as active when it does not belong to the stack.`);i.setActiveContentItem(n,!0)}}async getLayout(t){const e=await L.DefaultLayoutManager.resolveLayout(this.layoutManager,t);if(!e)throw new Error(`Could not resolve target layout identity ${JSON.stringify(t)}`);return e}getContent(t){this.analytics(\"get-content\");return this.layoutContentCache.getContentItemOrThrow(t,[\"column\",\"row\"]).contentItems.map((t=>({type:t.type,entityId:this.layoutContentCache.getOrCreateEntityId(t)})))}getParent(t){this.analytics(\"get-parent\");const e=this.layoutContentCache.getContentItemOrThrow(t);if(!e.isRoot())return e.parent?.contentItems.includes(e)?{type:e.parent.type,entityId:this.layoutContentCache.getOrCreateEntityId(e.parent)}:void 0}}S([(0,E.expose)()],z.prototype,\"getLayoutIdentityForViewOrThrow\",void 0),S([(0,E.expose)()],z.prototype,\"getRoot\",void 0),S([(0,E.expose)()],z.prototype,\"getStackByView\",void 0),S([(0,E.expose)()],z.prototype,\"getStackViews\",void 0),S([(0,E.expose)()],z.prototype,\"getContent\",null),S([(0,E.expose)()],z.prototype,\"getParent\",null),S([(0,E.expose)()],z.prototype,\"isRoot\",void 0),S([(0,E.expose)()],z.prototype,\"exists\",void 0),S([(0,E.expose)()],z.prototype,\"addViewToStack\",void 0),S([(0,E.expose)()],z.prototype,\"removeViewFromStack\",void 0),S([(0,E.expose)()],z.prototype,\"createAdjacentStack\",void 0),S([(0,E.expose)()],z.prototype,\"getAdjacentStacks\",void 0),S([(0,E.expose)()],z.prototype,\"setStackActiveView\",void 0),I.LayoutEntitiesController=z,Object.defineProperty(g,\"__esModule\",{value:!0});var M=g.initLayoutEndpoints=void 0;const P=t.apiExposer,T=t.layout_constants,A=f,k=I,D=i;M=g.initLayoutEndpoints=async function(t,e){const i=t.getFin(),n=await i.Platform.getCurrentSync().getClient(),o=new P.ChannelsExposer(n);await new P.ApiExposer(o).exposeInstance(new k.LayoutEntitiesController(t,e,A.LayoutContentCache.getSingleInstance()),{id:T.LAYOUT_CONTROLLER_ID}),await async function(t,e){const i=t=>async i=>{const n=await D.DefaultLayoutManager.resolveLayout(e,i.target);if(!n)throw new Error(`Could not resolve the layout target from payload ${JSON.stringify(i)}`);return t(n,i)},n=(e,n)=>{t.register(e,i(n))},o=(t,e)=>{n(t,e)};n(\"replace-view\",((t,e)=>t.replaceView(e))),n(\"replace-layout\",((t,{layout:e})=>t.replaceLayout(e))),n(\"add-view\",((t,e)=>t.insertView(e))),o(\"layout-add-view\",((t,{viewOptions:e,location:i,targetView:n})=>t.platformCreateView(e,{location:i,targetView:n}))),n(\"close-view\",((t,e)=>t.cleanupView(e.viewIdentity))),o(\"layout-close-view\",((t,e)=>t.platformCloseView(e.viewIdentity))),n(\"apply-preset-layout\",((t,e)=>t.applyPreset(e))),n(\"get-layout-views\",(t=>t.getCurrentViews())),n(\"get-frame-snapshot\",(t=>t.getFrameSnapshot())),n(\"is-visible\",(t=>t.isVisible())),n(\"destroy\",(t=>t.destroy())),t.register(\"get-layout-snapshot\",(()=>e.getLayoutSnapshot()))}(n,e)};var R={};Object.defineProperty(R,\"__esModule\",{value:!0});var U=R.BaseLayout=void 0;U=R.BaseLayout=class{};var O={};Object.defineProperty(O,\"__esModule\",{value:!0});var V=O.DOMEmitter=void 0;V=O.DOMEmitter=class{constructor(t){this.container=t}dispatchLocalEvent(t,e){const i={...e,type:t,tabSelector:`tab-${e.name}`,containerSelector:`container-${e.name}`,topic:\"openfin-DOM-event\"};this.container.dispatchEvent(new CustomEvent(t,{detail:i}))}};var B={};Object.defineProperty(B,\"__esModule\",{value:!0});var H=B.mapLayoutContentItemsImmutableSync=B.mapLayoutContentItemsImmutable=W=B.isVisible=void 0;var W=B.isVisible=t=>(0!==t.offsetWidth||0!==t.offsetHeight)&&\"hidden\"!==window.getComputedStyle(t).visibility&&t.offsetTop>=0&&t.offsetLeft>=0&&t.offsetTop<=window.innerHeight&&t.offsetLeft<=window.innerWidth;const F=t=>\"type\"in t&&\"component\"===t.type;B.mapLayoutContentItemsImmutable=async function t(e,i){return F(i)?e(i):{...i,content:await Promise.all(i.content?.map((i=>t(e,i))))}},H=B.mapLayoutContentItemsImmutableSync=function t(e,i){return F(i)?e(i):{...i,content:i.content?.map((i=>t(e,i)))}};class N extends Error{constructor(t,e){super(e),this.type=t}}class G extends N{constructor(t,e){super(\"Configuration\",t),this.node=e}}class j extends N{constructor(t){super(\"PopoutBlocked\",t)}}class $ extends N{constructor(t){super(\"API\",t)}}class Z extends N{constructor(t){super(\"Bind\",t)}}class q extends Error{constructor(t,e,i){super(`${t}: ${e}${void 0===i?\"\":\": \"+i}`)}}class X extends q{constructor(t,e){super(\"Assert\",t,e)}}class Y extends q{constructor(t,e,i){super(\"UnreachableCase\",t,`${e}${void 0===i?\"\":\": \"+i}`)}}class K extends q{constructor(t,e){super(\"UnexpectedNull\",t,e)}}class J extends q{constructor(t,e){super(\"UnexpectedUndefined\",t,e)}}var Q;!function(t){let e=!1;const i={PopoutCannotBeCreatedWithGroundItemConfig:{id:0,default:\"Popout cannot be created with ground ItemConfig\"},PleaseRegisterAConstructorFunction:{id:1,default:\"Please register a constructor function\"},ComponentTypeNotRegisteredAndBindComponentEventHandlerNotAssigned:{id:2,default:\"Component type not registered and BindComponentEvent handler not assigned\"},ComponentIsAlreadyRegistered:{id:3,default:\"Component is already registered\"},ComponentIsNotVirtuable:{id:4,default:\"Component is not virtuable. Requires rootHtmlElement field/getter\"},VirtualComponentDoesNotHaveRootHtmlElement:{id:5,default:'Virtual component does not have getter \"rootHtmlElement\"'},ItemConfigIsNotTypeComponent:{id:6,default:\"ItemConfig is not of type component\"},InvalidNumberPartInSizeString:{id:7,default:\"Invalid number part in size string\"},UnknownUnitInSizeString:{id:8,default:\"Unknown unit in size string\"},UnsupportedUnitInSizeString:{id:9,default:\"Unsupported unit in size string\"}};t.idCount=Object.keys(i).length;const n=Object.values(i);t.checkInitialise=function(){if(!e)for(let e=0;e=\"0\"&&t<=\"9\"}function Tt(t,e){const i=zt(e);t.style.width=i}function At(t,e){const i=zt(e);t.style.height=i}function kt(t){return{width:t.offsetWidth,height:t.offsetHeight}}function Dt(t,e){t.style.display=e?\"\":\"none\"}function Rt(t,e){if(void 0!==e)for(const i in e)if(e.hasOwnProperty(i)){const n=e[i],o=t[i];t[i]=Ut(o,n)}return t}function Ut(t,e){if(\"object\"!=typeof e)return e;if(Array.isArray(e)){const t=e.length,i=new Array(t);for(let n=0;n36)throw new Error(\"Too many keys in config minifier map\")},t.translateObject=n}(dt||(dt={})),function(t){t.defaults={type:at.ground,content:[],size:1,sizeUnit:ht.Fractional,minSize:void 0,minSizeUnit:ht.Pixel,id:\"\",isClosable:!0},t.createCopy=function(t,e){switch(t.type){case at.ground:case at.row:case at.column:return gt.createCopy(t,e);case at.stack:return ut.createCopy(t,e);case at.component:return pt.createCopy(t);default:throw new Y(\"CICC91354\",t.type,\"Invalid Config Item type specified\")}},t.createDefault=function(t){switch(t){case at.ground:throw new X(\"CICCDR91562\");case at.row:case at.column:return gt.createDefault(t);case at.stack:return ut.createDefault();case at.component:return pt.createDefault();default:throw new Y(\"CICCDD91563\",t,\"Invalid Config Item type specified\")}},t.isComponentItem=function(t){return t.type===at.component},t.isStackItem=function(t){return t.type===at.stack},t.isGroundItem=function(t){return t.type===at.ground}}(ct||(ct={})),function(t){t.defaultMaximised=!1,function(t){t.createCopy=function(t,e){return void 0===t?void 0:{show:null!=e?e:t.show,popout:t.popout,close:t.close,maximise:t.maximise,minimise:t.minimise,tabDropdown:t.tabDropdown}}}(t.Header||(t.Header={}))}(mt||(mt={})),function(t){function e(t){const e=t.length,i=new Array(e);for(let n=0;n\"__glMaximised\"===t));t>0&&(o=!0,n=n.splice(t,1)),e=n.length>0?n[0]:ct.defaults.id}else e=n;return i=void 0!==t.maximised?t.maximised:o,{id:e,maximised:i}}}(wt||(wt={})),function(t){function e(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0;return{resolved:!0,root:Et.resolve(i),openPopouts:t.resolveOpenPopouts(e.openPopouts),dimensions:t.Dimensions.resolve(e.dimensions),settings:t.Settings.resolve(e.settings),header:t.Header.resolve(e.header,e.settings,e.labels)}}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:Lt.fromResolvedArray(e.openPopouts),settings:_t.Settings.createCopy(e.settings),dimensions:t.Dimensions.fromResolved(e.dimensions),header:_t.Header.createCopy(e.header)}},t.isResolved=function(t){const e=t;return void 0!==e.resolved&&!0===e.resolved},t.resolveOpenPopouts=function(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0,{root:Et.resolve(o),openPopouts:xt.resolveOpenPopouts(e.openPopouts),dimensions:xt.Dimensions.resolve(e.dimensions),settings:xt.Settings.resolve(e.settings),header:xt.Header.resolve(e.header,e.settings,e.labels),parentId:null!==(i=e.parentId)&&void 0!==i?i:null,indexInParent:null!==(n=e.indexInParent)&&void 0!==n?n:null,window:t.Window.resolve(e.window,e.dimensions),resolved:!0}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:i(e.openPopouts),dimensions:xt.Dimensions.fromResolved(e.dimensions),settings:_t.Settings.createCopy(e.settings),header:_t.Header.createCopy(e.header),parentId:e.parentId,indexInParent:e.indexInParent,window:t.Window.fromResolved(e.window)}},t.fromResolvedArray=i}(Lt||(Lt={}));class Wt{constructor(){this._allEventSubscriptions=[],this._subscriptionsMap=new Map,this.unbind=this.removeEventListener,this.trigger=this.emit}tryBubbleEvent(t,e){}emit(t,...e){let i=this._subscriptionsMap.get(t);if(void 0!==i){i=i.slice();for(let t=0;t0){const n=e.slice();n.unshift(t);const o=this._allEventSubscriptions.slice();for(let t=0;t0?n.contentItems[0]:n,e=0);const o=this._layoutManager.createAndInitContentItem(i,t);t.addChild(o,e),this._layoutManager.layoutConfig.settings.popInOnClose?this._onClose():this.close()}createWindow(){const t=this.createUrl(),e=Math.floor(1e6*Math.random()).toString(36),i=this.serializeWindowFeatures({width:this._initialWindowSize.width,height:this._initialWindowSize.height,innerWidth:this._initialWindowSize.width,innerHeight:this._initialWindowSize.height,menubar:\"no\",toolbar:\"no\",location:\"no\",personalbar:\"no\",resizable:\"yes\",scrollbars:\"no\",status:\"no\"});if(this._popoutWindow=globalThis.open(t,e,i),this._popoutWindow)this._popoutWindow.addEventListener(\"load\",(()=>this.positionWindow()),{passive:!0}),this._popoutWindow.addEventListener(\"beforeunload\",(()=>{this._layoutManager.layoutConfig.settings.popInOnClose?this.popIn():this._onClose()}),{passive:!0}),this._checkReadyInterval=setInterval((()=>this.checkReady()),10);else if(!0===this._layoutManager.layoutConfig.settings.blockedPopoutsThrowError){throw new j(\"Popout blocked\")}}checkReady(){if(null===this._popoutWindow)throw new K(\"BPCR01844\");this._popoutWindow.__glInstance&&this._popoutWindow.__glInstance.isInitialised&&(this.onInitialised(),void 0!==this._checkReadyInterval&&(clearInterval(this._checkReadyInterval),this._checkReadyInterval=void 0))}serializeWindowFeatures(t){const e=[];for(const i in t)e.push(i+\"=\"+t[i].toString());return e.join(\",\")}createUrl(){const t=\"gl-window-config-\"+Ot(),e=_t.minifyConfig(this._config);try{localStorage.setItem(t,JSON.stringify(e))}catch(t){throw new Error(\"Error while writing to localStorage \"+function(t){return t instanceof Error?t.message:\"string\"==typeof t?t:\"Unknown Error\"}(t))}const i=new URL(location.href);return i.searchParams.set(\"gl-window\",t),i.toString()}positionWindow(){if(null===this._popoutWindow)throw new Error(\"BrowserPopout.positionWindow: null popoutWindow\");this._popoutWindow.moveTo(this._initialWindowSize.left,this._initialWindowSize.top),this._popoutWindow.focus()}onInitialised(){this._isInitialised=!0,this.getGlInstance().on(\"popIn\",(()=>this.popIn())),this.emit(\"initialised\")}_onClose(){setTimeout((()=>this.emit(\"closed\")),50)}}class Gt extends Wt{constructor(t,e,i,n){super(),this.layoutManager=t,this._parent=i,this._element=n,this._popInParentIds=[],this._type=e.type,this._id=e.id,this._isInitialised=!1,this.isGround=!1,this.isRow=!1,this.isColumn=!1,this.isStack=!1,this.isComponent=!1,this.size=e.size,this.sizeUnit=e.sizeUnit,this.minSize=e.minSize,this.minSizeUnit=e.minSizeUnit,this._isClosable=e.isClosable,this._pendingEventPropagations={},this._throttledEvents=[\"stateChanged\"],this._contentItems=this.createContentItems(e.content)}get type(){return this._type}get id(){return this._id}set id(t){this._id=t}get popInParentIds(){return this._popInParentIds}get parent(){return this._parent}get contentItems(){return this._contentItems}get isClosable(){return this._isClosable}get element(){return this._element}get isInitialised(){return this._isInitialised}static isStack(t){return t.isStack}static isComponentItem(t){return t.isComponent}static isComponentParentableItem(t){return t.isStack||t.isGround}removeChild(t,e=!1){const i=this._contentItems.indexOf(t);if(-1===i)throw new Error(\"Can't remove child item. Unknown content item\");if(e||this._contentItems[i].destroy(),this._contentItems.splice(i,1),this._contentItems.length>0)this.updateSize(!1);else if(!this.isGround&&!0===this._isClosable){if(null===this._parent)throw new K(\"CIUC00874\");this._parent.removeChild(this)}}addChild(t,e,i){return null!=e||(e=this._contentItems.length),this._contentItems.splice(e,0,t),t.setParent(this),!0===this._isInitialised&&!1===t._isInitialised&&t.init(),e}replaceChild(t,e,i=!1){const n=this._contentItems.indexOf(t),o=t._element.parentNode;if(-1===n)throw new X(\"CIRCI23232\",\"Can't replace child. oldChild is not child of this\");if(null===o)throw new K(\"CIRCP23232\");if(o.replaceChild(e._element,t._element),!0===i&&(t._parent=null,t.destroy()),this._contentItems[n]=e,e.setParent(this),e.size=t.size,e.sizeUnit=t.sizeUnit,e.minSize=t.minSize,e.minSizeUnit=t.minSizeUnit,null===e._parent)throw new K(\"CIRCNC45699\");!0===e._parent._isInitialised&&!1===e._isInitialised&&e.init(),this.updateSize(!1)}remove(){if(null===this._parent)throw new K(\"CIR11110\");this._parent.removeChild(this)}popout(){const t=Ot(),e=this.layoutManager.createPopoutFromContentItem(this,void 0,t,void 0);return this.emitBaseBubblingEvent(\"stateChanged\"),e}calculateConfigContent(){const t=this._contentItems,e=t.length,i=new Array(e);for(let n=0;nthis.propagateEventToLayoutManager(t,e))))}propagateEventToLayoutManager(t,e){this._pendingEventPropagations[t]=!1,this.layoutManager.emitUnknown(t,e)}}class jt extends Gt{constructor(t,e,i){super(t,e,i,document.createElement(\"div\")),this._parentItem=i,this._focused=!1,this.isComponent=!0,this._reorderEnabled=e.reorderEnabled,this.applyUpdatableConfig(e),this._initialWantMaximise=e.maximised;const n=document.createElement(\"div\");n.classList.add(\"lm_content\"),this.element.appendChild(n),this._container=new Ft(e,this,t,n,(t=>this.handleUpdateItemConfigEvent(t)),(()=>this.show()),(()=>this.hide()),(t=>this.focus(t)),(t=>this.blur(t)))}get componentName(){return this._container.componentType}get componentType(){return this._container.componentType}get reorderEnabled(){return this._reorderEnabled}get initialWantMaximise(){return this._initialWantMaximise}get component(){return this._container.component}get container(){return this._container}get parentItem(){return this._parentItem}get headerConfig(){return this._headerConfig}get title(){return this._title}get tab(){return this._tab}get focused(){return this._focused}destroy(){this._container.destroy(),super.destroy()}applyUpdatableConfig(t){this.setTitle(t.title),this._headerConfig=t.header}toConfig(){const t=this._container.stateRequestEvent,e=void 0===t?this._container.state:t();return{type:at.component,content:[],size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,maximised:!1,isClosable:this.isClosable,reorderEnabled:this._reorderEnabled,title:this._title,header:mt.Header.createCopy(this._headerConfig),componentType:pt.copyComponentType(this.componentType),componentState:e}}close(){if(null===this.parent)throw new K(\"CIC68883\");this.parent.removeChild(this,!1)}enterDragMode(t,e){Tt(this.element,t),At(this.element,e),this._container.enterDragMode(t,e)}exitDragMode(){this._container.exitDragMode()}enterStackMaximised(){this._container.enterStackMaximised()}exitStackMaximised(){this._container.exitStackMaximised()}drag(){this._container.drag()}updateSize(t){this.updateNodeSize(t)}init(){this.updateNodeSize(!1),super.init(),this._container.emit(\"open\"),this.initContentItems()}setTitle(t){this._title=t,this.emit(\"titleChanged\",t),this.emit(\"stateChanged\")}setTab(t){this._tab=t,this.emit(\"tab\",t),this._container.setTab(t)}hide(){super.hide(),this._container.setVisibility(!1)}show(){super.show(),this._container.setVisibility(!0)}focus(t=!1){this.parentItem.setActiveComponentItem(this,!0,t)}setFocused(t){this._focused=!0,this.tab.setFocused(),t||this.emitBaseBubblingEvent(\"focus\")}blur(t=!1){this._focused&&this.layoutManager.setFocusedComponentItem(void 0,t)}setBlurred(t){this._focused=!1,this.tab.setBlurred(),t||this.emitBaseBubblingEvent(\"blur\")}setParent(t){this._parentItem=t,super.setParent(t)}handleUpdateItemConfigEvent(t){this.applyUpdatableConfig(t)}updateNodeSize(t){if(\"none\"!==this.element.style.display){const{width:e,height:i}=kt(this.element);this._container.setSizeToNodeSize(e,i,t)}}}class $t extends Gt{constructor(){super(...arguments),this._focused=!1}get focused(){return this._focused}setFocusedValue(t){this._focused=t}}class Zt extends Wt{constructor(t,e){super(),this._eElement=t,this._pointerTracking=!1,this._pointerDownEventListener=t=>this.onPointerDown(t),this._pointerMoveEventListener=t=>this.onPointerMove(t),this._pointerUpEventListener=t=>this.onPointerUp(t),this._timeout=void 0,this._allowableTargets=[t,...e],this._oDocument=document,this._eBody=document.body,this._nDelay=1800,this._nDistance=10,this._nX=0,this._nY=0,this._nOriginalX=0,this._nOriginalY=0,this._dragging=!1,this._eElement.addEventListener(\"pointerdown\",this._pointerDownEventListener,{passive:!0})}destroy(){this.checkRemovePointerTrackingEventListeners(),this._eElement.removeEventListener(\"pointerdown\",this._pointerDownEventListener)}cancelDrag(){this.processDragStop(void 0)}onPointerDown(t){if(this._allowableTargets.includes(t.target)&&t.isPrimary){const e=this.getPointerCoordinates(t);this.processPointerDown(e)}}processPointerDown(t){this._nOriginalX=t.x,this._nOriginalY=t.y,this._oDocument.addEventListener(\"pointermove\",this._pointerMoveEventListener),this._oDocument.addEventListener(\"pointerup\",this._pointerUpEventListener,{passive:!0}),this._pointerTracking=!0,this._timeout=setTimeout((()=>{try{this.startDrag()}catch(t){throw console.error(t),t}}),this._nDelay)}onPointerMove(t){this._pointerTracking&&(this.processDragMove(t),t.preventDefault())}processDragMove(t){this._nX=t.pageX-this._nOriginalX,this._nY=t.pageY-this._nOriginalY,!1===this._dragging&&(Math.abs(this._nX)>this._nDistance||Math.abs(this._nY)>this._nDistance)&&this.startDrag(),this._dragging&&this.emit(\"drag\",this._nX,this._nY,t)}onPointerUp(t){this.processDragStop(t)}processDragStop(t){var e;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this.checkRemovePointerTrackingEventListeners(),!0===this._dragging&&(this._eBody.classList.remove(\"lm_dragging\"),this._eElement.classList.remove(\"lm_dragging\"),null===(e=this._oDocument.querySelector(\"iframe\"))||void 0===e||e.style.setProperty(\"pointer-events\",\"\"),this._dragging=!1,this.emit(\"dragStop\",t))}checkRemovePointerTrackingEventListeners(){this._pointerTracking&&(this._oDocument.removeEventListener(\"pointermove\",this._pointerMoveEventListener),this._oDocument.removeEventListener(\"pointerup\",this._pointerUpEventListener),this._pointerTracking=!1)}startDrag(){var t;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this._dragging=!0,this._eBody.classList.add(\"lm_dragging\"),this._eElement.classList.add(\"lm_dragging\"),null===(t=this._oDocument.querySelector(\"iframe\"))||void 0===t||t.style.setProperty(\"pointer-events\",\"none\"),this.emit(\"dragStart\",this._nOriginalX,this._nOriginalY)}getPointerCoordinates(t){return{x:t.pageX,y:t.pageY}}}class qt{constructor(t,e,i){this._isVertical=t,this._size=e,this._grabSize=i0){const i=this.createSplitter(Math.max(0,e-1)).element;e>0?(this.contentItems[e-1].element.insertAdjacentElement(\"afterend\",i),i.insertAdjacentElement(\"afterend\",t.element)):(this.contentItems[0].element.insertAdjacentElement(\"beforebegin\",i),i.insertAdjacentElement(\"beforebegin\",t.element))}else this._childElementContainer.appendChild(t.element);super.addChild(t,e);const n=1/this.contentItems.length*100;if(!0===i)return this.emitBaseBubblingEvent(\"stateChanged\"),e;for(let e=0;e0&&(this.calculateRelativeSizes(),this.setAbsoluteSizes()),this.emitBaseBubblingEvent(\"stateChanged\"),this.emit(\"resize\")}setAbsoluteSizes(){const t=this.calculateAbsoluteSizes();for(let e=0;e0&&t.itemSizes[e]++,this._isColumn?(Tt(this.contentItems[e].element,t.crossAxisSize),At(this.contentItems[e].element,t.itemSizes[e])):(Tt(this.contentItems[e].element,t.itemSizes[e]),At(this.contentItems[e].element,t.crossAxisSize))}calculateAbsoluteSizes(){const t=(this.contentItems.length-1)*this._splitterSize,{width:e,height:i}=kt(this.element);let n,o;this._isColumn?(n=i-t,o=e):(n=e-t,o=i);let s=0;const r=[];for(let t=0;t0){const n=100-t;for(let t=0;t100&&e.length>0){for(let t=0;te)return;{const r=i/e;let a=i;for(let e=0;ethis.onSplitterDrag(e,t,i))),e.on(\"dragStop\",(()=>this.onSplitterDragStop(e))),e.on(\"dragStart\",(()=>this.onSplitterDragStart(e))),this._splitter.splice(t,0,e),e}getSplitItems(t){const e=this._splitter.indexOf(t);return{before:this.contentItems[e],after:this.contentItems[e+1]}}calculateContentItemMinSize(t){const e=t.minSize;if(void 0!==e){if(t.minSizeUnit===ht.Pixel)return e;throw new X(\"ROCGMD98831\",JSON.stringify(t))}{const t=this.layoutManager.layoutConfig.dimensions;return this._isColumn?t.defaultMinItemHeight:t.defaultMinItemWidth}}calculateContentItemsTotalMinSize(t){let e=0;for(const i of t)e+=this.calculateContentItemMinSize(i);return e}onSplitterDragStart(t){const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=this.calculateContentItemsTotalMinSize(e.before.contentItems),s=this.calculateContentItemsTotalMinSize(e.after.contentItems);this._splitterPosition=0,this._splitterMinPosition=-1*(i-o),this._splitterMaxPosition=n-s}onSplitterDrag(t,e,i){let n=this._isColumn?i:e;if(null===this._splitterMinPosition||null===this._splitterMaxPosition)throw new K(\"ROCOSD59226\");n=Math.max(n,this._splitterMinPosition),n=Math.min(n,this._splitterMaxPosition),this._splitterPosition=n;const o=zt(n);this._isColumn?t.element.style.top=o:t.element.style.left=o}onSplitterDragStop(t){if(null===this._splitterPosition)throw new K(\"ROCOSDS66932\");{const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=(this._splitterPosition+i)/(i+n),s=e.before.size+e.after.size;e.before.size=o*s,e.after.size=(1-o)*s,t.element.style.top=zt(0),t.element.style.left=zt(0),globalThis.requestAnimationFrame((()=>this.updateSize(!1)))}}}!function(t){t.getElementDimensionSize=function(t,e){return\"width\"===e?function(t){return t.offsetWidth}(t):function(t){return t.offsetHeight}(t)},t.setElementDimensionSize=function(t,e,i){return\"width\"===e?Tt(t,i):At(t,i)},t.createElement=function(t,e){const i=t.createElement(\"div\");return i.classList.add(\"lm_item\"),e?i.classList.add(\"lm_column\"):i.classList.add(\"lm_row\"),i}}(Xt||(Xt={}));class Yt extends $t{constructor(t,e,i){super(t,vt.create(e),null,Yt.createElement(document)),this.isGround=!0,this._childElementContainer=this.element,this._containerElement=i;let n=null;for(;;){const t=n?n.previousSibling:this._containerElement.lastChild;if(!(t instanceof Element&&t.classList.contains(\"lm_content\")))break;n=t}this._containerElement.insertBefore(this.element,n)}init(){if(!0!==this.isInitialised){this.updateNodeSize();for(let t=0;t0?this.contentItems[0]:this,n.isComponent)throw new Error(\"Cannot add item as child to ComponentItem\");{const t=this.layoutManager.createAndInitContentItem(i,n);return e=n.addChild(t,e),n===this?-1:e}}loadComponentAsRoot(t){this.clearRoot();const e=Ct.resolve(t,!1);if(e.maximised)throw new Error(\"Root Component cannot be maximised\");{const t=new jt(this.layoutManager,e,this);t.init(),this.addChild(t,0)}}addChild(t,e){if(this.contentItems.length>0)throw new Error(\"Ground node can only have a single child\");return this._childElementContainer.appendChild(t.element),e=super.addChild(t,e),this.updateSize(!1),this.emitBaseBubblingEvent(\"stateChanged\"),e}calculateConfigContent(){const t=this.contentItems,e=t.length,i=new Array(e);for(let n=0;n0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e)),this.updateContentItemsSize(!1))}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}createSideAreas(){const t=Yt.Area.oppositeSides,e=new Array(Object.keys(t).length);let i=0;for(const n in t){const o=n,s=this.getElementArea();if(null===s)throw new K(\"RCSA77553\");s.side=o,\"2\"===t[o][1]?s[o]=s[t[o]]-50:s[o]=s[t[o]]+50,s.surface=(s.x2-s.x1)*(s.y2-s.y1),e[i++]=s}return e}highlightDropZone(t,e,i){this.layoutManager.tabDropPlaceholder.remove(),super.highlightDropZone(t,e,i)}onDrop(t,e){if(t.isComponent){const e=ut.createDefault(),i=t;e.header=mt.Header.createCopy(i.headerConfig);const n=this.layoutManager.createAndInitContentItem(e,this);n.addChild(t),t=n}if(0===this.contentItems.length)this.addChild(t);else{if(t.type===at.row||t.type===at.column){const e=ut.createDefault(),i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}const i=\"x\"==e.side[0]?at.row:at.column,n=\"2\"==e.side[1],o=this.contentItems[0];if(o instanceof Xt&&o.type===i){const e=o.contentItems[n?0:o.contentItems.length-1];o.addChild(t,n?0:void 0,!0),e.size*=.5,t.size=e.size,t.sizeUnit=ht.Percent,o.updateSize(!1)}else{const e=ct.createDefault(i),s=this.layoutManager.createContentItem(e,this);this.replaceChild(o,s),s.addChild(t,n?0:void 0,!0),s.addChild(o,n?void 0:0,!0),o.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}}dock(){throw new X(\"GID87731\")}validateDocking(){throw new X(\"GIVD87732\")}getAllContentItems(){const t=[this];return this.deepGetAllContentItems(this.contentItems,t),t}getConfigMaximisedItems(){const t=[];return this.deepFilterContentItems(this.contentItems,t,(t=>!(!Gt.isStack(t)||!t.initialWantMaximise)||!(!Gt.isComponentItem(t)||!t.initialWantMaximise))),t}getItemsByPopInParentId(t){const e=[];return this.deepFilterContentItems(this.contentItems,e,(e=>e.popInParentIds.includes(t))),e}toConfig(){throw new Error(\"Cannot generate GroundItem config\")}setActiveComponentItem(t,e,i){}updateNodeSize(){const{width:t,height:e}=kt(this._containerElement);Tt(this.element,t),At(this.element,e),this.contentItems.length>0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e))}deepGetAllContentItems(t,e){for(let i=0;ithis.onClick(t),this._touchStartEventListener=t=>this.onTouchStart(t),this._element=document.createElement(\"div\"),this._element.classList.add(i),this._element.title=e,this._header.on(\"destroy\",(()=>this.destroy())),this._element.addEventListener(\"click\",this._clickEventListener,{passive:!0}),this._element.addEventListener(\"touchstart\",this._touchStartEventListener,{passive:!0}),this._header.controlsContainerElement.appendChild(this._element)}get element(){return this._element}destroy(){var t;this._element.removeEventListener(\"click\",this._clickEventListener),this._element.removeEventListener(\"touchstart\",this._touchStartEventListener),null===(t=this._element.parentNode)||void 0===t||t.removeChild(this._element)}onClick(t){this._pushEvent(t)}onTouchStart(t){this._pushEvent(t)}}class Jt{constructor(t,e,i,n,o){var s;this._layoutManager=t,this._componentItem=e,this._closeEvent=i,this._focusEvent=n,this._dragStartEvent=o,this._isActive=!1,this._tabClickListener=t=>this.onTabClickDown(t),this._tabTouchStartListener=t=>this.onTabTouchStart(t),this._closeClickListener=()=>this.onCloseClick(),this._closeTouchStartListener=()=>this.onCloseTouchStart(),this._dragStartListener=(t,e)=>this.onDragStart(t,e),this._contentItemDestroyListener=()=>this.onContentItemDestroy(),this._tabTitleChangedListener=t=>this.setTitle(t),this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_tab\"),this._titleElement=document.createElement(\"span\"),this._titleElement.classList.add(\"lm_title\"),this._closeElement=document.createElement(\"div\"),this._closeElement.classList.add(\"lm_close_tab\"),this._element.appendChild(this._titleElement),this._element.appendChild(this._closeElement),e.isClosable?this._closeElement.style.display=\"\":this._closeElement.style.display=\"none\",this.setTitle(e.title),this._componentItem.on(\"titleChanged\",this._tabTitleChangedListener);(null!==(s=e.reorderEnabled)&&void 0!==s?s:this._layoutManager.layoutConfig.settings.reorderEnabled)&&this.enableReorder(),this._element.addEventListener(\"click\",this._tabClickListener,{passive:!0}),this._element.addEventListener(\"touchstart\",this._tabTouchStartListener,{passive:!0}),this._componentItem.isClosable?(this._closeElement.addEventListener(\"click\",this._closeClickListener,{passive:!0}),this._closeElement.addEventListener(\"touchstart\",this._closeTouchStartListener,{passive:!0})):(this._closeElement.remove(),this._closeElement=void 0),this._componentItem.setTab(this),this._layoutManager.emit(\"tabCreated\",this)}get isActive(){return this._isActive}get componentItem(){return this._componentItem}get contentItem(){return this._componentItem}get element(){return this._element}get titleElement(){return this._titleElement}get closeElement(){return this._closeElement}get reorderEnabled(){return void 0!==this._dragListener}set reorderEnabled(t){t!==this.reorderEnabled&&(t?this.enableReorder():this.disableReorder())}setTitle(t){this._titleElement.innerText=t,this._element.title=t}setActive(t){t!==this._isActive&&(this._isActive=t,t?this._element.classList.add(\"lm_active\"):this._element.classList.remove(\"lm_active\"))}destroy(){var t,e;this._closeEvent=void 0,this._focusEvent=void 0,this._dragStartEvent=void 0,this._element.removeEventListener(\"click\",this._tabClickListener),this._element.removeEventListener(\"touchstart\",this._tabTouchStartListener),null===(t=this._closeElement)||void 0===t||t.removeEventListener(\"click\",this._closeClickListener),null===(e=this._closeElement)||void 0===e||e.removeEventListener(\"touchstart\",this._closeTouchStartListener),this._componentItem.off(\"titleChanged\",this._tabTitleChangedListener),this.reorderEnabled&&this.disableReorder(),this._element.remove()}setBlurred(){this._element.classList.remove(\"lm_focused\"),this._titleElement.classList.remove(\"lm_focused\")}setFocused(){this._element.classList.add(\"lm_focused\"),this._titleElement.classList.add(\"lm_focused\")}onDragStart(t,e){if(void 0===this._dragListener)throw new J(\"TODSDLU10093\");if(void 0===this._dragStartEvent)throw new J(\"TODS23309\");this._dragStartEvent(t,e,this._dragListener,this.componentItem)}onContentItemDestroy(){void 0!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=void 0)}onTabClickDown(t){const e=t.target;e!==this._element&&e!==this._titleElement||(0===t.button?this.notifyFocus():1===t.button&&this._componentItem.isClosable&&this.notifyClose())}onTabTouchStart(t){t.target===this._element&&this.notifyFocus()}onCloseClick(){this.notifyClose()}onCloseTouchStart(){this.notifyClose()}notifyClose(){if(void 0===this._closeEvent)throw new J(\"TNC15007\");this._closeEvent(this._componentItem)}notifyFocus(){if(void 0===this._focusEvent)throw new J(\"TNA15007\");this._focusEvent(this._componentItem)}enableReorder(){this._dragListener=new Zt(this._element,[this._titleElement]),this._dragListener.on(\"dragStart\",this._dragStartListener),this._componentItem.on(\"destroy\",this._contentItemDestroyListener)}disableReorder(){if(void 0===this._dragListener)throw new J(\"TDR87745\");this._componentItem.off(\"destroy\",this._contentItemDestroyListener),this._dragListener.off(\"dragStart\",this._dragStartListener),this._dragListener=void 0}}class Qt{constructor(t,e,i,n,o){this._layoutManager=t,this._componentRemoveEvent=e,this._componentFocusEvent=i,this._componentDragStartEvent=n,this._dropdownActiveChangedEvent=o,this._tabs=[],this._lastVisibleTabIndex=-1,this._dropdownActive=!1,this._element=document.createElement(\"section\"),this._element.classList.add(\"lm_tabs\"),this._dropdownElement=document.createElement(\"section\"),this._dropdownElement.classList.add(\"lm_tabdropdown_list\"),this._dropdownElement.style.display=\"none\"}get tabs(){return this._tabs}get tabCount(){return this._tabs.length}get lastVisibleTabIndex(){return this._lastVisibleTabIndex}get element(){return this._element}get dropdownElement(){return this._dropdownElement}get dropdownActive(){return this._dropdownActive}destroy(){for(let t=0;tthis.handleTabCloseEvent(t)),(t=>this.handleTabFocusEvent(t)),((t,e,i,n)=>this.handleTabDragStartEvent(t,e,i,n)));void 0===e&&(e=this._tabs.length),this._tabs.splice(e,0,i),ethis._lastVisibleTabIndex){const t=this._tabs[e];for(let t=e;t>0;t--)this._tabs[t]=this._tabs[t-1];this._tabs[0]=t}}updateTabSizes(t,e){let i=!1;this.tryUpdateTabSizes(i,t,e)||(i=!0,this.tryUpdateTabSizes(i,t,e)),i!==this._dropdownActive&&(this._dropdownActive=i,this._dropdownActiveChangedEvent())}tryUpdateTabSizes(t,e,i){if(this._tabs.length>0){if(void 0===i)throw new Error(\"non-empty tabs must have active component item\");let n=0,o=!1;const s=this._layoutManager.layoutConfig.settings.tabOverlapAllowance,r=this._tabs.indexOf(i.tab),a=this._tabs[r];this._lastVisibleTabIndex=-1;for(let i=0;ie){if(o)i===r&&(l.style.zIndex=\"auto\",l.style.marginLeft=\"\",l.parentElement!==this._element&&this._element.appendChild(l));else{let t;if(t=r>0&&r<=i?(d-e)/(i-1):(d-e)/i,tthis.onClick(t),this._touchStartListener=t=>this.onTouchStart(t),this._rowColumnClosable=!0,this._closeButton=null,this._popoutButton=null,this._tabsContainer=new Qt(this._layoutManager,(t=>this.handleTabInitiatedComponentRemoveEvent(t)),(t=>this.handleTabInitiatedComponentFocusEvent(t)),((t,e,i,n)=>this.handleTabInitiatedDragStartEvent(t,e,i,n)),(()=>this.processTabDropdownActiveChanged())),this._show=i.show,this._popoutEnabled=i.popoutEnabled,this._popoutLabel=i.popoutLabel,this._maximiseEnabled=i.maximiseEnabled,this._maximiseLabel=i.maximiseLabel,this._minimiseEnabled=i.minimiseEnabled,this._minimiseLabel=i.minimiseLabel,this._closeEnabled=i.closeEnabled,this._closeLabel=i.closeLabel,this._tabDropdownEnabled=i.tabDropdownEnabled,this._tabDropdownLabel=i.tabDropdownLabel,this.setSide(i.side),this._canRemoveComponent=this._configClosable,this._element=document.createElement(\"section\"),this._element.classList.add(\"lm_header\"),this._controlsContainerElement=document.createElement(\"section\"),this._controlsContainerElement.classList.add(\"lm_controls\"),this._element.appendChild(this._tabsContainer.element),this._element.appendChild(this._controlsContainerElement),this._element.appendChild(this._tabsContainer.dropdownElement),this._element.addEventListener(\"click\",this._clickListener,{passive:!0}),this._element.addEventListener(\"touchstart\",this._touchStartListener,{passive:!0}),this._documentMouseUpListener=()=>this._tabsContainer.hideAdditionalTabsDropdown(),globalThis.document.addEventListener(\"mouseup\",this._documentMouseUpListener,{passive:!0}),this._tabControlOffset=this._layoutManager.layoutConfig.settings.tabControlOffset,this._tabDropdownEnabled&&(this._tabDropdownButton=new Kt(this,this._tabDropdownLabel,\"lm_tabdropdown\",(()=>this._tabsContainer.showAdditionalTabsDropdown()))),this._popoutEnabled&&(this._popoutButton=new Kt(this,this._popoutLabel,\"lm_popout\",(()=>this.handleButtonPopoutEvent()))),this._maximiseEnabled&&(this._maximiseButton=new Kt(this,this._maximiseLabel,\"lm_maximise\",(t=>this.handleButtonMaximiseToggleEvent(t)))),this._configClosable&&(this._closeButton=new Kt(this,this._closeLabel,\"lm_close\",(()=>s()))),this.processTabDropdownActiveChanged()}get show(){return this._show}get side(){return this._side}get leftRightSided(){return this._leftRightSided}get layoutManager(){return this._layoutManager}get parent(){return this._parent}get tabs(){return this._tabsContainer.tabs}get lastVisibleTabIndex(){return this._tabsContainer.lastVisibleTabIndex}get element(){return this._element}get tabsContainerElement(){return this._tabsContainer.element}get controlsContainerElement(){return this._controlsContainerElement}destroy(){this.emit(\"destroy\"),this._popoutEvent=void 0,this._maximiseToggleEvent=void 0,this._clickEvent=void 0,this._touchStartEvent=void 0,this._componentRemoveEvent=void 0,this._componentFocusEvent=void 0,this._componentDragStartEvent=void 0,this._tabsContainer.destroy(),globalThis.document.removeEventListener(\"mouseup\",this._documentMouseUpListener),this._element.remove()}createTab(t,e){this._tabsContainer.createTab(t,e)}removeTab(t){this._tabsContainer.removeTab(t)}processActiveComponentChanged(t){this._tabsContainer.processActiveComponentChanged(t),this.updateTabSizes()}setSide(t){this._side=t,this._leftRightSided=[nt.right,nt.left].includes(this._side)}setRowColumnClosable(t){this._rowColumnClosable=t,this.updateClosability()}updateClosability(){let t;if(this._configClosable)if(this._rowColumnClosable){t=!0;const e=this.tabs.length;for(let i=0;i1}applyFocusedValue(t){t?this._element.classList.add(\"lm_focused\"):this._element.classList.remove(\"lm_focused\")}processMaximised(){if(void 0===this._maximiseButton)throw new J(\"HPMAX16997\");this._maximiseButton.element.setAttribute(\"title\",this._minimiseLabel)}processMinimised(){if(void 0===this._maximiseButton)throw new J(\"HPMIN16997\");this._maximiseButton.element.setAttribute(\"title\",this._maximiseLabel)}updateTabSizes(){if(this._tabsContainer.tabCount>0){const t=this._show?this._layoutManager.layoutConfig.dimensions.headerHeight:0;let e;this._leftRightSided?(this._element.style.height=\"\",this._element.style.width=zt(t)):(this._element.style.width=\"\",this._element.style.height=zt(t)),e=this._leftRightSided?this._element.offsetHeight-this._controlsContainerElement.offsetHeight-this._tabControlOffset:this._element.offsetWidth-this._controlsContainerElement.offsetWidth-this._tabControlOffset,this._tabsContainer.updateTabSizes(e,this._getActiveComponentItemEvent())}}handleTabInitiatedComponentRemoveEvent(t){if(this._canRemoveComponent){if(void 0===this._componentRemoveEvent)throw new J(\"HHTCE22294\");this._componentRemoveEvent(t)}}handleTabInitiatedComponentFocusEvent(t){if(void 0===this._componentFocusEvent)throw new J(\"HHTAE22294\");this._componentFocusEvent(t)}handleTabInitiatedDragStartEvent(t,e,i,n){if(this._canRemoveComponent){if(void 0===this._componentDragStartEvent)throw new J(\"HHTDSE22294\");this._componentDragStartEvent(t,e,i,n)}else i.cancelDrag()}processTabDropdownActiveChanged(){void 0!==this._tabDropdownButton&&Dt(this._tabDropdownButton.element,this._tabsContainer.dropdownActive)}handleButtonPopoutEvent(){if(this._layoutManager.layoutConfig.settings.popoutWholeStack){if(void 0===this._popoutEvent)throw new J(\"HHBPOE17834\");this._popoutEvent()}else{const t=this._getActiveComponentItemEvent();t&&t.popout()}}handleButtonMaximiseToggleEvent(t){if(void 0===this._maximiseToggleEvent)throw new J(\"HHBMTE16834\");this._maximiseToggleEvent()}onClick(t){t.target===this._element&&this.notifyClick(t)}onTouchStart(t){t.target===this._element&&this.notifyTouchStart(t)}notifyClick(t){if(void 0===this._clickEvent)throw new J(\"HNHC46834\");this._clickEvent(t)}notifyTouchStart(t){if(void 0===this._touchStartEvent)throw new J(\"HNHTS46834\");this._touchStartEvent(t)}}class ee extends $t{constructor(t,e,i){var n,o,s,r,a,l,h,d,c,m,u,p,g,f,v,_,y,C,w;super(t,e,i,ee.createElement(document)),this._headerSideChanged=!1,this._resizeListener=()=>this.handleResize(),this._maximisedListener=()=>this.handleMaximised(),this._minimisedListener=()=>this.handleMinimised(),this._headerConfig=e.header;const I=t.layoutConfig.header,b=e.content;let S;if(1!==b.length)S=void 0;else{S=b[0].header}this._initialWantMaximise=e.maximised,this._initialActiveItemIndex=null!==(n=e.activeItemIndex)&&void 0!==n?n:0;const E=null!==(r=null!==(s=null===(o=this._headerConfig)||void 0===o?void 0:o.show)&&void 0!==s?s:null==S?void 0:S.show)&&void 0!==r?r:I.show,x=null!==(h=null!==(l=null===(a=this._headerConfig)||void 0===a?void 0:a.popout)&&void 0!==l?l:null==S?void 0:S.popout)&&void 0!==h?h:I.popout,L=null!==(m=null!==(c=null===(d=this._headerConfig)||void 0===d?void 0:d.maximise)&&void 0!==c?c:null==S?void 0:S.maximise)&&void 0!==m?m:I.maximise,z=null!==(g=null!==(p=null===(u=this._headerConfig)||void 0===u?void 0:u.close)&&void 0!==p?p:null==S?void 0:S.close)&&void 0!==g?g:I.close,M=null!==(_=null!==(v=null===(f=this._headerConfig)||void 0===f?void 0:f.minimise)&&void 0!==v?v:null==S?void 0:S.minimise)&&void 0!==_?_:I.minimise,P=null!==(w=null!==(C=null===(y=this._headerConfig)||void 0===y?void 0:y.tabDropdown)&&void 0!==C?C:null==S?void 0:S.tabDropdown)&&void 0!==w?w:I.tabDropdown;this._maximisedEnabled=!1!==L;const T={show:!1!==E,side:!1===E?nt.top:E,popoutEnabled:!1!==x,popoutLabel:!1===x?\"\":x,maximiseEnabled:this._maximisedEnabled,maximiseLabel:!1===L?\"\":L,closeEnabled:!1!==z,closeLabel:!1===z?\"\":z,minimiseEnabled:!0,minimiseLabel:M,tabDropdownEnabled:!1!==P,tabDropdownLabel:!1===P?\"\":P};this._header=new te(t,this,T,e.isClosable&&!1!==z,(()=>this.getActiveComponentItem()),(()=>this.remove()),(()=>this.handlePopoutEvent()),(()=>this.toggleMaximise()),(t=>this.handleHeaderClickEvent(t)),(t=>this.handleHeaderTouchStartEvent(t)),(t=>this.handleHeaderComponentRemoveEvent(t)),(t=>this.handleHeaderComponentFocusEvent(t)),((t,e,i,n)=>this.handleHeaderComponentStartDragEvent(t,e,i,n))),this.isStack=!0,this._childElementContainer=document.createElement(\"section\"),this._childElementContainer.classList.add(\"lm_items\"),this.on(\"resize\",this._resizeListener),this._maximisedEnabled&&(this.on(\"maximised\",this._maximisedListener),this.on(\"minimised\",this._minimisedListener)),this.element.appendChild(this._header.element),this.element.appendChild(this._childElementContainer),this.setupHeaderPosition(),this._header.updateClosability()}get childElementContainer(){return this._childElementContainer}get header(){return this._header}get headerShow(){return this._header.show}get headerSide(){return this._header.side}get headerLeftRightSided(){return this._header.leftRightSided}get contentAreaDimensions(){return this._contentAreaDimensions}get initialWantMaximise(){return this._initialWantMaximise}get isMaximised(){return this===this.layoutManager.maximisedStack}get stackParent(){if(!this.parent)throw new Error(\"Stack should always have a parent\");return this.parent}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}init(){if(!0===this.isInitialised)return;this.updateNodeSize();for(let t=0;t0){if(this._initialActiveItemIndex<0||this._initialActiveItemIndex>=e)throw new Error(`ActiveItemIndex out of range: ${this._initialActiveItemIndex} id: ${this.id}`);for(let i=0;ithis.contentItems.length)throw e-=1,new X(\"SAC99728\");if(t instanceof jt)return e=super.addChild(t,e),this._childElementContainer.appendChild(t.element),this._header.createTab(t,e),this.setActiveComponentItem(t,i),this._header.updateTabSizes(),this.updateSize(!1),t.container.setBaseLogicalZIndex(),this._header.updateClosability(),this.emitStateChangedEvent(),e;throw new X(\"SACC88532\")}removeChild(t,e){const i=t,n=this.contentItems.indexOf(i),o=1===this.contentItems.length;if(this._activeComponentItem===i&&(i.focused&&i.blur(),!o)){const t=0===n?1:n-1;this.setActiveComponentItem(this.contentItems[t],!1)}this._header.removeTab(i),super.removeChild(i,e),o||this._header.updateClosability(),this.emitStateChangedEvent()}toggleMaximise(){this.isMaximised?this.minimise():this.maximise()}maximise(){if(!this.isMaximised){this.layoutManager.setMaximisedStack(this);const t=this.contentItems,e=t.length;for(let i=0;i0&&void 0===t)throw new Error(\"expected non-empty stack to have an active component item\");return{type:\"stack\",content:this.calculateConfigContent(),size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,isClosable:this.isClosable,maximised:this.isMaximised,header:this.createHeaderConfig(),activeItemIndex:t}}onDrop(t,e){if(\"header\"===this._dropSegment){if(this.resetHeaderDropZone(),void 0===this._dropIndex)throw new J(\"SODDI68990\");return void this.addChild(t,this._dropIndex)}if(\"body\"===this._dropSegment)return void this.addChild(t,0,!0);const i=\"top\"===this._dropSegment||\"bottom\"===this._dropSegment,n=\"left\"===this._dropSegment||\"right\"===this._dropSegment,o=\"top\"===this._dropSegment||\"left\"===this._dropSegment,s=i&&this.stackParent.isColumn||n&&this.stackParent.isRow;if(t.isComponent){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createAndInitContentItem(e,this);i.addChild(t),t=i}if(t.type===at.row||t.type===at.column){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}if(s){const e=this.stackParent.contentItems.indexOf(this);this.stackParent.addChild(t,o?e:e+1,!0),this.size*=.5,t.size=this.size,t.sizeUnit=this.sizeUnit,this.stackParent.updateSize(!1)}else{const e=i?at.column:at.row,n=ct.createDefault(e),s=this.layoutManager.createContentItem(n,this);this.stackParent.replaceChild(this,s),s.addChild(t,o?0:void 0,!0),s.addChild(this,o?void 0:0,!0),this.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}highlightDropZone(t,e){for(const i in this._contentAreaDimensions){const n=i,o=this._contentAreaDimensions[n].hoverArea;if(o.x1t&&o.y1e)return void(\"header\"===n?(this._dropSegment=\"header\",this.highlightHeaderDropZone(this._header.leftRightSided?e:t)):(this.resetHeaderDropZone(),this.highlightBodyDropZone(n)))}}getArea(){if(\"none\"===this.element.style.display)return null;const t=super.getElementArea(this._header.element),e=super.getElementArea(this._childElementContainer);if(null===t||null===e)throw new K(\"SGAHC13086\");const i=e.x2-e.x1,n=e.y2-e.y1;return this._contentAreaDimensions={header:{hoverArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2},highlightArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2}}},0===this.contentItems.length?(this._contentAreaDimensions.body={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2}},super.getElementArea(this.element)):(this._contentAreaDimensions.left={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x1+.25*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x1+.5*i,y2:e.y2}},this._contentAreaDimensions.top={hoverArea:{x1:e.x1+.25*i,y1:e.y1,x2:e.x1+.75*i,y2:e.y1+.5*n},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y1+.5*n}},this._contentAreaDimensions.right={hoverArea:{x1:e.x1+.75*i,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1+.5*i,y1:e.y1,x2:e.x2,y2:e.y2}},this._contentAreaDimensions.bottom={hoverArea:{x1:e.x1+.25*i,y1:e.y1+.5*n,x2:e.x1+.75*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1+.5*n,x2:e.x2,y2:e.y2}},super.getElementArea(this.element))}positionHeader(t){this._header.side!==t&&(this._header.setSide(t),this._headerSideChanged=!0,this.setupHeaderPosition())}updateNodeSize(){if(\"none\"!==this.element.style.display){const t=kt(this.element);if(this._header.show){t[this._header.leftRightSided?it.width:it.height]-=this.layoutManager.layoutConfig.dimensions.headerHeight}this._childElementContainer.style.width=zt(t.width),this._childElementContainer.style.height=zt(t.height);for(let e=0;e=o&&tthis.onDrag(t,e,i))),this._dragListener.on(\"dragStop\",(()=>this.onDrop())),this.createDragProxyElements(t,e),null===this._componentItem.parent)throw new K(\"DPC10097\");this._componentItemFocused=this._componentItem.focused,this._componentItemFocused&&this._componentItem.blur(),this._componentItem.parent.removeChild(this._componentItem,!0),this.setDimensions(),document.body.appendChild(this._element),this.determineMinMaxXY(),this._layoutManager.calculateItemAreas(),this.setDropPosition(t,e)}get element(){return this._element}createDragProxyElements(t,e){this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_dragProxy\");const i=document.createElement(\"div\");i.classList.add(\"lm_header\");const n=document.createElement(\"div\");n.classList.add(\"lm_tabs\");const o=document.createElement(\"div\");o.classList.add(\"lm_tab\");const s=document.createElement(\"span\");s.classList.add(\"lm_title\"),o.appendChild(s),n.appendChild(o),i.appendChild(n),this._proxyContainerElement=document.createElement(\"div\"),this._proxyContainerElement.classList.add(\"lm_content\"),this._element.appendChild(i),this._element.appendChild(this._proxyContainerElement),this._originalParent instanceof ee&&this._originalParent.headerShow&&(this._sided=this._originalParent.headerLeftRightSided,this._element.classList.add(\"lm_\"+this._originalParent.headerSide),[nt.right,nt.bottom].indexOf(this._originalParent.headerSide)>=0&&this._proxyContainerElement.insertAdjacentElement(\"afterend\",i)),this._element.style.left=zt(t),this._element.style.top=zt(e),o.setAttribute(\"title\",this._componentItem.title),s.insertAdjacentText(\"afterbegin\",this._componentItem.title),this._proxyContainerElement.appendChild(this._componentItem.element)}determineMinMaxXY(){const t=this._layoutManager.groundItem;if(void 0===t)throw new J(\"DPDMMXY73109\");{const e=t.element.getBoundingClientRect();this._minX=e.left+document.body.scrollLeft,this._minY=e.top+document.body.scrollTop,this._maxX=this._minX+e.width,this._maxY=this._minY+e.height}}onDrag(t,e,i){const n=i.pageX,o=i.pageY;this.setDropPosition(n,o),this._componentItem.drag()}setDropPosition(t,e){this._layoutManager.layoutConfig.settings.constrainDragToContainer&&(t<=this._minX?t=Math.ceil(this._minX):t>=this._maxX&&(t=Math.floor(this._maxX)),e<=this._minY?e=Math.ceil(this._minY):e>=this._maxY&&(e=Math.floor(this._maxY))),this._element.style.left=zt(t),this._element.style.top=zt(e),this._area=this._layoutManager.getArea(t,e),null!==this._area&&(this._lastValidArea=this._area,this._area.contentItem.highlightDropZone(t,e,this._area))}onDrop(){const t=this._layoutManager.dropTargetIndicator;if(null===t)throw new K(\"DPOD30011\");let e;if(t.hide(),this._componentItem.exitDragMode(),null!==this._area)e=this._componentItem,this._area.contentItem.onDrop(e,this._area);else if(null!==this._lastValidArea){e=this._componentItem;this._lastValidArea.contentItem.onDrop(e,this._lastValidArea)}else this._originalParent?(e=this._componentItem,this._originalParent.addChild(e)):this._componentItem.destroy();this._element.remove(),this._layoutManager.emit(\"itemDropped\",this._componentItem),this._componentItemFocused&&void 0!==e&&e.focus()}setDimensions(){const t=this._layoutManager.layoutConfig.dimensions;if(void 0===t)throw new Error(\"DragProxy.setDimensions: dimensions undefined\");let e=t.dragProxyWidth,i=t.dragProxyHeight;if(void 0===e||void 0===i)throw new Error(\"DragProxy.setDimensions: width and/or height undefined\");const n=!1===this._layoutManager.layoutConfig.header.show?0:t.headerHeight;this._element.style.width=zt(e),this._element.style.height=zt(i),e-=this._sided?n:0,i-=this._sided?0:n,this._proxyContainerElement.style.width=zt(e),this._proxyContainerElement.style.height=zt(i),this._componentItem.enterDragMode(e,i),this._componentItem.show()}}class ne{constructor(t,e,i,n,o,s,r){this._layoutManager=t,this._element=e,this._extraAllowableChildTargets=i,this._componentTypeOrFtn=n,this._componentState=o,this._title=s,this._id=r,this._dragListener=null,this._dummyGroundContainer=document.createElement(\"div\");const a=gt.createDefault(\"row\");this._dummyGroundContentItem=new Yt(this._layoutManager,a,this._dummyGroundContainer),this.createDragListener()}destroy(){this.removeDragListener()}createDragListener(){this.removeDragListener(),this._dragListener=new Zt(this._element,this._extraAllowableChildTargets),this._dragListener.on(\"dragStart\",((t,e)=>this.onDragStart(t,e))),this._dragListener.on(\"dragStop\",(()=>this.onDragStop()))}onDragStart(t,e){var i;const n=\"component\";let o;if(\"function\"==typeof this._componentTypeOrFtn){const t=this._componentTypeOrFtn();o=ne.isDragSourceComponentItemConfig(t)?{type:n,componentState:t.state,componentType:t.type,title:null!==(i=t.title)&&void 0!==i?i:this._title}:t}else o={type:n,componentState:this._componentState,componentType:this._componentTypeOrFtn,title:this._title,id:this._id};const s=bt.resolve(o,!1),r=new jt(this._layoutManager,s,this._dummyGroundContentItem);if(this._dummyGroundContentItem.contentItems.push(r),null===this._dragListener)throw new K(\"DSODSD66746\");{const i=new ie(t,e,this._dragListener,this._layoutManager,r,this._dummyGroundContentItem),n=this._layoutManager.transitionIndicator;if(null===n)throw new K(\"DSODST66746\");n.transitionElements(this._element,i.element)}}onDragStop(){this.createDragListener()}removeDragListener(){null!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=null)}}!function(t){t.isDragSourceComponentItemConfig=function(t){return!(\"componentType\"in t)}}(ne||(ne={}));class oe{constructor(){this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_dropTargetIndicator\");const t=document.createElement(\"div\");t.classList.add(\"lm_inner\"),this._element.appendChild(t),document.body.appendChild(this._element)}destroy(){this._element.remove()}highlightArea(t,e){this._element.style.left=zt(t.x1+e),this._element.style.top=zt(t.y1+e),this._element.style.width=zt(t.x2-t.x1-e),this._element.style.height=zt(t.y2-t.y1-e),this._element.style.display=\"block\"}hide(){Dt(this._element,!1)}}class se{constructor(){this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_transition_indicator\"),document.body.appendChild(this._element),this._toElement=null,this._fromDimensions=null,this._totalAnimationDuration=200,this._animationStartTime=null}destroy(){this._element.remove()}transitionElements(t,e){}nextAnimationFrame(){}measure(t){const e=t.getBoundingClientRect();return{left:e.left,top:e.top,width:t.offsetWidth,height:t.offsetHeight}}}class re extends Wt{constructor(t){super(),this._layoutManager=t,this._childEventListener=t=>this.onEventFromChild(t),globalThis.addEventListener(re.ChildEventName,this._childEventListener,{passive:!0})}emit(t,...e){\"userBroadcast\"===t?this.emitUserBroadcast(...e):super.emit(t,...e)}emitUserBroadcast(...t){this.handleUserBroadcastEvent(\"userBroadcast\",t)}destroy(){globalThis.removeEventListener(re.ChildEventName,this._childEventListener)}handleUserBroadcastEvent(t,e){this._layoutManager.isSubWindow?this.propagateToParent(t,e):this.propagateToThisAndSubtree(t,e)}onEventFromChild(t){const e=t.detail;this.handleUserBroadcastEvent(e.eventName,e.args)}propagateToParent(t,e){const i={bubbles:!0,cancelable:!0,detail:{layoutManager:this._layoutManager,eventName:t,args:e}},n=new CustomEvent(re.ChildEventName,i),o=globalThis.opener;if(null===o)throw new K(\"EHPTP15778\");o.dispatchEvent(n)}propagateToThisAndSubtree(t,e){this.emitUnknown(t,...e);for(let i=0;ithis.handleContainerResize())),this._windowBeforeUnloadListener=()=>this.onBeforeUnload(),this._windowBeforeUnloadListening=!1,this._maximisedStackBeforeDestroyedListener=t=>this.cleanupBeforeMaximisedStackDestroyed(t),this.isSubWindow=t.isSubWindow,this._constructorOrSubWindowLayoutConfig=t.constructorOrSubWindowLayoutConfig,Q.checkInitialise(),dt.checkInitialise(),void 0!==t.containerElement&&(this._containerElement=t.containerElement)}get container(){return this._containerElement}get isInitialised(){return this._isInitialised}get groundItem(){return this._groundItem}get root(){return this._groundItem}get openPopouts(){return this._openPopouts}get dropTargetIndicator(){return this._dropTargetIndicator}get transitionIndicator(){return this._transitionIndicator}get width(){return this._width}get height(){return this._height}get eventHub(){return this._eventHub}get rootItem(){if(void 0===this._groundItem)throw new Error(\"Cannot access rootItem before init\");return 0===this._groundItem.contentItems.length?void 0:this._groundItem.contentItems[0]}get focusedComponentItem(){return this._focusedComponentItem}get tabDropPlaceholder(){return this._tabDropPlaceholder}get maximisedStack(){return this._maximisedStack}get deprecatedConstructor(){return!this.isSubWindow&&void 0!==this._constructorOrSubWindowLayoutConfig}destroy(){if(this._isInitialised){this._windowBeforeUnloadListening&&(globalThis.removeEventListener(\"beforeunload\",this._windowBeforeUnloadListener),this._windowBeforeUnloadListening=!1),!0===this.layoutConfig.settings.closePopoutsOnUnload&&this.closeAllOpenPopouts(),this._resizeObserver.disconnect(),this.checkClearResizeTimeout(),void 0!==this._groundItem&&this._groundItem.destroy(),this._tabDropPlaceholder.remove(),null!==this._dropTargetIndicator&&this._dropTargetIndicator.destroy(),null!==this._transitionIndicator&&this._transitionIndicator.destroy(),this._eventHub.destroy();for(const t of this._dragSources)t.destroy();this._dragSources=[],this._isInitialised=!1}}minifyConfig(t){return _t.minifyConfig(t)}unminifyConfig(t){return _t.unminifyConfig(t)}init(){let t;if(this.setContainer(),this._dropTargetIndicator=new oe,this._transitionIndicator=new se,this.updateSizeFromContainer(),this.isSubWindow){if(void 0===this._constructorOrSubWindowLayoutConfig)throw new J(\"LMIU07155\");{const e=this._constructorOrSubWindowLayoutConfig.root;if(void 0===e)throw new X(\"LMIC07156\");if(!Ct.isComponent(e))throw new X(\"LMIC07157\");t=e;const i=xt.resolve(this._constructorOrSubWindowLayoutConfig);this.layoutConfig=Object.assign(Object.assign({},i),{root:void 0})}}else void 0===this._constructorOrSubWindowLayoutConfig?this.layoutConfig=_t.createDefault():this.layoutConfig=xt.resolve(this._constructorOrSubWindowLayoutConfig);const e=this.layoutConfig;this._groundItem=new Yt(this,e.root,this._containerElement),this._groundItem.init(),this.checkLoadedLayoutMaximiseItem(),this._resizeObserver.observe(this._containerElement),this._isInitialised=!0,this.adjustColumnsResponsive(),this.emit(\"initialised\"),void 0!==t&&this.loadComponentAsRoot(t)}loadLayout(t){if(!this.isInitialised)throw new Error(\"GoldenLayout: Need to call init() if LayoutConfig with defined root passed to constructor\");if(void 0===this._groundItem)throw new J(\"LMLL11119\");this.createSubWindows(),this.layoutConfig=xt.resolve(t),this._groundItem.loadRoot(this.layoutConfig.root),this.checkLoadedLayoutMaximiseItem(),this.adjustColumnsResponsive()}saveLayout(){if(!1===this._isInitialised)throw new Error(\"Can't create config, layout not yet initialised\");if(void 0===this._groundItem)throw new J(\"LMTC18244\");{const t=this._groundItem.calculateConfigContent();let e;e=1!==t.length?void 0:t[0],this.reconcilePopoutWindows();const i=[];for(let t=0;t=0?n=this._groundItem.contentItems[0]:e=0;break;case at.row:case at.column:e=n.addItem(t,i.index);break;case at.stack:if(Ct.isComponent(t)){e=n.addItem(t,i.index);break}throw Error(tt[6]);case at.component:throw new X(\"LMAIALC87444602\");default:throw new Y(\"LMAIALU98881733\",n.type)}if(Ct.isComponent(t)){const t=n.contentItems[e];Gt.isStack(t)&&(n=t,e=0)}return i.parentItem=n,i.index=e,i}}}loadComponentAsRoot(t){if(void 0===this._groundItem)throw new Error(\"Cannot add item before init\");this._groundItem.loadComponentAsRoot(t)}updateSize(t,e){this.setSize(t,e)}setSize(t,e){if(this._width=t,this._height=e,!0===this._isInitialised){if(void 0===this._groundItem)throw new J(\"LMUS18881\");if(this._groundItem.setSize(this._width,this._height),this._maximisedStack){const{width:t,height:e}=kt(this._containerElement);Tt(this._maximisedStack.element,t),At(this._maximisedStack.element,e),this._maximisedStack.updateSize(!1)}this.adjustColumnsResponsive()}}beginSizeInvalidation(){this._sizeInvalidationBeginCount++}endSizeInvalidation(){0==--this._sizeInvalidationBeginCount&&this.updateSizeFromContainer()}updateSizeFromContainer(){const{width:t,height:e}=kt(this._containerElement);this.setSize(t,e)}updateRootSize(t=!1){if(void 0===this._groundItem)throw new J(\"LMURS28881\");this._groundItem.updateSize(t)}createAndInitContentItem(t,e){const i=this.createContentItem(t,e);return i.init(),i}createContentItem(t,e){if(\"string\"!=typeof t.type)throw new G(\"Missing parameter 'type'\",JSON.stringify(t));if(ct.isComponentItem(t)&&!(e instanceof ee)&&e&&!(!0===this.isSubWindow&&e instanceof Yt)){t={type:at.stack,content:[t],size:t.size,sizeUnit:t.sizeUnit,minSize:t.minSize,minSizeUnit:t.minSizeUnit,id:t.id,maximised:t.maximised,isClosable:t.isClosable,activeItemIndex:0,header:void 0}}return this.createContentItemFromConfig(t,e)}findFirstComponentItemById(t){if(void 0===this._groundItem)throw new J(\"LMFFCIBI82446\");return this.findFirstContentItemTypeByIdRecursive(at.component,t,this._groundItem)}createPopout(t,e,i,n){return t instanceof Gt?this.createPopoutFromContentItem(t,e,i,n):this.createPopoutFromItemConfig(t,e,i,n)}createPopoutFromContentItem(t,e,i,n){let o=t.parent,s=t;for(;null!==o&&1===o.contentItems.length&&!o.isGround;)s=o,o=o.parent;if(null===o)throw new K(\"LMCPFCI00834\");{if(void 0===n&&(n=o.contentItems.indexOf(s)),null!==i&&o.addPopInParentId(i),void 0===e){const i=globalThis.screenX||globalThis.screenLeft,n=globalThis.screenY||globalThis.screenTop,o=t.element.offsetLeft,s=t.element.offsetTop,{width:r,height:a}=kt(t.element);e={left:i+o,top:n+s,width:r,height:a}}const r=t.toConfig();if(t.remove(),ft.isRootItemConfig(r))return this.createPopoutFromItemConfig(r,e,i,n);throw new Error(`${tt[0]}`)}}beginVirtualSizedContainerAdding(){0==++this._virtualSizedContainerAddingBeginCount&&(this._virtualSizedContainers.length=0)}addVirtualSizedContainer(t){this._virtualSizedContainers.push(t)}endVirtualSizedContainerAdding(){if(0==--this._virtualSizedContainerAddingBeginCount){const t=this._virtualSizedContainers.length;if(t>0){this.fireBeforeVirtualRectingEvent(t);for(let e=0;ethis.emit(\"windowOpened\",a))),a.on(\"closed\",(()=>this.reconcilePopoutWindows())),this._openPopouts.push(a),this.layoutConfig.settings.closePopoutsOnUnload&&!this._windowBeforeUnloadListening&&(globalThis.addEventListener(\"beforeunload\",this._windowBeforeUnloadListener,{passive:!0}),this._windowBeforeUnloadListening=!0),a}closeAllOpenPopouts(){for(let t=0;tglobalThis.close()),1)}getArea(t,e){let i=null,n=1/0;for(let o=0;o=s.x1&&t=s.y1&&es.surface&&(n=s.surface,i=s)}return i}calculateItemAreas(){const t=this.getAllContentItems(),e=this._groundItem;if(void 0===e)throw new J(\"LMCIAR44365\");if(1!==t.length){e.contentItems[0].isStack?this._itemAreas=[]:this._itemAreas=e.createSideAreas();for(let e=0;e0){let e=t[0];if(Gt.isComponentItem(e)){const t=e.parent;if(null===t)throw new K(\"LMXLLMI69999\");e=t}if(!Gt.isStack(e))throw new X(\"LMCLLMI19993\");e.maximise()}}}processMaximiseStack(t){if(this._maximisedStack=t,t.on(\"beforeItemDestroyed\",this._maximisedStackBeforeDestroyedListener),t.element.classList.add(\"lm_maximised\"),t.element.insertAdjacentElement(\"afterend\",this._maximisePlaceholder),void 0===this._groundItem)throw new J(\"LMMXI19993\");{this._groundItem.element.prepend(t.element);const{width:e,height:i}=kt(this._containerElement);Tt(t.element,e),At(t.element,i),t.updateSize(!0),t.focusActiveContentItem(),this._maximisedStack.emit(\"maximised\"),this.emit(\"stateChanged\")}}processMinimiseMaximisedStack(){if(void 0===this._maximisedStack)throw new X(\"LMMMS74422\");{const t=this._maximisedStack;if(null===t.parent)throw new K(\"LMMI13668\");t.element.classList.remove(\"lm_maximised\"),this._maximisePlaceholder.insertAdjacentElement(\"afterend\",t.element),this._maximisePlaceholder.remove(),this.updateRootSize(!0),this._maximisedStack=void 0,t.off(\"beforeItemDestroyed\",this._maximisedStackBeforeDestroyedListener),t.emit(\"minimised\"),this.emit(\"stateChanged\")}}reconcilePopoutWindows(){const t=[];for(let e=0;e{this._resizeTimeoutId=void 0,this.beginSizeInvalidation(),this.endSizeInvalidation()}),this.resizeDebounceInterval))}checkClearResizeTimeout(){void 0!==this._resizeTimeoutId&&(clearTimeout(this._resizeTimeoutId),this._resizeTimeoutId=void 0)}setContainer(){var t;const e=document.body,i=null!==(t=this._containerElement)&&void 0!==t?t:e;if(i===e){this.resizeWithContainerAutomatically=!0;const t=document.documentElement;t.style.height=\"100%\",t.style.margin=\"0\",t.style.padding=\"0\",t.style.overflow=\"clip\",e.style.height=\"100%\",e.style.margin=\"0\",e.style.padding=\"0\",e.style.overflow=\"clip\"}this._containerElement=i}onBeforeUnload(){this.destroy()}adjustColumnsResponsive(){if(void 0===this._groundItem)throw new J(\"LMACR20883\");if(this._firstLoad=!1,this.useResponsiveLayout()&&!this._updatingColumnsResponsive&&this._groundItem.contentItems.length>0&&this._groundItem.contentItems[0].isRow){if(void 0===this._groundItem||null===this._width)throw new J(\"LMACR77412\");{const t=this._groundItem.contentItems[0].contentItems.length;if(t<=1)return;{const e=this.layoutConfig.dimensions.defaultMinItemWidth;if(t*e<=this._width)return;{this._updatingColumnsResponsive=!0;const i=t-Math.max(Math.floor(this._width/e),1),n=this._groundItem.contentItems[0],o=this.getAllStacks();if(0===o.length)throw new X(\"LMACRS77413\");{const t=o[0];for(let e=0;en?void 0:{parentItem:t,index:o}}}case 1:if(void 0===this._focusedComponentItem)return;{const t=this._focusedComponentItem.parentItem;return this.tryCreateLocationFromParentItem(t,e)}case 2:{const t=this.findFirstContentItemType(at.stack);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 3:{let t=this.findFirstContentItemType(at.row);return void 0!==t?this.tryCreateLocationFromParentItem(t,e):(t=this.findFirstContentItemType(at.column),void 0!==t?this.tryCreateLocationFromParentItem(t,e):void 0)}case 4:{const t=this.findFirstContentItemType(at.row);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 5:{const t=this.findFirstContentItemType(at.column);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 6:if(void 0===this._groundItem)throw new J(\"LMFLRIF18244\");return void 0!==this.rootItem?void 0:void 0===e||0===e?{parentItem:this._groundItem,index:0}:void 0;case 7:if(void 0===this._groundItem)throw new J(\"LMFLF18244\");{const t=this._groundItem.contentItems;if(0===t.length)return void 0===e||0===e?{parentItem:this._groundItem,index:0}:void 0;{const i=t[0];return this.tryCreateLocationFromParentItem(i,e)}}}}tryCreateLocationFromParentItem(t,e){const i=t.contentItems.length;return void 0===e?{parentItem:t,index:i}:e<0||e>i?void 0:{parentItem:t,index:e}}}!function(t){t.createMaximisePlaceElement=function(t){const e=t.createElement(\"div\");return e.classList.add(\"lm_maximise_place\"),e},t.createTabDropPlaceholderElement=function(t){const e=t.createElement(\"div\");return e.classList.add(\"lm_drop_tab_placeholder\"),e},t.defaultLocationSelectors=[{typeId:1,index:void 0},{typeId:2,index:void 0},{typeId:3,index:void 0},{typeId:7,index:void 0}],t.afterFocusedItemIfPossibleLocationSelectors=[{typeId:0,index:1},{typeId:2,index:void 0},{typeId:3,index:void 0},{typeId:7,index:void 0}]}(ae||(ae={}));class le extends ae{constructor(t,e,i,n){if(super(le.createLayoutManagerConstructorParameters(t,e)),this._bindComponentEventHanlderPassedInConstructor=!1,this._creationTimeoutPassed=!1,void 0!==e&&\"function\"==typeof e&&(this.bindComponentEvent=e,this._bindComponentEventHanlderPassedInConstructor=!0,void 0!==i&&(this.unbindComponentEvent=i)),!this._bindComponentEventHanlderPassedInConstructor&&this.isSubWindow){if(void 0===this._constructorOrSubWindowLayoutConfig)throw new J(\"VLC98823\");{const t=xt.resolve(this._constructorOrSubWindowLayoutConfig);this.layoutConfig=Object.assign(Object.assign({},t),{root:void 0})}}!0!==n&&(this.deprecatedConstructor||this.init())}destroy(){this.bindComponentEvent=void 0,this.unbindComponentEvent=void 0,super.destroy()}init(){if(this._bindComponentEventHanlderPassedInConstructor||\"loading\"!==document.readyState&&null!==document.body){if(!this._bindComponentEventHanlderPassedInConstructor&&!0===this.isSubWindow&&!this._creationTimeoutPassed)return setTimeout((()=>this.init()),7),void(this._creationTimeoutPassed=!0);!0===this.isSubWindow&&(this._bindComponentEventHanlderPassedInConstructor||this.clearHtmlAndAdjustStylesForSubWindow(),window.__glInstance=this),super.init()}else document.addEventListener(\"DOMContentLoaded\",(()=>this.init()),{passive:!0})}clearHtmlAndAdjustStylesForSubWindow(){const t=document.head,e=new Array(4);e[0]=document.querySelectorAll(\"body link\"),e[1]=document.querySelectorAll(\"body style\"),e[2]=document.querySelectorAll(\"template\"),e[3]=document.querySelectorAll(\".gl_keep\");for(let i=0;ithis.emit(\"popIn\"))),document.body.appendChild(t),!0}}bindComponent(t,e){if(void 0!==this.bindComponentEvent){return this.bindComponentEvent(t,e)}if(void 0!==this.getComponentEvent)return{virtual:!1,component:this.getComponentEvent(t,e)};{const t=`${tt[2]}: ${JSON.stringify(e)}`;throw new Z(t)}}unbindComponent(t,e,i){if(void 0!==this.unbindComponentEvent)this.unbindComponentEvent(t);else if(!e&&void 0!==this.releaseComponentEvent){if(void 0===i)throw new J(\"VCUCRCU333998\");this.releaseComponentEvent(t,i)}}}!function(t){let e=!1;t.createLayoutManagerConstructorParameters=function(t,i){const n=e?null:new URL(document.location.href).searchParams.get(\"gl-window\");e=!0;const o=null!==n;let s,r;if(null!==n){const e=localStorage.getItem(n);if(null===e)throw new Error(\"Null gl-window Config\");localStorage.removeItem(n);const i=JSON.parse(e),o=_t.unminifyConfig(i);r=xt.fromResolved(o),t instanceof HTMLElement&&(s=t)}else void 0===t?r=void 0:t instanceof HTMLElement?(r=void 0,s=t):r=t,void 0===s&&i instanceof HTMLElement&&(s=i);return{constructorOrSubWindowLayoutConfig:r,isSubWindow:o,containerElement:s}}}(le||(le={}));class he extends le{constructor(t,e,i){super(t,e,i,!0),this._componentTypesMap=new Map,this._registeredComponentMap=new Map,this._virtuableComponentMap=new Map,this._containerVirtualRectingRequiredEventListener=(t,e,i)=>this.handleContainerVirtualRectingRequiredEvent(t,e,i),this._containerVirtualVisibilityChangeRequiredEventListener=(t,e)=>this.handleContainerVirtualVisibilityChangeRequiredEvent(t,e),this._containerVirtualZIndexChangeRequiredEventListener=(t,e,i)=>this.handleContainerVirtualZIndexChangeRequiredEvent(t,e,i),this.deprecatedConstructor||this.init()}registerComponent(t,e,i=!1){if(\"function\"!=typeof e)throw new $(\"registerComponent() componentConstructorOrFactoryFtn parameter is not a function\");if(e.hasOwnProperty(\"prototype\")){const n=e;this.registerComponentConstructor(t,n,i)}else{const n=e;this.registerComponentFactoryFunction(t,n,i)}}registerComponentConstructor(t,e,i=!1){if(\"function\"!=typeof e)throw new Error(tt[1]);if(void 0!==this._componentTypesMap.get(t))throw new Z(`${tt[3]}: ${t}`);this._componentTypesMap.set(t,{constructor:e,factoryFunction:void 0,virtual:i})}registerComponentFactoryFunction(t,e,i=!1){if(\"function\"!=typeof e)throw new Z(\"Please register a constructor function\");if(void 0!==this._componentTypesMap.get(t))throw new Z(`${tt[3]}: ${t}`);this._componentTypesMap.set(t,{constructor:void 0,factoryFunction:e,virtual:i})}registerComponentFunction(t){this.registerGetComponentConstructorCallback(t)}registerGetComponentConstructorCallback(t){if(\"function\"!=typeof t)throw new Error(\"Please register a callback function\");void 0!==this._getComponentConstructorFtn&&console.warn(\"Multiple component functions are being registered. Only the final registered function will be used.\"),this._getComponentConstructorFtn=t}getRegisteredComponentTypeNames(){const t=this._componentTypesMap.keys();return Array.from(t)}getComponentInstantiator(t){let e;const i=pt.resolveComponentTypeName(t);return void 0!==i&&(e=this._componentTypesMap.get(i)),void 0===e&&void 0!==this._getComponentConstructorFtn&&(e={constructor:this._getComponentConstructorFtn(t),factoryFunction:void 0,virtual:!1}),e}bindComponent(t,e){let i;const n=pt.resolveComponentTypeName(e);let o;if(void 0!==n&&(i=this._componentTypesMap.get(n)),void 0===i&&void 0!==this._getComponentConstructorFtn&&(i={constructor:this._getComponentConstructorFtn(e),factoryFunction:void 0,virtual:!1}),void 0!==i){const s=i.virtual;let r,a;r=void 0===e.componentState?void 0:Ut({},e.componentState);const l=i.constructor;if(void 0!==l)a=new l(t,r,s);else{const e=i.factoryFunction;if(void 0===e)throw new X(\"LMBCFFU10008\");a=e(t,r,s)}if(s){if(void 0===a)throw new J(\"GLBCVCU988774\");{const e=a,i=e.rootHtmlElement;if(void 0===i)throw new Z(`${tt[5]}: ${n}`);!function(t){const e=\"absolute\";t.style.position!==e&&(t.style.position=e)}(i),this.container.appendChild(i),this._virtuableComponentMap.set(t,e),t.virtualRectingRequiredEvent=this._containerVirtualRectingRequiredEventListener,t.virtualVisibilityChangeRequiredEvent=this._containerVirtualVisibilityChangeRequiredEventListener,t.virtualZIndexChangeRequiredEvent=this._containerVirtualZIndexChangeRequiredEventListener}}this._registeredComponentMap.set(t,a),o={virtual:i.virtual,component:a}}else o=super.bindComponent(t,e);return o}unbindComponent(t,e,i){if(void 0===this._registeredComponentMap.get(t))super.unbindComponent(t,e,i);else{const e=this._virtuableComponentMap.get(t);if(void 0!==e){const i=e.rootHtmlElement;if(void 0===i)throw new X(\"GLUC77743\",t.title);this.container.removeChild(i),this._virtuableComponentMap.delete(t)}}}fireBeforeVirtualRectingEvent(t){this._goldenLayoutBoundingClientRect=this.container.getBoundingClientRect(),super.fireBeforeVirtualRectingEvent(t)}handleContainerVirtualRectingRequiredEvent(t,e,i){const n=this._virtuableComponentMap.get(t);if(void 0===n)throw new J(\"GLHCSCE55933\");{const o=n.rootHtmlElement;if(void 0===o)throw new Z(tt[4]+\" \"+t.title);{const n=t.element.getBoundingClientRect(),s=n.left-this._goldenLayoutBoundingClientRect.left;o.style.left=zt(s);const r=n.top-this._goldenLayoutBoundingClientRect.top;o.style.top=zt(r),Tt(o,e),At(o,i)}}}handleContainerVirtualVisibilityChangeRequiredEvent(t,e){const i=this._virtuableComponentMap.get(t);if(void 0===i)throw new J(\"GLHCVVCRE55934\");{const n=i.rootHtmlElement;if(void 0===n)throw new Z(tt[4]+\" \"+t.title);Dt(n,e)}}handleContainerVirtualZIndexChangeRequiredEvent(t,e,i){const n=this._virtuableComponentMap.get(t);if(void 0===n)throw new J(\"GLHCVZICRE55935\");{const e=n.rootHtmlElement;if(void 0===e)throw new Z(tt[4]+\" \"+t.title);e.style.zIndex=i}}}const de=\"initial_\",ce={show:\"top\",popout:!1,maximise:!1,close:\"close-tab-unused\"},me={headerHeight:31},ue={hasHeaders:!0,reorderEnabled:!0},pe={popoutWholeStack:!1,constrainDragToContainer:!1,constrainDragToHeaders:!1,preventDragout:!1,showMaximiseIcon:!1,showPopoutIcon:!1,showCloseIcon:!1,blockedPopoutsThrowError:!0,closePopoutsOnUnload:!0,selectionEnabled:!1};var ge,fe;class ve{constructor(e){this.layout=e,ge.set(this,void 0),fe.set(this,void 0),this.handleResize=t=>{t.forEach((t=>this.resizeElement(t.target)))},this.handleMutation=()=>{this.layout.viewComponentsByContainerElement.forEach((t=>{this.resizeElement(t.container.element)}))},t.__classPrivateFieldSet(this,ge,new ResizeObserver(this.handleResize),\"f\"),t.__classPrivateFieldSet(this,fe,new MutationObserver(this.handleMutation),\"f\")}observeMutations(e){t.__classPrivateFieldGet(this,fe,\"f\")?.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[\"class\"]})}destroy(){t.__classPrivateFieldGet(this,ge,\"f\").disconnect(),t.__classPrivateFieldGet(this,fe,\"f\").disconnect()}observeContainer(e){t.__classPrivateFieldGet(this,ge,\"f\").observe(e)}unobserveContainer(e){t.__classPrivateFieldGet(this,ge,\"f\").unobserve(e)}resizeElement(t){const e=this.layout.viewComponentsByContainerElement.get(t);e&&e.resize()}}ge=new WeakMap,fe=new WeakMap;var _e={};Object.defineProperty(_e,\"__esModule\",{value:!0});var ye=_e.BaseItem=void 0;class Ce{constructor(t,e,i){this._item=t,this._layout=e,this._wrap=i}get raw(){return this._item}get layout(){return this._layout}get type(){return this._item.type}get contentItems(){return(this._item.contentItems??[]).map((t=>this._wrap(t)))}get parent(){const t=this._item.parent;return t?this._wrap(t):null}setActiveContentItem(t,e){if(\"stack\"!==this.type)throw new Error(`Cannot call setActiveContentItem from a non-stack item: ${this.type}`);this._item.setActiveContentItem(t.raw,e)}static wrapInternal(t,e,i){const n=Ce.wrapCache.get(e);if(n)return n;const o=new t(e,i,(e=>Ce.wrapInternal(t,e,i)));return Ce.wrapCache.set(e,o),o}}ye=_e.BaseItem=Ce,Ce.wrapCache=new WeakMap;const we=t=>!!t&&\"contentItems\"in t&&(t.isRow||t.isColumn);class Ie extends ye{isRoot(){return!!this._item.parent?.isGround}getBounds(){return this._item.element.getBoundingClientRect()}get viewName(){if(this._item.isComponent){const{component:t}=this._item;return t.identity.name}throw new Error(\"View name not found\")}onDestroyed(t){const e=({target:i})=>{i===this._item&&(t(),this._item.off(\"itemDestroyed\",e))};this._item.on(\"itemDestroyed\",e)}createAdjacentStack({position:t=\"right\"}={}){const e=this.raw;if(ee.isStack(e)&&e.parent){const i=[\"top\",\"bottom\"].includes(t)?\"column\":\"row\",n=[\"left\",\"top\"].includes(t)?1:0,o=we(e.parent)?e.parent:e.layoutManager,s=o,r=e.parent.contentItems.indexOf(e);e.parent.isGround&&e.parent.removeChild(e,!0);const a=o.newItem({type:i,content:[{type:\"stack\",content:[]}]},r);if(!a)throw new Error(\"createAdjacentStack: Failed to create new container\");const l=a.contentItems[0];return a.addChild(this.raw,n),we(s)&&s.removeChild(e,!0),this._wrap(l)}throw new Error(`Cannot creat adjacent stacks for type: ${e.type}, must be type 'stack'`)}setActiveContentItem(t,e=!0){if(!ee.isStack(this._item))throw new Error(`Cannot call setActiveContentItem from a non-stack item: ${this.type}`);this._item.setActiveComponentItem(t.raw,!e)}static wrap(t,e){return ye.wrapInternal(Ie,t,e)}}function be(t=[],e){for(const i of t)\"component\"===i.type?Object.keys(e).forEach((t=>{t in i&&(i.componentState={[`${de}${t}`]:i[t],...i.componentState}),i[t]=e[t]})):be(i.content,e)}function Se(t=[],e,i){for(const n of t)if(\"component\"===n.type)Object.keys(e).forEach((t=>{if(`${de}${t}`in n.componentState)return n[t]=n.componentState[`${de}${t}`],void delete n.componentState[`${de}${t}`];n[t]=e[t]}));else{if(n.size&&(\"row\"===i||\"column\"===i)){n[\"row\"===i?\"width\":\"height\"]=n.size?.includes(\".\")?parseFloat(n.size):parseInt(n.size)}Se(n.content,e,n.type)}}function Ee(t){if(t.root){t.root.content&&Se([t.root],{componentName:\"view\",isClosable:!0});const e=t.root;t.content=[e],delete t.root}return t}const xe=e=>class extends e{connectedCallback(){if(!this.name||!this.uuid)throw new Error(\" Name or uuid attribute missing\");if(!this.src)throw new Error(\" missing 'src' attribute.\");this.#t||(this.#t=document.createElement(\"iframe\"),this.#t.src=this.src,this.#t.style.height=\"100%\",this.#t.style.width=\"100%\",this.#t.style.border=\"none\",this.forceFrameName?this.#t.setAttribute(\"name\",this.forceFrameName):this.#t.setAttribute(\"name\",t.encodeOptions({brokerUrl:this.brokerUrl,name:this.name,uuid:this.uuid,providerId:this.providerId,contextGroup:this.contextGroup},\"of-frame\")),this.#t.setAttribute(\"id\",this.name),this.appendChild(this.#t))}#t;get brokerUrl(){return this.getAttribute(\"of-broker\")}set brokerUrl(t){t&&this.setAttribute(\"of-broker\",t)}get name(){return this.getAttribute(\"of-name\")}set name(t){t&&this.setAttribute(\"of-name\",t)}get forceFrameName(){return this.getAttribute(\"forceFrameName\")}set forceFrameName(t){t&&this.setAttribute(\"forceFrameName\",t)}get uuid(){return this.getAttribute(\"of-uuid\")}set uuid(t){t&&this.setAttribute(\"of-uuid\",t)}get src(){return this.getAttribute(\"src\")}set src(t){t&&this.setAttribute(\"src\",t)}get providerId(){return this.getAttribute(\"of-provider-id\")}set providerId(t){t&&this.setAttribute(\"of-provider-id\",t)}get contextGroup(){return this.getAttribute(\"of-context-group\")}set contextGroup(t){t&&this.setAttribute(\"of-context-group\",t)}static get observedAttributes(){return[\"name\"]}};class Le{static create(t){const e=document.createElement(\"of-view\");return Object.entries(t).forEach((([t,i])=>{e.setAttribute(t,i)})),e}}customElements.define(\"of-view\",xe(HTMLElement));class ze{constructor(t,i,n,{brokerUrl:o,interopConfig:s},r){this.container=t,this.config=i,this.ofView=null,this.isDragging=()=>this.container.tab.element?.className.includes(\"lm_dragging\")??!1;const{url:a,web:l,interop:h,name:d}=i||{},c=d??`internal-generated-view-${e.v4()}`;if(this.identity={uuid:n,name:c},this.container.element.setAttribute(\"of-name\",c),this.container.element.id=`container-${c}`,this.container.parent.id=c,void 0===a)return void this.handleUrlMissing();const m=this.updateTitleIfNotSet(a),u={\"of-broker\":o,\"of-uuid\":n,\"of-name\":c,src:a};l?.frameName&&(u.forceFrameName=l.frameName);const p=h?.currentContextGroup??s?.currentContextGroup;p&&(u[\"of-context-group\"]=p),s?.providerId&&(u[\"of-provider-id\"]=s?.providerId),this.ofView=Le.create(u),this.ofView.title=m??`Iframe: ${a}`,r.appendChild(this.ofView),this.ofView.style.position=\"absolute\"}updateTitleIfNotSet(t){return\"view\"===this.container.parent.title&&this.container.parent.setTitle(t),this.container.parent.title}handleUrlMissing(){const t=document.createElement(\"div\");t.setAttribute(\"style\",\"padding: 20px\");t.innerText=\"No URL provided\",this.container.element.appendChild(t)}destroy(){this.ofView?.remove(),this.ofView=null}closeView(){this.container.close()}resize(){if(this.ofView){if(this.isDragging())return void(this.ofView.style.display=\"none\");const t=this.container.element.getBoundingClientRect();this.ofView.style.position=\"absolute\",this.ofView.style.height=`${t.height}px`,this.ofView.style.width=`${t.width}px`,this.ofView.style.inset=`${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`,this.ofView.style.display=\"block\"}}}class Me extends U{static overrideConfig(t){const e={...ue,...t.settings,...pe};return e.reorderEnabled?be(t.content,{isClosable:!0}):be(t.content,{reorderEnabled:!1}),{dimensions:me,...t,settings:e,header:{...ce,show:!1!==t.settings?.hasHeaders&&ce.show}}}constructor(t,e,i,{options:n},o,s){super(),this.identity=t,this.container=e,this.initialConfig=i,this.layoutManager=o,this.platformProvider=s,this.viewComponentsByContainerElement=new Map,this.layoutContentCache=_.getSingleInstance(),this.reparentingViews=new Set,this.goldenLayoutDestroyed=!1,this.createViewComponent=(t,e)=>{m.handleSharedView(this.layoutManager,this.identity,e);const i=new ze(t,e,this.identity.uuid,this.options,this.iframeContainer);return e&&!1===e[`${de}isClosable`]&&this.stylesheet.insertRule(`#tab-${i.identity.name} .lm_close_tab { display: none; }`),this.viewComponentsByContainerElement.set(t.element,i),this.resizeController.observeContainer(t.element),i},this.iframeContainer=document.createElement(\"div\"),this.iframeContainer.id=`openfin-layout-iframe-container-${this.identity.layoutName}`,this.domEmitter=new V(e),this.setupStylesheets(),this.layout=new he(this.container),this.layout.resizeWithContainerAutomatically=!0,this.options=n,this.layout.registerComponent(\"view\",this.createViewComponent),this.setupListeners(),this.resizeController=new ve(this),this.layout.loadLayout(Me.overrideConfig(i));const r=document.createElement(\"div\");r.id=`openfin-layout-shadow-container-${this.identity.layoutName}`,r.attachShadow({mode:\"open\",delegatesFocus:!1}).appendChild(this.iframeContainer),this.container.appendChild(r),this.resizeController.observeMutations(this.container)}getStackByView({name:t}){const e=this.layout.findFirstComponentItemById(t);if(e?.parent&&e?.parent?.isStack)return Ie.wrap(e.parent,this)}getRoot(){return Ie.wrap(this.layout.rootItem,this)}async platformCloseView(t){const e=[...this.viewComponentsByContainerElement.values()].find((e=>e.identity.name===t.name));if(!e)throw new Error(`View with name: ${t.name} not found in layout.`);e.closeView()}async platformCreateView(t,{location:e,targetView:i}={}){if(i)throw new Error(\"TargetView not supported in web\");const n={options:this.platformProvider.normalizeOptions(t),target:this.identity,location:e};return this.insertView(n)}setupStylesheets(){if(this.container.setAttribute(\"data-openfin-layout-name\",this.identity.layoutName),this.stylesheet=new CSSStyleSheet,this.stylesheet.insertRule(\".lm_close { display: none; }\"),document.adoptedStyleSheets.push(this.stylesheet),this.initialConfig.settings?.preventSplitterResize){const t=`\\n [data-openfin-layout-name='${this.identity.layoutName}'] .lm_splitter {\\n pointer-events: none;\\n }`;this.stylesheet.insertRule(t)}}insertView({options:t,location:e,targetView:i}){const n=e?this.layoutContentCache.getItemOrUndefined(e.id):void 0,o=i?this.layoutContentCache.getItemOrUndefined(i.name):void 0,s=n??o??Ie.wrap(this.layout.rootItem,this);let r;if(ee.isStack(s.raw))r=s.raw;else{if(!we(s.raw))throw new Error(\"Cannot add a view at the requested location\");r=s.raw.newItem({type:\"stack\",content:[]})}const a=Math.min(r.contentItems.length,e?.index??r.contentItems.length);let l=this.layout.findFirstComponentItemById(t.name);l?(l.parent&&l.parent.removeChild(l,!0),r.addChild(l,a)):l=r.newComponent(\"view\",t,t.title??t.url??\"Default Title\",a);const h=l.component.identity;return Promise.resolve({identity:h})}replaceView({viewToReplace:t,newView:e}){throw new Error(\"Method not implemented.\")}replaceLayout(t){throw new Error(\"Method not implemented.\")}async cleanupView(t){}applyPreset(t){throw new Error(\"Method not implemented.\")}getCurrentViews(){return[...this.viewComponentsByContainerElement.values()].map((t=>t.identity))}async getFrameSnapshot(){return Ee(xt.fromResolved(this.layout.toConfig()))}isVisible(){return W(this.container)}async onViewDetached({viewIdentity:t}){this.reparentingViews.add(t.name),this.platformCloseView(t)}async destroy(){this.goldenLayoutDestroyed||(this.goldenLayoutDestroyed=!0,this.layout.destroy()),this.iframeContainer.remove(),this.resizeController.destroy(),document.adoptedStyleSheets=document.adoptedStyleSheets.filter((t=>t!==this.stylesheet)),this.viewComponentsByContainerElement.clear()}setupListeners(){this.container.addEventListener(\"pointerdown\",(t=>{if(t.target instanceof HTMLElement){const e=t.target.classList;[\"lm_tab\",\"lm_title\",\"lm_splitter\",\"lm_drag_handle\"].some((t=>e.contains(t)))&&(this.handleDragStart(),2===t.button&&t.stopPropagation())}}),!0),document.addEventListener(\"pointerup\",(()=>this.handleDragEnd()),!0),this.layout.on(\"tabCreated\",(t=>{const e=t.componentItem.component;t.element.id=`tab-${e.identity.name}`,this.domEmitter.dispatchLocalEvent(\"tab-created\",e.identity)})),this.layout.on(\"itemCreated\",(({target:t})=>{const e=t;if(Gt.isComponentItem(e)){const t=e.component;this.domEmitter.dispatchLocalEvent(\"container-created\",t.identity)}})),this.layout.on(\"itemDestroyed\",(t=>{const e=t.target;if(Gt.isComponentItem(e)){const t=e.component;this.removeViewComponent(t)}})),this.layout.on(\"itemDropped\",(()=>{this.handleDragEnd()}))}handleDragStart(){this.iframeContainer.style.pointerEvents=\"none\"}handleDragEnd(){this.iframeContainer.style.pointerEvents=\"\"}removeViewComponent(t){if(t.config&&!1===t.config[`${de}isClosable`]){const e=[...this.stylesheet.cssRules].findIndex((e=>e.cssText.includes(`#tab-${t.identity.name}`)));this.stylesheet.deleteRule(e)}t.destroy(),this.viewComponentsByContainerElement.delete(t.container.element),this.resizeController.unobserveContainer(t.container.element),this.reparentingViews.has(t.identity.name)?this.reparentingViews.delete(t.identity.name):this.platformProvider.closeView(t.identity.name);0===this.getCurrentViews().length&&(this.goldenLayoutDestroyed||(this.goldenLayoutDestroyed=!0,m.handleLastViewRemoved(this.layoutManager,this.identity)))}}class Pe{constructor(t,e,i,n){this.windowIdentity=t,this.connectConfig=e,this.provider=i,this.fallbackContainer=n}async createLayout(t,e){if(!(\"container\"in t)&&!this.fallbackContainer)throw new Error(\"Container property is not optional in web\");const{layoutName:i}=t,n=t,o=this.provider.initLayoutViews(n),s=n.container??this.fallbackContainer,r={...this.windowIdentity,layoutName:i},a=new Me(r,s,o,this.connectConfig,e,this.provider);m.registerLayout(e,i,a),this.fallbackContainer=null}async getLayoutSnapshot(t){return t.getLayoutSnapshot()}async handleLastViewRemoved(t){}}class Te{static async init(e){const i=e.getFin().InterApplicationBus.Channel,n=await i.create(`custom-frame-${e.me.uuid}`);return n.setDefaultAction((async(t,{target:e,opts:i},o)=>{const s=n.connections.find((t=>t.name===e.name));if(s)return n.dispatch(s,t,{...i,target:e});throw new Error(`Client with name ${e.name} not found`)})),await t.relayChannelClientApi_1(n,\"layout-relay\"),new Te(e)}constructor(t){this.wire=t,this.viewNames=new Set}normalizeOptions(t,i=\"default\"){const n=this.wire.me.uuid;let{name:o=`internal-generated-view-${e.v4()}`}=t;return o.match(/^internal-generated-view-/)&&this.viewNames.has(o)&&\"duplicate\"===i&&(o=`internal-generated-view-${e.v4()}`),this.viewNames.add(o),{...t,name:o,uuid:n}}closeView(t){this.viewNames.delete(t)}initLayoutViews({layout:t,multiInstanceViewBehavior:e}){return H((t=>{if(\"component\"===t.type&&t.componentState){const i=this.normalizeOptions(t.componentState,e);return{...t,componentState:i}}return t}),t)}}var Ae;const ke=t=>t;Ae=new WeakMap,exports.WebLayoutEntryPoint=class{constructor(e){Ae.set(this,void 0),this.initLayoutManager=async(e,i,{container:n,layoutManagerOverride:o})=>{const s=await Te.init(i),r=o??ke,a=new Pe(i.me,t.__classPrivateFieldGet(this,Ae,\"f\"),s,n),l=new(r(m.createClosedConstructor(a)));return await M(i,l),l},this.applyLayoutSnapshot=async(e,i,n)=>{await i.applyLayoutSnapshot(t.__classPrivateFieldGet(this,Ae,\"f\").platform.layoutSnapshot)},this.createLayout=async(t,e)=>m.createLayout(t,e),this.destroyLayout=async(t,e)=>m.destroyLayout(t,e),t.__classPrivateFieldSet(this,Ae,e,\"f\")}};\n","'use strict'\n\nexports.byteLength = byteLength\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\nfor (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i]\n revLookup[code.charCodeAt(i)] = i\n}\n\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction getLens (b64) {\n var len = b64.length\n\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // Trim off extra bytes after placeholder bytes are found\n // See: https://github.com/beatgammit/base64-js/issues/42\n var validLen = b64.indexOf('=')\n if (validLen === -1) validLen = len\n\n var placeHoldersLen = validLen === len\n ? 0\n : 4 - (validLen % 4)\n\n return [validLen, placeHoldersLen]\n}\n\n// base64 is 4/3 + up to two characters of the original data\nfunction byteLength (b64) {\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction _byteLength (b64, validLen, placeHoldersLen) {\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction toByteArray (b64) {\n var tmp\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n\n var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))\n\n var curByte = 0\n\n // if there are placeholders, only get up to the last complete 4 chars\n var len = placeHoldersLen > 0\n ? validLen - 4\n : validLen\n\n var i\n for (i = 0; i < len; i += 4) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 18) |\n (revLookup[b64.charCodeAt(i + 1)] << 12) |\n (revLookup[b64.charCodeAt(i + 2)] << 6) |\n revLookup[b64.charCodeAt(i + 3)]\n arr[curByte++] = (tmp >> 16) & 0xFF\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 2) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 2) |\n (revLookup[b64.charCodeAt(i + 1)] >> 4)\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 1) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 10) |\n (revLookup[b64.charCodeAt(i + 1)] << 4) |\n (revLookup[b64.charCodeAt(i + 2)] >> 2)\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] +\n lookup[num >> 12 & 0x3F] +\n lookup[num >> 6 & 0x3F] +\n lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n var tmp\n var output = []\n for (var i = start; i < end; i += 3) {\n tmp =\n ((uint8[i] << 16) & 0xFF0000) +\n ((uint8[i + 1] << 8) & 0xFF00) +\n (uint8[i + 2] & 0xFF)\n output.push(tripletToBase64(tmp))\n }\n return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n var tmp\n var len = uint8.length\n var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n var parts = []\n var maxChunkLength = 16383 // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1]\n parts.push(\n lookup[tmp >> 2] +\n lookup[(tmp << 4) & 0x3F] +\n '=='\n )\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + uint8[len - 1]\n parts.push(\n lookup[tmp >> 10] +\n lookup[(tmp >> 4) & 0x3F] +\n lookup[(tmp << 2) & 0x3F] +\n '='\n )\n }\n\n return parts.join('')\n}\n","/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n/* eslint-disable no-proto */\n\n'use strict'\n\nconst base64 = require('base64-js')\nconst ieee754 = require('ieee754')\nconst customInspectSymbol =\n (typeof Symbol === 'function' && typeof Symbol['for'] === 'function') // eslint-disable-line dot-notation\n ? Symbol['for']('nodejs.util.inspect.custom') // eslint-disable-line dot-notation\n : null\n\nexports.Buffer = Buffer\nexports.SlowBuffer = SlowBuffer\nexports.INSPECT_MAX_BYTES = 50\n\nconst K_MAX_LENGTH = 0x7fffffff\nexports.kMaxLength = K_MAX_LENGTH\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Print warning and recommend using `buffer` v4.x which has an Object\n * implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * We report that the browser does not support typed arrays if the are not subclassable\n * using __proto__. Firefox 4-29 lacks support for adding new properties to `Uint8Array`\n * (See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438). IE 10 lacks support\n * for __proto__ and has a buggy typed array implementation.\n */\nBuffer.TYPED_ARRAY_SUPPORT = typedArraySupport()\n\nif (!Buffer.TYPED_ARRAY_SUPPORT && typeof console !== 'undefined' &&\n typeof console.error === 'function') {\n console.error(\n 'This browser lacks typed array (Uint8Array) support which is required by ' +\n '`buffer` v5.x. Use `buffer` v4.x if you require old browser support.'\n )\n}\n\nfunction typedArraySupport () {\n // Can typed array instances can be augmented?\n try {\n const arr = new Uint8Array(1)\n const proto = { foo: function () { return 42 } }\n Object.setPrototypeOf(proto, Uint8Array.prototype)\n Object.setPrototypeOf(arr, proto)\n return arr.foo() === 42\n } catch (e) {\n return false\n }\n}\n\nObject.defineProperty(Buffer.prototype, 'parent', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.buffer\n }\n})\n\nObject.defineProperty(Buffer.prototype, 'offset', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.byteOffset\n }\n})\n\nfunction createBuffer (length) {\n if (length > K_MAX_LENGTH) {\n throw new RangeError('The value \"' + length + '\" is invalid for option \"size\"')\n }\n // Return an augmented `Uint8Array` instance\n const buf = new Uint8Array(length)\n Object.setPrototypeOf(buf, Buffer.prototype)\n return buf\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new TypeError(\n 'The \"string\" argument must be of type string. Received type number'\n )\n }\n return allocUnsafe(arg)\n }\n return from(arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\nfunction from (value, encodingOrOffset, length) {\n if (typeof value === 'string') {\n return fromString(value, encodingOrOffset)\n }\n\n if (ArrayBuffer.isView(value)) {\n return fromArrayView(value)\n }\n\n if (value == null) {\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n }\n\n if (isInstance(value, ArrayBuffer) ||\n (value && isInstance(value.buffer, ArrayBuffer))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof SharedArrayBuffer !== 'undefined' &&\n (isInstance(value, SharedArrayBuffer) ||\n (value && isInstance(value.buffer, SharedArrayBuffer)))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof value === 'number') {\n throw new TypeError(\n 'The \"value\" argument must not be of type number. Received type number'\n )\n }\n\n const valueOf = value.valueOf && value.valueOf()\n if (valueOf != null && valueOf !== value) {\n return Buffer.from(valueOf, encodingOrOffset, length)\n }\n\n const b = fromObject(value)\n if (b) return b\n\n if (typeof Symbol !== 'undefined' && Symbol.toPrimitive != null &&\n typeof value[Symbol.toPrimitive] === 'function') {\n return Buffer.from(value[Symbol.toPrimitive]('string'), encodingOrOffset, length)\n }\n\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n return from(value, encodingOrOffset, length)\n}\n\n// Note: Change prototype *after* Buffer.from is defined to workaround Chrome bug:\n// https://github.com/feross/buffer/pull/148\nObject.setPrototypeOf(Buffer.prototype, Uint8Array.prototype)\nObject.setPrototypeOf(Buffer, Uint8Array)\n\nfunction assertSize (size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be of type number')\n } else if (size < 0) {\n throw new RangeError('The value \"' + size + '\" is invalid for option \"size\"')\n }\n}\n\nfunction alloc (size, fill, encoding) {\n assertSize(size)\n if (size <= 0) {\n return createBuffer(size)\n }\n if (fill !== undefined) {\n // Only pay attention to encoding if it's a string. This\n // prevents accidentally sending in a number that would\n // be interpreted as a start offset.\n return typeof encoding === 'string'\n ? createBuffer(size).fill(fill, encoding)\n : createBuffer(size).fill(fill)\n }\n return createBuffer(size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n return alloc(size, fill, encoding)\n}\n\nfunction allocUnsafe (size) {\n assertSize(size)\n return createBuffer(size < 0 ? 0 : checked(size) | 0)\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n return allocUnsafe(size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n return allocUnsafe(size)\n}\n\nfunction fromString (string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8'\n }\n\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n\n const length = byteLength(string, encoding) | 0\n let buf = createBuffer(length)\n\n const actual = buf.write(string, encoding)\n\n if (actual !== length) {\n // Writing a hex string, for example, that contains invalid characters will\n // cause everything after the first invalid character to be ignored. (e.g.\n // 'abxxcd' will be treated as 'ab')\n buf = buf.slice(0, actual)\n }\n\n return buf\n}\n\nfunction fromArrayLike (array) {\n const length = array.length < 0 ? 0 : checked(array.length) | 0\n const buf = createBuffer(length)\n for (let i = 0; i < length; i += 1) {\n buf[i] = array[i] & 255\n }\n return buf\n}\n\nfunction fromArrayView (arrayView) {\n if (isInstance(arrayView, Uint8Array)) {\n const copy = new Uint8Array(arrayView)\n return fromArrayBuffer(copy.buffer, copy.byteOffset, copy.byteLength)\n }\n return fromArrayLike(arrayView)\n}\n\nfunction fromArrayBuffer (array, byteOffset, length) {\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\"offset\" is outside of buffer bounds')\n }\n\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\"length\" is outside of buffer bounds')\n }\n\n let buf\n if (byteOffset === undefined && length === undefined) {\n buf = new Uint8Array(array)\n } else if (length === undefined) {\n buf = new Uint8Array(array, byteOffset)\n } else {\n buf = new Uint8Array(array, byteOffset, length)\n }\n\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(buf, Buffer.prototype)\n\n return buf\n}\n\nfunction fromObject (obj) {\n if (Buffer.isBuffer(obj)) {\n const len = checked(obj.length) | 0\n const buf = createBuffer(len)\n\n if (buf.length === 0) {\n return buf\n }\n\n obj.copy(buf, 0, 0, len)\n return buf\n }\n\n if (obj.length !== undefined) {\n if (typeof obj.length !== 'number' || numberIsNaN(obj.length)) {\n return createBuffer(0)\n }\n return fromArrayLike(obj)\n }\n\n if (obj.type === 'Buffer' && Array.isArray(obj.data)) {\n return fromArrayLike(obj.data)\n }\n}\n\nfunction checked (length) {\n // Note: cannot use `length < K_MAX_LENGTH` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= K_MAX_LENGTH) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + K_MAX_LENGTH.toString(16) + ' bytes')\n }\n return length | 0\n}\n\nfunction SlowBuffer (length) {\n if (+length != length) { // eslint-disable-line eqeqeq\n length = 0\n }\n return Buffer.alloc(+length)\n}\n\nBuffer.isBuffer = function isBuffer (b) {\n return b != null && b._isBuffer === true &&\n b !== Buffer.prototype // so Buffer.isBuffer(Buffer.prototype) will be false\n}\n\nBuffer.compare = function compare (a, b) {\n if (isInstance(a, Uint8Array)) a = Buffer.from(a, a.offset, a.byteLength)\n if (isInstance(b, Uint8Array)) b = Buffer.from(b, b.offset, b.byteLength)\n if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n throw new TypeError(\n 'The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array'\n )\n }\n\n if (a === b) return 0\n\n let x = a.length\n let y = b.length\n\n for (let i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i]\n y = b[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n switch (String(encoding).toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'latin1':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return true\n default:\n return false\n }\n}\n\nBuffer.concat = function concat (list, length) {\n if (!Array.isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n\n if (list.length === 0) {\n return Buffer.alloc(0)\n }\n\n let i\n if (length === undefined) {\n length = 0\n for (i = 0; i < list.length; ++i) {\n length += list[i].length\n }\n }\n\n const buffer = Buffer.allocUnsafe(length)\n let pos = 0\n for (i = 0; i < list.length; ++i) {\n let buf = list[i]\n if (isInstance(buf, Uint8Array)) {\n if (pos + buf.length > buffer.length) {\n if (!Buffer.isBuffer(buf)) buf = Buffer.from(buf)\n buf.copy(buffer, pos)\n } else {\n Uint8Array.prototype.set.call(\n buffer,\n buf,\n pos\n )\n }\n } else if (!Buffer.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n } else {\n buf.copy(buffer, pos)\n }\n pos += buf.length\n }\n return buffer\n}\n\nfunction byteLength (string, encoding) {\n if (Buffer.isBuffer(string)) {\n return string.length\n }\n if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) {\n return string.byteLength\n }\n if (typeof string !== 'string') {\n throw new TypeError(\n 'The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. ' +\n 'Received type ' + typeof string\n )\n }\n\n const len = string.length\n const mustMatch = (arguments.length > 2 && arguments[2] === true)\n if (!mustMatch && len === 0) return 0\n\n // Use a for loop to avoid recursion\n let loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'ascii':\n case 'latin1':\n case 'binary':\n return len\n case 'utf8':\n case 'utf-8':\n return utf8ToBytes(string).length\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return len * 2\n case 'hex':\n return len >>> 1\n case 'base64':\n return base64ToBytes(string).length\n default:\n if (loweredCase) {\n return mustMatch ? -1 : utf8ToBytes(string).length // assume utf8\n }\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n let loweredCase = false\n\n // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n // property of a typed array.\n\n // This behaves neither like String nor Uint8Array in that we set start/end\n // to their upper/lower bounds if the value passed is out of range.\n // undefined is handled specially as per ECMA-262 6th Edition,\n // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n if (start === undefined || start < 0) {\n start = 0\n }\n // Return early if start > this.length. Done here to prevent potential uint32\n // coercion fail below.\n if (start > this.length) {\n return ''\n }\n\n if (end === undefined || end > this.length) {\n end = this.length\n }\n\n if (end <= 0) {\n return ''\n }\n\n // Force coercion to uint32. This will also coerce falsey/NaN values to 0.\n end >>>= 0\n start >>>= 0\n\n if (end <= start) {\n return ''\n }\n\n if (!encoding) encoding = 'utf8'\n\n while (true) {\n switch (encoding) {\n case 'hex':\n return hexSlice(this, start, end)\n\n case 'utf8':\n case 'utf-8':\n return utf8Slice(this, start, end)\n\n case 'ascii':\n return asciiSlice(this, start, end)\n\n case 'latin1':\n case 'binary':\n return latin1Slice(this, start, end)\n\n case 'base64':\n return base64Slice(this, start, end)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return utf16leSlice(this, start, end)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = (encoding + '').toLowerCase()\n loweredCase = true\n }\n }\n}\n\n// This property is used by `Buffer.isBuffer` (and the `is-buffer` npm package)\n// to detect a Buffer instance. It's not possible to use `instanceof Buffer`\n// reliably in a browserify context because there could be multiple different\n// copies of the 'buffer' package in use. This method works even for Buffer\n// instances that were created from another copy of the `buffer` package.\n// See: https://github.com/feross/buffer/issues/154\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n const i = b[n]\n b[n] = b[m]\n b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n const len = this.length\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits')\n }\n for (let i = 0; i < len; i += 2) {\n swap(this, i, i + 1)\n }\n return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n const len = this.length\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits')\n }\n for (let i = 0; i < len; i += 4) {\n swap(this, i, i + 3)\n swap(this, i + 1, i + 2)\n }\n return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n const len = this.length\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits')\n }\n for (let i = 0; i < len; i += 8) {\n swap(this, i, i + 7)\n swap(this, i + 1, i + 6)\n swap(this, i + 2, i + 5)\n swap(this, i + 3, i + 4)\n }\n return this\n}\n\nBuffer.prototype.toString = function toString () {\n const length = this.length\n if (length === 0) return ''\n if (arguments.length === 0) return utf8Slice(this, 0, length)\n return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.toLocaleString = Buffer.prototype.toString\n\nBuffer.prototype.equals = function equals (b) {\n if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n if (this === b) return true\n return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n let str = ''\n const max = exports.INSPECT_MAX_BYTES\n str = this.toString('hex', 0, max).replace(/(.{2})/g, '$1 ').trim()\n if (this.length > max) str += ' ... '\n return ''\n}\nif (customInspectSymbol) {\n Buffer.prototype[customInspectSymbol] = Buffer.prototype.inspect\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n if (isInstance(target, Uint8Array)) {\n target = Buffer.from(target, target.offset, target.byteLength)\n }\n if (!Buffer.isBuffer(target)) {\n throw new TypeError(\n 'The \"target\" argument must be one of type Buffer or Uint8Array. ' +\n 'Received type ' + (typeof target)\n )\n }\n\n if (start === undefined) {\n start = 0\n }\n if (end === undefined) {\n end = target ? target.length : 0\n }\n if (thisStart === undefined) {\n thisStart = 0\n }\n if (thisEnd === undefined) {\n thisEnd = this.length\n }\n\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError('out of range index')\n }\n\n if (thisStart >= thisEnd && start >= end) {\n return 0\n }\n if (thisStart >= thisEnd) {\n return -1\n }\n if (start >= end) {\n return 1\n }\n\n start >>>= 0\n end >>>= 0\n thisStart >>>= 0\n thisEnd >>>= 0\n\n if (this === target) return 0\n\n let x = thisEnd - thisStart\n let y = end - start\n const len = Math.min(x, y)\n\n const thisCopy = this.slice(thisStart, thisEnd)\n const targetCopy = target.slice(start, end)\n\n for (let i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i]\n y = targetCopy[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (numberIsNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [val], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n let indexSize = 1\n let arrLength = arr.length\n let valLength = val.length\n\n if (encoding !== undefined) {\n encoding = String(encoding).toLowerCase()\n if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n encoding === 'utf16le' || encoding === 'utf-16le') {\n if (arr.length < 2 || val.length < 2) {\n return -1\n }\n indexSize = 2\n arrLength /= 2\n valLength /= 2\n byteOffset /= 2\n }\n }\n\n function read (buf, i) {\n if (indexSize === 1) {\n return buf[i]\n } else {\n return buf.readUInt16BE(i * indexSize)\n }\n }\n\n let i\n if (dir) {\n let foundIndex = -1\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1) foundIndex = i\n if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n } else {\n if (foundIndex !== -1) i -= i - foundIndex\n foundIndex = -1\n }\n }\n } else {\n if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n for (i = byteOffset; i >= 0; i--) {\n let found = true\n for (let j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false\n break\n }\n }\n if (found) return i\n }\n }\n\n return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n offset = Number(offset) || 0\n const remaining = buf.length - offset\n if (!length) {\n length = remaining\n } else {\n length = Number(length)\n if (length > remaining) {\n length = remaining\n }\n }\n\n const strLen = string.length\n\n if (length > strLen / 2) {\n length = strLen / 2\n }\n let i\n for (i = 0; i < length; ++i) {\n const parsed = parseInt(string.substr(i * 2, 2), 16)\n if (numberIsNaN(parsed)) return i\n buf[offset + i] = parsed\n }\n return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n // Buffer#write(string)\n if (offset === undefined) {\n encoding = 'utf8'\n length = this.length\n offset = 0\n // Buffer#write(string, encoding)\n } else if (length === undefined && typeof offset === 'string') {\n encoding = offset\n length = this.length\n offset = 0\n // Buffer#write(string, offset[, length][, encoding])\n } else if (isFinite(offset)) {\n offset = offset >>> 0\n if (isFinite(length)) {\n length = length >>> 0\n if (encoding === undefined) encoding = 'utf8'\n } else {\n encoding = length\n length = undefined\n }\n } else {\n throw new Error(\n 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n )\n }\n\n const remaining = this.length - offset\n if (length === undefined || length > remaining) length = remaining\n\n if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n throw new RangeError('Attempt to write outside buffer bounds')\n }\n\n if (!encoding) encoding = 'utf8'\n\n let loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'hex':\n return hexWrite(this, string, offset, length)\n\n case 'utf8':\n case 'utf-8':\n return utf8Write(this, string, offset, length)\n\n case 'ascii':\n case 'latin1':\n case 'binary':\n return asciiWrite(this, string, offset, length)\n\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return base64Write(this, string, offset, length)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return ucs2Write(this, string, offset, length)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0)\n }\n}\n\nfunction base64Slice (buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf)\n } else {\n return base64.fromByteArray(buf.slice(start, end))\n }\n}\n\nfunction utf8Slice (buf, start, end) {\n end = Math.min(buf.length, end)\n const res = []\n\n let i = start\n while (i < end) {\n const firstByte = buf[i]\n let codePoint = null\n let bytesPerSequence = (firstByte > 0xEF)\n ? 4\n : (firstByte > 0xDF)\n ? 3\n : (firstByte > 0xBF)\n ? 2\n : 1\n\n if (i + bytesPerSequence <= end) {\n let secondByte, thirdByte, fourthByte, tempCodePoint\n\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 0x80) {\n codePoint = firstByte\n }\n break\n case 2:\n secondByte = buf[i + 1]\n if ((secondByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n if (tempCodePoint > 0x7F) {\n codePoint = tempCodePoint\n }\n }\n break\n case 3:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n codePoint = tempCodePoint\n }\n }\n break\n case 4:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n fourthByte = buf[i + 3]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n codePoint = tempCodePoint\n }\n }\n }\n }\n\n if (codePoint === null) {\n // we did not generate a valid codePoint so insert a\n // replacement char (U+FFFD) and advance only 1 byte\n codePoint = 0xFFFD\n bytesPerSequence = 1\n } else if (codePoint > 0xFFFF) {\n // encode to utf16 (surrogate pair dance)\n codePoint -= 0x10000\n res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n codePoint = 0xDC00 | codePoint & 0x3FF\n }\n\n res.push(codePoint)\n i += bytesPerSequence\n }\n\n return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nconst MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n const len = codePoints.length\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n }\n\n // Decode in chunks to avoid \"call stack size exceeded\".\n let res = ''\n let i = 0\n while (i < len) {\n res += String.fromCharCode.apply(\n String,\n codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n )\n }\n return res\n}\n\nfunction asciiSlice (buf, start, end) {\n let ret = ''\n end = Math.min(buf.length, end)\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F)\n }\n return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n let ret = ''\n end = Math.min(buf.length, end)\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i])\n }\n return ret\n}\n\nfunction hexSlice (buf, start, end) {\n const len = buf.length\n\n if (!start || start < 0) start = 0\n if (!end || end < 0 || end > len) end = len\n\n let out = ''\n for (let i = start; i < end; ++i) {\n out += hexSliceLookupTable[buf[i]]\n }\n return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n const bytes = buf.slice(start, end)\n let res = ''\n // If bytes.length is odd, the last 8 bits must be ignored (same as node.js)\n for (let i = 0; i < bytes.length - 1; i += 2) {\n res += String.fromCharCode(bytes[i] + (bytes[i + 1] * 256))\n }\n return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n const len = this.length\n start = ~~start\n end = end === undefined ? len : ~~end\n\n if (start < 0) {\n start += len\n if (start < 0) start = 0\n } else if (start > len) {\n start = len\n }\n\n if (end < 0) {\n end += len\n if (end < 0) end = 0\n } else if (end > len) {\n end = len\n }\n\n if (end < start) end = start\n\n const newBuf = this.subarray(start, end)\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(newBuf, Buffer.prototype)\n\n return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUintLE =\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let val = this[offset]\n let mul = 1\n let i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUintBE =\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n checkOffset(offset, byteLength, this.length)\n }\n\n let val = this[offset + --byteLength]\n let mul = 1\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUint8 =\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n return this[offset]\n}\n\nBuffer.prototype.readUint16LE =\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUint16BE =\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUint32LE =\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return ((this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16)) +\n (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUint32BE =\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] * 0x1000000) +\n ((this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n this[offset + 3])\n}\n\nBuffer.prototype.readBigUInt64LE = defineBigIntMethod(function readBigUInt64LE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const lo = first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24\n\n const hi = this[++offset] +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n last * 2 ** 24\n\n return BigInt(lo) + (BigInt(hi) << BigInt(32))\n})\n\nBuffer.prototype.readBigUInt64BE = defineBigIntMethod(function readBigUInt64BE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const hi = first * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset]\n\n const lo = this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last\n\n return (BigInt(hi) << BigInt(32)) + BigInt(lo)\n})\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let val = this[offset]\n let mul = 1\n let i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let i = byteLength\n let mul = 1\n let val = this[offset + --i]\n while (i > 0 && (mul *= 0x100)) {\n val += this[offset + --i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n if (!(this[offset] & 0x80)) return (this[offset])\n return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n const val = this[offset] | (this[offset + 1] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n const val = this[offset + 1] | (this[offset] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16) |\n (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] << 24) |\n (this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n (this[offset + 3])\n}\n\nBuffer.prototype.readBigInt64LE = defineBigIntMethod(function readBigInt64LE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const val = this[offset + 4] +\n this[offset + 5] * 2 ** 8 +\n this[offset + 6] * 2 ** 16 +\n (last << 24) // Overflow\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24)\n})\n\nBuffer.prototype.readBigInt64BE = defineBigIntMethod(function readBigInt64BE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const val = (first << 24) + // Overflow\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset]\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last)\n})\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUintLE =\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n let mul = 1\n let i = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUintBE =\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n let i = byteLength - 1\n let mul = 1\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUint8 =\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeUint16LE =\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeUint16BE =\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeUint32LE =\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset + 3] = (value >>> 24)\n this[offset + 2] = (value >>> 16)\n this[offset + 1] = (value >>> 8)\n this[offset] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeUint32BE =\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nfunction wrtBigUInt64LE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7)\n\n let lo = Number(value & BigInt(0xffffffff))\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n return offset\n}\n\nfunction wrtBigUInt64BE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7)\n\n let lo = Number(value & BigInt(0xffffffff))\n buf[offset + 7] = lo\n lo = lo >> 8\n buf[offset + 6] = lo\n lo = lo >> 8\n buf[offset + 5] = lo\n lo = lo >> 8\n buf[offset + 4] = lo\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n buf[offset + 3] = hi\n hi = hi >> 8\n buf[offset + 2] = hi\n hi = hi >> 8\n buf[offset + 1] = hi\n hi = hi >> 8\n buf[offset] = hi\n return offset + 8\n}\n\nBuffer.prototype.writeBigUInt64LE = defineBigIntMethod(function writeBigUInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeBigUInt64BE = defineBigIntMethod(function writeBigUInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n let i = 0\n let mul = 1\n let sub = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n let i = byteLength - 1\n let mul = 1\n let sub = 0\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n if (value < 0) value = 0xff + value + 1\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n this[offset + 2] = (value >>> 16)\n this[offset + 3] = (value >>> 24)\n return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (value < 0) value = 0xffffffff + value + 1\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeBigInt64LE = defineBigIntMethod(function writeBigInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nBuffer.prototype.writeBigInt64BE = defineBigIntMethod(function writeBigInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n }\n ieee754.write(buf, value, offset, littleEndian, 23, 4)\n return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n }\n ieee754.write(buf, value, offset, littleEndian, 52, 8)\n return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n if (!Buffer.isBuffer(target)) throw new TypeError('argument should be a Buffer')\n if (!start) start = 0\n if (!end && end !== 0) end = this.length\n if (targetStart >= target.length) targetStart = target.length\n if (!targetStart) targetStart = 0\n if (end > 0 && end < start) end = start\n\n // Copy 0 bytes; we're done\n if (end === start) return 0\n if (target.length === 0 || this.length === 0) return 0\n\n // Fatal error conditions\n if (targetStart < 0) {\n throw new RangeError('targetStart out of bounds')\n }\n if (start < 0 || start >= this.length) throw new RangeError('Index out of range')\n if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n // Are we oob?\n if (end > this.length) end = this.length\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start\n }\n\n const len = end - start\n\n if (this === target && typeof Uint8Array.prototype.copyWithin === 'function') {\n // Use built-in when available, missing from IE11\n this.copyWithin(targetStart, start, end)\n } else {\n Uint8Array.prototype.set.call(\n target,\n this.subarray(start, end),\n targetStart\n )\n }\n\n return len\n}\n\n// Usage:\n// buffer.fill(number[, offset[, end]])\n// buffer.fill(buffer[, offset[, end]])\n// buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n // Handle string cases:\n if (typeof val === 'string') {\n if (typeof start === 'string') {\n encoding = start\n start = 0\n end = this.length\n } else if (typeof end === 'string') {\n encoding = end\n end = this.length\n }\n if (encoding !== undefined && typeof encoding !== 'string') {\n throw new TypeError('encoding must be a string')\n }\n if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n if (val.length === 1) {\n const code = val.charCodeAt(0)\n if ((encoding === 'utf8' && code < 128) ||\n encoding === 'latin1') {\n // Fast path: If `val` fits into a single byte, use that numeric value.\n val = code\n }\n }\n } else if (typeof val === 'number') {\n val = val & 255\n } else if (typeof val === 'boolean') {\n val = Number(val)\n }\n\n // Invalid ranges are not set to a default, so can range check early.\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError('Out of range index')\n }\n\n if (end <= start) {\n return this\n }\n\n start = start >>> 0\n end = end === undefined ? this.length : end >>> 0\n\n if (!val) val = 0\n\n let i\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val\n }\n } else {\n const bytes = Buffer.isBuffer(val)\n ? val\n : Buffer.from(val, encoding)\n const len = bytes.length\n if (len === 0) {\n throw new TypeError('The value \"' + val +\n '\" is invalid for argument \"value\"')\n }\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len]\n }\n }\n\n return this\n}\n\n// CUSTOM ERRORS\n// =============\n\n// Simplified versions from Node, changed for Buffer-only usage\nconst errors = {}\nfunction E (sym, getMessage, Base) {\n errors[sym] = class NodeError extends Base {\n constructor () {\n super()\n\n Object.defineProperty(this, 'message', {\n value: getMessage.apply(this, arguments),\n writable: true,\n configurable: true\n })\n\n // Add the error code to the name to include it in the stack trace.\n this.name = `${this.name} [${sym}]`\n // Access the stack to generate the error message including the error code\n // from the name.\n this.stack // eslint-disable-line no-unused-expressions\n // Reset the name to the actual name.\n delete this.name\n }\n\n get code () {\n return sym\n }\n\n set code (value) {\n Object.defineProperty(this, 'code', {\n configurable: true,\n enumerable: true,\n value,\n writable: true\n })\n }\n\n toString () {\n return `${this.name} [${sym}]: ${this.message}`\n }\n }\n}\n\nE('ERR_BUFFER_OUT_OF_BOUNDS',\n function (name) {\n if (name) {\n return `${name} is outside of buffer bounds`\n }\n\n return 'Attempt to access memory outside buffer bounds'\n }, RangeError)\nE('ERR_INVALID_ARG_TYPE',\n function (name, actual) {\n return `The \"${name}\" argument must be of type number. Received type ${typeof actual}`\n }, TypeError)\nE('ERR_OUT_OF_RANGE',\n function (str, range, input) {\n let msg = `The value of \"${str}\" is out of range.`\n let received = input\n if (Number.isInteger(input) && Math.abs(input) > 2 ** 32) {\n received = addNumericalSeparator(String(input))\n } else if (typeof input === 'bigint') {\n received = String(input)\n if (input > BigInt(2) ** BigInt(32) || input < -(BigInt(2) ** BigInt(32))) {\n received = addNumericalSeparator(received)\n }\n received += 'n'\n }\n msg += ` It must be ${range}. Received ${received}`\n return msg\n }, RangeError)\n\nfunction addNumericalSeparator (val) {\n let res = ''\n let i = val.length\n const start = val[0] === '-' ? 1 : 0\n for (; i >= start + 4; i -= 3) {\n res = `_${val.slice(i - 3, i)}${res}`\n }\n return `${val.slice(0, i)}${res}`\n}\n\n// CHECK FUNCTIONS\n// ===============\n\nfunction checkBounds (buf, offset, byteLength) {\n validateNumber(offset, 'offset')\n if (buf[offset] === undefined || buf[offset + byteLength] === undefined) {\n boundsError(offset, buf.length - (byteLength + 1))\n }\n}\n\nfunction checkIntBI (value, min, max, buf, offset, byteLength) {\n if (value > max || value < min) {\n const n = typeof min === 'bigint' ? 'n' : ''\n let range\n if (byteLength > 3) {\n if (min === 0 || min === BigInt(0)) {\n range = `>= 0${n} and < 2${n} ** ${(byteLength + 1) * 8}${n}`\n } else {\n range = `>= -(2${n} ** ${(byteLength + 1) * 8 - 1}${n}) and < 2 ** ` +\n `${(byteLength + 1) * 8 - 1}${n}`\n }\n } else {\n range = `>= ${min}${n} and <= ${max}${n}`\n }\n throw new errors.ERR_OUT_OF_RANGE('value', range, value)\n }\n checkBounds(buf, offset, byteLength)\n}\n\nfunction validateNumber (value, name) {\n if (typeof value !== 'number') {\n throw new errors.ERR_INVALID_ARG_TYPE(name, 'number', value)\n }\n}\n\nfunction boundsError (value, length, type) {\n if (Math.floor(value) !== value) {\n validateNumber(value, type)\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset', 'an integer', value)\n }\n\n if (length < 0) {\n throw new errors.ERR_BUFFER_OUT_OF_BOUNDS()\n }\n\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset',\n `>= ${type ? 1 : 0} and <= ${length}`,\n value)\n}\n\n// HELPER FUNCTIONS\n// ================\n\nconst INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n // Node takes equal signs as end of the Base64 encoding\n str = str.split('=')[0]\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = str.trim().replace(INVALID_BASE64_RE, '')\n // Node converts strings with length < 2 to ''\n if (str.length < 2) return ''\n // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n while (str.length % 4 !== 0) {\n str = str + '='\n }\n return str\n}\n\nfunction utf8ToBytes (string, units) {\n units = units || Infinity\n let codePoint\n const length = string.length\n let leadSurrogate = null\n const bytes = []\n\n for (let i = 0; i < length; ++i) {\n codePoint = string.charCodeAt(i)\n\n // is surrogate component\n if (codePoint > 0xD7FF && codePoint < 0xE000) {\n // last char was a lead\n if (!leadSurrogate) {\n // no lead yet\n if (codePoint > 0xDBFF) {\n // unexpected trail\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n } else if (i + 1 === length) {\n // unpaired lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n }\n\n // valid lead\n leadSurrogate = codePoint\n\n continue\n }\n\n // 2 leads in a row\n if (codePoint < 0xDC00) {\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n leadSurrogate = codePoint\n continue\n }\n\n // valid surrogate pair\n codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n } else if (leadSurrogate) {\n // valid bmp char, but last char was a lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n }\n\n leadSurrogate = null\n\n // encode utf8\n if (codePoint < 0x80) {\n if ((units -= 1) < 0) break\n bytes.push(codePoint)\n } else if (codePoint < 0x800) {\n if ((units -= 2) < 0) break\n bytes.push(\n codePoint >> 0x6 | 0xC0,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x10000) {\n if ((units -= 3) < 0) break\n bytes.push(\n codePoint >> 0xC | 0xE0,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x110000) {\n if ((units -= 4) < 0) break\n bytes.push(\n codePoint >> 0x12 | 0xF0,\n codePoint >> 0xC & 0x3F | 0x80,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else {\n throw new Error('Invalid code point')\n }\n }\n\n return bytes\n}\n\nfunction asciiToBytes (str) {\n const byteArray = []\n for (let i = 0; i < str.length; ++i) {\n // Node's code seems to be doing this and not & 0x7F..\n byteArray.push(str.charCodeAt(i) & 0xFF)\n }\n return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n let c, hi, lo\n const byteArray = []\n for (let i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0) break\n\n c = str.charCodeAt(i)\n hi = c >> 8\n lo = c % 256\n byteArray.push(lo)\n byteArray.push(hi)\n }\n\n return byteArray\n}\n\nfunction base64ToBytes (str) {\n return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n let i\n for (i = 0; i < length; ++i) {\n if ((i + offset >= dst.length) || (i >= src.length)) break\n dst[i + offset] = src[i]\n }\n return i\n}\n\n// ArrayBuffer or Uint8Array objects from other contexts (i.e. iframes) do not pass\n// the `instanceof` check but they should be treated as of that type.\n// See: https://github.com/feross/buffer/issues/166\nfunction isInstance (obj, type) {\n return obj instanceof type ||\n (obj != null && obj.constructor != null && obj.constructor.name != null &&\n obj.constructor.name === type.name)\n}\nfunction numberIsNaN (obj) {\n // For IE11 support\n return obj !== obj // eslint-disable-line no-self-compare\n}\n\n// Create lookup table for `toString('hex')`\n// See: https://github.com/feross/buffer/issues/219\nconst hexSliceLookupTable = (function () {\n const alphabet = '0123456789abcdef'\n const table = new Array(256)\n for (let i = 0; i < 16; ++i) {\n const i16 = i * 16\n for (let j = 0; j < 16; ++j) {\n table[i16 + j] = alphabet[i] + alphabet[j]\n }\n }\n return table\n})()\n\n// Return not function with Error if BigInt not supported\nfunction defineBigIntMethod (fn) {\n return typeof BigInt === 'undefined' ? BufferBigIntNotDefined : fn\n}\n\nfunction BufferBigIntNotDefined () {\n throw new Error('BigInt not supported')\n}\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\nvar R = typeof Reflect === 'object' ? Reflect : null\nvar ReflectApply = R && typeof R.apply === 'function'\n ? R.apply\n : function ReflectApply(target, receiver, args) {\n return Function.prototype.apply.call(target, receiver, args);\n }\n\nvar ReflectOwnKeys\nif (R && typeof R.ownKeys === 'function') {\n ReflectOwnKeys = R.ownKeys\n} else if (Object.getOwnPropertySymbols) {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target)\n .concat(Object.getOwnPropertySymbols(target));\n };\n} else {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target);\n };\n}\n\nfunction ProcessEmitWarning(warning) {\n if (console && console.warn) console.warn(warning);\n}\n\nvar NumberIsNaN = Number.isNaN || function NumberIsNaN(value) {\n return value !== value;\n}\n\nfunction EventEmitter() {\n EventEmitter.init.call(this);\n}\nmodule.exports = EventEmitter;\nmodule.exports.once = once;\n\n// Backwards-compat with node 0.10.x\nEventEmitter.EventEmitter = EventEmitter;\n\nEventEmitter.prototype._events = undefined;\nEventEmitter.prototype._eventsCount = 0;\nEventEmitter.prototype._maxListeners = undefined;\n\n// By default EventEmitters will print a warning if more than 10 listeners are\n// added to it. This is a useful default which helps finding memory leaks.\nvar defaultMaxListeners = 10;\n\nfunction checkListener(listener) {\n if (typeof listener !== 'function') {\n throw new TypeError('The \"listener\" argument must be of type Function. Received type ' + typeof listener);\n }\n}\n\nObject.defineProperty(EventEmitter, 'defaultMaxListeners', {\n enumerable: true,\n get: function() {\n return defaultMaxListeners;\n },\n set: function(arg) {\n if (typeof arg !== 'number' || arg < 0 || NumberIsNaN(arg)) {\n throw new RangeError('The value of \"defaultMaxListeners\" is out of range. It must be a non-negative number. Received ' + arg + '.');\n }\n defaultMaxListeners = arg;\n }\n});\n\nEventEmitter.init = function() {\n\n if (this._events === undefined ||\n this._events === Object.getPrototypeOf(this)._events) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n }\n\n this._maxListeners = this._maxListeners || undefined;\n};\n\n// Obviously not all Emitters should be limited to 10. This function allows\n// that to be increased. Set to zero for unlimited.\nEventEmitter.prototype.setMaxListeners = function setMaxListeners(n) {\n if (typeof n !== 'number' || n < 0 || NumberIsNaN(n)) {\n throw new RangeError('The value of \"n\" is out of range. It must be a non-negative number. Received ' + n + '.');\n }\n this._maxListeners = n;\n return this;\n};\n\nfunction _getMaxListeners(that) {\n if (that._maxListeners === undefined)\n return EventEmitter.defaultMaxListeners;\n return that._maxListeners;\n}\n\nEventEmitter.prototype.getMaxListeners = function getMaxListeners() {\n return _getMaxListeners(this);\n};\n\nEventEmitter.prototype.emit = function emit(type) {\n var args = [];\n for (var i = 1; i < arguments.length; i++) args.push(arguments[i]);\n var doError = (type === 'error');\n\n var events = this._events;\n if (events !== undefined)\n doError = (doError && events.error === undefined);\n else if (!doError)\n return false;\n\n // If there is no 'error' event listener then throw.\n if (doError) {\n var er;\n if (args.length > 0)\n er = args[0];\n if (er instanceof Error) {\n // Note: The comments on the `throw` lines are intentional, they show\n // up in Node's output if this results in an unhandled exception.\n throw er; // Unhandled 'error' event\n }\n // At least give some kind of context to the user\n var err = new Error('Unhandled error.' + (er ? ' (' + er.message + ')' : ''));\n err.context = er;\n throw err; // Unhandled 'error' event\n }\n\n var handler = events[type];\n\n if (handler === undefined)\n return false;\n\n if (typeof handler === 'function') {\n ReflectApply(handler, this, args);\n } else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n ReflectApply(listeners[i], this, args);\n }\n\n return true;\n};\n\nfunction _addListener(target, type, listener, prepend) {\n var m;\n var events;\n var existing;\n\n checkListener(listener);\n\n events = target._events;\n if (events === undefined) {\n events = target._events = Object.create(null);\n target._eventsCount = 0;\n } else {\n // To avoid recursion in the case that type === \"newListener\"! Before\n // adding it to the listeners, first emit \"newListener\".\n if (events.newListener !== undefined) {\n target.emit('newListener', type,\n listener.listener ? listener.listener : listener);\n\n // Re-assign `events` because a newListener handler could have caused the\n // this._events to be assigned to a new object\n events = target._events;\n }\n existing = events[type];\n }\n\n if (existing === undefined) {\n // Optimize the case of one listener. Don't need the extra array object.\n existing = events[type] = listener;\n ++target._eventsCount;\n } else {\n if (typeof existing === 'function') {\n // Adding the second element, need to change to array.\n existing = events[type] =\n prepend ? [listener, existing] : [existing, listener];\n // If we've already got an array, just append.\n } else if (prepend) {\n existing.unshift(listener);\n } else {\n existing.push(listener);\n }\n\n // Check for listener leak\n m = _getMaxListeners(target);\n if (m > 0 && existing.length > m && !existing.warned) {\n existing.warned = true;\n // No error code for this since it is a Warning\n // eslint-disable-next-line no-restricted-syntax\n var w = new Error('Possible EventEmitter memory leak detected. ' +\n existing.length + ' ' + String(type) + ' listeners ' +\n 'added. Use emitter.setMaxListeners() to ' +\n 'increase limit');\n w.name = 'MaxListenersExceededWarning';\n w.emitter = target;\n w.type = type;\n w.count = existing.length;\n ProcessEmitWarning(w);\n }\n }\n\n return target;\n}\n\nEventEmitter.prototype.addListener = function addListener(type, listener) {\n return _addListener(this, type, listener, false);\n};\n\nEventEmitter.prototype.on = EventEmitter.prototype.addListener;\n\nEventEmitter.prototype.prependListener =\n function prependListener(type, listener) {\n return _addListener(this, type, listener, true);\n };\n\nfunction onceWrapper() {\n if (!this.fired) {\n this.target.removeListener(this.type, this.wrapFn);\n this.fired = true;\n if (arguments.length === 0)\n return this.listener.call(this.target);\n return this.listener.apply(this.target, arguments);\n }\n}\n\nfunction _onceWrap(target, type, listener) {\n var state = { fired: false, wrapFn: undefined, target: target, type: type, listener: listener };\n var wrapped = onceWrapper.bind(state);\n wrapped.listener = listener;\n state.wrapFn = wrapped;\n return wrapped;\n}\n\nEventEmitter.prototype.once = function once(type, listener) {\n checkListener(listener);\n this.on(type, _onceWrap(this, type, listener));\n return this;\n};\n\nEventEmitter.prototype.prependOnceListener =\n function prependOnceListener(type, listener) {\n checkListener(listener);\n this.prependListener(type, _onceWrap(this, type, listener));\n return this;\n };\n\n// Emits a 'removeListener' event if and only if the listener was removed.\nEventEmitter.prototype.removeListener =\n function removeListener(type, listener) {\n var list, events, position, i, originalListener;\n\n checkListener(listener);\n\n events = this._events;\n if (events === undefined)\n return this;\n\n list = events[type];\n if (list === undefined)\n return this;\n\n if (list === listener || list.listener === listener) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else {\n delete events[type];\n if (events.removeListener)\n this.emit('removeListener', type, list.listener || listener);\n }\n } else if (typeof list !== 'function') {\n position = -1;\n\n for (i = list.length - 1; i >= 0; i--) {\n if (list[i] === listener || list[i].listener === listener) {\n originalListener = list[i].listener;\n position = i;\n break;\n }\n }\n\n if (position < 0)\n return this;\n\n if (position === 0)\n list.shift();\n else {\n spliceOne(list, position);\n }\n\n if (list.length === 1)\n events[type] = list[0];\n\n if (events.removeListener !== undefined)\n this.emit('removeListener', type, originalListener || listener);\n }\n\n return this;\n };\n\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\n\nEventEmitter.prototype.removeAllListeners =\n function removeAllListeners(type) {\n var listeners, events, i;\n\n events = this._events;\n if (events === undefined)\n return this;\n\n // not listening for removeListener, no need to emit\n if (events.removeListener === undefined) {\n if (arguments.length === 0) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n } else if (events[type] !== undefined) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else\n delete events[type];\n }\n return this;\n }\n\n // emit removeListener for all listeners on all events\n if (arguments.length === 0) {\n var keys = Object.keys(events);\n var key;\n for (i = 0; i < keys.length; ++i) {\n key = keys[i];\n if (key === 'removeListener') continue;\n this.removeAllListeners(key);\n }\n this.removeAllListeners('removeListener');\n this._events = Object.create(null);\n this._eventsCount = 0;\n return this;\n }\n\n listeners = events[type];\n\n if (typeof listeners === 'function') {\n this.removeListener(type, listeners);\n } else if (listeners !== undefined) {\n // LIFO order\n for (i = listeners.length - 1; i >= 0; i--) {\n this.removeListener(type, listeners[i]);\n }\n }\n\n return this;\n };\n\nfunction _listeners(target, type, unwrap) {\n var events = target._events;\n\n if (events === undefined)\n return [];\n\n var evlistener = events[type];\n if (evlistener === undefined)\n return [];\n\n if (typeof evlistener === 'function')\n return unwrap ? [evlistener.listener || evlistener] : [evlistener];\n\n return unwrap ?\n unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length);\n}\n\nEventEmitter.prototype.listeners = function listeners(type) {\n return _listeners(this, type, true);\n};\n\nEventEmitter.prototype.rawListeners = function rawListeners(type) {\n return _listeners(this, type, false);\n};\n\nEventEmitter.listenerCount = function(emitter, type) {\n if (typeof emitter.listenerCount === 'function') {\n return emitter.listenerCount(type);\n } else {\n return listenerCount.call(emitter, type);\n }\n};\n\nEventEmitter.prototype.listenerCount = listenerCount;\nfunction listenerCount(type) {\n var events = this._events;\n\n if (events !== undefined) {\n var evlistener = events[type];\n\n if (typeof evlistener === 'function') {\n return 1;\n } else if (evlistener !== undefined) {\n return evlistener.length;\n }\n }\n\n return 0;\n}\n\nEventEmitter.prototype.eventNames = function eventNames() {\n return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : [];\n};\n\nfunction arrayClone(arr, n) {\n var copy = new Array(n);\n for (var i = 0; i < n; ++i)\n copy[i] = arr[i];\n return copy;\n}\n\nfunction spliceOne(list, index) {\n for (; index + 1 < list.length; index++)\n list[index] = list[index + 1];\n list.pop();\n}\n\nfunction unwrapListeners(arr) {\n var ret = new Array(arr.length);\n for (var i = 0; i < ret.length; ++i) {\n ret[i] = arr[i].listener || arr[i];\n }\n return ret;\n}\n\nfunction once(emitter, name) {\n return new Promise(function (resolve, reject) {\n function errorListener(err) {\n emitter.removeListener(name, resolver);\n reject(err);\n }\n\n function resolver() {\n if (typeof emitter.removeListener === 'function') {\n emitter.removeListener('error', errorListener);\n }\n resolve([].slice.call(arguments));\n };\n\n eventTargetAgnosticAddListener(emitter, name, resolver, { once: true });\n if (name !== 'error') {\n addErrorHandlerIfEventEmitter(emitter, errorListener, { once: true });\n }\n });\n}\n\nfunction addErrorHandlerIfEventEmitter(emitter, handler, flags) {\n if (typeof emitter.on === 'function') {\n eventTargetAgnosticAddListener(emitter, 'error', handler, flags);\n }\n}\n\nfunction eventTargetAgnosticAddListener(emitter, name, listener, flags) {\n if (typeof emitter.on === 'function') {\n if (flags.once) {\n emitter.once(name, listener);\n } else {\n emitter.on(name, listener);\n }\n } else if (typeof emitter.addEventListener === 'function') {\n // EventTarget does not have `error` event semantics like Node\n // EventEmitters, we do not listen for `error` events here.\n emitter.addEventListener(name, function wrapListener(arg) {\n // IE does not have builtin `{ once: true }` support so we\n // have to do it manually.\n if (flags.once) {\n emitter.removeEventListener(name, wrapListener);\n }\n listener(arg);\n });\n } else {\n throw new TypeError('The \"emitter\" argument must be of type EventEmitter. Received type ' + typeof emitter);\n }\n}\n","/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */\nexports.read = function (buffer, offset, isLE, mLen, nBytes) {\n var e, m\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var nBits = -7\n var i = isLE ? (nBytes - 1) : 0\n var d = isLE ? -1 : 1\n var s = buffer[offset + i]\n\n i += d\n\n e = s & ((1 << (-nBits)) - 1)\n s >>= (-nBits)\n nBits += eLen\n for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & ((1 << (-nBits)) - 1)\n e >>= (-nBits)\n nBits += mLen\n for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias\n } else if (e === eMax) {\n return m ? NaN : ((s ? -1 : 1) * Infinity)\n } else {\n m = m + Math.pow(2, mLen)\n e = e - eBias\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n var i = isLE ? 0 : (nBytes - 1)\n var d = isLE ? 1 : -1\n var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n value = Math.abs(value)\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0\n e = eMax\n } else {\n e = Math.floor(Math.log(value) / Math.LN2)\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--\n c *= 2\n }\n if (e + eBias >= 1) {\n value += rt / c\n } else {\n value += rt * Math.pow(2, 1 - eBias)\n }\n if (value * c >= 2) {\n e++\n c /= 2\n }\n\n if (e + eBias >= eMax) {\n m = 0\n e = eMax\n } else if (e + eBias >= 1) {\n m = ((value * c) - 1) * Math.pow(2, mLen)\n e = e + eBias\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n e = 0\n }\n }\n\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n e = (e << mLen) | m\n eLen += mLen\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128\n}\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView');\n\nmodule.exports = DataView;\n","var hashClear = require('./_hashClear'),\n hashDelete = require('./_hashDelete'),\n hashGet = require('./_hashGet'),\n hashHas = require('./_hashHas'),\n hashSet = require('./_hashSet');\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\nmodule.exports = Hash;\n","var listCacheClear = require('./_listCacheClear'),\n listCacheDelete = require('./_listCacheDelete'),\n listCacheGet = require('./_listCacheGet'),\n listCacheHas = require('./_listCacheHas'),\n listCacheSet = require('./_listCacheSet');\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\nmodule.exports = ListCache;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map');\n\nmodule.exports = Map;\n","var mapCacheClear = require('./_mapCacheClear'),\n mapCacheDelete = require('./_mapCacheDelete'),\n mapCacheGet = require('./_mapCacheGet'),\n mapCacheHas = require('./_mapCacheHas'),\n mapCacheSet = require('./_mapCacheSet');\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\nmodule.exports = MapCache;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Promise = getNative(root, 'Promise');\n\nmodule.exports = Promise;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Set = getNative(root, 'Set');\n\nmodule.exports = Set;\n","var MapCache = require('./_MapCache'),\n setCacheAdd = require('./_setCacheAdd'),\n setCacheHas = require('./_setCacheHas');\n\n/**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\nfunction SetCache(values) {\n var index = -1,\n length = values == null ? 0 : values.length;\n\n this.__data__ = new MapCache;\n while (++index < length) {\n this.add(values[index]);\n }\n}\n\n// Add methods to `SetCache`.\nSetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\nSetCache.prototype.has = setCacheHas;\n\nmodule.exports = SetCache;\n","var ListCache = require('./_ListCache'),\n stackClear = require('./_stackClear'),\n stackDelete = require('./_stackDelete'),\n stackGet = require('./_stackGet'),\n stackHas = require('./_stackHas'),\n stackSet = require('./_stackSet');\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\nmodule.exports = Stack;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Uint8Array = root.Uint8Array;\n\nmodule.exports = Uint8Array;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar WeakMap = getNative(root, 'WeakMap');\n\nmodule.exports = WeakMap;\n","/**\n * A specialized version of `_.forEach` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\nfunction arrayEach(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (iteratee(array[index], index, array) === false) {\n break;\n }\n }\n return array;\n}\n\nmodule.exports = arrayEach;\n","/**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\nfunction arrayFilter(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result[resIndex++] = value;\n }\n }\n return result;\n}\n\nmodule.exports = arrayFilter;\n","var baseTimes = require('./_baseTimes'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isIndex = require('./_isIndex'),\n isTypedArray = require('./isTypedArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = arrayLikeKeys;\n","/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n}\n\nmodule.exports = arrayPush;\n","/**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\nfunction arraySome(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (predicate(array[index], index, array)) {\n return true;\n }\n }\n return false;\n}\n\nmodule.exports = arraySome;\n","var baseAssignValue = require('./_baseAssignValue'),\n eq = require('./eq');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\nmodule.exports = assignValue;\n","var eq = require('./eq');\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\nmodule.exports = assocIndexOf;\n","var copyObject = require('./_copyObject'),\n keys = require('./keys');\n\n/**\n * The base implementation of `_.assign` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssign(object, source) {\n return object && copyObject(source, keys(source), object);\n}\n\nmodule.exports = baseAssign;\n","var copyObject = require('./_copyObject'),\n keysIn = require('./keysIn');\n\n/**\n * The base implementation of `_.assignIn` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssignIn(object, source) {\n return object && copyObject(source, keysIn(source), object);\n}\n\nmodule.exports = baseAssignIn;\n","var defineProperty = require('./_defineProperty');\n\n/**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction baseAssignValue(object, key, value) {\n if (key == '__proto__' && defineProperty) {\n defineProperty(object, key, {\n 'configurable': true,\n 'enumerable': true,\n 'value': value,\n 'writable': true\n });\n } else {\n object[key] = value;\n }\n}\n\nmodule.exports = baseAssignValue;\n","var Stack = require('./_Stack'),\n arrayEach = require('./_arrayEach'),\n assignValue = require('./_assignValue'),\n baseAssign = require('./_baseAssign'),\n baseAssignIn = require('./_baseAssignIn'),\n cloneBuffer = require('./_cloneBuffer'),\n copyArray = require('./_copyArray'),\n copySymbols = require('./_copySymbols'),\n copySymbolsIn = require('./_copySymbolsIn'),\n getAllKeys = require('./_getAllKeys'),\n getAllKeysIn = require('./_getAllKeysIn'),\n getTag = require('./_getTag'),\n initCloneArray = require('./_initCloneArray'),\n initCloneByTag = require('./_initCloneByTag'),\n initCloneObject = require('./_initCloneObject'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isMap = require('./isMap'),\n isObject = require('./isObject'),\n isSet = require('./isSet'),\n keys = require('./keys'),\n keysIn = require('./keysIn');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_FLAT_FLAG = 2,\n CLONE_SYMBOLS_FLAG = 4;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values supported by `_.clone`. */\nvar cloneableTags = {};\ncloneableTags[argsTag] = cloneableTags[arrayTag] =\ncloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =\ncloneableTags[boolTag] = cloneableTags[dateTag] =\ncloneableTags[float32Tag] = cloneableTags[float64Tag] =\ncloneableTags[int8Tag] = cloneableTags[int16Tag] =\ncloneableTags[int32Tag] = cloneableTags[mapTag] =\ncloneableTags[numberTag] = cloneableTags[objectTag] =\ncloneableTags[regexpTag] = cloneableTags[setTag] =\ncloneableTags[stringTag] = cloneableTags[symbolTag] =\ncloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =\ncloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;\ncloneableTags[errorTag] = cloneableTags[funcTag] =\ncloneableTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.clone` and `_.cloneDeep` which tracks\n * traversed objects.\n *\n * @private\n * @param {*} value The value to clone.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Deep clone\n * 2 - Flatten inherited properties\n * 4 - Clone symbols\n * @param {Function} [customizer] The function to customize cloning.\n * @param {string} [key] The key of `value`.\n * @param {Object} [object] The parent object of `value`.\n * @param {Object} [stack] Tracks traversed objects and their clone counterparts.\n * @returns {*} Returns the cloned value.\n */\nfunction baseClone(value, bitmask, customizer, key, object, stack) {\n var result,\n isDeep = bitmask & CLONE_DEEP_FLAG,\n isFlat = bitmask & CLONE_FLAT_FLAG,\n isFull = bitmask & CLONE_SYMBOLS_FLAG;\n\n if (customizer) {\n result = object ? customizer(value, key, object, stack) : customizer(value);\n }\n if (result !== undefined) {\n return result;\n }\n if (!isObject(value)) {\n return value;\n }\n var isArr = isArray(value);\n if (isArr) {\n result = initCloneArray(value);\n if (!isDeep) {\n return copyArray(value, result);\n }\n } else {\n var tag = getTag(value),\n isFunc = tag == funcTag || tag == genTag;\n\n if (isBuffer(value)) {\n return cloneBuffer(value, isDeep);\n }\n if (tag == objectTag || tag == argsTag || (isFunc && !object)) {\n result = (isFlat || isFunc) ? {} : initCloneObject(value);\n if (!isDeep) {\n return isFlat\n ? copySymbolsIn(value, baseAssignIn(result, value))\n : copySymbols(value, baseAssign(result, value));\n }\n } else {\n if (!cloneableTags[tag]) {\n return object ? value : {};\n }\n result = initCloneByTag(value, tag, isDeep);\n }\n }\n // Check for circular references and return its corresponding clone.\n stack || (stack = new Stack);\n var stacked = stack.get(value);\n if (stacked) {\n return stacked;\n }\n stack.set(value, result);\n\n if (isSet(value)) {\n value.forEach(function(subValue) {\n result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));\n });\n } else if (isMap(value)) {\n value.forEach(function(subValue, key) {\n result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n }\n\n var keysFunc = isFull\n ? (isFlat ? getAllKeysIn : getAllKeys)\n : (isFlat ? keysIn : keys);\n\n var props = isArr ? undefined : keysFunc(value);\n arrayEach(props || value, function(subValue, key) {\n if (props) {\n key = subValue;\n subValue = value[key];\n }\n // Recursively populate clone (susceptible to call stack limits).\n assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n return result;\n}\n\nmodule.exports = baseClone;\n","var isObject = require('./isObject');\n\n/** Built-in value references. */\nvar objectCreate = Object.create;\n\n/**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} proto The object to inherit from.\n * @returns {Object} Returns the new object.\n */\nvar baseCreate = (function() {\n function object() {}\n return function(proto) {\n if (!isObject(proto)) {\n return {};\n }\n if (objectCreate) {\n return objectCreate(proto);\n }\n object.prototype = proto;\n var result = new object;\n object.prototype = undefined;\n return result;\n };\n}());\n\nmodule.exports = baseCreate;\n","var arrayPush = require('./_arrayPush'),\n isArray = require('./isArray');\n\n/**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction baseGetAllKeys(object, keysFunc, symbolsFunc) {\n var result = keysFunc(object);\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n}\n\nmodule.exports = baseGetAllKeys;\n","var Symbol = require('./_Symbol'),\n getRawTag = require('./_getRawTag'),\n objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]';\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\nmodule.exports = baseIsArguments;\n","var baseIsEqualDeep = require('./_baseIsEqualDeep'),\n isObjectLike = require('./isObjectLike');\n\n/**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Unordered comparison\n * 2 - Partial comparison\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\nfunction baseIsEqual(value, other, bitmask, customizer, stack) {\n if (value === other) {\n return true;\n }\n if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\n return value !== value && other !== other;\n }\n return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n}\n\nmodule.exports = baseIsEqual;\n","var Stack = require('./_Stack'),\n equalArrays = require('./_equalArrays'),\n equalByTag = require('./_equalByTag'),\n equalObjects = require('./_equalObjects'),\n getTag = require('./_getTag'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isTypedArray = require('./isTypedArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n var objIsArr = isArray(object),\n othIsArr = isArray(other),\n objTag = objIsArr ? arrayTag : getTag(object),\n othTag = othIsArr ? arrayTag : getTag(other);\n\n objTag = objTag == argsTag ? objectTag : objTag;\n othTag = othTag == argsTag ? objectTag : othTag;\n\n var objIsObj = objTag == objectTag,\n othIsObj = othTag == objectTag,\n isSameTag = objTag == othTag;\n\n if (isSameTag && isBuffer(object)) {\n if (!isBuffer(other)) {\n return false;\n }\n objIsArr = true;\n objIsObj = false;\n }\n if (isSameTag && !objIsObj) {\n stack || (stack = new Stack);\n return (objIsArr || isTypedArray(object))\n ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n }\n if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n if (objIsWrapped || othIsWrapped) {\n var objUnwrapped = objIsWrapped ? object.value() : object,\n othUnwrapped = othIsWrapped ? other.value() : other;\n\n stack || (stack = new Stack);\n return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n }\n }\n if (!isSameTag) {\n return false;\n }\n stack || (stack = new Stack);\n return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n}\n\nmodule.exports = baseIsEqualDeep;\n","var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]';\n\n/**\n * The base implementation of `_.isMap` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n */\nfunction baseIsMap(value) {\n return isObjectLike(value) && getTag(value) == mapTag;\n}\n\nmodule.exports = baseIsMap;\n","var isFunction = require('./isFunction'),\n isMasked = require('./_isMasked'),\n isObject = require('./isObject'),\n toSource = require('./_toSource');\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\nmodule.exports = baseIsNative;\n","var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar setTag = '[object Set]';\n\n/**\n * The base implementation of `_.isSet` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n */\nfunction baseIsSet(value) {\n return isObjectLike(value) && getTag(value) == setTag;\n}\n\nmodule.exports = baseIsSet;\n","var baseGetTag = require('./_baseGetTag'),\n isLength = require('./isLength'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n\nmodule.exports = baseIsTypedArray;\n","var isPrototype = require('./_isPrototype'),\n nativeKeys = require('./_nativeKeys');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeys;\n","var isObject = require('./isObject'),\n isPrototype = require('./_isPrototype'),\n nativeKeysIn = require('./_nativeKeysIn');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeysIn(object) {\n if (!isObject(object)) {\n return nativeKeysIn(object);\n }\n var isProto = isPrototype(object),\n result = [];\n\n for (var key in object) {\n if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeysIn;\n","/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\nmodule.exports = baseTimes;\n","/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n return function(value) {\n return func(value);\n };\n}\n\nmodule.exports = baseUnary;\n","/**\n * Checks if a `cache` value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction cacheHas(cache, key) {\n return cache.has(key);\n}\n\nmodule.exports = cacheHas;\n","var Uint8Array = require('./_Uint8Array');\n\n/**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\nfunction cloneArrayBuffer(arrayBuffer) {\n var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n return result;\n}\n\nmodule.exports = cloneArrayBuffer;\n","var root = require('./_root');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined,\n allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;\n\n/**\n * Creates a clone of `buffer`.\n *\n * @private\n * @param {Buffer} buffer The buffer to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Buffer} Returns the cloned buffer.\n */\nfunction cloneBuffer(buffer, isDeep) {\n if (isDeep) {\n return buffer.slice();\n }\n var length = buffer.length,\n result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\n\n buffer.copy(result);\n return result;\n}\n\nmodule.exports = cloneBuffer;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer');\n\n/**\n * Creates a clone of `dataView`.\n *\n * @private\n * @param {Object} dataView The data view to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned data view.\n */\nfunction cloneDataView(dataView, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;\n return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);\n}\n\nmodule.exports = cloneDataView;\n","/** Used to match `RegExp` flags from their coerced string values. */\nvar reFlags = /\\w*$/;\n\n/**\n * Creates a clone of `regexp`.\n *\n * @private\n * @param {Object} regexp The regexp to clone.\n * @returns {Object} Returns the cloned regexp.\n */\nfunction cloneRegExp(regexp) {\n var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));\n result.lastIndex = regexp.lastIndex;\n return result;\n}\n\nmodule.exports = cloneRegExp;\n","var Symbol = require('./_Symbol');\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * Creates a clone of the `symbol` object.\n *\n * @private\n * @param {Object} symbol The symbol object to clone.\n * @returns {Object} Returns the cloned symbol object.\n */\nfunction cloneSymbol(symbol) {\n return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};\n}\n\nmodule.exports = cloneSymbol;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer');\n\n/**\n * Creates a clone of `typedArray`.\n *\n * @private\n * @param {Object} typedArray The typed array to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned typed array.\n */\nfunction cloneTypedArray(typedArray, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n}\n\nmodule.exports = cloneTypedArray;\n","/**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\nfunction copyArray(source, array) {\n var index = -1,\n length = source.length;\n\n array || (array = Array(length));\n while (++index < length) {\n array[index] = source[index];\n }\n return array;\n}\n\nmodule.exports = copyArray;\n","var assignValue = require('./_assignValue'),\n baseAssignValue = require('./_baseAssignValue');\n\n/**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\nfunction copyObject(source, props, object, customizer) {\n var isNew = !object;\n object || (object = {});\n\n var index = -1,\n length = props.length;\n\n while (++index < length) {\n var key = props[index];\n\n var newValue = customizer\n ? customizer(object[key], source[key], key, object, source)\n : undefined;\n\n if (newValue === undefined) {\n newValue = source[key];\n }\n if (isNew) {\n baseAssignValue(object, key, newValue);\n } else {\n assignValue(object, key, newValue);\n }\n }\n return object;\n}\n\nmodule.exports = copyObject;\n","var copyObject = require('./_copyObject'),\n getSymbols = require('./_getSymbols');\n\n/**\n * Copies own symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbols(source, object) {\n return copyObject(source, getSymbols(source), object);\n}\n\nmodule.exports = copySymbols;\n","var copyObject = require('./_copyObject'),\n getSymbolsIn = require('./_getSymbolsIn');\n\n/**\n * Copies own and inherited symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbolsIn(source, object) {\n return copyObject(source, getSymbolsIn(source), object);\n}\n\nmodule.exports = copySymbolsIn;\n","var root = require('./_root');\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\nmodule.exports = coreJsData;\n","var getNative = require('./_getNative');\n\nvar defineProperty = (function() {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n}());\n\nmodule.exports = defineProperty;\n","var SetCache = require('./_SetCache'),\n arraySome = require('./_arraySome'),\n cacheHas = require('./_cacheHas');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\nfunction equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n arrLength = array.length,\n othLength = other.length;\n\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n return false;\n }\n // Check that cyclic values are equal.\n var arrStacked = stack.get(array);\n var othStacked = stack.get(other);\n if (arrStacked && othStacked) {\n return arrStacked == other && othStacked == array;\n }\n var index = -1,\n result = true,\n seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n stack.set(array, other);\n stack.set(other, array);\n\n // Ignore non-index properties.\n while (++index < arrLength) {\n var arrValue = array[index],\n othValue = other[index];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, arrValue, index, other, array, stack)\n : customizer(arrValue, othValue, index, array, other, stack);\n }\n if (compared !== undefined) {\n if (compared) {\n continue;\n }\n result = false;\n break;\n }\n // Recursively compare arrays (susceptible to call stack limits).\n if (seen) {\n if (!arraySome(other, function(othValue, othIndex) {\n if (!cacheHas(seen, othIndex) &&\n (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n return seen.push(othIndex);\n }\n })) {\n result = false;\n break;\n }\n } else if (!(\n arrValue === othValue ||\n equalFunc(arrValue, othValue, bitmask, customizer, stack)\n )) {\n result = false;\n break;\n }\n }\n stack['delete'](array);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalArrays;\n","var Symbol = require('./_Symbol'),\n Uint8Array = require('./_Uint8Array'),\n eq = require('./eq'),\n equalArrays = require('./_equalArrays'),\n mapToArray = require('./_mapToArray'),\n setToArray = require('./_setToArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]';\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n switch (tag) {\n case dataViewTag:\n if ((object.byteLength != other.byteLength) ||\n (object.byteOffset != other.byteOffset)) {\n return false;\n }\n object = object.buffer;\n other = other.buffer;\n\n case arrayBufferTag:\n if ((object.byteLength != other.byteLength) ||\n !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n return false;\n }\n return true;\n\n case boolTag:\n case dateTag:\n case numberTag:\n // Coerce booleans to `1` or `0` and dates to milliseconds.\n // Invalid dates are coerced to `NaN`.\n return eq(+object, +other);\n\n case errorTag:\n return object.name == other.name && object.message == other.message;\n\n case regexpTag:\n case stringTag:\n // Coerce regexes to strings and treat strings, primitives and objects,\n // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n // for more details.\n return object == (other + '');\n\n case mapTag:\n var convert = mapToArray;\n\n case setTag:\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n convert || (convert = setToArray);\n\n if (object.size != other.size && !isPartial) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked) {\n return stacked == other;\n }\n bitmask |= COMPARE_UNORDERED_FLAG;\n\n // Recursively compare objects (susceptible to call stack limits).\n stack.set(object, other);\n var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n stack['delete'](object);\n return result;\n\n case symbolTag:\n if (symbolValueOf) {\n return symbolValueOf.call(object) == symbolValueOf.call(other);\n }\n }\n return false;\n}\n\nmodule.exports = equalByTag;\n","var getAllKeys = require('./_getAllKeys');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n objProps = getAllKeys(object),\n objLength = objProps.length,\n othProps = getAllKeys(other),\n othLength = othProps.length;\n\n if (objLength != othLength && !isPartial) {\n return false;\n }\n var index = objLength;\n while (index--) {\n var key = objProps[index];\n if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n return false;\n }\n }\n // Check that cyclic values are equal.\n var objStacked = stack.get(object);\n var othStacked = stack.get(other);\n if (objStacked && othStacked) {\n return objStacked == other && othStacked == object;\n }\n var result = true;\n stack.set(object, other);\n stack.set(other, object);\n\n var skipCtor = isPartial;\n while (++index < objLength) {\n key = objProps[index];\n var objValue = object[key],\n othValue = other[key];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, objValue, key, other, object, stack)\n : customizer(objValue, othValue, key, object, other, stack);\n }\n // Recursively compare objects (susceptible to call stack limits).\n if (!(compared === undefined\n ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n : compared\n )) {\n result = false;\n break;\n }\n skipCtor || (skipCtor = key == 'constructor');\n }\n if (result && !skipCtor) {\n var objCtor = object.constructor,\n othCtor = other.constructor;\n\n // Non `Object` object instances with different constructors are not equal.\n if (objCtor != othCtor &&\n ('constructor' in object && 'constructor' in other) &&\n !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n result = false;\n }\n }\n stack['delete'](object);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalObjects;\n","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n","var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbols = require('./_getSymbols'),\n keys = require('./keys');\n\n/**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeys(object) {\n return baseGetAllKeys(object, keys, getSymbols);\n}\n\nmodule.exports = getAllKeys;\n","var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbolsIn = require('./_getSymbolsIn'),\n keysIn = require('./keysIn');\n\n/**\n * Creates an array of own and inherited enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeysIn(object) {\n return baseGetAllKeys(object, keysIn, getSymbolsIn);\n}\n\nmodule.exports = getAllKeysIn;\n","var isKeyable = require('./_isKeyable');\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\nmodule.exports = getMapData;\n","var baseIsNative = require('./_baseIsNative'),\n getValue = require('./_getValue');\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\nmodule.exports = getNative;\n","var overArg = require('./_overArg');\n\n/** Built-in value references. */\nvar getPrototype = overArg(Object.getPrototypeOf, Object);\n\nmodule.exports = getPrototype;\n","var Symbol = require('./_Symbol');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nmodule.exports = getRawTag;\n","var arrayFilter = require('./_arrayFilter'),\n stubArray = require('./stubArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n if (object == null) {\n return [];\n }\n object = Object(object);\n return arrayFilter(nativeGetSymbols(object), function(symbol) {\n return propertyIsEnumerable.call(object, symbol);\n });\n};\n\nmodule.exports = getSymbols;\n","var arrayPush = require('./_arrayPush'),\n getPrototype = require('./_getPrototype'),\n getSymbols = require('./_getSymbols'),\n stubArray = require('./stubArray');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own and inherited enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {\n var result = [];\n while (object) {\n arrayPush(result, getSymbols(object));\n object = getPrototype(object);\n }\n return result;\n};\n\nmodule.exports = getSymbolsIn;\n","var DataView = require('./_DataView'),\n Map = require('./_Map'),\n Promise = require('./_Promise'),\n Set = require('./_Set'),\n WeakMap = require('./_WeakMap'),\n baseGetTag = require('./_baseGetTag'),\n toSource = require('./_toSource');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n setTag = '[object Set]',\n weakMapTag = '[object WeakMap]';\n\nvar dataViewTag = '[object DataView]';\n\n/** Used to detect maps, sets, and weakmaps. */\nvar dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nvar getTag = baseGetTag;\n\n// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\nif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = baseGetTag(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : '';\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n}\n\nmodule.exports = getTag;\n","/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\nmodule.exports = getValue;\n","var nativeCreate = require('./_nativeCreate');\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n}\n\nmodule.exports = hashClear;\n","/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = hashDelete;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\nmodule.exports = hashGet;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\nmodule.exports = hashHas;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\nmodule.exports = hashSet;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Initializes an array clone.\n *\n * @private\n * @param {Array} array The array to clone.\n * @returns {Array} Returns the initialized clone.\n */\nfunction initCloneArray(array) {\n var length = array.length,\n result = new array.constructor(length);\n\n // Add properties assigned by `RegExp#exec`.\n if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {\n result.index = array.index;\n result.input = array.input;\n }\n return result;\n}\n\nmodule.exports = initCloneArray;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer'),\n cloneDataView = require('./_cloneDataView'),\n cloneRegExp = require('./_cloneRegExp'),\n cloneSymbol = require('./_cloneSymbol'),\n cloneTypedArray = require('./_cloneTypedArray');\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/**\n * Initializes an object clone based on its `toStringTag`.\n *\n * **Note:** This function only supports cloning values with tags of\n * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.\n *\n * @private\n * @param {Object} object The object to clone.\n * @param {string} tag The `toStringTag` of the object to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneByTag(object, tag, isDeep) {\n var Ctor = object.constructor;\n switch (tag) {\n case arrayBufferTag:\n return cloneArrayBuffer(object);\n\n case boolTag:\n case dateTag:\n return new Ctor(+object);\n\n case dataViewTag:\n return cloneDataView(object, isDeep);\n\n case float32Tag: case float64Tag:\n case int8Tag: case int16Tag: case int32Tag:\n case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:\n return cloneTypedArray(object, isDeep);\n\n case mapTag:\n return new Ctor;\n\n case numberTag:\n case stringTag:\n return new Ctor(object);\n\n case regexpTag:\n return cloneRegExp(object);\n\n case setTag:\n return new Ctor;\n\n case symbolTag:\n return cloneSymbol(object);\n }\n}\n\nmodule.exports = initCloneByTag;\n","var baseCreate = require('./_baseCreate'),\n getPrototype = require('./_getPrototype'),\n isPrototype = require('./_isPrototype');\n\n/**\n * Initializes an object clone.\n *\n * @private\n * @param {Object} object The object to clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneObject(object) {\n return (typeof object.constructor == 'function' && !isPrototype(object))\n ? baseCreate(getPrototype(object))\n : {};\n}\n\nmodule.exports = initCloneObject;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n var type = typeof value;\n length = length == null ? MAX_SAFE_INTEGER : length;\n\n return !!length &&\n (type == 'number' ||\n (type != 'symbol' && reIsUint.test(value))) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\nmodule.exports = isIndex;\n","/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\nmodule.exports = isKeyable;\n","var coreJsData = require('./_coreJsData');\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\nmodule.exports = isMasked;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\nmodule.exports = isPrototype;\n","/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n}\n\nmodule.exports = listCacheClear;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype;\n\n/** Built-in value references. */\nvar splice = arrayProto.splice;\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n}\n\nmodule.exports = listCacheDelete;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\nmodule.exports = listCacheGet;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\nmodule.exports = listCacheHas;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\nmodule.exports = listCacheSet;\n","var Hash = require('./_Hash'),\n ListCache = require('./_ListCache'),\n Map = require('./_Map');\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\nmodule.exports = mapCacheClear;\n","var getMapData = require('./_getMapData');\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = mapCacheDelete;\n","var getMapData = require('./_getMapData');\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\nmodule.exports = mapCacheGet;\n","var getMapData = require('./_getMapData');\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\nmodule.exports = mapCacheHas;\n","var getMapData = require('./_getMapData');\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n}\n\nmodule.exports = mapCacheSet;\n","/**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\nfunction mapToArray(map) {\n var index = -1,\n result = Array(map.size);\n\n map.forEach(function(value, key) {\n result[++index] = [key, value];\n });\n return result;\n}\n\nmodule.exports = mapToArray;\n","var getNative = require('./_getNative');\n\n/* Built-in method references that are verified to be native. */\nvar nativeCreate = getNative(Object, 'create');\n\nmodule.exports = nativeCreate;\n","var overArg = require('./_overArg');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeKeys = overArg(Object.keys, Object);\n\nmodule.exports = nativeKeys;\n","/**\n * This function is like\n * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * except that it includes inherited enumerable properties.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction nativeKeysIn(object) {\n var result = [];\n if (object != null) {\n for (var key in Object(object)) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = nativeKeysIn;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n try {\n // Use `util.types` for Node.js 10+.\n var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n if (types) {\n return types;\n }\n\n // Legacy `process.binding('util')` for Node.js < 10.\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n}());\n\nmodule.exports = nodeUtil;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n","/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\nmodule.exports = overArg;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n","/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\nfunction setCacheAdd(value) {\n this.__data__.set(value, HASH_UNDEFINED);\n return this;\n}\n\nmodule.exports = setCacheAdd;\n","/**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\nfunction setCacheHas(value) {\n return this.__data__.has(value);\n}\n\nmodule.exports = setCacheHas;\n","/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\nfunction setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n}\n\nmodule.exports = setToArray;\n","var ListCache = require('./_ListCache');\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}\n\nmodule.exports = stackClear;\n","/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n var data = this.__data__,\n result = data['delete'](key);\n\n this.size = data.size;\n return result;\n}\n\nmodule.exports = stackDelete;\n","/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n return this.__data__.get(key);\n}\n\nmodule.exports = stackGet;\n","/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n return this.__data__.has(key);\n}\n\nmodule.exports = stackHas;\n","var ListCache = require('./_ListCache'),\n Map = require('./_Map'),\n MapCache = require('./_MapCache');\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n var data = this.__data__;\n if (data instanceof ListCache) {\n var pairs = data.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n this.size = ++data.size;\n return this;\n }\n data = this.__data__ = new MapCache(pairs);\n }\n data.set(key, value);\n this.size = data.size;\n return this;\n}\n\nmodule.exports = stackSet;\n","/** Used for built-in method references. */\nvar funcProto = Function.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\nmodule.exports = toSource;\n","var baseClone = require('./_baseClone');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_SYMBOLS_FLAG = 4;\n\n/**\n * This method is like `_.clone` except that it recursively clones `value`.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Lang\n * @param {*} value The value to recursively clone.\n * @returns {*} Returns the deep cloned value.\n * @see _.clone\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var deep = _.cloneDeep(objects);\n * console.log(deep[0] === objects[0]);\n * // => false\n */\nfunction cloneDeep(value) {\n return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);\n}\n\nmodule.exports = cloneDeep;\n","/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\nmodule.exports = eq;\n","var baseIsArguments = require('./_baseIsArguments'),\n isObjectLike = require('./isObjectLike');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n};\n\nmodule.exports = isArguments;\n","/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\nmodule.exports = isArray;\n","var isFunction = require('./isFunction'),\n isLength = require('./isLength');\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\nmodule.exports = isArrayLike;\n","var root = require('./_root'),\n stubFalse = require('./stubFalse');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\nmodule.exports = isBuffer;\n","var baseIsEqual = require('./_baseIsEqual');\n\n/**\n * Performs a deep comparison between two values to determine if they are\n * equivalent.\n *\n * **Note:** This method supports comparing arrays, array buffers, booleans,\n * date objects, error objects, maps, numbers, `Object` objects, regexes,\n * sets, strings, symbols, and typed arrays. `Object` objects are compared\n * by their own, not inherited, enumerable properties. Functions and DOM\n * nodes are compared by strict equality, i.e. `===`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.isEqual(object, other);\n * // => true\n *\n * object === other;\n * // => false\n */\nfunction isEqual(value, other) {\n return baseIsEqual(value, other);\n}\n\nmodule.exports = isEqual;\n","var baseGetTag = require('./_baseGetTag'),\n isObject = require('./isObject');\n\n/** `Object#toString` result references. */\nvar asyncTag = '[object AsyncFunction]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n proxyTag = '[object Proxy]';\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\nmodule.exports = isFunction;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\nmodule.exports = isLength;\n","var baseIsMap = require('./_baseIsMap'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsMap = nodeUtil && nodeUtil.isMap;\n\n/**\n * Checks if `value` is classified as a `Map` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n * @example\n *\n * _.isMap(new Map);\n * // => true\n *\n * _.isMap(new WeakMap);\n * // => false\n */\nvar isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;\n\nmodule.exports = isMap;\n","/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n","var baseIsSet = require('./_baseIsSet'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsSet = nodeUtil && nodeUtil.isSet;\n\n/**\n * Checks if `value` is classified as a `Set` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n * @example\n *\n * _.isSet(new Set);\n * // => true\n *\n * _.isSet(new WeakSet);\n * // => false\n */\nvar isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;\n\nmodule.exports = isSet;\n","var baseIsTypedArray = require('./_baseIsTypedArray'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\nmodule.exports = isTypedArray;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeys = require('./_baseKeys'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\nmodule.exports = keys;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeysIn = require('./_baseKeysIn'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\nfunction keysIn(object) {\n return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n}\n\nmodule.exports = keysIn;\n","/**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\nfunction stubArray() {\n return [];\n}\n\nmodule.exports = stubArray;\n","/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n return false;\n}\n\nmodule.exports = stubFalse;\n","import { connect } from \"@openfin/core-web\";\nimport { getSettings } from \"./settings\";\n\n/**\n * Initializes the OpenFin Web Broker connection.\n */\nexport async function init(): Promise {\n\t// Set window.fin to the `fin` object.\n\tif (window.fin === undefined) {\n\t\tconst settings = await getSettings();\n\t\t// Specify an interopConfig with a specific provider ID and a context group to initialize the `fin.me.interop` client on connection.\n\t\twindow.fin = await connect({\n\t\t\toptions: {\n\t\t\t\tbrokerUrl: settings.platform.brokerUrl,\n\t\t\t\tinteropConfig: {\n\t\t\t\t\tproviderId: settings.platform.providerId,\n\t\t\t\t\tcurrentContextGroup: settings.platform.defaultContextGroup\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tconsole.log(\"Finished initializing the fin API.\");\n\t\t// Create and dispatch the finReady event\n\t\tconst event = new CustomEvent(\"finReady\");\n\t\twindow.dispatchEvent(event);\n\t}\n\n\tif (window.fdc3 === undefined && window?.fin?.me.interop?.getFDC3Sync !== undefined) {\n\t\twindow.fdc3 = fin.me.interop.getFDC3Sync(\"2.0\");\n\t\tconsole.log(\"Finished initializing the fdc3 API.\");\n\t\t// Create and dispatch the FDC3Ready event\n\t\tconst event = new CustomEvent(\"fdc3Ready\");\n\t\twindow.dispatchEvent(event);\n\t}\n}\n","import type { Settings } from \"../shapes/setting-shapes\";\n\n/**\n * Fetches the settings for the application.\n * @returns The settings for the application.\n */\nexport async function getSettings(): Promise {\n\treturn {\n\t\tplatform: {\n\t\t\tsharedWorkerUrl: \"http://localhost:6060/js/shared-worker.bundle.js\",\n\t\t\tbrokerUrl: \"http://localhost:6060/platform/iframe-broker.html\",\n\t\t\tproviderId: \"web-interop-basic\",\n\t\t\tdefaultContextGroup: \"green\"\n\t\t}\n\t};\n}\n","export { default as v1 } from './v1.js';\nexport { default as v3 } from './v3.js';\nexport { default as v4 } from './v4.js';\nexport { default as v5 } from './v5.js';\nexport { default as NIL } from './nil.js';\nexport { default as version } from './version.js';\nexport { default as validate } from './validate.js';\nexport { default as stringify } from './stringify.js';\nexport { default as parse } from './parse.js';","/*\n * Browser-compatible JavaScript MD5\n *\n * Modification of JavaScript MD5\n * https://github.com/blueimp/JavaScript-MD5\n *\n * Copyright 2011, Sebastian Tschan\n * https://blueimp.net\n *\n * Licensed under the MIT license:\n * https://opensource.org/licenses/MIT\n *\n * Based on\n * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message\n * Digest Algorithm, as defined in RFC 1321.\n * Version 2.2 Copyright (C) Paul Johnston 1999 - 2009\n * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet\n * Distributed under the BSD License\n * See http://pajhome.org.uk/crypt/md5 for more info.\n */\nfunction md5(bytes) {\n if (typeof bytes === 'string') {\n var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape\n\n bytes = new Uint8Array(msg.length);\n\n for (var i = 0; i < msg.length; ++i) {\n bytes[i] = msg.charCodeAt(i);\n }\n }\n\n return md5ToHexEncodedArray(wordsToMd5(bytesToWords(bytes), bytes.length * 8));\n}\n/*\n * Convert an array of little-endian words to an array of bytes\n */\n\n\nfunction md5ToHexEncodedArray(input) {\n var output = [];\n var length32 = input.length * 32;\n var hexTab = '0123456789abcdef';\n\n for (var i = 0; i < length32; i += 8) {\n var x = input[i >> 5] >>> i % 32 & 0xff;\n var hex = parseInt(hexTab.charAt(x >>> 4 & 0x0f) + hexTab.charAt(x & 0x0f), 16);\n output.push(hex);\n }\n\n return output;\n}\n/**\n * Calculate output length with padding and bit length\n */\n\n\nfunction getOutputLength(inputLength8) {\n return (inputLength8 + 64 >>> 9 << 4) + 14 + 1;\n}\n/*\n * Calculate the MD5 of an array of little-endian words, and a bit length.\n */\n\n\nfunction wordsToMd5(x, len) {\n /* append padding */\n x[len >> 5] |= 0x80 << len % 32;\n x[getOutputLength(len) - 1] = len;\n var a = 1732584193;\n var b = -271733879;\n var c = -1732584194;\n var d = 271733878;\n\n for (var i = 0; i < x.length; i += 16) {\n var olda = a;\n var oldb = b;\n var oldc = c;\n var oldd = d;\n a = md5ff(a, b, c, d, x[i], 7, -680876936);\n d = md5ff(d, a, b, c, x[i + 1], 12, -389564586);\n c = md5ff(c, d, a, b, x[i + 2], 17, 606105819);\n b = md5ff(b, c, d, a, x[i + 3], 22, -1044525330);\n a = md5ff(a, b, c, d, x[i + 4], 7, -176418897);\n d = md5ff(d, a, b, c, x[i + 5], 12, 1200080426);\n c = md5ff(c, d, a, b, x[i + 6], 17, -1473231341);\n b = md5ff(b, c, d, a, x[i + 7], 22, -45705983);\n a = md5ff(a, b, c, d, x[i + 8], 7, 1770035416);\n d = md5ff(d, a, b, c, x[i + 9], 12, -1958414417);\n c = md5ff(c, d, a, b, x[i + 10], 17, -42063);\n b = md5ff(b, c, d, a, x[i + 11], 22, -1990404162);\n a = md5ff(a, b, c, d, x[i + 12], 7, 1804603682);\n d = md5ff(d, a, b, c, x[i + 13], 12, -40341101);\n c = md5ff(c, d, a, b, x[i + 14], 17, -1502002290);\n b = md5ff(b, c, d, a, x[i + 15], 22, 1236535329);\n a = md5gg(a, b, c, d, x[i + 1], 5, -165796510);\n d = md5gg(d, a, b, c, x[i + 6], 9, -1069501632);\n c = md5gg(c, d, a, b, x[i + 11], 14, 643717713);\n b = md5gg(b, c, d, a, x[i], 20, -373897302);\n a = md5gg(a, b, c, d, x[i + 5], 5, -701558691);\n d = md5gg(d, a, b, c, x[i + 10], 9, 38016083);\n c = md5gg(c, d, a, b, x[i + 15], 14, -660478335);\n b = md5gg(b, c, d, a, x[i + 4], 20, -405537848);\n a = md5gg(a, b, c, d, x[i + 9], 5, 568446438);\n d = md5gg(d, a, b, c, x[i + 14], 9, -1019803690);\n c = md5gg(c, d, a, b, x[i + 3], 14, -187363961);\n b = md5gg(b, c, d, a, x[i + 8], 20, 1163531501);\n a = md5gg(a, b, c, d, x[i + 13], 5, -1444681467);\n d = md5gg(d, a, b, c, x[i + 2], 9, -51403784);\n c = md5gg(c, d, a, b, x[i + 7], 14, 1735328473);\n b = md5gg(b, c, d, a, x[i + 12], 20, -1926607734);\n a = md5hh(a, b, c, d, x[i + 5], 4, -378558);\n d = md5hh(d, a, b, c, x[i + 8], 11, -2022574463);\n c = md5hh(c, d, a, b, x[i + 11], 16, 1839030562);\n b = md5hh(b, c, d, a, x[i + 14], 23, -35309556);\n a = md5hh(a, b, c, d, x[i + 1], 4, -1530992060);\n d = md5hh(d, a, b, c, x[i + 4], 11, 1272893353);\n c = md5hh(c, d, a, b, x[i + 7], 16, -155497632);\n b = md5hh(b, c, d, a, x[i + 10], 23, -1094730640);\n a = md5hh(a, b, c, d, x[i + 13], 4, 681279174);\n d = md5hh(d, a, b, c, x[i], 11, -358537222);\n c = md5hh(c, d, a, b, x[i + 3], 16, -722521979);\n b = md5hh(b, c, d, a, x[i + 6], 23, 76029189);\n a = md5hh(a, b, c, d, x[i + 9], 4, -640364487);\n d = md5hh(d, a, b, c, x[i + 12], 11, -421815835);\n c = md5hh(c, d, a, b, x[i + 15], 16, 530742520);\n b = md5hh(b, c, d, a, x[i + 2], 23, -995338651);\n a = md5ii(a, b, c, d, x[i], 6, -198630844);\n d = md5ii(d, a, b, c, x[i + 7], 10, 1126891415);\n c = md5ii(c, d, a, b, x[i + 14], 15, -1416354905);\n b = md5ii(b, c, d, a, x[i + 5], 21, -57434055);\n a = md5ii(a, b, c, d, x[i + 12], 6, 1700485571);\n d = md5ii(d, a, b, c, x[i + 3], 10, -1894986606);\n c = md5ii(c, d, a, b, x[i + 10], 15, -1051523);\n b = md5ii(b, c, d, a, x[i + 1], 21, -2054922799);\n a = md5ii(a, b, c, d, x[i + 8], 6, 1873313359);\n d = md5ii(d, a, b, c, x[i + 15], 10, -30611744);\n c = md5ii(c, d, a, b, x[i + 6], 15, -1560198380);\n b = md5ii(b, c, d, a, x[i + 13], 21, 1309151649);\n a = md5ii(a, b, c, d, x[i + 4], 6, -145523070);\n d = md5ii(d, a, b, c, x[i + 11], 10, -1120210379);\n c = md5ii(c, d, a, b, x[i + 2], 15, 718787259);\n b = md5ii(b, c, d, a, x[i + 9], 21, -343485551);\n a = safeAdd(a, olda);\n b = safeAdd(b, oldb);\n c = safeAdd(c, oldc);\n d = safeAdd(d, oldd);\n }\n\n return [a, b, c, d];\n}\n/*\n * Convert an array bytes to an array of little-endian words\n * Characters >255 have their high-byte silently ignored.\n */\n\n\nfunction bytesToWords(input) {\n if (input.length === 0) {\n return [];\n }\n\n var length8 = input.length * 8;\n var output = new Uint32Array(getOutputLength(length8));\n\n for (var i = 0; i < length8; i += 8) {\n output[i >> 5] |= (input[i / 8] & 0xff) << i % 32;\n }\n\n return output;\n}\n/*\n * Add integers, wrapping at 2^32. This uses 16-bit operations internally\n * to work around bugs in some JS interpreters.\n */\n\n\nfunction safeAdd(x, y) {\n var lsw = (x & 0xffff) + (y & 0xffff);\n var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n return msw << 16 | lsw & 0xffff;\n}\n/*\n * Bitwise rotate a 32-bit number to the left.\n */\n\n\nfunction bitRotateLeft(num, cnt) {\n return num << cnt | num >>> 32 - cnt;\n}\n/*\n * These functions implement the four basic operations the algorithm uses.\n */\n\n\nfunction md5cmn(q, a, b, x, s, t) {\n return safeAdd(bitRotateLeft(safeAdd(safeAdd(a, q), safeAdd(x, t)), s), b);\n}\n\nfunction md5ff(a, b, c, d, x, s, t) {\n return md5cmn(b & c | ~b & d, a, b, x, s, t);\n}\n\nfunction md5gg(a, b, c, d, x, s, t) {\n return md5cmn(b & d | c & ~d, a, b, x, s, t);\n}\n\nfunction md5hh(a, b, c, d, x, s, t) {\n return md5cmn(b ^ c ^ d, a, b, x, s, t);\n}\n\nfunction md5ii(a, b, c, d, x, s, t) {\n return md5cmn(c ^ (b | ~d), a, b, x, s, t);\n}\n\nexport default md5;","export default '00000000-0000-0000-0000-000000000000';","import validate from './validate.js';\n\nfunction parse(uuid) {\n if (!validate(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n var v;\n var arr = new Uint8Array(16); // Parse ########-....-....-....-............\n\n arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24;\n arr[1] = v >>> 16 & 0xff;\n arr[2] = v >>> 8 & 0xff;\n arr[3] = v & 0xff; // Parse ........-####-....-....-............\n\n arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8;\n arr[5] = v & 0xff; // Parse ........-....-####-....-............\n\n arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8;\n arr[7] = v & 0xff; // Parse ........-....-....-####-............\n\n arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8;\n arr[9] = v & 0xff; // Parse ........-....-....-....-############\n // (Use \"/\" to avoid 32-bit truncation when bit-shifting high-order bytes)\n\n arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff;\n arr[11] = v / 0x100000000 & 0xff;\n arr[12] = v >>> 24 & 0xff;\n arr[13] = v >>> 16 & 0xff;\n arr[14] = v >>> 8 & 0xff;\n arr[15] = v & 0xff;\n return arr;\n}\n\nexport default parse;","export default /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;","// Unique ID creation requires a high quality random # generator. In the browser we therefore\n// require the crypto API and do not support built-in fallback to lower quality random number\n// generators (like Math.random()).\nvar getRandomValues;\nvar rnds8 = new Uint8Array(16);\nexport default function rng() {\n // lazy load so that environments that need to polyfill have a chance to do so\n if (!getRandomValues) {\n // getRandomValues needs to be invoked in a context where \"this\" is a Crypto implementation. Also,\n // find the complete implementation of crypto (msCrypto) on IE11.\n getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto !== 'undefined' && typeof msCrypto.getRandomValues === 'function' && msCrypto.getRandomValues.bind(msCrypto);\n\n if (!getRandomValues) {\n throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');\n }\n }\n\n return getRandomValues(rnds8);\n}","// Adapted from Chris Veness' SHA1 code at\n// http://www.movable-type.co.uk/scripts/sha1.html\nfunction f(s, x, y, z) {\n switch (s) {\n case 0:\n return x & y ^ ~x & z;\n\n case 1:\n return x ^ y ^ z;\n\n case 2:\n return x & y ^ x & z ^ y & z;\n\n case 3:\n return x ^ y ^ z;\n }\n}\n\nfunction ROTL(x, n) {\n return x << n | x >>> 32 - n;\n}\n\nfunction sha1(bytes) {\n var K = [0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xca62c1d6];\n var H = [0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0];\n\n if (typeof bytes === 'string') {\n var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape\n\n bytes = [];\n\n for (var i = 0; i < msg.length; ++i) {\n bytes.push(msg.charCodeAt(i));\n }\n } else if (!Array.isArray(bytes)) {\n // Convert Array-like to Array\n bytes = Array.prototype.slice.call(bytes);\n }\n\n bytes.push(0x80);\n var l = bytes.length / 4 + 2;\n var N = Math.ceil(l / 16);\n var M = new Array(N);\n\n for (var _i = 0; _i < N; ++_i) {\n var arr = new Uint32Array(16);\n\n for (var j = 0; j < 16; ++j) {\n arr[j] = bytes[_i * 64 + j * 4] << 24 | bytes[_i * 64 + j * 4 + 1] << 16 | bytes[_i * 64 + j * 4 + 2] << 8 | bytes[_i * 64 + j * 4 + 3];\n }\n\n M[_i] = arr;\n }\n\n M[N - 1][14] = (bytes.length - 1) * 8 / Math.pow(2, 32);\n M[N - 1][14] = Math.floor(M[N - 1][14]);\n M[N - 1][15] = (bytes.length - 1) * 8 & 0xffffffff;\n\n for (var _i2 = 0; _i2 < N; ++_i2) {\n var W = new Uint32Array(80);\n\n for (var t = 0; t < 16; ++t) {\n W[t] = M[_i2][t];\n }\n\n for (var _t = 16; _t < 80; ++_t) {\n W[_t] = ROTL(W[_t - 3] ^ W[_t - 8] ^ W[_t - 14] ^ W[_t - 16], 1);\n }\n\n var a = H[0];\n var b = H[1];\n var c = H[2];\n var d = H[3];\n var e = H[4];\n\n for (var _t2 = 0; _t2 < 80; ++_t2) {\n var s = Math.floor(_t2 / 20);\n var T = ROTL(a, 5) + f(s, b, c, d) + e + K[s] + W[_t2] >>> 0;\n e = d;\n d = c;\n c = ROTL(b, 30) >>> 0;\n b = a;\n a = T;\n }\n\n H[0] = H[0] + a >>> 0;\n H[1] = H[1] + b >>> 0;\n H[2] = H[2] + c >>> 0;\n H[3] = H[3] + d >>> 0;\n H[4] = H[4] + e >>> 0;\n }\n\n return [H[0] >> 24 & 0xff, H[0] >> 16 & 0xff, H[0] >> 8 & 0xff, H[0] & 0xff, H[1] >> 24 & 0xff, H[1] >> 16 & 0xff, H[1] >> 8 & 0xff, H[1] & 0xff, H[2] >> 24 & 0xff, H[2] >> 16 & 0xff, H[2] >> 8 & 0xff, H[2] & 0xff, H[3] >> 24 & 0xff, H[3] >> 16 & 0xff, H[3] >> 8 & 0xff, H[3] & 0xff, H[4] >> 24 & 0xff, H[4] >> 16 & 0xff, H[4] >> 8 & 0xff, H[4] & 0xff];\n}\n\nexport default sha1;","import validate from './validate.js';\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\n\nvar byteToHex = [];\n\nfor (var i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).substr(1));\n}\n\nfunction stringify(arr) {\n var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n var uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!validate(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n\n return uuid;\n}\n\nexport default stringify;","import rng from './rng.js';\nimport stringify from './stringify.js'; // **`v1()` - Generate time-based UUID**\n//\n// Inspired by https://github.com/LiosK/UUID.js\n// and http://docs.python.org/library/uuid.html\n\nvar _nodeId;\n\nvar _clockseq; // Previous uuid creation time\n\n\nvar _lastMSecs = 0;\nvar _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details\n\nfunction v1(options, buf, offset) {\n var i = buf && offset || 0;\n var b = buf || new Array(16);\n options = options || {};\n var node = options.node || _nodeId;\n var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not\n // specified. We do this lazily to minimize issues related to insufficient\n // system entropy. See #189\n\n if (node == null || clockseq == null) {\n var seedBytes = options.random || (options.rng || rng)();\n\n if (node == null) {\n // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)\n node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]];\n }\n\n if (clockseq == null) {\n // Per 4.2.2, randomize (14 bit) clockseq\n clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;\n }\n } // UUID timestamps are 100 nano-second units since the Gregorian epoch,\n // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so\n // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'\n // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.\n\n\n var msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock\n // cycle to simulate higher resolution clock\n\n var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs)\n\n var dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression\n\n if (dt < 0 && options.clockseq === undefined) {\n clockseq = clockseq + 1 & 0x3fff;\n } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new\n // time interval\n\n\n if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {\n nsecs = 0;\n } // Per 4.2.1.2 Throw error if too many uuids are requested\n\n\n if (nsecs >= 10000) {\n throw new Error(\"uuid.v1(): Can't create more than 10M uuids/sec\");\n }\n\n _lastMSecs = msecs;\n _lastNSecs = nsecs;\n _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch\n\n msecs += 12219292800000; // `time_low`\n\n var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;\n b[i++] = tl >>> 24 & 0xff;\n b[i++] = tl >>> 16 & 0xff;\n b[i++] = tl >>> 8 & 0xff;\n b[i++] = tl & 0xff; // `time_mid`\n\n var tmh = msecs / 0x100000000 * 10000 & 0xfffffff;\n b[i++] = tmh >>> 8 & 0xff;\n b[i++] = tmh & 0xff; // `time_high_and_version`\n\n b[i++] = tmh >>> 24 & 0xf | 0x10; // include version\n\n b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)\n\n b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low`\n\n b[i++] = clockseq & 0xff; // `node`\n\n for (var n = 0; n < 6; ++n) {\n b[i + n] = node[n];\n }\n\n return buf || stringify(b);\n}\n\nexport default v1;","import v35 from './v35.js';\nimport md5 from './md5.js';\nvar v3 = v35('v3', 0x30, md5);\nexport default v3;","import stringify from './stringify.js';\nimport parse from './parse.js';\n\nfunction stringToBytes(str) {\n str = unescape(encodeURIComponent(str)); // UTF8 escape\n\n var bytes = [];\n\n for (var i = 0; i < str.length; ++i) {\n bytes.push(str.charCodeAt(i));\n }\n\n return bytes;\n}\n\nexport var DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8';\nexport var URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8';\nexport default function (name, version, hashfunc) {\n function generateUUID(value, namespace, buf, offset) {\n if (typeof value === 'string') {\n value = stringToBytes(value);\n }\n\n if (typeof namespace === 'string') {\n namespace = parse(namespace);\n }\n\n if (namespace.length !== 16) {\n throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)');\n } // Compute hash of namespace and value, Per 4.3\n // Future: Use spread syntax when supported on all platforms, e.g. `bytes =\n // hashfunc([...namespace, ... value])`\n\n\n var bytes = new Uint8Array(16 + value.length);\n bytes.set(namespace);\n bytes.set(value, namespace.length);\n bytes = hashfunc(bytes);\n bytes[6] = bytes[6] & 0x0f | version;\n bytes[8] = bytes[8] & 0x3f | 0x80;\n\n if (buf) {\n offset = offset || 0;\n\n for (var i = 0; i < 16; ++i) {\n buf[offset + i] = bytes[i];\n }\n\n return buf;\n }\n\n return stringify(bytes);\n } // Function#name is not settable on some platforms (#270)\n\n\n try {\n generateUUID.name = name; // eslint-disable-next-line no-empty\n } catch (err) {} // For CommonJS default export support\n\n\n generateUUID.DNS = DNS;\n generateUUID.URL = URL;\n return generateUUID;\n}","import rng from './rng.js';\nimport stringify from './stringify.js';\n\nfunction v4(options, buf, offset) {\n options = options || {};\n var rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n offset = offset || 0;\n\n for (var i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n\n return buf;\n }\n\n return stringify(rnds);\n}\n\nexport default v4;","import v35 from './v35.js';\nimport sha1 from './sha1.js';\nvar v5 = v35('v5', 0x50, sha1);\nexport default v5;","import REGEX from './regex.js';\n\nfunction validate(uuid) {\n return typeof uuid === 'string' && REGEX.test(uuid);\n}\n\nexport default validate;","import validate from './validate.js';\n\nfunction version(uuid) {\n if (!validate(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n return parseInt(uuid.substr(14, 1), 16);\n}\n\nexport default version;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = (module) => {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","import type { Context } from \"@finos/fdc3\";\nimport { init } from \"../platform/api\";\n\nwindow.addEventListener(\"DOMContentLoaded\", async () => {\n\tawait init();\n\tawait initializeDOM();\n});\n\n/**\n * Broadcasts a context using FDC3.\n */\nasync function setContext(): Promise {\n\tconst contextType = \"fdc3.instrument\";\n\tconst contextName = \"Tesla Inc.\";\n\tconst idData = {\n\t\tticker: \"TSLA\"\n\t};\n\tconst context = {\n\t\ttype: contextType,\n\t\tname: contextName,\n\t\tid: idData\n\t};\n\tif (window.fin) {\n\t\tawait window.fin.me.interop.setContext(context);\n\t\tconsole.log(`Set context: ${contextType} - ${contextName}`);\n\t} else {\n\t\twindow.addEventListener(\"finReady\", async () => {\n\t\t\tif (window.fin) {\n\t\t\t\tawait window.fin.me.interop.setContext(context);\n\t\t\t\tconsole.log(`Set context: ${contextType} - ${contextName}`);\n\t\t\t}\n\t\t});\n\t}\n}\n\n/**\n * Adds an interop context listener to the window.\n */\nasync function addContextListener(): Promise {\n\tif (window.fin) {\n\t\tawait window.fin.me.interop.addContextHandler((context: Context) => {\n\t\t\tupdateDOMElements(context);\n\t\t});\n\t} else {\n\t\twindow.addEventListener(\"finReady\", async () => {\n\t\t\tif (window.fin) {\n\t\t\t\tawait window.fin.me.interop.addContextHandler((context: Context) => {\n\t\t\t\t\tupdateDOMElements(context);\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t}\n}\n\n/**\n * Updates the DOM elements with the provided context.\n * @param context The context to update the DOM elements with.\n */\nfunction updateDOMElements(context: Context): void {\n\tconst contextTypeSpan = document.querySelector(\"#contextType\");\n\tconst contextNameSpan = document.querySelector(\"#contextName\");\n\tconst contextBodyPre = document.querySelector(\"#contextBody\");\n\n\tif (contextTypeSpan !== null && contextNameSpan !== null && contextBodyPre !== null) {\n\t\tcontextTypeSpan.textContent = context.type;\n\t\tcontextNameSpan.textContent = context.name ?? \"No name provided.\";\n\t\tcontextBodyPre.textContent = JSON.stringify(context, null, 2);\n\t}\n}\n\n/**\n * Initialize the DOM elements.\n */\nasync function initializeDOM(): Promise {\n\tconst setContextButton = document.querySelector(\"#setContext\");\n\n\tif (setContextButton !== null) {\n\t\tsetContextButton.addEventListener(\"click\", async () => {\n\t\t\tawait setContext();\n\t\t});\n\t}\n\n\tawait addContextListener();\n}\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/web/v19.2.0/web-interop-basic/js/provider.bundle.js b/web/v19.2.0/web-interop-basic/js/provider.bundle.js index 71d9f96..b715217 100644 --- a/web/v19.2.0/web-interop-basic/js/provider.bundle.js +++ b/web/v19.2.0/web-interop-basic/js/provider.bundle.js @@ -1,38 +1,38 @@ /******/ (() => { // webpackBootstrap /******/ var __webpack_modules__ = ({ -/***/ "./node_modules/@openfin/core-web/out/api-client.js": -/*!**********************************************************!*\ - !*** ./node_modules/@openfin/core-web/out/api-client.js ***! - \**********************************************************/ +/***/ "../../node_modules/@openfin/core-web/out/api-client.js": +/*!**************************************************************!*\ + !*** ../../node_modules/@openfin/core-web/out/api-client.js ***! + \**************************************************************/ /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; -var e=__webpack_require__(/*! ./main-8cad4070.js */ "./node_modules/@openfin/core-web/out/main-8cad4070.js");__webpack_require__(/*! buffer/ */ "../../node_modules/buffer/index.js"),__webpack_require__(/*! uuid */ "../../node_modules/uuid/dist/esm-browser/index.js"),__webpack_require__(/*! events */ "../../node_modules/events/events.js"),__webpack_require__(/*! lodash/cloneDeep */ "../../node_modules/lodash/cloneDeep.js"),__webpack_require__(/*! lodash/isEqual */ "../../node_modules/lodash/isEqual.js"),exports.connect=e.connect; +var e=__webpack_require__(/*! ./main-8cad4070.js */ "../../node_modules/@openfin/core-web/out/main-8cad4070.js");__webpack_require__(/*! buffer/ */ "../../node_modules/buffer/index.js"),__webpack_require__(/*! uuid */ "../../node_modules/uuid/dist/esm-browser/index.js"),__webpack_require__(/*! events */ "../../node_modules/events/events.js"),__webpack_require__(/*! lodash/cloneDeep */ "../../node_modules/lodash/cloneDeep.js"),__webpack_require__(/*! lodash/isEqual */ "../../node_modules/lodash/isEqual.js"),exports.connect=e.connect; /***/ }), -/***/ "./node_modules/@openfin/core-web/out/main-8cad4070.js": -/*!*************************************************************!*\ - !*** ./node_modules/@openfin/core-web/out/main-8cad4070.js ***! - \*************************************************************/ +/***/ "../../node_modules/@openfin/core-web/out/main-8cad4070.js": +/*!*****************************************************************!*\ + !*** ../../node_modules/@openfin/core-web/out/main-8cad4070.js ***! + \*****************************************************************/ /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; -var e=__webpack_require__(/*! buffer/ */ "../../node_modules/buffer/index.js"),t=__webpack_require__(/*! events */ "../../node_modules/events/events.js"),n=__webpack_require__(/*! lodash/cloneDeep */ "../../node_modules/lodash/cloneDeep.js"),i=__webpack_require__(/*! lodash/isEqual */ "../../node_modules/lodash/isEqual.js"),r=__webpack_require__(/*! uuid */ "../../node_modules/uuid/dist/esm-browser/index.js");const o=(e,t)=>`${t}<${btoa(JSON.stringify(e))}>`;var s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof __webpack_require__.g?__webpack_require__.g:"undefined"!=typeof self?self:{},a={},c={},d={},h={};async function l(e){const t=[];for(const n of e){const e=await n();t.push(e)}return t}Object.defineProperty(h,"__esModule",{value:!0}),h.promiseMapSerial=h.serial=h.promiseMap=h.promisify=void 0,h.promisify=function(e){return(...t)=>new Promise(((n,i)=>{e(...t,((e,t)=>e?i(e):n(t)))}))},h.promiseMap=async function(e,t){return Promise.all(e.map(t))},h.serial=l,h.promiseMapSerial=async function(e,t){return l(e.map(((e,n,i)=>()=>t(e,n,i))))};var u,p=s&&s.__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},w=s&&s.__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)};Object.defineProperty(d,"__esModule",{value:!0}),d.Reply=d.EmitterBase=d.Base=void 0;const y=h;class f{constructor(e){this.isNodeEnvironment=()=>"node"===this.wire.environment.type,this.isOpenFinEnvironment=()=>"openfin"===this.wire.environment.type,this.isBrowserEnvironment=()=>"other"===this.wire.environment.type,this.wire=e}get fin(){return this.wire.getFin()}get me(){return this.wire.me}}d.Base=f;d.EmitterBase=class extends f{constructor(e,t,...n){super(e),this.topic=t,u.set(this,void 0),this.eventNames=()=>this.hasEmitter()?this.getOrCreateEmitter().eventNames():[],this.emit=(e,t,...n)=>!!this.hasEmitter()&&this.getOrCreateEmitter().emit(e,t,...n),this.hasEmitter=()=>this.wire.eventAggregator.has(w(this,u,"f")),this.getOrCreateEmitter=()=>this.wire.eventAggregator.getOrCreate(w(this,u,"f")),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[],this.listenerCount=e=>this.hasEmitter()?this.getOrCreateEmitter().listenerCount(e):0,this.registerEventListener=async(e,t={},n,i)=>{const r={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e},o=this.getOrCreateEmitter();n(o);try{await this.wire.sendAction("subscribe-to-desktop-event",r)}catch(e){throw i(o),this.deleteEmitterIfNothingRegistered(o),e}},this.deregisterEventListener=async(e,t={})=>{if(this.hasEmitter()){const n={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e};await this.wire.sendAction("unsubscribe-to-desktop-event",n).catch((()=>null));return this.getOrCreateEmitter()}return Promise.resolve()},p(this,u,[t,...n],"f"),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[]}async on(e,t,n){return await this.registerEventListener(e,n,(n=>{n.on(e,t)}),(n=>{n.removeListener(e,t)})),this}async addListener(e,t,n){return this.on(e,t,n)}async once(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.once(e,i),n.once(e,t)}),(n=>{n.removeListener(e,i),n.removeListener(e,t)})),this}async prependListener(e,t,n){return await this.registerEventListener(e,n,(n=>{n.prependListener(e,t)}),(n=>{n.removeListener(e,t)})),this}async prependOnceListener(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.prependOnceListener(e,t),n.once(e,i)}),(n=>{n.removeListener(e,t),n.removeListener(e,i)})),this}async removeListener(e,t,n){const i=await this.deregisterEventListener(e,n);return i&&(i.removeListener(e,t),this.deleteEmitterIfNothingRegistered(i)),this}async deregisterAllListeners(e){const t={...this.identity,type:e,topic:this.topic};if(this.hasEmitter()){const e=this.getOrCreateEmitter(),n=e.listenerCount(t.type),i=[];for(let e=0;enull)));return await Promise.all(i),e}}async removeAllListeners(e){const t=async e=>{const t=await this.deregisterAllListeners(e);t&&(t.removeAllListeners(e),this.deleteEmitterIfNothingRegistered(t))};if(e)await t(e);else if(this.hasEmitter()){const e=this.getOrCreateEmitter().eventNames();await(0,y.promiseMap)(e,t)}return this}deleteEmitterIfNothingRegistered(e){0===e.eventNames().length&&this.wire.eventAggregator.delete(w(this,u,"f"))}},u=new WeakMap;d.Reply=class{};var g={};Object.defineProperty(g,"__esModule",{value:!0});var m=g.RuntimeError=g.NotSupportedError=g.NotImplementedError=g.NoAckError=g.DuplicateCorrelationError=g.UnexpectedActionError=g.DisconnectedError=void 0;class v extends Error{constructor(e){super(`Expected websocket state OPEN but found ${e}`),this.readyState=e}}g.DisconnectedError=v;class C extends Error{}g.UnexpectedActionError=C;class b extends Error{}g.DuplicateCorrelationError=b;class I extends Error{}g.NoAckError=I;class E extends Error{}g.NotImplementedError=E;class x extends Error{}g.NotSupportedError=x;class A extends Error{constructor(e){const{message:t,name:n,stack:i,...r}=e;super(t),this.name=n||"Error",this.stack=i??this.toString(),Object.keys(r).forEach((e=>{this[e]=r[e]}))}}class P extends Error{static getCallSite(e=0){const t=Error.stackTraceLimit,n=e+1;Error.stackTraceLimit=t+n;const i=Error.prepareStackTrace;Error.prepareStackTrace=(e,t)=>t;const r=(new Error).stack?.slice(n)??[];return Error.prepareStackTrace=i,Error.stackTraceLimit=t,r}static prepareStackTrace(e,t){if("function"==typeof Error.prepareStackTrace)return Error.prepareStackTrace(e,t);let n="";n+=e.name||"Error",n+=`: ${e.message||""}`;for(const e of t)n+=`\n at ${e.toString()}`;return n}constructor(e,t){const{reason:n,error:i}=e;super(n),this.name="RuntimeError",i?.stack&&(this.cause=new A(i)),t&&(this.stack=P.prepareStackTrace(this,t))}}m=g.RuntimeError=P;var M={},_={},O={};Object.defineProperty(O,"__esModule",{value:!0}),O.validateIdentity=void 0,O.validateIdentity=function(e){let t;return"object"==typeof e&&"string"==typeof e.uuid||(t="Not a valid identity object"),t};var S={},R={},F={},j={},k={},L={},T={};Object.defineProperty(T,"__esModule",{value:!0}),T.handleDeprecatedWarnings=void 0;var $;T.handleDeprecatedWarnings=e=>{(e.contentNavigation?.whitelist||e.contentNavigation?.blacklist||e.contentRedirect?.whitelist||e.contentRedirect?.blacklist)&&console.warn("The properties 'whitelist' and 'blacklist' have been marked as deprecated and will be removed in a future version. Please use 'allowlist' and 'denylist'.")};var B={},G={};Object.defineProperty(G,"__esModule",{value:!0}),G.AsyncRetryableLazy=W=G.Lazy=void 0;var W=G.Lazy=class{constructor(e){this.producerFn=e}getValue(){return this.value||(this.value=this.producerFn()),this.value}};G.AsyncRetryableLazy=class{constructor(e){this.producerFn=e}async getValue(){return this.promise||(this.promise=this.producerFn().catch((e=>{throw delete this.promise,e}))),this.promise}};var H={};Object.defineProperty(H,"__esModule",{value:!0}),H.WebContents=void 0;const N=d;class D extends N.EmitterBase{constructor(e,t,n){super(e,n,t.uuid,t.name),this.identity=t,this.entityType=n}capturePage(e){return this.wire.sendAction("capture-page",{options:e,...this.identity}).then((({payload:e})=>e.data))}executeJavaScript(e){return this.wire.sendAction("execute-javascript-in-window",{...this.identity,code:e}).then((({payload:e})=>e.data))}getZoomLevel(){return this.wire.sendAction("get-zoom-level",this.identity).then((({payload:e})=>e.data))}setZoomLevel(e){return this.wire.sendAction("set-zoom-level",{...this.identity,level:e}).then((()=>{}))}navigate(e){return this.wire.sendAction("navigate-window",{...this.identity,url:e}).then((()=>{}))}navigateBack(){return this.wire.sendAction("navigate-window-back",{...this.identity}).then((()=>{}))}async navigateForward(){await this.wire.sendAction("navigate-window-forward",{...this.identity})}stopNavigation(){return this.wire.sendAction("stop-window-navigation",{...this.identity}).then((()=>{}))}reload(e=!1){return this.wire.sendAction("reload-window",{ignoreCache:e,...this.identity}).then((()=>{}))}print(e={}){return this.wire.sendAction("print",{...this.identity,options:e}).then((()=>{}))}findInPage(e,t){return this.wire.sendAction("find-in-page",{...this.identity,searchTerm:e,options:t}).then((({payload:e})=>e.data))}stopFindInPage(e){return this.wire.sendAction("stop-find-in-page",{...this.identity,action:e}).then((()=>{}))}getPrinters(){return this.wire.sendAction("get-printers",{...this.identity}).then((({payload:e})=>e.data))}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){await this.wire.sendAction("focus-window",{emitSynthFocused:e,...this.identity})}async showDeveloperTools(){await this.wire.sendAction("show-developer-tools",this.identity)}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction("get-process-info",this.identity);return e}async getSharedWorkers(){return this.wire.sendAction("get-shared-workers",this.identity).then((({payload:e})=>e.data))}async inspectSharedWorker(){await this.wire.sendAction("inspect-shared-worker",{...this.identity})}async inspectSharedWorkerById(e){await this.wire.sendAction("inspect-shared-worker-by-id",{...this.identity,workerId:e})}async inspectServiceWorker(){await this.wire.sendAction("inspect-service-worker",{...this.identity})}async showPopupWindow(e){if(this.wire.sendAction(`${this.entityType}-show-popup-window`,this.identity).catch((()=>{})),e?.onPopupReady){const t=async({popupName:t})=>{try{const n=this.fin.Window.wrapSync({uuid:this.fin.me.uuid,name:t});await e.onPopupReady(n)}catch(e){throw new Error(`Something went wrong during onPopupReady execution: ${e}`)}};await this.once("popup-ready",t)}const{payload:t}=await this.wire.sendAction("try-create-popup-window",{options:{...e,hasResultCallback:!!e?.onPopupResult,hasReadyCallback:!!e?.onPopupReady},...this.identity}),{data:{willOpen:n,options:i}}=t;n&&await this.fin.Window.create(i.initialOptions);if(e?.onPopupResult){const t=async t=>{await e.onPopupResult((e=>{const{name:t,uuid:n,result:i,data:r}=e,o={identity:{name:t,uuid:n},result:i};return r&&(o.data=r),o})(t))},n=async()=>{await this.removeListener("popup-result",t)};await this.on("popup-result",t),await this.once("popup-teardown",n)}const{payload:r}=await this.wire.sendAction("show-popup-window",{options:i,...this.identity});return r.data}}var U,V,z,K,q;function J(){return V||(V=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(function(){if($)return L;$=1,Object.defineProperty(L,"__esModule",{value:!0}),L.ViewModule=void 0;const e=d,t=O,n=J(),i=T;class r extends e.Base{async create(e){const{uuid:t}=this.wire.me;if(!e.name||"string"!=typeof e.name)throw new Error("Please provide a name property as a string in order to create a View.");return(0,i.handleDeprecatedWarnings)(e),this.wire.environment.childViews?await this.wire.environment.createChildContent({entityType:"view",options:{...e,uuid:t}}):await this.wire.sendAction("create-view",{...e,uuid:t}),this.wrapSync({uuid:t,name:e.name})}async wrap(e){this.wire.sendAction("view-wrap").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}wrapSync(e){this.wire.sendAction("view-wrap-sync").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}getCurrent(){if(this.wire.sendAction("view-get-current").catch((e=>{})),!this.wire.me.isView)throw new Error("You are not in a View context");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction("view-get-current-sync").catch((e=>{})),!this.wire.me.isView)throw new Error("You are not in a View context");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return L.ViewModule=r,L}(),e),n(function(){if(U)return B;var e;U=1,Object.defineProperty(B,"__esModule",{value:!0}),B.View=void 0;const t=g,n=G,i=H,r=ie();class o extends i.WebContents{constructor(i,o){super(i,o,"view"),this.identity=o,e.set(this,new n.Lazy((()=>this.fin.Platform.wrapSync(this.identity).getClient()))),this.attach=async e=>{await this.wire.sendAction("attach-view",{target:e,...this.identity})},this.destroy=async()=>{await this.wire.sendAction("destroy-view",{...this.identity})},this.show=async()=>{await this.wire.sendAction("show-view",{...this.identity})},this.showAt=async(e,t={})=>{await this.wire.sendAction("show-view-at",{bounds:e,...this.identity,options:t})},this.bringToFront=async()=>{await this.wire.sendAction("bring-view-to-front",{...this.identity})},this.hide=async()=>{await this.wire.sendAction("hide-view",{...this.identity})},this.setBounds=async e=>{await this.wire.sendAction("set-view-bounds",{bounds:e,...this.identity})},this.getBounds=async()=>(await this.wire.sendAction("get-view-bounds",{...this.identity})).payload.data,this.getInfo=async()=>(await this.wire.sendAction("get-view-info",{...this.identity})).payload.data,this.getParentLayout=async()=>(this.wire.sendAction("view-get-parent-layout",{...this.identity}).catch((()=>{})),this.fin.Platform.Layout.getLayoutByViewIdentity(this.identity)),this.getOptions=async()=>this.wire.sendAction("get-view-options",{...this.identity}).then((({payload:e})=>e.data)),this.updateOptions=async e=>this.wire.sendAction("update-view-options",{options:e,...this.identity}).then((()=>{})),this.getCurrentWindow=async()=>{const{payload:{data:e}}=await this.wire.sendAction("get-view-window",{...this.identity});return new r._Window(this.wire,e)},this.getCurrentStack=async()=>{this.wire.sendAction("view-get-current-stack").catch((()=>{}));try{return(await this.getParentLayout()).getStackByViewIdentity(this.identity)}catch(e){throw new t.RuntimeError({reason:"This view does not belong to a stack.",error:e})}},this.triggerBeforeUnload=async()=>(await this.wire.sendAction("trigger-before-unload",{...this.identity})).payload.data,this.bindToElement=async e=>{if(!e)throw new Error("Element not found.");return this.wire.environment.observeBounds(e,(async e=>this.setBounds(e)))}}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){const t=await this.getCurrentWindow();await t.focusedWebViewWasChanged(),await super.focus({emitSynthFocused:e})}}return B.View=o,e=new WeakMap,B}(),e)}(k)),k}function Y(){if(z)return j;z=1,Object.defineProperty(j,"__esModule",{value:!0}),j.Application=void 0;const e=d,t=ie(),n=J();class i extends e.EmitterBase{constructor(e,n){super(e,"application",n.uuid),this.identity=n,this.window=new t._Window(this.wire,{uuid:this.identity.uuid,name:this.identity.uuid})}windowListFromIdentityList(e){const n=[];return e.forEach((e=>{n.push(new t._Window(this.wire,{uuid:e.uuid,name:e.name}))})),n}isRunning(){return this.wire.sendAction("is-application-running",this.identity).then((({payload:e})=>e.data))}async quit(e=!1){try{await this._close(e),await this.wire.sendAction("destroy-application",{force:e,...this.identity})}catch(e){if(!["Remote connection has closed","Could not locate the requested application"].some((t=>e.message.includes(t))))throw e}}async _close(e=!1){try{await this.wire.sendAction("close-application",{force:e,...this.identity})}catch(e){if(!e.message.includes("Remote connection has closed"))throw e}}close(e=!1){return console.warn("Deprecation Warning: Application.close is deprecated Please use Application.quit"),this.wire.sendAction("application-close",this.identity).catch((e=>{})),this._close(e)}getChildWindows(){return this.wire.sendAction("get-child-windows",this.identity).then((({payload:e})=>{const t=[];return e.data.forEach((e=>{t.push({uuid:this.identity.uuid,name:e})})),this.windowListFromIdentityList(t)}))}getManifest(){return this.wire.sendAction("get-application-manifest",this.identity).then((({payload:e})=>e.data))}getParentUuid(){return this.wire.sendAction("get-parent-application",this.identity).then((({payload:e})=>e.data))}getShortcuts(){return this.wire.sendAction("get-shortcuts",this.identity).then((({payload:e})=>e.data))}async getViews(){const{payload:e}=await this.wire.sendAction("application-get-views",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}getZoomLevel(){return this.wire.sendAction("get-application-zoom-level",this.identity).then((({payload:e})=>e.data))}getWindow(){return this.wire.sendAction("application-get-window",this.identity).catch((e=>{})),Promise.resolve(this.window)}registerUser(e,t){return this.wire.sendAction("register-user",{userName:e,appName:t,...this.identity}).then((()=>{}))}removeTrayIcon(){return this.wire.sendAction("remove-tray-icon",this.identity).then((()=>{}))}restart(){return this.wire.sendAction("restart-application",this.identity).then((()=>{}))}run(){return console.warn("Deprecation Warning: Application.run is deprecated Please use fin.Application.start"),this.wire.sendAction("application-run",this.identity).catch((e=>{})),this._run()}_run(e={}){return this.wire.sendAction("run-application",{manifestUrl:this._manifestUrl,opts:e,...this.identity}).then((()=>{}))}scheduleRestart(){return this.wire.sendAction("relaunch-on-close",this.identity).then((()=>{}))}async sendApplicationLog(){const{payload:e}=await this.wire.sendAction("send-application-log",this.identity);return e.data}async setJumpList(e){await this.wire.sendAction("set-jump-list",{config:e,...this.identity})}setTrayIcon(e){return this.wire.sendAction("set-tray-icon",{enabledIcon:e,...this.identity}).then((()=>{}))}setShortcuts(e){return this.wire.sendAction("set-shortcuts",{data:e,...this.identity}).then((()=>{}))}async setShortcutQueryParams(e){await this.wire.sendAction("set-shortcut-query-args",{data:e,...this.identity})}setZoomLevel(e){return this.wire.sendAction("set-application-zoom-level",{level:e,...this.identity}).then((()=>{}))}async setAppLogUsername(e){await this.wire.sendAction("set-app-log-username",{data:e,...this.identity})}getTrayIconInfo(){return this.wire.sendAction("get-tray-icon-info",this.identity).then((({payload:e})=>e.data))}hasTrayIcon(){return this.wire.sendAction("has-tray-icon",this.identity).then((({payload:e})=>e.data))}terminate(){return this.wire.sendAction("terminate-application",this.identity).then((()=>{}))}wait(){return this.wire.sendAction("wait-for-hung-application",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction("get-info",this.identity).then((({payload:e})=>e.data))}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction("application-get-process-info",this.identity);return e}async setFileDownloadLocation(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t};await this.wire.sendAction("set-file-download-location",{...n,downloadLocation:e})}async getFileDownloadLocation(){const{payload:{data:e}}=await this.wire.sendAction("get-file-download-location",this.identity);return e}async showTrayIconPopupMenu(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t},{payload:i}=await this.wire.sendAction("show-tray-icon-popup-menu",{...n,options:e});return i.data}async closeTrayIconPopupMenu(){const{name:e}=this.wire.me,t={uuid:this.identity.uuid,name:e};await this.wire.sendAction("close-tray-icon-popup-menu",{...t})}}return j.Application=i,j}function Z(){return q||(q=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(function(){if(K)return F;K=1,Object.defineProperty(F,"__esModule",{value:!0}),F.ApplicationModule=void 0;const e=d,t=O,n=Y();class i extends e.Base{async wrap(e){this.wire.sendAction("wrap-application").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}wrapSync(e){this.wire.sendAction("wrap-application-sync").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}async _create(e){return void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&void 0===e.isPlatformController&&(e.autoShow=!0),await this.wire.sendAction("create-application",e),this.wrap({uuid:e.uuid})}create(e){return console.warn("Deprecation Warning: fin.Application.create is deprecated. Please use fin.Application.start"),this.wire.sendAction("application-create").catch((e=>{})),this._create(e)}async start(e){this.wire.sendAction("start-application").catch((e=>{}));const t=await this._create(e);return await this.wire.sendAction("run-application",{uuid:e.uuid}),t}async startManyManifests(e,t){return this.wire.sendAction("run-applications",{applications:e,opts:t}).then((()=>{}))}getCurrent(){return this.wire.sendAction("get-current-application").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction("get-current-application-sync").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}async startFromManifest(e,t){this.wire.sendAction("application-start-from-manifest").catch((e=>{}));const n=await this._createFromManifest(e);return await n._run(t),n}createFromManifest(e){return console.warn("Deprecation Warning: fin.Application.createFromManifest is deprecated. Please use fin.Application.startFromManifest"),this.wire.sendAction("application-create-from-manifest").catch((e=>{})),this._createFromManifest(e)}_createFromManifest(e){return this.wire.sendAction("get-application-manifest",{manifestUrl:e}).then((({payload:e})=>{const t=e.data.platform?e.data.platform.uuid:e.data.startup_app.uuid;return this.wrap({uuid:t})})).then((t=>(t._manifestUrl=e,t)))}}return F.ApplicationModule=i,F}(),e),n(Y(),e)}(R)),R}H.WebContents=D;var Q={};Object.defineProperty(Q,"__esModule",{value:!0}),Q.promisifySubscription=void 0;var X,ee,te;function ne(){if(X)return S;X=1,Object.defineProperty(S,"__esModule",{value:!0}),S._Window=void 0;const e=Z(),t=H,n=J(),i=T,r=Q;class o extends t.WebContents{constructor(e,t){super(e,t,"window")}async createWindow(e){this.wire.sendAction("window-create-window",this.identity).catch((e=>{}));const t=await(0,r.promisifySubscription)(this,"fire-constructor-callback");void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&(e.autoShow=!0),(0,i.handleDeprecatedWarnings)(e);const n=this.wire.environment.createChildContent({entityType:"window",options:e}),[o]=await Promise.all([t.getValue(),n]);let s;const{success:a}=o,c=o.data,{message:d}=c;s=a?{httpResponseCode:c.httpResponseCode,apiInjected:c.apiInjected}:{message:c.message,networkErrorCode:c.networkErrorCode,stack:c.stack};const h={message:d,cbPayload:s,success:a};try{this.getWebWindow().fin.__internal_.openerSuccessCBCalled()}catch(e){}return h.success?this:Promise.reject(h)}getAllFrames(){return this.wire.sendAction("get-all-frames",this.identity).then((({payload:e})=>e.data))}getBounds(){return this.wire.sendAction("get-window-bounds",this.identity).then((({payload:e})=>e.data))}center(){return this.wire.sendAction("center-window",this.identity).then((()=>{}))}blur(){return this.wire.sendAction("blur-window",this.identity).then((()=>{}))}bringToFront(){return this.wire.sendAction("bring-window-to-front",this.identity).then((()=>{}))}animate(e,t){return this.wire.sendAction("animate-window",{transitions:e,options:t,...this.identity}).then((()=>{}))}hide(){return this.wire.sendAction("hide-window",this.identity).then((()=>{}))}close(e=!1){return this.wire.sendAction("close-window",{force:e,...this.identity}).then((()=>{Object.setPrototypeOf(this,null)}))}focusedWebViewWasChanged(){return this.wire.sendAction("focused-webview-changed",this.identity).then((()=>{}))}getNativeId(){return this.wire.sendAction("get-window-native-id",this.identity).then((({payload:e})=>e.data))}async getCurrentViews(){const{payload:e}=await this.wire.sendAction("window-get-views",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}disableFrame(){return console.warn("Function is deprecated; use disableUserMovement instead."),this.wire.sendAction("disable-window-frame",this.identity).then((()=>{}))}disableUserMovement(){return this.wire.sendAction("disable-window-frame",this.identity).then((()=>{}))}enableFrame(){return console.warn("Function is deprecated; use enableUserMovement instead."),this.wire.sendAction("enable-window-frame",this.identity).then((()=>{}))}enableUserMovement(){return this.wire.sendAction("enable-window-frame",this.identity).then((()=>{}))}flash(){return this.wire.sendAction("flash-window",this.identity).then((()=>{}))}stopFlashing(){return this.wire.sendAction("stop-flash-window",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction("get-window-info",this.identity).then((({payload:e})=>e.data))}async getLayout(e){this.wire.sendAction("window-get-layout",this.identity).catch((e=>{}));const t=await this.getOptions();if(!t.layout&&!t.layoutSnapshot)throw new Error("Window does not have a Layout");return this.fin.Platform.Layout.wrap(e??this.identity)}getOptions(){return this.wire.sendAction("get-window-options",this.identity).then((({payload:e})=>e.data))}getParentApplication(){return this.wire.sendAction("window-get-parent-application",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity))}getParentWindow(){return this.wire.sendAction("window-get-parent-window",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity)).then((e=>e.getWindow()))}async getSnapshot(e){const t={area:e,...this.identity};console.warn("Window.getSnapshot has been deprecated, please use Window.capturePage");return(await this.wire.sendAction("get-window-snapshot",t)).payload.data}getState(){return this.wire.sendAction("get-window-state",this.identity).then((({payload:e})=>e.data))}getWebWindow(){return this.wire.sendAction("window-get-web-window",this.identity).catch((e=>{})),this.wire.environment.getWebWindow(this.identity)}isMainWindow(){return this.wire.sendAction("window-is-main-window",this.identity).catch((e=>{})),this.me.uuid===this.me.name}isShowing(){return this.wire.sendAction("is-window-showing",this.identity).then((({payload:e})=>e.data))}maximize(){return this.wire.sendAction("maximize-window",this.identity).then((()=>{}))}minimize(){return this.wire.sendAction("minimize-window",this.identity).then((()=>{}))}moveBy(e,t,n){return this.wire.sendAction("move-window-by",{deltaLeft:e,deltaTop:t,positioningOptions:n,...this.identity}).then((()=>{}))}moveTo(e,t,n){return this.wire.sendAction("move-window",{left:e,top:t,positioningOptions:n,...this.identity}).then((()=>{}))}resizeBy(e,t,n,i){return this.wire.sendAction("resize-window-by",{deltaWidth:Math.floor(e),deltaHeight:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}resizeTo(e,t,n,i){return this.wire.sendAction("resize-window",{width:Math.floor(e),height:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}restore(){return this.wire.sendAction("restore-window",this.identity).then((()=>{}))}setAsForeground(){return this.wire.sendAction("set-foreground-window",this.identity).then((()=>{}))}setBounds(e,t){return this.wire.sendAction("set-window-bounds",{...e,...this.identity,positioningOptions:t}).then((()=>{}))}show(e=!1){return this.wire.sendAction("show-window",{force:e,...this.identity}).then((()=>{}))}showAt(e,t,n=!1){return this.wire.sendAction("show-at-window",{force:n,left:Math.floor(e),top:Math.floor(t),...this.identity}).then((()=>{}))}updateOptions(e){return this.wire.sendAction("update-window-options",{options:e,...this.identity}).then((()=>{}))}authenticate(e,t){return this.wire.sendAction("window-authenticate",{userName:e,password:t,...this.identity}).then((()=>{}))}async showPopupMenu(e){const{payload:t}=await this.wire.sendAction("show-popup-menu",{options:e,...this.identity});return t.data}async closePopupMenu(){return this.wire.sendAction("close-popup-menu",{...this.identity}).then((()=>{}))}async dispatchPopupResult(e){this.wire.sendAction("window-dispatch-popup-result",this.identity).catch((e=>{})),await this.wire.sendAction("dispatch-popup-result",{data:e,...this.identity})}async print(e={content:"self"}){switch(e.content){case void 0:case"self":return super.print(e);case"screenshot":return this.wire.sendAction("print-screenshot",this.identity).then((()=>{}));case"views":return this.wire.sendAction("print-views",{...this.identity,options:e}).then((()=>{}));default:return}}}return S._Window=o,S}function ie(){return te||(te=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(function(){if(ee)return _;ee=1,Object.defineProperty(_,"__esModule",{value:!0}),_._WindowModule=void 0;const e=d,t=O,n=ne();class i extends e.Base{async wrap(e){this.wire.sendAction("window-wrap").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}wrapSync(e){this.wire.sendAction("window-wrap-sync").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}create(e){return this.wire.sendAction("create-window").catch((e=>{})),new n._Window(this.wire,{uuid:this.me.uuid,name:e.name}).createWindow(e)}getCurrent(){if(this.wire.sendAction("get-current-window").catch((e=>{})),!this.wire.me.isWindow)throw new Error("You are not in a Window context");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction("get-current-window-sync").catch((e=>{})),!this.wire.me.isWindow)throw new Error("You are not in a Window context");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return _._WindowModule=i,_}(),e),n(ne(),e)}(M)),M}Q.promisifySubscription=async(e,t,n=(()=>!0),i)=>{let r,o,s;const a=new Promise(((e,t)=>{r=e,o=t})),c=e=>{n(e)&&(clearTimeout(s),r(e))};return await e.on(t,c),i&&(s=setTimeout((()=>o(new Error("event timed out"))),i)),a.finally((()=>{e.removeListener(t,c).catch((()=>null))})),{getValue:()=>a}},Object.defineProperty(c,"__esModule",{value:!0}),c.System=void 0;const re=d,oe=g,se=ie(),ae=t;class ce extends re.EmitterBase{constructor(e){super(e,"system")}sendExternalProcessRequest(e,t){return new Promise(((n,i)=>{const r="external-process-exited";let o,s,a,c;"function"==typeof t.listener&&(a=e=>{const n=e||{};s={topic:"exited",uuid:n.processUuid||"",exitCode:n.exitCode||0},o===e.processUuid&&(t.listener(s),c.removeListener(r,a))},this.wire.me.name||(this.wire.me.name=this.wire.me.uuid),c=new se._Window(this.wire,this.wire.me),c.on(r,a)),this.wire.sendAction(e,t).then((({payload:e})=>{o=e.data.uuid,n(e.data),s&&o===s.uuid&&(t.listener(s),c.removeListener(r,a))})).catch((e=>{c&&c.removeListener(r,a),i(e)}))}))}getVersion(){return this.wire.sendAction("get-version").then((({payload:e})=>e.data))}clearCache(e){return this.wire.sendAction("clear-cache",e).then((()=>{}))}deleteCacheOnExit(){return this.wire.sendAction("delete-cache-request").then((()=>{}))}exit(){return this.wire.sendAction("exit-desktop").then((()=>{}))}async fetchManifest(e){const{payload:{data:t}}=await this.wire.sendAction("fetch-manifest",{manifestUrl:e});return t}flushCookieStore(){return this.wire.sendAction("flush-cookie-store").then((()=>{}))}getAllWindows(){return this.wire.sendAction("get-all-windows").then((({payload:e})=>e.data))}getAllApplications(){return this.wire.sendAction("get-all-applications").then((({payload:e})=>e.data))}getCommandLineArguments(){return this.wire.sendAction("get-command-line-arguments").then((({payload:e})=>e.data))}async getCrashReporterState(){const{payload:{data:{diagnosticMode:e,isRunning:t}}}=await this.wire.sendAction("get-crash-reporter-state");return console.warn("diagnosticMode property is deprecated. It will be removed in a future version"),{diagnosticMode:e,diagnosticsMode:e,isRunning:t}}async startCrashReporter(e){const t=e,n={...t,diagnosticMode:t.diagnosticsMode||t.diagnosticMode},{payload:{data:{diagnosticMode:i,isRunning:r}}}=await this.wire.sendAction("start-crash-reporter",n);return{diagnosticMode:i,diagnosticsMode:i,isRunning:r}}getUniqueUserId(){return this.wire.sendAction("get-unique-user-id").then((({payload:e})=>e.data))}getEntityInfo(e,t){return this.wire.sendAction("get-entity-info",{uuid:e,name:t}).then((({payload:e})=>e.data))}getEnvironmentVariable(e){return this.wire.sendAction("get-environment-variable",{environmentVariables:e}).then((({payload:e})=>e.data))}getFocusedWindow(){return this.wire.sendAction("get-focused-window").then((({payload:e})=>e.data))}async isAppCertified(e){const{payload:{data:{certifiedInfo:t}}}=await this.wire.sendAction("is-app-certified",{manifestUrl:e});return t}getInstalledRuntimes(){return this.wire.sendAction("get-installed-runtimes").then((({payload:e})=>e.data.runtimes))}async getInstalledApps(){const{payload:{data:{installedApps:e}}}=await this.wire.sendAction("get-installed-apps");return e}getLog(e){return this.wire.sendAction("view-log",e).then((({payload:e})=>e.data))}getMachineId(){return this.wire.sendAction("get-machine-id").then((({payload:e})=>e.data))}getMinLogLevel(){return this.wire.sendAction("get-min-log-level").then((({payload:e})=>e.data))}getLogList(){return this.wire.sendAction("list-logs").then((({payload:e})=>e.data))}getMonitorInfo(){return this.wire.sendAction("get-monitor-info").then((({payload:e})=>e.data))}getMousePosition(){return this.wire.sendAction("get-mouse-position").then((({payload:e})=>e.data))}getProcessList(){return console.warn("System.getProcessList has been deprecated. Please consider using our new process APIs: Window.getProcessInfo, View.getProcessInfo, Application.getProcessInfo, System.getAllProcessInfo"),this.wire.sendAction("process-snapshot").then((({payload:e})=>e.data))}async getAllProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction("get-all-process-info",this.identity);return e}getProxySettings(){return this.wire.sendAction("get-proxy-settings").then((({payload:e})=>e.data))}getRuntimeInfo(){return this.wire.sendAction("get-runtime-info").then((({payload:e})=>e.data))}getRvmInfo(){return this.wire.sendAction("get-rvm-info").then((({payload:e})=>e.data))}getHostSpecs(){return this.wire.sendAction("get-host-specs").then((({payload:e})=>e.data))}getOSInfo(){return this.wire.sendAction("get-os-info").then((({payload:e})=>e.data))}launchExternalProcess(e){return this.sendExternalProcessRequest("launch-external-process",e)}monitorExternalProcess(e){return this.sendExternalProcessRequest("monitor-external-process",e)}log(e,t){return this.wire.sendAction("write-to-log",{level:e,message:t}).then((()=>{}))}openUrlWithBrowser(e){return this.wire.sendAction("open-url-with-browser",{url:e}).then((()=>{}))}async registerCustomProtocol(e){if("object"!=typeof e)throw new Error("Must provide an object with a `protocolName` property having a string value.");await this.wire.sendAction("register-custom-protocol",e)}async unregisterCustomProtocol(e){await this.wire.sendAction("unregister-custom-protocol",{protocolName:e})}async getCustomProtocolState(e){return this.wire.sendAction("get-custom-protocol-state",{protocolName:e}).then((({payload:e})=>e.data))}releaseExternalProcess(e){return this.wire.sendAction("release-external-process",{uuid:e}).then((()=>{}))}showDeveloperTools(e){return this.wire.sendAction("show-developer-tools",e).then((()=>{}))}terminateExternalProcess(e){return this.wire.sendAction("terminate-external-process",e).then((()=>{}))}updateProxySettings(e){return this.wire.sendAction("update-proxy",e).then((()=>{}))}async downloadAsset(e,t){const n=()=>{};let i=n,r=n;const o=new Promise(((e,t)=>{i=e,r=t}));if("openfin"!==this.wire.environment.type)throw new oe.NotSupportedError("downloadAsset only supported in an OpenFin Render process");const s=oe.RuntimeError.getCallSite(),a=this.wire.environment.getNextMessageId().toString(),c=`asset-download-progress-${a}`,d=`asset-download-error-${a}`,h=`asset-download-complete-${a}`,l=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},u=()=>{this.removeListener(c,l)};await Promise.all([this.on(c,l),this.once(d,(e=>{u();const{reason:t,err:n}=e;r(new oe.RuntimeError({reason:t,error:n},s))})),this.once(h,(()=>{u(),i()}))]);const p=Object.assign(e,{downloadId:a});return await this.wire.sendAction("download-asset",p).catch((e=>{throw u(),e})),o}downloadRuntime(e,t){const n=oe.RuntimeError.getCallSite();return new Promise(((i,r)=>{if("openfin"!==this.wire.environment.type)return void r(new oe.NotSupportedError("downloadRuntime only supported in an OpenFin Render process"));const o=this.wire.environment.getNextMessageId().toString(),s=`runtime-download-progress-${o}`,a=`runtime-download-error-${o}`,c=`runtime-download-complete-${o}`,d=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},h=()=>{this.removeListener(s,d)};this.on(s,d),this.once(a,(e=>{h();const{reason:t,err:i}=e;r(new oe.RuntimeError({reason:t,error:i},n))})),this.once(c,(()=>{h(),i()}));const l=Object.assign(e,{downloadId:o});this.wire.sendAction("download-runtime",l).catch((e=>{h(),r(e)}))}))}downloadPreloadScripts(e){return this.wire.sendAction("download-preload-scripts",{scripts:e}).then((({payload:e})=>e.data))}getAllExternalApplications(){return this.wire.sendAction("get-all-external-applications").then((({payload:e})=>e.data))}getAppAssetInfo(e){return this.wire.sendAction("get-app-asset-info",e).then((({payload:e})=>e.data))}getCookies(e){const t=this.wire.environment.getUrl(),n=Object.assign(e,{url:t});return this.wire.sendAction("get-cookies",n).then((({payload:e})=>e.data))}setMinLogLevel(e){return this.wire.sendAction("set-min-log-level",{level:e}).then((()=>{}))}resolveUuid(e){return this.wire.sendAction("resolve-uuid",{entityKey:e}).then((({payload:e})=>e.data))}executeOnRemote(e,t){return t.requestingIdentity=e,this.wire.ferryAction(t)}readRegistryValue(e,t,n){return this.wire.sendAction("read-registry-value",{rootKey:e,subkey:t,value:n}).then((({payload:e})=>e.data))}registerExternalConnection(e){return this.wire.sendAction("register-external-connection",{uuid:e}).then((({payload:e})=>e.data))}async getServiceConfiguration(e){if("string"!=typeof e.name)throw new Error("Must provide an object with a `name` property having a string value");const{name:t}=e;return this.wire.sendAction("get-service-configuration",{name:t}).then((({payload:e})=>e.data))}async getSystemAppConfig(e){if("string"!=typeof e)throw new Error("Must provide a string value for name of system app");return this.wire.sendAction("get-system-app-configuration",{name:e}).then((({payload:e})=>e.data))}async registerShutdownHandler(e){this.wire.sendAction("system-register-shutdown-handler").catch((e=>{}));const{uuid:t,name:n}=this.wire.me;this.on("system-shutdown",(i=>{e({proceed:()=>{this.wire.environment.raiseEvent("application/system-shutdown-handled",{uuid:t,name:n,topic:"application"})}})}))}runRvmHealthCheck(){return this.wire.sendAction("run-rvm-health-check").then((({payload:e})=>e.data))}async launchManifest(e,t={}){const{subscribe:n,...i}=t,r=i;if(n){const e=new ae.EventEmitter;n(e);const t="app-version-progress",i="runtime-status",o="app-version-complete",s="app-version-error",a=this.wire.environment.getNextMessageId().toString();r.appVersionId=a;const c=[o,t,i,s],d=e=>{const{appVersionId:t,topic:n,type:i,...r}=e;return{...r,type:c.find((e=>i.includes(e)))}},h=t=>{const n=d(t);e.emit(n.type,n)},l=()=>{this.removeListener(`${t}.${a}`,h),this.removeListener(`${i}.${a}`,h),this.removeListener(`${o}.${a}`,h),this.removeListener(`${s}.${a}`,h),this.removeListener(`${o}.${a}`,l),this.removeListener(`${s}.${a}`,l)};await Promise.all([this.on(`${t}.${a}`,h),this.on(`${i}.${a}`,h),this.once(`${o}.${a}`,h),this.once(`${s}.${a}`,h),this.once(`${o}.${a}`,l),this.once(`${s}.${a}`,l)])}return(await this.wire.sendAction("launch-manifest",{manifestUrl:e,opts:r})).payload.data.manifest}async queryPermissionForCurrentContext(e){const t={uuid:this.wire.me.uuid,name:this.wire.me.name};return(await this.wire.sendAction("query-permission-for-current-context",{apiName:e,identity:t})).payload.data}async enableNativeWindowIntegrationProvider(e){const{payload:t}=await this.wire.sendAction("enable-native-window-integration-provider",{permissions:e});return t.data}async registerUsage({data:e,type:t}){await this.wire.sendAction("register-usage",{data:e,type:t})}async getPrinters(){const{payload:e}=await this.wire.sendAction("system-get-printers");return e.data}async updateProcessLoggingOptions(e){await this.wire.sendAction("system-update-process-logging-options",{options:e})}async getDomainSettings(){const{payload:{data:e}}=await this.wire.sendAction("get-domain-settings",this.identity);return e}async setDomainSettings(e){await this.wire.sendAction("set-domain-settings",{domainSettings:e,...this.identity})}async refreshExtensions(){const{payload:e}=await this.wire.sendAction("refresh-extensions");return e.data}async getInstalledExtensions(){const{payload:e}=await this.wire.sendAction("get-installed-extensions");return e.data}}c.System=ce;var de={},he={};Object.defineProperty(he,"__esModule",{value:!0}),he.RefCounter=void 0;he.RefCounter=class{constructor(){this.topicRefMap=new Map}incRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t+1;n=i,this.topicRefMap.set(e,i)}else this.topicRefMap.set(e,1),n=1;return n}decRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t-1;this.topicRefMap.set(e,i),n=i}else n=-1;return n}actOnFirst(e,t,n){return 1===this.incRefCount(e)?t():n()}actOnLast(e,t,n){return 0===this.decRefCount(e)?t():n()}};var le={},ue={},pe={};Object.defineProperty(pe,"__esModule",{value:!0}),pe.ChannelBase=pe.ProtectedItems=void 0;const we=e=>async(t,n,i)=>{const r=await e(t,n,i);return void 0===r?n:r};pe.ProtectedItems=class{constructor(e,t){this.providerIdentity=e,this.close=t}};class ye{static defaultAction(e){throw new Error(`No action registered at target for ${e}`)}constructor(){this.subscriptions=new Map}async processAction(e,t,n){try{const i=this.subscriptions.has(e)?this.subscriptions.get(e):(t,n)=>(this.defaultAction??ye.defaultAction)(e,t,n),r=this.preAction?await this.preAction(e,t,n):t,o=await i(r,n);return this.postAction?await this.postAction(e,o,n):o}catch(t){if(this.errorMiddleware)return this.errorMiddleware(e,t,n);throw t}}beforeAction(e){if(this.preAction)throw new Error("Already registered beforeAction middleware");this.preAction=we(e)}onError(e){if(this.errorMiddleware)throw new Error("Already registered error middleware");this.errorMiddleware=e}afterAction(e){if(this.postAction)throw new Error("Already registered afterAction middleware");this.postAction=we(e)}remove(e){this.subscriptions.delete(e)}setDefaultAction(e){if(this.defaultAction)throw new Error("default action can only be set once");this.defaultAction=e}register(e,t){if(this.subscriptions.has(e))throw new Error(`Subscription already registered for action: ${e}. Unsubscribe before adding new subscription`);return this.subscriptions.set(e,t),!0}}pe.ChannelBase=ye;var fe,ge,me,ve=s&&s.__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)},Ce=s&&s.__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};Object.defineProperty(ue,"__esModule",{value:!0}),ue.ChannelClient=void 0;const be=pe,Ie=new Map;class Ee extends be.ChannelBase{static closeChannelByEndpointId(e){const t=Ie.get(e);t&&ve(t,me,"f").call(t)}static handleProviderDisconnect(e){for(const t of Ie.values())t.providerIdentity.channelId===e.channelId&&(t.disconnectListener(e),ve(t,me,"f").call(t))}constructor(e,t,n){super(),fe.set(this,void 0),ge.set(this,void 0),this.processAction=(e,t,n)=>super.processAction(e,t,n),me.set(this,(()=>{Ie.delete(this.endpointId),ve(this,ge,"f").close()})),Ce(this,fe,new be.ProtectedItems(e,t),"f"),this.disconnectListener=()=>{},this.endpointId=e.endpointId,Ce(this,ge,n,"f"),Ie.set(this.endpointId,this),n.receive(this.processAction)}get providerIdentity(){return ve(this,fe,"f").providerIdentity}async dispatch(e,t){if(ve(this,ge,"f").isEndpointConnected(this.providerIdentity.channelId))return ve(this,ge,"f").send(this.providerIdentity.channelId,e,t);throw new Error("The client you are trying to dispatch from is disconnected from the target provider.")}onDisconnection(e){this.disconnectListener=t=>{try{e(t)}catch(e){throw new Error(`Error while calling the onDisconnection callback: ${e.message}`)}finally{this.disconnectListener=()=>{}}}}async disconnect(){await this.sendDisconnectAction(),ve(this,me,"f").call(this)}async sendDisconnectAction(){const e=ve(this,fe,"f");await e.close()}static async wireClose(e,t,n){const{channelName:i,uuid:r,name:o}=t;await e.sendAction("disconnect-from-channel",{channelName:i,uuid:r,name:o,endpointId:n})}}ue.ChannelClient=Ee,fe=new WeakMap,ge=new WeakMap,me=new WeakMap;var xe={},Ae={};Object.defineProperty(Ae,"__esModule",{value:!0}),Ae.exhaustiveCheck=void 0,Ae.exhaustiveCheck=function(e,t){throw new Error(`Unsupported value: ${e}${t?`\n Supported values are: ${t.join("")}`:""}`)};var Pe,Me,_e,Oe={},Se=s&&s.__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},Re=s&&s.__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)};Object.defineProperty(Oe,"__esModule",{value:!0}),Oe.ClassicInfo=Oe.ClassicStrategy=void 0;Oe.ClassicStrategy=class{constructor(e,t,n,i){this.messageReceiver=t,this.endpointId=n,this.providerIdentity=i,Pe.set(this,void 0),Me.set(this,new Map),_e.set(this,new Map),this.send=async(e,t,n)=>{const i=Re(this,Me,"f").get(e);if(!i)throw new Error(`Could not locate routing info for endpoint ${e}`);const r={...i};r.isLocalEndpointId&&delete r.endpointId,delete r.isLocalEndpointId;const o=Re(this,Pe,"f").sendAction("send-channel-message",{...r,providerIdentity:this.providerIdentity,action:t,payload:n});Re(this,_e,"f").get(e)?.add(o);return(await o.catch((e=>{throw new Error(e.message)})).finally((()=>{Re(this,_e,"f").get(e)?.delete(o)}))).payload.data.result},this.close=async()=>{this.messageReceiver.removeEndpoint(this.providerIdentity.channelId,this.endpointId),[...Re(this,Me,"f").keys()].forEach((e=>this.closeEndpoint(e))),Se(this,Me,new Map,"f")},Se(this,Pe,e,"f")}onEndpointDisconnect(e,t){}receive(e){this.messageReceiver.addEndpoint(e,this.providerIdentity.channelId,this.endpointId)}async closeEndpoint(e){const t=Re(this,Me,"f").get(e);Re(this,Me,"f").delete(e);const n=Re(this,_e,"f").get(e);n?.forEach((n=>{const i=`Channel connection with identity uuid: ${t?.uuid} / name: ${t?.name} / endpointId: ${e} no longer connected.`;n.cancel(new Error(i))}))}isEndpointConnected(e){return Re(this,Me,"f").has(e)}addEndpoint(e,t){Re(this,Me,"f").set(e,t.endpointIdentity),Re(this,_e,"f").set(e,new Set)}isValidEndpointPayload(e){return"string"==typeof e?.endpointIdentity?.endpointId||"string"==typeof e?.endpointIdentity?.channelId}},Pe=new WeakMap,Me=new WeakMap,_e=new WeakMap,Oe.ClassicInfo={version:5,minimumVersion:0,type:"classic"};var Fe={},je={},ke={};Object.defineProperty(ke,"__esModule",{value:!0}),ke.errorToPOJO=void 0,ke.errorToPOJO=function(e){return{stack:e.stack,name:e.name,message:e.message,toString:()=>e.stack||e.toString()}};var Le,Te,$e=s&&s.__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)},Be=s&&s.__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};Object.defineProperty(je,"__esModule",{value:!0}),je.RTCEndpoint=void 0;const Ge=ke;je.RTCEndpoint=class{static isValidEndpointPayload(e){const t=e=>"object"==typeof e&&null!==e;return t(e)&&t(e.endpointIdentity)&&t(e.rtc)&&"string"==typeof e.endpointIdentity.endpointId}constructor({rtc:e,endpointIdentity:t}){this.responseMap=new Map,Le.set(this,null),Te.set(this,void 0),this.connectionStateChangeHandler=e=>{"connected"!==this.rtc.rtcClient.connectionState&&(this.rtc.rtcClient.removeEventListener("connectionstatechange",this.connectionStateChangeHandler),this.close(),$e(this,Te,"f")&&$e(this,Te,"f").call(this))},this.send=async(e,t)=>{const n=`message-${Math.random()}`,i=new Promise(((e,t)=>{this.responseMap.set(n,{resolve:e,reject:t})}));return this.rtc.channels.request.send(JSON.stringify({action:e,payload:t,messageId:n})),i},this.close=()=>{this.responseMap.forEach((e=>e.reject("Connection has closed."))),this.responseMap=new Map,this.rtc.channels.request.close(),this.rtc.channels.response.close(),this.rtc.rtcClient.close()},this.rtc=e,this.endpointIdentity=t,this.rtc.channels.response.addEventListener("message",(e=>{let{data:t}=e;e.data instanceof ArrayBuffer&&(t=(new TextDecoder).decode(e.data));const{messageId:n,payload:i,success:r,error:o}=JSON.parse(t),{resolve:s,reject:a}=this.responseMap.get(n)??{};s&&a?(this.responseMap.delete(n),r?s(i):a(o)):(console.log("Could not find id in responseMap."),console.log(e))})),this.rtc.channels.request.addEventListener("message",(async e=>{let{data:n}=e;e.data instanceof ArrayBuffer&&(n=(new TextDecoder).decode(e.data));const{messageId:i,action:r,payload:o}=JSON.parse(n);if($e(this,Le,"f"))try{const e=await $e(this,Le,"f").call(this,r,o,t);this.rtc.channels.response.send(JSON.stringify({messageId:i,payload:e,success:!0}))}catch(e){"open"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,error:(0,Ge.errorToPOJO)(e),success:!1}))}else"open"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,success:!1,error:"Connection not ready."}))})),this.rtc.rtcClient.addEventListener("connectionstatechange",this.connectionStateChangeHandler),Object.values(this.rtc.channels).forEach((e=>{e.onclose=e=>{[...this.responseMap.values()].forEach((e=>e.reject(new Error("RTCDataChannel closed unexpectedly, this is most commonly caused by message size. Note: RTC Channels have a message size limit of ~255kB.")))),this.close(),$e(this,Te,"f")&&$e(this,Te,"f").call(this)}}))}onDisconnect(e){if($e(this,Te,"f"))throw new Error("RTCEndpoint disconnectListener cannot be set twice.");Be(this,Te,e,"f")}receive(e){if($e(this,Le,"f"))throw new Error("You have already set a listener for this RTC Endpoint.");Be(this,Le,e,"f")}get connected(){return"connected"===this.rtc.rtcClient.connectionState}},Le=new WeakMap,Te=new WeakMap;var We,He,Ne,De={},Ue=s&&s.__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)},Ve=s&&s.__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};Object.defineProperty(De,"__esModule",{value:!0}),De.EndpointStrategy=void 0;De.EndpointStrategy=class{constructor(e,t,n){this.EndpointType=e,this.StrategyName=n,We.set(this,null),He.set(this,new Map),Ne.set(this,!0),this.send=async(e,t,n)=>this.getEndpointById(e).send(t,n),this.close=async()=>{Ue(this,Ne,"f")&&(Ue(this,He,"f").forEach((e=>e.close())),Ve(this,He,new Map,"f")),Ve(this,Ne,!1,"f")},this.isValidEndpointPayload=t}onEndpointDisconnect(e,t){this.getEndpointById(e).onDisconnect(t)}receive(e){if(Ue(this,We,"f"))throw new Error(`You have already set a listener for this ${this.StrategyName} Strategy`);Ve(this,We,e,"f"),Ue(this,He,"f").forEach((e=>e.receive(Ue(this,We,"f"))))}getEndpointById(e){const t=Ue(this,He,"f").get(e);if(!t)throw new Error(`Client with endpoint id ${e} is not connected`);return t}get connected(){return Ue(this,Ne,"f")}isEndpointConnected(e){return Ue(this,He,"f").has(e)}addEndpoint(e,t){if(!Ue(this,Ne,"f"))return void console.warn(`Adding endpoint to disconnected ${this.StrategyName} Strategy`);const n=new this.EndpointType(t);Ue(this,We,"f")&&n.receive(Ue(this,We,"f")),Ue(this,He,"f").set(e,n)}async closeEndpoint(e){Ue(this,He,"f").delete(e)}},We=new WeakMap,He=new WeakMap,Ne=new WeakMap,Object.defineProperty(Fe,"__esModule",{value:!0}),Fe.RTCInfo=Fe.RTCStrategy=void 0;const ze=je,Ke=De;class qe extends Ke.EndpointStrategy{constructor(){super(ze.RTCEndpoint,ze.RTCEndpoint.isValidEndpointPayload,"RTC")}}Fe.RTCStrategy=qe,Fe.RTCInfo={version:2,minimumVersion:0,type:"rtc"};var Je={};Object.defineProperty(Je,"__esModule",{value:!0}),Je.RTCICEManager=void 0;const Ye=d;class Ze extends Ye.EmitterBase{constructor(e){super(e,"channel"),this.ensureChannelOpened=e=>new Promise(((t,n)=>{if("open"===e.readyState)t();else if("connecting"===e.readyState){const n=()=>{e.removeEventListener("open",n),t()};e.addEventListener("open",n)}else n(new Error("This Channel has already closed"))}))}static createDataChannelPromise(e,t){let n;const i=new Promise((e=>{n=e})),r=i=>{const o=()=>{i.channel.removeEventListener("open",o),n(i.channel)};i.channel.label===e&&(i.channel.addEventListener("open",o),t.removeEventListener("datachannel",r))};return t.addEventListener("datachannel",r),i}async listenForProviderIce(e,t){await this.on(this.createProviderEventName(e),t,{timestamp:Date.now()})}async raiseProviderIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createProviderEventName(e)),t)}async listenForClientIce(e,t){await this.on(this.createClientEventName(e),t,{timestamp:Date.now()})}async raiseClientIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createClientEventName(e)),t)}cleanupIceListeners(e){this.removeAllListeners(this.createClientEventName(e)),this.removeAllListeners(this.createProviderEventName(e))}createClientEventName(e){return`ice-client-${e}`}createProviderEventName(e){return`ice-provider-${e}`}createRouteString(e){return`channel/${e}`}createRtcPeer(){return this.wire.environment.getRtcPeer()}async startClientOffer(){const e=Math.random().toString(),t=this.createRtcPeer();t.addEventListener("icecandidate",(async t=>{t.candidate&&await this.raiseClientIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForProviderIce(e,(async e=>{await t.addIceCandidate(e.candidate)}));const n={request:t.createDataChannel("request"),response:t.createDataChannel("response")},i=await t.createOffer();await t.setLocalDescription(i);const r=Promise.all([n.request,n.response].map(this.ensureChannelOpened)).then((()=>{}));return{rtcClient:t,channels:n,offer:i,rtcConnectionId:e,channelsOpened:r}}async finishClientOffer(e,t,n){return await e.setRemoteDescription(t),await n,!0}async createProviderAnswer(e,t){const n=this.createRtcPeer(),i=Ze.createDataChannelPromise("request",n),r=Ze.createDataChannelPromise("response",n);n.addEventListener("icecandidate",(async t=>{t.candidate&&await this.raiseProviderIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForClientIce(e,(async e=>{await n.addIceCandidate(e.candidate)})),await n.setRemoteDescription(t);const o=await n.createAnswer();await n.setLocalDescription(o);const s=Promise.all([i,r]).then((([t,n])=>(this.cleanupIceListeners(e),{request:t,response:n})));return{rtcClient:n,answer:o,channels:s}}}Je.RTCICEManager=Ze;var Qe={},Xe={};function et(e){return[...e.split(".").reverse().entries()].reduce(((e,[t,n])=>e+ +n*1e4**t),0)}function tt(e,t){return et(e)>=et(t)}function nt(e){return e.split("/")[0]}Object.defineProperty(Xe,"__esModule",{value:!0}),Xe.runtimeUuidMeetsMinimumRuntimeVersion=Xe.parseRuntimeUuid=Xe.meetsMinimumRuntimeVersion=void 0,Xe.meetsMinimumRuntimeVersion=tt,Xe.parseRuntimeUuid=nt,Xe.runtimeUuidMeetsMinimumRuntimeVersion=function(e,t){return tt(nt(e),t)};var it,rt,ot,st,at,ct=s&&s.__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)},dt=s&&s.__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};Object.defineProperty(Qe,"__esModule",{value:!0}),Qe.ChannelProvider=void 0;const ht=pe,lt=Xe;class ut extends ht.ChannelBase{get connections(){return[...ct(this,it,"f")]}static handleClientDisconnection(e,t){const n=e.connections.find((e=>e.endpointId===t.endpointId));if(n)ct(e,st,"f").call(e,n);else{e.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name)).forEach(ct(e,st,"f"))}e.disconnectListener(t)}static setProviderRemoval(e,t){ut.removalMap.set(e,t)}constructor(e,t,n){super(),it.set(this,void 0),rt.set(this,void 0),ot.set(this,void 0),st.set(this,(e=>{const t=this.connections.filter((t=>t.endpointId!==e.endpointId));ct(this,ot,"f").closeEndpoint(e.endpointId),dt(this,it,t,"f")})),this.processAction=async(e,t,n)=>(ut.clientIsMultiRuntime(n)&&!(0,lt.runtimeUuidMeetsMinimumRuntimeVersion)(n.runtimeUuid,"18.87.56.0")?this.handleMultiRuntimeLegacyClient(n):this.checkForClientConnection(n),super.processAction(e,t,n)),at.set(this,(()=>{ct(this,ot,"f").close();const e=ut.removalMap.get(this);e&&e()})),dt(this,rt,new ht.ProtectedItems(e,t),"f"),this.connectListener=()=>{},this.disconnectListener=()=>{},dt(this,it,[],"f"),dt(this,ot,n,"f"),n.receive(this.processAction)}dispatch(e,t,n){const i=e.endpointId??this.getEndpointIdForOpenFinId(e,t);return i&&ct(this,ot,"f").isEndpointConnected(i)?ct(this,ot,"f").send(i,t,n):Promise.reject(new Error(`Client connection with identity uuid: ${e.uuid} / name: ${e.name} / endpointId: ${i} no longer connected.`))}async processConnection(e,t){return ct(this,it,"f").push(e),this.connectListener(e,t)}publish(e,t){return this.connections.map((n=>ct(this,ot,"f").send(n.endpointId,e,t)))}onConnection(e){this.connectListener=e}onDisconnection(e){this.disconnectListener=e}async destroy(){const e=ct(this,rt,"f");e.providerIdentity,dt(this,it,[],"f"),await e.close(),ct(this,at,"f").call(this)}async getAllClientInfo(){return this.connections.map((e=>{const{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}=e;return{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}}))}checkForClientConnection(e){if(!this.isClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider.\n Client Identity: {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}isClientConnected(e){return ut.clientIdentityIncludesEndpointId(e)?this.connections.some((t=>t.endpointId===e.endpointId&&t.uuid===e.uuid&&t.name===e.name)):this.isLegacyClientConnected(e)}isLegacyClientConnected(e){return this.connections.some((t=>t.uuid===e.uuid&&t.name===e.name))}handleMultiRuntimeLegacyClient(e){if(!this.isLegacyClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider. Client Identity:\n {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}getEndpointIdForOpenFinId(e,t){const n=this.connections.filter((t=>t.name===e.name&&t.uuid===e.uuid));if(n.length>=2){const n=ct(this,rt,"f"),{uuid:i,name:r}=e,o=n?.providerIdentity.uuid,s=n?.providerIdentity.name;console.warn(`WARNING: Dispatch call may have unintended results. The "to" argument of your dispatch call is missing the\n "endpointId" parameter. The identity you are dispatching to ({uuid: ${i}, name: ${r}})\n has multiple channelClients for this channel. Your dispatched action: (${t}) from the provider:\n ({uuid: ${o}, name: ${s}}) will only be processed by the most recently-created client.`)}return n.pop()?.endpointId}static clientIdentityIncludesEndpointId(e){return void 0!==e.endpointId}static clientIsMultiRuntime(e){return void 0!==e.runtimeUuid}static async wireClose(e,t){await e.sendAction("destroy-channel",{channelName:t})}}Qe.ChannelProvider=ut,it=new WeakMap,rt=new WeakMap,ot=new WeakMap,st=new WeakMap,at=new WeakMap,ut.removalMap=new WeakMap;var pt={};Object.defineProperty(pt,"__esModule",{value:!0}),pt.MessageReceiver=void 0;const wt=ue,yt=d;class ft extends yt.Base{constructor(e){super(e),this.onmessage=e=>"process-channel-message"===e.action&&(this.processChannelMessage(e),!0),this.endpointMap=new Map,this.latestEndpointIdByChannelId=new Map,e.registerMessageHandler(this.onmessage.bind(this))}async processChannelMessage(e){const{senderIdentity:t,providerIdentity:n,action:i,ackToSender:r,payload:o,intendedTargetIdentity:s}=e.payload,a=s.channelId??s.endpointId??this.latestEndpointIdByChannelId.get(n.channelId),c=this.endpointMap.get(a);if(!c)return r.payload.success=!1,r.payload.reason=`Client connection with identity uuid: ${this.wire.me.uuid} / name: ${this.wire.me.name} / endpointId: ${a} no longer connected.`,this.wire.sendRaw(r);try{const e=await c(i,o,t);return r.payload.payload=r.payload.payload||{},r.payload.payload.result=e,this.wire.sendRaw(r)}catch(e){return r.payload.success=!1,r.payload.reason=e.message,this.wire.sendRaw(r)}}addEndpoint(e,t,n){this.endpointMap.set(n,e),t!==n&&this.latestEndpointIdByChannelId.set(t,n)}removeEndpoint(e,t){this.endpointMap.delete(t),this.latestEndpointIdByChannelId.get(e)===t&&this.latestEndpointIdByChannelId.delete(e)}checkForPreviousClientConnection(e){const t=this.latestEndpointIdByChannelId.get(e);t&&(wt.ChannelClient.closeChannelByEndpointId(t),console.warn("You have created a second connection to an older provider. First connection has been removed from the clientMap"),console.warn("If the provider calls publish(), you may receive multiple messages."))}}pt.MessageReceiver=ft;var gt={};Object.defineProperty(gt,"__esModule",{value:!0}),gt.ProtocolManager=void 0;gt.ProtocolManager=class{constructor(e){this.ProtocolsInPreferenceOrder=e,this.DefaultClientProtocols=["classic"],this.DefaultProviderProtocols=["classic"],this.getClientProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultClientProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(", ")}.`);return t},this.getProviderProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultProviderProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(", ")}.`);return t},this.getCompatibleProtocols=(e,t)=>t.supportedProtocols.filter((t=>e.some((e=>e.type===t.type&&t.version>=e.minimumVersion&&e.version>=(t.minimumVersion??0))))).slice(0,t.maxProtocols)}};var mt={};Object.defineProperty(mt,"__esModule",{value:!0});class vt{static combine(e,t){return new vt(e,t)}constructor(e,t){this.primary=e,this.secondary=t}onEndpointDisconnect(e,t){this.primary.onEndpointDisconnect(e,(()=>{this.secondary.isEndpointConnected(e)||t()})),this.secondary.onEndpointDisconnect(e,(()=>{this.primary.isEndpointConnected(e)||t()}))}isValidEndpointPayload(e){return this.primary.isValidEndpointPayload(e)||this.secondary.isValidEndpointPayload(e)}async closeEndpoint(e){await this.primary.closeEndpoint(e),await this.secondary.closeEndpoint(e)}isEndpointConnected(e){return this.primary.isEndpointConnected(e)||this.secondary.isEndpointConnected(e)}async addEndpoint(e,t){this.primary.isValidEndpointPayload(t)&&await this.primary.addEndpoint(e,t),this.secondary.isValidEndpointPayload(t)&&await this.secondary.addEndpoint(e,t)}receive(e){this.primary.receive(e),this.secondary.receive(e)}send(e,t,n){return this.primary.isEndpointConnected(e)?this.primary.send(e,t,n):this.secondary.send(e,t,n)}async close(){await Promise.all([this.primary.close(),this.secondary.close()])}}mt.default=vt;var Ct,bt,It=s&&s.__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},Et=s&&s.__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)},xt=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(xe,"__esModule",{value:!0}),xe.ConnectionManager=void 0;const At=Ae,Pt=d,Mt=Oe,_t=Fe,Ot=Je,St=Qe,Rt=pt,Ft=gt,jt=xt(mt);class kt extends Pt.Base{static getProtocolOptionsFromStrings(e){return e.map((e=>{switch(e){case"rtc":return _t.RTCInfo;case"classic":return Mt.ClassicInfo;default:return(0,At.exhaustiveCheck)(e,["rtc","classic"])}}))}constructor(e){super(e),Ct.set(this,void 0),bt.set(this,void 0),this.removeChannelFromProviderMap=e=>{this.providerMap.delete(e)},this.onmessage=e=>"process-channel-connection"===e.action&&(this.processChannelConnection(e),!0),this.providerMap=new Map,this.protocolManager=new Ft.ProtocolManager("node"===this.wire.environment.type?["classic"]:["rtc","classic"]),It(this,Ct,new Rt.MessageReceiver(e),"f"),It(this,bt,new Ot.RTCICEManager(e),"f"),e.registerMessageHandler(this.onmessage.bind(this))}createProvider(e,t){const n=Object.assign(this.wire.environment.getDefaultChannelOptions().create,e||{}),i=this.protocolManager.getProviderProtocols(n?.protocols),r=i.map((e=>{switch(e){case"rtc":return new _t.RTCStrategy;case"classic":return new Mt.ClassicStrategy(this.wire,Et(this,Ct,"f"),t.channelId,t);default:return(0,At.exhaustiveCheck)(e,["rtc","classic"])}}));let o;if(2===r.length){const[e,t]=r;o=jt.default.combine(e,t)}else{if(1!==r.length)throw new Error("failed to combine strategies");[o]=r}const s=new St.ChannelProvider(t,(()=>St.ChannelProvider.wireClose(this.wire,t.channelName)),o),a=t.channelId;return this.providerMap.set(a,{provider:s,strategy:o,supportedProtocols:kt.getProtocolOptionsFromStrings(i)}),St.ChannelProvider.setProviderRemoval(s,this.removeChannelFromProviderMap.bind(this)),s}async createClientOffer(e){const t=this.protocolManager.getClientProtocols(e?.protocols);let n;return{offer:{supportedProtocols:await Promise.all(t.map((async e=>{switch(e){case"rtc":{const{rtcClient:e,channels:t,offer:i,rtcConnectionId:r,channelsOpened:o}=await Et(this,bt,"f").startClientOffer();return n={rtcClient:e,channels:t,channelsOpened:o},{type:"rtc",version:_t.RTCInfo.version,payload:{offer:i,rtcConnectionId:r}}}case"classic":return{type:"classic",version:Mt.ClassicInfo.version};default:return(0,At.exhaustiveCheck)(e,["rtc","classic"])}}))),maxProtocols:2},rtc:n}}async createClientStrategy(e,t){t.endpointId||(t.endpointId=this.wire.environment.getNextMessageId(),Et(this,Ct,"f").checkForPreviousClientConnection(t.channelId));const n=t.answer??{supportedProtocols:[{type:"classic",version:1}]},i=(await Promise.all(n.supportedProtocols.map((async n=>"rtc"===n.type&&e?(await Et(this,bt,"f").finishClientOffer(e.rtcClient,n.payload.answer,e.channelsOpened),new _t.RTCStrategy):"classic"===n.type?new Mt.ClassicStrategy(this.wire,Et(this,Ct,"f"),t.endpointId,t):null)))).filter((e=>null!==e));let r;if(e&&!i.some((e=>e instanceof _t.RTCStrategy))&&e&&e.rtcClient.close(),i.length>=2)r=jt.default.combine(i[0],i[1]);else{if(!i.length)throw new Error("No compatible protocols");[r]=i}const o={endpointIdentity:t,rtc:e};return r.addEndpoint(t.channelId,o),r}async processChannelConnection(e){const{clientIdentity:t,providerIdentity:n,ackToSender:i,payload:r,offer:o}=e.payload;t.endpointId?t.isLocalEndpointId=!1:(t.endpointId=this.wire.environment.getNextMessageId(),t.isLocalEndpointId=!0);const s=n.channelId,a=this.providerMap.get(s);if(!a)return i.payload.success=!1,i.payload.reason=`Channel "${n.channelName}" has been destroyed.`,this.wire.sendRaw(i);const{provider:c,strategy:d,supportedProtocols:h}=a;try{if(!(c instanceof St.ChannelProvider))throw Error("Cannot connect to a channel client");const e=o??{supportedProtocols:[{type:"classic",version:1}],maxProtocols:1},n=this.protocolManager.getCompatibleProtocols(h,e);if(!n.length)throw new Error("This provider does not support any of the offered protocols.");const s=await c.processConnection(t,r);i.payload.payload=i.payload.payload||{};let a={supportedProtocols:[],endpointPayloadPromise:Promise.resolve({endpointIdentity:t})};return a=await n.reduce((async(e,t)=>{const n=await e;if("rtc"===t.type){const{answer:e,rtcClient:i,channels:r}=await Et(this,bt,"f").createProviderAnswer(t.payload.rtcConnectionId,t.payload.offer);n.supportedProtocols.push({type:"rtc",version:_t.RTCInfo.version,payload:{answer:e}}),n.endpointPayloadPromise=n.endpointPayloadPromise.then((e=>r.then((t=>({...e,rtc:{rtcClient:i,channels:t}})))))}else n.supportedProtocols.push({type:"classic",version:Mt.ClassicInfo.version});return n}),Promise.resolve(a)),a.endpointPayloadPromise.then((e=>d.addEndpoint(t.endpointId,e))),i.payload.payload.result=s,i.payload.payload.answer=a,this.wire.sendRaw(i)}catch(e){return i.payload.success=!1,i.payload.reason=e.message,this.wire.sendRaw(i)}}}xe.ConnectionManager=kt,Ct=new WeakMap,bt=new WeakMap;var Lt,Tt,$t,Bt=s&&s.__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},Gt=s&&s.__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)};Object.defineProperty(le,"__esModule",{value:!0}),le.Channel=void 0;const Wt=t,Ht=G,Nt=d,Dt=ue,Ut=xe,Vt=Qe;function zt(e){const t=Math.floor(e/10),n=Math.min(3e4,500*2**t);return new Promise((e=>{setTimeout((()=>{e(!1)}),n)}))}class Kt extends Nt.EmitterBase{constructor(e){super(e,"channel"),Lt.set(this,void 0),Tt.set(this,new Wt.EventEmitter),$t.set(this,new Ht.AsyncRetryableLazy((async()=>{await Promise.all([this.on("disconnected",(e=>{Dt.ChannelClient.handleProviderDisconnect(e)})),this.on("connected",((...e)=>{Gt(this,Tt,"f").emit("connected",...e)}))]).catch((()=>new Error("error setting up channel connection listeners")))}))),Bt(this,Lt,new Ut.ConnectionManager(e),"f")}async getAllChannels(){return this.wire.sendAction("get-all-channels").then((({payload:e})=>e.data))}async onChannelConnect(e){await this.on("connected",e)}async onChannelDisconnect(e){await this.on("disconnected",e)}async safeConnect(e,t,n){const i={count:0};do{let r=()=>{};const o=new Promise((t=>{r=n=>{e===n.channelName&&t(!0)},Gt(this,Tt,"f").on("connected",r)}));try{if(i.count>0){i.gotConnectedEvent=await Promise.race([zt(i.count),o]);const t=await this.wire.sendAction("connect-to-channel",{...n,retryInfo:i});return console.log(`Successfully connected to channelName: ${e}`),t.payload.data}const t=this.wire.sendAction("connect-to-channel",n);i.originalMessageId=t.messageId;return(await t).payload.data}catch(n){if(!n.message.includes("internal-nack"))throw n;t&&0===i.count&&console.warn(`No channel found for channelName: ${e}. Waiting for connection...`)}finally{i.count+=1,Gt(this,Tt,"f").removeListener("connected",r)}}while(t);throw new Error(`No channel found for channelName: ${e}.`)}async connect(e,t={}){if(await Gt(this,$t,"f").getValue(),!e||"string"!=typeof e)throw new Error("Please provide a channelName string to connect to a channel.");const n={wait:!0,...this.wire.environment.getDefaultChannelOptions().connect,...t},{offer:i,rtc:r}=await Gt(this,Lt,"f").createClientOffer(n);let o;(this.fin.me.isFrame||this.fin.me.isView||this.fin.me.isWindow)&&(o=(await this.fin.me.getInfo()).url);const s={channelName:e,...n,offer:i,connectionUrl:o},a=await this.safeConnect(e,n.wait,s),c=await Gt(this,Lt,"f").createClientStrategy(r,a),d=new Dt.ChannelClient(a,(()=>Dt.ChannelClient.wireClose(this.wire,a,a.endpointId)),c);return c.onEndpointDisconnect(a.channelId,(async()=>{try{await d.sendDisconnectAction()}catch(e){console.warn(`Something went wrong during disconnect for client with uuid: ${a.uuid} / name: ${a.name} / endpointId: ${a.endpointId}.`)}finally{Dt.ChannelClient.handleProviderDisconnect(a)}})),d}async create(e,t){if(!e)throw new Error("Please provide a channelName to create a channel");const{payload:{data:n}}=await this.wire.sendAction("create-channel",{channelName:e}),i=Gt(this,Lt,"f").createProvider(t,n);return this.on("client-disconnected",(t=>{t.channelName===e&&Vt.ChannelProvider.handleClientDisconnection(i,t)})),i}}le.Channel=Kt,Lt=new WeakMap,Tt=new WeakMap,$t=new WeakMap,Object.defineProperty(de,"__esModule",{value:!0}),de.InterAppPayload=de.InterApplicationBus=void 0;const qt=t,Jt=d,Yt=he,Zt=le,Qt=O;class Xt extends Jt.Base{constructor(e){super(e),this.events={subscriberAdded:"subscriber-added",subscriberRemoved:"subscriber-removed"},this.refCounter=new Yt.RefCounter,this.Channel=new Zt.Channel(e),this.emitter=new qt.EventEmitter,e.registerMessageHandler(this.onmessage.bind(this)),this.on=this.emitter.on.bind(this.emitter),this.removeAllListeners=this.emitter.removeAllListeners.bind(this.emitter)}async publish(e,t){await this.wire.sendAction("publish-message",{topic:e,message:t,sourceWindowName:this.me.name})}async send(e,t,n){const i=(0,Qt.validateIdentity)(e);if(i)throw new Error(i);await this.wire.sendAction("send-message",{destinationUuid:e.uuid,destinationWindowName:e.name,topic:t,message:n,sourceWindowName:this.me.name})}subscribe(e,t,n){const i=this.createSubscriptionKey(e.uuid,e.name||"*",t);return this.emitter.on(i,n),this.refCounter.actOnFirst(i,(async()=>{await this.wire.sendAction("subscribe",{sourceUuid:e.uuid,sourceWindowName:e.name||"*",topic:t,destinationWindowName:this.me.name})}),(()=>Promise.resolve()))}unsubscribe(e,t,n){const i=e.name||"*",r=this.createSubscriptionKey(e.uuid,i,t);return this.emitter.removeListener(r,n),this.refCounter.actOnLast(r,(async()=>{await this.wire.sendAction("unsubscribe",{sourceUuid:e.uuid,sourceWindowName:i,topic:t,destinationWindowName:this.me.name})}),(()=>new Promise((e=>e)).then((()=>{}))))}processMessage(e){const{payload:{message:t,sourceWindowName:n,sourceUuid:i,topic:r}}=e,o=[this.createSubscriptionKey(i,n,r),this.createSubscriptionKey(i,"*",r),this.createSubscriptionKey("*","*",r)],s={uuid:i,name:n};o.forEach((e=>{this.emitter.emit(e,t,s)}))}emitSubscriverEvent(e,t){const{payload:{targetName:n,uuid:i,topic:r}}=t,o={name:n,uuid:i,topic:r};this.emitter.emit(e,o)}createSubscriptionKey(e,t,n){const i=t||"*";if(!(e&&i&&n))throw new Error("Missing uuid, name, or topic string");return function(...e){return e.map((e=>Buffer.from(`${e}`).toString("base64"))).join("/")}(e,i,n)}onmessage(e){const{action:t}=e;switch(t){case"process-message":this.processMessage(e);break;case this.events.subscriberAdded:this.emitSubscriverEvent(this.events.subscriberAdded,e);break;case this.events.subscriberRemoved:this.emitSubscriverEvent(this.events.subscriberRemoved,e)}return!0}}de.InterApplicationBus=Xt;de.InterAppPayload=class{};var en={};Object.defineProperty(en,"__esModule",{value:!0}),en.Clipboard=void 0;const tn=d;class nn extends tn.Base{async writeText(e){await this.wire.sendAction("clipboard-write-text",e)}async readText(e){const{payload:t}=await this.wire.sendAction("clipboard-read-text",{type:e});return t.data}async writeImage(e){await this.wire.sendAction("clipboard-write-image",e)}async readImage(e={format:"dataURL"}){const{payload:t}=await this.wire.sendAction("clipboard-read-image",e);return t.data}async writeHtml(e){await this.wire.sendAction("clipboard-write-html",e)}async readHtml(e){const{payload:t}=await this.wire.sendAction("clipboard-read-html",{type:e});return t.data}async writeRtf(e){await this.wire.sendAction("clipboard-write-rtf",e)}async readRtf(e){const{payload:t}=await this.wire.sendAction("clipboard-read-rtf",{type:e});return t.data}async write(e){await this.wire.sendAction("clipboard-write",e)}async getAvailableFormats(e){const{payload:t}=await this.wire.sendAction("clipboard-read-formats",{type:e});return t.data}}en.Clipboard=nn;var rn={},on={},sn={};Object.defineProperty(sn,"__esModule",{value:!0}),sn.ExternalApplication=void 0;const an=d;class cn extends an.EmitterBase{constructor(e,t){super(e,"external-application",t.uuid),this.identity=t}getInfo(){return this.wire.sendAction("get-external-application-info",this.identity).then((({payload:e})=>e.data))}}sn.ExternalApplication=cn,Object.defineProperty(on,"__esModule",{value:!0}),on.ExternalApplicationModule=void 0;const dn=d,hn=sn;class ln extends dn.Base{wrap(e){return this.wire.sendAction("external-application-wrap").catch((e=>{})),Promise.resolve(new hn.ExternalApplication(this.wire,{uuid:e}))}wrapSync(e){return this.wire.sendAction("external-application-wrap-sync").catch((e=>{})),new hn.ExternalApplication(this.wire,{uuid:e})}}on.ExternalApplicationModule=ln,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(on,e),n(sn,e)}(rn);var un={},pn={},wn={};Object.defineProperty(wn,"__esModule",{value:!0}),wn._Frame=void 0;const yn=d;class fn extends yn.EmitterBase{constructor(e,t){super(e,"frame",t.uuid,t.name),this.identity=t}getInfo(){return this.wire.sendAction("get-frame-info",this.identity).then((({payload:e})=>e.data))}getParentWindow(){return this.wire.sendAction("get-parent-window",this.identity).then((({payload:e})=>e.data))}}wn._Frame=fn,Object.defineProperty(pn,"__esModule",{value:!0}),pn._FrameModule=void 0;const gn=d,mn=O,vn=wn;class Cn extends gn.Base{async wrap(e){this.wire.sendAction("frame-wrap").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}wrapSync(e){this.wire.sendAction("frame-wrap-sync").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}getCurrent(){return this.wire.sendAction("frame-get-current").catch((e=>{})),Promise.resolve(new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity()))}getCurrentSync(){return this.wire.sendAction("frame-get-current-sync").catch((e=>{})),new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity())}}pn._FrameModule=Cn,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(pn,e),n(wn,e)}(un);var bn={};Object.defineProperty(bn,"__esModule",{value:!0}),bn.GlobalHotkey=void 0;const In=d;class En extends In.EmitterBase{constructor(e){super(e,"global-hotkey")}async register(e,t){await this.on(e,t),await this.wire.sendAction("global-hotkey-register",{hotkey:e})}async unregister(e){await this.removeAllListeners(e),await this.wire.sendAction("global-hotkey-unregister",{hotkey:e})}async unregisterAll(){await Promise.all(this.eventNames().filter((e=>!("registered"===e||"unregistered"===e))).map((e=>this.removeAllListeners(e)))),await this.wire.sendAction("global-hotkey-unregister-all",{})}async isRegistered(e){const{payload:{data:t}}=await this.wire.sendAction("global-hotkey-is-registered",{hotkey:e});return t}}bn.GlobalHotkey=En;var xn,An={},Pn={},Mn={},_n=s&&s.__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)};Object.defineProperty(Mn,"__esModule",{value:!0}),Mn.Platform=void 0;const On=d,Sn=O,Rn=new Map;class Fn extends On.EmitterBase{constructor(e,t){super(t.wire,"application",e.uuid),this.getClient=e=>{this.wire.sendAction("platform-get-client",this.identity).catch((e=>{}));const t=e||this.identity,{uuid:n}=t;if(!Rn.has(n)){const e=_n(this,xn,"f").call(this,n);Rn.set(n,e)}return Rn.get(n)},xn.set(this,(async e=>{try{const t=`custom-frame-${e}`,n=await this._channel.connect(t,{wait:!1});return n.onDisconnection((()=>{Rn.delete(e)})),n}catch(t){throw Rn.delete(e),new Error("The targeted Platform is not currently running. Listen for application-started event for the given Uuid.")}})),this.launchLegacyManifest=this.launchContentManifest;const n=(0,Sn.validateIdentity)(e);if(n)throw new Error(n);this._channel=t,this.identity={uuid:e.uuid},this.Layout=this.fin.Platform.Layout,this.Application=this.fin.Application.wrapSync(this.identity)}async createView(e,t,n){this.wire.sendAction("platform-create-view",this.identity).catch((e=>{}));const i=await this.getClient(),r=await i.dispatch("create-view",{target:t,opts:e,targetView:n});if(!r||(0,Sn.validateIdentity)(r.identity))throw new Error(`When overwriting the createView call, please return an object that has a valid 'identity' property: ${JSON.stringify(r)}`);return this.fin.View.wrapSync(r.identity)}async createWindow(e){this.wire.sendAction("platform-create-window",this.identity).catch((e=>{}));const t=await this.getClient();e.reason||(e.reason="api-call");const n=await t.dispatch("create-view-container",e);if(!n||(0,Sn.validateIdentity)(n.identity))throw new Error(`When overwriting the createWindow call, please return an object that has a valid 'identity' property: ${JSON.stringify(n)}`);const{identity:i}=n,r=this.fin.Window.wrapSync(i);return r.name=i.name,r.uuid=i.uuid,r}async quit(){this.wire.sendAction("platform-quit",this.identity).catch((e=>{}));return(await this.getClient()).dispatch("quit")}async closeView(e){this.wire.sendAction("platform-close-view",this.identity).catch((e=>{}));const t=await this.getClient();await t.dispatch("close-view",{view:e})}async reparentView(e,t){console.warn("Platform.reparentView has been deprecated, please use Platform.createView"),this.wire.sendAction("platform-reparent-view",this.identity).catch((e=>{}));const n={...e,uuid:e.uuid??this.identity.uuid},i=await this.fin.View.wrap(n),r=await i.getOptions();return this.createView(r,t)}async getSnapshot(){this.wire.sendAction("platform-get-snapshot",this.identity).catch((e=>{}));return(await this.getClient()).dispatch("get-snapshot")}async getViewSnapshot(e){return(await this.getClient()).dispatch("get-view-snapshot",{viewIdentity:e})}async applySnapshot(e,t){this.wire.sendAction("platform-apply-snapshot",this.identity).catch((e=>{}));const n="Requested snapshot must be a valid Snapshot object, or a url or filepath to such an object.";let i;if("string"==typeof e)try{i=(await this._channel.wire.sendAction("get-application-manifest",{manifestUrl:e})).payload.data}catch(e){throw new Error(`${n}: ${e}`)}else i=e;if(!i.windows)throw new Error(n);const r=await this.getClient();return await r.dispatch("apply-snapshot",{snapshot:i,options:t}),this}async fetchManifest(e){return(await this.getClient()).dispatch("platform-fetch-manifest",{manifestUrl:e})}async launchContentManifest(e){this.wire.sendAction("platform-launch-content-manifest",this.identity).catch((()=>{}));const t=await this.getClient(),n=await this.fetchManifest(e);return t.dispatch("launch-into-platform",{manifest:n,manifestUrl:e}),this}async setWindowContext(e={},t){if(this.wire.sendAction("platform-set-window-context",this.identity).catch((e=>{})),!e)throw new Error("Please provide a serializable object or string to set the context.");const n=await this.getClient(),{entityType:i}=t?await this.fin.System.getEntityInfo(t.uuid,t.name):this.fin.me;await n.dispatch("set-window-context",{context:e,entityType:i,target:t||{uuid:this.fin.me.uuid,name:this.fin.me.name}})}async getWindowContext(e){this.wire.sendAction("platform-get-window-context",this.identity).catch((e=>{}));const t=await this.getClient(),{entityType:n}=e?await this.fin.System.getEntityInfo(e.uuid,e.name):this.fin.me;return t.dispatch("get-window-context",{target:e||{uuid:this.fin.me.uuid,name:this.fin.me.name},entityType:n})}async closeWindow(e,t={skipBeforeUnload:!1}){this.wire.sendAction("platform-close-window",this.identity).catch((e=>{}));return(await this.getClient()).dispatch("close-window",{windowId:e,options:t})}}Mn.Platform=Fn,xn=new WeakMap;var jn={},kn={},Ln={},Tn={};function $n(e){switch(e){case"columns":case"grid":case"rows":case"tabs":return!0;default:return!1}}Object.defineProperty(Tn,"__esModule",{value:!0}),Tn.overrideFromComposables=Tn.isValidPresetType=void 0,Tn.isValidPresetType=$n,Tn.overrideFromComposables=function(...e){return t=>e.reduceRight(((e,t)=>n=>t(e(n))),(e=>e))(t)},Tn.default={isValidPresetType:$n};var Bn={},Gn={},Wn={};Object.defineProperty(Wn,"__esModule",{value:!0}),Wn.ApiConsumer=void 0;Wn.ApiConsumer=class{constructor(e){this.strategy=e,this.consume=async e=>(await this.strategy.getExposedFunctions(e)).reduce(((t,n)=>({...t,[n.key]:this.strategy.createFunction(n,e)})),{})}};var Hn={},Nn={};Object.defineProperty(Nn,"__esModule",{value:!0}),Nn.expose=Nn.getExposedProperties=void 0;const Dn=Symbol("exposedProperties");Nn.getExposedProperties=e=>e[Dn]||e.prototype[Dn]||[];Nn.expose=e=>(t,n,i)=>{t[Dn]=t[Dn]||[],t[Dn].push({key:n,descriptor:i,options:e})},Object.defineProperty(Hn,"__esModule",{value:!0}),Hn.ApiExposer=void 0;const Un=Nn;Hn.ApiExposer=class{constructor(e){this.strategy=e,this.exposeInstance=async(e,t)=>{const n=(0,Un.getExposedProperties)(e),i=await Promise.all(n.map((async({key:n,options:i})=>({key:n,options:await this.strategy.exposeFunction(e[n].bind(e),{key:n,options:i,meta:t})}))));await this.strategy.exposeMeta(t,i)}}};var Vn={},zn={},Kn={};Object.defineProperty(Kn,"__esModule",{value:!0}),Kn.ChannelsConsumer=void 0;Kn.ChannelsConsumer=class{constructor(e){this.channel=e,this.getExposedFunctions=async e=>{const{id:t}=e,{props:n}=await this.channel.dispatch(`api-meta:${t}`);return n},this.createFunction=e=>(...t)=>{const{action:n}=e.options;return this.channel.dispatch(n,{args:t})}}};var qn={};Object.defineProperty(qn,"__esModule",{value:!0}),qn.ChannelsExposer=void 0;qn.ChannelsExposer=class{constructor(e){this.channelProviderOrClient=e,this.exposeFunction=async(e,t)=>{const{key:n,options:i,meta:r}=t,{id:o}=r,s=`${o}.${i?.action||n}`;return await this.channelProviderOrClient.register(s,(async({args:t})=>e(...t))),{action:s}},this.exposeMeta=async({id:e},t)=>{const n=`api-meta:${e}`;await this.channelProviderOrClient.register(n,(()=>({props:t})))}}},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Kn,e),n(qn,e)}(zn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(zn,e)}(Vn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Wn,e),n(Hn,e),n(Vn,e),n(Nn,e)}(Gn);var Jn={};Object.defineProperty(Jn,"__esModule",{value:!0}),Jn.createRelayedDispatch=exports.relayChannelClientApi_1=Jn.relayChannelClientApi=void 0;const Yn=["no longer connected","RTCDataChannel closed unexpectedly","The client you are trying to dispatch from is disconnected from the target provider"];exports.relayChannelClientApi_1=Jn.relayChannelClientApi=async(e,t)=>{e.register(`relay:${t}`,(({action:t,target:n,payload:i})=>e.dispatch(n,t,i))),await Promise.resolve()};Jn.createRelayedDispatch=(e,t,n,i)=>async(r,o)=>{try{return await e.dispatch(`relay:${n}`,{action:r,payload:o,target:t})}catch(e){if(s=e.message,Yn.some((e=>s.includes(e)))&&i)throw new Error(i);throw e}var s};var Zn,Qn,Xn,ei=s&&s.__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},ti=s&&s.__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)};Object.defineProperty(Bn,"__esModule",{value:!0}),Bn.ColumnOrRow=Bn.TabStack=Bn.LayoutNode=void 0;const ni=Gn,ii=Jn;class ri{constructor(e,t){Zn.set(this,void 0),this.isRoot=()=>ti(this,Zn,"f").isRoot(this.entityId),this.exists=()=>ti(this,Zn,"f").exists(this.entityId),this.getParent=async()=>{const e=await ti(this,Zn,"f").getParent(this.entityId);if(e)return ri.getEntity(e,ti(this,Zn,"f"))},this.createAdjacentStack=async(e,t)=>{const n=await ti(this,Zn,"f").createAdjacentStack(this.entityId,e,t);return ri.getEntity({entityId:n,type:"stack"},ti(this,Zn,"f"))},this.getAdjacentStacks=async e=>(await ti(this,Zn,"f").getAdjacentStacks({targetId:this.entityId,edge:e})).map((e=>ri.getEntity({type:"stack",entityId:e.entityId},ti(this,Zn,"f")))),ei(this,Zn,e,"f"),this.entityId=t}}Bn.LayoutNode=ri,Zn=new WeakMap,ri.newLayoutEntitiesClient=async(e,t,n)=>{const i=(0,ii.createRelayedDispatch)(e,n,"layout-relay","You are trying to interact with a layout component on a window that does not exist or has been destroyed.");return new ni.ApiConsumer(new ni.ChannelsConsumer({dispatch:i})).consume({id:t})},ri.getEntity=(e,t)=>{const{entityId:n,type:i}=e;switch(i){case"column":case"row":return new si(t,n,i);case"stack":return new oi(t,n);default:throw new Error(`Unrecognised Layout Entity encountered ('${JSON.stringify(e)})`)}};class oi extends ri{constructor(e,t){super(e,t),Qn.set(this,void 0),this.type="stack",this.getViews=()=>ti(this,Qn,"f").getStackViews(this.entityId),this.addView=async(e,t={index:0})=>ti(this,Qn,"f").addViewToStack(this.entityId,e,t),this.removeView=async e=>{await ti(this,Qn,"f").removeViewFromStack(this.entityId,e)},this.setActiveView=async e=>{await ti(this,Qn,"f").setStackActiveView(this.entityId,e)},ei(this,Qn,e,"f")}}Bn.TabStack=oi,Qn=new WeakMap;class si extends ri{constructor(e,t,n){super(e,t),Xn.set(this,void 0),this.getContent=async()=>(await ti(this,Xn,"f").getContent(this.entityId)).map((e=>ri.getEntity(e,ti(this,Xn,"f")))),ei(this,Xn,e,"f"),this.type=n}}Bn.ColumnOrRow=si,Xn=new WeakMap;var ai={};Object.defineProperty(ai,"__esModule",{value:!0}),ai.DEFAULT_LAYOUT_KEY=ai.LAYOUT_CONTROLLER_ID=void 0,ai.LAYOUT_CONTROLLER_ID="layout-entities",ai.DEFAULT_LAYOUT_KEY="__default__";var ci,di,hi,li=s&&s.__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)};Object.defineProperty(Ln,"__esModule",{value:!0}),Ln.Layout=void 0;const ui=G,pi=O,wi=d,yi=Tn,fi=Bn,gi=ai;class mi extends wi.Base{static getClient(e){return li(e,di,"f").getValue()}constructor(e,t){super(t),ci.add(this),di.set(this,new ui.Lazy((async()=>fi.LayoutNode.newLayoutEntitiesClient(await this.platform.getClient(),gi.LAYOUT_CONTROLLER_ID,this.identity)))),this.replace=async e=>{this.wire.sendAction("layout-replace").catch((e=>{}));const t=await this.platform.getClient();await t.dispatch("replace-layout",{target:this.identity,opts:{layout:e}})},this.replaceView=async(e,t)=>{this.wire.sendAction("layout-replace-view").catch((e=>{}));const n=await this.platform.getClient();await n.dispatch("replace-view",{target:this.identity,opts:{viewToReplace:e,newView:t}})},this.applyPreset=async e=>{this.wire.sendAction("layout-apply-preset").catch((e=>{}));const t=await this.platform.getClient(),{presetType:n}=e;if(!n||!(0,yi.isValidPresetType)(n))throw new Error("Cannot apply preset layout, please include an applicable presetType property in the PresetLayoutOptions.");await t.dispatch("apply-preset-layout",{target:this.identity,opts:{presetType:n}})};const n=(0,pi.validateIdentity)(e);if(n)throw new Error(n);this.identity=e,this.platform=this.fin.Platform.wrapSync({uuid:e.uuid}),e.uuid===this.fin.me.uuid&&e.name===this.fin.me.name&&(this.init=this.fin.Platform.Layout.init)}async getConfig(){this.wire.sendAction("layout-get-config").catch((e=>{}));return(await this.platform.getClient()).dispatch("get-frame-snapshot",{target:this.identity})}async getCurrentViews(){this.wire.sendAction("layout-get-views").catch((e=>{}));const e=await this.platform.getClient();return(await e.dispatch("get-layout-views",{target:this.identity})).map((e=>this.fin.View.wrapSync(e)))}async getRootItem(){this.wire.sendAction("layout-get-root-item").catch((()=>{}));const e=await li(this,di,"f").getValue(),t=await e.getRoot("layoutName"in this.identity?this.identity:void 0);return fi.LayoutNode.getEntity(t,e)}async getStackByViewIdentity(e){this.wire.sendAction("layout-get-stack-by-view").catch((()=>{}));const t=await li(this,di,"f").getValue(),n=await t.getStackByView(e);if(!n)throw new Error(`No stack found for view: ${e.uuid}/${e.name}`);return fi.LayoutNode.getEntity(n,t)}async addView(e,{location:t,targetView:n}={}){this.wire.sendAction("layout-add-view").catch((e=>{}));const{identity:i}=await li(this,ci,"m",hi).call(this,"layout-add-view",{viewOptions:e,location:t,targetView:n});return{identity:i}}async closeView(e){this.wire.sendAction("layout-close-view").catch((e=>{})),await li(this,ci,"m",hi).call(this,"layout-close-view",{viewIdentity:e})}}Ln.Layout=mi,di=new WeakMap,ci=new WeakSet,hi=async function(e,t){return(await this.platform.getClient()).dispatch(e,{target:this.identity,opts:t})};var vi,Ci,bi,Ii,Ei,xi=s&&s.__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)},Ai=s&&s.__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};Object.defineProperty(kn,"__esModule",{value:!0}),kn.LayoutModule=void 0;const Pi=d,Mi=Ln,_i=ai;class Oi extends Pi.Base{constructor(){super(...arguments),vi.add(this),Ci.set(this,!1),bi.set(this,null),this.init=async(e={})=>{if(this.wire.sendAction("layout-init").catch((e=>{})),!this.wire.environment.layoutAllowedInContext(this.fin))throw new Error("Layout.init can only be called from a Window context.");if(xi(this,Ci,"f"))throw new Error("Layout.init was already called, please use Layout.create to add additional layouts.");"openfin"===this.wire.environment.type&&await this.fin.Platform.getCurrentSync().getClient(),Ai(this,Ci,!0,"f"),Ai(this,bi,await this.wire.environment.initLayoutManager(this.fin,this.wire,e),"f"),await this.wire.environment.applyLayoutSnapshot(this.fin,xi(this,bi,"f"),e);const t={name:this.fin.me.name,uuid:this.fin.me.uuid};if(!e.layoutManagerOverride){const e={layoutName:_i.DEFAULT_LAYOUT_KEY,...t};return xi(this,Ii,"f").call(this,e)}return this.wrapSync(t)},Ii.set(this,(e=>{const t="[Layout] You are using a deprecated property `layoutManager` - it will throw if you access it starting in v37.",n=new Proxy({},{get(e,n){throw console.warn(`[Layout-mgr-proxy] accessing ${n.toString()}`),new Error(t)}}),i=Object.assign(this.wrapSync(e),{layoutManager:n});return new Proxy(i,{get(e,n){if("layoutManager"===n)throw console.warn(`[Layout-proxy] accessing ${n.toString()}`),new Error(t);return e[n]}})})),this.getCurrentLayoutManagerSync=()=>xi(this,vi,"m",Ei).call(this,"fin.Platform.Layout.getCurrentLayoutManagerSync()"),this.create=async e=>this.wire.environment.createLayout(xi(this,vi,"m",Ei).call(this,"fin.Platform.Layout.create()"),e),this.destroy=async e=>this.wire.environment.destroyLayout(xi(this,vi,"m",Ei).call(this,"fin.Platform.Layout.destroy()"),e)}async wrap(e){return this.wire.sendAction("layout-wrap").catch((e=>{})),new Mi.Layout(e,this.wire)}wrapSync(e){return this.wire.sendAction("layout-wrap-sync").catch((e=>{})),new Mi.Layout(e,this.wire)}async getCurrent(){if(this.wire.sendAction("layout-get-current").catch((e=>{})),"openfin"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error("You are not in a Window context. Only Windows can have a Layout.");const{uuid:e,name:t}=this.fin.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction("layout-get-current-sync").catch((e=>{})),"openfin"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error("You are not in a Window context. Only Windows can have a Layout.");const{uuid:e,name:t}=this.fin.me;return this.wrapSync({uuid:e,name:t})}async getLayoutByViewIdentity(e){this.wire.sendAction("layout-get-by-view-identity").catch((()=>{}));let t=await this.wire.environment.getViewWindowIdentity(this.fin,e);t.identity&&(t=t.identity);try{const n=this.wrapSync(t),i=await Mi.Layout.getClient(n),r=await i.getLayoutIdentityForViewOrThrow(e);return this.wrapSync(r)}catch(n){if(!["No action registered at target for","getLayoutIdentityForViewOrThrow is not a function"].some((e=>n.message.includes(e))))throw n;if(t.uuid===t.name)throw new Error(`View identity ${JSON.stringify(e)} is not attached to any layout in provider window ${JSON.stringify(t)}.`);return this.wrapSync(t)}}}kn.LayoutModule=Oi,Ci=new WeakMap,bi=new WeakMap,Ii=new WeakMap,vi=new WeakSet,Ei=function(e){if(!xi(this,bi,"f"))throw new Error(`You must call init before using the API ${e}`);return xi(this,bi,"f")},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(kn,e),n(Ln,e)}(jn),Object.defineProperty(Pn,"__esModule",{value:!0}),Pn.PlatformModule=void 0;const Si=d,Ri=Mn,Fi=jn;class ji extends Si.Base{constructor(e,t){super(e),this._channel=t,this.Layout=new Fi.LayoutModule(this.wire)}async init(e){if(!fin.__internal_.isPlatform||fin.me.name!==fin.me.uuid)throw new Error("fin.Platform.init should only be called from a custom platform provider running in the main window of the application.");return this.wire.environment.initPlatform(this.fin,e)}async wrap(e){return this.wire.sendAction("platform-wrap").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}wrapSync(e){return this.wire.sendAction("platform-wrap-sync").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}async getCurrent(){return this.wire.sendAction("platform-get-current").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction("platform-get-current-sync").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}start(e){return this.wire.sendAction("platform-start").catch((e=>{})),new Promise((async(t,n)=>{try{const{uuid:n}=e,i=await this.fin.Application._create({...e,isPlatformController:!0});i.once("platform-api-ready",(()=>t(this.wrapSync({uuid:n})))),i._run({uuid:n})}catch(e){n(e)}}))}startFromManifest(e,t){return this.wire.sendAction("platform-start-from-manifest").catch((e=>{})),new Promise((async(n,i)=>{try{const i=await this.fin.Application._createFromManifest(e);i.once("platform-api-ready",(()=>n(this.wrapSync({uuid:i.identity.uuid})))),i._run(t)}catch(e){i(e)}}))}}Pn.PlatformModule=ji,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Pn,e),n(Mn,e)}(An);var ki={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getMe=e.getBaseMe=e.environmentUnsupportedMessage=void 0;const t=J(),n=un,i=ie(),r=rn;function o(e,t,n){return{...{isView:"view"===e,isWindow:"window"===e,isFrame:"iframe"===e,isExternal:"external connection"===e},uuid:t,name:n,entityType:e}}e.environmentUnsupportedMessage="You are not running in OpenFin.",e.getBaseMe=o,e.getMe=function(s){const{uuid:a,name:c,entityType:d}=s.me,h={setContext(){throw new Error(e.environmentUnsupportedMessage)},addContextHandler(){throw new Error(e.environmentUnsupportedMessage)},getContextGroups(){throw new Error(e.environmentUnsupportedMessage)},joinContextGroup(){throw new Error(e.environmentUnsupportedMessage)},removeFromContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getAllClientsInContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getInfoForContextGroup(){throw new Error(e.environmentUnsupportedMessage)}},l="Interop API has not been instantiated. Either connection has failed or you have not declared interop in your config.",u={setContext(){throw new Error(l)},addContextHandler(){throw new Error(l)},getContextGroups(){throw new Error(l)},joinContextGroup(){throw new Error(l)},removeFromContextGroup(){throw new Error(l)},getAllClientsInContextGroup(){throw new Error(l)},getInfoForContextGroup(){throw new Error(l)}},p={eventNames:()=>{throw new Error(e.environmentUnsupportedMessage)},emit:()=>{throw new Error(e.environmentUnsupportedMessage)},listeners:()=>{throw new Error(e.environmentUnsupportedMessage)},listenerCount:()=>{throw new Error(e.environmentUnsupportedMessage)},on:()=>{throw new Error(e.environmentUnsupportedMessage)},addListener:()=>{throw new Error(e.environmentUnsupportedMessage)},once:()=>{throw new Error(e.environmentUnsupportedMessage)},prependListener:()=>{throw new Error(e.environmentUnsupportedMessage)},prependOnceListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeAllListeners:()=>{throw new Error(e.environmentUnsupportedMessage)}};switch(d){case"view":return Object.assign(new t.View(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case"window":return Object.assign(new i._Window(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case"iframe":return Object.assign(new n._Frame(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case"external connection":return Object.assign(new r.ExternalApplication(s,{uuid:a}),o(d,a,c),{interop:u,isOpenFin:!1});default:return{...o(d,a,c),...p,interop:h,isOpenFin:!1}}}}(ki);var Li={},Ti={},$i={};Object.defineProperty($i,"__esModule",{value:!0}),$i.createWarningObject=$i.createUnusableObject=void 0,$i.createUnusableObject=function(e){const t=()=>{throw new Error(e)};return new Proxy({},{apply:t,construct:t,defineProperty:t,deleteProperty:t,get:t,getOwnPropertyDescriptor:t,getPrototypeOf:t,has:t,isExtensible:t,ownKeys:t,preventExtensions:t,set:t,setPrototypeOf:t})},$i.createWarningObject=function(e,t){return new Proxy(t,{get:(...t)=>(console.warn(e),Reflect.get(...t)),set:(...t)=>(console.warn(e),Reflect.set(...t)),getOwnPropertyDescriptor:(...t)=>(console.warn(e),Reflect.getOwnPropertyDescriptor(...t)),ownKeys:(...t)=>(console.warn(e),Reflect.ownKeys(...t))})};var Bi,Gi={},Wi={};var Hi={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.wrapIntentHandler=e.BROKER_ERRORS=e.generateOverrideWarning=e.generateOverrideError=e.wrapContextHandler=e.wrapInTryCatch=e.generateId=void 0;e.generateId=()=>`${Math.random()}${Date.now()}`;e.wrapInTryCatch=(e,t)=>(...n)=>{try{return e(...n)}catch(e){throw new Error((t||"")+e)}};e.wrapContextHandler=(e,t)=>async n=>{try{await e(n)}catch(e){throw console.error(`Error thrown by handler ${t} for context type ${n.type}: ${e}`),e}};e.generateOverrideError=(e,t)=>`You have tried to to use ${e} but ${t} has not been overridden in the Interop Broker. Please override this function. Refer to our documentation for more info.`;e.generateOverrideWarning=(e,t,n,i)=>{const{uuid:r,name:o}=n;return i?`Entity with identity: ${r}/${o} has called ${i} or ${e} but ${t} has not been overridden.`:`Entity with identity: ${r}/${o} has called ${e} but ${t} has not been overridden.`},e.BROKER_ERRORS={fireIntent:(0,e.generateOverrideError)("fireIntent","handleFiredIntent"),fireIntentForContext:(0,e.generateOverrideError)("fireIntentForContext","handleFiredIntentForContext"),getInfoForIntent:(0,e.generateOverrideError)("getInfoForIntent","handleInfoForIntent"),getInfoForIntentsByContext:(0,e.generateOverrideError)("getInfoForIntentsByContext","handleInfoForIntentsByContext"),joinSessionContextGroupWithJoinContextGroup:"The Context Group you have tried to join is a Session Context Group. Custom Context Groups can only be defined by the Interop Broker through code or manifest configuration. Please use joinSessionContextGroup.",fdc3Open:(0,e.generateOverrideError)("fdc3.open","fdc3HandleOpen"),fdc3FindInstances:(0,e.generateOverrideError)("fdc3.findInstances","fdc3HandleFindInstances"),fdc3GetAppMetadata:(0,e.generateOverrideError)("fdc3.getAppMetadata","fdc3HandleGetAppMetadata"),fdc3GetInfo:(0,e.generateOverrideError)("fdc3.getInfo","fdc3HandleGetInfo")};e.wrapIntentHandler=(e,t)=>async n=>{try{return e(n)}catch(e){throw console.error(`Error thrown by handler ${t}: ${e}`),e}}}(Hi);var Ni,Di,Ui={};function Vi(){if(Di)return Gi;Di=1;var e,t,n,r=s&&s.__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},o=s&&s.__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)},a=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Gi,"__esModule",{value:!0}),Gi.InteropBroker=void 0;const c=d,h=a(function(){if(Bi)return Wi;Bi=1,Object.defineProperty(Wi,"__esModule",{value:!0});const e=Cr();return Wi.default=class{constructor(e,t){this.provider=e,this.id=t,this.lastContext=void 0,this.contextGroupMap=new Map,this.clients=new Map,this.registerListeners()}registerListeners(){this.provider.register(`sessionContextGroup:getContext-${this.id}`,this.getCurrentContext.bind(this)),this.provider.register(`sessionContextGroup:setContext-${this.id}`,this.setContext.bind(this)),this.provider.register(`sessionContextGroup:handlerAdded-${this.id}`,this.handlerAdded.bind(this)),this.provider.register(`sessionContextGroup:handlerRemoved-${this.id}`,this.handlerRemoved.bind(this))}getCurrentContext(e){return e.type?this.contextGroupMap.get(e.type):this.lastContext}setContext(t,n){const{context:i}=t,r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name} not in Session Client State Map`);this.contextGroupMap.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{e.contextHandlers.get(i.type)?.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getClientState(e){return this.clients.get(e.endpointId)}async handlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(i){const e=r.contextHandlers.get(i)||[];r.contextHandlers.set(i,[...e,n]);const o=this.contextGroupMap.get(i);o&&await this.provider.dispatch(t,n,o)}else{r.globalHandler=n;const e=[...this.contextGroupMap.keys()].map((async e=>{const i=this.contextGroupMap.get(e);i&&await this.provider.dispatch(t,n,i)}));await Promise.all(e)}}handlerRemoved(e,t){const{handlerId:n}=e,i=this.clients.get(t.endpointId);i?(Array.from(i.contextHandlers).forEach((([,e])=>{const t=e.indexOf(n);t>-1&&e.splice(t,1)})),i.globalHandler===n&&(i.globalHandler=void 0)):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={contextHandlers:new Map,clientIdentity:e,globalHandler:void 0};this.clients.set(e.endpointId,t)}}onDisconnection(e){this.clients.delete(e.endpointId)}},Wi}()),l=Hi,u=a(i),p=function(){if(Ni)return Ui;Ni=1,Object.defineProperty(Ui,"__esModule",{value:!0}),Ui.PrivateChannelProvider=void 0;const e=Vi();return Ui.PrivateChannelProvider=class t{constructor(e,t){this.provider=e,this.id=t,this.clients=new Map,this.registerListeners(),this.contextByContextType=new Map,this.lastContext=void 0,this.provider.onConnection((e=>this.registerNewClient(e))),this.provider.onDisconnection((async e=>{const{endpointId:t}=e;this.clients.has(t)&&await this.handleClientDisconnecting(e),0===(await this.provider.getAllClientInfo()).length&&this.provider.destroy()}))}getClientState(e){return this.clients.get(e.endpointId)}registerListeners(){this.provider.register("broadcast",this.broadcast.bind(this)),this.provider.register("getCurrentContext",this.getCurrentContext.bind(this)),this.provider.register("contextHandlerAdded",this.contextHandlerAdded.bind(this)),this.provider.register("contextHandlerRemoved",this.contextHandlerRemoved.bind(this)),this.provider.register("nonStandardHandlerRemoved",this.nonStandardHandlerRemoved.bind(this)),this.provider.register("onAddContextHandlerAdded",this.onAddContextHandlerAdded.bind(this)),this.provider.register("onDisconnectHandlerAdded",this.onDisconnectHandlerAdded.bind(this)),this.provider.register("onUnsubscribeHandlerAdded",this.onUnsubscribeHandlerAdded.bind(this)),this.provider.register("clientDisconnecting",((e,t)=>{this.handleClientDisconnecting(t)}))}broadcast(t,n){const{context:i}=t;if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name}, tried to call broadcast, is not connected to this Private Channel`);const r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to broadcast - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);this.contextByContextType.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{const t=e.handlerIdsByContextTypes.get(i.type);t&&t.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getCurrentContext(e,t){const{contextType:n}=e;if(!this.getClientState(t))throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call getCurrentContext, is not connected to this Private Channel`);if(void 0!==n){return this.contextByContextType.get(n)||null}return this.lastContext?this.lastContext:null}contextHandlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call addContextListener, is not connected to this Private Channel`);if(i){const e=r.handlerIdsByContextTypes.get(i)||[];r.handlerIdsByContextTypes.set(i,[...e,n])}else r.globalHandler=n;Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&e.onAddContextListenerHandlerId&&this.provider.dispatch(e.clientIdentity,e.onAddContextListenerHandlerId,i)}))}async contextHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);if(i){let e;if(i.globalHandler===n)i.globalHandler=void 0;else for(const[t,r]of i.handlerIdsByContextTypes){const i=r.indexOf(n);i>-1&&(r.splice(i,1),e=t)}const r=(await this.getConnectedClients()).map((async n=>{const{clientIdentity:i,clientIdentity:{endpointId:r},onUnsubscribeHandlerId:o}=n;r!==t.endpointId&&o&&await this.provider.dispatch(i,o,e)}));try{await Promise.all(r)}catch(e){throw console.error(`Problem when attempting to dispatch to onUnsubscribeHandlers. Error: ${e} Removing Client: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}`),new Error(e)}}else console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}.`)}nonStandardHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);i?i.onDisconnectHandlerId===n?i.onDisconnectHandlerId=void 0:i.onAddContextListenerHandlerId===n?i.onAddContextListenerHandlerId=void 0:i.onUnsubscribeHandlerId===n&&(i.onUnsubscribeHandlerId=void 0):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}onAddContextHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onAddContextListener, is not connected to this Private Channel`);n.onAddContextListenerHandlerId=i,Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&Array.from(e.handlerIdsByContextTypes.keys()).forEach((e=>{this.provider.dispatch(t,i,e)}))}))}onDisconnectHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onDisconnect, is not connected to this Private Channel`);n.onDisconnectHandlerId=i}onUnsubscribeHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onUnsubscribe, is not connected to this Private Channel`);n.onUnsubscribeHandlerId=i}removeClient(e){const t=this.getClientState(e);if(!t)throw new Error(`Client with Identity: ${e.uuid} ${e.name}, tried to call disconnect, is not connected to this Private Channel`);t.handlerIdsByContextTypes.clear(),this.clients.delete(e.endpointId)}async fireOnDisconnectForOtherClients(e){const{endpointId:t}=e,n=(await this.getConnectedClients()).map((async e=>{const{clientIdentity:{endpointId:n},onDisconnectHandlerId:i}=e;n!==t&&i&&await this.provider.dispatch(e.clientIdentity,i)}));try{await Promise.all(n)}catch(t){throw console.error(`Problem when attempting to dispatch to onDisconnectHandlers. Error: ${t} Disconnecting Client: uuid: ${e.uuid}. name: ${e.name}. endpointId: ${e.endpointId}`),new Error(t)}}async unsubscribeAll(e){const{endpointId:t}=e,n=this.clients.get(t);if(n){const t=Array.from(n.handlerIdsByContextTypes.values()).flat(),i=n.globalHandler;if(t.length>0){const n=t.map((async t=>this.contextHandlerRemoved({handlerId:t},e)));try{await Promise.all(n)}catch(e){console.error(e.message)}}if(i)try{await this.contextHandlerRemoved({handlerId:i},e)}catch(e){console.error(e.message)}}}async handleClientDisconnecting(e){await this.unsubscribeAll(e),this.removeClient(e),await this.fireOnDisconnectForOtherClients(e)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={clientIdentity:e,handlerIdsByContextTypes:new Map,globalHandler:void 0,onAddContextListenerHandlerId:void 0,onUnsubscribeHandlerId:void 0,onDisconnectHandlerId:void 0};this.clients.set(e.endpointId,t)}}async getConnectedClients(){const e=await this.provider.getAllClientInfo();return Array.from(this.clients.values()).filter((t=>{const{uuid:n,name:i}=t.clientIdentity;return e.some((e=>i===e.name&&n===e.uuid))}))}static init(e,n){return new t(e,n)}},Ui}(),w=G,y=[{id:"green",displayMetadata:{color:"#00CC88",name:"green"}},{id:"purple",displayMetadata:{color:"#8C61FF",name:"purple"}},{id:"orange",displayMetadata:{color:"#FF8C4C",name:"orange"}},{id:"red",displayMetadata:{color:"#FF5E60",name:"red"}},{id:"pink",displayMetadata:{color:"#FF8FB8",name:"pink"}},{id:"yellow",displayMetadata:{color:"#E9FF8F",name:"yellow"}}];let f=class i extends c.Base{constructor(i,s,a){super(i),e.set(this,void 0),t.set(this,void 0),n.set(this,void 0),this.getProvider=()=>o(this,n,"f").getValue(),this.interopClients=new Map,this.contextGroupsById=new Map,r(this,t,a.contextGroups??[...y],"f"),r(this,e,a.fdc3Info,"f"),a?.logging&&(this.logging=a.logging),this.intentClientMap=new Map,this.lastContextMap=new Map,this.sessionContextGroupMap=new Map,r(this,n,new w.Lazy(s),"f"),this.setContextGroupMap(),this.setupChannelProvider()}static createClosedConstructor(...e){return class extends i{constructor(...t){if(t.length){const[n,i,r]=t;if(r&&"object"==typeof r&&!(0,u.default)(r,e[2]))return console.warn("You have modified the parameters of the InteropOverride constructor. This behavior is deprecated and will be removed in a future version. You can modify these options in your manifest. Please consult our Interop docs for guidance on migrating to the new override scheme."),void super(e[0],e[1],r);console.warn("You are attempting to pass arguments to the InteropOverride constructor. This is not necessary, and these passed arguments will be ignored. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.")}super(...e)}}}setContext({context:e},t){this.wire.sendAction("interop-broker-set-context").catch((e=>{}));const n=this.getClientState(t);if(!n||!n.contextGroupId)throw n?new Error("You must join a context group before you can set context."):new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);{const{contextGroupId:t}=n;this.setContextForGroup({context:e},t)}}setContextForGroup({context:e},t){this.wire.sendAction("interop-broker-set-context-for-group").catch((e=>{}));const n=this.contextGroupsById.get(t);if(!n)throw new Error(`Unable to set context for context group that isn't in the context group mapping: ${t}.`);const r=i.checkContextIntegrity(e);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(e)}`);const o=e.type;n.set(o,e),this.lastContextMap.set(t,o);Array.from(this.interopClients.values()).filter((e=>e.contextGroupId===t)).forEach((t=>{for(const[,n]of t.contextHandlers)i.isContextTypeCompatible(o,n.contextType)&&this.invokeContextHandler(t.clientIdentity,n.handlerId,e)}))}getCurrentContext(e,t){this.wire.sendAction("interop-broker-get-current-context").catch((e=>{}));const n=this.getClientState(t);if(!n?.contextGroupId)throw new Error("You must be a member of a context group to call getCurrentContext");const{contextGroupId:i}=n,r=this.contextGroupsById.get(i),o=this.lastContextMap.get(i),s=e?.contextType??o;return r&&s?r.get(s):void 0}async joinContextGroup({contextGroupId:e,target:t},n){if(this.wire.sendAction("interop-broker-join-context-group").catch((e=>{})),this.sessionContextGroupMap.has(e))throw new Error(l.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup);if(t){i.hasEndpointId(t)&&await this.addClientToContextGroup({contextGroupId:e},t);try{const n=this.channel.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name));if(!n.length)throw new Error(`Given Identity ${t.uuid} ${t.name} is not connected to the Interop Broker.`);n.length>1&&console.warn(`More than one connection found for identity ${t.uuid} ${t.name}`);const i=[];for(const t of n)i.push(this.addClientToContextGroup({contextGroupId:e},t));await Promise.all(i)}catch(e){throw new Error(e)}}else await this.addClientToContextGroup({contextGroupId:e},n)}async addClientToContextGroup({contextGroupId:e},t){this.wire.sendAction("interop-broker-add-client-to-context-group").catch((e=>{}));const n=this.getClientState(t);if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(!this.getContextGroups().find((t=>t.id===e)))throw new Error(`Attempting to join a context group that does not exist: ${e}. You may only join existing context groups.`);if(n.contextGroupId!==e){n.contextGroupId=e,await this.setCurrentContextGroupInClientOptions(t,e);const i=this.contextGroupsById.get(e);for(const[,e]of n.contextHandlers){const{contextType:n,handlerId:r}=e;if(void 0===n)i.forEach(((e,n)=>{this.invokeContextHandler(t,r,e)}));else if(i.has(n)){const e=i.get(n);e&&this.invokeContextHandler(t,r,e)}}}}async removeFromContextGroup({target:e},t){if(this.wire.sendAction("interop-broker-remove-from-context-group").catch((e=>{})),e){i.hasEndpointId(e)&&await this.removeClientFromContextGroup(e);try{const t=this.channel.connections.filter((t=>t.uuid===e.uuid&&t.name===e.name));if(!t.length)throw new Error(`No connection found for given Identity ${e.uuid} ${e.name}`);t.length>1&&console.warn(`More than one connection found for identity ${e.uuid} ${e.name}`);const n=[];for(const e of t)n.push(this.removeClientFromContextGroup(e));await Promise.all(n)}catch(e){throw new Error(e)}}else await this.removeClientFromContextGroup(t)}async removeClientFromContextGroup(e){this.wire.sendAction("interop-broker-remove-client-from-context-group").catch((e=>{}));const t=this.getClientState(e);t&&(t.contextGroupId=void 0),await this.setCurrentContextGroupInClientOptions(e,null)}getContextGroups(){return this.wire.sendAction("interop-broker-get-context-groups").catch((e=>{})),o(this,t,"f").map((e=>({...e})))}getInfoForContextGroup({contextGroupId:e}){return this.wire.sendAction("interop-broker-get-info-for-context-group").catch((e=>{})),this.getContextGroups().find((t=>t.id===e))}getAllClientsInContextGroup({contextGroupId:e}){this.wire.sendAction("interop-broker-get-all-clients-in-context-group").catch((e=>{}));return Array.from(this.interopClients.values()).filter((t=>t.contextGroupId===e)).map((e=>e.clientIdentity))}async handleFiredIntent(e,t){const n=(0,l.generateOverrideWarning)("fdc3.raiseIntent","InteropBroker.handleFiredIntent",t,"interopClient.fireIntent");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntent)}async setIntentTarget(e,t){this.wire.sendAction("interop-broker-set-intent-target").catch((e=>{}));const n=this.intentClientMap.get(t.name),i=`intent-handler-${e.name}`;if(n){const t=n.get(i);if(t){if(t.pendingIntents.push(e),t.clientIdentity&&t.isReady){const{clientIdentity:e,pendingIntents:n}=t;try{const r=n[n.length-1];await this.invokeIntentHandler(e,i,r),t.pendingIntents=[]}catch(n){console.error(`Error invoking intent handler for client ${e.uuid}/${e.name}/${e.endpointId}`),t.isReady=!1}}}else n.set(i,{isReady:!1,pendingIntents:[e]})}else{this.intentClientMap.set(t.name,new Map);const n=this.intentClientMap.get(t.name);n&&n.set(i,{isReady:!1,pendingIntents:[e]})}}async handleInfoForIntent(e,t){const n=(0,l.generateOverrideWarning)("fdc3.findIntent","InteropBroker.handleInfoForIntent",t,"interopClient.getInfoForIntent");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntent)}async handleInfoForIntentsByContext(e,t){const n=(0,l.generateOverrideWarning)("fdc3.findIntentsByContext","InteropBroker.handleInfoForIntentsByContext",t,"interopClient.getInfoForIntentsByContext");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntentsByContext)}async handleFiredIntentForContext(e,t){const n=(0,l.generateOverrideWarning)("fdc3.raiseIntentForContext","InteropBroker.handleFiredIntentForContext",t,"interopClient.fireIntentForContext");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntentForContext)}async clientDisconnected(e){}async fdc3HandleOpen({app:e,context:t},n){const i=(0,l.generateOverrideWarning)("fdc3.open","InteropBroker.fdc3HandleOpen",n);throw console.warn(i),new Error(l.BROKER_ERRORS.fdc3Open)}async fdc3HandleFindInstances(e,t){const n=(0,l.generateOverrideWarning)("fdc3.open","InteropBroker.fdc3HandleFindInstances",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3FindInstances)}async fdc3HandleGetAppMetadata(e,t){const n=(0,l.generateOverrideWarning)("fdc3.getAppMetadata","InteropBroker.fdc3HandleGetAppMetadata",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3GetAppMetadata)}async invokeContextHandler(e,t,n){const i=await this.getProvider();try{await i.dispatch(e,t,n)}catch(i){console.error(`Error invoking context handler ${t} for context type ${n.type} in client ${e.uuid}/${e.name}/${e.endpointId}`,i)}}async invokeIntentHandler(e,t,n){const i=await this.getProvider();await i.dispatch(e,t,n)}async fdc3HandleGetInfo(t,n){const{fdc3Version:i}=t;return{fdc3Version:i,...o(this,e,"f"),optionalFeatures:{OriginatingAppMetadata:!1,UserChannelMembershipAPIs:!0},appMetadata:{appId:"",instanceId:""}}}async getAllClientInfo(){return(await this.getProvider()).getAllClientInfo()}decorateSnapshot(e){return{...e,interopSnapshotDetails:{contextGroupStates:this.getContextGroupStates()}}}applySnapshot(e,t){const n=e?.interopSnapshotDetails?.contextGroupStates;n&&(t?.closeExistingWindows||this.updateExistingClients(n),this.rehydrateContextGroupStates(n))}updateExistingClients(e){this.interopClients.forEach((t=>{const{clientIdentity:n,contextGroupId:r,contextHandlers:o}=t;if(r){const t=e[r];for(const[,e]of Object.entries(t))o.forEach((t=>{const{handlerId:r,contextType:o}=t;i.isContextTypeCompatible(e.type,o)&&this.invokeContextHandler(n,r,e)}))}}))}getContextGroupStates(){return i.toObject(this.contextGroupsById)}rehydrateContextGroupStates(e){const t=Object.entries(e);for(const[e,n]of t){const t=Object.entries(n);for(const[n,i]of t)if(this.contextGroupsById.has(e)){this.contextGroupsById.get(e).set(n,i)}else console.warn(`Attempting to set a context group that isn't in the context group mapping. Skipping context group rehydration for: ${e}`)}}contextHandlerRegistered({contextType:e,handlerId:t},n){const i={contextType:e,handlerId:t},r=this.getClientState(n);if(r?.contextHandlers.set(t,i),r&&r.contextGroupId){const{contextGroupId:i}=r,o=this.contextGroupsById.get(i);if(void 0===e)o.forEach(((e,i)=>{this.invokeContextHandler(n,t,e)}));else if(o.has(e)){const i=o.get(e);i&&this.invokeContextHandler(n,t,i)}}}async intentHandlerRegistered(e,t){const{handlerId:n}=e,i=this.intentClientMap.get(t.name),r=i?.get(n);if(i)if(r){const{pendingIntents:e}=r;r.clientIdentity=t,r.isReady=!0;try{if(e.length>0){const i=e[e.length-1];await this.invokeIntentHandler(t,n,i),r.pendingIntents=[]}}catch(e){console.error(`Error invoking intent handler: ${n} for client ${t.uuid}/${t.name}/${t.endpointId}`)}}else i.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t});else{this.intentClientMap.set(t.name,new Map);const e=this.intentClientMap.get(t.name);e&&e.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t})}}removeContextHandler({handlerId:e},t){const n=this.getClientState(t);n&&n.contextHandlers.delete(e)}handleJoinSessionContextGroup({sessionContextGroupId:e},t){try{if(!e)throw new Error("Failed to join session context group: must specify group id.");const n=this.sessionContextGroupMap.get(e);if(n)n.registerNewClient(t);else{const n=new h.default(this.channel,e);n.registerNewClient(t),this.sessionContextGroupMap.set(e,n)}return{hasConflict:this.contextGroupsById.has(e)}}catch(e){throw new Error(e)}}getClientState(e){return this.interopClients.get(e.endpointId)}static toObject(e){const t=Object.fromEntries(e),n={};return Object.entries(t).forEach((([e,t])=>{const i=Object.fromEntries(t);n[e]=i})),n}static checkContextIntegrity(e){if(!e)return{isValid:!1,reason:"No context supplied"};if("object"!=typeof e)return{isValid:!1,reason:"Context must be an Object"};if(!e.type)return{isValid:!1,reason:"Context must have a type property"};if(e.id&&"object"!=typeof e.id)return{isValid:!1,reason:"Context id must be an Object populated with key-value identifiers (if set)"};if(e.id){const{id:t}=e,n=Object.keys(t);let i=!1;if(!n.length)return{isValid:!1,reason:"Context id must have at least one key-value identifier"};if(n.forEach((e=>{"string"==typeof e&&"string"==typeof t[e]||(i=!0)})),i)return{isValid:!1,reason:"Context id key-value identifiers must be of type string"}}return e.name&&"string"!=typeof e.name?{isValid:!1,reason:"Context name must be of string type (if set)"}:{isValid:!0}}static hasEndpointId(e){return void 0!==e.endpointId}static isContextTypeCompatible(e,t){return void 0===t||e===t}setContextGroupMap(){for(const e of this.getContextGroups())this.contextGroupsById.set(e.id,new Map)}async setCurrentContextGroupInClientOptions(e,t){try{const n=await this.fin.System.getEntityInfo(e.uuid,e.name);let i;"view"===n.entityType?i=await this.fin.View.wrap(e):"window"===n.entityType&&(i=await this.fin.Window.wrap(e)),i&&await i.updateOptions({interop:{currentContextGroup:t}})}catch(e){}}async setupChannelProvider(){try{const e=await this.getProvider();this.channel=e,this.wireChannel(e)}catch(e){throw new Error(`Error setting up Interop Broker Channel Provider: ${e}`)}}wireChannel(e){e.onConnection((async(e,t)=>{if(!await this.isConnectionAuthorized(e,t))throw new Error(`Connection not authorized for ${e.uuid}, ${e.name}`);if(!e.endpointId)throw new Error("Version too old to be compatible with Interop. Please upgrade your runtime to a more recent version.");const n={contextGroupId:void 0,contextHandlers:new Map,clientIdentity:e};t?.currentContextGroup&&this.contextGroupsById.has(t.currentContextGroup)&&(n.contextGroupId=t?.currentContextGroup),this.interopClients.set(e.endpointId,n)})),e.onDisconnection((e=>{this.interopClients.delete(e.endpointId);const t=this.intentClientMap.get(e.name);t&&e.uuid===this.fin.me.uuid&&t.forEach((e=>{e.isReady=!1})),this.sessionContextGroupMap.forEach((t=>{t.onDisconnection(e)})),this.clientDisconnected(e)})),e.beforeAction((async(e,t,n)=>{if(!await this.isActionAuthorized(e,t,n))throw new Error(`Action (${e}) not authorized for ${n.uuid}, ${n.name}`);this.logging?.beforeAction?.enabled&&console.log(e,t,n)})),e.afterAction(((e,t,n)=>{this.logging?.afterAction?.enabled&&console.log(e,t,n)})),e.register("setContext",this.setContext.bind(this)),e.register("fireIntent",this.handleFiredIntent.bind(this)),e.register("getCurrentContext",this.getCurrentContext.bind(this)),e.register("getInfoForIntent",this.handleInfoForIntent.bind(this)),e.register("getInfoForIntentsByContext",this.handleInfoForIntentsByContext.bind(this)),e.register("fireIntentForContext",this.handleFiredIntentForContext.bind(this)),e.register("getContextGroups",this.getContextGroups.bind(this)),e.register("joinContextGroup",this.joinContextGroup.bind(this)),e.register("removeFromContextGroup",this.removeFromContextGroup.bind(this)),e.register("getAllClientsInContextGroup",this.getAllClientsInContextGroup.bind(this)),e.register("getInfoForContextGroup",this.getInfoForContextGroup.bind(this)),e.register("contextHandlerRegistered",this.contextHandlerRegistered.bind(this)),e.register("intentHandlerRegistered",this.intentHandlerRegistered.bind(this)),e.register("removeContextHandler",this.removeContextHandler.bind(this)),e.register("sessionContextGroup:createIfNeeded",this.handleJoinSessionContextGroup.bind(this)),e.register("fdc3Open",this.fdc3HandleOpen.bind(this)),e.register("fdc3v2FindIntentsByContext",this.handleInfoForIntentsByContext.bind(this)),e.register("fdc3FindInstances",this.fdc3HandleFindInstances.bind(this)),e.register("fdc3GetAppMetadata",this.fdc3HandleGetAppMetadata.bind(this)),e.register("fdc3v2GetInfo",(async(e,t)=>this.fdc3HandleGetInfo.bind(this)(e,t))),e.register("createPrivateChannelProvider",(async e=>{const{channelId:t}=e,n=await this.fin.InterApplicationBus.Channel.create(t);p.PrivateChannelProvider.init(n,t)}))}isConnectionAuthorized(e,t){return this.wire.sendAction("interop-broker-is-connection-authorized").catch((e=>{})),Promise.resolve(!0)}isActionAuthorized(e,t,n){return this.wire.sendAction("interop-broker-is-action-authorized").catch((e=>{})),Promise.resolve(!0)}};return Gi.InteropBroker=f,e=new WeakMap,t=new WeakMap,n=new WeakMap,Gi}var zi,Ki={},qi={},Ji=s&&s.__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},Yi=s&&s.__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)};Object.defineProperty(qi,"__esModule",{value:!0});const Zi=d,Qi=Hi;class Xi extends Zi.Base{constructor(e,t,n){super(e),zi.set(this,void 0),this.id=n,Ji(this,zi,t,"f")}async setContext(e){this.wire.sendAction("interop-session-context-group-set-context").catch((e=>{}));return(await Yi(this,zi,"f")).dispatch(`sessionContextGroup:setContext-${this.id}`,{sessionContextGroupId:this.id,context:e})}async getCurrentContext(e){this.wire.sendAction("interop-session-context-group-get-context").catch((e=>{}));return(await Yi(this,zi,"f")).dispatch(`sessionContextGroup:getContext-${this.id}`,{sessionContextGroupId:this.id,type:e})}async addContextHandler(e,t){if(this.wire.sendAction("interop-session-context-group-add-handler").catch((e=>{})),"function"!=typeof e)throw new Error("Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");const n=await Yi(this,zi,"f");let i;return i=t?`sessionContextHandler:invoke-${this.id}-${t}-${(0,Qi.generateId)()}`:`sessionContextHandler:invoke-${this.id}`,n.register(i,(0,Qi.wrapContextHandler)(e,i)),await n.dispatch(`sessionContextGroup:handlerAdded-${this.id}`,{handlerId:i,contextType:t}),{unsubscribe:await this.createUnsubscribeCb(i)}}async createUnsubscribeCb(e){const t=await Yi(this,zi,"f");return async()=>{t.remove(e),await t.dispatch(`sessionContextGroup:handlerRemoved-${this.id}`,{handlerId:e})}}getUserInstance(){return{id:this.id,setContext:(0,Qi.wrapInTryCatch)(this.setContext.bind(this),"Failed to set context: "),getCurrentContext:(0,Qi.wrapInTryCatch)(this.getCurrentContext.bind(this),"Failed to get context: "),addContextHandler:(0,Qi.wrapInTryCatch)(this.addContextHandler.bind(this),"Failed to add context handler: ")}}}qi.default=Xi,zi=new WeakMap;var er={},tr={},nr={},ir={},rr=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),or=s&&s.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),sr=s&&s.__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)&&rr(t,e,n);return or(t,e),t};Object.defineProperty(ir,"__esModule",{value:!0}),ir.PrivateChannelClient=void 0;const ar=sr(Hi);var cr,dr;function hr(){if(cr)return tr;cr=1;var e,t=s&&s.__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)},n=s&&s.__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},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(tr,"__esModule",{value:!0}),tr.FDC3ModuleBase=void 0;const o=nr,a=Hi,c=wr(),d=r(i);return tr.FDC3ModuleBase=class{get client(){return t(this,e,"f").call(this)}get fin(){return this.wire.getFin()}constructor(t,i){this.wire=i,e.set(this,void 0),n(this,e,t,"f")}async broadcast(e){return this.wire.sendAction("fdc3-broadcast").catch((e=>{})),this.client.setContext(e)}async _open(e,t){this.wire.sendAction("fdc3-open").catch((e=>{}));try{return await c.InteropClient.ferryFdc3Call(this.client,"fdc3Open",{app:e,context:t})}catch(e){const t=e.message===a.BROKER_ERRORS.fdc3Open?"ResolverUnavailable":e.message;throw new Error(t)}}async _getChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:"system",...(0,o.getUnsupportedChannelApis)()})))}async getOrCreateChannel(e){this.wire.sendAction("fdc3-get-or-create-channel").catch((e=>{}));const t=(await this._getChannels()).find((t=>t.id===e));if(t)return{...t,type:"system",...(0,o.getUnsupportedChannelApis)()};try{const t=await this.client.joinSessionContextGroup(e);return(0,o.buildAppChannelObject)(t)}catch(e){throw console.error(e.message),new Error(o.ChannelError.CreationFailed)}}async getSystemChannels(){return this.wire.sendAction("fdc3-get-system-channels").catch((e=>{})),this._getChannels()}async joinChannel(e){this.wire.sendAction("fdc3-join-channel").catch((e=>{}));try{return await this.client.joinContextGroup(e)}catch(e){if(e.message===a.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup?console.error("The Channel you have tried to join is an App Channel. Custom Channels can only be defined by the Interop Broker through code or manifest configuration. Please use getOrCreateChannel."):console.error(e.message),e.message.startsWith("Attempting to join a context group that does not exist"))throw new Error(o.ChannelError.NoChannelFound);throw new Error(o.ChannelError.AccessDenied)}}async getCurrentChannel(){this.wire.sendAction("fdc3-get-current-channel").catch((e=>{}));const e=await this.getCurrentContextGroupInfo();return e?this.buildChannelObject(e):null}async leaveCurrentChannel(){return this.wire.sendAction("fdc3-leave-current-channel").catch((e=>{})),this.client.removeFromContextGroup()}async getCurrentContextGroupInfo(){const e=await this.client.getContextGroups(),t=e.map((async e=>this.client.getAllClientsInContextGroup(e.id))),n=(await Promise.all(t)).findIndex((e=>e.some((e=>{const{uuid:t,name:n}=e;return this.wire.me.uuid===t&&this.wire.me.name===n}))));return e[n]}async buildChannelObject(e){return{...e,type:"system",addContextListener:(...[e,t])=>{let n,i;"function"==typeof e?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),n=e):(n=t,"string"==typeof e&&(i=e));const r=(async()=>{let e=!0;const t=await this.client.getCurrentContext(i);return this.client.addContextHandler(((i,r)=>{if(!e||(e=!1,!(0,d.default)(t,i)))return n(i,r)}),i)})();return{...r,unsubscribe:()=>r.then((e=>e.unsubscribe()))}},broadcast:this.broadcast.bind(this),getCurrentContext:async e=>{const t=await this.client.getCurrentContext(e);return void 0===t?null:t}}}},e=new WeakMap,tr}ir.PrivateChannelClient=class{constructor(e,t){this.id=t,this.client=e,this.listeners=new Map}async broadcast(e){return this.client.dispatch("broadcast",{context:e})}async getCurrentContext(e){return this.client.dispatch("getCurrentContext",{contextType:e})}async addContextListener(e,t){if("function"!=typeof t)throw new Error("Non-function argument passed to the second parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");let n;n=e?`contextHandler:invoke-${this.id}-${e}-${ar.generateId()}`:`contextHandler:invoke-${this.id}-${ar.generateId()}`,this.client.register(n,ar.wrapContextHandler(t,n));const i={unsubscribe:await this.createContextUnsubscribeCb(n)};return this.listeners.set(n,i),await this.client.dispatch("contextHandlerAdded",{handlerId:n,contextType:e}),i}createNonStandardUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch("nonStandardHandlerRemoved",{handlerId:e})}}createContextUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch("contextHandlerRemoved",{handlerId:e})}}onAddContextListener(e){const t=`onContextHandlerAdded:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch("onAddContextHandlerAdded",{handlerId:t}),n}onDisconnect(e){const t=`onDisconnect:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch("onDisconnectHandlerAdded",{handlerId:t}),n}onUnsubscribe(e){const t=`onUnsubscribe:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch("onUnsubscribeHandlerAdded",{handlerId:t}),n}async cleanUpAllSubs(){Array.from(this.listeners.keys()).forEach((e=>{this.client.remove(e),this.listeners.delete(e)}))}async disconnect(){try{await this.client.dispatch("clientDisconnecting"),await this.cleanUpAllSubs(),await this.client.disconnect()}catch(e){throw new Error(e.message)}}},function(e){var t=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.getIntentResolution=e.isChannel=e.isContext=e.connectPrivateChannel=e.buildAppChannelObject=e.buildPrivateChannelObject=e.ChannelError=e.ResultError=e.UnsupportedChannelApiError=e.getUnsupportedChannelApis=void 0;const n=Hi,r=ir,o=t(i);e.getUnsupportedChannelApis=e=>({addContextListener:()=>{throw new a("Channel.addContextListener",e)},broadcast:()=>{throw new a("Channel.broadcast",e)},getCurrentContext:()=>{throw new a("Channel.getCurrentContext",e)}});class a extends Error{constructor(e,t="System"){super(e),this.message=`Calling ${e} on an instance of a ${t} Channel returned by fdc3.get${t}Channels is not supported. If you would like to use a ${t} Channel, please use fdc3.joinChannel, fdc3.addContextListener, and fdc3.broadcast instead.`}}var c,d;e.UnsupportedChannelApiError=a,function(e){e.NoResultReturned="NoResultReturned",e.IntentHandlerRejected="IntentHandlerRejected"}(c=e.ResultError||(e.ResultError={})),(d=e.ChannelError||(e.ChannelError={})).NoChannelFound="NoChannelFound",d.AccessDenied="AccessDenied",d.CreationFailed="CreationFailed";e.buildPrivateChannelObject=e=>{let t=!1;const n=()=>{if(t)throw new Error("Private Channel Client has been disconnected from the Private Channel")};return{id:e.id,type:"private",broadcast:async t=>(n(),e.broadcast(t)),getCurrentContext:async t=>(n(),e.getCurrentContext(t)),addContextListener:async(t,i)=>{n();let r=i,o=t;"function"==typeof t&&(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),r=t,o=null);return e.addContextListener(o,r)},onAddContextListener:t=>(n(),e.onAddContextListener(t)),disconnect:async()=>(n(),t=!0,e.disconnect()),onDisconnect:t=>(n(),e.onDisconnect(t)),onUnsubscribe:t=>(n(),e.onUnsubscribe(t))}};e.buildAppChannelObject=e=>({id:e.id,type:"app",broadcast:e.setContext,getCurrentContext:async t=>{const n=await e.getCurrentContext(t);return void 0===n?null:n},addContextListener:(t,n)=>{let i,r;"function"==typeof t?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),i=t):(i=n,"string"==typeof t&&(r=t));const s=(async()=>{let t=!0;const n=await e.getCurrentContext(r);return e.addContextHandler(((e,r)=>{if(!t||(t=!1,!(0,o.default)(n,e)))return i(e,r)}),r)})();return{...s,unsubscribe:()=>s.then((e=>e.unsubscribe()))}}});e.connectPrivateChannel=async t=>{try{const n=await fin.InterApplicationBus.Channel.connect(t),i=new r.PrivateChannelClient(n,t);return(0,e.buildPrivateChannelObject)(i)}catch(e){throw new Error(`Private Channel with id: ${t} doesn't exist`)}};e.isContext=e=>{if(e&&"object"==typeof e&&"type"in e){const{type:t}=e;return"string"==typeof t}return!1};e.isChannel=e=>{if(e&&"object"==typeof e&&"type"in e&&"id"in e){const{type:t,id:n}=e;return"string"==typeof t&&"string"==typeof n&&("app"===t||"private"===t)}return!1};e.getIntentResolution=async(t,i,r,o)=>{const s=(0,n.generateId)(),a=new Promise(((e,t)=>{fin.InterApplicationBus.subscribe({uuid:"*"},s,(t=>{e(t)})).catch((()=>t(new Error("getResult is not supported in this environment"))))})),d=r?{target:r,intentResolutionResultId:s}:{intentResolutionResultId:s},h=o?{name:o,context:i,metadata:d}:{...i,metadata:d},l=async()=>{let n=await a;if(!n||"object"!=typeof n)throw new Error(c.NoResultReturned);const{error:i}=n;if(i)throw new Error(c.IntentHandlerRejected);if((0,e.isChannel)(n)){const{id:i,type:r}=n;switch(r){case"private":n=await(0,e.connectPrivateChannel)(i);break;case"app":{const r=await t.joinSessionContextGroup(i);n=(0,e.buildAppChannelObject)(r);break}}}else if(!(0,e.isContext)(n))throw new Error(c.NoResultReturned);return n},u=o?await t.fireIntent(h):await t.fireIntentForContext(h);return"object"!=typeof u?{source:{appId:"",instanceId:""},intent:"",version:"2.0",getResult:l}:{...u,getResult:l}}}(nr);var lr,ur,pr={};function wr(){if(ur)return Ki;ur=1;var e,t,n=s&&s.__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},i=s&&s.__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)},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ki,"__esModule",{value:!0}),Ki.InteropClient=void 0;const o=d,a=r(qi),c=function(){if(dr)return er;dr=1,Object.defineProperty(er,"__esModule",{value:!0}),er.Fdc3Module=void 0;const e=Hi,t=hr();class n extends t.FDC3ModuleBase{async open(e,t){await super._open(e,t)}addContextListener(e,t){let n;return this.wire.sendAction("fdc3-add-context-listener").catch((e=>{})),"function"==typeof e?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),n=this.client.addContextHandler(e)):n=this.client.addContextHandler(t,null===e?void 0:e),{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}addIntentListener(e,t){this.wire.sendAction("fdc3-add-intent-listener").catch((e=>{}));const n=this.client.registerIntentHandler((e=>{const{context:n,metadata:i}=e,{metadata:r}=n,o=i?.intentResolutionResultId||r?.intentResolutionResultId;o&&this.fin.InterApplicationBus.publish(o,null).catch((()=>null)),t(e.context)}),e,{fdc3Version:"1.2"});return{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}async raiseIntent(t,n,i){this.wire.sendAction("fdc3-raise-intent").catch((e=>{}));const r=i?{name:t,context:n,metadata:{target:i}}:{name:t,context:n};try{return await this.client.fireIntent(r)}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntent?"ResolverUnavailable":t.message;throw new Error(n)}}async findIntent(t,n){this.wire.sendAction("fdc3-find-intent").catch((e=>{}));try{return await this.client.getInfoForIntent({name:t,context:n})}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntent?"ResolverUnavailable":t.message;throw new Error(n)}}async findIntentsByContext(t){this.wire.sendAction("fdc3-find-intents-by-context").catch((e=>{}));try{return await this.client.getInfoForIntentsByContext(t)}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntentsByContext?"ResolverUnavailable":t.message;throw new Error(n)}}async raiseIntentForContext(t,n){this.wire.sendAction("fdc3-raise-intent-for-context").catch((e=>{}));try{return await this.client.fireIntentForContext({...t,metadata:{target:n}})}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntentForContext?"ResolverUnavailable":t.message;throw new Error(n)}}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}getInfo(){return this.wire.sendAction("fdc3-get-info").catch((e=>{})),{providerVersion:this.wire.environment.getAdapterVersionSync(),provider:`openfin-${this.wire.me.uuid}`,fdc3Version:"1.2"}}}return er.Fdc3Module=n,er}(),h=function(){if(lr)return pr;lr=1,Object.defineProperty(pr,"__esModule",{value:!0}),pr.Fdc3Module2=void 0;const e=hr(),t=Hi,n=wr(),i=nr,r=ir;class o extends e.FDC3ModuleBase{async open(e,t){return"string"==typeof e&&console.warn("Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string })."),super._open(e,t)}async findInstances(e){this.wire.sendAction("fdc3-find-instances").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,"fdc3FindInstances",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3FindInstances?"ResolverUnavailable":e.message;throw new Error(n)}}async getAppMetadata(e){this.wire.sendAction("fdc3-get-app-metadata").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,"fdc3GetAppMetadata",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3GetAppMetadata?"ResolverUnavailable":e.message;throw new Error(n)}}async addContextListener(e,t){this.wire.sendAction("fdc3-add-context-listener").catch((e=>{}));const n=e=>t=>{const{contextMetadata:n,...i}=t,r=n?[{...i},n]:[t,null];e(...r)};let i=t,r=n(i);return"function"==typeof e?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),i=e,r=n(i),this.client.addContextHandler(r)):this.client.addContextHandler(r,null===e?void 0:e)}async findIntent(e,n,i){this.wire.sendAction("fdc3-find-intent").catch((e=>{}));try{return await this.client.getInfoForIntent({name:e,context:n,metadata:{resultType:i}})}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntent?"ResolverUnavailable":e.message;throw new Error(n)}}async findIntentsByContext(e,i){this.wire.sendAction("fdc3-find-intents-by-context").catch((e=>{}));const r=i?{context:e,metadata:{resultType:i}}:e;try{return await n.InteropClient.ferryFdc3Call(this.client,"fdc3v2FindIntentsByContext",r)}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntentsByContext?"ResolverUnavailable":e.message;throw new Error(n)}}async raiseIntent(e,n,r){this.wire.sendAction("fdc3-raise-intent").catch((e=>{}));try{return"string"==typeof r&&console.warn("Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string })."),(0,i.getIntentResolution)(this.client,n,r,e)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?"ResolverUnavailable":e.message;throw new Error(n)}}async raiseIntentForContext(e,n){this.wire.sendAction("fdc3-raise-intent-for-context").catch((e=>{}));try{return"string"==typeof n&&console.warn("Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string })."),(0,i.getIntentResolution)(this.client,e,n)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?"ResolverUnavailable":e.message;throw new Error(n)}}async addIntentListener(e,t){if(this.wire.sendAction("fdc3-add-intent-listener").catch((e=>{})),"string"!=typeof e)throw new Error("First argument must be an Intent name");return this.client.registerIntentHandler((async e=>{let n,i;const{context:r,metadata:o}=e,{contextMetadata:s,metadata:a,...c}=r,d=o?.intentResolutionResultId||a?.intentResolutionResultId;try{const e=a?{metadata:a,...c}:{...c};n=await t(e,s),i=n}catch(e){n=e,i={error:!0}}if(d&&this.fin.InterApplicationBus.publish(d,i).catch((()=>null)),n instanceof Error)throw new Error(n.message);return n}),e,{fdc3Version:"2.0"})}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}async createPrivateChannel(){const e=(0,t.generateId)();await n.InteropClient.ferryFdc3Call(this.client,"createPrivateChannelProvider",{channelId:e});const o=await this.fin.InterApplicationBus.Channel.connect(e),s=new r.PrivateChannelClient(o,e);return(0,i.buildPrivateChannelObject)(s)}async getUserChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:"user",...(0,i.getUnsupportedChannelApis)("User")})))}async getSystemChannels(){return console.warn("This API has been deprecated. Please use fdc3.getUserChannels instead."),super.getSystemChannels()}async joinUserChannel(e){return super.joinChannel(e)}async joinChannel(e){return console.warn("This API has been deprecated. Please use fdc3.joinUserChannel instead."),super.joinChannel(e)}async getCurrentChannel(){const e=await super.getCurrentChannel();return e?{...e,type:"user",broadcast:this.broadcast.bind(this)}:null}async getInfo(){return n.InteropClient.ferryFdc3Call(this.client,"fdc3v2GetInfo",{fdc3Version:"2.0"})}}return pr.Fdc3Module2=o,pr}(),l=Hi;let u=class extends o.Base{constructor(i,r){super(i),e.set(this,void 0),t.set(this,void 0),n(this,t,new Map,"f"),n(this,e,r,"f")}async setContext(t){this.wire.sendAction("interop-client-set-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("setContext",{context:t})}async addContextHandler(t,n){if(this.wire.sendAction("interop-client-add-context-handler").catch((e=>{})),"function"!=typeof t)throw new Error("Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");const r=await i(this,e,"f");let o;o=n?`invokeContextHandler-${n}-${(0,l.generateId)()}`:"invokeContextHandler";const s=(0,l.wrapContextHandler)(t,o);return r.register(o,s),await r.dispatch("contextHandlerRegistered",{handlerId:o,contextType:n}),{unsubscribe:async()=>{r.remove(o),await r.dispatch("removeContextHandler",{handlerId:o})}}}async getContextGroups(){this.wire.sendAction("interop-client-get-context-groups").catch((e=>{}));return(await i(this,e,"f")).dispatch("getContextGroups")}async joinContextGroup(t,n){this.wire.sendAction("interop-client-join-context-group").catch((e=>{}));const r=await i(this,e,"f");if(!t)throw new Error("No contextGroupId specified for joinContextGroup.");return r.dispatch("joinContextGroup",{contextGroupId:t,target:n})}async removeFromContextGroup(t){this.wire.sendAction("interop-client-remove-from-context-group").catch((e=>{}));return(await i(this,e,"f")).dispatch("removeFromContextGroup",{target:t})}async getAllClientsInContextGroup(t){this.wire.sendAction("interop-client-get-all-clients-in-context-group").catch((e=>{}));const n=await i(this,e,"f");if(!t)throw new Error("No contextGroupId specified for getAllClientsInContextGroup.");return n.dispatch("getAllClientsInContextGroup",{contextGroupId:t})}async getInfoForContextGroup(t){this.wire.sendAction("interop-client-get-info-for-context-group").catch((e=>{}));const n=await i(this,e,"f");if(!t)throw new Error("No contextGroupId specified for getInfoForContextGroup.");return n.dispatch("getInfoForContextGroup",{contextGroupId:t})}async fireIntent(t){this.wire.sendAction("interop-client-fire-intent").catch((e=>{}));return(await i(this,e,"f")).dispatch("fireIntent",t)}async registerIntentHandler(t,n,r){this.wire.sendAction("interop-client-register-intent-handler").catch((e=>{}));const o=await i(this,e,"f"),s=`intent-handler-${n}`,a=(0,l.wrapIntentHandler)(t,s);try{await o.register(s,a),await o.dispatch("intentHandlerRegistered",{handlerId:s,...r})}catch(e){throw new Error("Unable to register intent handler")}return{unsubscribe:async()=>{o.remove(s)}}}async getCurrentContext(t){this.wire.sendAction("interop-client-get-current-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("getCurrentContext",{contextType:t})}async getInfoForIntent(t){this.wire.sendAction("interop-client-get-info-for-intent").catch((e=>{}));return(await i(this,e,"f")).dispatch("getInfoForIntent",t)}async getInfoForIntentsByContext(t){this.wire.sendAction("interop-client-get-info-for-intents-by-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("getInfoForIntentsByContext",t)}async fireIntentForContext(t){this.wire.sendAction("interop-client-fire-intent-for-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("fireIntentForContext",t)}async joinSessionContextGroup(n){try{const r=i(this,t,"f").get(n);if(r)return r.getUserInstance();const o=await i(this,e,"f"),{hasConflict:s}=await o.dispatch("sessionContextGroup:createIfNeeded",{sessionContextGroupId:n});s&&console.warn(`A (non-session) context group with the name "${n}" already exists. If you are trying to join a Context Group, call joinContextGroup instead.`);const c=new a.default(this.wire,i(this,e,"f"),n);return i(this,t,"f").set(n,c),c.getUserInstance()}catch(e){throw console.error(`Error thrown trying to create Session Context Group with id "${n}": ${e}`),e}}async onDisconnection(t){this.wire.sendAction("interop-client-add-ondisconnection-listener").catch((e=>{}));return(await i(this,e,"f")).onDisconnection((e=>{const{uuid:n}=e;t({type:"interop-broker",topic:"disconnected",brokerName:n})}))}getFDC3Sync(e){switch(e){case"1.2":return new c.Fdc3Module((()=>this),this.wire);case"2.0":return new h.Fdc3Module2((()=>this),this.wire);default:throw new Error(`Invalid FDC3 version provided: ${e}. Must be '1.2' or '2.0'`)}}async getFDC3(e){return this.getFDC3Sync(e)}static async ferryFdc3Call(t,n,r){return(await i(t,e,"f")).dispatch(n,r||null)}};return Ki.InteropClient=u,e=new WeakMap,t=new WeakMap,Ki}var yr,fr,gr,mr={};function vr(){if(yr)return mr;yr=1,Object.defineProperty(mr,"__esModule",{value:!0}),mr.overrideCheck=mr.checkFDC32Overrides=mr.getDefaultViewFdc3VersionFromAppInfo=void 0;const e=Vi();function t(t){return["fdc3HandleFindInstances","handleInfoForIntent","handleInfoForIntentsByContext","fdc3HandleGetAppMetadata","fdc3HandleGetInfo","fdc3HandleOpen","handleFiredIntent","handleFiredIntentForContext"].filter((n=>t[n]===e.InteropBroker.prototype[n]))}return mr.getDefaultViewFdc3VersionFromAppInfo=function({manifest:e,initialOptions:t}){const n=e?.platform?.defaultViewOptions?.fdc3InteropApi??t.defaultViewOptions?.fdc3InteropApi;return["1.2","2.0"].includes(n??"")?n:void 0},mr.checkFDC32Overrides=t,mr.overrideCheck=function(e,n){if(n&&"2.0"===n){const n=t(e);n.length>0&&console.warn(`WARNING: FDC3 2.0 has been set as a default option for Views in this Platform, but the required InteropBroker APIs for FDC3 2.0 compliance have not all been overridden.\nThe following APIs need to be overridden:\n${n.join("\n")}`)}},mr}function Cr(){return gr||(gr=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),i=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),i(function(){if(fr)return Ti;fr=1;var e=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ti,"__esModule",{value:!0}),Ti.InteropModule=void 0;const t=e(n),i=$i,r=d,o=Vi(),a=wr(),c=vr(),h=Tn,l=e=>new e,u="You have attempted to use or modify InteropBroker parameters, which is not allowed. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.";class p extends r.Base{async init(e,n=l){this.wire.sendAction("interop-init").catch((()=>{}));const r=await this.wire.environment.getInteropInfo(this.wire.getFin()),s=(0,i.createUnusableObject)(u),a=(0,i.createWarningObject)(u,(0,t.default)(r)),d=async()=>{throw new Error(u)},p=o.InteropBroker.createClosedConstructor(this.wire,(()=>this.fin.InterApplicationBus.Channel.create(`interop-broker-${e}`)),r);let w;return w=Array.isArray(n)?new((0,h.overrideFromComposables)(...n)(p))(s,d,a):await n(p,s,d,a),(0,c.overrideCheck)(w,r.fdc3Version),w}connectSync(e,t){return this.wire.sendAction("interop-connect-sync").catch((()=>{})),new a.InteropClient(this.wire,this.wire.environment.whenReady().then((()=>this.fin.InterApplicationBus.Channel.connect(`interop-broker-${e}`,{payload:t}))))}}return Ti.InteropModule=p,Ti}(),e),i(wr(),e),i(Vi(),e)}(Li)),Li}var br={},Ir={},Er={},xr={};Object.defineProperty(xr,"__esModule",{value:!0}),xr.getSnapshotSourceChannelName=void 0;xr.getSnapshotSourceChannelName=e=>`snapshot-source-provider-${e.uuid}`;var Ar,Pr,Mr,_r,Or,Sr=s&&s.__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},Rr=s&&s.__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)};Object.defineProperty(Er,"__esModule",{value:!0}),Er.SnapshotSource=void 0;const Fr=d,jr=xr,kr=new Map;class Lr extends Fr.Base{constructor(e,t){super(e),Ar.set(this,void 0),Pr.set(this,(()=>(kr.has(this.identity.uuid)||kr.set(this.identity.uuid,{eventFired:null,clientPromise:null}),kr.get(this.identity.uuid)))),Mr.set(this,(()=>(Rr(this,Pr,"f").call(this).clientPromise||(Rr(this,Pr,"f").call(this).clientPromise=Rr(this,_r,"f").call(this)),Rr(this,Pr,"f").call(this).clientPromise))),_r.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);try{Rr(this,Pr,"f").call(this).eventFired||await Rr(this,Or,"f").call(this);const t=await this.fin.InterApplicationBus.Channel.connect(e,{wait:!1});return t.onDisconnection((()=>{Rr(this,Pr,"f").call(this).clientPromise=null,Rr(this,Pr,"f").call(this).eventFired=null})),t}catch(e){throw Rr(this,Pr,"f").call(this).clientPromise=null,new Error("The targeted SnapshotSource is not currently initialized. Await this object's ready() method.")}})),Or.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);let t,n;const i=new Promise(((e,i)=>{t=e,n=i}));Rr(this,Pr,"f").call(this).eventFired=i;const r=async i=>{try{i.channelName===e&&(t(),await this.fin.InterApplicationBus.Channel.removeListener("connected",r))}catch(e){n(e)}};await this.fin.InterApplicationBus.Channel.on("connected",r)})),Sr(this,Ar,t,"f")}get identity(){return Rr(this,Ar,"f")}async ready(){this.wire.sendAction("snapshot-source-ready").catch((e=>{}));try{await Rr(this,Mr,"f").call(this)}catch(e){await Rr(this,Pr,"f").call(this).eventFired}}async getSnapshot(){this.wire.sendAction("snapshot-source-get-snapshot").catch((e=>{}));const e=await Rr(this,Mr,"f").call(this),t=await e.dispatch("get-snapshot");return(await t).snapshot}async applySnapshot(e){this.wire.sendAction("snapshot-source-apply-snapshot").catch((e=>{}));return(await Rr(this,Mr,"f").call(this)).dispatch("apply-snapshot",{snapshot:e})}}Er.SnapshotSource=Lr,Ar=new WeakMap,Pr=new WeakMap,Mr=new WeakMap,_r=new WeakMap,Or=new WeakMap,Object.defineProperty(Ir,"__esModule",{value:!0}),Ir.SnapshotSourceModule=void 0;const Tr=d,$r=Er,Br=xr;class Gr extends Tr.Base{async init(e){if(this.wire.sendAction("snapshot-source-init").catch((e=>{})),"object"!=typeof e||"function"!=typeof e.getSnapshot||"function"!=typeof e.applySnapshot)throw new Error("you must pass in a valid SnapshotProvider");const t=await this.fin.InterApplicationBus.Channel.create((0,Br.getSnapshotSourceChannelName)(this.fin.me));t.register("get-snapshot",(async()=>({snapshot:await e.getSnapshot()}))),t.register("apply-snapshot",(({snapshot:t})=>e.applySnapshot(t)))}wrapSync(e){return this.wire.sendAction("snapshot-source-wrap-sync").catch((e=>{})),new $r.SnapshotSource(this.wire,e)}async wrap(e){return this.wire.sendAction("snapshot-source-wrap").catch((e=>{})),this.wrapSync(e)}}Ir.SnapshotSourceModule=Gr,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Ir,e),n(Er,e)}(br),Object.defineProperty(a,"__esModule",{value:!0});var Wr=a.Fin=void 0;const Hr=t,Nr=c,Dr=ie(),Ur=Z(),Vr=de,zr=en,Kr=rn,qr=un,Jr=bn,Yr=J(),Zr=An,Qr=ki,Xr=Cr(),eo=br;class to extends Hr.EventEmitter{constructor(e){super(),this.wire=e,this.System=new Nr.System(e),this.Window=new Dr._WindowModule(e),this.Application=new Ur.ApplicationModule(e),this.InterApplicationBus=new Vr.InterApplicationBus(e),this.Clipboard=new zr.Clipboard(e),this.ExternalApplication=new Kr.ExternalApplicationModule(e),this.Frame=new qr._FrameModule(e),this.GlobalHotkey=new Jr.GlobalHotkey(e),this.Platform=new Zr.PlatformModule(e,this.InterApplicationBus.Channel),this.View=new Yr.ViewModule(e),this.Interop=new Xr.InteropModule(e),this.SnapshotSource=new eo.SnapshotSourceModule(e),e.registerFin(this),this.me=(0,Qr.getMe)(e),e.on("disconnected",(()=>{this.emit("disconnected")}))}}Wr=a.Fin=to;var no={},io={};function ro(e){return"string"==typeof e.manifestUrl}function oo(e){return ao(e)&&"string"==typeof e.address}function so(e){return oo(e)&&"string"==typeof e.token}function ao(e){return"string"==typeof e.uuid}function co(e){return e.runtime&&"string"==typeof e.runtime.version}function ho(e){return ao(e)&&co(e)}Object.defineProperty(io,"__esModule",{value:!0}),io.isInternalConnectConfig=io.isPortDiscoveryConfig=io.isNewConnectConfig=io.isConfigWithReceiver=io.isRemoteConfig=io.isExistingConnectConfig=io.isExternalConfig=void 0,io.isExternalConfig=ro,io.isExistingConnectConfig=oo,io.isRemoteConfig=so,io.isConfigWithReceiver=function(e){return"object"==typeof e.receiver&&so({...e,address:""})},io.isNewConnectConfig=ho,io.isPortDiscoveryConfig=function(e){return ro(e)&&co(e)||ho(e)},io.isInternalConnectConfig=function(e){return oo(e)||ho(e)};var lo={},uo={};Object.defineProperty(uo,"__esModule",{value:!0}),uo.EmitterMap=void 0;const po=t;function wo(e){return Buffer.from(e).toString("base64")}uo.EmitterMap=class{constructor(){this.storage=new Map}hashKeys(e){return e.map(wo).join("/")}getOrCreate(e){const t=this.hashKeys(e);return this.storage.has(t)||this.storage.set(t,new po.EventEmitter),this.storage.get(t)}has(e){return this.storage.has(this.hashKeys(e))}delete(e){const t=this.hashKeys(e);return this.storage.delete(t)}},Object.defineProperty(lo,"__esModule",{value:!0});const yo=uo;class fo extends yo.EmitterMap{constructor(){super(...arguments),this.dispatchEvent=e=>{if(function(e){return"process-desktop-event"===e.action}(e)){const{payload:t}=e,n=function(e){const{topic:t}=e;if("frame"===t||"window"===t||"view"===t){const{uuid:n,name:i}=e;return[t,n,i]}if("application"===t){const{uuid:n}=e;return[t,n]}return[t]}(t);if(this.has(n))return this.getOrCreate(n).emit(t.type,t),!0}return!1}}}lo.default=fo;var go,mo,vo=s&&s.__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},Co=s&&s.__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)},bo=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(no,"__esModule",{value:!0});var Io=no.Transport=void 0;const Eo=t,xo=io,Ao=g,Po=bo(lo),Mo=ki,_o=ke;class Oo extends Eo.EventEmitter{constructor(e,t,n){super(),this.wireListeners=new Map,this.topicRefMap=new Map,this.eventAggregator=new Po.default,this.messageHandlers=[this.eventAggregator.dispatchEvent],go.set(this,void 0),mo.set(this,void 0),this.connectSync=()=>{Co(this,go,"f").connectSync()},this.getPort=()=>Co(this,go,"f").getPort(),vo(this,go,new e(this.onmessage.bind(this)),"f"),this.environment=t,this.sendRaw=Co(this,go,"f").send.bind(Co(this,go,"f")),this.registerMessageHandler(this.handleMessage.bind(this)),Co(this,go,"f").on("disconnected",(()=>{for(const[,{handleNack:e}]of this.wireListeners)e({reason:"Remote connection has closed"});this.wireListeners.clear(),this.emit("disconnected")}));const{uuid:i,name:r}=n,o=this.environment.getCurrentEntityType();this.me=(0,Mo.getBaseMe)(o,i,r)}getFin(){if(!Co(this,mo,"f"))throw new Error("No Fin object registered for this transport");return Co(this,mo,"f")}registerFin(e){if(Co(this,mo,"f"))throw new Error("Fin object has already been registered for this transport");vo(this,mo,e,"f")}shutdown(){return Co(this,go,"f").shutdown()}async connect(e){if((0,xo.isConfigWithReceiver)(e))return await Co(this,go,"f").connect(e.receiver),this.authorize(e);if((0,xo.isRemoteConfig)(e))return this.connectRemote(e);if((0,xo.isExistingConnectConfig)(e))return this.connectByPort(e);if((0,xo.isNewConnectConfig)(e)){const t=await this.environment.retrievePort(e);return this.connectByPort({...e,address:`ws://localhost:${t}`})}}async connectRemote(e){return await Co(this,go,"f").connect(new(this.environment.getWsConstructor())(e.address)),this.authorize(e)}async connectByPort(e){const{address:t,uuid:n}=e,i={...e,type:"file-token"},r=Co(this,go,"f");await r.connect(new(this.environment.getWsConstructor())(e.address));const o=await this.sendAction("request-external-authorization",{uuid:n,type:"file-token"},!0);if("external-authorization-response"!==o.action)throw new Ao.UnexpectedActionError(o.action);return await this.environment.writeToken(o.payload.file,o.payload.token),this.authorize(i)}async authorize(e){const t=await this.sendAction("request-authorization",e,!0);if("authorization-response"!==t.action)throw new Ao.UnexpectedActionError(t.action);if(!0!==t.payload.success)throw new Ao.RuntimeError(t.payload)}sendAction(e,t={},n=!1){let i=()=>{};const r=Ao.RuntimeError.getCallSite(1),o=this.environment.getNextMessageId(),s=new Promise(((s,a)=>{i=a;const c={action:e,payload:t,messageId:o},d=Co(this,go,"f");return this.addWireListener(o,s,(e=>this.nackHandler(e,a,r)),n),d.send(c).catch(a)}));return Object.assign(s,{cancel:i,messageId:o})}nackHandler(e,t,n){t("string"==typeof e?e:new Ao.RuntimeError(e,n))}ferryAction(e){return new Promise(((t,n)=>{const i=this.environment.getNextMessageId();e.messageId=i;const r=e=>{t(e.payload)};return Co(this,go,"f").send(e).then((()=>this.addWireListener(i,r,(e=>this.nackHandler(e,n)),!1))).catch(n)}))}registerMessageHandler(e){this.messageHandlers.push(e)}addWireListener(e,t,n,i){i?this.uncorrelatedListener=t:this.wireListeners.has(e)?n({reason:"Duplicate handler id",error:(0,_o.errorToPOJO)(new Ao.DuplicateCorrelationError(String(e)))}):this.wireListeners.set(e,{resolve:t,handleNack:n})}onmessage(e){for(const t of this.messageHandlers)t.call(null,e)}handleMessage(e){const t=e.correlationId||NaN;if("correlationId"in e){if(!this.wireListeners.has(t))return!1;{const{resolve:n,handleNack:i}=this.wireListeners.get(t);"ack"!==e.action?i({reason:"Did not receive ack action",error:(0,_o.errorToPOJO)(new Ao.NoAckError(e.action))}):"payload"in e?e.payload.success?n.call(null,e):i(e.payload):"string"==typeof e.reason?i(e):(console.warn("Received invalid response from core",e),i({reason:"invalid response shape"})),this.wireListeners.delete(t)}}else this.uncorrelatedListener&&this.uncorrelatedListener.call(null,e),this.uncorrelatedListener=()=>{};return!0}}Io=no.Transport=Oo,go=new WeakMap,mo=new WeakMap;const So=(...e)=>({log:(...t)=>console.debug(`[${(new Date).toISOString()}]`,...(e=>e.map((e=>`[${e}]`)))(e),...t),getLogger:(...t)=>So(...e,...t)}),Ro=So("@openfin/core-web/client");function Fo(e,t){if(!function(e){return"string"==typeof e}(e))throw new Error(`Property ${t} has invalid type. Expected string, got ${typeof e}.`)}const jo="web-broker-ports-ready",ko=Ro.getLogger("get-web-interop-ports");function Lo(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)}function To(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}"function"==typeof SuppressedError&&SuppressedError;const $o=e=>{var n,i,r;return r=class extends t.EventEmitter{constructor(t){super(),n.set(this,void 0),i.set(this,!1),this.connectSync=()=>{Lo(this,i,"f")||(e.addEventListener("message",(e=>{e.data?.topic?.startsWith("wire-message")&&e.data.message&&Lo(this,n,"f").call(this,{...JSON.parse(e.data.message),ports:e.ports})})),e.start())},this.connect=async()=>{this.connectSync()},this.send=t=>(e.postMessage({topic:"wire-message",message:JSON.stringify(t)}),Promise.resolve()),this.shutdown=async()=>{e.close()},To(this,n,t,"f")}getPort(){return e}},n=new WeakMap,i=new WeakMap,r};var Bo={},Go={};Object.defineProperty(Go,"__esModule",{value:!0}),Go.BaseEnvironment=void 0;const Wo=vr();Go.BaseEnvironment=class{async getViewWindowIdentity(e,t){const{identity:n}=await e.View.wrapSync(t).getCurrentWindow();return n}async getInteropInfo(e){const t=await e.Application.getCurrentSync().getInfo().catch((()=>null)),n=t?.initialOptions?.interopBrokerConfiguration??{};return{fdc3Version:t?(0,Wo.getDefaultViewFdc3VersionFromAppInfo)(t):void 0,...n,fdc3Info:{providerVersion:await e.System.getVersion(),provider:"OpenFin"}}}},Object.defineProperty(Bo,"__esModule",{value:!0});var Ho=Bo.BrowserEnvironment=void 0;const No=Go;class Do extends No.BaseEnvironment{constructor(){super(...arguments),this.type="other",this.getRandomId=()=>{const e=new Uint32Array(1);return window.crypto.getRandomValues(e)[0].toString(32)}}getAdapterVersionSync(){return""}observeBounds(e,t){throw new Error("Method not implemented.")}layoutAllowedInContext(e){return!1}initLayoutManager(e,t,n){throw new Error("Method not implemented.")}applyLayoutSnapshot(e,t,n){throw new Error("Method not implemented.")}createLayout(e,t){throw new Error("Method not implemented.")}destroyLayout(e,t){throw new Error("Method not implemented.")}resolveLayout(e,t){throw new Error("Method not implemented.")}initPlatform(...e){throw new Error("Method not implemented.")}writeToken(e,t){return Promise.resolve("")}retrievePort(e){throw new Error("Method not implemented.")}getNextMessageId(){return this.getRandomId()}createChildContent(e){throw new Error("Method not implemented.")}getWebWindow(e){throw new Error("Method not implemented.")}getCurrentEntityIdentity(){throw new Error("Method not implemented.")}getCurrentEntityType(){return"external connection"}raiseEvent(e,t){throw new Error("Method not implemented.")}getUrl(){return location.href}getDefaultChannelOptions(){return{create:{},connect:{}}}getRtcPeer(){return new RTCPeerConnection}getWsConstructor(){return WebSocket}whenReady(){return Promise.resolve()}}Ho=Bo.BrowserEnvironment=Do;const Uo=e=>"platform"in e&&void 0!==e.platform;var Vo,zo;class Ko extends Ho{constructor(e){super(),this.connectConfig=e,Vo.set(this,void 0),zo.set(this,new W((async()=>Promise.resolve().then((function(){return __webpack_require__(/*! ./main-b14f67c9.js */ "./node_modules/@openfin/core-web/out/main-b14f67c9.js")}))))),Uo(e)&&this.validatePlatformOptions(e)}getAdapterVersionSync(){return"0.39.21"}validatePlatformOptions({platform:e}){if(!("layoutSnapshot"in e))throw new Error("Platform options are missing layoutSnapshot. Please provide a layoutSnapshot in the platform options.");if("windows"in e||"windows"in e.layoutSnapshot)throw new Error("It appears you tried to call connect() with a snapshot object from an OpenFin desktop environment. Note that connect() expects to be called with a platform property with this structure: { platform: { layoutSnapshot } }. To get a layoutSnapshot of the expected structure, use fin.Platform.Layout.getCurrentLayoutManagerSync().getLayoutSnapshot() in v34+ in your desktop environment.");const{layouts:t}=e.layoutSnapshot;Object.entries(t).map((([e,t])=>{if("object"!=typeof t||null===t)throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must be an object.`);if(!("content"in t))throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must contain a 'content' property.`)}))}async getInteropInfo(e){return{...{contextGroups:void 0,logging:{beforeAction:{enabled:!1},afterAction:{enabled:!1}}},fdc3Version:void 0,fdc3Info:{providerVersion:"0.39.21",provider:"OpenFin Web"}}}layoutAllowedInContext(e){return!0}async initLayoutManager(e,t,n){if(Lo(this,Vo,"f"))throw new Error("Layout already initialized.");if(!Uo(this.connectConfig))throw new Error("Platform options are missing from connection config.");const{WebLayoutEntryPoint:i}=await Lo(this,zo,"f").getValue();return To(this,Vo,new i(this.connectConfig),"f"),await Lo(this,Vo,"f").initLayoutManager(e,t,n)}async applyLayoutSnapshot(e,t,n){Lo(this,Vo,"f")?.applyLayoutSnapshot(e,t,n)}async createLayout(e,t){return Lo(this,Vo,"f")?.createLayout(e,t)}async destroyLayout(e,t){return Lo(this,Vo,"f")?.destroyLayout(e,t)}async getViewWindowIdentity(e,t){return Promise.resolve({uuid:t.uuid,name:t.uuid})}}Vo=new WeakMap,zo=new WeakMap;const qo=()=>{const e=((e,t)=>{const n=new RegExp(`^${t}<(?.*)>$`).exec(e)?.groups?.meta;if(n)try{return JSON.parse(atob(n))}catch(e){throw new Error(`Failed to decode JSON from ${n}.`)}})(window.name,"of-frame");if(e)try{const{name:t,uuid:n,brokerUrl:i,providerId:r,contextGroup:o}=e;return Fo(i,"brokerUrl"),Fo(n,"uuid"),Fo(t,"name"),{identity:{name:t,uuid:n},brokerUrl:i,interopConfig:{providerId:r,currentContextGroup:o}}}catch(e){throw new Error(`Unexpected error occurred when inferring platform information: ${e.stack}`)}},Jo=()=>{const e=r.v4();return{uuid:e,name:e}},Yo=async e=>{if("enabled"===e.connectionInheritance){const t=await(async e=>{const t=qo();if(t){const{validateOptions:n=(()=>!0)}=e,{identity:i,...r}=t;if(!await n(r))throw new Error("Parent options were rejected by validateOptions.");return t}})(e);if(t)return t}if(!e.options){const t="enabled"===e.connectionInheritance?"Broker URL was not specified nor provided by a platform container.":"Connection inheritance is disabled but no options were provided.";throw new Error(t)}return{...e.options,identity:Jo()}};exports.__classPrivateFieldGet=Lo,exports.__classPrivateFieldSet=To,exports.apiExposer=Gn,exports.commonjsGlobal=s,exports.connect=async t=>{try{Ro.log("Establishing connection",t);const{brokerUrl:n,identity:i,timeout:r,interopConfig:s}=await Yo(t),{workerPort:a,iframeBrokerPort:c}=await(async(e,t,n)=>{const{origin:i}=new URL(e),r=document.createElement("IFRAME");let s;r.style.display="none";try{return await new Promise(((a,c)=>{const d=e=>{if(e.source===r.contentWindow&&e.data?.topic===`ack-${jo}`){if(e.origin!==i)c(new Error(`Broker redirected to unexpected origin ${e.origin}, expected ${i}.`));else if(e.data.success){const[t,n]=e.ports;a({iframeBrokerPort:t,workerPort:n})}else c(new m(e.data));window.removeEventListener("message",d),clearTimeout(s)}};window.addEventListener("message",d),ko.log(`Connecting to broker ${e}`),r.setAttribute("src",e),r.setAttribute("name",o(t,"of-broker")),document.body.appendChild(r),ko.log("Iframe loaded, awaiting init message from iframe"),n&&(s=setTimeout((()=>{window.removeEventListener("message",d),document.body.removeChild(r),c(new Error("Worker did not initialize in time"))}),n))}))}catch(e){throw new Error(`Failed to initialise Fin Web Client. ${e.message}`,{cause:e})}})(n,i,r);Ro.log("Successfully established connection to shared worker");const d={entityType:"external connection",...i};a.start(),c.start();const h=((t,n,i)=>{const r=$o(n),o=new Ko(t),s=new Io(r,o,i);return s.connectSync(),window.Buffer=e.Buffer,new Wr(s)})(t,a,d);return s?.providerId&&(h.me.interop=h.Interop.connectSync(s.providerId),s?.currentContextGroup&&h.me.interop.joinContextGroup(s.currentContextGroup).catch((e=>{console.warn(`Error joining specified context group: ${s?.currentContextGroup}, continuing`,e)}))),{...h,me:{...h.me,identity:{uuid:h.me.uuid,name:h.me.name}}}}catch(e){throw new Error(`An error occured during web-interop connection: ${e.message}`)}},exports.decorators=Nn,exports.encodeOptions=o,exports.layout_constants=ai,exports.lazy=G; +var e=__webpack_require__(/*! buffer/ */ "../../node_modules/buffer/index.js"),t=__webpack_require__(/*! events */ "../../node_modules/events/events.js"),n=__webpack_require__(/*! lodash/cloneDeep */ "../../node_modules/lodash/cloneDeep.js"),i=__webpack_require__(/*! lodash/isEqual */ "../../node_modules/lodash/isEqual.js"),r=__webpack_require__(/*! uuid */ "../../node_modules/uuid/dist/esm-browser/index.js");const o=(e,t)=>`${t}<${btoa(JSON.stringify(e))}>`;var s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof __webpack_require__.g?__webpack_require__.g:"undefined"!=typeof self?self:{},a={},c={},d={},h={};async function l(e){const t=[];for(const n of e){const e=await n();t.push(e)}return t}Object.defineProperty(h,"__esModule",{value:!0}),h.promiseMapSerial=h.serial=h.promiseMap=h.promisify=void 0,h.promisify=function(e){return(...t)=>new Promise(((n,i)=>{e(...t,((e,t)=>e?i(e):n(t)))}))},h.promiseMap=async function(e,t){return Promise.all(e.map(t))},h.serial=l,h.promiseMapSerial=async function(e,t){return l(e.map(((e,n,i)=>()=>t(e,n,i))))};var u,p=s&&s.__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},w=s&&s.__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)};Object.defineProperty(d,"__esModule",{value:!0}),d.Reply=d.EmitterBase=d.Base=void 0;const y=h;class f{constructor(e){this.isNodeEnvironment=()=>"node"===this.wire.environment.type,this.isOpenFinEnvironment=()=>"openfin"===this.wire.environment.type,this.isBrowserEnvironment=()=>"other"===this.wire.environment.type,this.wire=e}get fin(){return this.wire.getFin()}get me(){return this.wire.me}}d.Base=f;d.EmitterBase=class extends f{constructor(e,t,...n){super(e),this.topic=t,u.set(this,void 0),this.eventNames=()=>this.hasEmitter()?this.getOrCreateEmitter().eventNames():[],this.emit=(e,t,...n)=>!!this.hasEmitter()&&this.getOrCreateEmitter().emit(e,t,...n),this.hasEmitter=()=>this.wire.eventAggregator.has(w(this,u,"f")),this.getOrCreateEmitter=()=>this.wire.eventAggregator.getOrCreate(w(this,u,"f")),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[],this.listenerCount=e=>this.hasEmitter()?this.getOrCreateEmitter().listenerCount(e):0,this.registerEventListener=async(e,t={},n,i)=>{const r={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e},o=this.getOrCreateEmitter();n(o);try{await this.wire.sendAction("subscribe-to-desktop-event",r)}catch(e){throw i(o),this.deleteEmitterIfNothingRegistered(o),e}},this.deregisterEventListener=async(e,t={})=>{if(this.hasEmitter()){const n={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e};await this.wire.sendAction("unsubscribe-to-desktop-event",n).catch((()=>null));return this.getOrCreateEmitter()}return Promise.resolve()},p(this,u,[t,...n],"f"),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[]}async on(e,t,n){return await this.registerEventListener(e,n,(n=>{n.on(e,t)}),(n=>{n.removeListener(e,t)})),this}async addListener(e,t,n){return this.on(e,t,n)}async once(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.once(e,i),n.once(e,t)}),(n=>{n.removeListener(e,i),n.removeListener(e,t)})),this}async prependListener(e,t,n){return await this.registerEventListener(e,n,(n=>{n.prependListener(e,t)}),(n=>{n.removeListener(e,t)})),this}async prependOnceListener(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.prependOnceListener(e,t),n.once(e,i)}),(n=>{n.removeListener(e,t),n.removeListener(e,i)})),this}async removeListener(e,t,n){const i=await this.deregisterEventListener(e,n);return i&&(i.removeListener(e,t),this.deleteEmitterIfNothingRegistered(i)),this}async deregisterAllListeners(e){const t={...this.identity,type:e,topic:this.topic};if(this.hasEmitter()){const e=this.getOrCreateEmitter(),n=e.listenerCount(t.type),i=[];for(let e=0;enull)));return await Promise.all(i),e}}async removeAllListeners(e){const t=async e=>{const t=await this.deregisterAllListeners(e);t&&(t.removeAllListeners(e),this.deleteEmitterIfNothingRegistered(t))};if(e)await t(e);else if(this.hasEmitter()){const e=this.getOrCreateEmitter().eventNames();await(0,y.promiseMap)(e,t)}return this}deleteEmitterIfNothingRegistered(e){0===e.eventNames().length&&this.wire.eventAggregator.delete(w(this,u,"f"))}},u=new WeakMap;d.Reply=class{};var g={};Object.defineProperty(g,"__esModule",{value:!0});var m=g.RuntimeError=g.NotSupportedError=g.NotImplementedError=g.NoAckError=g.DuplicateCorrelationError=g.UnexpectedActionError=g.DisconnectedError=void 0;class v extends Error{constructor(e){super(`Expected websocket state OPEN but found ${e}`),this.readyState=e}}g.DisconnectedError=v;class C extends Error{}g.UnexpectedActionError=C;class b extends Error{}g.DuplicateCorrelationError=b;class I extends Error{}g.NoAckError=I;class E extends Error{}g.NotImplementedError=E;class x extends Error{}g.NotSupportedError=x;class A extends Error{constructor(e){const{message:t,name:n,stack:i,...r}=e;super(t),this.name=n||"Error",this.stack=i??this.toString(),Object.keys(r).forEach((e=>{this[e]=r[e]}))}}class P extends Error{static getCallSite(e=0){const t=Error.stackTraceLimit,n=e+1;Error.stackTraceLimit=t+n;const i=Error.prepareStackTrace;Error.prepareStackTrace=(e,t)=>t;const r=(new Error).stack?.slice(n)??[];return Error.prepareStackTrace=i,Error.stackTraceLimit=t,r}static prepareStackTrace(e,t){if("function"==typeof Error.prepareStackTrace)return Error.prepareStackTrace(e,t);let n="";n+=e.name||"Error",n+=`: ${e.message||""}`;for(const e of t)n+=`\n at ${e.toString()}`;return n}constructor(e,t){const{reason:n,error:i}=e;super(n),this.name="RuntimeError",i?.stack&&(this.cause=new A(i)),t&&(this.stack=P.prepareStackTrace(this,t))}}m=g.RuntimeError=P;var M={},_={},O={};Object.defineProperty(O,"__esModule",{value:!0}),O.validateIdentity=void 0,O.validateIdentity=function(e){let t;return"object"==typeof e&&"string"==typeof e.uuid||(t="Not a valid identity object"),t};var S={},R={},F={},j={},k={},L={},T={};Object.defineProperty(T,"__esModule",{value:!0}),T.handleDeprecatedWarnings=void 0;var $;T.handleDeprecatedWarnings=e=>{(e.contentNavigation?.whitelist||e.contentNavigation?.blacklist||e.contentRedirect?.whitelist||e.contentRedirect?.blacklist)&&console.warn("The properties 'whitelist' and 'blacklist' have been marked as deprecated and will be removed in a future version. Please use 'allowlist' and 'denylist'.")};var B={},G={};Object.defineProperty(G,"__esModule",{value:!0}),G.AsyncRetryableLazy=W=G.Lazy=void 0;var W=G.Lazy=class{constructor(e){this.producerFn=e}getValue(){return this.value||(this.value=this.producerFn()),this.value}};G.AsyncRetryableLazy=class{constructor(e){this.producerFn=e}async getValue(){return this.promise||(this.promise=this.producerFn().catch((e=>{throw delete this.promise,e}))),this.promise}};var H={};Object.defineProperty(H,"__esModule",{value:!0}),H.WebContents=void 0;const N=d;class D extends N.EmitterBase{constructor(e,t,n){super(e,n,t.uuid,t.name),this.identity=t,this.entityType=n}capturePage(e){return this.wire.sendAction("capture-page",{options:e,...this.identity}).then((({payload:e})=>e.data))}executeJavaScript(e){return this.wire.sendAction("execute-javascript-in-window",{...this.identity,code:e}).then((({payload:e})=>e.data))}getZoomLevel(){return this.wire.sendAction("get-zoom-level",this.identity).then((({payload:e})=>e.data))}setZoomLevel(e){return this.wire.sendAction("set-zoom-level",{...this.identity,level:e}).then((()=>{}))}navigate(e){return this.wire.sendAction("navigate-window",{...this.identity,url:e}).then((()=>{}))}navigateBack(){return this.wire.sendAction("navigate-window-back",{...this.identity}).then((()=>{}))}async navigateForward(){await this.wire.sendAction("navigate-window-forward",{...this.identity})}stopNavigation(){return this.wire.sendAction("stop-window-navigation",{...this.identity}).then((()=>{}))}reload(e=!1){return this.wire.sendAction("reload-window",{ignoreCache:e,...this.identity}).then((()=>{}))}print(e={}){return this.wire.sendAction("print",{...this.identity,options:e}).then((()=>{}))}findInPage(e,t){return this.wire.sendAction("find-in-page",{...this.identity,searchTerm:e,options:t}).then((({payload:e})=>e.data))}stopFindInPage(e){return this.wire.sendAction("stop-find-in-page",{...this.identity,action:e}).then((()=>{}))}getPrinters(){return this.wire.sendAction("get-printers",{...this.identity}).then((({payload:e})=>e.data))}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){await this.wire.sendAction("focus-window",{emitSynthFocused:e,...this.identity})}async showDeveloperTools(){await this.wire.sendAction("show-developer-tools",this.identity)}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction("get-process-info",this.identity);return e}async getSharedWorkers(){return this.wire.sendAction("get-shared-workers",this.identity).then((({payload:e})=>e.data))}async inspectSharedWorker(){await this.wire.sendAction("inspect-shared-worker",{...this.identity})}async inspectSharedWorkerById(e){await this.wire.sendAction("inspect-shared-worker-by-id",{...this.identity,workerId:e})}async inspectServiceWorker(){await this.wire.sendAction("inspect-service-worker",{...this.identity})}async showPopupWindow(e){if(this.wire.sendAction(`${this.entityType}-show-popup-window`,this.identity).catch((()=>{})),e?.onPopupReady){const t=async({popupName:t})=>{try{const n=this.fin.Window.wrapSync({uuid:this.fin.me.uuid,name:t});await e.onPopupReady(n)}catch(e){throw new Error(`Something went wrong during onPopupReady execution: ${e}`)}};await this.once("popup-ready",t)}const{payload:t}=await this.wire.sendAction("try-create-popup-window",{options:{...e,hasResultCallback:!!e?.onPopupResult,hasReadyCallback:!!e?.onPopupReady},...this.identity}),{data:{willOpen:n,options:i}}=t;n&&await this.fin.Window.create(i.initialOptions);if(e?.onPopupResult){const t=async t=>{await e.onPopupResult((e=>{const{name:t,uuid:n,result:i,data:r}=e,o={identity:{name:t,uuid:n},result:i};return r&&(o.data=r),o})(t))},n=async()=>{await this.removeListener("popup-result",t)};await this.on("popup-result",t),await this.once("popup-teardown",n)}const{payload:r}=await this.wire.sendAction("show-popup-window",{options:i,...this.identity});return r.data}}var U,V,z,K,q;function J(){return V||(V=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(function(){if($)return L;$=1,Object.defineProperty(L,"__esModule",{value:!0}),L.ViewModule=void 0;const e=d,t=O,n=J(),i=T;class r extends e.Base{async create(e){const{uuid:t}=this.wire.me;if(!e.name||"string"!=typeof e.name)throw new Error("Please provide a name property as a string in order to create a View.");return(0,i.handleDeprecatedWarnings)(e),this.wire.environment.childViews?await this.wire.environment.createChildContent({entityType:"view",options:{...e,uuid:t}}):await this.wire.sendAction("create-view",{...e,uuid:t}),this.wrapSync({uuid:t,name:e.name})}async wrap(e){this.wire.sendAction("view-wrap").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}wrapSync(e){this.wire.sendAction("view-wrap-sync").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}getCurrent(){if(this.wire.sendAction("view-get-current").catch((e=>{})),!this.wire.me.isView)throw new Error("You are not in a View context");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction("view-get-current-sync").catch((e=>{})),!this.wire.me.isView)throw new Error("You are not in a View context");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return L.ViewModule=r,L}(),e),n(function(){if(U)return B;var e;U=1,Object.defineProperty(B,"__esModule",{value:!0}),B.View=void 0;const t=g,n=G,i=H,r=ie();class o extends i.WebContents{constructor(i,o){super(i,o,"view"),this.identity=o,e.set(this,new n.Lazy((()=>this.fin.Platform.wrapSync(this.identity).getClient()))),this.attach=async e=>{await this.wire.sendAction("attach-view",{target:e,...this.identity})},this.destroy=async()=>{await this.wire.sendAction("destroy-view",{...this.identity})},this.show=async()=>{await this.wire.sendAction("show-view",{...this.identity})},this.showAt=async(e,t={})=>{await this.wire.sendAction("show-view-at",{bounds:e,...this.identity,options:t})},this.bringToFront=async()=>{await this.wire.sendAction("bring-view-to-front",{...this.identity})},this.hide=async()=>{await this.wire.sendAction("hide-view",{...this.identity})},this.setBounds=async e=>{await this.wire.sendAction("set-view-bounds",{bounds:e,...this.identity})},this.getBounds=async()=>(await this.wire.sendAction("get-view-bounds",{...this.identity})).payload.data,this.getInfo=async()=>(await this.wire.sendAction("get-view-info",{...this.identity})).payload.data,this.getParentLayout=async()=>(this.wire.sendAction("view-get-parent-layout",{...this.identity}).catch((()=>{})),this.fin.Platform.Layout.getLayoutByViewIdentity(this.identity)),this.getOptions=async()=>this.wire.sendAction("get-view-options",{...this.identity}).then((({payload:e})=>e.data)),this.updateOptions=async e=>this.wire.sendAction("update-view-options",{options:e,...this.identity}).then((()=>{})),this.getCurrentWindow=async()=>{const{payload:{data:e}}=await this.wire.sendAction("get-view-window",{...this.identity});return new r._Window(this.wire,e)},this.getCurrentStack=async()=>{this.wire.sendAction("view-get-current-stack").catch((()=>{}));try{return(await this.getParentLayout()).getStackByViewIdentity(this.identity)}catch(e){throw new t.RuntimeError({reason:"This view does not belong to a stack.",error:e})}},this.triggerBeforeUnload=async()=>(await this.wire.sendAction("trigger-before-unload",{...this.identity})).payload.data,this.bindToElement=async e=>{if(!e)throw new Error("Element not found.");return this.wire.environment.observeBounds(e,(async e=>this.setBounds(e)))}}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){const t=await this.getCurrentWindow();await t.focusedWebViewWasChanged(),await super.focus({emitSynthFocused:e})}}return B.View=o,e=new WeakMap,B}(),e)}(k)),k}function Y(){if(z)return j;z=1,Object.defineProperty(j,"__esModule",{value:!0}),j.Application=void 0;const e=d,t=ie(),n=J();class i extends e.EmitterBase{constructor(e,n){super(e,"application",n.uuid),this.identity=n,this.window=new t._Window(this.wire,{uuid:this.identity.uuid,name:this.identity.uuid})}windowListFromIdentityList(e){const n=[];return e.forEach((e=>{n.push(new t._Window(this.wire,{uuid:e.uuid,name:e.name}))})),n}isRunning(){return this.wire.sendAction("is-application-running",this.identity).then((({payload:e})=>e.data))}async quit(e=!1){try{await this._close(e),await this.wire.sendAction("destroy-application",{force:e,...this.identity})}catch(e){if(!["Remote connection has closed","Could not locate the requested application"].some((t=>e.message.includes(t))))throw e}}async _close(e=!1){try{await this.wire.sendAction("close-application",{force:e,...this.identity})}catch(e){if(!e.message.includes("Remote connection has closed"))throw e}}close(e=!1){return console.warn("Deprecation Warning: Application.close is deprecated Please use Application.quit"),this.wire.sendAction("application-close",this.identity).catch((e=>{})),this._close(e)}getChildWindows(){return this.wire.sendAction("get-child-windows",this.identity).then((({payload:e})=>{const t=[];return e.data.forEach((e=>{t.push({uuid:this.identity.uuid,name:e})})),this.windowListFromIdentityList(t)}))}getManifest(){return this.wire.sendAction("get-application-manifest",this.identity).then((({payload:e})=>e.data))}getParentUuid(){return this.wire.sendAction("get-parent-application",this.identity).then((({payload:e})=>e.data))}getShortcuts(){return this.wire.sendAction("get-shortcuts",this.identity).then((({payload:e})=>e.data))}async getViews(){const{payload:e}=await this.wire.sendAction("application-get-views",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}getZoomLevel(){return this.wire.sendAction("get-application-zoom-level",this.identity).then((({payload:e})=>e.data))}getWindow(){return this.wire.sendAction("application-get-window",this.identity).catch((e=>{})),Promise.resolve(this.window)}registerUser(e,t){return this.wire.sendAction("register-user",{userName:e,appName:t,...this.identity}).then((()=>{}))}removeTrayIcon(){return this.wire.sendAction("remove-tray-icon",this.identity).then((()=>{}))}restart(){return this.wire.sendAction("restart-application",this.identity).then((()=>{}))}run(){return console.warn("Deprecation Warning: Application.run is deprecated Please use fin.Application.start"),this.wire.sendAction("application-run",this.identity).catch((e=>{})),this._run()}_run(e={}){return this.wire.sendAction("run-application",{manifestUrl:this._manifestUrl,opts:e,...this.identity}).then((()=>{}))}scheduleRestart(){return this.wire.sendAction("relaunch-on-close",this.identity).then((()=>{}))}async sendApplicationLog(){const{payload:e}=await this.wire.sendAction("send-application-log",this.identity);return e.data}async setJumpList(e){await this.wire.sendAction("set-jump-list",{config:e,...this.identity})}setTrayIcon(e){return this.wire.sendAction("set-tray-icon",{enabledIcon:e,...this.identity}).then((()=>{}))}setShortcuts(e){return this.wire.sendAction("set-shortcuts",{data:e,...this.identity}).then((()=>{}))}async setShortcutQueryParams(e){await this.wire.sendAction("set-shortcut-query-args",{data:e,...this.identity})}setZoomLevel(e){return this.wire.sendAction("set-application-zoom-level",{level:e,...this.identity}).then((()=>{}))}async setAppLogUsername(e){await this.wire.sendAction("set-app-log-username",{data:e,...this.identity})}getTrayIconInfo(){return this.wire.sendAction("get-tray-icon-info",this.identity).then((({payload:e})=>e.data))}hasTrayIcon(){return this.wire.sendAction("has-tray-icon",this.identity).then((({payload:e})=>e.data))}terminate(){return this.wire.sendAction("terminate-application",this.identity).then((()=>{}))}wait(){return this.wire.sendAction("wait-for-hung-application",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction("get-info",this.identity).then((({payload:e})=>e.data))}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction("application-get-process-info",this.identity);return e}async setFileDownloadLocation(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t};await this.wire.sendAction("set-file-download-location",{...n,downloadLocation:e})}async getFileDownloadLocation(){const{payload:{data:e}}=await this.wire.sendAction("get-file-download-location",this.identity);return e}async showTrayIconPopupMenu(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t},{payload:i}=await this.wire.sendAction("show-tray-icon-popup-menu",{...n,options:e});return i.data}async closeTrayIconPopupMenu(){const{name:e}=this.wire.me,t={uuid:this.identity.uuid,name:e};await this.wire.sendAction("close-tray-icon-popup-menu",{...t})}}return j.Application=i,j}function Z(){return q||(q=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(function(){if(K)return F;K=1,Object.defineProperty(F,"__esModule",{value:!0}),F.ApplicationModule=void 0;const e=d,t=O,n=Y();class i extends e.Base{async wrap(e){this.wire.sendAction("wrap-application").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}wrapSync(e){this.wire.sendAction("wrap-application-sync").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}async _create(e){return void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&void 0===e.isPlatformController&&(e.autoShow=!0),await this.wire.sendAction("create-application",e),this.wrap({uuid:e.uuid})}create(e){return console.warn("Deprecation Warning: fin.Application.create is deprecated. Please use fin.Application.start"),this.wire.sendAction("application-create").catch((e=>{})),this._create(e)}async start(e){this.wire.sendAction("start-application").catch((e=>{}));const t=await this._create(e);return await this.wire.sendAction("run-application",{uuid:e.uuid}),t}async startManyManifests(e,t){return this.wire.sendAction("run-applications",{applications:e,opts:t}).then((()=>{}))}getCurrent(){return this.wire.sendAction("get-current-application").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction("get-current-application-sync").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}async startFromManifest(e,t){this.wire.sendAction("application-start-from-manifest").catch((e=>{}));const n=await this._createFromManifest(e);return await n._run(t),n}createFromManifest(e){return console.warn("Deprecation Warning: fin.Application.createFromManifest is deprecated. Please use fin.Application.startFromManifest"),this.wire.sendAction("application-create-from-manifest").catch((e=>{})),this._createFromManifest(e)}_createFromManifest(e){return this.wire.sendAction("get-application-manifest",{manifestUrl:e}).then((({payload:e})=>{const t=e.data.platform?e.data.platform.uuid:e.data.startup_app.uuid;return this.wrap({uuid:t})})).then((t=>(t._manifestUrl=e,t)))}}return F.ApplicationModule=i,F}(),e),n(Y(),e)}(R)),R}H.WebContents=D;var Q={};Object.defineProperty(Q,"__esModule",{value:!0}),Q.promisifySubscription=void 0;var X,ee,te;function ne(){if(X)return S;X=1,Object.defineProperty(S,"__esModule",{value:!0}),S._Window=void 0;const e=Z(),t=H,n=J(),i=T,r=Q;class o extends t.WebContents{constructor(e,t){super(e,t,"window")}async createWindow(e){this.wire.sendAction("window-create-window",this.identity).catch((e=>{}));const t=await(0,r.promisifySubscription)(this,"fire-constructor-callback");void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&(e.autoShow=!0),(0,i.handleDeprecatedWarnings)(e);const n=this.wire.environment.createChildContent({entityType:"window",options:e}),[o]=await Promise.all([t.getValue(),n]);let s;const{success:a}=o,c=o.data,{message:d}=c;s=a?{httpResponseCode:c.httpResponseCode,apiInjected:c.apiInjected}:{message:c.message,networkErrorCode:c.networkErrorCode,stack:c.stack};const h={message:d,cbPayload:s,success:a};try{this.getWebWindow().fin.__internal_.openerSuccessCBCalled()}catch(e){}return h.success?this:Promise.reject(h)}getAllFrames(){return this.wire.sendAction("get-all-frames",this.identity).then((({payload:e})=>e.data))}getBounds(){return this.wire.sendAction("get-window-bounds",this.identity).then((({payload:e})=>e.data))}center(){return this.wire.sendAction("center-window",this.identity).then((()=>{}))}blur(){return this.wire.sendAction("blur-window",this.identity).then((()=>{}))}bringToFront(){return this.wire.sendAction("bring-window-to-front",this.identity).then((()=>{}))}animate(e,t){return this.wire.sendAction("animate-window",{transitions:e,options:t,...this.identity}).then((()=>{}))}hide(){return this.wire.sendAction("hide-window",this.identity).then((()=>{}))}close(e=!1){return this.wire.sendAction("close-window",{force:e,...this.identity}).then((()=>{Object.setPrototypeOf(this,null)}))}focusedWebViewWasChanged(){return this.wire.sendAction("focused-webview-changed",this.identity).then((()=>{}))}getNativeId(){return this.wire.sendAction("get-window-native-id",this.identity).then((({payload:e})=>e.data))}async getCurrentViews(){const{payload:e}=await this.wire.sendAction("window-get-views",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}disableFrame(){return console.warn("Function is deprecated; use disableUserMovement instead."),this.wire.sendAction("disable-window-frame",this.identity).then((()=>{}))}disableUserMovement(){return this.wire.sendAction("disable-window-frame",this.identity).then((()=>{}))}enableFrame(){return console.warn("Function is deprecated; use enableUserMovement instead."),this.wire.sendAction("enable-window-frame",this.identity).then((()=>{}))}enableUserMovement(){return this.wire.sendAction("enable-window-frame",this.identity).then((()=>{}))}flash(){return this.wire.sendAction("flash-window",this.identity).then((()=>{}))}stopFlashing(){return this.wire.sendAction("stop-flash-window",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction("get-window-info",this.identity).then((({payload:e})=>e.data))}async getLayout(e){this.wire.sendAction("window-get-layout",this.identity).catch((e=>{}));const t=await this.getOptions();if(!t.layout&&!t.layoutSnapshot)throw new Error("Window does not have a Layout");return this.fin.Platform.Layout.wrap(e??this.identity)}getOptions(){return this.wire.sendAction("get-window-options",this.identity).then((({payload:e})=>e.data))}getParentApplication(){return this.wire.sendAction("window-get-parent-application",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity))}getParentWindow(){return this.wire.sendAction("window-get-parent-window",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity)).then((e=>e.getWindow()))}async getSnapshot(e){const t={area:e,...this.identity};console.warn("Window.getSnapshot has been deprecated, please use Window.capturePage");return(await this.wire.sendAction("get-window-snapshot",t)).payload.data}getState(){return this.wire.sendAction("get-window-state",this.identity).then((({payload:e})=>e.data))}getWebWindow(){return this.wire.sendAction("window-get-web-window",this.identity).catch((e=>{})),this.wire.environment.getWebWindow(this.identity)}isMainWindow(){return this.wire.sendAction("window-is-main-window",this.identity).catch((e=>{})),this.me.uuid===this.me.name}isShowing(){return this.wire.sendAction("is-window-showing",this.identity).then((({payload:e})=>e.data))}maximize(){return this.wire.sendAction("maximize-window",this.identity).then((()=>{}))}minimize(){return this.wire.sendAction("minimize-window",this.identity).then((()=>{}))}moveBy(e,t,n){return this.wire.sendAction("move-window-by",{deltaLeft:e,deltaTop:t,positioningOptions:n,...this.identity}).then((()=>{}))}moveTo(e,t,n){return this.wire.sendAction("move-window",{left:e,top:t,positioningOptions:n,...this.identity}).then((()=>{}))}resizeBy(e,t,n,i){return this.wire.sendAction("resize-window-by",{deltaWidth:Math.floor(e),deltaHeight:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}resizeTo(e,t,n,i){return this.wire.sendAction("resize-window",{width:Math.floor(e),height:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}restore(){return this.wire.sendAction("restore-window",this.identity).then((()=>{}))}setAsForeground(){return this.wire.sendAction("set-foreground-window",this.identity).then((()=>{}))}setBounds(e,t){return this.wire.sendAction("set-window-bounds",{...e,...this.identity,positioningOptions:t}).then((()=>{}))}show(e=!1){return this.wire.sendAction("show-window",{force:e,...this.identity}).then((()=>{}))}showAt(e,t,n=!1){return this.wire.sendAction("show-at-window",{force:n,left:Math.floor(e),top:Math.floor(t),...this.identity}).then((()=>{}))}updateOptions(e){return this.wire.sendAction("update-window-options",{options:e,...this.identity}).then((()=>{}))}authenticate(e,t){return this.wire.sendAction("window-authenticate",{userName:e,password:t,...this.identity}).then((()=>{}))}async showPopupMenu(e){const{payload:t}=await this.wire.sendAction("show-popup-menu",{options:e,...this.identity});return t.data}async closePopupMenu(){return this.wire.sendAction("close-popup-menu",{...this.identity}).then((()=>{}))}async dispatchPopupResult(e){this.wire.sendAction("window-dispatch-popup-result",this.identity).catch((e=>{})),await this.wire.sendAction("dispatch-popup-result",{data:e,...this.identity})}async print(e={content:"self"}){switch(e.content){case void 0:case"self":return super.print(e);case"screenshot":return this.wire.sendAction("print-screenshot",this.identity).then((()=>{}));case"views":return this.wire.sendAction("print-views",{...this.identity,options:e}).then((()=>{}));default:return}}}return S._Window=o,S}function ie(){return te||(te=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(function(){if(ee)return _;ee=1,Object.defineProperty(_,"__esModule",{value:!0}),_._WindowModule=void 0;const e=d,t=O,n=ne();class i extends e.Base{async wrap(e){this.wire.sendAction("window-wrap").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}wrapSync(e){this.wire.sendAction("window-wrap-sync").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}create(e){return this.wire.sendAction("create-window").catch((e=>{})),new n._Window(this.wire,{uuid:this.me.uuid,name:e.name}).createWindow(e)}getCurrent(){if(this.wire.sendAction("get-current-window").catch((e=>{})),!this.wire.me.isWindow)throw new Error("You are not in a Window context");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction("get-current-window-sync").catch((e=>{})),!this.wire.me.isWindow)throw new Error("You are not in a Window context");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return _._WindowModule=i,_}(),e),n(ne(),e)}(M)),M}Q.promisifySubscription=async(e,t,n=(()=>!0),i)=>{let r,o,s;const a=new Promise(((e,t)=>{r=e,o=t})),c=e=>{n(e)&&(clearTimeout(s),r(e))};return await e.on(t,c),i&&(s=setTimeout((()=>o(new Error("event timed out"))),i)),a.finally((()=>{e.removeListener(t,c).catch((()=>null))})),{getValue:()=>a}},Object.defineProperty(c,"__esModule",{value:!0}),c.System=void 0;const re=d,oe=g,se=ie(),ae=t;class ce extends re.EmitterBase{constructor(e){super(e,"system")}sendExternalProcessRequest(e,t){return new Promise(((n,i)=>{const r="external-process-exited";let o,s,a,c;"function"==typeof t.listener&&(a=e=>{const n=e||{};s={topic:"exited",uuid:n.processUuid||"",exitCode:n.exitCode||0},o===e.processUuid&&(t.listener(s),c.removeListener(r,a))},this.wire.me.name||(this.wire.me.name=this.wire.me.uuid),c=new se._Window(this.wire,this.wire.me),c.on(r,a)),this.wire.sendAction(e,t).then((({payload:e})=>{o=e.data.uuid,n(e.data),s&&o===s.uuid&&(t.listener(s),c.removeListener(r,a))})).catch((e=>{c&&c.removeListener(r,a),i(e)}))}))}getVersion(){return this.wire.sendAction("get-version").then((({payload:e})=>e.data))}clearCache(e){return this.wire.sendAction("clear-cache",e).then((()=>{}))}deleteCacheOnExit(){return this.wire.sendAction("delete-cache-request").then((()=>{}))}exit(){return this.wire.sendAction("exit-desktop").then((()=>{}))}async fetchManifest(e){const{payload:{data:t}}=await this.wire.sendAction("fetch-manifest",{manifestUrl:e});return t}flushCookieStore(){return this.wire.sendAction("flush-cookie-store").then((()=>{}))}getAllWindows(){return this.wire.sendAction("get-all-windows").then((({payload:e})=>e.data))}getAllApplications(){return this.wire.sendAction("get-all-applications").then((({payload:e})=>e.data))}getCommandLineArguments(){return this.wire.sendAction("get-command-line-arguments").then((({payload:e})=>e.data))}async getCrashReporterState(){const{payload:{data:{diagnosticMode:e,isRunning:t}}}=await this.wire.sendAction("get-crash-reporter-state");return console.warn("diagnosticMode property is deprecated. It will be removed in a future version"),{diagnosticMode:e,diagnosticsMode:e,isRunning:t}}async startCrashReporter(e){const t=e,n={...t,diagnosticMode:t.diagnosticsMode||t.diagnosticMode},{payload:{data:{diagnosticMode:i,isRunning:r}}}=await this.wire.sendAction("start-crash-reporter",n);return{diagnosticMode:i,diagnosticsMode:i,isRunning:r}}getUniqueUserId(){return this.wire.sendAction("get-unique-user-id").then((({payload:e})=>e.data))}getEntityInfo(e,t){return this.wire.sendAction("get-entity-info",{uuid:e,name:t}).then((({payload:e})=>e.data))}getEnvironmentVariable(e){return this.wire.sendAction("get-environment-variable",{environmentVariables:e}).then((({payload:e})=>e.data))}getFocusedWindow(){return this.wire.sendAction("get-focused-window").then((({payload:e})=>e.data))}async isAppCertified(e){const{payload:{data:{certifiedInfo:t}}}=await this.wire.sendAction("is-app-certified",{manifestUrl:e});return t}getInstalledRuntimes(){return this.wire.sendAction("get-installed-runtimes").then((({payload:e})=>e.data.runtimes))}async getInstalledApps(){const{payload:{data:{installedApps:e}}}=await this.wire.sendAction("get-installed-apps");return e}getLog(e){return this.wire.sendAction("view-log",e).then((({payload:e})=>e.data))}getMachineId(){return this.wire.sendAction("get-machine-id").then((({payload:e})=>e.data))}getMinLogLevel(){return this.wire.sendAction("get-min-log-level").then((({payload:e})=>e.data))}getLogList(){return this.wire.sendAction("list-logs").then((({payload:e})=>e.data))}getMonitorInfo(){return this.wire.sendAction("get-monitor-info").then((({payload:e})=>e.data))}getMousePosition(){return this.wire.sendAction("get-mouse-position").then((({payload:e})=>e.data))}getProcessList(){return console.warn("System.getProcessList has been deprecated. Please consider using our new process APIs: Window.getProcessInfo, View.getProcessInfo, Application.getProcessInfo, System.getAllProcessInfo"),this.wire.sendAction("process-snapshot").then((({payload:e})=>e.data))}async getAllProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction("get-all-process-info",this.identity);return e}getProxySettings(){return this.wire.sendAction("get-proxy-settings").then((({payload:e})=>e.data))}getRuntimeInfo(){return this.wire.sendAction("get-runtime-info").then((({payload:e})=>e.data))}getRvmInfo(){return this.wire.sendAction("get-rvm-info").then((({payload:e})=>e.data))}getHostSpecs(){return this.wire.sendAction("get-host-specs").then((({payload:e})=>e.data))}getOSInfo(){return this.wire.sendAction("get-os-info").then((({payload:e})=>e.data))}launchExternalProcess(e){return this.sendExternalProcessRequest("launch-external-process",e)}monitorExternalProcess(e){return this.sendExternalProcessRequest("monitor-external-process",e)}log(e,t){return this.wire.sendAction("write-to-log",{level:e,message:t}).then((()=>{}))}openUrlWithBrowser(e){return this.wire.sendAction("open-url-with-browser",{url:e}).then((()=>{}))}async registerCustomProtocol(e){if("object"!=typeof e)throw new Error("Must provide an object with a `protocolName` property having a string value.");await this.wire.sendAction("register-custom-protocol",e)}async unregisterCustomProtocol(e){await this.wire.sendAction("unregister-custom-protocol",{protocolName:e})}async getCustomProtocolState(e){return this.wire.sendAction("get-custom-protocol-state",{protocolName:e}).then((({payload:e})=>e.data))}releaseExternalProcess(e){return this.wire.sendAction("release-external-process",{uuid:e}).then((()=>{}))}showDeveloperTools(e){return this.wire.sendAction("show-developer-tools",e).then((()=>{}))}terminateExternalProcess(e){return this.wire.sendAction("terminate-external-process",e).then((()=>{}))}updateProxySettings(e){return this.wire.sendAction("update-proxy",e).then((()=>{}))}async downloadAsset(e,t){const n=()=>{};let i=n,r=n;const o=new Promise(((e,t)=>{i=e,r=t}));if("openfin"!==this.wire.environment.type)throw new oe.NotSupportedError("downloadAsset only supported in an OpenFin Render process");const s=oe.RuntimeError.getCallSite(),a=this.wire.environment.getNextMessageId().toString(),c=`asset-download-progress-${a}`,d=`asset-download-error-${a}`,h=`asset-download-complete-${a}`,l=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},u=()=>{this.removeListener(c,l)};await Promise.all([this.on(c,l),this.once(d,(e=>{u();const{reason:t,err:n}=e;r(new oe.RuntimeError({reason:t,error:n},s))})),this.once(h,(()=>{u(),i()}))]);const p=Object.assign(e,{downloadId:a});return await this.wire.sendAction("download-asset",p).catch((e=>{throw u(),e})),o}downloadRuntime(e,t){const n=oe.RuntimeError.getCallSite();return new Promise(((i,r)=>{if("openfin"!==this.wire.environment.type)return void r(new oe.NotSupportedError("downloadRuntime only supported in an OpenFin Render process"));const o=this.wire.environment.getNextMessageId().toString(),s=`runtime-download-progress-${o}`,a=`runtime-download-error-${o}`,c=`runtime-download-complete-${o}`,d=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},h=()=>{this.removeListener(s,d)};this.on(s,d),this.once(a,(e=>{h();const{reason:t,err:i}=e;r(new oe.RuntimeError({reason:t,error:i},n))})),this.once(c,(()=>{h(),i()}));const l=Object.assign(e,{downloadId:o});this.wire.sendAction("download-runtime",l).catch((e=>{h(),r(e)}))}))}downloadPreloadScripts(e){return this.wire.sendAction("download-preload-scripts",{scripts:e}).then((({payload:e})=>e.data))}getAllExternalApplications(){return this.wire.sendAction("get-all-external-applications").then((({payload:e})=>e.data))}getAppAssetInfo(e){return this.wire.sendAction("get-app-asset-info",e).then((({payload:e})=>e.data))}getCookies(e){const t=this.wire.environment.getUrl(),n=Object.assign(e,{url:t});return this.wire.sendAction("get-cookies",n).then((({payload:e})=>e.data))}setMinLogLevel(e){return this.wire.sendAction("set-min-log-level",{level:e}).then((()=>{}))}resolveUuid(e){return this.wire.sendAction("resolve-uuid",{entityKey:e}).then((({payload:e})=>e.data))}executeOnRemote(e,t){return t.requestingIdentity=e,this.wire.ferryAction(t)}readRegistryValue(e,t,n){return this.wire.sendAction("read-registry-value",{rootKey:e,subkey:t,value:n}).then((({payload:e})=>e.data))}registerExternalConnection(e){return this.wire.sendAction("register-external-connection",{uuid:e}).then((({payload:e})=>e.data))}async getServiceConfiguration(e){if("string"!=typeof e.name)throw new Error("Must provide an object with a `name` property having a string value");const{name:t}=e;return this.wire.sendAction("get-service-configuration",{name:t}).then((({payload:e})=>e.data))}async getSystemAppConfig(e){if("string"!=typeof e)throw new Error("Must provide a string value for name of system app");return this.wire.sendAction("get-system-app-configuration",{name:e}).then((({payload:e})=>e.data))}async registerShutdownHandler(e){this.wire.sendAction("system-register-shutdown-handler").catch((e=>{}));const{uuid:t,name:n}=this.wire.me;this.on("system-shutdown",(i=>{e({proceed:()=>{this.wire.environment.raiseEvent("application/system-shutdown-handled",{uuid:t,name:n,topic:"application"})}})}))}runRvmHealthCheck(){return this.wire.sendAction("run-rvm-health-check").then((({payload:e})=>e.data))}async launchManifest(e,t={}){const{subscribe:n,...i}=t,r=i;if(n){const e=new ae.EventEmitter;n(e);const t="app-version-progress",i="runtime-status",o="app-version-complete",s="app-version-error",a=this.wire.environment.getNextMessageId().toString();r.appVersionId=a;const c=[o,t,i,s],d=e=>{const{appVersionId:t,topic:n,type:i,...r}=e;return{...r,type:c.find((e=>i.includes(e)))}},h=t=>{const n=d(t);e.emit(n.type,n)},l=()=>{this.removeListener(`${t}.${a}`,h),this.removeListener(`${i}.${a}`,h),this.removeListener(`${o}.${a}`,h),this.removeListener(`${s}.${a}`,h),this.removeListener(`${o}.${a}`,l),this.removeListener(`${s}.${a}`,l)};await Promise.all([this.on(`${t}.${a}`,h),this.on(`${i}.${a}`,h),this.once(`${o}.${a}`,h),this.once(`${s}.${a}`,h),this.once(`${o}.${a}`,l),this.once(`${s}.${a}`,l)])}return(await this.wire.sendAction("launch-manifest",{manifestUrl:e,opts:r})).payload.data.manifest}async queryPermissionForCurrentContext(e){const t={uuid:this.wire.me.uuid,name:this.wire.me.name};return(await this.wire.sendAction("query-permission-for-current-context",{apiName:e,identity:t})).payload.data}async enableNativeWindowIntegrationProvider(e){const{payload:t}=await this.wire.sendAction("enable-native-window-integration-provider",{permissions:e});return t.data}async registerUsage({data:e,type:t}){await this.wire.sendAction("register-usage",{data:e,type:t})}async getPrinters(){const{payload:e}=await this.wire.sendAction("system-get-printers");return e.data}async updateProcessLoggingOptions(e){await this.wire.sendAction("system-update-process-logging-options",{options:e})}async getDomainSettings(){const{payload:{data:e}}=await this.wire.sendAction("get-domain-settings",this.identity);return e}async setDomainSettings(e){await this.wire.sendAction("set-domain-settings",{domainSettings:e,...this.identity})}async refreshExtensions(){const{payload:e}=await this.wire.sendAction("refresh-extensions");return e.data}async getInstalledExtensions(){const{payload:e}=await this.wire.sendAction("get-installed-extensions");return e.data}}c.System=ce;var de={},he={};Object.defineProperty(he,"__esModule",{value:!0}),he.RefCounter=void 0;he.RefCounter=class{constructor(){this.topicRefMap=new Map}incRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t+1;n=i,this.topicRefMap.set(e,i)}else this.topicRefMap.set(e,1),n=1;return n}decRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t-1;this.topicRefMap.set(e,i),n=i}else n=-1;return n}actOnFirst(e,t,n){return 1===this.incRefCount(e)?t():n()}actOnLast(e,t,n){return 0===this.decRefCount(e)?t():n()}};var le={},ue={},pe={};Object.defineProperty(pe,"__esModule",{value:!0}),pe.ChannelBase=pe.ProtectedItems=void 0;const we=e=>async(t,n,i)=>{const r=await e(t,n,i);return void 0===r?n:r};pe.ProtectedItems=class{constructor(e,t){this.providerIdentity=e,this.close=t}};class ye{static defaultAction(e){throw new Error(`No action registered at target for ${e}`)}constructor(){this.subscriptions=new Map}async processAction(e,t,n){try{const i=this.subscriptions.has(e)?this.subscriptions.get(e):(t,n)=>(this.defaultAction??ye.defaultAction)(e,t,n),r=this.preAction?await this.preAction(e,t,n):t,o=await i(r,n);return this.postAction?await this.postAction(e,o,n):o}catch(t){if(this.errorMiddleware)return this.errorMiddleware(e,t,n);throw t}}beforeAction(e){if(this.preAction)throw new Error("Already registered beforeAction middleware");this.preAction=we(e)}onError(e){if(this.errorMiddleware)throw new Error("Already registered error middleware");this.errorMiddleware=e}afterAction(e){if(this.postAction)throw new Error("Already registered afterAction middleware");this.postAction=we(e)}remove(e){this.subscriptions.delete(e)}setDefaultAction(e){if(this.defaultAction)throw new Error("default action can only be set once");this.defaultAction=e}register(e,t){if(this.subscriptions.has(e))throw new Error(`Subscription already registered for action: ${e}. Unsubscribe before adding new subscription`);return this.subscriptions.set(e,t),!0}}pe.ChannelBase=ye;var fe,ge,me,ve=s&&s.__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)},Ce=s&&s.__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};Object.defineProperty(ue,"__esModule",{value:!0}),ue.ChannelClient=void 0;const be=pe,Ie=new Map;class Ee extends be.ChannelBase{static closeChannelByEndpointId(e){const t=Ie.get(e);t&&ve(t,me,"f").call(t)}static handleProviderDisconnect(e){for(const t of Ie.values())t.providerIdentity.channelId===e.channelId&&(t.disconnectListener(e),ve(t,me,"f").call(t))}constructor(e,t,n){super(),fe.set(this,void 0),ge.set(this,void 0),this.processAction=(e,t,n)=>super.processAction(e,t,n),me.set(this,(()=>{Ie.delete(this.endpointId),ve(this,ge,"f").close()})),Ce(this,fe,new be.ProtectedItems(e,t),"f"),this.disconnectListener=()=>{},this.endpointId=e.endpointId,Ce(this,ge,n,"f"),Ie.set(this.endpointId,this),n.receive(this.processAction)}get providerIdentity(){return ve(this,fe,"f").providerIdentity}async dispatch(e,t){if(ve(this,ge,"f").isEndpointConnected(this.providerIdentity.channelId))return ve(this,ge,"f").send(this.providerIdentity.channelId,e,t);throw new Error("The client you are trying to dispatch from is disconnected from the target provider.")}onDisconnection(e){this.disconnectListener=t=>{try{e(t)}catch(e){throw new Error(`Error while calling the onDisconnection callback: ${e.message}`)}finally{this.disconnectListener=()=>{}}}}async disconnect(){await this.sendDisconnectAction(),ve(this,me,"f").call(this)}async sendDisconnectAction(){const e=ve(this,fe,"f");await e.close()}static async wireClose(e,t,n){const{channelName:i,uuid:r,name:o}=t;await e.sendAction("disconnect-from-channel",{channelName:i,uuid:r,name:o,endpointId:n})}}ue.ChannelClient=Ee,fe=new WeakMap,ge=new WeakMap,me=new WeakMap;var xe={},Ae={};Object.defineProperty(Ae,"__esModule",{value:!0}),Ae.exhaustiveCheck=void 0,Ae.exhaustiveCheck=function(e,t){throw new Error(`Unsupported value: ${e}${t?`\n Supported values are: ${t.join("")}`:""}`)};var Pe,Me,_e,Oe={},Se=s&&s.__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},Re=s&&s.__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)};Object.defineProperty(Oe,"__esModule",{value:!0}),Oe.ClassicInfo=Oe.ClassicStrategy=void 0;Oe.ClassicStrategy=class{constructor(e,t,n,i){this.messageReceiver=t,this.endpointId=n,this.providerIdentity=i,Pe.set(this,void 0),Me.set(this,new Map),_e.set(this,new Map),this.send=async(e,t,n)=>{const i=Re(this,Me,"f").get(e);if(!i)throw new Error(`Could not locate routing info for endpoint ${e}`);const r={...i};r.isLocalEndpointId&&delete r.endpointId,delete r.isLocalEndpointId;const o=Re(this,Pe,"f").sendAction("send-channel-message",{...r,providerIdentity:this.providerIdentity,action:t,payload:n});Re(this,_e,"f").get(e)?.add(o);return(await o.catch((e=>{throw new Error(e.message)})).finally((()=>{Re(this,_e,"f").get(e)?.delete(o)}))).payload.data.result},this.close=async()=>{this.messageReceiver.removeEndpoint(this.providerIdentity.channelId,this.endpointId),[...Re(this,Me,"f").keys()].forEach((e=>this.closeEndpoint(e))),Se(this,Me,new Map,"f")},Se(this,Pe,e,"f")}onEndpointDisconnect(e,t){}receive(e){this.messageReceiver.addEndpoint(e,this.providerIdentity.channelId,this.endpointId)}async closeEndpoint(e){const t=Re(this,Me,"f").get(e);Re(this,Me,"f").delete(e);const n=Re(this,_e,"f").get(e);n?.forEach((n=>{const i=`Channel connection with identity uuid: ${t?.uuid} / name: ${t?.name} / endpointId: ${e} no longer connected.`;n.cancel(new Error(i))}))}isEndpointConnected(e){return Re(this,Me,"f").has(e)}addEndpoint(e,t){Re(this,Me,"f").set(e,t.endpointIdentity),Re(this,_e,"f").set(e,new Set)}isValidEndpointPayload(e){return"string"==typeof e?.endpointIdentity?.endpointId||"string"==typeof e?.endpointIdentity?.channelId}},Pe=new WeakMap,Me=new WeakMap,_e=new WeakMap,Oe.ClassicInfo={version:5,minimumVersion:0,type:"classic"};var Fe={},je={},ke={};Object.defineProperty(ke,"__esModule",{value:!0}),ke.errorToPOJO=void 0,ke.errorToPOJO=function(e){return{stack:e.stack,name:e.name,message:e.message,toString:()=>e.stack||e.toString()}};var Le,Te,$e=s&&s.__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)},Be=s&&s.__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};Object.defineProperty(je,"__esModule",{value:!0}),je.RTCEndpoint=void 0;const Ge=ke;je.RTCEndpoint=class{static isValidEndpointPayload(e){const t=e=>"object"==typeof e&&null!==e;return t(e)&&t(e.endpointIdentity)&&t(e.rtc)&&"string"==typeof e.endpointIdentity.endpointId}constructor({rtc:e,endpointIdentity:t}){this.responseMap=new Map,Le.set(this,null),Te.set(this,void 0),this.connectionStateChangeHandler=e=>{"connected"!==this.rtc.rtcClient.connectionState&&(this.rtc.rtcClient.removeEventListener("connectionstatechange",this.connectionStateChangeHandler),this.close(),$e(this,Te,"f")&&$e(this,Te,"f").call(this))},this.send=async(e,t)=>{const n=`message-${Math.random()}`,i=new Promise(((e,t)=>{this.responseMap.set(n,{resolve:e,reject:t})}));return this.rtc.channels.request.send(JSON.stringify({action:e,payload:t,messageId:n})),i},this.close=()=>{this.responseMap.forEach((e=>e.reject("Connection has closed."))),this.responseMap=new Map,this.rtc.channels.request.close(),this.rtc.channels.response.close(),this.rtc.rtcClient.close()},this.rtc=e,this.endpointIdentity=t,this.rtc.channels.response.addEventListener("message",(e=>{let{data:t}=e;e.data instanceof ArrayBuffer&&(t=(new TextDecoder).decode(e.data));const{messageId:n,payload:i,success:r,error:o}=JSON.parse(t),{resolve:s,reject:a}=this.responseMap.get(n)??{};s&&a?(this.responseMap.delete(n),r?s(i):a(o)):(console.log("Could not find id in responseMap."),console.log(e))})),this.rtc.channels.request.addEventListener("message",(async e=>{let{data:n}=e;e.data instanceof ArrayBuffer&&(n=(new TextDecoder).decode(e.data));const{messageId:i,action:r,payload:o}=JSON.parse(n);if($e(this,Le,"f"))try{const e=await $e(this,Le,"f").call(this,r,o,t);this.rtc.channels.response.send(JSON.stringify({messageId:i,payload:e,success:!0}))}catch(e){"open"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,error:(0,Ge.errorToPOJO)(e),success:!1}))}else"open"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,success:!1,error:"Connection not ready."}))})),this.rtc.rtcClient.addEventListener("connectionstatechange",this.connectionStateChangeHandler),Object.values(this.rtc.channels).forEach((e=>{e.onclose=e=>{[...this.responseMap.values()].forEach((e=>e.reject(new Error("RTCDataChannel closed unexpectedly, this is most commonly caused by message size. Note: RTC Channels have a message size limit of ~255kB.")))),this.close(),$e(this,Te,"f")&&$e(this,Te,"f").call(this)}}))}onDisconnect(e){if($e(this,Te,"f"))throw new Error("RTCEndpoint disconnectListener cannot be set twice.");Be(this,Te,e,"f")}receive(e){if($e(this,Le,"f"))throw new Error("You have already set a listener for this RTC Endpoint.");Be(this,Le,e,"f")}get connected(){return"connected"===this.rtc.rtcClient.connectionState}},Le=new WeakMap,Te=new WeakMap;var We,He,Ne,De={},Ue=s&&s.__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)},Ve=s&&s.__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};Object.defineProperty(De,"__esModule",{value:!0}),De.EndpointStrategy=void 0;De.EndpointStrategy=class{constructor(e,t,n){this.EndpointType=e,this.StrategyName=n,We.set(this,null),He.set(this,new Map),Ne.set(this,!0),this.send=async(e,t,n)=>this.getEndpointById(e).send(t,n),this.close=async()=>{Ue(this,Ne,"f")&&(Ue(this,He,"f").forEach((e=>e.close())),Ve(this,He,new Map,"f")),Ve(this,Ne,!1,"f")},this.isValidEndpointPayload=t}onEndpointDisconnect(e,t){this.getEndpointById(e).onDisconnect(t)}receive(e){if(Ue(this,We,"f"))throw new Error(`You have already set a listener for this ${this.StrategyName} Strategy`);Ve(this,We,e,"f"),Ue(this,He,"f").forEach((e=>e.receive(Ue(this,We,"f"))))}getEndpointById(e){const t=Ue(this,He,"f").get(e);if(!t)throw new Error(`Client with endpoint id ${e} is not connected`);return t}get connected(){return Ue(this,Ne,"f")}isEndpointConnected(e){return Ue(this,He,"f").has(e)}addEndpoint(e,t){if(!Ue(this,Ne,"f"))return void console.warn(`Adding endpoint to disconnected ${this.StrategyName} Strategy`);const n=new this.EndpointType(t);Ue(this,We,"f")&&n.receive(Ue(this,We,"f")),Ue(this,He,"f").set(e,n)}async closeEndpoint(e){Ue(this,He,"f").delete(e)}},We=new WeakMap,He=new WeakMap,Ne=new WeakMap,Object.defineProperty(Fe,"__esModule",{value:!0}),Fe.RTCInfo=Fe.RTCStrategy=void 0;const ze=je,Ke=De;class qe extends Ke.EndpointStrategy{constructor(){super(ze.RTCEndpoint,ze.RTCEndpoint.isValidEndpointPayload,"RTC")}}Fe.RTCStrategy=qe,Fe.RTCInfo={version:2,minimumVersion:0,type:"rtc"};var Je={};Object.defineProperty(Je,"__esModule",{value:!0}),Je.RTCICEManager=void 0;const Ye=d;class Ze extends Ye.EmitterBase{constructor(e){super(e,"channel"),this.ensureChannelOpened=e=>new Promise(((t,n)=>{if("open"===e.readyState)t();else if("connecting"===e.readyState){const n=()=>{e.removeEventListener("open",n),t()};e.addEventListener("open",n)}else n(new Error("This Channel has already closed"))}))}static createDataChannelPromise(e,t){let n;const i=new Promise((e=>{n=e})),r=i=>{const o=()=>{i.channel.removeEventListener("open",o),n(i.channel)};i.channel.label===e&&(i.channel.addEventListener("open",o),t.removeEventListener("datachannel",r))};return t.addEventListener("datachannel",r),i}async listenForProviderIce(e,t){await this.on(this.createProviderEventName(e),t,{timestamp:Date.now()})}async raiseProviderIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createProviderEventName(e)),t)}async listenForClientIce(e,t){await this.on(this.createClientEventName(e),t,{timestamp:Date.now()})}async raiseClientIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createClientEventName(e)),t)}cleanupIceListeners(e){this.removeAllListeners(this.createClientEventName(e)),this.removeAllListeners(this.createProviderEventName(e))}createClientEventName(e){return`ice-client-${e}`}createProviderEventName(e){return`ice-provider-${e}`}createRouteString(e){return`channel/${e}`}createRtcPeer(){return this.wire.environment.getRtcPeer()}async startClientOffer(){const e=Math.random().toString(),t=this.createRtcPeer();t.addEventListener("icecandidate",(async t=>{t.candidate&&await this.raiseClientIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForProviderIce(e,(async e=>{await t.addIceCandidate(e.candidate)}));const n={request:t.createDataChannel("request"),response:t.createDataChannel("response")},i=await t.createOffer();await t.setLocalDescription(i);const r=Promise.all([n.request,n.response].map(this.ensureChannelOpened)).then((()=>{}));return{rtcClient:t,channels:n,offer:i,rtcConnectionId:e,channelsOpened:r}}async finishClientOffer(e,t,n){return await e.setRemoteDescription(t),await n,!0}async createProviderAnswer(e,t){const n=this.createRtcPeer(),i=Ze.createDataChannelPromise("request",n),r=Ze.createDataChannelPromise("response",n);n.addEventListener("icecandidate",(async t=>{t.candidate&&await this.raiseProviderIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForClientIce(e,(async e=>{await n.addIceCandidate(e.candidate)})),await n.setRemoteDescription(t);const o=await n.createAnswer();await n.setLocalDescription(o);const s=Promise.all([i,r]).then((([t,n])=>(this.cleanupIceListeners(e),{request:t,response:n})));return{rtcClient:n,answer:o,channels:s}}}Je.RTCICEManager=Ze;var Qe={},Xe={};function et(e){return[...e.split(".").reverse().entries()].reduce(((e,[t,n])=>e+ +n*1e4**t),0)}function tt(e,t){return et(e)>=et(t)}function nt(e){return e.split("/")[0]}Object.defineProperty(Xe,"__esModule",{value:!0}),Xe.runtimeUuidMeetsMinimumRuntimeVersion=Xe.parseRuntimeUuid=Xe.meetsMinimumRuntimeVersion=void 0,Xe.meetsMinimumRuntimeVersion=tt,Xe.parseRuntimeUuid=nt,Xe.runtimeUuidMeetsMinimumRuntimeVersion=function(e,t){return tt(nt(e),t)};var it,rt,ot,st,at,ct=s&&s.__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)},dt=s&&s.__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};Object.defineProperty(Qe,"__esModule",{value:!0}),Qe.ChannelProvider=void 0;const ht=pe,lt=Xe;class ut extends ht.ChannelBase{get connections(){return[...ct(this,it,"f")]}static handleClientDisconnection(e,t){const n=e.connections.find((e=>e.endpointId===t.endpointId));if(n)ct(e,st,"f").call(e,n);else{e.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name)).forEach(ct(e,st,"f"))}e.disconnectListener(t)}static setProviderRemoval(e,t){ut.removalMap.set(e,t)}constructor(e,t,n){super(),it.set(this,void 0),rt.set(this,void 0),ot.set(this,void 0),st.set(this,(e=>{const t=this.connections.filter((t=>t.endpointId!==e.endpointId));ct(this,ot,"f").closeEndpoint(e.endpointId),dt(this,it,t,"f")})),this.processAction=async(e,t,n)=>(ut.clientIsMultiRuntime(n)&&!(0,lt.runtimeUuidMeetsMinimumRuntimeVersion)(n.runtimeUuid,"18.87.56.0")?this.handleMultiRuntimeLegacyClient(n):this.checkForClientConnection(n),super.processAction(e,t,n)),at.set(this,(()=>{ct(this,ot,"f").close();const e=ut.removalMap.get(this);e&&e()})),dt(this,rt,new ht.ProtectedItems(e,t),"f"),this.connectListener=()=>{},this.disconnectListener=()=>{},dt(this,it,[],"f"),dt(this,ot,n,"f"),n.receive(this.processAction)}dispatch(e,t,n){const i=e.endpointId??this.getEndpointIdForOpenFinId(e,t);return i&&ct(this,ot,"f").isEndpointConnected(i)?ct(this,ot,"f").send(i,t,n):Promise.reject(new Error(`Client connection with identity uuid: ${e.uuid} / name: ${e.name} / endpointId: ${i} no longer connected.`))}async processConnection(e,t){return ct(this,it,"f").push(e),this.connectListener(e,t)}publish(e,t){return this.connections.map((n=>ct(this,ot,"f").send(n.endpointId,e,t)))}onConnection(e){this.connectListener=e}onDisconnection(e){this.disconnectListener=e}async destroy(){const e=ct(this,rt,"f");e.providerIdentity,dt(this,it,[],"f"),await e.close(),ct(this,at,"f").call(this)}async getAllClientInfo(){return this.connections.map((e=>{const{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}=e;return{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}}))}checkForClientConnection(e){if(!this.isClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider.\n Client Identity: {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}isClientConnected(e){return ut.clientIdentityIncludesEndpointId(e)?this.connections.some((t=>t.endpointId===e.endpointId&&t.uuid===e.uuid&&t.name===e.name)):this.isLegacyClientConnected(e)}isLegacyClientConnected(e){return this.connections.some((t=>t.uuid===e.uuid&&t.name===e.name))}handleMultiRuntimeLegacyClient(e){if(!this.isLegacyClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider. Client Identity:\n {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}getEndpointIdForOpenFinId(e,t){const n=this.connections.filter((t=>t.name===e.name&&t.uuid===e.uuid));if(n.length>=2){const n=ct(this,rt,"f"),{uuid:i,name:r}=e,o=n?.providerIdentity.uuid,s=n?.providerIdentity.name;console.warn(`WARNING: Dispatch call may have unintended results. The "to" argument of your dispatch call is missing the\n "endpointId" parameter. The identity you are dispatching to ({uuid: ${i}, name: ${r}})\n has multiple channelClients for this channel. Your dispatched action: (${t}) from the provider:\n ({uuid: ${o}, name: ${s}}) will only be processed by the most recently-created client.`)}return n.pop()?.endpointId}static clientIdentityIncludesEndpointId(e){return void 0!==e.endpointId}static clientIsMultiRuntime(e){return void 0!==e.runtimeUuid}static async wireClose(e,t){await e.sendAction("destroy-channel",{channelName:t})}}Qe.ChannelProvider=ut,it=new WeakMap,rt=new WeakMap,ot=new WeakMap,st=new WeakMap,at=new WeakMap,ut.removalMap=new WeakMap;var pt={};Object.defineProperty(pt,"__esModule",{value:!0}),pt.MessageReceiver=void 0;const wt=ue,yt=d;class ft extends yt.Base{constructor(e){super(e),this.onmessage=e=>"process-channel-message"===e.action&&(this.processChannelMessage(e),!0),this.endpointMap=new Map,this.latestEndpointIdByChannelId=new Map,e.registerMessageHandler(this.onmessage.bind(this))}async processChannelMessage(e){const{senderIdentity:t,providerIdentity:n,action:i,ackToSender:r,payload:o,intendedTargetIdentity:s}=e.payload,a=s.channelId??s.endpointId??this.latestEndpointIdByChannelId.get(n.channelId),c=this.endpointMap.get(a);if(!c)return r.payload.success=!1,r.payload.reason=`Client connection with identity uuid: ${this.wire.me.uuid} / name: ${this.wire.me.name} / endpointId: ${a} no longer connected.`,this.wire.sendRaw(r);try{const e=await c(i,o,t);return r.payload.payload=r.payload.payload||{},r.payload.payload.result=e,this.wire.sendRaw(r)}catch(e){return r.payload.success=!1,r.payload.reason=e.message,this.wire.sendRaw(r)}}addEndpoint(e,t,n){this.endpointMap.set(n,e),t!==n&&this.latestEndpointIdByChannelId.set(t,n)}removeEndpoint(e,t){this.endpointMap.delete(t),this.latestEndpointIdByChannelId.get(e)===t&&this.latestEndpointIdByChannelId.delete(e)}checkForPreviousClientConnection(e){const t=this.latestEndpointIdByChannelId.get(e);t&&(wt.ChannelClient.closeChannelByEndpointId(t),console.warn("You have created a second connection to an older provider. First connection has been removed from the clientMap"),console.warn("If the provider calls publish(), you may receive multiple messages."))}}pt.MessageReceiver=ft;var gt={};Object.defineProperty(gt,"__esModule",{value:!0}),gt.ProtocolManager=void 0;gt.ProtocolManager=class{constructor(e){this.ProtocolsInPreferenceOrder=e,this.DefaultClientProtocols=["classic"],this.DefaultProviderProtocols=["classic"],this.getClientProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultClientProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(", ")}.`);return t},this.getProviderProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultProviderProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(", ")}.`);return t},this.getCompatibleProtocols=(e,t)=>t.supportedProtocols.filter((t=>e.some((e=>e.type===t.type&&t.version>=e.minimumVersion&&e.version>=(t.minimumVersion??0))))).slice(0,t.maxProtocols)}};var mt={};Object.defineProperty(mt,"__esModule",{value:!0});class vt{static combine(e,t){return new vt(e,t)}constructor(e,t){this.primary=e,this.secondary=t}onEndpointDisconnect(e,t){this.primary.onEndpointDisconnect(e,(()=>{this.secondary.isEndpointConnected(e)||t()})),this.secondary.onEndpointDisconnect(e,(()=>{this.primary.isEndpointConnected(e)||t()}))}isValidEndpointPayload(e){return this.primary.isValidEndpointPayload(e)||this.secondary.isValidEndpointPayload(e)}async closeEndpoint(e){await this.primary.closeEndpoint(e),await this.secondary.closeEndpoint(e)}isEndpointConnected(e){return this.primary.isEndpointConnected(e)||this.secondary.isEndpointConnected(e)}async addEndpoint(e,t){this.primary.isValidEndpointPayload(t)&&await this.primary.addEndpoint(e,t),this.secondary.isValidEndpointPayload(t)&&await this.secondary.addEndpoint(e,t)}receive(e){this.primary.receive(e),this.secondary.receive(e)}send(e,t,n){return this.primary.isEndpointConnected(e)?this.primary.send(e,t,n):this.secondary.send(e,t,n)}async close(){await Promise.all([this.primary.close(),this.secondary.close()])}}mt.default=vt;var Ct,bt,It=s&&s.__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},Et=s&&s.__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)},xt=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(xe,"__esModule",{value:!0}),xe.ConnectionManager=void 0;const At=Ae,Pt=d,Mt=Oe,_t=Fe,Ot=Je,St=Qe,Rt=pt,Ft=gt,jt=xt(mt);class kt extends Pt.Base{static getProtocolOptionsFromStrings(e){return e.map((e=>{switch(e){case"rtc":return _t.RTCInfo;case"classic":return Mt.ClassicInfo;default:return(0,At.exhaustiveCheck)(e,["rtc","classic"])}}))}constructor(e){super(e),Ct.set(this,void 0),bt.set(this,void 0),this.removeChannelFromProviderMap=e=>{this.providerMap.delete(e)},this.onmessage=e=>"process-channel-connection"===e.action&&(this.processChannelConnection(e),!0),this.providerMap=new Map,this.protocolManager=new Ft.ProtocolManager("node"===this.wire.environment.type?["classic"]:["rtc","classic"]),It(this,Ct,new Rt.MessageReceiver(e),"f"),It(this,bt,new Ot.RTCICEManager(e),"f"),e.registerMessageHandler(this.onmessage.bind(this))}createProvider(e,t){const n=Object.assign(this.wire.environment.getDefaultChannelOptions().create,e||{}),i=this.protocolManager.getProviderProtocols(n?.protocols),r=i.map((e=>{switch(e){case"rtc":return new _t.RTCStrategy;case"classic":return new Mt.ClassicStrategy(this.wire,Et(this,Ct,"f"),t.channelId,t);default:return(0,At.exhaustiveCheck)(e,["rtc","classic"])}}));let o;if(2===r.length){const[e,t]=r;o=jt.default.combine(e,t)}else{if(1!==r.length)throw new Error("failed to combine strategies");[o]=r}const s=new St.ChannelProvider(t,(()=>St.ChannelProvider.wireClose(this.wire,t.channelName)),o),a=t.channelId;return this.providerMap.set(a,{provider:s,strategy:o,supportedProtocols:kt.getProtocolOptionsFromStrings(i)}),St.ChannelProvider.setProviderRemoval(s,this.removeChannelFromProviderMap.bind(this)),s}async createClientOffer(e){const t=this.protocolManager.getClientProtocols(e?.protocols);let n;return{offer:{supportedProtocols:await Promise.all(t.map((async e=>{switch(e){case"rtc":{const{rtcClient:e,channels:t,offer:i,rtcConnectionId:r,channelsOpened:o}=await Et(this,bt,"f").startClientOffer();return n={rtcClient:e,channels:t,channelsOpened:o},{type:"rtc",version:_t.RTCInfo.version,payload:{offer:i,rtcConnectionId:r}}}case"classic":return{type:"classic",version:Mt.ClassicInfo.version};default:return(0,At.exhaustiveCheck)(e,["rtc","classic"])}}))),maxProtocols:2},rtc:n}}async createClientStrategy(e,t){t.endpointId||(t.endpointId=this.wire.environment.getNextMessageId(),Et(this,Ct,"f").checkForPreviousClientConnection(t.channelId));const n=t.answer??{supportedProtocols:[{type:"classic",version:1}]},i=(await Promise.all(n.supportedProtocols.map((async n=>"rtc"===n.type&&e?(await Et(this,bt,"f").finishClientOffer(e.rtcClient,n.payload.answer,e.channelsOpened),new _t.RTCStrategy):"classic"===n.type?new Mt.ClassicStrategy(this.wire,Et(this,Ct,"f"),t.endpointId,t):null)))).filter((e=>null!==e));let r;if(e&&!i.some((e=>e instanceof _t.RTCStrategy))&&e&&e.rtcClient.close(),i.length>=2)r=jt.default.combine(i[0],i[1]);else{if(!i.length)throw new Error("No compatible protocols");[r]=i}const o={endpointIdentity:t,rtc:e};return r.addEndpoint(t.channelId,o),r}async processChannelConnection(e){const{clientIdentity:t,providerIdentity:n,ackToSender:i,payload:r,offer:o}=e.payload;t.endpointId?t.isLocalEndpointId=!1:(t.endpointId=this.wire.environment.getNextMessageId(),t.isLocalEndpointId=!0);const s=n.channelId,a=this.providerMap.get(s);if(!a)return i.payload.success=!1,i.payload.reason=`Channel "${n.channelName}" has been destroyed.`,this.wire.sendRaw(i);const{provider:c,strategy:d,supportedProtocols:h}=a;try{if(!(c instanceof St.ChannelProvider))throw Error("Cannot connect to a channel client");const e=o??{supportedProtocols:[{type:"classic",version:1}],maxProtocols:1},n=this.protocolManager.getCompatibleProtocols(h,e);if(!n.length)throw new Error("This provider does not support any of the offered protocols.");const s=await c.processConnection(t,r);i.payload.payload=i.payload.payload||{};let a={supportedProtocols:[],endpointPayloadPromise:Promise.resolve({endpointIdentity:t})};return a=await n.reduce((async(e,t)=>{const n=await e;if("rtc"===t.type){const{answer:e,rtcClient:i,channels:r}=await Et(this,bt,"f").createProviderAnswer(t.payload.rtcConnectionId,t.payload.offer);n.supportedProtocols.push({type:"rtc",version:_t.RTCInfo.version,payload:{answer:e}}),n.endpointPayloadPromise=n.endpointPayloadPromise.then((e=>r.then((t=>({...e,rtc:{rtcClient:i,channels:t}})))))}else n.supportedProtocols.push({type:"classic",version:Mt.ClassicInfo.version});return n}),Promise.resolve(a)),a.endpointPayloadPromise.then((e=>d.addEndpoint(t.endpointId,e))),i.payload.payload.result=s,i.payload.payload.answer=a,this.wire.sendRaw(i)}catch(e){return i.payload.success=!1,i.payload.reason=e.message,this.wire.sendRaw(i)}}}xe.ConnectionManager=kt,Ct=new WeakMap,bt=new WeakMap;var Lt,Tt,$t,Bt=s&&s.__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},Gt=s&&s.__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)};Object.defineProperty(le,"__esModule",{value:!0}),le.Channel=void 0;const Wt=t,Ht=G,Nt=d,Dt=ue,Ut=xe,Vt=Qe;function zt(e){const t=Math.floor(e/10),n=Math.min(3e4,500*2**t);return new Promise((e=>{setTimeout((()=>{e(!1)}),n)}))}class Kt extends Nt.EmitterBase{constructor(e){super(e,"channel"),Lt.set(this,void 0),Tt.set(this,new Wt.EventEmitter),$t.set(this,new Ht.AsyncRetryableLazy((async()=>{await Promise.all([this.on("disconnected",(e=>{Dt.ChannelClient.handleProviderDisconnect(e)})),this.on("connected",((...e)=>{Gt(this,Tt,"f").emit("connected",...e)}))]).catch((()=>new Error("error setting up channel connection listeners")))}))),Bt(this,Lt,new Ut.ConnectionManager(e),"f")}async getAllChannels(){return this.wire.sendAction("get-all-channels").then((({payload:e})=>e.data))}async onChannelConnect(e){await this.on("connected",e)}async onChannelDisconnect(e){await this.on("disconnected",e)}async safeConnect(e,t,n){const i={count:0};do{let r=()=>{};const o=new Promise((t=>{r=n=>{e===n.channelName&&t(!0)},Gt(this,Tt,"f").on("connected",r)}));try{if(i.count>0){i.gotConnectedEvent=await Promise.race([zt(i.count),o]);const t=await this.wire.sendAction("connect-to-channel",{...n,retryInfo:i});return console.log(`Successfully connected to channelName: ${e}`),t.payload.data}const t=this.wire.sendAction("connect-to-channel",n);i.originalMessageId=t.messageId;return(await t).payload.data}catch(n){if(!n.message.includes("internal-nack"))throw n;t&&0===i.count&&console.warn(`No channel found for channelName: ${e}. Waiting for connection...`)}finally{i.count+=1,Gt(this,Tt,"f").removeListener("connected",r)}}while(t);throw new Error(`No channel found for channelName: ${e}.`)}async connect(e,t={}){if(await Gt(this,$t,"f").getValue(),!e||"string"!=typeof e)throw new Error("Please provide a channelName string to connect to a channel.");const n={wait:!0,...this.wire.environment.getDefaultChannelOptions().connect,...t},{offer:i,rtc:r}=await Gt(this,Lt,"f").createClientOffer(n);let o;(this.fin.me.isFrame||this.fin.me.isView||this.fin.me.isWindow)&&(o=(await this.fin.me.getInfo()).url);const s={channelName:e,...n,offer:i,connectionUrl:o},a=await this.safeConnect(e,n.wait,s),c=await Gt(this,Lt,"f").createClientStrategy(r,a),d=new Dt.ChannelClient(a,(()=>Dt.ChannelClient.wireClose(this.wire,a,a.endpointId)),c);return c.onEndpointDisconnect(a.channelId,(async()=>{try{await d.sendDisconnectAction()}catch(e){console.warn(`Something went wrong during disconnect for client with uuid: ${a.uuid} / name: ${a.name} / endpointId: ${a.endpointId}.`)}finally{Dt.ChannelClient.handleProviderDisconnect(a)}})),d}async create(e,t){if(!e)throw new Error("Please provide a channelName to create a channel");const{payload:{data:n}}=await this.wire.sendAction("create-channel",{channelName:e}),i=Gt(this,Lt,"f").createProvider(t,n);return this.on("client-disconnected",(t=>{t.channelName===e&&Vt.ChannelProvider.handleClientDisconnection(i,t)})),i}}le.Channel=Kt,Lt=new WeakMap,Tt=new WeakMap,$t=new WeakMap,Object.defineProperty(de,"__esModule",{value:!0}),de.InterAppPayload=de.InterApplicationBus=void 0;const qt=t,Jt=d,Yt=he,Zt=le,Qt=O;class Xt extends Jt.Base{constructor(e){super(e),this.events={subscriberAdded:"subscriber-added",subscriberRemoved:"subscriber-removed"},this.refCounter=new Yt.RefCounter,this.Channel=new Zt.Channel(e),this.emitter=new qt.EventEmitter,e.registerMessageHandler(this.onmessage.bind(this)),this.on=this.emitter.on.bind(this.emitter),this.removeAllListeners=this.emitter.removeAllListeners.bind(this.emitter)}async publish(e,t){await this.wire.sendAction("publish-message",{topic:e,message:t,sourceWindowName:this.me.name})}async send(e,t,n){const i=(0,Qt.validateIdentity)(e);if(i)throw new Error(i);await this.wire.sendAction("send-message",{destinationUuid:e.uuid,destinationWindowName:e.name,topic:t,message:n,sourceWindowName:this.me.name})}subscribe(e,t,n){const i=this.createSubscriptionKey(e.uuid,e.name||"*",t);return this.emitter.on(i,n),this.refCounter.actOnFirst(i,(async()=>{await this.wire.sendAction("subscribe",{sourceUuid:e.uuid,sourceWindowName:e.name||"*",topic:t,destinationWindowName:this.me.name})}),(()=>Promise.resolve()))}unsubscribe(e,t,n){const i=e.name||"*",r=this.createSubscriptionKey(e.uuid,i,t);return this.emitter.removeListener(r,n),this.refCounter.actOnLast(r,(async()=>{await this.wire.sendAction("unsubscribe",{sourceUuid:e.uuid,sourceWindowName:i,topic:t,destinationWindowName:this.me.name})}),(()=>new Promise((e=>e)).then((()=>{}))))}processMessage(e){const{payload:{message:t,sourceWindowName:n,sourceUuid:i,topic:r}}=e,o=[this.createSubscriptionKey(i,n,r),this.createSubscriptionKey(i,"*",r),this.createSubscriptionKey("*","*",r)],s={uuid:i,name:n};o.forEach((e=>{this.emitter.emit(e,t,s)}))}emitSubscriverEvent(e,t){const{payload:{targetName:n,uuid:i,topic:r}}=t,o={name:n,uuid:i,topic:r};this.emitter.emit(e,o)}createSubscriptionKey(e,t,n){const i=t||"*";if(!(e&&i&&n))throw new Error("Missing uuid, name, or topic string");return function(...e){return e.map((e=>Buffer.from(`${e}`).toString("base64"))).join("/")}(e,i,n)}onmessage(e){const{action:t}=e;switch(t){case"process-message":this.processMessage(e);break;case this.events.subscriberAdded:this.emitSubscriverEvent(this.events.subscriberAdded,e);break;case this.events.subscriberRemoved:this.emitSubscriverEvent(this.events.subscriberRemoved,e)}return!0}}de.InterApplicationBus=Xt;de.InterAppPayload=class{};var en={};Object.defineProperty(en,"__esModule",{value:!0}),en.Clipboard=void 0;const tn=d;class nn extends tn.Base{async writeText(e){await this.wire.sendAction("clipboard-write-text",e)}async readText(e){const{payload:t}=await this.wire.sendAction("clipboard-read-text",{type:e});return t.data}async writeImage(e){await this.wire.sendAction("clipboard-write-image",e)}async readImage(e={format:"dataURL"}){const{payload:t}=await this.wire.sendAction("clipboard-read-image",e);return t.data}async writeHtml(e){await this.wire.sendAction("clipboard-write-html",e)}async readHtml(e){const{payload:t}=await this.wire.sendAction("clipboard-read-html",{type:e});return t.data}async writeRtf(e){await this.wire.sendAction("clipboard-write-rtf",e)}async readRtf(e){const{payload:t}=await this.wire.sendAction("clipboard-read-rtf",{type:e});return t.data}async write(e){await this.wire.sendAction("clipboard-write",e)}async getAvailableFormats(e){const{payload:t}=await this.wire.sendAction("clipboard-read-formats",{type:e});return t.data}}en.Clipboard=nn;var rn={},on={},sn={};Object.defineProperty(sn,"__esModule",{value:!0}),sn.ExternalApplication=void 0;const an=d;class cn extends an.EmitterBase{constructor(e,t){super(e,"external-application",t.uuid),this.identity=t}getInfo(){return this.wire.sendAction("get-external-application-info",this.identity).then((({payload:e})=>e.data))}}sn.ExternalApplication=cn,Object.defineProperty(on,"__esModule",{value:!0}),on.ExternalApplicationModule=void 0;const dn=d,hn=sn;class ln extends dn.Base{wrap(e){return this.wire.sendAction("external-application-wrap").catch((e=>{})),Promise.resolve(new hn.ExternalApplication(this.wire,{uuid:e}))}wrapSync(e){return this.wire.sendAction("external-application-wrap-sync").catch((e=>{})),new hn.ExternalApplication(this.wire,{uuid:e})}}on.ExternalApplicationModule=ln,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(on,e),n(sn,e)}(rn);var un={},pn={},wn={};Object.defineProperty(wn,"__esModule",{value:!0}),wn._Frame=void 0;const yn=d;class fn extends yn.EmitterBase{constructor(e,t){super(e,"frame",t.uuid,t.name),this.identity=t}getInfo(){return this.wire.sendAction("get-frame-info",this.identity).then((({payload:e})=>e.data))}getParentWindow(){return this.wire.sendAction("get-parent-window",this.identity).then((({payload:e})=>e.data))}}wn._Frame=fn,Object.defineProperty(pn,"__esModule",{value:!0}),pn._FrameModule=void 0;const gn=d,mn=O,vn=wn;class Cn extends gn.Base{async wrap(e){this.wire.sendAction("frame-wrap").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}wrapSync(e){this.wire.sendAction("frame-wrap-sync").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}getCurrent(){return this.wire.sendAction("frame-get-current").catch((e=>{})),Promise.resolve(new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity()))}getCurrentSync(){return this.wire.sendAction("frame-get-current-sync").catch((e=>{})),new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity())}}pn._FrameModule=Cn,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(pn,e),n(wn,e)}(un);var bn={};Object.defineProperty(bn,"__esModule",{value:!0}),bn.GlobalHotkey=void 0;const In=d;class En extends In.EmitterBase{constructor(e){super(e,"global-hotkey")}async register(e,t){await this.on(e,t),await this.wire.sendAction("global-hotkey-register",{hotkey:e})}async unregister(e){await this.removeAllListeners(e),await this.wire.sendAction("global-hotkey-unregister",{hotkey:e})}async unregisterAll(){await Promise.all(this.eventNames().filter((e=>!("registered"===e||"unregistered"===e))).map((e=>this.removeAllListeners(e)))),await this.wire.sendAction("global-hotkey-unregister-all",{})}async isRegistered(e){const{payload:{data:t}}=await this.wire.sendAction("global-hotkey-is-registered",{hotkey:e});return t}}bn.GlobalHotkey=En;var xn,An={},Pn={},Mn={},_n=s&&s.__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)};Object.defineProperty(Mn,"__esModule",{value:!0}),Mn.Platform=void 0;const On=d,Sn=O,Rn=new Map;class Fn extends On.EmitterBase{constructor(e,t){super(t.wire,"application",e.uuid),this.getClient=e=>{this.wire.sendAction("platform-get-client",this.identity).catch((e=>{}));const t=e||this.identity,{uuid:n}=t;if(!Rn.has(n)){const e=_n(this,xn,"f").call(this,n);Rn.set(n,e)}return Rn.get(n)},xn.set(this,(async e=>{try{const t=`custom-frame-${e}`,n=await this._channel.connect(t,{wait:!1});return n.onDisconnection((()=>{Rn.delete(e)})),n}catch(t){throw Rn.delete(e),new Error("The targeted Platform is not currently running. Listen for application-started event for the given Uuid.")}})),this.launchLegacyManifest=this.launchContentManifest;const n=(0,Sn.validateIdentity)(e);if(n)throw new Error(n);this._channel=t,this.identity={uuid:e.uuid},this.Layout=this.fin.Platform.Layout,this.Application=this.fin.Application.wrapSync(this.identity)}async createView(e,t,n){this.wire.sendAction("platform-create-view",this.identity).catch((e=>{}));const i=await this.getClient(),r=await i.dispatch("create-view",{target:t,opts:e,targetView:n});if(!r||(0,Sn.validateIdentity)(r.identity))throw new Error(`When overwriting the createView call, please return an object that has a valid 'identity' property: ${JSON.stringify(r)}`);return this.fin.View.wrapSync(r.identity)}async createWindow(e){this.wire.sendAction("platform-create-window",this.identity).catch((e=>{}));const t=await this.getClient();e.reason||(e.reason="api-call");const n=await t.dispatch("create-view-container",e);if(!n||(0,Sn.validateIdentity)(n.identity))throw new Error(`When overwriting the createWindow call, please return an object that has a valid 'identity' property: ${JSON.stringify(n)}`);const{identity:i}=n,r=this.fin.Window.wrapSync(i);return r.name=i.name,r.uuid=i.uuid,r}async quit(){this.wire.sendAction("platform-quit",this.identity).catch((e=>{}));return(await this.getClient()).dispatch("quit")}async closeView(e){this.wire.sendAction("platform-close-view",this.identity).catch((e=>{}));const t=await this.getClient();await t.dispatch("close-view",{view:e})}async reparentView(e,t){console.warn("Platform.reparentView has been deprecated, please use Platform.createView"),this.wire.sendAction("platform-reparent-view",this.identity).catch((e=>{}));const n={...e,uuid:e.uuid??this.identity.uuid},i=await this.fin.View.wrap(n),r=await i.getOptions();return this.createView(r,t)}async getSnapshot(){this.wire.sendAction("platform-get-snapshot",this.identity).catch((e=>{}));return(await this.getClient()).dispatch("get-snapshot")}async getViewSnapshot(e){return(await this.getClient()).dispatch("get-view-snapshot",{viewIdentity:e})}async applySnapshot(e,t){this.wire.sendAction("platform-apply-snapshot",this.identity).catch((e=>{}));const n="Requested snapshot must be a valid Snapshot object, or a url or filepath to such an object.";let i;if("string"==typeof e)try{i=(await this._channel.wire.sendAction("get-application-manifest",{manifestUrl:e})).payload.data}catch(e){throw new Error(`${n}: ${e}`)}else i=e;if(!i.windows)throw new Error(n);const r=await this.getClient();return await r.dispatch("apply-snapshot",{snapshot:i,options:t}),this}async fetchManifest(e){return(await this.getClient()).dispatch("platform-fetch-manifest",{manifestUrl:e})}async launchContentManifest(e){this.wire.sendAction("platform-launch-content-manifest",this.identity).catch((()=>{}));const t=await this.getClient(),n=await this.fetchManifest(e);return t.dispatch("launch-into-platform",{manifest:n,manifestUrl:e}),this}async setWindowContext(e={},t){if(this.wire.sendAction("platform-set-window-context",this.identity).catch((e=>{})),!e)throw new Error("Please provide a serializable object or string to set the context.");const n=await this.getClient(),{entityType:i}=t?await this.fin.System.getEntityInfo(t.uuid,t.name):this.fin.me;await n.dispatch("set-window-context",{context:e,entityType:i,target:t||{uuid:this.fin.me.uuid,name:this.fin.me.name}})}async getWindowContext(e){this.wire.sendAction("platform-get-window-context",this.identity).catch((e=>{}));const t=await this.getClient(),{entityType:n}=e?await this.fin.System.getEntityInfo(e.uuid,e.name):this.fin.me;return t.dispatch("get-window-context",{target:e||{uuid:this.fin.me.uuid,name:this.fin.me.name},entityType:n})}async closeWindow(e,t={skipBeforeUnload:!1}){this.wire.sendAction("platform-close-window",this.identity).catch((e=>{}));return(await this.getClient()).dispatch("close-window",{windowId:e,options:t})}}Mn.Platform=Fn,xn=new WeakMap;var jn={},kn={},Ln={},Tn={};function $n(e){switch(e){case"columns":case"grid":case"rows":case"tabs":return!0;default:return!1}}Object.defineProperty(Tn,"__esModule",{value:!0}),Tn.overrideFromComposables=Tn.isValidPresetType=void 0,Tn.isValidPresetType=$n,Tn.overrideFromComposables=function(...e){return t=>e.reduceRight(((e,t)=>n=>t(e(n))),(e=>e))(t)},Tn.default={isValidPresetType:$n};var Bn={},Gn={},Wn={};Object.defineProperty(Wn,"__esModule",{value:!0}),Wn.ApiConsumer=void 0;Wn.ApiConsumer=class{constructor(e){this.strategy=e,this.consume=async e=>(await this.strategy.getExposedFunctions(e)).reduce(((t,n)=>({...t,[n.key]:this.strategy.createFunction(n,e)})),{})}};var Hn={},Nn={};Object.defineProperty(Nn,"__esModule",{value:!0}),Nn.expose=Nn.getExposedProperties=void 0;const Dn=Symbol("exposedProperties");Nn.getExposedProperties=e=>e[Dn]||e.prototype[Dn]||[];Nn.expose=e=>(t,n,i)=>{t[Dn]=t[Dn]||[],t[Dn].push({key:n,descriptor:i,options:e})},Object.defineProperty(Hn,"__esModule",{value:!0}),Hn.ApiExposer=void 0;const Un=Nn;Hn.ApiExposer=class{constructor(e){this.strategy=e,this.exposeInstance=async(e,t)=>{const n=(0,Un.getExposedProperties)(e),i=await Promise.all(n.map((async({key:n,options:i})=>({key:n,options:await this.strategy.exposeFunction(e[n].bind(e),{key:n,options:i,meta:t})}))));await this.strategy.exposeMeta(t,i)}}};var Vn={},zn={},Kn={};Object.defineProperty(Kn,"__esModule",{value:!0}),Kn.ChannelsConsumer=void 0;Kn.ChannelsConsumer=class{constructor(e){this.channel=e,this.getExposedFunctions=async e=>{const{id:t}=e,{props:n}=await this.channel.dispatch(`api-meta:${t}`);return n},this.createFunction=e=>(...t)=>{const{action:n}=e.options;return this.channel.dispatch(n,{args:t})}}};var qn={};Object.defineProperty(qn,"__esModule",{value:!0}),qn.ChannelsExposer=void 0;qn.ChannelsExposer=class{constructor(e){this.channelProviderOrClient=e,this.exposeFunction=async(e,t)=>{const{key:n,options:i,meta:r}=t,{id:o}=r,s=`${o}.${i?.action||n}`;return await this.channelProviderOrClient.register(s,(async({args:t})=>e(...t))),{action:s}},this.exposeMeta=async({id:e},t)=>{const n=`api-meta:${e}`;await this.channelProviderOrClient.register(n,(()=>({props:t})))}}},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Kn,e),n(qn,e)}(zn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(zn,e)}(Vn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Wn,e),n(Hn,e),n(Vn,e),n(Nn,e)}(Gn);var Jn={};Object.defineProperty(Jn,"__esModule",{value:!0}),Jn.createRelayedDispatch=exports.relayChannelClientApi_1=Jn.relayChannelClientApi=void 0;const Yn=["no longer connected","RTCDataChannel closed unexpectedly","The client you are trying to dispatch from is disconnected from the target provider"];exports.relayChannelClientApi_1=Jn.relayChannelClientApi=async(e,t)=>{e.register(`relay:${t}`,(({action:t,target:n,payload:i})=>e.dispatch(n,t,i))),await Promise.resolve()};Jn.createRelayedDispatch=(e,t,n,i)=>async(r,o)=>{try{return await e.dispatch(`relay:${n}`,{action:r,payload:o,target:t})}catch(e){if(s=e.message,Yn.some((e=>s.includes(e)))&&i)throw new Error(i);throw e}var s};var Zn,Qn,Xn,ei=s&&s.__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},ti=s&&s.__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)};Object.defineProperty(Bn,"__esModule",{value:!0}),Bn.ColumnOrRow=Bn.TabStack=Bn.LayoutNode=void 0;const ni=Gn,ii=Jn;class ri{constructor(e,t){Zn.set(this,void 0),this.isRoot=()=>ti(this,Zn,"f").isRoot(this.entityId),this.exists=()=>ti(this,Zn,"f").exists(this.entityId),this.getParent=async()=>{const e=await ti(this,Zn,"f").getParent(this.entityId);if(e)return ri.getEntity(e,ti(this,Zn,"f"))},this.createAdjacentStack=async(e,t)=>{const n=await ti(this,Zn,"f").createAdjacentStack(this.entityId,e,t);return ri.getEntity({entityId:n,type:"stack"},ti(this,Zn,"f"))},this.getAdjacentStacks=async e=>(await ti(this,Zn,"f").getAdjacentStacks({targetId:this.entityId,edge:e})).map((e=>ri.getEntity({type:"stack",entityId:e.entityId},ti(this,Zn,"f")))),ei(this,Zn,e,"f"),this.entityId=t}}Bn.LayoutNode=ri,Zn=new WeakMap,ri.newLayoutEntitiesClient=async(e,t,n)=>{const i=(0,ii.createRelayedDispatch)(e,n,"layout-relay","You are trying to interact with a layout component on a window that does not exist or has been destroyed.");return new ni.ApiConsumer(new ni.ChannelsConsumer({dispatch:i})).consume({id:t})},ri.getEntity=(e,t)=>{const{entityId:n,type:i}=e;switch(i){case"column":case"row":return new si(t,n,i);case"stack":return new oi(t,n);default:throw new Error(`Unrecognised Layout Entity encountered ('${JSON.stringify(e)})`)}};class oi extends ri{constructor(e,t){super(e,t),Qn.set(this,void 0),this.type="stack",this.getViews=()=>ti(this,Qn,"f").getStackViews(this.entityId),this.addView=async(e,t={index:0})=>ti(this,Qn,"f").addViewToStack(this.entityId,e,t),this.removeView=async e=>{await ti(this,Qn,"f").removeViewFromStack(this.entityId,e)},this.setActiveView=async e=>{await ti(this,Qn,"f").setStackActiveView(this.entityId,e)},ei(this,Qn,e,"f")}}Bn.TabStack=oi,Qn=new WeakMap;class si extends ri{constructor(e,t,n){super(e,t),Xn.set(this,void 0),this.getContent=async()=>(await ti(this,Xn,"f").getContent(this.entityId)).map((e=>ri.getEntity(e,ti(this,Xn,"f")))),ei(this,Xn,e,"f"),this.type=n}}Bn.ColumnOrRow=si,Xn=new WeakMap;var ai={};Object.defineProperty(ai,"__esModule",{value:!0}),ai.DEFAULT_LAYOUT_KEY=ai.LAYOUT_CONTROLLER_ID=void 0,ai.LAYOUT_CONTROLLER_ID="layout-entities",ai.DEFAULT_LAYOUT_KEY="__default__";var ci,di,hi,li=s&&s.__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)};Object.defineProperty(Ln,"__esModule",{value:!0}),Ln.Layout=void 0;const ui=G,pi=O,wi=d,yi=Tn,fi=Bn,gi=ai;class mi extends wi.Base{static getClient(e){return li(e,di,"f").getValue()}constructor(e,t){super(t),ci.add(this),di.set(this,new ui.Lazy((async()=>fi.LayoutNode.newLayoutEntitiesClient(await this.platform.getClient(),gi.LAYOUT_CONTROLLER_ID,this.identity)))),this.replace=async e=>{this.wire.sendAction("layout-replace").catch((e=>{}));const t=await this.platform.getClient();await t.dispatch("replace-layout",{target:this.identity,opts:{layout:e}})},this.replaceView=async(e,t)=>{this.wire.sendAction("layout-replace-view").catch((e=>{}));const n=await this.platform.getClient();await n.dispatch("replace-view",{target:this.identity,opts:{viewToReplace:e,newView:t}})},this.applyPreset=async e=>{this.wire.sendAction("layout-apply-preset").catch((e=>{}));const t=await this.platform.getClient(),{presetType:n}=e;if(!n||!(0,yi.isValidPresetType)(n))throw new Error("Cannot apply preset layout, please include an applicable presetType property in the PresetLayoutOptions.");await t.dispatch("apply-preset-layout",{target:this.identity,opts:{presetType:n}})};const n=(0,pi.validateIdentity)(e);if(n)throw new Error(n);this.identity=e,this.platform=this.fin.Platform.wrapSync({uuid:e.uuid}),e.uuid===this.fin.me.uuid&&e.name===this.fin.me.name&&(this.init=this.fin.Platform.Layout.init)}async getConfig(){this.wire.sendAction("layout-get-config").catch((e=>{}));return(await this.platform.getClient()).dispatch("get-frame-snapshot",{target:this.identity})}async getCurrentViews(){this.wire.sendAction("layout-get-views").catch((e=>{}));const e=await this.platform.getClient();return(await e.dispatch("get-layout-views",{target:this.identity})).map((e=>this.fin.View.wrapSync(e)))}async getRootItem(){this.wire.sendAction("layout-get-root-item").catch((()=>{}));const e=await li(this,di,"f").getValue(),t=await e.getRoot("layoutName"in this.identity?this.identity:void 0);return fi.LayoutNode.getEntity(t,e)}async getStackByViewIdentity(e){this.wire.sendAction("layout-get-stack-by-view").catch((()=>{}));const t=await li(this,di,"f").getValue(),n=await t.getStackByView(e);if(!n)throw new Error(`No stack found for view: ${e.uuid}/${e.name}`);return fi.LayoutNode.getEntity(n,t)}async addView(e,{location:t,targetView:n}={}){this.wire.sendAction("layout-add-view").catch((e=>{}));const{identity:i}=await li(this,ci,"m",hi).call(this,"layout-add-view",{viewOptions:e,location:t,targetView:n});return{identity:i}}async closeView(e){this.wire.sendAction("layout-close-view").catch((e=>{})),await li(this,ci,"m",hi).call(this,"layout-close-view",{viewIdentity:e})}}Ln.Layout=mi,di=new WeakMap,ci=new WeakSet,hi=async function(e,t){return(await this.platform.getClient()).dispatch(e,{target:this.identity,opts:t})};var vi,Ci,bi,Ii,Ei,xi=s&&s.__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)},Ai=s&&s.__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};Object.defineProperty(kn,"__esModule",{value:!0}),kn.LayoutModule=void 0;const Pi=d,Mi=Ln,_i=ai;class Oi extends Pi.Base{constructor(){super(...arguments),vi.add(this),Ci.set(this,!1),bi.set(this,null),this.init=async(e={})=>{if(this.wire.sendAction("layout-init").catch((e=>{})),!this.wire.environment.layoutAllowedInContext(this.fin))throw new Error("Layout.init can only be called from a Window context.");if(xi(this,Ci,"f"))throw new Error("Layout.init was already called, please use Layout.create to add additional layouts.");"openfin"===this.wire.environment.type&&await this.fin.Platform.getCurrentSync().getClient(),Ai(this,Ci,!0,"f"),Ai(this,bi,await this.wire.environment.initLayoutManager(this.fin,this.wire,e),"f"),await this.wire.environment.applyLayoutSnapshot(this.fin,xi(this,bi,"f"),e);const t={name:this.fin.me.name,uuid:this.fin.me.uuid};if(!e.layoutManagerOverride){const e={layoutName:_i.DEFAULT_LAYOUT_KEY,...t};return xi(this,Ii,"f").call(this,e)}return this.wrapSync(t)},Ii.set(this,(e=>{const t="[Layout] You are using a deprecated property `layoutManager` - it will throw if you access it starting in v37.",n=new Proxy({},{get(e,n){throw console.warn(`[Layout-mgr-proxy] accessing ${n.toString()}`),new Error(t)}}),i=Object.assign(this.wrapSync(e),{layoutManager:n});return new Proxy(i,{get(e,n){if("layoutManager"===n)throw console.warn(`[Layout-proxy] accessing ${n.toString()}`),new Error(t);return e[n]}})})),this.getCurrentLayoutManagerSync=()=>xi(this,vi,"m",Ei).call(this,"fin.Platform.Layout.getCurrentLayoutManagerSync()"),this.create=async e=>this.wire.environment.createLayout(xi(this,vi,"m",Ei).call(this,"fin.Platform.Layout.create()"),e),this.destroy=async e=>this.wire.environment.destroyLayout(xi(this,vi,"m",Ei).call(this,"fin.Platform.Layout.destroy()"),e)}async wrap(e){return this.wire.sendAction("layout-wrap").catch((e=>{})),new Mi.Layout(e,this.wire)}wrapSync(e){return this.wire.sendAction("layout-wrap-sync").catch((e=>{})),new Mi.Layout(e,this.wire)}async getCurrent(){if(this.wire.sendAction("layout-get-current").catch((e=>{})),"openfin"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error("You are not in a Window context. Only Windows can have a Layout.");const{uuid:e,name:t}=this.fin.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction("layout-get-current-sync").catch((e=>{})),"openfin"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error("You are not in a Window context. Only Windows can have a Layout.");const{uuid:e,name:t}=this.fin.me;return this.wrapSync({uuid:e,name:t})}async getLayoutByViewIdentity(e){this.wire.sendAction("layout-get-by-view-identity").catch((()=>{}));let t=await this.wire.environment.getViewWindowIdentity(this.fin,e);t.identity&&(t=t.identity);try{const n=this.wrapSync(t),i=await Mi.Layout.getClient(n),r=await i.getLayoutIdentityForViewOrThrow(e);return this.wrapSync(r)}catch(n){if(!["No action registered at target for","getLayoutIdentityForViewOrThrow is not a function"].some((e=>n.message.includes(e))))throw n;if(t.uuid===t.name)throw new Error(`View identity ${JSON.stringify(e)} is not attached to any layout in provider window ${JSON.stringify(t)}.`);return this.wrapSync(t)}}}kn.LayoutModule=Oi,Ci=new WeakMap,bi=new WeakMap,Ii=new WeakMap,vi=new WeakSet,Ei=function(e){if(!xi(this,bi,"f"))throw new Error(`You must call init before using the API ${e}`);return xi(this,bi,"f")},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(kn,e),n(Ln,e)}(jn),Object.defineProperty(Pn,"__esModule",{value:!0}),Pn.PlatformModule=void 0;const Si=d,Ri=Mn,Fi=jn;class ji extends Si.Base{constructor(e,t){super(e),this._channel=t,this.Layout=new Fi.LayoutModule(this.wire)}async init(e){if(!fin.__internal_.isPlatform||fin.me.name!==fin.me.uuid)throw new Error("fin.Platform.init should only be called from a custom platform provider running in the main window of the application.");return this.wire.environment.initPlatform(this.fin,e)}async wrap(e){return this.wire.sendAction("platform-wrap").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}wrapSync(e){return this.wire.sendAction("platform-wrap-sync").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}async getCurrent(){return this.wire.sendAction("platform-get-current").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction("platform-get-current-sync").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}start(e){return this.wire.sendAction("platform-start").catch((e=>{})),new Promise((async(t,n)=>{try{const{uuid:n}=e,i=await this.fin.Application._create({...e,isPlatformController:!0});i.once("platform-api-ready",(()=>t(this.wrapSync({uuid:n})))),i._run({uuid:n})}catch(e){n(e)}}))}startFromManifest(e,t){return this.wire.sendAction("platform-start-from-manifest").catch((e=>{})),new Promise((async(n,i)=>{try{const i=await this.fin.Application._createFromManifest(e);i.once("platform-api-ready",(()=>n(this.wrapSync({uuid:i.identity.uuid})))),i._run(t)}catch(e){i(e)}}))}}Pn.PlatformModule=ji,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Pn,e),n(Mn,e)}(An);var ki={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getMe=e.getBaseMe=e.environmentUnsupportedMessage=void 0;const t=J(),n=un,i=ie(),r=rn;function o(e,t,n){return{...{isView:"view"===e,isWindow:"window"===e,isFrame:"iframe"===e,isExternal:"external connection"===e},uuid:t,name:n,entityType:e}}e.environmentUnsupportedMessage="You are not running in OpenFin.",e.getBaseMe=o,e.getMe=function(s){const{uuid:a,name:c,entityType:d}=s.me,h={setContext(){throw new Error(e.environmentUnsupportedMessage)},addContextHandler(){throw new Error(e.environmentUnsupportedMessage)},getContextGroups(){throw new Error(e.environmentUnsupportedMessage)},joinContextGroup(){throw new Error(e.environmentUnsupportedMessage)},removeFromContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getAllClientsInContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getInfoForContextGroup(){throw new Error(e.environmentUnsupportedMessage)}},l="Interop API has not been instantiated. Either connection has failed or you have not declared interop in your config.",u={setContext(){throw new Error(l)},addContextHandler(){throw new Error(l)},getContextGroups(){throw new Error(l)},joinContextGroup(){throw new Error(l)},removeFromContextGroup(){throw new Error(l)},getAllClientsInContextGroup(){throw new Error(l)},getInfoForContextGroup(){throw new Error(l)}},p={eventNames:()=>{throw new Error(e.environmentUnsupportedMessage)},emit:()=>{throw new Error(e.environmentUnsupportedMessage)},listeners:()=>{throw new Error(e.environmentUnsupportedMessage)},listenerCount:()=>{throw new Error(e.environmentUnsupportedMessage)},on:()=>{throw new Error(e.environmentUnsupportedMessage)},addListener:()=>{throw new Error(e.environmentUnsupportedMessage)},once:()=>{throw new Error(e.environmentUnsupportedMessage)},prependListener:()=>{throw new Error(e.environmentUnsupportedMessage)},prependOnceListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeAllListeners:()=>{throw new Error(e.environmentUnsupportedMessage)}};switch(d){case"view":return Object.assign(new t.View(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case"window":return Object.assign(new i._Window(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case"iframe":return Object.assign(new n._Frame(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case"external connection":return Object.assign(new r.ExternalApplication(s,{uuid:a}),o(d,a,c),{interop:u,isOpenFin:!1});default:return{...o(d,a,c),...p,interop:h,isOpenFin:!1}}}}(ki);var Li={},Ti={},$i={};Object.defineProperty($i,"__esModule",{value:!0}),$i.createWarningObject=$i.createUnusableObject=void 0,$i.createUnusableObject=function(e){const t=()=>{throw new Error(e)};return new Proxy({},{apply:t,construct:t,defineProperty:t,deleteProperty:t,get:t,getOwnPropertyDescriptor:t,getPrototypeOf:t,has:t,isExtensible:t,ownKeys:t,preventExtensions:t,set:t,setPrototypeOf:t})},$i.createWarningObject=function(e,t){return new Proxy(t,{get:(...t)=>(console.warn(e),Reflect.get(...t)),set:(...t)=>(console.warn(e),Reflect.set(...t)),getOwnPropertyDescriptor:(...t)=>(console.warn(e),Reflect.getOwnPropertyDescriptor(...t)),ownKeys:(...t)=>(console.warn(e),Reflect.ownKeys(...t))})};var Bi,Gi={},Wi={};var Hi={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.wrapIntentHandler=e.BROKER_ERRORS=e.generateOverrideWarning=e.generateOverrideError=e.wrapContextHandler=e.wrapInTryCatch=e.generateId=void 0;e.generateId=()=>`${Math.random()}${Date.now()}`;e.wrapInTryCatch=(e,t)=>(...n)=>{try{return e(...n)}catch(e){throw new Error((t||"")+e)}};e.wrapContextHandler=(e,t)=>async n=>{try{await e(n)}catch(e){throw console.error(`Error thrown by handler ${t} for context type ${n.type}: ${e}`),e}};e.generateOverrideError=(e,t)=>`You have tried to to use ${e} but ${t} has not been overridden in the Interop Broker. Please override this function. Refer to our documentation for more info.`;e.generateOverrideWarning=(e,t,n,i)=>{const{uuid:r,name:o}=n;return i?`Entity with identity: ${r}/${o} has called ${i} or ${e} but ${t} has not been overridden.`:`Entity with identity: ${r}/${o} has called ${e} but ${t} has not been overridden.`},e.BROKER_ERRORS={fireIntent:(0,e.generateOverrideError)("fireIntent","handleFiredIntent"),fireIntentForContext:(0,e.generateOverrideError)("fireIntentForContext","handleFiredIntentForContext"),getInfoForIntent:(0,e.generateOverrideError)("getInfoForIntent","handleInfoForIntent"),getInfoForIntentsByContext:(0,e.generateOverrideError)("getInfoForIntentsByContext","handleInfoForIntentsByContext"),joinSessionContextGroupWithJoinContextGroup:"The Context Group you have tried to join is a Session Context Group. Custom Context Groups can only be defined by the Interop Broker through code or manifest configuration. Please use joinSessionContextGroup.",fdc3Open:(0,e.generateOverrideError)("fdc3.open","fdc3HandleOpen"),fdc3FindInstances:(0,e.generateOverrideError)("fdc3.findInstances","fdc3HandleFindInstances"),fdc3GetAppMetadata:(0,e.generateOverrideError)("fdc3.getAppMetadata","fdc3HandleGetAppMetadata"),fdc3GetInfo:(0,e.generateOverrideError)("fdc3.getInfo","fdc3HandleGetInfo")};e.wrapIntentHandler=(e,t)=>async n=>{try{return e(n)}catch(e){throw console.error(`Error thrown by handler ${t}: ${e}`),e}}}(Hi);var Ni,Di,Ui={};function Vi(){if(Di)return Gi;Di=1;var e,t,n,r=s&&s.__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},o=s&&s.__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)},a=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Gi,"__esModule",{value:!0}),Gi.InteropBroker=void 0;const c=d,h=a(function(){if(Bi)return Wi;Bi=1,Object.defineProperty(Wi,"__esModule",{value:!0});const e=Cr();return Wi.default=class{constructor(e,t){this.provider=e,this.id=t,this.lastContext=void 0,this.contextGroupMap=new Map,this.clients=new Map,this.registerListeners()}registerListeners(){this.provider.register(`sessionContextGroup:getContext-${this.id}`,this.getCurrentContext.bind(this)),this.provider.register(`sessionContextGroup:setContext-${this.id}`,this.setContext.bind(this)),this.provider.register(`sessionContextGroup:handlerAdded-${this.id}`,this.handlerAdded.bind(this)),this.provider.register(`sessionContextGroup:handlerRemoved-${this.id}`,this.handlerRemoved.bind(this))}getCurrentContext(e){return e.type?this.contextGroupMap.get(e.type):this.lastContext}setContext(t,n){const{context:i}=t,r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name} not in Session Client State Map`);this.contextGroupMap.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{e.contextHandlers.get(i.type)?.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getClientState(e){return this.clients.get(e.endpointId)}async handlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(i){const e=r.contextHandlers.get(i)||[];r.contextHandlers.set(i,[...e,n]);const o=this.contextGroupMap.get(i);o&&await this.provider.dispatch(t,n,o)}else{r.globalHandler=n;const e=[...this.contextGroupMap.keys()].map((async e=>{const i=this.contextGroupMap.get(e);i&&await this.provider.dispatch(t,n,i)}));await Promise.all(e)}}handlerRemoved(e,t){const{handlerId:n}=e,i=this.clients.get(t.endpointId);i?(Array.from(i.contextHandlers).forEach((([,e])=>{const t=e.indexOf(n);t>-1&&e.splice(t,1)})),i.globalHandler===n&&(i.globalHandler=void 0)):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={contextHandlers:new Map,clientIdentity:e,globalHandler:void 0};this.clients.set(e.endpointId,t)}}onDisconnection(e){this.clients.delete(e.endpointId)}},Wi}()),l=Hi,u=a(i),p=function(){if(Ni)return Ui;Ni=1,Object.defineProperty(Ui,"__esModule",{value:!0}),Ui.PrivateChannelProvider=void 0;const e=Vi();return Ui.PrivateChannelProvider=class t{constructor(e,t){this.provider=e,this.id=t,this.clients=new Map,this.registerListeners(),this.contextByContextType=new Map,this.lastContext=void 0,this.provider.onConnection((e=>this.registerNewClient(e))),this.provider.onDisconnection((async e=>{const{endpointId:t}=e;this.clients.has(t)&&await this.handleClientDisconnecting(e),0===(await this.provider.getAllClientInfo()).length&&this.provider.destroy()}))}getClientState(e){return this.clients.get(e.endpointId)}registerListeners(){this.provider.register("broadcast",this.broadcast.bind(this)),this.provider.register("getCurrentContext",this.getCurrentContext.bind(this)),this.provider.register("contextHandlerAdded",this.contextHandlerAdded.bind(this)),this.provider.register("contextHandlerRemoved",this.contextHandlerRemoved.bind(this)),this.provider.register("nonStandardHandlerRemoved",this.nonStandardHandlerRemoved.bind(this)),this.provider.register("onAddContextHandlerAdded",this.onAddContextHandlerAdded.bind(this)),this.provider.register("onDisconnectHandlerAdded",this.onDisconnectHandlerAdded.bind(this)),this.provider.register("onUnsubscribeHandlerAdded",this.onUnsubscribeHandlerAdded.bind(this)),this.provider.register("clientDisconnecting",((e,t)=>{this.handleClientDisconnecting(t)}))}broadcast(t,n){const{context:i}=t;if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name}, tried to call broadcast, is not connected to this Private Channel`);const r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to broadcast - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);this.contextByContextType.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{const t=e.handlerIdsByContextTypes.get(i.type);t&&t.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getCurrentContext(e,t){const{contextType:n}=e;if(!this.getClientState(t))throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call getCurrentContext, is not connected to this Private Channel`);if(void 0!==n){return this.contextByContextType.get(n)||null}return this.lastContext?this.lastContext:null}contextHandlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call addContextListener, is not connected to this Private Channel`);if(i){const e=r.handlerIdsByContextTypes.get(i)||[];r.handlerIdsByContextTypes.set(i,[...e,n])}else r.globalHandler=n;Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&e.onAddContextListenerHandlerId&&this.provider.dispatch(e.clientIdentity,e.onAddContextListenerHandlerId,i)}))}async contextHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);if(i){let e;if(i.globalHandler===n)i.globalHandler=void 0;else for(const[t,r]of i.handlerIdsByContextTypes){const i=r.indexOf(n);i>-1&&(r.splice(i,1),e=t)}const r=(await this.getConnectedClients()).map((async n=>{const{clientIdentity:i,clientIdentity:{endpointId:r},onUnsubscribeHandlerId:o}=n;r!==t.endpointId&&o&&await this.provider.dispatch(i,o,e)}));try{await Promise.all(r)}catch(e){throw console.error(`Problem when attempting to dispatch to onUnsubscribeHandlers. Error: ${e} Removing Client: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}`),new Error(e)}}else console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}.`)}nonStandardHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);i?i.onDisconnectHandlerId===n?i.onDisconnectHandlerId=void 0:i.onAddContextListenerHandlerId===n?i.onAddContextListenerHandlerId=void 0:i.onUnsubscribeHandlerId===n&&(i.onUnsubscribeHandlerId=void 0):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}onAddContextHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onAddContextListener, is not connected to this Private Channel`);n.onAddContextListenerHandlerId=i,Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&Array.from(e.handlerIdsByContextTypes.keys()).forEach((e=>{this.provider.dispatch(t,i,e)}))}))}onDisconnectHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onDisconnect, is not connected to this Private Channel`);n.onDisconnectHandlerId=i}onUnsubscribeHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onUnsubscribe, is not connected to this Private Channel`);n.onUnsubscribeHandlerId=i}removeClient(e){const t=this.getClientState(e);if(!t)throw new Error(`Client with Identity: ${e.uuid} ${e.name}, tried to call disconnect, is not connected to this Private Channel`);t.handlerIdsByContextTypes.clear(),this.clients.delete(e.endpointId)}async fireOnDisconnectForOtherClients(e){const{endpointId:t}=e,n=(await this.getConnectedClients()).map((async e=>{const{clientIdentity:{endpointId:n},onDisconnectHandlerId:i}=e;n!==t&&i&&await this.provider.dispatch(e.clientIdentity,i)}));try{await Promise.all(n)}catch(t){throw console.error(`Problem when attempting to dispatch to onDisconnectHandlers. Error: ${t} Disconnecting Client: uuid: ${e.uuid}. name: ${e.name}. endpointId: ${e.endpointId}`),new Error(t)}}async unsubscribeAll(e){const{endpointId:t}=e,n=this.clients.get(t);if(n){const t=Array.from(n.handlerIdsByContextTypes.values()).flat(),i=n.globalHandler;if(t.length>0){const n=t.map((async t=>this.contextHandlerRemoved({handlerId:t},e)));try{await Promise.all(n)}catch(e){console.error(e.message)}}if(i)try{await this.contextHandlerRemoved({handlerId:i},e)}catch(e){console.error(e.message)}}}async handleClientDisconnecting(e){await this.unsubscribeAll(e),this.removeClient(e),await this.fireOnDisconnectForOtherClients(e)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={clientIdentity:e,handlerIdsByContextTypes:new Map,globalHandler:void 0,onAddContextListenerHandlerId:void 0,onUnsubscribeHandlerId:void 0,onDisconnectHandlerId:void 0};this.clients.set(e.endpointId,t)}}async getConnectedClients(){const e=await this.provider.getAllClientInfo();return Array.from(this.clients.values()).filter((t=>{const{uuid:n,name:i}=t.clientIdentity;return e.some((e=>i===e.name&&n===e.uuid))}))}static init(e,n){return new t(e,n)}},Ui}(),w=G,y=[{id:"green",displayMetadata:{color:"#00CC88",name:"green"}},{id:"purple",displayMetadata:{color:"#8C61FF",name:"purple"}},{id:"orange",displayMetadata:{color:"#FF8C4C",name:"orange"}},{id:"red",displayMetadata:{color:"#FF5E60",name:"red"}},{id:"pink",displayMetadata:{color:"#FF8FB8",name:"pink"}},{id:"yellow",displayMetadata:{color:"#E9FF8F",name:"yellow"}}];let f=class i extends c.Base{constructor(i,s,a){super(i),e.set(this,void 0),t.set(this,void 0),n.set(this,void 0),this.getProvider=()=>o(this,n,"f").getValue(),this.interopClients=new Map,this.contextGroupsById=new Map,r(this,t,a.contextGroups??[...y],"f"),r(this,e,a.fdc3Info,"f"),a?.logging&&(this.logging=a.logging),this.intentClientMap=new Map,this.lastContextMap=new Map,this.sessionContextGroupMap=new Map,r(this,n,new w.Lazy(s),"f"),this.setContextGroupMap(),this.setupChannelProvider()}static createClosedConstructor(...e){return class extends i{constructor(...t){if(t.length){const[n,i,r]=t;if(r&&"object"==typeof r&&!(0,u.default)(r,e[2]))return console.warn("You have modified the parameters of the InteropOverride constructor. This behavior is deprecated and will be removed in a future version. You can modify these options in your manifest. Please consult our Interop docs for guidance on migrating to the new override scheme."),void super(e[0],e[1],r);console.warn("You are attempting to pass arguments to the InteropOverride constructor. This is not necessary, and these passed arguments will be ignored. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.")}super(...e)}}}setContext({context:e},t){this.wire.sendAction("interop-broker-set-context").catch((e=>{}));const n=this.getClientState(t);if(!n||!n.contextGroupId)throw n?new Error("You must join a context group before you can set context."):new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);{const{contextGroupId:t}=n;this.setContextForGroup({context:e},t)}}setContextForGroup({context:e},t){this.wire.sendAction("interop-broker-set-context-for-group").catch((e=>{}));const n=this.contextGroupsById.get(t);if(!n)throw new Error(`Unable to set context for context group that isn't in the context group mapping: ${t}.`);const r=i.checkContextIntegrity(e);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(e)}`);const o=e.type;n.set(o,e),this.lastContextMap.set(t,o);Array.from(this.interopClients.values()).filter((e=>e.contextGroupId===t)).forEach((t=>{for(const[,n]of t.contextHandlers)i.isContextTypeCompatible(o,n.contextType)&&this.invokeContextHandler(t.clientIdentity,n.handlerId,e)}))}getCurrentContext(e,t){this.wire.sendAction("interop-broker-get-current-context").catch((e=>{}));const n=this.getClientState(t);if(!n?.contextGroupId)throw new Error("You must be a member of a context group to call getCurrentContext");const{contextGroupId:i}=n,r=this.contextGroupsById.get(i),o=this.lastContextMap.get(i),s=e?.contextType??o;return r&&s?r.get(s):void 0}async joinContextGroup({contextGroupId:e,target:t},n){if(this.wire.sendAction("interop-broker-join-context-group").catch((e=>{})),this.sessionContextGroupMap.has(e))throw new Error(l.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup);if(t){i.hasEndpointId(t)&&await this.addClientToContextGroup({contextGroupId:e},t);try{const n=this.channel.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name));if(!n.length)throw new Error(`Given Identity ${t.uuid} ${t.name} is not connected to the Interop Broker.`);n.length>1&&console.warn(`More than one connection found for identity ${t.uuid} ${t.name}`);const i=[];for(const t of n)i.push(this.addClientToContextGroup({contextGroupId:e},t));await Promise.all(i)}catch(e){throw new Error(e)}}else await this.addClientToContextGroup({contextGroupId:e},n)}async addClientToContextGroup({contextGroupId:e},t){this.wire.sendAction("interop-broker-add-client-to-context-group").catch((e=>{}));const n=this.getClientState(t);if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(!this.getContextGroups().find((t=>t.id===e)))throw new Error(`Attempting to join a context group that does not exist: ${e}. You may only join existing context groups.`);if(n.contextGroupId!==e){n.contextGroupId=e,await this.setCurrentContextGroupInClientOptions(t,e);const i=this.contextGroupsById.get(e);for(const[,e]of n.contextHandlers){const{contextType:n,handlerId:r}=e;if(void 0===n)i.forEach(((e,n)=>{this.invokeContextHandler(t,r,e)}));else if(i.has(n)){const e=i.get(n);e&&this.invokeContextHandler(t,r,e)}}}}async removeFromContextGroup({target:e},t){if(this.wire.sendAction("interop-broker-remove-from-context-group").catch((e=>{})),e){i.hasEndpointId(e)&&await this.removeClientFromContextGroup(e);try{const t=this.channel.connections.filter((t=>t.uuid===e.uuid&&t.name===e.name));if(!t.length)throw new Error(`No connection found for given Identity ${e.uuid} ${e.name}`);t.length>1&&console.warn(`More than one connection found for identity ${e.uuid} ${e.name}`);const n=[];for(const e of t)n.push(this.removeClientFromContextGroup(e));await Promise.all(n)}catch(e){throw new Error(e)}}else await this.removeClientFromContextGroup(t)}async removeClientFromContextGroup(e){this.wire.sendAction("interop-broker-remove-client-from-context-group").catch((e=>{}));const t=this.getClientState(e);t&&(t.contextGroupId=void 0),await this.setCurrentContextGroupInClientOptions(e,null)}getContextGroups(){return this.wire.sendAction("interop-broker-get-context-groups").catch((e=>{})),o(this,t,"f").map((e=>({...e})))}getInfoForContextGroup({contextGroupId:e}){return this.wire.sendAction("interop-broker-get-info-for-context-group").catch((e=>{})),this.getContextGroups().find((t=>t.id===e))}getAllClientsInContextGroup({contextGroupId:e}){this.wire.sendAction("interop-broker-get-all-clients-in-context-group").catch((e=>{}));return Array.from(this.interopClients.values()).filter((t=>t.contextGroupId===e)).map((e=>e.clientIdentity))}async handleFiredIntent(e,t){const n=(0,l.generateOverrideWarning)("fdc3.raiseIntent","InteropBroker.handleFiredIntent",t,"interopClient.fireIntent");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntent)}async setIntentTarget(e,t){this.wire.sendAction("interop-broker-set-intent-target").catch((e=>{}));const n=this.intentClientMap.get(t.name),i=`intent-handler-${e.name}`;if(n){const t=n.get(i);if(t){if(t.pendingIntents.push(e),t.clientIdentity&&t.isReady){const{clientIdentity:e,pendingIntents:n}=t;try{const r=n[n.length-1];await this.invokeIntentHandler(e,i,r),t.pendingIntents=[]}catch(n){console.error(`Error invoking intent handler for client ${e.uuid}/${e.name}/${e.endpointId}`),t.isReady=!1}}}else n.set(i,{isReady:!1,pendingIntents:[e]})}else{this.intentClientMap.set(t.name,new Map);const n=this.intentClientMap.get(t.name);n&&n.set(i,{isReady:!1,pendingIntents:[e]})}}async handleInfoForIntent(e,t){const n=(0,l.generateOverrideWarning)("fdc3.findIntent","InteropBroker.handleInfoForIntent",t,"interopClient.getInfoForIntent");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntent)}async handleInfoForIntentsByContext(e,t){const n=(0,l.generateOverrideWarning)("fdc3.findIntentsByContext","InteropBroker.handleInfoForIntentsByContext",t,"interopClient.getInfoForIntentsByContext");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntentsByContext)}async handleFiredIntentForContext(e,t){const n=(0,l.generateOverrideWarning)("fdc3.raiseIntentForContext","InteropBroker.handleFiredIntentForContext",t,"interopClient.fireIntentForContext");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntentForContext)}async clientDisconnected(e){}async fdc3HandleOpen({app:e,context:t},n){const i=(0,l.generateOverrideWarning)("fdc3.open","InteropBroker.fdc3HandleOpen",n);throw console.warn(i),new Error(l.BROKER_ERRORS.fdc3Open)}async fdc3HandleFindInstances(e,t){const n=(0,l.generateOverrideWarning)("fdc3.open","InteropBroker.fdc3HandleFindInstances",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3FindInstances)}async fdc3HandleGetAppMetadata(e,t){const n=(0,l.generateOverrideWarning)("fdc3.getAppMetadata","InteropBroker.fdc3HandleGetAppMetadata",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3GetAppMetadata)}async invokeContextHandler(e,t,n){const i=await this.getProvider();try{await i.dispatch(e,t,n)}catch(i){console.error(`Error invoking context handler ${t} for context type ${n.type} in client ${e.uuid}/${e.name}/${e.endpointId}`,i)}}async invokeIntentHandler(e,t,n){const i=await this.getProvider();await i.dispatch(e,t,n)}async fdc3HandleGetInfo(t,n){const{fdc3Version:i}=t;return{fdc3Version:i,...o(this,e,"f"),optionalFeatures:{OriginatingAppMetadata:!1,UserChannelMembershipAPIs:!0},appMetadata:{appId:"",instanceId:""}}}async getAllClientInfo(){return(await this.getProvider()).getAllClientInfo()}decorateSnapshot(e){return{...e,interopSnapshotDetails:{contextGroupStates:this.getContextGroupStates()}}}applySnapshot(e,t){const n=e?.interopSnapshotDetails?.contextGroupStates;n&&(t?.closeExistingWindows||this.updateExistingClients(n),this.rehydrateContextGroupStates(n))}updateExistingClients(e){this.interopClients.forEach((t=>{const{clientIdentity:n,contextGroupId:r,contextHandlers:o}=t;if(r){const t=e[r];for(const[,e]of Object.entries(t))o.forEach((t=>{const{handlerId:r,contextType:o}=t;i.isContextTypeCompatible(e.type,o)&&this.invokeContextHandler(n,r,e)}))}}))}getContextGroupStates(){return i.toObject(this.contextGroupsById)}rehydrateContextGroupStates(e){const t=Object.entries(e);for(const[e,n]of t){const t=Object.entries(n);for(const[n,i]of t)if(this.contextGroupsById.has(e)){this.contextGroupsById.get(e).set(n,i)}else console.warn(`Attempting to set a context group that isn't in the context group mapping. Skipping context group rehydration for: ${e}`)}}contextHandlerRegistered({contextType:e,handlerId:t},n){const i={contextType:e,handlerId:t},r=this.getClientState(n);if(r?.contextHandlers.set(t,i),r&&r.contextGroupId){const{contextGroupId:i}=r,o=this.contextGroupsById.get(i);if(void 0===e)o.forEach(((e,i)=>{this.invokeContextHandler(n,t,e)}));else if(o.has(e)){const i=o.get(e);i&&this.invokeContextHandler(n,t,i)}}}async intentHandlerRegistered(e,t){const{handlerId:n}=e,i=this.intentClientMap.get(t.name),r=i?.get(n);if(i)if(r){const{pendingIntents:e}=r;r.clientIdentity=t,r.isReady=!0;try{if(e.length>0){const i=e[e.length-1];await this.invokeIntentHandler(t,n,i),r.pendingIntents=[]}}catch(e){console.error(`Error invoking intent handler: ${n} for client ${t.uuid}/${t.name}/${t.endpointId}`)}}else i.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t});else{this.intentClientMap.set(t.name,new Map);const e=this.intentClientMap.get(t.name);e&&e.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t})}}removeContextHandler({handlerId:e},t){const n=this.getClientState(t);n&&n.contextHandlers.delete(e)}handleJoinSessionContextGroup({sessionContextGroupId:e},t){try{if(!e)throw new Error("Failed to join session context group: must specify group id.");const n=this.sessionContextGroupMap.get(e);if(n)n.registerNewClient(t);else{const n=new h.default(this.channel,e);n.registerNewClient(t),this.sessionContextGroupMap.set(e,n)}return{hasConflict:this.contextGroupsById.has(e)}}catch(e){throw new Error(e)}}getClientState(e){return this.interopClients.get(e.endpointId)}static toObject(e){const t=Object.fromEntries(e),n={};return Object.entries(t).forEach((([e,t])=>{const i=Object.fromEntries(t);n[e]=i})),n}static checkContextIntegrity(e){if(!e)return{isValid:!1,reason:"No context supplied"};if("object"!=typeof e)return{isValid:!1,reason:"Context must be an Object"};if(!e.type)return{isValid:!1,reason:"Context must have a type property"};if(e.id&&"object"!=typeof e.id)return{isValid:!1,reason:"Context id must be an Object populated with key-value identifiers (if set)"};if(e.id){const{id:t}=e,n=Object.keys(t);let i=!1;if(!n.length)return{isValid:!1,reason:"Context id must have at least one key-value identifier"};if(n.forEach((e=>{"string"==typeof e&&"string"==typeof t[e]||(i=!0)})),i)return{isValid:!1,reason:"Context id key-value identifiers must be of type string"}}return e.name&&"string"!=typeof e.name?{isValid:!1,reason:"Context name must be of string type (if set)"}:{isValid:!0}}static hasEndpointId(e){return void 0!==e.endpointId}static isContextTypeCompatible(e,t){return void 0===t||e===t}setContextGroupMap(){for(const e of this.getContextGroups())this.contextGroupsById.set(e.id,new Map)}async setCurrentContextGroupInClientOptions(e,t){try{const n=await this.fin.System.getEntityInfo(e.uuid,e.name);let i;"view"===n.entityType?i=await this.fin.View.wrap(e):"window"===n.entityType&&(i=await this.fin.Window.wrap(e)),i&&await i.updateOptions({interop:{currentContextGroup:t}})}catch(e){}}async setupChannelProvider(){try{const e=await this.getProvider();this.channel=e,this.wireChannel(e)}catch(e){throw new Error(`Error setting up Interop Broker Channel Provider: ${e}`)}}wireChannel(e){e.onConnection((async(e,t)=>{if(!await this.isConnectionAuthorized(e,t))throw new Error(`Connection not authorized for ${e.uuid}, ${e.name}`);if(!e.endpointId)throw new Error("Version too old to be compatible with Interop. Please upgrade your runtime to a more recent version.");const n={contextGroupId:void 0,contextHandlers:new Map,clientIdentity:e};t?.currentContextGroup&&this.contextGroupsById.has(t.currentContextGroup)&&(n.contextGroupId=t?.currentContextGroup),this.interopClients.set(e.endpointId,n)})),e.onDisconnection((e=>{this.interopClients.delete(e.endpointId);const t=this.intentClientMap.get(e.name);t&&e.uuid===this.fin.me.uuid&&t.forEach((e=>{e.isReady=!1})),this.sessionContextGroupMap.forEach((t=>{t.onDisconnection(e)})),this.clientDisconnected(e)})),e.beforeAction((async(e,t,n)=>{if(!await this.isActionAuthorized(e,t,n))throw new Error(`Action (${e}) not authorized for ${n.uuid}, ${n.name}`);this.logging?.beforeAction?.enabled&&console.log(e,t,n)})),e.afterAction(((e,t,n)=>{this.logging?.afterAction?.enabled&&console.log(e,t,n)})),e.register("setContext",this.setContext.bind(this)),e.register("fireIntent",this.handleFiredIntent.bind(this)),e.register("getCurrentContext",this.getCurrentContext.bind(this)),e.register("getInfoForIntent",this.handleInfoForIntent.bind(this)),e.register("getInfoForIntentsByContext",this.handleInfoForIntentsByContext.bind(this)),e.register("fireIntentForContext",this.handleFiredIntentForContext.bind(this)),e.register("getContextGroups",this.getContextGroups.bind(this)),e.register("joinContextGroup",this.joinContextGroup.bind(this)),e.register("removeFromContextGroup",this.removeFromContextGroup.bind(this)),e.register("getAllClientsInContextGroup",this.getAllClientsInContextGroup.bind(this)),e.register("getInfoForContextGroup",this.getInfoForContextGroup.bind(this)),e.register("contextHandlerRegistered",this.contextHandlerRegistered.bind(this)),e.register("intentHandlerRegistered",this.intentHandlerRegistered.bind(this)),e.register("removeContextHandler",this.removeContextHandler.bind(this)),e.register("sessionContextGroup:createIfNeeded",this.handleJoinSessionContextGroup.bind(this)),e.register("fdc3Open",this.fdc3HandleOpen.bind(this)),e.register("fdc3v2FindIntentsByContext",this.handleInfoForIntentsByContext.bind(this)),e.register("fdc3FindInstances",this.fdc3HandleFindInstances.bind(this)),e.register("fdc3GetAppMetadata",this.fdc3HandleGetAppMetadata.bind(this)),e.register("fdc3v2GetInfo",(async(e,t)=>this.fdc3HandleGetInfo.bind(this)(e,t))),e.register("createPrivateChannelProvider",(async e=>{const{channelId:t}=e,n=await this.fin.InterApplicationBus.Channel.create(t);p.PrivateChannelProvider.init(n,t)}))}isConnectionAuthorized(e,t){return this.wire.sendAction("interop-broker-is-connection-authorized").catch((e=>{})),Promise.resolve(!0)}isActionAuthorized(e,t,n){return this.wire.sendAction("interop-broker-is-action-authorized").catch((e=>{})),Promise.resolve(!0)}};return Gi.InteropBroker=f,e=new WeakMap,t=new WeakMap,n=new WeakMap,Gi}var zi,Ki={},qi={},Ji=s&&s.__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},Yi=s&&s.__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)};Object.defineProperty(qi,"__esModule",{value:!0});const Zi=d,Qi=Hi;class Xi extends Zi.Base{constructor(e,t,n){super(e),zi.set(this,void 0),this.id=n,Ji(this,zi,t,"f")}async setContext(e){this.wire.sendAction("interop-session-context-group-set-context").catch((e=>{}));return(await Yi(this,zi,"f")).dispatch(`sessionContextGroup:setContext-${this.id}`,{sessionContextGroupId:this.id,context:e})}async getCurrentContext(e){this.wire.sendAction("interop-session-context-group-get-context").catch((e=>{}));return(await Yi(this,zi,"f")).dispatch(`sessionContextGroup:getContext-${this.id}`,{sessionContextGroupId:this.id,type:e})}async addContextHandler(e,t){if(this.wire.sendAction("interop-session-context-group-add-handler").catch((e=>{})),"function"!=typeof e)throw new Error("Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");const n=await Yi(this,zi,"f");let i;return i=t?`sessionContextHandler:invoke-${this.id}-${t}-${(0,Qi.generateId)()}`:`sessionContextHandler:invoke-${this.id}`,n.register(i,(0,Qi.wrapContextHandler)(e,i)),await n.dispatch(`sessionContextGroup:handlerAdded-${this.id}`,{handlerId:i,contextType:t}),{unsubscribe:await this.createUnsubscribeCb(i)}}async createUnsubscribeCb(e){const t=await Yi(this,zi,"f");return async()=>{t.remove(e),await t.dispatch(`sessionContextGroup:handlerRemoved-${this.id}`,{handlerId:e})}}getUserInstance(){return{id:this.id,setContext:(0,Qi.wrapInTryCatch)(this.setContext.bind(this),"Failed to set context: "),getCurrentContext:(0,Qi.wrapInTryCatch)(this.getCurrentContext.bind(this),"Failed to get context: "),addContextHandler:(0,Qi.wrapInTryCatch)(this.addContextHandler.bind(this),"Failed to add context handler: ")}}}qi.default=Xi,zi=new WeakMap;var er={},tr={},nr={},ir={},rr=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),or=s&&s.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),sr=s&&s.__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)&&rr(t,e,n);return or(t,e),t};Object.defineProperty(ir,"__esModule",{value:!0}),ir.PrivateChannelClient=void 0;const ar=sr(Hi);var cr,dr;function hr(){if(cr)return tr;cr=1;var e,t=s&&s.__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)},n=s&&s.__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},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(tr,"__esModule",{value:!0}),tr.FDC3ModuleBase=void 0;const o=nr,a=Hi,c=wr(),d=r(i);return tr.FDC3ModuleBase=class{get client(){return t(this,e,"f").call(this)}get fin(){return this.wire.getFin()}constructor(t,i){this.wire=i,e.set(this,void 0),n(this,e,t,"f")}async broadcast(e){return this.wire.sendAction("fdc3-broadcast").catch((e=>{})),this.client.setContext(e)}async _open(e,t){this.wire.sendAction("fdc3-open").catch((e=>{}));try{return await c.InteropClient.ferryFdc3Call(this.client,"fdc3Open",{app:e,context:t})}catch(e){const t=e.message===a.BROKER_ERRORS.fdc3Open?"ResolverUnavailable":e.message;throw new Error(t)}}async _getChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:"system",...(0,o.getUnsupportedChannelApis)()})))}async getOrCreateChannel(e){this.wire.sendAction("fdc3-get-or-create-channel").catch((e=>{}));const t=(await this._getChannels()).find((t=>t.id===e));if(t)return{...t,type:"system",...(0,o.getUnsupportedChannelApis)()};try{const t=await this.client.joinSessionContextGroup(e);return(0,o.buildAppChannelObject)(t)}catch(e){throw console.error(e.message),new Error(o.ChannelError.CreationFailed)}}async getSystemChannels(){return this.wire.sendAction("fdc3-get-system-channels").catch((e=>{})),this._getChannels()}async joinChannel(e){this.wire.sendAction("fdc3-join-channel").catch((e=>{}));try{return await this.client.joinContextGroup(e)}catch(e){if(e.message===a.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup?console.error("The Channel you have tried to join is an App Channel. Custom Channels can only be defined by the Interop Broker through code or manifest configuration. Please use getOrCreateChannel."):console.error(e.message),e.message.startsWith("Attempting to join a context group that does not exist"))throw new Error(o.ChannelError.NoChannelFound);throw new Error(o.ChannelError.AccessDenied)}}async getCurrentChannel(){this.wire.sendAction("fdc3-get-current-channel").catch((e=>{}));const e=await this.getCurrentContextGroupInfo();return e?this.buildChannelObject(e):null}async leaveCurrentChannel(){return this.wire.sendAction("fdc3-leave-current-channel").catch((e=>{})),this.client.removeFromContextGroup()}async getCurrentContextGroupInfo(){const e=await this.client.getContextGroups(),t=e.map((async e=>this.client.getAllClientsInContextGroup(e.id))),n=(await Promise.all(t)).findIndex((e=>e.some((e=>{const{uuid:t,name:n}=e;return this.wire.me.uuid===t&&this.wire.me.name===n}))));return e[n]}async buildChannelObject(e){return{...e,type:"system",addContextListener:(...[e,t])=>{let n,i;"function"==typeof e?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),n=e):(n=t,"string"==typeof e&&(i=e));const r=(async()=>{let e=!0;const t=await this.client.getCurrentContext(i);return this.client.addContextHandler(((i,r)=>{if(!e||(e=!1,!(0,d.default)(t,i)))return n(i,r)}),i)})();return{...r,unsubscribe:()=>r.then((e=>e.unsubscribe()))}},broadcast:this.broadcast.bind(this),getCurrentContext:async e=>{const t=await this.client.getCurrentContext(e);return void 0===t?null:t}}}},e=new WeakMap,tr}ir.PrivateChannelClient=class{constructor(e,t){this.id=t,this.client=e,this.listeners=new Map}async broadcast(e){return this.client.dispatch("broadcast",{context:e})}async getCurrentContext(e){return this.client.dispatch("getCurrentContext",{contextType:e})}async addContextListener(e,t){if("function"!=typeof t)throw new Error("Non-function argument passed to the second parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");let n;n=e?`contextHandler:invoke-${this.id}-${e}-${ar.generateId()}`:`contextHandler:invoke-${this.id}-${ar.generateId()}`,this.client.register(n,ar.wrapContextHandler(t,n));const i={unsubscribe:await this.createContextUnsubscribeCb(n)};return this.listeners.set(n,i),await this.client.dispatch("contextHandlerAdded",{handlerId:n,contextType:e}),i}createNonStandardUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch("nonStandardHandlerRemoved",{handlerId:e})}}createContextUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch("contextHandlerRemoved",{handlerId:e})}}onAddContextListener(e){const t=`onContextHandlerAdded:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch("onAddContextHandlerAdded",{handlerId:t}),n}onDisconnect(e){const t=`onDisconnect:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch("onDisconnectHandlerAdded",{handlerId:t}),n}onUnsubscribe(e){const t=`onUnsubscribe:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch("onUnsubscribeHandlerAdded",{handlerId:t}),n}async cleanUpAllSubs(){Array.from(this.listeners.keys()).forEach((e=>{this.client.remove(e),this.listeners.delete(e)}))}async disconnect(){try{await this.client.dispatch("clientDisconnecting"),await this.cleanUpAllSubs(),await this.client.disconnect()}catch(e){throw new Error(e.message)}}},function(e){var t=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.getIntentResolution=e.isChannel=e.isContext=e.connectPrivateChannel=e.buildAppChannelObject=e.buildPrivateChannelObject=e.ChannelError=e.ResultError=e.UnsupportedChannelApiError=e.getUnsupportedChannelApis=void 0;const n=Hi,r=ir,o=t(i);e.getUnsupportedChannelApis=e=>({addContextListener:()=>{throw new a("Channel.addContextListener",e)},broadcast:()=>{throw new a("Channel.broadcast",e)},getCurrentContext:()=>{throw new a("Channel.getCurrentContext",e)}});class a extends Error{constructor(e,t="System"){super(e),this.message=`Calling ${e} on an instance of a ${t} Channel returned by fdc3.get${t}Channels is not supported. If you would like to use a ${t} Channel, please use fdc3.joinChannel, fdc3.addContextListener, and fdc3.broadcast instead.`}}var c,d;e.UnsupportedChannelApiError=a,function(e){e.NoResultReturned="NoResultReturned",e.IntentHandlerRejected="IntentHandlerRejected"}(c=e.ResultError||(e.ResultError={})),(d=e.ChannelError||(e.ChannelError={})).NoChannelFound="NoChannelFound",d.AccessDenied="AccessDenied",d.CreationFailed="CreationFailed";e.buildPrivateChannelObject=e=>{let t=!1;const n=()=>{if(t)throw new Error("Private Channel Client has been disconnected from the Private Channel")};return{id:e.id,type:"private",broadcast:async t=>(n(),e.broadcast(t)),getCurrentContext:async t=>(n(),e.getCurrentContext(t)),addContextListener:async(t,i)=>{n();let r=i,o=t;"function"==typeof t&&(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),r=t,o=null);return e.addContextListener(o,r)},onAddContextListener:t=>(n(),e.onAddContextListener(t)),disconnect:async()=>(n(),t=!0,e.disconnect()),onDisconnect:t=>(n(),e.onDisconnect(t)),onUnsubscribe:t=>(n(),e.onUnsubscribe(t))}};e.buildAppChannelObject=e=>({id:e.id,type:"app",broadcast:e.setContext,getCurrentContext:async t=>{const n=await e.getCurrentContext(t);return void 0===n?null:n},addContextListener:(t,n)=>{let i,r;"function"==typeof t?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),i=t):(i=n,"string"==typeof t&&(r=t));const s=(async()=>{let t=!0;const n=await e.getCurrentContext(r);return e.addContextHandler(((e,r)=>{if(!t||(t=!1,!(0,o.default)(n,e)))return i(e,r)}),r)})();return{...s,unsubscribe:()=>s.then((e=>e.unsubscribe()))}}});e.connectPrivateChannel=async t=>{try{const n=await fin.InterApplicationBus.Channel.connect(t),i=new r.PrivateChannelClient(n,t);return(0,e.buildPrivateChannelObject)(i)}catch(e){throw new Error(`Private Channel with id: ${t} doesn't exist`)}};e.isContext=e=>{if(e&&"object"==typeof e&&"type"in e){const{type:t}=e;return"string"==typeof t}return!1};e.isChannel=e=>{if(e&&"object"==typeof e&&"type"in e&&"id"in e){const{type:t,id:n}=e;return"string"==typeof t&&"string"==typeof n&&("app"===t||"private"===t)}return!1};e.getIntentResolution=async(t,i,r,o)=>{const s=(0,n.generateId)(),a=new Promise(((e,t)=>{fin.InterApplicationBus.subscribe({uuid:"*"},s,(t=>{e(t)})).catch((()=>t(new Error("getResult is not supported in this environment"))))})),d=r?{target:r,intentResolutionResultId:s}:{intentResolutionResultId:s},h=o?{name:o,context:i,metadata:d}:{...i,metadata:d},l=async()=>{let n=await a;if(!n||"object"!=typeof n)throw new Error(c.NoResultReturned);const{error:i}=n;if(i)throw new Error(c.IntentHandlerRejected);if((0,e.isChannel)(n)){const{id:i,type:r}=n;switch(r){case"private":n=await(0,e.connectPrivateChannel)(i);break;case"app":{const r=await t.joinSessionContextGroup(i);n=(0,e.buildAppChannelObject)(r);break}}}else if(!(0,e.isContext)(n))throw new Error(c.NoResultReturned);return n},u=o?await t.fireIntent(h):await t.fireIntentForContext(h);return"object"!=typeof u?{source:{appId:"",instanceId:""},intent:"",version:"2.0",getResult:l}:{...u,getResult:l}}}(nr);var lr,ur,pr={};function wr(){if(ur)return Ki;ur=1;var e,t,n=s&&s.__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},i=s&&s.__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)},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ki,"__esModule",{value:!0}),Ki.InteropClient=void 0;const o=d,a=r(qi),c=function(){if(dr)return er;dr=1,Object.defineProperty(er,"__esModule",{value:!0}),er.Fdc3Module=void 0;const e=Hi,t=hr();class n extends t.FDC3ModuleBase{async open(e,t){await super._open(e,t)}addContextListener(e,t){let n;return this.wire.sendAction("fdc3-add-context-listener").catch((e=>{})),"function"==typeof e?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),n=this.client.addContextHandler(e)):n=this.client.addContextHandler(t,null===e?void 0:e),{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}addIntentListener(e,t){this.wire.sendAction("fdc3-add-intent-listener").catch((e=>{}));const n=this.client.registerIntentHandler((e=>{const{context:n,metadata:i}=e,{metadata:r}=n,o=i?.intentResolutionResultId||r?.intentResolutionResultId;o&&this.fin.InterApplicationBus.publish(o,null).catch((()=>null)),t(e.context)}),e,{fdc3Version:"1.2"});return{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}async raiseIntent(t,n,i){this.wire.sendAction("fdc3-raise-intent").catch((e=>{}));const r=i?{name:t,context:n,metadata:{target:i}}:{name:t,context:n};try{return await this.client.fireIntent(r)}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntent?"ResolverUnavailable":t.message;throw new Error(n)}}async findIntent(t,n){this.wire.sendAction("fdc3-find-intent").catch((e=>{}));try{return await this.client.getInfoForIntent({name:t,context:n})}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntent?"ResolverUnavailable":t.message;throw new Error(n)}}async findIntentsByContext(t){this.wire.sendAction("fdc3-find-intents-by-context").catch((e=>{}));try{return await this.client.getInfoForIntentsByContext(t)}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntentsByContext?"ResolverUnavailable":t.message;throw new Error(n)}}async raiseIntentForContext(t,n){this.wire.sendAction("fdc3-raise-intent-for-context").catch((e=>{}));try{return await this.client.fireIntentForContext({...t,metadata:{target:n}})}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntentForContext?"ResolverUnavailable":t.message;throw new Error(n)}}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}getInfo(){return this.wire.sendAction("fdc3-get-info").catch((e=>{})),{providerVersion:this.wire.environment.getAdapterVersionSync(),provider:`openfin-${this.wire.me.uuid}`,fdc3Version:"1.2"}}}return er.Fdc3Module=n,er}(),h=function(){if(lr)return pr;lr=1,Object.defineProperty(pr,"__esModule",{value:!0}),pr.Fdc3Module2=void 0;const e=hr(),t=Hi,n=wr(),i=nr,r=ir;class o extends e.FDC3ModuleBase{async open(e,t){return"string"==typeof e&&console.warn("Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string })."),super._open(e,t)}async findInstances(e){this.wire.sendAction("fdc3-find-instances").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,"fdc3FindInstances",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3FindInstances?"ResolverUnavailable":e.message;throw new Error(n)}}async getAppMetadata(e){this.wire.sendAction("fdc3-get-app-metadata").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,"fdc3GetAppMetadata",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3GetAppMetadata?"ResolverUnavailable":e.message;throw new Error(n)}}async addContextListener(e,t){this.wire.sendAction("fdc3-add-context-listener").catch((e=>{}));const n=e=>t=>{const{contextMetadata:n,...i}=t,r=n?[{...i},n]:[t,null];e(...r)};let i=t,r=n(i);return"function"==typeof e?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),i=e,r=n(i),this.client.addContextHandler(r)):this.client.addContextHandler(r,null===e?void 0:e)}async findIntent(e,n,i){this.wire.sendAction("fdc3-find-intent").catch((e=>{}));try{return await this.client.getInfoForIntent({name:e,context:n,metadata:{resultType:i}})}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntent?"ResolverUnavailable":e.message;throw new Error(n)}}async findIntentsByContext(e,i){this.wire.sendAction("fdc3-find-intents-by-context").catch((e=>{}));const r=i?{context:e,metadata:{resultType:i}}:e;try{return await n.InteropClient.ferryFdc3Call(this.client,"fdc3v2FindIntentsByContext",r)}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntentsByContext?"ResolverUnavailable":e.message;throw new Error(n)}}async raiseIntent(e,n,r){this.wire.sendAction("fdc3-raise-intent").catch((e=>{}));try{return"string"==typeof r&&console.warn("Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string })."),(0,i.getIntentResolution)(this.client,n,r,e)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?"ResolverUnavailable":e.message;throw new Error(n)}}async raiseIntentForContext(e,n){this.wire.sendAction("fdc3-raise-intent-for-context").catch((e=>{}));try{return"string"==typeof n&&console.warn("Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string })."),(0,i.getIntentResolution)(this.client,e,n)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?"ResolverUnavailable":e.message;throw new Error(n)}}async addIntentListener(e,t){if(this.wire.sendAction("fdc3-add-intent-listener").catch((e=>{})),"string"!=typeof e)throw new Error("First argument must be an Intent name");return this.client.registerIntentHandler((async e=>{let n,i;const{context:r,metadata:o}=e,{contextMetadata:s,metadata:a,...c}=r,d=o?.intentResolutionResultId||a?.intentResolutionResultId;try{const e=a?{metadata:a,...c}:{...c};n=await t(e,s),i=n}catch(e){n=e,i={error:!0}}if(d&&this.fin.InterApplicationBus.publish(d,i).catch((()=>null)),n instanceof Error)throw new Error(n.message);return n}),e,{fdc3Version:"2.0"})}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}async createPrivateChannel(){const e=(0,t.generateId)();await n.InteropClient.ferryFdc3Call(this.client,"createPrivateChannelProvider",{channelId:e});const o=await this.fin.InterApplicationBus.Channel.connect(e),s=new r.PrivateChannelClient(o,e);return(0,i.buildPrivateChannelObject)(s)}async getUserChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:"user",...(0,i.getUnsupportedChannelApis)("User")})))}async getSystemChannels(){return console.warn("This API has been deprecated. Please use fdc3.getUserChannels instead."),super.getSystemChannels()}async joinUserChannel(e){return super.joinChannel(e)}async joinChannel(e){return console.warn("This API has been deprecated. Please use fdc3.joinUserChannel instead."),super.joinChannel(e)}async getCurrentChannel(){const e=await super.getCurrentChannel();return e?{...e,type:"user",broadcast:this.broadcast.bind(this)}:null}async getInfo(){return n.InteropClient.ferryFdc3Call(this.client,"fdc3v2GetInfo",{fdc3Version:"2.0"})}}return pr.Fdc3Module2=o,pr}(),l=Hi;let u=class extends o.Base{constructor(i,r){super(i),e.set(this,void 0),t.set(this,void 0),n(this,t,new Map,"f"),n(this,e,r,"f")}async setContext(t){this.wire.sendAction("interop-client-set-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("setContext",{context:t})}async addContextHandler(t,n){if(this.wire.sendAction("interop-client-add-context-handler").catch((e=>{})),"function"!=typeof t)throw new Error("Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");const r=await i(this,e,"f");let o;o=n?`invokeContextHandler-${n}-${(0,l.generateId)()}`:"invokeContextHandler";const s=(0,l.wrapContextHandler)(t,o);return r.register(o,s),await r.dispatch("contextHandlerRegistered",{handlerId:o,contextType:n}),{unsubscribe:async()=>{r.remove(o),await r.dispatch("removeContextHandler",{handlerId:o})}}}async getContextGroups(){this.wire.sendAction("interop-client-get-context-groups").catch((e=>{}));return(await i(this,e,"f")).dispatch("getContextGroups")}async joinContextGroup(t,n){this.wire.sendAction("interop-client-join-context-group").catch((e=>{}));const r=await i(this,e,"f");if(!t)throw new Error("No contextGroupId specified for joinContextGroup.");return r.dispatch("joinContextGroup",{contextGroupId:t,target:n})}async removeFromContextGroup(t){this.wire.sendAction("interop-client-remove-from-context-group").catch((e=>{}));return(await i(this,e,"f")).dispatch("removeFromContextGroup",{target:t})}async getAllClientsInContextGroup(t){this.wire.sendAction("interop-client-get-all-clients-in-context-group").catch((e=>{}));const n=await i(this,e,"f");if(!t)throw new Error("No contextGroupId specified for getAllClientsInContextGroup.");return n.dispatch("getAllClientsInContextGroup",{contextGroupId:t})}async getInfoForContextGroup(t){this.wire.sendAction("interop-client-get-info-for-context-group").catch((e=>{}));const n=await i(this,e,"f");if(!t)throw new Error("No contextGroupId specified for getInfoForContextGroup.");return n.dispatch("getInfoForContextGroup",{contextGroupId:t})}async fireIntent(t){this.wire.sendAction("interop-client-fire-intent").catch((e=>{}));return(await i(this,e,"f")).dispatch("fireIntent",t)}async registerIntentHandler(t,n,r){this.wire.sendAction("interop-client-register-intent-handler").catch((e=>{}));const o=await i(this,e,"f"),s=`intent-handler-${n}`,a=(0,l.wrapIntentHandler)(t,s);try{await o.register(s,a),await o.dispatch("intentHandlerRegistered",{handlerId:s,...r})}catch(e){throw new Error("Unable to register intent handler")}return{unsubscribe:async()=>{o.remove(s)}}}async getCurrentContext(t){this.wire.sendAction("interop-client-get-current-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("getCurrentContext",{contextType:t})}async getInfoForIntent(t){this.wire.sendAction("interop-client-get-info-for-intent").catch((e=>{}));return(await i(this,e,"f")).dispatch("getInfoForIntent",t)}async getInfoForIntentsByContext(t){this.wire.sendAction("interop-client-get-info-for-intents-by-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("getInfoForIntentsByContext",t)}async fireIntentForContext(t){this.wire.sendAction("interop-client-fire-intent-for-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("fireIntentForContext",t)}async joinSessionContextGroup(n){try{const r=i(this,t,"f").get(n);if(r)return r.getUserInstance();const o=await i(this,e,"f"),{hasConflict:s}=await o.dispatch("sessionContextGroup:createIfNeeded",{sessionContextGroupId:n});s&&console.warn(`A (non-session) context group with the name "${n}" already exists. If you are trying to join a Context Group, call joinContextGroup instead.`);const c=new a.default(this.wire,i(this,e,"f"),n);return i(this,t,"f").set(n,c),c.getUserInstance()}catch(e){throw console.error(`Error thrown trying to create Session Context Group with id "${n}": ${e}`),e}}async onDisconnection(t){this.wire.sendAction("interop-client-add-ondisconnection-listener").catch((e=>{}));return(await i(this,e,"f")).onDisconnection((e=>{const{uuid:n}=e;t({type:"interop-broker",topic:"disconnected",brokerName:n})}))}getFDC3Sync(e){switch(e){case"1.2":return new c.Fdc3Module((()=>this),this.wire);case"2.0":return new h.Fdc3Module2((()=>this),this.wire);default:throw new Error(`Invalid FDC3 version provided: ${e}. Must be '1.2' or '2.0'`)}}async getFDC3(e){return this.getFDC3Sync(e)}static async ferryFdc3Call(t,n,r){return(await i(t,e,"f")).dispatch(n,r||null)}};return Ki.InteropClient=u,e=new WeakMap,t=new WeakMap,Ki}var yr,fr,gr,mr={};function vr(){if(yr)return mr;yr=1,Object.defineProperty(mr,"__esModule",{value:!0}),mr.overrideCheck=mr.checkFDC32Overrides=mr.getDefaultViewFdc3VersionFromAppInfo=void 0;const e=Vi();function t(t){return["fdc3HandleFindInstances","handleInfoForIntent","handleInfoForIntentsByContext","fdc3HandleGetAppMetadata","fdc3HandleGetInfo","fdc3HandleOpen","handleFiredIntent","handleFiredIntentForContext"].filter((n=>t[n]===e.InteropBroker.prototype[n]))}return mr.getDefaultViewFdc3VersionFromAppInfo=function({manifest:e,initialOptions:t}){const n=e?.platform?.defaultViewOptions?.fdc3InteropApi??t.defaultViewOptions?.fdc3InteropApi;return["1.2","2.0"].includes(n??"")?n:void 0},mr.checkFDC32Overrides=t,mr.overrideCheck=function(e,n){if(n&&"2.0"===n){const n=t(e);n.length>0&&console.warn(`WARNING: FDC3 2.0 has been set as a default option for Views in this Platform, but the required InteropBroker APIs for FDC3 2.0 compliance have not all been overridden.\nThe following APIs need to be overridden:\n${n.join("\n")}`)}},mr}function Cr(){return gr||(gr=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),i=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),i(function(){if(fr)return Ti;fr=1;var e=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ti,"__esModule",{value:!0}),Ti.InteropModule=void 0;const t=e(n),i=$i,r=d,o=Vi(),a=wr(),c=vr(),h=Tn,l=e=>new e,u="You have attempted to use or modify InteropBroker parameters, which is not allowed. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.";class p extends r.Base{async init(e,n=l){this.wire.sendAction("interop-init").catch((()=>{}));const r=await this.wire.environment.getInteropInfo(this.wire.getFin()),s=(0,i.createUnusableObject)(u),a=(0,i.createWarningObject)(u,(0,t.default)(r)),d=async()=>{throw new Error(u)},p=o.InteropBroker.createClosedConstructor(this.wire,(()=>this.fin.InterApplicationBus.Channel.create(`interop-broker-${e}`)),r);let w;return w=Array.isArray(n)?new((0,h.overrideFromComposables)(...n)(p))(s,d,a):await n(p,s,d,a),(0,c.overrideCheck)(w,r.fdc3Version),w}connectSync(e,t){return this.wire.sendAction("interop-connect-sync").catch((()=>{})),new a.InteropClient(this.wire,this.wire.environment.whenReady().then((()=>this.fin.InterApplicationBus.Channel.connect(`interop-broker-${e}`,{payload:t}))))}}return Ti.InteropModule=p,Ti}(),e),i(wr(),e),i(Vi(),e)}(Li)),Li}var br={},Ir={},Er={},xr={};Object.defineProperty(xr,"__esModule",{value:!0}),xr.getSnapshotSourceChannelName=void 0;xr.getSnapshotSourceChannelName=e=>`snapshot-source-provider-${e.uuid}`;var Ar,Pr,Mr,_r,Or,Sr=s&&s.__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},Rr=s&&s.__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)};Object.defineProperty(Er,"__esModule",{value:!0}),Er.SnapshotSource=void 0;const Fr=d,jr=xr,kr=new Map;class Lr extends Fr.Base{constructor(e,t){super(e),Ar.set(this,void 0),Pr.set(this,(()=>(kr.has(this.identity.uuid)||kr.set(this.identity.uuid,{eventFired:null,clientPromise:null}),kr.get(this.identity.uuid)))),Mr.set(this,(()=>(Rr(this,Pr,"f").call(this).clientPromise||(Rr(this,Pr,"f").call(this).clientPromise=Rr(this,_r,"f").call(this)),Rr(this,Pr,"f").call(this).clientPromise))),_r.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);try{Rr(this,Pr,"f").call(this).eventFired||await Rr(this,Or,"f").call(this);const t=await this.fin.InterApplicationBus.Channel.connect(e,{wait:!1});return t.onDisconnection((()=>{Rr(this,Pr,"f").call(this).clientPromise=null,Rr(this,Pr,"f").call(this).eventFired=null})),t}catch(e){throw Rr(this,Pr,"f").call(this).clientPromise=null,new Error("The targeted SnapshotSource is not currently initialized. Await this object's ready() method.")}})),Or.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);let t,n;const i=new Promise(((e,i)=>{t=e,n=i}));Rr(this,Pr,"f").call(this).eventFired=i;const r=async i=>{try{i.channelName===e&&(t(),await this.fin.InterApplicationBus.Channel.removeListener("connected",r))}catch(e){n(e)}};await this.fin.InterApplicationBus.Channel.on("connected",r)})),Sr(this,Ar,t,"f")}get identity(){return Rr(this,Ar,"f")}async ready(){this.wire.sendAction("snapshot-source-ready").catch((e=>{}));try{await Rr(this,Mr,"f").call(this)}catch(e){await Rr(this,Pr,"f").call(this).eventFired}}async getSnapshot(){this.wire.sendAction("snapshot-source-get-snapshot").catch((e=>{}));const e=await Rr(this,Mr,"f").call(this),t=await e.dispatch("get-snapshot");return(await t).snapshot}async applySnapshot(e){this.wire.sendAction("snapshot-source-apply-snapshot").catch((e=>{}));return(await Rr(this,Mr,"f").call(this)).dispatch("apply-snapshot",{snapshot:e})}}Er.SnapshotSource=Lr,Ar=new WeakMap,Pr=new WeakMap,Mr=new WeakMap,_r=new WeakMap,Or=new WeakMap,Object.defineProperty(Ir,"__esModule",{value:!0}),Ir.SnapshotSourceModule=void 0;const Tr=d,$r=Er,Br=xr;class Gr extends Tr.Base{async init(e){if(this.wire.sendAction("snapshot-source-init").catch((e=>{})),"object"!=typeof e||"function"!=typeof e.getSnapshot||"function"!=typeof e.applySnapshot)throw new Error("you must pass in a valid SnapshotProvider");const t=await this.fin.InterApplicationBus.Channel.create((0,Br.getSnapshotSourceChannelName)(this.fin.me));t.register("get-snapshot",(async()=>({snapshot:await e.getSnapshot()}))),t.register("apply-snapshot",(({snapshot:t})=>e.applySnapshot(t)))}wrapSync(e){return this.wire.sendAction("snapshot-source-wrap-sync").catch((e=>{})),new $r.SnapshotSource(this.wire,e)}async wrap(e){return this.wire.sendAction("snapshot-source-wrap").catch((e=>{})),this.wrapSync(e)}}Ir.SnapshotSourceModule=Gr,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Ir,e),n(Er,e)}(br),Object.defineProperty(a,"__esModule",{value:!0});var Wr=a.Fin=void 0;const Hr=t,Nr=c,Dr=ie(),Ur=Z(),Vr=de,zr=en,Kr=rn,qr=un,Jr=bn,Yr=J(),Zr=An,Qr=ki,Xr=Cr(),eo=br;class to extends Hr.EventEmitter{constructor(e){super(),this.wire=e,this.System=new Nr.System(e),this.Window=new Dr._WindowModule(e),this.Application=new Ur.ApplicationModule(e),this.InterApplicationBus=new Vr.InterApplicationBus(e),this.Clipboard=new zr.Clipboard(e),this.ExternalApplication=new Kr.ExternalApplicationModule(e),this.Frame=new qr._FrameModule(e),this.GlobalHotkey=new Jr.GlobalHotkey(e),this.Platform=new Zr.PlatformModule(e,this.InterApplicationBus.Channel),this.View=new Yr.ViewModule(e),this.Interop=new Xr.InteropModule(e),this.SnapshotSource=new eo.SnapshotSourceModule(e),e.registerFin(this),this.me=(0,Qr.getMe)(e),e.on("disconnected",(()=>{this.emit("disconnected")}))}}Wr=a.Fin=to;var no={},io={};function ro(e){return"string"==typeof e.manifestUrl}function oo(e){return ao(e)&&"string"==typeof e.address}function so(e){return oo(e)&&"string"==typeof e.token}function ao(e){return"string"==typeof e.uuid}function co(e){return e.runtime&&"string"==typeof e.runtime.version}function ho(e){return ao(e)&&co(e)}Object.defineProperty(io,"__esModule",{value:!0}),io.isInternalConnectConfig=io.isPortDiscoveryConfig=io.isNewConnectConfig=io.isConfigWithReceiver=io.isRemoteConfig=io.isExistingConnectConfig=io.isExternalConfig=void 0,io.isExternalConfig=ro,io.isExistingConnectConfig=oo,io.isRemoteConfig=so,io.isConfigWithReceiver=function(e){return"object"==typeof e.receiver&&so({...e,address:""})},io.isNewConnectConfig=ho,io.isPortDiscoveryConfig=function(e){return ro(e)&&co(e)||ho(e)},io.isInternalConnectConfig=function(e){return oo(e)||ho(e)};var lo={},uo={};Object.defineProperty(uo,"__esModule",{value:!0}),uo.EmitterMap=void 0;const po=t;function wo(e){return Buffer.from(e).toString("base64")}uo.EmitterMap=class{constructor(){this.storage=new Map}hashKeys(e){return e.map(wo).join("/")}getOrCreate(e){const t=this.hashKeys(e);return this.storage.has(t)||this.storage.set(t,new po.EventEmitter),this.storage.get(t)}has(e){return this.storage.has(this.hashKeys(e))}delete(e){const t=this.hashKeys(e);return this.storage.delete(t)}},Object.defineProperty(lo,"__esModule",{value:!0});const yo=uo;class fo extends yo.EmitterMap{constructor(){super(...arguments),this.dispatchEvent=e=>{if(function(e){return"process-desktop-event"===e.action}(e)){const{payload:t}=e,n=function(e){const{topic:t}=e;if("frame"===t||"window"===t||"view"===t){const{uuid:n,name:i}=e;return[t,n,i]}if("application"===t){const{uuid:n}=e;return[t,n]}return[t]}(t);if(this.has(n))return this.getOrCreate(n).emit(t.type,t),!0}return!1}}}lo.default=fo;var go,mo,vo=s&&s.__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},Co=s&&s.__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)},bo=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(no,"__esModule",{value:!0});var Io=no.Transport=void 0;const Eo=t,xo=io,Ao=g,Po=bo(lo),Mo=ki,_o=ke;class Oo extends Eo.EventEmitter{constructor(e,t,n){super(),this.wireListeners=new Map,this.topicRefMap=new Map,this.eventAggregator=new Po.default,this.messageHandlers=[this.eventAggregator.dispatchEvent],go.set(this,void 0),mo.set(this,void 0),this.connectSync=()=>{Co(this,go,"f").connectSync()},this.getPort=()=>Co(this,go,"f").getPort(),vo(this,go,new e(this.onmessage.bind(this)),"f"),this.environment=t,this.sendRaw=Co(this,go,"f").send.bind(Co(this,go,"f")),this.registerMessageHandler(this.handleMessage.bind(this)),Co(this,go,"f").on("disconnected",(()=>{for(const[,{handleNack:e}]of this.wireListeners)e({reason:"Remote connection has closed"});this.wireListeners.clear(),this.emit("disconnected")}));const{uuid:i,name:r}=n,o=this.environment.getCurrentEntityType();this.me=(0,Mo.getBaseMe)(o,i,r)}getFin(){if(!Co(this,mo,"f"))throw new Error("No Fin object registered for this transport");return Co(this,mo,"f")}registerFin(e){if(Co(this,mo,"f"))throw new Error("Fin object has already been registered for this transport");vo(this,mo,e,"f")}shutdown(){return Co(this,go,"f").shutdown()}async connect(e){if((0,xo.isConfigWithReceiver)(e))return await Co(this,go,"f").connect(e.receiver),this.authorize(e);if((0,xo.isRemoteConfig)(e))return this.connectRemote(e);if((0,xo.isExistingConnectConfig)(e))return this.connectByPort(e);if((0,xo.isNewConnectConfig)(e)){const t=await this.environment.retrievePort(e);return this.connectByPort({...e,address:`ws://localhost:${t}`})}}async connectRemote(e){return await Co(this,go,"f").connect(new(this.environment.getWsConstructor())(e.address)),this.authorize(e)}async connectByPort(e){const{address:t,uuid:n}=e,i={...e,type:"file-token"},r=Co(this,go,"f");await r.connect(new(this.environment.getWsConstructor())(e.address));const o=await this.sendAction("request-external-authorization",{uuid:n,type:"file-token"},!0);if("external-authorization-response"!==o.action)throw new Ao.UnexpectedActionError(o.action);return await this.environment.writeToken(o.payload.file,o.payload.token),this.authorize(i)}async authorize(e){const t=await this.sendAction("request-authorization",e,!0);if("authorization-response"!==t.action)throw new Ao.UnexpectedActionError(t.action);if(!0!==t.payload.success)throw new Ao.RuntimeError(t.payload)}sendAction(e,t={},n=!1){let i=()=>{};const r=Ao.RuntimeError.getCallSite(1),o=this.environment.getNextMessageId(),s=new Promise(((s,a)=>{i=a;const c={action:e,payload:t,messageId:o},d=Co(this,go,"f");return this.addWireListener(o,s,(e=>this.nackHandler(e,a,r)),n),d.send(c).catch(a)}));return Object.assign(s,{cancel:i,messageId:o})}nackHandler(e,t,n){t("string"==typeof e?e:new Ao.RuntimeError(e,n))}ferryAction(e){return new Promise(((t,n)=>{const i=this.environment.getNextMessageId();e.messageId=i;const r=e=>{t(e.payload)};return Co(this,go,"f").send(e).then((()=>this.addWireListener(i,r,(e=>this.nackHandler(e,n)),!1))).catch(n)}))}registerMessageHandler(e){this.messageHandlers.push(e)}addWireListener(e,t,n,i){i?this.uncorrelatedListener=t:this.wireListeners.has(e)?n({reason:"Duplicate handler id",error:(0,_o.errorToPOJO)(new Ao.DuplicateCorrelationError(String(e)))}):this.wireListeners.set(e,{resolve:t,handleNack:n})}onmessage(e){for(const t of this.messageHandlers)t.call(null,e)}handleMessage(e){const t=e.correlationId||NaN;if("correlationId"in e){if(!this.wireListeners.has(t))return!1;{const{resolve:n,handleNack:i}=this.wireListeners.get(t);"ack"!==e.action?i({reason:"Did not receive ack action",error:(0,_o.errorToPOJO)(new Ao.NoAckError(e.action))}):"payload"in e?e.payload.success?n.call(null,e):i(e.payload):"string"==typeof e.reason?i(e):(console.warn("Received invalid response from core",e),i({reason:"invalid response shape"})),this.wireListeners.delete(t)}}else this.uncorrelatedListener&&this.uncorrelatedListener.call(null,e),this.uncorrelatedListener=()=>{};return!0}}Io=no.Transport=Oo,go=new WeakMap,mo=new WeakMap;const So=(...e)=>({log:(...t)=>console.debug(`[${(new Date).toISOString()}]`,...(e=>e.map((e=>`[${e}]`)))(e),...t),getLogger:(...t)=>So(...e,...t)}),Ro=So("@openfin/core-web/client");function Fo(e,t){if(!function(e){return"string"==typeof e}(e))throw new Error(`Property ${t} has invalid type. Expected string, got ${typeof e}.`)}const jo="web-broker-ports-ready",ko=Ro.getLogger("get-web-interop-ports");function Lo(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)}function To(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}"function"==typeof SuppressedError&&SuppressedError;const $o=e=>{var n,i,r;return r=class extends t.EventEmitter{constructor(t){super(),n.set(this,void 0),i.set(this,!1),this.connectSync=()=>{Lo(this,i,"f")||(e.addEventListener("message",(e=>{e.data?.topic?.startsWith("wire-message")&&e.data.message&&Lo(this,n,"f").call(this,{...JSON.parse(e.data.message),ports:e.ports})})),e.start())},this.connect=async()=>{this.connectSync()},this.send=t=>(e.postMessage({topic:"wire-message",message:JSON.stringify(t)}),Promise.resolve()),this.shutdown=async()=>{e.close()},To(this,n,t,"f")}getPort(){return e}},n=new WeakMap,i=new WeakMap,r};var Bo={},Go={};Object.defineProperty(Go,"__esModule",{value:!0}),Go.BaseEnvironment=void 0;const Wo=vr();Go.BaseEnvironment=class{async getViewWindowIdentity(e,t){const{identity:n}=await e.View.wrapSync(t).getCurrentWindow();return n}async getInteropInfo(e){const t=await e.Application.getCurrentSync().getInfo().catch((()=>null)),n=t?.initialOptions?.interopBrokerConfiguration??{};return{fdc3Version:t?(0,Wo.getDefaultViewFdc3VersionFromAppInfo)(t):void 0,...n,fdc3Info:{providerVersion:await e.System.getVersion(),provider:"OpenFin"}}}},Object.defineProperty(Bo,"__esModule",{value:!0});var Ho=Bo.BrowserEnvironment=void 0;const No=Go;class Do extends No.BaseEnvironment{constructor(){super(...arguments),this.type="other",this.getRandomId=()=>{const e=new Uint32Array(1);return window.crypto.getRandomValues(e)[0].toString(32)}}getAdapterVersionSync(){return""}observeBounds(e,t){throw new Error("Method not implemented.")}layoutAllowedInContext(e){return!1}initLayoutManager(e,t,n){throw new Error("Method not implemented.")}applyLayoutSnapshot(e,t,n){throw new Error("Method not implemented.")}createLayout(e,t){throw new Error("Method not implemented.")}destroyLayout(e,t){throw new Error("Method not implemented.")}resolveLayout(e,t){throw new Error("Method not implemented.")}initPlatform(...e){throw new Error("Method not implemented.")}writeToken(e,t){return Promise.resolve("")}retrievePort(e){throw new Error("Method not implemented.")}getNextMessageId(){return this.getRandomId()}createChildContent(e){throw new Error("Method not implemented.")}getWebWindow(e){throw new Error("Method not implemented.")}getCurrentEntityIdentity(){throw new Error("Method not implemented.")}getCurrentEntityType(){return"external connection"}raiseEvent(e,t){throw new Error("Method not implemented.")}getUrl(){return location.href}getDefaultChannelOptions(){return{create:{},connect:{}}}getRtcPeer(){return new RTCPeerConnection}getWsConstructor(){return WebSocket}whenReady(){return Promise.resolve()}}Ho=Bo.BrowserEnvironment=Do;const Uo=e=>"platform"in e&&void 0!==e.platform;var Vo,zo;class Ko extends Ho{constructor(e){super(),this.connectConfig=e,Vo.set(this,void 0),zo.set(this,new W((async()=>Promise.resolve().then((function(){return __webpack_require__(/*! ./main-b14f67c9.js */ "../../node_modules/@openfin/core-web/out/main-b14f67c9.js")}))))),Uo(e)&&this.validatePlatformOptions(e)}getAdapterVersionSync(){return"0.39.21"}validatePlatformOptions({platform:e}){if(!("layoutSnapshot"in e))throw new Error("Platform options are missing layoutSnapshot. Please provide a layoutSnapshot in the platform options.");if("windows"in e||"windows"in e.layoutSnapshot)throw new Error("It appears you tried to call connect() with a snapshot object from an OpenFin desktop environment. Note that connect() expects to be called with a platform property with this structure: { platform: { layoutSnapshot } }. To get a layoutSnapshot of the expected structure, use fin.Platform.Layout.getCurrentLayoutManagerSync().getLayoutSnapshot() in v34+ in your desktop environment.");const{layouts:t}=e.layoutSnapshot;Object.entries(t).map((([e,t])=>{if("object"!=typeof t||null===t)throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must be an object.`);if(!("content"in t))throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must contain a 'content' property.`)}))}async getInteropInfo(e){return{...{contextGroups:void 0,logging:{beforeAction:{enabled:!1},afterAction:{enabled:!1}}},fdc3Version:void 0,fdc3Info:{providerVersion:"0.39.21",provider:"OpenFin Web"}}}layoutAllowedInContext(e){return!0}async initLayoutManager(e,t,n){if(Lo(this,Vo,"f"))throw new Error("Layout already initialized.");if(!Uo(this.connectConfig))throw new Error("Platform options are missing from connection config.");const{WebLayoutEntryPoint:i}=await Lo(this,zo,"f").getValue();return To(this,Vo,new i(this.connectConfig),"f"),await Lo(this,Vo,"f").initLayoutManager(e,t,n)}async applyLayoutSnapshot(e,t,n){Lo(this,Vo,"f")?.applyLayoutSnapshot(e,t,n)}async createLayout(e,t){return Lo(this,Vo,"f")?.createLayout(e,t)}async destroyLayout(e,t){return Lo(this,Vo,"f")?.destroyLayout(e,t)}async getViewWindowIdentity(e,t){return Promise.resolve({uuid:t.uuid,name:t.uuid})}}Vo=new WeakMap,zo=new WeakMap;const qo=()=>{const e=((e,t)=>{const n=new RegExp(`^${t}<(?.*)>$`).exec(e)?.groups?.meta;if(n)try{return JSON.parse(atob(n))}catch(e){throw new Error(`Failed to decode JSON from ${n}.`)}})(window.name,"of-frame");if(e)try{const{name:t,uuid:n,brokerUrl:i,providerId:r,contextGroup:o}=e;return Fo(i,"brokerUrl"),Fo(n,"uuid"),Fo(t,"name"),{identity:{name:t,uuid:n},brokerUrl:i,interopConfig:{providerId:r,currentContextGroup:o}}}catch(e){throw new Error(`Unexpected error occurred when inferring platform information: ${e.stack}`)}},Jo=()=>{const e=r.v4();return{uuid:e,name:e}},Yo=async e=>{if("enabled"===e.connectionInheritance){const t=await(async e=>{const t=qo();if(t){const{validateOptions:n=(()=>!0)}=e,{identity:i,...r}=t;if(!await n(r))throw new Error("Parent options were rejected by validateOptions.");return t}})(e);if(t)return t}if(!e.options){const t="enabled"===e.connectionInheritance?"Broker URL was not specified nor provided by a platform container.":"Connection inheritance is disabled but no options were provided.";throw new Error(t)}return{...e.options,identity:Jo()}};exports.__classPrivateFieldGet=Lo,exports.__classPrivateFieldSet=To,exports.apiExposer=Gn,exports.commonjsGlobal=s,exports.connect=async t=>{try{Ro.log("Establishing connection",t);const{brokerUrl:n,identity:i,timeout:r,interopConfig:s}=await Yo(t),{workerPort:a,iframeBrokerPort:c}=await(async(e,t,n)=>{const{origin:i}=new URL(e),r=document.createElement("IFRAME");let s;r.style.display="none";try{return await new Promise(((a,c)=>{const d=e=>{if(e.source===r.contentWindow&&e.data?.topic===`ack-${jo}`){if(e.origin!==i)c(new Error(`Broker redirected to unexpected origin ${e.origin}, expected ${i}.`));else if(e.data.success){const[t,n]=e.ports;a({iframeBrokerPort:t,workerPort:n})}else c(new m(e.data));window.removeEventListener("message",d),clearTimeout(s)}};window.addEventListener("message",d),ko.log(`Connecting to broker ${e}`),r.setAttribute("src",e),r.setAttribute("name",o(t,"of-broker")),document.body.appendChild(r),ko.log("Iframe loaded, awaiting init message from iframe"),n&&(s=setTimeout((()=>{window.removeEventListener("message",d),document.body.removeChild(r),c(new Error("Worker did not initialize in time"))}),n))}))}catch(e){throw new Error(`Failed to initialise Fin Web Client. ${e.message}`,{cause:e})}})(n,i,r);Ro.log("Successfully established connection to shared worker");const d={entityType:"external connection",...i};a.start(),c.start();const h=((t,n,i)=>{const r=$o(n),o=new Ko(t),s=new Io(r,o,i);return s.connectSync(),window.Buffer=e.Buffer,new Wr(s)})(t,a,d);return s?.providerId&&(h.me.interop=h.Interop.connectSync(s.providerId),s?.currentContextGroup&&h.me.interop.joinContextGroup(s.currentContextGroup).catch((e=>{console.warn(`Error joining specified context group: ${s?.currentContextGroup}, continuing`,e)}))),{...h,me:{...h.me,identity:{uuid:h.me.uuid,name:h.me.name}}}}catch(e){throw new Error(`An error occured during web-interop connection: ${e.message}`)}},exports.decorators=Nn,exports.encodeOptions=o,exports.layout_constants=ai,exports.lazy=G; /***/ }), -/***/ "./node_modules/@openfin/core-web/out/main-b14f67c9.js": -/*!*************************************************************!*\ - !*** ./node_modules/@openfin/core-web/out/main-b14f67c9.js ***! - \*************************************************************/ +/***/ "../../node_modules/@openfin/core-web/out/main-b14f67c9.js": +/*!*****************************************************************!*\ + !*** ../../node_modules/@openfin/core-web/out/main-b14f67c9.js ***! + \*****************************************************************/ /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; -var t=__webpack_require__(/*! ./main-8cad4070.js */ "./node_modules/@openfin/core-web/out/main-8cad4070.js"),e=__webpack_require__(/*! uuid */ "../../node_modules/uuid/dist/esm-browser/index.js");__webpack_require__(/*! buffer/ */ "../../node_modules/buffer/index.js"),__webpack_require__(/*! events */ "../../node_modules/events/events.js"),__webpack_require__(/*! lodash/cloneDeep */ "../../node_modules/lodash/cloneDeep.js"),__webpack_require__(/*! lodash/isEqual */ "../../node_modules/lodash/isEqual.js");var i={},n={};Object.defineProperty(n,"__esModule",{value:!0}),n.mapValuesAsync=n.mapEntriesAsync=void 0;const o=(t,[e,i])=>({...t,[e]:i});async function s(t,e){return(await Promise.all(e.map((async([e,i])=>[e,await t(i,e)])))).reduce(o,{})}n.mapEntriesAsync=s,n.mapValuesAsync=async function(t,e){let i;return i=e instanceof Map?[...e.entries()]:Object.entries(e),s(t,i)};var r,a,l,h,d=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldSet||function(t,e,i,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(t,i):o?o.value=i:e.set(t,i),i},c=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldGet||function(t,e,i,n){if("a"===i&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?n:"a"===i?n.call(t):n?n.value:e.get(t)};Object.defineProperty(i,"__esModule",{value:!0});var m=i.DefaultLayoutManager=void 0;const u=n;class p{constructor(t){a.set(this,void 0),l.set(this,new Map),d(this,a,t,"f")}size(){return c(this,l,"f").size}async applyLayoutSnapshot({layouts:t}){if(Object.keys(t).length>1)throw new Error("[LayoutManager] Tried to call applyLayoutSnapshot with more than 1 layout. When implementing multiple layouts via overridden LayoutManager class, you must override and fully implement the applyLayoutSnapshot method without calling super.applyLayoutSnapshot().");const[[e,i]]=Object.entries(t);await p.createLayout(this,{layoutName:e,layout:i})}async showLayout({layoutName:t}){}async getLayoutSnapshot(){return{layouts:await(0,u.mapValuesAsync)((t=>t.getFrameSnapshot()),c(this,l,"f"))}}async removeLayout({layoutName:t}){}getLayoutIdentityForView(t){const e=[...c(this,l,"f").values()].find((e=>e.getCurrentViews().some((e=>e.name===t.name&&e.uuid===t.uuid))));return e?.identity??void 0}isLayoutVisible({layoutName:t}){return c(p,r,"m",h).call(p,this,t).isVisible()}resolveLayoutIdentity(t){if(t&&"layoutName"in t)return t;const e=[...c(this,l,"f").values()];if(1===e.length)return e[0].identity;const i=e.find((t=>t.isVisible()));return i?.identity??void 0}static async resolveLayout(t,e){const i=t.resolveLayoutIdentity(e);if(void 0===i||!("layoutName"in i))throw new Error("[layout-manager] resolveLayout: Could not resolve the layout identity. Make sure you include 'layoutName' in the identity object.");return c(p,r,"m",h).call(p,t,i.layoutName)}static async handleSharedView(t,e,i){await(0,u.mapValuesAsync)((async t=>{if(t.identity.layoutName!==e.layoutName){const e=t.getCurrentViews().find((t=>t.name===i.name));e&&await t.onViewDetached({viewIdentity:e,target:null}).catch(console.error)}}),c(t,l,"f"))}static async handleLastViewRemoved(t,e){await t.removeLayout(e),await c(t,a,"f").handleLastViewRemoved(t)}static async destroyLayout(t,{layoutName:e}){await c(p,r,"m",h).call(p,t,e).destroy(),c(t,l,"f").delete(e)}static async createLayout(t,e){const{layoutName:i}=e;if(c(t,l,"f").has(i))throw new Error(`Layout name ${i} already exists`);await c(t,a,"f").createLayout(e,t)}static registerLayout(t,e,i){c(t,l,"f").set(e,i)}static getAllLayouts(t){return[...c(t,l,"f").values()]}static setInitialSnapshot(t,e){c(t,a,"f").setInitialSnapshot(e)}static createClosedConstructor(...t){return class extends p{constructor(){super(...t)}}}}m=i.DefaultLayoutManager=p,r=p,a=new WeakMap,l=new WeakMap,h=function(t,e){const i=c(t,l,"f").get(e);if(!i)throw new Error(`[layout-manager] getLayoutByName: Could not locate layout with name '${e}'`);return i};var g={},f={},v={};Object.defineProperty(v,"__esModule",{value:!0}),v.ReversibleMap=void 0;v.ReversibleMap=class{constructor(){this.valueToKey=new Map,this.keyToValue=new Map,this.setUnique=(t,e)=>{if(this.hasKey(t)||this.hasValue(e))throw new Error("Key or value already in the map.");this.keyToValue.set(t,e),this.valueToKey.set(e,t)},this.getKey=t=>{const e=this.valueToKey.get(t);if(!e)throw new Error("Value not found in the map.");return e},this.deleteKey=t=>{const e=this.getValue(t);return this.keyToValue.delete(t),this.valueToKey.delete(e),e},this.deleteValue=t=>{const e=this.getKey(t);return this.keyToValue.delete(e),this.valueToKey.delete(t),e},this.hasKey=t=>this.keyToValue.has(t),this.hasValue=t=>this.valueToKey.has(t)}getValue(t){const e=this.keyToValue.get(t);if(!e)throw new Error("Key not found in the map.");return e}},Object.defineProperty(f,"__esModule",{value:!0});var _=f.LayoutContentCache=void 0;const y=t.lazy,C=v;class w{constructor(){this.contentItemCache=new C.ReversibleMap,this.contentItemCacheId=0,this.createCacheKey=()=>{const t=`entity-${this.contentItemCacheId.toString()}`;return this.contentItemCacheId+=1,t},this.hasKey=t=>this.contentItemCache.hasKey(t),this.getItemOrUndefined=t=>{try{return this.getContentItemOrThrow(t)}catch(t){return}},this.getContentItemOrThrow=(t,e)=>{if(!this.contentItemCache.hasKey(t))throw new Error("Layout component has been destroyed or detached from the current layout.");const i=this.contentItemCache.getValue(t);if(e&&!e.includes(i.type))throw new Error(`Layout item is not the expected type. Expected ${e.join(", ")}, got ${i.type}.`);return i},this.getOrCreateEntityId=t=>{if(this.contentItemCache.hasValue(t))return this.contentItemCache.getKey(t);t.onDestroyed((()=>{this.contentItemCache.deleteValue(t)}));const e=this.createCacheKey();return this.contentItemCache.setUnique(e,t),e}}static getSingleInstance(){return w.singleton.getValue()}}_=f.LayoutContentCache=w,w.singleton=new y.Lazy((()=>new w));var I={},b={};!function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.getAdjacentStacks=t.doShareEdge=t.getAdjacentItem=void 0;t.getAdjacentItem=(e,i)=>{const{parent:n}=e;if(e.isRoot()||!n)return;const o=["top","bottom"].includes(i)?"column":"row",s=["top","left"].includes(i)?-1:1;if(n.type===o){const t=n.contentItems.indexOf(e)+s;if(t>=0&&t{const n=t.getBounds(),o=e.getBounds();if(!n||!o)return!1;if(["top","bottom"].includes(i)){return!(n.righto.right)}return!(n.bottomo.bottom)};t.getAdjacentStacks=(e,i)=>{const n=["top","bottom"].includes(i)?"row":"column",o=s=>"stack"===s.type?(0,t.doShareEdge)(e,s,i)?[s]:[]:"root"===s.type||"ground"===s.type?[]:s.type===n?s.contentItems.map((t=>o(t))).flat():s.type!==n?["top","right"].includes(i)?o(s.contentItems[s.contentItems.length-1]):o(s.contentItems[0]):[],s=(0,t.getAdjacentItem)(e,i);return s?o(s):[]}}(b);var S=t.commonjsGlobal&&t.commonjsGlobal.__decorate||function(t,e,i,n){var o,s=arguments.length,r=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(s<3?o(r):s>3?o(e,i,r):o(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};Object.defineProperty(I,"__esModule",{value:!0}),I.LayoutEntitiesController=void 0;const E=t.decorators,x=b,L=i;class z{constructor(t,e,i){this.wire=t,this.layoutManager=e,this.layoutContentCache=i,this.analytics=t=>{this.wire.sendAction(`layout-controller-${t}`).catch((()=>{}))},this.getLayoutIdentityForViewOrThrow=async t=>{const e=this.layoutManager.getLayoutIdentityForView(t);if(!e)throw new Error(`View identity ${t.name} is not attached to any layouts.`);return e},this.getRoot=async t=>{this.analytics("get-root");const e=(await this.getLayout(t)).getRoot();return{type:e.type,entityId:this.layoutContentCache.getOrCreateEntityId(e)}},this.getStackByView=async t=>{this.analytics("get-stack-by-view");const e=await this.getLayoutIdentityForViewOrThrow(t),i=(await this.getLayout(e)).getStackByView(t);if("stack"===i?.type)return{entityId:this.layoutContentCache.getOrCreateEntityId(i),type:"stack"}},this.getStackViews=t=>{this.analytics("get-stack-views");return this.layoutContentCache.getContentItemOrThrow(t,["stack"]).contentItems.map((t=>({name:t.viewName,uuid:this.wire.me.uuid})))},this.isRoot=t=>{this.analytics("is-root");return this.layoutContentCache.getContentItemOrThrow(t).isRoot()},this.exists=t=>(this.analytics("exists"),this.layoutContentCache.hasKey(t)),this.addViewToStack=async(t,e,{index:i}={index:0})=>{this.analytics("add-view-to-stack");const n=this.layoutContentCache.getContentItemOrThrow(t);if(i&&i>n.contentItems.length+1)throw new Error(`Index '${i}' out of range, please exclude the index or specify a number between 0 and ${n.contentItems.length}`);const o={id:t,index:i},{identity:s}=await n.layout.platformCreateView(e,{location:o});return s},this.findViewInStack=(t,e)=>t.contentItems.find((t=>t.viewName===e.name)),this.removeViewFromStack=async(t,e)=>{this.analytics("remove-view-from-stack");const i=this.layoutContentCache.getContentItemOrThrow(t,["stack"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to remove a view ('${e.name}') which does not belong to the stack.`);await n.layout.platformCloseView(e)},this.createAdjacentStack=async(t,e,{position:i="right"}={})=>{if(this.analytics("create-adjacent-stack"),!Array.isArray(e)||0===e.length)throw new Error('The parameter "views" must be an array with at least 1 element.');if(!["top","bottom","left","right"].includes(i))throw new Error(`Invalid position '${i}' specified.`);const n=this.layoutContentCache.getContentItemOrThrow(t).createAdjacentStack({position:i}),o=this.layoutContentCache.getOrCreateEntityId(n);return await Promise.all(e.reverse().map((t=>this.addViewToStack(o,t)))),o},this.getAdjacentStacks=async({targetId:t,edge:e})=>{this.analytics("get-adjacent-stacks");const i=this.layoutContentCache.getContentItemOrThrow(t);return(0,x.getAdjacentStacks)(i,e).map((t=>({entityId:this.layoutContentCache.getOrCreateEntityId(t)})))},this.setStackActiveView=async(t,e)=>{this.analytics("set-stack-active-view");const i=this.layoutContentCache.getContentItemOrThrow(t,["stack"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to set a view ('${e.name}') as active when it does not belong to the stack.`);i.setActiveContentItem(n,!0)}}async getLayout(t){const e=await L.DefaultLayoutManager.resolveLayout(this.layoutManager,t);if(!e)throw new Error(`Could not resolve target layout identity ${JSON.stringify(t)}`);return e}getContent(t){this.analytics("get-content");return this.layoutContentCache.getContentItemOrThrow(t,["column","row"]).contentItems.map((t=>({type:t.type,entityId:this.layoutContentCache.getOrCreateEntityId(t)})))}getParent(t){this.analytics("get-parent");const e=this.layoutContentCache.getContentItemOrThrow(t);if(!e.isRoot())return e.parent?.contentItems.includes(e)?{type:e.parent.type,entityId:this.layoutContentCache.getOrCreateEntityId(e.parent)}:void 0}}S([(0,E.expose)()],z.prototype,"getLayoutIdentityForViewOrThrow",void 0),S([(0,E.expose)()],z.prototype,"getRoot",void 0),S([(0,E.expose)()],z.prototype,"getStackByView",void 0),S([(0,E.expose)()],z.prototype,"getStackViews",void 0),S([(0,E.expose)()],z.prototype,"getContent",null),S([(0,E.expose)()],z.prototype,"getParent",null),S([(0,E.expose)()],z.prototype,"isRoot",void 0),S([(0,E.expose)()],z.prototype,"exists",void 0),S([(0,E.expose)()],z.prototype,"addViewToStack",void 0),S([(0,E.expose)()],z.prototype,"removeViewFromStack",void 0),S([(0,E.expose)()],z.prototype,"createAdjacentStack",void 0),S([(0,E.expose)()],z.prototype,"getAdjacentStacks",void 0),S([(0,E.expose)()],z.prototype,"setStackActiveView",void 0),I.LayoutEntitiesController=z,Object.defineProperty(g,"__esModule",{value:!0});var M=g.initLayoutEndpoints=void 0;const P=t.apiExposer,T=t.layout_constants,A=f,k=I,D=i;M=g.initLayoutEndpoints=async function(t,e){const i=t.getFin(),n=await i.Platform.getCurrentSync().getClient(),o=new P.ChannelsExposer(n);await new P.ApiExposer(o).exposeInstance(new k.LayoutEntitiesController(t,e,A.LayoutContentCache.getSingleInstance()),{id:T.LAYOUT_CONTROLLER_ID}),await async function(t,e){const i=t=>async i=>{const n=await D.DefaultLayoutManager.resolveLayout(e,i.target);if(!n)throw new Error(`Could not resolve the layout target from payload ${JSON.stringify(i)}`);return t(n,i)},n=(e,n)=>{t.register(e,i(n))},o=(t,e)=>{n(t,e)};n("replace-view",((t,e)=>t.replaceView(e))),n("replace-layout",((t,{layout:e})=>t.replaceLayout(e))),n("add-view",((t,e)=>t.insertView(e))),o("layout-add-view",((t,{viewOptions:e,location:i,targetView:n})=>t.platformCreateView(e,{location:i,targetView:n}))),n("close-view",((t,e)=>t.cleanupView(e.viewIdentity))),o("layout-close-view",((t,e)=>t.platformCloseView(e.viewIdentity))),n("apply-preset-layout",((t,e)=>t.applyPreset(e))),n("get-layout-views",(t=>t.getCurrentViews())),n("get-frame-snapshot",(t=>t.getFrameSnapshot())),n("is-visible",(t=>t.isVisible())),n("destroy",(t=>t.destroy())),t.register("get-layout-snapshot",(()=>e.getLayoutSnapshot()))}(n,e)};var R={};Object.defineProperty(R,"__esModule",{value:!0});var U=R.BaseLayout=void 0;U=R.BaseLayout=class{};var O={};Object.defineProperty(O,"__esModule",{value:!0});var V=O.DOMEmitter=void 0;V=O.DOMEmitter=class{constructor(t){this.container=t}dispatchLocalEvent(t,e){const i={...e,type:t,tabSelector:`tab-${e.name}`,containerSelector:`container-${e.name}`,topic:"openfin-DOM-event"};this.container.dispatchEvent(new CustomEvent(t,{detail:i}))}};var B={};Object.defineProperty(B,"__esModule",{value:!0});var H=B.mapLayoutContentItemsImmutableSync=B.mapLayoutContentItemsImmutable=W=B.isVisible=void 0;var W=B.isVisible=t=>(0!==t.offsetWidth||0!==t.offsetHeight)&&"hidden"!==window.getComputedStyle(t).visibility&&t.offsetTop>=0&&t.offsetLeft>=0&&t.offsetTop<=window.innerHeight&&t.offsetLeft<=window.innerWidth;const F=t=>"type"in t&&"component"===t.type;B.mapLayoutContentItemsImmutable=async function t(e,i){return F(i)?e(i):{...i,content:await Promise.all(i.content?.map((i=>t(e,i))))}},H=B.mapLayoutContentItemsImmutableSync=function t(e,i){return F(i)?e(i):{...i,content:i.content?.map((i=>t(e,i)))}};class N extends Error{constructor(t,e){super(e),this.type=t}}class G extends N{constructor(t,e){super("Configuration",t),this.node=e}}class j extends N{constructor(t){super("PopoutBlocked",t)}}class $ extends N{constructor(t){super("API",t)}}class Z extends N{constructor(t){super("Bind",t)}}class q extends Error{constructor(t,e,i){super(`${t}: ${e}${void 0===i?"":": "+i}`)}}class X extends q{constructor(t,e){super("Assert",t,e)}}class Y extends q{constructor(t,e,i){super("UnreachableCase",t,`${e}${void 0===i?"":": "+i}`)}}class K extends q{constructor(t,e){super("UnexpectedNull",t,e)}}class J extends q{constructor(t,e){super("UnexpectedUndefined",t,e)}}var Q;!function(t){let e=!1;const i={PopoutCannotBeCreatedWithGroundItemConfig:{id:0,default:"Popout cannot be created with ground ItemConfig"},PleaseRegisterAConstructorFunction:{id:1,default:"Please register a constructor function"},ComponentTypeNotRegisteredAndBindComponentEventHandlerNotAssigned:{id:2,default:"Component type not registered and BindComponentEvent handler not assigned"},ComponentIsAlreadyRegistered:{id:3,default:"Component is already registered"},ComponentIsNotVirtuable:{id:4,default:"Component is not virtuable. Requires rootHtmlElement field/getter"},VirtualComponentDoesNotHaveRootHtmlElement:{id:5,default:'Virtual component does not have getter "rootHtmlElement"'},ItemConfigIsNotTypeComponent:{id:6,default:"ItemConfig is not of type component"},InvalidNumberPartInSizeString:{id:7,default:"Invalid number part in size string"},UnknownUnitInSizeString:{id:8,default:"Unknown unit in size string"},UnsupportedUnitInSizeString:{id:9,default:"Unsupported unit in size string"}};t.idCount=Object.keys(i).length;const n=Object.values(i);t.checkInitialise=function(){if(!e)for(let e=0;e="0"&&t<="9"}function Tt(t,e){const i=zt(e);t.style.width=i}function At(t,e){const i=zt(e);t.style.height=i}function kt(t){return{width:t.offsetWidth,height:t.offsetHeight}}function Dt(t,e){t.style.display=e?"":"none"}function Rt(t,e){if(void 0!==e)for(const i in e)if(e.hasOwnProperty(i)){const n=e[i],o=t[i];t[i]=Ut(o,n)}return t}function Ut(t,e){if("object"!=typeof e)return e;if(Array.isArray(e)){const t=e.length,i=new Array(t);for(let n=0;n36)throw new Error("Too many keys in config minifier map")},t.translateObject=n}(dt||(dt={})),function(t){t.defaults={type:at.ground,content:[],size:1,sizeUnit:ht.Fractional,minSize:void 0,minSizeUnit:ht.Pixel,id:"",isClosable:!0},t.createCopy=function(t,e){switch(t.type){case at.ground:case at.row:case at.column:return gt.createCopy(t,e);case at.stack:return ut.createCopy(t,e);case at.component:return pt.createCopy(t);default:throw new Y("CICC91354",t.type,"Invalid Config Item type specified")}},t.createDefault=function(t){switch(t){case at.ground:throw new X("CICCDR91562");case at.row:case at.column:return gt.createDefault(t);case at.stack:return ut.createDefault();case at.component:return pt.createDefault();default:throw new Y("CICCDD91563",t,"Invalid Config Item type specified")}},t.isComponentItem=function(t){return t.type===at.component},t.isStackItem=function(t){return t.type===at.stack},t.isGroundItem=function(t){return t.type===at.ground}}(ct||(ct={})),function(t){t.defaultMaximised=!1,function(t){t.createCopy=function(t,e){return void 0===t?void 0:{show:null!=e?e:t.show,popout:t.popout,close:t.close,maximise:t.maximise,minimise:t.minimise,tabDropdown:t.tabDropdown}}}(t.Header||(t.Header={}))}(mt||(mt={})),function(t){function e(t){const e=t.length,i=new Array(e);for(let n=0;n"__glMaximised"===t));t>0&&(o=!0,n=n.splice(t,1)),e=n.length>0?n[0]:ct.defaults.id}else e=n;return i=void 0!==t.maximised?t.maximised:o,{id:e,maximised:i}}}(wt||(wt={})),function(t){function e(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0;return{resolved:!0,root:Et.resolve(i),openPopouts:t.resolveOpenPopouts(e.openPopouts),dimensions:t.Dimensions.resolve(e.dimensions),settings:t.Settings.resolve(e.settings),header:t.Header.resolve(e.header,e.settings,e.labels)}}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:Lt.fromResolvedArray(e.openPopouts),settings:_t.Settings.createCopy(e.settings),dimensions:t.Dimensions.fromResolved(e.dimensions),header:_t.Header.createCopy(e.header)}},t.isResolved=function(t){const e=t;return void 0!==e.resolved&&!0===e.resolved},t.resolveOpenPopouts=function(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0,{root:Et.resolve(o),openPopouts:xt.resolveOpenPopouts(e.openPopouts),dimensions:xt.Dimensions.resolve(e.dimensions),settings:xt.Settings.resolve(e.settings),header:xt.Header.resolve(e.header,e.settings,e.labels),parentId:null!==(i=e.parentId)&&void 0!==i?i:null,indexInParent:null!==(n=e.indexInParent)&&void 0!==n?n:null,window:t.Window.resolve(e.window,e.dimensions),resolved:!0}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:i(e.openPopouts),dimensions:xt.Dimensions.fromResolved(e.dimensions),settings:_t.Settings.createCopy(e.settings),header:_t.Header.createCopy(e.header),parentId:e.parentId,indexInParent:e.indexInParent,window:t.Window.fromResolved(e.window)}},t.fromResolvedArray=i}(Lt||(Lt={}));class Wt{constructor(){this._allEventSubscriptions=[],this._subscriptionsMap=new Map,this.unbind=this.removeEventListener,this.trigger=this.emit}tryBubbleEvent(t,e){}emit(t,...e){let i=this._subscriptionsMap.get(t);if(void 0!==i){i=i.slice();for(let t=0;t0){const n=e.slice();n.unshift(t);const o=this._allEventSubscriptions.slice();for(let t=0;t0?n.contentItems[0]:n,e=0);const o=this._layoutManager.createAndInitContentItem(i,t);t.addChild(o,e),this._layoutManager.layoutConfig.settings.popInOnClose?this._onClose():this.close()}createWindow(){const t=this.createUrl(),e=Math.floor(1e6*Math.random()).toString(36),i=this.serializeWindowFeatures({width:this._initialWindowSize.width,height:this._initialWindowSize.height,innerWidth:this._initialWindowSize.width,innerHeight:this._initialWindowSize.height,menubar:"no",toolbar:"no",location:"no",personalbar:"no",resizable:"yes",scrollbars:"no",status:"no"});if(this._popoutWindow=globalThis.open(t,e,i),this._popoutWindow)this._popoutWindow.addEventListener("load",(()=>this.positionWindow()),{passive:!0}),this._popoutWindow.addEventListener("beforeunload",(()=>{this._layoutManager.layoutConfig.settings.popInOnClose?this.popIn():this._onClose()}),{passive:!0}),this._checkReadyInterval=setInterval((()=>this.checkReady()),10);else if(!0===this._layoutManager.layoutConfig.settings.blockedPopoutsThrowError){throw new j("Popout blocked")}}checkReady(){if(null===this._popoutWindow)throw new K("BPCR01844");this._popoutWindow.__glInstance&&this._popoutWindow.__glInstance.isInitialised&&(this.onInitialised(),void 0!==this._checkReadyInterval&&(clearInterval(this._checkReadyInterval),this._checkReadyInterval=void 0))}serializeWindowFeatures(t){const e=[];for(const i in t)e.push(i+"="+t[i].toString());return e.join(",")}createUrl(){const t="gl-window-config-"+Ot(),e=_t.minifyConfig(this._config);try{localStorage.setItem(t,JSON.stringify(e))}catch(t){throw new Error("Error while writing to localStorage "+function(t){return t instanceof Error?t.message:"string"==typeof t?t:"Unknown Error"}(t))}const i=new URL(location.href);return i.searchParams.set("gl-window",t),i.toString()}positionWindow(){if(null===this._popoutWindow)throw new Error("BrowserPopout.positionWindow: null popoutWindow");this._popoutWindow.moveTo(this._initialWindowSize.left,this._initialWindowSize.top),this._popoutWindow.focus()}onInitialised(){this._isInitialised=!0,this.getGlInstance().on("popIn",(()=>this.popIn())),this.emit("initialised")}_onClose(){setTimeout((()=>this.emit("closed")),50)}}class Gt extends Wt{constructor(t,e,i,n){super(),this.layoutManager=t,this._parent=i,this._element=n,this._popInParentIds=[],this._type=e.type,this._id=e.id,this._isInitialised=!1,this.isGround=!1,this.isRow=!1,this.isColumn=!1,this.isStack=!1,this.isComponent=!1,this.size=e.size,this.sizeUnit=e.sizeUnit,this.minSize=e.minSize,this.minSizeUnit=e.minSizeUnit,this._isClosable=e.isClosable,this._pendingEventPropagations={},this._throttledEvents=["stateChanged"],this._contentItems=this.createContentItems(e.content)}get type(){return this._type}get id(){return this._id}set id(t){this._id=t}get popInParentIds(){return this._popInParentIds}get parent(){return this._parent}get contentItems(){return this._contentItems}get isClosable(){return this._isClosable}get element(){return this._element}get isInitialised(){return this._isInitialised}static isStack(t){return t.isStack}static isComponentItem(t){return t.isComponent}static isComponentParentableItem(t){return t.isStack||t.isGround}removeChild(t,e=!1){const i=this._contentItems.indexOf(t);if(-1===i)throw new Error("Can't remove child item. Unknown content item");if(e||this._contentItems[i].destroy(),this._contentItems.splice(i,1),this._contentItems.length>0)this.updateSize(!1);else if(!this.isGround&&!0===this._isClosable){if(null===this._parent)throw new K("CIUC00874");this._parent.removeChild(this)}}addChild(t,e,i){return null!=e||(e=this._contentItems.length),this._contentItems.splice(e,0,t),t.setParent(this),!0===this._isInitialised&&!1===t._isInitialised&&t.init(),e}replaceChild(t,e,i=!1){const n=this._contentItems.indexOf(t),o=t._element.parentNode;if(-1===n)throw new X("CIRCI23232","Can't replace child. oldChild is not child of this");if(null===o)throw new K("CIRCP23232");if(o.replaceChild(e._element,t._element),!0===i&&(t._parent=null,t.destroy()),this._contentItems[n]=e,e.setParent(this),e.size=t.size,e.sizeUnit=t.sizeUnit,e.minSize=t.minSize,e.minSizeUnit=t.minSizeUnit,null===e._parent)throw new K("CIRCNC45699");!0===e._parent._isInitialised&&!1===e._isInitialised&&e.init(),this.updateSize(!1)}remove(){if(null===this._parent)throw new K("CIR11110");this._parent.removeChild(this)}popout(){const t=Ot(),e=this.layoutManager.createPopoutFromContentItem(this,void 0,t,void 0);return this.emitBaseBubblingEvent("stateChanged"),e}calculateConfigContent(){const t=this._contentItems,e=t.length,i=new Array(e);for(let n=0;nthis.propagateEventToLayoutManager(t,e))))}propagateEventToLayoutManager(t,e){this._pendingEventPropagations[t]=!1,this.layoutManager.emitUnknown(t,e)}}class jt extends Gt{constructor(t,e,i){super(t,e,i,document.createElement("div")),this._parentItem=i,this._focused=!1,this.isComponent=!0,this._reorderEnabled=e.reorderEnabled,this.applyUpdatableConfig(e),this._initialWantMaximise=e.maximised;const n=document.createElement("div");n.classList.add("lm_content"),this.element.appendChild(n),this._container=new Ft(e,this,t,n,(t=>this.handleUpdateItemConfigEvent(t)),(()=>this.show()),(()=>this.hide()),(t=>this.focus(t)),(t=>this.blur(t)))}get componentName(){return this._container.componentType}get componentType(){return this._container.componentType}get reorderEnabled(){return this._reorderEnabled}get initialWantMaximise(){return this._initialWantMaximise}get component(){return this._container.component}get container(){return this._container}get parentItem(){return this._parentItem}get headerConfig(){return this._headerConfig}get title(){return this._title}get tab(){return this._tab}get focused(){return this._focused}destroy(){this._container.destroy(),super.destroy()}applyUpdatableConfig(t){this.setTitle(t.title),this._headerConfig=t.header}toConfig(){const t=this._container.stateRequestEvent,e=void 0===t?this._container.state:t();return{type:at.component,content:[],size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,maximised:!1,isClosable:this.isClosable,reorderEnabled:this._reorderEnabled,title:this._title,header:mt.Header.createCopy(this._headerConfig),componentType:pt.copyComponentType(this.componentType),componentState:e}}close(){if(null===this.parent)throw new K("CIC68883");this.parent.removeChild(this,!1)}enterDragMode(t,e){Tt(this.element,t),At(this.element,e),this._container.enterDragMode(t,e)}exitDragMode(){this._container.exitDragMode()}enterStackMaximised(){this._container.enterStackMaximised()}exitStackMaximised(){this._container.exitStackMaximised()}drag(){this._container.drag()}updateSize(t){this.updateNodeSize(t)}init(){this.updateNodeSize(!1),super.init(),this._container.emit("open"),this.initContentItems()}setTitle(t){this._title=t,this.emit("titleChanged",t),this.emit("stateChanged")}setTab(t){this._tab=t,this.emit("tab",t),this._container.setTab(t)}hide(){super.hide(),this._container.setVisibility(!1)}show(){super.show(),this._container.setVisibility(!0)}focus(t=!1){this.parentItem.setActiveComponentItem(this,!0,t)}setFocused(t){this._focused=!0,this.tab.setFocused(),t||this.emitBaseBubblingEvent("focus")}blur(t=!1){this._focused&&this.layoutManager.setFocusedComponentItem(void 0,t)}setBlurred(t){this._focused=!1,this.tab.setBlurred(),t||this.emitBaseBubblingEvent("blur")}setParent(t){this._parentItem=t,super.setParent(t)}handleUpdateItemConfigEvent(t){this.applyUpdatableConfig(t)}updateNodeSize(t){if("none"!==this.element.style.display){const{width:e,height:i}=kt(this.element);this._container.setSizeToNodeSize(e,i,t)}}}class $t extends Gt{constructor(){super(...arguments),this._focused=!1}get focused(){return this._focused}setFocusedValue(t){this._focused=t}}class Zt extends Wt{constructor(t,e){super(),this._eElement=t,this._pointerTracking=!1,this._pointerDownEventListener=t=>this.onPointerDown(t),this._pointerMoveEventListener=t=>this.onPointerMove(t),this._pointerUpEventListener=t=>this.onPointerUp(t),this._timeout=void 0,this._allowableTargets=[t,...e],this._oDocument=document,this._eBody=document.body,this._nDelay=1800,this._nDistance=10,this._nX=0,this._nY=0,this._nOriginalX=0,this._nOriginalY=0,this._dragging=!1,this._eElement.addEventListener("pointerdown",this._pointerDownEventListener,{passive:!0})}destroy(){this.checkRemovePointerTrackingEventListeners(),this._eElement.removeEventListener("pointerdown",this._pointerDownEventListener)}cancelDrag(){this.processDragStop(void 0)}onPointerDown(t){if(this._allowableTargets.includes(t.target)&&t.isPrimary){const e=this.getPointerCoordinates(t);this.processPointerDown(e)}}processPointerDown(t){this._nOriginalX=t.x,this._nOriginalY=t.y,this._oDocument.addEventListener("pointermove",this._pointerMoveEventListener),this._oDocument.addEventListener("pointerup",this._pointerUpEventListener,{passive:!0}),this._pointerTracking=!0,this._timeout=setTimeout((()=>{try{this.startDrag()}catch(t){throw console.error(t),t}}),this._nDelay)}onPointerMove(t){this._pointerTracking&&(this.processDragMove(t),t.preventDefault())}processDragMove(t){this._nX=t.pageX-this._nOriginalX,this._nY=t.pageY-this._nOriginalY,!1===this._dragging&&(Math.abs(this._nX)>this._nDistance||Math.abs(this._nY)>this._nDistance)&&this.startDrag(),this._dragging&&this.emit("drag",this._nX,this._nY,t)}onPointerUp(t){this.processDragStop(t)}processDragStop(t){var e;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this.checkRemovePointerTrackingEventListeners(),!0===this._dragging&&(this._eBody.classList.remove("lm_dragging"),this._eElement.classList.remove("lm_dragging"),null===(e=this._oDocument.querySelector("iframe"))||void 0===e||e.style.setProperty("pointer-events",""),this._dragging=!1,this.emit("dragStop",t))}checkRemovePointerTrackingEventListeners(){this._pointerTracking&&(this._oDocument.removeEventListener("pointermove",this._pointerMoveEventListener),this._oDocument.removeEventListener("pointerup",this._pointerUpEventListener),this._pointerTracking=!1)}startDrag(){var t;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this._dragging=!0,this._eBody.classList.add("lm_dragging"),this._eElement.classList.add("lm_dragging"),null===(t=this._oDocument.querySelector("iframe"))||void 0===t||t.style.setProperty("pointer-events","none"),this.emit("dragStart",this._nOriginalX,this._nOriginalY)}getPointerCoordinates(t){return{x:t.pageX,y:t.pageY}}}class qt{constructor(t,e,i){this._isVertical=t,this._size=e,this._grabSize=i0){const i=this.createSplitter(Math.max(0,e-1)).element;e>0?(this.contentItems[e-1].element.insertAdjacentElement("afterend",i),i.insertAdjacentElement("afterend",t.element)):(this.contentItems[0].element.insertAdjacentElement("beforebegin",i),i.insertAdjacentElement("beforebegin",t.element))}else this._childElementContainer.appendChild(t.element);super.addChild(t,e);const n=1/this.contentItems.length*100;if(!0===i)return this.emitBaseBubblingEvent("stateChanged"),e;for(let e=0;e0&&(this.calculateRelativeSizes(),this.setAbsoluteSizes()),this.emitBaseBubblingEvent("stateChanged"),this.emit("resize")}setAbsoluteSizes(){const t=this.calculateAbsoluteSizes();for(let e=0;e0&&t.itemSizes[e]++,this._isColumn?(Tt(this.contentItems[e].element,t.crossAxisSize),At(this.contentItems[e].element,t.itemSizes[e])):(Tt(this.contentItems[e].element,t.itemSizes[e]),At(this.contentItems[e].element,t.crossAxisSize))}calculateAbsoluteSizes(){const t=(this.contentItems.length-1)*this._splitterSize,{width:e,height:i}=kt(this.element);let n,o;this._isColumn?(n=i-t,o=e):(n=e-t,o=i);let s=0;const r=[];for(let t=0;t0){const n=100-t;for(let t=0;t100&&e.length>0){for(let t=0;te)return;{const r=i/e;let a=i;for(let e=0;ethis.onSplitterDrag(e,t,i))),e.on("dragStop",(()=>this.onSplitterDragStop(e))),e.on("dragStart",(()=>this.onSplitterDragStart(e))),this._splitter.splice(t,0,e),e}getSplitItems(t){const e=this._splitter.indexOf(t);return{before:this.contentItems[e],after:this.contentItems[e+1]}}calculateContentItemMinSize(t){const e=t.minSize;if(void 0!==e){if(t.minSizeUnit===ht.Pixel)return e;throw new X("ROCGMD98831",JSON.stringify(t))}{const t=this.layoutManager.layoutConfig.dimensions;return this._isColumn?t.defaultMinItemHeight:t.defaultMinItemWidth}}calculateContentItemsTotalMinSize(t){let e=0;for(const i of t)e+=this.calculateContentItemMinSize(i);return e}onSplitterDragStart(t){const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=this.calculateContentItemsTotalMinSize(e.before.contentItems),s=this.calculateContentItemsTotalMinSize(e.after.contentItems);this._splitterPosition=0,this._splitterMinPosition=-1*(i-o),this._splitterMaxPosition=n-s}onSplitterDrag(t,e,i){let n=this._isColumn?i:e;if(null===this._splitterMinPosition||null===this._splitterMaxPosition)throw new K("ROCOSD59226");n=Math.max(n,this._splitterMinPosition),n=Math.min(n,this._splitterMaxPosition),this._splitterPosition=n;const o=zt(n);this._isColumn?t.element.style.top=o:t.element.style.left=o}onSplitterDragStop(t){if(null===this._splitterPosition)throw new K("ROCOSDS66932");{const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=(this._splitterPosition+i)/(i+n),s=e.before.size+e.after.size;e.before.size=o*s,e.after.size=(1-o)*s,t.element.style.top=zt(0),t.element.style.left=zt(0),globalThis.requestAnimationFrame((()=>this.updateSize(!1)))}}}!function(t){t.getElementDimensionSize=function(t,e){return"width"===e?function(t){return t.offsetWidth}(t):function(t){return t.offsetHeight}(t)},t.setElementDimensionSize=function(t,e,i){return"width"===e?Tt(t,i):At(t,i)},t.createElement=function(t,e){const i=t.createElement("div");return i.classList.add("lm_item"),e?i.classList.add("lm_column"):i.classList.add("lm_row"),i}}(Xt||(Xt={}));class Yt extends $t{constructor(t,e,i){super(t,vt.create(e),null,Yt.createElement(document)),this.isGround=!0,this._childElementContainer=this.element,this._containerElement=i;let n=null;for(;;){const t=n?n.previousSibling:this._containerElement.lastChild;if(!(t instanceof Element&&t.classList.contains("lm_content")))break;n=t}this._containerElement.insertBefore(this.element,n)}init(){if(!0!==this.isInitialised){this.updateNodeSize();for(let t=0;t0?this.contentItems[0]:this,n.isComponent)throw new Error("Cannot add item as child to ComponentItem");{const t=this.layoutManager.createAndInitContentItem(i,n);return e=n.addChild(t,e),n===this?-1:e}}loadComponentAsRoot(t){this.clearRoot();const e=Ct.resolve(t,!1);if(e.maximised)throw new Error("Root Component cannot be maximised");{const t=new jt(this.layoutManager,e,this);t.init(),this.addChild(t,0)}}addChild(t,e){if(this.contentItems.length>0)throw new Error("Ground node can only have a single child");return this._childElementContainer.appendChild(t.element),e=super.addChild(t,e),this.updateSize(!1),this.emitBaseBubblingEvent("stateChanged"),e}calculateConfigContent(){const t=this.contentItems,e=t.length,i=new Array(e);for(let n=0;n0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e)),this.updateContentItemsSize(!1))}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}createSideAreas(){const t=Yt.Area.oppositeSides,e=new Array(Object.keys(t).length);let i=0;for(const n in t){const o=n,s=this.getElementArea();if(null===s)throw new K("RCSA77553");s.side=o,"2"===t[o][1]?s[o]=s[t[o]]-50:s[o]=s[t[o]]+50,s.surface=(s.x2-s.x1)*(s.y2-s.y1),e[i++]=s}return e}highlightDropZone(t,e,i){this.layoutManager.tabDropPlaceholder.remove(),super.highlightDropZone(t,e,i)}onDrop(t,e){if(t.isComponent){const e=ut.createDefault(),i=t;e.header=mt.Header.createCopy(i.headerConfig);const n=this.layoutManager.createAndInitContentItem(e,this);n.addChild(t),t=n}if(0===this.contentItems.length)this.addChild(t);else{if(t.type===at.row||t.type===at.column){const e=ut.createDefault(),i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}const i="x"==e.side[0]?at.row:at.column,n="2"==e.side[1],o=this.contentItems[0];if(o instanceof Xt&&o.type===i){const e=o.contentItems[n?0:o.contentItems.length-1];o.addChild(t,n?0:void 0,!0),e.size*=.5,t.size=e.size,t.sizeUnit=ht.Percent,o.updateSize(!1)}else{const e=ct.createDefault(i),s=this.layoutManager.createContentItem(e,this);this.replaceChild(o,s),s.addChild(t,n?0:void 0,!0),s.addChild(o,n?void 0:0,!0),o.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}}dock(){throw new X("GID87731")}validateDocking(){throw new X("GIVD87732")}getAllContentItems(){const t=[this];return this.deepGetAllContentItems(this.contentItems,t),t}getConfigMaximisedItems(){const t=[];return this.deepFilterContentItems(this.contentItems,t,(t=>!(!Gt.isStack(t)||!t.initialWantMaximise)||!(!Gt.isComponentItem(t)||!t.initialWantMaximise))),t}getItemsByPopInParentId(t){const e=[];return this.deepFilterContentItems(this.contentItems,e,(e=>e.popInParentIds.includes(t))),e}toConfig(){throw new Error("Cannot generate GroundItem config")}setActiveComponentItem(t,e,i){}updateNodeSize(){const{width:t,height:e}=kt(this._containerElement);Tt(this.element,t),At(this.element,e),this.contentItems.length>0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e))}deepGetAllContentItems(t,e){for(let i=0;ithis.onClick(t),this._touchStartEventListener=t=>this.onTouchStart(t),this._element=document.createElement("div"),this._element.classList.add(i),this._element.title=e,this._header.on("destroy",(()=>this.destroy())),this._element.addEventListener("click",this._clickEventListener,{passive:!0}),this._element.addEventListener("touchstart",this._touchStartEventListener,{passive:!0}),this._header.controlsContainerElement.appendChild(this._element)}get element(){return this._element}destroy(){var t;this._element.removeEventListener("click",this._clickEventListener),this._element.removeEventListener("touchstart",this._touchStartEventListener),null===(t=this._element.parentNode)||void 0===t||t.removeChild(this._element)}onClick(t){this._pushEvent(t)}onTouchStart(t){this._pushEvent(t)}}class Jt{constructor(t,e,i,n,o){var s;this._layoutManager=t,this._componentItem=e,this._closeEvent=i,this._focusEvent=n,this._dragStartEvent=o,this._isActive=!1,this._tabClickListener=t=>this.onTabClickDown(t),this._tabTouchStartListener=t=>this.onTabTouchStart(t),this._closeClickListener=()=>this.onCloseClick(),this._closeTouchStartListener=()=>this.onCloseTouchStart(),this._dragStartListener=(t,e)=>this.onDragStart(t,e),this._contentItemDestroyListener=()=>this.onContentItemDestroy(),this._tabTitleChangedListener=t=>this.setTitle(t),this._element=document.createElement("div"),this._element.classList.add("lm_tab"),this._titleElement=document.createElement("span"),this._titleElement.classList.add("lm_title"),this._closeElement=document.createElement("div"),this._closeElement.classList.add("lm_close_tab"),this._element.appendChild(this._titleElement),this._element.appendChild(this._closeElement),e.isClosable?this._closeElement.style.display="":this._closeElement.style.display="none",this.setTitle(e.title),this._componentItem.on("titleChanged",this._tabTitleChangedListener);(null!==(s=e.reorderEnabled)&&void 0!==s?s:this._layoutManager.layoutConfig.settings.reorderEnabled)&&this.enableReorder(),this._element.addEventListener("click",this._tabClickListener,{passive:!0}),this._element.addEventListener("touchstart",this._tabTouchStartListener,{passive:!0}),this._componentItem.isClosable?(this._closeElement.addEventListener("click",this._closeClickListener,{passive:!0}),this._closeElement.addEventListener("touchstart",this._closeTouchStartListener,{passive:!0})):(this._closeElement.remove(),this._closeElement=void 0),this._componentItem.setTab(this),this._layoutManager.emit("tabCreated",this)}get isActive(){return this._isActive}get componentItem(){return this._componentItem}get contentItem(){return this._componentItem}get element(){return this._element}get titleElement(){return this._titleElement}get closeElement(){return this._closeElement}get reorderEnabled(){return void 0!==this._dragListener}set reorderEnabled(t){t!==this.reorderEnabled&&(t?this.enableReorder():this.disableReorder())}setTitle(t){this._titleElement.innerText=t,this._element.title=t}setActive(t){t!==this._isActive&&(this._isActive=t,t?this._element.classList.add("lm_active"):this._element.classList.remove("lm_active"))}destroy(){var t,e;this._closeEvent=void 0,this._focusEvent=void 0,this._dragStartEvent=void 0,this._element.removeEventListener("click",this._tabClickListener),this._element.removeEventListener("touchstart",this._tabTouchStartListener),null===(t=this._closeElement)||void 0===t||t.removeEventListener("click",this._closeClickListener),null===(e=this._closeElement)||void 0===e||e.removeEventListener("touchstart",this._closeTouchStartListener),this._componentItem.off("titleChanged",this._tabTitleChangedListener),this.reorderEnabled&&this.disableReorder(),this._element.remove()}setBlurred(){this._element.classList.remove("lm_focused"),this._titleElement.classList.remove("lm_focused")}setFocused(){this._element.classList.add("lm_focused"),this._titleElement.classList.add("lm_focused")}onDragStart(t,e){if(void 0===this._dragListener)throw new J("TODSDLU10093");if(void 0===this._dragStartEvent)throw new J("TODS23309");this._dragStartEvent(t,e,this._dragListener,this.componentItem)}onContentItemDestroy(){void 0!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=void 0)}onTabClickDown(t){const e=t.target;e!==this._element&&e!==this._titleElement||(0===t.button?this.notifyFocus():1===t.button&&this._componentItem.isClosable&&this.notifyClose())}onTabTouchStart(t){t.target===this._element&&this.notifyFocus()}onCloseClick(){this.notifyClose()}onCloseTouchStart(){this.notifyClose()}notifyClose(){if(void 0===this._closeEvent)throw new J("TNC15007");this._closeEvent(this._componentItem)}notifyFocus(){if(void 0===this._focusEvent)throw new J("TNA15007");this._focusEvent(this._componentItem)}enableReorder(){this._dragListener=new Zt(this._element,[this._titleElement]),this._dragListener.on("dragStart",this._dragStartListener),this._componentItem.on("destroy",this._contentItemDestroyListener)}disableReorder(){if(void 0===this._dragListener)throw new J("TDR87745");this._componentItem.off("destroy",this._contentItemDestroyListener),this._dragListener.off("dragStart",this._dragStartListener),this._dragListener=void 0}}class Qt{constructor(t,e,i,n,o){this._layoutManager=t,this._componentRemoveEvent=e,this._componentFocusEvent=i,this._componentDragStartEvent=n,this._dropdownActiveChangedEvent=o,this._tabs=[],this._lastVisibleTabIndex=-1,this._dropdownActive=!1,this._element=document.createElement("section"),this._element.classList.add("lm_tabs"),this._dropdownElement=document.createElement("section"),this._dropdownElement.classList.add("lm_tabdropdown_list"),this._dropdownElement.style.display="none"}get tabs(){return this._tabs}get tabCount(){return this._tabs.length}get lastVisibleTabIndex(){return this._lastVisibleTabIndex}get element(){return this._element}get dropdownElement(){return this._dropdownElement}get dropdownActive(){return this._dropdownActive}destroy(){for(let t=0;tthis.handleTabCloseEvent(t)),(t=>this.handleTabFocusEvent(t)),((t,e,i,n)=>this.handleTabDragStartEvent(t,e,i,n)));void 0===e&&(e=this._tabs.length),this._tabs.splice(e,0,i),ethis._lastVisibleTabIndex){const t=this._tabs[e];for(let t=e;t>0;t--)this._tabs[t]=this._tabs[t-1];this._tabs[0]=t}}updateTabSizes(t,e){let i=!1;this.tryUpdateTabSizes(i,t,e)||(i=!0,this.tryUpdateTabSizes(i,t,e)),i!==this._dropdownActive&&(this._dropdownActive=i,this._dropdownActiveChangedEvent())}tryUpdateTabSizes(t,e,i){if(this._tabs.length>0){if(void 0===i)throw new Error("non-empty tabs must have active component item");let n=0,o=!1;const s=this._layoutManager.layoutConfig.settings.tabOverlapAllowance,r=this._tabs.indexOf(i.tab),a=this._tabs[r];this._lastVisibleTabIndex=-1;for(let i=0;ie){if(o)i===r&&(l.style.zIndex="auto",l.style.marginLeft="",l.parentElement!==this._element&&this._element.appendChild(l));else{let t;if(t=r>0&&r<=i?(d-e)/(i-1):(d-e)/i,tthis.onClick(t),this._touchStartListener=t=>this.onTouchStart(t),this._rowColumnClosable=!0,this._closeButton=null,this._popoutButton=null,this._tabsContainer=new Qt(this._layoutManager,(t=>this.handleTabInitiatedComponentRemoveEvent(t)),(t=>this.handleTabInitiatedComponentFocusEvent(t)),((t,e,i,n)=>this.handleTabInitiatedDragStartEvent(t,e,i,n)),(()=>this.processTabDropdownActiveChanged())),this._show=i.show,this._popoutEnabled=i.popoutEnabled,this._popoutLabel=i.popoutLabel,this._maximiseEnabled=i.maximiseEnabled,this._maximiseLabel=i.maximiseLabel,this._minimiseEnabled=i.minimiseEnabled,this._minimiseLabel=i.minimiseLabel,this._closeEnabled=i.closeEnabled,this._closeLabel=i.closeLabel,this._tabDropdownEnabled=i.tabDropdownEnabled,this._tabDropdownLabel=i.tabDropdownLabel,this.setSide(i.side),this._canRemoveComponent=this._configClosable,this._element=document.createElement("section"),this._element.classList.add("lm_header"),this._controlsContainerElement=document.createElement("section"),this._controlsContainerElement.classList.add("lm_controls"),this._element.appendChild(this._tabsContainer.element),this._element.appendChild(this._controlsContainerElement),this._element.appendChild(this._tabsContainer.dropdownElement),this._element.addEventListener("click",this._clickListener,{passive:!0}),this._element.addEventListener("touchstart",this._touchStartListener,{passive:!0}),this._documentMouseUpListener=()=>this._tabsContainer.hideAdditionalTabsDropdown(),globalThis.document.addEventListener("mouseup",this._documentMouseUpListener,{passive:!0}),this._tabControlOffset=this._layoutManager.layoutConfig.settings.tabControlOffset,this._tabDropdownEnabled&&(this._tabDropdownButton=new Kt(this,this._tabDropdownLabel,"lm_tabdropdown",(()=>this._tabsContainer.showAdditionalTabsDropdown()))),this._popoutEnabled&&(this._popoutButton=new Kt(this,this._popoutLabel,"lm_popout",(()=>this.handleButtonPopoutEvent()))),this._maximiseEnabled&&(this._maximiseButton=new Kt(this,this._maximiseLabel,"lm_maximise",(t=>this.handleButtonMaximiseToggleEvent(t)))),this._configClosable&&(this._closeButton=new Kt(this,this._closeLabel,"lm_close",(()=>s()))),this.processTabDropdownActiveChanged()}get show(){return this._show}get side(){return this._side}get leftRightSided(){return this._leftRightSided}get layoutManager(){return this._layoutManager}get parent(){return this._parent}get tabs(){return this._tabsContainer.tabs}get lastVisibleTabIndex(){return this._tabsContainer.lastVisibleTabIndex}get element(){return this._element}get tabsContainerElement(){return this._tabsContainer.element}get controlsContainerElement(){return this._controlsContainerElement}destroy(){this.emit("destroy"),this._popoutEvent=void 0,this._maximiseToggleEvent=void 0,this._clickEvent=void 0,this._touchStartEvent=void 0,this._componentRemoveEvent=void 0,this._componentFocusEvent=void 0,this._componentDragStartEvent=void 0,this._tabsContainer.destroy(),globalThis.document.removeEventListener("mouseup",this._documentMouseUpListener),this._element.remove()}createTab(t,e){this._tabsContainer.createTab(t,e)}removeTab(t){this._tabsContainer.removeTab(t)}processActiveComponentChanged(t){this._tabsContainer.processActiveComponentChanged(t),this.updateTabSizes()}setSide(t){this._side=t,this._leftRightSided=[nt.right,nt.left].includes(this._side)}setRowColumnClosable(t){this._rowColumnClosable=t,this.updateClosability()}updateClosability(){let t;if(this._configClosable)if(this._rowColumnClosable){t=!0;const e=this.tabs.length;for(let i=0;i1}applyFocusedValue(t){t?this._element.classList.add("lm_focused"):this._element.classList.remove("lm_focused")}processMaximised(){if(void 0===this._maximiseButton)throw new J("HPMAX16997");this._maximiseButton.element.setAttribute("title",this._minimiseLabel)}processMinimised(){if(void 0===this._maximiseButton)throw new J("HPMIN16997");this._maximiseButton.element.setAttribute("title",this._maximiseLabel)}updateTabSizes(){if(this._tabsContainer.tabCount>0){const t=this._show?this._layoutManager.layoutConfig.dimensions.headerHeight:0;let e;this._leftRightSided?(this._element.style.height="",this._element.style.width=zt(t)):(this._element.style.width="",this._element.style.height=zt(t)),e=this._leftRightSided?this._element.offsetHeight-this._controlsContainerElement.offsetHeight-this._tabControlOffset:this._element.offsetWidth-this._controlsContainerElement.offsetWidth-this._tabControlOffset,this._tabsContainer.updateTabSizes(e,this._getActiveComponentItemEvent())}}handleTabInitiatedComponentRemoveEvent(t){if(this._canRemoveComponent){if(void 0===this._componentRemoveEvent)throw new J("HHTCE22294");this._componentRemoveEvent(t)}}handleTabInitiatedComponentFocusEvent(t){if(void 0===this._componentFocusEvent)throw new J("HHTAE22294");this._componentFocusEvent(t)}handleTabInitiatedDragStartEvent(t,e,i,n){if(this._canRemoveComponent){if(void 0===this._componentDragStartEvent)throw new J("HHTDSE22294");this._componentDragStartEvent(t,e,i,n)}else i.cancelDrag()}processTabDropdownActiveChanged(){void 0!==this._tabDropdownButton&&Dt(this._tabDropdownButton.element,this._tabsContainer.dropdownActive)}handleButtonPopoutEvent(){if(this._layoutManager.layoutConfig.settings.popoutWholeStack){if(void 0===this._popoutEvent)throw new J("HHBPOE17834");this._popoutEvent()}else{const t=this._getActiveComponentItemEvent();t&&t.popout()}}handleButtonMaximiseToggleEvent(t){if(void 0===this._maximiseToggleEvent)throw new J("HHBMTE16834");this._maximiseToggleEvent()}onClick(t){t.target===this._element&&this.notifyClick(t)}onTouchStart(t){t.target===this._element&&this.notifyTouchStart(t)}notifyClick(t){if(void 0===this._clickEvent)throw new J("HNHC46834");this._clickEvent(t)}notifyTouchStart(t){if(void 0===this._touchStartEvent)throw new J("HNHTS46834");this._touchStartEvent(t)}}class ee extends $t{constructor(t,e,i){var n,o,s,r,a,l,h,d,c,m,u,p,g,f,v,_,y,C,w;super(t,e,i,ee.createElement(document)),this._headerSideChanged=!1,this._resizeListener=()=>this.handleResize(),this._maximisedListener=()=>this.handleMaximised(),this._minimisedListener=()=>this.handleMinimised(),this._headerConfig=e.header;const I=t.layoutConfig.header,b=e.content;let S;if(1!==b.length)S=void 0;else{S=b[0].header}this._initialWantMaximise=e.maximised,this._initialActiveItemIndex=null!==(n=e.activeItemIndex)&&void 0!==n?n:0;const E=null!==(r=null!==(s=null===(o=this._headerConfig)||void 0===o?void 0:o.show)&&void 0!==s?s:null==S?void 0:S.show)&&void 0!==r?r:I.show,x=null!==(h=null!==(l=null===(a=this._headerConfig)||void 0===a?void 0:a.popout)&&void 0!==l?l:null==S?void 0:S.popout)&&void 0!==h?h:I.popout,L=null!==(m=null!==(c=null===(d=this._headerConfig)||void 0===d?void 0:d.maximise)&&void 0!==c?c:null==S?void 0:S.maximise)&&void 0!==m?m:I.maximise,z=null!==(g=null!==(p=null===(u=this._headerConfig)||void 0===u?void 0:u.close)&&void 0!==p?p:null==S?void 0:S.close)&&void 0!==g?g:I.close,M=null!==(_=null!==(v=null===(f=this._headerConfig)||void 0===f?void 0:f.minimise)&&void 0!==v?v:null==S?void 0:S.minimise)&&void 0!==_?_:I.minimise,P=null!==(w=null!==(C=null===(y=this._headerConfig)||void 0===y?void 0:y.tabDropdown)&&void 0!==C?C:null==S?void 0:S.tabDropdown)&&void 0!==w?w:I.tabDropdown;this._maximisedEnabled=!1!==L;const T={show:!1!==E,side:!1===E?nt.top:E,popoutEnabled:!1!==x,popoutLabel:!1===x?"":x,maximiseEnabled:this._maximisedEnabled,maximiseLabel:!1===L?"":L,closeEnabled:!1!==z,closeLabel:!1===z?"":z,minimiseEnabled:!0,minimiseLabel:M,tabDropdownEnabled:!1!==P,tabDropdownLabel:!1===P?"":P};this._header=new te(t,this,T,e.isClosable&&!1!==z,(()=>this.getActiveComponentItem()),(()=>this.remove()),(()=>this.handlePopoutEvent()),(()=>this.toggleMaximise()),(t=>this.handleHeaderClickEvent(t)),(t=>this.handleHeaderTouchStartEvent(t)),(t=>this.handleHeaderComponentRemoveEvent(t)),(t=>this.handleHeaderComponentFocusEvent(t)),((t,e,i,n)=>this.handleHeaderComponentStartDragEvent(t,e,i,n))),this.isStack=!0,this._childElementContainer=document.createElement("section"),this._childElementContainer.classList.add("lm_items"),this.on("resize",this._resizeListener),this._maximisedEnabled&&(this.on("maximised",this._maximisedListener),this.on("minimised",this._minimisedListener)),this.element.appendChild(this._header.element),this.element.appendChild(this._childElementContainer),this.setupHeaderPosition(),this._header.updateClosability()}get childElementContainer(){return this._childElementContainer}get header(){return this._header}get headerShow(){return this._header.show}get headerSide(){return this._header.side}get headerLeftRightSided(){return this._header.leftRightSided}get contentAreaDimensions(){return this._contentAreaDimensions}get initialWantMaximise(){return this._initialWantMaximise}get isMaximised(){return this===this.layoutManager.maximisedStack}get stackParent(){if(!this.parent)throw new Error("Stack should always have a parent");return this.parent}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}init(){if(!0===this.isInitialised)return;this.updateNodeSize();for(let t=0;t0){if(this._initialActiveItemIndex<0||this._initialActiveItemIndex>=e)throw new Error(`ActiveItemIndex out of range: ${this._initialActiveItemIndex} id: ${this.id}`);for(let i=0;ithis.contentItems.length)throw e-=1,new X("SAC99728");if(t instanceof jt)return e=super.addChild(t,e),this._childElementContainer.appendChild(t.element),this._header.createTab(t,e),this.setActiveComponentItem(t,i),this._header.updateTabSizes(),this.updateSize(!1),t.container.setBaseLogicalZIndex(),this._header.updateClosability(),this.emitStateChangedEvent(),e;throw new X("SACC88532")}removeChild(t,e){const i=t,n=this.contentItems.indexOf(i),o=1===this.contentItems.length;if(this._activeComponentItem===i&&(i.focused&&i.blur(),!o)){const t=0===n?1:n-1;this.setActiveComponentItem(this.contentItems[t],!1)}this._header.removeTab(i),super.removeChild(i,e),o||this._header.updateClosability(),this.emitStateChangedEvent()}toggleMaximise(){this.isMaximised?this.minimise():this.maximise()}maximise(){if(!this.isMaximised){this.layoutManager.setMaximisedStack(this);const t=this.contentItems,e=t.length;for(let i=0;i0&&void 0===t)throw new Error("expected non-empty stack to have an active component item");return{type:"stack",content:this.calculateConfigContent(),size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,isClosable:this.isClosable,maximised:this.isMaximised,header:this.createHeaderConfig(),activeItemIndex:t}}onDrop(t,e){if("header"===this._dropSegment){if(this.resetHeaderDropZone(),void 0===this._dropIndex)throw new J("SODDI68990");return void this.addChild(t,this._dropIndex)}if("body"===this._dropSegment)return void this.addChild(t,0,!0);const i="top"===this._dropSegment||"bottom"===this._dropSegment,n="left"===this._dropSegment||"right"===this._dropSegment,o="top"===this._dropSegment||"left"===this._dropSegment,s=i&&this.stackParent.isColumn||n&&this.stackParent.isRow;if(t.isComponent){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createAndInitContentItem(e,this);i.addChild(t),t=i}if(t.type===at.row||t.type===at.column){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}if(s){const e=this.stackParent.contentItems.indexOf(this);this.stackParent.addChild(t,o?e:e+1,!0),this.size*=.5,t.size=this.size,t.sizeUnit=this.sizeUnit,this.stackParent.updateSize(!1)}else{const e=i?at.column:at.row,n=ct.createDefault(e),s=this.layoutManager.createContentItem(n,this);this.stackParent.replaceChild(this,s),s.addChild(t,o?0:void 0,!0),s.addChild(this,o?void 0:0,!0),this.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}highlightDropZone(t,e){for(const i in this._contentAreaDimensions){const n=i,o=this._contentAreaDimensions[n].hoverArea;if(o.x1t&&o.y1e)return void("header"===n?(this._dropSegment="header",this.highlightHeaderDropZone(this._header.leftRightSided?e:t)):(this.resetHeaderDropZone(),this.highlightBodyDropZone(n)))}}getArea(){if("none"===this.element.style.display)return null;const t=super.getElementArea(this._header.element),e=super.getElementArea(this._childElementContainer);if(null===t||null===e)throw new K("SGAHC13086");const i=e.x2-e.x1,n=e.y2-e.y1;return this._contentAreaDimensions={header:{hoverArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2},highlightArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2}}},0===this.contentItems.length?(this._contentAreaDimensions.body={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2}},super.getElementArea(this.element)):(this._contentAreaDimensions.left={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x1+.25*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x1+.5*i,y2:e.y2}},this._contentAreaDimensions.top={hoverArea:{x1:e.x1+.25*i,y1:e.y1,x2:e.x1+.75*i,y2:e.y1+.5*n},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y1+.5*n}},this._contentAreaDimensions.right={hoverArea:{x1:e.x1+.75*i,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1+.5*i,y1:e.y1,x2:e.x2,y2:e.y2}},this._contentAreaDimensions.bottom={hoverArea:{x1:e.x1+.25*i,y1:e.y1+.5*n,x2:e.x1+.75*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1+.5*n,x2:e.x2,y2:e.y2}},super.getElementArea(this.element))}positionHeader(t){this._header.side!==t&&(this._header.setSide(t),this._headerSideChanged=!0,this.setupHeaderPosition())}updateNodeSize(){if("none"!==this.element.style.display){const t=kt(this.element);if(this._header.show){t[this._header.leftRightSided?it.width:it.height]-=this.layoutManager.layoutConfig.dimensions.headerHeight}this._childElementContainer.style.width=zt(t.width),this._childElementContainer.style.height=zt(t.height);for(let e=0;e=o&&t({...t,[e]:i});async function s(t,e){return(await Promise.all(e.map((async([e,i])=>[e,await t(i,e)])))).reduce(o,{})}n.mapEntriesAsync=s,n.mapValuesAsync=async function(t,e){let i;return i=e instanceof Map?[...e.entries()]:Object.entries(e),s(t,i)};var r,a,l,h,d=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldSet||function(t,e,i,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(t,i):o?o.value=i:e.set(t,i),i},c=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldGet||function(t,e,i,n){if("a"===i&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?n:"a"===i?n.call(t):n?n.value:e.get(t)};Object.defineProperty(i,"__esModule",{value:!0});var m=i.DefaultLayoutManager=void 0;const u=n;class p{constructor(t){a.set(this,void 0),l.set(this,new Map),d(this,a,t,"f")}size(){return c(this,l,"f").size}async applyLayoutSnapshot({layouts:t}){if(Object.keys(t).length>1)throw new Error("[LayoutManager] Tried to call applyLayoutSnapshot with more than 1 layout. When implementing multiple layouts via overridden LayoutManager class, you must override and fully implement the applyLayoutSnapshot method without calling super.applyLayoutSnapshot().");const[[e,i]]=Object.entries(t);await p.createLayout(this,{layoutName:e,layout:i})}async showLayout({layoutName:t}){}async getLayoutSnapshot(){return{layouts:await(0,u.mapValuesAsync)((t=>t.getFrameSnapshot()),c(this,l,"f"))}}async removeLayout({layoutName:t}){}getLayoutIdentityForView(t){const e=[...c(this,l,"f").values()].find((e=>e.getCurrentViews().some((e=>e.name===t.name&&e.uuid===t.uuid))));return e?.identity??void 0}isLayoutVisible({layoutName:t}){return c(p,r,"m",h).call(p,this,t).isVisible()}resolveLayoutIdentity(t){if(t&&"layoutName"in t)return t;const e=[...c(this,l,"f").values()];if(1===e.length)return e[0].identity;const i=e.find((t=>t.isVisible()));return i?.identity??void 0}static async resolveLayout(t,e){const i=t.resolveLayoutIdentity(e);if(void 0===i||!("layoutName"in i))throw new Error("[layout-manager] resolveLayout: Could not resolve the layout identity. Make sure you include 'layoutName' in the identity object.");return c(p,r,"m",h).call(p,t,i.layoutName)}static async handleSharedView(t,e,i){await(0,u.mapValuesAsync)((async t=>{if(t.identity.layoutName!==e.layoutName){const e=t.getCurrentViews().find((t=>t.name===i.name));e&&await t.onViewDetached({viewIdentity:e,target:null}).catch(console.error)}}),c(t,l,"f"))}static async handleLastViewRemoved(t,e){await t.removeLayout(e),await c(t,a,"f").handleLastViewRemoved(t)}static async destroyLayout(t,{layoutName:e}){await c(p,r,"m",h).call(p,t,e).destroy(),c(t,l,"f").delete(e)}static async createLayout(t,e){const{layoutName:i}=e;if(c(t,l,"f").has(i))throw new Error(`Layout name ${i} already exists`);await c(t,a,"f").createLayout(e,t)}static registerLayout(t,e,i){c(t,l,"f").set(e,i)}static getAllLayouts(t){return[...c(t,l,"f").values()]}static setInitialSnapshot(t,e){c(t,a,"f").setInitialSnapshot(e)}static createClosedConstructor(...t){return class extends p{constructor(){super(...t)}}}}m=i.DefaultLayoutManager=p,r=p,a=new WeakMap,l=new WeakMap,h=function(t,e){const i=c(t,l,"f").get(e);if(!i)throw new Error(`[layout-manager] getLayoutByName: Could not locate layout with name '${e}'`);return i};var g={},f={},v={};Object.defineProperty(v,"__esModule",{value:!0}),v.ReversibleMap=void 0;v.ReversibleMap=class{constructor(){this.valueToKey=new Map,this.keyToValue=new Map,this.setUnique=(t,e)=>{if(this.hasKey(t)||this.hasValue(e))throw new Error("Key or value already in the map.");this.keyToValue.set(t,e),this.valueToKey.set(e,t)},this.getKey=t=>{const e=this.valueToKey.get(t);if(!e)throw new Error("Value not found in the map.");return e},this.deleteKey=t=>{const e=this.getValue(t);return this.keyToValue.delete(t),this.valueToKey.delete(e),e},this.deleteValue=t=>{const e=this.getKey(t);return this.keyToValue.delete(e),this.valueToKey.delete(t),e},this.hasKey=t=>this.keyToValue.has(t),this.hasValue=t=>this.valueToKey.has(t)}getValue(t){const e=this.keyToValue.get(t);if(!e)throw new Error("Key not found in the map.");return e}},Object.defineProperty(f,"__esModule",{value:!0});var _=f.LayoutContentCache=void 0;const y=t.lazy,C=v;class w{constructor(){this.contentItemCache=new C.ReversibleMap,this.contentItemCacheId=0,this.createCacheKey=()=>{const t=`entity-${this.contentItemCacheId.toString()}`;return this.contentItemCacheId+=1,t},this.hasKey=t=>this.contentItemCache.hasKey(t),this.getItemOrUndefined=t=>{try{return this.getContentItemOrThrow(t)}catch(t){return}},this.getContentItemOrThrow=(t,e)=>{if(!this.contentItemCache.hasKey(t))throw new Error("Layout component has been destroyed or detached from the current layout.");const i=this.contentItemCache.getValue(t);if(e&&!e.includes(i.type))throw new Error(`Layout item is not the expected type. Expected ${e.join(", ")}, got ${i.type}.`);return i},this.getOrCreateEntityId=t=>{if(this.contentItemCache.hasValue(t))return this.contentItemCache.getKey(t);t.onDestroyed((()=>{this.contentItemCache.deleteValue(t)}));const e=this.createCacheKey();return this.contentItemCache.setUnique(e,t),e}}static getSingleInstance(){return w.singleton.getValue()}}_=f.LayoutContentCache=w,w.singleton=new y.Lazy((()=>new w));var I={},b={};!function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.getAdjacentStacks=t.doShareEdge=t.getAdjacentItem=void 0;t.getAdjacentItem=(e,i)=>{const{parent:n}=e;if(e.isRoot()||!n)return;const o=["top","bottom"].includes(i)?"column":"row",s=["top","left"].includes(i)?-1:1;if(n.type===o){const t=n.contentItems.indexOf(e)+s;if(t>=0&&t{const n=t.getBounds(),o=e.getBounds();if(!n||!o)return!1;if(["top","bottom"].includes(i)){return!(n.righto.right)}return!(n.bottomo.bottom)};t.getAdjacentStacks=(e,i)=>{const n=["top","bottom"].includes(i)?"row":"column",o=s=>"stack"===s.type?(0,t.doShareEdge)(e,s,i)?[s]:[]:"root"===s.type||"ground"===s.type?[]:s.type===n?s.contentItems.map((t=>o(t))).flat():s.type!==n?["top","right"].includes(i)?o(s.contentItems[s.contentItems.length-1]):o(s.contentItems[0]):[],s=(0,t.getAdjacentItem)(e,i);return s?o(s):[]}}(b);var S=t.commonjsGlobal&&t.commonjsGlobal.__decorate||function(t,e,i,n){var o,s=arguments.length,r=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(s<3?o(r):s>3?o(e,i,r):o(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};Object.defineProperty(I,"__esModule",{value:!0}),I.LayoutEntitiesController=void 0;const E=t.decorators,x=b,L=i;class z{constructor(t,e,i){this.wire=t,this.layoutManager=e,this.layoutContentCache=i,this.analytics=t=>{this.wire.sendAction(`layout-controller-${t}`).catch((()=>{}))},this.getLayoutIdentityForViewOrThrow=async t=>{const e=this.layoutManager.getLayoutIdentityForView(t);if(!e)throw new Error(`View identity ${t.name} is not attached to any layouts.`);return e},this.getRoot=async t=>{this.analytics("get-root");const e=(await this.getLayout(t)).getRoot();return{type:e.type,entityId:this.layoutContentCache.getOrCreateEntityId(e)}},this.getStackByView=async t=>{this.analytics("get-stack-by-view");const e=await this.getLayoutIdentityForViewOrThrow(t),i=(await this.getLayout(e)).getStackByView(t);if("stack"===i?.type)return{entityId:this.layoutContentCache.getOrCreateEntityId(i),type:"stack"}},this.getStackViews=t=>{this.analytics("get-stack-views");return this.layoutContentCache.getContentItemOrThrow(t,["stack"]).contentItems.map((t=>({name:t.viewName,uuid:this.wire.me.uuid})))},this.isRoot=t=>{this.analytics("is-root");return this.layoutContentCache.getContentItemOrThrow(t).isRoot()},this.exists=t=>(this.analytics("exists"),this.layoutContentCache.hasKey(t)),this.addViewToStack=async(t,e,{index:i}={index:0})=>{this.analytics("add-view-to-stack");const n=this.layoutContentCache.getContentItemOrThrow(t);if(i&&i>n.contentItems.length+1)throw new Error(`Index '${i}' out of range, please exclude the index or specify a number between 0 and ${n.contentItems.length}`);const o={id:t,index:i},{identity:s}=await n.layout.platformCreateView(e,{location:o});return s},this.findViewInStack=(t,e)=>t.contentItems.find((t=>t.viewName===e.name)),this.removeViewFromStack=async(t,e)=>{this.analytics("remove-view-from-stack");const i=this.layoutContentCache.getContentItemOrThrow(t,["stack"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to remove a view ('${e.name}') which does not belong to the stack.`);await n.layout.platformCloseView(e)},this.createAdjacentStack=async(t,e,{position:i="right"}={})=>{if(this.analytics("create-adjacent-stack"),!Array.isArray(e)||0===e.length)throw new Error('The parameter "views" must be an array with at least 1 element.');if(!["top","bottom","left","right"].includes(i))throw new Error(`Invalid position '${i}' specified.`);const n=this.layoutContentCache.getContentItemOrThrow(t).createAdjacentStack({position:i}),o=this.layoutContentCache.getOrCreateEntityId(n);return await Promise.all(e.reverse().map((t=>this.addViewToStack(o,t)))),o},this.getAdjacentStacks=async({targetId:t,edge:e})=>{this.analytics("get-adjacent-stacks");const i=this.layoutContentCache.getContentItemOrThrow(t);return(0,x.getAdjacentStacks)(i,e).map((t=>({entityId:this.layoutContentCache.getOrCreateEntityId(t)})))},this.setStackActiveView=async(t,e)=>{this.analytics("set-stack-active-view");const i=this.layoutContentCache.getContentItemOrThrow(t,["stack"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to set a view ('${e.name}') as active when it does not belong to the stack.`);i.setActiveContentItem(n,!0)}}async getLayout(t){const e=await L.DefaultLayoutManager.resolveLayout(this.layoutManager,t);if(!e)throw new Error(`Could not resolve target layout identity ${JSON.stringify(t)}`);return e}getContent(t){this.analytics("get-content");return this.layoutContentCache.getContentItemOrThrow(t,["column","row"]).contentItems.map((t=>({type:t.type,entityId:this.layoutContentCache.getOrCreateEntityId(t)})))}getParent(t){this.analytics("get-parent");const e=this.layoutContentCache.getContentItemOrThrow(t);if(!e.isRoot())return e.parent?.contentItems.includes(e)?{type:e.parent.type,entityId:this.layoutContentCache.getOrCreateEntityId(e.parent)}:void 0}}S([(0,E.expose)()],z.prototype,"getLayoutIdentityForViewOrThrow",void 0),S([(0,E.expose)()],z.prototype,"getRoot",void 0),S([(0,E.expose)()],z.prototype,"getStackByView",void 0),S([(0,E.expose)()],z.prototype,"getStackViews",void 0),S([(0,E.expose)()],z.prototype,"getContent",null),S([(0,E.expose)()],z.prototype,"getParent",null),S([(0,E.expose)()],z.prototype,"isRoot",void 0),S([(0,E.expose)()],z.prototype,"exists",void 0),S([(0,E.expose)()],z.prototype,"addViewToStack",void 0),S([(0,E.expose)()],z.prototype,"removeViewFromStack",void 0),S([(0,E.expose)()],z.prototype,"createAdjacentStack",void 0),S([(0,E.expose)()],z.prototype,"getAdjacentStacks",void 0),S([(0,E.expose)()],z.prototype,"setStackActiveView",void 0),I.LayoutEntitiesController=z,Object.defineProperty(g,"__esModule",{value:!0});var M=g.initLayoutEndpoints=void 0;const P=t.apiExposer,T=t.layout_constants,A=f,k=I,D=i;M=g.initLayoutEndpoints=async function(t,e){const i=t.getFin(),n=await i.Platform.getCurrentSync().getClient(),o=new P.ChannelsExposer(n);await new P.ApiExposer(o).exposeInstance(new k.LayoutEntitiesController(t,e,A.LayoutContentCache.getSingleInstance()),{id:T.LAYOUT_CONTROLLER_ID}),await async function(t,e){const i=t=>async i=>{const n=await D.DefaultLayoutManager.resolveLayout(e,i.target);if(!n)throw new Error(`Could not resolve the layout target from payload ${JSON.stringify(i)}`);return t(n,i)},n=(e,n)=>{t.register(e,i(n))},o=(t,e)=>{n(t,e)};n("replace-view",((t,e)=>t.replaceView(e))),n("replace-layout",((t,{layout:e})=>t.replaceLayout(e))),n("add-view",((t,e)=>t.insertView(e))),o("layout-add-view",((t,{viewOptions:e,location:i,targetView:n})=>t.platformCreateView(e,{location:i,targetView:n}))),n("close-view",((t,e)=>t.cleanupView(e.viewIdentity))),o("layout-close-view",((t,e)=>t.platformCloseView(e.viewIdentity))),n("apply-preset-layout",((t,e)=>t.applyPreset(e))),n("get-layout-views",(t=>t.getCurrentViews())),n("get-frame-snapshot",(t=>t.getFrameSnapshot())),n("is-visible",(t=>t.isVisible())),n("destroy",(t=>t.destroy())),t.register("get-layout-snapshot",(()=>e.getLayoutSnapshot()))}(n,e)};var R={};Object.defineProperty(R,"__esModule",{value:!0});var U=R.BaseLayout=void 0;U=R.BaseLayout=class{};var O={};Object.defineProperty(O,"__esModule",{value:!0});var V=O.DOMEmitter=void 0;V=O.DOMEmitter=class{constructor(t){this.container=t}dispatchLocalEvent(t,e){const i={...e,type:t,tabSelector:`tab-${e.name}`,containerSelector:`container-${e.name}`,topic:"openfin-DOM-event"};this.container.dispatchEvent(new CustomEvent(t,{detail:i}))}};var B={};Object.defineProperty(B,"__esModule",{value:!0});var H=B.mapLayoutContentItemsImmutableSync=B.mapLayoutContentItemsImmutable=W=B.isVisible=void 0;var W=B.isVisible=t=>(0!==t.offsetWidth||0!==t.offsetHeight)&&"hidden"!==window.getComputedStyle(t).visibility&&t.offsetTop>=0&&t.offsetLeft>=0&&t.offsetTop<=window.innerHeight&&t.offsetLeft<=window.innerWidth;const F=t=>"type"in t&&"component"===t.type;B.mapLayoutContentItemsImmutable=async function t(e,i){return F(i)?e(i):{...i,content:await Promise.all(i.content?.map((i=>t(e,i))))}},H=B.mapLayoutContentItemsImmutableSync=function t(e,i){return F(i)?e(i):{...i,content:i.content?.map((i=>t(e,i)))}};class N extends Error{constructor(t,e){super(e),this.type=t}}class G extends N{constructor(t,e){super("Configuration",t),this.node=e}}class j extends N{constructor(t){super("PopoutBlocked",t)}}class $ extends N{constructor(t){super("API",t)}}class Z extends N{constructor(t){super("Bind",t)}}class q extends Error{constructor(t,e,i){super(`${t}: ${e}${void 0===i?"":": "+i}`)}}class X extends q{constructor(t,e){super("Assert",t,e)}}class Y extends q{constructor(t,e,i){super("UnreachableCase",t,`${e}${void 0===i?"":": "+i}`)}}class K extends q{constructor(t,e){super("UnexpectedNull",t,e)}}class J extends q{constructor(t,e){super("UnexpectedUndefined",t,e)}}var Q;!function(t){let e=!1;const i={PopoutCannotBeCreatedWithGroundItemConfig:{id:0,default:"Popout cannot be created with ground ItemConfig"},PleaseRegisterAConstructorFunction:{id:1,default:"Please register a constructor function"},ComponentTypeNotRegisteredAndBindComponentEventHandlerNotAssigned:{id:2,default:"Component type not registered and BindComponentEvent handler not assigned"},ComponentIsAlreadyRegistered:{id:3,default:"Component is already registered"},ComponentIsNotVirtuable:{id:4,default:"Component is not virtuable. Requires rootHtmlElement field/getter"},VirtualComponentDoesNotHaveRootHtmlElement:{id:5,default:'Virtual component does not have getter "rootHtmlElement"'},ItemConfigIsNotTypeComponent:{id:6,default:"ItemConfig is not of type component"},InvalidNumberPartInSizeString:{id:7,default:"Invalid number part in size string"},UnknownUnitInSizeString:{id:8,default:"Unknown unit in size string"},UnsupportedUnitInSizeString:{id:9,default:"Unsupported unit in size string"}};t.idCount=Object.keys(i).length;const n=Object.values(i);t.checkInitialise=function(){if(!e)for(let e=0;e="0"&&t<="9"}function Tt(t,e){const i=zt(e);t.style.width=i}function At(t,e){const i=zt(e);t.style.height=i}function kt(t){return{width:t.offsetWidth,height:t.offsetHeight}}function Dt(t,e){t.style.display=e?"":"none"}function Rt(t,e){if(void 0!==e)for(const i in e)if(e.hasOwnProperty(i)){const n=e[i],o=t[i];t[i]=Ut(o,n)}return t}function Ut(t,e){if("object"!=typeof e)return e;if(Array.isArray(e)){const t=e.length,i=new Array(t);for(let n=0;n36)throw new Error("Too many keys in config minifier map")},t.translateObject=n}(dt||(dt={})),function(t){t.defaults={type:at.ground,content:[],size:1,sizeUnit:ht.Fractional,minSize:void 0,minSizeUnit:ht.Pixel,id:"",isClosable:!0},t.createCopy=function(t,e){switch(t.type){case at.ground:case at.row:case at.column:return gt.createCopy(t,e);case at.stack:return ut.createCopy(t,e);case at.component:return pt.createCopy(t);default:throw new Y("CICC91354",t.type,"Invalid Config Item type specified")}},t.createDefault=function(t){switch(t){case at.ground:throw new X("CICCDR91562");case at.row:case at.column:return gt.createDefault(t);case at.stack:return ut.createDefault();case at.component:return pt.createDefault();default:throw new Y("CICCDD91563",t,"Invalid Config Item type specified")}},t.isComponentItem=function(t){return t.type===at.component},t.isStackItem=function(t){return t.type===at.stack},t.isGroundItem=function(t){return t.type===at.ground}}(ct||(ct={})),function(t){t.defaultMaximised=!1,function(t){t.createCopy=function(t,e){return void 0===t?void 0:{show:null!=e?e:t.show,popout:t.popout,close:t.close,maximise:t.maximise,minimise:t.minimise,tabDropdown:t.tabDropdown}}}(t.Header||(t.Header={}))}(mt||(mt={})),function(t){function e(t){const e=t.length,i=new Array(e);for(let n=0;n"__glMaximised"===t));t>0&&(o=!0,n=n.splice(t,1)),e=n.length>0?n[0]:ct.defaults.id}else e=n;return i=void 0!==t.maximised?t.maximised:o,{id:e,maximised:i}}}(wt||(wt={})),function(t){function e(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0;return{resolved:!0,root:Et.resolve(i),openPopouts:t.resolveOpenPopouts(e.openPopouts),dimensions:t.Dimensions.resolve(e.dimensions),settings:t.Settings.resolve(e.settings),header:t.Header.resolve(e.header,e.settings,e.labels)}}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:Lt.fromResolvedArray(e.openPopouts),settings:_t.Settings.createCopy(e.settings),dimensions:t.Dimensions.fromResolved(e.dimensions),header:_t.Header.createCopy(e.header)}},t.isResolved=function(t){const e=t;return void 0!==e.resolved&&!0===e.resolved},t.resolveOpenPopouts=function(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0,{root:Et.resolve(o),openPopouts:xt.resolveOpenPopouts(e.openPopouts),dimensions:xt.Dimensions.resolve(e.dimensions),settings:xt.Settings.resolve(e.settings),header:xt.Header.resolve(e.header,e.settings,e.labels),parentId:null!==(i=e.parentId)&&void 0!==i?i:null,indexInParent:null!==(n=e.indexInParent)&&void 0!==n?n:null,window:t.Window.resolve(e.window,e.dimensions),resolved:!0}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:i(e.openPopouts),dimensions:xt.Dimensions.fromResolved(e.dimensions),settings:_t.Settings.createCopy(e.settings),header:_t.Header.createCopy(e.header),parentId:e.parentId,indexInParent:e.indexInParent,window:t.Window.fromResolved(e.window)}},t.fromResolvedArray=i}(Lt||(Lt={}));class Wt{constructor(){this._allEventSubscriptions=[],this._subscriptionsMap=new Map,this.unbind=this.removeEventListener,this.trigger=this.emit}tryBubbleEvent(t,e){}emit(t,...e){let i=this._subscriptionsMap.get(t);if(void 0!==i){i=i.slice();for(let t=0;t0){const n=e.slice();n.unshift(t);const o=this._allEventSubscriptions.slice();for(let t=0;t0?n.contentItems[0]:n,e=0);const o=this._layoutManager.createAndInitContentItem(i,t);t.addChild(o,e),this._layoutManager.layoutConfig.settings.popInOnClose?this._onClose():this.close()}createWindow(){const t=this.createUrl(),e=Math.floor(1e6*Math.random()).toString(36),i=this.serializeWindowFeatures({width:this._initialWindowSize.width,height:this._initialWindowSize.height,innerWidth:this._initialWindowSize.width,innerHeight:this._initialWindowSize.height,menubar:"no",toolbar:"no",location:"no",personalbar:"no",resizable:"yes",scrollbars:"no",status:"no"});if(this._popoutWindow=globalThis.open(t,e,i),this._popoutWindow)this._popoutWindow.addEventListener("load",(()=>this.positionWindow()),{passive:!0}),this._popoutWindow.addEventListener("beforeunload",(()=>{this._layoutManager.layoutConfig.settings.popInOnClose?this.popIn():this._onClose()}),{passive:!0}),this._checkReadyInterval=setInterval((()=>this.checkReady()),10);else if(!0===this._layoutManager.layoutConfig.settings.blockedPopoutsThrowError){throw new j("Popout blocked")}}checkReady(){if(null===this._popoutWindow)throw new K("BPCR01844");this._popoutWindow.__glInstance&&this._popoutWindow.__glInstance.isInitialised&&(this.onInitialised(),void 0!==this._checkReadyInterval&&(clearInterval(this._checkReadyInterval),this._checkReadyInterval=void 0))}serializeWindowFeatures(t){const e=[];for(const i in t)e.push(i+"="+t[i].toString());return e.join(",")}createUrl(){const t="gl-window-config-"+Ot(),e=_t.minifyConfig(this._config);try{localStorage.setItem(t,JSON.stringify(e))}catch(t){throw new Error("Error while writing to localStorage "+function(t){return t instanceof Error?t.message:"string"==typeof t?t:"Unknown Error"}(t))}const i=new URL(location.href);return i.searchParams.set("gl-window",t),i.toString()}positionWindow(){if(null===this._popoutWindow)throw new Error("BrowserPopout.positionWindow: null popoutWindow");this._popoutWindow.moveTo(this._initialWindowSize.left,this._initialWindowSize.top),this._popoutWindow.focus()}onInitialised(){this._isInitialised=!0,this.getGlInstance().on("popIn",(()=>this.popIn())),this.emit("initialised")}_onClose(){setTimeout((()=>this.emit("closed")),50)}}class Gt extends Wt{constructor(t,e,i,n){super(),this.layoutManager=t,this._parent=i,this._element=n,this._popInParentIds=[],this._type=e.type,this._id=e.id,this._isInitialised=!1,this.isGround=!1,this.isRow=!1,this.isColumn=!1,this.isStack=!1,this.isComponent=!1,this.size=e.size,this.sizeUnit=e.sizeUnit,this.minSize=e.minSize,this.minSizeUnit=e.minSizeUnit,this._isClosable=e.isClosable,this._pendingEventPropagations={},this._throttledEvents=["stateChanged"],this._contentItems=this.createContentItems(e.content)}get type(){return this._type}get id(){return this._id}set id(t){this._id=t}get popInParentIds(){return this._popInParentIds}get parent(){return this._parent}get contentItems(){return this._contentItems}get isClosable(){return this._isClosable}get element(){return this._element}get isInitialised(){return this._isInitialised}static isStack(t){return t.isStack}static isComponentItem(t){return t.isComponent}static isComponentParentableItem(t){return t.isStack||t.isGround}removeChild(t,e=!1){const i=this._contentItems.indexOf(t);if(-1===i)throw new Error("Can't remove child item. Unknown content item");if(e||this._contentItems[i].destroy(),this._contentItems.splice(i,1),this._contentItems.length>0)this.updateSize(!1);else if(!this.isGround&&!0===this._isClosable){if(null===this._parent)throw new K("CIUC00874");this._parent.removeChild(this)}}addChild(t,e,i){return null!=e||(e=this._contentItems.length),this._contentItems.splice(e,0,t),t.setParent(this),!0===this._isInitialised&&!1===t._isInitialised&&t.init(),e}replaceChild(t,e,i=!1){const n=this._contentItems.indexOf(t),o=t._element.parentNode;if(-1===n)throw new X("CIRCI23232","Can't replace child. oldChild is not child of this");if(null===o)throw new K("CIRCP23232");if(o.replaceChild(e._element,t._element),!0===i&&(t._parent=null,t.destroy()),this._contentItems[n]=e,e.setParent(this),e.size=t.size,e.sizeUnit=t.sizeUnit,e.minSize=t.minSize,e.minSizeUnit=t.minSizeUnit,null===e._parent)throw new K("CIRCNC45699");!0===e._parent._isInitialised&&!1===e._isInitialised&&e.init(),this.updateSize(!1)}remove(){if(null===this._parent)throw new K("CIR11110");this._parent.removeChild(this)}popout(){const t=Ot(),e=this.layoutManager.createPopoutFromContentItem(this,void 0,t,void 0);return this.emitBaseBubblingEvent("stateChanged"),e}calculateConfigContent(){const t=this._contentItems,e=t.length,i=new Array(e);for(let n=0;nthis.propagateEventToLayoutManager(t,e))))}propagateEventToLayoutManager(t,e){this._pendingEventPropagations[t]=!1,this.layoutManager.emitUnknown(t,e)}}class jt extends Gt{constructor(t,e,i){super(t,e,i,document.createElement("div")),this._parentItem=i,this._focused=!1,this.isComponent=!0,this._reorderEnabled=e.reorderEnabled,this.applyUpdatableConfig(e),this._initialWantMaximise=e.maximised;const n=document.createElement("div");n.classList.add("lm_content"),this.element.appendChild(n),this._container=new Ft(e,this,t,n,(t=>this.handleUpdateItemConfigEvent(t)),(()=>this.show()),(()=>this.hide()),(t=>this.focus(t)),(t=>this.blur(t)))}get componentName(){return this._container.componentType}get componentType(){return this._container.componentType}get reorderEnabled(){return this._reorderEnabled}get initialWantMaximise(){return this._initialWantMaximise}get component(){return this._container.component}get container(){return this._container}get parentItem(){return this._parentItem}get headerConfig(){return this._headerConfig}get title(){return this._title}get tab(){return this._tab}get focused(){return this._focused}destroy(){this._container.destroy(),super.destroy()}applyUpdatableConfig(t){this.setTitle(t.title),this._headerConfig=t.header}toConfig(){const t=this._container.stateRequestEvent,e=void 0===t?this._container.state:t();return{type:at.component,content:[],size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,maximised:!1,isClosable:this.isClosable,reorderEnabled:this._reorderEnabled,title:this._title,header:mt.Header.createCopy(this._headerConfig),componentType:pt.copyComponentType(this.componentType),componentState:e}}close(){if(null===this.parent)throw new K("CIC68883");this.parent.removeChild(this,!1)}enterDragMode(t,e){Tt(this.element,t),At(this.element,e),this._container.enterDragMode(t,e)}exitDragMode(){this._container.exitDragMode()}enterStackMaximised(){this._container.enterStackMaximised()}exitStackMaximised(){this._container.exitStackMaximised()}drag(){this._container.drag()}updateSize(t){this.updateNodeSize(t)}init(){this.updateNodeSize(!1),super.init(),this._container.emit("open"),this.initContentItems()}setTitle(t){this._title=t,this.emit("titleChanged",t),this.emit("stateChanged")}setTab(t){this._tab=t,this.emit("tab",t),this._container.setTab(t)}hide(){super.hide(),this._container.setVisibility(!1)}show(){super.show(),this._container.setVisibility(!0)}focus(t=!1){this.parentItem.setActiveComponentItem(this,!0,t)}setFocused(t){this._focused=!0,this.tab.setFocused(),t||this.emitBaseBubblingEvent("focus")}blur(t=!1){this._focused&&this.layoutManager.setFocusedComponentItem(void 0,t)}setBlurred(t){this._focused=!1,this.tab.setBlurred(),t||this.emitBaseBubblingEvent("blur")}setParent(t){this._parentItem=t,super.setParent(t)}handleUpdateItemConfigEvent(t){this.applyUpdatableConfig(t)}updateNodeSize(t){if("none"!==this.element.style.display){const{width:e,height:i}=kt(this.element);this._container.setSizeToNodeSize(e,i,t)}}}class $t extends Gt{constructor(){super(...arguments),this._focused=!1}get focused(){return this._focused}setFocusedValue(t){this._focused=t}}class Zt extends Wt{constructor(t,e){super(),this._eElement=t,this._pointerTracking=!1,this._pointerDownEventListener=t=>this.onPointerDown(t),this._pointerMoveEventListener=t=>this.onPointerMove(t),this._pointerUpEventListener=t=>this.onPointerUp(t),this._timeout=void 0,this._allowableTargets=[t,...e],this._oDocument=document,this._eBody=document.body,this._nDelay=1800,this._nDistance=10,this._nX=0,this._nY=0,this._nOriginalX=0,this._nOriginalY=0,this._dragging=!1,this._eElement.addEventListener("pointerdown",this._pointerDownEventListener,{passive:!0})}destroy(){this.checkRemovePointerTrackingEventListeners(),this._eElement.removeEventListener("pointerdown",this._pointerDownEventListener)}cancelDrag(){this.processDragStop(void 0)}onPointerDown(t){if(this._allowableTargets.includes(t.target)&&t.isPrimary){const e=this.getPointerCoordinates(t);this.processPointerDown(e)}}processPointerDown(t){this._nOriginalX=t.x,this._nOriginalY=t.y,this._oDocument.addEventListener("pointermove",this._pointerMoveEventListener),this._oDocument.addEventListener("pointerup",this._pointerUpEventListener,{passive:!0}),this._pointerTracking=!0,this._timeout=setTimeout((()=>{try{this.startDrag()}catch(t){throw console.error(t),t}}),this._nDelay)}onPointerMove(t){this._pointerTracking&&(this.processDragMove(t),t.preventDefault())}processDragMove(t){this._nX=t.pageX-this._nOriginalX,this._nY=t.pageY-this._nOriginalY,!1===this._dragging&&(Math.abs(this._nX)>this._nDistance||Math.abs(this._nY)>this._nDistance)&&this.startDrag(),this._dragging&&this.emit("drag",this._nX,this._nY,t)}onPointerUp(t){this.processDragStop(t)}processDragStop(t){var e;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this.checkRemovePointerTrackingEventListeners(),!0===this._dragging&&(this._eBody.classList.remove("lm_dragging"),this._eElement.classList.remove("lm_dragging"),null===(e=this._oDocument.querySelector("iframe"))||void 0===e||e.style.setProperty("pointer-events",""),this._dragging=!1,this.emit("dragStop",t))}checkRemovePointerTrackingEventListeners(){this._pointerTracking&&(this._oDocument.removeEventListener("pointermove",this._pointerMoveEventListener),this._oDocument.removeEventListener("pointerup",this._pointerUpEventListener),this._pointerTracking=!1)}startDrag(){var t;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this._dragging=!0,this._eBody.classList.add("lm_dragging"),this._eElement.classList.add("lm_dragging"),null===(t=this._oDocument.querySelector("iframe"))||void 0===t||t.style.setProperty("pointer-events","none"),this.emit("dragStart",this._nOriginalX,this._nOriginalY)}getPointerCoordinates(t){return{x:t.pageX,y:t.pageY}}}class qt{constructor(t,e,i){this._isVertical=t,this._size=e,this._grabSize=i0){const i=this.createSplitter(Math.max(0,e-1)).element;e>0?(this.contentItems[e-1].element.insertAdjacentElement("afterend",i),i.insertAdjacentElement("afterend",t.element)):(this.contentItems[0].element.insertAdjacentElement("beforebegin",i),i.insertAdjacentElement("beforebegin",t.element))}else this._childElementContainer.appendChild(t.element);super.addChild(t,e);const n=1/this.contentItems.length*100;if(!0===i)return this.emitBaseBubblingEvent("stateChanged"),e;for(let e=0;e0&&(this.calculateRelativeSizes(),this.setAbsoluteSizes()),this.emitBaseBubblingEvent("stateChanged"),this.emit("resize")}setAbsoluteSizes(){const t=this.calculateAbsoluteSizes();for(let e=0;e0&&t.itemSizes[e]++,this._isColumn?(Tt(this.contentItems[e].element,t.crossAxisSize),At(this.contentItems[e].element,t.itemSizes[e])):(Tt(this.contentItems[e].element,t.itemSizes[e]),At(this.contentItems[e].element,t.crossAxisSize))}calculateAbsoluteSizes(){const t=(this.contentItems.length-1)*this._splitterSize,{width:e,height:i}=kt(this.element);let n,o;this._isColumn?(n=i-t,o=e):(n=e-t,o=i);let s=0;const r=[];for(let t=0;t0){const n=100-t;for(let t=0;t100&&e.length>0){for(let t=0;te)return;{const r=i/e;let a=i;for(let e=0;ethis.onSplitterDrag(e,t,i))),e.on("dragStop",(()=>this.onSplitterDragStop(e))),e.on("dragStart",(()=>this.onSplitterDragStart(e))),this._splitter.splice(t,0,e),e}getSplitItems(t){const e=this._splitter.indexOf(t);return{before:this.contentItems[e],after:this.contentItems[e+1]}}calculateContentItemMinSize(t){const e=t.minSize;if(void 0!==e){if(t.minSizeUnit===ht.Pixel)return e;throw new X("ROCGMD98831",JSON.stringify(t))}{const t=this.layoutManager.layoutConfig.dimensions;return this._isColumn?t.defaultMinItemHeight:t.defaultMinItemWidth}}calculateContentItemsTotalMinSize(t){let e=0;for(const i of t)e+=this.calculateContentItemMinSize(i);return e}onSplitterDragStart(t){const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=this.calculateContentItemsTotalMinSize(e.before.contentItems),s=this.calculateContentItemsTotalMinSize(e.after.contentItems);this._splitterPosition=0,this._splitterMinPosition=-1*(i-o),this._splitterMaxPosition=n-s}onSplitterDrag(t,e,i){let n=this._isColumn?i:e;if(null===this._splitterMinPosition||null===this._splitterMaxPosition)throw new K("ROCOSD59226");n=Math.max(n,this._splitterMinPosition),n=Math.min(n,this._splitterMaxPosition),this._splitterPosition=n;const o=zt(n);this._isColumn?t.element.style.top=o:t.element.style.left=o}onSplitterDragStop(t){if(null===this._splitterPosition)throw new K("ROCOSDS66932");{const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=(this._splitterPosition+i)/(i+n),s=e.before.size+e.after.size;e.before.size=o*s,e.after.size=(1-o)*s,t.element.style.top=zt(0),t.element.style.left=zt(0),globalThis.requestAnimationFrame((()=>this.updateSize(!1)))}}}!function(t){t.getElementDimensionSize=function(t,e){return"width"===e?function(t){return t.offsetWidth}(t):function(t){return t.offsetHeight}(t)},t.setElementDimensionSize=function(t,e,i){return"width"===e?Tt(t,i):At(t,i)},t.createElement=function(t,e){const i=t.createElement("div");return i.classList.add("lm_item"),e?i.classList.add("lm_column"):i.classList.add("lm_row"),i}}(Xt||(Xt={}));class Yt extends $t{constructor(t,e,i){super(t,vt.create(e),null,Yt.createElement(document)),this.isGround=!0,this._childElementContainer=this.element,this._containerElement=i;let n=null;for(;;){const t=n?n.previousSibling:this._containerElement.lastChild;if(!(t instanceof Element&&t.classList.contains("lm_content")))break;n=t}this._containerElement.insertBefore(this.element,n)}init(){if(!0!==this.isInitialised){this.updateNodeSize();for(let t=0;t0?this.contentItems[0]:this,n.isComponent)throw new Error("Cannot add item as child to ComponentItem");{const t=this.layoutManager.createAndInitContentItem(i,n);return e=n.addChild(t,e),n===this?-1:e}}loadComponentAsRoot(t){this.clearRoot();const e=Ct.resolve(t,!1);if(e.maximised)throw new Error("Root Component cannot be maximised");{const t=new jt(this.layoutManager,e,this);t.init(),this.addChild(t,0)}}addChild(t,e){if(this.contentItems.length>0)throw new Error("Ground node can only have a single child");return this._childElementContainer.appendChild(t.element),e=super.addChild(t,e),this.updateSize(!1),this.emitBaseBubblingEvent("stateChanged"),e}calculateConfigContent(){const t=this.contentItems,e=t.length,i=new Array(e);for(let n=0;n0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e)),this.updateContentItemsSize(!1))}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}createSideAreas(){const t=Yt.Area.oppositeSides,e=new Array(Object.keys(t).length);let i=0;for(const n in t){const o=n,s=this.getElementArea();if(null===s)throw new K("RCSA77553");s.side=o,"2"===t[o][1]?s[o]=s[t[o]]-50:s[o]=s[t[o]]+50,s.surface=(s.x2-s.x1)*(s.y2-s.y1),e[i++]=s}return e}highlightDropZone(t,e,i){this.layoutManager.tabDropPlaceholder.remove(),super.highlightDropZone(t,e,i)}onDrop(t,e){if(t.isComponent){const e=ut.createDefault(),i=t;e.header=mt.Header.createCopy(i.headerConfig);const n=this.layoutManager.createAndInitContentItem(e,this);n.addChild(t),t=n}if(0===this.contentItems.length)this.addChild(t);else{if(t.type===at.row||t.type===at.column){const e=ut.createDefault(),i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}const i="x"==e.side[0]?at.row:at.column,n="2"==e.side[1],o=this.contentItems[0];if(o instanceof Xt&&o.type===i){const e=o.contentItems[n?0:o.contentItems.length-1];o.addChild(t,n?0:void 0,!0),e.size*=.5,t.size=e.size,t.sizeUnit=ht.Percent,o.updateSize(!1)}else{const e=ct.createDefault(i),s=this.layoutManager.createContentItem(e,this);this.replaceChild(o,s),s.addChild(t,n?0:void 0,!0),s.addChild(o,n?void 0:0,!0),o.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}}dock(){throw new X("GID87731")}validateDocking(){throw new X("GIVD87732")}getAllContentItems(){const t=[this];return this.deepGetAllContentItems(this.contentItems,t),t}getConfigMaximisedItems(){const t=[];return this.deepFilterContentItems(this.contentItems,t,(t=>!(!Gt.isStack(t)||!t.initialWantMaximise)||!(!Gt.isComponentItem(t)||!t.initialWantMaximise))),t}getItemsByPopInParentId(t){const e=[];return this.deepFilterContentItems(this.contentItems,e,(e=>e.popInParentIds.includes(t))),e}toConfig(){throw new Error("Cannot generate GroundItem config")}setActiveComponentItem(t,e,i){}updateNodeSize(){const{width:t,height:e}=kt(this._containerElement);Tt(this.element,t),At(this.element,e),this.contentItems.length>0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e))}deepGetAllContentItems(t,e){for(let i=0;ithis.onClick(t),this._touchStartEventListener=t=>this.onTouchStart(t),this._element=document.createElement("div"),this._element.classList.add(i),this._element.title=e,this._header.on("destroy",(()=>this.destroy())),this._element.addEventListener("click",this._clickEventListener,{passive:!0}),this._element.addEventListener("touchstart",this._touchStartEventListener,{passive:!0}),this._header.controlsContainerElement.appendChild(this._element)}get element(){return this._element}destroy(){var t;this._element.removeEventListener("click",this._clickEventListener),this._element.removeEventListener("touchstart",this._touchStartEventListener),null===(t=this._element.parentNode)||void 0===t||t.removeChild(this._element)}onClick(t){this._pushEvent(t)}onTouchStart(t){this._pushEvent(t)}}class Jt{constructor(t,e,i,n,o){var s;this._layoutManager=t,this._componentItem=e,this._closeEvent=i,this._focusEvent=n,this._dragStartEvent=o,this._isActive=!1,this._tabClickListener=t=>this.onTabClickDown(t),this._tabTouchStartListener=t=>this.onTabTouchStart(t),this._closeClickListener=()=>this.onCloseClick(),this._closeTouchStartListener=()=>this.onCloseTouchStart(),this._dragStartListener=(t,e)=>this.onDragStart(t,e),this._contentItemDestroyListener=()=>this.onContentItemDestroy(),this._tabTitleChangedListener=t=>this.setTitle(t),this._element=document.createElement("div"),this._element.classList.add("lm_tab"),this._titleElement=document.createElement("span"),this._titleElement.classList.add("lm_title"),this._closeElement=document.createElement("div"),this._closeElement.classList.add("lm_close_tab"),this._element.appendChild(this._titleElement),this._element.appendChild(this._closeElement),e.isClosable?this._closeElement.style.display="":this._closeElement.style.display="none",this.setTitle(e.title),this._componentItem.on("titleChanged",this._tabTitleChangedListener);(null!==(s=e.reorderEnabled)&&void 0!==s?s:this._layoutManager.layoutConfig.settings.reorderEnabled)&&this.enableReorder(),this._element.addEventListener("click",this._tabClickListener,{passive:!0}),this._element.addEventListener("touchstart",this._tabTouchStartListener,{passive:!0}),this._componentItem.isClosable?(this._closeElement.addEventListener("click",this._closeClickListener,{passive:!0}),this._closeElement.addEventListener("touchstart",this._closeTouchStartListener,{passive:!0})):(this._closeElement.remove(),this._closeElement=void 0),this._componentItem.setTab(this),this._layoutManager.emit("tabCreated",this)}get isActive(){return this._isActive}get componentItem(){return this._componentItem}get contentItem(){return this._componentItem}get element(){return this._element}get titleElement(){return this._titleElement}get closeElement(){return this._closeElement}get reorderEnabled(){return void 0!==this._dragListener}set reorderEnabled(t){t!==this.reorderEnabled&&(t?this.enableReorder():this.disableReorder())}setTitle(t){this._titleElement.innerText=t,this._element.title=t}setActive(t){t!==this._isActive&&(this._isActive=t,t?this._element.classList.add("lm_active"):this._element.classList.remove("lm_active"))}destroy(){var t,e;this._closeEvent=void 0,this._focusEvent=void 0,this._dragStartEvent=void 0,this._element.removeEventListener("click",this._tabClickListener),this._element.removeEventListener("touchstart",this._tabTouchStartListener),null===(t=this._closeElement)||void 0===t||t.removeEventListener("click",this._closeClickListener),null===(e=this._closeElement)||void 0===e||e.removeEventListener("touchstart",this._closeTouchStartListener),this._componentItem.off("titleChanged",this._tabTitleChangedListener),this.reorderEnabled&&this.disableReorder(),this._element.remove()}setBlurred(){this._element.classList.remove("lm_focused"),this._titleElement.classList.remove("lm_focused")}setFocused(){this._element.classList.add("lm_focused"),this._titleElement.classList.add("lm_focused")}onDragStart(t,e){if(void 0===this._dragListener)throw new J("TODSDLU10093");if(void 0===this._dragStartEvent)throw new J("TODS23309");this._dragStartEvent(t,e,this._dragListener,this.componentItem)}onContentItemDestroy(){void 0!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=void 0)}onTabClickDown(t){const e=t.target;e!==this._element&&e!==this._titleElement||(0===t.button?this.notifyFocus():1===t.button&&this._componentItem.isClosable&&this.notifyClose())}onTabTouchStart(t){t.target===this._element&&this.notifyFocus()}onCloseClick(){this.notifyClose()}onCloseTouchStart(){this.notifyClose()}notifyClose(){if(void 0===this._closeEvent)throw new J("TNC15007");this._closeEvent(this._componentItem)}notifyFocus(){if(void 0===this._focusEvent)throw new J("TNA15007");this._focusEvent(this._componentItem)}enableReorder(){this._dragListener=new Zt(this._element,[this._titleElement]),this._dragListener.on("dragStart",this._dragStartListener),this._componentItem.on("destroy",this._contentItemDestroyListener)}disableReorder(){if(void 0===this._dragListener)throw new J("TDR87745");this._componentItem.off("destroy",this._contentItemDestroyListener),this._dragListener.off("dragStart",this._dragStartListener),this._dragListener=void 0}}class Qt{constructor(t,e,i,n,o){this._layoutManager=t,this._componentRemoveEvent=e,this._componentFocusEvent=i,this._componentDragStartEvent=n,this._dropdownActiveChangedEvent=o,this._tabs=[],this._lastVisibleTabIndex=-1,this._dropdownActive=!1,this._element=document.createElement("section"),this._element.classList.add("lm_tabs"),this._dropdownElement=document.createElement("section"),this._dropdownElement.classList.add("lm_tabdropdown_list"),this._dropdownElement.style.display="none"}get tabs(){return this._tabs}get tabCount(){return this._tabs.length}get lastVisibleTabIndex(){return this._lastVisibleTabIndex}get element(){return this._element}get dropdownElement(){return this._dropdownElement}get dropdownActive(){return this._dropdownActive}destroy(){for(let t=0;tthis.handleTabCloseEvent(t)),(t=>this.handleTabFocusEvent(t)),((t,e,i,n)=>this.handleTabDragStartEvent(t,e,i,n)));void 0===e&&(e=this._tabs.length),this._tabs.splice(e,0,i),ethis._lastVisibleTabIndex){const t=this._tabs[e];for(let t=e;t>0;t--)this._tabs[t]=this._tabs[t-1];this._tabs[0]=t}}updateTabSizes(t,e){let i=!1;this.tryUpdateTabSizes(i,t,e)||(i=!0,this.tryUpdateTabSizes(i,t,e)),i!==this._dropdownActive&&(this._dropdownActive=i,this._dropdownActiveChangedEvent())}tryUpdateTabSizes(t,e,i){if(this._tabs.length>0){if(void 0===i)throw new Error("non-empty tabs must have active component item");let n=0,o=!1;const s=this._layoutManager.layoutConfig.settings.tabOverlapAllowance,r=this._tabs.indexOf(i.tab),a=this._tabs[r];this._lastVisibleTabIndex=-1;for(let i=0;ie){if(o)i===r&&(l.style.zIndex="auto",l.style.marginLeft="",l.parentElement!==this._element&&this._element.appendChild(l));else{let t;if(t=r>0&&r<=i?(d-e)/(i-1):(d-e)/i,tthis.onClick(t),this._touchStartListener=t=>this.onTouchStart(t),this._rowColumnClosable=!0,this._closeButton=null,this._popoutButton=null,this._tabsContainer=new Qt(this._layoutManager,(t=>this.handleTabInitiatedComponentRemoveEvent(t)),(t=>this.handleTabInitiatedComponentFocusEvent(t)),((t,e,i,n)=>this.handleTabInitiatedDragStartEvent(t,e,i,n)),(()=>this.processTabDropdownActiveChanged())),this._show=i.show,this._popoutEnabled=i.popoutEnabled,this._popoutLabel=i.popoutLabel,this._maximiseEnabled=i.maximiseEnabled,this._maximiseLabel=i.maximiseLabel,this._minimiseEnabled=i.minimiseEnabled,this._minimiseLabel=i.minimiseLabel,this._closeEnabled=i.closeEnabled,this._closeLabel=i.closeLabel,this._tabDropdownEnabled=i.tabDropdownEnabled,this._tabDropdownLabel=i.tabDropdownLabel,this.setSide(i.side),this._canRemoveComponent=this._configClosable,this._element=document.createElement("section"),this._element.classList.add("lm_header"),this._controlsContainerElement=document.createElement("section"),this._controlsContainerElement.classList.add("lm_controls"),this._element.appendChild(this._tabsContainer.element),this._element.appendChild(this._controlsContainerElement),this._element.appendChild(this._tabsContainer.dropdownElement),this._element.addEventListener("click",this._clickListener,{passive:!0}),this._element.addEventListener("touchstart",this._touchStartListener,{passive:!0}),this._documentMouseUpListener=()=>this._tabsContainer.hideAdditionalTabsDropdown(),globalThis.document.addEventListener("mouseup",this._documentMouseUpListener,{passive:!0}),this._tabControlOffset=this._layoutManager.layoutConfig.settings.tabControlOffset,this._tabDropdownEnabled&&(this._tabDropdownButton=new Kt(this,this._tabDropdownLabel,"lm_tabdropdown",(()=>this._tabsContainer.showAdditionalTabsDropdown()))),this._popoutEnabled&&(this._popoutButton=new Kt(this,this._popoutLabel,"lm_popout",(()=>this.handleButtonPopoutEvent()))),this._maximiseEnabled&&(this._maximiseButton=new Kt(this,this._maximiseLabel,"lm_maximise",(t=>this.handleButtonMaximiseToggleEvent(t)))),this._configClosable&&(this._closeButton=new Kt(this,this._closeLabel,"lm_close",(()=>s()))),this.processTabDropdownActiveChanged()}get show(){return this._show}get side(){return this._side}get leftRightSided(){return this._leftRightSided}get layoutManager(){return this._layoutManager}get parent(){return this._parent}get tabs(){return this._tabsContainer.tabs}get lastVisibleTabIndex(){return this._tabsContainer.lastVisibleTabIndex}get element(){return this._element}get tabsContainerElement(){return this._tabsContainer.element}get controlsContainerElement(){return this._controlsContainerElement}destroy(){this.emit("destroy"),this._popoutEvent=void 0,this._maximiseToggleEvent=void 0,this._clickEvent=void 0,this._touchStartEvent=void 0,this._componentRemoveEvent=void 0,this._componentFocusEvent=void 0,this._componentDragStartEvent=void 0,this._tabsContainer.destroy(),globalThis.document.removeEventListener("mouseup",this._documentMouseUpListener),this._element.remove()}createTab(t,e){this._tabsContainer.createTab(t,e)}removeTab(t){this._tabsContainer.removeTab(t)}processActiveComponentChanged(t){this._tabsContainer.processActiveComponentChanged(t),this.updateTabSizes()}setSide(t){this._side=t,this._leftRightSided=[nt.right,nt.left].includes(this._side)}setRowColumnClosable(t){this._rowColumnClosable=t,this.updateClosability()}updateClosability(){let t;if(this._configClosable)if(this._rowColumnClosable){t=!0;const e=this.tabs.length;for(let i=0;i1}applyFocusedValue(t){t?this._element.classList.add("lm_focused"):this._element.classList.remove("lm_focused")}processMaximised(){if(void 0===this._maximiseButton)throw new J("HPMAX16997");this._maximiseButton.element.setAttribute("title",this._minimiseLabel)}processMinimised(){if(void 0===this._maximiseButton)throw new J("HPMIN16997");this._maximiseButton.element.setAttribute("title",this._maximiseLabel)}updateTabSizes(){if(this._tabsContainer.tabCount>0){const t=this._show?this._layoutManager.layoutConfig.dimensions.headerHeight:0;let e;this._leftRightSided?(this._element.style.height="",this._element.style.width=zt(t)):(this._element.style.width="",this._element.style.height=zt(t)),e=this._leftRightSided?this._element.offsetHeight-this._controlsContainerElement.offsetHeight-this._tabControlOffset:this._element.offsetWidth-this._controlsContainerElement.offsetWidth-this._tabControlOffset,this._tabsContainer.updateTabSizes(e,this._getActiveComponentItemEvent())}}handleTabInitiatedComponentRemoveEvent(t){if(this._canRemoveComponent){if(void 0===this._componentRemoveEvent)throw new J("HHTCE22294");this._componentRemoveEvent(t)}}handleTabInitiatedComponentFocusEvent(t){if(void 0===this._componentFocusEvent)throw new J("HHTAE22294");this._componentFocusEvent(t)}handleTabInitiatedDragStartEvent(t,e,i,n){if(this._canRemoveComponent){if(void 0===this._componentDragStartEvent)throw new J("HHTDSE22294");this._componentDragStartEvent(t,e,i,n)}else i.cancelDrag()}processTabDropdownActiveChanged(){void 0!==this._tabDropdownButton&&Dt(this._tabDropdownButton.element,this._tabsContainer.dropdownActive)}handleButtonPopoutEvent(){if(this._layoutManager.layoutConfig.settings.popoutWholeStack){if(void 0===this._popoutEvent)throw new J("HHBPOE17834");this._popoutEvent()}else{const t=this._getActiveComponentItemEvent();t&&t.popout()}}handleButtonMaximiseToggleEvent(t){if(void 0===this._maximiseToggleEvent)throw new J("HHBMTE16834");this._maximiseToggleEvent()}onClick(t){t.target===this._element&&this.notifyClick(t)}onTouchStart(t){t.target===this._element&&this.notifyTouchStart(t)}notifyClick(t){if(void 0===this._clickEvent)throw new J("HNHC46834");this._clickEvent(t)}notifyTouchStart(t){if(void 0===this._touchStartEvent)throw new J("HNHTS46834");this._touchStartEvent(t)}}class ee extends $t{constructor(t,e,i){var n,o,s,r,a,l,h,d,c,m,u,p,g,f,v,_,y,C,w;super(t,e,i,ee.createElement(document)),this._headerSideChanged=!1,this._resizeListener=()=>this.handleResize(),this._maximisedListener=()=>this.handleMaximised(),this._minimisedListener=()=>this.handleMinimised(),this._headerConfig=e.header;const I=t.layoutConfig.header,b=e.content;let S;if(1!==b.length)S=void 0;else{S=b[0].header}this._initialWantMaximise=e.maximised,this._initialActiveItemIndex=null!==(n=e.activeItemIndex)&&void 0!==n?n:0;const E=null!==(r=null!==(s=null===(o=this._headerConfig)||void 0===o?void 0:o.show)&&void 0!==s?s:null==S?void 0:S.show)&&void 0!==r?r:I.show,x=null!==(h=null!==(l=null===(a=this._headerConfig)||void 0===a?void 0:a.popout)&&void 0!==l?l:null==S?void 0:S.popout)&&void 0!==h?h:I.popout,L=null!==(m=null!==(c=null===(d=this._headerConfig)||void 0===d?void 0:d.maximise)&&void 0!==c?c:null==S?void 0:S.maximise)&&void 0!==m?m:I.maximise,z=null!==(g=null!==(p=null===(u=this._headerConfig)||void 0===u?void 0:u.close)&&void 0!==p?p:null==S?void 0:S.close)&&void 0!==g?g:I.close,M=null!==(_=null!==(v=null===(f=this._headerConfig)||void 0===f?void 0:f.minimise)&&void 0!==v?v:null==S?void 0:S.minimise)&&void 0!==_?_:I.minimise,P=null!==(w=null!==(C=null===(y=this._headerConfig)||void 0===y?void 0:y.tabDropdown)&&void 0!==C?C:null==S?void 0:S.tabDropdown)&&void 0!==w?w:I.tabDropdown;this._maximisedEnabled=!1!==L;const T={show:!1!==E,side:!1===E?nt.top:E,popoutEnabled:!1!==x,popoutLabel:!1===x?"":x,maximiseEnabled:this._maximisedEnabled,maximiseLabel:!1===L?"":L,closeEnabled:!1!==z,closeLabel:!1===z?"":z,minimiseEnabled:!0,minimiseLabel:M,tabDropdownEnabled:!1!==P,tabDropdownLabel:!1===P?"":P};this._header=new te(t,this,T,e.isClosable&&!1!==z,(()=>this.getActiveComponentItem()),(()=>this.remove()),(()=>this.handlePopoutEvent()),(()=>this.toggleMaximise()),(t=>this.handleHeaderClickEvent(t)),(t=>this.handleHeaderTouchStartEvent(t)),(t=>this.handleHeaderComponentRemoveEvent(t)),(t=>this.handleHeaderComponentFocusEvent(t)),((t,e,i,n)=>this.handleHeaderComponentStartDragEvent(t,e,i,n))),this.isStack=!0,this._childElementContainer=document.createElement("section"),this._childElementContainer.classList.add("lm_items"),this.on("resize",this._resizeListener),this._maximisedEnabled&&(this.on("maximised",this._maximisedListener),this.on("minimised",this._minimisedListener)),this.element.appendChild(this._header.element),this.element.appendChild(this._childElementContainer),this.setupHeaderPosition(),this._header.updateClosability()}get childElementContainer(){return this._childElementContainer}get header(){return this._header}get headerShow(){return this._header.show}get headerSide(){return this._header.side}get headerLeftRightSided(){return this._header.leftRightSided}get contentAreaDimensions(){return this._contentAreaDimensions}get initialWantMaximise(){return this._initialWantMaximise}get isMaximised(){return this===this.layoutManager.maximisedStack}get stackParent(){if(!this.parent)throw new Error("Stack should always have a parent");return this.parent}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}init(){if(!0===this.isInitialised)return;this.updateNodeSize();for(let t=0;t0){if(this._initialActiveItemIndex<0||this._initialActiveItemIndex>=e)throw new Error(`ActiveItemIndex out of range: ${this._initialActiveItemIndex} id: ${this.id}`);for(let i=0;ithis.contentItems.length)throw e-=1,new X("SAC99728");if(t instanceof jt)return e=super.addChild(t,e),this._childElementContainer.appendChild(t.element),this._header.createTab(t,e),this.setActiveComponentItem(t,i),this._header.updateTabSizes(),this.updateSize(!1),t.container.setBaseLogicalZIndex(),this._header.updateClosability(),this.emitStateChangedEvent(),e;throw new X("SACC88532")}removeChild(t,e){const i=t,n=this.contentItems.indexOf(i),o=1===this.contentItems.length;if(this._activeComponentItem===i&&(i.focused&&i.blur(),!o)){const t=0===n?1:n-1;this.setActiveComponentItem(this.contentItems[t],!1)}this._header.removeTab(i),super.removeChild(i,e),o||this._header.updateClosability(),this.emitStateChangedEvent()}toggleMaximise(){this.isMaximised?this.minimise():this.maximise()}maximise(){if(!this.isMaximised){this.layoutManager.setMaximisedStack(this);const t=this.contentItems,e=t.length;for(let i=0;i0&&void 0===t)throw new Error("expected non-empty stack to have an active component item");return{type:"stack",content:this.calculateConfigContent(),size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,isClosable:this.isClosable,maximised:this.isMaximised,header:this.createHeaderConfig(),activeItemIndex:t}}onDrop(t,e){if("header"===this._dropSegment){if(this.resetHeaderDropZone(),void 0===this._dropIndex)throw new J("SODDI68990");return void this.addChild(t,this._dropIndex)}if("body"===this._dropSegment)return void this.addChild(t,0,!0);const i="top"===this._dropSegment||"bottom"===this._dropSegment,n="left"===this._dropSegment||"right"===this._dropSegment,o="top"===this._dropSegment||"left"===this._dropSegment,s=i&&this.stackParent.isColumn||n&&this.stackParent.isRow;if(t.isComponent){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createAndInitContentItem(e,this);i.addChild(t),t=i}if(t.type===at.row||t.type===at.column){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}if(s){const e=this.stackParent.contentItems.indexOf(this);this.stackParent.addChild(t,o?e:e+1,!0),this.size*=.5,t.size=this.size,t.sizeUnit=this.sizeUnit,this.stackParent.updateSize(!1)}else{const e=i?at.column:at.row,n=ct.createDefault(e),s=this.layoutManager.createContentItem(n,this);this.stackParent.replaceChild(this,s),s.addChild(t,o?0:void 0,!0),s.addChild(this,o?void 0:0,!0),this.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}highlightDropZone(t,e){for(const i in this._contentAreaDimensions){const n=i,o=this._contentAreaDimensions[n].hoverArea;if(o.x1t&&o.y1e)return void("header"===n?(this._dropSegment="header",this.highlightHeaderDropZone(this._header.leftRightSided?e:t)):(this.resetHeaderDropZone(),this.highlightBodyDropZone(n)))}}getArea(){if("none"===this.element.style.display)return null;const t=super.getElementArea(this._header.element),e=super.getElementArea(this._childElementContainer);if(null===t||null===e)throw new K("SGAHC13086");const i=e.x2-e.x1,n=e.y2-e.y1;return this._contentAreaDimensions={header:{hoverArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2},highlightArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2}}},0===this.contentItems.length?(this._contentAreaDimensions.body={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2}},super.getElementArea(this.element)):(this._contentAreaDimensions.left={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x1+.25*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x1+.5*i,y2:e.y2}},this._contentAreaDimensions.top={hoverArea:{x1:e.x1+.25*i,y1:e.y1,x2:e.x1+.75*i,y2:e.y1+.5*n},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y1+.5*n}},this._contentAreaDimensions.right={hoverArea:{x1:e.x1+.75*i,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1+.5*i,y1:e.y1,x2:e.x2,y2:e.y2}},this._contentAreaDimensions.bottom={hoverArea:{x1:e.x1+.25*i,y1:e.y1+.5*n,x2:e.x1+.75*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1+.5*n,x2:e.x2,y2:e.y2}},super.getElementArea(this.element))}positionHeader(t){this._header.side!==t&&(this._header.setSide(t),this._headerSideChanged=!0,this.setupHeaderPosition())}updateNodeSize(){if("none"!==this.element.style.display){const t=kt(this.element);if(this._header.show){t[this._header.leftRightSided?it.width:it.height]-=this.layoutManager.layoutConfig.dimensions.headerHeight}this._childElementContainer.style.width=zt(t.width),this._childElementContainer.style.height=zt(t.height);for(let e=0;e=o&&tthis.onDrag(t,e,i))),this._dragListener.on("dragStop",(()=>this.onDrop())),this.createDragProxyElements(t,e),null===this._componentItem.parent)throw new K("DPC10097");this._componentItemFocused=this._componentItem.focused,this._componentItemFocused&&this._componentItem.blur(),this._componentItem.parent.removeChild(this._componentItem,!0),this.setDimensions(),document.body.appendChild(this._element),this.determineMinMaxXY(),this._layoutManager.calculateItemAreas(),this.setDropPosition(t,e)}get element(){return this._element}createDragProxyElements(t,e){this._element=document.createElement("div"),this._element.classList.add("lm_dragProxy");const i=document.createElement("div");i.classList.add("lm_header");const n=document.createElement("div");n.classList.add("lm_tabs");const o=document.createElement("div");o.classList.add("lm_tab");const s=document.createElement("span");s.classList.add("lm_title"),o.appendChild(s),n.appendChild(o),i.appendChild(n),this._proxyContainerElement=document.createElement("div"),this._proxyContainerElement.classList.add("lm_content"),this._element.appendChild(i),this._element.appendChild(this._proxyContainerElement),this._originalParent instanceof ee&&this._originalParent.headerShow&&(this._sided=this._originalParent.headerLeftRightSided,this._element.classList.add("lm_"+this._originalParent.headerSide),[nt.right,nt.bottom].indexOf(this._originalParent.headerSide)>=0&&this._proxyContainerElement.insertAdjacentElement("afterend",i)),this._element.style.left=zt(t),this._element.style.top=zt(e),o.setAttribute("title",this._componentItem.title),s.insertAdjacentText("afterbegin",this._componentItem.title),this._proxyContainerElement.appendChild(this._componentItem.element)}determineMinMaxXY(){const t=this._layoutManager.groundItem;if(void 0===t)throw new J("DPDMMXY73109");{const e=t.element.getBoundingClientRect();this._minX=e.left+document.body.scrollLeft,this._minY=e.top+document.body.scrollTop,this._maxX=this._minX+e.width,this._maxY=this._minY+e.height}}onDrag(t,e,i){const n=i.pageX,o=i.pageY;this.setDropPosition(n,o),this._componentItem.drag()}setDropPosition(t,e){this._layoutManager.layoutConfig.settings.constrainDragToContainer&&(t<=this._minX?t=Math.ceil(this._minX):t>=this._maxX&&(t=Math.floor(this._maxX)),e<=this._minY?e=Math.ceil(this._minY):e>=this._maxY&&(e=Math.floor(this._maxY))),this._element.style.left=zt(t),this._element.style.top=zt(e),this._area=this._layoutManager.getArea(t,e),null!==this._area&&(this._lastValidArea=this._area,this._area.contentItem.highlightDropZone(t,e,this._area))}onDrop(){const t=this._layoutManager.dropTargetIndicator;if(null===t)throw new K("DPOD30011");let e;if(t.hide(),this._componentItem.exitDragMode(),null!==this._area)e=this._componentItem,this._area.contentItem.onDrop(e,this._area);else if(null!==this._lastValidArea){e=this._componentItem;this._lastValidArea.contentItem.onDrop(e,this._lastValidArea)}else this._originalParent?(e=this._componentItem,this._originalParent.addChild(e)):this._componentItem.destroy();this._element.remove(),this._layoutManager.emit("itemDropped",this._componentItem),this._componentItemFocused&&void 0!==e&&e.focus()}setDimensions(){const t=this._layoutManager.layoutConfig.dimensions;if(void 0===t)throw new Error("DragProxy.setDimensions: dimensions undefined");let e=t.dragProxyWidth,i=t.dragProxyHeight;if(void 0===e||void 0===i)throw new Error("DragProxy.setDimensions: width and/or height undefined");const n=!1===this._layoutManager.layoutConfig.header.show?0:t.headerHeight;this._element.style.width=zt(e),this._element.style.height=zt(i),e-=this._sided?n:0,i-=this._sided?0:n,this._proxyContainerElement.style.width=zt(e),this._proxyContainerElement.style.height=zt(i),this._componentItem.enterDragMode(e,i),this._componentItem.show()}}class ne{constructor(t,e,i,n,o,s,r){this._layoutManager=t,this._element=e,this._extraAllowableChildTargets=i,this._componentTypeOrFtn=n,this._componentState=o,this._title=s,this._id=r,this._dragListener=null,this._dummyGroundContainer=document.createElement("div");const a=gt.createDefault("row");this._dummyGroundContentItem=new Yt(this._layoutManager,a,this._dummyGroundContainer),this.createDragListener()}destroy(){this.removeDragListener()}createDragListener(){this.removeDragListener(),this._dragListener=new Zt(this._element,this._extraAllowableChildTargets),this._dragListener.on("dragStart",((t,e)=>this.onDragStart(t,e))),this._dragListener.on("dragStop",(()=>this.onDragStop()))}onDragStart(t,e){var i;const n="component";let o;if("function"==typeof this._componentTypeOrFtn){const t=this._componentTypeOrFtn();o=ne.isDragSourceComponentItemConfig(t)?{type:n,componentState:t.state,componentType:t.type,title:null!==(i=t.title)&&void 0!==i?i:this._title}:t}else o={type:n,componentState:this._componentState,componentType:this._componentTypeOrFtn,title:this._title,id:this._id};const s=bt.resolve(o,!1),r=new jt(this._layoutManager,s,this._dummyGroundContentItem);if(this._dummyGroundContentItem.contentItems.push(r),null===this._dragListener)throw new K("DSODSD66746");{const i=new ie(t,e,this._dragListener,this._layoutManager,r,this._dummyGroundContentItem),n=this._layoutManager.transitionIndicator;if(null===n)throw new K("DSODST66746");n.transitionElements(this._element,i.element)}}onDragStop(){this.createDragListener()}removeDragListener(){null!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=null)}}!function(t){t.isDragSourceComponentItemConfig=function(t){return!("componentType"in t)}}(ne||(ne={}));class oe{constructor(){this._element=document.createElement("div"),this._element.classList.add("lm_dropTargetIndicator");const t=document.createElement("div");t.classList.add("lm_inner"),this._element.appendChild(t),document.body.appendChild(this._element)}destroy(){this._element.remove()}highlightArea(t,e){this._element.style.left=zt(t.x1+e),this._element.style.top=zt(t.y1+e),this._element.style.width=zt(t.x2-t.x1-e),this._element.style.height=zt(t.y2-t.y1-e),this._element.style.display="block"}hide(){Dt(this._element,!1)}}class se{constructor(){this._element=document.createElement("div"),this._element.classList.add("lm_transition_indicator"),document.body.appendChild(this._element),this._toElement=null,this._fromDimensions=null,this._totalAnimationDuration=200,this._animationStartTime=null}destroy(){this._element.remove()}transitionElements(t,e){}nextAnimationFrame(){}measure(t){const e=t.getBoundingClientRect();return{left:e.left,top:e.top,width:t.offsetWidth,height:t.offsetHeight}}}class re extends Wt{constructor(t){super(),this._layoutManager=t,this._childEventListener=t=>this.onEventFromChild(t),globalThis.addEventListener(re.ChildEventName,this._childEventListener,{passive:!0})}emit(t,...e){"userBroadcast"===t?this.emitUserBroadcast(...e):super.emit(t,...e)}emitUserBroadcast(...t){this.handleUserBroadcastEvent("userBroadcast",t)}destroy(){globalThis.removeEventListener(re.ChildEventName,this._childEventListener)}handleUserBroadcastEvent(t,e){this._layoutManager.isSubWindow?this.propagateToParent(t,e):this.propagateToThisAndSubtree(t,e)}onEventFromChild(t){const e=t.detail;this.handleUserBroadcastEvent(e.eventName,e.args)}propagateToParent(t,e){const i={bubbles:!0,cancelable:!0,detail:{layoutManager:this._layoutManager,eventName:t,args:e}},n=new CustomEvent(re.ChildEventName,i),o=globalThis.opener;if(null===o)throw new K("EHPTP15778");o.dispatchEvent(n)}propagateToThisAndSubtree(t,e){this.emitUnknown(t,...e);for(let i=0;ithis.handleContainerResize())),this._windowBeforeUnloadListener=()=>this.onBeforeUnload(),this._windowBeforeUnloadListening=!1,this._maximisedStackBeforeDestroyedListener=t=>this.cleanupBeforeMaximisedStackDestroyed(t),this.isSubWindow=t.isSubWindow,this._constructorOrSubWindowLayoutConfig=t.constructorOrSubWindowLayoutConfig,Q.checkInitialise(),dt.checkInitialise(),void 0!==t.containerElement&&(this._containerElement=t.containerElement)}get container(){return this._containerElement}get isInitialised(){return this._isInitialised}get groundItem(){return this._groundItem}get root(){return this._groundItem}get openPopouts(){return this._openPopouts}get dropTargetIndicator(){return this._dropTargetIndicator}get transitionIndicator(){return this._transitionIndicator}get width(){return this._width}get height(){return this._height}get eventHub(){return this._eventHub}get rootItem(){if(void 0===this._groundItem)throw new Error("Cannot access rootItem before init");return 0===this._groundItem.contentItems.length?void 0:this._groundItem.contentItems[0]}get focusedComponentItem(){return this._focusedComponentItem}get tabDropPlaceholder(){return this._tabDropPlaceholder}get maximisedStack(){return this._maximisedStack}get deprecatedConstructor(){return!this.isSubWindow&&void 0!==this._constructorOrSubWindowLayoutConfig}destroy(){if(this._isInitialised){this._windowBeforeUnloadListening&&(globalThis.removeEventListener("beforeunload",this._windowBeforeUnloadListener),this._windowBeforeUnloadListening=!1),!0===this.layoutConfig.settings.closePopoutsOnUnload&&this.closeAllOpenPopouts(),this._resizeObserver.disconnect(),this.checkClearResizeTimeout(),void 0!==this._groundItem&&this._groundItem.destroy(),this._tabDropPlaceholder.remove(),null!==this._dropTargetIndicator&&this._dropTargetIndicator.destroy(),null!==this._transitionIndicator&&this._transitionIndicator.destroy(),this._eventHub.destroy();for(const t of this._dragSources)t.destroy();this._dragSources=[],this._isInitialised=!1}}minifyConfig(t){return _t.minifyConfig(t)}unminifyConfig(t){return _t.unminifyConfig(t)}init(){let t;if(this.setContainer(),this._dropTargetIndicator=new oe,this._transitionIndicator=new se,this.updateSizeFromContainer(),this.isSubWindow){if(void 0===this._constructorOrSubWindowLayoutConfig)throw new J("LMIU07155");{const e=this._constructorOrSubWindowLayoutConfig.root;if(void 0===e)throw new X("LMIC07156");if(!Ct.isComponent(e))throw new X("LMIC07157");t=e;const i=xt.resolve(this._constructorOrSubWindowLayoutConfig);this.layoutConfig=Object.assign(Object.assign({},i),{root:void 0})}}else void 0===this._constructorOrSubWindowLayoutConfig?this.layoutConfig=_t.createDefault():this.layoutConfig=xt.resolve(this._constructorOrSubWindowLayoutConfig);const e=this.layoutConfig;this._groundItem=new Yt(this,e.root,this._containerElement),this._groundItem.init(),this.checkLoadedLayoutMaximiseItem(),this._resizeObserver.observe(this._containerElement),this._isInitialised=!0,this.adjustColumnsResponsive(),this.emit("initialised"),void 0!==t&&this.loadComponentAsRoot(t)}loadLayout(t){if(!this.isInitialised)throw new Error("GoldenLayout: Need to call init() if LayoutConfig with defined root passed to constructor");if(void 0===this._groundItem)throw new J("LMLL11119");this.createSubWindows(),this.layoutConfig=xt.resolve(t),this._groundItem.loadRoot(this.layoutConfig.root),this.checkLoadedLayoutMaximiseItem(),this.adjustColumnsResponsive()}saveLayout(){if(!1===this._isInitialised)throw new Error("Can't create config, layout not yet initialised");if(void 0===this._groundItem)throw new J("LMTC18244");{const t=this._groundItem.calculateConfigContent();let e;e=1!==t.length?void 0:t[0],this.reconcilePopoutWindows();const i=[];for(let t=0;t=0?n=this._groundItem.contentItems[0]:e=0;break;case at.row:case at.column:e=n.addItem(t,i.index);break;case at.stack:if(Ct.isComponent(t)){e=n.addItem(t,i.index);break}throw Error(tt[6]);case at.component:throw new X("LMAIALC87444602");default:throw new Y("LMAIALU98881733",n.type)}if(Ct.isComponent(t)){const t=n.contentItems[e];Gt.isStack(t)&&(n=t,e=0)}return i.parentItem=n,i.index=e,i}}}loadComponentAsRoot(t){if(void 0===this._groundItem)throw new Error("Cannot add item before init");this._groundItem.loadComponentAsRoot(t)}updateSize(t,e){this.setSize(t,e)}setSize(t,e){if(this._width=t,this._height=e,!0===this._isInitialised){if(void 0===this._groundItem)throw new J("LMUS18881");if(this._groundItem.setSize(this._width,this._height),this._maximisedStack){const{width:t,height:e}=kt(this._containerElement);Tt(this._maximisedStack.element,t),At(this._maximisedStack.element,e),this._maximisedStack.updateSize(!1)}this.adjustColumnsResponsive()}}beginSizeInvalidation(){this._sizeInvalidationBeginCount++}endSizeInvalidation(){0==--this._sizeInvalidationBeginCount&&this.updateSizeFromContainer()}updateSizeFromContainer(){const{width:t,height:e}=kt(this._containerElement);this.setSize(t,e)}updateRootSize(t=!1){if(void 0===this._groundItem)throw new J("LMURS28881");this._groundItem.updateSize(t)}createAndInitContentItem(t,e){const i=this.createContentItem(t,e);return i.init(),i}createContentItem(t,e){if("string"!=typeof t.type)throw new G("Missing parameter 'type'",JSON.stringify(t));if(ct.isComponentItem(t)&&!(e instanceof ee)&&e&&!(!0===this.isSubWindow&&e instanceof Yt)){t={type:at.stack,content:[t],size:t.size,sizeUnit:t.sizeUnit,minSize:t.minSize,minSizeUnit:t.minSizeUnit,id:t.id,maximised:t.maximised,isClosable:t.isClosable,activeItemIndex:0,header:void 0}}return this.createContentItemFromConfig(t,e)}findFirstComponentItemById(t){if(void 0===this._groundItem)throw new J("LMFFCIBI82446");return this.findFirstContentItemTypeByIdRecursive(at.component,t,this._groundItem)}createPopout(t,e,i,n){return t instanceof Gt?this.createPopoutFromContentItem(t,e,i,n):this.createPopoutFromItemConfig(t,e,i,n)}createPopoutFromContentItem(t,e,i,n){let o=t.parent,s=t;for(;null!==o&&1===o.contentItems.length&&!o.isGround;)s=o,o=o.parent;if(null===o)throw new K("LMCPFCI00834");{if(void 0===n&&(n=o.contentItems.indexOf(s)),null!==i&&o.addPopInParentId(i),void 0===e){const i=globalThis.screenX||globalThis.screenLeft,n=globalThis.screenY||globalThis.screenTop,o=t.element.offsetLeft,s=t.element.offsetTop,{width:r,height:a}=kt(t.element);e={left:i+o,top:n+s,width:r,height:a}}const r=t.toConfig();if(t.remove(),ft.isRootItemConfig(r))return this.createPopoutFromItemConfig(r,e,i,n);throw new Error(`${tt[0]}`)}}beginVirtualSizedContainerAdding(){0==++this._virtualSizedContainerAddingBeginCount&&(this._virtualSizedContainers.length=0)}addVirtualSizedContainer(t){this._virtualSizedContainers.push(t)}endVirtualSizedContainerAdding(){if(0==--this._virtualSizedContainerAddingBeginCount){const t=this._virtualSizedContainers.length;if(t>0){this.fireBeforeVirtualRectingEvent(t);for(let e=0;ethis.emit("windowOpened",a))),a.on("closed",(()=>this.reconcilePopoutWindows())),this._openPopouts.push(a),this.layoutConfig.settings.closePopoutsOnUnload&&!this._windowBeforeUnloadListening&&(globalThis.addEventListener("beforeunload",this._windowBeforeUnloadListener,{passive:!0}),this._windowBeforeUnloadListening=!0),a}closeAllOpenPopouts(){for(let t=0;tglobalThis.close()),1)}getArea(t,e){let i=null,n=1/0;for(let o=0;o=s.x1&&t=s.y1&&es.surface&&(n=s.surface,i=s)}return i}calculateItemAreas(){const t=this.getAllContentItems(),e=this._groundItem;if(void 0===e)throw new J("LMCIAR44365");if(1!==t.length){e.contentItems[0].isStack?this._itemAreas=[]:this._itemAreas=e.createSideAreas();for(let e=0;e0){let e=t[0];if(Gt.isComponentItem(e)){const t=e.parent;if(null===t)throw new K("LMXLLMI69999");e=t}if(!Gt.isStack(e))throw new X("LMCLLMI19993");e.maximise()}}}processMaximiseStack(t){if(this._maximisedStack=t,t.on("beforeItemDestroyed",this._maximisedStackBeforeDestroyedListener),t.element.classList.add("lm_maximised"),t.element.insertAdjacentElement("afterend",this._maximisePlaceholder),void 0===this._groundItem)throw new J("LMMXI19993");{this._groundItem.element.prepend(t.element);const{width:e,height:i}=kt(this._containerElement);Tt(t.element,e),At(t.element,i),t.updateSize(!0),t.focusActiveContentItem(),this._maximisedStack.emit("maximised"),this.emit("stateChanged")}}processMinimiseMaximisedStack(){if(void 0===this._maximisedStack)throw new X("LMMMS74422");{const t=this._maximisedStack;if(null===t.parent)throw new K("LMMI13668");t.element.classList.remove("lm_maximised"),this._maximisePlaceholder.insertAdjacentElement("afterend",t.element),this._maximisePlaceholder.remove(),this.updateRootSize(!0),this._maximisedStack=void 0,t.off("beforeItemDestroyed",this._maximisedStackBeforeDestroyedListener),t.emit("minimised"),this.emit("stateChanged")}}reconcilePopoutWindows(){const t=[];for(let e=0;e{this._resizeTimeoutId=void 0,this.beginSizeInvalidation(),this.endSizeInvalidation()}),this.resizeDebounceInterval))}checkClearResizeTimeout(){void 0!==this._resizeTimeoutId&&(clearTimeout(this._resizeTimeoutId),this._resizeTimeoutId=void 0)}setContainer(){var t;const e=document.body,i=null!==(t=this._containerElement)&&void 0!==t?t:e;if(i===e){this.resizeWithContainerAutomatically=!0;const t=document.documentElement;t.style.height="100%",t.style.margin="0",t.style.padding="0",t.style.overflow="clip",e.style.height="100%",e.style.margin="0",e.style.padding="0",e.style.overflow="clip"}this._containerElement=i}onBeforeUnload(){this.destroy()}adjustColumnsResponsive(){if(void 0===this._groundItem)throw new J("LMACR20883");if(this._firstLoad=!1,this.useResponsiveLayout()&&!this._updatingColumnsResponsive&&this._groundItem.contentItems.length>0&&this._groundItem.contentItems[0].isRow){if(void 0===this._groundItem||null===this._width)throw new J("LMACR77412");{const t=this._groundItem.contentItems[0].contentItems.length;if(t<=1)return;{const e=this.layoutConfig.dimensions.defaultMinItemWidth;if(t*e<=this._width)return;{this._updatingColumnsResponsive=!0;const i=t-Math.max(Math.floor(this._width/e),1),n=this._groundItem.contentItems[0],o=this.getAllStacks();if(0===o.length)throw new X("LMACRS77413");{const t=o[0];for(let e=0;en?void 0:{parentItem:t,index:o}}}case 1:if(void 0===this._focusedComponentItem)return;{const t=this._focusedComponentItem.parentItem;return this.tryCreateLocationFromParentItem(t,e)}case 2:{const t=this.findFirstContentItemType(at.stack);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 3:{let t=this.findFirstContentItemType(at.row);return void 0!==t?this.tryCreateLocationFromParentItem(t,e):(t=this.findFirstContentItemType(at.column),void 0!==t?this.tryCreateLocationFromParentItem(t,e):void 0)}case 4:{const t=this.findFirstContentItemType(at.row);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 5:{const t=this.findFirstContentItemType(at.column);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 6:if(void 0===this._groundItem)throw new J("LMFLRIF18244");return void 0!==this.rootItem?void 0:void 0===e||0===e?{parentItem:this._groundItem,index:0}:void 0;case 7:if(void 0===this._groundItem)throw new J("LMFLF18244");{const t=this._groundItem.contentItems;if(0===t.length)return void 0===e||0===e?{parentItem:this._groundItem,index:0}:void 0;{const i=t[0];return this.tryCreateLocationFromParentItem(i,e)}}}}tryCreateLocationFromParentItem(t,e){const i=t.contentItems.length;return void 0===e?{parentItem:t,index:i}:e<0||e>i?void 0:{parentItem:t,index:e}}}!function(t){t.createMaximisePlaceElement=function(t){const e=t.createElement("div");return e.classList.add("lm_maximise_place"),e},t.createTabDropPlaceholderElement=function(t){const e=t.createElement("div");return e.classList.add("lm_drop_tab_placeholder"),e},t.defaultLocationSelectors=[{typeId:1,index:void 0},{typeId:2,index:void 0},{typeId:3,index:void 0},{typeId:7,index:void 0}],t.afterFocusedItemIfPossibleLocationSelectors=[{typeId:0,index:1},{typeId:2,index:void 0},{typeId:3,index:void 0},{typeId:7,index:void 0}]}(ae||(ae={}));class le extends ae{constructor(t,e,i,n){if(super(le.createLayoutManagerConstructorParameters(t,e)),this._bindComponentEventHanlderPassedInConstructor=!1,this._creationTimeoutPassed=!1,void 0!==e&&"function"==typeof e&&(this.bindComponentEvent=e,this._bindComponentEventHanlderPassedInConstructor=!0,void 0!==i&&(this.unbindComponentEvent=i)),!this._bindComponentEventHanlderPassedInConstructor&&this.isSubWindow){if(void 0===this._constructorOrSubWindowLayoutConfig)throw new J("VLC98823");{const t=xt.resolve(this._constructorOrSubWindowLayoutConfig);this.layoutConfig=Object.assign(Object.assign({},t),{root:void 0})}}!0!==n&&(this.deprecatedConstructor||this.init())}destroy(){this.bindComponentEvent=void 0,this.unbindComponentEvent=void 0,super.destroy()}init(){if(this._bindComponentEventHanlderPassedInConstructor||"loading"!==document.readyState&&null!==document.body){if(!this._bindComponentEventHanlderPassedInConstructor&&!0===this.isSubWindow&&!this._creationTimeoutPassed)return setTimeout((()=>this.init()),7),void(this._creationTimeoutPassed=!0);!0===this.isSubWindow&&(this._bindComponentEventHanlderPassedInConstructor||this.clearHtmlAndAdjustStylesForSubWindow(),window.__glInstance=this),super.init()}else document.addEventListener("DOMContentLoaded",(()=>this.init()),{passive:!0})}clearHtmlAndAdjustStylesForSubWindow(){const t=document.head,e=new Array(4);e[0]=document.querySelectorAll("body link"),e[1]=document.querySelectorAll("body style"),e[2]=document.querySelectorAll("template"),e[3]=document.querySelectorAll(".gl_keep");for(let i=0;ithis.emit("popIn"))),document.body.appendChild(t),!0}}bindComponent(t,e){if(void 0!==this.bindComponentEvent){return this.bindComponentEvent(t,e)}if(void 0!==this.getComponentEvent)return{virtual:!1,component:this.getComponentEvent(t,e)};{const t=`${tt[2]}: ${JSON.stringify(e)}`;throw new Z(t)}}unbindComponent(t,e,i){if(void 0!==this.unbindComponentEvent)this.unbindComponentEvent(t);else if(!e&&void 0!==this.releaseComponentEvent){if(void 0===i)throw new J("VCUCRCU333998");this.releaseComponentEvent(t,i)}}}!function(t){let e=!1;t.createLayoutManagerConstructorParameters=function(t,i){const n=e?null:new URL(document.location.href).searchParams.get("gl-window");e=!0;const o=null!==n;let s,r;if(null!==n){const e=localStorage.getItem(n);if(null===e)throw new Error("Null gl-window Config");localStorage.removeItem(n);const i=JSON.parse(e),o=_t.unminifyConfig(i);r=xt.fromResolved(o),t instanceof HTMLElement&&(s=t)}else void 0===t?r=void 0:t instanceof HTMLElement?(r=void 0,s=t):r=t,void 0===s&&i instanceof HTMLElement&&(s=i);return{constructorOrSubWindowLayoutConfig:r,isSubWindow:o,containerElement:s}}}(le||(le={}));class he extends le{constructor(t,e,i){super(t,e,i,!0),this._componentTypesMap=new Map,this._registeredComponentMap=new Map,this._virtuableComponentMap=new Map,this._containerVirtualRectingRequiredEventListener=(t,e,i)=>this.handleContainerVirtualRectingRequiredEvent(t,e,i),this._containerVirtualVisibilityChangeRequiredEventListener=(t,e)=>this.handleContainerVirtualVisibilityChangeRequiredEvent(t,e),this._containerVirtualZIndexChangeRequiredEventListener=(t,e,i)=>this.handleContainerVirtualZIndexChangeRequiredEvent(t,e,i),this.deprecatedConstructor||this.init()}registerComponent(t,e,i=!1){if("function"!=typeof e)throw new $("registerComponent() componentConstructorOrFactoryFtn parameter is not a function");if(e.hasOwnProperty("prototype")){const n=e;this.registerComponentConstructor(t,n,i)}else{const n=e;this.registerComponentFactoryFunction(t,n,i)}}registerComponentConstructor(t,e,i=!1){if("function"!=typeof e)throw new Error(tt[1]);if(void 0!==this._componentTypesMap.get(t))throw new Z(`${tt[3]}: ${t}`);this._componentTypesMap.set(t,{constructor:e,factoryFunction:void 0,virtual:i})}registerComponentFactoryFunction(t,e,i=!1){if("function"!=typeof e)throw new Z("Please register a constructor function");if(void 0!==this._componentTypesMap.get(t))throw new Z(`${tt[3]}: ${t}`);this._componentTypesMap.set(t,{constructor:void 0,factoryFunction:e,virtual:i})}registerComponentFunction(t){this.registerGetComponentConstructorCallback(t)}registerGetComponentConstructorCallback(t){if("function"!=typeof t)throw new Error("Please register a callback function");void 0!==this._getComponentConstructorFtn&&console.warn("Multiple component functions are being registered. Only the final registered function will be used."),this._getComponentConstructorFtn=t}getRegisteredComponentTypeNames(){const t=this._componentTypesMap.keys();return Array.from(t)}getComponentInstantiator(t){let e;const i=pt.resolveComponentTypeName(t);return void 0!==i&&(e=this._componentTypesMap.get(i)),void 0===e&&void 0!==this._getComponentConstructorFtn&&(e={constructor:this._getComponentConstructorFtn(t),factoryFunction:void 0,virtual:!1}),e}bindComponent(t,e){let i;const n=pt.resolveComponentTypeName(e);let o;if(void 0!==n&&(i=this._componentTypesMap.get(n)),void 0===i&&void 0!==this._getComponentConstructorFtn&&(i={constructor:this._getComponentConstructorFtn(e),factoryFunction:void 0,virtual:!1}),void 0!==i){const s=i.virtual;let r,a;r=void 0===e.componentState?void 0:Ut({},e.componentState);const l=i.constructor;if(void 0!==l)a=new l(t,r,s);else{const e=i.factoryFunction;if(void 0===e)throw new X("LMBCFFU10008");a=e(t,r,s)}if(s){if(void 0===a)throw new J("GLBCVCU988774");{const e=a,i=e.rootHtmlElement;if(void 0===i)throw new Z(`${tt[5]}: ${n}`);!function(t){const e="absolute";t.style.position!==e&&(t.style.position=e)}(i),this.container.appendChild(i),this._virtuableComponentMap.set(t,e),t.virtualRectingRequiredEvent=this._containerVirtualRectingRequiredEventListener,t.virtualVisibilityChangeRequiredEvent=this._containerVirtualVisibilityChangeRequiredEventListener,t.virtualZIndexChangeRequiredEvent=this._containerVirtualZIndexChangeRequiredEventListener}}this._registeredComponentMap.set(t,a),o={virtual:i.virtual,component:a}}else o=super.bindComponent(t,e);return o}unbindComponent(t,e,i){if(void 0===this._registeredComponentMap.get(t))super.unbindComponent(t,e,i);else{const e=this._virtuableComponentMap.get(t);if(void 0!==e){const i=e.rootHtmlElement;if(void 0===i)throw new X("GLUC77743",t.title);this.container.removeChild(i),this._virtuableComponentMap.delete(t)}}}fireBeforeVirtualRectingEvent(t){this._goldenLayoutBoundingClientRect=this.container.getBoundingClientRect(),super.fireBeforeVirtualRectingEvent(t)}handleContainerVirtualRectingRequiredEvent(t,e,i){const n=this._virtuableComponentMap.get(t);if(void 0===n)throw new J("GLHCSCE55933");{const o=n.rootHtmlElement;if(void 0===o)throw new Z(tt[4]+" "+t.title);{const n=t.element.getBoundingClientRect(),s=n.left-this._goldenLayoutBoundingClientRect.left;o.style.left=zt(s);const r=n.top-this._goldenLayoutBoundingClientRect.top;o.style.top=zt(r),Tt(o,e),At(o,i)}}}handleContainerVirtualVisibilityChangeRequiredEvent(t,e){const i=this._virtuableComponentMap.get(t);if(void 0===i)throw new J("GLHCVVCRE55934");{const n=i.rootHtmlElement;if(void 0===n)throw new Z(tt[4]+" "+t.title);Dt(n,e)}}handleContainerVirtualZIndexChangeRequiredEvent(t,e,i){const n=this._virtuableComponentMap.get(t);if(void 0===n)throw new J("GLHCVZICRE55935");{const e=n.rootHtmlElement;if(void 0===e)throw new Z(tt[4]+" "+t.title);e.style.zIndex=i}}}const de="initial_",ce={show:"top",popout:!1,maximise:!1,close:"close-tab-unused"},me={headerHeight:31},ue={hasHeaders:!0,reorderEnabled:!0},pe={popoutWholeStack:!1,constrainDragToContainer:!1,constrainDragToHeaders:!1,preventDragout:!1,showMaximiseIcon:!1,showPopoutIcon:!1,showCloseIcon:!1,blockedPopoutsThrowError:!0,closePopoutsOnUnload:!0,selectionEnabled:!1};var ge,fe;class ve{constructor(e){this.layout=e,ge.set(this,void 0),fe.set(this,void 0),this.handleResize=t=>{t.forEach((t=>this.resizeElement(t.target)))},this.handleMutation=()=>{this.layout.viewComponentsByContainerElement.forEach((t=>{this.resizeElement(t.container.element)}))},t.__classPrivateFieldSet(this,ge,new ResizeObserver(this.handleResize),"f"),t.__classPrivateFieldSet(this,fe,new MutationObserver(this.handleMutation),"f")}observeMutations(e){t.__classPrivateFieldGet(this,fe,"f")?.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["class"]})}destroy(){t.__classPrivateFieldGet(this,ge,"f").disconnect(),t.__classPrivateFieldGet(this,fe,"f").disconnect()}observeContainer(e){t.__classPrivateFieldGet(this,ge,"f").observe(e)}unobserveContainer(e){t.__classPrivateFieldGet(this,ge,"f").unobserve(e)}resizeElement(t){const e=this.layout.viewComponentsByContainerElement.get(t);e&&e.resize()}}ge=new WeakMap,fe=new WeakMap;var _e={};Object.defineProperty(_e,"__esModule",{value:!0});var ye=_e.BaseItem=void 0;class Ce{constructor(t,e,i){this._item=t,this._layout=e,this._wrap=i}get raw(){return this._item}get layout(){return this._layout}get type(){return this._item.type}get contentItems(){return(this._item.contentItems??[]).map((t=>this._wrap(t)))}get parent(){const t=this._item.parent;return t?this._wrap(t):null}setActiveContentItem(t,e){if("stack"!==this.type)throw new Error(`Cannot call setActiveContentItem from a non-stack item: ${this.type}`);this._item.setActiveContentItem(t.raw,e)}static wrapInternal(t,e,i){const n=Ce.wrapCache.get(e);if(n)return n;const o=new t(e,i,(e=>Ce.wrapInternal(t,e,i)));return Ce.wrapCache.set(e,o),o}}ye=_e.BaseItem=Ce,Ce.wrapCache=new WeakMap;const we=t=>!!t&&"contentItems"in t&&(t.isRow||t.isColumn);class Ie extends ye{isRoot(){return!!this._item.parent?.isGround}getBounds(){return this._item.element.getBoundingClientRect()}get viewName(){if(this._item.isComponent){const{component:t}=this._item;return t.identity.name}throw new Error("View name not found")}onDestroyed(t){const e=({target:i})=>{i===this._item&&(t(),this._item.off("itemDestroyed",e))};this._item.on("itemDestroyed",e)}createAdjacentStack({position:t="right"}={}){const e=this.raw;if(ee.isStack(e)&&e.parent){const i=["top","bottom"].includes(t)?"column":"row",n=["left","top"].includes(t)?1:0,o=we(e.parent)?e.parent:e.layoutManager,s=o,r=e.parent.contentItems.indexOf(e);e.parent.isGround&&e.parent.removeChild(e,!0);const a=o.newItem({type:i,content:[{type:"stack",content:[]}]},r);if(!a)throw new Error("createAdjacentStack: Failed to create new container");const l=a.contentItems[0];return a.addChild(this.raw,n),we(s)&&s.removeChild(e,!0),this._wrap(l)}throw new Error(`Cannot creat adjacent stacks for type: ${e.type}, must be type 'stack'`)}setActiveContentItem(t,e=!0){if(!ee.isStack(this._item))throw new Error(`Cannot call setActiveContentItem from a non-stack item: ${this.type}`);this._item.setActiveComponentItem(t.raw,!e)}static wrap(t,e){return ye.wrapInternal(Ie,t,e)}}function be(t=[],e){for(const i of t)"component"===i.type?Object.keys(e).forEach((t=>{t in i&&(i.componentState={[`${de}${t}`]:i[t],...i.componentState}),i[t]=e[t]})):be(i.content,e)}function Se(t=[],e,i){for(const n of t)if("component"===n.type)Object.keys(e).forEach((t=>{if(`${de}${t}`in n.componentState)return n[t]=n.componentState[`${de}${t}`],void delete n.componentState[`${de}${t}`];n[t]=e[t]}));else{if(n.size&&("row"===i||"column"===i)){n["row"===i?"width":"height"]=n.size?.includes(".")?parseFloat(n.size):parseInt(n.size)}Se(n.content,e,n.type)}}function Ee(t){if(t.root){t.root.content&&Se([t.root],{componentName:"view",isClosable:!0});const e=t.root;t.content=[e],delete t.root}return t}const xe=e=>class extends e{connectedCallback(){if(!this.name||!this.uuid)throw new Error(" Name or uuid attribute missing");if(!this.src)throw new Error(" missing 'src' attribute.");this.#t||(this.#t=document.createElement("iframe"),this.#t.src=this.src,this.#t.style.height="100%",this.#t.style.width="100%",this.#t.style.border="none",this.forceFrameName?this.#t.setAttribute("name",this.forceFrameName):this.#t.setAttribute("name",t.encodeOptions({brokerUrl:this.brokerUrl,name:this.name,uuid:this.uuid,providerId:this.providerId,contextGroup:this.contextGroup},"of-frame")),this.#t.setAttribute("id",this.name),this.appendChild(this.#t))}#t;get brokerUrl(){return this.getAttribute("of-broker")}set brokerUrl(t){t&&this.setAttribute("of-broker",t)}get name(){return this.getAttribute("of-name")}set name(t){t&&this.setAttribute("of-name",t)}get forceFrameName(){return this.getAttribute("forceFrameName")}set forceFrameName(t){t&&this.setAttribute("forceFrameName",t)}get uuid(){return this.getAttribute("of-uuid")}set uuid(t){t&&this.setAttribute("of-uuid",t)}get src(){return this.getAttribute("src")}set src(t){t&&this.setAttribute("src",t)}get providerId(){return this.getAttribute("of-provider-id")}set providerId(t){t&&this.setAttribute("of-provider-id",t)}get contextGroup(){return this.getAttribute("of-context-group")}set contextGroup(t){t&&this.setAttribute("of-context-group",t)}static get observedAttributes(){return["name"]}};class Le{static create(t){const e=document.createElement("of-view");return Object.entries(t).forEach((([t,i])=>{e.setAttribute(t,i)})),e}}customElements.define("of-view",xe(HTMLElement));class ze{constructor(t,i,n,{brokerUrl:o,interopConfig:s},r){this.container=t,this.config=i,this.ofView=null,this.isDragging=()=>this.container.tab.element?.className.includes("lm_dragging")??!1;const{url:a,web:l,interop:h,name:d}=i||{},c=d??`internal-generated-view-${e.v4()}`;if(this.identity={uuid:n,name:c},this.container.element.setAttribute("of-name",c),this.container.element.id=`container-${c}`,this.container.parent.id=c,void 0===a)return void this.handleUrlMissing();const m=this.updateTitleIfNotSet(a),u={"of-broker":o,"of-uuid":n,"of-name":c,src:a};l?.frameName&&(u.forceFrameName=l.frameName);const p=h?.currentContextGroup??s?.currentContextGroup;p&&(u["of-context-group"]=p),s?.providerId&&(u["of-provider-id"]=s?.providerId),this.ofView=Le.create(u),this.ofView.title=m??`Iframe: ${a}`,r.appendChild(this.ofView),this.ofView.style.position="absolute"}updateTitleIfNotSet(t){return"view"===this.container.parent.title&&this.container.parent.setTitle(t),this.container.parent.title}handleUrlMissing(){const t=document.createElement("div");t.setAttribute("style","padding: 20px");t.innerText="No URL provided",this.container.element.appendChild(t)}destroy(){this.ofView?.remove(),this.ofView=null}closeView(){this.container.close()}resize(){if(this.ofView){if(this.isDragging())return void(this.ofView.style.display="none");const t=this.container.element.getBoundingClientRect();this.ofView.style.position="absolute",this.ofView.style.height=`${t.height}px`,this.ofView.style.width=`${t.width}px`,this.ofView.style.inset=`${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`,this.ofView.style.display="block"}}}class Me extends U{static overrideConfig(t){const e={...ue,...t.settings,...pe};return e.reorderEnabled?be(t.content,{isClosable:!0}):be(t.content,{reorderEnabled:!1}),{dimensions:me,...t,settings:e,header:{...ce,show:!1!==t.settings?.hasHeaders&&ce.show}}}constructor(t,e,i,{options:n},o,s){super(),this.identity=t,this.container=e,this.initialConfig=i,this.layoutManager=o,this.platformProvider=s,this.viewComponentsByContainerElement=new Map,this.layoutContentCache=_.getSingleInstance(),this.reparentingViews=new Set,this.goldenLayoutDestroyed=!1,this.createViewComponent=(t,e)=>{m.handleSharedView(this.layoutManager,this.identity,e);const i=new ze(t,e,this.identity.uuid,this.options,this.iframeContainer);return e&&!1===e[`${de}isClosable`]&&this.stylesheet.insertRule(`#tab-${i.identity.name} .lm_close_tab { display: none; }`),this.viewComponentsByContainerElement.set(t.element,i),this.resizeController.observeContainer(t.element),i},this.iframeContainer=document.createElement("div"),this.iframeContainer.id=`openfin-layout-iframe-container-${this.identity.layoutName}`,this.domEmitter=new V(e),this.setupStylesheets(),this.layout=new he(this.container),this.layout.resizeWithContainerAutomatically=!0,this.options=n,this.layout.registerComponent("view",this.createViewComponent),this.setupListeners(),this.resizeController=new ve(this),this.layout.loadLayout(Me.overrideConfig(i));const r=document.createElement("div");r.id=`openfin-layout-shadow-container-${this.identity.layoutName}`,r.attachShadow({mode:"open",delegatesFocus:!1}).appendChild(this.iframeContainer),this.container.appendChild(r),this.resizeController.observeMutations(this.container)}getStackByView({name:t}){const e=this.layout.findFirstComponentItemById(t);if(e?.parent&&e?.parent?.isStack)return Ie.wrap(e.parent,this)}getRoot(){return Ie.wrap(this.layout.rootItem,this)}async platformCloseView(t){const e=[...this.viewComponentsByContainerElement.values()].find((e=>e.identity.name===t.name));if(!e)throw new Error(`View with name: ${t.name} not found in layout.`);e.closeView()}async platformCreateView(t,{location:e,targetView:i}={}){if(i)throw new Error("TargetView not supported in web");const n={options:this.platformProvider.normalizeOptions(t),target:this.identity,location:e};return this.insertView(n)}setupStylesheets(){if(this.container.setAttribute("data-openfin-layout-name",this.identity.layoutName),this.stylesheet=new CSSStyleSheet,this.stylesheet.insertRule(".lm_close { display: none; }"),document.adoptedStyleSheets.push(this.stylesheet),this.initialConfig.settings?.preventSplitterResize){const t=`\n [data-openfin-layout-name='${this.identity.layoutName}'] .lm_splitter {\n pointer-events: none;\n }`;this.stylesheet.insertRule(t)}}insertView({options:t,location:e,targetView:i}){const n=e?this.layoutContentCache.getItemOrUndefined(e.id):void 0,o=i?this.layoutContentCache.getItemOrUndefined(i.name):void 0,s=n??o??Ie.wrap(this.layout.rootItem,this);let r;if(ee.isStack(s.raw))r=s.raw;else{if(!we(s.raw))throw new Error("Cannot add a view at the requested location");r=s.raw.newItem({type:"stack",content:[]})}const a=Math.min(r.contentItems.length,e?.index??r.contentItems.length);let l=this.layout.findFirstComponentItemById(t.name);l?(l.parent&&l.parent.removeChild(l,!0),r.addChild(l,a)):l=r.newComponent("view",t,t.title??t.url??"Default Title",a);const h=l.component.identity;return Promise.resolve({identity:h})}replaceView({viewToReplace:t,newView:e}){throw new Error("Method not implemented.")}replaceLayout(t){throw new Error("Method not implemented.")}async cleanupView(t){}applyPreset(t){throw new Error("Method not implemented.")}getCurrentViews(){return[...this.viewComponentsByContainerElement.values()].map((t=>t.identity))}async getFrameSnapshot(){return Ee(xt.fromResolved(this.layout.toConfig()))}isVisible(){return W(this.container)}async onViewDetached({viewIdentity:t}){this.reparentingViews.add(t.name),this.platformCloseView(t)}async destroy(){this.goldenLayoutDestroyed||(this.goldenLayoutDestroyed=!0,this.layout.destroy()),this.iframeContainer.remove(),this.resizeController.destroy(),document.adoptedStyleSheets=document.adoptedStyleSheets.filter((t=>t!==this.stylesheet)),this.viewComponentsByContainerElement.clear()}setupListeners(){this.container.addEventListener("pointerdown",(t=>{if(t.target instanceof HTMLElement){const e=t.target.classList;["lm_tab","lm_title","lm_splitter","lm_drag_handle"].some((t=>e.contains(t)))&&(this.handleDragStart(),2===t.button&&t.stopPropagation())}}),!0),document.addEventListener("pointerup",(()=>this.handleDragEnd()),!0),this.layout.on("tabCreated",(t=>{const e=t.componentItem.component;t.element.id=`tab-${e.identity.name}`,this.domEmitter.dispatchLocalEvent("tab-created",e.identity)})),this.layout.on("itemCreated",(({target:t})=>{const e=t;if(Gt.isComponentItem(e)){const t=e.component;this.domEmitter.dispatchLocalEvent("container-created",t.identity)}})),this.layout.on("itemDestroyed",(t=>{const e=t.target;if(Gt.isComponentItem(e)){const t=e.component;this.removeViewComponent(t)}})),this.layout.on("itemDropped",(()=>{this.handleDragEnd()}))}handleDragStart(){this.iframeContainer.style.pointerEvents="none"}handleDragEnd(){this.iframeContainer.style.pointerEvents=""}removeViewComponent(t){if(t.config&&!1===t.config[`${de}isClosable`]){const e=[...this.stylesheet.cssRules].findIndex((e=>e.cssText.includes(`#tab-${t.identity.name}`)));this.stylesheet.deleteRule(e)}t.destroy(),this.viewComponentsByContainerElement.delete(t.container.element),this.resizeController.unobserveContainer(t.container.element),this.reparentingViews.has(t.identity.name)?this.reparentingViews.delete(t.identity.name):this.platformProvider.closeView(t.identity.name);0===this.getCurrentViews().length&&(this.goldenLayoutDestroyed||(this.goldenLayoutDestroyed=!0,m.handleLastViewRemoved(this.layoutManager,this.identity)))}}class Pe{constructor(t,e,i,n){this.windowIdentity=t,this.connectConfig=e,this.provider=i,this.fallbackContainer=n}async createLayout(t,e){if(!("container"in t)&&!this.fallbackContainer)throw new Error("Container property is not optional in web");const{layoutName:i}=t,n=t,o=this.provider.initLayoutViews(n),s=n.container??this.fallbackContainer,r={...this.windowIdentity,layoutName:i},a=new Me(r,s,o,this.connectConfig,e,this.provider);m.registerLayout(e,i,a),this.fallbackContainer=null}async getLayoutSnapshot(t){return t.getLayoutSnapshot()}async handleLastViewRemoved(t){}}class Te{static async init(e){const i=e.getFin().InterApplicationBus.Channel,n=await i.create(`custom-frame-${e.me.uuid}`);return n.setDefaultAction((async(t,{target:e,opts:i},o)=>{const s=n.connections.find((t=>t.name===e.name));if(s)return n.dispatch(s,t,{...i,target:e});throw new Error(`Client with name ${e.name} not found`)})),await t.relayChannelClientApi_1(n,"layout-relay"),new Te(e)}constructor(t){this.wire=t,this.viewNames=new Set}normalizeOptions(t,i="default"){const n=this.wire.me.uuid;let{name:o=`internal-generated-view-${e.v4()}`}=t;return o.match(/^internal-generated-view-/)&&this.viewNames.has(o)&&"duplicate"===i&&(o=`internal-generated-view-${e.v4()}`),this.viewNames.add(o),{...t,name:o,uuid:n}}closeView(t){this.viewNames.delete(t)}initLayoutViews({layout:t,multiInstanceViewBehavior:e}){return H((t=>{if("component"===t.type&&t.componentState){const i=this.normalizeOptions(t.componentState,e);return{...t,componentState:i}}return t}),t)}}var Ae;const ke=t=>t;Ae=new WeakMap,exports.WebLayoutEntryPoint=class{constructor(e){Ae.set(this,void 0),this.initLayoutManager=async(e,i,{container:n,layoutManagerOverride:o})=>{const s=await Te.init(i),r=o??ke,a=new Pe(i.me,t.__classPrivateFieldGet(this,Ae,"f"),s,n),l=new(r(m.createClosedConstructor(a)));return await M(i,l),l},this.applyLayoutSnapshot=async(e,i,n)=>{await i.applyLayoutSnapshot(t.__classPrivateFieldGet(this,Ae,"f").platform.layoutSnapshot)},this.createLayout=async(t,e)=>m.createLayout(t,e),this.destroyLayout=async(t,e)=>m.destroyLayout(t,e),t.__classPrivateFieldSet(this,Ae,e,"f")}}; @@ -8297,7 +8297,7 @@ function version(uuid) { /******/ /************************************************************************/ var __webpack_exports__ = {}; -// This entry need to be wrapped in an IIFE because it need to be in strict mode. +// This entry needs to be wrapped in an IIFE because it needs to be in strict mode. (() => { "use strict"; var exports = __webpack_exports__; @@ -8306,7 +8306,7 @@ var exports = __webpack_exports__; \********************************/ Object.defineProperty(exports, "__esModule", ({ value: true })); -const core_web_1 = __webpack_require__(/*! @openfin/core-web */ "./node_modules/@openfin/core-web/out/api-client.js"); +const core_web_1 = __webpack_require__(/*! @openfin/core-web */ "../../node_modules/@openfin/core-web/out/api-client.js"); const settings_1 = __webpack_require__(/*! ./platform/settings */ "./client/src/platform/settings.ts"); /** * Initializes the OpenFin Web Broker connection. diff --git a/web/v19.2.0/web-interop-basic/js/provider.bundle.js.map b/web/v19.2.0/web-interop-basic/js/provider.bundle.js.map index fb1ed09..c7c66ed 100644 --- a/web/v19.2.0/web-interop-basic/js/provider.bundle.js.map +++ b/web/v19.2.0/web-interop-basic/js/provider.bundle.js.map @@ -1 +1 @@ -{"version":3,"file":"provider.bundle.js","mappings":";;;;;;;;;;AAAa,MAAM,mBAAO,CAAC,iFAAoB,EAAE,mBAAO,CAAC,mDAAS,EAAE,mBAAO,CAAC,+DAAM,EAAE,mBAAO,CAAC,mDAAQ,EAAE,mBAAO,CAAC,gEAAkB,EAAE,mBAAO,CAAC,4DAAgB,EAAE,eAAe;;;;;;;;;;;;ACA9J,MAAM,mBAAO,CAAC,mDAAS,IAAI,mBAAO,CAAC,mDAAQ,IAAI,mBAAO,CAAC,gEAAkB,IAAI,mBAAO,CAAC,4DAAgB,IAAI,mBAAO,CAAC,+DAAM,EAAE,kBAAkB,EAAE,GAAG,wBAAwB,GAAG,sGAAsG,qBAAM,CAAC,qBAAM,iCAAiC,KAAK,KAAK,KAAK,MAAM,oBAAo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DAAsD,oCAAoC,IAAI,iIAAiI,sBAAsB,yCAAyC,2FAA2F;;;;;;;;;;;;ACFv6nD;;AAEZ,kBAAkB;AAClB,mBAAmB;AACnB,qBAAqB;;AAErB;AACA;AACA;;AAEA;AACA,mCAAmC,SAAS;AAC5C;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,cAAc,SAAS;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,2CAA2C,UAAU;AACrD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;ACrJA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEY;;AAEZ,eAAe,mBAAO,CAAC,wDAAW;AAClC,gBAAgB,mBAAO,CAAC,oDAAS;AACjC;AACA;AACA;AACA;;AAEA,cAAc;AACd,kBAAkB;AAClB,yBAAyB;;AAEzB;AACA,kBAAkB;;AAElB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,kBAAkB,YAAY;AAC9B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA,wCAAwC,SAAS;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;;AAEA;AACA;AACA,cAAc,iBAAiB;AAC/B;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,iDAAiD,EAAE;AACnD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C;AAC1C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA,yBAAyB,eAAe;AACxC;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,yBAAyB,QAAQ;AACjC;AACA,sBAAsB,eAAe;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc,YAAY;AAC1B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB,sBAAsB;AACxC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,mBAAmB;AACnB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA,oBAAoB,SAAS;AAC7B;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA,qBAAqB,WAAW,GAAG,IAAI;AACvC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA,gBAAgB,WAAW,GAAG,IAAI,KAAK,aAAa;AACpD;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;;AAEA;AACA,GAAG;AACH;AACA;AACA,mBAAmB,KAAK,mDAAmD,cAAc;AACzF,GAAG;AACH;AACA;AACA,+BAA+B,IAAI;AACnC;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,MAAM,aAAa,SAAS;AACtD;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,SAAS,gBAAgB;AACzB,cAAc,oBAAoB,EAAE,IAAI;AACxC;AACA,YAAY,gBAAgB,EAAE,IAAI;AAClC;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,GAAG,SAAS,GAAG,KAAK,qBAAqB,EAAE,EAAE;AACpE,QAAQ;AACR,yBAAyB,GAAG,KAAK,yBAAyB,EAAE,EAAE;AAC9D,mBAAmB,yBAAyB,EAAE,EAAE;AAChD;AACA,MAAM;AACN,oBAAoB,IAAI,EAAE,GAAG,SAAS,IAAI,EAAE,EAAE;AAC9C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,0CAA0C,cAAc,SAAS,OAAO;AACxE;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,kBAAkB,YAAY;AAC9B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,kBAAkB,gBAAgB;AAClC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,kBAAkB,gBAAgB;AAClC;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,cAAc,YAAY;AAC1B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,QAAQ;AAC1B;AACA,oBAAoB,QAAQ;AAC5B;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;;;;;ACzjEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEa;;AAEb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB;;AAEnB;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,sBAAsB;AACxC;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA,eAAe;AACf;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA,oBAAoB,SAAS;AAC7B;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;;AAEA,kCAAkC,QAAQ;AAC1C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oBAAoB,iBAAiB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,QAAQ;AACR;AACA,uCAAuC,QAAQ;AAC/C;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,OAAO;AACzB;AACA;AACA;;AAEA;AACA,SAAS,yBAAyB;AAClC;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,gBAAgB;AAClC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,8DAA8D,YAAY;AAC1E;AACA,8DAA8D,YAAY;AAC1E;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,qCAAqC,YAAY;AACjD;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;AACA;;;;;;;;;;;AChfA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,SAAS,WAAW;;AAEpB;AACA;AACA;AACA,SAAS,WAAW;;AAEpB;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA,SAAS,WAAW;;AAEpB;AACA;AACA,SAAS,UAAU;;AAEnB;AACA;;;;;;;;;;;ACpFA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,WAAW,mBAAO,CAAC,mDAAS;;AAE5B;AACA;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,mBAAO,CAAC,+DAAe;AACzC,cAAc,mBAAO,CAAC,uDAAW;AACjC,eAAe,mBAAO,CAAC,yDAAY;AACnC,cAAc,mBAAO,CAAC,yDAAY;AAClC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,SAAS;AACpB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AChDA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACnBA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,UAAU;AACrB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACtBA,sBAAsB,mBAAO,CAAC,yEAAoB;AAClD,SAAS,mBAAO,CAAC,6CAAM;;AAEvB;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC3BA,SAAS,mBAAO,CAAC,6CAAM;;AAEvB;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpBA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,WAAW,mBAAO,CAAC,iDAAQ;;AAE3B;AACA;AACA;AACA;AACA;AACA,WAAW,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3B,aAAa,mBAAO,CAAC,qDAAU;;AAE/B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,SAAS;AACpB;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa,GAAG;AAChB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;AACA,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;;;;;;;;;;ACrKA,eAAe,mBAAO,CAAC,yDAAY;;AAEnC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;;;;;;;;;;AC7BA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,cAAc,mBAAO,CAAC,uDAAW;;AAEjC;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,aAAa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;AACrB,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClFA,aAAa,mBAAO,CAAC,uDAAW;AAChC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA,iBAAiB,mBAAO,CAAC,6DAAc;AACvC,eAAe,mBAAO,CAAC,2DAAa;AACpC,eAAe,mBAAO,CAAC,yDAAY;AACnC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;AACA;AACA;AACA,oCAAoC;;AAEpC;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC9CA,aAAa,mBAAO,CAAC,uDAAW;AAChC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,eAAe,mBAAO,CAAC,yDAAY;AACnC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC3DA,kBAAkB,mBAAO,CAAC,iEAAgB;AAC1C,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC7BA,eAAe,mBAAO,CAAC,yDAAY;AACnC,kBAAkB,mBAAO,CAAC,iEAAgB;AAC1C,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AChCA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACnBA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,aAAa,UAAU;AACvB;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACbA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACZA,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,aAAa,aAAa;AAC1B;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACfA,WAAW,mBAAO,CAAC,mDAAS;;AAE5B;A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;;;;;;;ACnFA,aAAa,mBAAO,CAAC,uDAAW;AAChC,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,SAAS,mBAAO,CAAC,6CAAM;AACvB,kBAAkB,mBAAO,CAAC,iEAAgB;AAC1C,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC/GA,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AAC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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC5EA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,mBAAmB,mBAAO,CAAC,mEAAiB;AAC5C,kBAAkB,mBAAO,CAAC,iEAAgB;;AAE1C;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACxBA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACdA,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACnBA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACZA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA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;;;;;ACRA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACbA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;;;;;;;;;;ACjBA,gBAAgB,mBAAO,CAAC,6DAAc;;AAEtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACdA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,GAAG;AAChB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACbA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACbA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,UAAU,mBAAO,CAAC,iDAAQ;AAC1B,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjCA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;;;;;;;;;;;ACzBA,gBAAgB,mBAAO,CAAC,6DAAc;;AAEtC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,GAAG;AAChB;AACA;AACA;AACA,oBAAoB,QAAQ,IAAI,QAAQ;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,kBAAkB;AAClB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpCA,sBAAsB,mBAAO,CAAC,yEAAoB;AAClD,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA,8BAA8B,mBAAmB;AACjD;AACA;AACA;AACA;AACA;AACA,+CAA+C,mBAAmB;AAClE;AACA;AACA;;AAEA;;;;;;;;;;;ACnCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACzBA,iBAAiB,mBAAO,CAAC,6DAAc;AACvC,eAAe,mBAAO,CAAC,yDAAY;;AAEnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AChCA,WAAW,mBAAO,CAAC,mDAAS;AAC5B,gBAAgB,mBAAO,CAAC,2DAAa;;AAErC;AACA,kBAAkB,KAA0B;;AAE5C;AACA,gCAAgC,QAAa;;AAE7C;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACrCA,kBAAkB,mBAAO,CAAC,iEAAgB;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,kBAAkB;AAClB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClCA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,eAAe,mBAAO,CAAC,yDAAY;;AAEnC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpCA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClCA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC1BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC9BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC5BA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC1BA,uBAAuB,mBAAO,CAAC,2EAAqB;AACpD,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC1BA,oBAAoB,mBAAO,CAAC,qEAAkB;AAC9C,eAAe,mBAAO,CAAC,2DAAa;AACpC,kBAAkB,mBAAO,CAAC,+DAAe;;AAEzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpCA,oBAAoB,mBAAO,CAAC,qEAAkB;AAC9C,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,kBAAkB,mBAAO,CAAC,+DAAe;;AAEzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC/BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;;;ACXA,kCASC;AAbD;;;GAGG;AACI,KAAK,UAAU,WAAW;IAChC,OAAO;QACN,QAAQ,EAAE;YACT,eAAe,EAAE,kDAAkD;YACnE,SAAS,EAAE,mDAAmD;YAC9D,UAAU,EAAE,mBAAmB;YAC/B,mBAAmB,EAAE,OAAO;SAC5B;KACD,CAAC;AACH,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACfuC;AACA;AACA;AACA;AACE;AACQ;AACE;AACE;;;;;;;;;;;;;;;;ACPtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD;;AAEnD;;AAEA,oBAAoB,gBAAgB;AACpC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA,kBAAkB,cAAc;AAChC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,kBAAkB,cAAc;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,kBAAkB,aAAa;AAC/B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,iEAAe,GAAG;;;;;;;;;;;;;;;ACtNlB,iEAAe,sCAAsC;;;;;;;;;;;;;;;;ACAhB;;AAErC;AACA,OAAO,wDAAQ;AACf;AACA;;AAEA;AACA,gCAAgC;;AAEhC;AACA;AACA;AACA,qBAAqB;;AAErB;AACA,qBAAqB;;AAErB;AACA,qBAAqB;;AAErB;AACA,qBAAqB;AACrB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,iEAAe,KAAK;;;;;;;;;;;;;;;AClCpB,iEAAe,cAAc,EAAE,UAAU,EAAE,eAAe,EAAE,gBAAgB,EAAE,UAAU,GAAG,yCAAyC;;;;;;;;;;;;;;;ACApI;AACA;AACA;AACA;AACA;AACe;AACf;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;AClBA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA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A;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA;WACA;WACA;WACA;WACA,GAAG;WACH;WACA;WACA,CAAC;;;;;WCPD;;;;;WCAA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;WCNA;WACA;WACA;WACA;WACA;;;;;;;;;;;;;;ACJA,sHAA4C;AAC5C,uGAAkD;AAElD;;GAEG;AACH,KAAK,UAAU,IAAI;IAClB,MAAM,QAAQ,GAAG,MAAM,0BAAW,GAAE,CAAC;IACrC,qCAAqC;IACrC,wGAAwG;IACxG,8GAA8G;IAC9G,iFAAiF;IACjF,MAAM,GAAG,GAAG,MAAM,sBAAO,EAAC;QACzB,OAAO,EAAE;YACR,SAAS,EAAE,QAAQ,CAAC,QAAQ,CAAC,SAAS;YACtC,aAAa,EAAE;gBACd,UAAU,EAAE,QAAQ,CAAC,QAAQ,CAAC,UAAU;gBACxC,mBAAmB,EAAE,QAAQ,CAAC,QAAQ,CAAC,mBAAmB;aAC1D;SACD;KACD,CAAC,CAAC;IAEH,oCAAoC;IACpC,MAAM,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;AACtD,CAAC;AAED,IAAI,EAAE;KACJ,IAAI,CAAC,GAAG,EAAE;IACV,OAAO,CAAC,GAAG,CAAC,sCAAsC,CAAC,CAAC;IACpD,OAAO,IAAI,CAAC;AACb,CAAC,CAAC;KACD,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC","sources":["webpack://openfin-web--web-interop-basic/./node_modules/@openfin/core-web/out/api-client.js","webpack://openfin-web--web-interop-basic/./node_modules/@openfin/core-web/out/main-8cad4070.js","webpack://openfin-web--web-interop-basic/./node_modules/@openfin/core-web/out/main-b14f67c9.js","webpack://openfin-web--web-interop-basic/../../node_modules/base64-js/index.js","webpack://openfin-web--web-interop-basic/../../node_modules/buffer/index.js","webpack://openfin-web--web-interop-basic/../../node_modules/events/events.js","webpack://openfin-web--web-interop-basic/../../node_modules/ieee754/index.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_DataView.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_Hash.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_ListCache.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_Map.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_MapCache.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_Promise.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_Set.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_SetCache.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_Stack.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_Symbol.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_Uint8Array.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_WeakMap.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_arrayEach.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_arrayFilter.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_arrayLikeKeys.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_arrayPush.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_arraySome.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_assignValue.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_assocIndexOf.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_baseAssign.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_baseAssignIn.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_baseAssignValue.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_baseClone.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_baseCreate.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_baseGetAllKeys.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_baseGetTag.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_baseIsArguments.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_baseIsEqual.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_baseIsEqualDeep.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_baseIsMap.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_baseIsNative.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_baseIsSet.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_baseIsTypedArray.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_baseKeys.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_baseKeysIn.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_baseTimes.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_baseUnary.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_cacheHas.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_cloneArrayBuffer.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_cloneBuffer.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_cloneDataView.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_cloneRegExp.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_cloneSymbol.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_cloneTypedArray.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_copyArray.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_copyObject.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_copySymbols.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_copySymbolsIn.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_coreJsData.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_defineProperty.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_equalArrays.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_equalByTag.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_equalObjects.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_freeGlobal.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_getAllKeys.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_getAllKeysIn.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_getMapData.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_getNative.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_getPrototype.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_getRawTag.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_getSymbols.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_getSymbolsIn.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_getTag.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_getValue.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_hashClear.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_hashDelete.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_hashGet.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_hashHas.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_hashSet.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_initCloneArray.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_initCloneByTag.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_initCloneObject.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_isIndex.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_isKeyable.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_isMasked.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_isPrototype.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_listCacheClear.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_listCacheDelete.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_listCacheGet.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_listCacheHas.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_listCacheSet.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_mapCacheClear.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_mapCacheDelete.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_mapCacheGet.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_mapCacheHas.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_mapCacheSet.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_mapToArray.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_nativeCreate.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_nativeKeys.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_nativeKeysIn.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_nodeUtil.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_objectToString.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_overArg.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_root.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_setCacheAdd.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_setCacheHas.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_setToArray.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_stackClear.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_stackDelete.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_stackGet.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_stackHas.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_stackSet.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_toSource.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/cloneDeep.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/eq.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/isArguments.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/isArray.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/isArrayLike.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/isBuffer.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/isEqual.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/isFunction.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/isLength.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/isMap.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/isObject.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/isObjectLike.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/isSet.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/isTypedArray.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/keys.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/keysIn.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/stubArray.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/stubFalse.js","webpack://openfin-web--web-interop-basic/./client/src/platform/settings.ts","webpack://openfin-web--web-interop-basic/../../node_modules/uuid/dist/esm-browser/index.js","webpack://openfin-web--web-interop-basic/../../node_modules/uuid/dist/esm-browser/md5.js","webpack://openfin-web--web-interop-basic/../../node_modules/uuid/dist/esm-browser/nil.js","webpack://openfin-web--web-interop-basic/../../node_modules/uuid/dist/esm-browser/parse.js","webpack://openfin-web--web-interop-basic/../../node_modules/uuid/dist/esm-browser/regex.js","webpack://openfin-web--web-interop-basic/../../node_modules/uuid/dist/esm-browser/rng.js","webpack://openfin-web--web-interop-basic/../../node_modules/uuid/dist/esm-browser/sha1.js","webpack://openfin-web--web-interop-basic/../../node_modules/uuid/dist/esm-browser/stringify.js","webpack://openfin-web--web-interop-basic/../../node_modules/uuid/dist/esm-browser/v1.js","webpack://openfin-web--web-interop-basic/../../node_modules/uuid/dist/esm-browser/v3.js","webpack://openfin-web--web-interop-basic/../../node_modules/uuid/dist/esm-browser/v35.js","webpack://openfin-web--web-interop-basic/../../node_modules/uuid/dist/esm-browser/v4.js","webpack://openfin-web--web-interop-basic/../../node_modules/uuid/dist/esm-browser/v5.js","webpack://openfin-web--web-interop-basic/../../node_modules/uuid/dist/esm-browser/validate.js","webpack://openfin-web--web-interop-basic/../../node_modules/uuid/dist/esm-browser/version.js","webpack://openfin-web--web-interop-basic/webpack/bootstrap","webpack://openfin-web--web-interop-basic/webpack/runtime/define property getters","webpack://openfin-web--web-interop-basic/webpack/runtime/global","webpack://openfin-web--web-interop-basic/webpack/runtime/hasOwnProperty shorthand","webpack://openfin-web--web-interop-basic/webpack/runtime/make namespace object","webpack://openfin-web--web-interop-basic/webpack/runtime/node module decorator","webpack://openfin-web--web-interop-basic/./client/src/provider.ts"],"sourcesContent":["\"use strict\";var e=require(\"./main-8cad4070.js\");require(\"buffer/\"),require(\"uuid\"),require(\"events\"),require(\"lodash/cloneDeep\"),require(\"lodash/isEqual\"),exports.connect=e.connect;\n","\"use strict\";var e=require(\"buffer/\"),t=require(\"events\"),n=require(\"lodash/cloneDeep\"),i=require(\"lodash/isEqual\"),r=require(\"uuid\");const o=(e,t)=>`${t}<${btoa(JSON.stringify(e))}>`;var s=\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof window?window:\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:{},a={},c={},d={},h={};async function l(e){const t=[];for(const n of e){const e=await n();t.push(e)}return t}Object.defineProperty(h,\"__esModule\",{value:!0}),h.promiseMapSerial=h.serial=h.promiseMap=h.promisify=void 0,h.promisify=function(e){return(...t)=>new Promise(((n,i)=>{e(...t,((e,t)=>e?i(e):n(t)))}))},h.promiseMap=async function(e,t){return Promise.all(e.map(t))},h.serial=l,h.promiseMapSerial=async function(e,t){return l(e.map(((e,n,i)=>()=>t(e,n,i))))};var u,p=s&&s.__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},w=s&&s.__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)};Object.defineProperty(d,\"__esModule\",{value:!0}),d.Reply=d.EmitterBase=d.Base=void 0;const y=h;class f{constructor(e){this.isNodeEnvironment=()=>\"node\"===this.wire.environment.type,this.isOpenFinEnvironment=()=>\"openfin\"===this.wire.environment.type,this.isBrowserEnvironment=()=>\"other\"===this.wire.environment.type,this.wire=e}get fin(){return this.wire.getFin()}get me(){return this.wire.me}}d.Base=f;d.EmitterBase=class extends f{constructor(e,t,...n){super(e),this.topic=t,u.set(this,void 0),this.eventNames=()=>this.hasEmitter()?this.getOrCreateEmitter().eventNames():[],this.emit=(e,t,...n)=>!!this.hasEmitter()&&this.getOrCreateEmitter().emit(e,t,...n),this.hasEmitter=()=>this.wire.eventAggregator.has(w(this,u,\"f\")),this.getOrCreateEmitter=()=>this.wire.eventAggregator.getOrCreate(w(this,u,\"f\")),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[],this.listenerCount=e=>this.hasEmitter()?this.getOrCreateEmitter().listenerCount(e):0,this.registerEventListener=async(e,t={},n,i)=>{const r={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e},o=this.getOrCreateEmitter();n(o);try{await this.wire.sendAction(\"subscribe-to-desktop-event\",r)}catch(e){throw i(o),this.deleteEmitterIfNothingRegistered(o),e}},this.deregisterEventListener=async(e,t={})=>{if(this.hasEmitter()){const n={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e};await this.wire.sendAction(\"unsubscribe-to-desktop-event\",n).catch((()=>null));return this.getOrCreateEmitter()}return Promise.resolve()},p(this,u,[t,...n],\"f\"),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[]}async on(e,t,n){return await this.registerEventListener(e,n,(n=>{n.on(e,t)}),(n=>{n.removeListener(e,t)})),this}async addListener(e,t,n){return this.on(e,t,n)}async once(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.once(e,i),n.once(e,t)}),(n=>{n.removeListener(e,i),n.removeListener(e,t)})),this}async prependListener(e,t,n){return await this.registerEventListener(e,n,(n=>{n.prependListener(e,t)}),(n=>{n.removeListener(e,t)})),this}async prependOnceListener(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.prependOnceListener(e,t),n.once(e,i)}),(n=>{n.removeListener(e,t),n.removeListener(e,i)})),this}async removeListener(e,t,n){const i=await this.deregisterEventListener(e,n);return i&&(i.removeListener(e,t),this.deleteEmitterIfNothingRegistered(i)),this}async deregisterAllListeners(e){const t={...this.identity,type:e,topic:this.topic};if(this.hasEmitter()){const e=this.getOrCreateEmitter(),n=e.listenerCount(t.type),i=[];for(let e=0;enull)));return await Promise.all(i),e}}async removeAllListeners(e){const t=async e=>{const t=await this.deregisterAllListeners(e);t&&(t.removeAllListeners(e),this.deleteEmitterIfNothingRegistered(t))};if(e)await t(e);else if(this.hasEmitter()){const e=this.getOrCreateEmitter().eventNames();await(0,y.promiseMap)(e,t)}return this}deleteEmitterIfNothingRegistered(e){0===e.eventNames().length&&this.wire.eventAggregator.delete(w(this,u,\"f\"))}},u=new WeakMap;d.Reply=class{};var g={};Object.defineProperty(g,\"__esModule\",{value:!0});var m=g.RuntimeError=g.NotSupportedError=g.NotImplementedError=g.NoAckError=g.DuplicateCorrelationError=g.UnexpectedActionError=g.DisconnectedError=void 0;class v extends Error{constructor(e){super(`Expected websocket state OPEN but found ${e}`),this.readyState=e}}g.DisconnectedError=v;class C extends Error{}g.UnexpectedActionError=C;class b extends Error{}g.DuplicateCorrelationError=b;class I extends Error{}g.NoAckError=I;class E extends Error{}g.NotImplementedError=E;class x extends Error{}g.NotSupportedError=x;class A extends Error{constructor(e){const{message:t,name:n,stack:i,...r}=e;super(t),this.name=n||\"Error\",this.stack=i??this.toString(),Object.keys(r).forEach((e=>{this[e]=r[e]}))}}class P extends Error{static getCallSite(e=0){const t=Error.stackTraceLimit,n=e+1;Error.stackTraceLimit=t+n;const i=Error.prepareStackTrace;Error.prepareStackTrace=(e,t)=>t;const r=(new Error).stack?.slice(n)??[];return Error.prepareStackTrace=i,Error.stackTraceLimit=t,r}static prepareStackTrace(e,t){if(\"function\"==typeof Error.prepareStackTrace)return Error.prepareStackTrace(e,t);let n=\"\";n+=e.name||\"Error\",n+=`: ${e.message||\"\"}`;for(const e of t)n+=`\\n at ${e.toString()}`;return n}constructor(e,t){const{reason:n,error:i}=e;super(n),this.name=\"RuntimeError\",i?.stack&&(this.cause=new A(i)),t&&(this.stack=P.prepareStackTrace(this,t))}}m=g.RuntimeError=P;var M={},_={},O={};Object.defineProperty(O,\"__esModule\",{value:!0}),O.validateIdentity=void 0,O.validateIdentity=function(e){let t;return\"object\"==typeof e&&\"string\"==typeof e.uuid||(t=\"Not a valid identity object\"),t};var S={},R={},F={},j={},k={},L={},T={};Object.defineProperty(T,\"__esModule\",{value:!0}),T.handleDeprecatedWarnings=void 0;var $;T.handleDeprecatedWarnings=e=>{(e.contentNavigation?.whitelist||e.contentNavigation?.blacklist||e.contentRedirect?.whitelist||e.contentRedirect?.blacklist)&&console.warn(\"The properties 'whitelist' and 'blacklist' have been marked as deprecated and will be removed in a future version. Please use 'allowlist' and 'denylist'.\")};var B={},G={};Object.defineProperty(G,\"__esModule\",{value:!0}),G.AsyncRetryableLazy=W=G.Lazy=void 0;var W=G.Lazy=class{constructor(e){this.producerFn=e}getValue(){return this.value||(this.value=this.producerFn()),this.value}};G.AsyncRetryableLazy=class{constructor(e){this.producerFn=e}async getValue(){return this.promise||(this.promise=this.producerFn().catch((e=>{throw delete this.promise,e}))),this.promise}};var H={};Object.defineProperty(H,\"__esModule\",{value:!0}),H.WebContents=void 0;const N=d;class D extends N.EmitterBase{constructor(e,t,n){super(e,n,t.uuid,t.name),this.identity=t,this.entityType=n}capturePage(e){return this.wire.sendAction(\"capture-page\",{options:e,...this.identity}).then((({payload:e})=>e.data))}executeJavaScript(e){return this.wire.sendAction(\"execute-javascript-in-window\",{...this.identity,code:e}).then((({payload:e})=>e.data))}getZoomLevel(){return this.wire.sendAction(\"get-zoom-level\",this.identity).then((({payload:e})=>e.data))}setZoomLevel(e){return this.wire.sendAction(\"set-zoom-level\",{...this.identity,level:e}).then((()=>{}))}navigate(e){return this.wire.sendAction(\"navigate-window\",{...this.identity,url:e}).then((()=>{}))}navigateBack(){return this.wire.sendAction(\"navigate-window-back\",{...this.identity}).then((()=>{}))}async navigateForward(){await this.wire.sendAction(\"navigate-window-forward\",{...this.identity})}stopNavigation(){return this.wire.sendAction(\"stop-window-navigation\",{...this.identity}).then((()=>{}))}reload(e=!1){return this.wire.sendAction(\"reload-window\",{ignoreCache:e,...this.identity}).then((()=>{}))}print(e={}){return this.wire.sendAction(\"print\",{...this.identity,options:e}).then((()=>{}))}findInPage(e,t){return this.wire.sendAction(\"find-in-page\",{...this.identity,searchTerm:e,options:t}).then((({payload:e})=>e.data))}stopFindInPage(e){return this.wire.sendAction(\"stop-find-in-page\",{...this.identity,action:e}).then((()=>{}))}getPrinters(){return this.wire.sendAction(\"get-printers\",{...this.identity}).then((({payload:e})=>e.data))}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){await this.wire.sendAction(\"focus-window\",{emitSynthFocused:e,...this.identity})}async showDeveloperTools(){await this.wire.sendAction(\"show-developer-tools\",this.identity)}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction(\"get-process-info\",this.identity);return e}async getSharedWorkers(){return this.wire.sendAction(\"get-shared-workers\",this.identity).then((({payload:e})=>e.data))}async inspectSharedWorker(){await this.wire.sendAction(\"inspect-shared-worker\",{...this.identity})}async inspectSharedWorkerById(e){await this.wire.sendAction(\"inspect-shared-worker-by-id\",{...this.identity,workerId:e})}async inspectServiceWorker(){await this.wire.sendAction(\"inspect-service-worker\",{...this.identity})}async showPopupWindow(e){if(this.wire.sendAction(`${this.entityType}-show-popup-window`,this.identity).catch((()=>{})),e?.onPopupReady){const t=async({popupName:t})=>{try{const n=this.fin.Window.wrapSync({uuid:this.fin.me.uuid,name:t});await e.onPopupReady(n)}catch(e){throw new Error(`Something went wrong during onPopupReady execution: ${e}`)}};await this.once(\"popup-ready\",t)}const{payload:t}=await this.wire.sendAction(\"try-create-popup-window\",{options:{...e,hasResultCallback:!!e?.onPopupResult,hasReadyCallback:!!e?.onPopupReady},...this.identity}),{data:{willOpen:n,options:i}}=t;n&&await this.fin.Window.create(i.initialOptions);if(e?.onPopupResult){const t=async t=>{await e.onPopupResult((e=>{const{name:t,uuid:n,result:i,data:r}=e,o={identity:{name:t,uuid:n},result:i};return r&&(o.data=r),o})(t))},n=async()=>{await this.removeListener(\"popup-result\",t)};await this.on(\"popup-result\",t),await this.once(\"popup-teardown\",n)}const{payload:r}=await this.wire.sendAction(\"show-popup-window\",{options:i,...this.identity});return r.data}}var U,V,z,K,q;function J(){return V||(V=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(function(){if($)return L;$=1,Object.defineProperty(L,\"__esModule\",{value:!0}),L.ViewModule=void 0;const e=d,t=O,n=J(),i=T;class r extends e.Base{async create(e){const{uuid:t}=this.wire.me;if(!e.name||\"string\"!=typeof e.name)throw new Error(\"Please provide a name property as a string in order to create a View.\");return(0,i.handleDeprecatedWarnings)(e),this.wire.environment.childViews?await this.wire.environment.createChildContent({entityType:\"view\",options:{...e,uuid:t}}):await this.wire.sendAction(\"create-view\",{...e,uuid:t}),this.wrapSync({uuid:t,name:e.name})}async wrap(e){this.wire.sendAction(\"view-wrap\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}wrapSync(e){this.wire.sendAction(\"view-wrap-sync\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}getCurrent(){if(this.wire.sendAction(\"view-get-current\").catch((e=>{})),!this.wire.me.isView)throw new Error(\"You are not in a View context\");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction(\"view-get-current-sync\").catch((e=>{})),!this.wire.me.isView)throw new Error(\"You are not in a View context\");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return L.ViewModule=r,L}(),e),n(function(){if(U)return B;var e;U=1,Object.defineProperty(B,\"__esModule\",{value:!0}),B.View=void 0;const t=g,n=G,i=H,r=ie();class o extends i.WebContents{constructor(i,o){super(i,o,\"view\"),this.identity=o,e.set(this,new n.Lazy((()=>this.fin.Platform.wrapSync(this.identity).getClient()))),this.attach=async e=>{await this.wire.sendAction(\"attach-view\",{target:e,...this.identity})},this.destroy=async()=>{await this.wire.sendAction(\"destroy-view\",{...this.identity})},this.show=async()=>{await this.wire.sendAction(\"show-view\",{...this.identity})},this.showAt=async(e,t={})=>{await this.wire.sendAction(\"show-view-at\",{bounds:e,...this.identity,options:t})},this.bringToFront=async()=>{await this.wire.sendAction(\"bring-view-to-front\",{...this.identity})},this.hide=async()=>{await this.wire.sendAction(\"hide-view\",{...this.identity})},this.setBounds=async e=>{await this.wire.sendAction(\"set-view-bounds\",{bounds:e,...this.identity})},this.getBounds=async()=>(await this.wire.sendAction(\"get-view-bounds\",{...this.identity})).payload.data,this.getInfo=async()=>(await this.wire.sendAction(\"get-view-info\",{...this.identity})).payload.data,this.getParentLayout=async()=>(this.wire.sendAction(\"view-get-parent-layout\",{...this.identity}).catch((()=>{})),this.fin.Platform.Layout.getLayoutByViewIdentity(this.identity)),this.getOptions=async()=>this.wire.sendAction(\"get-view-options\",{...this.identity}).then((({payload:e})=>e.data)),this.updateOptions=async e=>this.wire.sendAction(\"update-view-options\",{options:e,...this.identity}).then((()=>{})),this.getCurrentWindow=async()=>{const{payload:{data:e}}=await this.wire.sendAction(\"get-view-window\",{...this.identity});return new r._Window(this.wire,e)},this.getCurrentStack=async()=>{this.wire.sendAction(\"view-get-current-stack\").catch((()=>{}));try{return(await this.getParentLayout()).getStackByViewIdentity(this.identity)}catch(e){throw new t.RuntimeError({reason:\"This view does not belong to a stack.\",error:e})}},this.triggerBeforeUnload=async()=>(await this.wire.sendAction(\"trigger-before-unload\",{...this.identity})).payload.data,this.bindToElement=async e=>{if(!e)throw new Error(\"Element not found.\");return this.wire.environment.observeBounds(e,(async e=>this.setBounds(e)))}}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){const t=await this.getCurrentWindow();await t.focusedWebViewWasChanged(),await super.focus({emitSynthFocused:e})}}return B.View=o,e=new WeakMap,B}(),e)}(k)),k}function Y(){if(z)return j;z=1,Object.defineProperty(j,\"__esModule\",{value:!0}),j.Application=void 0;const e=d,t=ie(),n=J();class i extends e.EmitterBase{constructor(e,n){super(e,\"application\",n.uuid),this.identity=n,this.window=new t._Window(this.wire,{uuid:this.identity.uuid,name:this.identity.uuid})}windowListFromIdentityList(e){const n=[];return e.forEach((e=>{n.push(new t._Window(this.wire,{uuid:e.uuid,name:e.name}))})),n}isRunning(){return this.wire.sendAction(\"is-application-running\",this.identity).then((({payload:e})=>e.data))}async quit(e=!1){try{await this._close(e),await this.wire.sendAction(\"destroy-application\",{force:e,...this.identity})}catch(e){if(![\"Remote connection has closed\",\"Could not locate the requested application\"].some((t=>e.message.includes(t))))throw e}}async _close(e=!1){try{await this.wire.sendAction(\"close-application\",{force:e,...this.identity})}catch(e){if(!e.message.includes(\"Remote connection has closed\"))throw e}}close(e=!1){return console.warn(\"Deprecation Warning: Application.close is deprecated Please use Application.quit\"),this.wire.sendAction(\"application-close\",this.identity).catch((e=>{})),this._close(e)}getChildWindows(){return this.wire.sendAction(\"get-child-windows\",this.identity).then((({payload:e})=>{const t=[];return e.data.forEach((e=>{t.push({uuid:this.identity.uuid,name:e})})),this.windowListFromIdentityList(t)}))}getManifest(){return this.wire.sendAction(\"get-application-manifest\",this.identity).then((({payload:e})=>e.data))}getParentUuid(){return this.wire.sendAction(\"get-parent-application\",this.identity).then((({payload:e})=>e.data))}getShortcuts(){return this.wire.sendAction(\"get-shortcuts\",this.identity).then((({payload:e})=>e.data))}async getViews(){const{payload:e}=await this.wire.sendAction(\"application-get-views\",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}getZoomLevel(){return this.wire.sendAction(\"get-application-zoom-level\",this.identity).then((({payload:e})=>e.data))}getWindow(){return this.wire.sendAction(\"application-get-window\",this.identity).catch((e=>{})),Promise.resolve(this.window)}registerUser(e,t){return this.wire.sendAction(\"register-user\",{userName:e,appName:t,...this.identity}).then((()=>{}))}removeTrayIcon(){return this.wire.sendAction(\"remove-tray-icon\",this.identity).then((()=>{}))}restart(){return this.wire.sendAction(\"restart-application\",this.identity).then((()=>{}))}run(){return console.warn(\"Deprecation Warning: Application.run is deprecated Please use fin.Application.start\"),this.wire.sendAction(\"application-run\",this.identity).catch((e=>{})),this._run()}_run(e={}){return this.wire.sendAction(\"run-application\",{manifestUrl:this._manifestUrl,opts:e,...this.identity}).then((()=>{}))}scheduleRestart(){return this.wire.sendAction(\"relaunch-on-close\",this.identity).then((()=>{}))}async sendApplicationLog(){const{payload:e}=await this.wire.sendAction(\"send-application-log\",this.identity);return e.data}async setJumpList(e){await this.wire.sendAction(\"set-jump-list\",{config:e,...this.identity})}setTrayIcon(e){return this.wire.sendAction(\"set-tray-icon\",{enabledIcon:e,...this.identity}).then((()=>{}))}setShortcuts(e){return this.wire.sendAction(\"set-shortcuts\",{data:e,...this.identity}).then((()=>{}))}async setShortcutQueryParams(e){await this.wire.sendAction(\"set-shortcut-query-args\",{data:e,...this.identity})}setZoomLevel(e){return this.wire.sendAction(\"set-application-zoom-level\",{level:e,...this.identity}).then((()=>{}))}async setAppLogUsername(e){await this.wire.sendAction(\"set-app-log-username\",{data:e,...this.identity})}getTrayIconInfo(){return this.wire.sendAction(\"get-tray-icon-info\",this.identity).then((({payload:e})=>e.data))}hasTrayIcon(){return this.wire.sendAction(\"has-tray-icon\",this.identity).then((({payload:e})=>e.data))}terminate(){return this.wire.sendAction(\"terminate-application\",this.identity).then((()=>{}))}wait(){return this.wire.sendAction(\"wait-for-hung-application\",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction(\"get-info\",this.identity).then((({payload:e})=>e.data))}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction(\"application-get-process-info\",this.identity);return e}async setFileDownloadLocation(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t};await this.wire.sendAction(\"set-file-download-location\",{...n,downloadLocation:e})}async getFileDownloadLocation(){const{payload:{data:e}}=await this.wire.sendAction(\"get-file-download-location\",this.identity);return e}async showTrayIconPopupMenu(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t},{payload:i}=await this.wire.sendAction(\"show-tray-icon-popup-menu\",{...n,options:e});return i.data}async closeTrayIconPopupMenu(){const{name:e}=this.wire.me,t={uuid:this.identity.uuid,name:e};await this.wire.sendAction(\"close-tray-icon-popup-menu\",{...t})}}return j.Application=i,j}function Z(){return q||(q=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(function(){if(K)return F;K=1,Object.defineProperty(F,\"__esModule\",{value:!0}),F.ApplicationModule=void 0;const e=d,t=O,n=Y();class i extends e.Base{async wrap(e){this.wire.sendAction(\"wrap-application\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}wrapSync(e){this.wire.sendAction(\"wrap-application-sync\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}async _create(e){return void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&void 0===e.isPlatformController&&(e.autoShow=!0),await this.wire.sendAction(\"create-application\",e),this.wrap({uuid:e.uuid})}create(e){return console.warn(\"Deprecation Warning: fin.Application.create is deprecated. Please use fin.Application.start\"),this.wire.sendAction(\"application-create\").catch((e=>{})),this._create(e)}async start(e){this.wire.sendAction(\"start-application\").catch((e=>{}));const t=await this._create(e);return await this.wire.sendAction(\"run-application\",{uuid:e.uuid}),t}async startManyManifests(e,t){return this.wire.sendAction(\"run-applications\",{applications:e,opts:t}).then((()=>{}))}getCurrent(){return this.wire.sendAction(\"get-current-application\").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction(\"get-current-application-sync\").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}async startFromManifest(e,t){this.wire.sendAction(\"application-start-from-manifest\").catch((e=>{}));const n=await this._createFromManifest(e);return await n._run(t),n}createFromManifest(e){return console.warn(\"Deprecation Warning: fin.Application.createFromManifest is deprecated. Please use fin.Application.startFromManifest\"),this.wire.sendAction(\"application-create-from-manifest\").catch((e=>{})),this._createFromManifest(e)}_createFromManifest(e){return this.wire.sendAction(\"get-application-manifest\",{manifestUrl:e}).then((({payload:e})=>{const t=e.data.platform?e.data.platform.uuid:e.data.startup_app.uuid;return this.wrap({uuid:t})})).then((t=>(t._manifestUrl=e,t)))}}return F.ApplicationModule=i,F}(),e),n(Y(),e)}(R)),R}H.WebContents=D;var Q={};Object.defineProperty(Q,\"__esModule\",{value:!0}),Q.promisifySubscription=void 0;var X,ee,te;function ne(){if(X)return S;X=1,Object.defineProperty(S,\"__esModule\",{value:!0}),S._Window=void 0;const e=Z(),t=H,n=J(),i=T,r=Q;class o extends t.WebContents{constructor(e,t){super(e,t,\"window\")}async createWindow(e){this.wire.sendAction(\"window-create-window\",this.identity).catch((e=>{}));const t=await(0,r.promisifySubscription)(this,\"fire-constructor-callback\");void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&(e.autoShow=!0),(0,i.handleDeprecatedWarnings)(e);const n=this.wire.environment.createChildContent({entityType:\"window\",options:e}),[o]=await Promise.all([t.getValue(),n]);let s;const{success:a}=o,c=o.data,{message:d}=c;s=a?{httpResponseCode:c.httpResponseCode,apiInjected:c.apiInjected}:{message:c.message,networkErrorCode:c.networkErrorCode,stack:c.stack};const h={message:d,cbPayload:s,success:a};try{this.getWebWindow().fin.__internal_.openerSuccessCBCalled()}catch(e){}return h.success?this:Promise.reject(h)}getAllFrames(){return this.wire.sendAction(\"get-all-frames\",this.identity).then((({payload:e})=>e.data))}getBounds(){return this.wire.sendAction(\"get-window-bounds\",this.identity).then((({payload:e})=>e.data))}center(){return this.wire.sendAction(\"center-window\",this.identity).then((()=>{}))}blur(){return this.wire.sendAction(\"blur-window\",this.identity).then((()=>{}))}bringToFront(){return this.wire.sendAction(\"bring-window-to-front\",this.identity).then((()=>{}))}animate(e,t){return this.wire.sendAction(\"animate-window\",{transitions:e,options:t,...this.identity}).then((()=>{}))}hide(){return this.wire.sendAction(\"hide-window\",this.identity).then((()=>{}))}close(e=!1){return this.wire.sendAction(\"close-window\",{force:e,...this.identity}).then((()=>{Object.setPrototypeOf(this,null)}))}focusedWebViewWasChanged(){return this.wire.sendAction(\"focused-webview-changed\",this.identity).then((()=>{}))}getNativeId(){return this.wire.sendAction(\"get-window-native-id\",this.identity).then((({payload:e})=>e.data))}async getCurrentViews(){const{payload:e}=await this.wire.sendAction(\"window-get-views\",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}disableFrame(){return console.warn(\"Function is deprecated; use disableUserMovement instead.\"),this.wire.sendAction(\"disable-window-frame\",this.identity).then((()=>{}))}disableUserMovement(){return this.wire.sendAction(\"disable-window-frame\",this.identity).then((()=>{}))}enableFrame(){return console.warn(\"Function is deprecated; use enableUserMovement instead.\"),this.wire.sendAction(\"enable-window-frame\",this.identity).then((()=>{}))}enableUserMovement(){return this.wire.sendAction(\"enable-window-frame\",this.identity).then((()=>{}))}flash(){return this.wire.sendAction(\"flash-window\",this.identity).then((()=>{}))}stopFlashing(){return this.wire.sendAction(\"stop-flash-window\",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction(\"get-window-info\",this.identity).then((({payload:e})=>e.data))}async getLayout(e){this.wire.sendAction(\"window-get-layout\",this.identity).catch((e=>{}));const t=await this.getOptions();if(!t.layout&&!t.layoutSnapshot)throw new Error(\"Window does not have a Layout\");return this.fin.Platform.Layout.wrap(e??this.identity)}getOptions(){return this.wire.sendAction(\"get-window-options\",this.identity).then((({payload:e})=>e.data))}getParentApplication(){return this.wire.sendAction(\"window-get-parent-application\",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity))}getParentWindow(){return this.wire.sendAction(\"window-get-parent-window\",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity)).then((e=>e.getWindow()))}async getSnapshot(e){const t={area:e,...this.identity};console.warn(\"Window.getSnapshot has been deprecated, please use Window.capturePage\");return(await this.wire.sendAction(\"get-window-snapshot\",t)).payload.data}getState(){return this.wire.sendAction(\"get-window-state\",this.identity).then((({payload:e})=>e.data))}getWebWindow(){return this.wire.sendAction(\"window-get-web-window\",this.identity).catch((e=>{})),this.wire.environment.getWebWindow(this.identity)}isMainWindow(){return this.wire.sendAction(\"window-is-main-window\",this.identity).catch((e=>{})),this.me.uuid===this.me.name}isShowing(){return this.wire.sendAction(\"is-window-showing\",this.identity).then((({payload:e})=>e.data))}maximize(){return this.wire.sendAction(\"maximize-window\",this.identity).then((()=>{}))}minimize(){return this.wire.sendAction(\"minimize-window\",this.identity).then((()=>{}))}moveBy(e,t,n){return this.wire.sendAction(\"move-window-by\",{deltaLeft:e,deltaTop:t,positioningOptions:n,...this.identity}).then((()=>{}))}moveTo(e,t,n){return this.wire.sendAction(\"move-window\",{left:e,top:t,positioningOptions:n,...this.identity}).then((()=>{}))}resizeBy(e,t,n,i){return this.wire.sendAction(\"resize-window-by\",{deltaWidth:Math.floor(e),deltaHeight:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}resizeTo(e,t,n,i){return this.wire.sendAction(\"resize-window\",{width:Math.floor(e),height:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}restore(){return this.wire.sendAction(\"restore-window\",this.identity).then((()=>{}))}setAsForeground(){return this.wire.sendAction(\"set-foreground-window\",this.identity).then((()=>{}))}setBounds(e,t){return this.wire.sendAction(\"set-window-bounds\",{...e,...this.identity,positioningOptions:t}).then((()=>{}))}show(e=!1){return this.wire.sendAction(\"show-window\",{force:e,...this.identity}).then((()=>{}))}showAt(e,t,n=!1){return this.wire.sendAction(\"show-at-window\",{force:n,left:Math.floor(e),top:Math.floor(t),...this.identity}).then((()=>{}))}updateOptions(e){return this.wire.sendAction(\"update-window-options\",{options:e,...this.identity}).then((()=>{}))}authenticate(e,t){return this.wire.sendAction(\"window-authenticate\",{userName:e,password:t,...this.identity}).then((()=>{}))}async showPopupMenu(e){const{payload:t}=await this.wire.sendAction(\"show-popup-menu\",{options:e,...this.identity});return t.data}async closePopupMenu(){return this.wire.sendAction(\"close-popup-menu\",{...this.identity}).then((()=>{}))}async dispatchPopupResult(e){this.wire.sendAction(\"window-dispatch-popup-result\",this.identity).catch((e=>{})),await this.wire.sendAction(\"dispatch-popup-result\",{data:e,...this.identity})}async print(e={content:\"self\"}){switch(e.content){case void 0:case\"self\":return super.print(e);case\"screenshot\":return this.wire.sendAction(\"print-screenshot\",this.identity).then((()=>{}));case\"views\":return this.wire.sendAction(\"print-views\",{...this.identity,options:e}).then((()=>{}));default:return}}}return S._Window=o,S}function ie(){return te||(te=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(function(){if(ee)return _;ee=1,Object.defineProperty(_,\"__esModule\",{value:!0}),_._WindowModule=void 0;const e=d,t=O,n=ne();class i extends e.Base{async wrap(e){this.wire.sendAction(\"window-wrap\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}wrapSync(e){this.wire.sendAction(\"window-wrap-sync\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}create(e){return this.wire.sendAction(\"create-window\").catch((e=>{})),new n._Window(this.wire,{uuid:this.me.uuid,name:e.name}).createWindow(e)}getCurrent(){if(this.wire.sendAction(\"get-current-window\").catch((e=>{})),!this.wire.me.isWindow)throw new Error(\"You are not in a Window context\");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction(\"get-current-window-sync\").catch((e=>{})),!this.wire.me.isWindow)throw new Error(\"You are not in a Window context\");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return _._WindowModule=i,_}(),e),n(ne(),e)}(M)),M}Q.promisifySubscription=async(e,t,n=(()=>!0),i)=>{let r,o,s;const a=new Promise(((e,t)=>{r=e,o=t})),c=e=>{n(e)&&(clearTimeout(s),r(e))};return await e.on(t,c),i&&(s=setTimeout((()=>o(new Error(\"event timed out\"))),i)),a.finally((()=>{e.removeListener(t,c).catch((()=>null))})),{getValue:()=>a}},Object.defineProperty(c,\"__esModule\",{value:!0}),c.System=void 0;const re=d,oe=g,se=ie(),ae=t;class ce extends re.EmitterBase{constructor(e){super(e,\"system\")}sendExternalProcessRequest(e,t){return new Promise(((n,i)=>{const r=\"external-process-exited\";let o,s,a,c;\"function\"==typeof t.listener&&(a=e=>{const n=e||{};s={topic:\"exited\",uuid:n.processUuid||\"\",exitCode:n.exitCode||0},o===e.processUuid&&(t.listener(s),c.removeListener(r,a))},this.wire.me.name||(this.wire.me.name=this.wire.me.uuid),c=new se._Window(this.wire,this.wire.me),c.on(r,a)),this.wire.sendAction(e,t).then((({payload:e})=>{o=e.data.uuid,n(e.data),s&&o===s.uuid&&(t.listener(s),c.removeListener(r,a))})).catch((e=>{c&&c.removeListener(r,a),i(e)}))}))}getVersion(){return this.wire.sendAction(\"get-version\").then((({payload:e})=>e.data))}clearCache(e){return this.wire.sendAction(\"clear-cache\",e).then((()=>{}))}deleteCacheOnExit(){return this.wire.sendAction(\"delete-cache-request\").then((()=>{}))}exit(){return this.wire.sendAction(\"exit-desktop\").then((()=>{}))}async fetchManifest(e){const{payload:{data:t}}=await this.wire.sendAction(\"fetch-manifest\",{manifestUrl:e});return t}flushCookieStore(){return this.wire.sendAction(\"flush-cookie-store\").then((()=>{}))}getAllWindows(){return this.wire.sendAction(\"get-all-windows\").then((({payload:e})=>e.data))}getAllApplications(){return this.wire.sendAction(\"get-all-applications\").then((({payload:e})=>e.data))}getCommandLineArguments(){return this.wire.sendAction(\"get-command-line-arguments\").then((({payload:e})=>e.data))}async getCrashReporterState(){const{payload:{data:{diagnosticMode:e,isRunning:t}}}=await this.wire.sendAction(\"get-crash-reporter-state\");return console.warn(\"diagnosticMode property is deprecated. It will be removed in a future version\"),{diagnosticMode:e,diagnosticsMode:e,isRunning:t}}async startCrashReporter(e){const t=e,n={...t,diagnosticMode:t.diagnosticsMode||t.diagnosticMode},{payload:{data:{diagnosticMode:i,isRunning:r}}}=await this.wire.sendAction(\"start-crash-reporter\",n);return{diagnosticMode:i,diagnosticsMode:i,isRunning:r}}getUniqueUserId(){return this.wire.sendAction(\"get-unique-user-id\").then((({payload:e})=>e.data))}getEntityInfo(e,t){return this.wire.sendAction(\"get-entity-info\",{uuid:e,name:t}).then((({payload:e})=>e.data))}getEnvironmentVariable(e){return this.wire.sendAction(\"get-environment-variable\",{environmentVariables:e}).then((({payload:e})=>e.data))}getFocusedWindow(){return this.wire.sendAction(\"get-focused-window\").then((({payload:e})=>e.data))}async isAppCertified(e){const{payload:{data:{certifiedInfo:t}}}=await this.wire.sendAction(\"is-app-certified\",{manifestUrl:e});return t}getInstalledRuntimes(){return this.wire.sendAction(\"get-installed-runtimes\").then((({payload:e})=>e.data.runtimes))}async getInstalledApps(){const{payload:{data:{installedApps:e}}}=await this.wire.sendAction(\"get-installed-apps\");return e}getLog(e){return this.wire.sendAction(\"view-log\",e).then((({payload:e})=>e.data))}getMachineId(){return this.wire.sendAction(\"get-machine-id\").then((({payload:e})=>e.data))}getMinLogLevel(){return this.wire.sendAction(\"get-min-log-level\").then((({payload:e})=>e.data))}getLogList(){return this.wire.sendAction(\"list-logs\").then((({payload:e})=>e.data))}getMonitorInfo(){return this.wire.sendAction(\"get-monitor-info\").then((({payload:e})=>e.data))}getMousePosition(){return this.wire.sendAction(\"get-mouse-position\").then((({payload:e})=>e.data))}getProcessList(){return console.warn(\"System.getProcessList has been deprecated. Please consider using our new process APIs: Window.getProcessInfo, View.getProcessInfo, Application.getProcessInfo, System.getAllProcessInfo\"),this.wire.sendAction(\"process-snapshot\").then((({payload:e})=>e.data))}async getAllProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction(\"get-all-process-info\",this.identity);return e}getProxySettings(){return this.wire.sendAction(\"get-proxy-settings\").then((({payload:e})=>e.data))}getRuntimeInfo(){return this.wire.sendAction(\"get-runtime-info\").then((({payload:e})=>e.data))}getRvmInfo(){return this.wire.sendAction(\"get-rvm-info\").then((({payload:e})=>e.data))}getHostSpecs(){return this.wire.sendAction(\"get-host-specs\").then((({payload:e})=>e.data))}getOSInfo(){return this.wire.sendAction(\"get-os-info\").then((({payload:e})=>e.data))}launchExternalProcess(e){return this.sendExternalProcessRequest(\"launch-external-process\",e)}monitorExternalProcess(e){return this.sendExternalProcessRequest(\"monitor-external-process\",e)}log(e,t){return this.wire.sendAction(\"write-to-log\",{level:e,message:t}).then((()=>{}))}openUrlWithBrowser(e){return this.wire.sendAction(\"open-url-with-browser\",{url:e}).then((()=>{}))}async registerCustomProtocol(e){if(\"object\"!=typeof e)throw new Error(\"Must provide an object with a `protocolName` property having a string value.\");await this.wire.sendAction(\"register-custom-protocol\",e)}async unregisterCustomProtocol(e){await this.wire.sendAction(\"unregister-custom-protocol\",{protocolName:e})}async getCustomProtocolState(e){return this.wire.sendAction(\"get-custom-protocol-state\",{protocolName:e}).then((({payload:e})=>e.data))}releaseExternalProcess(e){return this.wire.sendAction(\"release-external-process\",{uuid:e}).then((()=>{}))}showDeveloperTools(e){return this.wire.sendAction(\"show-developer-tools\",e).then((()=>{}))}terminateExternalProcess(e){return this.wire.sendAction(\"terminate-external-process\",e).then((()=>{}))}updateProxySettings(e){return this.wire.sendAction(\"update-proxy\",e).then((()=>{}))}async downloadAsset(e,t){const n=()=>{};let i=n,r=n;const o=new Promise(((e,t)=>{i=e,r=t}));if(\"openfin\"!==this.wire.environment.type)throw new oe.NotSupportedError(\"downloadAsset only supported in an OpenFin Render process\");const s=oe.RuntimeError.getCallSite(),a=this.wire.environment.getNextMessageId().toString(),c=`asset-download-progress-${a}`,d=`asset-download-error-${a}`,h=`asset-download-complete-${a}`,l=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},u=()=>{this.removeListener(c,l)};await Promise.all([this.on(c,l),this.once(d,(e=>{u();const{reason:t,err:n}=e;r(new oe.RuntimeError({reason:t,error:n},s))})),this.once(h,(()=>{u(),i()}))]);const p=Object.assign(e,{downloadId:a});return await this.wire.sendAction(\"download-asset\",p).catch((e=>{throw u(),e})),o}downloadRuntime(e,t){const n=oe.RuntimeError.getCallSite();return new Promise(((i,r)=>{if(\"openfin\"!==this.wire.environment.type)return void r(new oe.NotSupportedError(\"downloadRuntime only supported in an OpenFin Render process\"));const o=this.wire.environment.getNextMessageId().toString(),s=`runtime-download-progress-${o}`,a=`runtime-download-error-${o}`,c=`runtime-download-complete-${o}`,d=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},h=()=>{this.removeListener(s,d)};this.on(s,d),this.once(a,(e=>{h();const{reason:t,err:i}=e;r(new oe.RuntimeError({reason:t,error:i},n))})),this.once(c,(()=>{h(),i()}));const l=Object.assign(e,{downloadId:o});this.wire.sendAction(\"download-runtime\",l).catch((e=>{h(),r(e)}))}))}downloadPreloadScripts(e){return this.wire.sendAction(\"download-preload-scripts\",{scripts:e}).then((({payload:e})=>e.data))}getAllExternalApplications(){return this.wire.sendAction(\"get-all-external-applications\").then((({payload:e})=>e.data))}getAppAssetInfo(e){return this.wire.sendAction(\"get-app-asset-info\",e).then((({payload:e})=>e.data))}getCookies(e){const t=this.wire.environment.getUrl(),n=Object.assign(e,{url:t});return this.wire.sendAction(\"get-cookies\",n).then((({payload:e})=>e.data))}setMinLogLevel(e){return this.wire.sendAction(\"set-min-log-level\",{level:e}).then((()=>{}))}resolveUuid(e){return this.wire.sendAction(\"resolve-uuid\",{entityKey:e}).then((({payload:e})=>e.data))}executeOnRemote(e,t){return t.requestingIdentity=e,this.wire.ferryAction(t)}readRegistryValue(e,t,n){return this.wire.sendAction(\"read-registry-value\",{rootKey:e,subkey:t,value:n}).then((({payload:e})=>e.data))}registerExternalConnection(e){return this.wire.sendAction(\"register-external-connection\",{uuid:e}).then((({payload:e})=>e.data))}async getServiceConfiguration(e){if(\"string\"!=typeof e.name)throw new Error(\"Must provide an object with a `name` property having a string value\");const{name:t}=e;return this.wire.sendAction(\"get-service-configuration\",{name:t}).then((({payload:e})=>e.data))}async getSystemAppConfig(e){if(\"string\"!=typeof e)throw new Error(\"Must provide a string value for name of system app\");return this.wire.sendAction(\"get-system-app-configuration\",{name:e}).then((({payload:e})=>e.data))}async registerShutdownHandler(e){this.wire.sendAction(\"system-register-shutdown-handler\").catch((e=>{}));const{uuid:t,name:n}=this.wire.me;this.on(\"system-shutdown\",(i=>{e({proceed:()=>{this.wire.environment.raiseEvent(\"application/system-shutdown-handled\",{uuid:t,name:n,topic:\"application\"})}})}))}runRvmHealthCheck(){return this.wire.sendAction(\"run-rvm-health-check\").then((({payload:e})=>e.data))}async launchManifest(e,t={}){const{subscribe:n,...i}=t,r=i;if(n){const e=new ae.EventEmitter;n(e);const t=\"app-version-progress\",i=\"runtime-status\",o=\"app-version-complete\",s=\"app-version-error\",a=this.wire.environment.getNextMessageId().toString();r.appVersionId=a;const c=[o,t,i,s],d=e=>{const{appVersionId:t,topic:n,type:i,...r}=e;return{...r,type:c.find((e=>i.includes(e)))}},h=t=>{const n=d(t);e.emit(n.type,n)},l=()=>{this.removeListener(`${t}.${a}`,h),this.removeListener(`${i}.${a}`,h),this.removeListener(`${o}.${a}`,h),this.removeListener(`${s}.${a}`,h),this.removeListener(`${o}.${a}`,l),this.removeListener(`${s}.${a}`,l)};await Promise.all([this.on(`${t}.${a}`,h),this.on(`${i}.${a}`,h),this.once(`${o}.${a}`,h),this.once(`${s}.${a}`,h),this.once(`${o}.${a}`,l),this.once(`${s}.${a}`,l)])}return(await this.wire.sendAction(\"launch-manifest\",{manifestUrl:e,opts:r})).payload.data.manifest}async queryPermissionForCurrentContext(e){const t={uuid:this.wire.me.uuid,name:this.wire.me.name};return(await this.wire.sendAction(\"query-permission-for-current-context\",{apiName:e,identity:t})).payload.data}async enableNativeWindowIntegrationProvider(e){const{payload:t}=await this.wire.sendAction(\"enable-native-window-integration-provider\",{permissions:e});return t.data}async registerUsage({data:e,type:t}){await this.wire.sendAction(\"register-usage\",{data:e,type:t})}async getPrinters(){const{payload:e}=await this.wire.sendAction(\"system-get-printers\");return e.data}async updateProcessLoggingOptions(e){await this.wire.sendAction(\"system-update-process-logging-options\",{options:e})}async getDomainSettings(){const{payload:{data:e}}=await this.wire.sendAction(\"get-domain-settings\",this.identity);return e}async setDomainSettings(e){await this.wire.sendAction(\"set-domain-settings\",{domainSettings:e,...this.identity})}async refreshExtensions(){const{payload:e}=await this.wire.sendAction(\"refresh-extensions\");return e.data}async getInstalledExtensions(){const{payload:e}=await this.wire.sendAction(\"get-installed-extensions\");return e.data}}c.System=ce;var de={},he={};Object.defineProperty(he,\"__esModule\",{value:!0}),he.RefCounter=void 0;he.RefCounter=class{constructor(){this.topicRefMap=new Map}incRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t+1;n=i,this.topicRefMap.set(e,i)}else this.topicRefMap.set(e,1),n=1;return n}decRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t-1;this.topicRefMap.set(e,i),n=i}else n=-1;return n}actOnFirst(e,t,n){return 1===this.incRefCount(e)?t():n()}actOnLast(e,t,n){return 0===this.decRefCount(e)?t():n()}};var le={},ue={},pe={};Object.defineProperty(pe,\"__esModule\",{value:!0}),pe.ChannelBase=pe.ProtectedItems=void 0;const we=e=>async(t,n,i)=>{const r=await e(t,n,i);return void 0===r?n:r};pe.ProtectedItems=class{constructor(e,t){this.providerIdentity=e,this.close=t}};class ye{static defaultAction(e){throw new Error(`No action registered at target for ${e}`)}constructor(){this.subscriptions=new Map}async processAction(e,t,n){try{const i=this.subscriptions.has(e)?this.subscriptions.get(e):(t,n)=>(this.defaultAction??ye.defaultAction)(e,t,n),r=this.preAction?await this.preAction(e,t,n):t,o=await i(r,n);return this.postAction?await this.postAction(e,o,n):o}catch(t){if(this.errorMiddleware)return this.errorMiddleware(e,t,n);throw t}}beforeAction(e){if(this.preAction)throw new Error(\"Already registered beforeAction middleware\");this.preAction=we(e)}onError(e){if(this.errorMiddleware)throw new Error(\"Already registered error middleware\");this.errorMiddleware=e}afterAction(e){if(this.postAction)throw new Error(\"Already registered afterAction middleware\");this.postAction=we(e)}remove(e){this.subscriptions.delete(e)}setDefaultAction(e){if(this.defaultAction)throw new Error(\"default action can only be set once\");this.defaultAction=e}register(e,t){if(this.subscriptions.has(e))throw new Error(`Subscription already registered for action: ${e}. Unsubscribe before adding new subscription`);return this.subscriptions.set(e,t),!0}}pe.ChannelBase=ye;var fe,ge,me,ve=s&&s.__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)},Ce=s&&s.__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};Object.defineProperty(ue,\"__esModule\",{value:!0}),ue.ChannelClient=void 0;const be=pe,Ie=new Map;class Ee extends be.ChannelBase{static closeChannelByEndpointId(e){const t=Ie.get(e);t&&ve(t,me,\"f\").call(t)}static handleProviderDisconnect(e){for(const t of Ie.values())t.providerIdentity.channelId===e.channelId&&(t.disconnectListener(e),ve(t,me,\"f\").call(t))}constructor(e,t,n){super(),fe.set(this,void 0),ge.set(this,void 0),this.processAction=(e,t,n)=>super.processAction(e,t,n),me.set(this,(()=>{Ie.delete(this.endpointId),ve(this,ge,\"f\").close()})),Ce(this,fe,new be.ProtectedItems(e,t),\"f\"),this.disconnectListener=()=>{},this.endpointId=e.endpointId,Ce(this,ge,n,\"f\"),Ie.set(this.endpointId,this),n.receive(this.processAction)}get providerIdentity(){return ve(this,fe,\"f\").providerIdentity}async dispatch(e,t){if(ve(this,ge,\"f\").isEndpointConnected(this.providerIdentity.channelId))return ve(this,ge,\"f\").send(this.providerIdentity.channelId,e,t);throw new Error(\"The client you are trying to dispatch from is disconnected from the target provider.\")}onDisconnection(e){this.disconnectListener=t=>{try{e(t)}catch(e){throw new Error(`Error while calling the onDisconnection callback: ${e.message}`)}finally{this.disconnectListener=()=>{}}}}async disconnect(){await this.sendDisconnectAction(),ve(this,me,\"f\").call(this)}async sendDisconnectAction(){const e=ve(this,fe,\"f\");await e.close()}static async wireClose(e,t,n){const{channelName:i,uuid:r,name:o}=t;await e.sendAction(\"disconnect-from-channel\",{channelName:i,uuid:r,name:o,endpointId:n})}}ue.ChannelClient=Ee,fe=new WeakMap,ge=new WeakMap,me=new WeakMap;var xe={},Ae={};Object.defineProperty(Ae,\"__esModule\",{value:!0}),Ae.exhaustiveCheck=void 0,Ae.exhaustiveCheck=function(e,t){throw new Error(`Unsupported value: ${e}${t?`\\n Supported values are: ${t.join(\"\")}`:\"\"}`)};var Pe,Me,_e,Oe={},Se=s&&s.__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},Re=s&&s.__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)};Object.defineProperty(Oe,\"__esModule\",{value:!0}),Oe.ClassicInfo=Oe.ClassicStrategy=void 0;Oe.ClassicStrategy=class{constructor(e,t,n,i){this.messageReceiver=t,this.endpointId=n,this.providerIdentity=i,Pe.set(this,void 0),Me.set(this,new Map),_e.set(this,new Map),this.send=async(e,t,n)=>{const i=Re(this,Me,\"f\").get(e);if(!i)throw new Error(`Could not locate routing info for endpoint ${e}`);const r={...i};r.isLocalEndpointId&&delete r.endpointId,delete r.isLocalEndpointId;const o=Re(this,Pe,\"f\").sendAction(\"send-channel-message\",{...r,providerIdentity:this.providerIdentity,action:t,payload:n});Re(this,_e,\"f\").get(e)?.add(o);return(await o.catch((e=>{throw new Error(e.message)})).finally((()=>{Re(this,_e,\"f\").get(e)?.delete(o)}))).payload.data.result},this.close=async()=>{this.messageReceiver.removeEndpoint(this.providerIdentity.channelId,this.endpointId),[...Re(this,Me,\"f\").keys()].forEach((e=>this.closeEndpoint(e))),Se(this,Me,new Map,\"f\")},Se(this,Pe,e,\"f\")}onEndpointDisconnect(e,t){}receive(e){this.messageReceiver.addEndpoint(e,this.providerIdentity.channelId,this.endpointId)}async closeEndpoint(e){const t=Re(this,Me,\"f\").get(e);Re(this,Me,\"f\").delete(e);const n=Re(this,_e,\"f\").get(e);n?.forEach((n=>{const i=`Channel connection with identity uuid: ${t?.uuid} / name: ${t?.name} / endpointId: ${e} no longer connected.`;n.cancel(new Error(i))}))}isEndpointConnected(e){return Re(this,Me,\"f\").has(e)}addEndpoint(e,t){Re(this,Me,\"f\").set(e,t.endpointIdentity),Re(this,_e,\"f\").set(e,new Set)}isValidEndpointPayload(e){return\"string\"==typeof e?.endpointIdentity?.endpointId||\"string\"==typeof e?.endpointIdentity?.channelId}},Pe=new WeakMap,Me=new WeakMap,_e=new WeakMap,Oe.ClassicInfo={version:5,minimumVersion:0,type:\"classic\"};var Fe={},je={},ke={};Object.defineProperty(ke,\"__esModule\",{value:!0}),ke.errorToPOJO=void 0,ke.errorToPOJO=function(e){return{stack:e.stack,name:e.name,message:e.message,toString:()=>e.stack||e.toString()}};var Le,Te,$e=s&&s.__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)},Be=s&&s.__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};Object.defineProperty(je,\"__esModule\",{value:!0}),je.RTCEndpoint=void 0;const Ge=ke;je.RTCEndpoint=class{static isValidEndpointPayload(e){const t=e=>\"object\"==typeof e&&null!==e;return t(e)&&t(e.endpointIdentity)&&t(e.rtc)&&\"string\"==typeof e.endpointIdentity.endpointId}constructor({rtc:e,endpointIdentity:t}){this.responseMap=new Map,Le.set(this,null),Te.set(this,void 0),this.connectionStateChangeHandler=e=>{\"connected\"!==this.rtc.rtcClient.connectionState&&(this.rtc.rtcClient.removeEventListener(\"connectionstatechange\",this.connectionStateChangeHandler),this.close(),$e(this,Te,\"f\")&&$e(this,Te,\"f\").call(this))},this.send=async(e,t)=>{const n=`message-${Math.random()}`,i=new Promise(((e,t)=>{this.responseMap.set(n,{resolve:e,reject:t})}));return this.rtc.channels.request.send(JSON.stringify({action:e,payload:t,messageId:n})),i},this.close=()=>{this.responseMap.forEach((e=>e.reject(\"Connection has closed.\"))),this.responseMap=new Map,this.rtc.channels.request.close(),this.rtc.channels.response.close(),this.rtc.rtcClient.close()},this.rtc=e,this.endpointIdentity=t,this.rtc.channels.response.addEventListener(\"message\",(e=>{let{data:t}=e;e.data instanceof ArrayBuffer&&(t=(new TextDecoder).decode(e.data));const{messageId:n,payload:i,success:r,error:o}=JSON.parse(t),{resolve:s,reject:a}=this.responseMap.get(n)??{};s&&a?(this.responseMap.delete(n),r?s(i):a(o)):(console.log(\"Could not find id in responseMap.\"),console.log(e))})),this.rtc.channels.request.addEventListener(\"message\",(async e=>{let{data:n}=e;e.data instanceof ArrayBuffer&&(n=(new TextDecoder).decode(e.data));const{messageId:i,action:r,payload:o}=JSON.parse(n);if($e(this,Le,\"f\"))try{const e=await $e(this,Le,\"f\").call(this,r,o,t);this.rtc.channels.response.send(JSON.stringify({messageId:i,payload:e,success:!0}))}catch(e){\"open\"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,error:(0,Ge.errorToPOJO)(e),success:!1}))}else\"open\"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,success:!1,error:\"Connection not ready.\"}))})),this.rtc.rtcClient.addEventListener(\"connectionstatechange\",this.connectionStateChangeHandler),Object.values(this.rtc.channels).forEach((e=>{e.onclose=e=>{[...this.responseMap.values()].forEach((e=>e.reject(new Error(\"RTCDataChannel closed unexpectedly, this is most commonly caused by message size. Note: RTC Channels have a message size limit of ~255kB.\")))),this.close(),$e(this,Te,\"f\")&&$e(this,Te,\"f\").call(this)}}))}onDisconnect(e){if($e(this,Te,\"f\"))throw new Error(\"RTCEndpoint disconnectListener cannot be set twice.\");Be(this,Te,e,\"f\")}receive(e){if($e(this,Le,\"f\"))throw new Error(\"You have already set a listener for this RTC Endpoint.\");Be(this,Le,e,\"f\")}get connected(){return\"connected\"===this.rtc.rtcClient.connectionState}},Le=new WeakMap,Te=new WeakMap;var We,He,Ne,De={},Ue=s&&s.__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)},Ve=s&&s.__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};Object.defineProperty(De,\"__esModule\",{value:!0}),De.EndpointStrategy=void 0;De.EndpointStrategy=class{constructor(e,t,n){this.EndpointType=e,this.StrategyName=n,We.set(this,null),He.set(this,new Map),Ne.set(this,!0),this.send=async(e,t,n)=>this.getEndpointById(e).send(t,n),this.close=async()=>{Ue(this,Ne,\"f\")&&(Ue(this,He,\"f\").forEach((e=>e.close())),Ve(this,He,new Map,\"f\")),Ve(this,Ne,!1,\"f\")},this.isValidEndpointPayload=t}onEndpointDisconnect(e,t){this.getEndpointById(e).onDisconnect(t)}receive(e){if(Ue(this,We,\"f\"))throw new Error(`You have already set a listener for this ${this.StrategyName} Strategy`);Ve(this,We,e,\"f\"),Ue(this,He,\"f\").forEach((e=>e.receive(Ue(this,We,\"f\"))))}getEndpointById(e){const t=Ue(this,He,\"f\").get(e);if(!t)throw new Error(`Client with endpoint id ${e} is not connected`);return t}get connected(){return Ue(this,Ne,\"f\")}isEndpointConnected(e){return Ue(this,He,\"f\").has(e)}addEndpoint(e,t){if(!Ue(this,Ne,\"f\"))return void console.warn(`Adding endpoint to disconnected ${this.StrategyName} Strategy`);const n=new this.EndpointType(t);Ue(this,We,\"f\")&&n.receive(Ue(this,We,\"f\")),Ue(this,He,\"f\").set(e,n)}async closeEndpoint(e){Ue(this,He,\"f\").delete(e)}},We=new WeakMap,He=new WeakMap,Ne=new WeakMap,Object.defineProperty(Fe,\"__esModule\",{value:!0}),Fe.RTCInfo=Fe.RTCStrategy=void 0;const ze=je,Ke=De;class qe extends Ke.EndpointStrategy{constructor(){super(ze.RTCEndpoint,ze.RTCEndpoint.isValidEndpointPayload,\"RTC\")}}Fe.RTCStrategy=qe,Fe.RTCInfo={version:2,minimumVersion:0,type:\"rtc\"};var Je={};Object.defineProperty(Je,\"__esModule\",{value:!0}),Je.RTCICEManager=void 0;const Ye=d;class Ze extends Ye.EmitterBase{constructor(e){super(e,\"channel\"),this.ensureChannelOpened=e=>new Promise(((t,n)=>{if(\"open\"===e.readyState)t();else if(\"connecting\"===e.readyState){const n=()=>{e.removeEventListener(\"open\",n),t()};e.addEventListener(\"open\",n)}else n(new Error(\"This Channel has already closed\"))}))}static createDataChannelPromise(e,t){let n;const i=new Promise((e=>{n=e})),r=i=>{const o=()=>{i.channel.removeEventListener(\"open\",o),n(i.channel)};i.channel.label===e&&(i.channel.addEventListener(\"open\",o),t.removeEventListener(\"datachannel\",r))};return t.addEventListener(\"datachannel\",r),i}async listenForProviderIce(e,t){await this.on(this.createProviderEventName(e),t,{timestamp:Date.now()})}async raiseProviderIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createProviderEventName(e)),t)}async listenForClientIce(e,t){await this.on(this.createClientEventName(e),t,{timestamp:Date.now()})}async raiseClientIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createClientEventName(e)),t)}cleanupIceListeners(e){this.removeAllListeners(this.createClientEventName(e)),this.removeAllListeners(this.createProviderEventName(e))}createClientEventName(e){return`ice-client-${e}`}createProviderEventName(e){return`ice-provider-${e}`}createRouteString(e){return`channel/${e}`}createRtcPeer(){return this.wire.environment.getRtcPeer()}async startClientOffer(){const e=Math.random().toString(),t=this.createRtcPeer();t.addEventListener(\"icecandidate\",(async t=>{t.candidate&&await this.raiseClientIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForProviderIce(e,(async e=>{await t.addIceCandidate(e.candidate)}));const n={request:t.createDataChannel(\"request\"),response:t.createDataChannel(\"response\")},i=await t.createOffer();await t.setLocalDescription(i);const r=Promise.all([n.request,n.response].map(this.ensureChannelOpened)).then((()=>{}));return{rtcClient:t,channels:n,offer:i,rtcConnectionId:e,channelsOpened:r}}async finishClientOffer(e,t,n){return await e.setRemoteDescription(t),await n,!0}async createProviderAnswer(e,t){const n=this.createRtcPeer(),i=Ze.createDataChannelPromise(\"request\",n),r=Ze.createDataChannelPromise(\"response\",n);n.addEventListener(\"icecandidate\",(async t=>{t.candidate&&await this.raiseProviderIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForClientIce(e,(async e=>{await n.addIceCandidate(e.candidate)})),await n.setRemoteDescription(t);const o=await n.createAnswer();await n.setLocalDescription(o);const s=Promise.all([i,r]).then((([t,n])=>(this.cleanupIceListeners(e),{request:t,response:n})));return{rtcClient:n,answer:o,channels:s}}}Je.RTCICEManager=Ze;var Qe={},Xe={};function et(e){return[...e.split(\".\").reverse().entries()].reduce(((e,[t,n])=>e+ +n*1e4**t),0)}function tt(e,t){return et(e)>=et(t)}function nt(e){return e.split(\"/\")[0]}Object.defineProperty(Xe,\"__esModule\",{value:!0}),Xe.runtimeUuidMeetsMinimumRuntimeVersion=Xe.parseRuntimeUuid=Xe.meetsMinimumRuntimeVersion=void 0,Xe.meetsMinimumRuntimeVersion=tt,Xe.parseRuntimeUuid=nt,Xe.runtimeUuidMeetsMinimumRuntimeVersion=function(e,t){return tt(nt(e),t)};var it,rt,ot,st,at,ct=s&&s.__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)},dt=s&&s.__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};Object.defineProperty(Qe,\"__esModule\",{value:!0}),Qe.ChannelProvider=void 0;const ht=pe,lt=Xe;class ut extends ht.ChannelBase{get connections(){return[...ct(this,it,\"f\")]}static handleClientDisconnection(e,t){const n=e.connections.find((e=>e.endpointId===t.endpointId));if(n)ct(e,st,\"f\").call(e,n);else{e.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name)).forEach(ct(e,st,\"f\"))}e.disconnectListener(t)}static setProviderRemoval(e,t){ut.removalMap.set(e,t)}constructor(e,t,n){super(),it.set(this,void 0),rt.set(this,void 0),ot.set(this,void 0),st.set(this,(e=>{const t=this.connections.filter((t=>t.endpointId!==e.endpointId));ct(this,ot,\"f\").closeEndpoint(e.endpointId),dt(this,it,t,\"f\")})),this.processAction=async(e,t,n)=>(ut.clientIsMultiRuntime(n)&&!(0,lt.runtimeUuidMeetsMinimumRuntimeVersion)(n.runtimeUuid,\"18.87.56.0\")?this.handleMultiRuntimeLegacyClient(n):this.checkForClientConnection(n),super.processAction(e,t,n)),at.set(this,(()=>{ct(this,ot,\"f\").close();const e=ut.removalMap.get(this);e&&e()})),dt(this,rt,new ht.ProtectedItems(e,t),\"f\"),this.connectListener=()=>{},this.disconnectListener=()=>{},dt(this,it,[],\"f\"),dt(this,ot,n,\"f\"),n.receive(this.processAction)}dispatch(e,t,n){const i=e.endpointId??this.getEndpointIdForOpenFinId(e,t);return i&&ct(this,ot,\"f\").isEndpointConnected(i)?ct(this,ot,\"f\").send(i,t,n):Promise.reject(new Error(`Client connection with identity uuid: ${e.uuid} / name: ${e.name} / endpointId: ${i} no longer connected.`))}async processConnection(e,t){return ct(this,it,\"f\").push(e),this.connectListener(e,t)}publish(e,t){return this.connections.map((n=>ct(this,ot,\"f\").send(n.endpointId,e,t)))}onConnection(e){this.connectListener=e}onDisconnection(e){this.disconnectListener=e}async destroy(){const e=ct(this,rt,\"f\");e.providerIdentity,dt(this,it,[],\"f\"),await e.close(),ct(this,at,\"f\").call(this)}async getAllClientInfo(){return this.connections.map((e=>{const{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}=e;return{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}}))}checkForClientConnection(e){if(!this.isClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider.\\n Client Identity: {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}isClientConnected(e){return ut.clientIdentityIncludesEndpointId(e)?this.connections.some((t=>t.endpointId===e.endpointId&&t.uuid===e.uuid&&t.name===e.name)):this.isLegacyClientConnected(e)}isLegacyClientConnected(e){return this.connections.some((t=>t.uuid===e.uuid&&t.name===e.name))}handleMultiRuntimeLegacyClient(e){if(!this.isLegacyClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider. Client Identity:\\n {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}getEndpointIdForOpenFinId(e,t){const n=this.connections.filter((t=>t.name===e.name&&t.uuid===e.uuid));if(n.length>=2){const n=ct(this,rt,\"f\"),{uuid:i,name:r}=e,o=n?.providerIdentity.uuid,s=n?.providerIdentity.name;console.warn(`WARNING: Dispatch call may have unintended results. The \"to\" argument of your dispatch call is missing the\\n \"endpointId\" parameter. The identity you are dispatching to ({uuid: ${i}, name: ${r}})\\n has multiple channelClients for this channel. Your dispatched action: (${t}) from the provider:\\n ({uuid: ${o}, name: ${s}}) will only be processed by the most recently-created client.`)}return n.pop()?.endpointId}static clientIdentityIncludesEndpointId(e){return void 0!==e.endpointId}static clientIsMultiRuntime(e){return void 0!==e.runtimeUuid}static async wireClose(e,t){await e.sendAction(\"destroy-channel\",{channelName:t})}}Qe.ChannelProvider=ut,it=new WeakMap,rt=new WeakMap,ot=new WeakMap,st=new WeakMap,at=new WeakMap,ut.removalMap=new WeakMap;var pt={};Object.defineProperty(pt,\"__esModule\",{value:!0}),pt.MessageReceiver=void 0;const wt=ue,yt=d;class ft extends yt.Base{constructor(e){super(e),this.onmessage=e=>\"process-channel-message\"===e.action&&(this.processChannelMessage(e),!0),this.endpointMap=new Map,this.latestEndpointIdByChannelId=new Map,e.registerMessageHandler(this.onmessage.bind(this))}async processChannelMessage(e){const{senderIdentity:t,providerIdentity:n,action:i,ackToSender:r,payload:o,intendedTargetIdentity:s}=e.payload,a=s.channelId??s.endpointId??this.latestEndpointIdByChannelId.get(n.channelId),c=this.endpointMap.get(a);if(!c)return r.payload.success=!1,r.payload.reason=`Client connection with identity uuid: ${this.wire.me.uuid} / name: ${this.wire.me.name} / endpointId: ${a} no longer connected.`,this.wire.sendRaw(r);try{const e=await c(i,o,t);return r.payload.payload=r.payload.payload||{},r.payload.payload.result=e,this.wire.sendRaw(r)}catch(e){return r.payload.success=!1,r.payload.reason=e.message,this.wire.sendRaw(r)}}addEndpoint(e,t,n){this.endpointMap.set(n,e),t!==n&&this.latestEndpointIdByChannelId.set(t,n)}removeEndpoint(e,t){this.endpointMap.delete(t),this.latestEndpointIdByChannelId.get(e)===t&&this.latestEndpointIdByChannelId.delete(e)}checkForPreviousClientConnection(e){const t=this.latestEndpointIdByChannelId.get(e);t&&(wt.ChannelClient.closeChannelByEndpointId(t),console.warn(\"You have created a second connection to an older provider. First connection has been removed from the clientMap\"),console.warn(\"If the provider calls publish(), you may receive multiple messages.\"))}}pt.MessageReceiver=ft;var gt={};Object.defineProperty(gt,\"__esModule\",{value:!0}),gt.ProtocolManager=void 0;gt.ProtocolManager=class{constructor(e){this.ProtocolsInPreferenceOrder=e,this.DefaultClientProtocols=[\"classic\"],this.DefaultProviderProtocols=[\"classic\"],this.getClientProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultClientProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(\", \")}.`);return t},this.getProviderProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultProviderProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(\", \")}.`);return t},this.getCompatibleProtocols=(e,t)=>t.supportedProtocols.filter((t=>e.some((e=>e.type===t.type&&t.version>=e.minimumVersion&&e.version>=(t.minimumVersion??0))))).slice(0,t.maxProtocols)}};var mt={};Object.defineProperty(mt,\"__esModule\",{value:!0});class vt{static combine(e,t){return new vt(e,t)}constructor(e,t){this.primary=e,this.secondary=t}onEndpointDisconnect(e,t){this.primary.onEndpointDisconnect(e,(()=>{this.secondary.isEndpointConnected(e)||t()})),this.secondary.onEndpointDisconnect(e,(()=>{this.primary.isEndpointConnected(e)||t()}))}isValidEndpointPayload(e){return this.primary.isValidEndpointPayload(e)||this.secondary.isValidEndpointPayload(e)}async closeEndpoint(e){await this.primary.closeEndpoint(e),await this.secondary.closeEndpoint(e)}isEndpointConnected(e){return this.primary.isEndpointConnected(e)||this.secondary.isEndpointConnected(e)}async addEndpoint(e,t){this.primary.isValidEndpointPayload(t)&&await this.primary.addEndpoint(e,t),this.secondary.isValidEndpointPayload(t)&&await this.secondary.addEndpoint(e,t)}receive(e){this.primary.receive(e),this.secondary.receive(e)}send(e,t,n){return this.primary.isEndpointConnected(e)?this.primary.send(e,t,n):this.secondary.send(e,t,n)}async close(){await Promise.all([this.primary.close(),this.secondary.close()])}}mt.default=vt;var Ct,bt,It=s&&s.__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},Et=s&&s.__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)},xt=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(xe,\"__esModule\",{value:!0}),xe.ConnectionManager=void 0;const At=Ae,Pt=d,Mt=Oe,_t=Fe,Ot=Je,St=Qe,Rt=pt,Ft=gt,jt=xt(mt);class kt extends Pt.Base{static getProtocolOptionsFromStrings(e){return e.map((e=>{switch(e){case\"rtc\":return _t.RTCInfo;case\"classic\":return Mt.ClassicInfo;default:return(0,At.exhaustiveCheck)(e,[\"rtc\",\"classic\"])}}))}constructor(e){super(e),Ct.set(this,void 0),bt.set(this,void 0),this.removeChannelFromProviderMap=e=>{this.providerMap.delete(e)},this.onmessage=e=>\"process-channel-connection\"===e.action&&(this.processChannelConnection(e),!0),this.providerMap=new Map,this.protocolManager=new Ft.ProtocolManager(\"node\"===this.wire.environment.type?[\"classic\"]:[\"rtc\",\"classic\"]),It(this,Ct,new Rt.MessageReceiver(e),\"f\"),It(this,bt,new Ot.RTCICEManager(e),\"f\"),e.registerMessageHandler(this.onmessage.bind(this))}createProvider(e,t){const n=Object.assign(this.wire.environment.getDefaultChannelOptions().create,e||{}),i=this.protocolManager.getProviderProtocols(n?.protocols),r=i.map((e=>{switch(e){case\"rtc\":return new _t.RTCStrategy;case\"classic\":return new Mt.ClassicStrategy(this.wire,Et(this,Ct,\"f\"),t.channelId,t);default:return(0,At.exhaustiveCheck)(e,[\"rtc\",\"classic\"])}}));let o;if(2===r.length){const[e,t]=r;o=jt.default.combine(e,t)}else{if(1!==r.length)throw new Error(\"failed to combine strategies\");[o]=r}const s=new St.ChannelProvider(t,(()=>St.ChannelProvider.wireClose(this.wire,t.channelName)),o),a=t.channelId;return this.providerMap.set(a,{provider:s,strategy:o,supportedProtocols:kt.getProtocolOptionsFromStrings(i)}),St.ChannelProvider.setProviderRemoval(s,this.removeChannelFromProviderMap.bind(this)),s}async createClientOffer(e){const t=this.protocolManager.getClientProtocols(e?.protocols);let n;return{offer:{supportedProtocols:await Promise.all(t.map((async e=>{switch(e){case\"rtc\":{const{rtcClient:e,channels:t,offer:i,rtcConnectionId:r,channelsOpened:o}=await Et(this,bt,\"f\").startClientOffer();return n={rtcClient:e,channels:t,channelsOpened:o},{type:\"rtc\",version:_t.RTCInfo.version,payload:{offer:i,rtcConnectionId:r}}}case\"classic\":return{type:\"classic\",version:Mt.ClassicInfo.version};default:return(0,At.exhaustiveCheck)(e,[\"rtc\",\"classic\"])}}))),maxProtocols:2},rtc:n}}async createClientStrategy(e,t){t.endpointId||(t.endpointId=this.wire.environment.getNextMessageId(),Et(this,Ct,\"f\").checkForPreviousClientConnection(t.channelId));const n=t.answer??{supportedProtocols:[{type:\"classic\",version:1}]},i=(await Promise.all(n.supportedProtocols.map((async n=>\"rtc\"===n.type&&e?(await Et(this,bt,\"f\").finishClientOffer(e.rtcClient,n.payload.answer,e.channelsOpened),new _t.RTCStrategy):\"classic\"===n.type?new Mt.ClassicStrategy(this.wire,Et(this,Ct,\"f\"),t.endpointId,t):null)))).filter((e=>null!==e));let r;if(e&&!i.some((e=>e instanceof _t.RTCStrategy))&&e&&e.rtcClient.close(),i.length>=2)r=jt.default.combine(i[0],i[1]);else{if(!i.length)throw new Error(\"No compatible protocols\");[r]=i}const o={endpointIdentity:t,rtc:e};return r.addEndpoint(t.channelId,o),r}async processChannelConnection(e){const{clientIdentity:t,providerIdentity:n,ackToSender:i,payload:r,offer:o}=e.payload;t.endpointId?t.isLocalEndpointId=!1:(t.endpointId=this.wire.environment.getNextMessageId(),t.isLocalEndpointId=!0);const s=n.channelId,a=this.providerMap.get(s);if(!a)return i.payload.success=!1,i.payload.reason=`Channel \"${n.channelName}\" has been destroyed.`,this.wire.sendRaw(i);const{provider:c,strategy:d,supportedProtocols:h}=a;try{if(!(c instanceof St.ChannelProvider))throw Error(\"Cannot connect to a channel client\");const e=o??{supportedProtocols:[{type:\"classic\",version:1}],maxProtocols:1},n=this.protocolManager.getCompatibleProtocols(h,e);if(!n.length)throw new Error(\"This provider does not support any of the offered protocols.\");const s=await c.processConnection(t,r);i.payload.payload=i.payload.payload||{};let a={supportedProtocols:[],endpointPayloadPromise:Promise.resolve({endpointIdentity:t})};return a=await n.reduce((async(e,t)=>{const n=await e;if(\"rtc\"===t.type){const{answer:e,rtcClient:i,channels:r}=await Et(this,bt,\"f\").createProviderAnswer(t.payload.rtcConnectionId,t.payload.offer);n.supportedProtocols.push({type:\"rtc\",version:_t.RTCInfo.version,payload:{answer:e}}),n.endpointPayloadPromise=n.endpointPayloadPromise.then((e=>r.then((t=>({...e,rtc:{rtcClient:i,channels:t}})))))}else n.supportedProtocols.push({type:\"classic\",version:Mt.ClassicInfo.version});return n}),Promise.resolve(a)),a.endpointPayloadPromise.then((e=>d.addEndpoint(t.endpointId,e))),i.payload.payload.result=s,i.payload.payload.answer=a,this.wire.sendRaw(i)}catch(e){return i.payload.success=!1,i.payload.reason=e.message,this.wire.sendRaw(i)}}}xe.ConnectionManager=kt,Ct=new WeakMap,bt=new WeakMap;var Lt,Tt,$t,Bt=s&&s.__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},Gt=s&&s.__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)};Object.defineProperty(le,\"__esModule\",{value:!0}),le.Channel=void 0;const Wt=t,Ht=G,Nt=d,Dt=ue,Ut=xe,Vt=Qe;function zt(e){const t=Math.floor(e/10),n=Math.min(3e4,500*2**t);return new Promise((e=>{setTimeout((()=>{e(!1)}),n)}))}class Kt extends Nt.EmitterBase{constructor(e){super(e,\"channel\"),Lt.set(this,void 0),Tt.set(this,new Wt.EventEmitter),$t.set(this,new Ht.AsyncRetryableLazy((async()=>{await Promise.all([this.on(\"disconnected\",(e=>{Dt.ChannelClient.handleProviderDisconnect(e)})),this.on(\"connected\",((...e)=>{Gt(this,Tt,\"f\").emit(\"connected\",...e)}))]).catch((()=>new Error(\"error setting up channel connection listeners\")))}))),Bt(this,Lt,new Ut.ConnectionManager(e),\"f\")}async getAllChannels(){return this.wire.sendAction(\"get-all-channels\").then((({payload:e})=>e.data))}async onChannelConnect(e){await this.on(\"connected\",e)}async onChannelDisconnect(e){await this.on(\"disconnected\",e)}async safeConnect(e,t,n){const i={count:0};do{let r=()=>{};const o=new Promise((t=>{r=n=>{e===n.channelName&&t(!0)},Gt(this,Tt,\"f\").on(\"connected\",r)}));try{if(i.count>0){i.gotConnectedEvent=await Promise.race([zt(i.count),o]);const t=await this.wire.sendAction(\"connect-to-channel\",{...n,retryInfo:i});return console.log(`Successfully connected to channelName: ${e}`),t.payload.data}const t=this.wire.sendAction(\"connect-to-channel\",n);i.originalMessageId=t.messageId;return(await t).payload.data}catch(n){if(!n.message.includes(\"internal-nack\"))throw n;t&&0===i.count&&console.warn(`No channel found for channelName: ${e}. Waiting for connection...`)}finally{i.count+=1,Gt(this,Tt,\"f\").removeListener(\"connected\",r)}}while(t);throw new Error(`No channel found for channelName: ${e}.`)}async connect(e,t={}){if(await Gt(this,$t,\"f\").getValue(),!e||\"string\"!=typeof e)throw new Error(\"Please provide a channelName string to connect to a channel.\");const n={wait:!0,...this.wire.environment.getDefaultChannelOptions().connect,...t},{offer:i,rtc:r}=await Gt(this,Lt,\"f\").createClientOffer(n);let o;(this.fin.me.isFrame||this.fin.me.isView||this.fin.me.isWindow)&&(o=(await this.fin.me.getInfo()).url);const s={channelName:e,...n,offer:i,connectionUrl:o},a=await this.safeConnect(e,n.wait,s),c=await Gt(this,Lt,\"f\").createClientStrategy(r,a),d=new Dt.ChannelClient(a,(()=>Dt.ChannelClient.wireClose(this.wire,a,a.endpointId)),c);return c.onEndpointDisconnect(a.channelId,(async()=>{try{await d.sendDisconnectAction()}catch(e){console.warn(`Something went wrong during disconnect for client with uuid: ${a.uuid} / name: ${a.name} / endpointId: ${a.endpointId}.`)}finally{Dt.ChannelClient.handleProviderDisconnect(a)}})),d}async create(e,t){if(!e)throw new Error(\"Please provide a channelName to create a channel\");const{payload:{data:n}}=await this.wire.sendAction(\"create-channel\",{channelName:e}),i=Gt(this,Lt,\"f\").createProvider(t,n);return this.on(\"client-disconnected\",(t=>{t.channelName===e&&Vt.ChannelProvider.handleClientDisconnection(i,t)})),i}}le.Channel=Kt,Lt=new WeakMap,Tt=new WeakMap,$t=new WeakMap,Object.defineProperty(de,\"__esModule\",{value:!0}),de.InterAppPayload=de.InterApplicationBus=void 0;const qt=t,Jt=d,Yt=he,Zt=le,Qt=O;class Xt extends Jt.Base{constructor(e){super(e),this.events={subscriberAdded:\"subscriber-added\",subscriberRemoved:\"subscriber-removed\"},this.refCounter=new Yt.RefCounter,this.Channel=new Zt.Channel(e),this.emitter=new qt.EventEmitter,e.registerMessageHandler(this.onmessage.bind(this)),this.on=this.emitter.on.bind(this.emitter),this.removeAllListeners=this.emitter.removeAllListeners.bind(this.emitter)}async publish(e,t){await this.wire.sendAction(\"publish-message\",{topic:e,message:t,sourceWindowName:this.me.name})}async send(e,t,n){const i=(0,Qt.validateIdentity)(e);if(i)throw new Error(i);await this.wire.sendAction(\"send-message\",{destinationUuid:e.uuid,destinationWindowName:e.name,topic:t,message:n,sourceWindowName:this.me.name})}subscribe(e,t,n){const i=this.createSubscriptionKey(e.uuid,e.name||\"*\",t);return this.emitter.on(i,n),this.refCounter.actOnFirst(i,(async()=>{await this.wire.sendAction(\"subscribe\",{sourceUuid:e.uuid,sourceWindowName:e.name||\"*\",topic:t,destinationWindowName:this.me.name})}),(()=>Promise.resolve()))}unsubscribe(e,t,n){const i=e.name||\"*\",r=this.createSubscriptionKey(e.uuid,i,t);return this.emitter.removeListener(r,n),this.refCounter.actOnLast(r,(async()=>{await this.wire.sendAction(\"unsubscribe\",{sourceUuid:e.uuid,sourceWindowName:i,topic:t,destinationWindowName:this.me.name})}),(()=>new Promise((e=>e)).then((()=>{}))))}processMessage(e){const{payload:{message:t,sourceWindowName:n,sourceUuid:i,topic:r}}=e,o=[this.createSubscriptionKey(i,n,r),this.createSubscriptionKey(i,\"*\",r),this.createSubscriptionKey(\"*\",\"*\",r)],s={uuid:i,name:n};o.forEach((e=>{this.emitter.emit(e,t,s)}))}emitSubscriverEvent(e,t){const{payload:{targetName:n,uuid:i,topic:r}}=t,o={name:n,uuid:i,topic:r};this.emitter.emit(e,o)}createSubscriptionKey(e,t,n){const i=t||\"*\";if(!(e&&i&&n))throw new Error(\"Missing uuid, name, or topic string\");return function(...e){return e.map((e=>Buffer.from(`${e}`).toString(\"base64\"))).join(\"/\")}(e,i,n)}onmessage(e){const{action:t}=e;switch(t){case\"process-message\":this.processMessage(e);break;case this.events.subscriberAdded:this.emitSubscriverEvent(this.events.subscriberAdded,e);break;case this.events.subscriberRemoved:this.emitSubscriverEvent(this.events.subscriberRemoved,e)}return!0}}de.InterApplicationBus=Xt;de.InterAppPayload=class{};var en={};Object.defineProperty(en,\"__esModule\",{value:!0}),en.Clipboard=void 0;const tn=d;class nn extends tn.Base{async writeText(e){await this.wire.sendAction(\"clipboard-write-text\",e)}async readText(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-text\",{type:e});return t.data}async writeImage(e){await this.wire.sendAction(\"clipboard-write-image\",e)}async readImage(e={format:\"dataURL\"}){const{payload:t}=await this.wire.sendAction(\"clipboard-read-image\",e);return t.data}async writeHtml(e){await this.wire.sendAction(\"clipboard-write-html\",e)}async readHtml(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-html\",{type:e});return t.data}async writeRtf(e){await this.wire.sendAction(\"clipboard-write-rtf\",e)}async readRtf(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-rtf\",{type:e});return t.data}async write(e){await this.wire.sendAction(\"clipboard-write\",e)}async getAvailableFormats(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-formats\",{type:e});return t.data}}en.Clipboard=nn;var rn={},on={},sn={};Object.defineProperty(sn,\"__esModule\",{value:!0}),sn.ExternalApplication=void 0;const an=d;class cn extends an.EmitterBase{constructor(e,t){super(e,\"external-application\",t.uuid),this.identity=t}getInfo(){return this.wire.sendAction(\"get-external-application-info\",this.identity).then((({payload:e})=>e.data))}}sn.ExternalApplication=cn,Object.defineProperty(on,\"__esModule\",{value:!0}),on.ExternalApplicationModule=void 0;const dn=d,hn=sn;class ln extends dn.Base{wrap(e){return this.wire.sendAction(\"external-application-wrap\").catch((e=>{})),Promise.resolve(new hn.ExternalApplication(this.wire,{uuid:e}))}wrapSync(e){return this.wire.sendAction(\"external-application-wrap-sync\").catch((e=>{})),new hn.ExternalApplication(this.wire,{uuid:e})}}on.ExternalApplicationModule=ln,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(on,e),n(sn,e)}(rn);var un={},pn={},wn={};Object.defineProperty(wn,\"__esModule\",{value:!0}),wn._Frame=void 0;const yn=d;class fn extends yn.EmitterBase{constructor(e,t){super(e,\"frame\",t.uuid,t.name),this.identity=t}getInfo(){return this.wire.sendAction(\"get-frame-info\",this.identity).then((({payload:e})=>e.data))}getParentWindow(){return this.wire.sendAction(\"get-parent-window\",this.identity).then((({payload:e})=>e.data))}}wn._Frame=fn,Object.defineProperty(pn,\"__esModule\",{value:!0}),pn._FrameModule=void 0;const gn=d,mn=O,vn=wn;class Cn extends gn.Base{async wrap(e){this.wire.sendAction(\"frame-wrap\").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}wrapSync(e){this.wire.sendAction(\"frame-wrap-sync\").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}getCurrent(){return this.wire.sendAction(\"frame-get-current\").catch((e=>{})),Promise.resolve(new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity()))}getCurrentSync(){return this.wire.sendAction(\"frame-get-current-sync\").catch((e=>{})),new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity())}}pn._FrameModule=Cn,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(pn,e),n(wn,e)}(un);var bn={};Object.defineProperty(bn,\"__esModule\",{value:!0}),bn.GlobalHotkey=void 0;const In=d;class En extends In.EmitterBase{constructor(e){super(e,\"global-hotkey\")}async register(e,t){await this.on(e,t),await this.wire.sendAction(\"global-hotkey-register\",{hotkey:e})}async unregister(e){await this.removeAllListeners(e),await this.wire.sendAction(\"global-hotkey-unregister\",{hotkey:e})}async unregisterAll(){await Promise.all(this.eventNames().filter((e=>!(\"registered\"===e||\"unregistered\"===e))).map((e=>this.removeAllListeners(e)))),await this.wire.sendAction(\"global-hotkey-unregister-all\",{})}async isRegistered(e){const{payload:{data:t}}=await this.wire.sendAction(\"global-hotkey-is-registered\",{hotkey:e});return t}}bn.GlobalHotkey=En;var xn,An={},Pn={},Mn={},_n=s&&s.__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)};Object.defineProperty(Mn,\"__esModule\",{value:!0}),Mn.Platform=void 0;const On=d,Sn=O,Rn=new Map;class Fn extends On.EmitterBase{constructor(e,t){super(t.wire,\"application\",e.uuid),this.getClient=e=>{this.wire.sendAction(\"platform-get-client\",this.identity).catch((e=>{}));const t=e||this.identity,{uuid:n}=t;if(!Rn.has(n)){const e=_n(this,xn,\"f\").call(this,n);Rn.set(n,e)}return Rn.get(n)},xn.set(this,(async e=>{try{const t=`custom-frame-${e}`,n=await this._channel.connect(t,{wait:!1});return n.onDisconnection((()=>{Rn.delete(e)})),n}catch(t){throw Rn.delete(e),new Error(\"The targeted Platform is not currently running. Listen for application-started event for the given Uuid.\")}})),this.launchLegacyManifest=this.launchContentManifest;const n=(0,Sn.validateIdentity)(e);if(n)throw new Error(n);this._channel=t,this.identity={uuid:e.uuid},this.Layout=this.fin.Platform.Layout,this.Application=this.fin.Application.wrapSync(this.identity)}async createView(e,t,n){this.wire.sendAction(\"platform-create-view\",this.identity).catch((e=>{}));const i=await this.getClient(),r=await i.dispatch(\"create-view\",{target:t,opts:e,targetView:n});if(!r||(0,Sn.validateIdentity)(r.identity))throw new Error(`When overwriting the createView call, please return an object that has a valid 'identity' property: ${JSON.stringify(r)}`);return this.fin.View.wrapSync(r.identity)}async createWindow(e){this.wire.sendAction(\"platform-create-window\",this.identity).catch((e=>{}));const t=await this.getClient();e.reason||(e.reason=\"api-call\");const n=await t.dispatch(\"create-view-container\",e);if(!n||(0,Sn.validateIdentity)(n.identity))throw new Error(`When overwriting the createWindow call, please return an object that has a valid 'identity' property: ${JSON.stringify(n)}`);const{identity:i}=n,r=this.fin.Window.wrapSync(i);return r.name=i.name,r.uuid=i.uuid,r}async quit(){this.wire.sendAction(\"platform-quit\",this.identity).catch((e=>{}));return(await this.getClient()).dispatch(\"quit\")}async closeView(e){this.wire.sendAction(\"platform-close-view\",this.identity).catch((e=>{}));const t=await this.getClient();await t.dispatch(\"close-view\",{view:e})}async reparentView(e,t){console.warn(\"Platform.reparentView has been deprecated, please use Platform.createView\"),this.wire.sendAction(\"platform-reparent-view\",this.identity).catch((e=>{}));const n={...e,uuid:e.uuid??this.identity.uuid},i=await this.fin.View.wrap(n),r=await i.getOptions();return this.createView(r,t)}async getSnapshot(){this.wire.sendAction(\"platform-get-snapshot\",this.identity).catch((e=>{}));return(await this.getClient()).dispatch(\"get-snapshot\")}async getViewSnapshot(e){return(await this.getClient()).dispatch(\"get-view-snapshot\",{viewIdentity:e})}async applySnapshot(e,t){this.wire.sendAction(\"platform-apply-snapshot\",this.identity).catch((e=>{}));const n=\"Requested snapshot must be a valid Snapshot object, or a url or filepath to such an object.\";let i;if(\"string\"==typeof e)try{i=(await this._channel.wire.sendAction(\"get-application-manifest\",{manifestUrl:e})).payload.data}catch(e){throw new Error(`${n}: ${e}`)}else i=e;if(!i.windows)throw new Error(n);const r=await this.getClient();return await r.dispatch(\"apply-snapshot\",{snapshot:i,options:t}),this}async fetchManifest(e){return(await this.getClient()).dispatch(\"platform-fetch-manifest\",{manifestUrl:e})}async launchContentManifest(e){this.wire.sendAction(\"platform-launch-content-manifest\",this.identity).catch((()=>{}));const t=await this.getClient(),n=await this.fetchManifest(e);return t.dispatch(\"launch-into-platform\",{manifest:n,manifestUrl:e}),this}async setWindowContext(e={},t){if(this.wire.sendAction(\"platform-set-window-context\",this.identity).catch((e=>{})),!e)throw new Error(\"Please provide a serializable object or string to set the context.\");const n=await this.getClient(),{entityType:i}=t?await this.fin.System.getEntityInfo(t.uuid,t.name):this.fin.me;await n.dispatch(\"set-window-context\",{context:e,entityType:i,target:t||{uuid:this.fin.me.uuid,name:this.fin.me.name}})}async getWindowContext(e){this.wire.sendAction(\"platform-get-window-context\",this.identity).catch((e=>{}));const t=await this.getClient(),{entityType:n}=e?await this.fin.System.getEntityInfo(e.uuid,e.name):this.fin.me;return t.dispatch(\"get-window-context\",{target:e||{uuid:this.fin.me.uuid,name:this.fin.me.name},entityType:n})}async closeWindow(e,t={skipBeforeUnload:!1}){this.wire.sendAction(\"platform-close-window\",this.identity).catch((e=>{}));return(await this.getClient()).dispatch(\"close-window\",{windowId:e,options:t})}}Mn.Platform=Fn,xn=new WeakMap;var jn={},kn={},Ln={},Tn={};function $n(e){switch(e){case\"columns\":case\"grid\":case\"rows\":case\"tabs\":return!0;default:return!1}}Object.defineProperty(Tn,\"__esModule\",{value:!0}),Tn.overrideFromComposables=Tn.isValidPresetType=void 0,Tn.isValidPresetType=$n,Tn.overrideFromComposables=function(...e){return t=>e.reduceRight(((e,t)=>n=>t(e(n))),(e=>e))(t)},Tn.default={isValidPresetType:$n};var Bn={},Gn={},Wn={};Object.defineProperty(Wn,\"__esModule\",{value:!0}),Wn.ApiConsumer=void 0;Wn.ApiConsumer=class{constructor(e){this.strategy=e,this.consume=async e=>(await this.strategy.getExposedFunctions(e)).reduce(((t,n)=>({...t,[n.key]:this.strategy.createFunction(n,e)})),{})}};var Hn={},Nn={};Object.defineProperty(Nn,\"__esModule\",{value:!0}),Nn.expose=Nn.getExposedProperties=void 0;const Dn=Symbol(\"exposedProperties\");Nn.getExposedProperties=e=>e[Dn]||e.prototype[Dn]||[];Nn.expose=e=>(t,n,i)=>{t[Dn]=t[Dn]||[],t[Dn].push({key:n,descriptor:i,options:e})},Object.defineProperty(Hn,\"__esModule\",{value:!0}),Hn.ApiExposer=void 0;const Un=Nn;Hn.ApiExposer=class{constructor(e){this.strategy=e,this.exposeInstance=async(e,t)=>{const n=(0,Un.getExposedProperties)(e),i=await Promise.all(n.map((async({key:n,options:i})=>({key:n,options:await this.strategy.exposeFunction(e[n].bind(e),{key:n,options:i,meta:t})}))));await this.strategy.exposeMeta(t,i)}}};var Vn={},zn={},Kn={};Object.defineProperty(Kn,\"__esModule\",{value:!0}),Kn.ChannelsConsumer=void 0;Kn.ChannelsConsumer=class{constructor(e){this.channel=e,this.getExposedFunctions=async e=>{const{id:t}=e,{props:n}=await this.channel.dispatch(`api-meta:${t}`);return n},this.createFunction=e=>(...t)=>{const{action:n}=e.options;return this.channel.dispatch(n,{args:t})}}};var qn={};Object.defineProperty(qn,\"__esModule\",{value:!0}),qn.ChannelsExposer=void 0;qn.ChannelsExposer=class{constructor(e){this.channelProviderOrClient=e,this.exposeFunction=async(e,t)=>{const{key:n,options:i,meta:r}=t,{id:o}=r,s=`${o}.${i?.action||n}`;return await this.channelProviderOrClient.register(s,(async({args:t})=>e(...t))),{action:s}},this.exposeMeta=async({id:e},t)=>{const n=`api-meta:${e}`;await this.channelProviderOrClient.register(n,(()=>({props:t})))}}},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Kn,e),n(qn,e)}(zn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(zn,e)}(Vn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Wn,e),n(Hn,e),n(Vn,e),n(Nn,e)}(Gn);var Jn={};Object.defineProperty(Jn,\"__esModule\",{value:!0}),Jn.createRelayedDispatch=exports.relayChannelClientApi_1=Jn.relayChannelClientApi=void 0;const Yn=[\"no longer connected\",\"RTCDataChannel closed unexpectedly\",\"The client you are trying to dispatch from is disconnected from the target provider\"];exports.relayChannelClientApi_1=Jn.relayChannelClientApi=async(e,t)=>{e.register(`relay:${t}`,(({action:t,target:n,payload:i})=>e.dispatch(n,t,i))),await Promise.resolve()};Jn.createRelayedDispatch=(e,t,n,i)=>async(r,o)=>{try{return await e.dispatch(`relay:${n}`,{action:r,payload:o,target:t})}catch(e){if(s=e.message,Yn.some((e=>s.includes(e)))&&i)throw new Error(i);throw e}var s};var Zn,Qn,Xn,ei=s&&s.__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},ti=s&&s.__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)};Object.defineProperty(Bn,\"__esModule\",{value:!0}),Bn.ColumnOrRow=Bn.TabStack=Bn.LayoutNode=void 0;const ni=Gn,ii=Jn;class ri{constructor(e,t){Zn.set(this,void 0),this.isRoot=()=>ti(this,Zn,\"f\").isRoot(this.entityId),this.exists=()=>ti(this,Zn,\"f\").exists(this.entityId),this.getParent=async()=>{const e=await ti(this,Zn,\"f\").getParent(this.entityId);if(e)return ri.getEntity(e,ti(this,Zn,\"f\"))},this.createAdjacentStack=async(e,t)=>{const n=await ti(this,Zn,\"f\").createAdjacentStack(this.entityId,e,t);return ri.getEntity({entityId:n,type:\"stack\"},ti(this,Zn,\"f\"))},this.getAdjacentStacks=async e=>(await ti(this,Zn,\"f\").getAdjacentStacks({targetId:this.entityId,edge:e})).map((e=>ri.getEntity({type:\"stack\",entityId:e.entityId},ti(this,Zn,\"f\")))),ei(this,Zn,e,\"f\"),this.entityId=t}}Bn.LayoutNode=ri,Zn=new WeakMap,ri.newLayoutEntitiesClient=async(e,t,n)=>{const i=(0,ii.createRelayedDispatch)(e,n,\"layout-relay\",\"You are trying to interact with a layout component on a window that does not exist or has been destroyed.\");return new ni.ApiConsumer(new ni.ChannelsConsumer({dispatch:i})).consume({id:t})},ri.getEntity=(e,t)=>{const{entityId:n,type:i}=e;switch(i){case\"column\":case\"row\":return new si(t,n,i);case\"stack\":return new oi(t,n);default:throw new Error(`Unrecognised Layout Entity encountered ('${JSON.stringify(e)})`)}};class oi extends ri{constructor(e,t){super(e,t),Qn.set(this,void 0),this.type=\"stack\",this.getViews=()=>ti(this,Qn,\"f\").getStackViews(this.entityId),this.addView=async(e,t={index:0})=>ti(this,Qn,\"f\").addViewToStack(this.entityId,e,t),this.removeView=async e=>{await ti(this,Qn,\"f\").removeViewFromStack(this.entityId,e)},this.setActiveView=async e=>{await ti(this,Qn,\"f\").setStackActiveView(this.entityId,e)},ei(this,Qn,e,\"f\")}}Bn.TabStack=oi,Qn=new WeakMap;class si extends ri{constructor(e,t,n){super(e,t),Xn.set(this,void 0),this.getContent=async()=>(await ti(this,Xn,\"f\").getContent(this.entityId)).map((e=>ri.getEntity(e,ti(this,Xn,\"f\")))),ei(this,Xn,e,\"f\"),this.type=n}}Bn.ColumnOrRow=si,Xn=new WeakMap;var ai={};Object.defineProperty(ai,\"__esModule\",{value:!0}),ai.DEFAULT_LAYOUT_KEY=ai.LAYOUT_CONTROLLER_ID=void 0,ai.LAYOUT_CONTROLLER_ID=\"layout-entities\",ai.DEFAULT_LAYOUT_KEY=\"__default__\";var ci,di,hi,li=s&&s.__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)};Object.defineProperty(Ln,\"__esModule\",{value:!0}),Ln.Layout=void 0;const ui=G,pi=O,wi=d,yi=Tn,fi=Bn,gi=ai;class mi extends wi.Base{static getClient(e){return li(e,di,\"f\").getValue()}constructor(e,t){super(t),ci.add(this),di.set(this,new ui.Lazy((async()=>fi.LayoutNode.newLayoutEntitiesClient(await this.platform.getClient(),gi.LAYOUT_CONTROLLER_ID,this.identity)))),this.replace=async e=>{this.wire.sendAction(\"layout-replace\").catch((e=>{}));const t=await this.platform.getClient();await t.dispatch(\"replace-layout\",{target:this.identity,opts:{layout:e}})},this.replaceView=async(e,t)=>{this.wire.sendAction(\"layout-replace-view\").catch((e=>{}));const n=await this.platform.getClient();await n.dispatch(\"replace-view\",{target:this.identity,opts:{viewToReplace:e,newView:t}})},this.applyPreset=async e=>{this.wire.sendAction(\"layout-apply-preset\").catch((e=>{}));const t=await this.platform.getClient(),{presetType:n}=e;if(!n||!(0,yi.isValidPresetType)(n))throw new Error(\"Cannot apply preset layout, please include an applicable presetType property in the PresetLayoutOptions.\");await t.dispatch(\"apply-preset-layout\",{target:this.identity,opts:{presetType:n}})};const n=(0,pi.validateIdentity)(e);if(n)throw new Error(n);this.identity=e,this.platform=this.fin.Platform.wrapSync({uuid:e.uuid}),e.uuid===this.fin.me.uuid&&e.name===this.fin.me.name&&(this.init=this.fin.Platform.Layout.init)}async getConfig(){this.wire.sendAction(\"layout-get-config\").catch((e=>{}));return(await this.platform.getClient()).dispatch(\"get-frame-snapshot\",{target:this.identity})}async getCurrentViews(){this.wire.sendAction(\"layout-get-views\").catch((e=>{}));const e=await this.platform.getClient();return(await e.dispatch(\"get-layout-views\",{target:this.identity})).map((e=>this.fin.View.wrapSync(e)))}async getRootItem(){this.wire.sendAction(\"layout-get-root-item\").catch((()=>{}));const e=await li(this,di,\"f\").getValue(),t=await e.getRoot(\"layoutName\"in this.identity?this.identity:void 0);return fi.LayoutNode.getEntity(t,e)}async getStackByViewIdentity(e){this.wire.sendAction(\"layout-get-stack-by-view\").catch((()=>{}));const t=await li(this,di,\"f\").getValue(),n=await t.getStackByView(e);if(!n)throw new Error(`No stack found for view: ${e.uuid}/${e.name}`);return fi.LayoutNode.getEntity(n,t)}async addView(e,{location:t,targetView:n}={}){this.wire.sendAction(\"layout-add-view\").catch((e=>{}));const{identity:i}=await li(this,ci,\"m\",hi).call(this,\"layout-add-view\",{viewOptions:e,location:t,targetView:n});return{identity:i}}async closeView(e){this.wire.sendAction(\"layout-close-view\").catch((e=>{})),await li(this,ci,\"m\",hi).call(this,\"layout-close-view\",{viewIdentity:e})}}Ln.Layout=mi,di=new WeakMap,ci=new WeakSet,hi=async function(e,t){return(await this.platform.getClient()).dispatch(e,{target:this.identity,opts:t})};var vi,Ci,bi,Ii,Ei,xi=s&&s.__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)},Ai=s&&s.__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};Object.defineProperty(kn,\"__esModule\",{value:!0}),kn.LayoutModule=void 0;const Pi=d,Mi=Ln,_i=ai;class Oi extends Pi.Base{constructor(){super(...arguments),vi.add(this),Ci.set(this,!1),bi.set(this,null),this.init=async(e={})=>{if(this.wire.sendAction(\"layout-init\").catch((e=>{})),!this.wire.environment.layoutAllowedInContext(this.fin))throw new Error(\"Layout.init can only be called from a Window context.\");if(xi(this,Ci,\"f\"))throw new Error(\"Layout.init was already called, please use Layout.create to add additional layouts.\");\"openfin\"===this.wire.environment.type&&await this.fin.Platform.getCurrentSync().getClient(),Ai(this,Ci,!0,\"f\"),Ai(this,bi,await this.wire.environment.initLayoutManager(this.fin,this.wire,e),\"f\"),await this.wire.environment.applyLayoutSnapshot(this.fin,xi(this,bi,\"f\"),e);const t={name:this.fin.me.name,uuid:this.fin.me.uuid};if(!e.layoutManagerOverride){const e={layoutName:_i.DEFAULT_LAYOUT_KEY,...t};return xi(this,Ii,\"f\").call(this,e)}return this.wrapSync(t)},Ii.set(this,(e=>{const t=\"[Layout] You are using a deprecated property `layoutManager` - it will throw if you access it starting in v37.\",n=new Proxy({},{get(e,n){throw console.warn(`[Layout-mgr-proxy] accessing ${n.toString()}`),new Error(t)}}),i=Object.assign(this.wrapSync(e),{layoutManager:n});return new Proxy(i,{get(e,n){if(\"layoutManager\"===n)throw console.warn(`[Layout-proxy] accessing ${n.toString()}`),new Error(t);return e[n]}})})),this.getCurrentLayoutManagerSync=()=>xi(this,vi,\"m\",Ei).call(this,\"fin.Platform.Layout.getCurrentLayoutManagerSync()\"),this.create=async e=>this.wire.environment.createLayout(xi(this,vi,\"m\",Ei).call(this,\"fin.Platform.Layout.create()\"),e),this.destroy=async e=>this.wire.environment.destroyLayout(xi(this,vi,\"m\",Ei).call(this,\"fin.Platform.Layout.destroy()\"),e)}async wrap(e){return this.wire.sendAction(\"layout-wrap\").catch((e=>{})),new Mi.Layout(e,this.wire)}wrapSync(e){return this.wire.sendAction(\"layout-wrap-sync\").catch((e=>{})),new Mi.Layout(e,this.wire)}async getCurrent(){if(this.wire.sendAction(\"layout-get-current\").catch((e=>{})),\"openfin\"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error(\"You are not in a Window context. Only Windows can have a Layout.\");const{uuid:e,name:t}=this.fin.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction(\"layout-get-current-sync\").catch((e=>{})),\"openfin\"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error(\"You are not in a Window context. Only Windows can have a Layout.\");const{uuid:e,name:t}=this.fin.me;return this.wrapSync({uuid:e,name:t})}async getLayoutByViewIdentity(e){this.wire.sendAction(\"layout-get-by-view-identity\").catch((()=>{}));let t=await this.wire.environment.getViewWindowIdentity(this.fin,e);t.identity&&(t=t.identity);try{const n=this.wrapSync(t),i=await Mi.Layout.getClient(n),r=await i.getLayoutIdentityForViewOrThrow(e);return this.wrapSync(r)}catch(n){if(![\"No action registered at target for\",\"getLayoutIdentityForViewOrThrow is not a function\"].some((e=>n.message.includes(e))))throw n;if(t.uuid===t.name)throw new Error(`View identity ${JSON.stringify(e)} is not attached to any layout in provider window ${JSON.stringify(t)}.`);return this.wrapSync(t)}}}kn.LayoutModule=Oi,Ci=new WeakMap,bi=new WeakMap,Ii=new WeakMap,vi=new WeakSet,Ei=function(e){if(!xi(this,bi,\"f\"))throw new Error(`You must call init before using the API ${e}`);return xi(this,bi,\"f\")},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(kn,e),n(Ln,e)}(jn),Object.defineProperty(Pn,\"__esModule\",{value:!0}),Pn.PlatformModule=void 0;const Si=d,Ri=Mn,Fi=jn;class ji extends Si.Base{constructor(e,t){super(e),this._channel=t,this.Layout=new Fi.LayoutModule(this.wire)}async init(e){if(!fin.__internal_.isPlatform||fin.me.name!==fin.me.uuid)throw new Error(\"fin.Platform.init should only be called from a custom platform provider running in the main window of the application.\");return this.wire.environment.initPlatform(this.fin,e)}async wrap(e){return this.wire.sendAction(\"platform-wrap\").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}wrapSync(e){return this.wire.sendAction(\"platform-wrap-sync\").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}async getCurrent(){return this.wire.sendAction(\"platform-get-current\").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction(\"platform-get-current-sync\").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}start(e){return this.wire.sendAction(\"platform-start\").catch((e=>{})),new Promise((async(t,n)=>{try{const{uuid:n}=e,i=await this.fin.Application._create({...e,isPlatformController:!0});i.once(\"platform-api-ready\",(()=>t(this.wrapSync({uuid:n})))),i._run({uuid:n})}catch(e){n(e)}}))}startFromManifest(e,t){return this.wire.sendAction(\"platform-start-from-manifest\").catch((e=>{})),new Promise((async(n,i)=>{try{const i=await this.fin.Application._createFromManifest(e);i.once(\"platform-api-ready\",(()=>n(this.wrapSync({uuid:i.identity.uuid})))),i._run(t)}catch(e){i(e)}}))}}Pn.PlatformModule=ji,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Pn,e),n(Mn,e)}(An);var ki={};!function(e){Object.defineProperty(e,\"__esModule\",{value:!0}),e.getMe=e.getBaseMe=e.environmentUnsupportedMessage=void 0;const t=J(),n=un,i=ie(),r=rn;function o(e,t,n){return{...{isView:\"view\"===e,isWindow:\"window\"===e,isFrame:\"iframe\"===e,isExternal:\"external connection\"===e},uuid:t,name:n,entityType:e}}e.environmentUnsupportedMessage=\"You are not running in OpenFin.\",e.getBaseMe=o,e.getMe=function(s){const{uuid:a,name:c,entityType:d}=s.me,h={setContext(){throw new Error(e.environmentUnsupportedMessage)},addContextHandler(){throw new Error(e.environmentUnsupportedMessage)},getContextGroups(){throw new Error(e.environmentUnsupportedMessage)},joinContextGroup(){throw new Error(e.environmentUnsupportedMessage)},removeFromContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getAllClientsInContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getInfoForContextGroup(){throw new Error(e.environmentUnsupportedMessage)}},l=\"Interop API has not been instantiated. Either connection has failed or you have not declared interop in your config.\",u={setContext(){throw new Error(l)},addContextHandler(){throw new Error(l)},getContextGroups(){throw new Error(l)},joinContextGroup(){throw new Error(l)},removeFromContextGroup(){throw new Error(l)},getAllClientsInContextGroup(){throw new Error(l)},getInfoForContextGroup(){throw new Error(l)}},p={eventNames:()=>{throw new Error(e.environmentUnsupportedMessage)},emit:()=>{throw new Error(e.environmentUnsupportedMessage)},listeners:()=>{throw new Error(e.environmentUnsupportedMessage)},listenerCount:()=>{throw new Error(e.environmentUnsupportedMessage)},on:()=>{throw new Error(e.environmentUnsupportedMessage)},addListener:()=>{throw new Error(e.environmentUnsupportedMessage)},once:()=>{throw new Error(e.environmentUnsupportedMessage)},prependListener:()=>{throw new Error(e.environmentUnsupportedMessage)},prependOnceListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeAllListeners:()=>{throw new Error(e.environmentUnsupportedMessage)}};switch(d){case\"view\":return Object.assign(new t.View(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case\"window\":return Object.assign(new i._Window(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case\"iframe\":return Object.assign(new n._Frame(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case\"external connection\":return Object.assign(new r.ExternalApplication(s,{uuid:a}),o(d,a,c),{interop:u,isOpenFin:!1});default:return{...o(d,a,c),...p,interop:h,isOpenFin:!1}}}}(ki);var Li={},Ti={},$i={};Object.defineProperty($i,\"__esModule\",{value:!0}),$i.createWarningObject=$i.createUnusableObject=void 0,$i.createUnusableObject=function(e){const t=()=>{throw new Error(e)};return new Proxy({},{apply:t,construct:t,defineProperty:t,deleteProperty:t,get:t,getOwnPropertyDescriptor:t,getPrototypeOf:t,has:t,isExtensible:t,ownKeys:t,preventExtensions:t,set:t,setPrototypeOf:t})},$i.createWarningObject=function(e,t){return new Proxy(t,{get:(...t)=>(console.warn(e),Reflect.get(...t)),set:(...t)=>(console.warn(e),Reflect.set(...t)),getOwnPropertyDescriptor:(...t)=>(console.warn(e),Reflect.getOwnPropertyDescriptor(...t)),ownKeys:(...t)=>(console.warn(e),Reflect.ownKeys(...t))})};var Bi,Gi={},Wi={};var Hi={};!function(e){Object.defineProperty(e,\"__esModule\",{value:!0}),e.wrapIntentHandler=e.BROKER_ERRORS=e.generateOverrideWarning=e.generateOverrideError=e.wrapContextHandler=e.wrapInTryCatch=e.generateId=void 0;e.generateId=()=>`${Math.random()}${Date.now()}`;e.wrapInTryCatch=(e,t)=>(...n)=>{try{return e(...n)}catch(e){throw new Error((t||\"\")+e)}};e.wrapContextHandler=(e,t)=>async n=>{try{await e(n)}catch(e){throw console.error(`Error thrown by handler ${t} for context type ${n.type}: ${e}`),e}};e.generateOverrideError=(e,t)=>`You have tried to to use ${e} but ${t} has not been overridden in the Interop Broker. Please override this function. Refer to our documentation for more info.`;e.generateOverrideWarning=(e,t,n,i)=>{const{uuid:r,name:o}=n;return i?`Entity with identity: ${r}/${o} has called ${i} or ${e} but ${t} has not been overridden.`:`Entity with identity: ${r}/${o} has called ${e} but ${t} has not been overridden.`},e.BROKER_ERRORS={fireIntent:(0,e.generateOverrideError)(\"fireIntent\",\"handleFiredIntent\"),fireIntentForContext:(0,e.generateOverrideError)(\"fireIntentForContext\",\"handleFiredIntentForContext\"),getInfoForIntent:(0,e.generateOverrideError)(\"getInfoForIntent\",\"handleInfoForIntent\"),getInfoForIntentsByContext:(0,e.generateOverrideError)(\"getInfoForIntentsByContext\",\"handleInfoForIntentsByContext\"),joinSessionContextGroupWithJoinContextGroup:\"The Context Group you have tried to join is a Session Context Group. Custom Context Groups can only be defined by the Interop Broker through code or manifest configuration. Please use joinSessionContextGroup.\",fdc3Open:(0,e.generateOverrideError)(\"fdc3.open\",\"fdc3HandleOpen\"),fdc3FindInstances:(0,e.generateOverrideError)(\"fdc3.findInstances\",\"fdc3HandleFindInstances\"),fdc3GetAppMetadata:(0,e.generateOverrideError)(\"fdc3.getAppMetadata\",\"fdc3HandleGetAppMetadata\"),fdc3GetInfo:(0,e.generateOverrideError)(\"fdc3.getInfo\",\"fdc3HandleGetInfo\")};e.wrapIntentHandler=(e,t)=>async n=>{try{return e(n)}catch(e){throw console.error(`Error thrown by handler ${t}: ${e}`),e}}}(Hi);var Ni,Di,Ui={};function Vi(){if(Di)return Gi;Di=1;var e,t,n,r=s&&s.__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},o=s&&s.__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)},a=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Gi,\"__esModule\",{value:!0}),Gi.InteropBroker=void 0;const c=d,h=a(function(){if(Bi)return Wi;Bi=1,Object.defineProperty(Wi,\"__esModule\",{value:!0});const e=Cr();return Wi.default=class{constructor(e,t){this.provider=e,this.id=t,this.lastContext=void 0,this.contextGroupMap=new Map,this.clients=new Map,this.registerListeners()}registerListeners(){this.provider.register(`sessionContextGroup:getContext-${this.id}`,this.getCurrentContext.bind(this)),this.provider.register(`sessionContextGroup:setContext-${this.id}`,this.setContext.bind(this)),this.provider.register(`sessionContextGroup:handlerAdded-${this.id}`,this.handlerAdded.bind(this)),this.provider.register(`sessionContextGroup:handlerRemoved-${this.id}`,this.handlerRemoved.bind(this))}getCurrentContext(e){return e.type?this.contextGroupMap.get(e.type):this.lastContext}setContext(t,n){const{context:i}=t,r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name} not in Session Client State Map`);this.contextGroupMap.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{e.contextHandlers.get(i.type)?.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getClientState(e){return this.clients.get(e.endpointId)}async handlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(i){const e=r.contextHandlers.get(i)||[];r.contextHandlers.set(i,[...e,n]);const o=this.contextGroupMap.get(i);o&&await this.provider.dispatch(t,n,o)}else{r.globalHandler=n;const e=[...this.contextGroupMap.keys()].map((async e=>{const i=this.contextGroupMap.get(e);i&&await this.provider.dispatch(t,n,i)}));await Promise.all(e)}}handlerRemoved(e,t){const{handlerId:n}=e,i=this.clients.get(t.endpointId);i?(Array.from(i.contextHandlers).forEach((([,e])=>{const t=e.indexOf(n);t>-1&&e.splice(t,1)})),i.globalHandler===n&&(i.globalHandler=void 0)):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={contextHandlers:new Map,clientIdentity:e,globalHandler:void 0};this.clients.set(e.endpointId,t)}}onDisconnection(e){this.clients.delete(e.endpointId)}},Wi}()),l=Hi,u=a(i),p=function(){if(Ni)return Ui;Ni=1,Object.defineProperty(Ui,\"__esModule\",{value:!0}),Ui.PrivateChannelProvider=void 0;const e=Vi();return Ui.PrivateChannelProvider=class t{constructor(e,t){this.provider=e,this.id=t,this.clients=new Map,this.registerListeners(),this.contextByContextType=new Map,this.lastContext=void 0,this.provider.onConnection((e=>this.registerNewClient(e))),this.provider.onDisconnection((async e=>{const{endpointId:t}=e;this.clients.has(t)&&await this.handleClientDisconnecting(e),0===(await this.provider.getAllClientInfo()).length&&this.provider.destroy()}))}getClientState(e){return this.clients.get(e.endpointId)}registerListeners(){this.provider.register(\"broadcast\",this.broadcast.bind(this)),this.provider.register(\"getCurrentContext\",this.getCurrentContext.bind(this)),this.provider.register(\"contextHandlerAdded\",this.contextHandlerAdded.bind(this)),this.provider.register(\"contextHandlerRemoved\",this.contextHandlerRemoved.bind(this)),this.provider.register(\"nonStandardHandlerRemoved\",this.nonStandardHandlerRemoved.bind(this)),this.provider.register(\"onAddContextHandlerAdded\",this.onAddContextHandlerAdded.bind(this)),this.provider.register(\"onDisconnectHandlerAdded\",this.onDisconnectHandlerAdded.bind(this)),this.provider.register(\"onUnsubscribeHandlerAdded\",this.onUnsubscribeHandlerAdded.bind(this)),this.provider.register(\"clientDisconnecting\",((e,t)=>{this.handleClientDisconnecting(t)}))}broadcast(t,n){const{context:i}=t;if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name}, tried to call broadcast, is not connected to this Private Channel`);const r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to broadcast - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);this.contextByContextType.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{const t=e.handlerIdsByContextTypes.get(i.type);t&&t.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getCurrentContext(e,t){const{contextType:n}=e;if(!this.getClientState(t))throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call getCurrentContext, is not connected to this Private Channel`);if(void 0!==n){return this.contextByContextType.get(n)||null}return this.lastContext?this.lastContext:null}contextHandlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call addContextListener, is not connected to this Private Channel`);if(i){const e=r.handlerIdsByContextTypes.get(i)||[];r.handlerIdsByContextTypes.set(i,[...e,n])}else r.globalHandler=n;Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&e.onAddContextListenerHandlerId&&this.provider.dispatch(e.clientIdentity,e.onAddContextListenerHandlerId,i)}))}async contextHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);if(i){let e;if(i.globalHandler===n)i.globalHandler=void 0;else for(const[t,r]of i.handlerIdsByContextTypes){const i=r.indexOf(n);i>-1&&(r.splice(i,1),e=t)}const r=(await this.getConnectedClients()).map((async n=>{const{clientIdentity:i,clientIdentity:{endpointId:r},onUnsubscribeHandlerId:o}=n;r!==t.endpointId&&o&&await this.provider.dispatch(i,o,e)}));try{await Promise.all(r)}catch(e){throw console.error(`Problem when attempting to dispatch to onUnsubscribeHandlers. Error: ${e} Removing Client: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}`),new Error(e)}}else console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}.`)}nonStandardHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);i?i.onDisconnectHandlerId===n?i.onDisconnectHandlerId=void 0:i.onAddContextListenerHandlerId===n?i.onAddContextListenerHandlerId=void 0:i.onUnsubscribeHandlerId===n&&(i.onUnsubscribeHandlerId=void 0):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}onAddContextHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onAddContextListener, is not connected to this Private Channel`);n.onAddContextListenerHandlerId=i,Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&Array.from(e.handlerIdsByContextTypes.keys()).forEach((e=>{this.provider.dispatch(t,i,e)}))}))}onDisconnectHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onDisconnect, is not connected to this Private Channel`);n.onDisconnectHandlerId=i}onUnsubscribeHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onUnsubscribe, is not connected to this Private Channel`);n.onUnsubscribeHandlerId=i}removeClient(e){const t=this.getClientState(e);if(!t)throw new Error(`Client with Identity: ${e.uuid} ${e.name}, tried to call disconnect, is not connected to this Private Channel`);t.handlerIdsByContextTypes.clear(),this.clients.delete(e.endpointId)}async fireOnDisconnectForOtherClients(e){const{endpointId:t}=e,n=(await this.getConnectedClients()).map((async e=>{const{clientIdentity:{endpointId:n},onDisconnectHandlerId:i}=e;n!==t&&i&&await this.provider.dispatch(e.clientIdentity,i)}));try{await Promise.all(n)}catch(t){throw console.error(`Problem when attempting to dispatch to onDisconnectHandlers. Error: ${t} Disconnecting Client: uuid: ${e.uuid}. name: ${e.name}. endpointId: ${e.endpointId}`),new Error(t)}}async unsubscribeAll(e){const{endpointId:t}=e,n=this.clients.get(t);if(n){const t=Array.from(n.handlerIdsByContextTypes.values()).flat(),i=n.globalHandler;if(t.length>0){const n=t.map((async t=>this.contextHandlerRemoved({handlerId:t},e)));try{await Promise.all(n)}catch(e){console.error(e.message)}}if(i)try{await this.contextHandlerRemoved({handlerId:i},e)}catch(e){console.error(e.message)}}}async handleClientDisconnecting(e){await this.unsubscribeAll(e),this.removeClient(e),await this.fireOnDisconnectForOtherClients(e)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={clientIdentity:e,handlerIdsByContextTypes:new Map,globalHandler:void 0,onAddContextListenerHandlerId:void 0,onUnsubscribeHandlerId:void 0,onDisconnectHandlerId:void 0};this.clients.set(e.endpointId,t)}}async getConnectedClients(){const e=await this.provider.getAllClientInfo();return Array.from(this.clients.values()).filter((t=>{const{uuid:n,name:i}=t.clientIdentity;return e.some((e=>i===e.name&&n===e.uuid))}))}static init(e,n){return new t(e,n)}},Ui}(),w=G,y=[{id:\"green\",displayMetadata:{color:\"#00CC88\",name:\"green\"}},{id:\"purple\",displayMetadata:{color:\"#8C61FF\",name:\"purple\"}},{id:\"orange\",displayMetadata:{color:\"#FF8C4C\",name:\"orange\"}},{id:\"red\",displayMetadata:{color:\"#FF5E60\",name:\"red\"}},{id:\"pink\",displayMetadata:{color:\"#FF8FB8\",name:\"pink\"}},{id:\"yellow\",displayMetadata:{color:\"#E9FF8F\",name:\"yellow\"}}];let f=class i extends c.Base{constructor(i,s,a){super(i),e.set(this,void 0),t.set(this,void 0),n.set(this,void 0),this.getProvider=()=>o(this,n,\"f\").getValue(),this.interopClients=new Map,this.contextGroupsById=new Map,r(this,t,a.contextGroups??[...y],\"f\"),r(this,e,a.fdc3Info,\"f\"),a?.logging&&(this.logging=a.logging),this.intentClientMap=new Map,this.lastContextMap=new Map,this.sessionContextGroupMap=new Map,r(this,n,new w.Lazy(s),\"f\"),this.setContextGroupMap(),this.setupChannelProvider()}static createClosedConstructor(...e){return class extends i{constructor(...t){if(t.length){const[n,i,r]=t;if(r&&\"object\"==typeof r&&!(0,u.default)(r,e[2]))return console.warn(\"You have modified the parameters of the InteropOverride constructor. This behavior is deprecated and will be removed in a future version. You can modify these options in your manifest. Please consult our Interop docs for guidance on migrating to the new override scheme.\"),void super(e[0],e[1],r);console.warn(\"You are attempting to pass arguments to the InteropOverride constructor. This is not necessary, and these passed arguments will be ignored. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.\")}super(...e)}}}setContext({context:e},t){this.wire.sendAction(\"interop-broker-set-context\").catch((e=>{}));const n=this.getClientState(t);if(!n||!n.contextGroupId)throw n?new Error(\"You must join a context group before you can set context.\"):new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);{const{contextGroupId:t}=n;this.setContextForGroup({context:e},t)}}setContextForGroup({context:e},t){this.wire.sendAction(\"interop-broker-set-context-for-group\").catch((e=>{}));const n=this.contextGroupsById.get(t);if(!n)throw new Error(`Unable to set context for context group that isn't in the context group mapping: ${t}.`);const r=i.checkContextIntegrity(e);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(e)}`);const o=e.type;n.set(o,e),this.lastContextMap.set(t,o);Array.from(this.interopClients.values()).filter((e=>e.contextGroupId===t)).forEach((t=>{for(const[,n]of t.contextHandlers)i.isContextTypeCompatible(o,n.contextType)&&this.invokeContextHandler(t.clientIdentity,n.handlerId,e)}))}getCurrentContext(e,t){this.wire.sendAction(\"interop-broker-get-current-context\").catch((e=>{}));const n=this.getClientState(t);if(!n?.contextGroupId)throw new Error(\"You must be a member of a context group to call getCurrentContext\");const{contextGroupId:i}=n,r=this.contextGroupsById.get(i),o=this.lastContextMap.get(i),s=e?.contextType??o;return r&&s?r.get(s):void 0}async joinContextGroup({contextGroupId:e,target:t},n){if(this.wire.sendAction(\"interop-broker-join-context-group\").catch((e=>{})),this.sessionContextGroupMap.has(e))throw new Error(l.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup);if(t){i.hasEndpointId(t)&&await this.addClientToContextGroup({contextGroupId:e},t);try{const n=this.channel.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name));if(!n.length)throw new Error(`Given Identity ${t.uuid} ${t.name} is not connected to the Interop Broker.`);n.length>1&&console.warn(`More than one connection found for identity ${t.uuid} ${t.name}`);const i=[];for(const t of n)i.push(this.addClientToContextGroup({contextGroupId:e},t));await Promise.all(i)}catch(e){throw new Error(e)}}else await this.addClientToContextGroup({contextGroupId:e},n)}async addClientToContextGroup({contextGroupId:e},t){this.wire.sendAction(\"interop-broker-add-client-to-context-group\").catch((e=>{}));const n=this.getClientState(t);if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(!this.getContextGroups().find((t=>t.id===e)))throw new Error(`Attempting to join a context group that does not exist: ${e}. You may only join existing context groups.`);if(n.contextGroupId!==e){n.contextGroupId=e,await this.setCurrentContextGroupInClientOptions(t,e);const i=this.contextGroupsById.get(e);for(const[,e]of n.contextHandlers){const{contextType:n,handlerId:r}=e;if(void 0===n)i.forEach(((e,n)=>{this.invokeContextHandler(t,r,e)}));else if(i.has(n)){const e=i.get(n);e&&this.invokeContextHandler(t,r,e)}}}}async removeFromContextGroup({target:e},t){if(this.wire.sendAction(\"interop-broker-remove-from-context-group\").catch((e=>{})),e){i.hasEndpointId(e)&&await this.removeClientFromContextGroup(e);try{const t=this.channel.connections.filter((t=>t.uuid===e.uuid&&t.name===e.name));if(!t.length)throw new Error(`No connection found for given Identity ${e.uuid} ${e.name}`);t.length>1&&console.warn(`More than one connection found for identity ${e.uuid} ${e.name}`);const n=[];for(const e of t)n.push(this.removeClientFromContextGroup(e));await Promise.all(n)}catch(e){throw new Error(e)}}else await this.removeClientFromContextGroup(t)}async removeClientFromContextGroup(e){this.wire.sendAction(\"interop-broker-remove-client-from-context-group\").catch((e=>{}));const t=this.getClientState(e);t&&(t.contextGroupId=void 0),await this.setCurrentContextGroupInClientOptions(e,null)}getContextGroups(){return this.wire.sendAction(\"interop-broker-get-context-groups\").catch((e=>{})),o(this,t,\"f\").map((e=>({...e})))}getInfoForContextGroup({contextGroupId:e}){return this.wire.sendAction(\"interop-broker-get-info-for-context-group\").catch((e=>{})),this.getContextGroups().find((t=>t.id===e))}getAllClientsInContextGroup({contextGroupId:e}){this.wire.sendAction(\"interop-broker-get-all-clients-in-context-group\").catch((e=>{}));return Array.from(this.interopClients.values()).filter((t=>t.contextGroupId===e)).map((e=>e.clientIdentity))}async handleFiredIntent(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.raiseIntent\",\"InteropBroker.handleFiredIntent\",t,\"interopClient.fireIntent\");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntent)}async setIntentTarget(e,t){this.wire.sendAction(\"interop-broker-set-intent-target\").catch((e=>{}));const n=this.intentClientMap.get(t.name),i=`intent-handler-${e.name}`;if(n){const t=n.get(i);if(t){if(t.pendingIntents.push(e),t.clientIdentity&&t.isReady){const{clientIdentity:e,pendingIntents:n}=t;try{const r=n[n.length-1];await this.invokeIntentHandler(e,i,r),t.pendingIntents=[]}catch(n){console.error(`Error invoking intent handler for client ${e.uuid}/${e.name}/${e.endpointId}`),t.isReady=!1}}}else n.set(i,{isReady:!1,pendingIntents:[e]})}else{this.intentClientMap.set(t.name,new Map);const n=this.intentClientMap.get(t.name);n&&n.set(i,{isReady:!1,pendingIntents:[e]})}}async handleInfoForIntent(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.findIntent\",\"InteropBroker.handleInfoForIntent\",t,\"interopClient.getInfoForIntent\");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntent)}async handleInfoForIntentsByContext(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.findIntentsByContext\",\"InteropBroker.handleInfoForIntentsByContext\",t,\"interopClient.getInfoForIntentsByContext\");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntentsByContext)}async handleFiredIntentForContext(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.raiseIntentForContext\",\"InteropBroker.handleFiredIntentForContext\",t,\"interopClient.fireIntentForContext\");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntentForContext)}async clientDisconnected(e){}async fdc3HandleOpen({app:e,context:t},n){const i=(0,l.generateOverrideWarning)(\"fdc3.open\",\"InteropBroker.fdc3HandleOpen\",n);throw console.warn(i),new Error(l.BROKER_ERRORS.fdc3Open)}async fdc3HandleFindInstances(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.open\",\"InteropBroker.fdc3HandleFindInstances\",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3FindInstances)}async fdc3HandleGetAppMetadata(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.getAppMetadata\",\"InteropBroker.fdc3HandleGetAppMetadata\",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3GetAppMetadata)}async invokeContextHandler(e,t,n){const i=await this.getProvider();try{await i.dispatch(e,t,n)}catch(i){console.error(`Error invoking context handler ${t} for context type ${n.type} in client ${e.uuid}/${e.name}/${e.endpointId}`,i)}}async invokeIntentHandler(e,t,n){const i=await this.getProvider();await i.dispatch(e,t,n)}async fdc3HandleGetInfo(t,n){const{fdc3Version:i}=t;return{fdc3Version:i,...o(this,e,\"f\"),optionalFeatures:{OriginatingAppMetadata:!1,UserChannelMembershipAPIs:!0},appMetadata:{appId:\"\",instanceId:\"\"}}}async getAllClientInfo(){return(await this.getProvider()).getAllClientInfo()}decorateSnapshot(e){return{...e,interopSnapshotDetails:{contextGroupStates:this.getContextGroupStates()}}}applySnapshot(e,t){const n=e?.interopSnapshotDetails?.contextGroupStates;n&&(t?.closeExistingWindows||this.updateExistingClients(n),this.rehydrateContextGroupStates(n))}updateExistingClients(e){this.interopClients.forEach((t=>{const{clientIdentity:n,contextGroupId:r,contextHandlers:o}=t;if(r){const t=e[r];for(const[,e]of Object.entries(t))o.forEach((t=>{const{handlerId:r,contextType:o}=t;i.isContextTypeCompatible(e.type,o)&&this.invokeContextHandler(n,r,e)}))}}))}getContextGroupStates(){return i.toObject(this.contextGroupsById)}rehydrateContextGroupStates(e){const t=Object.entries(e);for(const[e,n]of t){const t=Object.entries(n);for(const[n,i]of t)if(this.contextGroupsById.has(e)){this.contextGroupsById.get(e).set(n,i)}else console.warn(`Attempting to set a context group that isn't in the context group mapping. Skipping context group rehydration for: ${e}`)}}contextHandlerRegistered({contextType:e,handlerId:t},n){const i={contextType:e,handlerId:t},r=this.getClientState(n);if(r?.contextHandlers.set(t,i),r&&r.contextGroupId){const{contextGroupId:i}=r,o=this.contextGroupsById.get(i);if(void 0===e)o.forEach(((e,i)=>{this.invokeContextHandler(n,t,e)}));else if(o.has(e)){const i=o.get(e);i&&this.invokeContextHandler(n,t,i)}}}async intentHandlerRegistered(e,t){const{handlerId:n}=e,i=this.intentClientMap.get(t.name),r=i?.get(n);if(i)if(r){const{pendingIntents:e}=r;r.clientIdentity=t,r.isReady=!0;try{if(e.length>0){const i=e[e.length-1];await this.invokeIntentHandler(t,n,i),r.pendingIntents=[]}}catch(e){console.error(`Error invoking intent handler: ${n} for client ${t.uuid}/${t.name}/${t.endpointId}`)}}else i.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t});else{this.intentClientMap.set(t.name,new Map);const e=this.intentClientMap.get(t.name);e&&e.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t})}}removeContextHandler({handlerId:e},t){const n=this.getClientState(t);n&&n.contextHandlers.delete(e)}handleJoinSessionContextGroup({sessionContextGroupId:e},t){try{if(!e)throw new Error(\"Failed to join session context group: must specify group id.\");const n=this.sessionContextGroupMap.get(e);if(n)n.registerNewClient(t);else{const n=new h.default(this.channel,e);n.registerNewClient(t),this.sessionContextGroupMap.set(e,n)}return{hasConflict:this.contextGroupsById.has(e)}}catch(e){throw new Error(e)}}getClientState(e){return this.interopClients.get(e.endpointId)}static toObject(e){const t=Object.fromEntries(e),n={};return Object.entries(t).forEach((([e,t])=>{const i=Object.fromEntries(t);n[e]=i})),n}static checkContextIntegrity(e){if(!e)return{isValid:!1,reason:\"No context supplied\"};if(\"object\"!=typeof e)return{isValid:!1,reason:\"Context must be an Object\"};if(!e.type)return{isValid:!1,reason:\"Context must have a type property\"};if(e.id&&\"object\"!=typeof e.id)return{isValid:!1,reason:\"Context id must be an Object populated with key-value identifiers (if set)\"};if(e.id){const{id:t}=e,n=Object.keys(t);let i=!1;if(!n.length)return{isValid:!1,reason:\"Context id must have at least one key-value identifier\"};if(n.forEach((e=>{\"string\"==typeof e&&\"string\"==typeof t[e]||(i=!0)})),i)return{isValid:!1,reason:\"Context id key-value identifiers must be of type string\"}}return e.name&&\"string\"!=typeof e.name?{isValid:!1,reason:\"Context name must be of string type (if set)\"}:{isValid:!0}}static hasEndpointId(e){return void 0!==e.endpointId}static isContextTypeCompatible(e,t){return void 0===t||e===t}setContextGroupMap(){for(const e of this.getContextGroups())this.contextGroupsById.set(e.id,new Map)}async setCurrentContextGroupInClientOptions(e,t){try{const n=await this.fin.System.getEntityInfo(e.uuid,e.name);let i;\"view\"===n.entityType?i=await this.fin.View.wrap(e):\"window\"===n.entityType&&(i=await this.fin.Window.wrap(e)),i&&await i.updateOptions({interop:{currentContextGroup:t}})}catch(e){}}async setupChannelProvider(){try{const e=await this.getProvider();this.channel=e,this.wireChannel(e)}catch(e){throw new Error(`Error setting up Interop Broker Channel Provider: ${e}`)}}wireChannel(e){e.onConnection((async(e,t)=>{if(!await this.isConnectionAuthorized(e,t))throw new Error(`Connection not authorized for ${e.uuid}, ${e.name}`);if(!e.endpointId)throw new Error(\"Version too old to be compatible with Interop. Please upgrade your runtime to a more recent version.\");const n={contextGroupId:void 0,contextHandlers:new Map,clientIdentity:e};t?.currentContextGroup&&this.contextGroupsById.has(t.currentContextGroup)&&(n.contextGroupId=t?.currentContextGroup),this.interopClients.set(e.endpointId,n)})),e.onDisconnection((e=>{this.interopClients.delete(e.endpointId);const t=this.intentClientMap.get(e.name);t&&e.uuid===this.fin.me.uuid&&t.forEach((e=>{e.isReady=!1})),this.sessionContextGroupMap.forEach((t=>{t.onDisconnection(e)})),this.clientDisconnected(e)})),e.beforeAction((async(e,t,n)=>{if(!await this.isActionAuthorized(e,t,n))throw new Error(`Action (${e}) not authorized for ${n.uuid}, ${n.name}`);this.logging?.beforeAction?.enabled&&console.log(e,t,n)})),e.afterAction(((e,t,n)=>{this.logging?.afterAction?.enabled&&console.log(e,t,n)})),e.register(\"setContext\",this.setContext.bind(this)),e.register(\"fireIntent\",this.handleFiredIntent.bind(this)),e.register(\"getCurrentContext\",this.getCurrentContext.bind(this)),e.register(\"getInfoForIntent\",this.handleInfoForIntent.bind(this)),e.register(\"getInfoForIntentsByContext\",this.handleInfoForIntentsByContext.bind(this)),e.register(\"fireIntentForContext\",this.handleFiredIntentForContext.bind(this)),e.register(\"getContextGroups\",this.getContextGroups.bind(this)),e.register(\"joinContextGroup\",this.joinContextGroup.bind(this)),e.register(\"removeFromContextGroup\",this.removeFromContextGroup.bind(this)),e.register(\"getAllClientsInContextGroup\",this.getAllClientsInContextGroup.bind(this)),e.register(\"getInfoForContextGroup\",this.getInfoForContextGroup.bind(this)),e.register(\"contextHandlerRegistered\",this.contextHandlerRegistered.bind(this)),e.register(\"intentHandlerRegistered\",this.intentHandlerRegistered.bind(this)),e.register(\"removeContextHandler\",this.removeContextHandler.bind(this)),e.register(\"sessionContextGroup:createIfNeeded\",this.handleJoinSessionContextGroup.bind(this)),e.register(\"fdc3Open\",this.fdc3HandleOpen.bind(this)),e.register(\"fdc3v2FindIntentsByContext\",this.handleInfoForIntentsByContext.bind(this)),e.register(\"fdc3FindInstances\",this.fdc3HandleFindInstances.bind(this)),e.register(\"fdc3GetAppMetadata\",this.fdc3HandleGetAppMetadata.bind(this)),e.register(\"fdc3v2GetInfo\",(async(e,t)=>this.fdc3HandleGetInfo.bind(this)(e,t))),e.register(\"createPrivateChannelProvider\",(async e=>{const{channelId:t}=e,n=await this.fin.InterApplicationBus.Channel.create(t);p.PrivateChannelProvider.init(n,t)}))}isConnectionAuthorized(e,t){return this.wire.sendAction(\"interop-broker-is-connection-authorized\").catch((e=>{})),Promise.resolve(!0)}isActionAuthorized(e,t,n){return this.wire.sendAction(\"interop-broker-is-action-authorized\").catch((e=>{})),Promise.resolve(!0)}};return Gi.InteropBroker=f,e=new WeakMap,t=new WeakMap,n=new WeakMap,Gi}var zi,Ki={},qi={},Ji=s&&s.__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},Yi=s&&s.__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)};Object.defineProperty(qi,\"__esModule\",{value:!0});const Zi=d,Qi=Hi;class Xi extends Zi.Base{constructor(e,t,n){super(e),zi.set(this,void 0),this.id=n,Ji(this,zi,t,\"f\")}async setContext(e){this.wire.sendAction(\"interop-session-context-group-set-context\").catch((e=>{}));return(await Yi(this,zi,\"f\")).dispatch(`sessionContextGroup:setContext-${this.id}`,{sessionContextGroupId:this.id,context:e})}async getCurrentContext(e){this.wire.sendAction(\"interop-session-context-group-get-context\").catch((e=>{}));return(await Yi(this,zi,\"f\")).dispatch(`sessionContextGroup:getContext-${this.id}`,{sessionContextGroupId:this.id,type:e})}async addContextHandler(e,t){if(this.wire.sendAction(\"interop-session-context-group-add-handler\").catch((e=>{})),\"function\"!=typeof e)throw new Error(\"Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.\");const n=await Yi(this,zi,\"f\");let i;return i=t?`sessionContextHandler:invoke-${this.id}-${t}-${(0,Qi.generateId)()}`:`sessionContextHandler:invoke-${this.id}`,n.register(i,(0,Qi.wrapContextHandler)(e,i)),await n.dispatch(`sessionContextGroup:handlerAdded-${this.id}`,{handlerId:i,contextType:t}),{unsubscribe:await this.createUnsubscribeCb(i)}}async createUnsubscribeCb(e){const t=await Yi(this,zi,\"f\");return async()=>{t.remove(e),await t.dispatch(`sessionContextGroup:handlerRemoved-${this.id}`,{handlerId:e})}}getUserInstance(){return{id:this.id,setContext:(0,Qi.wrapInTryCatch)(this.setContext.bind(this),\"Failed to set context: \"),getCurrentContext:(0,Qi.wrapInTryCatch)(this.getCurrentContext.bind(this),\"Failed to get context: \"),addContextHandler:(0,Qi.wrapInTryCatch)(this.addContextHandler.bind(this),\"Failed to add context handler: \")}}}qi.default=Xi,zi=new WeakMap;var er={},tr={},nr={},ir={},rr=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),or=s&&s.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,\"default\",{enumerable:!0,value:t})}:function(e,t){e.default=t}),sr=s&&s.__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)&&rr(t,e,n);return or(t,e),t};Object.defineProperty(ir,\"__esModule\",{value:!0}),ir.PrivateChannelClient=void 0;const ar=sr(Hi);var cr,dr;function hr(){if(cr)return tr;cr=1;var e,t=s&&s.__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)},n=s&&s.__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},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(tr,\"__esModule\",{value:!0}),tr.FDC3ModuleBase=void 0;const o=nr,a=Hi,c=wr(),d=r(i);return tr.FDC3ModuleBase=class{get client(){return t(this,e,\"f\").call(this)}get fin(){return this.wire.getFin()}constructor(t,i){this.wire=i,e.set(this,void 0),n(this,e,t,\"f\")}async broadcast(e){return this.wire.sendAction(\"fdc3-broadcast\").catch((e=>{})),this.client.setContext(e)}async _open(e,t){this.wire.sendAction(\"fdc3-open\").catch((e=>{}));try{return await c.InteropClient.ferryFdc3Call(this.client,\"fdc3Open\",{app:e,context:t})}catch(e){const t=e.message===a.BROKER_ERRORS.fdc3Open?\"ResolverUnavailable\":e.message;throw new Error(t)}}async _getChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:\"system\",...(0,o.getUnsupportedChannelApis)()})))}async getOrCreateChannel(e){this.wire.sendAction(\"fdc3-get-or-create-channel\").catch((e=>{}));const t=(await this._getChannels()).find((t=>t.id===e));if(t)return{...t,type:\"system\",...(0,o.getUnsupportedChannelApis)()};try{const t=await this.client.joinSessionContextGroup(e);return(0,o.buildAppChannelObject)(t)}catch(e){throw console.error(e.message),new Error(o.ChannelError.CreationFailed)}}async getSystemChannels(){return this.wire.sendAction(\"fdc3-get-system-channels\").catch((e=>{})),this._getChannels()}async joinChannel(e){this.wire.sendAction(\"fdc3-join-channel\").catch((e=>{}));try{return await this.client.joinContextGroup(e)}catch(e){if(e.message===a.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup?console.error(\"The Channel you have tried to join is an App Channel. Custom Channels can only be defined by the Interop Broker through code or manifest configuration. Please use getOrCreateChannel.\"):console.error(e.message),e.message.startsWith(\"Attempting to join a context group that does not exist\"))throw new Error(o.ChannelError.NoChannelFound);throw new Error(o.ChannelError.AccessDenied)}}async getCurrentChannel(){this.wire.sendAction(\"fdc3-get-current-channel\").catch((e=>{}));const e=await this.getCurrentContextGroupInfo();return e?this.buildChannelObject(e):null}async leaveCurrentChannel(){return this.wire.sendAction(\"fdc3-leave-current-channel\").catch((e=>{})),this.client.removeFromContextGroup()}async getCurrentContextGroupInfo(){const e=await this.client.getContextGroups(),t=e.map((async e=>this.client.getAllClientsInContextGroup(e.id))),n=(await Promise.all(t)).findIndex((e=>e.some((e=>{const{uuid:t,name:n}=e;return this.wire.me.uuid===t&&this.wire.me.name===n}))));return e[n]}async buildChannelObject(e){return{...e,type:\"system\",addContextListener:(...[e,t])=>{let n,i;\"function\"==typeof e?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),n=e):(n=t,\"string\"==typeof e&&(i=e));const r=(async()=>{let e=!0;const t=await this.client.getCurrentContext(i);return this.client.addContextHandler(((i,r)=>{if(!e||(e=!1,!(0,d.default)(t,i)))return n(i,r)}),i)})();return{...r,unsubscribe:()=>r.then((e=>e.unsubscribe()))}},broadcast:this.broadcast.bind(this),getCurrentContext:async e=>{const t=await this.client.getCurrentContext(e);return void 0===t?null:t}}}},e=new WeakMap,tr}ir.PrivateChannelClient=class{constructor(e,t){this.id=t,this.client=e,this.listeners=new Map}async broadcast(e){return this.client.dispatch(\"broadcast\",{context:e})}async getCurrentContext(e){return this.client.dispatch(\"getCurrentContext\",{contextType:e})}async addContextListener(e,t){if(\"function\"!=typeof t)throw new Error(\"Non-function argument passed to the second parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.\");let n;n=e?`contextHandler:invoke-${this.id}-${e}-${ar.generateId()}`:`contextHandler:invoke-${this.id}-${ar.generateId()}`,this.client.register(n,ar.wrapContextHandler(t,n));const i={unsubscribe:await this.createContextUnsubscribeCb(n)};return this.listeners.set(n,i),await this.client.dispatch(\"contextHandlerAdded\",{handlerId:n,contextType:e}),i}createNonStandardUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch(\"nonStandardHandlerRemoved\",{handlerId:e})}}createContextUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch(\"contextHandlerRemoved\",{handlerId:e})}}onAddContextListener(e){const t=`onContextHandlerAdded:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch(\"onAddContextHandlerAdded\",{handlerId:t}),n}onDisconnect(e){const t=`onDisconnect:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch(\"onDisconnectHandlerAdded\",{handlerId:t}),n}onUnsubscribe(e){const t=`onUnsubscribe:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch(\"onUnsubscribeHandlerAdded\",{handlerId:t}),n}async cleanUpAllSubs(){Array.from(this.listeners.keys()).forEach((e=>{this.client.remove(e),this.listeners.delete(e)}))}async disconnect(){try{await this.client.dispatch(\"clientDisconnecting\"),await this.cleanUpAllSubs(),await this.client.disconnect()}catch(e){throw new Error(e.message)}}},function(e){var t=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,\"__esModule\",{value:!0}),e.getIntentResolution=e.isChannel=e.isContext=e.connectPrivateChannel=e.buildAppChannelObject=e.buildPrivateChannelObject=e.ChannelError=e.ResultError=e.UnsupportedChannelApiError=e.getUnsupportedChannelApis=void 0;const n=Hi,r=ir,o=t(i);e.getUnsupportedChannelApis=e=>({addContextListener:()=>{throw new a(\"Channel.addContextListener\",e)},broadcast:()=>{throw new a(\"Channel.broadcast\",e)},getCurrentContext:()=>{throw new a(\"Channel.getCurrentContext\",e)}});class a extends Error{constructor(e,t=\"System\"){super(e),this.message=`Calling ${e} on an instance of a ${t} Channel returned by fdc3.get${t}Channels is not supported. If you would like to use a ${t} Channel, please use fdc3.joinChannel, fdc3.addContextListener, and fdc3.broadcast instead.`}}var c,d;e.UnsupportedChannelApiError=a,function(e){e.NoResultReturned=\"NoResultReturned\",e.IntentHandlerRejected=\"IntentHandlerRejected\"}(c=e.ResultError||(e.ResultError={})),(d=e.ChannelError||(e.ChannelError={})).NoChannelFound=\"NoChannelFound\",d.AccessDenied=\"AccessDenied\",d.CreationFailed=\"CreationFailed\";e.buildPrivateChannelObject=e=>{let t=!1;const n=()=>{if(t)throw new Error(\"Private Channel Client has been disconnected from the Private Channel\")};return{id:e.id,type:\"private\",broadcast:async t=>(n(),e.broadcast(t)),getCurrentContext:async t=>(n(),e.getCurrentContext(t)),addContextListener:async(t,i)=>{n();let r=i,o=t;\"function\"==typeof t&&(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),r=t,o=null);return e.addContextListener(o,r)},onAddContextListener:t=>(n(),e.onAddContextListener(t)),disconnect:async()=>(n(),t=!0,e.disconnect()),onDisconnect:t=>(n(),e.onDisconnect(t)),onUnsubscribe:t=>(n(),e.onUnsubscribe(t))}};e.buildAppChannelObject=e=>({id:e.id,type:\"app\",broadcast:e.setContext,getCurrentContext:async t=>{const n=await e.getCurrentContext(t);return void 0===n?null:n},addContextListener:(t,n)=>{let i,r;\"function\"==typeof t?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),i=t):(i=n,\"string\"==typeof t&&(r=t));const s=(async()=>{let t=!0;const n=await e.getCurrentContext(r);return e.addContextHandler(((e,r)=>{if(!t||(t=!1,!(0,o.default)(n,e)))return i(e,r)}),r)})();return{...s,unsubscribe:()=>s.then((e=>e.unsubscribe()))}}});e.connectPrivateChannel=async t=>{try{const n=await fin.InterApplicationBus.Channel.connect(t),i=new r.PrivateChannelClient(n,t);return(0,e.buildPrivateChannelObject)(i)}catch(e){throw new Error(`Private Channel with id: ${t} doesn't exist`)}};e.isContext=e=>{if(e&&\"object\"==typeof e&&\"type\"in e){const{type:t}=e;return\"string\"==typeof t}return!1};e.isChannel=e=>{if(e&&\"object\"==typeof e&&\"type\"in e&&\"id\"in e){const{type:t,id:n}=e;return\"string\"==typeof t&&\"string\"==typeof n&&(\"app\"===t||\"private\"===t)}return!1};e.getIntentResolution=async(t,i,r,o)=>{const s=(0,n.generateId)(),a=new Promise(((e,t)=>{fin.InterApplicationBus.subscribe({uuid:\"*\"},s,(t=>{e(t)})).catch((()=>t(new Error(\"getResult is not supported in this environment\"))))})),d=r?{target:r,intentResolutionResultId:s}:{intentResolutionResultId:s},h=o?{name:o,context:i,metadata:d}:{...i,metadata:d},l=async()=>{let n=await a;if(!n||\"object\"!=typeof n)throw new Error(c.NoResultReturned);const{error:i}=n;if(i)throw new Error(c.IntentHandlerRejected);if((0,e.isChannel)(n)){const{id:i,type:r}=n;switch(r){case\"private\":n=await(0,e.connectPrivateChannel)(i);break;case\"app\":{const r=await t.joinSessionContextGroup(i);n=(0,e.buildAppChannelObject)(r);break}}}else if(!(0,e.isContext)(n))throw new Error(c.NoResultReturned);return n},u=o?await t.fireIntent(h):await t.fireIntentForContext(h);return\"object\"!=typeof u?{source:{appId:\"\",instanceId:\"\"},intent:\"\",version:\"2.0\",getResult:l}:{...u,getResult:l}}}(nr);var lr,ur,pr={};function wr(){if(ur)return Ki;ur=1;var e,t,n=s&&s.__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},i=s&&s.__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)},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ki,\"__esModule\",{value:!0}),Ki.InteropClient=void 0;const o=d,a=r(qi),c=function(){if(dr)return er;dr=1,Object.defineProperty(er,\"__esModule\",{value:!0}),er.Fdc3Module=void 0;const e=Hi,t=hr();class n extends t.FDC3ModuleBase{async open(e,t){await super._open(e,t)}addContextListener(e,t){let n;return this.wire.sendAction(\"fdc3-add-context-listener\").catch((e=>{})),\"function\"==typeof e?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),n=this.client.addContextHandler(e)):n=this.client.addContextHandler(t,null===e?void 0:e),{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}addIntentListener(e,t){this.wire.sendAction(\"fdc3-add-intent-listener\").catch((e=>{}));const n=this.client.registerIntentHandler((e=>{const{context:n,metadata:i}=e,{metadata:r}=n,o=i?.intentResolutionResultId||r?.intentResolutionResultId;o&&this.fin.InterApplicationBus.publish(o,null).catch((()=>null)),t(e.context)}),e,{fdc3Version:\"1.2\"});return{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}async raiseIntent(t,n,i){this.wire.sendAction(\"fdc3-raise-intent\").catch((e=>{}));const r=i?{name:t,context:n,metadata:{target:i}}:{name:t,context:n};try{return await this.client.fireIntent(r)}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntent?\"ResolverUnavailable\":t.message;throw new Error(n)}}async findIntent(t,n){this.wire.sendAction(\"fdc3-find-intent\").catch((e=>{}));try{return await this.client.getInfoForIntent({name:t,context:n})}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntent?\"ResolverUnavailable\":t.message;throw new Error(n)}}async findIntentsByContext(t){this.wire.sendAction(\"fdc3-find-intents-by-context\").catch((e=>{}));try{return await this.client.getInfoForIntentsByContext(t)}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntentsByContext?\"ResolverUnavailable\":t.message;throw new Error(n)}}async raiseIntentForContext(t,n){this.wire.sendAction(\"fdc3-raise-intent-for-context\").catch((e=>{}));try{return await this.client.fireIntentForContext({...t,metadata:{target:n}})}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntentForContext?\"ResolverUnavailable\":t.message;throw new Error(n)}}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}getInfo(){return this.wire.sendAction(\"fdc3-get-info\").catch((e=>{})),{providerVersion:this.wire.environment.getAdapterVersionSync(),provider:`openfin-${this.wire.me.uuid}`,fdc3Version:\"1.2\"}}}return er.Fdc3Module=n,er}(),h=function(){if(lr)return pr;lr=1,Object.defineProperty(pr,\"__esModule\",{value:!0}),pr.Fdc3Module2=void 0;const e=hr(),t=Hi,n=wr(),i=nr,r=ir;class o extends e.FDC3ModuleBase{async open(e,t){return\"string\"==typeof e&&console.warn(\"Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).\"),super._open(e,t)}async findInstances(e){this.wire.sendAction(\"fdc3-find-instances\").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,\"fdc3FindInstances\",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3FindInstances?\"ResolverUnavailable\":e.message;throw new Error(n)}}async getAppMetadata(e){this.wire.sendAction(\"fdc3-get-app-metadata\").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,\"fdc3GetAppMetadata\",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3GetAppMetadata?\"ResolverUnavailable\":e.message;throw new Error(n)}}async addContextListener(e,t){this.wire.sendAction(\"fdc3-add-context-listener\").catch((e=>{}));const n=e=>t=>{const{contextMetadata:n,...i}=t,r=n?[{...i},n]:[t,null];e(...r)};let i=t,r=n(i);return\"function\"==typeof e?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),i=e,r=n(i),this.client.addContextHandler(r)):this.client.addContextHandler(r,null===e?void 0:e)}async findIntent(e,n,i){this.wire.sendAction(\"fdc3-find-intent\").catch((e=>{}));try{return await this.client.getInfoForIntent({name:e,context:n,metadata:{resultType:i}})}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntent?\"ResolverUnavailable\":e.message;throw new Error(n)}}async findIntentsByContext(e,i){this.wire.sendAction(\"fdc3-find-intents-by-context\").catch((e=>{}));const r=i?{context:e,metadata:{resultType:i}}:e;try{return await n.InteropClient.ferryFdc3Call(this.client,\"fdc3v2FindIntentsByContext\",r)}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntentsByContext?\"ResolverUnavailable\":e.message;throw new Error(n)}}async raiseIntent(e,n,r){this.wire.sendAction(\"fdc3-raise-intent\").catch((e=>{}));try{return\"string\"==typeof r&&console.warn(\"Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).\"),(0,i.getIntentResolution)(this.client,n,r,e)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?\"ResolverUnavailable\":e.message;throw new Error(n)}}async raiseIntentForContext(e,n){this.wire.sendAction(\"fdc3-raise-intent-for-context\").catch((e=>{}));try{return\"string\"==typeof n&&console.warn(\"Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).\"),(0,i.getIntentResolution)(this.client,e,n)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?\"ResolverUnavailable\":e.message;throw new Error(n)}}async addIntentListener(e,t){if(this.wire.sendAction(\"fdc3-add-intent-listener\").catch((e=>{})),\"string\"!=typeof e)throw new Error(\"First argument must be an Intent name\");return this.client.registerIntentHandler((async e=>{let n,i;const{context:r,metadata:o}=e,{contextMetadata:s,metadata:a,...c}=r,d=o?.intentResolutionResultId||a?.intentResolutionResultId;try{const e=a?{metadata:a,...c}:{...c};n=await t(e,s),i=n}catch(e){n=e,i={error:!0}}if(d&&this.fin.InterApplicationBus.publish(d,i).catch((()=>null)),n instanceof Error)throw new Error(n.message);return n}),e,{fdc3Version:\"2.0\"})}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}async createPrivateChannel(){const e=(0,t.generateId)();await n.InteropClient.ferryFdc3Call(this.client,\"createPrivateChannelProvider\",{channelId:e});const o=await this.fin.InterApplicationBus.Channel.connect(e),s=new r.PrivateChannelClient(o,e);return(0,i.buildPrivateChannelObject)(s)}async getUserChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:\"user\",...(0,i.getUnsupportedChannelApis)(\"User\")})))}async getSystemChannels(){return console.warn(\"This API has been deprecated. Please use fdc3.getUserChannels instead.\"),super.getSystemChannels()}async joinUserChannel(e){return super.joinChannel(e)}async joinChannel(e){return console.warn(\"This API has been deprecated. Please use fdc3.joinUserChannel instead.\"),super.joinChannel(e)}async getCurrentChannel(){const e=await super.getCurrentChannel();return e?{...e,type:\"user\",broadcast:this.broadcast.bind(this)}:null}async getInfo(){return n.InteropClient.ferryFdc3Call(this.client,\"fdc3v2GetInfo\",{fdc3Version:\"2.0\"})}}return pr.Fdc3Module2=o,pr}(),l=Hi;let u=class extends o.Base{constructor(i,r){super(i),e.set(this,void 0),t.set(this,void 0),n(this,t,new Map,\"f\"),n(this,e,r,\"f\")}async setContext(t){this.wire.sendAction(\"interop-client-set-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"setContext\",{context:t})}async addContextHandler(t,n){if(this.wire.sendAction(\"interop-client-add-context-handler\").catch((e=>{})),\"function\"!=typeof t)throw new Error(\"Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.\");const r=await i(this,e,\"f\");let o;o=n?`invokeContextHandler-${n}-${(0,l.generateId)()}`:\"invokeContextHandler\";const s=(0,l.wrapContextHandler)(t,o);return r.register(o,s),await r.dispatch(\"contextHandlerRegistered\",{handlerId:o,contextType:n}),{unsubscribe:async()=>{r.remove(o),await r.dispatch(\"removeContextHandler\",{handlerId:o})}}}async getContextGroups(){this.wire.sendAction(\"interop-client-get-context-groups\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getContextGroups\")}async joinContextGroup(t,n){this.wire.sendAction(\"interop-client-join-context-group\").catch((e=>{}));const r=await i(this,e,\"f\");if(!t)throw new Error(\"No contextGroupId specified for joinContextGroup.\");return r.dispatch(\"joinContextGroup\",{contextGroupId:t,target:n})}async removeFromContextGroup(t){this.wire.sendAction(\"interop-client-remove-from-context-group\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"removeFromContextGroup\",{target:t})}async getAllClientsInContextGroup(t){this.wire.sendAction(\"interop-client-get-all-clients-in-context-group\").catch((e=>{}));const n=await i(this,e,\"f\");if(!t)throw new Error(\"No contextGroupId specified for getAllClientsInContextGroup.\");return n.dispatch(\"getAllClientsInContextGroup\",{contextGroupId:t})}async getInfoForContextGroup(t){this.wire.sendAction(\"interop-client-get-info-for-context-group\").catch((e=>{}));const n=await i(this,e,\"f\");if(!t)throw new Error(\"No contextGroupId specified for getInfoForContextGroup.\");return n.dispatch(\"getInfoForContextGroup\",{contextGroupId:t})}async fireIntent(t){this.wire.sendAction(\"interop-client-fire-intent\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"fireIntent\",t)}async registerIntentHandler(t,n,r){this.wire.sendAction(\"interop-client-register-intent-handler\").catch((e=>{}));const o=await i(this,e,\"f\"),s=`intent-handler-${n}`,a=(0,l.wrapIntentHandler)(t,s);try{await o.register(s,a),await o.dispatch(\"intentHandlerRegistered\",{handlerId:s,...r})}catch(e){throw new Error(\"Unable to register intent handler\")}return{unsubscribe:async()=>{o.remove(s)}}}async getCurrentContext(t){this.wire.sendAction(\"interop-client-get-current-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getCurrentContext\",{contextType:t})}async getInfoForIntent(t){this.wire.sendAction(\"interop-client-get-info-for-intent\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getInfoForIntent\",t)}async getInfoForIntentsByContext(t){this.wire.sendAction(\"interop-client-get-info-for-intents-by-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getInfoForIntentsByContext\",t)}async fireIntentForContext(t){this.wire.sendAction(\"interop-client-fire-intent-for-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"fireIntentForContext\",t)}async joinSessionContextGroup(n){try{const r=i(this,t,\"f\").get(n);if(r)return r.getUserInstance();const o=await i(this,e,\"f\"),{hasConflict:s}=await o.dispatch(\"sessionContextGroup:createIfNeeded\",{sessionContextGroupId:n});s&&console.warn(`A (non-session) context group with the name \"${n}\" already exists. If you are trying to join a Context Group, call joinContextGroup instead.`);const c=new a.default(this.wire,i(this,e,\"f\"),n);return i(this,t,\"f\").set(n,c),c.getUserInstance()}catch(e){throw console.error(`Error thrown trying to create Session Context Group with id \"${n}\": ${e}`),e}}async onDisconnection(t){this.wire.sendAction(\"interop-client-add-ondisconnection-listener\").catch((e=>{}));return(await i(this,e,\"f\")).onDisconnection((e=>{const{uuid:n}=e;t({type:\"interop-broker\",topic:\"disconnected\",brokerName:n})}))}getFDC3Sync(e){switch(e){case\"1.2\":return new c.Fdc3Module((()=>this),this.wire);case\"2.0\":return new h.Fdc3Module2((()=>this),this.wire);default:throw new Error(`Invalid FDC3 version provided: ${e}. Must be '1.2' or '2.0'`)}}async getFDC3(e){return this.getFDC3Sync(e)}static async ferryFdc3Call(t,n,r){return(await i(t,e,\"f\")).dispatch(n,r||null)}};return Ki.InteropClient=u,e=new WeakMap,t=new WeakMap,Ki}var yr,fr,gr,mr={};function vr(){if(yr)return mr;yr=1,Object.defineProperty(mr,\"__esModule\",{value:!0}),mr.overrideCheck=mr.checkFDC32Overrides=mr.getDefaultViewFdc3VersionFromAppInfo=void 0;const e=Vi();function t(t){return[\"fdc3HandleFindInstances\",\"handleInfoForIntent\",\"handleInfoForIntentsByContext\",\"fdc3HandleGetAppMetadata\",\"fdc3HandleGetInfo\",\"fdc3HandleOpen\",\"handleFiredIntent\",\"handleFiredIntentForContext\"].filter((n=>t[n]===e.InteropBroker.prototype[n]))}return mr.getDefaultViewFdc3VersionFromAppInfo=function({manifest:e,initialOptions:t}){const n=e?.platform?.defaultViewOptions?.fdc3InteropApi??t.defaultViewOptions?.fdc3InteropApi;return[\"1.2\",\"2.0\"].includes(n??\"\")?n:void 0},mr.checkFDC32Overrides=t,mr.overrideCheck=function(e,n){if(n&&\"2.0\"===n){const n=t(e);n.length>0&&console.warn(`WARNING: FDC3 2.0 has been set as a default option for Views in this Platform, but the required InteropBroker APIs for FDC3 2.0 compliance have not all been overridden.\\nThe following APIs need to be overridden:\\n${n.join(\"\\n\")}`)}},mr}function Cr(){return gr||(gr=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),i=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),i(function(){if(fr)return Ti;fr=1;var e=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ti,\"__esModule\",{value:!0}),Ti.InteropModule=void 0;const t=e(n),i=$i,r=d,o=Vi(),a=wr(),c=vr(),h=Tn,l=e=>new e,u=\"You have attempted to use or modify InteropBroker parameters, which is not allowed. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.\";class p extends r.Base{async init(e,n=l){this.wire.sendAction(\"interop-init\").catch((()=>{}));const r=await this.wire.environment.getInteropInfo(this.wire.getFin()),s=(0,i.createUnusableObject)(u),a=(0,i.createWarningObject)(u,(0,t.default)(r)),d=async()=>{throw new Error(u)},p=o.InteropBroker.createClosedConstructor(this.wire,(()=>this.fin.InterApplicationBus.Channel.create(`interop-broker-${e}`)),r);let w;return w=Array.isArray(n)?new((0,h.overrideFromComposables)(...n)(p))(s,d,a):await n(p,s,d,a),(0,c.overrideCheck)(w,r.fdc3Version),w}connectSync(e,t){return this.wire.sendAction(\"interop-connect-sync\").catch((()=>{})),new a.InteropClient(this.wire,this.wire.environment.whenReady().then((()=>this.fin.InterApplicationBus.Channel.connect(`interop-broker-${e}`,{payload:t}))))}}return Ti.InteropModule=p,Ti}(),e),i(wr(),e),i(Vi(),e)}(Li)),Li}var br={},Ir={},Er={},xr={};Object.defineProperty(xr,\"__esModule\",{value:!0}),xr.getSnapshotSourceChannelName=void 0;xr.getSnapshotSourceChannelName=e=>`snapshot-source-provider-${e.uuid}`;var Ar,Pr,Mr,_r,Or,Sr=s&&s.__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},Rr=s&&s.__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)};Object.defineProperty(Er,\"__esModule\",{value:!0}),Er.SnapshotSource=void 0;const Fr=d,jr=xr,kr=new Map;class Lr extends Fr.Base{constructor(e,t){super(e),Ar.set(this,void 0),Pr.set(this,(()=>(kr.has(this.identity.uuid)||kr.set(this.identity.uuid,{eventFired:null,clientPromise:null}),kr.get(this.identity.uuid)))),Mr.set(this,(()=>(Rr(this,Pr,\"f\").call(this).clientPromise||(Rr(this,Pr,\"f\").call(this).clientPromise=Rr(this,_r,\"f\").call(this)),Rr(this,Pr,\"f\").call(this).clientPromise))),_r.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);try{Rr(this,Pr,\"f\").call(this).eventFired||await Rr(this,Or,\"f\").call(this);const t=await this.fin.InterApplicationBus.Channel.connect(e,{wait:!1});return t.onDisconnection((()=>{Rr(this,Pr,\"f\").call(this).clientPromise=null,Rr(this,Pr,\"f\").call(this).eventFired=null})),t}catch(e){throw Rr(this,Pr,\"f\").call(this).clientPromise=null,new Error(\"The targeted SnapshotSource is not currently initialized. Await this object's ready() method.\")}})),Or.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);let t,n;const i=new Promise(((e,i)=>{t=e,n=i}));Rr(this,Pr,\"f\").call(this).eventFired=i;const r=async i=>{try{i.channelName===e&&(t(),await this.fin.InterApplicationBus.Channel.removeListener(\"connected\",r))}catch(e){n(e)}};await this.fin.InterApplicationBus.Channel.on(\"connected\",r)})),Sr(this,Ar,t,\"f\")}get identity(){return Rr(this,Ar,\"f\")}async ready(){this.wire.sendAction(\"snapshot-source-ready\").catch((e=>{}));try{await Rr(this,Mr,\"f\").call(this)}catch(e){await Rr(this,Pr,\"f\").call(this).eventFired}}async getSnapshot(){this.wire.sendAction(\"snapshot-source-get-snapshot\").catch((e=>{}));const e=await Rr(this,Mr,\"f\").call(this),t=await e.dispatch(\"get-snapshot\");return(await t).snapshot}async applySnapshot(e){this.wire.sendAction(\"snapshot-source-apply-snapshot\").catch((e=>{}));return(await Rr(this,Mr,\"f\").call(this)).dispatch(\"apply-snapshot\",{snapshot:e})}}Er.SnapshotSource=Lr,Ar=new WeakMap,Pr=new WeakMap,Mr=new WeakMap,_r=new WeakMap,Or=new WeakMap,Object.defineProperty(Ir,\"__esModule\",{value:!0}),Ir.SnapshotSourceModule=void 0;const Tr=d,$r=Er,Br=xr;class Gr extends Tr.Base{async init(e){if(this.wire.sendAction(\"snapshot-source-init\").catch((e=>{})),\"object\"!=typeof e||\"function\"!=typeof e.getSnapshot||\"function\"!=typeof e.applySnapshot)throw new Error(\"you must pass in a valid SnapshotProvider\");const t=await this.fin.InterApplicationBus.Channel.create((0,Br.getSnapshotSourceChannelName)(this.fin.me));t.register(\"get-snapshot\",(async()=>({snapshot:await e.getSnapshot()}))),t.register(\"apply-snapshot\",(({snapshot:t})=>e.applySnapshot(t)))}wrapSync(e){return this.wire.sendAction(\"snapshot-source-wrap-sync\").catch((e=>{})),new $r.SnapshotSource(this.wire,e)}async wrap(e){return this.wire.sendAction(\"snapshot-source-wrap\").catch((e=>{})),this.wrapSync(e)}}Ir.SnapshotSourceModule=Gr,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Ir,e),n(Er,e)}(br),Object.defineProperty(a,\"__esModule\",{value:!0});var Wr=a.Fin=void 0;const Hr=t,Nr=c,Dr=ie(),Ur=Z(),Vr=de,zr=en,Kr=rn,qr=un,Jr=bn,Yr=J(),Zr=An,Qr=ki,Xr=Cr(),eo=br;class to extends Hr.EventEmitter{constructor(e){super(),this.wire=e,this.System=new Nr.System(e),this.Window=new Dr._WindowModule(e),this.Application=new Ur.ApplicationModule(e),this.InterApplicationBus=new Vr.InterApplicationBus(e),this.Clipboard=new zr.Clipboard(e),this.ExternalApplication=new Kr.ExternalApplicationModule(e),this.Frame=new qr._FrameModule(e),this.GlobalHotkey=new Jr.GlobalHotkey(e),this.Platform=new Zr.PlatformModule(e,this.InterApplicationBus.Channel),this.View=new Yr.ViewModule(e),this.Interop=new Xr.InteropModule(e),this.SnapshotSource=new eo.SnapshotSourceModule(e),e.registerFin(this),this.me=(0,Qr.getMe)(e),e.on(\"disconnected\",(()=>{this.emit(\"disconnected\")}))}}Wr=a.Fin=to;var no={},io={};function ro(e){return\"string\"==typeof e.manifestUrl}function oo(e){return ao(e)&&\"string\"==typeof e.address}function so(e){return oo(e)&&\"string\"==typeof e.token}function ao(e){return\"string\"==typeof e.uuid}function co(e){return e.runtime&&\"string\"==typeof e.runtime.version}function ho(e){return ao(e)&&co(e)}Object.defineProperty(io,\"__esModule\",{value:!0}),io.isInternalConnectConfig=io.isPortDiscoveryConfig=io.isNewConnectConfig=io.isConfigWithReceiver=io.isRemoteConfig=io.isExistingConnectConfig=io.isExternalConfig=void 0,io.isExternalConfig=ro,io.isExistingConnectConfig=oo,io.isRemoteConfig=so,io.isConfigWithReceiver=function(e){return\"object\"==typeof e.receiver&&so({...e,address:\"\"})},io.isNewConnectConfig=ho,io.isPortDiscoveryConfig=function(e){return ro(e)&&co(e)||ho(e)},io.isInternalConnectConfig=function(e){return oo(e)||ho(e)};var lo={},uo={};Object.defineProperty(uo,\"__esModule\",{value:!0}),uo.EmitterMap=void 0;const po=t;function wo(e){return Buffer.from(e).toString(\"base64\")}uo.EmitterMap=class{constructor(){this.storage=new Map}hashKeys(e){return e.map(wo).join(\"/\")}getOrCreate(e){const t=this.hashKeys(e);return this.storage.has(t)||this.storage.set(t,new po.EventEmitter),this.storage.get(t)}has(e){return this.storage.has(this.hashKeys(e))}delete(e){const t=this.hashKeys(e);return this.storage.delete(t)}},Object.defineProperty(lo,\"__esModule\",{value:!0});const yo=uo;class fo extends yo.EmitterMap{constructor(){super(...arguments),this.dispatchEvent=e=>{if(function(e){return\"process-desktop-event\"===e.action}(e)){const{payload:t}=e,n=function(e){const{topic:t}=e;if(\"frame\"===t||\"window\"===t||\"view\"===t){const{uuid:n,name:i}=e;return[t,n,i]}if(\"application\"===t){const{uuid:n}=e;return[t,n]}return[t]}(t);if(this.has(n))return this.getOrCreate(n).emit(t.type,t),!0}return!1}}}lo.default=fo;var go,mo,vo=s&&s.__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},Co=s&&s.__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)},bo=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(no,\"__esModule\",{value:!0});var Io=no.Transport=void 0;const Eo=t,xo=io,Ao=g,Po=bo(lo),Mo=ki,_o=ke;class Oo extends Eo.EventEmitter{constructor(e,t,n){super(),this.wireListeners=new Map,this.topicRefMap=new Map,this.eventAggregator=new Po.default,this.messageHandlers=[this.eventAggregator.dispatchEvent],go.set(this,void 0),mo.set(this,void 0),this.connectSync=()=>{Co(this,go,\"f\").connectSync()},this.getPort=()=>Co(this,go,\"f\").getPort(),vo(this,go,new e(this.onmessage.bind(this)),\"f\"),this.environment=t,this.sendRaw=Co(this,go,\"f\").send.bind(Co(this,go,\"f\")),this.registerMessageHandler(this.handleMessage.bind(this)),Co(this,go,\"f\").on(\"disconnected\",(()=>{for(const[,{handleNack:e}]of this.wireListeners)e({reason:\"Remote connection has closed\"});this.wireListeners.clear(),this.emit(\"disconnected\")}));const{uuid:i,name:r}=n,o=this.environment.getCurrentEntityType();this.me=(0,Mo.getBaseMe)(o,i,r)}getFin(){if(!Co(this,mo,\"f\"))throw new Error(\"No Fin object registered for this transport\");return Co(this,mo,\"f\")}registerFin(e){if(Co(this,mo,\"f\"))throw new Error(\"Fin object has already been registered for this transport\");vo(this,mo,e,\"f\")}shutdown(){return Co(this,go,\"f\").shutdown()}async connect(e){if((0,xo.isConfigWithReceiver)(e))return await Co(this,go,\"f\").connect(e.receiver),this.authorize(e);if((0,xo.isRemoteConfig)(e))return this.connectRemote(e);if((0,xo.isExistingConnectConfig)(e))return this.connectByPort(e);if((0,xo.isNewConnectConfig)(e)){const t=await this.environment.retrievePort(e);return this.connectByPort({...e,address:`ws://localhost:${t}`})}}async connectRemote(e){return await Co(this,go,\"f\").connect(new(this.environment.getWsConstructor())(e.address)),this.authorize(e)}async connectByPort(e){const{address:t,uuid:n}=e,i={...e,type:\"file-token\"},r=Co(this,go,\"f\");await r.connect(new(this.environment.getWsConstructor())(e.address));const o=await this.sendAction(\"request-external-authorization\",{uuid:n,type:\"file-token\"},!0);if(\"external-authorization-response\"!==o.action)throw new Ao.UnexpectedActionError(o.action);return await this.environment.writeToken(o.payload.file,o.payload.token),this.authorize(i)}async authorize(e){const t=await this.sendAction(\"request-authorization\",e,!0);if(\"authorization-response\"!==t.action)throw new Ao.UnexpectedActionError(t.action);if(!0!==t.payload.success)throw new Ao.RuntimeError(t.payload)}sendAction(e,t={},n=!1){let i=()=>{};const r=Ao.RuntimeError.getCallSite(1),o=this.environment.getNextMessageId(),s=new Promise(((s,a)=>{i=a;const c={action:e,payload:t,messageId:o},d=Co(this,go,\"f\");return this.addWireListener(o,s,(e=>this.nackHandler(e,a,r)),n),d.send(c).catch(a)}));return Object.assign(s,{cancel:i,messageId:o})}nackHandler(e,t,n){t(\"string\"==typeof e?e:new Ao.RuntimeError(e,n))}ferryAction(e){return new Promise(((t,n)=>{const i=this.environment.getNextMessageId();e.messageId=i;const r=e=>{t(e.payload)};return Co(this,go,\"f\").send(e).then((()=>this.addWireListener(i,r,(e=>this.nackHandler(e,n)),!1))).catch(n)}))}registerMessageHandler(e){this.messageHandlers.push(e)}addWireListener(e,t,n,i){i?this.uncorrelatedListener=t:this.wireListeners.has(e)?n({reason:\"Duplicate handler id\",error:(0,_o.errorToPOJO)(new Ao.DuplicateCorrelationError(String(e)))}):this.wireListeners.set(e,{resolve:t,handleNack:n})}onmessage(e){for(const t of this.messageHandlers)t.call(null,e)}handleMessage(e){const t=e.correlationId||NaN;if(\"correlationId\"in e){if(!this.wireListeners.has(t))return!1;{const{resolve:n,handleNack:i}=this.wireListeners.get(t);\"ack\"!==e.action?i({reason:\"Did not receive ack action\",error:(0,_o.errorToPOJO)(new Ao.NoAckError(e.action))}):\"payload\"in e?e.payload.success?n.call(null,e):i(e.payload):\"string\"==typeof e.reason?i(e):(console.warn(\"Received invalid response from core\",e),i({reason:\"invalid response shape\"})),this.wireListeners.delete(t)}}else this.uncorrelatedListener&&this.uncorrelatedListener.call(null,e),this.uncorrelatedListener=()=>{};return!0}}Io=no.Transport=Oo,go=new WeakMap,mo=new WeakMap;const So=(...e)=>({log:(...t)=>console.debug(`[${(new Date).toISOString()}]`,...(e=>e.map((e=>`[${e}]`)))(e),...t),getLogger:(...t)=>So(...e,...t)}),Ro=So(\"@openfin/core-web/client\");function Fo(e,t){if(!function(e){return\"string\"==typeof e}(e))throw new Error(`Property ${t} has invalid type. Expected string, got ${typeof e}.`)}const jo=\"web-broker-ports-ready\",ko=Ro.getLogger(\"get-web-interop-ports\");function Lo(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)}function To(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}\"function\"==typeof SuppressedError&&SuppressedError;const $o=e=>{var n,i,r;return r=class extends t.EventEmitter{constructor(t){super(),n.set(this,void 0),i.set(this,!1),this.connectSync=()=>{Lo(this,i,\"f\")||(e.addEventListener(\"message\",(e=>{e.data?.topic?.startsWith(\"wire-message\")&&e.data.message&&Lo(this,n,\"f\").call(this,{...JSON.parse(e.data.message),ports:e.ports})})),e.start())},this.connect=async()=>{this.connectSync()},this.send=t=>(e.postMessage({topic:\"wire-message\",message:JSON.stringify(t)}),Promise.resolve()),this.shutdown=async()=>{e.close()},To(this,n,t,\"f\")}getPort(){return e}},n=new WeakMap,i=new WeakMap,r};var Bo={},Go={};Object.defineProperty(Go,\"__esModule\",{value:!0}),Go.BaseEnvironment=void 0;const Wo=vr();Go.BaseEnvironment=class{async getViewWindowIdentity(e,t){const{identity:n}=await e.View.wrapSync(t).getCurrentWindow();return n}async getInteropInfo(e){const t=await e.Application.getCurrentSync().getInfo().catch((()=>null)),n=t?.initialOptions?.interopBrokerConfiguration??{};return{fdc3Version:t?(0,Wo.getDefaultViewFdc3VersionFromAppInfo)(t):void 0,...n,fdc3Info:{providerVersion:await e.System.getVersion(),provider:\"OpenFin\"}}}},Object.defineProperty(Bo,\"__esModule\",{value:!0});var Ho=Bo.BrowserEnvironment=void 0;const No=Go;class Do extends No.BaseEnvironment{constructor(){super(...arguments),this.type=\"other\",this.getRandomId=()=>{const e=new Uint32Array(1);return window.crypto.getRandomValues(e)[0].toString(32)}}getAdapterVersionSync(){return\"\"}observeBounds(e,t){throw new Error(\"Method not implemented.\")}layoutAllowedInContext(e){return!1}initLayoutManager(e,t,n){throw new Error(\"Method not implemented.\")}applyLayoutSnapshot(e,t,n){throw new Error(\"Method not implemented.\")}createLayout(e,t){throw new Error(\"Method not implemented.\")}destroyLayout(e,t){throw new Error(\"Method not implemented.\")}resolveLayout(e,t){throw new Error(\"Method not implemented.\")}initPlatform(...e){throw new Error(\"Method not implemented.\")}writeToken(e,t){return Promise.resolve(\"\")}retrievePort(e){throw new Error(\"Method not implemented.\")}getNextMessageId(){return this.getRandomId()}createChildContent(e){throw new Error(\"Method not implemented.\")}getWebWindow(e){throw new Error(\"Method not implemented.\")}getCurrentEntityIdentity(){throw new Error(\"Method not implemented.\")}getCurrentEntityType(){return\"external connection\"}raiseEvent(e,t){throw new Error(\"Method not implemented.\")}getUrl(){return location.href}getDefaultChannelOptions(){return{create:{},connect:{}}}getRtcPeer(){return new RTCPeerConnection}getWsConstructor(){return WebSocket}whenReady(){return Promise.resolve()}}Ho=Bo.BrowserEnvironment=Do;const Uo=e=>\"platform\"in e&&void 0!==e.platform;var Vo,zo;class Ko extends Ho{constructor(e){super(),this.connectConfig=e,Vo.set(this,void 0),zo.set(this,new W((async()=>Promise.resolve().then((function(){return require(\"./main-b14f67c9.js\")}))))),Uo(e)&&this.validatePlatformOptions(e)}getAdapterVersionSync(){return\"0.39.21\"}validatePlatformOptions({platform:e}){if(!(\"layoutSnapshot\"in e))throw new Error(\"Platform options are missing layoutSnapshot. Please provide a layoutSnapshot in the platform options.\");if(\"windows\"in e||\"windows\"in e.layoutSnapshot)throw new Error(\"It appears you tried to call connect() with a snapshot object from an OpenFin desktop environment. Note that connect() expects to be called with a platform property with this structure: { platform: { layoutSnapshot } }. To get a layoutSnapshot of the expected structure, use fin.Platform.Layout.getCurrentLayoutManagerSync().getLayoutSnapshot() in v34+ in your desktop environment.\");const{layouts:t}=e.layoutSnapshot;Object.entries(t).map((([e,t])=>{if(\"object\"!=typeof t||null===t)throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must be an object.`);if(!(\"content\"in t))throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must contain a 'content' property.`)}))}async getInteropInfo(e){return{...{contextGroups:void 0,logging:{beforeAction:{enabled:!1},afterAction:{enabled:!1}}},fdc3Version:void 0,fdc3Info:{providerVersion:\"0.39.21\",provider:\"OpenFin Web\"}}}layoutAllowedInContext(e){return!0}async initLayoutManager(e,t,n){if(Lo(this,Vo,\"f\"))throw new Error(\"Layout already initialized.\");if(!Uo(this.connectConfig))throw new Error(\"Platform options are missing from connection config.\");const{WebLayoutEntryPoint:i}=await Lo(this,zo,\"f\").getValue();return To(this,Vo,new i(this.connectConfig),\"f\"),await Lo(this,Vo,\"f\").initLayoutManager(e,t,n)}async applyLayoutSnapshot(e,t,n){Lo(this,Vo,\"f\")?.applyLayoutSnapshot(e,t,n)}async createLayout(e,t){return Lo(this,Vo,\"f\")?.createLayout(e,t)}async destroyLayout(e,t){return Lo(this,Vo,\"f\")?.destroyLayout(e,t)}async getViewWindowIdentity(e,t){return Promise.resolve({uuid:t.uuid,name:t.uuid})}}Vo=new WeakMap,zo=new WeakMap;const qo=()=>{const e=((e,t)=>{const n=new RegExp(`^${t}<(?.*)>$`).exec(e)?.groups?.meta;if(n)try{return JSON.parse(atob(n))}catch(e){throw new Error(`Failed to decode JSON from ${n}.`)}})(window.name,\"of-frame\");if(e)try{const{name:t,uuid:n,brokerUrl:i,providerId:r,contextGroup:o}=e;return Fo(i,\"brokerUrl\"),Fo(n,\"uuid\"),Fo(t,\"name\"),{identity:{name:t,uuid:n},brokerUrl:i,interopConfig:{providerId:r,currentContextGroup:o}}}catch(e){throw new Error(`Unexpected error occurred when inferring platform information: ${e.stack}`)}},Jo=()=>{const e=r.v4();return{uuid:e,name:e}},Yo=async e=>{if(\"enabled\"===e.connectionInheritance){const t=await(async e=>{const t=qo();if(t){const{validateOptions:n=(()=>!0)}=e,{identity:i,...r}=t;if(!await n(r))throw new Error(\"Parent options were rejected by validateOptions.\");return t}})(e);if(t)return t}if(!e.options){const t=\"enabled\"===e.connectionInheritance?\"Broker URL was not specified nor provided by a platform container.\":\"Connection inheritance is disabled but no options were provided.\";throw new Error(t)}return{...e.options,identity:Jo()}};exports.__classPrivateFieldGet=Lo,exports.__classPrivateFieldSet=To,exports.apiExposer=Gn,exports.commonjsGlobal=s,exports.connect=async t=>{try{Ro.log(\"Establishing connection\",t);const{brokerUrl:n,identity:i,timeout:r,interopConfig:s}=await Yo(t),{workerPort:a,iframeBrokerPort:c}=await(async(e,t,n)=>{const{origin:i}=new URL(e),r=document.createElement(\"IFRAME\");let s;r.style.display=\"none\";try{return await new Promise(((a,c)=>{const d=e=>{if(e.source===r.contentWindow&&e.data?.topic===`ack-${jo}`){if(e.origin!==i)c(new Error(`Broker redirected to unexpected origin ${e.origin}, expected ${i}.`));else if(e.data.success){const[t,n]=e.ports;a({iframeBrokerPort:t,workerPort:n})}else c(new m(e.data));window.removeEventListener(\"message\",d),clearTimeout(s)}};window.addEventListener(\"message\",d),ko.log(`Connecting to broker ${e}`),r.setAttribute(\"src\",e),r.setAttribute(\"name\",o(t,\"of-broker\")),document.body.appendChild(r),ko.log(\"Iframe loaded, awaiting init message from iframe\"),n&&(s=setTimeout((()=>{window.removeEventListener(\"message\",d),document.body.removeChild(r),c(new Error(\"Worker did not initialize in time\"))}),n))}))}catch(e){throw new Error(`Failed to initialise Fin Web Client. ${e.message}`,{cause:e})}})(n,i,r);Ro.log(\"Successfully established connection to shared worker\");const d={entityType:\"external connection\",...i};a.start(),c.start();const h=((t,n,i)=>{const r=$o(n),o=new Ko(t),s=new Io(r,o,i);return s.connectSync(),window.Buffer=e.Buffer,new Wr(s)})(t,a,d);return s?.providerId&&(h.me.interop=h.Interop.connectSync(s.providerId),s?.currentContextGroup&&h.me.interop.joinContextGroup(s.currentContextGroup).catch((e=>{console.warn(`Error joining specified context group: ${s?.currentContextGroup}, continuing`,e)}))),{...h,me:{...h.me,identity:{uuid:h.me.uuid,name:h.me.name}}}}catch(e){throw new Error(`An error occured during web-interop connection: ${e.message}`)}},exports.decorators=Nn,exports.encodeOptions=o,exports.layout_constants=ai,exports.lazy=G;\n","\"use strict\";var t=require(\"./main-8cad4070.js\"),e=require(\"uuid\");require(\"buffer/\"),require(\"events\"),require(\"lodash/cloneDeep\"),require(\"lodash/isEqual\");var i={},n={};Object.defineProperty(n,\"__esModule\",{value:!0}),n.mapValuesAsync=n.mapEntriesAsync=void 0;const o=(t,[e,i])=>({...t,[e]:i});async function s(t,e){return(await Promise.all(e.map((async([e,i])=>[e,await t(i,e)])))).reduce(o,{})}n.mapEntriesAsync=s,n.mapValuesAsync=async function(t,e){let i;return i=e instanceof Map?[...e.entries()]:Object.entries(e),s(t,i)};var r,a,l,h,d=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldSet||function(t,e,i,n,o){if(\"m\"===n)throw new TypeError(\"Private method is not writable\");if(\"a\"===n&&!o)throw new TypeError(\"Private accessor was defined without a setter\");if(\"function\"==typeof e?t!==e||!o:!e.has(t))throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");return\"a\"===n?o.call(t,i):o?o.value=i:e.set(t,i),i},c=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldGet||function(t,e,i,n){if(\"a\"===i&&!n)throw new TypeError(\"Private accessor was defined without a getter\");if(\"function\"==typeof e?t!==e||!n:!e.has(t))throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");return\"m\"===i?n:\"a\"===i?n.call(t):n?n.value:e.get(t)};Object.defineProperty(i,\"__esModule\",{value:!0});var m=i.DefaultLayoutManager=void 0;const u=n;class p{constructor(t){a.set(this,void 0),l.set(this,new Map),d(this,a,t,\"f\")}size(){return c(this,l,\"f\").size}async applyLayoutSnapshot({layouts:t}){if(Object.keys(t).length>1)throw new Error(\"[LayoutManager] Tried to call applyLayoutSnapshot with more than 1 layout. When implementing multiple layouts via overridden LayoutManager class, you must override and fully implement the applyLayoutSnapshot method without calling super.applyLayoutSnapshot().\");const[[e,i]]=Object.entries(t);await p.createLayout(this,{layoutName:e,layout:i})}async showLayout({layoutName:t}){}async getLayoutSnapshot(){return{layouts:await(0,u.mapValuesAsync)((t=>t.getFrameSnapshot()),c(this,l,\"f\"))}}async removeLayout({layoutName:t}){}getLayoutIdentityForView(t){const e=[...c(this,l,\"f\").values()].find((e=>e.getCurrentViews().some((e=>e.name===t.name&&e.uuid===t.uuid))));return e?.identity??void 0}isLayoutVisible({layoutName:t}){return c(p,r,\"m\",h).call(p,this,t).isVisible()}resolveLayoutIdentity(t){if(t&&\"layoutName\"in t)return t;const e=[...c(this,l,\"f\").values()];if(1===e.length)return e[0].identity;const i=e.find((t=>t.isVisible()));return i?.identity??void 0}static async resolveLayout(t,e){const i=t.resolveLayoutIdentity(e);if(void 0===i||!(\"layoutName\"in i))throw new Error(\"[layout-manager] resolveLayout: Could not resolve the layout identity. Make sure you include 'layoutName' in the identity object.\");return c(p,r,\"m\",h).call(p,t,i.layoutName)}static async handleSharedView(t,e,i){await(0,u.mapValuesAsync)((async t=>{if(t.identity.layoutName!==e.layoutName){const e=t.getCurrentViews().find((t=>t.name===i.name));e&&await t.onViewDetached({viewIdentity:e,target:null}).catch(console.error)}}),c(t,l,\"f\"))}static async handleLastViewRemoved(t,e){await t.removeLayout(e),await c(t,a,\"f\").handleLastViewRemoved(t)}static async destroyLayout(t,{layoutName:e}){await c(p,r,\"m\",h).call(p,t,e).destroy(),c(t,l,\"f\").delete(e)}static async createLayout(t,e){const{layoutName:i}=e;if(c(t,l,\"f\").has(i))throw new Error(`Layout name ${i} already exists`);await c(t,a,\"f\").createLayout(e,t)}static registerLayout(t,e,i){c(t,l,\"f\").set(e,i)}static getAllLayouts(t){return[...c(t,l,\"f\").values()]}static setInitialSnapshot(t,e){c(t,a,\"f\").setInitialSnapshot(e)}static createClosedConstructor(...t){return class extends p{constructor(){super(...t)}}}}m=i.DefaultLayoutManager=p,r=p,a=new WeakMap,l=new WeakMap,h=function(t,e){const i=c(t,l,\"f\").get(e);if(!i)throw new Error(`[layout-manager] getLayoutByName: Could not locate layout with name '${e}'`);return i};var g={},f={},v={};Object.defineProperty(v,\"__esModule\",{value:!0}),v.ReversibleMap=void 0;v.ReversibleMap=class{constructor(){this.valueToKey=new Map,this.keyToValue=new Map,this.setUnique=(t,e)=>{if(this.hasKey(t)||this.hasValue(e))throw new Error(\"Key or value already in the map.\");this.keyToValue.set(t,e),this.valueToKey.set(e,t)},this.getKey=t=>{const e=this.valueToKey.get(t);if(!e)throw new Error(\"Value not found in the map.\");return e},this.deleteKey=t=>{const e=this.getValue(t);return this.keyToValue.delete(t),this.valueToKey.delete(e),e},this.deleteValue=t=>{const e=this.getKey(t);return this.keyToValue.delete(e),this.valueToKey.delete(t),e},this.hasKey=t=>this.keyToValue.has(t),this.hasValue=t=>this.valueToKey.has(t)}getValue(t){const e=this.keyToValue.get(t);if(!e)throw new Error(\"Key not found in the map.\");return e}},Object.defineProperty(f,\"__esModule\",{value:!0});var _=f.LayoutContentCache=void 0;const y=t.lazy,C=v;class w{constructor(){this.contentItemCache=new C.ReversibleMap,this.contentItemCacheId=0,this.createCacheKey=()=>{const t=`entity-${this.contentItemCacheId.toString()}`;return this.contentItemCacheId+=1,t},this.hasKey=t=>this.contentItemCache.hasKey(t),this.getItemOrUndefined=t=>{try{return this.getContentItemOrThrow(t)}catch(t){return}},this.getContentItemOrThrow=(t,e)=>{if(!this.contentItemCache.hasKey(t))throw new Error(\"Layout component has been destroyed or detached from the current layout.\");const i=this.contentItemCache.getValue(t);if(e&&!e.includes(i.type))throw new Error(`Layout item is not the expected type. Expected ${e.join(\", \")}, got ${i.type}.`);return i},this.getOrCreateEntityId=t=>{if(this.contentItemCache.hasValue(t))return this.contentItemCache.getKey(t);t.onDestroyed((()=>{this.contentItemCache.deleteValue(t)}));const e=this.createCacheKey();return this.contentItemCache.setUnique(e,t),e}}static getSingleInstance(){return w.singleton.getValue()}}_=f.LayoutContentCache=w,w.singleton=new y.Lazy((()=>new w));var I={},b={};!function(t){Object.defineProperty(t,\"__esModule\",{value:!0}),t.getAdjacentStacks=t.doShareEdge=t.getAdjacentItem=void 0;t.getAdjacentItem=(e,i)=>{const{parent:n}=e;if(e.isRoot()||!n)return;const o=[\"top\",\"bottom\"].includes(i)?\"column\":\"row\",s=[\"top\",\"left\"].includes(i)?-1:1;if(n.type===o){const t=n.contentItems.indexOf(e)+s;if(t>=0&&t{const n=t.getBounds(),o=e.getBounds();if(!n||!o)return!1;if([\"top\",\"bottom\"].includes(i)){return!(n.righto.right)}return!(n.bottomo.bottom)};t.getAdjacentStacks=(e,i)=>{const n=[\"top\",\"bottom\"].includes(i)?\"row\":\"column\",o=s=>\"stack\"===s.type?(0,t.doShareEdge)(e,s,i)?[s]:[]:\"root\"===s.type||\"ground\"===s.type?[]:s.type===n?s.contentItems.map((t=>o(t))).flat():s.type!==n?[\"top\",\"right\"].includes(i)?o(s.contentItems[s.contentItems.length-1]):o(s.contentItems[0]):[],s=(0,t.getAdjacentItem)(e,i);return s?o(s):[]}}(b);var S=t.commonjsGlobal&&t.commonjsGlobal.__decorate||function(t,e,i,n){var o,s=arguments.length,r=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if(\"object\"==typeof Reflect&&\"function\"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(s<3?o(r):s>3?o(e,i,r):o(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};Object.defineProperty(I,\"__esModule\",{value:!0}),I.LayoutEntitiesController=void 0;const E=t.decorators,x=b,L=i;class z{constructor(t,e,i){this.wire=t,this.layoutManager=e,this.layoutContentCache=i,this.analytics=t=>{this.wire.sendAction(`layout-controller-${t}`).catch((()=>{}))},this.getLayoutIdentityForViewOrThrow=async t=>{const e=this.layoutManager.getLayoutIdentityForView(t);if(!e)throw new Error(`View identity ${t.name} is not attached to any layouts.`);return e},this.getRoot=async t=>{this.analytics(\"get-root\");const e=(await this.getLayout(t)).getRoot();return{type:e.type,entityId:this.layoutContentCache.getOrCreateEntityId(e)}},this.getStackByView=async t=>{this.analytics(\"get-stack-by-view\");const e=await this.getLayoutIdentityForViewOrThrow(t),i=(await this.getLayout(e)).getStackByView(t);if(\"stack\"===i?.type)return{entityId:this.layoutContentCache.getOrCreateEntityId(i),type:\"stack\"}},this.getStackViews=t=>{this.analytics(\"get-stack-views\");return this.layoutContentCache.getContentItemOrThrow(t,[\"stack\"]).contentItems.map((t=>({name:t.viewName,uuid:this.wire.me.uuid})))},this.isRoot=t=>{this.analytics(\"is-root\");return this.layoutContentCache.getContentItemOrThrow(t).isRoot()},this.exists=t=>(this.analytics(\"exists\"),this.layoutContentCache.hasKey(t)),this.addViewToStack=async(t,e,{index:i}={index:0})=>{this.analytics(\"add-view-to-stack\");const n=this.layoutContentCache.getContentItemOrThrow(t);if(i&&i>n.contentItems.length+1)throw new Error(`Index '${i}' out of range, please exclude the index or specify a number between 0 and ${n.contentItems.length}`);const o={id:t,index:i},{identity:s}=await n.layout.platformCreateView(e,{location:o});return s},this.findViewInStack=(t,e)=>t.contentItems.find((t=>t.viewName===e.name)),this.removeViewFromStack=async(t,e)=>{this.analytics(\"remove-view-from-stack\");const i=this.layoutContentCache.getContentItemOrThrow(t,[\"stack\"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to remove a view ('${e.name}') which does not belong to the stack.`);await n.layout.platformCloseView(e)},this.createAdjacentStack=async(t,e,{position:i=\"right\"}={})=>{if(this.analytics(\"create-adjacent-stack\"),!Array.isArray(e)||0===e.length)throw new Error('The parameter \"views\" must be an array with at least 1 element.');if(![\"top\",\"bottom\",\"left\",\"right\"].includes(i))throw new Error(`Invalid position '${i}' specified.`);const n=this.layoutContentCache.getContentItemOrThrow(t).createAdjacentStack({position:i}),o=this.layoutContentCache.getOrCreateEntityId(n);return await Promise.all(e.reverse().map((t=>this.addViewToStack(o,t)))),o},this.getAdjacentStacks=async({targetId:t,edge:e})=>{this.analytics(\"get-adjacent-stacks\");const i=this.layoutContentCache.getContentItemOrThrow(t);return(0,x.getAdjacentStacks)(i,e).map((t=>({entityId:this.layoutContentCache.getOrCreateEntityId(t)})))},this.setStackActiveView=async(t,e)=>{this.analytics(\"set-stack-active-view\");const i=this.layoutContentCache.getContentItemOrThrow(t,[\"stack\"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to set a view ('${e.name}') as active when it does not belong to the stack.`);i.setActiveContentItem(n,!0)}}async getLayout(t){const e=await L.DefaultLayoutManager.resolveLayout(this.layoutManager,t);if(!e)throw new Error(`Could not resolve target layout identity ${JSON.stringify(t)}`);return e}getContent(t){this.analytics(\"get-content\");return this.layoutContentCache.getContentItemOrThrow(t,[\"column\",\"row\"]).contentItems.map((t=>({type:t.type,entityId:this.layoutContentCache.getOrCreateEntityId(t)})))}getParent(t){this.analytics(\"get-parent\");const e=this.layoutContentCache.getContentItemOrThrow(t);if(!e.isRoot())return e.parent?.contentItems.includes(e)?{type:e.parent.type,entityId:this.layoutContentCache.getOrCreateEntityId(e.parent)}:void 0}}S([(0,E.expose)()],z.prototype,\"getLayoutIdentityForViewOrThrow\",void 0),S([(0,E.expose)()],z.prototype,\"getRoot\",void 0),S([(0,E.expose)()],z.prototype,\"getStackByView\",void 0),S([(0,E.expose)()],z.prototype,\"getStackViews\",void 0),S([(0,E.expose)()],z.prototype,\"getContent\",null),S([(0,E.expose)()],z.prototype,\"getParent\",null),S([(0,E.expose)()],z.prototype,\"isRoot\",void 0),S([(0,E.expose)()],z.prototype,\"exists\",void 0),S([(0,E.expose)()],z.prototype,\"addViewToStack\",void 0),S([(0,E.expose)()],z.prototype,\"removeViewFromStack\",void 0),S([(0,E.expose)()],z.prototype,\"createAdjacentStack\",void 0),S([(0,E.expose)()],z.prototype,\"getAdjacentStacks\",void 0),S([(0,E.expose)()],z.prototype,\"setStackActiveView\",void 0),I.LayoutEntitiesController=z,Object.defineProperty(g,\"__esModule\",{value:!0});var M=g.initLayoutEndpoints=void 0;const P=t.apiExposer,T=t.layout_constants,A=f,k=I,D=i;M=g.initLayoutEndpoints=async function(t,e){const i=t.getFin(),n=await i.Platform.getCurrentSync().getClient(),o=new P.ChannelsExposer(n);await new P.ApiExposer(o).exposeInstance(new k.LayoutEntitiesController(t,e,A.LayoutContentCache.getSingleInstance()),{id:T.LAYOUT_CONTROLLER_ID}),await async function(t,e){const i=t=>async i=>{const n=await D.DefaultLayoutManager.resolveLayout(e,i.target);if(!n)throw new Error(`Could not resolve the layout target from payload ${JSON.stringify(i)}`);return t(n,i)},n=(e,n)=>{t.register(e,i(n))},o=(t,e)=>{n(t,e)};n(\"replace-view\",((t,e)=>t.replaceView(e))),n(\"replace-layout\",((t,{layout:e})=>t.replaceLayout(e))),n(\"add-view\",((t,e)=>t.insertView(e))),o(\"layout-add-view\",((t,{viewOptions:e,location:i,targetView:n})=>t.platformCreateView(e,{location:i,targetView:n}))),n(\"close-view\",((t,e)=>t.cleanupView(e.viewIdentity))),o(\"layout-close-view\",((t,e)=>t.platformCloseView(e.viewIdentity))),n(\"apply-preset-layout\",((t,e)=>t.applyPreset(e))),n(\"get-layout-views\",(t=>t.getCurrentViews())),n(\"get-frame-snapshot\",(t=>t.getFrameSnapshot())),n(\"is-visible\",(t=>t.isVisible())),n(\"destroy\",(t=>t.destroy())),t.register(\"get-layout-snapshot\",(()=>e.getLayoutSnapshot()))}(n,e)};var R={};Object.defineProperty(R,\"__esModule\",{value:!0});var U=R.BaseLayout=void 0;U=R.BaseLayout=class{};var O={};Object.defineProperty(O,\"__esModule\",{value:!0});var V=O.DOMEmitter=void 0;V=O.DOMEmitter=class{constructor(t){this.container=t}dispatchLocalEvent(t,e){const i={...e,type:t,tabSelector:`tab-${e.name}`,containerSelector:`container-${e.name}`,topic:\"openfin-DOM-event\"};this.container.dispatchEvent(new CustomEvent(t,{detail:i}))}};var B={};Object.defineProperty(B,\"__esModule\",{value:!0});var H=B.mapLayoutContentItemsImmutableSync=B.mapLayoutContentItemsImmutable=W=B.isVisible=void 0;var W=B.isVisible=t=>(0!==t.offsetWidth||0!==t.offsetHeight)&&\"hidden\"!==window.getComputedStyle(t).visibility&&t.offsetTop>=0&&t.offsetLeft>=0&&t.offsetTop<=window.innerHeight&&t.offsetLeft<=window.innerWidth;const F=t=>\"type\"in t&&\"component\"===t.type;B.mapLayoutContentItemsImmutable=async function t(e,i){return F(i)?e(i):{...i,content:await Promise.all(i.content?.map((i=>t(e,i))))}},H=B.mapLayoutContentItemsImmutableSync=function t(e,i){return F(i)?e(i):{...i,content:i.content?.map((i=>t(e,i)))}};class N extends Error{constructor(t,e){super(e),this.type=t}}class G extends N{constructor(t,e){super(\"Configuration\",t),this.node=e}}class j extends N{constructor(t){super(\"PopoutBlocked\",t)}}class $ extends N{constructor(t){super(\"API\",t)}}class Z extends N{constructor(t){super(\"Bind\",t)}}class q extends Error{constructor(t,e,i){super(`${t}: ${e}${void 0===i?\"\":\": \"+i}`)}}class X extends q{constructor(t,e){super(\"Assert\",t,e)}}class Y extends q{constructor(t,e,i){super(\"UnreachableCase\",t,`${e}${void 0===i?\"\":\": \"+i}`)}}class K extends q{constructor(t,e){super(\"UnexpectedNull\",t,e)}}class J extends q{constructor(t,e){super(\"UnexpectedUndefined\",t,e)}}var Q;!function(t){let e=!1;const i={PopoutCannotBeCreatedWithGroundItemConfig:{id:0,default:\"Popout cannot be created with ground ItemConfig\"},PleaseRegisterAConstructorFunction:{id:1,default:\"Please register a constructor function\"},ComponentTypeNotRegisteredAndBindComponentEventHandlerNotAssigned:{id:2,default:\"Component type not registered and BindComponentEvent handler not assigned\"},ComponentIsAlreadyRegistered:{id:3,default:\"Component is already registered\"},ComponentIsNotVirtuable:{id:4,default:\"Component is not virtuable. Requires rootHtmlElement field/getter\"},VirtualComponentDoesNotHaveRootHtmlElement:{id:5,default:'Virtual component does not have getter \"rootHtmlElement\"'},ItemConfigIsNotTypeComponent:{id:6,default:\"ItemConfig is not of type component\"},InvalidNumberPartInSizeString:{id:7,default:\"Invalid number part in size string\"},UnknownUnitInSizeString:{id:8,default:\"Unknown unit in size string\"},UnsupportedUnitInSizeString:{id:9,default:\"Unsupported unit in size string\"}};t.idCount=Object.keys(i).length;const n=Object.values(i);t.checkInitialise=function(){if(!e)for(let e=0;e=\"0\"&&t<=\"9\"}function Tt(t,e){const i=zt(e);t.style.width=i}function At(t,e){const i=zt(e);t.style.height=i}function kt(t){return{width:t.offsetWidth,height:t.offsetHeight}}function Dt(t,e){t.style.display=e?\"\":\"none\"}function Rt(t,e){if(void 0!==e)for(const i in e)if(e.hasOwnProperty(i)){const n=e[i],o=t[i];t[i]=Ut(o,n)}return t}function Ut(t,e){if(\"object\"!=typeof e)return e;if(Array.isArray(e)){const t=e.length,i=new Array(t);for(let n=0;n36)throw new Error(\"Too many keys in config minifier map\")},t.translateObject=n}(dt||(dt={})),function(t){t.defaults={type:at.ground,content:[],size:1,sizeUnit:ht.Fractional,minSize:void 0,minSizeUnit:ht.Pixel,id:\"\",isClosable:!0},t.createCopy=function(t,e){switch(t.type){case at.ground:case at.row:case at.column:return gt.createCopy(t,e);case at.stack:return ut.createCopy(t,e);case at.component:return pt.createCopy(t);default:throw new Y(\"CICC91354\",t.type,\"Invalid Config Item type specified\")}},t.createDefault=function(t){switch(t){case at.ground:throw new X(\"CICCDR91562\");case at.row:case at.column:return gt.createDefault(t);case at.stack:return ut.createDefault();case at.component:return pt.createDefault();default:throw new Y(\"CICCDD91563\",t,\"Invalid Config Item type specified\")}},t.isComponentItem=function(t){return t.type===at.component},t.isStackItem=function(t){return t.type===at.stack},t.isGroundItem=function(t){return t.type===at.ground}}(ct||(ct={})),function(t){t.defaultMaximised=!1,function(t){t.createCopy=function(t,e){return void 0===t?void 0:{show:null!=e?e:t.show,popout:t.popout,close:t.close,maximise:t.maximise,minimise:t.minimise,tabDropdown:t.tabDropdown}}}(t.Header||(t.Header={}))}(mt||(mt={})),function(t){function e(t){const e=t.length,i=new Array(e);for(let n=0;n\"__glMaximised\"===t));t>0&&(o=!0,n=n.splice(t,1)),e=n.length>0?n[0]:ct.defaults.id}else e=n;return i=void 0!==t.maximised?t.maximised:o,{id:e,maximised:i}}}(wt||(wt={})),function(t){function e(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0;return{resolved:!0,root:Et.resolve(i),openPopouts:t.resolveOpenPopouts(e.openPopouts),dimensions:t.Dimensions.resolve(e.dimensions),settings:t.Settings.resolve(e.settings),header:t.Header.resolve(e.header,e.settings,e.labels)}}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:Lt.fromResolvedArray(e.openPopouts),settings:_t.Settings.createCopy(e.settings),dimensions:t.Dimensions.fromResolved(e.dimensions),header:_t.Header.createCopy(e.header)}},t.isResolved=function(t){const e=t;return void 0!==e.resolved&&!0===e.resolved},t.resolveOpenPopouts=function(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0,{root:Et.resolve(o),openPopouts:xt.resolveOpenPopouts(e.openPopouts),dimensions:xt.Dimensions.resolve(e.dimensions),settings:xt.Settings.resolve(e.settings),header:xt.Header.resolve(e.header,e.settings,e.labels),parentId:null!==(i=e.parentId)&&void 0!==i?i:null,indexInParent:null!==(n=e.indexInParent)&&void 0!==n?n:null,window:t.Window.resolve(e.window,e.dimensions),resolved:!0}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:i(e.openPopouts),dimensions:xt.Dimensions.fromResolved(e.dimensions),settings:_t.Settings.createCopy(e.settings),header:_t.Header.createCopy(e.header),parentId:e.parentId,indexInParent:e.indexInParent,window:t.Window.fromResolved(e.window)}},t.fromResolvedArray=i}(Lt||(Lt={}));class Wt{constructor(){this._allEventSubscriptions=[],this._subscriptionsMap=new Map,this.unbind=this.removeEventListener,this.trigger=this.emit}tryBubbleEvent(t,e){}emit(t,...e){let i=this._subscriptionsMap.get(t);if(void 0!==i){i=i.slice();for(let t=0;t0){const n=e.slice();n.unshift(t);const o=this._allEventSubscriptions.slice();for(let t=0;t0?n.contentItems[0]:n,e=0);const o=this._layoutManager.createAndInitContentItem(i,t);t.addChild(o,e),this._layoutManager.layoutConfig.settings.popInOnClose?this._onClose():this.close()}createWindow(){const t=this.createUrl(),e=Math.floor(1e6*Math.random()).toString(36),i=this.serializeWindowFeatures({width:this._initialWindowSize.width,height:this._initialWindowSize.height,innerWidth:this._initialWindowSize.width,innerHeight:this._initialWindowSize.height,menubar:\"no\",toolbar:\"no\",location:\"no\",personalbar:\"no\",resizable:\"yes\",scrollbars:\"no\",status:\"no\"});if(this._popoutWindow=globalThis.open(t,e,i),this._popoutWindow)this._popoutWindow.addEventListener(\"load\",(()=>this.positionWindow()),{passive:!0}),this._popoutWindow.addEventListener(\"beforeunload\",(()=>{this._layoutManager.layoutConfig.settings.popInOnClose?this.popIn():this._onClose()}),{passive:!0}),this._checkReadyInterval=setInterval((()=>this.checkReady()),10);else if(!0===this._layoutManager.layoutConfig.settings.blockedPopoutsThrowError){throw new j(\"Popout blocked\")}}checkReady(){if(null===this._popoutWindow)throw new K(\"BPCR01844\");this._popoutWindow.__glInstance&&this._popoutWindow.__glInstance.isInitialised&&(this.onInitialised(),void 0!==this._checkReadyInterval&&(clearInterval(this._checkReadyInterval),this._checkReadyInterval=void 0))}serializeWindowFeatures(t){const e=[];for(const i in t)e.push(i+\"=\"+t[i].toString());return e.join(\",\")}createUrl(){const t=\"gl-window-config-\"+Ot(),e=_t.minifyConfig(this._config);try{localStorage.setItem(t,JSON.stringify(e))}catch(t){throw new Error(\"Error while writing to localStorage \"+function(t){return t instanceof Error?t.message:\"string\"==typeof t?t:\"Unknown Error\"}(t))}const i=new URL(location.href);return i.searchParams.set(\"gl-window\",t),i.toString()}positionWindow(){if(null===this._popoutWindow)throw new Error(\"BrowserPopout.positionWindow: null popoutWindow\");this._popoutWindow.moveTo(this._initialWindowSize.left,this._initialWindowSize.top),this._popoutWindow.focus()}onInitialised(){this._isInitialised=!0,this.getGlInstance().on(\"popIn\",(()=>this.popIn())),this.emit(\"initialised\")}_onClose(){setTimeout((()=>this.emit(\"closed\")),50)}}class Gt extends Wt{constructor(t,e,i,n){super(),this.layoutManager=t,this._parent=i,this._element=n,this._popInParentIds=[],this._type=e.type,this._id=e.id,this._isInitialised=!1,this.isGround=!1,this.isRow=!1,this.isColumn=!1,this.isStack=!1,this.isComponent=!1,this.size=e.size,this.sizeUnit=e.sizeUnit,this.minSize=e.minSize,this.minSizeUnit=e.minSizeUnit,this._isClosable=e.isClosable,this._pendingEventPropagations={},this._throttledEvents=[\"stateChanged\"],this._contentItems=this.createContentItems(e.content)}get type(){return this._type}get id(){return this._id}set id(t){this._id=t}get popInParentIds(){return this._popInParentIds}get parent(){return this._parent}get contentItems(){return this._contentItems}get isClosable(){return this._isClosable}get element(){return this._element}get isInitialised(){return this._isInitialised}static isStack(t){return t.isStack}static isComponentItem(t){return t.isComponent}static isComponentParentableItem(t){return t.isStack||t.isGround}removeChild(t,e=!1){const i=this._contentItems.indexOf(t);if(-1===i)throw new Error(\"Can't remove child item. Unknown content item\");if(e||this._contentItems[i].destroy(),this._contentItems.splice(i,1),this._contentItems.length>0)this.updateSize(!1);else if(!this.isGround&&!0===this._isClosable){if(null===this._parent)throw new K(\"CIUC00874\");this._parent.removeChild(this)}}addChild(t,e,i){return null!=e||(e=this._contentItems.length),this._contentItems.splice(e,0,t),t.setParent(this),!0===this._isInitialised&&!1===t._isInitialised&&t.init(),e}replaceChild(t,e,i=!1){const n=this._contentItems.indexOf(t),o=t._element.parentNode;if(-1===n)throw new X(\"CIRCI23232\",\"Can't replace child. oldChild is not child of this\");if(null===o)throw new K(\"CIRCP23232\");if(o.replaceChild(e._element,t._element),!0===i&&(t._parent=null,t.destroy()),this._contentItems[n]=e,e.setParent(this),e.size=t.size,e.sizeUnit=t.sizeUnit,e.minSize=t.minSize,e.minSizeUnit=t.minSizeUnit,null===e._parent)throw new K(\"CIRCNC45699\");!0===e._parent._isInitialised&&!1===e._isInitialised&&e.init(),this.updateSize(!1)}remove(){if(null===this._parent)throw new K(\"CIR11110\");this._parent.removeChild(this)}popout(){const t=Ot(),e=this.layoutManager.createPopoutFromContentItem(this,void 0,t,void 0);return this.emitBaseBubblingEvent(\"stateChanged\"),e}calculateConfigContent(){const t=this._contentItems,e=t.length,i=new Array(e);for(let n=0;nthis.propagateEventToLayoutManager(t,e))))}propagateEventToLayoutManager(t,e){this._pendingEventPropagations[t]=!1,this.layoutManager.emitUnknown(t,e)}}class jt extends Gt{constructor(t,e,i){super(t,e,i,document.createElement(\"div\")),this._parentItem=i,this._focused=!1,this.isComponent=!0,this._reorderEnabled=e.reorderEnabled,this.applyUpdatableConfig(e),this._initialWantMaximise=e.maximised;const n=document.createElement(\"div\");n.classList.add(\"lm_content\"),this.element.appendChild(n),this._container=new Ft(e,this,t,n,(t=>this.handleUpdateItemConfigEvent(t)),(()=>this.show()),(()=>this.hide()),(t=>this.focus(t)),(t=>this.blur(t)))}get componentName(){return this._container.componentType}get componentType(){return this._container.componentType}get reorderEnabled(){return this._reorderEnabled}get initialWantMaximise(){return this._initialWantMaximise}get component(){return this._container.component}get container(){return this._container}get parentItem(){return this._parentItem}get headerConfig(){return this._headerConfig}get title(){return this._title}get tab(){return this._tab}get focused(){return this._focused}destroy(){this._container.destroy(),super.destroy()}applyUpdatableConfig(t){this.setTitle(t.title),this._headerConfig=t.header}toConfig(){const t=this._container.stateRequestEvent,e=void 0===t?this._container.state:t();return{type:at.component,content:[],size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,maximised:!1,isClosable:this.isClosable,reorderEnabled:this._reorderEnabled,title:this._title,header:mt.Header.createCopy(this._headerConfig),componentType:pt.copyComponentType(this.componentType),componentState:e}}close(){if(null===this.parent)throw new K(\"CIC68883\");this.parent.removeChild(this,!1)}enterDragMode(t,e){Tt(this.element,t),At(this.element,e),this._container.enterDragMode(t,e)}exitDragMode(){this._container.exitDragMode()}enterStackMaximised(){this._container.enterStackMaximised()}exitStackMaximised(){this._container.exitStackMaximised()}drag(){this._container.drag()}updateSize(t){this.updateNodeSize(t)}init(){this.updateNodeSize(!1),super.init(),this._container.emit(\"open\"),this.initContentItems()}setTitle(t){this._title=t,this.emit(\"titleChanged\",t),this.emit(\"stateChanged\")}setTab(t){this._tab=t,this.emit(\"tab\",t),this._container.setTab(t)}hide(){super.hide(),this._container.setVisibility(!1)}show(){super.show(),this._container.setVisibility(!0)}focus(t=!1){this.parentItem.setActiveComponentItem(this,!0,t)}setFocused(t){this._focused=!0,this.tab.setFocused(),t||this.emitBaseBubblingEvent(\"focus\")}blur(t=!1){this._focused&&this.layoutManager.setFocusedComponentItem(void 0,t)}setBlurred(t){this._focused=!1,this.tab.setBlurred(),t||this.emitBaseBubblingEvent(\"blur\")}setParent(t){this._parentItem=t,super.setParent(t)}handleUpdateItemConfigEvent(t){this.applyUpdatableConfig(t)}updateNodeSize(t){if(\"none\"!==this.element.style.display){const{width:e,height:i}=kt(this.element);this._container.setSizeToNodeSize(e,i,t)}}}class $t extends Gt{constructor(){super(...arguments),this._focused=!1}get focused(){return this._focused}setFocusedValue(t){this._focused=t}}class Zt extends Wt{constructor(t,e){super(),this._eElement=t,this._pointerTracking=!1,this._pointerDownEventListener=t=>this.onPointerDown(t),this._pointerMoveEventListener=t=>this.onPointerMove(t),this._pointerUpEventListener=t=>this.onPointerUp(t),this._timeout=void 0,this._allowableTargets=[t,...e],this._oDocument=document,this._eBody=document.body,this._nDelay=1800,this._nDistance=10,this._nX=0,this._nY=0,this._nOriginalX=0,this._nOriginalY=0,this._dragging=!1,this._eElement.addEventListener(\"pointerdown\",this._pointerDownEventListener,{passive:!0})}destroy(){this.checkRemovePointerTrackingEventListeners(),this._eElement.removeEventListener(\"pointerdown\",this._pointerDownEventListener)}cancelDrag(){this.processDragStop(void 0)}onPointerDown(t){if(this._allowableTargets.includes(t.target)&&t.isPrimary){const e=this.getPointerCoordinates(t);this.processPointerDown(e)}}processPointerDown(t){this._nOriginalX=t.x,this._nOriginalY=t.y,this._oDocument.addEventListener(\"pointermove\",this._pointerMoveEventListener),this._oDocument.addEventListener(\"pointerup\",this._pointerUpEventListener,{passive:!0}),this._pointerTracking=!0,this._timeout=setTimeout((()=>{try{this.startDrag()}catch(t){throw console.error(t),t}}),this._nDelay)}onPointerMove(t){this._pointerTracking&&(this.processDragMove(t),t.preventDefault())}processDragMove(t){this._nX=t.pageX-this._nOriginalX,this._nY=t.pageY-this._nOriginalY,!1===this._dragging&&(Math.abs(this._nX)>this._nDistance||Math.abs(this._nY)>this._nDistance)&&this.startDrag(),this._dragging&&this.emit(\"drag\",this._nX,this._nY,t)}onPointerUp(t){this.processDragStop(t)}processDragStop(t){var e;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this.checkRemovePointerTrackingEventListeners(),!0===this._dragging&&(this._eBody.classList.remove(\"lm_dragging\"),this._eElement.classList.remove(\"lm_dragging\"),null===(e=this._oDocument.querySelector(\"iframe\"))||void 0===e||e.style.setProperty(\"pointer-events\",\"\"),this._dragging=!1,this.emit(\"dragStop\",t))}checkRemovePointerTrackingEventListeners(){this._pointerTracking&&(this._oDocument.removeEventListener(\"pointermove\",this._pointerMoveEventListener),this._oDocument.removeEventListener(\"pointerup\",this._pointerUpEventListener),this._pointerTracking=!1)}startDrag(){var t;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this._dragging=!0,this._eBody.classList.add(\"lm_dragging\"),this._eElement.classList.add(\"lm_dragging\"),null===(t=this._oDocument.querySelector(\"iframe\"))||void 0===t||t.style.setProperty(\"pointer-events\",\"none\"),this.emit(\"dragStart\",this._nOriginalX,this._nOriginalY)}getPointerCoordinates(t){return{x:t.pageX,y:t.pageY}}}class qt{constructor(t,e,i){this._isVertical=t,this._size=e,this._grabSize=i0){const i=this.createSplitter(Math.max(0,e-1)).element;e>0?(this.contentItems[e-1].element.insertAdjacentElement(\"afterend\",i),i.insertAdjacentElement(\"afterend\",t.element)):(this.contentItems[0].element.insertAdjacentElement(\"beforebegin\",i),i.insertAdjacentElement(\"beforebegin\",t.element))}else this._childElementContainer.appendChild(t.element);super.addChild(t,e);const n=1/this.contentItems.length*100;if(!0===i)return this.emitBaseBubblingEvent(\"stateChanged\"),e;for(let e=0;e0&&(this.calculateRelativeSizes(),this.setAbsoluteSizes()),this.emitBaseBubblingEvent(\"stateChanged\"),this.emit(\"resize\")}setAbsoluteSizes(){const t=this.calculateAbsoluteSizes();for(let e=0;e0&&t.itemSizes[e]++,this._isColumn?(Tt(this.contentItems[e].element,t.crossAxisSize),At(this.contentItems[e].element,t.itemSizes[e])):(Tt(this.contentItems[e].element,t.itemSizes[e]),At(this.contentItems[e].element,t.crossAxisSize))}calculateAbsoluteSizes(){const t=(this.contentItems.length-1)*this._splitterSize,{width:e,height:i}=kt(this.element);let n,o;this._isColumn?(n=i-t,o=e):(n=e-t,o=i);let s=0;const r=[];for(let t=0;t0){const n=100-t;for(let t=0;t100&&e.length>0){for(let t=0;te)return;{const r=i/e;let a=i;for(let e=0;ethis.onSplitterDrag(e,t,i))),e.on(\"dragStop\",(()=>this.onSplitterDragStop(e))),e.on(\"dragStart\",(()=>this.onSplitterDragStart(e))),this._splitter.splice(t,0,e),e}getSplitItems(t){const e=this._splitter.indexOf(t);return{before:this.contentItems[e],after:this.contentItems[e+1]}}calculateContentItemMinSize(t){const e=t.minSize;if(void 0!==e){if(t.minSizeUnit===ht.Pixel)return e;throw new X(\"ROCGMD98831\",JSON.stringify(t))}{const t=this.layoutManager.layoutConfig.dimensions;return this._isColumn?t.defaultMinItemHeight:t.defaultMinItemWidth}}calculateContentItemsTotalMinSize(t){let e=0;for(const i of t)e+=this.calculateContentItemMinSize(i);return e}onSplitterDragStart(t){const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=this.calculateContentItemsTotalMinSize(e.before.contentItems),s=this.calculateContentItemsTotalMinSize(e.after.contentItems);this._splitterPosition=0,this._splitterMinPosition=-1*(i-o),this._splitterMaxPosition=n-s}onSplitterDrag(t,e,i){let n=this._isColumn?i:e;if(null===this._splitterMinPosition||null===this._splitterMaxPosition)throw new K(\"ROCOSD59226\");n=Math.max(n,this._splitterMinPosition),n=Math.min(n,this._splitterMaxPosition),this._splitterPosition=n;const o=zt(n);this._isColumn?t.element.style.top=o:t.element.style.left=o}onSplitterDragStop(t){if(null===this._splitterPosition)throw new K(\"ROCOSDS66932\");{const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=(this._splitterPosition+i)/(i+n),s=e.before.size+e.after.size;e.before.size=o*s,e.after.size=(1-o)*s,t.element.style.top=zt(0),t.element.style.left=zt(0),globalThis.requestAnimationFrame((()=>this.updateSize(!1)))}}}!function(t){t.getElementDimensionSize=function(t,e){return\"width\"===e?function(t){return t.offsetWidth}(t):function(t){return t.offsetHeight}(t)},t.setElementDimensionSize=function(t,e,i){return\"width\"===e?Tt(t,i):At(t,i)},t.createElement=function(t,e){const i=t.createElement(\"div\");return i.classList.add(\"lm_item\"),e?i.classList.add(\"lm_column\"):i.classList.add(\"lm_row\"),i}}(Xt||(Xt={}));class Yt extends $t{constructor(t,e,i){super(t,vt.create(e),null,Yt.createElement(document)),this.isGround=!0,this._childElementContainer=this.element,this._containerElement=i;let n=null;for(;;){const t=n?n.previousSibling:this._containerElement.lastChild;if(!(t instanceof Element&&t.classList.contains(\"lm_content\")))break;n=t}this._containerElement.insertBefore(this.element,n)}init(){if(!0!==this.isInitialised){this.updateNodeSize();for(let t=0;t0?this.contentItems[0]:this,n.isComponent)throw new Error(\"Cannot add item as child to ComponentItem\");{const t=this.layoutManager.createAndInitContentItem(i,n);return e=n.addChild(t,e),n===this?-1:e}}loadComponentAsRoot(t){this.clearRoot();const e=Ct.resolve(t,!1);if(e.maximised)throw new Error(\"Root Component cannot be maximised\");{const t=new jt(this.layoutManager,e,this);t.init(),this.addChild(t,0)}}addChild(t,e){if(this.contentItems.length>0)throw new Error(\"Ground node can only have a single child\");return this._childElementContainer.appendChild(t.element),e=super.addChild(t,e),this.updateSize(!1),this.emitBaseBubblingEvent(\"stateChanged\"),e}calculateConfigContent(){const t=this.contentItems,e=t.length,i=new Array(e);for(let n=0;n0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e)),this.updateContentItemsSize(!1))}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}createSideAreas(){const t=Yt.Area.oppositeSides,e=new Array(Object.keys(t).length);let i=0;for(const n in t){const o=n,s=this.getElementArea();if(null===s)throw new K(\"RCSA77553\");s.side=o,\"2\"===t[o][1]?s[o]=s[t[o]]-50:s[o]=s[t[o]]+50,s.surface=(s.x2-s.x1)*(s.y2-s.y1),e[i++]=s}return e}highlightDropZone(t,e,i){this.layoutManager.tabDropPlaceholder.remove(),super.highlightDropZone(t,e,i)}onDrop(t,e){if(t.isComponent){const e=ut.createDefault(),i=t;e.header=mt.Header.createCopy(i.headerConfig);const n=this.layoutManager.createAndInitContentItem(e,this);n.addChild(t),t=n}if(0===this.contentItems.length)this.addChild(t);else{if(t.type===at.row||t.type===at.column){const e=ut.createDefault(),i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}const i=\"x\"==e.side[0]?at.row:at.column,n=\"2\"==e.side[1],o=this.contentItems[0];if(o instanceof Xt&&o.type===i){const e=o.contentItems[n?0:o.contentItems.length-1];o.addChild(t,n?0:void 0,!0),e.size*=.5,t.size=e.size,t.sizeUnit=ht.Percent,o.updateSize(!1)}else{const e=ct.createDefault(i),s=this.layoutManager.createContentItem(e,this);this.replaceChild(o,s),s.addChild(t,n?0:void 0,!0),s.addChild(o,n?void 0:0,!0),o.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}}dock(){throw new X(\"GID87731\")}validateDocking(){throw new X(\"GIVD87732\")}getAllContentItems(){const t=[this];return this.deepGetAllContentItems(this.contentItems,t),t}getConfigMaximisedItems(){const t=[];return this.deepFilterContentItems(this.contentItems,t,(t=>!(!Gt.isStack(t)||!t.initialWantMaximise)||!(!Gt.isComponentItem(t)||!t.initialWantMaximise))),t}getItemsByPopInParentId(t){const e=[];return this.deepFilterContentItems(this.contentItems,e,(e=>e.popInParentIds.includes(t))),e}toConfig(){throw new Error(\"Cannot generate GroundItem config\")}setActiveComponentItem(t,e,i){}updateNodeSize(){const{width:t,height:e}=kt(this._containerElement);Tt(this.element,t),At(this.element,e),this.contentItems.length>0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e))}deepGetAllContentItems(t,e){for(let i=0;ithis.onClick(t),this._touchStartEventListener=t=>this.onTouchStart(t),this._element=document.createElement(\"div\"),this._element.classList.add(i),this._element.title=e,this._header.on(\"destroy\",(()=>this.destroy())),this._element.addEventListener(\"click\",this._clickEventListener,{passive:!0}),this._element.addEventListener(\"touchstart\",this._touchStartEventListener,{passive:!0}),this._header.controlsContainerElement.appendChild(this._element)}get element(){return this._element}destroy(){var t;this._element.removeEventListener(\"click\",this._clickEventListener),this._element.removeEventListener(\"touchstart\",this._touchStartEventListener),null===(t=this._element.parentNode)||void 0===t||t.removeChild(this._element)}onClick(t){this._pushEvent(t)}onTouchStart(t){this._pushEvent(t)}}class Jt{constructor(t,e,i,n,o){var s;this._layoutManager=t,this._componentItem=e,this._closeEvent=i,this._focusEvent=n,this._dragStartEvent=o,this._isActive=!1,this._tabClickListener=t=>this.onTabClickDown(t),this._tabTouchStartListener=t=>this.onTabTouchStart(t),this._closeClickListener=()=>this.onCloseClick(),this._closeTouchStartListener=()=>this.onCloseTouchStart(),this._dragStartListener=(t,e)=>this.onDragStart(t,e),this._contentItemDestroyListener=()=>this.onContentItemDestroy(),this._tabTitleChangedListener=t=>this.setTitle(t),this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_tab\"),this._titleElement=document.createElement(\"span\"),this._titleElement.classList.add(\"lm_title\"),this._closeElement=document.createElement(\"div\"),this._closeElement.classList.add(\"lm_close_tab\"),this._element.appendChild(this._titleElement),this._element.appendChild(this._closeElement),e.isClosable?this._closeElement.style.display=\"\":this._closeElement.style.display=\"none\",this.setTitle(e.title),this._componentItem.on(\"titleChanged\",this._tabTitleChangedListener);(null!==(s=e.reorderEnabled)&&void 0!==s?s:this._layoutManager.layoutConfig.settings.reorderEnabled)&&this.enableReorder(),this._element.addEventListener(\"click\",this._tabClickListener,{passive:!0}),this._element.addEventListener(\"touchstart\",this._tabTouchStartListener,{passive:!0}),this._componentItem.isClosable?(this._closeElement.addEventListener(\"click\",this._closeClickListener,{passive:!0}),this._closeElement.addEventListener(\"touchstart\",this._closeTouchStartListener,{passive:!0})):(this._closeElement.remove(),this._closeElement=void 0),this._componentItem.setTab(this),this._layoutManager.emit(\"tabCreated\",this)}get isActive(){return this._isActive}get componentItem(){return this._componentItem}get contentItem(){return this._componentItem}get element(){return this._element}get titleElement(){return this._titleElement}get closeElement(){return this._closeElement}get reorderEnabled(){return void 0!==this._dragListener}set reorderEnabled(t){t!==this.reorderEnabled&&(t?this.enableReorder():this.disableReorder())}setTitle(t){this._titleElement.innerText=t,this._element.title=t}setActive(t){t!==this._isActive&&(this._isActive=t,t?this._element.classList.add(\"lm_active\"):this._element.classList.remove(\"lm_active\"))}destroy(){var t,e;this._closeEvent=void 0,this._focusEvent=void 0,this._dragStartEvent=void 0,this._element.removeEventListener(\"click\",this._tabClickListener),this._element.removeEventListener(\"touchstart\",this._tabTouchStartListener),null===(t=this._closeElement)||void 0===t||t.removeEventListener(\"click\",this._closeClickListener),null===(e=this._closeElement)||void 0===e||e.removeEventListener(\"touchstart\",this._closeTouchStartListener),this._componentItem.off(\"titleChanged\",this._tabTitleChangedListener),this.reorderEnabled&&this.disableReorder(),this._element.remove()}setBlurred(){this._element.classList.remove(\"lm_focused\"),this._titleElement.classList.remove(\"lm_focused\")}setFocused(){this._element.classList.add(\"lm_focused\"),this._titleElement.classList.add(\"lm_focused\")}onDragStart(t,e){if(void 0===this._dragListener)throw new J(\"TODSDLU10093\");if(void 0===this._dragStartEvent)throw new J(\"TODS23309\");this._dragStartEvent(t,e,this._dragListener,this.componentItem)}onContentItemDestroy(){void 0!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=void 0)}onTabClickDown(t){const e=t.target;e!==this._element&&e!==this._titleElement||(0===t.button?this.notifyFocus():1===t.button&&this._componentItem.isClosable&&this.notifyClose())}onTabTouchStart(t){t.target===this._element&&this.notifyFocus()}onCloseClick(){this.notifyClose()}onCloseTouchStart(){this.notifyClose()}notifyClose(){if(void 0===this._closeEvent)throw new J(\"TNC15007\");this._closeEvent(this._componentItem)}notifyFocus(){if(void 0===this._focusEvent)throw new J(\"TNA15007\");this._focusEvent(this._componentItem)}enableReorder(){this._dragListener=new Zt(this._element,[this._titleElement]),this._dragListener.on(\"dragStart\",this._dragStartListener),this._componentItem.on(\"destroy\",this._contentItemDestroyListener)}disableReorder(){if(void 0===this._dragListener)throw new J(\"TDR87745\");this._componentItem.off(\"destroy\",this._contentItemDestroyListener),this._dragListener.off(\"dragStart\",this._dragStartListener),this._dragListener=void 0}}class Qt{constructor(t,e,i,n,o){this._layoutManager=t,this._componentRemoveEvent=e,this._componentFocusEvent=i,this._componentDragStartEvent=n,this._dropdownActiveChangedEvent=o,this._tabs=[],this._lastVisibleTabIndex=-1,this._dropdownActive=!1,this._element=document.createElement(\"section\"),this._element.classList.add(\"lm_tabs\"),this._dropdownElement=document.createElement(\"section\"),this._dropdownElement.classList.add(\"lm_tabdropdown_list\"),this._dropdownElement.style.display=\"none\"}get tabs(){return this._tabs}get tabCount(){return this._tabs.length}get lastVisibleTabIndex(){return this._lastVisibleTabIndex}get element(){return this._element}get dropdownElement(){return this._dropdownElement}get dropdownActive(){return this._dropdownActive}destroy(){for(let t=0;tthis.handleTabCloseEvent(t)),(t=>this.handleTabFocusEvent(t)),((t,e,i,n)=>this.handleTabDragStartEvent(t,e,i,n)));void 0===e&&(e=this._tabs.length),this._tabs.splice(e,0,i),ethis._lastVisibleTabIndex){const t=this._tabs[e];for(let t=e;t>0;t--)this._tabs[t]=this._tabs[t-1];this._tabs[0]=t}}updateTabSizes(t,e){let i=!1;this.tryUpdateTabSizes(i,t,e)||(i=!0,this.tryUpdateTabSizes(i,t,e)),i!==this._dropdownActive&&(this._dropdownActive=i,this._dropdownActiveChangedEvent())}tryUpdateTabSizes(t,e,i){if(this._tabs.length>0){if(void 0===i)throw new Error(\"non-empty tabs must have active component item\");let n=0,o=!1;const s=this._layoutManager.layoutConfig.settings.tabOverlapAllowance,r=this._tabs.indexOf(i.tab),a=this._tabs[r];this._lastVisibleTabIndex=-1;for(let i=0;ie){if(o)i===r&&(l.style.zIndex=\"auto\",l.style.marginLeft=\"\",l.parentElement!==this._element&&this._element.appendChild(l));else{let t;if(t=r>0&&r<=i?(d-e)/(i-1):(d-e)/i,tthis.onClick(t),this._touchStartListener=t=>this.onTouchStart(t),this._rowColumnClosable=!0,this._closeButton=null,this._popoutButton=null,this._tabsContainer=new Qt(this._layoutManager,(t=>this.handleTabInitiatedComponentRemoveEvent(t)),(t=>this.handleTabInitiatedComponentFocusEvent(t)),((t,e,i,n)=>this.handleTabInitiatedDragStartEvent(t,e,i,n)),(()=>this.processTabDropdownActiveChanged())),this._show=i.show,this._popoutEnabled=i.popoutEnabled,this._popoutLabel=i.popoutLabel,this._maximiseEnabled=i.maximiseEnabled,this._maximiseLabel=i.maximiseLabel,this._minimiseEnabled=i.minimiseEnabled,this._minimiseLabel=i.minimiseLabel,this._closeEnabled=i.closeEnabled,this._closeLabel=i.closeLabel,this._tabDropdownEnabled=i.tabDropdownEnabled,this._tabDropdownLabel=i.tabDropdownLabel,this.setSide(i.side),this._canRemoveComponent=this._configClosable,this._element=document.createElement(\"section\"),this._element.classList.add(\"lm_header\"),this._controlsContainerElement=document.createElement(\"section\"),this._controlsContainerElement.classList.add(\"lm_controls\"),this._element.appendChild(this._tabsContainer.element),this._element.appendChild(this._controlsContainerElement),this._element.appendChild(this._tabsContainer.dropdownElement),this._element.addEventListener(\"click\",this._clickListener,{passive:!0}),this._element.addEventListener(\"touchstart\",this._touchStartListener,{passive:!0}),this._documentMouseUpListener=()=>this._tabsContainer.hideAdditionalTabsDropdown(),globalThis.document.addEventListener(\"mouseup\",this._documentMouseUpListener,{passive:!0}),this._tabControlOffset=this._layoutManager.layoutConfig.settings.tabControlOffset,this._tabDropdownEnabled&&(this._tabDropdownButton=new Kt(this,this._tabDropdownLabel,\"lm_tabdropdown\",(()=>this._tabsContainer.showAdditionalTabsDropdown()))),this._popoutEnabled&&(this._popoutButton=new Kt(this,this._popoutLabel,\"lm_popout\",(()=>this.handleButtonPopoutEvent()))),this._maximiseEnabled&&(this._maximiseButton=new Kt(this,this._maximiseLabel,\"lm_maximise\",(t=>this.handleButtonMaximiseToggleEvent(t)))),this._configClosable&&(this._closeButton=new Kt(this,this._closeLabel,\"lm_close\",(()=>s()))),this.processTabDropdownActiveChanged()}get show(){return this._show}get side(){return this._side}get leftRightSided(){return this._leftRightSided}get layoutManager(){return this._layoutManager}get parent(){return this._parent}get tabs(){return this._tabsContainer.tabs}get lastVisibleTabIndex(){return this._tabsContainer.lastVisibleTabIndex}get element(){return this._element}get tabsContainerElement(){return this._tabsContainer.element}get controlsContainerElement(){return this._controlsContainerElement}destroy(){this.emit(\"destroy\"),this._popoutEvent=void 0,this._maximiseToggleEvent=void 0,this._clickEvent=void 0,this._touchStartEvent=void 0,this._componentRemoveEvent=void 0,this._componentFocusEvent=void 0,this._componentDragStartEvent=void 0,this._tabsContainer.destroy(),globalThis.document.removeEventListener(\"mouseup\",this._documentMouseUpListener),this._element.remove()}createTab(t,e){this._tabsContainer.createTab(t,e)}removeTab(t){this._tabsContainer.removeTab(t)}processActiveComponentChanged(t){this._tabsContainer.processActiveComponentChanged(t),this.updateTabSizes()}setSide(t){this._side=t,this._leftRightSided=[nt.right,nt.left].includes(this._side)}setRowColumnClosable(t){this._rowColumnClosable=t,this.updateClosability()}updateClosability(){let t;if(this._configClosable)if(this._rowColumnClosable){t=!0;const e=this.tabs.length;for(let i=0;i1}applyFocusedValue(t){t?this._element.classList.add(\"lm_focused\"):this._element.classList.remove(\"lm_focused\")}processMaximised(){if(void 0===this._maximiseButton)throw new J(\"HPMAX16997\");this._maximiseButton.element.setAttribute(\"title\",this._minimiseLabel)}processMinimised(){if(void 0===this._maximiseButton)throw new J(\"HPMIN16997\");this._maximiseButton.element.setAttribute(\"title\",this._maximiseLabel)}updateTabSizes(){if(this._tabsContainer.tabCount>0){const t=this._show?this._layoutManager.layoutConfig.dimensions.headerHeight:0;let e;this._leftRightSided?(this._element.style.height=\"\",this._element.style.width=zt(t)):(this._element.style.width=\"\",this._element.style.height=zt(t)),e=this._leftRightSided?this._element.offsetHeight-this._controlsContainerElement.offsetHeight-this._tabControlOffset:this._element.offsetWidth-this._controlsContainerElement.offsetWidth-this._tabControlOffset,this._tabsContainer.updateTabSizes(e,this._getActiveComponentItemEvent())}}handleTabInitiatedComponentRemoveEvent(t){if(this._canRemoveComponent){if(void 0===this._componentRemoveEvent)throw new J(\"HHTCE22294\");this._componentRemoveEvent(t)}}handleTabInitiatedComponentFocusEvent(t){if(void 0===this._componentFocusEvent)throw new J(\"HHTAE22294\");this._componentFocusEvent(t)}handleTabInitiatedDragStartEvent(t,e,i,n){if(this._canRemoveComponent){if(void 0===this._componentDragStartEvent)throw new J(\"HHTDSE22294\");this._componentDragStartEvent(t,e,i,n)}else i.cancelDrag()}processTabDropdownActiveChanged(){void 0!==this._tabDropdownButton&&Dt(this._tabDropdownButton.element,this._tabsContainer.dropdownActive)}handleButtonPopoutEvent(){if(this._layoutManager.layoutConfig.settings.popoutWholeStack){if(void 0===this._popoutEvent)throw new J(\"HHBPOE17834\");this._popoutEvent()}else{const t=this._getActiveComponentItemEvent();t&&t.popout()}}handleButtonMaximiseToggleEvent(t){if(void 0===this._maximiseToggleEvent)throw new J(\"HHBMTE16834\");this._maximiseToggleEvent()}onClick(t){t.target===this._element&&this.notifyClick(t)}onTouchStart(t){t.target===this._element&&this.notifyTouchStart(t)}notifyClick(t){if(void 0===this._clickEvent)throw new J(\"HNHC46834\");this._clickEvent(t)}notifyTouchStart(t){if(void 0===this._touchStartEvent)throw new J(\"HNHTS46834\");this._touchStartEvent(t)}}class ee extends $t{constructor(t,e,i){var n,o,s,r,a,l,h,d,c,m,u,p,g,f,v,_,y,C,w;super(t,e,i,ee.createElement(document)),this._headerSideChanged=!1,this._resizeListener=()=>this.handleResize(),this._maximisedListener=()=>this.handleMaximised(),this._minimisedListener=()=>this.handleMinimised(),this._headerConfig=e.header;const I=t.layoutConfig.header,b=e.content;let S;if(1!==b.length)S=void 0;else{S=b[0].header}this._initialWantMaximise=e.maximised,this._initialActiveItemIndex=null!==(n=e.activeItemIndex)&&void 0!==n?n:0;const E=null!==(r=null!==(s=null===(o=this._headerConfig)||void 0===o?void 0:o.show)&&void 0!==s?s:null==S?void 0:S.show)&&void 0!==r?r:I.show,x=null!==(h=null!==(l=null===(a=this._headerConfig)||void 0===a?void 0:a.popout)&&void 0!==l?l:null==S?void 0:S.popout)&&void 0!==h?h:I.popout,L=null!==(m=null!==(c=null===(d=this._headerConfig)||void 0===d?void 0:d.maximise)&&void 0!==c?c:null==S?void 0:S.maximise)&&void 0!==m?m:I.maximise,z=null!==(g=null!==(p=null===(u=this._headerConfig)||void 0===u?void 0:u.close)&&void 0!==p?p:null==S?void 0:S.close)&&void 0!==g?g:I.close,M=null!==(_=null!==(v=null===(f=this._headerConfig)||void 0===f?void 0:f.minimise)&&void 0!==v?v:null==S?void 0:S.minimise)&&void 0!==_?_:I.minimise,P=null!==(w=null!==(C=null===(y=this._headerConfig)||void 0===y?void 0:y.tabDropdown)&&void 0!==C?C:null==S?void 0:S.tabDropdown)&&void 0!==w?w:I.tabDropdown;this._maximisedEnabled=!1!==L;const T={show:!1!==E,side:!1===E?nt.top:E,popoutEnabled:!1!==x,popoutLabel:!1===x?\"\":x,maximiseEnabled:this._maximisedEnabled,maximiseLabel:!1===L?\"\":L,closeEnabled:!1!==z,closeLabel:!1===z?\"\":z,minimiseEnabled:!0,minimiseLabel:M,tabDropdownEnabled:!1!==P,tabDropdownLabel:!1===P?\"\":P};this._header=new te(t,this,T,e.isClosable&&!1!==z,(()=>this.getActiveComponentItem()),(()=>this.remove()),(()=>this.handlePopoutEvent()),(()=>this.toggleMaximise()),(t=>this.handleHeaderClickEvent(t)),(t=>this.handleHeaderTouchStartEvent(t)),(t=>this.handleHeaderComponentRemoveEvent(t)),(t=>this.handleHeaderComponentFocusEvent(t)),((t,e,i,n)=>this.handleHeaderComponentStartDragEvent(t,e,i,n))),this.isStack=!0,this._childElementContainer=document.createElement(\"section\"),this._childElementContainer.classList.add(\"lm_items\"),this.on(\"resize\",this._resizeListener),this._maximisedEnabled&&(this.on(\"maximised\",this._maximisedListener),this.on(\"minimised\",this._minimisedListener)),this.element.appendChild(this._header.element),this.element.appendChild(this._childElementContainer),this.setupHeaderPosition(),this._header.updateClosability()}get childElementContainer(){return this._childElementContainer}get header(){return this._header}get headerShow(){return this._header.show}get headerSide(){return this._header.side}get headerLeftRightSided(){return this._header.leftRightSided}get contentAreaDimensions(){return this._contentAreaDimensions}get initialWantMaximise(){return this._initialWantMaximise}get isMaximised(){return this===this.layoutManager.maximisedStack}get stackParent(){if(!this.parent)throw new Error(\"Stack should always have a parent\");return this.parent}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}init(){if(!0===this.isInitialised)return;this.updateNodeSize();for(let t=0;t0){if(this._initialActiveItemIndex<0||this._initialActiveItemIndex>=e)throw new Error(`ActiveItemIndex out of range: ${this._initialActiveItemIndex} id: ${this.id}`);for(let i=0;ithis.contentItems.length)throw e-=1,new X(\"SAC99728\");if(t instanceof jt)return e=super.addChild(t,e),this._childElementContainer.appendChild(t.element),this._header.createTab(t,e),this.setActiveComponentItem(t,i),this._header.updateTabSizes(),this.updateSize(!1),t.container.setBaseLogicalZIndex(),this._header.updateClosability(),this.emitStateChangedEvent(),e;throw new X(\"SACC88532\")}removeChild(t,e){const i=t,n=this.contentItems.indexOf(i),o=1===this.contentItems.length;if(this._activeComponentItem===i&&(i.focused&&i.blur(),!o)){const t=0===n?1:n-1;this.setActiveComponentItem(this.contentItems[t],!1)}this._header.removeTab(i),super.removeChild(i,e),o||this._header.updateClosability(),this.emitStateChangedEvent()}toggleMaximise(){this.isMaximised?this.minimise():this.maximise()}maximise(){if(!this.isMaximised){this.layoutManager.setMaximisedStack(this);const t=this.contentItems,e=t.length;for(let i=0;i0&&void 0===t)throw new Error(\"expected non-empty stack to have an active component item\");return{type:\"stack\",content:this.calculateConfigContent(),size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,isClosable:this.isClosable,maximised:this.isMaximised,header:this.createHeaderConfig(),activeItemIndex:t}}onDrop(t,e){if(\"header\"===this._dropSegment){if(this.resetHeaderDropZone(),void 0===this._dropIndex)throw new J(\"SODDI68990\");return void this.addChild(t,this._dropIndex)}if(\"body\"===this._dropSegment)return void this.addChild(t,0,!0);const i=\"top\"===this._dropSegment||\"bottom\"===this._dropSegment,n=\"left\"===this._dropSegment||\"right\"===this._dropSegment,o=\"top\"===this._dropSegment||\"left\"===this._dropSegment,s=i&&this.stackParent.isColumn||n&&this.stackParent.isRow;if(t.isComponent){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createAndInitContentItem(e,this);i.addChild(t),t=i}if(t.type===at.row||t.type===at.column){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}if(s){const e=this.stackParent.contentItems.indexOf(this);this.stackParent.addChild(t,o?e:e+1,!0),this.size*=.5,t.size=this.size,t.sizeUnit=this.sizeUnit,this.stackParent.updateSize(!1)}else{const e=i?at.column:at.row,n=ct.createDefault(e),s=this.layoutManager.createContentItem(n,this);this.stackParent.replaceChild(this,s),s.addChild(t,o?0:void 0,!0),s.addChild(this,o?void 0:0,!0),this.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}highlightDropZone(t,e){for(const i in this._contentAreaDimensions){const n=i,o=this._contentAreaDimensions[n].hoverArea;if(o.x1t&&o.y1e)return void(\"header\"===n?(this._dropSegment=\"header\",this.highlightHeaderDropZone(this._header.leftRightSided?e:t)):(this.resetHeaderDropZone(),this.highlightBodyDropZone(n)))}}getArea(){if(\"none\"===this.element.style.display)return null;const t=super.getElementArea(this._header.element),e=super.getElementArea(this._childElementContainer);if(null===t||null===e)throw new K(\"SGAHC13086\");const i=e.x2-e.x1,n=e.y2-e.y1;return this._contentAreaDimensions={header:{hoverArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2},highlightArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2}}},0===this.contentItems.length?(this._contentAreaDimensions.body={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2}},super.getElementArea(this.element)):(this._contentAreaDimensions.left={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x1+.25*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x1+.5*i,y2:e.y2}},this._contentAreaDimensions.top={hoverArea:{x1:e.x1+.25*i,y1:e.y1,x2:e.x1+.75*i,y2:e.y1+.5*n},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y1+.5*n}},this._contentAreaDimensions.right={hoverArea:{x1:e.x1+.75*i,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1+.5*i,y1:e.y1,x2:e.x2,y2:e.y2}},this._contentAreaDimensions.bottom={hoverArea:{x1:e.x1+.25*i,y1:e.y1+.5*n,x2:e.x1+.75*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1+.5*n,x2:e.x2,y2:e.y2}},super.getElementArea(this.element))}positionHeader(t){this._header.side!==t&&(this._header.setSide(t),this._headerSideChanged=!0,this.setupHeaderPosition())}updateNodeSize(){if(\"none\"!==this.element.style.display){const t=kt(this.element);if(this._header.show){t[this._header.leftRightSided?it.width:it.height]-=this.layoutManager.layoutConfig.dimensions.headerHeight}this._childElementContainer.style.width=zt(t.width),this._childElementContainer.style.height=zt(t.height);for(let e=0;e=o&&tthis.onDrag(t,e,i))),this._dragListener.on(\"dragStop\",(()=>this.onDrop())),this.createDragProxyElements(t,e),null===this._componentItem.parent)throw new K(\"DPC10097\");this._componentItemFocused=this._componentItem.focused,this._componentItemFocused&&this._componentItem.blur(),this._componentItem.parent.removeChild(this._componentItem,!0),this.setDimensions(),document.body.appendChild(this._element),this.determineMinMaxXY(),this._layoutManager.calculateItemAreas(),this.setDropPosition(t,e)}get element(){return this._element}createDragProxyElements(t,e){this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_dragProxy\");const i=document.createElement(\"div\");i.classList.add(\"lm_header\");const n=document.createElement(\"div\");n.classList.add(\"lm_tabs\");const o=document.createElement(\"div\");o.classList.add(\"lm_tab\");const s=document.createElement(\"span\");s.classList.add(\"lm_title\"),o.appendChild(s),n.appendChild(o),i.appendChild(n),this._proxyContainerElement=document.createElement(\"div\"),this._proxyContainerElement.classList.add(\"lm_content\"),this._element.appendChild(i),this._element.appendChild(this._proxyContainerElement),this._originalParent instanceof ee&&this._originalParent.headerShow&&(this._sided=this._originalParent.headerLeftRightSided,this._element.classList.add(\"lm_\"+this._originalParent.headerSide),[nt.right,nt.bottom].indexOf(this._originalParent.headerSide)>=0&&this._proxyContainerElement.insertAdjacentElement(\"afterend\",i)),this._element.style.left=zt(t),this._element.style.top=zt(e),o.setAttribute(\"title\",this._componentItem.title),s.insertAdjacentText(\"afterbegin\",this._componentItem.title),this._proxyContainerElement.appendChild(this._componentItem.element)}determineMinMaxXY(){const t=this._layoutManager.groundItem;if(void 0===t)throw new J(\"DPDMMXY73109\");{const e=t.element.getBoundingClientRect();this._minX=e.left+document.body.scrollLeft,this._minY=e.top+document.body.scrollTop,this._maxX=this._minX+e.width,this._maxY=this._minY+e.height}}onDrag(t,e,i){const n=i.pageX,o=i.pageY;this.setDropPosition(n,o),this._componentItem.drag()}setDropPosition(t,e){this._layoutManager.layoutConfig.settings.constrainDragToContainer&&(t<=this._minX?t=Math.ceil(this._minX):t>=this._maxX&&(t=Math.floor(this._maxX)),e<=this._minY?e=Math.ceil(this._minY):e>=this._maxY&&(e=Math.floor(this._maxY))),this._element.style.left=zt(t),this._element.style.top=zt(e),this._area=this._layoutManager.getArea(t,e),null!==this._area&&(this._lastValidArea=this._area,this._area.contentItem.highlightDropZone(t,e,this._area))}onDrop(){const t=this._layoutManager.dropTargetIndicator;if(null===t)throw new K(\"DPOD30011\");let e;if(t.hide(),this._componentItem.exitDragMode(),null!==this._area)e=this._componentItem,this._area.contentItem.onDrop(e,this._area);else if(null!==this._lastValidArea){e=this._componentItem;this._lastValidArea.contentItem.onDrop(e,this._lastValidArea)}else this._originalParent?(e=this._componentItem,this._originalParent.addChild(e)):this._componentItem.destroy();this._element.remove(),this._layoutManager.emit(\"itemDropped\",this._componentItem),this._componentItemFocused&&void 0!==e&&e.focus()}setDimensions(){const t=this._layoutManager.layoutConfig.dimensions;if(void 0===t)throw new Error(\"DragProxy.setDimensions: dimensions undefined\");let e=t.dragProxyWidth,i=t.dragProxyHeight;if(void 0===e||void 0===i)throw new Error(\"DragProxy.setDimensions: width and/or height undefined\");const n=!1===this._layoutManager.layoutConfig.header.show?0:t.headerHeight;this._element.style.width=zt(e),this._element.style.height=zt(i),e-=this._sided?n:0,i-=this._sided?0:n,this._proxyContainerElement.style.width=zt(e),this._proxyContainerElement.style.height=zt(i),this._componentItem.enterDragMode(e,i),this._componentItem.show()}}class ne{constructor(t,e,i,n,o,s,r){this._layoutManager=t,this._element=e,this._extraAllowableChildTargets=i,this._componentTypeOrFtn=n,this._componentState=o,this._title=s,this._id=r,this._dragListener=null,this._dummyGroundContainer=document.createElement(\"div\");const a=gt.createDefault(\"row\");this._dummyGroundContentItem=new Yt(this._layoutManager,a,this._dummyGroundContainer),this.createDragListener()}destroy(){this.removeDragListener()}createDragListener(){this.removeDragListener(),this._dragListener=new Zt(this._element,this._extraAllowableChildTargets),this._dragListener.on(\"dragStart\",((t,e)=>this.onDragStart(t,e))),this._dragListener.on(\"dragStop\",(()=>this.onDragStop()))}onDragStart(t,e){var i;const n=\"component\";let o;if(\"function\"==typeof this._componentTypeOrFtn){const t=this._componentTypeOrFtn();o=ne.isDragSourceComponentItemConfig(t)?{type:n,componentState:t.state,componentType:t.type,title:null!==(i=t.title)&&void 0!==i?i:this._title}:t}else o={type:n,componentState:this._componentState,componentType:this._componentTypeOrFtn,title:this._title,id:this._id};const s=bt.resolve(o,!1),r=new jt(this._layoutManager,s,this._dummyGroundContentItem);if(this._dummyGroundContentItem.contentItems.push(r),null===this._dragListener)throw new K(\"DSODSD66746\");{const i=new ie(t,e,this._dragListener,this._layoutManager,r,this._dummyGroundContentItem),n=this._layoutManager.transitionIndicator;if(null===n)throw new K(\"DSODST66746\");n.transitionElements(this._element,i.element)}}onDragStop(){this.createDragListener()}removeDragListener(){null!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=null)}}!function(t){t.isDragSourceComponentItemConfig=function(t){return!(\"componentType\"in t)}}(ne||(ne={}));class oe{constructor(){this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_dropTargetIndicator\");const t=document.createElement(\"div\");t.classList.add(\"lm_inner\"),this._element.appendChild(t),document.body.appendChild(this._element)}destroy(){this._element.remove()}highlightArea(t,e){this._element.style.left=zt(t.x1+e),this._element.style.top=zt(t.y1+e),this._element.style.width=zt(t.x2-t.x1-e),this._element.style.height=zt(t.y2-t.y1-e),this._element.style.display=\"block\"}hide(){Dt(this._element,!1)}}class se{constructor(){this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_transition_indicator\"),document.body.appendChild(this._element),this._toElement=null,this._fromDimensions=null,this._totalAnimationDuration=200,this._animationStartTime=null}destroy(){this._element.remove()}transitionElements(t,e){}nextAnimationFrame(){}measure(t){const e=t.getBoundingClientRect();return{left:e.left,top:e.top,width:t.offsetWidth,height:t.offsetHeight}}}class re extends Wt{constructor(t){super(),this._layoutManager=t,this._childEventListener=t=>this.onEventFromChild(t),globalThis.addEventListener(re.ChildEventName,this._childEventListener,{passive:!0})}emit(t,...e){\"userBroadcast\"===t?this.emitUserBroadcast(...e):super.emit(t,...e)}emitUserBroadcast(...t){this.handleUserBroadcastEvent(\"userBroadcast\",t)}destroy(){globalThis.removeEventListener(re.ChildEventName,this._childEventListener)}handleUserBroadcastEvent(t,e){this._layoutManager.isSubWindow?this.propagateToParent(t,e):this.propagateToThisAndSubtree(t,e)}onEventFromChild(t){const e=t.detail;this.handleUserBroadcastEvent(e.eventName,e.args)}propagateToParent(t,e){const i={bubbles:!0,cancelable:!0,detail:{layoutManager:this._layoutManager,eventName:t,args:e}},n=new CustomEvent(re.ChildEventName,i),o=globalThis.opener;if(null===o)throw new K(\"EHPTP15778\");o.dispatchEvent(n)}propagateToThisAndSubtree(t,e){this.emitUnknown(t,...e);for(let i=0;ithis.handleContainerResize())),this._windowBeforeUnloadListener=()=>this.onBeforeUnload(),this._windowBeforeUnloadListening=!1,this._maximisedStackBeforeDestroyedListener=t=>this.cleanupBeforeMaximisedStackDestroyed(t),this.isSubWindow=t.isSubWindow,this._constructorOrSubWindowLayoutConfig=t.constructorOrSubWindowLayoutConfig,Q.checkInitialise(),dt.checkInitialise(),void 0!==t.containerElement&&(this._containerElement=t.containerElement)}get container(){return this._containerElement}get isInitialised(){return this._isInitialised}get groundItem(){return this._groundItem}get root(){return this._groundItem}get openPopouts(){return this._openPopouts}get dropTargetIndicator(){return this._dropTargetIndicator}get transitionIndicator(){return this._transitionIndicator}get width(){return this._width}get height(){return this._height}get eventHub(){return this._eventHub}get rootItem(){if(void 0===this._groundItem)throw new Error(\"Cannot access rootItem before init\");return 0===this._groundItem.contentItems.length?void 0:this._groundItem.contentItems[0]}get focusedComponentItem(){return this._focusedComponentItem}get tabDropPlaceholder(){return this._tabDropPlaceholder}get maximisedStack(){return this._maximisedStack}get deprecatedConstructor(){return!this.isSubWindow&&void 0!==this._constructorOrSubWindowLayoutConfig}destroy(){if(this._isInitialised){this._windowBeforeUnloadListening&&(globalThis.removeEventListener(\"beforeunload\",this._windowBeforeUnloadListener),this._windowBeforeUnloadListening=!1),!0===this.layoutConfig.settings.closePopoutsOnUnload&&this.closeAllOpenPopouts(),this._resizeObserver.disconnect(),this.checkClearResizeTimeout(),void 0!==this._groundItem&&this._groundItem.destroy(),this._tabDropPlaceholder.remove(),null!==this._dropTargetIndicator&&this._dropTargetIndicator.destroy(),null!==this._transitionIndicator&&this._transitionIndicator.destroy(),this._eventHub.destroy();for(const t of this._dragSources)t.destroy();this._dragSources=[],this._isInitialised=!1}}minifyConfig(t){return _t.minifyConfig(t)}unminifyConfig(t){return _t.unminifyConfig(t)}init(){let t;if(this.setContainer(),this._dropTargetIndicator=new oe,this._transitionIndicator=new se,this.updateSizeFromContainer(),this.isSubWindow){if(void 0===this._constructorOrSubWindowLayoutConfig)throw new J(\"LMIU07155\");{const e=this._constructorOrSubWindowLayoutConfig.root;if(void 0===e)throw new X(\"LMIC07156\");if(!Ct.isComponent(e))throw new X(\"LMIC07157\");t=e;const i=xt.resolve(this._constructorOrSubWindowLayoutConfig);this.layoutConfig=Object.assign(Object.assign({},i),{root:void 0})}}else void 0===this._constructorOrSubWindowLayoutConfig?this.layoutConfig=_t.createDefault():this.layoutConfig=xt.resolve(this._constructorOrSubWindowLayoutConfig);const e=this.layoutConfig;this._groundItem=new Yt(this,e.root,this._containerElement),this._groundItem.init(),this.checkLoadedLayoutMaximiseItem(),this._resizeObserver.observe(this._containerElement),this._isInitialised=!0,this.adjustColumnsResponsive(),this.emit(\"initialised\"),void 0!==t&&this.loadComponentAsRoot(t)}loadLayout(t){if(!this.isInitialised)throw new Error(\"GoldenLayout: Need to call init() if LayoutConfig with defined root passed to constructor\");if(void 0===this._groundItem)throw new J(\"LMLL11119\");this.createSubWindows(),this.layoutConfig=xt.resolve(t),this._groundItem.loadRoot(this.layoutConfig.root),this.checkLoadedLayoutMaximiseItem(),this.adjustColumnsResponsive()}saveLayout(){if(!1===this._isInitialised)throw new Error(\"Can't create config, layout not yet initialised\");if(void 0===this._groundItem)throw new J(\"LMTC18244\");{const t=this._groundItem.calculateConfigContent();let e;e=1!==t.length?void 0:t[0],this.reconcilePopoutWindows();const i=[];for(let t=0;t=0?n=this._groundItem.contentItems[0]:e=0;break;case at.row:case at.column:e=n.addItem(t,i.index);break;case at.stack:if(Ct.isComponent(t)){e=n.addItem(t,i.index);break}throw Error(tt[6]);case at.component:throw new X(\"LMAIALC87444602\");default:throw new Y(\"LMAIALU98881733\",n.type)}if(Ct.isComponent(t)){const t=n.contentItems[e];Gt.isStack(t)&&(n=t,e=0)}return i.parentItem=n,i.index=e,i}}}loadComponentAsRoot(t){if(void 0===this._groundItem)throw new Error(\"Cannot add item before init\");this._groundItem.loadComponentAsRoot(t)}updateSize(t,e){this.setSize(t,e)}setSize(t,e){if(this._width=t,this._height=e,!0===this._isInitialised){if(void 0===this._groundItem)throw new J(\"LMUS18881\");if(this._groundItem.setSize(this._width,this._height),this._maximisedStack){const{width:t,height:e}=kt(this._containerElement);Tt(this._maximisedStack.element,t),At(this._maximisedStack.element,e),this._maximisedStack.updateSize(!1)}this.adjustColumnsResponsive()}}beginSizeInvalidation(){this._sizeInvalidationBeginCount++}endSizeInvalidation(){0==--this._sizeInvalidationBeginCount&&this.updateSizeFromContainer()}updateSizeFromContainer(){const{width:t,height:e}=kt(this._containerElement);this.setSize(t,e)}updateRootSize(t=!1){if(void 0===this._groundItem)throw new J(\"LMURS28881\");this._groundItem.updateSize(t)}createAndInitContentItem(t,e){const i=this.createContentItem(t,e);return i.init(),i}createContentItem(t,e){if(\"string\"!=typeof t.type)throw new G(\"Missing parameter 'type'\",JSON.stringify(t));if(ct.isComponentItem(t)&&!(e instanceof ee)&&e&&!(!0===this.isSubWindow&&e instanceof Yt)){t={type:at.stack,content:[t],size:t.size,sizeUnit:t.sizeUnit,minSize:t.minSize,minSizeUnit:t.minSizeUnit,id:t.id,maximised:t.maximised,isClosable:t.isClosable,activeItemIndex:0,header:void 0}}return this.createContentItemFromConfig(t,e)}findFirstComponentItemById(t){if(void 0===this._groundItem)throw new J(\"LMFFCIBI82446\");return this.findFirstContentItemTypeByIdRecursive(at.component,t,this._groundItem)}createPopout(t,e,i,n){return t instanceof Gt?this.createPopoutFromContentItem(t,e,i,n):this.createPopoutFromItemConfig(t,e,i,n)}createPopoutFromContentItem(t,e,i,n){let o=t.parent,s=t;for(;null!==o&&1===o.contentItems.length&&!o.isGround;)s=o,o=o.parent;if(null===o)throw new K(\"LMCPFCI00834\");{if(void 0===n&&(n=o.contentItems.indexOf(s)),null!==i&&o.addPopInParentId(i),void 0===e){const i=globalThis.screenX||globalThis.screenLeft,n=globalThis.screenY||globalThis.screenTop,o=t.element.offsetLeft,s=t.element.offsetTop,{width:r,height:a}=kt(t.element);e={left:i+o,top:n+s,width:r,height:a}}const r=t.toConfig();if(t.remove(),ft.isRootItemConfig(r))return this.createPopoutFromItemConfig(r,e,i,n);throw new Error(`${tt[0]}`)}}beginVirtualSizedContainerAdding(){0==++this._virtualSizedContainerAddingBeginCount&&(this._virtualSizedContainers.length=0)}addVirtualSizedContainer(t){this._virtualSizedContainers.push(t)}endVirtualSizedContainerAdding(){if(0==--this._virtualSizedContainerAddingBeginCount){const t=this._virtualSizedContainers.length;if(t>0){this.fireBeforeVirtualRectingEvent(t);for(let e=0;ethis.emit(\"windowOpened\",a))),a.on(\"closed\",(()=>this.reconcilePopoutWindows())),this._openPopouts.push(a),this.layoutConfig.settings.closePopoutsOnUnload&&!this._windowBeforeUnloadListening&&(globalThis.addEventListener(\"beforeunload\",this._windowBeforeUnloadListener,{passive:!0}),this._windowBeforeUnloadListening=!0),a}closeAllOpenPopouts(){for(let t=0;tglobalThis.close()),1)}getArea(t,e){let i=null,n=1/0;for(let o=0;o=s.x1&&t=s.y1&&es.surface&&(n=s.surface,i=s)}return i}calculateItemAreas(){const t=this.getAllContentItems(),e=this._groundItem;if(void 0===e)throw new J(\"LMCIAR44365\");if(1!==t.length){e.contentItems[0].isStack?this._itemAreas=[]:this._itemAreas=e.createSideAreas();for(let e=0;e0){let e=t[0];if(Gt.isComponentItem(e)){const t=e.parent;if(null===t)throw new K(\"LMXLLMI69999\");e=t}if(!Gt.isStack(e))throw new X(\"LMCLLMI19993\");e.maximise()}}}processMaximiseStack(t){if(this._maximisedStack=t,t.on(\"beforeItemDestroyed\",this._maximisedStackBeforeDestroyedListener),t.element.classList.add(\"lm_maximised\"),t.element.insertAdjacentElement(\"afterend\",this._maximisePlaceholder),void 0===this._groundItem)throw new J(\"LMMXI19993\");{this._groundItem.element.prepend(t.element);const{width:e,height:i}=kt(this._containerElement);Tt(t.element,e),At(t.element,i),t.updateSize(!0),t.focusActiveContentItem(),this._maximisedStack.emit(\"maximised\"),this.emit(\"stateChanged\")}}processMinimiseMaximisedStack(){if(void 0===this._maximisedStack)throw new X(\"LMMMS74422\");{const t=this._maximisedStack;if(null===t.parent)throw new K(\"LMMI13668\");t.element.classList.remove(\"lm_maximised\"),this._maximisePlaceholder.insertAdjacentElement(\"afterend\",t.element),this._maximisePlaceholder.remove(),this.updateRootSize(!0),this._maximisedStack=void 0,t.off(\"beforeItemDestroyed\",this._maximisedStackBeforeDestroyedListener),t.emit(\"minimised\"),this.emit(\"stateChanged\")}}reconcilePopoutWindows(){const t=[];for(let e=0;e{this._resizeTimeoutId=void 0,this.beginSizeInvalidation(),this.endSizeInvalidation()}),this.resizeDebounceInterval))}checkClearResizeTimeout(){void 0!==this._resizeTimeoutId&&(clearTimeout(this._resizeTimeoutId),this._resizeTimeoutId=void 0)}setContainer(){var t;const e=document.body,i=null!==(t=this._containerElement)&&void 0!==t?t:e;if(i===e){this.resizeWithContainerAutomatically=!0;const t=document.documentElement;t.style.height=\"100%\",t.style.margin=\"0\",t.style.padding=\"0\",t.style.overflow=\"clip\",e.style.height=\"100%\",e.style.margin=\"0\",e.style.padding=\"0\",e.style.overflow=\"clip\"}this._containerElement=i}onBeforeUnload(){this.destroy()}adjustColumnsResponsive(){if(void 0===this._groundItem)throw new J(\"LMACR20883\");if(this._firstLoad=!1,this.useResponsiveLayout()&&!this._updatingColumnsResponsive&&this._groundItem.contentItems.length>0&&this._groundItem.contentItems[0].isRow){if(void 0===this._groundItem||null===this._width)throw new J(\"LMACR77412\");{const t=this._groundItem.contentItems[0].contentItems.length;if(t<=1)return;{const e=this.layoutConfig.dimensions.defaultMinItemWidth;if(t*e<=this._width)return;{this._updatingColumnsResponsive=!0;const i=t-Math.max(Math.floor(this._width/e),1),n=this._groundItem.contentItems[0],o=this.getAllStacks();if(0===o.length)throw new X(\"LMACRS77413\");{const t=o[0];for(let e=0;en?void 0:{parentItem:t,index:o}}}case 1:if(void 0===this._focusedComponentItem)return;{const t=this._focusedComponentItem.parentItem;return this.tryCreateLocationFromParentItem(t,e)}case 2:{const t=this.findFirstContentItemType(at.stack);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 3:{let t=this.findFirstContentItemType(at.row);return void 0!==t?this.tryCreateLocationFromParentItem(t,e):(t=this.findFirstContentItemType(at.column),void 0!==t?this.tryCreateLocationFromParentItem(t,e):void 0)}case 4:{const t=this.findFirstContentItemType(at.row);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 5:{const t=this.findFirstContentItemType(at.column);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 6:if(void 0===this._groundItem)throw new J(\"LMFLRIF18244\");return void 0!==this.rootItem?void 0:void 0===e||0===e?{parentItem:this._groundItem,index:0}:void 0;case 7:if(void 0===this._groundItem)throw new J(\"LMFLF18244\");{const t=this._groundItem.contentItems;if(0===t.length)return void 0===e||0===e?{parentItem:this._groundItem,index:0}:void 0;{const i=t[0];return this.tryCreateLocationFromParentItem(i,e)}}}}tryCreateLocationFromParentItem(t,e){const i=t.contentItems.length;return void 0===e?{parentItem:t,index:i}:e<0||e>i?void 0:{parentItem:t,index:e}}}!function(t){t.createMaximisePlaceElement=function(t){const e=t.createElement(\"div\");return e.classList.add(\"lm_maximise_place\"),e},t.createTabDropPlaceholderElement=function(t){const e=t.createElement(\"div\");return e.classList.add(\"lm_drop_tab_placeholder\"),e},t.defaultLocationSelectors=[{typeId:1,index:void 0},{typeId:2,index:void 0},{typeId:3,index:void 0},{typeId:7,index:void 0}],t.afterFocusedItemIfPossibleLocationSelectors=[{typeId:0,index:1},{typeId:2,index:void 0},{typeId:3,index:void 0},{typeId:7,index:void 0}]}(ae||(ae={}));class le extends ae{constructor(t,e,i,n){if(super(le.createLayoutManagerConstructorParameters(t,e)),this._bindComponentEventHanlderPassedInConstructor=!1,this._creationTimeoutPassed=!1,void 0!==e&&\"function\"==typeof e&&(this.bindComponentEvent=e,this._bindComponentEventHanlderPassedInConstructor=!0,void 0!==i&&(this.unbindComponentEvent=i)),!this._bindComponentEventHanlderPassedInConstructor&&this.isSubWindow){if(void 0===this._constructorOrSubWindowLayoutConfig)throw new J(\"VLC98823\");{const t=xt.resolve(this._constructorOrSubWindowLayoutConfig);this.layoutConfig=Object.assign(Object.assign({},t),{root:void 0})}}!0!==n&&(this.deprecatedConstructor||this.init())}destroy(){this.bindComponentEvent=void 0,this.unbindComponentEvent=void 0,super.destroy()}init(){if(this._bindComponentEventHanlderPassedInConstructor||\"loading\"!==document.readyState&&null!==document.body){if(!this._bindComponentEventHanlderPassedInConstructor&&!0===this.isSubWindow&&!this._creationTimeoutPassed)return setTimeout((()=>this.init()),7),void(this._creationTimeoutPassed=!0);!0===this.isSubWindow&&(this._bindComponentEventHanlderPassedInConstructor||this.clearHtmlAndAdjustStylesForSubWindow(),window.__glInstance=this),super.init()}else document.addEventListener(\"DOMContentLoaded\",(()=>this.init()),{passive:!0})}clearHtmlAndAdjustStylesForSubWindow(){const t=document.head,e=new Array(4);e[0]=document.querySelectorAll(\"body link\"),e[1]=document.querySelectorAll(\"body style\"),e[2]=document.querySelectorAll(\"template\"),e[3]=document.querySelectorAll(\".gl_keep\");for(let i=0;ithis.emit(\"popIn\"))),document.body.appendChild(t),!0}}bindComponent(t,e){if(void 0!==this.bindComponentEvent){return this.bindComponentEvent(t,e)}if(void 0!==this.getComponentEvent)return{virtual:!1,component:this.getComponentEvent(t,e)};{const t=`${tt[2]}: ${JSON.stringify(e)}`;throw new Z(t)}}unbindComponent(t,e,i){if(void 0!==this.unbindComponentEvent)this.unbindComponentEvent(t);else if(!e&&void 0!==this.releaseComponentEvent){if(void 0===i)throw new J(\"VCUCRCU333998\");this.releaseComponentEvent(t,i)}}}!function(t){let e=!1;t.createLayoutManagerConstructorParameters=function(t,i){const n=e?null:new URL(document.location.href).searchParams.get(\"gl-window\");e=!0;const o=null!==n;let s,r;if(null!==n){const e=localStorage.getItem(n);if(null===e)throw new Error(\"Null gl-window Config\");localStorage.removeItem(n);const i=JSON.parse(e),o=_t.unminifyConfig(i);r=xt.fromResolved(o),t instanceof HTMLElement&&(s=t)}else void 0===t?r=void 0:t instanceof HTMLElement?(r=void 0,s=t):r=t,void 0===s&&i instanceof HTMLElement&&(s=i);return{constructorOrSubWindowLayoutConfig:r,isSubWindow:o,containerElement:s}}}(le||(le={}));class he extends le{constructor(t,e,i){super(t,e,i,!0),this._componentTypesMap=new Map,this._registeredComponentMap=new Map,this._virtuableComponentMap=new Map,this._containerVirtualRectingRequiredEventListener=(t,e,i)=>this.handleContainerVirtualRectingRequiredEvent(t,e,i),this._containerVirtualVisibilityChangeRequiredEventListener=(t,e)=>this.handleContainerVirtualVisibilityChangeRequiredEvent(t,e),this._containerVirtualZIndexChangeRequiredEventListener=(t,e,i)=>this.handleContainerVirtualZIndexChangeRequiredEvent(t,e,i),this.deprecatedConstructor||this.init()}registerComponent(t,e,i=!1){if(\"function\"!=typeof e)throw new $(\"registerComponent() componentConstructorOrFactoryFtn parameter is not a function\");if(e.hasOwnProperty(\"prototype\")){const n=e;this.registerComponentConstructor(t,n,i)}else{const n=e;this.registerComponentFactoryFunction(t,n,i)}}registerComponentConstructor(t,e,i=!1){if(\"function\"!=typeof e)throw new Error(tt[1]);if(void 0!==this._componentTypesMap.get(t))throw new Z(`${tt[3]}: ${t}`);this._componentTypesMap.set(t,{constructor:e,factoryFunction:void 0,virtual:i})}registerComponentFactoryFunction(t,e,i=!1){if(\"function\"!=typeof e)throw new Z(\"Please register a constructor function\");if(void 0!==this._componentTypesMap.get(t))throw new Z(`${tt[3]}: ${t}`);this._componentTypesMap.set(t,{constructor:void 0,factoryFunction:e,virtual:i})}registerComponentFunction(t){this.registerGetComponentConstructorCallback(t)}registerGetComponentConstructorCallback(t){if(\"function\"!=typeof t)throw new Error(\"Please register a callback function\");void 0!==this._getComponentConstructorFtn&&console.warn(\"Multiple component functions are being registered. Only the final registered function will be used.\"),this._getComponentConstructorFtn=t}getRegisteredComponentTypeNames(){const t=this._componentTypesMap.keys();return Array.from(t)}getComponentInstantiator(t){let e;const i=pt.resolveComponentTypeName(t);return void 0!==i&&(e=this._componentTypesMap.get(i)),void 0===e&&void 0!==this._getComponentConstructorFtn&&(e={constructor:this._getComponentConstructorFtn(t),factoryFunction:void 0,virtual:!1}),e}bindComponent(t,e){let i;const n=pt.resolveComponentTypeName(e);let o;if(void 0!==n&&(i=this._componentTypesMap.get(n)),void 0===i&&void 0!==this._getComponentConstructorFtn&&(i={constructor:this._getComponentConstructorFtn(e),factoryFunction:void 0,virtual:!1}),void 0!==i){const s=i.virtual;let r,a;r=void 0===e.componentState?void 0:Ut({},e.componentState);const l=i.constructor;if(void 0!==l)a=new l(t,r,s);else{const e=i.factoryFunction;if(void 0===e)throw new X(\"LMBCFFU10008\");a=e(t,r,s)}if(s){if(void 0===a)throw new J(\"GLBCVCU988774\");{const e=a,i=e.rootHtmlElement;if(void 0===i)throw new Z(`${tt[5]}: ${n}`);!function(t){const e=\"absolute\";t.style.position!==e&&(t.style.position=e)}(i),this.container.appendChild(i),this._virtuableComponentMap.set(t,e),t.virtualRectingRequiredEvent=this._containerVirtualRectingRequiredEventListener,t.virtualVisibilityChangeRequiredEvent=this._containerVirtualVisibilityChangeRequiredEventListener,t.virtualZIndexChangeRequiredEvent=this._containerVirtualZIndexChangeRequiredEventListener}}this._registeredComponentMap.set(t,a),o={virtual:i.virtual,component:a}}else o=super.bindComponent(t,e);return o}unbindComponent(t,e,i){if(void 0===this._registeredComponentMap.get(t))super.unbindComponent(t,e,i);else{const e=this._virtuableComponentMap.get(t);if(void 0!==e){const i=e.rootHtmlElement;if(void 0===i)throw new X(\"GLUC77743\",t.title);this.container.removeChild(i),this._virtuableComponentMap.delete(t)}}}fireBeforeVirtualRectingEvent(t){this._goldenLayoutBoundingClientRect=this.container.getBoundingClientRect(),super.fireBeforeVirtualRectingEvent(t)}handleContainerVirtualRectingRequiredEvent(t,e,i){const n=this._virtuableComponentMap.get(t);if(void 0===n)throw new J(\"GLHCSCE55933\");{const o=n.rootHtmlElement;if(void 0===o)throw new Z(tt[4]+\" \"+t.title);{const n=t.element.getBoundingClientRect(),s=n.left-this._goldenLayoutBoundingClientRect.left;o.style.left=zt(s);const r=n.top-this._goldenLayoutBoundingClientRect.top;o.style.top=zt(r),Tt(o,e),At(o,i)}}}handleContainerVirtualVisibilityChangeRequiredEvent(t,e){const i=this._virtuableComponentMap.get(t);if(void 0===i)throw new J(\"GLHCVVCRE55934\");{const n=i.rootHtmlElement;if(void 0===n)throw new Z(tt[4]+\" \"+t.title);Dt(n,e)}}handleContainerVirtualZIndexChangeRequiredEvent(t,e,i){const n=this._virtuableComponentMap.get(t);if(void 0===n)throw new J(\"GLHCVZICRE55935\");{const e=n.rootHtmlElement;if(void 0===e)throw new Z(tt[4]+\" \"+t.title);e.style.zIndex=i}}}const de=\"initial_\",ce={show:\"top\",popout:!1,maximise:!1,close:\"close-tab-unused\"},me={headerHeight:31},ue={hasHeaders:!0,reorderEnabled:!0},pe={popoutWholeStack:!1,constrainDragToContainer:!1,constrainDragToHeaders:!1,preventDragout:!1,showMaximiseIcon:!1,showPopoutIcon:!1,showCloseIcon:!1,blockedPopoutsThrowError:!0,closePopoutsOnUnload:!0,selectionEnabled:!1};var ge,fe;class ve{constructor(e){this.layout=e,ge.set(this,void 0),fe.set(this,void 0),this.handleResize=t=>{t.forEach((t=>this.resizeElement(t.target)))},this.handleMutation=()=>{this.layout.viewComponentsByContainerElement.forEach((t=>{this.resizeElement(t.container.element)}))},t.__classPrivateFieldSet(this,ge,new ResizeObserver(this.handleResize),\"f\"),t.__classPrivateFieldSet(this,fe,new MutationObserver(this.handleMutation),\"f\")}observeMutations(e){t.__classPrivateFieldGet(this,fe,\"f\")?.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[\"class\"]})}destroy(){t.__classPrivateFieldGet(this,ge,\"f\").disconnect(),t.__classPrivateFieldGet(this,fe,\"f\").disconnect()}observeContainer(e){t.__classPrivateFieldGet(this,ge,\"f\").observe(e)}unobserveContainer(e){t.__classPrivateFieldGet(this,ge,\"f\").unobserve(e)}resizeElement(t){const e=this.layout.viewComponentsByContainerElement.get(t);e&&e.resize()}}ge=new WeakMap,fe=new WeakMap;var _e={};Object.defineProperty(_e,\"__esModule\",{value:!0});var ye=_e.BaseItem=void 0;class Ce{constructor(t,e,i){this._item=t,this._layout=e,this._wrap=i}get raw(){return this._item}get layout(){return this._layout}get type(){return this._item.type}get contentItems(){return(this._item.contentItems??[]).map((t=>this._wrap(t)))}get parent(){const t=this._item.parent;return t?this._wrap(t):null}setActiveContentItem(t,e){if(\"stack\"!==this.type)throw new Error(`Cannot call setActiveContentItem from a non-stack item: ${this.type}`);this._item.setActiveContentItem(t.raw,e)}static wrapInternal(t,e,i){const n=Ce.wrapCache.get(e);if(n)return n;const o=new t(e,i,(e=>Ce.wrapInternal(t,e,i)));return Ce.wrapCache.set(e,o),o}}ye=_e.BaseItem=Ce,Ce.wrapCache=new WeakMap;const we=t=>!!t&&\"contentItems\"in t&&(t.isRow||t.isColumn);class Ie extends ye{isRoot(){return!!this._item.parent?.isGround}getBounds(){return this._item.element.getBoundingClientRect()}get viewName(){if(this._item.isComponent){const{component:t}=this._item;return t.identity.name}throw new Error(\"View name not found\")}onDestroyed(t){const e=({target:i})=>{i===this._item&&(t(),this._item.off(\"itemDestroyed\",e))};this._item.on(\"itemDestroyed\",e)}createAdjacentStack({position:t=\"right\"}={}){const e=this.raw;if(ee.isStack(e)&&e.parent){const i=[\"top\",\"bottom\"].includes(t)?\"column\":\"row\",n=[\"left\",\"top\"].includes(t)?1:0,o=we(e.parent)?e.parent:e.layoutManager,s=o,r=e.parent.contentItems.indexOf(e);e.parent.isGround&&e.parent.removeChild(e,!0);const a=o.newItem({type:i,content:[{type:\"stack\",content:[]}]},r);if(!a)throw new Error(\"createAdjacentStack: Failed to create new container\");const l=a.contentItems[0];return a.addChild(this.raw,n),we(s)&&s.removeChild(e,!0),this._wrap(l)}throw new Error(`Cannot creat adjacent stacks for type: ${e.type}, must be type 'stack'`)}setActiveContentItem(t,e=!0){if(!ee.isStack(this._item))throw new Error(`Cannot call setActiveContentItem from a non-stack item: ${this.type}`);this._item.setActiveComponentItem(t.raw,!e)}static wrap(t,e){return ye.wrapInternal(Ie,t,e)}}function be(t=[],e){for(const i of t)\"component\"===i.type?Object.keys(e).forEach((t=>{t in i&&(i.componentState={[`${de}${t}`]:i[t],...i.componentState}),i[t]=e[t]})):be(i.content,e)}function Se(t=[],e,i){for(const n of t)if(\"component\"===n.type)Object.keys(e).forEach((t=>{if(`${de}${t}`in n.componentState)return n[t]=n.componentState[`${de}${t}`],void delete n.componentState[`${de}${t}`];n[t]=e[t]}));else{if(n.size&&(\"row\"===i||\"column\"===i)){n[\"row\"===i?\"width\":\"height\"]=n.size?.includes(\".\")?parseFloat(n.size):parseInt(n.size)}Se(n.content,e,n.type)}}function Ee(t){if(t.root){t.root.content&&Se([t.root],{componentName:\"view\",isClosable:!0});const e=t.root;t.content=[e],delete t.root}return t}const xe=e=>class extends e{connectedCallback(){if(!this.name||!this.uuid)throw new Error(\" Name or uuid attribute missing\");if(!this.src)throw new Error(\" missing 'src' attribute.\");this.#t||(this.#t=document.createElement(\"iframe\"),this.#t.src=this.src,this.#t.style.height=\"100%\",this.#t.style.width=\"100%\",this.#t.style.border=\"none\",this.forceFrameName?this.#t.setAttribute(\"name\",this.forceFrameName):this.#t.setAttribute(\"name\",t.encodeOptions({brokerUrl:this.brokerUrl,name:this.name,uuid:this.uuid,providerId:this.providerId,contextGroup:this.contextGroup},\"of-frame\")),this.#t.setAttribute(\"id\",this.name),this.appendChild(this.#t))}#t;get brokerUrl(){return this.getAttribute(\"of-broker\")}set brokerUrl(t){t&&this.setAttribute(\"of-broker\",t)}get name(){return this.getAttribute(\"of-name\")}set name(t){t&&this.setAttribute(\"of-name\",t)}get forceFrameName(){return this.getAttribute(\"forceFrameName\")}set forceFrameName(t){t&&this.setAttribute(\"forceFrameName\",t)}get uuid(){return this.getAttribute(\"of-uuid\")}set uuid(t){t&&this.setAttribute(\"of-uuid\",t)}get src(){return this.getAttribute(\"src\")}set src(t){t&&this.setAttribute(\"src\",t)}get providerId(){return this.getAttribute(\"of-provider-id\")}set providerId(t){t&&this.setAttribute(\"of-provider-id\",t)}get contextGroup(){return this.getAttribute(\"of-context-group\")}set contextGroup(t){t&&this.setAttribute(\"of-context-group\",t)}static get observedAttributes(){return[\"name\"]}};class Le{static create(t){const e=document.createElement(\"of-view\");return Object.entries(t).forEach((([t,i])=>{e.setAttribute(t,i)})),e}}customElements.define(\"of-view\",xe(HTMLElement));class ze{constructor(t,i,n,{brokerUrl:o,interopConfig:s},r){this.container=t,this.config=i,this.ofView=null,this.isDragging=()=>this.container.tab.element?.className.includes(\"lm_dragging\")??!1;const{url:a,web:l,interop:h,name:d}=i||{},c=d??`internal-generated-view-${e.v4()}`;if(this.identity={uuid:n,name:c},this.container.element.setAttribute(\"of-name\",c),this.container.element.id=`container-${c}`,this.container.parent.id=c,void 0===a)return void this.handleUrlMissing();const m=this.updateTitleIfNotSet(a),u={\"of-broker\":o,\"of-uuid\":n,\"of-name\":c,src:a};l?.frameName&&(u.forceFrameName=l.frameName);const p=h?.currentContextGroup??s?.currentContextGroup;p&&(u[\"of-context-group\"]=p),s?.providerId&&(u[\"of-provider-id\"]=s?.providerId),this.ofView=Le.create(u),this.ofView.title=m??`Iframe: ${a}`,r.appendChild(this.ofView),this.ofView.style.position=\"absolute\"}updateTitleIfNotSet(t){return\"view\"===this.container.parent.title&&this.container.parent.setTitle(t),this.container.parent.title}handleUrlMissing(){const t=document.createElement(\"div\");t.setAttribute(\"style\",\"padding: 20px\");t.innerText=\"No URL provided\",this.container.element.appendChild(t)}destroy(){this.ofView?.remove(),this.ofView=null}closeView(){this.container.close()}resize(){if(this.ofView){if(this.isDragging())return void(this.ofView.style.display=\"none\");const t=this.container.element.getBoundingClientRect();this.ofView.style.position=\"absolute\",this.ofView.style.height=`${t.height}px`,this.ofView.style.width=`${t.width}px`,this.ofView.style.inset=`${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`,this.ofView.style.display=\"block\"}}}class Me extends U{static overrideConfig(t){const e={...ue,...t.settings,...pe};return e.reorderEnabled?be(t.content,{isClosable:!0}):be(t.content,{reorderEnabled:!1}),{dimensions:me,...t,settings:e,header:{...ce,show:!1!==t.settings?.hasHeaders&&ce.show}}}constructor(t,e,i,{options:n},o,s){super(),this.identity=t,this.container=e,this.initialConfig=i,this.layoutManager=o,this.platformProvider=s,this.viewComponentsByContainerElement=new Map,this.layoutContentCache=_.getSingleInstance(),this.reparentingViews=new Set,this.goldenLayoutDestroyed=!1,this.createViewComponent=(t,e)=>{m.handleSharedView(this.layoutManager,this.identity,e);const i=new ze(t,e,this.identity.uuid,this.options,this.iframeContainer);return e&&!1===e[`${de}isClosable`]&&this.stylesheet.insertRule(`#tab-${i.identity.name} .lm_close_tab { display: none; }`),this.viewComponentsByContainerElement.set(t.element,i),this.resizeController.observeContainer(t.element),i},this.iframeContainer=document.createElement(\"div\"),this.iframeContainer.id=`openfin-layout-iframe-container-${this.identity.layoutName}`,this.domEmitter=new V(e),this.setupStylesheets(),this.layout=new he(this.container),this.layout.resizeWithContainerAutomatically=!0,this.options=n,this.layout.registerComponent(\"view\",this.createViewComponent),this.setupListeners(),this.resizeController=new ve(this),this.layout.loadLayout(Me.overrideConfig(i));const r=document.createElement(\"div\");r.id=`openfin-layout-shadow-container-${this.identity.layoutName}`,r.attachShadow({mode:\"open\",delegatesFocus:!1}).appendChild(this.iframeContainer),this.container.appendChild(r),this.resizeController.observeMutations(this.container)}getStackByView({name:t}){const e=this.layout.findFirstComponentItemById(t);if(e?.parent&&e?.parent?.isStack)return Ie.wrap(e.parent,this)}getRoot(){return Ie.wrap(this.layout.rootItem,this)}async platformCloseView(t){const e=[...this.viewComponentsByContainerElement.values()].find((e=>e.identity.name===t.name));if(!e)throw new Error(`View with name: ${t.name} not found in layout.`);e.closeView()}async platformCreateView(t,{location:e,targetView:i}={}){if(i)throw new Error(\"TargetView not supported in web\");const n={options:this.platformProvider.normalizeOptions(t),target:this.identity,location:e};return this.insertView(n)}setupStylesheets(){if(this.container.setAttribute(\"data-openfin-layout-name\",this.identity.layoutName),this.stylesheet=new CSSStyleSheet,this.stylesheet.insertRule(\".lm_close { display: none; }\"),document.adoptedStyleSheets.push(this.stylesheet),this.initialConfig.settings?.preventSplitterResize){const t=`\\n [data-openfin-layout-name='${this.identity.layoutName}'] .lm_splitter {\\n pointer-events: none;\\n }`;this.stylesheet.insertRule(t)}}insertView({options:t,location:e,targetView:i}){const n=e?this.layoutContentCache.getItemOrUndefined(e.id):void 0,o=i?this.layoutContentCache.getItemOrUndefined(i.name):void 0,s=n??o??Ie.wrap(this.layout.rootItem,this);let r;if(ee.isStack(s.raw))r=s.raw;else{if(!we(s.raw))throw new Error(\"Cannot add a view at the requested location\");r=s.raw.newItem({type:\"stack\",content:[]})}const a=Math.min(r.contentItems.length,e?.index??r.contentItems.length);let l=this.layout.findFirstComponentItemById(t.name);l?(l.parent&&l.parent.removeChild(l,!0),r.addChild(l,a)):l=r.newComponent(\"view\",t,t.title??t.url??\"Default Title\",a);const h=l.component.identity;return Promise.resolve({identity:h})}replaceView({viewToReplace:t,newView:e}){throw new Error(\"Method not implemented.\")}replaceLayout(t){throw new Error(\"Method not implemented.\")}async cleanupView(t){}applyPreset(t){throw new Error(\"Method not implemented.\")}getCurrentViews(){return[...this.viewComponentsByContainerElement.values()].map((t=>t.identity))}async getFrameSnapshot(){return Ee(xt.fromResolved(this.layout.toConfig()))}isVisible(){return W(this.container)}async onViewDetached({viewIdentity:t}){this.reparentingViews.add(t.name),this.platformCloseView(t)}async destroy(){this.goldenLayoutDestroyed||(this.goldenLayoutDestroyed=!0,this.layout.destroy()),this.iframeContainer.remove(),this.resizeController.destroy(),document.adoptedStyleSheets=document.adoptedStyleSheets.filter((t=>t!==this.stylesheet)),this.viewComponentsByContainerElement.clear()}setupListeners(){this.container.addEventListener(\"pointerdown\",(t=>{if(t.target instanceof HTMLElement){const e=t.target.classList;[\"lm_tab\",\"lm_title\",\"lm_splitter\",\"lm_drag_handle\"].some((t=>e.contains(t)))&&(this.handleDragStart(),2===t.button&&t.stopPropagation())}}),!0),document.addEventListener(\"pointerup\",(()=>this.handleDragEnd()),!0),this.layout.on(\"tabCreated\",(t=>{const e=t.componentItem.component;t.element.id=`tab-${e.identity.name}`,this.domEmitter.dispatchLocalEvent(\"tab-created\",e.identity)})),this.layout.on(\"itemCreated\",(({target:t})=>{const e=t;if(Gt.isComponentItem(e)){const t=e.component;this.domEmitter.dispatchLocalEvent(\"container-created\",t.identity)}})),this.layout.on(\"itemDestroyed\",(t=>{const e=t.target;if(Gt.isComponentItem(e)){const t=e.component;this.removeViewComponent(t)}})),this.layout.on(\"itemDropped\",(()=>{this.handleDragEnd()}))}handleDragStart(){this.iframeContainer.style.pointerEvents=\"none\"}handleDragEnd(){this.iframeContainer.style.pointerEvents=\"\"}removeViewComponent(t){if(t.config&&!1===t.config[`${de}isClosable`]){const e=[...this.stylesheet.cssRules].findIndex((e=>e.cssText.includes(`#tab-${t.identity.name}`)));this.stylesheet.deleteRule(e)}t.destroy(),this.viewComponentsByContainerElement.delete(t.container.element),this.resizeController.unobserveContainer(t.container.element),this.reparentingViews.has(t.identity.name)?this.reparentingViews.delete(t.identity.name):this.platformProvider.closeView(t.identity.name);0===this.getCurrentViews().length&&(this.goldenLayoutDestroyed||(this.goldenLayoutDestroyed=!0,m.handleLastViewRemoved(this.layoutManager,this.identity)))}}class Pe{constructor(t,e,i,n){this.windowIdentity=t,this.connectConfig=e,this.provider=i,this.fallbackContainer=n}async createLayout(t,e){if(!(\"container\"in t)&&!this.fallbackContainer)throw new Error(\"Container property is not optional in web\");const{layoutName:i}=t,n=t,o=this.provider.initLayoutViews(n),s=n.container??this.fallbackContainer,r={...this.windowIdentity,layoutName:i},a=new Me(r,s,o,this.connectConfig,e,this.provider);m.registerLayout(e,i,a),this.fallbackContainer=null}async getLayoutSnapshot(t){return t.getLayoutSnapshot()}async handleLastViewRemoved(t){}}class Te{static async init(e){const i=e.getFin().InterApplicationBus.Channel,n=await i.create(`custom-frame-${e.me.uuid}`);return n.setDefaultAction((async(t,{target:e,opts:i},o)=>{const s=n.connections.find((t=>t.name===e.name));if(s)return n.dispatch(s,t,{...i,target:e});throw new Error(`Client with name ${e.name} not found`)})),await t.relayChannelClientApi_1(n,\"layout-relay\"),new Te(e)}constructor(t){this.wire=t,this.viewNames=new Set}normalizeOptions(t,i=\"default\"){const n=this.wire.me.uuid;let{name:o=`internal-generated-view-${e.v4()}`}=t;return o.match(/^internal-generated-view-/)&&this.viewNames.has(o)&&\"duplicate\"===i&&(o=`internal-generated-view-${e.v4()}`),this.viewNames.add(o),{...t,name:o,uuid:n}}closeView(t){this.viewNames.delete(t)}initLayoutViews({layout:t,multiInstanceViewBehavior:e}){return H((t=>{if(\"component\"===t.type&&t.componentState){const i=this.normalizeOptions(t.componentState,e);return{...t,componentState:i}}return t}),t)}}var Ae;const ke=t=>t;Ae=new WeakMap,exports.WebLayoutEntryPoint=class{constructor(e){Ae.set(this,void 0),this.initLayoutManager=async(e,i,{container:n,layoutManagerOverride:o})=>{const s=await Te.init(i),r=o??ke,a=new Pe(i.me,t.__classPrivateFieldGet(this,Ae,\"f\"),s,n),l=new(r(m.createClosedConstructor(a)));return await M(i,l),l},this.applyLayoutSnapshot=async(e,i,n)=>{await i.applyLayoutSnapshot(t.__classPrivateFieldGet(this,Ae,\"f\").platform.layoutSnapshot)},this.createLayout=async(t,e)=>m.createLayout(t,e),this.destroyLayout=async(t,e)=>m.destroyLayout(t,e),t.__classPrivateFieldSet(this,Ae,e,\"f\")}};\n","'use strict'\n\nexports.byteLength = byteLength\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\nfor (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i]\n revLookup[code.charCodeAt(i)] = i\n}\n\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction getLens (b64) {\n var len = b64.length\n\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // Trim off extra bytes after placeholder bytes are found\n // See: https://github.com/beatgammit/base64-js/issues/42\n var validLen = b64.indexOf('=')\n if (validLen === -1) validLen = len\n\n var placeHoldersLen = validLen === len\n ? 0\n : 4 - (validLen % 4)\n\n return [validLen, placeHoldersLen]\n}\n\n// base64 is 4/3 + up to two characters of the original data\nfunction byteLength (b64) {\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction _byteLength (b64, validLen, placeHoldersLen) {\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction toByteArray (b64) {\n var tmp\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n\n var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))\n\n var curByte = 0\n\n // if there are placeholders, only get up to the last complete 4 chars\n var len = placeHoldersLen > 0\n ? validLen - 4\n : validLen\n\n var i\n for (i = 0; i < len; i += 4) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 18) |\n (revLookup[b64.charCodeAt(i + 1)] << 12) |\n (revLookup[b64.charCodeAt(i + 2)] << 6) |\n revLookup[b64.charCodeAt(i + 3)]\n arr[curByte++] = (tmp >> 16) & 0xFF\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 2) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 2) |\n (revLookup[b64.charCodeAt(i + 1)] >> 4)\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 1) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 10) |\n (revLookup[b64.charCodeAt(i + 1)] << 4) |\n (revLookup[b64.charCodeAt(i + 2)] >> 2)\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] +\n lookup[num >> 12 & 0x3F] +\n lookup[num >> 6 & 0x3F] +\n lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n var tmp\n var output = []\n for (var i = start; i < end; i += 3) {\n tmp =\n ((uint8[i] << 16) & 0xFF0000) +\n ((uint8[i + 1] << 8) & 0xFF00) +\n (uint8[i + 2] & 0xFF)\n output.push(tripletToBase64(tmp))\n }\n return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n var tmp\n var len = uint8.length\n var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n var parts = []\n var maxChunkLength = 16383 // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1]\n parts.push(\n lookup[tmp >> 2] +\n lookup[(tmp << 4) & 0x3F] +\n '=='\n )\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + uint8[len - 1]\n parts.push(\n lookup[tmp >> 10] +\n lookup[(tmp >> 4) & 0x3F] +\n lookup[(tmp << 2) & 0x3F] +\n '='\n )\n }\n\n return parts.join('')\n}\n","/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n/* eslint-disable no-proto */\n\n'use strict'\n\nconst base64 = require('base64-js')\nconst ieee754 = require('ieee754')\nconst customInspectSymbol =\n (typeof Symbol === 'function' && typeof Symbol['for'] === 'function') // eslint-disable-line dot-notation\n ? Symbol['for']('nodejs.util.inspect.custom') // eslint-disable-line dot-notation\n : null\n\nexports.Buffer = Buffer\nexports.SlowBuffer = SlowBuffer\nexports.INSPECT_MAX_BYTES = 50\n\nconst K_MAX_LENGTH = 0x7fffffff\nexports.kMaxLength = K_MAX_LENGTH\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Print warning and recommend using `buffer` v4.x which has an Object\n * implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * We report that the browser does not support typed arrays if the are not subclassable\n * using __proto__. Firefox 4-29 lacks support for adding new properties to `Uint8Array`\n * (See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438). IE 10 lacks support\n * for __proto__ and has a buggy typed array implementation.\n */\nBuffer.TYPED_ARRAY_SUPPORT = typedArraySupport()\n\nif (!Buffer.TYPED_ARRAY_SUPPORT && typeof console !== 'undefined' &&\n typeof console.error === 'function') {\n console.error(\n 'This browser lacks typed array (Uint8Array) support which is required by ' +\n '`buffer` v5.x. Use `buffer` v4.x if you require old browser support.'\n )\n}\n\nfunction typedArraySupport () {\n // Can typed array instances can be augmented?\n try {\n const arr = new Uint8Array(1)\n const proto = { foo: function () { return 42 } }\n Object.setPrototypeOf(proto, Uint8Array.prototype)\n Object.setPrototypeOf(arr, proto)\n return arr.foo() === 42\n } catch (e) {\n return false\n }\n}\n\nObject.defineProperty(Buffer.prototype, 'parent', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.buffer\n }\n})\n\nObject.defineProperty(Buffer.prototype, 'offset', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.byteOffset\n }\n})\n\nfunction createBuffer (length) {\n if (length > K_MAX_LENGTH) {\n throw new RangeError('The value \"' + length + '\" is invalid for option \"size\"')\n }\n // Return an augmented `Uint8Array` instance\n const buf = new Uint8Array(length)\n Object.setPrototypeOf(buf, Buffer.prototype)\n return buf\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new TypeError(\n 'The \"string\" argument must be of type string. Received type number'\n )\n }\n return allocUnsafe(arg)\n }\n return from(arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\nfunction from (value, encodingOrOffset, length) {\n if (typeof value === 'string') {\n return fromString(value, encodingOrOffset)\n }\n\n if (ArrayBuffer.isView(value)) {\n return fromArrayView(value)\n }\n\n if (value == null) {\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n }\n\n if (isInstance(value, ArrayBuffer) ||\n (value && isInstance(value.buffer, ArrayBuffer))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof SharedArrayBuffer !== 'undefined' &&\n (isInstance(value, SharedArrayBuffer) ||\n (value && isInstance(value.buffer, SharedArrayBuffer)))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof value === 'number') {\n throw new TypeError(\n 'The \"value\" argument must not be of type number. Received type number'\n )\n }\n\n const valueOf = value.valueOf && value.valueOf()\n if (valueOf != null && valueOf !== value) {\n return Buffer.from(valueOf, encodingOrOffset, length)\n }\n\n const b = fromObject(value)\n if (b) return b\n\n if (typeof Symbol !== 'undefined' && Symbol.toPrimitive != null &&\n typeof value[Symbol.toPrimitive] === 'function') {\n return Buffer.from(value[Symbol.toPrimitive]('string'), encodingOrOffset, length)\n }\n\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n return from(value, encodingOrOffset, length)\n}\n\n// Note: Change prototype *after* Buffer.from is defined to workaround Chrome bug:\n// https://github.com/feross/buffer/pull/148\nObject.setPrototypeOf(Buffer.prototype, Uint8Array.prototype)\nObject.setPrototypeOf(Buffer, Uint8Array)\n\nfunction assertSize (size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be of type number')\n } else if (size < 0) {\n throw new RangeError('The value \"' + size + '\" is invalid for option \"size\"')\n }\n}\n\nfunction alloc (size, fill, encoding) {\n assertSize(size)\n if (size <= 0) {\n return createBuffer(size)\n }\n if (fill !== undefined) {\n // Only pay attention to encoding if it's a string. This\n // prevents accidentally sending in a number that would\n // be interpreted as a start offset.\n return typeof encoding === 'string'\n ? createBuffer(size).fill(fill, encoding)\n : createBuffer(size).fill(fill)\n }\n return createBuffer(size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n return alloc(size, fill, encoding)\n}\n\nfunction allocUnsafe (size) {\n assertSize(size)\n return createBuffer(size < 0 ? 0 : checked(size) | 0)\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n return allocUnsafe(size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n return allocUnsafe(size)\n}\n\nfunction fromString (string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8'\n }\n\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n\n const length = byteLength(string, encoding) | 0\n let buf = createBuffer(length)\n\n const actual = buf.write(string, encoding)\n\n if (actual !== length) {\n // Writing a hex string, for example, that contains invalid characters will\n // cause everything after the first invalid character to be ignored. (e.g.\n // 'abxxcd' will be treated as 'ab')\n buf = buf.slice(0, actual)\n }\n\n return buf\n}\n\nfunction fromArrayLike (array) {\n const length = array.length < 0 ? 0 : checked(array.length) | 0\n const buf = createBuffer(length)\n for (let i = 0; i < length; i += 1) {\n buf[i] = array[i] & 255\n }\n return buf\n}\n\nfunction fromArrayView (arrayView) {\n if (isInstance(arrayView, Uint8Array)) {\n const copy = new Uint8Array(arrayView)\n return fromArrayBuffer(copy.buffer, copy.byteOffset, copy.byteLength)\n }\n return fromArrayLike(arrayView)\n}\n\nfunction fromArrayBuffer (array, byteOffset, length) {\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\"offset\" is outside of buffer bounds')\n }\n\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\"length\" is outside of buffer bounds')\n }\n\n let buf\n if (byteOffset === undefined && length === undefined) {\n buf = new Uint8Array(array)\n } else if (length === undefined) {\n buf = new Uint8Array(array, byteOffset)\n } else {\n buf = new Uint8Array(array, byteOffset, length)\n }\n\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(buf, Buffer.prototype)\n\n return buf\n}\n\nfunction fromObject (obj) {\n if (Buffer.isBuffer(obj)) {\n const len = checked(obj.length) | 0\n const buf = createBuffer(len)\n\n if (buf.length === 0) {\n return buf\n }\n\n obj.copy(buf, 0, 0, len)\n return buf\n }\n\n if (obj.length !== undefined) {\n if (typeof obj.length !== 'number' || numberIsNaN(obj.length)) {\n return createBuffer(0)\n }\n return fromArrayLike(obj)\n }\n\n if (obj.type === 'Buffer' && Array.isArray(obj.data)) {\n return fromArrayLike(obj.data)\n }\n}\n\nfunction checked (length) {\n // Note: cannot use `length < K_MAX_LENGTH` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= K_MAX_LENGTH) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + K_MAX_LENGTH.toString(16) + ' bytes')\n }\n return length | 0\n}\n\nfunction SlowBuffer (length) {\n if (+length != length) { // eslint-disable-line eqeqeq\n length = 0\n }\n return Buffer.alloc(+length)\n}\n\nBuffer.isBuffer = function isBuffer (b) {\n return b != null && b._isBuffer === true &&\n b !== Buffer.prototype // so Buffer.isBuffer(Buffer.prototype) will be false\n}\n\nBuffer.compare = function compare (a, b) {\n if (isInstance(a, Uint8Array)) a = Buffer.from(a, a.offset, a.byteLength)\n if (isInstance(b, Uint8Array)) b = Buffer.from(b, b.offset, b.byteLength)\n if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n throw new TypeError(\n 'The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array'\n )\n }\n\n if (a === b) return 0\n\n let x = a.length\n let y = b.length\n\n for (let i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i]\n y = b[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n switch (String(encoding).toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'latin1':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return true\n default:\n return false\n }\n}\n\nBuffer.concat = function concat (list, length) {\n if (!Array.isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n\n if (list.length === 0) {\n return Buffer.alloc(0)\n }\n\n let i\n if (length === undefined) {\n length = 0\n for (i = 0; i < list.length; ++i) {\n length += list[i].length\n }\n }\n\n const buffer = Buffer.allocUnsafe(length)\n let pos = 0\n for (i = 0; i < list.length; ++i) {\n let buf = list[i]\n if (isInstance(buf, Uint8Array)) {\n if (pos + buf.length > buffer.length) {\n if (!Buffer.isBuffer(buf)) buf = Buffer.from(buf)\n buf.copy(buffer, pos)\n } else {\n Uint8Array.prototype.set.call(\n buffer,\n buf,\n pos\n )\n }\n } else if (!Buffer.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n } else {\n buf.copy(buffer, pos)\n }\n pos += buf.length\n }\n return buffer\n}\n\nfunction byteLength (string, encoding) {\n if (Buffer.isBuffer(string)) {\n return string.length\n }\n if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) {\n return string.byteLength\n }\n if (typeof string !== 'string') {\n throw new TypeError(\n 'The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. ' +\n 'Received type ' + typeof string\n )\n }\n\n const len = string.length\n const mustMatch = (arguments.length > 2 && arguments[2] === true)\n if (!mustMatch && len === 0) return 0\n\n // Use a for loop to avoid recursion\n let loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'ascii':\n case 'latin1':\n case 'binary':\n return len\n case 'utf8':\n case 'utf-8':\n return utf8ToBytes(string).length\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return len * 2\n case 'hex':\n return len >>> 1\n case 'base64':\n return base64ToBytes(string).length\n default:\n if (loweredCase) {\n return mustMatch ? -1 : utf8ToBytes(string).length // assume utf8\n }\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n let loweredCase = false\n\n // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n // property of a typed array.\n\n // This behaves neither like String nor Uint8Array in that we set start/end\n // to their upper/lower bounds if the value passed is out of range.\n // undefined is handled specially as per ECMA-262 6th Edition,\n // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n if (start === undefined || start < 0) {\n start = 0\n }\n // Return early if start > this.length. Done here to prevent potential uint32\n // coercion fail below.\n if (start > this.length) {\n return ''\n }\n\n if (end === undefined || end > this.length) {\n end = this.length\n }\n\n if (end <= 0) {\n return ''\n }\n\n // Force coercion to uint32. This will also coerce falsey/NaN values to 0.\n end >>>= 0\n start >>>= 0\n\n if (end <= start) {\n return ''\n }\n\n if (!encoding) encoding = 'utf8'\n\n while (true) {\n switch (encoding) {\n case 'hex':\n return hexSlice(this, start, end)\n\n case 'utf8':\n case 'utf-8':\n return utf8Slice(this, start, end)\n\n case 'ascii':\n return asciiSlice(this, start, end)\n\n case 'latin1':\n case 'binary':\n return latin1Slice(this, start, end)\n\n case 'base64':\n return base64Slice(this, start, end)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return utf16leSlice(this, start, end)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = (encoding + '').toLowerCase()\n loweredCase = true\n }\n }\n}\n\n// This property is used by `Buffer.isBuffer` (and the `is-buffer` npm package)\n// to detect a Buffer instance. It's not possible to use `instanceof Buffer`\n// reliably in a browserify context because there could be multiple different\n// copies of the 'buffer' package in use. This method works even for Buffer\n// instances that were created from another copy of the `buffer` package.\n// See: https://github.com/feross/buffer/issues/154\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n const i = b[n]\n b[n] = b[m]\n b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n const len = this.length\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits')\n }\n for (let i = 0; i < len; i += 2) {\n swap(this, i, i + 1)\n }\n return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n const len = this.length\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits')\n }\n for (let i = 0; i < len; i += 4) {\n swap(this, i, i + 3)\n swap(this, i + 1, i + 2)\n }\n return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n const len = this.length\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits')\n }\n for (let i = 0; i < len; i += 8) {\n swap(this, i, i + 7)\n swap(this, i + 1, i + 6)\n swap(this, i + 2, i + 5)\n swap(this, i + 3, i + 4)\n }\n return this\n}\n\nBuffer.prototype.toString = function toString () {\n const length = this.length\n if (length === 0) return ''\n if (arguments.length === 0) return utf8Slice(this, 0, length)\n return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.toLocaleString = Buffer.prototype.toString\n\nBuffer.prototype.equals = function equals (b) {\n if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n if (this === b) return true\n return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n let str = ''\n const max = exports.INSPECT_MAX_BYTES\n str = this.toString('hex', 0, max).replace(/(.{2})/g, '$1 ').trim()\n if (this.length > max) str += ' ... '\n return ''\n}\nif (customInspectSymbol) {\n Buffer.prototype[customInspectSymbol] = Buffer.prototype.inspect\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n if (isInstance(target, Uint8Array)) {\n target = Buffer.from(target, target.offset, target.byteLength)\n }\n if (!Buffer.isBuffer(target)) {\n throw new TypeError(\n 'The \"target\" argument must be one of type Buffer or Uint8Array. ' +\n 'Received type ' + (typeof target)\n )\n }\n\n if (start === undefined) {\n start = 0\n }\n if (end === undefined) {\n end = target ? target.length : 0\n }\n if (thisStart === undefined) {\n thisStart = 0\n }\n if (thisEnd === undefined) {\n thisEnd = this.length\n }\n\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError('out of range index')\n }\n\n if (thisStart >= thisEnd && start >= end) {\n return 0\n }\n if (thisStart >= thisEnd) {\n return -1\n }\n if (start >= end) {\n return 1\n }\n\n start >>>= 0\n end >>>= 0\n thisStart >>>= 0\n thisEnd >>>= 0\n\n if (this === target) return 0\n\n let x = thisEnd - thisStart\n let y = end - start\n const len = Math.min(x, y)\n\n const thisCopy = this.slice(thisStart, thisEnd)\n const targetCopy = target.slice(start, end)\n\n for (let i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i]\n y = targetCopy[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (numberIsNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [val], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n let indexSize = 1\n let arrLength = arr.length\n let valLength = val.length\n\n if (encoding !== undefined) {\n encoding = String(encoding).toLowerCase()\n if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n encoding === 'utf16le' || encoding === 'utf-16le') {\n if (arr.length < 2 || val.length < 2) {\n return -1\n }\n indexSize = 2\n arrLength /= 2\n valLength /= 2\n byteOffset /= 2\n }\n }\n\n function read (buf, i) {\n if (indexSize === 1) {\n return buf[i]\n } else {\n return buf.readUInt16BE(i * indexSize)\n }\n }\n\n let i\n if (dir) {\n let foundIndex = -1\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1) foundIndex = i\n if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n } else {\n if (foundIndex !== -1) i -= i - foundIndex\n foundIndex = -1\n }\n }\n } else {\n if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n for (i = byteOffset; i >= 0; i--) {\n let found = true\n for (let j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false\n break\n }\n }\n if (found) return i\n }\n }\n\n return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n offset = Number(offset) || 0\n const remaining = buf.length - offset\n if (!length) {\n length = remaining\n } else {\n length = Number(length)\n if (length > remaining) {\n length = remaining\n }\n }\n\n const strLen = string.length\n\n if (length > strLen / 2) {\n length = strLen / 2\n }\n let i\n for (i = 0; i < length; ++i) {\n const parsed = parseInt(string.substr(i * 2, 2), 16)\n if (numberIsNaN(parsed)) return i\n buf[offset + i] = parsed\n }\n return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n // Buffer#write(string)\n if (offset === undefined) {\n encoding = 'utf8'\n length = this.length\n offset = 0\n // Buffer#write(string, encoding)\n } else if (length === undefined && typeof offset === 'string') {\n encoding = offset\n length = this.length\n offset = 0\n // Buffer#write(string, offset[, length][, encoding])\n } else if (isFinite(offset)) {\n offset = offset >>> 0\n if (isFinite(length)) {\n length = length >>> 0\n if (encoding === undefined) encoding = 'utf8'\n } else {\n encoding = length\n length = undefined\n }\n } else {\n throw new Error(\n 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n )\n }\n\n const remaining = this.length - offset\n if (length === undefined || length > remaining) length = remaining\n\n if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n throw new RangeError('Attempt to write outside buffer bounds')\n }\n\n if (!encoding) encoding = 'utf8'\n\n let loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'hex':\n return hexWrite(this, string, offset, length)\n\n case 'utf8':\n case 'utf-8':\n return utf8Write(this, string, offset, length)\n\n case 'ascii':\n case 'latin1':\n case 'binary':\n return asciiWrite(this, string, offset, length)\n\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return base64Write(this, string, offset, length)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return ucs2Write(this, string, offset, length)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0)\n }\n}\n\nfunction base64Slice (buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf)\n } else {\n return base64.fromByteArray(buf.slice(start, end))\n }\n}\n\nfunction utf8Slice (buf, start, end) {\n end = Math.min(buf.length, end)\n const res = []\n\n let i = start\n while (i < end) {\n const firstByte = buf[i]\n let codePoint = null\n let bytesPerSequence = (firstByte > 0xEF)\n ? 4\n : (firstByte > 0xDF)\n ? 3\n : (firstByte > 0xBF)\n ? 2\n : 1\n\n if (i + bytesPerSequence <= end) {\n let secondByte, thirdByte, fourthByte, tempCodePoint\n\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 0x80) {\n codePoint = firstByte\n }\n break\n case 2:\n secondByte = buf[i + 1]\n if ((secondByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n if (tempCodePoint > 0x7F) {\n codePoint = tempCodePoint\n }\n }\n break\n case 3:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n codePoint = tempCodePoint\n }\n }\n break\n case 4:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n fourthByte = buf[i + 3]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n codePoint = tempCodePoint\n }\n }\n }\n }\n\n if (codePoint === null) {\n // we did not generate a valid codePoint so insert a\n // replacement char (U+FFFD) and advance only 1 byte\n codePoint = 0xFFFD\n bytesPerSequence = 1\n } else if (codePoint > 0xFFFF) {\n // encode to utf16 (surrogate pair dance)\n codePoint -= 0x10000\n res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n codePoint = 0xDC00 | codePoint & 0x3FF\n }\n\n res.push(codePoint)\n i += bytesPerSequence\n }\n\n return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nconst MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n const len = codePoints.length\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n }\n\n // Decode in chunks to avoid \"call stack size exceeded\".\n let res = ''\n let i = 0\n while (i < len) {\n res += String.fromCharCode.apply(\n String,\n codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n )\n }\n return res\n}\n\nfunction asciiSlice (buf, start, end) {\n let ret = ''\n end = Math.min(buf.length, end)\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F)\n }\n return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n let ret = ''\n end = Math.min(buf.length, end)\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i])\n }\n return ret\n}\n\nfunction hexSlice (buf, start, end) {\n const len = buf.length\n\n if (!start || start < 0) start = 0\n if (!end || end < 0 || end > len) end = len\n\n let out = ''\n for (let i = start; i < end; ++i) {\n out += hexSliceLookupTable[buf[i]]\n }\n return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n const bytes = buf.slice(start, end)\n let res = ''\n // If bytes.length is odd, the last 8 bits must be ignored (same as node.js)\n for (let i = 0; i < bytes.length - 1; i += 2) {\n res += String.fromCharCode(bytes[i] + (bytes[i + 1] * 256))\n }\n return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n const len = this.length\n start = ~~start\n end = end === undefined ? len : ~~end\n\n if (start < 0) {\n start += len\n if (start < 0) start = 0\n } else if (start > len) {\n start = len\n }\n\n if (end < 0) {\n end += len\n if (end < 0) end = 0\n } else if (end > len) {\n end = len\n }\n\n if (end < start) end = start\n\n const newBuf = this.subarray(start, end)\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(newBuf, Buffer.prototype)\n\n return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUintLE =\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let val = this[offset]\n let mul = 1\n let i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUintBE =\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n checkOffset(offset, byteLength, this.length)\n }\n\n let val = this[offset + --byteLength]\n let mul = 1\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUint8 =\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n return this[offset]\n}\n\nBuffer.prototype.readUint16LE =\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUint16BE =\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUint32LE =\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return ((this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16)) +\n (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUint32BE =\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] * 0x1000000) +\n ((this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n this[offset + 3])\n}\n\nBuffer.prototype.readBigUInt64LE = defineBigIntMethod(function readBigUInt64LE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const lo = first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24\n\n const hi = this[++offset] +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n last * 2 ** 24\n\n return BigInt(lo) + (BigInt(hi) << BigInt(32))\n})\n\nBuffer.prototype.readBigUInt64BE = defineBigIntMethod(function readBigUInt64BE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const hi = first * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset]\n\n const lo = this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last\n\n return (BigInt(hi) << BigInt(32)) + BigInt(lo)\n})\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let val = this[offset]\n let mul = 1\n let i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let i = byteLength\n let mul = 1\n let val = this[offset + --i]\n while (i > 0 && (mul *= 0x100)) {\n val += this[offset + --i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n if (!(this[offset] & 0x80)) return (this[offset])\n return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n const val = this[offset] | (this[offset + 1] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n const val = this[offset + 1] | (this[offset] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16) |\n (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] << 24) |\n (this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n (this[offset + 3])\n}\n\nBuffer.prototype.readBigInt64LE = defineBigIntMethod(function readBigInt64LE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const val = this[offset + 4] +\n this[offset + 5] * 2 ** 8 +\n this[offset + 6] * 2 ** 16 +\n (last << 24) // Overflow\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24)\n})\n\nBuffer.prototype.readBigInt64BE = defineBigIntMethod(function readBigInt64BE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const val = (first << 24) + // Overflow\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset]\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last)\n})\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUintLE =\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n let mul = 1\n let i = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUintBE =\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n let i = byteLength - 1\n let mul = 1\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUint8 =\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeUint16LE =\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeUint16BE =\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeUint32LE =\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset + 3] = (value >>> 24)\n this[offset + 2] = (value >>> 16)\n this[offset + 1] = (value >>> 8)\n this[offset] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeUint32BE =\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nfunction wrtBigUInt64LE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7)\n\n let lo = Number(value & BigInt(0xffffffff))\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n return offset\n}\n\nfunction wrtBigUInt64BE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7)\n\n let lo = Number(value & BigInt(0xffffffff))\n buf[offset + 7] = lo\n lo = lo >> 8\n buf[offset + 6] = lo\n lo = lo >> 8\n buf[offset + 5] = lo\n lo = lo >> 8\n buf[offset + 4] = lo\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n buf[offset + 3] = hi\n hi = hi >> 8\n buf[offset + 2] = hi\n hi = hi >> 8\n buf[offset + 1] = hi\n hi = hi >> 8\n buf[offset] = hi\n return offset + 8\n}\n\nBuffer.prototype.writeBigUInt64LE = defineBigIntMethod(function writeBigUInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeBigUInt64BE = defineBigIntMethod(function writeBigUInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n let i = 0\n let mul = 1\n let sub = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n let i = byteLength - 1\n let mul = 1\n let sub = 0\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n if (value < 0) value = 0xff + value + 1\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n this[offset + 2] = (value >>> 16)\n this[offset + 3] = (value >>> 24)\n return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (value < 0) value = 0xffffffff + value + 1\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeBigInt64LE = defineBigIntMethod(function writeBigInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nBuffer.prototype.writeBigInt64BE = defineBigIntMethod(function writeBigInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n }\n ieee754.write(buf, value, offset, littleEndian, 23, 4)\n return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n }\n ieee754.write(buf, value, offset, littleEndian, 52, 8)\n return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n if (!Buffer.isBuffer(target)) throw new TypeError('argument should be a Buffer')\n if (!start) start = 0\n if (!end && end !== 0) end = this.length\n if (targetStart >= target.length) targetStart = target.length\n if (!targetStart) targetStart = 0\n if (end > 0 && end < start) end = start\n\n // Copy 0 bytes; we're done\n if (end === start) return 0\n if (target.length === 0 || this.length === 0) return 0\n\n // Fatal error conditions\n if (targetStart < 0) {\n throw new RangeError('targetStart out of bounds')\n }\n if (start < 0 || start >= this.length) throw new RangeError('Index out of range')\n if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n // Are we oob?\n if (end > this.length) end = this.length\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start\n }\n\n const len = end - start\n\n if (this === target && typeof Uint8Array.prototype.copyWithin === 'function') {\n // Use built-in when available, missing from IE11\n this.copyWithin(targetStart, start, end)\n } else {\n Uint8Array.prototype.set.call(\n target,\n this.subarray(start, end),\n targetStart\n )\n }\n\n return len\n}\n\n// Usage:\n// buffer.fill(number[, offset[, end]])\n// buffer.fill(buffer[, offset[, end]])\n// buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n // Handle string cases:\n if (typeof val === 'string') {\n if (typeof start === 'string') {\n encoding = start\n start = 0\n end = this.length\n } else if (typeof end === 'string') {\n encoding = end\n end = this.length\n }\n if (encoding !== undefined && typeof encoding !== 'string') {\n throw new TypeError('encoding must be a string')\n }\n if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n if (val.length === 1) {\n const code = val.charCodeAt(0)\n if ((encoding === 'utf8' && code < 128) ||\n encoding === 'latin1') {\n // Fast path: If `val` fits into a single byte, use that numeric value.\n val = code\n }\n }\n } else if (typeof val === 'number') {\n val = val & 255\n } else if (typeof val === 'boolean') {\n val = Number(val)\n }\n\n // Invalid ranges are not set to a default, so can range check early.\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError('Out of range index')\n }\n\n if (end <= start) {\n return this\n }\n\n start = start >>> 0\n end = end === undefined ? this.length : end >>> 0\n\n if (!val) val = 0\n\n let i\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val\n }\n } else {\n const bytes = Buffer.isBuffer(val)\n ? val\n : Buffer.from(val, encoding)\n const len = bytes.length\n if (len === 0) {\n throw new TypeError('The value \"' + val +\n '\" is invalid for argument \"value\"')\n }\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len]\n }\n }\n\n return this\n}\n\n// CUSTOM ERRORS\n// =============\n\n// Simplified versions from Node, changed for Buffer-only usage\nconst errors = {}\nfunction E (sym, getMessage, Base) {\n errors[sym] = class NodeError extends Base {\n constructor () {\n super()\n\n Object.defineProperty(this, 'message', {\n value: getMessage.apply(this, arguments),\n writable: true,\n configurable: true\n })\n\n // Add the error code to the name to include it in the stack trace.\n this.name = `${this.name} [${sym}]`\n // Access the stack to generate the error message including the error code\n // from the name.\n this.stack // eslint-disable-line no-unused-expressions\n // Reset the name to the actual name.\n delete this.name\n }\n\n get code () {\n return sym\n }\n\n set code (value) {\n Object.defineProperty(this, 'code', {\n configurable: true,\n enumerable: true,\n value,\n writable: true\n })\n }\n\n toString () {\n return `${this.name} [${sym}]: ${this.message}`\n }\n }\n}\n\nE('ERR_BUFFER_OUT_OF_BOUNDS',\n function (name) {\n if (name) {\n return `${name} is outside of buffer bounds`\n }\n\n return 'Attempt to access memory outside buffer bounds'\n }, RangeError)\nE('ERR_INVALID_ARG_TYPE',\n function (name, actual) {\n return `The \"${name}\" argument must be of type number. Received type ${typeof actual}`\n }, TypeError)\nE('ERR_OUT_OF_RANGE',\n function (str, range, input) {\n let msg = `The value of \"${str}\" is out of range.`\n let received = input\n if (Number.isInteger(input) && Math.abs(input) > 2 ** 32) {\n received = addNumericalSeparator(String(input))\n } else if (typeof input === 'bigint') {\n received = String(input)\n if (input > BigInt(2) ** BigInt(32) || input < -(BigInt(2) ** BigInt(32))) {\n received = addNumericalSeparator(received)\n }\n received += 'n'\n }\n msg += ` It must be ${range}. Received ${received}`\n return msg\n }, RangeError)\n\nfunction addNumericalSeparator (val) {\n let res = ''\n let i = val.length\n const start = val[0] === '-' ? 1 : 0\n for (; i >= start + 4; i -= 3) {\n res = `_${val.slice(i - 3, i)}${res}`\n }\n return `${val.slice(0, i)}${res}`\n}\n\n// CHECK FUNCTIONS\n// ===============\n\nfunction checkBounds (buf, offset, byteLength) {\n validateNumber(offset, 'offset')\n if (buf[offset] === undefined || buf[offset + byteLength] === undefined) {\n boundsError(offset, buf.length - (byteLength + 1))\n }\n}\n\nfunction checkIntBI (value, min, max, buf, offset, byteLength) {\n if (value > max || value < min) {\n const n = typeof min === 'bigint' ? 'n' : ''\n let range\n if (byteLength > 3) {\n if (min === 0 || min === BigInt(0)) {\n range = `>= 0${n} and < 2${n} ** ${(byteLength + 1) * 8}${n}`\n } else {\n range = `>= -(2${n} ** ${(byteLength + 1) * 8 - 1}${n}) and < 2 ** ` +\n `${(byteLength + 1) * 8 - 1}${n}`\n }\n } else {\n range = `>= ${min}${n} and <= ${max}${n}`\n }\n throw new errors.ERR_OUT_OF_RANGE('value', range, value)\n }\n checkBounds(buf, offset, byteLength)\n}\n\nfunction validateNumber (value, name) {\n if (typeof value !== 'number') {\n throw new errors.ERR_INVALID_ARG_TYPE(name, 'number', value)\n }\n}\n\nfunction boundsError (value, length, type) {\n if (Math.floor(value) !== value) {\n validateNumber(value, type)\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset', 'an integer', value)\n }\n\n if (length < 0) {\n throw new errors.ERR_BUFFER_OUT_OF_BOUNDS()\n }\n\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset',\n `>= ${type ? 1 : 0} and <= ${length}`,\n value)\n}\n\n// HELPER FUNCTIONS\n// ================\n\nconst INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n // Node takes equal signs as end of the Base64 encoding\n str = str.split('=')[0]\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = str.trim().replace(INVALID_BASE64_RE, '')\n // Node converts strings with length < 2 to ''\n if (str.length < 2) return ''\n // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n while (str.length % 4 !== 0) {\n str = str + '='\n }\n return str\n}\n\nfunction utf8ToBytes (string, units) {\n units = units || Infinity\n let codePoint\n const length = string.length\n let leadSurrogate = null\n const bytes = []\n\n for (let i = 0; i < length; ++i) {\n codePoint = string.charCodeAt(i)\n\n // is surrogate component\n if (codePoint > 0xD7FF && codePoint < 0xE000) {\n // last char was a lead\n if (!leadSurrogate) {\n // no lead yet\n if (codePoint > 0xDBFF) {\n // unexpected trail\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n } else if (i + 1 === length) {\n // unpaired lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n }\n\n // valid lead\n leadSurrogate = codePoint\n\n continue\n }\n\n // 2 leads in a row\n if (codePoint < 0xDC00) {\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n leadSurrogate = codePoint\n continue\n }\n\n // valid surrogate pair\n codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n } else if (leadSurrogate) {\n // valid bmp char, but last char was a lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n }\n\n leadSurrogate = null\n\n // encode utf8\n if (codePoint < 0x80) {\n if ((units -= 1) < 0) break\n bytes.push(codePoint)\n } else if (codePoint < 0x800) {\n if ((units -= 2) < 0) break\n bytes.push(\n codePoint >> 0x6 | 0xC0,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x10000) {\n if ((units -= 3) < 0) break\n bytes.push(\n codePoint >> 0xC | 0xE0,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x110000) {\n if ((units -= 4) < 0) break\n bytes.push(\n codePoint >> 0x12 | 0xF0,\n codePoint >> 0xC & 0x3F | 0x80,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else {\n throw new Error('Invalid code point')\n }\n }\n\n return bytes\n}\n\nfunction asciiToBytes (str) {\n const byteArray = []\n for (let i = 0; i < str.length; ++i) {\n // Node's code seems to be doing this and not & 0x7F..\n byteArray.push(str.charCodeAt(i) & 0xFF)\n }\n return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n let c, hi, lo\n const byteArray = []\n for (let i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0) break\n\n c = str.charCodeAt(i)\n hi = c >> 8\n lo = c % 256\n byteArray.push(lo)\n byteArray.push(hi)\n }\n\n return byteArray\n}\n\nfunction base64ToBytes (str) {\n return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n let i\n for (i = 0; i < length; ++i) {\n if ((i + offset >= dst.length) || (i >= src.length)) break\n dst[i + offset] = src[i]\n }\n return i\n}\n\n// ArrayBuffer or Uint8Array objects from other contexts (i.e. iframes) do not pass\n// the `instanceof` check but they should be treated as of that type.\n// See: https://github.com/feross/buffer/issues/166\nfunction isInstance (obj, type) {\n return obj instanceof type ||\n (obj != null && obj.constructor != null && obj.constructor.name != null &&\n obj.constructor.name === type.name)\n}\nfunction numberIsNaN (obj) {\n // For IE11 support\n return obj !== obj // eslint-disable-line no-self-compare\n}\n\n// Create lookup table for `toString('hex')`\n// See: https://github.com/feross/buffer/issues/219\nconst hexSliceLookupTable = (function () {\n const alphabet = '0123456789abcdef'\n const table = new Array(256)\n for (let i = 0; i < 16; ++i) {\n const i16 = i * 16\n for (let j = 0; j < 16; ++j) {\n table[i16 + j] = alphabet[i] + alphabet[j]\n }\n }\n return table\n})()\n\n// Return not function with Error if BigInt not supported\nfunction defineBigIntMethod (fn) {\n return typeof BigInt === 'undefined' ? BufferBigIntNotDefined : fn\n}\n\nfunction BufferBigIntNotDefined () {\n throw new Error('BigInt not supported')\n}\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\nvar R = typeof Reflect === 'object' ? Reflect : null\nvar ReflectApply = R && typeof R.apply === 'function'\n ? R.apply\n : function ReflectApply(target, receiver, args) {\n return Function.prototype.apply.call(target, receiver, args);\n }\n\nvar ReflectOwnKeys\nif (R && typeof R.ownKeys === 'function') {\n ReflectOwnKeys = R.ownKeys\n} else if (Object.getOwnPropertySymbols) {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target)\n .concat(Object.getOwnPropertySymbols(target));\n };\n} else {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target);\n };\n}\n\nfunction ProcessEmitWarning(warning) {\n if (console && console.warn) console.warn(warning);\n}\n\nvar NumberIsNaN = Number.isNaN || function NumberIsNaN(value) {\n return value !== value;\n}\n\nfunction EventEmitter() {\n EventEmitter.init.call(this);\n}\nmodule.exports = EventEmitter;\nmodule.exports.once = once;\n\n// Backwards-compat with node 0.10.x\nEventEmitter.EventEmitter = EventEmitter;\n\nEventEmitter.prototype._events = undefined;\nEventEmitter.prototype._eventsCount = 0;\nEventEmitter.prototype._maxListeners = undefined;\n\n// By default EventEmitters will print a warning if more than 10 listeners are\n// added to it. This is a useful default which helps finding memory leaks.\nvar defaultMaxListeners = 10;\n\nfunction checkListener(listener) {\n if (typeof listener !== 'function') {\n throw new TypeError('The \"listener\" argument must be of type Function. Received type ' + typeof listener);\n }\n}\n\nObject.defineProperty(EventEmitter, 'defaultMaxListeners', {\n enumerable: true,\n get: function() {\n return defaultMaxListeners;\n },\n set: function(arg) {\n if (typeof arg !== 'number' || arg < 0 || NumberIsNaN(arg)) {\n throw new RangeError('The value of \"defaultMaxListeners\" is out of range. It must be a non-negative number. Received ' + arg + '.');\n }\n defaultMaxListeners = arg;\n }\n});\n\nEventEmitter.init = function() {\n\n if (this._events === undefined ||\n this._events === Object.getPrototypeOf(this)._events) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n }\n\n this._maxListeners = this._maxListeners || undefined;\n};\n\n// Obviously not all Emitters should be limited to 10. This function allows\n// that to be increased. Set to zero for unlimited.\nEventEmitter.prototype.setMaxListeners = function setMaxListeners(n) {\n if (typeof n !== 'number' || n < 0 || NumberIsNaN(n)) {\n throw new RangeError('The value of \"n\" is out of range. It must be a non-negative number. Received ' + n + '.');\n }\n this._maxListeners = n;\n return this;\n};\n\nfunction _getMaxListeners(that) {\n if (that._maxListeners === undefined)\n return EventEmitter.defaultMaxListeners;\n return that._maxListeners;\n}\n\nEventEmitter.prototype.getMaxListeners = function getMaxListeners() {\n return _getMaxListeners(this);\n};\n\nEventEmitter.prototype.emit = function emit(type) {\n var args = [];\n for (var i = 1; i < arguments.length; i++) args.push(arguments[i]);\n var doError = (type === 'error');\n\n var events = this._events;\n if (events !== undefined)\n doError = (doError && events.error === undefined);\n else if (!doError)\n return false;\n\n // If there is no 'error' event listener then throw.\n if (doError) {\n var er;\n if (args.length > 0)\n er = args[0];\n if (er instanceof Error) {\n // Note: The comments on the `throw` lines are intentional, they show\n // up in Node's output if this results in an unhandled exception.\n throw er; // Unhandled 'error' event\n }\n // At least give some kind of context to the user\n var err = new Error('Unhandled error.' + (er ? ' (' + er.message + ')' : ''));\n err.context = er;\n throw err; // Unhandled 'error' event\n }\n\n var handler = events[type];\n\n if (handler === undefined)\n return false;\n\n if (typeof handler === 'function') {\n ReflectApply(handler, this, args);\n } else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n ReflectApply(listeners[i], this, args);\n }\n\n return true;\n};\n\nfunction _addListener(target, type, listener, prepend) {\n var m;\n var events;\n var existing;\n\n checkListener(listener);\n\n events = target._events;\n if (events === undefined) {\n events = target._events = Object.create(null);\n target._eventsCount = 0;\n } else {\n // To avoid recursion in the case that type === \"newListener\"! Before\n // adding it to the listeners, first emit \"newListener\".\n if (events.newListener !== undefined) {\n target.emit('newListener', type,\n listener.listener ? listener.listener : listener);\n\n // Re-assign `events` because a newListener handler could have caused the\n // this._events to be assigned to a new object\n events = target._events;\n }\n existing = events[type];\n }\n\n if (existing === undefined) {\n // Optimize the case of one listener. Don't need the extra array object.\n existing = events[type] = listener;\n ++target._eventsCount;\n } else {\n if (typeof existing === 'function') {\n // Adding the second element, need to change to array.\n existing = events[type] =\n prepend ? [listener, existing] : [existing, listener];\n // If we've already got an array, just append.\n } else if (prepend) {\n existing.unshift(listener);\n } else {\n existing.push(listener);\n }\n\n // Check for listener leak\n m = _getMaxListeners(target);\n if (m > 0 && existing.length > m && !existing.warned) {\n existing.warned = true;\n // No error code for this since it is a Warning\n // eslint-disable-next-line no-restricted-syntax\n var w = new Error('Possible EventEmitter memory leak detected. ' +\n existing.length + ' ' + String(type) + ' listeners ' +\n 'added. Use emitter.setMaxListeners() to ' +\n 'increase limit');\n w.name = 'MaxListenersExceededWarning';\n w.emitter = target;\n w.type = type;\n w.count = existing.length;\n ProcessEmitWarning(w);\n }\n }\n\n return target;\n}\n\nEventEmitter.prototype.addListener = function addListener(type, listener) {\n return _addListener(this, type, listener, false);\n};\n\nEventEmitter.prototype.on = EventEmitter.prototype.addListener;\n\nEventEmitter.prototype.prependListener =\n function prependListener(type, listener) {\n return _addListener(this, type, listener, true);\n };\n\nfunction onceWrapper() {\n if (!this.fired) {\n this.target.removeListener(this.type, this.wrapFn);\n this.fired = true;\n if (arguments.length === 0)\n return this.listener.call(this.target);\n return this.listener.apply(this.target, arguments);\n }\n}\n\nfunction _onceWrap(target, type, listener) {\n var state = { fired: false, wrapFn: undefined, target: target, type: type, listener: listener };\n var wrapped = onceWrapper.bind(state);\n wrapped.listener = listener;\n state.wrapFn = wrapped;\n return wrapped;\n}\n\nEventEmitter.prototype.once = function once(type, listener) {\n checkListener(listener);\n this.on(type, _onceWrap(this, type, listener));\n return this;\n};\n\nEventEmitter.prototype.prependOnceListener =\n function prependOnceListener(type, listener) {\n checkListener(listener);\n this.prependListener(type, _onceWrap(this, type, listener));\n return this;\n };\n\n// Emits a 'removeListener' event if and only if the listener was removed.\nEventEmitter.prototype.removeListener =\n function removeListener(type, listener) {\n var list, events, position, i, originalListener;\n\n checkListener(listener);\n\n events = this._events;\n if (events === undefined)\n return this;\n\n list = events[type];\n if (list === undefined)\n return this;\n\n if (list === listener || list.listener === listener) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else {\n delete events[type];\n if (events.removeListener)\n this.emit('removeListener', type, list.listener || listener);\n }\n } else if (typeof list !== 'function') {\n position = -1;\n\n for (i = list.length - 1; i >= 0; i--) {\n if (list[i] === listener || list[i].listener === listener) {\n originalListener = list[i].listener;\n position = i;\n break;\n }\n }\n\n if (position < 0)\n return this;\n\n if (position === 0)\n list.shift();\n else {\n spliceOne(list, position);\n }\n\n if (list.length === 1)\n events[type] = list[0];\n\n if (events.removeListener !== undefined)\n this.emit('removeListener', type, originalListener || listener);\n }\n\n return this;\n };\n\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\n\nEventEmitter.prototype.removeAllListeners =\n function removeAllListeners(type) {\n var listeners, events, i;\n\n events = this._events;\n if (events === undefined)\n return this;\n\n // not listening for removeListener, no need to emit\n if (events.removeListener === undefined) {\n if (arguments.length === 0) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n } else if (events[type] !== undefined) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else\n delete events[type];\n }\n return this;\n }\n\n // emit removeListener for all listeners on all events\n if (arguments.length === 0) {\n var keys = Object.keys(events);\n var key;\n for (i = 0; i < keys.length; ++i) {\n key = keys[i];\n if (key === 'removeListener') continue;\n this.removeAllListeners(key);\n }\n this.removeAllListeners('removeListener');\n this._events = Object.create(null);\n this._eventsCount = 0;\n return this;\n }\n\n listeners = events[type];\n\n if (typeof listeners === 'function') {\n this.removeListener(type, listeners);\n } else if (listeners !== undefined) {\n // LIFO order\n for (i = listeners.length - 1; i >= 0; i--) {\n this.removeListener(type, listeners[i]);\n }\n }\n\n return this;\n };\n\nfunction _listeners(target, type, unwrap) {\n var events = target._events;\n\n if (events === undefined)\n return [];\n\n var evlistener = events[type];\n if (evlistener === undefined)\n return [];\n\n if (typeof evlistener === 'function')\n return unwrap ? [evlistener.listener || evlistener] : [evlistener];\n\n return unwrap ?\n unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length);\n}\n\nEventEmitter.prototype.listeners = function listeners(type) {\n return _listeners(this, type, true);\n};\n\nEventEmitter.prototype.rawListeners = function rawListeners(type) {\n return _listeners(this, type, false);\n};\n\nEventEmitter.listenerCount = function(emitter, type) {\n if (typeof emitter.listenerCount === 'function') {\n return emitter.listenerCount(type);\n } else {\n return listenerCount.call(emitter, type);\n }\n};\n\nEventEmitter.prototype.listenerCount = listenerCount;\nfunction listenerCount(type) {\n var events = this._events;\n\n if (events !== undefined) {\n var evlistener = events[type];\n\n if (typeof evlistener === 'function') {\n return 1;\n } else if (evlistener !== undefined) {\n return evlistener.length;\n }\n }\n\n return 0;\n}\n\nEventEmitter.prototype.eventNames = function eventNames() {\n return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : [];\n};\n\nfunction arrayClone(arr, n) {\n var copy = new Array(n);\n for (var i = 0; i < n; ++i)\n copy[i] = arr[i];\n return copy;\n}\n\nfunction spliceOne(list, index) {\n for (; index + 1 < list.length; index++)\n list[index] = list[index + 1];\n list.pop();\n}\n\nfunction unwrapListeners(arr) {\n var ret = new Array(arr.length);\n for (var i = 0; i < ret.length; ++i) {\n ret[i] = arr[i].listener || arr[i];\n }\n return ret;\n}\n\nfunction once(emitter, name) {\n return new Promise(function (resolve, reject) {\n function errorListener(err) {\n emitter.removeListener(name, resolver);\n reject(err);\n }\n\n function resolver() {\n if (typeof emitter.removeListener === 'function') {\n emitter.removeListener('error', errorListener);\n }\n resolve([].slice.call(arguments));\n };\n\n eventTargetAgnosticAddListener(emitter, name, resolver, { once: true });\n if (name !== 'error') {\n addErrorHandlerIfEventEmitter(emitter, errorListener, { once: true });\n }\n });\n}\n\nfunction addErrorHandlerIfEventEmitter(emitter, handler, flags) {\n if (typeof emitter.on === 'function') {\n eventTargetAgnosticAddListener(emitter, 'error', handler, flags);\n }\n}\n\nfunction eventTargetAgnosticAddListener(emitter, name, listener, flags) {\n if (typeof emitter.on === 'function') {\n if (flags.once) {\n emitter.once(name, listener);\n } else {\n emitter.on(name, listener);\n }\n } else if (typeof emitter.addEventListener === 'function') {\n // EventTarget does not have `error` event semantics like Node\n // EventEmitters, we do not listen for `error` events here.\n emitter.addEventListener(name, function wrapListener(arg) {\n // IE does not have builtin `{ once: true }` support so we\n // have to do it manually.\n if (flags.once) {\n emitter.removeEventListener(name, wrapListener);\n }\n listener(arg);\n });\n } else {\n throw new TypeError('The \"emitter\" argument must be of type EventEmitter. Received type ' + typeof emitter);\n }\n}\n","/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */\nexports.read = function (buffer, offset, isLE, mLen, nBytes) {\n var e, m\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var nBits = -7\n var i = isLE ? (nBytes - 1) : 0\n var d = isLE ? -1 : 1\n var s = buffer[offset + i]\n\n i += d\n\n e = s & ((1 << (-nBits)) - 1)\n s >>= (-nBits)\n nBits += eLen\n for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & ((1 << (-nBits)) - 1)\n e >>= (-nBits)\n nBits += mLen\n for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias\n } else if (e === eMax) {\n return m ? NaN : ((s ? -1 : 1) * Infinity)\n } else {\n m = m + Math.pow(2, mLen)\n e = e - eBias\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n var i = isLE ? 0 : (nBytes - 1)\n var d = isLE ? 1 : -1\n var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n value = Math.abs(value)\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0\n e = eMax\n } else {\n e = Math.floor(Math.log(value) / Math.LN2)\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--\n c *= 2\n }\n if (e + eBias >= 1) {\n value += rt / c\n } else {\n value += rt * Math.pow(2, 1 - eBias)\n }\n if (value * c >= 2) {\n e++\n c /= 2\n }\n\n if (e + eBias >= eMax) {\n m = 0\n e = eMax\n } else if (e + eBias >= 1) {\n m = ((value * c) - 1) * Math.pow(2, mLen)\n e = e + eBias\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n e = 0\n }\n }\n\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n e = (e << mLen) | m\n eLen += mLen\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128\n}\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView');\n\nmodule.exports = DataView;\n","var hashClear = require('./_hashClear'),\n hashDelete = require('./_hashDelete'),\n hashGet = require('./_hashGet'),\n hashHas = require('./_hashHas'),\n hashSet = require('./_hashSet');\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\nmodule.exports = Hash;\n","var listCacheClear = require('./_listCacheClear'),\n listCacheDelete = require('./_listCacheDelete'),\n listCacheGet = require('./_listCacheGet'),\n listCacheHas = require('./_listCacheHas'),\n listCacheSet = require('./_listCacheSet');\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\nmodule.exports = ListCache;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map');\n\nmodule.exports = Map;\n","var mapCacheClear = require('./_mapCacheClear'),\n mapCacheDelete = require('./_mapCacheDelete'),\n mapCacheGet = require('./_mapCacheGet'),\n mapCacheHas = require('./_mapCacheHas'),\n mapCacheSet = require('./_mapCacheSet');\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\nmodule.exports = MapCache;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Promise = getNative(root, 'Promise');\n\nmodule.exports = Promise;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Set = getNative(root, 'Set');\n\nmodule.exports = Set;\n","var MapCache = require('./_MapCache'),\n setCacheAdd = require('./_setCacheAdd'),\n setCacheHas = require('./_setCacheHas');\n\n/**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\nfunction SetCache(values) {\n var index = -1,\n length = values == null ? 0 : values.length;\n\n this.__data__ = new MapCache;\n while (++index < length) {\n this.add(values[index]);\n }\n}\n\n// Add methods to `SetCache`.\nSetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\nSetCache.prototype.has = setCacheHas;\n\nmodule.exports = SetCache;\n","var ListCache = require('./_ListCache'),\n stackClear = require('./_stackClear'),\n stackDelete = require('./_stackDelete'),\n stackGet = require('./_stackGet'),\n stackHas = require('./_stackHas'),\n stackSet = require('./_stackSet');\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\nmodule.exports = Stack;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Uint8Array = root.Uint8Array;\n\nmodule.exports = Uint8Array;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar WeakMap = getNative(root, 'WeakMap');\n\nmodule.exports = WeakMap;\n","/**\n * A specialized version of `_.forEach` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\nfunction arrayEach(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (iteratee(array[index], index, array) === false) {\n break;\n }\n }\n return array;\n}\n\nmodule.exports = arrayEach;\n","/**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\nfunction arrayFilter(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result[resIndex++] = value;\n }\n }\n return result;\n}\n\nmodule.exports = arrayFilter;\n","var baseTimes = require('./_baseTimes'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isIndex = require('./_isIndex'),\n isTypedArray = require('./isTypedArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = arrayLikeKeys;\n","/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n}\n\nmodule.exports = arrayPush;\n","/**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\nfunction arraySome(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (predicate(array[index], index, array)) {\n return true;\n }\n }\n return false;\n}\n\nmodule.exports = arraySome;\n","var baseAssignValue = require('./_baseAssignValue'),\n eq = require('./eq');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\nmodule.exports = assignValue;\n","var eq = require('./eq');\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\nmodule.exports = assocIndexOf;\n","var copyObject = require('./_copyObject'),\n keys = require('./keys');\n\n/**\n * The base implementation of `_.assign` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssign(object, source) {\n return object && copyObject(source, keys(source), object);\n}\n\nmodule.exports = baseAssign;\n","var copyObject = require('./_copyObject'),\n keysIn = require('./keysIn');\n\n/**\n * The base implementation of `_.assignIn` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssignIn(object, source) {\n return object && copyObject(source, keysIn(source), object);\n}\n\nmodule.exports = baseAssignIn;\n","var defineProperty = require('./_defineProperty');\n\n/**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction baseAssignValue(object, key, value) {\n if (key == '__proto__' && defineProperty) {\n defineProperty(object, key, {\n 'configurable': true,\n 'enumerable': true,\n 'value': value,\n 'writable': true\n });\n } else {\n object[key] = value;\n }\n}\n\nmodule.exports = baseAssignValue;\n","var Stack = require('./_Stack'),\n arrayEach = require('./_arrayEach'),\n assignValue = require('./_assignValue'),\n baseAssign = require('./_baseAssign'),\n baseAssignIn = require('./_baseAssignIn'),\n cloneBuffer = require('./_cloneBuffer'),\n copyArray = require('./_copyArray'),\n copySymbols = require('./_copySymbols'),\n copySymbolsIn = require('./_copySymbolsIn'),\n getAllKeys = require('./_getAllKeys'),\n getAllKeysIn = require('./_getAllKeysIn'),\n getTag = require('./_getTag'),\n initCloneArray = require('./_initCloneArray'),\n initCloneByTag = require('./_initCloneByTag'),\n initCloneObject = require('./_initCloneObject'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isMap = require('./isMap'),\n isObject = require('./isObject'),\n isSet = require('./isSet'),\n keys = require('./keys'),\n keysIn = require('./keysIn');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_FLAT_FLAG = 2,\n CLONE_SYMBOLS_FLAG = 4;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values supported by `_.clone`. */\nvar cloneableTags = {};\ncloneableTags[argsTag] = cloneableTags[arrayTag] =\ncloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =\ncloneableTags[boolTag] = cloneableTags[dateTag] =\ncloneableTags[float32Tag] = cloneableTags[float64Tag] =\ncloneableTags[int8Tag] = cloneableTags[int16Tag] =\ncloneableTags[int32Tag] = cloneableTags[mapTag] =\ncloneableTags[numberTag] = cloneableTags[objectTag] =\ncloneableTags[regexpTag] = cloneableTags[setTag] =\ncloneableTags[stringTag] = cloneableTags[symbolTag] =\ncloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =\ncloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;\ncloneableTags[errorTag] = cloneableTags[funcTag] =\ncloneableTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.clone` and `_.cloneDeep` which tracks\n * traversed objects.\n *\n * @private\n * @param {*} value The value to clone.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Deep clone\n * 2 - Flatten inherited properties\n * 4 - Clone symbols\n * @param {Function} [customizer] The function to customize cloning.\n * @param {string} [key] The key of `value`.\n * @param {Object} [object] The parent object of `value`.\n * @param {Object} [stack] Tracks traversed objects and their clone counterparts.\n * @returns {*} Returns the cloned value.\n */\nfunction baseClone(value, bitmask, customizer, key, object, stack) {\n var result,\n isDeep = bitmask & CLONE_DEEP_FLAG,\n isFlat = bitmask & CLONE_FLAT_FLAG,\n isFull = bitmask & CLONE_SYMBOLS_FLAG;\n\n if (customizer) {\n result = object ? customizer(value, key, object, stack) : customizer(value);\n }\n if (result !== undefined) {\n return result;\n }\n if (!isObject(value)) {\n return value;\n }\n var isArr = isArray(value);\n if (isArr) {\n result = initCloneArray(value);\n if (!isDeep) {\n return copyArray(value, result);\n }\n } else {\n var tag = getTag(value),\n isFunc = tag == funcTag || tag == genTag;\n\n if (isBuffer(value)) {\n return cloneBuffer(value, isDeep);\n }\n if (tag == objectTag || tag == argsTag || (isFunc && !object)) {\n result = (isFlat || isFunc) ? {} : initCloneObject(value);\n if (!isDeep) {\n return isFlat\n ? copySymbolsIn(value, baseAssignIn(result, value))\n : copySymbols(value, baseAssign(result, value));\n }\n } else {\n if (!cloneableTags[tag]) {\n return object ? value : {};\n }\n result = initCloneByTag(value, tag, isDeep);\n }\n }\n // Check for circular references and return its corresponding clone.\n stack || (stack = new Stack);\n var stacked = stack.get(value);\n if (stacked) {\n return stacked;\n }\n stack.set(value, result);\n\n if (isSet(value)) {\n value.forEach(function(subValue) {\n result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));\n });\n } else if (isMap(value)) {\n value.forEach(function(subValue, key) {\n result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n }\n\n var keysFunc = isFull\n ? (isFlat ? getAllKeysIn : getAllKeys)\n : (isFlat ? keysIn : keys);\n\n var props = isArr ? undefined : keysFunc(value);\n arrayEach(props || value, function(subValue, key) {\n if (props) {\n key = subValue;\n subValue = value[key];\n }\n // Recursively populate clone (susceptible to call stack limits).\n assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n return result;\n}\n\nmodule.exports = baseClone;\n","var isObject = require('./isObject');\n\n/** Built-in value references. */\nvar objectCreate = Object.create;\n\n/**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} proto The object to inherit from.\n * @returns {Object} Returns the new object.\n */\nvar baseCreate = (function() {\n function object() {}\n return function(proto) {\n if (!isObject(proto)) {\n return {};\n }\n if (objectCreate) {\n return objectCreate(proto);\n }\n object.prototype = proto;\n var result = new object;\n object.prototype = undefined;\n return result;\n };\n}());\n\nmodule.exports = baseCreate;\n","var arrayPush = require('./_arrayPush'),\n isArray = require('./isArray');\n\n/**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction baseGetAllKeys(object, keysFunc, symbolsFunc) {\n var result = keysFunc(object);\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n}\n\nmodule.exports = baseGetAllKeys;\n","var Symbol = require('./_Symbol'),\n getRawTag = require('./_getRawTag'),\n objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]';\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\nmodule.exports = baseIsArguments;\n","var baseIsEqualDeep = require('./_baseIsEqualDeep'),\n isObjectLike = require('./isObjectLike');\n\n/**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Unordered comparison\n * 2 - Partial comparison\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\nfunction baseIsEqual(value, other, bitmask, customizer, stack) {\n if (value === other) {\n return true;\n }\n if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\n return value !== value && other !== other;\n }\n return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n}\n\nmodule.exports = baseIsEqual;\n","var Stack = require('./_Stack'),\n equalArrays = require('./_equalArrays'),\n equalByTag = require('./_equalByTag'),\n equalObjects = require('./_equalObjects'),\n getTag = require('./_getTag'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isTypedArray = require('./isTypedArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n var objIsArr = isArray(object),\n othIsArr = isArray(other),\n objTag = objIsArr ? arrayTag : getTag(object),\n othTag = othIsArr ? arrayTag : getTag(other);\n\n objTag = objTag == argsTag ? objectTag : objTag;\n othTag = othTag == argsTag ? objectTag : othTag;\n\n var objIsObj = objTag == objectTag,\n othIsObj = othTag == objectTag,\n isSameTag = objTag == othTag;\n\n if (isSameTag && isBuffer(object)) {\n if (!isBuffer(other)) {\n return false;\n }\n objIsArr = true;\n objIsObj = false;\n }\n if (isSameTag && !objIsObj) {\n stack || (stack = new Stack);\n return (objIsArr || isTypedArray(object))\n ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n }\n if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n if (objIsWrapped || othIsWrapped) {\n var objUnwrapped = objIsWrapped ? object.value() : object,\n othUnwrapped = othIsWrapped ? other.value() : other;\n\n stack || (stack = new Stack);\n return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n }\n }\n if (!isSameTag) {\n return false;\n }\n stack || (stack = new Stack);\n return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n}\n\nmodule.exports = baseIsEqualDeep;\n","var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]';\n\n/**\n * The base implementation of `_.isMap` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n */\nfunction baseIsMap(value) {\n return isObjectLike(value) && getTag(value) == mapTag;\n}\n\nmodule.exports = baseIsMap;\n","var isFunction = require('./isFunction'),\n isMasked = require('./_isMasked'),\n isObject = require('./isObject'),\n toSource = require('./_toSource');\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\nmodule.exports = baseIsNative;\n","var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar setTag = '[object Set]';\n\n/**\n * The base implementation of `_.isSet` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n */\nfunction baseIsSet(value) {\n return isObjectLike(value) && getTag(value) == setTag;\n}\n\nmodule.exports = baseIsSet;\n","var baseGetTag = require('./_baseGetTag'),\n isLength = require('./isLength'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n\nmodule.exports = baseIsTypedArray;\n","var isPrototype = require('./_isPrototype'),\n nativeKeys = require('./_nativeKeys');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeys;\n","var isObject = require('./isObject'),\n isPrototype = require('./_isPrototype'),\n nativeKeysIn = require('./_nativeKeysIn');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeysIn(object) {\n if (!isObject(object)) {\n return nativeKeysIn(object);\n }\n var isProto = isPrototype(object),\n result = [];\n\n for (var key in object) {\n if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeysIn;\n","/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\nmodule.exports = baseTimes;\n","/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n return function(value) {\n return func(value);\n };\n}\n\nmodule.exports = baseUnary;\n","/**\n * Checks if a `cache` value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction cacheHas(cache, key) {\n return cache.has(key);\n}\n\nmodule.exports = cacheHas;\n","var Uint8Array = require('./_Uint8Array');\n\n/**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\nfunction cloneArrayBuffer(arrayBuffer) {\n var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n return result;\n}\n\nmodule.exports = cloneArrayBuffer;\n","var root = require('./_root');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined,\n allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;\n\n/**\n * Creates a clone of `buffer`.\n *\n * @private\n * @param {Buffer} buffer The buffer to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Buffer} Returns the cloned buffer.\n */\nfunction cloneBuffer(buffer, isDeep) {\n if (isDeep) {\n return buffer.slice();\n }\n var length = buffer.length,\n result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\n\n buffer.copy(result);\n return result;\n}\n\nmodule.exports = cloneBuffer;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer');\n\n/**\n * Creates a clone of `dataView`.\n *\n * @private\n * @param {Object} dataView The data view to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned data view.\n */\nfunction cloneDataView(dataView, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;\n return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);\n}\n\nmodule.exports = cloneDataView;\n","/** Used to match `RegExp` flags from their coerced string values. */\nvar reFlags = /\\w*$/;\n\n/**\n * Creates a clone of `regexp`.\n *\n * @private\n * @param {Object} regexp The regexp to clone.\n * @returns {Object} Returns the cloned regexp.\n */\nfunction cloneRegExp(regexp) {\n var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));\n result.lastIndex = regexp.lastIndex;\n return result;\n}\n\nmodule.exports = cloneRegExp;\n","var Symbol = require('./_Symbol');\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * Creates a clone of the `symbol` object.\n *\n * @private\n * @param {Object} symbol The symbol object to clone.\n * @returns {Object} Returns the cloned symbol object.\n */\nfunction cloneSymbol(symbol) {\n return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};\n}\n\nmodule.exports = cloneSymbol;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer');\n\n/**\n * Creates a clone of `typedArray`.\n *\n * @private\n * @param {Object} typedArray The typed array to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned typed array.\n */\nfunction cloneTypedArray(typedArray, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n}\n\nmodule.exports = cloneTypedArray;\n","/**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\nfunction copyArray(source, array) {\n var index = -1,\n length = source.length;\n\n array || (array = Array(length));\n while (++index < length) {\n array[index] = source[index];\n }\n return array;\n}\n\nmodule.exports = copyArray;\n","var assignValue = require('./_assignValue'),\n baseAssignValue = require('./_baseAssignValue');\n\n/**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\nfunction copyObject(source, props, object, customizer) {\n var isNew = !object;\n object || (object = {});\n\n var index = -1,\n length = props.length;\n\n while (++index < length) {\n var key = props[index];\n\n var newValue = customizer\n ? customizer(object[key], source[key], key, object, source)\n : undefined;\n\n if (newValue === undefined) {\n newValue = source[key];\n }\n if (isNew) {\n baseAssignValue(object, key, newValue);\n } else {\n assignValue(object, key, newValue);\n }\n }\n return object;\n}\n\nmodule.exports = copyObject;\n","var copyObject = require('./_copyObject'),\n getSymbols = require('./_getSymbols');\n\n/**\n * Copies own symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbols(source, object) {\n return copyObject(source, getSymbols(source), object);\n}\n\nmodule.exports = copySymbols;\n","var copyObject = require('./_copyObject'),\n getSymbolsIn = require('./_getSymbolsIn');\n\n/**\n * Copies own and inherited symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbolsIn(source, object) {\n return copyObject(source, getSymbolsIn(source), object);\n}\n\nmodule.exports = copySymbolsIn;\n","var root = require('./_root');\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\nmodule.exports = coreJsData;\n","var getNative = require('./_getNative');\n\nvar defineProperty = (function() {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n}());\n\nmodule.exports = defineProperty;\n","var SetCache = require('./_SetCache'),\n arraySome = require('./_arraySome'),\n cacheHas = require('./_cacheHas');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\nfunction equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n arrLength = array.length,\n othLength = other.length;\n\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n return false;\n }\n // Check that cyclic values are equal.\n var arrStacked = stack.get(array);\n var othStacked = stack.get(other);\n if (arrStacked && othStacked) {\n return arrStacked == other && othStacked == array;\n }\n var index = -1,\n result = true,\n seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n stack.set(array, other);\n stack.set(other, array);\n\n // Ignore non-index properties.\n while (++index < arrLength) {\n var arrValue = array[index],\n othValue = other[index];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, arrValue, index, other, array, stack)\n : customizer(arrValue, othValue, index, array, other, stack);\n }\n if (compared !== undefined) {\n if (compared) {\n continue;\n }\n result = false;\n break;\n }\n // Recursively compare arrays (susceptible to call stack limits).\n if (seen) {\n if (!arraySome(other, function(othValue, othIndex) {\n if (!cacheHas(seen, othIndex) &&\n (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n return seen.push(othIndex);\n }\n })) {\n result = false;\n break;\n }\n } else if (!(\n arrValue === othValue ||\n equalFunc(arrValue, othValue, bitmask, customizer, stack)\n )) {\n result = false;\n break;\n }\n }\n stack['delete'](array);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalArrays;\n","var Symbol = require('./_Symbol'),\n Uint8Array = require('./_Uint8Array'),\n eq = require('./eq'),\n equalArrays = require('./_equalArrays'),\n mapToArray = require('./_mapToArray'),\n setToArray = require('./_setToArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]';\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n switch (tag) {\n case dataViewTag:\n if ((object.byteLength != other.byteLength) ||\n (object.byteOffset != other.byteOffset)) {\n return false;\n }\n object = object.buffer;\n other = other.buffer;\n\n case arrayBufferTag:\n if ((object.byteLength != other.byteLength) ||\n !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n return false;\n }\n return true;\n\n case boolTag:\n case dateTag:\n case numberTag:\n // Coerce booleans to `1` or `0` and dates to milliseconds.\n // Invalid dates are coerced to `NaN`.\n return eq(+object, +other);\n\n case errorTag:\n return object.name == other.name && object.message == other.message;\n\n case regexpTag:\n case stringTag:\n // Coerce regexes to strings and treat strings, primitives and objects,\n // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n // for more details.\n return object == (other + '');\n\n case mapTag:\n var convert = mapToArray;\n\n case setTag:\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n convert || (convert = setToArray);\n\n if (object.size != other.size && !isPartial) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked) {\n return stacked == other;\n }\n bitmask |= COMPARE_UNORDERED_FLAG;\n\n // Recursively compare objects (susceptible to call stack limits).\n stack.set(object, other);\n var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n stack['delete'](object);\n return result;\n\n case symbolTag:\n if (symbolValueOf) {\n return symbolValueOf.call(object) == symbolValueOf.call(other);\n }\n }\n return false;\n}\n\nmodule.exports = equalByTag;\n","var getAllKeys = require('./_getAllKeys');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n objProps = getAllKeys(object),\n objLength = objProps.length,\n othProps = getAllKeys(other),\n othLength = othProps.length;\n\n if (objLength != othLength && !isPartial) {\n return false;\n }\n var index = objLength;\n while (index--) {\n var key = objProps[index];\n if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n return false;\n }\n }\n // Check that cyclic values are equal.\n var objStacked = stack.get(object);\n var othStacked = stack.get(other);\n if (objStacked && othStacked) {\n return objStacked == other && othStacked == object;\n }\n var result = true;\n stack.set(object, other);\n stack.set(other, object);\n\n var skipCtor = isPartial;\n while (++index < objLength) {\n key = objProps[index];\n var objValue = object[key],\n othValue = other[key];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, objValue, key, other, object, stack)\n : customizer(objValue, othValue, key, object, other, stack);\n }\n // Recursively compare objects (susceptible to call stack limits).\n if (!(compared === undefined\n ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n : compared\n )) {\n result = false;\n break;\n }\n skipCtor || (skipCtor = key == 'constructor');\n }\n if (result && !skipCtor) {\n var objCtor = object.constructor,\n othCtor = other.constructor;\n\n // Non `Object` object instances with different constructors are not equal.\n if (objCtor != othCtor &&\n ('constructor' in object && 'constructor' in other) &&\n !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n result = false;\n }\n }\n stack['delete'](object);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalObjects;\n","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n","var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbols = require('./_getSymbols'),\n keys = require('./keys');\n\n/**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeys(object) {\n return baseGetAllKeys(object, keys, getSymbols);\n}\n\nmodule.exports = getAllKeys;\n","var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbolsIn = require('./_getSymbolsIn'),\n keysIn = require('./keysIn');\n\n/**\n * Creates an array of own and inherited enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeysIn(object) {\n return baseGetAllKeys(object, keysIn, getSymbolsIn);\n}\n\nmodule.exports = getAllKeysIn;\n","var isKeyable = require('./_isKeyable');\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\nmodule.exports = getMapData;\n","var baseIsNative = require('./_baseIsNative'),\n getValue = require('./_getValue');\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\nmodule.exports = getNative;\n","var overArg = require('./_overArg');\n\n/** Built-in value references. */\nvar getPrototype = overArg(Object.getPrototypeOf, Object);\n\nmodule.exports = getPrototype;\n","var Symbol = require('./_Symbol');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nmodule.exports = getRawTag;\n","var arrayFilter = require('./_arrayFilter'),\n stubArray = require('./stubArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n if (object == null) {\n return [];\n }\n object = Object(object);\n return arrayFilter(nativeGetSymbols(object), function(symbol) {\n return propertyIsEnumerable.call(object, symbol);\n });\n};\n\nmodule.exports = getSymbols;\n","var arrayPush = require('./_arrayPush'),\n getPrototype = require('./_getPrototype'),\n getSymbols = require('./_getSymbols'),\n stubArray = require('./stubArray');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own and inherited enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {\n var result = [];\n while (object) {\n arrayPush(result, getSymbols(object));\n object = getPrototype(object);\n }\n return result;\n};\n\nmodule.exports = getSymbolsIn;\n","var DataView = require('./_DataView'),\n Map = require('./_Map'),\n Promise = require('./_Promise'),\n Set = require('./_Set'),\n WeakMap = require('./_WeakMap'),\n baseGetTag = require('./_baseGetTag'),\n toSource = require('./_toSource');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n setTag = '[object Set]',\n weakMapTag = '[object WeakMap]';\n\nvar dataViewTag = '[object DataView]';\n\n/** Used to detect maps, sets, and weakmaps. */\nvar dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nvar getTag = baseGetTag;\n\n// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\nif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = baseGetTag(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : '';\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n}\n\nmodule.exports = getTag;\n","/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\nmodule.exports = getValue;\n","var nativeCreate = require('./_nativeCreate');\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n}\n\nmodule.exports = hashClear;\n","/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = hashDelete;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\nmodule.exports = hashGet;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\nmodule.exports = hashHas;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\nmodule.exports = hashSet;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Initializes an array clone.\n *\n * @private\n * @param {Array} array The array to clone.\n * @returns {Array} Returns the initialized clone.\n */\nfunction initCloneArray(array) {\n var length = array.length,\n result = new array.constructor(length);\n\n // Add properties assigned by `RegExp#exec`.\n if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {\n result.index = array.index;\n result.input = array.input;\n }\n return result;\n}\n\nmodule.exports = initCloneArray;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer'),\n cloneDataView = require('./_cloneDataView'),\n cloneRegExp = require('./_cloneRegExp'),\n cloneSymbol = require('./_cloneSymbol'),\n cloneTypedArray = require('./_cloneTypedArray');\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/**\n * Initializes an object clone based on its `toStringTag`.\n *\n * **Note:** This function only supports cloning values with tags of\n * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.\n *\n * @private\n * @param {Object} object The object to clone.\n * @param {string} tag The `toStringTag` of the object to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneByTag(object, tag, isDeep) {\n var Ctor = object.constructor;\n switch (tag) {\n case arrayBufferTag:\n return cloneArrayBuffer(object);\n\n case boolTag:\n case dateTag:\n return new Ctor(+object);\n\n case dataViewTag:\n return cloneDataView(object, isDeep);\n\n case float32Tag: case float64Tag:\n case int8Tag: case int16Tag: case int32Tag:\n case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:\n return cloneTypedArray(object, isDeep);\n\n case mapTag:\n return new Ctor;\n\n case numberTag:\n case stringTag:\n return new Ctor(object);\n\n case regexpTag:\n return cloneRegExp(object);\n\n case setTag:\n return new Ctor;\n\n case symbolTag:\n return cloneSymbol(object);\n }\n}\n\nmodule.exports = initCloneByTag;\n","var baseCreate = require('./_baseCreate'),\n getPrototype = require('./_getPrototype'),\n isPrototype = require('./_isPrototype');\n\n/**\n * Initializes an object clone.\n *\n * @private\n * @param {Object} object The object to clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneObject(object) {\n return (typeof object.constructor == 'function' && !isPrototype(object))\n ? baseCreate(getPrototype(object))\n : {};\n}\n\nmodule.exports = initCloneObject;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n var type = typeof value;\n length = length == null ? MAX_SAFE_INTEGER : length;\n\n return !!length &&\n (type == 'number' ||\n (type != 'symbol' && reIsUint.test(value))) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\nmodule.exports = isIndex;\n","/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\nmodule.exports = isKeyable;\n","var coreJsData = require('./_coreJsData');\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\nmodule.exports = isMasked;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\nmodule.exports = isPrototype;\n","/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n}\n\nmodule.exports = listCacheClear;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype;\n\n/** Built-in value references. */\nvar splice = arrayProto.splice;\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n}\n\nmodule.exports = listCacheDelete;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\nmodule.exports = listCacheGet;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\nmodule.exports = listCacheHas;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\nmodule.exports = listCacheSet;\n","var Hash = require('./_Hash'),\n ListCache = require('./_ListCache'),\n Map = require('./_Map');\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\nmodule.exports = mapCacheClear;\n","var getMapData = require('./_getMapData');\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = mapCacheDelete;\n","var getMapData = require('./_getMapData');\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\nmodule.exports = mapCacheGet;\n","var getMapData = require('./_getMapData');\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\nmodule.exports = mapCacheHas;\n","var getMapData = require('./_getMapData');\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n}\n\nmodule.exports = mapCacheSet;\n","/**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\nfunction mapToArray(map) {\n var index = -1,\n result = Array(map.size);\n\n map.forEach(function(value, key) {\n result[++index] = [key, value];\n });\n return result;\n}\n\nmodule.exports = mapToArray;\n","var getNative = require('./_getNative');\n\n/* Built-in method references that are verified to be native. */\nvar nativeCreate = getNative(Object, 'create');\n\nmodule.exports = nativeCreate;\n","var overArg = require('./_overArg');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeKeys = overArg(Object.keys, Object);\n\nmodule.exports = nativeKeys;\n","/**\n * This function is like\n * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * except that it includes inherited enumerable properties.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction nativeKeysIn(object) {\n var result = [];\n if (object != null) {\n for (var key in Object(object)) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = nativeKeysIn;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n try {\n // Use `util.types` for Node.js 10+.\n var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n if (types) {\n return types;\n }\n\n // Legacy `process.binding('util')` for Node.js < 10.\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n}());\n\nmodule.exports = nodeUtil;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n","/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\nmodule.exports = overArg;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n","/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\nfunction setCacheAdd(value) {\n this.__data__.set(value, HASH_UNDEFINED);\n return this;\n}\n\nmodule.exports = setCacheAdd;\n","/**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\nfunction setCacheHas(value) {\n return this.__data__.has(value);\n}\n\nmodule.exports = setCacheHas;\n","/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\nfunction setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n}\n\nmodule.exports = setToArray;\n","var ListCache = require('./_ListCache');\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}\n\nmodule.exports = stackClear;\n","/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n var data = this.__data__,\n result = data['delete'](key);\n\n this.size = data.size;\n return result;\n}\n\nmodule.exports = stackDelete;\n","/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n return this.__data__.get(key);\n}\n\nmodule.exports = stackGet;\n","/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n return this.__data__.has(key);\n}\n\nmodule.exports = stackHas;\n","var ListCache = require('./_ListCache'),\n Map = require('./_Map'),\n MapCache = require('./_MapCache');\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n var data = this.__data__;\n if (data instanceof ListCache) {\n var pairs = data.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n this.size = ++data.size;\n return this;\n }\n data = this.__data__ = new MapCache(pairs);\n }\n data.set(key, value);\n this.size = data.size;\n return this;\n}\n\nmodule.exports = stackSet;\n","/** Used for built-in method references. */\nvar funcProto = Function.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\nmodule.exports = toSource;\n","var baseClone = require('./_baseClone');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_SYMBOLS_FLAG = 4;\n\n/**\n * This method is like `_.clone` except that it recursively clones `value`.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Lang\n * @param {*} value The value to recursively clone.\n * @returns {*} Returns the deep cloned value.\n * @see _.clone\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var deep = _.cloneDeep(objects);\n * console.log(deep[0] === objects[0]);\n * // => false\n */\nfunction cloneDeep(value) {\n return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);\n}\n\nmodule.exports = cloneDeep;\n","/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\nmodule.exports = eq;\n","var baseIsArguments = require('./_baseIsArguments'),\n isObjectLike = require('./isObjectLike');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n};\n\nmodule.exports = isArguments;\n","/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\nmodule.exports = isArray;\n","var isFunction = require('./isFunction'),\n isLength = require('./isLength');\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\nmodule.exports = isArrayLike;\n","var root = require('./_root'),\n stubFalse = require('./stubFalse');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\nmodule.exports = isBuffer;\n","var baseIsEqual = require('./_baseIsEqual');\n\n/**\n * Performs a deep comparison between two values to determine if they are\n * equivalent.\n *\n * **Note:** This method supports comparing arrays, array buffers, booleans,\n * date objects, error objects, maps, numbers, `Object` objects, regexes,\n * sets, strings, symbols, and typed arrays. `Object` objects are compared\n * by their own, not inherited, enumerable properties. Functions and DOM\n * nodes are compared by strict equality, i.e. `===`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.isEqual(object, other);\n * // => true\n *\n * object === other;\n * // => false\n */\nfunction isEqual(value, other) {\n return baseIsEqual(value, other);\n}\n\nmodule.exports = isEqual;\n","var baseGetTag = require('./_baseGetTag'),\n isObject = require('./isObject');\n\n/** `Object#toString` result references. */\nvar asyncTag = '[object AsyncFunction]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n proxyTag = '[object Proxy]';\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\nmodule.exports = isFunction;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\nmodule.exports = isLength;\n","var baseIsMap = require('./_baseIsMap'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsMap = nodeUtil && nodeUtil.isMap;\n\n/**\n * Checks if `value` is classified as a `Map` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n * @example\n *\n * _.isMap(new Map);\n * // => true\n *\n * _.isMap(new WeakMap);\n * // => false\n */\nvar isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;\n\nmodule.exports = isMap;\n","/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n","var baseIsSet = require('./_baseIsSet'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsSet = nodeUtil && nodeUtil.isSet;\n\n/**\n * Checks if `value` is classified as a `Set` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n * @example\n *\n * _.isSet(new Set);\n * // => true\n *\n * _.isSet(new WeakSet);\n * // => false\n */\nvar isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;\n\nmodule.exports = isSet;\n","var baseIsTypedArray = require('./_baseIsTypedArray'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\nmodule.exports = isTypedArray;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeys = require('./_baseKeys'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\nmodule.exports = keys;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeysIn = require('./_baseKeysIn'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\nfunction keysIn(object) {\n return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n}\n\nmodule.exports = keysIn;\n","/**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\nfunction stubArray() {\n return [];\n}\n\nmodule.exports = stubArray;\n","/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n return false;\n}\n\nmodule.exports = stubFalse;\n","import type { Settings } from \"../shapes/setting-shapes\";\n\n/**\n * Fetches the settings for the application.\n * @returns The settings for the application.\n */\nexport async function getSettings(): Promise {\n\treturn {\n\t\tplatform: {\n\t\t\tsharedWorkerUrl: \"http://localhost:6060/js/shared-worker.bundle.js\",\n\t\t\tbrokerUrl: \"http://localhost:6060/platform/iframe-broker.html\",\n\t\t\tproviderId: \"web-interop-basic\",\n\t\t\tdefaultContextGroup: \"green\"\n\t\t}\n\t};\n}\n","export { default as v1 } from './v1.js';\nexport { default as v3 } from './v3.js';\nexport { default as v4 } from './v4.js';\nexport { default as v5 } from './v5.js';\nexport { default as NIL } from './nil.js';\nexport { default as version } from './version.js';\nexport { default as validate } from './validate.js';\nexport { default as stringify } from './stringify.js';\nexport { default as parse } from './parse.js';","/*\n * Browser-compatible JavaScript MD5\n *\n * Modification of JavaScript MD5\n * https://github.com/blueimp/JavaScript-MD5\n *\n * Copyright 2011, Sebastian Tschan\n * https://blueimp.net\n *\n * Licensed under the MIT license:\n * https://opensource.org/licenses/MIT\n *\n * Based on\n * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message\n * Digest Algorithm, as defined in RFC 1321.\n * Version 2.2 Copyright (C) Paul Johnston 1999 - 2009\n * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet\n * Distributed under the BSD License\n * See http://pajhome.org.uk/crypt/md5 for more info.\n */\nfunction md5(bytes) {\n if (typeof bytes === 'string') {\n var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape\n\n bytes = new Uint8Array(msg.length);\n\n for (var i = 0; i < msg.length; ++i) {\n bytes[i] = msg.charCodeAt(i);\n }\n }\n\n return md5ToHexEncodedArray(wordsToMd5(bytesToWords(bytes), bytes.length * 8));\n}\n/*\n * Convert an array of little-endian words to an array of bytes\n */\n\n\nfunction md5ToHexEncodedArray(input) {\n var output = [];\n var length32 = input.length * 32;\n var hexTab = '0123456789abcdef';\n\n for (var i = 0; i < length32; i += 8) {\n var x = input[i >> 5] >>> i % 32 & 0xff;\n var hex = parseInt(hexTab.charAt(x >>> 4 & 0x0f) + hexTab.charAt(x & 0x0f), 16);\n output.push(hex);\n }\n\n return output;\n}\n/**\n * Calculate output length with padding and bit length\n */\n\n\nfunction getOutputLength(inputLength8) {\n return (inputLength8 + 64 >>> 9 << 4) + 14 + 1;\n}\n/*\n * Calculate the MD5 of an array of little-endian words, and a bit length.\n */\n\n\nfunction wordsToMd5(x, len) {\n /* append padding */\n x[len >> 5] |= 0x80 << len % 32;\n x[getOutputLength(len) - 1] = len;\n var a = 1732584193;\n var b = -271733879;\n var c = -1732584194;\n var d = 271733878;\n\n for (var i = 0; i < x.length; i += 16) {\n var olda = a;\n var oldb = b;\n var oldc = c;\n var oldd = d;\n a = md5ff(a, b, c, d, x[i], 7, -680876936);\n d = md5ff(d, a, b, c, x[i + 1], 12, -389564586);\n c = md5ff(c, d, a, b, x[i + 2], 17, 606105819);\n b = md5ff(b, c, d, a, x[i + 3], 22, -1044525330);\n a = md5ff(a, b, c, d, x[i + 4], 7, -176418897);\n d = md5ff(d, a, b, c, x[i + 5], 12, 1200080426);\n c = md5ff(c, d, a, b, x[i + 6], 17, -1473231341);\n b = md5ff(b, c, d, a, x[i + 7], 22, -45705983);\n a = md5ff(a, b, c, d, x[i + 8], 7, 1770035416);\n d = md5ff(d, a, b, c, x[i + 9], 12, -1958414417);\n c = md5ff(c, d, a, b, x[i + 10], 17, -42063);\n b = md5ff(b, c, d, a, x[i + 11], 22, -1990404162);\n a = md5ff(a, b, c, d, x[i + 12], 7, 1804603682);\n d = md5ff(d, a, b, c, x[i + 13], 12, -40341101);\n c = md5ff(c, d, a, b, x[i + 14], 17, -1502002290);\n b = md5ff(b, c, d, a, x[i + 15], 22, 1236535329);\n a = md5gg(a, b, c, d, x[i + 1], 5, -165796510);\n d = md5gg(d, a, b, c, x[i + 6], 9, -1069501632);\n c = md5gg(c, d, a, b, x[i + 11], 14, 643717713);\n b = md5gg(b, c, d, a, x[i], 20, -373897302);\n a = md5gg(a, b, c, d, x[i + 5], 5, -701558691);\n d = md5gg(d, a, b, c, x[i + 10], 9, 38016083);\n c = md5gg(c, d, a, b, x[i + 15], 14, -660478335);\n b = md5gg(b, c, d, a, x[i + 4], 20, -405537848);\n a = md5gg(a, b, c, d, x[i + 9], 5, 568446438);\n d = md5gg(d, a, b, c, x[i + 14], 9, -1019803690);\n c = md5gg(c, d, a, b, x[i + 3], 14, -187363961);\n b = md5gg(b, c, d, a, x[i + 8], 20, 1163531501);\n a = md5gg(a, b, c, d, x[i + 13], 5, -1444681467);\n d = md5gg(d, a, b, c, x[i + 2], 9, -51403784);\n c = md5gg(c, d, a, b, x[i + 7], 14, 1735328473);\n b = md5gg(b, c, d, a, x[i + 12], 20, -1926607734);\n a = md5hh(a, b, c, d, x[i + 5], 4, -378558);\n d = md5hh(d, a, b, c, x[i + 8], 11, -2022574463);\n c = md5hh(c, d, a, b, x[i + 11], 16, 1839030562);\n b = md5hh(b, c, d, a, x[i + 14], 23, -35309556);\n a = md5hh(a, b, c, d, x[i + 1], 4, -1530992060);\n d = md5hh(d, a, b, c, x[i + 4], 11, 1272893353);\n c = md5hh(c, d, a, b, x[i + 7], 16, -155497632);\n b = md5hh(b, c, d, a, x[i + 10], 23, -1094730640);\n a = md5hh(a, b, c, d, x[i + 13], 4, 681279174);\n d = md5hh(d, a, b, c, x[i], 11, -358537222);\n c = md5hh(c, d, a, b, x[i + 3], 16, -722521979);\n b = md5hh(b, c, d, a, x[i + 6], 23, 76029189);\n a = md5hh(a, b, c, d, x[i + 9], 4, -640364487);\n d = md5hh(d, a, b, c, x[i + 12], 11, -421815835);\n c = md5hh(c, d, a, b, x[i + 15], 16, 530742520);\n b = md5hh(b, c, d, a, x[i + 2], 23, -995338651);\n a = md5ii(a, b, c, d, x[i], 6, -198630844);\n d = md5ii(d, a, b, c, x[i + 7], 10, 1126891415);\n c = md5ii(c, d, a, b, x[i + 14], 15, -1416354905);\n b = md5ii(b, c, d, a, x[i + 5], 21, -57434055);\n a = md5ii(a, b, c, d, x[i + 12], 6, 1700485571);\n d = md5ii(d, a, b, c, x[i + 3], 10, -1894986606);\n c = md5ii(c, d, a, b, x[i + 10], 15, -1051523);\n b = md5ii(b, c, d, a, x[i + 1], 21, -2054922799);\n a = md5ii(a, b, c, d, x[i + 8], 6, 1873313359);\n d = md5ii(d, a, b, c, x[i + 15], 10, -30611744);\n c = md5ii(c, d, a, b, x[i + 6], 15, -1560198380);\n b = md5ii(b, c, d, a, x[i + 13], 21, 1309151649);\n a = md5ii(a, b, c, d, x[i + 4], 6, -145523070);\n d = md5ii(d, a, b, c, x[i + 11], 10, -1120210379);\n c = md5ii(c, d, a, b, x[i + 2], 15, 718787259);\n b = md5ii(b, c, d, a, x[i + 9], 21, -343485551);\n a = safeAdd(a, olda);\n b = safeAdd(b, oldb);\n c = safeAdd(c, oldc);\n d = safeAdd(d, oldd);\n }\n\n return [a, b, c, d];\n}\n/*\n * Convert an array bytes to an array of little-endian words\n * Characters >255 have their high-byte silently ignored.\n */\n\n\nfunction bytesToWords(input) {\n if (input.length === 0) {\n return [];\n }\n\n var length8 = input.length * 8;\n var output = new Uint32Array(getOutputLength(length8));\n\n for (var i = 0; i < length8; i += 8) {\n output[i >> 5] |= (input[i / 8] & 0xff) << i % 32;\n }\n\n return output;\n}\n/*\n * Add integers, wrapping at 2^32. This uses 16-bit operations internally\n * to work around bugs in some JS interpreters.\n */\n\n\nfunction safeAdd(x, y) {\n var lsw = (x & 0xffff) + (y & 0xffff);\n var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n return msw << 16 | lsw & 0xffff;\n}\n/*\n * Bitwise rotate a 32-bit number to the left.\n */\n\n\nfunction bitRotateLeft(num, cnt) {\n return num << cnt | num >>> 32 - cnt;\n}\n/*\n * These functions implement the four basic operations the algorithm uses.\n */\n\n\nfunction md5cmn(q, a, b, x, s, t) {\n return safeAdd(bitRotateLeft(safeAdd(safeAdd(a, q), safeAdd(x, t)), s), b);\n}\n\nfunction md5ff(a, b, c, d, x, s, t) {\n return md5cmn(b & c | ~b & d, a, b, x, s, t);\n}\n\nfunction md5gg(a, b, c, d, x, s, t) {\n return md5cmn(b & d | c & ~d, a, b, x, s, t);\n}\n\nfunction md5hh(a, b, c, d, x, s, t) {\n return md5cmn(b ^ c ^ d, a, b, x, s, t);\n}\n\nfunction md5ii(a, b, c, d, x, s, t) {\n return md5cmn(c ^ (b | ~d), a, b, x, s, t);\n}\n\nexport default md5;","export default '00000000-0000-0000-0000-000000000000';","import validate from './validate.js';\n\nfunction parse(uuid) {\n if (!validate(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n var v;\n var arr = new Uint8Array(16); // Parse ########-....-....-....-............\n\n arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24;\n arr[1] = v >>> 16 & 0xff;\n arr[2] = v >>> 8 & 0xff;\n arr[3] = v & 0xff; // Parse ........-####-....-....-............\n\n arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8;\n arr[5] = v & 0xff; // Parse ........-....-####-....-............\n\n arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8;\n arr[7] = v & 0xff; // Parse ........-....-....-####-............\n\n arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8;\n arr[9] = v & 0xff; // Parse ........-....-....-....-############\n // (Use \"/\" to avoid 32-bit truncation when bit-shifting high-order bytes)\n\n arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff;\n arr[11] = v / 0x100000000 & 0xff;\n arr[12] = v >>> 24 & 0xff;\n arr[13] = v >>> 16 & 0xff;\n arr[14] = v >>> 8 & 0xff;\n arr[15] = v & 0xff;\n return arr;\n}\n\nexport default parse;","export default /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;","// Unique ID creation requires a high quality random # generator. In the browser we therefore\n// require the crypto API and do not support built-in fallback to lower quality random number\n// generators (like Math.random()).\nvar getRandomValues;\nvar rnds8 = new Uint8Array(16);\nexport default function rng() {\n // lazy load so that environments that need to polyfill have a chance to do so\n if (!getRandomValues) {\n // getRandomValues needs to be invoked in a context where \"this\" is a Crypto implementation. Also,\n // find the complete implementation of crypto (msCrypto) on IE11.\n getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto !== 'undefined' && typeof msCrypto.getRandomValues === 'function' && msCrypto.getRandomValues.bind(msCrypto);\n\n if (!getRandomValues) {\n throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');\n }\n }\n\n return getRandomValues(rnds8);\n}","// Adapted from Chris Veness' SHA1 code at\n// http://www.movable-type.co.uk/scripts/sha1.html\nfunction f(s, x, y, z) {\n switch (s) {\n case 0:\n return x & y ^ ~x & z;\n\n case 1:\n return x ^ y ^ z;\n\n case 2:\n return x & y ^ x & z ^ y & z;\n\n case 3:\n return x ^ y ^ z;\n }\n}\n\nfunction ROTL(x, n) {\n return x << n | x >>> 32 - n;\n}\n\nfunction sha1(bytes) {\n var K = [0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xca62c1d6];\n var H = [0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0];\n\n if (typeof bytes === 'string') {\n var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape\n\n bytes = [];\n\n for (var i = 0; i < msg.length; ++i) {\n bytes.push(msg.charCodeAt(i));\n }\n } else if (!Array.isArray(bytes)) {\n // Convert Array-like to Array\n bytes = Array.prototype.slice.call(bytes);\n }\n\n bytes.push(0x80);\n var l = bytes.length / 4 + 2;\n var N = Math.ceil(l / 16);\n var M = new Array(N);\n\n for (var _i = 0; _i < N; ++_i) {\n var arr = new Uint32Array(16);\n\n for (var j = 0; j < 16; ++j) {\n arr[j] = bytes[_i * 64 + j * 4] << 24 | bytes[_i * 64 + j * 4 + 1] << 16 | bytes[_i * 64 + j * 4 + 2] << 8 | bytes[_i * 64 + j * 4 + 3];\n }\n\n M[_i] = arr;\n }\n\n M[N - 1][14] = (bytes.length - 1) * 8 / Math.pow(2, 32);\n M[N - 1][14] = Math.floor(M[N - 1][14]);\n M[N - 1][15] = (bytes.length - 1) * 8 & 0xffffffff;\n\n for (var _i2 = 0; _i2 < N; ++_i2) {\n var W = new Uint32Array(80);\n\n for (var t = 0; t < 16; ++t) {\n W[t] = M[_i2][t];\n }\n\n for (var _t = 16; _t < 80; ++_t) {\n W[_t] = ROTL(W[_t - 3] ^ W[_t - 8] ^ W[_t - 14] ^ W[_t - 16], 1);\n }\n\n var a = H[0];\n var b = H[1];\n var c = H[2];\n var d = H[3];\n var e = H[4];\n\n for (var _t2 = 0; _t2 < 80; ++_t2) {\n var s = Math.floor(_t2 / 20);\n var T = ROTL(a, 5) + f(s, b, c, d) + e + K[s] + W[_t2] >>> 0;\n e = d;\n d = c;\n c = ROTL(b, 30) >>> 0;\n b = a;\n a = T;\n }\n\n H[0] = H[0] + a >>> 0;\n H[1] = H[1] + b >>> 0;\n H[2] = H[2] + c >>> 0;\n H[3] = H[3] + d >>> 0;\n H[4] = H[4] + e >>> 0;\n }\n\n return [H[0] >> 24 & 0xff, H[0] >> 16 & 0xff, H[0] >> 8 & 0xff, H[0] & 0xff, H[1] >> 24 & 0xff, H[1] >> 16 & 0xff, H[1] >> 8 & 0xff, H[1] & 0xff, H[2] >> 24 & 0xff, H[2] >> 16 & 0xff, H[2] >> 8 & 0xff, H[2] & 0xff, H[3] >> 24 & 0xff, H[3] >> 16 & 0xff, H[3] >> 8 & 0xff, H[3] & 0xff, H[4] >> 24 & 0xff, H[4] >> 16 & 0xff, H[4] >> 8 & 0xff, H[4] & 0xff];\n}\n\nexport default sha1;","import validate from './validate.js';\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\n\nvar byteToHex = [];\n\nfor (var i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).substr(1));\n}\n\nfunction stringify(arr) {\n var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n var uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!validate(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n\n return uuid;\n}\n\nexport default stringify;","import rng from './rng.js';\nimport stringify from './stringify.js'; // **`v1()` - Generate time-based UUID**\n//\n// Inspired by https://github.com/LiosK/UUID.js\n// and http://docs.python.org/library/uuid.html\n\nvar _nodeId;\n\nvar _clockseq; // Previous uuid creation time\n\n\nvar _lastMSecs = 0;\nvar _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details\n\nfunction v1(options, buf, offset) {\n var i = buf && offset || 0;\n var b = buf || new Array(16);\n options = options || {};\n var node = options.node || _nodeId;\n var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not\n // specified. We do this lazily to minimize issues related to insufficient\n // system entropy. See #189\n\n if (node == null || clockseq == null) {\n var seedBytes = options.random || (options.rng || rng)();\n\n if (node == null) {\n // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)\n node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]];\n }\n\n if (clockseq == null) {\n // Per 4.2.2, randomize (14 bit) clockseq\n clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;\n }\n } // UUID timestamps are 100 nano-second units since the Gregorian epoch,\n // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so\n // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'\n // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.\n\n\n var msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock\n // cycle to simulate higher resolution clock\n\n var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs)\n\n var dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression\n\n if (dt < 0 && options.clockseq === undefined) {\n clockseq = clockseq + 1 & 0x3fff;\n } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new\n // time interval\n\n\n if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {\n nsecs = 0;\n } // Per 4.2.1.2 Throw error if too many uuids are requested\n\n\n if (nsecs >= 10000) {\n throw new Error(\"uuid.v1(): Can't create more than 10M uuids/sec\");\n }\n\n _lastMSecs = msecs;\n _lastNSecs = nsecs;\n _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch\n\n msecs += 12219292800000; // `time_low`\n\n var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;\n b[i++] = tl >>> 24 & 0xff;\n b[i++] = tl >>> 16 & 0xff;\n b[i++] = tl >>> 8 & 0xff;\n b[i++] = tl & 0xff; // `time_mid`\n\n var tmh = msecs / 0x100000000 * 10000 & 0xfffffff;\n b[i++] = tmh >>> 8 & 0xff;\n b[i++] = tmh & 0xff; // `time_high_and_version`\n\n b[i++] = tmh >>> 24 & 0xf | 0x10; // include version\n\n b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)\n\n b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low`\n\n b[i++] = clockseq & 0xff; // `node`\n\n for (var n = 0; n < 6; ++n) {\n b[i + n] = node[n];\n }\n\n return buf || stringify(b);\n}\n\nexport default v1;","import v35 from './v35.js';\nimport md5 from './md5.js';\nvar v3 = v35('v3', 0x30, md5);\nexport default v3;","import stringify from './stringify.js';\nimport parse from './parse.js';\n\nfunction stringToBytes(str) {\n str = unescape(encodeURIComponent(str)); // UTF8 escape\n\n var bytes = [];\n\n for (var i = 0; i < str.length; ++i) {\n bytes.push(str.charCodeAt(i));\n }\n\n return bytes;\n}\n\nexport var DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8';\nexport var URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8';\nexport default function (name, version, hashfunc) {\n function generateUUID(value, namespace, buf, offset) {\n if (typeof value === 'string') {\n value = stringToBytes(value);\n }\n\n if (typeof namespace === 'string') {\n namespace = parse(namespace);\n }\n\n if (namespace.length !== 16) {\n throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)');\n } // Compute hash of namespace and value, Per 4.3\n // Future: Use spread syntax when supported on all platforms, e.g. `bytes =\n // hashfunc([...namespace, ... value])`\n\n\n var bytes = new Uint8Array(16 + value.length);\n bytes.set(namespace);\n bytes.set(value, namespace.length);\n bytes = hashfunc(bytes);\n bytes[6] = bytes[6] & 0x0f | version;\n bytes[8] = bytes[8] & 0x3f | 0x80;\n\n if (buf) {\n offset = offset || 0;\n\n for (var i = 0; i < 16; ++i) {\n buf[offset + i] = bytes[i];\n }\n\n return buf;\n }\n\n return stringify(bytes);\n } // Function#name is not settable on some platforms (#270)\n\n\n try {\n generateUUID.name = name; // eslint-disable-next-line no-empty\n } catch (err) {} // For CommonJS default export support\n\n\n generateUUID.DNS = DNS;\n generateUUID.URL = URL;\n return generateUUID;\n}","import rng from './rng.js';\nimport stringify from './stringify.js';\n\nfunction v4(options, buf, offset) {\n options = options || {};\n var rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n offset = offset || 0;\n\n for (var i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n\n return buf;\n }\n\n return stringify(rnds);\n}\n\nexport default v4;","import v35 from './v35.js';\nimport sha1 from './sha1.js';\nvar v5 = v35('v5', 0x50, sha1);\nexport default v5;","import REGEX from './regex.js';\n\nfunction validate(uuid) {\n return typeof uuid === 'string' && REGEX.test(uuid);\n}\n\nexport default validate;","import validate from './validate.js';\n\nfunction version(uuid) {\n if (!validate(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n return parseInt(uuid.substr(14, 1), 16);\n}\n\nexport default version;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = (module) => {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","import { connect } from \"@openfin/core-web\";\nimport { getSettings } from \"./platform/settings\";\n\n/**\n * Initializes the OpenFin Web Broker connection.\n */\nasync function init(): Promise {\n\tconst settings = await getSettings();\n\t// Connect to the OpenFin Web Broker.\n\t// It is good practice to specify providerId even if content is explicitly specifying it for cases where\n\t// this provider may use our layout system and allow content to inherit these settings and currentContextGroup\n\t// which will default any client that uses inheritance through our layout system.\n\tconst fin = await connect({\n\t\toptions: {\n\t\t\tbrokerUrl: settings.platform.brokerUrl,\n\t\t\tinteropConfig: {\n\t\t\t\tproviderId: settings.platform.providerId,\n\t\t\t\tcurrentContextGroup: settings.platform.defaultContextGroup\n\t\t\t}\n\t\t}\n\t});\n\n\t// You may now use the `fin` object.\n\tawait fin.Interop.init(settings.platform.providerId);\n}\n\ninit()\n\t.then(() => {\n\t\tconsole.log(\"Connected to the OpenFin Web Broker.\");\n\t\treturn true;\n\t})\n\t.catch((err) => console.error(err));\n"],"names":[],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"provider.bundle.js","mappings":";;;;;;;;;;AAAa,MAAM,mBAAO,CAAC,qFAAoB,EAAE,mBAAO,CAAC,mDAAS,EAAE,mBAAO,CAAC,+DAAM,EAAE,mBAAO,CAAC,mDAAQ,EAAE,mBAAO,CAAC,gEAAkB,EAAE,mBAAO,CAAC,4DAAgB,EAAE,eAAe;;;;;;;;;;;;ACA9J,MAAM,mBAAO,CAAC,mDAAS,IAAI,mBAAO,CAAC,mDAAQ,IAAI,mBAAO,CAAC,gEAAkB,IAAI,mBAAO,CAAC,4DAAgB,IAAI,mBAAO,CAAC,+DAAM,EAAE,kBAAkB,EAAE,GAAG,wBAAwB,GAAG,sGAAsG,qBAAM,CAAC,qBAAM,iCAAiC,KAAK,KAAK,KAAK,MAAM,oBAAoB,WAAW,kBAAkB,kBAAkB,UAAU,SAAS,s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yCAAyC,2FAA2F;;;;;;;;;;;;ACFv6nD;;AAEZ,kBAAkB;AAClB,mBAAmB;AACnB,qBAAqB;;AAErB;AACA;AACA;;AAEA;AACA,mCAAmC,SAAS;AAC5C;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,cAAc,SAAS;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,2CAA2C,UAAU;AACrD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;ACrJA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEY;;AAEZ,eAAe,mBAAO,CAAC,wDAAW;AAClC,gBAAgB,mBAAO,CAAC,oDAAS;AACjC;AACA;AACA;AACA;;AAEA,cAAc;AACd,kBAAkB;AAClB,yBAAyB;;AAEzB;AACA,kBAAkB;;AAElB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,kBAAkB,YAAY;AAC9B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA,wCAAwC,SAAS;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;;AAEA;AACA;AACA,cAAc,iBAAiB;AAC/B;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,iDAAiD,EAAE;AACnD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C;AAC1C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA,yBAAyB,eAAe;AACxC;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,yBAAyB,QAAQ;AACjC;AACA,sBAAsB,eAAe;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc,YAAY;AAC1B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB,sBAAsB;AACxC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,mBAAmB;AACnB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA,oBAAoB,SAAS;AAC7B;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA,qBAAqB,WAAW,GAAG,IAAI;AACvC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA,gBAAgB,WAAW,GAAG,IAAI,KAAK,aAAa;AACpD;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;;AAEA;AACA,GAAG;AACH;AACA;AACA,mBAAmB,KAAK,mDAAmD,cAAc;AACzF,GAAG;AACH;AACA;AACA,+BAA+B,IAAI;AACnC;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,MAAM,aAAa,SAAS;AACtD;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,SAAS,gBAAgB;AACzB,cAAc,oBAAoB,EAAE,IAAI;AACxC;AACA,YAAY,gBAAgB,EAAE,IAAI;AAClC;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,GAAG,SAAS,GAAG,KAAK,qBAAqB,EAAE,EAAE;AACpE,QAAQ;AACR,yBAAyB,GAAG,KAAK,yBAAyB,EAAE,EAAE;AAC9D,mBAAmB,yBAAyB,EAAE,EAAE;AAChD;AACA,MAAM;AACN,oBAAoB,IAAI,EAAE,GAAG,SAAS,IAAI,EAAE,EAAE;AAC9C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,0CAA0C,cAAc,SAAS,OAAO;AACxE;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,kBAAkB,YAAY;AAC9B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,kBAAkB,gBAAgB;AAClC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,kBAAkB,gBAAgB;AAClC;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,cAAc,YAAY;AAC1B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,QAAQ;AAC1B;AACA,oBAAoB,QAAQ;AAC5B;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;;;;;ACzjEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEa;;AAEb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB;;AAEnB;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,sBAAsB;AACxC;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA,eAAe;AACf;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA,oBAAoB,SAAS;AAC7B;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;;AAEA,kCAAkC,QAAQ;AAC1C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oBAAoB,iBAAiB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,QAAQ;AACR;AACA,uCAAuC,QAAQ;AAC/C;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,OAAO;AACzB;AACA;AACA;;AAEA;AACA,SAAS,yBAAyB;AAClC;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,gBAAgB;AAClC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,8DAA8D,YAAY;AAC1E;AACA,8DAA8D,YAAY;AAC1E;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,qCAAqC,YAAY;AACjD;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;AACA;;;;;;;;;;;AChfA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,SAAS,WAAW;;AAEpB;AACA;AACA;AACA,SAAS,WAAW;;AAEpB;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA,SAAS,WAAW;;AAEpB;AACA;AACA,SAAS,UAAU;;AAEnB;AACA;;;;;;;;;;;ACpFA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,WAAW,mBAAO,CAAC,mDAAS;;AAE5B;AACA;;AAEA;;;;;;;;;;;ACNA,gBAAgB,mBAA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O,CAAC,uDAAW;AACjC,eAAe,mBAAO,CAAC,yDAAY;AACnC,cAAc,mBAAO,CAAC,yDAAY;AAClC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,SAAS;AACpB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AChDA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACnBA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,UAAU;AACrB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACtBA,sBAAsB,mBAAO,CAAC,yEAAoB;AAClD,SAAS,mBAAO,CAAC,6CAAM;;AAEvB;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC3BA,SAAS,mBAAO,CAAC,6CAAM;;AAEvB;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpBA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,WAAW,mBAAO,CAAC,iDAAQ;;AAE3B;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa,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AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,SAAS;AACpB;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa,GAAG;AAChB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;AACA,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;;;;;;;;;;ACrKA,eAAe,mBAAO,CAAC,yDAAY;;AAEnC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;;;;;;;;;;AC7BA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,cAAc,mBAAO,CAAC,uDAAW;;AAEjC;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA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AACtB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClFA,aAAa,mBAAO,CAAC,uDAAW;AAChC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA,iBAAiB,mBAAO,CAAC,6DAAc;AACvC,eAAe,mBAAO,CAAC,2DAAa;AACpC,eAAe,mBAAO,CAAC,yDAAY;AACnC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;AACA;AACA;AACA,oCAAoC;;AAEpC;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC9CA,aAAa,mBAAO,CAAC,uDAAW;AAChC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,eAAe,mBAAO,CAAC,yDAAY;AACnC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A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AW;AAChC,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,SAAS,mBAAO,CAAC,6CAAM;AACvB,kBAAkB,mBAAO,CAAC,iEAAgB;AAC1C,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC/GA,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC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BAAO,CAAC,mEAAiB;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACdA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AChBA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,GAAG;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC7BA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACtBA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACtBA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACzBA,uBAAuB,mBAAO,CAAC,2EAAqB;AACpD,oBAAoB,mBAAO,CAAC,qEAAkB;AAC9C,kBAAkB,mBAAO,CAAC,iEAAgB;AAC1C,kBAAkB,mBAAO,CAAC,iEAAgB;AAC1C,sBAAsB,mBAAO,CAAC,yEAAoB;;AAElD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC5EA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,mBAAmB,mBAAO,CAAC,mEAAiB;AAC5C,kBAAkB,mBAAO,CAAC,iEAAgB;;AAE1C;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACxBA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACdA,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACnBA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACZA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA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AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACbA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;;;;;;;;;;ACjBA,gBAAgB,mBAAO,CAAC,6DAAc;;AAEtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACdA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,GAAG;AAChB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACbA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACbA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,UAAU,mBAAO,CAAC,iDAAQ;AAC1B,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjCA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;;;;;;;;;;;ACzBA,gBAAgB,mBAAO,CAAC,6DAAc;;AAEtC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,GAAG;AAChB;AACA;AACA;AACA,oBAAoB,QAAQ,IAAI,QAAQ;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,kBAAkB;AAClB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpCA,sBAAsB,mBAAO,CAAC,yEAAoB;AAClD,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA,8BAA8B,mBAAmB;AACjD;AACA;AACA;AACA;AACA;AACA,+CAA+C,mBAAmB;AAClE;AACA;AACA;;AAEA;;;;;;;;;;;ACnCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACzBA,iBAAiB,mBAAO,CAAC,6DAAc;AACvC,eAAe,mBAAO,CAAC,yDAAY;;AAEnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AChCA,WAAW,mBAAO,CAAC,mDAAS;AAC5B,gBAAgB,mBAAO,CAAC,2DAAa;;AAErC;AACA,kBAAkB,KAA0B;;AAE5C;AACA,gCAAgC,QAAa;;AAE7C;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACrCA,kBAAkB,mBAAO,CAAC,iEAAgB;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,kBAAkB;AAClB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClCA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,eAAe,mBAAO,CAAC,yDAAY;;AAEnC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpCA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClCA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC1BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC9BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC5BA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC1BA,uBAAuB,mBAAO,CAAC,2EAAqB;AACpD,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC1BA,oBAAoB,mBAAO,CAAC,qEAAkB;AAC9C,eAAe,mBAAO,CAAC,2DAAa;AACpC,kBAAkB,mBAAO,CAAC,+DAAe;;AAEzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpCA,oBAAoB,mBAAO,CAAC,qEAAkB;AAC9C,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,kBAAkB,mBAAO,CAAC,+DAAe;;AAEzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC/BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;;;ACXA,kCASC;AAbD;;;GAGG;AACI,KAAK,UAAU,WAAW;IAChC,OAAO;QACN,QAAQ,EAAE;YACT,eAAe,EAAE,kDAAkD;YACnE,SAAS,EAAE,mDAAmD;YAC9D,UAAU,EAAE,mBAAmB;YAC/B,mBAAmB,EAAE,OAAO;SAC5B;KACD,CAAC;AACH,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACfuC;AACA;AACA;AACA;AACE;AACQ;AACE;AACE;;;;;;;;;;;;;;;;ACPtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD;;AAEnD;;AAEA,oBAAoB,gBAAgB;AACpC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA,kBAAkB,cAAc;AAChC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,kBAAkB,cAAc;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,kBAAkB,aAAa;AAC/B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,iEAAe,GAAG;;;;;;;;;;;;;;;ACtNlB,iEAAe,sCAAsC;;;;;;;;;;;;;;;;ACAhB;;AAErC;AACA,OAAO,wDAAQ;AACf;AACA;;AAEA;AACA,gCAAgC;;AAEhC;AACA;AACA;AACA,qBAAqB;;AAErB;AACA,qBAAqB;;AAErB;AACA,qBAAqB;;AAErB;AACA,qBAAqB;AACrB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,iEAAe,KAAK;;;;;;;;;;;;;;;AClCpB,iEAAe,cAAc,EAAE,UAAU,EAAE,eAAe,EAAE,gBAAgB,EAAE,UAAU,GAAG,yCAAyC;;;;;;;;;;;;;;;ACApI;AACA;AACA;AACA;AACA;AACe;AACf;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;AClBA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AA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;WACA;WACA;;;;;WCPA;WACA;WACA;WACA;WACA,GAAG;WACH;WACA;WACA,CAAC;;;;;WCPD;;;;;WCAA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;WCNA;WACA;WACA;WACA;WACA;;;;;;;;;;;;;;ACJA,0HAA4C;AAC5C,uGAAkD;AAElD;;GAEG;AACH,KAAK,UAAU,IAAI;IAClB,MAAM,QAAQ,GAAG,MAAM,0BAAW,GAAE,CAAC;IACrC,qCAAqC;IACrC,wGAAwG;IACxG,8GAA8G;IAC9G,iFAAiF;IACjF,MAAM,GAAG,GAAG,MAAM,sBAAO,EAAC;QACzB,OAAO,EAAE;YACR,SAAS,EAAE,QAAQ,CAAC,QAAQ,CAAC,SAAS;YACtC,aAAa,EAAE;gBACd,UAAU,EAAE,QAAQ,CAAC,QAAQ,CAAC,UAAU;gBACxC,mBAAmB,EAAE,QAAQ,CAAC,QAAQ,CAAC,mBAAmB;aAC1D;SACD;KACD,CAAC,CAAC;IAEH,oCAAoC;IACpC,MAAM,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;AACtD,CAAC;AAED,IAAI,EAAE;KACJ,IAAI,CAAC,GAAG,EAAE;IACV,OAAO,CAAC,GAAG,CAAC,sCAAsC,CAAC,CAAC;IACpD,OAAO,IAAI,CAAC;AACb,CAAC,CAAC;KACD,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC","sources":["webpack://openfin-web--web-interop-basic/../../node_modules/@openfin/core-web/out/api-client.js","webpack://openfin-web--web-interop-basic/../../node_modules/@openfin/core-web/out/main-8cad4070.js","webpack://openfin-web--web-interop-basic/../../node_modules/@openfin/core-web/out/main-b14f67c9.js","webpack://openfin-web--web-interop-basic/../../node_modules/base64-js/index.js","webpack://openfin-web--web-interop-basic/../../node_modules/buffer/index.js","webpack://openfin-web--web-interop-basic/../../node_modules/events/events.js","webpack://openfin-web--web-interop-basic/../../node_modules/ieee754/index.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_DataView.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_Hash.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_ListCache.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_Map.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_MapCache.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_Promise.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_Set.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_SetCache.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_Stack.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_Symbol.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_Uint8Array.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_WeakMap.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_arrayEach.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_arrayFilter.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_arrayLikeKeys.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_arrayPush.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_arraySome.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_assignValue.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_assocIndexOf.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_baseAssign.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_baseAssignIn.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_baseAssignValue.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_baseClone.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_baseCreate.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_baseGetAllKeys.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_baseGetTag.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_baseIsArguments.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_baseIsEqual.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_baseIsEqualDeep.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_baseIsMap.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_baseIsNative.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_baseIsSet.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_baseIsTypedArray.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_baseKeys.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_baseKeysIn.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_baseTimes.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_baseUnary.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_cacheHas.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_cloneArrayBuffer.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_cloneBuffer.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_cloneDataView.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_cloneRegExp.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_cloneSymbol.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_cloneTypedArray.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_copyArray.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_copyObject.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_copySymbols.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_copySymbolsIn.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_coreJsData.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_defineProperty.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_equalArrays.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_equalByTag.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_equalObjects.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_freeGlobal.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_getAllKeys.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_getAllKeysIn.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_getMapData.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_getNative.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_getPrototype.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_getRawTag.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_getSymbols.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_getSymbolsIn.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_getTag.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_getValue.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_hashClear.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_hashDelete.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_hashGet.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_hashHas.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_hashSet.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_initCloneArray.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_initCloneByTag.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_initCloneObject.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_isIndex.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_isKeyable.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_isMasked.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_isPrototype.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_listCacheClear.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_listCacheDelete.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_listCacheGet.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_listCacheHas.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_listCacheSet.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_mapCacheClear.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_mapCacheDelete.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_mapCacheGet.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_mapCacheHas.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_mapCacheSet.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_mapToArray.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_nativeCreate.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_nativeKeys.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_nativeKeysIn.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_nodeUtil.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_objectToString.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_overArg.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_root.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_setCacheAdd.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_setCacheHas.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_setToArray.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_stackClear.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_stackDelete.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_stackGet.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_stackHas.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_stackSet.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/_toSource.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/cloneDeep.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/eq.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/isArguments.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/isArray.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/isArrayLike.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/isBuffer.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/isEqual.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/isFunction.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/isLength.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/isMap.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/isObject.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/isObjectLike.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/isSet.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/isTypedArray.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/keys.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/keysIn.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/stubArray.js","webpack://openfin-web--web-interop-basic/../../node_modules/lodash/stubFalse.js","webpack://openfin-web--web-interop-basic/./client/src/platform/settings.ts","webpack://openfin-web--web-interop-basic/../../node_modules/uuid/dist/esm-browser/index.js","webpack://openfin-web--web-interop-basic/../../node_modules/uuid/dist/esm-browser/md5.js","webpack://openfin-web--web-interop-basic/../../node_modules/uuid/dist/esm-browser/nil.js","webpack://openfin-web--web-interop-basic/../../node_modules/uuid/dist/esm-browser/parse.js","webpack://openfin-web--web-interop-basic/../../node_modules/uuid/dist/esm-browser/regex.js","webpack://openfin-web--web-interop-basic/../../node_modules/uuid/dist/esm-browser/rng.js","webpack://openfin-web--web-interop-basic/../../node_modules/uuid/dist/esm-browser/sha1.js","webpack://openfin-web--web-interop-basic/../../node_modules/uuid/dist/esm-browser/stringify.js","webpack://openfin-web--web-interop-basic/../../node_modules/uuid/dist/esm-browser/v1.js","webpack://openfin-web--web-interop-basic/../../node_modules/uuid/dist/esm-browser/v3.js","webpack://openfin-web--web-interop-basic/../../node_modules/uuid/dist/esm-browser/v35.js","webpack://openfin-web--web-interop-basic/../../node_modules/uuid/dist/esm-browser/v4.js","webpack://openfin-web--web-interop-basic/../../node_modules/uuid/dist/esm-browser/v5.js","webpack://openfin-web--web-interop-basic/../../node_modules/uuid/dist/esm-browser/validate.js","webpack://openfin-web--web-interop-basic/../../node_modules/uuid/dist/esm-browser/version.js","webpack://openfin-web--web-interop-basic/webpack/bootstrap","webpack://openfin-web--web-interop-basic/webpack/runtime/define property getters","webpack://openfin-web--web-interop-basic/webpack/runtime/global","webpack://openfin-web--web-interop-basic/webpack/runtime/hasOwnProperty shorthand","webpack://openfin-web--web-interop-basic/webpack/runtime/make namespace object","webpack://openfin-web--web-interop-basic/webpack/runtime/node module decorator","webpack://openfin-web--web-interop-basic/./client/src/provider.ts"],"sourcesContent":["\"use strict\";var e=require(\"./main-8cad4070.js\");require(\"buffer/\"),require(\"uuid\"),require(\"events\"),require(\"lodash/cloneDeep\"),require(\"lodash/isEqual\"),exports.connect=e.connect;\n","\"use strict\";var e=require(\"buffer/\"),t=require(\"events\"),n=require(\"lodash/cloneDeep\"),i=require(\"lodash/isEqual\"),r=require(\"uuid\");const o=(e,t)=>`${t}<${btoa(JSON.stringify(e))}>`;var s=\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof window?window:\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:{},a={},c={},d={},h={};async function l(e){const t=[];for(const n of e){const e=await n();t.push(e)}return t}Object.defineProperty(h,\"__esModule\",{value:!0}),h.promiseMapSerial=h.serial=h.promiseMap=h.promisify=void 0,h.promisify=function(e){return(...t)=>new Promise(((n,i)=>{e(...t,((e,t)=>e?i(e):n(t)))}))},h.promiseMap=async function(e,t){return Promise.all(e.map(t))},h.serial=l,h.promiseMapSerial=async function(e,t){return l(e.map(((e,n,i)=>()=>t(e,n,i))))};var u,p=s&&s.__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},w=s&&s.__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)};Object.defineProperty(d,\"__esModule\",{value:!0}),d.Reply=d.EmitterBase=d.Base=void 0;const y=h;class f{constructor(e){this.isNodeEnvironment=()=>\"node\"===this.wire.environment.type,this.isOpenFinEnvironment=()=>\"openfin\"===this.wire.environment.type,this.isBrowserEnvironment=()=>\"other\"===this.wire.environment.type,this.wire=e}get fin(){return this.wire.getFin()}get me(){return this.wire.me}}d.Base=f;d.EmitterBase=class extends f{constructor(e,t,...n){super(e),this.topic=t,u.set(this,void 0),this.eventNames=()=>this.hasEmitter()?this.getOrCreateEmitter().eventNames():[],this.emit=(e,t,...n)=>!!this.hasEmitter()&&this.getOrCreateEmitter().emit(e,t,...n),this.hasEmitter=()=>this.wire.eventAggregator.has(w(this,u,\"f\")),this.getOrCreateEmitter=()=>this.wire.eventAggregator.getOrCreate(w(this,u,\"f\")),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[],this.listenerCount=e=>this.hasEmitter()?this.getOrCreateEmitter().listenerCount(e):0,this.registerEventListener=async(e,t={},n,i)=>{const r={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e},o=this.getOrCreateEmitter();n(o);try{await this.wire.sendAction(\"subscribe-to-desktop-event\",r)}catch(e){throw i(o),this.deleteEmitterIfNothingRegistered(o),e}},this.deregisterEventListener=async(e,t={})=>{if(this.hasEmitter()){const n={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e};await this.wire.sendAction(\"unsubscribe-to-desktop-event\",n).catch((()=>null));return this.getOrCreateEmitter()}return Promise.resolve()},p(this,u,[t,...n],\"f\"),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[]}async on(e,t,n){return await this.registerEventListener(e,n,(n=>{n.on(e,t)}),(n=>{n.removeListener(e,t)})),this}async addListener(e,t,n){return this.on(e,t,n)}async once(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.once(e,i),n.once(e,t)}),(n=>{n.removeListener(e,i),n.removeListener(e,t)})),this}async prependListener(e,t,n){return await this.registerEventListener(e,n,(n=>{n.prependListener(e,t)}),(n=>{n.removeListener(e,t)})),this}async prependOnceListener(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.prependOnceListener(e,t),n.once(e,i)}),(n=>{n.removeListener(e,t),n.removeListener(e,i)})),this}async removeListener(e,t,n){const i=await this.deregisterEventListener(e,n);return i&&(i.removeListener(e,t),this.deleteEmitterIfNothingRegistered(i)),this}async deregisterAllListeners(e){const t={...this.identity,type:e,topic:this.topic};if(this.hasEmitter()){const e=this.getOrCreateEmitter(),n=e.listenerCount(t.type),i=[];for(let e=0;enull)));return await Promise.all(i),e}}async removeAllListeners(e){const t=async e=>{const t=await this.deregisterAllListeners(e);t&&(t.removeAllListeners(e),this.deleteEmitterIfNothingRegistered(t))};if(e)await t(e);else if(this.hasEmitter()){const e=this.getOrCreateEmitter().eventNames();await(0,y.promiseMap)(e,t)}return this}deleteEmitterIfNothingRegistered(e){0===e.eventNames().length&&this.wire.eventAggregator.delete(w(this,u,\"f\"))}},u=new WeakMap;d.Reply=class{};var g={};Object.defineProperty(g,\"__esModule\",{value:!0});var m=g.RuntimeError=g.NotSupportedError=g.NotImplementedError=g.NoAckError=g.DuplicateCorrelationError=g.UnexpectedActionError=g.DisconnectedError=void 0;class v extends Error{constructor(e){super(`Expected websocket state OPEN but found ${e}`),this.readyState=e}}g.DisconnectedError=v;class C extends Error{}g.UnexpectedActionError=C;class b extends Error{}g.DuplicateCorrelationError=b;class I extends Error{}g.NoAckError=I;class E extends Error{}g.NotImplementedError=E;class x extends Error{}g.NotSupportedError=x;class A extends Error{constructor(e){const{message:t,name:n,stack:i,...r}=e;super(t),this.name=n||\"Error\",this.stack=i??this.toString(),Object.keys(r).forEach((e=>{this[e]=r[e]}))}}class P extends Error{static getCallSite(e=0){const t=Error.stackTraceLimit,n=e+1;Error.stackTraceLimit=t+n;const i=Error.prepareStackTrace;Error.prepareStackTrace=(e,t)=>t;const r=(new Error).stack?.slice(n)??[];return Error.prepareStackTrace=i,Error.stackTraceLimit=t,r}static prepareStackTrace(e,t){if(\"function\"==typeof Error.prepareStackTrace)return Error.prepareStackTrace(e,t);let n=\"\";n+=e.name||\"Error\",n+=`: ${e.message||\"\"}`;for(const e of t)n+=`\\n at ${e.toString()}`;return n}constructor(e,t){const{reason:n,error:i}=e;super(n),this.name=\"RuntimeError\",i?.stack&&(this.cause=new A(i)),t&&(this.stack=P.prepareStackTrace(this,t))}}m=g.RuntimeError=P;var M={},_={},O={};Object.defineProperty(O,\"__esModule\",{value:!0}),O.validateIdentity=void 0,O.validateIdentity=function(e){let t;return\"object\"==typeof e&&\"string\"==typeof e.uuid||(t=\"Not a valid identity object\"),t};var S={},R={},F={},j={},k={},L={},T={};Object.defineProperty(T,\"__esModule\",{value:!0}),T.handleDeprecatedWarnings=void 0;var $;T.handleDeprecatedWarnings=e=>{(e.contentNavigation?.whitelist||e.contentNavigation?.blacklist||e.contentRedirect?.whitelist||e.contentRedirect?.blacklist)&&console.warn(\"The properties 'whitelist' and 'blacklist' have been marked as deprecated and will be removed in a future version. Please use 'allowlist' and 'denylist'.\")};var B={},G={};Object.defineProperty(G,\"__esModule\",{value:!0}),G.AsyncRetryableLazy=W=G.Lazy=void 0;var W=G.Lazy=class{constructor(e){this.producerFn=e}getValue(){return this.value||(this.value=this.producerFn()),this.value}};G.AsyncRetryableLazy=class{constructor(e){this.producerFn=e}async getValue(){return this.promise||(this.promise=this.producerFn().catch((e=>{throw delete this.promise,e}))),this.promise}};var H={};Object.defineProperty(H,\"__esModule\",{value:!0}),H.WebContents=void 0;const N=d;class D extends N.EmitterBase{constructor(e,t,n){super(e,n,t.uuid,t.name),this.identity=t,this.entityType=n}capturePage(e){return this.wire.sendAction(\"capture-page\",{options:e,...this.identity}).then((({payload:e})=>e.data))}executeJavaScript(e){return this.wire.sendAction(\"execute-javascript-in-window\",{...this.identity,code:e}).then((({payload:e})=>e.data))}getZoomLevel(){return this.wire.sendAction(\"get-zoom-level\",this.identity).then((({payload:e})=>e.data))}setZoomLevel(e){return this.wire.sendAction(\"set-zoom-level\",{...this.identity,level:e}).then((()=>{}))}navigate(e){return this.wire.sendAction(\"navigate-window\",{...this.identity,url:e}).then((()=>{}))}navigateBack(){return this.wire.sendAction(\"navigate-window-back\",{...this.identity}).then((()=>{}))}async navigateForward(){await this.wire.sendAction(\"navigate-window-forward\",{...this.identity})}stopNavigation(){return this.wire.sendAction(\"stop-window-navigation\",{...this.identity}).then((()=>{}))}reload(e=!1){return this.wire.sendAction(\"reload-window\",{ignoreCache:e,...this.identity}).then((()=>{}))}print(e={}){return this.wire.sendAction(\"print\",{...this.identity,options:e}).then((()=>{}))}findInPage(e,t){return this.wire.sendAction(\"find-in-page\",{...this.identity,searchTerm:e,options:t}).then((({payload:e})=>e.data))}stopFindInPage(e){return this.wire.sendAction(\"stop-find-in-page\",{...this.identity,action:e}).then((()=>{}))}getPrinters(){return this.wire.sendAction(\"get-printers\",{...this.identity}).then((({payload:e})=>e.data))}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){await this.wire.sendAction(\"focus-window\",{emitSynthFocused:e,...this.identity})}async showDeveloperTools(){await this.wire.sendAction(\"show-developer-tools\",this.identity)}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction(\"get-process-info\",this.identity);return e}async getSharedWorkers(){return this.wire.sendAction(\"get-shared-workers\",this.identity).then((({payload:e})=>e.data))}async inspectSharedWorker(){await this.wire.sendAction(\"inspect-shared-worker\",{...this.identity})}async inspectSharedWorkerById(e){await this.wire.sendAction(\"inspect-shared-worker-by-id\",{...this.identity,workerId:e})}async inspectServiceWorker(){await this.wire.sendAction(\"inspect-service-worker\",{...this.identity})}async showPopupWindow(e){if(this.wire.sendAction(`${this.entityType}-show-popup-window`,this.identity).catch((()=>{})),e?.onPopupReady){const t=async({popupName:t})=>{try{const n=this.fin.Window.wrapSync({uuid:this.fin.me.uuid,name:t});await e.onPopupReady(n)}catch(e){throw new Error(`Something went wrong during onPopupReady execution: ${e}`)}};await this.once(\"popup-ready\",t)}const{payload:t}=await this.wire.sendAction(\"try-create-popup-window\",{options:{...e,hasResultCallback:!!e?.onPopupResult,hasReadyCallback:!!e?.onPopupReady},...this.identity}),{data:{willOpen:n,options:i}}=t;n&&await this.fin.Window.create(i.initialOptions);if(e?.onPopupResult){const t=async t=>{await e.onPopupResult((e=>{const{name:t,uuid:n,result:i,data:r}=e,o={identity:{name:t,uuid:n},result:i};return r&&(o.data=r),o})(t))},n=async()=>{await this.removeListener(\"popup-result\",t)};await this.on(\"popup-result\",t),await this.once(\"popup-teardown\",n)}const{payload:r}=await this.wire.sendAction(\"show-popup-window\",{options:i,...this.identity});return r.data}}var U,V,z,K,q;function J(){return V||(V=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(function(){if($)return L;$=1,Object.defineProperty(L,\"__esModule\",{value:!0}),L.ViewModule=void 0;const e=d,t=O,n=J(),i=T;class r extends e.Base{async create(e){const{uuid:t}=this.wire.me;if(!e.name||\"string\"!=typeof e.name)throw new Error(\"Please provide a name property as a string in order to create a View.\");return(0,i.handleDeprecatedWarnings)(e),this.wire.environment.childViews?await this.wire.environment.createChildContent({entityType:\"view\",options:{...e,uuid:t}}):await this.wire.sendAction(\"create-view\",{...e,uuid:t}),this.wrapSync({uuid:t,name:e.name})}async wrap(e){this.wire.sendAction(\"view-wrap\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}wrapSync(e){this.wire.sendAction(\"view-wrap-sync\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}getCurrent(){if(this.wire.sendAction(\"view-get-current\").catch((e=>{})),!this.wire.me.isView)throw new Error(\"You are not in a View context\");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction(\"view-get-current-sync\").catch((e=>{})),!this.wire.me.isView)throw new Error(\"You are not in a View context\");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return L.ViewModule=r,L}(),e),n(function(){if(U)return B;var e;U=1,Object.defineProperty(B,\"__esModule\",{value:!0}),B.View=void 0;const t=g,n=G,i=H,r=ie();class o extends i.WebContents{constructor(i,o){super(i,o,\"view\"),this.identity=o,e.set(this,new n.Lazy((()=>this.fin.Platform.wrapSync(this.identity).getClient()))),this.attach=async e=>{await this.wire.sendAction(\"attach-view\",{target:e,...this.identity})},this.destroy=async()=>{await this.wire.sendAction(\"destroy-view\",{...this.identity})},this.show=async()=>{await this.wire.sendAction(\"show-view\",{...this.identity})},this.showAt=async(e,t={})=>{await this.wire.sendAction(\"show-view-at\",{bounds:e,...this.identity,options:t})},this.bringToFront=async()=>{await this.wire.sendAction(\"bring-view-to-front\",{...this.identity})},this.hide=async()=>{await this.wire.sendAction(\"hide-view\",{...this.identity})},this.setBounds=async e=>{await this.wire.sendAction(\"set-view-bounds\",{bounds:e,...this.identity})},this.getBounds=async()=>(await this.wire.sendAction(\"get-view-bounds\",{...this.identity})).payload.data,this.getInfo=async()=>(await this.wire.sendAction(\"get-view-info\",{...this.identity})).payload.data,this.getParentLayout=async()=>(this.wire.sendAction(\"view-get-parent-layout\",{...this.identity}).catch((()=>{})),this.fin.Platform.Layout.getLayoutByViewIdentity(this.identity)),this.getOptions=async()=>this.wire.sendAction(\"get-view-options\",{...this.identity}).then((({payload:e})=>e.data)),this.updateOptions=async e=>this.wire.sendAction(\"update-view-options\",{options:e,...this.identity}).then((()=>{})),this.getCurrentWindow=async()=>{const{payload:{data:e}}=await this.wire.sendAction(\"get-view-window\",{...this.identity});return new r._Window(this.wire,e)},this.getCurrentStack=async()=>{this.wire.sendAction(\"view-get-current-stack\").catch((()=>{}));try{return(await this.getParentLayout()).getStackByViewIdentity(this.identity)}catch(e){throw new t.RuntimeError({reason:\"This view does not belong to a stack.\",error:e})}},this.triggerBeforeUnload=async()=>(await this.wire.sendAction(\"trigger-before-unload\",{...this.identity})).payload.data,this.bindToElement=async e=>{if(!e)throw new Error(\"Element not found.\");return this.wire.environment.observeBounds(e,(async e=>this.setBounds(e)))}}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){const t=await this.getCurrentWindow();await t.focusedWebViewWasChanged(),await super.focus({emitSynthFocused:e})}}return B.View=o,e=new WeakMap,B}(),e)}(k)),k}function Y(){if(z)return j;z=1,Object.defineProperty(j,\"__esModule\",{value:!0}),j.Application=void 0;const e=d,t=ie(),n=J();class i extends e.EmitterBase{constructor(e,n){super(e,\"application\",n.uuid),this.identity=n,this.window=new t._Window(this.wire,{uuid:this.identity.uuid,name:this.identity.uuid})}windowListFromIdentityList(e){const n=[];return e.forEach((e=>{n.push(new t._Window(this.wire,{uuid:e.uuid,name:e.name}))})),n}isRunning(){return this.wire.sendAction(\"is-application-running\",this.identity).then((({payload:e})=>e.data))}async quit(e=!1){try{await this._close(e),await this.wire.sendAction(\"destroy-application\",{force:e,...this.identity})}catch(e){if(![\"Remote connection has closed\",\"Could not locate the requested application\"].some((t=>e.message.includes(t))))throw e}}async _close(e=!1){try{await this.wire.sendAction(\"close-application\",{force:e,...this.identity})}catch(e){if(!e.message.includes(\"Remote connection has closed\"))throw e}}close(e=!1){return console.warn(\"Deprecation Warning: Application.close is deprecated Please use Application.quit\"),this.wire.sendAction(\"application-close\",this.identity).catch((e=>{})),this._close(e)}getChildWindows(){return this.wire.sendAction(\"get-child-windows\",this.identity).then((({payload:e})=>{const t=[];return e.data.forEach((e=>{t.push({uuid:this.identity.uuid,name:e})})),this.windowListFromIdentityList(t)}))}getManifest(){return this.wire.sendAction(\"get-application-manifest\",this.identity).then((({payload:e})=>e.data))}getParentUuid(){return this.wire.sendAction(\"get-parent-application\",this.identity).then((({payload:e})=>e.data))}getShortcuts(){return this.wire.sendAction(\"get-shortcuts\",this.identity).then((({payload:e})=>e.data))}async getViews(){const{payload:e}=await this.wire.sendAction(\"application-get-views\",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}getZoomLevel(){return this.wire.sendAction(\"get-application-zoom-level\",this.identity).then((({payload:e})=>e.data))}getWindow(){return this.wire.sendAction(\"application-get-window\",this.identity).catch((e=>{})),Promise.resolve(this.window)}registerUser(e,t){return this.wire.sendAction(\"register-user\",{userName:e,appName:t,...this.identity}).then((()=>{}))}removeTrayIcon(){return this.wire.sendAction(\"remove-tray-icon\",this.identity).then((()=>{}))}restart(){return this.wire.sendAction(\"restart-application\",this.identity).then((()=>{}))}run(){return console.warn(\"Deprecation Warning: Application.run is deprecated Please use fin.Application.start\"),this.wire.sendAction(\"application-run\",this.identity).catch((e=>{})),this._run()}_run(e={}){return this.wire.sendAction(\"run-application\",{manifestUrl:this._manifestUrl,opts:e,...this.identity}).then((()=>{}))}scheduleRestart(){return this.wire.sendAction(\"relaunch-on-close\",this.identity).then((()=>{}))}async sendApplicationLog(){const{payload:e}=await this.wire.sendAction(\"send-application-log\",this.identity);return e.data}async setJumpList(e){await this.wire.sendAction(\"set-jump-list\",{config:e,...this.identity})}setTrayIcon(e){return this.wire.sendAction(\"set-tray-icon\",{enabledIcon:e,...this.identity}).then((()=>{}))}setShortcuts(e){return this.wire.sendAction(\"set-shortcuts\",{data:e,...this.identity}).then((()=>{}))}async setShortcutQueryParams(e){await this.wire.sendAction(\"set-shortcut-query-args\",{data:e,...this.identity})}setZoomLevel(e){return this.wire.sendAction(\"set-application-zoom-level\",{level:e,...this.identity}).then((()=>{}))}async setAppLogUsername(e){await this.wire.sendAction(\"set-app-log-username\",{data:e,...this.identity})}getTrayIconInfo(){return this.wire.sendAction(\"get-tray-icon-info\",this.identity).then((({payload:e})=>e.data))}hasTrayIcon(){return this.wire.sendAction(\"has-tray-icon\",this.identity).then((({payload:e})=>e.data))}terminate(){return this.wire.sendAction(\"terminate-application\",this.identity).then((()=>{}))}wait(){return this.wire.sendAction(\"wait-for-hung-application\",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction(\"get-info\",this.identity).then((({payload:e})=>e.data))}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction(\"application-get-process-info\",this.identity);return e}async setFileDownloadLocation(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t};await this.wire.sendAction(\"set-file-download-location\",{...n,downloadLocation:e})}async getFileDownloadLocation(){const{payload:{data:e}}=await this.wire.sendAction(\"get-file-download-location\",this.identity);return e}async showTrayIconPopupMenu(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t},{payload:i}=await this.wire.sendAction(\"show-tray-icon-popup-menu\",{...n,options:e});return i.data}async closeTrayIconPopupMenu(){const{name:e}=this.wire.me,t={uuid:this.identity.uuid,name:e};await this.wire.sendAction(\"close-tray-icon-popup-menu\",{...t})}}return j.Application=i,j}function Z(){return q||(q=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(function(){if(K)return F;K=1,Object.defineProperty(F,\"__esModule\",{value:!0}),F.ApplicationModule=void 0;const e=d,t=O,n=Y();class i extends e.Base{async wrap(e){this.wire.sendAction(\"wrap-application\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}wrapSync(e){this.wire.sendAction(\"wrap-application-sync\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}async _create(e){return void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&void 0===e.isPlatformController&&(e.autoShow=!0),await this.wire.sendAction(\"create-application\",e),this.wrap({uuid:e.uuid})}create(e){return console.warn(\"Deprecation Warning: fin.Application.create is deprecated. Please use fin.Application.start\"),this.wire.sendAction(\"application-create\").catch((e=>{})),this._create(e)}async start(e){this.wire.sendAction(\"start-application\").catch((e=>{}));const t=await this._create(e);return await this.wire.sendAction(\"run-application\",{uuid:e.uuid}),t}async startManyManifests(e,t){return this.wire.sendAction(\"run-applications\",{applications:e,opts:t}).then((()=>{}))}getCurrent(){return this.wire.sendAction(\"get-current-application\").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction(\"get-current-application-sync\").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}async startFromManifest(e,t){this.wire.sendAction(\"application-start-from-manifest\").catch((e=>{}));const n=await this._createFromManifest(e);return await n._run(t),n}createFromManifest(e){return console.warn(\"Deprecation Warning: fin.Application.createFromManifest is deprecated. Please use fin.Application.startFromManifest\"),this.wire.sendAction(\"application-create-from-manifest\").catch((e=>{})),this._createFromManifest(e)}_createFromManifest(e){return this.wire.sendAction(\"get-application-manifest\",{manifestUrl:e}).then((({payload:e})=>{const t=e.data.platform?e.data.platform.uuid:e.data.startup_app.uuid;return this.wrap({uuid:t})})).then((t=>(t._manifestUrl=e,t)))}}return F.ApplicationModule=i,F}(),e),n(Y(),e)}(R)),R}H.WebContents=D;var Q={};Object.defineProperty(Q,\"__esModule\",{value:!0}),Q.promisifySubscription=void 0;var X,ee,te;function ne(){if(X)return S;X=1,Object.defineProperty(S,\"__esModule\",{value:!0}),S._Window=void 0;const e=Z(),t=H,n=J(),i=T,r=Q;class o extends t.WebContents{constructor(e,t){super(e,t,\"window\")}async createWindow(e){this.wire.sendAction(\"window-create-window\",this.identity).catch((e=>{}));const t=await(0,r.promisifySubscription)(this,\"fire-constructor-callback\");void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&(e.autoShow=!0),(0,i.handleDeprecatedWarnings)(e);const n=this.wire.environment.createChildContent({entityType:\"window\",options:e}),[o]=await Promise.all([t.getValue(),n]);let s;const{success:a}=o,c=o.data,{message:d}=c;s=a?{httpResponseCode:c.httpResponseCode,apiInjected:c.apiInjected}:{message:c.message,networkErrorCode:c.networkErrorCode,stack:c.stack};const h={message:d,cbPayload:s,success:a};try{this.getWebWindow().fin.__internal_.openerSuccessCBCalled()}catch(e){}return h.success?this:Promise.reject(h)}getAllFrames(){return this.wire.sendAction(\"get-all-frames\",this.identity).then((({payload:e})=>e.data))}getBounds(){return this.wire.sendAction(\"get-window-bounds\",this.identity).then((({payload:e})=>e.data))}center(){return this.wire.sendAction(\"center-window\",this.identity).then((()=>{}))}blur(){return this.wire.sendAction(\"blur-window\",this.identity).then((()=>{}))}bringToFront(){return this.wire.sendAction(\"bring-window-to-front\",this.identity).then((()=>{}))}animate(e,t){return this.wire.sendAction(\"animate-window\",{transitions:e,options:t,...this.identity}).then((()=>{}))}hide(){return this.wire.sendAction(\"hide-window\",this.identity).then((()=>{}))}close(e=!1){return this.wire.sendAction(\"close-window\",{force:e,...this.identity}).then((()=>{Object.setPrototypeOf(this,null)}))}focusedWebViewWasChanged(){return this.wire.sendAction(\"focused-webview-changed\",this.identity).then((()=>{}))}getNativeId(){return this.wire.sendAction(\"get-window-native-id\",this.identity).then((({payload:e})=>e.data))}async getCurrentViews(){const{payload:e}=await this.wire.sendAction(\"window-get-views\",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}disableFrame(){return console.warn(\"Function is deprecated; use disableUserMovement instead.\"),this.wire.sendAction(\"disable-window-frame\",this.identity).then((()=>{}))}disableUserMovement(){return this.wire.sendAction(\"disable-window-frame\",this.identity).then((()=>{}))}enableFrame(){return console.warn(\"Function is deprecated; use enableUserMovement instead.\"),this.wire.sendAction(\"enable-window-frame\",this.identity).then((()=>{}))}enableUserMovement(){return this.wire.sendAction(\"enable-window-frame\",this.identity).then((()=>{}))}flash(){return this.wire.sendAction(\"flash-window\",this.identity).then((()=>{}))}stopFlashing(){return this.wire.sendAction(\"stop-flash-window\",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction(\"get-window-info\",this.identity).then((({payload:e})=>e.data))}async getLayout(e){this.wire.sendAction(\"window-get-layout\",this.identity).catch((e=>{}));const t=await this.getOptions();if(!t.layout&&!t.layoutSnapshot)throw new Error(\"Window does not have a Layout\");return this.fin.Platform.Layout.wrap(e??this.identity)}getOptions(){return this.wire.sendAction(\"get-window-options\",this.identity).then((({payload:e})=>e.data))}getParentApplication(){return this.wire.sendAction(\"window-get-parent-application\",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity))}getParentWindow(){return this.wire.sendAction(\"window-get-parent-window\",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity)).then((e=>e.getWindow()))}async getSnapshot(e){const t={area:e,...this.identity};console.warn(\"Window.getSnapshot has been deprecated, please use Window.capturePage\");return(await this.wire.sendAction(\"get-window-snapshot\",t)).payload.data}getState(){return this.wire.sendAction(\"get-window-state\",this.identity).then((({payload:e})=>e.data))}getWebWindow(){return this.wire.sendAction(\"window-get-web-window\",this.identity).catch((e=>{})),this.wire.environment.getWebWindow(this.identity)}isMainWindow(){return this.wire.sendAction(\"window-is-main-window\",this.identity).catch((e=>{})),this.me.uuid===this.me.name}isShowing(){return this.wire.sendAction(\"is-window-showing\",this.identity).then((({payload:e})=>e.data))}maximize(){return this.wire.sendAction(\"maximize-window\",this.identity).then((()=>{}))}minimize(){return this.wire.sendAction(\"minimize-window\",this.identity).then((()=>{}))}moveBy(e,t,n){return this.wire.sendAction(\"move-window-by\",{deltaLeft:e,deltaTop:t,positioningOptions:n,...this.identity}).then((()=>{}))}moveTo(e,t,n){return this.wire.sendAction(\"move-window\",{left:e,top:t,positioningOptions:n,...this.identity}).then((()=>{}))}resizeBy(e,t,n,i){return this.wire.sendAction(\"resize-window-by\",{deltaWidth:Math.floor(e),deltaHeight:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}resizeTo(e,t,n,i){return this.wire.sendAction(\"resize-window\",{width:Math.floor(e),height:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}restore(){return this.wire.sendAction(\"restore-window\",this.identity).then((()=>{}))}setAsForeground(){return this.wire.sendAction(\"set-foreground-window\",this.identity).then((()=>{}))}setBounds(e,t){return this.wire.sendAction(\"set-window-bounds\",{...e,...this.identity,positioningOptions:t}).then((()=>{}))}show(e=!1){return this.wire.sendAction(\"show-window\",{force:e,...this.identity}).then((()=>{}))}showAt(e,t,n=!1){return this.wire.sendAction(\"show-at-window\",{force:n,left:Math.floor(e),top:Math.floor(t),...this.identity}).then((()=>{}))}updateOptions(e){return this.wire.sendAction(\"update-window-options\",{options:e,...this.identity}).then((()=>{}))}authenticate(e,t){return this.wire.sendAction(\"window-authenticate\",{userName:e,password:t,...this.identity}).then((()=>{}))}async showPopupMenu(e){const{payload:t}=await this.wire.sendAction(\"show-popup-menu\",{options:e,...this.identity});return t.data}async closePopupMenu(){return this.wire.sendAction(\"close-popup-menu\",{...this.identity}).then((()=>{}))}async dispatchPopupResult(e){this.wire.sendAction(\"window-dispatch-popup-result\",this.identity).catch((e=>{})),await this.wire.sendAction(\"dispatch-popup-result\",{data:e,...this.identity})}async print(e={content:\"self\"}){switch(e.content){case void 0:case\"self\":return super.print(e);case\"screenshot\":return this.wire.sendAction(\"print-screenshot\",this.identity).then((()=>{}));case\"views\":return this.wire.sendAction(\"print-views\",{...this.identity,options:e}).then((()=>{}));default:return}}}return S._Window=o,S}function ie(){return te||(te=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(function(){if(ee)return _;ee=1,Object.defineProperty(_,\"__esModule\",{value:!0}),_._WindowModule=void 0;const e=d,t=O,n=ne();class i extends e.Base{async wrap(e){this.wire.sendAction(\"window-wrap\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}wrapSync(e){this.wire.sendAction(\"window-wrap-sync\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}create(e){return this.wire.sendAction(\"create-window\").catch((e=>{})),new n._Window(this.wire,{uuid:this.me.uuid,name:e.name}).createWindow(e)}getCurrent(){if(this.wire.sendAction(\"get-current-window\").catch((e=>{})),!this.wire.me.isWindow)throw new Error(\"You are not in a Window context\");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction(\"get-current-window-sync\").catch((e=>{})),!this.wire.me.isWindow)throw new Error(\"You are not in a Window context\");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return _._WindowModule=i,_}(),e),n(ne(),e)}(M)),M}Q.promisifySubscription=async(e,t,n=(()=>!0),i)=>{let r,o,s;const a=new Promise(((e,t)=>{r=e,o=t})),c=e=>{n(e)&&(clearTimeout(s),r(e))};return await e.on(t,c),i&&(s=setTimeout((()=>o(new Error(\"event timed out\"))),i)),a.finally((()=>{e.removeListener(t,c).catch((()=>null))})),{getValue:()=>a}},Object.defineProperty(c,\"__esModule\",{value:!0}),c.System=void 0;const re=d,oe=g,se=ie(),ae=t;class ce extends re.EmitterBase{constructor(e){super(e,\"system\")}sendExternalProcessRequest(e,t){return new Promise(((n,i)=>{const r=\"external-process-exited\";let o,s,a,c;\"function\"==typeof t.listener&&(a=e=>{const n=e||{};s={topic:\"exited\",uuid:n.processUuid||\"\",exitCode:n.exitCode||0},o===e.processUuid&&(t.listener(s),c.removeListener(r,a))},this.wire.me.name||(this.wire.me.name=this.wire.me.uuid),c=new se._Window(this.wire,this.wire.me),c.on(r,a)),this.wire.sendAction(e,t).then((({payload:e})=>{o=e.data.uuid,n(e.data),s&&o===s.uuid&&(t.listener(s),c.removeListener(r,a))})).catch((e=>{c&&c.removeListener(r,a),i(e)}))}))}getVersion(){return this.wire.sendAction(\"get-version\").then((({payload:e})=>e.data))}clearCache(e){return this.wire.sendAction(\"clear-cache\",e).then((()=>{}))}deleteCacheOnExit(){return this.wire.sendAction(\"delete-cache-request\").then((()=>{}))}exit(){return this.wire.sendAction(\"exit-desktop\").then((()=>{}))}async fetchManifest(e){const{payload:{data:t}}=await this.wire.sendAction(\"fetch-manifest\",{manifestUrl:e});return t}flushCookieStore(){return this.wire.sendAction(\"flush-cookie-store\").then((()=>{}))}getAllWindows(){return this.wire.sendAction(\"get-all-windows\").then((({payload:e})=>e.data))}getAllApplications(){return this.wire.sendAction(\"get-all-applications\").then((({payload:e})=>e.data))}getCommandLineArguments(){return this.wire.sendAction(\"get-command-line-arguments\").then((({payload:e})=>e.data))}async getCrashReporterState(){const{payload:{data:{diagnosticMode:e,isRunning:t}}}=await this.wire.sendAction(\"get-crash-reporter-state\");return console.warn(\"diagnosticMode property is deprecated. It will be removed in a future version\"),{diagnosticMode:e,diagnosticsMode:e,isRunning:t}}async startCrashReporter(e){const t=e,n={...t,diagnosticMode:t.diagnosticsMode||t.diagnosticMode},{payload:{data:{diagnosticMode:i,isRunning:r}}}=await this.wire.sendAction(\"start-crash-reporter\",n);return{diagnosticMode:i,diagnosticsMode:i,isRunning:r}}getUniqueUserId(){return this.wire.sendAction(\"get-unique-user-id\").then((({payload:e})=>e.data))}getEntityInfo(e,t){return this.wire.sendAction(\"get-entity-info\",{uuid:e,name:t}).then((({payload:e})=>e.data))}getEnvironmentVariable(e){return this.wire.sendAction(\"get-environment-variable\",{environmentVariables:e}).then((({payload:e})=>e.data))}getFocusedWindow(){return this.wire.sendAction(\"get-focused-window\").then((({payload:e})=>e.data))}async isAppCertified(e){const{payload:{data:{certifiedInfo:t}}}=await this.wire.sendAction(\"is-app-certified\",{manifestUrl:e});return t}getInstalledRuntimes(){return this.wire.sendAction(\"get-installed-runtimes\").then((({payload:e})=>e.data.runtimes))}async getInstalledApps(){const{payload:{data:{installedApps:e}}}=await this.wire.sendAction(\"get-installed-apps\");return e}getLog(e){return this.wire.sendAction(\"view-log\",e).then((({payload:e})=>e.data))}getMachineId(){return this.wire.sendAction(\"get-machine-id\").then((({payload:e})=>e.data))}getMinLogLevel(){return this.wire.sendAction(\"get-min-log-level\").then((({payload:e})=>e.data))}getLogList(){return this.wire.sendAction(\"list-logs\").then((({payload:e})=>e.data))}getMonitorInfo(){return this.wire.sendAction(\"get-monitor-info\").then((({payload:e})=>e.data))}getMousePosition(){return this.wire.sendAction(\"get-mouse-position\").then((({payload:e})=>e.data))}getProcessList(){return console.warn(\"System.getProcessList has been deprecated. Please consider using our new process APIs: Window.getProcessInfo, View.getProcessInfo, Application.getProcessInfo, System.getAllProcessInfo\"),this.wire.sendAction(\"process-snapshot\").then((({payload:e})=>e.data))}async getAllProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction(\"get-all-process-info\",this.identity);return e}getProxySettings(){return this.wire.sendAction(\"get-proxy-settings\").then((({payload:e})=>e.data))}getRuntimeInfo(){return this.wire.sendAction(\"get-runtime-info\").then((({payload:e})=>e.data))}getRvmInfo(){return this.wire.sendAction(\"get-rvm-info\").then((({payload:e})=>e.data))}getHostSpecs(){return this.wire.sendAction(\"get-host-specs\").then((({payload:e})=>e.data))}getOSInfo(){return this.wire.sendAction(\"get-os-info\").then((({payload:e})=>e.data))}launchExternalProcess(e){return this.sendExternalProcessRequest(\"launch-external-process\",e)}monitorExternalProcess(e){return this.sendExternalProcessRequest(\"monitor-external-process\",e)}log(e,t){return this.wire.sendAction(\"write-to-log\",{level:e,message:t}).then((()=>{}))}openUrlWithBrowser(e){return this.wire.sendAction(\"open-url-with-browser\",{url:e}).then((()=>{}))}async registerCustomProtocol(e){if(\"object\"!=typeof e)throw new Error(\"Must provide an object with a `protocolName` property having a string value.\");await this.wire.sendAction(\"register-custom-protocol\",e)}async unregisterCustomProtocol(e){await this.wire.sendAction(\"unregister-custom-protocol\",{protocolName:e})}async getCustomProtocolState(e){return this.wire.sendAction(\"get-custom-protocol-state\",{protocolName:e}).then((({payload:e})=>e.data))}releaseExternalProcess(e){return this.wire.sendAction(\"release-external-process\",{uuid:e}).then((()=>{}))}showDeveloperTools(e){return this.wire.sendAction(\"show-developer-tools\",e).then((()=>{}))}terminateExternalProcess(e){return this.wire.sendAction(\"terminate-external-process\",e).then((()=>{}))}updateProxySettings(e){return this.wire.sendAction(\"update-proxy\",e).then((()=>{}))}async downloadAsset(e,t){const n=()=>{};let i=n,r=n;const o=new Promise(((e,t)=>{i=e,r=t}));if(\"openfin\"!==this.wire.environment.type)throw new oe.NotSupportedError(\"downloadAsset only supported in an OpenFin Render process\");const s=oe.RuntimeError.getCallSite(),a=this.wire.environment.getNextMessageId().toString(),c=`asset-download-progress-${a}`,d=`asset-download-error-${a}`,h=`asset-download-complete-${a}`,l=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},u=()=>{this.removeListener(c,l)};await Promise.all([this.on(c,l),this.once(d,(e=>{u();const{reason:t,err:n}=e;r(new oe.RuntimeError({reason:t,error:n},s))})),this.once(h,(()=>{u(),i()}))]);const p=Object.assign(e,{downloadId:a});return await this.wire.sendAction(\"download-asset\",p).catch((e=>{throw u(),e})),o}downloadRuntime(e,t){const n=oe.RuntimeError.getCallSite();return new Promise(((i,r)=>{if(\"openfin\"!==this.wire.environment.type)return void r(new oe.NotSupportedError(\"downloadRuntime only supported in an OpenFin Render process\"));const o=this.wire.environment.getNextMessageId().toString(),s=`runtime-download-progress-${o}`,a=`runtime-download-error-${o}`,c=`runtime-download-complete-${o}`,d=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},h=()=>{this.removeListener(s,d)};this.on(s,d),this.once(a,(e=>{h();const{reason:t,err:i}=e;r(new oe.RuntimeError({reason:t,error:i},n))})),this.once(c,(()=>{h(),i()}));const l=Object.assign(e,{downloadId:o});this.wire.sendAction(\"download-runtime\",l).catch((e=>{h(),r(e)}))}))}downloadPreloadScripts(e){return this.wire.sendAction(\"download-preload-scripts\",{scripts:e}).then((({payload:e})=>e.data))}getAllExternalApplications(){return this.wire.sendAction(\"get-all-external-applications\").then((({payload:e})=>e.data))}getAppAssetInfo(e){return this.wire.sendAction(\"get-app-asset-info\",e).then((({payload:e})=>e.data))}getCookies(e){const t=this.wire.environment.getUrl(),n=Object.assign(e,{url:t});return this.wire.sendAction(\"get-cookies\",n).then((({payload:e})=>e.data))}setMinLogLevel(e){return this.wire.sendAction(\"set-min-log-level\",{level:e}).then((()=>{}))}resolveUuid(e){return this.wire.sendAction(\"resolve-uuid\",{entityKey:e}).then((({payload:e})=>e.data))}executeOnRemote(e,t){return t.requestingIdentity=e,this.wire.ferryAction(t)}readRegistryValue(e,t,n){return this.wire.sendAction(\"read-registry-value\",{rootKey:e,subkey:t,value:n}).then((({payload:e})=>e.data))}registerExternalConnection(e){return this.wire.sendAction(\"register-external-connection\",{uuid:e}).then((({payload:e})=>e.data))}async getServiceConfiguration(e){if(\"string\"!=typeof e.name)throw new Error(\"Must provide an object with a `name` property having a string value\");const{name:t}=e;return this.wire.sendAction(\"get-service-configuration\",{name:t}).then((({payload:e})=>e.data))}async getSystemAppConfig(e){if(\"string\"!=typeof e)throw new Error(\"Must provide a string value for name of system app\");return this.wire.sendAction(\"get-system-app-configuration\",{name:e}).then((({payload:e})=>e.data))}async registerShutdownHandler(e){this.wire.sendAction(\"system-register-shutdown-handler\").catch((e=>{}));const{uuid:t,name:n}=this.wire.me;this.on(\"system-shutdown\",(i=>{e({proceed:()=>{this.wire.environment.raiseEvent(\"application/system-shutdown-handled\",{uuid:t,name:n,topic:\"application\"})}})}))}runRvmHealthCheck(){return this.wire.sendAction(\"run-rvm-health-check\").then((({payload:e})=>e.data))}async launchManifest(e,t={}){const{subscribe:n,...i}=t,r=i;if(n){const e=new ae.EventEmitter;n(e);const t=\"app-version-progress\",i=\"runtime-status\",o=\"app-version-complete\",s=\"app-version-error\",a=this.wire.environment.getNextMessageId().toString();r.appVersionId=a;const c=[o,t,i,s],d=e=>{const{appVersionId:t,topic:n,type:i,...r}=e;return{...r,type:c.find((e=>i.includes(e)))}},h=t=>{const n=d(t);e.emit(n.type,n)},l=()=>{this.removeListener(`${t}.${a}`,h),this.removeListener(`${i}.${a}`,h),this.removeListener(`${o}.${a}`,h),this.removeListener(`${s}.${a}`,h),this.removeListener(`${o}.${a}`,l),this.removeListener(`${s}.${a}`,l)};await Promise.all([this.on(`${t}.${a}`,h),this.on(`${i}.${a}`,h),this.once(`${o}.${a}`,h),this.once(`${s}.${a}`,h),this.once(`${o}.${a}`,l),this.once(`${s}.${a}`,l)])}return(await this.wire.sendAction(\"launch-manifest\",{manifestUrl:e,opts:r})).payload.data.manifest}async queryPermissionForCurrentContext(e){const t={uuid:this.wire.me.uuid,name:this.wire.me.name};return(await this.wire.sendAction(\"query-permission-for-current-context\",{apiName:e,identity:t})).payload.data}async enableNativeWindowIntegrationProvider(e){const{payload:t}=await this.wire.sendAction(\"enable-native-window-integration-provider\",{permissions:e});return t.data}async registerUsage({data:e,type:t}){await this.wire.sendAction(\"register-usage\",{data:e,type:t})}async getPrinters(){const{payload:e}=await this.wire.sendAction(\"system-get-printers\");return e.data}async updateProcessLoggingOptions(e){await this.wire.sendAction(\"system-update-process-logging-options\",{options:e})}async getDomainSettings(){const{payload:{data:e}}=await this.wire.sendAction(\"get-domain-settings\",this.identity);return e}async setDomainSettings(e){await this.wire.sendAction(\"set-domain-settings\",{domainSettings:e,...this.identity})}async refreshExtensions(){const{payload:e}=await this.wire.sendAction(\"refresh-extensions\");return e.data}async getInstalledExtensions(){const{payload:e}=await this.wire.sendAction(\"get-installed-extensions\");return e.data}}c.System=ce;var de={},he={};Object.defineProperty(he,\"__esModule\",{value:!0}),he.RefCounter=void 0;he.RefCounter=class{constructor(){this.topicRefMap=new Map}incRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t+1;n=i,this.topicRefMap.set(e,i)}else this.topicRefMap.set(e,1),n=1;return n}decRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t-1;this.topicRefMap.set(e,i),n=i}else n=-1;return n}actOnFirst(e,t,n){return 1===this.incRefCount(e)?t():n()}actOnLast(e,t,n){return 0===this.decRefCount(e)?t():n()}};var le={},ue={},pe={};Object.defineProperty(pe,\"__esModule\",{value:!0}),pe.ChannelBase=pe.ProtectedItems=void 0;const we=e=>async(t,n,i)=>{const r=await e(t,n,i);return void 0===r?n:r};pe.ProtectedItems=class{constructor(e,t){this.providerIdentity=e,this.close=t}};class ye{static defaultAction(e){throw new Error(`No action registered at target for ${e}`)}constructor(){this.subscriptions=new Map}async processAction(e,t,n){try{const i=this.subscriptions.has(e)?this.subscriptions.get(e):(t,n)=>(this.defaultAction??ye.defaultAction)(e,t,n),r=this.preAction?await this.preAction(e,t,n):t,o=await i(r,n);return this.postAction?await this.postAction(e,o,n):o}catch(t){if(this.errorMiddleware)return this.errorMiddleware(e,t,n);throw t}}beforeAction(e){if(this.preAction)throw new Error(\"Already registered beforeAction middleware\");this.preAction=we(e)}onError(e){if(this.errorMiddleware)throw new Error(\"Already registered error middleware\");this.errorMiddleware=e}afterAction(e){if(this.postAction)throw new Error(\"Already registered afterAction middleware\");this.postAction=we(e)}remove(e){this.subscriptions.delete(e)}setDefaultAction(e){if(this.defaultAction)throw new Error(\"default action can only be set once\");this.defaultAction=e}register(e,t){if(this.subscriptions.has(e))throw new Error(`Subscription already registered for action: ${e}. Unsubscribe before adding new subscription`);return this.subscriptions.set(e,t),!0}}pe.ChannelBase=ye;var fe,ge,me,ve=s&&s.__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)},Ce=s&&s.__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};Object.defineProperty(ue,\"__esModule\",{value:!0}),ue.ChannelClient=void 0;const be=pe,Ie=new Map;class Ee extends be.ChannelBase{static closeChannelByEndpointId(e){const t=Ie.get(e);t&&ve(t,me,\"f\").call(t)}static handleProviderDisconnect(e){for(const t of Ie.values())t.providerIdentity.channelId===e.channelId&&(t.disconnectListener(e),ve(t,me,\"f\").call(t))}constructor(e,t,n){super(),fe.set(this,void 0),ge.set(this,void 0),this.processAction=(e,t,n)=>super.processAction(e,t,n),me.set(this,(()=>{Ie.delete(this.endpointId),ve(this,ge,\"f\").close()})),Ce(this,fe,new be.ProtectedItems(e,t),\"f\"),this.disconnectListener=()=>{},this.endpointId=e.endpointId,Ce(this,ge,n,\"f\"),Ie.set(this.endpointId,this),n.receive(this.processAction)}get providerIdentity(){return ve(this,fe,\"f\").providerIdentity}async dispatch(e,t){if(ve(this,ge,\"f\").isEndpointConnected(this.providerIdentity.channelId))return ve(this,ge,\"f\").send(this.providerIdentity.channelId,e,t);throw new Error(\"The client you are trying to dispatch from is disconnected from the target provider.\")}onDisconnection(e){this.disconnectListener=t=>{try{e(t)}catch(e){throw new Error(`Error while calling the onDisconnection callback: ${e.message}`)}finally{this.disconnectListener=()=>{}}}}async disconnect(){await this.sendDisconnectAction(),ve(this,me,\"f\").call(this)}async sendDisconnectAction(){const e=ve(this,fe,\"f\");await e.close()}static async wireClose(e,t,n){const{channelName:i,uuid:r,name:o}=t;await e.sendAction(\"disconnect-from-channel\",{channelName:i,uuid:r,name:o,endpointId:n})}}ue.ChannelClient=Ee,fe=new WeakMap,ge=new WeakMap,me=new WeakMap;var xe={},Ae={};Object.defineProperty(Ae,\"__esModule\",{value:!0}),Ae.exhaustiveCheck=void 0,Ae.exhaustiveCheck=function(e,t){throw new Error(`Unsupported value: ${e}${t?`\\n Supported values are: ${t.join(\"\")}`:\"\"}`)};var Pe,Me,_e,Oe={},Se=s&&s.__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},Re=s&&s.__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)};Object.defineProperty(Oe,\"__esModule\",{value:!0}),Oe.ClassicInfo=Oe.ClassicStrategy=void 0;Oe.ClassicStrategy=class{constructor(e,t,n,i){this.messageReceiver=t,this.endpointId=n,this.providerIdentity=i,Pe.set(this,void 0),Me.set(this,new Map),_e.set(this,new Map),this.send=async(e,t,n)=>{const i=Re(this,Me,\"f\").get(e);if(!i)throw new Error(`Could not locate routing info for endpoint ${e}`);const r={...i};r.isLocalEndpointId&&delete r.endpointId,delete r.isLocalEndpointId;const o=Re(this,Pe,\"f\").sendAction(\"send-channel-message\",{...r,providerIdentity:this.providerIdentity,action:t,payload:n});Re(this,_e,\"f\").get(e)?.add(o);return(await o.catch((e=>{throw new Error(e.message)})).finally((()=>{Re(this,_e,\"f\").get(e)?.delete(o)}))).payload.data.result},this.close=async()=>{this.messageReceiver.removeEndpoint(this.providerIdentity.channelId,this.endpointId),[...Re(this,Me,\"f\").keys()].forEach((e=>this.closeEndpoint(e))),Se(this,Me,new Map,\"f\")},Se(this,Pe,e,\"f\")}onEndpointDisconnect(e,t){}receive(e){this.messageReceiver.addEndpoint(e,this.providerIdentity.channelId,this.endpointId)}async closeEndpoint(e){const t=Re(this,Me,\"f\").get(e);Re(this,Me,\"f\").delete(e);const n=Re(this,_e,\"f\").get(e);n?.forEach((n=>{const i=`Channel connection with identity uuid: ${t?.uuid} / name: ${t?.name} / endpointId: ${e} no longer connected.`;n.cancel(new Error(i))}))}isEndpointConnected(e){return Re(this,Me,\"f\").has(e)}addEndpoint(e,t){Re(this,Me,\"f\").set(e,t.endpointIdentity),Re(this,_e,\"f\").set(e,new Set)}isValidEndpointPayload(e){return\"string\"==typeof e?.endpointIdentity?.endpointId||\"string\"==typeof e?.endpointIdentity?.channelId}},Pe=new WeakMap,Me=new WeakMap,_e=new WeakMap,Oe.ClassicInfo={version:5,minimumVersion:0,type:\"classic\"};var Fe={},je={},ke={};Object.defineProperty(ke,\"__esModule\",{value:!0}),ke.errorToPOJO=void 0,ke.errorToPOJO=function(e){return{stack:e.stack,name:e.name,message:e.message,toString:()=>e.stack||e.toString()}};var Le,Te,$e=s&&s.__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)},Be=s&&s.__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};Object.defineProperty(je,\"__esModule\",{value:!0}),je.RTCEndpoint=void 0;const Ge=ke;je.RTCEndpoint=class{static isValidEndpointPayload(e){const t=e=>\"object\"==typeof e&&null!==e;return t(e)&&t(e.endpointIdentity)&&t(e.rtc)&&\"string\"==typeof e.endpointIdentity.endpointId}constructor({rtc:e,endpointIdentity:t}){this.responseMap=new Map,Le.set(this,null),Te.set(this,void 0),this.connectionStateChangeHandler=e=>{\"connected\"!==this.rtc.rtcClient.connectionState&&(this.rtc.rtcClient.removeEventListener(\"connectionstatechange\",this.connectionStateChangeHandler),this.close(),$e(this,Te,\"f\")&&$e(this,Te,\"f\").call(this))},this.send=async(e,t)=>{const n=`message-${Math.random()}`,i=new Promise(((e,t)=>{this.responseMap.set(n,{resolve:e,reject:t})}));return this.rtc.channels.request.send(JSON.stringify({action:e,payload:t,messageId:n})),i},this.close=()=>{this.responseMap.forEach((e=>e.reject(\"Connection has closed.\"))),this.responseMap=new Map,this.rtc.channels.request.close(),this.rtc.channels.response.close(),this.rtc.rtcClient.close()},this.rtc=e,this.endpointIdentity=t,this.rtc.channels.response.addEventListener(\"message\",(e=>{let{data:t}=e;e.data instanceof ArrayBuffer&&(t=(new TextDecoder).decode(e.data));const{messageId:n,payload:i,success:r,error:o}=JSON.parse(t),{resolve:s,reject:a}=this.responseMap.get(n)??{};s&&a?(this.responseMap.delete(n),r?s(i):a(o)):(console.log(\"Could not find id in responseMap.\"),console.log(e))})),this.rtc.channels.request.addEventListener(\"message\",(async e=>{let{data:n}=e;e.data instanceof ArrayBuffer&&(n=(new TextDecoder).decode(e.data));const{messageId:i,action:r,payload:o}=JSON.parse(n);if($e(this,Le,\"f\"))try{const e=await $e(this,Le,\"f\").call(this,r,o,t);this.rtc.channels.response.send(JSON.stringify({messageId:i,payload:e,success:!0}))}catch(e){\"open\"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,error:(0,Ge.errorToPOJO)(e),success:!1}))}else\"open\"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,success:!1,error:\"Connection not ready.\"}))})),this.rtc.rtcClient.addEventListener(\"connectionstatechange\",this.connectionStateChangeHandler),Object.values(this.rtc.channels).forEach((e=>{e.onclose=e=>{[...this.responseMap.values()].forEach((e=>e.reject(new Error(\"RTCDataChannel closed unexpectedly, this is most commonly caused by message size. Note: RTC Channels have a message size limit of ~255kB.\")))),this.close(),$e(this,Te,\"f\")&&$e(this,Te,\"f\").call(this)}}))}onDisconnect(e){if($e(this,Te,\"f\"))throw new Error(\"RTCEndpoint disconnectListener cannot be set twice.\");Be(this,Te,e,\"f\")}receive(e){if($e(this,Le,\"f\"))throw new Error(\"You have already set a listener for this RTC Endpoint.\");Be(this,Le,e,\"f\")}get connected(){return\"connected\"===this.rtc.rtcClient.connectionState}},Le=new WeakMap,Te=new WeakMap;var We,He,Ne,De={},Ue=s&&s.__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)},Ve=s&&s.__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};Object.defineProperty(De,\"__esModule\",{value:!0}),De.EndpointStrategy=void 0;De.EndpointStrategy=class{constructor(e,t,n){this.EndpointType=e,this.StrategyName=n,We.set(this,null),He.set(this,new Map),Ne.set(this,!0),this.send=async(e,t,n)=>this.getEndpointById(e).send(t,n),this.close=async()=>{Ue(this,Ne,\"f\")&&(Ue(this,He,\"f\").forEach((e=>e.close())),Ve(this,He,new Map,\"f\")),Ve(this,Ne,!1,\"f\")},this.isValidEndpointPayload=t}onEndpointDisconnect(e,t){this.getEndpointById(e).onDisconnect(t)}receive(e){if(Ue(this,We,\"f\"))throw new Error(`You have already set a listener for this ${this.StrategyName} Strategy`);Ve(this,We,e,\"f\"),Ue(this,He,\"f\").forEach((e=>e.receive(Ue(this,We,\"f\"))))}getEndpointById(e){const t=Ue(this,He,\"f\").get(e);if(!t)throw new Error(`Client with endpoint id ${e} is not connected`);return t}get connected(){return Ue(this,Ne,\"f\")}isEndpointConnected(e){return Ue(this,He,\"f\").has(e)}addEndpoint(e,t){if(!Ue(this,Ne,\"f\"))return void console.warn(`Adding endpoint to disconnected ${this.StrategyName} Strategy`);const n=new this.EndpointType(t);Ue(this,We,\"f\")&&n.receive(Ue(this,We,\"f\")),Ue(this,He,\"f\").set(e,n)}async closeEndpoint(e){Ue(this,He,\"f\").delete(e)}},We=new WeakMap,He=new WeakMap,Ne=new WeakMap,Object.defineProperty(Fe,\"__esModule\",{value:!0}),Fe.RTCInfo=Fe.RTCStrategy=void 0;const ze=je,Ke=De;class qe extends Ke.EndpointStrategy{constructor(){super(ze.RTCEndpoint,ze.RTCEndpoint.isValidEndpointPayload,\"RTC\")}}Fe.RTCStrategy=qe,Fe.RTCInfo={version:2,minimumVersion:0,type:\"rtc\"};var Je={};Object.defineProperty(Je,\"__esModule\",{value:!0}),Je.RTCICEManager=void 0;const Ye=d;class Ze extends Ye.EmitterBase{constructor(e){super(e,\"channel\"),this.ensureChannelOpened=e=>new Promise(((t,n)=>{if(\"open\"===e.readyState)t();else if(\"connecting\"===e.readyState){const n=()=>{e.removeEventListener(\"open\",n),t()};e.addEventListener(\"open\",n)}else n(new Error(\"This Channel has already closed\"))}))}static createDataChannelPromise(e,t){let n;const i=new Promise((e=>{n=e})),r=i=>{const o=()=>{i.channel.removeEventListener(\"open\",o),n(i.channel)};i.channel.label===e&&(i.channel.addEventListener(\"open\",o),t.removeEventListener(\"datachannel\",r))};return t.addEventListener(\"datachannel\",r),i}async listenForProviderIce(e,t){await this.on(this.createProviderEventName(e),t,{timestamp:Date.now()})}async raiseProviderIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createProviderEventName(e)),t)}async listenForClientIce(e,t){await this.on(this.createClientEventName(e),t,{timestamp:Date.now()})}async raiseClientIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createClientEventName(e)),t)}cleanupIceListeners(e){this.removeAllListeners(this.createClientEventName(e)),this.removeAllListeners(this.createProviderEventName(e))}createClientEventName(e){return`ice-client-${e}`}createProviderEventName(e){return`ice-provider-${e}`}createRouteString(e){return`channel/${e}`}createRtcPeer(){return this.wire.environment.getRtcPeer()}async startClientOffer(){const e=Math.random().toString(),t=this.createRtcPeer();t.addEventListener(\"icecandidate\",(async t=>{t.candidate&&await this.raiseClientIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForProviderIce(e,(async e=>{await t.addIceCandidate(e.candidate)}));const n={request:t.createDataChannel(\"request\"),response:t.createDataChannel(\"response\")},i=await t.createOffer();await t.setLocalDescription(i);const r=Promise.all([n.request,n.response].map(this.ensureChannelOpened)).then((()=>{}));return{rtcClient:t,channels:n,offer:i,rtcConnectionId:e,channelsOpened:r}}async finishClientOffer(e,t,n){return await e.setRemoteDescription(t),await n,!0}async createProviderAnswer(e,t){const n=this.createRtcPeer(),i=Ze.createDataChannelPromise(\"request\",n),r=Ze.createDataChannelPromise(\"response\",n);n.addEventListener(\"icecandidate\",(async t=>{t.candidate&&await this.raiseProviderIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForClientIce(e,(async e=>{await n.addIceCandidate(e.candidate)})),await n.setRemoteDescription(t);const o=await n.createAnswer();await n.setLocalDescription(o);const s=Promise.all([i,r]).then((([t,n])=>(this.cleanupIceListeners(e),{request:t,response:n})));return{rtcClient:n,answer:o,channels:s}}}Je.RTCICEManager=Ze;var Qe={},Xe={};function et(e){return[...e.split(\".\").reverse().entries()].reduce(((e,[t,n])=>e+ +n*1e4**t),0)}function tt(e,t){return et(e)>=et(t)}function nt(e){return e.split(\"/\")[0]}Object.defineProperty(Xe,\"__esModule\",{value:!0}),Xe.runtimeUuidMeetsMinimumRuntimeVersion=Xe.parseRuntimeUuid=Xe.meetsMinimumRuntimeVersion=void 0,Xe.meetsMinimumRuntimeVersion=tt,Xe.parseRuntimeUuid=nt,Xe.runtimeUuidMeetsMinimumRuntimeVersion=function(e,t){return tt(nt(e),t)};var it,rt,ot,st,at,ct=s&&s.__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)},dt=s&&s.__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};Object.defineProperty(Qe,\"__esModule\",{value:!0}),Qe.ChannelProvider=void 0;const ht=pe,lt=Xe;class ut extends ht.ChannelBase{get connections(){return[...ct(this,it,\"f\")]}static handleClientDisconnection(e,t){const n=e.connections.find((e=>e.endpointId===t.endpointId));if(n)ct(e,st,\"f\").call(e,n);else{e.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name)).forEach(ct(e,st,\"f\"))}e.disconnectListener(t)}static setProviderRemoval(e,t){ut.removalMap.set(e,t)}constructor(e,t,n){super(),it.set(this,void 0),rt.set(this,void 0),ot.set(this,void 0),st.set(this,(e=>{const t=this.connections.filter((t=>t.endpointId!==e.endpointId));ct(this,ot,\"f\").closeEndpoint(e.endpointId),dt(this,it,t,\"f\")})),this.processAction=async(e,t,n)=>(ut.clientIsMultiRuntime(n)&&!(0,lt.runtimeUuidMeetsMinimumRuntimeVersion)(n.runtimeUuid,\"18.87.56.0\")?this.handleMultiRuntimeLegacyClient(n):this.checkForClientConnection(n),super.processAction(e,t,n)),at.set(this,(()=>{ct(this,ot,\"f\").close();const e=ut.removalMap.get(this);e&&e()})),dt(this,rt,new ht.ProtectedItems(e,t),\"f\"),this.connectListener=()=>{},this.disconnectListener=()=>{},dt(this,it,[],\"f\"),dt(this,ot,n,\"f\"),n.receive(this.processAction)}dispatch(e,t,n){const i=e.endpointId??this.getEndpointIdForOpenFinId(e,t);return i&&ct(this,ot,\"f\").isEndpointConnected(i)?ct(this,ot,\"f\").send(i,t,n):Promise.reject(new Error(`Client connection with identity uuid: ${e.uuid} / name: ${e.name} / endpointId: ${i} no longer connected.`))}async processConnection(e,t){return ct(this,it,\"f\").push(e),this.connectListener(e,t)}publish(e,t){return this.connections.map((n=>ct(this,ot,\"f\").send(n.endpointId,e,t)))}onConnection(e){this.connectListener=e}onDisconnection(e){this.disconnectListener=e}async destroy(){const e=ct(this,rt,\"f\");e.providerIdentity,dt(this,it,[],\"f\"),await e.close(),ct(this,at,\"f\").call(this)}async getAllClientInfo(){return this.connections.map((e=>{const{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}=e;return{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}}))}checkForClientConnection(e){if(!this.isClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider.\\n Client Identity: {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}isClientConnected(e){return ut.clientIdentityIncludesEndpointId(e)?this.connections.some((t=>t.endpointId===e.endpointId&&t.uuid===e.uuid&&t.name===e.name)):this.isLegacyClientConnected(e)}isLegacyClientConnected(e){return this.connections.some((t=>t.uuid===e.uuid&&t.name===e.name))}handleMultiRuntimeLegacyClient(e){if(!this.isLegacyClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider. Client Identity:\\n {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}getEndpointIdForOpenFinId(e,t){const n=this.connections.filter((t=>t.name===e.name&&t.uuid===e.uuid));if(n.length>=2){const n=ct(this,rt,\"f\"),{uuid:i,name:r}=e,o=n?.providerIdentity.uuid,s=n?.providerIdentity.name;console.warn(`WARNING: Dispatch call may have unintended results. The \"to\" argument of your dispatch call is missing the\\n \"endpointId\" parameter. The identity you are dispatching to ({uuid: ${i}, name: ${r}})\\n has multiple channelClients for this channel. Your dispatched action: (${t}) from the provider:\\n ({uuid: ${o}, name: ${s}}) will only be processed by the most recently-created client.`)}return n.pop()?.endpointId}static clientIdentityIncludesEndpointId(e){return void 0!==e.endpointId}static clientIsMultiRuntime(e){return void 0!==e.runtimeUuid}static async wireClose(e,t){await e.sendAction(\"destroy-channel\",{channelName:t})}}Qe.ChannelProvider=ut,it=new WeakMap,rt=new WeakMap,ot=new WeakMap,st=new WeakMap,at=new WeakMap,ut.removalMap=new WeakMap;var pt={};Object.defineProperty(pt,\"__esModule\",{value:!0}),pt.MessageReceiver=void 0;const wt=ue,yt=d;class ft extends yt.Base{constructor(e){super(e),this.onmessage=e=>\"process-channel-message\"===e.action&&(this.processChannelMessage(e),!0),this.endpointMap=new Map,this.latestEndpointIdByChannelId=new Map,e.registerMessageHandler(this.onmessage.bind(this))}async processChannelMessage(e){const{senderIdentity:t,providerIdentity:n,action:i,ackToSender:r,payload:o,intendedTargetIdentity:s}=e.payload,a=s.channelId??s.endpointId??this.latestEndpointIdByChannelId.get(n.channelId),c=this.endpointMap.get(a);if(!c)return r.payload.success=!1,r.payload.reason=`Client connection with identity uuid: ${this.wire.me.uuid} / name: ${this.wire.me.name} / endpointId: ${a} no longer connected.`,this.wire.sendRaw(r);try{const e=await c(i,o,t);return r.payload.payload=r.payload.payload||{},r.payload.payload.result=e,this.wire.sendRaw(r)}catch(e){return r.payload.success=!1,r.payload.reason=e.message,this.wire.sendRaw(r)}}addEndpoint(e,t,n){this.endpointMap.set(n,e),t!==n&&this.latestEndpointIdByChannelId.set(t,n)}removeEndpoint(e,t){this.endpointMap.delete(t),this.latestEndpointIdByChannelId.get(e)===t&&this.latestEndpointIdByChannelId.delete(e)}checkForPreviousClientConnection(e){const t=this.latestEndpointIdByChannelId.get(e);t&&(wt.ChannelClient.closeChannelByEndpointId(t),console.warn(\"You have created a second connection to an older provider. First connection has been removed from the clientMap\"),console.warn(\"If the provider calls publish(), you may receive multiple messages.\"))}}pt.MessageReceiver=ft;var gt={};Object.defineProperty(gt,\"__esModule\",{value:!0}),gt.ProtocolManager=void 0;gt.ProtocolManager=class{constructor(e){this.ProtocolsInPreferenceOrder=e,this.DefaultClientProtocols=[\"classic\"],this.DefaultProviderProtocols=[\"classic\"],this.getClientProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultClientProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(\", \")}.`);return t},this.getProviderProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultProviderProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(\", \")}.`);return t},this.getCompatibleProtocols=(e,t)=>t.supportedProtocols.filter((t=>e.some((e=>e.type===t.type&&t.version>=e.minimumVersion&&e.version>=(t.minimumVersion??0))))).slice(0,t.maxProtocols)}};var mt={};Object.defineProperty(mt,\"__esModule\",{value:!0});class vt{static combine(e,t){return new vt(e,t)}constructor(e,t){this.primary=e,this.secondary=t}onEndpointDisconnect(e,t){this.primary.onEndpointDisconnect(e,(()=>{this.secondary.isEndpointConnected(e)||t()})),this.secondary.onEndpointDisconnect(e,(()=>{this.primary.isEndpointConnected(e)||t()}))}isValidEndpointPayload(e){return this.primary.isValidEndpointPayload(e)||this.secondary.isValidEndpointPayload(e)}async closeEndpoint(e){await this.primary.closeEndpoint(e),await this.secondary.closeEndpoint(e)}isEndpointConnected(e){return this.primary.isEndpointConnected(e)||this.secondary.isEndpointConnected(e)}async addEndpoint(e,t){this.primary.isValidEndpointPayload(t)&&await this.primary.addEndpoint(e,t),this.secondary.isValidEndpointPayload(t)&&await this.secondary.addEndpoint(e,t)}receive(e){this.primary.receive(e),this.secondary.receive(e)}send(e,t,n){return this.primary.isEndpointConnected(e)?this.primary.send(e,t,n):this.secondary.send(e,t,n)}async close(){await Promise.all([this.primary.close(),this.secondary.close()])}}mt.default=vt;var Ct,bt,It=s&&s.__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},Et=s&&s.__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)},xt=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(xe,\"__esModule\",{value:!0}),xe.ConnectionManager=void 0;const At=Ae,Pt=d,Mt=Oe,_t=Fe,Ot=Je,St=Qe,Rt=pt,Ft=gt,jt=xt(mt);class kt extends Pt.Base{static getProtocolOptionsFromStrings(e){return e.map((e=>{switch(e){case\"rtc\":return _t.RTCInfo;case\"classic\":return Mt.ClassicInfo;default:return(0,At.exhaustiveCheck)(e,[\"rtc\",\"classic\"])}}))}constructor(e){super(e),Ct.set(this,void 0),bt.set(this,void 0),this.removeChannelFromProviderMap=e=>{this.providerMap.delete(e)},this.onmessage=e=>\"process-channel-connection\"===e.action&&(this.processChannelConnection(e),!0),this.providerMap=new Map,this.protocolManager=new Ft.ProtocolManager(\"node\"===this.wire.environment.type?[\"classic\"]:[\"rtc\",\"classic\"]),It(this,Ct,new Rt.MessageReceiver(e),\"f\"),It(this,bt,new Ot.RTCICEManager(e),\"f\"),e.registerMessageHandler(this.onmessage.bind(this))}createProvider(e,t){const n=Object.assign(this.wire.environment.getDefaultChannelOptions().create,e||{}),i=this.protocolManager.getProviderProtocols(n?.protocols),r=i.map((e=>{switch(e){case\"rtc\":return new _t.RTCStrategy;case\"classic\":return new Mt.ClassicStrategy(this.wire,Et(this,Ct,\"f\"),t.channelId,t);default:return(0,At.exhaustiveCheck)(e,[\"rtc\",\"classic\"])}}));let o;if(2===r.length){const[e,t]=r;o=jt.default.combine(e,t)}else{if(1!==r.length)throw new Error(\"failed to combine strategies\");[o]=r}const s=new St.ChannelProvider(t,(()=>St.ChannelProvider.wireClose(this.wire,t.channelName)),o),a=t.channelId;return this.providerMap.set(a,{provider:s,strategy:o,supportedProtocols:kt.getProtocolOptionsFromStrings(i)}),St.ChannelProvider.setProviderRemoval(s,this.removeChannelFromProviderMap.bind(this)),s}async createClientOffer(e){const t=this.protocolManager.getClientProtocols(e?.protocols);let n;return{offer:{supportedProtocols:await Promise.all(t.map((async e=>{switch(e){case\"rtc\":{const{rtcClient:e,channels:t,offer:i,rtcConnectionId:r,channelsOpened:o}=await Et(this,bt,\"f\").startClientOffer();return n={rtcClient:e,channels:t,channelsOpened:o},{type:\"rtc\",version:_t.RTCInfo.version,payload:{offer:i,rtcConnectionId:r}}}case\"classic\":return{type:\"classic\",version:Mt.ClassicInfo.version};default:return(0,At.exhaustiveCheck)(e,[\"rtc\",\"classic\"])}}))),maxProtocols:2},rtc:n}}async createClientStrategy(e,t){t.endpointId||(t.endpointId=this.wire.environment.getNextMessageId(),Et(this,Ct,\"f\").checkForPreviousClientConnection(t.channelId));const n=t.answer??{supportedProtocols:[{type:\"classic\",version:1}]},i=(await Promise.all(n.supportedProtocols.map((async n=>\"rtc\"===n.type&&e?(await Et(this,bt,\"f\").finishClientOffer(e.rtcClient,n.payload.answer,e.channelsOpened),new _t.RTCStrategy):\"classic\"===n.type?new Mt.ClassicStrategy(this.wire,Et(this,Ct,\"f\"),t.endpointId,t):null)))).filter((e=>null!==e));let r;if(e&&!i.some((e=>e instanceof _t.RTCStrategy))&&e&&e.rtcClient.close(),i.length>=2)r=jt.default.combine(i[0],i[1]);else{if(!i.length)throw new Error(\"No compatible protocols\");[r]=i}const o={endpointIdentity:t,rtc:e};return r.addEndpoint(t.channelId,o),r}async processChannelConnection(e){const{clientIdentity:t,providerIdentity:n,ackToSender:i,payload:r,offer:o}=e.payload;t.endpointId?t.isLocalEndpointId=!1:(t.endpointId=this.wire.environment.getNextMessageId(),t.isLocalEndpointId=!0);const s=n.channelId,a=this.providerMap.get(s);if(!a)return i.payload.success=!1,i.payload.reason=`Channel \"${n.channelName}\" has been destroyed.`,this.wire.sendRaw(i);const{provider:c,strategy:d,supportedProtocols:h}=a;try{if(!(c instanceof St.ChannelProvider))throw Error(\"Cannot connect to a channel client\");const e=o??{supportedProtocols:[{type:\"classic\",version:1}],maxProtocols:1},n=this.protocolManager.getCompatibleProtocols(h,e);if(!n.length)throw new Error(\"This provider does not support any of the offered protocols.\");const s=await c.processConnection(t,r);i.payload.payload=i.payload.payload||{};let a={supportedProtocols:[],endpointPayloadPromise:Promise.resolve({endpointIdentity:t})};return a=await n.reduce((async(e,t)=>{const n=await e;if(\"rtc\"===t.type){const{answer:e,rtcClient:i,channels:r}=await Et(this,bt,\"f\").createProviderAnswer(t.payload.rtcConnectionId,t.payload.offer);n.supportedProtocols.push({type:\"rtc\",version:_t.RTCInfo.version,payload:{answer:e}}),n.endpointPayloadPromise=n.endpointPayloadPromise.then((e=>r.then((t=>({...e,rtc:{rtcClient:i,channels:t}})))))}else n.supportedProtocols.push({type:\"classic\",version:Mt.ClassicInfo.version});return n}),Promise.resolve(a)),a.endpointPayloadPromise.then((e=>d.addEndpoint(t.endpointId,e))),i.payload.payload.result=s,i.payload.payload.answer=a,this.wire.sendRaw(i)}catch(e){return i.payload.success=!1,i.payload.reason=e.message,this.wire.sendRaw(i)}}}xe.ConnectionManager=kt,Ct=new WeakMap,bt=new WeakMap;var Lt,Tt,$t,Bt=s&&s.__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},Gt=s&&s.__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)};Object.defineProperty(le,\"__esModule\",{value:!0}),le.Channel=void 0;const Wt=t,Ht=G,Nt=d,Dt=ue,Ut=xe,Vt=Qe;function zt(e){const t=Math.floor(e/10),n=Math.min(3e4,500*2**t);return new Promise((e=>{setTimeout((()=>{e(!1)}),n)}))}class Kt extends Nt.EmitterBase{constructor(e){super(e,\"channel\"),Lt.set(this,void 0),Tt.set(this,new Wt.EventEmitter),$t.set(this,new Ht.AsyncRetryableLazy((async()=>{await Promise.all([this.on(\"disconnected\",(e=>{Dt.ChannelClient.handleProviderDisconnect(e)})),this.on(\"connected\",((...e)=>{Gt(this,Tt,\"f\").emit(\"connected\",...e)}))]).catch((()=>new Error(\"error setting up channel connection listeners\")))}))),Bt(this,Lt,new Ut.ConnectionManager(e),\"f\")}async getAllChannels(){return this.wire.sendAction(\"get-all-channels\").then((({payload:e})=>e.data))}async onChannelConnect(e){await this.on(\"connected\",e)}async onChannelDisconnect(e){await this.on(\"disconnected\",e)}async safeConnect(e,t,n){const i={count:0};do{let r=()=>{};const o=new Promise((t=>{r=n=>{e===n.channelName&&t(!0)},Gt(this,Tt,\"f\").on(\"connected\",r)}));try{if(i.count>0){i.gotConnectedEvent=await Promise.race([zt(i.count),o]);const t=await this.wire.sendAction(\"connect-to-channel\",{...n,retryInfo:i});return console.log(`Successfully connected to channelName: ${e}`),t.payload.data}const t=this.wire.sendAction(\"connect-to-channel\",n);i.originalMessageId=t.messageId;return(await t).payload.data}catch(n){if(!n.message.includes(\"internal-nack\"))throw n;t&&0===i.count&&console.warn(`No channel found for channelName: ${e}. Waiting for connection...`)}finally{i.count+=1,Gt(this,Tt,\"f\").removeListener(\"connected\",r)}}while(t);throw new Error(`No channel found for channelName: ${e}.`)}async connect(e,t={}){if(await Gt(this,$t,\"f\").getValue(),!e||\"string\"!=typeof e)throw new Error(\"Please provide a channelName string to connect to a channel.\");const n={wait:!0,...this.wire.environment.getDefaultChannelOptions().connect,...t},{offer:i,rtc:r}=await Gt(this,Lt,\"f\").createClientOffer(n);let o;(this.fin.me.isFrame||this.fin.me.isView||this.fin.me.isWindow)&&(o=(await this.fin.me.getInfo()).url);const s={channelName:e,...n,offer:i,connectionUrl:o},a=await this.safeConnect(e,n.wait,s),c=await Gt(this,Lt,\"f\").createClientStrategy(r,a),d=new Dt.ChannelClient(a,(()=>Dt.ChannelClient.wireClose(this.wire,a,a.endpointId)),c);return c.onEndpointDisconnect(a.channelId,(async()=>{try{await d.sendDisconnectAction()}catch(e){console.warn(`Something went wrong during disconnect for client with uuid: ${a.uuid} / name: ${a.name} / endpointId: ${a.endpointId}.`)}finally{Dt.ChannelClient.handleProviderDisconnect(a)}})),d}async create(e,t){if(!e)throw new Error(\"Please provide a channelName to create a channel\");const{payload:{data:n}}=await this.wire.sendAction(\"create-channel\",{channelName:e}),i=Gt(this,Lt,\"f\").createProvider(t,n);return this.on(\"client-disconnected\",(t=>{t.channelName===e&&Vt.ChannelProvider.handleClientDisconnection(i,t)})),i}}le.Channel=Kt,Lt=new WeakMap,Tt=new WeakMap,$t=new WeakMap,Object.defineProperty(de,\"__esModule\",{value:!0}),de.InterAppPayload=de.InterApplicationBus=void 0;const qt=t,Jt=d,Yt=he,Zt=le,Qt=O;class Xt extends Jt.Base{constructor(e){super(e),this.events={subscriberAdded:\"subscriber-added\",subscriberRemoved:\"subscriber-removed\"},this.refCounter=new Yt.RefCounter,this.Channel=new Zt.Channel(e),this.emitter=new qt.EventEmitter,e.registerMessageHandler(this.onmessage.bind(this)),this.on=this.emitter.on.bind(this.emitter),this.removeAllListeners=this.emitter.removeAllListeners.bind(this.emitter)}async publish(e,t){await this.wire.sendAction(\"publish-message\",{topic:e,message:t,sourceWindowName:this.me.name})}async send(e,t,n){const i=(0,Qt.validateIdentity)(e);if(i)throw new Error(i);await this.wire.sendAction(\"send-message\",{destinationUuid:e.uuid,destinationWindowName:e.name,topic:t,message:n,sourceWindowName:this.me.name})}subscribe(e,t,n){const i=this.createSubscriptionKey(e.uuid,e.name||\"*\",t);return this.emitter.on(i,n),this.refCounter.actOnFirst(i,(async()=>{await this.wire.sendAction(\"subscribe\",{sourceUuid:e.uuid,sourceWindowName:e.name||\"*\",topic:t,destinationWindowName:this.me.name})}),(()=>Promise.resolve()))}unsubscribe(e,t,n){const i=e.name||\"*\",r=this.createSubscriptionKey(e.uuid,i,t);return this.emitter.removeListener(r,n),this.refCounter.actOnLast(r,(async()=>{await this.wire.sendAction(\"unsubscribe\",{sourceUuid:e.uuid,sourceWindowName:i,topic:t,destinationWindowName:this.me.name})}),(()=>new Promise((e=>e)).then((()=>{}))))}processMessage(e){const{payload:{message:t,sourceWindowName:n,sourceUuid:i,topic:r}}=e,o=[this.createSubscriptionKey(i,n,r),this.createSubscriptionKey(i,\"*\",r),this.createSubscriptionKey(\"*\",\"*\",r)],s={uuid:i,name:n};o.forEach((e=>{this.emitter.emit(e,t,s)}))}emitSubscriverEvent(e,t){const{payload:{targetName:n,uuid:i,topic:r}}=t,o={name:n,uuid:i,topic:r};this.emitter.emit(e,o)}createSubscriptionKey(e,t,n){const i=t||\"*\";if(!(e&&i&&n))throw new Error(\"Missing uuid, name, or topic string\");return function(...e){return e.map((e=>Buffer.from(`${e}`).toString(\"base64\"))).join(\"/\")}(e,i,n)}onmessage(e){const{action:t}=e;switch(t){case\"process-message\":this.processMessage(e);break;case this.events.subscriberAdded:this.emitSubscriverEvent(this.events.subscriberAdded,e);break;case this.events.subscriberRemoved:this.emitSubscriverEvent(this.events.subscriberRemoved,e)}return!0}}de.InterApplicationBus=Xt;de.InterAppPayload=class{};var en={};Object.defineProperty(en,\"__esModule\",{value:!0}),en.Clipboard=void 0;const tn=d;class nn extends tn.Base{async writeText(e){await this.wire.sendAction(\"clipboard-write-text\",e)}async readText(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-text\",{type:e});return t.data}async writeImage(e){await this.wire.sendAction(\"clipboard-write-image\",e)}async readImage(e={format:\"dataURL\"}){const{payload:t}=await this.wire.sendAction(\"clipboard-read-image\",e);return t.data}async writeHtml(e){await this.wire.sendAction(\"clipboard-write-html\",e)}async readHtml(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-html\",{type:e});return t.data}async writeRtf(e){await this.wire.sendAction(\"clipboard-write-rtf\",e)}async readRtf(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-rtf\",{type:e});return t.data}async write(e){await this.wire.sendAction(\"clipboard-write\",e)}async getAvailableFormats(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-formats\",{type:e});return t.data}}en.Clipboard=nn;var rn={},on={},sn={};Object.defineProperty(sn,\"__esModule\",{value:!0}),sn.ExternalApplication=void 0;const an=d;class cn extends an.EmitterBase{constructor(e,t){super(e,\"external-application\",t.uuid),this.identity=t}getInfo(){return this.wire.sendAction(\"get-external-application-info\",this.identity).then((({payload:e})=>e.data))}}sn.ExternalApplication=cn,Object.defineProperty(on,\"__esModule\",{value:!0}),on.ExternalApplicationModule=void 0;const dn=d,hn=sn;class ln extends dn.Base{wrap(e){return this.wire.sendAction(\"external-application-wrap\").catch((e=>{})),Promise.resolve(new hn.ExternalApplication(this.wire,{uuid:e}))}wrapSync(e){return this.wire.sendAction(\"external-application-wrap-sync\").catch((e=>{})),new hn.ExternalApplication(this.wire,{uuid:e})}}on.ExternalApplicationModule=ln,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(on,e),n(sn,e)}(rn);var un={},pn={},wn={};Object.defineProperty(wn,\"__esModule\",{value:!0}),wn._Frame=void 0;const yn=d;class fn extends yn.EmitterBase{constructor(e,t){super(e,\"frame\",t.uuid,t.name),this.identity=t}getInfo(){return this.wire.sendAction(\"get-frame-info\",this.identity).then((({payload:e})=>e.data))}getParentWindow(){return this.wire.sendAction(\"get-parent-window\",this.identity).then((({payload:e})=>e.data))}}wn._Frame=fn,Object.defineProperty(pn,\"__esModule\",{value:!0}),pn._FrameModule=void 0;const gn=d,mn=O,vn=wn;class Cn extends gn.Base{async wrap(e){this.wire.sendAction(\"frame-wrap\").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}wrapSync(e){this.wire.sendAction(\"frame-wrap-sync\").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}getCurrent(){return this.wire.sendAction(\"frame-get-current\").catch((e=>{})),Promise.resolve(new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity()))}getCurrentSync(){return this.wire.sendAction(\"frame-get-current-sync\").catch((e=>{})),new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity())}}pn._FrameModule=Cn,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(pn,e),n(wn,e)}(un);var bn={};Object.defineProperty(bn,\"__esModule\",{value:!0}),bn.GlobalHotkey=void 0;const In=d;class En extends In.EmitterBase{constructor(e){super(e,\"global-hotkey\")}async register(e,t){await this.on(e,t),await this.wire.sendAction(\"global-hotkey-register\",{hotkey:e})}async unregister(e){await this.removeAllListeners(e),await this.wire.sendAction(\"global-hotkey-unregister\",{hotkey:e})}async unregisterAll(){await Promise.all(this.eventNames().filter((e=>!(\"registered\"===e||\"unregistered\"===e))).map((e=>this.removeAllListeners(e)))),await this.wire.sendAction(\"global-hotkey-unregister-all\",{})}async isRegistered(e){const{payload:{data:t}}=await this.wire.sendAction(\"global-hotkey-is-registered\",{hotkey:e});return t}}bn.GlobalHotkey=En;var xn,An={},Pn={},Mn={},_n=s&&s.__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)};Object.defineProperty(Mn,\"__esModule\",{value:!0}),Mn.Platform=void 0;const On=d,Sn=O,Rn=new Map;class Fn extends On.EmitterBase{constructor(e,t){super(t.wire,\"application\",e.uuid),this.getClient=e=>{this.wire.sendAction(\"platform-get-client\",this.identity).catch((e=>{}));const t=e||this.identity,{uuid:n}=t;if(!Rn.has(n)){const e=_n(this,xn,\"f\").call(this,n);Rn.set(n,e)}return Rn.get(n)},xn.set(this,(async e=>{try{const t=`custom-frame-${e}`,n=await this._channel.connect(t,{wait:!1});return n.onDisconnection((()=>{Rn.delete(e)})),n}catch(t){throw Rn.delete(e),new Error(\"The targeted Platform is not currently running. Listen for application-started event for the given Uuid.\")}})),this.launchLegacyManifest=this.launchContentManifest;const n=(0,Sn.validateIdentity)(e);if(n)throw new Error(n);this._channel=t,this.identity={uuid:e.uuid},this.Layout=this.fin.Platform.Layout,this.Application=this.fin.Application.wrapSync(this.identity)}async createView(e,t,n){this.wire.sendAction(\"platform-create-view\",this.identity).catch((e=>{}));const i=await this.getClient(),r=await i.dispatch(\"create-view\",{target:t,opts:e,targetView:n});if(!r||(0,Sn.validateIdentity)(r.identity))throw new Error(`When overwriting the createView call, please return an object that has a valid 'identity' property: ${JSON.stringify(r)}`);return this.fin.View.wrapSync(r.identity)}async createWindow(e){this.wire.sendAction(\"platform-create-window\",this.identity).catch((e=>{}));const t=await this.getClient();e.reason||(e.reason=\"api-call\");const n=await t.dispatch(\"create-view-container\",e);if(!n||(0,Sn.validateIdentity)(n.identity))throw new Error(`When overwriting the createWindow call, please return an object that has a valid 'identity' property: ${JSON.stringify(n)}`);const{identity:i}=n,r=this.fin.Window.wrapSync(i);return r.name=i.name,r.uuid=i.uuid,r}async quit(){this.wire.sendAction(\"platform-quit\",this.identity).catch((e=>{}));return(await this.getClient()).dispatch(\"quit\")}async closeView(e){this.wire.sendAction(\"platform-close-view\",this.identity).catch((e=>{}));const t=await this.getClient();await t.dispatch(\"close-view\",{view:e})}async reparentView(e,t){console.warn(\"Platform.reparentView has been deprecated, please use Platform.createView\"),this.wire.sendAction(\"platform-reparent-view\",this.identity).catch((e=>{}));const n={...e,uuid:e.uuid??this.identity.uuid},i=await this.fin.View.wrap(n),r=await i.getOptions();return this.createView(r,t)}async getSnapshot(){this.wire.sendAction(\"platform-get-snapshot\",this.identity).catch((e=>{}));return(await this.getClient()).dispatch(\"get-snapshot\")}async getViewSnapshot(e){return(await this.getClient()).dispatch(\"get-view-snapshot\",{viewIdentity:e})}async applySnapshot(e,t){this.wire.sendAction(\"platform-apply-snapshot\",this.identity).catch((e=>{}));const n=\"Requested snapshot must be a valid Snapshot object, or a url or filepath to such an object.\";let i;if(\"string\"==typeof e)try{i=(await this._channel.wire.sendAction(\"get-application-manifest\",{manifestUrl:e})).payload.data}catch(e){throw new Error(`${n}: ${e}`)}else i=e;if(!i.windows)throw new Error(n);const r=await this.getClient();return await r.dispatch(\"apply-snapshot\",{snapshot:i,options:t}),this}async fetchManifest(e){return(await this.getClient()).dispatch(\"platform-fetch-manifest\",{manifestUrl:e})}async launchContentManifest(e){this.wire.sendAction(\"platform-launch-content-manifest\",this.identity).catch((()=>{}));const t=await this.getClient(),n=await this.fetchManifest(e);return t.dispatch(\"launch-into-platform\",{manifest:n,manifestUrl:e}),this}async setWindowContext(e={},t){if(this.wire.sendAction(\"platform-set-window-context\",this.identity).catch((e=>{})),!e)throw new Error(\"Please provide a serializable object or string to set the context.\");const n=await this.getClient(),{entityType:i}=t?await this.fin.System.getEntityInfo(t.uuid,t.name):this.fin.me;await n.dispatch(\"set-window-context\",{context:e,entityType:i,target:t||{uuid:this.fin.me.uuid,name:this.fin.me.name}})}async getWindowContext(e){this.wire.sendAction(\"platform-get-window-context\",this.identity).catch((e=>{}));const t=await this.getClient(),{entityType:n}=e?await this.fin.System.getEntityInfo(e.uuid,e.name):this.fin.me;return t.dispatch(\"get-window-context\",{target:e||{uuid:this.fin.me.uuid,name:this.fin.me.name},entityType:n})}async closeWindow(e,t={skipBeforeUnload:!1}){this.wire.sendAction(\"platform-close-window\",this.identity).catch((e=>{}));return(await this.getClient()).dispatch(\"close-window\",{windowId:e,options:t})}}Mn.Platform=Fn,xn=new WeakMap;var jn={},kn={},Ln={},Tn={};function $n(e){switch(e){case\"columns\":case\"grid\":case\"rows\":case\"tabs\":return!0;default:return!1}}Object.defineProperty(Tn,\"__esModule\",{value:!0}),Tn.overrideFromComposables=Tn.isValidPresetType=void 0,Tn.isValidPresetType=$n,Tn.overrideFromComposables=function(...e){return t=>e.reduceRight(((e,t)=>n=>t(e(n))),(e=>e))(t)},Tn.default={isValidPresetType:$n};var Bn={},Gn={},Wn={};Object.defineProperty(Wn,\"__esModule\",{value:!0}),Wn.ApiConsumer=void 0;Wn.ApiConsumer=class{constructor(e){this.strategy=e,this.consume=async e=>(await this.strategy.getExposedFunctions(e)).reduce(((t,n)=>({...t,[n.key]:this.strategy.createFunction(n,e)})),{})}};var Hn={},Nn={};Object.defineProperty(Nn,\"__esModule\",{value:!0}),Nn.expose=Nn.getExposedProperties=void 0;const Dn=Symbol(\"exposedProperties\");Nn.getExposedProperties=e=>e[Dn]||e.prototype[Dn]||[];Nn.expose=e=>(t,n,i)=>{t[Dn]=t[Dn]||[],t[Dn].push({key:n,descriptor:i,options:e})},Object.defineProperty(Hn,\"__esModule\",{value:!0}),Hn.ApiExposer=void 0;const Un=Nn;Hn.ApiExposer=class{constructor(e){this.strategy=e,this.exposeInstance=async(e,t)=>{const n=(0,Un.getExposedProperties)(e),i=await Promise.all(n.map((async({key:n,options:i})=>({key:n,options:await this.strategy.exposeFunction(e[n].bind(e),{key:n,options:i,meta:t})}))));await this.strategy.exposeMeta(t,i)}}};var Vn={},zn={},Kn={};Object.defineProperty(Kn,\"__esModule\",{value:!0}),Kn.ChannelsConsumer=void 0;Kn.ChannelsConsumer=class{constructor(e){this.channel=e,this.getExposedFunctions=async e=>{const{id:t}=e,{props:n}=await this.channel.dispatch(`api-meta:${t}`);return n},this.createFunction=e=>(...t)=>{const{action:n}=e.options;return this.channel.dispatch(n,{args:t})}}};var qn={};Object.defineProperty(qn,\"__esModule\",{value:!0}),qn.ChannelsExposer=void 0;qn.ChannelsExposer=class{constructor(e){this.channelProviderOrClient=e,this.exposeFunction=async(e,t)=>{const{key:n,options:i,meta:r}=t,{id:o}=r,s=`${o}.${i?.action||n}`;return await this.channelProviderOrClient.register(s,(async({args:t})=>e(...t))),{action:s}},this.exposeMeta=async({id:e},t)=>{const n=`api-meta:${e}`;await this.channelProviderOrClient.register(n,(()=>({props:t})))}}},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Kn,e),n(qn,e)}(zn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(zn,e)}(Vn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Wn,e),n(Hn,e),n(Vn,e),n(Nn,e)}(Gn);var Jn={};Object.defineProperty(Jn,\"__esModule\",{value:!0}),Jn.createRelayedDispatch=exports.relayChannelClientApi_1=Jn.relayChannelClientApi=void 0;const Yn=[\"no longer connected\",\"RTCDataChannel closed unexpectedly\",\"The client you are trying to dispatch from is disconnected from the target provider\"];exports.relayChannelClientApi_1=Jn.relayChannelClientApi=async(e,t)=>{e.register(`relay:${t}`,(({action:t,target:n,payload:i})=>e.dispatch(n,t,i))),await Promise.resolve()};Jn.createRelayedDispatch=(e,t,n,i)=>async(r,o)=>{try{return await e.dispatch(`relay:${n}`,{action:r,payload:o,target:t})}catch(e){if(s=e.message,Yn.some((e=>s.includes(e)))&&i)throw new Error(i);throw e}var s};var Zn,Qn,Xn,ei=s&&s.__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},ti=s&&s.__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)};Object.defineProperty(Bn,\"__esModule\",{value:!0}),Bn.ColumnOrRow=Bn.TabStack=Bn.LayoutNode=void 0;const ni=Gn,ii=Jn;class ri{constructor(e,t){Zn.set(this,void 0),this.isRoot=()=>ti(this,Zn,\"f\").isRoot(this.entityId),this.exists=()=>ti(this,Zn,\"f\").exists(this.entityId),this.getParent=async()=>{const e=await ti(this,Zn,\"f\").getParent(this.entityId);if(e)return ri.getEntity(e,ti(this,Zn,\"f\"))},this.createAdjacentStack=async(e,t)=>{const n=await ti(this,Zn,\"f\").createAdjacentStack(this.entityId,e,t);return ri.getEntity({entityId:n,type:\"stack\"},ti(this,Zn,\"f\"))},this.getAdjacentStacks=async e=>(await ti(this,Zn,\"f\").getAdjacentStacks({targetId:this.entityId,edge:e})).map((e=>ri.getEntity({type:\"stack\",entityId:e.entityId},ti(this,Zn,\"f\")))),ei(this,Zn,e,\"f\"),this.entityId=t}}Bn.LayoutNode=ri,Zn=new WeakMap,ri.newLayoutEntitiesClient=async(e,t,n)=>{const i=(0,ii.createRelayedDispatch)(e,n,\"layout-relay\",\"You are trying to interact with a layout component on a window that does not exist or has been destroyed.\");return new ni.ApiConsumer(new ni.ChannelsConsumer({dispatch:i})).consume({id:t})},ri.getEntity=(e,t)=>{const{entityId:n,type:i}=e;switch(i){case\"column\":case\"row\":return new si(t,n,i);case\"stack\":return new oi(t,n);default:throw new Error(`Unrecognised Layout Entity encountered ('${JSON.stringify(e)})`)}};class oi extends ri{constructor(e,t){super(e,t),Qn.set(this,void 0),this.type=\"stack\",this.getViews=()=>ti(this,Qn,\"f\").getStackViews(this.entityId),this.addView=async(e,t={index:0})=>ti(this,Qn,\"f\").addViewToStack(this.entityId,e,t),this.removeView=async e=>{await ti(this,Qn,\"f\").removeViewFromStack(this.entityId,e)},this.setActiveView=async e=>{await ti(this,Qn,\"f\").setStackActiveView(this.entityId,e)},ei(this,Qn,e,\"f\")}}Bn.TabStack=oi,Qn=new WeakMap;class si extends ri{constructor(e,t,n){super(e,t),Xn.set(this,void 0),this.getContent=async()=>(await ti(this,Xn,\"f\").getContent(this.entityId)).map((e=>ri.getEntity(e,ti(this,Xn,\"f\")))),ei(this,Xn,e,\"f\"),this.type=n}}Bn.ColumnOrRow=si,Xn=new WeakMap;var ai={};Object.defineProperty(ai,\"__esModule\",{value:!0}),ai.DEFAULT_LAYOUT_KEY=ai.LAYOUT_CONTROLLER_ID=void 0,ai.LAYOUT_CONTROLLER_ID=\"layout-entities\",ai.DEFAULT_LAYOUT_KEY=\"__default__\";var ci,di,hi,li=s&&s.__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)};Object.defineProperty(Ln,\"__esModule\",{value:!0}),Ln.Layout=void 0;const ui=G,pi=O,wi=d,yi=Tn,fi=Bn,gi=ai;class mi extends wi.Base{static getClient(e){return li(e,di,\"f\").getValue()}constructor(e,t){super(t),ci.add(this),di.set(this,new ui.Lazy((async()=>fi.LayoutNode.newLayoutEntitiesClient(await this.platform.getClient(),gi.LAYOUT_CONTROLLER_ID,this.identity)))),this.replace=async e=>{this.wire.sendAction(\"layout-replace\").catch((e=>{}));const t=await this.platform.getClient();await t.dispatch(\"replace-layout\",{target:this.identity,opts:{layout:e}})},this.replaceView=async(e,t)=>{this.wire.sendAction(\"layout-replace-view\").catch((e=>{}));const n=await this.platform.getClient();await n.dispatch(\"replace-view\",{target:this.identity,opts:{viewToReplace:e,newView:t}})},this.applyPreset=async e=>{this.wire.sendAction(\"layout-apply-preset\").catch((e=>{}));const t=await this.platform.getClient(),{presetType:n}=e;if(!n||!(0,yi.isValidPresetType)(n))throw new Error(\"Cannot apply preset layout, please include an applicable presetType property in the PresetLayoutOptions.\");await t.dispatch(\"apply-preset-layout\",{target:this.identity,opts:{presetType:n}})};const n=(0,pi.validateIdentity)(e);if(n)throw new Error(n);this.identity=e,this.platform=this.fin.Platform.wrapSync({uuid:e.uuid}),e.uuid===this.fin.me.uuid&&e.name===this.fin.me.name&&(this.init=this.fin.Platform.Layout.init)}async getConfig(){this.wire.sendAction(\"layout-get-config\").catch((e=>{}));return(await this.platform.getClient()).dispatch(\"get-frame-snapshot\",{target:this.identity})}async getCurrentViews(){this.wire.sendAction(\"layout-get-views\").catch((e=>{}));const e=await this.platform.getClient();return(await e.dispatch(\"get-layout-views\",{target:this.identity})).map((e=>this.fin.View.wrapSync(e)))}async getRootItem(){this.wire.sendAction(\"layout-get-root-item\").catch((()=>{}));const e=await li(this,di,\"f\").getValue(),t=await e.getRoot(\"layoutName\"in this.identity?this.identity:void 0);return fi.LayoutNode.getEntity(t,e)}async getStackByViewIdentity(e){this.wire.sendAction(\"layout-get-stack-by-view\").catch((()=>{}));const t=await li(this,di,\"f\").getValue(),n=await t.getStackByView(e);if(!n)throw new Error(`No stack found for view: ${e.uuid}/${e.name}`);return fi.LayoutNode.getEntity(n,t)}async addView(e,{location:t,targetView:n}={}){this.wire.sendAction(\"layout-add-view\").catch((e=>{}));const{identity:i}=await li(this,ci,\"m\",hi).call(this,\"layout-add-view\",{viewOptions:e,location:t,targetView:n});return{identity:i}}async closeView(e){this.wire.sendAction(\"layout-close-view\").catch((e=>{})),await li(this,ci,\"m\",hi).call(this,\"layout-close-view\",{viewIdentity:e})}}Ln.Layout=mi,di=new WeakMap,ci=new WeakSet,hi=async function(e,t){return(await this.platform.getClient()).dispatch(e,{target:this.identity,opts:t})};var vi,Ci,bi,Ii,Ei,xi=s&&s.__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)},Ai=s&&s.__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};Object.defineProperty(kn,\"__esModule\",{value:!0}),kn.LayoutModule=void 0;const Pi=d,Mi=Ln,_i=ai;class Oi extends Pi.Base{constructor(){super(...arguments),vi.add(this),Ci.set(this,!1),bi.set(this,null),this.init=async(e={})=>{if(this.wire.sendAction(\"layout-init\").catch((e=>{})),!this.wire.environment.layoutAllowedInContext(this.fin))throw new Error(\"Layout.init can only be called from a Window context.\");if(xi(this,Ci,\"f\"))throw new Error(\"Layout.init was already called, please use Layout.create to add additional layouts.\");\"openfin\"===this.wire.environment.type&&await this.fin.Platform.getCurrentSync().getClient(),Ai(this,Ci,!0,\"f\"),Ai(this,bi,await this.wire.environment.initLayoutManager(this.fin,this.wire,e),\"f\"),await this.wire.environment.applyLayoutSnapshot(this.fin,xi(this,bi,\"f\"),e);const t={name:this.fin.me.name,uuid:this.fin.me.uuid};if(!e.layoutManagerOverride){const e={layoutName:_i.DEFAULT_LAYOUT_KEY,...t};return xi(this,Ii,\"f\").call(this,e)}return this.wrapSync(t)},Ii.set(this,(e=>{const t=\"[Layout] You are using a deprecated property `layoutManager` - it will throw if you access it starting in v37.\",n=new Proxy({},{get(e,n){throw console.warn(`[Layout-mgr-proxy] accessing ${n.toString()}`),new Error(t)}}),i=Object.assign(this.wrapSync(e),{layoutManager:n});return new Proxy(i,{get(e,n){if(\"layoutManager\"===n)throw console.warn(`[Layout-proxy] accessing ${n.toString()}`),new Error(t);return e[n]}})})),this.getCurrentLayoutManagerSync=()=>xi(this,vi,\"m\",Ei).call(this,\"fin.Platform.Layout.getCurrentLayoutManagerSync()\"),this.create=async e=>this.wire.environment.createLayout(xi(this,vi,\"m\",Ei).call(this,\"fin.Platform.Layout.create()\"),e),this.destroy=async e=>this.wire.environment.destroyLayout(xi(this,vi,\"m\",Ei).call(this,\"fin.Platform.Layout.destroy()\"),e)}async wrap(e){return this.wire.sendAction(\"layout-wrap\").catch((e=>{})),new Mi.Layout(e,this.wire)}wrapSync(e){return this.wire.sendAction(\"layout-wrap-sync\").catch((e=>{})),new Mi.Layout(e,this.wire)}async getCurrent(){if(this.wire.sendAction(\"layout-get-current\").catch((e=>{})),\"openfin\"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error(\"You are not in a Window context. Only Windows can have a Layout.\");const{uuid:e,name:t}=this.fin.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction(\"layout-get-current-sync\").catch((e=>{})),\"openfin\"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error(\"You are not in a Window context. Only Windows can have a Layout.\");const{uuid:e,name:t}=this.fin.me;return this.wrapSync({uuid:e,name:t})}async getLayoutByViewIdentity(e){this.wire.sendAction(\"layout-get-by-view-identity\").catch((()=>{}));let t=await this.wire.environment.getViewWindowIdentity(this.fin,e);t.identity&&(t=t.identity);try{const n=this.wrapSync(t),i=await Mi.Layout.getClient(n),r=await i.getLayoutIdentityForViewOrThrow(e);return this.wrapSync(r)}catch(n){if(![\"No action registered at target for\",\"getLayoutIdentityForViewOrThrow is not a function\"].some((e=>n.message.includes(e))))throw n;if(t.uuid===t.name)throw new Error(`View identity ${JSON.stringify(e)} is not attached to any layout in provider window ${JSON.stringify(t)}.`);return this.wrapSync(t)}}}kn.LayoutModule=Oi,Ci=new WeakMap,bi=new WeakMap,Ii=new WeakMap,vi=new WeakSet,Ei=function(e){if(!xi(this,bi,\"f\"))throw new Error(`You must call init before using the API ${e}`);return xi(this,bi,\"f\")},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(kn,e),n(Ln,e)}(jn),Object.defineProperty(Pn,\"__esModule\",{value:!0}),Pn.PlatformModule=void 0;const Si=d,Ri=Mn,Fi=jn;class ji extends Si.Base{constructor(e,t){super(e),this._channel=t,this.Layout=new Fi.LayoutModule(this.wire)}async init(e){if(!fin.__internal_.isPlatform||fin.me.name!==fin.me.uuid)throw new Error(\"fin.Platform.init should only be called from a custom platform provider running in the main window of the application.\");return this.wire.environment.initPlatform(this.fin,e)}async wrap(e){return this.wire.sendAction(\"platform-wrap\").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}wrapSync(e){return this.wire.sendAction(\"platform-wrap-sync\").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}async getCurrent(){return this.wire.sendAction(\"platform-get-current\").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction(\"platform-get-current-sync\").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}start(e){return this.wire.sendAction(\"platform-start\").catch((e=>{})),new Promise((async(t,n)=>{try{const{uuid:n}=e,i=await this.fin.Application._create({...e,isPlatformController:!0});i.once(\"platform-api-ready\",(()=>t(this.wrapSync({uuid:n})))),i._run({uuid:n})}catch(e){n(e)}}))}startFromManifest(e,t){return this.wire.sendAction(\"platform-start-from-manifest\").catch((e=>{})),new Promise((async(n,i)=>{try{const i=await this.fin.Application._createFromManifest(e);i.once(\"platform-api-ready\",(()=>n(this.wrapSync({uuid:i.identity.uuid})))),i._run(t)}catch(e){i(e)}}))}}Pn.PlatformModule=ji,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Pn,e),n(Mn,e)}(An);var ki={};!function(e){Object.defineProperty(e,\"__esModule\",{value:!0}),e.getMe=e.getBaseMe=e.environmentUnsupportedMessage=void 0;const t=J(),n=un,i=ie(),r=rn;function o(e,t,n){return{...{isView:\"view\"===e,isWindow:\"window\"===e,isFrame:\"iframe\"===e,isExternal:\"external connection\"===e},uuid:t,name:n,entityType:e}}e.environmentUnsupportedMessage=\"You are not running in OpenFin.\",e.getBaseMe=o,e.getMe=function(s){const{uuid:a,name:c,entityType:d}=s.me,h={setContext(){throw new Error(e.environmentUnsupportedMessage)},addContextHandler(){throw new Error(e.environmentUnsupportedMessage)},getContextGroups(){throw new Error(e.environmentUnsupportedMessage)},joinContextGroup(){throw new Error(e.environmentUnsupportedMessage)},removeFromContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getAllClientsInContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getInfoForContextGroup(){throw new Error(e.environmentUnsupportedMessage)}},l=\"Interop API has not been instantiated. Either connection has failed or you have not declared interop in your config.\",u={setContext(){throw new Error(l)},addContextHandler(){throw new Error(l)},getContextGroups(){throw new Error(l)},joinContextGroup(){throw new Error(l)},removeFromContextGroup(){throw new Error(l)},getAllClientsInContextGroup(){throw new Error(l)},getInfoForContextGroup(){throw new Error(l)}},p={eventNames:()=>{throw new Error(e.environmentUnsupportedMessage)},emit:()=>{throw new Error(e.environmentUnsupportedMessage)},listeners:()=>{throw new Error(e.environmentUnsupportedMessage)},listenerCount:()=>{throw new Error(e.environmentUnsupportedMessage)},on:()=>{throw new Error(e.environmentUnsupportedMessage)},addListener:()=>{throw new Error(e.environmentUnsupportedMessage)},once:()=>{throw new Error(e.environmentUnsupportedMessage)},prependListener:()=>{throw new Error(e.environmentUnsupportedMessage)},prependOnceListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeAllListeners:()=>{throw new Error(e.environmentUnsupportedMessage)}};switch(d){case\"view\":return Object.assign(new t.View(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case\"window\":return Object.assign(new i._Window(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case\"iframe\":return Object.assign(new n._Frame(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case\"external connection\":return Object.assign(new r.ExternalApplication(s,{uuid:a}),o(d,a,c),{interop:u,isOpenFin:!1});default:return{...o(d,a,c),...p,interop:h,isOpenFin:!1}}}}(ki);var Li={},Ti={},$i={};Object.defineProperty($i,\"__esModule\",{value:!0}),$i.createWarningObject=$i.createUnusableObject=void 0,$i.createUnusableObject=function(e){const t=()=>{throw new Error(e)};return new Proxy({},{apply:t,construct:t,defineProperty:t,deleteProperty:t,get:t,getOwnPropertyDescriptor:t,getPrototypeOf:t,has:t,isExtensible:t,ownKeys:t,preventExtensions:t,set:t,setPrototypeOf:t})},$i.createWarningObject=function(e,t){return new Proxy(t,{get:(...t)=>(console.warn(e),Reflect.get(...t)),set:(...t)=>(console.warn(e),Reflect.set(...t)),getOwnPropertyDescriptor:(...t)=>(console.warn(e),Reflect.getOwnPropertyDescriptor(...t)),ownKeys:(...t)=>(console.warn(e),Reflect.ownKeys(...t))})};var Bi,Gi={},Wi={};var Hi={};!function(e){Object.defineProperty(e,\"__esModule\",{value:!0}),e.wrapIntentHandler=e.BROKER_ERRORS=e.generateOverrideWarning=e.generateOverrideError=e.wrapContextHandler=e.wrapInTryCatch=e.generateId=void 0;e.generateId=()=>`${Math.random()}${Date.now()}`;e.wrapInTryCatch=(e,t)=>(...n)=>{try{return e(...n)}catch(e){throw new Error((t||\"\")+e)}};e.wrapContextHandler=(e,t)=>async n=>{try{await e(n)}catch(e){throw console.error(`Error thrown by handler ${t} for context type ${n.type}: ${e}`),e}};e.generateOverrideError=(e,t)=>`You have tried to to use ${e} but ${t} has not been overridden in the Interop Broker. Please override this function. Refer to our documentation for more info.`;e.generateOverrideWarning=(e,t,n,i)=>{const{uuid:r,name:o}=n;return i?`Entity with identity: ${r}/${o} has called ${i} or ${e} but ${t} has not been overridden.`:`Entity with identity: ${r}/${o} has called ${e} but ${t} has not been overridden.`},e.BROKER_ERRORS={fireIntent:(0,e.generateOverrideError)(\"fireIntent\",\"handleFiredIntent\"),fireIntentForContext:(0,e.generateOverrideError)(\"fireIntentForContext\",\"handleFiredIntentForContext\"),getInfoForIntent:(0,e.generateOverrideError)(\"getInfoForIntent\",\"handleInfoForIntent\"),getInfoForIntentsByContext:(0,e.generateOverrideError)(\"getInfoForIntentsByContext\",\"handleInfoForIntentsByContext\"),joinSessionContextGroupWithJoinContextGroup:\"The Context Group you have tried to join is a Session Context Group. Custom Context Groups can only be defined by the Interop Broker through code or manifest configuration. Please use joinSessionContextGroup.\",fdc3Open:(0,e.generateOverrideError)(\"fdc3.open\",\"fdc3HandleOpen\"),fdc3FindInstances:(0,e.generateOverrideError)(\"fdc3.findInstances\",\"fdc3HandleFindInstances\"),fdc3GetAppMetadata:(0,e.generateOverrideError)(\"fdc3.getAppMetadata\",\"fdc3HandleGetAppMetadata\"),fdc3GetInfo:(0,e.generateOverrideError)(\"fdc3.getInfo\",\"fdc3HandleGetInfo\")};e.wrapIntentHandler=(e,t)=>async n=>{try{return e(n)}catch(e){throw console.error(`Error thrown by handler ${t}: ${e}`),e}}}(Hi);var Ni,Di,Ui={};function Vi(){if(Di)return Gi;Di=1;var e,t,n,r=s&&s.__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},o=s&&s.__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)},a=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Gi,\"__esModule\",{value:!0}),Gi.InteropBroker=void 0;const c=d,h=a(function(){if(Bi)return Wi;Bi=1,Object.defineProperty(Wi,\"__esModule\",{value:!0});const e=Cr();return Wi.default=class{constructor(e,t){this.provider=e,this.id=t,this.lastContext=void 0,this.contextGroupMap=new Map,this.clients=new Map,this.registerListeners()}registerListeners(){this.provider.register(`sessionContextGroup:getContext-${this.id}`,this.getCurrentContext.bind(this)),this.provider.register(`sessionContextGroup:setContext-${this.id}`,this.setContext.bind(this)),this.provider.register(`sessionContextGroup:handlerAdded-${this.id}`,this.handlerAdded.bind(this)),this.provider.register(`sessionContextGroup:handlerRemoved-${this.id}`,this.handlerRemoved.bind(this))}getCurrentContext(e){return e.type?this.contextGroupMap.get(e.type):this.lastContext}setContext(t,n){const{context:i}=t,r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name} not in Session Client State Map`);this.contextGroupMap.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{e.contextHandlers.get(i.type)?.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getClientState(e){return this.clients.get(e.endpointId)}async handlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(i){const e=r.contextHandlers.get(i)||[];r.contextHandlers.set(i,[...e,n]);const o=this.contextGroupMap.get(i);o&&await this.provider.dispatch(t,n,o)}else{r.globalHandler=n;const e=[...this.contextGroupMap.keys()].map((async e=>{const i=this.contextGroupMap.get(e);i&&await this.provider.dispatch(t,n,i)}));await Promise.all(e)}}handlerRemoved(e,t){const{handlerId:n}=e,i=this.clients.get(t.endpointId);i?(Array.from(i.contextHandlers).forEach((([,e])=>{const t=e.indexOf(n);t>-1&&e.splice(t,1)})),i.globalHandler===n&&(i.globalHandler=void 0)):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={contextHandlers:new Map,clientIdentity:e,globalHandler:void 0};this.clients.set(e.endpointId,t)}}onDisconnection(e){this.clients.delete(e.endpointId)}},Wi}()),l=Hi,u=a(i),p=function(){if(Ni)return Ui;Ni=1,Object.defineProperty(Ui,\"__esModule\",{value:!0}),Ui.PrivateChannelProvider=void 0;const e=Vi();return Ui.PrivateChannelProvider=class t{constructor(e,t){this.provider=e,this.id=t,this.clients=new Map,this.registerListeners(),this.contextByContextType=new Map,this.lastContext=void 0,this.provider.onConnection((e=>this.registerNewClient(e))),this.provider.onDisconnection((async e=>{const{endpointId:t}=e;this.clients.has(t)&&await this.handleClientDisconnecting(e),0===(await this.provider.getAllClientInfo()).length&&this.provider.destroy()}))}getClientState(e){return this.clients.get(e.endpointId)}registerListeners(){this.provider.register(\"broadcast\",this.broadcast.bind(this)),this.provider.register(\"getCurrentContext\",this.getCurrentContext.bind(this)),this.provider.register(\"contextHandlerAdded\",this.contextHandlerAdded.bind(this)),this.provider.register(\"contextHandlerRemoved\",this.contextHandlerRemoved.bind(this)),this.provider.register(\"nonStandardHandlerRemoved\",this.nonStandardHandlerRemoved.bind(this)),this.provider.register(\"onAddContextHandlerAdded\",this.onAddContextHandlerAdded.bind(this)),this.provider.register(\"onDisconnectHandlerAdded\",this.onDisconnectHandlerAdded.bind(this)),this.provider.register(\"onUnsubscribeHandlerAdded\",this.onUnsubscribeHandlerAdded.bind(this)),this.provider.register(\"clientDisconnecting\",((e,t)=>{this.handleClientDisconnecting(t)}))}broadcast(t,n){const{context:i}=t;if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name}, tried to call broadcast, is not connected to this Private Channel`);const r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to broadcast - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);this.contextByContextType.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{const t=e.handlerIdsByContextTypes.get(i.type);t&&t.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getCurrentContext(e,t){const{contextType:n}=e;if(!this.getClientState(t))throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call getCurrentContext, is not connected to this Private Channel`);if(void 0!==n){return this.contextByContextType.get(n)||null}return this.lastContext?this.lastContext:null}contextHandlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call addContextListener, is not connected to this Private Channel`);if(i){const e=r.handlerIdsByContextTypes.get(i)||[];r.handlerIdsByContextTypes.set(i,[...e,n])}else r.globalHandler=n;Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&e.onAddContextListenerHandlerId&&this.provider.dispatch(e.clientIdentity,e.onAddContextListenerHandlerId,i)}))}async contextHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);if(i){let e;if(i.globalHandler===n)i.globalHandler=void 0;else for(const[t,r]of i.handlerIdsByContextTypes){const i=r.indexOf(n);i>-1&&(r.splice(i,1),e=t)}const r=(await this.getConnectedClients()).map((async n=>{const{clientIdentity:i,clientIdentity:{endpointId:r},onUnsubscribeHandlerId:o}=n;r!==t.endpointId&&o&&await this.provider.dispatch(i,o,e)}));try{await Promise.all(r)}catch(e){throw console.error(`Problem when attempting to dispatch to onUnsubscribeHandlers. Error: ${e} Removing Client: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}`),new Error(e)}}else console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}.`)}nonStandardHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);i?i.onDisconnectHandlerId===n?i.onDisconnectHandlerId=void 0:i.onAddContextListenerHandlerId===n?i.onAddContextListenerHandlerId=void 0:i.onUnsubscribeHandlerId===n&&(i.onUnsubscribeHandlerId=void 0):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}onAddContextHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onAddContextListener, is not connected to this Private Channel`);n.onAddContextListenerHandlerId=i,Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&Array.from(e.handlerIdsByContextTypes.keys()).forEach((e=>{this.provider.dispatch(t,i,e)}))}))}onDisconnectHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onDisconnect, is not connected to this Private Channel`);n.onDisconnectHandlerId=i}onUnsubscribeHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onUnsubscribe, is not connected to this Private Channel`);n.onUnsubscribeHandlerId=i}removeClient(e){const t=this.getClientState(e);if(!t)throw new Error(`Client with Identity: ${e.uuid} ${e.name}, tried to call disconnect, is not connected to this Private Channel`);t.handlerIdsByContextTypes.clear(),this.clients.delete(e.endpointId)}async fireOnDisconnectForOtherClients(e){const{endpointId:t}=e,n=(await this.getConnectedClients()).map((async e=>{const{clientIdentity:{endpointId:n},onDisconnectHandlerId:i}=e;n!==t&&i&&await this.provider.dispatch(e.clientIdentity,i)}));try{await Promise.all(n)}catch(t){throw console.error(`Problem when attempting to dispatch to onDisconnectHandlers. Error: ${t} Disconnecting Client: uuid: ${e.uuid}. name: ${e.name}. endpointId: ${e.endpointId}`),new Error(t)}}async unsubscribeAll(e){const{endpointId:t}=e,n=this.clients.get(t);if(n){const t=Array.from(n.handlerIdsByContextTypes.values()).flat(),i=n.globalHandler;if(t.length>0){const n=t.map((async t=>this.contextHandlerRemoved({handlerId:t},e)));try{await Promise.all(n)}catch(e){console.error(e.message)}}if(i)try{await this.contextHandlerRemoved({handlerId:i},e)}catch(e){console.error(e.message)}}}async handleClientDisconnecting(e){await this.unsubscribeAll(e),this.removeClient(e),await this.fireOnDisconnectForOtherClients(e)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={clientIdentity:e,handlerIdsByContextTypes:new Map,globalHandler:void 0,onAddContextListenerHandlerId:void 0,onUnsubscribeHandlerId:void 0,onDisconnectHandlerId:void 0};this.clients.set(e.endpointId,t)}}async getConnectedClients(){const e=await this.provider.getAllClientInfo();return Array.from(this.clients.values()).filter((t=>{const{uuid:n,name:i}=t.clientIdentity;return e.some((e=>i===e.name&&n===e.uuid))}))}static init(e,n){return new t(e,n)}},Ui}(),w=G,y=[{id:\"green\",displayMetadata:{color:\"#00CC88\",name:\"green\"}},{id:\"purple\",displayMetadata:{color:\"#8C61FF\",name:\"purple\"}},{id:\"orange\",displayMetadata:{color:\"#FF8C4C\",name:\"orange\"}},{id:\"red\",displayMetadata:{color:\"#FF5E60\",name:\"red\"}},{id:\"pink\",displayMetadata:{color:\"#FF8FB8\",name:\"pink\"}},{id:\"yellow\",displayMetadata:{color:\"#E9FF8F\",name:\"yellow\"}}];let f=class i extends c.Base{constructor(i,s,a){super(i),e.set(this,void 0),t.set(this,void 0),n.set(this,void 0),this.getProvider=()=>o(this,n,\"f\").getValue(),this.interopClients=new Map,this.contextGroupsById=new Map,r(this,t,a.contextGroups??[...y],\"f\"),r(this,e,a.fdc3Info,\"f\"),a?.logging&&(this.logging=a.logging),this.intentClientMap=new Map,this.lastContextMap=new Map,this.sessionContextGroupMap=new Map,r(this,n,new w.Lazy(s),\"f\"),this.setContextGroupMap(),this.setupChannelProvider()}static createClosedConstructor(...e){return class extends i{constructor(...t){if(t.length){const[n,i,r]=t;if(r&&\"object\"==typeof r&&!(0,u.default)(r,e[2]))return console.warn(\"You have modified the parameters of the InteropOverride constructor. This behavior is deprecated and will be removed in a future version. You can modify these options in your manifest. Please consult our Interop docs for guidance on migrating to the new override scheme.\"),void super(e[0],e[1],r);console.warn(\"You are attempting to pass arguments to the InteropOverride constructor. This is not necessary, and these passed arguments will be ignored. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.\")}super(...e)}}}setContext({context:e},t){this.wire.sendAction(\"interop-broker-set-context\").catch((e=>{}));const n=this.getClientState(t);if(!n||!n.contextGroupId)throw n?new Error(\"You must join a context group before you can set context.\"):new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);{const{contextGroupId:t}=n;this.setContextForGroup({context:e},t)}}setContextForGroup({context:e},t){this.wire.sendAction(\"interop-broker-set-context-for-group\").catch((e=>{}));const n=this.contextGroupsById.get(t);if(!n)throw new Error(`Unable to set context for context group that isn't in the context group mapping: ${t}.`);const r=i.checkContextIntegrity(e);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(e)}`);const o=e.type;n.set(o,e),this.lastContextMap.set(t,o);Array.from(this.interopClients.values()).filter((e=>e.contextGroupId===t)).forEach((t=>{for(const[,n]of t.contextHandlers)i.isContextTypeCompatible(o,n.contextType)&&this.invokeContextHandler(t.clientIdentity,n.handlerId,e)}))}getCurrentContext(e,t){this.wire.sendAction(\"interop-broker-get-current-context\").catch((e=>{}));const n=this.getClientState(t);if(!n?.contextGroupId)throw new Error(\"You must be a member of a context group to call getCurrentContext\");const{contextGroupId:i}=n,r=this.contextGroupsById.get(i),o=this.lastContextMap.get(i),s=e?.contextType??o;return r&&s?r.get(s):void 0}async joinContextGroup({contextGroupId:e,target:t},n){if(this.wire.sendAction(\"interop-broker-join-context-group\").catch((e=>{})),this.sessionContextGroupMap.has(e))throw new Error(l.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup);if(t){i.hasEndpointId(t)&&await this.addClientToContextGroup({contextGroupId:e},t);try{const n=this.channel.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name));if(!n.length)throw new Error(`Given Identity ${t.uuid} ${t.name} is not connected to the Interop Broker.`);n.length>1&&console.warn(`More than one connection found for identity ${t.uuid} ${t.name}`);const i=[];for(const t of n)i.push(this.addClientToContextGroup({contextGroupId:e},t));await Promise.all(i)}catch(e){throw new Error(e)}}else await this.addClientToContextGroup({contextGroupId:e},n)}async addClientToContextGroup({contextGroupId:e},t){this.wire.sendAction(\"interop-broker-add-client-to-context-group\").catch((e=>{}));const n=this.getClientState(t);if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(!this.getContextGroups().find((t=>t.id===e)))throw new Error(`Attempting to join a context group that does not exist: ${e}. You may only join existing context groups.`);if(n.contextGroupId!==e){n.contextGroupId=e,await this.setCurrentContextGroupInClientOptions(t,e);const i=this.contextGroupsById.get(e);for(const[,e]of n.contextHandlers){const{contextType:n,handlerId:r}=e;if(void 0===n)i.forEach(((e,n)=>{this.invokeContextHandler(t,r,e)}));else if(i.has(n)){const e=i.get(n);e&&this.invokeContextHandler(t,r,e)}}}}async removeFromContextGroup({target:e},t){if(this.wire.sendAction(\"interop-broker-remove-from-context-group\").catch((e=>{})),e){i.hasEndpointId(e)&&await this.removeClientFromContextGroup(e);try{const t=this.channel.connections.filter((t=>t.uuid===e.uuid&&t.name===e.name));if(!t.length)throw new Error(`No connection found for given Identity ${e.uuid} ${e.name}`);t.length>1&&console.warn(`More than one connection found for identity ${e.uuid} ${e.name}`);const n=[];for(const e of t)n.push(this.removeClientFromContextGroup(e));await Promise.all(n)}catch(e){throw new Error(e)}}else await this.removeClientFromContextGroup(t)}async removeClientFromContextGroup(e){this.wire.sendAction(\"interop-broker-remove-client-from-context-group\").catch((e=>{}));const t=this.getClientState(e);t&&(t.contextGroupId=void 0),await this.setCurrentContextGroupInClientOptions(e,null)}getContextGroups(){return this.wire.sendAction(\"interop-broker-get-context-groups\").catch((e=>{})),o(this,t,\"f\").map((e=>({...e})))}getInfoForContextGroup({contextGroupId:e}){return this.wire.sendAction(\"interop-broker-get-info-for-context-group\").catch((e=>{})),this.getContextGroups().find((t=>t.id===e))}getAllClientsInContextGroup({contextGroupId:e}){this.wire.sendAction(\"interop-broker-get-all-clients-in-context-group\").catch((e=>{}));return Array.from(this.interopClients.values()).filter((t=>t.contextGroupId===e)).map((e=>e.clientIdentity))}async handleFiredIntent(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.raiseIntent\",\"InteropBroker.handleFiredIntent\",t,\"interopClient.fireIntent\");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntent)}async setIntentTarget(e,t){this.wire.sendAction(\"interop-broker-set-intent-target\").catch((e=>{}));const n=this.intentClientMap.get(t.name),i=`intent-handler-${e.name}`;if(n){const t=n.get(i);if(t){if(t.pendingIntents.push(e),t.clientIdentity&&t.isReady){const{clientIdentity:e,pendingIntents:n}=t;try{const r=n[n.length-1];await this.invokeIntentHandler(e,i,r),t.pendingIntents=[]}catch(n){console.error(`Error invoking intent handler for client ${e.uuid}/${e.name}/${e.endpointId}`),t.isReady=!1}}}else n.set(i,{isReady:!1,pendingIntents:[e]})}else{this.intentClientMap.set(t.name,new Map);const n=this.intentClientMap.get(t.name);n&&n.set(i,{isReady:!1,pendingIntents:[e]})}}async handleInfoForIntent(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.findIntent\",\"InteropBroker.handleInfoForIntent\",t,\"interopClient.getInfoForIntent\");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntent)}async handleInfoForIntentsByContext(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.findIntentsByContext\",\"InteropBroker.handleInfoForIntentsByContext\",t,\"interopClient.getInfoForIntentsByContext\");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntentsByContext)}async handleFiredIntentForContext(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.raiseIntentForContext\",\"InteropBroker.handleFiredIntentForContext\",t,\"interopClient.fireIntentForContext\");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntentForContext)}async clientDisconnected(e){}async fdc3HandleOpen({app:e,context:t},n){const i=(0,l.generateOverrideWarning)(\"fdc3.open\",\"InteropBroker.fdc3HandleOpen\",n);throw console.warn(i),new Error(l.BROKER_ERRORS.fdc3Open)}async fdc3HandleFindInstances(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.open\",\"InteropBroker.fdc3HandleFindInstances\",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3FindInstances)}async fdc3HandleGetAppMetadata(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.getAppMetadata\",\"InteropBroker.fdc3HandleGetAppMetadata\",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3GetAppMetadata)}async invokeContextHandler(e,t,n){const i=await this.getProvider();try{await i.dispatch(e,t,n)}catch(i){console.error(`Error invoking context handler ${t} for context type ${n.type} in client ${e.uuid}/${e.name}/${e.endpointId}`,i)}}async invokeIntentHandler(e,t,n){const i=await this.getProvider();await i.dispatch(e,t,n)}async fdc3HandleGetInfo(t,n){const{fdc3Version:i}=t;return{fdc3Version:i,...o(this,e,\"f\"),optionalFeatures:{OriginatingAppMetadata:!1,UserChannelMembershipAPIs:!0},appMetadata:{appId:\"\",instanceId:\"\"}}}async getAllClientInfo(){return(await this.getProvider()).getAllClientInfo()}decorateSnapshot(e){return{...e,interopSnapshotDetails:{contextGroupStates:this.getContextGroupStates()}}}applySnapshot(e,t){const n=e?.interopSnapshotDetails?.contextGroupStates;n&&(t?.closeExistingWindows||this.updateExistingClients(n),this.rehydrateContextGroupStates(n))}updateExistingClients(e){this.interopClients.forEach((t=>{const{clientIdentity:n,contextGroupId:r,contextHandlers:o}=t;if(r){const t=e[r];for(const[,e]of Object.entries(t))o.forEach((t=>{const{handlerId:r,contextType:o}=t;i.isContextTypeCompatible(e.type,o)&&this.invokeContextHandler(n,r,e)}))}}))}getContextGroupStates(){return i.toObject(this.contextGroupsById)}rehydrateContextGroupStates(e){const t=Object.entries(e);for(const[e,n]of t){const t=Object.entries(n);for(const[n,i]of t)if(this.contextGroupsById.has(e)){this.contextGroupsById.get(e).set(n,i)}else console.warn(`Attempting to set a context group that isn't in the context group mapping. Skipping context group rehydration for: ${e}`)}}contextHandlerRegistered({contextType:e,handlerId:t},n){const i={contextType:e,handlerId:t},r=this.getClientState(n);if(r?.contextHandlers.set(t,i),r&&r.contextGroupId){const{contextGroupId:i}=r,o=this.contextGroupsById.get(i);if(void 0===e)o.forEach(((e,i)=>{this.invokeContextHandler(n,t,e)}));else if(o.has(e)){const i=o.get(e);i&&this.invokeContextHandler(n,t,i)}}}async intentHandlerRegistered(e,t){const{handlerId:n}=e,i=this.intentClientMap.get(t.name),r=i?.get(n);if(i)if(r){const{pendingIntents:e}=r;r.clientIdentity=t,r.isReady=!0;try{if(e.length>0){const i=e[e.length-1];await this.invokeIntentHandler(t,n,i),r.pendingIntents=[]}}catch(e){console.error(`Error invoking intent handler: ${n} for client ${t.uuid}/${t.name}/${t.endpointId}`)}}else i.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t});else{this.intentClientMap.set(t.name,new Map);const e=this.intentClientMap.get(t.name);e&&e.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t})}}removeContextHandler({handlerId:e},t){const n=this.getClientState(t);n&&n.contextHandlers.delete(e)}handleJoinSessionContextGroup({sessionContextGroupId:e},t){try{if(!e)throw new Error(\"Failed to join session context group: must specify group id.\");const n=this.sessionContextGroupMap.get(e);if(n)n.registerNewClient(t);else{const n=new h.default(this.channel,e);n.registerNewClient(t),this.sessionContextGroupMap.set(e,n)}return{hasConflict:this.contextGroupsById.has(e)}}catch(e){throw new Error(e)}}getClientState(e){return this.interopClients.get(e.endpointId)}static toObject(e){const t=Object.fromEntries(e),n={};return Object.entries(t).forEach((([e,t])=>{const i=Object.fromEntries(t);n[e]=i})),n}static checkContextIntegrity(e){if(!e)return{isValid:!1,reason:\"No context supplied\"};if(\"object\"!=typeof e)return{isValid:!1,reason:\"Context must be an Object\"};if(!e.type)return{isValid:!1,reason:\"Context must have a type property\"};if(e.id&&\"object\"!=typeof e.id)return{isValid:!1,reason:\"Context id must be an Object populated with key-value identifiers (if set)\"};if(e.id){const{id:t}=e,n=Object.keys(t);let i=!1;if(!n.length)return{isValid:!1,reason:\"Context id must have at least one key-value identifier\"};if(n.forEach((e=>{\"string\"==typeof e&&\"string\"==typeof t[e]||(i=!0)})),i)return{isValid:!1,reason:\"Context id key-value identifiers must be of type string\"}}return e.name&&\"string\"!=typeof e.name?{isValid:!1,reason:\"Context name must be of string type (if set)\"}:{isValid:!0}}static hasEndpointId(e){return void 0!==e.endpointId}static isContextTypeCompatible(e,t){return void 0===t||e===t}setContextGroupMap(){for(const e of this.getContextGroups())this.contextGroupsById.set(e.id,new Map)}async setCurrentContextGroupInClientOptions(e,t){try{const n=await this.fin.System.getEntityInfo(e.uuid,e.name);let i;\"view\"===n.entityType?i=await this.fin.View.wrap(e):\"window\"===n.entityType&&(i=await this.fin.Window.wrap(e)),i&&await i.updateOptions({interop:{currentContextGroup:t}})}catch(e){}}async setupChannelProvider(){try{const e=await this.getProvider();this.channel=e,this.wireChannel(e)}catch(e){throw new Error(`Error setting up Interop Broker Channel Provider: ${e}`)}}wireChannel(e){e.onConnection((async(e,t)=>{if(!await this.isConnectionAuthorized(e,t))throw new Error(`Connection not authorized for ${e.uuid}, ${e.name}`);if(!e.endpointId)throw new Error(\"Version too old to be compatible with Interop. Please upgrade your runtime to a more recent version.\");const n={contextGroupId:void 0,contextHandlers:new Map,clientIdentity:e};t?.currentContextGroup&&this.contextGroupsById.has(t.currentContextGroup)&&(n.contextGroupId=t?.currentContextGroup),this.interopClients.set(e.endpointId,n)})),e.onDisconnection((e=>{this.interopClients.delete(e.endpointId);const t=this.intentClientMap.get(e.name);t&&e.uuid===this.fin.me.uuid&&t.forEach((e=>{e.isReady=!1})),this.sessionContextGroupMap.forEach((t=>{t.onDisconnection(e)})),this.clientDisconnected(e)})),e.beforeAction((async(e,t,n)=>{if(!await this.isActionAuthorized(e,t,n))throw new Error(`Action (${e}) not authorized for ${n.uuid}, ${n.name}`);this.logging?.beforeAction?.enabled&&console.log(e,t,n)})),e.afterAction(((e,t,n)=>{this.logging?.afterAction?.enabled&&console.log(e,t,n)})),e.register(\"setContext\",this.setContext.bind(this)),e.register(\"fireIntent\",this.handleFiredIntent.bind(this)),e.register(\"getCurrentContext\",this.getCurrentContext.bind(this)),e.register(\"getInfoForIntent\",this.handleInfoForIntent.bind(this)),e.register(\"getInfoForIntentsByContext\",this.handleInfoForIntentsByContext.bind(this)),e.register(\"fireIntentForContext\",this.handleFiredIntentForContext.bind(this)),e.register(\"getContextGroups\",this.getContextGroups.bind(this)),e.register(\"joinContextGroup\",this.joinContextGroup.bind(this)),e.register(\"removeFromContextGroup\",this.removeFromContextGroup.bind(this)),e.register(\"getAllClientsInContextGroup\",this.getAllClientsInContextGroup.bind(this)),e.register(\"getInfoForContextGroup\",this.getInfoForContextGroup.bind(this)),e.register(\"contextHandlerRegistered\",this.contextHandlerRegistered.bind(this)),e.register(\"intentHandlerRegistered\",this.intentHandlerRegistered.bind(this)),e.register(\"removeContextHandler\",this.removeContextHandler.bind(this)),e.register(\"sessionContextGroup:createIfNeeded\",this.handleJoinSessionContextGroup.bind(this)),e.register(\"fdc3Open\",this.fdc3HandleOpen.bind(this)),e.register(\"fdc3v2FindIntentsByContext\",this.handleInfoForIntentsByContext.bind(this)),e.register(\"fdc3FindInstances\",this.fdc3HandleFindInstances.bind(this)),e.register(\"fdc3GetAppMetadata\",this.fdc3HandleGetAppMetadata.bind(this)),e.register(\"fdc3v2GetInfo\",(async(e,t)=>this.fdc3HandleGetInfo.bind(this)(e,t))),e.register(\"createPrivateChannelProvider\",(async e=>{const{channelId:t}=e,n=await this.fin.InterApplicationBus.Channel.create(t);p.PrivateChannelProvider.init(n,t)}))}isConnectionAuthorized(e,t){return this.wire.sendAction(\"interop-broker-is-connection-authorized\").catch((e=>{})),Promise.resolve(!0)}isActionAuthorized(e,t,n){return this.wire.sendAction(\"interop-broker-is-action-authorized\").catch((e=>{})),Promise.resolve(!0)}};return Gi.InteropBroker=f,e=new WeakMap,t=new WeakMap,n=new WeakMap,Gi}var zi,Ki={},qi={},Ji=s&&s.__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},Yi=s&&s.__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)};Object.defineProperty(qi,\"__esModule\",{value:!0});const Zi=d,Qi=Hi;class Xi extends Zi.Base{constructor(e,t,n){super(e),zi.set(this,void 0),this.id=n,Ji(this,zi,t,\"f\")}async setContext(e){this.wire.sendAction(\"interop-session-context-group-set-context\").catch((e=>{}));return(await Yi(this,zi,\"f\")).dispatch(`sessionContextGroup:setContext-${this.id}`,{sessionContextGroupId:this.id,context:e})}async getCurrentContext(e){this.wire.sendAction(\"interop-session-context-group-get-context\").catch((e=>{}));return(await Yi(this,zi,\"f\")).dispatch(`sessionContextGroup:getContext-${this.id}`,{sessionContextGroupId:this.id,type:e})}async addContextHandler(e,t){if(this.wire.sendAction(\"interop-session-context-group-add-handler\").catch((e=>{})),\"function\"!=typeof e)throw new Error(\"Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.\");const n=await Yi(this,zi,\"f\");let i;return i=t?`sessionContextHandler:invoke-${this.id}-${t}-${(0,Qi.generateId)()}`:`sessionContextHandler:invoke-${this.id}`,n.register(i,(0,Qi.wrapContextHandler)(e,i)),await n.dispatch(`sessionContextGroup:handlerAdded-${this.id}`,{handlerId:i,contextType:t}),{unsubscribe:await this.createUnsubscribeCb(i)}}async createUnsubscribeCb(e){const t=await Yi(this,zi,\"f\");return async()=>{t.remove(e),await t.dispatch(`sessionContextGroup:handlerRemoved-${this.id}`,{handlerId:e})}}getUserInstance(){return{id:this.id,setContext:(0,Qi.wrapInTryCatch)(this.setContext.bind(this),\"Failed to set context: \"),getCurrentContext:(0,Qi.wrapInTryCatch)(this.getCurrentContext.bind(this),\"Failed to get context: \"),addContextHandler:(0,Qi.wrapInTryCatch)(this.addContextHandler.bind(this),\"Failed to add context handler: \")}}}qi.default=Xi,zi=new WeakMap;var er={},tr={},nr={},ir={},rr=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),or=s&&s.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,\"default\",{enumerable:!0,value:t})}:function(e,t){e.default=t}),sr=s&&s.__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)&&rr(t,e,n);return or(t,e),t};Object.defineProperty(ir,\"__esModule\",{value:!0}),ir.PrivateChannelClient=void 0;const ar=sr(Hi);var cr,dr;function hr(){if(cr)return tr;cr=1;var e,t=s&&s.__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)},n=s&&s.__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},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(tr,\"__esModule\",{value:!0}),tr.FDC3ModuleBase=void 0;const o=nr,a=Hi,c=wr(),d=r(i);return tr.FDC3ModuleBase=class{get client(){return t(this,e,\"f\").call(this)}get fin(){return this.wire.getFin()}constructor(t,i){this.wire=i,e.set(this,void 0),n(this,e,t,\"f\")}async broadcast(e){return this.wire.sendAction(\"fdc3-broadcast\").catch((e=>{})),this.client.setContext(e)}async _open(e,t){this.wire.sendAction(\"fdc3-open\").catch((e=>{}));try{return await c.InteropClient.ferryFdc3Call(this.client,\"fdc3Open\",{app:e,context:t})}catch(e){const t=e.message===a.BROKER_ERRORS.fdc3Open?\"ResolverUnavailable\":e.message;throw new Error(t)}}async _getChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:\"system\",...(0,o.getUnsupportedChannelApis)()})))}async getOrCreateChannel(e){this.wire.sendAction(\"fdc3-get-or-create-channel\").catch((e=>{}));const t=(await this._getChannels()).find((t=>t.id===e));if(t)return{...t,type:\"system\",...(0,o.getUnsupportedChannelApis)()};try{const t=await this.client.joinSessionContextGroup(e);return(0,o.buildAppChannelObject)(t)}catch(e){throw console.error(e.message),new Error(o.ChannelError.CreationFailed)}}async getSystemChannels(){return this.wire.sendAction(\"fdc3-get-system-channels\").catch((e=>{})),this._getChannels()}async joinChannel(e){this.wire.sendAction(\"fdc3-join-channel\").catch((e=>{}));try{return await this.client.joinContextGroup(e)}catch(e){if(e.message===a.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup?console.error(\"The Channel you have tried to join is an App Channel. Custom Channels can only be defined by the Interop Broker through code or manifest configuration. Please use getOrCreateChannel.\"):console.error(e.message),e.message.startsWith(\"Attempting to join a context group that does not exist\"))throw new Error(o.ChannelError.NoChannelFound);throw new Error(o.ChannelError.AccessDenied)}}async getCurrentChannel(){this.wire.sendAction(\"fdc3-get-current-channel\").catch((e=>{}));const e=await this.getCurrentContextGroupInfo();return e?this.buildChannelObject(e):null}async leaveCurrentChannel(){return this.wire.sendAction(\"fdc3-leave-current-channel\").catch((e=>{})),this.client.removeFromContextGroup()}async getCurrentContextGroupInfo(){const e=await this.client.getContextGroups(),t=e.map((async e=>this.client.getAllClientsInContextGroup(e.id))),n=(await Promise.all(t)).findIndex((e=>e.some((e=>{const{uuid:t,name:n}=e;return this.wire.me.uuid===t&&this.wire.me.name===n}))));return e[n]}async buildChannelObject(e){return{...e,type:\"system\",addContextListener:(...[e,t])=>{let n,i;\"function\"==typeof e?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),n=e):(n=t,\"string\"==typeof e&&(i=e));const r=(async()=>{let e=!0;const t=await this.client.getCurrentContext(i);return this.client.addContextHandler(((i,r)=>{if(!e||(e=!1,!(0,d.default)(t,i)))return n(i,r)}),i)})();return{...r,unsubscribe:()=>r.then((e=>e.unsubscribe()))}},broadcast:this.broadcast.bind(this),getCurrentContext:async e=>{const t=await this.client.getCurrentContext(e);return void 0===t?null:t}}}},e=new WeakMap,tr}ir.PrivateChannelClient=class{constructor(e,t){this.id=t,this.client=e,this.listeners=new Map}async broadcast(e){return this.client.dispatch(\"broadcast\",{context:e})}async getCurrentContext(e){return this.client.dispatch(\"getCurrentContext\",{contextType:e})}async addContextListener(e,t){if(\"function\"!=typeof t)throw new Error(\"Non-function argument passed to the second parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.\");let n;n=e?`contextHandler:invoke-${this.id}-${e}-${ar.generateId()}`:`contextHandler:invoke-${this.id}-${ar.generateId()}`,this.client.register(n,ar.wrapContextHandler(t,n));const i={unsubscribe:await this.createContextUnsubscribeCb(n)};return this.listeners.set(n,i),await this.client.dispatch(\"contextHandlerAdded\",{handlerId:n,contextType:e}),i}createNonStandardUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch(\"nonStandardHandlerRemoved\",{handlerId:e})}}createContextUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch(\"contextHandlerRemoved\",{handlerId:e})}}onAddContextListener(e){const t=`onContextHandlerAdded:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch(\"onAddContextHandlerAdded\",{handlerId:t}),n}onDisconnect(e){const t=`onDisconnect:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch(\"onDisconnectHandlerAdded\",{handlerId:t}),n}onUnsubscribe(e){const t=`onUnsubscribe:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch(\"onUnsubscribeHandlerAdded\",{handlerId:t}),n}async cleanUpAllSubs(){Array.from(this.listeners.keys()).forEach((e=>{this.client.remove(e),this.listeners.delete(e)}))}async disconnect(){try{await this.client.dispatch(\"clientDisconnecting\"),await this.cleanUpAllSubs(),await this.client.disconnect()}catch(e){throw new Error(e.message)}}},function(e){var t=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,\"__esModule\",{value:!0}),e.getIntentResolution=e.isChannel=e.isContext=e.connectPrivateChannel=e.buildAppChannelObject=e.buildPrivateChannelObject=e.ChannelError=e.ResultError=e.UnsupportedChannelApiError=e.getUnsupportedChannelApis=void 0;const n=Hi,r=ir,o=t(i);e.getUnsupportedChannelApis=e=>({addContextListener:()=>{throw new a(\"Channel.addContextListener\",e)},broadcast:()=>{throw new a(\"Channel.broadcast\",e)},getCurrentContext:()=>{throw new a(\"Channel.getCurrentContext\",e)}});class a extends Error{constructor(e,t=\"System\"){super(e),this.message=`Calling ${e} on an instance of a ${t} Channel returned by fdc3.get${t}Channels is not supported. If you would like to use a ${t} Channel, please use fdc3.joinChannel, fdc3.addContextListener, and fdc3.broadcast instead.`}}var c,d;e.UnsupportedChannelApiError=a,function(e){e.NoResultReturned=\"NoResultReturned\",e.IntentHandlerRejected=\"IntentHandlerRejected\"}(c=e.ResultError||(e.ResultError={})),(d=e.ChannelError||(e.ChannelError={})).NoChannelFound=\"NoChannelFound\",d.AccessDenied=\"AccessDenied\",d.CreationFailed=\"CreationFailed\";e.buildPrivateChannelObject=e=>{let t=!1;const n=()=>{if(t)throw new Error(\"Private Channel Client has been disconnected from the Private Channel\")};return{id:e.id,type:\"private\",broadcast:async t=>(n(),e.broadcast(t)),getCurrentContext:async t=>(n(),e.getCurrentContext(t)),addContextListener:async(t,i)=>{n();let r=i,o=t;\"function\"==typeof t&&(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),r=t,o=null);return e.addContextListener(o,r)},onAddContextListener:t=>(n(),e.onAddContextListener(t)),disconnect:async()=>(n(),t=!0,e.disconnect()),onDisconnect:t=>(n(),e.onDisconnect(t)),onUnsubscribe:t=>(n(),e.onUnsubscribe(t))}};e.buildAppChannelObject=e=>({id:e.id,type:\"app\",broadcast:e.setContext,getCurrentContext:async t=>{const n=await e.getCurrentContext(t);return void 0===n?null:n},addContextListener:(t,n)=>{let i,r;\"function\"==typeof t?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),i=t):(i=n,\"string\"==typeof t&&(r=t));const s=(async()=>{let t=!0;const n=await e.getCurrentContext(r);return e.addContextHandler(((e,r)=>{if(!t||(t=!1,!(0,o.default)(n,e)))return i(e,r)}),r)})();return{...s,unsubscribe:()=>s.then((e=>e.unsubscribe()))}}});e.connectPrivateChannel=async t=>{try{const n=await fin.InterApplicationBus.Channel.connect(t),i=new r.PrivateChannelClient(n,t);return(0,e.buildPrivateChannelObject)(i)}catch(e){throw new Error(`Private Channel with id: ${t} doesn't exist`)}};e.isContext=e=>{if(e&&\"object\"==typeof e&&\"type\"in e){const{type:t}=e;return\"string\"==typeof t}return!1};e.isChannel=e=>{if(e&&\"object\"==typeof e&&\"type\"in e&&\"id\"in e){const{type:t,id:n}=e;return\"string\"==typeof t&&\"string\"==typeof n&&(\"app\"===t||\"private\"===t)}return!1};e.getIntentResolution=async(t,i,r,o)=>{const s=(0,n.generateId)(),a=new Promise(((e,t)=>{fin.InterApplicationBus.subscribe({uuid:\"*\"},s,(t=>{e(t)})).catch((()=>t(new Error(\"getResult is not supported in this environment\"))))})),d=r?{target:r,intentResolutionResultId:s}:{intentResolutionResultId:s},h=o?{name:o,context:i,metadata:d}:{...i,metadata:d},l=async()=>{let n=await a;if(!n||\"object\"!=typeof n)throw new Error(c.NoResultReturned);const{error:i}=n;if(i)throw new Error(c.IntentHandlerRejected);if((0,e.isChannel)(n)){const{id:i,type:r}=n;switch(r){case\"private\":n=await(0,e.connectPrivateChannel)(i);break;case\"app\":{const r=await t.joinSessionContextGroup(i);n=(0,e.buildAppChannelObject)(r);break}}}else if(!(0,e.isContext)(n))throw new Error(c.NoResultReturned);return n},u=o?await t.fireIntent(h):await t.fireIntentForContext(h);return\"object\"!=typeof u?{source:{appId:\"\",instanceId:\"\"},intent:\"\",version:\"2.0\",getResult:l}:{...u,getResult:l}}}(nr);var lr,ur,pr={};function wr(){if(ur)return Ki;ur=1;var e,t,n=s&&s.__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},i=s&&s.__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)},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ki,\"__esModule\",{value:!0}),Ki.InteropClient=void 0;const o=d,a=r(qi),c=function(){if(dr)return er;dr=1,Object.defineProperty(er,\"__esModule\",{value:!0}),er.Fdc3Module=void 0;const e=Hi,t=hr();class n extends t.FDC3ModuleBase{async open(e,t){await super._open(e,t)}addContextListener(e,t){let n;return this.wire.sendAction(\"fdc3-add-context-listener\").catch((e=>{})),\"function\"==typeof e?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),n=this.client.addContextHandler(e)):n=this.client.addContextHandler(t,null===e?void 0:e),{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}addIntentListener(e,t){this.wire.sendAction(\"fdc3-add-intent-listener\").catch((e=>{}));const n=this.client.registerIntentHandler((e=>{const{context:n,metadata:i}=e,{metadata:r}=n,o=i?.intentResolutionResultId||r?.intentResolutionResultId;o&&this.fin.InterApplicationBus.publish(o,null).catch((()=>null)),t(e.context)}),e,{fdc3Version:\"1.2\"});return{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}async raiseIntent(t,n,i){this.wire.sendAction(\"fdc3-raise-intent\").catch((e=>{}));const r=i?{name:t,context:n,metadata:{target:i}}:{name:t,context:n};try{return await this.client.fireIntent(r)}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntent?\"ResolverUnavailable\":t.message;throw new Error(n)}}async findIntent(t,n){this.wire.sendAction(\"fdc3-find-intent\").catch((e=>{}));try{return await this.client.getInfoForIntent({name:t,context:n})}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntent?\"ResolverUnavailable\":t.message;throw new Error(n)}}async findIntentsByContext(t){this.wire.sendAction(\"fdc3-find-intents-by-context\").catch((e=>{}));try{return await this.client.getInfoForIntentsByContext(t)}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntentsByContext?\"ResolverUnavailable\":t.message;throw new Error(n)}}async raiseIntentForContext(t,n){this.wire.sendAction(\"fdc3-raise-intent-for-context\").catch((e=>{}));try{return await this.client.fireIntentForContext({...t,metadata:{target:n}})}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntentForContext?\"ResolverUnavailable\":t.message;throw new Error(n)}}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}getInfo(){return this.wire.sendAction(\"fdc3-get-info\").catch((e=>{})),{providerVersion:this.wire.environment.getAdapterVersionSync(),provider:`openfin-${this.wire.me.uuid}`,fdc3Version:\"1.2\"}}}return er.Fdc3Module=n,er}(),h=function(){if(lr)return pr;lr=1,Object.defineProperty(pr,\"__esModule\",{value:!0}),pr.Fdc3Module2=void 0;const e=hr(),t=Hi,n=wr(),i=nr,r=ir;class o extends e.FDC3ModuleBase{async open(e,t){return\"string\"==typeof e&&console.warn(\"Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).\"),super._open(e,t)}async findInstances(e){this.wire.sendAction(\"fdc3-find-instances\").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,\"fdc3FindInstances\",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3FindInstances?\"ResolverUnavailable\":e.message;throw new Error(n)}}async getAppMetadata(e){this.wire.sendAction(\"fdc3-get-app-metadata\").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,\"fdc3GetAppMetadata\",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3GetAppMetadata?\"ResolverUnavailable\":e.message;throw new Error(n)}}async addContextListener(e,t){this.wire.sendAction(\"fdc3-add-context-listener\").catch((e=>{}));const n=e=>t=>{const{contextMetadata:n,...i}=t,r=n?[{...i},n]:[t,null];e(...r)};let i=t,r=n(i);return\"function\"==typeof e?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),i=e,r=n(i),this.client.addContextHandler(r)):this.client.addContextHandler(r,null===e?void 0:e)}async findIntent(e,n,i){this.wire.sendAction(\"fdc3-find-intent\").catch((e=>{}));try{return await this.client.getInfoForIntent({name:e,context:n,metadata:{resultType:i}})}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntent?\"ResolverUnavailable\":e.message;throw new Error(n)}}async findIntentsByContext(e,i){this.wire.sendAction(\"fdc3-find-intents-by-context\").catch((e=>{}));const r=i?{context:e,metadata:{resultType:i}}:e;try{return await n.InteropClient.ferryFdc3Call(this.client,\"fdc3v2FindIntentsByContext\",r)}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntentsByContext?\"ResolverUnavailable\":e.message;throw new Error(n)}}async raiseIntent(e,n,r){this.wire.sendAction(\"fdc3-raise-intent\").catch((e=>{}));try{return\"string\"==typeof r&&console.warn(\"Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).\"),(0,i.getIntentResolution)(this.client,n,r,e)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?\"ResolverUnavailable\":e.message;throw new Error(n)}}async raiseIntentForContext(e,n){this.wire.sendAction(\"fdc3-raise-intent-for-context\").catch((e=>{}));try{return\"string\"==typeof n&&console.warn(\"Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).\"),(0,i.getIntentResolution)(this.client,e,n)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?\"ResolverUnavailable\":e.message;throw new Error(n)}}async addIntentListener(e,t){if(this.wire.sendAction(\"fdc3-add-intent-listener\").catch((e=>{})),\"string\"!=typeof e)throw new Error(\"First argument must be an Intent name\");return this.client.registerIntentHandler((async e=>{let n,i;const{context:r,metadata:o}=e,{contextMetadata:s,metadata:a,...c}=r,d=o?.intentResolutionResultId||a?.intentResolutionResultId;try{const e=a?{metadata:a,...c}:{...c};n=await t(e,s),i=n}catch(e){n=e,i={error:!0}}if(d&&this.fin.InterApplicationBus.publish(d,i).catch((()=>null)),n instanceof Error)throw new Error(n.message);return n}),e,{fdc3Version:\"2.0\"})}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}async createPrivateChannel(){const e=(0,t.generateId)();await n.InteropClient.ferryFdc3Call(this.client,\"createPrivateChannelProvider\",{channelId:e});const o=await this.fin.InterApplicationBus.Channel.connect(e),s=new r.PrivateChannelClient(o,e);return(0,i.buildPrivateChannelObject)(s)}async getUserChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:\"user\",...(0,i.getUnsupportedChannelApis)(\"User\")})))}async getSystemChannels(){return console.warn(\"This API has been deprecated. Please use fdc3.getUserChannels instead.\"),super.getSystemChannels()}async joinUserChannel(e){return super.joinChannel(e)}async joinChannel(e){return console.warn(\"This API has been deprecated. Please use fdc3.joinUserChannel instead.\"),super.joinChannel(e)}async getCurrentChannel(){const e=await super.getCurrentChannel();return e?{...e,type:\"user\",broadcast:this.broadcast.bind(this)}:null}async getInfo(){return n.InteropClient.ferryFdc3Call(this.client,\"fdc3v2GetInfo\",{fdc3Version:\"2.0\"})}}return pr.Fdc3Module2=o,pr}(),l=Hi;let u=class extends o.Base{constructor(i,r){super(i),e.set(this,void 0),t.set(this,void 0),n(this,t,new Map,\"f\"),n(this,e,r,\"f\")}async setContext(t){this.wire.sendAction(\"interop-client-set-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"setContext\",{context:t})}async addContextHandler(t,n){if(this.wire.sendAction(\"interop-client-add-context-handler\").catch((e=>{})),\"function\"!=typeof t)throw new Error(\"Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.\");const r=await i(this,e,\"f\");let o;o=n?`invokeContextHandler-${n}-${(0,l.generateId)()}`:\"invokeContextHandler\";const s=(0,l.wrapContextHandler)(t,o);return r.register(o,s),await r.dispatch(\"contextHandlerRegistered\",{handlerId:o,contextType:n}),{unsubscribe:async()=>{r.remove(o),await r.dispatch(\"removeContextHandler\",{handlerId:o})}}}async getContextGroups(){this.wire.sendAction(\"interop-client-get-context-groups\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getContextGroups\")}async joinContextGroup(t,n){this.wire.sendAction(\"interop-client-join-context-group\").catch((e=>{}));const r=await i(this,e,\"f\");if(!t)throw new Error(\"No contextGroupId specified for joinContextGroup.\");return r.dispatch(\"joinContextGroup\",{contextGroupId:t,target:n})}async removeFromContextGroup(t){this.wire.sendAction(\"interop-client-remove-from-context-group\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"removeFromContextGroup\",{target:t})}async getAllClientsInContextGroup(t){this.wire.sendAction(\"interop-client-get-all-clients-in-context-group\").catch((e=>{}));const n=await i(this,e,\"f\");if(!t)throw new Error(\"No contextGroupId specified for getAllClientsInContextGroup.\");return n.dispatch(\"getAllClientsInContextGroup\",{contextGroupId:t})}async getInfoForContextGroup(t){this.wire.sendAction(\"interop-client-get-info-for-context-group\").catch((e=>{}));const n=await i(this,e,\"f\");if(!t)throw new Error(\"No contextGroupId specified for getInfoForContextGroup.\");return n.dispatch(\"getInfoForContextGroup\",{contextGroupId:t})}async fireIntent(t){this.wire.sendAction(\"interop-client-fire-intent\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"fireIntent\",t)}async registerIntentHandler(t,n,r){this.wire.sendAction(\"interop-client-register-intent-handler\").catch((e=>{}));const o=await i(this,e,\"f\"),s=`intent-handler-${n}`,a=(0,l.wrapIntentHandler)(t,s);try{await o.register(s,a),await o.dispatch(\"intentHandlerRegistered\",{handlerId:s,...r})}catch(e){throw new Error(\"Unable to register intent handler\")}return{unsubscribe:async()=>{o.remove(s)}}}async getCurrentContext(t){this.wire.sendAction(\"interop-client-get-current-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getCurrentContext\",{contextType:t})}async getInfoForIntent(t){this.wire.sendAction(\"interop-client-get-info-for-intent\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getInfoForIntent\",t)}async getInfoForIntentsByContext(t){this.wire.sendAction(\"interop-client-get-info-for-intents-by-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getInfoForIntentsByContext\",t)}async fireIntentForContext(t){this.wire.sendAction(\"interop-client-fire-intent-for-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"fireIntentForContext\",t)}async joinSessionContextGroup(n){try{const r=i(this,t,\"f\").get(n);if(r)return r.getUserInstance();const o=await i(this,e,\"f\"),{hasConflict:s}=await o.dispatch(\"sessionContextGroup:createIfNeeded\",{sessionContextGroupId:n});s&&console.warn(`A (non-session) context group with the name \"${n}\" already exists. If you are trying to join a Context Group, call joinContextGroup instead.`);const c=new a.default(this.wire,i(this,e,\"f\"),n);return i(this,t,\"f\").set(n,c),c.getUserInstance()}catch(e){throw console.error(`Error thrown trying to create Session Context Group with id \"${n}\": ${e}`),e}}async onDisconnection(t){this.wire.sendAction(\"interop-client-add-ondisconnection-listener\").catch((e=>{}));return(await i(this,e,\"f\")).onDisconnection((e=>{const{uuid:n}=e;t({type:\"interop-broker\",topic:\"disconnected\",brokerName:n})}))}getFDC3Sync(e){switch(e){case\"1.2\":return new c.Fdc3Module((()=>this),this.wire);case\"2.0\":return new h.Fdc3Module2((()=>this),this.wire);default:throw new Error(`Invalid FDC3 version provided: ${e}. Must be '1.2' or '2.0'`)}}async getFDC3(e){return this.getFDC3Sync(e)}static async ferryFdc3Call(t,n,r){return(await i(t,e,\"f\")).dispatch(n,r||null)}};return Ki.InteropClient=u,e=new WeakMap,t=new WeakMap,Ki}var yr,fr,gr,mr={};function vr(){if(yr)return mr;yr=1,Object.defineProperty(mr,\"__esModule\",{value:!0}),mr.overrideCheck=mr.checkFDC32Overrides=mr.getDefaultViewFdc3VersionFromAppInfo=void 0;const e=Vi();function t(t){return[\"fdc3HandleFindInstances\",\"handleInfoForIntent\",\"handleInfoForIntentsByContext\",\"fdc3HandleGetAppMetadata\",\"fdc3HandleGetInfo\",\"fdc3HandleOpen\",\"handleFiredIntent\",\"handleFiredIntentForContext\"].filter((n=>t[n]===e.InteropBroker.prototype[n]))}return mr.getDefaultViewFdc3VersionFromAppInfo=function({manifest:e,initialOptions:t}){const n=e?.platform?.defaultViewOptions?.fdc3InteropApi??t.defaultViewOptions?.fdc3InteropApi;return[\"1.2\",\"2.0\"].includes(n??\"\")?n:void 0},mr.checkFDC32Overrides=t,mr.overrideCheck=function(e,n){if(n&&\"2.0\"===n){const n=t(e);n.length>0&&console.warn(`WARNING: FDC3 2.0 has been set as a default option for Views in this Platform, but the required InteropBroker APIs for FDC3 2.0 compliance have not all been overridden.\\nThe following APIs need to be overridden:\\n${n.join(\"\\n\")}`)}},mr}function Cr(){return gr||(gr=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),i=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),i(function(){if(fr)return Ti;fr=1;var e=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ti,\"__esModule\",{value:!0}),Ti.InteropModule=void 0;const t=e(n),i=$i,r=d,o=Vi(),a=wr(),c=vr(),h=Tn,l=e=>new e,u=\"You have attempted to use or modify InteropBroker parameters, which is not allowed. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.\";class p extends r.Base{async init(e,n=l){this.wire.sendAction(\"interop-init\").catch((()=>{}));const r=await this.wire.environment.getInteropInfo(this.wire.getFin()),s=(0,i.createUnusableObject)(u),a=(0,i.createWarningObject)(u,(0,t.default)(r)),d=async()=>{throw new Error(u)},p=o.InteropBroker.createClosedConstructor(this.wire,(()=>this.fin.InterApplicationBus.Channel.create(`interop-broker-${e}`)),r);let w;return w=Array.isArray(n)?new((0,h.overrideFromComposables)(...n)(p))(s,d,a):await n(p,s,d,a),(0,c.overrideCheck)(w,r.fdc3Version),w}connectSync(e,t){return this.wire.sendAction(\"interop-connect-sync\").catch((()=>{})),new a.InteropClient(this.wire,this.wire.environment.whenReady().then((()=>this.fin.InterApplicationBus.Channel.connect(`interop-broker-${e}`,{payload:t}))))}}return Ti.InteropModule=p,Ti}(),e),i(wr(),e),i(Vi(),e)}(Li)),Li}var br={},Ir={},Er={},xr={};Object.defineProperty(xr,\"__esModule\",{value:!0}),xr.getSnapshotSourceChannelName=void 0;xr.getSnapshotSourceChannelName=e=>`snapshot-source-provider-${e.uuid}`;var Ar,Pr,Mr,_r,Or,Sr=s&&s.__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},Rr=s&&s.__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)};Object.defineProperty(Er,\"__esModule\",{value:!0}),Er.SnapshotSource=void 0;const Fr=d,jr=xr,kr=new Map;class Lr extends Fr.Base{constructor(e,t){super(e),Ar.set(this,void 0),Pr.set(this,(()=>(kr.has(this.identity.uuid)||kr.set(this.identity.uuid,{eventFired:null,clientPromise:null}),kr.get(this.identity.uuid)))),Mr.set(this,(()=>(Rr(this,Pr,\"f\").call(this).clientPromise||(Rr(this,Pr,\"f\").call(this).clientPromise=Rr(this,_r,\"f\").call(this)),Rr(this,Pr,\"f\").call(this).clientPromise))),_r.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);try{Rr(this,Pr,\"f\").call(this).eventFired||await Rr(this,Or,\"f\").call(this);const t=await this.fin.InterApplicationBus.Channel.connect(e,{wait:!1});return t.onDisconnection((()=>{Rr(this,Pr,\"f\").call(this).clientPromise=null,Rr(this,Pr,\"f\").call(this).eventFired=null})),t}catch(e){throw Rr(this,Pr,\"f\").call(this).clientPromise=null,new Error(\"The targeted SnapshotSource is not currently initialized. Await this object's ready() method.\")}})),Or.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);let t,n;const i=new Promise(((e,i)=>{t=e,n=i}));Rr(this,Pr,\"f\").call(this).eventFired=i;const r=async i=>{try{i.channelName===e&&(t(),await this.fin.InterApplicationBus.Channel.removeListener(\"connected\",r))}catch(e){n(e)}};await this.fin.InterApplicationBus.Channel.on(\"connected\",r)})),Sr(this,Ar,t,\"f\")}get identity(){return Rr(this,Ar,\"f\")}async ready(){this.wire.sendAction(\"snapshot-source-ready\").catch((e=>{}));try{await Rr(this,Mr,\"f\").call(this)}catch(e){await Rr(this,Pr,\"f\").call(this).eventFired}}async getSnapshot(){this.wire.sendAction(\"snapshot-source-get-snapshot\").catch((e=>{}));const e=await Rr(this,Mr,\"f\").call(this),t=await e.dispatch(\"get-snapshot\");return(await t).snapshot}async applySnapshot(e){this.wire.sendAction(\"snapshot-source-apply-snapshot\").catch((e=>{}));return(await Rr(this,Mr,\"f\").call(this)).dispatch(\"apply-snapshot\",{snapshot:e})}}Er.SnapshotSource=Lr,Ar=new WeakMap,Pr=new WeakMap,Mr=new WeakMap,_r=new WeakMap,Or=new WeakMap,Object.defineProperty(Ir,\"__esModule\",{value:!0}),Ir.SnapshotSourceModule=void 0;const Tr=d,$r=Er,Br=xr;class Gr extends Tr.Base{async init(e){if(this.wire.sendAction(\"snapshot-source-init\").catch((e=>{})),\"object\"!=typeof e||\"function\"!=typeof e.getSnapshot||\"function\"!=typeof e.applySnapshot)throw new Error(\"you must pass in a valid SnapshotProvider\");const t=await this.fin.InterApplicationBus.Channel.create((0,Br.getSnapshotSourceChannelName)(this.fin.me));t.register(\"get-snapshot\",(async()=>({snapshot:await e.getSnapshot()}))),t.register(\"apply-snapshot\",(({snapshot:t})=>e.applySnapshot(t)))}wrapSync(e){return this.wire.sendAction(\"snapshot-source-wrap-sync\").catch((e=>{})),new $r.SnapshotSource(this.wire,e)}async wrap(e){return this.wire.sendAction(\"snapshot-source-wrap\").catch((e=>{})),this.wrapSync(e)}}Ir.SnapshotSourceModule=Gr,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Ir,e),n(Er,e)}(br),Object.defineProperty(a,\"__esModule\",{value:!0});var Wr=a.Fin=void 0;const Hr=t,Nr=c,Dr=ie(),Ur=Z(),Vr=de,zr=en,Kr=rn,qr=un,Jr=bn,Yr=J(),Zr=An,Qr=ki,Xr=Cr(),eo=br;class to extends Hr.EventEmitter{constructor(e){super(),this.wire=e,this.System=new Nr.System(e),this.Window=new Dr._WindowModule(e),this.Application=new Ur.ApplicationModule(e),this.InterApplicationBus=new Vr.InterApplicationBus(e),this.Clipboard=new zr.Clipboard(e),this.ExternalApplication=new Kr.ExternalApplicationModule(e),this.Frame=new qr._FrameModule(e),this.GlobalHotkey=new Jr.GlobalHotkey(e),this.Platform=new Zr.PlatformModule(e,this.InterApplicationBus.Channel),this.View=new Yr.ViewModule(e),this.Interop=new Xr.InteropModule(e),this.SnapshotSource=new eo.SnapshotSourceModule(e),e.registerFin(this),this.me=(0,Qr.getMe)(e),e.on(\"disconnected\",(()=>{this.emit(\"disconnected\")}))}}Wr=a.Fin=to;var no={},io={};function ro(e){return\"string\"==typeof e.manifestUrl}function oo(e){return ao(e)&&\"string\"==typeof e.address}function so(e){return oo(e)&&\"string\"==typeof e.token}function ao(e){return\"string\"==typeof e.uuid}function co(e){return e.runtime&&\"string\"==typeof e.runtime.version}function ho(e){return ao(e)&&co(e)}Object.defineProperty(io,\"__esModule\",{value:!0}),io.isInternalConnectConfig=io.isPortDiscoveryConfig=io.isNewConnectConfig=io.isConfigWithReceiver=io.isRemoteConfig=io.isExistingConnectConfig=io.isExternalConfig=void 0,io.isExternalConfig=ro,io.isExistingConnectConfig=oo,io.isRemoteConfig=so,io.isConfigWithReceiver=function(e){return\"object\"==typeof e.receiver&&so({...e,address:\"\"})},io.isNewConnectConfig=ho,io.isPortDiscoveryConfig=function(e){return ro(e)&&co(e)||ho(e)},io.isInternalConnectConfig=function(e){return oo(e)||ho(e)};var lo={},uo={};Object.defineProperty(uo,\"__esModule\",{value:!0}),uo.EmitterMap=void 0;const po=t;function wo(e){return Buffer.from(e).toString(\"base64\")}uo.EmitterMap=class{constructor(){this.storage=new Map}hashKeys(e){return e.map(wo).join(\"/\")}getOrCreate(e){const t=this.hashKeys(e);return this.storage.has(t)||this.storage.set(t,new po.EventEmitter),this.storage.get(t)}has(e){return this.storage.has(this.hashKeys(e))}delete(e){const t=this.hashKeys(e);return this.storage.delete(t)}},Object.defineProperty(lo,\"__esModule\",{value:!0});const yo=uo;class fo extends yo.EmitterMap{constructor(){super(...arguments),this.dispatchEvent=e=>{if(function(e){return\"process-desktop-event\"===e.action}(e)){const{payload:t}=e,n=function(e){const{topic:t}=e;if(\"frame\"===t||\"window\"===t||\"view\"===t){const{uuid:n,name:i}=e;return[t,n,i]}if(\"application\"===t){const{uuid:n}=e;return[t,n]}return[t]}(t);if(this.has(n))return this.getOrCreate(n).emit(t.type,t),!0}return!1}}}lo.default=fo;var go,mo,vo=s&&s.__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},Co=s&&s.__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)},bo=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(no,\"__esModule\",{value:!0});var Io=no.Transport=void 0;const Eo=t,xo=io,Ao=g,Po=bo(lo),Mo=ki,_o=ke;class Oo extends Eo.EventEmitter{constructor(e,t,n){super(),this.wireListeners=new Map,this.topicRefMap=new Map,this.eventAggregator=new Po.default,this.messageHandlers=[this.eventAggregator.dispatchEvent],go.set(this,void 0),mo.set(this,void 0),this.connectSync=()=>{Co(this,go,\"f\").connectSync()},this.getPort=()=>Co(this,go,\"f\").getPort(),vo(this,go,new e(this.onmessage.bind(this)),\"f\"),this.environment=t,this.sendRaw=Co(this,go,\"f\").send.bind(Co(this,go,\"f\")),this.registerMessageHandler(this.handleMessage.bind(this)),Co(this,go,\"f\").on(\"disconnected\",(()=>{for(const[,{handleNack:e}]of this.wireListeners)e({reason:\"Remote connection has closed\"});this.wireListeners.clear(),this.emit(\"disconnected\")}));const{uuid:i,name:r}=n,o=this.environment.getCurrentEntityType();this.me=(0,Mo.getBaseMe)(o,i,r)}getFin(){if(!Co(this,mo,\"f\"))throw new Error(\"No Fin object registered for this transport\");return Co(this,mo,\"f\")}registerFin(e){if(Co(this,mo,\"f\"))throw new Error(\"Fin object has already been registered for this transport\");vo(this,mo,e,\"f\")}shutdown(){return Co(this,go,\"f\").shutdown()}async connect(e){if((0,xo.isConfigWithReceiver)(e))return await Co(this,go,\"f\").connect(e.receiver),this.authorize(e);if((0,xo.isRemoteConfig)(e))return this.connectRemote(e);if((0,xo.isExistingConnectConfig)(e))return this.connectByPort(e);if((0,xo.isNewConnectConfig)(e)){const t=await this.environment.retrievePort(e);return this.connectByPort({...e,address:`ws://localhost:${t}`})}}async connectRemote(e){return await Co(this,go,\"f\").connect(new(this.environment.getWsConstructor())(e.address)),this.authorize(e)}async connectByPort(e){const{address:t,uuid:n}=e,i={...e,type:\"file-token\"},r=Co(this,go,\"f\");await r.connect(new(this.environment.getWsConstructor())(e.address));const o=await this.sendAction(\"request-external-authorization\",{uuid:n,type:\"file-token\"},!0);if(\"external-authorization-response\"!==o.action)throw new Ao.UnexpectedActionError(o.action);return await this.environment.writeToken(o.payload.file,o.payload.token),this.authorize(i)}async authorize(e){const t=await this.sendAction(\"request-authorization\",e,!0);if(\"authorization-response\"!==t.action)throw new Ao.UnexpectedActionError(t.action);if(!0!==t.payload.success)throw new Ao.RuntimeError(t.payload)}sendAction(e,t={},n=!1){let i=()=>{};const r=Ao.RuntimeError.getCallSite(1),o=this.environment.getNextMessageId(),s=new Promise(((s,a)=>{i=a;const c={action:e,payload:t,messageId:o},d=Co(this,go,\"f\");return this.addWireListener(o,s,(e=>this.nackHandler(e,a,r)),n),d.send(c).catch(a)}));return Object.assign(s,{cancel:i,messageId:o})}nackHandler(e,t,n){t(\"string\"==typeof e?e:new Ao.RuntimeError(e,n))}ferryAction(e){return new Promise(((t,n)=>{const i=this.environment.getNextMessageId();e.messageId=i;const r=e=>{t(e.payload)};return Co(this,go,\"f\").send(e).then((()=>this.addWireListener(i,r,(e=>this.nackHandler(e,n)),!1))).catch(n)}))}registerMessageHandler(e){this.messageHandlers.push(e)}addWireListener(e,t,n,i){i?this.uncorrelatedListener=t:this.wireListeners.has(e)?n({reason:\"Duplicate handler id\",error:(0,_o.errorToPOJO)(new Ao.DuplicateCorrelationError(String(e)))}):this.wireListeners.set(e,{resolve:t,handleNack:n})}onmessage(e){for(const t of this.messageHandlers)t.call(null,e)}handleMessage(e){const t=e.correlationId||NaN;if(\"correlationId\"in e){if(!this.wireListeners.has(t))return!1;{const{resolve:n,handleNack:i}=this.wireListeners.get(t);\"ack\"!==e.action?i({reason:\"Did not receive ack action\",error:(0,_o.errorToPOJO)(new Ao.NoAckError(e.action))}):\"payload\"in e?e.payload.success?n.call(null,e):i(e.payload):\"string\"==typeof e.reason?i(e):(console.warn(\"Received invalid response from core\",e),i({reason:\"invalid response shape\"})),this.wireListeners.delete(t)}}else this.uncorrelatedListener&&this.uncorrelatedListener.call(null,e),this.uncorrelatedListener=()=>{};return!0}}Io=no.Transport=Oo,go=new WeakMap,mo=new WeakMap;const So=(...e)=>({log:(...t)=>console.debug(`[${(new Date).toISOString()}]`,...(e=>e.map((e=>`[${e}]`)))(e),...t),getLogger:(...t)=>So(...e,...t)}),Ro=So(\"@openfin/core-web/client\");function Fo(e,t){if(!function(e){return\"string\"==typeof e}(e))throw new Error(`Property ${t} has invalid type. Expected string, got ${typeof e}.`)}const jo=\"web-broker-ports-ready\",ko=Ro.getLogger(\"get-web-interop-ports\");function Lo(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)}function To(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}\"function\"==typeof SuppressedError&&SuppressedError;const $o=e=>{var n,i,r;return r=class extends t.EventEmitter{constructor(t){super(),n.set(this,void 0),i.set(this,!1),this.connectSync=()=>{Lo(this,i,\"f\")||(e.addEventListener(\"message\",(e=>{e.data?.topic?.startsWith(\"wire-message\")&&e.data.message&&Lo(this,n,\"f\").call(this,{...JSON.parse(e.data.message),ports:e.ports})})),e.start())},this.connect=async()=>{this.connectSync()},this.send=t=>(e.postMessage({topic:\"wire-message\",message:JSON.stringify(t)}),Promise.resolve()),this.shutdown=async()=>{e.close()},To(this,n,t,\"f\")}getPort(){return e}},n=new WeakMap,i=new WeakMap,r};var Bo={},Go={};Object.defineProperty(Go,\"__esModule\",{value:!0}),Go.BaseEnvironment=void 0;const Wo=vr();Go.BaseEnvironment=class{async getViewWindowIdentity(e,t){const{identity:n}=await e.View.wrapSync(t).getCurrentWindow();return n}async getInteropInfo(e){const t=await e.Application.getCurrentSync().getInfo().catch((()=>null)),n=t?.initialOptions?.interopBrokerConfiguration??{};return{fdc3Version:t?(0,Wo.getDefaultViewFdc3VersionFromAppInfo)(t):void 0,...n,fdc3Info:{providerVersion:await e.System.getVersion(),provider:\"OpenFin\"}}}},Object.defineProperty(Bo,\"__esModule\",{value:!0});var Ho=Bo.BrowserEnvironment=void 0;const No=Go;class Do extends No.BaseEnvironment{constructor(){super(...arguments),this.type=\"other\",this.getRandomId=()=>{const e=new Uint32Array(1);return window.crypto.getRandomValues(e)[0].toString(32)}}getAdapterVersionSync(){return\"\"}observeBounds(e,t){throw new Error(\"Method not implemented.\")}layoutAllowedInContext(e){return!1}initLayoutManager(e,t,n){throw new Error(\"Method not implemented.\")}applyLayoutSnapshot(e,t,n){throw new Error(\"Method not implemented.\")}createLayout(e,t){throw new Error(\"Method not implemented.\")}destroyLayout(e,t){throw new Error(\"Method not implemented.\")}resolveLayout(e,t){throw new Error(\"Method not implemented.\")}initPlatform(...e){throw new Error(\"Method not implemented.\")}writeToken(e,t){return Promise.resolve(\"\")}retrievePort(e){throw new Error(\"Method not implemented.\")}getNextMessageId(){return this.getRandomId()}createChildContent(e){throw new Error(\"Method not implemented.\")}getWebWindow(e){throw new Error(\"Method not implemented.\")}getCurrentEntityIdentity(){throw new Error(\"Method not implemented.\")}getCurrentEntityType(){return\"external connection\"}raiseEvent(e,t){throw new Error(\"Method not implemented.\")}getUrl(){return location.href}getDefaultChannelOptions(){return{create:{},connect:{}}}getRtcPeer(){return new RTCPeerConnection}getWsConstructor(){return WebSocket}whenReady(){return Promise.resolve()}}Ho=Bo.BrowserEnvironment=Do;const Uo=e=>\"platform\"in e&&void 0!==e.platform;var Vo,zo;class Ko extends Ho{constructor(e){super(),this.connectConfig=e,Vo.set(this,void 0),zo.set(this,new W((async()=>Promise.resolve().then((function(){return require(\"./main-b14f67c9.js\")}))))),Uo(e)&&this.validatePlatformOptions(e)}getAdapterVersionSync(){return\"0.39.21\"}validatePlatformOptions({platform:e}){if(!(\"layoutSnapshot\"in e))throw new Error(\"Platform options are missing layoutSnapshot. Please provide a layoutSnapshot in the platform options.\");if(\"windows\"in e||\"windows\"in e.layoutSnapshot)throw new Error(\"It appears you tried to call connect() with a snapshot object from an OpenFin desktop environment. Note that connect() expects to be called with a platform property with this structure: { platform: { layoutSnapshot } }. To get a layoutSnapshot of the expected structure, use fin.Platform.Layout.getCurrentLayoutManagerSync().getLayoutSnapshot() in v34+ in your desktop environment.\");const{layouts:t}=e.layoutSnapshot;Object.entries(t).map((([e,t])=>{if(\"object\"!=typeof t||null===t)throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must be an object.`);if(!(\"content\"in t))throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must contain a 'content' property.`)}))}async getInteropInfo(e){return{...{contextGroups:void 0,logging:{beforeAction:{enabled:!1},afterAction:{enabled:!1}}},fdc3Version:void 0,fdc3Info:{providerVersion:\"0.39.21\",provider:\"OpenFin Web\"}}}layoutAllowedInContext(e){return!0}async initLayoutManager(e,t,n){if(Lo(this,Vo,\"f\"))throw new Error(\"Layout already initialized.\");if(!Uo(this.connectConfig))throw new Error(\"Platform options are missing from connection config.\");const{WebLayoutEntryPoint:i}=await Lo(this,zo,\"f\").getValue();return To(this,Vo,new i(this.connectConfig),\"f\"),await Lo(this,Vo,\"f\").initLayoutManager(e,t,n)}async applyLayoutSnapshot(e,t,n){Lo(this,Vo,\"f\")?.applyLayoutSnapshot(e,t,n)}async createLayout(e,t){return Lo(this,Vo,\"f\")?.createLayout(e,t)}async destroyLayout(e,t){return Lo(this,Vo,\"f\")?.destroyLayout(e,t)}async getViewWindowIdentity(e,t){return Promise.resolve({uuid:t.uuid,name:t.uuid})}}Vo=new WeakMap,zo=new WeakMap;const qo=()=>{const e=((e,t)=>{const n=new RegExp(`^${t}<(?.*)>$`).exec(e)?.groups?.meta;if(n)try{return JSON.parse(atob(n))}catch(e){throw new Error(`Failed to decode JSON from ${n}.`)}})(window.name,\"of-frame\");if(e)try{const{name:t,uuid:n,brokerUrl:i,providerId:r,contextGroup:o}=e;return Fo(i,\"brokerUrl\"),Fo(n,\"uuid\"),Fo(t,\"name\"),{identity:{name:t,uuid:n},brokerUrl:i,interopConfig:{providerId:r,currentContextGroup:o}}}catch(e){throw new Error(`Unexpected error occurred when inferring platform information: ${e.stack}`)}},Jo=()=>{const e=r.v4();return{uuid:e,name:e}},Yo=async e=>{if(\"enabled\"===e.connectionInheritance){const t=await(async e=>{const t=qo();if(t){const{validateOptions:n=(()=>!0)}=e,{identity:i,...r}=t;if(!await n(r))throw new Error(\"Parent options were rejected by validateOptions.\");return t}})(e);if(t)return t}if(!e.options){const t=\"enabled\"===e.connectionInheritance?\"Broker URL was not specified nor provided by a platform container.\":\"Connection inheritance is disabled but no options were provided.\";throw new Error(t)}return{...e.options,identity:Jo()}};exports.__classPrivateFieldGet=Lo,exports.__classPrivateFieldSet=To,exports.apiExposer=Gn,exports.commonjsGlobal=s,exports.connect=async t=>{try{Ro.log(\"Establishing connection\",t);const{brokerUrl:n,identity:i,timeout:r,interopConfig:s}=await Yo(t),{workerPort:a,iframeBrokerPort:c}=await(async(e,t,n)=>{const{origin:i}=new URL(e),r=document.createElement(\"IFRAME\");let s;r.style.display=\"none\";try{return await new Promise(((a,c)=>{const d=e=>{if(e.source===r.contentWindow&&e.data?.topic===`ack-${jo}`){if(e.origin!==i)c(new Error(`Broker redirected to unexpected origin ${e.origin}, expected ${i}.`));else if(e.data.success){const[t,n]=e.ports;a({iframeBrokerPort:t,workerPort:n})}else c(new m(e.data));window.removeEventListener(\"message\",d),clearTimeout(s)}};window.addEventListener(\"message\",d),ko.log(`Connecting to broker ${e}`),r.setAttribute(\"src\",e),r.setAttribute(\"name\",o(t,\"of-broker\")),document.body.appendChild(r),ko.log(\"Iframe loaded, awaiting init message from iframe\"),n&&(s=setTimeout((()=>{window.removeEventListener(\"message\",d),document.body.removeChild(r),c(new Error(\"Worker did not initialize in time\"))}),n))}))}catch(e){throw new Error(`Failed to initialise Fin Web Client. ${e.message}`,{cause:e})}})(n,i,r);Ro.log(\"Successfully established connection to shared worker\");const d={entityType:\"external connection\",...i};a.start(),c.start();const h=((t,n,i)=>{const r=$o(n),o=new Ko(t),s=new Io(r,o,i);return s.connectSync(),window.Buffer=e.Buffer,new Wr(s)})(t,a,d);return s?.providerId&&(h.me.interop=h.Interop.connectSync(s.providerId),s?.currentContextGroup&&h.me.interop.joinContextGroup(s.currentContextGroup).catch((e=>{console.warn(`Error joining specified context group: ${s?.currentContextGroup}, continuing`,e)}))),{...h,me:{...h.me,identity:{uuid:h.me.uuid,name:h.me.name}}}}catch(e){throw new Error(`An error occured during web-interop connection: ${e.message}`)}},exports.decorators=Nn,exports.encodeOptions=o,exports.layout_constants=ai,exports.lazy=G;\n","\"use strict\";var t=require(\"./main-8cad4070.js\"),e=require(\"uuid\");require(\"buffer/\"),require(\"events\"),require(\"lodash/cloneDeep\"),require(\"lodash/isEqual\");var i={},n={};Object.defineProperty(n,\"__esModule\",{value:!0}),n.mapValuesAsync=n.mapEntriesAsync=void 0;const o=(t,[e,i])=>({...t,[e]:i});async function s(t,e){return(await Promise.all(e.map((async([e,i])=>[e,await t(i,e)])))).reduce(o,{})}n.mapEntriesAsync=s,n.mapValuesAsync=async function(t,e){let i;return i=e instanceof Map?[...e.entries()]:Object.entries(e),s(t,i)};var r,a,l,h,d=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldSet||function(t,e,i,n,o){if(\"m\"===n)throw new TypeError(\"Private method is not writable\");if(\"a\"===n&&!o)throw new TypeError(\"Private accessor was defined without a setter\");if(\"function\"==typeof e?t!==e||!o:!e.has(t))throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");return\"a\"===n?o.call(t,i):o?o.value=i:e.set(t,i),i},c=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldGet||function(t,e,i,n){if(\"a\"===i&&!n)throw new TypeError(\"Private accessor was defined without a getter\");if(\"function\"==typeof e?t!==e||!n:!e.has(t))throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");return\"m\"===i?n:\"a\"===i?n.call(t):n?n.value:e.get(t)};Object.defineProperty(i,\"__esModule\",{value:!0});var m=i.DefaultLayoutManager=void 0;const u=n;class p{constructor(t){a.set(this,void 0),l.set(this,new Map),d(this,a,t,\"f\")}size(){return c(this,l,\"f\").size}async applyLayoutSnapshot({layouts:t}){if(Object.keys(t).length>1)throw new Error(\"[LayoutManager] Tried to call applyLayoutSnapshot with more than 1 layout. When implementing multiple layouts via overridden LayoutManager class, you must override and fully implement the applyLayoutSnapshot method without calling super.applyLayoutSnapshot().\");const[[e,i]]=Object.entries(t);await p.createLayout(this,{layoutName:e,layout:i})}async showLayout({layoutName:t}){}async getLayoutSnapshot(){return{layouts:await(0,u.mapValuesAsync)((t=>t.getFrameSnapshot()),c(this,l,\"f\"))}}async removeLayout({layoutName:t}){}getLayoutIdentityForView(t){const e=[...c(this,l,\"f\").values()].find((e=>e.getCurrentViews().some((e=>e.name===t.name&&e.uuid===t.uuid))));return e?.identity??void 0}isLayoutVisible({layoutName:t}){return c(p,r,\"m\",h).call(p,this,t).isVisible()}resolveLayoutIdentity(t){if(t&&\"layoutName\"in t)return t;const e=[...c(this,l,\"f\").values()];if(1===e.length)return e[0].identity;const i=e.find((t=>t.isVisible()));return i?.identity??void 0}static async resolveLayout(t,e){const i=t.resolveLayoutIdentity(e);if(void 0===i||!(\"layoutName\"in i))throw new Error(\"[layout-manager] resolveLayout: Could not resolve the layout identity. Make sure you include 'layoutName' in the identity object.\");return c(p,r,\"m\",h).call(p,t,i.layoutName)}static async handleSharedView(t,e,i){await(0,u.mapValuesAsync)((async t=>{if(t.identity.layoutName!==e.layoutName){const e=t.getCurrentViews().find((t=>t.name===i.name));e&&await t.onViewDetached({viewIdentity:e,target:null}).catch(console.error)}}),c(t,l,\"f\"))}static async handleLastViewRemoved(t,e){await t.removeLayout(e),await c(t,a,\"f\").handleLastViewRemoved(t)}static async destroyLayout(t,{layoutName:e}){await c(p,r,\"m\",h).call(p,t,e).destroy(),c(t,l,\"f\").delete(e)}static async createLayout(t,e){const{layoutName:i}=e;if(c(t,l,\"f\").has(i))throw new Error(`Layout name ${i} already exists`);await c(t,a,\"f\").createLayout(e,t)}static registerLayout(t,e,i){c(t,l,\"f\").set(e,i)}static getAllLayouts(t){return[...c(t,l,\"f\").values()]}static setInitialSnapshot(t,e){c(t,a,\"f\").setInitialSnapshot(e)}static createClosedConstructor(...t){return class extends p{constructor(){super(...t)}}}}m=i.DefaultLayoutManager=p,r=p,a=new WeakMap,l=new WeakMap,h=function(t,e){const i=c(t,l,\"f\").get(e);if(!i)throw new Error(`[layout-manager] getLayoutByName: Could not locate layout with name '${e}'`);return i};var g={},f={},v={};Object.defineProperty(v,\"__esModule\",{value:!0}),v.ReversibleMap=void 0;v.ReversibleMap=class{constructor(){this.valueToKey=new Map,this.keyToValue=new Map,this.setUnique=(t,e)=>{if(this.hasKey(t)||this.hasValue(e))throw new Error(\"Key or value already in the map.\");this.keyToValue.set(t,e),this.valueToKey.set(e,t)},this.getKey=t=>{const e=this.valueToKey.get(t);if(!e)throw new Error(\"Value not found in the map.\");return e},this.deleteKey=t=>{const e=this.getValue(t);return this.keyToValue.delete(t),this.valueToKey.delete(e),e},this.deleteValue=t=>{const e=this.getKey(t);return this.keyToValue.delete(e),this.valueToKey.delete(t),e},this.hasKey=t=>this.keyToValue.has(t),this.hasValue=t=>this.valueToKey.has(t)}getValue(t){const e=this.keyToValue.get(t);if(!e)throw new Error(\"Key not found in the map.\");return e}},Object.defineProperty(f,\"__esModule\",{value:!0});var _=f.LayoutContentCache=void 0;const y=t.lazy,C=v;class w{constructor(){this.contentItemCache=new C.ReversibleMap,this.contentItemCacheId=0,this.createCacheKey=()=>{const t=`entity-${this.contentItemCacheId.toString()}`;return this.contentItemCacheId+=1,t},this.hasKey=t=>this.contentItemCache.hasKey(t),this.getItemOrUndefined=t=>{try{return this.getContentItemOrThrow(t)}catch(t){return}},this.getContentItemOrThrow=(t,e)=>{if(!this.contentItemCache.hasKey(t))throw new Error(\"Layout component has been destroyed or detached from the current layout.\");const i=this.contentItemCache.getValue(t);if(e&&!e.includes(i.type))throw new Error(`Layout item is not the expected type. Expected ${e.join(\", \")}, got ${i.type}.`);return i},this.getOrCreateEntityId=t=>{if(this.contentItemCache.hasValue(t))return this.contentItemCache.getKey(t);t.onDestroyed((()=>{this.contentItemCache.deleteValue(t)}));const e=this.createCacheKey();return this.contentItemCache.setUnique(e,t),e}}static getSingleInstance(){return w.singleton.getValue()}}_=f.LayoutContentCache=w,w.singleton=new y.Lazy((()=>new w));var I={},b={};!function(t){Object.defineProperty(t,\"__esModule\",{value:!0}),t.getAdjacentStacks=t.doShareEdge=t.getAdjacentItem=void 0;t.getAdjacentItem=(e,i)=>{const{parent:n}=e;if(e.isRoot()||!n)return;const o=[\"top\",\"bottom\"].includes(i)?\"column\":\"row\",s=[\"top\",\"left\"].includes(i)?-1:1;if(n.type===o){const t=n.contentItems.indexOf(e)+s;if(t>=0&&t{const n=t.getBounds(),o=e.getBounds();if(!n||!o)return!1;if([\"top\",\"bottom\"].includes(i)){return!(n.righto.right)}return!(n.bottomo.bottom)};t.getAdjacentStacks=(e,i)=>{const n=[\"top\",\"bottom\"].includes(i)?\"row\":\"column\",o=s=>\"stack\"===s.type?(0,t.doShareEdge)(e,s,i)?[s]:[]:\"root\"===s.type||\"ground\"===s.type?[]:s.type===n?s.contentItems.map((t=>o(t))).flat():s.type!==n?[\"top\",\"right\"].includes(i)?o(s.contentItems[s.contentItems.length-1]):o(s.contentItems[0]):[],s=(0,t.getAdjacentItem)(e,i);return s?o(s):[]}}(b);var S=t.commonjsGlobal&&t.commonjsGlobal.__decorate||function(t,e,i,n){var o,s=arguments.length,r=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if(\"object\"==typeof Reflect&&\"function\"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(s<3?o(r):s>3?o(e,i,r):o(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};Object.defineProperty(I,\"__esModule\",{value:!0}),I.LayoutEntitiesController=void 0;const E=t.decorators,x=b,L=i;class z{constructor(t,e,i){this.wire=t,this.layoutManager=e,this.layoutContentCache=i,this.analytics=t=>{this.wire.sendAction(`layout-controller-${t}`).catch((()=>{}))},this.getLayoutIdentityForViewOrThrow=async t=>{const e=this.layoutManager.getLayoutIdentityForView(t);if(!e)throw new Error(`View identity ${t.name} is not attached to any layouts.`);return e},this.getRoot=async t=>{this.analytics(\"get-root\");const e=(await this.getLayout(t)).getRoot();return{type:e.type,entityId:this.layoutContentCache.getOrCreateEntityId(e)}},this.getStackByView=async t=>{this.analytics(\"get-stack-by-view\");const e=await this.getLayoutIdentityForViewOrThrow(t),i=(await this.getLayout(e)).getStackByView(t);if(\"stack\"===i?.type)return{entityId:this.layoutContentCache.getOrCreateEntityId(i),type:\"stack\"}},this.getStackViews=t=>{this.analytics(\"get-stack-views\");return this.layoutContentCache.getContentItemOrThrow(t,[\"stack\"]).contentItems.map((t=>({name:t.viewName,uuid:this.wire.me.uuid})))},this.isRoot=t=>{this.analytics(\"is-root\");return this.layoutContentCache.getContentItemOrThrow(t).isRoot()},this.exists=t=>(this.analytics(\"exists\"),this.layoutContentCache.hasKey(t)),this.addViewToStack=async(t,e,{index:i}={index:0})=>{this.analytics(\"add-view-to-stack\");const n=this.layoutContentCache.getContentItemOrThrow(t);if(i&&i>n.contentItems.length+1)throw new Error(`Index '${i}' out of range, please exclude the index or specify a number between 0 and ${n.contentItems.length}`);const o={id:t,index:i},{identity:s}=await n.layout.platformCreateView(e,{location:o});return s},this.findViewInStack=(t,e)=>t.contentItems.find((t=>t.viewName===e.name)),this.removeViewFromStack=async(t,e)=>{this.analytics(\"remove-view-from-stack\");const i=this.layoutContentCache.getContentItemOrThrow(t,[\"stack\"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to remove a view ('${e.name}') which does not belong to the stack.`);await n.layout.platformCloseView(e)},this.createAdjacentStack=async(t,e,{position:i=\"right\"}={})=>{if(this.analytics(\"create-adjacent-stack\"),!Array.isArray(e)||0===e.length)throw new Error('The parameter \"views\" must be an array with at least 1 element.');if(![\"top\",\"bottom\",\"left\",\"right\"].includes(i))throw new Error(`Invalid position '${i}' specified.`);const n=this.layoutContentCache.getContentItemOrThrow(t).createAdjacentStack({position:i}),o=this.layoutContentCache.getOrCreateEntityId(n);return await Promise.all(e.reverse().map((t=>this.addViewToStack(o,t)))),o},this.getAdjacentStacks=async({targetId:t,edge:e})=>{this.analytics(\"get-adjacent-stacks\");const i=this.layoutContentCache.getContentItemOrThrow(t);return(0,x.getAdjacentStacks)(i,e).map((t=>({entityId:this.layoutContentCache.getOrCreateEntityId(t)})))},this.setStackActiveView=async(t,e)=>{this.analytics(\"set-stack-active-view\");const i=this.layoutContentCache.getContentItemOrThrow(t,[\"stack\"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to set a view ('${e.name}') as active when it does not belong to the stack.`);i.setActiveContentItem(n,!0)}}async getLayout(t){const e=await L.DefaultLayoutManager.resolveLayout(this.layoutManager,t);if(!e)throw new Error(`Could not resolve target layout identity ${JSON.stringify(t)}`);return e}getContent(t){this.analytics(\"get-content\");return this.layoutContentCache.getContentItemOrThrow(t,[\"column\",\"row\"]).contentItems.map((t=>({type:t.type,entityId:this.layoutContentCache.getOrCreateEntityId(t)})))}getParent(t){this.analytics(\"get-parent\");const e=this.layoutContentCache.getContentItemOrThrow(t);if(!e.isRoot())return e.parent?.contentItems.includes(e)?{type:e.parent.type,entityId:this.layoutContentCache.getOrCreateEntityId(e.parent)}:void 0}}S([(0,E.expose)()],z.prototype,\"getLayoutIdentityForViewOrThrow\",void 0),S([(0,E.expose)()],z.prototype,\"getRoot\",void 0),S([(0,E.expose)()],z.prototype,\"getStackByView\",void 0),S([(0,E.expose)()],z.prototype,\"getStackViews\",void 0),S([(0,E.expose)()],z.prototype,\"getContent\",null),S([(0,E.expose)()],z.prototype,\"getParent\",null),S([(0,E.expose)()],z.prototype,\"isRoot\",void 0),S([(0,E.expose)()],z.prototype,\"exists\",void 0),S([(0,E.expose)()],z.prototype,\"addViewToStack\",void 0),S([(0,E.expose)()],z.prototype,\"removeViewFromStack\",void 0),S([(0,E.expose)()],z.prototype,\"createAdjacentStack\",void 0),S([(0,E.expose)()],z.prototype,\"getAdjacentStacks\",void 0),S([(0,E.expose)()],z.prototype,\"setStackActiveView\",void 0),I.LayoutEntitiesController=z,Object.defineProperty(g,\"__esModule\",{value:!0});var M=g.initLayoutEndpoints=void 0;const P=t.apiExposer,T=t.layout_constants,A=f,k=I,D=i;M=g.initLayoutEndpoints=async function(t,e){const i=t.getFin(),n=await i.Platform.getCurrentSync().getClient(),o=new P.ChannelsExposer(n);await new P.ApiExposer(o).exposeInstance(new k.LayoutEntitiesController(t,e,A.LayoutContentCache.getSingleInstance()),{id:T.LAYOUT_CONTROLLER_ID}),await async function(t,e){const i=t=>async i=>{const n=await D.DefaultLayoutManager.resolveLayout(e,i.target);if(!n)throw new Error(`Could not resolve the layout target from payload ${JSON.stringify(i)}`);return t(n,i)},n=(e,n)=>{t.register(e,i(n))},o=(t,e)=>{n(t,e)};n(\"replace-view\",((t,e)=>t.replaceView(e))),n(\"replace-layout\",((t,{layout:e})=>t.replaceLayout(e))),n(\"add-view\",((t,e)=>t.insertView(e))),o(\"layout-add-view\",((t,{viewOptions:e,location:i,targetView:n})=>t.platformCreateView(e,{location:i,targetView:n}))),n(\"close-view\",((t,e)=>t.cleanupView(e.viewIdentity))),o(\"layout-close-view\",((t,e)=>t.platformCloseView(e.viewIdentity))),n(\"apply-preset-layout\",((t,e)=>t.applyPreset(e))),n(\"get-layout-views\",(t=>t.getCurrentViews())),n(\"get-frame-snapshot\",(t=>t.getFrameSnapshot())),n(\"is-visible\",(t=>t.isVisible())),n(\"destroy\",(t=>t.destroy())),t.register(\"get-layout-snapshot\",(()=>e.getLayoutSnapshot()))}(n,e)};var R={};Object.defineProperty(R,\"__esModule\",{value:!0});var U=R.BaseLayout=void 0;U=R.BaseLayout=class{};var O={};Object.defineProperty(O,\"__esModule\",{value:!0});var V=O.DOMEmitter=void 0;V=O.DOMEmitter=class{constructor(t){this.container=t}dispatchLocalEvent(t,e){const i={...e,type:t,tabSelector:`tab-${e.name}`,containerSelector:`container-${e.name}`,topic:\"openfin-DOM-event\"};this.container.dispatchEvent(new CustomEvent(t,{detail:i}))}};var B={};Object.defineProperty(B,\"__esModule\",{value:!0});var H=B.mapLayoutContentItemsImmutableSync=B.mapLayoutContentItemsImmutable=W=B.isVisible=void 0;var W=B.isVisible=t=>(0!==t.offsetWidth||0!==t.offsetHeight)&&\"hidden\"!==window.getComputedStyle(t).visibility&&t.offsetTop>=0&&t.offsetLeft>=0&&t.offsetTop<=window.innerHeight&&t.offsetLeft<=window.innerWidth;const F=t=>\"type\"in t&&\"component\"===t.type;B.mapLayoutContentItemsImmutable=async function t(e,i){return F(i)?e(i):{...i,content:await Promise.all(i.content?.map((i=>t(e,i))))}},H=B.mapLayoutContentItemsImmutableSync=function t(e,i){return F(i)?e(i):{...i,content:i.content?.map((i=>t(e,i)))}};class N extends Error{constructor(t,e){super(e),this.type=t}}class G extends N{constructor(t,e){super(\"Configuration\",t),this.node=e}}class j extends N{constructor(t){super(\"PopoutBlocked\",t)}}class $ extends N{constructor(t){super(\"API\",t)}}class Z extends N{constructor(t){super(\"Bind\",t)}}class q extends Error{constructor(t,e,i){super(`${t}: ${e}${void 0===i?\"\":\": \"+i}`)}}class X extends q{constructor(t,e){super(\"Assert\",t,e)}}class Y extends q{constructor(t,e,i){super(\"UnreachableCase\",t,`${e}${void 0===i?\"\":\": \"+i}`)}}class K extends q{constructor(t,e){super(\"UnexpectedNull\",t,e)}}class J extends q{constructor(t,e){super(\"UnexpectedUndefined\",t,e)}}var Q;!function(t){let e=!1;const i={PopoutCannotBeCreatedWithGroundItemConfig:{id:0,default:\"Popout cannot be created with ground ItemConfig\"},PleaseRegisterAConstructorFunction:{id:1,default:\"Please register a constructor function\"},ComponentTypeNotRegisteredAndBindComponentEventHandlerNotAssigned:{id:2,default:\"Component type not registered and BindComponentEvent handler not assigned\"},ComponentIsAlreadyRegistered:{id:3,default:\"Component is already registered\"},ComponentIsNotVirtuable:{id:4,default:\"Component is not virtuable. Requires rootHtmlElement field/getter\"},VirtualComponentDoesNotHaveRootHtmlElement:{id:5,default:'Virtual component does not have getter \"rootHtmlElement\"'},ItemConfigIsNotTypeComponent:{id:6,default:\"ItemConfig is not of type component\"},InvalidNumberPartInSizeString:{id:7,default:\"Invalid number part in size string\"},UnknownUnitInSizeString:{id:8,default:\"Unknown unit in size string\"},UnsupportedUnitInSizeString:{id:9,default:\"Unsupported unit in size string\"}};t.idCount=Object.keys(i).length;const n=Object.values(i);t.checkInitialise=function(){if(!e)for(let e=0;e=\"0\"&&t<=\"9\"}function Tt(t,e){const i=zt(e);t.style.width=i}function At(t,e){const i=zt(e);t.style.height=i}function kt(t){return{width:t.offsetWidth,height:t.offsetHeight}}function Dt(t,e){t.style.display=e?\"\":\"none\"}function Rt(t,e){if(void 0!==e)for(const i in e)if(e.hasOwnProperty(i)){const n=e[i],o=t[i];t[i]=Ut(o,n)}return t}function Ut(t,e){if(\"object\"!=typeof e)return e;if(Array.isArray(e)){const t=e.length,i=new Array(t);for(let n=0;n36)throw new Error(\"Too many keys in config minifier map\")},t.translateObject=n}(dt||(dt={})),function(t){t.defaults={type:at.ground,content:[],size:1,sizeUnit:ht.Fractional,minSize:void 0,minSizeUnit:ht.Pixel,id:\"\",isClosable:!0},t.createCopy=function(t,e){switch(t.type){case at.ground:case at.row:case at.column:return gt.createCopy(t,e);case at.stack:return ut.createCopy(t,e);case at.component:return pt.createCopy(t);default:throw new Y(\"CICC91354\",t.type,\"Invalid Config Item type specified\")}},t.createDefault=function(t){switch(t){case at.ground:throw new X(\"CICCDR91562\");case at.row:case at.column:return gt.createDefault(t);case at.stack:return ut.createDefault();case at.component:return pt.createDefault();default:throw new Y(\"CICCDD91563\",t,\"Invalid Config Item type specified\")}},t.isComponentItem=function(t){return t.type===at.component},t.isStackItem=function(t){return t.type===at.stack},t.isGroundItem=function(t){return t.type===at.ground}}(ct||(ct={})),function(t){t.defaultMaximised=!1,function(t){t.createCopy=function(t,e){return void 0===t?void 0:{show:null!=e?e:t.show,popout:t.popout,close:t.close,maximise:t.maximise,minimise:t.minimise,tabDropdown:t.tabDropdown}}}(t.Header||(t.Header={}))}(mt||(mt={})),function(t){function e(t){const e=t.length,i=new Array(e);for(let n=0;n\"__glMaximised\"===t));t>0&&(o=!0,n=n.splice(t,1)),e=n.length>0?n[0]:ct.defaults.id}else e=n;return i=void 0!==t.maximised?t.maximised:o,{id:e,maximised:i}}}(wt||(wt={})),function(t){function e(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0;return{resolved:!0,root:Et.resolve(i),openPopouts:t.resolveOpenPopouts(e.openPopouts),dimensions:t.Dimensions.resolve(e.dimensions),settings:t.Settings.resolve(e.settings),header:t.Header.resolve(e.header,e.settings,e.labels)}}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:Lt.fromResolvedArray(e.openPopouts),settings:_t.Settings.createCopy(e.settings),dimensions:t.Dimensions.fromResolved(e.dimensions),header:_t.Header.createCopy(e.header)}},t.isResolved=function(t){const e=t;return void 0!==e.resolved&&!0===e.resolved},t.resolveOpenPopouts=function(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0,{root:Et.resolve(o),openPopouts:xt.resolveOpenPopouts(e.openPopouts),dimensions:xt.Dimensions.resolve(e.dimensions),settings:xt.Settings.resolve(e.settings),header:xt.Header.resolve(e.header,e.settings,e.labels),parentId:null!==(i=e.parentId)&&void 0!==i?i:null,indexInParent:null!==(n=e.indexInParent)&&void 0!==n?n:null,window:t.Window.resolve(e.window,e.dimensions),resolved:!0}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:i(e.openPopouts),dimensions:xt.Dimensions.fromResolved(e.dimensions),settings:_t.Settings.createCopy(e.settings),header:_t.Header.createCopy(e.header),parentId:e.parentId,indexInParent:e.indexInParent,window:t.Window.fromResolved(e.window)}},t.fromResolvedArray=i}(Lt||(Lt={}));class Wt{constructor(){this._allEventSubscriptions=[],this._subscriptionsMap=new Map,this.unbind=this.removeEventListener,this.trigger=this.emit}tryBubbleEvent(t,e){}emit(t,...e){let i=this._subscriptionsMap.get(t);if(void 0!==i){i=i.slice();for(let t=0;t0){const n=e.slice();n.unshift(t);const o=this._allEventSubscriptions.slice();for(let t=0;t0?n.contentItems[0]:n,e=0);const o=this._layoutManager.createAndInitContentItem(i,t);t.addChild(o,e),this._layoutManager.layoutConfig.settings.popInOnClose?this._onClose():this.close()}createWindow(){const t=this.createUrl(),e=Math.floor(1e6*Math.random()).toString(36),i=this.serializeWindowFeatures({width:this._initialWindowSize.width,height:this._initialWindowSize.height,innerWidth:this._initialWindowSize.width,innerHeight:this._initialWindowSize.height,menubar:\"no\",toolbar:\"no\",location:\"no\",personalbar:\"no\",resizable:\"yes\",scrollbars:\"no\",status:\"no\"});if(this._popoutWindow=globalThis.open(t,e,i),this._popoutWindow)this._popoutWindow.addEventListener(\"load\",(()=>this.positionWindow()),{passive:!0}),this._popoutWindow.addEventListener(\"beforeunload\",(()=>{this._layoutManager.layoutConfig.settings.popInOnClose?this.popIn():this._onClose()}),{passive:!0}),this._checkReadyInterval=setInterval((()=>this.checkReady()),10);else if(!0===this._layoutManager.layoutConfig.settings.blockedPopoutsThrowError){throw new j(\"Popout blocked\")}}checkReady(){if(null===this._popoutWindow)throw new K(\"BPCR01844\");this._popoutWindow.__glInstance&&this._popoutWindow.__glInstance.isInitialised&&(this.onInitialised(),void 0!==this._checkReadyInterval&&(clearInterval(this._checkReadyInterval),this._checkReadyInterval=void 0))}serializeWindowFeatures(t){const e=[];for(const i in t)e.push(i+\"=\"+t[i].toString());return e.join(\",\")}createUrl(){const t=\"gl-window-config-\"+Ot(),e=_t.minifyConfig(this._config);try{localStorage.setItem(t,JSON.stringify(e))}catch(t){throw new Error(\"Error while writing to localStorage \"+function(t){return t instanceof Error?t.message:\"string\"==typeof t?t:\"Unknown Error\"}(t))}const i=new URL(location.href);return i.searchParams.set(\"gl-window\",t),i.toString()}positionWindow(){if(null===this._popoutWindow)throw new Error(\"BrowserPopout.positionWindow: null popoutWindow\");this._popoutWindow.moveTo(this._initialWindowSize.left,this._initialWindowSize.top),this._popoutWindow.focus()}onInitialised(){this._isInitialised=!0,this.getGlInstance().on(\"popIn\",(()=>this.popIn())),this.emit(\"initialised\")}_onClose(){setTimeout((()=>this.emit(\"closed\")),50)}}class Gt extends Wt{constructor(t,e,i,n){super(),this.layoutManager=t,this._parent=i,this._element=n,this._popInParentIds=[],this._type=e.type,this._id=e.id,this._isInitialised=!1,this.isGround=!1,this.isRow=!1,this.isColumn=!1,this.isStack=!1,this.isComponent=!1,this.size=e.size,this.sizeUnit=e.sizeUnit,this.minSize=e.minSize,this.minSizeUnit=e.minSizeUnit,this._isClosable=e.isClosable,this._pendingEventPropagations={},this._throttledEvents=[\"stateChanged\"],this._contentItems=this.createContentItems(e.content)}get type(){return this._type}get id(){return this._id}set id(t){this._id=t}get popInParentIds(){return this._popInParentIds}get parent(){return this._parent}get contentItems(){return this._contentItems}get isClosable(){return this._isClosable}get element(){return this._element}get isInitialised(){return this._isInitialised}static isStack(t){return t.isStack}static isComponentItem(t){return t.isComponent}static isComponentParentableItem(t){return t.isStack||t.isGround}removeChild(t,e=!1){const i=this._contentItems.indexOf(t);if(-1===i)throw new Error(\"Can't remove child item. Unknown content item\");if(e||this._contentItems[i].destroy(),this._contentItems.splice(i,1),this._contentItems.length>0)this.updateSize(!1);else if(!this.isGround&&!0===this._isClosable){if(null===this._parent)throw new K(\"CIUC00874\");this._parent.removeChild(this)}}addChild(t,e,i){return null!=e||(e=this._contentItems.length),this._contentItems.splice(e,0,t),t.setParent(this),!0===this._isInitialised&&!1===t._isInitialised&&t.init(),e}replaceChild(t,e,i=!1){const n=this._contentItems.indexOf(t),o=t._element.parentNode;if(-1===n)throw new X(\"CIRCI23232\",\"Can't replace child. oldChild is not child of this\");if(null===o)throw new K(\"CIRCP23232\");if(o.replaceChild(e._element,t._element),!0===i&&(t._parent=null,t.destroy()),this._contentItems[n]=e,e.setParent(this),e.size=t.size,e.sizeUnit=t.sizeUnit,e.minSize=t.minSize,e.minSizeUnit=t.minSizeUnit,null===e._parent)throw new K(\"CIRCNC45699\");!0===e._parent._isInitialised&&!1===e._isInitialised&&e.init(),this.updateSize(!1)}remove(){if(null===this._parent)throw new K(\"CIR11110\");this._parent.removeChild(this)}popout(){const t=Ot(),e=this.layoutManager.createPopoutFromContentItem(this,void 0,t,void 0);return this.emitBaseBubblingEvent(\"stateChanged\"),e}calculateConfigContent(){const t=this._contentItems,e=t.length,i=new Array(e);for(let n=0;nthis.propagateEventToLayoutManager(t,e))))}propagateEventToLayoutManager(t,e){this._pendingEventPropagations[t]=!1,this.layoutManager.emitUnknown(t,e)}}class jt extends Gt{constructor(t,e,i){super(t,e,i,document.createElement(\"div\")),this._parentItem=i,this._focused=!1,this.isComponent=!0,this._reorderEnabled=e.reorderEnabled,this.applyUpdatableConfig(e),this._initialWantMaximise=e.maximised;const n=document.createElement(\"div\");n.classList.add(\"lm_content\"),this.element.appendChild(n),this._container=new Ft(e,this,t,n,(t=>this.handleUpdateItemConfigEvent(t)),(()=>this.show()),(()=>this.hide()),(t=>this.focus(t)),(t=>this.blur(t)))}get componentName(){return this._container.componentType}get componentType(){return this._container.componentType}get reorderEnabled(){return this._reorderEnabled}get initialWantMaximise(){return this._initialWantMaximise}get component(){return this._container.component}get container(){return this._container}get parentItem(){return this._parentItem}get headerConfig(){return this._headerConfig}get title(){return this._title}get tab(){return this._tab}get focused(){return this._focused}destroy(){this._container.destroy(),super.destroy()}applyUpdatableConfig(t){this.setTitle(t.title),this._headerConfig=t.header}toConfig(){const t=this._container.stateRequestEvent,e=void 0===t?this._container.state:t();return{type:at.component,content:[],size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,maximised:!1,isClosable:this.isClosable,reorderEnabled:this._reorderEnabled,title:this._title,header:mt.Header.createCopy(this._headerConfig),componentType:pt.copyComponentType(this.componentType),componentState:e}}close(){if(null===this.parent)throw new K(\"CIC68883\");this.parent.removeChild(this,!1)}enterDragMode(t,e){Tt(this.element,t),At(this.element,e),this._container.enterDragMode(t,e)}exitDragMode(){this._container.exitDragMode()}enterStackMaximised(){this._container.enterStackMaximised()}exitStackMaximised(){this._container.exitStackMaximised()}drag(){this._container.drag()}updateSize(t){this.updateNodeSize(t)}init(){this.updateNodeSize(!1),super.init(),this._container.emit(\"open\"),this.initContentItems()}setTitle(t){this._title=t,this.emit(\"titleChanged\",t),this.emit(\"stateChanged\")}setTab(t){this._tab=t,this.emit(\"tab\",t),this._container.setTab(t)}hide(){super.hide(),this._container.setVisibility(!1)}show(){super.show(),this._container.setVisibility(!0)}focus(t=!1){this.parentItem.setActiveComponentItem(this,!0,t)}setFocused(t){this._focused=!0,this.tab.setFocused(),t||this.emitBaseBubblingEvent(\"focus\")}blur(t=!1){this._focused&&this.layoutManager.setFocusedComponentItem(void 0,t)}setBlurred(t){this._focused=!1,this.tab.setBlurred(),t||this.emitBaseBubblingEvent(\"blur\")}setParent(t){this._parentItem=t,super.setParent(t)}handleUpdateItemConfigEvent(t){this.applyUpdatableConfig(t)}updateNodeSize(t){if(\"none\"!==this.element.style.display){const{width:e,height:i}=kt(this.element);this._container.setSizeToNodeSize(e,i,t)}}}class $t extends Gt{constructor(){super(...arguments),this._focused=!1}get focused(){return this._focused}setFocusedValue(t){this._focused=t}}class Zt extends Wt{constructor(t,e){super(),this._eElement=t,this._pointerTracking=!1,this._pointerDownEventListener=t=>this.onPointerDown(t),this._pointerMoveEventListener=t=>this.onPointerMove(t),this._pointerUpEventListener=t=>this.onPointerUp(t),this._timeout=void 0,this._allowableTargets=[t,...e],this._oDocument=document,this._eBody=document.body,this._nDelay=1800,this._nDistance=10,this._nX=0,this._nY=0,this._nOriginalX=0,this._nOriginalY=0,this._dragging=!1,this._eElement.addEventListener(\"pointerdown\",this._pointerDownEventListener,{passive:!0})}destroy(){this.checkRemovePointerTrackingEventListeners(),this._eElement.removeEventListener(\"pointerdown\",this._pointerDownEventListener)}cancelDrag(){this.processDragStop(void 0)}onPointerDown(t){if(this._allowableTargets.includes(t.target)&&t.isPrimary){const e=this.getPointerCoordinates(t);this.processPointerDown(e)}}processPointerDown(t){this._nOriginalX=t.x,this._nOriginalY=t.y,this._oDocument.addEventListener(\"pointermove\",this._pointerMoveEventListener),this._oDocument.addEventListener(\"pointerup\",this._pointerUpEventListener,{passive:!0}),this._pointerTracking=!0,this._timeout=setTimeout((()=>{try{this.startDrag()}catch(t){throw console.error(t),t}}),this._nDelay)}onPointerMove(t){this._pointerTracking&&(this.processDragMove(t),t.preventDefault())}processDragMove(t){this._nX=t.pageX-this._nOriginalX,this._nY=t.pageY-this._nOriginalY,!1===this._dragging&&(Math.abs(this._nX)>this._nDistance||Math.abs(this._nY)>this._nDistance)&&this.startDrag(),this._dragging&&this.emit(\"drag\",this._nX,this._nY,t)}onPointerUp(t){this.processDragStop(t)}processDragStop(t){var e;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this.checkRemovePointerTrackingEventListeners(),!0===this._dragging&&(this._eBody.classList.remove(\"lm_dragging\"),this._eElement.classList.remove(\"lm_dragging\"),null===(e=this._oDocument.querySelector(\"iframe\"))||void 0===e||e.style.setProperty(\"pointer-events\",\"\"),this._dragging=!1,this.emit(\"dragStop\",t))}checkRemovePointerTrackingEventListeners(){this._pointerTracking&&(this._oDocument.removeEventListener(\"pointermove\",this._pointerMoveEventListener),this._oDocument.removeEventListener(\"pointerup\",this._pointerUpEventListener),this._pointerTracking=!1)}startDrag(){var t;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this._dragging=!0,this._eBody.classList.add(\"lm_dragging\"),this._eElement.classList.add(\"lm_dragging\"),null===(t=this._oDocument.querySelector(\"iframe\"))||void 0===t||t.style.setProperty(\"pointer-events\",\"none\"),this.emit(\"dragStart\",this._nOriginalX,this._nOriginalY)}getPointerCoordinates(t){return{x:t.pageX,y:t.pageY}}}class qt{constructor(t,e,i){this._isVertical=t,this._size=e,this._grabSize=i0){const i=this.createSplitter(Math.max(0,e-1)).element;e>0?(this.contentItems[e-1].element.insertAdjacentElement(\"afterend\",i),i.insertAdjacentElement(\"afterend\",t.element)):(this.contentItems[0].element.insertAdjacentElement(\"beforebegin\",i),i.insertAdjacentElement(\"beforebegin\",t.element))}else this._childElementContainer.appendChild(t.element);super.addChild(t,e);const n=1/this.contentItems.length*100;if(!0===i)return this.emitBaseBubblingEvent(\"stateChanged\"),e;for(let e=0;e0&&(this.calculateRelativeSizes(),this.setAbsoluteSizes()),this.emitBaseBubblingEvent(\"stateChanged\"),this.emit(\"resize\")}setAbsoluteSizes(){const t=this.calculateAbsoluteSizes();for(let e=0;e0&&t.itemSizes[e]++,this._isColumn?(Tt(this.contentItems[e].element,t.crossAxisSize),At(this.contentItems[e].element,t.itemSizes[e])):(Tt(this.contentItems[e].element,t.itemSizes[e]),At(this.contentItems[e].element,t.crossAxisSize))}calculateAbsoluteSizes(){const t=(this.contentItems.length-1)*this._splitterSize,{width:e,height:i}=kt(this.element);let n,o;this._isColumn?(n=i-t,o=e):(n=e-t,o=i);let s=0;const r=[];for(let t=0;t0){const n=100-t;for(let t=0;t100&&e.length>0){for(let t=0;te)return;{const r=i/e;let a=i;for(let e=0;ethis.onSplitterDrag(e,t,i))),e.on(\"dragStop\",(()=>this.onSplitterDragStop(e))),e.on(\"dragStart\",(()=>this.onSplitterDragStart(e))),this._splitter.splice(t,0,e),e}getSplitItems(t){const e=this._splitter.indexOf(t);return{before:this.contentItems[e],after:this.contentItems[e+1]}}calculateContentItemMinSize(t){const e=t.minSize;if(void 0!==e){if(t.minSizeUnit===ht.Pixel)return e;throw new X(\"ROCGMD98831\",JSON.stringify(t))}{const t=this.layoutManager.layoutConfig.dimensions;return this._isColumn?t.defaultMinItemHeight:t.defaultMinItemWidth}}calculateContentItemsTotalMinSize(t){let e=0;for(const i of t)e+=this.calculateContentItemMinSize(i);return e}onSplitterDragStart(t){const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=this.calculateContentItemsTotalMinSize(e.before.contentItems),s=this.calculateContentItemsTotalMinSize(e.after.contentItems);this._splitterPosition=0,this._splitterMinPosition=-1*(i-o),this._splitterMaxPosition=n-s}onSplitterDrag(t,e,i){let n=this._isColumn?i:e;if(null===this._splitterMinPosition||null===this._splitterMaxPosition)throw new K(\"ROCOSD59226\");n=Math.max(n,this._splitterMinPosition),n=Math.min(n,this._splitterMaxPosition),this._splitterPosition=n;const o=zt(n);this._isColumn?t.element.style.top=o:t.element.style.left=o}onSplitterDragStop(t){if(null===this._splitterPosition)throw new K(\"ROCOSDS66932\");{const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=(this._splitterPosition+i)/(i+n),s=e.before.size+e.after.size;e.before.size=o*s,e.after.size=(1-o)*s,t.element.style.top=zt(0),t.element.style.left=zt(0),globalThis.requestAnimationFrame((()=>this.updateSize(!1)))}}}!function(t){t.getElementDimensionSize=function(t,e){return\"width\"===e?function(t){return t.offsetWidth}(t):function(t){return t.offsetHeight}(t)},t.setElementDimensionSize=function(t,e,i){return\"width\"===e?Tt(t,i):At(t,i)},t.createElement=function(t,e){const i=t.createElement(\"div\");return i.classList.add(\"lm_item\"),e?i.classList.add(\"lm_column\"):i.classList.add(\"lm_row\"),i}}(Xt||(Xt={}));class Yt extends $t{constructor(t,e,i){super(t,vt.create(e),null,Yt.createElement(document)),this.isGround=!0,this._childElementContainer=this.element,this._containerElement=i;let n=null;for(;;){const t=n?n.previousSibling:this._containerElement.lastChild;if(!(t instanceof Element&&t.classList.contains(\"lm_content\")))break;n=t}this._containerElement.insertBefore(this.element,n)}init(){if(!0!==this.isInitialised){this.updateNodeSize();for(let t=0;t0?this.contentItems[0]:this,n.isComponent)throw new Error(\"Cannot add item as child to ComponentItem\");{const t=this.layoutManager.createAndInitContentItem(i,n);return e=n.addChild(t,e),n===this?-1:e}}loadComponentAsRoot(t){this.clearRoot();const e=Ct.resolve(t,!1);if(e.maximised)throw new Error(\"Root Component cannot be maximised\");{const t=new jt(this.layoutManager,e,this);t.init(),this.addChild(t,0)}}addChild(t,e){if(this.contentItems.length>0)throw new Error(\"Ground node can only have a single child\");return this._childElementContainer.appendChild(t.element),e=super.addChild(t,e),this.updateSize(!1),this.emitBaseBubblingEvent(\"stateChanged\"),e}calculateConfigContent(){const t=this.contentItems,e=t.length,i=new Array(e);for(let n=0;n0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e)),this.updateContentItemsSize(!1))}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}createSideAreas(){const t=Yt.Area.oppositeSides,e=new Array(Object.keys(t).length);let i=0;for(const n in t){const o=n,s=this.getElementArea();if(null===s)throw new K(\"RCSA77553\");s.side=o,\"2\"===t[o][1]?s[o]=s[t[o]]-50:s[o]=s[t[o]]+50,s.surface=(s.x2-s.x1)*(s.y2-s.y1),e[i++]=s}return e}highlightDropZone(t,e,i){this.layoutManager.tabDropPlaceholder.remove(),super.highlightDropZone(t,e,i)}onDrop(t,e){if(t.isComponent){const e=ut.createDefault(),i=t;e.header=mt.Header.createCopy(i.headerConfig);const n=this.layoutManager.createAndInitContentItem(e,this);n.addChild(t),t=n}if(0===this.contentItems.length)this.addChild(t);else{if(t.type===at.row||t.type===at.column){const e=ut.createDefault(),i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}const i=\"x\"==e.side[0]?at.row:at.column,n=\"2\"==e.side[1],o=this.contentItems[0];if(o instanceof Xt&&o.type===i){const e=o.contentItems[n?0:o.contentItems.length-1];o.addChild(t,n?0:void 0,!0),e.size*=.5,t.size=e.size,t.sizeUnit=ht.Percent,o.updateSize(!1)}else{const e=ct.createDefault(i),s=this.layoutManager.createContentItem(e,this);this.replaceChild(o,s),s.addChild(t,n?0:void 0,!0),s.addChild(o,n?void 0:0,!0),o.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}}dock(){throw new X(\"GID87731\")}validateDocking(){throw new X(\"GIVD87732\")}getAllContentItems(){const t=[this];return this.deepGetAllContentItems(this.contentItems,t),t}getConfigMaximisedItems(){const t=[];return this.deepFilterContentItems(this.contentItems,t,(t=>!(!Gt.isStack(t)||!t.initialWantMaximise)||!(!Gt.isComponentItem(t)||!t.initialWantMaximise))),t}getItemsByPopInParentId(t){const e=[];return this.deepFilterContentItems(this.contentItems,e,(e=>e.popInParentIds.includes(t))),e}toConfig(){throw new Error(\"Cannot generate GroundItem config\")}setActiveComponentItem(t,e,i){}updateNodeSize(){const{width:t,height:e}=kt(this._containerElement);Tt(this.element,t),At(this.element,e),this.contentItems.length>0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e))}deepGetAllContentItems(t,e){for(let i=0;ithis.onClick(t),this._touchStartEventListener=t=>this.onTouchStart(t),this._element=document.createElement(\"div\"),this._element.classList.add(i),this._element.title=e,this._header.on(\"destroy\",(()=>this.destroy())),this._element.addEventListener(\"click\",this._clickEventListener,{passive:!0}),this._element.addEventListener(\"touchstart\",this._touchStartEventListener,{passive:!0}),this._header.controlsContainerElement.appendChild(this._element)}get element(){return this._element}destroy(){var t;this._element.removeEventListener(\"click\",this._clickEventListener),this._element.removeEventListener(\"touchstart\",this._touchStartEventListener),null===(t=this._element.parentNode)||void 0===t||t.removeChild(this._element)}onClick(t){this._pushEvent(t)}onTouchStart(t){this._pushEvent(t)}}class Jt{constructor(t,e,i,n,o){var s;this._layoutManager=t,this._componentItem=e,this._closeEvent=i,this._focusEvent=n,this._dragStartEvent=o,this._isActive=!1,this._tabClickListener=t=>this.onTabClickDown(t),this._tabTouchStartListener=t=>this.onTabTouchStart(t),this._closeClickListener=()=>this.onCloseClick(),this._closeTouchStartListener=()=>this.onCloseTouchStart(),this._dragStartListener=(t,e)=>this.onDragStart(t,e),this._contentItemDestroyListener=()=>this.onContentItemDestroy(),this._tabTitleChangedListener=t=>this.setTitle(t),this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_tab\"),this._titleElement=document.createElement(\"span\"),this._titleElement.classList.add(\"lm_title\"),this._closeElement=document.createElement(\"div\"),this._closeElement.classList.add(\"lm_close_tab\"),this._element.appendChild(this._titleElement),this._element.appendChild(this._closeElement),e.isClosable?this._closeElement.style.display=\"\":this._closeElement.style.display=\"none\",this.setTitle(e.title),this._componentItem.on(\"titleChanged\",this._tabTitleChangedListener);(null!==(s=e.reorderEnabled)&&void 0!==s?s:this._layoutManager.layoutConfig.settings.reorderEnabled)&&this.enableReorder(),this._element.addEventListener(\"click\",this._tabClickListener,{passive:!0}),this._element.addEventListener(\"touchstart\",this._tabTouchStartListener,{passive:!0}),this._componentItem.isClosable?(this._closeElement.addEventListener(\"click\",this._closeClickListener,{passive:!0}),this._closeElement.addEventListener(\"touchstart\",this._closeTouchStartListener,{passive:!0})):(this._closeElement.remove(),this._closeElement=void 0),this._componentItem.setTab(this),this._layoutManager.emit(\"tabCreated\",this)}get isActive(){return this._isActive}get componentItem(){return this._componentItem}get contentItem(){return this._componentItem}get element(){return this._element}get titleElement(){return this._titleElement}get closeElement(){return this._closeElement}get reorderEnabled(){return void 0!==this._dragListener}set reorderEnabled(t){t!==this.reorderEnabled&&(t?this.enableReorder():this.disableReorder())}setTitle(t){this._titleElement.innerText=t,this._element.title=t}setActive(t){t!==this._isActive&&(this._isActive=t,t?this._element.classList.add(\"lm_active\"):this._element.classList.remove(\"lm_active\"))}destroy(){var t,e;this._closeEvent=void 0,this._focusEvent=void 0,this._dragStartEvent=void 0,this._element.removeEventListener(\"click\",this._tabClickListener),this._element.removeEventListener(\"touchstart\",this._tabTouchStartListener),null===(t=this._closeElement)||void 0===t||t.removeEventListener(\"click\",this._closeClickListener),null===(e=this._closeElement)||void 0===e||e.removeEventListener(\"touchstart\",this._closeTouchStartListener),this._componentItem.off(\"titleChanged\",this._tabTitleChangedListener),this.reorderEnabled&&this.disableReorder(),this._element.remove()}setBlurred(){this._element.classList.remove(\"lm_focused\"),this._titleElement.classList.remove(\"lm_focused\")}setFocused(){this._element.classList.add(\"lm_focused\"),this._titleElement.classList.add(\"lm_focused\")}onDragStart(t,e){if(void 0===this._dragListener)throw new J(\"TODSDLU10093\");if(void 0===this._dragStartEvent)throw new J(\"TODS23309\");this._dragStartEvent(t,e,this._dragListener,this.componentItem)}onContentItemDestroy(){void 0!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=void 0)}onTabClickDown(t){const e=t.target;e!==this._element&&e!==this._titleElement||(0===t.button?this.notifyFocus():1===t.button&&this._componentItem.isClosable&&this.notifyClose())}onTabTouchStart(t){t.target===this._element&&this.notifyFocus()}onCloseClick(){this.notifyClose()}onCloseTouchStart(){this.notifyClose()}notifyClose(){if(void 0===this._closeEvent)throw new J(\"TNC15007\");this._closeEvent(this._componentItem)}notifyFocus(){if(void 0===this._focusEvent)throw new J(\"TNA15007\");this._focusEvent(this._componentItem)}enableReorder(){this._dragListener=new Zt(this._element,[this._titleElement]),this._dragListener.on(\"dragStart\",this._dragStartListener),this._componentItem.on(\"destroy\",this._contentItemDestroyListener)}disableReorder(){if(void 0===this._dragListener)throw new J(\"TDR87745\");this._componentItem.off(\"destroy\",this._contentItemDestroyListener),this._dragListener.off(\"dragStart\",this._dragStartListener),this._dragListener=void 0}}class Qt{constructor(t,e,i,n,o){this._layoutManager=t,this._componentRemoveEvent=e,this._componentFocusEvent=i,this._componentDragStartEvent=n,this._dropdownActiveChangedEvent=o,this._tabs=[],this._lastVisibleTabIndex=-1,this._dropdownActive=!1,this._element=document.createElement(\"section\"),this._element.classList.add(\"lm_tabs\"),this._dropdownElement=document.createElement(\"section\"),this._dropdownElement.classList.add(\"lm_tabdropdown_list\"),this._dropdownElement.style.display=\"none\"}get tabs(){return this._tabs}get tabCount(){return this._tabs.length}get lastVisibleTabIndex(){return this._lastVisibleTabIndex}get element(){return this._element}get dropdownElement(){return this._dropdownElement}get dropdownActive(){return this._dropdownActive}destroy(){for(let t=0;tthis.handleTabCloseEvent(t)),(t=>this.handleTabFocusEvent(t)),((t,e,i,n)=>this.handleTabDragStartEvent(t,e,i,n)));void 0===e&&(e=this._tabs.length),this._tabs.splice(e,0,i),ethis._lastVisibleTabIndex){const t=this._tabs[e];for(let t=e;t>0;t--)this._tabs[t]=this._tabs[t-1];this._tabs[0]=t}}updateTabSizes(t,e){let i=!1;this.tryUpdateTabSizes(i,t,e)||(i=!0,this.tryUpdateTabSizes(i,t,e)),i!==this._dropdownActive&&(this._dropdownActive=i,this._dropdownActiveChangedEvent())}tryUpdateTabSizes(t,e,i){if(this._tabs.length>0){if(void 0===i)throw new Error(\"non-empty tabs must have active component item\");let n=0,o=!1;const s=this._layoutManager.layoutConfig.settings.tabOverlapAllowance,r=this._tabs.indexOf(i.tab),a=this._tabs[r];this._lastVisibleTabIndex=-1;for(let i=0;ie){if(o)i===r&&(l.style.zIndex=\"auto\",l.style.marginLeft=\"\",l.parentElement!==this._element&&this._element.appendChild(l));else{let t;if(t=r>0&&r<=i?(d-e)/(i-1):(d-e)/i,tthis.onClick(t),this._touchStartListener=t=>this.onTouchStart(t),this._rowColumnClosable=!0,this._closeButton=null,this._popoutButton=null,this._tabsContainer=new Qt(this._layoutManager,(t=>this.handleTabInitiatedComponentRemoveEvent(t)),(t=>this.handleTabInitiatedComponentFocusEvent(t)),((t,e,i,n)=>this.handleTabInitiatedDragStartEvent(t,e,i,n)),(()=>this.processTabDropdownActiveChanged())),this._show=i.show,this._popoutEnabled=i.popoutEnabled,this._popoutLabel=i.popoutLabel,this._maximiseEnabled=i.maximiseEnabled,this._maximiseLabel=i.maximiseLabel,this._minimiseEnabled=i.minimiseEnabled,this._minimiseLabel=i.minimiseLabel,this._closeEnabled=i.closeEnabled,this._closeLabel=i.closeLabel,this._tabDropdownEnabled=i.tabDropdownEnabled,this._tabDropdownLabel=i.tabDropdownLabel,this.setSide(i.side),this._canRemoveComponent=this._configClosable,this._element=document.createElement(\"section\"),this._element.classList.add(\"lm_header\"),this._controlsContainerElement=document.createElement(\"section\"),this._controlsContainerElement.classList.add(\"lm_controls\"),this._element.appendChild(this._tabsContainer.element),this._element.appendChild(this._controlsContainerElement),this._element.appendChild(this._tabsContainer.dropdownElement),this._element.addEventListener(\"click\",this._clickListener,{passive:!0}),this._element.addEventListener(\"touchstart\",this._touchStartListener,{passive:!0}),this._documentMouseUpListener=()=>this._tabsContainer.hideAdditionalTabsDropdown(),globalThis.document.addEventListener(\"mouseup\",this._documentMouseUpListener,{passive:!0}),this._tabControlOffset=this._layoutManager.layoutConfig.settings.tabControlOffset,this._tabDropdownEnabled&&(this._tabDropdownButton=new Kt(this,this._tabDropdownLabel,\"lm_tabdropdown\",(()=>this._tabsContainer.showAdditionalTabsDropdown()))),this._popoutEnabled&&(this._popoutButton=new Kt(this,this._popoutLabel,\"lm_popout\",(()=>this.handleButtonPopoutEvent()))),this._maximiseEnabled&&(this._maximiseButton=new Kt(this,this._maximiseLabel,\"lm_maximise\",(t=>this.handleButtonMaximiseToggleEvent(t)))),this._configClosable&&(this._closeButton=new Kt(this,this._closeLabel,\"lm_close\",(()=>s()))),this.processTabDropdownActiveChanged()}get show(){return this._show}get side(){return this._side}get leftRightSided(){return this._leftRightSided}get layoutManager(){return this._layoutManager}get parent(){return this._parent}get tabs(){return this._tabsContainer.tabs}get lastVisibleTabIndex(){return this._tabsContainer.lastVisibleTabIndex}get element(){return this._element}get tabsContainerElement(){return this._tabsContainer.element}get controlsContainerElement(){return this._controlsContainerElement}destroy(){this.emit(\"destroy\"),this._popoutEvent=void 0,this._maximiseToggleEvent=void 0,this._clickEvent=void 0,this._touchStartEvent=void 0,this._componentRemoveEvent=void 0,this._componentFocusEvent=void 0,this._componentDragStartEvent=void 0,this._tabsContainer.destroy(),globalThis.document.removeEventListener(\"mouseup\",this._documentMouseUpListener),this._element.remove()}createTab(t,e){this._tabsContainer.createTab(t,e)}removeTab(t){this._tabsContainer.removeTab(t)}processActiveComponentChanged(t){this._tabsContainer.processActiveComponentChanged(t),this.updateTabSizes()}setSide(t){this._side=t,this._leftRightSided=[nt.right,nt.left].includes(this._side)}setRowColumnClosable(t){this._rowColumnClosable=t,this.updateClosability()}updateClosability(){let t;if(this._configClosable)if(this._rowColumnClosable){t=!0;const e=this.tabs.length;for(let i=0;i1}applyFocusedValue(t){t?this._element.classList.add(\"lm_focused\"):this._element.classList.remove(\"lm_focused\")}processMaximised(){if(void 0===this._maximiseButton)throw new J(\"HPMAX16997\");this._maximiseButton.element.setAttribute(\"title\",this._minimiseLabel)}processMinimised(){if(void 0===this._maximiseButton)throw new J(\"HPMIN16997\");this._maximiseButton.element.setAttribute(\"title\",this._maximiseLabel)}updateTabSizes(){if(this._tabsContainer.tabCount>0){const t=this._show?this._layoutManager.layoutConfig.dimensions.headerHeight:0;let e;this._leftRightSided?(this._element.style.height=\"\",this._element.style.width=zt(t)):(this._element.style.width=\"\",this._element.style.height=zt(t)),e=this._leftRightSided?this._element.offsetHeight-this._controlsContainerElement.offsetHeight-this._tabControlOffset:this._element.offsetWidth-this._controlsContainerElement.offsetWidth-this._tabControlOffset,this._tabsContainer.updateTabSizes(e,this._getActiveComponentItemEvent())}}handleTabInitiatedComponentRemoveEvent(t){if(this._canRemoveComponent){if(void 0===this._componentRemoveEvent)throw new J(\"HHTCE22294\");this._componentRemoveEvent(t)}}handleTabInitiatedComponentFocusEvent(t){if(void 0===this._componentFocusEvent)throw new J(\"HHTAE22294\");this._componentFocusEvent(t)}handleTabInitiatedDragStartEvent(t,e,i,n){if(this._canRemoveComponent){if(void 0===this._componentDragStartEvent)throw new J(\"HHTDSE22294\");this._componentDragStartEvent(t,e,i,n)}else i.cancelDrag()}processTabDropdownActiveChanged(){void 0!==this._tabDropdownButton&&Dt(this._tabDropdownButton.element,this._tabsContainer.dropdownActive)}handleButtonPopoutEvent(){if(this._layoutManager.layoutConfig.settings.popoutWholeStack){if(void 0===this._popoutEvent)throw new J(\"HHBPOE17834\");this._popoutEvent()}else{const t=this._getActiveComponentItemEvent();t&&t.popout()}}handleButtonMaximiseToggleEvent(t){if(void 0===this._maximiseToggleEvent)throw new J(\"HHBMTE16834\");this._maximiseToggleEvent()}onClick(t){t.target===this._element&&this.notifyClick(t)}onTouchStart(t){t.target===this._element&&this.notifyTouchStart(t)}notifyClick(t){if(void 0===this._clickEvent)throw new J(\"HNHC46834\");this._clickEvent(t)}notifyTouchStart(t){if(void 0===this._touchStartEvent)throw new J(\"HNHTS46834\");this._touchStartEvent(t)}}class ee extends $t{constructor(t,e,i){var n,o,s,r,a,l,h,d,c,m,u,p,g,f,v,_,y,C,w;super(t,e,i,ee.createElement(document)),this._headerSideChanged=!1,this._resizeListener=()=>this.handleResize(),this._maximisedListener=()=>this.handleMaximised(),this._minimisedListener=()=>this.handleMinimised(),this._headerConfig=e.header;const I=t.layoutConfig.header,b=e.content;let S;if(1!==b.length)S=void 0;else{S=b[0].header}this._initialWantMaximise=e.maximised,this._initialActiveItemIndex=null!==(n=e.activeItemIndex)&&void 0!==n?n:0;const E=null!==(r=null!==(s=null===(o=this._headerConfig)||void 0===o?void 0:o.show)&&void 0!==s?s:null==S?void 0:S.show)&&void 0!==r?r:I.show,x=null!==(h=null!==(l=null===(a=this._headerConfig)||void 0===a?void 0:a.popout)&&void 0!==l?l:null==S?void 0:S.popout)&&void 0!==h?h:I.popout,L=null!==(m=null!==(c=null===(d=this._headerConfig)||void 0===d?void 0:d.maximise)&&void 0!==c?c:null==S?void 0:S.maximise)&&void 0!==m?m:I.maximise,z=null!==(g=null!==(p=null===(u=this._headerConfig)||void 0===u?void 0:u.close)&&void 0!==p?p:null==S?void 0:S.close)&&void 0!==g?g:I.close,M=null!==(_=null!==(v=null===(f=this._headerConfig)||void 0===f?void 0:f.minimise)&&void 0!==v?v:null==S?void 0:S.minimise)&&void 0!==_?_:I.minimise,P=null!==(w=null!==(C=null===(y=this._headerConfig)||void 0===y?void 0:y.tabDropdown)&&void 0!==C?C:null==S?void 0:S.tabDropdown)&&void 0!==w?w:I.tabDropdown;this._maximisedEnabled=!1!==L;const T={show:!1!==E,side:!1===E?nt.top:E,popoutEnabled:!1!==x,popoutLabel:!1===x?\"\":x,maximiseEnabled:this._maximisedEnabled,maximiseLabel:!1===L?\"\":L,closeEnabled:!1!==z,closeLabel:!1===z?\"\":z,minimiseEnabled:!0,minimiseLabel:M,tabDropdownEnabled:!1!==P,tabDropdownLabel:!1===P?\"\":P};this._header=new te(t,this,T,e.isClosable&&!1!==z,(()=>this.getActiveComponentItem()),(()=>this.remove()),(()=>this.handlePopoutEvent()),(()=>this.toggleMaximise()),(t=>this.handleHeaderClickEvent(t)),(t=>this.handleHeaderTouchStartEvent(t)),(t=>this.handleHeaderComponentRemoveEvent(t)),(t=>this.handleHeaderComponentFocusEvent(t)),((t,e,i,n)=>this.handleHeaderComponentStartDragEvent(t,e,i,n))),this.isStack=!0,this._childElementContainer=document.createElement(\"section\"),this._childElementContainer.classList.add(\"lm_items\"),this.on(\"resize\",this._resizeListener),this._maximisedEnabled&&(this.on(\"maximised\",this._maximisedListener),this.on(\"minimised\",this._minimisedListener)),this.element.appendChild(this._header.element),this.element.appendChild(this._childElementContainer),this.setupHeaderPosition(),this._header.updateClosability()}get childElementContainer(){return this._childElementContainer}get header(){return this._header}get headerShow(){return this._header.show}get headerSide(){return this._header.side}get headerLeftRightSided(){return this._header.leftRightSided}get contentAreaDimensions(){return this._contentAreaDimensions}get initialWantMaximise(){return this._initialWantMaximise}get isMaximised(){return this===this.layoutManager.maximisedStack}get stackParent(){if(!this.parent)throw new Error(\"Stack should always have a parent\");return this.parent}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}init(){if(!0===this.isInitialised)return;this.updateNodeSize();for(let t=0;t0){if(this._initialActiveItemIndex<0||this._initialActiveItemIndex>=e)throw new Error(`ActiveItemIndex out of range: ${this._initialActiveItemIndex} id: ${this.id}`);for(let i=0;ithis.contentItems.length)throw e-=1,new X(\"SAC99728\");if(t instanceof jt)return e=super.addChild(t,e),this._childElementContainer.appendChild(t.element),this._header.createTab(t,e),this.setActiveComponentItem(t,i),this._header.updateTabSizes(),this.updateSize(!1),t.container.setBaseLogicalZIndex(),this._header.updateClosability(),this.emitStateChangedEvent(),e;throw new X(\"SACC88532\")}removeChild(t,e){const i=t,n=this.contentItems.indexOf(i),o=1===this.contentItems.length;if(this._activeComponentItem===i&&(i.focused&&i.blur(),!o)){const t=0===n?1:n-1;this.setActiveComponentItem(this.contentItems[t],!1)}this._header.removeTab(i),super.removeChild(i,e),o||this._header.updateClosability(),this.emitStateChangedEvent()}toggleMaximise(){this.isMaximised?this.minimise():this.maximise()}maximise(){if(!this.isMaximised){this.layoutManager.setMaximisedStack(this);const t=this.contentItems,e=t.length;for(let i=0;i0&&void 0===t)throw new Error(\"expected non-empty stack to have an active component item\");return{type:\"stack\",content:this.calculateConfigContent(),size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,isClosable:this.isClosable,maximised:this.isMaximised,header:this.createHeaderConfig(),activeItemIndex:t}}onDrop(t,e){if(\"header\"===this._dropSegment){if(this.resetHeaderDropZone(),void 0===this._dropIndex)throw new J(\"SODDI68990\");return void this.addChild(t,this._dropIndex)}if(\"body\"===this._dropSegment)return void this.addChild(t,0,!0);const i=\"top\"===this._dropSegment||\"bottom\"===this._dropSegment,n=\"left\"===this._dropSegment||\"right\"===this._dropSegment,o=\"top\"===this._dropSegment||\"left\"===this._dropSegment,s=i&&this.stackParent.isColumn||n&&this.stackParent.isRow;if(t.isComponent){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createAndInitContentItem(e,this);i.addChild(t),t=i}if(t.type===at.row||t.type===at.column){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}if(s){const e=this.stackParent.contentItems.indexOf(this);this.stackParent.addChild(t,o?e:e+1,!0),this.size*=.5,t.size=this.size,t.sizeUnit=this.sizeUnit,this.stackParent.updateSize(!1)}else{const e=i?at.column:at.row,n=ct.createDefault(e),s=this.layoutManager.createContentItem(n,this);this.stackParent.replaceChild(this,s),s.addChild(t,o?0:void 0,!0),s.addChild(this,o?void 0:0,!0),this.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}highlightDropZone(t,e){for(const i in this._contentAreaDimensions){const n=i,o=this._contentAreaDimensions[n].hoverArea;if(o.x1t&&o.y1e)return void(\"header\"===n?(this._dropSegment=\"header\",this.highlightHeaderDropZone(this._header.leftRightSided?e:t)):(this.resetHeaderDropZone(),this.highlightBodyDropZone(n)))}}getArea(){if(\"none\"===this.element.style.display)return null;const t=super.getElementArea(this._header.element),e=super.getElementArea(this._childElementContainer);if(null===t||null===e)throw new K(\"SGAHC13086\");const i=e.x2-e.x1,n=e.y2-e.y1;return this._contentAreaDimensions={header:{hoverArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2},highlightArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2}}},0===this.contentItems.length?(this._contentAreaDimensions.body={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2}},super.getElementArea(this.element)):(this._contentAreaDimensions.left={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x1+.25*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x1+.5*i,y2:e.y2}},this._contentAreaDimensions.top={hoverArea:{x1:e.x1+.25*i,y1:e.y1,x2:e.x1+.75*i,y2:e.y1+.5*n},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y1+.5*n}},this._contentAreaDimensions.right={hoverArea:{x1:e.x1+.75*i,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1+.5*i,y1:e.y1,x2:e.x2,y2:e.y2}},this._contentAreaDimensions.bottom={hoverArea:{x1:e.x1+.25*i,y1:e.y1+.5*n,x2:e.x1+.75*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1+.5*n,x2:e.x2,y2:e.y2}},super.getElementArea(this.element))}positionHeader(t){this._header.side!==t&&(this._header.setSide(t),this._headerSideChanged=!0,this.setupHeaderPosition())}updateNodeSize(){if(\"none\"!==this.element.style.display){const t=kt(this.element);if(this._header.show){t[this._header.leftRightSided?it.width:it.height]-=this.layoutManager.layoutConfig.dimensions.headerHeight}this._childElementContainer.style.width=zt(t.width),this._childElementContainer.style.height=zt(t.height);for(let e=0;e=o&&tthis.onDrag(t,e,i))),this._dragListener.on(\"dragStop\",(()=>this.onDrop())),this.createDragProxyElements(t,e),null===this._componentItem.parent)throw new K(\"DPC10097\");this._componentItemFocused=this._componentItem.focused,this._componentItemFocused&&this._componentItem.blur(),this._componentItem.parent.removeChild(this._componentItem,!0),this.setDimensions(),document.body.appendChild(this._element),this.determineMinMaxXY(),this._layoutManager.calculateItemAreas(),this.setDropPosition(t,e)}get element(){return this._element}createDragProxyElements(t,e){this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_dragProxy\");const i=document.createElement(\"div\");i.classList.add(\"lm_header\");const n=document.createElement(\"div\");n.classList.add(\"lm_tabs\");const o=document.createElement(\"div\");o.classList.add(\"lm_tab\");const s=document.createElement(\"span\");s.classList.add(\"lm_title\"),o.appendChild(s),n.appendChild(o),i.appendChild(n),this._proxyContainerElement=document.createElement(\"div\"),this._proxyContainerElement.classList.add(\"lm_content\"),this._element.appendChild(i),this._element.appendChild(this._proxyContainerElement),this._originalParent instanceof ee&&this._originalParent.headerShow&&(this._sided=this._originalParent.headerLeftRightSided,this._element.classList.add(\"lm_\"+this._originalParent.headerSide),[nt.right,nt.bottom].indexOf(this._originalParent.headerSide)>=0&&this._proxyContainerElement.insertAdjacentElement(\"afterend\",i)),this._element.style.left=zt(t),this._element.style.top=zt(e),o.setAttribute(\"title\",this._componentItem.title),s.insertAdjacentText(\"afterbegin\",this._componentItem.title),this._proxyContainerElement.appendChild(this._componentItem.element)}determineMinMaxXY(){const t=this._layoutManager.groundItem;if(void 0===t)throw new J(\"DPDMMXY73109\");{const e=t.element.getBoundingClientRect();this._minX=e.left+document.body.scrollLeft,this._minY=e.top+document.body.scrollTop,this._maxX=this._minX+e.width,this._maxY=this._minY+e.height}}onDrag(t,e,i){const n=i.pageX,o=i.pageY;this.setDropPosition(n,o),this._componentItem.drag()}setDropPosition(t,e){this._layoutManager.layoutConfig.settings.constrainDragToContainer&&(t<=this._minX?t=Math.ceil(this._minX):t>=this._maxX&&(t=Math.floor(this._maxX)),e<=this._minY?e=Math.ceil(this._minY):e>=this._maxY&&(e=Math.floor(this._maxY))),this._element.style.left=zt(t),this._element.style.top=zt(e),this._area=this._layoutManager.getArea(t,e),null!==this._area&&(this._lastValidArea=this._area,this._area.contentItem.highlightDropZone(t,e,this._area))}onDrop(){const t=this._layoutManager.dropTargetIndicator;if(null===t)throw new K(\"DPOD30011\");let e;if(t.hide(),this._componentItem.exitDragMode(),null!==this._area)e=this._componentItem,this._area.contentItem.onDrop(e,this._area);else if(null!==this._lastValidArea){e=this._componentItem;this._lastValidArea.contentItem.onDrop(e,this._lastValidArea)}else this._originalParent?(e=this._componentItem,this._originalParent.addChild(e)):this._componentItem.destroy();this._element.remove(),this._layoutManager.emit(\"itemDropped\",this._componentItem),this._componentItemFocused&&void 0!==e&&e.focus()}setDimensions(){const t=this._layoutManager.layoutConfig.dimensions;if(void 0===t)throw new Error(\"DragProxy.setDimensions: dimensions undefined\");let e=t.dragProxyWidth,i=t.dragProxyHeight;if(void 0===e||void 0===i)throw new Error(\"DragProxy.setDimensions: width and/or height undefined\");const n=!1===this._layoutManager.layoutConfig.header.show?0:t.headerHeight;this._element.style.width=zt(e),this._element.style.height=zt(i),e-=this._sided?n:0,i-=this._sided?0:n,this._proxyContainerElement.style.width=zt(e),this._proxyContainerElement.style.height=zt(i),this._componentItem.enterDragMode(e,i),this._componentItem.show()}}class ne{constructor(t,e,i,n,o,s,r){this._layoutManager=t,this._element=e,this._extraAllowableChildTargets=i,this._componentTypeOrFtn=n,this._componentState=o,this._title=s,this._id=r,this._dragListener=null,this._dummyGroundContainer=document.createElement(\"div\");const a=gt.createDefault(\"row\");this._dummyGroundContentItem=new Yt(this._layoutManager,a,this._dummyGroundContainer),this.createDragListener()}destroy(){this.removeDragListener()}createDragListener(){this.removeDragListener(),this._dragListener=new Zt(this._element,this._extraAllowableChildTargets),this._dragListener.on(\"dragStart\",((t,e)=>this.onDragStart(t,e))),this._dragListener.on(\"dragStop\",(()=>this.onDragStop()))}onDragStart(t,e){var i;const n=\"component\";let o;if(\"function\"==typeof this._componentTypeOrFtn){const t=this._componentTypeOrFtn();o=ne.isDragSourceComponentItemConfig(t)?{type:n,componentState:t.state,componentType:t.type,title:null!==(i=t.title)&&void 0!==i?i:this._title}:t}else o={type:n,componentState:this._componentState,componentType:this._componentTypeOrFtn,title:this._title,id:this._id};const s=bt.resolve(o,!1),r=new jt(this._layoutManager,s,this._dummyGroundContentItem);if(this._dummyGroundContentItem.contentItems.push(r),null===this._dragListener)throw new K(\"DSODSD66746\");{const i=new ie(t,e,this._dragListener,this._layoutManager,r,this._dummyGroundContentItem),n=this._layoutManager.transitionIndicator;if(null===n)throw new K(\"DSODST66746\");n.transitionElements(this._element,i.element)}}onDragStop(){this.createDragListener()}removeDragListener(){null!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=null)}}!function(t){t.isDragSourceComponentItemConfig=function(t){return!(\"componentType\"in t)}}(ne||(ne={}));class oe{constructor(){this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_dropTargetIndicator\");const t=document.createElement(\"div\");t.classList.add(\"lm_inner\"),this._element.appendChild(t),document.body.appendChild(this._element)}destroy(){this._element.remove()}highlightArea(t,e){this._element.style.left=zt(t.x1+e),this._element.style.top=zt(t.y1+e),this._element.style.width=zt(t.x2-t.x1-e),this._element.style.height=zt(t.y2-t.y1-e),this._element.style.display=\"block\"}hide(){Dt(this._element,!1)}}class se{constructor(){this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_transition_indicator\"),document.body.appendChild(this._element),this._toElement=null,this._fromDimensions=null,this._totalAnimationDuration=200,this._animationStartTime=null}destroy(){this._element.remove()}transitionElements(t,e){}nextAnimationFrame(){}measure(t){const e=t.getBoundingClientRect();return{left:e.left,top:e.top,width:t.offsetWidth,height:t.offsetHeight}}}class re extends Wt{constructor(t){super(),this._layoutManager=t,this._childEventListener=t=>this.onEventFromChild(t),globalThis.addEventListener(re.ChildEventName,this._childEventListener,{passive:!0})}emit(t,...e){\"userBroadcast\"===t?this.emitUserBroadcast(...e):super.emit(t,...e)}emitUserBroadcast(...t){this.handleUserBroadcastEvent(\"userBroadcast\",t)}destroy(){globalThis.removeEventListener(re.ChildEventName,this._childEventListener)}handleUserBroadcastEvent(t,e){this._layoutManager.isSubWindow?this.propagateToParent(t,e):this.propagateToThisAndSubtree(t,e)}onEventFromChild(t){const e=t.detail;this.handleUserBroadcastEvent(e.eventName,e.args)}propagateToParent(t,e){const i={bubbles:!0,cancelable:!0,detail:{layoutManager:this._layoutManager,eventName:t,args:e}},n=new CustomEvent(re.ChildEventName,i),o=globalThis.opener;if(null===o)throw new K(\"EHPTP15778\");o.dispatchEvent(n)}propagateToThisAndSubtree(t,e){this.emitUnknown(t,...e);for(let i=0;ithis.handleContainerResize())),this._windowBeforeUnloadListener=()=>this.onBeforeUnload(),this._windowBeforeUnloadListening=!1,this._maximisedStackBeforeDestroyedListener=t=>this.cleanupBeforeMaximisedStackDestroyed(t),this.isSubWindow=t.isSubWindow,this._constructorOrSubWindowLayoutConfig=t.constructorOrSubWindowLayoutConfig,Q.checkInitialise(),dt.checkInitialise(),void 0!==t.containerElement&&(this._containerElement=t.containerElement)}get container(){return this._containerElement}get isInitialised(){return this._isInitialised}get groundItem(){return this._groundItem}get root(){return this._groundItem}get openPopouts(){return this._openPopouts}get dropTargetIndicator(){return this._dropTargetIndicator}get transitionIndicator(){return this._transitionIndicator}get width(){return this._width}get height(){return this._height}get eventHub(){return this._eventHub}get rootItem(){if(void 0===this._groundItem)throw new Error(\"Cannot access rootItem before init\");return 0===this._groundItem.contentItems.length?void 0:this._groundItem.contentItems[0]}get focusedComponentItem(){return this._focusedComponentItem}get tabDropPlaceholder(){return this._tabDropPlaceholder}get maximisedStack(){return this._maximisedStack}get deprecatedConstructor(){return!this.isSubWindow&&void 0!==this._constructorOrSubWindowLayoutConfig}destroy(){if(this._isInitialised){this._windowBeforeUnloadListening&&(globalThis.removeEventListener(\"beforeunload\",this._windowBeforeUnloadListener),this._windowBeforeUnloadListening=!1),!0===this.layoutConfig.settings.closePopoutsOnUnload&&this.closeAllOpenPopouts(),this._resizeObserver.disconnect(),this.checkClearResizeTimeout(),void 0!==this._groundItem&&this._groundItem.destroy(),this._tabDropPlaceholder.remove(),null!==this._dropTargetIndicator&&this._dropTargetIndicator.destroy(),null!==this._transitionIndicator&&this._transitionIndicator.destroy(),this._eventHub.destroy();for(const t of this._dragSources)t.destroy();this._dragSources=[],this._isInitialised=!1}}minifyConfig(t){return _t.minifyConfig(t)}unminifyConfig(t){return _t.unminifyConfig(t)}init(){let t;if(this.setContainer(),this._dropTargetIndicator=new oe,this._transitionIndicator=new se,this.updateSizeFromContainer(),this.isSubWindow){if(void 0===this._constructorOrSubWindowLayoutConfig)throw new J(\"LMIU07155\");{const e=this._constructorOrSubWindowLayoutConfig.root;if(void 0===e)throw new X(\"LMIC07156\");if(!Ct.isComponent(e))throw new X(\"LMIC07157\");t=e;const i=xt.resolve(this._constructorOrSubWindowLayoutConfig);this.layoutConfig=Object.assign(Object.assign({},i),{root:void 0})}}else void 0===this._constructorOrSubWindowLayoutConfig?this.layoutConfig=_t.createDefault():this.layoutConfig=xt.resolve(this._constructorOrSubWindowLayoutConfig);const e=this.layoutConfig;this._groundItem=new Yt(this,e.root,this._containerElement),this._groundItem.init(),this.checkLoadedLayoutMaximiseItem(),this._resizeObserver.observe(this._containerElement),this._isInitialised=!0,this.adjustColumnsResponsive(),this.emit(\"initialised\"),void 0!==t&&this.loadComponentAsRoot(t)}loadLayout(t){if(!this.isInitialised)throw new Error(\"GoldenLayout: Need to call init() if LayoutConfig with defined root passed to constructor\");if(void 0===this._groundItem)throw new J(\"LMLL11119\");this.createSubWindows(),this.layoutConfig=xt.resolve(t),this._groundItem.loadRoot(this.layoutConfig.root),this.checkLoadedLayoutMaximiseItem(),this.adjustColumnsResponsive()}saveLayout(){if(!1===this._isInitialised)throw new Error(\"Can't create config, layout not yet initialised\");if(void 0===this._groundItem)throw new J(\"LMTC18244\");{const t=this._groundItem.calculateConfigContent();let e;e=1!==t.length?void 0:t[0],this.reconcilePopoutWindows();const i=[];for(let t=0;t=0?n=this._groundItem.contentItems[0]:e=0;break;case at.row:case at.column:e=n.addItem(t,i.index);break;case at.stack:if(Ct.isComponent(t)){e=n.addItem(t,i.index);break}throw Error(tt[6]);case at.component:throw new X(\"LMAIALC87444602\");default:throw new Y(\"LMAIALU98881733\",n.type)}if(Ct.isComponent(t)){const t=n.contentItems[e];Gt.isStack(t)&&(n=t,e=0)}return i.parentItem=n,i.index=e,i}}}loadComponentAsRoot(t){if(void 0===this._groundItem)throw new Error(\"Cannot add item before init\");this._groundItem.loadComponentAsRoot(t)}updateSize(t,e){this.setSize(t,e)}setSize(t,e){if(this._width=t,this._height=e,!0===this._isInitialised){if(void 0===this._groundItem)throw new J(\"LMUS18881\");if(this._groundItem.setSize(this._width,this._height),this._maximisedStack){const{width:t,height:e}=kt(this._containerElement);Tt(this._maximisedStack.element,t),At(this._maximisedStack.element,e),this._maximisedStack.updateSize(!1)}this.adjustColumnsResponsive()}}beginSizeInvalidation(){this._sizeInvalidationBeginCount++}endSizeInvalidation(){0==--this._sizeInvalidationBeginCount&&this.updateSizeFromContainer()}updateSizeFromContainer(){const{width:t,height:e}=kt(this._containerElement);this.setSize(t,e)}updateRootSize(t=!1){if(void 0===this._groundItem)throw new J(\"LMURS28881\");this._groundItem.updateSize(t)}createAndInitContentItem(t,e){const i=this.createContentItem(t,e);return i.init(),i}createContentItem(t,e){if(\"string\"!=typeof t.type)throw new G(\"Missing parameter 'type'\",JSON.stringify(t));if(ct.isComponentItem(t)&&!(e instanceof ee)&&e&&!(!0===this.isSubWindow&&e instanceof Yt)){t={type:at.stack,content:[t],size:t.size,sizeUnit:t.sizeUnit,minSize:t.minSize,minSizeUnit:t.minSizeUnit,id:t.id,maximised:t.maximised,isClosable:t.isClosable,activeItemIndex:0,header:void 0}}return this.createContentItemFromConfig(t,e)}findFirstComponentItemById(t){if(void 0===this._groundItem)throw new J(\"LMFFCIBI82446\");return this.findFirstContentItemTypeByIdRecursive(at.component,t,this._groundItem)}createPopout(t,e,i,n){return t instanceof Gt?this.createPopoutFromContentItem(t,e,i,n):this.createPopoutFromItemConfig(t,e,i,n)}createPopoutFromContentItem(t,e,i,n){let o=t.parent,s=t;for(;null!==o&&1===o.contentItems.length&&!o.isGround;)s=o,o=o.parent;if(null===o)throw new K(\"LMCPFCI00834\");{if(void 0===n&&(n=o.contentItems.indexOf(s)),null!==i&&o.addPopInParentId(i),void 0===e){const i=globalThis.screenX||globalThis.screenLeft,n=globalThis.screenY||globalThis.screenTop,o=t.element.offsetLeft,s=t.element.offsetTop,{width:r,height:a}=kt(t.element);e={left:i+o,top:n+s,width:r,height:a}}const r=t.toConfig();if(t.remove(),ft.isRootItemConfig(r))return this.createPopoutFromItemConfig(r,e,i,n);throw new Error(`${tt[0]}`)}}beginVirtualSizedContainerAdding(){0==++this._virtualSizedContainerAddingBeginCount&&(this._virtualSizedContainers.length=0)}addVirtualSizedContainer(t){this._virtualSizedContainers.push(t)}endVirtualSizedContainerAdding(){if(0==--this._virtualSizedContainerAddingBeginCount){const t=this._virtualSizedContainers.length;if(t>0){this.fireBeforeVirtualRectingEvent(t);for(let e=0;ethis.emit(\"windowOpened\",a))),a.on(\"closed\",(()=>this.reconcilePopoutWindows())),this._openPopouts.push(a),this.layoutConfig.settings.closePopoutsOnUnload&&!this._windowBeforeUnloadListening&&(globalThis.addEventListener(\"beforeunload\",this._windowBeforeUnloadListener,{passive:!0}),this._windowBeforeUnloadListening=!0),a}closeAllOpenPopouts(){for(let t=0;tglobalThis.close()),1)}getArea(t,e){let i=null,n=1/0;for(let o=0;o=s.x1&&t=s.y1&&es.surface&&(n=s.surface,i=s)}return i}calculateItemAreas(){const t=this.getAllContentItems(),e=this._groundItem;if(void 0===e)throw new J(\"LMCIAR44365\");if(1!==t.length){e.contentItems[0].isStack?this._itemAreas=[]:this._itemAreas=e.createSideAreas();for(let e=0;e0){let e=t[0];if(Gt.isComponentItem(e)){const t=e.parent;if(null===t)throw new K(\"LMXLLMI69999\");e=t}if(!Gt.isStack(e))throw new X(\"LMCLLMI19993\");e.maximise()}}}processMaximiseStack(t){if(this._maximisedStack=t,t.on(\"beforeItemDestroyed\",this._maximisedStackBeforeDestroyedListener),t.element.classList.add(\"lm_maximised\"),t.element.insertAdjacentElement(\"afterend\",this._maximisePlaceholder),void 0===this._groundItem)throw new J(\"LMMXI19993\");{this._groundItem.element.prepend(t.element);const{width:e,height:i}=kt(this._containerElement);Tt(t.element,e),At(t.element,i),t.updateSize(!0),t.focusActiveContentItem(),this._maximisedStack.emit(\"maximised\"),this.emit(\"stateChanged\")}}processMinimiseMaximisedStack(){if(void 0===this._maximisedStack)throw new X(\"LMMMS74422\");{const t=this._maximisedStack;if(null===t.parent)throw new K(\"LMMI13668\");t.element.classList.remove(\"lm_maximised\"),this._maximisePlaceholder.insertAdjacentElement(\"afterend\",t.element),this._maximisePlaceholder.remove(),this.updateRootSize(!0),this._maximisedStack=void 0,t.off(\"beforeItemDestroyed\",this._maximisedStackBeforeDestroyedListener),t.emit(\"minimised\"),this.emit(\"stateChanged\")}}reconcilePopoutWindows(){const t=[];for(let e=0;e{this._resizeTimeoutId=void 0,this.beginSizeInvalidation(),this.endSizeInvalidation()}),this.resizeDebounceInterval))}checkClearResizeTimeout(){void 0!==this._resizeTimeoutId&&(clearTimeout(this._resizeTimeoutId),this._resizeTimeoutId=void 0)}setContainer(){var t;const e=document.body,i=null!==(t=this._containerElement)&&void 0!==t?t:e;if(i===e){this.resizeWithContainerAutomatically=!0;const t=document.documentElement;t.style.height=\"100%\",t.style.margin=\"0\",t.style.padding=\"0\",t.style.overflow=\"clip\",e.style.height=\"100%\",e.style.margin=\"0\",e.style.padding=\"0\",e.style.overflow=\"clip\"}this._containerElement=i}onBeforeUnload(){this.destroy()}adjustColumnsResponsive(){if(void 0===this._groundItem)throw new J(\"LMACR20883\");if(this._firstLoad=!1,this.useResponsiveLayout()&&!this._updatingColumnsResponsive&&this._groundItem.contentItems.length>0&&this._groundItem.contentItems[0].isRow){if(void 0===this._groundItem||null===this._width)throw new J(\"LMACR77412\");{const t=this._groundItem.contentItems[0].contentItems.length;if(t<=1)return;{const e=this.layoutConfig.dimensions.defaultMinItemWidth;if(t*e<=this._width)return;{this._updatingColumnsResponsive=!0;const i=t-Math.max(Math.floor(this._width/e),1),n=this._groundItem.contentItems[0],o=this.getAllStacks();if(0===o.length)throw new X(\"LMACRS77413\");{const t=o[0];for(let e=0;en?void 0:{parentItem:t,index:o}}}case 1:if(void 0===this._focusedComponentItem)return;{const t=this._focusedComponentItem.parentItem;return this.tryCreateLocationFromParentItem(t,e)}case 2:{const t=this.findFirstContentItemType(at.stack);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 3:{let t=this.findFirstContentItemType(at.row);return void 0!==t?this.tryCreateLocationFromParentItem(t,e):(t=this.findFirstContentItemType(at.column),void 0!==t?this.tryCreateLocationFromParentItem(t,e):void 0)}case 4:{const t=this.findFirstContentItemType(at.row);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 5:{const t=this.findFirstContentItemType(at.column);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 6:if(void 0===this._groundItem)throw new J(\"LMFLRIF18244\");return void 0!==this.rootItem?void 0:void 0===e||0===e?{parentItem:this._groundItem,index:0}:void 0;case 7:if(void 0===this._groundItem)throw new J(\"LMFLF18244\");{const t=this._groundItem.contentItems;if(0===t.length)return void 0===e||0===e?{parentItem:this._groundItem,index:0}:void 0;{const i=t[0];return this.tryCreateLocationFromParentItem(i,e)}}}}tryCreateLocationFromParentItem(t,e){const i=t.contentItems.length;return void 0===e?{parentItem:t,index:i}:e<0||e>i?void 0:{parentItem:t,index:e}}}!function(t){t.createMaximisePlaceElement=function(t){const e=t.createElement(\"div\");return e.classList.add(\"lm_maximise_place\"),e},t.createTabDropPlaceholderElement=function(t){const e=t.createElement(\"div\");return e.classList.add(\"lm_drop_tab_placeholder\"),e},t.defaultLocationSelectors=[{typeId:1,index:void 0},{typeId:2,index:void 0},{typeId:3,index:void 0},{typeId:7,index:void 0}],t.afterFocusedItemIfPossibleLocationSelectors=[{typeId:0,index:1},{typeId:2,index:void 0},{typeId:3,index:void 0},{typeId:7,index:void 0}]}(ae||(ae={}));class le extends ae{constructor(t,e,i,n){if(super(le.createLayoutManagerConstructorParameters(t,e)),this._bindComponentEventHanlderPassedInConstructor=!1,this._creationTimeoutPassed=!1,void 0!==e&&\"function\"==typeof e&&(this.bindComponentEvent=e,this._bindComponentEventHanlderPassedInConstructor=!0,void 0!==i&&(this.unbindComponentEvent=i)),!this._bindComponentEventHanlderPassedInConstructor&&this.isSubWindow){if(void 0===this._constructorOrSubWindowLayoutConfig)throw new J(\"VLC98823\");{const t=xt.resolve(this._constructorOrSubWindowLayoutConfig);this.layoutConfig=Object.assign(Object.assign({},t),{root:void 0})}}!0!==n&&(this.deprecatedConstructor||this.init())}destroy(){this.bindComponentEvent=void 0,this.unbindComponentEvent=void 0,super.destroy()}init(){if(this._bindComponentEventHanlderPassedInConstructor||\"loading\"!==document.readyState&&null!==document.body){if(!this._bindComponentEventHanlderPassedInConstructor&&!0===this.isSubWindow&&!this._creationTimeoutPassed)return setTimeout((()=>this.init()),7),void(this._creationTimeoutPassed=!0);!0===this.isSubWindow&&(this._bindComponentEventHanlderPassedInConstructor||this.clearHtmlAndAdjustStylesForSubWindow(),window.__glInstance=this),super.init()}else document.addEventListener(\"DOMContentLoaded\",(()=>this.init()),{passive:!0})}clearHtmlAndAdjustStylesForSubWindow(){const t=document.head,e=new Array(4);e[0]=document.querySelectorAll(\"body link\"),e[1]=document.querySelectorAll(\"body style\"),e[2]=document.querySelectorAll(\"template\"),e[3]=document.querySelectorAll(\".gl_keep\");for(let i=0;ithis.emit(\"popIn\"))),document.body.appendChild(t),!0}}bindComponent(t,e){if(void 0!==this.bindComponentEvent){return this.bindComponentEvent(t,e)}if(void 0!==this.getComponentEvent)return{virtual:!1,component:this.getComponentEvent(t,e)};{const t=`${tt[2]}: ${JSON.stringify(e)}`;throw new Z(t)}}unbindComponent(t,e,i){if(void 0!==this.unbindComponentEvent)this.unbindComponentEvent(t);else if(!e&&void 0!==this.releaseComponentEvent){if(void 0===i)throw new J(\"VCUCRCU333998\");this.releaseComponentEvent(t,i)}}}!function(t){let e=!1;t.createLayoutManagerConstructorParameters=function(t,i){const n=e?null:new URL(document.location.href).searchParams.get(\"gl-window\");e=!0;const o=null!==n;let s,r;if(null!==n){const e=localStorage.getItem(n);if(null===e)throw new Error(\"Null gl-window Config\");localStorage.removeItem(n);const i=JSON.parse(e),o=_t.unminifyConfig(i);r=xt.fromResolved(o),t instanceof HTMLElement&&(s=t)}else void 0===t?r=void 0:t instanceof HTMLElement?(r=void 0,s=t):r=t,void 0===s&&i instanceof HTMLElement&&(s=i);return{constructorOrSubWindowLayoutConfig:r,isSubWindow:o,containerElement:s}}}(le||(le={}));class he extends le{constructor(t,e,i){super(t,e,i,!0),this._componentTypesMap=new Map,this._registeredComponentMap=new Map,this._virtuableComponentMap=new Map,this._containerVirtualRectingRequiredEventListener=(t,e,i)=>this.handleContainerVirtualRectingRequiredEvent(t,e,i),this._containerVirtualVisibilityChangeRequiredEventListener=(t,e)=>this.handleContainerVirtualVisibilityChangeRequiredEvent(t,e),this._containerVirtualZIndexChangeRequiredEventListener=(t,e,i)=>this.handleContainerVirtualZIndexChangeRequiredEvent(t,e,i),this.deprecatedConstructor||this.init()}registerComponent(t,e,i=!1){if(\"function\"!=typeof e)throw new $(\"registerComponent() componentConstructorOrFactoryFtn parameter is not a function\");if(e.hasOwnProperty(\"prototype\")){const n=e;this.registerComponentConstructor(t,n,i)}else{const n=e;this.registerComponentFactoryFunction(t,n,i)}}registerComponentConstructor(t,e,i=!1){if(\"function\"!=typeof e)throw new Error(tt[1]);if(void 0!==this._componentTypesMap.get(t))throw new Z(`${tt[3]}: ${t}`);this._componentTypesMap.set(t,{constructor:e,factoryFunction:void 0,virtual:i})}registerComponentFactoryFunction(t,e,i=!1){if(\"function\"!=typeof e)throw new Z(\"Please register a constructor function\");if(void 0!==this._componentTypesMap.get(t))throw new Z(`${tt[3]}: ${t}`);this._componentTypesMap.set(t,{constructor:void 0,factoryFunction:e,virtual:i})}registerComponentFunction(t){this.registerGetComponentConstructorCallback(t)}registerGetComponentConstructorCallback(t){if(\"function\"!=typeof t)throw new Error(\"Please register a callback function\");void 0!==this._getComponentConstructorFtn&&console.warn(\"Multiple component functions are being registered. Only the final registered function will be used.\"),this._getComponentConstructorFtn=t}getRegisteredComponentTypeNames(){const t=this._componentTypesMap.keys();return Array.from(t)}getComponentInstantiator(t){let e;const i=pt.resolveComponentTypeName(t);return void 0!==i&&(e=this._componentTypesMap.get(i)),void 0===e&&void 0!==this._getComponentConstructorFtn&&(e={constructor:this._getComponentConstructorFtn(t),factoryFunction:void 0,virtual:!1}),e}bindComponent(t,e){let i;const n=pt.resolveComponentTypeName(e);let o;if(void 0!==n&&(i=this._componentTypesMap.get(n)),void 0===i&&void 0!==this._getComponentConstructorFtn&&(i={constructor:this._getComponentConstructorFtn(e),factoryFunction:void 0,virtual:!1}),void 0!==i){const s=i.virtual;let r,a;r=void 0===e.componentState?void 0:Ut({},e.componentState);const l=i.constructor;if(void 0!==l)a=new l(t,r,s);else{const e=i.factoryFunction;if(void 0===e)throw new X(\"LMBCFFU10008\");a=e(t,r,s)}if(s){if(void 0===a)throw new J(\"GLBCVCU988774\");{const e=a,i=e.rootHtmlElement;if(void 0===i)throw new Z(`${tt[5]}: ${n}`);!function(t){const e=\"absolute\";t.style.position!==e&&(t.style.position=e)}(i),this.container.appendChild(i),this._virtuableComponentMap.set(t,e),t.virtualRectingRequiredEvent=this._containerVirtualRectingRequiredEventListener,t.virtualVisibilityChangeRequiredEvent=this._containerVirtualVisibilityChangeRequiredEventListener,t.virtualZIndexChangeRequiredEvent=this._containerVirtualZIndexChangeRequiredEventListener}}this._registeredComponentMap.set(t,a),o={virtual:i.virtual,component:a}}else o=super.bindComponent(t,e);return o}unbindComponent(t,e,i){if(void 0===this._registeredComponentMap.get(t))super.unbindComponent(t,e,i);else{const e=this._virtuableComponentMap.get(t);if(void 0!==e){const i=e.rootHtmlElement;if(void 0===i)throw new X(\"GLUC77743\",t.title);this.container.removeChild(i),this._virtuableComponentMap.delete(t)}}}fireBeforeVirtualRectingEvent(t){this._goldenLayoutBoundingClientRect=this.container.getBoundingClientRect(),super.fireBeforeVirtualRectingEvent(t)}handleContainerVirtualRectingRequiredEvent(t,e,i){const n=this._virtuableComponentMap.get(t);if(void 0===n)throw new J(\"GLHCSCE55933\");{const o=n.rootHtmlElement;if(void 0===o)throw new Z(tt[4]+\" \"+t.title);{const n=t.element.getBoundingClientRect(),s=n.left-this._goldenLayoutBoundingClientRect.left;o.style.left=zt(s);const r=n.top-this._goldenLayoutBoundingClientRect.top;o.style.top=zt(r),Tt(o,e),At(o,i)}}}handleContainerVirtualVisibilityChangeRequiredEvent(t,e){const i=this._virtuableComponentMap.get(t);if(void 0===i)throw new J(\"GLHCVVCRE55934\");{const n=i.rootHtmlElement;if(void 0===n)throw new Z(tt[4]+\" \"+t.title);Dt(n,e)}}handleContainerVirtualZIndexChangeRequiredEvent(t,e,i){const n=this._virtuableComponentMap.get(t);if(void 0===n)throw new J(\"GLHCVZICRE55935\");{const e=n.rootHtmlElement;if(void 0===e)throw new Z(tt[4]+\" \"+t.title);e.style.zIndex=i}}}const de=\"initial_\",ce={show:\"top\",popout:!1,maximise:!1,close:\"close-tab-unused\"},me={headerHeight:31},ue={hasHeaders:!0,reorderEnabled:!0},pe={popoutWholeStack:!1,constrainDragToContainer:!1,constrainDragToHeaders:!1,preventDragout:!1,showMaximiseIcon:!1,showPopoutIcon:!1,showCloseIcon:!1,blockedPopoutsThrowError:!0,closePopoutsOnUnload:!0,selectionEnabled:!1};var ge,fe;class ve{constructor(e){this.layout=e,ge.set(this,void 0),fe.set(this,void 0),this.handleResize=t=>{t.forEach((t=>this.resizeElement(t.target)))},this.handleMutation=()=>{this.layout.viewComponentsByContainerElement.forEach((t=>{this.resizeElement(t.container.element)}))},t.__classPrivateFieldSet(this,ge,new ResizeObserver(this.handleResize),\"f\"),t.__classPrivateFieldSet(this,fe,new MutationObserver(this.handleMutation),\"f\")}observeMutations(e){t.__classPrivateFieldGet(this,fe,\"f\")?.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[\"class\"]})}destroy(){t.__classPrivateFieldGet(this,ge,\"f\").disconnect(),t.__classPrivateFieldGet(this,fe,\"f\").disconnect()}observeContainer(e){t.__classPrivateFieldGet(this,ge,\"f\").observe(e)}unobserveContainer(e){t.__classPrivateFieldGet(this,ge,\"f\").unobserve(e)}resizeElement(t){const e=this.layout.viewComponentsByContainerElement.get(t);e&&e.resize()}}ge=new WeakMap,fe=new WeakMap;var _e={};Object.defineProperty(_e,\"__esModule\",{value:!0});var ye=_e.BaseItem=void 0;class Ce{constructor(t,e,i){this._item=t,this._layout=e,this._wrap=i}get raw(){return this._item}get layout(){return this._layout}get type(){return this._item.type}get contentItems(){return(this._item.contentItems??[]).map((t=>this._wrap(t)))}get parent(){const t=this._item.parent;return t?this._wrap(t):null}setActiveContentItem(t,e){if(\"stack\"!==this.type)throw new Error(`Cannot call setActiveContentItem from a non-stack item: ${this.type}`);this._item.setActiveContentItem(t.raw,e)}static wrapInternal(t,e,i){const n=Ce.wrapCache.get(e);if(n)return n;const o=new t(e,i,(e=>Ce.wrapInternal(t,e,i)));return Ce.wrapCache.set(e,o),o}}ye=_e.BaseItem=Ce,Ce.wrapCache=new WeakMap;const we=t=>!!t&&\"contentItems\"in t&&(t.isRow||t.isColumn);class Ie extends ye{isRoot(){return!!this._item.parent?.isGround}getBounds(){return this._item.element.getBoundingClientRect()}get viewName(){if(this._item.isComponent){const{component:t}=this._item;return t.identity.name}throw new Error(\"View name not found\")}onDestroyed(t){const e=({target:i})=>{i===this._item&&(t(),this._item.off(\"itemDestroyed\",e))};this._item.on(\"itemDestroyed\",e)}createAdjacentStack({position:t=\"right\"}={}){const e=this.raw;if(ee.isStack(e)&&e.parent){const i=[\"top\",\"bottom\"].includes(t)?\"column\":\"row\",n=[\"left\",\"top\"].includes(t)?1:0,o=we(e.parent)?e.parent:e.layoutManager,s=o,r=e.parent.contentItems.indexOf(e);e.parent.isGround&&e.parent.removeChild(e,!0);const a=o.newItem({type:i,content:[{type:\"stack\",content:[]}]},r);if(!a)throw new Error(\"createAdjacentStack: Failed to create new container\");const l=a.contentItems[0];return a.addChild(this.raw,n),we(s)&&s.removeChild(e,!0),this._wrap(l)}throw new Error(`Cannot creat adjacent stacks for type: ${e.type}, must be type 'stack'`)}setActiveContentItem(t,e=!0){if(!ee.isStack(this._item))throw new Error(`Cannot call setActiveContentItem from a non-stack item: ${this.type}`);this._item.setActiveComponentItem(t.raw,!e)}static wrap(t,e){return ye.wrapInternal(Ie,t,e)}}function be(t=[],e){for(const i of t)\"component\"===i.type?Object.keys(e).forEach((t=>{t in i&&(i.componentState={[`${de}${t}`]:i[t],...i.componentState}),i[t]=e[t]})):be(i.content,e)}function Se(t=[],e,i){for(const n of t)if(\"component\"===n.type)Object.keys(e).forEach((t=>{if(`${de}${t}`in n.componentState)return n[t]=n.componentState[`${de}${t}`],void delete n.componentState[`${de}${t}`];n[t]=e[t]}));else{if(n.size&&(\"row\"===i||\"column\"===i)){n[\"row\"===i?\"width\":\"height\"]=n.size?.includes(\".\")?parseFloat(n.size):parseInt(n.size)}Se(n.content,e,n.type)}}function Ee(t){if(t.root){t.root.content&&Se([t.root],{componentName:\"view\",isClosable:!0});const e=t.root;t.content=[e],delete t.root}return t}const xe=e=>class extends e{connectedCallback(){if(!this.name||!this.uuid)throw new Error(\" Name or uuid attribute missing\");if(!this.src)throw new Error(\" missing 'src' attribute.\");this.#t||(this.#t=document.createElement(\"iframe\"),this.#t.src=this.src,this.#t.style.height=\"100%\",this.#t.style.width=\"100%\",this.#t.style.border=\"none\",this.forceFrameName?this.#t.setAttribute(\"name\",this.forceFrameName):this.#t.setAttribute(\"name\",t.encodeOptions({brokerUrl:this.brokerUrl,name:this.name,uuid:this.uuid,providerId:this.providerId,contextGroup:this.contextGroup},\"of-frame\")),this.#t.setAttribute(\"id\",this.name),this.appendChild(this.#t))}#t;get brokerUrl(){return this.getAttribute(\"of-broker\")}set brokerUrl(t){t&&this.setAttribute(\"of-broker\",t)}get name(){return this.getAttribute(\"of-name\")}set name(t){t&&this.setAttribute(\"of-name\",t)}get forceFrameName(){return this.getAttribute(\"forceFrameName\")}set forceFrameName(t){t&&this.setAttribute(\"forceFrameName\",t)}get uuid(){return this.getAttribute(\"of-uuid\")}set uuid(t){t&&this.setAttribute(\"of-uuid\",t)}get src(){return this.getAttribute(\"src\")}set src(t){t&&this.setAttribute(\"src\",t)}get providerId(){return this.getAttribute(\"of-provider-id\")}set providerId(t){t&&this.setAttribute(\"of-provider-id\",t)}get contextGroup(){return this.getAttribute(\"of-context-group\")}set contextGroup(t){t&&this.setAttribute(\"of-context-group\",t)}static get observedAttributes(){return[\"name\"]}};class Le{static create(t){const e=document.createElement(\"of-view\");return Object.entries(t).forEach((([t,i])=>{e.setAttribute(t,i)})),e}}customElements.define(\"of-view\",xe(HTMLElement));class ze{constructor(t,i,n,{brokerUrl:o,interopConfig:s},r){this.container=t,this.config=i,this.ofView=null,this.isDragging=()=>this.container.tab.element?.className.includes(\"lm_dragging\")??!1;const{url:a,web:l,interop:h,name:d}=i||{},c=d??`internal-generated-view-${e.v4()}`;if(this.identity={uuid:n,name:c},this.container.element.setAttribute(\"of-name\",c),this.container.element.id=`container-${c}`,this.container.parent.id=c,void 0===a)return void this.handleUrlMissing();const m=this.updateTitleIfNotSet(a),u={\"of-broker\":o,\"of-uuid\":n,\"of-name\":c,src:a};l?.frameName&&(u.forceFrameName=l.frameName);const p=h?.currentContextGroup??s?.currentContextGroup;p&&(u[\"of-context-group\"]=p),s?.providerId&&(u[\"of-provider-id\"]=s?.providerId),this.ofView=Le.create(u),this.ofView.title=m??`Iframe: ${a}`,r.appendChild(this.ofView),this.ofView.style.position=\"absolute\"}updateTitleIfNotSet(t){return\"view\"===this.container.parent.title&&this.container.parent.setTitle(t),this.container.parent.title}handleUrlMissing(){const t=document.createElement(\"div\");t.setAttribute(\"style\",\"padding: 20px\");t.innerText=\"No URL provided\",this.container.element.appendChild(t)}destroy(){this.ofView?.remove(),this.ofView=null}closeView(){this.container.close()}resize(){if(this.ofView){if(this.isDragging())return void(this.ofView.style.display=\"none\");const t=this.container.element.getBoundingClientRect();this.ofView.style.position=\"absolute\",this.ofView.style.height=`${t.height}px`,this.ofView.style.width=`${t.width}px`,this.ofView.style.inset=`${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`,this.ofView.style.display=\"block\"}}}class Me extends U{static overrideConfig(t){const e={...ue,...t.settings,...pe};return e.reorderEnabled?be(t.content,{isClosable:!0}):be(t.content,{reorderEnabled:!1}),{dimensions:me,...t,settings:e,header:{...ce,show:!1!==t.settings?.hasHeaders&&ce.show}}}constructor(t,e,i,{options:n},o,s){super(),this.identity=t,this.container=e,this.initialConfig=i,this.layoutManager=o,this.platformProvider=s,this.viewComponentsByContainerElement=new Map,this.layoutContentCache=_.getSingleInstance(),this.reparentingViews=new Set,this.goldenLayoutDestroyed=!1,this.createViewComponent=(t,e)=>{m.handleSharedView(this.layoutManager,this.identity,e);const i=new ze(t,e,this.identity.uuid,this.options,this.iframeContainer);return e&&!1===e[`${de}isClosable`]&&this.stylesheet.insertRule(`#tab-${i.identity.name} .lm_close_tab { display: none; }`),this.viewComponentsByContainerElement.set(t.element,i),this.resizeController.observeContainer(t.element),i},this.iframeContainer=document.createElement(\"div\"),this.iframeContainer.id=`openfin-layout-iframe-container-${this.identity.layoutName}`,this.domEmitter=new V(e),this.setupStylesheets(),this.layout=new he(this.container),this.layout.resizeWithContainerAutomatically=!0,this.options=n,this.layout.registerComponent(\"view\",this.createViewComponent),this.setupListeners(),this.resizeController=new ve(this),this.layout.loadLayout(Me.overrideConfig(i));const r=document.createElement(\"div\");r.id=`openfin-layout-shadow-container-${this.identity.layoutName}`,r.attachShadow({mode:\"open\",delegatesFocus:!1}).appendChild(this.iframeContainer),this.container.appendChild(r),this.resizeController.observeMutations(this.container)}getStackByView({name:t}){const e=this.layout.findFirstComponentItemById(t);if(e?.parent&&e?.parent?.isStack)return Ie.wrap(e.parent,this)}getRoot(){return Ie.wrap(this.layout.rootItem,this)}async platformCloseView(t){const e=[...this.viewComponentsByContainerElement.values()].find((e=>e.identity.name===t.name));if(!e)throw new Error(`View with name: ${t.name} not found in layout.`);e.closeView()}async platformCreateView(t,{location:e,targetView:i}={}){if(i)throw new Error(\"TargetView not supported in web\");const n={options:this.platformProvider.normalizeOptions(t),target:this.identity,location:e};return this.insertView(n)}setupStylesheets(){if(this.container.setAttribute(\"data-openfin-layout-name\",this.identity.layoutName),this.stylesheet=new CSSStyleSheet,this.stylesheet.insertRule(\".lm_close { display: none; }\"),document.adoptedStyleSheets.push(this.stylesheet),this.initialConfig.settings?.preventSplitterResize){const t=`\\n [data-openfin-layout-name='${this.identity.layoutName}'] .lm_splitter {\\n pointer-events: none;\\n }`;this.stylesheet.insertRule(t)}}insertView({options:t,location:e,targetView:i}){const n=e?this.layoutContentCache.getItemOrUndefined(e.id):void 0,o=i?this.layoutContentCache.getItemOrUndefined(i.name):void 0,s=n??o??Ie.wrap(this.layout.rootItem,this);let r;if(ee.isStack(s.raw))r=s.raw;else{if(!we(s.raw))throw new Error(\"Cannot add a view at the requested location\");r=s.raw.newItem({type:\"stack\",content:[]})}const a=Math.min(r.contentItems.length,e?.index??r.contentItems.length);let l=this.layout.findFirstComponentItemById(t.name);l?(l.parent&&l.parent.removeChild(l,!0),r.addChild(l,a)):l=r.newComponent(\"view\",t,t.title??t.url??\"Default Title\",a);const h=l.component.identity;return Promise.resolve({identity:h})}replaceView({viewToReplace:t,newView:e}){throw new Error(\"Method not implemented.\")}replaceLayout(t){throw new Error(\"Method not implemented.\")}async cleanupView(t){}applyPreset(t){throw new Error(\"Method not implemented.\")}getCurrentViews(){return[...this.viewComponentsByContainerElement.values()].map((t=>t.identity))}async getFrameSnapshot(){return Ee(xt.fromResolved(this.layout.toConfig()))}isVisible(){return W(this.container)}async onViewDetached({viewIdentity:t}){this.reparentingViews.add(t.name),this.platformCloseView(t)}async destroy(){this.goldenLayoutDestroyed||(this.goldenLayoutDestroyed=!0,this.layout.destroy()),this.iframeContainer.remove(),this.resizeController.destroy(),document.adoptedStyleSheets=document.adoptedStyleSheets.filter((t=>t!==this.stylesheet)),this.viewComponentsByContainerElement.clear()}setupListeners(){this.container.addEventListener(\"pointerdown\",(t=>{if(t.target instanceof HTMLElement){const e=t.target.classList;[\"lm_tab\",\"lm_title\",\"lm_splitter\",\"lm_drag_handle\"].some((t=>e.contains(t)))&&(this.handleDragStart(),2===t.button&&t.stopPropagation())}}),!0),document.addEventListener(\"pointerup\",(()=>this.handleDragEnd()),!0),this.layout.on(\"tabCreated\",(t=>{const e=t.componentItem.component;t.element.id=`tab-${e.identity.name}`,this.domEmitter.dispatchLocalEvent(\"tab-created\",e.identity)})),this.layout.on(\"itemCreated\",(({target:t})=>{const e=t;if(Gt.isComponentItem(e)){const t=e.component;this.domEmitter.dispatchLocalEvent(\"container-created\",t.identity)}})),this.layout.on(\"itemDestroyed\",(t=>{const e=t.target;if(Gt.isComponentItem(e)){const t=e.component;this.removeViewComponent(t)}})),this.layout.on(\"itemDropped\",(()=>{this.handleDragEnd()}))}handleDragStart(){this.iframeContainer.style.pointerEvents=\"none\"}handleDragEnd(){this.iframeContainer.style.pointerEvents=\"\"}removeViewComponent(t){if(t.config&&!1===t.config[`${de}isClosable`]){const e=[...this.stylesheet.cssRules].findIndex((e=>e.cssText.includes(`#tab-${t.identity.name}`)));this.stylesheet.deleteRule(e)}t.destroy(),this.viewComponentsByContainerElement.delete(t.container.element),this.resizeController.unobserveContainer(t.container.element),this.reparentingViews.has(t.identity.name)?this.reparentingViews.delete(t.identity.name):this.platformProvider.closeView(t.identity.name);0===this.getCurrentViews().length&&(this.goldenLayoutDestroyed||(this.goldenLayoutDestroyed=!0,m.handleLastViewRemoved(this.layoutManager,this.identity)))}}class Pe{constructor(t,e,i,n){this.windowIdentity=t,this.connectConfig=e,this.provider=i,this.fallbackContainer=n}async createLayout(t,e){if(!(\"container\"in t)&&!this.fallbackContainer)throw new Error(\"Container property is not optional in web\");const{layoutName:i}=t,n=t,o=this.provider.initLayoutViews(n),s=n.container??this.fallbackContainer,r={...this.windowIdentity,layoutName:i},a=new Me(r,s,o,this.connectConfig,e,this.provider);m.registerLayout(e,i,a),this.fallbackContainer=null}async getLayoutSnapshot(t){return t.getLayoutSnapshot()}async handleLastViewRemoved(t){}}class Te{static async init(e){const i=e.getFin().InterApplicationBus.Channel,n=await i.create(`custom-frame-${e.me.uuid}`);return n.setDefaultAction((async(t,{target:e,opts:i},o)=>{const s=n.connections.find((t=>t.name===e.name));if(s)return n.dispatch(s,t,{...i,target:e});throw new Error(`Client with name ${e.name} not found`)})),await t.relayChannelClientApi_1(n,\"layout-relay\"),new Te(e)}constructor(t){this.wire=t,this.viewNames=new Set}normalizeOptions(t,i=\"default\"){const n=this.wire.me.uuid;let{name:o=`internal-generated-view-${e.v4()}`}=t;return o.match(/^internal-generated-view-/)&&this.viewNames.has(o)&&\"duplicate\"===i&&(o=`internal-generated-view-${e.v4()}`),this.viewNames.add(o),{...t,name:o,uuid:n}}closeView(t){this.viewNames.delete(t)}initLayoutViews({layout:t,multiInstanceViewBehavior:e}){return H((t=>{if(\"component\"===t.type&&t.componentState){const i=this.normalizeOptions(t.componentState,e);return{...t,componentState:i}}return t}),t)}}var Ae;const ke=t=>t;Ae=new WeakMap,exports.WebLayoutEntryPoint=class{constructor(e){Ae.set(this,void 0),this.initLayoutManager=async(e,i,{container:n,layoutManagerOverride:o})=>{const s=await Te.init(i),r=o??ke,a=new Pe(i.me,t.__classPrivateFieldGet(this,Ae,\"f\"),s,n),l=new(r(m.createClosedConstructor(a)));return await M(i,l),l},this.applyLayoutSnapshot=async(e,i,n)=>{await i.applyLayoutSnapshot(t.__classPrivateFieldGet(this,Ae,\"f\").platform.layoutSnapshot)},this.createLayout=async(t,e)=>m.createLayout(t,e),this.destroyLayout=async(t,e)=>m.destroyLayout(t,e),t.__classPrivateFieldSet(this,Ae,e,\"f\")}};\n","'use strict'\n\nexports.byteLength = byteLength\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\nfor (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i]\n revLookup[code.charCodeAt(i)] = i\n}\n\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction getLens (b64) {\n var len = b64.length\n\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // Trim off extra bytes after placeholder bytes are found\n // See: https://github.com/beatgammit/base64-js/issues/42\n var validLen = b64.indexOf('=')\n if (validLen === -1) validLen = len\n\n var placeHoldersLen = validLen === len\n ? 0\n : 4 - (validLen % 4)\n\n return [validLen, placeHoldersLen]\n}\n\n// base64 is 4/3 + up to two characters of the original data\nfunction byteLength (b64) {\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction _byteLength (b64, validLen, placeHoldersLen) {\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction toByteArray (b64) {\n var tmp\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n\n var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))\n\n var curByte = 0\n\n // if there are placeholders, only get up to the last complete 4 chars\n var len = placeHoldersLen > 0\n ? validLen - 4\n : validLen\n\n var i\n for (i = 0; i < len; i += 4) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 18) |\n (revLookup[b64.charCodeAt(i + 1)] << 12) |\n (revLookup[b64.charCodeAt(i + 2)] << 6) |\n revLookup[b64.charCodeAt(i + 3)]\n arr[curByte++] = (tmp >> 16) & 0xFF\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 2) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 2) |\n (revLookup[b64.charCodeAt(i + 1)] >> 4)\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 1) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 10) |\n (revLookup[b64.charCodeAt(i + 1)] << 4) |\n (revLookup[b64.charCodeAt(i + 2)] >> 2)\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] +\n lookup[num >> 12 & 0x3F] +\n lookup[num >> 6 & 0x3F] +\n lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n var tmp\n var output = []\n for (var i = start; i < end; i += 3) {\n tmp =\n ((uint8[i] << 16) & 0xFF0000) +\n ((uint8[i + 1] << 8) & 0xFF00) +\n (uint8[i + 2] & 0xFF)\n output.push(tripletToBase64(tmp))\n }\n return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n var tmp\n var len = uint8.length\n var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n var parts = []\n var maxChunkLength = 16383 // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1]\n parts.push(\n lookup[tmp >> 2] +\n lookup[(tmp << 4) & 0x3F] +\n '=='\n )\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + uint8[len - 1]\n parts.push(\n lookup[tmp >> 10] +\n lookup[(tmp >> 4) & 0x3F] +\n lookup[(tmp << 2) & 0x3F] +\n '='\n )\n }\n\n return parts.join('')\n}\n","/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n/* eslint-disable no-proto */\n\n'use strict'\n\nconst base64 = require('base64-js')\nconst ieee754 = require('ieee754')\nconst customInspectSymbol =\n (typeof Symbol === 'function' && typeof Symbol['for'] === 'function') // eslint-disable-line dot-notation\n ? Symbol['for']('nodejs.util.inspect.custom') // eslint-disable-line dot-notation\n : null\n\nexports.Buffer = Buffer\nexports.SlowBuffer = SlowBuffer\nexports.INSPECT_MAX_BYTES = 50\n\nconst K_MAX_LENGTH = 0x7fffffff\nexports.kMaxLength = K_MAX_LENGTH\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Print warning and recommend using `buffer` v4.x which has an Object\n * implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * We report that the browser does not support typed arrays if the are not subclassable\n * using __proto__. Firefox 4-29 lacks support for adding new properties to `Uint8Array`\n * (See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438). IE 10 lacks support\n * for __proto__ and has a buggy typed array implementation.\n */\nBuffer.TYPED_ARRAY_SUPPORT = typedArraySupport()\n\nif (!Buffer.TYPED_ARRAY_SUPPORT && typeof console !== 'undefined' &&\n typeof console.error === 'function') {\n console.error(\n 'This browser lacks typed array (Uint8Array) support which is required by ' +\n '`buffer` v5.x. Use `buffer` v4.x if you require old browser support.'\n )\n}\n\nfunction typedArraySupport () {\n // Can typed array instances can be augmented?\n try {\n const arr = new Uint8Array(1)\n const proto = { foo: function () { return 42 } }\n Object.setPrototypeOf(proto, Uint8Array.prototype)\n Object.setPrototypeOf(arr, proto)\n return arr.foo() === 42\n } catch (e) {\n return false\n }\n}\n\nObject.defineProperty(Buffer.prototype, 'parent', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.buffer\n }\n})\n\nObject.defineProperty(Buffer.prototype, 'offset', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.byteOffset\n }\n})\n\nfunction createBuffer (length) {\n if (length > K_MAX_LENGTH) {\n throw new RangeError('The value \"' + length + '\" is invalid for option \"size\"')\n }\n // Return an augmented `Uint8Array` instance\n const buf = new Uint8Array(length)\n Object.setPrototypeOf(buf, Buffer.prototype)\n return buf\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new TypeError(\n 'The \"string\" argument must be of type string. Received type number'\n )\n }\n return allocUnsafe(arg)\n }\n return from(arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\nfunction from (value, encodingOrOffset, length) {\n if (typeof value === 'string') {\n return fromString(value, encodingOrOffset)\n }\n\n if (ArrayBuffer.isView(value)) {\n return fromArrayView(value)\n }\n\n if (value == null) {\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n }\n\n if (isInstance(value, ArrayBuffer) ||\n (value && isInstance(value.buffer, ArrayBuffer))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof SharedArrayBuffer !== 'undefined' &&\n (isInstance(value, SharedArrayBuffer) ||\n (value && isInstance(value.buffer, SharedArrayBuffer)))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof value === 'number') {\n throw new TypeError(\n 'The \"value\" argument must not be of type number. Received type number'\n )\n }\n\n const valueOf = value.valueOf && value.valueOf()\n if (valueOf != null && valueOf !== value) {\n return Buffer.from(valueOf, encodingOrOffset, length)\n }\n\n const b = fromObject(value)\n if (b) return b\n\n if (typeof Symbol !== 'undefined' && Symbol.toPrimitive != null &&\n typeof value[Symbol.toPrimitive] === 'function') {\n return Buffer.from(value[Symbol.toPrimitive]('string'), encodingOrOffset, length)\n }\n\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n return from(value, encodingOrOffset, length)\n}\n\n// Note: Change prototype *after* Buffer.from is defined to workaround Chrome bug:\n// https://github.com/feross/buffer/pull/148\nObject.setPrototypeOf(Buffer.prototype, Uint8Array.prototype)\nObject.setPrototypeOf(Buffer, Uint8Array)\n\nfunction assertSize (size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be of type number')\n } else if (size < 0) {\n throw new RangeError('The value \"' + size + '\" is invalid for option \"size\"')\n }\n}\n\nfunction alloc (size, fill, encoding) {\n assertSize(size)\n if (size <= 0) {\n return createBuffer(size)\n }\n if (fill !== undefined) {\n // Only pay attention to encoding if it's a string. This\n // prevents accidentally sending in a number that would\n // be interpreted as a start offset.\n return typeof encoding === 'string'\n ? createBuffer(size).fill(fill, encoding)\n : createBuffer(size).fill(fill)\n }\n return createBuffer(size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n return alloc(size, fill, encoding)\n}\n\nfunction allocUnsafe (size) {\n assertSize(size)\n return createBuffer(size < 0 ? 0 : checked(size) | 0)\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n return allocUnsafe(size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n return allocUnsafe(size)\n}\n\nfunction fromString (string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8'\n }\n\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n\n const length = byteLength(string, encoding) | 0\n let buf = createBuffer(length)\n\n const actual = buf.write(string, encoding)\n\n if (actual !== length) {\n // Writing a hex string, for example, that contains invalid characters will\n // cause everything after the first invalid character to be ignored. (e.g.\n // 'abxxcd' will be treated as 'ab')\n buf = buf.slice(0, actual)\n }\n\n return buf\n}\n\nfunction fromArrayLike (array) {\n const length = array.length < 0 ? 0 : checked(array.length) | 0\n const buf = createBuffer(length)\n for (let i = 0; i < length; i += 1) {\n buf[i] = array[i] & 255\n }\n return buf\n}\n\nfunction fromArrayView (arrayView) {\n if (isInstance(arrayView, Uint8Array)) {\n const copy = new Uint8Array(arrayView)\n return fromArrayBuffer(copy.buffer, copy.byteOffset, copy.byteLength)\n }\n return fromArrayLike(arrayView)\n}\n\nfunction fromArrayBuffer (array, byteOffset, length) {\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\"offset\" is outside of buffer bounds')\n }\n\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\"length\" is outside of buffer bounds')\n }\n\n let buf\n if (byteOffset === undefined && length === undefined) {\n buf = new Uint8Array(array)\n } else if (length === undefined) {\n buf = new Uint8Array(array, byteOffset)\n } else {\n buf = new Uint8Array(array, byteOffset, length)\n }\n\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(buf, Buffer.prototype)\n\n return buf\n}\n\nfunction fromObject (obj) {\n if (Buffer.isBuffer(obj)) {\n const len = checked(obj.length) | 0\n const buf = createBuffer(len)\n\n if (buf.length === 0) {\n return buf\n }\n\n obj.copy(buf, 0, 0, len)\n return buf\n }\n\n if (obj.length !== undefined) {\n if (typeof obj.length !== 'number' || numberIsNaN(obj.length)) {\n return createBuffer(0)\n }\n return fromArrayLike(obj)\n }\n\n if (obj.type === 'Buffer' && Array.isArray(obj.data)) {\n return fromArrayLike(obj.data)\n }\n}\n\nfunction checked (length) {\n // Note: cannot use `length < K_MAX_LENGTH` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= K_MAX_LENGTH) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + K_MAX_LENGTH.toString(16) + ' bytes')\n }\n return length | 0\n}\n\nfunction SlowBuffer (length) {\n if (+length != length) { // eslint-disable-line eqeqeq\n length = 0\n }\n return Buffer.alloc(+length)\n}\n\nBuffer.isBuffer = function isBuffer (b) {\n return b != null && b._isBuffer === true &&\n b !== Buffer.prototype // so Buffer.isBuffer(Buffer.prototype) will be false\n}\n\nBuffer.compare = function compare (a, b) {\n if (isInstance(a, Uint8Array)) a = Buffer.from(a, a.offset, a.byteLength)\n if (isInstance(b, Uint8Array)) b = Buffer.from(b, b.offset, b.byteLength)\n if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n throw new TypeError(\n 'The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array'\n )\n }\n\n if (a === b) return 0\n\n let x = a.length\n let y = b.length\n\n for (let i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i]\n y = b[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n switch (String(encoding).toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'latin1':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return true\n default:\n return false\n }\n}\n\nBuffer.concat = function concat (list, length) {\n if (!Array.isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n\n if (list.length === 0) {\n return Buffer.alloc(0)\n }\n\n let i\n if (length === undefined) {\n length = 0\n for (i = 0; i < list.length; ++i) {\n length += list[i].length\n }\n }\n\n const buffer = Buffer.allocUnsafe(length)\n let pos = 0\n for (i = 0; i < list.length; ++i) {\n let buf = list[i]\n if (isInstance(buf, Uint8Array)) {\n if (pos + buf.length > buffer.length) {\n if (!Buffer.isBuffer(buf)) buf = Buffer.from(buf)\n buf.copy(buffer, pos)\n } else {\n Uint8Array.prototype.set.call(\n buffer,\n buf,\n pos\n )\n }\n } else if (!Buffer.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n } else {\n buf.copy(buffer, pos)\n }\n pos += buf.length\n }\n return buffer\n}\n\nfunction byteLength (string, encoding) {\n if (Buffer.isBuffer(string)) {\n return string.length\n }\n if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) {\n return string.byteLength\n }\n if (typeof string !== 'string') {\n throw new TypeError(\n 'The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. ' +\n 'Received type ' + typeof string\n )\n }\n\n const len = string.length\n const mustMatch = (arguments.length > 2 && arguments[2] === true)\n if (!mustMatch && len === 0) return 0\n\n // Use a for loop to avoid recursion\n let loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'ascii':\n case 'latin1':\n case 'binary':\n return len\n case 'utf8':\n case 'utf-8':\n return utf8ToBytes(string).length\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return len * 2\n case 'hex':\n return len >>> 1\n case 'base64':\n return base64ToBytes(string).length\n default:\n if (loweredCase) {\n return mustMatch ? -1 : utf8ToBytes(string).length // assume utf8\n }\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n let loweredCase = false\n\n // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n // property of a typed array.\n\n // This behaves neither like String nor Uint8Array in that we set start/end\n // to their upper/lower bounds if the value passed is out of range.\n // undefined is handled specially as per ECMA-262 6th Edition,\n // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n if (start === undefined || start < 0) {\n start = 0\n }\n // Return early if start > this.length. Done here to prevent potential uint32\n // coercion fail below.\n if (start > this.length) {\n return ''\n }\n\n if (end === undefined || end > this.length) {\n end = this.length\n }\n\n if (end <= 0) {\n return ''\n }\n\n // Force coercion to uint32. This will also coerce falsey/NaN values to 0.\n end >>>= 0\n start >>>= 0\n\n if (end <= start) {\n return ''\n }\n\n if (!encoding) encoding = 'utf8'\n\n while (true) {\n switch (encoding) {\n case 'hex':\n return hexSlice(this, start, end)\n\n case 'utf8':\n case 'utf-8':\n return utf8Slice(this, start, end)\n\n case 'ascii':\n return asciiSlice(this, start, end)\n\n case 'latin1':\n case 'binary':\n return latin1Slice(this, start, end)\n\n case 'base64':\n return base64Slice(this, start, end)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return utf16leSlice(this, start, end)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = (encoding + '').toLowerCase()\n loweredCase = true\n }\n }\n}\n\n// This property is used by `Buffer.isBuffer` (and the `is-buffer` npm package)\n// to detect a Buffer instance. It's not possible to use `instanceof Buffer`\n// reliably in a browserify context because there could be multiple different\n// copies of the 'buffer' package in use. This method works even for Buffer\n// instances that were created from another copy of the `buffer` package.\n// See: https://github.com/feross/buffer/issues/154\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n const i = b[n]\n b[n] = b[m]\n b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n const len = this.length\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits')\n }\n for (let i = 0; i < len; i += 2) {\n swap(this, i, i + 1)\n }\n return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n const len = this.length\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits')\n }\n for (let i = 0; i < len; i += 4) {\n swap(this, i, i + 3)\n swap(this, i + 1, i + 2)\n }\n return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n const len = this.length\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits')\n }\n for (let i = 0; i < len; i += 8) {\n swap(this, i, i + 7)\n swap(this, i + 1, i + 6)\n swap(this, i + 2, i + 5)\n swap(this, i + 3, i + 4)\n }\n return this\n}\n\nBuffer.prototype.toString = function toString () {\n const length = this.length\n if (length === 0) return ''\n if (arguments.length === 0) return utf8Slice(this, 0, length)\n return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.toLocaleString = Buffer.prototype.toString\n\nBuffer.prototype.equals = function equals (b) {\n if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n if (this === b) return true\n return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n let str = ''\n const max = exports.INSPECT_MAX_BYTES\n str = this.toString('hex', 0, max).replace(/(.{2})/g, '$1 ').trim()\n if (this.length > max) str += ' ... '\n return ''\n}\nif (customInspectSymbol) {\n Buffer.prototype[customInspectSymbol] = Buffer.prototype.inspect\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n if (isInstance(target, Uint8Array)) {\n target = Buffer.from(target, target.offset, target.byteLength)\n }\n if (!Buffer.isBuffer(target)) {\n throw new TypeError(\n 'The \"target\" argument must be one of type Buffer or Uint8Array. ' +\n 'Received type ' + (typeof target)\n )\n }\n\n if (start === undefined) {\n start = 0\n }\n if (end === undefined) {\n end = target ? target.length : 0\n }\n if (thisStart === undefined) {\n thisStart = 0\n }\n if (thisEnd === undefined) {\n thisEnd = this.length\n }\n\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError('out of range index')\n }\n\n if (thisStart >= thisEnd && start >= end) {\n return 0\n }\n if (thisStart >= thisEnd) {\n return -1\n }\n if (start >= end) {\n return 1\n }\n\n start >>>= 0\n end >>>= 0\n thisStart >>>= 0\n thisEnd >>>= 0\n\n if (this === target) return 0\n\n let x = thisEnd - thisStart\n let y = end - start\n const len = Math.min(x, y)\n\n const thisCopy = this.slice(thisStart, thisEnd)\n const targetCopy = target.slice(start, end)\n\n for (let i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i]\n y = targetCopy[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (numberIsNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [val], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n let indexSize = 1\n let arrLength = arr.length\n let valLength = val.length\n\n if (encoding !== undefined) {\n encoding = String(encoding).toLowerCase()\n if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n encoding === 'utf16le' || encoding === 'utf-16le') {\n if (arr.length < 2 || val.length < 2) {\n return -1\n }\n indexSize = 2\n arrLength /= 2\n valLength /= 2\n byteOffset /= 2\n }\n }\n\n function read (buf, i) {\n if (indexSize === 1) {\n return buf[i]\n } else {\n return buf.readUInt16BE(i * indexSize)\n }\n }\n\n let i\n if (dir) {\n let foundIndex = -1\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1) foundIndex = i\n if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n } else {\n if (foundIndex !== -1) i -= i - foundIndex\n foundIndex = -1\n }\n }\n } else {\n if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n for (i = byteOffset; i >= 0; i--) {\n let found = true\n for (let j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false\n break\n }\n }\n if (found) return i\n }\n }\n\n return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n offset = Number(offset) || 0\n const remaining = buf.length - offset\n if (!length) {\n length = remaining\n } else {\n length = Number(length)\n if (length > remaining) {\n length = remaining\n }\n }\n\n const strLen = string.length\n\n if (length > strLen / 2) {\n length = strLen / 2\n }\n let i\n for (i = 0; i < length; ++i) {\n const parsed = parseInt(string.substr(i * 2, 2), 16)\n if (numberIsNaN(parsed)) return i\n buf[offset + i] = parsed\n }\n return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n // Buffer#write(string)\n if (offset === undefined) {\n encoding = 'utf8'\n length = this.length\n offset = 0\n // Buffer#write(string, encoding)\n } else if (length === undefined && typeof offset === 'string') {\n encoding = offset\n length = this.length\n offset = 0\n // Buffer#write(string, offset[, length][, encoding])\n } else if (isFinite(offset)) {\n offset = offset >>> 0\n if (isFinite(length)) {\n length = length >>> 0\n if (encoding === undefined) encoding = 'utf8'\n } else {\n encoding = length\n length = undefined\n }\n } else {\n throw new Error(\n 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n )\n }\n\n const remaining = this.length - offset\n if (length === undefined || length > remaining) length = remaining\n\n if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n throw new RangeError('Attempt to write outside buffer bounds')\n }\n\n if (!encoding) encoding = 'utf8'\n\n let loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'hex':\n return hexWrite(this, string, offset, length)\n\n case 'utf8':\n case 'utf-8':\n return utf8Write(this, string, offset, length)\n\n case 'ascii':\n case 'latin1':\n case 'binary':\n return asciiWrite(this, string, offset, length)\n\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return base64Write(this, string, offset, length)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return ucs2Write(this, string, offset, length)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0)\n }\n}\n\nfunction base64Slice (buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf)\n } else {\n return base64.fromByteArray(buf.slice(start, end))\n }\n}\n\nfunction utf8Slice (buf, start, end) {\n end = Math.min(buf.length, end)\n const res = []\n\n let i = start\n while (i < end) {\n const firstByte = buf[i]\n let codePoint = null\n let bytesPerSequence = (firstByte > 0xEF)\n ? 4\n : (firstByte > 0xDF)\n ? 3\n : (firstByte > 0xBF)\n ? 2\n : 1\n\n if (i + bytesPerSequence <= end) {\n let secondByte, thirdByte, fourthByte, tempCodePoint\n\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 0x80) {\n codePoint = firstByte\n }\n break\n case 2:\n secondByte = buf[i + 1]\n if ((secondByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n if (tempCodePoint > 0x7F) {\n codePoint = tempCodePoint\n }\n }\n break\n case 3:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n codePoint = tempCodePoint\n }\n }\n break\n case 4:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n fourthByte = buf[i + 3]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n codePoint = tempCodePoint\n }\n }\n }\n }\n\n if (codePoint === null) {\n // we did not generate a valid codePoint so insert a\n // replacement char (U+FFFD) and advance only 1 byte\n codePoint = 0xFFFD\n bytesPerSequence = 1\n } else if (codePoint > 0xFFFF) {\n // encode to utf16 (surrogate pair dance)\n codePoint -= 0x10000\n res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n codePoint = 0xDC00 | codePoint & 0x3FF\n }\n\n res.push(codePoint)\n i += bytesPerSequence\n }\n\n return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nconst MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n const len = codePoints.length\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n }\n\n // Decode in chunks to avoid \"call stack size exceeded\".\n let res = ''\n let i = 0\n while (i < len) {\n res += String.fromCharCode.apply(\n String,\n codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n )\n }\n return res\n}\n\nfunction asciiSlice (buf, start, end) {\n let ret = ''\n end = Math.min(buf.length, end)\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F)\n }\n return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n let ret = ''\n end = Math.min(buf.length, end)\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i])\n }\n return ret\n}\n\nfunction hexSlice (buf, start, end) {\n const len = buf.length\n\n if (!start || start < 0) start = 0\n if (!end || end < 0 || end > len) end = len\n\n let out = ''\n for (let i = start; i < end; ++i) {\n out += hexSliceLookupTable[buf[i]]\n }\n return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n const bytes = buf.slice(start, end)\n let res = ''\n // If bytes.length is odd, the last 8 bits must be ignored (same as node.js)\n for (let i = 0; i < bytes.length - 1; i += 2) {\n res += String.fromCharCode(bytes[i] + (bytes[i + 1] * 256))\n }\n return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n const len = this.length\n start = ~~start\n end = end === undefined ? len : ~~end\n\n if (start < 0) {\n start += len\n if (start < 0) start = 0\n } else if (start > len) {\n start = len\n }\n\n if (end < 0) {\n end += len\n if (end < 0) end = 0\n } else if (end > len) {\n end = len\n }\n\n if (end < start) end = start\n\n const newBuf = this.subarray(start, end)\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(newBuf, Buffer.prototype)\n\n return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUintLE =\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let val = this[offset]\n let mul = 1\n let i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUintBE =\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n checkOffset(offset, byteLength, this.length)\n }\n\n let val = this[offset + --byteLength]\n let mul = 1\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUint8 =\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n return this[offset]\n}\n\nBuffer.prototype.readUint16LE =\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUint16BE =\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUint32LE =\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return ((this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16)) +\n (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUint32BE =\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] * 0x1000000) +\n ((this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n this[offset + 3])\n}\n\nBuffer.prototype.readBigUInt64LE = defineBigIntMethod(function readBigUInt64LE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const lo = first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24\n\n const hi = this[++offset] +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n last * 2 ** 24\n\n return BigInt(lo) + (BigInt(hi) << BigInt(32))\n})\n\nBuffer.prototype.readBigUInt64BE = defineBigIntMethod(function readBigUInt64BE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const hi = first * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset]\n\n const lo = this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last\n\n return (BigInt(hi) << BigInt(32)) + BigInt(lo)\n})\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let val = this[offset]\n let mul = 1\n let i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let i = byteLength\n let mul = 1\n let val = this[offset + --i]\n while (i > 0 && (mul *= 0x100)) {\n val += this[offset + --i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n if (!(this[offset] & 0x80)) return (this[offset])\n return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n const val = this[offset] | (this[offset + 1] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n const val = this[offset + 1] | (this[offset] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16) |\n (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] << 24) |\n (this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n (this[offset + 3])\n}\n\nBuffer.prototype.readBigInt64LE = defineBigIntMethod(function readBigInt64LE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const val = this[offset + 4] +\n this[offset + 5] * 2 ** 8 +\n this[offset + 6] * 2 ** 16 +\n (last << 24) // Overflow\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24)\n})\n\nBuffer.prototype.readBigInt64BE = defineBigIntMethod(function readBigInt64BE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const val = (first << 24) + // Overflow\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset]\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last)\n})\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUintLE =\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n let mul = 1\n let i = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUintBE =\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n let i = byteLength - 1\n let mul = 1\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUint8 =\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeUint16LE =\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeUint16BE =\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeUint32LE =\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset + 3] = (value >>> 24)\n this[offset + 2] = (value >>> 16)\n this[offset + 1] = (value >>> 8)\n this[offset] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeUint32BE =\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nfunction wrtBigUInt64LE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7)\n\n let lo = Number(value & BigInt(0xffffffff))\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n return offset\n}\n\nfunction wrtBigUInt64BE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7)\n\n let lo = Number(value & BigInt(0xffffffff))\n buf[offset + 7] = lo\n lo = lo >> 8\n buf[offset + 6] = lo\n lo = lo >> 8\n buf[offset + 5] = lo\n lo = lo >> 8\n buf[offset + 4] = lo\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n buf[offset + 3] = hi\n hi = hi >> 8\n buf[offset + 2] = hi\n hi = hi >> 8\n buf[offset + 1] = hi\n hi = hi >> 8\n buf[offset] = hi\n return offset + 8\n}\n\nBuffer.prototype.writeBigUInt64LE = defineBigIntMethod(function writeBigUInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeBigUInt64BE = defineBigIntMethod(function writeBigUInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n let i = 0\n let mul = 1\n let sub = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n let i = byteLength - 1\n let mul = 1\n let sub = 0\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n if (value < 0) value = 0xff + value + 1\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n this[offset + 2] = (value >>> 16)\n this[offset + 3] = (value >>> 24)\n return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (value < 0) value = 0xffffffff + value + 1\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeBigInt64LE = defineBigIntMethod(function writeBigInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nBuffer.prototype.writeBigInt64BE = defineBigIntMethod(function writeBigInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n }\n ieee754.write(buf, value, offset, littleEndian, 23, 4)\n return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n }\n ieee754.write(buf, value, offset, littleEndian, 52, 8)\n return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n if (!Buffer.isBuffer(target)) throw new TypeError('argument should be a Buffer')\n if (!start) start = 0\n if (!end && end !== 0) end = this.length\n if (targetStart >= target.length) targetStart = target.length\n if (!targetStart) targetStart = 0\n if (end > 0 && end < start) end = start\n\n // Copy 0 bytes; we're done\n if (end === start) return 0\n if (target.length === 0 || this.length === 0) return 0\n\n // Fatal error conditions\n if (targetStart < 0) {\n throw new RangeError('targetStart out of bounds')\n }\n if (start < 0 || start >= this.length) throw new RangeError('Index out of range')\n if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n // Are we oob?\n if (end > this.length) end = this.length\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start\n }\n\n const len = end - start\n\n if (this === target && typeof Uint8Array.prototype.copyWithin === 'function') {\n // Use built-in when available, missing from IE11\n this.copyWithin(targetStart, start, end)\n } else {\n Uint8Array.prototype.set.call(\n target,\n this.subarray(start, end),\n targetStart\n )\n }\n\n return len\n}\n\n// Usage:\n// buffer.fill(number[, offset[, end]])\n// buffer.fill(buffer[, offset[, end]])\n// buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n // Handle string cases:\n if (typeof val === 'string') {\n if (typeof start === 'string') {\n encoding = start\n start = 0\n end = this.length\n } else if (typeof end === 'string') {\n encoding = end\n end = this.length\n }\n if (encoding !== undefined && typeof encoding !== 'string') {\n throw new TypeError('encoding must be a string')\n }\n if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n if (val.length === 1) {\n const code = val.charCodeAt(0)\n if ((encoding === 'utf8' && code < 128) ||\n encoding === 'latin1') {\n // Fast path: If `val` fits into a single byte, use that numeric value.\n val = code\n }\n }\n } else if (typeof val === 'number') {\n val = val & 255\n } else if (typeof val === 'boolean') {\n val = Number(val)\n }\n\n // Invalid ranges are not set to a default, so can range check early.\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError('Out of range index')\n }\n\n if (end <= start) {\n return this\n }\n\n start = start >>> 0\n end = end === undefined ? this.length : end >>> 0\n\n if (!val) val = 0\n\n let i\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val\n }\n } else {\n const bytes = Buffer.isBuffer(val)\n ? val\n : Buffer.from(val, encoding)\n const len = bytes.length\n if (len === 0) {\n throw new TypeError('The value \"' + val +\n '\" is invalid for argument \"value\"')\n }\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len]\n }\n }\n\n return this\n}\n\n// CUSTOM ERRORS\n// =============\n\n// Simplified versions from Node, changed for Buffer-only usage\nconst errors = {}\nfunction E (sym, getMessage, Base) {\n errors[sym] = class NodeError extends Base {\n constructor () {\n super()\n\n Object.defineProperty(this, 'message', {\n value: getMessage.apply(this, arguments),\n writable: true,\n configurable: true\n })\n\n // Add the error code to the name to include it in the stack trace.\n this.name = `${this.name} [${sym}]`\n // Access the stack to generate the error message including the error code\n // from the name.\n this.stack // eslint-disable-line no-unused-expressions\n // Reset the name to the actual name.\n delete this.name\n }\n\n get code () {\n return sym\n }\n\n set code (value) {\n Object.defineProperty(this, 'code', {\n configurable: true,\n enumerable: true,\n value,\n writable: true\n })\n }\n\n toString () {\n return `${this.name} [${sym}]: ${this.message}`\n }\n }\n}\n\nE('ERR_BUFFER_OUT_OF_BOUNDS',\n function (name) {\n if (name) {\n return `${name} is outside of buffer bounds`\n }\n\n return 'Attempt to access memory outside buffer bounds'\n }, RangeError)\nE('ERR_INVALID_ARG_TYPE',\n function (name, actual) {\n return `The \"${name}\" argument must be of type number. Received type ${typeof actual}`\n }, TypeError)\nE('ERR_OUT_OF_RANGE',\n function (str, range, input) {\n let msg = `The value of \"${str}\" is out of range.`\n let received = input\n if (Number.isInteger(input) && Math.abs(input) > 2 ** 32) {\n received = addNumericalSeparator(String(input))\n } else if (typeof input === 'bigint') {\n received = String(input)\n if (input > BigInt(2) ** BigInt(32) || input < -(BigInt(2) ** BigInt(32))) {\n received = addNumericalSeparator(received)\n }\n received += 'n'\n }\n msg += ` It must be ${range}. Received ${received}`\n return msg\n }, RangeError)\n\nfunction addNumericalSeparator (val) {\n let res = ''\n let i = val.length\n const start = val[0] === '-' ? 1 : 0\n for (; i >= start + 4; i -= 3) {\n res = `_${val.slice(i - 3, i)}${res}`\n }\n return `${val.slice(0, i)}${res}`\n}\n\n// CHECK FUNCTIONS\n// ===============\n\nfunction checkBounds (buf, offset, byteLength) {\n validateNumber(offset, 'offset')\n if (buf[offset] === undefined || buf[offset + byteLength] === undefined) {\n boundsError(offset, buf.length - (byteLength + 1))\n }\n}\n\nfunction checkIntBI (value, min, max, buf, offset, byteLength) {\n if (value > max || value < min) {\n const n = typeof min === 'bigint' ? 'n' : ''\n let range\n if (byteLength > 3) {\n if (min === 0 || min === BigInt(0)) {\n range = `>= 0${n} and < 2${n} ** ${(byteLength + 1) * 8}${n}`\n } else {\n range = `>= -(2${n} ** ${(byteLength + 1) * 8 - 1}${n}) and < 2 ** ` +\n `${(byteLength + 1) * 8 - 1}${n}`\n }\n } else {\n range = `>= ${min}${n} and <= ${max}${n}`\n }\n throw new errors.ERR_OUT_OF_RANGE('value', range, value)\n }\n checkBounds(buf, offset, byteLength)\n}\n\nfunction validateNumber (value, name) {\n if (typeof value !== 'number') {\n throw new errors.ERR_INVALID_ARG_TYPE(name, 'number', value)\n }\n}\n\nfunction boundsError (value, length, type) {\n if (Math.floor(value) !== value) {\n validateNumber(value, type)\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset', 'an integer', value)\n }\n\n if (length < 0) {\n throw new errors.ERR_BUFFER_OUT_OF_BOUNDS()\n }\n\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset',\n `>= ${type ? 1 : 0} and <= ${length}`,\n value)\n}\n\n// HELPER FUNCTIONS\n// ================\n\nconst INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n // Node takes equal signs as end of the Base64 encoding\n str = str.split('=')[0]\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = str.trim().replace(INVALID_BASE64_RE, '')\n // Node converts strings with length < 2 to ''\n if (str.length < 2) return ''\n // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n while (str.length % 4 !== 0) {\n str = str + '='\n }\n return str\n}\n\nfunction utf8ToBytes (string, units) {\n units = units || Infinity\n let codePoint\n const length = string.length\n let leadSurrogate = null\n const bytes = []\n\n for (let i = 0; i < length; ++i) {\n codePoint = string.charCodeAt(i)\n\n // is surrogate component\n if (codePoint > 0xD7FF && codePoint < 0xE000) {\n // last char was a lead\n if (!leadSurrogate) {\n // no lead yet\n if (codePoint > 0xDBFF) {\n // unexpected trail\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n } else if (i + 1 === length) {\n // unpaired lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n }\n\n // valid lead\n leadSurrogate = codePoint\n\n continue\n }\n\n // 2 leads in a row\n if (codePoint < 0xDC00) {\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n leadSurrogate = codePoint\n continue\n }\n\n // valid surrogate pair\n codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n } else if (leadSurrogate) {\n // valid bmp char, but last char was a lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n }\n\n leadSurrogate = null\n\n // encode utf8\n if (codePoint < 0x80) {\n if ((units -= 1) < 0) break\n bytes.push(codePoint)\n } else if (codePoint < 0x800) {\n if ((units -= 2) < 0) break\n bytes.push(\n codePoint >> 0x6 | 0xC0,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x10000) {\n if ((units -= 3) < 0) break\n bytes.push(\n codePoint >> 0xC | 0xE0,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x110000) {\n if ((units -= 4) < 0) break\n bytes.push(\n codePoint >> 0x12 | 0xF0,\n codePoint >> 0xC & 0x3F | 0x80,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else {\n throw new Error('Invalid code point')\n }\n }\n\n return bytes\n}\n\nfunction asciiToBytes (str) {\n const byteArray = []\n for (let i = 0; i < str.length; ++i) {\n // Node's code seems to be doing this and not & 0x7F..\n byteArray.push(str.charCodeAt(i) & 0xFF)\n }\n return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n let c, hi, lo\n const byteArray = []\n for (let i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0) break\n\n c = str.charCodeAt(i)\n hi = c >> 8\n lo = c % 256\n byteArray.push(lo)\n byteArray.push(hi)\n }\n\n return byteArray\n}\n\nfunction base64ToBytes (str) {\n return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n let i\n for (i = 0; i < length; ++i) {\n if ((i + offset >= dst.length) || (i >= src.length)) break\n dst[i + offset] = src[i]\n }\n return i\n}\n\n// ArrayBuffer or Uint8Array objects from other contexts (i.e. iframes) do not pass\n// the `instanceof` check but they should be treated as of that type.\n// See: https://github.com/feross/buffer/issues/166\nfunction isInstance (obj, type) {\n return obj instanceof type ||\n (obj != null && obj.constructor != null && obj.constructor.name != null &&\n obj.constructor.name === type.name)\n}\nfunction numberIsNaN (obj) {\n // For IE11 support\n return obj !== obj // eslint-disable-line no-self-compare\n}\n\n// Create lookup table for `toString('hex')`\n// See: https://github.com/feross/buffer/issues/219\nconst hexSliceLookupTable = (function () {\n const alphabet = '0123456789abcdef'\n const table = new Array(256)\n for (let i = 0; i < 16; ++i) {\n const i16 = i * 16\n for (let j = 0; j < 16; ++j) {\n table[i16 + j] = alphabet[i] + alphabet[j]\n }\n }\n return table\n})()\n\n// Return not function with Error if BigInt not supported\nfunction defineBigIntMethod (fn) {\n return typeof BigInt === 'undefined' ? BufferBigIntNotDefined : fn\n}\n\nfunction BufferBigIntNotDefined () {\n throw new Error('BigInt not supported')\n}\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\nvar R = typeof Reflect === 'object' ? Reflect : null\nvar ReflectApply = R && typeof R.apply === 'function'\n ? R.apply\n : function ReflectApply(target, receiver, args) {\n return Function.prototype.apply.call(target, receiver, args);\n }\n\nvar ReflectOwnKeys\nif (R && typeof R.ownKeys === 'function') {\n ReflectOwnKeys = R.ownKeys\n} else if (Object.getOwnPropertySymbols) {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target)\n .concat(Object.getOwnPropertySymbols(target));\n };\n} else {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target);\n };\n}\n\nfunction ProcessEmitWarning(warning) {\n if (console && console.warn) console.warn(warning);\n}\n\nvar NumberIsNaN = Number.isNaN || function NumberIsNaN(value) {\n return value !== value;\n}\n\nfunction EventEmitter() {\n EventEmitter.init.call(this);\n}\nmodule.exports = EventEmitter;\nmodule.exports.once = once;\n\n// Backwards-compat with node 0.10.x\nEventEmitter.EventEmitter = EventEmitter;\n\nEventEmitter.prototype._events = undefined;\nEventEmitter.prototype._eventsCount = 0;\nEventEmitter.prototype._maxListeners = undefined;\n\n// By default EventEmitters will print a warning if more than 10 listeners are\n// added to it. This is a useful default which helps finding memory leaks.\nvar defaultMaxListeners = 10;\n\nfunction checkListener(listener) {\n if (typeof listener !== 'function') {\n throw new TypeError('The \"listener\" argument must be of type Function. Received type ' + typeof listener);\n }\n}\n\nObject.defineProperty(EventEmitter, 'defaultMaxListeners', {\n enumerable: true,\n get: function() {\n return defaultMaxListeners;\n },\n set: function(arg) {\n if (typeof arg !== 'number' || arg < 0 || NumberIsNaN(arg)) {\n throw new RangeError('The value of \"defaultMaxListeners\" is out of range. It must be a non-negative number. Received ' + arg + '.');\n }\n defaultMaxListeners = arg;\n }\n});\n\nEventEmitter.init = function() {\n\n if (this._events === undefined ||\n this._events === Object.getPrototypeOf(this)._events) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n }\n\n this._maxListeners = this._maxListeners || undefined;\n};\n\n// Obviously not all Emitters should be limited to 10. This function allows\n// that to be increased. Set to zero for unlimited.\nEventEmitter.prototype.setMaxListeners = function setMaxListeners(n) {\n if (typeof n !== 'number' || n < 0 || NumberIsNaN(n)) {\n throw new RangeError('The value of \"n\" is out of range. It must be a non-negative number. Received ' + n + '.');\n }\n this._maxListeners = n;\n return this;\n};\n\nfunction _getMaxListeners(that) {\n if (that._maxListeners === undefined)\n return EventEmitter.defaultMaxListeners;\n return that._maxListeners;\n}\n\nEventEmitter.prototype.getMaxListeners = function getMaxListeners() {\n return _getMaxListeners(this);\n};\n\nEventEmitter.prototype.emit = function emit(type) {\n var args = [];\n for (var i = 1; i < arguments.length; i++) args.push(arguments[i]);\n var doError = (type === 'error');\n\n var events = this._events;\n if (events !== undefined)\n doError = (doError && events.error === undefined);\n else if (!doError)\n return false;\n\n // If there is no 'error' event listener then throw.\n if (doError) {\n var er;\n if (args.length > 0)\n er = args[0];\n if (er instanceof Error) {\n // Note: The comments on the `throw` lines are intentional, they show\n // up in Node's output if this results in an unhandled exception.\n throw er; // Unhandled 'error' event\n }\n // At least give some kind of context to the user\n var err = new Error('Unhandled error.' + (er ? ' (' + er.message + ')' : ''));\n err.context = er;\n throw err; // Unhandled 'error' event\n }\n\n var handler = events[type];\n\n if (handler === undefined)\n return false;\n\n if (typeof handler === 'function') {\n ReflectApply(handler, this, args);\n } else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n ReflectApply(listeners[i], this, args);\n }\n\n return true;\n};\n\nfunction _addListener(target, type, listener, prepend) {\n var m;\n var events;\n var existing;\n\n checkListener(listener);\n\n events = target._events;\n if (events === undefined) {\n events = target._events = Object.create(null);\n target._eventsCount = 0;\n } else {\n // To avoid recursion in the case that type === \"newListener\"! Before\n // adding it to the listeners, first emit \"newListener\".\n if (events.newListener !== undefined) {\n target.emit('newListener', type,\n listener.listener ? listener.listener : listener);\n\n // Re-assign `events` because a newListener handler could have caused the\n // this._events to be assigned to a new object\n events = target._events;\n }\n existing = events[type];\n }\n\n if (existing === undefined) {\n // Optimize the case of one listener. Don't need the extra array object.\n existing = events[type] = listener;\n ++target._eventsCount;\n } else {\n if (typeof existing === 'function') {\n // Adding the second element, need to change to array.\n existing = events[type] =\n prepend ? [listener, existing] : [existing, listener];\n // If we've already got an array, just append.\n } else if (prepend) {\n existing.unshift(listener);\n } else {\n existing.push(listener);\n }\n\n // Check for listener leak\n m = _getMaxListeners(target);\n if (m > 0 && existing.length > m && !existing.warned) {\n existing.warned = true;\n // No error code for this since it is a Warning\n // eslint-disable-next-line no-restricted-syntax\n var w = new Error('Possible EventEmitter memory leak detected. ' +\n existing.length + ' ' + String(type) + ' listeners ' +\n 'added. Use emitter.setMaxListeners() to ' +\n 'increase limit');\n w.name = 'MaxListenersExceededWarning';\n w.emitter = target;\n w.type = type;\n w.count = existing.length;\n ProcessEmitWarning(w);\n }\n }\n\n return target;\n}\n\nEventEmitter.prototype.addListener = function addListener(type, listener) {\n return _addListener(this, type, listener, false);\n};\n\nEventEmitter.prototype.on = EventEmitter.prototype.addListener;\n\nEventEmitter.prototype.prependListener =\n function prependListener(type, listener) {\n return _addListener(this, type, listener, true);\n };\n\nfunction onceWrapper() {\n if (!this.fired) {\n this.target.removeListener(this.type, this.wrapFn);\n this.fired = true;\n if (arguments.length === 0)\n return this.listener.call(this.target);\n return this.listener.apply(this.target, arguments);\n }\n}\n\nfunction _onceWrap(target, type, listener) {\n var state = { fired: false, wrapFn: undefined, target: target, type: type, listener: listener };\n var wrapped = onceWrapper.bind(state);\n wrapped.listener = listener;\n state.wrapFn = wrapped;\n return wrapped;\n}\n\nEventEmitter.prototype.once = function once(type, listener) {\n checkListener(listener);\n this.on(type, _onceWrap(this, type, listener));\n return this;\n};\n\nEventEmitter.prototype.prependOnceListener =\n function prependOnceListener(type, listener) {\n checkListener(listener);\n this.prependListener(type, _onceWrap(this, type, listener));\n return this;\n };\n\n// Emits a 'removeListener' event if and only if the listener was removed.\nEventEmitter.prototype.removeListener =\n function removeListener(type, listener) {\n var list, events, position, i, originalListener;\n\n checkListener(listener);\n\n events = this._events;\n if (events === undefined)\n return this;\n\n list = events[type];\n if (list === undefined)\n return this;\n\n if (list === listener || list.listener === listener) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else {\n delete events[type];\n if (events.removeListener)\n this.emit('removeListener', type, list.listener || listener);\n }\n } else if (typeof list !== 'function') {\n position = -1;\n\n for (i = list.length - 1; i >= 0; i--) {\n if (list[i] === listener || list[i].listener === listener) {\n originalListener = list[i].listener;\n position = i;\n break;\n }\n }\n\n if (position < 0)\n return this;\n\n if (position === 0)\n list.shift();\n else {\n spliceOne(list, position);\n }\n\n if (list.length === 1)\n events[type] = list[0];\n\n if (events.removeListener !== undefined)\n this.emit('removeListener', type, originalListener || listener);\n }\n\n return this;\n };\n\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\n\nEventEmitter.prototype.removeAllListeners =\n function removeAllListeners(type) {\n var listeners, events, i;\n\n events = this._events;\n if (events === undefined)\n return this;\n\n // not listening for removeListener, no need to emit\n if (events.removeListener === undefined) {\n if (arguments.length === 0) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n } else if (events[type] !== undefined) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else\n delete events[type];\n }\n return this;\n }\n\n // emit removeListener for all listeners on all events\n if (arguments.length === 0) {\n var keys = Object.keys(events);\n var key;\n for (i = 0; i < keys.length; ++i) {\n key = keys[i];\n if (key === 'removeListener') continue;\n this.removeAllListeners(key);\n }\n this.removeAllListeners('removeListener');\n this._events = Object.create(null);\n this._eventsCount = 0;\n return this;\n }\n\n listeners = events[type];\n\n if (typeof listeners === 'function') {\n this.removeListener(type, listeners);\n } else if (listeners !== undefined) {\n // LIFO order\n for (i = listeners.length - 1; i >= 0; i--) {\n this.removeListener(type, listeners[i]);\n }\n }\n\n return this;\n };\n\nfunction _listeners(target, type, unwrap) {\n var events = target._events;\n\n if (events === undefined)\n return [];\n\n var evlistener = events[type];\n if (evlistener === undefined)\n return [];\n\n if (typeof evlistener === 'function')\n return unwrap ? [evlistener.listener || evlistener] : [evlistener];\n\n return unwrap ?\n unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length);\n}\n\nEventEmitter.prototype.listeners = function listeners(type) {\n return _listeners(this, type, true);\n};\n\nEventEmitter.prototype.rawListeners = function rawListeners(type) {\n return _listeners(this, type, false);\n};\n\nEventEmitter.listenerCount = function(emitter, type) {\n if (typeof emitter.listenerCount === 'function') {\n return emitter.listenerCount(type);\n } else {\n return listenerCount.call(emitter, type);\n }\n};\n\nEventEmitter.prototype.listenerCount = listenerCount;\nfunction listenerCount(type) {\n var events = this._events;\n\n if (events !== undefined) {\n var evlistener = events[type];\n\n if (typeof evlistener === 'function') {\n return 1;\n } else if (evlistener !== undefined) {\n return evlistener.length;\n }\n }\n\n return 0;\n}\n\nEventEmitter.prototype.eventNames = function eventNames() {\n return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : [];\n};\n\nfunction arrayClone(arr, n) {\n var copy = new Array(n);\n for (var i = 0; i < n; ++i)\n copy[i] = arr[i];\n return copy;\n}\n\nfunction spliceOne(list, index) {\n for (; index + 1 < list.length; index++)\n list[index] = list[index + 1];\n list.pop();\n}\n\nfunction unwrapListeners(arr) {\n var ret = new Array(arr.length);\n for (var i = 0; i < ret.length; ++i) {\n ret[i] = arr[i].listener || arr[i];\n }\n return ret;\n}\n\nfunction once(emitter, name) {\n return new Promise(function (resolve, reject) {\n function errorListener(err) {\n emitter.removeListener(name, resolver);\n reject(err);\n }\n\n function resolver() {\n if (typeof emitter.removeListener === 'function') {\n emitter.removeListener('error', errorListener);\n }\n resolve([].slice.call(arguments));\n };\n\n eventTargetAgnosticAddListener(emitter, name, resolver, { once: true });\n if (name !== 'error') {\n addErrorHandlerIfEventEmitter(emitter, errorListener, { once: true });\n }\n });\n}\n\nfunction addErrorHandlerIfEventEmitter(emitter, handler, flags) {\n if (typeof emitter.on === 'function') {\n eventTargetAgnosticAddListener(emitter, 'error', handler, flags);\n }\n}\n\nfunction eventTargetAgnosticAddListener(emitter, name, listener, flags) {\n if (typeof emitter.on === 'function') {\n if (flags.once) {\n emitter.once(name, listener);\n } else {\n emitter.on(name, listener);\n }\n } else if (typeof emitter.addEventListener === 'function') {\n // EventTarget does not have `error` event semantics like Node\n // EventEmitters, we do not listen for `error` events here.\n emitter.addEventListener(name, function wrapListener(arg) {\n // IE does not have builtin `{ once: true }` support so we\n // have to do it manually.\n if (flags.once) {\n emitter.removeEventListener(name, wrapListener);\n }\n listener(arg);\n });\n } else {\n throw new TypeError('The \"emitter\" argument must be of type EventEmitter. Received type ' + typeof emitter);\n }\n}\n","/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */\nexports.read = function (buffer, offset, isLE, mLen, nBytes) {\n var e, m\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var nBits = -7\n var i = isLE ? (nBytes - 1) : 0\n var d = isLE ? -1 : 1\n var s = buffer[offset + i]\n\n i += d\n\n e = s & ((1 << (-nBits)) - 1)\n s >>= (-nBits)\n nBits += eLen\n for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & ((1 << (-nBits)) - 1)\n e >>= (-nBits)\n nBits += mLen\n for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias\n } else if (e === eMax) {\n return m ? NaN : ((s ? -1 : 1) * Infinity)\n } else {\n m = m + Math.pow(2, mLen)\n e = e - eBias\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n var i = isLE ? 0 : (nBytes - 1)\n var d = isLE ? 1 : -1\n var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n value = Math.abs(value)\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0\n e = eMax\n } else {\n e = Math.floor(Math.log(value) / Math.LN2)\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--\n c *= 2\n }\n if (e + eBias >= 1) {\n value += rt / c\n } else {\n value += rt * Math.pow(2, 1 - eBias)\n }\n if (value * c >= 2) {\n e++\n c /= 2\n }\n\n if (e + eBias >= eMax) {\n m = 0\n e = eMax\n } else if (e + eBias >= 1) {\n m = ((value * c) - 1) * Math.pow(2, mLen)\n e = e + eBias\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n e = 0\n }\n }\n\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n e = (e << mLen) | m\n eLen += mLen\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128\n}\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView');\n\nmodule.exports = DataView;\n","var hashClear = require('./_hashClear'),\n hashDelete = require('./_hashDelete'),\n hashGet = require('./_hashGet'),\n hashHas = require('./_hashHas'),\n hashSet = require('./_hashSet');\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\nmodule.exports = Hash;\n","var listCacheClear = require('./_listCacheClear'),\n listCacheDelete = require('./_listCacheDelete'),\n listCacheGet = require('./_listCacheGet'),\n listCacheHas = require('./_listCacheHas'),\n listCacheSet = require('./_listCacheSet');\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\nmodule.exports = ListCache;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map');\n\nmodule.exports = Map;\n","var mapCacheClear = require('./_mapCacheClear'),\n mapCacheDelete = require('./_mapCacheDelete'),\n mapCacheGet = require('./_mapCacheGet'),\n mapCacheHas = require('./_mapCacheHas'),\n mapCacheSet = require('./_mapCacheSet');\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\nmodule.exports = MapCache;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Promise = getNative(root, 'Promise');\n\nmodule.exports = Promise;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Set = getNative(root, 'Set');\n\nmodule.exports = Set;\n","var MapCache = require('./_MapCache'),\n setCacheAdd = require('./_setCacheAdd'),\n setCacheHas = require('./_setCacheHas');\n\n/**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\nfunction SetCache(values) {\n var index = -1,\n length = values == null ? 0 : values.length;\n\n this.__data__ = new MapCache;\n while (++index < length) {\n this.add(values[index]);\n }\n}\n\n// Add methods to `SetCache`.\nSetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\nSetCache.prototype.has = setCacheHas;\n\nmodule.exports = SetCache;\n","var ListCache = require('./_ListCache'),\n stackClear = require('./_stackClear'),\n stackDelete = require('./_stackDelete'),\n stackGet = require('./_stackGet'),\n stackHas = require('./_stackHas'),\n stackSet = require('./_stackSet');\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\nmodule.exports = Stack;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Uint8Array = root.Uint8Array;\n\nmodule.exports = Uint8Array;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar WeakMap = getNative(root, 'WeakMap');\n\nmodule.exports = WeakMap;\n","/**\n * A specialized version of `_.forEach` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\nfunction arrayEach(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (iteratee(array[index], index, array) === false) {\n break;\n }\n }\n return array;\n}\n\nmodule.exports = arrayEach;\n","/**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\nfunction arrayFilter(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result[resIndex++] = value;\n }\n }\n return result;\n}\n\nmodule.exports = arrayFilter;\n","var baseTimes = require('./_baseTimes'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isIndex = require('./_isIndex'),\n isTypedArray = require('./isTypedArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = arrayLikeKeys;\n","/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n}\n\nmodule.exports = arrayPush;\n","/**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\nfunction arraySome(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (predicate(array[index], index, array)) {\n return true;\n }\n }\n return false;\n}\n\nmodule.exports = arraySome;\n","var baseAssignValue = require('./_baseAssignValue'),\n eq = require('./eq');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\nmodule.exports = assignValue;\n","var eq = require('./eq');\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\nmodule.exports = assocIndexOf;\n","var copyObject = require('./_copyObject'),\n keys = require('./keys');\n\n/**\n * The base implementation of `_.assign` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssign(object, source) {\n return object && copyObject(source, keys(source), object);\n}\n\nmodule.exports = baseAssign;\n","var copyObject = require('./_copyObject'),\n keysIn = require('./keysIn');\n\n/**\n * The base implementation of `_.assignIn` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssignIn(object, source) {\n return object && copyObject(source, keysIn(source), object);\n}\n\nmodule.exports = baseAssignIn;\n","var defineProperty = require('./_defineProperty');\n\n/**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction baseAssignValue(object, key, value) {\n if (key == '__proto__' && defineProperty) {\n defineProperty(object, key, {\n 'configurable': true,\n 'enumerable': true,\n 'value': value,\n 'writable': true\n });\n } else {\n object[key] = value;\n }\n}\n\nmodule.exports = baseAssignValue;\n","var Stack = require('./_Stack'),\n arrayEach = require('./_arrayEach'),\n assignValue = require('./_assignValue'),\n baseAssign = require('./_baseAssign'),\n baseAssignIn = require('./_baseAssignIn'),\n cloneBuffer = require('./_cloneBuffer'),\n copyArray = require('./_copyArray'),\n copySymbols = require('./_copySymbols'),\n copySymbolsIn = require('./_copySymbolsIn'),\n getAllKeys = require('./_getAllKeys'),\n getAllKeysIn = require('./_getAllKeysIn'),\n getTag = require('./_getTag'),\n initCloneArray = require('./_initCloneArray'),\n initCloneByTag = require('./_initCloneByTag'),\n initCloneObject = require('./_initCloneObject'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isMap = require('./isMap'),\n isObject = require('./isObject'),\n isSet = require('./isSet'),\n keys = require('./keys'),\n keysIn = require('./keysIn');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_FLAT_FLAG = 2,\n CLONE_SYMBOLS_FLAG = 4;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values supported by `_.clone`. */\nvar cloneableTags = {};\ncloneableTags[argsTag] = cloneableTags[arrayTag] =\ncloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =\ncloneableTags[boolTag] = cloneableTags[dateTag] =\ncloneableTags[float32Tag] = cloneableTags[float64Tag] =\ncloneableTags[int8Tag] = cloneableTags[int16Tag] =\ncloneableTags[int32Tag] = cloneableTags[mapTag] =\ncloneableTags[numberTag] = cloneableTags[objectTag] =\ncloneableTags[regexpTag] = cloneableTags[setTag] =\ncloneableTags[stringTag] = cloneableTags[symbolTag] =\ncloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =\ncloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;\ncloneableTags[errorTag] = cloneableTags[funcTag] =\ncloneableTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.clone` and `_.cloneDeep` which tracks\n * traversed objects.\n *\n * @private\n * @param {*} value The value to clone.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Deep clone\n * 2 - Flatten inherited properties\n * 4 - Clone symbols\n * @param {Function} [customizer] The function to customize cloning.\n * @param {string} [key] The key of `value`.\n * @param {Object} [object] The parent object of `value`.\n * @param {Object} [stack] Tracks traversed objects and their clone counterparts.\n * @returns {*} Returns the cloned value.\n */\nfunction baseClone(value, bitmask, customizer, key, object, stack) {\n var result,\n isDeep = bitmask & CLONE_DEEP_FLAG,\n isFlat = bitmask & CLONE_FLAT_FLAG,\n isFull = bitmask & CLONE_SYMBOLS_FLAG;\n\n if (customizer) {\n result = object ? customizer(value, key, object, stack) : customizer(value);\n }\n if (result !== undefined) {\n return result;\n }\n if (!isObject(value)) {\n return value;\n }\n var isArr = isArray(value);\n if (isArr) {\n result = initCloneArray(value);\n if (!isDeep) {\n return copyArray(value, result);\n }\n } else {\n var tag = getTag(value),\n isFunc = tag == funcTag || tag == genTag;\n\n if (isBuffer(value)) {\n return cloneBuffer(value, isDeep);\n }\n if (tag == objectTag || tag == argsTag || (isFunc && !object)) {\n result = (isFlat || isFunc) ? {} : initCloneObject(value);\n if (!isDeep) {\n return isFlat\n ? copySymbolsIn(value, baseAssignIn(result, value))\n : copySymbols(value, baseAssign(result, value));\n }\n } else {\n if (!cloneableTags[tag]) {\n return object ? value : {};\n }\n result = initCloneByTag(value, tag, isDeep);\n }\n }\n // Check for circular references and return its corresponding clone.\n stack || (stack = new Stack);\n var stacked = stack.get(value);\n if (stacked) {\n return stacked;\n }\n stack.set(value, result);\n\n if (isSet(value)) {\n value.forEach(function(subValue) {\n result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));\n });\n } else if (isMap(value)) {\n value.forEach(function(subValue, key) {\n result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n }\n\n var keysFunc = isFull\n ? (isFlat ? getAllKeysIn : getAllKeys)\n : (isFlat ? keysIn : keys);\n\n var props = isArr ? undefined : keysFunc(value);\n arrayEach(props || value, function(subValue, key) {\n if (props) {\n key = subValue;\n subValue = value[key];\n }\n // Recursively populate clone (susceptible to call stack limits).\n assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n return result;\n}\n\nmodule.exports = baseClone;\n","var isObject = require('./isObject');\n\n/** Built-in value references. */\nvar objectCreate = Object.create;\n\n/**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} proto The object to inherit from.\n * @returns {Object} Returns the new object.\n */\nvar baseCreate = (function() {\n function object() {}\n return function(proto) {\n if (!isObject(proto)) {\n return {};\n }\n if (objectCreate) {\n return objectCreate(proto);\n }\n object.prototype = proto;\n var result = new object;\n object.prototype = undefined;\n return result;\n };\n}());\n\nmodule.exports = baseCreate;\n","var arrayPush = require('./_arrayPush'),\n isArray = require('./isArray');\n\n/**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction baseGetAllKeys(object, keysFunc, symbolsFunc) {\n var result = keysFunc(object);\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n}\n\nmodule.exports = baseGetAllKeys;\n","var Symbol = require('./_Symbol'),\n getRawTag = require('./_getRawTag'),\n objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]';\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\nmodule.exports = baseIsArguments;\n","var baseIsEqualDeep = require('./_baseIsEqualDeep'),\n isObjectLike = require('./isObjectLike');\n\n/**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Unordered comparison\n * 2 - Partial comparison\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\nfunction baseIsEqual(value, other, bitmask, customizer, stack) {\n if (value === other) {\n return true;\n }\n if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\n return value !== value && other !== other;\n }\n return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n}\n\nmodule.exports = baseIsEqual;\n","var Stack = require('./_Stack'),\n equalArrays = require('./_equalArrays'),\n equalByTag = require('./_equalByTag'),\n equalObjects = require('./_equalObjects'),\n getTag = require('./_getTag'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isTypedArray = require('./isTypedArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n var objIsArr = isArray(object),\n othIsArr = isArray(other),\n objTag = objIsArr ? arrayTag : getTag(object),\n othTag = othIsArr ? arrayTag : getTag(other);\n\n objTag = objTag == argsTag ? objectTag : objTag;\n othTag = othTag == argsTag ? objectTag : othTag;\n\n var objIsObj = objTag == objectTag,\n othIsObj = othTag == objectTag,\n isSameTag = objTag == othTag;\n\n if (isSameTag && isBuffer(object)) {\n if (!isBuffer(other)) {\n return false;\n }\n objIsArr = true;\n objIsObj = false;\n }\n if (isSameTag && !objIsObj) {\n stack || (stack = new Stack);\n return (objIsArr || isTypedArray(object))\n ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n }\n if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n if (objIsWrapped || othIsWrapped) {\n var objUnwrapped = objIsWrapped ? object.value() : object,\n othUnwrapped = othIsWrapped ? other.value() : other;\n\n stack || (stack = new Stack);\n return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n }\n }\n if (!isSameTag) {\n return false;\n }\n stack || (stack = new Stack);\n return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n}\n\nmodule.exports = baseIsEqualDeep;\n","var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]';\n\n/**\n * The base implementation of `_.isMap` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n */\nfunction baseIsMap(value) {\n return isObjectLike(value) && getTag(value) == mapTag;\n}\n\nmodule.exports = baseIsMap;\n","var isFunction = require('./isFunction'),\n isMasked = require('./_isMasked'),\n isObject = require('./isObject'),\n toSource = require('./_toSource');\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\nmodule.exports = baseIsNative;\n","var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar setTag = '[object Set]';\n\n/**\n * The base implementation of `_.isSet` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n */\nfunction baseIsSet(value) {\n return isObjectLike(value) && getTag(value) == setTag;\n}\n\nmodule.exports = baseIsSet;\n","var baseGetTag = require('./_baseGetTag'),\n isLength = require('./isLength'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n\nmodule.exports = baseIsTypedArray;\n","var isPrototype = require('./_isPrototype'),\n nativeKeys = require('./_nativeKeys');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeys;\n","var isObject = require('./isObject'),\n isPrototype = require('./_isPrototype'),\n nativeKeysIn = require('./_nativeKeysIn');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeysIn(object) {\n if (!isObject(object)) {\n return nativeKeysIn(object);\n }\n var isProto = isPrototype(object),\n result = [];\n\n for (var key in object) {\n if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeysIn;\n","/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\nmodule.exports = baseTimes;\n","/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n return function(value) {\n return func(value);\n };\n}\n\nmodule.exports = baseUnary;\n","/**\n * Checks if a `cache` value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction cacheHas(cache, key) {\n return cache.has(key);\n}\n\nmodule.exports = cacheHas;\n","var Uint8Array = require('./_Uint8Array');\n\n/**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\nfunction cloneArrayBuffer(arrayBuffer) {\n var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n return result;\n}\n\nmodule.exports = cloneArrayBuffer;\n","var root = require('./_root');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined,\n allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;\n\n/**\n * Creates a clone of `buffer`.\n *\n * @private\n * @param {Buffer} buffer The buffer to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Buffer} Returns the cloned buffer.\n */\nfunction cloneBuffer(buffer, isDeep) {\n if (isDeep) {\n return buffer.slice();\n }\n var length = buffer.length,\n result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\n\n buffer.copy(result);\n return result;\n}\n\nmodule.exports = cloneBuffer;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer');\n\n/**\n * Creates a clone of `dataView`.\n *\n * @private\n * @param {Object} dataView The data view to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned data view.\n */\nfunction cloneDataView(dataView, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;\n return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);\n}\n\nmodule.exports = cloneDataView;\n","/** Used to match `RegExp` flags from their coerced string values. */\nvar reFlags = /\\w*$/;\n\n/**\n * Creates a clone of `regexp`.\n *\n * @private\n * @param {Object} regexp The regexp to clone.\n * @returns {Object} Returns the cloned regexp.\n */\nfunction cloneRegExp(regexp) {\n var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));\n result.lastIndex = regexp.lastIndex;\n return result;\n}\n\nmodule.exports = cloneRegExp;\n","var Symbol = require('./_Symbol');\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * Creates a clone of the `symbol` object.\n *\n * @private\n * @param {Object} symbol The symbol object to clone.\n * @returns {Object} Returns the cloned symbol object.\n */\nfunction cloneSymbol(symbol) {\n return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};\n}\n\nmodule.exports = cloneSymbol;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer');\n\n/**\n * Creates a clone of `typedArray`.\n *\n * @private\n * @param {Object} typedArray The typed array to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned typed array.\n */\nfunction cloneTypedArray(typedArray, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n}\n\nmodule.exports = cloneTypedArray;\n","/**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\nfunction copyArray(source, array) {\n var index = -1,\n length = source.length;\n\n array || (array = Array(length));\n while (++index < length) {\n array[index] = source[index];\n }\n return array;\n}\n\nmodule.exports = copyArray;\n","var assignValue = require('./_assignValue'),\n baseAssignValue = require('./_baseAssignValue');\n\n/**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\nfunction copyObject(source, props, object, customizer) {\n var isNew = !object;\n object || (object = {});\n\n var index = -1,\n length = props.length;\n\n while (++index < length) {\n var key = props[index];\n\n var newValue = customizer\n ? customizer(object[key], source[key], key, object, source)\n : undefined;\n\n if (newValue === undefined) {\n newValue = source[key];\n }\n if (isNew) {\n baseAssignValue(object, key, newValue);\n } else {\n assignValue(object, key, newValue);\n }\n }\n return object;\n}\n\nmodule.exports = copyObject;\n","var copyObject = require('./_copyObject'),\n getSymbols = require('./_getSymbols');\n\n/**\n * Copies own symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbols(source, object) {\n return copyObject(source, getSymbols(source), object);\n}\n\nmodule.exports = copySymbols;\n","var copyObject = require('./_copyObject'),\n getSymbolsIn = require('./_getSymbolsIn');\n\n/**\n * Copies own and inherited symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbolsIn(source, object) {\n return copyObject(source, getSymbolsIn(source), object);\n}\n\nmodule.exports = copySymbolsIn;\n","var root = require('./_root');\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\nmodule.exports = coreJsData;\n","var getNative = require('./_getNative');\n\nvar defineProperty = (function() {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n}());\n\nmodule.exports = defineProperty;\n","var SetCache = require('./_SetCache'),\n arraySome = require('./_arraySome'),\n cacheHas = require('./_cacheHas');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\nfunction equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n arrLength = array.length,\n othLength = other.length;\n\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n return false;\n }\n // Check that cyclic values are equal.\n var arrStacked = stack.get(array);\n var othStacked = stack.get(other);\n if (arrStacked && othStacked) {\n return arrStacked == other && othStacked == array;\n }\n var index = -1,\n result = true,\n seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n stack.set(array, other);\n stack.set(other, array);\n\n // Ignore non-index properties.\n while (++index < arrLength) {\n var arrValue = array[index],\n othValue = other[index];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, arrValue, index, other, array, stack)\n : customizer(arrValue, othValue, index, array, other, stack);\n }\n if (compared !== undefined) {\n if (compared) {\n continue;\n }\n result = false;\n break;\n }\n // Recursively compare arrays (susceptible to call stack limits).\n if (seen) {\n if (!arraySome(other, function(othValue, othIndex) {\n if (!cacheHas(seen, othIndex) &&\n (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n return seen.push(othIndex);\n }\n })) {\n result = false;\n break;\n }\n } else if (!(\n arrValue === othValue ||\n equalFunc(arrValue, othValue, bitmask, customizer, stack)\n )) {\n result = false;\n break;\n }\n }\n stack['delete'](array);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalArrays;\n","var Symbol = require('./_Symbol'),\n Uint8Array = require('./_Uint8Array'),\n eq = require('./eq'),\n equalArrays = require('./_equalArrays'),\n mapToArray = require('./_mapToArray'),\n setToArray = require('./_setToArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]';\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n switch (tag) {\n case dataViewTag:\n if ((object.byteLength != other.byteLength) ||\n (object.byteOffset != other.byteOffset)) {\n return false;\n }\n object = object.buffer;\n other = other.buffer;\n\n case arrayBufferTag:\n if ((object.byteLength != other.byteLength) ||\n !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n return false;\n }\n return true;\n\n case boolTag:\n case dateTag:\n case numberTag:\n // Coerce booleans to `1` or `0` and dates to milliseconds.\n // Invalid dates are coerced to `NaN`.\n return eq(+object, +other);\n\n case errorTag:\n return object.name == other.name && object.message == other.message;\n\n case regexpTag:\n case stringTag:\n // Coerce regexes to strings and treat strings, primitives and objects,\n // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n // for more details.\n return object == (other + '');\n\n case mapTag:\n var convert = mapToArray;\n\n case setTag:\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n convert || (convert = setToArray);\n\n if (object.size != other.size && !isPartial) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked) {\n return stacked == other;\n }\n bitmask |= COMPARE_UNORDERED_FLAG;\n\n // Recursively compare objects (susceptible to call stack limits).\n stack.set(object, other);\n var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n stack['delete'](object);\n return result;\n\n case symbolTag:\n if (symbolValueOf) {\n return symbolValueOf.call(object) == symbolValueOf.call(other);\n }\n }\n return false;\n}\n\nmodule.exports = equalByTag;\n","var getAllKeys = require('./_getAllKeys');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n objProps = getAllKeys(object),\n objLength = objProps.length,\n othProps = getAllKeys(other),\n othLength = othProps.length;\n\n if (objLength != othLength && !isPartial) {\n return false;\n }\n var index = objLength;\n while (index--) {\n var key = objProps[index];\n if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n return false;\n }\n }\n // Check that cyclic values are equal.\n var objStacked = stack.get(object);\n var othStacked = stack.get(other);\n if (objStacked && othStacked) {\n return objStacked == other && othStacked == object;\n }\n var result = true;\n stack.set(object, other);\n stack.set(other, object);\n\n var skipCtor = isPartial;\n while (++index < objLength) {\n key = objProps[index];\n var objValue = object[key],\n othValue = other[key];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, objValue, key, other, object, stack)\n : customizer(objValue, othValue, key, object, other, stack);\n }\n // Recursively compare objects (susceptible to call stack limits).\n if (!(compared === undefined\n ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n : compared\n )) {\n result = false;\n break;\n }\n skipCtor || (skipCtor = key == 'constructor');\n }\n if (result && !skipCtor) {\n var objCtor = object.constructor,\n othCtor = other.constructor;\n\n // Non `Object` object instances with different constructors are not equal.\n if (objCtor != othCtor &&\n ('constructor' in object && 'constructor' in other) &&\n !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n result = false;\n }\n }\n stack['delete'](object);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalObjects;\n","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n","var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbols = require('./_getSymbols'),\n keys = require('./keys');\n\n/**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeys(object) {\n return baseGetAllKeys(object, keys, getSymbols);\n}\n\nmodule.exports = getAllKeys;\n","var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbolsIn = require('./_getSymbolsIn'),\n keysIn = require('./keysIn');\n\n/**\n * Creates an array of own and inherited enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeysIn(object) {\n return baseGetAllKeys(object, keysIn, getSymbolsIn);\n}\n\nmodule.exports = getAllKeysIn;\n","var isKeyable = require('./_isKeyable');\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\nmodule.exports = getMapData;\n","var baseIsNative = require('./_baseIsNative'),\n getValue = require('./_getValue');\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\nmodule.exports = getNative;\n","var overArg = require('./_overArg');\n\n/** Built-in value references. */\nvar getPrototype = overArg(Object.getPrototypeOf, Object);\n\nmodule.exports = getPrototype;\n","var Symbol = require('./_Symbol');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nmodule.exports = getRawTag;\n","var arrayFilter = require('./_arrayFilter'),\n stubArray = require('./stubArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n if (object == null) {\n return [];\n }\n object = Object(object);\n return arrayFilter(nativeGetSymbols(object), function(symbol) {\n return propertyIsEnumerable.call(object, symbol);\n });\n};\n\nmodule.exports = getSymbols;\n","var arrayPush = require('./_arrayPush'),\n getPrototype = require('./_getPrototype'),\n getSymbols = require('./_getSymbols'),\n stubArray = require('./stubArray');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own and inherited enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {\n var result = [];\n while (object) {\n arrayPush(result, getSymbols(object));\n object = getPrototype(object);\n }\n return result;\n};\n\nmodule.exports = getSymbolsIn;\n","var DataView = require('./_DataView'),\n Map = require('./_Map'),\n Promise = require('./_Promise'),\n Set = require('./_Set'),\n WeakMap = require('./_WeakMap'),\n baseGetTag = require('./_baseGetTag'),\n toSource = require('./_toSource');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n setTag = '[object Set]',\n weakMapTag = '[object WeakMap]';\n\nvar dataViewTag = '[object DataView]';\n\n/** Used to detect maps, sets, and weakmaps. */\nvar dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nvar getTag = baseGetTag;\n\n// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\nif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = baseGetTag(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : '';\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n}\n\nmodule.exports = getTag;\n","/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\nmodule.exports = getValue;\n","var nativeCreate = require('./_nativeCreate');\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n}\n\nmodule.exports = hashClear;\n","/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = hashDelete;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\nmodule.exports = hashGet;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\nmodule.exports = hashHas;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\nmodule.exports = hashSet;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Initializes an array clone.\n *\n * @private\n * @param {Array} array The array to clone.\n * @returns {Array} Returns the initialized clone.\n */\nfunction initCloneArray(array) {\n var length = array.length,\n result = new array.constructor(length);\n\n // Add properties assigned by `RegExp#exec`.\n if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {\n result.index = array.index;\n result.input = array.input;\n }\n return result;\n}\n\nmodule.exports = initCloneArray;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer'),\n cloneDataView = require('./_cloneDataView'),\n cloneRegExp = require('./_cloneRegExp'),\n cloneSymbol = require('./_cloneSymbol'),\n cloneTypedArray = require('./_cloneTypedArray');\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/**\n * Initializes an object clone based on its `toStringTag`.\n *\n * **Note:** This function only supports cloning values with tags of\n * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.\n *\n * @private\n * @param {Object} object The object to clone.\n * @param {string} tag The `toStringTag` of the object to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneByTag(object, tag, isDeep) {\n var Ctor = object.constructor;\n switch (tag) {\n case arrayBufferTag:\n return cloneArrayBuffer(object);\n\n case boolTag:\n case dateTag:\n return new Ctor(+object);\n\n case dataViewTag:\n return cloneDataView(object, isDeep);\n\n case float32Tag: case float64Tag:\n case int8Tag: case int16Tag: case int32Tag:\n case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:\n return cloneTypedArray(object, isDeep);\n\n case mapTag:\n return new Ctor;\n\n case numberTag:\n case stringTag:\n return new Ctor(object);\n\n case regexpTag:\n return cloneRegExp(object);\n\n case setTag:\n return new Ctor;\n\n case symbolTag:\n return cloneSymbol(object);\n }\n}\n\nmodule.exports = initCloneByTag;\n","var baseCreate = require('./_baseCreate'),\n getPrototype = require('./_getPrototype'),\n isPrototype = require('./_isPrototype');\n\n/**\n * Initializes an object clone.\n *\n * @private\n * @param {Object} object The object to clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneObject(object) {\n return (typeof object.constructor == 'function' && !isPrototype(object))\n ? baseCreate(getPrototype(object))\n : {};\n}\n\nmodule.exports = initCloneObject;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n var type = typeof value;\n length = length == null ? MAX_SAFE_INTEGER : length;\n\n return !!length &&\n (type == 'number' ||\n (type != 'symbol' && reIsUint.test(value))) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\nmodule.exports = isIndex;\n","/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\nmodule.exports = isKeyable;\n","var coreJsData = require('./_coreJsData');\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\nmodule.exports = isMasked;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\nmodule.exports = isPrototype;\n","/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n}\n\nmodule.exports = listCacheClear;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype;\n\n/** Built-in value references. */\nvar splice = arrayProto.splice;\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n}\n\nmodule.exports = listCacheDelete;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\nmodule.exports = listCacheGet;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\nmodule.exports = listCacheHas;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\nmodule.exports = listCacheSet;\n","var Hash = require('./_Hash'),\n ListCache = require('./_ListCache'),\n Map = require('./_Map');\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\nmodule.exports = mapCacheClear;\n","var getMapData = require('./_getMapData');\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = mapCacheDelete;\n","var getMapData = require('./_getMapData');\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\nmodule.exports = mapCacheGet;\n","var getMapData = require('./_getMapData');\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\nmodule.exports = mapCacheHas;\n","var getMapData = require('./_getMapData');\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n}\n\nmodule.exports = mapCacheSet;\n","/**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\nfunction mapToArray(map) {\n var index = -1,\n result = Array(map.size);\n\n map.forEach(function(value, key) {\n result[++index] = [key, value];\n });\n return result;\n}\n\nmodule.exports = mapToArray;\n","var getNative = require('./_getNative');\n\n/* Built-in method references that are verified to be native. */\nvar nativeCreate = getNative(Object, 'create');\n\nmodule.exports = nativeCreate;\n","var overArg = require('./_overArg');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeKeys = overArg(Object.keys, Object);\n\nmodule.exports = nativeKeys;\n","/**\n * This function is like\n * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * except that it includes inherited enumerable properties.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction nativeKeysIn(object) {\n var result = [];\n if (object != null) {\n for (var key in Object(object)) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = nativeKeysIn;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n try {\n // Use `util.types` for Node.js 10+.\n var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n if (types) {\n return types;\n }\n\n // Legacy `process.binding('util')` for Node.js < 10.\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n}());\n\nmodule.exports = nodeUtil;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n","/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\nmodule.exports = overArg;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n","/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\nfunction setCacheAdd(value) {\n this.__data__.set(value, HASH_UNDEFINED);\n return this;\n}\n\nmodule.exports = setCacheAdd;\n","/**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\nfunction setCacheHas(value) {\n return this.__data__.has(value);\n}\n\nmodule.exports = setCacheHas;\n","/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\nfunction setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n}\n\nmodule.exports = setToArray;\n","var ListCache = require('./_ListCache');\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}\n\nmodule.exports = stackClear;\n","/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n var data = this.__data__,\n result = data['delete'](key);\n\n this.size = data.size;\n return result;\n}\n\nmodule.exports = stackDelete;\n","/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n return this.__data__.get(key);\n}\n\nmodule.exports = stackGet;\n","/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n return this.__data__.has(key);\n}\n\nmodule.exports = stackHas;\n","var ListCache = require('./_ListCache'),\n Map = require('./_Map'),\n MapCache = require('./_MapCache');\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n var data = this.__data__;\n if (data instanceof ListCache) {\n var pairs = data.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n this.size = ++data.size;\n return this;\n }\n data = this.__data__ = new MapCache(pairs);\n }\n data.set(key, value);\n this.size = data.size;\n return this;\n}\n\nmodule.exports = stackSet;\n","/** Used for built-in method references. */\nvar funcProto = Function.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\nmodule.exports = toSource;\n","var baseClone = require('./_baseClone');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_SYMBOLS_FLAG = 4;\n\n/**\n * This method is like `_.clone` except that it recursively clones `value`.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Lang\n * @param {*} value The value to recursively clone.\n * @returns {*} Returns the deep cloned value.\n * @see _.clone\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var deep = _.cloneDeep(objects);\n * console.log(deep[0] === objects[0]);\n * // => false\n */\nfunction cloneDeep(value) {\n return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);\n}\n\nmodule.exports = cloneDeep;\n","/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\nmodule.exports = eq;\n","var baseIsArguments = require('./_baseIsArguments'),\n isObjectLike = require('./isObjectLike');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n};\n\nmodule.exports = isArguments;\n","/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\nmodule.exports = isArray;\n","var isFunction = require('./isFunction'),\n isLength = require('./isLength');\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\nmodule.exports = isArrayLike;\n","var root = require('./_root'),\n stubFalse = require('./stubFalse');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\nmodule.exports = isBuffer;\n","var baseIsEqual = require('./_baseIsEqual');\n\n/**\n * Performs a deep comparison between two values to determine if they are\n * equivalent.\n *\n * **Note:** This method supports comparing arrays, array buffers, booleans,\n * date objects, error objects, maps, numbers, `Object` objects, regexes,\n * sets, strings, symbols, and typed arrays. `Object` objects are compared\n * by their own, not inherited, enumerable properties. Functions and DOM\n * nodes are compared by strict equality, i.e. `===`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.isEqual(object, other);\n * // => true\n *\n * object === other;\n * // => false\n */\nfunction isEqual(value, other) {\n return baseIsEqual(value, other);\n}\n\nmodule.exports = isEqual;\n","var baseGetTag = require('./_baseGetTag'),\n isObject = require('./isObject');\n\n/** `Object#toString` result references. */\nvar asyncTag = '[object AsyncFunction]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n proxyTag = '[object Proxy]';\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\nmodule.exports = isFunction;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\nmodule.exports = isLength;\n","var baseIsMap = require('./_baseIsMap'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsMap = nodeUtil && nodeUtil.isMap;\n\n/**\n * Checks if `value` is classified as a `Map` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n * @example\n *\n * _.isMap(new Map);\n * // => true\n *\n * _.isMap(new WeakMap);\n * // => false\n */\nvar isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;\n\nmodule.exports = isMap;\n","/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n","var baseIsSet = require('./_baseIsSet'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsSet = nodeUtil && nodeUtil.isSet;\n\n/**\n * Checks if `value` is classified as a `Set` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n * @example\n *\n * _.isSet(new Set);\n * // => true\n *\n * _.isSet(new WeakSet);\n * // => false\n */\nvar isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;\n\nmodule.exports = isSet;\n","var baseIsTypedArray = require('./_baseIsTypedArray'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\nmodule.exports = isTypedArray;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeys = require('./_baseKeys'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\nmodule.exports = keys;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeysIn = require('./_baseKeysIn'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\nfunction keysIn(object) {\n return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n}\n\nmodule.exports = keysIn;\n","/**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\nfunction stubArray() {\n return [];\n}\n\nmodule.exports = stubArray;\n","/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n return false;\n}\n\nmodule.exports = stubFalse;\n","import type { Settings } from \"../shapes/setting-shapes\";\n\n/**\n * Fetches the settings for the application.\n * @returns The settings for the application.\n */\nexport async function getSettings(): Promise {\n\treturn {\n\t\tplatform: {\n\t\t\tsharedWorkerUrl: \"http://localhost:6060/js/shared-worker.bundle.js\",\n\t\t\tbrokerUrl: \"http://localhost:6060/platform/iframe-broker.html\",\n\t\t\tproviderId: \"web-interop-basic\",\n\t\t\tdefaultContextGroup: \"green\"\n\t\t}\n\t};\n}\n","export { default as v1 } from './v1.js';\nexport { default as v3 } from './v3.js';\nexport { default as v4 } from './v4.js';\nexport { default as v5 } from './v5.js';\nexport { default as NIL } from './nil.js';\nexport { default as version } from './version.js';\nexport { default as validate } from './validate.js';\nexport { default as stringify } from './stringify.js';\nexport { default as parse } from './parse.js';","/*\n * Browser-compatible JavaScript MD5\n *\n * Modification of JavaScript MD5\n * https://github.com/blueimp/JavaScript-MD5\n *\n * Copyright 2011, Sebastian Tschan\n * https://blueimp.net\n *\n * Licensed under the MIT license:\n * https://opensource.org/licenses/MIT\n *\n * Based on\n * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message\n * Digest Algorithm, as defined in RFC 1321.\n * Version 2.2 Copyright (C) Paul Johnston 1999 - 2009\n * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet\n * Distributed under the BSD License\n * See http://pajhome.org.uk/crypt/md5 for more info.\n */\nfunction md5(bytes) {\n if (typeof bytes === 'string') {\n var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape\n\n bytes = new Uint8Array(msg.length);\n\n for (var i = 0; i < msg.length; ++i) {\n bytes[i] = msg.charCodeAt(i);\n }\n }\n\n return md5ToHexEncodedArray(wordsToMd5(bytesToWords(bytes), bytes.length * 8));\n}\n/*\n * Convert an array of little-endian words to an array of bytes\n */\n\n\nfunction md5ToHexEncodedArray(input) {\n var output = [];\n var length32 = input.length * 32;\n var hexTab = '0123456789abcdef';\n\n for (var i = 0; i < length32; i += 8) {\n var x = input[i >> 5] >>> i % 32 & 0xff;\n var hex = parseInt(hexTab.charAt(x >>> 4 & 0x0f) + hexTab.charAt(x & 0x0f), 16);\n output.push(hex);\n }\n\n return output;\n}\n/**\n * Calculate output length with padding and bit length\n */\n\n\nfunction getOutputLength(inputLength8) {\n return (inputLength8 + 64 >>> 9 << 4) + 14 + 1;\n}\n/*\n * Calculate the MD5 of an array of little-endian words, and a bit length.\n */\n\n\nfunction wordsToMd5(x, len) {\n /* append padding */\n x[len >> 5] |= 0x80 << len % 32;\n x[getOutputLength(len) - 1] = len;\n var a = 1732584193;\n var b = -271733879;\n var c = -1732584194;\n var d = 271733878;\n\n for (var i = 0; i < x.length; i += 16) {\n var olda = a;\n var oldb = b;\n var oldc = c;\n var oldd = d;\n a = md5ff(a, b, c, d, x[i], 7, -680876936);\n d = md5ff(d, a, b, c, x[i + 1], 12, -389564586);\n c = md5ff(c, d, a, b, x[i + 2], 17, 606105819);\n b = md5ff(b, c, d, a, x[i + 3], 22, -1044525330);\n a = md5ff(a, b, c, d, x[i + 4], 7, -176418897);\n d = md5ff(d, a, b, c, x[i + 5], 12, 1200080426);\n c = md5ff(c, d, a, b, x[i + 6], 17, -1473231341);\n b = md5ff(b, c, d, a, x[i + 7], 22, -45705983);\n a = md5ff(a, b, c, d, x[i + 8], 7, 1770035416);\n d = md5ff(d, a, b, c, x[i + 9], 12, -1958414417);\n c = md5ff(c, d, a, b, x[i + 10], 17, -42063);\n b = md5ff(b, c, d, a, x[i + 11], 22, -1990404162);\n a = md5ff(a, b, c, d, x[i + 12], 7, 1804603682);\n d = md5ff(d, a, b, c, x[i + 13], 12, -40341101);\n c = md5ff(c, d, a, b, x[i + 14], 17, -1502002290);\n b = md5ff(b, c, d, a, x[i + 15], 22, 1236535329);\n a = md5gg(a, b, c, d, x[i + 1], 5, -165796510);\n d = md5gg(d, a, b, c, x[i + 6], 9, -1069501632);\n c = md5gg(c, d, a, b, x[i + 11], 14, 643717713);\n b = md5gg(b, c, d, a, x[i], 20, -373897302);\n a = md5gg(a, b, c, d, x[i + 5], 5, -701558691);\n d = md5gg(d, a, b, c, x[i + 10], 9, 38016083);\n c = md5gg(c, d, a, b, x[i + 15], 14, -660478335);\n b = md5gg(b, c, d, a, x[i + 4], 20, -405537848);\n a = md5gg(a, b, c, d, x[i + 9], 5, 568446438);\n d = md5gg(d, a, b, c, x[i + 14], 9, -1019803690);\n c = md5gg(c, d, a, b, x[i + 3], 14, -187363961);\n b = md5gg(b, c, d, a, x[i + 8], 20, 1163531501);\n a = md5gg(a, b, c, d, x[i + 13], 5, -1444681467);\n d = md5gg(d, a, b, c, x[i + 2], 9, -51403784);\n c = md5gg(c, d, a, b, x[i + 7], 14, 1735328473);\n b = md5gg(b, c, d, a, x[i + 12], 20, -1926607734);\n a = md5hh(a, b, c, d, x[i + 5], 4, -378558);\n d = md5hh(d, a, b, c, x[i + 8], 11, -2022574463);\n c = md5hh(c, d, a, b, x[i + 11], 16, 1839030562);\n b = md5hh(b, c, d, a, x[i + 14], 23, -35309556);\n a = md5hh(a, b, c, d, x[i + 1], 4, -1530992060);\n d = md5hh(d, a, b, c, x[i + 4], 11, 1272893353);\n c = md5hh(c, d, a, b, x[i + 7], 16, -155497632);\n b = md5hh(b, c, d, a, x[i + 10], 23, -1094730640);\n a = md5hh(a, b, c, d, x[i + 13], 4, 681279174);\n d = md5hh(d, a, b, c, x[i], 11, -358537222);\n c = md5hh(c, d, a, b, x[i + 3], 16, -722521979);\n b = md5hh(b, c, d, a, x[i + 6], 23, 76029189);\n a = md5hh(a, b, c, d, x[i + 9], 4, -640364487);\n d = md5hh(d, a, b, c, x[i + 12], 11, -421815835);\n c = md5hh(c, d, a, b, x[i + 15], 16, 530742520);\n b = md5hh(b, c, d, a, x[i + 2], 23, -995338651);\n a = md5ii(a, b, c, d, x[i], 6, -198630844);\n d = md5ii(d, a, b, c, x[i + 7], 10, 1126891415);\n c = md5ii(c, d, a, b, x[i + 14], 15, -1416354905);\n b = md5ii(b, c, d, a, x[i + 5], 21, -57434055);\n a = md5ii(a, b, c, d, x[i + 12], 6, 1700485571);\n d = md5ii(d, a, b, c, x[i + 3], 10, -1894986606);\n c = md5ii(c, d, a, b, x[i + 10], 15, -1051523);\n b = md5ii(b, c, d, a, x[i + 1], 21, -2054922799);\n a = md5ii(a, b, c, d, x[i + 8], 6, 1873313359);\n d = md5ii(d, a, b, c, x[i + 15], 10, -30611744);\n c = md5ii(c, d, a, b, x[i + 6], 15, -1560198380);\n b = md5ii(b, c, d, a, x[i + 13], 21, 1309151649);\n a = md5ii(a, b, c, d, x[i + 4], 6, -145523070);\n d = md5ii(d, a, b, c, x[i + 11], 10, -1120210379);\n c = md5ii(c, d, a, b, x[i + 2], 15, 718787259);\n b = md5ii(b, c, d, a, x[i + 9], 21, -343485551);\n a = safeAdd(a, olda);\n b = safeAdd(b, oldb);\n c = safeAdd(c, oldc);\n d = safeAdd(d, oldd);\n }\n\n return [a, b, c, d];\n}\n/*\n * Convert an array bytes to an array of little-endian words\n * Characters >255 have their high-byte silently ignored.\n */\n\n\nfunction bytesToWords(input) {\n if (input.length === 0) {\n return [];\n }\n\n var length8 = input.length * 8;\n var output = new Uint32Array(getOutputLength(length8));\n\n for (var i = 0; i < length8; i += 8) {\n output[i >> 5] |= (input[i / 8] & 0xff) << i % 32;\n }\n\n return output;\n}\n/*\n * Add integers, wrapping at 2^32. This uses 16-bit operations internally\n * to work around bugs in some JS interpreters.\n */\n\n\nfunction safeAdd(x, y) {\n var lsw = (x & 0xffff) + (y & 0xffff);\n var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n return msw << 16 | lsw & 0xffff;\n}\n/*\n * Bitwise rotate a 32-bit number to the left.\n */\n\n\nfunction bitRotateLeft(num, cnt) {\n return num << cnt | num >>> 32 - cnt;\n}\n/*\n * These functions implement the four basic operations the algorithm uses.\n */\n\n\nfunction md5cmn(q, a, b, x, s, t) {\n return safeAdd(bitRotateLeft(safeAdd(safeAdd(a, q), safeAdd(x, t)), s), b);\n}\n\nfunction md5ff(a, b, c, d, x, s, t) {\n return md5cmn(b & c | ~b & d, a, b, x, s, t);\n}\n\nfunction md5gg(a, b, c, d, x, s, t) {\n return md5cmn(b & d | c & ~d, a, b, x, s, t);\n}\n\nfunction md5hh(a, b, c, d, x, s, t) {\n return md5cmn(b ^ c ^ d, a, b, x, s, t);\n}\n\nfunction md5ii(a, b, c, d, x, s, t) {\n return md5cmn(c ^ (b | ~d), a, b, x, s, t);\n}\n\nexport default md5;","export default '00000000-0000-0000-0000-000000000000';","import validate from './validate.js';\n\nfunction parse(uuid) {\n if (!validate(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n var v;\n var arr = new Uint8Array(16); // Parse ########-....-....-....-............\n\n arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24;\n arr[1] = v >>> 16 & 0xff;\n arr[2] = v >>> 8 & 0xff;\n arr[3] = v & 0xff; // Parse ........-####-....-....-............\n\n arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8;\n arr[5] = v & 0xff; // Parse ........-....-####-....-............\n\n arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8;\n arr[7] = v & 0xff; // Parse ........-....-....-####-............\n\n arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8;\n arr[9] = v & 0xff; // Parse ........-....-....-....-############\n // (Use \"/\" to avoid 32-bit truncation when bit-shifting high-order bytes)\n\n arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff;\n arr[11] = v / 0x100000000 & 0xff;\n arr[12] = v >>> 24 & 0xff;\n arr[13] = v >>> 16 & 0xff;\n arr[14] = v >>> 8 & 0xff;\n arr[15] = v & 0xff;\n return arr;\n}\n\nexport default parse;","export default /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;","// Unique ID creation requires a high quality random # generator. In the browser we therefore\n// require the crypto API and do not support built-in fallback to lower quality random number\n// generators (like Math.random()).\nvar getRandomValues;\nvar rnds8 = new Uint8Array(16);\nexport default function rng() {\n // lazy load so that environments that need to polyfill have a chance to do so\n if (!getRandomValues) {\n // getRandomValues needs to be invoked in a context where \"this\" is a Crypto implementation. Also,\n // find the complete implementation of crypto (msCrypto) on IE11.\n getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto !== 'undefined' && typeof msCrypto.getRandomValues === 'function' && msCrypto.getRandomValues.bind(msCrypto);\n\n if (!getRandomValues) {\n throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');\n }\n }\n\n return getRandomValues(rnds8);\n}","// Adapted from Chris Veness' SHA1 code at\n// http://www.movable-type.co.uk/scripts/sha1.html\nfunction f(s, x, y, z) {\n switch (s) {\n case 0:\n return x & y ^ ~x & z;\n\n case 1:\n return x ^ y ^ z;\n\n case 2:\n return x & y ^ x & z ^ y & z;\n\n case 3:\n return x ^ y ^ z;\n }\n}\n\nfunction ROTL(x, n) {\n return x << n | x >>> 32 - n;\n}\n\nfunction sha1(bytes) {\n var K = [0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xca62c1d6];\n var H = [0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0];\n\n if (typeof bytes === 'string') {\n var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape\n\n bytes = [];\n\n for (var i = 0; i < msg.length; ++i) {\n bytes.push(msg.charCodeAt(i));\n }\n } else if (!Array.isArray(bytes)) {\n // Convert Array-like to Array\n bytes = Array.prototype.slice.call(bytes);\n }\n\n bytes.push(0x80);\n var l = bytes.length / 4 + 2;\n var N = Math.ceil(l / 16);\n var M = new Array(N);\n\n for (var _i = 0; _i < N; ++_i) {\n var arr = new Uint32Array(16);\n\n for (var j = 0; j < 16; ++j) {\n arr[j] = bytes[_i * 64 + j * 4] << 24 | bytes[_i * 64 + j * 4 + 1] << 16 | bytes[_i * 64 + j * 4 + 2] << 8 | bytes[_i * 64 + j * 4 + 3];\n }\n\n M[_i] = arr;\n }\n\n M[N - 1][14] = (bytes.length - 1) * 8 / Math.pow(2, 32);\n M[N - 1][14] = Math.floor(M[N - 1][14]);\n M[N - 1][15] = (bytes.length - 1) * 8 & 0xffffffff;\n\n for (var _i2 = 0; _i2 < N; ++_i2) {\n var W = new Uint32Array(80);\n\n for (var t = 0; t < 16; ++t) {\n W[t] = M[_i2][t];\n }\n\n for (var _t = 16; _t < 80; ++_t) {\n W[_t] = ROTL(W[_t - 3] ^ W[_t - 8] ^ W[_t - 14] ^ W[_t - 16], 1);\n }\n\n var a = H[0];\n var b = H[1];\n var c = H[2];\n var d = H[3];\n var e = H[4];\n\n for (var _t2 = 0; _t2 < 80; ++_t2) {\n var s = Math.floor(_t2 / 20);\n var T = ROTL(a, 5) + f(s, b, c, d) + e + K[s] + W[_t2] >>> 0;\n e = d;\n d = c;\n c = ROTL(b, 30) >>> 0;\n b = a;\n a = T;\n }\n\n H[0] = H[0] + a >>> 0;\n H[1] = H[1] + b >>> 0;\n H[2] = H[2] + c >>> 0;\n H[3] = H[3] + d >>> 0;\n H[4] = H[4] + e >>> 0;\n }\n\n return [H[0] >> 24 & 0xff, H[0] >> 16 & 0xff, H[0] >> 8 & 0xff, H[0] & 0xff, H[1] >> 24 & 0xff, H[1] >> 16 & 0xff, H[1] >> 8 & 0xff, H[1] & 0xff, H[2] >> 24 & 0xff, H[2] >> 16 & 0xff, H[2] >> 8 & 0xff, H[2] & 0xff, H[3] >> 24 & 0xff, H[3] >> 16 & 0xff, H[3] >> 8 & 0xff, H[3] & 0xff, H[4] >> 24 & 0xff, H[4] >> 16 & 0xff, H[4] >> 8 & 0xff, H[4] & 0xff];\n}\n\nexport default sha1;","import validate from './validate.js';\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\n\nvar byteToHex = [];\n\nfor (var i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).substr(1));\n}\n\nfunction stringify(arr) {\n var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n var uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!validate(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n\n return uuid;\n}\n\nexport default stringify;","import rng from './rng.js';\nimport stringify from './stringify.js'; // **`v1()` - Generate time-based UUID**\n//\n// Inspired by https://github.com/LiosK/UUID.js\n// and http://docs.python.org/library/uuid.html\n\nvar _nodeId;\n\nvar _clockseq; // Previous uuid creation time\n\n\nvar _lastMSecs = 0;\nvar _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details\n\nfunction v1(options, buf, offset) {\n var i = buf && offset || 0;\n var b = buf || new Array(16);\n options = options || {};\n var node = options.node || _nodeId;\n var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not\n // specified. We do this lazily to minimize issues related to insufficient\n // system entropy. See #189\n\n if (node == null || clockseq == null) {\n var seedBytes = options.random || (options.rng || rng)();\n\n if (node == null) {\n // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)\n node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]];\n }\n\n if (clockseq == null) {\n // Per 4.2.2, randomize (14 bit) clockseq\n clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;\n }\n } // UUID timestamps are 100 nano-second units since the Gregorian epoch,\n // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so\n // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'\n // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.\n\n\n var msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock\n // cycle to simulate higher resolution clock\n\n var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs)\n\n var dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression\n\n if (dt < 0 && options.clockseq === undefined) {\n clockseq = clockseq + 1 & 0x3fff;\n } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new\n // time interval\n\n\n if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {\n nsecs = 0;\n } // Per 4.2.1.2 Throw error if too many uuids are requested\n\n\n if (nsecs >= 10000) {\n throw new Error(\"uuid.v1(): Can't create more than 10M uuids/sec\");\n }\n\n _lastMSecs = msecs;\n _lastNSecs = nsecs;\n _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch\n\n msecs += 12219292800000; // `time_low`\n\n var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;\n b[i++] = tl >>> 24 & 0xff;\n b[i++] = tl >>> 16 & 0xff;\n b[i++] = tl >>> 8 & 0xff;\n b[i++] = tl & 0xff; // `time_mid`\n\n var tmh = msecs / 0x100000000 * 10000 & 0xfffffff;\n b[i++] = tmh >>> 8 & 0xff;\n b[i++] = tmh & 0xff; // `time_high_and_version`\n\n b[i++] = tmh >>> 24 & 0xf | 0x10; // include version\n\n b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)\n\n b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low`\n\n b[i++] = clockseq & 0xff; // `node`\n\n for (var n = 0; n < 6; ++n) {\n b[i + n] = node[n];\n }\n\n return buf || stringify(b);\n}\n\nexport default v1;","import v35 from './v35.js';\nimport md5 from './md5.js';\nvar v3 = v35('v3', 0x30, md5);\nexport default v3;","import stringify from './stringify.js';\nimport parse from './parse.js';\n\nfunction stringToBytes(str) {\n str = unescape(encodeURIComponent(str)); // UTF8 escape\n\n var bytes = [];\n\n for (var i = 0; i < str.length; ++i) {\n bytes.push(str.charCodeAt(i));\n }\n\n return bytes;\n}\n\nexport var DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8';\nexport var URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8';\nexport default function (name, version, hashfunc) {\n function generateUUID(value, namespace, buf, offset) {\n if (typeof value === 'string') {\n value = stringToBytes(value);\n }\n\n if (typeof namespace === 'string') {\n namespace = parse(namespace);\n }\n\n if (namespace.length !== 16) {\n throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)');\n } // Compute hash of namespace and value, Per 4.3\n // Future: Use spread syntax when supported on all platforms, e.g. `bytes =\n // hashfunc([...namespace, ... value])`\n\n\n var bytes = new Uint8Array(16 + value.length);\n bytes.set(namespace);\n bytes.set(value, namespace.length);\n bytes = hashfunc(bytes);\n bytes[6] = bytes[6] & 0x0f | version;\n bytes[8] = bytes[8] & 0x3f | 0x80;\n\n if (buf) {\n offset = offset || 0;\n\n for (var i = 0; i < 16; ++i) {\n buf[offset + i] = bytes[i];\n }\n\n return buf;\n }\n\n return stringify(bytes);\n } // Function#name is not settable on some platforms (#270)\n\n\n try {\n generateUUID.name = name; // eslint-disable-next-line no-empty\n } catch (err) {} // For CommonJS default export support\n\n\n generateUUID.DNS = DNS;\n generateUUID.URL = URL;\n return generateUUID;\n}","import rng from './rng.js';\nimport stringify from './stringify.js';\n\nfunction v4(options, buf, offset) {\n options = options || {};\n var rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n offset = offset || 0;\n\n for (var i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n\n return buf;\n }\n\n return stringify(rnds);\n}\n\nexport default v4;","import v35 from './v35.js';\nimport sha1 from './sha1.js';\nvar v5 = v35('v5', 0x50, sha1);\nexport default v5;","import REGEX from './regex.js';\n\nfunction validate(uuid) {\n return typeof uuid === 'string' && REGEX.test(uuid);\n}\n\nexport default validate;","import validate from './validate.js';\n\nfunction version(uuid) {\n if (!validate(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n return parseInt(uuid.substr(14, 1), 16);\n}\n\nexport default version;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = (module) => {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","import { connect } from \"@openfin/core-web\";\nimport { getSettings } from \"./platform/settings\";\n\n/**\n * Initializes the OpenFin Web Broker connection.\n */\nasync function init(): Promise {\n\tconst settings = await getSettings();\n\t// Connect to the OpenFin Web Broker.\n\t// It is good practice to specify providerId even if content is explicitly specifying it for cases where\n\t// this provider may use our layout system and allow content to inherit these settings and currentContextGroup\n\t// which will default any client that uses inheritance through our layout system.\n\tconst fin = await connect({\n\t\toptions: {\n\t\t\tbrokerUrl: settings.platform.brokerUrl,\n\t\t\tinteropConfig: {\n\t\t\t\tproviderId: settings.platform.providerId,\n\t\t\t\tcurrentContextGroup: settings.platform.defaultContextGroup\n\t\t\t}\n\t\t}\n\t});\n\n\t// You may now use the `fin` object.\n\tawait fin.Interop.init(settings.platform.providerId);\n}\n\ninit()\n\t.then(() => {\n\t\tconsole.log(\"Connected to the OpenFin Web Broker.\");\n\t\treturn true;\n\t})\n\t.catch((err) => console.error(err));\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/web/v19.2.0/web-interop-support-context-and-intents/common/apps-contact.json b/web/v19.2.0/web-interop-support-context-and-intents/common/apps-contact.json index bc28751..9f16223 100644 --- a/web/v19.2.0/web-interop-support-context-and-intents/common/apps-contact.json +++ b/web/v19.2.0/web-interop-support-context-and-intents/common/apps-contact.json @@ -11,12 +11,12 @@ "lang": "en-US", "icons": [ { - "src": "https://built-on-openfin.github.io/workspace-starter/workspace/v19.1.0/workspace-platform-starter/common/images/icon-blue.png" + "src": "https://built-on-openfin.github.io/workspace-starter/workspace/v19.2.0/workspace-platform-starter/common/images/icon-blue.png" } ], "screenshots": [ { - "src": "https://built-on-openfin.github.io/workspace-starter/workspace/v19.1.0/workspace-platform-starter/common/images/previews/contact/call-app.png" + "src": "https://built-on-openfin.github.io/workspace-starter/workspace/v19.2.0/workspace-platform-starter/common/images/previews/contact/call-app.png" } ], "contactEmail": "sales@openfin.co", @@ -24,7 +24,7 @@ "publisher": "OpenFin", "type": "web", "details": { - "url": "https://built-on-openfin.github.io/workspace-starter/workspace/v19.1.0/workspace-platform-starter/common/views/contact/call-app/index.html" + "url": "https://built-on-openfin.github.io/workspace-starter/workspace/v19.2.0/workspace-platform-starter/common/views/contact/call-app/index.html" }, "interop": { "intents": { @@ -52,12 +52,12 @@ "lang": "en-US", "icons": [ { - "src": "https://built-on-openfin.github.io/workspace-starter/workspace/v19.1.0/workspace-platform-starter/common/images/icon-blue.png" + "src": "https://built-on-openfin.github.io/workspace-starter/workspace/v19.2.0/workspace-platform-starter/common/images/icon-blue.png" } ], "screenshots": [ { - "src": "https://built-on-openfin.github.io/workspace-starter/workspace/v19.1.0/workspace-platform-starter/common/images/previews/contact/participant-selection.png" + "src": "https://built-on-openfin.github.io/workspace-starter/workspace/v19.2.0/workspace-platform-starter/common/images/previews/contact/participant-selection.png" } ], "contactEmail": "sales@openfin.co", @@ -65,7 +65,7 @@ "publisher": "OpenFin", "type": "web", "details": { - "url": "https://built-on-openfin.github.io/workspace-starter/workspace/v19.1.0/workspace-platform-starter/common/views/contact/participant-selection/index.html" + "url": "https://built-on-openfin.github.io/workspace-starter/workspace/v19.2.0/workspace-platform-starter/common/views/contact/participant-selection/index.html" }, "interop": {} }, @@ -80,12 +80,12 @@ "lang": "en-US", "icons": [ { - "src": "https://built-on-openfin.github.io/workspace-starter/workspace/v19.1.0/workspace-platform-starter/common/images/icon-blue.png" + "src": "https://built-on-openfin.github.io/workspace-starter/workspace/v19.2.0/workspace-platform-starter/common/images/icon-blue.png" } ], "screenshots": [ { - "src": "https://built-on-openfin.github.io/workspace-starter/workspace/v19.1.0/workspace-platform-starter/common/images/previews/contact/participant-history.png" + "src": "https://built-on-openfin.github.io/workspace-starter/workspace/v19.2.0/workspace-platform-starter/common/images/previews/contact/participant-history.png" } ], "contactEmail": "sales@openfin.co", @@ -93,7 +93,7 @@ "publisher": "OpenFin", "type": "web", "details": { - "url": "https://built-on-openfin.github.io/workspace-starter/workspace/v19.1.0/workspace-platform-starter/common/views/contact/participant-history/index.html" + "url": "https://built-on-openfin.github.io/workspace-starter/workspace/v19.2.0/workspace-platform-starter/common/views/contact/participant-history/index.html" }, "interop": {} }, @@ -108,12 +108,12 @@ "lang": "en-US", "icons": [ { - "src": "https://built-on-openfin.github.io/workspace-starter/workspace/v19.1.0/workspace-platform-starter/common/images/icon-blue.png" + "src": "https://built-on-openfin.github.io/workspace-starter/workspace/v19.2.0/workspace-platform-starter/common/images/icon-blue.png" } ], "screenshots": [ { - "src": "https://built-on-openfin.github.io/workspace-starter/workspace/v19.1.0/workspace-platform-starter/common/images/previews/contact/investments-and-models.png" + "src": "https://built-on-openfin.github.io/workspace-starter/workspace/v19.2.0/workspace-platform-starter/common/images/previews/contact/investments-and-models.png" } ], "contactEmail": "sales@openfin.co", @@ -121,7 +121,7 @@ "publisher": "OpenFin", "type": "web", "details": { - "url": "https://built-on-openfin.github.io/workspace-starter/workspace/v19.1.0/workspace-platform-starter/common/views/contact/investments-and-models/index.html" + "url": "https://built-on-openfin.github.io/workspace-starter/workspace/v19.2.0/workspace-platform-starter/common/views/contact/investments-and-models/index.html" }, "interop": { "intents": { @@ -145,12 +145,12 @@ "lang": "en-US", "icons": [ { - "src": "https://built-on-openfin.github.io/workspace-starter/workspace/v19.1.0/workspace-platform-starter/common/images/icon-blue.png" + "src": "https://built-on-openfin.github.io/workspace-starter/workspace/v19.2.0/workspace-platform-starter/common/images/icon-blue.png" } ], "screenshots": [ { - "src": "https://built-on-openfin.github.io/workspace-starter/workspace/v19.1.0/workspace-platform-starter/common/images/previews/contact/participant-summary-view.png" + "src": "https://built-on-openfin.github.io/workspace-starter/workspace/v19.2.0/workspace-platform-starter/common/images/previews/contact/participant-summary-view.png" } ], "contactEmail": "sales@openfin.co", @@ -158,7 +158,7 @@ "publisher": "OpenFin", "type": "web", "details": { - "url": "https://built-on-openfin.github.io/workspace-starter/workspace/v19.1.0/workspace-platform-starter/common/views/contact/participant-summary/index.html" + "url": "https://built-on-openfin.github.io/workspace-starter/workspace/v19.2.0/workspace-platform-starter/common/views/contact/participant-summary/index.html" }, "interop": { "intents": { diff --git a/web/v19.2.0/web-interop-support-context-and-intents/common/apps-fdc3-2-0.json b/web/v19.2.0/web-interop-support-context-and-intents/common/apps-fdc3-2-0.json index 48bd569..8c4a072 100644 --- a/web/v19.2.0/web-interop-support-context-and-intents/common/apps-fdc3-2-0.json +++ b/web/v19.2.0/web-interop-support-context-and-intents/common/apps-fdc3-2-0.json @@ -11,12 +11,12 @@ "lang": "en-US", "icons": [ { - "src": "https://built-on-openfin.github.io/dev-extensions/extensions/v19.1.0/common/favicon-32x32.png" + "src": "https://built-on-openfin.github.io/dev-extensions/extensions/v19.2.0/common/favicon-32x32.png" } ], "screenshots": [ { - "src": "https://built-on-openfin.github.io/dev-extensions/extensions/v19.1.0/interop/images/previews/view-intents-fdc3.png", + "src": "https://built-on-openfin.github.io/dev-extensions/extensions/v19.2.0/interop/images/previews/view-intents-fdc3.png", "label": "Intents using FDC3" } ], @@ -25,7 +25,7 @@ "publisher": "OpenFin", "type": "web", "details": { - "url": "https://built-on-openfin.github.io/dev-extensions/extensions/v19.1.0/interop/fdc3/intent/2-0/fdc3-intent-view.html" + "url": "https://built-on-openfin.github.io/dev-extensions/extensions/v19.2.0/interop/fdc3/intent/2-0/fdc3-intent-view.html" }, "interop": { "intents": { @@ -89,12 +89,12 @@ "lang": "en-US", "icons": [ { - "src": "https://built-on-openfin.github.io/dev-extensions/extensions/v19.1.0/common/favicon-32x32.png" + "src": "https://built-on-openfin.github.io/dev-extensions/extensions/v19.2.0/common/favicon-32x32.png" } ], "screenshots": [ { - "src": "https://built-on-openfin.github.io/dev-extensions/extensions/v19.1.0/interop/images/previews/view-context-fdc3.png", + "src": "https://built-on-openfin.github.io/dev-extensions/extensions/v19.2.0/interop/images/previews/view-context-fdc3.png", "label": "Contexts using FDC3" } ], @@ -103,7 +103,7 @@ "publisher": "OpenFin", "type": "web", "details": { - "url": "https://built-on-openfin.github.io/dev-extensions/extensions/v19.1.0/interop/fdc3/context/2-0/fdc3-broadcast-view.html" + "url": "https://built-on-openfin.github.io/dev-extensions/extensions/v19.2.0/interop/fdc3/context/2-0/fdc3-broadcast-view.html" }, "interop": {} } diff --git a/web/v19.2.0/web-interop-support-context-and-intents/common/apps-finance.json b/web/v19.2.0/web-interop-support-context-and-intents/common/apps-finance.json index b692ebf..c0c4004 100644 --- a/web/v19.2.0/web-interop-support-context-and-intents/common/apps-finance.json +++ b/web/v19.2.0/web-interop-support-context-and-intents/common/apps-finance.json @@ -11,12 +11,12 @@ "lang": "en-US", "icons": [ { - "src": "https://built-on-openfin.github.io/dev-extensions/extensions/v19.1.0/common/favicon-32x32.png" + "src": "https://built-on-openfin.github.io/dev-extensions/extensions/v19.2.0/common/favicon-32x32.png" } ], "screenshots": [ { - "src": "https://built-on-openfin.github.io/dev-extensions/extensions/v19.1.0/demos/images/preview/preview-finance-chart.jpeg" + "src": "https://built-on-openfin.github.io/dev-extensions/extensions/v19.2.0/demos/images/preview/preview-finance-chart.jpeg" } ], "contactEmail": "sales@openfin.co", @@ -39,12 +39,12 @@ "lang": "en-US", "icons": [ { - "src": "https://built-on-openfin.github.io/dev-extensions/extensions/v19.1.0/common/favicon-32x32.png" + "src": "https://built-on-openfin.github.io/dev-extensions/extensions/v19.2.0/common/favicon-32x32.png" } ], "screenshots": [ { - "src": "https://built-on-openfin.github.io/dev-extensions/extensions/v19.1.0/demos/images/preview/preview-finance-summary.jpeg" + "src": "https://built-on-openfin.github.io/dev-extensions/extensions/v19.2.0/demos/images/preview/preview-finance-summary.jpeg" } ], "contactEmail": "sales@openfin.co", @@ -67,12 +67,12 @@ "lang": "en-US", "icons": [ { - "src": "https://built-on-openfin.github.io/dev-extensions/extensions/v19.1.0/common/favicon-32x32.png" + "src": "https://built-on-openfin.github.io/dev-extensions/extensions/v19.2.0/common/favicon-32x32.png" } ], "screenshots": [ { - "src": "https://built-on-openfin.github.io/dev-extensions/extensions/v19.1.0/demos/images/preview/preview-finance-portfolio.jpeg" + "src": "https://built-on-openfin.github.io/dev-extensions/extensions/v19.2.0/demos/images/preview/preview-finance-portfolio.jpeg" } ], "contactEmail": "sales@openfin.co", @@ -95,12 +95,12 @@ "lang": "en-US", "icons": [ { - "src": "https://built-on-openfin.github.io/dev-extensions/extensions/v19.1.0/common/favicon-32x32.png" + "src": "https://built-on-openfin.github.io/dev-extensions/extensions/v19.2.0/common/favicon-32x32.png" } ], "screenshots": [ { - "src": "https://built-on-openfin.github.io/dev-extensions/extensions/v19.1.0/demos/images/preview/preview-finance-instrument-details.jpeg" + "src": "https://built-on-openfin.github.io/dev-extensions/extensions/v19.2.0/demos/images/preview/preview-finance-instrument-details.jpeg" } ], "contactEmail": "sales@openfin.co", diff --git a/web/v19.2.0/web-interop-support-context-and-intents/common/apps-interop.json b/web/v19.2.0/web-interop-support-context-and-intents/common/apps-interop.json index 536460e..6abf2f1 100644 --- a/web/v19.2.0/web-interop-support-context-and-intents/common/apps-interop.json +++ b/web/v19.2.0/web-interop-support-context-and-intents/common/apps-interop.json @@ -11,12 +11,12 @@ "lang": "en-US", "icons": [ { - "src": "https://built-on-openfin.github.io/dev-extensions/extensions/v19.1.0/common/favicon-32x32.png" + "src": "https://built-on-openfin.github.io/dev-extensions/extensions/v19.2.0/common/favicon-32x32.png" } ], "screenshots": [ { - "src": "https://built-on-openfin.github.io/dev-extensions/extensions/v19.1.0/interop/images/previews/view-context-interop-api.png", + "src": "https://built-on-openfin.github.io/dev-extensions/extensions/v19.2.0/interop/images/previews/view-context-interop-api.png", "label": "Intents using FDC3" } ], @@ -25,7 +25,7 @@ "publisher": "OpenFin", "type": "web", "details": { - "url": "https://built-on-openfin.github.io/dev-extensions/extensions/v19.1.0/interop/interop-api/intent/interop-intent-view.html" + "url": "https://built-on-openfin.github.io/dev-extensions/extensions/v19.2.0/interop/interop-api/intent/interop-intent-view.html" }, "interop": { "intents": { @@ -89,12 +89,12 @@ "lang": "en-US", "icons": [ { - "src": "https://built-on-openfin.github.io/dev-extensions/extensions/v19.1.0/common/favicon-32x32.png" + "src": "https://built-on-openfin.github.io/dev-extensions/extensions/v19.2.0/common/favicon-32x32.png" } ], "screenshots": [ { - "src": "https://built-on-openfin.github.io/dev-extensions/extensions/v19.1.0/interop/images/previews/view-context-interop-api.png", + "src": "https://built-on-openfin.github.io/dev-extensions/extensions/v19.2.0/interop/images/previews/view-context-interop-api.png", "label": "Contexts using Interop API" } ], @@ -103,7 +103,7 @@ "publisher": "OpenFin", "type": "web", "details": { - "url": "https://built-on-openfin.github.io/dev-extensions/extensions/v19.1.0/interop/interop-api/context/interop-broadcast-view.html" + "url": "https://built-on-openfin.github.io/dev-extensions/extensions/v19.2.0/interop/interop-api/context/interop-broadcast-view.html" }, "interop": {} } diff --git a/web/v19.2.0/web-interop-support-context-and-intents/common/apps-manager.json b/web/v19.2.0/web-interop-support-context-and-intents/common/apps-manager.json index 9df9e95..352c7c7 100644 --- a/web/v19.2.0/web-interop-support-context-and-intents/common/apps-manager.json +++ b/web/v19.2.0/web-interop-support-context-and-intents/common/apps-manager.json @@ -11,12 +11,12 @@ "lang": "en-US", "icons": [ { - "src": "https://built-on-openfin.github.io/workspace-starter/workspace/v19.1.0/workspace-platform-starter/common/images/icon-blue.png" + "src": "https://built-on-openfin.github.io/workspace-starter/workspace/v19.2.0/workspace-platform-starter/common/images/icon-blue.png" } ], "screenshots": [ { - "src": "https://built-on-openfin.github.io/workspace-starter/workspace/v19.1.0/workspace-platform-starter/common/images/previews/manager/preview-manager-portal-my-team.jpeg" + "src": "https://built-on-openfin.github.io/workspace-starter/workspace/v19.2.0/workspace-platform-starter/common/images/previews/manager/preview-manager-portal-my-team.jpeg" } ], "contactEmail": "sales@openfin.co", @@ -24,7 +24,7 @@ "publisher": "OpenFin", "type": "web", "details": { - "url": "https://built-on-openfin.github.io/workspace-starter/workspace/v19.1.0/workspace-platform-starter/common/views/manager-portal/my-team/index.html" + "url": "https://built-on-openfin.github.io/workspace-starter/workspace/v19.2.0/workspace-platform-starter/common/views/manager-portal/my-team/index.html" }, "interop": {} }, @@ -39,12 +39,12 @@ "lang": "en-US", "icons": [ { - "src": "https://built-on-openfin.github.io/workspace-starter/workspace/v19.1.0/workspace-platform-starter/common/images/icon-blue.png" + "src": "https://built-on-openfin.github.io/workspace-starter/workspace/v19.2.0/workspace-platform-starter/common/images/icon-blue.png" } ], "screenshots": [ { - "src": "https://built-on-openfin.github.io/workspace-starter/workspace/v19.1.0/workspace-platform-starter/common/images/previews/manager/preview-manager-portal-annual-leave.jpeg" + "src": "https://built-on-openfin.github.io/workspace-starter/workspace/v19.2.0/workspace-platform-starter/common/images/previews/manager/preview-manager-portal-annual-leave.jpeg" } ], "contactEmail": "sales@openfin.co", @@ -52,7 +52,7 @@ "publisher": "OpenFin", "type": "web", "details": { - "url": "https://built-on-openfin.github.io/workspace-starter/workspace/v19.1.0/workspace-platform-starter/common/views/manager-portal/annual-leave/index.html" + "url": "https://built-on-openfin.github.io/workspace-starter/workspace/v19.2.0/workspace-platform-starter/common/views/manager-portal/annual-leave/index.html" }, "interop": {} }, @@ -67,12 +67,12 @@ "lang": "en-US", "icons": [ { - "src": "https://built-on-openfin.github.io/workspace-starter/workspace/v19.1.0/workspace-platform-starter/common/images/icon-blue.png" + "src": "https://built-on-openfin.github.io/workspace-starter/workspace/v19.2.0/workspace-platform-starter/common/images/icon-blue.png" } ], "screenshots": [ { - "src": "https://built-on-openfin.github.io/workspace-starter/workspace/v19.1.0/workspace-platform-starter/common/images/previews/manager/preview-manager-portal-manager-paths.jpeg" + "src": "https://built-on-openfin.github.io/workspace-starter/workspace/v19.2.0/workspace-platform-starter/common/images/previews/manager/preview-manager-portal-manager-paths.jpeg" } ], "contactEmail": "sales@openfin.co", @@ -80,7 +80,7 @@ "publisher": "OpenFin", "type": "web", "details": { - "url": "https://built-on-openfin.github.io/workspace-starter/workspace/v19.1.0/workspace-platform-starter/common/views/manager-portal/manager-paths/index.html" + "url": "https://built-on-openfin.github.io/workspace-starter/workspace/v19.2.0/workspace-platform-starter/common/views/manager-portal/manager-paths/index.html" }, "interop": {} }, @@ -95,12 +95,12 @@ "lang": "en-US", "icons": [ { - "src": "https://built-on-openfin.github.io/workspace-starter/workspace/v19.1.0/workspace-platform-starter/common/images/icon-blue.png" + "src": "https://built-on-openfin.github.io/workspace-starter/workspace/v19.2.0/workspace-platform-starter/common/images/icon-blue.png" } ], "screenshots": [ { - "src": "https://built-on-openfin.github.io/workspace-starter/workspace/v19.1.0/workspace-platform-starter/common/images/previews/manager/preview-manager-portal-company-comms.jpeg" + "src": "https://built-on-openfin.github.io/workspace-starter/workspace/v19.2.0/workspace-platform-starter/common/images/previews/manager/preview-manager-portal-company-comms.jpeg" } ], "contactEmail": "sales@openfin.co", @@ -108,7 +108,7 @@ "publisher": "OpenFin", "type": "web", "details": { - "url": "https://built-on-openfin.github.io/workspace-starter/workspace/v19.1.0/workspace-platform-starter/common/views/manager-portal/company-comms/index.html" + "url": "https://built-on-openfin.github.io/workspace-starter/workspace/v19.2.0/workspace-platform-starter/common/views/manager-portal/company-comms/index.html" }, "interop": {} }, @@ -123,12 +123,12 @@ "lang": "en-US", "icons": [ { - "src": "https://built-on-openfin.github.io/workspace-starter/workspace/v19.1.0/workspace-platform-starter/common/images/icon-blue.png" + "src": "https://built-on-openfin.github.io/workspace-starter/workspace/v19.2.0/workspace-platform-starter/common/images/icon-blue.png" } ], "screenshots": [ { - "src": "https://built-on-openfin.github.io/workspace-starter/workspace/v19.1.0/workspace-platform-starter/common/images/previews/manager/preview-manager-portal-company-calendar.jpeg" + "src": "https://built-on-openfin.github.io/workspace-starter/workspace/v19.2.0/workspace-platform-starter/common/images/previews/manager/preview-manager-portal-company-calendar.jpeg" } ], "contactEmail": "sales@openfin.co", @@ -136,7 +136,7 @@ "publisher": "OpenFin", "type": "web", "details": { - "url": "https://built-on-openfin.github.io/workspace-starter/workspace/v19.1.0/workspace-platform-starter/common/views/manager-portal/company-cal/index.html" + "url": "https://built-on-openfin.github.io/workspace-starter/workspace/v19.2.0/workspace-platform-starter/common/views/manager-portal/company-cal/index.html" }, "interop": {} } diff --git a/web/v19.2.0/web-interop-support-context-and-intents/js/fdc3-intent-view.bundle.js b/web/v19.2.0/web-interop-support-context-and-intents/js/fdc3-intent-view.bundle.js index ebb75ff..32aef4f 100644 --- a/web/v19.2.0/web-interop-support-context-and-intents/js/fdc3-intent-view.bundle.js +++ b/web/v19.2.0/web-interop-support-context-and-intents/js/fdc3-intent-view.bundle.js @@ -1,38 +1,38 @@ /******/ (() => { // webpackBootstrap /******/ var __webpack_modules__ = ({ -/***/ "./node_modules/@openfin/core-web/out/api-client.js": -/*!**********************************************************!*\ - !*** ./node_modules/@openfin/core-web/out/api-client.js ***! - \**********************************************************/ +/***/ "../../node_modules/@openfin/core-web/out/api-client.js": +/*!**************************************************************!*\ + !*** ../../node_modules/@openfin/core-web/out/api-client.js ***! + \**************************************************************/ /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; -var e=__webpack_require__(/*! ./main-8cad4070.js */ "./node_modules/@openfin/core-web/out/main-8cad4070.js");__webpack_require__(/*! buffer/ */ "../../node_modules/buffer/index.js"),__webpack_require__(/*! uuid */ "../../node_modules/uuid/dist/esm-browser/index.js"),__webpack_require__(/*! events */ "../../node_modules/events/events.js"),__webpack_require__(/*! lodash/cloneDeep */ "../../node_modules/lodash/cloneDeep.js"),__webpack_require__(/*! lodash/isEqual */ "../../node_modules/lodash/isEqual.js"),exports.connect=e.connect; +var e=__webpack_require__(/*! ./main-8cad4070.js */ "../../node_modules/@openfin/core-web/out/main-8cad4070.js");__webpack_require__(/*! buffer/ */ "../../node_modules/buffer/index.js"),__webpack_require__(/*! uuid */ "../../node_modules/uuid/dist/esm-browser/index.js"),__webpack_require__(/*! events */ "../../node_modules/events/events.js"),__webpack_require__(/*! lodash/cloneDeep */ "../../node_modules/lodash/cloneDeep.js"),__webpack_require__(/*! lodash/isEqual */ "../../node_modules/lodash/isEqual.js"),exports.connect=e.connect; /***/ }), -/***/ "./node_modules/@openfin/core-web/out/main-8cad4070.js": -/*!*************************************************************!*\ - !*** ./node_modules/@openfin/core-web/out/main-8cad4070.js ***! - \*************************************************************/ +/***/ "../../node_modules/@openfin/core-web/out/main-8cad4070.js": +/*!*****************************************************************!*\ + !*** ../../node_modules/@openfin/core-web/out/main-8cad4070.js ***! + \*****************************************************************/ /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; -var e=__webpack_require__(/*! buffer/ */ "../../node_modules/buffer/index.js"),t=__webpack_require__(/*! events */ "../../node_modules/events/events.js"),n=__webpack_require__(/*! lodash/cloneDeep */ "../../node_modules/lodash/cloneDeep.js"),i=__webpack_require__(/*! lodash/isEqual */ "../../node_modules/lodash/isEqual.js"),r=__webpack_require__(/*! uuid */ "../../node_modules/uuid/dist/esm-browser/index.js");const o=(e,t)=>`${t}<${btoa(JSON.stringify(e))}>`;var s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof __webpack_require__.g?__webpack_require__.g:"undefined"!=typeof self?self:{},a={},c={},d={},h={};async function l(e){const t=[];for(const n of e){const e=await n();t.push(e)}return t}Object.defineProperty(h,"__esModule",{value:!0}),h.promiseMapSerial=h.serial=h.promiseMap=h.promisify=void 0,h.promisify=function(e){return(...t)=>new Promise(((n,i)=>{e(...t,((e,t)=>e?i(e):n(t)))}))},h.promiseMap=async function(e,t){return Promise.all(e.map(t))},h.serial=l,h.promiseMapSerial=async function(e,t){return l(e.map(((e,n,i)=>()=>t(e,n,i))))};var u,p=s&&s.__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},w=s&&s.__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)};Object.defineProperty(d,"__esModule",{value:!0}),d.Reply=d.EmitterBase=d.Base=void 0;const y=h;class f{constructor(e){this.isNodeEnvironment=()=>"node"===this.wire.environment.type,this.isOpenFinEnvironment=()=>"openfin"===this.wire.environment.type,this.isBrowserEnvironment=()=>"other"===this.wire.environment.type,this.wire=e}get fin(){return this.wire.getFin()}get me(){return this.wire.me}}d.Base=f;d.EmitterBase=class extends f{constructor(e,t,...n){super(e),this.topic=t,u.set(this,void 0),this.eventNames=()=>this.hasEmitter()?this.getOrCreateEmitter().eventNames():[],this.emit=(e,t,...n)=>!!this.hasEmitter()&&this.getOrCreateEmitter().emit(e,t,...n),this.hasEmitter=()=>this.wire.eventAggregator.has(w(this,u,"f")),this.getOrCreateEmitter=()=>this.wire.eventAggregator.getOrCreate(w(this,u,"f")),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[],this.listenerCount=e=>this.hasEmitter()?this.getOrCreateEmitter().listenerCount(e):0,this.registerEventListener=async(e,t={},n,i)=>{const r={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e},o=this.getOrCreateEmitter();n(o);try{await this.wire.sendAction("subscribe-to-desktop-event",r)}catch(e){throw i(o),this.deleteEmitterIfNothingRegistered(o),e}},this.deregisterEventListener=async(e,t={})=>{if(this.hasEmitter()){const n={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e};await this.wire.sendAction("unsubscribe-to-desktop-event",n).catch((()=>null));return this.getOrCreateEmitter()}return Promise.resolve()},p(this,u,[t,...n],"f"),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[]}async on(e,t,n){return await this.registerEventListener(e,n,(n=>{n.on(e,t)}),(n=>{n.removeListener(e,t)})),this}async addListener(e,t,n){return this.on(e,t,n)}async once(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.once(e,i),n.once(e,t)}),(n=>{n.removeListener(e,i),n.removeListener(e,t)})),this}async prependListener(e,t,n){return await this.registerEventListener(e,n,(n=>{n.prependListener(e,t)}),(n=>{n.removeListener(e,t)})),this}async prependOnceListener(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.prependOnceListener(e,t),n.once(e,i)}),(n=>{n.removeListener(e,t),n.removeListener(e,i)})),this}async removeListener(e,t,n){const i=await this.deregisterEventListener(e,n);return i&&(i.removeListener(e,t),this.deleteEmitterIfNothingRegistered(i)),this}async deregisterAllListeners(e){const t={...this.identity,type:e,topic:this.topic};if(this.hasEmitter()){const e=this.getOrCreateEmitter(),n=e.listenerCount(t.type),i=[];for(let e=0;enull)));return await Promise.all(i),e}}async removeAllListeners(e){const t=async e=>{const t=await this.deregisterAllListeners(e);t&&(t.removeAllListeners(e),this.deleteEmitterIfNothingRegistered(t))};if(e)await t(e);else if(this.hasEmitter()){const e=this.getOrCreateEmitter().eventNames();await(0,y.promiseMap)(e,t)}return this}deleteEmitterIfNothingRegistered(e){0===e.eventNames().length&&this.wire.eventAggregator.delete(w(this,u,"f"))}},u=new WeakMap;d.Reply=class{};var g={};Object.defineProperty(g,"__esModule",{value:!0});var m=g.RuntimeError=g.NotSupportedError=g.NotImplementedError=g.NoAckError=g.DuplicateCorrelationError=g.UnexpectedActionError=g.DisconnectedError=void 0;class v extends Error{constructor(e){super(`Expected websocket state OPEN but found ${e}`),this.readyState=e}}g.DisconnectedError=v;class C extends Error{}g.UnexpectedActionError=C;class b extends Error{}g.DuplicateCorrelationError=b;class I extends Error{}g.NoAckError=I;class E extends Error{}g.NotImplementedError=E;class x extends Error{}g.NotSupportedError=x;class A extends Error{constructor(e){const{message:t,name:n,stack:i,...r}=e;super(t),this.name=n||"Error",this.stack=i??this.toString(),Object.keys(r).forEach((e=>{this[e]=r[e]}))}}class P extends Error{static getCallSite(e=0){const t=Error.stackTraceLimit,n=e+1;Error.stackTraceLimit=t+n;const i=Error.prepareStackTrace;Error.prepareStackTrace=(e,t)=>t;const r=(new Error).stack?.slice(n)??[];return Error.prepareStackTrace=i,Error.stackTraceLimit=t,r}static prepareStackTrace(e,t){if("function"==typeof Error.prepareStackTrace)return Error.prepareStackTrace(e,t);let n="";n+=e.name||"Error",n+=`: ${e.message||""}`;for(const e of t)n+=`\n at ${e.toString()}`;return n}constructor(e,t){const{reason:n,error:i}=e;super(n),this.name="RuntimeError",i?.stack&&(this.cause=new A(i)),t&&(this.stack=P.prepareStackTrace(this,t))}}m=g.RuntimeError=P;var M={},_={},O={};Object.defineProperty(O,"__esModule",{value:!0}),O.validateIdentity=void 0,O.validateIdentity=function(e){let t;return"object"==typeof e&&"string"==typeof e.uuid||(t="Not a valid identity object"),t};var S={},R={},F={},j={},k={},L={},T={};Object.defineProperty(T,"__esModule",{value:!0}),T.handleDeprecatedWarnings=void 0;var $;T.handleDeprecatedWarnings=e=>{(e.contentNavigation?.whitelist||e.contentNavigation?.blacklist||e.contentRedirect?.whitelist||e.contentRedirect?.blacklist)&&console.warn("The properties 'whitelist' and 'blacklist' have been marked as deprecated and will be removed in a future version. Please use 'allowlist' and 'denylist'.")};var B={},G={};Object.defineProperty(G,"__esModule",{value:!0}),G.AsyncRetryableLazy=W=G.Lazy=void 0;var W=G.Lazy=class{constructor(e){this.producerFn=e}getValue(){return this.value||(this.value=this.producerFn()),this.value}};G.AsyncRetryableLazy=class{constructor(e){this.producerFn=e}async getValue(){return this.promise||(this.promise=this.producerFn().catch((e=>{throw delete this.promise,e}))),this.promise}};var H={};Object.defineProperty(H,"__esModule",{value:!0}),H.WebContents=void 0;const N=d;class D extends N.EmitterBase{constructor(e,t,n){super(e,n,t.uuid,t.name),this.identity=t,this.entityType=n}capturePage(e){return this.wire.sendAction("capture-page",{options:e,...this.identity}).then((({payload:e})=>e.data))}executeJavaScript(e){return this.wire.sendAction("execute-javascript-in-window",{...this.identity,code:e}).then((({payload:e})=>e.data))}getZoomLevel(){return this.wire.sendAction("get-zoom-level",this.identity).then((({payload:e})=>e.data))}setZoomLevel(e){return this.wire.sendAction("set-zoom-level",{...this.identity,level:e}).then((()=>{}))}navigate(e){return this.wire.sendAction("navigate-window",{...this.identity,url:e}).then((()=>{}))}navigateBack(){return this.wire.sendAction("navigate-window-back",{...this.identity}).then((()=>{}))}async navigateForward(){await this.wire.sendAction("navigate-window-forward",{...this.identity})}stopNavigation(){return this.wire.sendAction("stop-window-navigation",{...this.identity}).then((()=>{}))}reload(e=!1){return this.wire.sendAction("reload-window",{ignoreCache:e,...this.identity}).then((()=>{}))}print(e={}){return this.wire.sendAction("print",{...this.identity,options:e}).then((()=>{}))}findInPage(e,t){return this.wire.sendAction("find-in-page",{...this.identity,searchTerm:e,options:t}).then((({payload:e})=>e.data))}stopFindInPage(e){return this.wire.sendAction("stop-find-in-page",{...this.identity,action:e}).then((()=>{}))}getPrinters(){return this.wire.sendAction("get-printers",{...this.identity}).then((({payload:e})=>e.data))}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){await this.wire.sendAction("focus-window",{emitSynthFocused:e,...this.identity})}async showDeveloperTools(){await this.wire.sendAction("show-developer-tools",this.identity)}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction("get-process-info",this.identity);return e}async getSharedWorkers(){return this.wire.sendAction("get-shared-workers",this.identity).then((({payload:e})=>e.data))}async inspectSharedWorker(){await this.wire.sendAction("inspect-shared-worker",{...this.identity})}async inspectSharedWorkerById(e){await this.wire.sendAction("inspect-shared-worker-by-id",{...this.identity,workerId:e})}async inspectServiceWorker(){await this.wire.sendAction("inspect-service-worker",{...this.identity})}async showPopupWindow(e){if(this.wire.sendAction(`${this.entityType}-show-popup-window`,this.identity).catch((()=>{})),e?.onPopupReady){const t=async({popupName:t})=>{try{const n=this.fin.Window.wrapSync({uuid:this.fin.me.uuid,name:t});await e.onPopupReady(n)}catch(e){throw new Error(`Something went wrong during onPopupReady execution: ${e}`)}};await this.once("popup-ready",t)}const{payload:t}=await this.wire.sendAction("try-create-popup-window",{options:{...e,hasResultCallback:!!e?.onPopupResult,hasReadyCallback:!!e?.onPopupReady},...this.identity}),{data:{willOpen:n,options:i}}=t;n&&await this.fin.Window.create(i.initialOptions);if(e?.onPopupResult){const t=async t=>{await e.onPopupResult((e=>{const{name:t,uuid:n,result:i,data:r}=e,o={identity:{name:t,uuid:n},result:i};return r&&(o.data=r),o})(t))},n=async()=>{await this.removeListener("popup-result",t)};await this.on("popup-result",t),await this.once("popup-teardown",n)}const{payload:r}=await this.wire.sendAction("show-popup-window",{options:i,...this.identity});return r.data}}var U,V,z,K,q;function J(){return V||(V=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(function(){if($)return L;$=1,Object.defineProperty(L,"__esModule",{value:!0}),L.ViewModule=void 0;const e=d,t=O,n=J(),i=T;class r extends e.Base{async create(e){const{uuid:t}=this.wire.me;if(!e.name||"string"!=typeof e.name)throw new Error("Please provide a name property as a string in order to create a View.");return(0,i.handleDeprecatedWarnings)(e),this.wire.environment.childViews?await this.wire.environment.createChildContent({entityType:"view",options:{...e,uuid:t}}):await this.wire.sendAction("create-view",{...e,uuid:t}),this.wrapSync({uuid:t,name:e.name})}async wrap(e){this.wire.sendAction("view-wrap").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}wrapSync(e){this.wire.sendAction("view-wrap-sync").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}getCurrent(){if(this.wire.sendAction("view-get-current").catch((e=>{})),!this.wire.me.isView)throw new Error("You are not in a View context");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction("view-get-current-sync").catch((e=>{})),!this.wire.me.isView)throw new Error("You are not in a View context");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return L.ViewModule=r,L}(),e),n(function(){if(U)return B;var e;U=1,Object.defineProperty(B,"__esModule",{value:!0}),B.View=void 0;const t=g,n=G,i=H,r=ie();class o extends i.WebContents{constructor(i,o){super(i,o,"view"),this.identity=o,e.set(this,new n.Lazy((()=>this.fin.Platform.wrapSync(this.identity).getClient()))),this.attach=async e=>{await this.wire.sendAction("attach-view",{target:e,...this.identity})},this.destroy=async()=>{await this.wire.sendAction("destroy-view",{...this.identity})},this.show=async()=>{await this.wire.sendAction("show-view",{...this.identity})},this.showAt=async(e,t={})=>{await this.wire.sendAction("show-view-at",{bounds:e,...this.identity,options:t})},this.bringToFront=async()=>{await this.wire.sendAction("bring-view-to-front",{...this.identity})},this.hide=async()=>{await this.wire.sendAction("hide-view",{...this.identity})},this.setBounds=async e=>{await this.wire.sendAction("set-view-bounds",{bounds:e,...this.identity})},this.getBounds=async()=>(await this.wire.sendAction("get-view-bounds",{...this.identity})).payload.data,this.getInfo=async()=>(await this.wire.sendAction("get-view-info",{...this.identity})).payload.data,this.getParentLayout=async()=>(this.wire.sendAction("view-get-parent-layout",{...this.identity}).catch((()=>{})),this.fin.Platform.Layout.getLayoutByViewIdentity(this.identity)),this.getOptions=async()=>this.wire.sendAction("get-view-options",{...this.identity}).then((({payload:e})=>e.data)),this.updateOptions=async e=>this.wire.sendAction("update-view-options",{options:e,...this.identity}).then((()=>{})),this.getCurrentWindow=async()=>{const{payload:{data:e}}=await this.wire.sendAction("get-view-window",{...this.identity});return new r._Window(this.wire,e)},this.getCurrentStack=async()=>{this.wire.sendAction("view-get-current-stack").catch((()=>{}));try{return(await this.getParentLayout()).getStackByViewIdentity(this.identity)}catch(e){throw new t.RuntimeError({reason:"This view does not belong to a stack.",error:e})}},this.triggerBeforeUnload=async()=>(await this.wire.sendAction("trigger-before-unload",{...this.identity})).payload.data,this.bindToElement=async e=>{if(!e)throw new Error("Element not found.");return this.wire.environment.observeBounds(e,(async e=>this.setBounds(e)))}}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){const t=await this.getCurrentWindow();await t.focusedWebViewWasChanged(),await super.focus({emitSynthFocused:e})}}return B.View=o,e=new WeakMap,B}(),e)}(k)),k}function Y(){if(z)return j;z=1,Object.defineProperty(j,"__esModule",{value:!0}),j.Application=void 0;const e=d,t=ie(),n=J();class i extends e.EmitterBase{constructor(e,n){super(e,"application",n.uuid),this.identity=n,this.window=new t._Window(this.wire,{uuid:this.identity.uuid,name:this.identity.uuid})}windowListFromIdentityList(e){const n=[];return e.forEach((e=>{n.push(new t._Window(this.wire,{uuid:e.uuid,name:e.name}))})),n}isRunning(){return this.wire.sendAction("is-application-running",this.identity).then((({payload:e})=>e.data))}async quit(e=!1){try{await this._close(e),await this.wire.sendAction("destroy-application",{force:e,...this.identity})}catch(e){if(!["Remote connection has closed","Could not locate the requested application"].some((t=>e.message.includes(t))))throw e}}async _close(e=!1){try{await this.wire.sendAction("close-application",{force:e,...this.identity})}catch(e){if(!e.message.includes("Remote connection has closed"))throw e}}close(e=!1){return console.warn("Deprecation Warning: Application.close is deprecated Please use Application.quit"),this.wire.sendAction("application-close",this.identity).catch((e=>{})),this._close(e)}getChildWindows(){return this.wire.sendAction("get-child-windows",this.identity).then((({payload:e})=>{const t=[];return e.data.forEach((e=>{t.push({uuid:this.identity.uuid,name:e})})),this.windowListFromIdentityList(t)}))}getManifest(){return this.wire.sendAction("get-application-manifest",this.identity).then((({payload:e})=>e.data))}getParentUuid(){return this.wire.sendAction("get-parent-application",this.identity).then((({payload:e})=>e.data))}getShortcuts(){return this.wire.sendAction("get-shortcuts",this.identity).then((({payload:e})=>e.data))}async getViews(){const{payload:e}=await this.wire.sendAction("application-get-views",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}getZoomLevel(){return this.wire.sendAction("get-application-zoom-level",this.identity).then((({payload:e})=>e.data))}getWindow(){return this.wire.sendAction("application-get-window",this.identity).catch((e=>{})),Promise.resolve(this.window)}registerUser(e,t){return this.wire.sendAction("register-user",{userName:e,appName:t,...this.identity}).then((()=>{}))}removeTrayIcon(){return this.wire.sendAction("remove-tray-icon",this.identity).then((()=>{}))}restart(){return this.wire.sendAction("restart-application",this.identity).then((()=>{}))}run(){return console.warn("Deprecation Warning: Application.run is deprecated Please use fin.Application.start"),this.wire.sendAction("application-run",this.identity).catch((e=>{})),this._run()}_run(e={}){return this.wire.sendAction("run-application",{manifestUrl:this._manifestUrl,opts:e,...this.identity}).then((()=>{}))}scheduleRestart(){return this.wire.sendAction("relaunch-on-close",this.identity).then((()=>{}))}async sendApplicationLog(){const{payload:e}=await this.wire.sendAction("send-application-log",this.identity);return e.data}async setJumpList(e){await this.wire.sendAction("set-jump-list",{config:e,...this.identity})}setTrayIcon(e){return this.wire.sendAction("set-tray-icon",{enabledIcon:e,...this.identity}).then((()=>{}))}setShortcuts(e){return this.wire.sendAction("set-shortcuts",{data:e,...this.identity}).then((()=>{}))}async setShortcutQueryParams(e){await this.wire.sendAction("set-shortcut-query-args",{data:e,...this.identity})}setZoomLevel(e){return this.wire.sendAction("set-application-zoom-level",{level:e,...this.identity}).then((()=>{}))}async setAppLogUsername(e){await this.wire.sendAction("set-app-log-username",{data:e,...this.identity})}getTrayIconInfo(){return this.wire.sendAction("get-tray-icon-info",this.identity).then((({payload:e})=>e.data))}hasTrayIcon(){return this.wire.sendAction("has-tray-icon",this.identity).then((({payload:e})=>e.data))}terminate(){return this.wire.sendAction("terminate-application",this.identity).then((()=>{}))}wait(){return this.wire.sendAction("wait-for-hung-application",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction("get-info",this.identity).then((({payload:e})=>e.data))}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction("application-get-process-info",this.identity);return e}async setFileDownloadLocation(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t};await this.wire.sendAction("set-file-download-location",{...n,downloadLocation:e})}async getFileDownloadLocation(){const{payload:{data:e}}=await this.wire.sendAction("get-file-download-location",this.identity);return e}async showTrayIconPopupMenu(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t},{payload:i}=await this.wire.sendAction("show-tray-icon-popup-menu",{...n,options:e});return i.data}async closeTrayIconPopupMenu(){const{name:e}=this.wire.me,t={uuid:this.identity.uuid,name:e};await this.wire.sendAction("close-tray-icon-popup-menu",{...t})}}return j.Application=i,j}function Z(){return q||(q=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(function(){if(K)return F;K=1,Object.defineProperty(F,"__esModule",{value:!0}),F.ApplicationModule=void 0;const e=d,t=O,n=Y();class i extends e.Base{async wrap(e){this.wire.sendAction("wrap-application").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}wrapSync(e){this.wire.sendAction("wrap-application-sync").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}async _create(e){return void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&void 0===e.isPlatformController&&(e.autoShow=!0),await this.wire.sendAction("create-application",e),this.wrap({uuid:e.uuid})}create(e){return console.warn("Deprecation Warning: fin.Application.create is deprecated. Please use fin.Application.start"),this.wire.sendAction("application-create").catch((e=>{})),this._create(e)}async start(e){this.wire.sendAction("start-application").catch((e=>{}));const t=await this._create(e);return await this.wire.sendAction("run-application",{uuid:e.uuid}),t}async startManyManifests(e,t){return this.wire.sendAction("run-applications",{applications:e,opts:t}).then((()=>{}))}getCurrent(){return this.wire.sendAction("get-current-application").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction("get-current-application-sync").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}async startFromManifest(e,t){this.wire.sendAction("application-start-from-manifest").catch((e=>{}));const n=await this._createFromManifest(e);return await n._run(t),n}createFromManifest(e){return console.warn("Deprecation Warning: fin.Application.createFromManifest is deprecated. Please use fin.Application.startFromManifest"),this.wire.sendAction("application-create-from-manifest").catch((e=>{})),this._createFromManifest(e)}_createFromManifest(e){return this.wire.sendAction("get-application-manifest",{manifestUrl:e}).then((({payload:e})=>{const t=e.data.platform?e.data.platform.uuid:e.data.startup_app.uuid;return this.wrap({uuid:t})})).then((t=>(t._manifestUrl=e,t)))}}return F.ApplicationModule=i,F}(),e),n(Y(),e)}(R)),R}H.WebContents=D;var Q={};Object.defineProperty(Q,"__esModule",{value:!0}),Q.promisifySubscription=void 0;var X,ee,te;function ne(){if(X)return S;X=1,Object.defineProperty(S,"__esModule",{value:!0}),S._Window=void 0;const e=Z(),t=H,n=J(),i=T,r=Q;class o extends t.WebContents{constructor(e,t){super(e,t,"window")}async createWindow(e){this.wire.sendAction("window-create-window",this.identity).catch((e=>{}));const t=await(0,r.promisifySubscription)(this,"fire-constructor-callback");void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&(e.autoShow=!0),(0,i.handleDeprecatedWarnings)(e);const n=this.wire.environment.createChildContent({entityType:"window",options:e}),[o]=await Promise.all([t.getValue(),n]);let s;const{success:a}=o,c=o.data,{message:d}=c;s=a?{httpResponseCode:c.httpResponseCode,apiInjected:c.apiInjected}:{message:c.message,networkErrorCode:c.networkErrorCode,stack:c.stack};const h={message:d,cbPayload:s,success:a};try{this.getWebWindow().fin.__internal_.openerSuccessCBCalled()}catch(e){}return h.success?this:Promise.reject(h)}getAllFrames(){return this.wire.sendAction("get-all-frames",this.identity).then((({payload:e})=>e.data))}getBounds(){return this.wire.sendAction("get-window-bounds",this.identity).then((({payload:e})=>e.data))}center(){return this.wire.sendAction("center-window",this.identity).then((()=>{}))}blur(){return this.wire.sendAction("blur-window",this.identity).then((()=>{}))}bringToFront(){return this.wire.sendAction("bring-window-to-front",this.identity).then((()=>{}))}animate(e,t){return this.wire.sendAction("animate-window",{transitions:e,options:t,...this.identity}).then((()=>{}))}hide(){return this.wire.sendAction("hide-window",this.identity).then((()=>{}))}close(e=!1){return this.wire.sendAction("close-window",{force:e,...this.identity}).then((()=>{Object.setPrototypeOf(this,null)}))}focusedWebViewWasChanged(){return this.wire.sendAction("focused-webview-changed",this.identity).then((()=>{}))}getNativeId(){return this.wire.sendAction("get-window-native-id",this.identity).then((({payload:e})=>e.data))}async getCurrentViews(){const{payload:e}=await this.wire.sendAction("window-get-views",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}disableFrame(){return console.warn("Function is deprecated; use disableUserMovement instead."),this.wire.sendAction("disable-window-frame",this.identity).then((()=>{}))}disableUserMovement(){return this.wire.sendAction("disable-window-frame",this.identity).then((()=>{}))}enableFrame(){return console.warn("Function is deprecated; use enableUserMovement instead."),this.wire.sendAction("enable-window-frame",this.identity).then((()=>{}))}enableUserMovement(){return this.wire.sendAction("enable-window-frame",this.identity).then((()=>{}))}flash(){return this.wire.sendAction("flash-window",this.identity).then((()=>{}))}stopFlashing(){return this.wire.sendAction("stop-flash-window",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction("get-window-info",this.identity).then((({payload:e})=>e.data))}async getLayout(e){this.wire.sendAction("window-get-layout",this.identity).catch((e=>{}));const t=await this.getOptions();if(!t.layout&&!t.layoutSnapshot)throw new Error("Window does not have a Layout");return this.fin.Platform.Layout.wrap(e??this.identity)}getOptions(){return this.wire.sendAction("get-window-options",this.identity).then((({payload:e})=>e.data))}getParentApplication(){return this.wire.sendAction("window-get-parent-application",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity))}getParentWindow(){return this.wire.sendAction("window-get-parent-window",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity)).then((e=>e.getWindow()))}async getSnapshot(e){const t={area:e,...this.identity};console.warn("Window.getSnapshot has been deprecated, please use Window.capturePage");return(await this.wire.sendAction("get-window-snapshot",t)).payload.data}getState(){return this.wire.sendAction("get-window-state",this.identity).then((({payload:e})=>e.data))}getWebWindow(){return this.wire.sendAction("window-get-web-window",this.identity).catch((e=>{})),this.wire.environment.getWebWindow(this.identity)}isMainWindow(){return this.wire.sendAction("window-is-main-window",this.identity).catch((e=>{})),this.me.uuid===this.me.name}isShowing(){return this.wire.sendAction("is-window-showing",this.identity).then((({payload:e})=>e.data))}maximize(){return this.wire.sendAction("maximize-window",this.identity).then((()=>{}))}minimize(){return this.wire.sendAction("minimize-window",this.identity).then((()=>{}))}moveBy(e,t,n){return this.wire.sendAction("move-window-by",{deltaLeft:e,deltaTop:t,positioningOptions:n,...this.identity}).then((()=>{}))}moveTo(e,t,n){return this.wire.sendAction("move-window",{left:e,top:t,positioningOptions:n,...this.identity}).then((()=>{}))}resizeBy(e,t,n,i){return this.wire.sendAction("resize-window-by",{deltaWidth:Math.floor(e),deltaHeight:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}resizeTo(e,t,n,i){return this.wire.sendAction("resize-window",{width:Math.floor(e),height:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}restore(){return this.wire.sendAction("restore-window",this.identity).then((()=>{}))}setAsForeground(){return this.wire.sendAction("set-foreground-window",this.identity).then((()=>{}))}setBounds(e,t){return this.wire.sendAction("set-window-bounds",{...e,...this.identity,positioningOptions:t}).then((()=>{}))}show(e=!1){return this.wire.sendAction("show-window",{force:e,...this.identity}).then((()=>{}))}showAt(e,t,n=!1){return this.wire.sendAction("show-at-window",{force:n,left:Math.floor(e),top:Math.floor(t),...this.identity}).then((()=>{}))}updateOptions(e){return this.wire.sendAction("update-window-options",{options:e,...this.identity}).then((()=>{}))}authenticate(e,t){return this.wire.sendAction("window-authenticate",{userName:e,password:t,...this.identity}).then((()=>{}))}async showPopupMenu(e){const{payload:t}=await this.wire.sendAction("show-popup-menu",{options:e,...this.identity});return t.data}async closePopupMenu(){return this.wire.sendAction("close-popup-menu",{...this.identity}).then((()=>{}))}async dispatchPopupResult(e){this.wire.sendAction("window-dispatch-popup-result",this.identity).catch((e=>{})),await this.wire.sendAction("dispatch-popup-result",{data:e,...this.identity})}async print(e={content:"self"}){switch(e.content){case void 0:case"self":return super.print(e);case"screenshot":return this.wire.sendAction("print-screenshot",this.identity).then((()=>{}));case"views":return this.wire.sendAction("print-views",{...this.identity,options:e}).then((()=>{}));default:return}}}return S._Window=o,S}function ie(){return te||(te=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(function(){if(ee)return _;ee=1,Object.defineProperty(_,"__esModule",{value:!0}),_._WindowModule=void 0;const e=d,t=O,n=ne();class i extends e.Base{async wrap(e){this.wire.sendAction("window-wrap").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}wrapSync(e){this.wire.sendAction("window-wrap-sync").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}create(e){return this.wire.sendAction("create-window").catch((e=>{})),new n._Window(this.wire,{uuid:this.me.uuid,name:e.name}).createWindow(e)}getCurrent(){if(this.wire.sendAction("get-current-window").catch((e=>{})),!this.wire.me.isWindow)throw new Error("You are not in a Window context");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction("get-current-window-sync").catch((e=>{})),!this.wire.me.isWindow)throw new Error("You are not in a Window context");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return _._WindowModule=i,_}(),e),n(ne(),e)}(M)),M}Q.promisifySubscription=async(e,t,n=(()=>!0),i)=>{let r,o,s;const a=new Promise(((e,t)=>{r=e,o=t})),c=e=>{n(e)&&(clearTimeout(s),r(e))};return await e.on(t,c),i&&(s=setTimeout((()=>o(new Error("event timed out"))),i)),a.finally((()=>{e.removeListener(t,c).catch((()=>null))})),{getValue:()=>a}},Object.defineProperty(c,"__esModule",{value:!0}),c.System=void 0;const re=d,oe=g,se=ie(),ae=t;class ce extends re.EmitterBase{constructor(e){super(e,"system")}sendExternalProcessRequest(e,t){return new Promise(((n,i)=>{const r="external-process-exited";let o,s,a,c;"function"==typeof t.listener&&(a=e=>{const n=e||{};s={topic:"exited",uuid:n.processUuid||"",exitCode:n.exitCode||0},o===e.processUuid&&(t.listener(s),c.removeListener(r,a))},this.wire.me.name||(this.wire.me.name=this.wire.me.uuid),c=new se._Window(this.wire,this.wire.me),c.on(r,a)),this.wire.sendAction(e,t).then((({payload:e})=>{o=e.data.uuid,n(e.data),s&&o===s.uuid&&(t.listener(s),c.removeListener(r,a))})).catch((e=>{c&&c.removeListener(r,a),i(e)}))}))}getVersion(){return this.wire.sendAction("get-version").then((({payload:e})=>e.data))}clearCache(e){return this.wire.sendAction("clear-cache",e).then((()=>{}))}deleteCacheOnExit(){return this.wire.sendAction("delete-cache-request").then((()=>{}))}exit(){return this.wire.sendAction("exit-desktop").then((()=>{}))}async fetchManifest(e){const{payload:{data:t}}=await this.wire.sendAction("fetch-manifest",{manifestUrl:e});return t}flushCookieStore(){return this.wire.sendAction("flush-cookie-store").then((()=>{}))}getAllWindows(){return this.wire.sendAction("get-all-windows").then((({payload:e})=>e.data))}getAllApplications(){return this.wire.sendAction("get-all-applications").then((({payload:e})=>e.data))}getCommandLineArguments(){return this.wire.sendAction("get-command-line-arguments").then((({payload:e})=>e.data))}async getCrashReporterState(){const{payload:{data:{diagnosticMode:e,isRunning:t}}}=await this.wire.sendAction("get-crash-reporter-state");return console.warn("diagnosticMode property is deprecated. It will be removed in a future version"),{diagnosticMode:e,diagnosticsMode:e,isRunning:t}}async startCrashReporter(e){const t=e,n={...t,diagnosticMode:t.diagnosticsMode||t.diagnosticMode},{payload:{data:{diagnosticMode:i,isRunning:r}}}=await this.wire.sendAction("start-crash-reporter",n);return{diagnosticMode:i,diagnosticsMode:i,isRunning:r}}getUniqueUserId(){return this.wire.sendAction("get-unique-user-id").then((({payload:e})=>e.data))}getEntityInfo(e,t){return this.wire.sendAction("get-entity-info",{uuid:e,name:t}).then((({payload:e})=>e.data))}getEnvironmentVariable(e){return this.wire.sendAction("get-environment-variable",{environmentVariables:e}).then((({payload:e})=>e.data))}getFocusedWindow(){return this.wire.sendAction("get-focused-window").then((({payload:e})=>e.data))}async isAppCertified(e){const{payload:{data:{certifiedInfo:t}}}=await this.wire.sendAction("is-app-certified",{manifestUrl:e});return t}getInstalledRuntimes(){return this.wire.sendAction("get-installed-runtimes").then((({payload:e})=>e.data.runtimes))}async getInstalledApps(){const{payload:{data:{installedApps:e}}}=await this.wire.sendAction("get-installed-apps");return e}getLog(e){return this.wire.sendAction("view-log",e).then((({payload:e})=>e.data))}getMachineId(){return this.wire.sendAction("get-machine-id").then((({payload:e})=>e.data))}getMinLogLevel(){return this.wire.sendAction("get-min-log-level").then((({payload:e})=>e.data))}getLogList(){return this.wire.sendAction("list-logs").then((({payload:e})=>e.data))}getMonitorInfo(){return this.wire.sendAction("get-monitor-info").then((({payload:e})=>e.data))}getMousePosition(){return this.wire.sendAction("get-mouse-position").then((({payload:e})=>e.data))}getProcessList(){return console.warn("System.getProcessList has been deprecated. Please consider using our new process APIs: Window.getProcessInfo, View.getProcessInfo, Application.getProcessInfo, System.getAllProcessInfo"),this.wire.sendAction("process-snapshot").then((({payload:e})=>e.data))}async getAllProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction("get-all-process-info",this.identity);return e}getProxySettings(){return this.wire.sendAction("get-proxy-settings").then((({payload:e})=>e.data))}getRuntimeInfo(){return this.wire.sendAction("get-runtime-info").then((({payload:e})=>e.data))}getRvmInfo(){return this.wire.sendAction("get-rvm-info").then((({payload:e})=>e.data))}getHostSpecs(){return this.wire.sendAction("get-host-specs").then((({payload:e})=>e.data))}getOSInfo(){return this.wire.sendAction("get-os-info").then((({payload:e})=>e.data))}launchExternalProcess(e){return this.sendExternalProcessRequest("launch-external-process",e)}monitorExternalProcess(e){return this.sendExternalProcessRequest("monitor-external-process",e)}log(e,t){return this.wire.sendAction("write-to-log",{level:e,message:t}).then((()=>{}))}openUrlWithBrowser(e){return this.wire.sendAction("open-url-with-browser",{url:e}).then((()=>{}))}async registerCustomProtocol(e){if("object"!=typeof e)throw new Error("Must provide an object with a `protocolName` property having a string value.");await this.wire.sendAction("register-custom-protocol",e)}async unregisterCustomProtocol(e){await this.wire.sendAction("unregister-custom-protocol",{protocolName:e})}async getCustomProtocolState(e){return this.wire.sendAction("get-custom-protocol-state",{protocolName:e}).then((({payload:e})=>e.data))}releaseExternalProcess(e){return this.wire.sendAction("release-external-process",{uuid:e}).then((()=>{}))}showDeveloperTools(e){return this.wire.sendAction("show-developer-tools",e).then((()=>{}))}terminateExternalProcess(e){return this.wire.sendAction("terminate-external-process",e).then((()=>{}))}updateProxySettings(e){return this.wire.sendAction("update-proxy",e).then((()=>{}))}async downloadAsset(e,t){const n=()=>{};let i=n,r=n;const o=new Promise(((e,t)=>{i=e,r=t}));if("openfin"!==this.wire.environment.type)throw new oe.NotSupportedError("downloadAsset only supported in an OpenFin Render process");const s=oe.RuntimeError.getCallSite(),a=this.wire.environment.getNextMessageId().toString(),c=`asset-download-progress-${a}`,d=`asset-download-error-${a}`,h=`asset-download-complete-${a}`,l=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},u=()=>{this.removeListener(c,l)};await Promise.all([this.on(c,l),this.once(d,(e=>{u();const{reason:t,err:n}=e;r(new oe.RuntimeError({reason:t,error:n},s))})),this.once(h,(()=>{u(),i()}))]);const p=Object.assign(e,{downloadId:a});return await this.wire.sendAction("download-asset",p).catch((e=>{throw u(),e})),o}downloadRuntime(e,t){const n=oe.RuntimeError.getCallSite();return new Promise(((i,r)=>{if("openfin"!==this.wire.environment.type)return void r(new oe.NotSupportedError("downloadRuntime only supported in an OpenFin Render process"));const o=this.wire.environment.getNextMessageId().toString(),s=`runtime-download-progress-${o}`,a=`runtime-download-error-${o}`,c=`runtime-download-complete-${o}`,d=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},h=()=>{this.removeListener(s,d)};this.on(s,d),this.once(a,(e=>{h();const{reason:t,err:i}=e;r(new oe.RuntimeError({reason:t,error:i},n))})),this.once(c,(()=>{h(),i()}));const l=Object.assign(e,{downloadId:o});this.wire.sendAction("download-runtime",l).catch((e=>{h(),r(e)}))}))}downloadPreloadScripts(e){return this.wire.sendAction("download-preload-scripts",{scripts:e}).then((({payload:e})=>e.data))}getAllExternalApplications(){return this.wire.sendAction("get-all-external-applications").then((({payload:e})=>e.data))}getAppAssetInfo(e){return this.wire.sendAction("get-app-asset-info",e).then((({payload:e})=>e.data))}getCookies(e){const t=this.wire.environment.getUrl(),n=Object.assign(e,{url:t});return this.wire.sendAction("get-cookies",n).then((({payload:e})=>e.data))}setMinLogLevel(e){return this.wire.sendAction("set-min-log-level",{level:e}).then((()=>{}))}resolveUuid(e){return this.wire.sendAction("resolve-uuid",{entityKey:e}).then((({payload:e})=>e.data))}executeOnRemote(e,t){return t.requestingIdentity=e,this.wire.ferryAction(t)}readRegistryValue(e,t,n){return this.wire.sendAction("read-registry-value",{rootKey:e,subkey:t,value:n}).then((({payload:e})=>e.data))}registerExternalConnection(e){return this.wire.sendAction("register-external-connection",{uuid:e}).then((({payload:e})=>e.data))}async getServiceConfiguration(e){if("string"!=typeof e.name)throw new Error("Must provide an object with a `name` property having a string value");const{name:t}=e;return this.wire.sendAction("get-service-configuration",{name:t}).then((({payload:e})=>e.data))}async getSystemAppConfig(e){if("string"!=typeof e)throw new Error("Must provide a string value for name of system app");return this.wire.sendAction("get-system-app-configuration",{name:e}).then((({payload:e})=>e.data))}async registerShutdownHandler(e){this.wire.sendAction("system-register-shutdown-handler").catch((e=>{}));const{uuid:t,name:n}=this.wire.me;this.on("system-shutdown",(i=>{e({proceed:()=>{this.wire.environment.raiseEvent("application/system-shutdown-handled",{uuid:t,name:n,topic:"application"})}})}))}runRvmHealthCheck(){return this.wire.sendAction("run-rvm-health-check").then((({payload:e})=>e.data))}async launchManifest(e,t={}){const{subscribe:n,...i}=t,r=i;if(n){const e=new ae.EventEmitter;n(e);const t="app-version-progress",i="runtime-status",o="app-version-complete",s="app-version-error",a=this.wire.environment.getNextMessageId().toString();r.appVersionId=a;const c=[o,t,i,s],d=e=>{const{appVersionId:t,topic:n,type:i,...r}=e;return{...r,type:c.find((e=>i.includes(e)))}},h=t=>{const n=d(t);e.emit(n.type,n)},l=()=>{this.removeListener(`${t}.${a}`,h),this.removeListener(`${i}.${a}`,h),this.removeListener(`${o}.${a}`,h),this.removeListener(`${s}.${a}`,h),this.removeListener(`${o}.${a}`,l),this.removeListener(`${s}.${a}`,l)};await Promise.all([this.on(`${t}.${a}`,h),this.on(`${i}.${a}`,h),this.once(`${o}.${a}`,h),this.once(`${s}.${a}`,h),this.once(`${o}.${a}`,l),this.once(`${s}.${a}`,l)])}return(await this.wire.sendAction("launch-manifest",{manifestUrl:e,opts:r})).payload.data.manifest}async queryPermissionForCurrentContext(e){const t={uuid:this.wire.me.uuid,name:this.wire.me.name};return(await this.wire.sendAction("query-permission-for-current-context",{apiName:e,identity:t})).payload.data}async enableNativeWindowIntegrationProvider(e){const{payload:t}=await this.wire.sendAction("enable-native-window-integration-provider",{permissions:e});return t.data}async registerUsage({data:e,type:t}){await this.wire.sendAction("register-usage",{data:e,type:t})}async getPrinters(){const{payload:e}=await this.wire.sendAction("system-get-printers");return e.data}async updateProcessLoggingOptions(e){await this.wire.sendAction("system-update-process-logging-options",{options:e})}async getDomainSettings(){const{payload:{data:e}}=await this.wire.sendAction("get-domain-settings",this.identity);return e}async setDomainSettings(e){await this.wire.sendAction("set-domain-settings",{domainSettings:e,...this.identity})}async refreshExtensions(){const{payload:e}=await this.wire.sendAction("refresh-extensions");return e.data}async getInstalledExtensions(){const{payload:e}=await this.wire.sendAction("get-installed-extensions");return e.data}}c.System=ce;var de={},he={};Object.defineProperty(he,"__esModule",{value:!0}),he.RefCounter=void 0;he.RefCounter=class{constructor(){this.topicRefMap=new Map}incRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t+1;n=i,this.topicRefMap.set(e,i)}else this.topicRefMap.set(e,1),n=1;return n}decRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t-1;this.topicRefMap.set(e,i),n=i}else n=-1;return n}actOnFirst(e,t,n){return 1===this.incRefCount(e)?t():n()}actOnLast(e,t,n){return 0===this.decRefCount(e)?t():n()}};var le={},ue={},pe={};Object.defineProperty(pe,"__esModule",{value:!0}),pe.ChannelBase=pe.ProtectedItems=void 0;const we=e=>async(t,n,i)=>{const r=await e(t,n,i);return void 0===r?n:r};pe.ProtectedItems=class{constructor(e,t){this.providerIdentity=e,this.close=t}};class ye{static defaultAction(e){throw new Error(`No action registered at target for ${e}`)}constructor(){this.subscriptions=new Map}async processAction(e,t,n){try{const i=this.subscriptions.has(e)?this.subscriptions.get(e):(t,n)=>(this.defaultAction??ye.defaultAction)(e,t,n),r=this.preAction?await this.preAction(e,t,n):t,o=await i(r,n);return this.postAction?await this.postAction(e,o,n):o}catch(t){if(this.errorMiddleware)return this.errorMiddleware(e,t,n);throw t}}beforeAction(e){if(this.preAction)throw new Error("Already registered beforeAction middleware");this.preAction=we(e)}onError(e){if(this.errorMiddleware)throw new Error("Already registered error middleware");this.errorMiddleware=e}afterAction(e){if(this.postAction)throw new Error("Already registered afterAction middleware");this.postAction=we(e)}remove(e){this.subscriptions.delete(e)}setDefaultAction(e){if(this.defaultAction)throw new Error("default action can only be set once");this.defaultAction=e}register(e,t){if(this.subscriptions.has(e))throw new Error(`Subscription already registered for action: ${e}. Unsubscribe before adding new subscription`);return this.subscriptions.set(e,t),!0}}pe.ChannelBase=ye;var fe,ge,me,ve=s&&s.__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)},Ce=s&&s.__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};Object.defineProperty(ue,"__esModule",{value:!0}),ue.ChannelClient=void 0;const be=pe,Ie=new Map;class Ee extends be.ChannelBase{static closeChannelByEndpointId(e){const t=Ie.get(e);t&&ve(t,me,"f").call(t)}static handleProviderDisconnect(e){for(const t of Ie.values())t.providerIdentity.channelId===e.channelId&&(t.disconnectListener(e),ve(t,me,"f").call(t))}constructor(e,t,n){super(),fe.set(this,void 0),ge.set(this,void 0),this.processAction=(e,t,n)=>super.processAction(e,t,n),me.set(this,(()=>{Ie.delete(this.endpointId),ve(this,ge,"f").close()})),Ce(this,fe,new be.ProtectedItems(e,t),"f"),this.disconnectListener=()=>{},this.endpointId=e.endpointId,Ce(this,ge,n,"f"),Ie.set(this.endpointId,this),n.receive(this.processAction)}get providerIdentity(){return ve(this,fe,"f").providerIdentity}async dispatch(e,t){if(ve(this,ge,"f").isEndpointConnected(this.providerIdentity.channelId))return ve(this,ge,"f").send(this.providerIdentity.channelId,e,t);throw new Error("The client you are trying to dispatch from is disconnected from the target provider.")}onDisconnection(e){this.disconnectListener=t=>{try{e(t)}catch(e){throw new Error(`Error while calling the onDisconnection callback: ${e.message}`)}finally{this.disconnectListener=()=>{}}}}async disconnect(){await this.sendDisconnectAction(),ve(this,me,"f").call(this)}async sendDisconnectAction(){const e=ve(this,fe,"f");await e.close()}static async wireClose(e,t,n){const{channelName:i,uuid:r,name:o}=t;await e.sendAction("disconnect-from-channel",{channelName:i,uuid:r,name:o,endpointId:n})}}ue.ChannelClient=Ee,fe=new WeakMap,ge=new WeakMap,me=new WeakMap;var xe={},Ae={};Object.defineProperty(Ae,"__esModule",{value:!0}),Ae.exhaustiveCheck=void 0,Ae.exhaustiveCheck=function(e,t){throw new Error(`Unsupported value: ${e}${t?`\n Supported values are: ${t.join("")}`:""}`)};var Pe,Me,_e,Oe={},Se=s&&s.__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},Re=s&&s.__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)};Object.defineProperty(Oe,"__esModule",{value:!0}),Oe.ClassicInfo=Oe.ClassicStrategy=void 0;Oe.ClassicStrategy=class{constructor(e,t,n,i){this.messageReceiver=t,this.endpointId=n,this.providerIdentity=i,Pe.set(this,void 0),Me.set(this,new Map),_e.set(this,new Map),this.send=async(e,t,n)=>{const i=Re(this,Me,"f").get(e);if(!i)throw new Error(`Could not locate routing info for endpoint ${e}`);const r={...i};r.isLocalEndpointId&&delete r.endpointId,delete r.isLocalEndpointId;const o=Re(this,Pe,"f").sendAction("send-channel-message",{...r,providerIdentity:this.providerIdentity,action:t,payload:n});Re(this,_e,"f").get(e)?.add(o);return(await o.catch((e=>{throw new Error(e.message)})).finally((()=>{Re(this,_e,"f").get(e)?.delete(o)}))).payload.data.result},this.close=async()=>{this.messageReceiver.removeEndpoint(this.providerIdentity.channelId,this.endpointId),[...Re(this,Me,"f").keys()].forEach((e=>this.closeEndpoint(e))),Se(this,Me,new Map,"f")},Se(this,Pe,e,"f")}onEndpointDisconnect(e,t){}receive(e){this.messageReceiver.addEndpoint(e,this.providerIdentity.channelId,this.endpointId)}async closeEndpoint(e){const t=Re(this,Me,"f").get(e);Re(this,Me,"f").delete(e);const n=Re(this,_e,"f").get(e);n?.forEach((n=>{const i=`Channel connection with identity uuid: ${t?.uuid} / name: ${t?.name} / endpointId: ${e} no longer connected.`;n.cancel(new Error(i))}))}isEndpointConnected(e){return Re(this,Me,"f").has(e)}addEndpoint(e,t){Re(this,Me,"f").set(e,t.endpointIdentity),Re(this,_e,"f").set(e,new Set)}isValidEndpointPayload(e){return"string"==typeof e?.endpointIdentity?.endpointId||"string"==typeof e?.endpointIdentity?.channelId}},Pe=new WeakMap,Me=new WeakMap,_e=new WeakMap,Oe.ClassicInfo={version:5,minimumVersion:0,type:"classic"};var Fe={},je={},ke={};Object.defineProperty(ke,"__esModule",{value:!0}),ke.errorToPOJO=void 0,ke.errorToPOJO=function(e){return{stack:e.stack,name:e.name,message:e.message,toString:()=>e.stack||e.toString()}};var Le,Te,$e=s&&s.__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)},Be=s&&s.__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};Object.defineProperty(je,"__esModule",{value:!0}),je.RTCEndpoint=void 0;const Ge=ke;je.RTCEndpoint=class{static isValidEndpointPayload(e){const t=e=>"object"==typeof e&&null!==e;return t(e)&&t(e.endpointIdentity)&&t(e.rtc)&&"string"==typeof e.endpointIdentity.endpointId}constructor({rtc:e,endpointIdentity:t}){this.responseMap=new Map,Le.set(this,null),Te.set(this,void 0),this.connectionStateChangeHandler=e=>{"connected"!==this.rtc.rtcClient.connectionState&&(this.rtc.rtcClient.removeEventListener("connectionstatechange",this.connectionStateChangeHandler),this.close(),$e(this,Te,"f")&&$e(this,Te,"f").call(this))},this.send=async(e,t)=>{const n=`message-${Math.random()}`,i=new Promise(((e,t)=>{this.responseMap.set(n,{resolve:e,reject:t})}));return this.rtc.channels.request.send(JSON.stringify({action:e,payload:t,messageId:n})),i},this.close=()=>{this.responseMap.forEach((e=>e.reject("Connection has closed."))),this.responseMap=new Map,this.rtc.channels.request.close(),this.rtc.channels.response.close(),this.rtc.rtcClient.close()},this.rtc=e,this.endpointIdentity=t,this.rtc.channels.response.addEventListener("message",(e=>{let{data:t}=e;e.data instanceof ArrayBuffer&&(t=(new TextDecoder).decode(e.data));const{messageId:n,payload:i,success:r,error:o}=JSON.parse(t),{resolve:s,reject:a}=this.responseMap.get(n)??{};s&&a?(this.responseMap.delete(n),r?s(i):a(o)):(console.log("Could not find id in responseMap."),console.log(e))})),this.rtc.channels.request.addEventListener("message",(async e=>{let{data:n}=e;e.data instanceof ArrayBuffer&&(n=(new TextDecoder).decode(e.data));const{messageId:i,action:r,payload:o}=JSON.parse(n);if($e(this,Le,"f"))try{const e=await $e(this,Le,"f").call(this,r,o,t);this.rtc.channels.response.send(JSON.stringify({messageId:i,payload:e,success:!0}))}catch(e){"open"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,error:(0,Ge.errorToPOJO)(e),success:!1}))}else"open"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,success:!1,error:"Connection not ready."}))})),this.rtc.rtcClient.addEventListener("connectionstatechange",this.connectionStateChangeHandler),Object.values(this.rtc.channels).forEach((e=>{e.onclose=e=>{[...this.responseMap.values()].forEach((e=>e.reject(new Error("RTCDataChannel closed unexpectedly, this is most commonly caused by message size. Note: RTC Channels have a message size limit of ~255kB.")))),this.close(),$e(this,Te,"f")&&$e(this,Te,"f").call(this)}}))}onDisconnect(e){if($e(this,Te,"f"))throw new Error("RTCEndpoint disconnectListener cannot be set twice.");Be(this,Te,e,"f")}receive(e){if($e(this,Le,"f"))throw new Error("You have already set a listener for this RTC Endpoint.");Be(this,Le,e,"f")}get connected(){return"connected"===this.rtc.rtcClient.connectionState}},Le=new WeakMap,Te=new WeakMap;var We,He,Ne,De={},Ue=s&&s.__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)},Ve=s&&s.__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};Object.defineProperty(De,"__esModule",{value:!0}),De.EndpointStrategy=void 0;De.EndpointStrategy=class{constructor(e,t,n){this.EndpointType=e,this.StrategyName=n,We.set(this,null),He.set(this,new Map),Ne.set(this,!0),this.send=async(e,t,n)=>this.getEndpointById(e).send(t,n),this.close=async()=>{Ue(this,Ne,"f")&&(Ue(this,He,"f").forEach((e=>e.close())),Ve(this,He,new Map,"f")),Ve(this,Ne,!1,"f")},this.isValidEndpointPayload=t}onEndpointDisconnect(e,t){this.getEndpointById(e).onDisconnect(t)}receive(e){if(Ue(this,We,"f"))throw new Error(`You have already set a listener for this ${this.StrategyName} Strategy`);Ve(this,We,e,"f"),Ue(this,He,"f").forEach((e=>e.receive(Ue(this,We,"f"))))}getEndpointById(e){const t=Ue(this,He,"f").get(e);if(!t)throw new Error(`Client with endpoint id ${e} is not connected`);return t}get connected(){return Ue(this,Ne,"f")}isEndpointConnected(e){return Ue(this,He,"f").has(e)}addEndpoint(e,t){if(!Ue(this,Ne,"f"))return void console.warn(`Adding endpoint to disconnected ${this.StrategyName} Strategy`);const n=new this.EndpointType(t);Ue(this,We,"f")&&n.receive(Ue(this,We,"f")),Ue(this,He,"f").set(e,n)}async closeEndpoint(e){Ue(this,He,"f").delete(e)}},We=new WeakMap,He=new WeakMap,Ne=new WeakMap,Object.defineProperty(Fe,"__esModule",{value:!0}),Fe.RTCInfo=Fe.RTCStrategy=void 0;const ze=je,Ke=De;class qe extends Ke.EndpointStrategy{constructor(){super(ze.RTCEndpoint,ze.RTCEndpoint.isValidEndpointPayload,"RTC")}}Fe.RTCStrategy=qe,Fe.RTCInfo={version:2,minimumVersion:0,type:"rtc"};var Je={};Object.defineProperty(Je,"__esModule",{value:!0}),Je.RTCICEManager=void 0;const Ye=d;class Ze extends Ye.EmitterBase{constructor(e){super(e,"channel"),this.ensureChannelOpened=e=>new Promise(((t,n)=>{if("open"===e.readyState)t();else if("connecting"===e.readyState){const n=()=>{e.removeEventListener("open",n),t()};e.addEventListener("open",n)}else n(new Error("This Channel has already closed"))}))}static createDataChannelPromise(e,t){let n;const i=new Promise((e=>{n=e})),r=i=>{const o=()=>{i.channel.removeEventListener("open",o),n(i.channel)};i.channel.label===e&&(i.channel.addEventListener("open",o),t.removeEventListener("datachannel",r))};return t.addEventListener("datachannel",r),i}async listenForProviderIce(e,t){await this.on(this.createProviderEventName(e),t,{timestamp:Date.now()})}async raiseProviderIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createProviderEventName(e)),t)}async listenForClientIce(e,t){await this.on(this.createClientEventName(e),t,{timestamp:Date.now()})}async raiseClientIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createClientEventName(e)),t)}cleanupIceListeners(e){this.removeAllListeners(this.createClientEventName(e)),this.removeAllListeners(this.createProviderEventName(e))}createClientEventName(e){return`ice-client-${e}`}createProviderEventName(e){return`ice-provider-${e}`}createRouteString(e){return`channel/${e}`}createRtcPeer(){return this.wire.environment.getRtcPeer()}async startClientOffer(){const e=Math.random().toString(),t=this.createRtcPeer();t.addEventListener("icecandidate",(async t=>{t.candidate&&await this.raiseClientIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForProviderIce(e,(async e=>{await t.addIceCandidate(e.candidate)}));const n={request:t.createDataChannel("request"),response:t.createDataChannel("response")},i=await t.createOffer();await t.setLocalDescription(i);const r=Promise.all([n.request,n.response].map(this.ensureChannelOpened)).then((()=>{}));return{rtcClient:t,channels:n,offer:i,rtcConnectionId:e,channelsOpened:r}}async finishClientOffer(e,t,n){return await e.setRemoteDescription(t),await n,!0}async createProviderAnswer(e,t){const n=this.createRtcPeer(),i=Ze.createDataChannelPromise("request",n),r=Ze.createDataChannelPromise("response",n);n.addEventListener("icecandidate",(async t=>{t.candidate&&await this.raiseProviderIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForClientIce(e,(async e=>{await n.addIceCandidate(e.candidate)})),await n.setRemoteDescription(t);const o=await n.createAnswer();await n.setLocalDescription(o);const s=Promise.all([i,r]).then((([t,n])=>(this.cleanupIceListeners(e),{request:t,response:n})));return{rtcClient:n,answer:o,channels:s}}}Je.RTCICEManager=Ze;var Qe={},Xe={};function et(e){return[...e.split(".").reverse().entries()].reduce(((e,[t,n])=>e+ +n*1e4**t),0)}function tt(e,t){return et(e)>=et(t)}function nt(e){return e.split("/")[0]}Object.defineProperty(Xe,"__esModule",{value:!0}),Xe.runtimeUuidMeetsMinimumRuntimeVersion=Xe.parseRuntimeUuid=Xe.meetsMinimumRuntimeVersion=void 0,Xe.meetsMinimumRuntimeVersion=tt,Xe.parseRuntimeUuid=nt,Xe.runtimeUuidMeetsMinimumRuntimeVersion=function(e,t){return tt(nt(e),t)};var it,rt,ot,st,at,ct=s&&s.__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)},dt=s&&s.__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};Object.defineProperty(Qe,"__esModule",{value:!0}),Qe.ChannelProvider=void 0;const ht=pe,lt=Xe;class ut extends ht.ChannelBase{get connections(){return[...ct(this,it,"f")]}static handleClientDisconnection(e,t){const n=e.connections.find((e=>e.endpointId===t.endpointId));if(n)ct(e,st,"f").call(e,n);else{e.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name)).forEach(ct(e,st,"f"))}e.disconnectListener(t)}static setProviderRemoval(e,t){ut.removalMap.set(e,t)}constructor(e,t,n){super(),it.set(this,void 0),rt.set(this,void 0),ot.set(this,void 0),st.set(this,(e=>{const t=this.connections.filter((t=>t.endpointId!==e.endpointId));ct(this,ot,"f").closeEndpoint(e.endpointId),dt(this,it,t,"f")})),this.processAction=async(e,t,n)=>(ut.clientIsMultiRuntime(n)&&!(0,lt.runtimeUuidMeetsMinimumRuntimeVersion)(n.runtimeUuid,"18.87.56.0")?this.handleMultiRuntimeLegacyClient(n):this.checkForClientConnection(n),super.processAction(e,t,n)),at.set(this,(()=>{ct(this,ot,"f").close();const e=ut.removalMap.get(this);e&&e()})),dt(this,rt,new ht.ProtectedItems(e,t),"f"),this.connectListener=()=>{},this.disconnectListener=()=>{},dt(this,it,[],"f"),dt(this,ot,n,"f"),n.receive(this.processAction)}dispatch(e,t,n){const i=e.endpointId??this.getEndpointIdForOpenFinId(e,t);return i&&ct(this,ot,"f").isEndpointConnected(i)?ct(this,ot,"f").send(i,t,n):Promise.reject(new Error(`Client connection with identity uuid: ${e.uuid} / name: ${e.name} / endpointId: ${i} no longer connected.`))}async processConnection(e,t){return ct(this,it,"f").push(e),this.connectListener(e,t)}publish(e,t){return this.connections.map((n=>ct(this,ot,"f").send(n.endpointId,e,t)))}onConnection(e){this.connectListener=e}onDisconnection(e){this.disconnectListener=e}async destroy(){const e=ct(this,rt,"f");e.providerIdentity,dt(this,it,[],"f"),await e.close(),ct(this,at,"f").call(this)}async getAllClientInfo(){return this.connections.map((e=>{const{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}=e;return{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}}))}checkForClientConnection(e){if(!this.isClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider.\n Client Identity: {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}isClientConnected(e){return ut.clientIdentityIncludesEndpointId(e)?this.connections.some((t=>t.endpointId===e.endpointId&&t.uuid===e.uuid&&t.name===e.name)):this.isLegacyClientConnected(e)}isLegacyClientConnected(e){return this.connections.some((t=>t.uuid===e.uuid&&t.name===e.name))}handleMultiRuntimeLegacyClient(e){if(!this.isLegacyClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider. Client Identity:\n {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}getEndpointIdForOpenFinId(e,t){const n=this.connections.filter((t=>t.name===e.name&&t.uuid===e.uuid));if(n.length>=2){const n=ct(this,rt,"f"),{uuid:i,name:r}=e,o=n?.providerIdentity.uuid,s=n?.providerIdentity.name;console.warn(`WARNING: Dispatch call may have unintended results. The "to" argument of your dispatch call is missing the\n "endpointId" parameter. The identity you are dispatching to ({uuid: ${i}, name: ${r}})\n has multiple channelClients for this channel. Your dispatched action: (${t}) from the provider:\n ({uuid: ${o}, name: ${s}}) will only be processed by the most recently-created client.`)}return n.pop()?.endpointId}static clientIdentityIncludesEndpointId(e){return void 0!==e.endpointId}static clientIsMultiRuntime(e){return void 0!==e.runtimeUuid}static async wireClose(e,t){await e.sendAction("destroy-channel",{channelName:t})}}Qe.ChannelProvider=ut,it=new WeakMap,rt=new WeakMap,ot=new WeakMap,st=new WeakMap,at=new WeakMap,ut.removalMap=new WeakMap;var pt={};Object.defineProperty(pt,"__esModule",{value:!0}),pt.MessageReceiver=void 0;const wt=ue,yt=d;class ft extends yt.Base{constructor(e){super(e),this.onmessage=e=>"process-channel-message"===e.action&&(this.processChannelMessage(e),!0),this.endpointMap=new Map,this.latestEndpointIdByChannelId=new Map,e.registerMessageHandler(this.onmessage.bind(this))}async processChannelMessage(e){const{senderIdentity:t,providerIdentity:n,action:i,ackToSender:r,payload:o,intendedTargetIdentity:s}=e.payload,a=s.channelId??s.endpointId??this.latestEndpointIdByChannelId.get(n.channelId),c=this.endpointMap.get(a);if(!c)return r.payload.success=!1,r.payload.reason=`Client connection with identity uuid: ${this.wire.me.uuid} / name: ${this.wire.me.name} / endpointId: ${a} no longer connected.`,this.wire.sendRaw(r);try{const e=await c(i,o,t);return r.payload.payload=r.payload.payload||{},r.payload.payload.result=e,this.wire.sendRaw(r)}catch(e){return r.payload.success=!1,r.payload.reason=e.message,this.wire.sendRaw(r)}}addEndpoint(e,t,n){this.endpointMap.set(n,e),t!==n&&this.latestEndpointIdByChannelId.set(t,n)}removeEndpoint(e,t){this.endpointMap.delete(t),this.latestEndpointIdByChannelId.get(e)===t&&this.latestEndpointIdByChannelId.delete(e)}checkForPreviousClientConnection(e){const t=this.latestEndpointIdByChannelId.get(e);t&&(wt.ChannelClient.closeChannelByEndpointId(t),console.warn("You have created a second connection to an older provider. First connection has been removed from the clientMap"),console.warn("If the provider calls publish(), you may receive multiple messages."))}}pt.MessageReceiver=ft;var gt={};Object.defineProperty(gt,"__esModule",{value:!0}),gt.ProtocolManager=void 0;gt.ProtocolManager=class{constructor(e){this.ProtocolsInPreferenceOrder=e,this.DefaultClientProtocols=["classic"],this.DefaultProviderProtocols=["classic"],this.getClientProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultClientProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(", ")}.`);return t},this.getProviderProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultProviderProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(", ")}.`);return t},this.getCompatibleProtocols=(e,t)=>t.supportedProtocols.filter((t=>e.some((e=>e.type===t.type&&t.version>=e.minimumVersion&&e.version>=(t.minimumVersion??0))))).slice(0,t.maxProtocols)}};var mt={};Object.defineProperty(mt,"__esModule",{value:!0});class vt{static combine(e,t){return new vt(e,t)}constructor(e,t){this.primary=e,this.secondary=t}onEndpointDisconnect(e,t){this.primary.onEndpointDisconnect(e,(()=>{this.secondary.isEndpointConnected(e)||t()})),this.secondary.onEndpointDisconnect(e,(()=>{this.primary.isEndpointConnected(e)||t()}))}isValidEndpointPayload(e){return this.primary.isValidEndpointPayload(e)||this.secondary.isValidEndpointPayload(e)}async closeEndpoint(e){await this.primary.closeEndpoint(e),await this.secondary.closeEndpoint(e)}isEndpointConnected(e){return this.primary.isEndpointConnected(e)||this.secondary.isEndpointConnected(e)}async addEndpoint(e,t){this.primary.isValidEndpointPayload(t)&&await this.primary.addEndpoint(e,t),this.secondary.isValidEndpointPayload(t)&&await this.secondary.addEndpoint(e,t)}receive(e){this.primary.receive(e),this.secondary.receive(e)}send(e,t,n){return this.primary.isEndpointConnected(e)?this.primary.send(e,t,n):this.secondary.send(e,t,n)}async close(){await Promise.all([this.primary.close(),this.secondary.close()])}}mt.default=vt;var Ct,bt,It=s&&s.__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},Et=s&&s.__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)},xt=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(xe,"__esModule",{value:!0}),xe.ConnectionManager=void 0;const At=Ae,Pt=d,Mt=Oe,_t=Fe,Ot=Je,St=Qe,Rt=pt,Ft=gt,jt=xt(mt);class kt extends Pt.Base{static getProtocolOptionsFromStrings(e){return e.map((e=>{switch(e){case"rtc":return _t.RTCInfo;case"classic":return Mt.ClassicInfo;default:return(0,At.exhaustiveCheck)(e,["rtc","classic"])}}))}constructor(e){super(e),Ct.set(this,void 0),bt.set(this,void 0),this.removeChannelFromProviderMap=e=>{this.providerMap.delete(e)},this.onmessage=e=>"process-channel-connection"===e.action&&(this.processChannelConnection(e),!0),this.providerMap=new Map,this.protocolManager=new Ft.ProtocolManager("node"===this.wire.environment.type?["classic"]:["rtc","classic"]),It(this,Ct,new Rt.MessageReceiver(e),"f"),It(this,bt,new Ot.RTCICEManager(e),"f"),e.registerMessageHandler(this.onmessage.bind(this))}createProvider(e,t){const n=Object.assign(this.wire.environment.getDefaultChannelOptions().create,e||{}),i=this.protocolManager.getProviderProtocols(n?.protocols),r=i.map((e=>{switch(e){case"rtc":return new _t.RTCStrategy;case"classic":return new Mt.ClassicStrategy(this.wire,Et(this,Ct,"f"),t.channelId,t);default:return(0,At.exhaustiveCheck)(e,["rtc","classic"])}}));let o;if(2===r.length){const[e,t]=r;o=jt.default.combine(e,t)}else{if(1!==r.length)throw new Error("failed to combine strategies");[o]=r}const s=new St.ChannelProvider(t,(()=>St.ChannelProvider.wireClose(this.wire,t.channelName)),o),a=t.channelId;return this.providerMap.set(a,{provider:s,strategy:o,supportedProtocols:kt.getProtocolOptionsFromStrings(i)}),St.ChannelProvider.setProviderRemoval(s,this.removeChannelFromProviderMap.bind(this)),s}async createClientOffer(e){const t=this.protocolManager.getClientProtocols(e?.protocols);let n;return{offer:{supportedProtocols:await Promise.all(t.map((async e=>{switch(e){case"rtc":{const{rtcClient:e,channels:t,offer:i,rtcConnectionId:r,channelsOpened:o}=await Et(this,bt,"f").startClientOffer();return n={rtcClient:e,channels:t,channelsOpened:o},{type:"rtc",version:_t.RTCInfo.version,payload:{offer:i,rtcConnectionId:r}}}case"classic":return{type:"classic",version:Mt.ClassicInfo.version};default:return(0,At.exhaustiveCheck)(e,["rtc","classic"])}}))),maxProtocols:2},rtc:n}}async createClientStrategy(e,t){t.endpointId||(t.endpointId=this.wire.environment.getNextMessageId(),Et(this,Ct,"f").checkForPreviousClientConnection(t.channelId));const n=t.answer??{supportedProtocols:[{type:"classic",version:1}]},i=(await Promise.all(n.supportedProtocols.map((async n=>"rtc"===n.type&&e?(await Et(this,bt,"f").finishClientOffer(e.rtcClient,n.payload.answer,e.channelsOpened),new _t.RTCStrategy):"classic"===n.type?new Mt.ClassicStrategy(this.wire,Et(this,Ct,"f"),t.endpointId,t):null)))).filter((e=>null!==e));let r;if(e&&!i.some((e=>e instanceof _t.RTCStrategy))&&e&&e.rtcClient.close(),i.length>=2)r=jt.default.combine(i[0],i[1]);else{if(!i.length)throw new Error("No compatible protocols");[r]=i}const o={endpointIdentity:t,rtc:e};return r.addEndpoint(t.channelId,o),r}async processChannelConnection(e){const{clientIdentity:t,providerIdentity:n,ackToSender:i,payload:r,offer:o}=e.payload;t.endpointId?t.isLocalEndpointId=!1:(t.endpointId=this.wire.environment.getNextMessageId(),t.isLocalEndpointId=!0);const s=n.channelId,a=this.providerMap.get(s);if(!a)return i.payload.success=!1,i.payload.reason=`Channel "${n.channelName}" has been destroyed.`,this.wire.sendRaw(i);const{provider:c,strategy:d,supportedProtocols:h}=a;try{if(!(c instanceof St.ChannelProvider))throw Error("Cannot connect to a channel client");const e=o??{supportedProtocols:[{type:"classic",version:1}],maxProtocols:1},n=this.protocolManager.getCompatibleProtocols(h,e);if(!n.length)throw new Error("This provider does not support any of the offered protocols.");const s=await c.processConnection(t,r);i.payload.payload=i.payload.payload||{};let a={supportedProtocols:[],endpointPayloadPromise:Promise.resolve({endpointIdentity:t})};return a=await n.reduce((async(e,t)=>{const n=await e;if("rtc"===t.type){const{answer:e,rtcClient:i,channels:r}=await Et(this,bt,"f").createProviderAnswer(t.payload.rtcConnectionId,t.payload.offer);n.supportedProtocols.push({type:"rtc",version:_t.RTCInfo.version,payload:{answer:e}}),n.endpointPayloadPromise=n.endpointPayloadPromise.then((e=>r.then((t=>({...e,rtc:{rtcClient:i,channels:t}})))))}else n.supportedProtocols.push({type:"classic",version:Mt.ClassicInfo.version});return n}),Promise.resolve(a)),a.endpointPayloadPromise.then((e=>d.addEndpoint(t.endpointId,e))),i.payload.payload.result=s,i.payload.payload.answer=a,this.wire.sendRaw(i)}catch(e){return i.payload.success=!1,i.payload.reason=e.message,this.wire.sendRaw(i)}}}xe.ConnectionManager=kt,Ct=new WeakMap,bt=new WeakMap;var Lt,Tt,$t,Bt=s&&s.__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},Gt=s&&s.__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)};Object.defineProperty(le,"__esModule",{value:!0}),le.Channel=void 0;const Wt=t,Ht=G,Nt=d,Dt=ue,Ut=xe,Vt=Qe;function zt(e){const t=Math.floor(e/10),n=Math.min(3e4,500*2**t);return new Promise((e=>{setTimeout((()=>{e(!1)}),n)}))}class Kt extends Nt.EmitterBase{constructor(e){super(e,"channel"),Lt.set(this,void 0),Tt.set(this,new Wt.EventEmitter),$t.set(this,new Ht.AsyncRetryableLazy((async()=>{await Promise.all([this.on("disconnected",(e=>{Dt.ChannelClient.handleProviderDisconnect(e)})),this.on("connected",((...e)=>{Gt(this,Tt,"f").emit("connected",...e)}))]).catch((()=>new Error("error setting up channel connection listeners")))}))),Bt(this,Lt,new Ut.ConnectionManager(e),"f")}async getAllChannels(){return this.wire.sendAction("get-all-channels").then((({payload:e})=>e.data))}async onChannelConnect(e){await this.on("connected",e)}async onChannelDisconnect(e){await this.on("disconnected",e)}async safeConnect(e,t,n){const i={count:0};do{let r=()=>{};const o=new Promise((t=>{r=n=>{e===n.channelName&&t(!0)},Gt(this,Tt,"f").on("connected",r)}));try{if(i.count>0){i.gotConnectedEvent=await Promise.race([zt(i.count),o]);const t=await this.wire.sendAction("connect-to-channel",{...n,retryInfo:i});return console.log(`Successfully connected to channelName: ${e}`),t.payload.data}const t=this.wire.sendAction("connect-to-channel",n);i.originalMessageId=t.messageId;return(await t).payload.data}catch(n){if(!n.message.includes("internal-nack"))throw n;t&&0===i.count&&console.warn(`No channel found for channelName: ${e}. Waiting for connection...`)}finally{i.count+=1,Gt(this,Tt,"f").removeListener("connected",r)}}while(t);throw new Error(`No channel found for channelName: ${e}.`)}async connect(e,t={}){if(await Gt(this,$t,"f").getValue(),!e||"string"!=typeof e)throw new Error("Please provide a channelName string to connect to a channel.");const n={wait:!0,...this.wire.environment.getDefaultChannelOptions().connect,...t},{offer:i,rtc:r}=await Gt(this,Lt,"f").createClientOffer(n);let o;(this.fin.me.isFrame||this.fin.me.isView||this.fin.me.isWindow)&&(o=(await this.fin.me.getInfo()).url);const s={channelName:e,...n,offer:i,connectionUrl:o},a=await this.safeConnect(e,n.wait,s),c=await Gt(this,Lt,"f").createClientStrategy(r,a),d=new Dt.ChannelClient(a,(()=>Dt.ChannelClient.wireClose(this.wire,a,a.endpointId)),c);return c.onEndpointDisconnect(a.channelId,(async()=>{try{await d.sendDisconnectAction()}catch(e){console.warn(`Something went wrong during disconnect for client with uuid: ${a.uuid} / name: ${a.name} / endpointId: ${a.endpointId}.`)}finally{Dt.ChannelClient.handleProviderDisconnect(a)}})),d}async create(e,t){if(!e)throw new Error("Please provide a channelName to create a channel");const{payload:{data:n}}=await this.wire.sendAction("create-channel",{channelName:e}),i=Gt(this,Lt,"f").createProvider(t,n);return this.on("client-disconnected",(t=>{t.channelName===e&&Vt.ChannelProvider.handleClientDisconnection(i,t)})),i}}le.Channel=Kt,Lt=new WeakMap,Tt=new WeakMap,$t=new WeakMap,Object.defineProperty(de,"__esModule",{value:!0}),de.InterAppPayload=de.InterApplicationBus=void 0;const qt=t,Jt=d,Yt=he,Zt=le,Qt=O;class Xt extends Jt.Base{constructor(e){super(e),this.events={subscriberAdded:"subscriber-added",subscriberRemoved:"subscriber-removed"},this.refCounter=new Yt.RefCounter,this.Channel=new Zt.Channel(e),this.emitter=new qt.EventEmitter,e.registerMessageHandler(this.onmessage.bind(this)),this.on=this.emitter.on.bind(this.emitter),this.removeAllListeners=this.emitter.removeAllListeners.bind(this.emitter)}async publish(e,t){await this.wire.sendAction("publish-message",{topic:e,message:t,sourceWindowName:this.me.name})}async send(e,t,n){const i=(0,Qt.validateIdentity)(e);if(i)throw new Error(i);await this.wire.sendAction("send-message",{destinationUuid:e.uuid,destinationWindowName:e.name,topic:t,message:n,sourceWindowName:this.me.name})}subscribe(e,t,n){const i=this.createSubscriptionKey(e.uuid,e.name||"*",t);return this.emitter.on(i,n),this.refCounter.actOnFirst(i,(async()=>{await this.wire.sendAction("subscribe",{sourceUuid:e.uuid,sourceWindowName:e.name||"*",topic:t,destinationWindowName:this.me.name})}),(()=>Promise.resolve()))}unsubscribe(e,t,n){const i=e.name||"*",r=this.createSubscriptionKey(e.uuid,i,t);return this.emitter.removeListener(r,n),this.refCounter.actOnLast(r,(async()=>{await this.wire.sendAction("unsubscribe",{sourceUuid:e.uuid,sourceWindowName:i,topic:t,destinationWindowName:this.me.name})}),(()=>new Promise((e=>e)).then((()=>{}))))}processMessage(e){const{payload:{message:t,sourceWindowName:n,sourceUuid:i,topic:r}}=e,o=[this.createSubscriptionKey(i,n,r),this.createSubscriptionKey(i,"*",r),this.createSubscriptionKey("*","*",r)],s={uuid:i,name:n};o.forEach((e=>{this.emitter.emit(e,t,s)}))}emitSubscriverEvent(e,t){const{payload:{targetName:n,uuid:i,topic:r}}=t,o={name:n,uuid:i,topic:r};this.emitter.emit(e,o)}createSubscriptionKey(e,t,n){const i=t||"*";if(!(e&&i&&n))throw new Error("Missing uuid, name, or topic string");return function(...e){return e.map((e=>Buffer.from(`${e}`).toString("base64"))).join("/")}(e,i,n)}onmessage(e){const{action:t}=e;switch(t){case"process-message":this.processMessage(e);break;case this.events.subscriberAdded:this.emitSubscriverEvent(this.events.subscriberAdded,e);break;case this.events.subscriberRemoved:this.emitSubscriverEvent(this.events.subscriberRemoved,e)}return!0}}de.InterApplicationBus=Xt;de.InterAppPayload=class{};var en={};Object.defineProperty(en,"__esModule",{value:!0}),en.Clipboard=void 0;const tn=d;class nn extends tn.Base{async writeText(e){await this.wire.sendAction("clipboard-write-text",e)}async readText(e){const{payload:t}=await this.wire.sendAction("clipboard-read-text",{type:e});return t.data}async writeImage(e){await this.wire.sendAction("clipboard-write-image",e)}async readImage(e={format:"dataURL"}){const{payload:t}=await this.wire.sendAction("clipboard-read-image",e);return t.data}async writeHtml(e){await this.wire.sendAction("clipboard-write-html",e)}async readHtml(e){const{payload:t}=await this.wire.sendAction("clipboard-read-html",{type:e});return t.data}async writeRtf(e){await this.wire.sendAction("clipboard-write-rtf",e)}async readRtf(e){const{payload:t}=await this.wire.sendAction("clipboard-read-rtf",{type:e});return t.data}async write(e){await this.wire.sendAction("clipboard-write",e)}async getAvailableFormats(e){const{payload:t}=await this.wire.sendAction("clipboard-read-formats",{type:e});return t.data}}en.Clipboard=nn;var rn={},on={},sn={};Object.defineProperty(sn,"__esModule",{value:!0}),sn.ExternalApplication=void 0;const an=d;class cn extends an.EmitterBase{constructor(e,t){super(e,"external-application",t.uuid),this.identity=t}getInfo(){return this.wire.sendAction("get-external-application-info",this.identity).then((({payload:e})=>e.data))}}sn.ExternalApplication=cn,Object.defineProperty(on,"__esModule",{value:!0}),on.ExternalApplicationModule=void 0;const dn=d,hn=sn;class ln extends dn.Base{wrap(e){return this.wire.sendAction("external-application-wrap").catch((e=>{})),Promise.resolve(new hn.ExternalApplication(this.wire,{uuid:e}))}wrapSync(e){return this.wire.sendAction("external-application-wrap-sync").catch((e=>{})),new hn.ExternalApplication(this.wire,{uuid:e})}}on.ExternalApplicationModule=ln,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(on,e),n(sn,e)}(rn);var un={},pn={},wn={};Object.defineProperty(wn,"__esModule",{value:!0}),wn._Frame=void 0;const yn=d;class fn extends yn.EmitterBase{constructor(e,t){super(e,"frame",t.uuid,t.name),this.identity=t}getInfo(){return this.wire.sendAction("get-frame-info",this.identity).then((({payload:e})=>e.data))}getParentWindow(){return this.wire.sendAction("get-parent-window",this.identity).then((({payload:e})=>e.data))}}wn._Frame=fn,Object.defineProperty(pn,"__esModule",{value:!0}),pn._FrameModule=void 0;const gn=d,mn=O,vn=wn;class Cn extends gn.Base{async wrap(e){this.wire.sendAction("frame-wrap").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}wrapSync(e){this.wire.sendAction("frame-wrap-sync").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}getCurrent(){return this.wire.sendAction("frame-get-current").catch((e=>{})),Promise.resolve(new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity()))}getCurrentSync(){return this.wire.sendAction("frame-get-current-sync").catch((e=>{})),new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity())}}pn._FrameModule=Cn,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(pn,e),n(wn,e)}(un);var bn={};Object.defineProperty(bn,"__esModule",{value:!0}),bn.GlobalHotkey=void 0;const In=d;class En extends In.EmitterBase{constructor(e){super(e,"global-hotkey")}async register(e,t){await this.on(e,t),await this.wire.sendAction("global-hotkey-register",{hotkey:e})}async unregister(e){await this.removeAllListeners(e),await this.wire.sendAction("global-hotkey-unregister",{hotkey:e})}async unregisterAll(){await Promise.all(this.eventNames().filter((e=>!("registered"===e||"unregistered"===e))).map((e=>this.removeAllListeners(e)))),await this.wire.sendAction("global-hotkey-unregister-all",{})}async isRegistered(e){const{payload:{data:t}}=await this.wire.sendAction("global-hotkey-is-registered",{hotkey:e});return t}}bn.GlobalHotkey=En;var xn,An={},Pn={},Mn={},_n=s&&s.__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)};Object.defineProperty(Mn,"__esModule",{value:!0}),Mn.Platform=void 0;const On=d,Sn=O,Rn=new Map;class Fn extends On.EmitterBase{constructor(e,t){super(t.wire,"application",e.uuid),this.getClient=e=>{this.wire.sendAction("platform-get-client",this.identity).catch((e=>{}));const t=e||this.identity,{uuid:n}=t;if(!Rn.has(n)){const e=_n(this,xn,"f").call(this,n);Rn.set(n,e)}return Rn.get(n)},xn.set(this,(async e=>{try{const t=`custom-frame-${e}`,n=await this._channel.connect(t,{wait:!1});return n.onDisconnection((()=>{Rn.delete(e)})),n}catch(t){throw Rn.delete(e),new Error("The targeted Platform is not currently running. Listen for application-started event for the given Uuid.")}})),this.launchLegacyManifest=this.launchContentManifest;const n=(0,Sn.validateIdentity)(e);if(n)throw new Error(n);this._channel=t,this.identity={uuid:e.uuid},this.Layout=this.fin.Platform.Layout,this.Application=this.fin.Application.wrapSync(this.identity)}async createView(e,t,n){this.wire.sendAction("platform-create-view",this.identity).catch((e=>{}));const i=await this.getClient(),r=await i.dispatch("create-view",{target:t,opts:e,targetView:n});if(!r||(0,Sn.validateIdentity)(r.identity))throw new Error(`When overwriting the createView call, please return an object that has a valid 'identity' property: ${JSON.stringify(r)}`);return this.fin.View.wrapSync(r.identity)}async createWindow(e){this.wire.sendAction("platform-create-window",this.identity).catch((e=>{}));const t=await this.getClient();e.reason||(e.reason="api-call");const n=await t.dispatch("create-view-container",e);if(!n||(0,Sn.validateIdentity)(n.identity))throw new Error(`When overwriting the createWindow call, please return an object that has a valid 'identity' property: ${JSON.stringify(n)}`);const{identity:i}=n,r=this.fin.Window.wrapSync(i);return r.name=i.name,r.uuid=i.uuid,r}async quit(){this.wire.sendAction("platform-quit",this.identity).catch((e=>{}));return(await this.getClient()).dispatch("quit")}async closeView(e){this.wire.sendAction("platform-close-view",this.identity).catch((e=>{}));const t=await this.getClient();await t.dispatch("close-view",{view:e})}async reparentView(e,t){console.warn("Platform.reparentView has been deprecated, please use Platform.createView"),this.wire.sendAction("platform-reparent-view",this.identity).catch((e=>{}));const n={...e,uuid:e.uuid??this.identity.uuid},i=await this.fin.View.wrap(n),r=await i.getOptions();return this.createView(r,t)}async getSnapshot(){this.wire.sendAction("platform-get-snapshot",this.identity).catch((e=>{}));return(await this.getClient()).dispatch("get-snapshot")}async getViewSnapshot(e){return(await this.getClient()).dispatch("get-view-snapshot",{viewIdentity:e})}async applySnapshot(e,t){this.wire.sendAction("platform-apply-snapshot",this.identity).catch((e=>{}));const n="Requested snapshot must be a valid Snapshot object, or a url or filepath to such an object.";let i;if("string"==typeof e)try{i=(await this._channel.wire.sendAction("get-application-manifest",{manifestUrl:e})).payload.data}catch(e){throw new Error(`${n}: ${e}`)}else i=e;if(!i.windows)throw new Error(n);const r=await this.getClient();return await r.dispatch("apply-snapshot",{snapshot:i,options:t}),this}async fetchManifest(e){return(await this.getClient()).dispatch("platform-fetch-manifest",{manifestUrl:e})}async launchContentManifest(e){this.wire.sendAction("platform-launch-content-manifest",this.identity).catch((()=>{}));const t=await this.getClient(),n=await this.fetchManifest(e);return t.dispatch("launch-into-platform",{manifest:n,manifestUrl:e}),this}async setWindowContext(e={},t){if(this.wire.sendAction("platform-set-window-context",this.identity).catch((e=>{})),!e)throw new Error("Please provide a serializable object or string to set the context.");const n=await this.getClient(),{entityType:i}=t?await this.fin.System.getEntityInfo(t.uuid,t.name):this.fin.me;await n.dispatch("set-window-context",{context:e,entityType:i,target:t||{uuid:this.fin.me.uuid,name:this.fin.me.name}})}async getWindowContext(e){this.wire.sendAction("platform-get-window-context",this.identity).catch((e=>{}));const t=await this.getClient(),{entityType:n}=e?await this.fin.System.getEntityInfo(e.uuid,e.name):this.fin.me;return t.dispatch("get-window-context",{target:e||{uuid:this.fin.me.uuid,name:this.fin.me.name},entityType:n})}async closeWindow(e,t={skipBeforeUnload:!1}){this.wire.sendAction("platform-close-window",this.identity).catch((e=>{}));return(await this.getClient()).dispatch("close-window",{windowId:e,options:t})}}Mn.Platform=Fn,xn=new WeakMap;var jn={},kn={},Ln={},Tn={};function $n(e){switch(e){case"columns":case"grid":case"rows":case"tabs":return!0;default:return!1}}Object.defineProperty(Tn,"__esModule",{value:!0}),Tn.overrideFromComposables=Tn.isValidPresetType=void 0,Tn.isValidPresetType=$n,Tn.overrideFromComposables=function(...e){return t=>e.reduceRight(((e,t)=>n=>t(e(n))),(e=>e))(t)},Tn.default={isValidPresetType:$n};var Bn={},Gn={},Wn={};Object.defineProperty(Wn,"__esModule",{value:!0}),Wn.ApiConsumer=void 0;Wn.ApiConsumer=class{constructor(e){this.strategy=e,this.consume=async e=>(await this.strategy.getExposedFunctions(e)).reduce(((t,n)=>({...t,[n.key]:this.strategy.createFunction(n,e)})),{})}};var Hn={},Nn={};Object.defineProperty(Nn,"__esModule",{value:!0}),Nn.expose=Nn.getExposedProperties=void 0;const Dn=Symbol("exposedProperties");Nn.getExposedProperties=e=>e[Dn]||e.prototype[Dn]||[];Nn.expose=e=>(t,n,i)=>{t[Dn]=t[Dn]||[],t[Dn].push({key:n,descriptor:i,options:e})},Object.defineProperty(Hn,"__esModule",{value:!0}),Hn.ApiExposer=void 0;const Un=Nn;Hn.ApiExposer=class{constructor(e){this.strategy=e,this.exposeInstance=async(e,t)=>{const n=(0,Un.getExposedProperties)(e),i=await Promise.all(n.map((async({key:n,options:i})=>({key:n,options:await this.strategy.exposeFunction(e[n].bind(e),{key:n,options:i,meta:t})}))));await this.strategy.exposeMeta(t,i)}}};var Vn={},zn={},Kn={};Object.defineProperty(Kn,"__esModule",{value:!0}),Kn.ChannelsConsumer=void 0;Kn.ChannelsConsumer=class{constructor(e){this.channel=e,this.getExposedFunctions=async e=>{const{id:t}=e,{props:n}=await this.channel.dispatch(`api-meta:${t}`);return n},this.createFunction=e=>(...t)=>{const{action:n}=e.options;return this.channel.dispatch(n,{args:t})}}};var qn={};Object.defineProperty(qn,"__esModule",{value:!0}),qn.ChannelsExposer=void 0;qn.ChannelsExposer=class{constructor(e){this.channelProviderOrClient=e,this.exposeFunction=async(e,t)=>{const{key:n,options:i,meta:r}=t,{id:o}=r,s=`${o}.${i?.action||n}`;return await this.channelProviderOrClient.register(s,(async({args:t})=>e(...t))),{action:s}},this.exposeMeta=async({id:e},t)=>{const n=`api-meta:${e}`;await this.channelProviderOrClient.register(n,(()=>({props:t})))}}},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Kn,e),n(qn,e)}(zn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(zn,e)}(Vn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Wn,e),n(Hn,e),n(Vn,e),n(Nn,e)}(Gn);var Jn={};Object.defineProperty(Jn,"__esModule",{value:!0}),Jn.createRelayedDispatch=exports.relayChannelClientApi_1=Jn.relayChannelClientApi=void 0;const Yn=["no longer connected","RTCDataChannel closed unexpectedly","The client you are trying to dispatch from is disconnected from the target provider"];exports.relayChannelClientApi_1=Jn.relayChannelClientApi=async(e,t)=>{e.register(`relay:${t}`,(({action:t,target:n,payload:i})=>e.dispatch(n,t,i))),await Promise.resolve()};Jn.createRelayedDispatch=(e,t,n,i)=>async(r,o)=>{try{return await e.dispatch(`relay:${n}`,{action:r,payload:o,target:t})}catch(e){if(s=e.message,Yn.some((e=>s.includes(e)))&&i)throw new Error(i);throw e}var s};var Zn,Qn,Xn,ei=s&&s.__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},ti=s&&s.__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)};Object.defineProperty(Bn,"__esModule",{value:!0}),Bn.ColumnOrRow=Bn.TabStack=Bn.LayoutNode=void 0;const ni=Gn,ii=Jn;class ri{constructor(e,t){Zn.set(this,void 0),this.isRoot=()=>ti(this,Zn,"f").isRoot(this.entityId),this.exists=()=>ti(this,Zn,"f").exists(this.entityId),this.getParent=async()=>{const e=await ti(this,Zn,"f").getParent(this.entityId);if(e)return ri.getEntity(e,ti(this,Zn,"f"))},this.createAdjacentStack=async(e,t)=>{const n=await ti(this,Zn,"f").createAdjacentStack(this.entityId,e,t);return ri.getEntity({entityId:n,type:"stack"},ti(this,Zn,"f"))},this.getAdjacentStacks=async e=>(await ti(this,Zn,"f").getAdjacentStacks({targetId:this.entityId,edge:e})).map((e=>ri.getEntity({type:"stack",entityId:e.entityId},ti(this,Zn,"f")))),ei(this,Zn,e,"f"),this.entityId=t}}Bn.LayoutNode=ri,Zn=new WeakMap,ri.newLayoutEntitiesClient=async(e,t,n)=>{const i=(0,ii.createRelayedDispatch)(e,n,"layout-relay","You are trying to interact with a layout component on a window that does not exist or has been destroyed.");return new ni.ApiConsumer(new ni.ChannelsConsumer({dispatch:i})).consume({id:t})},ri.getEntity=(e,t)=>{const{entityId:n,type:i}=e;switch(i){case"column":case"row":return new si(t,n,i);case"stack":return new oi(t,n);default:throw new Error(`Unrecognised Layout Entity encountered ('${JSON.stringify(e)})`)}};class oi extends ri{constructor(e,t){super(e,t),Qn.set(this,void 0),this.type="stack",this.getViews=()=>ti(this,Qn,"f").getStackViews(this.entityId),this.addView=async(e,t={index:0})=>ti(this,Qn,"f").addViewToStack(this.entityId,e,t),this.removeView=async e=>{await ti(this,Qn,"f").removeViewFromStack(this.entityId,e)},this.setActiveView=async e=>{await ti(this,Qn,"f").setStackActiveView(this.entityId,e)},ei(this,Qn,e,"f")}}Bn.TabStack=oi,Qn=new WeakMap;class si extends ri{constructor(e,t,n){super(e,t),Xn.set(this,void 0),this.getContent=async()=>(await ti(this,Xn,"f").getContent(this.entityId)).map((e=>ri.getEntity(e,ti(this,Xn,"f")))),ei(this,Xn,e,"f"),this.type=n}}Bn.ColumnOrRow=si,Xn=new WeakMap;var ai={};Object.defineProperty(ai,"__esModule",{value:!0}),ai.DEFAULT_LAYOUT_KEY=ai.LAYOUT_CONTROLLER_ID=void 0,ai.LAYOUT_CONTROLLER_ID="layout-entities",ai.DEFAULT_LAYOUT_KEY="__default__";var ci,di,hi,li=s&&s.__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)};Object.defineProperty(Ln,"__esModule",{value:!0}),Ln.Layout=void 0;const ui=G,pi=O,wi=d,yi=Tn,fi=Bn,gi=ai;class mi extends wi.Base{static getClient(e){return li(e,di,"f").getValue()}constructor(e,t){super(t),ci.add(this),di.set(this,new ui.Lazy((async()=>fi.LayoutNode.newLayoutEntitiesClient(await this.platform.getClient(),gi.LAYOUT_CONTROLLER_ID,this.identity)))),this.replace=async e=>{this.wire.sendAction("layout-replace").catch((e=>{}));const t=await this.platform.getClient();await t.dispatch("replace-layout",{target:this.identity,opts:{layout:e}})},this.replaceView=async(e,t)=>{this.wire.sendAction("layout-replace-view").catch((e=>{}));const n=await this.platform.getClient();await n.dispatch("replace-view",{target:this.identity,opts:{viewToReplace:e,newView:t}})},this.applyPreset=async e=>{this.wire.sendAction("layout-apply-preset").catch((e=>{}));const t=await this.platform.getClient(),{presetType:n}=e;if(!n||!(0,yi.isValidPresetType)(n))throw new Error("Cannot apply preset layout, please include an applicable presetType property in the PresetLayoutOptions.");await t.dispatch("apply-preset-layout",{target:this.identity,opts:{presetType:n}})};const n=(0,pi.validateIdentity)(e);if(n)throw new Error(n);this.identity=e,this.platform=this.fin.Platform.wrapSync({uuid:e.uuid}),e.uuid===this.fin.me.uuid&&e.name===this.fin.me.name&&(this.init=this.fin.Platform.Layout.init)}async getConfig(){this.wire.sendAction("layout-get-config").catch((e=>{}));return(await this.platform.getClient()).dispatch("get-frame-snapshot",{target:this.identity})}async getCurrentViews(){this.wire.sendAction("layout-get-views").catch((e=>{}));const e=await this.platform.getClient();return(await e.dispatch("get-layout-views",{target:this.identity})).map((e=>this.fin.View.wrapSync(e)))}async getRootItem(){this.wire.sendAction("layout-get-root-item").catch((()=>{}));const e=await li(this,di,"f").getValue(),t=await e.getRoot("layoutName"in this.identity?this.identity:void 0);return fi.LayoutNode.getEntity(t,e)}async getStackByViewIdentity(e){this.wire.sendAction("layout-get-stack-by-view").catch((()=>{}));const t=await li(this,di,"f").getValue(),n=await t.getStackByView(e);if(!n)throw new Error(`No stack found for view: ${e.uuid}/${e.name}`);return fi.LayoutNode.getEntity(n,t)}async addView(e,{location:t,targetView:n}={}){this.wire.sendAction("layout-add-view").catch((e=>{}));const{identity:i}=await li(this,ci,"m",hi).call(this,"layout-add-view",{viewOptions:e,location:t,targetView:n});return{identity:i}}async closeView(e){this.wire.sendAction("layout-close-view").catch((e=>{})),await li(this,ci,"m",hi).call(this,"layout-close-view",{viewIdentity:e})}}Ln.Layout=mi,di=new WeakMap,ci=new WeakSet,hi=async function(e,t){return(await this.platform.getClient()).dispatch(e,{target:this.identity,opts:t})};var vi,Ci,bi,Ii,Ei,xi=s&&s.__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)},Ai=s&&s.__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};Object.defineProperty(kn,"__esModule",{value:!0}),kn.LayoutModule=void 0;const Pi=d,Mi=Ln,_i=ai;class Oi extends Pi.Base{constructor(){super(...arguments),vi.add(this),Ci.set(this,!1),bi.set(this,null),this.init=async(e={})=>{if(this.wire.sendAction("layout-init").catch((e=>{})),!this.wire.environment.layoutAllowedInContext(this.fin))throw new Error("Layout.init can only be called from a Window context.");if(xi(this,Ci,"f"))throw new Error("Layout.init was already called, please use Layout.create to add additional layouts.");"openfin"===this.wire.environment.type&&await this.fin.Platform.getCurrentSync().getClient(),Ai(this,Ci,!0,"f"),Ai(this,bi,await this.wire.environment.initLayoutManager(this.fin,this.wire,e),"f"),await this.wire.environment.applyLayoutSnapshot(this.fin,xi(this,bi,"f"),e);const t={name:this.fin.me.name,uuid:this.fin.me.uuid};if(!e.layoutManagerOverride){const e={layoutName:_i.DEFAULT_LAYOUT_KEY,...t};return xi(this,Ii,"f").call(this,e)}return this.wrapSync(t)},Ii.set(this,(e=>{const t="[Layout] You are using a deprecated property `layoutManager` - it will throw if you access it starting in v37.",n=new Proxy({},{get(e,n){throw console.warn(`[Layout-mgr-proxy] accessing ${n.toString()}`),new Error(t)}}),i=Object.assign(this.wrapSync(e),{layoutManager:n});return new Proxy(i,{get(e,n){if("layoutManager"===n)throw console.warn(`[Layout-proxy] accessing ${n.toString()}`),new Error(t);return e[n]}})})),this.getCurrentLayoutManagerSync=()=>xi(this,vi,"m",Ei).call(this,"fin.Platform.Layout.getCurrentLayoutManagerSync()"),this.create=async e=>this.wire.environment.createLayout(xi(this,vi,"m",Ei).call(this,"fin.Platform.Layout.create()"),e),this.destroy=async e=>this.wire.environment.destroyLayout(xi(this,vi,"m",Ei).call(this,"fin.Platform.Layout.destroy()"),e)}async wrap(e){return this.wire.sendAction("layout-wrap").catch((e=>{})),new Mi.Layout(e,this.wire)}wrapSync(e){return this.wire.sendAction("layout-wrap-sync").catch((e=>{})),new Mi.Layout(e,this.wire)}async getCurrent(){if(this.wire.sendAction("layout-get-current").catch((e=>{})),"openfin"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error("You are not in a Window context. Only Windows can have a Layout.");const{uuid:e,name:t}=this.fin.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction("layout-get-current-sync").catch((e=>{})),"openfin"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error("You are not in a Window context. Only Windows can have a Layout.");const{uuid:e,name:t}=this.fin.me;return this.wrapSync({uuid:e,name:t})}async getLayoutByViewIdentity(e){this.wire.sendAction("layout-get-by-view-identity").catch((()=>{}));let t=await this.wire.environment.getViewWindowIdentity(this.fin,e);t.identity&&(t=t.identity);try{const n=this.wrapSync(t),i=await Mi.Layout.getClient(n),r=await i.getLayoutIdentityForViewOrThrow(e);return this.wrapSync(r)}catch(n){if(!["No action registered at target for","getLayoutIdentityForViewOrThrow is not a function"].some((e=>n.message.includes(e))))throw n;if(t.uuid===t.name)throw new Error(`View identity ${JSON.stringify(e)} is not attached to any layout in provider window ${JSON.stringify(t)}.`);return this.wrapSync(t)}}}kn.LayoutModule=Oi,Ci=new WeakMap,bi=new WeakMap,Ii=new WeakMap,vi=new WeakSet,Ei=function(e){if(!xi(this,bi,"f"))throw new Error(`You must call init before using the API ${e}`);return xi(this,bi,"f")},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(kn,e),n(Ln,e)}(jn),Object.defineProperty(Pn,"__esModule",{value:!0}),Pn.PlatformModule=void 0;const Si=d,Ri=Mn,Fi=jn;class ji extends Si.Base{constructor(e,t){super(e),this._channel=t,this.Layout=new Fi.LayoutModule(this.wire)}async init(e){if(!fin.__internal_.isPlatform||fin.me.name!==fin.me.uuid)throw new Error("fin.Platform.init should only be called from a custom platform provider running in the main window of the application.");return this.wire.environment.initPlatform(this.fin,e)}async wrap(e){return this.wire.sendAction("platform-wrap").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}wrapSync(e){return this.wire.sendAction("platform-wrap-sync").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}async getCurrent(){return this.wire.sendAction("platform-get-current").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction("platform-get-current-sync").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}start(e){return this.wire.sendAction("platform-start").catch((e=>{})),new Promise((async(t,n)=>{try{const{uuid:n}=e,i=await this.fin.Application._create({...e,isPlatformController:!0});i.once("platform-api-ready",(()=>t(this.wrapSync({uuid:n})))),i._run({uuid:n})}catch(e){n(e)}}))}startFromManifest(e,t){return this.wire.sendAction("platform-start-from-manifest").catch((e=>{})),new Promise((async(n,i)=>{try{const i=await this.fin.Application._createFromManifest(e);i.once("platform-api-ready",(()=>n(this.wrapSync({uuid:i.identity.uuid})))),i._run(t)}catch(e){i(e)}}))}}Pn.PlatformModule=ji,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Pn,e),n(Mn,e)}(An);var ki={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getMe=e.getBaseMe=e.environmentUnsupportedMessage=void 0;const t=J(),n=un,i=ie(),r=rn;function o(e,t,n){return{...{isView:"view"===e,isWindow:"window"===e,isFrame:"iframe"===e,isExternal:"external connection"===e},uuid:t,name:n,entityType:e}}e.environmentUnsupportedMessage="You are not running in OpenFin.",e.getBaseMe=o,e.getMe=function(s){const{uuid:a,name:c,entityType:d}=s.me,h={setContext(){throw new Error(e.environmentUnsupportedMessage)},addContextHandler(){throw new Error(e.environmentUnsupportedMessage)},getContextGroups(){throw new Error(e.environmentUnsupportedMessage)},joinContextGroup(){throw new Error(e.environmentUnsupportedMessage)},removeFromContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getAllClientsInContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getInfoForContextGroup(){throw new Error(e.environmentUnsupportedMessage)}},l="Interop API has not been instantiated. Either connection has failed or you have not declared interop in your config.",u={setContext(){throw new Error(l)},addContextHandler(){throw new Error(l)},getContextGroups(){throw new Error(l)},joinContextGroup(){throw new Error(l)},removeFromContextGroup(){throw new Error(l)},getAllClientsInContextGroup(){throw new Error(l)},getInfoForContextGroup(){throw new Error(l)}},p={eventNames:()=>{throw new Error(e.environmentUnsupportedMessage)},emit:()=>{throw new Error(e.environmentUnsupportedMessage)},listeners:()=>{throw new Error(e.environmentUnsupportedMessage)},listenerCount:()=>{throw new Error(e.environmentUnsupportedMessage)},on:()=>{throw new Error(e.environmentUnsupportedMessage)},addListener:()=>{throw new Error(e.environmentUnsupportedMessage)},once:()=>{throw new Error(e.environmentUnsupportedMessage)},prependListener:()=>{throw new Error(e.environmentUnsupportedMessage)},prependOnceListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeAllListeners:()=>{throw new Error(e.environmentUnsupportedMessage)}};switch(d){case"view":return Object.assign(new t.View(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case"window":return Object.assign(new i._Window(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case"iframe":return Object.assign(new n._Frame(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case"external connection":return Object.assign(new r.ExternalApplication(s,{uuid:a}),o(d,a,c),{interop:u,isOpenFin:!1});default:return{...o(d,a,c),...p,interop:h,isOpenFin:!1}}}}(ki);var Li={},Ti={},$i={};Object.defineProperty($i,"__esModule",{value:!0}),$i.createWarningObject=$i.createUnusableObject=void 0,$i.createUnusableObject=function(e){const t=()=>{throw new Error(e)};return new Proxy({},{apply:t,construct:t,defineProperty:t,deleteProperty:t,get:t,getOwnPropertyDescriptor:t,getPrototypeOf:t,has:t,isExtensible:t,ownKeys:t,preventExtensions:t,set:t,setPrototypeOf:t})},$i.createWarningObject=function(e,t){return new Proxy(t,{get:(...t)=>(console.warn(e),Reflect.get(...t)),set:(...t)=>(console.warn(e),Reflect.set(...t)),getOwnPropertyDescriptor:(...t)=>(console.warn(e),Reflect.getOwnPropertyDescriptor(...t)),ownKeys:(...t)=>(console.warn(e),Reflect.ownKeys(...t))})};var Bi,Gi={},Wi={};var Hi={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.wrapIntentHandler=e.BROKER_ERRORS=e.generateOverrideWarning=e.generateOverrideError=e.wrapContextHandler=e.wrapInTryCatch=e.generateId=void 0;e.generateId=()=>`${Math.random()}${Date.now()}`;e.wrapInTryCatch=(e,t)=>(...n)=>{try{return e(...n)}catch(e){throw new Error((t||"")+e)}};e.wrapContextHandler=(e,t)=>async n=>{try{await e(n)}catch(e){throw console.error(`Error thrown by handler ${t} for context type ${n.type}: ${e}`),e}};e.generateOverrideError=(e,t)=>`You have tried to to use ${e} but ${t} has not been overridden in the Interop Broker. Please override this function. Refer to our documentation for more info.`;e.generateOverrideWarning=(e,t,n,i)=>{const{uuid:r,name:o}=n;return i?`Entity with identity: ${r}/${o} has called ${i} or ${e} but ${t} has not been overridden.`:`Entity with identity: ${r}/${o} has called ${e} but ${t} has not been overridden.`},e.BROKER_ERRORS={fireIntent:(0,e.generateOverrideError)("fireIntent","handleFiredIntent"),fireIntentForContext:(0,e.generateOverrideError)("fireIntentForContext","handleFiredIntentForContext"),getInfoForIntent:(0,e.generateOverrideError)("getInfoForIntent","handleInfoForIntent"),getInfoForIntentsByContext:(0,e.generateOverrideError)("getInfoForIntentsByContext","handleInfoForIntentsByContext"),joinSessionContextGroupWithJoinContextGroup:"The Context Group you have tried to join is a Session Context Group. Custom Context Groups can only be defined by the Interop Broker through code or manifest configuration. Please use joinSessionContextGroup.",fdc3Open:(0,e.generateOverrideError)("fdc3.open","fdc3HandleOpen"),fdc3FindInstances:(0,e.generateOverrideError)("fdc3.findInstances","fdc3HandleFindInstances"),fdc3GetAppMetadata:(0,e.generateOverrideError)("fdc3.getAppMetadata","fdc3HandleGetAppMetadata"),fdc3GetInfo:(0,e.generateOverrideError)("fdc3.getInfo","fdc3HandleGetInfo")};e.wrapIntentHandler=(e,t)=>async n=>{try{return e(n)}catch(e){throw console.error(`Error thrown by handler ${t}: ${e}`),e}}}(Hi);var Ni,Di,Ui={};function Vi(){if(Di)return Gi;Di=1;var e,t,n,r=s&&s.__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},o=s&&s.__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)},a=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Gi,"__esModule",{value:!0}),Gi.InteropBroker=void 0;const c=d,h=a(function(){if(Bi)return Wi;Bi=1,Object.defineProperty(Wi,"__esModule",{value:!0});const e=Cr();return Wi.default=class{constructor(e,t){this.provider=e,this.id=t,this.lastContext=void 0,this.contextGroupMap=new Map,this.clients=new Map,this.registerListeners()}registerListeners(){this.provider.register(`sessionContextGroup:getContext-${this.id}`,this.getCurrentContext.bind(this)),this.provider.register(`sessionContextGroup:setContext-${this.id}`,this.setContext.bind(this)),this.provider.register(`sessionContextGroup:handlerAdded-${this.id}`,this.handlerAdded.bind(this)),this.provider.register(`sessionContextGroup:handlerRemoved-${this.id}`,this.handlerRemoved.bind(this))}getCurrentContext(e){return e.type?this.contextGroupMap.get(e.type):this.lastContext}setContext(t,n){const{context:i}=t,r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name} not in Session Client State Map`);this.contextGroupMap.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{e.contextHandlers.get(i.type)?.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getClientState(e){return this.clients.get(e.endpointId)}async handlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(i){const e=r.contextHandlers.get(i)||[];r.contextHandlers.set(i,[...e,n]);const o=this.contextGroupMap.get(i);o&&await this.provider.dispatch(t,n,o)}else{r.globalHandler=n;const e=[...this.contextGroupMap.keys()].map((async e=>{const i=this.contextGroupMap.get(e);i&&await this.provider.dispatch(t,n,i)}));await Promise.all(e)}}handlerRemoved(e,t){const{handlerId:n}=e,i=this.clients.get(t.endpointId);i?(Array.from(i.contextHandlers).forEach((([,e])=>{const t=e.indexOf(n);t>-1&&e.splice(t,1)})),i.globalHandler===n&&(i.globalHandler=void 0)):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={contextHandlers:new Map,clientIdentity:e,globalHandler:void 0};this.clients.set(e.endpointId,t)}}onDisconnection(e){this.clients.delete(e.endpointId)}},Wi}()),l=Hi,u=a(i),p=function(){if(Ni)return Ui;Ni=1,Object.defineProperty(Ui,"__esModule",{value:!0}),Ui.PrivateChannelProvider=void 0;const e=Vi();return Ui.PrivateChannelProvider=class t{constructor(e,t){this.provider=e,this.id=t,this.clients=new Map,this.registerListeners(),this.contextByContextType=new Map,this.lastContext=void 0,this.provider.onConnection((e=>this.registerNewClient(e))),this.provider.onDisconnection((async e=>{const{endpointId:t}=e;this.clients.has(t)&&await this.handleClientDisconnecting(e),0===(await this.provider.getAllClientInfo()).length&&this.provider.destroy()}))}getClientState(e){return this.clients.get(e.endpointId)}registerListeners(){this.provider.register("broadcast",this.broadcast.bind(this)),this.provider.register("getCurrentContext",this.getCurrentContext.bind(this)),this.provider.register("contextHandlerAdded",this.contextHandlerAdded.bind(this)),this.provider.register("contextHandlerRemoved",this.contextHandlerRemoved.bind(this)),this.provider.register("nonStandardHandlerRemoved",this.nonStandardHandlerRemoved.bind(this)),this.provider.register("onAddContextHandlerAdded",this.onAddContextHandlerAdded.bind(this)),this.provider.register("onDisconnectHandlerAdded",this.onDisconnectHandlerAdded.bind(this)),this.provider.register("onUnsubscribeHandlerAdded",this.onUnsubscribeHandlerAdded.bind(this)),this.provider.register("clientDisconnecting",((e,t)=>{this.handleClientDisconnecting(t)}))}broadcast(t,n){const{context:i}=t;if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name}, tried to call broadcast, is not connected to this Private Channel`);const r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to broadcast - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);this.contextByContextType.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{const t=e.handlerIdsByContextTypes.get(i.type);t&&t.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getCurrentContext(e,t){const{contextType:n}=e;if(!this.getClientState(t))throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call getCurrentContext, is not connected to this Private Channel`);if(void 0!==n){return this.contextByContextType.get(n)||null}return this.lastContext?this.lastContext:null}contextHandlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call addContextListener, is not connected to this Private Channel`);if(i){const e=r.handlerIdsByContextTypes.get(i)||[];r.handlerIdsByContextTypes.set(i,[...e,n])}else r.globalHandler=n;Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&e.onAddContextListenerHandlerId&&this.provider.dispatch(e.clientIdentity,e.onAddContextListenerHandlerId,i)}))}async contextHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);if(i){let e;if(i.globalHandler===n)i.globalHandler=void 0;else for(const[t,r]of i.handlerIdsByContextTypes){const i=r.indexOf(n);i>-1&&(r.splice(i,1),e=t)}const r=(await this.getConnectedClients()).map((async n=>{const{clientIdentity:i,clientIdentity:{endpointId:r},onUnsubscribeHandlerId:o}=n;r!==t.endpointId&&o&&await this.provider.dispatch(i,o,e)}));try{await Promise.all(r)}catch(e){throw console.error(`Problem when attempting to dispatch to onUnsubscribeHandlers. Error: ${e} Removing Client: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}`),new Error(e)}}else console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}.`)}nonStandardHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);i?i.onDisconnectHandlerId===n?i.onDisconnectHandlerId=void 0:i.onAddContextListenerHandlerId===n?i.onAddContextListenerHandlerId=void 0:i.onUnsubscribeHandlerId===n&&(i.onUnsubscribeHandlerId=void 0):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}onAddContextHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onAddContextListener, is not connected to this Private Channel`);n.onAddContextListenerHandlerId=i,Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&Array.from(e.handlerIdsByContextTypes.keys()).forEach((e=>{this.provider.dispatch(t,i,e)}))}))}onDisconnectHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onDisconnect, is not connected to this Private Channel`);n.onDisconnectHandlerId=i}onUnsubscribeHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onUnsubscribe, is not connected to this Private Channel`);n.onUnsubscribeHandlerId=i}removeClient(e){const t=this.getClientState(e);if(!t)throw new Error(`Client with Identity: ${e.uuid} ${e.name}, tried to call disconnect, is not connected to this Private Channel`);t.handlerIdsByContextTypes.clear(),this.clients.delete(e.endpointId)}async fireOnDisconnectForOtherClients(e){const{endpointId:t}=e,n=(await this.getConnectedClients()).map((async e=>{const{clientIdentity:{endpointId:n},onDisconnectHandlerId:i}=e;n!==t&&i&&await this.provider.dispatch(e.clientIdentity,i)}));try{await Promise.all(n)}catch(t){throw console.error(`Problem when attempting to dispatch to onDisconnectHandlers. Error: ${t} Disconnecting Client: uuid: ${e.uuid}. name: ${e.name}. endpointId: ${e.endpointId}`),new Error(t)}}async unsubscribeAll(e){const{endpointId:t}=e,n=this.clients.get(t);if(n){const t=Array.from(n.handlerIdsByContextTypes.values()).flat(),i=n.globalHandler;if(t.length>0){const n=t.map((async t=>this.contextHandlerRemoved({handlerId:t},e)));try{await Promise.all(n)}catch(e){console.error(e.message)}}if(i)try{await this.contextHandlerRemoved({handlerId:i},e)}catch(e){console.error(e.message)}}}async handleClientDisconnecting(e){await this.unsubscribeAll(e),this.removeClient(e),await this.fireOnDisconnectForOtherClients(e)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={clientIdentity:e,handlerIdsByContextTypes:new Map,globalHandler:void 0,onAddContextListenerHandlerId:void 0,onUnsubscribeHandlerId:void 0,onDisconnectHandlerId:void 0};this.clients.set(e.endpointId,t)}}async getConnectedClients(){const e=await this.provider.getAllClientInfo();return Array.from(this.clients.values()).filter((t=>{const{uuid:n,name:i}=t.clientIdentity;return e.some((e=>i===e.name&&n===e.uuid))}))}static init(e,n){return new t(e,n)}},Ui}(),w=G,y=[{id:"green",displayMetadata:{color:"#00CC88",name:"green"}},{id:"purple",displayMetadata:{color:"#8C61FF",name:"purple"}},{id:"orange",displayMetadata:{color:"#FF8C4C",name:"orange"}},{id:"red",displayMetadata:{color:"#FF5E60",name:"red"}},{id:"pink",displayMetadata:{color:"#FF8FB8",name:"pink"}},{id:"yellow",displayMetadata:{color:"#E9FF8F",name:"yellow"}}];let f=class i extends c.Base{constructor(i,s,a){super(i),e.set(this,void 0),t.set(this,void 0),n.set(this,void 0),this.getProvider=()=>o(this,n,"f").getValue(),this.interopClients=new Map,this.contextGroupsById=new Map,r(this,t,a.contextGroups??[...y],"f"),r(this,e,a.fdc3Info,"f"),a?.logging&&(this.logging=a.logging),this.intentClientMap=new Map,this.lastContextMap=new Map,this.sessionContextGroupMap=new Map,r(this,n,new w.Lazy(s),"f"),this.setContextGroupMap(),this.setupChannelProvider()}static createClosedConstructor(...e){return class extends i{constructor(...t){if(t.length){const[n,i,r]=t;if(r&&"object"==typeof r&&!(0,u.default)(r,e[2]))return console.warn("You have modified the parameters of the InteropOverride constructor. This behavior is deprecated and will be removed in a future version. You can modify these options in your manifest. Please consult our Interop docs for guidance on migrating to the new override scheme."),void super(e[0],e[1],r);console.warn("You are attempting to pass arguments to the InteropOverride constructor. This is not necessary, and these passed arguments will be ignored. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.")}super(...e)}}}setContext({context:e},t){this.wire.sendAction("interop-broker-set-context").catch((e=>{}));const n=this.getClientState(t);if(!n||!n.contextGroupId)throw n?new Error("You must join a context group before you can set context."):new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);{const{contextGroupId:t}=n;this.setContextForGroup({context:e},t)}}setContextForGroup({context:e},t){this.wire.sendAction("interop-broker-set-context-for-group").catch((e=>{}));const n=this.contextGroupsById.get(t);if(!n)throw new Error(`Unable to set context for context group that isn't in the context group mapping: ${t}.`);const r=i.checkContextIntegrity(e);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(e)}`);const o=e.type;n.set(o,e),this.lastContextMap.set(t,o);Array.from(this.interopClients.values()).filter((e=>e.contextGroupId===t)).forEach((t=>{for(const[,n]of t.contextHandlers)i.isContextTypeCompatible(o,n.contextType)&&this.invokeContextHandler(t.clientIdentity,n.handlerId,e)}))}getCurrentContext(e,t){this.wire.sendAction("interop-broker-get-current-context").catch((e=>{}));const n=this.getClientState(t);if(!n?.contextGroupId)throw new Error("You must be a member of a context group to call getCurrentContext");const{contextGroupId:i}=n,r=this.contextGroupsById.get(i),o=this.lastContextMap.get(i),s=e?.contextType??o;return r&&s?r.get(s):void 0}async joinContextGroup({contextGroupId:e,target:t},n){if(this.wire.sendAction("interop-broker-join-context-group").catch((e=>{})),this.sessionContextGroupMap.has(e))throw new Error(l.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup);if(t){i.hasEndpointId(t)&&await this.addClientToContextGroup({contextGroupId:e},t);try{const n=this.channel.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name));if(!n.length)throw new Error(`Given Identity ${t.uuid} ${t.name} is not connected to the Interop Broker.`);n.length>1&&console.warn(`More than one connection found for identity ${t.uuid} ${t.name}`);const i=[];for(const t of n)i.push(this.addClientToContextGroup({contextGroupId:e},t));await Promise.all(i)}catch(e){throw new Error(e)}}else await this.addClientToContextGroup({contextGroupId:e},n)}async addClientToContextGroup({contextGroupId:e},t){this.wire.sendAction("interop-broker-add-client-to-context-group").catch((e=>{}));const n=this.getClientState(t);if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(!this.getContextGroups().find((t=>t.id===e)))throw new Error(`Attempting to join a context group that does not exist: ${e}. You may only join existing context groups.`);if(n.contextGroupId!==e){n.contextGroupId=e,await this.setCurrentContextGroupInClientOptions(t,e);const i=this.contextGroupsById.get(e);for(const[,e]of n.contextHandlers){const{contextType:n,handlerId:r}=e;if(void 0===n)i.forEach(((e,n)=>{this.invokeContextHandler(t,r,e)}));else if(i.has(n)){const e=i.get(n);e&&this.invokeContextHandler(t,r,e)}}}}async removeFromContextGroup({target:e},t){if(this.wire.sendAction("interop-broker-remove-from-context-group").catch((e=>{})),e){i.hasEndpointId(e)&&await this.removeClientFromContextGroup(e);try{const t=this.channel.connections.filter((t=>t.uuid===e.uuid&&t.name===e.name));if(!t.length)throw new Error(`No connection found for given Identity ${e.uuid} ${e.name}`);t.length>1&&console.warn(`More than one connection found for identity ${e.uuid} ${e.name}`);const n=[];for(const e of t)n.push(this.removeClientFromContextGroup(e));await Promise.all(n)}catch(e){throw new Error(e)}}else await this.removeClientFromContextGroup(t)}async removeClientFromContextGroup(e){this.wire.sendAction("interop-broker-remove-client-from-context-group").catch((e=>{}));const t=this.getClientState(e);t&&(t.contextGroupId=void 0),await this.setCurrentContextGroupInClientOptions(e,null)}getContextGroups(){return this.wire.sendAction("interop-broker-get-context-groups").catch((e=>{})),o(this,t,"f").map((e=>({...e})))}getInfoForContextGroup({contextGroupId:e}){return this.wire.sendAction("interop-broker-get-info-for-context-group").catch((e=>{})),this.getContextGroups().find((t=>t.id===e))}getAllClientsInContextGroup({contextGroupId:e}){this.wire.sendAction("interop-broker-get-all-clients-in-context-group").catch((e=>{}));return Array.from(this.interopClients.values()).filter((t=>t.contextGroupId===e)).map((e=>e.clientIdentity))}async handleFiredIntent(e,t){const n=(0,l.generateOverrideWarning)("fdc3.raiseIntent","InteropBroker.handleFiredIntent",t,"interopClient.fireIntent");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntent)}async setIntentTarget(e,t){this.wire.sendAction("interop-broker-set-intent-target").catch((e=>{}));const n=this.intentClientMap.get(t.name),i=`intent-handler-${e.name}`;if(n){const t=n.get(i);if(t){if(t.pendingIntents.push(e),t.clientIdentity&&t.isReady){const{clientIdentity:e,pendingIntents:n}=t;try{const r=n[n.length-1];await this.invokeIntentHandler(e,i,r),t.pendingIntents=[]}catch(n){console.error(`Error invoking intent handler for client ${e.uuid}/${e.name}/${e.endpointId}`),t.isReady=!1}}}else n.set(i,{isReady:!1,pendingIntents:[e]})}else{this.intentClientMap.set(t.name,new Map);const n=this.intentClientMap.get(t.name);n&&n.set(i,{isReady:!1,pendingIntents:[e]})}}async handleInfoForIntent(e,t){const n=(0,l.generateOverrideWarning)("fdc3.findIntent","InteropBroker.handleInfoForIntent",t,"interopClient.getInfoForIntent");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntent)}async handleInfoForIntentsByContext(e,t){const n=(0,l.generateOverrideWarning)("fdc3.findIntentsByContext","InteropBroker.handleInfoForIntentsByContext",t,"interopClient.getInfoForIntentsByContext");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntentsByContext)}async handleFiredIntentForContext(e,t){const n=(0,l.generateOverrideWarning)("fdc3.raiseIntentForContext","InteropBroker.handleFiredIntentForContext",t,"interopClient.fireIntentForContext");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntentForContext)}async clientDisconnected(e){}async fdc3HandleOpen({app:e,context:t},n){const i=(0,l.generateOverrideWarning)("fdc3.open","InteropBroker.fdc3HandleOpen",n);throw console.warn(i),new Error(l.BROKER_ERRORS.fdc3Open)}async fdc3HandleFindInstances(e,t){const n=(0,l.generateOverrideWarning)("fdc3.open","InteropBroker.fdc3HandleFindInstances",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3FindInstances)}async fdc3HandleGetAppMetadata(e,t){const n=(0,l.generateOverrideWarning)("fdc3.getAppMetadata","InteropBroker.fdc3HandleGetAppMetadata",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3GetAppMetadata)}async invokeContextHandler(e,t,n){const i=await this.getProvider();try{await i.dispatch(e,t,n)}catch(i){console.error(`Error invoking context handler ${t} for context type ${n.type} in client ${e.uuid}/${e.name}/${e.endpointId}`,i)}}async invokeIntentHandler(e,t,n){const i=await this.getProvider();await i.dispatch(e,t,n)}async fdc3HandleGetInfo(t,n){const{fdc3Version:i}=t;return{fdc3Version:i,...o(this,e,"f"),optionalFeatures:{OriginatingAppMetadata:!1,UserChannelMembershipAPIs:!0},appMetadata:{appId:"",instanceId:""}}}async getAllClientInfo(){return(await this.getProvider()).getAllClientInfo()}decorateSnapshot(e){return{...e,interopSnapshotDetails:{contextGroupStates:this.getContextGroupStates()}}}applySnapshot(e,t){const n=e?.interopSnapshotDetails?.contextGroupStates;n&&(t?.closeExistingWindows||this.updateExistingClients(n),this.rehydrateContextGroupStates(n))}updateExistingClients(e){this.interopClients.forEach((t=>{const{clientIdentity:n,contextGroupId:r,contextHandlers:o}=t;if(r){const t=e[r];for(const[,e]of Object.entries(t))o.forEach((t=>{const{handlerId:r,contextType:o}=t;i.isContextTypeCompatible(e.type,o)&&this.invokeContextHandler(n,r,e)}))}}))}getContextGroupStates(){return i.toObject(this.contextGroupsById)}rehydrateContextGroupStates(e){const t=Object.entries(e);for(const[e,n]of t){const t=Object.entries(n);for(const[n,i]of t)if(this.contextGroupsById.has(e)){this.contextGroupsById.get(e).set(n,i)}else console.warn(`Attempting to set a context group that isn't in the context group mapping. Skipping context group rehydration for: ${e}`)}}contextHandlerRegistered({contextType:e,handlerId:t},n){const i={contextType:e,handlerId:t},r=this.getClientState(n);if(r?.contextHandlers.set(t,i),r&&r.contextGroupId){const{contextGroupId:i}=r,o=this.contextGroupsById.get(i);if(void 0===e)o.forEach(((e,i)=>{this.invokeContextHandler(n,t,e)}));else if(o.has(e)){const i=o.get(e);i&&this.invokeContextHandler(n,t,i)}}}async intentHandlerRegistered(e,t){const{handlerId:n}=e,i=this.intentClientMap.get(t.name),r=i?.get(n);if(i)if(r){const{pendingIntents:e}=r;r.clientIdentity=t,r.isReady=!0;try{if(e.length>0){const i=e[e.length-1];await this.invokeIntentHandler(t,n,i),r.pendingIntents=[]}}catch(e){console.error(`Error invoking intent handler: ${n} for client ${t.uuid}/${t.name}/${t.endpointId}`)}}else i.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t});else{this.intentClientMap.set(t.name,new Map);const e=this.intentClientMap.get(t.name);e&&e.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t})}}removeContextHandler({handlerId:e},t){const n=this.getClientState(t);n&&n.contextHandlers.delete(e)}handleJoinSessionContextGroup({sessionContextGroupId:e},t){try{if(!e)throw new Error("Failed to join session context group: must specify group id.");const n=this.sessionContextGroupMap.get(e);if(n)n.registerNewClient(t);else{const n=new h.default(this.channel,e);n.registerNewClient(t),this.sessionContextGroupMap.set(e,n)}return{hasConflict:this.contextGroupsById.has(e)}}catch(e){throw new Error(e)}}getClientState(e){return this.interopClients.get(e.endpointId)}static toObject(e){const t=Object.fromEntries(e),n={};return Object.entries(t).forEach((([e,t])=>{const i=Object.fromEntries(t);n[e]=i})),n}static checkContextIntegrity(e){if(!e)return{isValid:!1,reason:"No context supplied"};if("object"!=typeof e)return{isValid:!1,reason:"Context must be an Object"};if(!e.type)return{isValid:!1,reason:"Context must have a type property"};if(e.id&&"object"!=typeof e.id)return{isValid:!1,reason:"Context id must be an Object populated with key-value identifiers (if set)"};if(e.id){const{id:t}=e,n=Object.keys(t);let i=!1;if(!n.length)return{isValid:!1,reason:"Context id must have at least one key-value identifier"};if(n.forEach((e=>{"string"==typeof e&&"string"==typeof t[e]||(i=!0)})),i)return{isValid:!1,reason:"Context id key-value identifiers must be of type string"}}return e.name&&"string"!=typeof e.name?{isValid:!1,reason:"Context name must be of string type (if set)"}:{isValid:!0}}static hasEndpointId(e){return void 0!==e.endpointId}static isContextTypeCompatible(e,t){return void 0===t||e===t}setContextGroupMap(){for(const e of this.getContextGroups())this.contextGroupsById.set(e.id,new Map)}async setCurrentContextGroupInClientOptions(e,t){try{const n=await this.fin.System.getEntityInfo(e.uuid,e.name);let i;"view"===n.entityType?i=await this.fin.View.wrap(e):"window"===n.entityType&&(i=await this.fin.Window.wrap(e)),i&&await i.updateOptions({interop:{currentContextGroup:t}})}catch(e){}}async setupChannelProvider(){try{const e=await this.getProvider();this.channel=e,this.wireChannel(e)}catch(e){throw new Error(`Error setting up Interop Broker Channel Provider: ${e}`)}}wireChannel(e){e.onConnection((async(e,t)=>{if(!await this.isConnectionAuthorized(e,t))throw new Error(`Connection not authorized for ${e.uuid}, ${e.name}`);if(!e.endpointId)throw new Error("Version too old to be compatible with Interop. Please upgrade your runtime to a more recent version.");const n={contextGroupId:void 0,contextHandlers:new Map,clientIdentity:e};t?.currentContextGroup&&this.contextGroupsById.has(t.currentContextGroup)&&(n.contextGroupId=t?.currentContextGroup),this.interopClients.set(e.endpointId,n)})),e.onDisconnection((e=>{this.interopClients.delete(e.endpointId);const t=this.intentClientMap.get(e.name);t&&e.uuid===this.fin.me.uuid&&t.forEach((e=>{e.isReady=!1})),this.sessionContextGroupMap.forEach((t=>{t.onDisconnection(e)})),this.clientDisconnected(e)})),e.beforeAction((async(e,t,n)=>{if(!await this.isActionAuthorized(e,t,n))throw new Error(`Action (${e}) not authorized for ${n.uuid}, ${n.name}`);this.logging?.beforeAction?.enabled&&console.log(e,t,n)})),e.afterAction(((e,t,n)=>{this.logging?.afterAction?.enabled&&console.log(e,t,n)})),e.register("setContext",this.setContext.bind(this)),e.register("fireIntent",this.handleFiredIntent.bind(this)),e.register("getCurrentContext",this.getCurrentContext.bind(this)),e.register("getInfoForIntent",this.handleInfoForIntent.bind(this)),e.register("getInfoForIntentsByContext",this.handleInfoForIntentsByContext.bind(this)),e.register("fireIntentForContext",this.handleFiredIntentForContext.bind(this)),e.register("getContextGroups",this.getContextGroups.bind(this)),e.register("joinContextGroup",this.joinContextGroup.bind(this)),e.register("removeFromContextGroup",this.removeFromContextGroup.bind(this)),e.register("getAllClientsInContextGroup",this.getAllClientsInContextGroup.bind(this)),e.register("getInfoForContextGroup",this.getInfoForContextGroup.bind(this)),e.register("contextHandlerRegistered",this.contextHandlerRegistered.bind(this)),e.register("intentHandlerRegistered",this.intentHandlerRegistered.bind(this)),e.register("removeContextHandler",this.removeContextHandler.bind(this)),e.register("sessionContextGroup:createIfNeeded",this.handleJoinSessionContextGroup.bind(this)),e.register("fdc3Open",this.fdc3HandleOpen.bind(this)),e.register("fdc3v2FindIntentsByContext",this.handleInfoForIntentsByContext.bind(this)),e.register("fdc3FindInstances",this.fdc3HandleFindInstances.bind(this)),e.register("fdc3GetAppMetadata",this.fdc3HandleGetAppMetadata.bind(this)),e.register("fdc3v2GetInfo",(async(e,t)=>this.fdc3HandleGetInfo.bind(this)(e,t))),e.register("createPrivateChannelProvider",(async e=>{const{channelId:t}=e,n=await this.fin.InterApplicationBus.Channel.create(t);p.PrivateChannelProvider.init(n,t)}))}isConnectionAuthorized(e,t){return this.wire.sendAction("interop-broker-is-connection-authorized").catch((e=>{})),Promise.resolve(!0)}isActionAuthorized(e,t,n){return this.wire.sendAction("interop-broker-is-action-authorized").catch((e=>{})),Promise.resolve(!0)}};return Gi.InteropBroker=f,e=new WeakMap,t=new WeakMap,n=new WeakMap,Gi}var zi,Ki={},qi={},Ji=s&&s.__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},Yi=s&&s.__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)};Object.defineProperty(qi,"__esModule",{value:!0});const Zi=d,Qi=Hi;class Xi extends Zi.Base{constructor(e,t,n){super(e),zi.set(this,void 0),this.id=n,Ji(this,zi,t,"f")}async setContext(e){this.wire.sendAction("interop-session-context-group-set-context").catch((e=>{}));return(await Yi(this,zi,"f")).dispatch(`sessionContextGroup:setContext-${this.id}`,{sessionContextGroupId:this.id,context:e})}async getCurrentContext(e){this.wire.sendAction("interop-session-context-group-get-context").catch((e=>{}));return(await Yi(this,zi,"f")).dispatch(`sessionContextGroup:getContext-${this.id}`,{sessionContextGroupId:this.id,type:e})}async addContextHandler(e,t){if(this.wire.sendAction("interop-session-context-group-add-handler").catch((e=>{})),"function"!=typeof e)throw new Error("Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");const n=await Yi(this,zi,"f");let i;return i=t?`sessionContextHandler:invoke-${this.id}-${t}-${(0,Qi.generateId)()}`:`sessionContextHandler:invoke-${this.id}`,n.register(i,(0,Qi.wrapContextHandler)(e,i)),await n.dispatch(`sessionContextGroup:handlerAdded-${this.id}`,{handlerId:i,contextType:t}),{unsubscribe:await this.createUnsubscribeCb(i)}}async createUnsubscribeCb(e){const t=await Yi(this,zi,"f");return async()=>{t.remove(e),await t.dispatch(`sessionContextGroup:handlerRemoved-${this.id}`,{handlerId:e})}}getUserInstance(){return{id:this.id,setContext:(0,Qi.wrapInTryCatch)(this.setContext.bind(this),"Failed to set context: "),getCurrentContext:(0,Qi.wrapInTryCatch)(this.getCurrentContext.bind(this),"Failed to get context: "),addContextHandler:(0,Qi.wrapInTryCatch)(this.addContextHandler.bind(this),"Failed to add context handler: ")}}}qi.default=Xi,zi=new WeakMap;var er={},tr={},nr={},ir={},rr=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),or=s&&s.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),sr=s&&s.__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)&&rr(t,e,n);return or(t,e),t};Object.defineProperty(ir,"__esModule",{value:!0}),ir.PrivateChannelClient=void 0;const ar=sr(Hi);var cr,dr;function hr(){if(cr)return tr;cr=1;var e,t=s&&s.__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)},n=s&&s.__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},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(tr,"__esModule",{value:!0}),tr.FDC3ModuleBase=void 0;const o=nr,a=Hi,c=wr(),d=r(i);return tr.FDC3ModuleBase=class{get client(){return t(this,e,"f").call(this)}get fin(){return this.wire.getFin()}constructor(t,i){this.wire=i,e.set(this,void 0),n(this,e,t,"f")}async broadcast(e){return this.wire.sendAction("fdc3-broadcast").catch((e=>{})),this.client.setContext(e)}async _open(e,t){this.wire.sendAction("fdc3-open").catch((e=>{}));try{return await c.InteropClient.ferryFdc3Call(this.client,"fdc3Open",{app:e,context:t})}catch(e){const t=e.message===a.BROKER_ERRORS.fdc3Open?"ResolverUnavailable":e.message;throw new Error(t)}}async _getChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:"system",...(0,o.getUnsupportedChannelApis)()})))}async getOrCreateChannel(e){this.wire.sendAction("fdc3-get-or-create-channel").catch((e=>{}));const t=(await this._getChannels()).find((t=>t.id===e));if(t)return{...t,type:"system",...(0,o.getUnsupportedChannelApis)()};try{const t=await this.client.joinSessionContextGroup(e);return(0,o.buildAppChannelObject)(t)}catch(e){throw console.error(e.message),new Error(o.ChannelError.CreationFailed)}}async getSystemChannels(){return this.wire.sendAction("fdc3-get-system-channels").catch((e=>{})),this._getChannels()}async joinChannel(e){this.wire.sendAction("fdc3-join-channel").catch((e=>{}));try{return await this.client.joinContextGroup(e)}catch(e){if(e.message===a.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup?console.error("The Channel you have tried to join is an App Channel. Custom Channels can only be defined by the Interop Broker through code or manifest configuration. Please use getOrCreateChannel."):console.error(e.message),e.message.startsWith("Attempting to join a context group that does not exist"))throw new Error(o.ChannelError.NoChannelFound);throw new Error(o.ChannelError.AccessDenied)}}async getCurrentChannel(){this.wire.sendAction("fdc3-get-current-channel").catch((e=>{}));const e=await this.getCurrentContextGroupInfo();return e?this.buildChannelObject(e):null}async leaveCurrentChannel(){return this.wire.sendAction("fdc3-leave-current-channel").catch((e=>{})),this.client.removeFromContextGroup()}async getCurrentContextGroupInfo(){const e=await this.client.getContextGroups(),t=e.map((async e=>this.client.getAllClientsInContextGroup(e.id))),n=(await Promise.all(t)).findIndex((e=>e.some((e=>{const{uuid:t,name:n}=e;return this.wire.me.uuid===t&&this.wire.me.name===n}))));return e[n]}async buildChannelObject(e){return{...e,type:"system",addContextListener:(...[e,t])=>{let n,i;"function"==typeof e?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),n=e):(n=t,"string"==typeof e&&(i=e));const r=(async()=>{let e=!0;const t=await this.client.getCurrentContext(i);return this.client.addContextHandler(((i,r)=>{if(!e||(e=!1,!(0,d.default)(t,i)))return n(i,r)}),i)})();return{...r,unsubscribe:()=>r.then((e=>e.unsubscribe()))}},broadcast:this.broadcast.bind(this),getCurrentContext:async e=>{const t=await this.client.getCurrentContext(e);return void 0===t?null:t}}}},e=new WeakMap,tr}ir.PrivateChannelClient=class{constructor(e,t){this.id=t,this.client=e,this.listeners=new Map}async broadcast(e){return this.client.dispatch("broadcast",{context:e})}async getCurrentContext(e){return this.client.dispatch("getCurrentContext",{contextType:e})}async addContextListener(e,t){if("function"!=typeof t)throw new Error("Non-function argument passed to the second parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");let n;n=e?`contextHandler:invoke-${this.id}-${e}-${ar.generateId()}`:`contextHandler:invoke-${this.id}-${ar.generateId()}`,this.client.register(n,ar.wrapContextHandler(t,n));const i={unsubscribe:await this.createContextUnsubscribeCb(n)};return this.listeners.set(n,i),await this.client.dispatch("contextHandlerAdded",{handlerId:n,contextType:e}),i}createNonStandardUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch("nonStandardHandlerRemoved",{handlerId:e})}}createContextUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch("contextHandlerRemoved",{handlerId:e})}}onAddContextListener(e){const t=`onContextHandlerAdded:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch("onAddContextHandlerAdded",{handlerId:t}),n}onDisconnect(e){const t=`onDisconnect:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch("onDisconnectHandlerAdded",{handlerId:t}),n}onUnsubscribe(e){const t=`onUnsubscribe:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch("onUnsubscribeHandlerAdded",{handlerId:t}),n}async cleanUpAllSubs(){Array.from(this.listeners.keys()).forEach((e=>{this.client.remove(e),this.listeners.delete(e)}))}async disconnect(){try{await this.client.dispatch("clientDisconnecting"),await this.cleanUpAllSubs(),await this.client.disconnect()}catch(e){throw new Error(e.message)}}},function(e){var t=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.getIntentResolution=e.isChannel=e.isContext=e.connectPrivateChannel=e.buildAppChannelObject=e.buildPrivateChannelObject=e.ChannelError=e.ResultError=e.UnsupportedChannelApiError=e.getUnsupportedChannelApis=void 0;const n=Hi,r=ir,o=t(i);e.getUnsupportedChannelApis=e=>({addContextListener:()=>{throw new a("Channel.addContextListener",e)},broadcast:()=>{throw new a("Channel.broadcast",e)},getCurrentContext:()=>{throw new a("Channel.getCurrentContext",e)}});class a extends Error{constructor(e,t="System"){super(e),this.message=`Calling ${e} on an instance of a ${t} Channel returned by fdc3.get${t}Channels is not supported. If you would like to use a ${t} Channel, please use fdc3.joinChannel, fdc3.addContextListener, and fdc3.broadcast instead.`}}var c,d;e.UnsupportedChannelApiError=a,function(e){e.NoResultReturned="NoResultReturned",e.IntentHandlerRejected="IntentHandlerRejected"}(c=e.ResultError||(e.ResultError={})),(d=e.ChannelError||(e.ChannelError={})).NoChannelFound="NoChannelFound",d.AccessDenied="AccessDenied",d.CreationFailed="CreationFailed";e.buildPrivateChannelObject=e=>{let t=!1;const n=()=>{if(t)throw new Error("Private Channel Client has been disconnected from the Private Channel")};return{id:e.id,type:"private",broadcast:async t=>(n(),e.broadcast(t)),getCurrentContext:async t=>(n(),e.getCurrentContext(t)),addContextListener:async(t,i)=>{n();let r=i,o=t;"function"==typeof t&&(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),r=t,o=null);return e.addContextListener(o,r)},onAddContextListener:t=>(n(),e.onAddContextListener(t)),disconnect:async()=>(n(),t=!0,e.disconnect()),onDisconnect:t=>(n(),e.onDisconnect(t)),onUnsubscribe:t=>(n(),e.onUnsubscribe(t))}};e.buildAppChannelObject=e=>({id:e.id,type:"app",broadcast:e.setContext,getCurrentContext:async t=>{const n=await e.getCurrentContext(t);return void 0===n?null:n},addContextListener:(t,n)=>{let i,r;"function"==typeof t?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),i=t):(i=n,"string"==typeof t&&(r=t));const s=(async()=>{let t=!0;const n=await e.getCurrentContext(r);return e.addContextHandler(((e,r)=>{if(!t||(t=!1,!(0,o.default)(n,e)))return i(e,r)}),r)})();return{...s,unsubscribe:()=>s.then((e=>e.unsubscribe()))}}});e.connectPrivateChannel=async t=>{try{const n=await fin.InterApplicationBus.Channel.connect(t),i=new r.PrivateChannelClient(n,t);return(0,e.buildPrivateChannelObject)(i)}catch(e){throw new Error(`Private Channel with id: ${t} doesn't exist`)}};e.isContext=e=>{if(e&&"object"==typeof e&&"type"in e){const{type:t}=e;return"string"==typeof t}return!1};e.isChannel=e=>{if(e&&"object"==typeof e&&"type"in e&&"id"in e){const{type:t,id:n}=e;return"string"==typeof t&&"string"==typeof n&&("app"===t||"private"===t)}return!1};e.getIntentResolution=async(t,i,r,o)=>{const s=(0,n.generateId)(),a=new Promise(((e,t)=>{fin.InterApplicationBus.subscribe({uuid:"*"},s,(t=>{e(t)})).catch((()=>t(new Error("getResult is not supported in this environment"))))})),d=r?{target:r,intentResolutionResultId:s}:{intentResolutionResultId:s},h=o?{name:o,context:i,metadata:d}:{...i,metadata:d},l=async()=>{let n=await a;if(!n||"object"!=typeof n)throw new Error(c.NoResultReturned);const{error:i}=n;if(i)throw new Error(c.IntentHandlerRejected);if((0,e.isChannel)(n)){const{id:i,type:r}=n;switch(r){case"private":n=await(0,e.connectPrivateChannel)(i);break;case"app":{const r=await t.joinSessionContextGroup(i);n=(0,e.buildAppChannelObject)(r);break}}}else if(!(0,e.isContext)(n))throw new Error(c.NoResultReturned);return n},u=o?await t.fireIntent(h):await t.fireIntentForContext(h);return"object"!=typeof u?{source:{appId:"",instanceId:""},intent:"",version:"2.0",getResult:l}:{...u,getResult:l}}}(nr);var lr,ur,pr={};function wr(){if(ur)return Ki;ur=1;var e,t,n=s&&s.__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},i=s&&s.__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)},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ki,"__esModule",{value:!0}),Ki.InteropClient=void 0;const o=d,a=r(qi),c=function(){if(dr)return er;dr=1,Object.defineProperty(er,"__esModule",{value:!0}),er.Fdc3Module=void 0;const e=Hi,t=hr();class n extends t.FDC3ModuleBase{async open(e,t){await super._open(e,t)}addContextListener(e,t){let n;return this.wire.sendAction("fdc3-add-context-listener").catch((e=>{})),"function"==typeof e?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),n=this.client.addContextHandler(e)):n=this.client.addContextHandler(t,null===e?void 0:e),{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}addIntentListener(e,t){this.wire.sendAction("fdc3-add-intent-listener").catch((e=>{}));const n=this.client.registerIntentHandler((e=>{const{context:n,metadata:i}=e,{metadata:r}=n,o=i?.intentResolutionResultId||r?.intentResolutionResultId;o&&this.fin.InterApplicationBus.publish(o,null).catch((()=>null)),t(e.context)}),e,{fdc3Version:"1.2"});return{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}async raiseIntent(t,n,i){this.wire.sendAction("fdc3-raise-intent").catch((e=>{}));const r=i?{name:t,context:n,metadata:{target:i}}:{name:t,context:n};try{return await this.client.fireIntent(r)}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntent?"ResolverUnavailable":t.message;throw new Error(n)}}async findIntent(t,n){this.wire.sendAction("fdc3-find-intent").catch((e=>{}));try{return await this.client.getInfoForIntent({name:t,context:n})}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntent?"ResolverUnavailable":t.message;throw new Error(n)}}async findIntentsByContext(t){this.wire.sendAction("fdc3-find-intents-by-context").catch((e=>{}));try{return await this.client.getInfoForIntentsByContext(t)}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntentsByContext?"ResolverUnavailable":t.message;throw new Error(n)}}async raiseIntentForContext(t,n){this.wire.sendAction("fdc3-raise-intent-for-context").catch((e=>{}));try{return await this.client.fireIntentForContext({...t,metadata:{target:n}})}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntentForContext?"ResolverUnavailable":t.message;throw new Error(n)}}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}getInfo(){return this.wire.sendAction("fdc3-get-info").catch((e=>{})),{providerVersion:this.wire.environment.getAdapterVersionSync(),provider:`openfin-${this.wire.me.uuid}`,fdc3Version:"1.2"}}}return er.Fdc3Module=n,er}(),h=function(){if(lr)return pr;lr=1,Object.defineProperty(pr,"__esModule",{value:!0}),pr.Fdc3Module2=void 0;const e=hr(),t=Hi,n=wr(),i=nr,r=ir;class o extends e.FDC3ModuleBase{async open(e,t){return"string"==typeof e&&console.warn("Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string })."),super._open(e,t)}async findInstances(e){this.wire.sendAction("fdc3-find-instances").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,"fdc3FindInstances",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3FindInstances?"ResolverUnavailable":e.message;throw new Error(n)}}async getAppMetadata(e){this.wire.sendAction("fdc3-get-app-metadata").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,"fdc3GetAppMetadata",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3GetAppMetadata?"ResolverUnavailable":e.message;throw new Error(n)}}async addContextListener(e,t){this.wire.sendAction("fdc3-add-context-listener").catch((e=>{}));const n=e=>t=>{const{contextMetadata:n,...i}=t,r=n?[{...i},n]:[t,null];e(...r)};let i=t,r=n(i);return"function"==typeof e?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),i=e,r=n(i),this.client.addContextHandler(r)):this.client.addContextHandler(r,null===e?void 0:e)}async findIntent(e,n,i){this.wire.sendAction("fdc3-find-intent").catch((e=>{}));try{return await this.client.getInfoForIntent({name:e,context:n,metadata:{resultType:i}})}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntent?"ResolverUnavailable":e.message;throw new Error(n)}}async findIntentsByContext(e,i){this.wire.sendAction("fdc3-find-intents-by-context").catch((e=>{}));const r=i?{context:e,metadata:{resultType:i}}:e;try{return await n.InteropClient.ferryFdc3Call(this.client,"fdc3v2FindIntentsByContext",r)}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntentsByContext?"ResolverUnavailable":e.message;throw new Error(n)}}async raiseIntent(e,n,r){this.wire.sendAction("fdc3-raise-intent").catch((e=>{}));try{return"string"==typeof r&&console.warn("Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string })."),(0,i.getIntentResolution)(this.client,n,r,e)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?"ResolverUnavailable":e.message;throw new Error(n)}}async raiseIntentForContext(e,n){this.wire.sendAction("fdc3-raise-intent-for-context").catch((e=>{}));try{return"string"==typeof n&&console.warn("Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string })."),(0,i.getIntentResolution)(this.client,e,n)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?"ResolverUnavailable":e.message;throw new Error(n)}}async addIntentListener(e,t){if(this.wire.sendAction("fdc3-add-intent-listener").catch((e=>{})),"string"!=typeof e)throw new Error("First argument must be an Intent name");return this.client.registerIntentHandler((async e=>{let n,i;const{context:r,metadata:o}=e,{contextMetadata:s,metadata:a,...c}=r,d=o?.intentResolutionResultId||a?.intentResolutionResultId;try{const e=a?{metadata:a,...c}:{...c};n=await t(e,s),i=n}catch(e){n=e,i={error:!0}}if(d&&this.fin.InterApplicationBus.publish(d,i).catch((()=>null)),n instanceof Error)throw new Error(n.message);return n}),e,{fdc3Version:"2.0"})}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}async createPrivateChannel(){const e=(0,t.generateId)();await n.InteropClient.ferryFdc3Call(this.client,"createPrivateChannelProvider",{channelId:e});const o=await this.fin.InterApplicationBus.Channel.connect(e),s=new r.PrivateChannelClient(o,e);return(0,i.buildPrivateChannelObject)(s)}async getUserChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:"user",...(0,i.getUnsupportedChannelApis)("User")})))}async getSystemChannels(){return console.warn("This API has been deprecated. Please use fdc3.getUserChannels instead."),super.getSystemChannels()}async joinUserChannel(e){return super.joinChannel(e)}async joinChannel(e){return console.warn("This API has been deprecated. Please use fdc3.joinUserChannel instead."),super.joinChannel(e)}async getCurrentChannel(){const e=await super.getCurrentChannel();return e?{...e,type:"user",broadcast:this.broadcast.bind(this)}:null}async getInfo(){return n.InteropClient.ferryFdc3Call(this.client,"fdc3v2GetInfo",{fdc3Version:"2.0"})}}return pr.Fdc3Module2=o,pr}(),l=Hi;let u=class extends o.Base{constructor(i,r){super(i),e.set(this,void 0),t.set(this,void 0),n(this,t,new Map,"f"),n(this,e,r,"f")}async setContext(t){this.wire.sendAction("interop-client-set-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("setContext",{context:t})}async addContextHandler(t,n){if(this.wire.sendAction("interop-client-add-context-handler").catch((e=>{})),"function"!=typeof t)throw new Error("Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");const r=await i(this,e,"f");let o;o=n?`invokeContextHandler-${n}-${(0,l.generateId)()}`:"invokeContextHandler";const s=(0,l.wrapContextHandler)(t,o);return r.register(o,s),await r.dispatch("contextHandlerRegistered",{handlerId:o,contextType:n}),{unsubscribe:async()=>{r.remove(o),await r.dispatch("removeContextHandler",{handlerId:o})}}}async getContextGroups(){this.wire.sendAction("interop-client-get-context-groups").catch((e=>{}));return(await i(this,e,"f")).dispatch("getContextGroups")}async joinContextGroup(t,n){this.wire.sendAction("interop-client-join-context-group").catch((e=>{}));const r=await i(this,e,"f");if(!t)throw new Error("No contextGroupId specified for joinContextGroup.");return r.dispatch("joinContextGroup",{contextGroupId:t,target:n})}async removeFromContextGroup(t){this.wire.sendAction("interop-client-remove-from-context-group").catch((e=>{}));return(await i(this,e,"f")).dispatch("removeFromContextGroup",{target:t})}async getAllClientsInContextGroup(t){this.wire.sendAction("interop-client-get-all-clients-in-context-group").catch((e=>{}));const n=await i(this,e,"f");if(!t)throw new Error("No contextGroupId specified for getAllClientsInContextGroup.");return n.dispatch("getAllClientsInContextGroup",{contextGroupId:t})}async getInfoForContextGroup(t){this.wire.sendAction("interop-client-get-info-for-context-group").catch((e=>{}));const n=await i(this,e,"f");if(!t)throw new Error("No contextGroupId specified for getInfoForContextGroup.");return n.dispatch("getInfoForContextGroup",{contextGroupId:t})}async fireIntent(t){this.wire.sendAction("interop-client-fire-intent").catch((e=>{}));return(await i(this,e,"f")).dispatch("fireIntent",t)}async registerIntentHandler(t,n,r){this.wire.sendAction("interop-client-register-intent-handler").catch((e=>{}));const o=await i(this,e,"f"),s=`intent-handler-${n}`,a=(0,l.wrapIntentHandler)(t,s);try{await o.register(s,a),await o.dispatch("intentHandlerRegistered",{handlerId:s,...r})}catch(e){throw new Error("Unable to register intent handler")}return{unsubscribe:async()=>{o.remove(s)}}}async getCurrentContext(t){this.wire.sendAction("interop-client-get-current-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("getCurrentContext",{contextType:t})}async getInfoForIntent(t){this.wire.sendAction("interop-client-get-info-for-intent").catch((e=>{}));return(await i(this,e,"f")).dispatch("getInfoForIntent",t)}async getInfoForIntentsByContext(t){this.wire.sendAction("interop-client-get-info-for-intents-by-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("getInfoForIntentsByContext",t)}async fireIntentForContext(t){this.wire.sendAction("interop-client-fire-intent-for-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("fireIntentForContext",t)}async joinSessionContextGroup(n){try{const r=i(this,t,"f").get(n);if(r)return r.getUserInstance();const o=await i(this,e,"f"),{hasConflict:s}=await o.dispatch("sessionContextGroup:createIfNeeded",{sessionContextGroupId:n});s&&console.warn(`A (non-session) context group with the name "${n}" already exists. If you are trying to join a Context Group, call joinContextGroup instead.`);const c=new a.default(this.wire,i(this,e,"f"),n);return i(this,t,"f").set(n,c),c.getUserInstance()}catch(e){throw console.error(`Error thrown trying to create Session Context Group with id "${n}": ${e}`),e}}async onDisconnection(t){this.wire.sendAction("interop-client-add-ondisconnection-listener").catch((e=>{}));return(await i(this,e,"f")).onDisconnection((e=>{const{uuid:n}=e;t({type:"interop-broker",topic:"disconnected",brokerName:n})}))}getFDC3Sync(e){switch(e){case"1.2":return new c.Fdc3Module((()=>this),this.wire);case"2.0":return new h.Fdc3Module2((()=>this),this.wire);default:throw new Error(`Invalid FDC3 version provided: ${e}. Must be '1.2' or '2.0'`)}}async getFDC3(e){return this.getFDC3Sync(e)}static async ferryFdc3Call(t,n,r){return(await i(t,e,"f")).dispatch(n,r||null)}};return Ki.InteropClient=u,e=new WeakMap,t=new WeakMap,Ki}var yr,fr,gr,mr={};function vr(){if(yr)return mr;yr=1,Object.defineProperty(mr,"__esModule",{value:!0}),mr.overrideCheck=mr.checkFDC32Overrides=mr.getDefaultViewFdc3VersionFromAppInfo=void 0;const e=Vi();function t(t){return["fdc3HandleFindInstances","handleInfoForIntent","handleInfoForIntentsByContext","fdc3HandleGetAppMetadata","fdc3HandleGetInfo","fdc3HandleOpen","handleFiredIntent","handleFiredIntentForContext"].filter((n=>t[n]===e.InteropBroker.prototype[n]))}return mr.getDefaultViewFdc3VersionFromAppInfo=function({manifest:e,initialOptions:t}){const n=e?.platform?.defaultViewOptions?.fdc3InteropApi??t.defaultViewOptions?.fdc3InteropApi;return["1.2","2.0"].includes(n??"")?n:void 0},mr.checkFDC32Overrides=t,mr.overrideCheck=function(e,n){if(n&&"2.0"===n){const n=t(e);n.length>0&&console.warn(`WARNING: FDC3 2.0 has been set as a default option for Views in this Platform, but the required InteropBroker APIs for FDC3 2.0 compliance have not all been overridden.\nThe following APIs need to be overridden:\n${n.join("\n")}`)}},mr}function Cr(){return gr||(gr=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),i=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),i(function(){if(fr)return Ti;fr=1;var e=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ti,"__esModule",{value:!0}),Ti.InteropModule=void 0;const t=e(n),i=$i,r=d,o=Vi(),a=wr(),c=vr(),h=Tn,l=e=>new e,u="You have attempted to use or modify InteropBroker parameters, which is not allowed. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.";class p extends r.Base{async init(e,n=l){this.wire.sendAction("interop-init").catch((()=>{}));const r=await this.wire.environment.getInteropInfo(this.wire.getFin()),s=(0,i.createUnusableObject)(u),a=(0,i.createWarningObject)(u,(0,t.default)(r)),d=async()=>{throw new Error(u)},p=o.InteropBroker.createClosedConstructor(this.wire,(()=>this.fin.InterApplicationBus.Channel.create(`interop-broker-${e}`)),r);let w;return w=Array.isArray(n)?new((0,h.overrideFromComposables)(...n)(p))(s,d,a):await n(p,s,d,a),(0,c.overrideCheck)(w,r.fdc3Version),w}connectSync(e,t){return this.wire.sendAction("interop-connect-sync").catch((()=>{})),new a.InteropClient(this.wire,this.wire.environment.whenReady().then((()=>this.fin.InterApplicationBus.Channel.connect(`interop-broker-${e}`,{payload:t}))))}}return Ti.InteropModule=p,Ti}(),e),i(wr(),e),i(Vi(),e)}(Li)),Li}var br={},Ir={},Er={},xr={};Object.defineProperty(xr,"__esModule",{value:!0}),xr.getSnapshotSourceChannelName=void 0;xr.getSnapshotSourceChannelName=e=>`snapshot-source-provider-${e.uuid}`;var Ar,Pr,Mr,_r,Or,Sr=s&&s.__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},Rr=s&&s.__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)};Object.defineProperty(Er,"__esModule",{value:!0}),Er.SnapshotSource=void 0;const Fr=d,jr=xr,kr=new Map;class Lr extends Fr.Base{constructor(e,t){super(e),Ar.set(this,void 0),Pr.set(this,(()=>(kr.has(this.identity.uuid)||kr.set(this.identity.uuid,{eventFired:null,clientPromise:null}),kr.get(this.identity.uuid)))),Mr.set(this,(()=>(Rr(this,Pr,"f").call(this).clientPromise||(Rr(this,Pr,"f").call(this).clientPromise=Rr(this,_r,"f").call(this)),Rr(this,Pr,"f").call(this).clientPromise))),_r.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);try{Rr(this,Pr,"f").call(this).eventFired||await Rr(this,Or,"f").call(this);const t=await this.fin.InterApplicationBus.Channel.connect(e,{wait:!1});return t.onDisconnection((()=>{Rr(this,Pr,"f").call(this).clientPromise=null,Rr(this,Pr,"f").call(this).eventFired=null})),t}catch(e){throw Rr(this,Pr,"f").call(this).clientPromise=null,new Error("The targeted SnapshotSource is not currently initialized. Await this object's ready() method.")}})),Or.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);let t,n;const i=new Promise(((e,i)=>{t=e,n=i}));Rr(this,Pr,"f").call(this).eventFired=i;const r=async i=>{try{i.channelName===e&&(t(),await this.fin.InterApplicationBus.Channel.removeListener("connected",r))}catch(e){n(e)}};await this.fin.InterApplicationBus.Channel.on("connected",r)})),Sr(this,Ar,t,"f")}get identity(){return Rr(this,Ar,"f")}async ready(){this.wire.sendAction("snapshot-source-ready").catch((e=>{}));try{await Rr(this,Mr,"f").call(this)}catch(e){await Rr(this,Pr,"f").call(this).eventFired}}async getSnapshot(){this.wire.sendAction("snapshot-source-get-snapshot").catch((e=>{}));const e=await Rr(this,Mr,"f").call(this),t=await e.dispatch("get-snapshot");return(await t).snapshot}async applySnapshot(e){this.wire.sendAction("snapshot-source-apply-snapshot").catch((e=>{}));return(await Rr(this,Mr,"f").call(this)).dispatch("apply-snapshot",{snapshot:e})}}Er.SnapshotSource=Lr,Ar=new WeakMap,Pr=new WeakMap,Mr=new WeakMap,_r=new WeakMap,Or=new WeakMap,Object.defineProperty(Ir,"__esModule",{value:!0}),Ir.SnapshotSourceModule=void 0;const Tr=d,$r=Er,Br=xr;class Gr extends Tr.Base{async init(e){if(this.wire.sendAction("snapshot-source-init").catch((e=>{})),"object"!=typeof e||"function"!=typeof e.getSnapshot||"function"!=typeof e.applySnapshot)throw new Error("you must pass in a valid SnapshotProvider");const t=await this.fin.InterApplicationBus.Channel.create((0,Br.getSnapshotSourceChannelName)(this.fin.me));t.register("get-snapshot",(async()=>({snapshot:await e.getSnapshot()}))),t.register("apply-snapshot",(({snapshot:t})=>e.applySnapshot(t)))}wrapSync(e){return this.wire.sendAction("snapshot-source-wrap-sync").catch((e=>{})),new $r.SnapshotSource(this.wire,e)}async wrap(e){return this.wire.sendAction("snapshot-source-wrap").catch((e=>{})),this.wrapSync(e)}}Ir.SnapshotSourceModule=Gr,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Ir,e),n(Er,e)}(br),Object.defineProperty(a,"__esModule",{value:!0});var Wr=a.Fin=void 0;const Hr=t,Nr=c,Dr=ie(),Ur=Z(),Vr=de,zr=en,Kr=rn,qr=un,Jr=bn,Yr=J(),Zr=An,Qr=ki,Xr=Cr(),eo=br;class to extends Hr.EventEmitter{constructor(e){super(),this.wire=e,this.System=new Nr.System(e),this.Window=new Dr._WindowModule(e),this.Application=new Ur.ApplicationModule(e),this.InterApplicationBus=new Vr.InterApplicationBus(e),this.Clipboard=new zr.Clipboard(e),this.ExternalApplication=new Kr.ExternalApplicationModule(e),this.Frame=new qr._FrameModule(e),this.GlobalHotkey=new Jr.GlobalHotkey(e),this.Platform=new Zr.PlatformModule(e,this.InterApplicationBus.Channel),this.View=new Yr.ViewModule(e),this.Interop=new Xr.InteropModule(e),this.SnapshotSource=new eo.SnapshotSourceModule(e),e.registerFin(this),this.me=(0,Qr.getMe)(e),e.on("disconnected",(()=>{this.emit("disconnected")}))}}Wr=a.Fin=to;var no={},io={};function ro(e){return"string"==typeof e.manifestUrl}function oo(e){return ao(e)&&"string"==typeof e.address}function so(e){return oo(e)&&"string"==typeof e.token}function ao(e){return"string"==typeof e.uuid}function co(e){return e.runtime&&"string"==typeof e.runtime.version}function ho(e){return ao(e)&&co(e)}Object.defineProperty(io,"__esModule",{value:!0}),io.isInternalConnectConfig=io.isPortDiscoveryConfig=io.isNewConnectConfig=io.isConfigWithReceiver=io.isRemoteConfig=io.isExistingConnectConfig=io.isExternalConfig=void 0,io.isExternalConfig=ro,io.isExistingConnectConfig=oo,io.isRemoteConfig=so,io.isConfigWithReceiver=function(e){return"object"==typeof e.receiver&&so({...e,address:""})},io.isNewConnectConfig=ho,io.isPortDiscoveryConfig=function(e){return ro(e)&&co(e)||ho(e)},io.isInternalConnectConfig=function(e){return oo(e)||ho(e)};var lo={},uo={};Object.defineProperty(uo,"__esModule",{value:!0}),uo.EmitterMap=void 0;const po=t;function wo(e){return Buffer.from(e).toString("base64")}uo.EmitterMap=class{constructor(){this.storage=new Map}hashKeys(e){return e.map(wo).join("/")}getOrCreate(e){const t=this.hashKeys(e);return this.storage.has(t)||this.storage.set(t,new po.EventEmitter),this.storage.get(t)}has(e){return this.storage.has(this.hashKeys(e))}delete(e){const t=this.hashKeys(e);return this.storage.delete(t)}},Object.defineProperty(lo,"__esModule",{value:!0});const yo=uo;class fo extends yo.EmitterMap{constructor(){super(...arguments),this.dispatchEvent=e=>{if(function(e){return"process-desktop-event"===e.action}(e)){const{payload:t}=e,n=function(e){const{topic:t}=e;if("frame"===t||"window"===t||"view"===t){const{uuid:n,name:i}=e;return[t,n,i]}if("application"===t){const{uuid:n}=e;return[t,n]}return[t]}(t);if(this.has(n))return this.getOrCreate(n).emit(t.type,t),!0}return!1}}}lo.default=fo;var go,mo,vo=s&&s.__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},Co=s&&s.__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)},bo=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(no,"__esModule",{value:!0});var Io=no.Transport=void 0;const Eo=t,xo=io,Ao=g,Po=bo(lo),Mo=ki,_o=ke;class Oo extends Eo.EventEmitter{constructor(e,t,n){super(),this.wireListeners=new Map,this.topicRefMap=new Map,this.eventAggregator=new Po.default,this.messageHandlers=[this.eventAggregator.dispatchEvent],go.set(this,void 0),mo.set(this,void 0),this.connectSync=()=>{Co(this,go,"f").connectSync()},this.getPort=()=>Co(this,go,"f").getPort(),vo(this,go,new e(this.onmessage.bind(this)),"f"),this.environment=t,this.sendRaw=Co(this,go,"f").send.bind(Co(this,go,"f")),this.registerMessageHandler(this.handleMessage.bind(this)),Co(this,go,"f").on("disconnected",(()=>{for(const[,{handleNack:e}]of this.wireListeners)e({reason:"Remote connection has closed"});this.wireListeners.clear(),this.emit("disconnected")}));const{uuid:i,name:r}=n,o=this.environment.getCurrentEntityType();this.me=(0,Mo.getBaseMe)(o,i,r)}getFin(){if(!Co(this,mo,"f"))throw new Error("No Fin object registered for this transport");return Co(this,mo,"f")}registerFin(e){if(Co(this,mo,"f"))throw new Error("Fin object has already been registered for this transport");vo(this,mo,e,"f")}shutdown(){return Co(this,go,"f").shutdown()}async connect(e){if((0,xo.isConfigWithReceiver)(e))return await Co(this,go,"f").connect(e.receiver),this.authorize(e);if((0,xo.isRemoteConfig)(e))return this.connectRemote(e);if((0,xo.isExistingConnectConfig)(e))return this.connectByPort(e);if((0,xo.isNewConnectConfig)(e)){const t=await this.environment.retrievePort(e);return this.connectByPort({...e,address:`ws://localhost:${t}`})}}async connectRemote(e){return await Co(this,go,"f").connect(new(this.environment.getWsConstructor())(e.address)),this.authorize(e)}async connectByPort(e){const{address:t,uuid:n}=e,i={...e,type:"file-token"},r=Co(this,go,"f");await r.connect(new(this.environment.getWsConstructor())(e.address));const o=await this.sendAction("request-external-authorization",{uuid:n,type:"file-token"},!0);if("external-authorization-response"!==o.action)throw new Ao.UnexpectedActionError(o.action);return await this.environment.writeToken(o.payload.file,o.payload.token),this.authorize(i)}async authorize(e){const t=await this.sendAction("request-authorization",e,!0);if("authorization-response"!==t.action)throw new Ao.UnexpectedActionError(t.action);if(!0!==t.payload.success)throw new Ao.RuntimeError(t.payload)}sendAction(e,t={},n=!1){let i=()=>{};const r=Ao.RuntimeError.getCallSite(1),o=this.environment.getNextMessageId(),s=new Promise(((s,a)=>{i=a;const c={action:e,payload:t,messageId:o},d=Co(this,go,"f");return this.addWireListener(o,s,(e=>this.nackHandler(e,a,r)),n),d.send(c).catch(a)}));return Object.assign(s,{cancel:i,messageId:o})}nackHandler(e,t,n){t("string"==typeof e?e:new Ao.RuntimeError(e,n))}ferryAction(e){return new Promise(((t,n)=>{const i=this.environment.getNextMessageId();e.messageId=i;const r=e=>{t(e.payload)};return Co(this,go,"f").send(e).then((()=>this.addWireListener(i,r,(e=>this.nackHandler(e,n)),!1))).catch(n)}))}registerMessageHandler(e){this.messageHandlers.push(e)}addWireListener(e,t,n,i){i?this.uncorrelatedListener=t:this.wireListeners.has(e)?n({reason:"Duplicate handler id",error:(0,_o.errorToPOJO)(new Ao.DuplicateCorrelationError(String(e)))}):this.wireListeners.set(e,{resolve:t,handleNack:n})}onmessage(e){for(const t of this.messageHandlers)t.call(null,e)}handleMessage(e){const t=e.correlationId||NaN;if("correlationId"in e){if(!this.wireListeners.has(t))return!1;{const{resolve:n,handleNack:i}=this.wireListeners.get(t);"ack"!==e.action?i({reason:"Did not receive ack action",error:(0,_o.errorToPOJO)(new Ao.NoAckError(e.action))}):"payload"in e?e.payload.success?n.call(null,e):i(e.payload):"string"==typeof e.reason?i(e):(console.warn("Received invalid response from core",e),i({reason:"invalid response shape"})),this.wireListeners.delete(t)}}else this.uncorrelatedListener&&this.uncorrelatedListener.call(null,e),this.uncorrelatedListener=()=>{};return!0}}Io=no.Transport=Oo,go=new WeakMap,mo=new WeakMap;const So=(...e)=>({log:(...t)=>console.debug(`[${(new Date).toISOString()}]`,...(e=>e.map((e=>`[${e}]`)))(e),...t),getLogger:(...t)=>So(...e,...t)}),Ro=So("@openfin/core-web/client");function Fo(e,t){if(!function(e){return"string"==typeof e}(e))throw new Error(`Property ${t} has invalid type. Expected string, got ${typeof e}.`)}const jo="web-broker-ports-ready",ko=Ro.getLogger("get-web-interop-ports");function Lo(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)}function To(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}"function"==typeof SuppressedError&&SuppressedError;const $o=e=>{var n,i,r;return r=class extends t.EventEmitter{constructor(t){super(),n.set(this,void 0),i.set(this,!1),this.connectSync=()=>{Lo(this,i,"f")||(e.addEventListener("message",(e=>{e.data?.topic?.startsWith("wire-message")&&e.data.message&&Lo(this,n,"f").call(this,{...JSON.parse(e.data.message),ports:e.ports})})),e.start())},this.connect=async()=>{this.connectSync()},this.send=t=>(e.postMessage({topic:"wire-message",message:JSON.stringify(t)}),Promise.resolve()),this.shutdown=async()=>{e.close()},To(this,n,t,"f")}getPort(){return e}},n=new WeakMap,i=new WeakMap,r};var Bo={},Go={};Object.defineProperty(Go,"__esModule",{value:!0}),Go.BaseEnvironment=void 0;const Wo=vr();Go.BaseEnvironment=class{async getViewWindowIdentity(e,t){const{identity:n}=await e.View.wrapSync(t).getCurrentWindow();return n}async getInteropInfo(e){const t=await e.Application.getCurrentSync().getInfo().catch((()=>null)),n=t?.initialOptions?.interopBrokerConfiguration??{};return{fdc3Version:t?(0,Wo.getDefaultViewFdc3VersionFromAppInfo)(t):void 0,...n,fdc3Info:{providerVersion:await e.System.getVersion(),provider:"OpenFin"}}}},Object.defineProperty(Bo,"__esModule",{value:!0});var Ho=Bo.BrowserEnvironment=void 0;const No=Go;class Do extends No.BaseEnvironment{constructor(){super(...arguments),this.type="other",this.getRandomId=()=>{const e=new Uint32Array(1);return window.crypto.getRandomValues(e)[0].toString(32)}}getAdapterVersionSync(){return""}observeBounds(e,t){throw new Error("Method not implemented.")}layoutAllowedInContext(e){return!1}initLayoutManager(e,t,n){throw new Error("Method not implemented.")}applyLayoutSnapshot(e,t,n){throw new Error("Method not implemented.")}createLayout(e,t){throw new Error("Method not implemented.")}destroyLayout(e,t){throw new Error("Method not implemented.")}resolveLayout(e,t){throw new Error("Method not implemented.")}initPlatform(...e){throw new Error("Method not implemented.")}writeToken(e,t){return Promise.resolve("")}retrievePort(e){throw new Error("Method not implemented.")}getNextMessageId(){return this.getRandomId()}createChildContent(e){throw new Error("Method not implemented.")}getWebWindow(e){throw new Error("Method not implemented.")}getCurrentEntityIdentity(){throw new Error("Method not implemented.")}getCurrentEntityType(){return"external connection"}raiseEvent(e,t){throw new Error("Method not implemented.")}getUrl(){return location.href}getDefaultChannelOptions(){return{create:{},connect:{}}}getRtcPeer(){return new RTCPeerConnection}getWsConstructor(){return WebSocket}whenReady(){return Promise.resolve()}}Ho=Bo.BrowserEnvironment=Do;const Uo=e=>"platform"in e&&void 0!==e.platform;var Vo,zo;class Ko extends Ho{constructor(e){super(),this.connectConfig=e,Vo.set(this,void 0),zo.set(this,new W((async()=>Promise.resolve().then((function(){return __webpack_require__(/*! ./main-b14f67c9.js */ "./node_modules/@openfin/core-web/out/main-b14f67c9.js")}))))),Uo(e)&&this.validatePlatformOptions(e)}getAdapterVersionSync(){return"0.39.21"}validatePlatformOptions({platform:e}){if(!("layoutSnapshot"in e))throw new Error("Platform options are missing layoutSnapshot. Please provide a layoutSnapshot in the platform options.");if("windows"in e||"windows"in e.layoutSnapshot)throw new Error("It appears you tried to call connect() with a snapshot object from an OpenFin desktop environment. Note that connect() expects to be called with a platform property with this structure: { platform: { layoutSnapshot } }. To get a layoutSnapshot of the expected structure, use fin.Platform.Layout.getCurrentLayoutManagerSync().getLayoutSnapshot() in v34+ in your desktop environment.");const{layouts:t}=e.layoutSnapshot;Object.entries(t).map((([e,t])=>{if("object"!=typeof t||null===t)throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must be an object.`);if(!("content"in t))throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must contain a 'content' property.`)}))}async getInteropInfo(e){return{...{contextGroups:void 0,logging:{beforeAction:{enabled:!1},afterAction:{enabled:!1}}},fdc3Version:void 0,fdc3Info:{providerVersion:"0.39.21",provider:"OpenFin Web"}}}layoutAllowedInContext(e){return!0}async initLayoutManager(e,t,n){if(Lo(this,Vo,"f"))throw new Error("Layout already initialized.");if(!Uo(this.connectConfig))throw new Error("Platform options are missing from connection config.");const{WebLayoutEntryPoint:i}=await Lo(this,zo,"f").getValue();return To(this,Vo,new i(this.connectConfig),"f"),await Lo(this,Vo,"f").initLayoutManager(e,t,n)}async applyLayoutSnapshot(e,t,n){Lo(this,Vo,"f")?.applyLayoutSnapshot(e,t,n)}async createLayout(e,t){return Lo(this,Vo,"f")?.createLayout(e,t)}async destroyLayout(e,t){return Lo(this,Vo,"f")?.destroyLayout(e,t)}async getViewWindowIdentity(e,t){return Promise.resolve({uuid:t.uuid,name:t.uuid})}}Vo=new WeakMap,zo=new WeakMap;const qo=()=>{const e=((e,t)=>{const n=new RegExp(`^${t}<(?.*)>$`).exec(e)?.groups?.meta;if(n)try{return JSON.parse(atob(n))}catch(e){throw new Error(`Failed to decode JSON from ${n}.`)}})(window.name,"of-frame");if(e)try{const{name:t,uuid:n,brokerUrl:i,providerId:r,contextGroup:o}=e;return Fo(i,"brokerUrl"),Fo(n,"uuid"),Fo(t,"name"),{identity:{name:t,uuid:n},brokerUrl:i,interopConfig:{providerId:r,currentContextGroup:o}}}catch(e){throw new Error(`Unexpected error occurred when inferring platform information: ${e.stack}`)}},Jo=()=>{const e=r.v4();return{uuid:e,name:e}},Yo=async e=>{if("enabled"===e.connectionInheritance){const t=await(async e=>{const t=qo();if(t){const{validateOptions:n=(()=>!0)}=e,{identity:i,...r}=t;if(!await n(r))throw new Error("Parent options were rejected by validateOptions.");return t}})(e);if(t)return t}if(!e.options){const t="enabled"===e.connectionInheritance?"Broker URL was not specified nor provided by a platform container.":"Connection inheritance is disabled but no options were provided.";throw new Error(t)}return{...e.options,identity:Jo()}};exports.__classPrivateFieldGet=Lo,exports.__classPrivateFieldSet=To,exports.apiExposer=Gn,exports.commonjsGlobal=s,exports.connect=async t=>{try{Ro.log("Establishing connection",t);const{brokerUrl:n,identity:i,timeout:r,interopConfig:s}=await Yo(t),{workerPort:a,iframeBrokerPort:c}=await(async(e,t,n)=>{const{origin:i}=new URL(e),r=document.createElement("IFRAME");let s;r.style.display="none";try{return await new Promise(((a,c)=>{const d=e=>{if(e.source===r.contentWindow&&e.data?.topic===`ack-${jo}`){if(e.origin!==i)c(new Error(`Broker redirected to unexpected origin ${e.origin}, expected ${i}.`));else if(e.data.success){const[t,n]=e.ports;a({iframeBrokerPort:t,workerPort:n})}else c(new m(e.data));window.removeEventListener("message",d),clearTimeout(s)}};window.addEventListener("message",d),ko.log(`Connecting to broker ${e}`),r.setAttribute("src",e),r.setAttribute("name",o(t,"of-broker")),document.body.appendChild(r),ko.log("Iframe loaded, awaiting init message from iframe"),n&&(s=setTimeout((()=>{window.removeEventListener("message",d),document.body.removeChild(r),c(new Error("Worker did not initialize in time"))}),n))}))}catch(e){throw new Error(`Failed to initialise Fin Web Client. ${e.message}`,{cause:e})}})(n,i,r);Ro.log("Successfully established connection to shared worker");const d={entityType:"external connection",...i};a.start(),c.start();const h=((t,n,i)=>{const r=$o(n),o=new Ko(t),s=new Io(r,o,i);return s.connectSync(),window.Buffer=e.Buffer,new Wr(s)})(t,a,d);return s?.providerId&&(h.me.interop=h.Interop.connectSync(s.providerId),s?.currentContextGroup&&h.me.interop.joinContextGroup(s.currentContextGroup).catch((e=>{console.warn(`Error joining specified context group: ${s?.currentContextGroup}, continuing`,e)}))),{...h,me:{...h.me,identity:{uuid:h.me.uuid,name:h.me.name}}}}catch(e){throw new Error(`An error occured during web-interop connection: ${e.message}`)}},exports.decorators=Nn,exports.encodeOptions=o,exports.layout_constants=ai,exports.lazy=G; +var e=__webpack_require__(/*! buffer/ */ "../../node_modules/buffer/index.js"),t=__webpack_require__(/*! events */ "../../node_modules/events/events.js"),n=__webpack_require__(/*! lodash/cloneDeep */ "../../node_modules/lodash/cloneDeep.js"),i=__webpack_require__(/*! lodash/isEqual */ "../../node_modules/lodash/isEqual.js"),r=__webpack_require__(/*! uuid */ "../../node_modules/uuid/dist/esm-browser/index.js");const o=(e,t)=>`${t}<${btoa(JSON.stringify(e))}>`;var s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof __webpack_require__.g?__webpack_require__.g:"undefined"!=typeof self?self:{},a={},c={},d={},h={};async function l(e){const t=[];for(const n of e){const e=await n();t.push(e)}return t}Object.defineProperty(h,"__esModule",{value:!0}),h.promiseMapSerial=h.serial=h.promiseMap=h.promisify=void 0,h.promisify=function(e){return(...t)=>new Promise(((n,i)=>{e(...t,((e,t)=>e?i(e):n(t)))}))},h.promiseMap=async function(e,t){return Promise.all(e.map(t))},h.serial=l,h.promiseMapSerial=async function(e,t){return l(e.map(((e,n,i)=>()=>t(e,n,i))))};var u,p=s&&s.__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},w=s&&s.__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)};Object.defineProperty(d,"__esModule",{value:!0}),d.Reply=d.EmitterBase=d.Base=void 0;const y=h;class f{constructor(e){this.isNodeEnvironment=()=>"node"===this.wire.environment.type,this.isOpenFinEnvironment=()=>"openfin"===this.wire.environment.type,this.isBrowserEnvironment=()=>"other"===this.wire.environment.type,this.wire=e}get fin(){return this.wire.getFin()}get me(){return this.wire.me}}d.Base=f;d.EmitterBase=class extends f{constructor(e,t,...n){super(e),this.topic=t,u.set(this,void 0),this.eventNames=()=>this.hasEmitter()?this.getOrCreateEmitter().eventNames():[],this.emit=(e,t,...n)=>!!this.hasEmitter()&&this.getOrCreateEmitter().emit(e,t,...n),this.hasEmitter=()=>this.wire.eventAggregator.has(w(this,u,"f")),this.getOrCreateEmitter=()=>this.wire.eventAggregator.getOrCreate(w(this,u,"f")),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[],this.listenerCount=e=>this.hasEmitter()?this.getOrCreateEmitter().listenerCount(e):0,this.registerEventListener=async(e,t={},n,i)=>{const r={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e},o=this.getOrCreateEmitter();n(o);try{await this.wire.sendAction("subscribe-to-desktop-event",r)}catch(e){throw i(o),this.deleteEmitterIfNothingRegistered(o),e}},this.deregisterEventListener=async(e,t={})=>{if(this.hasEmitter()){const n={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e};await this.wire.sendAction("unsubscribe-to-desktop-event",n).catch((()=>null));return this.getOrCreateEmitter()}return Promise.resolve()},p(this,u,[t,...n],"f"),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[]}async on(e,t,n){return await this.registerEventListener(e,n,(n=>{n.on(e,t)}),(n=>{n.removeListener(e,t)})),this}async addListener(e,t,n){return this.on(e,t,n)}async once(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.once(e,i),n.once(e,t)}),(n=>{n.removeListener(e,i),n.removeListener(e,t)})),this}async prependListener(e,t,n){return await this.registerEventListener(e,n,(n=>{n.prependListener(e,t)}),(n=>{n.removeListener(e,t)})),this}async prependOnceListener(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.prependOnceListener(e,t),n.once(e,i)}),(n=>{n.removeListener(e,t),n.removeListener(e,i)})),this}async removeListener(e,t,n){const i=await this.deregisterEventListener(e,n);return i&&(i.removeListener(e,t),this.deleteEmitterIfNothingRegistered(i)),this}async deregisterAllListeners(e){const t={...this.identity,type:e,topic:this.topic};if(this.hasEmitter()){const e=this.getOrCreateEmitter(),n=e.listenerCount(t.type),i=[];for(let e=0;enull)));return await Promise.all(i),e}}async removeAllListeners(e){const t=async e=>{const t=await this.deregisterAllListeners(e);t&&(t.removeAllListeners(e),this.deleteEmitterIfNothingRegistered(t))};if(e)await t(e);else if(this.hasEmitter()){const e=this.getOrCreateEmitter().eventNames();await(0,y.promiseMap)(e,t)}return this}deleteEmitterIfNothingRegistered(e){0===e.eventNames().length&&this.wire.eventAggregator.delete(w(this,u,"f"))}},u=new WeakMap;d.Reply=class{};var g={};Object.defineProperty(g,"__esModule",{value:!0});var m=g.RuntimeError=g.NotSupportedError=g.NotImplementedError=g.NoAckError=g.DuplicateCorrelationError=g.UnexpectedActionError=g.DisconnectedError=void 0;class v extends Error{constructor(e){super(`Expected websocket state OPEN but found ${e}`),this.readyState=e}}g.DisconnectedError=v;class C extends Error{}g.UnexpectedActionError=C;class b extends Error{}g.DuplicateCorrelationError=b;class I extends Error{}g.NoAckError=I;class E extends Error{}g.NotImplementedError=E;class x extends Error{}g.NotSupportedError=x;class A extends Error{constructor(e){const{message:t,name:n,stack:i,...r}=e;super(t),this.name=n||"Error",this.stack=i??this.toString(),Object.keys(r).forEach((e=>{this[e]=r[e]}))}}class P extends Error{static getCallSite(e=0){const t=Error.stackTraceLimit,n=e+1;Error.stackTraceLimit=t+n;const i=Error.prepareStackTrace;Error.prepareStackTrace=(e,t)=>t;const r=(new Error).stack?.slice(n)??[];return Error.prepareStackTrace=i,Error.stackTraceLimit=t,r}static prepareStackTrace(e,t){if("function"==typeof Error.prepareStackTrace)return Error.prepareStackTrace(e,t);let n="";n+=e.name||"Error",n+=`: ${e.message||""}`;for(const e of t)n+=`\n at ${e.toString()}`;return n}constructor(e,t){const{reason:n,error:i}=e;super(n),this.name="RuntimeError",i?.stack&&(this.cause=new A(i)),t&&(this.stack=P.prepareStackTrace(this,t))}}m=g.RuntimeError=P;var M={},_={},O={};Object.defineProperty(O,"__esModule",{value:!0}),O.validateIdentity=void 0,O.validateIdentity=function(e){let t;return"object"==typeof e&&"string"==typeof e.uuid||(t="Not a valid identity object"),t};var S={},R={},F={},j={},k={},L={},T={};Object.defineProperty(T,"__esModule",{value:!0}),T.handleDeprecatedWarnings=void 0;var $;T.handleDeprecatedWarnings=e=>{(e.contentNavigation?.whitelist||e.contentNavigation?.blacklist||e.contentRedirect?.whitelist||e.contentRedirect?.blacklist)&&console.warn("The properties 'whitelist' and 'blacklist' have been marked as deprecated and will be removed in a future version. Please use 'allowlist' and 'denylist'.")};var B={},G={};Object.defineProperty(G,"__esModule",{value:!0}),G.AsyncRetryableLazy=W=G.Lazy=void 0;var W=G.Lazy=class{constructor(e){this.producerFn=e}getValue(){return this.value||(this.value=this.producerFn()),this.value}};G.AsyncRetryableLazy=class{constructor(e){this.producerFn=e}async getValue(){return this.promise||(this.promise=this.producerFn().catch((e=>{throw delete this.promise,e}))),this.promise}};var H={};Object.defineProperty(H,"__esModule",{value:!0}),H.WebContents=void 0;const N=d;class D extends N.EmitterBase{constructor(e,t,n){super(e,n,t.uuid,t.name),this.identity=t,this.entityType=n}capturePage(e){return this.wire.sendAction("capture-page",{options:e,...this.identity}).then((({payload:e})=>e.data))}executeJavaScript(e){return this.wire.sendAction("execute-javascript-in-window",{...this.identity,code:e}).then((({payload:e})=>e.data))}getZoomLevel(){return this.wire.sendAction("get-zoom-level",this.identity).then((({payload:e})=>e.data))}setZoomLevel(e){return this.wire.sendAction("set-zoom-level",{...this.identity,level:e}).then((()=>{}))}navigate(e){return this.wire.sendAction("navigate-window",{...this.identity,url:e}).then((()=>{}))}navigateBack(){return this.wire.sendAction("navigate-window-back",{...this.identity}).then((()=>{}))}async navigateForward(){await this.wire.sendAction("navigate-window-forward",{...this.identity})}stopNavigation(){return this.wire.sendAction("stop-window-navigation",{...this.identity}).then((()=>{}))}reload(e=!1){return this.wire.sendAction("reload-window",{ignoreCache:e,...this.identity}).then((()=>{}))}print(e={}){return this.wire.sendAction("print",{...this.identity,options:e}).then((()=>{}))}findInPage(e,t){return this.wire.sendAction("find-in-page",{...this.identity,searchTerm:e,options:t}).then((({payload:e})=>e.data))}stopFindInPage(e){return this.wire.sendAction("stop-find-in-page",{...this.identity,action:e}).then((()=>{}))}getPrinters(){return this.wire.sendAction("get-printers",{...this.identity}).then((({payload:e})=>e.data))}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){await this.wire.sendAction("focus-window",{emitSynthFocused:e,...this.identity})}async showDeveloperTools(){await this.wire.sendAction("show-developer-tools",this.identity)}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction("get-process-info",this.identity);return e}async getSharedWorkers(){return this.wire.sendAction("get-shared-workers",this.identity).then((({payload:e})=>e.data))}async inspectSharedWorker(){await this.wire.sendAction("inspect-shared-worker",{...this.identity})}async inspectSharedWorkerById(e){await this.wire.sendAction("inspect-shared-worker-by-id",{...this.identity,workerId:e})}async inspectServiceWorker(){await this.wire.sendAction("inspect-service-worker",{...this.identity})}async showPopupWindow(e){if(this.wire.sendAction(`${this.entityType}-show-popup-window`,this.identity).catch((()=>{})),e?.onPopupReady){const t=async({popupName:t})=>{try{const n=this.fin.Window.wrapSync({uuid:this.fin.me.uuid,name:t});await e.onPopupReady(n)}catch(e){throw new Error(`Something went wrong during onPopupReady execution: ${e}`)}};await this.once("popup-ready",t)}const{payload:t}=await this.wire.sendAction("try-create-popup-window",{options:{...e,hasResultCallback:!!e?.onPopupResult,hasReadyCallback:!!e?.onPopupReady},...this.identity}),{data:{willOpen:n,options:i}}=t;n&&await this.fin.Window.create(i.initialOptions);if(e?.onPopupResult){const t=async t=>{await e.onPopupResult((e=>{const{name:t,uuid:n,result:i,data:r}=e,o={identity:{name:t,uuid:n},result:i};return r&&(o.data=r),o})(t))},n=async()=>{await this.removeListener("popup-result",t)};await this.on("popup-result",t),await this.once("popup-teardown",n)}const{payload:r}=await this.wire.sendAction("show-popup-window",{options:i,...this.identity});return r.data}}var U,V,z,K,q;function J(){return V||(V=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(function(){if($)return L;$=1,Object.defineProperty(L,"__esModule",{value:!0}),L.ViewModule=void 0;const e=d,t=O,n=J(),i=T;class r extends e.Base{async create(e){const{uuid:t}=this.wire.me;if(!e.name||"string"!=typeof e.name)throw new Error("Please provide a name property as a string in order to create a View.");return(0,i.handleDeprecatedWarnings)(e),this.wire.environment.childViews?await this.wire.environment.createChildContent({entityType:"view",options:{...e,uuid:t}}):await this.wire.sendAction("create-view",{...e,uuid:t}),this.wrapSync({uuid:t,name:e.name})}async wrap(e){this.wire.sendAction("view-wrap").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}wrapSync(e){this.wire.sendAction("view-wrap-sync").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}getCurrent(){if(this.wire.sendAction("view-get-current").catch((e=>{})),!this.wire.me.isView)throw new Error("You are not in a View context");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction("view-get-current-sync").catch((e=>{})),!this.wire.me.isView)throw new Error("You are not in a View context");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return L.ViewModule=r,L}(),e),n(function(){if(U)return B;var e;U=1,Object.defineProperty(B,"__esModule",{value:!0}),B.View=void 0;const t=g,n=G,i=H,r=ie();class o extends i.WebContents{constructor(i,o){super(i,o,"view"),this.identity=o,e.set(this,new n.Lazy((()=>this.fin.Platform.wrapSync(this.identity).getClient()))),this.attach=async e=>{await this.wire.sendAction("attach-view",{target:e,...this.identity})},this.destroy=async()=>{await this.wire.sendAction("destroy-view",{...this.identity})},this.show=async()=>{await this.wire.sendAction("show-view",{...this.identity})},this.showAt=async(e,t={})=>{await this.wire.sendAction("show-view-at",{bounds:e,...this.identity,options:t})},this.bringToFront=async()=>{await this.wire.sendAction("bring-view-to-front",{...this.identity})},this.hide=async()=>{await this.wire.sendAction("hide-view",{...this.identity})},this.setBounds=async e=>{await this.wire.sendAction("set-view-bounds",{bounds:e,...this.identity})},this.getBounds=async()=>(await this.wire.sendAction("get-view-bounds",{...this.identity})).payload.data,this.getInfo=async()=>(await this.wire.sendAction("get-view-info",{...this.identity})).payload.data,this.getParentLayout=async()=>(this.wire.sendAction("view-get-parent-layout",{...this.identity}).catch((()=>{})),this.fin.Platform.Layout.getLayoutByViewIdentity(this.identity)),this.getOptions=async()=>this.wire.sendAction("get-view-options",{...this.identity}).then((({payload:e})=>e.data)),this.updateOptions=async e=>this.wire.sendAction("update-view-options",{options:e,...this.identity}).then((()=>{})),this.getCurrentWindow=async()=>{const{payload:{data:e}}=await this.wire.sendAction("get-view-window",{...this.identity});return new r._Window(this.wire,e)},this.getCurrentStack=async()=>{this.wire.sendAction("view-get-current-stack").catch((()=>{}));try{return(await this.getParentLayout()).getStackByViewIdentity(this.identity)}catch(e){throw new t.RuntimeError({reason:"This view does not belong to a stack.",error:e})}},this.triggerBeforeUnload=async()=>(await this.wire.sendAction("trigger-before-unload",{...this.identity})).payload.data,this.bindToElement=async e=>{if(!e)throw new Error("Element not found.");return this.wire.environment.observeBounds(e,(async e=>this.setBounds(e)))}}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){const t=await this.getCurrentWindow();await t.focusedWebViewWasChanged(),await super.focus({emitSynthFocused:e})}}return B.View=o,e=new WeakMap,B}(),e)}(k)),k}function Y(){if(z)return j;z=1,Object.defineProperty(j,"__esModule",{value:!0}),j.Application=void 0;const e=d,t=ie(),n=J();class i extends e.EmitterBase{constructor(e,n){super(e,"application",n.uuid),this.identity=n,this.window=new t._Window(this.wire,{uuid:this.identity.uuid,name:this.identity.uuid})}windowListFromIdentityList(e){const n=[];return e.forEach((e=>{n.push(new t._Window(this.wire,{uuid:e.uuid,name:e.name}))})),n}isRunning(){return this.wire.sendAction("is-application-running",this.identity).then((({payload:e})=>e.data))}async quit(e=!1){try{await this._close(e),await this.wire.sendAction("destroy-application",{force:e,...this.identity})}catch(e){if(!["Remote connection has closed","Could not locate the requested application"].some((t=>e.message.includes(t))))throw e}}async _close(e=!1){try{await this.wire.sendAction("close-application",{force:e,...this.identity})}catch(e){if(!e.message.includes("Remote connection has closed"))throw e}}close(e=!1){return console.warn("Deprecation Warning: Application.close is deprecated Please use Application.quit"),this.wire.sendAction("application-close",this.identity).catch((e=>{})),this._close(e)}getChildWindows(){return this.wire.sendAction("get-child-windows",this.identity).then((({payload:e})=>{const t=[];return e.data.forEach((e=>{t.push({uuid:this.identity.uuid,name:e})})),this.windowListFromIdentityList(t)}))}getManifest(){return this.wire.sendAction("get-application-manifest",this.identity).then((({payload:e})=>e.data))}getParentUuid(){return this.wire.sendAction("get-parent-application",this.identity).then((({payload:e})=>e.data))}getShortcuts(){return this.wire.sendAction("get-shortcuts",this.identity).then((({payload:e})=>e.data))}async getViews(){const{payload:e}=await this.wire.sendAction("application-get-views",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}getZoomLevel(){return this.wire.sendAction("get-application-zoom-level",this.identity).then((({payload:e})=>e.data))}getWindow(){return this.wire.sendAction("application-get-window",this.identity).catch((e=>{})),Promise.resolve(this.window)}registerUser(e,t){return this.wire.sendAction("register-user",{userName:e,appName:t,...this.identity}).then((()=>{}))}removeTrayIcon(){return this.wire.sendAction("remove-tray-icon",this.identity).then((()=>{}))}restart(){return this.wire.sendAction("restart-application",this.identity).then((()=>{}))}run(){return console.warn("Deprecation Warning: Application.run is deprecated Please use fin.Application.start"),this.wire.sendAction("application-run",this.identity).catch((e=>{})),this._run()}_run(e={}){return this.wire.sendAction("run-application",{manifestUrl:this._manifestUrl,opts:e,...this.identity}).then((()=>{}))}scheduleRestart(){return this.wire.sendAction("relaunch-on-close",this.identity).then((()=>{}))}async sendApplicationLog(){const{payload:e}=await this.wire.sendAction("send-application-log",this.identity);return e.data}async setJumpList(e){await this.wire.sendAction("set-jump-list",{config:e,...this.identity})}setTrayIcon(e){return this.wire.sendAction("set-tray-icon",{enabledIcon:e,...this.identity}).then((()=>{}))}setShortcuts(e){return this.wire.sendAction("set-shortcuts",{data:e,...this.identity}).then((()=>{}))}async setShortcutQueryParams(e){await this.wire.sendAction("set-shortcut-query-args",{data:e,...this.identity})}setZoomLevel(e){return this.wire.sendAction("set-application-zoom-level",{level:e,...this.identity}).then((()=>{}))}async setAppLogUsername(e){await this.wire.sendAction("set-app-log-username",{data:e,...this.identity})}getTrayIconInfo(){return this.wire.sendAction("get-tray-icon-info",this.identity).then((({payload:e})=>e.data))}hasTrayIcon(){return this.wire.sendAction("has-tray-icon",this.identity).then((({payload:e})=>e.data))}terminate(){return this.wire.sendAction("terminate-application",this.identity).then((()=>{}))}wait(){return this.wire.sendAction("wait-for-hung-application",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction("get-info",this.identity).then((({payload:e})=>e.data))}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction("application-get-process-info",this.identity);return e}async setFileDownloadLocation(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t};await this.wire.sendAction("set-file-download-location",{...n,downloadLocation:e})}async getFileDownloadLocation(){const{payload:{data:e}}=await this.wire.sendAction("get-file-download-location",this.identity);return e}async showTrayIconPopupMenu(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t},{payload:i}=await this.wire.sendAction("show-tray-icon-popup-menu",{...n,options:e});return i.data}async closeTrayIconPopupMenu(){const{name:e}=this.wire.me,t={uuid:this.identity.uuid,name:e};await this.wire.sendAction("close-tray-icon-popup-menu",{...t})}}return j.Application=i,j}function Z(){return q||(q=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(function(){if(K)return F;K=1,Object.defineProperty(F,"__esModule",{value:!0}),F.ApplicationModule=void 0;const e=d,t=O,n=Y();class i extends e.Base{async wrap(e){this.wire.sendAction("wrap-application").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}wrapSync(e){this.wire.sendAction("wrap-application-sync").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}async _create(e){return void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&void 0===e.isPlatformController&&(e.autoShow=!0),await this.wire.sendAction("create-application",e),this.wrap({uuid:e.uuid})}create(e){return console.warn("Deprecation Warning: fin.Application.create is deprecated. Please use fin.Application.start"),this.wire.sendAction("application-create").catch((e=>{})),this._create(e)}async start(e){this.wire.sendAction("start-application").catch((e=>{}));const t=await this._create(e);return await this.wire.sendAction("run-application",{uuid:e.uuid}),t}async startManyManifests(e,t){return this.wire.sendAction("run-applications",{applications:e,opts:t}).then((()=>{}))}getCurrent(){return this.wire.sendAction("get-current-application").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction("get-current-application-sync").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}async startFromManifest(e,t){this.wire.sendAction("application-start-from-manifest").catch((e=>{}));const n=await this._createFromManifest(e);return await n._run(t),n}createFromManifest(e){return console.warn("Deprecation Warning: fin.Application.createFromManifest is deprecated. Please use fin.Application.startFromManifest"),this.wire.sendAction("application-create-from-manifest").catch((e=>{})),this._createFromManifest(e)}_createFromManifest(e){return this.wire.sendAction("get-application-manifest",{manifestUrl:e}).then((({payload:e})=>{const t=e.data.platform?e.data.platform.uuid:e.data.startup_app.uuid;return this.wrap({uuid:t})})).then((t=>(t._manifestUrl=e,t)))}}return F.ApplicationModule=i,F}(),e),n(Y(),e)}(R)),R}H.WebContents=D;var Q={};Object.defineProperty(Q,"__esModule",{value:!0}),Q.promisifySubscription=void 0;var X,ee,te;function ne(){if(X)return S;X=1,Object.defineProperty(S,"__esModule",{value:!0}),S._Window=void 0;const e=Z(),t=H,n=J(),i=T,r=Q;class o extends t.WebContents{constructor(e,t){super(e,t,"window")}async createWindow(e){this.wire.sendAction("window-create-window",this.identity).catch((e=>{}));const t=await(0,r.promisifySubscription)(this,"fire-constructor-callback");void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&(e.autoShow=!0),(0,i.handleDeprecatedWarnings)(e);const n=this.wire.environment.createChildContent({entityType:"window",options:e}),[o]=await Promise.all([t.getValue(),n]);let s;const{success:a}=o,c=o.data,{message:d}=c;s=a?{httpResponseCode:c.httpResponseCode,apiInjected:c.apiInjected}:{message:c.message,networkErrorCode:c.networkErrorCode,stack:c.stack};const h={message:d,cbPayload:s,success:a};try{this.getWebWindow().fin.__internal_.openerSuccessCBCalled()}catch(e){}return h.success?this:Promise.reject(h)}getAllFrames(){return this.wire.sendAction("get-all-frames",this.identity).then((({payload:e})=>e.data))}getBounds(){return this.wire.sendAction("get-window-bounds",this.identity).then((({payload:e})=>e.data))}center(){return this.wire.sendAction("center-window",this.identity).then((()=>{}))}blur(){return this.wire.sendAction("blur-window",this.identity).then((()=>{}))}bringToFront(){return this.wire.sendAction("bring-window-to-front",this.identity).then((()=>{}))}animate(e,t){return this.wire.sendAction("animate-window",{transitions:e,options:t,...this.identity}).then((()=>{}))}hide(){return this.wire.sendAction("hide-window",this.identity).then((()=>{}))}close(e=!1){return this.wire.sendAction("close-window",{force:e,...this.identity}).then((()=>{Object.setPrototypeOf(this,null)}))}focusedWebViewWasChanged(){return this.wire.sendAction("focused-webview-changed",this.identity).then((()=>{}))}getNativeId(){return this.wire.sendAction("get-window-native-id",this.identity).then((({payload:e})=>e.data))}async getCurrentViews(){const{payload:e}=await this.wire.sendAction("window-get-views",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}disableFrame(){return console.warn("Function is deprecated; use disableUserMovement instead."),this.wire.sendAction("disable-window-frame",this.identity).then((()=>{}))}disableUserMovement(){return this.wire.sendAction("disable-window-frame",this.identity).then((()=>{}))}enableFrame(){return console.warn("Function is deprecated; use enableUserMovement instead."),this.wire.sendAction("enable-window-frame",this.identity).then((()=>{}))}enableUserMovement(){return this.wire.sendAction("enable-window-frame",this.identity).then((()=>{}))}flash(){return this.wire.sendAction("flash-window",this.identity).then((()=>{}))}stopFlashing(){return this.wire.sendAction("stop-flash-window",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction("get-window-info",this.identity).then((({payload:e})=>e.data))}async getLayout(e){this.wire.sendAction("window-get-layout",this.identity).catch((e=>{}));const t=await this.getOptions();if(!t.layout&&!t.layoutSnapshot)throw new Error("Window does not have a Layout");return this.fin.Platform.Layout.wrap(e??this.identity)}getOptions(){return this.wire.sendAction("get-window-options",this.identity).then((({payload:e})=>e.data))}getParentApplication(){return this.wire.sendAction("window-get-parent-application",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity))}getParentWindow(){return this.wire.sendAction("window-get-parent-window",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity)).then((e=>e.getWindow()))}async getSnapshot(e){const t={area:e,...this.identity};console.warn("Window.getSnapshot has been deprecated, please use Window.capturePage");return(await this.wire.sendAction("get-window-snapshot",t)).payload.data}getState(){return this.wire.sendAction("get-window-state",this.identity).then((({payload:e})=>e.data))}getWebWindow(){return this.wire.sendAction("window-get-web-window",this.identity).catch((e=>{})),this.wire.environment.getWebWindow(this.identity)}isMainWindow(){return this.wire.sendAction("window-is-main-window",this.identity).catch((e=>{})),this.me.uuid===this.me.name}isShowing(){return this.wire.sendAction("is-window-showing",this.identity).then((({payload:e})=>e.data))}maximize(){return this.wire.sendAction("maximize-window",this.identity).then((()=>{}))}minimize(){return this.wire.sendAction("minimize-window",this.identity).then((()=>{}))}moveBy(e,t,n){return this.wire.sendAction("move-window-by",{deltaLeft:e,deltaTop:t,positioningOptions:n,...this.identity}).then((()=>{}))}moveTo(e,t,n){return this.wire.sendAction("move-window",{left:e,top:t,positioningOptions:n,...this.identity}).then((()=>{}))}resizeBy(e,t,n,i){return this.wire.sendAction("resize-window-by",{deltaWidth:Math.floor(e),deltaHeight:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}resizeTo(e,t,n,i){return this.wire.sendAction("resize-window",{width:Math.floor(e),height:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}restore(){return this.wire.sendAction("restore-window",this.identity).then((()=>{}))}setAsForeground(){return this.wire.sendAction("set-foreground-window",this.identity).then((()=>{}))}setBounds(e,t){return this.wire.sendAction("set-window-bounds",{...e,...this.identity,positioningOptions:t}).then((()=>{}))}show(e=!1){return this.wire.sendAction("show-window",{force:e,...this.identity}).then((()=>{}))}showAt(e,t,n=!1){return this.wire.sendAction("show-at-window",{force:n,left:Math.floor(e),top:Math.floor(t),...this.identity}).then((()=>{}))}updateOptions(e){return this.wire.sendAction("update-window-options",{options:e,...this.identity}).then((()=>{}))}authenticate(e,t){return this.wire.sendAction("window-authenticate",{userName:e,password:t,...this.identity}).then((()=>{}))}async showPopupMenu(e){const{payload:t}=await this.wire.sendAction("show-popup-menu",{options:e,...this.identity});return t.data}async closePopupMenu(){return this.wire.sendAction("close-popup-menu",{...this.identity}).then((()=>{}))}async dispatchPopupResult(e){this.wire.sendAction("window-dispatch-popup-result",this.identity).catch((e=>{})),await this.wire.sendAction("dispatch-popup-result",{data:e,...this.identity})}async print(e={content:"self"}){switch(e.content){case void 0:case"self":return super.print(e);case"screenshot":return this.wire.sendAction("print-screenshot",this.identity).then((()=>{}));case"views":return this.wire.sendAction("print-views",{...this.identity,options:e}).then((()=>{}));default:return}}}return S._Window=o,S}function ie(){return te||(te=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(function(){if(ee)return _;ee=1,Object.defineProperty(_,"__esModule",{value:!0}),_._WindowModule=void 0;const e=d,t=O,n=ne();class i extends e.Base{async wrap(e){this.wire.sendAction("window-wrap").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}wrapSync(e){this.wire.sendAction("window-wrap-sync").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}create(e){return this.wire.sendAction("create-window").catch((e=>{})),new n._Window(this.wire,{uuid:this.me.uuid,name:e.name}).createWindow(e)}getCurrent(){if(this.wire.sendAction("get-current-window").catch((e=>{})),!this.wire.me.isWindow)throw new Error("You are not in a Window context");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction("get-current-window-sync").catch((e=>{})),!this.wire.me.isWindow)throw new Error("You are not in a Window context");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return _._WindowModule=i,_}(),e),n(ne(),e)}(M)),M}Q.promisifySubscription=async(e,t,n=(()=>!0),i)=>{let r,o,s;const a=new Promise(((e,t)=>{r=e,o=t})),c=e=>{n(e)&&(clearTimeout(s),r(e))};return await e.on(t,c),i&&(s=setTimeout((()=>o(new Error("event timed out"))),i)),a.finally((()=>{e.removeListener(t,c).catch((()=>null))})),{getValue:()=>a}},Object.defineProperty(c,"__esModule",{value:!0}),c.System=void 0;const re=d,oe=g,se=ie(),ae=t;class ce extends re.EmitterBase{constructor(e){super(e,"system")}sendExternalProcessRequest(e,t){return new Promise(((n,i)=>{const r="external-process-exited";let o,s,a,c;"function"==typeof t.listener&&(a=e=>{const n=e||{};s={topic:"exited",uuid:n.processUuid||"",exitCode:n.exitCode||0},o===e.processUuid&&(t.listener(s),c.removeListener(r,a))},this.wire.me.name||(this.wire.me.name=this.wire.me.uuid),c=new se._Window(this.wire,this.wire.me),c.on(r,a)),this.wire.sendAction(e,t).then((({payload:e})=>{o=e.data.uuid,n(e.data),s&&o===s.uuid&&(t.listener(s),c.removeListener(r,a))})).catch((e=>{c&&c.removeListener(r,a),i(e)}))}))}getVersion(){return this.wire.sendAction("get-version").then((({payload:e})=>e.data))}clearCache(e){return this.wire.sendAction("clear-cache",e).then((()=>{}))}deleteCacheOnExit(){return this.wire.sendAction("delete-cache-request").then((()=>{}))}exit(){return this.wire.sendAction("exit-desktop").then((()=>{}))}async fetchManifest(e){const{payload:{data:t}}=await this.wire.sendAction("fetch-manifest",{manifestUrl:e});return t}flushCookieStore(){return this.wire.sendAction("flush-cookie-store").then((()=>{}))}getAllWindows(){return this.wire.sendAction("get-all-windows").then((({payload:e})=>e.data))}getAllApplications(){return this.wire.sendAction("get-all-applications").then((({payload:e})=>e.data))}getCommandLineArguments(){return this.wire.sendAction("get-command-line-arguments").then((({payload:e})=>e.data))}async getCrashReporterState(){const{payload:{data:{diagnosticMode:e,isRunning:t}}}=await this.wire.sendAction("get-crash-reporter-state");return console.warn("diagnosticMode property is deprecated. It will be removed in a future version"),{diagnosticMode:e,diagnosticsMode:e,isRunning:t}}async startCrashReporter(e){const t=e,n={...t,diagnosticMode:t.diagnosticsMode||t.diagnosticMode},{payload:{data:{diagnosticMode:i,isRunning:r}}}=await this.wire.sendAction("start-crash-reporter",n);return{diagnosticMode:i,diagnosticsMode:i,isRunning:r}}getUniqueUserId(){return this.wire.sendAction("get-unique-user-id").then((({payload:e})=>e.data))}getEntityInfo(e,t){return this.wire.sendAction("get-entity-info",{uuid:e,name:t}).then((({payload:e})=>e.data))}getEnvironmentVariable(e){return this.wire.sendAction("get-environment-variable",{environmentVariables:e}).then((({payload:e})=>e.data))}getFocusedWindow(){return this.wire.sendAction("get-focused-window").then((({payload:e})=>e.data))}async isAppCertified(e){const{payload:{data:{certifiedInfo:t}}}=await this.wire.sendAction("is-app-certified",{manifestUrl:e});return t}getInstalledRuntimes(){return this.wire.sendAction("get-installed-runtimes").then((({payload:e})=>e.data.runtimes))}async getInstalledApps(){const{payload:{data:{installedApps:e}}}=await this.wire.sendAction("get-installed-apps");return e}getLog(e){return this.wire.sendAction("view-log",e).then((({payload:e})=>e.data))}getMachineId(){return this.wire.sendAction("get-machine-id").then((({payload:e})=>e.data))}getMinLogLevel(){return this.wire.sendAction("get-min-log-level").then((({payload:e})=>e.data))}getLogList(){return this.wire.sendAction("list-logs").then((({payload:e})=>e.data))}getMonitorInfo(){return this.wire.sendAction("get-monitor-info").then((({payload:e})=>e.data))}getMousePosition(){return this.wire.sendAction("get-mouse-position").then((({payload:e})=>e.data))}getProcessList(){return console.warn("System.getProcessList has been deprecated. Please consider using our new process APIs: Window.getProcessInfo, View.getProcessInfo, Application.getProcessInfo, System.getAllProcessInfo"),this.wire.sendAction("process-snapshot").then((({payload:e})=>e.data))}async getAllProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction("get-all-process-info",this.identity);return e}getProxySettings(){return this.wire.sendAction("get-proxy-settings").then((({payload:e})=>e.data))}getRuntimeInfo(){return this.wire.sendAction("get-runtime-info").then((({payload:e})=>e.data))}getRvmInfo(){return this.wire.sendAction("get-rvm-info").then((({payload:e})=>e.data))}getHostSpecs(){return this.wire.sendAction("get-host-specs").then((({payload:e})=>e.data))}getOSInfo(){return this.wire.sendAction("get-os-info").then((({payload:e})=>e.data))}launchExternalProcess(e){return this.sendExternalProcessRequest("launch-external-process",e)}monitorExternalProcess(e){return this.sendExternalProcessRequest("monitor-external-process",e)}log(e,t){return this.wire.sendAction("write-to-log",{level:e,message:t}).then((()=>{}))}openUrlWithBrowser(e){return this.wire.sendAction("open-url-with-browser",{url:e}).then((()=>{}))}async registerCustomProtocol(e){if("object"!=typeof e)throw new Error("Must provide an object with a `protocolName` property having a string value.");await this.wire.sendAction("register-custom-protocol",e)}async unregisterCustomProtocol(e){await this.wire.sendAction("unregister-custom-protocol",{protocolName:e})}async getCustomProtocolState(e){return this.wire.sendAction("get-custom-protocol-state",{protocolName:e}).then((({payload:e})=>e.data))}releaseExternalProcess(e){return this.wire.sendAction("release-external-process",{uuid:e}).then((()=>{}))}showDeveloperTools(e){return this.wire.sendAction("show-developer-tools",e).then((()=>{}))}terminateExternalProcess(e){return this.wire.sendAction("terminate-external-process",e).then((()=>{}))}updateProxySettings(e){return this.wire.sendAction("update-proxy",e).then((()=>{}))}async downloadAsset(e,t){const n=()=>{};let i=n,r=n;const o=new Promise(((e,t)=>{i=e,r=t}));if("openfin"!==this.wire.environment.type)throw new oe.NotSupportedError("downloadAsset only supported in an OpenFin Render process");const s=oe.RuntimeError.getCallSite(),a=this.wire.environment.getNextMessageId().toString(),c=`asset-download-progress-${a}`,d=`asset-download-error-${a}`,h=`asset-download-complete-${a}`,l=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},u=()=>{this.removeListener(c,l)};await Promise.all([this.on(c,l),this.once(d,(e=>{u();const{reason:t,err:n}=e;r(new oe.RuntimeError({reason:t,error:n},s))})),this.once(h,(()=>{u(),i()}))]);const p=Object.assign(e,{downloadId:a});return await this.wire.sendAction("download-asset",p).catch((e=>{throw u(),e})),o}downloadRuntime(e,t){const n=oe.RuntimeError.getCallSite();return new Promise(((i,r)=>{if("openfin"!==this.wire.environment.type)return void r(new oe.NotSupportedError("downloadRuntime only supported in an OpenFin Render process"));const o=this.wire.environment.getNextMessageId().toString(),s=`runtime-download-progress-${o}`,a=`runtime-download-error-${o}`,c=`runtime-download-complete-${o}`,d=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},h=()=>{this.removeListener(s,d)};this.on(s,d),this.once(a,(e=>{h();const{reason:t,err:i}=e;r(new oe.RuntimeError({reason:t,error:i},n))})),this.once(c,(()=>{h(),i()}));const l=Object.assign(e,{downloadId:o});this.wire.sendAction("download-runtime",l).catch((e=>{h(),r(e)}))}))}downloadPreloadScripts(e){return this.wire.sendAction("download-preload-scripts",{scripts:e}).then((({payload:e})=>e.data))}getAllExternalApplications(){return this.wire.sendAction("get-all-external-applications").then((({payload:e})=>e.data))}getAppAssetInfo(e){return this.wire.sendAction("get-app-asset-info",e).then((({payload:e})=>e.data))}getCookies(e){const t=this.wire.environment.getUrl(),n=Object.assign(e,{url:t});return this.wire.sendAction("get-cookies",n).then((({payload:e})=>e.data))}setMinLogLevel(e){return this.wire.sendAction("set-min-log-level",{level:e}).then((()=>{}))}resolveUuid(e){return this.wire.sendAction("resolve-uuid",{entityKey:e}).then((({payload:e})=>e.data))}executeOnRemote(e,t){return t.requestingIdentity=e,this.wire.ferryAction(t)}readRegistryValue(e,t,n){return this.wire.sendAction("read-registry-value",{rootKey:e,subkey:t,value:n}).then((({payload:e})=>e.data))}registerExternalConnection(e){return this.wire.sendAction("register-external-connection",{uuid:e}).then((({payload:e})=>e.data))}async getServiceConfiguration(e){if("string"!=typeof e.name)throw new Error("Must provide an object with a `name` property having a string value");const{name:t}=e;return this.wire.sendAction("get-service-configuration",{name:t}).then((({payload:e})=>e.data))}async getSystemAppConfig(e){if("string"!=typeof e)throw new Error("Must provide a string value for name of system app");return this.wire.sendAction("get-system-app-configuration",{name:e}).then((({payload:e})=>e.data))}async registerShutdownHandler(e){this.wire.sendAction("system-register-shutdown-handler").catch((e=>{}));const{uuid:t,name:n}=this.wire.me;this.on("system-shutdown",(i=>{e({proceed:()=>{this.wire.environment.raiseEvent("application/system-shutdown-handled",{uuid:t,name:n,topic:"application"})}})}))}runRvmHealthCheck(){return this.wire.sendAction("run-rvm-health-check").then((({payload:e})=>e.data))}async launchManifest(e,t={}){const{subscribe:n,...i}=t,r=i;if(n){const e=new ae.EventEmitter;n(e);const t="app-version-progress",i="runtime-status",o="app-version-complete",s="app-version-error",a=this.wire.environment.getNextMessageId().toString();r.appVersionId=a;const c=[o,t,i,s],d=e=>{const{appVersionId:t,topic:n,type:i,...r}=e;return{...r,type:c.find((e=>i.includes(e)))}},h=t=>{const n=d(t);e.emit(n.type,n)},l=()=>{this.removeListener(`${t}.${a}`,h),this.removeListener(`${i}.${a}`,h),this.removeListener(`${o}.${a}`,h),this.removeListener(`${s}.${a}`,h),this.removeListener(`${o}.${a}`,l),this.removeListener(`${s}.${a}`,l)};await Promise.all([this.on(`${t}.${a}`,h),this.on(`${i}.${a}`,h),this.once(`${o}.${a}`,h),this.once(`${s}.${a}`,h),this.once(`${o}.${a}`,l),this.once(`${s}.${a}`,l)])}return(await this.wire.sendAction("launch-manifest",{manifestUrl:e,opts:r})).payload.data.manifest}async queryPermissionForCurrentContext(e){const t={uuid:this.wire.me.uuid,name:this.wire.me.name};return(await this.wire.sendAction("query-permission-for-current-context",{apiName:e,identity:t})).payload.data}async enableNativeWindowIntegrationProvider(e){const{payload:t}=await this.wire.sendAction("enable-native-window-integration-provider",{permissions:e});return t.data}async registerUsage({data:e,type:t}){await this.wire.sendAction("register-usage",{data:e,type:t})}async getPrinters(){const{payload:e}=await this.wire.sendAction("system-get-printers");return e.data}async updateProcessLoggingOptions(e){await this.wire.sendAction("system-update-process-logging-options",{options:e})}async getDomainSettings(){const{payload:{data:e}}=await this.wire.sendAction("get-domain-settings",this.identity);return e}async setDomainSettings(e){await this.wire.sendAction("set-domain-settings",{domainSettings:e,...this.identity})}async refreshExtensions(){const{payload:e}=await this.wire.sendAction("refresh-extensions");return e.data}async getInstalledExtensions(){const{payload:e}=await this.wire.sendAction("get-installed-extensions");return e.data}}c.System=ce;var de={},he={};Object.defineProperty(he,"__esModule",{value:!0}),he.RefCounter=void 0;he.RefCounter=class{constructor(){this.topicRefMap=new Map}incRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t+1;n=i,this.topicRefMap.set(e,i)}else this.topicRefMap.set(e,1),n=1;return n}decRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t-1;this.topicRefMap.set(e,i),n=i}else n=-1;return n}actOnFirst(e,t,n){return 1===this.incRefCount(e)?t():n()}actOnLast(e,t,n){return 0===this.decRefCount(e)?t():n()}};var le={},ue={},pe={};Object.defineProperty(pe,"__esModule",{value:!0}),pe.ChannelBase=pe.ProtectedItems=void 0;const we=e=>async(t,n,i)=>{const r=await e(t,n,i);return void 0===r?n:r};pe.ProtectedItems=class{constructor(e,t){this.providerIdentity=e,this.close=t}};class ye{static defaultAction(e){throw new Error(`No action registered at target for ${e}`)}constructor(){this.subscriptions=new Map}async processAction(e,t,n){try{const i=this.subscriptions.has(e)?this.subscriptions.get(e):(t,n)=>(this.defaultAction??ye.defaultAction)(e,t,n),r=this.preAction?await this.preAction(e,t,n):t,o=await i(r,n);return this.postAction?await this.postAction(e,o,n):o}catch(t){if(this.errorMiddleware)return this.errorMiddleware(e,t,n);throw t}}beforeAction(e){if(this.preAction)throw new Error("Already registered beforeAction middleware");this.preAction=we(e)}onError(e){if(this.errorMiddleware)throw new Error("Already registered error middleware");this.errorMiddleware=e}afterAction(e){if(this.postAction)throw new Error("Already registered afterAction middleware");this.postAction=we(e)}remove(e){this.subscriptions.delete(e)}setDefaultAction(e){if(this.defaultAction)throw new Error("default action can only be set once");this.defaultAction=e}register(e,t){if(this.subscriptions.has(e))throw new Error(`Subscription already registered for action: ${e}. Unsubscribe before adding new subscription`);return this.subscriptions.set(e,t),!0}}pe.ChannelBase=ye;var fe,ge,me,ve=s&&s.__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)},Ce=s&&s.__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};Object.defineProperty(ue,"__esModule",{value:!0}),ue.ChannelClient=void 0;const be=pe,Ie=new Map;class Ee extends be.ChannelBase{static closeChannelByEndpointId(e){const t=Ie.get(e);t&&ve(t,me,"f").call(t)}static handleProviderDisconnect(e){for(const t of Ie.values())t.providerIdentity.channelId===e.channelId&&(t.disconnectListener(e),ve(t,me,"f").call(t))}constructor(e,t,n){super(),fe.set(this,void 0),ge.set(this,void 0),this.processAction=(e,t,n)=>super.processAction(e,t,n),me.set(this,(()=>{Ie.delete(this.endpointId),ve(this,ge,"f").close()})),Ce(this,fe,new be.ProtectedItems(e,t),"f"),this.disconnectListener=()=>{},this.endpointId=e.endpointId,Ce(this,ge,n,"f"),Ie.set(this.endpointId,this),n.receive(this.processAction)}get providerIdentity(){return ve(this,fe,"f").providerIdentity}async dispatch(e,t){if(ve(this,ge,"f").isEndpointConnected(this.providerIdentity.channelId))return ve(this,ge,"f").send(this.providerIdentity.channelId,e,t);throw new Error("The client you are trying to dispatch from is disconnected from the target provider.")}onDisconnection(e){this.disconnectListener=t=>{try{e(t)}catch(e){throw new Error(`Error while calling the onDisconnection callback: ${e.message}`)}finally{this.disconnectListener=()=>{}}}}async disconnect(){await this.sendDisconnectAction(),ve(this,me,"f").call(this)}async sendDisconnectAction(){const e=ve(this,fe,"f");await e.close()}static async wireClose(e,t,n){const{channelName:i,uuid:r,name:o}=t;await e.sendAction("disconnect-from-channel",{channelName:i,uuid:r,name:o,endpointId:n})}}ue.ChannelClient=Ee,fe=new WeakMap,ge=new WeakMap,me=new WeakMap;var xe={},Ae={};Object.defineProperty(Ae,"__esModule",{value:!0}),Ae.exhaustiveCheck=void 0,Ae.exhaustiveCheck=function(e,t){throw new Error(`Unsupported value: ${e}${t?`\n Supported values are: ${t.join("")}`:""}`)};var Pe,Me,_e,Oe={},Se=s&&s.__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},Re=s&&s.__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)};Object.defineProperty(Oe,"__esModule",{value:!0}),Oe.ClassicInfo=Oe.ClassicStrategy=void 0;Oe.ClassicStrategy=class{constructor(e,t,n,i){this.messageReceiver=t,this.endpointId=n,this.providerIdentity=i,Pe.set(this,void 0),Me.set(this,new Map),_e.set(this,new Map),this.send=async(e,t,n)=>{const i=Re(this,Me,"f").get(e);if(!i)throw new Error(`Could not locate routing info for endpoint ${e}`);const r={...i};r.isLocalEndpointId&&delete r.endpointId,delete r.isLocalEndpointId;const o=Re(this,Pe,"f").sendAction("send-channel-message",{...r,providerIdentity:this.providerIdentity,action:t,payload:n});Re(this,_e,"f").get(e)?.add(o);return(await o.catch((e=>{throw new Error(e.message)})).finally((()=>{Re(this,_e,"f").get(e)?.delete(o)}))).payload.data.result},this.close=async()=>{this.messageReceiver.removeEndpoint(this.providerIdentity.channelId,this.endpointId),[...Re(this,Me,"f").keys()].forEach((e=>this.closeEndpoint(e))),Se(this,Me,new Map,"f")},Se(this,Pe,e,"f")}onEndpointDisconnect(e,t){}receive(e){this.messageReceiver.addEndpoint(e,this.providerIdentity.channelId,this.endpointId)}async closeEndpoint(e){const t=Re(this,Me,"f").get(e);Re(this,Me,"f").delete(e);const n=Re(this,_e,"f").get(e);n?.forEach((n=>{const i=`Channel connection with identity uuid: ${t?.uuid} / name: ${t?.name} / endpointId: ${e} no longer connected.`;n.cancel(new Error(i))}))}isEndpointConnected(e){return Re(this,Me,"f").has(e)}addEndpoint(e,t){Re(this,Me,"f").set(e,t.endpointIdentity),Re(this,_e,"f").set(e,new Set)}isValidEndpointPayload(e){return"string"==typeof e?.endpointIdentity?.endpointId||"string"==typeof e?.endpointIdentity?.channelId}},Pe=new WeakMap,Me=new WeakMap,_e=new WeakMap,Oe.ClassicInfo={version:5,minimumVersion:0,type:"classic"};var Fe={},je={},ke={};Object.defineProperty(ke,"__esModule",{value:!0}),ke.errorToPOJO=void 0,ke.errorToPOJO=function(e){return{stack:e.stack,name:e.name,message:e.message,toString:()=>e.stack||e.toString()}};var Le,Te,$e=s&&s.__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)},Be=s&&s.__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};Object.defineProperty(je,"__esModule",{value:!0}),je.RTCEndpoint=void 0;const Ge=ke;je.RTCEndpoint=class{static isValidEndpointPayload(e){const t=e=>"object"==typeof e&&null!==e;return t(e)&&t(e.endpointIdentity)&&t(e.rtc)&&"string"==typeof e.endpointIdentity.endpointId}constructor({rtc:e,endpointIdentity:t}){this.responseMap=new Map,Le.set(this,null),Te.set(this,void 0),this.connectionStateChangeHandler=e=>{"connected"!==this.rtc.rtcClient.connectionState&&(this.rtc.rtcClient.removeEventListener("connectionstatechange",this.connectionStateChangeHandler),this.close(),$e(this,Te,"f")&&$e(this,Te,"f").call(this))},this.send=async(e,t)=>{const n=`message-${Math.random()}`,i=new Promise(((e,t)=>{this.responseMap.set(n,{resolve:e,reject:t})}));return this.rtc.channels.request.send(JSON.stringify({action:e,payload:t,messageId:n})),i},this.close=()=>{this.responseMap.forEach((e=>e.reject("Connection has closed."))),this.responseMap=new Map,this.rtc.channels.request.close(),this.rtc.channels.response.close(),this.rtc.rtcClient.close()},this.rtc=e,this.endpointIdentity=t,this.rtc.channels.response.addEventListener("message",(e=>{let{data:t}=e;e.data instanceof ArrayBuffer&&(t=(new TextDecoder).decode(e.data));const{messageId:n,payload:i,success:r,error:o}=JSON.parse(t),{resolve:s,reject:a}=this.responseMap.get(n)??{};s&&a?(this.responseMap.delete(n),r?s(i):a(o)):(console.log("Could not find id in responseMap."),console.log(e))})),this.rtc.channels.request.addEventListener("message",(async e=>{let{data:n}=e;e.data instanceof ArrayBuffer&&(n=(new TextDecoder).decode(e.data));const{messageId:i,action:r,payload:o}=JSON.parse(n);if($e(this,Le,"f"))try{const e=await $e(this,Le,"f").call(this,r,o,t);this.rtc.channels.response.send(JSON.stringify({messageId:i,payload:e,success:!0}))}catch(e){"open"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,error:(0,Ge.errorToPOJO)(e),success:!1}))}else"open"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,success:!1,error:"Connection not ready."}))})),this.rtc.rtcClient.addEventListener("connectionstatechange",this.connectionStateChangeHandler),Object.values(this.rtc.channels).forEach((e=>{e.onclose=e=>{[...this.responseMap.values()].forEach((e=>e.reject(new Error("RTCDataChannel closed unexpectedly, this is most commonly caused by message size. Note: RTC Channels have a message size limit of ~255kB.")))),this.close(),$e(this,Te,"f")&&$e(this,Te,"f").call(this)}}))}onDisconnect(e){if($e(this,Te,"f"))throw new Error("RTCEndpoint disconnectListener cannot be set twice.");Be(this,Te,e,"f")}receive(e){if($e(this,Le,"f"))throw new Error("You have already set a listener for this RTC Endpoint.");Be(this,Le,e,"f")}get connected(){return"connected"===this.rtc.rtcClient.connectionState}},Le=new WeakMap,Te=new WeakMap;var We,He,Ne,De={},Ue=s&&s.__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)},Ve=s&&s.__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};Object.defineProperty(De,"__esModule",{value:!0}),De.EndpointStrategy=void 0;De.EndpointStrategy=class{constructor(e,t,n){this.EndpointType=e,this.StrategyName=n,We.set(this,null),He.set(this,new Map),Ne.set(this,!0),this.send=async(e,t,n)=>this.getEndpointById(e).send(t,n),this.close=async()=>{Ue(this,Ne,"f")&&(Ue(this,He,"f").forEach((e=>e.close())),Ve(this,He,new Map,"f")),Ve(this,Ne,!1,"f")},this.isValidEndpointPayload=t}onEndpointDisconnect(e,t){this.getEndpointById(e).onDisconnect(t)}receive(e){if(Ue(this,We,"f"))throw new Error(`You have already set a listener for this ${this.StrategyName} Strategy`);Ve(this,We,e,"f"),Ue(this,He,"f").forEach((e=>e.receive(Ue(this,We,"f"))))}getEndpointById(e){const t=Ue(this,He,"f").get(e);if(!t)throw new Error(`Client with endpoint id ${e} is not connected`);return t}get connected(){return Ue(this,Ne,"f")}isEndpointConnected(e){return Ue(this,He,"f").has(e)}addEndpoint(e,t){if(!Ue(this,Ne,"f"))return void console.warn(`Adding endpoint to disconnected ${this.StrategyName} Strategy`);const n=new this.EndpointType(t);Ue(this,We,"f")&&n.receive(Ue(this,We,"f")),Ue(this,He,"f").set(e,n)}async closeEndpoint(e){Ue(this,He,"f").delete(e)}},We=new WeakMap,He=new WeakMap,Ne=new WeakMap,Object.defineProperty(Fe,"__esModule",{value:!0}),Fe.RTCInfo=Fe.RTCStrategy=void 0;const ze=je,Ke=De;class qe extends Ke.EndpointStrategy{constructor(){super(ze.RTCEndpoint,ze.RTCEndpoint.isValidEndpointPayload,"RTC")}}Fe.RTCStrategy=qe,Fe.RTCInfo={version:2,minimumVersion:0,type:"rtc"};var Je={};Object.defineProperty(Je,"__esModule",{value:!0}),Je.RTCICEManager=void 0;const Ye=d;class Ze extends Ye.EmitterBase{constructor(e){super(e,"channel"),this.ensureChannelOpened=e=>new Promise(((t,n)=>{if("open"===e.readyState)t();else if("connecting"===e.readyState){const n=()=>{e.removeEventListener("open",n),t()};e.addEventListener("open",n)}else n(new Error("This Channel has already closed"))}))}static createDataChannelPromise(e,t){let n;const i=new Promise((e=>{n=e})),r=i=>{const o=()=>{i.channel.removeEventListener("open",o),n(i.channel)};i.channel.label===e&&(i.channel.addEventListener("open",o),t.removeEventListener("datachannel",r))};return t.addEventListener("datachannel",r),i}async listenForProviderIce(e,t){await this.on(this.createProviderEventName(e),t,{timestamp:Date.now()})}async raiseProviderIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createProviderEventName(e)),t)}async listenForClientIce(e,t){await this.on(this.createClientEventName(e),t,{timestamp:Date.now()})}async raiseClientIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createClientEventName(e)),t)}cleanupIceListeners(e){this.removeAllListeners(this.createClientEventName(e)),this.removeAllListeners(this.createProviderEventName(e))}createClientEventName(e){return`ice-client-${e}`}createProviderEventName(e){return`ice-provider-${e}`}createRouteString(e){return`channel/${e}`}createRtcPeer(){return this.wire.environment.getRtcPeer()}async startClientOffer(){const e=Math.random().toString(),t=this.createRtcPeer();t.addEventListener("icecandidate",(async t=>{t.candidate&&await this.raiseClientIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForProviderIce(e,(async e=>{await t.addIceCandidate(e.candidate)}));const n={request:t.createDataChannel("request"),response:t.createDataChannel("response")},i=await t.createOffer();await t.setLocalDescription(i);const r=Promise.all([n.request,n.response].map(this.ensureChannelOpened)).then((()=>{}));return{rtcClient:t,channels:n,offer:i,rtcConnectionId:e,channelsOpened:r}}async finishClientOffer(e,t,n){return await e.setRemoteDescription(t),await n,!0}async createProviderAnswer(e,t){const n=this.createRtcPeer(),i=Ze.createDataChannelPromise("request",n),r=Ze.createDataChannelPromise("response",n);n.addEventListener("icecandidate",(async t=>{t.candidate&&await this.raiseProviderIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForClientIce(e,(async e=>{await n.addIceCandidate(e.candidate)})),await n.setRemoteDescription(t);const o=await n.createAnswer();await n.setLocalDescription(o);const s=Promise.all([i,r]).then((([t,n])=>(this.cleanupIceListeners(e),{request:t,response:n})));return{rtcClient:n,answer:o,channels:s}}}Je.RTCICEManager=Ze;var Qe={},Xe={};function et(e){return[...e.split(".").reverse().entries()].reduce(((e,[t,n])=>e+ +n*1e4**t),0)}function tt(e,t){return et(e)>=et(t)}function nt(e){return e.split("/")[0]}Object.defineProperty(Xe,"__esModule",{value:!0}),Xe.runtimeUuidMeetsMinimumRuntimeVersion=Xe.parseRuntimeUuid=Xe.meetsMinimumRuntimeVersion=void 0,Xe.meetsMinimumRuntimeVersion=tt,Xe.parseRuntimeUuid=nt,Xe.runtimeUuidMeetsMinimumRuntimeVersion=function(e,t){return tt(nt(e),t)};var it,rt,ot,st,at,ct=s&&s.__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)},dt=s&&s.__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};Object.defineProperty(Qe,"__esModule",{value:!0}),Qe.ChannelProvider=void 0;const ht=pe,lt=Xe;class ut extends ht.ChannelBase{get connections(){return[...ct(this,it,"f")]}static handleClientDisconnection(e,t){const n=e.connections.find((e=>e.endpointId===t.endpointId));if(n)ct(e,st,"f").call(e,n);else{e.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name)).forEach(ct(e,st,"f"))}e.disconnectListener(t)}static setProviderRemoval(e,t){ut.removalMap.set(e,t)}constructor(e,t,n){super(),it.set(this,void 0),rt.set(this,void 0),ot.set(this,void 0),st.set(this,(e=>{const t=this.connections.filter((t=>t.endpointId!==e.endpointId));ct(this,ot,"f").closeEndpoint(e.endpointId),dt(this,it,t,"f")})),this.processAction=async(e,t,n)=>(ut.clientIsMultiRuntime(n)&&!(0,lt.runtimeUuidMeetsMinimumRuntimeVersion)(n.runtimeUuid,"18.87.56.0")?this.handleMultiRuntimeLegacyClient(n):this.checkForClientConnection(n),super.processAction(e,t,n)),at.set(this,(()=>{ct(this,ot,"f").close();const e=ut.removalMap.get(this);e&&e()})),dt(this,rt,new ht.ProtectedItems(e,t),"f"),this.connectListener=()=>{},this.disconnectListener=()=>{},dt(this,it,[],"f"),dt(this,ot,n,"f"),n.receive(this.processAction)}dispatch(e,t,n){const i=e.endpointId??this.getEndpointIdForOpenFinId(e,t);return i&&ct(this,ot,"f").isEndpointConnected(i)?ct(this,ot,"f").send(i,t,n):Promise.reject(new Error(`Client connection with identity uuid: ${e.uuid} / name: ${e.name} / endpointId: ${i} no longer connected.`))}async processConnection(e,t){return ct(this,it,"f").push(e),this.connectListener(e,t)}publish(e,t){return this.connections.map((n=>ct(this,ot,"f").send(n.endpointId,e,t)))}onConnection(e){this.connectListener=e}onDisconnection(e){this.disconnectListener=e}async destroy(){const e=ct(this,rt,"f");e.providerIdentity,dt(this,it,[],"f"),await e.close(),ct(this,at,"f").call(this)}async getAllClientInfo(){return this.connections.map((e=>{const{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}=e;return{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}}))}checkForClientConnection(e){if(!this.isClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider.\n Client Identity: {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}isClientConnected(e){return ut.clientIdentityIncludesEndpointId(e)?this.connections.some((t=>t.endpointId===e.endpointId&&t.uuid===e.uuid&&t.name===e.name)):this.isLegacyClientConnected(e)}isLegacyClientConnected(e){return this.connections.some((t=>t.uuid===e.uuid&&t.name===e.name))}handleMultiRuntimeLegacyClient(e){if(!this.isLegacyClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider. Client Identity:\n {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}getEndpointIdForOpenFinId(e,t){const n=this.connections.filter((t=>t.name===e.name&&t.uuid===e.uuid));if(n.length>=2){const n=ct(this,rt,"f"),{uuid:i,name:r}=e,o=n?.providerIdentity.uuid,s=n?.providerIdentity.name;console.warn(`WARNING: Dispatch call may have unintended results. The "to" argument of your dispatch call is missing the\n "endpointId" parameter. The identity you are dispatching to ({uuid: ${i}, name: ${r}})\n has multiple channelClients for this channel. Your dispatched action: (${t}) from the provider:\n ({uuid: ${o}, name: ${s}}) will only be processed by the most recently-created client.`)}return n.pop()?.endpointId}static clientIdentityIncludesEndpointId(e){return void 0!==e.endpointId}static clientIsMultiRuntime(e){return void 0!==e.runtimeUuid}static async wireClose(e,t){await e.sendAction("destroy-channel",{channelName:t})}}Qe.ChannelProvider=ut,it=new WeakMap,rt=new WeakMap,ot=new WeakMap,st=new WeakMap,at=new WeakMap,ut.removalMap=new WeakMap;var pt={};Object.defineProperty(pt,"__esModule",{value:!0}),pt.MessageReceiver=void 0;const wt=ue,yt=d;class ft extends yt.Base{constructor(e){super(e),this.onmessage=e=>"process-channel-message"===e.action&&(this.processChannelMessage(e),!0),this.endpointMap=new Map,this.latestEndpointIdByChannelId=new Map,e.registerMessageHandler(this.onmessage.bind(this))}async processChannelMessage(e){const{senderIdentity:t,providerIdentity:n,action:i,ackToSender:r,payload:o,intendedTargetIdentity:s}=e.payload,a=s.channelId??s.endpointId??this.latestEndpointIdByChannelId.get(n.channelId),c=this.endpointMap.get(a);if(!c)return r.payload.success=!1,r.payload.reason=`Client connection with identity uuid: ${this.wire.me.uuid} / name: ${this.wire.me.name} / endpointId: ${a} no longer connected.`,this.wire.sendRaw(r);try{const e=await c(i,o,t);return r.payload.payload=r.payload.payload||{},r.payload.payload.result=e,this.wire.sendRaw(r)}catch(e){return r.payload.success=!1,r.payload.reason=e.message,this.wire.sendRaw(r)}}addEndpoint(e,t,n){this.endpointMap.set(n,e),t!==n&&this.latestEndpointIdByChannelId.set(t,n)}removeEndpoint(e,t){this.endpointMap.delete(t),this.latestEndpointIdByChannelId.get(e)===t&&this.latestEndpointIdByChannelId.delete(e)}checkForPreviousClientConnection(e){const t=this.latestEndpointIdByChannelId.get(e);t&&(wt.ChannelClient.closeChannelByEndpointId(t),console.warn("You have created a second connection to an older provider. First connection has been removed from the clientMap"),console.warn("If the provider calls publish(), you may receive multiple messages."))}}pt.MessageReceiver=ft;var gt={};Object.defineProperty(gt,"__esModule",{value:!0}),gt.ProtocolManager=void 0;gt.ProtocolManager=class{constructor(e){this.ProtocolsInPreferenceOrder=e,this.DefaultClientProtocols=["classic"],this.DefaultProviderProtocols=["classic"],this.getClientProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultClientProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(", ")}.`);return t},this.getProviderProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultProviderProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(", ")}.`);return t},this.getCompatibleProtocols=(e,t)=>t.supportedProtocols.filter((t=>e.some((e=>e.type===t.type&&t.version>=e.minimumVersion&&e.version>=(t.minimumVersion??0))))).slice(0,t.maxProtocols)}};var mt={};Object.defineProperty(mt,"__esModule",{value:!0});class vt{static combine(e,t){return new vt(e,t)}constructor(e,t){this.primary=e,this.secondary=t}onEndpointDisconnect(e,t){this.primary.onEndpointDisconnect(e,(()=>{this.secondary.isEndpointConnected(e)||t()})),this.secondary.onEndpointDisconnect(e,(()=>{this.primary.isEndpointConnected(e)||t()}))}isValidEndpointPayload(e){return this.primary.isValidEndpointPayload(e)||this.secondary.isValidEndpointPayload(e)}async closeEndpoint(e){await this.primary.closeEndpoint(e),await this.secondary.closeEndpoint(e)}isEndpointConnected(e){return this.primary.isEndpointConnected(e)||this.secondary.isEndpointConnected(e)}async addEndpoint(e,t){this.primary.isValidEndpointPayload(t)&&await this.primary.addEndpoint(e,t),this.secondary.isValidEndpointPayload(t)&&await this.secondary.addEndpoint(e,t)}receive(e){this.primary.receive(e),this.secondary.receive(e)}send(e,t,n){return this.primary.isEndpointConnected(e)?this.primary.send(e,t,n):this.secondary.send(e,t,n)}async close(){await Promise.all([this.primary.close(),this.secondary.close()])}}mt.default=vt;var Ct,bt,It=s&&s.__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},Et=s&&s.__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)},xt=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(xe,"__esModule",{value:!0}),xe.ConnectionManager=void 0;const At=Ae,Pt=d,Mt=Oe,_t=Fe,Ot=Je,St=Qe,Rt=pt,Ft=gt,jt=xt(mt);class kt extends Pt.Base{static getProtocolOptionsFromStrings(e){return e.map((e=>{switch(e){case"rtc":return _t.RTCInfo;case"classic":return Mt.ClassicInfo;default:return(0,At.exhaustiveCheck)(e,["rtc","classic"])}}))}constructor(e){super(e),Ct.set(this,void 0),bt.set(this,void 0),this.removeChannelFromProviderMap=e=>{this.providerMap.delete(e)},this.onmessage=e=>"process-channel-connection"===e.action&&(this.processChannelConnection(e),!0),this.providerMap=new Map,this.protocolManager=new Ft.ProtocolManager("node"===this.wire.environment.type?["classic"]:["rtc","classic"]),It(this,Ct,new Rt.MessageReceiver(e),"f"),It(this,bt,new Ot.RTCICEManager(e),"f"),e.registerMessageHandler(this.onmessage.bind(this))}createProvider(e,t){const n=Object.assign(this.wire.environment.getDefaultChannelOptions().create,e||{}),i=this.protocolManager.getProviderProtocols(n?.protocols),r=i.map((e=>{switch(e){case"rtc":return new _t.RTCStrategy;case"classic":return new Mt.ClassicStrategy(this.wire,Et(this,Ct,"f"),t.channelId,t);default:return(0,At.exhaustiveCheck)(e,["rtc","classic"])}}));let o;if(2===r.length){const[e,t]=r;o=jt.default.combine(e,t)}else{if(1!==r.length)throw new Error("failed to combine strategies");[o]=r}const s=new St.ChannelProvider(t,(()=>St.ChannelProvider.wireClose(this.wire,t.channelName)),o),a=t.channelId;return this.providerMap.set(a,{provider:s,strategy:o,supportedProtocols:kt.getProtocolOptionsFromStrings(i)}),St.ChannelProvider.setProviderRemoval(s,this.removeChannelFromProviderMap.bind(this)),s}async createClientOffer(e){const t=this.protocolManager.getClientProtocols(e?.protocols);let n;return{offer:{supportedProtocols:await Promise.all(t.map((async e=>{switch(e){case"rtc":{const{rtcClient:e,channels:t,offer:i,rtcConnectionId:r,channelsOpened:o}=await Et(this,bt,"f").startClientOffer();return n={rtcClient:e,channels:t,channelsOpened:o},{type:"rtc",version:_t.RTCInfo.version,payload:{offer:i,rtcConnectionId:r}}}case"classic":return{type:"classic",version:Mt.ClassicInfo.version};default:return(0,At.exhaustiveCheck)(e,["rtc","classic"])}}))),maxProtocols:2},rtc:n}}async createClientStrategy(e,t){t.endpointId||(t.endpointId=this.wire.environment.getNextMessageId(),Et(this,Ct,"f").checkForPreviousClientConnection(t.channelId));const n=t.answer??{supportedProtocols:[{type:"classic",version:1}]},i=(await Promise.all(n.supportedProtocols.map((async n=>"rtc"===n.type&&e?(await Et(this,bt,"f").finishClientOffer(e.rtcClient,n.payload.answer,e.channelsOpened),new _t.RTCStrategy):"classic"===n.type?new Mt.ClassicStrategy(this.wire,Et(this,Ct,"f"),t.endpointId,t):null)))).filter((e=>null!==e));let r;if(e&&!i.some((e=>e instanceof _t.RTCStrategy))&&e&&e.rtcClient.close(),i.length>=2)r=jt.default.combine(i[0],i[1]);else{if(!i.length)throw new Error("No compatible protocols");[r]=i}const o={endpointIdentity:t,rtc:e};return r.addEndpoint(t.channelId,o),r}async processChannelConnection(e){const{clientIdentity:t,providerIdentity:n,ackToSender:i,payload:r,offer:o}=e.payload;t.endpointId?t.isLocalEndpointId=!1:(t.endpointId=this.wire.environment.getNextMessageId(),t.isLocalEndpointId=!0);const s=n.channelId,a=this.providerMap.get(s);if(!a)return i.payload.success=!1,i.payload.reason=`Channel "${n.channelName}" has been destroyed.`,this.wire.sendRaw(i);const{provider:c,strategy:d,supportedProtocols:h}=a;try{if(!(c instanceof St.ChannelProvider))throw Error("Cannot connect to a channel client");const e=o??{supportedProtocols:[{type:"classic",version:1}],maxProtocols:1},n=this.protocolManager.getCompatibleProtocols(h,e);if(!n.length)throw new Error("This provider does not support any of the offered protocols.");const s=await c.processConnection(t,r);i.payload.payload=i.payload.payload||{};let a={supportedProtocols:[],endpointPayloadPromise:Promise.resolve({endpointIdentity:t})};return a=await n.reduce((async(e,t)=>{const n=await e;if("rtc"===t.type){const{answer:e,rtcClient:i,channels:r}=await Et(this,bt,"f").createProviderAnswer(t.payload.rtcConnectionId,t.payload.offer);n.supportedProtocols.push({type:"rtc",version:_t.RTCInfo.version,payload:{answer:e}}),n.endpointPayloadPromise=n.endpointPayloadPromise.then((e=>r.then((t=>({...e,rtc:{rtcClient:i,channels:t}})))))}else n.supportedProtocols.push({type:"classic",version:Mt.ClassicInfo.version});return n}),Promise.resolve(a)),a.endpointPayloadPromise.then((e=>d.addEndpoint(t.endpointId,e))),i.payload.payload.result=s,i.payload.payload.answer=a,this.wire.sendRaw(i)}catch(e){return i.payload.success=!1,i.payload.reason=e.message,this.wire.sendRaw(i)}}}xe.ConnectionManager=kt,Ct=new WeakMap,bt=new WeakMap;var Lt,Tt,$t,Bt=s&&s.__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},Gt=s&&s.__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)};Object.defineProperty(le,"__esModule",{value:!0}),le.Channel=void 0;const Wt=t,Ht=G,Nt=d,Dt=ue,Ut=xe,Vt=Qe;function zt(e){const t=Math.floor(e/10),n=Math.min(3e4,500*2**t);return new Promise((e=>{setTimeout((()=>{e(!1)}),n)}))}class Kt extends Nt.EmitterBase{constructor(e){super(e,"channel"),Lt.set(this,void 0),Tt.set(this,new Wt.EventEmitter),$t.set(this,new Ht.AsyncRetryableLazy((async()=>{await Promise.all([this.on("disconnected",(e=>{Dt.ChannelClient.handleProviderDisconnect(e)})),this.on("connected",((...e)=>{Gt(this,Tt,"f").emit("connected",...e)}))]).catch((()=>new Error("error setting up channel connection listeners")))}))),Bt(this,Lt,new Ut.ConnectionManager(e),"f")}async getAllChannels(){return this.wire.sendAction("get-all-channels").then((({payload:e})=>e.data))}async onChannelConnect(e){await this.on("connected",e)}async onChannelDisconnect(e){await this.on("disconnected",e)}async safeConnect(e,t,n){const i={count:0};do{let r=()=>{};const o=new Promise((t=>{r=n=>{e===n.channelName&&t(!0)},Gt(this,Tt,"f").on("connected",r)}));try{if(i.count>0){i.gotConnectedEvent=await Promise.race([zt(i.count),o]);const t=await this.wire.sendAction("connect-to-channel",{...n,retryInfo:i});return console.log(`Successfully connected to channelName: ${e}`),t.payload.data}const t=this.wire.sendAction("connect-to-channel",n);i.originalMessageId=t.messageId;return(await t).payload.data}catch(n){if(!n.message.includes("internal-nack"))throw n;t&&0===i.count&&console.warn(`No channel found for channelName: ${e}. Waiting for connection...`)}finally{i.count+=1,Gt(this,Tt,"f").removeListener("connected",r)}}while(t);throw new Error(`No channel found for channelName: ${e}.`)}async connect(e,t={}){if(await Gt(this,$t,"f").getValue(),!e||"string"!=typeof e)throw new Error("Please provide a channelName string to connect to a channel.");const n={wait:!0,...this.wire.environment.getDefaultChannelOptions().connect,...t},{offer:i,rtc:r}=await Gt(this,Lt,"f").createClientOffer(n);let o;(this.fin.me.isFrame||this.fin.me.isView||this.fin.me.isWindow)&&(o=(await this.fin.me.getInfo()).url);const s={channelName:e,...n,offer:i,connectionUrl:o},a=await this.safeConnect(e,n.wait,s),c=await Gt(this,Lt,"f").createClientStrategy(r,a),d=new Dt.ChannelClient(a,(()=>Dt.ChannelClient.wireClose(this.wire,a,a.endpointId)),c);return c.onEndpointDisconnect(a.channelId,(async()=>{try{await d.sendDisconnectAction()}catch(e){console.warn(`Something went wrong during disconnect for client with uuid: ${a.uuid} / name: ${a.name} / endpointId: ${a.endpointId}.`)}finally{Dt.ChannelClient.handleProviderDisconnect(a)}})),d}async create(e,t){if(!e)throw new Error("Please provide a channelName to create a channel");const{payload:{data:n}}=await this.wire.sendAction("create-channel",{channelName:e}),i=Gt(this,Lt,"f").createProvider(t,n);return this.on("client-disconnected",(t=>{t.channelName===e&&Vt.ChannelProvider.handleClientDisconnection(i,t)})),i}}le.Channel=Kt,Lt=new WeakMap,Tt=new WeakMap,$t=new WeakMap,Object.defineProperty(de,"__esModule",{value:!0}),de.InterAppPayload=de.InterApplicationBus=void 0;const qt=t,Jt=d,Yt=he,Zt=le,Qt=O;class Xt extends Jt.Base{constructor(e){super(e),this.events={subscriberAdded:"subscriber-added",subscriberRemoved:"subscriber-removed"},this.refCounter=new Yt.RefCounter,this.Channel=new Zt.Channel(e),this.emitter=new qt.EventEmitter,e.registerMessageHandler(this.onmessage.bind(this)),this.on=this.emitter.on.bind(this.emitter),this.removeAllListeners=this.emitter.removeAllListeners.bind(this.emitter)}async publish(e,t){await this.wire.sendAction("publish-message",{topic:e,message:t,sourceWindowName:this.me.name})}async send(e,t,n){const i=(0,Qt.validateIdentity)(e);if(i)throw new Error(i);await this.wire.sendAction("send-message",{destinationUuid:e.uuid,destinationWindowName:e.name,topic:t,message:n,sourceWindowName:this.me.name})}subscribe(e,t,n){const i=this.createSubscriptionKey(e.uuid,e.name||"*",t);return this.emitter.on(i,n),this.refCounter.actOnFirst(i,(async()=>{await this.wire.sendAction("subscribe",{sourceUuid:e.uuid,sourceWindowName:e.name||"*",topic:t,destinationWindowName:this.me.name})}),(()=>Promise.resolve()))}unsubscribe(e,t,n){const i=e.name||"*",r=this.createSubscriptionKey(e.uuid,i,t);return this.emitter.removeListener(r,n),this.refCounter.actOnLast(r,(async()=>{await this.wire.sendAction("unsubscribe",{sourceUuid:e.uuid,sourceWindowName:i,topic:t,destinationWindowName:this.me.name})}),(()=>new Promise((e=>e)).then((()=>{}))))}processMessage(e){const{payload:{message:t,sourceWindowName:n,sourceUuid:i,topic:r}}=e,o=[this.createSubscriptionKey(i,n,r),this.createSubscriptionKey(i,"*",r),this.createSubscriptionKey("*","*",r)],s={uuid:i,name:n};o.forEach((e=>{this.emitter.emit(e,t,s)}))}emitSubscriverEvent(e,t){const{payload:{targetName:n,uuid:i,topic:r}}=t,o={name:n,uuid:i,topic:r};this.emitter.emit(e,o)}createSubscriptionKey(e,t,n){const i=t||"*";if(!(e&&i&&n))throw new Error("Missing uuid, name, or topic string");return function(...e){return e.map((e=>Buffer.from(`${e}`).toString("base64"))).join("/")}(e,i,n)}onmessage(e){const{action:t}=e;switch(t){case"process-message":this.processMessage(e);break;case this.events.subscriberAdded:this.emitSubscriverEvent(this.events.subscriberAdded,e);break;case this.events.subscriberRemoved:this.emitSubscriverEvent(this.events.subscriberRemoved,e)}return!0}}de.InterApplicationBus=Xt;de.InterAppPayload=class{};var en={};Object.defineProperty(en,"__esModule",{value:!0}),en.Clipboard=void 0;const tn=d;class nn extends tn.Base{async writeText(e){await this.wire.sendAction("clipboard-write-text",e)}async readText(e){const{payload:t}=await this.wire.sendAction("clipboard-read-text",{type:e});return t.data}async writeImage(e){await this.wire.sendAction("clipboard-write-image",e)}async readImage(e={format:"dataURL"}){const{payload:t}=await this.wire.sendAction("clipboard-read-image",e);return t.data}async writeHtml(e){await this.wire.sendAction("clipboard-write-html",e)}async readHtml(e){const{payload:t}=await this.wire.sendAction("clipboard-read-html",{type:e});return t.data}async writeRtf(e){await this.wire.sendAction("clipboard-write-rtf",e)}async readRtf(e){const{payload:t}=await this.wire.sendAction("clipboard-read-rtf",{type:e});return t.data}async write(e){await this.wire.sendAction("clipboard-write",e)}async getAvailableFormats(e){const{payload:t}=await this.wire.sendAction("clipboard-read-formats",{type:e});return t.data}}en.Clipboard=nn;var rn={},on={},sn={};Object.defineProperty(sn,"__esModule",{value:!0}),sn.ExternalApplication=void 0;const an=d;class cn extends an.EmitterBase{constructor(e,t){super(e,"external-application",t.uuid),this.identity=t}getInfo(){return this.wire.sendAction("get-external-application-info",this.identity).then((({payload:e})=>e.data))}}sn.ExternalApplication=cn,Object.defineProperty(on,"__esModule",{value:!0}),on.ExternalApplicationModule=void 0;const dn=d,hn=sn;class ln extends dn.Base{wrap(e){return this.wire.sendAction("external-application-wrap").catch((e=>{})),Promise.resolve(new hn.ExternalApplication(this.wire,{uuid:e}))}wrapSync(e){return this.wire.sendAction("external-application-wrap-sync").catch((e=>{})),new hn.ExternalApplication(this.wire,{uuid:e})}}on.ExternalApplicationModule=ln,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(on,e),n(sn,e)}(rn);var un={},pn={},wn={};Object.defineProperty(wn,"__esModule",{value:!0}),wn._Frame=void 0;const yn=d;class fn extends yn.EmitterBase{constructor(e,t){super(e,"frame",t.uuid,t.name),this.identity=t}getInfo(){return this.wire.sendAction("get-frame-info",this.identity).then((({payload:e})=>e.data))}getParentWindow(){return this.wire.sendAction("get-parent-window",this.identity).then((({payload:e})=>e.data))}}wn._Frame=fn,Object.defineProperty(pn,"__esModule",{value:!0}),pn._FrameModule=void 0;const gn=d,mn=O,vn=wn;class Cn extends gn.Base{async wrap(e){this.wire.sendAction("frame-wrap").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}wrapSync(e){this.wire.sendAction("frame-wrap-sync").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}getCurrent(){return this.wire.sendAction("frame-get-current").catch((e=>{})),Promise.resolve(new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity()))}getCurrentSync(){return this.wire.sendAction("frame-get-current-sync").catch((e=>{})),new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity())}}pn._FrameModule=Cn,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(pn,e),n(wn,e)}(un);var bn={};Object.defineProperty(bn,"__esModule",{value:!0}),bn.GlobalHotkey=void 0;const In=d;class En extends In.EmitterBase{constructor(e){super(e,"global-hotkey")}async register(e,t){await this.on(e,t),await this.wire.sendAction("global-hotkey-register",{hotkey:e})}async unregister(e){await this.removeAllListeners(e),await this.wire.sendAction("global-hotkey-unregister",{hotkey:e})}async unregisterAll(){await Promise.all(this.eventNames().filter((e=>!("registered"===e||"unregistered"===e))).map((e=>this.removeAllListeners(e)))),await this.wire.sendAction("global-hotkey-unregister-all",{})}async isRegistered(e){const{payload:{data:t}}=await this.wire.sendAction("global-hotkey-is-registered",{hotkey:e});return t}}bn.GlobalHotkey=En;var xn,An={},Pn={},Mn={},_n=s&&s.__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)};Object.defineProperty(Mn,"__esModule",{value:!0}),Mn.Platform=void 0;const On=d,Sn=O,Rn=new Map;class Fn extends On.EmitterBase{constructor(e,t){super(t.wire,"application",e.uuid),this.getClient=e=>{this.wire.sendAction("platform-get-client",this.identity).catch((e=>{}));const t=e||this.identity,{uuid:n}=t;if(!Rn.has(n)){const e=_n(this,xn,"f").call(this,n);Rn.set(n,e)}return Rn.get(n)},xn.set(this,(async e=>{try{const t=`custom-frame-${e}`,n=await this._channel.connect(t,{wait:!1});return n.onDisconnection((()=>{Rn.delete(e)})),n}catch(t){throw Rn.delete(e),new Error("The targeted Platform is not currently running. Listen for application-started event for the given Uuid.")}})),this.launchLegacyManifest=this.launchContentManifest;const n=(0,Sn.validateIdentity)(e);if(n)throw new Error(n);this._channel=t,this.identity={uuid:e.uuid},this.Layout=this.fin.Platform.Layout,this.Application=this.fin.Application.wrapSync(this.identity)}async createView(e,t,n){this.wire.sendAction("platform-create-view",this.identity).catch((e=>{}));const i=await this.getClient(),r=await i.dispatch("create-view",{target:t,opts:e,targetView:n});if(!r||(0,Sn.validateIdentity)(r.identity))throw new Error(`When overwriting the createView call, please return an object that has a valid 'identity' property: ${JSON.stringify(r)}`);return this.fin.View.wrapSync(r.identity)}async createWindow(e){this.wire.sendAction("platform-create-window",this.identity).catch((e=>{}));const t=await this.getClient();e.reason||(e.reason="api-call");const n=await t.dispatch("create-view-container",e);if(!n||(0,Sn.validateIdentity)(n.identity))throw new Error(`When overwriting the createWindow call, please return an object that has a valid 'identity' property: ${JSON.stringify(n)}`);const{identity:i}=n,r=this.fin.Window.wrapSync(i);return r.name=i.name,r.uuid=i.uuid,r}async quit(){this.wire.sendAction("platform-quit",this.identity).catch((e=>{}));return(await this.getClient()).dispatch("quit")}async closeView(e){this.wire.sendAction("platform-close-view",this.identity).catch((e=>{}));const t=await this.getClient();await t.dispatch("close-view",{view:e})}async reparentView(e,t){console.warn("Platform.reparentView has been deprecated, please use Platform.createView"),this.wire.sendAction("platform-reparent-view",this.identity).catch((e=>{}));const n={...e,uuid:e.uuid??this.identity.uuid},i=await this.fin.View.wrap(n),r=await i.getOptions();return this.createView(r,t)}async getSnapshot(){this.wire.sendAction("platform-get-snapshot",this.identity).catch((e=>{}));return(await this.getClient()).dispatch("get-snapshot")}async getViewSnapshot(e){return(await this.getClient()).dispatch("get-view-snapshot",{viewIdentity:e})}async applySnapshot(e,t){this.wire.sendAction("platform-apply-snapshot",this.identity).catch((e=>{}));const n="Requested snapshot must be a valid Snapshot object, or a url or filepath to such an object.";let i;if("string"==typeof e)try{i=(await this._channel.wire.sendAction("get-application-manifest",{manifestUrl:e})).payload.data}catch(e){throw new Error(`${n}: ${e}`)}else i=e;if(!i.windows)throw new Error(n);const r=await this.getClient();return await r.dispatch("apply-snapshot",{snapshot:i,options:t}),this}async fetchManifest(e){return(await this.getClient()).dispatch("platform-fetch-manifest",{manifestUrl:e})}async launchContentManifest(e){this.wire.sendAction("platform-launch-content-manifest",this.identity).catch((()=>{}));const t=await this.getClient(),n=await this.fetchManifest(e);return t.dispatch("launch-into-platform",{manifest:n,manifestUrl:e}),this}async setWindowContext(e={},t){if(this.wire.sendAction("platform-set-window-context",this.identity).catch((e=>{})),!e)throw new Error("Please provide a serializable object or string to set the context.");const n=await this.getClient(),{entityType:i}=t?await this.fin.System.getEntityInfo(t.uuid,t.name):this.fin.me;await n.dispatch("set-window-context",{context:e,entityType:i,target:t||{uuid:this.fin.me.uuid,name:this.fin.me.name}})}async getWindowContext(e){this.wire.sendAction("platform-get-window-context",this.identity).catch((e=>{}));const t=await this.getClient(),{entityType:n}=e?await this.fin.System.getEntityInfo(e.uuid,e.name):this.fin.me;return t.dispatch("get-window-context",{target:e||{uuid:this.fin.me.uuid,name:this.fin.me.name},entityType:n})}async closeWindow(e,t={skipBeforeUnload:!1}){this.wire.sendAction("platform-close-window",this.identity).catch((e=>{}));return(await this.getClient()).dispatch("close-window",{windowId:e,options:t})}}Mn.Platform=Fn,xn=new WeakMap;var jn={},kn={},Ln={},Tn={};function $n(e){switch(e){case"columns":case"grid":case"rows":case"tabs":return!0;default:return!1}}Object.defineProperty(Tn,"__esModule",{value:!0}),Tn.overrideFromComposables=Tn.isValidPresetType=void 0,Tn.isValidPresetType=$n,Tn.overrideFromComposables=function(...e){return t=>e.reduceRight(((e,t)=>n=>t(e(n))),(e=>e))(t)},Tn.default={isValidPresetType:$n};var Bn={},Gn={},Wn={};Object.defineProperty(Wn,"__esModule",{value:!0}),Wn.ApiConsumer=void 0;Wn.ApiConsumer=class{constructor(e){this.strategy=e,this.consume=async e=>(await this.strategy.getExposedFunctions(e)).reduce(((t,n)=>({...t,[n.key]:this.strategy.createFunction(n,e)})),{})}};var Hn={},Nn={};Object.defineProperty(Nn,"__esModule",{value:!0}),Nn.expose=Nn.getExposedProperties=void 0;const Dn=Symbol("exposedProperties");Nn.getExposedProperties=e=>e[Dn]||e.prototype[Dn]||[];Nn.expose=e=>(t,n,i)=>{t[Dn]=t[Dn]||[],t[Dn].push({key:n,descriptor:i,options:e})},Object.defineProperty(Hn,"__esModule",{value:!0}),Hn.ApiExposer=void 0;const Un=Nn;Hn.ApiExposer=class{constructor(e){this.strategy=e,this.exposeInstance=async(e,t)=>{const n=(0,Un.getExposedProperties)(e),i=await Promise.all(n.map((async({key:n,options:i})=>({key:n,options:await this.strategy.exposeFunction(e[n].bind(e),{key:n,options:i,meta:t})}))));await this.strategy.exposeMeta(t,i)}}};var Vn={},zn={},Kn={};Object.defineProperty(Kn,"__esModule",{value:!0}),Kn.ChannelsConsumer=void 0;Kn.ChannelsConsumer=class{constructor(e){this.channel=e,this.getExposedFunctions=async e=>{const{id:t}=e,{props:n}=await this.channel.dispatch(`api-meta:${t}`);return n},this.createFunction=e=>(...t)=>{const{action:n}=e.options;return this.channel.dispatch(n,{args:t})}}};var qn={};Object.defineProperty(qn,"__esModule",{value:!0}),qn.ChannelsExposer=void 0;qn.ChannelsExposer=class{constructor(e){this.channelProviderOrClient=e,this.exposeFunction=async(e,t)=>{const{key:n,options:i,meta:r}=t,{id:o}=r,s=`${o}.${i?.action||n}`;return await this.channelProviderOrClient.register(s,(async({args:t})=>e(...t))),{action:s}},this.exposeMeta=async({id:e},t)=>{const n=`api-meta:${e}`;await this.channelProviderOrClient.register(n,(()=>({props:t})))}}},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Kn,e),n(qn,e)}(zn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(zn,e)}(Vn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Wn,e),n(Hn,e),n(Vn,e),n(Nn,e)}(Gn);var Jn={};Object.defineProperty(Jn,"__esModule",{value:!0}),Jn.createRelayedDispatch=exports.relayChannelClientApi_1=Jn.relayChannelClientApi=void 0;const Yn=["no longer connected","RTCDataChannel closed unexpectedly","The client you are trying to dispatch from is disconnected from the target provider"];exports.relayChannelClientApi_1=Jn.relayChannelClientApi=async(e,t)=>{e.register(`relay:${t}`,(({action:t,target:n,payload:i})=>e.dispatch(n,t,i))),await Promise.resolve()};Jn.createRelayedDispatch=(e,t,n,i)=>async(r,o)=>{try{return await e.dispatch(`relay:${n}`,{action:r,payload:o,target:t})}catch(e){if(s=e.message,Yn.some((e=>s.includes(e)))&&i)throw new Error(i);throw e}var s};var Zn,Qn,Xn,ei=s&&s.__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},ti=s&&s.__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)};Object.defineProperty(Bn,"__esModule",{value:!0}),Bn.ColumnOrRow=Bn.TabStack=Bn.LayoutNode=void 0;const ni=Gn,ii=Jn;class ri{constructor(e,t){Zn.set(this,void 0),this.isRoot=()=>ti(this,Zn,"f").isRoot(this.entityId),this.exists=()=>ti(this,Zn,"f").exists(this.entityId),this.getParent=async()=>{const e=await ti(this,Zn,"f").getParent(this.entityId);if(e)return ri.getEntity(e,ti(this,Zn,"f"))},this.createAdjacentStack=async(e,t)=>{const n=await ti(this,Zn,"f").createAdjacentStack(this.entityId,e,t);return ri.getEntity({entityId:n,type:"stack"},ti(this,Zn,"f"))},this.getAdjacentStacks=async e=>(await ti(this,Zn,"f").getAdjacentStacks({targetId:this.entityId,edge:e})).map((e=>ri.getEntity({type:"stack",entityId:e.entityId},ti(this,Zn,"f")))),ei(this,Zn,e,"f"),this.entityId=t}}Bn.LayoutNode=ri,Zn=new WeakMap,ri.newLayoutEntitiesClient=async(e,t,n)=>{const i=(0,ii.createRelayedDispatch)(e,n,"layout-relay","You are trying to interact with a layout component on a window that does not exist or has been destroyed.");return new ni.ApiConsumer(new ni.ChannelsConsumer({dispatch:i})).consume({id:t})},ri.getEntity=(e,t)=>{const{entityId:n,type:i}=e;switch(i){case"column":case"row":return new si(t,n,i);case"stack":return new oi(t,n);default:throw new Error(`Unrecognised Layout Entity encountered ('${JSON.stringify(e)})`)}};class oi extends ri{constructor(e,t){super(e,t),Qn.set(this,void 0),this.type="stack",this.getViews=()=>ti(this,Qn,"f").getStackViews(this.entityId),this.addView=async(e,t={index:0})=>ti(this,Qn,"f").addViewToStack(this.entityId,e,t),this.removeView=async e=>{await ti(this,Qn,"f").removeViewFromStack(this.entityId,e)},this.setActiveView=async e=>{await ti(this,Qn,"f").setStackActiveView(this.entityId,e)},ei(this,Qn,e,"f")}}Bn.TabStack=oi,Qn=new WeakMap;class si extends ri{constructor(e,t,n){super(e,t),Xn.set(this,void 0),this.getContent=async()=>(await ti(this,Xn,"f").getContent(this.entityId)).map((e=>ri.getEntity(e,ti(this,Xn,"f")))),ei(this,Xn,e,"f"),this.type=n}}Bn.ColumnOrRow=si,Xn=new WeakMap;var ai={};Object.defineProperty(ai,"__esModule",{value:!0}),ai.DEFAULT_LAYOUT_KEY=ai.LAYOUT_CONTROLLER_ID=void 0,ai.LAYOUT_CONTROLLER_ID="layout-entities",ai.DEFAULT_LAYOUT_KEY="__default__";var ci,di,hi,li=s&&s.__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)};Object.defineProperty(Ln,"__esModule",{value:!0}),Ln.Layout=void 0;const ui=G,pi=O,wi=d,yi=Tn,fi=Bn,gi=ai;class mi extends wi.Base{static getClient(e){return li(e,di,"f").getValue()}constructor(e,t){super(t),ci.add(this),di.set(this,new ui.Lazy((async()=>fi.LayoutNode.newLayoutEntitiesClient(await this.platform.getClient(),gi.LAYOUT_CONTROLLER_ID,this.identity)))),this.replace=async e=>{this.wire.sendAction("layout-replace").catch((e=>{}));const t=await this.platform.getClient();await t.dispatch("replace-layout",{target:this.identity,opts:{layout:e}})},this.replaceView=async(e,t)=>{this.wire.sendAction("layout-replace-view").catch((e=>{}));const n=await this.platform.getClient();await n.dispatch("replace-view",{target:this.identity,opts:{viewToReplace:e,newView:t}})},this.applyPreset=async e=>{this.wire.sendAction("layout-apply-preset").catch((e=>{}));const t=await this.platform.getClient(),{presetType:n}=e;if(!n||!(0,yi.isValidPresetType)(n))throw new Error("Cannot apply preset layout, please include an applicable presetType property in the PresetLayoutOptions.");await t.dispatch("apply-preset-layout",{target:this.identity,opts:{presetType:n}})};const n=(0,pi.validateIdentity)(e);if(n)throw new Error(n);this.identity=e,this.platform=this.fin.Platform.wrapSync({uuid:e.uuid}),e.uuid===this.fin.me.uuid&&e.name===this.fin.me.name&&(this.init=this.fin.Platform.Layout.init)}async getConfig(){this.wire.sendAction("layout-get-config").catch((e=>{}));return(await this.platform.getClient()).dispatch("get-frame-snapshot",{target:this.identity})}async getCurrentViews(){this.wire.sendAction("layout-get-views").catch((e=>{}));const e=await this.platform.getClient();return(await e.dispatch("get-layout-views",{target:this.identity})).map((e=>this.fin.View.wrapSync(e)))}async getRootItem(){this.wire.sendAction("layout-get-root-item").catch((()=>{}));const e=await li(this,di,"f").getValue(),t=await e.getRoot("layoutName"in this.identity?this.identity:void 0);return fi.LayoutNode.getEntity(t,e)}async getStackByViewIdentity(e){this.wire.sendAction("layout-get-stack-by-view").catch((()=>{}));const t=await li(this,di,"f").getValue(),n=await t.getStackByView(e);if(!n)throw new Error(`No stack found for view: ${e.uuid}/${e.name}`);return fi.LayoutNode.getEntity(n,t)}async addView(e,{location:t,targetView:n}={}){this.wire.sendAction("layout-add-view").catch((e=>{}));const{identity:i}=await li(this,ci,"m",hi).call(this,"layout-add-view",{viewOptions:e,location:t,targetView:n});return{identity:i}}async closeView(e){this.wire.sendAction("layout-close-view").catch((e=>{})),await li(this,ci,"m",hi).call(this,"layout-close-view",{viewIdentity:e})}}Ln.Layout=mi,di=new WeakMap,ci=new WeakSet,hi=async function(e,t){return(await this.platform.getClient()).dispatch(e,{target:this.identity,opts:t})};var vi,Ci,bi,Ii,Ei,xi=s&&s.__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)},Ai=s&&s.__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};Object.defineProperty(kn,"__esModule",{value:!0}),kn.LayoutModule=void 0;const Pi=d,Mi=Ln,_i=ai;class Oi extends Pi.Base{constructor(){super(...arguments),vi.add(this),Ci.set(this,!1),bi.set(this,null),this.init=async(e={})=>{if(this.wire.sendAction("layout-init").catch((e=>{})),!this.wire.environment.layoutAllowedInContext(this.fin))throw new Error("Layout.init can only be called from a Window context.");if(xi(this,Ci,"f"))throw new Error("Layout.init was already called, please use Layout.create to add additional layouts.");"openfin"===this.wire.environment.type&&await this.fin.Platform.getCurrentSync().getClient(),Ai(this,Ci,!0,"f"),Ai(this,bi,await this.wire.environment.initLayoutManager(this.fin,this.wire,e),"f"),await this.wire.environment.applyLayoutSnapshot(this.fin,xi(this,bi,"f"),e);const t={name:this.fin.me.name,uuid:this.fin.me.uuid};if(!e.layoutManagerOverride){const e={layoutName:_i.DEFAULT_LAYOUT_KEY,...t};return xi(this,Ii,"f").call(this,e)}return this.wrapSync(t)},Ii.set(this,(e=>{const t="[Layout] You are using a deprecated property `layoutManager` - it will throw if you access it starting in v37.",n=new Proxy({},{get(e,n){throw console.warn(`[Layout-mgr-proxy] accessing ${n.toString()}`),new Error(t)}}),i=Object.assign(this.wrapSync(e),{layoutManager:n});return new Proxy(i,{get(e,n){if("layoutManager"===n)throw console.warn(`[Layout-proxy] accessing ${n.toString()}`),new Error(t);return e[n]}})})),this.getCurrentLayoutManagerSync=()=>xi(this,vi,"m",Ei).call(this,"fin.Platform.Layout.getCurrentLayoutManagerSync()"),this.create=async e=>this.wire.environment.createLayout(xi(this,vi,"m",Ei).call(this,"fin.Platform.Layout.create()"),e),this.destroy=async e=>this.wire.environment.destroyLayout(xi(this,vi,"m",Ei).call(this,"fin.Platform.Layout.destroy()"),e)}async wrap(e){return this.wire.sendAction("layout-wrap").catch((e=>{})),new Mi.Layout(e,this.wire)}wrapSync(e){return this.wire.sendAction("layout-wrap-sync").catch((e=>{})),new Mi.Layout(e,this.wire)}async getCurrent(){if(this.wire.sendAction("layout-get-current").catch((e=>{})),"openfin"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error("You are not in a Window context. Only Windows can have a Layout.");const{uuid:e,name:t}=this.fin.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction("layout-get-current-sync").catch((e=>{})),"openfin"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error("You are not in a Window context. Only Windows can have a Layout.");const{uuid:e,name:t}=this.fin.me;return this.wrapSync({uuid:e,name:t})}async getLayoutByViewIdentity(e){this.wire.sendAction("layout-get-by-view-identity").catch((()=>{}));let t=await this.wire.environment.getViewWindowIdentity(this.fin,e);t.identity&&(t=t.identity);try{const n=this.wrapSync(t),i=await Mi.Layout.getClient(n),r=await i.getLayoutIdentityForViewOrThrow(e);return this.wrapSync(r)}catch(n){if(!["No action registered at target for","getLayoutIdentityForViewOrThrow is not a function"].some((e=>n.message.includes(e))))throw n;if(t.uuid===t.name)throw new Error(`View identity ${JSON.stringify(e)} is not attached to any layout in provider window ${JSON.stringify(t)}.`);return this.wrapSync(t)}}}kn.LayoutModule=Oi,Ci=new WeakMap,bi=new WeakMap,Ii=new WeakMap,vi=new WeakSet,Ei=function(e){if(!xi(this,bi,"f"))throw new Error(`You must call init before using the API ${e}`);return xi(this,bi,"f")},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(kn,e),n(Ln,e)}(jn),Object.defineProperty(Pn,"__esModule",{value:!0}),Pn.PlatformModule=void 0;const Si=d,Ri=Mn,Fi=jn;class ji extends Si.Base{constructor(e,t){super(e),this._channel=t,this.Layout=new Fi.LayoutModule(this.wire)}async init(e){if(!fin.__internal_.isPlatform||fin.me.name!==fin.me.uuid)throw new Error("fin.Platform.init should only be called from a custom platform provider running in the main window of the application.");return this.wire.environment.initPlatform(this.fin,e)}async wrap(e){return this.wire.sendAction("platform-wrap").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}wrapSync(e){return this.wire.sendAction("platform-wrap-sync").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}async getCurrent(){return this.wire.sendAction("platform-get-current").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction("platform-get-current-sync").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}start(e){return this.wire.sendAction("platform-start").catch((e=>{})),new Promise((async(t,n)=>{try{const{uuid:n}=e,i=await this.fin.Application._create({...e,isPlatformController:!0});i.once("platform-api-ready",(()=>t(this.wrapSync({uuid:n})))),i._run({uuid:n})}catch(e){n(e)}}))}startFromManifest(e,t){return this.wire.sendAction("platform-start-from-manifest").catch((e=>{})),new Promise((async(n,i)=>{try{const i=await this.fin.Application._createFromManifest(e);i.once("platform-api-ready",(()=>n(this.wrapSync({uuid:i.identity.uuid})))),i._run(t)}catch(e){i(e)}}))}}Pn.PlatformModule=ji,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Pn,e),n(Mn,e)}(An);var ki={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getMe=e.getBaseMe=e.environmentUnsupportedMessage=void 0;const t=J(),n=un,i=ie(),r=rn;function o(e,t,n){return{...{isView:"view"===e,isWindow:"window"===e,isFrame:"iframe"===e,isExternal:"external connection"===e},uuid:t,name:n,entityType:e}}e.environmentUnsupportedMessage="You are not running in OpenFin.",e.getBaseMe=o,e.getMe=function(s){const{uuid:a,name:c,entityType:d}=s.me,h={setContext(){throw new Error(e.environmentUnsupportedMessage)},addContextHandler(){throw new Error(e.environmentUnsupportedMessage)},getContextGroups(){throw new Error(e.environmentUnsupportedMessage)},joinContextGroup(){throw new Error(e.environmentUnsupportedMessage)},removeFromContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getAllClientsInContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getInfoForContextGroup(){throw new Error(e.environmentUnsupportedMessage)}},l="Interop API has not been instantiated. Either connection has failed or you have not declared interop in your config.",u={setContext(){throw new Error(l)},addContextHandler(){throw new Error(l)},getContextGroups(){throw new Error(l)},joinContextGroup(){throw new Error(l)},removeFromContextGroup(){throw new Error(l)},getAllClientsInContextGroup(){throw new Error(l)},getInfoForContextGroup(){throw new Error(l)}},p={eventNames:()=>{throw new Error(e.environmentUnsupportedMessage)},emit:()=>{throw new Error(e.environmentUnsupportedMessage)},listeners:()=>{throw new Error(e.environmentUnsupportedMessage)},listenerCount:()=>{throw new Error(e.environmentUnsupportedMessage)},on:()=>{throw new Error(e.environmentUnsupportedMessage)},addListener:()=>{throw new Error(e.environmentUnsupportedMessage)},once:()=>{throw new Error(e.environmentUnsupportedMessage)},prependListener:()=>{throw new Error(e.environmentUnsupportedMessage)},prependOnceListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeAllListeners:()=>{throw new Error(e.environmentUnsupportedMessage)}};switch(d){case"view":return Object.assign(new t.View(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case"window":return Object.assign(new i._Window(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case"iframe":return Object.assign(new n._Frame(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case"external connection":return Object.assign(new r.ExternalApplication(s,{uuid:a}),o(d,a,c),{interop:u,isOpenFin:!1});default:return{...o(d,a,c),...p,interop:h,isOpenFin:!1}}}}(ki);var Li={},Ti={},$i={};Object.defineProperty($i,"__esModule",{value:!0}),$i.createWarningObject=$i.createUnusableObject=void 0,$i.createUnusableObject=function(e){const t=()=>{throw new Error(e)};return new Proxy({},{apply:t,construct:t,defineProperty:t,deleteProperty:t,get:t,getOwnPropertyDescriptor:t,getPrototypeOf:t,has:t,isExtensible:t,ownKeys:t,preventExtensions:t,set:t,setPrototypeOf:t})},$i.createWarningObject=function(e,t){return new Proxy(t,{get:(...t)=>(console.warn(e),Reflect.get(...t)),set:(...t)=>(console.warn(e),Reflect.set(...t)),getOwnPropertyDescriptor:(...t)=>(console.warn(e),Reflect.getOwnPropertyDescriptor(...t)),ownKeys:(...t)=>(console.warn(e),Reflect.ownKeys(...t))})};var Bi,Gi={},Wi={};var Hi={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.wrapIntentHandler=e.BROKER_ERRORS=e.generateOverrideWarning=e.generateOverrideError=e.wrapContextHandler=e.wrapInTryCatch=e.generateId=void 0;e.generateId=()=>`${Math.random()}${Date.now()}`;e.wrapInTryCatch=(e,t)=>(...n)=>{try{return e(...n)}catch(e){throw new Error((t||"")+e)}};e.wrapContextHandler=(e,t)=>async n=>{try{await e(n)}catch(e){throw console.error(`Error thrown by handler ${t} for context type ${n.type}: ${e}`),e}};e.generateOverrideError=(e,t)=>`You have tried to to use ${e} but ${t} has not been overridden in the Interop Broker. Please override this function. Refer to our documentation for more info.`;e.generateOverrideWarning=(e,t,n,i)=>{const{uuid:r,name:o}=n;return i?`Entity with identity: ${r}/${o} has called ${i} or ${e} but ${t} has not been overridden.`:`Entity with identity: ${r}/${o} has called ${e} but ${t} has not been overridden.`},e.BROKER_ERRORS={fireIntent:(0,e.generateOverrideError)("fireIntent","handleFiredIntent"),fireIntentForContext:(0,e.generateOverrideError)("fireIntentForContext","handleFiredIntentForContext"),getInfoForIntent:(0,e.generateOverrideError)("getInfoForIntent","handleInfoForIntent"),getInfoForIntentsByContext:(0,e.generateOverrideError)("getInfoForIntentsByContext","handleInfoForIntentsByContext"),joinSessionContextGroupWithJoinContextGroup:"The Context Group you have tried to join is a Session Context Group. Custom Context Groups can only be defined by the Interop Broker through code or manifest configuration. Please use joinSessionContextGroup.",fdc3Open:(0,e.generateOverrideError)("fdc3.open","fdc3HandleOpen"),fdc3FindInstances:(0,e.generateOverrideError)("fdc3.findInstances","fdc3HandleFindInstances"),fdc3GetAppMetadata:(0,e.generateOverrideError)("fdc3.getAppMetadata","fdc3HandleGetAppMetadata"),fdc3GetInfo:(0,e.generateOverrideError)("fdc3.getInfo","fdc3HandleGetInfo")};e.wrapIntentHandler=(e,t)=>async n=>{try{return e(n)}catch(e){throw console.error(`Error thrown by handler ${t}: ${e}`),e}}}(Hi);var Ni,Di,Ui={};function Vi(){if(Di)return Gi;Di=1;var e,t,n,r=s&&s.__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},o=s&&s.__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)},a=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Gi,"__esModule",{value:!0}),Gi.InteropBroker=void 0;const c=d,h=a(function(){if(Bi)return Wi;Bi=1,Object.defineProperty(Wi,"__esModule",{value:!0});const e=Cr();return Wi.default=class{constructor(e,t){this.provider=e,this.id=t,this.lastContext=void 0,this.contextGroupMap=new Map,this.clients=new Map,this.registerListeners()}registerListeners(){this.provider.register(`sessionContextGroup:getContext-${this.id}`,this.getCurrentContext.bind(this)),this.provider.register(`sessionContextGroup:setContext-${this.id}`,this.setContext.bind(this)),this.provider.register(`sessionContextGroup:handlerAdded-${this.id}`,this.handlerAdded.bind(this)),this.provider.register(`sessionContextGroup:handlerRemoved-${this.id}`,this.handlerRemoved.bind(this))}getCurrentContext(e){return e.type?this.contextGroupMap.get(e.type):this.lastContext}setContext(t,n){const{context:i}=t,r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name} not in Session Client State Map`);this.contextGroupMap.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{e.contextHandlers.get(i.type)?.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getClientState(e){return this.clients.get(e.endpointId)}async handlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(i){const e=r.contextHandlers.get(i)||[];r.contextHandlers.set(i,[...e,n]);const o=this.contextGroupMap.get(i);o&&await this.provider.dispatch(t,n,o)}else{r.globalHandler=n;const e=[...this.contextGroupMap.keys()].map((async e=>{const i=this.contextGroupMap.get(e);i&&await this.provider.dispatch(t,n,i)}));await Promise.all(e)}}handlerRemoved(e,t){const{handlerId:n}=e,i=this.clients.get(t.endpointId);i?(Array.from(i.contextHandlers).forEach((([,e])=>{const t=e.indexOf(n);t>-1&&e.splice(t,1)})),i.globalHandler===n&&(i.globalHandler=void 0)):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={contextHandlers:new Map,clientIdentity:e,globalHandler:void 0};this.clients.set(e.endpointId,t)}}onDisconnection(e){this.clients.delete(e.endpointId)}},Wi}()),l=Hi,u=a(i),p=function(){if(Ni)return Ui;Ni=1,Object.defineProperty(Ui,"__esModule",{value:!0}),Ui.PrivateChannelProvider=void 0;const e=Vi();return Ui.PrivateChannelProvider=class t{constructor(e,t){this.provider=e,this.id=t,this.clients=new Map,this.registerListeners(),this.contextByContextType=new Map,this.lastContext=void 0,this.provider.onConnection((e=>this.registerNewClient(e))),this.provider.onDisconnection((async e=>{const{endpointId:t}=e;this.clients.has(t)&&await this.handleClientDisconnecting(e),0===(await this.provider.getAllClientInfo()).length&&this.provider.destroy()}))}getClientState(e){return this.clients.get(e.endpointId)}registerListeners(){this.provider.register("broadcast",this.broadcast.bind(this)),this.provider.register("getCurrentContext",this.getCurrentContext.bind(this)),this.provider.register("contextHandlerAdded",this.contextHandlerAdded.bind(this)),this.provider.register("contextHandlerRemoved",this.contextHandlerRemoved.bind(this)),this.provider.register("nonStandardHandlerRemoved",this.nonStandardHandlerRemoved.bind(this)),this.provider.register("onAddContextHandlerAdded",this.onAddContextHandlerAdded.bind(this)),this.provider.register("onDisconnectHandlerAdded",this.onDisconnectHandlerAdded.bind(this)),this.provider.register("onUnsubscribeHandlerAdded",this.onUnsubscribeHandlerAdded.bind(this)),this.provider.register("clientDisconnecting",((e,t)=>{this.handleClientDisconnecting(t)}))}broadcast(t,n){const{context:i}=t;if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name}, tried to call broadcast, is not connected to this Private Channel`);const r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to broadcast - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);this.contextByContextType.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{const t=e.handlerIdsByContextTypes.get(i.type);t&&t.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getCurrentContext(e,t){const{contextType:n}=e;if(!this.getClientState(t))throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call getCurrentContext, is not connected to this Private Channel`);if(void 0!==n){return this.contextByContextType.get(n)||null}return this.lastContext?this.lastContext:null}contextHandlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call addContextListener, is not connected to this Private Channel`);if(i){const e=r.handlerIdsByContextTypes.get(i)||[];r.handlerIdsByContextTypes.set(i,[...e,n])}else r.globalHandler=n;Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&e.onAddContextListenerHandlerId&&this.provider.dispatch(e.clientIdentity,e.onAddContextListenerHandlerId,i)}))}async contextHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);if(i){let e;if(i.globalHandler===n)i.globalHandler=void 0;else for(const[t,r]of i.handlerIdsByContextTypes){const i=r.indexOf(n);i>-1&&(r.splice(i,1),e=t)}const r=(await this.getConnectedClients()).map((async n=>{const{clientIdentity:i,clientIdentity:{endpointId:r},onUnsubscribeHandlerId:o}=n;r!==t.endpointId&&o&&await this.provider.dispatch(i,o,e)}));try{await Promise.all(r)}catch(e){throw console.error(`Problem when attempting to dispatch to onUnsubscribeHandlers. Error: ${e} Removing Client: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}`),new Error(e)}}else console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}.`)}nonStandardHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);i?i.onDisconnectHandlerId===n?i.onDisconnectHandlerId=void 0:i.onAddContextListenerHandlerId===n?i.onAddContextListenerHandlerId=void 0:i.onUnsubscribeHandlerId===n&&(i.onUnsubscribeHandlerId=void 0):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}onAddContextHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onAddContextListener, is not connected to this Private Channel`);n.onAddContextListenerHandlerId=i,Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&Array.from(e.handlerIdsByContextTypes.keys()).forEach((e=>{this.provider.dispatch(t,i,e)}))}))}onDisconnectHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onDisconnect, is not connected to this Private Channel`);n.onDisconnectHandlerId=i}onUnsubscribeHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onUnsubscribe, is not connected to this Private Channel`);n.onUnsubscribeHandlerId=i}removeClient(e){const t=this.getClientState(e);if(!t)throw new Error(`Client with Identity: ${e.uuid} ${e.name}, tried to call disconnect, is not connected to this Private Channel`);t.handlerIdsByContextTypes.clear(),this.clients.delete(e.endpointId)}async fireOnDisconnectForOtherClients(e){const{endpointId:t}=e,n=(await this.getConnectedClients()).map((async e=>{const{clientIdentity:{endpointId:n},onDisconnectHandlerId:i}=e;n!==t&&i&&await this.provider.dispatch(e.clientIdentity,i)}));try{await Promise.all(n)}catch(t){throw console.error(`Problem when attempting to dispatch to onDisconnectHandlers. Error: ${t} Disconnecting Client: uuid: ${e.uuid}. name: ${e.name}. endpointId: ${e.endpointId}`),new Error(t)}}async unsubscribeAll(e){const{endpointId:t}=e,n=this.clients.get(t);if(n){const t=Array.from(n.handlerIdsByContextTypes.values()).flat(),i=n.globalHandler;if(t.length>0){const n=t.map((async t=>this.contextHandlerRemoved({handlerId:t},e)));try{await Promise.all(n)}catch(e){console.error(e.message)}}if(i)try{await this.contextHandlerRemoved({handlerId:i},e)}catch(e){console.error(e.message)}}}async handleClientDisconnecting(e){await this.unsubscribeAll(e),this.removeClient(e),await this.fireOnDisconnectForOtherClients(e)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={clientIdentity:e,handlerIdsByContextTypes:new Map,globalHandler:void 0,onAddContextListenerHandlerId:void 0,onUnsubscribeHandlerId:void 0,onDisconnectHandlerId:void 0};this.clients.set(e.endpointId,t)}}async getConnectedClients(){const e=await this.provider.getAllClientInfo();return Array.from(this.clients.values()).filter((t=>{const{uuid:n,name:i}=t.clientIdentity;return e.some((e=>i===e.name&&n===e.uuid))}))}static init(e,n){return new t(e,n)}},Ui}(),w=G,y=[{id:"green",displayMetadata:{color:"#00CC88",name:"green"}},{id:"purple",displayMetadata:{color:"#8C61FF",name:"purple"}},{id:"orange",displayMetadata:{color:"#FF8C4C",name:"orange"}},{id:"red",displayMetadata:{color:"#FF5E60",name:"red"}},{id:"pink",displayMetadata:{color:"#FF8FB8",name:"pink"}},{id:"yellow",displayMetadata:{color:"#E9FF8F",name:"yellow"}}];let f=class i extends c.Base{constructor(i,s,a){super(i),e.set(this,void 0),t.set(this,void 0),n.set(this,void 0),this.getProvider=()=>o(this,n,"f").getValue(),this.interopClients=new Map,this.contextGroupsById=new Map,r(this,t,a.contextGroups??[...y],"f"),r(this,e,a.fdc3Info,"f"),a?.logging&&(this.logging=a.logging),this.intentClientMap=new Map,this.lastContextMap=new Map,this.sessionContextGroupMap=new Map,r(this,n,new w.Lazy(s),"f"),this.setContextGroupMap(),this.setupChannelProvider()}static createClosedConstructor(...e){return class extends i{constructor(...t){if(t.length){const[n,i,r]=t;if(r&&"object"==typeof r&&!(0,u.default)(r,e[2]))return console.warn("You have modified the parameters of the InteropOverride constructor. This behavior is deprecated and will be removed in a future version. You can modify these options in your manifest. Please consult our Interop docs for guidance on migrating to the new override scheme."),void super(e[0],e[1],r);console.warn("You are attempting to pass arguments to the InteropOverride constructor. This is not necessary, and these passed arguments will be ignored. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.")}super(...e)}}}setContext({context:e},t){this.wire.sendAction("interop-broker-set-context").catch((e=>{}));const n=this.getClientState(t);if(!n||!n.contextGroupId)throw n?new Error("You must join a context group before you can set context."):new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);{const{contextGroupId:t}=n;this.setContextForGroup({context:e},t)}}setContextForGroup({context:e},t){this.wire.sendAction("interop-broker-set-context-for-group").catch((e=>{}));const n=this.contextGroupsById.get(t);if(!n)throw new Error(`Unable to set context for context group that isn't in the context group mapping: ${t}.`);const r=i.checkContextIntegrity(e);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(e)}`);const o=e.type;n.set(o,e),this.lastContextMap.set(t,o);Array.from(this.interopClients.values()).filter((e=>e.contextGroupId===t)).forEach((t=>{for(const[,n]of t.contextHandlers)i.isContextTypeCompatible(o,n.contextType)&&this.invokeContextHandler(t.clientIdentity,n.handlerId,e)}))}getCurrentContext(e,t){this.wire.sendAction("interop-broker-get-current-context").catch((e=>{}));const n=this.getClientState(t);if(!n?.contextGroupId)throw new Error("You must be a member of a context group to call getCurrentContext");const{contextGroupId:i}=n,r=this.contextGroupsById.get(i),o=this.lastContextMap.get(i),s=e?.contextType??o;return r&&s?r.get(s):void 0}async joinContextGroup({contextGroupId:e,target:t},n){if(this.wire.sendAction("interop-broker-join-context-group").catch((e=>{})),this.sessionContextGroupMap.has(e))throw new Error(l.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup);if(t){i.hasEndpointId(t)&&await this.addClientToContextGroup({contextGroupId:e},t);try{const n=this.channel.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name));if(!n.length)throw new Error(`Given Identity ${t.uuid} ${t.name} is not connected to the Interop Broker.`);n.length>1&&console.warn(`More than one connection found for identity ${t.uuid} ${t.name}`);const i=[];for(const t of n)i.push(this.addClientToContextGroup({contextGroupId:e},t));await Promise.all(i)}catch(e){throw new Error(e)}}else await this.addClientToContextGroup({contextGroupId:e},n)}async addClientToContextGroup({contextGroupId:e},t){this.wire.sendAction("interop-broker-add-client-to-context-group").catch((e=>{}));const n=this.getClientState(t);if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(!this.getContextGroups().find((t=>t.id===e)))throw new Error(`Attempting to join a context group that does not exist: ${e}. You may only join existing context groups.`);if(n.contextGroupId!==e){n.contextGroupId=e,await this.setCurrentContextGroupInClientOptions(t,e);const i=this.contextGroupsById.get(e);for(const[,e]of n.contextHandlers){const{contextType:n,handlerId:r}=e;if(void 0===n)i.forEach(((e,n)=>{this.invokeContextHandler(t,r,e)}));else if(i.has(n)){const e=i.get(n);e&&this.invokeContextHandler(t,r,e)}}}}async removeFromContextGroup({target:e},t){if(this.wire.sendAction("interop-broker-remove-from-context-group").catch((e=>{})),e){i.hasEndpointId(e)&&await this.removeClientFromContextGroup(e);try{const t=this.channel.connections.filter((t=>t.uuid===e.uuid&&t.name===e.name));if(!t.length)throw new Error(`No connection found for given Identity ${e.uuid} ${e.name}`);t.length>1&&console.warn(`More than one connection found for identity ${e.uuid} ${e.name}`);const n=[];for(const e of t)n.push(this.removeClientFromContextGroup(e));await Promise.all(n)}catch(e){throw new Error(e)}}else await this.removeClientFromContextGroup(t)}async removeClientFromContextGroup(e){this.wire.sendAction("interop-broker-remove-client-from-context-group").catch((e=>{}));const t=this.getClientState(e);t&&(t.contextGroupId=void 0),await this.setCurrentContextGroupInClientOptions(e,null)}getContextGroups(){return this.wire.sendAction("interop-broker-get-context-groups").catch((e=>{})),o(this,t,"f").map((e=>({...e})))}getInfoForContextGroup({contextGroupId:e}){return this.wire.sendAction("interop-broker-get-info-for-context-group").catch((e=>{})),this.getContextGroups().find((t=>t.id===e))}getAllClientsInContextGroup({contextGroupId:e}){this.wire.sendAction("interop-broker-get-all-clients-in-context-group").catch((e=>{}));return Array.from(this.interopClients.values()).filter((t=>t.contextGroupId===e)).map((e=>e.clientIdentity))}async handleFiredIntent(e,t){const n=(0,l.generateOverrideWarning)("fdc3.raiseIntent","InteropBroker.handleFiredIntent",t,"interopClient.fireIntent");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntent)}async setIntentTarget(e,t){this.wire.sendAction("interop-broker-set-intent-target").catch((e=>{}));const n=this.intentClientMap.get(t.name),i=`intent-handler-${e.name}`;if(n){const t=n.get(i);if(t){if(t.pendingIntents.push(e),t.clientIdentity&&t.isReady){const{clientIdentity:e,pendingIntents:n}=t;try{const r=n[n.length-1];await this.invokeIntentHandler(e,i,r),t.pendingIntents=[]}catch(n){console.error(`Error invoking intent handler for client ${e.uuid}/${e.name}/${e.endpointId}`),t.isReady=!1}}}else n.set(i,{isReady:!1,pendingIntents:[e]})}else{this.intentClientMap.set(t.name,new Map);const n=this.intentClientMap.get(t.name);n&&n.set(i,{isReady:!1,pendingIntents:[e]})}}async handleInfoForIntent(e,t){const n=(0,l.generateOverrideWarning)("fdc3.findIntent","InteropBroker.handleInfoForIntent",t,"interopClient.getInfoForIntent");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntent)}async handleInfoForIntentsByContext(e,t){const n=(0,l.generateOverrideWarning)("fdc3.findIntentsByContext","InteropBroker.handleInfoForIntentsByContext",t,"interopClient.getInfoForIntentsByContext");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntentsByContext)}async handleFiredIntentForContext(e,t){const n=(0,l.generateOverrideWarning)("fdc3.raiseIntentForContext","InteropBroker.handleFiredIntentForContext",t,"interopClient.fireIntentForContext");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntentForContext)}async clientDisconnected(e){}async fdc3HandleOpen({app:e,context:t},n){const i=(0,l.generateOverrideWarning)("fdc3.open","InteropBroker.fdc3HandleOpen",n);throw console.warn(i),new Error(l.BROKER_ERRORS.fdc3Open)}async fdc3HandleFindInstances(e,t){const n=(0,l.generateOverrideWarning)("fdc3.open","InteropBroker.fdc3HandleFindInstances",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3FindInstances)}async fdc3HandleGetAppMetadata(e,t){const n=(0,l.generateOverrideWarning)("fdc3.getAppMetadata","InteropBroker.fdc3HandleGetAppMetadata",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3GetAppMetadata)}async invokeContextHandler(e,t,n){const i=await this.getProvider();try{await i.dispatch(e,t,n)}catch(i){console.error(`Error invoking context handler ${t} for context type ${n.type} in client ${e.uuid}/${e.name}/${e.endpointId}`,i)}}async invokeIntentHandler(e,t,n){const i=await this.getProvider();await i.dispatch(e,t,n)}async fdc3HandleGetInfo(t,n){const{fdc3Version:i}=t;return{fdc3Version:i,...o(this,e,"f"),optionalFeatures:{OriginatingAppMetadata:!1,UserChannelMembershipAPIs:!0},appMetadata:{appId:"",instanceId:""}}}async getAllClientInfo(){return(await this.getProvider()).getAllClientInfo()}decorateSnapshot(e){return{...e,interopSnapshotDetails:{contextGroupStates:this.getContextGroupStates()}}}applySnapshot(e,t){const n=e?.interopSnapshotDetails?.contextGroupStates;n&&(t?.closeExistingWindows||this.updateExistingClients(n),this.rehydrateContextGroupStates(n))}updateExistingClients(e){this.interopClients.forEach((t=>{const{clientIdentity:n,contextGroupId:r,contextHandlers:o}=t;if(r){const t=e[r];for(const[,e]of Object.entries(t))o.forEach((t=>{const{handlerId:r,contextType:o}=t;i.isContextTypeCompatible(e.type,o)&&this.invokeContextHandler(n,r,e)}))}}))}getContextGroupStates(){return i.toObject(this.contextGroupsById)}rehydrateContextGroupStates(e){const t=Object.entries(e);for(const[e,n]of t){const t=Object.entries(n);for(const[n,i]of t)if(this.contextGroupsById.has(e)){this.contextGroupsById.get(e).set(n,i)}else console.warn(`Attempting to set a context group that isn't in the context group mapping. Skipping context group rehydration for: ${e}`)}}contextHandlerRegistered({contextType:e,handlerId:t},n){const i={contextType:e,handlerId:t},r=this.getClientState(n);if(r?.contextHandlers.set(t,i),r&&r.contextGroupId){const{contextGroupId:i}=r,o=this.contextGroupsById.get(i);if(void 0===e)o.forEach(((e,i)=>{this.invokeContextHandler(n,t,e)}));else if(o.has(e)){const i=o.get(e);i&&this.invokeContextHandler(n,t,i)}}}async intentHandlerRegistered(e,t){const{handlerId:n}=e,i=this.intentClientMap.get(t.name),r=i?.get(n);if(i)if(r){const{pendingIntents:e}=r;r.clientIdentity=t,r.isReady=!0;try{if(e.length>0){const i=e[e.length-1];await this.invokeIntentHandler(t,n,i),r.pendingIntents=[]}}catch(e){console.error(`Error invoking intent handler: ${n} for client ${t.uuid}/${t.name}/${t.endpointId}`)}}else i.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t});else{this.intentClientMap.set(t.name,new Map);const e=this.intentClientMap.get(t.name);e&&e.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t})}}removeContextHandler({handlerId:e},t){const n=this.getClientState(t);n&&n.contextHandlers.delete(e)}handleJoinSessionContextGroup({sessionContextGroupId:e},t){try{if(!e)throw new Error("Failed to join session context group: must specify group id.");const n=this.sessionContextGroupMap.get(e);if(n)n.registerNewClient(t);else{const n=new h.default(this.channel,e);n.registerNewClient(t),this.sessionContextGroupMap.set(e,n)}return{hasConflict:this.contextGroupsById.has(e)}}catch(e){throw new Error(e)}}getClientState(e){return this.interopClients.get(e.endpointId)}static toObject(e){const t=Object.fromEntries(e),n={};return Object.entries(t).forEach((([e,t])=>{const i=Object.fromEntries(t);n[e]=i})),n}static checkContextIntegrity(e){if(!e)return{isValid:!1,reason:"No context supplied"};if("object"!=typeof e)return{isValid:!1,reason:"Context must be an Object"};if(!e.type)return{isValid:!1,reason:"Context must have a type property"};if(e.id&&"object"!=typeof e.id)return{isValid:!1,reason:"Context id must be an Object populated with key-value identifiers (if set)"};if(e.id){const{id:t}=e,n=Object.keys(t);let i=!1;if(!n.length)return{isValid:!1,reason:"Context id must have at least one key-value identifier"};if(n.forEach((e=>{"string"==typeof e&&"string"==typeof t[e]||(i=!0)})),i)return{isValid:!1,reason:"Context id key-value identifiers must be of type string"}}return e.name&&"string"!=typeof e.name?{isValid:!1,reason:"Context name must be of string type (if set)"}:{isValid:!0}}static hasEndpointId(e){return void 0!==e.endpointId}static isContextTypeCompatible(e,t){return void 0===t||e===t}setContextGroupMap(){for(const e of this.getContextGroups())this.contextGroupsById.set(e.id,new Map)}async setCurrentContextGroupInClientOptions(e,t){try{const n=await this.fin.System.getEntityInfo(e.uuid,e.name);let i;"view"===n.entityType?i=await this.fin.View.wrap(e):"window"===n.entityType&&(i=await this.fin.Window.wrap(e)),i&&await i.updateOptions({interop:{currentContextGroup:t}})}catch(e){}}async setupChannelProvider(){try{const e=await this.getProvider();this.channel=e,this.wireChannel(e)}catch(e){throw new Error(`Error setting up Interop Broker Channel Provider: ${e}`)}}wireChannel(e){e.onConnection((async(e,t)=>{if(!await this.isConnectionAuthorized(e,t))throw new Error(`Connection not authorized for ${e.uuid}, ${e.name}`);if(!e.endpointId)throw new Error("Version too old to be compatible with Interop. Please upgrade your runtime to a more recent version.");const n={contextGroupId:void 0,contextHandlers:new Map,clientIdentity:e};t?.currentContextGroup&&this.contextGroupsById.has(t.currentContextGroup)&&(n.contextGroupId=t?.currentContextGroup),this.interopClients.set(e.endpointId,n)})),e.onDisconnection((e=>{this.interopClients.delete(e.endpointId);const t=this.intentClientMap.get(e.name);t&&e.uuid===this.fin.me.uuid&&t.forEach((e=>{e.isReady=!1})),this.sessionContextGroupMap.forEach((t=>{t.onDisconnection(e)})),this.clientDisconnected(e)})),e.beforeAction((async(e,t,n)=>{if(!await this.isActionAuthorized(e,t,n))throw new Error(`Action (${e}) not authorized for ${n.uuid}, ${n.name}`);this.logging?.beforeAction?.enabled&&console.log(e,t,n)})),e.afterAction(((e,t,n)=>{this.logging?.afterAction?.enabled&&console.log(e,t,n)})),e.register("setContext",this.setContext.bind(this)),e.register("fireIntent",this.handleFiredIntent.bind(this)),e.register("getCurrentContext",this.getCurrentContext.bind(this)),e.register("getInfoForIntent",this.handleInfoForIntent.bind(this)),e.register("getInfoForIntentsByContext",this.handleInfoForIntentsByContext.bind(this)),e.register("fireIntentForContext",this.handleFiredIntentForContext.bind(this)),e.register("getContextGroups",this.getContextGroups.bind(this)),e.register("joinContextGroup",this.joinContextGroup.bind(this)),e.register("removeFromContextGroup",this.removeFromContextGroup.bind(this)),e.register("getAllClientsInContextGroup",this.getAllClientsInContextGroup.bind(this)),e.register("getInfoForContextGroup",this.getInfoForContextGroup.bind(this)),e.register("contextHandlerRegistered",this.contextHandlerRegistered.bind(this)),e.register("intentHandlerRegistered",this.intentHandlerRegistered.bind(this)),e.register("removeContextHandler",this.removeContextHandler.bind(this)),e.register("sessionContextGroup:createIfNeeded",this.handleJoinSessionContextGroup.bind(this)),e.register("fdc3Open",this.fdc3HandleOpen.bind(this)),e.register("fdc3v2FindIntentsByContext",this.handleInfoForIntentsByContext.bind(this)),e.register("fdc3FindInstances",this.fdc3HandleFindInstances.bind(this)),e.register("fdc3GetAppMetadata",this.fdc3HandleGetAppMetadata.bind(this)),e.register("fdc3v2GetInfo",(async(e,t)=>this.fdc3HandleGetInfo.bind(this)(e,t))),e.register("createPrivateChannelProvider",(async e=>{const{channelId:t}=e,n=await this.fin.InterApplicationBus.Channel.create(t);p.PrivateChannelProvider.init(n,t)}))}isConnectionAuthorized(e,t){return this.wire.sendAction("interop-broker-is-connection-authorized").catch((e=>{})),Promise.resolve(!0)}isActionAuthorized(e,t,n){return this.wire.sendAction("interop-broker-is-action-authorized").catch((e=>{})),Promise.resolve(!0)}};return Gi.InteropBroker=f,e=new WeakMap,t=new WeakMap,n=new WeakMap,Gi}var zi,Ki={},qi={},Ji=s&&s.__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},Yi=s&&s.__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)};Object.defineProperty(qi,"__esModule",{value:!0});const Zi=d,Qi=Hi;class Xi extends Zi.Base{constructor(e,t,n){super(e),zi.set(this,void 0),this.id=n,Ji(this,zi,t,"f")}async setContext(e){this.wire.sendAction("interop-session-context-group-set-context").catch((e=>{}));return(await Yi(this,zi,"f")).dispatch(`sessionContextGroup:setContext-${this.id}`,{sessionContextGroupId:this.id,context:e})}async getCurrentContext(e){this.wire.sendAction("interop-session-context-group-get-context").catch((e=>{}));return(await Yi(this,zi,"f")).dispatch(`sessionContextGroup:getContext-${this.id}`,{sessionContextGroupId:this.id,type:e})}async addContextHandler(e,t){if(this.wire.sendAction("interop-session-context-group-add-handler").catch((e=>{})),"function"!=typeof e)throw new Error("Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");const n=await Yi(this,zi,"f");let i;return i=t?`sessionContextHandler:invoke-${this.id}-${t}-${(0,Qi.generateId)()}`:`sessionContextHandler:invoke-${this.id}`,n.register(i,(0,Qi.wrapContextHandler)(e,i)),await n.dispatch(`sessionContextGroup:handlerAdded-${this.id}`,{handlerId:i,contextType:t}),{unsubscribe:await this.createUnsubscribeCb(i)}}async createUnsubscribeCb(e){const t=await Yi(this,zi,"f");return async()=>{t.remove(e),await t.dispatch(`sessionContextGroup:handlerRemoved-${this.id}`,{handlerId:e})}}getUserInstance(){return{id:this.id,setContext:(0,Qi.wrapInTryCatch)(this.setContext.bind(this),"Failed to set context: "),getCurrentContext:(0,Qi.wrapInTryCatch)(this.getCurrentContext.bind(this),"Failed to get context: "),addContextHandler:(0,Qi.wrapInTryCatch)(this.addContextHandler.bind(this),"Failed to add context handler: ")}}}qi.default=Xi,zi=new WeakMap;var er={},tr={},nr={},ir={},rr=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),or=s&&s.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),sr=s&&s.__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)&&rr(t,e,n);return or(t,e),t};Object.defineProperty(ir,"__esModule",{value:!0}),ir.PrivateChannelClient=void 0;const ar=sr(Hi);var cr,dr;function hr(){if(cr)return tr;cr=1;var e,t=s&&s.__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)},n=s&&s.__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},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(tr,"__esModule",{value:!0}),tr.FDC3ModuleBase=void 0;const o=nr,a=Hi,c=wr(),d=r(i);return tr.FDC3ModuleBase=class{get client(){return t(this,e,"f").call(this)}get fin(){return this.wire.getFin()}constructor(t,i){this.wire=i,e.set(this,void 0),n(this,e,t,"f")}async broadcast(e){return this.wire.sendAction("fdc3-broadcast").catch((e=>{})),this.client.setContext(e)}async _open(e,t){this.wire.sendAction("fdc3-open").catch((e=>{}));try{return await c.InteropClient.ferryFdc3Call(this.client,"fdc3Open",{app:e,context:t})}catch(e){const t=e.message===a.BROKER_ERRORS.fdc3Open?"ResolverUnavailable":e.message;throw new Error(t)}}async _getChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:"system",...(0,o.getUnsupportedChannelApis)()})))}async getOrCreateChannel(e){this.wire.sendAction("fdc3-get-or-create-channel").catch((e=>{}));const t=(await this._getChannels()).find((t=>t.id===e));if(t)return{...t,type:"system",...(0,o.getUnsupportedChannelApis)()};try{const t=await this.client.joinSessionContextGroup(e);return(0,o.buildAppChannelObject)(t)}catch(e){throw console.error(e.message),new Error(o.ChannelError.CreationFailed)}}async getSystemChannels(){return this.wire.sendAction("fdc3-get-system-channels").catch((e=>{})),this._getChannels()}async joinChannel(e){this.wire.sendAction("fdc3-join-channel").catch((e=>{}));try{return await this.client.joinContextGroup(e)}catch(e){if(e.message===a.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup?console.error("The Channel you have tried to join is an App Channel. Custom Channels can only be defined by the Interop Broker through code or manifest configuration. Please use getOrCreateChannel."):console.error(e.message),e.message.startsWith("Attempting to join a context group that does not exist"))throw new Error(o.ChannelError.NoChannelFound);throw new Error(o.ChannelError.AccessDenied)}}async getCurrentChannel(){this.wire.sendAction("fdc3-get-current-channel").catch((e=>{}));const e=await this.getCurrentContextGroupInfo();return e?this.buildChannelObject(e):null}async leaveCurrentChannel(){return this.wire.sendAction("fdc3-leave-current-channel").catch((e=>{})),this.client.removeFromContextGroup()}async getCurrentContextGroupInfo(){const e=await this.client.getContextGroups(),t=e.map((async e=>this.client.getAllClientsInContextGroup(e.id))),n=(await Promise.all(t)).findIndex((e=>e.some((e=>{const{uuid:t,name:n}=e;return this.wire.me.uuid===t&&this.wire.me.name===n}))));return e[n]}async buildChannelObject(e){return{...e,type:"system",addContextListener:(...[e,t])=>{let n,i;"function"==typeof e?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),n=e):(n=t,"string"==typeof e&&(i=e));const r=(async()=>{let e=!0;const t=await this.client.getCurrentContext(i);return this.client.addContextHandler(((i,r)=>{if(!e||(e=!1,!(0,d.default)(t,i)))return n(i,r)}),i)})();return{...r,unsubscribe:()=>r.then((e=>e.unsubscribe()))}},broadcast:this.broadcast.bind(this),getCurrentContext:async e=>{const t=await this.client.getCurrentContext(e);return void 0===t?null:t}}}},e=new WeakMap,tr}ir.PrivateChannelClient=class{constructor(e,t){this.id=t,this.client=e,this.listeners=new Map}async broadcast(e){return this.client.dispatch("broadcast",{context:e})}async getCurrentContext(e){return this.client.dispatch("getCurrentContext",{contextType:e})}async addContextListener(e,t){if("function"!=typeof t)throw new Error("Non-function argument passed to the second parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");let n;n=e?`contextHandler:invoke-${this.id}-${e}-${ar.generateId()}`:`contextHandler:invoke-${this.id}-${ar.generateId()}`,this.client.register(n,ar.wrapContextHandler(t,n));const i={unsubscribe:await this.createContextUnsubscribeCb(n)};return this.listeners.set(n,i),await this.client.dispatch("contextHandlerAdded",{handlerId:n,contextType:e}),i}createNonStandardUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch("nonStandardHandlerRemoved",{handlerId:e})}}createContextUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch("contextHandlerRemoved",{handlerId:e})}}onAddContextListener(e){const t=`onContextHandlerAdded:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch("onAddContextHandlerAdded",{handlerId:t}),n}onDisconnect(e){const t=`onDisconnect:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch("onDisconnectHandlerAdded",{handlerId:t}),n}onUnsubscribe(e){const t=`onUnsubscribe:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch("onUnsubscribeHandlerAdded",{handlerId:t}),n}async cleanUpAllSubs(){Array.from(this.listeners.keys()).forEach((e=>{this.client.remove(e),this.listeners.delete(e)}))}async disconnect(){try{await this.client.dispatch("clientDisconnecting"),await this.cleanUpAllSubs(),await this.client.disconnect()}catch(e){throw new Error(e.message)}}},function(e){var t=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.getIntentResolution=e.isChannel=e.isContext=e.connectPrivateChannel=e.buildAppChannelObject=e.buildPrivateChannelObject=e.ChannelError=e.ResultError=e.UnsupportedChannelApiError=e.getUnsupportedChannelApis=void 0;const n=Hi,r=ir,o=t(i);e.getUnsupportedChannelApis=e=>({addContextListener:()=>{throw new a("Channel.addContextListener",e)},broadcast:()=>{throw new a("Channel.broadcast",e)},getCurrentContext:()=>{throw new a("Channel.getCurrentContext",e)}});class a extends Error{constructor(e,t="System"){super(e),this.message=`Calling ${e} on an instance of a ${t} Channel returned by fdc3.get${t}Channels is not supported. If you would like to use a ${t} Channel, please use fdc3.joinChannel, fdc3.addContextListener, and fdc3.broadcast instead.`}}var c,d;e.UnsupportedChannelApiError=a,function(e){e.NoResultReturned="NoResultReturned",e.IntentHandlerRejected="IntentHandlerRejected"}(c=e.ResultError||(e.ResultError={})),(d=e.ChannelError||(e.ChannelError={})).NoChannelFound="NoChannelFound",d.AccessDenied="AccessDenied",d.CreationFailed="CreationFailed";e.buildPrivateChannelObject=e=>{let t=!1;const n=()=>{if(t)throw new Error("Private Channel Client has been disconnected from the Private Channel")};return{id:e.id,type:"private",broadcast:async t=>(n(),e.broadcast(t)),getCurrentContext:async t=>(n(),e.getCurrentContext(t)),addContextListener:async(t,i)=>{n();let r=i,o=t;"function"==typeof t&&(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),r=t,o=null);return e.addContextListener(o,r)},onAddContextListener:t=>(n(),e.onAddContextListener(t)),disconnect:async()=>(n(),t=!0,e.disconnect()),onDisconnect:t=>(n(),e.onDisconnect(t)),onUnsubscribe:t=>(n(),e.onUnsubscribe(t))}};e.buildAppChannelObject=e=>({id:e.id,type:"app",broadcast:e.setContext,getCurrentContext:async t=>{const n=await e.getCurrentContext(t);return void 0===n?null:n},addContextListener:(t,n)=>{let i,r;"function"==typeof t?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),i=t):(i=n,"string"==typeof t&&(r=t));const s=(async()=>{let t=!0;const n=await e.getCurrentContext(r);return e.addContextHandler(((e,r)=>{if(!t||(t=!1,!(0,o.default)(n,e)))return i(e,r)}),r)})();return{...s,unsubscribe:()=>s.then((e=>e.unsubscribe()))}}});e.connectPrivateChannel=async t=>{try{const n=await fin.InterApplicationBus.Channel.connect(t),i=new r.PrivateChannelClient(n,t);return(0,e.buildPrivateChannelObject)(i)}catch(e){throw new Error(`Private Channel with id: ${t} doesn't exist`)}};e.isContext=e=>{if(e&&"object"==typeof e&&"type"in e){const{type:t}=e;return"string"==typeof t}return!1};e.isChannel=e=>{if(e&&"object"==typeof e&&"type"in e&&"id"in e){const{type:t,id:n}=e;return"string"==typeof t&&"string"==typeof n&&("app"===t||"private"===t)}return!1};e.getIntentResolution=async(t,i,r,o)=>{const s=(0,n.generateId)(),a=new Promise(((e,t)=>{fin.InterApplicationBus.subscribe({uuid:"*"},s,(t=>{e(t)})).catch((()=>t(new Error("getResult is not supported in this environment"))))})),d=r?{target:r,intentResolutionResultId:s}:{intentResolutionResultId:s},h=o?{name:o,context:i,metadata:d}:{...i,metadata:d},l=async()=>{let n=await a;if(!n||"object"!=typeof n)throw new Error(c.NoResultReturned);const{error:i}=n;if(i)throw new Error(c.IntentHandlerRejected);if((0,e.isChannel)(n)){const{id:i,type:r}=n;switch(r){case"private":n=await(0,e.connectPrivateChannel)(i);break;case"app":{const r=await t.joinSessionContextGroup(i);n=(0,e.buildAppChannelObject)(r);break}}}else if(!(0,e.isContext)(n))throw new Error(c.NoResultReturned);return n},u=o?await t.fireIntent(h):await t.fireIntentForContext(h);return"object"!=typeof u?{source:{appId:"",instanceId:""},intent:"",version:"2.0",getResult:l}:{...u,getResult:l}}}(nr);var lr,ur,pr={};function wr(){if(ur)return Ki;ur=1;var e,t,n=s&&s.__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},i=s&&s.__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)},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ki,"__esModule",{value:!0}),Ki.InteropClient=void 0;const o=d,a=r(qi),c=function(){if(dr)return er;dr=1,Object.defineProperty(er,"__esModule",{value:!0}),er.Fdc3Module=void 0;const e=Hi,t=hr();class n extends t.FDC3ModuleBase{async open(e,t){await super._open(e,t)}addContextListener(e,t){let n;return this.wire.sendAction("fdc3-add-context-listener").catch((e=>{})),"function"==typeof e?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),n=this.client.addContextHandler(e)):n=this.client.addContextHandler(t,null===e?void 0:e),{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}addIntentListener(e,t){this.wire.sendAction("fdc3-add-intent-listener").catch((e=>{}));const n=this.client.registerIntentHandler((e=>{const{context:n,metadata:i}=e,{metadata:r}=n,o=i?.intentResolutionResultId||r?.intentResolutionResultId;o&&this.fin.InterApplicationBus.publish(o,null).catch((()=>null)),t(e.context)}),e,{fdc3Version:"1.2"});return{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}async raiseIntent(t,n,i){this.wire.sendAction("fdc3-raise-intent").catch((e=>{}));const r=i?{name:t,context:n,metadata:{target:i}}:{name:t,context:n};try{return await this.client.fireIntent(r)}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntent?"ResolverUnavailable":t.message;throw new Error(n)}}async findIntent(t,n){this.wire.sendAction("fdc3-find-intent").catch((e=>{}));try{return await this.client.getInfoForIntent({name:t,context:n})}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntent?"ResolverUnavailable":t.message;throw new Error(n)}}async findIntentsByContext(t){this.wire.sendAction("fdc3-find-intents-by-context").catch((e=>{}));try{return await this.client.getInfoForIntentsByContext(t)}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntentsByContext?"ResolverUnavailable":t.message;throw new Error(n)}}async raiseIntentForContext(t,n){this.wire.sendAction("fdc3-raise-intent-for-context").catch((e=>{}));try{return await this.client.fireIntentForContext({...t,metadata:{target:n}})}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntentForContext?"ResolverUnavailable":t.message;throw new Error(n)}}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}getInfo(){return this.wire.sendAction("fdc3-get-info").catch((e=>{})),{providerVersion:this.wire.environment.getAdapterVersionSync(),provider:`openfin-${this.wire.me.uuid}`,fdc3Version:"1.2"}}}return er.Fdc3Module=n,er}(),h=function(){if(lr)return pr;lr=1,Object.defineProperty(pr,"__esModule",{value:!0}),pr.Fdc3Module2=void 0;const e=hr(),t=Hi,n=wr(),i=nr,r=ir;class o extends e.FDC3ModuleBase{async open(e,t){return"string"==typeof e&&console.warn("Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string })."),super._open(e,t)}async findInstances(e){this.wire.sendAction("fdc3-find-instances").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,"fdc3FindInstances",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3FindInstances?"ResolverUnavailable":e.message;throw new Error(n)}}async getAppMetadata(e){this.wire.sendAction("fdc3-get-app-metadata").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,"fdc3GetAppMetadata",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3GetAppMetadata?"ResolverUnavailable":e.message;throw new Error(n)}}async addContextListener(e,t){this.wire.sendAction("fdc3-add-context-listener").catch((e=>{}));const n=e=>t=>{const{contextMetadata:n,...i}=t,r=n?[{...i},n]:[t,null];e(...r)};let i=t,r=n(i);return"function"==typeof e?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),i=e,r=n(i),this.client.addContextHandler(r)):this.client.addContextHandler(r,null===e?void 0:e)}async findIntent(e,n,i){this.wire.sendAction("fdc3-find-intent").catch((e=>{}));try{return await this.client.getInfoForIntent({name:e,context:n,metadata:{resultType:i}})}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntent?"ResolverUnavailable":e.message;throw new Error(n)}}async findIntentsByContext(e,i){this.wire.sendAction("fdc3-find-intents-by-context").catch((e=>{}));const r=i?{context:e,metadata:{resultType:i}}:e;try{return await n.InteropClient.ferryFdc3Call(this.client,"fdc3v2FindIntentsByContext",r)}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntentsByContext?"ResolverUnavailable":e.message;throw new Error(n)}}async raiseIntent(e,n,r){this.wire.sendAction("fdc3-raise-intent").catch((e=>{}));try{return"string"==typeof r&&console.warn("Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string })."),(0,i.getIntentResolution)(this.client,n,r,e)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?"ResolverUnavailable":e.message;throw new Error(n)}}async raiseIntentForContext(e,n){this.wire.sendAction("fdc3-raise-intent-for-context").catch((e=>{}));try{return"string"==typeof n&&console.warn("Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string })."),(0,i.getIntentResolution)(this.client,e,n)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?"ResolverUnavailable":e.message;throw new Error(n)}}async addIntentListener(e,t){if(this.wire.sendAction("fdc3-add-intent-listener").catch((e=>{})),"string"!=typeof e)throw new Error("First argument must be an Intent name");return this.client.registerIntentHandler((async e=>{let n,i;const{context:r,metadata:o}=e,{contextMetadata:s,metadata:a,...c}=r,d=o?.intentResolutionResultId||a?.intentResolutionResultId;try{const e=a?{metadata:a,...c}:{...c};n=await t(e,s),i=n}catch(e){n=e,i={error:!0}}if(d&&this.fin.InterApplicationBus.publish(d,i).catch((()=>null)),n instanceof Error)throw new Error(n.message);return n}),e,{fdc3Version:"2.0"})}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}async createPrivateChannel(){const e=(0,t.generateId)();await n.InteropClient.ferryFdc3Call(this.client,"createPrivateChannelProvider",{channelId:e});const o=await this.fin.InterApplicationBus.Channel.connect(e),s=new r.PrivateChannelClient(o,e);return(0,i.buildPrivateChannelObject)(s)}async getUserChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:"user",...(0,i.getUnsupportedChannelApis)("User")})))}async getSystemChannels(){return console.warn("This API has been deprecated. Please use fdc3.getUserChannels instead."),super.getSystemChannels()}async joinUserChannel(e){return super.joinChannel(e)}async joinChannel(e){return console.warn("This API has been deprecated. Please use fdc3.joinUserChannel instead."),super.joinChannel(e)}async getCurrentChannel(){const e=await super.getCurrentChannel();return e?{...e,type:"user",broadcast:this.broadcast.bind(this)}:null}async getInfo(){return n.InteropClient.ferryFdc3Call(this.client,"fdc3v2GetInfo",{fdc3Version:"2.0"})}}return pr.Fdc3Module2=o,pr}(),l=Hi;let u=class extends o.Base{constructor(i,r){super(i),e.set(this,void 0),t.set(this,void 0),n(this,t,new Map,"f"),n(this,e,r,"f")}async setContext(t){this.wire.sendAction("interop-client-set-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("setContext",{context:t})}async addContextHandler(t,n){if(this.wire.sendAction("interop-client-add-context-handler").catch((e=>{})),"function"!=typeof t)throw new Error("Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");const r=await i(this,e,"f");let o;o=n?`invokeContextHandler-${n}-${(0,l.generateId)()}`:"invokeContextHandler";const s=(0,l.wrapContextHandler)(t,o);return r.register(o,s),await r.dispatch("contextHandlerRegistered",{handlerId:o,contextType:n}),{unsubscribe:async()=>{r.remove(o),await r.dispatch("removeContextHandler",{handlerId:o})}}}async getContextGroups(){this.wire.sendAction("interop-client-get-context-groups").catch((e=>{}));return(await i(this,e,"f")).dispatch("getContextGroups")}async joinContextGroup(t,n){this.wire.sendAction("interop-client-join-context-group").catch((e=>{}));const r=await i(this,e,"f");if(!t)throw new Error("No contextGroupId specified for joinContextGroup.");return r.dispatch("joinContextGroup",{contextGroupId:t,target:n})}async removeFromContextGroup(t){this.wire.sendAction("interop-client-remove-from-context-group").catch((e=>{}));return(await i(this,e,"f")).dispatch("removeFromContextGroup",{target:t})}async getAllClientsInContextGroup(t){this.wire.sendAction("interop-client-get-all-clients-in-context-group").catch((e=>{}));const n=await i(this,e,"f");if(!t)throw new Error("No contextGroupId specified for getAllClientsInContextGroup.");return n.dispatch("getAllClientsInContextGroup",{contextGroupId:t})}async getInfoForContextGroup(t){this.wire.sendAction("interop-client-get-info-for-context-group").catch((e=>{}));const n=await i(this,e,"f");if(!t)throw new Error("No contextGroupId specified for getInfoForContextGroup.");return n.dispatch("getInfoForContextGroup",{contextGroupId:t})}async fireIntent(t){this.wire.sendAction("interop-client-fire-intent").catch((e=>{}));return(await i(this,e,"f")).dispatch("fireIntent",t)}async registerIntentHandler(t,n,r){this.wire.sendAction("interop-client-register-intent-handler").catch((e=>{}));const o=await i(this,e,"f"),s=`intent-handler-${n}`,a=(0,l.wrapIntentHandler)(t,s);try{await o.register(s,a),await o.dispatch("intentHandlerRegistered",{handlerId:s,...r})}catch(e){throw new Error("Unable to register intent handler")}return{unsubscribe:async()=>{o.remove(s)}}}async getCurrentContext(t){this.wire.sendAction("interop-client-get-current-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("getCurrentContext",{contextType:t})}async getInfoForIntent(t){this.wire.sendAction("interop-client-get-info-for-intent").catch((e=>{}));return(await i(this,e,"f")).dispatch("getInfoForIntent",t)}async getInfoForIntentsByContext(t){this.wire.sendAction("interop-client-get-info-for-intents-by-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("getInfoForIntentsByContext",t)}async fireIntentForContext(t){this.wire.sendAction("interop-client-fire-intent-for-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("fireIntentForContext",t)}async joinSessionContextGroup(n){try{const r=i(this,t,"f").get(n);if(r)return r.getUserInstance();const o=await i(this,e,"f"),{hasConflict:s}=await o.dispatch("sessionContextGroup:createIfNeeded",{sessionContextGroupId:n});s&&console.warn(`A (non-session) context group with the name "${n}" already exists. If you are trying to join a Context Group, call joinContextGroup instead.`);const c=new a.default(this.wire,i(this,e,"f"),n);return i(this,t,"f").set(n,c),c.getUserInstance()}catch(e){throw console.error(`Error thrown trying to create Session Context Group with id "${n}": ${e}`),e}}async onDisconnection(t){this.wire.sendAction("interop-client-add-ondisconnection-listener").catch((e=>{}));return(await i(this,e,"f")).onDisconnection((e=>{const{uuid:n}=e;t({type:"interop-broker",topic:"disconnected",brokerName:n})}))}getFDC3Sync(e){switch(e){case"1.2":return new c.Fdc3Module((()=>this),this.wire);case"2.0":return new h.Fdc3Module2((()=>this),this.wire);default:throw new Error(`Invalid FDC3 version provided: ${e}. Must be '1.2' or '2.0'`)}}async getFDC3(e){return this.getFDC3Sync(e)}static async ferryFdc3Call(t,n,r){return(await i(t,e,"f")).dispatch(n,r||null)}};return Ki.InteropClient=u,e=new WeakMap,t=new WeakMap,Ki}var yr,fr,gr,mr={};function vr(){if(yr)return mr;yr=1,Object.defineProperty(mr,"__esModule",{value:!0}),mr.overrideCheck=mr.checkFDC32Overrides=mr.getDefaultViewFdc3VersionFromAppInfo=void 0;const e=Vi();function t(t){return["fdc3HandleFindInstances","handleInfoForIntent","handleInfoForIntentsByContext","fdc3HandleGetAppMetadata","fdc3HandleGetInfo","fdc3HandleOpen","handleFiredIntent","handleFiredIntentForContext"].filter((n=>t[n]===e.InteropBroker.prototype[n]))}return mr.getDefaultViewFdc3VersionFromAppInfo=function({manifest:e,initialOptions:t}){const n=e?.platform?.defaultViewOptions?.fdc3InteropApi??t.defaultViewOptions?.fdc3InteropApi;return["1.2","2.0"].includes(n??"")?n:void 0},mr.checkFDC32Overrides=t,mr.overrideCheck=function(e,n){if(n&&"2.0"===n){const n=t(e);n.length>0&&console.warn(`WARNING: FDC3 2.0 has been set as a default option for Views in this Platform, but the required InteropBroker APIs for FDC3 2.0 compliance have not all been overridden.\nThe following APIs need to be overridden:\n${n.join("\n")}`)}},mr}function Cr(){return gr||(gr=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),i=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),i(function(){if(fr)return Ti;fr=1;var e=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ti,"__esModule",{value:!0}),Ti.InteropModule=void 0;const t=e(n),i=$i,r=d,o=Vi(),a=wr(),c=vr(),h=Tn,l=e=>new e,u="You have attempted to use or modify InteropBroker parameters, which is not allowed. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.";class p extends r.Base{async init(e,n=l){this.wire.sendAction("interop-init").catch((()=>{}));const r=await this.wire.environment.getInteropInfo(this.wire.getFin()),s=(0,i.createUnusableObject)(u),a=(0,i.createWarningObject)(u,(0,t.default)(r)),d=async()=>{throw new Error(u)},p=o.InteropBroker.createClosedConstructor(this.wire,(()=>this.fin.InterApplicationBus.Channel.create(`interop-broker-${e}`)),r);let w;return w=Array.isArray(n)?new((0,h.overrideFromComposables)(...n)(p))(s,d,a):await n(p,s,d,a),(0,c.overrideCheck)(w,r.fdc3Version),w}connectSync(e,t){return this.wire.sendAction("interop-connect-sync").catch((()=>{})),new a.InteropClient(this.wire,this.wire.environment.whenReady().then((()=>this.fin.InterApplicationBus.Channel.connect(`interop-broker-${e}`,{payload:t}))))}}return Ti.InteropModule=p,Ti}(),e),i(wr(),e),i(Vi(),e)}(Li)),Li}var br={},Ir={},Er={},xr={};Object.defineProperty(xr,"__esModule",{value:!0}),xr.getSnapshotSourceChannelName=void 0;xr.getSnapshotSourceChannelName=e=>`snapshot-source-provider-${e.uuid}`;var Ar,Pr,Mr,_r,Or,Sr=s&&s.__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},Rr=s&&s.__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)};Object.defineProperty(Er,"__esModule",{value:!0}),Er.SnapshotSource=void 0;const Fr=d,jr=xr,kr=new Map;class Lr extends Fr.Base{constructor(e,t){super(e),Ar.set(this,void 0),Pr.set(this,(()=>(kr.has(this.identity.uuid)||kr.set(this.identity.uuid,{eventFired:null,clientPromise:null}),kr.get(this.identity.uuid)))),Mr.set(this,(()=>(Rr(this,Pr,"f").call(this).clientPromise||(Rr(this,Pr,"f").call(this).clientPromise=Rr(this,_r,"f").call(this)),Rr(this,Pr,"f").call(this).clientPromise))),_r.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);try{Rr(this,Pr,"f").call(this).eventFired||await Rr(this,Or,"f").call(this);const t=await this.fin.InterApplicationBus.Channel.connect(e,{wait:!1});return t.onDisconnection((()=>{Rr(this,Pr,"f").call(this).clientPromise=null,Rr(this,Pr,"f").call(this).eventFired=null})),t}catch(e){throw Rr(this,Pr,"f").call(this).clientPromise=null,new Error("The targeted SnapshotSource is not currently initialized. Await this object's ready() method.")}})),Or.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);let t,n;const i=new Promise(((e,i)=>{t=e,n=i}));Rr(this,Pr,"f").call(this).eventFired=i;const r=async i=>{try{i.channelName===e&&(t(),await this.fin.InterApplicationBus.Channel.removeListener("connected",r))}catch(e){n(e)}};await this.fin.InterApplicationBus.Channel.on("connected",r)})),Sr(this,Ar,t,"f")}get identity(){return Rr(this,Ar,"f")}async ready(){this.wire.sendAction("snapshot-source-ready").catch((e=>{}));try{await Rr(this,Mr,"f").call(this)}catch(e){await Rr(this,Pr,"f").call(this).eventFired}}async getSnapshot(){this.wire.sendAction("snapshot-source-get-snapshot").catch((e=>{}));const e=await Rr(this,Mr,"f").call(this),t=await e.dispatch("get-snapshot");return(await t).snapshot}async applySnapshot(e){this.wire.sendAction("snapshot-source-apply-snapshot").catch((e=>{}));return(await Rr(this,Mr,"f").call(this)).dispatch("apply-snapshot",{snapshot:e})}}Er.SnapshotSource=Lr,Ar=new WeakMap,Pr=new WeakMap,Mr=new WeakMap,_r=new WeakMap,Or=new WeakMap,Object.defineProperty(Ir,"__esModule",{value:!0}),Ir.SnapshotSourceModule=void 0;const Tr=d,$r=Er,Br=xr;class Gr extends Tr.Base{async init(e){if(this.wire.sendAction("snapshot-source-init").catch((e=>{})),"object"!=typeof e||"function"!=typeof e.getSnapshot||"function"!=typeof e.applySnapshot)throw new Error("you must pass in a valid SnapshotProvider");const t=await this.fin.InterApplicationBus.Channel.create((0,Br.getSnapshotSourceChannelName)(this.fin.me));t.register("get-snapshot",(async()=>({snapshot:await e.getSnapshot()}))),t.register("apply-snapshot",(({snapshot:t})=>e.applySnapshot(t)))}wrapSync(e){return this.wire.sendAction("snapshot-source-wrap-sync").catch((e=>{})),new $r.SnapshotSource(this.wire,e)}async wrap(e){return this.wire.sendAction("snapshot-source-wrap").catch((e=>{})),this.wrapSync(e)}}Ir.SnapshotSourceModule=Gr,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Ir,e),n(Er,e)}(br),Object.defineProperty(a,"__esModule",{value:!0});var Wr=a.Fin=void 0;const Hr=t,Nr=c,Dr=ie(),Ur=Z(),Vr=de,zr=en,Kr=rn,qr=un,Jr=bn,Yr=J(),Zr=An,Qr=ki,Xr=Cr(),eo=br;class to extends Hr.EventEmitter{constructor(e){super(),this.wire=e,this.System=new Nr.System(e),this.Window=new Dr._WindowModule(e),this.Application=new Ur.ApplicationModule(e),this.InterApplicationBus=new Vr.InterApplicationBus(e),this.Clipboard=new zr.Clipboard(e),this.ExternalApplication=new Kr.ExternalApplicationModule(e),this.Frame=new qr._FrameModule(e),this.GlobalHotkey=new Jr.GlobalHotkey(e),this.Platform=new Zr.PlatformModule(e,this.InterApplicationBus.Channel),this.View=new Yr.ViewModule(e),this.Interop=new Xr.InteropModule(e),this.SnapshotSource=new eo.SnapshotSourceModule(e),e.registerFin(this),this.me=(0,Qr.getMe)(e),e.on("disconnected",(()=>{this.emit("disconnected")}))}}Wr=a.Fin=to;var no={},io={};function ro(e){return"string"==typeof e.manifestUrl}function oo(e){return ao(e)&&"string"==typeof e.address}function so(e){return oo(e)&&"string"==typeof e.token}function ao(e){return"string"==typeof e.uuid}function co(e){return e.runtime&&"string"==typeof e.runtime.version}function ho(e){return ao(e)&&co(e)}Object.defineProperty(io,"__esModule",{value:!0}),io.isInternalConnectConfig=io.isPortDiscoveryConfig=io.isNewConnectConfig=io.isConfigWithReceiver=io.isRemoteConfig=io.isExistingConnectConfig=io.isExternalConfig=void 0,io.isExternalConfig=ro,io.isExistingConnectConfig=oo,io.isRemoteConfig=so,io.isConfigWithReceiver=function(e){return"object"==typeof e.receiver&&so({...e,address:""})},io.isNewConnectConfig=ho,io.isPortDiscoveryConfig=function(e){return ro(e)&&co(e)||ho(e)},io.isInternalConnectConfig=function(e){return oo(e)||ho(e)};var lo={},uo={};Object.defineProperty(uo,"__esModule",{value:!0}),uo.EmitterMap=void 0;const po=t;function wo(e){return Buffer.from(e).toString("base64")}uo.EmitterMap=class{constructor(){this.storage=new Map}hashKeys(e){return e.map(wo).join("/")}getOrCreate(e){const t=this.hashKeys(e);return this.storage.has(t)||this.storage.set(t,new po.EventEmitter),this.storage.get(t)}has(e){return this.storage.has(this.hashKeys(e))}delete(e){const t=this.hashKeys(e);return this.storage.delete(t)}},Object.defineProperty(lo,"__esModule",{value:!0});const yo=uo;class fo extends yo.EmitterMap{constructor(){super(...arguments),this.dispatchEvent=e=>{if(function(e){return"process-desktop-event"===e.action}(e)){const{payload:t}=e,n=function(e){const{topic:t}=e;if("frame"===t||"window"===t||"view"===t){const{uuid:n,name:i}=e;return[t,n,i]}if("application"===t){const{uuid:n}=e;return[t,n]}return[t]}(t);if(this.has(n))return this.getOrCreate(n).emit(t.type,t),!0}return!1}}}lo.default=fo;var go,mo,vo=s&&s.__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},Co=s&&s.__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)},bo=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(no,"__esModule",{value:!0});var Io=no.Transport=void 0;const Eo=t,xo=io,Ao=g,Po=bo(lo),Mo=ki,_o=ke;class Oo extends Eo.EventEmitter{constructor(e,t,n){super(),this.wireListeners=new Map,this.topicRefMap=new Map,this.eventAggregator=new Po.default,this.messageHandlers=[this.eventAggregator.dispatchEvent],go.set(this,void 0),mo.set(this,void 0),this.connectSync=()=>{Co(this,go,"f").connectSync()},this.getPort=()=>Co(this,go,"f").getPort(),vo(this,go,new e(this.onmessage.bind(this)),"f"),this.environment=t,this.sendRaw=Co(this,go,"f").send.bind(Co(this,go,"f")),this.registerMessageHandler(this.handleMessage.bind(this)),Co(this,go,"f").on("disconnected",(()=>{for(const[,{handleNack:e}]of this.wireListeners)e({reason:"Remote connection has closed"});this.wireListeners.clear(),this.emit("disconnected")}));const{uuid:i,name:r}=n,o=this.environment.getCurrentEntityType();this.me=(0,Mo.getBaseMe)(o,i,r)}getFin(){if(!Co(this,mo,"f"))throw new Error("No Fin object registered for this transport");return Co(this,mo,"f")}registerFin(e){if(Co(this,mo,"f"))throw new Error("Fin object has already been registered for this transport");vo(this,mo,e,"f")}shutdown(){return Co(this,go,"f").shutdown()}async connect(e){if((0,xo.isConfigWithReceiver)(e))return await Co(this,go,"f").connect(e.receiver),this.authorize(e);if((0,xo.isRemoteConfig)(e))return this.connectRemote(e);if((0,xo.isExistingConnectConfig)(e))return this.connectByPort(e);if((0,xo.isNewConnectConfig)(e)){const t=await this.environment.retrievePort(e);return this.connectByPort({...e,address:`ws://localhost:${t}`})}}async connectRemote(e){return await Co(this,go,"f").connect(new(this.environment.getWsConstructor())(e.address)),this.authorize(e)}async connectByPort(e){const{address:t,uuid:n}=e,i={...e,type:"file-token"},r=Co(this,go,"f");await r.connect(new(this.environment.getWsConstructor())(e.address));const o=await this.sendAction("request-external-authorization",{uuid:n,type:"file-token"},!0);if("external-authorization-response"!==o.action)throw new Ao.UnexpectedActionError(o.action);return await this.environment.writeToken(o.payload.file,o.payload.token),this.authorize(i)}async authorize(e){const t=await this.sendAction("request-authorization",e,!0);if("authorization-response"!==t.action)throw new Ao.UnexpectedActionError(t.action);if(!0!==t.payload.success)throw new Ao.RuntimeError(t.payload)}sendAction(e,t={},n=!1){let i=()=>{};const r=Ao.RuntimeError.getCallSite(1),o=this.environment.getNextMessageId(),s=new Promise(((s,a)=>{i=a;const c={action:e,payload:t,messageId:o},d=Co(this,go,"f");return this.addWireListener(o,s,(e=>this.nackHandler(e,a,r)),n),d.send(c).catch(a)}));return Object.assign(s,{cancel:i,messageId:o})}nackHandler(e,t,n){t("string"==typeof e?e:new Ao.RuntimeError(e,n))}ferryAction(e){return new Promise(((t,n)=>{const i=this.environment.getNextMessageId();e.messageId=i;const r=e=>{t(e.payload)};return Co(this,go,"f").send(e).then((()=>this.addWireListener(i,r,(e=>this.nackHandler(e,n)),!1))).catch(n)}))}registerMessageHandler(e){this.messageHandlers.push(e)}addWireListener(e,t,n,i){i?this.uncorrelatedListener=t:this.wireListeners.has(e)?n({reason:"Duplicate handler id",error:(0,_o.errorToPOJO)(new Ao.DuplicateCorrelationError(String(e)))}):this.wireListeners.set(e,{resolve:t,handleNack:n})}onmessage(e){for(const t of this.messageHandlers)t.call(null,e)}handleMessage(e){const t=e.correlationId||NaN;if("correlationId"in e){if(!this.wireListeners.has(t))return!1;{const{resolve:n,handleNack:i}=this.wireListeners.get(t);"ack"!==e.action?i({reason:"Did not receive ack action",error:(0,_o.errorToPOJO)(new Ao.NoAckError(e.action))}):"payload"in e?e.payload.success?n.call(null,e):i(e.payload):"string"==typeof e.reason?i(e):(console.warn("Received invalid response from core",e),i({reason:"invalid response shape"})),this.wireListeners.delete(t)}}else this.uncorrelatedListener&&this.uncorrelatedListener.call(null,e),this.uncorrelatedListener=()=>{};return!0}}Io=no.Transport=Oo,go=new WeakMap,mo=new WeakMap;const So=(...e)=>({log:(...t)=>console.debug(`[${(new Date).toISOString()}]`,...(e=>e.map((e=>`[${e}]`)))(e),...t),getLogger:(...t)=>So(...e,...t)}),Ro=So("@openfin/core-web/client");function Fo(e,t){if(!function(e){return"string"==typeof e}(e))throw new Error(`Property ${t} has invalid type. Expected string, got ${typeof e}.`)}const jo="web-broker-ports-ready",ko=Ro.getLogger("get-web-interop-ports");function Lo(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)}function To(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}"function"==typeof SuppressedError&&SuppressedError;const $o=e=>{var n,i,r;return r=class extends t.EventEmitter{constructor(t){super(),n.set(this,void 0),i.set(this,!1),this.connectSync=()=>{Lo(this,i,"f")||(e.addEventListener("message",(e=>{e.data?.topic?.startsWith("wire-message")&&e.data.message&&Lo(this,n,"f").call(this,{...JSON.parse(e.data.message),ports:e.ports})})),e.start())},this.connect=async()=>{this.connectSync()},this.send=t=>(e.postMessage({topic:"wire-message",message:JSON.stringify(t)}),Promise.resolve()),this.shutdown=async()=>{e.close()},To(this,n,t,"f")}getPort(){return e}},n=new WeakMap,i=new WeakMap,r};var Bo={},Go={};Object.defineProperty(Go,"__esModule",{value:!0}),Go.BaseEnvironment=void 0;const Wo=vr();Go.BaseEnvironment=class{async getViewWindowIdentity(e,t){const{identity:n}=await e.View.wrapSync(t).getCurrentWindow();return n}async getInteropInfo(e){const t=await e.Application.getCurrentSync().getInfo().catch((()=>null)),n=t?.initialOptions?.interopBrokerConfiguration??{};return{fdc3Version:t?(0,Wo.getDefaultViewFdc3VersionFromAppInfo)(t):void 0,...n,fdc3Info:{providerVersion:await e.System.getVersion(),provider:"OpenFin"}}}},Object.defineProperty(Bo,"__esModule",{value:!0});var Ho=Bo.BrowserEnvironment=void 0;const No=Go;class Do extends No.BaseEnvironment{constructor(){super(...arguments),this.type="other",this.getRandomId=()=>{const e=new Uint32Array(1);return window.crypto.getRandomValues(e)[0].toString(32)}}getAdapterVersionSync(){return""}observeBounds(e,t){throw new Error("Method not implemented.")}layoutAllowedInContext(e){return!1}initLayoutManager(e,t,n){throw new Error("Method not implemented.")}applyLayoutSnapshot(e,t,n){throw new Error("Method not implemented.")}createLayout(e,t){throw new Error("Method not implemented.")}destroyLayout(e,t){throw new Error("Method not implemented.")}resolveLayout(e,t){throw new Error("Method not implemented.")}initPlatform(...e){throw new Error("Method not implemented.")}writeToken(e,t){return Promise.resolve("")}retrievePort(e){throw new Error("Method not implemented.")}getNextMessageId(){return this.getRandomId()}createChildContent(e){throw new Error("Method not implemented.")}getWebWindow(e){throw new Error("Method not implemented.")}getCurrentEntityIdentity(){throw new Error("Method not implemented.")}getCurrentEntityType(){return"external connection"}raiseEvent(e,t){throw new Error("Method not implemented.")}getUrl(){return location.href}getDefaultChannelOptions(){return{create:{},connect:{}}}getRtcPeer(){return new RTCPeerConnection}getWsConstructor(){return WebSocket}whenReady(){return Promise.resolve()}}Ho=Bo.BrowserEnvironment=Do;const Uo=e=>"platform"in e&&void 0!==e.platform;var Vo,zo;class Ko extends Ho{constructor(e){super(),this.connectConfig=e,Vo.set(this,void 0),zo.set(this,new W((async()=>Promise.resolve().then((function(){return __webpack_require__(/*! ./main-b14f67c9.js */ "../../node_modules/@openfin/core-web/out/main-b14f67c9.js")}))))),Uo(e)&&this.validatePlatformOptions(e)}getAdapterVersionSync(){return"0.39.21"}validatePlatformOptions({platform:e}){if(!("layoutSnapshot"in e))throw new Error("Platform options are missing layoutSnapshot. Please provide a layoutSnapshot in the platform options.");if("windows"in e||"windows"in e.layoutSnapshot)throw new Error("It appears you tried to call connect() with a snapshot object from an OpenFin desktop environment. Note that connect() expects to be called with a platform property with this structure: { platform: { layoutSnapshot } }. To get a layoutSnapshot of the expected structure, use fin.Platform.Layout.getCurrentLayoutManagerSync().getLayoutSnapshot() in v34+ in your desktop environment.");const{layouts:t}=e.layoutSnapshot;Object.entries(t).map((([e,t])=>{if("object"!=typeof t||null===t)throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must be an object.`);if(!("content"in t))throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must contain a 'content' property.`)}))}async getInteropInfo(e){return{...{contextGroups:void 0,logging:{beforeAction:{enabled:!1},afterAction:{enabled:!1}}},fdc3Version:void 0,fdc3Info:{providerVersion:"0.39.21",provider:"OpenFin Web"}}}layoutAllowedInContext(e){return!0}async initLayoutManager(e,t,n){if(Lo(this,Vo,"f"))throw new Error("Layout already initialized.");if(!Uo(this.connectConfig))throw new Error("Platform options are missing from connection config.");const{WebLayoutEntryPoint:i}=await Lo(this,zo,"f").getValue();return To(this,Vo,new i(this.connectConfig),"f"),await Lo(this,Vo,"f").initLayoutManager(e,t,n)}async applyLayoutSnapshot(e,t,n){Lo(this,Vo,"f")?.applyLayoutSnapshot(e,t,n)}async createLayout(e,t){return Lo(this,Vo,"f")?.createLayout(e,t)}async destroyLayout(e,t){return Lo(this,Vo,"f")?.destroyLayout(e,t)}async getViewWindowIdentity(e,t){return Promise.resolve({uuid:t.uuid,name:t.uuid})}}Vo=new WeakMap,zo=new WeakMap;const qo=()=>{const e=((e,t)=>{const n=new RegExp(`^${t}<(?.*)>$`).exec(e)?.groups?.meta;if(n)try{return JSON.parse(atob(n))}catch(e){throw new Error(`Failed to decode JSON from ${n}.`)}})(window.name,"of-frame");if(e)try{const{name:t,uuid:n,brokerUrl:i,providerId:r,contextGroup:o}=e;return Fo(i,"brokerUrl"),Fo(n,"uuid"),Fo(t,"name"),{identity:{name:t,uuid:n},brokerUrl:i,interopConfig:{providerId:r,currentContextGroup:o}}}catch(e){throw new Error(`Unexpected error occurred when inferring platform information: ${e.stack}`)}},Jo=()=>{const e=r.v4();return{uuid:e,name:e}},Yo=async e=>{if("enabled"===e.connectionInheritance){const t=await(async e=>{const t=qo();if(t){const{validateOptions:n=(()=>!0)}=e,{identity:i,...r}=t;if(!await n(r))throw new Error("Parent options were rejected by validateOptions.");return t}})(e);if(t)return t}if(!e.options){const t="enabled"===e.connectionInheritance?"Broker URL was not specified nor provided by a platform container.":"Connection inheritance is disabled but no options were provided.";throw new Error(t)}return{...e.options,identity:Jo()}};exports.__classPrivateFieldGet=Lo,exports.__classPrivateFieldSet=To,exports.apiExposer=Gn,exports.commonjsGlobal=s,exports.connect=async t=>{try{Ro.log("Establishing connection",t);const{brokerUrl:n,identity:i,timeout:r,interopConfig:s}=await Yo(t),{workerPort:a,iframeBrokerPort:c}=await(async(e,t,n)=>{const{origin:i}=new URL(e),r=document.createElement("IFRAME");let s;r.style.display="none";try{return await new Promise(((a,c)=>{const d=e=>{if(e.source===r.contentWindow&&e.data?.topic===`ack-${jo}`){if(e.origin!==i)c(new Error(`Broker redirected to unexpected origin ${e.origin}, expected ${i}.`));else if(e.data.success){const[t,n]=e.ports;a({iframeBrokerPort:t,workerPort:n})}else c(new m(e.data));window.removeEventListener("message",d),clearTimeout(s)}};window.addEventListener("message",d),ko.log(`Connecting to broker ${e}`),r.setAttribute("src",e),r.setAttribute("name",o(t,"of-broker")),document.body.appendChild(r),ko.log("Iframe loaded, awaiting init message from iframe"),n&&(s=setTimeout((()=>{window.removeEventListener("message",d),document.body.removeChild(r),c(new Error("Worker did not initialize in time"))}),n))}))}catch(e){throw new Error(`Failed to initialise Fin Web Client. ${e.message}`,{cause:e})}})(n,i,r);Ro.log("Successfully established connection to shared worker");const d={entityType:"external connection",...i};a.start(),c.start();const h=((t,n,i)=>{const r=$o(n),o=new Ko(t),s=new Io(r,o,i);return s.connectSync(),window.Buffer=e.Buffer,new Wr(s)})(t,a,d);return s?.providerId&&(h.me.interop=h.Interop.connectSync(s.providerId),s?.currentContextGroup&&h.me.interop.joinContextGroup(s.currentContextGroup).catch((e=>{console.warn(`Error joining specified context group: ${s?.currentContextGroup}, continuing`,e)}))),{...h,me:{...h.me,identity:{uuid:h.me.uuid,name:h.me.name}}}}catch(e){throw new Error(`An error occured during web-interop connection: ${e.message}`)}},exports.decorators=Nn,exports.encodeOptions=o,exports.layout_constants=ai,exports.lazy=G; /***/ }), -/***/ "./node_modules/@openfin/core-web/out/main-b14f67c9.js": -/*!*************************************************************!*\ - !*** ./node_modules/@openfin/core-web/out/main-b14f67c9.js ***! - \*************************************************************/ +/***/ "../../node_modules/@openfin/core-web/out/main-b14f67c9.js": +/*!*****************************************************************!*\ + !*** ../../node_modules/@openfin/core-web/out/main-b14f67c9.js ***! + \*****************************************************************/ /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; -var t=__webpack_require__(/*! ./main-8cad4070.js */ "./node_modules/@openfin/core-web/out/main-8cad4070.js"),e=__webpack_require__(/*! uuid */ "../../node_modules/uuid/dist/esm-browser/index.js");__webpack_require__(/*! buffer/ */ "../../node_modules/buffer/index.js"),__webpack_require__(/*! events */ "../../node_modules/events/events.js"),__webpack_require__(/*! lodash/cloneDeep */ "../../node_modules/lodash/cloneDeep.js"),__webpack_require__(/*! lodash/isEqual */ "../../node_modules/lodash/isEqual.js");var i={},n={};Object.defineProperty(n,"__esModule",{value:!0}),n.mapValuesAsync=n.mapEntriesAsync=void 0;const o=(t,[e,i])=>({...t,[e]:i});async function s(t,e){return(await Promise.all(e.map((async([e,i])=>[e,await t(i,e)])))).reduce(o,{})}n.mapEntriesAsync=s,n.mapValuesAsync=async function(t,e){let i;return i=e instanceof Map?[...e.entries()]:Object.entries(e),s(t,i)};var r,a,l,h,d=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldSet||function(t,e,i,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(t,i):o?o.value=i:e.set(t,i),i},c=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldGet||function(t,e,i,n){if("a"===i&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?n:"a"===i?n.call(t):n?n.value:e.get(t)};Object.defineProperty(i,"__esModule",{value:!0});var m=i.DefaultLayoutManager=void 0;const u=n;class p{constructor(t){a.set(this,void 0),l.set(this,new Map),d(this,a,t,"f")}size(){return c(this,l,"f").size}async applyLayoutSnapshot({layouts:t}){if(Object.keys(t).length>1)throw new Error("[LayoutManager] Tried to call applyLayoutSnapshot with more than 1 layout. When implementing multiple layouts via overridden LayoutManager class, you must override and fully implement the applyLayoutSnapshot method without calling super.applyLayoutSnapshot().");const[[e,i]]=Object.entries(t);await p.createLayout(this,{layoutName:e,layout:i})}async showLayout({layoutName:t}){}async getLayoutSnapshot(){return{layouts:await(0,u.mapValuesAsync)((t=>t.getFrameSnapshot()),c(this,l,"f"))}}async removeLayout({layoutName:t}){}getLayoutIdentityForView(t){const e=[...c(this,l,"f").values()].find((e=>e.getCurrentViews().some((e=>e.name===t.name&&e.uuid===t.uuid))));return e?.identity??void 0}isLayoutVisible({layoutName:t}){return c(p,r,"m",h).call(p,this,t).isVisible()}resolveLayoutIdentity(t){if(t&&"layoutName"in t)return t;const e=[...c(this,l,"f").values()];if(1===e.length)return e[0].identity;const i=e.find((t=>t.isVisible()));return i?.identity??void 0}static async resolveLayout(t,e){const i=t.resolveLayoutIdentity(e);if(void 0===i||!("layoutName"in i))throw new Error("[layout-manager] resolveLayout: Could not resolve the layout identity. Make sure you include 'layoutName' in the identity object.");return c(p,r,"m",h).call(p,t,i.layoutName)}static async handleSharedView(t,e,i){await(0,u.mapValuesAsync)((async t=>{if(t.identity.layoutName!==e.layoutName){const e=t.getCurrentViews().find((t=>t.name===i.name));e&&await t.onViewDetached({viewIdentity:e,target:null}).catch(console.error)}}),c(t,l,"f"))}static async handleLastViewRemoved(t,e){await t.removeLayout(e),await c(t,a,"f").handleLastViewRemoved(t)}static async destroyLayout(t,{layoutName:e}){await c(p,r,"m",h).call(p,t,e).destroy(),c(t,l,"f").delete(e)}static async createLayout(t,e){const{layoutName:i}=e;if(c(t,l,"f").has(i))throw new Error(`Layout name ${i} already exists`);await c(t,a,"f").createLayout(e,t)}static registerLayout(t,e,i){c(t,l,"f").set(e,i)}static getAllLayouts(t){return[...c(t,l,"f").values()]}static setInitialSnapshot(t,e){c(t,a,"f").setInitialSnapshot(e)}static createClosedConstructor(...t){return class extends p{constructor(){super(...t)}}}}m=i.DefaultLayoutManager=p,r=p,a=new WeakMap,l=new WeakMap,h=function(t,e){const i=c(t,l,"f").get(e);if(!i)throw new Error(`[layout-manager] getLayoutByName: Could not locate layout with name '${e}'`);return i};var g={},f={},v={};Object.defineProperty(v,"__esModule",{value:!0}),v.ReversibleMap=void 0;v.ReversibleMap=class{constructor(){this.valueToKey=new Map,this.keyToValue=new Map,this.setUnique=(t,e)=>{if(this.hasKey(t)||this.hasValue(e))throw new Error("Key or value already in the map.");this.keyToValue.set(t,e),this.valueToKey.set(e,t)},this.getKey=t=>{const e=this.valueToKey.get(t);if(!e)throw new Error("Value not found in the map.");return e},this.deleteKey=t=>{const e=this.getValue(t);return this.keyToValue.delete(t),this.valueToKey.delete(e),e},this.deleteValue=t=>{const e=this.getKey(t);return this.keyToValue.delete(e),this.valueToKey.delete(t),e},this.hasKey=t=>this.keyToValue.has(t),this.hasValue=t=>this.valueToKey.has(t)}getValue(t){const e=this.keyToValue.get(t);if(!e)throw new Error("Key not found in the map.");return e}},Object.defineProperty(f,"__esModule",{value:!0});var _=f.LayoutContentCache=void 0;const y=t.lazy,C=v;class w{constructor(){this.contentItemCache=new C.ReversibleMap,this.contentItemCacheId=0,this.createCacheKey=()=>{const t=`entity-${this.contentItemCacheId.toString()}`;return this.contentItemCacheId+=1,t},this.hasKey=t=>this.contentItemCache.hasKey(t),this.getItemOrUndefined=t=>{try{return this.getContentItemOrThrow(t)}catch(t){return}},this.getContentItemOrThrow=(t,e)=>{if(!this.contentItemCache.hasKey(t))throw new Error("Layout component has been destroyed or detached from the current layout.");const i=this.contentItemCache.getValue(t);if(e&&!e.includes(i.type))throw new Error(`Layout item is not the expected type. Expected ${e.join(", ")}, got ${i.type}.`);return i},this.getOrCreateEntityId=t=>{if(this.contentItemCache.hasValue(t))return this.contentItemCache.getKey(t);t.onDestroyed((()=>{this.contentItemCache.deleteValue(t)}));const e=this.createCacheKey();return this.contentItemCache.setUnique(e,t),e}}static getSingleInstance(){return w.singleton.getValue()}}_=f.LayoutContentCache=w,w.singleton=new y.Lazy((()=>new w));var I={},b={};!function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.getAdjacentStacks=t.doShareEdge=t.getAdjacentItem=void 0;t.getAdjacentItem=(e,i)=>{const{parent:n}=e;if(e.isRoot()||!n)return;const o=["top","bottom"].includes(i)?"column":"row",s=["top","left"].includes(i)?-1:1;if(n.type===o){const t=n.contentItems.indexOf(e)+s;if(t>=0&&t{const n=t.getBounds(),o=e.getBounds();if(!n||!o)return!1;if(["top","bottom"].includes(i)){return!(n.righto.right)}return!(n.bottomo.bottom)};t.getAdjacentStacks=(e,i)=>{const n=["top","bottom"].includes(i)?"row":"column",o=s=>"stack"===s.type?(0,t.doShareEdge)(e,s,i)?[s]:[]:"root"===s.type||"ground"===s.type?[]:s.type===n?s.contentItems.map((t=>o(t))).flat():s.type!==n?["top","right"].includes(i)?o(s.contentItems[s.contentItems.length-1]):o(s.contentItems[0]):[],s=(0,t.getAdjacentItem)(e,i);return s?o(s):[]}}(b);var S=t.commonjsGlobal&&t.commonjsGlobal.__decorate||function(t,e,i,n){var o,s=arguments.length,r=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(s<3?o(r):s>3?o(e,i,r):o(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};Object.defineProperty(I,"__esModule",{value:!0}),I.LayoutEntitiesController=void 0;const E=t.decorators,x=b,L=i;class z{constructor(t,e,i){this.wire=t,this.layoutManager=e,this.layoutContentCache=i,this.analytics=t=>{this.wire.sendAction(`layout-controller-${t}`).catch((()=>{}))},this.getLayoutIdentityForViewOrThrow=async t=>{const e=this.layoutManager.getLayoutIdentityForView(t);if(!e)throw new Error(`View identity ${t.name} is not attached to any layouts.`);return e},this.getRoot=async t=>{this.analytics("get-root");const e=(await this.getLayout(t)).getRoot();return{type:e.type,entityId:this.layoutContentCache.getOrCreateEntityId(e)}},this.getStackByView=async t=>{this.analytics("get-stack-by-view");const e=await this.getLayoutIdentityForViewOrThrow(t),i=(await this.getLayout(e)).getStackByView(t);if("stack"===i?.type)return{entityId:this.layoutContentCache.getOrCreateEntityId(i),type:"stack"}},this.getStackViews=t=>{this.analytics("get-stack-views");return this.layoutContentCache.getContentItemOrThrow(t,["stack"]).contentItems.map((t=>({name:t.viewName,uuid:this.wire.me.uuid})))},this.isRoot=t=>{this.analytics("is-root");return this.layoutContentCache.getContentItemOrThrow(t).isRoot()},this.exists=t=>(this.analytics("exists"),this.layoutContentCache.hasKey(t)),this.addViewToStack=async(t,e,{index:i}={index:0})=>{this.analytics("add-view-to-stack");const n=this.layoutContentCache.getContentItemOrThrow(t);if(i&&i>n.contentItems.length+1)throw new Error(`Index '${i}' out of range, please exclude the index or specify a number between 0 and ${n.contentItems.length}`);const o={id:t,index:i},{identity:s}=await n.layout.platformCreateView(e,{location:o});return s},this.findViewInStack=(t,e)=>t.contentItems.find((t=>t.viewName===e.name)),this.removeViewFromStack=async(t,e)=>{this.analytics("remove-view-from-stack");const i=this.layoutContentCache.getContentItemOrThrow(t,["stack"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to remove a view ('${e.name}') which does not belong to the stack.`);await n.layout.platformCloseView(e)},this.createAdjacentStack=async(t,e,{position:i="right"}={})=>{if(this.analytics("create-adjacent-stack"),!Array.isArray(e)||0===e.length)throw new Error('The parameter "views" must be an array with at least 1 element.');if(!["top","bottom","left","right"].includes(i))throw new Error(`Invalid position '${i}' specified.`);const n=this.layoutContentCache.getContentItemOrThrow(t).createAdjacentStack({position:i}),o=this.layoutContentCache.getOrCreateEntityId(n);return await Promise.all(e.reverse().map((t=>this.addViewToStack(o,t)))),o},this.getAdjacentStacks=async({targetId:t,edge:e})=>{this.analytics("get-adjacent-stacks");const i=this.layoutContentCache.getContentItemOrThrow(t);return(0,x.getAdjacentStacks)(i,e).map((t=>({entityId:this.layoutContentCache.getOrCreateEntityId(t)})))},this.setStackActiveView=async(t,e)=>{this.analytics("set-stack-active-view");const i=this.layoutContentCache.getContentItemOrThrow(t,["stack"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to set a view ('${e.name}') as active when it does not belong to the stack.`);i.setActiveContentItem(n,!0)}}async getLayout(t){const e=await L.DefaultLayoutManager.resolveLayout(this.layoutManager,t);if(!e)throw new Error(`Could not resolve target layout identity ${JSON.stringify(t)}`);return e}getContent(t){this.analytics("get-content");return this.layoutContentCache.getContentItemOrThrow(t,["column","row"]).contentItems.map((t=>({type:t.type,entityId:this.layoutContentCache.getOrCreateEntityId(t)})))}getParent(t){this.analytics("get-parent");const e=this.layoutContentCache.getContentItemOrThrow(t);if(!e.isRoot())return e.parent?.contentItems.includes(e)?{type:e.parent.type,entityId:this.layoutContentCache.getOrCreateEntityId(e.parent)}:void 0}}S([(0,E.expose)()],z.prototype,"getLayoutIdentityForViewOrThrow",void 0),S([(0,E.expose)()],z.prototype,"getRoot",void 0),S([(0,E.expose)()],z.prototype,"getStackByView",void 0),S([(0,E.expose)()],z.prototype,"getStackViews",void 0),S([(0,E.expose)()],z.prototype,"getContent",null),S([(0,E.expose)()],z.prototype,"getParent",null),S([(0,E.expose)()],z.prototype,"isRoot",void 0),S([(0,E.expose)()],z.prototype,"exists",void 0),S([(0,E.expose)()],z.prototype,"addViewToStack",void 0),S([(0,E.expose)()],z.prototype,"removeViewFromStack",void 0),S([(0,E.expose)()],z.prototype,"createAdjacentStack",void 0),S([(0,E.expose)()],z.prototype,"getAdjacentStacks",void 0),S([(0,E.expose)()],z.prototype,"setStackActiveView",void 0),I.LayoutEntitiesController=z,Object.defineProperty(g,"__esModule",{value:!0});var M=g.initLayoutEndpoints=void 0;const P=t.apiExposer,T=t.layout_constants,A=f,k=I,D=i;M=g.initLayoutEndpoints=async function(t,e){const i=t.getFin(),n=await i.Platform.getCurrentSync().getClient(),o=new P.ChannelsExposer(n);await new P.ApiExposer(o).exposeInstance(new k.LayoutEntitiesController(t,e,A.LayoutContentCache.getSingleInstance()),{id:T.LAYOUT_CONTROLLER_ID}),await async function(t,e){const i=t=>async i=>{const n=await D.DefaultLayoutManager.resolveLayout(e,i.target);if(!n)throw new Error(`Could not resolve the layout target from payload ${JSON.stringify(i)}`);return t(n,i)},n=(e,n)=>{t.register(e,i(n))},o=(t,e)=>{n(t,e)};n("replace-view",((t,e)=>t.replaceView(e))),n("replace-layout",((t,{layout:e})=>t.replaceLayout(e))),n("add-view",((t,e)=>t.insertView(e))),o("layout-add-view",((t,{viewOptions:e,location:i,targetView:n})=>t.platformCreateView(e,{location:i,targetView:n}))),n("close-view",((t,e)=>t.cleanupView(e.viewIdentity))),o("layout-close-view",((t,e)=>t.platformCloseView(e.viewIdentity))),n("apply-preset-layout",((t,e)=>t.applyPreset(e))),n("get-layout-views",(t=>t.getCurrentViews())),n("get-frame-snapshot",(t=>t.getFrameSnapshot())),n("is-visible",(t=>t.isVisible())),n("destroy",(t=>t.destroy())),t.register("get-layout-snapshot",(()=>e.getLayoutSnapshot()))}(n,e)};var R={};Object.defineProperty(R,"__esModule",{value:!0});var U=R.BaseLayout=void 0;U=R.BaseLayout=class{};var O={};Object.defineProperty(O,"__esModule",{value:!0});var V=O.DOMEmitter=void 0;V=O.DOMEmitter=class{constructor(t){this.container=t}dispatchLocalEvent(t,e){const i={...e,type:t,tabSelector:`tab-${e.name}`,containerSelector:`container-${e.name}`,topic:"openfin-DOM-event"};this.container.dispatchEvent(new CustomEvent(t,{detail:i}))}};var B={};Object.defineProperty(B,"__esModule",{value:!0});var H=B.mapLayoutContentItemsImmutableSync=B.mapLayoutContentItemsImmutable=W=B.isVisible=void 0;var W=B.isVisible=t=>(0!==t.offsetWidth||0!==t.offsetHeight)&&"hidden"!==window.getComputedStyle(t).visibility&&t.offsetTop>=0&&t.offsetLeft>=0&&t.offsetTop<=window.innerHeight&&t.offsetLeft<=window.innerWidth;const F=t=>"type"in t&&"component"===t.type;B.mapLayoutContentItemsImmutable=async function t(e,i){return F(i)?e(i):{...i,content:await Promise.all(i.content?.map((i=>t(e,i))))}},H=B.mapLayoutContentItemsImmutableSync=function t(e,i){return F(i)?e(i):{...i,content:i.content?.map((i=>t(e,i)))}};class N extends Error{constructor(t,e){super(e),this.type=t}}class G extends N{constructor(t,e){super("Configuration",t),this.node=e}}class j extends N{constructor(t){super("PopoutBlocked",t)}}class $ extends N{constructor(t){super("API",t)}}class Z extends N{constructor(t){super("Bind",t)}}class q extends Error{constructor(t,e,i){super(`${t}: ${e}${void 0===i?"":": "+i}`)}}class X extends q{constructor(t,e){super("Assert",t,e)}}class Y extends q{constructor(t,e,i){super("UnreachableCase",t,`${e}${void 0===i?"":": "+i}`)}}class K extends q{constructor(t,e){super("UnexpectedNull",t,e)}}class J extends q{constructor(t,e){super("UnexpectedUndefined",t,e)}}var Q;!function(t){let e=!1;const i={PopoutCannotBeCreatedWithGroundItemConfig:{id:0,default:"Popout cannot be created with ground ItemConfig"},PleaseRegisterAConstructorFunction:{id:1,default:"Please register a constructor function"},ComponentTypeNotRegisteredAndBindComponentEventHandlerNotAssigned:{id:2,default:"Component type not registered and BindComponentEvent handler not assigned"},ComponentIsAlreadyRegistered:{id:3,default:"Component is already registered"},ComponentIsNotVirtuable:{id:4,default:"Component is not virtuable. Requires rootHtmlElement field/getter"},VirtualComponentDoesNotHaveRootHtmlElement:{id:5,default:'Virtual component does not have getter "rootHtmlElement"'},ItemConfigIsNotTypeComponent:{id:6,default:"ItemConfig is not of type component"},InvalidNumberPartInSizeString:{id:7,default:"Invalid number part in size string"},UnknownUnitInSizeString:{id:8,default:"Unknown unit in size string"},UnsupportedUnitInSizeString:{id:9,default:"Unsupported unit in size string"}};t.idCount=Object.keys(i).length;const n=Object.values(i);t.checkInitialise=function(){if(!e)for(let e=0;e="0"&&t<="9"}function Tt(t,e){const i=zt(e);t.style.width=i}function At(t,e){const i=zt(e);t.style.height=i}function kt(t){return{width:t.offsetWidth,height:t.offsetHeight}}function Dt(t,e){t.style.display=e?"":"none"}function Rt(t,e){if(void 0!==e)for(const i in e)if(e.hasOwnProperty(i)){const n=e[i],o=t[i];t[i]=Ut(o,n)}return t}function Ut(t,e){if("object"!=typeof e)return e;if(Array.isArray(e)){const t=e.length,i=new Array(t);for(let n=0;n36)throw new Error("Too many keys in config minifier map")},t.translateObject=n}(dt||(dt={})),function(t){t.defaults={type:at.ground,content:[],size:1,sizeUnit:ht.Fractional,minSize:void 0,minSizeUnit:ht.Pixel,id:"",isClosable:!0},t.createCopy=function(t,e){switch(t.type){case at.ground:case at.row:case at.column:return gt.createCopy(t,e);case at.stack:return ut.createCopy(t,e);case at.component:return pt.createCopy(t);default:throw new Y("CICC91354",t.type,"Invalid Config Item type specified")}},t.createDefault=function(t){switch(t){case at.ground:throw new X("CICCDR91562");case at.row:case at.column:return gt.createDefault(t);case at.stack:return ut.createDefault();case at.component:return pt.createDefault();default:throw new Y("CICCDD91563",t,"Invalid Config Item type specified")}},t.isComponentItem=function(t){return t.type===at.component},t.isStackItem=function(t){return t.type===at.stack},t.isGroundItem=function(t){return t.type===at.ground}}(ct||(ct={})),function(t){t.defaultMaximised=!1,function(t){t.createCopy=function(t,e){return void 0===t?void 0:{show:null!=e?e:t.show,popout:t.popout,close:t.close,maximise:t.maximise,minimise:t.minimise,tabDropdown:t.tabDropdown}}}(t.Header||(t.Header={}))}(mt||(mt={})),function(t){function e(t){const e=t.length,i=new Array(e);for(let n=0;n"__glMaximised"===t));t>0&&(o=!0,n=n.splice(t,1)),e=n.length>0?n[0]:ct.defaults.id}else e=n;return i=void 0!==t.maximised?t.maximised:o,{id:e,maximised:i}}}(wt||(wt={})),function(t){function e(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0;return{resolved:!0,root:Et.resolve(i),openPopouts:t.resolveOpenPopouts(e.openPopouts),dimensions:t.Dimensions.resolve(e.dimensions),settings:t.Settings.resolve(e.settings),header:t.Header.resolve(e.header,e.settings,e.labels)}}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:Lt.fromResolvedArray(e.openPopouts),settings:_t.Settings.createCopy(e.settings),dimensions:t.Dimensions.fromResolved(e.dimensions),header:_t.Header.createCopy(e.header)}},t.isResolved=function(t){const e=t;return void 0!==e.resolved&&!0===e.resolved},t.resolveOpenPopouts=function(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0,{root:Et.resolve(o),openPopouts:xt.resolveOpenPopouts(e.openPopouts),dimensions:xt.Dimensions.resolve(e.dimensions),settings:xt.Settings.resolve(e.settings),header:xt.Header.resolve(e.header,e.settings,e.labels),parentId:null!==(i=e.parentId)&&void 0!==i?i:null,indexInParent:null!==(n=e.indexInParent)&&void 0!==n?n:null,window:t.Window.resolve(e.window,e.dimensions),resolved:!0}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:i(e.openPopouts),dimensions:xt.Dimensions.fromResolved(e.dimensions),settings:_t.Settings.createCopy(e.settings),header:_t.Header.createCopy(e.header),parentId:e.parentId,indexInParent:e.indexInParent,window:t.Window.fromResolved(e.window)}},t.fromResolvedArray=i}(Lt||(Lt={}));class Wt{constructor(){this._allEventSubscriptions=[],this._subscriptionsMap=new Map,this.unbind=this.removeEventListener,this.trigger=this.emit}tryBubbleEvent(t,e){}emit(t,...e){let i=this._subscriptionsMap.get(t);if(void 0!==i){i=i.slice();for(let t=0;t0){const n=e.slice();n.unshift(t);const o=this._allEventSubscriptions.slice();for(let t=0;t0?n.contentItems[0]:n,e=0);const o=this._layoutManager.createAndInitContentItem(i,t);t.addChild(o,e),this._layoutManager.layoutConfig.settings.popInOnClose?this._onClose():this.close()}createWindow(){const t=this.createUrl(),e=Math.floor(1e6*Math.random()).toString(36),i=this.serializeWindowFeatures({width:this._initialWindowSize.width,height:this._initialWindowSize.height,innerWidth:this._initialWindowSize.width,innerHeight:this._initialWindowSize.height,menubar:"no",toolbar:"no",location:"no",personalbar:"no",resizable:"yes",scrollbars:"no",status:"no"});if(this._popoutWindow=globalThis.open(t,e,i),this._popoutWindow)this._popoutWindow.addEventListener("load",(()=>this.positionWindow()),{passive:!0}),this._popoutWindow.addEventListener("beforeunload",(()=>{this._layoutManager.layoutConfig.settings.popInOnClose?this.popIn():this._onClose()}),{passive:!0}),this._checkReadyInterval=setInterval((()=>this.checkReady()),10);else if(!0===this._layoutManager.layoutConfig.settings.blockedPopoutsThrowError){throw new j("Popout blocked")}}checkReady(){if(null===this._popoutWindow)throw new K("BPCR01844");this._popoutWindow.__glInstance&&this._popoutWindow.__glInstance.isInitialised&&(this.onInitialised(),void 0!==this._checkReadyInterval&&(clearInterval(this._checkReadyInterval),this._checkReadyInterval=void 0))}serializeWindowFeatures(t){const e=[];for(const i in t)e.push(i+"="+t[i].toString());return e.join(",")}createUrl(){const t="gl-window-config-"+Ot(),e=_t.minifyConfig(this._config);try{localStorage.setItem(t,JSON.stringify(e))}catch(t){throw new Error("Error while writing to localStorage "+function(t){return t instanceof Error?t.message:"string"==typeof t?t:"Unknown Error"}(t))}const i=new URL(location.href);return i.searchParams.set("gl-window",t),i.toString()}positionWindow(){if(null===this._popoutWindow)throw new Error("BrowserPopout.positionWindow: null popoutWindow");this._popoutWindow.moveTo(this._initialWindowSize.left,this._initialWindowSize.top),this._popoutWindow.focus()}onInitialised(){this._isInitialised=!0,this.getGlInstance().on("popIn",(()=>this.popIn())),this.emit("initialised")}_onClose(){setTimeout((()=>this.emit("closed")),50)}}class Gt extends Wt{constructor(t,e,i,n){super(),this.layoutManager=t,this._parent=i,this._element=n,this._popInParentIds=[],this._type=e.type,this._id=e.id,this._isInitialised=!1,this.isGround=!1,this.isRow=!1,this.isColumn=!1,this.isStack=!1,this.isComponent=!1,this.size=e.size,this.sizeUnit=e.sizeUnit,this.minSize=e.minSize,this.minSizeUnit=e.minSizeUnit,this._isClosable=e.isClosable,this._pendingEventPropagations={},this._throttledEvents=["stateChanged"],this._contentItems=this.createContentItems(e.content)}get type(){return this._type}get id(){return this._id}set id(t){this._id=t}get popInParentIds(){return this._popInParentIds}get parent(){return this._parent}get contentItems(){return this._contentItems}get isClosable(){return this._isClosable}get element(){return this._element}get isInitialised(){return this._isInitialised}static isStack(t){return t.isStack}static isComponentItem(t){return t.isComponent}static isComponentParentableItem(t){return t.isStack||t.isGround}removeChild(t,e=!1){const i=this._contentItems.indexOf(t);if(-1===i)throw new Error("Can't remove child item. Unknown content item");if(e||this._contentItems[i].destroy(),this._contentItems.splice(i,1),this._contentItems.length>0)this.updateSize(!1);else if(!this.isGround&&!0===this._isClosable){if(null===this._parent)throw new K("CIUC00874");this._parent.removeChild(this)}}addChild(t,e,i){return null!=e||(e=this._contentItems.length),this._contentItems.splice(e,0,t),t.setParent(this),!0===this._isInitialised&&!1===t._isInitialised&&t.init(),e}replaceChild(t,e,i=!1){const n=this._contentItems.indexOf(t),o=t._element.parentNode;if(-1===n)throw new X("CIRCI23232","Can't replace child. oldChild is not child of this");if(null===o)throw new K("CIRCP23232");if(o.replaceChild(e._element,t._element),!0===i&&(t._parent=null,t.destroy()),this._contentItems[n]=e,e.setParent(this),e.size=t.size,e.sizeUnit=t.sizeUnit,e.minSize=t.minSize,e.minSizeUnit=t.minSizeUnit,null===e._parent)throw new K("CIRCNC45699");!0===e._parent._isInitialised&&!1===e._isInitialised&&e.init(),this.updateSize(!1)}remove(){if(null===this._parent)throw new K("CIR11110");this._parent.removeChild(this)}popout(){const t=Ot(),e=this.layoutManager.createPopoutFromContentItem(this,void 0,t,void 0);return this.emitBaseBubblingEvent("stateChanged"),e}calculateConfigContent(){const t=this._contentItems,e=t.length,i=new Array(e);for(let n=0;nthis.propagateEventToLayoutManager(t,e))))}propagateEventToLayoutManager(t,e){this._pendingEventPropagations[t]=!1,this.layoutManager.emitUnknown(t,e)}}class jt extends Gt{constructor(t,e,i){super(t,e,i,document.createElement("div")),this._parentItem=i,this._focused=!1,this.isComponent=!0,this._reorderEnabled=e.reorderEnabled,this.applyUpdatableConfig(e),this._initialWantMaximise=e.maximised;const n=document.createElement("div");n.classList.add("lm_content"),this.element.appendChild(n),this._container=new Ft(e,this,t,n,(t=>this.handleUpdateItemConfigEvent(t)),(()=>this.show()),(()=>this.hide()),(t=>this.focus(t)),(t=>this.blur(t)))}get componentName(){return this._container.componentType}get componentType(){return this._container.componentType}get reorderEnabled(){return this._reorderEnabled}get initialWantMaximise(){return this._initialWantMaximise}get component(){return this._container.component}get container(){return this._container}get parentItem(){return this._parentItem}get headerConfig(){return this._headerConfig}get title(){return this._title}get tab(){return this._tab}get focused(){return this._focused}destroy(){this._container.destroy(),super.destroy()}applyUpdatableConfig(t){this.setTitle(t.title),this._headerConfig=t.header}toConfig(){const t=this._container.stateRequestEvent,e=void 0===t?this._container.state:t();return{type:at.component,content:[],size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,maximised:!1,isClosable:this.isClosable,reorderEnabled:this._reorderEnabled,title:this._title,header:mt.Header.createCopy(this._headerConfig),componentType:pt.copyComponentType(this.componentType),componentState:e}}close(){if(null===this.parent)throw new K("CIC68883");this.parent.removeChild(this,!1)}enterDragMode(t,e){Tt(this.element,t),At(this.element,e),this._container.enterDragMode(t,e)}exitDragMode(){this._container.exitDragMode()}enterStackMaximised(){this._container.enterStackMaximised()}exitStackMaximised(){this._container.exitStackMaximised()}drag(){this._container.drag()}updateSize(t){this.updateNodeSize(t)}init(){this.updateNodeSize(!1),super.init(),this._container.emit("open"),this.initContentItems()}setTitle(t){this._title=t,this.emit("titleChanged",t),this.emit("stateChanged")}setTab(t){this._tab=t,this.emit("tab",t),this._container.setTab(t)}hide(){super.hide(),this._container.setVisibility(!1)}show(){super.show(),this._container.setVisibility(!0)}focus(t=!1){this.parentItem.setActiveComponentItem(this,!0,t)}setFocused(t){this._focused=!0,this.tab.setFocused(),t||this.emitBaseBubblingEvent("focus")}blur(t=!1){this._focused&&this.layoutManager.setFocusedComponentItem(void 0,t)}setBlurred(t){this._focused=!1,this.tab.setBlurred(),t||this.emitBaseBubblingEvent("blur")}setParent(t){this._parentItem=t,super.setParent(t)}handleUpdateItemConfigEvent(t){this.applyUpdatableConfig(t)}updateNodeSize(t){if("none"!==this.element.style.display){const{width:e,height:i}=kt(this.element);this._container.setSizeToNodeSize(e,i,t)}}}class $t extends Gt{constructor(){super(...arguments),this._focused=!1}get focused(){return this._focused}setFocusedValue(t){this._focused=t}}class Zt extends Wt{constructor(t,e){super(),this._eElement=t,this._pointerTracking=!1,this._pointerDownEventListener=t=>this.onPointerDown(t),this._pointerMoveEventListener=t=>this.onPointerMove(t),this._pointerUpEventListener=t=>this.onPointerUp(t),this._timeout=void 0,this._allowableTargets=[t,...e],this._oDocument=document,this._eBody=document.body,this._nDelay=1800,this._nDistance=10,this._nX=0,this._nY=0,this._nOriginalX=0,this._nOriginalY=0,this._dragging=!1,this._eElement.addEventListener("pointerdown",this._pointerDownEventListener,{passive:!0})}destroy(){this.checkRemovePointerTrackingEventListeners(),this._eElement.removeEventListener("pointerdown",this._pointerDownEventListener)}cancelDrag(){this.processDragStop(void 0)}onPointerDown(t){if(this._allowableTargets.includes(t.target)&&t.isPrimary){const e=this.getPointerCoordinates(t);this.processPointerDown(e)}}processPointerDown(t){this._nOriginalX=t.x,this._nOriginalY=t.y,this._oDocument.addEventListener("pointermove",this._pointerMoveEventListener),this._oDocument.addEventListener("pointerup",this._pointerUpEventListener,{passive:!0}),this._pointerTracking=!0,this._timeout=setTimeout((()=>{try{this.startDrag()}catch(t){throw console.error(t),t}}),this._nDelay)}onPointerMove(t){this._pointerTracking&&(this.processDragMove(t),t.preventDefault())}processDragMove(t){this._nX=t.pageX-this._nOriginalX,this._nY=t.pageY-this._nOriginalY,!1===this._dragging&&(Math.abs(this._nX)>this._nDistance||Math.abs(this._nY)>this._nDistance)&&this.startDrag(),this._dragging&&this.emit("drag",this._nX,this._nY,t)}onPointerUp(t){this.processDragStop(t)}processDragStop(t){var e;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this.checkRemovePointerTrackingEventListeners(),!0===this._dragging&&(this._eBody.classList.remove("lm_dragging"),this._eElement.classList.remove("lm_dragging"),null===(e=this._oDocument.querySelector("iframe"))||void 0===e||e.style.setProperty("pointer-events",""),this._dragging=!1,this.emit("dragStop",t))}checkRemovePointerTrackingEventListeners(){this._pointerTracking&&(this._oDocument.removeEventListener("pointermove",this._pointerMoveEventListener),this._oDocument.removeEventListener("pointerup",this._pointerUpEventListener),this._pointerTracking=!1)}startDrag(){var t;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this._dragging=!0,this._eBody.classList.add("lm_dragging"),this._eElement.classList.add("lm_dragging"),null===(t=this._oDocument.querySelector("iframe"))||void 0===t||t.style.setProperty("pointer-events","none"),this.emit("dragStart",this._nOriginalX,this._nOriginalY)}getPointerCoordinates(t){return{x:t.pageX,y:t.pageY}}}class qt{constructor(t,e,i){this._isVertical=t,this._size=e,this._grabSize=i0){const i=this.createSplitter(Math.max(0,e-1)).element;e>0?(this.contentItems[e-1].element.insertAdjacentElement("afterend",i),i.insertAdjacentElement("afterend",t.element)):(this.contentItems[0].element.insertAdjacentElement("beforebegin",i),i.insertAdjacentElement("beforebegin",t.element))}else this._childElementContainer.appendChild(t.element);super.addChild(t,e);const n=1/this.contentItems.length*100;if(!0===i)return this.emitBaseBubblingEvent("stateChanged"),e;for(let e=0;e0&&(this.calculateRelativeSizes(),this.setAbsoluteSizes()),this.emitBaseBubblingEvent("stateChanged"),this.emit("resize")}setAbsoluteSizes(){const t=this.calculateAbsoluteSizes();for(let e=0;e0&&t.itemSizes[e]++,this._isColumn?(Tt(this.contentItems[e].element,t.crossAxisSize),At(this.contentItems[e].element,t.itemSizes[e])):(Tt(this.contentItems[e].element,t.itemSizes[e]),At(this.contentItems[e].element,t.crossAxisSize))}calculateAbsoluteSizes(){const t=(this.contentItems.length-1)*this._splitterSize,{width:e,height:i}=kt(this.element);let n,o;this._isColumn?(n=i-t,o=e):(n=e-t,o=i);let s=0;const r=[];for(let t=0;t0){const n=100-t;for(let t=0;t100&&e.length>0){for(let t=0;te)return;{const r=i/e;let a=i;for(let e=0;ethis.onSplitterDrag(e,t,i))),e.on("dragStop",(()=>this.onSplitterDragStop(e))),e.on("dragStart",(()=>this.onSplitterDragStart(e))),this._splitter.splice(t,0,e),e}getSplitItems(t){const e=this._splitter.indexOf(t);return{before:this.contentItems[e],after:this.contentItems[e+1]}}calculateContentItemMinSize(t){const e=t.minSize;if(void 0!==e){if(t.minSizeUnit===ht.Pixel)return e;throw new X("ROCGMD98831",JSON.stringify(t))}{const t=this.layoutManager.layoutConfig.dimensions;return this._isColumn?t.defaultMinItemHeight:t.defaultMinItemWidth}}calculateContentItemsTotalMinSize(t){let e=0;for(const i of t)e+=this.calculateContentItemMinSize(i);return e}onSplitterDragStart(t){const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=this.calculateContentItemsTotalMinSize(e.before.contentItems),s=this.calculateContentItemsTotalMinSize(e.after.contentItems);this._splitterPosition=0,this._splitterMinPosition=-1*(i-o),this._splitterMaxPosition=n-s}onSplitterDrag(t,e,i){let n=this._isColumn?i:e;if(null===this._splitterMinPosition||null===this._splitterMaxPosition)throw new K("ROCOSD59226");n=Math.max(n,this._splitterMinPosition),n=Math.min(n,this._splitterMaxPosition),this._splitterPosition=n;const o=zt(n);this._isColumn?t.element.style.top=o:t.element.style.left=o}onSplitterDragStop(t){if(null===this._splitterPosition)throw new K("ROCOSDS66932");{const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=(this._splitterPosition+i)/(i+n),s=e.before.size+e.after.size;e.before.size=o*s,e.after.size=(1-o)*s,t.element.style.top=zt(0),t.element.style.left=zt(0),globalThis.requestAnimationFrame((()=>this.updateSize(!1)))}}}!function(t){t.getElementDimensionSize=function(t,e){return"width"===e?function(t){return t.offsetWidth}(t):function(t){return t.offsetHeight}(t)},t.setElementDimensionSize=function(t,e,i){return"width"===e?Tt(t,i):At(t,i)},t.createElement=function(t,e){const i=t.createElement("div");return i.classList.add("lm_item"),e?i.classList.add("lm_column"):i.classList.add("lm_row"),i}}(Xt||(Xt={}));class Yt extends $t{constructor(t,e,i){super(t,vt.create(e),null,Yt.createElement(document)),this.isGround=!0,this._childElementContainer=this.element,this._containerElement=i;let n=null;for(;;){const t=n?n.previousSibling:this._containerElement.lastChild;if(!(t instanceof Element&&t.classList.contains("lm_content")))break;n=t}this._containerElement.insertBefore(this.element,n)}init(){if(!0!==this.isInitialised){this.updateNodeSize();for(let t=0;t0?this.contentItems[0]:this,n.isComponent)throw new Error("Cannot add item as child to ComponentItem");{const t=this.layoutManager.createAndInitContentItem(i,n);return e=n.addChild(t,e),n===this?-1:e}}loadComponentAsRoot(t){this.clearRoot();const e=Ct.resolve(t,!1);if(e.maximised)throw new Error("Root Component cannot be maximised");{const t=new jt(this.layoutManager,e,this);t.init(),this.addChild(t,0)}}addChild(t,e){if(this.contentItems.length>0)throw new Error("Ground node can only have a single child");return this._childElementContainer.appendChild(t.element),e=super.addChild(t,e),this.updateSize(!1),this.emitBaseBubblingEvent("stateChanged"),e}calculateConfigContent(){const t=this.contentItems,e=t.length,i=new Array(e);for(let n=0;n0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e)),this.updateContentItemsSize(!1))}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}createSideAreas(){const t=Yt.Area.oppositeSides,e=new Array(Object.keys(t).length);let i=0;for(const n in t){const o=n,s=this.getElementArea();if(null===s)throw new K("RCSA77553");s.side=o,"2"===t[o][1]?s[o]=s[t[o]]-50:s[o]=s[t[o]]+50,s.surface=(s.x2-s.x1)*(s.y2-s.y1),e[i++]=s}return e}highlightDropZone(t,e,i){this.layoutManager.tabDropPlaceholder.remove(),super.highlightDropZone(t,e,i)}onDrop(t,e){if(t.isComponent){const e=ut.createDefault(),i=t;e.header=mt.Header.createCopy(i.headerConfig);const n=this.layoutManager.createAndInitContentItem(e,this);n.addChild(t),t=n}if(0===this.contentItems.length)this.addChild(t);else{if(t.type===at.row||t.type===at.column){const e=ut.createDefault(),i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}const i="x"==e.side[0]?at.row:at.column,n="2"==e.side[1],o=this.contentItems[0];if(o instanceof Xt&&o.type===i){const e=o.contentItems[n?0:o.contentItems.length-1];o.addChild(t,n?0:void 0,!0),e.size*=.5,t.size=e.size,t.sizeUnit=ht.Percent,o.updateSize(!1)}else{const e=ct.createDefault(i),s=this.layoutManager.createContentItem(e,this);this.replaceChild(o,s),s.addChild(t,n?0:void 0,!0),s.addChild(o,n?void 0:0,!0),o.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}}dock(){throw new X("GID87731")}validateDocking(){throw new X("GIVD87732")}getAllContentItems(){const t=[this];return this.deepGetAllContentItems(this.contentItems,t),t}getConfigMaximisedItems(){const t=[];return this.deepFilterContentItems(this.contentItems,t,(t=>!(!Gt.isStack(t)||!t.initialWantMaximise)||!(!Gt.isComponentItem(t)||!t.initialWantMaximise))),t}getItemsByPopInParentId(t){const e=[];return this.deepFilterContentItems(this.contentItems,e,(e=>e.popInParentIds.includes(t))),e}toConfig(){throw new Error("Cannot generate GroundItem config")}setActiveComponentItem(t,e,i){}updateNodeSize(){const{width:t,height:e}=kt(this._containerElement);Tt(this.element,t),At(this.element,e),this.contentItems.length>0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e))}deepGetAllContentItems(t,e){for(let i=0;ithis.onClick(t),this._touchStartEventListener=t=>this.onTouchStart(t),this._element=document.createElement("div"),this._element.classList.add(i),this._element.title=e,this._header.on("destroy",(()=>this.destroy())),this._element.addEventListener("click",this._clickEventListener,{passive:!0}),this._element.addEventListener("touchstart",this._touchStartEventListener,{passive:!0}),this._header.controlsContainerElement.appendChild(this._element)}get element(){return this._element}destroy(){var t;this._element.removeEventListener("click",this._clickEventListener),this._element.removeEventListener("touchstart",this._touchStartEventListener),null===(t=this._element.parentNode)||void 0===t||t.removeChild(this._element)}onClick(t){this._pushEvent(t)}onTouchStart(t){this._pushEvent(t)}}class Jt{constructor(t,e,i,n,o){var s;this._layoutManager=t,this._componentItem=e,this._closeEvent=i,this._focusEvent=n,this._dragStartEvent=o,this._isActive=!1,this._tabClickListener=t=>this.onTabClickDown(t),this._tabTouchStartListener=t=>this.onTabTouchStart(t),this._closeClickListener=()=>this.onCloseClick(),this._closeTouchStartListener=()=>this.onCloseTouchStart(),this._dragStartListener=(t,e)=>this.onDragStart(t,e),this._contentItemDestroyListener=()=>this.onContentItemDestroy(),this._tabTitleChangedListener=t=>this.setTitle(t),this._element=document.createElement("div"),this._element.classList.add("lm_tab"),this._titleElement=document.createElement("span"),this._titleElement.classList.add("lm_title"),this._closeElement=document.createElement("div"),this._closeElement.classList.add("lm_close_tab"),this._element.appendChild(this._titleElement),this._element.appendChild(this._closeElement),e.isClosable?this._closeElement.style.display="":this._closeElement.style.display="none",this.setTitle(e.title),this._componentItem.on("titleChanged",this._tabTitleChangedListener);(null!==(s=e.reorderEnabled)&&void 0!==s?s:this._layoutManager.layoutConfig.settings.reorderEnabled)&&this.enableReorder(),this._element.addEventListener("click",this._tabClickListener,{passive:!0}),this._element.addEventListener("touchstart",this._tabTouchStartListener,{passive:!0}),this._componentItem.isClosable?(this._closeElement.addEventListener("click",this._closeClickListener,{passive:!0}),this._closeElement.addEventListener("touchstart",this._closeTouchStartListener,{passive:!0})):(this._closeElement.remove(),this._closeElement=void 0),this._componentItem.setTab(this),this._layoutManager.emit("tabCreated",this)}get isActive(){return this._isActive}get componentItem(){return this._componentItem}get contentItem(){return this._componentItem}get element(){return this._element}get titleElement(){return this._titleElement}get closeElement(){return this._closeElement}get reorderEnabled(){return void 0!==this._dragListener}set reorderEnabled(t){t!==this.reorderEnabled&&(t?this.enableReorder():this.disableReorder())}setTitle(t){this._titleElement.innerText=t,this._element.title=t}setActive(t){t!==this._isActive&&(this._isActive=t,t?this._element.classList.add("lm_active"):this._element.classList.remove("lm_active"))}destroy(){var t,e;this._closeEvent=void 0,this._focusEvent=void 0,this._dragStartEvent=void 0,this._element.removeEventListener("click",this._tabClickListener),this._element.removeEventListener("touchstart",this._tabTouchStartListener),null===(t=this._closeElement)||void 0===t||t.removeEventListener("click",this._closeClickListener),null===(e=this._closeElement)||void 0===e||e.removeEventListener("touchstart",this._closeTouchStartListener),this._componentItem.off("titleChanged",this._tabTitleChangedListener),this.reorderEnabled&&this.disableReorder(),this._element.remove()}setBlurred(){this._element.classList.remove("lm_focused"),this._titleElement.classList.remove("lm_focused")}setFocused(){this._element.classList.add("lm_focused"),this._titleElement.classList.add("lm_focused")}onDragStart(t,e){if(void 0===this._dragListener)throw new J("TODSDLU10093");if(void 0===this._dragStartEvent)throw new J("TODS23309");this._dragStartEvent(t,e,this._dragListener,this.componentItem)}onContentItemDestroy(){void 0!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=void 0)}onTabClickDown(t){const e=t.target;e!==this._element&&e!==this._titleElement||(0===t.button?this.notifyFocus():1===t.button&&this._componentItem.isClosable&&this.notifyClose())}onTabTouchStart(t){t.target===this._element&&this.notifyFocus()}onCloseClick(){this.notifyClose()}onCloseTouchStart(){this.notifyClose()}notifyClose(){if(void 0===this._closeEvent)throw new J("TNC15007");this._closeEvent(this._componentItem)}notifyFocus(){if(void 0===this._focusEvent)throw new J("TNA15007");this._focusEvent(this._componentItem)}enableReorder(){this._dragListener=new Zt(this._element,[this._titleElement]),this._dragListener.on("dragStart",this._dragStartListener),this._componentItem.on("destroy",this._contentItemDestroyListener)}disableReorder(){if(void 0===this._dragListener)throw new J("TDR87745");this._componentItem.off("destroy",this._contentItemDestroyListener),this._dragListener.off("dragStart",this._dragStartListener),this._dragListener=void 0}}class Qt{constructor(t,e,i,n,o){this._layoutManager=t,this._componentRemoveEvent=e,this._componentFocusEvent=i,this._componentDragStartEvent=n,this._dropdownActiveChangedEvent=o,this._tabs=[],this._lastVisibleTabIndex=-1,this._dropdownActive=!1,this._element=document.createElement("section"),this._element.classList.add("lm_tabs"),this._dropdownElement=document.createElement("section"),this._dropdownElement.classList.add("lm_tabdropdown_list"),this._dropdownElement.style.display="none"}get tabs(){return this._tabs}get tabCount(){return this._tabs.length}get lastVisibleTabIndex(){return this._lastVisibleTabIndex}get element(){return this._element}get dropdownElement(){return this._dropdownElement}get dropdownActive(){return this._dropdownActive}destroy(){for(let t=0;tthis.handleTabCloseEvent(t)),(t=>this.handleTabFocusEvent(t)),((t,e,i,n)=>this.handleTabDragStartEvent(t,e,i,n)));void 0===e&&(e=this._tabs.length),this._tabs.splice(e,0,i),ethis._lastVisibleTabIndex){const t=this._tabs[e];for(let t=e;t>0;t--)this._tabs[t]=this._tabs[t-1];this._tabs[0]=t}}updateTabSizes(t,e){let i=!1;this.tryUpdateTabSizes(i,t,e)||(i=!0,this.tryUpdateTabSizes(i,t,e)),i!==this._dropdownActive&&(this._dropdownActive=i,this._dropdownActiveChangedEvent())}tryUpdateTabSizes(t,e,i){if(this._tabs.length>0){if(void 0===i)throw new Error("non-empty tabs must have active component item");let n=0,o=!1;const s=this._layoutManager.layoutConfig.settings.tabOverlapAllowance,r=this._tabs.indexOf(i.tab),a=this._tabs[r];this._lastVisibleTabIndex=-1;for(let i=0;ie){if(o)i===r&&(l.style.zIndex="auto",l.style.marginLeft="",l.parentElement!==this._element&&this._element.appendChild(l));else{let t;if(t=r>0&&r<=i?(d-e)/(i-1):(d-e)/i,tthis.onClick(t),this._touchStartListener=t=>this.onTouchStart(t),this._rowColumnClosable=!0,this._closeButton=null,this._popoutButton=null,this._tabsContainer=new Qt(this._layoutManager,(t=>this.handleTabInitiatedComponentRemoveEvent(t)),(t=>this.handleTabInitiatedComponentFocusEvent(t)),((t,e,i,n)=>this.handleTabInitiatedDragStartEvent(t,e,i,n)),(()=>this.processTabDropdownActiveChanged())),this._show=i.show,this._popoutEnabled=i.popoutEnabled,this._popoutLabel=i.popoutLabel,this._maximiseEnabled=i.maximiseEnabled,this._maximiseLabel=i.maximiseLabel,this._minimiseEnabled=i.minimiseEnabled,this._minimiseLabel=i.minimiseLabel,this._closeEnabled=i.closeEnabled,this._closeLabel=i.closeLabel,this._tabDropdownEnabled=i.tabDropdownEnabled,this._tabDropdownLabel=i.tabDropdownLabel,this.setSide(i.side),this._canRemoveComponent=this._configClosable,this._element=document.createElement("section"),this._element.classList.add("lm_header"),this._controlsContainerElement=document.createElement("section"),this._controlsContainerElement.classList.add("lm_controls"),this._element.appendChild(this._tabsContainer.element),this._element.appendChild(this._controlsContainerElement),this._element.appendChild(this._tabsContainer.dropdownElement),this._element.addEventListener("click",this._clickListener,{passive:!0}),this._element.addEventListener("touchstart",this._touchStartListener,{passive:!0}),this._documentMouseUpListener=()=>this._tabsContainer.hideAdditionalTabsDropdown(),globalThis.document.addEventListener("mouseup",this._documentMouseUpListener,{passive:!0}),this._tabControlOffset=this._layoutManager.layoutConfig.settings.tabControlOffset,this._tabDropdownEnabled&&(this._tabDropdownButton=new Kt(this,this._tabDropdownLabel,"lm_tabdropdown",(()=>this._tabsContainer.showAdditionalTabsDropdown()))),this._popoutEnabled&&(this._popoutButton=new Kt(this,this._popoutLabel,"lm_popout",(()=>this.handleButtonPopoutEvent()))),this._maximiseEnabled&&(this._maximiseButton=new Kt(this,this._maximiseLabel,"lm_maximise",(t=>this.handleButtonMaximiseToggleEvent(t)))),this._configClosable&&(this._closeButton=new Kt(this,this._closeLabel,"lm_close",(()=>s()))),this.processTabDropdownActiveChanged()}get show(){return this._show}get side(){return this._side}get leftRightSided(){return this._leftRightSided}get layoutManager(){return this._layoutManager}get parent(){return this._parent}get tabs(){return this._tabsContainer.tabs}get lastVisibleTabIndex(){return this._tabsContainer.lastVisibleTabIndex}get element(){return this._element}get tabsContainerElement(){return this._tabsContainer.element}get controlsContainerElement(){return this._controlsContainerElement}destroy(){this.emit("destroy"),this._popoutEvent=void 0,this._maximiseToggleEvent=void 0,this._clickEvent=void 0,this._touchStartEvent=void 0,this._componentRemoveEvent=void 0,this._componentFocusEvent=void 0,this._componentDragStartEvent=void 0,this._tabsContainer.destroy(),globalThis.document.removeEventListener("mouseup",this._documentMouseUpListener),this._element.remove()}createTab(t,e){this._tabsContainer.createTab(t,e)}removeTab(t){this._tabsContainer.removeTab(t)}processActiveComponentChanged(t){this._tabsContainer.processActiveComponentChanged(t),this.updateTabSizes()}setSide(t){this._side=t,this._leftRightSided=[nt.right,nt.left].includes(this._side)}setRowColumnClosable(t){this._rowColumnClosable=t,this.updateClosability()}updateClosability(){let t;if(this._configClosable)if(this._rowColumnClosable){t=!0;const e=this.tabs.length;for(let i=0;i1}applyFocusedValue(t){t?this._element.classList.add("lm_focused"):this._element.classList.remove("lm_focused")}processMaximised(){if(void 0===this._maximiseButton)throw new J("HPMAX16997");this._maximiseButton.element.setAttribute("title",this._minimiseLabel)}processMinimised(){if(void 0===this._maximiseButton)throw new J("HPMIN16997");this._maximiseButton.element.setAttribute("title",this._maximiseLabel)}updateTabSizes(){if(this._tabsContainer.tabCount>0){const t=this._show?this._layoutManager.layoutConfig.dimensions.headerHeight:0;let e;this._leftRightSided?(this._element.style.height="",this._element.style.width=zt(t)):(this._element.style.width="",this._element.style.height=zt(t)),e=this._leftRightSided?this._element.offsetHeight-this._controlsContainerElement.offsetHeight-this._tabControlOffset:this._element.offsetWidth-this._controlsContainerElement.offsetWidth-this._tabControlOffset,this._tabsContainer.updateTabSizes(e,this._getActiveComponentItemEvent())}}handleTabInitiatedComponentRemoveEvent(t){if(this._canRemoveComponent){if(void 0===this._componentRemoveEvent)throw new J("HHTCE22294");this._componentRemoveEvent(t)}}handleTabInitiatedComponentFocusEvent(t){if(void 0===this._componentFocusEvent)throw new J("HHTAE22294");this._componentFocusEvent(t)}handleTabInitiatedDragStartEvent(t,e,i,n){if(this._canRemoveComponent){if(void 0===this._componentDragStartEvent)throw new J("HHTDSE22294");this._componentDragStartEvent(t,e,i,n)}else i.cancelDrag()}processTabDropdownActiveChanged(){void 0!==this._tabDropdownButton&&Dt(this._tabDropdownButton.element,this._tabsContainer.dropdownActive)}handleButtonPopoutEvent(){if(this._layoutManager.layoutConfig.settings.popoutWholeStack){if(void 0===this._popoutEvent)throw new J("HHBPOE17834");this._popoutEvent()}else{const t=this._getActiveComponentItemEvent();t&&t.popout()}}handleButtonMaximiseToggleEvent(t){if(void 0===this._maximiseToggleEvent)throw new J("HHBMTE16834");this._maximiseToggleEvent()}onClick(t){t.target===this._element&&this.notifyClick(t)}onTouchStart(t){t.target===this._element&&this.notifyTouchStart(t)}notifyClick(t){if(void 0===this._clickEvent)throw new J("HNHC46834");this._clickEvent(t)}notifyTouchStart(t){if(void 0===this._touchStartEvent)throw new J("HNHTS46834");this._touchStartEvent(t)}}class ee extends $t{constructor(t,e,i){var n,o,s,r,a,l,h,d,c,m,u,p,g,f,v,_,y,C,w;super(t,e,i,ee.createElement(document)),this._headerSideChanged=!1,this._resizeListener=()=>this.handleResize(),this._maximisedListener=()=>this.handleMaximised(),this._minimisedListener=()=>this.handleMinimised(),this._headerConfig=e.header;const I=t.layoutConfig.header,b=e.content;let S;if(1!==b.length)S=void 0;else{S=b[0].header}this._initialWantMaximise=e.maximised,this._initialActiveItemIndex=null!==(n=e.activeItemIndex)&&void 0!==n?n:0;const E=null!==(r=null!==(s=null===(o=this._headerConfig)||void 0===o?void 0:o.show)&&void 0!==s?s:null==S?void 0:S.show)&&void 0!==r?r:I.show,x=null!==(h=null!==(l=null===(a=this._headerConfig)||void 0===a?void 0:a.popout)&&void 0!==l?l:null==S?void 0:S.popout)&&void 0!==h?h:I.popout,L=null!==(m=null!==(c=null===(d=this._headerConfig)||void 0===d?void 0:d.maximise)&&void 0!==c?c:null==S?void 0:S.maximise)&&void 0!==m?m:I.maximise,z=null!==(g=null!==(p=null===(u=this._headerConfig)||void 0===u?void 0:u.close)&&void 0!==p?p:null==S?void 0:S.close)&&void 0!==g?g:I.close,M=null!==(_=null!==(v=null===(f=this._headerConfig)||void 0===f?void 0:f.minimise)&&void 0!==v?v:null==S?void 0:S.minimise)&&void 0!==_?_:I.minimise,P=null!==(w=null!==(C=null===(y=this._headerConfig)||void 0===y?void 0:y.tabDropdown)&&void 0!==C?C:null==S?void 0:S.tabDropdown)&&void 0!==w?w:I.tabDropdown;this._maximisedEnabled=!1!==L;const T={show:!1!==E,side:!1===E?nt.top:E,popoutEnabled:!1!==x,popoutLabel:!1===x?"":x,maximiseEnabled:this._maximisedEnabled,maximiseLabel:!1===L?"":L,closeEnabled:!1!==z,closeLabel:!1===z?"":z,minimiseEnabled:!0,minimiseLabel:M,tabDropdownEnabled:!1!==P,tabDropdownLabel:!1===P?"":P};this._header=new te(t,this,T,e.isClosable&&!1!==z,(()=>this.getActiveComponentItem()),(()=>this.remove()),(()=>this.handlePopoutEvent()),(()=>this.toggleMaximise()),(t=>this.handleHeaderClickEvent(t)),(t=>this.handleHeaderTouchStartEvent(t)),(t=>this.handleHeaderComponentRemoveEvent(t)),(t=>this.handleHeaderComponentFocusEvent(t)),((t,e,i,n)=>this.handleHeaderComponentStartDragEvent(t,e,i,n))),this.isStack=!0,this._childElementContainer=document.createElement("section"),this._childElementContainer.classList.add("lm_items"),this.on("resize",this._resizeListener),this._maximisedEnabled&&(this.on("maximised",this._maximisedListener),this.on("minimised",this._minimisedListener)),this.element.appendChild(this._header.element),this.element.appendChild(this._childElementContainer),this.setupHeaderPosition(),this._header.updateClosability()}get childElementContainer(){return this._childElementContainer}get header(){return this._header}get headerShow(){return this._header.show}get headerSide(){return this._header.side}get headerLeftRightSided(){return this._header.leftRightSided}get contentAreaDimensions(){return this._contentAreaDimensions}get initialWantMaximise(){return this._initialWantMaximise}get isMaximised(){return this===this.layoutManager.maximisedStack}get stackParent(){if(!this.parent)throw new Error("Stack should always have a parent");return this.parent}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}init(){if(!0===this.isInitialised)return;this.updateNodeSize();for(let t=0;t0){if(this._initialActiveItemIndex<0||this._initialActiveItemIndex>=e)throw new Error(`ActiveItemIndex out of range: ${this._initialActiveItemIndex} id: ${this.id}`);for(let i=0;ithis.contentItems.length)throw e-=1,new X("SAC99728");if(t instanceof jt)return e=super.addChild(t,e),this._childElementContainer.appendChild(t.element),this._header.createTab(t,e),this.setActiveComponentItem(t,i),this._header.updateTabSizes(),this.updateSize(!1),t.container.setBaseLogicalZIndex(),this._header.updateClosability(),this.emitStateChangedEvent(),e;throw new X("SACC88532")}removeChild(t,e){const i=t,n=this.contentItems.indexOf(i),o=1===this.contentItems.length;if(this._activeComponentItem===i&&(i.focused&&i.blur(),!o)){const t=0===n?1:n-1;this.setActiveComponentItem(this.contentItems[t],!1)}this._header.removeTab(i),super.removeChild(i,e),o||this._header.updateClosability(),this.emitStateChangedEvent()}toggleMaximise(){this.isMaximised?this.minimise():this.maximise()}maximise(){if(!this.isMaximised){this.layoutManager.setMaximisedStack(this);const t=this.contentItems,e=t.length;for(let i=0;i0&&void 0===t)throw new Error("expected non-empty stack to have an active component item");return{type:"stack",content:this.calculateConfigContent(),size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,isClosable:this.isClosable,maximised:this.isMaximised,header:this.createHeaderConfig(),activeItemIndex:t}}onDrop(t,e){if("header"===this._dropSegment){if(this.resetHeaderDropZone(),void 0===this._dropIndex)throw new J("SODDI68990");return void this.addChild(t,this._dropIndex)}if("body"===this._dropSegment)return void this.addChild(t,0,!0);const i="top"===this._dropSegment||"bottom"===this._dropSegment,n="left"===this._dropSegment||"right"===this._dropSegment,o="top"===this._dropSegment||"left"===this._dropSegment,s=i&&this.stackParent.isColumn||n&&this.stackParent.isRow;if(t.isComponent){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createAndInitContentItem(e,this);i.addChild(t),t=i}if(t.type===at.row||t.type===at.column){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}if(s){const e=this.stackParent.contentItems.indexOf(this);this.stackParent.addChild(t,o?e:e+1,!0),this.size*=.5,t.size=this.size,t.sizeUnit=this.sizeUnit,this.stackParent.updateSize(!1)}else{const e=i?at.column:at.row,n=ct.createDefault(e),s=this.layoutManager.createContentItem(n,this);this.stackParent.replaceChild(this,s),s.addChild(t,o?0:void 0,!0),s.addChild(this,o?void 0:0,!0),this.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}highlightDropZone(t,e){for(const i in this._contentAreaDimensions){const n=i,o=this._contentAreaDimensions[n].hoverArea;if(o.x1t&&o.y1e)return void("header"===n?(this._dropSegment="header",this.highlightHeaderDropZone(this._header.leftRightSided?e:t)):(this.resetHeaderDropZone(),this.highlightBodyDropZone(n)))}}getArea(){if("none"===this.element.style.display)return null;const t=super.getElementArea(this._header.element),e=super.getElementArea(this._childElementContainer);if(null===t||null===e)throw new K("SGAHC13086");const i=e.x2-e.x1,n=e.y2-e.y1;return this._contentAreaDimensions={header:{hoverArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2},highlightArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2}}},0===this.contentItems.length?(this._contentAreaDimensions.body={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2}},super.getElementArea(this.element)):(this._contentAreaDimensions.left={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x1+.25*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x1+.5*i,y2:e.y2}},this._contentAreaDimensions.top={hoverArea:{x1:e.x1+.25*i,y1:e.y1,x2:e.x1+.75*i,y2:e.y1+.5*n},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y1+.5*n}},this._contentAreaDimensions.right={hoverArea:{x1:e.x1+.75*i,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1+.5*i,y1:e.y1,x2:e.x2,y2:e.y2}},this._contentAreaDimensions.bottom={hoverArea:{x1:e.x1+.25*i,y1:e.y1+.5*n,x2:e.x1+.75*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1+.5*n,x2:e.x2,y2:e.y2}},super.getElementArea(this.element))}positionHeader(t){this._header.side!==t&&(this._header.setSide(t),this._headerSideChanged=!0,this.setupHeaderPosition())}updateNodeSize(){if("none"!==this.element.style.display){const t=kt(this.element);if(this._header.show){t[this._header.leftRightSided?it.width:it.height]-=this.layoutManager.layoutConfig.dimensions.headerHeight}this._childElementContainer.style.width=zt(t.width),this._childElementContainer.style.height=zt(t.height);for(let e=0;e=o&&t({...t,[e]:i});async function s(t,e){return(await Promise.all(e.map((async([e,i])=>[e,await t(i,e)])))).reduce(o,{})}n.mapEntriesAsync=s,n.mapValuesAsync=async function(t,e){let i;return i=e instanceof Map?[...e.entries()]:Object.entries(e),s(t,i)};var r,a,l,h,d=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldSet||function(t,e,i,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(t,i):o?o.value=i:e.set(t,i),i},c=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldGet||function(t,e,i,n){if("a"===i&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?n:"a"===i?n.call(t):n?n.value:e.get(t)};Object.defineProperty(i,"__esModule",{value:!0});var m=i.DefaultLayoutManager=void 0;const u=n;class p{constructor(t){a.set(this,void 0),l.set(this,new Map),d(this,a,t,"f")}size(){return c(this,l,"f").size}async applyLayoutSnapshot({layouts:t}){if(Object.keys(t).length>1)throw new Error("[LayoutManager] Tried to call applyLayoutSnapshot with more than 1 layout. When implementing multiple layouts via overridden LayoutManager class, you must override and fully implement the applyLayoutSnapshot method without calling super.applyLayoutSnapshot().");const[[e,i]]=Object.entries(t);await p.createLayout(this,{layoutName:e,layout:i})}async showLayout({layoutName:t}){}async getLayoutSnapshot(){return{layouts:await(0,u.mapValuesAsync)((t=>t.getFrameSnapshot()),c(this,l,"f"))}}async removeLayout({layoutName:t}){}getLayoutIdentityForView(t){const e=[...c(this,l,"f").values()].find((e=>e.getCurrentViews().some((e=>e.name===t.name&&e.uuid===t.uuid))));return e?.identity??void 0}isLayoutVisible({layoutName:t}){return c(p,r,"m",h).call(p,this,t).isVisible()}resolveLayoutIdentity(t){if(t&&"layoutName"in t)return t;const e=[...c(this,l,"f").values()];if(1===e.length)return e[0].identity;const i=e.find((t=>t.isVisible()));return i?.identity??void 0}static async resolveLayout(t,e){const i=t.resolveLayoutIdentity(e);if(void 0===i||!("layoutName"in i))throw new Error("[layout-manager] resolveLayout: Could not resolve the layout identity. Make sure you include 'layoutName' in the identity object.");return c(p,r,"m",h).call(p,t,i.layoutName)}static async handleSharedView(t,e,i){await(0,u.mapValuesAsync)((async t=>{if(t.identity.layoutName!==e.layoutName){const e=t.getCurrentViews().find((t=>t.name===i.name));e&&await t.onViewDetached({viewIdentity:e,target:null}).catch(console.error)}}),c(t,l,"f"))}static async handleLastViewRemoved(t,e){await t.removeLayout(e),await c(t,a,"f").handleLastViewRemoved(t)}static async destroyLayout(t,{layoutName:e}){await c(p,r,"m",h).call(p,t,e).destroy(),c(t,l,"f").delete(e)}static async createLayout(t,e){const{layoutName:i}=e;if(c(t,l,"f").has(i))throw new Error(`Layout name ${i} already exists`);await c(t,a,"f").createLayout(e,t)}static registerLayout(t,e,i){c(t,l,"f").set(e,i)}static getAllLayouts(t){return[...c(t,l,"f").values()]}static setInitialSnapshot(t,e){c(t,a,"f").setInitialSnapshot(e)}static createClosedConstructor(...t){return class extends p{constructor(){super(...t)}}}}m=i.DefaultLayoutManager=p,r=p,a=new WeakMap,l=new WeakMap,h=function(t,e){const i=c(t,l,"f").get(e);if(!i)throw new Error(`[layout-manager] getLayoutByName: Could not locate layout with name '${e}'`);return i};var g={},f={},v={};Object.defineProperty(v,"__esModule",{value:!0}),v.ReversibleMap=void 0;v.ReversibleMap=class{constructor(){this.valueToKey=new Map,this.keyToValue=new Map,this.setUnique=(t,e)=>{if(this.hasKey(t)||this.hasValue(e))throw new Error("Key or value already in the map.");this.keyToValue.set(t,e),this.valueToKey.set(e,t)},this.getKey=t=>{const e=this.valueToKey.get(t);if(!e)throw new Error("Value not found in the map.");return e},this.deleteKey=t=>{const e=this.getValue(t);return this.keyToValue.delete(t),this.valueToKey.delete(e),e},this.deleteValue=t=>{const e=this.getKey(t);return this.keyToValue.delete(e),this.valueToKey.delete(t),e},this.hasKey=t=>this.keyToValue.has(t),this.hasValue=t=>this.valueToKey.has(t)}getValue(t){const e=this.keyToValue.get(t);if(!e)throw new Error("Key not found in the map.");return e}},Object.defineProperty(f,"__esModule",{value:!0});var _=f.LayoutContentCache=void 0;const y=t.lazy,C=v;class w{constructor(){this.contentItemCache=new C.ReversibleMap,this.contentItemCacheId=0,this.createCacheKey=()=>{const t=`entity-${this.contentItemCacheId.toString()}`;return this.contentItemCacheId+=1,t},this.hasKey=t=>this.contentItemCache.hasKey(t),this.getItemOrUndefined=t=>{try{return this.getContentItemOrThrow(t)}catch(t){return}},this.getContentItemOrThrow=(t,e)=>{if(!this.contentItemCache.hasKey(t))throw new Error("Layout component has been destroyed or detached from the current layout.");const i=this.contentItemCache.getValue(t);if(e&&!e.includes(i.type))throw new Error(`Layout item is not the expected type. Expected ${e.join(", ")}, got ${i.type}.`);return i},this.getOrCreateEntityId=t=>{if(this.contentItemCache.hasValue(t))return this.contentItemCache.getKey(t);t.onDestroyed((()=>{this.contentItemCache.deleteValue(t)}));const e=this.createCacheKey();return this.contentItemCache.setUnique(e,t),e}}static getSingleInstance(){return w.singleton.getValue()}}_=f.LayoutContentCache=w,w.singleton=new y.Lazy((()=>new w));var I={},b={};!function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.getAdjacentStacks=t.doShareEdge=t.getAdjacentItem=void 0;t.getAdjacentItem=(e,i)=>{const{parent:n}=e;if(e.isRoot()||!n)return;const o=["top","bottom"].includes(i)?"column":"row",s=["top","left"].includes(i)?-1:1;if(n.type===o){const t=n.contentItems.indexOf(e)+s;if(t>=0&&t{const n=t.getBounds(),o=e.getBounds();if(!n||!o)return!1;if(["top","bottom"].includes(i)){return!(n.righto.right)}return!(n.bottomo.bottom)};t.getAdjacentStacks=(e,i)=>{const n=["top","bottom"].includes(i)?"row":"column",o=s=>"stack"===s.type?(0,t.doShareEdge)(e,s,i)?[s]:[]:"root"===s.type||"ground"===s.type?[]:s.type===n?s.contentItems.map((t=>o(t))).flat():s.type!==n?["top","right"].includes(i)?o(s.contentItems[s.contentItems.length-1]):o(s.contentItems[0]):[],s=(0,t.getAdjacentItem)(e,i);return s?o(s):[]}}(b);var S=t.commonjsGlobal&&t.commonjsGlobal.__decorate||function(t,e,i,n){var o,s=arguments.length,r=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(s<3?o(r):s>3?o(e,i,r):o(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};Object.defineProperty(I,"__esModule",{value:!0}),I.LayoutEntitiesController=void 0;const E=t.decorators,x=b,L=i;class z{constructor(t,e,i){this.wire=t,this.layoutManager=e,this.layoutContentCache=i,this.analytics=t=>{this.wire.sendAction(`layout-controller-${t}`).catch((()=>{}))},this.getLayoutIdentityForViewOrThrow=async t=>{const e=this.layoutManager.getLayoutIdentityForView(t);if(!e)throw new Error(`View identity ${t.name} is not attached to any layouts.`);return e},this.getRoot=async t=>{this.analytics("get-root");const e=(await this.getLayout(t)).getRoot();return{type:e.type,entityId:this.layoutContentCache.getOrCreateEntityId(e)}},this.getStackByView=async t=>{this.analytics("get-stack-by-view");const e=await this.getLayoutIdentityForViewOrThrow(t),i=(await this.getLayout(e)).getStackByView(t);if("stack"===i?.type)return{entityId:this.layoutContentCache.getOrCreateEntityId(i),type:"stack"}},this.getStackViews=t=>{this.analytics("get-stack-views");return this.layoutContentCache.getContentItemOrThrow(t,["stack"]).contentItems.map((t=>({name:t.viewName,uuid:this.wire.me.uuid})))},this.isRoot=t=>{this.analytics("is-root");return this.layoutContentCache.getContentItemOrThrow(t).isRoot()},this.exists=t=>(this.analytics("exists"),this.layoutContentCache.hasKey(t)),this.addViewToStack=async(t,e,{index:i}={index:0})=>{this.analytics("add-view-to-stack");const n=this.layoutContentCache.getContentItemOrThrow(t);if(i&&i>n.contentItems.length+1)throw new Error(`Index '${i}' out of range, please exclude the index or specify a number between 0 and ${n.contentItems.length}`);const o={id:t,index:i},{identity:s}=await n.layout.platformCreateView(e,{location:o});return s},this.findViewInStack=(t,e)=>t.contentItems.find((t=>t.viewName===e.name)),this.removeViewFromStack=async(t,e)=>{this.analytics("remove-view-from-stack");const i=this.layoutContentCache.getContentItemOrThrow(t,["stack"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to remove a view ('${e.name}') which does not belong to the stack.`);await n.layout.platformCloseView(e)},this.createAdjacentStack=async(t,e,{position:i="right"}={})=>{if(this.analytics("create-adjacent-stack"),!Array.isArray(e)||0===e.length)throw new Error('The parameter "views" must be an array with at least 1 element.');if(!["top","bottom","left","right"].includes(i))throw new Error(`Invalid position '${i}' specified.`);const n=this.layoutContentCache.getContentItemOrThrow(t).createAdjacentStack({position:i}),o=this.layoutContentCache.getOrCreateEntityId(n);return await Promise.all(e.reverse().map((t=>this.addViewToStack(o,t)))),o},this.getAdjacentStacks=async({targetId:t,edge:e})=>{this.analytics("get-adjacent-stacks");const i=this.layoutContentCache.getContentItemOrThrow(t);return(0,x.getAdjacentStacks)(i,e).map((t=>({entityId:this.layoutContentCache.getOrCreateEntityId(t)})))},this.setStackActiveView=async(t,e)=>{this.analytics("set-stack-active-view");const i=this.layoutContentCache.getContentItemOrThrow(t,["stack"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to set a view ('${e.name}') as active when it does not belong to the stack.`);i.setActiveContentItem(n,!0)}}async getLayout(t){const e=await L.DefaultLayoutManager.resolveLayout(this.layoutManager,t);if(!e)throw new Error(`Could not resolve target layout identity ${JSON.stringify(t)}`);return e}getContent(t){this.analytics("get-content");return this.layoutContentCache.getContentItemOrThrow(t,["column","row"]).contentItems.map((t=>({type:t.type,entityId:this.layoutContentCache.getOrCreateEntityId(t)})))}getParent(t){this.analytics("get-parent");const e=this.layoutContentCache.getContentItemOrThrow(t);if(!e.isRoot())return e.parent?.contentItems.includes(e)?{type:e.parent.type,entityId:this.layoutContentCache.getOrCreateEntityId(e.parent)}:void 0}}S([(0,E.expose)()],z.prototype,"getLayoutIdentityForViewOrThrow",void 0),S([(0,E.expose)()],z.prototype,"getRoot",void 0),S([(0,E.expose)()],z.prototype,"getStackByView",void 0),S([(0,E.expose)()],z.prototype,"getStackViews",void 0),S([(0,E.expose)()],z.prototype,"getContent",null),S([(0,E.expose)()],z.prototype,"getParent",null),S([(0,E.expose)()],z.prototype,"isRoot",void 0),S([(0,E.expose)()],z.prototype,"exists",void 0),S([(0,E.expose)()],z.prototype,"addViewToStack",void 0),S([(0,E.expose)()],z.prototype,"removeViewFromStack",void 0),S([(0,E.expose)()],z.prototype,"createAdjacentStack",void 0),S([(0,E.expose)()],z.prototype,"getAdjacentStacks",void 0),S([(0,E.expose)()],z.prototype,"setStackActiveView",void 0),I.LayoutEntitiesController=z,Object.defineProperty(g,"__esModule",{value:!0});var M=g.initLayoutEndpoints=void 0;const P=t.apiExposer,T=t.layout_constants,A=f,k=I,D=i;M=g.initLayoutEndpoints=async function(t,e){const i=t.getFin(),n=await i.Platform.getCurrentSync().getClient(),o=new P.ChannelsExposer(n);await new P.ApiExposer(o).exposeInstance(new k.LayoutEntitiesController(t,e,A.LayoutContentCache.getSingleInstance()),{id:T.LAYOUT_CONTROLLER_ID}),await async function(t,e){const i=t=>async i=>{const n=await D.DefaultLayoutManager.resolveLayout(e,i.target);if(!n)throw new Error(`Could not resolve the layout target from payload ${JSON.stringify(i)}`);return t(n,i)},n=(e,n)=>{t.register(e,i(n))},o=(t,e)=>{n(t,e)};n("replace-view",((t,e)=>t.replaceView(e))),n("replace-layout",((t,{layout:e})=>t.replaceLayout(e))),n("add-view",((t,e)=>t.insertView(e))),o("layout-add-view",((t,{viewOptions:e,location:i,targetView:n})=>t.platformCreateView(e,{location:i,targetView:n}))),n("close-view",((t,e)=>t.cleanupView(e.viewIdentity))),o("layout-close-view",((t,e)=>t.platformCloseView(e.viewIdentity))),n("apply-preset-layout",((t,e)=>t.applyPreset(e))),n("get-layout-views",(t=>t.getCurrentViews())),n("get-frame-snapshot",(t=>t.getFrameSnapshot())),n("is-visible",(t=>t.isVisible())),n("destroy",(t=>t.destroy())),t.register("get-layout-snapshot",(()=>e.getLayoutSnapshot()))}(n,e)};var R={};Object.defineProperty(R,"__esModule",{value:!0});var U=R.BaseLayout=void 0;U=R.BaseLayout=class{};var O={};Object.defineProperty(O,"__esModule",{value:!0});var V=O.DOMEmitter=void 0;V=O.DOMEmitter=class{constructor(t){this.container=t}dispatchLocalEvent(t,e){const i={...e,type:t,tabSelector:`tab-${e.name}`,containerSelector:`container-${e.name}`,topic:"openfin-DOM-event"};this.container.dispatchEvent(new CustomEvent(t,{detail:i}))}};var B={};Object.defineProperty(B,"__esModule",{value:!0});var H=B.mapLayoutContentItemsImmutableSync=B.mapLayoutContentItemsImmutable=W=B.isVisible=void 0;var W=B.isVisible=t=>(0!==t.offsetWidth||0!==t.offsetHeight)&&"hidden"!==window.getComputedStyle(t).visibility&&t.offsetTop>=0&&t.offsetLeft>=0&&t.offsetTop<=window.innerHeight&&t.offsetLeft<=window.innerWidth;const F=t=>"type"in t&&"component"===t.type;B.mapLayoutContentItemsImmutable=async function t(e,i){return F(i)?e(i):{...i,content:await Promise.all(i.content?.map((i=>t(e,i))))}},H=B.mapLayoutContentItemsImmutableSync=function t(e,i){return F(i)?e(i):{...i,content:i.content?.map((i=>t(e,i)))}};class N extends Error{constructor(t,e){super(e),this.type=t}}class G extends N{constructor(t,e){super("Configuration",t),this.node=e}}class j extends N{constructor(t){super("PopoutBlocked",t)}}class $ extends N{constructor(t){super("API",t)}}class Z extends N{constructor(t){super("Bind",t)}}class q extends Error{constructor(t,e,i){super(`${t}: ${e}${void 0===i?"":": "+i}`)}}class X extends q{constructor(t,e){super("Assert",t,e)}}class Y extends q{constructor(t,e,i){super("UnreachableCase",t,`${e}${void 0===i?"":": "+i}`)}}class K extends q{constructor(t,e){super("UnexpectedNull",t,e)}}class J extends q{constructor(t,e){super("UnexpectedUndefined",t,e)}}var Q;!function(t){let e=!1;const i={PopoutCannotBeCreatedWithGroundItemConfig:{id:0,default:"Popout cannot be created with ground ItemConfig"},PleaseRegisterAConstructorFunction:{id:1,default:"Please register a constructor function"},ComponentTypeNotRegisteredAndBindComponentEventHandlerNotAssigned:{id:2,default:"Component type not registered and BindComponentEvent handler not assigned"},ComponentIsAlreadyRegistered:{id:3,default:"Component is already registered"},ComponentIsNotVirtuable:{id:4,default:"Component is not virtuable. Requires rootHtmlElement field/getter"},VirtualComponentDoesNotHaveRootHtmlElement:{id:5,default:'Virtual component does not have getter "rootHtmlElement"'},ItemConfigIsNotTypeComponent:{id:6,default:"ItemConfig is not of type component"},InvalidNumberPartInSizeString:{id:7,default:"Invalid number part in size string"},UnknownUnitInSizeString:{id:8,default:"Unknown unit in size string"},UnsupportedUnitInSizeString:{id:9,default:"Unsupported unit in size string"}};t.idCount=Object.keys(i).length;const n=Object.values(i);t.checkInitialise=function(){if(!e)for(let e=0;e="0"&&t<="9"}function Tt(t,e){const i=zt(e);t.style.width=i}function At(t,e){const i=zt(e);t.style.height=i}function kt(t){return{width:t.offsetWidth,height:t.offsetHeight}}function Dt(t,e){t.style.display=e?"":"none"}function Rt(t,e){if(void 0!==e)for(const i in e)if(e.hasOwnProperty(i)){const n=e[i],o=t[i];t[i]=Ut(o,n)}return t}function Ut(t,e){if("object"!=typeof e)return e;if(Array.isArray(e)){const t=e.length,i=new Array(t);for(let n=0;n36)throw new Error("Too many keys in config minifier map")},t.translateObject=n}(dt||(dt={})),function(t){t.defaults={type:at.ground,content:[],size:1,sizeUnit:ht.Fractional,minSize:void 0,minSizeUnit:ht.Pixel,id:"",isClosable:!0},t.createCopy=function(t,e){switch(t.type){case at.ground:case at.row:case at.column:return gt.createCopy(t,e);case at.stack:return ut.createCopy(t,e);case at.component:return pt.createCopy(t);default:throw new Y("CICC91354",t.type,"Invalid Config Item type specified")}},t.createDefault=function(t){switch(t){case at.ground:throw new X("CICCDR91562");case at.row:case at.column:return gt.createDefault(t);case at.stack:return ut.createDefault();case at.component:return pt.createDefault();default:throw new Y("CICCDD91563",t,"Invalid Config Item type specified")}},t.isComponentItem=function(t){return t.type===at.component},t.isStackItem=function(t){return t.type===at.stack},t.isGroundItem=function(t){return t.type===at.ground}}(ct||(ct={})),function(t){t.defaultMaximised=!1,function(t){t.createCopy=function(t,e){return void 0===t?void 0:{show:null!=e?e:t.show,popout:t.popout,close:t.close,maximise:t.maximise,minimise:t.minimise,tabDropdown:t.tabDropdown}}}(t.Header||(t.Header={}))}(mt||(mt={})),function(t){function e(t){const e=t.length,i=new Array(e);for(let n=0;n"__glMaximised"===t));t>0&&(o=!0,n=n.splice(t,1)),e=n.length>0?n[0]:ct.defaults.id}else e=n;return i=void 0!==t.maximised?t.maximised:o,{id:e,maximised:i}}}(wt||(wt={})),function(t){function e(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0;return{resolved:!0,root:Et.resolve(i),openPopouts:t.resolveOpenPopouts(e.openPopouts),dimensions:t.Dimensions.resolve(e.dimensions),settings:t.Settings.resolve(e.settings),header:t.Header.resolve(e.header,e.settings,e.labels)}}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:Lt.fromResolvedArray(e.openPopouts),settings:_t.Settings.createCopy(e.settings),dimensions:t.Dimensions.fromResolved(e.dimensions),header:_t.Header.createCopy(e.header)}},t.isResolved=function(t){const e=t;return void 0!==e.resolved&&!0===e.resolved},t.resolveOpenPopouts=function(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0,{root:Et.resolve(o),openPopouts:xt.resolveOpenPopouts(e.openPopouts),dimensions:xt.Dimensions.resolve(e.dimensions),settings:xt.Settings.resolve(e.settings),header:xt.Header.resolve(e.header,e.settings,e.labels),parentId:null!==(i=e.parentId)&&void 0!==i?i:null,indexInParent:null!==(n=e.indexInParent)&&void 0!==n?n:null,window:t.Window.resolve(e.window,e.dimensions),resolved:!0}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:i(e.openPopouts),dimensions:xt.Dimensions.fromResolved(e.dimensions),settings:_t.Settings.createCopy(e.settings),header:_t.Header.createCopy(e.header),parentId:e.parentId,indexInParent:e.indexInParent,window:t.Window.fromResolved(e.window)}},t.fromResolvedArray=i}(Lt||(Lt={}));class Wt{constructor(){this._allEventSubscriptions=[],this._subscriptionsMap=new Map,this.unbind=this.removeEventListener,this.trigger=this.emit}tryBubbleEvent(t,e){}emit(t,...e){let i=this._subscriptionsMap.get(t);if(void 0!==i){i=i.slice();for(let t=0;t0){const n=e.slice();n.unshift(t);const o=this._allEventSubscriptions.slice();for(let t=0;t0?n.contentItems[0]:n,e=0);const o=this._layoutManager.createAndInitContentItem(i,t);t.addChild(o,e),this._layoutManager.layoutConfig.settings.popInOnClose?this._onClose():this.close()}createWindow(){const t=this.createUrl(),e=Math.floor(1e6*Math.random()).toString(36),i=this.serializeWindowFeatures({width:this._initialWindowSize.width,height:this._initialWindowSize.height,innerWidth:this._initialWindowSize.width,innerHeight:this._initialWindowSize.height,menubar:"no",toolbar:"no",location:"no",personalbar:"no",resizable:"yes",scrollbars:"no",status:"no"});if(this._popoutWindow=globalThis.open(t,e,i),this._popoutWindow)this._popoutWindow.addEventListener("load",(()=>this.positionWindow()),{passive:!0}),this._popoutWindow.addEventListener("beforeunload",(()=>{this._layoutManager.layoutConfig.settings.popInOnClose?this.popIn():this._onClose()}),{passive:!0}),this._checkReadyInterval=setInterval((()=>this.checkReady()),10);else if(!0===this._layoutManager.layoutConfig.settings.blockedPopoutsThrowError){throw new j("Popout blocked")}}checkReady(){if(null===this._popoutWindow)throw new K("BPCR01844");this._popoutWindow.__glInstance&&this._popoutWindow.__glInstance.isInitialised&&(this.onInitialised(),void 0!==this._checkReadyInterval&&(clearInterval(this._checkReadyInterval),this._checkReadyInterval=void 0))}serializeWindowFeatures(t){const e=[];for(const i in t)e.push(i+"="+t[i].toString());return e.join(",")}createUrl(){const t="gl-window-config-"+Ot(),e=_t.minifyConfig(this._config);try{localStorage.setItem(t,JSON.stringify(e))}catch(t){throw new Error("Error while writing to localStorage "+function(t){return t instanceof Error?t.message:"string"==typeof t?t:"Unknown Error"}(t))}const i=new URL(location.href);return i.searchParams.set("gl-window",t),i.toString()}positionWindow(){if(null===this._popoutWindow)throw new Error("BrowserPopout.positionWindow: null popoutWindow");this._popoutWindow.moveTo(this._initialWindowSize.left,this._initialWindowSize.top),this._popoutWindow.focus()}onInitialised(){this._isInitialised=!0,this.getGlInstance().on("popIn",(()=>this.popIn())),this.emit("initialised")}_onClose(){setTimeout((()=>this.emit("closed")),50)}}class Gt extends Wt{constructor(t,e,i,n){super(),this.layoutManager=t,this._parent=i,this._element=n,this._popInParentIds=[],this._type=e.type,this._id=e.id,this._isInitialised=!1,this.isGround=!1,this.isRow=!1,this.isColumn=!1,this.isStack=!1,this.isComponent=!1,this.size=e.size,this.sizeUnit=e.sizeUnit,this.minSize=e.minSize,this.minSizeUnit=e.minSizeUnit,this._isClosable=e.isClosable,this._pendingEventPropagations={},this._throttledEvents=["stateChanged"],this._contentItems=this.createContentItems(e.content)}get type(){return this._type}get id(){return this._id}set id(t){this._id=t}get popInParentIds(){return this._popInParentIds}get parent(){return this._parent}get contentItems(){return this._contentItems}get isClosable(){return this._isClosable}get element(){return this._element}get isInitialised(){return this._isInitialised}static isStack(t){return t.isStack}static isComponentItem(t){return t.isComponent}static isComponentParentableItem(t){return t.isStack||t.isGround}removeChild(t,e=!1){const i=this._contentItems.indexOf(t);if(-1===i)throw new Error("Can't remove child item. Unknown content item");if(e||this._contentItems[i].destroy(),this._contentItems.splice(i,1),this._contentItems.length>0)this.updateSize(!1);else if(!this.isGround&&!0===this._isClosable){if(null===this._parent)throw new K("CIUC00874");this._parent.removeChild(this)}}addChild(t,e,i){return null!=e||(e=this._contentItems.length),this._contentItems.splice(e,0,t),t.setParent(this),!0===this._isInitialised&&!1===t._isInitialised&&t.init(),e}replaceChild(t,e,i=!1){const n=this._contentItems.indexOf(t),o=t._element.parentNode;if(-1===n)throw new X("CIRCI23232","Can't replace child. oldChild is not child of this");if(null===o)throw new K("CIRCP23232");if(o.replaceChild(e._element,t._element),!0===i&&(t._parent=null,t.destroy()),this._contentItems[n]=e,e.setParent(this),e.size=t.size,e.sizeUnit=t.sizeUnit,e.minSize=t.minSize,e.minSizeUnit=t.minSizeUnit,null===e._parent)throw new K("CIRCNC45699");!0===e._parent._isInitialised&&!1===e._isInitialised&&e.init(),this.updateSize(!1)}remove(){if(null===this._parent)throw new K("CIR11110");this._parent.removeChild(this)}popout(){const t=Ot(),e=this.layoutManager.createPopoutFromContentItem(this,void 0,t,void 0);return this.emitBaseBubblingEvent("stateChanged"),e}calculateConfigContent(){const t=this._contentItems,e=t.length,i=new Array(e);for(let n=0;nthis.propagateEventToLayoutManager(t,e))))}propagateEventToLayoutManager(t,e){this._pendingEventPropagations[t]=!1,this.layoutManager.emitUnknown(t,e)}}class jt extends Gt{constructor(t,e,i){super(t,e,i,document.createElement("div")),this._parentItem=i,this._focused=!1,this.isComponent=!0,this._reorderEnabled=e.reorderEnabled,this.applyUpdatableConfig(e),this._initialWantMaximise=e.maximised;const n=document.createElement("div");n.classList.add("lm_content"),this.element.appendChild(n),this._container=new Ft(e,this,t,n,(t=>this.handleUpdateItemConfigEvent(t)),(()=>this.show()),(()=>this.hide()),(t=>this.focus(t)),(t=>this.blur(t)))}get componentName(){return this._container.componentType}get componentType(){return this._container.componentType}get reorderEnabled(){return this._reorderEnabled}get initialWantMaximise(){return this._initialWantMaximise}get component(){return this._container.component}get container(){return this._container}get parentItem(){return this._parentItem}get headerConfig(){return this._headerConfig}get title(){return this._title}get tab(){return this._tab}get focused(){return this._focused}destroy(){this._container.destroy(),super.destroy()}applyUpdatableConfig(t){this.setTitle(t.title),this._headerConfig=t.header}toConfig(){const t=this._container.stateRequestEvent,e=void 0===t?this._container.state:t();return{type:at.component,content:[],size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,maximised:!1,isClosable:this.isClosable,reorderEnabled:this._reorderEnabled,title:this._title,header:mt.Header.createCopy(this._headerConfig),componentType:pt.copyComponentType(this.componentType),componentState:e}}close(){if(null===this.parent)throw new K("CIC68883");this.parent.removeChild(this,!1)}enterDragMode(t,e){Tt(this.element,t),At(this.element,e),this._container.enterDragMode(t,e)}exitDragMode(){this._container.exitDragMode()}enterStackMaximised(){this._container.enterStackMaximised()}exitStackMaximised(){this._container.exitStackMaximised()}drag(){this._container.drag()}updateSize(t){this.updateNodeSize(t)}init(){this.updateNodeSize(!1),super.init(),this._container.emit("open"),this.initContentItems()}setTitle(t){this._title=t,this.emit("titleChanged",t),this.emit("stateChanged")}setTab(t){this._tab=t,this.emit("tab",t),this._container.setTab(t)}hide(){super.hide(),this._container.setVisibility(!1)}show(){super.show(),this._container.setVisibility(!0)}focus(t=!1){this.parentItem.setActiveComponentItem(this,!0,t)}setFocused(t){this._focused=!0,this.tab.setFocused(),t||this.emitBaseBubblingEvent("focus")}blur(t=!1){this._focused&&this.layoutManager.setFocusedComponentItem(void 0,t)}setBlurred(t){this._focused=!1,this.tab.setBlurred(),t||this.emitBaseBubblingEvent("blur")}setParent(t){this._parentItem=t,super.setParent(t)}handleUpdateItemConfigEvent(t){this.applyUpdatableConfig(t)}updateNodeSize(t){if("none"!==this.element.style.display){const{width:e,height:i}=kt(this.element);this._container.setSizeToNodeSize(e,i,t)}}}class $t extends Gt{constructor(){super(...arguments),this._focused=!1}get focused(){return this._focused}setFocusedValue(t){this._focused=t}}class Zt extends Wt{constructor(t,e){super(),this._eElement=t,this._pointerTracking=!1,this._pointerDownEventListener=t=>this.onPointerDown(t),this._pointerMoveEventListener=t=>this.onPointerMove(t),this._pointerUpEventListener=t=>this.onPointerUp(t),this._timeout=void 0,this._allowableTargets=[t,...e],this._oDocument=document,this._eBody=document.body,this._nDelay=1800,this._nDistance=10,this._nX=0,this._nY=0,this._nOriginalX=0,this._nOriginalY=0,this._dragging=!1,this._eElement.addEventListener("pointerdown",this._pointerDownEventListener,{passive:!0})}destroy(){this.checkRemovePointerTrackingEventListeners(),this._eElement.removeEventListener("pointerdown",this._pointerDownEventListener)}cancelDrag(){this.processDragStop(void 0)}onPointerDown(t){if(this._allowableTargets.includes(t.target)&&t.isPrimary){const e=this.getPointerCoordinates(t);this.processPointerDown(e)}}processPointerDown(t){this._nOriginalX=t.x,this._nOriginalY=t.y,this._oDocument.addEventListener("pointermove",this._pointerMoveEventListener),this._oDocument.addEventListener("pointerup",this._pointerUpEventListener,{passive:!0}),this._pointerTracking=!0,this._timeout=setTimeout((()=>{try{this.startDrag()}catch(t){throw console.error(t),t}}),this._nDelay)}onPointerMove(t){this._pointerTracking&&(this.processDragMove(t),t.preventDefault())}processDragMove(t){this._nX=t.pageX-this._nOriginalX,this._nY=t.pageY-this._nOriginalY,!1===this._dragging&&(Math.abs(this._nX)>this._nDistance||Math.abs(this._nY)>this._nDistance)&&this.startDrag(),this._dragging&&this.emit("drag",this._nX,this._nY,t)}onPointerUp(t){this.processDragStop(t)}processDragStop(t){var e;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this.checkRemovePointerTrackingEventListeners(),!0===this._dragging&&(this._eBody.classList.remove("lm_dragging"),this._eElement.classList.remove("lm_dragging"),null===(e=this._oDocument.querySelector("iframe"))||void 0===e||e.style.setProperty("pointer-events",""),this._dragging=!1,this.emit("dragStop",t))}checkRemovePointerTrackingEventListeners(){this._pointerTracking&&(this._oDocument.removeEventListener("pointermove",this._pointerMoveEventListener),this._oDocument.removeEventListener("pointerup",this._pointerUpEventListener),this._pointerTracking=!1)}startDrag(){var t;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this._dragging=!0,this._eBody.classList.add("lm_dragging"),this._eElement.classList.add("lm_dragging"),null===(t=this._oDocument.querySelector("iframe"))||void 0===t||t.style.setProperty("pointer-events","none"),this.emit("dragStart",this._nOriginalX,this._nOriginalY)}getPointerCoordinates(t){return{x:t.pageX,y:t.pageY}}}class qt{constructor(t,e,i){this._isVertical=t,this._size=e,this._grabSize=i0){const i=this.createSplitter(Math.max(0,e-1)).element;e>0?(this.contentItems[e-1].element.insertAdjacentElement("afterend",i),i.insertAdjacentElement("afterend",t.element)):(this.contentItems[0].element.insertAdjacentElement("beforebegin",i),i.insertAdjacentElement("beforebegin",t.element))}else this._childElementContainer.appendChild(t.element);super.addChild(t,e);const n=1/this.contentItems.length*100;if(!0===i)return this.emitBaseBubblingEvent("stateChanged"),e;for(let e=0;e0&&(this.calculateRelativeSizes(),this.setAbsoluteSizes()),this.emitBaseBubblingEvent("stateChanged"),this.emit("resize")}setAbsoluteSizes(){const t=this.calculateAbsoluteSizes();for(let e=0;e0&&t.itemSizes[e]++,this._isColumn?(Tt(this.contentItems[e].element,t.crossAxisSize),At(this.contentItems[e].element,t.itemSizes[e])):(Tt(this.contentItems[e].element,t.itemSizes[e]),At(this.contentItems[e].element,t.crossAxisSize))}calculateAbsoluteSizes(){const t=(this.contentItems.length-1)*this._splitterSize,{width:e,height:i}=kt(this.element);let n,o;this._isColumn?(n=i-t,o=e):(n=e-t,o=i);let s=0;const r=[];for(let t=0;t0){const n=100-t;for(let t=0;t100&&e.length>0){for(let t=0;te)return;{const r=i/e;let a=i;for(let e=0;ethis.onSplitterDrag(e,t,i))),e.on("dragStop",(()=>this.onSplitterDragStop(e))),e.on("dragStart",(()=>this.onSplitterDragStart(e))),this._splitter.splice(t,0,e),e}getSplitItems(t){const e=this._splitter.indexOf(t);return{before:this.contentItems[e],after:this.contentItems[e+1]}}calculateContentItemMinSize(t){const e=t.minSize;if(void 0!==e){if(t.minSizeUnit===ht.Pixel)return e;throw new X("ROCGMD98831",JSON.stringify(t))}{const t=this.layoutManager.layoutConfig.dimensions;return this._isColumn?t.defaultMinItemHeight:t.defaultMinItemWidth}}calculateContentItemsTotalMinSize(t){let e=0;for(const i of t)e+=this.calculateContentItemMinSize(i);return e}onSplitterDragStart(t){const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=this.calculateContentItemsTotalMinSize(e.before.contentItems),s=this.calculateContentItemsTotalMinSize(e.after.contentItems);this._splitterPosition=0,this._splitterMinPosition=-1*(i-o),this._splitterMaxPosition=n-s}onSplitterDrag(t,e,i){let n=this._isColumn?i:e;if(null===this._splitterMinPosition||null===this._splitterMaxPosition)throw new K("ROCOSD59226");n=Math.max(n,this._splitterMinPosition),n=Math.min(n,this._splitterMaxPosition),this._splitterPosition=n;const o=zt(n);this._isColumn?t.element.style.top=o:t.element.style.left=o}onSplitterDragStop(t){if(null===this._splitterPosition)throw new K("ROCOSDS66932");{const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=(this._splitterPosition+i)/(i+n),s=e.before.size+e.after.size;e.before.size=o*s,e.after.size=(1-o)*s,t.element.style.top=zt(0),t.element.style.left=zt(0),globalThis.requestAnimationFrame((()=>this.updateSize(!1)))}}}!function(t){t.getElementDimensionSize=function(t,e){return"width"===e?function(t){return t.offsetWidth}(t):function(t){return t.offsetHeight}(t)},t.setElementDimensionSize=function(t,e,i){return"width"===e?Tt(t,i):At(t,i)},t.createElement=function(t,e){const i=t.createElement("div");return i.classList.add("lm_item"),e?i.classList.add("lm_column"):i.classList.add("lm_row"),i}}(Xt||(Xt={}));class Yt extends $t{constructor(t,e,i){super(t,vt.create(e),null,Yt.createElement(document)),this.isGround=!0,this._childElementContainer=this.element,this._containerElement=i;let n=null;for(;;){const t=n?n.previousSibling:this._containerElement.lastChild;if(!(t instanceof Element&&t.classList.contains("lm_content")))break;n=t}this._containerElement.insertBefore(this.element,n)}init(){if(!0!==this.isInitialised){this.updateNodeSize();for(let t=0;t0?this.contentItems[0]:this,n.isComponent)throw new Error("Cannot add item as child to ComponentItem");{const t=this.layoutManager.createAndInitContentItem(i,n);return e=n.addChild(t,e),n===this?-1:e}}loadComponentAsRoot(t){this.clearRoot();const e=Ct.resolve(t,!1);if(e.maximised)throw new Error("Root Component cannot be maximised");{const t=new jt(this.layoutManager,e,this);t.init(),this.addChild(t,0)}}addChild(t,e){if(this.contentItems.length>0)throw new Error("Ground node can only have a single child");return this._childElementContainer.appendChild(t.element),e=super.addChild(t,e),this.updateSize(!1),this.emitBaseBubblingEvent("stateChanged"),e}calculateConfigContent(){const t=this.contentItems,e=t.length,i=new Array(e);for(let n=0;n0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e)),this.updateContentItemsSize(!1))}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}createSideAreas(){const t=Yt.Area.oppositeSides,e=new Array(Object.keys(t).length);let i=0;for(const n in t){const o=n,s=this.getElementArea();if(null===s)throw new K("RCSA77553");s.side=o,"2"===t[o][1]?s[o]=s[t[o]]-50:s[o]=s[t[o]]+50,s.surface=(s.x2-s.x1)*(s.y2-s.y1),e[i++]=s}return e}highlightDropZone(t,e,i){this.layoutManager.tabDropPlaceholder.remove(),super.highlightDropZone(t,e,i)}onDrop(t,e){if(t.isComponent){const e=ut.createDefault(),i=t;e.header=mt.Header.createCopy(i.headerConfig);const n=this.layoutManager.createAndInitContentItem(e,this);n.addChild(t),t=n}if(0===this.contentItems.length)this.addChild(t);else{if(t.type===at.row||t.type===at.column){const e=ut.createDefault(),i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}const i="x"==e.side[0]?at.row:at.column,n="2"==e.side[1],o=this.contentItems[0];if(o instanceof Xt&&o.type===i){const e=o.contentItems[n?0:o.contentItems.length-1];o.addChild(t,n?0:void 0,!0),e.size*=.5,t.size=e.size,t.sizeUnit=ht.Percent,o.updateSize(!1)}else{const e=ct.createDefault(i),s=this.layoutManager.createContentItem(e,this);this.replaceChild(o,s),s.addChild(t,n?0:void 0,!0),s.addChild(o,n?void 0:0,!0),o.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}}dock(){throw new X("GID87731")}validateDocking(){throw new X("GIVD87732")}getAllContentItems(){const t=[this];return this.deepGetAllContentItems(this.contentItems,t),t}getConfigMaximisedItems(){const t=[];return this.deepFilterContentItems(this.contentItems,t,(t=>!(!Gt.isStack(t)||!t.initialWantMaximise)||!(!Gt.isComponentItem(t)||!t.initialWantMaximise))),t}getItemsByPopInParentId(t){const e=[];return this.deepFilterContentItems(this.contentItems,e,(e=>e.popInParentIds.includes(t))),e}toConfig(){throw new Error("Cannot generate GroundItem config")}setActiveComponentItem(t,e,i){}updateNodeSize(){const{width:t,height:e}=kt(this._containerElement);Tt(this.element,t),At(this.element,e),this.contentItems.length>0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e))}deepGetAllContentItems(t,e){for(let i=0;ithis.onClick(t),this._touchStartEventListener=t=>this.onTouchStart(t),this._element=document.createElement("div"),this._element.classList.add(i),this._element.title=e,this._header.on("destroy",(()=>this.destroy())),this._element.addEventListener("click",this._clickEventListener,{passive:!0}),this._element.addEventListener("touchstart",this._touchStartEventListener,{passive:!0}),this._header.controlsContainerElement.appendChild(this._element)}get element(){return this._element}destroy(){var t;this._element.removeEventListener("click",this._clickEventListener),this._element.removeEventListener("touchstart",this._touchStartEventListener),null===(t=this._element.parentNode)||void 0===t||t.removeChild(this._element)}onClick(t){this._pushEvent(t)}onTouchStart(t){this._pushEvent(t)}}class Jt{constructor(t,e,i,n,o){var s;this._layoutManager=t,this._componentItem=e,this._closeEvent=i,this._focusEvent=n,this._dragStartEvent=o,this._isActive=!1,this._tabClickListener=t=>this.onTabClickDown(t),this._tabTouchStartListener=t=>this.onTabTouchStart(t),this._closeClickListener=()=>this.onCloseClick(),this._closeTouchStartListener=()=>this.onCloseTouchStart(),this._dragStartListener=(t,e)=>this.onDragStart(t,e),this._contentItemDestroyListener=()=>this.onContentItemDestroy(),this._tabTitleChangedListener=t=>this.setTitle(t),this._element=document.createElement("div"),this._element.classList.add("lm_tab"),this._titleElement=document.createElement("span"),this._titleElement.classList.add("lm_title"),this._closeElement=document.createElement("div"),this._closeElement.classList.add("lm_close_tab"),this._element.appendChild(this._titleElement),this._element.appendChild(this._closeElement),e.isClosable?this._closeElement.style.display="":this._closeElement.style.display="none",this.setTitle(e.title),this._componentItem.on("titleChanged",this._tabTitleChangedListener);(null!==(s=e.reorderEnabled)&&void 0!==s?s:this._layoutManager.layoutConfig.settings.reorderEnabled)&&this.enableReorder(),this._element.addEventListener("click",this._tabClickListener,{passive:!0}),this._element.addEventListener("touchstart",this._tabTouchStartListener,{passive:!0}),this._componentItem.isClosable?(this._closeElement.addEventListener("click",this._closeClickListener,{passive:!0}),this._closeElement.addEventListener("touchstart",this._closeTouchStartListener,{passive:!0})):(this._closeElement.remove(),this._closeElement=void 0),this._componentItem.setTab(this),this._layoutManager.emit("tabCreated",this)}get isActive(){return this._isActive}get componentItem(){return this._componentItem}get contentItem(){return this._componentItem}get element(){return this._element}get titleElement(){return this._titleElement}get closeElement(){return this._closeElement}get reorderEnabled(){return void 0!==this._dragListener}set reorderEnabled(t){t!==this.reorderEnabled&&(t?this.enableReorder():this.disableReorder())}setTitle(t){this._titleElement.innerText=t,this._element.title=t}setActive(t){t!==this._isActive&&(this._isActive=t,t?this._element.classList.add("lm_active"):this._element.classList.remove("lm_active"))}destroy(){var t,e;this._closeEvent=void 0,this._focusEvent=void 0,this._dragStartEvent=void 0,this._element.removeEventListener("click",this._tabClickListener),this._element.removeEventListener("touchstart",this._tabTouchStartListener),null===(t=this._closeElement)||void 0===t||t.removeEventListener("click",this._closeClickListener),null===(e=this._closeElement)||void 0===e||e.removeEventListener("touchstart",this._closeTouchStartListener),this._componentItem.off("titleChanged",this._tabTitleChangedListener),this.reorderEnabled&&this.disableReorder(),this._element.remove()}setBlurred(){this._element.classList.remove("lm_focused"),this._titleElement.classList.remove("lm_focused")}setFocused(){this._element.classList.add("lm_focused"),this._titleElement.classList.add("lm_focused")}onDragStart(t,e){if(void 0===this._dragListener)throw new J("TODSDLU10093");if(void 0===this._dragStartEvent)throw new J("TODS23309");this._dragStartEvent(t,e,this._dragListener,this.componentItem)}onContentItemDestroy(){void 0!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=void 0)}onTabClickDown(t){const e=t.target;e!==this._element&&e!==this._titleElement||(0===t.button?this.notifyFocus():1===t.button&&this._componentItem.isClosable&&this.notifyClose())}onTabTouchStart(t){t.target===this._element&&this.notifyFocus()}onCloseClick(){this.notifyClose()}onCloseTouchStart(){this.notifyClose()}notifyClose(){if(void 0===this._closeEvent)throw new J("TNC15007");this._closeEvent(this._componentItem)}notifyFocus(){if(void 0===this._focusEvent)throw new J("TNA15007");this._focusEvent(this._componentItem)}enableReorder(){this._dragListener=new Zt(this._element,[this._titleElement]),this._dragListener.on("dragStart",this._dragStartListener),this._componentItem.on("destroy",this._contentItemDestroyListener)}disableReorder(){if(void 0===this._dragListener)throw new J("TDR87745");this._componentItem.off("destroy",this._contentItemDestroyListener),this._dragListener.off("dragStart",this._dragStartListener),this._dragListener=void 0}}class Qt{constructor(t,e,i,n,o){this._layoutManager=t,this._componentRemoveEvent=e,this._componentFocusEvent=i,this._componentDragStartEvent=n,this._dropdownActiveChangedEvent=o,this._tabs=[],this._lastVisibleTabIndex=-1,this._dropdownActive=!1,this._element=document.createElement("section"),this._element.classList.add("lm_tabs"),this._dropdownElement=document.createElement("section"),this._dropdownElement.classList.add("lm_tabdropdown_list"),this._dropdownElement.style.display="none"}get tabs(){return this._tabs}get tabCount(){return this._tabs.length}get lastVisibleTabIndex(){return this._lastVisibleTabIndex}get element(){return this._element}get dropdownElement(){return this._dropdownElement}get dropdownActive(){return this._dropdownActive}destroy(){for(let t=0;tthis.handleTabCloseEvent(t)),(t=>this.handleTabFocusEvent(t)),((t,e,i,n)=>this.handleTabDragStartEvent(t,e,i,n)));void 0===e&&(e=this._tabs.length),this._tabs.splice(e,0,i),ethis._lastVisibleTabIndex){const t=this._tabs[e];for(let t=e;t>0;t--)this._tabs[t]=this._tabs[t-1];this._tabs[0]=t}}updateTabSizes(t,e){let i=!1;this.tryUpdateTabSizes(i,t,e)||(i=!0,this.tryUpdateTabSizes(i,t,e)),i!==this._dropdownActive&&(this._dropdownActive=i,this._dropdownActiveChangedEvent())}tryUpdateTabSizes(t,e,i){if(this._tabs.length>0){if(void 0===i)throw new Error("non-empty tabs must have active component item");let n=0,o=!1;const s=this._layoutManager.layoutConfig.settings.tabOverlapAllowance,r=this._tabs.indexOf(i.tab),a=this._tabs[r];this._lastVisibleTabIndex=-1;for(let i=0;ie){if(o)i===r&&(l.style.zIndex="auto",l.style.marginLeft="",l.parentElement!==this._element&&this._element.appendChild(l));else{let t;if(t=r>0&&r<=i?(d-e)/(i-1):(d-e)/i,tthis.onClick(t),this._touchStartListener=t=>this.onTouchStart(t),this._rowColumnClosable=!0,this._closeButton=null,this._popoutButton=null,this._tabsContainer=new Qt(this._layoutManager,(t=>this.handleTabInitiatedComponentRemoveEvent(t)),(t=>this.handleTabInitiatedComponentFocusEvent(t)),((t,e,i,n)=>this.handleTabInitiatedDragStartEvent(t,e,i,n)),(()=>this.processTabDropdownActiveChanged())),this._show=i.show,this._popoutEnabled=i.popoutEnabled,this._popoutLabel=i.popoutLabel,this._maximiseEnabled=i.maximiseEnabled,this._maximiseLabel=i.maximiseLabel,this._minimiseEnabled=i.minimiseEnabled,this._minimiseLabel=i.minimiseLabel,this._closeEnabled=i.closeEnabled,this._closeLabel=i.closeLabel,this._tabDropdownEnabled=i.tabDropdownEnabled,this._tabDropdownLabel=i.tabDropdownLabel,this.setSide(i.side),this._canRemoveComponent=this._configClosable,this._element=document.createElement("section"),this._element.classList.add("lm_header"),this._controlsContainerElement=document.createElement("section"),this._controlsContainerElement.classList.add("lm_controls"),this._element.appendChild(this._tabsContainer.element),this._element.appendChild(this._controlsContainerElement),this._element.appendChild(this._tabsContainer.dropdownElement),this._element.addEventListener("click",this._clickListener,{passive:!0}),this._element.addEventListener("touchstart",this._touchStartListener,{passive:!0}),this._documentMouseUpListener=()=>this._tabsContainer.hideAdditionalTabsDropdown(),globalThis.document.addEventListener("mouseup",this._documentMouseUpListener,{passive:!0}),this._tabControlOffset=this._layoutManager.layoutConfig.settings.tabControlOffset,this._tabDropdownEnabled&&(this._tabDropdownButton=new Kt(this,this._tabDropdownLabel,"lm_tabdropdown",(()=>this._tabsContainer.showAdditionalTabsDropdown()))),this._popoutEnabled&&(this._popoutButton=new Kt(this,this._popoutLabel,"lm_popout",(()=>this.handleButtonPopoutEvent()))),this._maximiseEnabled&&(this._maximiseButton=new Kt(this,this._maximiseLabel,"lm_maximise",(t=>this.handleButtonMaximiseToggleEvent(t)))),this._configClosable&&(this._closeButton=new Kt(this,this._closeLabel,"lm_close",(()=>s()))),this.processTabDropdownActiveChanged()}get show(){return this._show}get side(){return this._side}get leftRightSided(){return this._leftRightSided}get layoutManager(){return this._layoutManager}get parent(){return this._parent}get tabs(){return this._tabsContainer.tabs}get lastVisibleTabIndex(){return this._tabsContainer.lastVisibleTabIndex}get element(){return this._element}get tabsContainerElement(){return this._tabsContainer.element}get controlsContainerElement(){return this._controlsContainerElement}destroy(){this.emit("destroy"),this._popoutEvent=void 0,this._maximiseToggleEvent=void 0,this._clickEvent=void 0,this._touchStartEvent=void 0,this._componentRemoveEvent=void 0,this._componentFocusEvent=void 0,this._componentDragStartEvent=void 0,this._tabsContainer.destroy(),globalThis.document.removeEventListener("mouseup",this._documentMouseUpListener),this._element.remove()}createTab(t,e){this._tabsContainer.createTab(t,e)}removeTab(t){this._tabsContainer.removeTab(t)}processActiveComponentChanged(t){this._tabsContainer.processActiveComponentChanged(t),this.updateTabSizes()}setSide(t){this._side=t,this._leftRightSided=[nt.right,nt.left].includes(this._side)}setRowColumnClosable(t){this._rowColumnClosable=t,this.updateClosability()}updateClosability(){let t;if(this._configClosable)if(this._rowColumnClosable){t=!0;const e=this.tabs.length;for(let i=0;i1}applyFocusedValue(t){t?this._element.classList.add("lm_focused"):this._element.classList.remove("lm_focused")}processMaximised(){if(void 0===this._maximiseButton)throw new J("HPMAX16997");this._maximiseButton.element.setAttribute("title",this._minimiseLabel)}processMinimised(){if(void 0===this._maximiseButton)throw new J("HPMIN16997");this._maximiseButton.element.setAttribute("title",this._maximiseLabel)}updateTabSizes(){if(this._tabsContainer.tabCount>0){const t=this._show?this._layoutManager.layoutConfig.dimensions.headerHeight:0;let e;this._leftRightSided?(this._element.style.height="",this._element.style.width=zt(t)):(this._element.style.width="",this._element.style.height=zt(t)),e=this._leftRightSided?this._element.offsetHeight-this._controlsContainerElement.offsetHeight-this._tabControlOffset:this._element.offsetWidth-this._controlsContainerElement.offsetWidth-this._tabControlOffset,this._tabsContainer.updateTabSizes(e,this._getActiveComponentItemEvent())}}handleTabInitiatedComponentRemoveEvent(t){if(this._canRemoveComponent){if(void 0===this._componentRemoveEvent)throw new J("HHTCE22294");this._componentRemoveEvent(t)}}handleTabInitiatedComponentFocusEvent(t){if(void 0===this._componentFocusEvent)throw new J("HHTAE22294");this._componentFocusEvent(t)}handleTabInitiatedDragStartEvent(t,e,i,n){if(this._canRemoveComponent){if(void 0===this._componentDragStartEvent)throw new J("HHTDSE22294");this._componentDragStartEvent(t,e,i,n)}else i.cancelDrag()}processTabDropdownActiveChanged(){void 0!==this._tabDropdownButton&&Dt(this._tabDropdownButton.element,this._tabsContainer.dropdownActive)}handleButtonPopoutEvent(){if(this._layoutManager.layoutConfig.settings.popoutWholeStack){if(void 0===this._popoutEvent)throw new J("HHBPOE17834");this._popoutEvent()}else{const t=this._getActiveComponentItemEvent();t&&t.popout()}}handleButtonMaximiseToggleEvent(t){if(void 0===this._maximiseToggleEvent)throw new J("HHBMTE16834");this._maximiseToggleEvent()}onClick(t){t.target===this._element&&this.notifyClick(t)}onTouchStart(t){t.target===this._element&&this.notifyTouchStart(t)}notifyClick(t){if(void 0===this._clickEvent)throw new J("HNHC46834");this._clickEvent(t)}notifyTouchStart(t){if(void 0===this._touchStartEvent)throw new J("HNHTS46834");this._touchStartEvent(t)}}class ee extends $t{constructor(t,e,i){var n,o,s,r,a,l,h,d,c,m,u,p,g,f,v,_,y,C,w;super(t,e,i,ee.createElement(document)),this._headerSideChanged=!1,this._resizeListener=()=>this.handleResize(),this._maximisedListener=()=>this.handleMaximised(),this._minimisedListener=()=>this.handleMinimised(),this._headerConfig=e.header;const I=t.layoutConfig.header,b=e.content;let S;if(1!==b.length)S=void 0;else{S=b[0].header}this._initialWantMaximise=e.maximised,this._initialActiveItemIndex=null!==(n=e.activeItemIndex)&&void 0!==n?n:0;const E=null!==(r=null!==(s=null===(o=this._headerConfig)||void 0===o?void 0:o.show)&&void 0!==s?s:null==S?void 0:S.show)&&void 0!==r?r:I.show,x=null!==(h=null!==(l=null===(a=this._headerConfig)||void 0===a?void 0:a.popout)&&void 0!==l?l:null==S?void 0:S.popout)&&void 0!==h?h:I.popout,L=null!==(m=null!==(c=null===(d=this._headerConfig)||void 0===d?void 0:d.maximise)&&void 0!==c?c:null==S?void 0:S.maximise)&&void 0!==m?m:I.maximise,z=null!==(g=null!==(p=null===(u=this._headerConfig)||void 0===u?void 0:u.close)&&void 0!==p?p:null==S?void 0:S.close)&&void 0!==g?g:I.close,M=null!==(_=null!==(v=null===(f=this._headerConfig)||void 0===f?void 0:f.minimise)&&void 0!==v?v:null==S?void 0:S.minimise)&&void 0!==_?_:I.minimise,P=null!==(w=null!==(C=null===(y=this._headerConfig)||void 0===y?void 0:y.tabDropdown)&&void 0!==C?C:null==S?void 0:S.tabDropdown)&&void 0!==w?w:I.tabDropdown;this._maximisedEnabled=!1!==L;const T={show:!1!==E,side:!1===E?nt.top:E,popoutEnabled:!1!==x,popoutLabel:!1===x?"":x,maximiseEnabled:this._maximisedEnabled,maximiseLabel:!1===L?"":L,closeEnabled:!1!==z,closeLabel:!1===z?"":z,minimiseEnabled:!0,minimiseLabel:M,tabDropdownEnabled:!1!==P,tabDropdownLabel:!1===P?"":P};this._header=new te(t,this,T,e.isClosable&&!1!==z,(()=>this.getActiveComponentItem()),(()=>this.remove()),(()=>this.handlePopoutEvent()),(()=>this.toggleMaximise()),(t=>this.handleHeaderClickEvent(t)),(t=>this.handleHeaderTouchStartEvent(t)),(t=>this.handleHeaderComponentRemoveEvent(t)),(t=>this.handleHeaderComponentFocusEvent(t)),((t,e,i,n)=>this.handleHeaderComponentStartDragEvent(t,e,i,n))),this.isStack=!0,this._childElementContainer=document.createElement("section"),this._childElementContainer.classList.add("lm_items"),this.on("resize",this._resizeListener),this._maximisedEnabled&&(this.on("maximised",this._maximisedListener),this.on("minimised",this._minimisedListener)),this.element.appendChild(this._header.element),this.element.appendChild(this._childElementContainer),this.setupHeaderPosition(),this._header.updateClosability()}get childElementContainer(){return this._childElementContainer}get header(){return this._header}get headerShow(){return this._header.show}get headerSide(){return this._header.side}get headerLeftRightSided(){return this._header.leftRightSided}get contentAreaDimensions(){return this._contentAreaDimensions}get initialWantMaximise(){return this._initialWantMaximise}get isMaximised(){return this===this.layoutManager.maximisedStack}get stackParent(){if(!this.parent)throw new Error("Stack should always have a parent");return this.parent}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}init(){if(!0===this.isInitialised)return;this.updateNodeSize();for(let t=0;t0){if(this._initialActiveItemIndex<0||this._initialActiveItemIndex>=e)throw new Error(`ActiveItemIndex out of range: ${this._initialActiveItemIndex} id: ${this.id}`);for(let i=0;ithis.contentItems.length)throw e-=1,new X("SAC99728");if(t instanceof jt)return e=super.addChild(t,e),this._childElementContainer.appendChild(t.element),this._header.createTab(t,e),this.setActiveComponentItem(t,i),this._header.updateTabSizes(),this.updateSize(!1),t.container.setBaseLogicalZIndex(),this._header.updateClosability(),this.emitStateChangedEvent(),e;throw new X("SACC88532")}removeChild(t,e){const i=t,n=this.contentItems.indexOf(i),o=1===this.contentItems.length;if(this._activeComponentItem===i&&(i.focused&&i.blur(),!o)){const t=0===n?1:n-1;this.setActiveComponentItem(this.contentItems[t],!1)}this._header.removeTab(i),super.removeChild(i,e),o||this._header.updateClosability(),this.emitStateChangedEvent()}toggleMaximise(){this.isMaximised?this.minimise():this.maximise()}maximise(){if(!this.isMaximised){this.layoutManager.setMaximisedStack(this);const t=this.contentItems,e=t.length;for(let i=0;i0&&void 0===t)throw new Error("expected non-empty stack to have an active component item");return{type:"stack",content:this.calculateConfigContent(),size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,isClosable:this.isClosable,maximised:this.isMaximised,header:this.createHeaderConfig(),activeItemIndex:t}}onDrop(t,e){if("header"===this._dropSegment){if(this.resetHeaderDropZone(),void 0===this._dropIndex)throw new J("SODDI68990");return void this.addChild(t,this._dropIndex)}if("body"===this._dropSegment)return void this.addChild(t,0,!0);const i="top"===this._dropSegment||"bottom"===this._dropSegment,n="left"===this._dropSegment||"right"===this._dropSegment,o="top"===this._dropSegment||"left"===this._dropSegment,s=i&&this.stackParent.isColumn||n&&this.stackParent.isRow;if(t.isComponent){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createAndInitContentItem(e,this);i.addChild(t),t=i}if(t.type===at.row||t.type===at.column){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}if(s){const e=this.stackParent.contentItems.indexOf(this);this.stackParent.addChild(t,o?e:e+1,!0),this.size*=.5,t.size=this.size,t.sizeUnit=this.sizeUnit,this.stackParent.updateSize(!1)}else{const e=i?at.column:at.row,n=ct.createDefault(e),s=this.layoutManager.createContentItem(n,this);this.stackParent.replaceChild(this,s),s.addChild(t,o?0:void 0,!0),s.addChild(this,o?void 0:0,!0),this.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}highlightDropZone(t,e){for(const i in this._contentAreaDimensions){const n=i,o=this._contentAreaDimensions[n].hoverArea;if(o.x1t&&o.y1e)return void("header"===n?(this._dropSegment="header",this.highlightHeaderDropZone(this._header.leftRightSided?e:t)):(this.resetHeaderDropZone(),this.highlightBodyDropZone(n)))}}getArea(){if("none"===this.element.style.display)return null;const t=super.getElementArea(this._header.element),e=super.getElementArea(this._childElementContainer);if(null===t||null===e)throw new K("SGAHC13086");const i=e.x2-e.x1,n=e.y2-e.y1;return this._contentAreaDimensions={header:{hoverArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2},highlightArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2}}},0===this.contentItems.length?(this._contentAreaDimensions.body={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2}},super.getElementArea(this.element)):(this._contentAreaDimensions.left={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x1+.25*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x1+.5*i,y2:e.y2}},this._contentAreaDimensions.top={hoverArea:{x1:e.x1+.25*i,y1:e.y1,x2:e.x1+.75*i,y2:e.y1+.5*n},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y1+.5*n}},this._contentAreaDimensions.right={hoverArea:{x1:e.x1+.75*i,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1+.5*i,y1:e.y1,x2:e.x2,y2:e.y2}},this._contentAreaDimensions.bottom={hoverArea:{x1:e.x1+.25*i,y1:e.y1+.5*n,x2:e.x1+.75*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1+.5*n,x2:e.x2,y2:e.y2}},super.getElementArea(this.element))}positionHeader(t){this._header.side!==t&&(this._header.setSide(t),this._headerSideChanged=!0,this.setupHeaderPosition())}updateNodeSize(){if("none"!==this.element.style.display){const t=kt(this.element);if(this._header.show){t[this._header.leftRightSided?it.width:it.height]-=this.layoutManager.layoutConfig.dimensions.headerHeight}this._childElementContainer.style.width=zt(t.width),this._childElementContainer.style.height=zt(t.height);for(let e=0;e=o&&tthis.onDrag(t,e,i))),this._dragListener.on("dragStop",(()=>this.onDrop())),this.createDragProxyElements(t,e),null===this._componentItem.parent)throw new K("DPC10097");this._componentItemFocused=this._componentItem.focused,this._componentItemFocused&&this._componentItem.blur(),this._componentItem.parent.removeChild(this._componentItem,!0),this.setDimensions(),document.body.appendChild(this._element),this.determineMinMaxXY(),this._layoutManager.calculateItemAreas(),this.setDropPosition(t,e)}get element(){return this._element}createDragProxyElements(t,e){this._element=document.createElement("div"),this._element.classList.add("lm_dragProxy");const i=document.createElement("div");i.classList.add("lm_header");const n=document.createElement("div");n.classList.add("lm_tabs");const o=document.createElement("div");o.classList.add("lm_tab");const s=document.createElement("span");s.classList.add("lm_title"),o.appendChild(s),n.appendChild(o),i.appendChild(n),this._proxyContainerElement=document.createElement("div"),this._proxyContainerElement.classList.add("lm_content"),this._element.appendChild(i),this._element.appendChild(this._proxyContainerElement),this._originalParent instanceof ee&&this._originalParent.headerShow&&(this._sided=this._originalParent.headerLeftRightSided,this._element.classList.add("lm_"+this._originalParent.headerSide),[nt.right,nt.bottom].indexOf(this._originalParent.headerSide)>=0&&this._proxyContainerElement.insertAdjacentElement("afterend",i)),this._element.style.left=zt(t),this._element.style.top=zt(e),o.setAttribute("title",this._componentItem.title),s.insertAdjacentText("afterbegin",this._componentItem.title),this._proxyContainerElement.appendChild(this._componentItem.element)}determineMinMaxXY(){const t=this._layoutManager.groundItem;if(void 0===t)throw new J("DPDMMXY73109");{const e=t.element.getBoundingClientRect();this._minX=e.left+document.body.scrollLeft,this._minY=e.top+document.body.scrollTop,this._maxX=this._minX+e.width,this._maxY=this._minY+e.height}}onDrag(t,e,i){const n=i.pageX,o=i.pageY;this.setDropPosition(n,o),this._componentItem.drag()}setDropPosition(t,e){this._layoutManager.layoutConfig.settings.constrainDragToContainer&&(t<=this._minX?t=Math.ceil(this._minX):t>=this._maxX&&(t=Math.floor(this._maxX)),e<=this._minY?e=Math.ceil(this._minY):e>=this._maxY&&(e=Math.floor(this._maxY))),this._element.style.left=zt(t),this._element.style.top=zt(e),this._area=this._layoutManager.getArea(t,e),null!==this._area&&(this._lastValidArea=this._area,this._area.contentItem.highlightDropZone(t,e,this._area))}onDrop(){const t=this._layoutManager.dropTargetIndicator;if(null===t)throw new K("DPOD30011");let e;if(t.hide(),this._componentItem.exitDragMode(),null!==this._area)e=this._componentItem,this._area.contentItem.onDrop(e,this._area);else if(null!==this._lastValidArea){e=this._componentItem;this._lastValidArea.contentItem.onDrop(e,this._lastValidArea)}else this._originalParent?(e=this._componentItem,this._originalParent.addChild(e)):this._componentItem.destroy();this._element.remove(),this._layoutManager.emit("itemDropped",this._componentItem),this._componentItemFocused&&void 0!==e&&e.focus()}setDimensions(){const t=this._layoutManager.layoutConfig.dimensions;if(void 0===t)throw new Error("DragProxy.setDimensions: dimensions undefined");let e=t.dragProxyWidth,i=t.dragProxyHeight;if(void 0===e||void 0===i)throw new Error("DragProxy.setDimensions: width and/or height undefined");const n=!1===this._layoutManager.layoutConfig.header.show?0:t.headerHeight;this._element.style.width=zt(e),this._element.style.height=zt(i),e-=this._sided?n:0,i-=this._sided?0:n,this._proxyContainerElement.style.width=zt(e),this._proxyContainerElement.style.height=zt(i),this._componentItem.enterDragMode(e,i),this._componentItem.show()}}class ne{constructor(t,e,i,n,o,s,r){this._layoutManager=t,this._element=e,this._extraAllowableChildTargets=i,this._componentTypeOrFtn=n,this._componentState=o,this._title=s,this._id=r,this._dragListener=null,this._dummyGroundContainer=document.createElement("div");const a=gt.createDefault("row");this._dummyGroundContentItem=new Yt(this._layoutManager,a,this._dummyGroundContainer),this.createDragListener()}destroy(){this.removeDragListener()}createDragListener(){this.removeDragListener(),this._dragListener=new Zt(this._element,this._extraAllowableChildTargets),this._dragListener.on("dragStart",((t,e)=>this.onDragStart(t,e))),this._dragListener.on("dragStop",(()=>this.onDragStop()))}onDragStart(t,e){var i;const n="component";let o;if("function"==typeof this._componentTypeOrFtn){const t=this._componentTypeOrFtn();o=ne.isDragSourceComponentItemConfig(t)?{type:n,componentState:t.state,componentType:t.type,title:null!==(i=t.title)&&void 0!==i?i:this._title}:t}else o={type:n,componentState:this._componentState,componentType:this._componentTypeOrFtn,title:this._title,id:this._id};const s=bt.resolve(o,!1),r=new jt(this._layoutManager,s,this._dummyGroundContentItem);if(this._dummyGroundContentItem.contentItems.push(r),null===this._dragListener)throw new K("DSODSD66746");{const i=new ie(t,e,this._dragListener,this._layoutManager,r,this._dummyGroundContentItem),n=this._layoutManager.transitionIndicator;if(null===n)throw new K("DSODST66746");n.transitionElements(this._element,i.element)}}onDragStop(){this.createDragListener()}removeDragListener(){null!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=null)}}!function(t){t.isDragSourceComponentItemConfig=function(t){return!("componentType"in t)}}(ne||(ne={}));class oe{constructor(){this._element=document.createElement("div"),this._element.classList.add("lm_dropTargetIndicator");const t=document.createElement("div");t.classList.add("lm_inner"),this._element.appendChild(t),document.body.appendChild(this._element)}destroy(){this._element.remove()}highlightArea(t,e){this._element.style.left=zt(t.x1+e),this._element.style.top=zt(t.y1+e),this._element.style.width=zt(t.x2-t.x1-e),this._element.style.height=zt(t.y2-t.y1-e),this._element.style.display="block"}hide(){Dt(this._element,!1)}}class se{constructor(){this._element=document.createElement("div"),this._element.classList.add("lm_transition_indicator"),document.body.appendChild(this._element),this._toElement=null,this._fromDimensions=null,this._totalAnimationDuration=200,this._animationStartTime=null}destroy(){this._element.remove()}transitionElements(t,e){}nextAnimationFrame(){}measure(t){const e=t.getBoundingClientRect();return{left:e.left,top:e.top,width:t.offsetWidth,height:t.offsetHeight}}}class re extends Wt{constructor(t){super(),this._layoutManager=t,this._childEventListener=t=>this.onEventFromChild(t),globalThis.addEventListener(re.ChildEventName,this._childEventListener,{passive:!0})}emit(t,...e){"userBroadcast"===t?this.emitUserBroadcast(...e):super.emit(t,...e)}emitUserBroadcast(...t){this.handleUserBroadcastEvent("userBroadcast",t)}destroy(){globalThis.removeEventListener(re.ChildEventName,this._childEventListener)}handleUserBroadcastEvent(t,e){this._layoutManager.isSubWindow?this.propagateToParent(t,e):this.propagateToThisAndSubtree(t,e)}onEventFromChild(t){const e=t.detail;this.handleUserBroadcastEvent(e.eventName,e.args)}propagateToParent(t,e){const i={bubbles:!0,cancelable:!0,detail:{layoutManager:this._layoutManager,eventName:t,args:e}},n=new CustomEvent(re.ChildEventName,i),o=globalThis.opener;if(null===o)throw new K("EHPTP15778");o.dispatchEvent(n)}propagateToThisAndSubtree(t,e){this.emitUnknown(t,...e);for(let i=0;ithis.handleContainerResize())),this._windowBeforeUnloadListener=()=>this.onBeforeUnload(),this._windowBeforeUnloadListening=!1,this._maximisedStackBeforeDestroyedListener=t=>this.cleanupBeforeMaximisedStackDestroyed(t),this.isSubWindow=t.isSubWindow,this._constructorOrSubWindowLayoutConfig=t.constructorOrSubWindowLayoutConfig,Q.checkInitialise(),dt.checkInitialise(),void 0!==t.containerElement&&(this._containerElement=t.containerElement)}get container(){return this._containerElement}get isInitialised(){return this._isInitialised}get groundItem(){return this._groundItem}get root(){return this._groundItem}get openPopouts(){return this._openPopouts}get dropTargetIndicator(){return this._dropTargetIndicator}get transitionIndicator(){return this._transitionIndicator}get width(){return this._width}get height(){return this._height}get eventHub(){return this._eventHub}get rootItem(){if(void 0===this._groundItem)throw new Error("Cannot access rootItem before init");return 0===this._groundItem.contentItems.length?void 0:this._groundItem.contentItems[0]}get focusedComponentItem(){return this._focusedComponentItem}get tabDropPlaceholder(){return this._tabDropPlaceholder}get maximisedStack(){return this._maximisedStack}get deprecatedConstructor(){return!this.isSubWindow&&void 0!==this._constructorOrSubWindowLayoutConfig}destroy(){if(this._isInitialised){this._windowBeforeUnloadListening&&(globalThis.removeEventListener("beforeunload",this._windowBeforeUnloadListener),this._windowBeforeUnloadListening=!1),!0===this.layoutConfig.settings.closePopoutsOnUnload&&this.closeAllOpenPopouts(),this._resizeObserver.disconnect(),this.checkClearResizeTimeout(),void 0!==this._groundItem&&this._groundItem.destroy(),this._tabDropPlaceholder.remove(),null!==this._dropTargetIndicator&&this._dropTargetIndicator.destroy(),null!==this._transitionIndicator&&this._transitionIndicator.destroy(),this._eventHub.destroy();for(const t of this._dragSources)t.destroy();this._dragSources=[],this._isInitialised=!1}}minifyConfig(t){return _t.minifyConfig(t)}unminifyConfig(t){return _t.unminifyConfig(t)}init(){let t;if(this.setContainer(),this._dropTargetIndicator=new oe,this._transitionIndicator=new se,this.updateSizeFromContainer(),this.isSubWindow){if(void 0===this._constructorOrSubWindowLayoutConfig)throw new J("LMIU07155");{const e=this._constructorOrSubWindowLayoutConfig.root;if(void 0===e)throw new X("LMIC07156");if(!Ct.isComponent(e))throw new X("LMIC07157");t=e;const i=xt.resolve(this._constructorOrSubWindowLayoutConfig);this.layoutConfig=Object.assign(Object.assign({},i),{root:void 0})}}else void 0===this._constructorOrSubWindowLayoutConfig?this.layoutConfig=_t.createDefault():this.layoutConfig=xt.resolve(this._constructorOrSubWindowLayoutConfig);const e=this.layoutConfig;this._groundItem=new Yt(this,e.root,this._containerElement),this._groundItem.init(),this.checkLoadedLayoutMaximiseItem(),this._resizeObserver.observe(this._containerElement),this._isInitialised=!0,this.adjustColumnsResponsive(),this.emit("initialised"),void 0!==t&&this.loadComponentAsRoot(t)}loadLayout(t){if(!this.isInitialised)throw new Error("GoldenLayout: Need to call init() if LayoutConfig with defined root passed to constructor");if(void 0===this._groundItem)throw new J("LMLL11119");this.createSubWindows(),this.layoutConfig=xt.resolve(t),this._groundItem.loadRoot(this.layoutConfig.root),this.checkLoadedLayoutMaximiseItem(),this.adjustColumnsResponsive()}saveLayout(){if(!1===this._isInitialised)throw new Error("Can't create config, layout not yet initialised");if(void 0===this._groundItem)throw new J("LMTC18244");{const t=this._groundItem.calculateConfigContent();let e;e=1!==t.length?void 0:t[0],this.reconcilePopoutWindows();const i=[];for(let t=0;t=0?n=this._groundItem.contentItems[0]:e=0;break;case at.row:case at.column:e=n.addItem(t,i.index);break;case at.stack:if(Ct.isComponent(t)){e=n.addItem(t,i.index);break}throw Error(tt[6]);case at.component:throw new X("LMAIALC87444602");default:throw new Y("LMAIALU98881733",n.type)}if(Ct.isComponent(t)){const t=n.contentItems[e];Gt.isStack(t)&&(n=t,e=0)}return i.parentItem=n,i.index=e,i}}}loadComponentAsRoot(t){if(void 0===this._groundItem)throw new Error("Cannot add item before init");this._groundItem.loadComponentAsRoot(t)}updateSize(t,e){this.setSize(t,e)}setSize(t,e){if(this._width=t,this._height=e,!0===this._isInitialised){if(void 0===this._groundItem)throw new J("LMUS18881");if(this._groundItem.setSize(this._width,this._height),this._maximisedStack){const{width:t,height:e}=kt(this._containerElement);Tt(this._maximisedStack.element,t),At(this._maximisedStack.element,e),this._maximisedStack.updateSize(!1)}this.adjustColumnsResponsive()}}beginSizeInvalidation(){this._sizeInvalidationBeginCount++}endSizeInvalidation(){0==--this._sizeInvalidationBeginCount&&this.updateSizeFromContainer()}updateSizeFromContainer(){const{width:t,height:e}=kt(this._containerElement);this.setSize(t,e)}updateRootSize(t=!1){if(void 0===this._groundItem)throw new J("LMURS28881");this._groundItem.updateSize(t)}createAndInitContentItem(t,e){const i=this.createContentItem(t,e);return i.init(),i}createContentItem(t,e){if("string"!=typeof t.type)throw new G("Missing parameter 'type'",JSON.stringify(t));if(ct.isComponentItem(t)&&!(e instanceof ee)&&e&&!(!0===this.isSubWindow&&e instanceof Yt)){t={type:at.stack,content:[t],size:t.size,sizeUnit:t.sizeUnit,minSize:t.minSize,minSizeUnit:t.minSizeUnit,id:t.id,maximised:t.maximised,isClosable:t.isClosable,activeItemIndex:0,header:void 0}}return this.createContentItemFromConfig(t,e)}findFirstComponentItemById(t){if(void 0===this._groundItem)throw new J("LMFFCIBI82446");return this.findFirstContentItemTypeByIdRecursive(at.component,t,this._groundItem)}createPopout(t,e,i,n){return t instanceof Gt?this.createPopoutFromContentItem(t,e,i,n):this.createPopoutFromItemConfig(t,e,i,n)}createPopoutFromContentItem(t,e,i,n){let o=t.parent,s=t;for(;null!==o&&1===o.contentItems.length&&!o.isGround;)s=o,o=o.parent;if(null===o)throw new K("LMCPFCI00834");{if(void 0===n&&(n=o.contentItems.indexOf(s)),null!==i&&o.addPopInParentId(i),void 0===e){const i=globalThis.screenX||globalThis.screenLeft,n=globalThis.screenY||globalThis.screenTop,o=t.element.offsetLeft,s=t.element.offsetTop,{width:r,height:a}=kt(t.element);e={left:i+o,top:n+s,width:r,height:a}}const r=t.toConfig();if(t.remove(),ft.isRootItemConfig(r))return this.createPopoutFromItemConfig(r,e,i,n);throw new Error(`${tt[0]}`)}}beginVirtualSizedContainerAdding(){0==++this._virtualSizedContainerAddingBeginCount&&(this._virtualSizedContainers.length=0)}addVirtualSizedContainer(t){this._virtualSizedContainers.push(t)}endVirtualSizedContainerAdding(){if(0==--this._virtualSizedContainerAddingBeginCount){const t=this._virtualSizedContainers.length;if(t>0){this.fireBeforeVirtualRectingEvent(t);for(let e=0;ethis.emit("windowOpened",a))),a.on("closed",(()=>this.reconcilePopoutWindows())),this._openPopouts.push(a),this.layoutConfig.settings.closePopoutsOnUnload&&!this._windowBeforeUnloadListening&&(globalThis.addEventListener("beforeunload",this._windowBeforeUnloadListener,{passive:!0}),this._windowBeforeUnloadListening=!0),a}closeAllOpenPopouts(){for(let t=0;tglobalThis.close()),1)}getArea(t,e){let i=null,n=1/0;for(let o=0;o=s.x1&&t=s.y1&&es.surface&&(n=s.surface,i=s)}return i}calculateItemAreas(){const t=this.getAllContentItems(),e=this._groundItem;if(void 0===e)throw new J("LMCIAR44365");if(1!==t.length){e.contentItems[0].isStack?this._itemAreas=[]:this._itemAreas=e.createSideAreas();for(let e=0;e0){let e=t[0];if(Gt.isComponentItem(e)){const t=e.parent;if(null===t)throw new K("LMXLLMI69999");e=t}if(!Gt.isStack(e))throw new X("LMCLLMI19993");e.maximise()}}}processMaximiseStack(t){if(this._maximisedStack=t,t.on("beforeItemDestroyed",this._maximisedStackBeforeDestroyedListener),t.element.classList.add("lm_maximised"),t.element.insertAdjacentElement("afterend",this._maximisePlaceholder),void 0===this._groundItem)throw new J("LMMXI19993");{this._groundItem.element.prepend(t.element);const{width:e,height:i}=kt(this._containerElement);Tt(t.element,e),At(t.element,i),t.updateSize(!0),t.focusActiveContentItem(),this._maximisedStack.emit("maximised"),this.emit("stateChanged")}}processMinimiseMaximisedStack(){if(void 0===this._maximisedStack)throw new X("LMMMS74422");{const t=this._maximisedStack;if(null===t.parent)throw new K("LMMI13668");t.element.classList.remove("lm_maximised"),this._maximisePlaceholder.insertAdjacentElement("afterend",t.element),this._maximisePlaceholder.remove(),this.updateRootSize(!0),this._maximisedStack=void 0,t.off("beforeItemDestroyed",this._maximisedStackBeforeDestroyedListener),t.emit("minimised"),this.emit("stateChanged")}}reconcilePopoutWindows(){const t=[];for(let e=0;e{this._resizeTimeoutId=void 0,this.beginSizeInvalidation(),this.endSizeInvalidation()}),this.resizeDebounceInterval))}checkClearResizeTimeout(){void 0!==this._resizeTimeoutId&&(clearTimeout(this._resizeTimeoutId),this._resizeTimeoutId=void 0)}setContainer(){var t;const e=document.body,i=null!==(t=this._containerElement)&&void 0!==t?t:e;if(i===e){this.resizeWithContainerAutomatically=!0;const t=document.documentElement;t.style.height="100%",t.style.margin="0",t.style.padding="0",t.style.overflow="clip",e.style.height="100%",e.style.margin="0",e.style.padding="0",e.style.overflow="clip"}this._containerElement=i}onBeforeUnload(){this.destroy()}adjustColumnsResponsive(){if(void 0===this._groundItem)throw new J("LMACR20883");if(this._firstLoad=!1,this.useResponsiveLayout()&&!this._updatingColumnsResponsive&&this._groundItem.contentItems.length>0&&this._groundItem.contentItems[0].isRow){if(void 0===this._groundItem||null===this._width)throw new J("LMACR77412");{const t=this._groundItem.contentItems[0].contentItems.length;if(t<=1)return;{const e=this.layoutConfig.dimensions.defaultMinItemWidth;if(t*e<=this._width)return;{this._updatingColumnsResponsive=!0;const i=t-Math.max(Math.floor(this._width/e),1),n=this._groundItem.contentItems[0],o=this.getAllStacks();if(0===o.length)throw new X("LMACRS77413");{const t=o[0];for(let e=0;en?void 0:{parentItem:t,index:o}}}case 1:if(void 0===this._focusedComponentItem)return;{const t=this._focusedComponentItem.parentItem;return this.tryCreateLocationFromParentItem(t,e)}case 2:{const t=this.findFirstContentItemType(at.stack);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 3:{let t=this.findFirstContentItemType(at.row);return void 0!==t?this.tryCreateLocationFromParentItem(t,e):(t=this.findFirstContentItemType(at.column),void 0!==t?this.tryCreateLocationFromParentItem(t,e):void 0)}case 4:{const t=this.findFirstContentItemType(at.row);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 5:{const t=this.findFirstContentItemType(at.column);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 6:if(void 0===this._groundItem)throw new J("LMFLRIF18244");return void 0!==this.rootItem?void 0:void 0===e||0===e?{parentItem:this._groundItem,index:0}:void 0;case 7:if(void 0===this._groundItem)throw new J("LMFLF18244");{const t=this._groundItem.contentItems;if(0===t.length)return void 0===e||0===e?{parentItem:this._groundItem,index:0}:void 0;{const i=t[0];return this.tryCreateLocationFromParentItem(i,e)}}}}tryCreateLocationFromParentItem(t,e){const i=t.contentItems.length;return void 0===e?{parentItem:t,index:i}:e<0||e>i?void 0:{parentItem:t,index:e}}}!function(t){t.createMaximisePlaceElement=function(t){const e=t.createElement("div");return e.classList.add("lm_maximise_place"),e},t.createTabDropPlaceholderElement=function(t){const e=t.createElement("div");return e.classList.add("lm_drop_tab_placeholder"),e},t.defaultLocationSelectors=[{typeId:1,index:void 0},{typeId:2,index:void 0},{typeId:3,index:void 0},{typeId:7,index:void 0}],t.afterFocusedItemIfPossibleLocationSelectors=[{typeId:0,index:1},{typeId:2,index:void 0},{typeId:3,index:void 0},{typeId:7,index:void 0}]}(ae||(ae={}));class le extends ae{constructor(t,e,i,n){if(super(le.createLayoutManagerConstructorParameters(t,e)),this._bindComponentEventHanlderPassedInConstructor=!1,this._creationTimeoutPassed=!1,void 0!==e&&"function"==typeof e&&(this.bindComponentEvent=e,this._bindComponentEventHanlderPassedInConstructor=!0,void 0!==i&&(this.unbindComponentEvent=i)),!this._bindComponentEventHanlderPassedInConstructor&&this.isSubWindow){if(void 0===this._constructorOrSubWindowLayoutConfig)throw new J("VLC98823");{const t=xt.resolve(this._constructorOrSubWindowLayoutConfig);this.layoutConfig=Object.assign(Object.assign({},t),{root:void 0})}}!0!==n&&(this.deprecatedConstructor||this.init())}destroy(){this.bindComponentEvent=void 0,this.unbindComponentEvent=void 0,super.destroy()}init(){if(this._bindComponentEventHanlderPassedInConstructor||"loading"!==document.readyState&&null!==document.body){if(!this._bindComponentEventHanlderPassedInConstructor&&!0===this.isSubWindow&&!this._creationTimeoutPassed)return setTimeout((()=>this.init()),7),void(this._creationTimeoutPassed=!0);!0===this.isSubWindow&&(this._bindComponentEventHanlderPassedInConstructor||this.clearHtmlAndAdjustStylesForSubWindow(),window.__glInstance=this),super.init()}else document.addEventListener("DOMContentLoaded",(()=>this.init()),{passive:!0})}clearHtmlAndAdjustStylesForSubWindow(){const t=document.head,e=new Array(4);e[0]=document.querySelectorAll("body link"),e[1]=document.querySelectorAll("body style"),e[2]=document.querySelectorAll("template"),e[3]=document.querySelectorAll(".gl_keep");for(let i=0;ithis.emit("popIn"))),document.body.appendChild(t),!0}}bindComponent(t,e){if(void 0!==this.bindComponentEvent){return this.bindComponentEvent(t,e)}if(void 0!==this.getComponentEvent)return{virtual:!1,component:this.getComponentEvent(t,e)};{const t=`${tt[2]}: ${JSON.stringify(e)}`;throw new Z(t)}}unbindComponent(t,e,i){if(void 0!==this.unbindComponentEvent)this.unbindComponentEvent(t);else if(!e&&void 0!==this.releaseComponentEvent){if(void 0===i)throw new J("VCUCRCU333998");this.releaseComponentEvent(t,i)}}}!function(t){let e=!1;t.createLayoutManagerConstructorParameters=function(t,i){const n=e?null:new URL(document.location.href).searchParams.get("gl-window");e=!0;const o=null!==n;let s,r;if(null!==n){const e=localStorage.getItem(n);if(null===e)throw new Error("Null gl-window Config");localStorage.removeItem(n);const i=JSON.parse(e),o=_t.unminifyConfig(i);r=xt.fromResolved(o),t instanceof HTMLElement&&(s=t)}else void 0===t?r=void 0:t instanceof HTMLElement?(r=void 0,s=t):r=t,void 0===s&&i instanceof HTMLElement&&(s=i);return{constructorOrSubWindowLayoutConfig:r,isSubWindow:o,containerElement:s}}}(le||(le={}));class he extends le{constructor(t,e,i){super(t,e,i,!0),this._componentTypesMap=new Map,this._registeredComponentMap=new Map,this._virtuableComponentMap=new Map,this._containerVirtualRectingRequiredEventListener=(t,e,i)=>this.handleContainerVirtualRectingRequiredEvent(t,e,i),this._containerVirtualVisibilityChangeRequiredEventListener=(t,e)=>this.handleContainerVirtualVisibilityChangeRequiredEvent(t,e),this._containerVirtualZIndexChangeRequiredEventListener=(t,e,i)=>this.handleContainerVirtualZIndexChangeRequiredEvent(t,e,i),this.deprecatedConstructor||this.init()}registerComponent(t,e,i=!1){if("function"!=typeof e)throw new $("registerComponent() componentConstructorOrFactoryFtn parameter is not a function");if(e.hasOwnProperty("prototype")){const n=e;this.registerComponentConstructor(t,n,i)}else{const n=e;this.registerComponentFactoryFunction(t,n,i)}}registerComponentConstructor(t,e,i=!1){if("function"!=typeof e)throw new Error(tt[1]);if(void 0!==this._componentTypesMap.get(t))throw new Z(`${tt[3]}: ${t}`);this._componentTypesMap.set(t,{constructor:e,factoryFunction:void 0,virtual:i})}registerComponentFactoryFunction(t,e,i=!1){if("function"!=typeof e)throw new Z("Please register a constructor function");if(void 0!==this._componentTypesMap.get(t))throw new Z(`${tt[3]}: ${t}`);this._componentTypesMap.set(t,{constructor:void 0,factoryFunction:e,virtual:i})}registerComponentFunction(t){this.registerGetComponentConstructorCallback(t)}registerGetComponentConstructorCallback(t){if("function"!=typeof t)throw new Error("Please register a callback function");void 0!==this._getComponentConstructorFtn&&console.warn("Multiple component functions are being registered. Only the final registered function will be used."),this._getComponentConstructorFtn=t}getRegisteredComponentTypeNames(){const t=this._componentTypesMap.keys();return Array.from(t)}getComponentInstantiator(t){let e;const i=pt.resolveComponentTypeName(t);return void 0!==i&&(e=this._componentTypesMap.get(i)),void 0===e&&void 0!==this._getComponentConstructorFtn&&(e={constructor:this._getComponentConstructorFtn(t),factoryFunction:void 0,virtual:!1}),e}bindComponent(t,e){let i;const n=pt.resolveComponentTypeName(e);let o;if(void 0!==n&&(i=this._componentTypesMap.get(n)),void 0===i&&void 0!==this._getComponentConstructorFtn&&(i={constructor:this._getComponentConstructorFtn(e),factoryFunction:void 0,virtual:!1}),void 0!==i){const s=i.virtual;let r,a;r=void 0===e.componentState?void 0:Ut({},e.componentState);const l=i.constructor;if(void 0!==l)a=new l(t,r,s);else{const e=i.factoryFunction;if(void 0===e)throw new X("LMBCFFU10008");a=e(t,r,s)}if(s){if(void 0===a)throw new J("GLBCVCU988774");{const e=a,i=e.rootHtmlElement;if(void 0===i)throw new Z(`${tt[5]}: ${n}`);!function(t){const e="absolute";t.style.position!==e&&(t.style.position=e)}(i),this.container.appendChild(i),this._virtuableComponentMap.set(t,e),t.virtualRectingRequiredEvent=this._containerVirtualRectingRequiredEventListener,t.virtualVisibilityChangeRequiredEvent=this._containerVirtualVisibilityChangeRequiredEventListener,t.virtualZIndexChangeRequiredEvent=this._containerVirtualZIndexChangeRequiredEventListener}}this._registeredComponentMap.set(t,a),o={virtual:i.virtual,component:a}}else o=super.bindComponent(t,e);return o}unbindComponent(t,e,i){if(void 0===this._registeredComponentMap.get(t))super.unbindComponent(t,e,i);else{const e=this._virtuableComponentMap.get(t);if(void 0!==e){const i=e.rootHtmlElement;if(void 0===i)throw new X("GLUC77743",t.title);this.container.removeChild(i),this._virtuableComponentMap.delete(t)}}}fireBeforeVirtualRectingEvent(t){this._goldenLayoutBoundingClientRect=this.container.getBoundingClientRect(),super.fireBeforeVirtualRectingEvent(t)}handleContainerVirtualRectingRequiredEvent(t,e,i){const n=this._virtuableComponentMap.get(t);if(void 0===n)throw new J("GLHCSCE55933");{const o=n.rootHtmlElement;if(void 0===o)throw new Z(tt[4]+" "+t.title);{const n=t.element.getBoundingClientRect(),s=n.left-this._goldenLayoutBoundingClientRect.left;o.style.left=zt(s);const r=n.top-this._goldenLayoutBoundingClientRect.top;o.style.top=zt(r),Tt(o,e),At(o,i)}}}handleContainerVirtualVisibilityChangeRequiredEvent(t,e){const i=this._virtuableComponentMap.get(t);if(void 0===i)throw new J("GLHCVVCRE55934");{const n=i.rootHtmlElement;if(void 0===n)throw new Z(tt[4]+" "+t.title);Dt(n,e)}}handleContainerVirtualZIndexChangeRequiredEvent(t,e,i){const n=this._virtuableComponentMap.get(t);if(void 0===n)throw new J("GLHCVZICRE55935");{const e=n.rootHtmlElement;if(void 0===e)throw new Z(tt[4]+" "+t.title);e.style.zIndex=i}}}const de="initial_",ce={show:"top",popout:!1,maximise:!1,close:"close-tab-unused"},me={headerHeight:31},ue={hasHeaders:!0,reorderEnabled:!0},pe={popoutWholeStack:!1,constrainDragToContainer:!1,constrainDragToHeaders:!1,preventDragout:!1,showMaximiseIcon:!1,showPopoutIcon:!1,showCloseIcon:!1,blockedPopoutsThrowError:!0,closePopoutsOnUnload:!0,selectionEnabled:!1};var ge,fe;class ve{constructor(e){this.layout=e,ge.set(this,void 0),fe.set(this,void 0),this.handleResize=t=>{t.forEach((t=>this.resizeElement(t.target)))},this.handleMutation=()=>{this.layout.viewComponentsByContainerElement.forEach((t=>{this.resizeElement(t.container.element)}))},t.__classPrivateFieldSet(this,ge,new ResizeObserver(this.handleResize),"f"),t.__classPrivateFieldSet(this,fe,new MutationObserver(this.handleMutation),"f")}observeMutations(e){t.__classPrivateFieldGet(this,fe,"f")?.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["class"]})}destroy(){t.__classPrivateFieldGet(this,ge,"f").disconnect(),t.__classPrivateFieldGet(this,fe,"f").disconnect()}observeContainer(e){t.__classPrivateFieldGet(this,ge,"f").observe(e)}unobserveContainer(e){t.__classPrivateFieldGet(this,ge,"f").unobserve(e)}resizeElement(t){const e=this.layout.viewComponentsByContainerElement.get(t);e&&e.resize()}}ge=new WeakMap,fe=new WeakMap;var _e={};Object.defineProperty(_e,"__esModule",{value:!0});var ye=_e.BaseItem=void 0;class Ce{constructor(t,e,i){this._item=t,this._layout=e,this._wrap=i}get raw(){return this._item}get layout(){return this._layout}get type(){return this._item.type}get contentItems(){return(this._item.contentItems??[]).map((t=>this._wrap(t)))}get parent(){const t=this._item.parent;return t?this._wrap(t):null}setActiveContentItem(t,e){if("stack"!==this.type)throw new Error(`Cannot call setActiveContentItem from a non-stack item: ${this.type}`);this._item.setActiveContentItem(t.raw,e)}static wrapInternal(t,e,i){const n=Ce.wrapCache.get(e);if(n)return n;const o=new t(e,i,(e=>Ce.wrapInternal(t,e,i)));return Ce.wrapCache.set(e,o),o}}ye=_e.BaseItem=Ce,Ce.wrapCache=new WeakMap;const we=t=>!!t&&"contentItems"in t&&(t.isRow||t.isColumn);class Ie extends ye{isRoot(){return!!this._item.parent?.isGround}getBounds(){return this._item.element.getBoundingClientRect()}get viewName(){if(this._item.isComponent){const{component:t}=this._item;return t.identity.name}throw new Error("View name not found")}onDestroyed(t){const e=({target:i})=>{i===this._item&&(t(),this._item.off("itemDestroyed",e))};this._item.on("itemDestroyed",e)}createAdjacentStack({position:t="right"}={}){const e=this.raw;if(ee.isStack(e)&&e.parent){const i=["top","bottom"].includes(t)?"column":"row",n=["left","top"].includes(t)?1:0,o=we(e.parent)?e.parent:e.layoutManager,s=o,r=e.parent.contentItems.indexOf(e);e.parent.isGround&&e.parent.removeChild(e,!0);const a=o.newItem({type:i,content:[{type:"stack",content:[]}]},r);if(!a)throw new Error("createAdjacentStack: Failed to create new container");const l=a.contentItems[0];return a.addChild(this.raw,n),we(s)&&s.removeChild(e,!0),this._wrap(l)}throw new Error(`Cannot creat adjacent stacks for type: ${e.type}, must be type 'stack'`)}setActiveContentItem(t,e=!0){if(!ee.isStack(this._item))throw new Error(`Cannot call setActiveContentItem from a non-stack item: ${this.type}`);this._item.setActiveComponentItem(t.raw,!e)}static wrap(t,e){return ye.wrapInternal(Ie,t,e)}}function be(t=[],e){for(const i of t)"component"===i.type?Object.keys(e).forEach((t=>{t in i&&(i.componentState={[`${de}${t}`]:i[t],...i.componentState}),i[t]=e[t]})):be(i.content,e)}function Se(t=[],e,i){for(const n of t)if("component"===n.type)Object.keys(e).forEach((t=>{if(`${de}${t}`in n.componentState)return n[t]=n.componentState[`${de}${t}`],void delete n.componentState[`${de}${t}`];n[t]=e[t]}));else{if(n.size&&("row"===i||"column"===i)){n["row"===i?"width":"height"]=n.size?.includes(".")?parseFloat(n.size):parseInt(n.size)}Se(n.content,e,n.type)}}function Ee(t){if(t.root){t.root.content&&Se([t.root],{componentName:"view",isClosable:!0});const e=t.root;t.content=[e],delete t.root}return t}const xe=e=>class extends e{connectedCallback(){if(!this.name||!this.uuid)throw new Error(" Name or uuid attribute missing");if(!this.src)throw new Error(" missing 'src' attribute.");this.#t||(this.#t=document.createElement("iframe"),this.#t.src=this.src,this.#t.style.height="100%",this.#t.style.width="100%",this.#t.style.border="none",this.forceFrameName?this.#t.setAttribute("name",this.forceFrameName):this.#t.setAttribute("name",t.encodeOptions({brokerUrl:this.brokerUrl,name:this.name,uuid:this.uuid,providerId:this.providerId,contextGroup:this.contextGroup},"of-frame")),this.#t.setAttribute("id",this.name),this.appendChild(this.#t))}#t;get brokerUrl(){return this.getAttribute("of-broker")}set brokerUrl(t){t&&this.setAttribute("of-broker",t)}get name(){return this.getAttribute("of-name")}set name(t){t&&this.setAttribute("of-name",t)}get forceFrameName(){return this.getAttribute("forceFrameName")}set forceFrameName(t){t&&this.setAttribute("forceFrameName",t)}get uuid(){return this.getAttribute("of-uuid")}set uuid(t){t&&this.setAttribute("of-uuid",t)}get src(){return this.getAttribute("src")}set src(t){t&&this.setAttribute("src",t)}get providerId(){return this.getAttribute("of-provider-id")}set providerId(t){t&&this.setAttribute("of-provider-id",t)}get contextGroup(){return this.getAttribute("of-context-group")}set contextGroup(t){t&&this.setAttribute("of-context-group",t)}static get observedAttributes(){return["name"]}};class Le{static create(t){const e=document.createElement("of-view");return Object.entries(t).forEach((([t,i])=>{e.setAttribute(t,i)})),e}}customElements.define("of-view",xe(HTMLElement));class ze{constructor(t,i,n,{brokerUrl:o,interopConfig:s},r){this.container=t,this.config=i,this.ofView=null,this.isDragging=()=>this.container.tab.element?.className.includes("lm_dragging")??!1;const{url:a,web:l,interop:h,name:d}=i||{},c=d??`internal-generated-view-${e.v4()}`;if(this.identity={uuid:n,name:c},this.container.element.setAttribute("of-name",c),this.container.element.id=`container-${c}`,this.container.parent.id=c,void 0===a)return void this.handleUrlMissing();const m=this.updateTitleIfNotSet(a),u={"of-broker":o,"of-uuid":n,"of-name":c,src:a};l?.frameName&&(u.forceFrameName=l.frameName);const p=h?.currentContextGroup??s?.currentContextGroup;p&&(u["of-context-group"]=p),s?.providerId&&(u["of-provider-id"]=s?.providerId),this.ofView=Le.create(u),this.ofView.title=m??`Iframe: ${a}`,r.appendChild(this.ofView),this.ofView.style.position="absolute"}updateTitleIfNotSet(t){return"view"===this.container.parent.title&&this.container.parent.setTitle(t),this.container.parent.title}handleUrlMissing(){const t=document.createElement("div");t.setAttribute("style","padding: 20px");t.innerText="No URL provided",this.container.element.appendChild(t)}destroy(){this.ofView?.remove(),this.ofView=null}closeView(){this.container.close()}resize(){if(this.ofView){if(this.isDragging())return void(this.ofView.style.display="none");const t=this.container.element.getBoundingClientRect();this.ofView.style.position="absolute",this.ofView.style.height=`${t.height}px`,this.ofView.style.width=`${t.width}px`,this.ofView.style.inset=`${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`,this.ofView.style.display="block"}}}class Me extends U{static overrideConfig(t){const e={...ue,...t.settings,...pe};return e.reorderEnabled?be(t.content,{isClosable:!0}):be(t.content,{reorderEnabled:!1}),{dimensions:me,...t,settings:e,header:{...ce,show:!1!==t.settings?.hasHeaders&&ce.show}}}constructor(t,e,i,{options:n},o,s){super(),this.identity=t,this.container=e,this.initialConfig=i,this.layoutManager=o,this.platformProvider=s,this.viewComponentsByContainerElement=new Map,this.layoutContentCache=_.getSingleInstance(),this.reparentingViews=new Set,this.goldenLayoutDestroyed=!1,this.createViewComponent=(t,e)=>{m.handleSharedView(this.layoutManager,this.identity,e);const i=new ze(t,e,this.identity.uuid,this.options,this.iframeContainer);return e&&!1===e[`${de}isClosable`]&&this.stylesheet.insertRule(`#tab-${i.identity.name} .lm_close_tab { display: none; }`),this.viewComponentsByContainerElement.set(t.element,i),this.resizeController.observeContainer(t.element),i},this.iframeContainer=document.createElement("div"),this.iframeContainer.id=`openfin-layout-iframe-container-${this.identity.layoutName}`,this.domEmitter=new V(e),this.setupStylesheets(),this.layout=new he(this.container),this.layout.resizeWithContainerAutomatically=!0,this.options=n,this.layout.registerComponent("view",this.createViewComponent),this.setupListeners(),this.resizeController=new ve(this),this.layout.loadLayout(Me.overrideConfig(i));const r=document.createElement("div");r.id=`openfin-layout-shadow-container-${this.identity.layoutName}`,r.attachShadow({mode:"open",delegatesFocus:!1}).appendChild(this.iframeContainer),this.container.appendChild(r),this.resizeController.observeMutations(this.container)}getStackByView({name:t}){const e=this.layout.findFirstComponentItemById(t);if(e?.parent&&e?.parent?.isStack)return Ie.wrap(e.parent,this)}getRoot(){return Ie.wrap(this.layout.rootItem,this)}async platformCloseView(t){const e=[...this.viewComponentsByContainerElement.values()].find((e=>e.identity.name===t.name));if(!e)throw new Error(`View with name: ${t.name} not found in layout.`);e.closeView()}async platformCreateView(t,{location:e,targetView:i}={}){if(i)throw new Error("TargetView not supported in web");const n={options:this.platformProvider.normalizeOptions(t),target:this.identity,location:e};return this.insertView(n)}setupStylesheets(){if(this.container.setAttribute("data-openfin-layout-name",this.identity.layoutName),this.stylesheet=new CSSStyleSheet,this.stylesheet.insertRule(".lm_close { display: none; }"),document.adoptedStyleSheets.push(this.stylesheet),this.initialConfig.settings?.preventSplitterResize){const t=`\n [data-openfin-layout-name='${this.identity.layoutName}'] .lm_splitter {\n pointer-events: none;\n }`;this.stylesheet.insertRule(t)}}insertView({options:t,location:e,targetView:i}){const n=e?this.layoutContentCache.getItemOrUndefined(e.id):void 0,o=i?this.layoutContentCache.getItemOrUndefined(i.name):void 0,s=n??o??Ie.wrap(this.layout.rootItem,this);let r;if(ee.isStack(s.raw))r=s.raw;else{if(!we(s.raw))throw new Error("Cannot add a view at the requested location");r=s.raw.newItem({type:"stack",content:[]})}const a=Math.min(r.contentItems.length,e?.index??r.contentItems.length);let l=this.layout.findFirstComponentItemById(t.name);l?(l.parent&&l.parent.removeChild(l,!0),r.addChild(l,a)):l=r.newComponent("view",t,t.title??t.url??"Default Title",a);const h=l.component.identity;return Promise.resolve({identity:h})}replaceView({viewToReplace:t,newView:e}){throw new Error("Method not implemented.")}replaceLayout(t){throw new Error("Method not implemented.")}async cleanupView(t){}applyPreset(t){throw new Error("Method not implemented.")}getCurrentViews(){return[...this.viewComponentsByContainerElement.values()].map((t=>t.identity))}async getFrameSnapshot(){return Ee(xt.fromResolved(this.layout.toConfig()))}isVisible(){return W(this.container)}async onViewDetached({viewIdentity:t}){this.reparentingViews.add(t.name),this.platformCloseView(t)}async destroy(){this.goldenLayoutDestroyed||(this.goldenLayoutDestroyed=!0,this.layout.destroy()),this.iframeContainer.remove(),this.resizeController.destroy(),document.adoptedStyleSheets=document.adoptedStyleSheets.filter((t=>t!==this.stylesheet)),this.viewComponentsByContainerElement.clear()}setupListeners(){this.container.addEventListener("pointerdown",(t=>{if(t.target instanceof HTMLElement){const e=t.target.classList;["lm_tab","lm_title","lm_splitter","lm_drag_handle"].some((t=>e.contains(t)))&&(this.handleDragStart(),2===t.button&&t.stopPropagation())}}),!0),document.addEventListener("pointerup",(()=>this.handleDragEnd()),!0),this.layout.on("tabCreated",(t=>{const e=t.componentItem.component;t.element.id=`tab-${e.identity.name}`,this.domEmitter.dispatchLocalEvent("tab-created",e.identity)})),this.layout.on("itemCreated",(({target:t})=>{const e=t;if(Gt.isComponentItem(e)){const t=e.component;this.domEmitter.dispatchLocalEvent("container-created",t.identity)}})),this.layout.on("itemDestroyed",(t=>{const e=t.target;if(Gt.isComponentItem(e)){const t=e.component;this.removeViewComponent(t)}})),this.layout.on("itemDropped",(()=>{this.handleDragEnd()}))}handleDragStart(){this.iframeContainer.style.pointerEvents="none"}handleDragEnd(){this.iframeContainer.style.pointerEvents=""}removeViewComponent(t){if(t.config&&!1===t.config[`${de}isClosable`]){const e=[...this.stylesheet.cssRules].findIndex((e=>e.cssText.includes(`#tab-${t.identity.name}`)));this.stylesheet.deleteRule(e)}t.destroy(),this.viewComponentsByContainerElement.delete(t.container.element),this.resizeController.unobserveContainer(t.container.element),this.reparentingViews.has(t.identity.name)?this.reparentingViews.delete(t.identity.name):this.platformProvider.closeView(t.identity.name);0===this.getCurrentViews().length&&(this.goldenLayoutDestroyed||(this.goldenLayoutDestroyed=!0,m.handleLastViewRemoved(this.layoutManager,this.identity)))}}class Pe{constructor(t,e,i,n){this.windowIdentity=t,this.connectConfig=e,this.provider=i,this.fallbackContainer=n}async createLayout(t,e){if(!("container"in t)&&!this.fallbackContainer)throw new Error("Container property is not optional in web");const{layoutName:i}=t,n=t,o=this.provider.initLayoutViews(n),s=n.container??this.fallbackContainer,r={...this.windowIdentity,layoutName:i},a=new Me(r,s,o,this.connectConfig,e,this.provider);m.registerLayout(e,i,a),this.fallbackContainer=null}async getLayoutSnapshot(t){return t.getLayoutSnapshot()}async handleLastViewRemoved(t){}}class Te{static async init(e){const i=e.getFin().InterApplicationBus.Channel,n=await i.create(`custom-frame-${e.me.uuid}`);return n.setDefaultAction((async(t,{target:e,opts:i},o)=>{const s=n.connections.find((t=>t.name===e.name));if(s)return n.dispatch(s,t,{...i,target:e});throw new Error(`Client with name ${e.name} not found`)})),await t.relayChannelClientApi_1(n,"layout-relay"),new Te(e)}constructor(t){this.wire=t,this.viewNames=new Set}normalizeOptions(t,i="default"){const n=this.wire.me.uuid;let{name:o=`internal-generated-view-${e.v4()}`}=t;return o.match(/^internal-generated-view-/)&&this.viewNames.has(o)&&"duplicate"===i&&(o=`internal-generated-view-${e.v4()}`),this.viewNames.add(o),{...t,name:o,uuid:n}}closeView(t){this.viewNames.delete(t)}initLayoutViews({layout:t,multiInstanceViewBehavior:e}){return H((t=>{if("component"===t.type&&t.componentState){const i=this.normalizeOptions(t.componentState,e);return{...t,componentState:i}}return t}),t)}}var Ae;const ke=t=>t;Ae=new WeakMap,exports.WebLayoutEntryPoint=class{constructor(e){Ae.set(this,void 0),this.initLayoutManager=async(e,i,{container:n,layoutManagerOverride:o})=>{const s=await Te.init(i),r=o??ke,a=new Pe(i.me,t.__classPrivateFieldGet(this,Ae,"f"),s,n),l=new(r(m.createClosedConstructor(a)));return await M(i,l),l},this.applyLayoutSnapshot=async(e,i,n)=>{await i.applyLayoutSnapshot(t.__classPrivateFieldGet(this,Ae,"f").platform.layoutSnapshot)},this.createLayout=async(t,e)=>m.createLayout(t,e),this.destroyLayout=async(t,e)=>m.destroyLayout(t,e),t.__classPrivateFieldSet(this,Ae,e,"f")}}; @@ -7340,7 +7340,7 @@ module.exports = stubFalse; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.init = init; -const core_web_1 = __webpack_require__(/*! @openfin/core-web */ "./node_modules/@openfin/core-web/out/api-client.js"); +const core_web_1 = __webpack_require__(/*! @openfin/core-web */ "../../node_modules/@openfin/core-web/out/api-client.js"); const settings_1 = __webpack_require__(/*! ../platform/settings/settings */ "./client/src/platform/settings/settings.ts"); /** * Initializes the OpenFin Web Broker connection. @@ -8441,7 +8441,7 @@ function version(uuid) { /******/ /************************************************************************/ var __webpack_exports__ = {}; -// This entry need to be wrapped in an IIFE because it need to be in strict mode. +// This entry needs to be wrapped in an IIFE because it needs to be in strict mode. (() => { "use strict"; var exports = __webpack_exports__; diff --git a/web/v19.2.0/web-interop-support-context-and-intents/js/fdc3-intent-view.bundle.js.map b/web/v19.2.0/web-interop-support-context-and-intents/js/fdc3-intent-view.bundle.js.map index dcad111..01c7e71 100644 --- a/web/v19.2.0/web-interop-support-context-and-intents/js/fdc3-intent-view.bundle.js.map +++ b/web/v19.2.0/web-interop-support-context-and-intents/js/fdc3-intent-view.bundle.js.map @@ -1 +1 @@ -{"version":3,"file":"fdc3-intent-view.bundle.js","mappings":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A,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;ACrJA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEY;;AAEZ,eAAe,mBAAO,CAAC,wDAAW;AAClC,gBAAgB,mBAAO,CAAC,oDAAS;AACjC;AACA;AACA;AACA;;AAEA,cAAc;AACd,kBAAkB;AAClB,yBAAyB;;AAEzB;AACA,kBAAkB;;AAElB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,kBAAkB,YAAY;AAC9B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA,wCAAwC,SAAS;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;;AAEA;AACA;AACA,cAAc,iBAAiB;AAC/B;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,iDAAiD,EAAE;AACnD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C;AAC1C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA,yBAAyB,eAAe;AACxC;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,yBAAyB,QAAQ;AACjC;AACA,sBAAsB,eAAe;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc,YAAY;AAC1B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB,sBAAsB;AACxC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,mBAAmB;AACnB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA,oBAAoB,SAAS;AAC7B;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA,qBAAqB,WAAW,GAAG,IAAI;AACvC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA,gBAAgB,WAAW,GAAG,IAAI,KAAK,aAAa;AACpD;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;;AAEA;AACA,GAAG;AACH;AACA;AACA,mBAAmB,KAAK,mDAAmD,cAAc;AACzF,GAAG;AACH;AACA;AACA,+BAA+B,IAAI;AACnC;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,MAAM,aAAa,SAAS;AACtD;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,SAAS,gBAAgB;AACzB,cAAc,oBAAoB,EAAE,IAAI;AACxC;AACA,YAAY,gBAAgB,EAAE,IAAI;AAClC;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,GAAG,SAAS,GAAG,KAAK,qBAAqB,EAAE,EAAE;AACpE,QAAQ;AACR,yBAAyB,GAAG,KAAK,yBAAyB,EAAE,EAAE;AAC9D,mBAAmB,yBAAyB,EAAE,EAAE;AAChD;AACA,MAAM;AACN,oBAAoB,IAAI,EAAE,GAAG,SAAS,IAAI,EAAE,EAAE;AAC9C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,0CAA0C,cAAc,SAAS,OAAO;AACxE;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,kBAAkB,YAAY;AAC9B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,kBAAkB,gBAAgB;AAClC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,kBAAkB,gBAAgB;AAClC;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,cAAc,YAAY;AAC1B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,QAAQ;AAC1B;AACA,oBAAoB,QAAQ;AAC5B;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;;;;;ACzjEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEa;;AAEb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB;;AAEnB;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,sBAAsB;AACxC;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA,eAAe;AACf;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA,oBAAoB,SAAS;AAC7B;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;;AAEA,kCAAkC,QAAQ;AAC1C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oBAAoB,iBAAiB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,QAAQ;AACR;AACA,uCAAuC,QAAQ;AAC/C;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,OAAO;AACzB;AACA;AACA;;AAEA;AACA,SAAS,yBAAyB;AAClC;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,gBAAgB;AAClC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,8DAA8D,YAAY;AAC1E;AACA,8DAA8D,YAAY;AAC1E;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,qCAAqC,YAAY;AACjD;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;AACA;;;;;;;;;;;AChfA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,SAAS,WAAW;;AAEpB;AACA;AACA;AACA,SAAS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mBAAO,CAAC,6DAAc;AACtC,WAAW,mBAAO,CAAC,mDAAS;;AAE5B;AACA;;AAEA;;;;;;;;;;;ACNA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,UAAU;AACrB,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACrBA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,UAAU;AACrB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACxBA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,kBAAkB,mBAAO,CAAC,+DAAe;AACzC,cAAc,mBAAO,CAAC,uDAAW;AACjC,eAAe,mBAAO,CAAC,yDAAY;AACnC,cAAc,mBAAO,CAAC,yDAAY;AAClC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,SAAS;AACpB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AChDA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACnBA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,UAAU;AACrB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACtBA,sBAAsB,mBAAO,CAAC,yEAAoB;AAClD,SAAS,mBAAO,CAAC,6CAA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AgB;AAC1C,oBAAoB,mBAAO,CAAC,qEAAkB;AAC9C,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,mBAAmB,mBAAO,CAAC,mEAAiB;AAC5C,aAAa,mBAAO,CAAC,uDAAW;AAChC,qBAAqB,mBAAO,CAAC,uEAAmB;AAChD,qBAAqB,mBAAO,CAAC,uEAAmB;AAChD,sBAAsB,mBAAO,CAAC,yEAAoB;AAClD,cAAc,mBAAO,CAAC,uDAAW;AACjC,eAAe,mBAAO,CAAC,yDAAY;AACnC,YAAY,mBAAO,CAAC,mDAAS;AAC7B,eAAe,mBAAO,CAAC,yDAAY;AACnC,YAAY,mBAAO,CAAC,mDAAS;AAC7B,WAAW,mBAAO,CAAC,iDAAQ;AAC3B,aAAa,mBAAO,CAAC,qDAAU;;AAE/B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,SAAS;AACpB;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa,GAAG;AAChB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;AACA,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;;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A;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC9CA,aAAa,mBAAO,CAAC,uDAAW;AAChC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,eAAe,mBAAO,CAAC,yDAAY;AACnC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC3DA,kBAAkB,mBAAO,CAAC,iEAAgB;AAC1C,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC7BA,eAAe,mBAAO,CAAC,yDAAY;AACnC,kBAAkB,mBAAO,CAAC,iEAAgB;AAC1C,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AChCA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,aAAa,OAAO;AACpB;AACA;AACA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ACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACnFA,aAAa,mBAAO,CAAC,uDAAW;AAChC,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,SAAS,mBAAO,CAAC,6CAAM;AACvB,kBAAkB,mBAAO,CAAC,iEAAgB;AAC1C,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AAC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B,cAAc,mBAAO,CAAC,yDAAY;AAClC,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACzDA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa,GAAG;AAChB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACZA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACdA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AChBA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,GAAG;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC7BA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACtBA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd,aA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AACtB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACdA,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACnBA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACZA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClCA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,GAAG;AAChB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;AClBA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACfA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACzBA,WAAW,mBAAO,CAAC,mDAAS;AAC5B,gBAAgB,mBAAO,CAAC,6DAAc;AACtC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;;AAE7C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ,CAAC;;AAED;;;;;;;;;;;AC7BA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACrBA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,aAAa,UAAU;AACvB;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACdA,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;ACRA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACbA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;;;;;;;;;;ACjBA,gBAAgB,mBAAO,CAAC,6DAAc;;AAEtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACdA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,GAAG;AAChB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACbA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACbA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,UAAU,mBAAO,CAAC,iDAAQ;AAC1B,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjCA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;;;;;;;;;;;ACzBA,gBAAgB,mBAAO,CAAC,6DAAc;;AAEtC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,GAAG;AAChB;AACA;AACA;AACA,oBAAoB,QAAQ,IAAI,QAAQ;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,kBAAkB;AAClB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpCA,sBAAsB,mBAAO,CAAC,yEAAoB;AAClD,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA,8BAA8B,mBAAmB;AACjD;AACA;AACA;AACA;AACA;AACA,+CAA+C,mBAAmB;AAClE;AACA;AACA;;AAEA;;;;;;;;;;;ACnCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACzBA,iBAAiB,mBAAO,CAAC,6DAAc;AACvC,eAAe,mBAAO,CAAC,yDAAY;;AAEnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AChCA,WAAW,mBAAO,CAAC,mDAAS;AAC5B,gBAAgB,mBAAO,CAAC,2DAAa;;AAErC;AACA,kBAAkB,KAA0B;;AAE5C;AACA,gCAAgC,QAAa;;AAE7C;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACrCA,kBAAkB,mBAAO,CAAC,iEAAgB;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,kBAAkB;AAClB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClCA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,eAAe,mBAAO,CAAC,yDAAY;;AAEnC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpCA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClCA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC1BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC9BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC5BA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC1BA,uBAAuB,mBAAO,CAAC,2EAAqB;AACpD,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC1BA,oBAAoB,mBAAO,CAAC,qEAAkB;AAC9C,eAAe,mBAAO,CAAC,2DAAa;AACpC,kBAAkB,mBAAO,CAAC,+DAAe;;AAEzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpCA,oBAAoB,mBAAO,CAAC,qEAAkB;AAC9C,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,kBAAkB,mBAAO,CAAC,+DAAe;;AAEzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC/BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;;;ACVA,oBA2CC;AAlDD,sHAAwE;AACxE,0HAA4D;AAE5D;;;GAGG;AACI,KAAK,UAAU,IAAI,CAAC,UAAmB,IAAI;IACjD,sCAAsC;IACtC,IAAI,OAA0C,CAAC;IAC/C,IAAI,MAAM,CAAC,GAAG,KAAK,SAAS,EAAE,CAAC;QAC9B,IAAI,CAAC,OA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A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,kBAAkB,aAAa;AAC/B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,iEAAe,GAAG;;;;;;;;;;;;;;;ACtNlB,iEAAe,sCAAsC;;;;;;;;;;;;;;;;ACAhB;;AAErC;AACA,OAAO,wDAAQ;AACf;AACA;;AAEA;AACA,gCAAgC;;AAEhC;AACA;AACA;AACA,qBAAqB;;AAErB;AACA,qBAAqB;;AAErB;AACA,qBAAqB;;AAErB;AACA,qBAAqB;AACrB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,iEAAe,KAAK;;;;;;;;;;;;;;;AClCpB,iEAAe,cAAc,EAAE,UAAU,EAAE,eAAe,EAAE,gBAAgB,EAAE,UAAU,GAAG,yCAAyC;;;;;;;;;;;;;;;ACApI;AACA;AACA;AACA;AACA;AACe;AACf;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;AClBA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,mDAAmD;;AAEnD;;AAEA,oBAAoB,gBAAgB;AACpC;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AAC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AK,IAAI,EAAE;YACtD,MAAM,WAAW,EAAE,CAAC;QACrB,CAAC,CAAC,CAAC;IACJ,CAAC;IAED,MAAM,iBAAiB,EAAE,CAAC;AAC3B,CAAC","sources":["webpack://openfin-web--web-interop-support-context-and-intents/./node_modules/@openfin/core-web/out/api-client.js","webpack://openfin-web--web-interop-support-context-and-intents/./node_modules/@openfin/core-web/out/main-8cad4070.js","webpack://openfin-web--web-interop-support-context-and-intents/./node_modules/@openfin/core-web/out/main-b14f67c9.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/base64-js/index.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/buffer/index.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/events/events.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/ieee754/index.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_DataView.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_Hash.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_ListCache.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_Map.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_MapCache.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_Promise.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_Set.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_SetCache.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_Stack.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_Symbol.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_Uint8Array.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_WeakMap.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_arrayEach.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_arrayFilter.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_arrayLikeKeys.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_arrayPush.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_arraySome.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_assignValue.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_assocIndexOf.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseAssign.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseAssignIn.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseAssignValue.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseClone.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseCreate.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseGetAllKeys.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseGetTag.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseIsArguments.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseIsEqual.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseIsEqualDeep.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseIsMap.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseIsNative.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseIsSet.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseIsTypedArray.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseKeys.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseKeysIn.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseTimes.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseUnary.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_cacheHas.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_cloneArrayBuffer.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_cloneBuffer.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_cloneDataView.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_cloneRegExp.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_cloneSymbol.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_cloneTypedArray.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_copyArray.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_copyObject.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_copySymbols.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_copySymbolsIn.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_coreJsData.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_defineProperty.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_equalArrays.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_equalByTag.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_equalObjects.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_freeGlobal.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_getAllKeys.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_getAllKeysIn.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_getMapData.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_getNative.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_getPrototype.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_getRawTag.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_getSymbols.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_getSymbolsIn.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_getTag.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_getValue.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_hashClear.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_hashDelete.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_hashGet.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_hashHas.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_hashSet.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_initCloneArray.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_initCloneByTag.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_initCloneObject.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_isIndex.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_isKeyable.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_isMasked.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_isPrototype.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_listCacheClear.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_listCacheDelete.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_listCacheGet.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_listCacheHas.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_listCacheSet.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_mapCacheClear.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_mapCacheDelete.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_mapCacheGet.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_mapCacheHas.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_mapCacheSet.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_mapToArray.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_nativeCreate.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_nativeKeys.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_nativeKeysIn.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_nodeUtil.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_objectToString.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_overArg.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_root.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_setCacheAdd.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_setCacheHas.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_setToArray.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_stackClear.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_stackDelete.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_stackGet.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_stackHas.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_stackSet.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_toSource.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/cloneDeep.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/eq.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/isArguments.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/isArray.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/isArrayLike.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/isBuffer.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/isEqual.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/isFunction.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/isLength.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/isMap.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/isObject.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/isObjectLike.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/isSet.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/isTypedArray.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/keys.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/keysIn.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/stubArray.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/stubFalse.js","webpack://openfin-web--web-interop-support-context-and-intents/./client/src/content/api.ts","webpack://openfin-web--web-interop-support-context-and-intents/./client/src/platform/settings/settings.ts","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/index.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/md5.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/nil.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/parse.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/regex.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/rng.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/sha1.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/stringify.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/v1.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/v3.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/v35.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/v4.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/v5.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/validate.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/version.js","webpack://openfin-web--web-interop-support-context-and-intents/webpack/bootstrap","webpack://openfin-web--web-interop-support-context-and-intents/webpack/runtime/define property getters","webpack://openfin-web--web-interop-support-context-and-intents/webpack/runtime/global","webpack://openfin-web--web-interop-support-context-and-intents/webpack/runtime/hasOwnProperty shorthand","webpack://openfin-web--web-interop-support-context-and-intents/webpack/runtime/make namespace object","webpack://openfin-web--web-interop-support-context-and-intents/webpack/runtime/node module decorator","webpack://openfin-web--web-interop-support-context-and-intents/./client/src/content/fdc3-intent-view.ts"],"sourcesContent":["\"use strict\";var e=require(\"./main-8cad4070.js\");require(\"buffer/\"),require(\"uuid\"),require(\"events\"),require(\"lodash/cloneDeep\"),require(\"lodash/isEqual\"),exports.connect=e.connect;\n","\"use strict\";var e=require(\"buffer/\"),t=require(\"events\"),n=require(\"lodash/cloneDeep\"),i=require(\"lodash/isEqual\"),r=require(\"uuid\");const o=(e,t)=>`${t}<${btoa(JSON.stringify(e))}>`;var s=\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof window?window:\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:{},a={},c={},d={},h={};async function l(e){const t=[];for(const n of e){const e=await n();t.push(e)}return t}Object.defineProperty(h,\"__esModule\",{value:!0}),h.promiseMapSerial=h.serial=h.promiseMap=h.promisify=void 0,h.promisify=function(e){return(...t)=>new Promise(((n,i)=>{e(...t,((e,t)=>e?i(e):n(t)))}))},h.promiseMap=async function(e,t){return Promise.all(e.map(t))},h.serial=l,h.promiseMapSerial=async function(e,t){return l(e.map(((e,n,i)=>()=>t(e,n,i))))};var u,p=s&&s.__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},w=s&&s.__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)};Object.defineProperty(d,\"__esModule\",{value:!0}),d.Reply=d.EmitterBase=d.Base=void 0;const y=h;class f{constructor(e){this.isNodeEnvironment=()=>\"node\"===this.wire.environment.type,this.isOpenFinEnvironment=()=>\"openfin\"===this.wire.environment.type,this.isBrowserEnvironment=()=>\"other\"===this.wire.environment.type,this.wire=e}get fin(){return this.wire.getFin()}get me(){return this.wire.me}}d.Base=f;d.EmitterBase=class extends f{constructor(e,t,...n){super(e),this.topic=t,u.set(this,void 0),this.eventNames=()=>this.hasEmitter()?this.getOrCreateEmitter().eventNames():[],this.emit=(e,t,...n)=>!!this.hasEmitter()&&this.getOrCreateEmitter().emit(e,t,...n),this.hasEmitter=()=>this.wire.eventAggregator.has(w(this,u,\"f\")),this.getOrCreateEmitter=()=>this.wire.eventAggregator.getOrCreate(w(this,u,\"f\")),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[],this.listenerCount=e=>this.hasEmitter()?this.getOrCreateEmitter().listenerCount(e):0,this.registerEventListener=async(e,t={},n,i)=>{const r={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e},o=this.getOrCreateEmitter();n(o);try{await this.wire.sendAction(\"subscribe-to-desktop-event\",r)}catch(e){throw i(o),this.deleteEmitterIfNothingRegistered(o),e}},this.deregisterEventListener=async(e,t={})=>{if(this.hasEmitter()){const n={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e};await this.wire.sendAction(\"unsubscribe-to-desktop-event\",n).catch((()=>null));return this.getOrCreateEmitter()}return Promise.resolve()},p(this,u,[t,...n],\"f\"),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[]}async on(e,t,n){return await this.registerEventListener(e,n,(n=>{n.on(e,t)}),(n=>{n.removeListener(e,t)})),this}async addListener(e,t,n){return this.on(e,t,n)}async once(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.once(e,i),n.once(e,t)}),(n=>{n.removeListener(e,i),n.removeListener(e,t)})),this}async prependListener(e,t,n){return await this.registerEventListener(e,n,(n=>{n.prependListener(e,t)}),(n=>{n.removeListener(e,t)})),this}async prependOnceListener(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.prependOnceListener(e,t),n.once(e,i)}),(n=>{n.removeListener(e,t),n.removeListener(e,i)})),this}async removeListener(e,t,n){const i=await this.deregisterEventListener(e,n);return i&&(i.removeListener(e,t),this.deleteEmitterIfNothingRegistered(i)),this}async deregisterAllListeners(e){const t={...this.identity,type:e,topic:this.topic};if(this.hasEmitter()){const e=this.getOrCreateEmitter(),n=e.listenerCount(t.type),i=[];for(let e=0;enull)));return await Promise.all(i),e}}async removeAllListeners(e){const t=async e=>{const t=await this.deregisterAllListeners(e);t&&(t.removeAllListeners(e),this.deleteEmitterIfNothingRegistered(t))};if(e)await t(e);else if(this.hasEmitter()){const e=this.getOrCreateEmitter().eventNames();await(0,y.promiseMap)(e,t)}return this}deleteEmitterIfNothingRegistered(e){0===e.eventNames().length&&this.wire.eventAggregator.delete(w(this,u,\"f\"))}},u=new WeakMap;d.Reply=class{};var g={};Object.defineProperty(g,\"__esModule\",{value:!0});var m=g.RuntimeError=g.NotSupportedError=g.NotImplementedError=g.NoAckError=g.DuplicateCorrelationError=g.UnexpectedActionError=g.DisconnectedError=void 0;class v extends Error{constructor(e){super(`Expected websocket state OPEN but found ${e}`),this.readyState=e}}g.DisconnectedError=v;class C extends Error{}g.UnexpectedActionError=C;class b extends Error{}g.DuplicateCorrelationError=b;class I extends Error{}g.NoAckError=I;class E extends Error{}g.NotImplementedError=E;class x extends Error{}g.NotSupportedError=x;class A extends Error{constructor(e){const{message:t,name:n,stack:i,...r}=e;super(t),this.name=n||\"Error\",this.stack=i??this.toString(),Object.keys(r).forEach((e=>{this[e]=r[e]}))}}class P extends Error{static getCallSite(e=0){const t=Error.stackTraceLimit,n=e+1;Error.stackTraceLimit=t+n;const i=Error.prepareStackTrace;Error.prepareStackTrace=(e,t)=>t;const r=(new Error).stack?.slice(n)??[];return Error.prepareStackTrace=i,Error.stackTraceLimit=t,r}static prepareStackTrace(e,t){if(\"function\"==typeof Error.prepareStackTrace)return Error.prepareStackTrace(e,t);let n=\"\";n+=e.name||\"Error\",n+=`: ${e.message||\"\"}`;for(const e of t)n+=`\\n at ${e.toString()}`;return n}constructor(e,t){const{reason:n,error:i}=e;super(n),this.name=\"RuntimeError\",i?.stack&&(this.cause=new A(i)),t&&(this.stack=P.prepareStackTrace(this,t))}}m=g.RuntimeError=P;var M={},_={},O={};Object.defineProperty(O,\"__esModule\",{value:!0}),O.validateIdentity=void 0,O.validateIdentity=function(e){let t;return\"object\"==typeof e&&\"string\"==typeof e.uuid||(t=\"Not a valid identity object\"),t};var S={},R={},F={},j={},k={},L={},T={};Object.defineProperty(T,\"__esModule\",{value:!0}),T.handleDeprecatedWarnings=void 0;var $;T.handleDeprecatedWarnings=e=>{(e.contentNavigation?.whitelist||e.contentNavigation?.blacklist||e.contentRedirect?.whitelist||e.contentRedirect?.blacklist)&&console.warn(\"The properties 'whitelist' and 'blacklist' have been marked as deprecated and will be removed in a future version. Please use 'allowlist' and 'denylist'.\")};var B={},G={};Object.defineProperty(G,\"__esModule\",{value:!0}),G.AsyncRetryableLazy=W=G.Lazy=void 0;var W=G.Lazy=class{constructor(e){this.producerFn=e}getValue(){return this.value||(this.value=this.producerFn()),this.value}};G.AsyncRetryableLazy=class{constructor(e){this.producerFn=e}async getValue(){return this.promise||(this.promise=this.producerFn().catch((e=>{throw delete this.promise,e}))),this.promise}};var H={};Object.defineProperty(H,\"__esModule\",{value:!0}),H.WebContents=void 0;const N=d;class D extends N.EmitterBase{constructor(e,t,n){super(e,n,t.uuid,t.name),this.identity=t,this.entityType=n}capturePage(e){return this.wire.sendAction(\"capture-page\",{options:e,...this.identity}).then((({payload:e})=>e.data))}executeJavaScript(e){return this.wire.sendAction(\"execute-javascript-in-window\",{...this.identity,code:e}).then((({payload:e})=>e.data))}getZoomLevel(){return this.wire.sendAction(\"get-zoom-level\",this.identity).then((({payload:e})=>e.data))}setZoomLevel(e){return this.wire.sendAction(\"set-zoom-level\",{...this.identity,level:e}).then((()=>{}))}navigate(e){return this.wire.sendAction(\"navigate-window\",{...this.identity,url:e}).then((()=>{}))}navigateBack(){return this.wire.sendAction(\"navigate-window-back\",{...this.identity}).then((()=>{}))}async navigateForward(){await this.wire.sendAction(\"navigate-window-forward\",{...this.identity})}stopNavigation(){return this.wire.sendAction(\"stop-window-navigation\",{...this.identity}).then((()=>{}))}reload(e=!1){return this.wire.sendAction(\"reload-window\",{ignoreCache:e,...this.identity}).then((()=>{}))}print(e={}){return this.wire.sendAction(\"print\",{...this.identity,options:e}).then((()=>{}))}findInPage(e,t){return this.wire.sendAction(\"find-in-page\",{...this.identity,searchTerm:e,options:t}).then((({payload:e})=>e.data))}stopFindInPage(e){return this.wire.sendAction(\"stop-find-in-page\",{...this.identity,action:e}).then((()=>{}))}getPrinters(){return this.wire.sendAction(\"get-printers\",{...this.identity}).then((({payload:e})=>e.data))}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){await this.wire.sendAction(\"focus-window\",{emitSynthFocused:e,...this.identity})}async showDeveloperTools(){await this.wire.sendAction(\"show-developer-tools\",this.identity)}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction(\"get-process-info\",this.identity);return e}async getSharedWorkers(){return this.wire.sendAction(\"get-shared-workers\",this.identity).then((({payload:e})=>e.data))}async inspectSharedWorker(){await this.wire.sendAction(\"inspect-shared-worker\",{...this.identity})}async inspectSharedWorkerById(e){await this.wire.sendAction(\"inspect-shared-worker-by-id\",{...this.identity,workerId:e})}async inspectServiceWorker(){await this.wire.sendAction(\"inspect-service-worker\",{...this.identity})}async showPopupWindow(e){if(this.wire.sendAction(`${this.entityType}-show-popup-window`,this.identity).catch((()=>{})),e?.onPopupReady){const t=async({popupName:t})=>{try{const n=this.fin.Window.wrapSync({uuid:this.fin.me.uuid,name:t});await e.onPopupReady(n)}catch(e){throw new Error(`Something went wrong during onPopupReady execution: ${e}`)}};await this.once(\"popup-ready\",t)}const{payload:t}=await this.wire.sendAction(\"try-create-popup-window\",{options:{...e,hasResultCallback:!!e?.onPopupResult,hasReadyCallback:!!e?.onPopupReady},...this.identity}),{data:{willOpen:n,options:i}}=t;n&&await this.fin.Window.create(i.initialOptions);if(e?.onPopupResult){const t=async t=>{await e.onPopupResult((e=>{const{name:t,uuid:n,result:i,data:r}=e,o={identity:{name:t,uuid:n},result:i};return r&&(o.data=r),o})(t))},n=async()=>{await this.removeListener(\"popup-result\",t)};await this.on(\"popup-result\",t),await this.once(\"popup-teardown\",n)}const{payload:r}=await this.wire.sendAction(\"show-popup-window\",{options:i,...this.identity});return r.data}}var U,V,z,K,q;function J(){return V||(V=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(function(){if($)return L;$=1,Object.defineProperty(L,\"__esModule\",{value:!0}),L.ViewModule=void 0;const e=d,t=O,n=J(),i=T;class r extends e.Base{async create(e){const{uuid:t}=this.wire.me;if(!e.name||\"string\"!=typeof e.name)throw new Error(\"Please provide a name property as a string in order to create a View.\");return(0,i.handleDeprecatedWarnings)(e),this.wire.environment.childViews?await this.wire.environment.createChildContent({entityType:\"view\",options:{...e,uuid:t}}):await this.wire.sendAction(\"create-view\",{...e,uuid:t}),this.wrapSync({uuid:t,name:e.name})}async wrap(e){this.wire.sendAction(\"view-wrap\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}wrapSync(e){this.wire.sendAction(\"view-wrap-sync\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}getCurrent(){if(this.wire.sendAction(\"view-get-current\").catch((e=>{})),!this.wire.me.isView)throw new Error(\"You are not in a View context\");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction(\"view-get-current-sync\").catch((e=>{})),!this.wire.me.isView)throw new Error(\"You are not in a View context\");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return L.ViewModule=r,L}(),e),n(function(){if(U)return B;var e;U=1,Object.defineProperty(B,\"__esModule\",{value:!0}),B.View=void 0;const t=g,n=G,i=H,r=ie();class o extends i.WebContents{constructor(i,o){super(i,o,\"view\"),this.identity=o,e.set(this,new n.Lazy((()=>this.fin.Platform.wrapSync(this.identity).getClient()))),this.attach=async e=>{await this.wire.sendAction(\"attach-view\",{target:e,...this.identity})},this.destroy=async()=>{await this.wire.sendAction(\"destroy-view\",{...this.identity})},this.show=async()=>{await this.wire.sendAction(\"show-view\",{...this.identity})},this.showAt=async(e,t={})=>{await this.wire.sendAction(\"show-view-at\",{bounds:e,...this.identity,options:t})},this.bringToFront=async()=>{await this.wire.sendAction(\"bring-view-to-front\",{...this.identity})},this.hide=async()=>{await this.wire.sendAction(\"hide-view\",{...this.identity})},this.setBounds=async e=>{await this.wire.sendAction(\"set-view-bounds\",{bounds:e,...this.identity})},this.getBounds=async()=>(await this.wire.sendAction(\"get-view-bounds\",{...this.identity})).payload.data,this.getInfo=async()=>(await this.wire.sendAction(\"get-view-info\",{...this.identity})).payload.data,this.getParentLayout=async()=>(this.wire.sendAction(\"view-get-parent-layout\",{...this.identity}).catch((()=>{})),this.fin.Platform.Layout.getLayoutByViewIdentity(this.identity)),this.getOptions=async()=>this.wire.sendAction(\"get-view-options\",{...this.identity}).then((({payload:e})=>e.data)),this.updateOptions=async e=>this.wire.sendAction(\"update-view-options\",{options:e,...this.identity}).then((()=>{})),this.getCurrentWindow=async()=>{const{payload:{data:e}}=await this.wire.sendAction(\"get-view-window\",{...this.identity});return new r._Window(this.wire,e)},this.getCurrentStack=async()=>{this.wire.sendAction(\"view-get-current-stack\").catch((()=>{}));try{return(await this.getParentLayout()).getStackByViewIdentity(this.identity)}catch(e){throw new t.RuntimeError({reason:\"This view does not belong to a stack.\",error:e})}},this.triggerBeforeUnload=async()=>(await this.wire.sendAction(\"trigger-before-unload\",{...this.identity})).payload.data,this.bindToElement=async e=>{if(!e)throw new Error(\"Element not found.\");return this.wire.environment.observeBounds(e,(async e=>this.setBounds(e)))}}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){const t=await this.getCurrentWindow();await t.focusedWebViewWasChanged(),await super.focus({emitSynthFocused:e})}}return B.View=o,e=new WeakMap,B}(),e)}(k)),k}function Y(){if(z)return j;z=1,Object.defineProperty(j,\"__esModule\",{value:!0}),j.Application=void 0;const e=d,t=ie(),n=J();class i extends e.EmitterBase{constructor(e,n){super(e,\"application\",n.uuid),this.identity=n,this.window=new t._Window(this.wire,{uuid:this.identity.uuid,name:this.identity.uuid})}windowListFromIdentityList(e){const n=[];return e.forEach((e=>{n.push(new t._Window(this.wire,{uuid:e.uuid,name:e.name}))})),n}isRunning(){return this.wire.sendAction(\"is-application-running\",this.identity).then((({payload:e})=>e.data))}async quit(e=!1){try{await this._close(e),await this.wire.sendAction(\"destroy-application\",{force:e,...this.identity})}catch(e){if(![\"Remote connection has closed\",\"Could not locate the requested application\"].some((t=>e.message.includes(t))))throw e}}async _close(e=!1){try{await this.wire.sendAction(\"close-application\",{force:e,...this.identity})}catch(e){if(!e.message.includes(\"Remote connection has closed\"))throw e}}close(e=!1){return console.warn(\"Deprecation Warning: Application.close is deprecated Please use Application.quit\"),this.wire.sendAction(\"application-close\",this.identity).catch((e=>{})),this._close(e)}getChildWindows(){return this.wire.sendAction(\"get-child-windows\",this.identity).then((({payload:e})=>{const t=[];return e.data.forEach((e=>{t.push({uuid:this.identity.uuid,name:e})})),this.windowListFromIdentityList(t)}))}getManifest(){return this.wire.sendAction(\"get-application-manifest\",this.identity).then((({payload:e})=>e.data))}getParentUuid(){return this.wire.sendAction(\"get-parent-application\",this.identity).then((({payload:e})=>e.data))}getShortcuts(){return this.wire.sendAction(\"get-shortcuts\",this.identity).then((({payload:e})=>e.data))}async getViews(){const{payload:e}=await this.wire.sendAction(\"application-get-views\",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}getZoomLevel(){return this.wire.sendAction(\"get-application-zoom-level\",this.identity).then((({payload:e})=>e.data))}getWindow(){return this.wire.sendAction(\"application-get-window\",this.identity).catch((e=>{})),Promise.resolve(this.window)}registerUser(e,t){return this.wire.sendAction(\"register-user\",{userName:e,appName:t,...this.identity}).then((()=>{}))}removeTrayIcon(){return this.wire.sendAction(\"remove-tray-icon\",this.identity).then((()=>{}))}restart(){return this.wire.sendAction(\"restart-application\",this.identity).then((()=>{}))}run(){return console.warn(\"Deprecation Warning: Application.run is deprecated Please use fin.Application.start\"),this.wire.sendAction(\"application-run\",this.identity).catch((e=>{})),this._run()}_run(e={}){return this.wire.sendAction(\"run-application\",{manifestUrl:this._manifestUrl,opts:e,...this.identity}).then((()=>{}))}scheduleRestart(){return this.wire.sendAction(\"relaunch-on-close\",this.identity).then((()=>{}))}async sendApplicationLog(){const{payload:e}=await this.wire.sendAction(\"send-application-log\",this.identity);return e.data}async setJumpList(e){await this.wire.sendAction(\"set-jump-list\",{config:e,...this.identity})}setTrayIcon(e){return this.wire.sendAction(\"set-tray-icon\",{enabledIcon:e,...this.identity}).then((()=>{}))}setShortcuts(e){return this.wire.sendAction(\"set-shortcuts\",{data:e,...this.identity}).then((()=>{}))}async setShortcutQueryParams(e){await this.wire.sendAction(\"set-shortcut-query-args\",{data:e,...this.identity})}setZoomLevel(e){return this.wire.sendAction(\"set-application-zoom-level\",{level:e,...this.identity}).then((()=>{}))}async setAppLogUsername(e){await this.wire.sendAction(\"set-app-log-username\",{data:e,...this.identity})}getTrayIconInfo(){return this.wire.sendAction(\"get-tray-icon-info\",this.identity).then((({payload:e})=>e.data))}hasTrayIcon(){return this.wire.sendAction(\"has-tray-icon\",this.identity).then((({payload:e})=>e.data))}terminate(){return this.wire.sendAction(\"terminate-application\",this.identity).then((()=>{}))}wait(){return this.wire.sendAction(\"wait-for-hung-application\",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction(\"get-info\",this.identity).then((({payload:e})=>e.data))}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction(\"application-get-process-info\",this.identity);return e}async setFileDownloadLocation(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t};await this.wire.sendAction(\"set-file-download-location\",{...n,downloadLocation:e})}async getFileDownloadLocation(){const{payload:{data:e}}=await this.wire.sendAction(\"get-file-download-location\",this.identity);return e}async showTrayIconPopupMenu(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t},{payload:i}=await this.wire.sendAction(\"show-tray-icon-popup-menu\",{...n,options:e});return i.data}async closeTrayIconPopupMenu(){const{name:e}=this.wire.me,t={uuid:this.identity.uuid,name:e};await this.wire.sendAction(\"close-tray-icon-popup-menu\",{...t})}}return j.Application=i,j}function Z(){return q||(q=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(function(){if(K)return F;K=1,Object.defineProperty(F,\"__esModule\",{value:!0}),F.ApplicationModule=void 0;const e=d,t=O,n=Y();class i extends e.Base{async wrap(e){this.wire.sendAction(\"wrap-application\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}wrapSync(e){this.wire.sendAction(\"wrap-application-sync\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}async _create(e){return void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&void 0===e.isPlatformController&&(e.autoShow=!0),await this.wire.sendAction(\"create-application\",e),this.wrap({uuid:e.uuid})}create(e){return console.warn(\"Deprecation Warning: fin.Application.create is deprecated. Please use fin.Application.start\"),this.wire.sendAction(\"application-create\").catch((e=>{})),this._create(e)}async start(e){this.wire.sendAction(\"start-application\").catch((e=>{}));const t=await this._create(e);return await this.wire.sendAction(\"run-application\",{uuid:e.uuid}),t}async startManyManifests(e,t){return this.wire.sendAction(\"run-applications\",{applications:e,opts:t}).then((()=>{}))}getCurrent(){return this.wire.sendAction(\"get-current-application\").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction(\"get-current-application-sync\").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}async startFromManifest(e,t){this.wire.sendAction(\"application-start-from-manifest\").catch((e=>{}));const n=await this._createFromManifest(e);return await n._run(t),n}createFromManifest(e){return console.warn(\"Deprecation Warning: fin.Application.createFromManifest is deprecated. Please use fin.Application.startFromManifest\"),this.wire.sendAction(\"application-create-from-manifest\").catch((e=>{})),this._createFromManifest(e)}_createFromManifest(e){return this.wire.sendAction(\"get-application-manifest\",{manifestUrl:e}).then((({payload:e})=>{const t=e.data.platform?e.data.platform.uuid:e.data.startup_app.uuid;return this.wrap({uuid:t})})).then((t=>(t._manifestUrl=e,t)))}}return F.ApplicationModule=i,F}(),e),n(Y(),e)}(R)),R}H.WebContents=D;var Q={};Object.defineProperty(Q,\"__esModule\",{value:!0}),Q.promisifySubscription=void 0;var X,ee,te;function ne(){if(X)return S;X=1,Object.defineProperty(S,\"__esModule\",{value:!0}),S._Window=void 0;const e=Z(),t=H,n=J(),i=T,r=Q;class o extends t.WebContents{constructor(e,t){super(e,t,\"window\")}async createWindow(e){this.wire.sendAction(\"window-create-window\",this.identity).catch((e=>{}));const t=await(0,r.promisifySubscription)(this,\"fire-constructor-callback\");void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&(e.autoShow=!0),(0,i.handleDeprecatedWarnings)(e);const n=this.wire.environment.createChildContent({entityType:\"window\",options:e}),[o]=await Promise.all([t.getValue(),n]);let s;const{success:a}=o,c=o.data,{message:d}=c;s=a?{httpResponseCode:c.httpResponseCode,apiInjected:c.apiInjected}:{message:c.message,networkErrorCode:c.networkErrorCode,stack:c.stack};const h={message:d,cbPayload:s,success:a};try{this.getWebWindow().fin.__internal_.openerSuccessCBCalled()}catch(e){}return h.success?this:Promise.reject(h)}getAllFrames(){return this.wire.sendAction(\"get-all-frames\",this.identity).then((({payload:e})=>e.data))}getBounds(){return this.wire.sendAction(\"get-window-bounds\",this.identity).then((({payload:e})=>e.data))}center(){return this.wire.sendAction(\"center-window\",this.identity).then((()=>{}))}blur(){return this.wire.sendAction(\"blur-window\",this.identity).then((()=>{}))}bringToFront(){return this.wire.sendAction(\"bring-window-to-front\",this.identity).then((()=>{}))}animate(e,t){return this.wire.sendAction(\"animate-window\",{transitions:e,options:t,...this.identity}).then((()=>{}))}hide(){return this.wire.sendAction(\"hide-window\",this.identity).then((()=>{}))}close(e=!1){return this.wire.sendAction(\"close-window\",{force:e,...this.identity}).then((()=>{Object.setPrototypeOf(this,null)}))}focusedWebViewWasChanged(){return this.wire.sendAction(\"focused-webview-changed\",this.identity).then((()=>{}))}getNativeId(){return this.wire.sendAction(\"get-window-native-id\",this.identity).then((({payload:e})=>e.data))}async getCurrentViews(){const{payload:e}=await this.wire.sendAction(\"window-get-views\",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}disableFrame(){return console.warn(\"Function is deprecated; use disableUserMovement instead.\"),this.wire.sendAction(\"disable-window-frame\",this.identity).then((()=>{}))}disableUserMovement(){return this.wire.sendAction(\"disable-window-frame\",this.identity).then((()=>{}))}enableFrame(){return console.warn(\"Function is deprecated; use enableUserMovement instead.\"),this.wire.sendAction(\"enable-window-frame\",this.identity).then((()=>{}))}enableUserMovement(){return this.wire.sendAction(\"enable-window-frame\",this.identity).then((()=>{}))}flash(){return this.wire.sendAction(\"flash-window\",this.identity).then((()=>{}))}stopFlashing(){return this.wire.sendAction(\"stop-flash-window\",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction(\"get-window-info\",this.identity).then((({payload:e})=>e.data))}async getLayout(e){this.wire.sendAction(\"window-get-layout\",this.identity).catch((e=>{}));const t=await this.getOptions();if(!t.layout&&!t.layoutSnapshot)throw new Error(\"Window does not have a Layout\");return this.fin.Platform.Layout.wrap(e??this.identity)}getOptions(){return this.wire.sendAction(\"get-window-options\",this.identity).then((({payload:e})=>e.data))}getParentApplication(){return this.wire.sendAction(\"window-get-parent-application\",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity))}getParentWindow(){return this.wire.sendAction(\"window-get-parent-window\",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity)).then((e=>e.getWindow()))}async getSnapshot(e){const t={area:e,...this.identity};console.warn(\"Window.getSnapshot has been deprecated, please use Window.capturePage\");return(await this.wire.sendAction(\"get-window-snapshot\",t)).payload.data}getState(){return this.wire.sendAction(\"get-window-state\",this.identity).then((({payload:e})=>e.data))}getWebWindow(){return this.wire.sendAction(\"window-get-web-window\",this.identity).catch((e=>{})),this.wire.environment.getWebWindow(this.identity)}isMainWindow(){return this.wire.sendAction(\"window-is-main-window\",this.identity).catch((e=>{})),this.me.uuid===this.me.name}isShowing(){return this.wire.sendAction(\"is-window-showing\",this.identity).then((({payload:e})=>e.data))}maximize(){return this.wire.sendAction(\"maximize-window\",this.identity).then((()=>{}))}minimize(){return this.wire.sendAction(\"minimize-window\",this.identity).then((()=>{}))}moveBy(e,t,n){return this.wire.sendAction(\"move-window-by\",{deltaLeft:e,deltaTop:t,positioningOptions:n,...this.identity}).then((()=>{}))}moveTo(e,t,n){return this.wire.sendAction(\"move-window\",{left:e,top:t,positioningOptions:n,...this.identity}).then((()=>{}))}resizeBy(e,t,n,i){return this.wire.sendAction(\"resize-window-by\",{deltaWidth:Math.floor(e),deltaHeight:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}resizeTo(e,t,n,i){return this.wire.sendAction(\"resize-window\",{width:Math.floor(e),height:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}restore(){return this.wire.sendAction(\"restore-window\",this.identity).then((()=>{}))}setAsForeground(){return this.wire.sendAction(\"set-foreground-window\",this.identity).then((()=>{}))}setBounds(e,t){return this.wire.sendAction(\"set-window-bounds\",{...e,...this.identity,positioningOptions:t}).then((()=>{}))}show(e=!1){return this.wire.sendAction(\"show-window\",{force:e,...this.identity}).then((()=>{}))}showAt(e,t,n=!1){return this.wire.sendAction(\"show-at-window\",{force:n,left:Math.floor(e),top:Math.floor(t),...this.identity}).then((()=>{}))}updateOptions(e){return this.wire.sendAction(\"update-window-options\",{options:e,...this.identity}).then((()=>{}))}authenticate(e,t){return this.wire.sendAction(\"window-authenticate\",{userName:e,password:t,...this.identity}).then((()=>{}))}async showPopupMenu(e){const{payload:t}=await this.wire.sendAction(\"show-popup-menu\",{options:e,...this.identity});return t.data}async closePopupMenu(){return this.wire.sendAction(\"close-popup-menu\",{...this.identity}).then((()=>{}))}async dispatchPopupResult(e){this.wire.sendAction(\"window-dispatch-popup-result\",this.identity).catch((e=>{})),await this.wire.sendAction(\"dispatch-popup-result\",{data:e,...this.identity})}async print(e={content:\"self\"}){switch(e.content){case void 0:case\"self\":return super.print(e);case\"screenshot\":return this.wire.sendAction(\"print-screenshot\",this.identity).then((()=>{}));case\"views\":return this.wire.sendAction(\"print-views\",{...this.identity,options:e}).then((()=>{}));default:return}}}return S._Window=o,S}function ie(){return te||(te=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(function(){if(ee)return _;ee=1,Object.defineProperty(_,\"__esModule\",{value:!0}),_._WindowModule=void 0;const e=d,t=O,n=ne();class i extends e.Base{async wrap(e){this.wire.sendAction(\"window-wrap\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}wrapSync(e){this.wire.sendAction(\"window-wrap-sync\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}create(e){return this.wire.sendAction(\"create-window\").catch((e=>{})),new n._Window(this.wire,{uuid:this.me.uuid,name:e.name}).createWindow(e)}getCurrent(){if(this.wire.sendAction(\"get-current-window\").catch((e=>{})),!this.wire.me.isWindow)throw new Error(\"You are not in a Window context\");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction(\"get-current-window-sync\").catch((e=>{})),!this.wire.me.isWindow)throw new Error(\"You are not in a Window context\");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return _._WindowModule=i,_}(),e),n(ne(),e)}(M)),M}Q.promisifySubscription=async(e,t,n=(()=>!0),i)=>{let r,o,s;const a=new Promise(((e,t)=>{r=e,o=t})),c=e=>{n(e)&&(clearTimeout(s),r(e))};return await e.on(t,c),i&&(s=setTimeout((()=>o(new Error(\"event timed out\"))),i)),a.finally((()=>{e.removeListener(t,c).catch((()=>null))})),{getValue:()=>a}},Object.defineProperty(c,\"__esModule\",{value:!0}),c.System=void 0;const re=d,oe=g,se=ie(),ae=t;class ce extends re.EmitterBase{constructor(e){super(e,\"system\")}sendExternalProcessRequest(e,t){return new Promise(((n,i)=>{const r=\"external-process-exited\";let o,s,a,c;\"function\"==typeof t.listener&&(a=e=>{const n=e||{};s={topic:\"exited\",uuid:n.processUuid||\"\",exitCode:n.exitCode||0},o===e.processUuid&&(t.listener(s),c.removeListener(r,a))},this.wire.me.name||(this.wire.me.name=this.wire.me.uuid),c=new se._Window(this.wire,this.wire.me),c.on(r,a)),this.wire.sendAction(e,t).then((({payload:e})=>{o=e.data.uuid,n(e.data),s&&o===s.uuid&&(t.listener(s),c.removeListener(r,a))})).catch((e=>{c&&c.removeListener(r,a),i(e)}))}))}getVersion(){return this.wire.sendAction(\"get-version\").then((({payload:e})=>e.data))}clearCache(e){return this.wire.sendAction(\"clear-cache\",e).then((()=>{}))}deleteCacheOnExit(){return this.wire.sendAction(\"delete-cache-request\").then((()=>{}))}exit(){return this.wire.sendAction(\"exit-desktop\").then((()=>{}))}async fetchManifest(e){const{payload:{data:t}}=await this.wire.sendAction(\"fetch-manifest\",{manifestUrl:e});return t}flushCookieStore(){return this.wire.sendAction(\"flush-cookie-store\").then((()=>{}))}getAllWindows(){return this.wire.sendAction(\"get-all-windows\").then((({payload:e})=>e.data))}getAllApplications(){return this.wire.sendAction(\"get-all-applications\").then((({payload:e})=>e.data))}getCommandLineArguments(){return this.wire.sendAction(\"get-command-line-arguments\").then((({payload:e})=>e.data))}async getCrashReporterState(){const{payload:{data:{diagnosticMode:e,isRunning:t}}}=await this.wire.sendAction(\"get-crash-reporter-state\");return console.warn(\"diagnosticMode property is deprecated. It will be removed in a future version\"),{diagnosticMode:e,diagnosticsMode:e,isRunning:t}}async startCrashReporter(e){const t=e,n={...t,diagnosticMode:t.diagnosticsMode||t.diagnosticMode},{payload:{data:{diagnosticMode:i,isRunning:r}}}=await this.wire.sendAction(\"start-crash-reporter\",n);return{diagnosticMode:i,diagnosticsMode:i,isRunning:r}}getUniqueUserId(){return this.wire.sendAction(\"get-unique-user-id\").then((({payload:e})=>e.data))}getEntityInfo(e,t){return this.wire.sendAction(\"get-entity-info\",{uuid:e,name:t}).then((({payload:e})=>e.data))}getEnvironmentVariable(e){return this.wire.sendAction(\"get-environment-variable\",{environmentVariables:e}).then((({payload:e})=>e.data))}getFocusedWindow(){return this.wire.sendAction(\"get-focused-window\").then((({payload:e})=>e.data))}async isAppCertified(e){const{payload:{data:{certifiedInfo:t}}}=await this.wire.sendAction(\"is-app-certified\",{manifestUrl:e});return t}getInstalledRuntimes(){return this.wire.sendAction(\"get-installed-runtimes\").then((({payload:e})=>e.data.runtimes))}async getInstalledApps(){const{payload:{data:{installedApps:e}}}=await this.wire.sendAction(\"get-installed-apps\");return e}getLog(e){return this.wire.sendAction(\"view-log\",e).then((({payload:e})=>e.data))}getMachineId(){return this.wire.sendAction(\"get-machine-id\").then((({payload:e})=>e.data))}getMinLogLevel(){return this.wire.sendAction(\"get-min-log-level\").then((({payload:e})=>e.data))}getLogList(){return this.wire.sendAction(\"list-logs\").then((({payload:e})=>e.data))}getMonitorInfo(){return this.wire.sendAction(\"get-monitor-info\").then((({payload:e})=>e.data))}getMousePosition(){return this.wire.sendAction(\"get-mouse-position\").then((({payload:e})=>e.data))}getProcessList(){return console.warn(\"System.getProcessList has been deprecated. Please consider using our new process APIs: Window.getProcessInfo, View.getProcessInfo, Application.getProcessInfo, System.getAllProcessInfo\"),this.wire.sendAction(\"process-snapshot\").then((({payload:e})=>e.data))}async getAllProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction(\"get-all-process-info\",this.identity);return e}getProxySettings(){return this.wire.sendAction(\"get-proxy-settings\").then((({payload:e})=>e.data))}getRuntimeInfo(){return this.wire.sendAction(\"get-runtime-info\").then((({payload:e})=>e.data))}getRvmInfo(){return this.wire.sendAction(\"get-rvm-info\").then((({payload:e})=>e.data))}getHostSpecs(){return this.wire.sendAction(\"get-host-specs\").then((({payload:e})=>e.data))}getOSInfo(){return this.wire.sendAction(\"get-os-info\").then((({payload:e})=>e.data))}launchExternalProcess(e){return this.sendExternalProcessRequest(\"launch-external-process\",e)}monitorExternalProcess(e){return this.sendExternalProcessRequest(\"monitor-external-process\",e)}log(e,t){return this.wire.sendAction(\"write-to-log\",{level:e,message:t}).then((()=>{}))}openUrlWithBrowser(e){return this.wire.sendAction(\"open-url-with-browser\",{url:e}).then((()=>{}))}async registerCustomProtocol(e){if(\"object\"!=typeof e)throw new Error(\"Must provide an object with a `protocolName` property having a string value.\");await this.wire.sendAction(\"register-custom-protocol\",e)}async unregisterCustomProtocol(e){await this.wire.sendAction(\"unregister-custom-protocol\",{protocolName:e})}async getCustomProtocolState(e){return this.wire.sendAction(\"get-custom-protocol-state\",{protocolName:e}).then((({payload:e})=>e.data))}releaseExternalProcess(e){return this.wire.sendAction(\"release-external-process\",{uuid:e}).then((()=>{}))}showDeveloperTools(e){return this.wire.sendAction(\"show-developer-tools\",e).then((()=>{}))}terminateExternalProcess(e){return this.wire.sendAction(\"terminate-external-process\",e).then((()=>{}))}updateProxySettings(e){return this.wire.sendAction(\"update-proxy\",e).then((()=>{}))}async downloadAsset(e,t){const n=()=>{};let i=n,r=n;const o=new Promise(((e,t)=>{i=e,r=t}));if(\"openfin\"!==this.wire.environment.type)throw new oe.NotSupportedError(\"downloadAsset only supported in an OpenFin Render process\");const s=oe.RuntimeError.getCallSite(),a=this.wire.environment.getNextMessageId().toString(),c=`asset-download-progress-${a}`,d=`asset-download-error-${a}`,h=`asset-download-complete-${a}`,l=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},u=()=>{this.removeListener(c,l)};await Promise.all([this.on(c,l),this.once(d,(e=>{u();const{reason:t,err:n}=e;r(new oe.RuntimeError({reason:t,error:n},s))})),this.once(h,(()=>{u(),i()}))]);const p=Object.assign(e,{downloadId:a});return await this.wire.sendAction(\"download-asset\",p).catch((e=>{throw u(),e})),o}downloadRuntime(e,t){const n=oe.RuntimeError.getCallSite();return new Promise(((i,r)=>{if(\"openfin\"!==this.wire.environment.type)return void r(new oe.NotSupportedError(\"downloadRuntime only supported in an OpenFin Render process\"));const o=this.wire.environment.getNextMessageId().toString(),s=`runtime-download-progress-${o}`,a=`runtime-download-error-${o}`,c=`runtime-download-complete-${o}`,d=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},h=()=>{this.removeListener(s,d)};this.on(s,d),this.once(a,(e=>{h();const{reason:t,err:i}=e;r(new oe.RuntimeError({reason:t,error:i},n))})),this.once(c,(()=>{h(),i()}));const l=Object.assign(e,{downloadId:o});this.wire.sendAction(\"download-runtime\",l).catch((e=>{h(),r(e)}))}))}downloadPreloadScripts(e){return this.wire.sendAction(\"download-preload-scripts\",{scripts:e}).then((({payload:e})=>e.data))}getAllExternalApplications(){return this.wire.sendAction(\"get-all-external-applications\").then((({payload:e})=>e.data))}getAppAssetInfo(e){return this.wire.sendAction(\"get-app-asset-info\",e).then((({payload:e})=>e.data))}getCookies(e){const t=this.wire.environment.getUrl(),n=Object.assign(e,{url:t});return this.wire.sendAction(\"get-cookies\",n).then((({payload:e})=>e.data))}setMinLogLevel(e){return this.wire.sendAction(\"set-min-log-level\",{level:e}).then((()=>{}))}resolveUuid(e){return this.wire.sendAction(\"resolve-uuid\",{entityKey:e}).then((({payload:e})=>e.data))}executeOnRemote(e,t){return t.requestingIdentity=e,this.wire.ferryAction(t)}readRegistryValue(e,t,n){return this.wire.sendAction(\"read-registry-value\",{rootKey:e,subkey:t,value:n}).then((({payload:e})=>e.data))}registerExternalConnection(e){return this.wire.sendAction(\"register-external-connection\",{uuid:e}).then((({payload:e})=>e.data))}async getServiceConfiguration(e){if(\"string\"!=typeof e.name)throw new Error(\"Must provide an object with a `name` property having a string value\");const{name:t}=e;return this.wire.sendAction(\"get-service-configuration\",{name:t}).then((({payload:e})=>e.data))}async getSystemAppConfig(e){if(\"string\"!=typeof e)throw new Error(\"Must provide a string value for name of system app\");return this.wire.sendAction(\"get-system-app-configuration\",{name:e}).then((({payload:e})=>e.data))}async registerShutdownHandler(e){this.wire.sendAction(\"system-register-shutdown-handler\").catch((e=>{}));const{uuid:t,name:n}=this.wire.me;this.on(\"system-shutdown\",(i=>{e({proceed:()=>{this.wire.environment.raiseEvent(\"application/system-shutdown-handled\",{uuid:t,name:n,topic:\"application\"})}})}))}runRvmHealthCheck(){return this.wire.sendAction(\"run-rvm-health-check\").then((({payload:e})=>e.data))}async launchManifest(e,t={}){const{subscribe:n,...i}=t,r=i;if(n){const e=new ae.EventEmitter;n(e);const t=\"app-version-progress\",i=\"runtime-status\",o=\"app-version-complete\",s=\"app-version-error\",a=this.wire.environment.getNextMessageId().toString();r.appVersionId=a;const c=[o,t,i,s],d=e=>{const{appVersionId:t,topic:n,type:i,...r}=e;return{...r,type:c.find((e=>i.includes(e)))}},h=t=>{const n=d(t);e.emit(n.type,n)},l=()=>{this.removeListener(`${t}.${a}`,h),this.removeListener(`${i}.${a}`,h),this.removeListener(`${o}.${a}`,h),this.removeListener(`${s}.${a}`,h),this.removeListener(`${o}.${a}`,l),this.removeListener(`${s}.${a}`,l)};await Promise.all([this.on(`${t}.${a}`,h),this.on(`${i}.${a}`,h),this.once(`${o}.${a}`,h),this.once(`${s}.${a}`,h),this.once(`${o}.${a}`,l),this.once(`${s}.${a}`,l)])}return(await this.wire.sendAction(\"launch-manifest\",{manifestUrl:e,opts:r})).payload.data.manifest}async queryPermissionForCurrentContext(e){const t={uuid:this.wire.me.uuid,name:this.wire.me.name};return(await this.wire.sendAction(\"query-permission-for-current-context\",{apiName:e,identity:t})).payload.data}async enableNativeWindowIntegrationProvider(e){const{payload:t}=await this.wire.sendAction(\"enable-native-window-integration-provider\",{permissions:e});return t.data}async registerUsage({data:e,type:t}){await this.wire.sendAction(\"register-usage\",{data:e,type:t})}async getPrinters(){const{payload:e}=await this.wire.sendAction(\"system-get-printers\");return e.data}async updateProcessLoggingOptions(e){await this.wire.sendAction(\"system-update-process-logging-options\",{options:e})}async getDomainSettings(){const{payload:{data:e}}=await this.wire.sendAction(\"get-domain-settings\",this.identity);return e}async setDomainSettings(e){await this.wire.sendAction(\"set-domain-settings\",{domainSettings:e,...this.identity})}async refreshExtensions(){const{payload:e}=await this.wire.sendAction(\"refresh-extensions\");return e.data}async getInstalledExtensions(){const{payload:e}=await this.wire.sendAction(\"get-installed-extensions\");return e.data}}c.System=ce;var de={},he={};Object.defineProperty(he,\"__esModule\",{value:!0}),he.RefCounter=void 0;he.RefCounter=class{constructor(){this.topicRefMap=new Map}incRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t+1;n=i,this.topicRefMap.set(e,i)}else this.topicRefMap.set(e,1),n=1;return n}decRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t-1;this.topicRefMap.set(e,i),n=i}else n=-1;return n}actOnFirst(e,t,n){return 1===this.incRefCount(e)?t():n()}actOnLast(e,t,n){return 0===this.decRefCount(e)?t():n()}};var le={},ue={},pe={};Object.defineProperty(pe,\"__esModule\",{value:!0}),pe.ChannelBase=pe.ProtectedItems=void 0;const we=e=>async(t,n,i)=>{const r=await e(t,n,i);return void 0===r?n:r};pe.ProtectedItems=class{constructor(e,t){this.providerIdentity=e,this.close=t}};class ye{static defaultAction(e){throw new Error(`No action registered at target for ${e}`)}constructor(){this.subscriptions=new Map}async processAction(e,t,n){try{const i=this.subscriptions.has(e)?this.subscriptions.get(e):(t,n)=>(this.defaultAction??ye.defaultAction)(e,t,n),r=this.preAction?await this.preAction(e,t,n):t,o=await i(r,n);return this.postAction?await this.postAction(e,o,n):o}catch(t){if(this.errorMiddleware)return this.errorMiddleware(e,t,n);throw t}}beforeAction(e){if(this.preAction)throw new Error(\"Already registered beforeAction middleware\");this.preAction=we(e)}onError(e){if(this.errorMiddleware)throw new Error(\"Already registered error middleware\");this.errorMiddleware=e}afterAction(e){if(this.postAction)throw new Error(\"Already registered afterAction middleware\");this.postAction=we(e)}remove(e){this.subscriptions.delete(e)}setDefaultAction(e){if(this.defaultAction)throw new Error(\"default action can only be set once\");this.defaultAction=e}register(e,t){if(this.subscriptions.has(e))throw new Error(`Subscription already registered for action: ${e}. Unsubscribe before adding new subscription`);return this.subscriptions.set(e,t),!0}}pe.ChannelBase=ye;var fe,ge,me,ve=s&&s.__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)},Ce=s&&s.__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};Object.defineProperty(ue,\"__esModule\",{value:!0}),ue.ChannelClient=void 0;const be=pe,Ie=new Map;class Ee extends be.ChannelBase{static closeChannelByEndpointId(e){const t=Ie.get(e);t&&ve(t,me,\"f\").call(t)}static handleProviderDisconnect(e){for(const t of Ie.values())t.providerIdentity.channelId===e.channelId&&(t.disconnectListener(e),ve(t,me,\"f\").call(t))}constructor(e,t,n){super(),fe.set(this,void 0),ge.set(this,void 0),this.processAction=(e,t,n)=>super.processAction(e,t,n),me.set(this,(()=>{Ie.delete(this.endpointId),ve(this,ge,\"f\").close()})),Ce(this,fe,new be.ProtectedItems(e,t),\"f\"),this.disconnectListener=()=>{},this.endpointId=e.endpointId,Ce(this,ge,n,\"f\"),Ie.set(this.endpointId,this),n.receive(this.processAction)}get providerIdentity(){return ve(this,fe,\"f\").providerIdentity}async dispatch(e,t){if(ve(this,ge,\"f\").isEndpointConnected(this.providerIdentity.channelId))return ve(this,ge,\"f\").send(this.providerIdentity.channelId,e,t);throw new Error(\"The client you are trying to dispatch from is disconnected from the target provider.\")}onDisconnection(e){this.disconnectListener=t=>{try{e(t)}catch(e){throw new Error(`Error while calling the onDisconnection callback: ${e.message}`)}finally{this.disconnectListener=()=>{}}}}async disconnect(){await this.sendDisconnectAction(),ve(this,me,\"f\").call(this)}async sendDisconnectAction(){const e=ve(this,fe,\"f\");await e.close()}static async wireClose(e,t,n){const{channelName:i,uuid:r,name:o}=t;await e.sendAction(\"disconnect-from-channel\",{channelName:i,uuid:r,name:o,endpointId:n})}}ue.ChannelClient=Ee,fe=new WeakMap,ge=new WeakMap,me=new WeakMap;var xe={},Ae={};Object.defineProperty(Ae,\"__esModule\",{value:!0}),Ae.exhaustiveCheck=void 0,Ae.exhaustiveCheck=function(e,t){throw new Error(`Unsupported value: ${e}${t?`\\n Supported values are: ${t.join(\"\")}`:\"\"}`)};var Pe,Me,_e,Oe={},Se=s&&s.__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},Re=s&&s.__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)};Object.defineProperty(Oe,\"__esModule\",{value:!0}),Oe.ClassicInfo=Oe.ClassicStrategy=void 0;Oe.ClassicStrategy=class{constructor(e,t,n,i){this.messageReceiver=t,this.endpointId=n,this.providerIdentity=i,Pe.set(this,void 0),Me.set(this,new Map),_e.set(this,new Map),this.send=async(e,t,n)=>{const i=Re(this,Me,\"f\").get(e);if(!i)throw new Error(`Could not locate routing info for endpoint ${e}`);const r={...i};r.isLocalEndpointId&&delete r.endpointId,delete r.isLocalEndpointId;const o=Re(this,Pe,\"f\").sendAction(\"send-channel-message\",{...r,providerIdentity:this.providerIdentity,action:t,payload:n});Re(this,_e,\"f\").get(e)?.add(o);return(await o.catch((e=>{throw new Error(e.message)})).finally((()=>{Re(this,_e,\"f\").get(e)?.delete(o)}))).payload.data.result},this.close=async()=>{this.messageReceiver.removeEndpoint(this.providerIdentity.channelId,this.endpointId),[...Re(this,Me,\"f\").keys()].forEach((e=>this.closeEndpoint(e))),Se(this,Me,new Map,\"f\")},Se(this,Pe,e,\"f\")}onEndpointDisconnect(e,t){}receive(e){this.messageReceiver.addEndpoint(e,this.providerIdentity.channelId,this.endpointId)}async closeEndpoint(e){const t=Re(this,Me,\"f\").get(e);Re(this,Me,\"f\").delete(e);const n=Re(this,_e,\"f\").get(e);n?.forEach((n=>{const i=`Channel connection with identity uuid: ${t?.uuid} / name: ${t?.name} / endpointId: ${e} no longer connected.`;n.cancel(new Error(i))}))}isEndpointConnected(e){return Re(this,Me,\"f\").has(e)}addEndpoint(e,t){Re(this,Me,\"f\").set(e,t.endpointIdentity),Re(this,_e,\"f\").set(e,new Set)}isValidEndpointPayload(e){return\"string\"==typeof e?.endpointIdentity?.endpointId||\"string\"==typeof e?.endpointIdentity?.channelId}},Pe=new WeakMap,Me=new WeakMap,_e=new WeakMap,Oe.ClassicInfo={version:5,minimumVersion:0,type:\"classic\"};var Fe={},je={},ke={};Object.defineProperty(ke,\"__esModule\",{value:!0}),ke.errorToPOJO=void 0,ke.errorToPOJO=function(e){return{stack:e.stack,name:e.name,message:e.message,toString:()=>e.stack||e.toString()}};var Le,Te,$e=s&&s.__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)},Be=s&&s.__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};Object.defineProperty(je,\"__esModule\",{value:!0}),je.RTCEndpoint=void 0;const Ge=ke;je.RTCEndpoint=class{static isValidEndpointPayload(e){const t=e=>\"object\"==typeof e&&null!==e;return t(e)&&t(e.endpointIdentity)&&t(e.rtc)&&\"string\"==typeof e.endpointIdentity.endpointId}constructor({rtc:e,endpointIdentity:t}){this.responseMap=new Map,Le.set(this,null),Te.set(this,void 0),this.connectionStateChangeHandler=e=>{\"connected\"!==this.rtc.rtcClient.connectionState&&(this.rtc.rtcClient.removeEventListener(\"connectionstatechange\",this.connectionStateChangeHandler),this.close(),$e(this,Te,\"f\")&&$e(this,Te,\"f\").call(this))},this.send=async(e,t)=>{const n=`message-${Math.random()}`,i=new Promise(((e,t)=>{this.responseMap.set(n,{resolve:e,reject:t})}));return this.rtc.channels.request.send(JSON.stringify({action:e,payload:t,messageId:n})),i},this.close=()=>{this.responseMap.forEach((e=>e.reject(\"Connection has closed.\"))),this.responseMap=new Map,this.rtc.channels.request.close(),this.rtc.channels.response.close(),this.rtc.rtcClient.close()},this.rtc=e,this.endpointIdentity=t,this.rtc.channels.response.addEventListener(\"message\",(e=>{let{data:t}=e;e.data instanceof ArrayBuffer&&(t=(new TextDecoder).decode(e.data));const{messageId:n,payload:i,success:r,error:o}=JSON.parse(t),{resolve:s,reject:a}=this.responseMap.get(n)??{};s&&a?(this.responseMap.delete(n),r?s(i):a(o)):(console.log(\"Could not find id in responseMap.\"),console.log(e))})),this.rtc.channels.request.addEventListener(\"message\",(async e=>{let{data:n}=e;e.data instanceof ArrayBuffer&&(n=(new TextDecoder).decode(e.data));const{messageId:i,action:r,payload:o}=JSON.parse(n);if($e(this,Le,\"f\"))try{const e=await $e(this,Le,\"f\").call(this,r,o,t);this.rtc.channels.response.send(JSON.stringify({messageId:i,payload:e,success:!0}))}catch(e){\"open\"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,error:(0,Ge.errorToPOJO)(e),success:!1}))}else\"open\"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,success:!1,error:\"Connection not ready.\"}))})),this.rtc.rtcClient.addEventListener(\"connectionstatechange\",this.connectionStateChangeHandler),Object.values(this.rtc.channels).forEach((e=>{e.onclose=e=>{[...this.responseMap.values()].forEach((e=>e.reject(new Error(\"RTCDataChannel closed unexpectedly, this is most commonly caused by message size. Note: RTC Channels have a message size limit of ~255kB.\")))),this.close(),$e(this,Te,\"f\")&&$e(this,Te,\"f\").call(this)}}))}onDisconnect(e){if($e(this,Te,\"f\"))throw new Error(\"RTCEndpoint disconnectListener cannot be set twice.\");Be(this,Te,e,\"f\")}receive(e){if($e(this,Le,\"f\"))throw new Error(\"You have already set a listener for this RTC Endpoint.\");Be(this,Le,e,\"f\")}get connected(){return\"connected\"===this.rtc.rtcClient.connectionState}},Le=new WeakMap,Te=new WeakMap;var We,He,Ne,De={},Ue=s&&s.__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)},Ve=s&&s.__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};Object.defineProperty(De,\"__esModule\",{value:!0}),De.EndpointStrategy=void 0;De.EndpointStrategy=class{constructor(e,t,n){this.EndpointType=e,this.StrategyName=n,We.set(this,null),He.set(this,new Map),Ne.set(this,!0),this.send=async(e,t,n)=>this.getEndpointById(e).send(t,n),this.close=async()=>{Ue(this,Ne,\"f\")&&(Ue(this,He,\"f\").forEach((e=>e.close())),Ve(this,He,new Map,\"f\")),Ve(this,Ne,!1,\"f\")},this.isValidEndpointPayload=t}onEndpointDisconnect(e,t){this.getEndpointById(e).onDisconnect(t)}receive(e){if(Ue(this,We,\"f\"))throw new Error(`You have already set a listener for this ${this.StrategyName} Strategy`);Ve(this,We,e,\"f\"),Ue(this,He,\"f\").forEach((e=>e.receive(Ue(this,We,\"f\"))))}getEndpointById(e){const t=Ue(this,He,\"f\").get(e);if(!t)throw new Error(`Client with endpoint id ${e} is not connected`);return t}get connected(){return Ue(this,Ne,\"f\")}isEndpointConnected(e){return Ue(this,He,\"f\").has(e)}addEndpoint(e,t){if(!Ue(this,Ne,\"f\"))return void console.warn(`Adding endpoint to disconnected ${this.StrategyName} Strategy`);const n=new this.EndpointType(t);Ue(this,We,\"f\")&&n.receive(Ue(this,We,\"f\")),Ue(this,He,\"f\").set(e,n)}async closeEndpoint(e){Ue(this,He,\"f\").delete(e)}},We=new WeakMap,He=new WeakMap,Ne=new WeakMap,Object.defineProperty(Fe,\"__esModule\",{value:!0}),Fe.RTCInfo=Fe.RTCStrategy=void 0;const ze=je,Ke=De;class qe extends Ke.EndpointStrategy{constructor(){super(ze.RTCEndpoint,ze.RTCEndpoint.isValidEndpointPayload,\"RTC\")}}Fe.RTCStrategy=qe,Fe.RTCInfo={version:2,minimumVersion:0,type:\"rtc\"};var Je={};Object.defineProperty(Je,\"__esModule\",{value:!0}),Je.RTCICEManager=void 0;const Ye=d;class Ze extends Ye.EmitterBase{constructor(e){super(e,\"channel\"),this.ensureChannelOpened=e=>new Promise(((t,n)=>{if(\"open\"===e.readyState)t();else if(\"connecting\"===e.readyState){const n=()=>{e.removeEventListener(\"open\",n),t()};e.addEventListener(\"open\",n)}else n(new Error(\"This Channel has already closed\"))}))}static createDataChannelPromise(e,t){let n;const i=new Promise((e=>{n=e})),r=i=>{const o=()=>{i.channel.removeEventListener(\"open\",o),n(i.channel)};i.channel.label===e&&(i.channel.addEventListener(\"open\",o),t.removeEventListener(\"datachannel\",r))};return t.addEventListener(\"datachannel\",r),i}async listenForProviderIce(e,t){await this.on(this.createProviderEventName(e),t,{timestamp:Date.now()})}async raiseProviderIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createProviderEventName(e)),t)}async listenForClientIce(e,t){await this.on(this.createClientEventName(e),t,{timestamp:Date.now()})}async raiseClientIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createClientEventName(e)),t)}cleanupIceListeners(e){this.removeAllListeners(this.createClientEventName(e)),this.removeAllListeners(this.createProviderEventName(e))}createClientEventName(e){return`ice-client-${e}`}createProviderEventName(e){return`ice-provider-${e}`}createRouteString(e){return`channel/${e}`}createRtcPeer(){return this.wire.environment.getRtcPeer()}async startClientOffer(){const e=Math.random().toString(),t=this.createRtcPeer();t.addEventListener(\"icecandidate\",(async t=>{t.candidate&&await this.raiseClientIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForProviderIce(e,(async e=>{await t.addIceCandidate(e.candidate)}));const n={request:t.createDataChannel(\"request\"),response:t.createDataChannel(\"response\")},i=await t.createOffer();await t.setLocalDescription(i);const r=Promise.all([n.request,n.response].map(this.ensureChannelOpened)).then((()=>{}));return{rtcClient:t,channels:n,offer:i,rtcConnectionId:e,channelsOpened:r}}async finishClientOffer(e,t,n){return await e.setRemoteDescription(t),await n,!0}async createProviderAnswer(e,t){const n=this.createRtcPeer(),i=Ze.createDataChannelPromise(\"request\",n),r=Ze.createDataChannelPromise(\"response\",n);n.addEventListener(\"icecandidate\",(async t=>{t.candidate&&await this.raiseProviderIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForClientIce(e,(async e=>{await n.addIceCandidate(e.candidate)})),await n.setRemoteDescription(t);const o=await n.createAnswer();await n.setLocalDescription(o);const s=Promise.all([i,r]).then((([t,n])=>(this.cleanupIceListeners(e),{request:t,response:n})));return{rtcClient:n,answer:o,channels:s}}}Je.RTCICEManager=Ze;var Qe={},Xe={};function et(e){return[...e.split(\".\").reverse().entries()].reduce(((e,[t,n])=>e+ +n*1e4**t),0)}function tt(e,t){return et(e)>=et(t)}function nt(e){return e.split(\"/\")[0]}Object.defineProperty(Xe,\"__esModule\",{value:!0}),Xe.runtimeUuidMeetsMinimumRuntimeVersion=Xe.parseRuntimeUuid=Xe.meetsMinimumRuntimeVersion=void 0,Xe.meetsMinimumRuntimeVersion=tt,Xe.parseRuntimeUuid=nt,Xe.runtimeUuidMeetsMinimumRuntimeVersion=function(e,t){return tt(nt(e),t)};var it,rt,ot,st,at,ct=s&&s.__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)},dt=s&&s.__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};Object.defineProperty(Qe,\"__esModule\",{value:!0}),Qe.ChannelProvider=void 0;const ht=pe,lt=Xe;class ut extends ht.ChannelBase{get connections(){return[...ct(this,it,\"f\")]}static handleClientDisconnection(e,t){const n=e.connections.find((e=>e.endpointId===t.endpointId));if(n)ct(e,st,\"f\").call(e,n);else{e.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name)).forEach(ct(e,st,\"f\"))}e.disconnectListener(t)}static setProviderRemoval(e,t){ut.removalMap.set(e,t)}constructor(e,t,n){super(),it.set(this,void 0),rt.set(this,void 0),ot.set(this,void 0),st.set(this,(e=>{const t=this.connections.filter((t=>t.endpointId!==e.endpointId));ct(this,ot,\"f\").closeEndpoint(e.endpointId),dt(this,it,t,\"f\")})),this.processAction=async(e,t,n)=>(ut.clientIsMultiRuntime(n)&&!(0,lt.runtimeUuidMeetsMinimumRuntimeVersion)(n.runtimeUuid,\"18.87.56.0\")?this.handleMultiRuntimeLegacyClient(n):this.checkForClientConnection(n),super.processAction(e,t,n)),at.set(this,(()=>{ct(this,ot,\"f\").close();const e=ut.removalMap.get(this);e&&e()})),dt(this,rt,new ht.ProtectedItems(e,t),\"f\"),this.connectListener=()=>{},this.disconnectListener=()=>{},dt(this,it,[],\"f\"),dt(this,ot,n,\"f\"),n.receive(this.processAction)}dispatch(e,t,n){const i=e.endpointId??this.getEndpointIdForOpenFinId(e,t);return i&&ct(this,ot,\"f\").isEndpointConnected(i)?ct(this,ot,\"f\").send(i,t,n):Promise.reject(new Error(`Client connection with identity uuid: ${e.uuid} / name: ${e.name} / endpointId: ${i} no longer connected.`))}async processConnection(e,t){return ct(this,it,\"f\").push(e),this.connectListener(e,t)}publish(e,t){return this.connections.map((n=>ct(this,ot,\"f\").send(n.endpointId,e,t)))}onConnection(e){this.connectListener=e}onDisconnection(e){this.disconnectListener=e}async destroy(){const e=ct(this,rt,\"f\");e.providerIdentity,dt(this,it,[],\"f\"),await e.close(),ct(this,at,\"f\").call(this)}async getAllClientInfo(){return this.connections.map((e=>{const{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}=e;return{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}}))}checkForClientConnection(e){if(!this.isClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider.\\n Client Identity: {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}isClientConnected(e){return ut.clientIdentityIncludesEndpointId(e)?this.connections.some((t=>t.endpointId===e.endpointId&&t.uuid===e.uuid&&t.name===e.name)):this.isLegacyClientConnected(e)}isLegacyClientConnected(e){return this.connections.some((t=>t.uuid===e.uuid&&t.name===e.name))}handleMultiRuntimeLegacyClient(e){if(!this.isLegacyClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider. Client Identity:\\n {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}getEndpointIdForOpenFinId(e,t){const n=this.connections.filter((t=>t.name===e.name&&t.uuid===e.uuid));if(n.length>=2){const n=ct(this,rt,\"f\"),{uuid:i,name:r}=e,o=n?.providerIdentity.uuid,s=n?.providerIdentity.name;console.warn(`WARNING: Dispatch call may have unintended results. The \"to\" argument of your dispatch call is missing the\\n \"endpointId\" parameter. The identity you are dispatching to ({uuid: ${i}, name: ${r}})\\n has multiple channelClients for this channel. Your dispatched action: (${t}) from the provider:\\n ({uuid: ${o}, name: ${s}}) will only be processed by the most recently-created client.`)}return n.pop()?.endpointId}static clientIdentityIncludesEndpointId(e){return void 0!==e.endpointId}static clientIsMultiRuntime(e){return void 0!==e.runtimeUuid}static async wireClose(e,t){await e.sendAction(\"destroy-channel\",{channelName:t})}}Qe.ChannelProvider=ut,it=new WeakMap,rt=new WeakMap,ot=new WeakMap,st=new WeakMap,at=new WeakMap,ut.removalMap=new WeakMap;var pt={};Object.defineProperty(pt,\"__esModule\",{value:!0}),pt.MessageReceiver=void 0;const wt=ue,yt=d;class ft extends yt.Base{constructor(e){super(e),this.onmessage=e=>\"process-channel-message\"===e.action&&(this.processChannelMessage(e),!0),this.endpointMap=new Map,this.latestEndpointIdByChannelId=new Map,e.registerMessageHandler(this.onmessage.bind(this))}async processChannelMessage(e){const{senderIdentity:t,providerIdentity:n,action:i,ackToSender:r,payload:o,intendedTargetIdentity:s}=e.payload,a=s.channelId??s.endpointId??this.latestEndpointIdByChannelId.get(n.channelId),c=this.endpointMap.get(a);if(!c)return r.payload.success=!1,r.payload.reason=`Client connection with identity uuid: ${this.wire.me.uuid} / name: ${this.wire.me.name} / endpointId: ${a} no longer connected.`,this.wire.sendRaw(r);try{const e=await c(i,o,t);return r.payload.payload=r.payload.payload||{},r.payload.payload.result=e,this.wire.sendRaw(r)}catch(e){return r.payload.success=!1,r.payload.reason=e.message,this.wire.sendRaw(r)}}addEndpoint(e,t,n){this.endpointMap.set(n,e),t!==n&&this.latestEndpointIdByChannelId.set(t,n)}removeEndpoint(e,t){this.endpointMap.delete(t),this.latestEndpointIdByChannelId.get(e)===t&&this.latestEndpointIdByChannelId.delete(e)}checkForPreviousClientConnection(e){const t=this.latestEndpointIdByChannelId.get(e);t&&(wt.ChannelClient.closeChannelByEndpointId(t),console.warn(\"You have created a second connection to an older provider. First connection has been removed from the clientMap\"),console.warn(\"If the provider calls publish(), you may receive multiple messages.\"))}}pt.MessageReceiver=ft;var gt={};Object.defineProperty(gt,\"__esModule\",{value:!0}),gt.ProtocolManager=void 0;gt.ProtocolManager=class{constructor(e){this.ProtocolsInPreferenceOrder=e,this.DefaultClientProtocols=[\"classic\"],this.DefaultProviderProtocols=[\"classic\"],this.getClientProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultClientProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(\", \")}.`);return t},this.getProviderProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultProviderProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(\", \")}.`);return t},this.getCompatibleProtocols=(e,t)=>t.supportedProtocols.filter((t=>e.some((e=>e.type===t.type&&t.version>=e.minimumVersion&&e.version>=(t.minimumVersion??0))))).slice(0,t.maxProtocols)}};var mt={};Object.defineProperty(mt,\"__esModule\",{value:!0});class vt{static combine(e,t){return new vt(e,t)}constructor(e,t){this.primary=e,this.secondary=t}onEndpointDisconnect(e,t){this.primary.onEndpointDisconnect(e,(()=>{this.secondary.isEndpointConnected(e)||t()})),this.secondary.onEndpointDisconnect(e,(()=>{this.primary.isEndpointConnected(e)||t()}))}isValidEndpointPayload(e){return this.primary.isValidEndpointPayload(e)||this.secondary.isValidEndpointPayload(e)}async closeEndpoint(e){await this.primary.closeEndpoint(e),await this.secondary.closeEndpoint(e)}isEndpointConnected(e){return this.primary.isEndpointConnected(e)||this.secondary.isEndpointConnected(e)}async addEndpoint(e,t){this.primary.isValidEndpointPayload(t)&&await this.primary.addEndpoint(e,t),this.secondary.isValidEndpointPayload(t)&&await this.secondary.addEndpoint(e,t)}receive(e){this.primary.receive(e),this.secondary.receive(e)}send(e,t,n){return this.primary.isEndpointConnected(e)?this.primary.send(e,t,n):this.secondary.send(e,t,n)}async close(){await Promise.all([this.primary.close(),this.secondary.close()])}}mt.default=vt;var Ct,bt,It=s&&s.__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},Et=s&&s.__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)},xt=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(xe,\"__esModule\",{value:!0}),xe.ConnectionManager=void 0;const At=Ae,Pt=d,Mt=Oe,_t=Fe,Ot=Je,St=Qe,Rt=pt,Ft=gt,jt=xt(mt);class kt extends Pt.Base{static getProtocolOptionsFromStrings(e){return e.map((e=>{switch(e){case\"rtc\":return _t.RTCInfo;case\"classic\":return Mt.ClassicInfo;default:return(0,At.exhaustiveCheck)(e,[\"rtc\",\"classic\"])}}))}constructor(e){super(e),Ct.set(this,void 0),bt.set(this,void 0),this.removeChannelFromProviderMap=e=>{this.providerMap.delete(e)},this.onmessage=e=>\"process-channel-connection\"===e.action&&(this.processChannelConnection(e),!0),this.providerMap=new Map,this.protocolManager=new Ft.ProtocolManager(\"node\"===this.wire.environment.type?[\"classic\"]:[\"rtc\",\"classic\"]),It(this,Ct,new Rt.MessageReceiver(e),\"f\"),It(this,bt,new Ot.RTCICEManager(e),\"f\"),e.registerMessageHandler(this.onmessage.bind(this))}createProvider(e,t){const n=Object.assign(this.wire.environment.getDefaultChannelOptions().create,e||{}),i=this.protocolManager.getProviderProtocols(n?.protocols),r=i.map((e=>{switch(e){case\"rtc\":return new _t.RTCStrategy;case\"classic\":return new Mt.ClassicStrategy(this.wire,Et(this,Ct,\"f\"),t.channelId,t);default:return(0,At.exhaustiveCheck)(e,[\"rtc\",\"classic\"])}}));let o;if(2===r.length){const[e,t]=r;o=jt.default.combine(e,t)}else{if(1!==r.length)throw new Error(\"failed to combine strategies\");[o]=r}const s=new St.ChannelProvider(t,(()=>St.ChannelProvider.wireClose(this.wire,t.channelName)),o),a=t.channelId;return this.providerMap.set(a,{provider:s,strategy:o,supportedProtocols:kt.getProtocolOptionsFromStrings(i)}),St.ChannelProvider.setProviderRemoval(s,this.removeChannelFromProviderMap.bind(this)),s}async createClientOffer(e){const t=this.protocolManager.getClientProtocols(e?.protocols);let n;return{offer:{supportedProtocols:await Promise.all(t.map((async e=>{switch(e){case\"rtc\":{const{rtcClient:e,channels:t,offer:i,rtcConnectionId:r,channelsOpened:o}=await Et(this,bt,\"f\").startClientOffer();return n={rtcClient:e,channels:t,channelsOpened:o},{type:\"rtc\",version:_t.RTCInfo.version,payload:{offer:i,rtcConnectionId:r}}}case\"classic\":return{type:\"classic\",version:Mt.ClassicInfo.version};default:return(0,At.exhaustiveCheck)(e,[\"rtc\",\"classic\"])}}))),maxProtocols:2},rtc:n}}async createClientStrategy(e,t){t.endpointId||(t.endpointId=this.wire.environment.getNextMessageId(),Et(this,Ct,\"f\").checkForPreviousClientConnection(t.channelId));const n=t.answer??{supportedProtocols:[{type:\"classic\",version:1}]},i=(await Promise.all(n.supportedProtocols.map((async n=>\"rtc\"===n.type&&e?(await Et(this,bt,\"f\").finishClientOffer(e.rtcClient,n.payload.answer,e.channelsOpened),new _t.RTCStrategy):\"classic\"===n.type?new Mt.ClassicStrategy(this.wire,Et(this,Ct,\"f\"),t.endpointId,t):null)))).filter((e=>null!==e));let r;if(e&&!i.some((e=>e instanceof _t.RTCStrategy))&&e&&e.rtcClient.close(),i.length>=2)r=jt.default.combine(i[0],i[1]);else{if(!i.length)throw new Error(\"No compatible protocols\");[r]=i}const o={endpointIdentity:t,rtc:e};return r.addEndpoint(t.channelId,o),r}async processChannelConnection(e){const{clientIdentity:t,providerIdentity:n,ackToSender:i,payload:r,offer:o}=e.payload;t.endpointId?t.isLocalEndpointId=!1:(t.endpointId=this.wire.environment.getNextMessageId(),t.isLocalEndpointId=!0);const s=n.channelId,a=this.providerMap.get(s);if(!a)return i.payload.success=!1,i.payload.reason=`Channel \"${n.channelName}\" has been destroyed.`,this.wire.sendRaw(i);const{provider:c,strategy:d,supportedProtocols:h}=a;try{if(!(c instanceof St.ChannelProvider))throw Error(\"Cannot connect to a channel client\");const e=o??{supportedProtocols:[{type:\"classic\",version:1}],maxProtocols:1},n=this.protocolManager.getCompatibleProtocols(h,e);if(!n.length)throw new Error(\"This provider does not support any of the offered protocols.\");const s=await c.processConnection(t,r);i.payload.payload=i.payload.payload||{};let a={supportedProtocols:[],endpointPayloadPromise:Promise.resolve({endpointIdentity:t})};return a=await n.reduce((async(e,t)=>{const n=await e;if(\"rtc\"===t.type){const{answer:e,rtcClient:i,channels:r}=await Et(this,bt,\"f\").createProviderAnswer(t.payload.rtcConnectionId,t.payload.offer);n.supportedProtocols.push({type:\"rtc\",version:_t.RTCInfo.version,payload:{answer:e}}),n.endpointPayloadPromise=n.endpointPayloadPromise.then((e=>r.then((t=>({...e,rtc:{rtcClient:i,channels:t}})))))}else n.supportedProtocols.push({type:\"classic\",version:Mt.ClassicInfo.version});return n}),Promise.resolve(a)),a.endpointPayloadPromise.then((e=>d.addEndpoint(t.endpointId,e))),i.payload.payload.result=s,i.payload.payload.answer=a,this.wire.sendRaw(i)}catch(e){return i.payload.success=!1,i.payload.reason=e.message,this.wire.sendRaw(i)}}}xe.ConnectionManager=kt,Ct=new WeakMap,bt=new WeakMap;var Lt,Tt,$t,Bt=s&&s.__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},Gt=s&&s.__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)};Object.defineProperty(le,\"__esModule\",{value:!0}),le.Channel=void 0;const Wt=t,Ht=G,Nt=d,Dt=ue,Ut=xe,Vt=Qe;function zt(e){const t=Math.floor(e/10),n=Math.min(3e4,500*2**t);return new Promise((e=>{setTimeout((()=>{e(!1)}),n)}))}class Kt extends Nt.EmitterBase{constructor(e){super(e,\"channel\"),Lt.set(this,void 0),Tt.set(this,new Wt.EventEmitter),$t.set(this,new Ht.AsyncRetryableLazy((async()=>{await Promise.all([this.on(\"disconnected\",(e=>{Dt.ChannelClient.handleProviderDisconnect(e)})),this.on(\"connected\",((...e)=>{Gt(this,Tt,\"f\").emit(\"connected\",...e)}))]).catch((()=>new Error(\"error setting up channel connection listeners\")))}))),Bt(this,Lt,new Ut.ConnectionManager(e),\"f\")}async getAllChannels(){return this.wire.sendAction(\"get-all-channels\").then((({payload:e})=>e.data))}async onChannelConnect(e){await this.on(\"connected\",e)}async onChannelDisconnect(e){await this.on(\"disconnected\",e)}async safeConnect(e,t,n){const i={count:0};do{let r=()=>{};const o=new Promise((t=>{r=n=>{e===n.channelName&&t(!0)},Gt(this,Tt,\"f\").on(\"connected\",r)}));try{if(i.count>0){i.gotConnectedEvent=await Promise.race([zt(i.count),o]);const t=await this.wire.sendAction(\"connect-to-channel\",{...n,retryInfo:i});return console.log(`Successfully connected to channelName: ${e}`),t.payload.data}const t=this.wire.sendAction(\"connect-to-channel\",n);i.originalMessageId=t.messageId;return(await t).payload.data}catch(n){if(!n.message.includes(\"internal-nack\"))throw n;t&&0===i.count&&console.warn(`No channel found for channelName: ${e}. Waiting for connection...`)}finally{i.count+=1,Gt(this,Tt,\"f\").removeListener(\"connected\",r)}}while(t);throw new Error(`No channel found for channelName: ${e}.`)}async connect(e,t={}){if(await Gt(this,$t,\"f\").getValue(),!e||\"string\"!=typeof e)throw new Error(\"Please provide a channelName string to connect to a channel.\");const n={wait:!0,...this.wire.environment.getDefaultChannelOptions().connect,...t},{offer:i,rtc:r}=await Gt(this,Lt,\"f\").createClientOffer(n);let o;(this.fin.me.isFrame||this.fin.me.isView||this.fin.me.isWindow)&&(o=(await this.fin.me.getInfo()).url);const s={channelName:e,...n,offer:i,connectionUrl:o},a=await this.safeConnect(e,n.wait,s),c=await Gt(this,Lt,\"f\").createClientStrategy(r,a),d=new Dt.ChannelClient(a,(()=>Dt.ChannelClient.wireClose(this.wire,a,a.endpointId)),c);return c.onEndpointDisconnect(a.channelId,(async()=>{try{await d.sendDisconnectAction()}catch(e){console.warn(`Something went wrong during disconnect for client with uuid: ${a.uuid} / name: ${a.name} / endpointId: ${a.endpointId}.`)}finally{Dt.ChannelClient.handleProviderDisconnect(a)}})),d}async create(e,t){if(!e)throw new Error(\"Please provide a channelName to create a channel\");const{payload:{data:n}}=await this.wire.sendAction(\"create-channel\",{channelName:e}),i=Gt(this,Lt,\"f\").createProvider(t,n);return this.on(\"client-disconnected\",(t=>{t.channelName===e&&Vt.ChannelProvider.handleClientDisconnection(i,t)})),i}}le.Channel=Kt,Lt=new WeakMap,Tt=new WeakMap,$t=new WeakMap,Object.defineProperty(de,\"__esModule\",{value:!0}),de.InterAppPayload=de.InterApplicationBus=void 0;const qt=t,Jt=d,Yt=he,Zt=le,Qt=O;class Xt extends Jt.Base{constructor(e){super(e),this.events={subscriberAdded:\"subscriber-added\",subscriberRemoved:\"subscriber-removed\"},this.refCounter=new Yt.RefCounter,this.Channel=new Zt.Channel(e),this.emitter=new qt.EventEmitter,e.registerMessageHandler(this.onmessage.bind(this)),this.on=this.emitter.on.bind(this.emitter),this.removeAllListeners=this.emitter.removeAllListeners.bind(this.emitter)}async publish(e,t){await this.wire.sendAction(\"publish-message\",{topic:e,message:t,sourceWindowName:this.me.name})}async send(e,t,n){const i=(0,Qt.validateIdentity)(e);if(i)throw new Error(i);await this.wire.sendAction(\"send-message\",{destinationUuid:e.uuid,destinationWindowName:e.name,topic:t,message:n,sourceWindowName:this.me.name})}subscribe(e,t,n){const i=this.createSubscriptionKey(e.uuid,e.name||\"*\",t);return this.emitter.on(i,n),this.refCounter.actOnFirst(i,(async()=>{await this.wire.sendAction(\"subscribe\",{sourceUuid:e.uuid,sourceWindowName:e.name||\"*\",topic:t,destinationWindowName:this.me.name})}),(()=>Promise.resolve()))}unsubscribe(e,t,n){const i=e.name||\"*\",r=this.createSubscriptionKey(e.uuid,i,t);return this.emitter.removeListener(r,n),this.refCounter.actOnLast(r,(async()=>{await this.wire.sendAction(\"unsubscribe\",{sourceUuid:e.uuid,sourceWindowName:i,topic:t,destinationWindowName:this.me.name})}),(()=>new Promise((e=>e)).then((()=>{}))))}processMessage(e){const{payload:{message:t,sourceWindowName:n,sourceUuid:i,topic:r}}=e,o=[this.createSubscriptionKey(i,n,r),this.createSubscriptionKey(i,\"*\",r),this.createSubscriptionKey(\"*\",\"*\",r)],s={uuid:i,name:n};o.forEach((e=>{this.emitter.emit(e,t,s)}))}emitSubscriverEvent(e,t){const{payload:{targetName:n,uuid:i,topic:r}}=t,o={name:n,uuid:i,topic:r};this.emitter.emit(e,o)}createSubscriptionKey(e,t,n){const i=t||\"*\";if(!(e&&i&&n))throw new Error(\"Missing uuid, name, or topic string\");return function(...e){return e.map((e=>Buffer.from(`${e}`).toString(\"base64\"))).join(\"/\")}(e,i,n)}onmessage(e){const{action:t}=e;switch(t){case\"process-message\":this.processMessage(e);break;case this.events.subscriberAdded:this.emitSubscriverEvent(this.events.subscriberAdded,e);break;case this.events.subscriberRemoved:this.emitSubscriverEvent(this.events.subscriberRemoved,e)}return!0}}de.InterApplicationBus=Xt;de.InterAppPayload=class{};var en={};Object.defineProperty(en,\"__esModule\",{value:!0}),en.Clipboard=void 0;const tn=d;class nn extends tn.Base{async writeText(e){await this.wire.sendAction(\"clipboard-write-text\",e)}async readText(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-text\",{type:e});return t.data}async writeImage(e){await this.wire.sendAction(\"clipboard-write-image\",e)}async readImage(e={format:\"dataURL\"}){const{payload:t}=await this.wire.sendAction(\"clipboard-read-image\",e);return t.data}async writeHtml(e){await this.wire.sendAction(\"clipboard-write-html\",e)}async readHtml(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-html\",{type:e});return t.data}async writeRtf(e){await this.wire.sendAction(\"clipboard-write-rtf\",e)}async readRtf(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-rtf\",{type:e});return t.data}async write(e){await this.wire.sendAction(\"clipboard-write\",e)}async getAvailableFormats(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-formats\",{type:e});return t.data}}en.Clipboard=nn;var rn={},on={},sn={};Object.defineProperty(sn,\"__esModule\",{value:!0}),sn.ExternalApplication=void 0;const an=d;class cn extends an.EmitterBase{constructor(e,t){super(e,\"external-application\",t.uuid),this.identity=t}getInfo(){return this.wire.sendAction(\"get-external-application-info\",this.identity).then((({payload:e})=>e.data))}}sn.ExternalApplication=cn,Object.defineProperty(on,\"__esModule\",{value:!0}),on.ExternalApplicationModule=void 0;const dn=d,hn=sn;class ln extends dn.Base{wrap(e){return this.wire.sendAction(\"external-application-wrap\").catch((e=>{})),Promise.resolve(new hn.ExternalApplication(this.wire,{uuid:e}))}wrapSync(e){return this.wire.sendAction(\"external-application-wrap-sync\").catch((e=>{})),new hn.ExternalApplication(this.wire,{uuid:e})}}on.ExternalApplicationModule=ln,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(on,e),n(sn,e)}(rn);var un={},pn={},wn={};Object.defineProperty(wn,\"__esModule\",{value:!0}),wn._Frame=void 0;const yn=d;class fn extends yn.EmitterBase{constructor(e,t){super(e,\"frame\",t.uuid,t.name),this.identity=t}getInfo(){return this.wire.sendAction(\"get-frame-info\",this.identity).then((({payload:e})=>e.data))}getParentWindow(){return this.wire.sendAction(\"get-parent-window\",this.identity).then((({payload:e})=>e.data))}}wn._Frame=fn,Object.defineProperty(pn,\"__esModule\",{value:!0}),pn._FrameModule=void 0;const gn=d,mn=O,vn=wn;class Cn extends gn.Base{async wrap(e){this.wire.sendAction(\"frame-wrap\").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}wrapSync(e){this.wire.sendAction(\"frame-wrap-sync\").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}getCurrent(){return this.wire.sendAction(\"frame-get-current\").catch((e=>{})),Promise.resolve(new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity()))}getCurrentSync(){return this.wire.sendAction(\"frame-get-current-sync\").catch((e=>{})),new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity())}}pn._FrameModule=Cn,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(pn,e),n(wn,e)}(un);var bn={};Object.defineProperty(bn,\"__esModule\",{value:!0}),bn.GlobalHotkey=void 0;const In=d;class En extends In.EmitterBase{constructor(e){super(e,\"global-hotkey\")}async register(e,t){await this.on(e,t),await this.wire.sendAction(\"global-hotkey-register\",{hotkey:e})}async unregister(e){await this.removeAllListeners(e),await this.wire.sendAction(\"global-hotkey-unregister\",{hotkey:e})}async unregisterAll(){await Promise.all(this.eventNames().filter((e=>!(\"registered\"===e||\"unregistered\"===e))).map((e=>this.removeAllListeners(e)))),await this.wire.sendAction(\"global-hotkey-unregister-all\",{})}async isRegistered(e){const{payload:{data:t}}=await this.wire.sendAction(\"global-hotkey-is-registered\",{hotkey:e});return t}}bn.GlobalHotkey=En;var xn,An={},Pn={},Mn={},_n=s&&s.__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)};Object.defineProperty(Mn,\"__esModule\",{value:!0}),Mn.Platform=void 0;const On=d,Sn=O,Rn=new Map;class Fn extends On.EmitterBase{constructor(e,t){super(t.wire,\"application\",e.uuid),this.getClient=e=>{this.wire.sendAction(\"platform-get-client\",this.identity).catch((e=>{}));const t=e||this.identity,{uuid:n}=t;if(!Rn.has(n)){const e=_n(this,xn,\"f\").call(this,n);Rn.set(n,e)}return Rn.get(n)},xn.set(this,(async e=>{try{const t=`custom-frame-${e}`,n=await this._channel.connect(t,{wait:!1});return n.onDisconnection((()=>{Rn.delete(e)})),n}catch(t){throw Rn.delete(e),new Error(\"The targeted Platform is not currently running. Listen for application-started event for the given Uuid.\")}})),this.launchLegacyManifest=this.launchContentManifest;const n=(0,Sn.validateIdentity)(e);if(n)throw new Error(n);this._channel=t,this.identity={uuid:e.uuid},this.Layout=this.fin.Platform.Layout,this.Application=this.fin.Application.wrapSync(this.identity)}async createView(e,t,n){this.wire.sendAction(\"platform-create-view\",this.identity).catch((e=>{}));const i=await this.getClient(),r=await i.dispatch(\"create-view\",{target:t,opts:e,targetView:n});if(!r||(0,Sn.validateIdentity)(r.identity))throw new Error(`When overwriting the createView call, please return an object that has a valid 'identity' property: ${JSON.stringify(r)}`);return this.fin.View.wrapSync(r.identity)}async createWindow(e){this.wire.sendAction(\"platform-create-window\",this.identity).catch((e=>{}));const t=await this.getClient();e.reason||(e.reason=\"api-call\");const n=await t.dispatch(\"create-view-container\",e);if(!n||(0,Sn.validateIdentity)(n.identity))throw new Error(`When overwriting the createWindow call, please return an object that has a valid 'identity' property: ${JSON.stringify(n)}`);const{identity:i}=n,r=this.fin.Window.wrapSync(i);return r.name=i.name,r.uuid=i.uuid,r}async quit(){this.wire.sendAction(\"platform-quit\",this.identity).catch((e=>{}));return(await this.getClient()).dispatch(\"quit\")}async closeView(e){this.wire.sendAction(\"platform-close-view\",this.identity).catch((e=>{}));const t=await this.getClient();await t.dispatch(\"close-view\",{view:e})}async reparentView(e,t){console.warn(\"Platform.reparentView has been deprecated, please use Platform.createView\"),this.wire.sendAction(\"platform-reparent-view\",this.identity).catch((e=>{}));const n={...e,uuid:e.uuid??this.identity.uuid},i=await this.fin.View.wrap(n),r=await i.getOptions();return this.createView(r,t)}async getSnapshot(){this.wire.sendAction(\"platform-get-snapshot\",this.identity).catch((e=>{}));return(await this.getClient()).dispatch(\"get-snapshot\")}async getViewSnapshot(e){return(await this.getClient()).dispatch(\"get-view-snapshot\",{viewIdentity:e})}async applySnapshot(e,t){this.wire.sendAction(\"platform-apply-snapshot\",this.identity).catch((e=>{}));const n=\"Requested snapshot must be a valid Snapshot object, or a url or filepath to such an object.\";let i;if(\"string\"==typeof e)try{i=(await this._channel.wire.sendAction(\"get-application-manifest\",{manifestUrl:e})).payload.data}catch(e){throw new Error(`${n}: ${e}`)}else i=e;if(!i.windows)throw new Error(n);const r=await this.getClient();return await r.dispatch(\"apply-snapshot\",{snapshot:i,options:t}),this}async fetchManifest(e){return(await this.getClient()).dispatch(\"platform-fetch-manifest\",{manifestUrl:e})}async launchContentManifest(e){this.wire.sendAction(\"platform-launch-content-manifest\",this.identity).catch((()=>{}));const t=await this.getClient(),n=await this.fetchManifest(e);return t.dispatch(\"launch-into-platform\",{manifest:n,manifestUrl:e}),this}async setWindowContext(e={},t){if(this.wire.sendAction(\"platform-set-window-context\",this.identity).catch((e=>{})),!e)throw new Error(\"Please provide a serializable object or string to set the context.\");const n=await this.getClient(),{entityType:i}=t?await this.fin.System.getEntityInfo(t.uuid,t.name):this.fin.me;await n.dispatch(\"set-window-context\",{context:e,entityType:i,target:t||{uuid:this.fin.me.uuid,name:this.fin.me.name}})}async getWindowContext(e){this.wire.sendAction(\"platform-get-window-context\",this.identity).catch((e=>{}));const t=await this.getClient(),{entityType:n}=e?await this.fin.System.getEntityInfo(e.uuid,e.name):this.fin.me;return t.dispatch(\"get-window-context\",{target:e||{uuid:this.fin.me.uuid,name:this.fin.me.name},entityType:n})}async closeWindow(e,t={skipBeforeUnload:!1}){this.wire.sendAction(\"platform-close-window\",this.identity).catch((e=>{}));return(await this.getClient()).dispatch(\"close-window\",{windowId:e,options:t})}}Mn.Platform=Fn,xn=new WeakMap;var jn={},kn={},Ln={},Tn={};function $n(e){switch(e){case\"columns\":case\"grid\":case\"rows\":case\"tabs\":return!0;default:return!1}}Object.defineProperty(Tn,\"__esModule\",{value:!0}),Tn.overrideFromComposables=Tn.isValidPresetType=void 0,Tn.isValidPresetType=$n,Tn.overrideFromComposables=function(...e){return t=>e.reduceRight(((e,t)=>n=>t(e(n))),(e=>e))(t)},Tn.default={isValidPresetType:$n};var Bn={},Gn={},Wn={};Object.defineProperty(Wn,\"__esModule\",{value:!0}),Wn.ApiConsumer=void 0;Wn.ApiConsumer=class{constructor(e){this.strategy=e,this.consume=async e=>(await this.strategy.getExposedFunctions(e)).reduce(((t,n)=>({...t,[n.key]:this.strategy.createFunction(n,e)})),{})}};var Hn={},Nn={};Object.defineProperty(Nn,\"__esModule\",{value:!0}),Nn.expose=Nn.getExposedProperties=void 0;const Dn=Symbol(\"exposedProperties\");Nn.getExposedProperties=e=>e[Dn]||e.prototype[Dn]||[];Nn.expose=e=>(t,n,i)=>{t[Dn]=t[Dn]||[],t[Dn].push({key:n,descriptor:i,options:e})},Object.defineProperty(Hn,\"__esModule\",{value:!0}),Hn.ApiExposer=void 0;const Un=Nn;Hn.ApiExposer=class{constructor(e){this.strategy=e,this.exposeInstance=async(e,t)=>{const n=(0,Un.getExposedProperties)(e),i=await Promise.all(n.map((async({key:n,options:i})=>({key:n,options:await this.strategy.exposeFunction(e[n].bind(e),{key:n,options:i,meta:t})}))));await this.strategy.exposeMeta(t,i)}}};var Vn={},zn={},Kn={};Object.defineProperty(Kn,\"__esModule\",{value:!0}),Kn.ChannelsConsumer=void 0;Kn.ChannelsConsumer=class{constructor(e){this.channel=e,this.getExposedFunctions=async e=>{const{id:t}=e,{props:n}=await this.channel.dispatch(`api-meta:${t}`);return n},this.createFunction=e=>(...t)=>{const{action:n}=e.options;return this.channel.dispatch(n,{args:t})}}};var qn={};Object.defineProperty(qn,\"__esModule\",{value:!0}),qn.ChannelsExposer=void 0;qn.ChannelsExposer=class{constructor(e){this.channelProviderOrClient=e,this.exposeFunction=async(e,t)=>{const{key:n,options:i,meta:r}=t,{id:o}=r,s=`${o}.${i?.action||n}`;return await this.channelProviderOrClient.register(s,(async({args:t})=>e(...t))),{action:s}},this.exposeMeta=async({id:e},t)=>{const n=`api-meta:${e}`;await this.channelProviderOrClient.register(n,(()=>({props:t})))}}},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Kn,e),n(qn,e)}(zn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(zn,e)}(Vn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Wn,e),n(Hn,e),n(Vn,e),n(Nn,e)}(Gn);var Jn={};Object.defineProperty(Jn,\"__esModule\",{value:!0}),Jn.createRelayedDispatch=exports.relayChannelClientApi_1=Jn.relayChannelClientApi=void 0;const Yn=[\"no longer connected\",\"RTCDataChannel closed unexpectedly\",\"The client you are trying to dispatch from is disconnected from the target provider\"];exports.relayChannelClientApi_1=Jn.relayChannelClientApi=async(e,t)=>{e.register(`relay:${t}`,(({action:t,target:n,payload:i})=>e.dispatch(n,t,i))),await Promise.resolve()};Jn.createRelayedDispatch=(e,t,n,i)=>async(r,o)=>{try{return await e.dispatch(`relay:${n}`,{action:r,payload:o,target:t})}catch(e){if(s=e.message,Yn.some((e=>s.includes(e)))&&i)throw new Error(i);throw e}var s};var Zn,Qn,Xn,ei=s&&s.__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},ti=s&&s.__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)};Object.defineProperty(Bn,\"__esModule\",{value:!0}),Bn.ColumnOrRow=Bn.TabStack=Bn.LayoutNode=void 0;const ni=Gn,ii=Jn;class ri{constructor(e,t){Zn.set(this,void 0),this.isRoot=()=>ti(this,Zn,\"f\").isRoot(this.entityId),this.exists=()=>ti(this,Zn,\"f\").exists(this.entityId),this.getParent=async()=>{const e=await ti(this,Zn,\"f\").getParent(this.entityId);if(e)return ri.getEntity(e,ti(this,Zn,\"f\"))},this.createAdjacentStack=async(e,t)=>{const n=await ti(this,Zn,\"f\").createAdjacentStack(this.entityId,e,t);return ri.getEntity({entityId:n,type:\"stack\"},ti(this,Zn,\"f\"))},this.getAdjacentStacks=async e=>(await ti(this,Zn,\"f\").getAdjacentStacks({targetId:this.entityId,edge:e})).map((e=>ri.getEntity({type:\"stack\",entityId:e.entityId},ti(this,Zn,\"f\")))),ei(this,Zn,e,\"f\"),this.entityId=t}}Bn.LayoutNode=ri,Zn=new WeakMap,ri.newLayoutEntitiesClient=async(e,t,n)=>{const i=(0,ii.createRelayedDispatch)(e,n,\"layout-relay\",\"You are trying to interact with a layout component on a window that does not exist or has been destroyed.\");return new ni.ApiConsumer(new ni.ChannelsConsumer({dispatch:i})).consume({id:t})},ri.getEntity=(e,t)=>{const{entityId:n,type:i}=e;switch(i){case\"column\":case\"row\":return new si(t,n,i);case\"stack\":return new oi(t,n);default:throw new Error(`Unrecognised Layout Entity encountered ('${JSON.stringify(e)})`)}};class oi extends ri{constructor(e,t){super(e,t),Qn.set(this,void 0),this.type=\"stack\",this.getViews=()=>ti(this,Qn,\"f\").getStackViews(this.entityId),this.addView=async(e,t={index:0})=>ti(this,Qn,\"f\").addViewToStack(this.entityId,e,t),this.removeView=async e=>{await ti(this,Qn,\"f\").removeViewFromStack(this.entityId,e)},this.setActiveView=async e=>{await ti(this,Qn,\"f\").setStackActiveView(this.entityId,e)},ei(this,Qn,e,\"f\")}}Bn.TabStack=oi,Qn=new WeakMap;class si extends ri{constructor(e,t,n){super(e,t),Xn.set(this,void 0),this.getContent=async()=>(await ti(this,Xn,\"f\").getContent(this.entityId)).map((e=>ri.getEntity(e,ti(this,Xn,\"f\")))),ei(this,Xn,e,\"f\"),this.type=n}}Bn.ColumnOrRow=si,Xn=new WeakMap;var ai={};Object.defineProperty(ai,\"__esModule\",{value:!0}),ai.DEFAULT_LAYOUT_KEY=ai.LAYOUT_CONTROLLER_ID=void 0,ai.LAYOUT_CONTROLLER_ID=\"layout-entities\",ai.DEFAULT_LAYOUT_KEY=\"__default__\";var ci,di,hi,li=s&&s.__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)};Object.defineProperty(Ln,\"__esModule\",{value:!0}),Ln.Layout=void 0;const ui=G,pi=O,wi=d,yi=Tn,fi=Bn,gi=ai;class mi extends wi.Base{static getClient(e){return li(e,di,\"f\").getValue()}constructor(e,t){super(t),ci.add(this),di.set(this,new ui.Lazy((async()=>fi.LayoutNode.newLayoutEntitiesClient(await this.platform.getClient(),gi.LAYOUT_CONTROLLER_ID,this.identity)))),this.replace=async e=>{this.wire.sendAction(\"layout-replace\").catch((e=>{}));const t=await this.platform.getClient();await t.dispatch(\"replace-layout\",{target:this.identity,opts:{layout:e}})},this.replaceView=async(e,t)=>{this.wire.sendAction(\"layout-replace-view\").catch((e=>{}));const n=await this.platform.getClient();await n.dispatch(\"replace-view\",{target:this.identity,opts:{viewToReplace:e,newView:t}})},this.applyPreset=async e=>{this.wire.sendAction(\"layout-apply-preset\").catch((e=>{}));const t=await this.platform.getClient(),{presetType:n}=e;if(!n||!(0,yi.isValidPresetType)(n))throw new Error(\"Cannot apply preset layout, please include an applicable presetType property in the PresetLayoutOptions.\");await t.dispatch(\"apply-preset-layout\",{target:this.identity,opts:{presetType:n}})};const n=(0,pi.validateIdentity)(e);if(n)throw new Error(n);this.identity=e,this.platform=this.fin.Platform.wrapSync({uuid:e.uuid}),e.uuid===this.fin.me.uuid&&e.name===this.fin.me.name&&(this.init=this.fin.Platform.Layout.init)}async getConfig(){this.wire.sendAction(\"layout-get-config\").catch((e=>{}));return(await this.platform.getClient()).dispatch(\"get-frame-snapshot\",{target:this.identity})}async getCurrentViews(){this.wire.sendAction(\"layout-get-views\").catch((e=>{}));const e=await this.platform.getClient();return(await e.dispatch(\"get-layout-views\",{target:this.identity})).map((e=>this.fin.View.wrapSync(e)))}async getRootItem(){this.wire.sendAction(\"layout-get-root-item\").catch((()=>{}));const e=await li(this,di,\"f\").getValue(),t=await e.getRoot(\"layoutName\"in this.identity?this.identity:void 0);return fi.LayoutNode.getEntity(t,e)}async getStackByViewIdentity(e){this.wire.sendAction(\"layout-get-stack-by-view\").catch((()=>{}));const t=await li(this,di,\"f\").getValue(),n=await t.getStackByView(e);if(!n)throw new Error(`No stack found for view: ${e.uuid}/${e.name}`);return fi.LayoutNode.getEntity(n,t)}async addView(e,{location:t,targetView:n}={}){this.wire.sendAction(\"layout-add-view\").catch((e=>{}));const{identity:i}=await li(this,ci,\"m\",hi).call(this,\"layout-add-view\",{viewOptions:e,location:t,targetView:n});return{identity:i}}async closeView(e){this.wire.sendAction(\"layout-close-view\").catch((e=>{})),await li(this,ci,\"m\",hi).call(this,\"layout-close-view\",{viewIdentity:e})}}Ln.Layout=mi,di=new WeakMap,ci=new WeakSet,hi=async function(e,t){return(await this.platform.getClient()).dispatch(e,{target:this.identity,opts:t})};var vi,Ci,bi,Ii,Ei,xi=s&&s.__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)},Ai=s&&s.__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};Object.defineProperty(kn,\"__esModule\",{value:!0}),kn.LayoutModule=void 0;const Pi=d,Mi=Ln,_i=ai;class Oi extends Pi.Base{constructor(){super(...arguments),vi.add(this),Ci.set(this,!1),bi.set(this,null),this.init=async(e={})=>{if(this.wire.sendAction(\"layout-init\").catch((e=>{})),!this.wire.environment.layoutAllowedInContext(this.fin))throw new Error(\"Layout.init can only be called from a Window context.\");if(xi(this,Ci,\"f\"))throw new Error(\"Layout.init was already called, please use Layout.create to add additional layouts.\");\"openfin\"===this.wire.environment.type&&await this.fin.Platform.getCurrentSync().getClient(),Ai(this,Ci,!0,\"f\"),Ai(this,bi,await this.wire.environment.initLayoutManager(this.fin,this.wire,e),\"f\"),await this.wire.environment.applyLayoutSnapshot(this.fin,xi(this,bi,\"f\"),e);const t={name:this.fin.me.name,uuid:this.fin.me.uuid};if(!e.layoutManagerOverride){const e={layoutName:_i.DEFAULT_LAYOUT_KEY,...t};return xi(this,Ii,\"f\").call(this,e)}return this.wrapSync(t)},Ii.set(this,(e=>{const t=\"[Layout] You are using a deprecated property `layoutManager` - it will throw if you access it starting in v37.\",n=new Proxy({},{get(e,n){throw console.warn(`[Layout-mgr-proxy] accessing ${n.toString()}`),new Error(t)}}),i=Object.assign(this.wrapSync(e),{layoutManager:n});return new Proxy(i,{get(e,n){if(\"layoutManager\"===n)throw console.warn(`[Layout-proxy] accessing ${n.toString()}`),new Error(t);return e[n]}})})),this.getCurrentLayoutManagerSync=()=>xi(this,vi,\"m\",Ei).call(this,\"fin.Platform.Layout.getCurrentLayoutManagerSync()\"),this.create=async e=>this.wire.environment.createLayout(xi(this,vi,\"m\",Ei).call(this,\"fin.Platform.Layout.create()\"),e),this.destroy=async e=>this.wire.environment.destroyLayout(xi(this,vi,\"m\",Ei).call(this,\"fin.Platform.Layout.destroy()\"),e)}async wrap(e){return this.wire.sendAction(\"layout-wrap\").catch((e=>{})),new Mi.Layout(e,this.wire)}wrapSync(e){return this.wire.sendAction(\"layout-wrap-sync\").catch((e=>{})),new Mi.Layout(e,this.wire)}async getCurrent(){if(this.wire.sendAction(\"layout-get-current\").catch((e=>{})),\"openfin\"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error(\"You are not in a Window context. Only Windows can have a Layout.\");const{uuid:e,name:t}=this.fin.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction(\"layout-get-current-sync\").catch((e=>{})),\"openfin\"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error(\"You are not in a Window context. Only Windows can have a Layout.\");const{uuid:e,name:t}=this.fin.me;return this.wrapSync({uuid:e,name:t})}async getLayoutByViewIdentity(e){this.wire.sendAction(\"layout-get-by-view-identity\").catch((()=>{}));let t=await this.wire.environment.getViewWindowIdentity(this.fin,e);t.identity&&(t=t.identity);try{const n=this.wrapSync(t),i=await Mi.Layout.getClient(n),r=await i.getLayoutIdentityForViewOrThrow(e);return this.wrapSync(r)}catch(n){if(![\"No action registered at target for\",\"getLayoutIdentityForViewOrThrow is not a function\"].some((e=>n.message.includes(e))))throw n;if(t.uuid===t.name)throw new Error(`View identity ${JSON.stringify(e)} is not attached to any layout in provider window ${JSON.stringify(t)}.`);return this.wrapSync(t)}}}kn.LayoutModule=Oi,Ci=new WeakMap,bi=new WeakMap,Ii=new WeakMap,vi=new WeakSet,Ei=function(e){if(!xi(this,bi,\"f\"))throw new Error(`You must call init before using the API ${e}`);return xi(this,bi,\"f\")},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(kn,e),n(Ln,e)}(jn),Object.defineProperty(Pn,\"__esModule\",{value:!0}),Pn.PlatformModule=void 0;const Si=d,Ri=Mn,Fi=jn;class ji extends Si.Base{constructor(e,t){super(e),this._channel=t,this.Layout=new Fi.LayoutModule(this.wire)}async init(e){if(!fin.__internal_.isPlatform||fin.me.name!==fin.me.uuid)throw new Error(\"fin.Platform.init should only be called from a custom platform provider running in the main window of the application.\");return this.wire.environment.initPlatform(this.fin,e)}async wrap(e){return this.wire.sendAction(\"platform-wrap\").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}wrapSync(e){return this.wire.sendAction(\"platform-wrap-sync\").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}async getCurrent(){return this.wire.sendAction(\"platform-get-current\").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction(\"platform-get-current-sync\").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}start(e){return this.wire.sendAction(\"platform-start\").catch((e=>{})),new Promise((async(t,n)=>{try{const{uuid:n}=e,i=await this.fin.Application._create({...e,isPlatformController:!0});i.once(\"platform-api-ready\",(()=>t(this.wrapSync({uuid:n})))),i._run({uuid:n})}catch(e){n(e)}}))}startFromManifest(e,t){return this.wire.sendAction(\"platform-start-from-manifest\").catch((e=>{})),new Promise((async(n,i)=>{try{const i=await this.fin.Application._createFromManifest(e);i.once(\"platform-api-ready\",(()=>n(this.wrapSync({uuid:i.identity.uuid})))),i._run(t)}catch(e){i(e)}}))}}Pn.PlatformModule=ji,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Pn,e),n(Mn,e)}(An);var ki={};!function(e){Object.defineProperty(e,\"__esModule\",{value:!0}),e.getMe=e.getBaseMe=e.environmentUnsupportedMessage=void 0;const t=J(),n=un,i=ie(),r=rn;function o(e,t,n){return{...{isView:\"view\"===e,isWindow:\"window\"===e,isFrame:\"iframe\"===e,isExternal:\"external connection\"===e},uuid:t,name:n,entityType:e}}e.environmentUnsupportedMessage=\"You are not running in OpenFin.\",e.getBaseMe=o,e.getMe=function(s){const{uuid:a,name:c,entityType:d}=s.me,h={setContext(){throw new Error(e.environmentUnsupportedMessage)},addContextHandler(){throw new Error(e.environmentUnsupportedMessage)},getContextGroups(){throw new Error(e.environmentUnsupportedMessage)},joinContextGroup(){throw new Error(e.environmentUnsupportedMessage)},removeFromContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getAllClientsInContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getInfoForContextGroup(){throw new Error(e.environmentUnsupportedMessage)}},l=\"Interop API has not been instantiated. Either connection has failed or you have not declared interop in your config.\",u={setContext(){throw new Error(l)},addContextHandler(){throw new Error(l)},getContextGroups(){throw new Error(l)},joinContextGroup(){throw new Error(l)},removeFromContextGroup(){throw new Error(l)},getAllClientsInContextGroup(){throw new Error(l)},getInfoForContextGroup(){throw new Error(l)}},p={eventNames:()=>{throw new Error(e.environmentUnsupportedMessage)},emit:()=>{throw new Error(e.environmentUnsupportedMessage)},listeners:()=>{throw new Error(e.environmentUnsupportedMessage)},listenerCount:()=>{throw new Error(e.environmentUnsupportedMessage)},on:()=>{throw new Error(e.environmentUnsupportedMessage)},addListener:()=>{throw new Error(e.environmentUnsupportedMessage)},once:()=>{throw new Error(e.environmentUnsupportedMessage)},prependListener:()=>{throw new Error(e.environmentUnsupportedMessage)},prependOnceListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeAllListeners:()=>{throw new Error(e.environmentUnsupportedMessage)}};switch(d){case\"view\":return Object.assign(new t.View(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case\"window\":return Object.assign(new i._Window(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case\"iframe\":return Object.assign(new n._Frame(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case\"external connection\":return Object.assign(new r.ExternalApplication(s,{uuid:a}),o(d,a,c),{interop:u,isOpenFin:!1});default:return{...o(d,a,c),...p,interop:h,isOpenFin:!1}}}}(ki);var Li={},Ti={},$i={};Object.defineProperty($i,\"__esModule\",{value:!0}),$i.createWarningObject=$i.createUnusableObject=void 0,$i.createUnusableObject=function(e){const t=()=>{throw new Error(e)};return new Proxy({},{apply:t,construct:t,defineProperty:t,deleteProperty:t,get:t,getOwnPropertyDescriptor:t,getPrototypeOf:t,has:t,isExtensible:t,ownKeys:t,preventExtensions:t,set:t,setPrototypeOf:t})},$i.createWarningObject=function(e,t){return new Proxy(t,{get:(...t)=>(console.warn(e),Reflect.get(...t)),set:(...t)=>(console.warn(e),Reflect.set(...t)),getOwnPropertyDescriptor:(...t)=>(console.warn(e),Reflect.getOwnPropertyDescriptor(...t)),ownKeys:(...t)=>(console.warn(e),Reflect.ownKeys(...t))})};var Bi,Gi={},Wi={};var Hi={};!function(e){Object.defineProperty(e,\"__esModule\",{value:!0}),e.wrapIntentHandler=e.BROKER_ERRORS=e.generateOverrideWarning=e.generateOverrideError=e.wrapContextHandler=e.wrapInTryCatch=e.generateId=void 0;e.generateId=()=>`${Math.random()}${Date.now()}`;e.wrapInTryCatch=(e,t)=>(...n)=>{try{return e(...n)}catch(e){throw new Error((t||\"\")+e)}};e.wrapContextHandler=(e,t)=>async n=>{try{await e(n)}catch(e){throw console.error(`Error thrown by handler ${t} for context type ${n.type}: ${e}`),e}};e.generateOverrideError=(e,t)=>`You have tried to to use ${e} but ${t} has not been overridden in the Interop Broker. Please override this function. Refer to our documentation for more info.`;e.generateOverrideWarning=(e,t,n,i)=>{const{uuid:r,name:o}=n;return i?`Entity with identity: ${r}/${o} has called ${i} or ${e} but ${t} has not been overridden.`:`Entity with identity: ${r}/${o} has called ${e} but ${t} has not been overridden.`},e.BROKER_ERRORS={fireIntent:(0,e.generateOverrideError)(\"fireIntent\",\"handleFiredIntent\"),fireIntentForContext:(0,e.generateOverrideError)(\"fireIntentForContext\",\"handleFiredIntentForContext\"),getInfoForIntent:(0,e.generateOverrideError)(\"getInfoForIntent\",\"handleInfoForIntent\"),getInfoForIntentsByContext:(0,e.generateOverrideError)(\"getInfoForIntentsByContext\",\"handleInfoForIntentsByContext\"),joinSessionContextGroupWithJoinContextGroup:\"The Context Group you have tried to join is a Session Context Group. Custom Context Groups can only be defined by the Interop Broker through code or manifest configuration. Please use joinSessionContextGroup.\",fdc3Open:(0,e.generateOverrideError)(\"fdc3.open\",\"fdc3HandleOpen\"),fdc3FindInstances:(0,e.generateOverrideError)(\"fdc3.findInstances\",\"fdc3HandleFindInstances\"),fdc3GetAppMetadata:(0,e.generateOverrideError)(\"fdc3.getAppMetadata\",\"fdc3HandleGetAppMetadata\"),fdc3GetInfo:(0,e.generateOverrideError)(\"fdc3.getInfo\",\"fdc3HandleGetInfo\")};e.wrapIntentHandler=(e,t)=>async n=>{try{return e(n)}catch(e){throw console.error(`Error thrown by handler ${t}: ${e}`),e}}}(Hi);var Ni,Di,Ui={};function Vi(){if(Di)return Gi;Di=1;var e,t,n,r=s&&s.__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},o=s&&s.__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)},a=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Gi,\"__esModule\",{value:!0}),Gi.InteropBroker=void 0;const c=d,h=a(function(){if(Bi)return Wi;Bi=1,Object.defineProperty(Wi,\"__esModule\",{value:!0});const e=Cr();return Wi.default=class{constructor(e,t){this.provider=e,this.id=t,this.lastContext=void 0,this.contextGroupMap=new Map,this.clients=new Map,this.registerListeners()}registerListeners(){this.provider.register(`sessionContextGroup:getContext-${this.id}`,this.getCurrentContext.bind(this)),this.provider.register(`sessionContextGroup:setContext-${this.id}`,this.setContext.bind(this)),this.provider.register(`sessionContextGroup:handlerAdded-${this.id}`,this.handlerAdded.bind(this)),this.provider.register(`sessionContextGroup:handlerRemoved-${this.id}`,this.handlerRemoved.bind(this))}getCurrentContext(e){return e.type?this.contextGroupMap.get(e.type):this.lastContext}setContext(t,n){const{context:i}=t,r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name} not in Session Client State Map`);this.contextGroupMap.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{e.contextHandlers.get(i.type)?.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getClientState(e){return this.clients.get(e.endpointId)}async handlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(i){const e=r.contextHandlers.get(i)||[];r.contextHandlers.set(i,[...e,n]);const o=this.contextGroupMap.get(i);o&&await this.provider.dispatch(t,n,o)}else{r.globalHandler=n;const e=[...this.contextGroupMap.keys()].map((async e=>{const i=this.contextGroupMap.get(e);i&&await this.provider.dispatch(t,n,i)}));await Promise.all(e)}}handlerRemoved(e,t){const{handlerId:n}=e,i=this.clients.get(t.endpointId);i?(Array.from(i.contextHandlers).forEach((([,e])=>{const t=e.indexOf(n);t>-1&&e.splice(t,1)})),i.globalHandler===n&&(i.globalHandler=void 0)):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={contextHandlers:new Map,clientIdentity:e,globalHandler:void 0};this.clients.set(e.endpointId,t)}}onDisconnection(e){this.clients.delete(e.endpointId)}},Wi}()),l=Hi,u=a(i),p=function(){if(Ni)return Ui;Ni=1,Object.defineProperty(Ui,\"__esModule\",{value:!0}),Ui.PrivateChannelProvider=void 0;const e=Vi();return Ui.PrivateChannelProvider=class t{constructor(e,t){this.provider=e,this.id=t,this.clients=new Map,this.registerListeners(),this.contextByContextType=new Map,this.lastContext=void 0,this.provider.onConnection((e=>this.registerNewClient(e))),this.provider.onDisconnection((async e=>{const{endpointId:t}=e;this.clients.has(t)&&await this.handleClientDisconnecting(e),0===(await this.provider.getAllClientInfo()).length&&this.provider.destroy()}))}getClientState(e){return this.clients.get(e.endpointId)}registerListeners(){this.provider.register(\"broadcast\",this.broadcast.bind(this)),this.provider.register(\"getCurrentContext\",this.getCurrentContext.bind(this)),this.provider.register(\"contextHandlerAdded\",this.contextHandlerAdded.bind(this)),this.provider.register(\"contextHandlerRemoved\",this.contextHandlerRemoved.bind(this)),this.provider.register(\"nonStandardHandlerRemoved\",this.nonStandardHandlerRemoved.bind(this)),this.provider.register(\"onAddContextHandlerAdded\",this.onAddContextHandlerAdded.bind(this)),this.provider.register(\"onDisconnectHandlerAdded\",this.onDisconnectHandlerAdded.bind(this)),this.provider.register(\"onUnsubscribeHandlerAdded\",this.onUnsubscribeHandlerAdded.bind(this)),this.provider.register(\"clientDisconnecting\",((e,t)=>{this.handleClientDisconnecting(t)}))}broadcast(t,n){const{context:i}=t;if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name}, tried to call broadcast, is not connected to this Private Channel`);const r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to broadcast - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);this.contextByContextType.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{const t=e.handlerIdsByContextTypes.get(i.type);t&&t.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getCurrentContext(e,t){const{contextType:n}=e;if(!this.getClientState(t))throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call getCurrentContext, is not connected to this Private Channel`);if(void 0!==n){return this.contextByContextType.get(n)||null}return this.lastContext?this.lastContext:null}contextHandlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call addContextListener, is not connected to this Private Channel`);if(i){const e=r.handlerIdsByContextTypes.get(i)||[];r.handlerIdsByContextTypes.set(i,[...e,n])}else r.globalHandler=n;Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&e.onAddContextListenerHandlerId&&this.provider.dispatch(e.clientIdentity,e.onAddContextListenerHandlerId,i)}))}async contextHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);if(i){let e;if(i.globalHandler===n)i.globalHandler=void 0;else for(const[t,r]of i.handlerIdsByContextTypes){const i=r.indexOf(n);i>-1&&(r.splice(i,1),e=t)}const r=(await this.getConnectedClients()).map((async n=>{const{clientIdentity:i,clientIdentity:{endpointId:r},onUnsubscribeHandlerId:o}=n;r!==t.endpointId&&o&&await this.provider.dispatch(i,o,e)}));try{await Promise.all(r)}catch(e){throw console.error(`Problem when attempting to dispatch to onUnsubscribeHandlers. Error: ${e} Removing Client: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}`),new Error(e)}}else console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}.`)}nonStandardHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);i?i.onDisconnectHandlerId===n?i.onDisconnectHandlerId=void 0:i.onAddContextListenerHandlerId===n?i.onAddContextListenerHandlerId=void 0:i.onUnsubscribeHandlerId===n&&(i.onUnsubscribeHandlerId=void 0):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}onAddContextHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onAddContextListener, is not connected to this Private Channel`);n.onAddContextListenerHandlerId=i,Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&Array.from(e.handlerIdsByContextTypes.keys()).forEach((e=>{this.provider.dispatch(t,i,e)}))}))}onDisconnectHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onDisconnect, is not connected to this Private Channel`);n.onDisconnectHandlerId=i}onUnsubscribeHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onUnsubscribe, is not connected to this Private Channel`);n.onUnsubscribeHandlerId=i}removeClient(e){const t=this.getClientState(e);if(!t)throw new Error(`Client with Identity: ${e.uuid} ${e.name}, tried to call disconnect, is not connected to this Private Channel`);t.handlerIdsByContextTypes.clear(),this.clients.delete(e.endpointId)}async fireOnDisconnectForOtherClients(e){const{endpointId:t}=e,n=(await this.getConnectedClients()).map((async e=>{const{clientIdentity:{endpointId:n},onDisconnectHandlerId:i}=e;n!==t&&i&&await this.provider.dispatch(e.clientIdentity,i)}));try{await Promise.all(n)}catch(t){throw console.error(`Problem when attempting to dispatch to onDisconnectHandlers. Error: ${t} Disconnecting Client: uuid: ${e.uuid}. name: ${e.name}. endpointId: ${e.endpointId}`),new Error(t)}}async unsubscribeAll(e){const{endpointId:t}=e,n=this.clients.get(t);if(n){const t=Array.from(n.handlerIdsByContextTypes.values()).flat(),i=n.globalHandler;if(t.length>0){const n=t.map((async t=>this.contextHandlerRemoved({handlerId:t},e)));try{await Promise.all(n)}catch(e){console.error(e.message)}}if(i)try{await this.contextHandlerRemoved({handlerId:i},e)}catch(e){console.error(e.message)}}}async handleClientDisconnecting(e){await this.unsubscribeAll(e),this.removeClient(e),await this.fireOnDisconnectForOtherClients(e)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={clientIdentity:e,handlerIdsByContextTypes:new Map,globalHandler:void 0,onAddContextListenerHandlerId:void 0,onUnsubscribeHandlerId:void 0,onDisconnectHandlerId:void 0};this.clients.set(e.endpointId,t)}}async getConnectedClients(){const e=await this.provider.getAllClientInfo();return Array.from(this.clients.values()).filter((t=>{const{uuid:n,name:i}=t.clientIdentity;return e.some((e=>i===e.name&&n===e.uuid))}))}static init(e,n){return new t(e,n)}},Ui}(),w=G,y=[{id:\"green\",displayMetadata:{color:\"#00CC88\",name:\"green\"}},{id:\"purple\",displayMetadata:{color:\"#8C61FF\",name:\"purple\"}},{id:\"orange\",displayMetadata:{color:\"#FF8C4C\",name:\"orange\"}},{id:\"red\",displayMetadata:{color:\"#FF5E60\",name:\"red\"}},{id:\"pink\",displayMetadata:{color:\"#FF8FB8\",name:\"pink\"}},{id:\"yellow\",displayMetadata:{color:\"#E9FF8F\",name:\"yellow\"}}];let f=class i extends c.Base{constructor(i,s,a){super(i),e.set(this,void 0),t.set(this,void 0),n.set(this,void 0),this.getProvider=()=>o(this,n,\"f\").getValue(),this.interopClients=new Map,this.contextGroupsById=new Map,r(this,t,a.contextGroups??[...y],\"f\"),r(this,e,a.fdc3Info,\"f\"),a?.logging&&(this.logging=a.logging),this.intentClientMap=new Map,this.lastContextMap=new Map,this.sessionContextGroupMap=new Map,r(this,n,new w.Lazy(s),\"f\"),this.setContextGroupMap(),this.setupChannelProvider()}static createClosedConstructor(...e){return class extends i{constructor(...t){if(t.length){const[n,i,r]=t;if(r&&\"object\"==typeof r&&!(0,u.default)(r,e[2]))return console.warn(\"You have modified the parameters of the InteropOverride constructor. This behavior is deprecated and will be removed in a future version. You can modify these options in your manifest. Please consult our Interop docs for guidance on migrating to the new override scheme.\"),void super(e[0],e[1],r);console.warn(\"You are attempting to pass arguments to the InteropOverride constructor. This is not necessary, and these passed arguments will be ignored. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.\")}super(...e)}}}setContext({context:e},t){this.wire.sendAction(\"interop-broker-set-context\").catch((e=>{}));const n=this.getClientState(t);if(!n||!n.contextGroupId)throw n?new Error(\"You must join a context group before you can set context.\"):new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);{const{contextGroupId:t}=n;this.setContextForGroup({context:e},t)}}setContextForGroup({context:e},t){this.wire.sendAction(\"interop-broker-set-context-for-group\").catch((e=>{}));const n=this.contextGroupsById.get(t);if(!n)throw new Error(`Unable to set context for context group that isn't in the context group mapping: ${t}.`);const r=i.checkContextIntegrity(e);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(e)}`);const o=e.type;n.set(o,e),this.lastContextMap.set(t,o);Array.from(this.interopClients.values()).filter((e=>e.contextGroupId===t)).forEach((t=>{for(const[,n]of t.contextHandlers)i.isContextTypeCompatible(o,n.contextType)&&this.invokeContextHandler(t.clientIdentity,n.handlerId,e)}))}getCurrentContext(e,t){this.wire.sendAction(\"interop-broker-get-current-context\").catch((e=>{}));const n=this.getClientState(t);if(!n?.contextGroupId)throw new Error(\"You must be a member of a context group to call getCurrentContext\");const{contextGroupId:i}=n,r=this.contextGroupsById.get(i),o=this.lastContextMap.get(i),s=e?.contextType??o;return r&&s?r.get(s):void 0}async joinContextGroup({contextGroupId:e,target:t},n){if(this.wire.sendAction(\"interop-broker-join-context-group\").catch((e=>{})),this.sessionContextGroupMap.has(e))throw new Error(l.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup);if(t){i.hasEndpointId(t)&&await this.addClientToContextGroup({contextGroupId:e},t);try{const n=this.channel.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name));if(!n.length)throw new Error(`Given Identity ${t.uuid} ${t.name} is not connected to the Interop Broker.`);n.length>1&&console.warn(`More than one connection found for identity ${t.uuid} ${t.name}`);const i=[];for(const t of n)i.push(this.addClientToContextGroup({contextGroupId:e},t));await Promise.all(i)}catch(e){throw new Error(e)}}else await this.addClientToContextGroup({contextGroupId:e},n)}async addClientToContextGroup({contextGroupId:e},t){this.wire.sendAction(\"interop-broker-add-client-to-context-group\").catch((e=>{}));const n=this.getClientState(t);if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(!this.getContextGroups().find((t=>t.id===e)))throw new Error(`Attempting to join a context group that does not exist: ${e}. You may only join existing context groups.`);if(n.contextGroupId!==e){n.contextGroupId=e,await this.setCurrentContextGroupInClientOptions(t,e);const i=this.contextGroupsById.get(e);for(const[,e]of n.contextHandlers){const{contextType:n,handlerId:r}=e;if(void 0===n)i.forEach(((e,n)=>{this.invokeContextHandler(t,r,e)}));else if(i.has(n)){const e=i.get(n);e&&this.invokeContextHandler(t,r,e)}}}}async removeFromContextGroup({target:e},t){if(this.wire.sendAction(\"interop-broker-remove-from-context-group\").catch((e=>{})),e){i.hasEndpointId(e)&&await this.removeClientFromContextGroup(e);try{const t=this.channel.connections.filter((t=>t.uuid===e.uuid&&t.name===e.name));if(!t.length)throw new Error(`No connection found for given Identity ${e.uuid} ${e.name}`);t.length>1&&console.warn(`More than one connection found for identity ${e.uuid} ${e.name}`);const n=[];for(const e of t)n.push(this.removeClientFromContextGroup(e));await Promise.all(n)}catch(e){throw new Error(e)}}else await this.removeClientFromContextGroup(t)}async removeClientFromContextGroup(e){this.wire.sendAction(\"interop-broker-remove-client-from-context-group\").catch((e=>{}));const t=this.getClientState(e);t&&(t.contextGroupId=void 0),await this.setCurrentContextGroupInClientOptions(e,null)}getContextGroups(){return this.wire.sendAction(\"interop-broker-get-context-groups\").catch((e=>{})),o(this,t,\"f\").map((e=>({...e})))}getInfoForContextGroup({contextGroupId:e}){return this.wire.sendAction(\"interop-broker-get-info-for-context-group\").catch((e=>{})),this.getContextGroups().find((t=>t.id===e))}getAllClientsInContextGroup({contextGroupId:e}){this.wire.sendAction(\"interop-broker-get-all-clients-in-context-group\").catch((e=>{}));return Array.from(this.interopClients.values()).filter((t=>t.contextGroupId===e)).map((e=>e.clientIdentity))}async handleFiredIntent(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.raiseIntent\",\"InteropBroker.handleFiredIntent\",t,\"interopClient.fireIntent\");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntent)}async setIntentTarget(e,t){this.wire.sendAction(\"interop-broker-set-intent-target\").catch((e=>{}));const n=this.intentClientMap.get(t.name),i=`intent-handler-${e.name}`;if(n){const t=n.get(i);if(t){if(t.pendingIntents.push(e),t.clientIdentity&&t.isReady){const{clientIdentity:e,pendingIntents:n}=t;try{const r=n[n.length-1];await this.invokeIntentHandler(e,i,r),t.pendingIntents=[]}catch(n){console.error(`Error invoking intent handler for client ${e.uuid}/${e.name}/${e.endpointId}`),t.isReady=!1}}}else n.set(i,{isReady:!1,pendingIntents:[e]})}else{this.intentClientMap.set(t.name,new Map);const n=this.intentClientMap.get(t.name);n&&n.set(i,{isReady:!1,pendingIntents:[e]})}}async handleInfoForIntent(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.findIntent\",\"InteropBroker.handleInfoForIntent\",t,\"interopClient.getInfoForIntent\");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntent)}async handleInfoForIntentsByContext(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.findIntentsByContext\",\"InteropBroker.handleInfoForIntentsByContext\",t,\"interopClient.getInfoForIntentsByContext\");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntentsByContext)}async handleFiredIntentForContext(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.raiseIntentForContext\",\"InteropBroker.handleFiredIntentForContext\",t,\"interopClient.fireIntentForContext\");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntentForContext)}async clientDisconnected(e){}async fdc3HandleOpen({app:e,context:t},n){const i=(0,l.generateOverrideWarning)(\"fdc3.open\",\"InteropBroker.fdc3HandleOpen\",n);throw console.warn(i),new Error(l.BROKER_ERRORS.fdc3Open)}async fdc3HandleFindInstances(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.open\",\"InteropBroker.fdc3HandleFindInstances\",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3FindInstances)}async fdc3HandleGetAppMetadata(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.getAppMetadata\",\"InteropBroker.fdc3HandleGetAppMetadata\",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3GetAppMetadata)}async invokeContextHandler(e,t,n){const i=await this.getProvider();try{await i.dispatch(e,t,n)}catch(i){console.error(`Error invoking context handler ${t} for context type ${n.type} in client ${e.uuid}/${e.name}/${e.endpointId}`,i)}}async invokeIntentHandler(e,t,n){const i=await this.getProvider();await i.dispatch(e,t,n)}async fdc3HandleGetInfo(t,n){const{fdc3Version:i}=t;return{fdc3Version:i,...o(this,e,\"f\"),optionalFeatures:{OriginatingAppMetadata:!1,UserChannelMembershipAPIs:!0},appMetadata:{appId:\"\",instanceId:\"\"}}}async getAllClientInfo(){return(await this.getProvider()).getAllClientInfo()}decorateSnapshot(e){return{...e,interopSnapshotDetails:{contextGroupStates:this.getContextGroupStates()}}}applySnapshot(e,t){const n=e?.interopSnapshotDetails?.contextGroupStates;n&&(t?.closeExistingWindows||this.updateExistingClients(n),this.rehydrateContextGroupStates(n))}updateExistingClients(e){this.interopClients.forEach((t=>{const{clientIdentity:n,contextGroupId:r,contextHandlers:o}=t;if(r){const t=e[r];for(const[,e]of Object.entries(t))o.forEach((t=>{const{handlerId:r,contextType:o}=t;i.isContextTypeCompatible(e.type,o)&&this.invokeContextHandler(n,r,e)}))}}))}getContextGroupStates(){return i.toObject(this.contextGroupsById)}rehydrateContextGroupStates(e){const t=Object.entries(e);for(const[e,n]of t){const t=Object.entries(n);for(const[n,i]of t)if(this.contextGroupsById.has(e)){this.contextGroupsById.get(e).set(n,i)}else console.warn(`Attempting to set a context group that isn't in the context group mapping. Skipping context group rehydration for: ${e}`)}}contextHandlerRegistered({contextType:e,handlerId:t},n){const i={contextType:e,handlerId:t},r=this.getClientState(n);if(r?.contextHandlers.set(t,i),r&&r.contextGroupId){const{contextGroupId:i}=r,o=this.contextGroupsById.get(i);if(void 0===e)o.forEach(((e,i)=>{this.invokeContextHandler(n,t,e)}));else if(o.has(e)){const i=o.get(e);i&&this.invokeContextHandler(n,t,i)}}}async intentHandlerRegistered(e,t){const{handlerId:n}=e,i=this.intentClientMap.get(t.name),r=i?.get(n);if(i)if(r){const{pendingIntents:e}=r;r.clientIdentity=t,r.isReady=!0;try{if(e.length>0){const i=e[e.length-1];await this.invokeIntentHandler(t,n,i),r.pendingIntents=[]}}catch(e){console.error(`Error invoking intent handler: ${n} for client ${t.uuid}/${t.name}/${t.endpointId}`)}}else i.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t});else{this.intentClientMap.set(t.name,new Map);const e=this.intentClientMap.get(t.name);e&&e.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t})}}removeContextHandler({handlerId:e},t){const n=this.getClientState(t);n&&n.contextHandlers.delete(e)}handleJoinSessionContextGroup({sessionContextGroupId:e},t){try{if(!e)throw new Error(\"Failed to join session context group: must specify group id.\");const n=this.sessionContextGroupMap.get(e);if(n)n.registerNewClient(t);else{const n=new h.default(this.channel,e);n.registerNewClient(t),this.sessionContextGroupMap.set(e,n)}return{hasConflict:this.contextGroupsById.has(e)}}catch(e){throw new Error(e)}}getClientState(e){return this.interopClients.get(e.endpointId)}static toObject(e){const t=Object.fromEntries(e),n={};return Object.entries(t).forEach((([e,t])=>{const i=Object.fromEntries(t);n[e]=i})),n}static checkContextIntegrity(e){if(!e)return{isValid:!1,reason:\"No context supplied\"};if(\"object\"!=typeof e)return{isValid:!1,reason:\"Context must be an Object\"};if(!e.type)return{isValid:!1,reason:\"Context must have a type property\"};if(e.id&&\"object\"!=typeof e.id)return{isValid:!1,reason:\"Context id must be an Object populated with key-value identifiers (if set)\"};if(e.id){const{id:t}=e,n=Object.keys(t);let i=!1;if(!n.length)return{isValid:!1,reason:\"Context id must have at least one key-value identifier\"};if(n.forEach((e=>{\"string\"==typeof e&&\"string\"==typeof t[e]||(i=!0)})),i)return{isValid:!1,reason:\"Context id key-value identifiers must be of type string\"}}return e.name&&\"string\"!=typeof e.name?{isValid:!1,reason:\"Context name must be of string type (if set)\"}:{isValid:!0}}static hasEndpointId(e){return void 0!==e.endpointId}static isContextTypeCompatible(e,t){return void 0===t||e===t}setContextGroupMap(){for(const e of this.getContextGroups())this.contextGroupsById.set(e.id,new Map)}async setCurrentContextGroupInClientOptions(e,t){try{const n=await this.fin.System.getEntityInfo(e.uuid,e.name);let i;\"view\"===n.entityType?i=await this.fin.View.wrap(e):\"window\"===n.entityType&&(i=await this.fin.Window.wrap(e)),i&&await i.updateOptions({interop:{currentContextGroup:t}})}catch(e){}}async setupChannelProvider(){try{const e=await this.getProvider();this.channel=e,this.wireChannel(e)}catch(e){throw new Error(`Error setting up Interop Broker Channel Provider: ${e}`)}}wireChannel(e){e.onConnection((async(e,t)=>{if(!await this.isConnectionAuthorized(e,t))throw new Error(`Connection not authorized for ${e.uuid}, ${e.name}`);if(!e.endpointId)throw new Error(\"Version too old to be compatible with Interop. Please upgrade your runtime to a more recent version.\");const n={contextGroupId:void 0,contextHandlers:new Map,clientIdentity:e};t?.currentContextGroup&&this.contextGroupsById.has(t.currentContextGroup)&&(n.contextGroupId=t?.currentContextGroup),this.interopClients.set(e.endpointId,n)})),e.onDisconnection((e=>{this.interopClients.delete(e.endpointId);const t=this.intentClientMap.get(e.name);t&&e.uuid===this.fin.me.uuid&&t.forEach((e=>{e.isReady=!1})),this.sessionContextGroupMap.forEach((t=>{t.onDisconnection(e)})),this.clientDisconnected(e)})),e.beforeAction((async(e,t,n)=>{if(!await this.isActionAuthorized(e,t,n))throw new Error(`Action (${e}) not authorized for ${n.uuid}, ${n.name}`);this.logging?.beforeAction?.enabled&&console.log(e,t,n)})),e.afterAction(((e,t,n)=>{this.logging?.afterAction?.enabled&&console.log(e,t,n)})),e.register(\"setContext\",this.setContext.bind(this)),e.register(\"fireIntent\",this.handleFiredIntent.bind(this)),e.register(\"getCurrentContext\",this.getCurrentContext.bind(this)),e.register(\"getInfoForIntent\",this.handleInfoForIntent.bind(this)),e.register(\"getInfoForIntentsByContext\",this.handleInfoForIntentsByContext.bind(this)),e.register(\"fireIntentForContext\",this.handleFiredIntentForContext.bind(this)),e.register(\"getContextGroups\",this.getContextGroups.bind(this)),e.register(\"joinContextGroup\",this.joinContextGroup.bind(this)),e.register(\"removeFromContextGroup\",this.removeFromContextGroup.bind(this)),e.register(\"getAllClientsInContextGroup\",this.getAllClientsInContextGroup.bind(this)),e.register(\"getInfoForContextGroup\",this.getInfoForContextGroup.bind(this)),e.register(\"contextHandlerRegistered\",this.contextHandlerRegistered.bind(this)),e.register(\"intentHandlerRegistered\",this.intentHandlerRegistered.bind(this)),e.register(\"removeContextHandler\",this.removeContextHandler.bind(this)),e.register(\"sessionContextGroup:createIfNeeded\",this.handleJoinSessionContextGroup.bind(this)),e.register(\"fdc3Open\",this.fdc3HandleOpen.bind(this)),e.register(\"fdc3v2FindIntentsByContext\",this.handleInfoForIntentsByContext.bind(this)),e.register(\"fdc3FindInstances\",this.fdc3HandleFindInstances.bind(this)),e.register(\"fdc3GetAppMetadata\",this.fdc3HandleGetAppMetadata.bind(this)),e.register(\"fdc3v2GetInfo\",(async(e,t)=>this.fdc3HandleGetInfo.bind(this)(e,t))),e.register(\"createPrivateChannelProvider\",(async e=>{const{channelId:t}=e,n=await this.fin.InterApplicationBus.Channel.create(t);p.PrivateChannelProvider.init(n,t)}))}isConnectionAuthorized(e,t){return this.wire.sendAction(\"interop-broker-is-connection-authorized\").catch((e=>{})),Promise.resolve(!0)}isActionAuthorized(e,t,n){return this.wire.sendAction(\"interop-broker-is-action-authorized\").catch((e=>{})),Promise.resolve(!0)}};return Gi.InteropBroker=f,e=new WeakMap,t=new WeakMap,n=new WeakMap,Gi}var zi,Ki={},qi={},Ji=s&&s.__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},Yi=s&&s.__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)};Object.defineProperty(qi,\"__esModule\",{value:!0});const Zi=d,Qi=Hi;class Xi extends Zi.Base{constructor(e,t,n){super(e),zi.set(this,void 0),this.id=n,Ji(this,zi,t,\"f\")}async setContext(e){this.wire.sendAction(\"interop-session-context-group-set-context\").catch((e=>{}));return(await Yi(this,zi,\"f\")).dispatch(`sessionContextGroup:setContext-${this.id}`,{sessionContextGroupId:this.id,context:e})}async getCurrentContext(e){this.wire.sendAction(\"interop-session-context-group-get-context\").catch((e=>{}));return(await Yi(this,zi,\"f\")).dispatch(`sessionContextGroup:getContext-${this.id}`,{sessionContextGroupId:this.id,type:e})}async addContextHandler(e,t){if(this.wire.sendAction(\"interop-session-context-group-add-handler\").catch((e=>{})),\"function\"!=typeof e)throw new Error(\"Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.\");const n=await Yi(this,zi,\"f\");let i;return i=t?`sessionContextHandler:invoke-${this.id}-${t}-${(0,Qi.generateId)()}`:`sessionContextHandler:invoke-${this.id}`,n.register(i,(0,Qi.wrapContextHandler)(e,i)),await n.dispatch(`sessionContextGroup:handlerAdded-${this.id}`,{handlerId:i,contextType:t}),{unsubscribe:await this.createUnsubscribeCb(i)}}async createUnsubscribeCb(e){const t=await Yi(this,zi,\"f\");return async()=>{t.remove(e),await t.dispatch(`sessionContextGroup:handlerRemoved-${this.id}`,{handlerId:e})}}getUserInstance(){return{id:this.id,setContext:(0,Qi.wrapInTryCatch)(this.setContext.bind(this),\"Failed to set context: \"),getCurrentContext:(0,Qi.wrapInTryCatch)(this.getCurrentContext.bind(this),\"Failed to get context: \"),addContextHandler:(0,Qi.wrapInTryCatch)(this.addContextHandler.bind(this),\"Failed to add context handler: \")}}}qi.default=Xi,zi=new WeakMap;var er={},tr={},nr={},ir={},rr=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),or=s&&s.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,\"default\",{enumerable:!0,value:t})}:function(e,t){e.default=t}),sr=s&&s.__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)&&rr(t,e,n);return or(t,e),t};Object.defineProperty(ir,\"__esModule\",{value:!0}),ir.PrivateChannelClient=void 0;const ar=sr(Hi);var cr,dr;function hr(){if(cr)return tr;cr=1;var e,t=s&&s.__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)},n=s&&s.__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},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(tr,\"__esModule\",{value:!0}),tr.FDC3ModuleBase=void 0;const o=nr,a=Hi,c=wr(),d=r(i);return tr.FDC3ModuleBase=class{get client(){return t(this,e,\"f\").call(this)}get fin(){return this.wire.getFin()}constructor(t,i){this.wire=i,e.set(this,void 0),n(this,e,t,\"f\")}async broadcast(e){return this.wire.sendAction(\"fdc3-broadcast\").catch((e=>{})),this.client.setContext(e)}async _open(e,t){this.wire.sendAction(\"fdc3-open\").catch((e=>{}));try{return await c.InteropClient.ferryFdc3Call(this.client,\"fdc3Open\",{app:e,context:t})}catch(e){const t=e.message===a.BROKER_ERRORS.fdc3Open?\"ResolverUnavailable\":e.message;throw new Error(t)}}async _getChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:\"system\",...(0,o.getUnsupportedChannelApis)()})))}async getOrCreateChannel(e){this.wire.sendAction(\"fdc3-get-or-create-channel\").catch((e=>{}));const t=(await this._getChannels()).find((t=>t.id===e));if(t)return{...t,type:\"system\",...(0,o.getUnsupportedChannelApis)()};try{const t=await this.client.joinSessionContextGroup(e);return(0,o.buildAppChannelObject)(t)}catch(e){throw console.error(e.message),new Error(o.ChannelError.CreationFailed)}}async getSystemChannels(){return this.wire.sendAction(\"fdc3-get-system-channels\").catch((e=>{})),this._getChannels()}async joinChannel(e){this.wire.sendAction(\"fdc3-join-channel\").catch((e=>{}));try{return await this.client.joinContextGroup(e)}catch(e){if(e.message===a.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup?console.error(\"The Channel you have tried to join is an App Channel. Custom Channels can only be defined by the Interop Broker through code or manifest configuration. Please use getOrCreateChannel.\"):console.error(e.message),e.message.startsWith(\"Attempting to join a context group that does not exist\"))throw new Error(o.ChannelError.NoChannelFound);throw new Error(o.ChannelError.AccessDenied)}}async getCurrentChannel(){this.wire.sendAction(\"fdc3-get-current-channel\").catch((e=>{}));const e=await this.getCurrentContextGroupInfo();return e?this.buildChannelObject(e):null}async leaveCurrentChannel(){return this.wire.sendAction(\"fdc3-leave-current-channel\").catch((e=>{})),this.client.removeFromContextGroup()}async getCurrentContextGroupInfo(){const e=await this.client.getContextGroups(),t=e.map((async e=>this.client.getAllClientsInContextGroup(e.id))),n=(await Promise.all(t)).findIndex((e=>e.some((e=>{const{uuid:t,name:n}=e;return this.wire.me.uuid===t&&this.wire.me.name===n}))));return e[n]}async buildChannelObject(e){return{...e,type:\"system\",addContextListener:(...[e,t])=>{let n,i;\"function\"==typeof e?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),n=e):(n=t,\"string\"==typeof e&&(i=e));const r=(async()=>{let e=!0;const t=await this.client.getCurrentContext(i);return this.client.addContextHandler(((i,r)=>{if(!e||(e=!1,!(0,d.default)(t,i)))return n(i,r)}),i)})();return{...r,unsubscribe:()=>r.then((e=>e.unsubscribe()))}},broadcast:this.broadcast.bind(this),getCurrentContext:async e=>{const t=await this.client.getCurrentContext(e);return void 0===t?null:t}}}},e=new WeakMap,tr}ir.PrivateChannelClient=class{constructor(e,t){this.id=t,this.client=e,this.listeners=new Map}async broadcast(e){return this.client.dispatch(\"broadcast\",{context:e})}async getCurrentContext(e){return this.client.dispatch(\"getCurrentContext\",{contextType:e})}async addContextListener(e,t){if(\"function\"!=typeof t)throw new Error(\"Non-function argument passed to the second parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.\");let n;n=e?`contextHandler:invoke-${this.id}-${e}-${ar.generateId()}`:`contextHandler:invoke-${this.id}-${ar.generateId()}`,this.client.register(n,ar.wrapContextHandler(t,n));const i={unsubscribe:await this.createContextUnsubscribeCb(n)};return this.listeners.set(n,i),await this.client.dispatch(\"contextHandlerAdded\",{handlerId:n,contextType:e}),i}createNonStandardUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch(\"nonStandardHandlerRemoved\",{handlerId:e})}}createContextUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch(\"contextHandlerRemoved\",{handlerId:e})}}onAddContextListener(e){const t=`onContextHandlerAdded:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch(\"onAddContextHandlerAdded\",{handlerId:t}),n}onDisconnect(e){const t=`onDisconnect:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch(\"onDisconnectHandlerAdded\",{handlerId:t}),n}onUnsubscribe(e){const t=`onUnsubscribe:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch(\"onUnsubscribeHandlerAdded\",{handlerId:t}),n}async cleanUpAllSubs(){Array.from(this.listeners.keys()).forEach((e=>{this.client.remove(e),this.listeners.delete(e)}))}async disconnect(){try{await this.client.dispatch(\"clientDisconnecting\"),await this.cleanUpAllSubs(),await this.client.disconnect()}catch(e){throw new Error(e.message)}}},function(e){var t=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,\"__esModule\",{value:!0}),e.getIntentResolution=e.isChannel=e.isContext=e.connectPrivateChannel=e.buildAppChannelObject=e.buildPrivateChannelObject=e.ChannelError=e.ResultError=e.UnsupportedChannelApiError=e.getUnsupportedChannelApis=void 0;const n=Hi,r=ir,o=t(i);e.getUnsupportedChannelApis=e=>({addContextListener:()=>{throw new a(\"Channel.addContextListener\",e)},broadcast:()=>{throw new a(\"Channel.broadcast\",e)},getCurrentContext:()=>{throw new a(\"Channel.getCurrentContext\",e)}});class a extends Error{constructor(e,t=\"System\"){super(e),this.message=`Calling ${e} on an instance of a ${t} Channel returned by fdc3.get${t}Channels is not supported. If you would like to use a ${t} Channel, please use fdc3.joinChannel, fdc3.addContextListener, and fdc3.broadcast instead.`}}var c,d;e.UnsupportedChannelApiError=a,function(e){e.NoResultReturned=\"NoResultReturned\",e.IntentHandlerRejected=\"IntentHandlerRejected\"}(c=e.ResultError||(e.ResultError={})),(d=e.ChannelError||(e.ChannelError={})).NoChannelFound=\"NoChannelFound\",d.AccessDenied=\"AccessDenied\",d.CreationFailed=\"CreationFailed\";e.buildPrivateChannelObject=e=>{let t=!1;const n=()=>{if(t)throw new Error(\"Private Channel Client has been disconnected from the Private Channel\")};return{id:e.id,type:\"private\",broadcast:async t=>(n(),e.broadcast(t)),getCurrentContext:async t=>(n(),e.getCurrentContext(t)),addContextListener:async(t,i)=>{n();let r=i,o=t;\"function\"==typeof t&&(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),r=t,o=null);return e.addContextListener(o,r)},onAddContextListener:t=>(n(),e.onAddContextListener(t)),disconnect:async()=>(n(),t=!0,e.disconnect()),onDisconnect:t=>(n(),e.onDisconnect(t)),onUnsubscribe:t=>(n(),e.onUnsubscribe(t))}};e.buildAppChannelObject=e=>({id:e.id,type:\"app\",broadcast:e.setContext,getCurrentContext:async t=>{const n=await e.getCurrentContext(t);return void 0===n?null:n},addContextListener:(t,n)=>{let i,r;\"function\"==typeof t?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),i=t):(i=n,\"string\"==typeof t&&(r=t));const s=(async()=>{let t=!0;const n=await e.getCurrentContext(r);return e.addContextHandler(((e,r)=>{if(!t||(t=!1,!(0,o.default)(n,e)))return i(e,r)}),r)})();return{...s,unsubscribe:()=>s.then((e=>e.unsubscribe()))}}});e.connectPrivateChannel=async t=>{try{const n=await fin.InterApplicationBus.Channel.connect(t),i=new r.PrivateChannelClient(n,t);return(0,e.buildPrivateChannelObject)(i)}catch(e){throw new Error(`Private Channel with id: ${t} doesn't exist`)}};e.isContext=e=>{if(e&&\"object\"==typeof e&&\"type\"in e){const{type:t}=e;return\"string\"==typeof t}return!1};e.isChannel=e=>{if(e&&\"object\"==typeof e&&\"type\"in e&&\"id\"in e){const{type:t,id:n}=e;return\"string\"==typeof t&&\"string\"==typeof n&&(\"app\"===t||\"private\"===t)}return!1};e.getIntentResolution=async(t,i,r,o)=>{const s=(0,n.generateId)(),a=new Promise(((e,t)=>{fin.InterApplicationBus.subscribe({uuid:\"*\"},s,(t=>{e(t)})).catch((()=>t(new Error(\"getResult is not supported in this environment\"))))})),d=r?{target:r,intentResolutionResultId:s}:{intentResolutionResultId:s},h=o?{name:o,context:i,metadata:d}:{...i,metadata:d},l=async()=>{let n=await a;if(!n||\"object\"!=typeof n)throw new Error(c.NoResultReturned);const{error:i}=n;if(i)throw new Error(c.IntentHandlerRejected);if((0,e.isChannel)(n)){const{id:i,type:r}=n;switch(r){case\"private\":n=await(0,e.connectPrivateChannel)(i);break;case\"app\":{const r=await t.joinSessionContextGroup(i);n=(0,e.buildAppChannelObject)(r);break}}}else if(!(0,e.isContext)(n))throw new Error(c.NoResultReturned);return n},u=o?await t.fireIntent(h):await t.fireIntentForContext(h);return\"object\"!=typeof u?{source:{appId:\"\",instanceId:\"\"},intent:\"\",version:\"2.0\",getResult:l}:{...u,getResult:l}}}(nr);var lr,ur,pr={};function wr(){if(ur)return Ki;ur=1;var e,t,n=s&&s.__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},i=s&&s.__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)},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ki,\"__esModule\",{value:!0}),Ki.InteropClient=void 0;const o=d,a=r(qi),c=function(){if(dr)return er;dr=1,Object.defineProperty(er,\"__esModule\",{value:!0}),er.Fdc3Module=void 0;const e=Hi,t=hr();class n extends t.FDC3ModuleBase{async open(e,t){await super._open(e,t)}addContextListener(e,t){let n;return this.wire.sendAction(\"fdc3-add-context-listener\").catch((e=>{})),\"function\"==typeof e?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),n=this.client.addContextHandler(e)):n=this.client.addContextHandler(t,null===e?void 0:e),{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}addIntentListener(e,t){this.wire.sendAction(\"fdc3-add-intent-listener\").catch((e=>{}));const n=this.client.registerIntentHandler((e=>{const{context:n,metadata:i}=e,{metadata:r}=n,o=i?.intentResolutionResultId||r?.intentResolutionResultId;o&&this.fin.InterApplicationBus.publish(o,null).catch((()=>null)),t(e.context)}),e,{fdc3Version:\"1.2\"});return{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}async raiseIntent(t,n,i){this.wire.sendAction(\"fdc3-raise-intent\").catch((e=>{}));const r=i?{name:t,context:n,metadata:{target:i}}:{name:t,context:n};try{return await this.client.fireIntent(r)}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntent?\"ResolverUnavailable\":t.message;throw new Error(n)}}async findIntent(t,n){this.wire.sendAction(\"fdc3-find-intent\").catch((e=>{}));try{return await this.client.getInfoForIntent({name:t,context:n})}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntent?\"ResolverUnavailable\":t.message;throw new Error(n)}}async findIntentsByContext(t){this.wire.sendAction(\"fdc3-find-intents-by-context\").catch((e=>{}));try{return await this.client.getInfoForIntentsByContext(t)}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntentsByContext?\"ResolverUnavailable\":t.message;throw new Error(n)}}async raiseIntentForContext(t,n){this.wire.sendAction(\"fdc3-raise-intent-for-context\").catch((e=>{}));try{return await this.client.fireIntentForContext({...t,metadata:{target:n}})}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntentForContext?\"ResolverUnavailable\":t.message;throw new Error(n)}}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}getInfo(){return this.wire.sendAction(\"fdc3-get-info\").catch((e=>{})),{providerVersion:this.wire.environment.getAdapterVersionSync(),provider:`openfin-${this.wire.me.uuid}`,fdc3Version:\"1.2\"}}}return er.Fdc3Module=n,er}(),h=function(){if(lr)return pr;lr=1,Object.defineProperty(pr,\"__esModule\",{value:!0}),pr.Fdc3Module2=void 0;const e=hr(),t=Hi,n=wr(),i=nr,r=ir;class o extends e.FDC3ModuleBase{async open(e,t){return\"string\"==typeof e&&console.warn(\"Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).\"),super._open(e,t)}async findInstances(e){this.wire.sendAction(\"fdc3-find-instances\").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,\"fdc3FindInstances\",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3FindInstances?\"ResolverUnavailable\":e.message;throw new Error(n)}}async getAppMetadata(e){this.wire.sendAction(\"fdc3-get-app-metadata\").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,\"fdc3GetAppMetadata\",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3GetAppMetadata?\"ResolverUnavailable\":e.message;throw new Error(n)}}async addContextListener(e,t){this.wire.sendAction(\"fdc3-add-context-listener\").catch((e=>{}));const n=e=>t=>{const{contextMetadata:n,...i}=t,r=n?[{...i},n]:[t,null];e(...r)};let i=t,r=n(i);return\"function\"==typeof e?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),i=e,r=n(i),this.client.addContextHandler(r)):this.client.addContextHandler(r,null===e?void 0:e)}async findIntent(e,n,i){this.wire.sendAction(\"fdc3-find-intent\").catch((e=>{}));try{return await this.client.getInfoForIntent({name:e,context:n,metadata:{resultType:i}})}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntent?\"ResolverUnavailable\":e.message;throw new Error(n)}}async findIntentsByContext(e,i){this.wire.sendAction(\"fdc3-find-intents-by-context\").catch((e=>{}));const r=i?{context:e,metadata:{resultType:i}}:e;try{return await n.InteropClient.ferryFdc3Call(this.client,\"fdc3v2FindIntentsByContext\",r)}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntentsByContext?\"ResolverUnavailable\":e.message;throw new Error(n)}}async raiseIntent(e,n,r){this.wire.sendAction(\"fdc3-raise-intent\").catch((e=>{}));try{return\"string\"==typeof r&&console.warn(\"Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).\"),(0,i.getIntentResolution)(this.client,n,r,e)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?\"ResolverUnavailable\":e.message;throw new Error(n)}}async raiseIntentForContext(e,n){this.wire.sendAction(\"fdc3-raise-intent-for-context\").catch((e=>{}));try{return\"string\"==typeof n&&console.warn(\"Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).\"),(0,i.getIntentResolution)(this.client,e,n)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?\"ResolverUnavailable\":e.message;throw new Error(n)}}async addIntentListener(e,t){if(this.wire.sendAction(\"fdc3-add-intent-listener\").catch((e=>{})),\"string\"!=typeof e)throw new Error(\"First argument must be an Intent name\");return this.client.registerIntentHandler((async e=>{let n,i;const{context:r,metadata:o}=e,{contextMetadata:s,metadata:a,...c}=r,d=o?.intentResolutionResultId||a?.intentResolutionResultId;try{const e=a?{metadata:a,...c}:{...c};n=await t(e,s),i=n}catch(e){n=e,i={error:!0}}if(d&&this.fin.InterApplicationBus.publish(d,i).catch((()=>null)),n instanceof Error)throw new Error(n.message);return n}),e,{fdc3Version:\"2.0\"})}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}async createPrivateChannel(){const e=(0,t.generateId)();await n.InteropClient.ferryFdc3Call(this.client,\"createPrivateChannelProvider\",{channelId:e});const o=await this.fin.InterApplicationBus.Channel.connect(e),s=new r.PrivateChannelClient(o,e);return(0,i.buildPrivateChannelObject)(s)}async getUserChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:\"user\",...(0,i.getUnsupportedChannelApis)(\"User\")})))}async getSystemChannels(){return console.warn(\"This API has been deprecated. Please use fdc3.getUserChannels instead.\"),super.getSystemChannels()}async joinUserChannel(e){return super.joinChannel(e)}async joinChannel(e){return console.warn(\"This API has been deprecated. Please use fdc3.joinUserChannel instead.\"),super.joinChannel(e)}async getCurrentChannel(){const e=await super.getCurrentChannel();return e?{...e,type:\"user\",broadcast:this.broadcast.bind(this)}:null}async getInfo(){return n.InteropClient.ferryFdc3Call(this.client,\"fdc3v2GetInfo\",{fdc3Version:\"2.0\"})}}return pr.Fdc3Module2=o,pr}(),l=Hi;let u=class extends o.Base{constructor(i,r){super(i),e.set(this,void 0),t.set(this,void 0),n(this,t,new Map,\"f\"),n(this,e,r,\"f\")}async setContext(t){this.wire.sendAction(\"interop-client-set-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"setContext\",{context:t})}async addContextHandler(t,n){if(this.wire.sendAction(\"interop-client-add-context-handler\").catch((e=>{})),\"function\"!=typeof t)throw new Error(\"Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.\");const r=await i(this,e,\"f\");let o;o=n?`invokeContextHandler-${n}-${(0,l.generateId)()}`:\"invokeContextHandler\";const s=(0,l.wrapContextHandler)(t,o);return r.register(o,s),await r.dispatch(\"contextHandlerRegistered\",{handlerId:o,contextType:n}),{unsubscribe:async()=>{r.remove(o),await r.dispatch(\"removeContextHandler\",{handlerId:o})}}}async getContextGroups(){this.wire.sendAction(\"interop-client-get-context-groups\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getContextGroups\")}async joinContextGroup(t,n){this.wire.sendAction(\"interop-client-join-context-group\").catch((e=>{}));const r=await i(this,e,\"f\");if(!t)throw new Error(\"No contextGroupId specified for joinContextGroup.\");return r.dispatch(\"joinContextGroup\",{contextGroupId:t,target:n})}async removeFromContextGroup(t){this.wire.sendAction(\"interop-client-remove-from-context-group\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"removeFromContextGroup\",{target:t})}async getAllClientsInContextGroup(t){this.wire.sendAction(\"interop-client-get-all-clients-in-context-group\").catch((e=>{}));const n=await i(this,e,\"f\");if(!t)throw new Error(\"No contextGroupId specified for getAllClientsInContextGroup.\");return n.dispatch(\"getAllClientsInContextGroup\",{contextGroupId:t})}async getInfoForContextGroup(t){this.wire.sendAction(\"interop-client-get-info-for-context-group\").catch((e=>{}));const n=await i(this,e,\"f\");if(!t)throw new Error(\"No contextGroupId specified for getInfoForContextGroup.\");return n.dispatch(\"getInfoForContextGroup\",{contextGroupId:t})}async fireIntent(t){this.wire.sendAction(\"interop-client-fire-intent\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"fireIntent\",t)}async registerIntentHandler(t,n,r){this.wire.sendAction(\"interop-client-register-intent-handler\").catch((e=>{}));const o=await i(this,e,\"f\"),s=`intent-handler-${n}`,a=(0,l.wrapIntentHandler)(t,s);try{await o.register(s,a),await o.dispatch(\"intentHandlerRegistered\",{handlerId:s,...r})}catch(e){throw new Error(\"Unable to register intent handler\")}return{unsubscribe:async()=>{o.remove(s)}}}async getCurrentContext(t){this.wire.sendAction(\"interop-client-get-current-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getCurrentContext\",{contextType:t})}async getInfoForIntent(t){this.wire.sendAction(\"interop-client-get-info-for-intent\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getInfoForIntent\",t)}async getInfoForIntentsByContext(t){this.wire.sendAction(\"interop-client-get-info-for-intents-by-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getInfoForIntentsByContext\",t)}async fireIntentForContext(t){this.wire.sendAction(\"interop-client-fire-intent-for-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"fireIntentForContext\",t)}async joinSessionContextGroup(n){try{const r=i(this,t,\"f\").get(n);if(r)return r.getUserInstance();const o=await i(this,e,\"f\"),{hasConflict:s}=await o.dispatch(\"sessionContextGroup:createIfNeeded\",{sessionContextGroupId:n});s&&console.warn(`A (non-session) context group with the name \"${n}\" already exists. If you are trying to join a Context Group, call joinContextGroup instead.`);const c=new a.default(this.wire,i(this,e,\"f\"),n);return i(this,t,\"f\").set(n,c),c.getUserInstance()}catch(e){throw console.error(`Error thrown trying to create Session Context Group with id \"${n}\": ${e}`),e}}async onDisconnection(t){this.wire.sendAction(\"interop-client-add-ondisconnection-listener\").catch((e=>{}));return(await i(this,e,\"f\")).onDisconnection((e=>{const{uuid:n}=e;t({type:\"interop-broker\",topic:\"disconnected\",brokerName:n})}))}getFDC3Sync(e){switch(e){case\"1.2\":return new c.Fdc3Module((()=>this),this.wire);case\"2.0\":return new h.Fdc3Module2((()=>this),this.wire);default:throw new Error(`Invalid FDC3 version provided: ${e}. Must be '1.2' or '2.0'`)}}async getFDC3(e){return this.getFDC3Sync(e)}static async ferryFdc3Call(t,n,r){return(await i(t,e,\"f\")).dispatch(n,r||null)}};return Ki.InteropClient=u,e=new WeakMap,t=new WeakMap,Ki}var yr,fr,gr,mr={};function vr(){if(yr)return mr;yr=1,Object.defineProperty(mr,\"__esModule\",{value:!0}),mr.overrideCheck=mr.checkFDC32Overrides=mr.getDefaultViewFdc3VersionFromAppInfo=void 0;const e=Vi();function t(t){return[\"fdc3HandleFindInstances\",\"handleInfoForIntent\",\"handleInfoForIntentsByContext\",\"fdc3HandleGetAppMetadata\",\"fdc3HandleGetInfo\",\"fdc3HandleOpen\",\"handleFiredIntent\",\"handleFiredIntentForContext\"].filter((n=>t[n]===e.InteropBroker.prototype[n]))}return mr.getDefaultViewFdc3VersionFromAppInfo=function({manifest:e,initialOptions:t}){const n=e?.platform?.defaultViewOptions?.fdc3InteropApi??t.defaultViewOptions?.fdc3InteropApi;return[\"1.2\",\"2.0\"].includes(n??\"\")?n:void 0},mr.checkFDC32Overrides=t,mr.overrideCheck=function(e,n){if(n&&\"2.0\"===n){const n=t(e);n.length>0&&console.warn(`WARNING: FDC3 2.0 has been set as a default option for Views in this Platform, but the required InteropBroker APIs for FDC3 2.0 compliance have not all been overridden.\\nThe following APIs need to be overridden:\\n${n.join(\"\\n\")}`)}},mr}function Cr(){return gr||(gr=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),i=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),i(function(){if(fr)return Ti;fr=1;var e=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ti,\"__esModule\",{value:!0}),Ti.InteropModule=void 0;const t=e(n),i=$i,r=d,o=Vi(),a=wr(),c=vr(),h=Tn,l=e=>new e,u=\"You have attempted to use or modify InteropBroker parameters, which is not allowed. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.\";class p extends r.Base{async init(e,n=l){this.wire.sendAction(\"interop-init\").catch((()=>{}));const r=await this.wire.environment.getInteropInfo(this.wire.getFin()),s=(0,i.createUnusableObject)(u),a=(0,i.createWarningObject)(u,(0,t.default)(r)),d=async()=>{throw new Error(u)},p=o.InteropBroker.createClosedConstructor(this.wire,(()=>this.fin.InterApplicationBus.Channel.create(`interop-broker-${e}`)),r);let w;return w=Array.isArray(n)?new((0,h.overrideFromComposables)(...n)(p))(s,d,a):await n(p,s,d,a),(0,c.overrideCheck)(w,r.fdc3Version),w}connectSync(e,t){return this.wire.sendAction(\"interop-connect-sync\").catch((()=>{})),new a.InteropClient(this.wire,this.wire.environment.whenReady().then((()=>this.fin.InterApplicationBus.Channel.connect(`interop-broker-${e}`,{payload:t}))))}}return Ti.InteropModule=p,Ti}(),e),i(wr(),e),i(Vi(),e)}(Li)),Li}var br={},Ir={},Er={},xr={};Object.defineProperty(xr,\"__esModule\",{value:!0}),xr.getSnapshotSourceChannelName=void 0;xr.getSnapshotSourceChannelName=e=>`snapshot-source-provider-${e.uuid}`;var Ar,Pr,Mr,_r,Or,Sr=s&&s.__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},Rr=s&&s.__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)};Object.defineProperty(Er,\"__esModule\",{value:!0}),Er.SnapshotSource=void 0;const Fr=d,jr=xr,kr=new Map;class Lr extends Fr.Base{constructor(e,t){super(e),Ar.set(this,void 0),Pr.set(this,(()=>(kr.has(this.identity.uuid)||kr.set(this.identity.uuid,{eventFired:null,clientPromise:null}),kr.get(this.identity.uuid)))),Mr.set(this,(()=>(Rr(this,Pr,\"f\").call(this).clientPromise||(Rr(this,Pr,\"f\").call(this).clientPromise=Rr(this,_r,\"f\").call(this)),Rr(this,Pr,\"f\").call(this).clientPromise))),_r.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);try{Rr(this,Pr,\"f\").call(this).eventFired||await Rr(this,Or,\"f\").call(this);const t=await this.fin.InterApplicationBus.Channel.connect(e,{wait:!1});return t.onDisconnection((()=>{Rr(this,Pr,\"f\").call(this).clientPromise=null,Rr(this,Pr,\"f\").call(this).eventFired=null})),t}catch(e){throw Rr(this,Pr,\"f\").call(this).clientPromise=null,new Error(\"The targeted SnapshotSource is not currently initialized. Await this object's ready() method.\")}})),Or.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);let t,n;const i=new Promise(((e,i)=>{t=e,n=i}));Rr(this,Pr,\"f\").call(this).eventFired=i;const r=async i=>{try{i.channelName===e&&(t(),await this.fin.InterApplicationBus.Channel.removeListener(\"connected\",r))}catch(e){n(e)}};await this.fin.InterApplicationBus.Channel.on(\"connected\",r)})),Sr(this,Ar,t,\"f\")}get identity(){return Rr(this,Ar,\"f\")}async ready(){this.wire.sendAction(\"snapshot-source-ready\").catch((e=>{}));try{await Rr(this,Mr,\"f\").call(this)}catch(e){await Rr(this,Pr,\"f\").call(this).eventFired}}async getSnapshot(){this.wire.sendAction(\"snapshot-source-get-snapshot\").catch((e=>{}));const e=await Rr(this,Mr,\"f\").call(this),t=await e.dispatch(\"get-snapshot\");return(await t).snapshot}async applySnapshot(e){this.wire.sendAction(\"snapshot-source-apply-snapshot\").catch((e=>{}));return(await Rr(this,Mr,\"f\").call(this)).dispatch(\"apply-snapshot\",{snapshot:e})}}Er.SnapshotSource=Lr,Ar=new WeakMap,Pr=new WeakMap,Mr=new WeakMap,_r=new WeakMap,Or=new WeakMap,Object.defineProperty(Ir,\"__esModule\",{value:!0}),Ir.SnapshotSourceModule=void 0;const Tr=d,$r=Er,Br=xr;class Gr extends Tr.Base{async init(e){if(this.wire.sendAction(\"snapshot-source-init\").catch((e=>{})),\"object\"!=typeof e||\"function\"!=typeof e.getSnapshot||\"function\"!=typeof e.applySnapshot)throw new Error(\"you must pass in a valid SnapshotProvider\");const t=await this.fin.InterApplicationBus.Channel.create((0,Br.getSnapshotSourceChannelName)(this.fin.me));t.register(\"get-snapshot\",(async()=>({snapshot:await e.getSnapshot()}))),t.register(\"apply-snapshot\",(({snapshot:t})=>e.applySnapshot(t)))}wrapSync(e){return this.wire.sendAction(\"snapshot-source-wrap-sync\").catch((e=>{})),new $r.SnapshotSource(this.wire,e)}async wrap(e){return this.wire.sendAction(\"snapshot-source-wrap\").catch((e=>{})),this.wrapSync(e)}}Ir.SnapshotSourceModule=Gr,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Ir,e),n(Er,e)}(br),Object.defineProperty(a,\"__esModule\",{value:!0});var Wr=a.Fin=void 0;const Hr=t,Nr=c,Dr=ie(),Ur=Z(),Vr=de,zr=en,Kr=rn,qr=un,Jr=bn,Yr=J(),Zr=An,Qr=ki,Xr=Cr(),eo=br;class to extends Hr.EventEmitter{constructor(e){super(),this.wire=e,this.System=new Nr.System(e),this.Window=new Dr._WindowModule(e),this.Application=new Ur.ApplicationModule(e),this.InterApplicationBus=new Vr.InterApplicationBus(e),this.Clipboard=new zr.Clipboard(e),this.ExternalApplication=new Kr.ExternalApplicationModule(e),this.Frame=new qr._FrameModule(e),this.GlobalHotkey=new Jr.GlobalHotkey(e),this.Platform=new Zr.PlatformModule(e,this.InterApplicationBus.Channel),this.View=new Yr.ViewModule(e),this.Interop=new Xr.InteropModule(e),this.SnapshotSource=new eo.SnapshotSourceModule(e),e.registerFin(this),this.me=(0,Qr.getMe)(e),e.on(\"disconnected\",(()=>{this.emit(\"disconnected\")}))}}Wr=a.Fin=to;var no={},io={};function ro(e){return\"string\"==typeof e.manifestUrl}function oo(e){return ao(e)&&\"string\"==typeof e.address}function so(e){return oo(e)&&\"string\"==typeof e.token}function ao(e){return\"string\"==typeof e.uuid}function co(e){return e.runtime&&\"string\"==typeof e.runtime.version}function ho(e){return ao(e)&&co(e)}Object.defineProperty(io,\"__esModule\",{value:!0}),io.isInternalConnectConfig=io.isPortDiscoveryConfig=io.isNewConnectConfig=io.isConfigWithReceiver=io.isRemoteConfig=io.isExistingConnectConfig=io.isExternalConfig=void 0,io.isExternalConfig=ro,io.isExistingConnectConfig=oo,io.isRemoteConfig=so,io.isConfigWithReceiver=function(e){return\"object\"==typeof e.receiver&&so({...e,address:\"\"})},io.isNewConnectConfig=ho,io.isPortDiscoveryConfig=function(e){return ro(e)&&co(e)||ho(e)},io.isInternalConnectConfig=function(e){return oo(e)||ho(e)};var lo={},uo={};Object.defineProperty(uo,\"__esModule\",{value:!0}),uo.EmitterMap=void 0;const po=t;function wo(e){return Buffer.from(e).toString(\"base64\")}uo.EmitterMap=class{constructor(){this.storage=new Map}hashKeys(e){return e.map(wo).join(\"/\")}getOrCreate(e){const t=this.hashKeys(e);return this.storage.has(t)||this.storage.set(t,new po.EventEmitter),this.storage.get(t)}has(e){return this.storage.has(this.hashKeys(e))}delete(e){const t=this.hashKeys(e);return this.storage.delete(t)}},Object.defineProperty(lo,\"__esModule\",{value:!0});const yo=uo;class fo extends yo.EmitterMap{constructor(){super(...arguments),this.dispatchEvent=e=>{if(function(e){return\"process-desktop-event\"===e.action}(e)){const{payload:t}=e,n=function(e){const{topic:t}=e;if(\"frame\"===t||\"window\"===t||\"view\"===t){const{uuid:n,name:i}=e;return[t,n,i]}if(\"application\"===t){const{uuid:n}=e;return[t,n]}return[t]}(t);if(this.has(n))return this.getOrCreate(n).emit(t.type,t),!0}return!1}}}lo.default=fo;var go,mo,vo=s&&s.__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},Co=s&&s.__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)},bo=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(no,\"__esModule\",{value:!0});var Io=no.Transport=void 0;const Eo=t,xo=io,Ao=g,Po=bo(lo),Mo=ki,_o=ke;class Oo extends Eo.EventEmitter{constructor(e,t,n){super(),this.wireListeners=new Map,this.topicRefMap=new Map,this.eventAggregator=new Po.default,this.messageHandlers=[this.eventAggregator.dispatchEvent],go.set(this,void 0),mo.set(this,void 0),this.connectSync=()=>{Co(this,go,\"f\").connectSync()},this.getPort=()=>Co(this,go,\"f\").getPort(),vo(this,go,new e(this.onmessage.bind(this)),\"f\"),this.environment=t,this.sendRaw=Co(this,go,\"f\").send.bind(Co(this,go,\"f\")),this.registerMessageHandler(this.handleMessage.bind(this)),Co(this,go,\"f\").on(\"disconnected\",(()=>{for(const[,{handleNack:e}]of this.wireListeners)e({reason:\"Remote connection has closed\"});this.wireListeners.clear(),this.emit(\"disconnected\")}));const{uuid:i,name:r}=n,o=this.environment.getCurrentEntityType();this.me=(0,Mo.getBaseMe)(o,i,r)}getFin(){if(!Co(this,mo,\"f\"))throw new Error(\"No Fin object registered for this transport\");return Co(this,mo,\"f\")}registerFin(e){if(Co(this,mo,\"f\"))throw new Error(\"Fin object has already been registered for this transport\");vo(this,mo,e,\"f\")}shutdown(){return Co(this,go,\"f\").shutdown()}async connect(e){if((0,xo.isConfigWithReceiver)(e))return await Co(this,go,\"f\").connect(e.receiver),this.authorize(e);if((0,xo.isRemoteConfig)(e))return this.connectRemote(e);if((0,xo.isExistingConnectConfig)(e))return this.connectByPort(e);if((0,xo.isNewConnectConfig)(e)){const t=await this.environment.retrievePort(e);return this.connectByPort({...e,address:`ws://localhost:${t}`})}}async connectRemote(e){return await Co(this,go,\"f\").connect(new(this.environment.getWsConstructor())(e.address)),this.authorize(e)}async connectByPort(e){const{address:t,uuid:n}=e,i={...e,type:\"file-token\"},r=Co(this,go,\"f\");await r.connect(new(this.environment.getWsConstructor())(e.address));const o=await this.sendAction(\"request-external-authorization\",{uuid:n,type:\"file-token\"},!0);if(\"external-authorization-response\"!==o.action)throw new Ao.UnexpectedActionError(o.action);return await this.environment.writeToken(o.payload.file,o.payload.token),this.authorize(i)}async authorize(e){const t=await this.sendAction(\"request-authorization\",e,!0);if(\"authorization-response\"!==t.action)throw new Ao.UnexpectedActionError(t.action);if(!0!==t.payload.success)throw new Ao.RuntimeError(t.payload)}sendAction(e,t={},n=!1){let i=()=>{};const r=Ao.RuntimeError.getCallSite(1),o=this.environment.getNextMessageId(),s=new Promise(((s,a)=>{i=a;const c={action:e,payload:t,messageId:o},d=Co(this,go,\"f\");return this.addWireListener(o,s,(e=>this.nackHandler(e,a,r)),n),d.send(c).catch(a)}));return Object.assign(s,{cancel:i,messageId:o})}nackHandler(e,t,n){t(\"string\"==typeof e?e:new Ao.RuntimeError(e,n))}ferryAction(e){return new Promise(((t,n)=>{const i=this.environment.getNextMessageId();e.messageId=i;const r=e=>{t(e.payload)};return Co(this,go,\"f\").send(e).then((()=>this.addWireListener(i,r,(e=>this.nackHandler(e,n)),!1))).catch(n)}))}registerMessageHandler(e){this.messageHandlers.push(e)}addWireListener(e,t,n,i){i?this.uncorrelatedListener=t:this.wireListeners.has(e)?n({reason:\"Duplicate handler id\",error:(0,_o.errorToPOJO)(new Ao.DuplicateCorrelationError(String(e)))}):this.wireListeners.set(e,{resolve:t,handleNack:n})}onmessage(e){for(const t of this.messageHandlers)t.call(null,e)}handleMessage(e){const t=e.correlationId||NaN;if(\"correlationId\"in e){if(!this.wireListeners.has(t))return!1;{const{resolve:n,handleNack:i}=this.wireListeners.get(t);\"ack\"!==e.action?i({reason:\"Did not receive ack action\",error:(0,_o.errorToPOJO)(new Ao.NoAckError(e.action))}):\"payload\"in e?e.payload.success?n.call(null,e):i(e.payload):\"string\"==typeof e.reason?i(e):(console.warn(\"Received invalid response from core\",e),i({reason:\"invalid response shape\"})),this.wireListeners.delete(t)}}else this.uncorrelatedListener&&this.uncorrelatedListener.call(null,e),this.uncorrelatedListener=()=>{};return!0}}Io=no.Transport=Oo,go=new WeakMap,mo=new WeakMap;const So=(...e)=>({log:(...t)=>console.debug(`[${(new Date).toISOString()}]`,...(e=>e.map((e=>`[${e}]`)))(e),...t),getLogger:(...t)=>So(...e,...t)}),Ro=So(\"@openfin/core-web/client\");function Fo(e,t){if(!function(e){return\"string\"==typeof e}(e))throw new Error(`Property ${t} has invalid type. Expected string, got ${typeof e}.`)}const jo=\"web-broker-ports-ready\",ko=Ro.getLogger(\"get-web-interop-ports\");function Lo(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)}function To(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}\"function\"==typeof SuppressedError&&SuppressedError;const $o=e=>{var n,i,r;return r=class extends t.EventEmitter{constructor(t){super(),n.set(this,void 0),i.set(this,!1),this.connectSync=()=>{Lo(this,i,\"f\")||(e.addEventListener(\"message\",(e=>{e.data?.topic?.startsWith(\"wire-message\")&&e.data.message&&Lo(this,n,\"f\").call(this,{...JSON.parse(e.data.message),ports:e.ports})})),e.start())},this.connect=async()=>{this.connectSync()},this.send=t=>(e.postMessage({topic:\"wire-message\",message:JSON.stringify(t)}),Promise.resolve()),this.shutdown=async()=>{e.close()},To(this,n,t,\"f\")}getPort(){return e}},n=new WeakMap,i=new WeakMap,r};var Bo={},Go={};Object.defineProperty(Go,\"__esModule\",{value:!0}),Go.BaseEnvironment=void 0;const Wo=vr();Go.BaseEnvironment=class{async getViewWindowIdentity(e,t){const{identity:n}=await e.View.wrapSync(t).getCurrentWindow();return n}async getInteropInfo(e){const t=await e.Application.getCurrentSync().getInfo().catch((()=>null)),n=t?.initialOptions?.interopBrokerConfiguration??{};return{fdc3Version:t?(0,Wo.getDefaultViewFdc3VersionFromAppInfo)(t):void 0,...n,fdc3Info:{providerVersion:await e.System.getVersion(),provider:\"OpenFin\"}}}},Object.defineProperty(Bo,\"__esModule\",{value:!0});var Ho=Bo.BrowserEnvironment=void 0;const No=Go;class Do extends No.BaseEnvironment{constructor(){super(...arguments),this.type=\"other\",this.getRandomId=()=>{const e=new Uint32Array(1);return window.crypto.getRandomValues(e)[0].toString(32)}}getAdapterVersionSync(){return\"\"}observeBounds(e,t){throw new Error(\"Method not implemented.\")}layoutAllowedInContext(e){return!1}initLayoutManager(e,t,n){throw new Error(\"Method not implemented.\")}applyLayoutSnapshot(e,t,n){throw new Error(\"Method not implemented.\")}createLayout(e,t){throw new Error(\"Method not implemented.\")}destroyLayout(e,t){throw new Error(\"Method not implemented.\")}resolveLayout(e,t){throw new Error(\"Method not implemented.\")}initPlatform(...e){throw new Error(\"Method not implemented.\")}writeToken(e,t){return Promise.resolve(\"\")}retrievePort(e){throw new Error(\"Method not implemented.\")}getNextMessageId(){return this.getRandomId()}createChildContent(e){throw new Error(\"Method not implemented.\")}getWebWindow(e){throw new Error(\"Method not implemented.\")}getCurrentEntityIdentity(){throw new Error(\"Method not implemented.\")}getCurrentEntityType(){return\"external connection\"}raiseEvent(e,t){throw new Error(\"Method not implemented.\")}getUrl(){return location.href}getDefaultChannelOptions(){return{create:{},connect:{}}}getRtcPeer(){return new RTCPeerConnection}getWsConstructor(){return WebSocket}whenReady(){return Promise.resolve()}}Ho=Bo.BrowserEnvironment=Do;const Uo=e=>\"platform\"in e&&void 0!==e.platform;var Vo,zo;class Ko extends Ho{constructor(e){super(),this.connectConfig=e,Vo.set(this,void 0),zo.set(this,new W((async()=>Promise.resolve().then((function(){return require(\"./main-b14f67c9.js\")}))))),Uo(e)&&this.validatePlatformOptions(e)}getAdapterVersionSync(){return\"0.39.21\"}validatePlatformOptions({platform:e}){if(!(\"layoutSnapshot\"in e))throw new Error(\"Platform options are missing layoutSnapshot. Please provide a layoutSnapshot in the platform options.\");if(\"windows\"in e||\"windows\"in e.layoutSnapshot)throw new Error(\"It appears you tried to call connect() with a snapshot object from an OpenFin desktop environment. Note that connect() expects to be called with a platform property with this structure: { platform: { layoutSnapshot } }. To get a layoutSnapshot of the expected structure, use fin.Platform.Layout.getCurrentLayoutManagerSync().getLayoutSnapshot() in v34+ in your desktop environment.\");const{layouts:t}=e.layoutSnapshot;Object.entries(t).map((([e,t])=>{if(\"object\"!=typeof t||null===t)throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must be an object.`);if(!(\"content\"in t))throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must contain a 'content' property.`)}))}async getInteropInfo(e){return{...{contextGroups:void 0,logging:{beforeAction:{enabled:!1},afterAction:{enabled:!1}}},fdc3Version:void 0,fdc3Info:{providerVersion:\"0.39.21\",provider:\"OpenFin Web\"}}}layoutAllowedInContext(e){return!0}async initLayoutManager(e,t,n){if(Lo(this,Vo,\"f\"))throw new Error(\"Layout already initialized.\");if(!Uo(this.connectConfig))throw new Error(\"Platform options are missing from connection config.\");const{WebLayoutEntryPoint:i}=await Lo(this,zo,\"f\").getValue();return To(this,Vo,new i(this.connectConfig),\"f\"),await Lo(this,Vo,\"f\").initLayoutManager(e,t,n)}async applyLayoutSnapshot(e,t,n){Lo(this,Vo,\"f\")?.applyLayoutSnapshot(e,t,n)}async createLayout(e,t){return Lo(this,Vo,\"f\")?.createLayout(e,t)}async destroyLayout(e,t){return Lo(this,Vo,\"f\")?.destroyLayout(e,t)}async getViewWindowIdentity(e,t){return Promise.resolve({uuid:t.uuid,name:t.uuid})}}Vo=new WeakMap,zo=new WeakMap;const qo=()=>{const e=((e,t)=>{const n=new RegExp(`^${t}<(?.*)>$`).exec(e)?.groups?.meta;if(n)try{return JSON.parse(atob(n))}catch(e){throw new Error(`Failed to decode JSON from ${n}.`)}})(window.name,\"of-frame\");if(e)try{const{name:t,uuid:n,brokerUrl:i,providerId:r,contextGroup:o}=e;return Fo(i,\"brokerUrl\"),Fo(n,\"uuid\"),Fo(t,\"name\"),{identity:{name:t,uuid:n},brokerUrl:i,interopConfig:{providerId:r,currentContextGroup:o}}}catch(e){throw new Error(`Unexpected error occurred when inferring platform information: ${e.stack}`)}},Jo=()=>{const e=r.v4();return{uuid:e,name:e}},Yo=async e=>{if(\"enabled\"===e.connectionInheritance){const t=await(async e=>{const t=qo();if(t){const{validateOptions:n=(()=>!0)}=e,{identity:i,...r}=t;if(!await n(r))throw new Error(\"Parent options were rejected by validateOptions.\");return t}})(e);if(t)return t}if(!e.options){const t=\"enabled\"===e.connectionInheritance?\"Broker URL was not specified nor provided by a platform container.\":\"Connection inheritance is disabled but no options were provided.\";throw new Error(t)}return{...e.options,identity:Jo()}};exports.__classPrivateFieldGet=Lo,exports.__classPrivateFieldSet=To,exports.apiExposer=Gn,exports.commonjsGlobal=s,exports.connect=async t=>{try{Ro.log(\"Establishing connection\",t);const{brokerUrl:n,identity:i,timeout:r,interopConfig:s}=await Yo(t),{workerPort:a,iframeBrokerPort:c}=await(async(e,t,n)=>{const{origin:i}=new URL(e),r=document.createElement(\"IFRAME\");let s;r.style.display=\"none\";try{return await new Promise(((a,c)=>{const d=e=>{if(e.source===r.contentWindow&&e.data?.topic===`ack-${jo}`){if(e.origin!==i)c(new Error(`Broker redirected to unexpected origin ${e.origin}, expected ${i}.`));else if(e.data.success){const[t,n]=e.ports;a({iframeBrokerPort:t,workerPort:n})}else c(new m(e.data));window.removeEventListener(\"message\",d),clearTimeout(s)}};window.addEventListener(\"message\",d),ko.log(`Connecting to broker ${e}`),r.setAttribute(\"src\",e),r.setAttribute(\"name\",o(t,\"of-broker\")),document.body.appendChild(r),ko.log(\"Iframe loaded, awaiting init message from iframe\"),n&&(s=setTimeout((()=>{window.removeEventListener(\"message\",d),document.body.removeChild(r),c(new Error(\"Worker did not initialize in time\"))}),n))}))}catch(e){throw new Error(`Failed to initialise Fin Web Client. ${e.message}`,{cause:e})}})(n,i,r);Ro.log(\"Successfully established connection to shared worker\");const d={entityType:\"external connection\",...i};a.start(),c.start();const h=((t,n,i)=>{const r=$o(n),o=new Ko(t),s=new Io(r,o,i);return s.connectSync(),window.Buffer=e.Buffer,new Wr(s)})(t,a,d);return s?.providerId&&(h.me.interop=h.Interop.connectSync(s.providerId),s?.currentContextGroup&&h.me.interop.joinContextGroup(s.currentContextGroup).catch((e=>{console.warn(`Error joining specified context group: ${s?.currentContextGroup}, continuing`,e)}))),{...h,me:{...h.me,identity:{uuid:h.me.uuid,name:h.me.name}}}}catch(e){throw new Error(`An error occured during web-interop connection: ${e.message}`)}},exports.decorators=Nn,exports.encodeOptions=o,exports.layout_constants=ai,exports.lazy=G;\n","\"use strict\";var t=require(\"./main-8cad4070.js\"),e=require(\"uuid\");require(\"buffer/\"),require(\"events\"),require(\"lodash/cloneDeep\"),require(\"lodash/isEqual\");var i={},n={};Object.defineProperty(n,\"__esModule\",{value:!0}),n.mapValuesAsync=n.mapEntriesAsync=void 0;const o=(t,[e,i])=>({...t,[e]:i});async function s(t,e){return(await Promise.all(e.map((async([e,i])=>[e,await t(i,e)])))).reduce(o,{})}n.mapEntriesAsync=s,n.mapValuesAsync=async function(t,e){let i;return i=e instanceof Map?[...e.entries()]:Object.entries(e),s(t,i)};var r,a,l,h,d=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldSet||function(t,e,i,n,o){if(\"m\"===n)throw new TypeError(\"Private method is not writable\");if(\"a\"===n&&!o)throw new TypeError(\"Private accessor was defined without a setter\");if(\"function\"==typeof e?t!==e||!o:!e.has(t))throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");return\"a\"===n?o.call(t,i):o?o.value=i:e.set(t,i),i},c=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldGet||function(t,e,i,n){if(\"a\"===i&&!n)throw new TypeError(\"Private accessor was defined without a getter\");if(\"function\"==typeof e?t!==e||!n:!e.has(t))throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");return\"m\"===i?n:\"a\"===i?n.call(t):n?n.value:e.get(t)};Object.defineProperty(i,\"__esModule\",{value:!0});var m=i.DefaultLayoutManager=void 0;const u=n;class p{constructor(t){a.set(this,void 0),l.set(this,new Map),d(this,a,t,\"f\")}size(){return c(this,l,\"f\").size}async applyLayoutSnapshot({layouts:t}){if(Object.keys(t).length>1)throw new Error(\"[LayoutManager] Tried to call applyLayoutSnapshot with more than 1 layout. When implementing multiple layouts via overridden LayoutManager class, you must override and fully implement the applyLayoutSnapshot method without calling super.applyLayoutSnapshot().\");const[[e,i]]=Object.entries(t);await p.createLayout(this,{layoutName:e,layout:i})}async showLayout({layoutName:t}){}async getLayoutSnapshot(){return{layouts:await(0,u.mapValuesAsync)((t=>t.getFrameSnapshot()),c(this,l,\"f\"))}}async removeLayout({layoutName:t}){}getLayoutIdentityForView(t){const e=[...c(this,l,\"f\").values()].find((e=>e.getCurrentViews().some((e=>e.name===t.name&&e.uuid===t.uuid))));return e?.identity??void 0}isLayoutVisible({layoutName:t}){return c(p,r,\"m\",h).call(p,this,t).isVisible()}resolveLayoutIdentity(t){if(t&&\"layoutName\"in t)return t;const e=[...c(this,l,\"f\").values()];if(1===e.length)return e[0].identity;const i=e.find((t=>t.isVisible()));return i?.identity??void 0}static async resolveLayout(t,e){const i=t.resolveLayoutIdentity(e);if(void 0===i||!(\"layoutName\"in i))throw new Error(\"[layout-manager] resolveLayout: Could not resolve the layout identity. Make sure you include 'layoutName' in the identity object.\");return c(p,r,\"m\",h).call(p,t,i.layoutName)}static async handleSharedView(t,e,i){await(0,u.mapValuesAsync)((async t=>{if(t.identity.layoutName!==e.layoutName){const e=t.getCurrentViews().find((t=>t.name===i.name));e&&await t.onViewDetached({viewIdentity:e,target:null}).catch(console.error)}}),c(t,l,\"f\"))}static async handleLastViewRemoved(t,e){await t.removeLayout(e),await c(t,a,\"f\").handleLastViewRemoved(t)}static async destroyLayout(t,{layoutName:e}){await c(p,r,\"m\",h).call(p,t,e).destroy(),c(t,l,\"f\").delete(e)}static async createLayout(t,e){const{layoutName:i}=e;if(c(t,l,\"f\").has(i))throw new Error(`Layout name ${i} already exists`);await c(t,a,\"f\").createLayout(e,t)}static registerLayout(t,e,i){c(t,l,\"f\").set(e,i)}static getAllLayouts(t){return[...c(t,l,\"f\").values()]}static setInitialSnapshot(t,e){c(t,a,\"f\").setInitialSnapshot(e)}static createClosedConstructor(...t){return class extends p{constructor(){super(...t)}}}}m=i.DefaultLayoutManager=p,r=p,a=new WeakMap,l=new WeakMap,h=function(t,e){const i=c(t,l,\"f\").get(e);if(!i)throw new Error(`[layout-manager] getLayoutByName: Could not locate layout with name '${e}'`);return i};var g={},f={},v={};Object.defineProperty(v,\"__esModule\",{value:!0}),v.ReversibleMap=void 0;v.ReversibleMap=class{constructor(){this.valueToKey=new Map,this.keyToValue=new Map,this.setUnique=(t,e)=>{if(this.hasKey(t)||this.hasValue(e))throw new Error(\"Key or value already in the map.\");this.keyToValue.set(t,e),this.valueToKey.set(e,t)},this.getKey=t=>{const e=this.valueToKey.get(t);if(!e)throw new Error(\"Value not found in the map.\");return e},this.deleteKey=t=>{const e=this.getValue(t);return this.keyToValue.delete(t),this.valueToKey.delete(e),e},this.deleteValue=t=>{const e=this.getKey(t);return this.keyToValue.delete(e),this.valueToKey.delete(t),e},this.hasKey=t=>this.keyToValue.has(t),this.hasValue=t=>this.valueToKey.has(t)}getValue(t){const e=this.keyToValue.get(t);if(!e)throw new Error(\"Key not found in the map.\");return e}},Object.defineProperty(f,\"__esModule\",{value:!0});var _=f.LayoutContentCache=void 0;const y=t.lazy,C=v;class w{constructor(){this.contentItemCache=new C.ReversibleMap,this.contentItemCacheId=0,this.createCacheKey=()=>{const t=`entity-${this.contentItemCacheId.toString()}`;return this.contentItemCacheId+=1,t},this.hasKey=t=>this.contentItemCache.hasKey(t),this.getItemOrUndefined=t=>{try{return this.getContentItemOrThrow(t)}catch(t){return}},this.getContentItemOrThrow=(t,e)=>{if(!this.contentItemCache.hasKey(t))throw new Error(\"Layout component has been destroyed or detached from the current layout.\");const i=this.contentItemCache.getValue(t);if(e&&!e.includes(i.type))throw new Error(`Layout item is not the expected type. Expected ${e.join(\", \")}, got ${i.type}.`);return i},this.getOrCreateEntityId=t=>{if(this.contentItemCache.hasValue(t))return this.contentItemCache.getKey(t);t.onDestroyed((()=>{this.contentItemCache.deleteValue(t)}));const e=this.createCacheKey();return this.contentItemCache.setUnique(e,t),e}}static getSingleInstance(){return w.singleton.getValue()}}_=f.LayoutContentCache=w,w.singleton=new y.Lazy((()=>new w));var I={},b={};!function(t){Object.defineProperty(t,\"__esModule\",{value:!0}),t.getAdjacentStacks=t.doShareEdge=t.getAdjacentItem=void 0;t.getAdjacentItem=(e,i)=>{const{parent:n}=e;if(e.isRoot()||!n)return;const o=[\"top\",\"bottom\"].includes(i)?\"column\":\"row\",s=[\"top\",\"left\"].includes(i)?-1:1;if(n.type===o){const t=n.contentItems.indexOf(e)+s;if(t>=0&&t{const n=t.getBounds(),o=e.getBounds();if(!n||!o)return!1;if([\"top\",\"bottom\"].includes(i)){return!(n.righto.right)}return!(n.bottomo.bottom)};t.getAdjacentStacks=(e,i)=>{const n=[\"top\",\"bottom\"].includes(i)?\"row\":\"column\",o=s=>\"stack\"===s.type?(0,t.doShareEdge)(e,s,i)?[s]:[]:\"root\"===s.type||\"ground\"===s.type?[]:s.type===n?s.contentItems.map((t=>o(t))).flat():s.type!==n?[\"top\",\"right\"].includes(i)?o(s.contentItems[s.contentItems.length-1]):o(s.contentItems[0]):[],s=(0,t.getAdjacentItem)(e,i);return s?o(s):[]}}(b);var S=t.commonjsGlobal&&t.commonjsGlobal.__decorate||function(t,e,i,n){var o,s=arguments.length,r=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if(\"object\"==typeof Reflect&&\"function\"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(s<3?o(r):s>3?o(e,i,r):o(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};Object.defineProperty(I,\"__esModule\",{value:!0}),I.LayoutEntitiesController=void 0;const E=t.decorators,x=b,L=i;class z{constructor(t,e,i){this.wire=t,this.layoutManager=e,this.layoutContentCache=i,this.analytics=t=>{this.wire.sendAction(`layout-controller-${t}`).catch((()=>{}))},this.getLayoutIdentityForViewOrThrow=async t=>{const e=this.layoutManager.getLayoutIdentityForView(t);if(!e)throw new Error(`View identity ${t.name} is not attached to any layouts.`);return e},this.getRoot=async t=>{this.analytics(\"get-root\");const e=(await this.getLayout(t)).getRoot();return{type:e.type,entityId:this.layoutContentCache.getOrCreateEntityId(e)}},this.getStackByView=async t=>{this.analytics(\"get-stack-by-view\");const e=await this.getLayoutIdentityForViewOrThrow(t),i=(await this.getLayout(e)).getStackByView(t);if(\"stack\"===i?.type)return{entityId:this.layoutContentCache.getOrCreateEntityId(i),type:\"stack\"}},this.getStackViews=t=>{this.analytics(\"get-stack-views\");return this.layoutContentCache.getContentItemOrThrow(t,[\"stack\"]).contentItems.map((t=>({name:t.viewName,uuid:this.wire.me.uuid})))},this.isRoot=t=>{this.analytics(\"is-root\");return this.layoutContentCache.getContentItemOrThrow(t).isRoot()},this.exists=t=>(this.analytics(\"exists\"),this.layoutContentCache.hasKey(t)),this.addViewToStack=async(t,e,{index:i}={index:0})=>{this.analytics(\"add-view-to-stack\");const n=this.layoutContentCache.getContentItemOrThrow(t);if(i&&i>n.contentItems.length+1)throw new Error(`Index '${i}' out of range, please exclude the index or specify a number between 0 and ${n.contentItems.length}`);const o={id:t,index:i},{identity:s}=await n.layout.platformCreateView(e,{location:o});return s},this.findViewInStack=(t,e)=>t.contentItems.find((t=>t.viewName===e.name)),this.removeViewFromStack=async(t,e)=>{this.analytics(\"remove-view-from-stack\");const i=this.layoutContentCache.getContentItemOrThrow(t,[\"stack\"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to remove a view ('${e.name}') which does not belong to the stack.`);await n.layout.platformCloseView(e)},this.createAdjacentStack=async(t,e,{position:i=\"right\"}={})=>{if(this.analytics(\"create-adjacent-stack\"),!Array.isArray(e)||0===e.length)throw new Error('The parameter \"views\" must be an array with at least 1 element.');if(![\"top\",\"bottom\",\"left\",\"right\"].includes(i))throw new Error(`Invalid position '${i}' specified.`);const n=this.layoutContentCache.getContentItemOrThrow(t).createAdjacentStack({position:i}),o=this.layoutContentCache.getOrCreateEntityId(n);return await Promise.all(e.reverse().map((t=>this.addViewToStack(o,t)))),o},this.getAdjacentStacks=async({targetId:t,edge:e})=>{this.analytics(\"get-adjacent-stacks\");const i=this.layoutContentCache.getContentItemOrThrow(t);return(0,x.getAdjacentStacks)(i,e).map((t=>({entityId:this.layoutContentCache.getOrCreateEntityId(t)})))},this.setStackActiveView=async(t,e)=>{this.analytics(\"set-stack-active-view\");const i=this.layoutContentCache.getContentItemOrThrow(t,[\"stack\"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to set a view ('${e.name}') as active when it does not belong to the stack.`);i.setActiveContentItem(n,!0)}}async getLayout(t){const e=await L.DefaultLayoutManager.resolveLayout(this.layoutManager,t);if(!e)throw new Error(`Could not resolve target layout identity ${JSON.stringify(t)}`);return e}getContent(t){this.analytics(\"get-content\");return this.layoutContentCache.getContentItemOrThrow(t,[\"column\",\"row\"]).contentItems.map((t=>({type:t.type,entityId:this.layoutContentCache.getOrCreateEntityId(t)})))}getParent(t){this.analytics(\"get-parent\");const e=this.layoutContentCache.getContentItemOrThrow(t);if(!e.isRoot())return e.parent?.contentItems.includes(e)?{type:e.parent.type,entityId:this.layoutContentCache.getOrCreateEntityId(e.parent)}:void 0}}S([(0,E.expose)()],z.prototype,\"getLayoutIdentityForViewOrThrow\",void 0),S([(0,E.expose)()],z.prototype,\"getRoot\",void 0),S([(0,E.expose)()],z.prototype,\"getStackByView\",void 0),S([(0,E.expose)()],z.prototype,\"getStackViews\",void 0),S([(0,E.expose)()],z.prototype,\"getContent\",null),S([(0,E.expose)()],z.prototype,\"getParent\",null),S([(0,E.expose)()],z.prototype,\"isRoot\",void 0),S([(0,E.expose)()],z.prototype,\"exists\",void 0),S([(0,E.expose)()],z.prototype,\"addViewToStack\",void 0),S([(0,E.expose)()],z.prototype,\"removeViewFromStack\",void 0),S([(0,E.expose)()],z.prototype,\"createAdjacentStack\",void 0),S([(0,E.expose)()],z.prototype,\"getAdjacentStacks\",void 0),S([(0,E.expose)()],z.prototype,\"setStackActiveView\",void 0),I.LayoutEntitiesController=z,Object.defineProperty(g,\"__esModule\",{value:!0});var M=g.initLayoutEndpoints=void 0;const P=t.apiExposer,T=t.layout_constants,A=f,k=I,D=i;M=g.initLayoutEndpoints=async function(t,e){const i=t.getFin(),n=await i.Platform.getCurrentSync().getClient(),o=new P.ChannelsExposer(n);await new P.ApiExposer(o).exposeInstance(new k.LayoutEntitiesController(t,e,A.LayoutContentCache.getSingleInstance()),{id:T.LAYOUT_CONTROLLER_ID}),await async function(t,e){const i=t=>async i=>{const n=await D.DefaultLayoutManager.resolveLayout(e,i.target);if(!n)throw new Error(`Could not resolve the layout target from payload ${JSON.stringify(i)}`);return t(n,i)},n=(e,n)=>{t.register(e,i(n))},o=(t,e)=>{n(t,e)};n(\"replace-view\",((t,e)=>t.replaceView(e))),n(\"replace-layout\",((t,{layout:e})=>t.replaceLayout(e))),n(\"add-view\",((t,e)=>t.insertView(e))),o(\"layout-add-view\",((t,{viewOptions:e,location:i,targetView:n})=>t.platformCreateView(e,{location:i,targetView:n}))),n(\"close-view\",((t,e)=>t.cleanupView(e.viewIdentity))),o(\"layout-close-view\",((t,e)=>t.platformCloseView(e.viewIdentity))),n(\"apply-preset-layout\",((t,e)=>t.applyPreset(e))),n(\"get-layout-views\",(t=>t.getCurrentViews())),n(\"get-frame-snapshot\",(t=>t.getFrameSnapshot())),n(\"is-visible\",(t=>t.isVisible())),n(\"destroy\",(t=>t.destroy())),t.register(\"get-layout-snapshot\",(()=>e.getLayoutSnapshot()))}(n,e)};var R={};Object.defineProperty(R,\"__esModule\",{value:!0});var U=R.BaseLayout=void 0;U=R.BaseLayout=class{};var O={};Object.defineProperty(O,\"__esModule\",{value:!0});var V=O.DOMEmitter=void 0;V=O.DOMEmitter=class{constructor(t){this.container=t}dispatchLocalEvent(t,e){const i={...e,type:t,tabSelector:`tab-${e.name}`,containerSelector:`container-${e.name}`,topic:\"openfin-DOM-event\"};this.container.dispatchEvent(new CustomEvent(t,{detail:i}))}};var B={};Object.defineProperty(B,\"__esModule\",{value:!0});var H=B.mapLayoutContentItemsImmutableSync=B.mapLayoutContentItemsImmutable=W=B.isVisible=void 0;var W=B.isVisible=t=>(0!==t.offsetWidth||0!==t.offsetHeight)&&\"hidden\"!==window.getComputedStyle(t).visibility&&t.offsetTop>=0&&t.offsetLeft>=0&&t.offsetTop<=window.innerHeight&&t.offsetLeft<=window.innerWidth;const F=t=>\"type\"in t&&\"component\"===t.type;B.mapLayoutContentItemsImmutable=async function t(e,i){return F(i)?e(i):{...i,content:await Promise.all(i.content?.map((i=>t(e,i))))}},H=B.mapLayoutContentItemsImmutableSync=function t(e,i){return F(i)?e(i):{...i,content:i.content?.map((i=>t(e,i)))}};class N extends Error{constructor(t,e){super(e),this.type=t}}class G extends N{constructor(t,e){super(\"Configuration\",t),this.node=e}}class j extends N{constructor(t){super(\"PopoutBlocked\",t)}}class $ extends N{constructor(t){super(\"API\",t)}}class Z extends N{constructor(t){super(\"Bind\",t)}}class q extends Error{constructor(t,e,i){super(`${t}: ${e}${void 0===i?\"\":\": \"+i}`)}}class X extends q{constructor(t,e){super(\"Assert\",t,e)}}class Y extends q{constructor(t,e,i){super(\"UnreachableCase\",t,`${e}${void 0===i?\"\":\": \"+i}`)}}class K extends q{constructor(t,e){super(\"UnexpectedNull\",t,e)}}class J extends q{constructor(t,e){super(\"UnexpectedUndefined\",t,e)}}var Q;!function(t){let e=!1;const i={PopoutCannotBeCreatedWithGroundItemConfig:{id:0,default:\"Popout cannot be created with ground ItemConfig\"},PleaseRegisterAConstructorFunction:{id:1,default:\"Please register a constructor function\"},ComponentTypeNotRegisteredAndBindComponentEventHandlerNotAssigned:{id:2,default:\"Component type not registered and BindComponentEvent handler not assigned\"},ComponentIsAlreadyRegistered:{id:3,default:\"Component is already registered\"},ComponentIsNotVirtuable:{id:4,default:\"Component is not virtuable. Requires rootHtmlElement field/getter\"},VirtualComponentDoesNotHaveRootHtmlElement:{id:5,default:'Virtual component does not have getter \"rootHtmlElement\"'},ItemConfigIsNotTypeComponent:{id:6,default:\"ItemConfig is not of type component\"},InvalidNumberPartInSizeString:{id:7,default:\"Invalid number part in size string\"},UnknownUnitInSizeString:{id:8,default:\"Unknown unit in size string\"},UnsupportedUnitInSizeString:{id:9,default:\"Unsupported unit in size string\"}};t.idCount=Object.keys(i).length;const n=Object.values(i);t.checkInitialise=function(){if(!e)for(let e=0;e=\"0\"&&t<=\"9\"}function Tt(t,e){const i=zt(e);t.style.width=i}function At(t,e){const i=zt(e);t.style.height=i}function kt(t){return{width:t.offsetWidth,height:t.offsetHeight}}function Dt(t,e){t.style.display=e?\"\":\"none\"}function Rt(t,e){if(void 0!==e)for(const i in e)if(e.hasOwnProperty(i)){const n=e[i],o=t[i];t[i]=Ut(o,n)}return t}function Ut(t,e){if(\"object\"!=typeof e)return e;if(Array.isArray(e)){const t=e.length,i=new Array(t);for(let n=0;n36)throw new Error(\"Too many keys in config minifier map\")},t.translateObject=n}(dt||(dt={})),function(t){t.defaults={type:at.ground,content:[],size:1,sizeUnit:ht.Fractional,minSize:void 0,minSizeUnit:ht.Pixel,id:\"\",isClosable:!0},t.createCopy=function(t,e){switch(t.type){case at.ground:case at.row:case at.column:return gt.createCopy(t,e);case at.stack:return ut.createCopy(t,e);case at.component:return pt.createCopy(t);default:throw new Y(\"CICC91354\",t.type,\"Invalid Config Item type specified\")}},t.createDefault=function(t){switch(t){case at.ground:throw new X(\"CICCDR91562\");case at.row:case at.column:return gt.createDefault(t);case at.stack:return ut.createDefault();case at.component:return pt.createDefault();default:throw new Y(\"CICCDD91563\",t,\"Invalid Config Item type specified\")}},t.isComponentItem=function(t){return t.type===at.component},t.isStackItem=function(t){return t.type===at.stack},t.isGroundItem=function(t){return t.type===at.ground}}(ct||(ct={})),function(t){t.defaultMaximised=!1,function(t){t.createCopy=function(t,e){return void 0===t?void 0:{show:null!=e?e:t.show,popout:t.popout,close:t.close,maximise:t.maximise,minimise:t.minimise,tabDropdown:t.tabDropdown}}}(t.Header||(t.Header={}))}(mt||(mt={})),function(t){function e(t){const e=t.length,i=new Array(e);for(let n=0;n\"__glMaximised\"===t));t>0&&(o=!0,n=n.splice(t,1)),e=n.length>0?n[0]:ct.defaults.id}else e=n;return i=void 0!==t.maximised?t.maximised:o,{id:e,maximised:i}}}(wt||(wt={})),function(t){function e(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0;return{resolved:!0,root:Et.resolve(i),openPopouts:t.resolveOpenPopouts(e.openPopouts),dimensions:t.Dimensions.resolve(e.dimensions),settings:t.Settings.resolve(e.settings),header:t.Header.resolve(e.header,e.settings,e.labels)}}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:Lt.fromResolvedArray(e.openPopouts),settings:_t.Settings.createCopy(e.settings),dimensions:t.Dimensions.fromResolved(e.dimensions),header:_t.Header.createCopy(e.header)}},t.isResolved=function(t){const e=t;return void 0!==e.resolved&&!0===e.resolved},t.resolveOpenPopouts=function(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0,{root:Et.resolve(o),openPopouts:xt.resolveOpenPopouts(e.openPopouts),dimensions:xt.Dimensions.resolve(e.dimensions),settings:xt.Settings.resolve(e.settings),header:xt.Header.resolve(e.header,e.settings,e.labels),parentId:null!==(i=e.parentId)&&void 0!==i?i:null,indexInParent:null!==(n=e.indexInParent)&&void 0!==n?n:null,window:t.Window.resolve(e.window,e.dimensions),resolved:!0}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:i(e.openPopouts),dimensions:xt.Dimensions.fromResolved(e.dimensions),settings:_t.Settings.createCopy(e.settings),header:_t.Header.createCopy(e.header),parentId:e.parentId,indexInParent:e.indexInParent,window:t.Window.fromResolved(e.window)}},t.fromResolvedArray=i}(Lt||(Lt={}));class Wt{constructor(){this._allEventSubscriptions=[],this._subscriptionsMap=new Map,this.unbind=this.removeEventListener,this.trigger=this.emit}tryBubbleEvent(t,e){}emit(t,...e){let i=this._subscriptionsMap.get(t);if(void 0!==i){i=i.slice();for(let t=0;t0){const n=e.slice();n.unshift(t);const o=this._allEventSubscriptions.slice();for(let t=0;t0?n.contentItems[0]:n,e=0);const o=this._layoutManager.createAndInitContentItem(i,t);t.addChild(o,e),this._layoutManager.layoutConfig.settings.popInOnClose?this._onClose():this.close()}createWindow(){const t=this.createUrl(),e=Math.floor(1e6*Math.random()).toString(36),i=this.serializeWindowFeatures({width:this._initialWindowSize.width,height:this._initialWindowSize.height,innerWidth:this._initialWindowSize.width,innerHeight:this._initialWindowSize.height,menubar:\"no\",toolbar:\"no\",location:\"no\",personalbar:\"no\",resizable:\"yes\",scrollbars:\"no\",status:\"no\"});if(this._popoutWindow=globalThis.open(t,e,i),this._popoutWindow)this._popoutWindow.addEventListener(\"load\",(()=>this.positionWindow()),{passive:!0}),this._popoutWindow.addEventListener(\"beforeunload\",(()=>{this._layoutManager.layoutConfig.settings.popInOnClose?this.popIn():this._onClose()}),{passive:!0}),this._checkReadyInterval=setInterval((()=>this.checkReady()),10);else if(!0===this._layoutManager.layoutConfig.settings.blockedPopoutsThrowError){throw new j(\"Popout blocked\")}}checkReady(){if(null===this._popoutWindow)throw new K(\"BPCR01844\");this._popoutWindow.__glInstance&&this._popoutWindow.__glInstance.isInitialised&&(this.onInitialised(),void 0!==this._checkReadyInterval&&(clearInterval(this._checkReadyInterval),this._checkReadyInterval=void 0))}serializeWindowFeatures(t){const e=[];for(const i in t)e.push(i+\"=\"+t[i].toString());return e.join(\",\")}createUrl(){const t=\"gl-window-config-\"+Ot(),e=_t.minifyConfig(this._config);try{localStorage.setItem(t,JSON.stringify(e))}catch(t){throw new Error(\"Error while writing to localStorage \"+function(t){return t instanceof Error?t.message:\"string\"==typeof t?t:\"Unknown Error\"}(t))}const i=new URL(location.href);return i.searchParams.set(\"gl-window\",t),i.toString()}positionWindow(){if(null===this._popoutWindow)throw new Error(\"BrowserPopout.positionWindow: null popoutWindow\");this._popoutWindow.moveTo(this._initialWindowSize.left,this._initialWindowSize.top),this._popoutWindow.focus()}onInitialised(){this._isInitialised=!0,this.getGlInstance().on(\"popIn\",(()=>this.popIn())),this.emit(\"initialised\")}_onClose(){setTimeout((()=>this.emit(\"closed\")),50)}}class Gt extends Wt{constructor(t,e,i,n){super(),this.layoutManager=t,this._parent=i,this._element=n,this._popInParentIds=[],this._type=e.type,this._id=e.id,this._isInitialised=!1,this.isGround=!1,this.isRow=!1,this.isColumn=!1,this.isStack=!1,this.isComponent=!1,this.size=e.size,this.sizeUnit=e.sizeUnit,this.minSize=e.minSize,this.minSizeUnit=e.minSizeUnit,this._isClosable=e.isClosable,this._pendingEventPropagations={},this._throttledEvents=[\"stateChanged\"],this._contentItems=this.createContentItems(e.content)}get type(){return this._type}get id(){return this._id}set id(t){this._id=t}get popInParentIds(){return this._popInParentIds}get parent(){return this._parent}get contentItems(){return this._contentItems}get isClosable(){return this._isClosable}get element(){return this._element}get isInitialised(){return this._isInitialised}static isStack(t){return t.isStack}static isComponentItem(t){return t.isComponent}static isComponentParentableItem(t){return t.isStack||t.isGround}removeChild(t,e=!1){const i=this._contentItems.indexOf(t);if(-1===i)throw new Error(\"Can't remove child item. Unknown content item\");if(e||this._contentItems[i].destroy(),this._contentItems.splice(i,1),this._contentItems.length>0)this.updateSize(!1);else if(!this.isGround&&!0===this._isClosable){if(null===this._parent)throw new K(\"CIUC00874\");this._parent.removeChild(this)}}addChild(t,e,i){return null!=e||(e=this._contentItems.length),this._contentItems.splice(e,0,t),t.setParent(this),!0===this._isInitialised&&!1===t._isInitialised&&t.init(),e}replaceChild(t,e,i=!1){const n=this._contentItems.indexOf(t),o=t._element.parentNode;if(-1===n)throw new X(\"CIRCI23232\",\"Can't replace child. oldChild is not child of this\");if(null===o)throw new K(\"CIRCP23232\");if(o.replaceChild(e._element,t._element),!0===i&&(t._parent=null,t.destroy()),this._contentItems[n]=e,e.setParent(this),e.size=t.size,e.sizeUnit=t.sizeUnit,e.minSize=t.minSize,e.minSizeUnit=t.minSizeUnit,null===e._parent)throw new K(\"CIRCNC45699\");!0===e._parent._isInitialised&&!1===e._isInitialised&&e.init(),this.updateSize(!1)}remove(){if(null===this._parent)throw new K(\"CIR11110\");this._parent.removeChild(this)}popout(){const t=Ot(),e=this.layoutManager.createPopoutFromContentItem(this,void 0,t,void 0);return this.emitBaseBubblingEvent(\"stateChanged\"),e}calculateConfigContent(){const t=this._contentItems,e=t.length,i=new Array(e);for(let n=0;nthis.propagateEventToLayoutManager(t,e))))}propagateEventToLayoutManager(t,e){this._pendingEventPropagations[t]=!1,this.layoutManager.emitUnknown(t,e)}}class jt extends Gt{constructor(t,e,i){super(t,e,i,document.createElement(\"div\")),this._parentItem=i,this._focused=!1,this.isComponent=!0,this._reorderEnabled=e.reorderEnabled,this.applyUpdatableConfig(e),this._initialWantMaximise=e.maximised;const n=document.createElement(\"div\");n.classList.add(\"lm_content\"),this.element.appendChild(n),this._container=new Ft(e,this,t,n,(t=>this.handleUpdateItemConfigEvent(t)),(()=>this.show()),(()=>this.hide()),(t=>this.focus(t)),(t=>this.blur(t)))}get componentName(){return this._container.componentType}get componentType(){return this._container.componentType}get reorderEnabled(){return this._reorderEnabled}get initialWantMaximise(){return this._initialWantMaximise}get component(){return this._container.component}get container(){return this._container}get parentItem(){return this._parentItem}get headerConfig(){return this._headerConfig}get title(){return this._title}get tab(){return this._tab}get focused(){return this._focused}destroy(){this._container.destroy(),super.destroy()}applyUpdatableConfig(t){this.setTitle(t.title),this._headerConfig=t.header}toConfig(){const t=this._container.stateRequestEvent,e=void 0===t?this._container.state:t();return{type:at.component,content:[],size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,maximised:!1,isClosable:this.isClosable,reorderEnabled:this._reorderEnabled,title:this._title,header:mt.Header.createCopy(this._headerConfig),componentType:pt.copyComponentType(this.componentType),componentState:e}}close(){if(null===this.parent)throw new K(\"CIC68883\");this.parent.removeChild(this,!1)}enterDragMode(t,e){Tt(this.element,t),At(this.element,e),this._container.enterDragMode(t,e)}exitDragMode(){this._container.exitDragMode()}enterStackMaximised(){this._container.enterStackMaximised()}exitStackMaximised(){this._container.exitStackMaximised()}drag(){this._container.drag()}updateSize(t){this.updateNodeSize(t)}init(){this.updateNodeSize(!1),super.init(),this._container.emit(\"open\"),this.initContentItems()}setTitle(t){this._title=t,this.emit(\"titleChanged\",t),this.emit(\"stateChanged\")}setTab(t){this._tab=t,this.emit(\"tab\",t),this._container.setTab(t)}hide(){super.hide(),this._container.setVisibility(!1)}show(){super.show(),this._container.setVisibility(!0)}focus(t=!1){this.parentItem.setActiveComponentItem(this,!0,t)}setFocused(t){this._focused=!0,this.tab.setFocused(),t||this.emitBaseBubblingEvent(\"focus\")}blur(t=!1){this._focused&&this.layoutManager.setFocusedComponentItem(void 0,t)}setBlurred(t){this._focused=!1,this.tab.setBlurred(),t||this.emitBaseBubblingEvent(\"blur\")}setParent(t){this._parentItem=t,super.setParent(t)}handleUpdateItemConfigEvent(t){this.applyUpdatableConfig(t)}updateNodeSize(t){if(\"none\"!==this.element.style.display){const{width:e,height:i}=kt(this.element);this._container.setSizeToNodeSize(e,i,t)}}}class $t extends Gt{constructor(){super(...arguments),this._focused=!1}get focused(){return this._focused}setFocusedValue(t){this._focused=t}}class Zt extends Wt{constructor(t,e){super(),this._eElement=t,this._pointerTracking=!1,this._pointerDownEventListener=t=>this.onPointerDown(t),this._pointerMoveEventListener=t=>this.onPointerMove(t),this._pointerUpEventListener=t=>this.onPointerUp(t),this._timeout=void 0,this._allowableTargets=[t,...e],this._oDocument=document,this._eBody=document.body,this._nDelay=1800,this._nDistance=10,this._nX=0,this._nY=0,this._nOriginalX=0,this._nOriginalY=0,this._dragging=!1,this._eElement.addEventListener(\"pointerdown\",this._pointerDownEventListener,{passive:!0})}destroy(){this.checkRemovePointerTrackingEventListeners(),this._eElement.removeEventListener(\"pointerdown\",this._pointerDownEventListener)}cancelDrag(){this.processDragStop(void 0)}onPointerDown(t){if(this._allowableTargets.includes(t.target)&&t.isPrimary){const e=this.getPointerCoordinates(t);this.processPointerDown(e)}}processPointerDown(t){this._nOriginalX=t.x,this._nOriginalY=t.y,this._oDocument.addEventListener(\"pointermove\",this._pointerMoveEventListener),this._oDocument.addEventListener(\"pointerup\",this._pointerUpEventListener,{passive:!0}),this._pointerTracking=!0,this._timeout=setTimeout((()=>{try{this.startDrag()}catch(t){throw console.error(t),t}}),this._nDelay)}onPointerMove(t){this._pointerTracking&&(this.processDragMove(t),t.preventDefault())}processDragMove(t){this._nX=t.pageX-this._nOriginalX,this._nY=t.pageY-this._nOriginalY,!1===this._dragging&&(Math.abs(this._nX)>this._nDistance||Math.abs(this._nY)>this._nDistance)&&this.startDrag(),this._dragging&&this.emit(\"drag\",this._nX,this._nY,t)}onPointerUp(t){this.processDragStop(t)}processDragStop(t){var e;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this.checkRemovePointerTrackingEventListeners(),!0===this._dragging&&(this._eBody.classList.remove(\"lm_dragging\"),this._eElement.classList.remove(\"lm_dragging\"),null===(e=this._oDocument.querySelector(\"iframe\"))||void 0===e||e.style.setProperty(\"pointer-events\",\"\"),this._dragging=!1,this.emit(\"dragStop\",t))}checkRemovePointerTrackingEventListeners(){this._pointerTracking&&(this._oDocument.removeEventListener(\"pointermove\",this._pointerMoveEventListener),this._oDocument.removeEventListener(\"pointerup\",this._pointerUpEventListener),this._pointerTracking=!1)}startDrag(){var t;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this._dragging=!0,this._eBody.classList.add(\"lm_dragging\"),this._eElement.classList.add(\"lm_dragging\"),null===(t=this._oDocument.querySelector(\"iframe\"))||void 0===t||t.style.setProperty(\"pointer-events\",\"none\"),this.emit(\"dragStart\",this._nOriginalX,this._nOriginalY)}getPointerCoordinates(t){return{x:t.pageX,y:t.pageY}}}class qt{constructor(t,e,i){this._isVertical=t,this._size=e,this._grabSize=i0){const i=this.createSplitter(Math.max(0,e-1)).element;e>0?(this.contentItems[e-1].element.insertAdjacentElement(\"afterend\",i),i.insertAdjacentElement(\"afterend\",t.element)):(this.contentItems[0].element.insertAdjacentElement(\"beforebegin\",i),i.insertAdjacentElement(\"beforebegin\",t.element))}else this._childElementContainer.appendChild(t.element);super.addChild(t,e);const n=1/this.contentItems.length*100;if(!0===i)return this.emitBaseBubblingEvent(\"stateChanged\"),e;for(let e=0;e0&&(this.calculateRelativeSizes(),this.setAbsoluteSizes()),this.emitBaseBubblingEvent(\"stateChanged\"),this.emit(\"resize\")}setAbsoluteSizes(){const t=this.calculateAbsoluteSizes();for(let e=0;e0&&t.itemSizes[e]++,this._isColumn?(Tt(this.contentItems[e].element,t.crossAxisSize),At(this.contentItems[e].element,t.itemSizes[e])):(Tt(this.contentItems[e].element,t.itemSizes[e]),At(this.contentItems[e].element,t.crossAxisSize))}calculateAbsoluteSizes(){const t=(this.contentItems.length-1)*this._splitterSize,{width:e,height:i}=kt(this.element);let n,o;this._isColumn?(n=i-t,o=e):(n=e-t,o=i);let s=0;const r=[];for(let t=0;t0){const n=100-t;for(let t=0;t100&&e.length>0){for(let t=0;te)return;{const r=i/e;let a=i;for(let e=0;ethis.onSplitterDrag(e,t,i))),e.on(\"dragStop\",(()=>this.onSplitterDragStop(e))),e.on(\"dragStart\",(()=>this.onSplitterDragStart(e))),this._splitter.splice(t,0,e),e}getSplitItems(t){const e=this._splitter.indexOf(t);return{before:this.contentItems[e],after:this.contentItems[e+1]}}calculateContentItemMinSize(t){const e=t.minSize;if(void 0!==e){if(t.minSizeUnit===ht.Pixel)return e;throw new X(\"ROCGMD98831\",JSON.stringify(t))}{const t=this.layoutManager.layoutConfig.dimensions;return this._isColumn?t.defaultMinItemHeight:t.defaultMinItemWidth}}calculateContentItemsTotalMinSize(t){let e=0;for(const i of t)e+=this.calculateContentItemMinSize(i);return e}onSplitterDragStart(t){const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=this.calculateContentItemsTotalMinSize(e.before.contentItems),s=this.calculateContentItemsTotalMinSize(e.after.contentItems);this._splitterPosition=0,this._splitterMinPosition=-1*(i-o),this._splitterMaxPosition=n-s}onSplitterDrag(t,e,i){let n=this._isColumn?i:e;if(null===this._splitterMinPosition||null===this._splitterMaxPosition)throw new K(\"ROCOSD59226\");n=Math.max(n,this._splitterMinPosition),n=Math.min(n,this._splitterMaxPosition),this._splitterPosition=n;const o=zt(n);this._isColumn?t.element.style.top=o:t.element.style.left=o}onSplitterDragStop(t){if(null===this._splitterPosition)throw new K(\"ROCOSDS66932\");{const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=(this._splitterPosition+i)/(i+n),s=e.before.size+e.after.size;e.before.size=o*s,e.after.size=(1-o)*s,t.element.style.top=zt(0),t.element.style.left=zt(0),globalThis.requestAnimationFrame((()=>this.updateSize(!1)))}}}!function(t){t.getElementDimensionSize=function(t,e){return\"width\"===e?function(t){return t.offsetWidth}(t):function(t){return t.offsetHeight}(t)},t.setElementDimensionSize=function(t,e,i){return\"width\"===e?Tt(t,i):At(t,i)},t.createElement=function(t,e){const i=t.createElement(\"div\");return i.classList.add(\"lm_item\"),e?i.classList.add(\"lm_column\"):i.classList.add(\"lm_row\"),i}}(Xt||(Xt={}));class Yt extends $t{constructor(t,e,i){super(t,vt.create(e),null,Yt.createElement(document)),this.isGround=!0,this._childElementContainer=this.element,this._containerElement=i;let n=null;for(;;){const t=n?n.previousSibling:this._containerElement.lastChild;if(!(t instanceof Element&&t.classList.contains(\"lm_content\")))break;n=t}this._containerElement.insertBefore(this.element,n)}init(){if(!0!==this.isInitialised){this.updateNodeSize();for(let t=0;t0?this.contentItems[0]:this,n.isComponent)throw new Error(\"Cannot add item as child to ComponentItem\");{const t=this.layoutManager.createAndInitContentItem(i,n);return e=n.addChild(t,e),n===this?-1:e}}loadComponentAsRoot(t){this.clearRoot();const e=Ct.resolve(t,!1);if(e.maximised)throw new Error(\"Root Component cannot be maximised\");{const t=new jt(this.layoutManager,e,this);t.init(),this.addChild(t,0)}}addChild(t,e){if(this.contentItems.length>0)throw new Error(\"Ground node can only have a single child\");return this._childElementContainer.appendChild(t.element),e=super.addChild(t,e),this.updateSize(!1),this.emitBaseBubblingEvent(\"stateChanged\"),e}calculateConfigContent(){const t=this.contentItems,e=t.length,i=new Array(e);for(let n=0;n0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e)),this.updateContentItemsSize(!1))}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}createSideAreas(){const t=Yt.Area.oppositeSides,e=new Array(Object.keys(t).length);let i=0;for(const n in t){const o=n,s=this.getElementArea();if(null===s)throw new K(\"RCSA77553\");s.side=o,\"2\"===t[o][1]?s[o]=s[t[o]]-50:s[o]=s[t[o]]+50,s.surface=(s.x2-s.x1)*(s.y2-s.y1),e[i++]=s}return e}highlightDropZone(t,e,i){this.layoutManager.tabDropPlaceholder.remove(),super.highlightDropZone(t,e,i)}onDrop(t,e){if(t.isComponent){const e=ut.createDefault(),i=t;e.header=mt.Header.createCopy(i.headerConfig);const n=this.layoutManager.createAndInitContentItem(e,this);n.addChild(t),t=n}if(0===this.contentItems.length)this.addChild(t);else{if(t.type===at.row||t.type===at.column){const e=ut.createDefault(),i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}const i=\"x\"==e.side[0]?at.row:at.column,n=\"2\"==e.side[1],o=this.contentItems[0];if(o instanceof Xt&&o.type===i){const e=o.contentItems[n?0:o.contentItems.length-1];o.addChild(t,n?0:void 0,!0),e.size*=.5,t.size=e.size,t.sizeUnit=ht.Percent,o.updateSize(!1)}else{const e=ct.createDefault(i),s=this.layoutManager.createContentItem(e,this);this.replaceChild(o,s),s.addChild(t,n?0:void 0,!0),s.addChild(o,n?void 0:0,!0),o.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}}dock(){throw new X(\"GID87731\")}validateDocking(){throw new X(\"GIVD87732\")}getAllContentItems(){const t=[this];return this.deepGetAllContentItems(this.contentItems,t),t}getConfigMaximisedItems(){const t=[];return this.deepFilterContentItems(this.contentItems,t,(t=>!(!Gt.isStack(t)||!t.initialWantMaximise)||!(!Gt.isComponentItem(t)||!t.initialWantMaximise))),t}getItemsByPopInParentId(t){const e=[];return this.deepFilterContentItems(this.contentItems,e,(e=>e.popInParentIds.includes(t))),e}toConfig(){throw new Error(\"Cannot generate GroundItem config\")}setActiveComponentItem(t,e,i){}updateNodeSize(){const{width:t,height:e}=kt(this._containerElement);Tt(this.element,t),At(this.element,e),this.contentItems.length>0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e))}deepGetAllContentItems(t,e){for(let i=0;ithis.onClick(t),this._touchStartEventListener=t=>this.onTouchStart(t),this._element=document.createElement(\"div\"),this._element.classList.add(i),this._element.title=e,this._header.on(\"destroy\",(()=>this.destroy())),this._element.addEventListener(\"click\",this._clickEventListener,{passive:!0}),this._element.addEventListener(\"touchstart\",this._touchStartEventListener,{passive:!0}),this._header.controlsContainerElement.appendChild(this._element)}get element(){return this._element}destroy(){var t;this._element.removeEventListener(\"click\",this._clickEventListener),this._element.removeEventListener(\"touchstart\",this._touchStartEventListener),null===(t=this._element.parentNode)||void 0===t||t.removeChild(this._element)}onClick(t){this._pushEvent(t)}onTouchStart(t){this._pushEvent(t)}}class Jt{constructor(t,e,i,n,o){var s;this._layoutManager=t,this._componentItem=e,this._closeEvent=i,this._focusEvent=n,this._dragStartEvent=o,this._isActive=!1,this._tabClickListener=t=>this.onTabClickDown(t),this._tabTouchStartListener=t=>this.onTabTouchStart(t),this._closeClickListener=()=>this.onCloseClick(),this._closeTouchStartListener=()=>this.onCloseTouchStart(),this._dragStartListener=(t,e)=>this.onDragStart(t,e),this._contentItemDestroyListener=()=>this.onContentItemDestroy(),this._tabTitleChangedListener=t=>this.setTitle(t),this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_tab\"),this._titleElement=document.createElement(\"span\"),this._titleElement.classList.add(\"lm_title\"),this._closeElement=document.createElement(\"div\"),this._closeElement.classList.add(\"lm_close_tab\"),this._element.appendChild(this._titleElement),this._element.appendChild(this._closeElement),e.isClosable?this._closeElement.style.display=\"\":this._closeElement.style.display=\"none\",this.setTitle(e.title),this._componentItem.on(\"titleChanged\",this._tabTitleChangedListener);(null!==(s=e.reorderEnabled)&&void 0!==s?s:this._layoutManager.layoutConfig.settings.reorderEnabled)&&this.enableReorder(),this._element.addEventListener(\"click\",this._tabClickListener,{passive:!0}),this._element.addEventListener(\"touchstart\",this._tabTouchStartListener,{passive:!0}),this._componentItem.isClosable?(this._closeElement.addEventListener(\"click\",this._closeClickListener,{passive:!0}),this._closeElement.addEventListener(\"touchstart\",this._closeTouchStartListener,{passive:!0})):(this._closeElement.remove(),this._closeElement=void 0),this._componentItem.setTab(this),this._layoutManager.emit(\"tabCreated\",this)}get isActive(){return this._isActive}get componentItem(){return this._componentItem}get contentItem(){return this._componentItem}get element(){return this._element}get titleElement(){return this._titleElement}get closeElement(){return this._closeElement}get reorderEnabled(){return void 0!==this._dragListener}set reorderEnabled(t){t!==this.reorderEnabled&&(t?this.enableReorder():this.disableReorder())}setTitle(t){this._titleElement.innerText=t,this._element.title=t}setActive(t){t!==this._isActive&&(this._isActive=t,t?this._element.classList.add(\"lm_active\"):this._element.classList.remove(\"lm_active\"))}destroy(){var t,e;this._closeEvent=void 0,this._focusEvent=void 0,this._dragStartEvent=void 0,this._element.removeEventListener(\"click\",this._tabClickListener),this._element.removeEventListener(\"touchstart\",this._tabTouchStartListener),null===(t=this._closeElement)||void 0===t||t.removeEventListener(\"click\",this._closeClickListener),null===(e=this._closeElement)||void 0===e||e.removeEventListener(\"touchstart\",this._closeTouchStartListener),this._componentItem.off(\"titleChanged\",this._tabTitleChangedListener),this.reorderEnabled&&this.disableReorder(),this._element.remove()}setBlurred(){this._element.classList.remove(\"lm_focused\"),this._titleElement.classList.remove(\"lm_focused\")}setFocused(){this._element.classList.add(\"lm_focused\"),this._titleElement.classList.add(\"lm_focused\")}onDragStart(t,e){if(void 0===this._dragListener)throw new J(\"TODSDLU10093\");if(void 0===this._dragStartEvent)throw new J(\"TODS23309\");this._dragStartEvent(t,e,this._dragListener,this.componentItem)}onContentItemDestroy(){void 0!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=void 0)}onTabClickDown(t){const e=t.target;e!==this._element&&e!==this._titleElement||(0===t.button?this.notifyFocus():1===t.button&&this._componentItem.isClosable&&this.notifyClose())}onTabTouchStart(t){t.target===this._element&&this.notifyFocus()}onCloseClick(){this.notifyClose()}onCloseTouchStart(){this.notifyClose()}notifyClose(){if(void 0===this._closeEvent)throw new J(\"TNC15007\");this._closeEvent(this._componentItem)}notifyFocus(){if(void 0===this._focusEvent)throw new J(\"TNA15007\");this._focusEvent(this._componentItem)}enableReorder(){this._dragListener=new Zt(this._element,[this._titleElement]),this._dragListener.on(\"dragStart\",this._dragStartListener),this._componentItem.on(\"destroy\",this._contentItemDestroyListener)}disableReorder(){if(void 0===this._dragListener)throw new J(\"TDR87745\");this._componentItem.off(\"destroy\",this._contentItemDestroyListener),this._dragListener.off(\"dragStart\",this._dragStartListener),this._dragListener=void 0}}class Qt{constructor(t,e,i,n,o){this._layoutManager=t,this._componentRemoveEvent=e,this._componentFocusEvent=i,this._componentDragStartEvent=n,this._dropdownActiveChangedEvent=o,this._tabs=[],this._lastVisibleTabIndex=-1,this._dropdownActive=!1,this._element=document.createElement(\"section\"),this._element.classList.add(\"lm_tabs\"),this._dropdownElement=document.createElement(\"section\"),this._dropdownElement.classList.add(\"lm_tabdropdown_list\"),this._dropdownElement.style.display=\"none\"}get tabs(){return this._tabs}get tabCount(){return this._tabs.length}get lastVisibleTabIndex(){return this._lastVisibleTabIndex}get element(){return this._element}get dropdownElement(){return this._dropdownElement}get dropdownActive(){return this._dropdownActive}destroy(){for(let t=0;tthis.handleTabCloseEvent(t)),(t=>this.handleTabFocusEvent(t)),((t,e,i,n)=>this.handleTabDragStartEvent(t,e,i,n)));void 0===e&&(e=this._tabs.length),this._tabs.splice(e,0,i),ethis._lastVisibleTabIndex){const t=this._tabs[e];for(let t=e;t>0;t--)this._tabs[t]=this._tabs[t-1];this._tabs[0]=t}}updateTabSizes(t,e){let i=!1;this.tryUpdateTabSizes(i,t,e)||(i=!0,this.tryUpdateTabSizes(i,t,e)),i!==this._dropdownActive&&(this._dropdownActive=i,this._dropdownActiveChangedEvent())}tryUpdateTabSizes(t,e,i){if(this._tabs.length>0){if(void 0===i)throw new Error(\"non-empty tabs must have active component item\");let n=0,o=!1;const s=this._layoutManager.layoutConfig.settings.tabOverlapAllowance,r=this._tabs.indexOf(i.tab),a=this._tabs[r];this._lastVisibleTabIndex=-1;for(let i=0;ie){if(o)i===r&&(l.style.zIndex=\"auto\",l.style.marginLeft=\"\",l.parentElement!==this._element&&this._element.appendChild(l));else{let t;if(t=r>0&&r<=i?(d-e)/(i-1):(d-e)/i,tthis.onClick(t),this._touchStartListener=t=>this.onTouchStart(t),this._rowColumnClosable=!0,this._closeButton=null,this._popoutButton=null,this._tabsContainer=new Qt(this._layoutManager,(t=>this.handleTabInitiatedComponentRemoveEvent(t)),(t=>this.handleTabInitiatedComponentFocusEvent(t)),((t,e,i,n)=>this.handleTabInitiatedDragStartEvent(t,e,i,n)),(()=>this.processTabDropdownActiveChanged())),this._show=i.show,this._popoutEnabled=i.popoutEnabled,this._popoutLabel=i.popoutLabel,this._maximiseEnabled=i.maximiseEnabled,this._maximiseLabel=i.maximiseLabel,this._minimiseEnabled=i.minimiseEnabled,this._minimiseLabel=i.minimiseLabel,this._closeEnabled=i.closeEnabled,this._closeLabel=i.closeLabel,this._tabDropdownEnabled=i.tabDropdownEnabled,this._tabDropdownLabel=i.tabDropdownLabel,this.setSide(i.side),this._canRemoveComponent=this._configClosable,this._element=document.createElement(\"section\"),this._element.classList.add(\"lm_header\"),this._controlsContainerElement=document.createElement(\"section\"),this._controlsContainerElement.classList.add(\"lm_controls\"),this._element.appendChild(this._tabsContainer.element),this._element.appendChild(this._controlsContainerElement),this._element.appendChild(this._tabsContainer.dropdownElement),this._element.addEventListener(\"click\",this._clickListener,{passive:!0}),this._element.addEventListener(\"touchstart\",this._touchStartListener,{passive:!0}),this._documentMouseUpListener=()=>this._tabsContainer.hideAdditionalTabsDropdown(),globalThis.document.addEventListener(\"mouseup\",this._documentMouseUpListener,{passive:!0}),this._tabControlOffset=this._layoutManager.layoutConfig.settings.tabControlOffset,this._tabDropdownEnabled&&(this._tabDropdownButton=new Kt(this,this._tabDropdownLabel,\"lm_tabdropdown\",(()=>this._tabsContainer.showAdditionalTabsDropdown()))),this._popoutEnabled&&(this._popoutButton=new Kt(this,this._popoutLabel,\"lm_popout\",(()=>this.handleButtonPopoutEvent()))),this._maximiseEnabled&&(this._maximiseButton=new Kt(this,this._maximiseLabel,\"lm_maximise\",(t=>this.handleButtonMaximiseToggleEvent(t)))),this._configClosable&&(this._closeButton=new Kt(this,this._closeLabel,\"lm_close\",(()=>s()))),this.processTabDropdownActiveChanged()}get show(){return this._show}get side(){return this._side}get leftRightSided(){return this._leftRightSided}get layoutManager(){return this._layoutManager}get parent(){return this._parent}get tabs(){return this._tabsContainer.tabs}get lastVisibleTabIndex(){return this._tabsContainer.lastVisibleTabIndex}get element(){return this._element}get tabsContainerElement(){return this._tabsContainer.element}get controlsContainerElement(){return this._controlsContainerElement}destroy(){this.emit(\"destroy\"),this._popoutEvent=void 0,this._maximiseToggleEvent=void 0,this._clickEvent=void 0,this._touchStartEvent=void 0,this._componentRemoveEvent=void 0,this._componentFocusEvent=void 0,this._componentDragStartEvent=void 0,this._tabsContainer.destroy(),globalThis.document.removeEventListener(\"mouseup\",this._documentMouseUpListener),this._element.remove()}createTab(t,e){this._tabsContainer.createTab(t,e)}removeTab(t){this._tabsContainer.removeTab(t)}processActiveComponentChanged(t){this._tabsContainer.processActiveComponentChanged(t),this.updateTabSizes()}setSide(t){this._side=t,this._leftRightSided=[nt.right,nt.left].includes(this._side)}setRowColumnClosable(t){this._rowColumnClosable=t,this.updateClosability()}updateClosability(){let t;if(this._configClosable)if(this._rowColumnClosable){t=!0;const e=this.tabs.length;for(let i=0;i1}applyFocusedValue(t){t?this._element.classList.add(\"lm_focused\"):this._element.classList.remove(\"lm_focused\")}processMaximised(){if(void 0===this._maximiseButton)throw new J(\"HPMAX16997\");this._maximiseButton.element.setAttribute(\"title\",this._minimiseLabel)}processMinimised(){if(void 0===this._maximiseButton)throw new J(\"HPMIN16997\");this._maximiseButton.element.setAttribute(\"title\",this._maximiseLabel)}updateTabSizes(){if(this._tabsContainer.tabCount>0){const t=this._show?this._layoutManager.layoutConfig.dimensions.headerHeight:0;let e;this._leftRightSided?(this._element.style.height=\"\",this._element.style.width=zt(t)):(this._element.style.width=\"\",this._element.style.height=zt(t)),e=this._leftRightSided?this._element.offsetHeight-this._controlsContainerElement.offsetHeight-this._tabControlOffset:this._element.offsetWidth-this._controlsContainerElement.offsetWidth-this._tabControlOffset,this._tabsContainer.updateTabSizes(e,this._getActiveComponentItemEvent())}}handleTabInitiatedComponentRemoveEvent(t){if(this._canRemoveComponent){if(void 0===this._componentRemoveEvent)throw new J(\"HHTCE22294\");this._componentRemoveEvent(t)}}handleTabInitiatedComponentFocusEvent(t){if(void 0===this._componentFocusEvent)throw new J(\"HHTAE22294\");this._componentFocusEvent(t)}handleTabInitiatedDragStartEvent(t,e,i,n){if(this._canRemoveComponent){if(void 0===this._componentDragStartEvent)throw new J(\"HHTDSE22294\");this._componentDragStartEvent(t,e,i,n)}else i.cancelDrag()}processTabDropdownActiveChanged(){void 0!==this._tabDropdownButton&&Dt(this._tabDropdownButton.element,this._tabsContainer.dropdownActive)}handleButtonPopoutEvent(){if(this._layoutManager.layoutConfig.settings.popoutWholeStack){if(void 0===this._popoutEvent)throw new J(\"HHBPOE17834\");this._popoutEvent()}else{const t=this._getActiveComponentItemEvent();t&&t.popout()}}handleButtonMaximiseToggleEvent(t){if(void 0===this._maximiseToggleEvent)throw new J(\"HHBMTE16834\");this._maximiseToggleEvent()}onClick(t){t.target===this._element&&this.notifyClick(t)}onTouchStart(t){t.target===this._element&&this.notifyTouchStart(t)}notifyClick(t){if(void 0===this._clickEvent)throw new J(\"HNHC46834\");this._clickEvent(t)}notifyTouchStart(t){if(void 0===this._touchStartEvent)throw new J(\"HNHTS46834\");this._touchStartEvent(t)}}class ee extends $t{constructor(t,e,i){var n,o,s,r,a,l,h,d,c,m,u,p,g,f,v,_,y,C,w;super(t,e,i,ee.createElement(document)),this._headerSideChanged=!1,this._resizeListener=()=>this.handleResize(),this._maximisedListener=()=>this.handleMaximised(),this._minimisedListener=()=>this.handleMinimised(),this._headerConfig=e.header;const I=t.layoutConfig.header,b=e.content;let S;if(1!==b.length)S=void 0;else{S=b[0].header}this._initialWantMaximise=e.maximised,this._initialActiveItemIndex=null!==(n=e.activeItemIndex)&&void 0!==n?n:0;const E=null!==(r=null!==(s=null===(o=this._headerConfig)||void 0===o?void 0:o.show)&&void 0!==s?s:null==S?void 0:S.show)&&void 0!==r?r:I.show,x=null!==(h=null!==(l=null===(a=this._headerConfig)||void 0===a?void 0:a.popout)&&void 0!==l?l:null==S?void 0:S.popout)&&void 0!==h?h:I.popout,L=null!==(m=null!==(c=null===(d=this._headerConfig)||void 0===d?void 0:d.maximise)&&void 0!==c?c:null==S?void 0:S.maximise)&&void 0!==m?m:I.maximise,z=null!==(g=null!==(p=null===(u=this._headerConfig)||void 0===u?void 0:u.close)&&void 0!==p?p:null==S?void 0:S.close)&&void 0!==g?g:I.close,M=null!==(_=null!==(v=null===(f=this._headerConfig)||void 0===f?void 0:f.minimise)&&void 0!==v?v:null==S?void 0:S.minimise)&&void 0!==_?_:I.minimise,P=null!==(w=null!==(C=null===(y=this._headerConfig)||void 0===y?void 0:y.tabDropdown)&&void 0!==C?C:null==S?void 0:S.tabDropdown)&&void 0!==w?w:I.tabDropdown;this._maximisedEnabled=!1!==L;const T={show:!1!==E,side:!1===E?nt.top:E,popoutEnabled:!1!==x,popoutLabel:!1===x?\"\":x,maximiseEnabled:this._maximisedEnabled,maximiseLabel:!1===L?\"\":L,closeEnabled:!1!==z,closeLabel:!1===z?\"\":z,minimiseEnabled:!0,minimiseLabel:M,tabDropdownEnabled:!1!==P,tabDropdownLabel:!1===P?\"\":P};this._header=new te(t,this,T,e.isClosable&&!1!==z,(()=>this.getActiveComponentItem()),(()=>this.remove()),(()=>this.handlePopoutEvent()),(()=>this.toggleMaximise()),(t=>this.handleHeaderClickEvent(t)),(t=>this.handleHeaderTouchStartEvent(t)),(t=>this.handleHeaderComponentRemoveEvent(t)),(t=>this.handleHeaderComponentFocusEvent(t)),((t,e,i,n)=>this.handleHeaderComponentStartDragEvent(t,e,i,n))),this.isStack=!0,this._childElementContainer=document.createElement(\"section\"),this._childElementContainer.classList.add(\"lm_items\"),this.on(\"resize\",this._resizeListener),this._maximisedEnabled&&(this.on(\"maximised\",this._maximisedListener),this.on(\"minimised\",this._minimisedListener)),this.element.appendChild(this._header.element),this.element.appendChild(this._childElementContainer),this.setupHeaderPosition(),this._header.updateClosability()}get childElementContainer(){return this._childElementContainer}get header(){return this._header}get headerShow(){return this._header.show}get headerSide(){return this._header.side}get headerLeftRightSided(){return this._header.leftRightSided}get contentAreaDimensions(){return this._contentAreaDimensions}get initialWantMaximise(){return this._initialWantMaximise}get isMaximised(){return this===this.layoutManager.maximisedStack}get stackParent(){if(!this.parent)throw new Error(\"Stack should always have a parent\");return this.parent}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}init(){if(!0===this.isInitialised)return;this.updateNodeSize();for(let t=0;t0){if(this._initialActiveItemIndex<0||this._initialActiveItemIndex>=e)throw new Error(`ActiveItemIndex out of range: ${this._initialActiveItemIndex} id: ${this.id}`);for(let i=0;ithis.contentItems.length)throw e-=1,new X(\"SAC99728\");if(t instanceof jt)return e=super.addChild(t,e),this._childElementContainer.appendChild(t.element),this._header.createTab(t,e),this.setActiveComponentItem(t,i),this._header.updateTabSizes(),this.updateSize(!1),t.container.setBaseLogicalZIndex(),this._header.updateClosability(),this.emitStateChangedEvent(),e;throw new X(\"SACC88532\")}removeChild(t,e){const i=t,n=this.contentItems.indexOf(i),o=1===this.contentItems.length;if(this._activeComponentItem===i&&(i.focused&&i.blur(),!o)){const t=0===n?1:n-1;this.setActiveComponentItem(this.contentItems[t],!1)}this._header.removeTab(i),super.removeChild(i,e),o||this._header.updateClosability(),this.emitStateChangedEvent()}toggleMaximise(){this.isMaximised?this.minimise():this.maximise()}maximise(){if(!this.isMaximised){this.layoutManager.setMaximisedStack(this);const t=this.contentItems,e=t.length;for(let i=0;i0&&void 0===t)throw new Error(\"expected non-empty stack to have an active component item\");return{type:\"stack\",content:this.calculateConfigContent(),size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,isClosable:this.isClosable,maximised:this.isMaximised,header:this.createHeaderConfig(),activeItemIndex:t}}onDrop(t,e){if(\"header\"===this._dropSegment){if(this.resetHeaderDropZone(),void 0===this._dropIndex)throw new J(\"SODDI68990\");return void this.addChild(t,this._dropIndex)}if(\"body\"===this._dropSegment)return void this.addChild(t,0,!0);const i=\"top\"===this._dropSegment||\"bottom\"===this._dropSegment,n=\"left\"===this._dropSegment||\"right\"===this._dropSegment,o=\"top\"===this._dropSegment||\"left\"===this._dropSegment,s=i&&this.stackParent.isColumn||n&&this.stackParent.isRow;if(t.isComponent){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createAndInitContentItem(e,this);i.addChild(t),t=i}if(t.type===at.row||t.type===at.column){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}if(s){const e=this.stackParent.contentItems.indexOf(this);this.stackParent.addChild(t,o?e:e+1,!0),this.size*=.5,t.size=this.size,t.sizeUnit=this.sizeUnit,this.stackParent.updateSize(!1)}else{const e=i?at.column:at.row,n=ct.createDefault(e),s=this.layoutManager.createContentItem(n,this);this.stackParent.replaceChild(this,s),s.addChild(t,o?0:void 0,!0),s.addChild(this,o?void 0:0,!0),this.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}highlightDropZone(t,e){for(const i in this._contentAreaDimensions){const n=i,o=this._contentAreaDimensions[n].hoverArea;if(o.x1t&&o.y1e)return void(\"header\"===n?(this._dropSegment=\"header\",this.highlightHeaderDropZone(this._header.leftRightSided?e:t)):(this.resetHeaderDropZone(),this.highlightBodyDropZone(n)))}}getArea(){if(\"none\"===this.element.style.display)return null;const t=super.getElementArea(this._header.element),e=super.getElementArea(this._childElementContainer);if(null===t||null===e)throw new K(\"SGAHC13086\");const i=e.x2-e.x1,n=e.y2-e.y1;return this._contentAreaDimensions={header:{hoverArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2},highlightArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2}}},0===this.contentItems.length?(this._contentAreaDimensions.body={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2}},super.getElementArea(this.element)):(this._contentAreaDimensions.left={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x1+.25*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x1+.5*i,y2:e.y2}},this._contentAreaDimensions.top={hoverArea:{x1:e.x1+.25*i,y1:e.y1,x2:e.x1+.75*i,y2:e.y1+.5*n},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y1+.5*n}},this._contentAreaDimensions.right={hoverArea:{x1:e.x1+.75*i,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1+.5*i,y1:e.y1,x2:e.x2,y2:e.y2}},this._contentAreaDimensions.bottom={hoverArea:{x1:e.x1+.25*i,y1:e.y1+.5*n,x2:e.x1+.75*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1+.5*n,x2:e.x2,y2:e.y2}},super.getElementArea(this.element))}positionHeader(t){this._header.side!==t&&(this._header.setSide(t),this._headerSideChanged=!0,this.setupHeaderPosition())}updateNodeSize(){if(\"none\"!==this.element.style.display){const t=kt(this.element);if(this._header.show){t[this._header.leftRightSided?it.width:it.height]-=this.layoutManager.layoutConfig.dimensions.headerHeight}this._childElementContainer.style.width=zt(t.width),this._childElementContainer.style.height=zt(t.height);for(let e=0;e=o&&tthis.onDrag(t,e,i))),this._dragListener.on(\"dragStop\",(()=>this.onDrop())),this.createDragProxyElements(t,e),null===this._componentItem.parent)throw new K(\"DPC10097\");this._componentItemFocused=this._componentItem.focused,this._componentItemFocused&&this._componentItem.blur(),this._componentItem.parent.removeChild(this._componentItem,!0),this.setDimensions(),document.body.appendChild(this._element),this.determineMinMaxXY(),this._layoutManager.calculateItemAreas(),this.setDropPosition(t,e)}get element(){return this._element}createDragProxyElements(t,e){this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_dragProxy\");const i=document.createElement(\"div\");i.classList.add(\"lm_header\");const n=document.createElement(\"div\");n.classList.add(\"lm_tabs\");const o=document.createElement(\"div\");o.classList.add(\"lm_tab\");const s=document.createElement(\"span\");s.classList.add(\"lm_title\"),o.appendChild(s),n.appendChild(o),i.appendChild(n),this._proxyContainerElement=document.createElement(\"div\"),this._proxyContainerElement.classList.add(\"lm_content\"),this._element.appendChild(i),this._element.appendChild(this._proxyContainerElement),this._originalParent instanceof ee&&this._originalParent.headerShow&&(this._sided=this._originalParent.headerLeftRightSided,this._element.classList.add(\"lm_\"+this._originalParent.headerSide),[nt.right,nt.bottom].indexOf(this._originalParent.headerSide)>=0&&this._proxyContainerElement.insertAdjacentElement(\"afterend\",i)),this._element.style.left=zt(t),this._element.style.top=zt(e),o.setAttribute(\"title\",this._componentItem.title),s.insertAdjacentText(\"afterbegin\",this._componentItem.title),this._proxyContainerElement.appendChild(this._componentItem.element)}determineMinMaxXY(){const t=this._layoutManager.groundItem;if(void 0===t)throw new J(\"DPDMMXY73109\");{const e=t.element.getBoundingClientRect();this._minX=e.left+document.body.scrollLeft,this._minY=e.top+document.body.scrollTop,this._maxX=this._minX+e.width,this._maxY=this._minY+e.height}}onDrag(t,e,i){const n=i.pageX,o=i.pageY;this.setDropPosition(n,o),this._componentItem.drag()}setDropPosition(t,e){this._layoutManager.layoutConfig.settings.constrainDragToContainer&&(t<=this._minX?t=Math.ceil(this._minX):t>=this._maxX&&(t=Math.floor(this._maxX)),e<=this._minY?e=Math.ceil(this._minY):e>=this._maxY&&(e=Math.floor(this._maxY))),this._element.style.left=zt(t),this._element.style.top=zt(e),this._area=this._layoutManager.getArea(t,e),null!==this._area&&(this._lastValidArea=this._area,this._area.contentItem.highlightDropZone(t,e,this._area))}onDrop(){const t=this._layoutManager.dropTargetIndicator;if(null===t)throw new K(\"DPOD30011\");let e;if(t.hide(),this._componentItem.exitDragMode(),null!==this._area)e=this._componentItem,this._area.contentItem.onDrop(e,this._area);else if(null!==this._lastValidArea){e=this._componentItem;this._lastValidArea.contentItem.onDrop(e,this._lastValidArea)}else this._originalParent?(e=this._componentItem,this._originalParent.addChild(e)):this._componentItem.destroy();this._element.remove(),this._layoutManager.emit(\"itemDropped\",this._componentItem),this._componentItemFocused&&void 0!==e&&e.focus()}setDimensions(){const t=this._layoutManager.layoutConfig.dimensions;if(void 0===t)throw new Error(\"DragProxy.setDimensions: dimensions undefined\");let e=t.dragProxyWidth,i=t.dragProxyHeight;if(void 0===e||void 0===i)throw new Error(\"DragProxy.setDimensions: width and/or height undefined\");const n=!1===this._layoutManager.layoutConfig.header.show?0:t.headerHeight;this._element.style.width=zt(e),this._element.style.height=zt(i),e-=this._sided?n:0,i-=this._sided?0:n,this._proxyContainerElement.style.width=zt(e),this._proxyContainerElement.style.height=zt(i),this._componentItem.enterDragMode(e,i),this._componentItem.show()}}class ne{constructor(t,e,i,n,o,s,r){this._layoutManager=t,this._element=e,this._extraAllowableChildTargets=i,this._componentTypeOrFtn=n,this._componentState=o,this._title=s,this._id=r,this._dragListener=null,this._dummyGroundContainer=document.createElement(\"div\");const a=gt.createDefault(\"row\");this._dummyGroundContentItem=new Yt(this._layoutManager,a,this._dummyGroundContainer),this.createDragListener()}destroy(){this.removeDragListener()}createDragListener(){this.removeDragListener(),this._dragListener=new Zt(this._element,this._extraAllowableChildTargets),this._dragListener.on(\"dragStart\",((t,e)=>this.onDragStart(t,e))),this._dragListener.on(\"dragStop\",(()=>this.onDragStop()))}onDragStart(t,e){var i;const n=\"component\";let o;if(\"function\"==typeof this._componentTypeOrFtn){const t=this._componentTypeOrFtn();o=ne.isDragSourceComponentItemConfig(t)?{type:n,componentState:t.state,componentType:t.type,title:null!==(i=t.title)&&void 0!==i?i:this._title}:t}else o={type:n,componentState:this._componentState,componentType:this._componentTypeOrFtn,title:this._title,id:this._id};const s=bt.resolve(o,!1),r=new jt(this._layoutManager,s,this._dummyGroundContentItem);if(this._dummyGroundContentItem.contentItems.push(r),null===this._dragListener)throw new K(\"DSODSD66746\");{const i=new ie(t,e,this._dragListener,this._layoutManager,r,this._dummyGroundContentItem),n=this._layoutManager.transitionIndicator;if(null===n)throw new K(\"DSODST66746\");n.transitionElements(this._element,i.element)}}onDragStop(){this.createDragListener()}removeDragListener(){null!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=null)}}!function(t){t.isDragSourceComponentItemConfig=function(t){return!(\"componentType\"in t)}}(ne||(ne={}));class oe{constructor(){this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_dropTargetIndicator\");const t=document.createElement(\"div\");t.classList.add(\"lm_inner\"),this._element.appendChild(t),document.body.appendChild(this._element)}destroy(){this._element.remove()}highlightArea(t,e){this._element.style.left=zt(t.x1+e),this._element.style.top=zt(t.y1+e),this._element.style.width=zt(t.x2-t.x1-e),this._element.style.height=zt(t.y2-t.y1-e),this._element.style.display=\"block\"}hide(){Dt(this._element,!1)}}class se{constructor(){this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_transition_indicator\"),document.body.appendChild(this._element),this._toElement=null,this._fromDimensions=null,this._totalAnimationDuration=200,this._animationStartTime=null}destroy(){this._element.remove()}transitionElements(t,e){}nextAnimationFrame(){}measure(t){const e=t.getBoundingClientRect();return{left:e.left,top:e.top,width:t.offsetWidth,height:t.offsetHeight}}}class re extends Wt{constructor(t){super(),this._layoutManager=t,this._childEventListener=t=>this.onEventFromChild(t),globalThis.addEventListener(re.ChildEventName,this._childEventListener,{passive:!0})}emit(t,...e){\"userBroadcast\"===t?this.emitUserBroadcast(...e):super.emit(t,...e)}emitUserBroadcast(...t){this.handleUserBroadcastEvent(\"userBroadcast\",t)}destroy(){globalThis.removeEventListener(re.ChildEventName,this._childEventListener)}handleUserBroadcastEvent(t,e){this._layoutManager.isSubWindow?this.propagateToParent(t,e):this.propagateToThisAndSubtree(t,e)}onEventFromChild(t){const e=t.detail;this.handleUserBroadcastEvent(e.eventName,e.args)}propagateToParent(t,e){const i={bubbles:!0,cancelable:!0,detail:{layoutManager:this._layoutManager,eventName:t,args:e}},n=new CustomEvent(re.ChildEventName,i),o=globalThis.opener;if(null===o)throw new K(\"EHPTP15778\");o.dispatchEvent(n)}propagateToThisAndSubtree(t,e){this.emitUnknown(t,...e);for(let i=0;ithis.handleContainerResize())),this._windowBeforeUnloadListener=()=>this.onBeforeUnload(),this._windowBeforeUnloadListening=!1,this._maximisedStackBeforeDestroyedListener=t=>this.cleanupBeforeMaximisedStackDestroyed(t),this.isSubWindow=t.isSubWindow,this._constructorOrSubWindowLayoutConfig=t.constructorOrSubWindowLayoutConfig,Q.checkInitialise(),dt.checkInitialise(),void 0!==t.containerElement&&(this._containerElement=t.containerElement)}get container(){return this._containerElement}get isInitialised(){return this._isInitialised}get groundItem(){return this._groundItem}get root(){return this._groundItem}get openPopouts(){return this._openPopouts}get dropTargetIndicator(){return this._dropTargetIndicator}get transitionIndicator(){return this._transitionIndicator}get width(){return this._width}get height(){return this._height}get eventHub(){return this._eventHub}get rootItem(){if(void 0===this._groundItem)throw new Error(\"Cannot access rootItem before init\");return 0===this._groundItem.contentItems.length?void 0:this._groundItem.contentItems[0]}get focusedComponentItem(){return this._focusedComponentItem}get tabDropPlaceholder(){return this._tabDropPlaceholder}get maximisedStack(){return this._maximisedStack}get deprecatedConstructor(){return!this.isSubWindow&&void 0!==this._constructorOrSubWindowLayoutConfig}destroy(){if(this._isInitialised){this._windowBeforeUnloadListening&&(globalThis.removeEventListener(\"beforeunload\",this._windowBeforeUnloadListener),this._windowBeforeUnloadListening=!1),!0===this.layoutConfig.settings.closePopoutsOnUnload&&this.closeAllOpenPopouts(),this._resizeObserver.disconnect(),this.checkClearResizeTimeout(),void 0!==this._groundItem&&this._groundItem.destroy(),this._tabDropPlaceholder.remove(),null!==this._dropTargetIndicator&&this._dropTargetIndicator.destroy(),null!==this._transitionIndicator&&this._transitionIndicator.destroy(),this._eventHub.destroy();for(const t of this._dragSources)t.destroy();this._dragSources=[],this._isInitialised=!1}}minifyConfig(t){return _t.minifyConfig(t)}unminifyConfig(t){return _t.unminifyConfig(t)}init(){let t;if(this.setContainer(),this._dropTargetIndicator=new oe,this._transitionIndicator=new se,this.updateSizeFromContainer(),this.isSubWindow){if(void 0===this._constructorOrSubWindowLayoutConfig)throw new J(\"LMIU07155\");{const e=this._constructorOrSubWindowLayoutConfig.root;if(void 0===e)throw new X(\"LMIC07156\");if(!Ct.isComponent(e))throw new X(\"LMIC07157\");t=e;const i=xt.resolve(this._constructorOrSubWindowLayoutConfig);this.layoutConfig=Object.assign(Object.assign({},i),{root:void 0})}}else void 0===this._constructorOrSubWindowLayoutConfig?this.layoutConfig=_t.createDefault():this.layoutConfig=xt.resolve(this._constructorOrSubWindowLayoutConfig);const e=this.layoutConfig;this._groundItem=new Yt(this,e.root,this._containerElement),this._groundItem.init(),this.checkLoadedLayoutMaximiseItem(),this._resizeObserver.observe(this._containerElement),this._isInitialised=!0,this.adjustColumnsResponsive(),this.emit(\"initialised\"),void 0!==t&&this.loadComponentAsRoot(t)}loadLayout(t){if(!this.isInitialised)throw new Error(\"GoldenLayout: Need to call init() if LayoutConfig with defined root passed to constructor\");if(void 0===this._groundItem)throw new J(\"LMLL11119\");this.createSubWindows(),this.layoutConfig=xt.resolve(t),this._groundItem.loadRoot(this.layoutConfig.root),this.checkLoadedLayoutMaximiseItem(),this.adjustColumnsResponsive()}saveLayout(){if(!1===this._isInitialised)throw new Error(\"Can't create config, layout not yet initialised\");if(void 0===this._groundItem)throw new J(\"LMTC18244\");{const t=this._groundItem.calculateConfigContent();let e;e=1!==t.length?void 0:t[0],this.reconcilePopoutWindows();const i=[];for(let t=0;t=0?n=this._groundItem.contentItems[0]:e=0;break;case at.row:case at.column:e=n.addItem(t,i.index);break;case at.stack:if(Ct.isComponent(t)){e=n.addItem(t,i.index);break}throw Error(tt[6]);case at.component:throw new X(\"LMAIALC87444602\");default:throw new Y(\"LMAIALU98881733\",n.type)}if(Ct.isComponent(t)){const t=n.contentItems[e];Gt.isStack(t)&&(n=t,e=0)}return i.parentItem=n,i.index=e,i}}}loadComponentAsRoot(t){if(void 0===this._groundItem)throw new Error(\"Cannot add item before init\");this._groundItem.loadComponentAsRoot(t)}updateSize(t,e){this.setSize(t,e)}setSize(t,e){if(this._width=t,this._height=e,!0===this._isInitialised){if(void 0===this._groundItem)throw new J(\"LMUS18881\");if(this._groundItem.setSize(this._width,this._height),this._maximisedStack){const{width:t,height:e}=kt(this._containerElement);Tt(this._maximisedStack.element,t),At(this._maximisedStack.element,e),this._maximisedStack.updateSize(!1)}this.adjustColumnsResponsive()}}beginSizeInvalidation(){this._sizeInvalidationBeginCount++}endSizeInvalidation(){0==--this._sizeInvalidationBeginCount&&this.updateSizeFromContainer()}updateSizeFromContainer(){const{width:t,height:e}=kt(this._containerElement);this.setSize(t,e)}updateRootSize(t=!1){if(void 0===this._groundItem)throw new J(\"LMURS28881\");this._groundItem.updateSize(t)}createAndInitContentItem(t,e){const i=this.createContentItem(t,e);return i.init(),i}createContentItem(t,e){if(\"string\"!=typeof t.type)throw new G(\"Missing parameter 'type'\",JSON.stringify(t));if(ct.isComponentItem(t)&&!(e instanceof ee)&&e&&!(!0===this.isSubWindow&&e instanceof Yt)){t={type:at.stack,content:[t],size:t.size,sizeUnit:t.sizeUnit,minSize:t.minSize,minSizeUnit:t.minSizeUnit,id:t.id,maximised:t.maximised,isClosable:t.isClosable,activeItemIndex:0,header:void 0}}return this.createContentItemFromConfig(t,e)}findFirstComponentItemById(t){if(void 0===this._groundItem)throw new J(\"LMFFCIBI82446\");return this.findFirstContentItemTypeByIdRecursive(at.component,t,this._groundItem)}createPopout(t,e,i,n){return t instanceof Gt?this.createPopoutFromContentItem(t,e,i,n):this.createPopoutFromItemConfig(t,e,i,n)}createPopoutFromContentItem(t,e,i,n){let o=t.parent,s=t;for(;null!==o&&1===o.contentItems.length&&!o.isGround;)s=o,o=o.parent;if(null===o)throw new K(\"LMCPFCI00834\");{if(void 0===n&&(n=o.contentItems.indexOf(s)),null!==i&&o.addPopInParentId(i),void 0===e){const i=globalThis.screenX||globalThis.screenLeft,n=globalThis.screenY||globalThis.screenTop,o=t.element.offsetLeft,s=t.element.offsetTop,{width:r,height:a}=kt(t.element);e={left:i+o,top:n+s,width:r,height:a}}const r=t.toConfig();if(t.remove(),ft.isRootItemConfig(r))return this.createPopoutFromItemConfig(r,e,i,n);throw new Error(`${tt[0]}`)}}beginVirtualSizedContainerAdding(){0==++this._virtualSizedContainerAddingBeginCount&&(this._virtualSizedContainers.length=0)}addVirtualSizedContainer(t){this._virtualSizedContainers.push(t)}endVirtualSizedContainerAdding(){if(0==--this._virtualSizedContainerAddingBeginCount){const t=this._virtualSizedContainers.length;if(t>0){this.fireBeforeVirtualRectingEvent(t);for(let e=0;ethis.emit(\"windowOpened\",a))),a.on(\"closed\",(()=>this.reconcilePopoutWindows())),this._openPopouts.push(a),this.layoutConfig.settings.closePopoutsOnUnload&&!this._windowBeforeUnloadListening&&(globalThis.addEventListener(\"beforeunload\",this._windowBeforeUnloadListener,{passive:!0}),this._windowBeforeUnloadListening=!0),a}closeAllOpenPopouts(){for(let t=0;tglobalThis.close()),1)}getArea(t,e){let i=null,n=1/0;for(let o=0;o=s.x1&&t=s.y1&&es.surface&&(n=s.surface,i=s)}return i}calculateItemAreas(){const t=this.getAllContentItems(),e=this._groundItem;if(void 0===e)throw new J(\"LMCIAR44365\");if(1!==t.length){e.contentItems[0].isStack?this._itemAreas=[]:this._itemAreas=e.createSideAreas();for(let e=0;e0){let e=t[0];if(Gt.isComponentItem(e)){const t=e.parent;if(null===t)throw new K(\"LMXLLMI69999\");e=t}if(!Gt.isStack(e))throw new X(\"LMCLLMI19993\");e.maximise()}}}processMaximiseStack(t){if(this._maximisedStack=t,t.on(\"beforeItemDestroyed\",this._maximisedStackBeforeDestroyedListener),t.element.classList.add(\"lm_maximised\"),t.element.insertAdjacentElement(\"afterend\",this._maximisePlaceholder),void 0===this._groundItem)throw new J(\"LMMXI19993\");{this._groundItem.element.prepend(t.element);const{width:e,height:i}=kt(this._containerElement);Tt(t.element,e),At(t.element,i),t.updateSize(!0),t.focusActiveContentItem(),this._maximisedStack.emit(\"maximised\"),this.emit(\"stateChanged\")}}processMinimiseMaximisedStack(){if(void 0===this._maximisedStack)throw new X(\"LMMMS74422\");{const t=this._maximisedStack;if(null===t.parent)throw new K(\"LMMI13668\");t.element.classList.remove(\"lm_maximised\"),this._maximisePlaceholder.insertAdjacentElement(\"afterend\",t.element),this._maximisePlaceholder.remove(),this.updateRootSize(!0),this._maximisedStack=void 0,t.off(\"beforeItemDestroyed\",this._maximisedStackBeforeDestroyedListener),t.emit(\"minimised\"),this.emit(\"stateChanged\")}}reconcilePopoutWindows(){const t=[];for(let e=0;e{this._resizeTimeoutId=void 0,this.beginSizeInvalidation(),this.endSizeInvalidation()}),this.resizeDebounceInterval))}checkClearResizeTimeout(){void 0!==this._resizeTimeoutId&&(clearTimeout(this._resizeTimeoutId),this._resizeTimeoutId=void 0)}setContainer(){var t;const e=document.body,i=null!==(t=this._containerElement)&&void 0!==t?t:e;if(i===e){this.resizeWithContainerAutomatically=!0;const t=document.documentElement;t.style.height=\"100%\",t.style.margin=\"0\",t.style.padding=\"0\",t.style.overflow=\"clip\",e.style.height=\"100%\",e.style.margin=\"0\",e.style.padding=\"0\",e.style.overflow=\"clip\"}this._containerElement=i}onBeforeUnload(){this.destroy()}adjustColumnsResponsive(){if(void 0===this._groundItem)throw new J(\"LMACR20883\");if(this._firstLoad=!1,this.useResponsiveLayout()&&!this._updatingColumnsResponsive&&this._groundItem.contentItems.length>0&&this._groundItem.contentItems[0].isRow){if(void 0===this._groundItem||null===this._width)throw new J(\"LMACR77412\");{const t=this._groundItem.contentItems[0].contentItems.length;if(t<=1)return;{const e=this.layoutConfig.dimensions.defaultMinItemWidth;if(t*e<=this._width)return;{this._updatingColumnsResponsive=!0;const i=t-Math.max(Math.floor(this._width/e),1),n=this._groundItem.contentItems[0],o=this.getAllStacks();if(0===o.length)throw new X(\"LMACRS77413\");{const t=o[0];for(let e=0;en?void 0:{parentItem:t,index:o}}}case 1:if(void 0===this._focusedComponentItem)return;{const t=this._focusedComponentItem.parentItem;return this.tryCreateLocationFromParentItem(t,e)}case 2:{const t=this.findFirstContentItemType(at.stack);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 3:{let t=this.findFirstContentItemType(at.row);return void 0!==t?this.tryCreateLocationFromParentItem(t,e):(t=this.findFirstContentItemType(at.column),void 0!==t?this.tryCreateLocationFromParentItem(t,e):void 0)}case 4:{const t=this.findFirstContentItemType(at.row);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 5:{const t=this.findFirstContentItemType(at.column);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 6:if(void 0===this._groundItem)throw new J(\"LMFLRIF18244\");return void 0!==this.rootItem?void 0:void 0===e||0===e?{parentItem:this._groundItem,index:0}:void 0;case 7:if(void 0===this._groundItem)throw new J(\"LMFLF18244\");{const t=this._groundItem.contentItems;if(0===t.length)return void 0===e||0===e?{parentItem:this._groundItem,index:0}:void 0;{const i=t[0];return this.tryCreateLocationFromParentItem(i,e)}}}}tryCreateLocationFromParentItem(t,e){const i=t.contentItems.length;return void 0===e?{parentItem:t,index:i}:e<0||e>i?void 0:{parentItem:t,index:e}}}!function(t){t.createMaximisePlaceElement=function(t){const e=t.createElement(\"div\");return e.classList.add(\"lm_maximise_place\"),e},t.createTabDropPlaceholderElement=function(t){const e=t.createElement(\"div\");return e.classList.add(\"lm_drop_tab_placeholder\"),e},t.defaultLocationSelectors=[{typeId:1,index:void 0},{typeId:2,index:void 0},{typeId:3,index:void 0},{typeId:7,index:void 0}],t.afterFocusedItemIfPossibleLocationSelectors=[{typeId:0,index:1},{typeId:2,index:void 0},{typeId:3,index:void 0},{typeId:7,index:void 0}]}(ae||(ae={}));class le extends ae{constructor(t,e,i,n){if(super(le.createLayoutManagerConstructorParameters(t,e)),this._bindComponentEventHanlderPassedInConstructor=!1,this._creationTimeoutPassed=!1,void 0!==e&&\"function\"==typeof e&&(this.bindComponentEvent=e,this._bindComponentEventHanlderPassedInConstructor=!0,void 0!==i&&(this.unbindComponentEvent=i)),!this._bindComponentEventHanlderPassedInConstructor&&this.isSubWindow){if(void 0===this._constructorOrSubWindowLayoutConfig)throw new J(\"VLC98823\");{const t=xt.resolve(this._constructorOrSubWindowLayoutConfig);this.layoutConfig=Object.assign(Object.assign({},t),{root:void 0})}}!0!==n&&(this.deprecatedConstructor||this.init())}destroy(){this.bindComponentEvent=void 0,this.unbindComponentEvent=void 0,super.destroy()}init(){if(this._bindComponentEventHanlderPassedInConstructor||\"loading\"!==document.readyState&&null!==document.body){if(!this._bindComponentEventHanlderPassedInConstructor&&!0===this.isSubWindow&&!this._creationTimeoutPassed)return setTimeout((()=>this.init()),7),void(this._creationTimeoutPassed=!0);!0===this.isSubWindow&&(this._bindComponentEventHanlderPassedInConstructor||this.clearHtmlAndAdjustStylesForSubWindow(),window.__glInstance=this),super.init()}else document.addEventListener(\"DOMContentLoaded\",(()=>this.init()),{passive:!0})}clearHtmlAndAdjustStylesForSubWindow(){const t=document.head,e=new Array(4);e[0]=document.querySelectorAll(\"body link\"),e[1]=document.querySelectorAll(\"body style\"),e[2]=document.querySelectorAll(\"template\"),e[3]=document.querySelectorAll(\".gl_keep\");for(let i=0;ithis.emit(\"popIn\"))),document.body.appendChild(t),!0}}bindComponent(t,e){if(void 0!==this.bindComponentEvent){return this.bindComponentEvent(t,e)}if(void 0!==this.getComponentEvent)return{virtual:!1,component:this.getComponentEvent(t,e)};{const t=`${tt[2]}: ${JSON.stringify(e)}`;throw new Z(t)}}unbindComponent(t,e,i){if(void 0!==this.unbindComponentEvent)this.unbindComponentEvent(t);else if(!e&&void 0!==this.releaseComponentEvent){if(void 0===i)throw new J(\"VCUCRCU333998\");this.releaseComponentEvent(t,i)}}}!function(t){let e=!1;t.createLayoutManagerConstructorParameters=function(t,i){const n=e?null:new URL(document.location.href).searchParams.get(\"gl-window\");e=!0;const o=null!==n;let s,r;if(null!==n){const e=localStorage.getItem(n);if(null===e)throw new Error(\"Null gl-window Config\");localStorage.removeItem(n);const i=JSON.parse(e),o=_t.unminifyConfig(i);r=xt.fromResolved(o),t instanceof HTMLElement&&(s=t)}else void 0===t?r=void 0:t instanceof HTMLElement?(r=void 0,s=t):r=t,void 0===s&&i instanceof HTMLElement&&(s=i);return{constructorOrSubWindowLayoutConfig:r,isSubWindow:o,containerElement:s}}}(le||(le={}));class he extends le{constructor(t,e,i){super(t,e,i,!0),this._componentTypesMap=new Map,this._registeredComponentMap=new Map,this._virtuableComponentMap=new Map,this._containerVirtualRectingRequiredEventListener=(t,e,i)=>this.handleContainerVirtualRectingRequiredEvent(t,e,i),this._containerVirtualVisibilityChangeRequiredEventListener=(t,e)=>this.handleContainerVirtualVisibilityChangeRequiredEvent(t,e),this._containerVirtualZIndexChangeRequiredEventListener=(t,e,i)=>this.handleContainerVirtualZIndexChangeRequiredEvent(t,e,i),this.deprecatedConstructor||this.init()}registerComponent(t,e,i=!1){if(\"function\"!=typeof e)throw new $(\"registerComponent() componentConstructorOrFactoryFtn parameter is not a function\");if(e.hasOwnProperty(\"prototype\")){const n=e;this.registerComponentConstructor(t,n,i)}else{const n=e;this.registerComponentFactoryFunction(t,n,i)}}registerComponentConstructor(t,e,i=!1){if(\"function\"!=typeof e)throw new Error(tt[1]);if(void 0!==this._componentTypesMap.get(t))throw new Z(`${tt[3]}: ${t}`);this._componentTypesMap.set(t,{constructor:e,factoryFunction:void 0,virtual:i})}registerComponentFactoryFunction(t,e,i=!1){if(\"function\"!=typeof e)throw new Z(\"Please register a constructor function\");if(void 0!==this._componentTypesMap.get(t))throw new Z(`${tt[3]}: ${t}`);this._componentTypesMap.set(t,{constructor:void 0,factoryFunction:e,virtual:i})}registerComponentFunction(t){this.registerGetComponentConstructorCallback(t)}registerGetComponentConstructorCallback(t){if(\"function\"!=typeof t)throw new Error(\"Please register a callback function\");void 0!==this._getComponentConstructorFtn&&console.warn(\"Multiple component functions are being registered. Only the final registered function will be used.\"),this._getComponentConstructorFtn=t}getRegisteredComponentTypeNames(){const t=this._componentTypesMap.keys();return Array.from(t)}getComponentInstantiator(t){let e;const i=pt.resolveComponentTypeName(t);return void 0!==i&&(e=this._componentTypesMap.get(i)),void 0===e&&void 0!==this._getComponentConstructorFtn&&(e={constructor:this._getComponentConstructorFtn(t),factoryFunction:void 0,virtual:!1}),e}bindComponent(t,e){let i;const n=pt.resolveComponentTypeName(e);let o;if(void 0!==n&&(i=this._componentTypesMap.get(n)),void 0===i&&void 0!==this._getComponentConstructorFtn&&(i={constructor:this._getComponentConstructorFtn(e),factoryFunction:void 0,virtual:!1}),void 0!==i){const s=i.virtual;let r,a;r=void 0===e.componentState?void 0:Ut({},e.componentState);const l=i.constructor;if(void 0!==l)a=new l(t,r,s);else{const e=i.factoryFunction;if(void 0===e)throw new X(\"LMBCFFU10008\");a=e(t,r,s)}if(s){if(void 0===a)throw new J(\"GLBCVCU988774\");{const e=a,i=e.rootHtmlElement;if(void 0===i)throw new Z(`${tt[5]}: ${n}`);!function(t){const e=\"absolute\";t.style.position!==e&&(t.style.position=e)}(i),this.container.appendChild(i),this._virtuableComponentMap.set(t,e),t.virtualRectingRequiredEvent=this._containerVirtualRectingRequiredEventListener,t.virtualVisibilityChangeRequiredEvent=this._containerVirtualVisibilityChangeRequiredEventListener,t.virtualZIndexChangeRequiredEvent=this._containerVirtualZIndexChangeRequiredEventListener}}this._registeredComponentMap.set(t,a),o={virtual:i.virtual,component:a}}else o=super.bindComponent(t,e);return o}unbindComponent(t,e,i){if(void 0===this._registeredComponentMap.get(t))super.unbindComponent(t,e,i);else{const e=this._virtuableComponentMap.get(t);if(void 0!==e){const i=e.rootHtmlElement;if(void 0===i)throw new X(\"GLUC77743\",t.title);this.container.removeChild(i),this._virtuableComponentMap.delete(t)}}}fireBeforeVirtualRectingEvent(t){this._goldenLayoutBoundingClientRect=this.container.getBoundingClientRect(),super.fireBeforeVirtualRectingEvent(t)}handleContainerVirtualRectingRequiredEvent(t,e,i){const n=this._virtuableComponentMap.get(t);if(void 0===n)throw new J(\"GLHCSCE55933\");{const o=n.rootHtmlElement;if(void 0===o)throw new Z(tt[4]+\" \"+t.title);{const n=t.element.getBoundingClientRect(),s=n.left-this._goldenLayoutBoundingClientRect.left;o.style.left=zt(s);const r=n.top-this._goldenLayoutBoundingClientRect.top;o.style.top=zt(r),Tt(o,e),At(o,i)}}}handleContainerVirtualVisibilityChangeRequiredEvent(t,e){const i=this._virtuableComponentMap.get(t);if(void 0===i)throw new J(\"GLHCVVCRE55934\");{const n=i.rootHtmlElement;if(void 0===n)throw new Z(tt[4]+\" \"+t.title);Dt(n,e)}}handleContainerVirtualZIndexChangeRequiredEvent(t,e,i){const n=this._virtuableComponentMap.get(t);if(void 0===n)throw new J(\"GLHCVZICRE55935\");{const e=n.rootHtmlElement;if(void 0===e)throw new Z(tt[4]+\" \"+t.title);e.style.zIndex=i}}}const de=\"initial_\",ce={show:\"top\",popout:!1,maximise:!1,close:\"close-tab-unused\"},me={headerHeight:31},ue={hasHeaders:!0,reorderEnabled:!0},pe={popoutWholeStack:!1,constrainDragToContainer:!1,constrainDragToHeaders:!1,preventDragout:!1,showMaximiseIcon:!1,showPopoutIcon:!1,showCloseIcon:!1,blockedPopoutsThrowError:!0,closePopoutsOnUnload:!0,selectionEnabled:!1};var ge,fe;class ve{constructor(e){this.layout=e,ge.set(this,void 0),fe.set(this,void 0),this.handleResize=t=>{t.forEach((t=>this.resizeElement(t.target)))},this.handleMutation=()=>{this.layout.viewComponentsByContainerElement.forEach((t=>{this.resizeElement(t.container.element)}))},t.__classPrivateFieldSet(this,ge,new ResizeObserver(this.handleResize),\"f\"),t.__classPrivateFieldSet(this,fe,new MutationObserver(this.handleMutation),\"f\")}observeMutations(e){t.__classPrivateFieldGet(this,fe,\"f\")?.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[\"class\"]})}destroy(){t.__classPrivateFieldGet(this,ge,\"f\").disconnect(),t.__classPrivateFieldGet(this,fe,\"f\").disconnect()}observeContainer(e){t.__classPrivateFieldGet(this,ge,\"f\").observe(e)}unobserveContainer(e){t.__classPrivateFieldGet(this,ge,\"f\").unobserve(e)}resizeElement(t){const e=this.layout.viewComponentsByContainerElement.get(t);e&&e.resize()}}ge=new WeakMap,fe=new WeakMap;var _e={};Object.defineProperty(_e,\"__esModule\",{value:!0});var ye=_e.BaseItem=void 0;class Ce{constructor(t,e,i){this._item=t,this._layout=e,this._wrap=i}get raw(){return this._item}get layout(){return this._layout}get type(){return this._item.type}get contentItems(){return(this._item.contentItems??[]).map((t=>this._wrap(t)))}get parent(){const t=this._item.parent;return t?this._wrap(t):null}setActiveContentItem(t,e){if(\"stack\"!==this.type)throw new Error(`Cannot call setActiveContentItem from a non-stack item: ${this.type}`);this._item.setActiveContentItem(t.raw,e)}static wrapInternal(t,e,i){const n=Ce.wrapCache.get(e);if(n)return n;const o=new t(e,i,(e=>Ce.wrapInternal(t,e,i)));return Ce.wrapCache.set(e,o),o}}ye=_e.BaseItem=Ce,Ce.wrapCache=new WeakMap;const we=t=>!!t&&\"contentItems\"in t&&(t.isRow||t.isColumn);class Ie extends ye{isRoot(){return!!this._item.parent?.isGround}getBounds(){return this._item.element.getBoundingClientRect()}get viewName(){if(this._item.isComponent){const{component:t}=this._item;return t.identity.name}throw new Error(\"View name not found\")}onDestroyed(t){const e=({target:i})=>{i===this._item&&(t(),this._item.off(\"itemDestroyed\",e))};this._item.on(\"itemDestroyed\",e)}createAdjacentStack({position:t=\"right\"}={}){const e=this.raw;if(ee.isStack(e)&&e.parent){const i=[\"top\",\"bottom\"].includes(t)?\"column\":\"row\",n=[\"left\",\"top\"].includes(t)?1:0,o=we(e.parent)?e.parent:e.layoutManager,s=o,r=e.parent.contentItems.indexOf(e);e.parent.isGround&&e.parent.removeChild(e,!0);const a=o.newItem({type:i,content:[{type:\"stack\",content:[]}]},r);if(!a)throw new Error(\"createAdjacentStack: Failed to create new container\");const l=a.contentItems[0];return a.addChild(this.raw,n),we(s)&&s.removeChild(e,!0),this._wrap(l)}throw new Error(`Cannot creat adjacent stacks for type: ${e.type}, must be type 'stack'`)}setActiveContentItem(t,e=!0){if(!ee.isStack(this._item))throw new Error(`Cannot call setActiveContentItem from a non-stack item: ${this.type}`);this._item.setActiveComponentItem(t.raw,!e)}static wrap(t,e){return ye.wrapInternal(Ie,t,e)}}function be(t=[],e){for(const i of t)\"component\"===i.type?Object.keys(e).forEach((t=>{t in i&&(i.componentState={[`${de}${t}`]:i[t],...i.componentState}),i[t]=e[t]})):be(i.content,e)}function Se(t=[],e,i){for(const n of t)if(\"component\"===n.type)Object.keys(e).forEach((t=>{if(`${de}${t}`in n.componentState)return n[t]=n.componentState[`${de}${t}`],void delete n.componentState[`${de}${t}`];n[t]=e[t]}));else{if(n.size&&(\"row\"===i||\"column\"===i)){n[\"row\"===i?\"width\":\"height\"]=n.size?.includes(\".\")?parseFloat(n.size):parseInt(n.size)}Se(n.content,e,n.type)}}function Ee(t){if(t.root){t.root.content&&Se([t.root],{componentName:\"view\",isClosable:!0});const e=t.root;t.content=[e],delete t.root}return t}const xe=e=>class extends e{connectedCallback(){if(!this.name||!this.uuid)throw new Error(\" Name or uuid attribute missing\");if(!this.src)throw new Error(\" missing 'src' attribute.\");this.#t||(this.#t=document.createElement(\"iframe\"),this.#t.src=this.src,this.#t.style.height=\"100%\",this.#t.style.width=\"100%\",this.#t.style.border=\"none\",this.forceFrameName?this.#t.setAttribute(\"name\",this.forceFrameName):this.#t.setAttribute(\"name\",t.encodeOptions({brokerUrl:this.brokerUrl,name:this.name,uuid:this.uuid,providerId:this.providerId,contextGroup:this.contextGroup},\"of-frame\")),this.#t.setAttribute(\"id\",this.name),this.appendChild(this.#t))}#t;get brokerUrl(){return this.getAttribute(\"of-broker\")}set brokerUrl(t){t&&this.setAttribute(\"of-broker\",t)}get name(){return this.getAttribute(\"of-name\")}set name(t){t&&this.setAttribute(\"of-name\",t)}get forceFrameName(){return this.getAttribute(\"forceFrameName\")}set forceFrameName(t){t&&this.setAttribute(\"forceFrameName\",t)}get uuid(){return this.getAttribute(\"of-uuid\")}set uuid(t){t&&this.setAttribute(\"of-uuid\",t)}get src(){return this.getAttribute(\"src\")}set src(t){t&&this.setAttribute(\"src\",t)}get providerId(){return this.getAttribute(\"of-provider-id\")}set providerId(t){t&&this.setAttribute(\"of-provider-id\",t)}get contextGroup(){return this.getAttribute(\"of-context-group\")}set contextGroup(t){t&&this.setAttribute(\"of-context-group\",t)}static get observedAttributes(){return[\"name\"]}};class Le{static create(t){const e=document.createElement(\"of-view\");return Object.entries(t).forEach((([t,i])=>{e.setAttribute(t,i)})),e}}customElements.define(\"of-view\",xe(HTMLElement));class ze{constructor(t,i,n,{brokerUrl:o,interopConfig:s},r){this.container=t,this.config=i,this.ofView=null,this.isDragging=()=>this.container.tab.element?.className.includes(\"lm_dragging\")??!1;const{url:a,web:l,interop:h,name:d}=i||{},c=d??`internal-generated-view-${e.v4()}`;if(this.identity={uuid:n,name:c},this.container.element.setAttribute(\"of-name\",c),this.container.element.id=`container-${c}`,this.container.parent.id=c,void 0===a)return void this.handleUrlMissing();const m=this.updateTitleIfNotSet(a),u={\"of-broker\":o,\"of-uuid\":n,\"of-name\":c,src:a};l?.frameName&&(u.forceFrameName=l.frameName);const p=h?.currentContextGroup??s?.currentContextGroup;p&&(u[\"of-context-group\"]=p),s?.providerId&&(u[\"of-provider-id\"]=s?.providerId),this.ofView=Le.create(u),this.ofView.title=m??`Iframe: ${a}`,r.appendChild(this.ofView),this.ofView.style.position=\"absolute\"}updateTitleIfNotSet(t){return\"view\"===this.container.parent.title&&this.container.parent.setTitle(t),this.container.parent.title}handleUrlMissing(){const t=document.createElement(\"div\");t.setAttribute(\"style\",\"padding: 20px\");t.innerText=\"No URL provided\",this.container.element.appendChild(t)}destroy(){this.ofView?.remove(),this.ofView=null}closeView(){this.container.close()}resize(){if(this.ofView){if(this.isDragging())return void(this.ofView.style.display=\"none\");const t=this.container.element.getBoundingClientRect();this.ofView.style.position=\"absolute\",this.ofView.style.height=`${t.height}px`,this.ofView.style.width=`${t.width}px`,this.ofView.style.inset=`${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`,this.ofView.style.display=\"block\"}}}class Me extends U{static overrideConfig(t){const e={...ue,...t.settings,...pe};return e.reorderEnabled?be(t.content,{isClosable:!0}):be(t.content,{reorderEnabled:!1}),{dimensions:me,...t,settings:e,header:{...ce,show:!1!==t.settings?.hasHeaders&&ce.show}}}constructor(t,e,i,{options:n},o,s){super(),this.identity=t,this.container=e,this.initialConfig=i,this.layoutManager=o,this.platformProvider=s,this.viewComponentsByContainerElement=new Map,this.layoutContentCache=_.getSingleInstance(),this.reparentingViews=new Set,this.goldenLayoutDestroyed=!1,this.createViewComponent=(t,e)=>{m.handleSharedView(this.layoutManager,this.identity,e);const i=new ze(t,e,this.identity.uuid,this.options,this.iframeContainer);return e&&!1===e[`${de}isClosable`]&&this.stylesheet.insertRule(`#tab-${i.identity.name} .lm_close_tab { display: none; }`),this.viewComponentsByContainerElement.set(t.element,i),this.resizeController.observeContainer(t.element),i},this.iframeContainer=document.createElement(\"div\"),this.iframeContainer.id=`openfin-layout-iframe-container-${this.identity.layoutName}`,this.domEmitter=new V(e),this.setupStylesheets(),this.layout=new he(this.container),this.layout.resizeWithContainerAutomatically=!0,this.options=n,this.layout.registerComponent(\"view\",this.createViewComponent),this.setupListeners(),this.resizeController=new ve(this),this.layout.loadLayout(Me.overrideConfig(i));const r=document.createElement(\"div\");r.id=`openfin-layout-shadow-container-${this.identity.layoutName}`,r.attachShadow({mode:\"open\",delegatesFocus:!1}).appendChild(this.iframeContainer),this.container.appendChild(r),this.resizeController.observeMutations(this.container)}getStackByView({name:t}){const e=this.layout.findFirstComponentItemById(t);if(e?.parent&&e?.parent?.isStack)return Ie.wrap(e.parent,this)}getRoot(){return Ie.wrap(this.layout.rootItem,this)}async platformCloseView(t){const e=[...this.viewComponentsByContainerElement.values()].find((e=>e.identity.name===t.name));if(!e)throw new Error(`View with name: ${t.name} not found in layout.`);e.closeView()}async platformCreateView(t,{location:e,targetView:i}={}){if(i)throw new Error(\"TargetView not supported in web\");const n={options:this.platformProvider.normalizeOptions(t),target:this.identity,location:e};return this.insertView(n)}setupStylesheets(){if(this.container.setAttribute(\"data-openfin-layout-name\",this.identity.layoutName),this.stylesheet=new CSSStyleSheet,this.stylesheet.insertRule(\".lm_close { display: none; }\"),document.adoptedStyleSheets.push(this.stylesheet),this.initialConfig.settings?.preventSplitterResize){const t=`\\n [data-openfin-layout-name='${this.identity.layoutName}'] .lm_splitter {\\n pointer-events: none;\\n }`;this.stylesheet.insertRule(t)}}insertView({options:t,location:e,targetView:i}){const n=e?this.layoutContentCache.getItemOrUndefined(e.id):void 0,o=i?this.layoutContentCache.getItemOrUndefined(i.name):void 0,s=n??o??Ie.wrap(this.layout.rootItem,this);let r;if(ee.isStack(s.raw))r=s.raw;else{if(!we(s.raw))throw new Error(\"Cannot add a view at the requested location\");r=s.raw.newItem({type:\"stack\",content:[]})}const a=Math.min(r.contentItems.length,e?.index??r.contentItems.length);let l=this.layout.findFirstComponentItemById(t.name);l?(l.parent&&l.parent.removeChild(l,!0),r.addChild(l,a)):l=r.newComponent(\"view\",t,t.title??t.url??\"Default Title\",a);const h=l.component.identity;return Promise.resolve({identity:h})}replaceView({viewToReplace:t,newView:e}){throw new Error(\"Method not implemented.\")}replaceLayout(t){throw new Error(\"Method not implemented.\")}async cleanupView(t){}applyPreset(t){throw new Error(\"Method not implemented.\")}getCurrentViews(){return[...this.viewComponentsByContainerElement.values()].map((t=>t.identity))}async getFrameSnapshot(){return Ee(xt.fromResolved(this.layout.toConfig()))}isVisible(){return W(this.container)}async onViewDetached({viewIdentity:t}){this.reparentingViews.add(t.name),this.platformCloseView(t)}async destroy(){this.goldenLayoutDestroyed||(this.goldenLayoutDestroyed=!0,this.layout.destroy()),this.iframeContainer.remove(),this.resizeController.destroy(),document.adoptedStyleSheets=document.adoptedStyleSheets.filter((t=>t!==this.stylesheet)),this.viewComponentsByContainerElement.clear()}setupListeners(){this.container.addEventListener(\"pointerdown\",(t=>{if(t.target instanceof HTMLElement){const e=t.target.classList;[\"lm_tab\",\"lm_title\",\"lm_splitter\",\"lm_drag_handle\"].some((t=>e.contains(t)))&&(this.handleDragStart(),2===t.button&&t.stopPropagation())}}),!0),document.addEventListener(\"pointerup\",(()=>this.handleDragEnd()),!0),this.layout.on(\"tabCreated\",(t=>{const e=t.componentItem.component;t.element.id=`tab-${e.identity.name}`,this.domEmitter.dispatchLocalEvent(\"tab-created\",e.identity)})),this.layout.on(\"itemCreated\",(({target:t})=>{const e=t;if(Gt.isComponentItem(e)){const t=e.component;this.domEmitter.dispatchLocalEvent(\"container-created\",t.identity)}})),this.layout.on(\"itemDestroyed\",(t=>{const e=t.target;if(Gt.isComponentItem(e)){const t=e.component;this.removeViewComponent(t)}})),this.layout.on(\"itemDropped\",(()=>{this.handleDragEnd()}))}handleDragStart(){this.iframeContainer.style.pointerEvents=\"none\"}handleDragEnd(){this.iframeContainer.style.pointerEvents=\"\"}removeViewComponent(t){if(t.config&&!1===t.config[`${de}isClosable`]){const e=[...this.stylesheet.cssRules].findIndex((e=>e.cssText.includes(`#tab-${t.identity.name}`)));this.stylesheet.deleteRule(e)}t.destroy(),this.viewComponentsByContainerElement.delete(t.container.element),this.resizeController.unobserveContainer(t.container.element),this.reparentingViews.has(t.identity.name)?this.reparentingViews.delete(t.identity.name):this.platformProvider.closeView(t.identity.name);0===this.getCurrentViews().length&&(this.goldenLayoutDestroyed||(this.goldenLayoutDestroyed=!0,m.handleLastViewRemoved(this.layoutManager,this.identity)))}}class Pe{constructor(t,e,i,n){this.windowIdentity=t,this.connectConfig=e,this.provider=i,this.fallbackContainer=n}async createLayout(t,e){if(!(\"container\"in t)&&!this.fallbackContainer)throw new Error(\"Container property is not optional in web\");const{layoutName:i}=t,n=t,o=this.provider.initLayoutViews(n),s=n.container??this.fallbackContainer,r={...this.windowIdentity,layoutName:i},a=new Me(r,s,o,this.connectConfig,e,this.provider);m.registerLayout(e,i,a),this.fallbackContainer=null}async getLayoutSnapshot(t){return t.getLayoutSnapshot()}async handleLastViewRemoved(t){}}class Te{static async init(e){const i=e.getFin().InterApplicationBus.Channel,n=await i.create(`custom-frame-${e.me.uuid}`);return n.setDefaultAction((async(t,{target:e,opts:i},o)=>{const s=n.connections.find((t=>t.name===e.name));if(s)return n.dispatch(s,t,{...i,target:e});throw new Error(`Client with name ${e.name} not found`)})),await t.relayChannelClientApi_1(n,\"layout-relay\"),new Te(e)}constructor(t){this.wire=t,this.viewNames=new Set}normalizeOptions(t,i=\"default\"){const n=this.wire.me.uuid;let{name:o=`internal-generated-view-${e.v4()}`}=t;return o.match(/^internal-generated-view-/)&&this.viewNames.has(o)&&\"duplicate\"===i&&(o=`internal-generated-view-${e.v4()}`),this.viewNames.add(o),{...t,name:o,uuid:n}}closeView(t){this.viewNames.delete(t)}initLayoutViews({layout:t,multiInstanceViewBehavior:e}){return H((t=>{if(\"component\"===t.type&&t.componentState){const i=this.normalizeOptions(t.componentState,e);return{...t,componentState:i}}return t}),t)}}var Ae;const ke=t=>t;Ae=new WeakMap,exports.WebLayoutEntryPoint=class{constructor(e){Ae.set(this,void 0),this.initLayoutManager=async(e,i,{container:n,layoutManagerOverride:o})=>{const s=await Te.init(i),r=o??ke,a=new Pe(i.me,t.__classPrivateFieldGet(this,Ae,\"f\"),s,n),l=new(r(m.createClosedConstructor(a)));return await M(i,l),l},this.applyLayoutSnapshot=async(e,i,n)=>{await i.applyLayoutSnapshot(t.__classPrivateFieldGet(this,Ae,\"f\").platform.layoutSnapshot)},this.createLayout=async(t,e)=>m.createLayout(t,e),this.destroyLayout=async(t,e)=>m.destroyLayout(t,e),t.__classPrivateFieldSet(this,Ae,e,\"f\")}};\n","'use strict'\n\nexports.byteLength = byteLength\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\nfor (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i]\n revLookup[code.charCodeAt(i)] = i\n}\n\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction getLens (b64) {\n var len = b64.length\n\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // Trim off extra bytes after placeholder bytes are found\n // See: https://github.com/beatgammit/base64-js/issues/42\n var validLen = b64.indexOf('=')\n if (validLen === -1) validLen = len\n\n var placeHoldersLen = validLen === len\n ? 0\n : 4 - (validLen % 4)\n\n return [validLen, placeHoldersLen]\n}\n\n// base64 is 4/3 + up to two characters of the original data\nfunction byteLength (b64) {\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction _byteLength (b64, validLen, placeHoldersLen) {\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction toByteArray (b64) {\n var tmp\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n\n var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))\n\n var curByte = 0\n\n // if there are placeholders, only get up to the last complete 4 chars\n var len = placeHoldersLen > 0\n ? validLen - 4\n : validLen\n\n var i\n for (i = 0; i < len; i += 4) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 18) |\n (revLookup[b64.charCodeAt(i + 1)] << 12) |\n (revLookup[b64.charCodeAt(i + 2)] << 6) |\n revLookup[b64.charCodeAt(i + 3)]\n arr[curByte++] = (tmp >> 16) & 0xFF\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 2) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 2) |\n (revLookup[b64.charCodeAt(i + 1)] >> 4)\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 1) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 10) |\n (revLookup[b64.charCodeAt(i + 1)] << 4) |\n (revLookup[b64.charCodeAt(i + 2)] >> 2)\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] +\n lookup[num >> 12 & 0x3F] +\n lookup[num >> 6 & 0x3F] +\n lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n var tmp\n var output = []\n for (var i = start; i < end; i += 3) {\n tmp =\n ((uint8[i] << 16) & 0xFF0000) +\n ((uint8[i + 1] << 8) & 0xFF00) +\n (uint8[i + 2] & 0xFF)\n output.push(tripletToBase64(tmp))\n }\n return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n var tmp\n var len = uint8.length\n var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n var parts = []\n var maxChunkLength = 16383 // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1]\n parts.push(\n lookup[tmp >> 2] +\n lookup[(tmp << 4) & 0x3F] +\n '=='\n )\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + uint8[len - 1]\n parts.push(\n lookup[tmp >> 10] +\n lookup[(tmp >> 4) & 0x3F] +\n lookup[(tmp << 2) & 0x3F] +\n '='\n )\n }\n\n return parts.join('')\n}\n","/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n/* eslint-disable no-proto */\n\n'use strict'\n\nconst base64 = require('base64-js')\nconst ieee754 = require('ieee754')\nconst customInspectSymbol =\n (typeof Symbol === 'function' && typeof Symbol['for'] === 'function') // eslint-disable-line dot-notation\n ? Symbol['for']('nodejs.util.inspect.custom') // eslint-disable-line dot-notation\n : null\n\nexports.Buffer = Buffer\nexports.SlowBuffer = SlowBuffer\nexports.INSPECT_MAX_BYTES = 50\n\nconst K_MAX_LENGTH = 0x7fffffff\nexports.kMaxLength = K_MAX_LENGTH\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Print warning and recommend using `buffer` v4.x which has an Object\n * implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * We report that the browser does not support typed arrays if the are not subclassable\n * using __proto__. Firefox 4-29 lacks support for adding new properties to `Uint8Array`\n * (See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438). IE 10 lacks support\n * for __proto__ and has a buggy typed array implementation.\n */\nBuffer.TYPED_ARRAY_SUPPORT = typedArraySupport()\n\nif (!Buffer.TYPED_ARRAY_SUPPORT && typeof console !== 'undefined' &&\n typeof console.error === 'function') {\n console.error(\n 'This browser lacks typed array (Uint8Array) support which is required by ' +\n '`buffer` v5.x. Use `buffer` v4.x if you require old browser support.'\n )\n}\n\nfunction typedArraySupport () {\n // Can typed array instances can be augmented?\n try {\n const arr = new Uint8Array(1)\n const proto = { foo: function () { return 42 } }\n Object.setPrototypeOf(proto, Uint8Array.prototype)\n Object.setPrototypeOf(arr, proto)\n return arr.foo() === 42\n } catch (e) {\n return false\n }\n}\n\nObject.defineProperty(Buffer.prototype, 'parent', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.buffer\n }\n})\n\nObject.defineProperty(Buffer.prototype, 'offset', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.byteOffset\n }\n})\n\nfunction createBuffer (length) {\n if (length > K_MAX_LENGTH) {\n throw new RangeError('The value \"' + length + '\" is invalid for option \"size\"')\n }\n // Return an augmented `Uint8Array` instance\n const buf = new Uint8Array(length)\n Object.setPrototypeOf(buf, Buffer.prototype)\n return buf\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new TypeError(\n 'The \"string\" argument must be of type string. Received type number'\n )\n }\n return allocUnsafe(arg)\n }\n return from(arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\nfunction from (value, encodingOrOffset, length) {\n if (typeof value === 'string') {\n return fromString(value, encodingOrOffset)\n }\n\n if (ArrayBuffer.isView(value)) {\n return fromArrayView(value)\n }\n\n if (value == null) {\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n }\n\n if (isInstance(value, ArrayBuffer) ||\n (value && isInstance(value.buffer, ArrayBuffer))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof SharedArrayBuffer !== 'undefined' &&\n (isInstance(value, SharedArrayBuffer) ||\n (value && isInstance(value.buffer, SharedArrayBuffer)))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof value === 'number') {\n throw new TypeError(\n 'The \"value\" argument must not be of type number. Received type number'\n )\n }\n\n const valueOf = value.valueOf && value.valueOf()\n if (valueOf != null && valueOf !== value) {\n return Buffer.from(valueOf, encodingOrOffset, length)\n }\n\n const b = fromObject(value)\n if (b) return b\n\n if (typeof Symbol !== 'undefined' && Symbol.toPrimitive != null &&\n typeof value[Symbol.toPrimitive] === 'function') {\n return Buffer.from(value[Symbol.toPrimitive]('string'), encodingOrOffset, length)\n }\n\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n return from(value, encodingOrOffset, length)\n}\n\n// Note: Change prototype *after* Buffer.from is defined to workaround Chrome bug:\n// https://github.com/feross/buffer/pull/148\nObject.setPrototypeOf(Buffer.prototype, Uint8Array.prototype)\nObject.setPrototypeOf(Buffer, Uint8Array)\n\nfunction assertSize (size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be of type number')\n } else if (size < 0) {\n throw new RangeError('The value \"' + size + '\" is invalid for option \"size\"')\n }\n}\n\nfunction alloc (size, fill, encoding) {\n assertSize(size)\n if (size <= 0) {\n return createBuffer(size)\n }\n if (fill !== undefined) {\n // Only pay attention to encoding if it's a string. This\n // prevents accidentally sending in a number that would\n // be interpreted as a start offset.\n return typeof encoding === 'string'\n ? createBuffer(size).fill(fill, encoding)\n : createBuffer(size).fill(fill)\n }\n return createBuffer(size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n return alloc(size, fill, encoding)\n}\n\nfunction allocUnsafe (size) {\n assertSize(size)\n return createBuffer(size < 0 ? 0 : checked(size) | 0)\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n return allocUnsafe(size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n return allocUnsafe(size)\n}\n\nfunction fromString (string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8'\n }\n\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n\n const length = byteLength(string, encoding) | 0\n let buf = createBuffer(length)\n\n const actual = buf.write(string, encoding)\n\n if (actual !== length) {\n // Writing a hex string, for example, that contains invalid characters will\n // cause everything after the first invalid character to be ignored. (e.g.\n // 'abxxcd' will be treated as 'ab')\n buf = buf.slice(0, actual)\n }\n\n return buf\n}\n\nfunction fromArrayLike (array) {\n const length = array.length < 0 ? 0 : checked(array.length) | 0\n const buf = createBuffer(length)\n for (let i = 0; i < length; i += 1) {\n buf[i] = array[i] & 255\n }\n return buf\n}\n\nfunction fromArrayView (arrayView) {\n if (isInstance(arrayView, Uint8Array)) {\n const copy = new Uint8Array(arrayView)\n return fromArrayBuffer(copy.buffer, copy.byteOffset, copy.byteLength)\n }\n return fromArrayLike(arrayView)\n}\n\nfunction fromArrayBuffer (array, byteOffset, length) {\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\"offset\" is outside of buffer bounds')\n }\n\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\"length\" is outside of buffer bounds')\n }\n\n let buf\n if (byteOffset === undefined && length === undefined) {\n buf = new Uint8Array(array)\n } else if (length === undefined) {\n buf = new Uint8Array(array, byteOffset)\n } else {\n buf = new Uint8Array(array, byteOffset, length)\n }\n\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(buf, Buffer.prototype)\n\n return buf\n}\n\nfunction fromObject (obj) {\n if (Buffer.isBuffer(obj)) {\n const len = checked(obj.length) | 0\n const buf = createBuffer(len)\n\n if (buf.length === 0) {\n return buf\n }\n\n obj.copy(buf, 0, 0, len)\n return buf\n }\n\n if (obj.length !== undefined) {\n if (typeof obj.length !== 'number' || numberIsNaN(obj.length)) {\n return createBuffer(0)\n }\n return fromArrayLike(obj)\n }\n\n if (obj.type === 'Buffer' && Array.isArray(obj.data)) {\n return fromArrayLike(obj.data)\n }\n}\n\nfunction checked (length) {\n // Note: cannot use `length < K_MAX_LENGTH` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= K_MAX_LENGTH) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + K_MAX_LENGTH.toString(16) + ' bytes')\n }\n return length | 0\n}\n\nfunction SlowBuffer (length) {\n if (+length != length) { // eslint-disable-line eqeqeq\n length = 0\n }\n return Buffer.alloc(+length)\n}\n\nBuffer.isBuffer = function isBuffer (b) {\n return b != null && b._isBuffer === true &&\n b !== Buffer.prototype // so Buffer.isBuffer(Buffer.prototype) will be false\n}\n\nBuffer.compare = function compare (a, b) {\n if (isInstance(a, Uint8Array)) a = Buffer.from(a, a.offset, a.byteLength)\n if (isInstance(b, Uint8Array)) b = Buffer.from(b, b.offset, b.byteLength)\n if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n throw new TypeError(\n 'The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array'\n )\n }\n\n if (a === b) return 0\n\n let x = a.length\n let y = b.length\n\n for (let i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i]\n y = b[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n switch (String(encoding).toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'latin1':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return true\n default:\n return false\n }\n}\n\nBuffer.concat = function concat (list, length) {\n if (!Array.isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n\n if (list.length === 0) {\n return Buffer.alloc(0)\n }\n\n let i\n if (length === undefined) {\n length = 0\n for (i = 0; i < list.length; ++i) {\n length += list[i].length\n }\n }\n\n const buffer = Buffer.allocUnsafe(length)\n let pos = 0\n for (i = 0; i < list.length; ++i) {\n let buf = list[i]\n if (isInstance(buf, Uint8Array)) {\n if (pos + buf.length > buffer.length) {\n if (!Buffer.isBuffer(buf)) buf = Buffer.from(buf)\n buf.copy(buffer, pos)\n } else {\n Uint8Array.prototype.set.call(\n buffer,\n buf,\n pos\n )\n }\n } else if (!Buffer.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n } else {\n buf.copy(buffer, pos)\n }\n pos += buf.length\n }\n return buffer\n}\n\nfunction byteLength (string, encoding) {\n if (Buffer.isBuffer(string)) {\n return string.length\n }\n if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) {\n return string.byteLength\n }\n if (typeof string !== 'string') {\n throw new TypeError(\n 'The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. ' +\n 'Received type ' + typeof string\n )\n }\n\n const len = string.length\n const mustMatch = (arguments.length > 2 && arguments[2] === true)\n if (!mustMatch && len === 0) return 0\n\n // Use a for loop to avoid recursion\n let loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'ascii':\n case 'latin1':\n case 'binary':\n return len\n case 'utf8':\n case 'utf-8':\n return utf8ToBytes(string).length\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return len * 2\n case 'hex':\n return len >>> 1\n case 'base64':\n return base64ToBytes(string).length\n default:\n if (loweredCase) {\n return mustMatch ? -1 : utf8ToBytes(string).length // assume utf8\n }\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n let loweredCase = false\n\n // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n // property of a typed array.\n\n // This behaves neither like String nor Uint8Array in that we set start/end\n // to their upper/lower bounds if the value passed is out of range.\n // undefined is handled specially as per ECMA-262 6th Edition,\n // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n if (start === undefined || start < 0) {\n start = 0\n }\n // Return early if start > this.length. Done here to prevent potential uint32\n // coercion fail below.\n if (start > this.length) {\n return ''\n }\n\n if (end === undefined || end > this.length) {\n end = this.length\n }\n\n if (end <= 0) {\n return ''\n }\n\n // Force coercion to uint32. This will also coerce falsey/NaN values to 0.\n end >>>= 0\n start >>>= 0\n\n if (end <= start) {\n return ''\n }\n\n if (!encoding) encoding = 'utf8'\n\n while (true) {\n switch (encoding) {\n case 'hex':\n return hexSlice(this, start, end)\n\n case 'utf8':\n case 'utf-8':\n return utf8Slice(this, start, end)\n\n case 'ascii':\n return asciiSlice(this, start, end)\n\n case 'latin1':\n case 'binary':\n return latin1Slice(this, start, end)\n\n case 'base64':\n return base64Slice(this, start, end)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return utf16leSlice(this, start, end)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = (encoding + '').toLowerCase()\n loweredCase = true\n }\n }\n}\n\n// This property is used by `Buffer.isBuffer` (and the `is-buffer` npm package)\n// to detect a Buffer instance. It's not possible to use `instanceof Buffer`\n// reliably in a browserify context because there could be multiple different\n// copies of the 'buffer' package in use. This method works even for Buffer\n// instances that were created from another copy of the `buffer` package.\n// See: https://github.com/feross/buffer/issues/154\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n const i = b[n]\n b[n] = b[m]\n b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n const len = this.length\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits')\n }\n for (let i = 0; i < len; i += 2) {\n swap(this, i, i + 1)\n }\n return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n const len = this.length\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits')\n }\n for (let i = 0; i < len; i += 4) {\n swap(this, i, i + 3)\n swap(this, i + 1, i + 2)\n }\n return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n const len = this.length\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits')\n }\n for (let i = 0; i < len; i += 8) {\n swap(this, i, i + 7)\n swap(this, i + 1, i + 6)\n swap(this, i + 2, i + 5)\n swap(this, i + 3, i + 4)\n }\n return this\n}\n\nBuffer.prototype.toString = function toString () {\n const length = this.length\n if (length === 0) return ''\n if (arguments.length === 0) return utf8Slice(this, 0, length)\n return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.toLocaleString = Buffer.prototype.toString\n\nBuffer.prototype.equals = function equals (b) {\n if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n if (this === b) return true\n return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n let str = ''\n const max = exports.INSPECT_MAX_BYTES\n str = this.toString('hex', 0, max).replace(/(.{2})/g, '$1 ').trim()\n if (this.length > max) str += ' ... '\n return ''\n}\nif (customInspectSymbol) {\n Buffer.prototype[customInspectSymbol] = Buffer.prototype.inspect\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n if (isInstance(target, Uint8Array)) {\n target = Buffer.from(target, target.offset, target.byteLength)\n }\n if (!Buffer.isBuffer(target)) {\n throw new TypeError(\n 'The \"target\" argument must be one of type Buffer or Uint8Array. ' +\n 'Received type ' + (typeof target)\n )\n }\n\n if (start === undefined) {\n start = 0\n }\n if (end === undefined) {\n end = target ? target.length : 0\n }\n if (thisStart === undefined) {\n thisStart = 0\n }\n if (thisEnd === undefined) {\n thisEnd = this.length\n }\n\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError('out of range index')\n }\n\n if (thisStart >= thisEnd && start >= end) {\n return 0\n }\n if (thisStart >= thisEnd) {\n return -1\n }\n if (start >= end) {\n return 1\n }\n\n start >>>= 0\n end >>>= 0\n thisStart >>>= 0\n thisEnd >>>= 0\n\n if (this === target) return 0\n\n let x = thisEnd - thisStart\n let y = end - start\n const len = Math.min(x, y)\n\n const thisCopy = this.slice(thisStart, thisEnd)\n const targetCopy = target.slice(start, end)\n\n for (let i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i]\n y = targetCopy[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (numberIsNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [val], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n let indexSize = 1\n let arrLength = arr.length\n let valLength = val.length\n\n if (encoding !== undefined) {\n encoding = String(encoding).toLowerCase()\n if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n encoding === 'utf16le' || encoding === 'utf-16le') {\n if (arr.length < 2 || val.length < 2) {\n return -1\n }\n indexSize = 2\n arrLength /= 2\n valLength /= 2\n byteOffset /= 2\n }\n }\n\n function read (buf, i) {\n if (indexSize === 1) {\n return buf[i]\n } else {\n return buf.readUInt16BE(i * indexSize)\n }\n }\n\n let i\n if (dir) {\n let foundIndex = -1\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1) foundIndex = i\n if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n } else {\n if (foundIndex !== -1) i -= i - foundIndex\n foundIndex = -1\n }\n }\n } else {\n if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n for (i = byteOffset; i >= 0; i--) {\n let found = true\n for (let j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false\n break\n }\n }\n if (found) return i\n }\n }\n\n return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n offset = Number(offset) || 0\n const remaining = buf.length - offset\n if (!length) {\n length = remaining\n } else {\n length = Number(length)\n if (length > remaining) {\n length = remaining\n }\n }\n\n const strLen = string.length\n\n if (length > strLen / 2) {\n length = strLen / 2\n }\n let i\n for (i = 0; i < length; ++i) {\n const parsed = parseInt(string.substr(i * 2, 2), 16)\n if (numberIsNaN(parsed)) return i\n buf[offset + i] = parsed\n }\n return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n // Buffer#write(string)\n if (offset === undefined) {\n encoding = 'utf8'\n length = this.length\n offset = 0\n // Buffer#write(string, encoding)\n } else if (length === undefined && typeof offset === 'string') {\n encoding = offset\n length = this.length\n offset = 0\n // Buffer#write(string, offset[, length][, encoding])\n } else if (isFinite(offset)) {\n offset = offset >>> 0\n if (isFinite(length)) {\n length = length >>> 0\n if (encoding === undefined) encoding = 'utf8'\n } else {\n encoding = length\n length = undefined\n }\n } else {\n throw new Error(\n 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n )\n }\n\n const remaining = this.length - offset\n if (length === undefined || length > remaining) length = remaining\n\n if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n throw new RangeError('Attempt to write outside buffer bounds')\n }\n\n if (!encoding) encoding = 'utf8'\n\n let loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'hex':\n return hexWrite(this, string, offset, length)\n\n case 'utf8':\n case 'utf-8':\n return utf8Write(this, string, offset, length)\n\n case 'ascii':\n case 'latin1':\n case 'binary':\n return asciiWrite(this, string, offset, length)\n\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return base64Write(this, string, offset, length)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return ucs2Write(this, string, offset, length)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0)\n }\n}\n\nfunction base64Slice (buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf)\n } else {\n return base64.fromByteArray(buf.slice(start, end))\n }\n}\n\nfunction utf8Slice (buf, start, end) {\n end = Math.min(buf.length, end)\n const res = []\n\n let i = start\n while (i < end) {\n const firstByte = buf[i]\n let codePoint = null\n let bytesPerSequence = (firstByte > 0xEF)\n ? 4\n : (firstByte > 0xDF)\n ? 3\n : (firstByte > 0xBF)\n ? 2\n : 1\n\n if (i + bytesPerSequence <= end) {\n let secondByte, thirdByte, fourthByte, tempCodePoint\n\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 0x80) {\n codePoint = firstByte\n }\n break\n case 2:\n secondByte = buf[i + 1]\n if ((secondByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n if (tempCodePoint > 0x7F) {\n codePoint = tempCodePoint\n }\n }\n break\n case 3:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n codePoint = tempCodePoint\n }\n }\n break\n case 4:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n fourthByte = buf[i + 3]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n codePoint = tempCodePoint\n }\n }\n }\n }\n\n if (codePoint === null) {\n // we did not generate a valid codePoint so insert a\n // replacement char (U+FFFD) and advance only 1 byte\n codePoint = 0xFFFD\n bytesPerSequence = 1\n } else if (codePoint > 0xFFFF) {\n // encode to utf16 (surrogate pair dance)\n codePoint -= 0x10000\n res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n codePoint = 0xDC00 | codePoint & 0x3FF\n }\n\n res.push(codePoint)\n i += bytesPerSequence\n }\n\n return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nconst MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n const len = codePoints.length\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n }\n\n // Decode in chunks to avoid \"call stack size exceeded\".\n let res = ''\n let i = 0\n while (i < len) {\n res += String.fromCharCode.apply(\n String,\n codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n )\n }\n return res\n}\n\nfunction asciiSlice (buf, start, end) {\n let ret = ''\n end = Math.min(buf.length, end)\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F)\n }\n return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n let ret = ''\n end = Math.min(buf.length, end)\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i])\n }\n return ret\n}\n\nfunction hexSlice (buf, start, end) {\n const len = buf.length\n\n if (!start || start < 0) start = 0\n if (!end || end < 0 || end > len) end = len\n\n let out = ''\n for (let i = start; i < end; ++i) {\n out += hexSliceLookupTable[buf[i]]\n }\n return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n const bytes = buf.slice(start, end)\n let res = ''\n // If bytes.length is odd, the last 8 bits must be ignored (same as node.js)\n for (let i = 0; i < bytes.length - 1; i += 2) {\n res += String.fromCharCode(bytes[i] + (bytes[i + 1] * 256))\n }\n return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n const len = this.length\n start = ~~start\n end = end === undefined ? len : ~~end\n\n if (start < 0) {\n start += len\n if (start < 0) start = 0\n } else if (start > len) {\n start = len\n }\n\n if (end < 0) {\n end += len\n if (end < 0) end = 0\n } else if (end > len) {\n end = len\n }\n\n if (end < start) end = start\n\n const newBuf = this.subarray(start, end)\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(newBuf, Buffer.prototype)\n\n return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUintLE =\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let val = this[offset]\n let mul = 1\n let i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUintBE =\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n checkOffset(offset, byteLength, this.length)\n }\n\n let val = this[offset + --byteLength]\n let mul = 1\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUint8 =\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n return this[offset]\n}\n\nBuffer.prototype.readUint16LE =\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUint16BE =\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUint32LE =\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return ((this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16)) +\n (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUint32BE =\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] * 0x1000000) +\n ((this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n this[offset + 3])\n}\n\nBuffer.prototype.readBigUInt64LE = defineBigIntMethod(function readBigUInt64LE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const lo = first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24\n\n const hi = this[++offset] +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n last * 2 ** 24\n\n return BigInt(lo) + (BigInt(hi) << BigInt(32))\n})\n\nBuffer.prototype.readBigUInt64BE = defineBigIntMethod(function readBigUInt64BE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const hi = first * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset]\n\n const lo = this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last\n\n return (BigInt(hi) << BigInt(32)) + BigInt(lo)\n})\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let val = this[offset]\n let mul = 1\n let i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let i = byteLength\n let mul = 1\n let val = this[offset + --i]\n while (i > 0 && (mul *= 0x100)) {\n val += this[offset + --i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n if (!(this[offset] & 0x80)) return (this[offset])\n return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n const val = this[offset] | (this[offset + 1] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n const val = this[offset + 1] | (this[offset] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16) |\n (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] << 24) |\n (this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n (this[offset + 3])\n}\n\nBuffer.prototype.readBigInt64LE = defineBigIntMethod(function readBigInt64LE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const val = this[offset + 4] +\n this[offset + 5] * 2 ** 8 +\n this[offset + 6] * 2 ** 16 +\n (last << 24) // Overflow\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24)\n})\n\nBuffer.prototype.readBigInt64BE = defineBigIntMethod(function readBigInt64BE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const val = (first << 24) + // Overflow\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset]\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last)\n})\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUintLE =\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n let mul = 1\n let i = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUintBE =\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n let i = byteLength - 1\n let mul = 1\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUint8 =\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeUint16LE =\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeUint16BE =\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeUint32LE =\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset + 3] = (value >>> 24)\n this[offset + 2] = (value >>> 16)\n this[offset + 1] = (value >>> 8)\n this[offset] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeUint32BE =\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nfunction wrtBigUInt64LE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7)\n\n let lo = Number(value & BigInt(0xffffffff))\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n return offset\n}\n\nfunction wrtBigUInt64BE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7)\n\n let lo = Number(value & BigInt(0xffffffff))\n buf[offset + 7] = lo\n lo = lo >> 8\n buf[offset + 6] = lo\n lo = lo >> 8\n buf[offset + 5] = lo\n lo = lo >> 8\n buf[offset + 4] = lo\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n buf[offset + 3] = hi\n hi = hi >> 8\n buf[offset + 2] = hi\n hi = hi >> 8\n buf[offset + 1] = hi\n hi = hi >> 8\n buf[offset] = hi\n return offset + 8\n}\n\nBuffer.prototype.writeBigUInt64LE = defineBigIntMethod(function writeBigUInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeBigUInt64BE = defineBigIntMethod(function writeBigUInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n let i = 0\n let mul = 1\n let sub = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n let i = byteLength - 1\n let mul = 1\n let sub = 0\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n if (value < 0) value = 0xff + value + 1\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n this[offset + 2] = (value >>> 16)\n this[offset + 3] = (value >>> 24)\n return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (value < 0) value = 0xffffffff + value + 1\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeBigInt64LE = defineBigIntMethod(function writeBigInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nBuffer.prototype.writeBigInt64BE = defineBigIntMethod(function writeBigInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n }\n ieee754.write(buf, value, offset, littleEndian, 23, 4)\n return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n }\n ieee754.write(buf, value, offset, littleEndian, 52, 8)\n return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n if (!Buffer.isBuffer(target)) throw new TypeError('argument should be a Buffer')\n if (!start) start = 0\n if (!end && end !== 0) end = this.length\n if (targetStart >= target.length) targetStart = target.length\n if (!targetStart) targetStart = 0\n if (end > 0 && end < start) end = start\n\n // Copy 0 bytes; we're done\n if (end === start) return 0\n if (target.length === 0 || this.length === 0) return 0\n\n // Fatal error conditions\n if (targetStart < 0) {\n throw new RangeError('targetStart out of bounds')\n }\n if (start < 0 || start >= this.length) throw new RangeError('Index out of range')\n if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n // Are we oob?\n if (end > this.length) end = this.length\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start\n }\n\n const len = end - start\n\n if (this === target && typeof Uint8Array.prototype.copyWithin === 'function') {\n // Use built-in when available, missing from IE11\n this.copyWithin(targetStart, start, end)\n } else {\n Uint8Array.prototype.set.call(\n target,\n this.subarray(start, end),\n targetStart\n )\n }\n\n return len\n}\n\n// Usage:\n// buffer.fill(number[, offset[, end]])\n// buffer.fill(buffer[, offset[, end]])\n// buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n // Handle string cases:\n if (typeof val === 'string') {\n if (typeof start === 'string') {\n encoding = start\n start = 0\n end = this.length\n } else if (typeof end === 'string') {\n encoding = end\n end = this.length\n }\n if (encoding !== undefined && typeof encoding !== 'string') {\n throw new TypeError('encoding must be a string')\n }\n if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n if (val.length === 1) {\n const code = val.charCodeAt(0)\n if ((encoding === 'utf8' && code < 128) ||\n encoding === 'latin1') {\n // Fast path: If `val` fits into a single byte, use that numeric value.\n val = code\n }\n }\n } else if (typeof val === 'number') {\n val = val & 255\n } else if (typeof val === 'boolean') {\n val = Number(val)\n }\n\n // Invalid ranges are not set to a default, so can range check early.\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError('Out of range index')\n }\n\n if (end <= start) {\n return this\n }\n\n start = start >>> 0\n end = end === undefined ? this.length : end >>> 0\n\n if (!val) val = 0\n\n let i\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val\n }\n } else {\n const bytes = Buffer.isBuffer(val)\n ? val\n : Buffer.from(val, encoding)\n const len = bytes.length\n if (len === 0) {\n throw new TypeError('The value \"' + val +\n '\" is invalid for argument \"value\"')\n }\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len]\n }\n }\n\n return this\n}\n\n// CUSTOM ERRORS\n// =============\n\n// Simplified versions from Node, changed for Buffer-only usage\nconst errors = {}\nfunction E (sym, getMessage, Base) {\n errors[sym] = class NodeError extends Base {\n constructor () {\n super()\n\n Object.defineProperty(this, 'message', {\n value: getMessage.apply(this, arguments),\n writable: true,\n configurable: true\n })\n\n // Add the error code to the name to include it in the stack trace.\n this.name = `${this.name} [${sym}]`\n // Access the stack to generate the error message including the error code\n // from the name.\n this.stack // eslint-disable-line no-unused-expressions\n // Reset the name to the actual name.\n delete this.name\n }\n\n get code () {\n return sym\n }\n\n set code (value) {\n Object.defineProperty(this, 'code', {\n configurable: true,\n enumerable: true,\n value,\n writable: true\n })\n }\n\n toString () {\n return `${this.name} [${sym}]: ${this.message}`\n }\n }\n}\n\nE('ERR_BUFFER_OUT_OF_BOUNDS',\n function (name) {\n if (name) {\n return `${name} is outside of buffer bounds`\n }\n\n return 'Attempt to access memory outside buffer bounds'\n }, RangeError)\nE('ERR_INVALID_ARG_TYPE',\n function (name, actual) {\n return `The \"${name}\" argument must be of type number. Received type ${typeof actual}`\n }, TypeError)\nE('ERR_OUT_OF_RANGE',\n function (str, range, input) {\n let msg = `The value of \"${str}\" is out of range.`\n let received = input\n if (Number.isInteger(input) && Math.abs(input) > 2 ** 32) {\n received = addNumericalSeparator(String(input))\n } else if (typeof input === 'bigint') {\n received = String(input)\n if (input > BigInt(2) ** BigInt(32) || input < -(BigInt(2) ** BigInt(32))) {\n received = addNumericalSeparator(received)\n }\n received += 'n'\n }\n msg += ` It must be ${range}. Received ${received}`\n return msg\n }, RangeError)\n\nfunction addNumericalSeparator (val) {\n let res = ''\n let i = val.length\n const start = val[0] === '-' ? 1 : 0\n for (; i >= start + 4; i -= 3) {\n res = `_${val.slice(i - 3, i)}${res}`\n }\n return `${val.slice(0, i)}${res}`\n}\n\n// CHECK FUNCTIONS\n// ===============\n\nfunction checkBounds (buf, offset, byteLength) {\n validateNumber(offset, 'offset')\n if (buf[offset] === undefined || buf[offset + byteLength] === undefined) {\n boundsError(offset, buf.length - (byteLength + 1))\n }\n}\n\nfunction checkIntBI (value, min, max, buf, offset, byteLength) {\n if (value > max || value < min) {\n const n = typeof min === 'bigint' ? 'n' : ''\n let range\n if (byteLength > 3) {\n if (min === 0 || min === BigInt(0)) {\n range = `>= 0${n} and < 2${n} ** ${(byteLength + 1) * 8}${n}`\n } else {\n range = `>= -(2${n} ** ${(byteLength + 1) * 8 - 1}${n}) and < 2 ** ` +\n `${(byteLength + 1) * 8 - 1}${n}`\n }\n } else {\n range = `>= ${min}${n} and <= ${max}${n}`\n }\n throw new errors.ERR_OUT_OF_RANGE('value', range, value)\n }\n checkBounds(buf, offset, byteLength)\n}\n\nfunction validateNumber (value, name) {\n if (typeof value !== 'number') {\n throw new errors.ERR_INVALID_ARG_TYPE(name, 'number', value)\n }\n}\n\nfunction boundsError (value, length, type) {\n if (Math.floor(value) !== value) {\n validateNumber(value, type)\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset', 'an integer', value)\n }\n\n if (length < 0) {\n throw new errors.ERR_BUFFER_OUT_OF_BOUNDS()\n }\n\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset',\n `>= ${type ? 1 : 0} and <= ${length}`,\n value)\n}\n\n// HELPER FUNCTIONS\n// ================\n\nconst INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n // Node takes equal signs as end of the Base64 encoding\n str = str.split('=')[0]\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = str.trim().replace(INVALID_BASE64_RE, '')\n // Node converts strings with length < 2 to ''\n if (str.length < 2) return ''\n // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n while (str.length % 4 !== 0) {\n str = str + '='\n }\n return str\n}\n\nfunction utf8ToBytes (string, units) {\n units = units || Infinity\n let codePoint\n const length = string.length\n let leadSurrogate = null\n const bytes = []\n\n for (let i = 0; i < length; ++i) {\n codePoint = string.charCodeAt(i)\n\n // is surrogate component\n if (codePoint > 0xD7FF && codePoint < 0xE000) {\n // last char was a lead\n if (!leadSurrogate) {\n // no lead yet\n if (codePoint > 0xDBFF) {\n // unexpected trail\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n } else if (i + 1 === length) {\n // unpaired lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n }\n\n // valid lead\n leadSurrogate = codePoint\n\n continue\n }\n\n // 2 leads in a row\n if (codePoint < 0xDC00) {\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n leadSurrogate = codePoint\n continue\n }\n\n // valid surrogate pair\n codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n } else if (leadSurrogate) {\n // valid bmp char, but last char was a lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n }\n\n leadSurrogate = null\n\n // encode utf8\n if (codePoint < 0x80) {\n if ((units -= 1) < 0) break\n bytes.push(codePoint)\n } else if (codePoint < 0x800) {\n if ((units -= 2) < 0) break\n bytes.push(\n codePoint >> 0x6 | 0xC0,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x10000) {\n if ((units -= 3) < 0) break\n bytes.push(\n codePoint >> 0xC | 0xE0,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x110000) {\n if ((units -= 4) < 0) break\n bytes.push(\n codePoint >> 0x12 | 0xF0,\n codePoint >> 0xC & 0x3F | 0x80,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else {\n throw new Error('Invalid code point')\n }\n }\n\n return bytes\n}\n\nfunction asciiToBytes (str) {\n const byteArray = []\n for (let i = 0; i < str.length; ++i) {\n // Node's code seems to be doing this and not & 0x7F..\n byteArray.push(str.charCodeAt(i) & 0xFF)\n }\n return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n let c, hi, lo\n const byteArray = []\n for (let i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0) break\n\n c = str.charCodeAt(i)\n hi = c >> 8\n lo = c % 256\n byteArray.push(lo)\n byteArray.push(hi)\n }\n\n return byteArray\n}\n\nfunction base64ToBytes (str) {\n return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n let i\n for (i = 0; i < length; ++i) {\n if ((i + offset >= dst.length) || (i >= src.length)) break\n dst[i + offset] = src[i]\n }\n return i\n}\n\n// ArrayBuffer or Uint8Array objects from other contexts (i.e. iframes) do not pass\n// the `instanceof` check but they should be treated as of that type.\n// See: https://github.com/feross/buffer/issues/166\nfunction isInstance (obj, type) {\n return obj instanceof type ||\n (obj != null && obj.constructor != null && obj.constructor.name != null &&\n obj.constructor.name === type.name)\n}\nfunction numberIsNaN (obj) {\n // For IE11 support\n return obj !== obj // eslint-disable-line no-self-compare\n}\n\n// Create lookup table for `toString('hex')`\n// See: https://github.com/feross/buffer/issues/219\nconst hexSliceLookupTable = (function () {\n const alphabet = '0123456789abcdef'\n const table = new Array(256)\n for (let i = 0; i < 16; ++i) {\n const i16 = i * 16\n for (let j = 0; j < 16; ++j) {\n table[i16 + j] = alphabet[i] + alphabet[j]\n }\n }\n return table\n})()\n\n// Return not function with Error if BigInt not supported\nfunction defineBigIntMethod (fn) {\n return typeof BigInt === 'undefined' ? BufferBigIntNotDefined : fn\n}\n\nfunction BufferBigIntNotDefined () {\n throw new Error('BigInt not supported')\n}\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\nvar R = typeof Reflect === 'object' ? Reflect : null\nvar ReflectApply = R && typeof R.apply === 'function'\n ? R.apply\n : function ReflectApply(target, receiver, args) {\n return Function.prototype.apply.call(target, receiver, args);\n }\n\nvar ReflectOwnKeys\nif (R && typeof R.ownKeys === 'function') {\n ReflectOwnKeys = R.ownKeys\n} else if (Object.getOwnPropertySymbols) {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target)\n .concat(Object.getOwnPropertySymbols(target));\n };\n} else {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target);\n };\n}\n\nfunction ProcessEmitWarning(warning) {\n if (console && console.warn) console.warn(warning);\n}\n\nvar NumberIsNaN = Number.isNaN || function NumberIsNaN(value) {\n return value !== value;\n}\n\nfunction EventEmitter() {\n EventEmitter.init.call(this);\n}\nmodule.exports = EventEmitter;\nmodule.exports.once = once;\n\n// Backwards-compat with node 0.10.x\nEventEmitter.EventEmitter = EventEmitter;\n\nEventEmitter.prototype._events = undefined;\nEventEmitter.prototype._eventsCount = 0;\nEventEmitter.prototype._maxListeners = undefined;\n\n// By default EventEmitters will print a warning if more than 10 listeners are\n// added to it. This is a useful default which helps finding memory leaks.\nvar defaultMaxListeners = 10;\n\nfunction checkListener(listener) {\n if (typeof listener !== 'function') {\n throw new TypeError('The \"listener\" argument must be of type Function. Received type ' + typeof listener);\n }\n}\n\nObject.defineProperty(EventEmitter, 'defaultMaxListeners', {\n enumerable: true,\n get: function() {\n return defaultMaxListeners;\n },\n set: function(arg) {\n if (typeof arg !== 'number' || arg < 0 || NumberIsNaN(arg)) {\n throw new RangeError('The value of \"defaultMaxListeners\" is out of range. It must be a non-negative number. Received ' + arg + '.');\n }\n defaultMaxListeners = arg;\n }\n});\n\nEventEmitter.init = function() {\n\n if (this._events === undefined ||\n this._events === Object.getPrototypeOf(this)._events) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n }\n\n this._maxListeners = this._maxListeners || undefined;\n};\n\n// Obviously not all Emitters should be limited to 10. This function allows\n// that to be increased. Set to zero for unlimited.\nEventEmitter.prototype.setMaxListeners = function setMaxListeners(n) {\n if (typeof n !== 'number' || n < 0 || NumberIsNaN(n)) {\n throw new RangeError('The value of \"n\" is out of range. It must be a non-negative number. Received ' + n + '.');\n }\n this._maxListeners = n;\n return this;\n};\n\nfunction _getMaxListeners(that) {\n if (that._maxListeners === undefined)\n return EventEmitter.defaultMaxListeners;\n return that._maxListeners;\n}\n\nEventEmitter.prototype.getMaxListeners = function getMaxListeners() {\n return _getMaxListeners(this);\n};\n\nEventEmitter.prototype.emit = function emit(type) {\n var args = [];\n for (var i = 1; i < arguments.length; i++) args.push(arguments[i]);\n var doError = (type === 'error');\n\n var events = this._events;\n if (events !== undefined)\n doError = (doError && events.error === undefined);\n else if (!doError)\n return false;\n\n // If there is no 'error' event listener then throw.\n if (doError) {\n var er;\n if (args.length > 0)\n er = args[0];\n if (er instanceof Error) {\n // Note: The comments on the `throw` lines are intentional, they show\n // up in Node's output if this results in an unhandled exception.\n throw er; // Unhandled 'error' event\n }\n // At least give some kind of context to the user\n var err = new Error('Unhandled error.' + (er ? ' (' + er.message + ')' : ''));\n err.context = er;\n throw err; // Unhandled 'error' event\n }\n\n var handler = events[type];\n\n if (handler === undefined)\n return false;\n\n if (typeof handler === 'function') {\n ReflectApply(handler, this, args);\n } else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n ReflectApply(listeners[i], this, args);\n }\n\n return true;\n};\n\nfunction _addListener(target, type, listener, prepend) {\n var m;\n var events;\n var existing;\n\n checkListener(listener);\n\n events = target._events;\n if (events === undefined) {\n events = target._events = Object.create(null);\n target._eventsCount = 0;\n } else {\n // To avoid recursion in the case that type === \"newListener\"! Before\n // adding it to the listeners, first emit \"newListener\".\n if (events.newListener !== undefined) {\n target.emit('newListener', type,\n listener.listener ? listener.listener : listener);\n\n // Re-assign `events` because a newListener handler could have caused the\n // this._events to be assigned to a new object\n events = target._events;\n }\n existing = events[type];\n }\n\n if (existing === undefined) {\n // Optimize the case of one listener. Don't need the extra array object.\n existing = events[type] = listener;\n ++target._eventsCount;\n } else {\n if (typeof existing === 'function') {\n // Adding the second element, need to change to array.\n existing = events[type] =\n prepend ? [listener, existing] : [existing, listener];\n // If we've already got an array, just append.\n } else if (prepend) {\n existing.unshift(listener);\n } else {\n existing.push(listener);\n }\n\n // Check for listener leak\n m = _getMaxListeners(target);\n if (m > 0 && existing.length > m && !existing.warned) {\n existing.warned = true;\n // No error code for this since it is a Warning\n // eslint-disable-next-line no-restricted-syntax\n var w = new Error('Possible EventEmitter memory leak detected. ' +\n existing.length + ' ' + String(type) + ' listeners ' +\n 'added. Use emitter.setMaxListeners() to ' +\n 'increase limit');\n w.name = 'MaxListenersExceededWarning';\n w.emitter = target;\n w.type = type;\n w.count = existing.length;\n ProcessEmitWarning(w);\n }\n }\n\n return target;\n}\n\nEventEmitter.prototype.addListener = function addListener(type, listener) {\n return _addListener(this, type, listener, false);\n};\n\nEventEmitter.prototype.on = EventEmitter.prototype.addListener;\n\nEventEmitter.prototype.prependListener =\n function prependListener(type, listener) {\n return _addListener(this, type, listener, true);\n };\n\nfunction onceWrapper() {\n if (!this.fired) {\n this.target.removeListener(this.type, this.wrapFn);\n this.fired = true;\n if (arguments.length === 0)\n return this.listener.call(this.target);\n return this.listener.apply(this.target, arguments);\n }\n}\n\nfunction _onceWrap(target, type, listener) {\n var state = { fired: false, wrapFn: undefined, target: target, type: type, listener: listener };\n var wrapped = onceWrapper.bind(state);\n wrapped.listener = listener;\n state.wrapFn = wrapped;\n return wrapped;\n}\n\nEventEmitter.prototype.once = function once(type, listener) {\n checkListener(listener);\n this.on(type, _onceWrap(this, type, listener));\n return this;\n};\n\nEventEmitter.prototype.prependOnceListener =\n function prependOnceListener(type, listener) {\n checkListener(listener);\n this.prependListener(type, _onceWrap(this, type, listener));\n return this;\n };\n\n// Emits a 'removeListener' event if and only if the listener was removed.\nEventEmitter.prototype.removeListener =\n function removeListener(type, listener) {\n var list, events, position, i, originalListener;\n\n checkListener(listener);\n\n events = this._events;\n if (events === undefined)\n return this;\n\n list = events[type];\n if (list === undefined)\n return this;\n\n if (list === listener || list.listener === listener) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else {\n delete events[type];\n if (events.removeListener)\n this.emit('removeListener', type, list.listener || listener);\n }\n } else if (typeof list !== 'function') {\n position = -1;\n\n for (i = list.length - 1; i >= 0; i--) {\n if (list[i] === listener || list[i].listener === listener) {\n originalListener = list[i].listener;\n position = i;\n break;\n }\n }\n\n if (position < 0)\n return this;\n\n if (position === 0)\n list.shift();\n else {\n spliceOne(list, position);\n }\n\n if (list.length === 1)\n events[type] = list[0];\n\n if (events.removeListener !== undefined)\n this.emit('removeListener', type, originalListener || listener);\n }\n\n return this;\n };\n\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\n\nEventEmitter.prototype.removeAllListeners =\n function removeAllListeners(type) {\n var listeners, events, i;\n\n events = this._events;\n if (events === undefined)\n return this;\n\n // not listening for removeListener, no need to emit\n if (events.removeListener === undefined) {\n if (arguments.length === 0) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n } else if (events[type] !== undefined) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else\n delete events[type];\n }\n return this;\n }\n\n // emit removeListener for all listeners on all events\n if (arguments.length === 0) {\n var keys = Object.keys(events);\n var key;\n for (i = 0; i < keys.length; ++i) {\n key = keys[i];\n if (key === 'removeListener') continue;\n this.removeAllListeners(key);\n }\n this.removeAllListeners('removeListener');\n this._events = Object.create(null);\n this._eventsCount = 0;\n return this;\n }\n\n listeners = events[type];\n\n if (typeof listeners === 'function') {\n this.removeListener(type, listeners);\n } else if (listeners !== undefined) {\n // LIFO order\n for (i = listeners.length - 1; i >= 0; i--) {\n this.removeListener(type, listeners[i]);\n }\n }\n\n return this;\n };\n\nfunction _listeners(target, type, unwrap) {\n var events = target._events;\n\n if (events === undefined)\n return [];\n\n var evlistener = events[type];\n if (evlistener === undefined)\n return [];\n\n if (typeof evlistener === 'function')\n return unwrap ? [evlistener.listener || evlistener] : [evlistener];\n\n return unwrap ?\n unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length);\n}\n\nEventEmitter.prototype.listeners = function listeners(type) {\n return _listeners(this, type, true);\n};\n\nEventEmitter.prototype.rawListeners = function rawListeners(type) {\n return _listeners(this, type, false);\n};\n\nEventEmitter.listenerCount = function(emitter, type) {\n if (typeof emitter.listenerCount === 'function') {\n return emitter.listenerCount(type);\n } else {\n return listenerCount.call(emitter, type);\n }\n};\n\nEventEmitter.prototype.listenerCount = listenerCount;\nfunction listenerCount(type) {\n var events = this._events;\n\n if (events !== undefined) {\n var evlistener = events[type];\n\n if (typeof evlistener === 'function') {\n return 1;\n } else if (evlistener !== undefined) {\n return evlistener.length;\n }\n }\n\n return 0;\n}\n\nEventEmitter.prototype.eventNames = function eventNames() {\n return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : [];\n};\n\nfunction arrayClone(arr, n) {\n var copy = new Array(n);\n for (var i = 0; i < n; ++i)\n copy[i] = arr[i];\n return copy;\n}\n\nfunction spliceOne(list, index) {\n for (; index + 1 < list.length; index++)\n list[index] = list[index + 1];\n list.pop();\n}\n\nfunction unwrapListeners(arr) {\n var ret = new Array(arr.length);\n for (var i = 0; i < ret.length; ++i) {\n ret[i] = arr[i].listener || arr[i];\n }\n return ret;\n}\n\nfunction once(emitter, name) {\n return new Promise(function (resolve, reject) {\n function errorListener(err) {\n emitter.removeListener(name, resolver);\n reject(err);\n }\n\n function resolver() {\n if (typeof emitter.removeListener === 'function') {\n emitter.removeListener('error', errorListener);\n }\n resolve([].slice.call(arguments));\n };\n\n eventTargetAgnosticAddListener(emitter, name, resolver, { once: true });\n if (name !== 'error') {\n addErrorHandlerIfEventEmitter(emitter, errorListener, { once: true });\n }\n });\n}\n\nfunction addErrorHandlerIfEventEmitter(emitter, handler, flags) {\n if (typeof emitter.on === 'function') {\n eventTargetAgnosticAddListener(emitter, 'error', handler, flags);\n }\n}\n\nfunction eventTargetAgnosticAddListener(emitter, name, listener, flags) {\n if (typeof emitter.on === 'function') {\n if (flags.once) {\n emitter.once(name, listener);\n } else {\n emitter.on(name, listener);\n }\n } else if (typeof emitter.addEventListener === 'function') {\n // EventTarget does not have `error` event semantics like Node\n // EventEmitters, we do not listen for `error` events here.\n emitter.addEventListener(name, function wrapListener(arg) {\n // IE does not have builtin `{ once: true }` support so we\n // have to do it manually.\n if (flags.once) {\n emitter.removeEventListener(name, wrapListener);\n }\n listener(arg);\n });\n } else {\n throw new TypeError('The \"emitter\" argument must be of type EventEmitter. Received type ' + typeof emitter);\n }\n}\n","/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */\nexports.read = function (buffer, offset, isLE, mLen, nBytes) {\n var e, m\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var nBits = -7\n var i = isLE ? (nBytes - 1) : 0\n var d = isLE ? -1 : 1\n var s = buffer[offset + i]\n\n i += d\n\n e = s & ((1 << (-nBits)) - 1)\n s >>= (-nBits)\n nBits += eLen\n for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & ((1 << (-nBits)) - 1)\n e >>= (-nBits)\n nBits += mLen\n for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias\n } else if (e === eMax) {\n return m ? NaN : ((s ? -1 : 1) * Infinity)\n } else {\n m = m + Math.pow(2, mLen)\n e = e - eBias\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n var i = isLE ? 0 : (nBytes - 1)\n var d = isLE ? 1 : -1\n var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n value = Math.abs(value)\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0\n e = eMax\n } else {\n e = Math.floor(Math.log(value) / Math.LN2)\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--\n c *= 2\n }\n if (e + eBias >= 1) {\n value += rt / c\n } else {\n value += rt * Math.pow(2, 1 - eBias)\n }\n if (value * c >= 2) {\n e++\n c /= 2\n }\n\n if (e + eBias >= eMax) {\n m = 0\n e = eMax\n } else if (e + eBias >= 1) {\n m = ((value * c) - 1) * Math.pow(2, mLen)\n e = e + eBias\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n e = 0\n }\n }\n\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n e = (e << mLen) | m\n eLen += mLen\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128\n}\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView');\n\nmodule.exports = DataView;\n","var hashClear = require('./_hashClear'),\n hashDelete = require('./_hashDelete'),\n hashGet = require('./_hashGet'),\n hashHas = require('./_hashHas'),\n hashSet = require('./_hashSet');\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\nmodule.exports = Hash;\n","var listCacheClear = require('./_listCacheClear'),\n listCacheDelete = require('./_listCacheDelete'),\n listCacheGet = require('./_listCacheGet'),\n listCacheHas = require('./_listCacheHas'),\n listCacheSet = require('./_listCacheSet');\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\nmodule.exports = ListCache;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map');\n\nmodule.exports = Map;\n","var mapCacheClear = require('./_mapCacheClear'),\n mapCacheDelete = require('./_mapCacheDelete'),\n mapCacheGet = require('./_mapCacheGet'),\n mapCacheHas = require('./_mapCacheHas'),\n mapCacheSet = require('./_mapCacheSet');\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\nmodule.exports = MapCache;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Promise = getNative(root, 'Promise');\n\nmodule.exports = Promise;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Set = getNative(root, 'Set');\n\nmodule.exports = Set;\n","var MapCache = require('./_MapCache'),\n setCacheAdd = require('./_setCacheAdd'),\n setCacheHas = require('./_setCacheHas');\n\n/**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\nfunction SetCache(values) {\n var index = -1,\n length = values == null ? 0 : values.length;\n\n this.__data__ = new MapCache;\n while (++index < length) {\n this.add(values[index]);\n }\n}\n\n// Add methods to `SetCache`.\nSetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\nSetCache.prototype.has = setCacheHas;\n\nmodule.exports = SetCache;\n","var ListCache = require('./_ListCache'),\n stackClear = require('./_stackClear'),\n stackDelete = require('./_stackDelete'),\n stackGet = require('./_stackGet'),\n stackHas = require('./_stackHas'),\n stackSet = require('./_stackSet');\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\nmodule.exports = Stack;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Uint8Array = root.Uint8Array;\n\nmodule.exports = Uint8Array;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar WeakMap = getNative(root, 'WeakMap');\n\nmodule.exports = WeakMap;\n","/**\n * A specialized version of `_.forEach` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\nfunction arrayEach(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (iteratee(array[index], index, array) === false) {\n break;\n }\n }\n return array;\n}\n\nmodule.exports = arrayEach;\n","/**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\nfunction arrayFilter(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result[resIndex++] = value;\n }\n }\n return result;\n}\n\nmodule.exports = arrayFilter;\n","var baseTimes = require('./_baseTimes'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isIndex = require('./_isIndex'),\n isTypedArray = require('./isTypedArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = arrayLikeKeys;\n","/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n}\n\nmodule.exports = arrayPush;\n","/**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\nfunction arraySome(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (predicate(array[index], index, array)) {\n return true;\n }\n }\n return false;\n}\n\nmodule.exports = arraySome;\n","var baseAssignValue = require('./_baseAssignValue'),\n eq = require('./eq');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\nmodule.exports = assignValue;\n","var eq = require('./eq');\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\nmodule.exports = assocIndexOf;\n","var copyObject = require('./_copyObject'),\n keys = require('./keys');\n\n/**\n * The base implementation of `_.assign` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssign(object, source) {\n return object && copyObject(source, keys(source), object);\n}\n\nmodule.exports = baseAssign;\n","var copyObject = require('./_copyObject'),\n keysIn = require('./keysIn');\n\n/**\n * The base implementation of `_.assignIn` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssignIn(object, source) {\n return object && copyObject(source, keysIn(source), object);\n}\n\nmodule.exports = baseAssignIn;\n","var defineProperty = require('./_defineProperty');\n\n/**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction baseAssignValue(object, key, value) {\n if (key == '__proto__' && defineProperty) {\n defineProperty(object, key, {\n 'configurable': true,\n 'enumerable': true,\n 'value': value,\n 'writable': true\n });\n } else {\n object[key] = value;\n }\n}\n\nmodule.exports = baseAssignValue;\n","var Stack = require('./_Stack'),\n arrayEach = require('./_arrayEach'),\n assignValue = require('./_assignValue'),\n baseAssign = require('./_baseAssign'),\n baseAssignIn = require('./_baseAssignIn'),\n cloneBuffer = require('./_cloneBuffer'),\n copyArray = require('./_copyArray'),\n copySymbols = require('./_copySymbols'),\n copySymbolsIn = require('./_copySymbolsIn'),\n getAllKeys = require('./_getAllKeys'),\n getAllKeysIn = require('./_getAllKeysIn'),\n getTag = require('./_getTag'),\n initCloneArray = require('./_initCloneArray'),\n initCloneByTag = require('./_initCloneByTag'),\n initCloneObject = require('./_initCloneObject'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isMap = require('./isMap'),\n isObject = require('./isObject'),\n isSet = require('./isSet'),\n keys = require('./keys'),\n keysIn = require('./keysIn');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_FLAT_FLAG = 2,\n CLONE_SYMBOLS_FLAG = 4;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values supported by `_.clone`. */\nvar cloneableTags = {};\ncloneableTags[argsTag] = cloneableTags[arrayTag] =\ncloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =\ncloneableTags[boolTag] = cloneableTags[dateTag] =\ncloneableTags[float32Tag] = cloneableTags[float64Tag] =\ncloneableTags[int8Tag] = cloneableTags[int16Tag] =\ncloneableTags[int32Tag] = cloneableTags[mapTag] =\ncloneableTags[numberTag] = cloneableTags[objectTag] =\ncloneableTags[regexpTag] = cloneableTags[setTag] =\ncloneableTags[stringTag] = cloneableTags[symbolTag] =\ncloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =\ncloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;\ncloneableTags[errorTag] = cloneableTags[funcTag] =\ncloneableTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.clone` and `_.cloneDeep` which tracks\n * traversed objects.\n *\n * @private\n * @param {*} value The value to clone.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Deep clone\n * 2 - Flatten inherited properties\n * 4 - Clone symbols\n * @param {Function} [customizer] The function to customize cloning.\n * @param {string} [key] The key of `value`.\n * @param {Object} [object] The parent object of `value`.\n * @param {Object} [stack] Tracks traversed objects and their clone counterparts.\n * @returns {*} Returns the cloned value.\n */\nfunction baseClone(value, bitmask, customizer, key, object, stack) {\n var result,\n isDeep = bitmask & CLONE_DEEP_FLAG,\n isFlat = bitmask & CLONE_FLAT_FLAG,\n isFull = bitmask & CLONE_SYMBOLS_FLAG;\n\n if (customizer) {\n result = object ? customizer(value, key, object, stack) : customizer(value);\n }\n if (result !== undefined) {\n return result;\n }\n if (!isObject(value)) {\n return value;\n }\n var isArr = isArray(value);\n if (isArr) {\n result = initCloneArray(value);\n if (!isDeep) {\n return copyArray(value, result);\n }\n } else {\n var tag = getTag(value),\n isFunc = tag == funcTag || tag == genTag;\n\n if (isBuffer(value)) {\n return cloneBuffer(value, isDeep);\n }\n if (tag == objectTag || tag == argsTag || (isFunc && !object)) {\n result = (isFlat || isFunc) ? {} : initCloneObject(value);\n if (!isDeep) {\n return isFlat\n ? copySymbolsIn(value, baseAssignIn(result, value))\n : copySymbols(value, baseAssign(result, value));\n }\n } else {\n if (!cloneableTags[tag]) {\n return object ? value : {};\n }\n result = initCloneByTag(value, tag, isDeep);\n }\n }\n // Check for circular references and return its corresponding clone.\n stack || (stack = new Stack);\n var stacked = stack.get(value);\n if (stacked) {\n return stacked;\n }\n stack.set(value, result);\n\n if (isSet(value)) {\n value.forEach(function(subValue) {\n result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));\n });\n } else if (isMap(value)) {\n value.forEach(function(subValue, key) {\n result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n }\n\n var keysFunc = isFull\n ? (isFlat ? getAllKeysIn : getAllKeys)\n : (isFlat ? keysIn : keys);\n\n var props = isArr ? undefined : keysFunc(value);\n arrayEach(props || value, function(subValue, key) {\n if (props) {\n key = subValue;\n subValue = value[key];\n }\n // Recursively populate clone (susceptible to call stack limits).\n assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n return result;\n}\n\nmodule.exports = baseClone;\n","var isObject = require('./isObject');\n\n/** Built-in value references. */\nvar objectCreate = Object.create;\n\n/**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} proto The object to inherit from.\n * @returns {Object} Returns the new object.\n */\nvar baseCreate = (function() {\n function object() {}\n return function(proto) {\n if (!isObject(proto)) {\n return {};\n }\n if (objectCreate) {\n return objectCreate(proto);\n }\n object.prototype = proto;\n var result = new object;\n object.prototype = undefined;\n return result;\n };\n}());\n\nmodule.exports = baseCreate;\n","var arrayPush = require('./_arrayPush'),\n isArray = require('./isArray');\n\n/**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction baseGetAllKeys(object, keysFunc, symbolsFunc) {\n var result = keysFunc(object);\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n}\n\nmodule.exports = baseGetAllKeys;\n","var Symbol = require('./_Symbol'),\n getRawTag = require('./_getRawTag'),\n objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]';\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\nmodule.exports = baseIsArguments;\n","var baseIsEqualDeep = require('./_baseIsEqualDeep'),\n isObjectLike = require('./isObjectLike');\n\n/**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Unordered comparison\n * 2 - Partial comparison\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\nfunction baseIsEqual(value, other, bitmask, customizer, stack) {\n if (value === other) {\n return true;\n }\n if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\n return value !== value && other !== other;\n }\n return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n}\n\nmodule.exports = baseIsEqual;\n","var Stack = require('./_Stack'),\n equalArrays = require('./_equalArrays'),\n equalByTag = require('./_equalByTag'),\n equalObjects = require('./_equalObjects'),\n getTag = require('./_getTag'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isTypedArray = require('./isTypedArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n var objIsArr = isArray(object),\n othIsArr = isArray(other),\n objTag = objIsArr ? arrayTag : getTag(object),\n othTag = othIsArr ? arrayTag : getTag(other);\n\n objTag = objTag == argsTag ? objectTag : objTag;\n othTag = othTag == argsTag ? objectTag : othTag;\n\n var objIsObj = objTag == objectTag,\n othIsObj = othTag == objectTag,\n isSameTag = objTag == othTag;\n\n if (isSameTag && isBuffer(object)) {\n if (!isBuffer(other)) {\n return false;\n }\n objIsArr = true;\n objIsObj = false;\n }\n if (isSameTag && !objIsObj) {\n stack || (stack = new Stack);\n return (objIsArr || isTypedArray(object))\n ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n }\n if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n if (objIsWrapped || othIsWrapped) {\n var objUnwrapped = objIsWrapped ? object.value() : object,\n othUnwrapped = othIsWrapped ? other.value() : other;\n\n stack || (stack = new Stack);\n return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n }\n }\n if (!isSameTag) {\n return false;\n }\n stack || (stack = new Stack);\n return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n}\n\nmodule.exports = baseIsEqualDeep;\n","var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]';\n\n/**\n * The base implementation of `_.isMap` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n */\nfunction baseIsMap(value) {\n return isObjectLike(value) && getTag(value) == mapTag;\n}\n\nmodule.exports = baseIsMap;\n","var isFunction = require('./isFunction'),\n isMasked = require('./_isMasked'),\n isObject = require('./isObject'),\n toSource = require('./_toSource');\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\nmodule.exports = baseIsNative;\n","var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar setTag = '[object Set]';\n\n/**\n * The base implementation of `_.isSet` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n */\nfunction baseIsSet(value) {\n return isObjectLike(value) && getTag(value) == setTag;\n}\n\nmodule.exports = baseIsSet;\n","var baseGetTag = require('./_baseGetTag'),\n isLength = require('./isLength'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n\nmodule.exports = baseIsTypedArray;\n","var isPrototype = require('./_isPrototype'),\n nativeKeys = require('./_nativeKeys');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeys;\n","var isObject = require('./isObject'),\n isPrototype = require('./_isPrototype'),\n nativeKeysIn = require('./_nativeKeysIn');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeysIn(object) {\n if (!isObject(object)) {\n return nativeKeysIn(object);\n }\n var isProto = isPrototype(object),\n result = [];\n\n for (var key in object) {\n if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeysIn;\n","/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\nmodule.exports = baseTimes;\n","/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n return function(value) {\n return func(value);\n };\n}\n\nmodule.exports = baseUnary;\n","/**\n * Checks if a `cache` value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction cacheHas(cache, key) {\n return cache.has(key);\n}\n\nmodule.exports = cacheHas;\n","var Uint8Array = require('./_Uint8Array');\n\n/**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\nfunction cloneArrayBuffer(arrayBuffer) {\n var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n return result;\n}\n\nmodule.exports = cloneArrayBuffer;\n","var root = require('./_root');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined,\n allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;\n\n/**\n * Creates a clone of `buffer`.\n *\n * @private\n * @param {Buffer} buffer The buffer to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Buffer} Returns the cloned buffer.\n */\nfunction cloneBuffer(buffer, isDeep) {\n if (isDeep) {\n return buffer.slice();\n }\n var length = buffer.length,\n result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\n\n buffer.copy(result);\n return result;\n}\n\nmodule.exports = cloneBuffer;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer');\n\n/**\n * Creates a clone of `dataView`.\n *\n * @private\n * @param {Object} dataView The data view to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned data view.\n */\nfunction cloneDataView(dataView, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;\n return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);\n}\n\nmodule.exports = cloneDataView;\n","/** Used to match `RegExp` flags from their coerced string values. */\nvar reFlags = /\\w*$/;\n\n/**\n * Creates a clone of `regexp`.\n *\n * @private\n * @param {Object} regexp The regexp to clone.\n * @returns {Object} Returns the cloned regexp.\n */\nfunction cloneRegExp(regexp) {\n var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));\n result.lastIndex = regexp.lastIndex;\n return result;\n}\n\nmodule.exports = cloneRegExp;\n","var Symbol = require('./_Symbol');\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * Creates a clone of the `symbol` object.\n *\n * @private\n * @param {Object} symbol The symbol object to clone.\n * @returns {Object} Returns the cloned symbol object.\n */\nfunction cloneSymbol(symbol) {\n return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};\n}\n\nmodule.exports = cloneSymbol;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer');\n\n/**\n * Creates a clone of `typedArray`.\n *\n * @private\n * @param {Object} typedArray The typed array to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned typed array.\n */\nfunction cloneTypedArray(typedArray, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n}\n\nmodule.exports = cloneTypedArray;\n","/**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\nfunction copyArray(source, array) {\n var index = -1,\n length = source.length;\n\n array || (array = Array(length));\n while (++index < length) {\n array[index] = source[index];\n }\n return array;\n}\n\nmodule.exports = copyArray;\n","var assignValue = require('./_assignValue'),\n baseAssignValue = require('./_baseAssignValue');\n\n/**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\nfunction copyObject(source, props, object, customizer) {\n var isNew = !object;\n object || (object = {});\n\n var index = -1,\n length = props.length;\n\n while (++index < length) {\n var key = props[index];\n\n var newValue = customizer\n ? customizer(object[key], source[key], key, object, source)\n : undefined;\n\n if (newValue === undefined) {\n newValue = source[key];\n }\n if (isNew) {\n baseAssignValue(object, key, newValue);\n } else {\n assignValue(object, key, newValue);\n }\n }\n return object;\n}\n\nmodule.exports = copyObject;\n","var copyObject = require('./_copyObject'),\n getSymbols = require('./_getSymbols');\n\n/**\n * Copies own symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbols(source, object) {\n return copyObject(source, getSymbols(source), object);\n}\n\nmodule.exports = copySymbols;\n","var copyObject = require('./_copyObject'),\n getSymbolsIn = require('./_getSymbolsIn');\n\n/**\n * Copies own and inherited symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbolsIn(source, object) {\n return copyObject(source, getSymbolsIn(source), object);\n}\n\nmodule.exports = copySymbolsIn;\n","var root = require('./_root');\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\nmodule.exports = coreJsData;\n","var getNative = require('./_getNative');\n\nvar defineProperty = (function() {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n}());\n\nmodule.exports = defineProperty;\n","var SetCache = require('./_SetCache'),\n arraySome = require('./_arraySome'),\n cacheHas = require('./_cacheHas');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\nfunction equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n arrLength = array.length,\n othLength = other.length;\n\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n return false;\n }\n // Check that cyclic values are equal.\n var arrStacked = stack.get(array);\n var othStacked = stack.get(other);\n if (arrStacked && othStacked) {\n return arrStacked == other && othStacked == array;\n }\n var index = -1,\n result = true,\n seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n stack.set(array, other);\n stack.set(other, array);\n\n // Ignore non-index properties.\n while (++index < arrLength) {\n var arrValue = array[index],\n othValue = other[index];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, arrValue, index, other, array, stack)\n : customizer(arrValue, othValue, index, array, other, stack);\n }\n if (compared !== undefined) {\n if (compared) {\n continue;\n }\n result = false;\n break;\n }\n // Recursively compare arrays (susceptible to call stack limits).\n if (seen) {\n if (!arraySome(other, function(othValue, othIndex) {\n if (!cacheHas(seen, othIndex) &&\n (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n return seen.push(othIndex);\n }\n })) {\n result = false;\n break;\n }\n } else if (!(\n arrValue === othValue ||\n equalFunc(arrValue, othValue, bitmask, customizer, stack)\n )) {\n result = false;\n break;\n }\n }\n stack['delete'](array);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalArrays;\n","var Symbol = require('./_Symbol'),\n Uint8Array = require('./_Uint8Array'),\n eq = require('./eq'),\n equalArrays = require('./_equalArrays'),\n mapToArray = require('./_mapToArray'),\n setToArray = require('./_setToArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]';\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n switch (tag) {\n case dataViewTag:\n if ((object.byteLength != other.byteLength) ||\n (object.byteOffset != other.byteOffset)) {\n return false;\n }\n object = object.buffer;\n other = other.buffer;\n\n case arrayBufferTag:\n if ((object.byteLength != other.byteLength) ||\n !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n return false;\n }\n return true;\n\n case boolTag:\n case dateTag:\n case numberTag:\n // Coerce booleans to `1` or `0` and dates to milliseconds.\n // Invalid dates are coerced to `NaN`.\n return eq(+object, +other);\n\n case errorTag:\n return object.name == other.name && object.message == other.message;\n\n case regexpTag:\n case stringTag:\n // Coerce regexes to strings and treat strings, primitives and objects,\n // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n // for more details.\n return object == (other + '');\n\n case mapTag:\n var convert = mapToArray;\n\n case setTag:\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n convert || (convert = setToArray);\n\n if (object.size != other.size && !isPartial) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked) {\n return stacked == other;\n }\n bitmask |= COMPARE_UNORDERED_FLAG;\n\n // Recursively compare objects (susceptible to call stack limits).\n stack.set(object, other);\n var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n stack['delete'](object);\n return result;\n\n case symbolTag:\n if (symbolValueOf) {\n return symbolValueOf.call(object) == symbolValueOf.call(other);\n }\n }\n return false;\n}\n\nmodule.exports = equalByTag;\n","var getAllKeys = require('./_getAllKeys');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n objProps = getAllKeys(object),\n objLength = objProps.length,\n othProps = getAllKeys(other),\n othLength = othProps.length;\n\n if (objLength != othLength && !isPartial) {\n return false;\n }\n var index = objLength;\n while (index--) {\n var key = objProps[index];\n if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n return false;\n }\n }\n // Check that cyclic values are equal.\n var objStacked = stack.get(object);\n var othStacked = stack.get(other);\n if (objStacked && othStacked) {\n return objStacked == other && othStacked == object;\n }\n var result = true;\n stack.set(object, other);\n stack.set(other, object);\n\n var skipCtor = isPartial;\n while (++index < objLength) {\n key = objProps[index];\n var objValue = object[key],\n othValue = other[key];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, objValue, key, other, object, stack)\n : customizer(objValue, othValue, key, object, other, stack);\n }\n // Recursively compare objects (susceptible to call stack limits).\n if (!(compared === undefined\n ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n : compared\n )) {\n result = false;\n break;\n }\n skipCtor || (skipCtor = key == 'constructor');\n }\n if (result && !skipCtor) {\n var objCtor = object.constructor,\n othCtor = other.constructor;\n\n // Non `Object` object instances with different constructors are not equal.\n if (objCtor != othCtor &&\n ('constructor' in object && 'constructor' in other) &&\n !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n result = false;\n }\n }\n stack['delete'](object);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalObjects;\n","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n","var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbols = require('./_getSymbols'),\n keys = require('./keys');\n\n/**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeys(object) {\n return baseGetAllKeys(object, keys, getSymbols);\n}\n\nmodule.exports = getAllKeys;\n","var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbolsIn = require('./_getSymbolsIn'),\n keysIn = require('./keysIn');\n\n/**\n * Creates an array of own and inherited enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeysIn(object) {\n return baseGetAllKeys(object, keysIn, getSymbolsIn);\n}\n\nmodule.exports = getAllKeysIn;\n","var isKeyable = require('./_isKeyable');\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\nmodule.exports = getMapData;\n","var baseIsNative = require('./_baseIsNative'),\n getValue = require('./_getValue');\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\nmodule.exports = getNative;\n","var overArg = require('./_overArg');\n\n/** Built-in value references. */\nvar getPrototype = overArg(Object.getPrototypeOf, Object);\n\nmodule.exports = getPrototype;\n","var Symbol = require('./_Symbol');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nmodule.exports = getRawTag;\n","var arrayFilter = require('./_arrayFilter'),\n stubArray = require('./stubArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n if (object == null) {\n return [];\n }\n object = Object(object);\n return arrayFilter(nativeGetSymbols(object), function(symbol) {\n return propertyIsEnumerable.call(object, symbol);\n });\n};\n\nmodule.exports = getSymbols;\n","var arrayPush = require('./_arrayPush'),\n getPrototype = require('./_getPrototype'),\n getSymbols = require('./_getSymbols'),\n stubArray = require('./stubArray');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own and inherited enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {\n var result = [];\n while (object) {\n arrayPush(result, getSymbols(object));\n object = getPrototype(object);\n }\n return result;\n};\n\nmodule.exports = getSymbolsIn;\n","var DataView = require('./_DataView'),\n Map = require('./_Map'),\n Promise = require('./_Promise'),\n Set = require('./_Set'),\n WeakMap = require('./_WeakMap'),\n baseGetTag = require('./_baseGetTag'),\n toSource = require('./_toSource');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n setTag = '[object Set]',\n weakMapTag = '[object WeakMap]';\n\nvar dataViewTag = '[object DataView]';\n\n/** Used to detect maps, sets, and weakmaps. */\nvar dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nvar getTag = baseGetTag;\n\n// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\nif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = baseGetTag(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : '';\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n}\n\nmodule.exports = getTag;\n","/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\nmodule.exports = getValue;\n","var nativeCreate = require('./_nativeCreate');\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n}\n\nmodule.exports = hashClear;\n","/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = hashDelete;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\nmodule.exports = hashGet;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\nmodule.exports = hashHas;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\nmodule.exports = hashSet;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Initializes an array clone.\n *\n * @private\n * @param {Array} array The array to clone.\n * @returns {Array} Returns the initialized clone.\n */\nfunction initCloneArray(array) {\n var length = array.length,\n result = new array.constructor(length);\n\n // Add properties assigned by `RegExp#exec`.\n if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {\n result.index = array.index;\n result.input = array.input;\n }\n return result;\n}\n\nmodule.exports = initCloneArray;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer'),\n cloneDataView = require('./_cloneDataView'),\n cloneRegExp = require('./_cloneRegExp'),\n cloneSymbol = require('./_cloneSymbol'),\n cloneTypedArray = require('./_cloneTypedArray');\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/**\n * Initializes an object clone based on its `toStringTag`.\n *\n * **Note:** This function only supports cloning values with tags of\n * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.\n *\n * @private\n * @param {Object} object The object to clone.\n * @param {string} tag The `toStringTag` of the object to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneByTag(object, tag, isDeep) {\n var Ctor = object.constructor;\n switch (tag) {\n case arrayBufferTag:\n return cloneArrayBuffer(object);\n\n case boolTag:\n case dateTag:\n return new Ctor(+object);\n\n case dataViewTag:\n return cloneDataView(object, isDeep);\n\n case float32Tag: case float64Tag:\n case int8Tag: case int16Tag: case int32Tag:\n case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:\n return cloneTypedArray(object, isDeep);\n\n case mapTag:\n return new Ctor;\n\n case numberTag:\n case stringTag:\n return new Ctor(object);\n\n case regexpTag:\n return cloneRegExp(object);\n\n case setTag:\n return new Ctor;\n\n case symbolTag:\n return cloneSymbol(object);\n }\n}\n\nmodule.exports = initCloneByTag;\n","var baseCreate = require('./_baseCreate'),\n getPrototype = require('./_getPrototype'),\n isPrototype = require('./_isPrototype');\n\n/**\n * Initializes an object clone.\n *\n * @private\n * @param {Object} object The object to clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneObject(object) {\n return (typeof object.constructor == 'function' && !isPrototype(object))\n ? baseCreate(getPrototype(object))\n : {};\n}\n\nmodule.exports = initCloneObject;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n var type = typeof value;\n length = length == null ? MAX_SAFE_INTEGER : length;\n\n return !!length &&\n (type == 'number' ||\n (type != 'symbol' && reIsUint.test(value))) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\nmodule.exports = isIndex;\n","/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\nmodule.exports = isKeyable;\n","var coreJsData = require('./_coreJsData');\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\nmodule.exports = isMasked;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\nmodule.exports = isPrototype;\n","/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n}\n\nmodule.exports = listCacheClear;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype;\n\n/** Built-in value references. */\nvar splice = arrayProto.splice;\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n}\n\nmodule.exports = listCacheDelete;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\nmodule.exports = listCacheGet;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\nmodule.exports = listCacheHas;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\nmodule.exports = listCacheSet;\n","var Hash = require('./_Hash'),\n ListCache = require('./_ListCache'),\n Map = require('./_Map');\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\nmodule.exports = mapCacheClear;\n","var getMapData = require('./_getMapData');\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = mapCacheDelete;\n","var getMapData = require('./_getMapData');\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\nmodule.exports = mapCacheGet;\n","var getMapData = require('./_getMapData');\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\nmodule.exports = mapCacheHas;\n","var getMapData = require('./_getMapData');\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n}\n\nmodule.exports = mapCacheSet;\n","/**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\nfunction mapToArray(map) {\n var index = -1,\n result = Array(map.size);\n\n map.forEach(function(value, key) {\n result[++index] = [key, value];\n });\n return result;\n}\n\nmodule.exports = mapToArray;\n","var getNative = require('./_getNative');\n\n/* Built-in method references that are verified to be native. */\nvar nativeCreate = getNative(Object, 'create');\n\nmodule.exports = nativeCreate;\n","var overArg = require('./_overArg');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeKeys = overArg(Object.keys, Object);\n\nmodule.exports = nativeKeys;\n","/**\n * This function is like\n * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * except that it includes inherited enumerable properties.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction nativeKeysIn(object) {\n var result = [];\n if (object != null) {\n for (var key in Object(object)) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = nativeKeysIn;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n try {\n // Use `util.types` for Node.js 10+.\n var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n if (types) {\n return types;\n }\n\n // Legacy `process.binding('util')` for Node.js < 10.\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n}());\n\nmodule.exports = nodeUtil;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n","/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\nmodule.exports = overArg;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n","/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\nfunction setCacheAdd(value) {\n this.__data__.set(value, HASH_UNDEFINED);\n return this;\n}\n\nmodule.exports = setCacheAdd;\n","/**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\nfunction setCacheHas(value) {\n return this.__data__.has(value);\n}\n\nmodule.exports = setCacheHas;\n","/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\nfunction setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n}\n\nmodule.exports = setToArray;\n","var ListCache = require('./_ListCache');\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}\n\nmodule.exports = stackClear;\n","/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n var data = this.__data__,\n result = data['delete'](key);\n\n this.size = data.size;\n return result;\n}\n\nmodule.exports = stackDelete;\n","/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n return this.__data__.get(key);\n}\n\nmodule.exports = stackGet;\n","/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n return this.__data__.has(key);\n}\n\nmodule.exports = stackHas;\n","var ListCache = require('./_ListCache'),\n Map = require('./_Map'),\n MapCache = require('./_MapCache');\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n var data = this.__data__;\n if (data instanceof ListCache) {\n var pairs = data.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n this.size = ++data.size;\n return this;\n }\n data = this.__data__ = new MapCache(pairs);\n }\n data.set(key, value);\n this.size = data.size;\n return this;\n}\n\nmodule.exports = stackSet;\n","/** Used for built-in method references. */\nvar funcProto = Function.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\nmodule.exports = toSource;\n","var baseClone = require('./_baseClone');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_SYMBOLS_FLAG = 4;\n\n/**\n * This method is like `_.clone` except that it recursively clones `value`.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Lang\n * @param {*} value The value to recursively clone.\n * @returns {*} Returns the deep cloned value.\n * @see _.clone\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var deep = _.cloneDeep(objects);\n * console.log(deep[0] === objects[0]);\n * // => false\n */\nfunction cloneDeep(value) {\n return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);\n}\n\nmodule.exports = cloneDeep;\n","/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\nmodule.exports = eq;\n","var baseIsArguments = require('./_baseIsArguments'),\n isObjectLike = require('./isObjectLike');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n};\n\nmodule.exports = isArguments;\n","/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\nmodule.exports = isArray;\n","var isFunction = require('./isFunction'),\n isLength = require('./isLength');\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\nmodule.exports = isArrayLike;\n","var root = require('./_root'),\n stubFalse = require('./stubFalse');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\nmodule.exports = isBuffer;\n","var baseIsEqual = require('./_baseIsEqual');\n\n/**\n * Performs a deep comparison between two values to determine if they are\n * equivalent.\n *\n * **Note:** This method supports comparing arrays, array buffers, booleans,\n * date objects, error objects, maps, numbers, `Object` objects, regexes,\n * sets, strings, symbols, and typed arrays. `Object` objects are compared\n * by their own, not inherited, enumerable properties. Functions and DOM\n * nodes are compared by strict equality, i.e. `===`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.isEqual(object, other);\n * // => true\n *\n * object === other;\n * // => false\n */\nfunction isEqual(value, other) {\n return baseIsEqual(value, other);\n}\n\nmodule.exports = isEqual;\n","var baseGetTag = require('./_baseGetTag'),\n isObject = require('./isObject');\n\n/** `Object#toString` result references. */\nvar asyncTag = '[object AsyncFunction]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n proxyTag = '[object Proxy]';\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\nmodule.exports = isFunction;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\nmodule.exports = isLength;\n","var baseIsMap = require('./_baseIsMap'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsMap = nodeUtil && nodeUtil.isMap;\n\n/**\n * Checks if `value` is classified as a `Map` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n * @example\n *\n * _.isMap(new Map);\n * // => true\n *\n * _.isMap(new WeakMap);\n * // => false\n */\nvar isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;\n\nmodule.exports = isMap;\n","/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n","var baseIsSet = require('./_baseIsSet'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsSet = nodeUtil && nodeUtil.isSet;\n\n/**\n * Checks if `value` is classified as a `Set` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n * @example\n *\n * _.isSet(new Set);\n * // => true\n *\n * _.isSet(new WeakSet);\n * // => false\n */\nvar isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;\n\nmodule.exports = isSet;\n","var baseIsTypedArray = require('./_baseIsTypedArray'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\nmodule.exports = isTypedArray;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeys = require('./_baseKeys'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\nmodule.exports = keys;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeysIn = require('./_baseKeysIn'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\nfunction keysIn(object) {\n return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n}\n\nmodule.exports = keysIn;\n","/**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\nfunction stubArray() {\n return [];\n}\n\nmodule.exports = stubArray;\n","/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n return false;\n}\n\nmodule.exports = stubFalse;\n","import { connect, type BaseConnectionOptions } from \"@openfin/core-web\";\nimport { getSettings } from \"../platform/settings/settings\";\n\n/**\n * Initializes the OpenFin Web Broker connection.\n * @param inherit Should we inherit settings from the host (available in the OpenFin layout system) or use settings? Default is true.\n */\nexport async function init(inherit: boolean = true): Promise {\n\t// Set window.fin to the `fin` object.\n\tlet options: BaseConnectionOptions | undefined;\n\tif (window.fin === undefined) {\n\t\tif (!inherit) {\n\t\t\tconst settings = await getSettings();\n\t\t\tif (settings === undefined) {\n\t\t\t\tconsole.error(\n\t\t\t\t\t\"Unable to run the sample as we have been unable to load the web manifest and it's settings from the currently running html page. Please ensure that the web manifest is being served and that it contains the custom_settings section.\"\n\t\t\t\t);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\toptions = {\n\t\t\t\tbrokerUrl: settings.platform.interop.brokerUrl,\n\t\t\t\tinteropConfig: {\n\t\t\t\t\tproviderId: settings.platform.interop.providerId,\n\t\t\t\t\tcurrentContextGroup: settings.platform.interop.defaultContextGroup\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t\t// Specify an interopConfig with a specific provider ID and a context group to initialize the `fin.me.interop` client on connection.\n\t\tif (options) {\n\t\t\twindow.fin = await connect({\n\t\t\t\toptions\n\t\t\t});\n\t\t} else {\n\t\t\twindow.fin = await connect({\n\t\t\t\tconnectionInheritance: \"enabled\"\n\t\t\t});\n\t\t}\n\t\tconsole.log(\"Finished initializing the fin API.\");\n\t\t// Create and dispatch the finReady event\n\t\tconst event = new CustomEvent(\"finReady\");\n\t\twindow.dispatchEvent(event);\n\t}\n\n\tif (window.fdc3 === undefined && window?.fin?.me.interop?.getFDC3Sync !== undefined) {\n\t\twindow.fdc3 = fin.me.interop.getFDC3Sync(\"2.0\");\n\t\tconsole.log(\"Finished initializing the fdc3 API.\");\n\t\t// Create and dispatch the FDC3Ready event\n\t\tconst event = new CustomEvent(\"fdc3Ready\");\n\t\twindow.dispatchEvent(event);\n\t}\n}\n","import type { OpenFin } from \"@openfin/core\";\nimport type { ManifestSettings, Settings } from \"../../shapes/setting-shapes\";\n\n/**\n * Fetches the settings for the application.\n * @returns The settings for the application.\n */\nexport async function getSettings(): Promise {\n\tconst savedSettings = await getSavedSettings();\n\tif (savedSettings) {\n\t\treturn savedSettings;\n\t}\n\tconst settings = await getManifestSettings();\n\tif (!Array.isArray(settings?.endpointProvider?.endpoints)) {\n\t\tconsole.error(\n\t\t\t\"Unable to run the example as settings are required and we fetch them from the link web manifest from the html page that is being served. It should exist in the customSettings section of the web manifest.\"\n\t\t);\n\t\treturn;\n\t}\n\tconst settingsEndpoint = settings.endpointProvider.endpoints.find(\n\t\t(endpoint) => endpoint.id === \"platform-settings\"\n\t);\n\n\tif (\n\t\tsettingsEndpoint === undefined ||\n\t\tsettingsEndpoint.type !== \"fetch\" ||\n\t\tsettingsEndpoint.options.method !== \"GET\" ||\n\t\tsettingsEndpoint.options.url === undefined\n\t) {\n\t\tconsole.error(\n\t\t\t\"Unable to run the example as settings are required and we fetch them from the endpoint defined with the id: 'platform-settings' in the manifest. It needs to be of type fetch, performing a GET and it must have a url defined.\"\n\t\t);\n\t\treturn;\n\t}\n\tconst platformSettings = await fetch(settingsEndpoint?.options.url);\n\tconst settingsJson = (await platformSettings.json()) as Settings;\n\treturn settingsJson;\n}\n\n/**\n * Returns a default layout from the settings if provided.\n * @returns The default layout from the settings.\n */\nexport async function getDefaultLayout(): Promise {\n\tconst settings = await getSettings();\n\tif (settings?.platform?.layout?.defaultLayout === undefined) {\n\t\tconsole.error(\n\t\t\t\"Unable to run the example as without a layout being defined. Please ensure that settings have been provided in the web manifest.\"\n\t\t);\n\t\treturn;\n\t}\n\tif (typeof settings.platform.layout.defaultLayout === \"string\") {\n\t\tconst layoutResponse = await fetch(settings.platform.layout.defaultLayout);\n\t\tconst layoutJson = (await layoutResponse.json()) as OpenFin.LayoutSnapshot;\n\t\treturn layoutJson;\n\t}\n\treturn settings.platform.layout.defaultLayout;\n}\n\n/**\n * Returns the settings from the manifest file.\n * @returns customSettings for this example\n */\nasync function getManifestSettings(): Promise {\n\t// Get the manifest link\n\tconst link = document.querySelector('link[rel=\"manifest\"]');\n\tif (link !== null) {\n\t\tconst manifestResponse = await fetch(link.href);\n\t\tconst manifestJson = (await manifestResponse.json()) as { custom_settings: ManifestSettings };\n\t\treturn manifestJson.custom_settings;\n\t}\n}\n\n/**\n * Clears any saved settings.\n * @returns The saved settings.\n */\nexport async function clearSettings(): Promise {\n\tconst settingsId = getSavedSettingsId();\n\tlocalStorage.removeItem(settingsId);\n}\n\n/**\n * Saves the settings.\n * @param settings The settings to save.\n */\nexport async function saveSettings(settings: Settings): Promise {\n\tconst settingsId = getSavedSettingsId();\n\tlocalStorage.setItem(settingsId, JSON.stringify(settings));\n}\n\n/**\n * Retrieves saved settings from local storage.\n * @returns The saved settings.\n */\nasync function getSavedSettings(): Promise {\n\tconst settingsId = getSavedSettingsId();\n\tconst settings = localStorage.getItem(settingsId);\n\tif (settings !== null) {\n\t\treturn JSON.parse(settings);\n\t}\n}\n\n/**\n * Get the Id used for saving and fetching settings from storage.\n * @returns The settings id.\n */\nfunction getSavedSettingsId(): string {\n\tconst urlParams = new URLSearchParams(window.location.search);\n\tconst env = urlParams.get(\"env\");\n\n\tconst settingsKey = env ? `${env}-settings` : \"settings\";\n\treturn settingsKey;\n}\n","export { default as v1 } from './v1.js';\nexport { default as v3 } from './v3.js';\nexport { default as v4 } from './v4.js';\nexport { default as v5 } from './v5.js';\nexport { default as NIL } from './nil.js';\nexport { default as version } from './version.js';\nexport { default as validate } from './validate.js';\nexport { default as stringify } from './stringify.js';\nexport { default as parse } from './parse.js';","/*\n * Browser-compatible JavaScript MD5\n *\n * Modification of JavaScript MD5\n * https://github.com/blueimp/JavaScript-MD5\n *\n * Copyright 2011, Sebastian Tschan\n * https://blueimp.net\n *\n * Licensed under the MIT license:\n * https://opensource.org/licenses/MIT\n *\n * Based on\n * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message\n * Digest Algorithm, as defined in RFC 1321.\n * Version 2.2 Copyright (C) Paul Johnston 1999 - 2009\n * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet\n * Distributed under the BSD License\n * See http://pajhome.org.uk/crypt/md5 for more info.\n */\nfunction md5(bytes) {\n if (typeof bytes === 'string') {\n var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape\n\n bytes = new Uint8Array(msg.length);\n\n for (var i = 0; i < msg.length; ++i) {\n bytes[i] = msg.charCodeAt(i);\n }\n }\n\n return md5ToHexEncodedArray(wordsToMd5(bytesToWords(bytes), bytes.length * 8));\n}\n/*\n * Convert an array of little-endian words to an array of bytes\n */\n\n\nfunction md5ToHexEncodedArray(input) {\n var output = [];\n var length32 = input.length * 32;\n var hexTab = '0123456789abcdef';\n\n for (var i = 0; i < length32; i += 8) {\n var x = input[i >> 5] >>> i % 32 & 0xff;\n var hex = parseInt(hexTab.charAt(x >>> 4 & 0x0f) + hexTab.charAt(x & 0x0f), 16);\n output.push(hex);\n }\n\n return output;\n}\n/**\n * Calculate output length with padding and bit length\n */\n\n\nfunction getOutputLength(inputLength8) {\n return (inputLength8 + 64 >>> 9 << 4) + 14 + 1;\n}\n/*\n * Calculate the MD5 of an array of little-endian words, and a bit length.\n */\n\n\nfunction wordsToMd5(x, len) {\n /* append padding */\n x[len >> 5] |= 0x80 << len % 32;\n x[getOutputLength(len) - 1] = len;\n var a = 1732584193;\n var b = -271733879;\n var c = -1732584194;\n var d = 271733878;\n\n for (var i = 0; i < x.length; i += 16) {\n var olda = a;\n var oldb = b;\n var oldc = c;\n var oldd = d;\n a = md5ff(a, b, c, d, x[i], 7, -680876936);\n d = md5ff(d, a, b, c, x[i + 1], 12, -389564586);\n c = md5ff(c, d, a, b, x[i + 2], 17, 606105819);\n b = md5ff(b, c, d, a, x[i + 3], 22, -1044525330);\n a = md5ff(a, b, c, d, x[i + 4], 7, -176418897);\n d = md5ff(d, a, b, c, x[i + 5], 12, 1200080426);\n c = md5ff(c, d, a, b, x[i + 6], 17, -1473231341);\n b = md5ff(b, c, d, a, x[i + 7], 22, -45705983);\n a = md5ff(a, b, c, d, x[i + 8], 7, 1770035416);\n d = md5ff(d, a, b, c, x[i + 9], 12, -1958414417);\n c = md5ff(c, d, a, b, x[i + 10], 17, -42063);\n b = md5ff(b, c, d, a, x[i + 11], 22, -1990404162);\n a = md5ff(a, b, c, d, x[i + 12], 7, 1804603682);\n d = md5ff(d, a, b, c, x[i + 13], 12, -40341101);\n c = md5ff(c, d, a, b, x[i + 14], 17, -1502002290);\n b = md5ff(b, c, d, a, x[i + 15], 22, 1236535329);\n a = md5gg(a, b, c, d, x[i + 1], 5, -165796510);\n d = md5gg(d, a, b, c, x[i + 6], 9, -1069501632);\n c = md5gg(c, d, a, b, x[i + 11], 14, 643717713);\n b = md5gg(b, c, d, a, x[i], 20, -373897302);\n a = md5gg(a, b, c, d, x[i + 5], 5, -701558691);\n d = md5gg(d, a, b, c, x[i + 10], 9, 38016083);\n c = md5gg(c, d, a, b, x[i + 15], 14, -660478335);\n b = md5gg(b, c, d, a, x[i + 4], 20, -405537848);\n a = md5gg(a, b, c, d, x[i + 9], 5, 568446438);\n d = md5gg(d, a, b, c, x[i + 14], 9, -1019803690);\n c = md5gg(c, d, a, b, x[i + 3], 14, -187363961);\n b = md5gg(b, c, d, a, x[i + 8], 20, 1163531501);\n a = md5gg(a, b, c, d, x[i + 13], 5, -1444681467);\n d = md5gg(d, a, b, c, x[i + 2], 9, -51403784);\n c = md5gg(c, d, a, b, x[i + 7], 14, 1735328473);\n b = md5gg(b, c, d, a, x[i + 12], 20, -1926607734);\n a = md5hh(a, b, c, d, x[i + 5], 4, -378558);\n d = md5hh(d, a, b, c, x[i + 8], 11, -2022574463);\n c = md5hh(c, d, a, b, x[i + 11], 16, 1839030562);\n b = md5hh(b, c, d, a, x[i + 14], 23, -35309556);\n a = md5hh(a, b, c, d, x[i + 1], 4, -1530992060);\n d = md5hh(d, a, b, c, x[i + 4], 11, 1272893353);\n c = md5hh(c, d, a, b, x[i + 7], 16, -155497632);\n b = md5hh(b, c, d, a, x[i + 10], 23, -1094730640);\n a = md5hh(a, b, c, d, x[i + 13], 4, 681279174);\n d = md5hh(d, a, b, c, x[i], 11, -358537222);\n c = md5hh(c, d, a, b, x[i + 3], 16, -722521979);\n b = md5hh(b, c, d, a, x[i + 6], 23, 76029189);\n a = md5hh(a, b, c, d, x[i + 9], 4, -640364487);\n d = md5hh(d, a, b, c, x[i + 12], 11, -421815835);\n c = md5hh(c, d, a, b, x[i + 15], 16, 530742520);\n b = md5hh(b, c, d, a, x[i + 2], 23, -995338651);\n a = md5ii(a, b, c, d, x[i], 6, -198630844);\n d = md5ii(d, a, b, c, x[i + 7], 10, 1126891415);\n c = md5ii(c, d, a, b, x[i + 14], 15, -1416354905);\n b = md5ii(b, c, d, a, x[i + 5], 21, -57434055);\n a = md5ii(a, b, c, d, x[i + 12], 6, 1700485571);\n d = md5ii(d, a, b, c, x[i + 3], 10, -1894986606);\n c = md5ii(c, d, a, b, x[i + 10], 15, -1051523);\n b = md5ii(b, c, d, a, x[i + 1], 21, -2054922799);\n a = md5ii(a, b, c, d, x[i + 8], 6, 1873313359);\n d = md5ii(d, a, b, c, x[i + 15], 10, -30611744);\n c = md5ii(c, d, a, b, x[i + 6], 15, -1560198380);\n b = md5ii(b, c, d, a, x[i + 13], 21, 1309151649);\n a = md5ii(a, b, c, d, x[i + 4], 6, -145523070);\n d = md5ii(d, a, b, c, x[i + 11], 10, -1120210379);\n c = md5ii(c, d, a, b, x[i + 2], 15, 718787259);\n b = md5ii(b, c, d, a, x[i + 9], 21, -343485551);\n a = safeAdd(a, olda);\n b = safeAdd(b, oldb);\n c = safeAdd(c, oldc);\n d = safeAdd(d, oldd);\n }\n\n return [a, b, c, d];\n}\n/*\n * Convert an array bytes to an array of little-endian words\n * Characters >255 have their high-byte silently ignored.\n */\n\n\nfunction bytesToWords(input) {\n if (input.length === 0) {\n return [];\n }\n\n var length8 = input.length * 8;\n var output = new Uint32Array(getOutputLength(length8));\n\n for (var i = 0; i < length8; i += 8) {\n output[i >> 5] |= (input[i / 8] & 0xff) << i % 32;\n }\n\n return output;\n}\n/*\n * Add integers, wrapping at 2^32. This uses 16-bit operations internally\n * to work around bugs in some JS interpreters.\n */\n\n\nfunction safeAdd(x, y) {\n var lsw = (x & 0xffff) + (y & 0xffff);\n var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n return msw << 16 | lsw & 0xffff;\n}\n/*\n * Bitwise rotate a 32-bit number to the left.\n */\n\n\nfunction bitRotateLeft(num, cnt) {\n return num << cnt | num >>> 32 - cnt;\n}\n/*\n * These functions implement the four basic operations the algorithm uses.\n */\n\n\nfunction md5cmn(q, a, b, x, s, t) {\n return safeAdd(bitRotateLeft(safeAdd(safeAdd(a, q), safeAdd(x, t)), s), b);\n}\n\nfunction md5ff(a, b, c, d, x, s, t) {\n return md5cmn(b & c | ~b & d, a, b, x, s, t);\n}\n\nfunction md5gg(a, b, c, d, x, s, t) {\n return md5cmn(b & d | c & ~d, a, b, x, s, t);\n}\n\nfunction md5hh(a, b, c, d, x, s, t) {\n return md5cmn(b ^ c ^ d, a, b, x, s, t);\n}\n\nfunction md5ii(a, b, c, d, x, s, t) {\n return md5cmn(c ^ (b | ~d), a, b, x, s, t);\n}\n\nexport default md5;","export default '00000000-0000-0000-0000-000000000000';","import validate from './validate.js';\n\nfunction parse(uuid) {\n if (!validate(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n var v;\n var arr = new Uint8Array(16); // Parse ########-....-....-....-............\n\n arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24;\n arr[1] = v >>> 16 & 0xff;\n arr[2] = v >>> 8 & 0xff;\n arr[3] = v & 0xff; // Parse ........-####-....-....-............\n\n arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8;\n arr[5] = v & 0xff; // Parse ........-....-####-....-............\n\n arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8;\n arr[7] = v & 0xff; // Parse ........-....-....-####-............\n\n arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8;\n arr[9] = v & 0xff; // Parse ........-....-....-....-############\n // (Use \"/\" to avoid 32-bit truncation when bit-shifting high-order bytes)\n\n arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff;\n arr[11] = v / 0x100000000 & 0xff;\n arr[12] = v >>> 24 & 0xff;\n arr[13] = v >>> 16 & 0xff;\n arr[14] = v >>> 8 & 0xff;\n arr[15] = v & 0xff;\n return arr;\n}\n\nexport default parse;","export default /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;","// Unique ID creation requires a high quality random # generator. In the browser we therefore\n// require the crypto API and do not support built-in fallback to lower quality random number\n// generators (like Math.random()).\nvar getRandomValues;\nvar rnds8 = new Uint8Array(16);\nexport default function rng() {\n // lazy load so that environments that need to polyfill have a chance to do so\n if (!getRandomValues) {\n // getRandomValues needs to be invoked in a context where \"this\" is a Crypto implementation. Also,\n // find the complete implementation of crypto (msCrypto) on IE11.\n getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto !== 'undefined' && typeof msCrypto.getRandomValues === 'function' && msCrypto.getRandomValues.bind(msCrypto);\n\n if (!getRandomValues) {\n throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');\n }\n }\n\n return getRandomValues(rnds8);\n}","// Adapted from Chris Veness' SHA1 code at\n// http://www.movable-type.co.uk/scripts/sha1.html\nfunction f(s, x, y, z) {\n switch (s) {\n case 0:\n return x & y ^ ~x & z;\n\n case 1:\n return x ^ y ^ z;\n\n case 2:\n return x & y ^ x & z ^ y & z;\n\n case 3:\n return x ^ y ^ z;\n }\n}\n\nfunction ROTL(x, n) {\n return x << n | x >>> 32 - n;\n}\n\nfunction sha1(bytes) {\n var K = [0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xca62c1d6];\n var H = [0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0];\n\n if (typeof bytes === 'string') {\n var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape\n\n bytes = [];\n\n for (var i = 0; i < msg.length; ++i) {\n bytes.push(msg.charCodeAt(i));\n }\n } else if (!Array.isArray(bytes)) {\n // Convert Array-like to Array\n bytes = Array.prototype.slice.call(bytes);\n }\n\n bytes.push(0x80);\n var l = bytes.length / 4 + 2;\n var N = Math.ceil(l / 16);\n var M = new Array(N);\n\n for (var _i = 0; _i < N; ++_i) {\n var arr = new Uint32Array(16);\n\n for (var j = 0; j < 16; ++j) {\n arr[j] = bytes[_i * 64 + j * 4] << 24 | bytes[_i * 64 + j * 4 + 1] << 16 | bytes[_i * 64 + j * 4 + 2] << 8 | bytes[_i * 64 + j * 4 + 3];\n }\n\n M[_i] = arr;\n }\n\n M[N - 1][14] = (bytes.length - 1) * 8 / Math.pow(2, 32);\n M[N - 1][14] = Math.floor(M[N - 1][14]);\n M[N - 1][15] = (bytes.length - 1) * 8 & 0xffffffff;\n\n for (var _i2 = 0; _i2 < N; ++_i2) {\n var W = new Uint32Array(80);\n\n for (var t = 0; t < 16; ++t) {\n W[t] = M[_i2][t];\n }\n\n for (var _t = 16; _t < 80; ++_t) {\n W[_t] = ROTL(W[_t - 3] ^ W[_t - 8] ^ W[_t - 14] ^ W[_t - 16], 1);\n }\n\n var a = H[0];\n var b = H[1];\n var c = H[2];\n var d = H[3];\n var e = H[4];\n\n for (var _t2 = 0; _t2 < 80; ++_t2) {\n var s = Math.floor(_t2 / 20);\n var T = ROTL(a, 5) + f(s, b, c, d) + e + K[s] + W[_t2] >>> 0;\n e = d;\n d = c;\n c = ROTL(b, 30) >>> 0;\n b = a;\n a = T;\n }\n\n H[0] = H[0] + a >>> 0;\n H[1] = H[1] + b >>> 0;\n H[2] = H[2] + c >>> 0;\n H[3] = H[3] + d >>> 0;\n H[4] = H[4] + e >>> 0;\n }\n\n return [H[0] >> 24 & 0xff, H[0] >> 16 & 0xff, H[0] >> 8 & 0xff, H[0] & 0xff, H[1] >> 24 & 0xff, H[1] >> 16 & 0xff, H[1] >> 8 & 0xff, H[1] & 0xff, H[2] >> 24 & 0xff, H[2] >> 16 & 0xff, H[2] >> 8 & 0xff, H[2] & 0xff, H[3] >> 24 & 0xff, H[3] >> 16 & 0xff, H[3] >> 8 & 0xff, H[3] & 0xff, H[4] >> 24 & 0xff, H[4] >> 16 & 0xff, H[4] >> 8 & 0xff, H[4] & 0xff];\n}\n\nexport default sha1;","import validate from './validate.js';\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\n\nvar byteToHex = [];\n\nfor (var i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).substr(1));\n}\n\nfunction stringify(arr) {\n var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n var uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!validate(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n\n return uuid;\n}\n\nexport default stringify;","import rng from './rng.js';\nimport stringify from './stringify.js'; // **`v1()` - Generate time-based UUID**\n//\n// Inspired by https://github.com/LiosK/UUID.js\n// and http://docs.python.org/library/uuid.html\n\nvar _nodeId;\n\nvar _clockseq; // Previous uuid creation time\n\n\nvar _lastMSecs = 0;\nvar _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details\n\nfunction v1(options, buf, offset) {\n var i = buf && offset || 0;\n var b = buf || new Array(16);\n options = options || {};\n var node = options.node || _nodeId;\n var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not\n // specified. We do this lazily to minimize issues related to insufficient\n // system entropy. See #189\n\n if (node == null || clockseq == null) {\n var seedBytes = options.random || (options.rng || rng)();\n\n if (node == null) {\n // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)\n node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]];\n }\n\n if (clockseq == null) {\n // Per 4.2.2, randomize (14 bit) clockseq\n clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;\n }\n } // UUID timestamps are 100 nano-second units since the Gregorian epoch,\n // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so\n // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'\n // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.\n\n\n var msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock\n // cycle to simulate higher resolution clock\n\n var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs)\n\n var dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression\n\n if (dt < 0 && options.clockseq === undefined) {\n clockseq = clockseq + 1 & 0x3fff;\n } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new\n // time interval\n\n\n if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {\n nsecs = 0;\n } // Per 4.2.1.2 Throw error if too many uuids are requested\n\n\n if (nsecs >= 10000) {\n throw new Error(\"uuid.v1(): Can't create more than 10M uuids/sec\");\n }\n\n _lastMSecs = msecs;\n _lastNSecs = nsecs;\n _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch\n\n msecs += 12219292800000; // `time_low`\n\n var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;\n b[i++] = tl >>> 24 & 0xff;\n b[i++] = tl >>> 16 & 0xff;\n b[i++] = tl >>> 8 & 0xff;\n b[i++] = tl & 0xff; // `time_mid`\n\n var tmh = msecs / 0x100000000 * 10000 & 0xfffffff;\n b[i++] = tmh >>> 8 & 0xff;\n b[i++] = tmh & 0xff; // `time_high_and_version`\n\n b[i++] = tmh >>> 24 & 0xf | 0x10; // include version\n\n b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)\n\n b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low`\n\n b[i++] = clockseq & 0xff; // `node`\n\n for (var n = 0; n < 6; ++n) {\n b[i + n] = node[n];\n }\n\n return buf || stringify(b);\n}\n\nexport default v1;","import v35 from './v35.js';\nimport md5 from './md5.js';\nvar v3 = v35('v3', 0x30, md5);\nexport default v3;","import stringify from './stringify.js';\nimport parse from './parse.js';\n\nfunction stringToBytes(str) {\n str = unescape(encodeURIComponent(str)); // UTF8 escape\n\n var bytes = [];\n\n for (var i = 0; i < str.length; ++i) {\n bytes.push(str.charCodeAt(i));\n }\n\n return bytes;\n}\n\nexport var DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8';\nexport var URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8';\nexport default function (name, version, hashfunc) {\n function generateUUID(value, namespace, buf, offset) {\n if (typeof value === 'string') {\n value = stringToBytes(value);\n }\n\n if (typeof namespace === 'string') {\n namespace = parse(namespace);\n }\n\n if (namespace.length !== 16) {\n throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)');\n } // Compute hash of namespace and value, Per 4.3\n // Future: Use spread syntax when supported on all platforms, e.g. `bytes =\n // hashfunc([...namespace, ... value])`\n\n\n var bytes = new Uint8Array(16 + value.length);\n bytes.set(namespace);\n bytes.set(value, namespace.length);\n bytes = hashfunc(bytes);\n bytes[6] = bytes[6] & 0x0f | version;\n bytes[8] = bytes[8] & 0x3f | 0x80;\n\n if (buf) {\n offset = offset || 0;\n\n for (var i = 0; i < 16; ++i) {\n buf[offset + i] = bytes[i];\n }\n\n return buf;\n }\n\n return stringify(bytes);\n } // Function#name is not settable on some platforms (#270)\n\n\n try {\n generateUUID.name = name; // eslint-disable-next-line no-empty\n } catch (err) {} // For CommonJS default export support\n\n\n generateUUID.DNS = DNS;\n generateUUID.URL = URL;\n return generateUUID;\n}","import rng from './rng.js';\nimport stringify from './stringify.js';\n\nfunction v4(options, buf, offset) {\n options = options || {};\n var rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n offset = offset || 0;\n\n for (var i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n\n return buf;\n }\n\n return stringify(rnds);\n}\n\nexport default v4;","import v35 from './v35.js';\nimport sha1 from './sha1.js';\nvar v5 = v35('v5', 0x50, sha1);\nexport default v5;","import REGEX from './regex.js';\n\nfunction validate(uuid) {\n return typeof uuid === 'string' && REGEX.test(uuid);\n}\n\nexport default validate;","import validate from './validate.js';\n\nfunction version(uuid) {\n if (!validate(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n return parseInt(uuid.substr(14, 1), 16);\n}\n\nexport default version;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = (module) => {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","import type { Context } from \"@finos/fdc3\";\nimport { init } from \"./api\";\n\nwindow.addEventListener(\"DOMContentLoaded\", async () => {\n\tawait init(true);\n\tawait initializeDOM();\n});\n\n/**\n * Raise an intent using the fdc3 API.\n */\nasync function raiseIntent(): Promise {\n\tif (window.fin !== undefined) {\n\t\tconst context = {\n\t\t\ttype: \"fdc3.contact\",\n\t\t\tname: \"Andy Young\",\n\t\t\tid: {\n\t\t\t\temail: \"andy.young@example.com\"\n\t\t\t}\n\t\t};\n\t\tconst intent = \"ViewContact\";\n\t\tconst intentResolver = await window.fdc3.raiseIntent(intent, context);\n\t\tif (intentResolver !== undefined) {\n\t\t\tconsole.log(\"Intent resolver received:\", intentResolver);\n\t\t}\n\t}\n}\n\n/**\n * Adds an fdc3 intent listener to the window.\n */\nasync function addIntentListener(): Promise {\n\tconst intent = \"ViewContact\";\n\tif (window.fdc3) {\n\t\tawait window.fdc3.addIntentListener(intent, (ctx, metadata) => {\n\t\t\tconsole.log(`Received Context For Intent: ${intent}`, ctx);\n\t\t\tconsole.log(`Received Metadata With Intent: ${intent}`, metadata);\n\t\t\tupdateDOMElements(ctx);\n\t\t});\n\t} else {\n\t\twindow.addEventListener(\"fdc3Ready\", async () => {\n\t\t\tif (window.fdc3) {\n\t\t\t\tawait window.fdc3.addIntentListener(intent, (ctx, metadata) => {\n\t\t\t\t\tconsole.log(`Received Context For Intent: ${intent}`, ctx);\n\t\t\t\t\tconsole.log(`Received Metadata With Intent: ${intent}`, metadata);\n\t\t\t\t\tupdateDOMElements(ctx);\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t}\n}\n\n/**\n * Updates the DOM elements with the provided context.\n * @param context The context to update the DOM elements with.\n */\nfunction updateDOMElements(context: Context): void {\n\tconst contextTypeSpan = document.querySelector(\"#contextType\");\n\tconst contextNameSpan = document.querySelector(\"#contextName\");\n\tconst contextBodyPre = document.querySelector(\"#contextBody\");\n\n\tif (contextTypeSpan !== null && contextNameSpan !== null && contextBodyPre !== null) {\n\t\tcontextTypeSpan.textContent = context.type;\n\t\tcontextNameSpan.textContent = context.name ?? \"No name provided.\";\n\t\tcontextBodyPre.textContent = JSON.stringify(context, null, 2);\n\t}\n}\n\n/**\n * Initialize the DOM elements.\n */\nasync function initializeDOM(): Promise {\n\tconst raiseIntentButton = document.querySelector(\"#raiseIntent\");\n\n\tif (raiseIntentButton !== null) {\n\t\traiseIntentButton.addEventListener(\"click\", async () => {\n\t\t\tawait raiseIntent();\n\t\t});\n\t}\n\n\tawait addIntentListener();\n}\n"],"names":[],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"fd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AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;ACrJA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEY;;AAEZ,eAAe,mBAAO,CAAC,wDAAW;AAClC,gBAAgB,mBAAO,CAAC,oDAAS;AACjC;AACA;AACA;AACA;;AAEA,cAAc;AACd,kBAAkB;AAClB,yBAAyB;;AAEzB;AACA,kBAAkB;;AAElB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,kBAAkB,YAAY;AAC9B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA,wCAAwC,SAAS;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;;AAEA;AACA;AACA,cAAc,iBAAiB;AAC/B;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,iDAAiD,EAAE;AACnD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C;AAC1C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA,yBAAyB,eAAe;AACxC;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,yBAAyB,QAAQ;AACjC;AACA,sBAAsB,eAAe;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc,YAAY;AAC1B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB,sBAAsB;AACxC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,mBAAmB;AACnB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA,oBAAoB,SAAS;AAC7B;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA,qBAAqB,WAAW,GAAG,IAAI;AACvC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA,gBAAgB,WAAW,GAAG,IAAI,KAAK,aAAa;AACpD;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;;AAEA;AACA,GAAG;AACH;AACA;AACA,mBAAmB,KAAK,mDAAmD,cAAc;AACzF,GAAG;AACH;AACA;AACA,+BAA+B,IAAI;AACnC;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,MAAM,aAAa,SAAS;AACtD;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,SAAS,gBAAgB;AACzB,cAAc,oBAAoB,EAAE,IAAI;AACxC;AACA,YAAY,gBAAgB,EAAE,IAAI;AAClC;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,GAAG,SAAS,GAAG,KAAK,qBAAqB,EAAE,EAAE;AACpE,QAAQ;AACR,yBAAyB,GAAG,KAAK,yBAAyB,EAAE,EAAE;AAC9D,mBAAmB,yBAAyB,EAAE,EAAE;AAChD;AACA,MAAM;AACN,oBAAoB,IAAI,EAAE,GAAG,SAAS,IAAI,EAAE,EAAE;AAC9C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,0CAA0C,cAAc,SAAS,OAAO;AACxE;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,kBAAkB,YAAY;AAC9B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,kBAAkB,gBAAgB;AAClC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,kBAAkB,gBAAgB;AAClC;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,cAAc,YAAY;AAC1B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,QAAQ;AAC1B;AACA,oBAAoB,QAAQ;AAC5B;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;;;;;ACzjEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEa;;AAEb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB;;AAEnB;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,sBAAsB;AACxC;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA,eAAe;AACf;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA,oBAAoB,SAAS;AAC7B;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;;AAEA,kCAAkC,QAAQ;AAC1C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oBAAoB,iBAAiB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,QAAQ;AACR;AACA,uCAAuC,QAAQ;AAC/C;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,OAAO;AACzB;AACA;AACA;;AAEA;AACA,SAAS,yBAAyB;AAClC;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,gBAAgB;AAClC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,8DAA8D,YAAY;AAC1E;AACA,8DAA8D,YAAY;AAC1E;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,qCAAqC,YAAY;AACjD;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;AACA;;;;;;;;;;;AChfA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,SAAS,WAAW;;AAEp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;;;;;;ACLA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,WAAW,mBAAO,CAAC,mDAAS;;AAE5B;AACA;;AAEA;;;;;;;;;;;ACNA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,UAAU;AACrB,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACrBA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,UAAU;AACrB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACxBA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,kBAAkB,mBAAO,CAAC,+DAAe;AACzC,cAAc,mBAAO,CAAC,uDAAW;AACjC,eAAe,mBAAO,CAAC,yDAAY;AACnC,cAAc,mBAAO,CAAC,yDAAY;AAClC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,SAAS;AACpB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AChDA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACnBA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,UAAU;AACrB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACtBA,sBAAsB,mBAAO,CAAC,yEAAoB;AAClD,SA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AkB,mBAAO,CAAC,iEAAgB;AAC1C,oBAAoB,mBAAO,CAAC,qEAAkB;AAC9C,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,mBAAmB,mBAAO,CAAC,mEAAiB;AAC5C,aAAa,mBAAO,CAAC,uDAAW;AAChC,qBAAqB,mBAAO,CAAC,uEAAmB;AAChD,qBAAqB,mBAAO,CAAC,uEAAmB;AAChD,sBAAsB,mBAAO,CAAC,yEAAoB;AAClD,cAAc,mBAAO,CAAC,uDAAW;AACjC,eAAe,mBAAO,CAAC,yDAAY;AACnC,YAAY,mBAAO,CAAC,mDAAS;AAC7B,eAAe,mBAAO,CAAC,yDAAY;AACnC,YAAY,mBAAO,CAAC,mDAAS;AAC7B,WAAW,mBAAO,CAAC,iDAAQ;AAC3B,aAAa,mBAAO,CAAC,qDAAU;;AAE/B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,SAAS;AACpB;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa,GAAG;AAChB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;AACA,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;AACA,KAAK;A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AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC9CA,aAAa,mBAAO,CAAC,uDAAW;AAChC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,eAAe,mBAAO,CAAC,yDAAY;AACnC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC3DA,kBAAkB,mBAAO,CAAC,iEAAgB;AAC1C,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC7BA,eAAe,mBAAO,CAAC,yDAAY;AACnC,kBAAkB,mBAAO,CAAC,iEAAgB;AAC1C,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AChCA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,aAAa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pC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACnFA,aAAa,mBAAO,CAAC,uDAAW;AAChC,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,SAAS,mBAAO,CAAC,6CAAM;AACvB,kBAAkB,mBAAO,CAAC,iEAAgB;AAC1C,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AAC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O,CAAC,iDAAQ;AAC1B,cAAc,mBAAO,CAAC,yDAAY;AAClC,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACzDA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa,GAAG;AAChB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACZA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACdA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AChBA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,GAAG;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC7BA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACtBA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACn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AAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACdA,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACnBA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACZA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClCA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,GAAG;AAChB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;AClBA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACfA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACzBA,WAAW,mBAAO,CAAC,mDAAS;AAC5B,gBAAgB,mBA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5C;AACA,gCAAgC,QAAa;;AAE7C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ,CAAC;;AAED;;;;;;;;;;;AC7BA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACrBA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,aAAa,UAAU;AACvB;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACdA,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;ACRA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACbA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;;;;;;;;;;ACjBA,gBAAgB,mBAAO,CAAC,6DAAc;;AAEtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACdA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,GAAG;AAChB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACbA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACbA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,UAAU,mBAAO,CAAC,iDAAQ;AAC1B,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjCA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;;;;;;;;;;;ACzBA,gBAAgB,mBAAO,CAAC,6DAAc;;AAEtC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,GAAG;AAChB;AACA;AACA;AACA,oBAAoB,QAAQ,IAAI,QAAQ;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,kBAAkB;AAClB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpCA,sBAAsB,mBAAO,CAAC,yEAAoB;AAClD,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA,8BAA8B,mBAAmB;AACjD;AACA;AACA;AACA;AACA;AACA,+CAA+C,mBAAmB;AAClE;AACA;AACA;;AAEA;;;;;;;;;;;ACnCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACzBA,iBAAiB,mBAAO,CAAC,6DAAc;AACvC,eAAe,mBAAO,CAAC,yDAAY;;AAEnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AChCA,WAAW,mBAAO,CAAC,mDAAS;AAC5B,gBAAgB,mBAAO,CAAC,2DAAa;;AAErC;AACA,kBAAkB,KAA0B;;AAE5C;AACA,gCAAgC,QAAa;;AAE7C;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACrCA,kBAAkB,mBAAO,CAAC,iEAAgB;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,kBAAkB;AAClB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClCA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,eAAe,mBAAO,CAAC,yDAAY;;AAEnC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpCA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClCA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC1BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC9BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC5BA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC1BA,uBAAuB,mBAAO,CAAC,2EAAqB;AACpD,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC1BA,oBAAoB,mBAAO,CAAC,qEAAkB;AAC9C,eAAe,mBAAO,CAAC,2DAAa;AACpC,kBAAkB,mBAAO,CAAC,+DAAe;;AAEzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpCA,oBAAoB,mBAAO,CAAC,qEAAkB;AAC9C,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,kBAAkB,mBAAO,CAAC,+DAAe;;AAEzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC/BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;;;ACVA,oBA2CC;AAlDD,0HAAwE;AACxE,0HAA4D;AAE5D;;;GAGG;AACI,KAAK,UAAU,IAAI,CAAC,UAAmB,IAAI;IACjD,sCAAsC;IACtC,IAAI,OAA0C,CAAC;IAC/C,IAAI,MAAM,CAAC,GAAG,KAAK,SAAS,EAAE,CAAC;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AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,kBAAkB,aAAa;AAC/B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,iEAAe,GAAG;;;;;;;;;;;;;;;ACtNlB,iEAAe,sCAAsC;;;;;;;;;;;;;;;;ACAhB;;AAErC;AACA,OAAO,wDAAQ;AACf;AACA;;AAEA;AACA,gCAAgC;;AAEhC;AACA;AACA;AACA,qBAAqB;;AAErB;AACA,qBAAqB;;AAErB;AACA,qBAAqB;;AAErB;AACA,qBAAqB;AACrB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,iEAAe,KAAK;;;;;;;;;;;;;;;AClCpB,iEAAe,cAAc,EAAE,UAAU,EAAE,eAAe,EAAE,gBAAgB,EAAE,UAAU,GAAG,yCAAyC;;;;;;;;;;;;;;;ACApI;AACA;AACA;AACA;AACA;AACe;AACf;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;AClBA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,mDAAmD;;AAEnD;;AAEA,oBAAoB,gBAAgB;AACpC;AACA;AACA,IAAI;AACJ;AACA;AAC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,CAAC,OAAO,EAAE,KAAK,IAAI,EAAE;YACtD,MAAM,WAAW,EAAE,CAAC;QACrB,CAAC,CAAC,CAAC;IACJ,CAAC;IAED,MAAM,iBAAiB,EAAE,CAAC;AAC3B,CAAC","sources":["webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/@openfin/core-web/out/api-client.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/@openfin/core-web/out/main-8cad4070.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/@openfin/core-web/out/main-b14f67c9.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/base64-js/index.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/buffer/index.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/events/events.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/ieee754/index.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_DataView.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_Hash.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_ListCache.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_Map.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_MapCache.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_Promise.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_Set.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_SetCache.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_Stack.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_Symbol.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_Uint8Array.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_WeakMap.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_arrayEach.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_arrayFilter.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_arrayLikeKeys.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_arrayPush.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_arraySome.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_assignValue.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_assocIndexOf.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseAssign.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseAssignIn.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseAssignValue.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseClone.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseCreate.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseGetAllKeys.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseGetTag.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseIsArguments.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseIsEqual.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseIsEqualDeep.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseIsMap.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseIsNative.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseIsSet.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseIsTypedArray.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseKeys.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseKeysIn.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseTimes.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseUnary.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_cacheHas.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_cloneArrayBuffer.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_cloneBuffer.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_cloneDataView.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_cloneRegExp.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_cloneSymbol.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_cloneTypedArray.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_copyArray.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_copyObject.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_copySymbols.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_copySymbolsIn.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_coreJsData.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_defineProperty.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_equalArrays.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_equalByTag.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_equalObjects.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_freeGlobal.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_getAllKeys.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_getAllKeysIn.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_getMapData.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_getNative.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_getPrototype.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_getRawTag.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_getSymbols.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_getSymbolsIn.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_getTag.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_getValue.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_hashClear.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_hashDelete.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_hashGet.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_hashHas.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_hashSet.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_initCloneArray.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_initCloneByTag.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_initCloneObject.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_isIndex.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_isKeyable.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_isMasked.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_isPrototype.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_listCacheClear.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_listCacheDelete.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_listCacheGet.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_listCacheHas.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_listCacheSet.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_mapCacheClear.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_mapCacheDelete.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_mapCacheGet.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_mapCacheHas.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_mapCacheSet.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_mapToArray.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_nativeCreate.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_nativeKeys.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_nativeKeysIn.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_nodeUtil.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_objectToString.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_overArg.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_root.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_setCacheAdd.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_setCacheHas.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_setToArray.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_stackClear.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_stackDelete.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_stackGet.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_stackHas.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_stackSet.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_toSource.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/cloneDeep.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/eq.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/isArguments.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/isArray.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/isArrayLike.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/isBuffer.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/isEqual.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/isFunction.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/isLength.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/isMap.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/isObject.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/isObjectLike.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/isSet.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/isTypedArray.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/keys.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/keysIn.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/stubArray.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/stubFalse.js","webpack://openfin-web--web-interop-support-context-and-intents/./client/src/content/api.ts","webpack://openfin-web--web-interop-support-context-and-intents/./client/src/platform/settings/settings.ts","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/index.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/md5.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/nil.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/parse.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/regex.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/rng.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/sha1.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/stringify.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/v1.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/v3.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/v35.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/v4.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/v5.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/validate.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/version.js","webpack://openfin-web--web-interop-support-context-and-intents/webpack/bootstrap","webpack://openfin-web--web-interop-support-context-and-intents/webpack/runtime/define property getters","webpack://openfin-web--web-interop-support-context-and-intents/webpack/runtime/global","webpack://openfin-web--web-interop-support-context-and-intents/webpack/runtime/hasOwnProperty shorthand","webpack://openfin-web--web-interop-support-context-and-intents/webpack/runtime/make namespace object","webpack://openfin-web--web-interop-support-context-and-intents/webpack/runtime/node module decorator","webpack://openfin-web--web-interop-support-context-and-intents/./client/src/content/fdc3-intent-view.ts"],"sourcesContent":["\"use strict\";var e=require(\"./main-8cad4070.js\");require(\"buffer/\"),require(\"uuid\"),require(\"events\"),require(\"lodash/cloneDeep\"),require(\"lodash/isEqual\"),exports.connect=e.connect;\n","\"use strict\";var e=require(\"buffer/\"),t=require(\"events\"),n=require(\"lodash/cloneDeep\"),i=require(\"lodash/isEqual\"),r=require(\"uuid\");const o=(e,t)=>`${t}<${btoa(JSON.stringify(e))}>`;var s=\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof window?window:\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:{},a={},c={},d={},h={};async function l(e){const t=[];for(const n of e){const e=await n();t.push(e)}return t}Object.defineProperty(h,\"__esModule\",{value:!0}),h.promiseMapSerial=h.serial=h.promiseMap=h.promisify=void 0,h.promisify=function(e){return(...t)=>new Promise(((n,i)=>{e(...t,((e,t)=>e?i(e):n(t)))}))},h.promiseMap=async function(e,t){return Promise.all(e.map(t))},h.serial=l,h.promiseMapSerial=async function(e,t){return l(e.map(((e,n,i)=>()=>t(e,n,i))))};var u,p=s&&s.__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},w=s&&s.__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)};Object.defineProperty(d,\"__esModule\",{value:!0}),d.Reply=d.EmitterBase=d.Base=void 0;const y=h;class f{constructor(e){this.isNodeEnvironment=()=>\"node\"===this.wire.environment.type,this.isOpenFinEnvironment=()=>\"openfin\"===this.wire.environment.type,this.isBrowserEnvironment=()=>\"other\"===this.wire.environment.type,this.wire=e}get fin(){return this.wire.getFin()}get me(){return this.wire.me}}d.Base=f;d.EmitterBase=class extends f{constructor(e,t,...n){super(e),this.topic=t,u.set(this,void 0),this.eventNames=()=>this.hasEmitter()?this.getOrCreateEmitter().eventNames():[],this.emit=(e,t,...n)=>!!this.hasEmitter()&&this.getOrCreateEmitter().emit(e,t,...n),this.hasEmitter=()=>this.wire.eventAggregator.has(w(this,u,\"f\")),this.getOrCreateEmitter=()=>this.wire.eventAggregator.getOrCreate(w(this,u,\"f\")),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[],this.listenerCount=e=>this.hasEmitter()?this.getOrCreateEmitter().listenerCount(e):0,this.registerEventListener=async(e,t={},n,i)=>{const r={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e},o=this.getOrCreateEmitter();n(o);try{await this.wire.sendAction(\"subscribe-to-desktop-event\",r)}catch(e){throw i(o),this.deleteEmitterIfNothingRegistered(o),e}},this.deregisterEventListener=async(e,t={})=>{if(this.hasEmitter()){const n={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e};await this.wire.sendAction(\"unsubscribe-to-desktop-event\",n).catch((()=>null));return this.getOrCreateEmitter()}return Promise.resolve()},p(this,u,[t,...n],\"f\"),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[]}async on(e,t,n){return await this.registerEventListener(e,n,(n=>{n.on(e,t)}),(n=>{n.removeListener(e,t)})),this}async addListener(e,t,n){return this.on(e,t,n)}async once(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.once(e,i),n.once(e,t)}),(n=>{n.removeListener(e,i),n.removeListener(e,t)})),this}async prependListener(e,t,n){return await this.registerEventListener(e,n,(n=>{n.prependListener(e,t)}),(n=>{n.removeListener(e,t)})),this}async prependOnceListener(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.prependOnceListener(e,t),n.once(e,i)}),(n=>{n.removeListener(e,t),n.removeListener(e,i)})),this}async removeListener(e,t,n){const i=await this.deregisterEventListener(e,n);return i&&(i.removeListener(e,t),this.deleteEmitterIfNothingRegistered(i)),this}async deregisterAllListeners(e){const t={...this.identity,type:e,topic:this.topic};if(this.hasEmitter()){const e=this.getOrCreateEmitter(),n=e.listenerCount(t.type),i=[];for(let e=0;enull)));return await Promise.all(i),e}}async removeAllListeners(e){const t=async e=>{const t=await this.deregisterAllListeners(e);t&&(t.removeAllListeners(e),this.deleteEmitterIfNothingRegistered(t))};if(e)await t(e);else if(this.hasEmitter()){const e=this.getOrCreateEmitter().eventNames();await(0,y.promiseMap)(e,t)}return this}deleteEmitterIfNothingRegistered(e){0===e.eventNames().length&&this.wire.eventAggregator.delete(w(this,u,\"f\"))}},u=new WeakMap;d.Reply=class{};var g={};Object.defineProperty(g,\"__esModule\",{value:!0});var m=g.RuntimeError=g.NotSupportedError=g.NotImplementedError=g.NoAckError=g.DuplicateCorrelationError=g.UnexpectedActionError=g.DisconnectedError=void 0;class v extends Error{constructor(e){super(`Expected websocket state OPEN but found ${e}`),this.readyState=e}}g.DisconnectedError=v;class C extends Error{}g.UnexpectedActionError=C;class b extends Error{}g.DuplicateCorrelationError=b;class I extends Error{}g.NoAckError=I;class E extends Error{}g.NotImplementedError=E;class x extends Error{}g.NotSupportedError=x;class A extends Error{constructor(e){const{message:t,name:n,stack:i,...r}=e;super(t),this.name=n||\"Error\",this.stack=i??this.toString(),Object.keys(r).forEach((e=>{this[e]=r[e]}))}}class P extends Error{static getCallSite(e=0){const t=Error.stackTraceLimit,n=e+1;Error.stackTraceLimit=t+n;const i=Error.prepareStackTrace;Error.prepareStackTrace=(e,t)=>t;const r=(new Error).stack?.slice(n)??[];return Error.prepareStackTrace=i,Error.stackTraceLimit=t,r}static prepareStackTrace(e,t){if(\"function\"==typeof Error.prepareStackTrace)return Error.prepareStackTrace(e,t);let n=\"\";n+=e.name||\"Error\",n+=`: ${e.message||\"\"}`;for(const e of t)n+=`\\n at ${e.toString()}`;return n}constructor(e,t){const{reason:n,error:i}=e;super(n),this.name=\"RuntimeError\",i?.stack&&(this.cause=new A(i)),t&&(this.stack=P.prepareStackTrace(this,t))}}m=g.RuntimeError=P;var M={},_={},O={};Object.defineProperty(O,\"__esModule\",{value:!0}),O.validateIdentity=void 0,O.validateIdentity=function(e){let t;return\"object\"==typeof e&&\"string\"==typeof e.uuid||(t=\"Not a valid identity object\"),t};var S={},R={},F={},j={},k={},L={},T={};Object.defineProperty(T,\"__esModule\",{value:!0}),T.handleDeprecatedWarnings=void 0;var $;T.handleDeprecatedWarnings=e=>{(e.contentNavigation?.whitelist||e.contentNavigation?.blacklist||e.contentRedirect?.whitelist||e.contentRedirect?.blacklist)&&console.warn(\"The properties 'whitelist' and 'blacklist' have been marked as deprecated and will be removed in a future version. Please use 'allowlist' and 'denylist'.\")};var B={},G={};Object.defineProperty(G,\"__esModule\",{value:!0}),G.AsyncRetryableLazy=W=G.Lazy=void 0;var W=G.Lazy=class{constructor(e){this.producerFn=e}getValue(){return this.value||(this.value=this.producerFn()),this.value}};G.AsyncRetryableLazy=class{constructor(e){this.producerFn=e}async getValue(){return this.promise||(this.promise=this.producerFn().catch((e=>{throw delete this.promise,e}))),this.promise}};var H={};Object.defineProperty(H,\"__esModule\",{value:!0}),H.WebContents=void 0;const N=d;class D extends N.EmitterBase{constructor(e,t,n){super(e,n,t.uuid,t.name),this.identity=t,this.entityType=n}capturePage(e){return this.wire.sendAction(\"capture-page\",{options:e,...this.identity}).then((({payload:e})=>e.data))}executeJavaScript(e){return this.wire.sendAction(\"execute-javascript-in-window\",{...this.identity,code:e}).then((({payload:e})=>e.data))}getZoomLevel(){return this.wire.sendAction(\"get-zoom-level\",this.identity).then((({payload:e})=>e.data))}setZoomLevel(e){return this.wire.sendAction(\"set-zoom-level\",{...this.identity,level:e}).then((()=>{}))}navigate(e){return this.wire.sendAction(\"navigate-window\",{...this.identity,url:e}).then((()=>{}))}navigateBack(){return this.wire.sendAction(\"navigate-window-back\",{...this.identity}).then((()=>{}))}async navigateForward(){await this.wire.sendAction(\"navigate-window-forward\",{...this.identity})}stopNavigation(){return this.wire.sendAction(\"stop-window-navigation\",{...this.identity}).then((()=>{}))}reload(e=!1){return this.wire.sendAction(\"reload-window\",{ignoreCache:e,...this.identity}).then((()=>{}))}print(e={}){return this.wire.sendAction(\"print\",{...this.identity,options:e}).then((()=>{}))}findInPage(e,t){return this.wire.sendAction(\"find-in-page\",{...this.identity,searchTerm:e,options:t}).then((({payload:e})=>e.data))}stopFindInPage(e){return this.wire.sendAction(\"stop-find-in-page\",{...this.identity,action:e}).then((()=>{}))}getPrinters(){return this.wire.sendAction(\"get-printers\",{...this.identity}).then((({payload:e})=>e.data))}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){await this.wire.sendAction(\"focus-window\",{emitSynthFocused:e,...this.identity})}async showDeveloperTools(){await this.wire.sendAction(\"show-developer-tools\",this.identity)}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction(\"get-process-info\",this.identity);return e}async getSharedWorkers(){return this.wire.sendAction(\"get-shared-workers\",this.identity).then((({payload:e})=>e.data))}async inspectSharedWorker(){await this.wire.sendAction(\"inspect-shared-worker\",{...this.identity})}async inspectSharedWorkerById(e){await this.wire.sendAction(\"inspect-shared-worker-by-id\",{...this.identity,workerId:e})}async inspectServiceWorker(){await this.wire.sendAction(\"inspect-service-worker\",{...this.identity})}async showPopupWindow(e){if(this.wire.sendAction(`${this.entityType}-show-popup-window`,this.identity).catch((()=>{})),e?.onPopupReady){const t=async({popupName:t})=>{try{const n=this.fin.Window.wrapSync({uuid:this.fin.me.uuid,name:t});await e.onPopupReady(n)}catch(e){throw new Error(`Something went wrong during onPopupReady execution: ${e}`)}};await this.once(\"popup-ready\",t)}const{payload:t}=await this.wire.sendAction(\"try-create-popup-window\",{options:{...e,hasResultCallback:!!e?.onPopupResult,hasReadyCallback:!!e?.onPopupReady},...this.identity}),{data:{willOpen:n,options:i}}=t;n&&await this.fin.Window.create(i.initialOptions);if(e?.onPopupResult){const t=async t=>{await e.onPopupResult((e=>{const{name:t,uuid:n,result:i,data:r}=e,o={identity:{name:t,uuid:n},result:i};return r&&(o.data=r),o})(t))},n=async()=>{await this.removeListener(\"popup-result\",t)};await this.on(\"popup-result\",t),await this.once(\"popup-teardown\",n)}const{payload:r}=await this.wire.sendAction(\"show-popup-window\",{options:i,...this.identity});return r.data}}var U,V,z,K,q;function J(){return V||(V=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(function(){if($)return L;$=1,Object.defineProperty(L,\"__esModule\",{value:!0}),L.ViewModule=void 0;const e=d,t=O,n=J(),i=T;class r extends e.Base{async create(e){const{uuid:t}=this.wire.me;if(!e.name||\"string\"!=typeof e.name)throw new Error(\"Please provide a name property as a string in order to create a View.\");return(0,i.handleDeprecatedWarnings)(e),this.wire.environment.childViews?await this.wire.environment.createChildContent({entityType:\"view\",options:{...e,uuid:t}}):await this.wire.sendAction(\"create-view\",{...e,uuid:t}),this.wrapSync({uuid:t,name:e.name})}async wrap(e){this.wire.sendAction(\"view-wrap\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}wrapSync(e){this.wire.sendAction(\"view-wrap-sync\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}getCurrent(){if(this.wire.sendAction(\"view-get-current\").catch((e=>{})),!this.wire.me.isView)throw new Error(\"You are not in a View context\");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction(\"view-get-current-sync\").catch((e=>{})),!this.wire.me.isView)throw new Error(\"You are not in a View context\");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return L.ViewModule=r,L}(),e),n(function(){if(U)return B;var e;U=1,Object.defineProperty(B,\"__esModule\",{value:!0}),B.View=void 0;const t=g,n=G,i=H,r=ie();class o extends i.WebContents{constructor(i,o){super(i,o,\"view\"),this.identity=o,e.set(this,new n.Lazy((()=>this.fin.Platform.wrapSync(this.identity).getClient()))),this.attach=async e=>{await this.wire.sendAction(\"attach-view\",{target:e,...this.identity})},this.destroy=async()=>{await this.wire.sendAction(\"destroy-view\",{...this.identity})},this.show=async()=>{await this.wire.sendAction(\"show-view\",{...this.identity})},this.showAt=async(e,t={})=>{await this.wire.sendAction(\"show-view-at\",{bounds:e,...this.identity,options:t})},this.bringToFront=async()=>{await this.wire.sendAction(\"bring-view-to-front\",{...this.identity})},this.hide=async()=>{await this.wire.sendAction(\"hide-view\",{...this.identity})},this.setBounds=async e=>{await this.wire.sendAction(\"set-view-bounds\",{bounds:e,...this.identity})},this.getBounds=async()=>(await this.wire.sendAction(\"get-view-bounds\",{...this.identity})).payload.data,this.getInfo=async()=>(await this.wire.sendAction(\"get-view-info\",{...this.identity})).payload.data,this.getParentLayout=async()=>(this.wire.sendAction(\"view-get-parent-layout\",{...this.identity}).catch((()=>{})),this.fin.Platform.Layout.getLayoutByViewIdentity(this.identity)),this.getOptions=async()=>this.wire.sendAction(\"get-view-options\",{...this.identity}).then((({payload:e})=>e.data)),this.updateOptions=async e=>this.wire.sendAction(\"update-view-options\",{options:e,...this.identity}).then((()=>{})),this.getCurrentWindow=async()=>{const{payload:{data:e}}=await this.wire.sendAction(\"get-view-window\",{...this.identity});return new r._Window(this.wire,e)},this.getCurrentStack=async()=>{this.wire.sendAction(\"view-get-current-stack\").catch((()=>{}));try{return(await this.getParentLayout()).getStackByViewIdentity(this.identity)}catch(e){throw new t.RuntimeError({reason:\"This view does not belong to a stack.\",error:e})}},this.triggerBeforeUnload=async()=>(await this.wire.sendAction(\"trigger-before-unload\",{...this.identity})).payload.data,this.bindToElement=async e=>{if(!e)throw new Error(\"Element not found.\");return this.wire.environment.observeBounds(e,(async e=>this.setBounds(e)))}}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){const t=await this.getCurrentWindow();await t.focusedWebViewWasChanged(),await super.focus({emitSynthFocused:e})}}return B.View=o,e=new WeakMap,B}(),e)}(k)),k}function Y(){if(z)return j;z=1,Object.defineProperty(j,\"__esModule\",{value:!0}),j.Application=void 0;const e=d,t=ie(),n=J();class i extends e.EmitterBase{constructor(e,n){super(e,\"application\",n.uuid),this.identity=n,this.window=new t._Window(this.wire,{uuid:this.identity.uuid,name:this.identity.uuid})}windowListFromIdentityList(e){const n=[];return e.forEach((e=>{n.push(new t._Window(this.wire,{uuid:e.uuid,name:e.name}))})),n}isRunning(){return this.wire.sendAction(\"is-application-running\",this.identity).then((({payload:e})=>e.data))}async quit(e=!1){try{await this._close(e),await this.wire.sendAction(\"destroy-application\",{force:e,...this.identity})}catch(e){if(![\"Remote connection has closed\",\"Could not locate the requested application\"].some((t=>e.message.includes(t))))throw e}}async _close(e=!1){try{await this.wire.sendAction(\"close-application\",{force:e,...this.identity})}catch(e){if(!e.message.includes(\"Remote connection has closed\"))throw e}}close(e=!1){return console.warn(\"Deprecation Warning: Application.close is deprecated Please use Application.quit\"),this.wire.sendAction(\"application-close\",this.identity).catch((e=>{})),this._close(e)}getChildWindows(){return this.wire.sendAction(\"get-child-windows\",this.identity).then((({payload:e})=>{const t=[];return e.data.forEach((e=>{t.push({uuid:this.identity.uuid,name:e})})),this.windowListFromIdentityList(t)}))}getManifest(){return this.wire.sendAction(\"get-application-manifest\",this.identity).then((({payload:e})=>e.data))}getParentUuid(){return this.wire.sendAction(\"get-parent-application\",this.identity).then((({payload:e})=>e.data))}getShortcuts(){return this.wire.sendAction(\"get-shortcuts\",this.identity).then((({payload:e})=>e.data))}async getViews(){const{payload:e}=await this.wire.sendAction(\"application-get-views\",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}getZoomLevel(){return this.wire.sendAction(\"get-application-zoom-level\",this.identity).then((({payload:e})=>e.data))}getWindow(){return this.wire.sendAction(\"application-get-window\",this.identity).catch((e=>{})),Promise.resolve(this.window)}registerUser(e,t){return this.wire.sendAction(\"register-user\",{userName:e,appName:t,...this.identity}).then((()=>{}))}removeTrayIcon(){return this.wire.sendAction(\"remove-tray-icon\",this.identity).then((()=>{}))}restart(){return this.wire.sendAction(\"restart-application\",this.identity).then((()=>{}))}run(){return console.warn(\"Deprecation Warning: Application.run is deprecated Please use fin.Application.start\"),this.wire.sendAction(\"application-run\",this.identity).catch((e=>{})),this._run()}_run(e={}){return this.wire.sendAction(\"run-application\",{manifestUrl:this._manifestUrl,opts:e,...this.identity}).then((()=>{}))}scheduleRestart(){return this.wire.sendAction(\"relaunch-on-close\",this.identity).then((()=>{}))}async sendApplicationLog(){const{payload:e}=await this.wire.sendAction(\"send-application-log\",this.identity);return e.data}async setJumpList(e){await this.wire.sendAction(\"set-jump-list\",{config:e,...this.identity})}setTrayIcon(e){return this.wire.sendAction(\"set-tray-icon\",{enabledIcon:e,...this.identity}).then((()=>{}))}setShortcuts(e){return this.wire.sendAction(\"set-shortcuts\",{data:e,...this.identity}).then((()=>{}))}async setShortcutQueryParams(e){await this.wire.sendAction(\"set-shortcut-query-args\",{data:e,...this.identity})}setZoomLevel(e){return this.wire.sendAction(\"set-application-zoom-level\",{level:e,...this.identity}).then((()=>{}))}async setAppLogUsername(e){await this.wire.sendAction(\"set-app-log-username\",{data:e,...this.identity})}getTrayIconInfo(){return this.wire.sendAction(\"get-tray-icon-info\",this.identity).then((({payload:e})=>e.data))}hasTrayIcon(){return this.wire.sendAction(\"has-tray-icon\",this.identity).then((({payload:e})=>e.data))}terminate(){return this.wire.sendAction(\"terminate-application\",this.identity).then((()=>{}))}wait(){return this.wire.sendAction(\"wait-for-hung-application\",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction(\"get-info\",this.identity).then((({payload:e})=>e.data))}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction(\"application-get-process-info\",this.identity);return e}async setFileDownloadLocation(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t};await this.wire.sendAction(\"set-file-download-location\",{...n,downloadLocation:e})}async getFileDownloadLocation(){const{payload:{data:e}}=await this.wire.sendAction(\"get-file-download-location\",this.identity);return e}async showTrayIconPopupMenu(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t},{payload:i}=await this.wire.sendAction(\"show-tray-icon-popup-menu\",{...n,options:e});return i.data}async closeTrayIconPopupMenu(){const{name:e}=this.wire.me,t={uuid:this.identity.uuid,name:e};await this.wire.sendAction(\"close-tray-icon-popup-menu\",{...t})}}return j.Application=i,j}function Z(){return q||(q=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(function(){if(K)return F;K=1,Object.defineProperty(F,\"__esModule\",{value:!0}),F.ApplicationModule=void 0;const e=d,t=O,n=Y();class i extends e.Base{async wrap(e){this.wire.sendAction(\"wrap-application\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}wrapSync(e){this.wire.sendAction(\"wrap-application-sync\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}async _create(e){return void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&void 0===e.isPlatformController&&(e.autoShow=!0),await this.wire.sendAction(\"create-application\",e),this.wrap({uuid:e.uuid})}create(e){return console.warn(\"Deprecation Warning: fin.Application.create is deprecated. Please use fin.Application.start\"),this.wire.sendAction(\"application-create\").catch((e=>{})),this._create(e)}async start(e){this.wire.sendAction(\"start-application\").catch((e=>{}));const t=await this._create(e);return await this.wire.sendAction(\"run-application\",{uuid:e.uuid}),t}async startManyManifests(e,t){return this.wire.sendAction(\"run-applications\",{applications:e,opts:t}).then((()=>{}))}getCurrent(){return this.wire.sendAction(\"get-current-application\").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction(\"get-current-application-sync\").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}async startFromManifest(e,t){this.wire.sendAction(\"application-start-from-manifest\").catch((e=>{}));const n=await this._createFromManifest(e);return await n._run(t),n}createFromManifest(e){return console.warn(\"Deprecation Warning: fin.Application.createFromManifest is deprecated. Please use fin.Application.startFromManifest\"),this.wire.sendAction(\"application-create-from-manifest\").catch((e=>{})),this._createFromManifest(e)}_createFromManifest(e){return this.wire.sendAction(\"get-application-manifest\",{manifestUrl:e}).then((({payload:e})=>{const t=e.data.platform?e.data.platform.uuid:e.data.startup_app.uuid;return this.wrap({uuid:t})})).then((t=>(t._manifestUrl=e,t)))}}return F.ApplicationModule=i,F}(),e),n(Y(),e)}(R)),R}H.WebContents=D;var Q={};Object.defineProperty(Q,\"__esModule\",{value:!0}),Q.promisifySubscription=void 0;var X,ee,te;function ne(){if(X)return S;X=1,Object.defineProperty(S,\"__esModule\",{value:!0}),S._Window=void 0;const e=Z(),t=H,n=J(),i=T,r=Q;class o extends t.WebContents{constructor(e,t){super(e,t,\"window\")}async createWindow(e){this.wire.sendAction(\"window-create-window\",this.identity).catch((e=>{}));const t=await(0,r.promisifySubscription)(this,\"fire-constructor-callback\");void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&(e.autoShow=!0),(0,i.handleDeprecatedWarnings)(e);const n=this.wire.environment.createChildContent({entityType:\"window\",options:e}),[o]=await Promise.all([t.getValue(),n]);let s;const{success:a}=o,c=o.data,{message:d}=c;s=a?{httpResponseCode:c.httpResponseCode,apiInjected:c.apiInjected}:{message:c.message,networkErrorCode:c.networkErrorCode,stack:c.stack};const h={message:d,cbPayload:s,success:a};try{this.getWebWindow().fin.__internal_.openerSuccessCBCalled()}catch(e){}return h.success?this:Promise.reject(h)}getAllFrames(){return this.wire.sendAction(\"get-all-frames\",this.identity).then((({payload:e})=>e.data))}getBounds(){return this.wire.sendAction(\"get-window-bounds\",this.identity).then((({payload:e})=>e.data))}center(){return this.wire.sendAction(\"center-window\",this.identity).then((()=>{}))}blur(){return this.wire.sendAction(\"blur-window\",this.identity).then((()=>{}))}bringToFront(){return this.wire.sendAction(\"bring-window-to-front\",this.identity).then((()=>{}))}animate(e,t){return this.wire.sendAction(\"animate-window\",{transitions:e,options:t,...this.identity}).then((()=>{}))}hide(){return this.wire.sendAction(\"hide-window\",this.identity).then((()=>{}))}close(e=!1){return this.wire.sendAction(\"close-window\",{force:e,...this.identity}).then((()=>{Object.setPrototypeOf(this,null)}))}focusedWebViewWasChanged(){return this.wire.sendAction(\"focused-webview-changed\",this.identity).then((()=>{}))}getNativeId(){return this.wire.sendAction(\"get-window-native-id\",this.identity).then((({payload:e})=>e.data))}async getCurrentViews(){const{payload:e}=await this.wire.sendAction(\"window-get-views\",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}disableFrame(){return console.warn(\"Function is deprecated; use disableUserMovement instead.\"),this.wire.sendAction(\"disable-window-frame\",this.identity).then((()=>{}))}disableUserMovement(){return this.wire.sendAction(\"disable-window-frame\",this.identity).then((()=>{}))}enableFrame(){return console.warn(\"Function is deprecated; use enableUserMovement instead.\"),this.wire.sendAction(\"enable-window-frame\",this.identity).then((()=>{}))}enableUserMovement(){return this.wire.sendAction(\"enable-window-frame\",this.identity).then((()=>{}))}flash(){return this.wire.sendAction(\"flash-window\",this.identity).then((()=>{}))}stopFlashing(){return this.wire.sendAction(\"stop-flash-window\",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction(\"get-window-info\",this.identity).then((({payload:e})=>e.data))}async getLayout(e){this.wire.sendAction(\"window-get-layout\",this.identity).catch((e=>{}));const t=await this.getOptions();if(!t.layout&&!t.layoutSnapshot)throw new Error(\"Window does not have a Layout\");return this.fin.Platform.Layout.wrap(e??this.identity)}getOptions(){return this.wire.sendAction(\"get-window-options\",this.identity).then((({payload:e})=>e.data))}getParentApplication(){return this.wire.sendAction(\"window-get-parent-application\",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity))}getParentWindow(){return this.wire.sendAction(\"window-get-parent-window\",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity)).then((e=>e.getWindow()))}async getSnapshot(e){const t={area:e,...this.identity};console.warn(\"Window.getSnapshot has been deprecated, please use Window.capturePage\");return(await this.wire.sendAction(\"get-window-snapshot\",t)).payload.data}getState(){return this.wire.sendAction(\"get-window-state\",this.identity).then((({payload:e})=>e.data))}getWebWindow(){return this.wire.sendAction(\"window-get-web-window\",this.identity).catch((e=>{})),this.wire.environment.getWebWindow(this.identity)}isMainWindow(){return this.wire.sendAction(\"window-is-main-window\",this.identity).catch((e=>{})),this.me.uuid===this.me.name}isShowing(){return this.wire.sendAction(\"is-window-showing\",this.identity).then((({payload:e})=>e.data))}maximize(){return this.wire.sendAction(\"maximize-window\",this.identity).then((()=>{}))}minimize(){return this.wire.sendAction(\"minimize-window\",this.identity).then((()=>{}))}moveBy(e,t,n){return this.wire.sendAction(\"move-window-by\",{deltaLeft:e,deltaTop:t,positioningOptions:n,...this.identity}).then((()=>{}))}moveTo(e,t,n){return this.wire.sendAction(\"move-window\",{left:e,top:t,positioningOptions:n,...this.identity}).then((()=>{}))}resizeBy(e,t,n,i){return this.wire.sendAction(\"resize-window-by\",{deltaWidth:Math.floor(e),deltaHeight:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}resizeTo(e,t,n,i){return this.wire.sendAction(\"resize-window\",{width:Math.floor(e),height:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}restore(){return this.wire.sendAction(\"restore-window\",this.identity).then((()=>{}))}setAsForeground(){return this.wire.sendAction(\"set-foreground-window\",this.identity).then((()=>{}))}setBounds(e,t){return this.wire.sendAction(\"set-window-bounds\",{...e,...this.identity,positioningOptions:t}).then((()=>{}))}show(e=!1){return this.wire.sendAction(\"show-window\",{force:e,...this.identity}).then((()=>{}))}showAt(e,t,n=!1){return this.wire.sendAction(\"show-at-window\",{force:n,left:Math.floor(e),top:Math.floor(t),...this.identity}).then((()=>{}))}updateOptions(e){return this.wire.sendAction(\"update-window-options\",{options:e,...this.identity}).then((()=>{}))}authenticate(e,t){return this.wire.sendAction(\"window-authenticate\",{userName:e,password:t,...this.identity}).then((()=>{}))}async showPopupMenu(e){const{payload:t}=await this.wire.sendAction(\"show-popup-menu\",{options:e,...this.identity});return t.data}async closePopupMenu(){return this.wire.sendAction(\"close-popup-menu\",{...this.identity}).then((()=>{}))}async dispatchPopupResult(e){this.wire.sendAction(\"window-dispatch-popup-result\",this.identity).catch((e=>{})),await this.wire.sendAction(\"dispatch-popup-result\",{data:e,...this.identity})}async print(e={content:\"self\"}){switch(e.content){case void 0:case\"self\":return super.print(e);case\"screenshot\":return this.wire.sendAction(\"print-screenshot\",this.identity).then((()=>{}));case\"views\":return this.wire.sendAction(\"print-views\",{...this.identity,options:e}).then((()=>{}));default:return}}}return S._Window=o,S}function ie(){return te||(te=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(function(){if(ee)return _;ee=1,Object.defineProperty(_,\"__esModule\",{value:!0}),_._WindowModule=void 0;const e=d,t=O,n=ne();class i extends e.Base{async wrap(e){this.wire.sendAction(\"window-wrap\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}wrapSync(e){this.wire.sendAction(\"window-wrap-sync\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}create(e){return this.wire.sendAction(\"create-window\").catch((e=>{})),new n._Window(this.wire,{uuid:this.me.uuid,name:e.name}).createWindow(e)}getCurrent(){if(this.wire.sendAction(\"get-current-window\").catch((e=>{})),!this.wire.me.isWindow)throw new Error(\"You are not in a Window context\");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction(\"get-current-window-sync\").catch((e=>{})),!this.wire.me.isWindow)throw new Error(\"You are not in a Window context\");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return _._WindowModule=i,_}(),e),n(ne(),e)}(M)),M}Q.promisifySubscription=async(e,t,n=(()=>!0),i)=>{let r,o,s;const a=new Promise(((e,t)=>{r=e,o=t})),c=e=>{n(e)&&(clearTimeout(s),r(e))};return await e.on(t,c),i&&(s=setTimeout((()=>o(new Error(\"event timed out\"))),i)),a.finally((()=>{e.removeListener(t,c).catch((()=>null))})),{getValue:()=>a}},Object.defineProperty(c,\"__esModule\",{value:!0}),c.System=void 0;const re=d,oe=g,se=ie(),ae=t;class ce extends re.EmitterBase{constructor(e){super(e,\"system\")}sendExternalProcessRequest(e,t){return new Promise(((n,i)=>{const r=\"external-process-exited\";let o,s,a,c;\"function\"==typeof t.listener&&(a=e=>{const n=e||{};s={topic:\"exited\",uuid:n.processUuid||\"\",exitCode:n.exitCode||0},o===e.processUuid&&(t.listener(s),c.removeListener(r,a))},this.wire.me.name||(this.wire.me.name=this.wire.me.uuid),c=new se._Window(this.wire,this.wire.me),c.on(r,a)),this.wire.sendAction(e,t).then((({payload:e})=>{o=e.data.uuid,n(e.data),s&&o===s.uuid&&(t.listener(s),c.removeListener(r,a))})).catch((e=>{c&&c.removeListener(r,a),i(e)}))}))}getVersion(){return this.wire.sendAction(\"get-version\").then((({payload:e})=>e.data))}clearCache(e){return this.wire.sendAction(\"clear-cache\",e).then((()=>{}))}deleteCacheOnExit(){return this.wire.sendAction(\"delete-cache-request\").then((()=>{}))}exit(){return this.wire.sendAction(\"exit-desktop\").then((()=>{}))}async fetchManifest(e){const{payload:{data:t}}=await this.wire.sendAction(\"fetch-manifest\",{manifestUrl:e});return t}flushCookieStore(){return this.wire.sendAction(\"flush-cookie-store\").then((()=>{}))}getAllWindows(){return this.wire.sendAction(\"get-all-windows\").then((({payload:e})=>e.data))}getAllApplications(){return this.wire.sendAction(\"get-all-applications\").then((({payload:e})=>e.data))}getCommandLineArguments(){return this.wire.sendAction(\"get-command-line-arguments\").then((({payload:e})=>e.data))}async getCrashReporterState(){const{payload:{data:{diagnosticMode:e,isRunning:t}}}=await this.wire.sendAction(\"get-crash-reporter-state\");return console.warn(\"diagnosticMode property is deprecated. It will be removed in a future version\"),{diagnosticMode:e,diagnosticsMode:e,isRunning:t}}async startCrashReporter(e){const t=e,n={...t,diagnosticMode:t.diagnosticsMode||t.diagnosticMode},{payload:{data:{diagnosticMode:i,isRunning:r}}}=await this.wire.sendAction(\"start-crash-reporter\",n);return{diagnosticMode:i,diagnosticsMode:i,isRunning:r}}getUniqueUserId(){return this.wire.sendAction(\"get-unique-user-id\").then((({payload:e})=>e.data))}getEntityInfo(e,t){return this.wire.sendAction(\"get-entity-info\",{uuid:e,name:t}).then((({payload:e})=>e.data))}getEnvironmentVariable(e){return this.wire.sendAction(\"get-environment-variable\",{environmentVariables:e}).then((({payload:e})=>e.data))}getFocusedWindow(){return this.wire.sendAction(\"get-focused-window\").then((({payload:e})=>e.data))}async isAppCertified(e){const{payload:{data:{certifiedInfo:t}}}=await this.wire.sendAction(\"is-app-certified\",{manifestUrl:e});return t}getInstalledRuntimes(){return this.wire.sendAction(\"get-installed-runtimes\").then((({payload:e})=>e.data.runtimes))}async getInstalledApps(){const{payload:{data:{installedApps:e}}}=await this.wire.sendAction(\"get-installed-apps\");return e}getLog(e){return this.wire.sendAction(\"view-log\",e).then((({payload:e})=>e.data))}getMachineId(){return this.wire.sendAction(\"get-machine-id\").then((({payload:e})=>e.data))}getMinLogLevel(){return this.wire.sendAction(\"get-min-log-level\").then((({payload:e})=>e.data))}getLogList(){return this.wire.sendAction(\"list-logs\").then((({payload:e})=>e.data))}getMonitorInfo(){return this.wire.sendAction(\"get-monitor-info\").then((({payload:e})=>e.data))}getMousePosition(){return this.wire.sendAction(\"get-mouse-position\").then((({payload:e})=>e.data))}getProcessList(){return console.warn(\"System.getProcessList has been deprecated. Please consider using our new process APIs: Window.getProcessInfo, View.getProcessInfo, Application.getProcessInfo, System.getAllProcessInfo\"),this.wire.sendAction(\"process-snapshot\").then((({payload:e})=>e.data))}async getAllProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction(\"get-all-process-info\",this.identity);return e}getProxySettings(){return this.wire.sendAction(\"get-proxy-settings\").then((({payload:e})=>e.data))}getRuntimeInfo(){return this.wire.sendAction(\"get-runtime-info\").then((({payload:e})=>e.data))}getRvmInfo(){return this.wire.sendAction(\"get-rvm-info\").then((({payload:e})=>e.data))}getHostSpecs(){return this.wire.sendAction(\"get-host-specs\").then((({payload:e})=>e.data))}getOSInfo(){return this.wire.sendAction(\"get-os-info\").then((({payload:e})=>e.data))}launchExternalProcess(e){return this.sendExternalProcessRequest(\"launch-external-process\",e)}monitorExternalProcess(e){return this.sendExternalProcessRequest(\"monitor-external-process\",e)}log(e,t){return this.wire.sendAction(\"write-to-log\",{level:e,message:t}).then((()=>{}))}openUrlWithBrowser(e){return this.wire.sendAction(\"open-url-with-browser\",{url:e}).then((()=>{}))}async registerCustomProtocol(e){if(\"object\"!=typeof e)throw new Error(\"Must provide an object with a `protocolName` property having a string value.\");await this.wire.sendAction(\"register-custom-protocol\",e)}async unregisterCustomProtocol(e){await this.wire.sendAction(\"unregister-custom-protocol\",{protocolName:e})}async getCustomProtocolState(e){return this.wire.sendAction(\"get-custom-protocol-state\",{protocolName:e}).then((({payload:e})=>e.data))}releaseExternalProcess(e){return this.wire.sendAction(\"release-external-process\",{uuid:e}).then((()=>{}))}showDeveloperTools(e){return this.wire.sendAction(\"show-developer-tools\",e).then((()=>{}))}terminateExternalProcess(e){return this.wire.sendAction(\"terminate-external-process\",e).then((()=>{}))}updateProxySettings(e){return this.wire.sendAction(\"update-proxy\",e).then((()=>{}))}async downloadAsset(e,t){const n=()=>{};let i=n,r=n;const o=new Promise(((e,t)=>{i=e,r=t}));if(\"openfin\"!==this.wire.environment.type)throw new oe.NotSupportedError(\"downloadAsset only supported in an OpenFin Render process\");const s=oe.RuntimeError.getCallSite(),a=this.wire.environment.getNextMessageId().toString(),c=`asset-download-progress-${a}`,d=`asset-download-error-${a}`,h=`asset-download-complete-${a}`,l=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},u=()=>{this.removeListener(c,l)};await Promise.all([this.on(c,l),this.once(d,(e=>{u();const{reason:t,err:n}=e;r(new oe.RuntimeError({reason:t,error:n},s))})),this.once(h,(()=>{u(),i()}))]);const p=Object.assign(e,{downloadId:a});return await this.wire.sendAction(\"download-asset\",p).catch((e=>{throw u(),e})),o}downloadRuntime(e,t){const n=oe.RuntimeError.getCallSite();return new Promise(((i,r)=>{if(\"openfin\"!==this.wire.environment.type)return void r(new oe.NotSupportedError(\"downloadRuntime only supported in an OpenFin Render process\"));const o=this.wire.environment.getNextMessageId().toString(),s=`runtime-download-progress-${o}`,a=`runtime-download-error-${o}`,c=`runtime-download-complete-${o}`,d=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},h=()=>{this.removeListener(s,d)};this.on(s,d),this.once(a,(e=>{h();const{reason:t,err:i}=e;r(new oe.RuntimeError({reason:t,error:i},n))})),this.once(c,(()=>{h(),i()}));const l=Object.assign(e,{downloadId:o});this.wire.sendAction(\"download-runtime\",l).catch((e=>{h(),r(e)}))}))}downloadPreloadScripts(e){return this.wire.sendAction(\"download-preload-scripts\",{scripts:e}).then((({payload:e})=>e.data))}getAllExternalApplications(){return this.wire.sendAction(\"get-all-external-applications\").then((({payload:e})=>e.data))}getAppAssetInfo(e){return this.wire.sendAction(\"get-app-asset-info\",e).then((({payload:e})=>e.data))}getCookies(e){const t=this.wire.environment.getUrl(),n=Object.assign(e,{url:t});return this.wire.sendAction(\"get-cookies\",n).then((({payload:e})=>e.data))}setMinLogLevel(e){return this.wire.sendAction(\"set-min-log-level\",{level:e}).then((()=>{}))}resolveUuid(e){return this.wire.sendAction(\"resolve-uuid\",{entityKey:e}).then((({payload:e})=>e.data))}executeOnRemote(e,t){return t.requestingIdentity=e,this.wire.ferryAction(t)}readRegistryValue(e,t,n){return this.wire.sendAction(\"read-registry-value\",{rootKey:e,subkey:t,value:n}).then((({payload:e})=>e.data))}registerExternalConnection(e){return this.wire.sendAction(\"register-external-connection\",{uuid:e}).then((({payload:e})=>e.data))}async getServiceConfiguration(e){if(\"string\"!=typeof e.name)throw new Error(\"Must provide an object with a `name` property having a string value\");const{name:t}=e;return this.wire.sendAction(\"get-service-configuration\",{name:t}).then((({payload:e})=>e.data))}async getSystemAppConfig(e){if(\"string\"!=typeof e)throw new Error(\"Must provide a string value for name of system app\");return this.wire.sendAction(\"get-system-app-configuration\",{name:e}).then((({payload:e})=>e.data))}async registerShutdownHandler(e){this.wire.sendAction(\"system-register-shutdown-handler\").catch((e=>{}));const{uuid:t,name:n}=this.wire.me;this.on(\"system-shutdown\",(i=>{e({proceed:()=>{this.wire.environment.raiseEvent(\"application/system-shutdown-handled\",{uuid:t,name:n,topic:\"application\"})}})}))}runRvmHealthCheck(){return this.wire.sendAction(\"run-rvm-health-check\").then((({payload:e})=>e.data))}async launchManifest(e,t={}){const{subscribe:n,...i}=t,r=i;if(n){const e=new ae.EventEmitter;n(e);const t=\"app-version-progress\",i=\"runtime-status\",o=\"app-version-complete\",s=\"app-version-error\",a=this.wire.environment.getNextMessageId().toString();r.appVersionId=a;const c=[o,t,i,s],d=e=>{const{appVersionId:t,topic:n,type:i,...r}=e;return{...r,type:c.find((e=>i.includes(e)))}},h=t=>{const n=d(t);e.emit(n.type,n)},l=()=>{this.removeListener(`${t}.${a}`,h),this.removeListener(`${i}.${a}`,h),this.removeListener(`${o}.${a}`,h),this.removeListener(`${s}.${a}`,h),this.removeListener(`${o}.${a}`,l),this.removeListener(`${s}.${a}`,l)};await Promise.all([this.on(`${t}.${a}`,h),this.on(`${i}.${a}`,h),this.once(`${o}.${a}`,h),this.once(`${s}.${a}`,h),this.once(`${o}.${a}`,l),this.once(`${s}.${a}`,l)])}return(await this.wire.sendAction(\"launch-manifest\",{manifestUrl:e,opts:r})).payload.data.manifest}async queryPermissionForCurrentContext(e){const t={uuid:this.wire.me.uuid,name:this.wire.me.name};return(await this.wire.sendAction(\"query-permission-for-current-context\",{apiName:e,identity:t})).payload.data}async enableNativeWindowIntegrationProvider(e){const{payload:t}=await this.wire.sendAction(\"enable-native-window-integration-provider\",{permissions:e});return t.data}async registerUsage({data:e,type:t}){await this.wire.sendAction(\"register-usage\",{data:e,type:t})}async getPrinters(){const{payload:e}=await this.wire.sendAction(\"system-get-printers\");return e.data}async updateProcessLoggingOptions(e){await this.wire.sendAction(\"system-update-process-logging-options\",{options:e})}async getDomainSettings(){const{payload:{data:e}}=await this.wire.sendAction(\"get-domain-settings\",this.identity);return e}async setDomainSettings(e){await this.wire.sendAction(\"set-domain-settings\",{domainSettings:e,...this.identity})}async refreshExtensions(){const{payload:e}=await this.wire.sendAction(\"refresh-extensions\");return e.data}async getInstalledExtensions(){const{payload:e}=await this.wire.sendAction(\"get-installed-extensions\");return e.data}}c.System=ce;var de={},he={};Object.defineProperty(he,\"__esModule\",{value:!0}),he.RefCounter=void 0;he.RefCounter=class{constructor(){this.topicRefMap=new Map}incRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t+1;n=i,this.topicRefMap.set(e,i)}else this.topicRefMap.set(e,1),n=1;return n}decRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t-1;this.topicRefMap.set(e,i),n=i}else n=-1;return n}actOnFirst(e,t,n){return 1===this.incRefCount(e)?t():n()}actOnLast(e,t,n){return 0===this.decRefCount(e)?t():n()}};var le={},ue={},pe={};Object.defineProperty(pe,\"__esModule\",{value:!0}),pe.ChannelBase=pe.ProtectedItems=void 0;const we=e=>async(t,n,i)=>{const r=await e(t,n,i);return void 0===r?n:r};pe.ProtectedItems=class{constructor(e,t){this.providerIdentity=e,this.close=t}};class ye{static defaultAction(e){throw new Error(`No action registered at target for ${e}`)}constructor(){this.subscriptions=new Map}async processAction(e,t,n){try{const i=this.subscriptions.has(e)?this.subscriptions.get(e):(t,n)=>(this.defaultAction??ye.defaultAction)(e,t,n),r=this.preAction?await this.preAction(e,t,n):t,o=await i(r,n);return this.postAction?await this.postAction(e,o,n):o}catch(t){if(this.errorMiddleware)return this.errorMiddleware(e,t,n);throw t}}beforeAction(e){if(this.preAction)throw new Error(\"Already registered beforeAction middleware\");this.preAction=we(e)}onError(e){if(this.errorMiddleware)throw new Error(\"Already registered error middleware\");this.errorMiddleware=e}afterAction(e){if(this.postAction)throw new Error(\"Already registered afterAction middleware\");this.postAction=we(e)}remove(e){this.subscriptions.delete(e)}setDefaultAction(e){if(this.defaultAction)throw new Error(\"default action can only be set once\");this.defaultAction=e}register(e,t){if(this.subscriptions.has(e))throw new Error(`Subscription already registered for action: ${e}. Unsubscribe before adding new subscription`);return this.subscriptions.set(e,t),!0}}pe.ChannelBase=ye;var fe,ge,me,ve=s&&s.__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)},Ce=s&&s.__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};Object.defineProperty(ue,\"__esModule\",{value:!0}),ue.ChannelClient=void 0;const be=pe,Ie=new Map;class Ee extends be.ChannelBase{static closeChannelByEndpointId(e){const t=Ie.get(e);t&&ve(t,me,\"f\").call(t)}static handleProviderDisconnect(e){for(const t of Ie.values())t.providerIdentity.channelId===e.channelId&&(t.disconnectListener(e),ve(t,me,\"f\").call(t))}constructor(e,t,n){super(),fe.set(this,void 0),ge.set(this,void 0),this.processAction=(e,t,n)=>super.processAction(e,t,n),me.set(this,(()=>{Ie.delete(this.endpointId),ve(this,ge,\"f\").close()})),Ce(this,fe,new be.ProtectedItems(e,t),\"f\"),this.disconnectListener=()=>{},this.endpointId=e.endpointId,Ce(this,ge,n,\"f\"),Ie.set(this.endpointId,this),n.receive(this.processAction)}get providerIdentity(){return ve(this,fe,\"f\").providerIdentity}async dispatch(e,t){if(ve(this,ge,\"f\").isEndpointConnected(this.providerIdentity.channelId))return ve(this,ge,\"f\").send(this.providerIdentity.channelId,e,t);throw new Error(\"The client you are trying to dispatch from is disconnected from the target provider.\")}onDisconnection(e){this.disconnectListener=t=>{try{e(t)}catch(e){throw new Error(`Error while calling the onDisconnection callback: ${e.message}`)}finally{this.disconnectListener=()=>{}}}}async disconnect(){await this.sendDisconnectAction(),ve(this,me,\"f\").call(this)}async sendDisconnectAction(){const e=ve(this,fe,\"f\");await e.close()}static async wireClose(e,t,n){const{channelName:i,uuid:r,name:o}=t;await e.sendAction(\"disconnect-from-channel\",{channelName:i,uuid:r,name:o,endpointId:n})}}ue.ChannelClient=Ee,fe=new WeakMap,ge=new WeakMap,me=new WeakMap;var xe={},Ae={};Object.defineProperty(Ae,\"__esModule\",{value:!0}),Ae.exhaustiveCheck=void 0,Ae.exhaustiveCheck=function(e,t){throw new Error(`Unsupported value: ${e}${t?`\\n Supported values are: ${t.join(\"\")}`:\"\"}`)};var Pe,Me,_e,Oe={},Se=s&&s.__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},Re=s&&s.__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)};Object.defineProperty(Oe,\"__esModule\",{value:!0}),Oe.ClassicInfo=Oe.ClassicStrategy=void 0;Oe.ClassicStrategy=class{constructor(e,t,n,i){this.messageReceiver=t,this.endpointId=n,this.providerIdentity=i,Pe.set(this,void 0),Me.set(this,new Map),_e.set(this,new Map),this.send=async(e,t,n)=>{const i=Re(this,Me,\"f\").get(e);if(!i)throw new Error(`Could not locate routing info for endpoint ${e}`);const r={...i};r.isLocalEndpointId&&delete r.endpointId,delete r.isLocalEndpointId;const o=Re(this,Pe,\"f\").sendAction(\"send-channel-message\",{...r,providerIdentity:this.providerIdentity,action:t,payload:n});Re(this,_e,\"f\").get(e)?.add(o);return(await o.catch((e=>{throw new Error(e.message)})).finally((()=>{Re(this,_e,\"f\").get(e)?.delete(o)}))).payload.data.result},this.close=async()=>{this.messageReceiver.removeEndpoint(this.providerIdentity.channelId,this.endpointId),[...Re(this,Me,\"f\").keys()].forEach((e=>this.closeEndpoint(e))),Se(this,Me,new Map,\"f\")},Se(this,Pe,e,\"f\")}onEndpointDisconnect(e,t){}receive(e){this.messageReceiver.addEndpoint(e,this.providerIdentity.channelId,this.endpointId)}async closeEndpoint(e){const t=Re(this,Me,\"f\").get(e);Re(this,Me,\"f\").delete(e);const n=Re(this,_e,\"f\").get(e);n?.forEach((n=>{const i=`Channel connection with identity uuid: ${t?.uuid} / name: ${t?.name} / endpointId: ${e} no longer connected.`;n.cancel(new Error(i))}))}isEndpointConnected(e){return Re(this,Me,\"f\").has(e)}addEndpoint(e,t){Re(this,Me,\"f\").set(e,t.endpointIdentity),Re(this,_e,\"f\").set(e,new Set)}isValidEndpointPayload(e){return\"string\"==typeof e?.endpointIdentity?.endpointId||\"string\"==typeof e?.endpointIdentity?.channelId}},Pe=new WeakMap,Me=new WeakMap,_e=new WeakMap,Oe.ClassicInfo={version:5,minimumVersion:0,type:\"classic\"};var Fe={},je={},ke={};Object.defineProperty(ke,\"__esModule\",{value:!0}),ke.errorToPOJO=void 0,ke.errorToPOJO=function(e){return{stack:e.stack,name:e.name,message:e.message,toString:()=>e.stack||e.toString()}};var Le,Te,$e=s&&s.__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)},Be=s&&s.__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};Object.defineProperty(je,\"__esModule\",{value:!0}),je.RTCEndpoint=void 0;const Ge=ke;je.RTCEndpoint=class{static isValidEndpointPayload(e){const t=e=>\"object\"==typeof e&&null!==e;return t(e)&&t(e.endpointIdentity)&&t(e.rtc)&&\"string\"==typeof e.endpointIdentity.endpointId}constructor({rtc:e,endpointIdentity:t}){this.responseMap=new Map,Le.set(this,null),Te.set(this,void 0),this.connectionStateChangeHandler=e=>{\"connected\"!==this.rtc.rtcClient.connectionState&&(this.rtc.rtcClient.removeEventListener(\"connectionstatechange\",this.connectionStateChangeHandler),this.close(),$e(this,Te,\"f\")&&$e(this,Te,\"f\").call(this))},this.send=async(e,t)=>{const n=`message-${Math.random()}`,i=new Promise(((e,t)=>{this.responseMap.set(n,{resolve:e,reject:t})}));return this.rtc.channels.request.send(JSON.stringify({action:e,payload:t,messageId:n})),i},this.close=()=>{this.responseMap.forEach((e=>e.reject(\"Connection has closed.\"))),this.responseMap=new Map,this.rtc.channels.request.close(),this.rtc.channels.response.close(),this.rtc.rtcClient.close()},this.rtc=e,this.endpointIdentity=t,this.rtc.channels.response.addEventListener(\"message\",(e=>{let{data:t}=e;e.data instanceof ArrayBuffer&&(t=(new TextDecoder).decode(e.data));const{messageId:n,payload:i,success:r,error:o}=JSON.parse(t),{resolve:s,reject:a}=this.responseMap.get(n)??{};s&&a?(this.responseMap.delete(n),r?s(i):a(o)):(console.log(\"Could not find id in responseMap.\"),console.log(e))})),this.rtc.channels.request.addEventListener(\"message\",(async e=>{let{data:n}=e;e.data instanceof ArrayBuffer&&(n=(new TextDecoder).decode(e.data));const{messageId:i,action:r,payload:o}=JSON.parse(n);if($e(this,Le,\"f\"))try{const e=await $e(this,Le,\"f\").call(this,r,o,t);this.rtc.channels.response.send(JSON.stringify({messageId:i,payload:e,success:!0}))}catch(e){\"open\"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,error:(0,Ge.errorToPOJO)(e),success:!1}))}else\"open\"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,success:!1,error:\"Connection not ready.\"}))})),this.rtc.rtcClient.addEventListener(\"connectionstatechange\",this.connectionStateChangeHandler),Object.values(this.rtc.channels).forEach((e=>{e.onclose=e=>{[...this.responseMap.values()].forEach((e=>e.reject(new Error(\"RTCDataChannel closed unexpectedly, this is most commonly caused by message size. Note: RTC Channels have a message size limit of ~255kB.\")))),this.close(),$e(this,Te,\"f\")&&$e(this,Te,\"f\").call(this)}}))}onDisconnect(e){if($e(this,Te,\"f\"))throw new Error(\"RTCEndpoint disconnectListener cannot be set twice.\");Be(this,Te,e,\"f\")}receive(e){if($e(this,Le,\"f\"))throw new Error(\"You have already set a listener for this RTC Endpoint.\");Be(this,Le,e,\"f\")}get connected(){return\"connected\"===this.rtc.rtcClient.connectionState}},Le=new WeakMap,Te=new WeakMap;var We,He,Ne,De={},Ue=s&&s.__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)},Ve=s&&s.__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};Object.defineProperty(De,\"__esModule\",{value:!0}),De.EndpointStrategy=void 0;De.EndpointStrategy=class{constructor(e,t,n){this.EndpointType=e,this.StrategyName=n,We.set(this,null),He.set(this,new Map),Ne.set(this,!0),this.send=async(e,t,n)=>this.getEndpointById(e).send(t,n),this.close=async()=>{Ue(this,Ne,\"f\")&&(Ue(this,He,\"f\").forEach((e=>e.close())),Ve(this,He,new Map,\"f\")),Ve(this,Ne,!1,\"f\")},this.isValidEndpointPayload=t}onEndpointDisconnect(e,t){this.getEndpointById(e).onDisconnect(t)}receive(e){if(Ue(this,We,\"f\"))throw new Error(`You have already set a listener for this ${this.StrategyName} Strategy`);Ve(this,We,e,\"f\"),Ue(this,He,\"f\").forEach((e=>e.receive(Ue(this,We,\"f\"))))}getEndpointById(e){const t=Ue(this,He,\"f\").get(e);if(!t)throw new Error(`Client with endpoint id ${e} is not connected`);return t}get connected(){return Ue(this,Ne,\"f\")}isEndpointConnected(e){return Ue(this,He,\"f\").has(e)}addEndpoint(e,t){if(!Ue(this,Ne,\"f\"))return void console.warn(`Adding endpoint to disconnected ${this.StrategyName} Strategy`);const n=new this.EndpointType(t);Ue(this,We,\"f\")&&n.receive(Ue(this,We,\"f\")),Ue(this,He,\"f\").set(e,n)}async closeEndpoint(e){Ue(this,He,\"f\").delete(e)}},We=new WeakMap,He=new WeakMap,Ne=new WeakMap,Object.defineProperty(Fe,\"__esModule\",{value:!0}),Fe.RTCInfo=Fe.RTCStrategy=void 0;const ze=je,Ke=De;class qe extends Ke.EndpointStrategy{constructor(){super(ze.RTCEndpoint,ze.RTCEndpoint.isValidEndpointPayload,\"RTC\")}}Fe.RTCStrategy=qe,Fe.RTCInfo={version:2,minimumVersion:0,type:\"rtc\"};var Je={};Object.defineProperty(Je,\"__esModule\",{value:!0}),Je.RTCICEManager=void 0;const Ye=d;class Ze extends Ye.EmitterBase{constructor(e){super(e,\"channel\"),this.ensureChannelOpened=e=>new Promise(((t,n)=>{if(\"open\"===e.readyState)t();else if(\"connecting\"===e.readyState){const n=()=>{e.removeEventListener(\"open\",n),t()};e.addEventListener(\"open\",n)}else n(new Error(\"This Channel has already closed\"))}))}static createDataChannelPromise(e,t){let n;const i=new Promise((e=>{n=e})),r=i=>{const o=()=>{i.channel.removeEventListener(\"open\",o),n(i.channel)};i.channel.label===e&&(i.channel.addEventListener(\"open\",o),t.removeEventListener(\"datachannel\",r))};return t.addEventListener(\"datachannel\",r),i}async listenForProviderIce(e,t){await this.on(this.createProviderEventName(e),t,{timestamp:Date.now()})}async raiseProviderIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createProviderEventName(e)),t)}async listenForClientIce(e,t){await this.on(this.createClientEventName(e),t,{timestamp:Date.now()})}async raiseClientIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createClientEventName(e)),t)}cleanupIceListeners(e){this.removeAllListeners(this.createClientEventName(e)),this.removeAllListeners(this.createProviderEventName(e))}createClientEventName(e){return`ice-client-${e}`}createProviderEventName(e){return`ice-provider-${e}`}createRouteString(e){return`channel/${e}`}createRtcPeer(){return this.wire.environment.getRtcPeer()}async startClientOffer(){const e=Math.random().toString(),t=this.createRtcPeer();t.addEventListener(\"icecandidate\",(async t=>{t.candidate&&await this.raiseClientIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForProviderIce(e,(async e=>{await t.addIceCandidate(e.candidate)}));const n={request:t.createDataChannel(\"request\"),response:t.createDataChannel(\"response\")},i=await t.createOffer();await t.setLocalDescription(i);const r=Promise.all([n.request,n.response].map(this.ensureChannelOpened)).then((()=>{}));return{rtcClient:t,channels:n,offer:i,rtcConnectionId:e,channelsOpened:r}}async finishClientOffer(e,t,n){return await e.setRemoteDescription(t),await n,!0}async createProviderAnswer(e,t){const n=this.createRtcPeer(),i=Ze.createDataChannelPromise(\"request\",n),r=Ze.createDataChannelPromise(\"response\",n);n.addEventListener(\"icecandidate\",(async t=>{t.candidate&&await this.raiseProviderIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForClientIce(e,(async e=>{await n.addIceCandidate(e.candidate)})),await n.setRemoteDescription(t);const o=await n.createAnswer();await n.setLocalDescription(o);const s=Promise.all([i,r]).then((([t,n])=>(this.cleanupIceListeners(e),{request:t,response:n})));return{rtcClient:n,answer:o,channels:s}}}Je.RTCICEManager=Ze;var Qe={},Xe={};function et(e){return[...e.split(\".\").reverse().entries()].reduce(((e,[t,n])=>e+ +n*1e4**t),0)}function tt(e,t){return et(e)>=et(t)}function nt(e){return e.split(\"/\")[0]}Object.defineProperty(Xe,\"__esModule\",{value:!0}),Xe.runtimeUuidMeetsMinimumRuntimeVersion=Xe.parseRuntimeUuid=Xe.meetsMinimumRuntimeVersion=void 0,Xe.meetsMinimumRuntimeVersion=tt,Xe.parseRuntimeUuid=nt,Xe.runtimeUuidMeetsMinimumRuntimeVersion=function(e,t){return tt(nt(e),t)};var it,rt,ot,st,at,ct=s&&s.__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)},dt=s&&s.__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};Object.defineProperty(Qe,\"__esModule\",{value:!0}),Qe.ChannelProvider=void 0;const ht=pe,lt=Xe;class ut extends ht.ChannelBase{get connections(){return[...ct(this,it,\"f\")]}static handleClientDisconnection(e,t){const n=e.connections.find((e=>e.endpointId===t.endpointId));if(n)ct(e,st,\"f\").call(e,n);else{e.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name)).forEach(ct(e,st,\"f\"))}e.disconnectListener(t)}static setProviderRemoval(e,t){ut.removalMap.set(e,t)}constructor(e,t,n){super(),it.set(this,void 0),rt.set(this,void 0),ot.set(this,void 0),st.set(this,(e=>{const t=this.connections.filter((t=>t.endpointId!==e.endpointId));ct(this,ot,\"f\").closeEndpoint(e.endpointId),dt(this,it,t,\"f\")})),this.processAction=async(e,t,n)=>(ut.clientIsMultiRuntime(n)&&!(0,lt.runtimeUuidMeetsMinimumRuntimeVersion)(n.runtimeUuid,\"18.87.56.0\")?this.handleMultiRuntimeLegacyClient(n):this.checkForClientConnection(n),super.processAction(e,t,n)),at.set(this,(()=>{ct(this,ot,\"f\").close();const e=ut.removalMap.get(this);e&&e()})),dt(this,rt,new ht.ProtectedItems(e,t),\"f\"),this.connectListener=()=>{},this.disconnectListener=()=>{},dt(this,it,[],\"f\"),dt(this,ot,n,\"f\"),n.receive(this.processAction)}dispatch(e,t,n){const i=e.endpointId??this.getEndpointIdForOpenFinId(e,t);return i&&ct(this,ot,\"f\").isEndpointConnected(i)?ct(this,ot,\"f\").send(i,t,n):Promise.reject(new Error(`Client connection with identity uuid: ${e.uuid} / name: ${e.name} / endpointId: ${i} no longer connected.`))}async processConnection(e,t){return ct(this,it,\"f\").push(e),this.connectListener(e,t)}publish(e,t){return this.connections.map((n=>ct(this,ot,\"f\").send(n.endpointId,e,t)))}onConnection(e){this.connectListener=e}onDisconnection(e){this.disconnectListener=e}async destroy(){const e=ct(this,rt,\"f\");e.providerIdentity,dt(this,it,[],\"f\"),await e.close(),ct(this,at,\"f\").call(this)}async getAllClientInfo(){return this.connections.map((e=>{const{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}=e;return{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}}))}checkForClientConnection(e){if(!this.isClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider.\\n Client Identity: {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}isClientConnected(e){return ut.clientIdentityIncludesEndpointId(e)?this.connections.some((t=>t.endpointId===e.endpointId&&t.uuid===e.uuid&&t.name===e.name)):this.isLegacyClientConnected(e)}isLegacyClientConnected(e){return this.connections.some((t=>t.uuid===e.uuid&&t.name===e.name))}handleMultiRuntimeLegacyClient(e){if(!this.isLegacyClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider. Client Identity:\\n {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}getEndpointIdForOpenFinId(e,t){const n=this.connections.filter((t=>t.name===e.name&&t.uuid===e.uuid));if(n.length>=2){const n=ct(this,rt,\"f\"),{uuid:i,name:r}=e,o=n?.providerIdentity.uuid,s=n?.providerIdentity.name;console.warn(`WARNING: Dispatch call may have unintended results. The \"to\" argument of your dispatch call is missing the\\n \"endpointId\" parameter. The identity you are dispatching to ({uuid: ${i}, name: ${r}})\\n has multiple channelClients for this channel. Your dispatched action: (${t}) from the provider:\\n ({uuid: ${o}, name: ${s}}) will only be processed by the most recently-created client.`)}return n.pop()?.endpointId}static clientIdentityIncludesEndpointId(e){return void 0!==e.endpointId}static clientIsMultiRuntime(e){return void 0!==e.runtimeUuid}static async wireClose(e,t){await e.sendAction(\"destroy-channel\",{channelName:t})}}Qe.ChannelProvider=ut,it=new WeakMap,rt=new WeakMap,ot=new WeakMap,st=new WeakMap,at=new WeakMap,ut.removalMap=new WeakMap;var pt={};Object.defineProperty(pt,\"__esModule\",{value:!0}),pt.MessageReceiver=void 0;const wt=ue,yt=d;class ft extends yt.Base{constructor(e){super(e),this.onmessage=e=>\"process-channel-message\"===e.action&&(this.processChannelMessage(e),!0),this.endpointMap=new Map,this.latestEndpointIdByChannelId=new Map,e.registerMessageHandler(this.onmessage.bind(this))}async processChannelMessage(e){const{senderIdentity:t,providerIdentity:n,action:i,ackToSender:r,payload:o,intendedTargetIdentity:s}=e.payload,a=s.channelId??s.endpointId??this.latestEndpointIdByChannelId.get(n.channelId),c=this.endpointMap.get(a);if(!c)return r.payload.success=!1,r.payload.reason=`Client connection with identity uuid: ${this.wire.me.uuid} / name: ${this.wire.me.name} / endpointId: ${a} no longer connected.`,this.wire.sendRaw(r);try{const e=await c(i,o,t);return r.payload.payload=r.payload.payload||{},r.payload.payload.result=e,this.wire.sendRaw(r)}catch(e){return r.payload.success=!1,r.payload.reason=e.message,this.wire.sendRaw(r)}}addEndpoint(e,t,n){this.endpointMap.set(n,e),t!==n&&this.latestEndpointIdByChannelId.set(t,n)}removeEndpoint(e,t){this.endpointMap.delete(t),this.latestEndpointIdByChannelId.get(e)===t&&this.latestEndpointIdByChannelId.delete(e)}checkForPreviousClientConnection(e){const t=this.latestEndpointIdByChannelId.get(e);t&&(wt.ChannelClient.closeChannelByEndpointId(t),console.warn(\"You have created a second connection to an older provider. First connection has been removed from the clientMap\"),console.warn(\"If the provider calls publish(), you may receive multiple messages.\"))}}pt.MessageReceiver=ft;var gt={};Object.defineProperty(gt,\"__esModule\",{value:!0}),gt.ProtocolManager=void 0;gt.ProtocolManager=class{constructor(e){this.ProtocolsInPreferenceOrder=e,this.DefaultClientProtocols=[\"classic\"],this.DefaultProviderProtocols=[\"classic\"],this.getClientProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultClientProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(\", \")}.`);return t},this.getProviderProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultProviderProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(\", \")}.`);return t},this.getCompatibleProtocols=(e,t)=>t.supportedProtocols.filter((t=>e.some((e=>e.type===t.type&&t.version>=e.minimumVersion&&e.version>=(t.minimumVersion??0))))).slice(0,t.maxProtocols)}};var mt={};Object.defineProperty(mt,\"__esModule\",{value:!0});class vt{static combine(e,t){return new vt(e,t)}constructor(e,t){this.primary=e,this.secondary=t}onEndpointDisconnect(e,t){this.primary.onEndpointDisconnect(e,(()=>{this.secondary.isEndpointConnected(e)||t()})),this.secondary.onEndpointDisconnect(e,(()=>{this.primary.isEndpointConnected(e)||t()}))}isValidEndpointPayload(e){return this.primary.isValidEndpointPayload(e)||this.secondary.isValidEndpointPayload(e)}async closeEndpoint(e){await this.primary.closeEndpoint(e),await this.secondary.closeEndpoint(e)}isEndpointConnected(e){return this.primary.isEndpointConnected(e)||this.secondary.isEndpointConnected(e)}async addEndpoint(e,t){this.primary.isValidEndpointPayload(t)&&await this.primary.addEndpoint(e,t),this.secondary.isValidEndpointPayload(t)&&await this.secondary.addEndpoint(e,t)}receive(e){this.primary.receive(e),this.secondary.receive(e)}send(e,t,n){return this.primary.isEndpointConnected(e)?this.primary.send(e,t,n):this.secondary.send(e,t,n)}async close(){await Promise.all([this.primary.close(),this.secondary.close()])}}mt.default=vt;var Ct,bt,It=s&&s.__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},Et=s&&s.__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)},xt=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(xe,\"__esModule\",{value:!0}),xe.ConnectionManager=void 0;const At=Ae,Pt=d,Mt=Oe,_t=Fe,Ot=Je,St=Qe,Rt=pt,Ft=gt,jt=xt(mt);class kt extends Pt.Base{static getProtocolOptionsFromStrings(e){return e.map((e=>{switch(e){case\"rtc\":return _t.RTCInfo;case\"classic\":return Mt.ClassicInfo;default:return(0,At.exhaustiveCheck)(e,[\"rtc\",\"classic\"])}}))}constructor(e){super(e),Ct.set(this,void 0),bt.set(this,void 0),this.removeChannelFromProviderMap=e=>{this.providerMap.delete(e)},this.onmessage=e=>\"process-channel-connection\"===e.action&&(this.processChannelConnection(e),!0),this.providerMap=new Map,this.protocolManager=new Ft.ProtocolManager(\"node\"===this.wire.environment.type?[\"classic\"]:[\"rtc\",\"classic\"]),It(this,Ct,new Rt.MessageReceiver(e),\"f\"),It(this,bt,new Ot.RTCICEManager(e),\"f\"),e.registerMessageHandler(this.onmessage.bind(this))}createProvider(e,t){const n=Object.assign(this.wire.environment.getDefaultChannelOptions().create,e||{}),i=this.protocolManager.getProviderProtocols(n?.protocols),r=i.map((e=>{switch(e){case\"rtc\":return new _t.RTCStrategy;case\"classic\":return new Mt.ClassicStrategy(this.wire,Et(this,Ct,\"f\"),t.channelId,t);default:return(0,At.exhaustiveCheck)(e,[\"rtc\",\"classic\"])}}));let o;if(2===r.length){const[e,t]=r;o=jt.default.combine(e,t)}else{if(1!==r.length)throw new Error(\"failed to combine strategies\");[o]=r}const s=new St.ChannelProvider(t,(()=>St.ChannelProvider.wireClose(this.wire,t.channelName)),o),a=t.channelId;return this.providerMap.set(a,{provider:s,strategy:o,supportedProtocols:kt.getProtocolOptionsFromStrings(i)}),St.ChannelProvider.setProviderRemoval(s,this.removeChannelFromProviderMap.bind(this)),s}async createClientOffer(e){const t=this.protocolManager.getClientProtocols(e?.protocols);let n;return{offer:{supportedProtocols:await Promise.all(t.map((async e=>{switch(e){case\"rtc\":{const{rtcClient:e,channels:t,offer:i,rtcConnectionId:r,channelsOpened:o}=await Et(this,bt,\"f\").startClientOffer();return n={rtcClient:e,channels:t,channelsOpened:o},{type:\"rtc\",version:_t.RTCInfo.version,payload:{offer:i,rtcConnectionId:r}}}case\"classic\":return{type:\"classic\",version:Mt.ClassicInfo.version};default:return(0,At.exhaustiveCheck)(e,[\"rtc\",\"classic\"])}}))),maxProtocols:2},rtc:n}}async createClientStrategy(e,t){t.endpointId||(t.endpointId=this.wire.environment.getNextMessageId(),Et(this,Ct,\"f\").checkForPreviousClientConnection(t.channelId));const n=t.answer??{supportedProtocols:[{type:\"classic\",version:1}]},i=(await Promise.all(n.supportedProtocols.map((async n=>\"rtc\"===n.type&&e?(await Et(this,bt,\"f\").finishClientOffer(e.rtcClient,n.payload.answer,e.channelsOpened),new _t.RTCStrategy):\"classic\"===n.type?new Mt.ClassicStrategy(this.wire,Et(this,Ct,\"f\"),t.endpointId,t):null)))).filter((e=>null!==e));let r;if(e&&!i.some((e=>e instanceof _t.RTCStrategy))&&e&&e.rtcClient.close(),i.length>=2)r=jt.default.combine(i[0],i[1]);else{if(!i.length)throw new Error(\"No compatible protocols\");[r]=i}const o={endpointIdentity:t,rtc:e};return r.addEndpoint(t.channelId,o),r}async processChannelConnection(e){const{clientIdentity:t,providerIdentity:n,ackToSender:i,payload:r,offer:o}=e.payload;t.endpointId?t.isLocalEndpointId=!1:(t.endpointId=this.wire.environment.getNextMessageId(),t.isLocalEndpointId=!0);const s=n.channelId,a=this.providerMap.get(s);if(!a)return i.payload.success=!1,i.payload.reason=`Channel \"${n.channelName}\" has been destroyed.`,this.wire.sendRaw(i);const{provider:c,strategy:d,supportedProtocols:h}=a;try{if(!(c instanceof St.ChannelProvider))throw Error(\"Cannot connect to a channel client\");const e=o??{supportedProtocols:[{type:\"classic\",version:1}],maxProtocols:1},n=this.protocolManager.getCompatibleProtocols(h,e);if(!n.length)throw new Error(\"This provider does not support any of the offered protocols.\");const s=await c.processConnection(t,r);i.payload.payload=i.payload.payload||{};let a={supportedProtocols:[],endpointPayloadPromise:Promise.resolve({endpointIdentity:t})};return a=await n.reduce((async(e,t)=>{const n=await e;if(\"rtc\"===t.type){const{answer:e,rtcClient:i,channels:r}=await Et(this,bt,\"f\").createProviderAnswer(t.payload.rtcConnectionId,t.payload.offer);n.supportedProtocols.push({type:\"rtc\",version:_t.RTCInfo.version,payload:{answer:e}}),n.endpointPayloadPromise=n.endpointPayloadPromise.then((e=>r.then((t=>({...e,rtc:{rtcClient:i,channels:t}})))))}else n.supportedProtocols.push({type:\"classic\",version:Mt.ClassicInfo.version});return n}),Promise.resolve(a)),a.endpointPayloadPromise.then((e=>d.addEndpoint(t.endpointId,e))),i.payload.payload.result=s,i.payload.payload.answer=a,this.wire.sendRaw(i)}catch(e){return i.payload.success=!1,i.payload.reason=e.message,this.wire.sendRaw(i)}}}xe.ConnectionManager=kt,Ct=new WeakMap,bt=new WeakMap;var Lt,Tt,$t,Bt=s&&s.__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},Gt=s&&s.__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)};Object.defineProperty(le,\"__esModule\",{value:!0}),le.Channel=void 0;const Wt=t,Ht=G,Nt=d,Dt=ue,Ut=xe,Vt=Qe;function zt(e){const t=Math.floor(e/10),n=Math.min(3e4,500*2**t);return new Promise((e=>{setTimeout((()=>{e(!1)}),n)}))}class Kt extends Nt.EmitterBase{constructor(e){super(e,\"channel\"),Lt.set(this,void 0),Tt.set(this,new Wt.EventEmitter),$t.set(this,new Ht.AsyncRetryableLazy((async()=>{await Promise.all([this.on(\"disconnected\",(e=>{Dt.ChannelClient.handleProviderDisconnect(e)})),this.on(\"connected\",((...e)=>{Gt(this,Tt,\"f\").emit(\"connected\",...e)}))]).catch((()=>new Error(\"error setting up channel connection listeners\")))}))),Bt(this,Lt,new Ut.ConnectionManager(e),\"f\")}async getAllChannels(){return this.wire.sendAction(\"get-all-channels\").then((({payload:e})=>e.data))}async onChannelConnect(e){await this.on(\"connected\",e)}async onChannelDisconnect(e){await this.on(\"disconnected\",e)}async safeConnect(e,t,n){const i={count:0};do{let r=()=>{};const o=new Promise((t=>{r=n=>{e===n.channelName&&t(!0)},Gt(this,Tt,\"f\").on(\"connected\",r)}));try{if(i.count>0){i.gotConnectedEvent=await Promise.race([zt(i.count),o]);const t=await this.wire.sendAction(\"connect-to-channel\",{...n,retryInfo:i});return console.log(`Successfully connected to channelName: ${e}`),t.payload.data}const t=this.wire.sendAction(\"connect-to-channel\",n);i.originalMessageId=t.messageId;return(await t).payload.data}catch(n){if(!n.message.includes(\"internal-nack\"))throw n;t&&0===i.count&&console.warn(`No channel found for channelName: ${e}. Waiting for connection...`)}finally{i.count+=1,Gt(this,Tt,\"f\").removeListener(\"connected\",r)}}while(t);throw new Error(`No channel found for channelName: ${e}.`)}async connect(e,t={}){if(await Gt(this,$t,\"f\").getValue(),!e||\"string\"!=typeof e)throw new Error(\"Please provide a channelName string to connect to a channel.\");const n={wait:!0,...this.wire.environment.getDefaultChannelOptions().connect,...t},{offer:i,rtc:r}=await Gt(this,Lt,\"f\").createClientOffer(n);let o;(this.fin.me.isFrame||this.fin.me.isView||this.fin.me.isWindow)&&(o=(await this.fin.me.getInfo()).url);const s={channelName:e,...n,offer:i,connectionUrl:o},a=await this.safeConnect(e,n.wait,s),c=await Gt(this,Lt,\"f\").createClientStrategy(r,a),d=new Dt.ChannelClient(a,(()=>Dt.ChannelClient.wireClose(this.wire,a,a.endpointId)),c);return c.onEndpointDisconnect(a.channelId,(async()=>{try{await d.sendDisconnectAction()}catch(e){console.warn(`Something went wrong during disconnect for client with uuid: ${a.uuid} / name: ${a.name} / endpointId: ${a.endpointId}.`)}finally{Dt.ChannelClient.handleProviderDisconnect(a)}})),d}async create(e,t){if(!e)throw new Error(\"Please provide a channelName to create a channel\");const{payload:{data:n}}=await this.wire.sendAction(\"create-channel\",{channelName:e}),i=Gt(this,Lt,\"f\").createProvider(t,n);return this.on(\"client-disconnected\",(t=>{t.channelName===e&&Vt.ChannelProvider.handleClientDisconnection(i,t)})),i}}le.Channel=Kt,Lt=new WeakMap,Tt=new WeakMap,$t=new WeakMap,Object.defineProperty(de,\"__esModule\",{value:!0}),de.InterAppPayload=de.InterApplicationBus=void 0;const qt=t,Jt=d,Yt=he,Zt=le,Qt=O;class Xt extends Jt.Base{constructor(e){super(e),this.events={subscriberAdded:\"subscriber-added\",subscriberRemoved:\"subscriber-removed\"},this.refCounter=new Yt.RefCounter,this.Channel=new Zt.Channel(e),this.emitter=new qt.EventEmitter,e.registerMessageHandler(this.onmessage.bind(this)),this.on=this.emitter.on.bind(this.emitter),this.removeAllListeners=this.emitter.removeAllListeners.bind(this.emitter)}async publish(e,t){await this.wire.sendAction(\"publish-message\",{topic:e,message:t,sourceWindowName:this.me.name})}async send(e,t,n){const i=(0,Qt.validateIdentity)(e);if(i)throw new Error(i);await this.wire.sendAction(\"send-message\",{destinationUuid:e.uuid,destinationWindowName:e.name,topic:t,message:n,sourceWindowName:this.me.name})}subscribe(e,t,n){const i=this.createSubscriptionKey(e.uuid,e.name||\"*\",t);return this.emitter.on(i,n),this.refCounter.actOnFirst(i,(async()=>{await this.wire.sendAction(\"subscribe\",{sourceUuid:e.uuid,sourceWindowName:e.name||\"*\",topic:t,destinationWindowName:this.me.name})}),(()=>Promise.resolve()))}unsubscribe(e,t,n){const i=e.name||\"*\",r=this.createSubscriptionKey(e.uuid,i,t);return this.emitter.removeListener(r,n),this.refCounter.actOnLast(r,(async()=>{await this.wire.sendAction(\"unsubscribe\",{sourceUuid:e.uuid,sourceWindowName:i,topic:t,destinationWindowName:this.me.name})}),(()=>new Promise((e=>e)).then((()=>{}))))}processMessage(e){const{payload:{message:t,sourceWindowName:n,sourceUuid:i,topic:r}}=e,o=[this.createSubscriptionKey(i,n,r),this.createSubscriptionKey(i,\"*\",r),this.createSubscriptionKey(\"*\",\"*\",r)],s={uuid:i,name:n};o.forEach((e=>{this.emitter.emit(e,t,s)}))}emitSubscriverEvent(e,t){const{payload:{targetName:n,uuid:i,topic:r}}=t,o={name:n,uuid:i,topic:r};this.emitter.emit(e,o)}createSubscriptionKey(e,t,n){const i=t||\"*\";if(!(e&&i&&n))throw new Error(\"Missing uuid, name, or topic string\");return function(...e){return e.map((e=>Buffer.from(`${e}`).toString(\"base64\"))).join(\"/\")}(e,i,n)}onmessage(e){const{action:t}=e;switch(t){case\"process-message\":this.processMessage(e);break;case this.events.subscriberAdded:this.emitSubscriverEvent(this.events.subscriberAdded,e);break;case this.events.subscriberRemoved:this.emitSubscriverEvent(this.events.subscriberRemoved,e)}return!0}}de.InterApplicationBus=Xt;de.InterAppPayload=class{};var en={};Object.defineProperty(en,\"__esModule\",{value:!0}),en.Clipboard=void 0;const tn=d;class nn extends tn.Base{async writeText(e){await this.wire.sendAction(\"clipboard-write-text\",e)}async readText(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-text\",{type:e});return t.data}async writeImage(e){await this.wire.sendAction(\"clipboard-write-image\",e)}async readImage(e={format:\"dataURL\"}){const{payload:t}=await this.wire.sendAction(\"clipboard-read-image\",e);return t.data}async writeHtml(e){await this.wire.sendAction(\"clipboard-write-html\",e)}async readHtml(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-html\",{type:e});return t.data}async writeRtf(e){await this.wire.sendAction(\"clipboard-write-rtf\",e)}async readRtf(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-rtf\",{type:e});return t.data}async write(e){await this.wire.sendAction(\"clipboard-write\",e)}async getAvailableFormats(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-formats\",{type:e});return t.data}}en.Clipboard=nn;var rn={},on={},sn={};Object.defineProperty(sn,\"__esModule\",{value:!0}),sn.ExternalApplication=void 0;const an=d;class cn extends an.EmitterBase{constructor(e,t){super(e,\"external-application\",t.uuid),this.identity=t}getInfo(){return this.wire.sendAction(\"get-external-application-info\",this.identity).then((({payload:e})=>e.data))}}sn.ExternalApplication=cn,Object.defineProperty(on,\"__esModule\",{value:!0}),on.ExternalApplicationModule=void 0;const dn=d,hn=sn;class ln extends dn.Base{wrap(e){return this.wire.sendAction(\"external-application-wrap\").catch((e=>{})),Promise.resolve(new hn.ExternalApplication(this.wire,{uuid:e}))}wrapSync(e){return this.wire.sendAction(\"external-application-wrap-sync\").catch((e=>{})),new hn.ExternalApplication(this.wire,{uuid:e})}}on.ExternalApplicationModule=ln,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(on,e),n(sn,e)}(rn);var un={},pn={},wn={};Object.defineProperty(wn,\"__esModule\",{value:!0}),wn._Frame=void 0;const yn=d;class fn extends yn.EmitterBase{constructor(e,t){super(e,\"frame\",t.uuid,t.name),this.identity=t}getInfo(){return this.wire.sendAction(\"get-frame-info\",this.identity).then((({payload:e})=>e.data))}getParentWindow(){return this.wire.sendAction(\"get-parent-window\",this.identity).then((({payload:e})=>e.data))}}wn._Frame=fn,Object.defineProperty(pn,\"__esModule\",{value:!0}),pn._FrameModule=void 0;const gn=d,mn=O,vn=wn;class Cn extends gn.Base{async wrap(e){this.wire.sendAction(\"frame-wrap\").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}wrapSync(e){this.wire.sendAction(\"frame-wrap-sync\").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}getCurrent(){return this.wire.sendAction(\"frame-get-current\").catch((e=>{})),Promise.resolve(new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity()))}getCurrentSync(){return this.wire.sendAction(\"frame-get-current-sync\").catch((e=>{})),new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity())}}pn._FrameModule=Cn,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(pn,e),n(wn,e)}(un);var bn={};Object.defineProperty(bn,\"__esModule\",{value:!0}),bn.GlobalHotkey=void 0;const In=d;class En extends In.EmitterBase{constructor(e){super(e,\"global-hotkey\")}async register(e,t){await this.on(e,t),await this.wire.sendAction(\"global-hotkey-register\",{hotkey:e})}async unregister(e){await this.removeAllListeners(e),await this.wire.sendAction(\"global-hotkey-unregister\",{hotkey:e})}async unregisterAll(){await Promise.all(this.eventNames().filter((e=>!(\"registered\"===e||\"unregistered\"===e))).map((e=>this.removeAllListeners(e)))),await this.wire.sendAction(\"global-hotkey-unregister-all\",{})}async isRegistered(e){const{payload:{data:t}}=await this.wire.sendAction(\"global-hotkey-is-registered\",{hotkey:e});return t}}bn.GlobalHotkey=En;var xn,An={},Pn={},Mn={},_n=s&&s.__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)};Object.defineProperty(Mn,\"__esModule\",{value:!0}),Mn.Platform=void 0;const On=d,Sn=O,Rn=new Map;class Fn extends On.EmitterBase{constructor(e,t){super(t.wire,\"application\",e.uuid),this.getClient=e=>{this.wire.sendAction(\"platform-get-client\",this.identity).catch((e=>{}));const t=e||this.identity,{uuid:n}=t;if(!Rn.has(n)){const e=_n(this,xn,\"f\").call(this,n);Rn.set(n,e)}return Rn.get(n)},xn.set(this,(async e=>{try{const t=`custom-frame-${e}`,n=await this._channel.connect(t,{wait:!1});return n.onDisconnection((()=>{Rn.delete(e)})),n}catch(t){throw Rn.delete(e),new Error(\"The targeted Platform is not currently running. Listen for application-started event for the given Uuid.\")}})),this.launchLegacyManifest=this.launchContentManifest;const n=(0,Sn.validateIdentity)(e);if(n)throw new Error(n);this._channel=t,this.identity={uuid:e.uuid},this.Layout=this.fin.Platform.Layout,this.Application=this.fin.Application.wrapSync(this.identity)}async createView(e,t,n){this.wire.sendAction(\"platform-create-view\",this.identity).catch((e=>{}));const i=await this.getClient(),r=await i.dispatch(\"create-view\",{target:t,opts:e,targetView:n});if(!r||(0,Sn.validateIdentity)(r.identity))throw new Error(`When overwriting the createView call, please return an object that has a valid 'identity' property: ${JSON.stringify(r)}`);return this.fin.View.wrapSync(r.identity)}async createWindow(e){this.wire.sendAction(\"platform-create-window\",this.identity).catch((e=>{}));const t=await this.getClient();e.reason||(e.reason=\"api-call\");const n=await t.dispatch(\"create-view-container\",e);if(!n||(0,Sn.validateIdentity)(n.identity))throw new Error(`When overwriting the createWindow call, please return an object that has a valid 'identity' property: ${JSON.stringify(n)}`);const{identity:i}=n,r=this.fin.Window.wrapSync(i);return r.name=i.name,r.uuid=i.uuid,r}async quit(){this.wire.sendAction(\"platform-quit\",this.identity).catch((e=>{}));return(await this.getClient()).dispatch(\"quit\")}async closeView(e){this.wire.sendAction(\"platform-close-view\",this.identity).catch((e=>{}));const t=await this.getClient();await t.dispatch(\"close-view\",{view:e})}async reparentView(e,t){console.warn(\"Platform.reparentView has been deprecated, please use Platform.createView\"),this.wire.sendAction(\"platform-reparent-view\",this.identity).catch((e=>{}));const n={...e,uuid:e.uuid??this.identity.uuid},i=await this.fin.View.wrap(n),r=await i.getOptions();return this.createView(r,t)}async getSnapshot(){this.wire.sendAction(\"platform-get-snapshot\",this.identity).catch((e=>{}));return(await this.getClient()).dispatch(\"get-snapshot\")}async getViewSnapshot(e){return(await this.getClient()).dispatch(\"get-view-snapshot\",{viewIdentity:e})}async applySnapshot(e,t){this.wire.sendAction(\"platform-apply-snapshot\",this.identity).catch((e=>{}));const n=\"Requested snapshot must be a valid Snapshot object, or a url or filepath to such an object.\";let i;if(\"string\"==typeof e)try{i=(await this._channel.wire.sendAction(\"get-application-manifest\",{manifestUrl:e})).payload.data}catch(e){throw new Error(`${n}: ${e}`)}else i=e;if(!i.windows)throw new Error(n);const r=await this.getClient();return await r.dispatch(\"apply-snapshot\",{snapshot:i,options:t}),this}async fetchManifest(e){return(await this.getClient()).dispatch(\"platform-fetch-manifest\",{manifestUrl:e})}async launchContentManifest(e){this.wire.sendAction(\"platform-launch-content-manifest\",this.identity).catch((()=>{}));const t=await this.getClient(),n=await this.fetchManifest(e);return t.dispatch(\"launch-into-platform\",{manifest:n,manifestUrl:e}),this}async setWindowContext(e={},t){if(this.wire.sendAction(\"platform-set-window-context\",this.identity).catch((e=>{})),!e)throw new Error(\"Please provide a serializable object or string to set the context.\");const n=await this.getClient(),{entityType:i}=t?await this.fin.System.getEntityInfo(t.uuid,t.name):this.fin.me;await n.dispatch(\"set-window-context\",{context:e,entityType:i,target:t||{uuid:this.fin.me.uuid,name:this.fin.me.name}})}async getWindowContext(e){this.wire.sendAction(\"platform-get-window-context\",this.identity).catch((e=>{}));const t=await this.getClient(),{entityType:n}=e?await this.fin.System.getEntityInfo(e.uuid,e.name):this.fin.me;return t.dispatch(\"get-window-context\",{target:e||{uuid:this.fin.me.uuid,name:this.fin.me.name},entityType:n})}async closeWindow(e,t={skipBeforeUnload:!1}){this.wire.sendAction(\"platform-close-window\",this.identity).catch((e=>{}));return(await this.getClient()).dispatch(\"close-window\",{windowId:e,options:t})}}Mn.Platform=Fn,xn=new WeakMap;var jn={},kn={},Ln={},Tn={};function $n(e){switch(e){case\"columns\":case\"grid\":case\"rows\":case\"tabs\":return!0;default:return!1}}Object.defineProperty(Tn,\"__esModule\",{value:!0}),Tn.overrideFromComposables=Tn.isValidPresetType=void 0,Tn.isValidPresetType=$n,Tn.overrideFromComposables=function(...e){return t=>e.reduceRight(((e,t)=>n=>t(e(n))),(e=>e))(t)},Tn.default={isValidPresetType:$n};var Bn={},Gn={},Wn={};Object.defineProperty(Wn,\"__esModule\",{value:!0}),Wn.ApiConsumer=void 0;Wn.ApiConsumer=class{constructor(e){this.strategy=e,this.consume=async e=>(await this.strategy.getExposedFunctions(e)).reduce(((t,n)=>({...t,[n.key]:this.strategy.createFunction(n,e)})),{})}};var Hn={},Nn={};Object.defineProperty(Nn,\"__esModule\",{value:!0}),Nn.expose=Nn.getExposedProperties=void 0;const Dn=Symbol(\"exposedProperties\");Nn.getExposedProperties=e=>e[Dn]||e.prototype[Dn]||[];Nn.expose=e=>(t,n,i)=>{t[Dn]=t[Dn]||[],t[Dn].push({key:n,descriptor:i,options:e})},Object.defineProperty(Hn,\"__esModule\",{value:!0}),Hn.ApiExposer=void 0;const Un=Nn;Hn.ApiExposer=class{constructor(e){this.strategy=e,this.exposeInstance=async(e,t)=>{const n=(0,Un.getExposedProperties)(e),i=await Promise.all(n.map((async({key:n,options:i})=>({key:n,options:await this.strategy.exposeFunction(e[n].bind(e),{key:n,options:i,meta:t})}))));await this.strategy.exposeMeta(t,i)}}};var Vn={},zn={},Kn={};Object.defineProperty(Kn,\"__esModule\",{value:!0}),Kn.ChannelsConsumer=void 0;Kn.ChannelsConsumer=class{constructor(e){this.channel=e,this.getExposedFunctions=async e=>{const{id:t}=e,{props:n}=await this.channel.dispatch(`api-meta:${t}`);return n},this.createFunction=e=>(...t)=>{const{action:n}=e.options;return this.channel.dispatch(n,{args:t})}}};var qn={};Object.defineProperty(qn,\"__esModule\",{value:!0}),qn.ChannelsExposer=void 0;qn.ChannelsExposer=class{constructor(e){this.channelProviderOrClient=e,this.exposeFunction=async(e,t)=>{const{key:n,options:i,meta:r}=t,{id:o}=r,s=`${o}.${i?.action||n}`;return await this.channelProviderOrClient.register(s,(async({args:t})=>e(...t))),{action:s}},this.exposeMeta=async({id:e},t)=>{const n=`api-meta:${e}`;await this.channelProviderOrClient.register(n,(()=>({props:t})))}}},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Kn,e),n(qn,e)}(zn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(zn,e)}(Vn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Wn,e),n(Hn,e),n(Vn,e),n(Nn,e)}(Gn);var Jn={};Object.defineProperty(Jn,\"__esModule\",{value:!0}),Jn.createRelayedDispatch=exports.relayChannelClientApi_1=Jn.relayChannelClientApi=void 0;const Yn=[\"no longer connected\",\"RTCDataChannel closed unexpectedly\",\"The client you are trying to dispatch from is disconnected from the target provider\"];exports.relayChannelClientApi_1=Jn.relayChannelClientApi=async(e,t)=>{e.register(`relay:${t}`,(({action:t,target:n,payload:i})=>e.dispatch(n,t,i))),await Promise.resolve()};Jn.createRelayedDispatch=(e,t,n,i)=>async(r,o)=>{try{return await e.dispatch(`relay:${n}`,{action:r,payload:o,target:t})}catch(e){if(s=e.message,Yn.some((e=>s.includes(e)))&&i)throw new Error(i);throw e}var s};var Zn,Qn,Xn,ei=s&&s.__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},ti=s&&s.__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)};Object.defineProperty(Bn,\"__esModule\",{value:!0}),Bn.ColumnOrRow=Bn.TabStack=Bn.LayoutNode=void 0;const ni=Gn,ii=Jn;class ri{constructor(e,t){Zn.set(this,void 0),this.isRoot=()=>ti(this,Zn,\"f\").isRoot(this.entityId),this.exists=()=>ti(this,Zn,\"f\").exists(this.entityId),this.getParent=async()=>{const e=await ti(this,Zn,\"f\").getParent(this.entityId);if(e)return ri.getEntity(e,ti(this,Zn,\"f\"))},this.createAdjacentStack=async(e,t)=>{const n=await ti(this,Zn,\"f\").createAdjacentStack(this.entityId,e,t);return ri.getEntity({entityId:n,type:\"stack\"},ti(this,Zn,\"f\"))},this.getAdjacentStacks=async e=>(await ti(this,Zn,\"f\").getAdjacentStacks({targetId:this.entityId,edge:e})).map((e=>ri.getEntity({type:\"stack\",entityId:e.entityId},ti(this,Zn,\"f\")))),ei(this,Zn,e,\"f\"),this.entityId=t}}Bn.LayoutNode=ri,Zn=new WeakMap,ri.newLayoutEntitiesClient=async(e,t,n)=>{const i=(0,ii.createRelayedDispatch)(e,n,\"layout-relay\",\"You are trying to interact with a layout component on a window that does not exist or has been destroyed.\");return new ni.ApiConsumer(new ni.ChannelsConsumer({dispatch:i})).consume({id:t})},ri.getEntity=(e,t)=>{const{entityId:n,type:i}=e;switch(i){case\"column\":case\"row\":return new si(t,n,i);case\"stack\":return new oi(t,n);default:throw new Error(`Unrecognised Layout Entity encountered ('${JSON.stringify(e)})`)}};class oi extends ri{constructor(e,t){super(e,t),Qn.set(this,void 0),this.type=\"stack\",this.getViews=()=>ti(this,Qn,\"f\").getStackViews(this.entityId),this.addView=async(e,t={index:0})=>ti(this,Qn,\"f\").addViewToStack(this.entityId,e,t),this.removeView=async e=>{await ti(this,Qn,\"f\").removeViewFromStack(this.entityId,e)},this.setActiveView=async e=>{await ti(this,Qn,\"f\").setStackActiveView(this.entityId,e)},ei(this,Qn,e,\"f\")}}Bn.TabStack=oi,Qn=new WeakMap;class si extends ri{constructor(e,t,n){super(e,t),Xn.set(this,void 0),this.getContent=async()=>(await ti(this,Xn,\"f\").getContent(this.entityId)).map((e=>ri.getEntity(e,ti(this,Xn,\"f\")))),ei(this,Xn,e,\"f\"),this.type=n}}Bn.ColumnOrRow=si,Xn=new WeakMap;var ai={};Object.defineProperty(ai,\"__esModule\",{value:!0}),ai.DEFAULT_LAYOUT_KEY=ai.LAYOUT_CONTROLLER_ID=void 0,ai.LAYOUT_CONTROLLER_ID=\"layout-entities\",ai.DEFAULT_LAYOUT_KEY=\"__default__\";var ci,di,hi,li=s&&s.__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)};Object.defineProperty(Ln,\"__esModule\",{value:!0}),Ln.Layout=void 0;const ui=G,pi=O,wi=d,yi=Tn,fi=Bn,gi=ai;class mi extends wi.Base{static getClient(e){return li(e,di,\"f\").getValue()}constructor(e,t){super(t),ci.add(this),di.set(this,new ui.Lazy((async()=>fi.LayoutNode.newLayoutEntitiesClient(await this.platform.getClient(),gi.LAYOUT_CONTROLLER_ID,this.identity)))),this.replace=async e=>{this.wire.sendAction(\"layout-replace\").catch((e=>{}));const t=await this.platform.getClient();await t.dispatch(\"replace-layout\",{target:this.identity,opts:{layout:e}})},this.replaceView=async(e,t)=>{this.wire.sendAction(\"layout-replace-view\").catch((e=>{}));const n=await this.platform.getClient();await n.dispatch(\"replace-view\",{target:this.identity,opts:{viewToReplace:e,newView:t}})},this.applyPreset=async e=>{this.wire.sendAction(\"layout-apply-preset\").catch((e=>{}));const t=await this.platform.getClient(),{presetType:n}=e;if(!n||!(0,yi.isValidPresetType)(n))throw new Error(\"Cannot apply preset layout, please include an applicable presetType property in the PresetLayoutOptions.\");await t.dispatch(\"apply-preset-layout\",{target:this.identity,opts:{presetType:n}})};const n=(0,pi.validateIdentity)(e);if(n)throw new Error(n);this.identity=e,this.platform=this.fin.Platform.wrapSync({uuid:e.uuid}),e.uuid===this.fin.me.uuid&&e.name===this.fin.me.name&&(this.init=this.fin.Platform.Layout.init)}async getConfig(){this.wire.sendAction(\"layout-get-config\").catch((e=>{}));return(await this.platform.getClient()).dispatch(\"get-frame-snapshot\",{target:this.identity})}async getCurrentViews(){this.wire.sendAction(\"layout-get-views\").catch((e=>{}));const e=await this.platform.getClient();return(await e.dispatch(\"get-layout-views\",{target:this.identity})).map((e=>this.fin.View.wrapSync(e)))}async getRootItem(){this.wire.sendAction(\"layout-get-root-item\").catch((()=>{}));const e=await li(this,di,\"f\").getValue(),t=await e.getRoot(\"layoutName\"in this.identity?this.identity:void 0);return fi.LayoutNode.getEntity(t,e)}async getStackByViewIdentity(e){this.wire.sendAction(\"layout-get-stack-by-view\").catch((()=>{}));const t=await li(this,di,\"f\").getValue(),n=await t.getStackByView(e);if(!n)throw new Error(`No stack found for view: ${e.uuid}/${e.name}`);return fi.LayoutNode.getEntity(n,t)}async addView(e,{location:t,targetView:n}={}){this.wire.sendAction(\"layout-add-view\").catch((e=>{}));const{identity:i}=await li(this,ci,\"m\",hi).call(this,\"layout-add-view\",{viewOptions:e,location:t,targetView:n});return{identity:i}}async closeView(e){this.wire.sendAction(\"layout-close-view\").catch((e=>{})),await li(this,ci,\"m\",hi).call(this,\"layout-close-view\",{viewIdentity:e})}}Ln.Layout=mi,di=new WeakMap,ci=new WeakSet,hi=async function(e,t){return(await this.platform.getClient()).dispatch(e,{target:this.identity,opts:t})};var vi,Ci,bi,Ii,Ei,xi=s&&s.__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)},Ai=s&&s.__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};Object.defineProperty(kn,\"__esModule\",{value:!0}),kn.LayoutModule=void 0;const Pi=d,Mi=Ln,_i=ai;class Oi extends Pi.Base{constructor(){super(...arguments),vi.add(this),Ci.set(this,!1),bi.set(this,null),this.init=async(e={})=>{if(this.wire.sendAction(\"layout-init\").catch((e=>{})),!this.wire.environment.layoutAllowedInContext(this.fin))throw new Error(\"Layout.init can only be called from a Window context.\");if(xi(this,Ci,\"f\"))throw new Error(\"Layout.init was already called, please use Layout.create to add additional layouts.\");\"openfin\"===this.wire.environment.type&&await this.fin.Platform.getCurrentSync().getClient(),Ai(this,Ci,!0,\"f\"),Ai(this,bi,await this.wire.environment.initLayoutManager(this.fin,this.wire,e),\"f\"),await this.wire.environment.applyLayoutSnapshot(this.fin,xi(this,bi,\"f\"),e);const t={name:this.fin.me.name,uuid:this.fin.me.uuid};if(!e.layoutManagerOverride){const e={layoutName:_i.DEFAULT_LAYOUT_KEY,...t};return xi(this,Ii,\"f\").call(this,e)}return this.wrapSync(t)},Ii.set(this,(e=>{const t=\"[Layout] You are using a deprecated property `layoutManager` - it will throw if you access it starting in v37.\",n=new Proxy({},{get(e,n){throw console.warn(`[Layout-mgr-proxy] accessing ${n.toString()}`),new Error(t)}}),i=Object.assign(this.wrapSync(e),{layoutManager:n});return new Proxy(i,{get(e,n){if(\"layoutManager\"===n)throw console.warn(`[Layout-proxy] accessing ${n.toString()}`),new Error(t);return e[n]}})})),this.getCurrentLayoutManagerSync=()=>xi(this,vi,\"m\",Ei).call(this,\"fin.Platform.Layout.getCurrentLayoutManagerSync()\"),this.create=async e=>this.wire.environment.createLayout(xi(this,vi,\"m\",Ei).call(this,\"fin.Platform.Layout.create()\"),e),this.destroy=async e=>this.wire.environment.destroyLayout(xi(this,vi,\"m\",Ei).call(this,\"fin.Platform.Layout.destroy()\"),e)}async wrap(e){return this.wire.sendAction(\"layout-wrap\").catch((e=>{})),new Mi.Layout(e,this.wire)}wrapSync(e){return this.wire.sendAction(\"layout-wrap-sync\").catch((e=>{})),new Mi.Layout(e,this.wire)}async getCurrent(){if(this.wire.sendAction(\"layout-get-current\").catch((e=>{})),\"openfin\"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error(\"You are not in a Window context. Only Windows can have a Layout.\");const{uuid:e,name:t}=this.fin.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction(\"layout-get-current-sync\").catch((e=>{})),\"openfin\"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error(\"You are not in a Window context. Only Windows can have a Layout.\");const{uuid:e,name:t}=this.fin.me;return this.wrapSync({uuid:e,name:t})}async getLayoutByViewIdentity(e){this.wire.sendAction(\"layout-get-by-view-identity\").catch((()=>{}));let t=await this.wire.environment.getViewWindowIdentity(this.fin,e);t.identity&&(t=t.identity);try{const n=this.wrapSync(t),i=await Mi.Layout.getClient(n),r=await i.getLayoutIdentityForViewOrThrow(e);return this.wrapSync(r)}catch(n){if(![\"No action registered at target for\",\"getLayoutIdentityForViewOrThrow is not a function\"].some((e=>n.message.includes(e))))throw n;if(t.uuid===t.name)throw new Error(`View identity ${JSON.stringify(e)} is not attached to any layout in provider window ${JSON.stringify(t)}.`);return this.wrapSync(t)}}}kn.LayoutModule=Oi,Ci=new WeakMap,bi=new WeakMap,Ii=new WeakMap,vi=new WeakSet,Ei=function(e){if(!xi(this,bi,\"f\"))throw new Error(`You must call init before using the API ${e}`);return xi(this,bi,\"f\")},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(kn,e),n(Ln,e)}(jn),Object.defineProperty(Pn,\"__esModule\",{value:!0}),Pn.PlatformModule=void 0;const Si=d,Ri=Mn,Fi=jn;class ji extends Si.Base{constructor(e,t){super(e),this._channel=t,this.Layout=new Fi.LayoutModule(this.wire)}async init(e){if(!fin.__internal_.isPlatform||fin.me.name!==fin.me.uuid)throw new Error(\"fin.Platform.init should only be called from a custom platform provider running in the main window of the application.\");return this.wire.environment.initPlatform(this.fin,e)}async wrap(e){return this.wire.sendAction(\"platform-wrap\").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}wrapSync(e){return this.wire.sendAction(\"platform-wrap-sync\").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}async getCurrent(){return this.wire.sendAction(\"platform-get-current\").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction(\"platform-get-current-sync\").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}start(e){return this.wire.sendAction(\"platform-start\").catch((e=>{})),new Promise((async(t,n)=>{try{const{uuid:n}=e,i=await this.fin.Application._create({...e,isPlatformController:!0});i.once(\"platform-api-ready\",(()=>t(this.wrapSync({uuid:n})))),i._run({uuid:n})}catch(e){n(e)}}))}startFromManifest(e,t){return this.wire.sendAction(\"platform-start-from-manifest\").catch((e=>{})),new Promise((async(n,i)=>{try{const i=await this.fin.Application._createFromManifest(e);i.once(\"platform-api-ready\",(()=>n(this.wrapSync({uuid:i.identity.uuid})))),i._run(t)}catch(e){i(e)}}))}}Pn.PlatformModule=ji,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Pn,e),n(Mn,e)}(An);var ki={};!function(e){Object.defineProperty(e,\"__esModule\",{value:!0}),e.getMe=e.getBaseMe=e.environmentUnsupportedMessage=void 0;const t=J(),n=un,i=ie(),r=rn;function o(e,t,n){return{...{isView:\"view\"===e,isWindow:\"window\"===e,isFrame:\"iframe\"===e,isExternal:\"external connection\"===e},uuid:t,name:n,entityType:e}}e.environmentUnsupportedMessage=\"You are not running in OpenFin.\",e.getBaseMe=o,e.getMe=function(s){const{uuid:a,name:c,entityType:d}=s.me,h={setContext(){throw new Error(e.environmentUnsupportedMessage)},addContextHandler(){throw new Error(e.environmentUnsupportedMessage)},getContextGroups(){throw new Error(e.environmentUnsupportedMessage)},joinContextGroup(){throw new Error(e.environmentUnsupportedMessage)},removeFromContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getAllClientsInContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getInfoForContextGroup(){throw new Error(e.environmentUnsupportedMessage)}},l=\"Interop API has not been instantiated. Either connection has failed or you have not declared interop in your config.\",u={setContext(){throw new Error(l)},addContextHandler(){throw new Error(l)},getContextGroups(){throw new Error(l)},joinContextGroup(){throw new Error(l)},removeFromContextGroup(){throw new Error(l)},getAllClientsInContextGroup(){throw new Error(l)},getInfoForContextGroup(){throw new Error(l)}},p={eventNames:()=>{throw new Error(e.environmentUnsupportedMessage)},emit:()=>{throw new Error(e.environmentUnsupportedMessage)},listeners:()=>{throw new Error(e.environmentUnsupportedMessage)},listenerCount:()=>{throw new Error(e.environmentUnsupportedMessage)},on:()=>{throw new Error(e.environmentUnsupportedMessage)},addListener:()=>{throw new Error(e.environmentUnsupportedMessage)},once:()=>{throw new Error(e.environmentUnsupportedMessage)},prependListener:()=>{throw new Error(e.environmentUnsupportedMessage)},prependOnceListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeAllListeners:()=>{throw new Error(e.environmentUnsupportedMessage)}};switch(d){case\"view\":return Object.assign(new t.View(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case\"window\":return Object.assign(new i._Window(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case\"iframe\":return Object.assign(new n._Frame(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case\"external connection\":return Object.assign(new r.ExternalApplication(s,{uuid:a}),o(d,a,c),{interop:u,isOpenFin:!1});default:return{...o(d,a,c),...p,interop:h,isOpenFin:!1}}}}(ki);var Li={},Ti={},$i={};Object.defineProperty($i,\"__esModule\",{value:!0}),$i.createWarningObject=$i.createUnusableObject=void 0,$i.createUnusableObject=function(e){const t=()=>{throw new Error(e)};return new Proxy({},{apply:t,construct:t,defineProperty:t,deleteProperty:t,get:t,getOwnPropertyDescriptor:t,getPrototypeOf:t,has:t,isExtensible:t,ownKeys:t,preventExtensions:t,set:t,setPrototypeOf:t})},$i.createWarningObject=function(e,t){return new Proxy(t,{get:(...t)=>(console.warn(e),Reflect.get(...t)),set:(...t)=>(console.warn(e),Reflect.set(...t)),getOwnPropertyDescriptor:(...t)=>(console.warn(e),Reflect.getOwnPropertyDescriptor(...t)),ownKeys:(...t)=>(console.warn(e),Reflect.ownKeys(...t))})};var Bi,Gi={},Wi={};var Hi={};!function(e){Object.defineProperty(e,\"__esModule\",{value:!0}),e.wrapIntentHandler=e.BROKER_ERRORS=e.generateOverrideWarning=e.generateOverrideError=e.wrapContextHandler=e.wrapInTryCatch=e.generateId=void 0;e.generateId=()=>`${Math.random()}${Date.now()}`;e.wrapInTryCatch=(e,t)=>(...n)=>{try{return e(...n)}catch(e){throw new Error((t||\"\")+e)}};e.wrapContextHandler=(e,t)=>async n=>{try{await e(n)}catch(e){throw console.error(`Error thrown by handler ${t} for context type ${n.type}: ${e}`),e}};e.generateOverrideError=(e,t)=>`You have tried to to use ${e} but ${t} has not been overridden in the Interop Broker. Please override this function. Refer to our documentation for more info.`;e.generateOverrideWarning=(e,t,n,i)=>{const{uuid:r,name:o}=n;return i?`Entity with identity: ${r}/${o} has called ${i} or ${e} but ${t} has not been overridden.`:`Entity with identity: ${r}/${o} has called ${e} but ${t} has not been overridden.`},e.BROKER_ERRORS={fireIntent:(0,e.generateOverrideError)(\"fireIntent\",\"handleFiredIntent\"),fireIntentForContext:(0,e.generateOverrideError)(\"fireIntentForContext\",\"handleFiredIntentForContext\"),getInfoForIntent:(0,e.generateOverrideError)(\"getInfoForIntent\",\"handleInfoForIntent\"),getInfoForIntentsByContext:(0,e.generateOverrideError)(\"getInfoForIntentsByContext\",\"handleInfoForIntentsByContext\"),joinSessionContextGroupWithJoinContextGroup:\"The Context Group you have tried to join is a Session Context Group. Custom Context Groups can only be defined by the Interop Broker through code or manifest configuration. Please use joinSessionContextGroup.\",fdc3Open:(0,e.generateOverrideError)(\"fdc3.open\",\"fdc3HandleOpen\"),fdc3FindInstances:(0,e.generateOverrideError)(\"fdc3.findInstances\",\"fdc3HandleFindInstances\"),fdc3GetAppMetadata:(0,e.generateOverrideError)(\"fdc3.getAppMetadata\",\"fdc3HandleGetAppMetadata\"),fdc3GetInfo:(0,e.generateOverrideError)(\"fdc3.getInfo\",\"fdc3HandleGetInfo\")};e.wrapIntentHandler=(e,t)=>async n=>{try{return e(n)}catch(e){throw console.error(`Error thrown by handler ${t}: ${e}`),e}}}(Hi);var Ni,Di,Ui={};function Vi(){if(Di)return Gi;Di=1;var e,t,n,r=s&&s.__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},o=s&&s.__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)},a=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Gi,\"__esModule\",{value:!0}),Gi.InteropBroker=void 0;const c=d,h=a(function(){if(Bi)return Wi;Bi=1,Object.defineProperty(Wi,\"__esModule\",{value:!0});const e=Cr();return Wi.default=class{constructor(e,t){this.provider=e,this.id=t,this.lastContext=void 0,this.contextGroupMap=new Map,this.clients=new Map,this.registerListeners()}registerListeners(){this.provider.register(`sessionContextGroup:getContext-${this.id}`,this.getCurrentContext.bind(this)),this.provider.register(`sessionContextGroup:setContext-${this.id}`,this.setContext.bind(this)),this.provider.register(`sessionContextGroup:handlerAdded-${this.id}`,this.handlerAdded.bind(this)),this.provider.register(`sessionContextGroup:handlerRemoved-${this.id}`,this.handlerRemoved.bind(this))}getCurrentContext(e){return e.type?this.contextGroupMap.get(e.type):this.lastContext}setContext(t,n){const{context:i}=t,r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name} not in Session Client State Map`);this.contextGroupMap.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{e.contextHandlers.get(i.type)?.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getClientState(e){return this.clients.get(e.endpointId)}async handlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(i){const e=r.contextHandlers.get(i)||[];r.contextHandlers.set(i,[...e,n]);const o=this.contextGroupMap.get(i);o&&await this.provider.dispatch(t,n,o)}else{r.globalHandler=n;const e=[...this.contextGroupMap.keys()].map((async e=>{const i=this.contextGroupMap.get(e);i&&await this.provider.dispatch(t,n,i)}));await Promise.all(e)}}handlerRemoved(e,t){const{handlerId:n}=e,i=this.clients.get(t.endpointId);i?(Array.from(i.contextHandlers).forEach((([,e])=>{const t=e.indexOf(n);t>-1&&e.splice(t,1)})),i.globalHandler===n&&(i.globalHandler=void 0)):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={contextHandlers:new Map,clientIdentity:e,globalHandler:void 0};this.clients.set(e.endpointId,t)}}onDisconnection(e){this.clients.delete(e.endpointId)}},Wi}()),l=Hi,u=a(i),p=function(){if(Ni)return Ui;Ni=1,Object.defineProperty(Ui,\"__esModule\",{value:!0}),Ui.PrivateChannelProvider=void 0;const e=Vi();return Ui.PrivateChannelProvider=class t{constructor(e,t){this.provider=e,this.id=t,this.clients=new Map,this.registerListeners(),this.contextByContextType=new Map,this.lastContext=void 0,this.provider.onConnection((e=>this.registerNewClient(e))),this.provider.onDisconnection((async e=>{const{endpointId:t}=e;this.clients.has(t)&&await this.handleClientDisconnecting(e),0===(await this.provider.getAllClientInfo()).length&&this.provider.destroy()}))}getClientState(e){return this.clients.get(e.endpointId)}registerListeners(){this.provider.register(\"broadcast\",this.broadcast.bind(this)),this.provider.register(\"getCurrentContext\",this.getCurrentContext.bind(this)),this.provider.register(\"contextHandlerAdded\",this.contextHandlerAdded.bind(this)),this.provider.register(\"contextHandlerRemoved\",this.contextHandlerRemoved.bind(this)),this.provider.register(\"nonStandardHandlerRemoved\",this.nonStandardHandlerRemoved.bind(this)),this.provider.register(\"onAddContextHandlerAdded\",this.onAddContextHandlerAdded.bind(this)),this.provider.register(\"onDisconnectHandlerAdded\",this.onDisconnectHandlerAdded.bind(this)),this.provider.register(\"onUnsubscribeHandlerAdded\",this.onUnsubscribeHandlerAdded.bind(this)),this.provider.register(\"clientDisconnecting\",((e,t)=>{this.handleClientDisconnecting(t)}))}broadcast(t,n){const{context:i}=t;if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name}, tried to call broadcast, is not connected to this Private Channel`);const r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to broadcast - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);this.contextByContextType.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{const t=e.handlerIdsByContextTypes.get(i.type);t&&t.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getCurrentContext(e,t){const{contextType:n}=e;if(!this.getClientState(t))throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call getCurrentContext, is not connected to this Private Channel`);if(void 0!==n){return this.contextByContextType.get(n)||null}return this.lastContext?this.lastContext:null}contextHandlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call addContextListener, is not connected to this Private Channel`);if(i){const e=r.handlerIdsByContextTypes.get(i)||[];r.handlerIdsByContextTypes.set(i,[...e,n])}else r.globalHandler=n;Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&e.onAddContextListenerHandlerId&&this.provider.dispatch(e.clientIdentity,e.onAddContextListenerHandlerId,i)}))}async contextHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);if(i){let e;if(i.globalHandler===n)i.globalHandler=void 0;else for(const[t,r]of i.handlerIdsByContextTypes){const i=r.indexOf(n);i>-1&&(r.splice(i,1),e=t)}const r=(await this.getConnectedClients()).map((async n=>{const{clientIdentity:i,clientIdentity:{endpointId:r},onUnsubscribeHandlerId:o}=n;r!==t.endpointId&&o&&await this.provider.dispatch(i,o,e)}));try{await Promise.all(r)}catch(e){throw console.error(`Problem when attempting to dispatch to onUnsubscribeHandlers. Error: ${e} Removing Client: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}`),new Error(e)}}else console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}.`)}nonStandardHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);i?i.onDisconnectHandlerId===n?i.onDisconnectHandlerId=void 0:i.onAddContextListenerHandlerId===n?i.onAddContextListenerHandlerId=void 0:i.onUnsubscribeHandlerId===n&&(i.onUnsubscribeHandlerId=void 0):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}onAddContextHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onAddContextListener, is not connected to this Private Channel`);n.onAddContextListenerHandlerId=i,Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&Array.from(e.handlerIdsByContextTypes.keys()).forEach((e=>{this.provider.dispatch(t,i,e)}))}))}onDisconnectHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onDisconnect, is not connected to this Private Channel`);n.onDisconnectHandlerId=i}onUnsubscribeHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onUnsubscribe, is not connected to this Private Channel`);n.onUnsubscribeHandlerId=i}removeClient(e){const t=this.getClientState(e);if(!t)throw new Error(`Client with Identity: ${e.uuid} ${e.name}, tried to call disconnect, is not connected to this Private Channel`);t.handlerIdsByContextTypes.clear(),this.clients.delete(e.endpointId)}async fireOnDisconnectForOtherClients(e){const{endpointId:t}=e,n=(await this.getConnectedClients()).map((async e=>{const{clientIdentity:{endpointId:n},onDisconnectHandlerId:i}=e;n!==t&&i&&await this.provider.dispatch(e.clientIdentity,i)}));try{await Promise.all(n)}catch(t){throw console.error(`Problem when attempting to dispatch to onDisconnectHandlers. Error: ${t} Disconnecting Client: uuid: ${e.uuid}. name: ${e.name}. endpointId: ${e.endpointId}`),new Error(t)}}async unsubscribeAll(e){const{endpointId:t}=e,n=this.clients.get(t);if(n){const t=Array.from(n.handlerIdsByContextTypes.values()).flat(),i=n.globalHandler;if(t.length>0){const n=t.map((async t=>this.contextHandlerRemoved({handlerId:t},e)));try{await Promise.all(n)}catch(e){console.error(e.message)}}if(i)try{await this.contextHandlerRemoved({handlerId:i},e)}catch(e){console.error(e.message)}}}async handleClientDisconnecting(e){await this.unsubscribeAll(e),this.removeClient(e),await this.fireOnDisconnectForOtherClients(e)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={clientIdentity:e,handlerIdsByContextTypes:new Map,globalHandler:void 0,onAddContextListenerHandlerId:void 0,onUnsubscribeHandlerId:void 0,onDisconnectHandlerId:void 0};this.clients.set(e.endpointId,t)}}async getConnectedClients(){const e=await this.provider.getAllClientInfo();return Array.from(this.clients.values()).filter((t=>{const{uuid:n,name:i}=t.clientIdentity;return e.some((e=>i===e.name&&n===e.uuid))}))}static init(e,n){return new t(e,n)}},Ui}(),w=G,y=[{id:\"green\",displayMetadata:{color:\"#00CC88\",name:\"green\"}},{id:\"purple\",displayMetadata:{color:\"#8C61FF\",name:\"purple\"}},{id:\"orange\",displayMetadata:{color:\"#FF8C4C\",name:\"orange\"}},{id:\"red\",displayMetadata:{color:\"#FF5E60\",name:\"red\"}},{id:\"pink\",displayMetadata:{color:\"#FF8FB8\",name:\"pink\"}},{id:\"yellow\",displayMetadata:{color:\"#E9FF8F\",name:\"yellow\"}}];let f=class i extends c.Base{constructor(i,s,a){super(i),e.set(this,void 0),t.set(this,void 0),n.set(this,void 0),this.getProvider=()=>o(this,n,\"f\").getValue(),this.interopClients=new Map,this.contextGroupsById=new Map,r(this,t,a.contextGroups??[...y],\"f\"),r(this,e,a.fdc3Info,\"f\"),a?.logging&&(this.logging=a.logging),this.intentClientMap=new Map,this.lastContextMap=new Map,this.sessionContextGroupMap=new Map,r(this,n,new w.Lazy(s),\"f\"),this.setContextGroupMap(),this.setupChannelProvider()}static createClosedConstructor(...e){return class extends i{constructor(...t){if(t.length){const[n,i,r]=t;if(r&&\"object\"==typeof r&&!(0,u.default)(r,e[2]))return console.warn(\"You have modified the parameters of the InteropOverride constructor. This behavior is deprecated and will be removed in a future version. You can modify these options in your manifest. Please consult our Interop docs for guidance on migrating to the new override scheme.\"),void super(e[0],e[1],r);console.warn(\"You are attempting to pass arguments to the InteropOverride constructor. This is not necessary, and these passed arguments will be ignored. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.\")}super(...e)}}}setContext({context:e},t){this.wire.sendAction(\"interop-broker-set-context\").catch((e=>{}));const n=this.getClientState(t);if(!n||!n.contextGroupId)throw n?new Error(\"You must join a context group before you can set context.\"):new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);{const{contextGroupId:t}=n;this.setContextForGroup({context:e},t)}}setContextForGroup({context:e},t){this.wire.sendAction(\"interop-broker-set-context-for-group\").catch((e=>{}));const n=this.contextGroupsById.get(t);if(!n)throw new Error(`Unable to set context for context group that isn't in the context group mapping: ${t}.`);const r=i.checkContextIntegrity(e);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(e)}`);const o=e.type;n.set(o,e),this.lastContextMap.set(t,o);Array.from(this.interopClients.values()).filter((e=>e.contextGroupId===t)).forEach((t=>{for(const[,n]of t.contextHandlers)i.isContextTypeCompatible(o,n.contextType)&&this.invokeContextHandler(t.clientIdentity,n.handlerId,e)}))}getCurrentContext(e,t){this.wire.sendAction(\"interop-broker-get-current-context\").catch((e=>{}));const n=this.getClientState(t);if(!n?.contextGroupId)throw new Error(\"You must be a member of a context group to call getCurrentContext\");const{contextGroupId:i}=n,r=this.contextGroupsById.get(i),o=this.lastContextMap.get(i),s=e?.contextType??o;return r&&s?r.get(s):void 0}async joinContextGroup({contextGroupId:e,target:t},n){if(this.wire.sendAction(\"interop-broker-join-context-group\").catch((e=>{})),this.sessionContextGroupMap.has(e))throw new Error(l.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup);if(t){i.hasEndpointId(t)&&await this.addClientToContextGroup({contextGroupId:e},t);try{const n=this.channel.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name));if(!n.length)throw new Error(`Given Identity ${t.uuid} ${t.name} is not connected to the Interop Broker.`);n.length>1&&console.warn(`More than one connection found for identity ${t.uuid} ${t.name}`);const i=[];for(const t of n)i.push(this.addClientToContextGroup({contextGroupId:e},t));await Promise.all(i)}catch(e){throw new Error(e)}}else await this.addClientToContextGroup({contextGroupId:e},n)}async addClientToContextGroup({contextGroupId:e},t){this.wire.sendAction(\"interop-broker-add-client-to-context-group\").catch((e=>{}));const n=this.getClientState(t);if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(!this.getContextGroups().find((t=>t.id===e)))throw new Error(`Attempting to join a context group that does not exist: ${e}. You may only join existing context groups.`);if(n.contextGroupId!==e){n.contextGroupId=e,await this.setCurrentContextGroupInClientOptions(t,e);const i=this.contextGroupsById.get(e);for(const[,e]of n.contextHandlers){const{contextType:n,handlerId:r}=e;if(void 0===n)i.forEach(((e,n)=>{this.invokeContextHandler(t,r,e)}));else if(i.has(n)){const e=i.get(n);e&&this.invokeContextHandler(t,r,e)}}}}async removeFromContextGroup({target:e},t){if(this.wire.sendAction(\"interop-broker-remove-from-context-group\").catch((e=>{})),e){i.hasEndpointId(e)&&await this.removeClientFromContextGroup(e);try{const t=this.channel.connections.filter((t=>t.uuid===e.uuid&&t.name===e.name));if(!t.length)throw new Error(`No connection found for given Identity ${e.uuid} ${e.name}`);t.length>1&&console.warn(`More than one connection found for identity ${e.uuid} ${e.name}`);const n=[];for(const e of t)n.push(this.removeClientFromContextGroup(e));await Promise.all(n)}catch(e){throw new Error(e)}}else await this.removeClientFromContextGroup(t)}async removeClientFromContextGroup(e){this.wire.sendAction(\"interop-broker-remove-client-from-context-group\").catch((e=>{}));const t=this.getClientState(e);t&&(t.contextGroupId=void 0),await this.setCurrentContextGroupInClientOptions(e,null)}getContextGroups(){return this.wire.sendAction(\"interop-broker-get-context-groups\").catch((e=>{})),o(this,t,\"f\").map((e=>({...e})))}getInfoForContextGroup({contextGroupId:e}){return this.wire.sendAction(\"interop-broker-get-info-for-context-group\").catch((e=>{})),this.getContextGroups().find((t=>t.id===e))}getAllClientsInContextGroup({contextGroupId:e}){this.wire.sendAction(\"interop-broker-get-all-clients-in-context-group\").catch((e=>{}));return Array.from(this.interopClients.values()).filter((t=>t.contextGroupId===e)).map((e=>e.clientIdentity))}async handleFiredIntent(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.raiseIntent\",\"InteropBroker.handleFiredIntent\",t,\"interopClient.fireIntent\");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntent)}async setIntentTarget(e,t){this.wire.sendAction(\"interop-broker-set-intent-target\").catch((e=>{}));const n=this.intentClientMap.get(t.name),i=`intent-handler-${e.name}`;if(n){const t=n.get(i);if(t){if(t.pendingIntents.push(e),t.clientIdentity&&t.isReady){const{clientIdentity:e,pendingIntents:n}=t;try{const r=n[n.length-1];await this.invokeIntentHandler(e,i,r),t.pendingIntents=[]}catch(n){console.error(`Error invoking intent handler for client ${e.uuid}/${e.name}/${e.endpointId}`),t.isReady=!1}}}else n.set(i,{isReady:!1,pendingIntents:[e]})}else{this.intentClientMap.set(t.name,new Map);const n=this.intentClientMap.get(t.name);n&&n.set(i,{isReady:!1,pendingIntents:[e]})}}async handleInfoForIntent(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.findIntent\",\"InteropBroker.handleInfoForIntent\",t,\"interopClient.getInfoForIntent\");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntent)}async handleInfoForIntentsByContext(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.findIntentsByContext\",\"InteropBroker.handleInfoForIntentsByContext\",t,\"interopClient.getInfoForIntentsByContext\");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntentsByContext)}async handleFiredIntentForContext(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.raiseIntentForContext\",\"InteropBroker.handleFiredIntentForContext\",t,\"interopClient.fireIntentForContext\");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntentForContext)}async clientDisconnected(e){}async fdc3HandleOpen({app:e,context:t},n){const i=(0,l.generateOverrideWarning)(\"fdc3.open\",\"InteropBroker.fdc3HandleOpen\",n);throw console.warn(i),new Error(l.BROKER_ERRORS.fdc3Open)}async fdc3HandleFindInstances(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.open\",\"InteropBroker.fdc3HandleFindInstances\",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3FindInstances)}async fdc3HandleGetAppMetadata(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.getAppMetadata\",\"InteropBroker.fdc3HandleGetAppMetadata\",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3GetAppMetadata)}async invokeContextHandler(e,t,n){const i=await this.getProvider();try{await i.dispatch(e,t,n)}catch(i){console.error(`Error invoking context handler ${t} for context type ${n.type} in client ${e.uuid}/${e.name}/${e.endpointId}`,i)}}async invokeIntentHandler(e,t,n){const i=await this.getProvider();await i.dispatch(e,t,n)}async fdc3HandleGetInfo(t,n){const{fdc3Version:i}=t;return{fdc3Version:i,...o(this,e,\"f\"),optionalFeatures:{OriginatingAppMetadata:!1,UserChannelMembershipAPIs:!0},appMetadata:{appId:\"\",instanceId:\"\"}}}async getAllClientInfo(){return(await this.getProvider()).getAllClientInfo()}decorateSnapshot(e){return{...e,interopSnapshotDetails:{contextGroupStates:this.getContextGroupStates()}}}applySnapshot(e,t){const n=e?.interopSnapshotDetails?.contextGroupStates;n&&(t?.closeExistingWindows||this.updateExistingClients(n),this.rehydrateContextGroupStates(n))}updateExistingClients(e){this.interopClients.forEach((t=>{const{clientIdentity:n,contextGroupId:r,contextHandlers:o}=t;if(r){const t=e[r];for(const[,e]of Object.entries(t))o.forEach((t=>{const{handlerId:r,contextType:o}=t;i.isContextTypeCompatible(e.type,o)&&this.invokeContextHandler(n,r,e)}))}}))}getContextGroupStates(){return i.toObject(this.contextGroupsById)}rehydrateContextGroupStates(e){const t=Object.entries(e);for(const[e,n]of t){const t=Object.entries(n);for(const[n,i]of t)if(this.contextGroupsById.has(e)){this.contextGroupsById.get(e).set(n,i)}else console.warn(`Attempting to set a context group that isn't in the context group mapping. Skipping context group rehydration for: ${e}`)}}contextHandlerRegistered({contextType:e,handlerId:t},n){const i={contextType:e,handlerId:t},r=this.getClientState(n);if(r?.contextHandlers.set(t,i),r&&r.contextGroupId){const{contextGroupId:i}=r,o=this.contextGroupsById.get(i);if(void 0===e)o.forEach(((e,i)=>{this.invokeContextHandler(n,t,e)}));else if(o.has(e)){const i=o.get(e);i&&this.invokeContextHandler(n,t,i)}}}async intentHandlerRegistered(e,t){const{handlerId:n}=e,i=this.intentClientMap.get(t.name),r=i?.get(n);if(i)if(r){const{pendingIntents:e}=r;r.clientIdentity=t,r.isReady=!0;try{if(e.length>0){const i=e[e.length-1];await this.invokeIntentHandler(t,n,i),r.pendingIntents=[]}}catch(e){console.error(`Error invoking intent handler: ${n} for client ${t.uuid}/${t.name}/${t.endpointId}`)}}else i.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t});else{this.intentClientMap.set(t.name,new Map);const e=this.intentClientMap.get(t.name);e&&e.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t})}}removeContextHandler({handlerId:e},t){const n=this.getClientState(t);n&&n.contextHandlers.delete(e)}handleJoinSessionContextGroup({sessionContextGroupId:e},t){try{if(!e)throw new Error(\"Failed to join session context group: must specify group id.\");const n=this.sessionContextGroupMap.get(e);if(n)n.registerNewClient(t);else{const n=new h.default(this.channel,e);n.registerNewClient(t),this.sessionContextGroupMap.set(e,n)}return{hasConflict:this.contextGroupsById.has(e)}}catch(e){throw new Error(e)}}getClientState(e){return this.interopClients.get(e.endpointId)}static toObject(e){const t=Object.fromEntries(e),n={};return Object.entries(t).forEach((([e,t])=>{const i=Object.fromEntries(t);n[e]=i})),n}static checkContextIntegrity(e){if(!e)return{isValid:!1,reason:\"No context supplied\"};if(\"object\"!=typeof e)return{isValid:!1,reason:\"Context must be an Object\"};if(!e.type)return{isValid:!1,reason:\"Context must have a type property\"};if(e.id&&\"object\"!=typeof e.id)return{isValid:!1,reason:\"Context id must be an Object populated with key-value identifiers (if set)\"};if(e.id){const{id:t}=e,n=Object.keys(t);let i=!1;if(!n.length)return{isValid:!1,reason:\"Context id must have at least one key-value identifier\"};if(n.forEach((e=>{\"string\"==typeof e&&\"string\"==typeof t[e]||(i=!0)})),i)return{isValid:!1,reason:\"Context id key-value identifiers must be of type string\"}}return e.name&&\"string\"!=typeof e.name?{isValid:!1,reason:\"Context name must be of string type (if set)\"}:{isValid:!0}}static hasEndpointId(e){return void 0!==e.endpointId}static isContextTypeCompatible(e,t){return void 0===t||e===t}setContextGroupMap(){for(const e of this.getContextGroups())this.contextGroupsById.set(e.id,new Map)}async setCurrentContextGroupInClientOptions(e,t){try{const n=await this.fin.System.getEntityInfo(e.uuid,e.name);let i;\"view\"===n.entityType?i=await this.fin.View.wrap(e):\"window\"===n.entityType&&(i=await this.fin.Window.wrap(e)),i&&await i.updateOptions({interop:{currentContextGroup:t}})}catch(e){}}async setupChannelProvider(){try{const e=await this.getProvider();this.channel=e,this.wireChannel(e)}catch(e){throw new Error(`Error setting up Interop Broker Channel Provider: ${e}`)}}wireChannel(e){e.onConnection((async(e,t)=>{if(!await this.isConnectionAuthorized(e,t))throw new Error(`Connection not authorized for ${e.uuid}, ${e.name}`);if(!e.endpointId)throw new Error(\"Version too old to be compatible with Interop. Please upgrade your runtime to a more recent version.\");const n={contextGroupId:void 0,contextHandlers:new Map,clientIdentity:e};t?.currentContextGroup&&this.contextGroupsById.has(t.currentContextGroup)&&(n.contextGroupId=t?.currentContextGroup),this.interopClients.set(e.endpointId,n)})),e.onDisconnection((e=>{this.interopClients.delete(e.endpointId);const t=this.intentClientMap.get(e.name);t&&e.uuid===this.fin.me.uuid&&t.forEach((e=>{e.isReady=!1})),this.sessionContextGroupMap.forEach((t=>{t.onDisconnection(e)})),this.clientDisconnected(e)})),e.beforeAction((async(e,t,n)=>{if(!await this.isActionAuthorized(e,t,n))throw new Error(`Action (${e}) not authorized for ${n.uuid}, ${n.name}`);this.logging?.beforeAction?.enabled&&console.log(e,t,n)})),e.afterAction(((e,t,n)=>{this.logging?.afterAction?.enabled&&console.log(e,t,n)})),e.register(\"setContext\",this.setContext.bind(this)),e.register(\"fireIntent\",this.handleFiredIntent.bind(this)),e.register(\"getCurrentContext\",this.getCurrentContext.bind(this)),e.register(\"getInfoForIntent\",this.handleInfoForIntent.bind(this)),e.register(\"getInfoForIntentsByContext\",this.handleInfoForIntentsByContext.bind(this)),e.register(\"fireIntentForContext\",this.handleFiredIntentForContext.bind(this)),e.register(\"getContextGroups\",this.getContextGroups.bind(this)),e.register(\"joinContextGroup\",this.joinContextGroup.bind(this)),e.register(\"removeFromContextGroup\",this.removeFromContextGroup.bind(this)),e.register(\"getAllClientsInContextGroup\",this.getAllClientsInContextGroup.bind(this)),e.register(\"getInfoForContextGroup\",this.getInfoForContextGroup.bind(this)),e.register(\"contextHandlerRegistered\",this.contextHandlerRegistered.bind(this)),e.register(\"intentHandlerRegistered\",this.intentHandlerRegistered.bind(this)),e.register(\"removeContextHandler\",this.removeContextHandler.bind(this)),e.register(\"sessionContextGroup:createIfNeeded\",this.handleJoinSessionContextGroup.bind(this)),e.register(\"fdc3Open\",this.fdc3HandleOpen.bind(this)),e.register(\"fdc3v2FindIntentsByContext\",this.handleInfoForIntentsByContext.bind(this)),e.register(\"fdc3FindInstances\",this.fdc3HandleFindInstances.bind(this)),e.register(\"fdc3GetAppMetadata\",this.fdc3HandleGetAppMetadata.bind(this)),e.register(\"fdc3v2GetInfo\",(async(e,t)=>this.fdc3HandleGetInfo.bind(this)(e,t))),e.register(\"createPrivateChannelProvider\",(async e=>{const{channelId:t}=e,n=await this.fin.InterApplicationBus.Channel.create(t);p.PrivateChannelProvider.init(n,t)}))}isConnectionAuthorized(e,t){return this.wire.sendAction(\"interop-broker-is-connection-authorized\").catch((e=>{})),Promise.resolve(!0)}isActionAuthorized(e,t,n){return this.wire.sendAction(\"interop-broker-is-action-authorized\").catch((e=>{})),Promise.resolve(!0)}};return Gi.InteropBroker=f,e=new WeakMap,t=new WeakMap,n=new WeakMap,Gi}var zi,Ki={},qi={},Ji=s&&s.__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},Yi=s&&s.__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)};Object.defineProperty(qi,\"__esModule\",{value:!0});const Zi=d,Qi=Hi;class Xi extends Zi.Base{constructor(e,t,n){super(e),zi.set(this,void 0),this.id=n,Ji(this,zi,t,\"f\")}async setContext(e){this.wire.sendAction(\"interop-session-context-group-set-context\").catch((e=>{}));return(await Yi(this,zi,\"f\")).dispatch(`sessionContextGroup:setContext-${this.id}`,{sessionContextGroupId:this.id,context:e})}async getCurrentContext(e){this.wire.sendAction(\"interop-session-context-group-get-context\").catch((e=>{}));return(await Yi(this,zi,\"f\")).dispatch(`sessionContextGroup:getContext-${this.id}`,{sessionContextGroupId:this.id,type:e})}async addContextHandler(e,t){if(this.wire.sendAction(\"interop-session-context-group-add-handler\").catch((e=>{})),\"function\"!=typeof e)throw new Error(\"Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.\");const n=await Yi(this,zi,\"f\");let i;return i=t?`sessionContextHandler:invoke-${this.id}-${t}-${(0,Qi.generateId)()}`:`sessionContextHandler:invoke-${this.id}`,n.register(i,(0,Qi.wrapContextHandler)(e,i)),await n.dispatch(`sessionContextGroup:handlerAdded-${this.id}`,{handlerId:i,contextType:t}),{unsubscribe:await this.createUnsubscribeCb(i)}}async createUnsubscribeCb(e){const t=await Yi(this,zi,\"f\");return async()=>{t.remove(e),await t.dispatch(`sessionContextGroup:handlerRemoved-${this.id}`,{handlerId:e})}}getUserInstance(){return{id:this.id,setContext:(0,Qi.wrapInTryCatch)(this.setContext.bind(this),\"Failed to set context: \"),getCurrentContext:(0,Qi.wrapInTryCatch)(this.getCurrentContext.bind(this),\"Failed to get context: \"),addContextHandler:(0,Qi.wrapInTryCatch)(this.addContextHandler.bind(this),\"Failed to add context handler: \")}}}qi.default=Xi,zi=new WeakMap;var er={},tr={},nr={},ir={},rr=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),or=s&&s.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,\"default\",{enumerable:!0,value:t})}:function(e,t){e.default=t}),sr=s&&s.__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)&&rr(t,e,n);return or(t,e),t};Object.defineProperty(ir,\"__esModule\",{value:!0}),ir.PrivateChannelClient=void 0;const ar=sr(Hi);var cr,dr;function hr(){if(cr)return tr;cr=1;var e,t=s&&s.__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)},n=s&&s.__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},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(tr,\"__esModule\",{value:!0}),tr.FDC3ModuleBase=void 0;const o=nr,a=Hi,c=wr(),d=r(i);return tr.FDC3ModuleBase=class{get client(){return t(this,e,\"f\").call(this)}get fin(){return this.wire.getFin()}constructor(t,i){this.wire=i,e.set(this,void 0),n(this,e,t,\"f\")}async broadcast(e){return this.wire.sendAction(\"fdc3-broadcast\").catch((e=>{})),this.client.setContext(e)}async _open(e,t){this.wire.sendAction(\"fdc3-open\").catch((e=>{}));try{return await c.InteropClient.ferryFdc3Call(this.client,\"fdc3Open\",{app:e,context:t})}catch(e){const t=e.message===a.BROKER_ERRORS.fdc3Open?\"ResolverUnavailable\":e.message;throw new Error(t)}}async _getChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:\"system\",...(0,o.getUnsupportedChannelApis)()})))}async getOrCreateChannel(e){this.wire.sendAction(\"fdc3-get-or-create-channel\").catch((e=>{}));const t=(await this._getChannels()).find((t=>t.id===e));if(t)return{...t,type:\"system\",...(0,o.getUnsupportedChannelApis)()};try{const t=await this.client.joinSessionContextGroup(e);return(0,o.buildAppChannelObject)(t)}catch(e){throw console.error(e.message),new Error(o.ChannelError.CreationFailed)}}async getSystemChannels(){return this.wire.sendAction(\"fdc3-get-system-channels\").catch((e=>{})),this._getChannels()}async joinChannel(e){this.wire.sendAction(\"fdc3-join-channel\").catch((e=>{}));try{return await this.client.joinContextGroup(e)}catch(e){if(e.message===a.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup?console.error(\"The Channel you have tried to join is an App Channel. Custom Channels can only be defined by the Interop Broker through code or manifest configuration. Please use getOrCreateChannel.\"):console.error(e.message),e.message.startsWith(\"Attempting to join a context group that does not exist\"))throw new Error(o.ChannelError.NoChannelFound);throw new Error(o.ChannelError.AccessDenied)}}async getCurrentChannel(){this.wire.sendAction(\"fdc3-get-current-channel\").catch((e=>{}));const e=await this.getCurrentContextGroupInfo();return e?this.buildChannelObject(e):null}async leaveCurrentChannel(){return this.wire.sendAction(\"fdc3-leave-current-channel\").catch((e=>{})),this.client.removeFromContextGroup()}async getCurrentContextGroupInfo(){const e=await this.client.getContextGroups(),t=e.map((async e=>this.client.getAllClientsInContextGroup(e.id))),n=(await Promise.all(t)).findIndex((e=>e.some((e=>{const{uuid:t,name:n}=e;return this.wire.me.uuid===t&&this.wire.me.name===n}))));return e[n]}async buildChannelObject(e){return{...e,type:\"system\",addContextListener:(...[e,t])=>{let n,i;\"function\"==typeof e?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),n=e):(n=t,\"string\"==typeof e&&(i=e));const r=(async()=>{let e=!0;const t=await this.client.getCurrentContext(i);return this.client.addContextHandler(((i,r)=>{if(!e||(e=!1,!(0,d.default)(t,i)))return n(i,r)}),i)})();return{...r,unsubscribe:()=>r.then((e=>e.unsubscribe()))}},broadcast:this.broadcast.bind(this),getCurrentContext:async e=>{const t=await this.client.getCurrentContext(e);return void 0===t?null:t}}}},e=new WeakMap,tr}ir.PrivateChannelClient=class{constructor(e,t){this.id=t,this.client=e,this.listeners=new Map}async broadcast(e){return this.client.dispatch(\"broadcast\",{context:e})}async getCurrentContext(e){return this.client.dispatch(\"getCurrentContext\",{contextType:e})}async addContextListener(e,t){if(\"function\"!=typeof t)throw new Error(\"Non-function argument passed to the second parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.\");let n;n=e?`contextHandler:invoke-${this.id}-${e}-${ar.generateId()}`:`contextHandler:invoke-${this.id}-${ar.generateId()}`,this.client.register(n,ar.wrapContextHandler(t,n));const i={unsubscribe:await this.createContextUnsubscribeCb(n)};return this.listeners.set(n,i),await this.client.dispatch(\"contextHandlerAdded\",{handlerId:n,contextType:e}),i}createNonStandardUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch(\"nonStandardHandlerRemoved\",{handlerId:e})}}createContextUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch(\"contextHandlerRemoved\",{handlerId:e})}}onAddContextListener(e){const t=`onContextHandlerAdded:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch(\"onAddContextHandlerAdded\",{handlerId:t}),n}onDisconnect(e){const t=`onDisconnect:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch(\"onDisconnectHandlerAdded\",{handlerId:t}),n}onUnsubscribe(e){const t=`onUnsubscribe:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch(\"onUnsubscribeHandlerAdded\",{handlerId:t}),n}async cleanUpAllSubs(){Array.from(this.listeners.keys()).forEach((e=>{this.client.remove(e),this.listeners.delete(e)}))}async disconnect(){try{await this.client.dispatch(\"clientDisconnecting\"),await this.cleanUpAllSubs(),await this.client.disconnect()}catch(e){throw new Error(e.message)}}},function(e){var t=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,\"__esModule\",{value:!0}),e.getIntentResolution=e.isChannel=e.isContext=e.connectPrivateChannel=e.buildAppChannelObject=e.buildPrivateChannelObject=e.ChannelError=e.ResultError=e.UnsupportedChannelApiError=e.getUnsupportedChannelApis=void 0;const n=Hi,r=ir,o=t(i);e.getUnsupportedChannelApis=e=>({addContextListener:()=>{throw new a(\"Channel.addContextListener\",e)},broadcast:()=>{throw new a(\"Channel.broadcast\",e)},getCurrentContext:()=>{throw new a(\"Channel.getCurrentContext\",e)}});class a extends Error{constructor(e,t=\"System\"){super(e),this.message=`Calling ${e} on an instance of a ${t} Channel returned by fdc3.get${t}Channels is not supported. If you would like to use a ${t} Channel, please use fdc3.joinChannel, fdc3.addContextListener, and fdc3.broadcast instead.`}}var c,d;e.UnsupportedChannelApiError=a,function(e){e.NoResultReturned=\"NoResultReturned\",e.IntentHandlerRejected=\"IntentHandlerRejected\"}(c=e.ResultError||(e.ResultError={})),(d=e.ChannelError||(e.ChannelError={})).NoChannelFound=\"NoChannelFound\",d.AccessDenied=\"AccessDenied\",d.CreationFailed=\"CreationFailed\";e.buildPrivateChannelObject=e=>{let t=!1;const n=()=>{if(t)throw new Error(\"Private Channel Client has been disconnected from the Private Channel\")};return{id:e.id,type:\"private\",broadcast:async t=>(n(),e.broadcast(t)),getCurrentContext:async t=>(n(),e.getCurrentContext(t)),addContextListener:async(t,i)=>{n();let r=i,o=t;\"function\"==typeof t&&(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),r=t,o=null);return e.addContextListener(o,r)},onAddContextListener:t=>(n(),e.onAddContextListener(t)),disconnect:async()=>(n(),t=!0,e.disconnect()),onDisconnect:t=>(n(),e.onDisconnect(t)),onUnsubscribe:t=>(n(),e.onUnsubscribe(t))}};e.buildAppChannelObject=e=>({id:e.id,type:\"app\",broadcast:e.setContext,getCurrentContext:async t=>{const n=await e.getCurrentContext(t);return void 0===n?null:n},addContextListener:(t,n)=>{let i,r;\"function\"==typeof t?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),i=t):(i=n,\"string\"==typeof t&&(r=t));const s=(async()=>{let t=!0;const n=await e.getCurrentContext(r);return e.addContextHandler(((e,r)=>{if(!t||(t=!1,!(0,o.default)(n,e)))return i(e,r)}),r)})();return{...s,unsubscribe:()=>s.then((e=>e.unsubscribe()))}}});e.connectPrivateChannel=async t=>{try{const n=await fin.InterApplicationBus.Channel.connect(t),i=new r.PrivateChannelClient(n,t);return(0,e.buildPrivateChannelObject)(i)}catch(e){throw new Error(`Private Channel with id: ${t} doesn't exist`)}};e.isContext=e=>{if(e&&\"object\"==typeof e&&\"type\"in e){const{type:t}=e;return\"string\"==typeof t}return!1};e.isChannel=e=>{if(e&&\"object\"==typeof e&&\"type\"in e&&\"id\"in e){const{type:t,id:n}=e;return\"string\"==typeof t&&\"string\"==typeof n&&(\"app\"===t||\"private\"===t)}return!1};e.getIntentResolution=async(t,i,r,o)=>{const s=(0,n.generateId)(),a=new Promise(((e,t)=>{fin.InterApplicationBus.subscribe({uuid:\"*\"},s,(t=>{e(t)})).catch((()=>t(new Error(\"getResult is not supported in this environment\"))))})),d=r?{target:r,intentResolutionResultId:s}:{intentResolutionResultId:s},h=o?{name:o,context:i,metadata:d}:{...i,metadata:d},l=async()=>{let n=await a;if(!n||\"object\"!=typeof n)throw new Error(c.NoResultReturned);const{error:i}=n;if(i)throw new Error(c.IntentHandlerRejected);if((0,e.isChannel)(n)){const{id:i,type:r}=n;switch(r){case\"private\":n=await(0,e.connectPrivateChannel)(i);break;case\"app\":{const r=await t.joinSessionContextGroup(i);n=(0,e.buildAppChannelObject)(r);break}}}else if(!(0,e.isContext)(n))throw new Error(c.NoResultReturned);return n},u=o?await t.fireIntent(h):await t.fireIntentForContext(h);return\"object\"!=typeof u?{source:{appId:\"\",instanceId:\"\"},intent:\"\",version:\"2.0\",getResult:l}:{...u,getResult:l}}}(nr);var lr,ur,pr={};function wr(){if(ur)return Ki;ur=1;var e,t,n=s&&s.__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},i=s&&s.__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)},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ki,\"__esModule\",{value:!0}),Ki.InteropClient=void 0;const o=d,a=r(qi),c=function(){if(dr)return er;dr=1,Object.defineProperty(er,\"__esModule\",{value:!0}),er.Fdc3Module=void 0;const e=Hi,t=hr();class n extends t.FDC3ModuleBase{async open(e,t){await super._open(e,t)}addContextListener(e,t){let n;return this.wire.sendAction(\"fdc3-add-context-listener\").catch((e=>{})),\"function\"==typeof e?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),n=this.client.addContextHandler(e)):n=this.client.addContextHandler(t,null===e?void 0:e),{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}addIntentListener(e,t){this.wire.sendAction(\"fdc3-add-intent-listener\").catch((e=>{}));const n=this.client.registerIntentHandler((e=>{const{context:n,metadata:i}=e,{metadata:r}=n,o=i?.intentResolutionResultId||r?.intentResolutionResultId;o&&this.fin.InterApplicationBus.publish(o,null).catch((()=>null)),t(e.context)}),e,{fdc3Version:\"1.2\"});return{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}async raiseIntent(t,n,i){this.wire.sendAction(\"fdc3-raise-intent\").catch((e=>{}));const r=i?{name:t,context:n,metadata:{target:i}}:{name:t,context:n};try{return await this.client.fireIntent(r)}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntent?\"ResolverUnavailable\":t.message;throw new Error(n)}}async findIntent(t,n){this.wire.sendAction(\"fdc3-find-intent\").catch((e=>{}));try{return await this.client.getInfoForIntent({name:t,context:n})}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntent?\"ResolverUnavailable\":t.message;throw new Error(n)}}async findIntentsByContext(t){this.wire.sendAction(\"fdc3-find-intents-by-context\").catch((e=>{}));try{return await this.client.getInfoForIntentsByContext(t)}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntentsByContext?\"ResolverUnavailable\":t.message;throw new Error(n)}}async raiseIntentForContext(t,n){this.wire.sendAction(\"fdc3-raise-intent-for-context\").catch((e=>{}));try{return await this.client.fireIntentForContext({...t,metadata:{target:n}})}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntentForContext?\"ResolverUnavailable\":t.message;throw new Error(n)}}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}getInfo(){return this.wire.sendAction(\"fdc3-get-info\").catch((e=>{})),{providerVersion:this.wire.environment.getAdapterVersionSync(),provider:`openfin-${this.wire.me.uuid}`,fdc3Version:\"1.2\"}}}return er.Fdc3Module=n,er}(),h=function(){if(lr)return pr;lr=1,Object.defineProperty(pr,\"__esModule\",{value:!0}),pr.Fdc3Module2=void 0;const e=hr(),t=Hi,n=wr(),i=nr,r=ir;class o extends e.FDC3ModuleBase{async open(e,t){return\"string\"==typeof e&&console.warn(\"Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).\"),super._open(e,t)}async findInstances(e){this.wire.sendAction(\"fdc3-find-instances\").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,\"fdc3FindInstances\",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3FindInstances?\"ResolverUnavailable\":e.message;throw new Error(n)}}async getAppMetadata(e){this.wire.sendAction(\"fdc3-get-app-metadata\").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,\"fdc3GetAppMetadata\",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3GetAppMetadata?\"ResolverUnavailable\":e.message;throw new Error(n)}}async addContextListener(e,t){this.wire.sendAction(\"fdc3-add-context-listener\").catch((e=>{}));const n=e=>t=>{const{contextMetadata:n,...i}=t,r=n?[{...i},n]:[t,null];e(...r)};let i=t,r=n(i);return\"function\"==typeof e?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),i=e,r=n(i),this.client.addContextHandler(r)):this.client.addContextHandler(r,null===e?void 0:e)}async findIntent(e,n,i){this.wire.sendAction(\"fdc3-find-intent\").catch((e=>{}));try{return await this.client.getInfoForIntent({name:e,context:n,metadata:{resultType:i}})}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntent?\"ResolverUnavailable\":e.message;throw new Error(n)}}async findIntentsByContext(e,i){this.wire.sendAction(\"fdc3-find-intents-by-context\").catch((e=>{}));const r=i?{context:e,metadata:{resultType:i}}:e;try{return await n.InteropClient.ferryFdc3Call(this.client,\"fdc3v2FindIntentsByContext\",r)}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntentsByContext?\"ResolverUnavailable\":e.message;throw new Error(n)}}async raiseIntent(e,n,r){this.wire.sendAction(\"fdc3-raise-intent\").catch((e=>{}));try{return\"string\"==typeof r&&console.warn(\"Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).\"),(0,i.getIntentResolution)(this.client,n,r,e)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?\"ResolverUnavailable\":e.message;throw new Error(n)}}async raiseIntentForContext(e,n){this.wire.sendAction(\"fdc3-raise-intent-for-context\").catch((e=>{}));try{return\"string\"==typeof n&&console.warn(\"Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).\"),(0,i.getIntentResolution)(this.client,e,n)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?\"ResolverUnavailable\":e.message;throw new Error(n)}}async addIntentListener(e,t){if(this.wire.sendAction(\"fdc3-add-intent-listener\").catch((e=>{})),\"string\"!=typeof e)throw new Error(\"First argument must be an Intent name\");return this.client.registerIntentHandler((async e=>{let n,i;const{context:r,metadata:o}=e,{contextMetadata:s,metadata:a,...c}=r,d=o?.intentResolutionResultId||a?.intentResolutionResultId;try{const e=a?{metadata:a,...c}:{...c};n=await t(e,s),i=n}catch(e){n=e,i={error:!0}}if(d&&this.fin.InterApplicationBus.publish(d,i).catch((()=>null)),n instanceof Error)throw new Error(n.message);return n}),e,{fdc3Version:\"2.0\"})}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}async createPrivateChannel(){const e=(0,t.generateId)();await n.InteropClient.ferryFdc3Call(this.client,\"createPrivateChannelProvider\",{channelId:e});const o=await this.fin.InterApplicationBus.Channel.connect(e),s=new r.PrivateChannelClient(o,e);return(0,i.buildPrivateChannelObject)(s)}async getUserChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:\"user\",...(0,i.getUnsupportedChannelApis)(\"User\")})))}async getSystemChannels(){return console.warn(\"This API has been deprecated. Please use fdc3.getUserChannels instead.\"),super.getSystemChannels()}async joinUserChannel(e){return super.joinChannel(e)}async joinChannel(e){return console.warn(\"This API has been deprecated. Please use fdc3.joinUserChannel instead.\"),super.joinChannel(e)}async getCurrentChannel(){const e=await super.getCurrentChannel();return e?{...e,type:\"user\",broadcast:this.broadcast.bind(this)}:null}async getInfo(){return n.InteropClient.ferryFdc3Call(this.client,\"fdc3v2GetInfo\",{fdc3Version:\"2.0\"})}}return pr.Fdc3Module2=o,pr}(),l=Hi;let u=class extends o.Base{constructor(i,r){super(i),e.set(this,void 0),t.set(this,void 0),n(this,t,new Map,\"f\"),n(this,e,r,\"f\")}async setContext(t){this.wire.sendAction(\"interop-client-set-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"setContext\",{context:t})}async addContextHandler(t,n){if(this.wire.sendAction(\"interop-client-add-context-handler\").catch((e=>{})),\"function\"!=typeof t)throw new Error(\"Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.\");const r=await i(this,e,\"f\");let o;o=n?`invokeContextHandler-${n}-${(0,l.generateId)()}`:\"invokeContextHandler\";const s=(0,l.wrapContextHandler)(t,o);return r.register(o,s),await r.dispatch(\"contextHandlerRegistered\",{handlerId:o,contextType:n}),{unsubscribe:async()=>{r.remove(o),await r.dispatch(\"removeContextHandler\",{handlerId:o})}}}async getContextGroups(){this.wire.sendAction(\"interop-client-get-context-groups\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getContextGroups\")}async joinContextGroup(t,n){this.wire.sendAction(\"interop-client-join-context-group\").catch((e=>{}));const r=await i(this,e,\"f\");if(!t)throw new Error(\"No contextGroupId specified for joinContextGroup.\");return r.dispatch(\"joinContextGroup\",{contextGroupId:t,target:n})}async removeFromContextGroup(t){this.wire.sendAction(\"interop-client-remove-from-context-group\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"removeFromContextGroup\",{target:t})}async getAllClientsInContextGroup(t){this.wire.sendAction(\"interop-client-get-all-clients-in-context-group\").catch((e=>{}));const n=await i(this,e,\"f\");if(!t)throw new Error(\"No contextGroupId specified for getAllClientsInContextGroup.\");return n.dispatch(\"getAllClientsInContextGroup\",{contextGroupId:t})}async getInfoForContextGroup(t){this.wire.sendAction(\"interop-client-get-info-for-context-group\").catch((e=>{}));const n=await i(this,e,\"f\");if(!t)throw new Error(\"No contextGroupId specified for getInfoForContextGroup.\");return n.dispatch(\"getInfoForContextGroup\",{contextGroupId:t})}async fireIntent(t){this.wire.sendAction(\"interop-client-fire-intent\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"fireIntent\",t)}async registerIntentHandler(t,n,r){this.wire.sendAction(\"interop-client-register-intent-handler\").catch((e=>{}));const o=await i(this,e,\"f\"),s=`intent-handler-${n}`,a=(0,l.wrapIntentHandler)(t,s);try{await o.register(s,a),await o.dispatch(\"intentHandlerRegistered\",{handlerId:s,...r})}catch(e){throw new Error(\"Unable to register intent handler\")}return{unsubscribe:async()=>{o.remove(s)}}}async getCurrentContext(t){this.wire.sendAction(\"interop-client-get-current-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getCurrentContext\",{contextType:t})}async getInfoForIntent(t){this.wire.sendAction(\"interop-client-get-info-for-intent\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getInfoForIntent\",t)}async getInfoForIntentsByContext(t){this.wire.sendAction(\"interop-client-get-info-for-intents-by-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getInfoForIntentsByContext\",t)}async fireIntentForContext(t){this.wire.sendAction(\"interop-client-fire-intent-for-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"fireIntentForContext\",t)}async joinSessionContextGroup(n){try{const r=i(this,t,\"f\").get(n);if(r)return r.getUserInstance();const o=await i(this,e,\"f\"),{hasConflict:s}=await o.dispatch(\"sessionContextGroup:createIfNeeded\",{sessionContextGroupId:n});s&&console.warn(`A (non-session) context group with the name \"${n}\" already exists. If you are trying to join a Context Group, call joinContextGroup instead.`);const c=new a.default(this.wire,i(this,e,\"f\"),n);return i(this,t,\"f\").set(n,c),c.getUserInstance()}catch(e){throw console.error(`Error thrown trying to create Session Context Group with id \"${n}\": ${e}`),e}}async onDisconnection(t){this.wire.sendAction(\"interop-client-add-ondisconnection-listener\").catch((e=>{}));return(await i(this,e,\"f\")).onDisconnection((e=>{const{uuid:n}=e;t({type:\"interop-broker\",topic:\"disconnected\",brokerName:n})}))}getFDC3Sync(e){switch(e){case\"1.2\":return new c.Fdc3Module((()=>this),this.wire);case\"2.0\":return new h.Fdc3Module2((()=>this),this.wire);default:throw new Error(`Invalid FDC3 version provided: ${e}. Must be '1.2' or '2.0'`)}}async getFDC3(e){return this.getFDC3Sync(e)}static async ferryFdc3Call(t,n,r){return(await i(t,e,\"f\")).dispatch(n,r||null)}};return Ki.InteropClient=u,e=new WeakMap,t=new WeakMap,Ki}var yr,fr,gr,mr={};function vr(){if(yr)return mr;yr=1,Object.defineProperty(mr,\"__esModule\",{value:!0}),mr.overrideCheck=mr.checkFDC32Overrides=mr.getDefaultViewFdc3VersionFromAppInfo=void 0;const e=Vi();function t(t){return[\"fdc3HandleFindInstances\",\"handleInfoForIntent\",\"handleInfoForIntentsByContext\",\"fdc3HandleGetAppMetadata\",\"fdc3HandleGetInfo\",\"fdc3HandleOpen\",\"handleFiredIntent\",\"handleFiredIntentForContext\"].filter((n=>t[n]===e.InteropBroker.prototype[n]))}return mr.getDefaultViewFdc3VersionFromAppInfo=function({manifest:e,initialOptions:t}){const n=e?.platform?.defaultViewOptions?.fdc3InteropApi??t.defaultViewOptions?.fdc3InteropApi;return[\"1.2\",\"2.0\"].includes(n??\"\")?n:void 0},mr.checkFDC32Overrides=t,mr.overrideCheck=function(e,n){if(n&&\"2.0\"===n){const n=t(e);n.length>0&&console.warn(`WARNING: FDC3 2.0 has been set as a default option for Views in this Platform, but the required InteropBroker APIs for FDC3 2.0 compliance have not all been overridden.\\nThe following APIs need to be overridden:\\n${n.join(\"\\n\")}`)}},mr}function Cr(){return gr||(gr=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),i=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),i(function(){if(fr)return Ti;fr=1;var e=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ti,\"__esModule\",{value:!0}),Ti.InteropModule=void 0;const t=e(n),i=$i,r=d,o=Vi(),a=wr(),c=vr(),h=Tn,l=e=>new e,u=\"You have attempted to use or modify InteropBroker parameters, which is not allowed. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.\";class p extends r.Base{async init(e,n=l){this.wire.sendAction(\"interop-init\").catch((()=>{}));const r=await this.wire.environment.getInteropInfo(this.wire.getFin()),s=(0,i.createUnusableObject)(u),a=(0,i.createWarningObject)(u,(0,t.default)(r)),d=async()=>{throw new Error(u)},p=o.InteropBroker.createClosedConstructor(this.wire,(()=>this.fin.InterApplicationBus.Channel.create(`interop-broker-${e}`)),r);let w;return w=Array.isArray(n)?new((0,h.overrideFromComposables)(...n)(p))(s,d,a):await n(p,s,d,a),(0,c.overrideCheck)(w,r.fdc3Version),w}connectSync(e,t){return this.wire.sendAction(\"interop-connect-sync\").catch((()=>{})),new a.InteropClient(this.wire,this.wire.environment.whenReady().then((()=>this.fin.InterApplicationBus.Channel.connect(`interop-broker-${e}`,{payload:t}))))}}return Ti.InteropModule=p,Ti}(),e),i(wr(),e),i(Vi(),e)}(Li)),Li}var br={},Ir={},Er={},xr={};Object.defineProperty(xr,\"__esModule\",{value:!0}),xr.getSnapshotSourceChannelName=void 0;xr.getSnapshotSourceChannelName=e=>`snapshot-source-provider-${e.uuid}`;var Ar,Pr,Mr,_r,Or,Sr=s&&s.__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},Rr=s&&s.__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)};Object.defineProperty(Er,\"__esModule\",{value:!0}),Er.SnapshotSource=void 0;const Fr=d,jr=xr,kr=new Map;class Lr extends Fr.Base{constructor(e,t){super(e),Ar.set(this,void 0),Pr.set(this,(()=>(kr.has(this.identity.uuid)||kr.set(this.identity.uuid,{eventFired:null,clientPromise:null}),kr.get(this.identity.uuid)))),Mr.set(this,(()=>(Rr(this,Pr,\"f\").call(this).clientPromise||(Rr(this,Pr,\"f\").call(this).clientPromise=Rr(this,_r,\"f\").call(this)),Rr(this,Pr,\"f\").call(this).clientPromise))),_r.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);try{Rr(this,Pr,\"f\").call(this).eventFired||await Rr(this,Or,\"f\").call(this);const t=await this.fin.InterApplicationBus.Channel.connect(e,{wait:!1});return t.onDisconnection((()=>{Rr(this,Pr,\"f\").call(this).clientPromise=null,Rr(this,Pr,\"f\").call(this).eventFired=null})),t}catch(e){throw Rr(this,Pr,\"f\").call(this).clientPromise=null,new Error(\"The targeted SnapshotSource is not currently initialized. Await this object's ready() method.\")}})),Or.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);let t,n;const i=new Promise(((e,i)=>{t=e,n=i}));Rr(this,Pr,\"f\").call(this).eventFired=i;const r=async i=>{try{i.channelName===e&&(t(),await this.fin.InterApplicationBus.Channel.removeListener(\"connected\",r))}catch(e){n(e)}};await this.fin.InterApplicationBus.Channel.on(\"connected\",r)})),Sr(this,Ar,t,\"f\")}get identity(){return Rr(this,Ar,\"f\")}async ready(){this.wire.sendAction(\"snapshot-source-ready\").catch((e=>{}));try{await Rr(this,Mr,\"f\").call(this)}catch(e){await Rr(this,Pr,\"f\").call(this).eventFired}}async getSnapshot(){this.wire.sendAction(\"snapshot-source-get-snapshot\").catch((e=>{}));const e=await Rr(this,Mr,\"f\").call(this),t=await e.dispatch(\"get-snapshot\");return(await t).snapshot}async applySnapshot(e){this.wire.sendAction(\"snapshot-source-apply-snapshot\").catch((e=>{}));return(await Rr(this,Mr,\"f\").call(this)).dispatch(\"apply-snapshot\",{snapshot:e})}}Er.SnapshotSource=Lr,Ar=new WeakMap,Pr=new WeakMap,Mr=new WeakMap,_r=new WeakMap,Or=new WeakMap,Object.defineProperty(Ir,\"__esModule\",{value:!0}),Ir.SnapshotSourceModule=void 0;const Tr=d,$r=Er,Br=xr;class Gr extends Tr.Base{async init(e){if(this.wire.sendAction(\"snapshot-source-init\").catch((e=>{})),\"object\"!=typeof e||\"function\"!=typeof e.getSnapshot||\"function\"!=typeof e.applySnapshot)throw new Error(\"you must pass in a valid SnapshotProvider\");const t=await this.fin.InterApplicationBus.Channel.create((0,Br.getSnapshotSourceChannelName)(this.fin.me));t.register(\"get-snapshot\",(async()=>({snapshot:await e.getSnapshot()}))),t.register(\"apply-snapshot\",(({snapshot:t})=>e.applySnapshot(t)))}wrapSync(e){return this.wire.sendAction(\"snapshot-source-wrap-sync\").catch((e=>{})),new $r.SnapshotSource(this.wire,e)}async wrap(e){return this.wire.sendAction(\"snapshot-source-wrap\").catch((e=>{})),this.wrapSync(e)}}Ir.SnapshotSourceModule=Gr,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Ir,e),n(Er,e)}(br),Object.defineProperty(a,\"__esModule\",{value:!0});var Wr=a.Fin=void 0;const Hr=t,Nr=c,Dr=ie(),Ur=Z(),Vr=de,zr=en,Kr=rn,qr=un,Jr=bn,Yr=J(),Zr=An,Qr=ki,Xr=Cr(),eo=br;class to extends Hr.EventEmitter{constructor(e){super(),this.wire=e,this.System=new Nr.System(e),this.Window=new Dr._WindowModule(e),this.Application=new Ur.ApplicationModule(e),this.InterApplicationBus=new Vr.InterApplicationBus(e),this.Clipboard=new zr.Clipboard(e),this.ExternalApplication=new Kr.ExternalApplicationModule(e),this.Frame=new qr._FrameModule(e),this.GlobalHotkey=new Jr.GlobalHotkey(e),this.Platform=new Zr.PlatformModule(e,this.InterApplicationBus.Channel),this.View=new Yr.ViewModule(e),this.Interop=new Xr.InteropModule(e),this.SnapshotSource=new eo.SnapshotSourceModule(e),e.registerFin(this),this.me=(0,Qr.getMe)(e),e.on(\"disconnected\",(()=>{this.emit(\"disconnected\")}))}}Wr=a.Fin=to;var no={},io={};function ro(e){return\"string\"==typeof e.manifestUrl}function oo(e){return ao(e)&&\"string\"==typeof e.address}function so(e){return oo(e)&&\"string\"==typeof e.token}function ao(e){return\"string\"==typeof e.uuid}function co(e){return e.runtime&&\"string\"==typeof e.runtime.version}function ho(e){return ao(e)&&co(e)}Object.defineProperty(io,\"__esModule\",{value:!0}),io.isInternalConnectConfig=io.isPortDiscoveryConfig=io.isNewConnectConfig=io.isConfigWithReceiver=io.isRemoteConfig=io.isExistingConnectConfig=io.isExternalConfig=void 0,io.isExternalConfig=ro,io.isExistingConnectConfig=oo,io.isRemoteConfig=so,io.isConfigWithReceiver=function(e){return\"object\"==typeof e.receiver&&so({...e,address:\"\"})},io.isNewConnectConfig=ho,io.isPortDiscoveryConfig=function(e){return ro(e)&&co(e)||ho(e)},io.isInternalConnectConfig=function(e){return oo(e)||ho(e)};var lo={},uo={};Object.defineProperty(uo,\"__esModule\",{value:!0}),uo.EmitterMap=void 0;const po=t;function wo(e){return Buffer.from(e).toString(\"base64\")}uo.EmitterMap=class{constructor(){this.storage=new Map}hashKeys(e){return e.map(wo).join(\"/\")}getOrCreate(e){const t=this.hashKeys(e);return this.storage.has(t)||this.storage.set(t,new po.EventEmitter),this.storage.get(t)}has(e){return this.storage.has(this.hashKeys(e))}delete(e){const t=this.hashKeys(e);return this.storage.delete(t)}},Object.defineProperty(lo,\"__esModule\",{value:!0});const yo=uo;class fo extends yo.EmitterMap{constructor(){super(...arguments),this.dispatchEvent=e=>{if(function(e){return\"process-desktop-event\"===e.action}(e)){const{payload:t}=e,n=function(e){const{topic:t}=e;if(\"frame\"===t||\"window\"===t||\"view\"===t){const{uuid:n,name:i}=e;return[t,n,i]}if(\"application\"===t){const{uuid:n}=e;return[t,n]}return[t]}(t);if(this.has(n))return this.getOrCreate(n).emit(t.type,t),!0}return!1}}}lo.default=fo;var go,mo,vo=s&&s.__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},Co=s&&s.__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)},bo=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(no,\"__esModule\",{value:!0});var Io=no.Transport=void 0;const Eo=t,xo=io,Ao=g,Po=bo(lo),Mo=ki,_o=ke;class Oo extends Eo.EventEmitter{constructor(e,t,n){super(),this.wireListeners=new Map,this.topicRefMap=new Map,this.eventAggregator=new Po.default,this.messageHandlers=[this.eventAggregator.dispatchEvent],go.set(this,void 0),mo.set(this,void 0),this.connectSync=()=>{Co(this,go,\"f\").connectSync()},this.getPort=()=>Co(this,go,\"f\").getPort(),vo(this,go,new e(this.onmessage.bind(this)),\"f\"),this.environment=t,this.sendRaw=Co(this,go,\"f\").send.bind(Co(this,go,\"f\")),this.registerMessageHandler(this.handleMessage.bind(this)),Co(this,go,\"f\").on(\"disconnected\",(()=>{for(const[,{handleNack:e}]of this.wireListeners)e({reason:\"Remote connection has closed\"});this.wireListeners.clear(),this.emit(\"disconnected\")}));const{uuid:i,name:r}=n,o=this.environment.getCurrentEntityType();this.me=(0,Mo.getBaseMe)(o,i,r)}getFin(){if(!Co(this,mo,\"f\"))throw new Error(\"No Fin object registered for this transport\");return Co(this,mo,\"f\")}registerFin(e){if(Co(this,mo,\"f\"))throw new Error(\"Fin object has already been registered for this transport\");vo(this,mo,e,\"f\")}shutdown(){return Co(this,go,\"f\").shutdown()}async connect(e){if((0,xo.isConfigWithReceiver)(e))return await Co(this,go,\"f\").connect(e.receiver),this.authorize(e);if((0,xo.isRemoteConfig)(e))return this.connectRemote(e);if((0,xo.isExistingConnectConfig)(e))return this.connectByPort(e);if((0,xo.isNewConnectConfig)(e)){const t=await this.environment.retrievePort(e);return this.connectByPort({...e,address:`ws://localhost:${t}`})}}async connectRemote(e){return await Co(this,go,\"f\").connect(new(this.environment.getWsConstructor())(e.address)),this.authorize(e)}async connectByPort(e){const{address:t,uuid:n}=e,i={...e,type:\"file-token\"},r=Co(this,go,\"f\");await r.connect(new(this.environment.getWsConstructor())(e.address));const o=await this.sendAction(\"request-external-authorization\",{uuid:n,type:\"file-token\"},!0);if(\"external-authorization-response\"!==o.action)throw new Ao.UnexpectedActionError(o.action);return await this.environment.writeToken(o.payload.file,o.payload.token),this.authorize(i)}async authorize(e){const t=await this.sendAction(\"request-authorization\",e,!0);if(\"authorization-response\"!==t.action)throw new Ao.UnexpectedActionError(t.action);if(!0!==t.payload.success)throw new Ao.RuntimeError(t.payload)}sendAction(e,t={},n=!1){let i=()=>{};const r=Ao.RuntimeError.getCallSite(1),o=this.environment.getNextMessageId(),s=new Promise(((s,a)=>{i=a;const c={action:e,payload:t,messageId:o},d=Co(this,go,\"f\");return this.addWireListener(o,s,(e=>this.nackHandler(e,a,r)),n),d.send(c).catch(a)}));return Object.assign(s,{cancel:i,messageId:o})}nackHandler(e,t,n){t(\"string\"==typeof e?e:new Ao.RuntimeError(e,n))}ferryAction(e){return new Promise(((t,n)=>{const i=this.environment.getNextMessageId();e.messageId=i;const r=e=>{t(e.payload)};return Co(this,go,\"f\").send(e).then((()=>this.addWireListener(i,r,(e=>this.nackHandler(e,n)),!1))).catch(n)}))}registerMessageHandler(e){this.messageHandlers.push(e)}addWireListener(e,t,n,i){i?this.uncorrelatedListener=t:this.wireListeners.has(e)?n({reason:\"Duplicate handler id\",error:(0,_o.errorToPOJO)(new Ao.DuplicateCorrelationError(String(e)))}):this.wireListeners.set(e,{resolve:t,handleNack:n})}onmessage(e){for(const t of this.messageHandlers)t.call(null,e)}handleMessage(e){const t=e.correlationId||NaN;if(\"correlationId\"in e){if(!this.wireListeners.has(t))return!1;{const{resolve:n,handleNack:i}=this.wireListeners.get(t);\"ack\"!==e.action?i({reason:\"Did not receive ack action\",error:(0,_o.errorToPOJO)(new Ao.NoAckError(e.action))}):\"payload\"in e?e.payload.success?n.call(null,e):i(e.payload):\"string\"==typeof e.reason?i(e):(console.warn(\"Received invalid response from core\",e),i({reason:\"invalid response shape\"})),this.wireListeners.delete(t)}}else this.uncorrelatedListener&&this.uncorrelatedListener.call(null,e),this.uncorrelatedListener=()=>{};return!0}}Io=no.Transport=Oo,go=new WeakMap,mo=new WeakMap;const So=(...e)=>({log:(...t)=>console.debug(`[${(new Date).toISOString()}]`,...(e=>e.map((e=>`[${e}]`)))(e),...t),getLogger:(...t)=>So(...e,...t)}),Ro=So(\"@openfin/core-web/client\");function Fo(e,t){if(!function(e){return\"string\"==typeof e}(e))throw new Error(`Property ${t} has invalid type. Expected string, got ${typeof e}.`)}const jo=\"web-broker-ports-ready\",ko=Ro.getLogger(\"get-web-interop-ports\");function Lo(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)}function To(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}\"function\"==typeof SuppressedError&&SuppressedError;const $o=e=>{var n,i,r;return r=class extends t.EventEmitter{constructor(t){super(),n.set(this,void 0),i.set(this,!1),this.connectSync=()=>{Lo(this,i,\"f\")||(e.addEventListener(\"message\",(e=>{e.data?.topic?.startsWith(\"wire-message\")&&e.data.message&&Lo(this,n,\"f\").call(this,{...JSON.parse(e.data.message),ports:e.ports})})),e.start())},this.connect=async()=>{this.connectSync()},this.send=t=>(e.postMessage({topic:\"wire-message\",message:JSON.stringify(t)}),Promise.resolve()),this.shutdown=async()=>{e.close()},To(this,n,t,\"f\")}getPort(){return e}},n=new WeakMap,i=new WeakMap,r};var Bo={},Go={};Object.defineProperty(Go,\"__esModule\",{value:!0}),Go.BaseEnvironment=void 0;const Wo=vr();Go.BaseEnvironment=class{async getViewWindowIdentity(e,t){const{identity:n}=await e.View.wrapSync(t).getCurrentWindow();return n}async getInteropInfo(e){const t=await e.Application.getCurrentSync().getInfo().catch((()=>null)),n=t?.initialOptions?.interopBrokerConfiguration??{};return{fdc3Version:t?(0,Wo.getDefaultViewFdc3VersionFromAppInfo)(t):void 0,...n,fdc3Info:{providerVersion:await e.System.getVersion(),provider:\"OpenFin\"}}}},Object.defineProperty(Bo,\"__esModule\",{value:!0});var Ho=Bo.BrowserEnvironment=void 0;const No=Go;class Do extends No.BaseEnvironment{constructor(){super(...arguments),this.type=\"other\",this.getRandomId=()=>{const e=new Uint32Array(1);return window.crypto.getRandomValues(e)[0].toString(32)}}getAdapterVersionSync(){return\"\"}observeBounds(e,t){throw new Error(\"Method not implemented.\")}layoutAllowedInContext(e){return!1}initLayoutManager(e,t,n){throw new Error(\"Method not implemented.\")}applyLayoutSnapshot(e,t,n){throw new Error(\"Method not implemented.\")}createLayout(e,t){throw new Error(\"Method not implemented.\")}destroyLayout(e,t){throw new Error(\"Method not implemented.\")}resolveLayout(e,t){throw new Error(\"Method not implemented.\")}initPlatform(...e){throw new Error(\"Method not implemented.\")}writeToken(e,t){return Promise.resolve(\"\")}retrievePort(e){throw new Error(\"Method not implemented.\")}getNextMessageId(){return this.getRandomId()}createChildContent(e){throw new Error(\"Method not implemented.\")}getWebWindow(e){throw new Error(\"Method not implemented.\")}getCurrentEntityIdentity(){throw new Error(\"Method not implemented.\")}getCurrentEntityType(){return\"external connection\"}raiseEvent(e,t){throw new Error(\"Method not implemented.\")}getUrl(){return location.href}getDefaultChannelOptions(){return{create:{},connect:{}}}getRtcPeer(){return new RTCPeerConnection}getWsConstructor(){return WebSocket}whenReady(){return Promise.resolve()}}Ho=Bo.BrowserEnvironment=Do;const Uo=e=>\"platform\"in e&&void 0!==e.platform;var Vo,zo;class Ko extends Ho{constructor(e){super(),this.connectConfig=e,Vo.set(this,void 0),zo.set(this,new W((async()=>Promise.resolve().then((function(){return require(\"./main-b14f67c9.js\")}))))),Uo(e)&&this.validatePlatformOptions(e)}getAdapterVersionSync(){return\"0.39.21\"}validatePlatformOptions({platform:e}){if(!(\"layoutSnapshot\"in e))throw new Error(\"Platform options are missing layoutSnapshot. Please provide a layoutSnapshot in the platform options.\");if(\"windows\"in e||\"windows\"in e.layoutSnapshot)throw new Error(\"It appears you tried to call connect() with a snapshot object from an OpenFin desktop environment. Note that connect() expects to be called with a platform property with this structure: { platform: { layoutSnapshot } }. To get a layoutSnapshot of the expected structure, use fin.Platform.Layout.getCurrentLayoutManagerSync().getLayoutSnapshot() in v34+ in your desktop environment.\");const{layouts:t}=e.layoutSnapshot;Object.entries(t).map((([e,t])=>{if(\"object\"!=typeof t||null===t)throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must be an object.`);if(!(\"content\"in t))throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must contain a 'content' property.`)}))}async getInteropInfo(e){return{...{contextGroups:void 0,logging:{beforeAction:{enabled:!1},afterAction:{enabled:!1}}},fdc3Version:void 0,fdc3Info:{providerVersion:\"0.39.21\",provider:\"OpenFin Web\"}}}layoutAllowedInContext(e){return!0}async initLayoutManager(e,t,n){if(Lo(this,Vo,\"f\"))throw new Error(\"Layout already initialized.\");if(!Uo(this.connectConfig))throw new Error(\"Platform options are missing from connection config.\");const{WebLayoutEntryPoint:i}=await Lo(this,zo,\"f\").getValue();return To(this,Vo,new i(this.connectConfig),\"f\"),await Lo(this,Vo,\"f\").initLayoutManager(e,t,n)}async applyLayoutSnapshot(e,t,n){Lo(this,Vo,\"f\")?.applyLayoutSnapshot(e,t,n)}async createLayout(e,t){return Lo(this,Vo,\"f\")?.createLayout(e,t)}async destroyLayout(e,t){return Lo(this,Vo,\"f\")?.destroyLayout(e,t)}async getViewWindowIdentity(e,t){return Promise.resolve({uuid:t.uuid,name:t.uuid})}}Vo=new WeakMap,zo=new WeakMap;const qo=()=>{const e=((e,t)=>{const n=new RegExp(`^${t}<(?.*)>$`).exec(e)?.groups?.meta;if(n)try{return JSON.parse(atob(n))}catch(e){throw new Error(`Failed to decode JSON from ${n}.`)}})(window.name,\"of-frame\");if(e)try{const{name:t,uuid:n,brokerUrl:i,providerId:r,contextGroup:o}=e;return Fo(i,\"brokerUrl\"),Fo(n,\"uuid\"),Fo(t,\"name\"),{identity:{name:t,uuid:n},brokerUrl:i,interopConfig:{providerId:r,currentContextGroup:o}}}catch(e){throw new Error(`Unexpected error occurred when inferring platform information: ${e.stack}`)}},Jo=()=>{const e=r.v4();return{uuid:e,name:e}},Yo=async e=>{if(\"enabled\"===e.connectionInheritance){const t=await(async e=>{const t=qo();if(t){const{validateOptions:n=(()=>!0)}=e,{identity:i,...r}=t;if(!await n(r))throw new Error(\"Parent options were rejected by validateOptions.\");return t}})(e);if(t)return t}if(!e.options){const t=\"enabled\"===e.connectionInheritance?\"Broker URL was not specified nor provided by a platform container.\":\"Connection inheritance is disabled but no options were provided.\";throw new Error(t)}return{...e.options,identity:Jo()}};exports.__classPrivateFieldGet=Lo,exports.__classPrivateFieldSet=To,exports.apiExposer=Gn,exports.commonjsGlobal=s,exports.connect=async t=>{try{Ro.log(\"Establishing connection\",t);const{brokerUrl:n,identity:i,timeout:r,interopConfig:s}=await Yo(t),{workerPort:a,iframeBrokerPort:c}=await(async(e,t,n)=>{const{origin:i}=new URL(e),r=document.createElement(\"IFRAME\");let s;r.style.display=\"none\";try{return await new Promise(((a,c)=>{const d=e=>{if(e.source===r.contentWindow&&e.data?.topic===`ack-${jo}`){if(e.origin!==i)c(new Error(`Broker redirected to unexpected origin ${e.origin}, expected ${i}.`));else if(e.data.success){const[t,n]=e.ports;a({iframeBrokerPort:t,workerPort:n})}else c(new m(e.data));window.removeEventListener(\"message\",d),clearTimeout(s)}};window.addEventListener(\"message\",d),ko.log(`Connecting to broker ${e}`),r.setAttribute(\"src\",e),r.setAttribute(\"name\",o(t,\"of-broker\")),document.body.appendChild(r),ko.log(\"Iframe loaded, awaiting init message from iframe\"),n&&(s=setTimeout((()=>{window.removeEventListener(\"message\",d),document.body.removeChild(r),c(new Error(\"Worker did not initialize in time\"))}),n))}))}catch(e){throw new Error(`Failed to initialise Fin Web Client. ${e.message}`,{cause:e})}})(n,i,r);Ro.log(\"Successfully established connection to shared worker\");const d={entityType:\"external connection\",...i};a.start(),c.start();const h=((t,n,i)=>{const r=$o(n),o=new Ko(t),s=new Io(r,o,i);return s.connectSync(),window.Buffer=e.Buffer,new Wr(s)})(t,a,d);return s?.providerId&&(h.me.interop=h.Interop.connectSync(s.providerId),s?.currentContextGroup&&h.me.interop.joinContextGroup(s.currentContextGroup).catch((e=>{console.warn(`Error joining specified context group: ${s?.currentContextGroup}, continuing`,e)}))),{...h,me:{...h.me,identity:{uuid:h.me.uuid,name:h.me.name}}}}catch(e){throw new Error(`An error occured during web-interop connection: ${e.message}`)}},exports.decorators=Nn,exports.encodeOptions=o,exports.layout_constants=ai,exports.lazy=G;\n","\"use strict\";var t=require(\"./main-8cad4070.js\"),e=require(\"uuid\");require(\"buffer/\"),require(\"events\"),require(\"lodash/cloneDeep\"),require(\"lodash/isEqual\");var i={},n={};Object.defineProperty(n,\"__esModule\",{value:!0}),n.mapValuesAsync=n.mapEntriesAsync=void 0;const o=(t,[e,i])=>({...t,[e]:i});async function s(t,e){return(await Promise.all(e.map((async([e,i])=>[e,await t(i,e)])))).reduce(o,{})}n.mapEntriesAsync=s,n.mapValuesAsync=async function(t,e){let i;return i=e instanceof Map?[...e.entries()]:Object.entries(e),s(t,i)};var r,a,l,h,d=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldSet||function(t,e,i,n,o){if(\"m\"===n)throw new TypeError(\"Private method is not writable\");if(\"a\"===n&&!o)throw new TypeError(\"Private accessor was defined without a setter\");if(\"function\"==typeof e?t!==e||!o:!e.has(t))throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");return\"a\"===n?o.call(t,i):o?o.value=i:e.set(t,i),i},c=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldGet||function(t,e,i,n){if(\"a\"===i&&!n)throw new TypeError(\"Private accessor was defined without a getter\");if(\"function\"==typeof e?t!==e||!n:!e.has(t))throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");return\"m\"===i?n:\"a\"===i?n.call(t):n?n.value:e.get(t)};Object.defineProperty(i,\"__esModule\",{value:!0});var m=i.DefaultLayoutManager=void 0;const u=n;class p{constructor(t){a.set(this,void 0),l.set(this,new Map),d(this,a,t,\"f\")}size(){return c(this,l,\"f\").size}async applyLayoutSnapshot({layouts:t}){if(Object.keys(t).length>1)throw new Error(\"[LayoutManager] Tried to call applyLayoutSnapshot with more than 1 layout. When implementing multiple layouts via overridden LayoutManager class, you must override and fully implement the applyLayoutSnapshot method without calling super.applyLayoutSnapshot().\");const[[e,i]]=Object.entries(t);await p.createLayout(this,{layoutName:e,layout:i})}async showLayout({layoutName:t}){}async getLayoutSnapshot(){return{layouts:await(0,u.mapValuesAsync)((t=>t.getFrameSnapshot()),c(this,l,\"f\"))}}async removeLayout({layoutName:t}){}getLayoutIdentityForView(t){const e=[...c(this,l,\"f\").values()].find((e=>e.getCurrentViews().some((e=>e.name===t.name&&e.uuid===t.uuid))));return e?.identity??void 0}isLayoutVisible({layoutName:t}){return c(p,r,\"m\",h).call(p,this,t).isVisible()}resolveLayoutIdentity(t){if(t&&\"layoutName\"in t)return t;const e=[...c(this,l,\"f\").values()];if(1===e.length)return e[0].identity;const i=e.find((t=>t.isVisible()));return i?.identity??void 0}static async resolveLayout(t,e){const i=t.resolveLayoutIdentity(e);if(void 0===i||!(\"layoutName\"in i))throw new Error(\"[layout-manager] resolveLayout: Could not resolve the layout identity. Make sure you include 'layoutName' in the identity object.\");return c(p,r,\"m\",h).call(p,t,i.layoutName)}static async handleSharedView(t,e,i){await(0,u.mapValuesAsync)((async t=>{if(t.identity.layoutName!==e.layoutName){const e=t.getCurrentViews().find((t=>t.name===i.name));e&&await t.onViewDetached({viewIdentity:e,target:null}).catch(console.error)}}),c(t,l,\"f\"))}static async handleLastViewRemoved(t,e){await t.removeLayout(e),await c(t,a,\"f\").handleLastViewRemoved(t)}static async destroyLayout(t,{layoutName:e}){await c(p,r,\"m\",h).call(p,t,e).destroy(),c(t,l,\"f\").delete(e)}static async createLayout(t,e){const{layoutName:i}=e;if(c(t,l,\"f\").has(i))throw new Error(`Layout name ${i} already exists`);await c(t,a,\"f\").createLayout(e,t)}static registerLayout(t,e,i){c(t,l,\"f\").set(e,i)}static getAllLayouts(t){return[...c(t,l,\"f\").values()]}static setInitialSnapshot(t,e){c(t,a,\"f\").setInitialSnapshot(e)}static createClosedConstructor(...t){return class extends p{constructor(){super(...t)}}}}m=i.DefaultLayoutManager=p,r=p,a=new WeakMap,l=new WeakMap,h=function(t,e){const i=c(t,l,\"f\").get(e);if(!i)throw new Error(`[layout-manager] getLayoutByName: Could not locate layout with name '${e}'`);return i};var g={},f={},v={};Object.defineProperty(v,\"__esModule\",{value:!0}),v.ReversibleMap=void 0;v.ReversibleMap=class{constructor(){this.valueToKey=new Map,this.keyToValue=new Map,this.setUnique=(t,e)=>{if(this.hasKey(t)||this.hasValue(e))throw new Error(\"Key or value already in the map.\");this.keyToValue.set(t,e),this.valueToKey.set(e,t)},this.getKey=t=>{const e=this.valueToKey.get(t);if(!e)throw new Error(\"Value not found in the map.\");return e},this.deleteKey=t=>{const e=this.getValue(t);return this.keyToValue.delete(t),this.valueToKey.delete(e),e},this.deleteValue=t=>{const e=this.getKey(t);return this.keyToValue.delete(e),this.valueToKey.delete(t),e},this.hasKey=t=>this.keyToValue.has(t),this.hasValue=t=>this.valueToKey.has(t)}getValue(t){const e=this.keyToValue.get(t);if(!e)throw new Error(\"Key not found in the map.\");return e}},Object.defineProperty(f,\"__esModule\",{value:!0});var _=f.LayoutContentCache=void 0;const y=t.lazy,C=v;class w{constructor(){this.contentItemCache=new C.ReversibleMap,this.contentItemCacheId=0,this.createCacheKey=()=>{const t=`entity-${this.contentItemCacheId.toString()}`;return this.contentItemCacheId+=1,t},this.hasKey=t=>this.contentItemCache.hasKey(t),this.getItemOrUndefined=t=>{try{return this.getContentItemOrThrow(t)}catch(t){return}},this.getContentItemOrThrow=(t,e)=>{if(!this.contentItemCache.hasKey(t))throw new Error(\"Layout component has been destroyed or detached from the current layout.\");const i=this.contentItemCache.getValue(t);if(e&&!e.includes(i.type))throw new Error(`Layout item is not the expected type. Expected ${e.join(\", \")}, got ${i.type}.`);return i},this.getOrCreateEntityId=t=>{if(this.contentItemCache.hasValue(t))return this.contentItemCache.getKey(t);t.onDestroyed((()=>{this.contentItemCache.deleteValue(t)}));const e=this.createCacheKey();return this.contentItemCache.setUnique(e,t),e}}static getSingleInstance(){return w.singleton.getValue()}}_=f.LayoutContentCache=w,w.singleton=new y.Lazy((()=>new w));var I={},b={};!function(t){Object.defineProperty(t,\"__esModule\",{value:!0}),t.getAdjacentStacks=t.doShareEdge=t.getAdjacentItem=void 0;t.getAdjacentItem=(e,i)=>{const{parent:n}=e;if(e.isRoot()||!n)return;const o=[\"top\",\"bottom\"].includes(i)?\"column\":\"row\",s=[\"top\",\"left\"].includes(i)?-1:1;if(n.type===o){const t=n.contentItems.indexOf(e)+s;if(t>=0&&t{const n=t.getBounds(),o=e.getBounds();if(!n||!o)return!1;if([\"top\",\"bottom\"].includes(i)){return!(n.righto.right)}return!(n.bottomo.bottom)};t.getAdjacentStacks=(e,i)=>{const n=[\"top\",\"bottom\"].includes(i)?\"row\":\"column\",o=s=>\"stack\"===s.type?(0,t.doShareEdge)(e,s,i)?[s]:[]:\"root\"===s.type||\"ground\"===s.type?[]:s.type===n?s.contentItems.map((t=>o(t))).flat():s.type!==n?[\"top\",\"right\"].includes(i)?o(s.contentItems[s.contentItems.length-1]):o(s.contentItems[0]):[],s=(0,t.getAdjacentItem)(e,i);return s?o(s):[]}}(b);var S=t.commonjsGlobal&&t.commonjsGlobal.__decorate||function(t,e,i,n){var o,s=arguments.length,r=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if(\"object\"==typeof Reflect&&\"function\"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(s<3?o(r):s>3?o(e,i,r):o(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};Object.defineProperty(I,\"__esModule\",{value:!0}),I.LayoutEntitiesController=void 0;const E=t.decorators,x=b,L=i;class z{constructor(t,e,i){this.wire=t,this.layoutManager=e,this.layoutContentCache=i,this.analytics=t=>{this.wire.sendAction(`layout-controller-${t}`).catch((()=>{}))},this.getLayoutIdentityForViewOrThrow=async t=>{const e=this.layoutManager.getLayoutIdentityForView(t);if(!e)throw new Error(`View identity ${t.name} is not attached to any layouts.`);return e},this.getRoot=async t=>{this.analytics(\"get-root\");const e=(await this.getLayout(t)).getRoot();return{type:e.type,entityId:this.layoutContentCache.getOrCreateEntityId(e)}},this.getStackByView=async t=>{this.analytics(\"get-stack-by-view\");const e=await this.getLayoutIdentityForViewOrThrow(t),i=(await this.getLayout(e)).getStackByView(t);if(\"stack\"===i?.type)return{entityId:this.layoutContentCache.getOrCreateEntityId(i),type:\"stack\"}},this.getStackViews=t=>{this.analytics(\"get-stack-views\");return this.layoutContentCache.getContentItemOrThrow(t,[\"stack\"]).contentItems.map((t=>({name:t.viewName,uuid:this.wire.me.uuid})))},this.isRoot=t=>{this.analytics(\"is-root\");return this.layoutContentCache.getContentItemOrThrow(t).isRoot()},this.exists=t=>(this.analytics(\"exists\"),this.layoutContentCache.hasKey(t)),this.addViewToStack=async(t,e,{index:i}={index:0})=>{this.analytics(\"add-view-to-stack\");const n=this.layoutContentCache.getContentItemOrThrow(t);if(i&&i>n.contentItems.length+1)throw new Error(`Index '${i}' out of range, please exclude the index or specify a number between 0 and ${n.contentItems.length}`);const o={id:t,index:i},{identity:s}=await n.layout.platformCreateView(e,{location:o});return s},this.findViewInStack=(t,e)=>t.contentItems.find((t=>t.viewName===e.name)),this.removeViewFromStack=async(t,e)=>{this.analytics(\"remove-view-from-stack\");const i=this.layoutContentCache.getContentItemOrThrow(t,[\"stack\"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to remove a view ('${e.name}') which does not belong to the stack.`);await n.layout.platformCloseView(e)},this.createAdjacentStack=async(t,e,{position:i=\"right\"}={})=>{if(this.analytics(\"create-adjacent-stack\"),!Array.isArray(e)||0===e.length)throw new Error('The parameter \"views\" must be an array with at least 1 element.');if(![\"top\",\"bottom\",\"left\",\"right\"].includes(i))throw new Error(`Invalid position '${i}' specified.`);const n=this.layoutContentCache.getContentItemOrThrow(t).createAdjacentStack({position:i}),o=this.layoutContentCache.getOrCreateEntityId(n);return await Promise.all(e.reverse().map((t=>this.addViewToStack(o,t)))),o},this.getAdjacentStacks=async({targetId:t,edge:e})=>{this.analytics(\"get-adjacent-stacks\");const i=this.layoutContentCache.getContentItemOrThrow(t);return(0,x.getAdjacentStacks)(i,e).map((t=>({entityId:this.layoutContentCache.getOrCreateEntityId(t)})))},this.setStackActiveView=async(t,e)=>{this.analytics(\"set-stack-active-view\");const i=this.layoutContentCache.getContentItemOrThrow(t,[\"stack\"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to set a view ('${e.name}') as active when it does not belong to the stack.`);i.setActiveContentItem(n,!0)}}async getLayout(t){const e=await L.DefaultLayoutManager.resolveLayout(this.layoutManager,t);if(!e)throw new Error(`Could not resolve target layout identity ${JSON.stringify(t)}`);return e}getContent(t){this.analytics(\"get-content\");return this.layoutContentCache.getContentItemOrThrow(t,[\"column\",\"row\"]).contentItems.map((t=>({type:t.type,entityId:this.layoutContentCache.getOrCreateEntityId(t)})))}getParent(t){this.analytics(\"get-parent\");const e=this.layoutContentCache.getContentItemOrThrow(t);if(!e.isRoot())return e.parent?.contentItems.includes(e)?{type:e.parent.type,entityId:this.layoutContentCache.getOrCreateEntityId(e.parent)}:void 0}}S([(0,E.expose)()],z.prototype,\"getLayoutIdentityForViewOrThrow\",void 0),S([(0,E.expose)()],z.prototype,\"getRoot\",void 0),S([(0,E.expose)()],z.prototype,\"getStackByView\",void 0),S([(0,E.expose)()],z.prototype,\"getStackViews\",void 0),S([(0,E.expose)()],z.prototype,\"getContent\",null),S([(0,E.expose)()],z.prototype,\"getParent\",null),S([(0,E.expose)()],z.prototype,\"isRoot\",void 0),S([(0,E.expose)()],z.prototype,\"exists\",void 0),S([(0,E.expose)()],z.prototype,\"addViewToStack\",void 0),S([(0,E.expose)()],z.prototype,\"removeViewFromStack\",void 0),S([(0,E.expose)()],z.prototype,\"createAdjacentStack\",void 0),S([(0,E.expose)()],z.prototype,\"getAdjacentStacks\",void 0),S([(0,E.expose)()],z.prototype,\"setStackActiveView\",void 0),I.LayoutEntitiesController=z,Object.defineProperty(g,\"__esModule\",{value:!0});var M=g.initLayoutEndpoints=void 0;const P=t.apiExposer,T=t.layout_constants,A=f,k=I,D=i;M=g.initLayoutEndpoints=async function(t,e){const i=t.getFin(),n=await i.Platform.getCurrentSync().getClient(),o=new P.ChannelsExposer(n);await new P.ApiExposer(o).exposeInstance(new k.LayoutEntitiesController(t,e,A.LayoutContentCache.getSingleInstance()),{id:T.LAYOUT_CONTROLLER_ID}),await async function(t,e){const i=t=>async i=>{const n=await D.DefaultLayoutManager.resolveLayout(e,i.target);if(!n)throw new Error(`Could not resolve the layout target from payload ${JSON.stringify(i)}`);return t(n,i)},n=(e,n)=>{t.register(e,i(n))},o=(t,e)=>{n(t,e)};n(\"replace-view\",((t,e)=>t.replaceView(e))),n(\"replace-layout\",((t,{layout:e})=>t.replaceLayout(e))),n(\"add-view\",((t,e)=>t.insertView(e))),o(\"layout-add-view\",((t,{viewOptions:e,location:i,targetView:n})=>t.platformCreateView(e,{location:i,targetView:n}))),n(\"close-view\",((t,e)=>t.cleanupView(e.viewIdentity))),o(\"layout-close-view\",((t,e)=>t.platformCloseView(e.viewIdentity))),n(\"apply-preset-layout\",((t,e)=>t.applyPreset(e))),n(\"get-layout-views\",(t=>t.getCurrentViews())),n(\"get-frame-snapshot\",(t=>t.getFrameSnapshot())),n(\"is-visible\",(t=>t.isVisible())),n(\"destroy\",(t=>t.destroy())),t.register(\"get-layout-snapshot\",(()=>e.getLayoutSnapshot()))}(n,e)};var R={};Object.defineProperty(R,\"__esModule\",{value:!0});var U=R.BaseLayout=void 0;U=R.BaseLayout=class{};var O={};Object.defineProperty(O,\"__esModule\",{value:!0});var V=O.DOMEmitter=void 0;V=O.DOMEmitter=class{constructor(t){this.container=t}dispatchLocalEvent(t,e){const i={...e,type:t,tabSelector:`tab-${e.name}`,containerSelector:`container-${e.name}`,topic:\"openfin-DOM-event\"};this.container.dispatchEvent(new CustomEvent(t,{detail:i}))}};var B={};Object.defineProperty(B,\"__esModule\",{value:!0});var H=B.mapLayoutContentItemsImmutableSync=B.mapLayoutContentItemsImmutable=W=B.isVisible=void 0;var W=B.isVisible=t=>(0!==t.offsetWidth||0!==t.offsetHeight)&&\"hidden\"!==window.getComputedStyle(t).visibility&&t.offsetTop>=0&&t.offsetLeft>=0&&t.offsetTop<=window.innerHeight&&t.offsetLeft<=window.innerWidth;const F=t=>\"type\"in t&&\"component\"===t.type;B.mapLayoutContentItemsImmutable=async function t(e,i){return F(i)?e(i):{...i,content:await Promise.all(i.content?.map((i=>t(e,i))))}},H=B.mapLayoutContentItemsImmutableSync=function t(e,i){return F(i)?e(i):{...i,content:i.content?.map((i=>t(e,i)))}};class N extends Error{constructor(t,e){super(e),this.type=t}}class G extends N{constructor(t,e){super(\"Configuration\",t),this.node=e}}class j extends N{constructor(t){super(\"PopoutBlocked\",t)}}class $ extends N{constructor(t){super(\"API\",t)}}class Z extends N{constructor(t){super(\"Bind\",t)}}class q extends Error{constructor(t,e,i){super(`${t}: ${e}${void 0===i?\"\":\": \"+i}`)}}class X extends q{constructor(t,e){super(\"Assert\",t,e)}}class Y extends q{constructor(t,e,i){super(\"UnreachableCase\",t,`${e}${void 0===i?\"\":\": \"+i}`)}}class K extends q{constructor(t,e){super(\"UnexpectedNull\",t,e)}}class J extends q{constructor(t,e){super(\"UnexpectedUndefined\",t,e)}}var Q;!function(t){let e=!1;const i={PopoutCannotBeCreatedWithGroundItemConfig:{id:0,default:\"Popout cannot be created with ground ItemConfig\"},PleaseRegisterAConstructorFunction:{id:1,default:\"Please register a constructor function\"},ComponentTypeNotRegisteredAndBindComponentEventHandlerNotAssigned:{id:2,default:\"Component type not registered and BindComponentEvent handler not assigned\"},ComponentIsAlreadyRegistered:{id:3,default:\"Component is already registered\"},ComponentIsNotVirtuable:{id:4,default:\"Component is not virtuable. Requires rootHtmlElement field/getter\"},VirtualComponentDoesNotHaveRootHtmlElement:{id:5,default:'Virtual component does not have getter \"rootHtmlElement\"'},ItemConfigIsNotTypeComponent:{id:6,default:\"ItemConfig is not of type component\"},InvalidNumberPartInSizeString:{id:7,default:\"Invalid number part in size string\"},UnknownUnitInSizeString:{id:8,default:\"Unknown unit in size string\"},UnsupportedUnitInSizeString:{id:9,default:\"Unsupported unit in size string\"}};t.idCount=Object.keys(i).length;const n=Object.values(i);t.checkInitialise=function(){if(!e)for(let e=0;e=\"0\"&&t<=\"9\"}function Tt(t,e){const i=zt(e);t.style.width=i}function At(t,e){const i=zt(e);t.style.height=i}function kt(t){return{width:t.offsetWidth,height:t.offsetHeight}}function Dt(t,e){t.style.display=e?\"\":\"none\"}function Rt(t,e){if(void 0!==e)for(const i in e)if(e.hasOwnProperty(i)){const n=e[i],o=t[i];t[i]=Ut(o,n)}return t}function Ut(t,e){if(\"object\"!=typeof e)return e;if(Array.isArray(e)){const t=e.length,i=new Array(t);for(let n=0;n36)throw new Error(\"Too many keys in config minifier map\")},t.translateObject=n}(dt||(dt={})),function(t){t.defaults={type:at.ground,content:[],size:1,sizeUnit:ht.Fractional,minSize:void 0,minSizeUnit:ht.Pixel,id:\"\",isClosable:!0},t.createCopy=function(t,e){switch(t.type){case at.ground:case at.row:case at.column:return gt.createCopy(t,e);case at.stack:return ut.createCopy(t,e);case at.component:return pt.createCopy(t);default:throw new Y(\"CICC91354\",t.type,\"Invalid Config Item type specified\")}},t.createDefault=function(t){switch(t){case at.ground:throw new X(\"CICCDR91562\");case at.row:case at.column:return gt.createDefault(t);case at.stack:return ut.createDefault();case at.component:return pt.createDefault();default:throw new Y(\"CICCDD91563\",t,\"Invalid Config Item type specified\")}},t.isComponentItem=function(t){return t.type===at.component},t.isStackItem=function(t){return t.type===at.stack},t.isGroundItem=function(t){return t.type===at.ground}}(ct||(ct={})),function(t){t.defaultMaximised=!1,function(t){t.createCopy=function(t,e){return void 0===t?void 0:{show:null!=e?e:t.show,popout:t.popout,close:t.close,maximise:t.maximise,minimise:t.minimise,tabDropdown:t.tabDropdown}}}(t.Header||(t.Header={}))}(mt||(mt={})),function(t){function e(t){const e=t.length,i=new Array(e);for(let n=0;n\"__glMaximised\"===t));t>0&&(o=!0,n=n.splice(t,1)),e=n.length>0?n[0]:ct.defaults.id}else e=n;return i=void 0!==t.maximised?t.maximised:o,{id:e,maximised:i}}}(wt||(wt={})),function(t){function e(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0;return{resolved:!0,root:Et.resolve(i),openPopouts:t.resolveOpenPopouts(e.openPopouts),dimensions:t.Dimensions.resolve(e.dimensions),settings:t.Settings.resolve(e.settings),header:t.Header.resolve(e.header,e.settings,e.labels)}}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:Lt.fromResolvedArray(e.openPopouts),settings:_t.Settings.createCopy(e.settings),dimensions:t.Dimensions.fromResolved(e.dimensions),header:_t.Header.createCopy(e.header)}},t.isResolved=function(t){const e=t;return void 0!==e.resolved&&!0===e.resolved},t.resolveOpenPopouts=function(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0,{root:Et.resolve(o),openPopouts:xt.resolveOpenPopouts(e.openPopouts),dimensions:xt.Dimensions.resolve(e.dimensions),settings:xt.Settings.resolve(e.settings),header:xt.Header.resolve(e.header,e.settings,e.labels),parentId:null!==(i=e.parentId)&&void 0!==i?i:null,indexInParent:null!==(n=e.indexInParent)&&void 0!==n?n:null,window:t.Window.resolve(e.window,e.dimensions),resolved:!0}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:i(e.openPopouts),dimensions:xt.Dimensions.fromResolved(e.dimensions),settings:_t.Settings.createCopy(e.settings),header:_t.Header.createCopy(e.header),parentId:e.parentId,indexInParent:e.indexInParent,window:t.Window.fromResolved(e.window)}},t.fromResolvedArray=i}(Lt||(Lt={}));class Wt{constructor(){this._allEventSubscriptions=[],this._subscriptionsMap=new Map,this.unbind=this.removeEventListener,this.trigger=this.emit}tryBubbleEvent(t,e){}emit(t,...e){let i=this._subscriptionsMap.get(t);if(void 0!==i){i=i.slice();for(let t=0;t0){const n=e.slice();n.unshift(t);const o=this._allEventSubscriptions.slice();for(let t=0;t0?n.contentItems[0]:n,e=0);const o=this._layoutManager.createAndInitContentItem(i,t);t.addChild(o,e),this._layoutManager.layoutConfig.settings.popInOnClose?this._onClose():this.close()}createWindow(){const t=this.createUrl(),e=Math.floor(1e6*Math.random()).toString(36),i=this.serializeWindowFeatures({width:this._initialWindowSize.width,height:this._initialWindowSize.height,innerWidth:this._initialWindowSize.width,innerHeight:this._initialWindowSize.height,menubar:\"no\",toolbar:\"no\",location:\"no\",personalbar:\"no\",resizable:\"yes\",scrollbars:\"no\",status:\"no\"});if(this._popoutWindow=globalThis.open(t,e,i),this._popoutWindow)this._popoutWindow.addEventListener(\"load\",(()=>this.positionWindow()),{passive:!0}),this._popoutWindow.addEventListener(\"beforeunload\",(()=>{this._layoutManager.layoutConfig.settings.popInOnClose?this.popIn():this._onClose()}),{passive:!0}),this._checkReadyInterval=setInterval((()=>this.checkReady()),10);else if(!0===this._layoutManager.layoutConfig.settings.blockedPopoutsThrowError){throw new j(\"Popout blocked\")}}checkReady(){if(null===this._popoutWindow)throw new K(\"BPCR01844\");this._popoutWindow.__glInstance&&this._popoutWindow.__glInstance.isInitialised&&(this.onInitialised(),void 0!==this._checkReadyInterval&&(clearInterval(this._checkReadyInterval),this._checkReadyInterval=void 0))}serializeWindowFeatures(t){const e=[];for(const i in t)e.push(i+\"=\"+t[i].toString());return e.join(\",\")}createUrl(){const t=\"gl-window-config-\"+Ot(),e=_t.minifyConfig(this._config);try{localStorage.setItem(t,JSON.stringify(e))}catch(t){throw new Error(\"Error while writing to localStorage \"+function(t){return t instanceof Error?t.message:\"string\"==typeof t?t:\"Unknown Error\"}(t))}const i=new URL(location.href);return i.searchParams.set(\"gl-window\",t),i.toString()}positionWindow(){if(null===this._popoutWindow)throw new Error(\"BrowserPopout.positionWindow: null popoutWindow\");this._popoutWindow.moveTo(this._initialWindowSize.left,this._initialWindowSize.top),this._popoutWindow.focus()}onInitialised(){this._isInitialised=!0,this.getGlInstance().on(\"popIn\",(()=>this.popIn())),this.emit(\"initialised\")}_onClose(){setTimeout((()=>this.emit(\"closed\")),50)}}class Gt extends Wt{constructor(t,e,i,n){super(),this.layoutManager=t,this._parent=i,this._element=n,this._popInParentIds=[],this._type=e.type,this._id=e.id,this._isInitialised=!1,this.isGround=!1,this.isRow=!1,this.isColumn=!1,this.isStack=!1,this.isComponent=!1,this.size=e.size,this.sizeUnit=e.sizeUnit,this.minSize=e.minSize,this.minSizeUnit=e.minSizeUnit,this._isClosable=e.isClosable,this._pendingEventPropagations={},this._throttledEvents=[\"stateChanged\"],this._contentItems=this.createContentItems(e.content)}get type(){return this._type}get id(){return this._id}set id(t){this._id=t}get popInParentIds(){return this._popInParentIds}get parent(){return this._parent}get contentItems(){return this._contentItems}get isClosable(){return this._isClosable}get element(){return this._element}get isInitialised(){return this._isInitialised}static isStack(t){return t.isStack}static isComponentItem(t){return t.isComponent}static isComponentParentableItem(t){return t.isStack||t.isGround}removeChild(t,e=!1){const i=this._contentItems.indexOf(t);if(-1===i)throw new Error(\"Can't remove child item. Unknown content item\");if(e||this._contentItems[i].destroy(),this._contentItems.splice(i,1),this._contentItems.length>0)this.updateSize(!1);else if(!this.isGround&&!0===this._isClosable){if(null===this._parent)throw new K(\"CIUC00874\");this._parent.removeChild(this)}}addChild(t,e,i){return null!=e||(e=this._contentItems.length),this._contentItems.splice(e,0,t),t.setParent(this),!0===this._isInitialised&&!1===t._isInitialised&&t.init(),e}replaceChild(t,e,i=!1){const n=this._contentItems.indexOf(t),o=t._element.parentNode;if(-1===n)throw new X(\"CIRCI23232\",\"Can't replace child. oldChild is not child of this\");if(null===o)throw new K(\"CIRCP23232\");if(o.replaceChild(e._element,t._element),!0===i&&(t._parent=null,t.destroy()),this._contentItems[n]=e,e.setParent(this),e.size=t.size,e.sizeUnit=t.sizeUnit,e.minSize=t.minSize,e.minSizeUnit=t.minSizeUnit,null===e._parent)throw new K(\"CIRCNC45699\");!0===e._parent._isInitialised&&!1===e._isInitialised&&e.init(),this.updateSize(!1)}remove(){if(null===this._parent)throw new K(\"CIR11110\");this._parent.removeChild(this)}popout(){const t=Ot(),e=this.layoutManager.createPopoutFromContentItem(this,void 0,t,void 0);return this.emitBaseBubblingEvent(\"stateChanged\"),e}calculateConfigContent(){const t=this._contentItems,e=t.length,i=new Array(e);for(let n=0;nthis.propagateEventToLayoutManager(t,e))))}propagateEventToLayoutManager(t,e){this._pendingEventPropagations[t]=!1,this.layoutManager.emitUnknown(t,e)}}class jt extends Gt{constructor(t,e,i){super(t,e,i,document.createElement(\"div\")),this._parentItem=i,this._focused=!1,this.isComponent=!0,this._reorderEnabled=e.reorderEnabled,this.applyUpdatableConfig(e),this._initialWantMaximise=e.maximised;const n=document.createElement(\"div\");n.classList.add(\"lm_content\"),this.element.appendChild(n),this._container=new Ft(e,this,t,n,(t=>this.handleUpdateItemConfigEvent(t)),(()=>this.show()),(()=>this.hide()),(t=>this.focus(t)),(t=>this.blur(t)))}get componentName(){return this._container.componentType}get componentType(){return this._container.componentType}get reorderEnabled(){return this._reorderEnabled}get initialWantMaximise(){return this._initialWantMaximise}get component(){return this._container.component}get container(){return this._container}get parentItem(){return this._parentItem}get headerConfig(){return this._headerConfig}get title(){return this._title}get tab(){return this._tab}get focused(){return this._focused}destroy(){this._container.destroy(),super.destroy()}applyUpdatableConfig(t){this.setTitle(t.title),this._headerConfig=t.header}toConfig(){const t=this._container.stateRequestEvent,e=void 0===t?this._container.state:t();return{type:at.component,content:[],size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,maximised:!1,isClosable:this.isClosable,reorderEnabled:this._reorderEnabled,title:this._title,header:mt.Header.createCopy(this._headerConfig),componentType:pt.copyComponentType(this.componentType),componentState:e}}close(){if(null===this.parent)throw new K(\"CIC68883\");this.parent.removeChild(this,!1)}enterDragMode(t,e){Tt(this.element,t),At(this.element,e),this._container.enterDragMode(t,e)}exitDragMode(){this._container.exitDragMode()}enterStackMaximised(){this._container.enterStackMaximised()}exitStackMaximised(){this._container.exitStackMaximised()}drag(){this._container.drag()}updateSize(t){this.updateNodeSize(t)}init(){this.updateNodeSize(!1),super.init(),this._container.emit(\"open\"),this.initContentItems()}setTitle(t){this._title=t,this.emit(\"titleChanged\",t),this.emit(\"stateChanged\")}setTab(t){this._tab=t,this.emit(\"tab\",t),this._container.setTab(t)}hide(){super.hide(),this._container.setVisibility(!1)}show(){super.show(),this._container.setVisibility(!0)}focus(t=!1){this.parentItem.setActiveComponentItem(this,!0,t)}setFocused(t){this._focused=!0,this.tab.setFocused(),t||this.emitBaseBubblingEvent(\"focus\")}blur(t=!1){this._focused&&this.layoutManager.setFocusedComponentItem(void 0,t)}setBlurred(t){this._focused=!1,this.tab.setBlurred(),t||this.emitBaseBubblingEvent(\"blur\")}setParent(t){this._parentItem=t,super.setParent(t)}handleUpdateItemConfigEvent(t){this.applyUpdatableConfig(t)}updateNodeSize(t){if(\"none\"!==this.element.style.display){const{width:e,height:i}=kt(this.element);this._container.setSizeToNodeSize(e,i,t)}}}class $t extends Gt{constructor(){super(...arguments),this._focused=!1}get focused(){return this._focused}setFocusedValue(t){this._focused=t}}class Zt extends Wt{constructor(t,e){super(),this._eElement=t,this._pointerTracking=!1,this._pointerDownEventListener=t=>this.onPointerDown(t),this._pointerMoveEventListener=t=>this.onPointerMove(t),this._pointerUpEventListener=t=>this.onPointerUp(t),this._timeout=void 0,this._allowableTargets=[t,...e],this._oDocument=document,this._eBody=document.body,this._nDelay=1800,this._nDistance=10,this._nX=0,this._nY=0,this._nOriginalX=0,this._nOriginalY=0,this._dragging=!1,this._eElement.addEventListener(\"pointerdown\",this._pointerDownEventListener,{passive:!0})}destroy(){this.checkRemovePointerTrackingEventListeners(),this._eElement.removeEventListener(\"pointerdown\",this._pointerDownEventListener)}cancelDrag(){this.processDragStop(void 0)}onPointerDown(t){if(this._allowableTargets.includes(t.target)&&t.isPrimary){const e=this.getPointerCoordinates(t);this.processPointerDown(e)}}processPointerDown(t){this._nOriginalX=t.x,this._nOriginalY=t.y,this._oDocument.addEventListener(\"pointermove\",this._pointerMoveEventListener),this._oDocument.addEventListener(\"pointerup\",this._pointerUpEventListener,{passive:!0}),this._pointerTracking=!0,this._timeout=setTimeout((()=>{try{this.startDrag()}catch(t){throw console.error(t),t}}),this._nDelay)}onPointerMove(t){this._pointerTracking&&(this.processDragMove(t),t.preventDefault())}processDragMove(t){this._nX=t.pageX-this._nOriginalX,this._nY=t.pageY-this._nOriginalY,!1===this._dragging&&(Math.abs(this._nX)>this._nDistance||Math.abs(this._nY)>this._nDistance)&&this.startDrag(),this._dragging&&this.emit(\"drag\",this._nX,this._nY,t)}onPointerUp(t){this.processDragStop(t)}processDragStop(t){var e;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this.checkRemovePointerTrackingEventListeners(),!0===this._dragging&&(this._eBody.classList.remove(\"lm_dragging\"),this._eElement.classList.remove(\"lm_dragging\"),null===(e=this._oDocument.querySelector(\"iframe\"))||void 0===e||e.style.setProperty(\"pointer-events\",\"\"),this._dragging=!1,this.emit(\"dragStop\",t))}checkRemovePointerTrackingEventListeners(){this._pointerTracking&&(this._oDocument.removeEventListener(\"pointermove\",this._pointerMoveEventListener),this._oDocument.removeEventListener(\"pointerup\",this._pointerUpEventListener),this._pointerTracking=!1)}startDrag(){var t;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this._dragging=!0,this._eBody.classList.add(\"lm_dragging\"),this._eElement.classList.add(\"lm_dragging\"),null===(t=this._oDocument.querySelector(\"iframe\"))||void 0===t||t.style.setProperty(\"pointer-events\",\"none\"),this.emit(\"dragStart\",this._nOriginalX,this._nOriginalY)}getPointerCoordinates(t){return{x:t.pageX,y:t.pageY}}}class qt{constructor(t,e,i){this._isVertical=t,this._size=e,this._grabSize=i0){const i=this.createSplitter(Math.max(0,e-1)).element;e>0?(this.contentItems[e-1].element.insertAdjacentElement(\"afterend\",i),i.insertAdjacentElement(\"afterend\",t.element)):(this.contentItems[0].element.insertAdjacentElement(\"beforebegin\",i),i.insertAdjacentElement(\"beforebegin\",t.element))}else this._childElementContainer.appendChild(t.element);super.addChild(t,e);const n=1/this.contentItems.length*100;if(!0===i)return this.emitBaseBubblingEvent(\"stateChanged\"),e;for(let e=0;e0&&(this.calculateRelativeSizes(),this.setAbsoluteSizes()),this.emitBaseBubblingEvent(\"stateChanged\"),this.emit(\"resize\")}setAbsoluteSizes(){const t=this.calculateAbsoluteSizes();for(let e=0;e0&&t.itemSizes[e]++,this._isColumn?(Tt(this.contentItems[e].element,t.crossAxisSize),At(this.contentItems[e].element,t.itemSizes[e])):(Tt(this.contentItems[e].element,t.itemSizes[e]),At(this.contentItems[e].element,t.crossAxisSize))}calculateAbsoluteSizes(){const t=(this.contentItems.length-1)*this._splitterSize,{width:e,height:i}=kt(this.element);let n,o;this._isColumn?(n=i-t,o=e):(n=e-t,o=i);let s=0;const r=[];for(let t=0;t0){const n=100-t;for(let t=0;t100&&e.length>0){for(let t=0;te)return;{const r=i/e;let a=i;for(let e=0;ethis.onSplitterDrag(e,t,i))),e.on(\"dragStop\",(()=>this.onSplitterDragStop(e))),e.on(\"dragStart\",(()=>this.onSplitterDragStart(e))),this._splitter.splice(t,0,e),e}getSplitItems(t){const e=this._splitter.indexOf(t);return{before:this.contentItems[e],after:this.contentItems[e+1]}}calculateContentItemMinSize(t){const e=t.minSize;if(void 0!==e){if(t.minSizeUnit===ht.Pixel)return e;throw new X(\"ROCGMD98831\",JSON.stringify(t))}{const t=this.layoutManager.layoutConfig.dimensions;return this._isColumn?t.defaultMinItemHeight:t.defaultMinItemWidth}}calculateContentItemsTotalMinSize(t){let e=0;for(const i of t)e+=this.calculateContentItemMinSize(i);return e}onSplitterDragStart(t){const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=this.calculateContentItemsTotalMinSize(e.before.contentItems),s=this.calculateContentItemsTotalMinSize(e.after.contentItems);this._splitterPosition=0,this._splitterMinPosition=-1*(i-o),this._splitterMaxPosition=n-s}onSplitterDrag(t,e,i){let n=this._isColumn?i:e;if(null===this._splitterMinPosition||null===this._splitterMaxPosition)throw new K(\"ROCOSD59226\");n=Math.max(n,this._splitterMinPosition),n=Math.min(n,this._splitterMaxPosition),this._splitterPosition=n;const o=zt(n);this._isColumn?t.element.style.top=o:t.element.style.left=o}onSplitterDragStop(t){if(null===this._splitterPosition)throw new K(\"ROCOSDS66932\");{const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=(this._splitterPosition+i)/(i+n),s=e.before.size+e.after.size;e.before.size=o*s,e.after.size=(1-o)*s,t.element.style.top=zt(0),t.element.style.left=zt(0),globalThis.requestAnimationFrame((()=>this.updateSize(!1)))}}}!function(t){t.getElementDimensionSize=function(t,e){return\"width\"===e?function(t){return t.offsetWidth}(t):function(t){return t.offsetHeight}(t)},t.setElementDimensionSize=function(t,e,i){return\"width\"===e?Tt(t,i):At(t,i)},t.createElement=function(t,e){const i=t.createElement(\"div\");return i.classList.add(\"lm_item\"),e?i.classList.add(\"lm_column\"):i.classList.add(\"lm_row\"),i}}(Xt||(Xt={}));class Yt extends $t{constructor(t,e,i){super(t,vt.create(e),null,Yt.createElement(document)),this.isGround=!0,this._childElementContainer=this.element,this._containerElement=i;let n=null;for(;;){const t=n?n.previousSibling:this._containerElement.lastChild;if(!(t instanceof Element&&t.classList.contains(\"lm_content\")))break;n=t}this._containerElement.insertBefore(this.element,n)}init(){if(!0!==this.isInitialised){this.updateNodeSize();for(let t=0;t0?this.contentItems[0]:this,n.isComponent)throw new Error(\"Cannot add item as child to ComponentItem\");{const t=this.layoutManager.createAndInitContentItem(i,n);return e=n.addChild(t,e),n===this?-1:e}}loadComponentAsRoot(t){this.clearRoot();const e=Ct.resolve(t,!1);if(e.maximised)throw new Error(\"Root Component cannot be maximised\");{const t=new jt(this.layoutManager,e,this);t.init(),this.addChild(t,0)}}addChild(t,e){if(this.contentItems.length>0)throw new Error(\"Ground node can only have a single child\");return this._childElementContainer.appendChild(t.element),e=super.addChild(t,e),this.updateSize(!1),this.emitBaseBubblingEvent(\"stateChanged\"),e}calculateConfigContent(){const t=this.contentItems,e=t.length,i=new Array(e);for(let n=0;n0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e)),this.updateContentItemsSize(!1))}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}createSideAreas(){const t=Yt.Area.oppositeSides,e=new Array(Object.keys(t).length);let i=0;for(const n in t){const o=n,s=this.getElementArea();if(null===s)throw new K(\"RCSA77553\");s.side=o,\"2\"===t[o][1]?s[o]=s[t[o]]-50:s[o]=s[t[o]]+50,s.surface=(s.x2-s.x1)*(s.y2-s.y1),e[i++]=s}return e}highlightDropZone(t,e,i){this.layoutManager.tabDropPlaceholder.remove(),super.highlightDropZone(t,e,i)}onDrop(t,e){if(t.isComponent){const e=ut.createDefault(),i=t;e.header=mt.Header.createCopy(i.headerConfig);const n=this.layoutManager.createAndInitContentItem(e,this);n.addChild(t),t=n}if(0===this.contentItems.length)this.addChild(t);else{if(t.type===at.row||t.type===at.column){const e=ut.createDefault(),i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}const i=\"x\"==e.side[0]?at.row:at.column,n=\"2\"==e.side[1],o=this.contentItems[0];if(o instanceof Xt&&o.type===i){const e=o.contentItems[n?0:o.contentItems.length-1];o.addChild(t,n?0:void 0,!0),e.size*=.5,t.size=e.size,t.sizeUnit=ht.Percent,o.updateSize(!1)}else{const e=ct.createDefault(i),s=this.layoutManager.createContentItem(e,this);this.replaceChild(o,s),s.addChild(t,n?0:void 0,!0),s.addChild(o,n?void 0:0,!0),o.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}}dock(){throw new X(\"GID87731\")}validateDocking(){throw new X(\"GIVD87732\")}getAllContentItems(){const t=[this];return this.deepGetAllContentItems(this.contentItems,t),t}getConfigMaximisedItems(){const t=[];return this.deepFilterContentItems(this.contentItems,t,(t=>!(!Gt.isStack(t)||!t.initialWantMaximise)||!(!Gt.isComponentItem(t)||!t.initialWantMaximise))),t}getItemsByPopInParentId(t){const e=[];return this.deepFilterContentItems(this.contentItems,e,(e=>e.popInParentIds.includes(t))),e}toConfig(){throw new Error(\"Cannot generate GroundItem config\")}setActiveComponentItem(t,e,i){}updateNodeSize(){const{width:t,height:e}=kt(this._containerElement);Tt(this.element,t),At(this.element,e),this.contentItems.length>0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e))}deepGetAllContentItems(t,e){for(let i=0;ithis.onClick(t),this._touchStartEventListener=t=>this.onTouchStart(t),this._element=document.createElement(\"div\"),this._element.classList.add(i),this._element.title=e,this._header.on(\"destroy\",(()=>this.destroy())),this._element.addEventListener(\"click\",this._clickEventListener,{passive:!0}),this._element.addEventListener(\"touchstart\",this._touchStartEventListener,{passive:!0}),this._header.controlsContainerElement.appendChild(this._element)}get element(){return this._element}destroy(){var t;this._element.removeEventListener(\"click\",this._clickEventListener),this._element.removeEventListener(\"touchstart\",this._touchStartEventListener),null===(t=this._element.parentNode)||void 0===t||t.removeChild(this._element)}onClick(t){this._pushEvent(t)}onTouchStart(t){this._pushEvent(t)}}class Jt{constructor(t,e,i,n,o){var s;this._layoutManager=t,this._componentItem=e,this._closeEvent=i,this._focusEvent=n,this._dragStartEvent=o,this._isActive=!1,this._tabClickListener=t=>this.onTabClickDown(t),this._tabTouchStartListener=t=>this.onTabTouchStart(t),this._closeClickListener=()=>this.onCloseClick(),this._closeTouchStartListener=()=>this.onCloseTouchStart(),this._dragStartListener=(t,e)=>this.onDragStart(t,e),this._contentItemDestroyListener=()=>this.onContentItemDestroy(),this._tabTitleChangedListener=t=>this.setTitle(t),this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_tab\"),this._titleElement=document.createElement(\"span\"),this._titleElement.classList.add(\"lm_title\"),this._closeElement=document.createElement(\"div\"),this._closeElement.classList.add(\"lm_close_tab\"),this._element.appendChild(this._titleElement),this._element.appendChild(this._closeElement),e.isClosable?this._closeElement.style.display=\"\":this._closeElement.style.display=\"none\",this.setTitle(e.title),this._componentItem.on(\"titleChanged\",this._tabTitleChangedListener);(null!==(s=e.reorderEnabled)&&void 0!==s?s:this._layoutManager.layoutConfig.settings.reorderEnabled)&&this.enableReorder(),this._element.addEventListener(\"click\",this._tabClickListener,{passive:!0}),this._element.addEventListener(\"touchstart\",this._tabTouchStartListener,{passive:!0}),this._componentItem.isClosable?(this._closeElement.addEventListener(\"click\",this._closeClickListener,{passive:!0}),this._closeElement.addEventListener(\"touchstart\",this._closeTouchStartListener,{passive:!0})):(this._closeElement.remove(),this._closeElement=void 0),this._componentItem.setTab(this),this._layoutManager.emit(\"tabCreated\",this)}get isActive(){return this._isActive}get componentItem(){return this._componentItem}get contentItem(){return this._componentItem}get element(){return this._element}get titleElement(){return this._titleElement}get closeElement(){return this._closeElement}get reorderEnabled(){return void 0!==this._dragListener}set reorderEnabled(t){t!==this.reorderEnabled&&(t?this.enableReorder():this.disableReorder())}setTitle(t){this._titleElement.innerText=t,this._element.title=t}setActive(t){t!==this._isActive&&(this._isActive=t,t?this._element.classList.add(\"lm_active\"):this._element.classList.remove(\"lm_active\"))}destroy(){var t,e;this._closeEvent=void 0,this._focusEvent=void 0,this._dragStartEvent=void 0,this._element.removeEventListener(\"click\",this._tabClickListener),this._element.removeEventListener(\"touchstart\",this._tabTouchStartListener),null===(t=this._closeElement)||void 0===t||t.removeEventListener(\"click\",this._closeClickListener),null===(e=this._closeElement)||void 0===e||e.removeEventListener(\"touchstart\",this._closeTouchStartListener),this._componentItem.off(\"titleChanged\",this._tabTitleChangedListener),this.reorderEnabled&&this.disableReorder(),this._element.remove()}setBlurred(){this._element.classList.remove(\"lm_focused\"),this._titleElement.classList.remove(\"lm_focused\")}setFocused(){this._element.classList.add(\"lm_focused\"),this._titleElement.classList.add(\"lm_focused\")}onDragStart(t,e){if(void 0===this._dragListener)throw new J(\"TODSDLU10093\");if(void 0===this._dragStartEvent)throw new J(\"TODS23309\");this._dragStartEvent(t,e,this._dragListener,this.componentItem)}onContentItemDestroy(){void 0!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=void 0)}onTabClickDown(t){const e=t.target;e!==this._element&&e!==this._titleElement||(0===t.button?this.notifyFocus():1===t.button&&this._componentItem.isClosable&&this.notifyClose())}onTabTouchStart(t){t.target===this._element&&this.notifyFocus()}onCloseClick(){this.notifyClose()}onCloseTouchStart(){this.notifyClose()}notifyClose(){if(void 0===this._closeEvent)throw new J(\"TNC15007\");this._closeEvent(this._componentItem)}notifyFocus(){if(void 0===this._focusEvent)throw new J(\"TNA15007\");this._focusEvent(this._componentItem)}enableReorder(){this._dragListener=new Zt(this._element,[this._titleElement]),this._dragListener.on(\"dragStart\",this._dragStartListener),this._componentItem.on(\"destroy\",this._contentItemDestroyListener)}disableReorder(){if(void 0===this._dragListener)throw new J(\"TDR87745\");this._componentItem.off(\"destroy\",this._contentItemDestroyListener),this._dragListener.off(\"dragStart\",this._dragStartListener),this._dragListener=void 0}}class Qt{constructor(t,e,i,n,o){this._layoutManager=t,this._componentRemoveEvent=e,this._componentFocusEvent=i,this._componentDragStartEvent=n,this._dropdownActiveChangedEvent=o,this._tabs=[],this._lastVisibleTabIndex=-1,this._dropdownActive=!1,this._element=document.createElement(\"section\"),this._element.classList.add(\"lm_tabs\"),this._dropdownElement=document.createElement(\"section\"),this._dropdownElement.classList.add(\"lm_tabdropdown_list\"),this._dropdownElement.style.display=\"none\"}get tabs(){return this._tabs}get tabCount(){return this._tabs.length}get lastVisibleTabIndex(){return this._lastVisibleTabIndex}get element(){return this._element}get dropdownElement(){return this._dropdownElement}get dropdownActive(){return this._dropdownActive}destroy(){for(let t=0;tthis.handleTabCloseEvent(t)),(t=>this.handleTabFocusEvent(t)),((t,e,i,n)=>this.handleTabDragStartEvent(t,e,i,n)));void 0===e&&(e=this._tabs.length),this._tabs.splice(e,0,i),ethis._lastVisibleTabIndex){const t=this._tabs[e];for(let t=e;t>0;t--)this._tabs[t]=this._tabs[t-1];this._tabs[0]=t}}updateTabSizes(t,e){let i=!1;this.tryUpdateTabSizes(i,t,e)||(i=!0,this.tryUpdateTabSizes(i,t,e)),i!==this._dropdownActive&&(this._dropdownActive=i,this._dropdownActiveChangedEvent())}tryUpdateTabSizes(t,e,i){if(this._tabs.length>0){if(void 0===i)throw new Error(\"non-empty tabs must have active component item\");let n=0,o=!1;const s=this._layoutManager.layoutConfig.settings.tabOverlapAllowance,r=this._tabs.indexOf(i.tab),a=this._tabs[r];this._lastVisibleTabIndex=-1;for(let i=0;ie){if(o)i===r&&(l.style.zIndex=\"auto\",l.style.marginLeft=\"\",l.parentElement!==this._element&&this._element.appendChild(l));else{let t;if(t=r>0&&r<=i?(d-e)/(i-1):(d-e)/i,tthis.onClick(t),this._touchStartListener=t=>this.onTouchStart(t),this._rowColumnClosable=!0,this._closeButton=null,this._popoutButton=null,this._tabsContainer=new Qt(this._layoutManager,(t=>this.handleTabInitiatedComponentRemoveEvent(t)),(t=>this.handleTabInitiatedComponentFocusEvent(t)),((t,e,i,n)=>this.handleTabInitiatedDragStartEvent(t,e,i,n)),(()=>this.processTabDropdownActiveChanged())),this._show=i.show,this._popoutEnabled=i.popoutEnabled,this._popoutLabel=i.popoutLabel,this._maximiseEnabled=i.maximiseEnabled,this._maximiseLabel=i.maximiseLabel,this._minimiseEnabled=i.minimiseEnabled,this._minimiseLabel=i.minimiseLabel,this._closeEnabled=i.closeEnabled,this._closeLabel=i.closeLabel,this._tabDropdownEnabled=i.tabDropdownEnabled,this._tabDropdownLabel=i.tabDropdownLabel,this.setSide(i.side),this._canRemoveComponent=this._configClosable,this._element=document.createElement(\"section\"),this._element.classList.add(\"lm_header\"),this._controlsContainerElement=document.createElement(\"section\"),this._controlsContainerElement.classList.add(\"lm_controls\"),this._element.appendChild(this._tabsContainer.element),this._element.appendChild(this._controlsContainerElement),this._element.appendChild(this._tabsContainer.dropdownElement),this._element.addEventListener(\"click\",this._clickListener,{passive:!0}),this._element.addEventListener(\"touchstart\",this._touchStartListener,{passive:!0}),this._documentMouseUpListener=()=>this._tabsContainer.hideAdditionalTabsDropdown(),globalThis.document.addEventListener(\"mouseup\",this._documentMouseUpListener,{passive:!0}),this._tabControlOffset=this._layoutManager.layoutConfig.settings.tabControlOffset,this._tabDropdownEnabled&&(this._tabDropdownButton=new Kt(this,this._tabDropdownLabel,\"lm_tabdropdown\",(()=>this._tabsContainer.showAdditionalTabsDropdown()))),this._popoutEnabled&&(this._popoutButton=new Kt(this,this._popoutLabel,\"lm_popout\",(()=>this.handleButtonPopoutEvent()))),this._maximiseEnabled&&(this._maximiseButton=new Kt(this,this._maximiseLabel,\"lm_maximise\",(t=>this.handleButtonMaximiseToggleEvent(t)))),this._configClosable&&(this._closeButton=new Kt(this,this._closeLabel,\"lm_close\",(()=>s()))),this.processTabDropdownActiveChanged()}get show(){return this._show}get side(){return this._side}get leftRightSided(){return this._leftRightSided}get layoutManager(){return this._layoutManager}get parent(){return this._parent}get tabs(){return this._tabsContainer.tabs}get lastVisibleTabIndex(){return this._tabsContainer.lastVisibleTabIndex}get element(){return this._element}get tabsContainerElement(){return this._tabsContainer.element}get controlsContainerElement(){return this._controlsContainerElement}destroy(){this.emit(\"destroy\"),this._popoutEvent=void 0,this._maximiseToggleEvent=void 0,this._clickEvent=void 0,this._touchStartEvent=void 0,this._componentRemoveEvent=void 0,this._componentFocusEvent=void 0,this._componentDragStartEvent=void 0,this._tabsContainer.destroy(),globalThis.document.removeEventListener(\"mouseup\",this._documentMouseUpListener),this._element.remove()}createTab(t,e){this._tabsContainer.createTab(t,e)}removeTab(t){this._tabsContainer.removeTab(t)}processActiveComponentChanged(t){this._tabsContainer.processActiveComponentChanged(t),this.updateTabSizes()}setSide(t){this._side=t,this._leftRightSided=[nt.right,nt.left].includes(this._side)}setRowColumnClosable(t){this._rowColumnClosable=t,this.updateClosability()}updateClosability(){let t;if(this._configClosable)if(this._rowColumnClosable){t=!0;const e=this.tabs.length;for(let i=0;i1}applyFocusedValue(t){t?this._element.classList.add(\"lm_focused\"):this._element.classList.remove(\"lm_focused\")}processMaximised(){if(void 0===this._maximiseButton)throw new J(\"HPMAX16997\");this._maximiseButton.element.setAttribute(\"title\",this._minimiseLabel)}processMinimised(){if(void 0===this._maximiseButton)throw new J(\"HPMIN16997\");this._maximiseButton.element.setAttribute(\"title\",this._maximiseLabel)}updateTabSizes(){if(this._tabsContainer.tabCount>0){const t=this._show?this._layoutManager.layoutConfig.dimensions.headerHeight:0;let e;this._leftRightSided?(this._element.style.height=\"\",this._element.style.width=zt(t)):(this._element.style.width=\"\",this._element.style.height=zt(t)),e=this._leftRightSided?this._element.offsetHeight-this._controlsContainerElement.offsetHeight-this._tabControlOffset:this._element.offsetWidth-this._controlsContainerElement.offsetWidth-this._tabControlOffset,this._tabsContainer.updateTabSizes(e,this._getActiveComponentItemEvent())}}handleTabInitiatedComponentRemoveEvent(t){if(this._canRemoveComponent){if(void 0===this._componentRemoveEvent)throw new J(\"HHTCE22294\");this._componentRemoveEvent(t)}}handleTabInitiatedComponentFocusEvent(t){if(void 0===this._componentFocusEvent)throw new J(\"HHTAE22294\");this._componentFocusEvent(t)}handleTabInitiatedDragStartEvent(t,e,i,n){if(this._canRemoveComponent){if(void 0===this._componentDragStartEvent)throw new J(\"HHTDSE22294\");this._componentDragStartEvent(t,e,i,n)}else i.cancelDrag()}processTabDropdownActiveChanged(){void 0!==this._tabDropdownButton&&Dt(this._tabDropdownButton.element,this._tabsContainer.dropdownActive)}handleButtonPopoutEvent(){if(this._layoutManager.layoutConfig.settings.popoutWholeStack){if(void 0===this._popoutEvent)throw new J(\"HHBPOE17834\");this._popoutEvent()}else{const t=this._getActiveComponentItemEvent();t&&t.popout()}}handleButtonMaximiseToggleEvent(t){if(void 0===this._maximiseToggleEvent)throw new J(\"HHBMTE16834\");this._maximiseToggleEvent()}onClick(t){t.target===this._element&&this.notifyClick(t)}onTouchStart(t){t.target===this._element&&this.notifyTouchStart(t)}notifyClick(t){if(void 0===this._clickEvent)throw new J(\"HNHC46834\");this._clickEvent(t)}notifyTouchStart(t){if(void 0===this._touchStartEvent)throw new J(\"HNHTS46834\");this._touchStartEvent(t)}}class ee extends $t{constructor(t,e,i){var n,o,s,r,a,l,h,d,c,m,u,p,g,f,v,_,y,C,w;super(t,e,i,ee.createElement(document)),this._headerSideChanged=!1,this._resizeListener=()=>this.handleResize(),this._maximisedListener=()=>this.handleMaximised(),this._minimisedListener=()=>this.handleMinimised(),this._headerConfig=e.header;const I=t.layoutConfig.header,b=e.content;let S;if(1!==b.length)S=void 0;else{S=b[0].header}this._initialWantMaximise=e.maximised,this._initialActiveItemIndex=null!==(n=e.activeItemIndex)&&void 0!==n?n:0;const E=null!==(r=null!==(s=null===(o=this._headerConfig)||void 0===o?void 0:o.show)&&void 0!==s?s:null==S?void 0:S.show)&&void 0!==r?r:I.show,x=null!==(h=null!==(l=null===(a=this._headerConfig)||void 0===a?void 0:a.popout)&&void 0!==l?l:null==S?void 0:S.popout)&&void 0!==h?h:I.popout,L=null!==(m=null!==(c=null===(d=this._headerConfig)||void 0===d?void 0:d.maximise)&&void 0!==c?c:null==S?void 0:S.maximise)&&void 0!==m?m:I.maximise,z=null!==(g=null!==(p=null===(u=this._headerConfig)||void 0===u?void 0:u.close)&&void 0!==p?p:null==S?void 0:S.close)&&void 0!==g?g:I.close,M=null!==(_=null!==(v=null===(f=this._headerConfig)||void 0===f?void 0:f.minimise)&&void 0!==v?v:null==S?void 0:S.minimise)&&void 0!==_?_:I.minimise,P=null!==(w=null!==(C=null===(y=this._headerConfig)||void 0===y?void 0:y.tabDropdown)&&void 0!==C?C:null==S?void 0:S.tabDropdown)&&void 0!==w?w:I.tabDropdown;this._maximisedEnabled=!1!==L;const T={show:!1!==E,side:!1===E?nt.top:E,popoutEnabled:!1!==x,popoutLabel:!1===x?\"\":x,maximiseEnabled:this._maximisedEnabled,maximiseLabel:!1===L?\"\":L,closeEnabled:!1!==z,closeLabel:!1===z?\"\":z,minimiseEnabled:!0,minimiseLabel:M,tabDropdownEnabled:!1!==P,tabDropdownLabel:!1===P?\"\":P};this._header=new te(t,this,T,e.isClosable&&!1!==z,(()=>this.getActiveComponentItem()),(()=>this.remove()),(()=>this.handlePopoutEvent()),(()=>this.toggleMaximise()),(t=>this.handleHeaderClickEvent(t)),(t=>this.handleHeaderTouchStartEvent(t)),(t=>this.handleHeaderComponentRemoveEvent(t)),(t=>this.handleHeaderComponentFocusEvent(t)),((t,e,i,n)=>this.handleHeaderComponentStartDragEvent(t,e,i,n))),this.isStack=!0,this._childElementContainer=document.createElement(\"section\"),this._childElementContainer.classList.add(\"lm_items\"),this.on(\"resize\",this._resizeListener),this._maximisedEnabled&&(this.on(\"maximised\",this._maximisedListener),this.on(\"minimised\",this._minimisedListener)),this.element.appendChild(this._header.element),this.element.appendChild(this._childElementContainer),this.setupHeaderPosition(),this._header.updateClosability()}get childElementContainer(){return this._childElementContainer}get header(){return this._header}get headerShow(){return this._header.show}get headerSide(){return this._header.side}get headerLeftRightSided(){return this._header.leftRightSided}get contentAreaDimensions(){return this._contentAreaDimensions}get initialWantMaximise(){return this._initialWantMaximise}get isMaximised(){return this===this.layoutManager.maximisedStack}get stackParent(){if(!this.parent)throw new Error(\"Stack should always have a parent\");return this.parent}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}init(){if(!0===this.isInitialised)return;this.updateNodeSize();for(let t=0;t0){if(this._initialActiveItemIndex<0||this._initialActiveItemIndex>=e)throw new Error(`ActiveItemIndex out of range: ${this._initialActiveItemIndex} id: ${this.id}`);for(let i=0;ithis.contentItems.length)throw e-=1,new X(\"SAC99728\");if(t instanceof jt)return e=super.addChild(t,e),this._childElementContainer.appendChild(t.element),this._header.createTab(t,e),this.setActiveComponentItem(t,i),this._header.updateTabSizes(),this.updateSize(!1),t.container.setBaseLogicalZIndex(),this._header.updateClosability(),this.emitStateChangedEvent(),e;throw new X(\"SACC88532\")}removeChild(t,e){const i=t,n=this.contentItems.indexOf(i),o=1===this.contentItems.length;if(this._activeComponentItem===i&&(i.focused&&i.blur(),!o)){const t=0===n?1:n-1;this.setActiveComponentItem(this.contentItems[t],!1)}this._header.removeTab(i),super.removeChild(i,e),o||this._header.updateClosability(),this.emitStateChangedEvent()}toggleMaximise(){this.isMaximised?this.minimise():this.maximise()}maximise(){if(!this.isMaximised){this.layoutManager.setMaximisedStack(this);const t=this.contentItems,e=t.length;for(let i=0;i0&&void 0===t)throw new Error(\"expected non-empty stack to have an active component item\");return{type:\"stack\",content:this.calculateConfigContent(),size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,isClosable:this.isClosable,maximised:this.isMaximised,header:this.createHeaderConfig(),activeItemIndex:t}}onDrop(t,e){if(\"header\"===this._dropSegment){if(this.resetHeaderDropZone(),void 0===this._dropIndex)throw new J(\"SODDI68990\");return void this.addChild(t,this._dropIndex)}if(\"body\"===this._dropSegment)return void this.addChild(t,0,!0);const i=\"top\"===this._dropSegment||\"bottom\"===this._dropSegment,n=\"left\"===this._dropSegment||\"right\"===this._dropSegment,o=\"top\"===this._dropSegment||\"left\"===this._dropSegment,s=i&&this.stackParent.isColumn||n&&this.stackParent.isRow;if(t.isComponent){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createAndInitContentItem(e,this);i.addChild(t),t=i}if(t.type===at.row||t.type===at.column){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}if(s){const e=this.stackParent.contentItems.indexOf(this);this.stackParent.addChild(t,o?e:e+1,!0),this.size*=.5,t.size=this.size,t.sizeUnit=this.sizeUnit,this.stackParent.updateSize(!1)}else{const e=i?at.column:at.row,n=ct.createDefault(e),s=this.layoutManager.createContentItem(n,this);this.stackParent.replaceChild(this,s),s.addChild(t,o?0:void 0,!0),s.addChild(this,o?void 0:0,!0),this.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}highlightDropZone(t,e){for(const i in this._contentAreaDimensions){const n=i,o=this._contentAreaDimensions[n].hoverArea;if(o.x1t&&o.y1e)return void(\"header\"===n?(this._dropSegment=\"header\",this.highlightHeaderDropZone(this._header.leftRightSided?e:t)):(this.resetHeaderDropZone(),this.highlightBodyDropZone(n)))}}getArea(){if(\"none\"===this.element.style.display)return null;const t=super.getElementArea(this._header.element),e=super.getElementArea(this._childElementContainer);if(null===t||null===e)throw new K(\"SGAHC13086\");const i=e.x2-e.x1,n=e.y2-e.y1;return this._contentAreaDimensions={header:{hoverArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2},highlightArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2}}},0===this.contentItems.length?(this._contentAreaDimensions.body={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2}},super.getElementArea(this.element)):(this._contentAreaDimensions.left={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x1+.25*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x1+.5*i,y2:e.y2}},this._contentAreaDimensions.top={hoverArea:{x1:e.x1+.25*i,y1:e.y1,x2:e.x1+.75*i,y2:e.y1+.5*n},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y1+.5*n}},this._contentAreaDimensions.right={hoverArea:{x1:e.x1+.75*i,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1+.5*i,y1:e.y1,x2:e.x2,y2:e.y2}},this._contentAreaDimensions.bottom={hoverArea:{x1:e.x1+.25*i,y1:e.y1+.5*n,x2:e.x1+.75*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1+.5*n,x2:e.x2,y2:e.y2}},super.getElementArea(this.element))}positionHeader(t){this._header.side!==t&&(this._header.setSide(t),this._headerSideChanged=!0,this.setupHeaderPosition())}updateNodeSize(){if(\"none\"!==this.element.style.display){const t=kt(this.element);if(this._header.show){t[this._header.leftRightSided?it.width:it.height]-=this.layoutManager.layoutConfig.dimensions.headerHeight}this._childElementContainer.style.width=zt(t.width),this._childElementContainer.style.height=zt(t.height);for(let e=0;e=o&&tthis.onDrag(t,e,i))),this._dragListener.on(\"dragStop\",(()=>this.onDrop())),this.createDragProxyElements(t,e),null===this._componentItem.parent)throw new K(\"DPC10097\");this._componentItemFocused=this._componentItem.focused,this._componentItemFocused&&this._componentItem.blur(),this._componentItem.parent.removeChild(this._componentItem,!0),this.setDimensions(),document.body.appendChild(this._element),this.determineMinMaxXY(),this._layoutManager.calculateItemAreas(),this.setDropPosition(t,e)}get element(){return this._element}createDragProxyElements(t,e){this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_dragProxy\");const i=document.createElement(\"div\");i.classList.add(\"lm_header\");const n=document.createElement(\"div\");n.classList.add(\"lm_tabs\");const o=document.createElement(\"div\");o.classList.add(\"lm_tab\");const s=document.createElement(\"span\");s.classList.add(\"lm_title\"),o.appendChild(s),n.appendChild(o),i.appendChild(n),this._proxyContainerElement=document.createElement(\"div\"),this._proxyContainerElement.classList.add(\"lm_content\"),this._element.appendChild(i),this._element.appendChild(this._proxyContainerElement),this._originalParent instanceof ee&&this._originalParent.headerShow&&(this._sided=this._originalParent.headerLeftRightSided,this._element.classList.add(\"lm_\"+this._originalParent.headerSide),[nt.right,nt.bottom].indexOf(this._originalParent.headerSide)>=0&&this._proxyContainerElement.insertAdjacentElement(\"afterend\",i)),this._element.style.left=zt(t),this._element.style.top=zt(e),o.setAttribute(\"title\",this._componentItem.title),s.insertAdjacentText(\"afterbegin\",this._componentItem.title),this._proxyContainerElement.appendChild(this._componentItem.element)}determineMinMaxXY(){const t=this._layoutManager.groundItem;if(void 0===t)throw new J(\"DPDMMXY73109\");{const e=t.element.getBoundingClientRect();this._minX=e.left+document.body.scrollLeft,this._minY=e.top+document.body.scrollTop,this._maxX=this._minX+e.width,this._maxY=this._minY+e.height}}onDrag(t,e,i){const n=i.pageX,o=i.pageY;this.setDropPosition(n,o),this._componentItem.drag()}setDropPosition(t,e){this._layoutManager.layoutConfig.settings.constrainDragToContainer&&(t<=this._minX?t=Math.ceil(this._minX):t>=this._maxX&&(t=Math.floor(this._maxX)),e<=this._minY?e=Math.ceil(this._minY):e>=this._maxY&&(e=Math.floor(this._maxY))),this._element.style.left=zt(t),this._element.style.top=zt(e),this._area=this._layoutManager.getArea(t,e),null!==this._area&&(this._lastValidArea=this._area,this._area.contentItem.highlightDropZone(t,e,this._area))}onDrop(){const t=this._layoutManager.dropTargetIndicator;if(null===t)throw new K(\"DPOD30011\");let e;if(t.hide(),this._componentItem.exitDragMode(),null!==this._area)e=this._componentItem,this._area.contentItem.onDrop(e,this._area);else if(null!==this._lastValidArea){e=this._componentItem;this._lastValidArea.contentItem.onDrop(e,this._lastValidArea)}else this._originalParent?(e=this._componentItem,this._originalParent.addChild(e)):this._componentItem.destroy();this._element.remove(),this._layoutManager.emit(\"itemDropped\",this._componentItem),this._componentItemFocused&&void 0!==e&&e.focus()}setDimensions(){const t=this._layoutManager.layoutConfig.dimensions;if(void 0===t)throw new Error(\"DragProxy.setDimensions: dimensions undefined\");let e=t.dragProxyWidth,i=t.dragProxyHeight;if(void 0===e||void 0===i)throw new Error(\"DragProxy.setDimensions: width and/or height undefined\");const n=!1===this._layoutManager.layoutConfig.header.show?0:t.headerHeight;this._element.style.width=zt(e),this._element.style.height=zt(i),e-=this._sided?n:0,i-=this._sided?0:n,this._proxyContainerElement.style.width=zt(e),this._proxyContainerElement.style.height=zt(i),this._componentItem.enterDragMode(e,i),this._componentItem.show()}}class ne{constructor(t,e,i,n,o,s,r){this._layoutManager=t,this._element=e,this._extraAllowableChildTargets=i,this._componentTypeOrFtn=n,this._componentState=o,this._title=s,this._id=r,this._dragListener=null,this._dummyGroundContainer=document.createElement(\"div\");const a=gt.createDefault(\"row\");this._dummyGroundContentItem=new Yt(this._layoutManager,a,this._dummyGroundContainer),this.createDragListener()}destroy(){this.removeDragListener()}createDragListener(){this.removeDragListener(),this._dragListener=new Zt(this._element,this._extraAllowableChildTargets),this._dragListener.on(\"dragStart\",((t,e)=>this.onDragStart(t,e))),this._dragListener.on(\"dragStop\",(()=>this.onDragStop()))}onDragStart(t,e){var i;const n=\"component\";let o;if(\"function\"==typeof this._componentTypeOrFtn){const t=this._componentTypeOrFtn();o=ne.isDragSourceComponentItemConfig(t)?{type:n,componentState:t.state,componentType:t.type,title:null!==(i=t.title)&&void 0!==i?i:this._title}:t}else o={type:n,componentState:this._componentState,componentType:this._componentTypeOrFtn,title:this._title,id:this._id};const s=bt.resolve(o,!1),r=new jt(this._layoutManager,s,this._dummyGroundContentItem);if(this._dummyGroundContentItem.contentItems.push(r),null===this._dragListener)throw new K(\"DSODSD66746\");{const i=new ie(t,e,this._dragListener,this._layoutManager,r,this._dummyGroundContentItem),n=this._layoutManager.transitionIndicator;if(null===n)throw new K(\"DSODST66746\");n.transitionElements(this._element,i.element)}}onDragStop(){this.createDragListener()}removeDragListener(){null!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=null)}}!function(t){t.isDragSourceComponentItemConfig=function(t){return!(\"componentType\"in t)}}(ne||(ne={}));class oe{constructor(){this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_dropTargetIndicator\");const t=document.createElement(\"div\");t.classList.add(\"lm_inner\"),this._element.appendChild(t),document.body.appendChild(this._element)}destroy(){this._element.remove()}highlightArea(t,e){this._element.style.left=zt(t.x1+e),this._element.style.top=zt(t.y1+e),this._element.style.width=zt(t.x2-t.x1-e),this._element.style.height=zt(t.y2-t.y1-e),this._element.style.display=\"block\"}hide(){Dt(this._element,!1)}}class se{constructor(){this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_transition_indicator\"),document.body.appendChild(this._element),this._toElement=null,this._fromDimensions=null,this._totalAnimationDuration=200,this._animationStartTime=null}destroy(){this._element.remove()}transitionElements(t,e){}nextAnimationFrame(){}measure(t){const e=t.getBoundingClientRect();return{left:e.left,top:e.top,width:t.offsetWidth,height:t.offsetHeight}}}class re extends Wt{constructor(t){super(),this._layoutManager=t,this._childEventListener=t=>this.onEventFromChild(t),globalThis.addEventListener(re.ChildEventName,this._childEventListener,{passive:!0})}emit(t,...e){\"userBroadcast\"===t?this.emitUserBroadcast(...e):super.emit(t,...e)}emitUserBroadcast(...t){this.handleUserBroadcastEvent(\"userBroadcast\",t)}destroy(){globalThis.removeEventListener(re.ChildEventName,this._childEventListener)}handleUserBroadcastEvent(t,e){this._layoutManager.isSubWindow?this.propagateToParent(t,e):this.propagateToThisAndSubtree(t,e)}onEventFromChild(t){const e=t.detail;this.handleUserBroadcastEvent(e.eventName,e.args)}propagateToParent(t,e){const i={bubbles:!0,cancelable:!0,detail:{layoutManager:this._layoutManager,eventName:t,args:e}},n=new CustomEvent(re.ChildEventName,i),o=globalThis.opener;if(null===o)throw new K(\"EHPTP15778\");o.dispatchEvent(n)}propagateToThisAndSubtree(t,e){this.emitUnknown(t,...e);for(let i=0;ithis.handleContainerResize())),this._windowBeforeUnloadListener=()=>this.onBeforeUnload(),this._windowBeforeUnloadListening=!1,this._maximisedStackBeforeDestroyedListener=t=>this.cleanupBeforeMaximisedStackDestroyed(t),this.isSubWindow=t.isSubWindow,this._constructorOrSubWindowLayoutConfig=t.constructorOrSubWindowLayoutConfig,Q.checkInitialise(),dt.checkInitialise(),void 0!==t.containerElement&&(this._containerElement=t.containerElement)}get container(){return this._containerElement}get isInitialised(){return this._isInitialised}get groundItem(){return this._groundItem}get root(){return this._groundItem}get openPopouts(){return this._openPopouts}get dropTargetIndicator(){return this._dropTargetIndicator}get transitionIndicator(){return this._transitionIndicator}get width(){return this._width}get height(){return this._height}get eventHub(){return this._eventHub}get rootItem(){if(void 0===this._groundItem)throw new Error(\"Cannot access rootItem before init\");return 0===this._groundItem.contentItems.length?void 0:this._groundItem.contentItems[0]}get focusedComponentItem(){return this._focusedComponentItem}get tabDropPlaceholder(){return this._tabDropPlaceholder}get maximisedStack(){return this._maximisedStack}get deprecatedConstructor(){return!this.isSubWindow&&void 0!==this._constructorOrSubWindowLayoutConfig}destroy(){if(this._isInitialised){this._windowBeforeUnloadListening&&(globalThis.removeEventListener(\"beforeunload\",this._windowBeforeUnloadListener),this._windowBeforeUnloadListening=!1),!0===this.layoutConfig.settings.closePopoutsOnUnload&&this.closeAllOpenPopouts(),this._resizeObserver.disconnect(),this.checkClearResizeTimeout(),void 0!==this._groundItem&&this._groundItem.destroy(),this._tabDropPlaceholder.remove(),null!==this._dropTargetIndicator&&this._dropTargetIndicator.destroy(),null!==this._transitionIndicator&&this._transitionIndicator.destroy(),this._eventHub.destroy();for(const t of this._dragSources)t.destroy();this._dragSources=[],this._isInitialised=!1}}minifyConfig(t){return _t.minifyConfig(t)}unminifyConfig(t){return _t.unminifyConfig(t)}init(){let t;if(this.setContainer(),this._dropTargetIndicator=new oe,this._transitionIndicator=new se,this.updateSizeFromContainer(),this.isSubWindow){if(void 0===this._constructorOrSubWindowLayoutConfig)throw new J(\"LMIU07155\");{const e=this._constructorOrSubWindowLayoutConfig.root;if(void 0===e)throw new X(\"LMIC07156\");if(!Ct.isComponent(e))throw new X(\"LMIC07157\");t=e;const i=xt.resolve(this._constructorOrSubWindowLayoutConfig);this.layoutConfig=Object.assign(Object.assign({},i),{root:void 0})}}else void 0===this._constructorOrSubWindowLayoutConfig?this.layoutConfig=_t.createDefault():this.layoutConfig=xt.resolve(this._constructorOrSubWindowLayoutConfig);const e=this.layoutConfig;this._groundItem=new Yt(this,e.root,this._containerElement),this._groundItem.init(),this.checkLoadedLayoutMaximiseItem(),this._resizeObserver.observe(this._containerElement),this._isInitialised=!0,this.adjustColumnsResponsive(),this.emit(\"initialised\"),void 0!==t&&this.loadComponentAsRoot(t)}loadLayout(t){if(!this.isInitialised)throw new Error(\"GoldenLayout: Need to call init() if LayoutConfig with defined root passed to constructor\");if(void 0===this._groundItem)throw new J(\"LMLL11119\");this.createSubWindows(),this.layoutConfig=xt.resolve(t),this._groundItem.loadRoot(this.layoutConfig.root),this.checkLoadedLayoutMaximiseItem(),this.adjustColumnsResponsive()}saveLayout(){if(!1===this._isInitialised)throw new Error(\"Can't create config, layout not yet initialised\");if(void 0===this._groundItem)throw new J(\"LMTC18244\");{const t=this._groundItem.calculateConfigContent();let e;e=1!==t.length?void 0:t[0],this.reconcilePopoutWindows();const i=[];for(let t=0;t=0?n=this._groundItem.contentItems[0]:e=0;break;case at.row:case at.column:e=n.addItem(t,i.index);break;case at.stack:if(Ct.isComponent(t)){e=n.addItem(t,i.index);break}throw Error(tt[6]);case at.component:throw new X(\"LMAIALC87444602\");default:throw new Y(\"LMAIALU98881733\",n.type)}if(Ct.isComponent(t)){const t=n.contentItems[e];Gt.isStack(t)&&(n=t,e=0)}return i.parentItem=n,i.index=e,i}}}loadComponentAsRoot(t){if(void 0===this._groundItem)throw new Error(\"Cannot add item before init\");this._groundItem.loadComponentAsRoot(t)}updateSize(t,e){this.setSize(t,e)}setSize(t,e){if(this._width=t,this._height=e,!0===this._isInitialised){if(void 0===this._groundItem)throw new J(\"LMUS18881\");if(this._groundItem.setSize(this._width,this._height),this._maximisedStack){const{width:t,height:e}=kt(this._containerElement);Tt(this._maximisedStack.element,t),At(this._maximisedStack.element,e),this._maximisedStack.updateSize(!1)}this.adjustColumnsResponsive()}}beginSizeInvalidation(){this._sizeInvalidationBeginCount++}endSizeInvalidation(){0==--this._sizeInvalidationBeginCount&&this.updateSizeFromContainer()}updateSizeFromContainer(){const{width:t,height:e}=kt(this._containerElement);this.setSize(t,e)}updateRootSize(t=!1){if(void 0===this._groundItem)throw new J(\"LMURS28881\");this._groundItem.updateSize(t)}createAndInitContentItem(t,e){const i=this.createContentItem(t,e);return i.init(),i}createContentItem(t,e){if(\"string\"!=typeof t.type)throw new G(\"Missing parameter 'type'\",JSON.stringify(t));if(ct.isComponentItem(t)&&!(e instanceof ee)&&e&&!(!0===this.isSubWindow&&e instanceof Yt)){t={type:at.stack,content:[t],size:t.size,sizeUnit:t.sizeUnit,minSize:t.minSize,minSizeUnit:t.minSizeUnit,id:t.id,maximised:t.maximised,isClosable:t.isClosable,activeItemIndex:0,header:void 0}}return this.createContentItemFromConfig(t,e)}findFirstComponentItemById(t){if(void 0===this._groundItem)throw new J(\"LMFFCIBI82446\");return this.findFirstContentItemTypeByIdRecursive(at.component,t,this._groundItem)}createPopout(t,e,i,n){return t instanceof Gt?this.createPopoutFromContentItem(t,e,i,n):this.createPopoutFromItemConfig(t,e,i,n)}createPopoutFromContentItem(t,e,i,n){let o=t.parent,s=t;for(;null!==o&&1===o.contentItems.length&&!o.isGround;)s=o,o=o.parent;if(null===o)throw new K(\"LMCPFCI00834\");{if(void 0===n&&(n=o.contentItems.indexOf(s)),null!==i&&o.addPopInParentId(i),void 0===e){const i=globalThis.screenX||globalThis.screenLeft,n=globalThis.screenY||globalThis.screenTop,o=t.element.offsetLeft,s=t.element.offsetTop,{width:r,height:a}=kt(t.element);e={left:i+o,top:n+s,width:r,height:a}}const r=t.toConfig();if(t.remove(),ft.isRootItemConfig(r))return this.createPopoutFromItemConfig(r,e,i,n);throw new Error(`${tt[0]}`)}}beginVirtualSizedContainerAdding(){0==++this._virtualSizedContainerAddingBeginCount&&(this._virtualSizedContainers.length=0)}addVirtualSizedContainer(t){this._virtualSizedContainers.push(t)}endVirtualSizedContainerAdding(){if(0==--this._virtualSizedContainerAddingBeginCount){const t=this._virtualSizedContainers.length;if(t>0){this.fireBeforeVirtualRectingEvent(t);for(let e=0;ethis.emit(\"windowOpened\",a))),a.on(\"closed\",(()=>this.reconcilePopoutWindows())),this._openPopouts.push(a),this.layoutConfig.settings.closePopoutsOnUnload&&!this._windowBeforeUnloadListening&&(globalThis.addEventListener(\"beforeunload\",this._windowBeforeUnloadListener,{passive:!0}),this._windowBeforeUnloadListening=!0),a}closeAllOpenPopouts(){for(let t=0;tglobalThis.close()),1)}getArea(t,e){let i=null,n=1/0;for(let o=0;o=s.x1&&t=s.y1&&es.surface&&(n=s.surface,i=s)}return i}calculateItemAreas(){const t=this.getAllContentItems(),e=this._groundItem;if(void 0===e)throw new J(\"LMCIAR44365\");if(1!==t.length){e.contentItems[0].isStack?this._itemAreas=[]:this._itemAreas=e.createSideAreas();for(let e=0;e0){let e=t[0];if(Gt.isComponentItem(e)){const t=e.parent;if(null===t)throw new K(\"LMXLLMI69999\");e=t}if(!Gt.isStack(e))throw new X(\"LMCLLMI19993\");e.maximise()}}}processMaximiseStack(t){if(this._maximisedStack=t,t.on(\"beforeItemDestroyed\",this._maximisedStackBeforeDestroyedListener),t.element.classList.add(\"lm_maximised\"),t.element.insertAdjacentElement(\"afterend\",this._maximisePlaceholder),void 0===this._groundItem)throw new J(\"LMMXI19993\");{this._groundItem.element.prepend(t.element);const{width:e,height:i}=kt(this._containerElement);Tt(t.element,e),At(t.element,i),t.updateSize(!0),t.focusActiveContentItem(),this._maximisedStack.emit(\"maximised\"),this.emit(\"stateChanged\")}}processMinimiseMaximisedStack(){if(void 0===this._maximisedStack)throw new X(\"LMMMS74422\");{const t=this._maximisedStack;if(null===t.parent)throw new K(\"LMMI13668\");t.element.classList.remove(\"lm_maximised\"),this._maximisePlaceholder.insertAdjacentElement(\"afterend\",t.element),this._maximisePlaceholder.remove(),this.updateRootSize(!0),this._maximisedStack=void 0,t.off(\"beforeItemDestroyed\",this._maximisedStackBeforeDestroyedListener),t.emit(\"minimised\"),this.emit(\"stateChanged\")}}reconcilePopoutWindows(){const t=[];for(let e=0;e{this._resizeTimeoutId=void 0,this.beginSizeInvalidation(),this.endSizeInvalidation()}),this.resizeDebounceInterval))}checkClearResizeTimeout(){void 0!==this._resizeTimeoutId&&(clearTimeout(this._resizeTimeoutId),this._resizeTimeoutId=void 0)}setContainer(){var t;const e=document.body,i=null!==(t=this._containerElement)&&void 0!==t?t:e;if(i===e){this.resizeWithContainerAutomatically=!0;const t=document.documentElement;t.style.height=\"100%\",t.style.margin=\"0\",t.style.padding=\"0\",t.style.overflow=\"clip\",e.style.height=\"100%\",e.style.margin=\"0\",e.style.padding=\"0\",e.style.overflow=\"clip\"}this._containerElement=i}onBeforeUnload(){this.destroy()}adjustColumnsResponsive(){if(void 0===this._groundItem)throw new J(\"LMACR20883\");if(this._firstLoad=!1,this.useResponsiveLayout()&&!this._updatingColumnsResponsive&&this._groundItem.contentItems.length>0&&this._groundItem.contentItems[0].isRow){if(void 0===this._groundItem||null===this._width)throw new J(\"LMACR77412\");{const t=this._groundItem.contentItems[0].contentItems.length;if(t<=1)return;{const e=this.layoutConfig.dimensions.defaultMinItemWidth;if(t*e<=this._width)return;{this._updatingColumnsResponsive=!0;const i=t-Math.max(Math.floor(this._width/e),1),n=this._groundItem.contentItems[0],o=this.getAllStacks();if(0===o.length)throw new X(\"LMACRS77413\");{const t=o[0];for(let e=0;en?void 0:{parentItem:t,index:o}}}case 1:if(void 0===this._focusedComponentItem)return;{const t=this._focusedComponentItem.parentItem;return this.tryCreateLocationFromParentItem(t,e)}case 2:{const t=this.findFirstContentItemType(at.stack);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 3:{let t=this.findFirstContentItemType(at.row);return void 0!==t?this.tryCreateLocationFromParentItem(t,e):(t=this.findFirstContentItemType(at.column),void 0!==t?this.tryCreateLocationFromParentItem(t,e):void 0)}case 4:{const t=this.findFirstContentItemType(at.row);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 5:{const t=this.findFirstContentItemType(at.column);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 6:if(void 0===this._groundItem)throw new J(\"LMFLRIF18244\");return void 0!==this.rootItem?void 0:void 0===e||0===e?{parentItem:this._groundItem,index:0}:void 0;case 7:if(void 0===this._groundItem)throw new J(\"LMFLF18244\");{const t=this._groundItem.contentItems;if(0===t.length)return void 0===e||0===e?{parentItem:this._groundItem,index:0}:void 0;{const i=t[0];return this.tryCreateLocationFromParentItem(i,e)}}}}tryCreateLocationFromParentItem(t,e){const i=t.contentItems.length;return void 0===e?{parentItem:t,index:i}:e<0||e>i?void 0:{parentItem:t,index:e}}}!function(t){t.createMaximisePlaceElement=function(t){const e=t.createElement(\"div\");return e.classList.add(\"lm_maximise_place\"),e},t.createTabDropPlaceholderElement=function(t){const e=t.createElement(\"div\");return e.classList.add(\"lm_drop_tab_placeholder\"),e},t.defaultLocationSelectors=[{typeId:1,index:void 0},{typeId:2,index:void 0},{typeId:3,index:void 0},{typeId:7,index:void 0}],t.afterFocusedItemIfPossibleLocationSelectors=[{typeId:0,index:1},{typeId:2,index:void 0},{typeId:3,index:void 0},{typeId:7,index:void 0}]}(ae||(ae={}));class le extends ae{constructor(t,e,i,n){if(super(le.createLayoutManagerConstructorParameters(t,e)),this._bindComponentEventHanlderPassedInConstructor=!1,this._creationTimeoutPassed=!1,void 0!==e&&\"function\"==typeof e&&(this.bindComponentEvent=e,this._bindComponentEventHanlderPassedInConstructor=!0,void 0!==i&&(this.unbindComponentEvent=i)),!this._bindComponentEventHanlderPassedInConstructor&&this.isSubWindow){if(void 0===this._constructorOrSubWindowLayoutConfig)throw new J(\"VLC98823\");{const t=xt.resolve(this._constructorOrSubWindowLayoutConfig);this.layoutConfig=Object.assign(Object.assign({},t),{root:void 0})}}!0!==n&&(this.deprecatedConstructor||this.init())}destroy(){this.bindComponentEvent=void 0,this.unbindComponentEvent=void 0,super.destroy()}init(){if(this._bindComponentEventHanlderPassedInConstructor||\"loading\"!==document.readyState&&null!==document.body){if(!this._bindComponentEventHanlderPassedInConstructor&&!0===this.isSubWindow&&!this._creationTimeoutPassed)return setTimeout((()=>this.init()),7),void(this._creationTimeoutPassed=!0);!0===this.isSubWindow&&(this._bindComponentEventHanlderPassedInConstructor||this.clearHtmlAndAdjustStylesForSubWindow(),window.__glInstance=this),super.init()}else document.addEventListener(\"DOMContentLoaded\",(()=>this.init()),{passive:!0})}clearHtmlAndAdjustStylesForSubWindow(){const t=document.head,e=new Array(4);e[0]=document.querySelectorAll(\"body link\"),e[1]=document.querySelectorAll(\"body style\"),e[2]=document.querySelectorAll(\"template\"),e[3]=document.querySelectorAll(\".gl_keep\");for(let i=0;ithis.emit(\"popIn\"))),document.body.appendChild(t),!0}}bindComponent(t,e){if(void 0!==this.bindComponentEvent){return this.bindComponentEvent(t,e)}if(void 0!==this.getComponentEvent)return{virtual:!1,component:this.getComponentEvent(t,e)};{const t=`${tt[2]}: ${JSON.stringify(e)}`;throw new Z(t)}}unbindComponent(t,e,i){if(void 0!==this.unbindComponentEvent)this.unbindComponentEvent(t);else if(!e&&void 0!==this.releaseComponentEvent){if(void 0===i)throw new J(\"VCUCRCU333998\");this.releaseComponentEvent(t,i)}}}!function(t){let e=!1;t.createLayoutManagerConstructorParameters=function(t,i){const n=e?null:new URL(document.location.href).searchParams.get(\"gl-window\");e=!0;const o=null!==n;let s,r;if(null!==n){const e=localStorage.getItem(n);if(null===e)throw new Error(\"Null gl-window Config\");localStorage.removeItem(n);const i=JSON.parse(e),o=_t.unminifyConfig(i);r=xt.fromResolved(o),t instanceof HTMLElement&&(s=t)}else void 0===t?r=void 0:t instanceof HTMLElement?(r=void 0,s=t):r=t,void 0===s&&i instanceof HTMLElement&&(s=i);return{constructorOrSubWindowLayoutConfig:r,isSubWindow:o,containerElement:s}}}(le||(le={}));class he extends le{constructor(t,e,i){super(t,e,i,!0),this._componentTypesMap=new Map,this._registeredComponentMap=new Map,this._virtuableComponentMap=new Map,this._containerVirtualRectingRequiredEventListener=(t,e,i)=>this.handleContainerVirtualRectingRequiredEvent(t,e,i),this._containerVirtualVisibilityChangeRequiredEventListener=(t,e)=>this.handleContainerVirtualVisibilityChangeRequiredEvent(t,e),this._containerVirtualZIndexChangeRequiredEventListener=(t,e,i)=>this.handleContainerVirtualZIndexChangeRequiredEvent(t,e,i),this.deprecatedConstructor||this.init()}registerComponent(t,e,i=!1){if(\"function\"!=typeof e)throw new $(\"registerComponent() componentConstructorOrFactoryFtn parameter is not a function\");if(e.hasOwnProperty(\"prototype\")){const n=e;this.registerComponentConstructor(t,n,i)}else{const n=e;this.registerComponentFactoryFunction(t,n,i)}}registerComponentConstructor(t,e,i=!1){if(\"function\"!=typeof e)throw new Error(tt[1]);if(void 0!==this._componentTypesMap.get(t))throw new Z(`${tt[3]}: ${t}`);this._componentTypesMap.set(t,{constructor:e,factoryFunction:void 0,virtual:i})}registerComponentFactoryFunction(t,e,i=!1){if(\"function\"!=typeof e)throw new Z(\"Please register a constructor function\");if(void 0!==this._componentTypesMap.get(t))throw new Z(`${tt[3]}: ${t}`);this._componentTypesMap.set(t,{constructor:void 0,factoryFunction:e,virtual:i})}registerComponentFunction(t){this.registerGetComponentConstructorCallback(t)}registerGetComponentConstructorCallback(t){if(\"function\"!=typeof t)throw new Error(\"Please register a callback function\");void 0!==this._getComponentConstructorFtn&&console.warn(\"Multiple component functions are being registered. Only the final registered function will be used.\"),this._getComponentConstructorFtn=t}getRegisteredComponentTypeNames(){const t=this._componentTypesMap.keys();return Array.from(t)}getComponentInstantiator(t){let e;const i=pt.resolveComponentTypeName(t);return void 0!==i&&(e=this._componentTypesMap.get(i)),void 0===e&&void 0!==this._getComponentConstructorFtn&&(e={constructor:this._getComponentConstructorFtn(t),factoryFunction:void 0,virtual:!1}),e}bindComponent(t,e){let i;const n=pt.resolveComponentTypeName(e);let o;if(void 0!==n&&(i=this._componentTypesMap.get(n)),void 0===i&&void 0!==this._getComponentConstructorFtn&&(i={constructor:this._getComponentConstructorFtn(e),factoryFunction:void 0,virtual:!1}),void 0!==i){const s=i.virtual;let r,a;r=void 0===e.componentState?void 0:Ut({},e.componentState);const l=i.constructor;if(void 0!==l)a=new l(t,r,s);else{const e=i.factoryFunction;if(void 0===e)throw new X(\"LMBCFFU10008\");a=e(t,r,s)}if(s){if(void 0===a)throw new J(\"GLBCVCU988774\");{const e=a,i=e.rootHtmlElement;if(void 0===i)throw new Z(`${tt[5]}: ${n}`);!function(t){const e=\"absolute\";t.style.position!==e&&(t.style.position=e)}(i),this.container.appendChild(i),this._virtuableComponentMap.set(t,e),t.virtualRectingRequiredEvent=this._containerVirtualRectingRequiredEventListener,t.virtualVisibilityChangeRequiredEvent=this._containerVirtualVisibilityChangeRequiredEventListener,t.virtualZIndexChangeRequiredEvent=this._containerVirtualZIndexChangeRequiredEventListener}}this._registeredComponentMap.set(t,a),o={virtual:i.virtual,component:a}}else o=super.bindComponent(t,e);return o}unbindComponent(t,e,i){if(void 0===this._registeredComponentMap.get(t))super.unbindComponent(t,e,i);else{const e=this._virtuableComponentMap.get(t);if(void 0!==e){const i=e.rootHtmlElement;if(void 0===i)throw new X(\"GLUC77743\",t.title);this.container.removeChild(i),this._virtuableComponentMap.delete(t)}}}fireBeforeVirtualRectingEvent(t){this._goldenLayoutBoundingClientRect=this.container.getBoundingClientRect(),super.fireBeforeVirtualRectingEvent(t)}handleContainerVirtualRectingRequiredEvent(t,e,i){const n=this._virtuableComponentMap.get(t);if(void 0===n)throw new J(\"GLHCSCE55933\");{const o=n.rootHtmlElement;if(void 0===o)throw new Z(tt[4]+\" \"+t.title);{const n=t.element.getBoundingClientRect(),s=n.left-this._goldenLayoutBoundingClientRect.left;o.style.left=zt(s);const r=n.top-this._goldenLayoutBoundingClientRect.top;o.style.top=zt(r),Tt(o,e),At(o,i)}}}handleContainerVirtualVisibilityChangeRequiredEvent(t,e){const i=this._virtuableComponentMap.get(t);if(void 0===i)throw new J(\"GLHCVVCRE55934\");{const n=i.rootHtmlElement;if(void 0===n)throw new Z(tt[4]+\" \"+t.title);Dt(n,e)}}handleContainerVirtualZIndexChangeRequiredEvent(t,e,i){const n=this._virtuableComponentMap.get(t);if(void 0===n)throw new J(\"GLHCVZICRE55935\");{const e=n.rootHtmlElement;if(void 0===e)throw new Z(tt[4]+\" \"+t.title);e.style.zIndex=i}}}const de=\"initial_\",ce={show:\"top\",popout:!1,maximise:!1,close:\"close-tab-unused\"},me={headerHeight:31},ue={hasHeaders:!0,reorderEnabled:!0},pe={popoutWholeStack:!1,constrainDragToContainer:!1,constrainDragToHeaders:!1,preventDragout:!1,showMaximiseIcon:!1,showPopoutIcon:!1,showCloseIcon:!1,blockedPopoutsThrowError:!0,closePopoutsOnUnload:!0,selectionEnabled:!1};var ge,fe;class ve{constructor(e){this.layout=e,ge.set(this,void 0),fe.set(this,void 0),this.handleResize=t=>{t.forEach((t=>this.resizeElement(t.target)))},this.handleMutation=()=>{this.layout.viewComponentsByContainerElement.forEach((t=>{this.resizeElement(t.container.element)}))},t.__classPrivateFieldSet(this,ge,new ResizeObserver(this.handleResize),\"f\"),t.__classPrivateFieldSet(this,fe,new MutationObserver(this.handleMutation),\"f\")}observeMutations(e){t.__classPrivateFieldGet(this,fe,\"f\")?.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[\"class\"]})}destroy(){t.__classPrivateFieldGet(this,ge,\"f\").disconnect(),t.__classPrivateFieldGet(this,fe,\"f\").disconnect()}observeContainer(e){t.__classPrivateFieldGet(this,ge,\"f\").observe(e)}unobserveContainer(e){t.__classPrivateFieldGet(this,ge,\"f\").unobserve(e)}resizeElement(t){const e=this.layout.viewComponentsByContainerElement.get(t);e&&e.resize()}}ge=new WeakMap,fe=new WeakMap;var _e={};Object.defineProperty(_e,\"__esModule\",{value:!0});var ye=_e.BaseItem=void 0;class Ce{constructor(t,e,i){this._item=t,this._layout=e,this._wrap=i}get raw(){return this._item}get layout(){return this._layout}get type(){return this._item.type}get contentItems(){return(this._item.contentItems??[]).map((t=>this._wrap(t)))}get parent(){const t=this._item.parent;return t?this._wrap(t):null}setActiveContentItem(t,e){if(\"stack\"!==this.type)throw new Error(`Cannot call setActiveContentItem from a non-stack item: ${this.type}`);this._item.setActiveContentItem(t.raw,e)}static wrapInternal(t,e,i){const n=Ce.wrapCache.get(e);if(n)return n;const o=new t(e,i,(e=>Ce.wrapInternal(t,e,i)));return Ce.wrapCache.set(e,o),o}}ye=_e.BaseItem=Ce,Ce.wrapCache=new WeakMap;const we=t=>!!t&&\"contentItems\"in t&&(t.isRow||t.isColumn);class Ie extends ye{isRoot(){return!!this._item.parent?.isGround}getBounds(){return this._item.element.getBoundingClientRect()}get viewName(){if(this._item.isComponent){const{component:t}=this._item;return t.identity.name}throw new Error(\"View name not found\")}onDestroyed(t){const e=({target:i})=>{i===this._item&&(t(),this._item.off(\"itemDestroyed\",e))};this._item.on(\"itemDestroyed\",e)}createAdjacentStack({position:t=\"right\"}={}){const e=this.raw;if(ee.isStack(e)&&e.parent){const i=[\"top\",\"bottom\"].includes(t)?\"column\":\"row\",n=[\"left\",\"top\"].includes(t)?1:0,o=we(e.parent)?e.parent:e.layoutManager,s=o,r=e.parent.contentItems.indexOf(e);e.parent.isGround&&e.parent.removeChild(e,!0);const a=o.newItem({type:i,content:[{type:\"stack\",content:[]}]},r);if(!a)throw new Error(\"createAdjacentStack: Failed to create new container\");const l=a.contentItems[0];return a.addChild(this.raw,n),we(s)&&s.removeChild(e,!0),this._wrap(l)}throw new Error(`Cannot creat adjacent stacks for type: ${e.type}, must be type 'stack'`)}setActiveContentItem(t,e=!0){if(!ee.isStack(this._item))throw new Error(`Cannot call setActiveContentItem from a non-stack item: ${this.type}`);this._item.setActiveComponentItem(t.raw,!e)}static wrap(t,e){return ye.wrapInternal(Ie,t,e)}}function be(t=[],e){for(const i of t)\"component\"===i.type?Object.keys(e).forEach((t=>{t in i&&(i.componentState={[`${de}${t}`]:i[t],...i.componentState}),i[t]=e[t]})):be(i.content,e)}function Se(t=[],e,i){for(const n of t)if(\"component\"===n.type)Object.keys(e).forEach((t=>{if(`${de}${t}`in n.componentState)return n[t]=n.componentState[`${de}${t}`],void delete n.componentState[`${de}${t}`];n[t]=e[t]}));else{if(n.size&&(\"row\"===i||\"column\"===i)){n[\"row\"===i?\"width\":\"height\"]=n.size?.includes(\".\")?parseFloat(n.size):parseInt(n.size)}Se(n.content,e,n.type)}}function Ee(t){if(t.root){t.root.content&&Se([t.root],{componentName:\"view\",isClosable:!0});const e=t.root;t.content=[e],delete t.root}return t}const xe=e=>class extends e{connectedCallback(){if(!this.name||!this.uuid)throw new Error(\" Name or uuid attribute missing\");if(!this.src)throw new Error(\" missing 'src' attribute.\");this.#t||(this.#t=document.createElement(\"iframe\"),this.#t.src=this.src,this.#t.style.height=\"100%\",this.#t.style.width=\"100%\",this.#t.style.border=\"none\",this.forceFrameName?this.#t.setAttribute(\"name\",this.forceFrameName):this.#t.setAttribute(\"name\",t.encodeOptions({brokerUrl:this.brokerUrl,name:this.name,uuid:this.uuid,providerId:this.providerId,contextGroup:this.contextGroup},\"of-frame\")),this.#t.setAttribute(\"id\",this.name),this.appendChild(this.#t))}#t;get brokerUrl(){return this.getAttribute(\"of-broker\")}set brokerUrl(t){t&&this.setAttribute(\"of-broker\",t)}get name(){return this.getAttribute(\"of-name\")}set name(t){t&&this.setAttribute(\"of-name\",t)}get forceFrameName(){return this.getAttribute(\"forceFrameName\")}set forceFrameName(t){t&&this.setAttribute(\"forceFrameName\",t)}get uuid(){return this.getAttribute(\"of-uuid\")}set uuid(t){t&&this.setAttribute(\"of-uuid\",t)}get src(){return this.getAttribute(\"src\")}set src(t){t&&this.setAttribute(\"src\",t)}get providerId(){return this.getAttribute(\"of-provider-id\")}set providerId(t){t&&this.setAttribute(\"of-provider-id\",t)}get contextGroup(){return this.getAttribute(\"of-context-group\")}set contextGroup(t){t&&this.setAttribute(\"of-context-group\",t)}static get observedAttributes(){return[\"name\"]}};class Le{static create(t){const e=document.createElement(\"of-view\");return Object.entries(t).forEach((([t,i])=>{e.setAttribute(t,i)})),e}}customElements.define(\"of-view\",xe(HTMLElement));class ze{constructor(t,i,n,{brokerUrl:o,interopConfig:s},r){this.container=t,this.config=i,this.ofView=null,this.isDragging=()=>this.container.tab.element?.className.includes(\"lm_dragging\")??!1;const{url:a,web:l,interop:h,name:d}=i||{},c=d??`internal-generated-view-${e.v4()}`;if(this.identity={uuid:n,name:c},this.container.element.setAttribute(\"of-name\",c),this.container.element.id=`container-${c}`,this.container.parent.id=c,void 0===a)return void this.handleUrlMissing();const m=this.updateTitleIfNotSet(a),u={\"of-broker\":o,\"of-uuid\":n,\"of-name\":c,src:a};l?.frameName&&(u.forceFrameName=l.frameName);const p=h?.currentContextGroup??s?.currentContextGroup;p&&(u[\"of-context-group\"]=p),s?.providerId&&(u[\"of-provider-id\"]=s?.providerId),this.ofView=Le.create(u),this.ofView.title=m??`Iframe: ${a}`,r.appendChild(this.ofView),this.ofView.style.position=\"absolute\"}updateTitleIfNotSet(t){return\"view\"===this.container.parent.title&&this.container.parent.setTitle(t),this.container.parent.title}handleUrlMissing(){const t=document.createElement(\"div\");t.setAttribute(\"style\",\"padding: 20px\");t.innerText=\"No URL provided\",this.container.element.appendChild(t)}destroy(){this.ofView?.remove(),this.ofView=null}closeView(){this.container.close()}resize(){if(this.ofView){if(this.isDragging())return void(this.ofView.style.display=\"none\");const t=this.container.element.getBoundingClientRect();this.ofView.style.position=\"absolute\",this.ofView.style.height=`${t.height}px`,this.ofView.style.width=`${t.width}px`,this.ofView.style.inset=`${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`,this.ofView.style.display=\"block\"}}}class Me extends U{static overrideConfig(t){const e={...ue,...t.settings,...pe};return e.reorderEnabled?be(t.content,{isClosable:!0}):be(t.content,{reorderEnabled:!1}),{dimensions:me,...t,settings:e,header:{...ce,show:!1!==t.settings?.hasHeaders&&ce.show}}}constructor(t,e,i,{options:n},o,s){super(),this.identity=t,this.container=e,this.initialConfig=i,this.layoutManager=o,this.platformProvider=s,this.viewComponentsByContainerElement=new Map,this.layoutContentCache=_.getSingleInstance(),this.reparentingViews=new Set,this.goldenLayoutDestroyed=!1,this.createViewComponent=(t,e)=>{m.handleSharedView(this.layoutManager,this.identity,e);const i=new ze(t,e,this.identity.uuid,this.options,this.iframeContainer);return e&&!1===e[`${de}isClosable`]&&this.stylesheet.insertRule(`#tab-${i.identity.name} .lm_close_tab { display: none; }`),this.viewComponentsByContainerElement.set(t.element,i),this.resizeController.observeContainer(t.element),i},this.iframeContainer=document.createElement(\"div\"),this.iframeContainer.id=`openfin-layout-iframe-container-${this.identity.layoutName}`,this.domEmitter=new V(e),this.setupStylesheets(),this.layout=new he(this.container),this.layout.resizeWithContainerAutomatically=!0,this.options=n,this.layout.registerComponent(\"view\",this.createViewComponent),this.setupListeners(),this.resizeController=new ve(this),this.layout.loadLayout(Me.overrideConfig(i));const r=document.createElement(\"div\");r.id=`openfin-layout-shadow-container-${this.identity.layoutName}`,r.attachShadow({mode:\"open\",delegatesFocus:!1}).appendChild(this.iframeContainer),this.container.appendChild(r),this.resizeController.observeMutations(this.container)}getStackByView({name:t}){const e=this.layout.findFirstComponentItemById(t);if(e?.parent&&e?.parent?.isStack)return Ie.wrap(e.parent,this)}getRoot(){return Ie.wrap(this.layout.rootItem,this)}async platformCloseView(t){const e=[...this.viewComponentsByContainerElement.values()].find((e=>e.identity.name===t.name));if(!e)throw new Error(`View with name: ${t.name} not found in layout.`);e.closeView()}async platformCreateView(t,{location:e,targetView:i}={}){if(i)throw new Error(\"TargetView not supported in web\");const n={options:this.platformProvider.normalizeOptions(t),target:this.identity,location:e};return this.insertView(n)}setupStylesheets(){if(this.container.setAttribute(\"data-openfin-layout-name\",this.identity.layoutName),this.stylesheet=new CSSStyleSheet,this.stylesheet.insertRule(\".lm_close { display: none; }\"),document.adoptedStyleSheets.push(this.stylesheet),this.initialConfig.settings?.preventSplitterResize){const t=`\\n [data-openfin-layout-name='${this.identity.layoutName}'] .lm_splitter {\\n pointer-events: none;\\n }`;this.stylesheet.insertRule(t)}}insertView({options:t,location:e,targetView:i}){const n=e?this.layoutContentCache.getItemOrUndefined(e.id):void 0,o=i?this.layoutContentCache.getItemOrUndefined(i.name):void 0,s=n??o??Ie.wrap(this.layout.rootItem,this);let r;if(ee.isStack(s.raw))r=s.raw;else{if(!we(s.raw))throw new Error(\"Cannot add a view at the requested location\");r=s.raw.newItem({type:\"stack\",content:[]})}const a=Math.min(r.contentItems.length,e?.index??r.contentItems.length);let l=this.layout.findFirstComponentItemById(t.name);l?(l.parent&&l.parent.removeChild(l,!0),r.addChild(l,a)):l=r.newComponent(\"view\",t,t.title??t.url??\"Default Title\",a);const h=l.component.identity;return Promise.resolve({identity:h})}replaceView({viewToReplace:t,newView:e}){throw new Error(\"Method not implemented.\")}replaceLayout(t){throw new Error(\"Method not implemented.\")}async cleanupView(t){}applyPreset(t){throw new Error(\"Method not implemented.\")}getCurrentViews(){return[...this.viewComponentsByContainerElement.values()].map((t=>t.identity))}async getFrameSnapshot(){return Ee(xt.fromResolved(this.layout.toConfig()))}isVisible(){return W(this.container)}async onViewDetached({viewIdentity:t}){this.reparentingViews.add(t.name),this.platformCloseView(t)}async destroy(){this.goldenLayoutDestroyed||(this.goldenLayoutDestroyed=!0,this.layout.destroy()),this.iframeContainer.remove(),this.resizeController.destroy(),document.adoptedStyleSheets=document.adoptedStyleSheets.filter((t=>t!==this.stylesheet)),this.viewComponentsByContainerElement.clear()}setupListeners(){this.container.addEventListener(\"pointerdown\",(t=>{if(t.target instanceof HTMLElement){const e=t.target.classList;[\"lm_tab\",\"lm_title\",\"lm_splitter\",\"lm_drag_handle\"].some((t=>e.contains(t)))&&(this.handleDragStart(),2===t.button&&t.stopPropagation())}}),!0),document.addEventListener(\"pointerup\",(()=>this.handleDragEnd()),!0),this.layout.on(\"tabCreated\",(t=>{const e=t.componentItem.component;t.element.id=`tab-${e.identity.name}`,this.domEmitter.dispatchLocalEvent(\"tab-created\",e.identity)})),this.layout.on(\"itemCreated\",(({target:t})=>{const e=t;if(Gt.isComponentItem(e)){const t=e.component;this.domEmitter.dispatchLocalEvent(\"container-created\",t.identity)}})),this.layout.on(\"itemDestroyed\",(t=>{const e=t.target;if(Gt.isComponentItem(e)){const t=e.component;this.removeViewComponent(t)}})),this.layout.on(\"itemDropped\",(()=>{this.handleDragEnd()}))}handleDragStart(){this.iframeContainer.style.pointerEvents=\"none\"}handleDragEnd(){this.iframeContainer.style.pointerEvents=\"\"}removeViewComponent(t){if(t.config&&!1===t.config[`${de}isClosable`]){const e=[...this.stylesheet.cssRules].findIndex((e=>e.cssText.includes(`#tab-${t.identity.name}`)));this.stylesheet.deleteRule(e)}t.destroy(),this.viewComponentsByContainerElement.delete(t.container.element),this.resizeController.unobserveContainer(t.container.element),this.reparentingViews.has(t.identity.name)?this.reparentingViews.delete(t.identity.name):this.platformProvider.closeView(t.identity.name);0===this.getCurrentViews().length&&(this.goldenLayoutDestroyed||(this.goldenLayoutDestroyed=!0,m.handleLastViewRemoved(this.layoutManager,this.identity)))}}class Pe{constructor(t,e,i,n){this.windowIdentity=t,this.connectConfig=e,this.provider=i,this.fallbackContainer=n}async createLayout(t,e){if(!(\"container\"in t)&&!this.fallbackContainer)throw new Error(\"Container property is not optional in web\");const{layoutName:i}=t,n=t,o=this.provider.initLayoutViews(n),s=n.container??this.fallbackContainer,r={...this.windowIdentity,layoutName:i},a=new Me(r,s,o,this.connectConfig,e,this.provider);m.registerLayout(e,i,a),this.fallbackContainer=null}async getLayoutSnapshot(t){return t.getLayoutSnapshot()}async handleLastViewRemoved(t){}}class Te{static async init(e){const i=e.getFin().InterApplicationBus.Channel,n=await i.create(`custom-frame-${e.me.uuid}`);return n.setDefaultAction((async(t,{target:e,opts:i},o)=>{const s=n.connections.find((t=>t.name===e.name));if(s)return n.dispatch(s,t,{...i,target:e});throw new Error(`Client with name ${e.name} not found`)})),await t.relayChannelClientApi_1(n,\"layout-relay\"),new Te(e)}constructor(t){this.wire=t,this.viewNames=new Set}normalizeOptions(t,i=\"default\"){const n=this.wire.me.uuid;let{name:o=`internal-generated-view-${e.v4()}`}=t;return o.match(/^internal-generated-view-/)&&this.viewNames.has(o)&&\"duplicate\"===i&&(o=`internal-generated-view-${e.v4()}`),this.viewNames.add(o),{...t,name:o,uuid:n}}closeView(t){this.viewNames.delete(t)}initLayoutViews({layout:t,multiInstanceViewBehavior:e}){return H((t=>{if(\"component\"===t.type&&t.componentState){const i=this.normalizeOptions(t.componentState,e);return{...t,componentState:i}}return t}),t)}}var Ae;const ke=t=>t;Ae=new WeakMap,exports.WebLayoutEntryPoint=class{constructor(e){Ae.set(this,void 0),this.initLayoutManager=async(e,i,{container:n,layoutManagerOverride:o})=>{const s=await Te.init(i),r=o??ke,a=new Pe(i.me,t.__classPrivateFieldGet(this,Ae,\"f\"),s,n),l=new(r(m.createClosedConstructor(a)));return await M(i,l),l},this.applyLayoutSnapshot=async(e,i,n)=>{await i.applyLayoutSnapshot(t.__classPrivateFieldGet(this,Ae,\"f\").platform.layoutSnapshot)},this.createLayout=async(t,e)=>m.createLayout(t,e),this.destroyLayout=async(t,e)=>m.destroyLayout(t,e),t.__classPrivateFieldSet(this,Ae,e,\"f\")}};\n","'use strict'\n\nexports.byteLength = byteLength\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\nfor (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i]\n revLookup[code.charCodeAt(i)] = i\n}\n\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction getLens (b64) {\n var len = b64.length\n\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // Trim off extra bytes after placeholder bytes are found\n // See: https://github.com/beatgammit/base64-js/issues/42\n var validLen = b64.indexOf('=')\n if (validLen === -1) validLen = len\n\n var placeHoldersLen = validLen === len\n ? 0\n : 4 - (validLen % 4)\n\n return [validLen, placeHoldersLen]\n}\n\n// base64 is 4/3 + up to two characters of the original data\nfunction byteLength (b64) {\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction _byteLength (b64, validLen, placeHoldersLen) {\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction toByteArray (b64) {\n var tmp\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n\n var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))\n\n var curByte = 0\n\n // if there are placeholders, only get up to the last complete 4 chars\n var len = placeHoldersLen > 0\n ? validLen - 4\n : validLen\n\n var i\n for (i = 0; i < len; i += 4) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 18) |\n (revLookup[b64.charCodeAt(i + 1)] << 12) |\n (revLookup[b64.charCodeAt(i + 2)] << 6) |\n revLookup[b64.charCodeAt(i + 3)]\n arr[curByte++] = (tmp >> 16) & 0xFF\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 2) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 2) |\n (revLookup[b64.charCodeAt(i + 1)] >> 4)\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 1) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 10) |\n (revLookup[b64.charCodeAt(i + 1)] << 4) |\n (revLookup[b64.charCodeAt(i + 2)] >> 2)\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] +\n lookup[num >> 12 & 0x3F] +\n lookup[num >> 6 & 0x3F] +\n lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n var tmp\n var output = []\n for (var i = start; i < end; i += 3) {\n tmp =\n ((uint8[i] << 16) & 0xFF0000) +\n ((uint8[i + 1] << 8) & 0xFF00) +\n (uint8[i + 2] & 0xFF)\n output.push(tripletToBase64(tmp))\n }\n return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n var tmp\n var len = uint8.length\n var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n var parts = []\n var maxChunkLength = 16383 // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1]\n parts.push(\n lookup[tmp >> 2] +\n lookup[(tmp << 4) & 0x3F] +\n '=='\n )\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + uint8[len - 1]\n parts.push(\n lookup[tmp >> 10] +\n lookup[(tmp >> 4) & 0x3F] +\n lookup[(tmp << 2) & 0x3F] +\n '='\n )\n }\n\n return parts.join('')\n}\n","/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n/* eslint-disable no-proto */\n\n'use strict'\n\nconst base64 = require('base64-js')\nconst ieee754 = require('ieee754')\nconst customInspectSymbol =\n (typeof Symbol === 'function' && typeof Symbol['for'] === 'function') // eslint-disable-line dot-notation\n ? Symbol['for']('nodejs.util.inspect.custom') // eslint-disable-line dot-notation\n : null\n\nexports.Buffer = Buffer\nexports.SlowBuffer = SlowBuffer\nexports.INSPECT_MAX_BYTES = 50\n\nconst K_MAX_LENGTH = 0x7fffffff\nexports.kMaxLength = K_MAX_LENGTH\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Print warning and recommend using `buffer` v4.x which has an Object\n * implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * We report that the browser does not support typed arrays if the are not subclassable\n * using __proto__. Firefox 4-29 lacks support for adding new properties to `Uint8Array`\n * (See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438). IE 10 lacks support\n * for __proto__ and has a buggy typed array implementation.\n */\nBuffer.TYPED_ARRAY_SUPPORT = typedArraySupport()\n\nif (!Buffer.TYPED_ARRAY_SUPPORT && typeof console !== 'undefined' &&\n typeof console.error === 'function') {\n console.error(\n 'This browser lacks typed array (Uint8Array) support which is required by ' +\n '`buffer` v5.x. Use `buffer` v4.x if you require old browser support.'\n )\n}\n\nfunction typedArraySupport () {\n // Can typed array instances can be augmented?\n try {\n const arr = new Uint8Array(1)\n const proto = { foo: function () { return 42 } }\n Object.setPrototypeOf(proto, Uint8Array.prototype)\n Object.setPrototypeOf(arr, proto)\n return arr.foo() === 42\n } catch (e) {\n return false\n }\n}\n\nObject.defineProperty(Buffer.prototype, 'parent', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.buffer\n }\n})\n\nObject.defineProperty(Buffer.prototype, 'offset', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.byteOffset\n }\n})\n\nfunction createBuffer (length) {\n if (length > K_MAX_LENGTH) {\n throw new RangeError('The value \"' + length + '\" is invalid for option \"size\"')\n }\n // Return an augmented `Uint8Array` instance\n const buf = new Uint8Array(length)\n Object.setPrototypeOf(buf, Buffer.prototype)\n return buf\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new TypeError(\n 'The \"string\" argument must be of type string. Received type number'\n )\n }\n return allocUnsafe(arg)\n }\n return from(arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\nfunction from (value, encodingOrOffset, length) {\n if (typeof value === 'string') {\n return fromString(value, encodingOrOffset)\n }\n\n if (ArrayBuffer.isView(value)) {\n return fromArrayView(value)\n }\n\n if (value == null) {\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n }\n\n if (isInstance(value, ArrayBuffer) ||\n (value && isInstance(value.buffer, ArrayBuffer))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof SharedArrayBuffer !== 'undefined' &&\n (isInstance(value, SharedArrayBuffer) ||\n (value && isInstance(value.buffer, SharedArrayBuffer)))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof value === 'number') {\n throw new TypeError(\n 'The \"value\" argument must not be of type number. Received type number'\n )\n }\n\n const valueOf = value.valueOf && value.valueOf()\n if (valueOf != null && valueOf !== value) {\n return Buffer.from(valueOf, encodingOrOffset, length)\n }\n\n const b = fromObject(value)\n if (b) return b\n\n if (typeof Symbol !== 'undefined' && Symbol.toPrimitive != null &&\n typeof value[Symbol.toPrimitive] === 'function') {\n return Buffer.from(value[Symbol.toPrimitive]('string'), encodingOrOffset, length)\n }\n\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n return from(value, encodingOrOffset, length)\n}\n\n// Note: Change prototype *after* Buffer.from is defined to workaround Chrome bug:\n// https://github.com/feross/buffer/pull/148\nObject.setPrototypeOf(Buffer.prototype, Uint8Array.prototype)\nObject.setPrototypeOf(Buffer, Uint8Array)\n\nfunction assertSize (size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be of type number')\n } else if (size < 0) {\n throw new RangeError('The value \"' + size + '\" is invalid for option \"size\"')\n }\n}\n\nfunction alloc (size, fill, encoding) {\n assertSize(size)\n if (size <= 0) {\n return createBuffer(size)\n }\n if (fill !== undefined) {\n // Only pay attention to encoding if it's a string. This\n // prevents accidentally sending in a number that would\n // be interpreted as a start offset.\n return typeof encoding === 'string'\n ? createBuffer(size).fill(fill, encoding)\n : createBuffer(size).fill(fill)\n }\n return createBuffer(size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n return alloc(size, fill, encoding)\n}\n\nfunction allocUnsafe (size) {\n assertSize(size)\n return createBuffer(size < 0 ? 0 : checked(size) | 0)\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n return allocUnsafe(size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n return allocUnsafe(size)\n}\n\nfunction fromString (string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8'\n }\n\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n\n const length = byteLength(string, encoding) | 0\n let buf = createBuffer(length)\n\n const actual = buf.write(string, encoding)\n\n if (actual !== length) {\n // Writing a hex string, for example, that contains invalid characters will\n // cause everything after the first invalid character to be ignored. (e.g.\n // 'abxxcd' will be treated as 'ab')\n buf = buf.slice(0, actual)\n }\n\n return buf\n}\n\nfunction fromArrayLike (array) {\n const length = array.length < 0 ? 0 : checked(array.length) | 0\n const buf = createBuffer(length)\n for (let i = 0; i < length; i += 1) {\n buf[i] = array[i] & 255\n }\n return buf\n}\n\nfunction fromArrayView (arrayView) {\n if (isInstance(arrayView, Uint8Array)) {\n const copy = new Uint8Array(arrayView)\n return fromArrayBuffer(copy.buffer, copy.byteOffset, copy.byteLength)\n }\n return fromArrayLike(arrayView)\n}\n\nfunction fromArrayBuffer (array, byteOffset, length) {\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\"offset\" is outside of buffer bounds')\n }\n\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\"length\" is outside of buffer bounds')\n }\n\n let buf\n if (byteOffset === undefined && length === undefined) {\n buf = new Uint8Array(array)\n } else if (length === undefined) {\n buf = new Uint8Array(array, byteOffset)\n } else {\n buf = new Uint8Array(array, byteOffset, length)\n }\n\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(buf, Buffer.prototype)\n\n return buf\n}\n\nfunction fromObject (obj) {\n if (Buffer.isBuffer(obj)) {\n const len = checked(obj.length) | 0\n const buf = createBuffer(len)\n\n if (buf.length === 0) {\n return buf\n }\n\n obj.copy(buf, 0, 0, len)\n return buf\n }\n\n if (obj.length !== undefined) {\n if (typeof obj.length !== 'number' || numberIsNaN(obj.length)) {\n return createBuffer(0)\n }\n return fromArrayLike(obj)\n }\n\n if (obj.type === 'Buffer' && Array.isArray(obj.data)) {\n return fromArrayLike(obj.data)\n }\n}\n\nfunction checked (length) {\n // Note: cannot use `length < K_MAX_LENGTH` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= K_MAX_LENGTH) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + K_MAX_LENGTH.toString(16) + ' bytes')\n }\n return length | 0\n}\n\nfunction SlowBuffer (length) {\n if (+length != length) { // eslint-disable-line eqeqeq\n length = 0\n }\n return Buffer.alloc(+length)\n}\n\nBuffer.isBuffer = function isBuffer (b) {\n return b != null && b._isBuffer === true &&\n b !== Buffer.prototype // so Buffer.isBuffer(Buffer.prototype) will be false\n}\n\nBuffer.compare = function compare (a, b) {\n if (isInstance(a, Uint8Array)) a = Buffer.from(a, a.offset, a.byteLength)\n if (isInstance(b, Uint8Array)) b = Buffer.from(b, b.offset, b.byteLength)\n if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n throw new TypeError(\n 'The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array'\n )\n }\n\n if (a === b) return 0\n\n let x = a.length\n let y = b.length\n\n for (let i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i]\n y = b[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n switch (String(encoding).toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'latin1':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return true\n default:\n return false\n }\n}\n\nBuffer.concat = function concat (list, length) {\n if (!Array.isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n\n if (list.length === 0) {\n return Buffer.alloc(0)\n }\n\n let i\n if (length === undefined) {\n length = 0\n for (i = 0; i < list.length; ++i) {\n length += list[i].length\n }\n }\n\n const buffer = Buffer.allocUnsafe(length)\n let pos = 0\n for (i = 0; i < list.length; ++i) {\n let buf = list[i]\n if (isInstance(buf, Uint8Array)) {\n if (pos + buf.length > buffer.length) {\n if (!Buffer.isBuffer(buf)) buf = Buffer.from(buf)\n buf.copy(buffer, pos)\n } else {\n Uint8Array.prototype.set.call(\n buffer,\n buf,\n pos\n )\n }\n } else if (!Buffer.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n } else {\n buf.copy(buffer, pos)\n }\n pos += buf.length\n }\n return buffer\n}\n\nfunction byteLength (string, encoding) {\n if (Buffer.isBuffer(string)) {\n return string.length\n }\n if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) {\n return string.byteLength\n }\n if (typeof string !== 'string') {\n throw new TypeError(\n 'The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. ' +\n 'Received type ' + typeof string\n )\n }\n\n const len = string.length\n const mustMatch = (arguments.length > 2 && arguments[2] === true)\n if (!mustMatch && len === 0) return 0\n\n // Use a for loop to avoid recursion\n let loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'ascii':\n case 'latin1':\n case 'binary':\n return len\n case 'utf8':\n case 'utf-8':\n return utf8ToBytes(string).length\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return len * 2\n case 'hex':\n return len >>> 1\n case 'base64':\n return base64ToBytes(string).length\n default:\n if (loweredCase) {\n return mustMatch ? -1 : utf8ToBytes(string).length // assume utf8\n }\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n let loweredCase = false\n\n // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n // property of a typed array.\n\n // This behaves neither like String nor Uint8Array in that we set start/end\n // to their upper/lower bounds if the value passed is out of range.\n // undefined is handled specially as per ECMA-262 6th Edition,\n // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n if (start === undefined || start < 0) {\n start = 0\n }\n // Return early if start > this.length. Done here to prevent potential uint32\n // coercion fail below.\n if (start > this.length) {\n return ''\n }\n\n if (end === undefined || end > this.length) {\n end = this.length\n }\n\n if (end <= 0) {\n return ''\n }\n\n // Force coercion to uint32. This will also coerce falsey/NaN values to 0.\n end >>>= 0\n start >>>= 0\n\n if (end <= start) {\n return ''\n }\n\n if (!encoding) encoding = 'utf8'\n\n while (true) {\n switch (encoding) {\n case 'hex':\n return hexSlice(this, start, end)\n\n case 'utf8':\n case 'utf-8':\n return utf8Slice(this, start, end)\n\n case 'ascii':\n return asciiSlice(this, start, end)\n\n case 'latin1':\n case 'binary':\n return latin1Slice(this, start, end)\n\n case 'base64':\n return base64Slice(this, start, end)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return utf16leSlice(this, start, end)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = (encoding + '').toLowerCase()\n loweredCase = true\n }\n }\n}\n\n// This property is used by `Buffer.isBuffer` (and the `is-buffer` npm package)\n// to detect a Buffer instance. It's not possible to use `instanceof Buffer`\n// reliably in a browserify context because there could be multiple different\n// copies of the 'buffer' package in use. This method works even for Buffer\n// instances that were created from another copy of the `buffer` package.\n// See: https://github.com/feross/buffer/issues/154\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n const i = b[n]\n b[n] = b[m]\n b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n const len = this.length\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits')\n }\n for (let i = 0; i < len; i += 2) {\n swap(this, i, i + 1)\n }\n return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n const len = this.length\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits')\n }\n for (let i = 0; i < len; i += 4) {\n swap(this, i, i + 3)\n swap(this, i + 1, i + 2)\n }\n return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n const len = this.length\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits')\n }\n for (let i = 0; i < len; i += 8) {\n swap(this, i, i + 7)\n swap(this, i + 1, i + 6)\n swap(this, i + 2, i + 5)\n swap(this, i + 3, i + 4)\n }\n return this\n}\n\nBuffer.prototype.toString = function toString () {\n const length = this.length\n if (length === 0) return ''\n if (arguments.length === 0) return utf8Slice(this, 0, length)\n return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.toLocaleString = Buffer.prototype.toString\n\nBuffer.prototype.equals = function equals (b) {\n if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n if (this === b) return true\n return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n let str = ''\n const max = exports.INSPECT_MAX_BYTES\n str = this.toString('hex', 0, max).replace(/(.{2})/g, '$1 ').trim()\n if (this.length > max) str += ' ... '\n return ''\n}\nif (customInspectSymbol) {\n Buffer.prototype[customInspectSymbol] = Buffer.prototype.inspect\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n if (isInstance(target, Uint8Array)) {\n target = Buffer.from(target, target.offset, target.byteLength)\n }\n if (!Buffer.isBuffer(target)) {\n throw new TypeError(\n 'The \"target\" argument must be one of type Buffer or Uint8Array. ' +\n 'Received type ' + (typeof target)\n )\n }\n\n if (start === undefined) {\n start = 0\n }\n if (end === undefined) {\n end = target ? target.length : 0\n }\n if (thisStart === undefined) {\n thisStart = 0\n }\n if (thisEnd === undefined) {\n thisEnd = this.length\n }\n\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError('out of range index')\n }\n\n if (thisStart >= thisEnd && start >= end) {\n return 0\n }\n if (thisStart >= thisEnd) {\n return -1\n }\n if (start >= end) {\n return 1\n }\n\n start >>>= 0\n end >>>= 0\n thisStart >>>= 0\n thisEnd >>>= 0\n\n if (this === target) return 0\n\n let x = thisEnd - thisStart\n let y = end - start\n const len = Math.min(x, y)\n\n const thisCopy = this.slice(thisStart, thisEnd)\n const targetCopy = target.slice(start, end)\n\n for (let i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i]\n y = targetCopy[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (numberIsNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [val], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n let indexSize = 1\n let arrLength = arr.length\n let valLength = val.length\n\n if (encoding !== undefined) {\n encoding = String(encoding).toLowerCase()\n if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n encoding === 'utf16le' || encoding === 'utf-16le') {\n if (arr.length < 2 || val.length < 2) {\n return -1\n }\n indexSize = 2\n arrLength /= 2\n valLength /= 2\n byteOffset /= 2\n }\n }\n\n function read (buf, i) {\n if (indexSize === 1) {\n return buf[i]\n } else {\n return buf.readUInt16BE(i * indexSize)\n }\n }\n\n let i\n if (dir) {\n let foundIndex = -1\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1) foundIndex = i\n if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n } else {\n if (foundIndex !== -1) i -= i - foundIndex\n foundIndex = -1\n }\n }\n } else {\n if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n for (i = byteOffset; i >= 0; i--) {\n let found = true\n for (let j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false\n break\n }\n }\n if (found) return i\n }\n }\n\n return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n offset = Number(offset) || 0\n const remaining = buf.length - offset\n if (!length) {\n length = remaining\n } else {\n length = Number(length)\n if (length > remaining) {\n length = remaining\n }\n }\n\n const strLen = string.length\n\n if (length > strLen / 2) {\n length = strLen / 2\n }\n let i\n for (i = 0; i < length; ++i) {\n const parsed = parseInt(string.substr(i * 2, 2), 16)\n if (numberIsNaN(parsed)) return i\n buf[offset + i] = parsed\n }\n return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n // Buffer#write(string)\n if (offset === undefined) {\n encoding = 'utf8'\n length = this.length\n offset = 0\n // Buffer#write(string, encoding)\n } else if (length === undefined && typeof offset === 'string') {\n encoding = offset\n length = this.length\n offset = 0\n // Buffer#write(string, offset[, length][, encoding])\n } else if (isFinite(offset)) {\n offset = offset >>> 0\n if (isFinite(length)) {\n length = length >>> 0\n if (encoding === undefined) encoding = 'utf8'\n } else {\n encoding = length\n length = undefined\n }\n } else {\n throw new Error(\n 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n )\n }\n\n const remaining = this.length - offset\n if (length === undefined || length > remaining) length = remaining\n\n if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n throw new RangeError('Attempt to write outside buffer bounds')\n }\n\n if (!encoding) encoding = 'utf8'\n\n let loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'hex':\n return hexWrite(this, string, offset, length)\n\n case 'utf8':\n case 'utf-8':\n return utf8Write(this, string, offset, length)\n\n case 'ascii':\n case 'latin1':\n case 'binary':\n return asciiWrite(this, string, offset, length)\n\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return base64Write(this, string, offset, length)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return ucs2Write(this, string, offset, length)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0)\n }\n}\n\nfunction base64Slice (buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf)\n } else {\n return base64.fromByteArray(buf.slice(start, end))\n }\n}\n\nfunction utf8Slice (buf, start, end) {\n end = Math.min(buf.length, end)\n const res = []\n\n let i = start\n while (i < end) {\n const firstByte = buf[i]\n let codePoint = null\n let bytesPerSequence = (firstByte > 0xEF)\n ? 4\n : (firstByte > 0xDF)\n ? 3\n : (firstByte > 0xBF)\n ? 2\n : 1\n\n if (i + bytesPerSequence <= end) {\n let secondByte, thirdByte, fourthByte, tempCodePoint\n\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 0x80) {\n codePoint = firstByte\n }\n break\n case 2:\n secondByte = buf[i + 1]\n if ((secondByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n if (tempCodePoint > 0x7F) {\n codePoint = tempCodePoint\n }\n }\n break\n case 3:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n codePoint = tempCodePoint\n }\n }\n break\n case 4:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n fourthByte = buf[i + 3]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n codePoint = tempCodePoint\n }\n }\n }\n }\n\n if (codePoint === null) {\n // we did not generate a valid codePoint so insert a\n // replacement char (U+FFFD) and advance only 1 byte\n codePoint = 0xFFFD\n bytesPerSequence = 1\n } else if (codePoint > 0xFFFF) {\n // encode to utf16 (surrogate pair dance)\n codePoint -= 0x10000\n res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n codePoint = 0xDC00 | codePoint & 0x3FF\n }\n\n res.push(codePoint)\n i += bytesPerSequence\n }\n\n return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nconst MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n const len = codePoints.length\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n }\n\n // Decode in chunks to avoid \"call stack size exceeded\".\n let res = ''\n let i = 0\n while (i < len) {\n res += String.fromCharCode.apply(\n String,\n codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n )\n }\n return res\n}\n\nfunction asciiSlice (buf, start, end) {\n let ret = ''\n end = Math.min(buf.length, end)\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F)\n }\n return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n let ret = ''\n end = Math.min(buf.length, end)\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i])\n }\n return ret\n}\n\nfunction hexSlice (buf, start, end) {\n const len = buf.length\n\n if (!start || start < 0) start = 0\n if (!end || end < 0 || end > len) end = len\n\n let out = ''\n for (let i = start; i < end; ++i) {\n out += hexSliceLookupTable[buf[i]]\n }\n return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n const bytes = buf.slice(start, end)\n let res = ''\n // If bytes.length is odd, the last 8 bits must be ignored (same as node.js)\n for (let i = 0; i < bytes.length - 1; i += 2) {\n res += String.fromCharCode(bytes[i] + (bytes[i + 1] * 256))\n }\n return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n const len = this.length\n start = ~~start\n end = end === undefined ? len : ~~end\n\n if (start < 0) {\n start += len\n if (start < 0) start = 0\n } else if (start > len) {\n start = len\n }\n\n if (end < 0) {\n end += len\n if (end < 0) end = 0\n } else if (end > len) {\n end = len\n }\n\n if (end < start) end = start\n\n const newBuf = this.subarray(start, end)\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(newBuf, Buffer.prototype)\n\n return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUintLE =\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let val = this[offset]\n let mul = 1\n let i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUintBE =\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n checkOffset(offset, byteLength, this.length)\n }\n\n let val = this[offset + --byteLength]\n let mul = 1\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUint8 =\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n return this[offset]\n}\n\nBuffer.prototype.readUint16LE =\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUint16BE =\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUint32LE =\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return ((this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16)) +\n (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUint32BE =\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] * 0x1000000) +\n ((this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n this[offset + 3])\n}\n\nBuffer.prototype.readBigUInt64LE = defineBigIntMethod(function readBigUInt64LE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const lo = first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24\n\n const hi = this[++offset] +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n last * 2 ** 24\n\n return BigInt(lo) + (BigInt(hi) << BigInt(32))\n})\n\nBuffer.prototype.readBigUInt64BE = defineBigIntMethod(function readBigUInt64BE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const hi = first * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset]\n\n const lo = this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last\n\n return (BigInt(hi) << BigInt(32)) + BigInt(lo)\n})\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let val = this[offset]\n let mul = 1\n let i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let i = byteLength\n let mul = 1\n let val = this[offset + --i]\n while (i > 0 && (mul *= 0x100)) {\n val += this[offset + --i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n if (!(this[offset] & 0x80)) return (this[offset])\n return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n const val = this[offset] | (this[offset + 1] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n const val = this[offset + 1] | (this[offset] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16) |\n (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] << 24) |\n (this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n (this[offset + 3])\n}\n\nBuffer.prototype.readBigInt64LE = defineBigIntMethod(function readBigInt64LE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const val = this[offset + 4] +\n this[offset + 5] * 2 ** 8 +\n this[offset + 6] * 2 ** 16 +\n (last << 24) // Overflow\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24)\n})\n\nBuffer.prototype.readBigInt64BE = defineBigIntMethod(function readBigInt64BE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const val = (first << 24) + // Overflow\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset]\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last)\n})\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUintLE =\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n let mul = 1\n let i = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUintBE =\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n let i = byteLength - 1\n let mul = 1\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUint8 =\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeUint16LE =\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeUint16BE =\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeUint32LE =\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset + 3] = (value >>> 24)\n this[offset + 2] = (value >>> 16)\n this[offset + 1] = (value >>> 8)\n this[offset] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeUint32BE =\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nfunction wrtBigUInt64LE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7)\n\n let lo = Number(value & BigInt(0xffffffff))\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n return offset\n}\n\nfunction wrtBigUInt64BE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7)\n\n let lo = Number(value & BigInt(0xffffffff))\n buf[offset + 7] = lo\n lo = lo >> 8\n buf[offset + 6] = lo\n lo = lo >> 8\n buf[offset + 5] = lo\n lo = lo >> 8\n buf[offset + 4] = lo\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n buf[offset + 3] = hi\n hi = hi >> 8\n buf[offset + 2] = hi\n hi = hi >> 8\n buf[offset + 1] = hi\n hi = hi >> 8\n buf[offset] = hi\n return offset + 8\n}\n\nBuffer.prototype.writeBigUInt64LE = defineBigIntMethod(function writeBigUInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeBigUInt64BE = defineBigIntMethod(function writeBigUInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n let i = 0\n let mul = 1\n let sub = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n let i = byteLength - 1\n let mul = 1\n let sub = 0\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n if (value < 0) value = 0xff + value + 1\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n this[offset + 2] = (value >>> 16)\n this[offset + 3] = (value >>> 24)\n return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (value < 0) value = 0xffffffff + value + 1\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeBigInt64LE = defineBigIntMethod(function writeBigInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nBuffer.prototype.writeBigInt64BE = defineBigIntMethod(function writeBigInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n }\n ieee754.write(buf, value, offset, littleEndian, 23, 4)\n return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n }\n ieee754.write(buf, value, offset, littleEndian, 52, 8)\n return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n if (!Buffer.isBuffer(target)) throw new TypeError('argument should be a Buffer')\n if (!start) start = 0\n if (!end && end !== 0) end = this.length\n if (targetStart >= target.length) targetStart = target.length\n if (!targetStart) targetStart = 0\n if (end > 0 && end < start) end = start\n\n // Copy 0 bytes; we're done\n if (end === start) return 0\n if (target.length === 0 || this.length === 0) return 0\n\n // Fatal error conditions\n if (targetStart < 0) {\n throw new RangeError('targetStart out of bounds')\n }\n if (start < 0 || start >= this.length) throw new RangeError('Index out of range')\n if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n // Are we oob?\n if (end > this.length) end = this.length\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start\n }\n\n const len = end - start\n\n if (this === target && typeof Uint8Array.prototype.copyWithin === 'function') {\n // Use built-in when available, missing from IE11\n this.copyWithin(targetStart, start, end)\n } else {\n Uint8Array.prototype.set.call(\n target,\n this.subarray(start, end),\n targetStart\n )\n }\n\n return len\n}\n\n// Usage:\n// buffer.fill(number[, offset[, end]])\n// buffer.fill(buffer[, offset[, end]])\n// buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n // Handle string cases:\n if (typeof val === 'string') {\n if (typeof start === 'string') {\n encoding = start\n start = 0\n end = this.length\n } else if (typeof end === 'string') {\n encoding = end\n end = this.length\n }\n if (encoding !== undefined && typeof encoding !== 'string') {\n throw new TypeError('encoding must be a string')\n }\n if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n if (val.length === 1) {\n const code = val.charCodeAt(0)\n if ((encoding === 'utf8' && code < 128) ||\n encoding === 'latin1') {\n // Fast path: If `val` fits into a single byte, use that numeric value.\n val = code\n }\n }\n } else if (typeof val === 'number') {\n val = val & 255\n } else if (typeof val === 'boolean') {\n val = Number(val)\n }\n\n // Invalid ranges are not set to a default, so can range check early.\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError('Out of range index')\n }\n\n if (end <= start) {\n return this\n }\n\n start = start >>> 0\n end = end === undefined ? this.length : end >>> 0\n\n if (!val) val = 0\n\n let i\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val\n }\n } else {\n const bytes = Buffer.isBuffer(val)\n ? val\n : Buffer.from(val, encoding)\n const len = bytes.length\n if (len === 0) {\n throw new TypeError('The value \"' + val +\n '\" is invalid for argument \"value\"')\n }\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len]\n }\n }\n\n return this\n}\n\n// CUSTOM ERRORS\n// =============\n\n// Simplified versions from Node, changed for Buffer-only usage\nconst errors = {}\nfunction E (sym, getMessage, Base) {\n errors[sym] = class NodeError extends Base {\n constructor () {\n super()\n\n Object.defineProperty(this, 'message', {\n value: getMessage.apply(this, arguments),\n writable: true,\n configurable: true\n })\n\n // Add the error code to the name to include it in the stack trace.\n this.name = `${this.name} [${sym}]`\n // Access the stack to generate the error message including the error code\n // from the name.\n this.stack // eslint-disable-line no-unused-expressions\n // Reset the name to the actual name.\n delete this.name\n }\n\n get code () {\n return sym\n }\n\n set code (value) {\n Object.defineProperty(this, 'code', {\n configurable: true,\n enumerable: true,\n value,\n writable: true\n })\n }\n\n toString () {\n return `${this.name} [${sym}]: ${this.message}`\n }\n }\n}\n\nE('ERR_BUFFER_OUT_OF_BOUNDS',\n function (name) {\n if (name) {\n return `${name} is outside of buffer bounds`\n }\n\n return 'Attempt to access memory outside buffer bounds'\n }, RangeError)\nE('ERR_INVALID_ARG_TYPE',\n function (name, actual) {\n return `The \"${name}\" argument must be of type number. Received type ${typeof actual}`\n }, TypeError)\nE('ERR_OUT_OF_RANGE',\n function (str, range, input) {\n let msg = `The value of \"${str}\" is out of range.`\n let received = input\n if (Number.isInteger(input) && Math.abs(input) > 2 ** 32) {\n received = addNumericalSeparator(String(input))\n } else if (typeof input === 'bigint') {\n received = String(input)\n if (input > BigInt(2) ** BigInt(32) || input < -(BigInt(2) ** BigInt(32))) {\n received = addNumericalSeparator(received)\n }\n received += 'n'\n }\n msg += ` It must be ${range}. Received ${received}`\n return msg\n }, RangeError)\n\nfunction addNumericalSeparator (val) {\n let res = ''\n let i = val.length\n const start = val[0] === '-' ? 1 : 0\n for (; i >= start + 4; i -= 3) {\n res = `_${val.slice(i - 3, i)}${res}`\n }\n return `${val.slice(0, i)}${res}`\n}\n\n// CHECK FUNCTIONS\n// ===============\n\nfunction checkBounds (buf, offset, byteLength) {\n validateNumber(offset, 'offset')\n if (buf[offset] === undefined || buf[offset + byteLength] === undefined) {\n boundsError(offset, buf.length - (byteLength + 1))\n }\n}\n\nfunction checkIntBI (value, min, max, buf, offset, byteLength) {\n if (value > max || value < min) {\n const n = typeof min === 'bigint' ? 'n' : ''\n let range\n if (byteLength > 3) {\n if (min === 0 || min === BigInt(0)) {\n range = `>= 0${n} and < 2${n} ** ${(byteLength + 1) * 8}${n}`\n } else {\n range = `>= -(2${n} ** ${(byteLength + 1) * 8 - 1}${n}) and < 2 ** ` +\n `${(byteLength + 1) * 8 - 1}${n}`\n }\n } else {\n range = `>= ${min}${n} and <= ${max}${n}`\n }\n throw new errors.ERR_OUT_OF_RANGE('value', range, value)\n }\n checkBounds(buf, offset, byteLength)\n}\n\nfunction validateNumber (value, name) {\n if (typeof value !== 'number') {\n throw new errors.ERR_INVALID_ARG_TYPE(name, 'number', value)\n }\n}\n\nfunction boundsError (value, length, type) {\n if (Math.floor(value) !== value) {\n validateNumber(value, type)\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset', 'an integer', value)\n }\n\n if (length < 0) {\n throw new errors.ERR_BUFFER_OUT_OF_BOUNDS()\n }\n\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset',\n `>= ${type ? 1 : 0} and <= ${length}`,\n value)\n}\n\n// HELPER FUNCTIONS\n// ================\n\nconst INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n // Node takes equal signs as end of the Base64 encoding\n str = str.split('=')[0]\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = str.trim().replace(INVALID_BASE64_RE, '')\n // Node converts strings with length < 2 to ''\n if (str.length < 2) return ''\n // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n while (str.length % 4 !== 0) {\n str = str + '='\n }\n return str\n}\n\nfunction utf8ToBytes (string, units) {\n units = units || Infinity\n let codePoint\n const length = string.length\n let leadSurrogate = null\n const bytes = []\n\n for (let i = 0; i < length; ++i) {\n codePoint = string.charCodeAt(i)\n\n // is surrogate component\n if (codePoint > 0xD7FF && codePoint < 0xE000) {\n // last char was a lead\n if (!leadSurrogate) {\n // no lead yet\n if (codePoint > 0xDBFF) {\n // unexpected trail\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n } else if (i + 1 === length) {\n // unpaired lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n }\n\n // valid lead\n leadSurrogate = codePoint\n\n continue\n }\n\n // 2 leads in a row\n if (codePoint < 0xDC00) {\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n leadSurrogate = codePoint\n continue\n }\n\n // valid surrogate pair\n codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n } else if (leadSurrogate) {\n // valid bmp char, but last char was a lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n }\n\n leadSurrogate = null\n\n // encode utf8\n if (codePoint < 0x80) {\n if ((units -= 1) < 0) break\n bytes.push(codePoint)\n } else if (codePoint < 0x800) {\n if ((units -= 2) < 0) break\n bytes.push(\n codePoint >> 0x6 | 0xC0,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x10000) {\n if ((units -= 3) < 0) break\n bytes.push(\n codePoint >> 0xC | 0xE0,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x110000) {\n if ((units -= 4) < 0) break\n bytes.push(\n codePoint >> 0x12 | 0xF0,\n codePoint >> 0xC & 0x3F | 0x80,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else {\n throw new Error('Invalid code point')\n }\n }\n\n return bytes\n}\n\nfunction asciiToBytes (str) {\n const byteArray = []\n for (let i = 0; i < str.length; ++i) {\n // Node's code seems to be doing this and not & 0x7F..\n byteArray.push(str.charCodeAt(i) & 0xFF)\n }\n return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n let c, hi, lo\n const byteArray = []\n for (let i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0) break\n\n c = str.charCodeAt(i)\n hi = c >> 8\n lo = c % 256\n byteArray.push(lo)\n byteArray.push(hi)\n }\n\n return byteArray\n}\n\nfunction base64ToBytes (str) {\n return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n let i\n for (i = 0; i < length; ++i) {\n if ((i + offset >= dst.length) || (i >= src.length)) break\n dst[i + offset] = src[i]\n }\n return i\n}\n\n// ArrayBuffer or Uint8Array objects from other contexts (i.e. iframes) do not pass\n// the `instanceof` check but they should be treated as of that type.\n// See: https://github.com/feross/buffer/issues/166\nfunction isInstance (obj, type) {\n return obj instanceof type ||\n (obj != null && obj.constructor != null && obj.constructor.name != null &&\n obj.constructor.name === type.name)\n}\nfunction numberIsNaN (obj) {\n // For IE11 support\n return obj !== obj // eslint-disable-line no-self-compare\n}\n\n// Create lookup table for `toString('hex')`\n// See: https://github.com/feross/buffer/issues/219\nconst hexSliceLookupTable = (function () {\n const alphabet = '0123456789abcdef'\n const table = new Array(256)\n for (let i = 0; i < 16; ++i) {\n const i16 = i * 16\n for (let j = 0; j < 16; ++j) {\n table[i16 + j] = alphabet[i] + alphabet[j]\n }\n }\n return table\n})()\n\n// Return not function with Error if BigInt not supported\nfunction defineBigIntMethod (fn) {\n return typeof BigInt === 'undefined' ? BufferBigIntNotDefined : fn\n}\n\nfunction BufferBigIntNotDefined () {\n throw new Error('BigInt not supported')\n}\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\nvar R = typeof Reflect === 'object' ? Reflect : null\nvar ReflectApply = R && typeof R.apply === 'function'\n ? R.apply\n : function ReflectApply(target, receiver, args) {\n return Function.prototype.apply.call(target, receiver, args);\n }\n\nvar ReflectOwnKeys\nif (R && typeof R.ownKeys === 'function') {\n ReflectOwnKeys = R.ownKeys\n} else if (Object.getOwnPropertySymbols) {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target)\n .concat(Object.getOwnPropertySymbols(target));\n };\n} else {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target);\n };\n}\n\nfunction ProcessEmitWarning(warning) {\n if (console && console.warn) console.warn(warning);\n}\n\nvar NumberIsNaN = Number.isNaN || function NumberIsNaN(value) {\n return value !== value;\n}\n\nfunction EventEmitter() {\n EventEmitter.init.call(this);\n}\nmodule.exports = EventEmitter;\nmodule.exports.once = once;\n\n// Backwards-compat with node 0.10.x\nEventEmitter.EventEmitter = EventEmitter;\n\nEventEmitter.prototype._events = undefined;\nEventEmitter.prototype._eventsCount = 0;\nEventEmitter.prototype._maxListeners = undefined;\n\n// By default EventEmitters will print a warning if more than 10 listeners are\n// added to it. This is a useful default which helps finding memory leaks.\nvar defaultMaxListeners = 10;\n\nfunction checkListener(listener) {\n if (typeof listener !== 'function') {\n throw new TypeError('The \"listener\" argument must be of type Function. Received type ' + typeof listener);\n }\n}\n\nObject.defineProperty(EventEmitter, 'defaultMaxListeners', {\n enumerable: true,\n get: function() {\n return defaultMaxListeners;\n },\n set: function(arg) {\n if (typeof arg !== 'number' || arg < 0 || NumberIsNaN(arg)) {\n throw new RangeError('The value of \"defaultMaxListeners\" is out of range. It must be a non-negative number. Received ' + arg + '.');\n }\n defaultMaxListeners = arg;\n }\n});\n\nEventEmitter.init = function() {\n\n if (this._events === undefined ||\n this._events === Object.getPrototypeOf(this)._events) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n }\n\n this._maxListeners = this._maxListeners || undefined;\n};\n\n// Obviously not all Emitters should be limited to 10. This function allows\n// that to be increased. Set to zero for unlimited.\nEventEmitter.prototype.setMaxListeners = function setMaxListeners(n) {\n if (typeof n !== 'number' || n < 0 || NumberIsNaN(n)) {\n throw new RangeError('The value of \"n\" is out of range. It must be a non-negative number. Received ' + n + '.');\n }\n this._maxListeners = n;\n return this;\n};\n\nfunction _getMaxListeners(that) {\n if (that._maxListeners === undefined)\n return EventEmitter.defaultMaxListeners;\n return that._maxListeners;\n}\n\nEventEmitter.prototype.getMaxListeners = function getMaxListeners() {\n return _getMaxListeners(this);\n};\n\nEventEmitter.prototype.emit = function emit(type) {\n var args = [];\n for (var i = 1; i < arguments.length; i++) args.push(arguments[i]);\n var doError = (type === 'error');\n\n var events = this._events;\n if (events !== undefined)\n doError = (doError && events.error === undefined);\n else if (!doError)\n return false;\n\n // If there is no 'error' event listener then throw.\n if (doError) {\n var er;\n if (args.length > 0)\n er = args[0];\n if (er instanceof Error) {\n // Note: The comments on the `throw` lines are intentional, they show\n // up in Node's output if this results in an unhandled exception.\n throw er; // Unhandled 'error' event\n }\n // At least give some kind of context to the user\n var err = new Error('Unhandled error.' + (er ? ' (' + er.message + ')' : ''));\n err.context = er;\n throw err; // Unhandled 'error' event\n }\n\n var handler = events[type];\n\n if (handler === undefined)\n return false;\n\n if (typeof handler === 'function') {\n ReflectApply(handler, this, args);\n } else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n ReflectApply(listeners[i], this, args);\n }\n\n return true;\n};\n\nfunction _addListener(target, type, listener, prepend) {\n var m;\n var events;\n var existing;\n\n checkListener(listener);\n\n events = target._events;\n if (events === undefined) {\n events = target._events = Object.create(null);\n target._eventsCount = 0;\n } else {\n // To avoid recursion in the case that type === \"newListener\"! Before\n // adding it to the listeners, first emit \"newListener\".\n if (events.newListener !== undefined) {\n target.emit('newListener', type,\n listener.listener ? listener.listener : listener);\n\n // Re-assign `events` because a newListener handler could have caused the\n // this._events to be assigned to a new object\n events = target._events;\n }\n existing = events[type];\n }\n\n if (existing === undefined) {\n // Optimize the case of one listener. Don't need the extra array object.\n existing = events[type] = listener;\n ++target._eventsCount;\n } else {\n if (typeof existing === 'function') {\n // Adding the second element, need to change to array.\n existing = events[type] =\n prepend ? [listener, existing] : [existing, listener];\n // If we've already got an array, just append.\n } else if (prepend) {\n existing.unshift(listener);\n } else {\n existing.push(listener);\n }\n\n // Check for listener leak\n m = _getMaxListeners(target);\n if (m > 0 && existing.length > m && !existing.warned) {\n existing.warned = true;\n // No error code for this since it is a Warning\n // eslint-disable-next-line no-restricted-syntax\n var w = new Error('Possible EventEmitter memory leak detected. ' +\n existing.length + ' ' + String(type) + ' listeners ' +\n 'added. Use emitter.setMaxListeners() to ' +\n 'increase limit');\n w.name = 'MaxListenersExceededWarning';\n w.emitter = target;\n w.type = type;\n w.count = existing.length;\n ProcessEmitWarning(w);\n }\n }\n\n return target;\n}\n\nEventEmitter.prototype.addListener = function addListener(type, listener) {\n return _addListener(this, type, listener, false);\n};\n\nEventEmitter.prototype.on = EventEmitter.prototype.addListener;\n\nEventEmitter.prototype.prependListener =\n function prependListener(type, listener) {\n return _addListener(this, type, listener, true);\n };\n\nfunction onceWrapper() {\n if (!this.fired) {\n this.target.removeListener(this.type, this.wrapFn);\n this.fired = true;\n if (arguments.length === 0)\n return this.listener.call(this.target);\n return this.listener.apply(this.target, arguments);\n }\n}\n\nfunction _onceWrap(target, type, listener) {\n var state = { fired: false, wrapFn: undefined, target: target, type: type, listener: listener };\n var wrapped = onceWrapper.bind(state);\n wrapped.listener = listener;\n state.wrapFn = wrapped;\n return wrapped;\n}\n\nEventEmitter.prototype.once = function once(type, listener) {\n checkListener(listener);\n this.on(type, _onceWrap(this, type, listener));\n return this;\n};\n\nEventEmitter.prototype.prependOnceListener =\n function prependOnceListener(type, listener) {\n checkListener(listener);\n this.prependListener(type, _onceWrap(this, type, listener));\n return this;\n };\n\n// Emits a 'removeListener' event if and only if the listener was removed.\nEventEmitter.prototype.removeListener =\n function removeListener(type, listener) {\n var list, events, position, i, originalListener;\n\n checkListener(listener);\n\n events = this._events;\n if (events === undefined)\n return this;\n\n list = events[type];\n if (list === undefined)\n return this;\n\n if (list === listener || list.listener === listener) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else {\n delete events[type];\n if (events.removeListener)\n this.emit('removeListener', type, list.listener || listener);\n }\n } else if (typeof list !== 'function') {\n position = -1;\n\n for (i = list.length - 1; i >= 0; i--) {\n if (list[i] === listener || list[i].listener === listener) {\n originalListener = list[i].listener;\n position = i;\n break;\n }\n }\n\n if (position < 0)\n return this;\n\n if (position === 0)\n list.shift();\n else {\n spliceOne(list, position);\n }\n\n if (list.length === 1)\n events[type] = list[0];\n\n if (events.removeListener !== undefined)\n this.emit('removeListener', type, originalListener || listener);\n }\n\n return this;\n };\n\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\n\nEventEmitter.prototype.removeAllListeners =\n function removeAllListeners(type) {\n var listeners, events, i;\n\n events = this._events;\n if (events === undefined)\n return this;\n\n // not listening for removeListener, no need to emit\n if (events.removeListener === undefined) {\n if (arguments.length === 0) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n } else if (events[type] !== undefined) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else\n delete events[type];\n }\n return this;\n }\n\n // emit removeListener for all listeners on all events\n if (arguments.length === 0) {\n var keys = Object.keys(events);\n var key;\n for (i = 0; i < keys.length; ++i) {\n key = keys[i];\n if (key === 'removeListener') continue;\n this.removeAllListeners(key);\n }\n this.removeAllListeners('removeListener');\n this._events = Object.create(null);\n this._eventsCount = 0;\n return this;\n }\n\n listeners = events[type];\n\n if (typeof listeners === 'function') {\n this.removeListener(type, listeners);\n } else if (listeners !== undefined) {\n // LIFO order\n for (i = listeners.length - 1; i >= 0; i--) {\n this.removeListener(type, listeners[i]);\n }\n }\n\n return this;\n };\n\nfunction _listeners(target, type, unwrap) {\n var events = target._events;\n\n if (events === undefined)\n return [];\n\n var evlistener = events[type];\n if (evlistener === undefined)\n return [];\n\n if (typeof evlistener === 'function')\n return unwrap ? [evlistener.listener || evlistener] : [evlistener];\n\n return unwrap ?\n unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length);\n}\n\nEventEmitter.prototype.listeners = function listeners(type) {\n return _listeners(this, type, true);\n};\n\nEventEmitter.prototype.rawListeners = function rawListeners(type) {\n return _listeners(this, type, false);\n};\n\nEventEmitter.listenerCount = function(emitter, type) {\n if (typeof emitter.listenerCount === 'function') {\n return emitter.listenerCount(type);\n } else {\n return listenerCount.call(emitter, type);\n }\n};\n\nEventEmitter.prototype.listenerCount = listenerCount;\nfunction listenerCount(type) {\n var events = this._events;\n\n if (events !== undefined) {\n var evlistener = events[type];\n\n if (typeof evlistener === 'function') {\n return 1;\n } else if (evlistener !== undefined) {\n return evlistener.length;\n }\n }\n\n return 0;\n}\n\nEventEmitter.prototype.eventNames = function eventNames() {\n return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : [];\n};\n\nfunction arrayClone(arr, n) {\n var copy = new Array(n);\n for (var i = 0; i < n; ++i)\n copy[i] = arr[i];\n return copy;\n}\n\nfunction spliceOne(list, index) {\n for (; index + 1 < list.length; index++)\n list[index] = list[index + 1];\n list.pop();\n}\n\nfunction unwrapListeners(arr) {\n var ret = new Array(arr.length);\n for (var i = 0; i < ret.length; ++i) {\n ret[i] = arr[i].listener || arr[i];\n }\n return ret;\n}\n\nfunction once(emitter, name) {\n return new Promise(function (resolve, reject) {\n function errorListener(err) {\n emitter.removeListener(name, resolver);\n reject(err);\n }\n\n function resolver() {\n if (typeof emitter.removeListener === 'function') {\n emitter.removeListener('error', errorListener);\n }\n resolve([].slice.call(arguments));\n };\n\n eventTargetAgnosticAddListener(emitter, name, resolver, { once: true });\n if (name !== 'error') {\n addErrorHandlerIfEventEmitter(emitter, errorListener, { once: true });\n }\n });\n}\n\nfunction addErrorHandlerIfEventEmitter(emitter, handler, flags) {\n if (typeof emitter.on === 'function') {\n eventTargetAgnosticAddListener(emitter, 'error', handler, flags);\n }\n}\n\nfunction eventTargetAgnosticAddListener(emitter, name, listener, flags) {\n if (typeof emitter.on === 'function') {\n if (flags.once) {\n emitter.once(name, listener);\n } else {\n emitter.on(name, listener);\n }\n } else if (typeof emitter.addEventListener === 'function') {\n // EventTarget does not have `error` event semantics like Node\n // EventEmitters, we do not listen for `error` events here.\n emitter.addEventListener(name, function wrapListener(arg) {\n // IE does not have builtin `{ once: true }` support so we\n // have to do it manually.\n if (flags.once) {\n emitter.removeEventListener(name, wrapListener);\n }\n listener(arg);\n });\n } else {\n throw new TypeError('The \"emitter\" argument must be of type EventEmitter. Received type ' + typeof emitter);\n }\n}\n","/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */\nexports.read = function (buffer, offset, isLE, mLen, nBytes) {\n var e, m\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var nBits = -7\n var i = isLE ? (nBytes - 1) : 0\n var d = isLE ? -1 : 1\n var s = buffer[offset + i]\n\n i += d\n\n e = s & ((1 << (-nBits)) - 1)\n s >>= (-nBits)\n nBits += eLen\n for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & ((1 << (-nBits)) - 1)\n e >>= (-nBits)\n nBits += mLen\n for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias\n } else if (e === eMax) {\n return m ? NaN : ((s ? -1 : 1) * Infinity)\n } else {\n m = m + Math.pow(2, mLen)\n e = e - eBias\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n var i = isLE ? 0 : (nBytes - 1)\n var d = isLE ? 1 : -1\n var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n value = Math.abs(value)\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0\n e = eMax\n } else {\n e = Math.floor(Math.log(value) / Math.LN2)\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--\n c *= 2\n }\n if (e + eBias >= 1) {\n value += rt / c\n } else {\n value += rt * Math.pow(2, 1 - eBias)\n }\n if (value * c >= 2) {\n e++\n c /= 2\n }\n\n if (e + eBias >= eMax) {\n m = 0\n e = eMax\n } else if (e + eBias >= 1) {\n m = ((value * c) - 1) * Math.pow(2, mLen)\n e = e + eBias\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n e = 0\n }\n }\n\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n e = (e << mLen) | m\n eLen += mLen\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128\n}\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView');\n\nmodule.exports = DataView;\n","var hashClear = require('./_hashClear'),\n hashDelete = require('./_hashDelete'),\n hashGet = require('./_hashGet'),\n hashHas = require('./_hashHas'),\n hashSet = require('./_hashSet');\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\nmodule.exports = Hash;\n","var listCacheClear = require('./_listCacheClear'),\n listCacheDelete = require('./_listCacheDelete'),\n listCacheGet = require('./_listCacheGet'),\n listCacheHas = require('./_listCacheHas'),\n listCacheSet = require('./_listCacheSet');\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\nmodule.exports = ListCache;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map');\n\nmodule.exports = Map;\n","var mapCacheClear = require('./_mapCacheClear'),\n mapCacheDelete = require('./_mapCacheDelete'),\n mapCacheGet = require('./_mapCacheGet'),\n mapCacheHas = require('./_mapCacheHas'),\n mapCacheSet = require('./_mapCacheSet');\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\nmodule.exports = MapCache;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Promise = getNative(root, 'Promise');\n\nmodule.exports = Promise;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Set = getNative(root, 'Set');\n\nmodule.exports = Set;\n","var MapCache = require('./_MapCache'),\n setCacheAdd = require('./_setCacheAdd'),\n setCacheHas = require('./_setCacheHas');\n\n/**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\nfunction SetCache(values) {\n var index = -1,\n length = values == null ? 0 : values.length;\n\n this.__data__ = new MapCache;\n while (++index < length) {\n this.add(values[index]);\n }\n}\n\n// Add methods to `SetCache`.\nSetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\nSetCache.prototype.has = setCacheHas;\n\nmodule.exports = SetCache;\n","var ListCache = require('./_ListCache'),\n stackClear = require('./_stackClear'),\n stackDelete = require('./_stackDelete'),\n stackGet = require('./_stackGet'),\n stackHas = require('./_stackHas'),\n stackSet = require('./_stackSet');\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\nmodule.exports = Stack;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Uint8Array = root.Uint8Array;\n\nmodule.exports = Uint8Array;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar WeakMap = getNative(root, 'WeakMap');\n\nmodule.exports = WeakMap;\n","/**\n * A specialized version of `_.forEach` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\nfunction arrayEach(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (iteratee(array[index], index, array) === false) {\n break;\n }\n }\n return array;\n}\n\nmodule.exports = arrayEach;\n","/**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\nfunction arrayFilter(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result[resIndex++] = value;\n }\n }\n return result;\n}\n\nmodule.exports = arrayFilter;\n","var baseTimes = require('./_baseTimes'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isIndex = require('./_isIndex'),\n isTypedArray = require('./isTypedArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = arrayLikeKeys;\n","/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n}\n\nmodule.exports = arrayPush;\n","/**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\nfunction arraySome(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (predicate(array[index], index, array)) {\n return true;\n }\n }\n return false;\n}\n\nmodule.exports = arraySome;\n","var baseAssignValue = require('./_baseAssignValue'),\n eq = require('./eq');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\nmodule.exports = assignValue;\n","var eq = require('./eq');\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\nmodule.exports = assocIndexOf;\n","var copyObject = require('./_copyObject'),\n keys = require('./keys');\n\n/**\n * The base implementation of `_.assign` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssign(object, source) {\n return object && copyObject(source, keys(source), object);\n}\n\nmodule.exports = baseAssign;\n","var copyObject = require('./_copyObject'),\n keysIn = require('./keysIn');\n\n/**\n * The base implementation of `_.assignIn` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssignIn(object, source) {\n return object && copyObject(source, keysIn(source), object);\n}\n\nmodule.exports = baseAssignIn;\n","var defineProperty = require('./_defineProperty');\n\n/**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction baseAssignValue(object, key, value) {\n if (key == '__proto__' && defineProperty) {\n defineProperty(object, key, {\n 'configurable': true,\n 'enumerable': true,\n 'value': value,\n 'writable': true\n });\n } else {\n object[key] = value;\n }\n}\n\nmodule.exports = baseAssignValue;\n","var Stack = require('./_Stack'),\n arrayEach = require('./_arrayEach'),\n assignValue = require('./_assignValue'),\n baseAssign = require('./_baseAssign'),\n baseAssignIn = require('./_baseAssignIn'),\n cloneBuffer = require('./_cloneBuffer'),\n copyArray = require('./_copyArray'),\n copySymbols = require('./_copySymbols'),\n copySymbolsIn = require('./_copySymbolsIn'),\n getAllKeys = require('./_getAllKeys'),\n getAllKeysIn = require('./_getAllKeysIn'),\n getTag = require('./_getTag'),\n initCloneArray = require('./_initCloneArray'),\n initCloneByTag = require('./_initCloneByTag'),\n initCloneObject = require('./_initCloneObject'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isMap = require('./isMap'),\n isObject = require('./isObject'),\n isSet = require('./isSet'),\n keys = require('./keys'),\n keysIn = require('./keysIn');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_FLAT_FLAG = 2,\n CLONE_SYMBOLS_FLAG = 4;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values supported by `_.clone`. */\nvar cloneableTags = {};\ncloneableTags[argsTag] = cloneableTags[arrayTag] =\ncloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =\ncloneableTags[boolTag] = cloneableTags[dateTag] =\ncloneableTags[float32Tag] = cloneableTags[float64Tag] =\ncloneableTags[int8Tag] = cloneableTags[int16Tag] =\ncloneableTags[int32Tag] = cloneableTags[mapTag] =\ncloneableTags[numberTag] = cloneableTags[objectTag] =\ncloneableTags[regexpTag] = cloneableTags[setTag] =\ncloneableTags[stringTag] = cloneableTags[symbolTag] =\ncloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =\ncloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;\ncloneableTags[errorTag] = cloneableTags[funcTag] =\ncloneableTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.clone` and `_.cloneDeep` which tracks\n * traversed objects.\n *\n * @private\n * @param {*} value The value to clone.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Deep clone\n * 2 - Flatten inherited properties\n * 4 - Clone symbols\n * @param {Function} [customizer] The function to customize cloning.\n * @param {string} [key] The key of `value`.\n * @param {Object} [object] The parent object of `value`.\n * @param {Object} [stack] Tracks traversed objects and their clone counterparts.\n * @returns {*} Returns the cloned value.\n */\nfunction baseClone(value, bitmask, customizer, key, object, stack) {\n var result,\n isDeep = bitmask & CLONE_DEEP_FLAG,\n isFlat = bitmask & CLONE_FLAT_FLAG,\n isFull = bitmask & CLONE_SYMBOLS_FLAG;\n\n if (customizer) {\n result = object ? customizer(value, key, object, stack) : customizer(value);\n }\n if (result !== undefined) {\n return result;\n }\n if (!isObject(value)) {\n return value;\n }\n var isArr = isArray(value);\n if (isArr) {\n result = initCloneArray(value);\n if (!isDeep) {\n return copyArray(value, result);\n }\n } else {\n var tag = getTag(value),\n isFunc = tag == funcTag || tag == genTag;\n\n if (isBuffer(value)) {\n return cloneBuffer(value, isDeep);\n }\n if (tag == objectTag || tag == argsTag || (isFunc && !object)) {\n result = (isFlat || isFunc) ? {} : initCloneObject(value);\n if (!isDeep) {\n return isFlat\n ? copySymbolsIn(value, baseAssignIn(result, value))\n : copySymbols(value, baseAssign(result, value));\n }\n } else {\n if (!cloneableTags[tag]) {\n return object ? value : {};\n }\n result = initCloneByTag(value, tag, isDeep);\n }\n }\n // Check for circular references and return its corresponding clone.\n stack || (stack = new Stack);\n var stacked = stack.get(value);\n if (stacked) {\n return stacked;\n }\n stack.set(value, result);\n\n if (isSet(value)) {\n value.forEach(function(subValue) {\n result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));\n });\n } else if (isMap(value)) {\n value.forEach(function(subValue, key) {\n result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n }\n\n var keysFunc = isFull\n ? (isFlat ? getAllKeysIn : getAllKeys)\n : (isFlat ? keysIn : keys);\n\n var props = isArr ? undefined : keysFunc(value);\n arrayEach(props || value, function(subValue, key) {\n if (props) {\n key = subValue;\n subValue = value[key];\n }\n // Recursively populate clone (susceptible to call stack limits).\n assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n return result;\n}\n\nmodule.exports = baseClone;\n","var isObject = require('./isObject');\n\n/** Built-in value references. */\nvar objectCreate = Object.create;\n\n/**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} proto The object to inherit from.\n * @returns {Object} Returns the new object.\n */\nvar baseCreate = (function() {\n function object() {}\n return function(proto) {\n if (!isObject(proto)) {\n return {};\n }\n if (objectCreate) {\n return objectCreate(proto);\n }\n object.prototype = proto;\n var result = new object;\n object.prototype = undefined;\n return result;\n };\n}());\n\nmodule.exports = baseCreate;\n","var arrayPush = require('./_arrayPush'),\n isArray = require('./isArray');\n\n/**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction baseGetAllKeys(object, keysFunc, symbolsFunc) {\n var result = keysFunc(object);\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n}\n\nmodule.exports = baseGetAllKeys;\n","var Symbol = require('./_Symbol'),\n getRawTag = require('./_getRawTag'),\n objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]';\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\nmodule.exports = baseIsArguments;\n","var baseIsEqualDeep = require('./_baseIsEqualDeep'),\n isObjectLike = require('./isObjectLike');\n\n/**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Unordered comparison\n * 2 - Partial comparison\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\nfunction baseIsEqual(value, other, bitmask, customizer, stack) {\n if (value === other) {\n return true;\n }\n if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\n return value !== value && other !== other;\n }\n return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n}\n\nmodule.exports = baseIsEqual;\n","var Stack = require('./_Stack'),\n equalArrays = require('./_equalArrays'),\n equalByTag = require('./_equalByTag'),\n equalObjects = require('./_equalObjects'),\n getTag = require('./_getTag'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isTypedArray = require('./isTypedArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n var objIsArr = isArray(object),\n othIsArr = isArray(other),\n objTag = objIsArr ? arrayTag : getTag(object),\n othTag = othIsArr ? arrayTag : getTag(other);\n\n objTag = objTag == argsTag ? objectTag : objTag;\n othTag = othTag == argsTag ? objectTag : othTag;\n\n var objIsObj = objTag == objectTag,\n othIsObj = othTag == objectTag,\n isSameTag = objTag == othTag;\n\n if (isSameTag && isBuffer(object)) {\n if (!isBuffer(other)) {\n return false;\n }\n objIsArr = true;\n objIsObj = false;\n }\n if (isSameTag && !objIsObj) {\n stack || (stack = new Stack);\n return (objIsArr || isTypedArray(object))\n ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n }\n if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n if (objIsWrapped || othIsWrapped) {\n var objUnwrapped = objIsWrapped ? object.value() : object,\n othUnwrapped = othIsWrapped ? other.value() : other;\n\n stack || (stack = new Stack);\n return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n }\n }\n if (!isSameTag) {\n return false;\n }\n stack || (stack = new Stack);\n return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n}\n\nmodule.exports = baseIsEqualDeep;\n","var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]';\n\n/**\n * The base implementation of `_.isMap` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n */\nfunction baseIsMap(value) {\n return isObjectLike(value) && getTag(value) == mapTag;\n}\n\nmodule.exports = baseIsMap;\n","var isFunction = require('./isFunction'),\n isMasked = require('./_isMasked'),\n isObject = require('./isObject'),\n toSource = require('./_toSource');\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\nmodule.exports = baseIsNative;\n","var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar setTag = '[object Set]';\n\n/**\n * The base implementation of `_.isSet` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n */\nfunction baseIsSet(value) {\n return isObjectLike(value) && getTag(value) == setTag;\n}\n\nmodule.exports = baseIsSet;\n","var baseGetTag = require('./_baseGetTag'),\n isLength = require('./isLength'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n\nmodule.exports = baseIsTypedArray;\n","var isPrototype = require('./_isPrototype'),\n nativeKeys = require('./_nativeKeys');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeys;\n","var isObject = require('./isObject'),\n isPrototype = require('./_isPrototype'),\n nativeKeysIn = require('./_nativeKeysIn');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeysIn(object) {\n if (!isObject(object)) {\n return nativeKeysIn(object);\n }\n var isProto = isPrototype(object),\n result = [];\n\n for (var key in object) {\n if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeysIn;\n","/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\nmodule.exports = baseTimes;\n","/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n return function(value) {\n return func(value);\n };\n}\n\nmodule.exports = baseUnary;\n","/**\n * Checks if a `cache` value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction cacheHas(cache, key) {\n return cache.has(key);\n}\n\nmodule.exports = cacheHas;\n","var Uint8Array = require('./_Uint8Array');\n\n/**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\nfunction cloneArrayBuffer(arrayBuffer) {\n var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n return result;\n}\n\nmodule.exports = cloneArrayBuffer;\n","var root = require('./_root');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined,\n allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;\n\n/**\n * Creates a clone of `buffer`.\n *\n * @private\n * @param {Buffer} buffer The buffer to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Buffer} Returns the cloned buffer.\n */\nfunction cloneBuffer(buffer, isDeep) {\n if (isDeep) {\n return buffer.slice();\n }\n var length = buffer.length,\n result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\n\n buffer.copy(result);\n return result;\n}\n\nmodule.exports = cloneBuffer;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer');\n\n/**\n * Creates a clone of `dataView`.\n *\n * @private\n * @param {Object} dataView The data view to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned data view.\n */\nfunction cloneDataView(dataView, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;\n return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);\n}\n\nmodule.exports = cloneDataView;\n","/** Used to match `RegExp` flags from their coerced string values. */\nvar reFlags = /\\w*$/;\n\n/**\n * Creates a clone of `regexp`.\n *\n * @private\n * @param {Object} regexp The regexp to clone.\n * @returns {Object} Returns the cloned regexp.\n */\nfunction cloneRegExp(regexp) {\n var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));\n result.lastIndex = regexp.lastIndex;\n return result;\n}\n\nmodule.exports = cloneRegExp;\n","var Symbol = require('./_Symbol');\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * Creates a clone of the `symbol` object.\n *\n * @private\n * @param {Object} symbol The symbol object to clone.\n * @returns {Object} Returns the cloned symbol object.\n */\nfunction cloneSymbol(symbol) {\n return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};\n}\n\nmodule.exports = cloneSymbol;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer');\n\n/**\n * Creates a clone of `typedArray`.\n *\n * @private\n * @param {Object} typedArray The typed array to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned typed array.\n */\nfunction cloneTypedArray(typedArray, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n}\n\nmodule.exports = cloneTypedArray;\n","/**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\nfunction copyArray(source, array) {\n var index = -1,\n length = source.length;\n\n array || (array = Array(length));\n while (++index < length) {\n array[index] = source[index];\n }\n return array;\n}\n\nmodule.exports = copyArray;\n","var assignValue = require('./_assignValue'),\n baseAssignValue = require('./_baseAssignValue');\n\n/**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\nfunction copyObject(source, props, object, customizer) {\n var isNew = !object;\n object || (object = {});\n\n var index = -1,\n length = props.length;\n\n while (++index < length) {\n var key = props[index];\n\n var newValue = customizer\n ? customizer(object[key], source[key], key, object, source)\n : undefined;\n\n if (newValue === undefined) {\n newValue = source[key];\n }\n if (isNew) {\n baseAssignValue(object, key, newValue);\n } else {\n assignValue(object, key, newValue);\n }\n }\n return object;\n}\n\nmodule.exports = copyObject;\n","var copyObject = require('./_copyObject'),\n getSymbols = require('./_getSymbols');\n\n/**\n * Copies own symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbols(source, object) {\n return copyObject(source, getSymbols(source), object);\n}\n\nmodule.exports = copySymbols;\n","var copyObject = require('./_copyObject'),\n getSymbolsIn = require('./_getSymbolsIn');\n\n/**\n * Copies own and inherited symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbolsIn(source, object) {\n return copyObject(source, getSymbolsIn(source), object);\n}\n\nmodule.exports = copySymbolsIn;\n","var root = require('./_root');\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\nmodule.exports = coreJsData;\n","var getNative = require('./_getNative');\n\nvar defineProperty = (function() {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n}());\n\nmodule.exports = defineProperty;\n","var SetCache = require('./_SetCache'),\n arraySome = require('./_arraySome'),\n cacheHas = require('./_cacheHas');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\nfunction equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n arrLength = array.length,\n othLength = other.length;\n\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n return false;\n }\n // Check that cyclic values are equal.\n var arrStacked = stack.get(array);\n var othStacked = stack.get(other);\n if (arrStacked && othStacked) {\n return arrStacked == other && othStacked == array;\n }\n var index = -1,\n result = true,\n seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n stack.set(array, other);\n stack.set(other, array);\n\n // Ignore non-index properties.\n while (++index < arrLength) {\n var arrValue = array[index],\n othValue = other[index];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, arrValue, index, other, array, stack)\n : customizer(arrValue, othValue, index, array, other, stack);\n }\n if (compared !== undefined) {\n if (compared) {\n continue;\n }\n result = false;\n break;\n }\n // Recursively compare arrays (susceptible to call stack limits).\n if (seen) {\n if (!arraySome(other, function(othValue, othIndex) {\n if (!cacheHas(seen, othIndex) &&\n (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n return seen.push(othIndex);\n }\n })) {\n result = false;\n break;\n }\n } else if (!(\n arrValue === othValue ||\n equalFunc(arrValue, othValue, bitmask, customizer, stack)\n )) {\n result = false;\n break;\n }\n }\n stack['delete'](array);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalArrays;\n","var Symbol = require('./_Symbol'),\n Uint8Array = require('./_Uint8Array'),\n eq = require('./eq'),\n equalArrays = require('./_equalArrays'),\n mapToArray = require('./_mapToArray'),\n setToArray = require('./_setToArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]';\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n switch (tag) {\n case dataViewTag:\n if ((object.byteLength != other.byteLength) ||\n (object.byteOffset != other.byteOffset)) {\n return false;\n }\n object = object.buffer;\n other = other.buffer;\n\n case arrayBufferTag:\n if ((object.byteLength != other.byteLength) ||\n !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n return false;\n }\n return true;\n\n case boolTag:\n case dateTag:\n case numberTag:\n // Coerce booleans to `1` or `0` and dates to milliseconds.\n // Invalid dates are coerced to `NaN`.\n return eq(+object, +other);\n\n case errorTag:\n return object.name == other.name && object.message == other.message;\n\n case regexpTag:\n case stringTag:\n // Coerce regexes to strings and treat strings, primitives and objects,\n // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n // for more details.\n return object == (other + '');\n\n case mapTag:\n var convert = mapToArray;\n\n case setTag:\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n convert || (convert = setToArray);\n\n if (object.size != other.size && !isPartial) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked) {\n return stacked == other;\n }\n bitmask |= COMPARE_UNORDERED_FLAG;\n\n // Recursively compare objects (susceptible to call stack limits).\n stack.set(object, other);\n var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n stack['delete'](object);\n return result;\n\n case symbolTag:\n if (symbolValueOf) {\n return symbolValueOf.call(object) == symbolValueOf.call(other);\n }\n }\n return false;\n}\n\nmodule.exports = equalByTag;\n","var getAllKeys = require('./_getAllKeys');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n objProps = getAllKeys(object),\n objLength = objProps.length,\n othProps = getAllKeys(other),\n othLength = othProps.length;\n\n if (objLength != othLength && !isPartial) {\n return false;\n }\n var index = objLength;\n while (index--) {\n var key = objProps[index];\n if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n return false;\n }\n }\n // Check that cyclic values are equal.\n var objStacked = stack.get(object);\n var othStacked = stack.get(other);\n if (objStacked && othStacked) {\n return objStacked == other && othStacked == object;\n }\n var result = true;\n stack.set(object, other);\n stack.set(other, object);\n\n var skipCtor = isPartial;\n while (++index < objLength) {\n key = objProps[index];\n var objValue = object[key],\n othValue = other[key];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, objValue, key, other, object, stack)\n : customizer(objValue, othValue, key, object, other, stack);\n }\n // Recursively compare objects (susceptible to call stack limits).\n if (!(compared === undefined\n ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n : compared\n )) {\n result = false;\n break;\n }\n skipCtor || (skipCtor = key == 'constructor');\n }\n if (result && !skipCtor) {\n var objCtor = object.constructor,\n othCtor = other.constructor;\n\n // Non `Object` object instances with different constructors are not equal.\n if (objCtor != othCtor &&\n ('constructor' in object && 'constructor' in other) &&\n !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n result = false;\n }\n }\n stack['delete'](object);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalObjects;\n","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n","var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbols = require('./_getSymbols'),\n keys = require('./keys');\n\n/**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeys(object) {\n return baseGetAllKeys(object, keys, getSymbols);\n}\n\nmodule.exports = getAllKeys;\n","var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbolsIn = require('./_getSymbolsIn'),\n keysIn = require('./keysIn');\n\n/**\n * Creates an array of own and inherited enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeysIn(object) {\n return baseGetAllKeys(object, keysIn, getSymbolsIn);\n}\n\nmodule.exports = getAllKeysIn;\n","var isKeyable = require('./_isKeyable');\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\nmodule.exports = getMapData;\n","var baseIsNative = require('./_baseIsNative'),\n getValue = require('./_getValue');\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\nmodule.exports = getNative;\n","var overArg = require('./_overArg');\n\n/** Built-in value references. */\nvar getPrototype = overArg(Object.getPrototypeOf, Object);\n\nmodule.exports = getPrototype;\n","var Symbol = require('./_Symbol');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nmodule.exports = getRawTag;\n","var arrayFilter = require('./_arrayFilter'),\n stubArray = require('./stubArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n if (object == null) {\n return [];\n }\n object = Object(object);\n return arrayFilter(nativeGetSymbols(object), function(symbol) {\n return propertyIsEnumerable.call(object, symbol);\n });\n};\n\nmodule.exports = getSymbols;\n","var arrayPush = require('./_arrayPush'),\n getPrototype = require('./_getPrototype'),\n getSymbols = require('./_getSymbols'),\n stubArray = require('./stubArray');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own and inherited enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {\n var result = [];\n while (object) {\n arrayPush(result, getSymbols(object));\n object = getPrototype(object);\n }\n return result;\n};\n\nmodule.exports = getSymbolsIn;\n","var DataView = require('./_DataView'),\n Map = require('./_Map'),\n Promise = require('./_Promise'),\n Set = require('./_Set'),\n WeakMap = require('./_WeakMap'),\n baseGetTag = require('./_baseGetTag'),\n toSource = require('./_toSource');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n setTag = '[object Set]',\n weakMapTag = '[object WeakMap]';\n\nvar dataViewTag = '[object DataView]';\n\n/** Used to detect maps, sets, and weakmaps. */\nvar dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nvar getTag = baseGetTag;\n\n// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\nif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = baseGetTag(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : '';\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n}\n\nmodule.exports = getTag;\n","/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\nmodule.exports = getValue;\n","var nativeCreate = require('./_nativeCreate');\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n}\n\nmodule.exports = hashClear;\n","/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = hashDelete;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\nmodule.exports = hashGet;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\nmodule.exports = hashHas;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\nmodule.exports = hashSet;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Initializes an array clone.\n *\n * @private\n * @param {Array} array The array to clone.\n * @returns {Array} Returns the initialized clone.\n */\nfunction initCloneArray(array) {\n var length = array.length,\n result = new array.constructor(length);\n\n // Add properties assigned by `RegExp#exec`.\n if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {\n result.index = array.index;\n result.input = array.input;\n }\n return result;\n}\n\nmodule.exports = initCloneArray;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer'),\n cloneDataView = require('./_cloneDataView'),\n cloneRegExp = require('./_cloneRegExp'),\n cloneSymbol = require('./_cloneSymbol'),\n cloneTypedArray = require('./_cloneTypedArray');\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/**\n * Initializes an object clone based on its `toStringTag`.\n *\n * **Note:** This function only supports cloning values with tags of\n * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.\n *\n * @private\n * @param {Object} object The object to clone.\n * @param {string} tag The `toStringTag` of the object to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneByTag(object, tag, isDeep) {\n var Ctor = object.constructor;\n switch (tag) {\n case arrayBufferTag:\n return cloneArrayBuffer(object);\n\n case boolTag:\n case dateTag:\n return new Ctor(+object);\n\n case dataViewTag:\n return cloneDataView(object, isDeep);\n\n case float32Tag: case float64Tag:\n case int8Tag: case int16Tag: case int32Tag:\n case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:\n return cloneTypedArray(object, isDeep);\n\n case mapTag:\n return new Ctor;\n\n case numberTag:\n case stringTag:\n return new Ctor(object);\n\n case regexpTag:\n return cloneRegExp(object);\n\n case setTag:\n return new Ctor;\n\n case symbolTag:\n return cloneSymbol(object);\n }\n}\n\nmodule.exports = initCloneByTag;\n","var baseCreate = require('./_baseCreate'),\n getPrototype = require('./_getPrototype'),\n isPrototype = require('./_isPrototype');\n\n/**\n * Initializes an object clone.\n *\n * @private\n * @param {Object} object The object to clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneObject(object) {\n return (typeof object.constructor == 'function' && !isPrototype(object))\n ? baseCreate(getPrototype(object))\n : {};\n}\n\nmodule.exports = initCloneObject;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n var type = typeof value;\n length = length == null ? MAX_SAFE_INTEGER : length;\n\n return !!length &&\n (type == 'number' ||\n (type != 'symbol' && reIsUint.test(value))) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\nmodule.exports = isIndex;\n","/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\nmodule.exports = isKeyable;\n","var coreJsData = require('./_coreJsData');\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\nmodule.exports = isMasked;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\nmodule.exports = isPrototype;\n","/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n}\n\nmodule.exports = listCacheClear;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype;\n\n/** Built-in value references. */\nvar splice = arrayProto.splice;\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n}\n\nmodule.exports = listCacheDelete;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\nmodule.exports = listCacheGet;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\nmodule.exports = listCacheHas;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\nmodule.exports = listCacheSet;\n","var Hash = require('./_Hash'),\n ListCache = require('./_ListCache'),\n Map = require('./_Map');\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\nmodule.exports = mapCacheClear;\n","var getMapData = require('./_getMapData');\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = mapCacheDelete;\n","var getMapData = require('./_getMapData');\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\nmodule.exports = mapCacheGet;\n","var getMapData = require('./_getMapData');\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\nmodule.exports = mapCacheHas;\n","var getMapData = require('./_getMapData');\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n}\n\nmodule.exports = mapCacheSet;\n","/**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\nfunction mapToArray(map) {\n var index = -1,\n result = Array(map.size);\n\n map.forEach(function(value, key) {\n result[++index] = [key, value];\n });\n return result;\n}\n\nmodule.exports = mapToArray;\n","var getNative = require('./_getNative');\n\n/* Built-in method references that are verified to be native. */\nvar nativeCreate = getNative(Object, 'create');\n\nmodule.exports = nativeCreate;\n","var overArg = require('./_overArg');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeKeys = overArg(Object.keys, Object);\n\nmodule.exports = nativeKeys;\n","/**\n * This function is like\n * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * except that it includes inherited enumerable properties.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction nativeKeysIn(object) {\n var result = [];\n if (object != null) {\n for (var key in Object(object)) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = nativeKeysIn;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n try {\n // Use `util.types` for Node.js 10+.\n var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n if (types) {\n return types;\n }\n\n // Legacy `process.binding('util')` for Node.js < 10.\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n}());\n\nmodule.exports = nodeUtil;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n","/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\nmodule.exports = overArg;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n","/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\nfunction setCacheAdd(value) {\n this.__data__.set(value, HASH_UNDEFINED);\n return this;\n}\n\nmodule.exports = setCacheAdd;\n","/**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\nfunction setCacheHas(value) {\n return this.__data__.has(value);\n}\n\nmodule.exports = setCacheHas;\n","/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\nfunction setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n}\n\nmodule.exports = setToArray;\n","var ListCache = require('./_ListCache');\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}\n\nmodule.exports = stackClear;\n","/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n var data = this.__data__,\n result = data['delete'](key);\n\n this.size = data.size;\n return result;\n}\n\nmodule.exports = stackDelete;\n","/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n return this.__data__.get(key);\n}\n\nmodule.exports = stackGet;\n","/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n return this.__data__.has(key);\n}\n\nmodule.exports = stackHas;\n","var ListCache = require('./_ListCache'),\n Map = require('./_Map'),\n MapCache = require('./_MapCache');\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n var data = this.__data__;\n if (data instanceof ListCache) {\n var pairs = data.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n this.size = ++data.size;\n return this;\n }\n data = this.__data__ = new MapCache(pairs);\n }\n data.set(key, value);\n this.size = data.size;\n return this;\n}\n\nmodule.exports = stackSet;\n","/** Used for built-in method references. */\nvar funcProto = Function.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\nmodule.exports = toSource;\n","var baseClone = require('./_baseClone');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_SYMBOLS_FLAG = 4;\n\n/**\n * This method is like `_.clone` except that it recursively clones `value`.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Lang\n * @param {*} value The value to recursively clone.\n * @returns {*} Returns the deep cloned value.\n * @see _.clone\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var deep = _.cloneDeep(objects);\n * console.log(deep[0] === objects[0]);\n * // => false\n */\nfunction cloneDeep(value) {\n return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);\n}\n\nmodule.exports = cloneDeep;\n","/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\nmodule.exports = eq;\n","var baseIsArguments = require('./_baseIsArguments'),\n isObjectLike = require('./isObjectLike');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n};\n\nmodule.exports = isArguments;\n","/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\nmodule.exports = isArray;\n","var isFunction = require('./isFunction'),\n isLength = require('./isLength');\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\nmodule.exports = isArrayLike;\n","var root = require('./_root'),\n stubFalse = require('./stubFalse');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\nmodule.exports = isBuffer;\n","var baseIsEqual = require('./_baseIsEqual');\n\n/**\n * Performs a deep comparison between two values to determine if they are\n * equivalent.\n *\n * **Note:** This method supports comparing arrays, array buffers, booleans,\n * date objects, error objects, maps, numbers, `Object` objects, regexes,\n * sets, strings, symbols, and typed arrays. `Object` objects are compared\n * by their own, not inherited, enumerable properties. Functions and DOM\n * nodes are compared by strict equality, i.e. `===`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.isEqual(object, other);\n * // => true\n *\n * object === other;\n * // => false\n */\nfunction isEqual(value, other) {\n return baseIsEqual(value, other);\n}\n\nmodule.exports = isEqual;\n","var baseGetTag = require('./_baseGetTag'),\n isObject = require('./isObject');\n\n/** `Object#toString` result references. */\nvar asyncTag = '[object AsyncFunction]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n proxyTag = '[object Proxy]';\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\nmodule.exports = isFunction;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\nmodule.exports = isLength;\n","var baseIsMap = require('./_baseIsMap'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsMap = nodeUtil && nodeUtil.isMap;\n\n/**\n * Checks if `value` is classified as a `Map` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n * @example\n *\n * _.isMap(new Map);\n * // => true\n *\n * _.isMap(new WeakMap);\n * // => false\n */\nvar isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;\n\nmodule.exports = isMap;\n","/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n","var baseIsSet = require('./_baseIsSet'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsSet = nodeUtil && nodeUtil.isSet;\n\n/**\n * Checks if `value` is classified as a `Set` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n * @example\n *\n * _.isSet(new Set);\n * // => true\n *\n * _.isSet(new WeakSet);\n * // => false\n */\nvar isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;\n\nmodule.exports = isSet;\n","var baseIsTypedArray = require('./_baseIsTypedArray'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\nmodule.exports = isTypedArray;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeys = require('./_baseKeys'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\nmodule.exports = keys;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeysIn = require('./_baseKeysIn'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\nfunction keysIn(object) {\n return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n}\n\nmodule.exports = keysIn;\n","/**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\nfunction stubArray() {\n return [];\n}\n\nmodule.exports = stubArray;\n","/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n return false;\n}\n\nmodule.exports = stubFalse;\n","import { connect, type BaseConnectionOptions } from \"@openfin/core-web\";\nimport { getSettings } from \"../platform/settings/settings\";\n\n/**\n * Initializes the OpenFin Web Broker connection.\n * @param inherit Should we inherit settings from the host (available in the OpenFin layout system) or use settings? Default is true.\n */\nexport async function init(inherit: boolean = true): Promise {\n\t// Set window.fin to the `fin` object.\n\tlet options: BaseConnectionOptions | undefined;\n\tif (window.fin === undefined) {\n\t\tif (!inherit) {\n\t\t\tconst settings = await getSettings();\n\t\t\tif (settings === undefined) {\n\t\t\t\tconsole.error(\n\t\t\t\t\t\"Unable to run the sample as we have been unable to load the web manifest and it's settings from the currently running html page. Please ensure that the web manifest is being served and that it contains the custom_settings section.\"\n\t\t\t\t);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\toptions = {\n\t\t\t\tbrokerUrl: settings.platform.interop.brokerUrl,\n\t\t\t\tinteropConfig: {\n\t\t\t\t\tproviderId: settings.platform.interop.providerId,\n\t\t\t\t\tcurrentContextGroup: settings.platform.interop.defaultContextGroup\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t\t// Specify an interopConfig with a specific provider ID and a context group to initialize the `fin.me.interop` client on connection.\n\t\tif (options) {\n\t\t\twindow.fin = await connect({\n\t\t\t\toptions\n\t\t\t});\n\t\t} else {\n\t\t\twindow.fin = await connect({\n\t\t\t\tconnectionInheritance: \"enabled\"\n\t\t\t});\n\t\t}\n\t\tconsole.log(\"Finished initializing the fin API.\");\n\t\t// Create and dispatch the finReady event\n\t\tconst event = new CustomEvent(\"finReady\");\n\t\twindow.dispatchEvent(event);\n\t}\n\n\tif (window.fdc3 === undefined && window?.fin?.me.interop?.getFDC3Sync !== undefined) {\n\t\twindow.fdc3 = fin.me.interop.getFDC3Sync(\"2.0\");\n\t\tconsole.log(\"Finished initializing the fdc3 API.\");\n\t\t// Create and dispatch the FDC3Ready event\n\t\tconst event = new CustomEvent(\"fdc3Ready\");\n\t\twindow.dispatchEvent(event);\n\t}\n}\n","import type { OpenFin } from \"@openfin/core\";\nimport type { ManifestSettings, Settings } from \"../../shapes/setting-shapes\";\n\n/**\n * Fetches the settings for the application.\n * @returns The settings for the application.\n */\nexport async function getSettings(): Promise {\n\tconst savedSettings = await getSavedSettings();\n\tif (savedSettings) {\n\t\treturn savedSettings;\n\t}\n\tconst settings = await getManifestSettings();\n\tif (!Array.isArray(settings?.endpointProvider?.endpoints)) {\n\t\tconsole.error(\n\t\t\t\"Unable to run the example as settings are required and we fetch them from the link web manifest from the html page that is being served. It should exist in the customSettings section of the web manifest.\"\n\t\t);\n\t\treturn;\n\t}\n\tconst settingsEndpoint = settings.endpointProvider.endpoints.find(\n\t\t(endpoint) => endpoint.id === \"platform-settings\"\n\t);\n\n\tif (\n\t\tsettingsEndpoint === undefined ||\n\t\tsettingsEndpoint.type !== \"fetch\" ||\n\t\tsettingsEndpoint.options.method !== \"GET\" ||\n\t\tsettingsEndpoint.options.url === undefined\n\t) {\n\t\tconsole.error(\n\t\t\t\"Unable to run the example as settings are required and we fetch them from the endpoint defined with the id: 'platform-settings' in the manifest. It needs to be of type fetch, performing a GET and it must have a url defined.\"\n\t\t);\n\t\treturn;\n\t}\n\tconst platformSettings = await fetch(settingsEndpoint?.options.url);\n\tconst settingsJson = (await platformSettings.json()) as Settings;\n\treturn settingsJson;\n}\n\n/**\n * Returns a default layout from the settings if provided.\n * @returns The default layout from the settings.\n */\nexport async function getDefaultLayout(): Promise {\n\tconst settings = await getSettings();\n\tif (settings?.platform?.layout?.defaultLayout === undefined) {\n\t\tconsole.error(\n\t\t\t\"Unable to run the example as without a layout being defined. Please ensure that settings have been provided in the web manifest.\"\n\t\t);\n\t\treturn;\n\t}\n\tif (typeof settings.platform.layout.defaultLayout === \"string\") {\n\t\tconst layoutResponse = await fetch(settings.platform.layout.defaultLayout);\n\t\tconst layoutJson = (await layoutResponse.json()) as OpenFin.LayoutSnapshot;\n\t\treturn layoutJson;\n\t}\n\treturn settings.platform.layout.defaultLayout;\n}\n\n/**\n * Returns the settings from the manifest file.\n * @returns customSettings for this example\n */\nasync function getManifestSettings(): Promise {\n\t// Get the manifest link\n\tconst link = document.querySelector('link[rel=\"manifest\"]');\n\tif (link !== null) {\n\t\tconst manifestResponse = await fetch(link.href);\n\t\tconst manifestJson = (await manifestResponse.json()) as { custom_settings: ManifestSettings };\n\t\treturn manifestJson.custom_settings;\n\t}\n}\n\n/**\n * Clears any saved settings.\n * @returns The saved settings.\n */\nexport async function clearSettings(): Promise {\n\tconst settingsId = getSavedSettingsId();\n\tlocalStorage.removeItem(settingsId);\n}\n\n/**\n * Saves the settings.\n * @param settings The settings to save.\n */\nexport async function saveSettings(settings: Settings): Promise {\n\tconst settingsId = getSavedSettingsId();\n\tlocalStorage.setItem(settingsId, JSON.stringify(settings));\n}\n\n/**\n * Retrieves saved settings from local storage.\n * @returns The saved settings.\n */\nasync function getSavedSettings(): Promise {\n\tconst settingsId = getSavedSettingsId();\n\tconst settings = localStorage.getItem(settingsId);\n\tif (settings !== null) {\n\t\treturn JSON.parse(settings);\n\t}\n}\n\n/**\n * Get the Id used for saving and fetching settings from storage.\n * @returns The settings id.\n */\nfunction getSavedSettingsId(): string {\n\tconst urlParams = new URLSearchParams(window.location.search);\n\tconst env = urlParams.get(\"env\");\n\n\tconst settingsKey = env ? `${env}-settings` : \"settings\";\n\treturn settingsKey;\n}\n","export { default as v1 } from './v1.js';\nexport { default as v3 } from './v3.js';\nexport { default as v4 } from './v4.js';\nexport { default as v5 } from './v5.js';\nexport { default as NIL } from './nil.js';\nexport { default as version } from './version.js';\nexport { default as validate } from './validate.js';\nexport { default as stringify } from './stringify.js';\nexport { default as parse } from './parse.js';","/*\n * Browser-compatible JavaScript MD5\n *\n * Modification of JavaScript MD5\n * https://github.com/blueimp/JavaScript-MD5\n *\n * Copyright 2011, Sebastian Tschan\n * https://blueimp.net\n *\n * Licensed under the MIT license:\n * https://opensource.org/licenses/MIT\n *\n * Based on\n * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message\n * Digest Algorithm, as defined in RFC 1321.\n * Version 2.2 Copyright (C) Paul Johnston 1999 - 2009\n * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet\n * Distributed under the BSD License\n * See http://pajhome.org.uk/crypt/md5 for more info.\n */\nfunction md5(bytes) {\n if (typeof bytes === 'string') {\n var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape\n\n bytes = new Uint8Array(msg.length);\n\n for (var i = 0; i < msg.length; ++i) {\n bytes[i] = msg.charCodeAt(i);\n }\n }\n\n return md5ToHexEncodedArray(wordsToMd5(bytesToWords(bytes), bytes.length * 8));\n}\n/*\n * Convert an array of little-endian words to an array of bytes\n */\n\n\nfunction md5ToHexEncodedArray(input) {\n var output = [];\n var length32 = input.length * 32;\n var hexTab = '0123456789abcdef';\n\n for (var i = 0; i < length32; i += 8) {\n var x = input[i >> 5] >>> i % 32 & 0xff;\n var hex = parseInt(hexTab.charAt(x >>> 4 & 0x0f) + hexTab.charAt(x & 0x0f), 16);\n output.push(hex);\n }\n\n return output;\n}\n/**\n * Calculate output length with padding and bit length\n */\n\n\nfunction getOutputLength(inputLength8) {\n return (inputLength8 + 64 >>> 9 << 4) + 14 + 1;\n}\n/*\n * Calculate the MD5 of an array of little-endian words, and a bit length.\n */\n\n\nfunction wordsToMd5(x, len) {\n /* append padding */\n x[len >> 5] |= 0x80 << len % 32;\n x[getOutputLength(len) - 1] = len;\n var a = 1732584193;\n var b = -271733879;\n var c = -1732584194;\n var d = 271733878;\n\n for (var i = 0; i < x.length; i += 16) {\n var olda = a;\n var oldb = b;\n var oldc = c;\n var oldd = d;\n a = md5ff(a, b, c, d, x[i], 7, -680876936);\n d = md5ff(d, a, b, c, x[i + 1], 12, -389564586);\n c = md5ff(c, d, a, b, x[i + 2], 17, 606105819);\n b = md5ff(b, c, d, a, x[i + 3], 22, -1044525330);\n a = md5ff(a, b, c, d, x[i + 4], 7, -176418897);\n d = md5ff(d, a, b, c, x[i + 5], 12, 1200080426);\n c = md5ff(c, d, a, b, x[i + 6], 17, -1473231341);\n b = md5ff(b, c, d, a, x[i + 7], 22, -45705983);\n a = md5ff(a, b, c, d, x[i + 8], 7, 1770035416);\n d = md5ff(d, a, b, c, x[i + 9], 12, -1958414417);\n c = md5ff(c, d, a, b, x[i + 10], 17, -42063);\n b = md5ff(b, c, d, a, x[i + 11], 22, -1990404162);\n a = md5ff(a, b, c, d, x[i + 12], 7, 1804603682);\n d = md5ff(d, a, b, c, x[i + 13], 12, -40341101);\n c = md5ff(c, d, a, b, x[i + 14], 17, -1502002290);\n b = md5ff(b, c, d, a, x[i + 15], 22, 1236535329);\n a = md5gg(a, b, c, d, x[i + 1], 5, -165796510);\n d = md5gg(d, a, b, c, x[i + 6], 9, -1069501632);\n c = md5gg(c, d, a, b, x[i + 11], 14, 643717713);\n b = md5gg(b, c, d, a, x[i], 20, -373897302);\n a = md5gg(a, b, c, d, x[i + 5], 5, -701558691);\n d = md5gg(d, a, b, c, x[i + 10], 9, 38016083);\n c = md5gg(c, d, a, b, x[i + 15], 14, -660478335);\n b = md5gg(b, c, d, a, x[i + 4], 20, -405537848);\n a = md5gg(a, b, c, d, x[i + 9], 5, 568446438);\n d = md5gg(d, a, b, c, x[i + 14], 9, -1019803690);\n c = md5gg(c, d, a, b, x[i + 3], 14, -187363961);\n b = md5gg(b, c, d, a, x[i + 8], 20, 1163531501);\n a = md5gg(a, b, c, d, x[i + 13], 5, -1444681467);\n d = md5gg(d, a, b, c, x[i + 2], 9, -51403784);\n c = md5gg(c, d, a, b, x[i + 7], 14, 1735328473);\n b = md5gg(b, c, d, a, x[i + 12], 20, -1926607734);\n a = md5hh(a, b, c, d, x[i + 5], 4, -378558);\n d = md5hh(d, a, b, c, x[i + 8], 11, -2022574463);\n c = md5hh(c, d, a, b, x[i + 11], 16, 1839030562);\n b = md5hh(b, c, d, a, x[i + 14], 23, -35309556);\n a = md5hh(a, b, c, d, x[i + 1], 4, -1530992060);\n d = md5hh(d, a, b, c, x[i + 4], 11, 1272893353);\n c = md5hh(c, d, a, b, x[i + 7], 16, -155497632);\n b = md5hh(b, c, d, a, x[i + 10], 23, -1094730640);\n a = md5hh(a, b, c, d, x[i + 13], 4, 681279174);\n d = md5hh(d, a, b, c, x[i], 11, -358537222);\n c = md5hh(c, d, a, b, x[i + 3], 16, -722521979);\n b = md5hh(b, c, d, a, x[i + 6], 23, 76029189);\n a = md5hh(a, b, c, d, x[i + 9], 4, -640364487);\n d = md5hh(d, a, b, c, x[i + 12], 11, -421815835);\n c = md5hh(c, d, a, b, x[i + 15], 16, 530742520);\n b = md5hh(b, c, d, a, x[i + 2], 23, -995338651);\n a = md5ii(a, b, c, d, x[i], 6, -198630844);\n d = md5ii(d, a, b, c, x[i + 7], 10, 1126891415);\n c = md5ii(c, d, a, b, x[i + 14], 15, -1416354905);\n b = md5ii(b, c, d, a, x[i + 5], 21, -57434055);\n a = md5ii(a, b, c, d, x[i + 12], 6, 1700485571);\n d = md5ii(d, a, b, c, x[i + 3], 10, -1894986606);\n c = md5ii(c, d, a, b, x[i + 10], 15, -1051523);\n b = md5ii(b, c, d, a, x[i + 1], 21, -2054922799);\n a = md5ii(a, b, c, d, x[i + 8], 6, 1873313359);\n d = md5ii(d, a, b, c, x[i + 15], 10, -30611744);\n c = md5ii(c, d, a, b, x[i + 6], 15, -1560198380);\n b = md5ii(b, c, d, a, x[i + 13], 21, 1309151649);\n a = md5ii(a, b, c, d, x[i + 4], 6, -145523070);\n d = md5ii(d, a, b, c, x[i + 11], 10, -1120210379);\n c = md5ii(c, d, a, b, x[i + 2], 15, 718787259);\n b = md5ii(b, c, d, a, x[i + 9], 21, -343485551);\n a = safeAdd(a, olda);\n b = safeAdd(b, oldb);\n c = safeAdd(c, oldc);\n d = safeAdd(d, oldd);\n }\n\n return [a, b, c, d];\n}\n/*\n * Convert an array bytes to an array of little-endian words\n * Characters >255 have their high-byte silently ignored.\n */\n\n\nfunction bytesToWords(input) {\n if (input.length === 0) {\n return [];\n }\n\n var length8 = input.length * 8;\n var output = new Uint32Array(getOutputLength(length8));\n\n for (var i = 0; i < length8; i += 8) {\n output[i >> 5] |= (input[i / 8] & 0xff) << i % 32;\n }\n\n return output;\n}\n/*\n * Add integers, wrapping at 2^32. This uses 16-bit operations internally\n * to work around bugs in some JS interpreters.\n */\n\n\nfunction safeAdd(x, y) {\n var lsw = (x & 0xffff) + (y & 0xffff);\n var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n return msw << 16 | lsw & 0xffff;\n}\n/*\n * Bitwise rotate a 32-bit number to the left.\n */\n\n\nfunction bitRotateLeft(num, cnt) {\n return num << cnt | num >>> 32 - cnt;\n}\n/*\n * These functions implement the four basic operations the algorithm uses.\n */\n\n\nfunction md5cmn(q, a, b, x, s, t) {\n return safeAdd(bitRotateLeft(safeAdd(safeAdd(a, q), safeAdd(x, t)), s), b);\n}\n\nfunction md5ff(a, b, c, d, x, s, t) {\n return md5cmn(b & c | ~b & d, a, b, x, s, t);\n}\n\nfunction md5gg(a, b, c, d, x, s, t) {\n return md5cmn(b & d | c & ~d, a, b, x, s, t);\n}\n\nfunction md5hh(a, b, c, d, x, s, t) {\n return md5cmn(b ^ c ^ d, a, b, x, s, t);\n}\n\nfunction md5ii(a, b, c, d, x, s, t) {\n return md5cmn(c ^ (b | ~d), a, b, x, s, t);\n}\n\nexport default md5;","export default '00000000-0000-0000-0000-000000000000';","import validate from './validate.js';\n\nfunction parse(uuid) {\n if (!validate(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n var v;\n var arr = new Uint8Array(16); // Parse ########-....-....-....-............\n\n arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24;\n arr[1] = v >>> 16 & 0xff;\n arr[2] = v >>> 8 & 0xff;\n arr[3] = v & 0xff; // Parse ........-####-....-....-............\n\n arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8;\n arr[5] = v & 0xff; // Parse ........-....-####-....-............\n\n arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8;\n arr[7] = v & 0xff; // Parse ........-....-....-####-............\n\n arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8;\n arr[9] = v & 0xff; // Parse ........-....-....-....-############\n // (Use \"/\" to avoid 32-bit truncation when bit-shifting high-order bytes)\n\n arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff;\n arr[11] = v / 0x100000000 & 0xff;\n arr[12] = v >>> 24 & 0xff;\n arr[13] = v >>> 16 & 0xff;\n arr[14] = v >>> 8 & 0xff;\n arr[15] = v & 0xff;\n return arr;\n}\n\nexport default parse;","export default /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;","// Unique ID creation requires a high quality random # generator. In the browser we therefore\n// require the crypto API and do not support built-in fallback to lower quality random number\n// generators (like Math.random()).\nvar getRandomValues;\nvar rnds8 = new Uint8Array(16);\nexport default function rng() {\n // lazy load so that environments that need to polyfill have a chance to do so\n if (!getRandomValues) {\n // getRandomValues needs to be invoked in a context where \"this\" is a Crypto implementation. Also,\n // find the complete implementation of crypto (msCrypto) on IE11.\n getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto !== 'undefined' && typeof msCrypto.getRandomValues === 'function' && msCrypto.getRandomValues.bind(msCrypto);\n\n if (!getRandomValues) {\n throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');\n }\n }\n\n return getRandomValues(rnds8);\n}","// Adapted from Chris Veness' SHA1 code at\n// http://www.movable-type.co.uk/scripts/sha1.html\nfunction f(s, x, y, z) {\n switch (s) {\n case 0:\n return x & y ^ ~x & z;\n\n case 1:\n return x ^ y ^ z;\n\n case 2:\n return x & y ^ x & z ^ y & z;\n\n case 3:\n return x ^ y ^ z;\n }\n}\n\nfunction ROTL(x, n) {\n return x << n | x >>> 32 - n;\n}\n\nfunction sha1(bytes) {\n var K = [0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xca62c1d6];\n var H = [0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0];\n\n if (typeof bytes === 'string') {\n var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape\n\n bytes = [];\n\n for (var i = 0; i < msg.length; ++i) {\n bytes.push(msg.charCodeAt(i));\n }\n } else if (!Array.isArray(bytes)) {\n // Convert Array-like to Array\n bytes = Array.prototype.slice.call(bytes);\n }\n\n bytes.push(0x80);\n var l = bytes.length / 4 + 2;\n var N = Math.ceil(l / 16);\n var M = new Array(N);\n\n for (var _i = 0; _i < N; ++_i) {\n var arr = new Uint32Array(16);\n\n for (var j = 0; j < 16; ++j) {\n arr[j] = bytes[_i * 64 + j * 4] << 24 | bytes[_i * 64 + j * 4 + 1] << 16 | bytes[_i * 64 + j * 4 + 2] << 8 | bytes[_i * 64 + j * 4 + 3];\n }\n\n M[_i] = arr;\n }\n\n M[N - 1][14] = (bytes.length - 1) * 8 / Math.pow(2, 32);\n M[N - 1][14] = Math.floor(M[N - 1][14]);\n M[N - 1][15] = (bytes.length - 1) * 8 & 0xffffffff;\n\n for (var _i2 = 0; _i2 < N; ++_i2) {\n var W = new Uint32Array(80);\n\n for (var t = 0; t < 16; ++t) {\n W[t] = M[_i2][t];\n }\n\n for (var _t = 16; _t < 80; ++_t) {\n W[_t] = ROTL(W[_t - 3] ^ W[_t - 8] ^ W[_t - 14] ^ W[_t - 16], 1);\n }\n\n var a = H[0];\n var b = H[1];\n var c = H[2];\n var d = H[3];\n var e = H[4];\n\n for (var _t2 = 0; _t2 < 80; ++_t2) {\n var s = Math.floor(_t2 / 20);\n var T = ROTL(a, 5) + f(s, b, c, d) + e + K[s] + W[_t2] >>> 0;\n e = d;\n d = c;\n c = ROTL(b, 30) >>> 0;\n b = a;\n a = T;\n }\n\n H[0] = H[0] + a >>> 0;\n H[1] = H[1] + b >>> 0;\n H[2] = H[2] + c >>> 0;\n H[3] = H[3] + d >>> 0;\n H[4] = H[4] + e >>> 0;\n }\n\n return [H[0] >> 24 & 0xff, H[0] >> 16 & 0xff, H[0] >> 8 & 0xff, H[0] & 0xff, H[1] >> 24 & 0xff, H[1] >> 16 & 0xff, H[1] >> 8 & 0xff, H[1] & 0xff, H[2] >> 24 & 0xff, H[2] >> 16 & 0xff, H[2] >> 8 & 0xff, H[2] & 0xff, H[3] >> 24 & 0xff, H[3] >> 16 & 0xff, H[3] >> 8 & 0xff, H[3] & 0xff, H[4] >> 24 & 0xff, H[4] >> 16 & 0xff, H[4] >> 8 & 0xff, H[4] & 0xff];\n}\n\nexport default sha1;","import validate from './validate.js';\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\n\nvar byteToHex = [];\n\nfor (var i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).substr(1));\n}\n\nfunction stringify(arr) {\n var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n var uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!validate(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n\n return uuid;\n}\n\nexport default stringify;","import rng from './rng.js';\nimport stringify from './stringify.js'; // **`v1()` - Generate time-based UUID**\n//\n// Inspired by https://github.com/LiosK/UUID.js\n// and http://docs.python.org/library/uuid.html\n\nvar _nodeId;\n\nvar _clockseq; // Previous uuid creation time\n\n\nvar _lastMSecs = 0;\nvar _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details\n\nfunction v1(options, buf, offset) {\n var i = buf && offset || 0;\n var b = buf || new Array(16);\n options = options || {};\n var node = options.node || _nodeId;\n var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not\n // specified. We do this lazily to minimize issues related to insufficient\n // system entropy. See #189\n\n if (node == null || clockseq == null) {\n var seedBytes = options.random || (options.rng || rng)();\n\n if (node == null) {\n // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)\n node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]];\n }\n\n if (clockseq == null) {\n // Per 4.2.2, randomize (14 bit) clockseq\n clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;\n }\n } // UUID timestamps are 100 nano-second units since the Gregorian epoch,\n // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so\n // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'\n // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.\n\n\n var msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock\n // cycle to simulate higher resolution clock\n\n var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs)\n\n var dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression\n\n if (dt < 0 && options.clockseq === undefined) {\n clockseq = clockseq + 1 & 0x3fff;\n } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new\n // time interval\n\n\n if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {\n nsecs = 0;\n } // Per 4.2.1.2 Throw error if too many uuids are requested\n\n\n if (nsecs >= 10000) {\n throw new Error(\"uuid.v1(): Can't create more than 10M uuids/sec\");\n }\n\n _lastMSecs = msecs;\n _lastNSecs = nsecs;\n _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch\n\n msecs += 12219292800000; // `time_low`\n\n var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;\n b[i++] = tl >>> 24 & 0xff;\n b[i++] = tl >>> 16 & 0xff;\n b[i++] = tl >>> 8 & 0xff;\n b[i++] = tl & 0xff; // `time_mid`\n\n var tmh = msecs / 0x100000000 * 10000 & 0xfffffff;\n b[i++] = tmh >>> 8 & 0xff;\n b[i++] = tmh & 0xff; // `time_high_and_version`\n\n b[i++] = tmh >>> 24 & 0xf | 0x10; // include version\n\n b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)\n\n b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low`\n\n b[i++] = clockseq & 0xff; // `node`\n\n for (var n = 0; n < 6; ++n) {\n b[i + n] = node[n];\n }\n\n return buf || stringify(b);\n}\n\nexport default v1;","import v35 from './v35.js';\nimport md5 from './md5.js';\nvar v3 = v35('v3', 0x30, md5);\nexport default v3;","import stringify from './stringify.js';\nimport parse from './parse.js';\n\nfunction stringToBytes(str) {\n str = unescape(encodeURIComponent(str)); // UTF8 escape\n\n var bytes = [];\n\n for (var i = 0; i < str.length; ++i) {\n bytes.push(str.charCodeAt(i));\n }\n\n return bytes;\n}\n\nexport var DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8';\nexport var URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8';\nexport default function (name, version, hashfunc) {\n function generateUUID(value, namespace, buf, offset) {\n if (typeof value === 'string') {\n value = stringToBytes(value);\n }\n\n if (typeof namespace === 'string') {\n namespace = parse(namespace);\n }\n\n if (namespace.length !== 16) {\n throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)');\n } // Compute hash of namespace and value, Per 4.3\n // Future: Use spread syntax when supported on all platforms, e.g. `bytes =\n // hashfunc([...namespace, ... value])`\n\n\n var bytes = new Uint8Array(16 + value.length);\n bytes.set(namespace);\n bytes.set(value, namespace.length);\n bytes = hashfunc(bytes);\n bytes[6] = bytes[6] & 0x0f | version;\n bytes[8] = bytes[8] & 0x3f | 0x80;\n\n if (buf) {\n offset = offset || 0;\n\n for (var i = 0; i < 16; ++i) {\n buf[offset + i] = bytes[i];\n }\n\n return buf;\n }\n\n return stringify(bytes);\n } // Function#name is not settable on some platforms (#270)\n\n\n try {\n generateUUID.name = name; // eslint-disable-next-line no-empty\n } catch (err) {} // For CommonJS default export support\n\n\n generateUUID.DNS = DNS;\n generateUUID.URL = URL;\n return generateUUID;\n}","import rng from './rng.js';\nimport stringify from './stringify.js';\n\nfunction v4(options, buf, offset) {\n options = options || {};\n var rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n offset = offset || 0;\n\n for (var i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n\n return buf;\n }\n\n return stringify(rnds);\n}\n\nexport default v4;","import v35 from './v35.js';\nimport sha1 from './sha1.js';\nvar v5 = v35('v5', 0x50, sha1);\nexport default v5;","import REGEX from './regex.js';\n\nfunction validate(uuid) {\n return typeof uuid === 'string' && REGEX.test(uuid);\n}\n\nexport default validate;","import validate from './validate.js';\n\nfunction version(uuid) {\n if (!validate(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n return parseInt(uuid.substr(14, 1), 16);\n}\n\nexport default version;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = (module) => {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","import type { Context } from \"@finos/fdc3\";\nimport { init } from \"./api\";\n\nwindow.addEventListener(\"DOMContentLoaded\", async () => {\n\tawait init(true);\n\tawait initializeDOM();\n});\n\n/**\n * Raise an intent using the fdc3 API.\n */\nasync function raiseIntent(): Promise {\n\tif (window.fin !== undefined) {\n\t\tconst context = {\n\t\t\ttype: \"fdc3.contact\",\n\t\t\tname: \"Andy Young\",\n\t\t\tid: {\n\t\t\t\temail: \"andy.young@example.com\"\n\t\t\t}\n\t\t};\n\t\tconst intent = \"ViewContact\";\n\t\tconst intentResolver = await window.fdc3.raiseIntent(intent, context);\n\t\tif (intentResolver !== undefined) {\n\t\t\tconsole.log(\"Intent resolver received:\", intentResolver);\n\t\t}\n\t}\n}\n\n/**\n * Adds an fdc3 intent listener to the window.\n */\nasync function addIntentListener(): Promise {\n\tconst intent = \"ViewContact\";\n\tif (window.fdc3) {\n\t\tawait window.fdc3.addIntentListener(intent, (ctx, metadata) => {\n\t\t\tconsole.log(`Received Context For Intent: ${intent}`, ctx);\n\t\t\tconsole.log(`Received Metadata With Intent: ${intent}`, metadata);\n\t\t\tupdateDOMElements(ctx);\n\t\t});\n\t} else {\n\t\twindow.addEventListener(\"fdc3Ready\", async () => {\n\t\t\tif (window.fdc3) {\n\t\t\t\tawait window.fdc3.addIntentListener(intent, (ctx, metadata) => {\n\t\t\t\t\tconsole.log(`Received Context For Intent: ${intent}`, ctx);\n\t\t\t\t\tconsole.log(`Received Metadata With Intent: ${intent}`, metadata);\n\t\t\t\t\tupdateDOMElements(ctx);\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t}\n}\n\n/**\n * Updates the DOM elements with the provided context.\n * @param context The context to update the DOM elements with.\n */\nfunction updateDOMElements(context: Context): void {\n\tconst contextTypeSpan = document.querySelector(\"#contextType\");\n\tconst contextNameSpan = document.querySelector(\"#contextName\");\n\tconst contextBodyPre = document.querySelector(\"#contextBody\");\n\n\tif (contextTypeSpan !== null && contextNameSpan !== null && contextBodyPre !== null) {\n\t\tcontextTypeSpan.textContent = context.type;\n\t\tcontextNameSpan.textContent = context.name ?? \"No name provided.\";\n\t\tcontextBodyPre.textContent = JSON.stringify(context, null, 2);\n\t}\n}\n\n/**\n * Initialize the DOM elements.\n */\nasync function initializeDOM(): Promise {\n\tconst raiseIntentButton = document.querySelector(\"#raiseIntent\");\n\n\tif (raiseIntentButton !== null) {\n\t\traiseIntentButton.addEventListener(\"click\", async () => {\n\t\t\tawait raiseIntent();\n\t\t});\n\t}\n\n\tawait addIntentListener();\n}\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/web/v19.2.0/web-interop-support-context-and-intents/js/fdc3-view.bundle.js b/web/v19.2.0/web-interop-support-context-and-intents/js/fdc3-view.bundle.js index e565639..a810450 100644 --- a/web/v19.2.0/web-interop-support-context-and-intents/js/fdc3-view.bundle.js +++ b/web/v19.2.0/web-interop-support-context-and-intents/js/fdc3-view.bundle.js @@ -1,38 +1,38 @@ /******/ (() => { // webpackBootstrap /******/ var __webpack_modules__ = ({ -/***/ "./node_modules/@openfin/core-web/out/api-client.js": -/*!**********************************************************!*\ - !*** ./node_modules/@openfin/core-web/out/api-client.js ***! - \**********************************************************/ +/***/ "../../node_modules/@openfin/core-web/out/api-client.js": +/*!**************************************************************!*\ + !*** ../../node_modules/@openfin/core-web/out/api-client.js ***! + \**************************************************************/ /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; -var e=__webpack_require__(/*! ./main-8cad4070.js */ "./node_modules/@openfin/core-web/out/main-8cad4070.js");__webpack_require__(/*! buffer/ */ "../../node_modules/buffer/index.js"),__webpack_require__(/*! uuid */ "../../node_modules/uuid/dist/esm-browser/index.js"),__webpack_require__(/*! events */ "../../node_modules/events/events.js"),__webpack_require__(/*! lodash/cloneDeep */ "../../node_modules/lodash/cloneDeep.js"),__webpack_require__(/*! lodash/isEqual */ "../../node_modules/lodash/isEqual.js"),exports.connect=e.connect; +var e=__webpack_require__(/*! ./main-8cad4070.js */ "../../node_modules/@openfin/core-web/out/main-8cad4070.js");__webpack_require__(/*! buffer/ */ "../../node_modules/buffer/index.js"),__webpack_require__(/*! uuid */ "../../node_modules/uuid/dist/esm-browser/index.js"),__webpack_require__(/*! events */ "../../node_modules/events/events.js"),__webpack_require__(/*! lodash/cloneDeep */ "../../node_modules/lodash/cloneDeep.js"),__webpack_require__(/*! lodash/isEqual */ "../../node_modules/lodash/isEqual.js"),exports.connect=e.connect; /***/ }), -/***/ "./node_modules/@openfin/core-web/out/main-8cad4070.js": -/*!*************************************************************!*\ - !*** ./node_modules/@openfin/core-web/out/main-8cad4070.js ***! - \*************************************************************/ +/***/ "../../node_modules/@openfin/core-web/out/main-8cad4070.js": +/*!*****************************************************************!*\ + !*** ../../node_modules/@openfin/core-web/out/main-8cad4070.js ***! + \*****************************************************************/ /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; -var e=__webpack_require__(/*! buffer/ */ "../../node_modules/buffer/index.js"),t=__webpack_require__(/*! events */ "../../node_modules/events/events.js"),n=__webpack_require__(/*! lodash/cloneDeep */ "../../node_modules/lodash/cloneDeep.js"),i=__webpack_require__(/*! lodash/isEqual */ "../../node_modules/lodash/isEqual.js"),r=__webpack_require__(/*! uuid */ "../../node_modules/uuid/dist/esm-browser/index.js");const o=(e,t)=>`${t}<${btoa(JSON.stringify(e))}>`;var s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof __webpack_require__.g?__webpack_require__.g:"undefined"!=typeof self?self:{},a={},c={},d={},h={};async function l(e){const t=[];for(const n of e){const e=await n();t.push(e)}return t}Object.defineProperty(h,"__esModule",{value:!0}),h.promiseMapSerial=h.serial=h.promiseMap=h.promisify=void 0,h.promisify=function(e){return(...t)=>new Promise(((n,i)=>{e(...t,((e,t)=>e?i(e):n(t)))}))},h.promiseMap=async function(e,t){return Promise.all(e.map(t))},h.serial=l,h.promiseMapSerial=async function(e,t){return l(e.map(((e,n,i)=>()=>t(e,n,i))))};var u,p=s&&s.__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},w=s&&s.__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)};Object.defineProperty(d,"__esModule",{value:!0}),d.Reply=d.EmitterBase=d.Base=void 0;const y=h;class f{constructor(e){this.isNodeEnvironment=()=>"node"===this.wire.environment.type,this.isOpenFinEnvironment=()=>"openfin"===this.wire.environment.type,this.isBrowserEnvironment=()=>"other"===this.wire.environment.type,this.wire=e}get fin(){return this.wire.getFin()}get me(){return this.wire.me}}d.Base=f;d.EmitterBase=class extends f{constructor(e,t,...n){super(e),this.topic=t,u.set(this,void 0),this.eventNames=()=>this.hasEmitter()?this.getOrCreateEmitter().eventNames():[],this.emit=(e,t,...n)=>!!this.hasEmitter()&&this.getOrCreateEmitter().emit(e,t,...n),this.hasEmitter=()=>this.wire.eventAggregator.has(w(this,u,"f")),this.getOrCreateEmitter=()=>this.wire.eventAggregator.getOrCreate(w(this,u,"f")),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[],this.listenerCount=e=>this.hasEmitter()?this.getOrCreateEmitter().listenerCount(e):0,this.registerEventListener=async(e,t={},n,i)=>{const r={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e},o=this.getOrCreateEmitter();n(o);try{await this.wire.sendAction("subscribe-to-desktop-event",r)}catch(e){throw i(o),this.deleteEmitterIfNothingRegistered(o),e}},this.deregisterEventListener=async(e,t={})=>{if(this.hasEmitter()){const n={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e};await this.wire.sendAction("unsubscribe-to-desktop-event",n).catch((()=>null));return this.getOrCreateEmitter()}return Promise.resolve()},p(this,u,[t,...n],"f"),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[]}async on(e,t,n){return await this.registerEventListener(e,n,(n=>{n.on(e,t)}),(n=>{n.removeListener(e,t)})),this}async addListener(e,t,n){return this.on(e,t,n)}async once(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.once(e,i),n.once(e,t)}),(n=>{n.removeListener(e,i),n.removeListener(e,t)})),this}async prependListener(e,t,n){return await this.registerEventListener(e,n,(n=>{n.prependListener(e,t)}),(n=>{n.removeListener(e,t)})),this}async prependOnceListener(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.prependOnceListener(e,t),n.once(e,i)}),(n=>{n.removeListener(e,t),n.removeListener(e,i)})),this}async removeListener(e,t,n){const i=await this.deregisterEventListener(e,n);return i&&(i.removeListener(e,t),this.deleteEmitterIfNothingRegistered(i)),this}async deregisterAllListeners(e){const t={...this.identity,type:e,topic:this.topic};if(this.hasEmitter()){const e=this.getOrCreateEmitter(),n=e.listenerCount(t.type),i=[];for(let e=0;enull)));return await Promise.all(i),e}}async removeAllListeners(e){const t=async e=>{const t=await this.deregisterAllListeners(e);t&&(t.removeAllListeners(e),this.deleteEmitterIfNothingRegistered(t))};if(e)await t(e);else if(this.hasEmitter()){const e=this.getOrCreateEmitter().eventNames();await(0,y.promiseMap)(e,t)}return this}deleteEmitterIfNothingRegistered(e){0===e.eventNames().length&&this.wire.eventAggregator.delete(w(this,u,"f"))}},u=new WeakMap;d.Reply=class{};var g={};Object.defineProperty(g,"__esModule",{value:!0});var m=g.RuntimeError=g.NotSupportedError=g.NotImplementedError=g.NoAckError=g.DuplicateCorrelationError=g.UnexpectedActionError=g.DisconnectedError=void 0;class v extends Error{constructor(e){super(`Expected websocket state OPEN but found ${e}`),this.readyState=e}}g.DisconnectedError=v;class C extends Error{}g.UnexpectedActionError=C;class b extends Error{}g.DuplicateCorrelationError=b;class I extends Error{}g.NoAckError=I;class E extends Error{}g.NotImplementedError=E;class x extends Error{}g.NotSupportedError=x;class A extends Error{constructor(e){const{message:t,name:n,stack:i,...r}=e;super(t),this.name=n||"Error",this.stack=i??this.toString(),Object.keys(r).forEach((e=>{this[e]=r[e]}))}}class P extends Error{static getCallSite(e=0){const t=Error.stackTraceLimit,n=e+1;Error.stackTraceLimit=t+n;const i=Error.prepareStackTrace;Error.prepareStackTrace=(e,t)=>t;const r=(new Error).stack?.slice(n)??[];return Error.prepareStackTrace=i,Error.stackTraceLimit=t,r}static prepareStackTrace(e,t){if("function"==typeof Error.prepareStackTrace)return Error.prepareStackTrace(e,t);let n="";n+=e.name||"Error",n+=`: ${e.message||""}`;for(const e of t)n+=`\n at ${e.toString()}`;return n}constructor(e,t){const{reason:n,error:i}=e;super(n),this.name="RuntimeError",i?.stack&&(this.cause=new A(i)),t&&(this.stack=P.prepareStackTrace(this,t))}}m=g.RuntimeError=P;var M={},_={},O={};Object.defineProperty(O,"__esModule",{value:!0}),O.validateIdentity=void 0,O.validateIdentity=function(e){let t;return"object"==typeof e&&"string"==typeof e.uuid||(t="Not a valid identity object"),t};var S={},R={},F={},j={},k={},L={},T={};Object.defineProperty(T,"__esModule",{value:!0}),T.handleDeprecatedWarnings=void 0;var $;T.handleDeprecatedWarnings=e=>{(e.contentNavigation?.whitelist||e.contentNavigation?.blacklist||e.contentRedirect?.whitelist||e.contentRedirect?.blacklist)&&console.warn("The properties 'whitelist' and 'blacklist' have been marked as deprecated and will be removed in a future version. Please use 'allowlist' and 'denylist'.")};var B={},G={};Object.defineProperty(G,"__esModule",{value:!0}),G.AsyncRetryableLazy=W=G.Lazy=void 0;var W=G.Lazy=class{constructor(e){this.producerFn=e}getValue(){return this.value||(this.value=this.producerFn()),this.value}};G.AsyncRetryableLazy=class{constructor(e){this.producerFn=e}async getValue(){return this.promise||(this.promise=this.producerFn().catch((e=>{throw delete this.promise,e}))),this.promise}};var H={};Object.defineProperty(H,"__esModule",{value:!0}),H.WebContents=void 0;const N=d;class D extends N.EmitterBase{constructor(e,t,n){super(e,n,t.uuid,t.name),this.identity=t,this.entityType=n}capturePage(e){return this.wire.sendAction("capture-page",{options:e,...this.identity}).then((({payload:e})=>e.data))}executeJavaScript(e){return this.wire.sendAction("execute-javascript-in-window",{...this.identity,code:e}).then((({payload:e})=>e.data))}getZoomLevel(){return this.wire.sendAction("get-zoom-level",this.identity).then((({payload:e})=>e.data))}setZoomLevel(e){return this.wire.sendAction("set-zoom-level",{...this.identity,level:e}).then((()=>{}))}navigate(e){return this.wire.sendAction("navigate-window",{...this.identity,url:e}).then((()=>{}))}navigateBack(){return this.wire.sendAction("navigate-window-back",{...this.identity}).then((()=>{}))}async navigateForward(){await this.wire.sendAction("navigate-window-forward",{...this.identity})}stopNavigation(){return this.wire.sendAction("stop-window-navigation",{...this.identity}).then((()=>{}))}reload(e=!1){return this.wire.sendAction("reload-window",{ignoreCache:e,...this.identity}).then((()=>{}))}print(e={}){return this.wire.sendAction("print",{...this.identity,options:e}).then((()=>{}))}findInPage(e,t){return this.wire.sendAction("find-in-page",{...this.identity,searchTerm:e,options:t}).then((({payload:e})=>e.data))}stopFindInPage(e){return this.wire.sendAction("stop-find-in-page",{...this.identity,action:e}).then((()=>{}))}getPrinters(){return this.wire.sendAction("get-printers",{...this.identity}).then((({payload:e})=>e.data))}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){await this.wire.sendAction("focus-window",{emitSynthFocused:e,...this.identity})}async showDeveloperTools(){await this.wire.sendAction("show-developer-tools",this.identity)}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction("get-process-info",this.identity);return e}async getSharedWorkers(){return this.wire.sendAction("get-shared-workers",this.identity).then((({payload:e})=>e.data))}async inspectSharedWorker(){await this.wire.sendAction("inspect-shared-worker",{...this.identity})}async inspectSharedWorkerById(e){await this.wire.sendAction("inspect-shared-worker-by-id",{...this.identity,workerId:e})}async inspectServiceWorker(){await this.wire.sendAction("inspect-service-worker",{...this.identity})}async showPopupWindow(e){if(this.wire.sendAction(`${this.entityType}-show-popup-window`,this.identity).catch((()=>{})),e?.onPopupReady){const t=async({popupName:t})=>{try{const n=this.fin.Window.wrapSync({uuid:this.fin.me.uuid,name:t});await e.onPopupReady(n)}catch(e){throw new Error(`Something went wrong during onPopupReady execution: ${e}`)}};await this.once("popup-ready",t)}const{payload:t}=await this.wire.sendAction("try-create-popup-window",{options:{...e,hasResultCallback:!!e?.onPopupResult,hasReadyCallback:!!e?.onPopupReady},...this.identity}),{data:{willOpen:n,options:i}}=t;n&&await this.fin.Window.create(i.initialOptions);if(e?.onPopupResult){const t=async t=>{await e.onPopupResult((e=>{const{name:t,uuid:n,result:i,data:r}=e,o={identity:{name:t,uuid:n},result:i};return r&&(o.data=r),o})(t))},n=async()=>{await this.removeListener("popup-result",t)};await this.on("popup-result",t),await this.once("popup-teardown",n)}const{payload:r}=await this.wire.sendAction("show-popup-window",{options:i,...this.identity});return r.data}}var U,V,z,K,q;function J(){return V||(V=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(function(){if($)return L;$=1,Object.defineProperty(L,"__esModule",{value:!0}),L.ViewModule=void 0;const e=d,t=O,n=J(),i=T;class r extends e.Base{async create(e){const{uuid:t}=this.wire.me;if(!e.name||"string"!=typeof e.name)throw new Error("Please provide a name property as a string in order to create a View.");return(0,i.handleDeprecatedWarnings)(e),this.wire.environment.childViews?await this.wire.environment.createChildContent({entityType:"view",options:{...e,uuid:t}}):await this.wire.sendAction("create-view",{...e,uuid:t}),this.wrapSync({uuid:t,name:e.name})}async wrap(e){this.wire.sendAction("view-wrap").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}wrapSync(e){this.wire.sendAction("view-wrap-sync").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}getCurrent(){if(this.wire.sendAction("view-get-current").catch((e=>{})),!this.wire.me.isView)throw new Error("You are not in a View context");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction("view-get-current-sync").catch((e=>{})),!this.wire.me.isView)throw new Error("You are not in a View context");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return L.ViewModule=r,L}(),e),n(function(){if(U)return B;var e;U=1,Object.defineProperty(B,"__esModule",{value:!0}),B.View=void 0;const t=g,n=G,i=H,r=ie();class o extends i.WebContents{constructor(i,o){super(i,o,"view"),this.identity=o,e.set(this,new n.Lazy((()=>this.fin.Platform.wrapSync(this.identity).getClient()))),this.attach=async e=>{await this.wire.sendAction("attach-view",{target:e,...this.identity})},this.destroy=async()=>{await this.wire.sendAction("destroy-view",{...this.identity})},this.show=async()=>{await this.wire.sendAction("show-view",{...this.identity})},this.showAt=async(e,t={})=>{await this.wire.sendAction("show-view-at",{bounds:e,...this.identity,options:t})},this.bringToFront=async()=>{await this.wire.sendAction("bring-view-to-front",{...this.identity})},this.hide=async()=>{await this.wire.sendAction("hide-view",{...this.identity})},this.setBounds=async e=>{await this.wire.sendAction("set-view-bounds",{bounds:e,...this.identity})},this.getBounds=async()=>(await this.wire.sendAction("get-view-bounds",{...this.identity})).payload.data,this.getInfo=async()=>(await this.wire.sendAction("get-view-info",{...this.identity})).payload.data,this.getParentLayout=async()=>(this.wire.sendAction("view-get-parent-layout",{...this.identity}).catch((()=>{})),this.fin.Platform.Layout.getLayoutByViewIdentity(this.identity)),this.getOptions=async()=>this.wire.sendAction("get-view-options",{...this.identity}).then((({payload:e})=>e.data)),this.updateOptions=async e=>this.wire.sendAction("update-view-options",{options:e,...this.identity}).then((()=>{})),this.getCurrentWindow=async()=>{const{payload:{data:e}}=await this.wire.sendAction("get-view-window",{...this.identity});return new r._Window(this.wire,e)},this.getCurrentStack=async()=>{this.wire.sendAction("view-get-current-stack").catch((()=>{}));try{return(await this.getParentLayout()).getStackByViewIdentity(this.identity)}catch(e){throw new t.RuntimeError({reason:"This view does not belong to a stack.",error:e})}},this.triggerBeforeUnload=async()=>(await this.wire.sendAction("trigger-before-unload",{...this.identity})).payload.data,this.bindToElement=async e=>{if(!e)throw new Error("Element not found.");return this.wire.environment.observeBounds(e,(async e=>this.setBounds(e)))}}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){const t=await this.getCurrentWindow();await t.focusedWebViewWasChanged(),await super.focus({emitSynthFocused:e})}}return B.View=o,e=new WeakMap,B}(),e)}(k)),k}function Y(){if(z)return j;z=1,Object.defineProperty(j,"__esModule",{value:!0}),j.Application=void 0;const e=d,t=ie(),n=J();class i extends e.EmitterBase{constructor(e,n){super(e,"application",n.uuid),this.identity=n,this.window=new t._Window(this.wire,{uuid:this.identity.uuid,name:this.identity.uuid})}windowListFromIdentityList(e){const n=[];return e.forEach((e=>{n.push(new t._Window(this.wire,{uuid:e.uuid,name:e.name}))})),n}isRunning(){return this.wire.sendAction("is-application-running",this.identity).then((({payload:e})=>e.data))}async quit(e=!1){try{await this._close(e),await this.wire.sendAction("destroy-application",{force:e,...this.identity})}catch(e){if(!["Remote connection has closed","Could not locate the requested application"].some((t=>e.message.includes(t))))throw e}}async _close(e=!1){try{await this.wire.sendAction("close-application",{force:e,...this.identity})}catch(e){if(!e.message.includes("Remote connection has closed"))throw e}}close(e=!1){return console.warn("Deprecation Warning: Application.close is deprecated Please use Application.quit"),this.wire.sendAction("application-close",this.identity).catch((e=>{})),this._close(e)}getChildWindows(){return this.wire.sendAction("get-child-windows",this.identity).then((({payload:e})=>{const t=[];return e.data.forEach((e=>{t.push({uuid:this.identity.uuid,name:e})})),this.windowListFromIdentityList(t)}))}getManifest(){return this.wire.sendAction("get-application-manifest",this.identity).then((({payload:e})=>e.data))}getParentUuid(){return this.wire.sendAction("get-parent-application",this.identity).then((({payload:e})=>e.data))}getShortcuts(){return this.wire.sendAction("get-shortcuts",this.identity).then((({payload:e})=>e.data))}async getViews(){const{payload:e}=await this.wire.sendAction("application-get-views",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}getZoomLevel(){return this.wire.sendAction("get-application-zoom-level",this.identity).then((({payload:e})=>e.data))}getWindow(){return this.wire.sendAction("application-get-window",this.identity).catch((e=>{})),Promise.resolve(this.window)}registerUser(e,t){return this.wire.sendAction("register-user",{userName:e,appName:t,...this.identity}).then((()=>{}))}removeTrayIcon(){return this.wire.sendAction("remove-tray-icon",this.identity).then((()=>{}))}restart(){return this.wire.sendAction("restart-application",this.identity).then((()=>{}))}run(){return console.warn("Deprecation Warning: Application.run is deprecated Please use fin.Application.start"),this.wire.sendAction("application-run",this.identity).catch((e=>{})),this._run()}_run(e={}){return this.wire.sendAction("run-application",{manifestUrl:this._manifestUrl,opts:e,...this.identity}).then((()=>{}))}scheduleRestart(){return this.wire.sendAction("relaunch-on-close",this.identity).then((()=>{}))}async sendApplicationLog(){const{payload:e}=await this.wire.sendAction("send-application-log",this.identity);return e.data}async setJumpList(e){await this.wire.sendAction("set-jump-list",{config:e,...this.identity})}setTrayIcon(e){return this.wire.sendAction("set-tray-icon",{enabledIcon:e,...this.identity}).then((()=>{}))}setShortcuts(e){return this.wire.sendAction("set-shortcuts",{data:e,...this.identity}).then((()=>{}))}async setShortcutQueryParams(e){await this.wire.sendAction("set-shortcut-query-args",{data:e,...this.identity})}setZoomLevel(e){return this.wire.sendAction("set-application-zoom-level",{level:e,...this.identity}).then((()=>{}))}async setAppLogUsername(e){await this.wire.sendAction("set-app-log-username",{data:e,...this.identity})}getTrayIconInfo(){return this.wire.sendAction("get-tray-icon-info",this.identity).then((({payload:e})=>e.data))}hasTrayIcon(){return this.wire.sendAction("has-tray-icon",this.identity).then((({payload:e})=>e.data))}terminate(){return this.wire.sendAction("terminate-application",this.identity).then((()=>{}))}wait(){return this.wire.sendAction("wait-for-hung-application",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction("get-info",this.identity).then((({payload:e})=>e.data))}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction("application-get-process-info",this.identity);return e}async setFileDownloadLocation(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t};await this.wire.sendAction("set-file-download-location",{...n,downloadLocation:e})}async getFileDownloadLocation(){const{payload:{data:e}}=await this.wire.sendAction("get-file-download-location",this.identity);return e}async showTrayIconPopupMenu(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t},{payload:i}=await this.wire.sendAction("show-tray-icon-popup-menu",{...n,options:e});return i.data}async closeTrayIconPopupMenu(){const{name:e}=this.wire.me,t={uuid:this.identity.uuid,name:e};await this.wire.sendAction("close-tray-icon-popup-menu",{...t})}}return j.Application=i,j}function Z(){return q||(q=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(function(){if(K)return F;K=1,Object.defineProperty(F,"__esModule",{value:!0}),F.ApplicationModule=void 0;const e=d,t=O,n=Y();class i extends e.Base{async wrap(e){this.wire.sendAction("wrap-application").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}wrapSync(e){this.wire.sendAction("wrap-application-sync").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}async _create(e){return void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&void 0===e.isPlatformController&&(e.autoShow=!0),await this.wire.sendAction("create-application",e),this.wrap({uuid:e.uuid})}create(e){return console.warn("Deprecation Warning: fin.Application.create is deprecated. Please use fin.Application.start"),this.wire.sendAction("application-create").catch((e=>{})),this._create(e)}async start(e){this.wire.sendAction("start-application").catch((e=>{}));const t=await this._create(e);return await this.wire.sendAction("run-application",{uuid:e.uuid}),t}async startManyManifests(e,t){return this.wire.sendAction("run-applications",{applications:e,opts:t}).then((()=>{}))}getCurrent(){return this.wire.sendAction("get-current-application").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction("get-current-application-sync").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}async startFromManifest(e,t){this.wire.sendAction("application-start-from-manifest").catch((e=>{}));const n=await this._createFromManifest(e);return await n._run(t),n}createFromManifest(e){return console.warn("Deprecation Warning: fin.Application.createFromManifest is deprecated. Please use fin.Application.startFromManifest"),this.wire.sendAction("application-create-from-manifest").catch((e=>{})),this._createFromManifest(e)}_createFromManifest(e){return this.wire.sendAction("get-application-manifest",{manifestUrl:e}).then((({payload:e})=>{const t=e.data.platform?e.data.platform.uuid:e.data.startup_app.uuid;return this.wrap({uuid:t})})).then((t=>(t._manifestUrl=e,t)))}}return F.ApplicationModule=i,F}(),e),n(Y(),e)}(R)),R}H.WebContents=D;var Q={};Object.defineProperty(Q,"__esModule",{value:!0}),Q.promisifySubscription=void 0;var X,ee,te;function ne(){if(X)return S;X=1,Object.defineProperty(S,"__esModule",{value:!0}),S._Window=void 0;const e=Z(),t=H,n=J(),i=T,r=Q;class o extends t.WebContents{constructor(e,t){super(e,t,"window")}async createWindow(e){this.wire.sendAction("window-create-window",this.identity).catch((e=>{}));const t=await(0,r.promisifySubscription)(this,"fire-constructor-callback");void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&(e.autoShow=!0),(0,i.handleDeprecatedWarnings)(e);const n=this.wire.environment.createChildContent({entityType:"window",options:e}),[o]=await Promise.all([t.getValue(),n]);let s;const{success:a}=o,c=o.data,{message:d}=c;s=a?{httpResponseCode:c.httpResponseCode,apiInjected:c.apiInjected}:{message:c.message,networkErrorCode:c.networkErrorCode,stack:c.stack};const h={message:d,cbPayload:s,success:a};try{this.getWebWindow().fin.__internal_.openerSuccessCBCalled()}catch(e){}return h.success?this:Promise.reject(h)}getAllFrames(){return this.wire.sendAction("get-all-frames",this.identity).then((({payload:e})=>e.data))}getBounds(){return this.wire.sendAction("get-window-bounds",this.identity).then((({payload:e})=>e.data))}center(){return this.wire.sendAction("center-window",this.identity).then((()=>{}))}blur(){return this.wire.sendAction("blur-window",this.identity).then((()=>{}))}bringToFront(){return this.wire.sendAction("bring-window-to-front",this.identity).then((()=>{}))}animate(e,t){return this.wire.sendAction("animate-window",{transitions:e,options:t,...this.identity}).then((()=>{}))}hide(){return this.wire.sendAction("hide-window",this.identity).then((()=>{}))}close(e=!1){return this.wire.sendAction("close-window",{force:e,...this.identity}).then((()=>{Object.setPrototypeOf(this,null)}))}focusedWebViewWasChanged(){return this.wire.sendAction("focused-webview-changed",this.identity).then((()=>{}))}getNativeId(){return this.wire.sendAction("get-window-native-id",this.identity).then((({payload:e})=>e.data))}async getCurrentViews(){const{payload:e}=await this.wire.sendAction("window-get-views",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}disableFrame(){return console.warn("Function is deprecated; use disableUserMovement instead."),this.wire.sendAction("disable-window-frame",this.identity).then((()=>{}))}disableUserMovement(){return this.wire.sendAction("disable-window-frame",this.identity).then((()=>{}))}enableFrame(){return console.warn("Function is deprecated; use enableUserMovement instead."),this.wire.sendAction("enable-window-frame",this.identity).then((()=>{}))}enableUserMovement(){return this.wire.sendAction("enable-window-frame",this.identity).then((()=>{}))}flash(){return this.wire.sendAction("flash-window",this.identity).then((()=>{}))}stopFlashing(){return this.wire.sendAction("stop-flash-window",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction("get-window-info",this.identity).then((({payload:e})=>e.data))}async getLayout(e){this.wire.sendAction("window-get-layout",this.identity).catch((e=>{}));const t=await this.getOptions();if(!t.layout&&!t.layoutSnapshot)throw new Error("Window does not have a Layout");return this.fin.Platform.Layout.wrap(e??this.identity)}getOptions(){return this.wire.sendAction("get-window-options",this.identity).then((({payload:e})=>e.data))}getParentApplication(){return this.wire.sendAction("window-get-parent-application",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity))}getParentWindow(){return this.wire.sendAction("window-get-parent-window",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity)).then((e=>e.getWindow()))}async getSnapshot(e){const t={area:e,...this.identity};console.warn("Window.getSnapshot has been deprecated, please use Window.capturePage");return(await this.wire.sendAction("get-window-snapshot",t)).payload.data}getState(){return this.wire.sendAction("get-window-state",this.identity).then((({payload:e})=>e.data))}getWebWindow(){return this.wire.sendAction("window-get-web-window",this.identity).catch((e=>{})),this.wire.environment.getWebWindow(this.identity)}isMainWindow(){return this.wire.sendAction("window-is-main-window",this.identity).catch((e=>{})),this.me.uuid===this.me.name}isShowing(){return this.wire.sendAction("is-window-showing",this.identity).then((({payload:e})=>e.data))}maximize(){return this.wire.sendAction("maximize-window",this.identity).then((()=>{}))}minimize(){return this.wire.sendAction("minimize-window",this.identity).then((()=>{}))}moveBy(e,t,n){return this.wire.sendAction("move-window-by",{deltaLeft:e,deltaTop:t,positioningOptions:n,...this.identity}).then((()=>{}))}moveTo(e,t,n){return this.wire.sendAction("move-window",{left:e,top:t,positioningOptions:n,...this.identity}).then((()=>{}))}resizeBy(e,t,n,i){return this.wire.sendAction("resize-window-by",{deltaWidth:Math.floor(e),deltaHeight:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}resizeTo(e,t,n,i){return this.wire.sendAction("resize-window",{width:Math.floor(e),height:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}restore(){return this.wire.sendAction("restore-window",this.identity).then((()=>{}))}setAsForeground(){return this.wire.sendAction("set-foreground-window",this.identity).then((()=>{}))}setBounds(e,t){return this.wire.sendAction("set-window-bounds",{...e,...this.identity,positioningOptions:t}).then((()=>{}))}show(e=!1){return this.wire.sendAction("show-window",{force:e,...this.identity}).then((()=>{}))}showAt(e,t,n=!1){return this.wire.sendAction("show-at-window",{force:n,left:Math.floor(e),top:Math.floor(t),...this.identity}).then((()=>{}))}updateOptions(e){return this.wire.sendAction("update-window-options",{options:e,...this.identity}).then((()=>{}))}authenticate(e,t){return this.wire.sendAction("window-authenticate",{userName:e,password:t,...this.identity}).then((()=>{}))}async showPopupMenu(e){const{payload:t}=await this.wire.sendAction("show-popup-menu",{options:e,...this.identity});return t.data}async closePopupMenu(){return this.wire.sendAction("close-popup-menu",{...this.identity}).then((()=>{}))}async dispatchPopupResult(e){this.wire.sendAction("window-dispatch-popup-result",this.identity).catch((e=>{})),await this.wire.sendAction("dispatch-popup-result",{data:e,...this.identity})}async print(e={content:"self"}){switch(e.content){case void 0:case"self":return super.print(e);case"screenshot":return this.wire.sendAction("print-screenshot",this.identity).then((()=>{}));case"views":return this.wire.sendAction("print-views",{...this.identity,options:e}).then((()=>{}));default:return}}}return S._Window=o,S}function ie(){return te||(te=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(function(){if(ee)return _;ee=1,Object.defineProperty(_,"__esModule",{value:!0}),_._WindowModule=void 0;const e=d,t=O,n=ne();class i extends e.Base{async wrap(e){this.wire.sendAction("window-wrap").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}wrapSync(e){this.wire.sendAction("window-wrap-sync").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}create(e){return this.wire.sendAction("create-window").catch((e=>{})),new n._Window(this.wire,{uuid:this.me.uuid,name:e.name}).createWindow(e)}getCurrent(){if(this.wire.sendAction("get-current-window").catch((e=>{})),!this.wire.me.isWindow)throw new Error("You are not in a Window context");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction("get-current-window-sync").catch((e=>{})),!this.wire.me.isWindow)throw new Error("You are not in a Window context");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return _._WindowModule=i,_}(),e),n(ne(),e)}(M)),M}Q.promisifySubscription=async(e,t,n=(()=>!0),i)=>{let r,o,s;const a=new Promise(((e,t)=>{r=e,o=t})),c=e=>{n(e)&&(clearTimeout(s),r(e))};return await e.on(t,c),i&&(s=setTimeout((()=>o(new Error("event timed out"))),i)),a.finally((()=>{e.removeListener(t,c).catch((()=>null))})),{getValue:()=>a}},Object.defineProperty(c,"__esModule",{value:!0}),c.System=void 0;const re=d,oe=g,se=ie(),ae=t;class ce extends re.EmitterBase{constructor(e){super(e,"system")}sendExternalProcessRequest(e,t){return new Promise(((n,i)=>{const r="external-process-exited";let o,s,a,c;"function"==typeof t.listener&&(a=e=>{const n=e||{};s={topic:"exited",uuid:n.processUuid||"",exitCode:n.exitCode||0},o===e.processUuid&&(t.listener(s),c.removeListener(r,a))},this.wire.me.name||(this.wire.me.name=this.wire.me.uuid),c=new se._Window(this.wire,this.wire.me),c.on(r,a)),this.wire.sendAction(e,t).then((({payload:e})=>{o=e.data.uuid,n(e.data),s&&o===s.uuid&&(t.listener(s),c.removeListener(r,a))})).catch((e=>{c&&c.removeListener(r,a),i(e)}))}))}getVersion(){return this.wire.sendAction("get-version").then((({payload:e})=>e.data))}clearCache(e){return this.wire.sendAction("clear-cache",e).then((()=>{}))}deleteCacheOnExit(){return this.wire.sendAction("delete-cache-request").then((()=>{}))}exit(){return this.wire.sendAction("exit-desktop").then((()=>{}))}async fetchManifest(e){const{payload:{data:t}}=await this.wire.sendAction("fetch-manifest",{manifestUrl:e});return t}flushCookieStore(){return this.wire.sendAction("flush-cookie-store").then((()=>{}))}getAllWindows(){return this.wire.sendAction("get-all-windows").then((({payload:e})=>e.data))}getAllApplications(){return this.wire.sendAction("get-all-applications").then((({payload:e})=>e.data))}getCommandLineArguments(){return this.wire.sendAction("get-command-line-arguments").then((({payload:e})=>e.data))}async getCrashReporterState(){const{payload:{data:{diagnosticMode:e,isRunning:t}}}=await this.wire.sendAction("get-crash-reporter-state");return console.warn("diagnosticMode property is deprecated. It will be removed in a future version"),{diagnosticMode:e,diagnosticsMode:e,isRunning:t}}async startCrashReporter(e){const t=e,n={...t,diagnosticMode:t.diagnosticsMode||t.diagnosticMode},{payload:{data:{diagnosticMode:i,isRunning:r}}}=await this.wire.sendAction("start-crash-reporter",n);return{diagnosticMode:i,diagnosticsMode:i,isRunning:r}}getUniqueUserId(){return this.wire.sendAction("get-unique-user-id").then((({payload:e})=>e.data))}getEntityInfo(e,t){return this.wire.sendAction("get-entity-info",{uuid:e,name:t}).then((({payload:e})=>e.data))}getEnvironmentVariable(e){return this.wire.sendAction("get-environment-variable",{environmentVariables:e}).then((({payload:e})=>e.data))}getFocusedWindow(){return this.wire.sendAction("get-focused-window").then((({payload:e})=>e.data))}async isAppCertified(e){const{payload:{data:{certifiedInfo:t}}}=await this.wire.sendAction("is-app-certified",{manifestUrl:e});return t}getInstalledRuntimes(){return this.wire.sendAction("get-installed-runtimes").then((({payload:e})=>e.data.runtimes))}async getInstalledApps(){const{payload:{data:{installedApps:e}}}=await this.wire.sendAction("get-installed-apps");return e}getLog(e){return this.wire.sendAction("view-log",e).then((({payload:e})=>e.data))}getMachineId(){return this.wire.sendAction("get-machine-id").then((({payload:e})=>e.data))}getMinLogLevel(){return this.wire.sendAction("get-min-log-level").then((({payload:e})=>e.data))}getLogList(){return this.wire.sendAction("list-logs").then((({payload:e})=>e.data))}getMonitorInfo(){return this.wire.sendAction("get-monitor-info").then((({payload:e})=>e.data))}getMousePosition(){return this.wire.sendAction("get-mouse-position").then((({payload:e})=>e.data))}getProcessList(){return console.warn("System.getProcessList has been deprecated. Please consider using our new process APIs: Window.getProcessInfo, View.getProcessInfo, Application.getProcessInfo, System.getAllProcessInfo"),this.wire.sendAction("process-snapshot").then((({payload:e})=>e.data))}async getAllProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction("get-all-process-info",this.identity);return e}getProxySettings(){return this.wire.sendAction("get-proxy-settings").then((({payload:e})=>e.data))}getRuntimeInfo(){return this.wire.sendAction("get-runtime-info").then((({payload:e})=>e.data))}getRvmInfo(){return this.wire.sendAction("get-rvm-info").then((({payload:e})=>e.data))}getHostSpecs(){return this.wire.sendAction("get-host-specs").then((({payload:e})=>e.data))}getOSInfo(){return this.wire.sendAction("get-os-info").then((({payload:e})=>e.data))}launchExternalProcess(e){return this.sendExternalProcessRequest("launch-external-process",e)}monitorExternalProcess(e){return this.sendExternalProcessRequest("monitor-external-process",e)}log(e,t){return this.wire.sendAction("write-to-log",{level:e,message:t}).then((()=>{}))}openUrlWithBrowser(e){return this.wire.sendAction("open-url-with-browser",{url:e}).then((()=>{}))}async registerCustomProtocol(e){if("object"!=typeof e)throw new Error("Must provide an object with a `protocolName` property having a string value.");await this.wire.sendAction("register-custom-protocol",e)}async unregisterCustomProtocol(e){await this.wire.sendAction("unregister-custom-protocol",{protocolName:e})}async getCustomProtocolState(e){return this.wire.sendAction("get-custom-protocol-state",{protocolName:e}).then((({payload:e})=>e.data))}releaseExternalProcess(e){return this.wire.sendAction("release-external-process",{uuid:e}).then((()=>{}))}showDeveloperTools(e){return this.wire.sendAction("show-developer-tools",e).then((()=>{}))}terminateExternalProcess(e){return this.wire.sendAction("terminate-external-process",e).then((()=>{}))}updateProxySettings(e){return this.wire.sendAction("update-proxy",e).then((()=>{}))}async downloadAsset(e,t){const n=()=>{};let i=n,r=n;const o=new Promise(((e,t)=>{i=e,r=t}));if("openfin"!==this.wire.environment.type)throw new oe.NotSupportedError("downloadAsset only supported in an OpenFin Render process");const s=oe.RuntimeError.getCallSite(),a=this.wire.environment.getNextMessageId().toString(),c=`asset-download-progress-${a}`,d=`asset-download-error-${a}`,h=`asset-download-complete-${a}`,l=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},u=()=>{this.removeListener(c,l)};await Promise.all([this.on(c,l),this.once(d,(e=>{u();const{reason:t,err:n}=e;r(new oe.RuntimeError({reason:t,error:n},s))})),this.once(h,(()=>{u(),i()}))]);const p=Object.assign(e,{downloadId:a});return await this.wire.sendAction("download-asset",p).catch((e=>{throw u(),e})),o}downloadRuntime(e,t){const n=oe.RuntimeError.getCallSite();return new Promise(((i,r)=>{if("openfin"!==this.wire.environment.type)return void r(new oe.NotSupportedError("downloadRuntime only supported in an OpenFin Render process"));const o=this.wire.environment.getNextMessageId().toString(),s=`runtime-download-progress-${o}`,a=`runtime-download-error-${o}`,c=`runtime-download-complete-${o}`,d=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},h=()=>{this.removeListener(s,d)};this.on(s,d),this.once(a,(e=>{h();const{reason:t,err:i}=e;r(new oe.RuntimeError({reason:t,error:i},n))})),this.once(c,(()=>{h(),i()}));const l=Object.assign(e,{downloadId:o});this.wire.sendAction("download-runtime",l).catch((e=>{h(),r(e)}))}))}downloadPreloadScripts(e){return this.wire.sendAction("download-preload-scripts",{scripts:e}).then((({payload:e})=>e.data))}getAllExternalApplications(){return this.wire.sendAction("get-all-external-applications").then((({payload:e})=>e.data))}getAppAssetInfo(e){return this.wire.sendAction("get-app-asset-info",e).then((({payload:e})=>e.data))}getCookies(e){const t=this.wire.environment.getUrl(),n=Object.assign(e,{url:t});return this.wire.sendAction("get-cookies",n).then((({payload:e})=>e.data))}setMinLogLevel(e){return this.wire.sendAction("set-min-log-level",{level:e}).then((()=>{}))}resolveUuid(e){return this.wire.sendAction("resolve-uuid",{entityKey:e}).then((({payload:e})=>e.data))}executeOnRemote(e,t){return t.requestingIdentity=e,this.wire.ferryAction(t)}readRegistryValue(e,t,n){return this.wire.sendAction("read-registry-value",{rootKey:e,subkey:t,value:n}).then((({payload:e})=>e.data))}registerExternalConnection(e){return this.wire.sendAction("register-external-connection",{uuid:e}).then((({payload:e})=>e.data))}async getServiceConfiguration(e){if("string"!=typeof e.name)throw new Error("Must provide an object with a `name` property having a string value");const{name:t}=e;return this.wire.sendAction("get-service-configuration",{name:t}).then((({payload:e})=>e.data))}async getSystemAppConfig(e){if("string"!=typeof e)throw new Error("Must provide a string value for name of system app");return this.wire.sendAction("get-system-app-configuration",{name:e}).then((({payload:e})=>e.data))}async registerShutdownHandler(e){this.wire.sendAction("system-register-shutdown-handler").catch((e=>{}));const{uuid:t,name:n}=this.wire.me;this.on("system-shutdown",(i=>{e({proceed:()=>{this.wire.environment.raiseEvent("application/system-shutdown-handled",{uuid:t,name:n,topic:"application"})}})}))}runRvmHealthCheck(){return this.wire.sendAction("run-rvm-health-check").then((({payload:e})=>e.data))}async launchManifest(e,t={}){const{subscribe:n,...i}=t,r=i;if(n){const e=new ae.EventEmitter;n(e);const t="app-version-progress",i="runtime-status",o="app-version-complete",s="app-version-error",a=this.wire.environment.getNextMessageId().toString();r.appVersionId=a;const c=[o,t,i,s],d=e=>{const{appVersionId:t,topic:n,type:i,...r}=e;return{...r,type:c.find((e=>i.includes(e)))}},h=t=>{const n=d(t);e.emit(n.type,n)},l=()=>{this.removeListener(`${t}.${a}`,h),this.removeListener(`${i}.${a}`,h),this.removeListener(`${o}.${a}`,h),this.removeListener(`${s}.${a}`,h),this.removeListener(`${o}.${a}`,l),this.removeListener(`${s}.${a}`,l)};await Promise.all([this.on(`${t}.${a}`,h),this.on(`${i}.${a}`,h),this.once(`${o}.${a}`,h),this.once(`${s}.${a}`,h),this.once(`${o}.${a}`,l),this.once(`${s}.${a}`,l)])}return(await this.wire.sendAction("launch-manifest",{manifestUrl:e,opts:r})).payload.data.manifest}async queryPermissionForCurrentContext(e){const t={uuid:this.wire.me.uuid,name:this.wire.me.name};return(await this.wire.sendAction("query-permission-for-current-context",{apiName:e,identity:t})).payload.data}async enableNativeWindowIntegrationProvider(e){const{payload:t}=await this.wire.sendAction("enable-native-window-integration-provider",{permissions:e});return t.data}async registerUsage({data:e,type:t}){await this.wire.sendAction("register-usage",{data:e,type:t})}async getPrinters(){const{payload:e}=await this.wire.sendAction("system-get-printers");return e.data}async updateProcessLoggingOptions(e){await this.wire.sendAction("system-update-process-logging-options",{options:e})}async getDomainSettings(){const{payload:{data:e}}=await this.wire.sendAction("get-domain-settings",this.identity);return e}async setDomainSettings(e){await this.wire.sendAction("set-domain-settings",{domainSettings:e,...this.identity})}async refreshExtensions(){const{payload:e}=await this.wire.sendAction("refresh-extensions");return e.data}async getInstalledExtensions(){const{payload:e}=await this.wire.sendAction("get-installed-extensions");return e.data}}c.System=ce;var de={},he={};Object.defineProperty(he,"__esModule",{value:!0}),he.RefCounter=void 0;he.RefCounter=class{constructor(){this.topicRefMap=new Map}incRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t+1;n=i,this.topicRefMap.set(e,i)}else this.topicRefMap.set(e,1),n=1;return n}decRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t-1;this.topicRefMap.set(e,i),n=i}else n=-1;return n}actOnFirst(e,t,n){return 1===this.incRefCount(e)?t():n()}actOnLast(e,t,n){return 0===this.decRefCount(e)?t():n()}};var le={},ue={},pe={};Object.defineProperty(pe,"__esModule",{value:!0}),pe.ChannelBase=pe.ProtectedItems=void 0;const we=e=>async(t,n,i)=>{const r=await e(t,n,i);return void 0===r?n:r};pe.ProtectedItems=class{constructor(e,t){this.providerIdentity=e,this.close=t}};class ye{static defaultAction(e){throw new Error(`No action registered at target for ${e}`)}constructor(){this.subscriptions=new Map}async processAction(e,t,n){try{const i=this.subscriptions.has(e)?this.subscriptions.get(e):(t,n)=>(this.defaultAction??ye.defaultAction)(e,t,n),r=this.preAction?await this.preAction(e,t,n):t,o=await i(r,n);return this.postAction?await this.postAction(e,o,n):o}catch(t){if(this.errorMiddleware)return this.errorMiddleware(e,t,n);throw t}}beforeAction(e){if(this.preAction)throw new Error("Already registered beforeAction middleware");this.preAction=we(e)}onError(e){if(this.errorMiddleware)throw new Error("Already registered error middleware");this.errorMiddleware=e}afterAction(e){if(this.postAction)throw new Error("Already registered afterAction middleware");this.postAction=we(e)}remove(e){this.subscriptions.delete(e)}setDefaultAction(e){if(this.defaultAction)throw new Error("default action can only be set once");this.defaultAction=e}register(e,t){if(this.subscriptions.has(e))throw new Error(`Subscription already registered for action: ${e}. Unsubscribe before adding new subscription`);return this.subscriptions.set(e,t),!0}}pe.ChannelBase=ye;var fe,ge,me,ve=s&&s.__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)},Ce=s&&s.__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};Object.defineProperty(ue,"__esModule",{value:!0}),ue.ChannelClient=void 0;const be=pe,Ie=new Map;class Ee extends be.ChannelBase{static closeChannelByEndpointId(e){const t=Ie.get(e);t&&ve(t,me,"f").call(t)}static handleProviderDisconnect(e){for(const t of Ie.values())t.providerIdentity.channelId===e.channelId&&(t.disconnectListener(e),ve(t,me,"f").call(t))}constructor(e,t,n){super(),fe.set(this,void 0),ge.set(this,void 0),this.processAction=(e,t,n)=>super.processAction(e,t,n),me.set(this,(()=>{Ie.delete(this.endpointId),ve(this,ge,"f").close()})),Ce(this,fe,new be.ProtectedItems(e,t),"f"),this.disconnectListener=()=>{},this.endpointId=e.endpointId,Ce(this,ge,n,"f"),Ie.set(this.endpointId,this),n.receive(this.processAction)}get providerIdentity(){return ve(this,fe,"f").providerIdentity}async dispatch(e,t){if(ve(this,ge,"f").isEndpointConnected(this.providerIdentity.channelId))return ve(this,ge,"f").send(this.providerIdentity.channelId,e,t);throw new Error("The client you are trying to dispatch from is disconnected from the target provider.")}onDisconnection(e){this.disconnectListener=t=>{try{e(t)}catch(e){throw new Error(`Error while calling the onDisconnection callback: ${e.message}`)}finally{this.disconnectListener=()=>{}}}}async disconnect(){await this.sendDisconnectAction(),ve(this,me,"f").call(this)}async sendDisconnectAction(){const e=ve(this,fe,"f");await e.close()}static async wireClose(e,t,n){const{channelName:i,uuid:r,name:o}=t;await e.sendAction("disconnect-from-channel",{channelName:i,uuid:r,name:o,endpointId:n})}}ue.ChannelClient=Ee,fe=new WeakMap,ge=new WeakMap,me=new WeakMap;var xe={},Ae={};Object.defineProperty(Ae,"__esModule",{value:!0}),Ae.exhaustiveCheck=void 0,Ae.exhaustiveCheck=function(e,t){throw new Error(`Unsupported value: ${e}${t?`\n Supported values are: ${t.join("")}`:""}`)};var Pe,Me,_e,Oe={},Se=s&&s.__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},Re=s&&s.__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)};Object.defineProperty(Oe,"__esModule",{value:!0}),Oe.ClassicInfo=Oe.ClassicStrategy=void 0;Oe.ClassicStrategy=class{constructor(e,t,n,i){this.messageReceiver=t,this.endpointId=n,this.providerIdentity=i,Pe.set(this,void 0),Me.set(this,new Map),_e.set(this,new Map),this.send=async(e,t,n)=>{const i=Re(this,Me,"f").get(e);if(!i)throw new Error(`Could not locate routing info for endpoint ${e}`);const r={...i};r.isLocalEndpointId&&delete r.endpointId,delete r.isLocalEndpointId;const o=Re(this,Pe,"f").sendAction("send-channel-message",{...r,providerIdentity:this.providerIdentity,action:t,payload:n});Re(this,_e,"f").get(e)?.add(o);return(await o.catch((e=>{throw new Error(e.message)})).finally((()=>{Re(this,_e,"f").get(e)?.delete(o)}))).payload.data.result},this.close=async()=>{this.messageReceiver.removeEndpoint(this.providerIdentity.channelId,this.endpointId),[...Re(this,Me,"f").keys()].forEach((e=>this.closeEndpoint(e))),Se(this,Me,new Map,"f")},Se(this,Pe,e,"f")}onEndpointDisconnect(e,t){}receive(e){this.messageReceiver.addEndpoint(e,this.providerIdentity.channelId,this.endpointId)}async closeEndpoint(e){const t=Re(this,Me,"f").get(e);Re(this,Me,"f").delete(e);const n=Re(this,_e,"f").get(e);n?.forEach((n=>{const i=`Channel connection with identity uuid: ${t?.uuid} / name: ${t?.name} / endpointId: ${e} no longer connected.`;n.cancel(new Error(i))}))}isEndpointConnected(e){return Re(this,Me,"f").has(e)}addEndpoint(e,t){Re(this,Me,"f").set(e,t.endpointIdentity),Re(this,_e,"f").set(e,new Set)}isValidEndpointPayload(e){return"string"==typeof e?.endpointIdentity?.endpointId||"string"==typeof e?.endpointIdentity?.channelId}},Pe=new WeakMap,Me=new WeakMap,_e=new WeakMap,Oe.ClassicInfo={version:5,minimumVersion:0,type:"classic"};var Fe={},je={},ke={};Object.defineProperty(ke,"__esModule",{value:!0}),ke.errorToPOJO=void 0,ke.errorToPOJO=function(e){return{stack:e.stack,name:e.name,message:e.message,toString:()=>e.stack||e.toString()}};var Le,Te,$e=s&&s.__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)},Be=s&&s.__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};Object.defineProperty(je,"__esModule",{value:!0}),je.RTCEndpoint=void 0;const Ge=ke;je.RTCEndpoint=class{static isValidEndpointPayload(e){const t=e=>"object"==typeof e&&null!==e;return t(e)&&t(e.endpointIdentity)&&t(e.rtc)&&"string"==typeof e.endpointIdentity.endpointId}constructor({rtc:e,endpointIdentity:t}){this.responseMap=new Map,Le.set(this,null),Te.set(this,void 0),this.connectionStateChangeHandler=e=>{"connected"!==this.rtc.rtcClient.connectionState&&(this.rtc.rtcClient.removeEventListener("connectionstatechange",this.connectionStateChangeHandler),this.close(),$e(this,Te,"f")&&$e(this,Te,"f").call(this))},this.send=async(e,t)=>{const n=`message-${Math.random()}`,i=new Promise(((e,t)=>{this.responseMap.set(n,{resolve:e,reject:t})}));return this.rtc.channels.request.send(JSON.stringify({action:e,payload:t,messageId:n})),i},this.close=()=>{this.responseMap.forEach((e=>e.reject("Connection has closed."))),this.responseMap=new Map,this.rtc.channels.request.close(),this.rtc.channels.response.close(),this.rtc.rtcClient.close()},this.rtc=e,this.endpointIdentity=t,this.rtc.channels.response.addEventListener("message",(e=>{let{data:t}=e;e.data instanceof ArrayBuffer&&(t=(new TextDecoder).decode(e.data));const{messageId:n,payload:i,success:r,error:o}=JSON.parse(t),{resolve:s,reject:a}=this.responseMap.get(n)??{};s&&a?(this.responseMap.delete(n),r?s(i):a(o)):(console.log("Could not find id in responseMap."),console.log(e))})),this.rtc.channels.request.addEventListener("message",(async e=>{let{data:n}=e;e.data instanceof ArrayBuffer&&(n=(new TextDecoder).decode(e.data));const{messageId:i,action:r,payload:o}=JSON.parse(n);if($e(this,Le,"f"))try{const e=await $e(this,Le,"f").call(this,r,o,t);this.rtc.channels.response.send(JSON.stringify({messageId:i,payload:e,success:!0}))}catch(e){"open"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,error:(0,Ge.errorToPOJO)(e),success:!1}))}else"open"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,success:!1,error:"Connection not ready."}))})),this.rtc.rtcClient.addEventListener("connectionstatechange",this.connectionStateChangeHandler),Object.values(this.rtc.channels).forEach((e=>{e.onclose=e=>{[...this.responseMap.values()].forEach((e=>e.reject(new Error("RTCDataChannel closed unexpectedly, this is most commonly caused by message size. Note: RTC Channels have a message size limit of ~255kB.")))),this.close(),$e(this,Te,"f")&&$e(this,Te,"f").call(this)}}))}onDisconnect(e){if($e(this,Te,"f"))throw new Error("RTCEndpoint disconnectListener cannot be set twice.");Be(this,Te,e,"f")}receive(e){if($e(this,Le,"f"))throw new Error("You have already set a listener for this RTC Endpoint.");Be(this,Le,e,"f")}get connected(){return"connected"===this.rtc.rtcClient.connectionState}},Le=new WeakMap,Te=new WeakMap;var We,He,Ne,De={},Ue=s&&s.__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)},Ve=s&&s.__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};Object.defineProperty(De,"__esModule",{value:!0}),De.EndpointStrategy=void 0;De.EndpointStrategy=class{constructor(e,t,n){this.EndpointType=e,this.StrategyName=n,We.set(this,null),He.set(this,new Map),Ne.set(this,!0),this.send=async(e,t,n)=>this.getEndpointById(e).send(t,n),this.close=async()=>{Ue(this,Ne,"f")&&(Ue(this,He,"f").forEach((e=>e.close())),Ve(this,He,new Map,"f")),Ve(this,Ne,!1,"f")},this.isValidEndpointPayload=t}onEndpointDisconnect(e,t){this.getEndpointById(e).onDisconnect(t)}receive(e){if(Ue(this,We,"f"))throw new Error(`You have already set a listener for this ${this.StrategyName} Strategy`);Ve(this,We,e,"f"),Ue(this,He,"f").forEach((e=>e.receive(Ue(this,We,"f"))))}getEndpointById(e){const t=Ue(this,He,"f").get(e);if(!t)throw new Error(`Client with endpoint id ${e} is not connected`);return t}get connected(){return Ue(this,Ne,"f")}isEndpointConnected(e){return Ue(this,He,"f").has(e)}addEndpoint(e,t){if(!Ue(this,Ne,"f"))return void console.warn(`Adding endpoint to disconnected ${this.StrategyName} Strategy`);const n=new this.EndpointType(t);Ue(this,We,"f")&&n.receive(Ue(this,We,"f")),Ue(this,He,"f").set(e,n)}async closeEndpoint(e){Ue(this,He,"f").delete(e)}},We=new WeakMap,He=new WeakMap,Ne=new WeakMap,Object.defineProperty(Fe,"__esModule",{value:!0}),Fe.RTCInfo=Fe.RTCStrategy=void 0;const ze=je,Ke=De;class qe extends Ke.EndpointStrategy{constructor(){super(ze.RTCEndpoint,ze.RTCEndpoint.isValidEndpointPayload,"RTC")}}Fe.RTCStrategy=qe,Fe.RTCInfo={version:2,minimumVersion:0,type:"rtc"};var Je={};Object.defineProperty(Je,"__esModule",{value:!0}),Je.RTCICEManager=void 0;const Ye=d;class Ze extends Ye.EmitterBase{constructor(e){super(e,"channel"),this.ensureChannelOpened=e=>new Promise(((t,n)=>{if("open"===e.readyState)t();else if("connecting"===e.readyState){const n=()=>{e.removeEventListener("open",n),t()};e.addEventListener("open",n)}else n(new Error("This Channel has already closed"))}))}static createDataChannelPromise(e,t){let n;const i=new Promise((e=>{n=e})),r=i=>{const o=()=>{i.channel.removeEventListener("open",o),n(i.channel)};i.channel.label===e&&(i.channel.addEventListener("open",o),t.removeEventListener("datachannel",r))};return t.addEventListener("datachannel",r),i}async listenForProviderIce(e,t){await this.on(this.createProviderEventName(e),t,{timestamp:Date.now()})}async raiseProviderIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createProviderEventName(e)),t)}async listenForClientIce(e,t){await this.on(this.createClientEventName(e),t,{timestamp:Date.now()})}async raiseClientIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createClientEventName(e)),t)}cleanupIceListeners(e){this.removeAllListeners(this.createClientEventName(e)),this.removeAllListeners(this.createProviderEventName(e))}createClientEventName(e){return`ice-client-${e}`}createProviderEventName(e){return`ice-provider-${e}`}createRouteString(e){return`channel/${e}`}createRtcPeer(){return this.wire.environment.getRtcPeer()}async startClientOffer(){const e=Math.random().toString(),t=this.createRtcPeer();t.addEventListener("icecandidate",(async t=>{t.candidate&&await this.raiseClientIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForProviderIce(e,(async e=>{await t.addIceCandidate(e.candidate)}));const n={request:t.createDataChannel("request"),response:t.createDataChannel("response")},i=await t.createOffer();await t.setLocalDescription(i);const r=Promise.all([n.request,n.response].map(this.ensureChannelOpened)).then((()=>{}));return{rtcClient:t,channels:n,offer:i,rtcConnectionId:e,channelsOpened:r}}async finishClientOffer(e,t,n){return await e.setRemoteDescription(t),await n,!0}async createProviderAnswer(e,t){const n=this.createRtcPeer(),i=Ze.createDataChannelPromise("request",n),r=Ze.createDataChannelPromise("response",n);n.addEventListener("icecandidate",(async t=>{t.candidate&&await this.raiseProviderIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForClientIce(e,(async e=>{await n.addIceCandidate(e.candidate)})),await n.setRemoteDescription(t);const o=await n.createAnswer();await n.setLocalDescription(o);const s=Promise.all([i,r]).then((([t,n])=>(this.cleanupIceListeners(e),{request:t,response:n})));return{rtcClient:n,answer:o,channels:s}}}Je.RTCICEManager=Ze;var Qe={},Xe={};function et(e){return[...e.split(".").reverse().entries()].reduce(((e,[t,n])=>e+ +n*1e4**t),0)}function tt(e,t){return et(e)>=et(t)}function nt(e){return e.split("/")[0]}Object.defineProperty(Xe,"__esModule",{value:!0}),Xe.runtimeUuidMeetsMinimumRuntimeVersion=Xe.parseRuntimeUuid=Xe.meetsMinimumRuntimeVersion=void 0,Xe.meetsMinimumRuntimeVersion=tt,Xe.parseRuntimeUuid=nt,Xe.runtimeUuidMeetsMinimumRuntimeVersion=function(e,t){return tt(nt(e),t)};var it,rt,ot,st,at,ct=s&&s.__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)},dt=s&&s.__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};Object.defineProperty(Qe,"__esModule",{value:!0}),Qe.ChannelProvider=void 0;const ht=pe,lt=Xe;class ut extends ht.ChannelBase{get connections(){return[...ct(this,it,"f")]}static handleClientDisconnection(e,t){const n=e.connections.find((e=>e.endpointId===t.endpointId));if(n)ct(e,st,"f").call(e,n);else{e.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name)).forEach(ct(e,st,"f"))}e.disconnectListener(t)}static setProviderRemoval(e,t){ut.removalMap.set(e,t)}constructor(e,t,n){super(),it.set(this,void 0),rt.set(this,void 0),ot.set(this,void 0),st.set(this,(e=>{const t=this.connections.filter((t=>t.endpointId!==e.endpointId));ct(this,ot,"f").closeEndpoint(e.endpointId),dt(this,it,t,"f")})),this.processAction=async(e,t,n)=>(ut.clientIsMultiRuntime(n)&&!(0,lt.runtimeUuidMeetsMinimumRuntimeVersion)(n.runtimeUuid,"18.87.56.0")?this.handleMultiRuntimeLegacyClient(n):this.checkForClientConnection(n),super.processAction(e,t,n)),at.set(this,(()=>{ct(this,ot,"f").close();const e=ut.removalMap.get(this);e&&e()})),dt(this,rt,new ht.ProtectedItems(e,t),"f"),this.connectListener=()=>{},this.disconnectListener=()=>{},dt(this,it,[],"f"),dt(this,ot,n,"f"),n.receive(this.processAction)}dispatch(e,t,n){const i=e.endpointId??this.getEndpointIdForOpenFinId(e,t);return i&&ct(this,ot,"f").isEndpointConnected(i)?ct(this,ot,"f").send(i,t,n):Promise.reject(new Error(`Client connection with identity uuid: ${e.uuid} / name: ${e.name} / endpointId: ${i} no longer connected.`))}async processConnection(e,t){return ct(this,it,"f").push(e),this.connectListener(e,t)}publish(e,t){return this.connections.map((n=>ct(this,ot,"f").send(n.endpointId,e,t)))}onConnection(e){this.connectListener=e}onDisconnection(e){this.disconnectListener=e}async destroy(){const e=ct(this,rt,"f");e.providerIdentity,dt(this,it,[],"f"),await e.close(),ct(this,at,"f").call(this)}async getAllClientInfo(){return this.connections.map((e=>{const{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}=e;return{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}}))}checkForClientConnection(e){if(!this.isClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider.\n Client Identity: {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}isClientConnected(e){return ut.clientIdentityIncludesEndpointId(e)?this.connections.some((t=>t.endpointId===e.endpointId&&t.uuid===e.uuid&&t.name===e.name)):this.isLegacyClientConnected(e)}isLegacyClientConnected(e){return this.connections.some((t=>t.uuid===e.uuid&&t.name===e.name))}handleMultiRuntimeLegacyClient(e){if(!this.isLegacyClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider. Client Identity:\n {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}getEndpointIdForOpenFinId(e,t){const n=this.connections.filter((t=>t.name===e.name&&t.uuid===e.uuid));if(n.length>=2){const n=ct(this,rt,"f"),{uuid:i,name:r}=e,o=n?.providerIdentity.uuid,s=n?.providerIdentity.name;console.warn(`WARNING: Dispatch call may have unintended results. The "to" argument of your dispatch call is missing the\n "endpointId" parameter. The identity you are dispatching to ({uuid: ${i}, name: ${r}})\n has multiple channelClients for this channel. Your dispatched action: (${t}) from the provider:\n ({uuid: ${o}, name: ${s}}) will only be processed by the most recently-created client.`)}return n.pop()?.endpointId}static clientIdentityIncludesEndpointId(e){return void 0!==e.endpointId}static clientIsMultiRuntime(e){return void 0!==e.runtimeUuid}static async wireClose(e,t){await e.sendAction("destroy-channel",{channelName:t})}}Qe.ChannelProvider=ut,it=new WeakMap,rt=new WeakMap,ot=new WeakMap,st=new WeakMap,at=new WeakMap,ut.removalMap=new WeakMap;var pt={};Object.defineProperty(pt,"__esModule",{value:!0}),pt.MessageReceiver=void 0;const wt=ue,yt=d;class ft extends yt.Base{constructor(e){super(e),this.onmessage=e=>"process-channel-message"===e.action&&(this.processChannelMessage(e),!0),this.endpointMap=new Map,this.latestEndpointIdByChannelId=new Map,e.registerMessageHandler(this.onmessage.bind(this))}async processChannelMessage(e){const{senderIdentity:t,providerIdentity:n,action:i,ackToSender:r,payload:o,intendedTargetIdentity:s}=e.payload,a=s.channelId??s.endpointId??this.latestEndpointIdByChannelId.get(n.channelId),c=this.endpointMap.get(a);if(!c)return r.payload.success=!1,r.payload.reason=`Client connection with identity uuid: ${this.wire.me.uuid} / name: ${this.wire.me.name} / endpointId: ${a} no longer connected.`,this.wire.sendRaw(r);try{const e=await c(i,o,t);return r.payload.payload=r.payload.payload||{},r.payload.payload.result=e,this.wire.sendRaw(r)}catch(e){return r.payload.success=!1,r.payload.reason=e.message,this.wire.sendRaw(r)}}addEndpoint(e,t,n){this.endpointMap.set(n,e),t!==n&&this.latestEndpointIdByChannelId.set(t,n)}removeEndpoint(e,t){this.endpointMap.delete(t),this.latestEndpointIdByChannelId.get(e)===t&&this.latestEndpointIdByChannelId.delete(e)}checkForPreviousClientConnection(e){const t=this.latestEndpointIdByChannelId.get(e);t&&(wt.ChannelClient.closeChannelByEndpointId(t),console.warn("You have created a second connection to an older provider. First connection has been removed from the clientMap"),console.warn("If the provider calls publish(), you may receive multiple messages."))}}pt.MessageReceiver=ft;var gt={};Object.defineProperty(gt,"__esModule",{value:!0}),gt.ProtocolManager=void 0;gt.ProtocolManager=class{constructor(e){this.ProtocolsInPreferenceOrder=e,this.DefaultClientProtocols=["classic"],this.DefaultProviderProtocols=["classic"],this.getClientProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultClientProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(", ")}.`);return t},this.getProviderProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultProviderProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(", ")}.`);return t},this.getCompatibleProtocols=(e,t)=>t.supportedProtocols.filter((t=>e.some((e=>e.type===t.type&&t.version>=e.minimumVersion&&e.version>=(t.minimumVersion??0))))).slice(0,t.maxProtocols)}};var mt={};Object.defineProperty(mt,"__esModule",{value:!0});class vt{static combine(e,t){return new vt(e,t)}constructor(e,t){this.primary=e,this.secondary=t}onEndpointDisconnect(e,t){this.primary.onEndpointDisconnect(e,(()=>{this.secondary.isEndpointConnected(e)||t()})),this.secondary.onEndpointDisconnect(e,(()=>{this.primary.isEndpointConnected(e)||t()}))}isValidEndpointPayload(e){return this.primary.isValidEndpointPayload(e)||this.secondary.isValidEndpointPayload(e)}async closeEndpoint(e){await this.primary.closeEndpoint(e),await this.secondary.closeEndpoint(e)}isEndpointConnected(e){return this.primary.isEndpointConnected(e)||this.secondary.isEndpointConnected(e)}async addEndpoint(e,t){this.primary.isValidEndpointPayload(t)&&await this.primary.addEndpoint(e,t),this.secondary.isValidEndpointPayload(t)&&await this.secondary.addEndpoint(e,t)}receive(e){this.primary.receive(e),this.secondary.receive(e)}send(e,t,n){return this.primary.isEndpointConnected(e)?this.primary.send(e,t,n):this.secondary.send(e,t,n)}async close(){await Promise.all([this.primary.close(),this.secondary.close()])}}mt.default=vt;var Ct,bt,It=s&&s.__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},Et=s&&s.__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)},xt=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(xe,"__esModule",{value:!0}),xe.ConnectionManager=void 0;const At=Ae,Pt=d,Mt=Oe,_t=Fe,Ot=Je,St=Qe,Rt=pt,Ft=gt,jt=xt(mt);class kt extends Pt.Base{static getProtocolOptionsFromStrings(e){return e.map((e=>{switch(e){case"rtc":return _t.RTCInfo;case"classic":return Mt.ClassicInfo;default:return(0,At.exhaustiveCheck)(e,["rtc","classic"])}}))}constructor(e){super(e),Ct.set(this,void 0),bt.set(this,void 0),this.removeChannelFromProviderMap=e=>{this.providerMap.delete(e)},this.onmessage=e=>"process-channel-connection"===e.action&&(this.processChannelConnection(e),!0),this.providerMap=new Map,this.protocolManager=new Ft.ProtocolManager("node"===this.wire.environment.type?["classic"]:["rtc","classic"]),It(this,Ct,new Rt.MessageReceiver(e),"f"),It(this,bt,new Ot.RTCICEManager(e),"f"),e.registerMessageHandler(this.onmessage.bind(this))}createProvider(e,t){const n=Object.assign(this.wire.environment.getDefaultChannelOptions().create,e||{}),i=this.protocolManager.getProviderProtocols(n?.protocols),r=i.map((e=>{switch(e){case"rtc":return new _t.RTCStrategy;case"classic":return new Mt.ClassicStrategy(this.wire,Et(this,Ct,"f"),t.channelId,t);default:return(0,At.exhaustiveCheck)(e,["rtc","classic"])}}));let o;if(2===r.length){const[e,t]=r;o=jt.default.combine(e,t)}else{if(1!==r.length)throw new Error("failed to combine strategies");[o]=r}const s=new St.ChannelProvider(t,(()=>St.ChannelProvider.wireClose(this.wire,t.channelName)),o),a=t.channelId;return this.providerMap.set(a,{provider:s,strategy:o,supportedProtocols:kt.getProtocolOptionsFromStrings(i)}),St.ChannelProvider.setProviderRemoval(s,this.removeChannelFromProviderMap.bind(this)),s}async createClientOffer(e){const t=this.protocolManager.getClientProtocols(e?.protocols);let n;return{offer:{supportedProtocols:await Promise.all(t.map((async e=>{switch(e){case"rtc":{const{rtcClient:e,channels:t,offer:i,rtcConnectionId:r,channelsOpened:o}=await Et(this,bt,"f").startClientOffer();return n={rtcClient:e,channels:t,channelsOpened:o},{type:"rtc",version:_t.RTCInfo.version,payload:{offer:i,rtcConnectionId:r}}}case"classic":return{type:"classic",version:Mt.ClassicInfo.version};default:return(0,At.exhaustiveCheck)(e,["rtc","classic"])}}))),maxProtocols:2},rtc:n}}async createClientStrategy(e,t){t.endpointId||(t.endpointId=this.wire.environment.getNextMessageId(),Et(this,Ct,"f").checkForPreviousClientConnection(t.channelId));const n=t.answer??{supportedProtocols:[{type:"classic",version:1}]},i=(await Promise.all(n.supportedProtocols.map((async n=>"rtc"===n.type&&e?(await Et(this,bt,"f").finishClientOffer(e.rtcClient,n.payload.answer,e.channelsOpened),new _t.RTCStrategy):"classic"===n.type?new Mt.ClassicStrategy(this.wire,Et(this,Ct,"f"),t.endpointId,t):null)))).filter((e=>null!==e));let r;if(e&&!i.some((e=>e instanceof _t.RTCStrategy))&&e&&e.rtcClient.close(),i.length>=2)r=jt.default.combine(i[0],i[1]);else{if(!i.length)throw new Error("No compatible protocols");[r]=i}const o={endpointIdentity:t,rtc:e};return r.addEndpoint(t.channelId,o),r}async processChannelConnection(e){const{clientIdentity:t,providerIdentity:n,ackToSender:i,payload:r,offer:o}=e.payload;t.endpointId?t.isLocalEndpointId=!1:(t.endpointId=this.wire.environment.getNextMessageId(),t.isLocalEndpointId=!0);const s=n.channelId,a=this.providerMap.get(s);if(!a)return i.payload.success=!1,i.payload.reason=`Channel "${n.channelName}" has been destroyed.`,this.wire.sendRaw(i);const{provider:c,strategy:d,supportedProtocols:h}=a;try{if(!(c instanceof St.ChannelProvider))throw Error("Cannot connect to a channel client");const e=o??{supportedProtocols:[{type:"classic",version:1}],maxProtocols:1},n=this.protocolManager.getCompatibleProtocols(h,e);if(!n.length)throw new Error("This provider does not support any of the offered protocols.");const s=await c.processConnection(t,r);i.payload.payload=i.payload.payload||{};let a={supportedProtocols:[],endpointPayloadPromise:Promise.resolve({endpointIdentity:t})};return a=await n.reduce((async(e,t)=>{const n=await e;if("rtc"===t.type){const{answer:e,rtcClient:i,channels:r}=await Et(this,bt,"f").createProviderAnswer(t.payload.rtcConnectionId,t.payload.offer);n.supportedProtocols.push({type:"rtc",version:_t.RTCInfo.version,payload:{answer:e}}),n.endpointPayloadPromise=n.endpointPayloadPromise.then((e=>r.then((t=>({...e,rtc:{rtcClient:i,channels:t}})))))}else n.supportedProtocols.push({type:"classic",version:Mt.ClassicInfo.version});return n}),Promise.resolve(a)),a.endpointPayloadPromise.then((e=>d.addEndpoint(t.endpointId,e))),i.payload.payload.result=s,i.payload.payload.answer=a,this.wire.sendRaw(i)}catch(e){return i.payload.success=!1,i.payload.reason=e.message,this.wire.sendRaw(i)}}}xe.ConnectionManager=kt,Ct=new WeakMap,bt=new WeakMap;var Lt,Tt,$t,Bt=s&&s.__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},Gt=s&&s.__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)};Object.defineProperty(le,"__esModule",{value:!0}),le.Channel=void 0;const Wt=t,Ht=G,Nt=d,Dt=ue,Ut=xe,Vt=Qe;function zt(e){const t=Math.floor(e/10),n=Math.min(3e4,500*2**t);return new Promise((e=>{setTimeout((()=>{e(!1)}),n)}))}class Kt extends Nt.EmitterBase{constructor(e){super(e,"channel"),Lt.set(this,void 0),Tt.set(this,new Wt.EventEmitter),$t.set(this,new Ht.AsyncRetryableLazy((async()=>{await Promise.all([this.on("disconnected",(e=>{Dt.ChannelClient.handleProviderDisconnect(e)})),this.on("connected",((...e)=>{Gt(this,Tt,"f").emit("connected",...e)}))]).catch((()=>new Error("error setting up channel connection listeners")))}))),Bt(this,Lt,new Ut.ConnectionManager(e),"f")}async getAllChannels(){return this.wire.sendAction("get-all-channels").then((({payload:e})=>e.data))}async onChannelConnect(e){await this.on("connected",e)}async onChannelDisconnect(e){await this.on("disconnected",e)}async safeConnect(e,t,n){const i={count:0};do{let r=()=>{};const o=new Promise((t=>{r=n=>{e===n.channelName&&t(!0)},Gt(this,Tt,"f").on("connected",r)}));try{if(i.count>0){i.gotConnectedEvent=await Promise.race([zt(i.count),o]);const t=await this.wire.sendAction("connect-to-channel",{...n,retryInfo:i});return console.log(`Successfully connected to channelName: ${e}`),t.payload.data}const t=this.wire.sendAction("connect-to-channel",n);i.originalMessageId=t.messageId;return(await t).payload.data}catch(n){if(!n.message.includes("internal-nack"))throw n;t&&0===i.count&&console.warn(`No channel found for channelName: ${e}. Waiting for connection...`)}finally{i.count+=1,Gt(this,Tt,"f").removeListener("connected",r)}}while(t);throw new Error(`No channel found for channelName: ${e}.`)}async connect(e,t={}){if(await Gt(this,$t,"f").getValue(),!e||"string"!=typeof e)throw new Error("Please provide a channelName string to connect to a channel.");const n={wait:!0,...this.wire.environment.getDefaultChannelOptions().connect,...t},{offer:i,rtc:r}=await Gt(this,Lt,"f").createClientOffer(n);let o;(this.fin.me.isFrame||this.fin.me.isView||this.fin.me.isWindow)&&(o=(await this.fin.me.getInfo()).url);const s={channelName:e,...n,offer:i,connectionUrl:o},a=await this.safeConnect(e,n.wait,s),c=await Gt(this,Lt,"f").createClientStrategy(r,a),d=new Dt.ChannelClient(a,(()=>Dt.ChannelClient.wireClose(this.wire,a,a.endpointId)),c);return c.onEndpointDisconnect(a.channelId,(async()=>{try{await d.sendDisconnectAction()}catch(e){console.warn(`Something went wrong during disconnect for client with uuid: ${a.uuid} / name: ${a.name} / endpointId: ${a.endpointId}.`)}finally{Dt.ChannelClient.handleProviderDisconnect(a)}})),d}async create(e,t){if(!e)throw new Error("Please provide a channelName to create a channel");const{payload:{data:n}}=await this.wire.sendAction("create-channel",{channelName:e}),i=Gt(this,Lt,"f").createProvider(t,n);return this.on("client-disconnected",(t=>{t.channelName===e&&Vt.ChannelProvider.handleClientDisconnection(i,t)})),i}}le.Channel=Kt,Lt=new WeakMap,Tt=new WeakMap,$t=new WeakMap,Object.defineProperty(de,"__esModule",{value:!0}),de.InterAppPayload=de.InterApplicationBus=void 0;const qt=t,Jt=d,Yt=he,Zt=le,Qt=O;class Xt extends Jt.Base{constructor(e){super(e),this.events={subscriberAdded:"subscriber-added",subscriberRemoved:"subscriber-removed"},this.refCounter=new Yt.RefCounter,this.Channel=new Zt.Channel(e),this.emitter=new qt.EventEmitter,e.registerMessageHandler(this.onmessage.bind(this)),this.on=this.emitter.on.bind(this.emitter),this.removeAllListeners=this.emitter.removeAllListeners.bind(this.emitter)}async publish(e,t){await this.wire.sendAction("publish-message",{topic:e,message:t,sourceWindowName:this.me.name})}async send(e,t,n){const i=(0,Qt.validateIdentity)(e);if(i)throw new Error(i);await this.wire.sendAction("send-message",{destinationUuid:e.uuid,destinationWindowName:e.name,topic:t,message:n,sourceWindowName:this.me.name})}subscribe(e,t,n){const i=this.createSubscriptionKey(e.uuid,e.name||"*",t);return this.emitter.on(i,n),this.refCounter.actOnFirst(i,(async()=>{await this.wire.sendAction("subscribe",{sourceUuid:e.uuid,sourceWindowName:e.name||"*",topic:t,destinationWindowName:this.me.name})}),(()=>Promise.resolve()))}unsubscribe(e,t,n){const i=e.name||"*",r=this.createSubscriptionKey(e.uuid,i,t);return this.emitter.removeListener(r,n),this.refCounter.actOnLast(r,(async()=>{await this.wire.sendAction("unsubscribe",{sourceUuid:e.uuid,sourceWindowName:i,topic:t,destinationWindowName:this.me.name})}),(()=>new Promise((e=>e)).then((()=>{}))))}processMessage(e){const{payload:{message:t,sourceWindowName:n,sourceUuid:i,topic:r}}=e,o=[this.createSubscriptionKey(i,n,r),this.createSubscriptionKey(i,"*",r),this.createSubscriptionKey("*","*",r)],s={uuid:i,name:n};o.forEach((e=>{this.emitter.emit(e,t,s)}))}emitSubscriverEvent(e,t){const{payload:{targetName:n,uuid:i,topic:r}}=t,o={name:n,uuid:i,topic:r};this.emitter.emit(e,o)}createSubscriptionKey(e,t,n){const i=t||"*";if(!(e&&i&&n))throw new Error("Missing uuid, name, or topic string");return function(...e){return e.map((e=>Buffer.from(`${e}`).toString("base64"))).join("/")}(e,i,n)}onmessage(e){const{action:t}=e;switch(t){case"process-message":this.processMessage(e);break;case this.events.subscriberAdded:this.emitSubscriverEvent(this.events.subscriberAdded,e);break;case this.events.subscriberRemoved:this.emitSubscriverEvent(this.events.subscriberRemoved,e)}return!0}}de.InterApplicationBus=Xt;de.InterAppPayload=class{};var en={};Object.defineProperty(en,"__esModule",{value:!0}),en.Clipboard=void 0;const tn=d;class nn extends tn.Base{async writeText(e){await this.wire.sendAction("clipboard-write-text",e)}async readText(e){const{payload:t}=await this.wire.sendAction("clipboard-read-text",{type:e});return t.data}async writeImage(e){await this.wire.sendAction("clipboard-write-image",e)}async readImage(e={format:"dataURL"}){const{payload:t}=await this.wire.sendAction("clipboard-read-image",e);return t.data}async writeHtml(e){await this.wire.sendAction("clipboard-write-html",e)}async readHtml(e){const{payload:t}=await this.wire.sendAction("clipboard-read-html",{type:e});return t.data}async writeRtf(e){await this.wire.sendAction("clipboard-write-rtf",e)}async readRtf(e){const{payload:t}=await this.wire.sendAction("clipboard-read-rtf",{type:e});return t.data}async write(e){await this.wire.sendAction("clipboard-write",e)}async getAvailableFormats(e){const{payload:t}=await this.wire.sendAction("clipboard-read-formats",{type:e});return t.data}}en.Clipboard=nn;var rn={},on={},sn={};Object.defineProperty(sn,"__esModule",{value:!0}),sn.ExternalApplication=void 0;const an=d;class cn extends an.EmitterBase{constructor(e,t){super(e,"external-application",t.uuid),this.identity=t}getInfo(){return this.wire.sendAction("get-external-application-info",this.identity).then((({payload:e})=>e.data))}}sn.ExternalApplication=cn,Object.defineProperty(on,"__esModule",{value:!0}),on.ExternalApplicationModule=void 0;const dn=d,hn=sn;class ln extends dn.Base{wrap(e){return this.wire.sendAction("external-application-wrap").catch((e=>{})),Promise.resolve(new hn.ExternalApplication(this.wire,{uuid:e}))}wrapSync(e){return this.wire.sendAction("external-application-wrap-sync").catch((e=>{})),new hn.ExternalApplication(this.wire,{uuid:e})}}on.ExternalApplicationModule=ln,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(on,e),n(sn,e)}(rn);var un={},pn={},wn={};Object.defineProperty(wn,"__esModule",{value:!0}),wn._Frame=void 0;const yn=d;class fn extends yn.EmitterBase{constructor(e,t){super(e,"frame",t.uuid,t.name),this.identity=t}getInfo(){return this.wire.sendAction("get-frame-info",this.identity).then((({payload:e})=>e.data))}getParentWindow(){return this.wire.sendAction("get-parent-window",this.identity).then((({payload:e})=>e.data))}}wn._Frame=fn,Object.defineProperty(pn,"__esModule",{value:!0}),pn._FrameModule=void 0;const gn=d,mn=O,vn=wn;class Cn extends gn.Base{async wrap(e){this.wire.sendAction("frame-wrap").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}wrapSync(e){this.wire.sendAction("frame-wrap-sync").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}getCurrent(){return this.wire.sendAction("frame-get-current").catch((e=>{})),Promise.resolve(new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity()))}getCurrentSync(){return this.wire.sendAction("frame-get-current-sync").catch((e=>{})),new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity())}}pn._FrameModule=Cn,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(pn,e),n(wn,e)}(un);var bn={};Object.defineProperty(bn,"__esModule",{value:!0}),bn.GlobalHotkey=void 0;const In=d;class En extends In.EmitterBase{constructor(e){super(e,"global-hotkey")}async register(e,t){await this.on(e,t),await this.wire.sendAction("global-hotkey-register",{hotkey:e})}async unregister(e){await this.removeAllListeners(e),await this.wire.sendAction("global-hotkey-unregister",{hotkey:e})}async unregisterAll(){await Promise.all(this.eventNames().filter((e=>!("registered"===e||"unregistered"===e))).map((e=>this.removeAllListeners(e)))),await this.wire.sendAction("global-hotkey-unregister-all",{})}async isRegistered(e){const{payload:{data:t}}=await this.wire.sendAction("global-hotkey-is-registered",{hotkey:e});return t}}bn.GlobalHotkey=En;var xn,An={},Pn={},Mn={},_n=s&&s.__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)};Object.defineProperty(Mn,"__esModule",{value:!0}),Mn.Platform=void 0;const On=d,Sn=O,Rn=new Map;class Fn extends On.EmitterBase{constructor(e,t){super(t.wire,"application",e.uuid),this.getClient=e=>{this.wire.sendAction("platform-get-client",this.identity).catch((e=>{}));const t=e||this.identity,{uuid:n}=t;if(!Rn.has(n)){const e=_n(this,xn,"f").call(this,n);Rn.set(n,e)}return Rn.get(n)},xn.set(this,(async e=>{try{const t=`custom-frame-${e}`,n=await this._channel.connect(t,{wait:!1});return n.onDisconnection((()=>{Rn.delete(e)})),n}catch(t){throw Rn.delete(e),new Error("The targeted Platform is not currently running. Listen for application-started event for the given Uuid.")}})),this.launchLegacyManifest=this.launchContentManifest;const n=(0,Sn.validateIdentity)(e);if(n)throw new Error(n);this._channel=t,this.identity={uuid:e.uuid},this.Layout=this.fin.Platform.Layout,this.Application=this.fin.Application.wrapSync(this.identity)}async createView(e,t,n){this.wire.sendAction("platform-create-view",this.identity).catch((e=>{}));const i=await this.getClient(),r=await i.dispatch("create-view",{target:t,opts:e,targetView:n});if(!r||(0,Sn.validateIdentity)(r.identity))throw new Error(`When overwriting the createView call, please return an object that has a valid 'identity' property: ${JSON.stringify(r)}`);return this.fin.View.wrapSync(r.identity)}async createWindow(e){this.wire.sendAction("platform-create-window",this.identity).catch((e=>{}));const t=await this.getClient();e.reason||(e.reason="api-call");const n=await t.dispatch("create-view-container",e);if(!n||(0,Sn.validateIdentity)(n.identity))throw new Error(`When overwriting the createWindow call, please return an object that has a valid 'identity' property: ${JSON.stringify(n)}`);const{identity:i}=n,r=this.fin.Window.wrapSync(i);return r.name=i.name,r.uuid=i.uuid,r}async quit(){this.wire.sendAction("platform-quit",this.identity).catch((e=>{}));return(await this.getClient()).dispatch("quit")}async closeView(e){this.wire.sendAction("platform-close-view",this.identity).catch((e=>{}));const t=await this.getClient();await t.dispatch("close-view",{view:e})}async reparentView(e,t){console.warn("Platform.reparentView has been deprecated, please use Platform.createView"),this.wire.sendAction("platform-reparent-view",this.identity).catch((e=>{}));const n={...e,uuid:e.uuid??this.identity.uuid},i=await this.fin.View.wrap(n),r=await i.getOptions();return this.createView(r,t)}async getSnapshot(){this.wire.sendAction("platform-get-snapshot",this.identity).catch((e=>{}));return(await this.getClient()).dispatch("get-snapshot")}async getViewSnapshot(e){return(await this.getClient()).dispatch("get-view-snapshot",{viewIdentity:e})}async applySnapshot(e,t){this.wire.sendAction("platform-apply-snapshot",this.identity).catch((e=>{}));const n="Requested snapshot must be a valid Snapshot object, or a url or filepath to such an object.";let i;if("string"==typeof e)try{i=(await this._channel.wire.sendAction("get-application-manifest",{manifestUrl:e})).payload.data}catch(e){throw new Error(`${n}: ${e}`)}else i=e;if(!i.windows)throw new Error(n);const r=await this.getClient();return await r.dispatch("apply-snapshot",{snapshot:i,options:t}),this}async fetchManifest(e){return(await this.getClient()).dispatch("platform-fetch-manifest",{manifestUrl:e})}async launchContentManifest(e){this.wire.sendAction("platform-launch-content-manifest",this.identity).catch((()=>{}));const t=await this.getClient(),n=await this.fetchManifest(e);return t.dispatch("launch-into-platform",{manifest:n,manifestUrl:e}),this}async setWindowContext(e={},t){if(this.wire.sendAction("platform-set-window-context",this.identity).catch((e=>{})),!e)throw new Error("Please provide a serializable object or string to set the context.");const n=await this.getClient(),{entityType:i}=t?await this.fin.System.getEntityInfo(t.uuid,t.name):this.fin.me;await n.dispatch("set-window-context",{context:e,entityType:i,target:t||{uuid:this.fin.me.uuid,name:this.fin.me.name}})}async getWindowContext(e){this.wire.sendAction("platform-get-window-context",this.identity).catch((e=>{}));const t=await this.getClient(),{entityType:n}=e?await this.fin.System.getEntityInfo(e.uuid,e.name):this.fin.me;return t.dispatch("get-window-context",{target:e||{uuid:this.fin.me.uuid,name:this.fin.me.name},entityType:n})}async closeWindow(e,t={skipBeforeUnload:!1}){this.wire.sendAction("platform-close-window",this.identity).catch((e=>{}));return(await this.getClient()).dispatch("close-window",{windowId:e,options:t})}}Mn.Platform=Fn,xn=new WeakMap;var jn={},kn={},Ln={},Tn={};function $n(e){switch(e){case"columns":case"grid":case"rows":case"tabs":return!0;default:return!1}}Object.defineProperty(Tn,"__esModule",{value:!0}),Tn.overrideFromComposables=Tn.isValidPresetType=void 0,Tn.isValidPresetType=$n,Tn.overrideFromComposables=function(...e){return t=>e.reduceRight(((e,t)=>n=>t(e(n))),(e=>e))(t)},Tn.default={isValidPresetType:$n};var Bn={},Gn={},Wn={};Object.defineProperty(Wn,"__esModule",{value:!0}),Wn.ApiConsumer=void 0;Wn.ApiConsumer=class{constructor(e){this.strategy=e,this.consume=async e=>(await this.strategy.getExposedFunctions(e)).reduce(((t,n)=>({...t,[n.key]:this.strategy.createFunction(n,e)})),{})}};var Hn={},Nn={};Object.defineProperty(Nn,"__esModule",{value:!0}),Nn.expose=Nn.getExposedProperties=void 0;const Dn=Symbol("exposedProperties");Nn.getExposedProperties=e=>e[Dn]||e.prototype[Dn]||[];Nn.expose=e=>(t,n,i)=>{t[Dn]=t[Dn]||[],t[Dn].push({key:n,descriptor:i,options:e})},Object.defineProperty(Hn,"__esModule",{value:!0}),Hn.ApiExposer=void 0;const Un=Nn;Hn.ApiExposer=class{constructor(e){this.strategy=e,this.exposeInstance=async(e,t)=>{const n=(0,Un.getExposedProperties)(e),i=await Promise.all(n.map((async({key:n,options:i})=>({key:n,options:await this.strategy.exposeFunction(e[n].bind(e),{key:n,options:i,meta:t})}))));await this.strategy.exposeMeta(t,i)}}};var Vn={},zn={},Kn={};Object.defineProperty(Kn,"__esModule",{value:!0}),Kn.ChannelsConsumer=void 0;Kn.ChannelsConsumer=class{constructor(e){this.channel=e,this.getExposedFunctions=async e=>{const{id:t}=e,{props:n}=await this.channel.dispatch(`api-meta:${t}`);return n},this.createFunction=e=>(...t)=>{const{action:n}=e.options;return this.channel.dispatch(n,{args:t})}}};var qn={};Object.defineProperty(qn,"__esModule",{value:!0}),qn.ChannelsExposer=void 0;qn.ChannelsExposer=class{constructor(e){this.channelProviderOrClient=e,this.exposeFunction=async(e,t)=>{const{key:n,options:i,meta:r}=t,{id:o}=r,s=`${o}.${i?.action||n}`;return await this.channelProviderOrClient.register(s,(async({args:t})=>e(...t))),{action:s}},this.exposeMeta=async({id:e},t)=>{const n=`api-meta:${e}`;await this.channelProviderOrClient.register(n,(()=>({props:t})))}}},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Kn,e),n(qn,e)}(zn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(zn,e)}(Vn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Wn,e),n(Hn,e),n(Vn,e),n(Nn,e)}(Gn);var Jn={};Object.defineProperty(Jn,"__esModule",{value:!0}),Jn.createRelayedDispatch=exports.relayChannelClientApi_1=Jn.relayChannelClientApi=void 0;const Yn=["no longer connected","RTCDataChannel closed unexpectedly","The client you are trying to dispatch from is disconnected from the target provider"];exports.relayChannelClientApi_1=Jn.relayChannelClientApi=async(e,t)=>{e.register(`relay:${t}`,(({action:t,target:n,payload:i})=>e.dispatch(n,t,i))),await Promise.resolve()};Jn.createRelayedDispatch=(e,t,n,i)=>async(r,o)=>{try{return await e.dispatch(`relay:${n}`,{action:r,payload:o,target:t})}catch(e){if(s=e.message,Yn.some((e=>s.includes(e)))&&i)throw new Error(i);throw e}var s};var Zn,Qn,Xn,ei=s&&s.__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},ti=s&&s.__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)};Object.defineProperty(Bn,"__esModule",{value:!0}),Bn.ColumnOrRow=Bn.TabStack=Bn.LayoutNode=void 0;const ni=Gn,ii=Jn;class ri{constructor(e,t){Zn.set(this,void 0),this.isRoot=()=>ti(this,Zn,"f").isRoot(this.entityId),this.exists=()=>ti(this,Zn,"f").exists(this.entityId),this.getParent=async()=>{const e=await ti(this,Zn,"f").getParent(this.entityId);if(e)return ri.getEntity(e,ti(this,Zn,"f"))},this.createAdjacentStack=async(e,t)=>{const n=await ti(this,Zn,"f").createAdjacentStack(this.entityId,e,t);return ri.getEntity({entityId:n,type:"stack"},ti(this,Zn,"f"))},this.getAdjacentStacks=async e=>(await ti(this,Zn,"f").getAdjacentStacks({targetId:this.entityId,edge:e})).map((e=>ri.getEntity({type:"stack",entityId:e.entityId},ti(this,Zn,"f")))),ei(this,Zn,e,"f"),this.entityId=t}}Bn.LayoutNode=ri,Zn=new WeakMap,ri.newLayoutEntitiesClient=async(e,t,n)=>{const i=(0,ii.createRelayedDispatch)(e,n,"layout-relay","You are trying to interact with a layout component on a window that does not exist or has been destroyed.");return new ni.ApiConsumer(new ni.ChannelsConsumer({dispatch:i})).consume({id:t})},ri.getEntity=(e,t)=>{const{entityId:n,type:i}=e;switch(i){case"column":case"row":return new si(t,n,i);case"stack":return new oi(t,n);default:throw new Error(`Unrecognised Layout Entity encountered ('${JSON.stringify(e)})`)}};class oi extends ri{constructor(e,t){super(e,t),Qn.set(this,void 0),this.type="stack",this.getViews=()=>ti(this,Qn,"f").getStackViews(this.entityId),this.addView=async(e,t={index:0})=>ti(this,Qn,"f").addViewToStack(this.entityId,e,t),this.removeView=async e=>{await ti(this,Qn,"f").removeViewFromStack(this.entityId,e)},this.setActiveView=async e=>{await ti(this,Qn,"f").setStackActiveView(this.entityId,e)},ei(this,Qn,e,"f")}}Bn.TabStack=oi,Qn=new WeakMap;class si extends ri{constructor(e,t,n){super(e,t),Xn.set(this,void 0),this.getContent=async()=>(await ti(this,Xn,"f").getContent(this.entityId)).map((e=>ri.getEntity(e,ti(this,Xn,"f")))),ei(this,Xn,e,"f"),this.type=n}}Bn.ColumnOrRow=si,Xn=new WeakMap;var ai={};Object.defineProperty(ai,"__esModule",{value:!0}),ai.DEFAULT_LAYOUT_KEY=ai.LAYOUT_CONTROLLER_ID=void 0,ai.LAYOUT_CONTROLLER_ID="layout-entities",ai.DEFAULT_LAYOUT_KEY="__default__";var ci,di,hi,li=s&&s.__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)};Object.defineProperty(Ln,"__esModule",{value:!0}),Ln.Layout=void 0;const ui=G,pi=O,wi=d,yi=Tn,fi=Bn,gi=ai;class mi extends wi.Base{static getClient(e){return li(e,di,"f").getValue()}constructor(e,t){super(t),ci.add(this),di.set(this,new ui.Lazy((async()=>fi.LayoutNode.newLayoutEntitiesClient(await this.platform.getClient(),gi.LAYOUT_CONTROLLER_ID,this.identity)))),this.replace=async e=>{this.wire.sendAction("layout-replace").catch((e=>{}));const t=await this.platform.getClient();await t.dispatch("replace-layout",{target:this.identity,opts:{layout:e}})},this.replaceView=async(e,t)=>{this.wire.sendAction("layout-replace-view").catch((e=>{}));const n=await this.platform.getClient();await n.dispatch("replace-view",{target:this.identity,opts:{viewToReplace:e,newView:t}})},this.applyPreset=async e=>{this.wire.sendAction("layout-apply-preset").catch((e=>{}));const t=await this.platform.getClient(),{presetType:n}=e;if(!n||!(0,yi.isValidPresetType)(n))throw new Error("Cannot apply preset layout, please include an applicable presetType property in the PresetLayoutOptions.");await t.dispatch("apply-preset-layout",{target:this.identity,opts:{presetType:n}})};const n=(0,pi.validateIdentity)(e);if(n)throw new Error(n);this.identity=e,this.platform=this.fin.Platform.wrapSync({uuid:e.uuid}),e.uuid===this.fin.me.uuid&&e.name===this.fin.me.name&&(this.init=this.fin.Platform.Layout.init)}async getConfig(){this.wire.sendAction("layout-get-config").catch((e=>{}));return(await this.platform.getClient()).dispatch("get-frame-snapshot",{target:this.identity})}async getCurrentViews(){this.wire.sendAction("layout-get-views").catch((e=>{}));const e=await this.platform.getClient();return(await e.dispatch("get-layout-views",{target:this.identity})).map((e=>this.fin.View.wrapSync(e)))}async getRootItem(){this.wire.sendAction("layout-get-root-item").catch((()=>{}));const e=await li(this,di,"f").getValue(),t=await e.getRoot("layoutName"in this.identity?this.identity:void 0);return fi.LayoutNode.getEntity(t,e)}async getStackByViewIdentity(e){this.wire.sendAction("layout-get-stack-by-view").catch((()=>{}));const t=await li(this,di,"f").getValue(),n=await t.getStackByView(e);if(!n)throw new Error(`No stack found for view: ${e.uuid}/${e.name}`);return fi.LayoutNode.getEntity(n,t)}async addView(e,{location:t,targetView:n}={}){this.wire.sendAction("layout-add-view").catch((e=>{}));const{identity:i}=await li(this,ci,"m",hi).call(this,"layout-add-view",{viewOptions:e,location:t,targetView:n});return{identity:i}}async closeView(e){this.wire.sendAction("layout-close-view").catch((e=>{})),await li(this,ci,"m",hi).call(this,"layout-close-view",{viewIdentity:e})}}Ln.Layout=mi,di=new WeakMap,ci=new WeakSet,hi=async function(e,t){return(await this.platform.getClient()).dispatch(e,{target:this.identity,opts:t})};var vi,Ci,bi,Ii,Ei,xi=s&&s.__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)},Ai=s&&s.__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};Object.defineProperty(kn,"__esModule",{value:!0}),kn.LayoutModule=void 0;const Pi=d,Mi=Ln,_i=ai;class Oi extends Pi.Base{constructor(){super(...arguments),vi.add(this),Ci.set(this,!1),bi.set(this,null),this.init=async(e={})=>{if(this.wire.sendAction("layout-init").catch((e=>{})),!this.wire.environment.layoutAllowedInContext(this.fin))throw new Error("Layout.init can only be called from a Window context.");if(xi(this,Ci,"f"))throw new Error("Layout.init was already called, please use Layout.create to add additional layouts.");"openfin"===this.wire.environment.type&&await this.fin.Platform.getCurrentSync().getClient(),Ai(this,Ci,!0,"f"),Ai(this,bi,await this.wire.environment.initLayoutManager(this.fin,this.wire,e),"f"),await this.wire.environment.applyLayoutSnapshot(this.fin,xi(this,bi,"f"),e);const t={name:this.fin.me.name,uuid:this.fin.me.uuid};if(!e.layoutManagerOverride){const e={layoutName:_i.DEFAULT_LAYOUT_KEY,...t};return xi(this,Ii,"f").call(this,e)}return this.wrapSync(t)},Ii.set(this,(e=>{const t="[Layout] You are using a deprecated property `layoutManager` - it will throw if you access it starting in v37.",n=new Proxy({},{get(e,n){throw console.warn(`[Layout-mgr-proxy] accessing ${n.toString()}`),new Error(t)}}),i=Object.assign(this.wrapSync(e),{layoutManager:n});return new Proxy(i,{get(e,n){if("layoutManager"===n)throw console.warn(`[Layout-proxy] accessing ${n.toString()}`),new Error(t);return e[n]}})})),this.getCurrentLayoutManagerSync=()=>xi(this,vi,"m",Ei).call(this,"fin.Platform.Layout.getCurrentLayoutManagerSync()"),this.create=async e=>this.wire.environment.createLayout(xi(this,vi,"m",Ei).call(this,"fin.Platform.Layout.create()"),e),this.destroy=async e=>this.wire.environment.destroyLayout(xi(this,vi,"m",Ei).call(this,"fin.Platform.Layout.destroy()"),e)}async wrap(e){return this.wire.sendAction("layout-wrap").catch((e=>{})),new Mi.Layout(e,this.wire)}wrapSync(e){return this.wire.sendAction("layout-wrap-sync").catch((e=>{})),new Mi.Layout(e,this.wire)}async getCurrent(){if(this.wire.sendAction("layout-get-current").catch((e=>{})),"openfin"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error("You are not in a Window context. Only Windows can have a Layout.");const{uuid:e,name:t}=this.fin.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction("layout-get-current-sync").catch((e=>{})),"openfin"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error("You are not in a Window context. Only Windows can have a Layout.");const{uuid:e,name:t}=this.fin.me;return this.wrapSync({uuid:e,name:t})}async getLayoutByViewIdentity(e){this.wire.sendAction("layout-get-by-view-identity").catch((()=>{}));let t=await this.wire.environment.getViewWindowIdentity(this.fin,e);t.identity&&(t=t.identity);try{const n=this.wrapSync(t),i=await Mi.Layout.getClient(n),r=await i.getLayoutIdentityForViewOrThrow(e);return this.wrapSync(r)}catch(n){if(!["No action registered at target for","getLayoutIdentityForViewOrThrow is not a function"].some((e=>n.message.includes(e))))throw n;if(t.uuid===t.name)throw new Error(`View identity ${JSON.stringify(e)} is not attached to any layout in provider window ${JSON.stringify(t)}.`);return this.wrapSync(t)}}}kn.LayoutModule=Oi,Ci=new WeakMap,bi=new WeakMap,Ii=new WeakMap,vi=new WeakSet,Ei=function(e){if(!xi(this,bi,"f"))throw new Error(`You must call init before using the API ${e}`);return xi(this,bi,"f")},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(kn,e),n(Ln,e)}(jn),Object.defineProperty(Pn,"__esModule",{value:!0}),Pn.PlatformModule=void 0;const Si=d,Ri=Mn,Fi=jn;class ji extends Si.Base{constructor(e,t){super(e),this._channel=t,this.Layout=new Fi.LayoutModule(this.wire)}async init(e){if(!fin.__internal_.isPlatform||fin.me.name!==fin.me.uuid)throw new Error("fin.Platform.init should only be called from a custom platform provider running in the main window of the application.");return this.wire.environment.initPlatform(this.fin,e)}async wrap(e){return this.wire.sendAction("platform-wrap").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}wrapSync(e){return this.wire.sendAction("platform-wrap-sync").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}async getCurrent(){return this.wire.sendAction("platform-get-current").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction("platform-get-current-sync").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}start(e){return this.wire.sendAction("platform-start").catch((e=>{})),new Promise((async(t,n)=>{try{const{uuid:n}=e,i=await this.fin.Application._create({...e,isPlatformController:!0});i.once("platform-api-ready",(()=>t(this.wrapSync({uuid:n})))),i._run({uuid:n})}catch(e){n(e)}}))}startFromManifest(e,t){return this.wire.sendAction("platform-start-from-manifest").catch((e=>{})),new Promise((async(n,i)=>{try{const i=await this.fin.Application._createFromManifest(e);i.once("platform-api-ready",(()=>n(this.wrapSync({uuid:i.identity.uuid})))),i._run(t)}catch(e){i(e)}}))}}Pn.PlatformModule=ji,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Pn,e),n(Mn,e)}(An);var ki={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getMe=e.getBaseMe=e.environmentUnsupportedMessage=void 0;const t=J(),n=un,i=ie(),r=rn;function o(e,t,n){return{...{isView:"view"===e,isWindow:"window"===e,isFrame:"iframe"===e,isExternal:"external connection"===e},uuid:t,name:n,entityType:e}}e.environmentUnsupportedMessage="You are not running in OpenFin.",e.getBaseMe=o,e.getMe=function(s){const{uuid:a,name:c,entityType:d}=s.me,h={setContext(){throw new Error(e.environmentUnsupportedMessage)},addContextHandler(){throw new Error(e.environmentUnsupportedMessage)},getContextGroups(){throw new Error(e.environmentUnsupportedMessage)},joinContextGroup(){throw new Error(e.environmentUnsupportedMessage)},removeFromContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getAllClientsInContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getInfoForContextGroup(){throw new Error(e.environmentUnsupportedMessage)}},l="Interop API has not been instantiated. Either connection has failed or you have not declared interop in your config.",u={setContext(){throw new Error(l)},addContextHandler(){throw new Error(l)},getContextGroups(){throw new Error(l)},joinContextGroup(){throw new Error(l)},removeFromContextGroup(){throw new Error(l)},getAllClientsInContextGroup(){throw new Error(l)},getInfoForContextGroup(){throw new Error(l)}},p={eventNames:()=>{throw new Error(e.environmentUnsupportedMessage)},emit:()=>{throw new Error(e.environmentUnsupportedMessage)},listeners:()=>{throw new Error(e.environmentUnsupportedMessage)},listenerCount:()=>{throw new Error(e.environmentUnsupportedMessage)},on:()=>{throw new Error(e.environmentUnsupportedMessage)},addListener:()=>{throw new Error(e.environmentUnsupportedMessage)},once:()=>{throw new Error(e.environmentUnsupportedMessage)},prependListener:()=>{throw new Error(e.environmentUnsupportedMessage)},prependOnceListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeAllListeners:()=>{throw new Error(e.environmentUnsupportedMessage)}};switch(d){case"view":return Object.assign(new t.View(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case"window":return Object.assign(new i._Window(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case"iframe":return Object.assign(new n._Frame(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case"external connection":return Object.assign(new r.ExternalApplication(s,{uuid:a}),o(d,a,c),{interop:u,isOpenFin:!1});default:return{...o(d,a,c),...p,interop:h,isOpenFin:!1}}}}(ki);var Li={},Ti={},$i={};Object.defineProperty($i,"__esModule",{value:!0}),$i.createWarningObject=$i.createUnusableObject=void 0,$i.createUnusableObject=function(e){const t=()=>{throw new Error(e)};return new Proxy({},{apply:t,construct:t,defineProperty:t,deleteProperty:t,get:t,getOwnPropertyDescriptor:t,getPrototypeOf:t,has:t,isExtensible:t,ownKeys:t,preventExtensions:t,set:t,setPrototypeOf:t})},$i.createWarningObject=function(e,t){return new Proxy(t,{get:(...t)=>(console.warn(e),Reflect.get(...t)),set:(...t)=>(console.warn(e),Reflect.set(...t)),getOwnPropertyDescriptor:(...t)=>(console.warn(e),Reflect.getOwnPropertyDescriptor(...t)),ownKeys:(...t)=>(console.warn(e),Reflect.ownKeys(...t))})};var Bi,Gi={},Wi={};var Hi={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.wrapIntentHandler=e.BROKER_ERRORS=e.generateOverrideWarning=e.generateOverrideError=e.wrapContextHandler=e.wrapInTryCatch=e.generateId=void 0;e.generateId=()=>`${Math.random()}${Date.now()}`;e.wrapInTryCatch=(e,t)=>(...n)=>{try{return e(...n)}catch(e){throw new Error((t||"")+e)}};e.wrapContextHandler=(e,t)=>async n=>{try{await e(n)}catch(e){throw console.error(`Error thrown by handler ${t} for context type ${n.type}: ${e}`),e}};e.generateOverrideError=(e,t)=>`You have tried to to use ${e} but ${t} has not been overridden in the Interop Broker. Please override this function. Refer to our documentation for more info.`;e.generateOverrideWarning=(e,t,n,i)=>{const{uuid:r,name:o}=n;return i?`Entity with identity: ${r}/${o} has called ${i} or ${e} but ${t} has not been overridden.`:`Entity with identity: ${r}/${o} has called ${e} but ${t} has not been overridden.`},e.BROKER_ERRORS={fireIntent:(0,e.generateOverrideError)("fireIntent","handleFiredIntent"),fireIntentForContext:(0,e.generateOverrideError)("fireIntentForContext","handleFiredIntentForContext"),getInfoForIntent:(0,e.generateOverrideError)("getInfoForIntent","handleInfoForIntent"),getInfoForIntentsByContext:(0,e.generateOverrideError)("getInfoForIntentsByContext","handleInfoForIntentsByContext"),joinSessionContextGroupWithJoinContextGroup:"The Context Group you have tried to join is a Session Context Group. Custom Context Groups can only be defined by the Interop Broker through code or manifest configuration. Please use joinSessionContextGroup.",fdc3Open:(0,e.generateOverrideError)("fdc3.open","fdc3HandleOpen"),fdc3FindInstances:(0,e.generateOverrideError)("fdc3.findInstances","fdc3HandleFindInstances"),fdc3GetAppMetadata:(0,e.generateOverrideError)("fdc3.getAppMetadata","fdc3HandleGetAppMetadata"),fdc3GetInfo:(0,e.generateOverrideError)("fdc3.getInfo","fdc3HandleGetInfo")};e.wrapIntentHandler=(e,t)=>async n=>{try{return e(n)}catch(e){throw console.error(`Error thrown by handler ${t}: ${e}`),e}}}(Hi);var Ni,Di,Ui={};function Vi(){if(Di)return Gi;Di=1;var e,t,n,r=s&&s.__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},o=s&&s.__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)},a=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Gi,"__esModule",{value:!0}),Gi.InteropBroker=void 0;const c=d,h=a(function(){if(Bi)return Wi;Bi=1,Object.defineProperty(Wi,"__esModule",{value:!0});const e=Cr();return Wi.default=class{constructor(e,t){this.provider=e,this.id=t,this.lastContext=void 0,this.contextGroupMap=new Map,this.clients=new Map,this.registerListeners()}registerListeners(){this.provider.register(`sessionContextGroup:getContext-${this.id}`,this.getCurrentContext.bind(this)),this.provider.register(`sessionContextGroup:setContext-${this.id}`,this.setContext.bind(this)),this.provider.register(`sessionContextGroup:handlerAdded-${this.id}`,this.handlerAdded.bind(this)),this.provider.register(`sessionContextGroup:handlerRemoved-${this.id}`,this.handlerRemoved.bind(this))}getCurrentContext(e){return e.type?this.contextGroupMap.get(e.type):this.lastContext}setContext(t,n){const{context:i}=t,r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name} not in Session Client State Map`);this.contextGroupMap.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{e.contextHandlers.get(i.type)?.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getClientState(e){return this.clients.get(e.endpointId)}async handlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(i){const e=r.contextHandlers.get(i)||[];r.contextHandlers.set(i,[...e,n]);const o=this.contextGroupMap.get(i);o&&await this.provider.dispatch(t,n,o)}else{r.globalHandler=n;const e=[...this.contextGroupMap.keys()].map((async e=>{const i=this.contextGroupMap.get(e);i&&await this.provider.dispatch(t,n,i)}));await Promise.all(e)}}handlerRemoved(e,t){const{handlerId:n}=e,i=this.clients.get(t.endpointId);i?(Array.from(i.contextHandlers).forEach((([,e])=>{const t=e.indexOf(n);t>-1&&e.splice(t,1)})),i.globalHandler===n&&(i.globalHandler=void 0)):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={contextHandlers:new Map,clientIdentity:e,globalHandler:void 0};this.clients.set(e.endpointId,t)}}onDisconnection(e){this.clients.delete(e.endpointId)}},Wi}()),l=Hi,u=a(i),p=function(){if(Ni)return Ui;Ni=1,Object.defineProperty(Ui,"__esModule",{value:!0}),Ui.PrivateChannelProvider=void 0;const e=Vi();return Ui.PrivateChannelProvider=class t{constructor(e,t){this.provider=e,this.id=t,this.clients=new Map,this.registerListeners(),this.contextByContextType=new Map,this.lastContext=void 0,this.provider.onConnection((e=>this.registerNewClient(e))),this.provider.onDisconnection((async e=>{const{endpointId:t}=e;this.clients.has(t)&&await this.handleClientDisconnecting(e),0===(await this.provider.getAllClientInfo()).length&&this.provider.destroy()}))}getClientState(e){return this.clients.get(e.endpointId)}registerListeners(){this.provider.register("broadcast",this.broadcast.bind(this)),this.provider.register("getCurrentContext",this.getCurrentContext.bind(this)),this.provider.register("contextHandlerAdded",this.contextHandlerAdded.bind(this)),this.provider.register("contextHandlerRemoved",this.contextHandlerRemoved.bind(this)),this.provider.register("nonStandardHandlerRemoved",this.nonStandardHandlerRemoved.bind(this)),this.provider.register("onAddContextHandlerAdded",this.onAddContextHandlerAdded.bind(this)),this.provider.register("onDisconnectHandlerAdded",this.onDisconnectHandlerAdded.bind(this)),this.provider.register("onUnsubscribeHandlerAdded",this.onUnsubscribeHandlerAdded.bind(this)),this.provider.register("clientDisconnecting",((e,t)=>{this.handleClientDisconnecting(t)}))}broadcast(t,n){const{context:i}=t;if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name}, tried to call broadcast, is not connected to this Private Channel`);const r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to broadcast - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);this.contextByContextType.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{const t=e.handlerIdsByContextTypes.get(i.type);t&&t.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getCurrentContext(e,t){const{contextType:n}=e;if(!this.getClientState(t))throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call getCurrentContext, is not connected to this Private Channel`);if(void 0!==n){return this.contextByContextType.get(n)||null}return this.lastContext?this.lastContext:null}contextHandlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call addContextListener, is not connected to this Private Channel`);if(i){const e=r.handlerIdsByContextTypes.get(i)||[];r.handlerIdsByContextTypes.set(i,[...e,n])}else r.globalHandler=n;Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&e.onAddContextListenerHandlerId&&this.provider.dispatch(e.clientIdentity,e.onAddContextListenerHandlerId,i)}))}async contextHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);if(i){let e;if(i.globalHandler===n)i.globalHandler=void 0;else for(const[t,r]of i.handlerIdsByContextTypes){const i=r.indexOf(n);i>-1&&(r.splice(i,1),e=t)}const r=(await this.getConnectedClients()).map((async n=>{const{clientIdentity:i,clientIdentity:{endpointId:r},onUnsubscribeHandlerId:o}=n;r!==t.endpointId&&o&&await this.provider.dispatch(i,o,e)}));try{await Promise.all(r)}catch(e){throw console.error(`Problem when attempting to dispatch to onUnsubscribeHandlers. Error: ${e} Removing Client: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}`),new Error(e)}}else console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}.`)}nonStandardHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);i?i.onDisconnectHandlerId===n?i.onDisconnectHandlerId=void 0:i.onAddContextListenerHandlerId===n?i.onAddContextListenerHandlerId=void 0:i.onUnsubscribeHandlerId===n&&(i.onUnsubscribeHandlerId=void 0):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}onAddContextHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onAddContextListener, is not connected to this Private Channel`);n.onAddContextListenerHandlerId=i,Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&Array.from(e.handlerIdsByContextTypes.keys()).forEach((e=>{this.provider.dispatch(t,i,e)}))}))}onDisconnectHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onDisconnect, is not connected to this Private Channel`);n.onDisconnectHandlerId=i}onUnsubscribeHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onUnsubscribe, is not connected to this Private Channel`);n.onUnsubscribeHandlerId=i}removeClient(e){const t=this.getClientState(e);if(!t)throw new Error(`Client with Identity: ${e.uuid} ${e.name}, tried to call disconnect, is not connected to this Private Channel`);t.handlerIdsByContextTypes.clear(),this.clients.delete(e.endpointId)}async fireOnDisconnectForOtherClients(e){const{endpointId:t}=e,n=(await this.getConnectedClients()).map((async e=>{const{clientIdentity:{endpointId:n},onDisconnectHandlerId:i}=e;n!==t&&i&&await this.provider.dispatch(e.clientIdentity,i)}));try{await Promise.all(n)}catch(t){throw console.error(`Problem when attempting to dispatch to onDisconnectHandlers. Error: ${t} Disconnecting Client: uuid: ${e.uuid}. name: ${e.name}. endpointId: ${e.endpointId}`),new Error(t)}}async unsubscribeAll(e){const{endpointId:t}=e,n=this.clients.get(t);if(n){const t=Array.from(n.handlerIdsByContextTypes.values()).flat(),i=n.globalHandler;if(t.length>0){const n=t.map((async t=>this.contextHandlerRemoved({handlerId:t},e)));try{await Promise.all(n)}catch(e){console.error(e.message)}}if(i)try{await this.contextHandlerRemoved({handlerId:i},e)}catch(e){console.error(e.message)}}}async handleClientDisconnecting(e){await this.unsubscribeAll(e),this.removeClient(e),await this.fireOnDisconnectForOtherClients(e)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={clientIdentity:e,handlerIdsByContextTypes:new Map,globalHandler:void 0,onAddContextListenerHandlerId:void 0,onUnsubscribeHandlerId:void 0,onDisconnectHandlerId:void 0};this.clients.set(e.endpointId,t)}}async getConnectedClients(){const e=await this.provider.getAllClientInfo();return Array.from(this.clients.values()).filter((t=>{const{uuid:n,name:i}=t.clientIdentity;return e.some((e=>i===e.name&&n===e.uuid))}))}static init(e,n){return new t(e,n)}},Ui}(),w=G,y=[{id:"green",displayMetadata:{color:"#00CC88",name:"green"}},{id:"purple",displayMetadata:{color:"#8C61FF",name:"purple"}},{id:"orange",displayMetadata:{color:"#FF8C4C",name:"orange"}},{id:"red",displayMetadata:{color:"#FF5E60",name:"red"}},{id:"pink",displayMetadata:{color:"#FF8FB8",name:"pink"}},{id:"yellow",displayMetadata:{color:"#E9FF8F",name:"yellow"}}];let f=class i extends c.Base{constructor(i,s,a){super(i),e.set(this,void 0),t.set(this,void 0),n.set(this,void 0),this.getProvider=()=>o(this,n,"f").getValue(),this.interopClients=new Map,this.contextGroupsById=new Map,r(this,t,a.contextGroups??[...y],"f"),r(this,e,a.fdc3Info,"f"),a?.logging&&(this.logging=a.logging),this.intentClientMap=new Map,this.lastContextMap=new Map,this.sessionContextGroupMap=new Map,r(this,n,new w.Lazy(s),"f"),this.setContextGroupMap(),this.setupChannelProvider()}static createClosedConstructor(...e){return class extends i{constructor(...t){if(t.length){const[n,i,r]=t;if(r&&"object"==typeof r&&!(0,u.default)(r,e[2]))return console.warn("You have modified the parameters of the InteropOverride constructor. This behavior is deprecated and will be removed in a future version. You can modify these options in your manifest. Please consult our Interop docs for guidance on migrating to the new override scheme."),void super(e[0],e[1],r);console.warn("You are attempting to pass arguments to the InteropOverride constructor. This is not necessary, and these passed arguments will be ignored. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.")}super(...e)}}}setContext({context:e},t){this.wire.sendAction("interop-broker-set-context").catch((e=>{}));const n=this.getClientState(t);if(!n||!n.contextGroupId)throw n?new Error("You must join a context group before you can set context."):new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);{const{contextGroupId:t}=n;this.setContextForGroup({context:e},t)}}setContextForGroup({context:e},t){this.wire.sendAction("interop-broker-set-context-for-group").catch((e=>{}));const n=this.contextGroupsById.get(t);if(!n)throw new Error(`Unable to set context for context group that isn't in the context group mapping: ${t}.`);const r=i.checkContextIntegrity(e);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(e)}`);const o=e.type;n.set(o,e),this.lastContextMap.set(t,o);Array.from(this.interopClients.values()).filter((e=>e.contextGroupId===t)).forEach((t=>{for(const[,n]of t.contextHandlers)i.isContextTypeCompatible(o,n.contextType)&&this.invokeContextHandler(t.clientIdentity,n.handlerId,e)}))}getCurrentContext(e,t){this.wire.sendAction("interop-broker-get-current-context").catch((e=>{}));const n=this.getClientState(t);if(!n?.contextGroupId)throw new Error("You must be a member of a context group to call getCurrentContext");const{contextGroupId:i}=n,r=this.contextGroupsById.get(i),o=this.lastContextMap.get(i),s=e?.contextType??o;return r&&s?r.get(s):void 0}async joinContextGroup({contextGroupId:e,target:t},n){if(this.wire.sendAction("interop-broker-join-context-group").catch((e=>{})),this.sessionContextGroupMap.has(e))throw new Error(l.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup);if(t){i.hasEndpointId(t)&&await this.addClientToContextGroup({contextGroupId:e},t);try{const n=this.channel.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name));if(!n.length)throw new Error(`Given Identity ${t.uuid} ${t.name} is not connected to the Interop Broker.`);n.length>1&&console.warn(`More than one connection found for identity ${t.uuid} ${t.name}`);const i=[];for(const t of n)i.push(this.addClientToContextGroup({contextGroupId:e},t));await Promise.all(i)}catch(e){throw new Error(e)}}else await this.addClientToContextGroup({contextGroupId:e},n)}async addClientToContextGroup({contextGroupId:e},t){this.wire.sendAction("interop-broker-add-client-to-context-group").catch((e=>{}));const n=this.getClientState(t);if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(!this.getContextGroups().find((t=>t.id===e)))throw new Error(`Attempting to join a context group that does not exist: ${e}. You may only join existing context groups.`);if(n.contextGroupId!==e){n.contextGroupId=e,await this.setCurrentContextGroupInClientOptions(t,e);const i=this.contextGroupsById.get(e);for(const[,e]of n.contextHandlers){const{contextType:n,handlerId:r}=e;if(void 0===n)i.forEach(((e,n)=>{this.invokeContextHandler(t,r,e)}));else if(i.has(n)){const e=i.get(n);e&&this.invokeContextHandler(t,r,e)}}}}async removeFromContextGroup({target:e},t){if(this.wire.sendAction("interop-broker-remove-from-context-group").catch((e=>{})),e){i.hasEndpointId(e)&&await this.removeClientFromContextGroup(e);try{const t=this.channel.connections.filter((t=>t.uuid===e.uuid&&t.name===e.name));if(!t.length)throw new Error(`No connection found for given Identity ${e.uuid} ${e.name}`);t.length>1&&console.warn(`More than one connection found for identity ${e.uuid} ${e.name}`);const n=[];for(const e of t)n.push(this.removeClientFromContextGroup(e));await Promise.all(n)}catch(e){throw new Error(e)}}else await this.removeClientFromContextGroup(t)}async removeClientFromContextGroup(e){this.wire.sendAction("interop-broker-remove-client-from-context-group").catch((e=>{}));const t=this.getClientState(e);t&&(t.contextGroupId=void 0),await this.setCurrentContextGroupInClientOptions(e,null)}getContextGroups(){return this.wire.sendAction("interop-broker-get-context-groups").catch((e=>{})),o(this,t,"f").map((e=>({...e})))}getInfoForContextGroup({contextGroupId:e}){return this.wire.sendAction("interop-broker-get-info-for-context-group").catch((e=>{})),this.getContextGroups().find((t=>t.id===e))}getAllClientsInContextGroup({contextGroupId:e}){this.wire.sendAction("interop-broker-get-all-clients-in-context-group").catch((e=>{}));return Array.from(this.interopClients.values()).filter((t=>t.contextGroupId===e)).map((e=>e.clientIdentity))}async handleFiredIntent(e,t){const n=(0,l.generateOverrideWarning)("fdc3.raiseIntent","InteropBroker.handleFiredIntent",t,"interopClient.fireIntent");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntent)}async setIntentTarget(e,t){this.wire.sendAction("interop-broker-set-intent-target").catch((e=>{}));const n=this.intentClientMap.get(t.name),i=`intent-handler-${e.name}`;if(n){const t=n.get(i);if(t){if(t.pendingIntents.push(e),t.clientIdentity&&t.isReady){const{clientIdentity:e,pendingIntents:n}=t;try{const r=n[n.length-1];await this.invokeIntentHandler(e,i,r),t.pendingIntents=[]}catch(n){console.error(`Error invoking intent handler for client ${e.uuid}/${e.name}/${e.endpointId}`),t.isReady=!1}}}else n.set(i,{isReady:!1,pendingIntents:[e]})}else{this.intentClientMap.set(t.name,new Map);const n=this.intentClientMap.get(t.name);n&&n.set(i,{isReady:!1,pendingIntents:[e]})}}async handleInfoForIntent(e,t){const n=(0,l.generateOverrideWarning)("fdc3.findIntent","InteropBroker.handleInfoForIntent",t,"interopClient.getInfoForIntent");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntent)}async handleInfoForIntentsByContext(e,t){const n=(0,l.generateOverrideWarning)("fdc3.findIntentsByContext","InteropBroker.handleInfoForIntentsByContext",t,"interopClient.getInfoForIntentsByContext");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntentsByContext)}async handleFiredIntentForContext(e,t){const n=(0,l.generateOverrideWarning)("fdc3.raiseIntentForContext","InteropBroker.handleFiredIntentForContext",t,"interopClient.fireIntentForContext");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntentForContext)}async clientDisconnected(e){}async fdc3HandleOpen({app:e,context:t},n){const i=(0,l.generateOverrideWarning)("fdc3.open","InteropBroker.fdc3HandleOpen",n);throw console.warn(i),new Error(l.BROKER_ERRORS.fdc3Open)}async fdc3HandleFindInstances(e,t){const n=(0,l.generateOverrideWarning)("fdc3.open","InteropBroker.fdc3HandleFindInstances",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3FindInstances)}async fdc3HandleGetAppMetadata(e,t){const n=(0,l.generateOverrideWarning)("fdc3.getAppMetadata","InteropBroker.fdc3HandleGetAppMetadata",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3GetAppMetadata)}async invokeContextHandler(e,t,n){const i=await this.getProvider();try{await i.dispatch(e,t,n)}catch(i){console.error(`Error invoking context handler ${t} for context type ${n.type} in client ${e.uuid}/${e.name}/${e.endpointId}`,i)}}async invokeIntentHandler(e,t,n){const i=await this.getProvider();await i.dispatch(e,t,n)}async fdc3HandleGetInfo(t,n){const{fdc3Version:i}=t;return{fdc3Version:i,...o(this,e,"f"),optionalFeatures:{OriginatingAppMetadata:!1,UserChannelMembershipAPIs:!0},appMetadata:{appId:"",instanceId:""}}}async getAllClientInfo(){return(await this.getProvider()).getAllClientInfo()}decorateSnapshot(e){return{...e,interopSnapshotDetails:{contextGroupStates:this.getContextGroupStates()}}}applySnapshot(e,t){const n=e?.interopSnapshotDetails?.contextGroupStates;n&&(t?.closeExistingWindows||this.updateExistingClients(n),this.rehydrateContextGroupStates(n))}updateExistingClients(e){this.interopClients.forEach((t=>{const{clientIdentity:n,contextGroupId:r,contextHandlers:o}=t;if(r){const t=e[r];for(const[,e]of Object.entries(t))o.forEach((t=>{const{handlerId:r,contextType:o}=t;i.isContextTypeCompatible(e.type,o)&&this.invokeContextHandler(n,r,e)}))}}))}getContextGroupStates(){return i.toObject(this.contextGroupsById)}rehydrateContextGroupStates(e){const t=Object.entries(e);for(const[e,n]of t){const t=Object.entries(n);for(const[n,i]of t)if(this.contextGroupsById.has(e)){this.contextGroupsById.get(e).set(n,i)}else console.warn(`Attempting to set a context group that isn't in the context group mapping. Skipping context group rehydration for: ${e}`)}}contextHandlerRegistered({contextType:e,handlerId:t},n){const i={contextType:e,handlerId:t},r=this.getClientState(n);if(r?.contextHandlers.set(t,i),r&&r.contextGroupId){const{contextGroupId:i}=r,o=this.contextGroupsById.get(i);if(void 0===e)o.forEach(((e,i)=>{this.invokeContextHandler(n,t,e)}));else if(o.has(e)){const i=o.get(e);i&&this.invokeContextHandler(n,t,i)}}}async intentHandlerRegistered(e,t){const{handlerId:n}=e,i=this.intentClientMap.get(t.name),r=i?.get(n);if(i)if(r){const{pendingIntents:e}=r;r.clientIdentity=t,r.isReady=!0;try{if(e.length>0){const i=e[e.length-1];await this.invokeIntentHandler(t,n,i),r.pendingIntents=[]}}catch(e){console.error(`Error invoking intent handler: ${n} for client ${t.uuid}/${t.name}/${t.endpointId}`)}}else i.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t});else{this.intentClientMap.set(t.name,new Map);const e=this.intentClientMap.get(t.name);e&&e.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t})}}removeContextHandler({handlerId:e},t){const n=this.getClientState(t);n&&n.contextHandlers.delete(e)}handleJoinSessionContextGroup({sessionContextGroupId:e},t){try{if(!e)throw new Error("Failed to join session context group: must specify group id.");const n=this.sessionContextGroupMap.get(e);if(n)n.registerNewClient(t);else{const n=new h.default(this.channel,e);n.registerNewClient(t),this.sessionContextGroupMap.set(e,n)}return{hasConflict:this.contextGroupsById.has(e)}}catch(e){throw new Error(e)}}getClientState(e){return this.interopClients.get(e.endpointId)}static toObject(e){const t=Object.fromEntries(e),n={};return Object.entries(t).forEach((([e,t])=>{const i=Object.fromEntries(t);n[e]=i})),n}static checkContextIntegrity(e){if(!e)return{isValid:!1,reason:"No context supplied"};if("object"!=typeof e)return{isValid:!1,reason:"Context must be an Object"};if(!e.type)return{isValid:!1,reason:"Context must have a type property"};if(e.id&&"object"!=typeof e.id)return{isValid:!1,reason:"Context id must be an Object populated with key-value identifiers (if set)"};if(e.id){const{id:t}=e,n=Object.keys(t);let i=!1;if(!n.length)return{isValid:!1,reason:"Context id must have at least one key-value identifier"};if(n.forEach((e=>{"string"==typeof e&&"string"==typeof t[e]||(i=!0)})),i)return{isValid:!1,reason:"Context id key-value identifiers must be of type string"}}return e.name&&"string"!=typeof e.name?{isValid:!1,reason:"Context name must be of string type (if set)"}:{isValid:!0}}static hasEndpointId(e){return void 0!==e.endpointId}static isContextTypeCompatible(e,t){return void 0===t||e===t}setContextGroupMap(){for(const e of this.getContextGroups())this.contextGroupsById.set(e.id,new Map)}async setCurrentContextGroupInClientOptions(e,t){try{const n=await this.fin.System.getEntityInfo(e.uuid,e.name);let i;"view"===n.entityType?i=await this.fin.View.wrap(e):"window"===n.entityType&&(i=await this.fin.Window.wrap(e)),i&&await i.updateOptions({interop:{currentContextGroup:t}})}catch(e){}}async setupChannelProvider(){try{const e=await this.getProvider();this.channel=e,this.wireChannel(e)}catch(e){throw new Error(`Error setting up Interop Broker Channel Provider: ${e}`)}}wireChannel(e){e.onConnection((async(e,t)=>{if(!await this.isConnectionAuthorized(e,t))throw new Error(`Connection not authorized for ${e.uuid}, ${e.name}`);if(!e.endpointId)throw new Error("Version too old to be compatible with Interop. Please upgrade your runtime to a more recent version.");const n={contextGroupId:void 0,contextHandlers:new Map,clientIdentity:e};t?.currentContextGroup&&this.contextGroupsById.has(t.currentContextGroup)&&(n.contextGroupId=t?.currentContextGroup),this.interopClients.set(e.endpointId,n)})),e.onDisconnection((e=>{this.interopClients.delete(e.endpointId);const t=this.intentClientMap.get(e.name);t&&e.uuid===this.fin.me.uuid&&t.forEach((e=>{e.isReady=!1})),this.sessionContextGroupMap.forEach((t=>{t.onDisconnection(e)})),this.clientDisconnected(e)})),e.beforeAction((async(e,t,n)=>{if(!await this.isActionAuthorized(e,t,n))throw new Error(`Action (${e}) not authorized for ${n.uuid}, ${n.name}`);this.logging?.beforeAction?.enabled&&console.log(e,t,n)})),e.afterAction(((e,t,n)=>{this.logging?.afterAction?.enabled&&console.log(e,t,n)})),e.register("setContext",this.setContext.bind(this)),e.register("fireIntent",this.handleFiredIntent.bind(this)),e.register("getCurrentContext",this.getCurrentContext.bind(this)),e.register("getInfoForIntent",this.handleInfoForIntent.bind(this)),e.register("getInfoForIntentsByContext",this.handleInfoForIntentsByContext.bind(this)),e.register("fireIntentForContext",this.handleFiredIntentForContext.bind(this)),e.register("getContextGroups",this.getContextGroups.bind(this)),e.register("joinContextGroup",this.joinContextGroup.bind(this)),e.register("removeFromContextGroup",this.removeFromContextGroup.bind(this)),e.register("getAllClientsInContextGroup",this.getAllClientsInContextGroup.bind(this)),e.register("getInfoForContextGroup",this.getInfoForContextGroup.bind(this)),e.register("contextHandlerRegistered",this.contextHandlerRegistered.bind(this)),e.register("intentHandlerRegistered",this.intentHandlerRegistered.bind(this)),e.register("removeContextHandler",this.removeContextHandler.bind(this)),e.register("sessionContextGroup:createIfNeeded",this.handleJoinSessionContextGroup.bind(this)),e.register("fdc3Open",this.fdc3HandleOpen.bind(this)),e.register("fdc3v2FindIntentsByContext",this.handleInfoForIntentsByContext.bind(this)),e.register("fdc3FindInstances",this.fdc3HandleFindInstances.bind(this)),e.register("fdc3GetAppMetadata",this.fdc3HandleGetAppMetadata.bind(this)),e.register("fdc3v2GetInfo",(async(e,t)=>this.fdc3HandleGetInfo.bind(this)(e,t))),e.register("createPrivateChannelProvider",(async e=>{const{channelId:t}=e,n=await this.fin.InterApplicationBus.Channel.create(t);p.PrivateChannelProvider.init(n,t)}))}isConnectionAuthorized(e,t){return this.wire.sendAction("interop-broker-is-connection-authorized").catch((e=>{})),Promise.resolve(!0)}isActionAuthorized(e,t,n){return this.wire.sendAction("interop-broker-is-action-authorized").catch((e=>{})),Promise.resolve(!0)}};return Gi.InteropBroker=f,e=new WeakMap,t=new WeakMap,n=new WeakMap,Gi}var zi,Ki={},qi={},Ji=s&&s.__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},Yi=s&&s.__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)};Object.defineProperty(qi,"__esModule",{value:!0});const Zi=d,Qi=Hi;class Xi extends Zi.Base{constructor(e,t,n){super(e),zi.set(this,void 0),this.id=n,Ji(this,zi,t,"f")}async setContext(e){this.wire.sendAction("interop-session-context-group-set-context").catch((e=>{}));return(await Yi(this,zi,"f")).dispatch(`sessionContextGroup:setContext-${this.id}`,{sessionContextGroupId:this.id,context:e})}async getCurrentContext(e){this.wire.sendAction("interop-session-context-group-get-context").catch((e=>{}));return(await Yi(this,zi,"f")).dispatch(`sessionContextGroup:getContext-${this.id}`,{sessionContextGroupId:this.id,type:e})}async addContextHandler(e,t){if(this.wire.sendAction("interop-session-context-group-add-handler").catch((e=>{})),"function"!=typeof e)throw new Error("Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");const n=await Yi(this,zi,"f");let i;return i=t?`sessionContextHandler:invoke-${this.id}-${t}-${(0,Qi.generateId)()}`:`sessionContextHandler:invoke-${this.id}`,n.register(i,(0,Qi.wrapContextHandler)(e,i)),await n.dispatch(`sessionContextGroup:handlerAdded-${this.id}`,{handlerId:i,contextType:t}),{unsubscribe:await this.createUnsubscribeCb(i)}}async createUnsubscribeCb(e){const t=await Yi(this,zi,"f");return async()=>{t.remove(e),await t.dispatch(`sessionContextGroup:handlerRemoved-${this.id}`,{handlerId:e})}}getUserInstance(){return{id:this.id,setContext:(0,Qi.wrapInTryCatch)(this.setContext.bind(this),"Failed to set context: "),getCurrentContext:(0,Qi.wrapInTryCatch)(this.getCurrentContext.bind(this),"Failed to get context: "),addContextHandler:(0,Qi.wrapInTryCatch)(this.addContextHandler.bind(this),"Failed to add context handler: ")}}}qi.default=Xi,zi=new WeakMap;var er={},tr={},nr={},ir={},rr=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),or=s&&s.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),sr=s&&s.__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)&&rr(t,e,n);return or(t,e),t};Object.defineProperty(ir,"__esModule",{value:!0}),ir.PrivateChannelClient=void 0;const ar=sr(Hi);var cr,dr;function hr(){if(cr)return tr;cr=1;var e,t=s&&s.__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)},n=s&&s.__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},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(tr,"__esModule",{value:!0}),tr.FDC3ModuleBase=void 0;const o=nr,a=Hi,c=wr(),d=r(i);return tr.FDC3ModuleBase=class{get client(){return t(this,e,"f").call(this)}get fin(){return this.wire.getFin()}constructor(t,i){this.wire=i,e.set(this,void 0),n(this,e,t,"f")}async broadcast(e){return this.wire.sendAction("fdc3-broadcast").catch((e=>{})),this.client.setContext(e)}async _open(e,t){this.wire.sendAction("fdc3-open").catch((e=>{}));try{return await c.InteropClient.ferryFdc3Call(this.client,"fdc3Open",{app:e,context:t})}catch(e){const t=e.message===a.BROKER_ERRORS.fdc3Open?"ResolverUnavailable":e.message;throw new Error(t)}}async _getChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:"system",...(0,o.getUnsupportedChannelApis)()})))}async getOrCreateChannel(e){this.wire.sendAction("fdc3-get-or-create-channel").catch((e=>{}));const t=(await this._getChannels()).find((t=>t.id===e));if(t)return{...t,type:"system",...(0,o.getUnsupportedChannelApis)()};try{const t=await this.client.joinSessionContextGroup(e);return(0,o.buildAppChannelObject)(t)}catch(e){throw console.error(e.message),new Error(o.ChannelError.CreationFailed)}}async getSystemChannels(){return this.wire.sendAction("fdc3-get-system-channels").catch((e=>{})),this._getChannels()}async joinChannel(e){this.wire.sendAction("fdc3-join-channel").catch((e=>{}));try{return await this.client.joinContextGroup(e)}catch(e){if(e.message===a.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup?console.error("The Channel you have tried to join is an App Channel. Custom Channels can only be defined by the Interop Broker through code or manifest configuration. Please use getOrCreateChannel."):console.error(e.message),e.message.startsWith("Attempting to join a context group that does not exist"))throw new Error(o.ChannelError.NoChannelFound);throw new Error(o.ChannelError.AccessDenied)}}async getCurrentChannel(){this.wire.sendAction("fdc3-get-current-channel").catch((e=>{}));const e=await this.getCurrentContextGroupInfo();return e?this.buildChannelObject(e):null}async leaveCurrentChannel(){return this.wire.sendAction("fdc3-leave-current-channel").catch((e=>{})),this.client.removeFromContextGroup()}async getCurrentContextGroupInfo(){const e=await this.client.getContextGroups(),t=e.map((async e=>this.client.getAllClientsInContextGroup(e.id))),n=(await Promise.all(t)).findIndex((e=>e.some((e=>{const{uuid:t,name:n}=e;return this.wire.me.uuid===t&&this.wire.me.name===n}))));return e[n]}async buildChannelObject(e){return{...e,type:"system",addContextListener:(...[e,t])=>{let n,i;"function"==typeof e?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),n=e):(n=t,"string"==typeof e&&(i=e));const r=(async()=>{let e=!0;const t=await this.client.getCurrentContext(i);return this.client.addContextHandler(((i,r)=>{if(!e||(e=!1,!(0,d.default)(t,i)))return n(i,r)}),i)})();return{...r,unsubscribe:()=>r.then((e=>e.unsubscribe()))}},broadcast:this.broadcast.bind(this),getCurrentContext:async e=>{const t=await this.client.getCurrentContext(e);return void 0===t?null:t}}}},e=new WeakMap,tr}ir.PrivateChannelClient=class{constructor(e,t){this.id=t,this.client=e,this.listeners=new Map}async broadcast(e){return this.client.dispatch("broadcast",{context:e})}async getCurrentContext(e){return this.client.dispatch("getCurrentContext",{contextType:e})}async addContextListener(e,t){if("function"!=typeof t)throw new Error("Non-function argument passed to the second parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");let n;n=e?`contextHandler:invoke-${this.id}-${e}-${ar.generateId()}`:`contextHandler:invoke-${this.id}-${ar.generateId()}`,this.client.register(n,ar.wrapContextHandler(t,n));const i={unsubscribe:await this.createContextUnsubscribeCb(n)};return this.listeners.set(n,i),await this.client.dispatch("contextHandlerAdded",{handlerId:n,contextType:e}),i}createNonStandardUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch("nonStandardHandlerRemoved",{handlerId:e})}}createContextUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch("contextHandlerRemoved",{handlerId:e})}}onAddContextListener(e){const t=`onContextHandlerAdded:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch("onAddContextHandlerAdded",{handlerId:t}),n}onDisconnect(e){const t=`onDisconnect:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch("onDisconnectHandlerAdded",{handlerId:t}),n}onUnsubscribe(e){const t=`onUnsubscribe:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch("onUnsubscribeHandlerAdded",{handlerId:t}),n}async cleanUpAllSubs(){Array.from(this.listeners.keys()).forEach((e=>{this.client.remove(e),this.listeners.delete(e)}))}async disconnect(){try{await this.client.dispatch("clientDisconnecting"),await this.cleanUpAllSubs(),await this.client.disconnect()}catch(e){throw new Error(e.message)}}},function(e){var t=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.getIntentResolution=e.isChannel=e.isContext=e.connectPrivateChannel=e.buildAppChannelObject=e.buildPrivateChannelObject=e.ChannelError=e.ResultError=e.UnsupportedChannelApiError=e.getUnsupportedChannelApis=void 0;const n=Hi,r=ir,o=t(i);e.getUnsupportedChannelApis=e=>({addContextListener:()=>{throw new a("Channel.addContextListener",e)},broadcast:()=>{throw new a("Channel.broadcast",e)},getCurrentContext:()=>{throw new a("Channel.getCurrentContext",e)}});class a extends Error{constructor(e,t="System"){super(e),this.message=`Calling ${e} on an instance of a ${t} Channel returned by fdc3.get${t}Channels is not supported. If you would like to use a ${t} Channel, please use fdc3.joinChannel, fdc3.addContextListener, and fdc3.broadcast instead.`}}var c,d;e.UnsupportedChannelApiError=a,function(e){e.NoResultReturned="NoResultReturned",e.IntentHandlerRejected="IntentHandlerRejected"}(c=e.ResultError||(e.ResultError={})),(d=e.ChannelError||(e.ChannelError={})).NoChannelFound="NoChannelFound",d.AccessDenied="AccessDenied",d.CreationFailed="CreationFailed";e.buildPrivateChannelObject=e=>{let t=!1;const n=()=>{if(t)throw new Error("Private Channel Client has been disconnected from the Private Channel")};return{id:e.id,type:"private",broadcast:async t=>(n(),e.broadcast(t)),getCurrentContext:async t=>(n(),e.getCurrentContext(t)),addContextListener:async(t,i)=>{n();let r=i,o=t;"function"==typeof t&&(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),r=t,o=null);return e.addContextListener(o,r)},onAddContextListener:t=>(n(),e.onAddContextListener(t)),disconnect:async()=>(n(),t=!0,e.disconnect()),onDisconnect:t=>(n(),e.onDisconnect(t)),onUnsubscribe:t=>(n(),e.onUnsubscribe(t))}};e.buildAppChannelObject=e=>({id:e.id,type:"app",broadcast:e.setContext,getCurrentContext:async t=>{const n=await e.getCurrentContext(t);return void 0===n?null:n},addContextListener:(t,n)=>{let i,r;"function"==typeof t?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),i=t):(i=n,"string"==typeof t&&(r=t));const s=(async()=>{let t=!0;const n=await e.getCurrentContext(r);return e.addContextHandler(((e,r)=>{if(!t||(t=!1,!(0,o.default)(n,e)))return i(e,r)}),r)})();return{...s,unsubscribe:()=>s.then((e=>e.unsubscribe()))}}});e.connectPrivateChannel=async t=>{try{const n=await fin.InterApplicationBus.Channel.connect(t),i=new r.PrivateChannelClient(n,t);return(0,e.buildPrivateChannelObject)(i)}catch(e){throw new Error(`Private Channel with id: ${t} doesn't exist`)}};e.isContext=e=>{if(e&&"object"==typeof e&&"type"in e){const{type:t}=e;return"string"==typeof t}return!1};e.isChannel=e=>{if(e&&"object"==typeof e&&"type"in e&&"id"in e){const{type:t,id:n}=e;return"string"==typeof t&&"string"==typeof n&&("app"===t||"private"===t)}return!1};e.getIntentResolution=async(t,i,r,o)=>{const s=(0,n.generateId)(),a=new Promise(((e,t)=>{fin.InterApplicationBus.subscribe({uuid:"*"},s,(t=>{e(t)})).catch((()=>t(new Error("getResult is not supported in this environment"))))})),d=r?{target:r,intentResolutionResultId:s}:{intentResolutionResultId:s},h=o?{name:o,context:i,metadata:d}:{...i,metadata:d},l=async()=>{let n=await a;if(!n||"object"!=typeof n)throw new Error(c.NoResultReturned);const{error:i}=n;if(i)throw new Error(c.IntentHandlerRejected);if((0,e.isChannel)(n)){const{id:i,type:r}=n;switch(r){case"private":n=await(0,e.connectPrivateChannel)(i);break;case"app":{const r=await t.joinSessionContextGroup(i);n=(0,e.buildAppChannelObject)(r);break}}}else if(!(0,e.isContext)(n))throw new Error(c.NoResultReturned);return n},u=o?await t.fireIntent(h):await t.fireIntentForContext(h);return"object"!=typeof u?{source:{appId:"",instanceId:""},intent:"",version:"2.0",getResult:l}:{...u,getResult:l}}}(nr);var lr,ur,pr={};function wr(){if(ur)return Ki;ur=1;var e,t,n=s&&s.__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},i=s&&s.__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)},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ki,"__esModule",{value:!0}),Ki.InteropClient=void 0;const o=d,a=r(qi),c=function(){if(dr)return er;dr=1,Object.defineProperty(er,"__esModule",{value:!0}),er.Fdc3Module=void 0;const e=Hi,t=hr();class n extends t.FDC3ModuleBase{async open(e,t){await super._open(e,t)}addContextListener(e,t){let n;return this.wire.sendAction("fdc3-add-context-listener").catch((e=>{})),"function"==typeof e?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),n=this.client.addContextHandler(e)):n=this.client.addContextHandler(t,null===e?void 0:e),{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}addIntentListener(e,t){this.wire.sendAction("fdc3-add-intent-listener").catch((e=>{}));const n=this.client.registerIntentHandler((e=>{const{context:n,metadata:i}=e,{metadata:r}=n,o=i?.intentResolutionResultId||r?.intentResolutionResultId;o&&this.fin.InterApplicationBus.publish(o,null).catch((()=>null)),t(e.context)}),e,{fdc3Version:"1.2"});return{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}async raiseIntent(t,n,i){this.wire.sendAction("fdc3-raise-intent").catch((e=>{}));const r=i?{name:t,context:n,metadata:{target:i}}:{name:t,context:n};try{return await this.client.fireIntent(r)}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntent?"ResolverUnavailable":t.message;throw new Error(n)}}async findIntent(t,n){this.wire.sendAction("fdc3-find-intent").catch((e=>{}));try{return await this.client.getInfoForIntent({name:t,context:n})}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntent?"ResolverUnavailable":t.message;throw new Error(n)}}async findIntentsByContext(t){this.wire.sendAction("fdc3-find-intents-by-context").catch((e=>{}));try{return await this.client.getInfoForIntentsByContext(t)}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntentsByContext?"ResolverUnavailable":t.message;throw new Error(n)}}async raiseIntentForContext(t,n){this.wire.sendAction("fdc3-raise-intent-for-context").catch((e=>{}));try{return await this.client.fireIntentForContext({...t,metadata:{target:n}})}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntentForContext?"ResolverUnavailable":t.message;throw new Error(n)}}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}getInfo(){return this.wire.sendAction("fdc3-get-info").catch((e=>{})),{providerVersion:this.wire.environment.getAdapterVersionSync(),provider:`openfin-${this.wire.me.uuid}`,fdc3Version:"1.2"}}}return er.Fdc3Module=n,er}(),h=function(){if(lr)return pr;lr=1,Object.defineProperty(pr,"__esModule",{value:!0}),pr.Fdc3Module2=void 0;const e=hr(),t=Hi,n=wr(),i=nr,r=ir;class o extends e.FDC3ModuleBase{async open(e,t){return"string"==typeof e&&console.warn("Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string })."),super._open(e,t)}async findInstances(e){this.wire.sendAction("fdc3-find-instances").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,"fdc3FindInstances",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3FindInstances?"ResolverUnavailable":e.message;throw new Error(n)}}async getAppMetadata(e){this.wire.sendAction("fdc3-get-app-metadata").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,"fdc3GetAppMetadata",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3GetAppMetadata?"ResolverUnavailable":e.message;throw new Error(n)}}async addContextListener(e,t){this.wire.sendAction("fdc3-add-context-listener").catch((e=>{}));const n=e=>t=>{const{contextMetadata:n,...i}=t,r=n?[{...i},n]:[t,null];e(...r)};let i=t,r=n(i);return"function"==typeof e?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),i=e,r=n(i),this.client.addContextHandler(r)):this.client.addContextHandler(r,null===e?void 0:e)}async findIntent(e,n,i){this.wire.sendAction("fdc3-find-intent").catch((e=>{}));try{return await this.client.getInfoForIntent({name:e,context:n,metadata:{resultType:i}})}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntent?"ResolverUnavailable":e.message;throw new Error(n)}}async findIntentsByContext(e,i){this.wire.sendAction("fdc3-find-intents-by-context").catch((e=>{}));const r=i?{context:e,metadata:{resultType:i}}:e;try{return await n.InteropClient.ferryFdc3Call(this.client,"fdc3v2FindIntentsByContext",r)}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntentsByContext?"ResolverUnavailable":e.message;throw new Error(n)}}async raiseIntent(e,n,r){this.wire.sendAction("fdc3-raise-intent").catch((e=>{}));try{return"string"==typeof r&&console.warn("Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string })."),(0,i.getIntentResolution)(this.client,n,r,e)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?"ResolverUnavailable":e.message;throw new Error(n)}}async raiseIntentForContext(e,n){this.wire.sendAction("fdc3-raise-intent-for-context").catch((e=>{}));try{return"string"==typeof n&&console.warn("Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string })."),(0,i.getIntentResolution)(this.client,e,n)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?"ResolverUnavailable":e.message;throw new Error(n)}}async addIntentListener(e,t){if(this.wire.sendAction("fdc3-add-intent-listener").catch((e=>{})),"string"!=typeof e)throw new Error("First argument must be an Intent name");return this.client.registerIntentHandler((async e=>{let n,i;const{context:r,metadata:o}=e,{contextMetadata:s,metadata:a,...c}=r,d=o?.intentResolutionResultId||a?.intentResolutionResultId;try{const e=a?{metadata:a,...c}:{...c};n=await t(e,s),i=n}catch(e){n=e,i={error:!0}}if(d&&this.fin.InterApplicationBus.publish(d,i).catch((()=>null)),n instanceof Error)throw new Error(n.message);return n}),e,{fdc3Version:"2.0"})}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}async createPrivateChannel(){const e=(0,t.generateId)();await n.InteropClient.ferryFdc3Call(this.client,"createPrivateChannelProvider",{channelId:e});const o=await this.fin.InterApplicationBus.Channel.connect(e),s=new r.PrivateChannelClient(o,e);return(0,i.buildPrivateChannelObject)(s)}async getUserChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:"user",...(0,i.getUnsupportedChannelApis)("User")})))}async getSystemChannels(){return console.warn("This API has been deprecated. Please use fdc3.getUserChannels instead."),super.getSystemChannels()}async joinUserChannel(e){return super.joinChannel(e)}async joinChannel(e){return console.warn("This API has been deprecated. Please use fdc3.joinUserChannel instead."),super.joinChannel(e)}async getCurrentChannel(){const e=await super.getCurrentChannel();return e?{...e,type:"user",broadcast:this.broadcast.bind(this)}:null}async getInfo(){return n.InteropClient.ferryFdc3Call(this.client,"fdc3v2GetInfo",{fdc3Version:"2.0"})}}return pr.Fdc3Module2=o,pr}(),l=Hi;let u=class extends o.Base{constructor(i,r){super(i),e.set(this,void 0),t.set(this,void 0),n(this,t,new Map,"f"),n(this,e,r,"f")}async setContext(t){this.wire.sendAction("interop-client-set-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("setContext",{context:t})}async addContextHandler(t,n){if(this.wire.sendAction("interop-client-add-context-handler").catch((e=>{})),"function"!=typeof t)throw new Error("Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");const r=await i(this,e,"f");let o;o=n?`invokeContextHandler-${n}-${(0,l.generateId)()}`:"invokeContextHandler";const s=(0,l.wrapContextHandler)(t,o);return r.register(o,s),await r.dispatch("contextHandlerRegistered",{handlerId:o,contextType:n}),{unsubscribe:async()=>{r.remove(o),await r.dispatch("removeContextHandler",{handlerId:o})}}}async getContextGroups(){this.wire.sendAction("interop-client-get-context-groups").catch((e=>{}));return(await i(this,e,"f")).dispatch("getContextGroups")}async joinContextGroup(t,n){this.wire.sendAction("interop-client-join-context-group").catch((e=>{}));const r=await i(this,e,"f");if(!t)throw new Error("No contextGroupId specified for joinContextGroup.");return r.dispatch("joinContextGroup",{contextGroupId:t,target:n})}async removeFromContextGroup(t){this.wire.sendAction("interop-client-remove-from-context-group").catch((e=>{}));return(await i(this,e,"f")).dispatch("removeFromContextGroup",{target:t})}async getAllClientsInContextGroup(t){this.wire.sendAction("interop-client-get-all-clients-in-context-group").catch((e=>{}));const n=await i(this,e,"f");if(!t)throw new Error("No contextGroupId specified for getAllClientsInContextGroup.");return n.dispatch("getAllClientsInContextGroup",{contextGroupId:t})}async getInfoForContextGroup(t){this.wire.sendAction("interop-client-get-info-for-context-group").catch((e=>{}));const n=await i(this,e,"f");if(!t)throw new Error("No contextGroupId specified for getInfoForContextGroup.");return n.dispatch("getInfoForContextGroup",{contextGroupId:t})}async fireIntent(t){this.wire.sendAction("interop-client-fire-intent").catch((e=>{}));return(await i(this,e,"f")).dispatch("fireIntent",t)}async registerIntentHandler(t,n,r){this.wire.sendAction("interop-client-register-intent-handler").catch((e=>{}));const o=await i(this,e,"f"),s=`intent-handler-${n}`,a=(0,l.wrapIntentHandler)(t,s);try{await o.register(s,a),await o.dispatch("intentHandlerRegistered",{handlerId:s,...r})}catch(e){throw new Error("Unable to register intent handler")}return{unsubscribe:async()=>{o.remove(s)}}}async getCurrentContext(t){this.wire.sendAction("interop-client-get-current-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("getCurrentContext",{contextType:t})}async getInfoForIntent(t){this.wire.sendAction("interop-client-get-info-for-intent").catch((e=>{}));return(await i(this,e,"f")).dispatch("getInfoForIntent",t)}async getInfoForIntentsByContext(t){this.wire.sendAction("interop-client-get-info-for-intents-by-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("getInfoForIntentsByContext",t)}async fireIntentForContext(t){this.wire.sendAction("interop-client-fire-intent-for-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("fireIntentForContext",t)}async joinSessionContextGroup(n){try{const r=i(this,t,"f").get(n);if(r)return r.getUserInstance();const o=await i(this,e,"f"),{hasConflict:s}=await o.dispatch("sessionContextGroup:createIfNeeded",{sessionContextGroupId:n});s&&console.warn(`A (non-session) context group with the name "${n}" already exists. If you are trying to join a Context Group, call joinContextGroup instead.`);const c=new a.default(this.wire,i(this,e,"f"),n);return i(this,t,"f").set(n,c),c.getUserInstance()}catch(e){throw console.error(`Error thrown trying to create Session Context Group with id "${n}": ${e}`),e}}async onDisconnection(t){this.wire.sendAction("interop-client-add-ondisconnection-listener").catch((e=>{}));return(await i(this,e,"f")).onDisconnection((e=>{const{uuid:n}=e;t({type:"interop-broker",topic:"disconnected",brokerName:n})}))}getFDC3Sync(e){switch(e){case"1.2":return new c.Fdc3Module((()=>this),this.wire);case"2.0":return new h.Fdc3Module2((()=>this),this.wire);default:throw new Error(`Invalid FDC3 version provided: ${e}. Must be '1.2' or '2.0'`)}}async getFDC3(e){return this.getFDC3Sync(e)}static async ferryFdc3Call(t,n,r){return(await i(t,e,"f")).dispatch(n,r||null)}};return Ki.InteropClient=u,e=new WeakMap,t=new WeakMap,Ki}var yr,fr,gr,mr={};function vr(){if(yr)return mr;yr=1,Object.defineProperty(mr,"__esModule",{value:!0}),mr.overrideCheck=mr.checkFDC32Overrides=mr.getDefaultViewFdc3VersionFromAppInfo=void 0;const e=Vi();function t(t){return["fdc3HandleFindInstances","handleInfoForIntent","handleInfoForIntentsByContext","fdc3HandleGetAppMetadata","fdc3HandleGetInfo","fdc3HandleOpen","handleFiredIntent","handleFiredIntentForContext"].filter((n=>t[n]===e.InteropBroker.prototype[n]))}return mr.getDefaultViewFdc3VersionFromAppInfo=function({manifest:e,initialOptions:t}){const n=e?.platform?.defaultViewOptions?.fdc3InteropApi??t.defaultViewOptions?.fdc3InteropApi;return["1.2","2.0"].includes(n??"")?n:void 0},mr.checkFDC32Overrides=t,mr.overrideCheck=function(e,n){if(n&&"2.0"===n){const n=t(e);n.length>0&&console.warn(`WARNING: FDC3 2.0 has been set as a default option for Views in this Platform, but the required InteropBroker APIs for FDC3 2.0 compliance have not all been overridden.\nThe following APIs need to be overridden:\n${n.join("\n")}`)}},mr}function Cr(){return gr||(gr=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),i=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),i(function(){if(fr)return Ti;fr=1;var e=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ti,"__esModule",{value:!0}),Ti.InteropModule=void 0;const t=e(n),i=$i,r=d,o=Vi(),a=wr(),c=vr(),h=Tn,l=e=>new e,u="You have attempted to use or modify InteropBroker parameters, which is not allowed. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.";class p extends r.Base{async init(e,n=l){this.wire.sendAction("interop-init").catch((()=>{}));const r=await this.wire.environment.getInteropInfo(this.wire.getFin()),s=(0,i.createUnusableObject)(u),a=(0,i.createWarningObject)(u,(0,t.default)(r)),d=async()=>{throw new Error(u)},p=o.InteropBroker.createClosedConstructor(this.wire,(()=>this.fin.InterApplicationBus.Channel.create(`interop-broker-${e}`)),r);let w;return w=Array.isArray(n)?new((0,h.overrideFromComposables)(...n)(p))(s,d,a):await n(p,s,d,a),(0,c.overrideCheck)(w,r.fdc3Version),w}connectSync(e,t){return this.wire.sendAction("interop-connect-sync").catch((()=>{})),new a.InteropClient(this.wire,this.wire.environment.whenReady().then((()=>this.fin.InterApplicationBus.Channel.connect(`interop-broker-${e}`,{payload:t}))))}}return Ti.InteropModule=p,Ti}(),e),i(wr(),e),i(Vi(),e)}(Li)),Li}var br={},Ir={},Er={},xr={};Object.defineProperty(xr,"__esModule",{value:!0}),xr.getSnapshotSourceChannelName=void 0;xr.getSnapshotSourceChannelName=e=>`snapshot-source-provider-${e.uuid}`;var Ar,Pr,Mr,_r,Or,Sr=s&&s.__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},Rr=s&&s.__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)};Object.defineProperty(Er,"__esModule",{value:!0}),Er.SnapshotSource=void 0;const Fr=d,jr=xr,kr=new Map;class Lr extends Fr.Base{constructor(e,t){super(e),Ar.set(this,void 0),Pr.set(this,(()=>(kr.has(this.identity.uuid)||kr.set(this.identity.uuid,{eventFired:null,clientPromise:null}),kr.get(this.identity.uuid)))),Mr.set(this,(()=>(Rr(this,Pr,"f").call(this).clientPromise||(Rr(this,Pr,"f").call(this).clientPromise=Rr(this,_r,"f").call(this)),Rr(this,Pr,"f").call(this).clientPromise))),_r.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);try{Rr(this,Pr,"f").call(this).eventFired||await Rr(this,Or,"f").call(this);const t=await this.fin.InterApplicationBus.Channel.connect(e,{wait:!1});return t.onDisconnection((()=>{Rr(this,Pr,"f").call(this).clientPromise=null,Rr(this,Pr,"f").call(this).eventFired=null})),t}catch(e){throw Rr(this,Pr,"f").call(this).clientPromise=null,new Error("The targeted SnapshotSource is not currently initialized. Await this object's ready() method.")}})),Or.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);let t,n;const i=new Promise(((e,i)=>{t=e,n=i}));Rr(this,Pr,"f").call(this).eventFired=i;const r=async i=>{try{i.channelName===e&&(t(),await this.fin.InterApplicationBus.Channel.removeListener("connected",r))}catch(e){n(e)}};await this.fin.InterApplicationBus.Channel.on("connected",r)})),Sr(this,Ar,t,"f")}get identity(){return Rr(this,Ar,"f")}async ready(){this.wire.sendAction("snapshot-source-ready").catch((e=>{}));try{await Rr(this,Mr,"f").call(this)}catch(e){await Rr(this,Pr,"f").call(this).eventFired}}async getSnapshot(){this.wire.sendAction("snapshot-source-get-snapshot").catch((e=>{}));const e=await Rr(this,Mr,"f").call(this),t=await e.dispatch("get-snapshot");return(await t).snapshot}async applySnapshot(e){this.wire.sendAction("snapshot-source-apply-snapshot").catch((e=>{}));return(await Rr(this,Mr,"f").call(this)).dispatch("apply-snapshot",{snapshot:e})}}Er.SnapshotSource=Lr,Ar=new WeakMap,Pr=new WeakMap,Mr=new WeakMap,_r=new WeakMap,Or=new WeakMap,Object.defineProperty(Ir,"__esModule",{value:!0}),Ir.SnapshotSourceModule=void 0;const Tr=d,$r=Er,Br=xr;class Gr extends Tr.Base{async init(e){if(this.wire.sendAction("snapshot-source-init").catch((e=>{})),"object"!=typeof e||"function"!=typeof e.getSnapshot||"function"!=typeof e.applySnapshot)throw new Error("you must pass in a valid SnapshotProvider");const t=await this.fin.InterApplicationBus.Channel.create((0,Br.getSnapshotSourceChannelName)(this.fin.me));t.register("get-snapshot",(async()=>({snapshot:await e.getSnapshot()}))),t.register("apply-snapshot",(({snapshot:t})=>e.applySnapshot(t)))}wrapSync(e){return this.wire.sendAction("snapshot-source-wrap-sync").catch((e=>{})),new $r.SnapshotSource(this.wire,e)}async wrap(e){return this.wire.sendAction("snapshot-source-wrap").catch((e=>{})),this.wrapSync(e)}}Ir.SnapshotSourceModule=Gr,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Ir,e),n(Er,e)}(br),Object.defineProperty(a,"__esModule",{value:!0});var Wr=a.Fin=void 0;const Hr=t,Nr=c,Dr=ie(),Ur=Z(),Vr=de,zr=en,Kr=rn,qr=un,Jr=bn,Yr=J(),Zr=An,Qr=ki,Xr=Cr(),eo=br;class to extends Hr.EventEmitter{constructor(e){super(),this.wire=e,this.System=new Nr.System(e),this.Window=new Dr._WindowModule(e),this.Application=new Ur.ApplicationModule(e),this.InterApplicationBus=new Vr.InterApplicationBus(e),this.Clipboard=new zr.Clipboard(e),this.ExternalApplication=new Kr.ExternalApplicationModule(e),this.Frame=new qr._FrameModule(e),this.GlobalHotkey=new Jr.GlobalHotkey(e),this.Platform=new Zr.PlatformModule(e,this.InterApplicationBus.Channel),this.View=new Yr.ViewModule(e),this.Interop=new Xr.InteropModule(e),this.SnapshotSource=new eo.SnapshotSourceModule(e),e.registerFin(this),this.me=(0,Qr.getMe)(e),e.on("disconnected",(()=>{this.emit("disconnected")}))}}Wr=a.Fin=to;var no={},io={};function ro(e){return"string"==typeof e.manifestUrl}function oo(e){return ao(e)&&"string"==typeof e.address}function so(e){return oo(e)&&"string"==typeof e.token}function ao(e){return"string"==typeof e.uuid}function co(e){return e.runtime&&"string"==typeof e.runtime.version}function ho(e){return ao(e)&&co(e)}Object.defineProperty(io,"__esModule",{value:!0}),io.isInternalConnectConfig=io.isPortDiscoveryConfig=io.isNewConnectConfig=io.isConfigWithReceiver=io.isRemoteConfig=io.isExistingConnectConfig=io.isExternalConfig=void 0,io.isExternalConfig=ro,io.isExistingConnectConfig=oo,io.isRemoteConfig=so,io.isConfigWithReceiver=function(e){return"object"==typeof e.receiver&&so({...e,address:""})},io.isNewConnectConfig=ho,io.isPortDiscoveryConfig=function(e){return ro(e)&&co(e)||ho(e)},io.isInternalConnectConfig=function(e){return oo(e)||ho(e)};var lo={},uo={};Object.defineProperty(uo,"__esModule",{value:!0}),uo.EmitterMap=void 0;const po=t;function wo(e){return Buffer.from(e).toString("base64")}uo.EmitterMap=class{constructor(){this.storage=new Map}hashKeys(e){return e.map(wo).join("/")}getOrCreate(e){const t=this.hashKeys(e);return this.storage.has(t)||this.storage.set(t,new po.EventEmitter),this.storage.get(t)}has(e){return this.storage.has(this.hashKeys(e))}delete(e){const t=this.hashKeys(e);return this.storage.delete(t)}},Object.defineProperty(lo,"__esModule",{value:!0});const yo=uo;class fo extends yo.EmitterMap{constructor(){super(...arguments),this.dispatchEvent=e=>{if(function(e){return"process-desktop-event"===e.action}(e)){const{payload:t}=e,n=function(e){const{topic:t}=e;if("frame"===t||"window"===t||"view"===t){const{uuid:n,name:i}=e;return[t,n,i]}if("application"===t){const{uuid:n}=e;return[t,n]}return[t]}(t);if(this.has(n))return this.getOrCreate(n).emit(t.type,t),!0}return!1}}}lo.default=fo;var go,mo,vo=s&&s.__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},Co=s&&s.__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)},bo=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(no,"__esModule",{value:!0});var Io=no.Transport=void 0;const Eo=t,xo=io,Ao=g,Po=bo(lo),Mo=ki,_o=ke;class Oo extends Eo.EventEmitter{constructor(e,t,n){super(),this.wireListeners=new Map,this.topicRefMap=new Map,this.eventAggregator=new Po.default,this.messageHandlers=[this.eventAggregator.dispatchEvent],go.set(this,void 0),mo.set(this,void 0),this.connectSync=()=>{Co(this,go,"f").connectSync()},this.getPort=()=>Co(this,go,"f").getPort(),vo(this,go,new e(this.onmessage.bind(this)),"f"),this.environment=t,this.sendRaw=Co(this,go,"f").send.bind(Co(this,go,"f")),this.registerMessageHandler(this.handleMessage.bind(this)),Co(this,go,"f").on("disconnected",(()=>{for(const[,{handleNack:e}]of this.wireListeners)e({reason:"Remote connection has closed"});this.wireListeners.clear(),this.emit("disconnected")}));const{uuid:i,name:r}=n,o=this.environment.getCurrentEntityType();this.me=(0,Mo.getBaseMe)(o,i,r)}getFin(){if(!Co(this,mo,"f"))throw new Error("No Fin object registered for this transport");return Co(this,mo,"f")}registerFin(e){if(Co(this,mo,"f"))throw new Error("Fin object has already been registered for this transport");vo(this,mo,e,"f")}shutdown(){return Co(this,go,"f").shutdown()}async connect(e){if((0,xo.isConfigWithReceiver)(e))return await Co(this,go,"f").connect(e.receiver),this.authorize(e);if((0,xo.isRemoteConfig)(e))return this.connectRemote(e);if((0,xo.isExistingConnectConfig)(e))return this.connectByPort(e);if((0,xo.isNewConnectConfig)(e)){const t=await this.environment.retrievePort(e);return this.connectByPort({...e,address:`ws://localhost:${t}`})}}async connectRemote(e){return await Co(this,go,"f").connect(new(this.environment.getWsConstructor())(e.address)),this.authorize(e)}async connectByPort(e){const{address:t,uuid:n}=e,i={...e,type:"file-token"},r=Co(this,go,"f");await r.connect(new(this.environment.getWsConstructor())(e.address));const o=await this.sendAction("request-external-authorization",{uuid:n,type:"file-token"},!0);if("external-authorization-response"!==o.action)throw new Ao.UnexpectedActionError(o.action);return await this.environment.writeToken(o.payload.file,o.payload.token),this.authorize(i)}async authorize(e){const t=await this.sendAction("request-authorization",e,!0);if("authorization-response"!==t.action)throw new Ao.UnexpectedActionError(t.action);if(!0!==t.payload.success)throw new Ao.RuntimeError(t.payload)}sendAction(e,t={},n=!1){let i=()=>{};const r=Ao.RuntimeError.getCallSite(1),o=this.environment.getNextMessageId(),s=new Promise(((s,a)=>{i=a;const c={action:e,payload:t,messageId:o},d=Co(this,go,"f");return this.addWireListener(o,s,(e=>this.nackHandler(e,a,r)),n),d.send(c).catch(a)}));return Object.assign(s,{cancel:i,messageId:o})}nackHandler(e,t,n){t("string"==typeof e?e:new Ao.RuntimeError(e,n))}ferryAction(e){return new Promise(((t,n)=>{const i=this.environment.getNextMessageId();e.messageId=i;const r=e=>{t(e.payload)};return Co(this,go,"f").send(e).then((()=>this.addWireListener(i,r,(e=>this.nackHandler(e,n)),!1))).catch(n)}))}registerMessageHandler(e){this.messageHandlers.push(e)}addWireListener(e,t,n,i){i?this.uncorrelatedListener=t:this.wireListeners.has(e)?n({reason:"Duplicate handler id",error:(0,_o.errorToPOJO)(new Ao.DuplicateCorrelationError(String(e)))}):this.wireListeners.set(e,{resolve:t,handleNack:n})}onmessage(e){for(const t of this.messageHandlers)t.call(null,e)}handleMessage(e){const t=e.correlationId||NaN;if("correlationId"in e){if(!this.wireListeners.has(t))return!1;{const{resolve:n,handleNack:i}=this.wireListeners.get(t);"ack"!==e.action?i({reason:"Did not receive ack action",error:(0,_o.errorToPOJO)(new Ao.NoAckError(e.action))}):"payload"in e?e.payload.success?n.call(null,e):i(e.payload):"string"==typeof e.reason?i(e):(console.warn("Received invalid response from core",e),i({reason:"invalid response shape"})),this.wireListeners.delete(t)}}else this.uncorrelatedListener&&this.uncorrelatedListener.call(null,e),this.uncorrelatedListener=()=>{};return!0}}Io=no.Transport=Oo,go=new WeakMap,mo=new WeakMap;const So=(...e)=>({log:(...t)=>console.debug(`[${(new Date).toISOString()}]`,...(e=>e.map((e=>`[${e}]`)))(e),...t),getLogger:(...t)=>So(...e,...t)}),Ro=So("@openfin/core-web/client");function Fo(e,t){if(!function(e){return"string"==typeof e}(e))throw new Error(`Property ${t} has invalid type. Expected string, got ${typeof e}.`)}const jo="web-broker-ports-ready",ko=Ro.getLogger("get-web-interop-ports");function Lo(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)}function To(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}"function"==typeof SuppressedError&&SuppressedError;const $o=e=>{var n,i,r;return r=class extends t.EventEmitter{constructor(t){super(),n.set(this,void 0),i.set(this,!1),this.connectSync=()=>{Lo(this,i,"f")||(e.addEventListener("message",(e=>{e.data?.topic?.startsWith("wire-message")&&e.data.message&&Lo(this,n,"f").call(this,{...JSON.parse(e.data.message),ports:e.ports})})),e.start())},this.connect=async()=>{this.connectSync()},this.send=t=>(e.postMessage({topic:"wire-message",message:JSON.stringify(t)}),Promise.resolve()),this.shutdown=async()=>{e.close()},To(this,n,t,"f")}getPort(){return e}},n=new WeakMap,i=new WeakMap,r};var Bo={},Go={};Object.defineProperty(Go,"__esModule",{value:!0}),Go.BaseEnvironment=void 0;const Wo=vr();Go.BaseEnvironment=class{async getViewWindowIdentity(e,t){const{identity:n}=await e.View.wrapSync(t).getCurrentWindow();return n}async getInteropInfo(e){const t=await e.Application.getCurrentSync().getInfo().catch((()=>null)),n=t?.initialOptions?.interopBrokerConfiguration??{};return{fdc3Version:t?(0,Wo.getDefaultViewFdc3VersionFromAppInfo)(t):void 0,...n,fdc3Info:{providerVersion:await e.System.getVersion(),provider:"OpenFin"}}}},Object.defineProperty(Bo,"__esModule",{value:!0});var Ho=Bo.BrowserEnvironment=void 0;const No=Go;class Do extends No.BaseEnvironment{constructor(){super(...arguments),this.type="other",this.getRandomId=()=>{const e=new Uint32Array(1);return window.crypto.getRandomValues(e)[0].toString(32)}}getAdapterVersionSync(){return""}observeBounds(e,t){throw new Error("Method not implemented.")}layoutAllowedInContext(e){return!1}initLayoutManager(e,t,n){throw new Error("Method not implemented.")}applyLayoutSnapshot(e,t,n){throw new Error("Method not implemented.")}createLayout(e,t){throw new Error("Method not implemented.")}destroyLayout(e,t){throw new Error("Method not implemented.")}resolveLayout(e,t){throw new Error("Method not implemented.")}initPlatform(...e){throw new Error("Method not implemented.")}writeToken(e,t){return Promise.resolve("")}retrievePort(e){throw new Error("Method not implemented.")}getNextMessageId(){return this.getRandomId()}createChildContent(e){throw new Error("Method not implemented.")}getWebWindow(e){throw new Error("Method not implemented.")}getCurrentEntityIdentity(){throw new Error("Method not implemented.")}getCurrentEntityType(){return"external connection"}raiseEvent(e,t){throw new Error("Method not implemented.")}getUrl(){return location.href}getDefaultChannelOptions(){return{create:{},connect:{}}}getRtcPeer(){return new RTCPeerConnection}getWsConstructor(){return WebSocket}whenReady(){return Promise.resolve()}}Ho=Bo.BrowserEnvironment=Do;const Uo=e=>"platform"in e&&void 0!==e.platform;var Vo,zo;class Ko extends Ho{constructor(e){super(),this.connectConfig=e,Vo.set(this,void 0),zo.set(this,new W((async()=>Promise.resolve().then((function(){return __webpack_require__(/*! ./main-b14f67c9.js */ "./node_modules/@openfin/core-web/out/main-b14f67c9.js")}))))),Uo(e)&&this.validatePlatformOptions(e)}getAdapterVersionSync(){return"0.39.21"}validatePlatformOptions({platform:e}){if(!("layoutSnapshot"in e))throw new Error("Platform options are missing layoutSnapshot. Please provide a layoutSnapshot in the platform options.");if("windows"in e||"windows"in e.layoutSnapshot)throw new Error("It appears you tried to call connect() with a snapshot object from an OpenFin desktop environment. Note that connect() expects to be called with a platform property with this structure: { platform: { layoutSnapshot } }. To get a layoutSnapshot of the expected structure, use fin.Platform.Layout.getCurrentLayoutManagerSync().getLayoutSnapshot() in v34+ in your desktop environment.");const{layouts:t}=e.layoutSnapshot;Object.entries(t).map((([e,t])=>{if("object"!=typeof t||null===t)throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must be an object.`);if(!("content"in t))throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must contain a 'content' property.`)}))}async getInteropInfo(e){return{...{contextGroups:void 0,logging:{beforeAction:{enabled:!1},afterAction:{enabled:!1}}},fdc3Version:void 0,fdc3Info:{providerVersion:"0.39.21",provider:"OpenFin Web"}}}layoutAllowedInContext(e){return!0}async initLayoutManager(e,t,n){if(Lo(this,Vo,"f"))throw new Error("Layout already initialized.");if(!Uo(this.connectConfig))throw new Error("Platform options are missing from connection config.");const{WebLayoutEntryPoint:i}=await Lo(this,zo,"f").getValue();return To(this,Vo,new i(this.connectConfig),"f"),await Lo(this,Vo,"f").initLayoutManager(e,t,n)}async applyLayoutSnapshot(e,t,n){Lo(this,Vo,"f")?.applyLayoutSnapshot(e,t,n)}async createLayout(e,t){return Lo(this,Vo,"f")?.createLayout(e,t)}async destroyLayout(e,t){return Lo(this,Vo,"f")?.destroyLayout(e,t)}async getViewWindowIdentity(e,t){return Promise.resolve({uuid:t.uuid,name:t.uuid})}}Vo=new WeakMap,zo=new WeakMap;const qo=()=>{const e=((e,t)=>{const n=new RegExp(`^${t}<(?.*)>$`).exec(e)?.groups?.meta;if(n)try{return JSON.parse(atob(n))}catch(e){throw new Error(`Failed to decode JSON from ${n}.`)}})(window.name,"of-frame");if(e)try{const{name:t,uuid:n,brokerUrl:i,providerId:r,contextGroup:o}=e;return Fo(i,"brokerUrl"),Fo(n,"uuid"),Fo(t,"name"),{identity:{name:t,uuid:n},brokerUrl:i,interopConfig:{providerId:r,currentContextGroup:o}}}catch(e){throw new Error(`Unexpected error occurred when inferring platform information: ${e.stack}`)}},Jo=()=>{const e=r.v4();return{uuid:e,name:e}},Yo=async e=>{if("enabled"===e.connectionInheritance){const t=await(async e=>{const t=qo();if(t){const{validateOptions:n=(()=>!0)}=e,{identity:i,...r}=t;if(!await n(r))throw new Error("Parent options were rejected by validateOptions.");return t}})(e);if(t)return t}if(!e.options){const t="enabled"===e.connectionInheritance?"Broker URL was not specified nor provided by a platform container.":"Connection inheritance is disabled but no options were provided.";throw new Error(t)}return{...e.options,identity:Jo()}};exports.__classPrivateFieldGet=Lo,exports.__classPrivateFieldSet=To,exports.apiExposer=Gn,exports.commonjsGlobal=s,exports.connect=async t=>{try{Ro.log("Establishing connection",t);const{brokerUrl:n,identity:i,timeout:r,interopConfig:s}=await Yo(t),{workerPort:a,iframeBrokerPort:c}=await(async(e,t,n)=>{const{origin:i}=new URL(e),r=document.createElement("IFRAME");let s;r.style.display="none";try{return await new Promise(((a,c)=>{const d=e=>{if(e.source===r.contentWindow&&e.data?.topic===`ack-${jo}`){if(e.origin!==i)c(new Error(`Broker redirected to unexpected origin ${e.origin}, expected ${i}.`));else if(e.data.success){const[t,n]=e.ports;a({iframeBrokerPort:t,workerPort:n})}else c(new m(e.data));window.removeEventListener("message",d),clearTimeout(s)}};window.addEventListener("message",d),ko.log(`Connecting to broker ${e}`),r.setAttribute("src",e),r.setAttribute("name",o(t,"of-broker")),document.body.appendChild(r),ko.log("Iframe loaded, awaiting init message from iframe"),n&&(s=setTimeout((()=>{window.removeEventListener("message",d),document.body.removeChild(r),c(new Error("Worker did not initialize in time"))}),n))}))}catch(e){throw new Error(`Failed to initialise Fin Web Client. ${e.message}`,{cause:e})}})(n,i,r);Ro.log("Successfully established connection to shared worker");const d={entityType:"external connection",...i};a.start(),c.start();const h=((t,n,i)=>{const r=$o(n),o=new Ko(t),s=new Io(r,o,i);return s.connectSync(),window.Buffer=e.Buffer,new Wr(s)})(t,a,d);return s?.providerId&&(h.me.interop=h.Interop.connectSync(s.providerId),s?.currentContextGroup&&h.me.interop.joinContextGroup(s.currentContextGroup).catch((e=>{console.warn(`Error joining specified context group: ${s?.currentContextGroup}, continuing`,e)}))),{...h,me:{...h.me,identity:{uuid:h.me.uuid,name:h.me.name}}}}catch(e){throw new Error(`An error occured during web-interop connection: ${e.message}`)}},exports.decorators=Nn,exports.encodeOptions=o,exports.layout_constants=ai,exports.lazy=G; +var e=__webpack_require__(/*! buffer/ */ "../../node_modules/buffer/index.js"),t=__webpack_require__(/*! events */ "../../node_modules/events/events.js"),n=__webpack_require__(/*! lodash/cloneDeep */ "../../node_modules/lodash/cloneDeep.js"),i=__webpack_require__(/*! lodash/isEqual */ "../../node_modules/lodash/isEqual.js"),r=__webpack_require__(/*! uuid */ "../../node_modules/uuid/dist/esm-browser/index.js");const o=(e,t)=>`${t}<${btoa(JSON.stringify(e))}>`;var s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof __webpack_require__.g?__webpack_require__.g:"undefined"!=typeof self?self:{},a={},c={},d={},h={};async function l(e){const t=[];for(const n of e){const e=await n();t.push(e)}return t}Object.defineProperty(h,"__esModule",{value:!0}),h.promiseMapSerial=h.serial=h.promiseMap=h.promisify=void 0,h.promisify=function(e){return(...t)=>new Promise(((n,i)=>{e(...t,((e,t)=>e?i(e):n(t)))}))},h.promiseMap=async function(e,t){return Promise.all(e.map(t))},h.serial=l,h.promiseMapSerial=async function(e,t){return l(e.map(((e,n,i)=>()=>t(e,n,i))))};var u,p=s&&s.__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},w=s&&s.__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)};Object.defineProperty(d,"__esModule",{value:!0}),d.Reply=d.EmitterBase=d.Base=void 0;const y=h;class f{constructor(e){this.isNodeEnvironment=()=>"node"===this.wire.environment.type,this.isOpenFinEnvironment=()=>"openfin"===this.wire.environment.type,this.isBrowserEnvironment=()=>"other"===this.wire.environment.type,this.wire=e}get fin(){return this.wire.getFin()}get me(){return this.wire.me}}d.Base=f;d.EmitterBase=class extends f{constructor(e,t,...n){super(e),this.topic=t,u.set(this,void 0),this.eventNames=()=>this.hasEmitter()?this.getOrCreateEmitter().eventNames():[],this.emit=(e,t,...n)=>!!this.hasEmitter()&&this.getOrCreateEmitter().emit(e,t,...n),this.hasEmitter=()=>this.wire.eventAggregator.has(w(this,u,"f")),this.getOrCreateEmitter=()=>this.wire.eventAggregator.getOrCreate(w(this,u,"f")),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[],this.listenerCount=e=>this.hasEmitter()?this.getOrCreateEmitter().listenerCount(e):0,this.registerEventListener=async(e,t={},n,i)=>{const r={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e},o=this.getOrCreateEmitter();n(o);try{await this.wire.sendAction("subscribe-to-desktop-event",r)}catch(e){throw i(o),this.deleteEmitterIfNothingRegistered(o),e}},this.deregisterEventListener=async(e,t={})=>{if(this.hasEmitter()){const n={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e};await this.wire.sendAction("unsubscribe-to-desktop-event",n).catch((()=>null));return this.getOrCreateEmitter()}return Promise.resolve()},p(this,u,[t,...n],"f"),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[]}async on(e,t,n){return await this.registerEventListener(e,n,(n=>{n.on(e,t)}),(n=>{n.removeListener(e,t)})),this}async addListener(e,t,n){return this.on(e,t,n)}async once(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.once(e,i),n.once(e,t)}),(n=>{n.removeListener(e,i),n.removeListener(e,t)})),this}async prependListener(e,t,n){return await this.registerEventListener(e,n,(n=>{n.prependListener(e,t)}),(n=>{n.removeListener(e,t)})),this}async prependOnceListener(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.prependOnceListener(e,t),n.once(e,i)}),(n=>{n.removeListener(e,t),n.removeListener(e,i)})),this}async removeListener(e,t,n){const i=await this.deregisterEventListener(e,n);return i&&(i.removeListener(e,t),this.deleteEmitterIfNothingRegistered(i)),this}async deregisterAllListeners(e){const t={...this.identity,type:e,topic:this.topic};if(this.hasEmitter()){const e=this.getOrCreateEmitter(),n=e.listenerCount(t.type),i=[];for(let e=0;enull)));return await Promise.all(i),e}}async removeAllListeners(e){const t=async e=>{const t=await this.deregisterAllListeners(e);t&&(t.removeAllListeners(e),this.deleteEmitterIfNothingRegistered(t))};if(e)await t(e);else if(this.hasEmitter()){const e=this.getOrCreateEmitter().eventNames();await(0,y.promiseMap)(e,t)}return this}deleteEmitterIfNothingRegistered(e){0===e.eventNames().length&&this.wire.eventAggregator.delete(w(this,u,"f"))}},u=new WeakMap;d.Reply=class{};var g={};Object.defineProperty(g,"__esModule",{value:!0});var m=g.RuntimeError=g.NotSupportedError=g.NotImplementedError=g.NoAckError=g.DuplicateCorrelationError=g.UnexpectedActionError=g.DisconnectedError=void 0;class v extends Error{constructor(e){super(`Expected websocket state OPEN but found ${e}`),this.readyState=e}}g.DisconnectedError=v;class C extends Error{}g.UnexpectedActionError=C;class b extends Error{}g.DuplicateCorrelationError=b;class I extends Error{}g.NoAckError=I;class E extends Error{}g.NotImplementedError=E;class x extends Error{}g.NotSupportedError=x;class A extends Error{constructor(e){const{message:t,name:n,stack:i,...r}=e;super(t),this.name=n||"Error",this.stack=i??this.toString(),Object.keys(r).forEach((e=>{this[e]=r[e]}))}}class P extends Error{static getCallSite(e=0){const t=Error.stackTraceLimit,n=e+1;Error.stackTraceLimit=t+n;const i=Error.prepareStackTrace;Error.prepareStackTrace=(e,t)=>t;const r=(new Error).stack?.slice(n)??[];return Error.prepareStackTrace=i,Error.stackTraceLimit=t,r}static prepareStackTrace(e,t){if("function"==typeof Error.prepareStackTrace)return Error.prepareStackTrace(e,t);let n="";n+=e.name||"Error",n+=`: ${e.message||""}`;for(const e of t)n+=`\n at ${e.toString()}`;return n}constructor(e,t){const{reason:n,error:i}=e;super(n),this.name="RuntimeError",i?.stack&&(this.cause=new A(i)),t&&(this.stack=P.prepareStackTrace(this,t))}}m=g.RuntimeError=P;var M={},_={},O={};Object.defineProperty(O,"__esModule",{value:!0}),O.validateIdentity=void 0,O.validateIdentity=function(e){let t;return"object"==typeof e&&"string"==typeof e.uuid||(t="Not a valid identity object"),t};var S={},R={},F={},j={},k={},L={},T={};Object.defineProperty(T,"__esModule",{value:!0}),T.handleDeprecatedWarnings=void 0;var $;T.handleDeprecatedWarnings=e=>{(e.contentNavigation?.whitelist||e.contentNavigation?.blacklist||e.contentRedirect?.whitelist||e.contentRedirect?.blacklist)&&console.warn("The properties 'whitelist' and 'blacklist' have been marked as deprecated and will be removed in a future version. Please use 'allowlist' and 'denylist'.")};var B={},G={};Object.defineProperty(G,"__esModule",{value:!0}),G.AsyncRetryableLazy=W=G.Lazy=void 0;var W=G.Lazy=class{constructor(e){this.producerFn=e}getValue(){return this.value||(this.value=this.producerFn()),this.value}};G.AsyncRetryableLazy=class{constructor(e){this.producerFn=e}async getValue(){return this.promise||(this.promise=this.producerFn().catch((e=>{throw delete this.promise,e}))),this.promise}};var H={};Object.defineProperty(H,"__esModule",{value:!0}),H.WebContents=void 0;const N=d;class D extends N.EmitterBase{constructor(e,t,n){super(e,n,t.uuid,t.name),this.identity=t,this.entityType=n}capturePage(e){return this.wire.sendAction("capture-page",{options:e,...this.identity}).then((({payload:e})=>e.data))}executeJavaScript(e){return this.wire.sendAction("execute-javascript-in-window",{...this.identity,code:e}).then((({payload:e})=>e.data))}getZoomLevel(){return this.wire.sendAction("get-zoom-level",this.identity).then((({payload:e})=>e.data))}setZoomLevel(e){return this.wire.sendAction("set-zoom-level",{...this.identity,level:e}).then((()=>{}))}navigate(e){return this.wire.sendAction("navigate-window",{...this.identity,url:e}).then((()=>{}))}navigateBack(){return this.wire.sendAction("navigate-window-back",{...this.identity}).then((()=>{}))}async navigateForward(){await this.wire.sendAction("navigate-window-forward",{...this.identity})}stopNavigation(){return this.wire.sendAction("stop-window-navigation",{...this.identity}).then((()=>{}))}reload(e=!1){return this.wire.sendAction("reload-window",{ignoreCache:e,...this.identity}).then((()=>{}))}print(e={}){return this.wire.sendAction("print",{...this.identity,options:e}).then((()=>{}))}findInPage(e,t){return this.wire.sendAction("find-in-page",{...this.identity,searchTerm:e,options:t}).then((({payload:e})=>e.data))}stopFindInPage(e){return this.wire.sendAction("stop-find-in-page",{...this.identity,action:e}).then((()=>{}))}getPrinters(){return this.wire.sendAction("get-printers",{...this.identity}).then((({payload:e})=>e.data))}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){await this.wire.sendAction("focus-window",{emitSynthFocused:e,...this.identity})}async showDeveloperTools(){await this.wire.sendAction("show-developer-tools",this.identity)}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction("get-process-info",this.identity);return e}async getSharedWorkers(){return this.wire.sendAction("get-shared-workers",this.identity).then((({payload:e})=>e.data))}async inspectSharedWorker(){await this.wire.sendAction("inspect-shared-worker",{...this.identity})}async inspectSharedWorkerById(e){await this.wire.sendAction("inspect-shared-worker-by-id",{...this.identity,workerId:e})}async inspectServiceWorker(){await this.wire.sendAction("inspect-service-worker",{...this.identity})}async showPopupWindow(e){if(this.wire.sendAction(`${this.entityType}-show-popup-window`,this.identity).catch((()=>{})),e?.onPopupReady){const t=async({popupName:t})=>{try{const n=this.fin.Window.wrapSync({uuid:this.fin.me.uuid,name:t});await e.onPopupReady(n)}catch(e){throw new Error(`Something went wrong during onPopupReady execution: ${e}`)}};await this.once("popup-ready",t)}const{payload:t}=await this.wire.sendAction("try-create-popup-window",{options:{...e,hasResultCallback:!!e?.onPopupResult,hasReadyCallback:!!e?.onPopupReady},...this.identity}),{data:{willOpen:n,options:i}}=t;n&&await this.fin.Window.create(i.initialOptions);if(e?.onPopupResult){const t=async t=>{await e.onPopupResult((e=>{const{name:t,uuid:n,result:i,data:r}=e,o={identity:{name:t,uuid:n},result:i};return r&&(o.data=r),o})(t))},n=async()=>{await this.removeListener("popup-result",t)};await this.on("popup-result",t),await this.once("popup-teardown",n)}const{payload:r}=await this.wire.sendAction("show-popup-window",{options:i,...this.identity});return r.data}}var U,V,z,K,q;function J(){return V||(V=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(function(){if($)return L;$=1,Object.defineProperty(L,"__esModule",{value:!0}),L.ViewModule=void 0;const e=d,t=O,n=J(),i=T;class r extends e.Base{async create(e){const{uuid:t}=this.wire.me;if(!e.name||"string"!=typeof e.name)throw new Error("Please provide a name property as a string in order to create a View.");return(0,i.handleDeprecatedWarnings)(e),this.wire.environment.childViews?await this.wire.environment.createChildContent({entityType:"view",options:{...e,uuid:t}}):await this.wire.sendAction("create-view",{...e,uuid:t}),this.wrapSync({uuid:t,name:e.name})}async wrap(e){this.wire.sendAction("view-wrap").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}wrapSync(e){this.wire.sendAction("view-wrap-sync").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}getCurrent(){if(this.wire.sendAction("view-get-current").catch((e=>{})),!this.wire.me.isView)throw new Error("You are not in a View context");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction("view-get-current-sync").catch((e=>{})),!this.wire.me.isView)throw new Error("You are not in a View context");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return L.ViewModule=r,L}(),e),n(function(){if(U)return B;var e;U=1,Object.defineProperty(B,"__esModule",{value:!0}),B.View=void 0;const t=g,n=G,i=H,r=ie();class o extends i.WebContents{constructor(i,o){super(i,o,"view"),this.identity=o,e.set(this,new n.Lazy((()=>this.fin.Platform.wrapSync(this.identity).getClient()))),this.attach=async e=>{await this.wire.sendAction("attach-view",{target:e,...this.identity})},this.destroy=async()=>{await this.wire.sendAction("destroy-view",{...this.identity})},this.show=async()=>{await this.wire.sendAction("show-view",{...this.identity})},this.showAt=async(e,t={})=>{await this.wire.sendAction("show-view-at",{bounds:e,...this.identity,options:t})},this.bringToFront=async()=>{await this.wire.sendAction("bring-view-to-front",{...this.identity})},this.hide=async()=>{await this.wire.sendAction("hide-view",{...this.identity})},this.setBounds=async e=>{await this.wire.sendAction("set-view-bounds",{bounds:e,...this.identity})},this.getBounds=async()=>(await this.wire.sendAction("get-view-bounds",{...this.identity})).payload.data,this.getInfo=async()=>(await this.wire.sendAction("get-view-info",{...this.identity})).payload.data,this.getParentLayout=async()=>(this.wire.sendAction("view-get-parent-layout",{...this.identity}).catch((()=>{})),this.fin.Platform.Layout.getLayoutByViewIdentity(this.identity)),this.getOptions=async()=>this.wire.sendAction("get-view-options",{...this.identity}).then((({payload:e})=>e.data)),this.updateOptions=async e=>this.wire.sendAction("update-view-options",{options:e,...this.identity}).then((()=>{})),this.getCurrentWindow=async()=>{const{payload:{data:e}}=await this.wire.sendAction("get-view-window",{...this.identity});return new r._Window(this.wire,e)},this.getCurrentStack=async()=>{this.wire.sendAction("view-get-current-stack").catch((()=>{}));try{return(await this.getParentLayout()).getStackByViewIdentity(this.identity)}catch(e){throw new t.RuntimeError({reason:"This view does not belong to a stack.",error:e})}},this.triggerBeforeUnload=async()=>(await this.wire.sendAction("trigger-before-unload",{...this.identity})).payload.data,this.bindToElement=async e=>{if(!e)throw new Error("Element not found.");return this.wire.environment.observeBounds(e,(async e=>this.setBounds(e)))}}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){const t=await this.getCurrentWindow();await t.focusedWebViewWasChanged(),await super.focus({emitSynthFocused:e})}}return B.View=o,e=new WeakMap,B}(),e)}(k)),k}function Y(){if(z)return j;z=1,Object.defineProperty(j,"__esModule",{value:!0}),j.Application=void 0;const e=d,t=ie(),n=J();class i extends e.EmitterBase{constructor(e,n){super(e,"application",n.uuid),this.identity=n,this.window=new t._Window(this.wire,{uuid:this.identity.uuid,name:this.identity.uuid})}windowListFromIdentityList(e){const n=[];return e.forEach((e=>{n.push(new t._Window(this.wire,{uuid:e.uuid,name:e.name}))})),n}isRunning(){return this.wire.sendAction("is-application-running",this.identity).then((({payload:e})=>e.data))}async quit(e=!1){try{await this._close(e),await this.wire.sendAction("destroy-application",{force:e,...this.identity})}catch(e){if(!["Remote connection has closed","Could not locate the requested application"].some((t=>e.message.includes(t))))throw e}}async _close(e=!1){try{await this.wire.sendAction("close-application",{force:e,...this.identity})}catch(e){if(!e.message.includes("Remote connection has closed"))throw e}}close(e=!1){return console.warn("Deprecation Warning: Application.close is deprecated Please use Application.quit"),this.wire.sendAction("application-close",this.identity).catch((e=>{})),this._close(e)}getChildWindows(){return this.wire.sendAction("get-child-windows",this.identity).then((({payload:e})=>{const t=[];return e.data.forEach((e=>{t.push({uuid:this.identity.uuid,name:e})})),this.windowListFromIdentityList(t)}))}getManifest(){return this.wire.sendAction("get-application-manifest",this.identity).then((({payload:e})=>e.data))}getParentUuid(){return this.wire.sendAction("get-parent-application",this.identity).then((({payload:e})=>e.data))}getShortcuts(){return this.wire.sendAction("get-shortcuts",this.identity).then((({payload:e})=>e.data))}async getViews(){const{payload:e}=await this.wire.sendAction("application-get-views",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}getZoomLevel(){return this.wire.sendAction("get-application-zoom-level",this.identity).then((({payload:e})=>e.data))}getWindow(){return this.wire.sendAction("application-get-window",this.identity).catch((e=>{})),Promise.resolve(this.window)}registerUser(e,t){return this.wire.sendAction("register-user",{userName:e,appName:t,...this.identity}).then((()=>{}))}removeTrayIcon(){return this.wire.sendAction("remove-tray-icon",this.identity).then((()=>{}))}restart(){return this.wire.sendAction("restart-application",this.identity).then((()=>{}))}run(){return console.warn("Deprecation Warning: Application.run is deprecated Please use fin.Application.start"),this.wire.sendAction("application-run",this.identity).catch((e=>{})),this._run()}_run(e={}){return this.wire.sendAction("run-application",{manifestUrl:this._manifestUrl,opts:e,...this.identity}).then((()=>{}))}scheduleRestart(){return this.wire.sendAction("relaunch-on-close",this.identity).then((()=>{}))}async sendApplicationLog(){const{payload:e}=await this.wire.sendAction("send-application-log",this.identity);return e.data}async setJumpList(e){await this.wire.sendAction("set-jump-list",{config:e,...this.identity})}setTrayIcon(e){return this.wire.sendAction("set-tray-icon",{enabledIcon:e,...this.identity}).then((()=>{}))}setShortcuts(e){return this.wire.sendAction("set-shortcuts",{data:e,...this.identity}).then((()=>{}))}async setShortcutQueryParams(e){await this.wire.sendAction("set-shortcut-query-args",{data:e,...this.identity})}setZoomLevel(e){return this.wire.sendAction("set-application-zoom-level",{level:e,...this.identity}).then((()=>{}))}async setAppLogUsername(e){await this.wire.sendAction("set-app-log-username",{data:e,...this.identity})}getTrayIconInfo(){return this.wire.sendAction("get-tray-icon-info",this.identity).then((({payload:e})=>e.data))}hasTrayIcon(){return this.wire.sendAction("has-tray-icon",this.identity).then((({payload:e})=>e.data))}terminate(){return this.wire.sendAction("terminate-application",this.identity).then((()=>{}))}wait(){return this.wire.sendAction("wait-for-hung-application",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction("get-info",this.identity).then((({payload:e})=>e.data))}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction("application-get-process-info",this.identity);return e}async setFileDownloadLocation(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t};await this.wire.sendAction("set-file-download-location",{...n,downloadLocation:e})}async getFileDownloadLocation(){const{payload:{data:e}}=await this.wire.sendAction("get-file-download-location",this.identity);return e}async showTrayIconPopupMenu(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t},{payload:i}=await this.wire.sendAction("show-tray-icon-popup-menu",{...n,options:e});return i.data}async closeTrayIconPopupMenu(){const{name:e}=this.wire.me,t={uuid:this.identity.uuid,name:e};await this.wire.sendAction("close-tray-icon-popup-menu",{...t})}}return j.Application=i,j}function Z(){return q||(q=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(function(){if(K)return F;K=1,Object.defineProperty(F,"__esModule",{value:!0}),F.ApplicationModule=void 0;const e=d,t=O,n=Y();class i extends e.Base{async wrap(e){this.wire.sendAction("wrap-application").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}wrapSync(e){this.wire.sendAction("wrap-application-sync").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}async _create(e){return void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&void 0===e.isPlatformController&&(e.autoShow=!0),await this.wire.sendAction("create-application",e),this.wrap({uuid:e.uuid})}create(e){return console.warn("Deprecation Warning: fin.Application.create is deprecated. Please use fin.Application.start"),this.wire.sendAction("application-create").catch((e=>{})),this._create(e)}async start(e){this.wire.sendAction("start-application").catch((e=>{}));const t=await this._create(e);return await this.wire.sendAction("run-application",{uuid:e.uuid}),t}async startManyManifests(e,t){return this.wire.sendAction("run-applications",{applications:e,opts:t}).then((()=>{}))}getCurrent(){return this.wire.sendAction("get-current-application").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction("get-current-application-sync").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}async startFromManifest(e,t){this.wire.sendAction("application-start-from-manifest").catch((e=>{}));const n=await this._createFromManifest(e);return await n._run(t),n}createFromManifest(e){return console.warn("Deprecation Warning: fin.Application.createFromManifest is deprecated. Please use fin.Application.startFromManifest"),this.wire.sendAction("application-create-from-manifest").catch((e=>{})),this._createFromManifest(e)}_createFromManifest(e){return this.wire.sendAction("get-application-manifest",{manifestUrl:e}).then((({payload:e})=>{const t=e.data.platform?e.data.platform.uuid:e.data.startup_app.uuid;return this.wrap({uuid:t})})).then((t=>(t._manifestUrl=e,t)))}}return F.ApplicationModule=i,F}(),e),n(Y(),e)}(R)),R}H.WebContents=D;var Q={};Object.defineProperty(Q,"__esModule",{value:!0}),Q.promisifySubscription=void 0;var X,ee,te;function ne(){if(X)return S;X=1,Object.defineProperty(S,"__esModule",{value:!0}),S._Window=void 0;const e=Z(),t=H,n=J(),i=T,r=Q;class o extends t.WebContents{constructor(e,t){super(e,t,"window")}async createWindow(e){this.wire.sendAction("window-create-window",this.identity).catch((e=>{}));const t=await(0,r.promisifySubscription)(this,"fire-constructor-callback");void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&(e.autoShow=!0),(0,i.handleDeprecatedWarnings)(e);const n=this.wire.environment.createChildContent({entityType:"window",options:e}),[o]=await Promise.all([t.getValue(),n]);let s;const{success:a}=o,c=o.data,{message:d}=c;s=a?{httpResponseCode:c.httpResponseCode,apiInjected:c.apiInjected}:{message:c.message,networkErrorCode:c.networkErrorCode,stack:c.stack};const h={message:d,cbPayload:s,success:a};try{this.getWebWindow().fin.__internal_.openerSuccessCBCalled()}catch(e){}return h.success?this:Promise.reject(h)}getAllFrames(){return this.wire.sendAction("get-all-frames",this.identity).then((({payload:e})=>e.data))}getBounds(){return this.wire.sendAction("get-window-bounds",this.identity).then((({payload:e})=>e.data))}center(){return this.wire.sendAction("center-window",this.identity).then((()=>{}))}blur(){return this.wire.sendAction("blur-window",this.identity).then((()=>{}))}bringToFront(){return this.wire.sendAction("bring-window-to-front",this.identity).then((()=>{}))}animate(e,t){return this.wire.sendAction("animate-window",{transitions:e,options:t,...this.identity}).then((()=>{}))}hide(){return this.wire.sendAction("hide-window",this.identity).then((()=>{}))}close(e=!1){return this.wire.sendAction("close-window",{force:e,...this.identity}).then((()=>{Object.setPrototypeOf(this,null)}))}focusedWebViewWasChanged(){return this.wire.sendAction("focused-webview-changed",this.identity).then((()=>{}))}getNativeId(){return this.wire.sendAction("get-window-native-id",this.identity).then((({payload:e})=>e.data))}async getCurrentViews(){const{payload:e}=await this.wire.sendAction("window-get-views",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}disableFrame(){return console.warn("Function is deprecated; use disableUserMovement instead."),this.wire.sendAction("disable-window-frame",this.identity).then((()=>{}))}disableUserMovement(){return this.wire.sendAction("disable-window-frame",this.identity).then((()=>{}))}enableFrame(){return console.warn("Function is deprecated; use enableUserMovement instead."),this.wire.sendAction("enable-window-frame",this.identity).then((()=>{}))}enableUserMovement(){return this.wire.sendAction("enable-window-frame",this.identity).then((()=>{}))}flash(){return this.wire.sendAction("flash-window",this.identity).then((()=>{}))}stopFlashing(){return this.wire.sendAction("stop-flash-window",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction("get-window-info",this.identity).then((({payload:e})=>e.data))}async getLayout(e){this.wire.sendAction("window-get-layout",this.identity).catch((e=>{}));const t=await this.getOptions();if(!t.layout&&!t.layoutSnapshot)throw new Error("Window does not have a Layout");return this.fin.Platform.Layout.wrap(e??this.identity)}getOptions(){return this.wire.sendAction("get-window-options",this.identity).then((({payload:e})=>e.data))}getParentApplication(){return this.wire.sendAction("window-get-parent-application",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity))}getParentWindow(){return this.wire.sendAction("window-get-parent-window",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity)).then((e=>e.getWindow()))}async getSnapshot(e){const t={area:e,...this.identity};console.warn("Window.getSnapshot has been deprecated, please use Window.capturePage");return(await this.wire.sendAction("get-window-snapshot",t)).payload.data}getState(){return this.wire.sendAction("get-window-state",this.identity).then((({payload:e})=>e.data))}getWebWindow(){return this.wire.sendAction("window-get-web-window",this.identity).catch((e=>{})),this.wire.environment.getWebWindow(this.identity)}isMainWindow(){return this.wire.sendAction("window-is-main-window",this.identity).catch((e=>{})),this.me.uuid===this.me.name}isShowing(){return this.wire.sendAction("is-window-showing",this.identity).then((({payload:e})=>e.data))}maximize(){return this.wire.sendAction("maximize-window",this.identity).then((()=>{}))}minimize(){return this.wire.sendAction("minimize-window",this.identity).then((()=>{}))}moveBy(e,t,n){return this.wire.sendAction("move-window-by",{deltaLeft:e,deltaTop:t,positioningOptions:n,...this.identity}).then((()=>{}))}moveTo(e,t,n){return this.wire.sendAction("move-window",{left:e,top:t,positioningOptions:n,...this.identity}).then((()=>{}))}resizeBy(e,t,n,i){return this.wire.sendAction("resize-window-by",{deltaWidth:Math.floor(e),deltaHeight:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}resizeTo(e,t,n,i){return this.wire.sendAction("resize-window",{width:Math.floor(e),height:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}restore(){return this.wire.sendAction("restore-window",this.identity).then((()=>{}))}setAsForeground(){return this.wire.sendAction("set-foreground-window",this.identity).then((()=>{}))}setBounds(e,t){return this.wire.sendAction("set-window-bounds",{...e,...this.identity,positioningOptions:t}).then((()=>{}))}show(e=!1){return this.wire.sendAction("show-window",{force:e,...this.identity}).then((()=>{}))}showAt(e,t,n=!1){return this.wire.sendAction("show-at-window",{force:n,left:Math.floor(e),top:Math.floor(t),...this.identity}).then((()=>{}))}updateOptions(e){return this.wire.sendAction("update-window-options",{options:e,...this.identity}).then((()=>{}))}authenticate(e,t){return this.wire.sendAction("window-authenticate",{userName:e,password:t,...this.identity}).then((()=>{}))}async showPopupMenu(e){const{payload:t}=await this.wire.sendAction("show-popup-menu",{options:e,...this.identity});return t.data}async closePopupMenu(){return this.wire.sendAction("close-popup-menu",{...this.identity}).then((()=>{}))}async dispatchPopupResult(e){this.wire.sendAction("window-dispatch-popup-result",this.identity).catch((e=>{})),await this.wire.sendAction("dispatch-popup-result",{data:e,...this.identity})}async print(e={content:"self"}){switch(e.content){case void 0:case"self":return super.print(e);case"screenshot":return this.wire.sendAction("print-screenshot",this.identity).then((()=>{}));case"views":return this.wire.sendAction("print-views",{...this.identity,options:e}).then((()=>{}));default:return}}}return S._Window=o,S}function ie(){return te||(te=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(function(){if(ee)return _;ee=1,Object.defineProperty(_,"__esModule",{value:!0}),_._WindowModule=void 0;const e=d,t=O,n=ne();class i extends e.Base{async wrap(e){this.wire.sendAction("window-wrap").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}wrapSync(e){this.wire.sendAction("window-wrap-sync").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}create(e){return this.wire.sendAction("create-window").catch((e=>{})),new n._Window(this.wire,{uuid:this.me.uuid,name:e.name}).createWindow(e)}getCurrent(){if(this.wire.sendAction("get-current-window").catch((e=>{})),!this.wire.me.isWindow)throw new Error("You are not in a Window context");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction("get-current-window-sync").catch((e=>{})),!this.wire.me.isWindow)throw new Error("You are not in a Window context");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return _._WindowModule=i,_}(),e),n(ne(),e)}(M)),M}Q.promisifySubscription=async(e,t,n=(()=>!0),i)=>{let r,o,s;const a=new Promise(((e,t)=>{r=e,o=t})),c=e=>{n(e)&&(clearTimeout(s),r(e))};return await e.on(t,c),i&&(s=setTimeout((()=>o(new Error("event timed out"))),i)),a.finally((()=>{e.removeListener(t,c).catch((()=>null))})),{getValue:()=>a}},Object.defineProperty(c,"__esModule",{value:!0}),c.System=void 0;const re=d,oe=g,se=ie(),ae=t;class ce extends re.EmitterBase{constructor(e){super(e,"system")}sendExternalProcessRequest(e,t){return new Promise(((n,i)=>{const r="external-process-exited";let o,s,a,c;"function"==typeof t.listener&&(a=e=>{const n=e||{};s={topic:"exited",uuid:n.processUuid||"",exitCode:n.exitCode||0},o===e.processUuid&&(t.listener(s),c.removeListener(r,a))},this.wire.me.name||(this.wire.me.name=this.wire.me.uuid),c=new se._Window(this.wire,this.wire.me),c.on(r,a)),this.wire.sendAction(e,t).then((({payload:e})=>{o=e.data.uuid,n(e.data),s&&o===s.uuid&&(t.listener(s),c.removeListener(r,a))})).catch((e=>{c&&c.removeListener(r,a),i(e)}))}))}getVersion(){return this.wire.sendAction("get-version").then((({payload:e})=>e.data))}clearCache(e){return this.wire.sendAction("clear-cache",e).then((()=>{}))}deleteCacheOnExit(){return this.wire.sendAction("delete-cache-request").then((()=>{}))}exit(){return this.wire.sendAction("exit-desktop").then((()=>{}))}async fetchManifest(e){const{payload:{data:t}}=await this.wire.sendAction("fetch-manifest",{manifestUrl:e});return t}flushCookieStore(){return this.wire.sendAction("flush-cookie-store").then((()=>{}))}getAllWindows(){return this.wire.sendAction("get-all-windows").then((({payload:e})=>e.data))}getAllApplications(){return this.wire.sendAction("get-all-applications").then((({payload:e})=>e.data))}getCommandLineArguments(){return this.wire.sendAction("get-command-line-arguments").then((({payload:e})=>e.data))}async getCrashReporterState(){const{payload:{data:{diagnosticMode:e,isRunning:t}}}=await this.wire.sendAction("get-crash-reporter-state");return console.warn("diagnosticMode property is deprecated. It will be removed in a future version"),{diagnosticMode:e,diagnosticsMode:e,isRunning:t}}async startCrashReporter(e){const t=e,n={...t,diagnosticMode:t.diagnosticsMode||t.diagnosticMode},{payload:{data:{diagnosticMode:i,isRunning:r}}}=await this.wire.sendAction("start-crash-reporter",n);return{diagnosticMode:i,diagnosticsMode:i,isRunning:r}}getUniqueUserId(){return this.wire.sendAction("get-unique-user-id").then((({payload:e})=>e.data))}getEntityInfo(e,t){return this.wire.sendAction("get-entity-info",{uuid:e,name:t}).then((({payload:e})=>e.data))}getEnvironmentVariable(e){return this.wire.sendAction("get-environment-variable",{environmentVariables:e}).then((({payload:e})=>e.data))}getFocusedWindow(){return this.wire.sendAction("get-focused-window").then((({payload:e})=>e.data))}async isAppCertified(e){const{payload:{data:{certifiedInfo:t}}}=await this.wire.sendAction("is-app-certified",{manifestUrl:e});return t}getInstalledRuntimes(){return this.wire.sendAction("get-installed-runtimes").then((({payload:e})=>e.data.runtimes))}async getInstalledApps(){const{payload:{data:{installedApps:e}}}=await this.wire.sendAction("get-installed-apps");return e}getLog(e){return this.wire.sendAction("view-log",e).then((({payload:e})=>e.data))}getMachineId(){return this.wire.sendAction("get-machine-id").then((({payload:e})=>e.data))}getMinLogLevel(){return this.wire.sendAction("get-min-log-level").then((({payload:e})=>e.data))}getLogList(){return this.wire.sendAction("list-logs").then((({payload:e})=>e.data))}getMonitorInfo(){return this.wire.sendAction("get-monitor-info").then((({payload:e})=>e.data))}getMousePosition(){return this.wire.sendAction("get-mouse-position").then((({payload:e})=>e.data))}getProcessList(){return console.warn("System.getProcessList has been deprecated. Please consider using our new process APIs: Window.getProcessInfo, View.getProcessInfo, Application.getProcessInfo, System.getAllProcessInfo"),this.wire.sendAction("process-snapshot").then((({payload:e})=>e.data))}async getAllProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction("get-all-process-info",this.identity);return e}getProxySettings(){return this.wire.sendAction("get-proxy-settings").then((({payload:e})=>e.data))}getRuntimeInfo(){return this.wire.sendAction("get-runtime-info").then((({payload:e})=>e.data))}getRvmInfo(){return this.wire.sendAction("get-rvm-info").then((({payload:e})=>e.data))}getHostSpecs(){return this.wire.sendAction("get-host-specs").then((({payload:e})=>e.data))}getOSInfo(){return this.wire.sendAction("get-os-info").then((({payload:e})=>e.data))}launchExternalProcess(e){return this.sendExternalProcessRequest("launch-external-process",e)}monitorExternalProcess(e){return this.sendExternalProcessRequest("monitor-external-process",e)}log(e,t){return this.wire.sendAction("write-to-log",{level:e,message:t}).then((()=>{}))}openUrlWithBrowser(e){return this.wire.sendAction("open-url-with-browser",{url:e}).then((()=>{}))}async registerCustomProtocol(e){if("object"!=typeof e)throw new Error("Must provide an object with a `protocolName` property having a string value.");await this.wire.sendAction("register-custom-protocol",e)}async unregisterCustomProtocol(e){await this.wire.sendAction("unregister-custom-protocol",{protocolName:e})}async getCustomProtocolState(e){return this.wire.sendAction("get-custom-protocol-state",{protocolName:e}).then((({payload:e})=>e.data))}releaseExternalProcess(e){return this.wire.sendAction("release-external-process",{uuid:e}).then((()=>{}))}showDeveloperTools(e){return this.wire.sendAction("show-developer-tools",e).then((()=>{}))}terminateExternalProcess(e){return this.wire.sendAction("terminate-external-process",e).then((()=>{}))}updateProxySettings(e){return this.wire.sendAction("update-proxy",e).then((()=>{}))}async downloadAsset(e,t){const n=()=>{};let i=n,r=n;const o=new Promise(((e,t)=>{i=e,r=t}));if("openfin"!==this.wire.environment.type)throw new oe.NotSupportedError("downloadAsset only supported in an OpenFin Render process");const s=oe.RuntimeError.getCallSite(),a=this.wire.environment.getNextMessageId().toString(),c=`asset-download-progress-${a}`,d=`asset-download-error-${a}`,h=`asset-download-complete-${a}`,l=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},u=()=>{this.removeListener(c,l)};await Promise.all([this.on(c,l),this.once(d,(e=>{u();const{reason:t,err:n}=e;r(new oe.RuntimeError({reason:t,error:n},s))})),this.once(h,(()=>{u(),i()}))]);const p=Object.assign(e,{downloadId:a});return await this.wire.sendAction("download-asset",p).catch((e=>{throw u(),e})),o}downloadRuntime(e,t){const n=oe.RuntimeError.getCallSite();return new Promise(((i,r)=>{if("openfin"!==this.wire.environment.type)return void r(new oe.NotSupportedError("downloadRuntime only supported in an OpenFin Render process"));const o=this.wire.environment.getNextMessageId().toString(),s=`runtime-download-progress-${o}`,a=`runtime-download-error-${o}`,c=`runtime-download-complete-${o}`,d=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},h=()=>{this.removeListener(s,d)};this.on(s,d),this.once(a,(e=>{h();const{reason:t,err:i}=e;r(new oe.RuntimeError({reason:t,error:i},n))})),this.once(c,(()=>{h(),i()}));const l=Object.assign(e,{downloadId:o});this.wire.sendAction("download-runtime",l).catch((e=>{h(),r(e)}))}))}downloadPreloadScripts(e){return this.wire.sendAction("download-preload-scripts",{scripts:e}).then((({payload:e})=>e.data))}getAllExternalApplications(){return this.wire.sendAction("get-all-external-applications").then((({payload:e})=>e.data))}getAppAssetInfo(e){return this.wire.sendAction("get-app-asset-info",e).then((({payload:e})=>e.data))}getCookies(e){const t=this.wire.environment.getUrl(),n=Object.assign(e,{url:t});return this.wire.sendAction("get-cookies",n).then((({payload:e})=>e.data))}setMinLogLevel(e){return this.wire.sendAction("set-min-log-level",{level:e}).then((()=>{}))}resolveUuid(e){return this.wire.sendAction("resolve-uuid",{entityKey:e}).then((({payload:e})=>e.data))}executeOnRemote(e,t){return t.requestingIdentity=e,this.wire.ferryAction(t)}readRegistryValue(e,t,n){return this.wire.sendAction("read-registry-value",{rootKey:e,subkey:t,value:n}).then((({payload:e})=>e.data))}registerExternalConnection(e){return this.wire.sendAction("register-external-connection",{uuid:e}).then((({payload:e})=>e.data))}async getServiceConfiguration(e){if("string"!=typeof e.name)throw new Error("Must provide an object with a `name` property having a string value");const{name:t}=e;return this.wire.sendAction("get-service-configuration",{name:t}).then((({payload:e})=>e.data))}async getSystemAppConfig(e){if("string"!=typeof e)throw new Error("Must provide a string value for name of system app");return this.wire.sendAction("get-system-app-configuration",{name:e}).then((({payload:e})=>e.data))}async registerShutdownHandler(e){this.wire.sendAction("system-register-shutdown-handler").catch((e=>{}));const{uuid:t,name:n}=this.wire.me;this.on("system-shutdown",(i=>{e({proceed:()=>{this.wire.environment.raiseEvent("application/system-shutdown-handled",{uuid:t,name:n,topic:"application"})}})}))}runRvmHealthCheck(){return this.wire.sendAction("run-rvm-health-check").then((({payload:e})=>e.data))}async launchManifest(e,t={}){const{subscribe:n,...i}=t,r=i;if(n){const e=new ae.EventEmitter;n(e);const t="app-version-progress",i="runtime-status",o="app-version-complete",s="app-version-error",a=this.wire.environment.getNextMessageId().toString();r.appVersionId=a;const c=[o,t,i,s],d=e=>{const{appVersionId:t,topic:n,type:i,...r}=e;return{...r,type:c.find((e=>i.includes(e)))}},h=t=>{const n=d(t);e.emit(n.type,n)},l=()=>{this.removeListener(`${t}.${a}`,h),this.removeListener(`${i}.${a}`,h),this.removeListener(`${o}.${a}`,h),this.removeListener(`${s}.${a}`,h),this.removeListener(`${o}.${a}`,l),this.removeListener(`${s}.${a}`,l)};await Promise.all([this.on(`${t}.${a}`,h),this.on(`${i}.${a}`,h),this.once(`${o}.${a}`,h),this.once(`${s}.${a}`,h),this.once(`${o}.${a}`,l),this.once(`${s}.${a}`,l)])}return(await this.wire.sendAction("launch-manifest",{manifestUrl:e,opts:r})).payload.data.manifest}async queryPermissionForCurrentContext(e){const t={uuid:this.wire.me.uuid,name:this.wire.me.name};return(await this.wire.sendAction("query-permission-for-current-context",{apiName:e,identity:t})).payload.data}async enableNativeWindowIntegrationProvider(e){const{payload:t}=await this.wire.sendAction("enable-native-window-integration-provider",{permissions:e});return t.data}async registerUsage({data:e,type:t}){await this.wire.sendAction("register-usage",{data:e,type:t})}async getPrinters(){const{payload:e}=await this.wire.sendAction("system-get-printers");return e.data}async updateProcessLoggingOptions(e){await this.wire.sendAction("system-update-process-logging-options",{options:e})}async getDomainSettings(){const{payload:{data:e}}=await this.wire.sendAction("get-domain-settings",this.identity);return e}async setDomainSettings(e){await this.wire.sendAction("set-domain-settings",{domainSettings:e,...this.identity})}async refreshExtensions(){const{payload:e}=await this.wire.sendAction("refresh-extensions");return e.data}async getInstalledExtensions(){const{payload:e}=await this.wire.sendAction("get-installed-extensions");return e.data}}c.System=ce;var de={},he={};Object.defineProperty(he,"__esModule",{value:!0}),he.RefCounter=void 0;he.RefCounter=class{constructor(){this.topicRefMap=new Map}incRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t+1;n=i,this.topicRefMap.set(e,i)}else this.topicRefMap.set(e,1),n=1;return n}decRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t-1;this.topicRefMap.set(e,i),n=i}else n=-1;return n}actOnFirst(e,t,n){return 1===this.incRefCount(e)?t():n()}actOnLast(e,t,n){return 0===this.decRefCount(e)?t():n()}};var le={},ue={},pe={};Object.defineProperty(pe,"__esModule",{value:!0}),pe.ChannelBase=pe.ProtectedItems=void 0;const we=e=>async(t,n,i)=>{const r=await e(t,n,i);return void 0===r?n:r};pe.ProtectedItems=class{constructor(e,t){this.providerIdentity=e,this.close=t}};class ye{static defaultAction(e){throw new Error(`No action registered at target for ${e}`)}constructor(){this.subscriptions=new Map}async processAction(e,t,n){try{const i=this.subscriptions.has(e)?this.subscriptions.get(e):(t,n)=>(this.defaultAction??ye.defaultAction)(e,t,n),r=this.preAction?await this.preAction(e,t,n):t,o=await i(r,n);return this.postAction?await this.postAction(e,o,n):o}catch(t){if(this.errorMiddleware)return this.errorMiddleware(e,t,n);throw t}}beforeAction(e){if(this.preAction)throw new Error("Already registered beforeAction middleware");this.preAction=we(e)}onError(e){if(this.errorMiddleware)throw new Error("Already registered error middleware");this.errorMiddleware=e}afterAction(e){if(this.postAction)throw new Error("Already registered afterAction middleware");this.postAction=we(e)}remove(e){this.subscriptions.delete(e)}setDefaultAction(e){if(this.defaultAction)throw new Error("default action can only be set once");this.defaultAction=e}register(e,t){if(this.subscriptions.has(e))throw new Error(`Subscription already registered for action: ${e}. Unsubscribe before adding new subscription`);return this.subscriptions.set(e,t),!0}}pe.ChannelBase=ye;var fe,ge,me,ve=s&&s.__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)},Ce=s&&s.__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};Object.defineProperty(ue,"__esModule",{value:!0}),ue.ChannelClient=void 0;const be=pe,Ie=new Map;class Ee extends be.ChannelBase{static closeChannelByEndpointId(e){const t=Ie.get(e);t&&ve(t,me,"f").call(t)}static handleProviderDisconnect(e){for(const t of Ie.values())t.providerIdentity.channelId===e.channelId&&(t.disconnectListener(e),ve(t,me,"f").call(t))}constructor(e,t,n){super(),fe.set(this,void 0),ge.set(this,void 0),this.processAction=(e,t,n)=>super.processAction(e,t,n),me.set(this,(()=>{Ie.delete(this.endpointId),ve(this,ge,"f").close()})),Ce(this,fe,new be.ProtectedItems(e,t),"f"),this.disconnectListener=()=>{},this.endpointId=e.endpointId,Ce(this,ge,n,"f"),Ie.set(this.endpointId,this),n.receive(this.processAction)}get providerIdentity(){return ve(this,fe,"f").providerIdentity}async dispatch(e,t){if(ve(this,ge,"f").isEndpointConnected(this.providerIdentity.channelId))return ve(this,ge,"f").send(this.providerIdentity.channelId,e,t);throw new Error("The client you are trying to dispatch from is disconnected from the target provider.")}onDisconnection(e){this.disconnectListener=t=>{try{e(t)}catch(e){throw new Error(`Error while calling the onDisconnection callback: ${e.message}`)}finally{this.disconnectListener=()=>{}}}}async disconnect(){await this.sendDisconnectAction(),ve(this,me,"f").call(this)}async sendDisconnectAction(){const e=ve(this,fe,"f");await e.close()}static async wireClose(e,t,n){const{channelName:i,uuid:r,name:o}=t;await e.sendAction("disconnect-from-channel",{channelName:i,uuid:r,name:o,endpointId:n})}}ue.ChannelClient=Ee,fe=new WeakMap,ge=new WeakMap,me=new WeakMap;var xe={},Ae={};Object.defineProperty(Ae,"__esModule",{value:!0}),Ae.exhaustiveCheck=void 0,Ae.exhaustiveCheck=function(e,t){throw new Error(`Unsupported value: ${e}${t?`\n Supported values are: ${t.join("")}`:""}`)};var Pe,Me,_e,Oe={},Se=s&&s.__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},Re=s&&s.__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)};Object.defineProperty(Oe,"__esModule",{value:!0}),Oe.ClassicInfo=Oe.ClassicStrategy=void 0;Oe.ClassicStrategy=class{constructor(e,t,n,i){this.messageReceiver=t,this.endpointId=n,this.providerIdentity=i,Pe.set(this,void 0),Me.set(this,new Map),_e.set(this,new Map),this.send=async(e,t,n)=>{const i=Re(this,Me,"f").get(e);if(!i)throw new Error(`Could not locate routing info for endpoint ${e}`);const r={...i};r.isLocalEndpointId&&delete r.endpointId,delete r.isLocalEndpointId;const o=Re(this,Pe,"f").sendAction("send-channel-message",{...r,providerIdentity:this.providerIdentity,action:t,payload:n});Re(this,_e,"f").get(e)?.add(o);return(await o.catch((e=>{throw new Error(e.message)})).finally((()=>{Re(this,_e,"f").get(e)?.delete(o)}))).payload.data.result},this.close=async()=>{this.messageReceiver.removeEndpoint(this.providerIdentity.channelId,this.endpointId),[...Re(this,Me,"f").keys()].forEach((e=>this.closeEndpoint(e))),Se(this,Me,new Map,"f")},Se(this,Pe,e,"f")}onEndpointDisconnect(e,t){}receive(e){this.messageReceiver.addEndpoint(e,this.providerIdentity.channelId,this.endpointId)}async closeEndpoint(e){const t=Re(this,Me,"f").get(e);Re(this,Me,"f").delete(e);const n=Re(this,_e,"f").get(e);n?.forEach((n=>{const i=`Channel connection with identity uuid: ${t?.uuid} / name: ${t?.name} / endpointId: ${e} no longer connected.`;n.cancel(new Error(i))}))}isEndpointConnected(e){return Re(this,Me,"f").has(e)}addEndpoint(e,t){Re(this,Me,"f").set(e,t.endpointIdentity),Re(this,_e,"f").set(e,new Set)}isValidEndpointPayload(e){return"string"==typeof e?.endpointIdentity?.endpointId||"string"==typeof e?.endpointIdentity?.channelId}},Pe=new WeakMap,Me=new WeakMap,_e=new WeakMap,Oe.ClassicInfo={version:5,minimumVersion:0,type:"classic"};var Fe={},je={},ke={};Object.defineProperty(ke,"__esModule",{value:!0}),ke.errorToPOJO=void 0,ke.errorToPOJO=function(e){return{stack:e.stack,name:e.name,message:e.message,toString:()=>e.stack||e.toString()}};var Le,Te,$e=s&&s.__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)},Be=s&&s.__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};Object.defineProperty(je,"__esModule",{value:!0}),je.RTCEndpoint=void 0;const Ge=ke;je.RTCEndpoint=class{static isValidEndpointPayload(e){const t=e=>"object"==typeof e&&null!==e;return t(e)&&t(e.endpointIdentity)&&t(e.rtc)&&"string"==typeof e.endpointIdentity.endpointId}constructor({rtc:e,endpointIdentity:t}){this.responseMap=new Map,Le.set(this,null),Te.set(this,void 0),this.connectionStateChangeHandler=e=>{"connected"!==this.rtc.rtcClient.connectionState&&(this.rtc.rtcClient.removeEventListener("connectionstatechange",this.connectionStateChangeHandler),this.close(),$e(this,Te,"f")&&$e(this,Te,"f").call(this))},this.send=async(e,t)=>{const n=`message-${Math.random()}`,i=new Promise(((e,t)=>{this.responseMap.set(n,{resolve:e,reject:t})}));return this.rtc.channels.request.send(JSON.stringify({action:e,payload:t,messageId:n})),i},this.close=()=>{this.responseMap.forEach((e=>e.reject("Connection has closed."))),this.responseMap=new Map,this.rtc.channels.request.close(),this.rtc.channels.response.close(),this.rtc.rtcClient.close()},this.rtc=e,this.endpointIdentity=t,this.rtc.channels.response.addEventListener("message",(e=>{let{data:t}=e;e.data instanceof ArrayBuffer&&(t=(new TextDecoder).decode(e.data));const{messageId:n,payload:i,success:r,error:o}=JSON.parse(t),{resolve:s,reject:a}=this.responseMap.get(n)??{};s&&a?(this.responseMap.delete(n),r?s(i):a(o)):(console.log("Could not find id in responseMap."),console.log(e))})),this.rtc.channels.request.addEventListener("message",(async e=>{let{data:n}=e;e.data instanceof ArrayBuffer&&(n=(new TextDecoder).decode(e.data));const{messageId:i,action:r,payload:o}=JSON.parse(n);if($e(this,Le,"f"))try{const e=await $e(this,Le,"f").call(this,r,o,t);this.rtc.channels.response.send(JSON.stringify({messageId:i,payload:e,success:!0}))}catch(e){"open"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,error:(0,Ge.errorToPOJO)(e),success:!1}))}else"open"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,success:!1,error:"Connection not ready."}))})),this.rtc.rtcClient.addEventListener("connectionstatechange",this.connectionStateChangeHandler),Object.values(this.rtc.channels).forEach((e=>{e.onclose=e=>{[...this.responseMap.values()].forEach((e=>e.reject(new Error("RTCDataChannel closed unexpectedly, this is most commonly caused by message size. Note: RTC Channels have a message size limit of ~255kB.")))),this.close(),$e(this,Te,"f")&&$e(this,Te,"f").call(this)}}))}onDisconnect(e){if($e(this,Te,"f"))throw new Error("RTCEndpoint disconnectListener cannot be set twice.");Be(this,Te,e,"f")}receive(e){if($e(this,Le,"f"))throw new Error("You have already set a listener for this RTC Endpoint.");Be(this,Le,e,"f")}get connected(){return"connected"===this.rtc.rtcClient.connectionState}},Le=new WeakMap,Te=new WeakMap;var We,He,Ne,De={},Ue=s&&s.__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)},Ve=s&&s.__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};Object.defineProperty(De,"__esModule",{value:!0}),De.EndpointStrategy=void 0;De.EndpointStrategy=class{constructor(e,t,n){this.EndpointType=e,this.StrategyName=n,We.set(this,null),He.set(this,new Map),Ne.set(this,!0),this.send=async(e,t,n)=>this.getEndpointById(e).send(t,n),this.close=async()=>{Ue(this,Ne,"f")&&(Ue(this,He,"f").forEach((e=>e.close())),Ve(this,He,new Map,"f")),Ve(this,Ne,!1,"f")},this.isValidEndpointPayload=t}onEndpointDisconnect(e,t){this.getEndpointById(e).onDisconnect(t)}receive(e){if(Ue(this,We,"f"))throw new Error(`You have already set a listener for this ${this.StrategyName} Strategy`);Ve(this,We,e,"f"),Ue(this,He,"f").forEach((e=>e.receive(Ue(this,We,"f"))))}getEndpointById(e){const t=Ue(this,He,"f").get(e);if(!t)throw new Error(`Client with endpoint id ${e} is not connected`);return t}get connected(){return Ue(this,Ne,"f")}isEndpointConnected(e){return Ue(this,He,"f").has(e)}addEndpoint(e,t){if(!Ue(this,Ne,"f"))return void console.warn(`Adding endpoint to disconnected ${this.StrategyName} Strategy`);const n=new this.EndpointType(t);Ue(this,We,"f")&&n.receive(Ue(this,We,"f")),Ue(this,He,"f").set(e,n)}async closeEndpoint(e){Ue(this,He,"f").delete(e)}},We=new WeakMap,He=new WeakMap,Ne=new WeakMap,Object.defineProperty(Fe,"__esModule",{value:!0}),Fe.RTCInfo=Fe.RTCStrategy=void 0;const ze=je,Ke=De;class qe extends Ke.EndpointStrategy{constructor(){super(ze.RTCEndpoint,ze.RTCEndpoint.isValidEndpointPayload,"RTC")}}Fe.RTCStrategy=qe,Fe.RTCInfo={version:2,minimumVersion:0,type:"rtc"};var Je={};Object.defineProperty(Je,"__esModule",{value:!0}),Je.RTCICEManager=void 0;const Ye=d;class Ze extends Ye.EmitterBase{constructor(e){super(e,"channel"),this.ensureChannelOpened=e=>new Promise(((t,n)=>{if("open"===e.readyState)t();else if("connecting"===e.readyState){const n=()=>{e.removeEventListener("open",n),t()};e.addEventListener("open",n)}else n(new Error("This Channel has already closed"))}))}static createDataChannelPromise(e,t){let n;const i=new Promise((e=>{n=e})),r=i=>{const o=()=>{i.channel.removeEventListener("open",o),n(i.channel)};i.channel.label===e&&(i.channel.addEventListener("open",o),t.removeEventListener("datachannel",r))};return t.addEventListener("datachannel",r),i}async listenForProviderIce(e,t){await this.on(this.createProviderEventName(e),t,{timestamp:Date.now()})}async raiseProviderIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createProviderEventName(e)),t)}async listenForClientIce(e,t){await this.on(this.createClientEventName(e),t,{timestamp:Date.now()})}async raiseClientIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createClientEventName(e)),t)}cleanupIceListeners(e){this.removeAllListeners(this.createClientEventName(e)),this.removeAllListeners(this.createProviderEventName(e))}createClientEventName(e){return`ice-client-${e}`}createProviderEventName(e){return`ice-provider-${e}`}createRouteString(e){return`channel/${e}`}createRtcPeer(){return this.wire.environment.getRtcPeer()}async startClientOffer(){const e=Math.random().toString(),t=this.createRtcPeer();t.addEventListener("icecandidate",(async t=>{t.candidate&&await this.raiseClientIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForProviderIce(e,(async e=>{await t.addIceCandidate(e.candidate)}));const n={request:t.createDataChannel("request"),response:t.createDataChannel("response")},i=await t.createOffer();await t.setLocalDescription(i);const r=Promise.all([n.request,n.response].map(this.ensureChannelOpened)).then((()=>{}));return{rtcClient:t,channels:n,offer:i,rtcConnectionId:e,channelsOpened:r}}async finishClientOffer(e,t,n){return await e.setRemoteDescription(t),await n,!0}async createProviderAnswer(e,t){const n=this.createRtcPeer(),i=Ze.createDataChannelPromise("request",n),r=Ze.createDataChannelPromise("response",n);n.addEventListener("icecandidate",(async t=>{t.candidate&&await this.raiseProviderIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForClientIce(e,(async e=>{await n.addIceCandidate(e.candidate)})),await n.setRemoteDescription(t);const o=await n.createAnswer();await n.setLocalDescription(o);const s=Promise.all([i,r]).then((([t,n])=>(this.cleanupIceListeners(e),{request:t,response:n})));return{rtcClient:n,answer:o,channels:s}}}Je.RTCICEManager=Ze;var Qe={},Xe={};function et(e){return[...e.split(".").reverse().entries()].reduce(((e,[t,n])=>e+ +n*1e4**t),0)}function tt(e,t){return et(e)>=et(t)}function nt(e){return e.split("/")[0]}Object.defineProperty(Xe,"__esModule",{value:!0}),Xe.runtimeUuidMeetsMinimumRuntimeVersion=Xe.parseRuntimeUuid=Xe.meetsMinimumRuntimeVersion=void 0,Xe.meetsMinimumRuntimeVersion=tt,Xe.parseRuntimeUuid=nt,Xe.runtimeUuidMeetsMinimumRuntimeVersion=function(e,t){return tt(nt(e),t)};var it,rt,ot,st,at,ct=s&&s.__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)},dt=s&&s.__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};Object.defineProperty(Qe,"__esModule",{value:!0}),Qe.ChannelProvider=void 0;const ht=pe,lt=Xe;class ut extends ht.ChannelBase{get connections(){return[...ct(this,it,"f")]}static handleClientDisconnection(e,t){const n=e.connections.find((e=>e.endpointId===t.endpointId));if(n)ct(e,st,"f").call(e,n);else{e.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name)).forEach(ct(e,st,"f"))}e.disconnectListener(t)}static setProviderRemoval(e,t){ut.removalMap.set(e,t)}constructor(e,t,n){super(),it.set(this,void 0),rt.set(this,void 0),ot.set(this,void 0),st.set(this,(e=>{const t=this.connections.filter((t=>t.endpointId!==e.endpointId));ct(this,ot,"f").closeEndpoint(e.endpointId),dt(this,it,t,"f")})),this.processAction=async(e,t,n)=>(ut.clientIsMultiRuntime(n)&&!(0,lt.runtimeUuidMeetsMinimumRuntimeVersion)(n.runtimeUuid,"18.87.56.0")?this.handleMultiRuntimeLegacyClient(n):this.checkForClientConnection(n),super.processAction(e,t,n)),at.set(this,(()=>{ct(this,ot,"f").close();const e=ut.removalMap.get(this);e&&e()})),dt(this,rt,new ht.ProtectedItems(e,t),"f"),this.connectListener=()=>{},this.disconnectListener=()=>{},dt(this,it,[],"f"),dt(this,ot,n,"f"),n.receive(this.processAction)}dispatch(e,t,n){const i=e.endpointId??this.getEndpointIdForOpenFinId(e,t);return i&&ct(this,ot,"f").isEndpointConnected(i)?ct(this,ot,"f").send(i,t,n):Promise.reject(new Error(`Client connection with identity uuid: ${e.uuid} / name: ${e.name} / endpointId: ${i} no longer connected.`))}async processConnection(e,t){return ct(this,it,"f").push(e),this.connectListener(e,t)}publish(e,t){return this.connections.map((n=>ct(this,ot,"f").send(n.endpointId,e,t)))}onConnection(e){this.connectListener=e}onDisconnection(e){this.disconnectListener=e}async destroy(){const e=ct(this,rt,"f");e.providerIdentity,dt(this,it,[],"f"),await e.close(),ct(this,at,"f").call(this)}async getAllClientInfo(){return this.connections.map((e=>{const{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}=e;return{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}}))}checkForClientConnection(e){if(!this.isClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider.\n Client Identity: {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}isClientConnected(e){return ut.clientIdentityIncludesEndpointId(e)?this.connections.some((t=>t.endpointId===e.endpointId&&t.uuid===e.uuid&&t.name===e.name)):this.isLegacyClientConnected(e)}isLegacyClientConnected(e){return this.connections.some((t=>t.uuid===e.uuid&&t.name===e.name))}handleMultiRuntimeLegacyClient(e){if(!this.isLegacyClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider. Client Identity:\n {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}getEndpointIdForOpenFinId(e,t){const n=this.connections.filter((t=>t.name===e.name&&t.uuid===e.uuid));if(n.length>=2){const n=ct(this,rt,"f"),{uuid:i,name:r}=e,o=n?.providerIdentity.uuid,s=n?.providerIdentity.name;console.warn(`WARNING: Dispatch call may have unintended results. The "to" argument of your dispatch call is missing the\n "endpointId" parameter. The identity you are dispatching to ({uuid: ${i}, name: ${r}})\n has multiple channelClients for this channel. Your dispatched action: (${t}) from the provider:\n ({uuid: ${o}, name: ${s}}) will only be processed by the most recently-created client.`)}return n.pop()?.endpointId}static clientIdentityIncludesEndpointId(e){return void 0!==e.endpointId}static clientIsMultiRuntime(e){return void 0!==e.runtimeUuid}static async wireClose(e,t){await e.sendAction("destroy-channel",{channelName:t})}}Qe.ChannelProvider=ut,it=new WeakMap,rt=new WeakMap,ot=new WeakMap,st=new WeakMap,at=new WeakMap,ut.removalMap=new WeakMap;var pt={};Object.defineProperty(pt,"__esModule",{value:!0}),pt.MessageReceiver=void 0;const wt=ue,yt=d;class ft extends yt.Base{constructor(e){super(e),this.onmessage=e=>"process-channel-message"===e.action&&(this.processChannelMessage(e),!0),this.endpointMap=new Map,this.latestEndpointIdByChannelId=new Map,e.registerMessageHandler(this.onmessage.bind(this))}async processChannelMessage(e){const{senderIdentity:t,providerIdentity:n,action:i,ackToSender:r,payload:o,intendedTargetIdentity:s}=e.payload,a=s.channelId??s.endpointId??this.latestEndpointIdByChannelId.get(n.channelId),c=this.endpointMap.get(a);if(!c)return r.payload.success=!1,r.payload.reason=`Client connection with identity uuid: ${this.wire.me.uuid} / name: ${this.wire.me.name} / endpointId: ${a} no longer connected.`,this.wire.sendRaw(r);try{const e=await c(i,o,t);return r.payload.payload=r.payload.payload||{},r.payload.payload.result=e,this.wire.sendRaw(r)}catch(e){return r.payload.success=!1,r.payload.reason=e.message,this.wire.sendRaw(r)}}addEndpoint(e,t,n){this.endpointMap.set(n,e),t!==n&&this.latestEndpointIdByChannelId.set(t,n)}removeEndpoint(e,t){this.endpointMap.delete(t),this.latestEndpointIdByChannelId.get(e)===t&&this.latestEndpointIdByChannelId.delete(e)}checkForPreviousClientConnection(e){const t=this.latestEndpointIdByChannelId.get(e);t&&(wt.ChannelClient.closeChannelByEndpointId(t),console.warn("You have created a second connection to an older provider. First connection has been removed from the clientMap"),console.warn("If the provider calls publish(), you may receive multiple messages."))}}pt.MessageReceiver=ft;var gt={};Object.defineProperty(gt,"__esModule",{value:!0}),gt.ProtocolManager=void 0;gt.ProtocolManager=class{constructor(e){this.ProtocolsInPreferenceOrder=e,this.DefaultClientProtocols=["classic"],this.DefaultProviderProtocols=["classic"],this.getClientProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultClientProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(", ")}.`);return t},this.getProviderProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultProviderProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(", ")}.`);return t},this.getCompatibleProtocols=(e,t)=>t.supportedProtocols.filter((t=>e.some((e=>e.type===t.type&&t.version>=e.minimumVersion&&e.version>=(t.minimumVersion??0))))).slice(0,t.maxProtocols)}};var mt={};Object.defineProperty(mt,"__esModule",{value:!0});class vt{static combine(e,t){return new vt(e,t)}constructor(e,t){this.primary=e,this.secondary=t}onEndpointDisconnect(e,t){this.primary.onEndpointDisconnect(e,(()=>{this.secondary.isEndpointConnected(e)||t()})),this.secondary.onEndpointDisconnect(e,(()=>{this.primary.isEndpointConnected(e)||t()}))}isValidEndpointPayload(e){return this.primary.isValidEndpointPayload(e)||this.secondary.isValidEndpointPayload(e)}async closeEndpoint(e){await this.primary.closeEndpoint(e),await this.secondary.closeEndpoint(e)}isEndpointConnected(e){return this.primary.isEndpointConnected(e)||this.secondary.isEndpointConnected(e)}async addEndpoint(e,t){this.primary.isValidEndpointPayload(t)&&await this.primary.addEndpoint(e,t),this.secondary.isValidEndpointPayload(t)&&await this.secondary.addEndpoint(e,t)}receive(e){this.primary.receive(e),this.secondary.receive(e)}send(e,t,n){return this.primary.isEndpointConnected(e)?this.primary.send(e,t,n):this.secondary.send(e,t,n)}async close(){await Promise.all([this.primary.close(),this.secondary.close()])}}mt.default=vt;var Ct,bt,It=s&&s.__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},Et=s&&s.__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)},xt=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(xe,"__esModule",{value:!0}),xe.ConnectionManager=void 0;const At=Ae,Pt=d,Mt=Oe,_t=Fe,Ot=Je,St=Qe,Rt=pt,Ft=gt,jt=xt(mt);class kt extends Pt.Base{static getProtocolOptionsFromStrings(e){return e.map((e=>{switch(e){case"rtc":return _t.RTCInfo;case"classic":return Mt.ClassicInfo;default:return(0,At.exhaustiveCheck)(e,["rtc","classic"])}}))}constructor(e){super(e),Ct.set(this,void 0),bt.set(this,void 0),this.removeChannelFromProviderMap=e=>{this.providerMap.delete(e)},this.onmessage=e=>"process-channel-connection"===e.action&&(this.processChannelConnection(e),!0),this.providerMap=new Map,this.protocolManager=new Ft.ProtocolManager("node"===this.wire.environment.type?["classic"]:["rtc","classic"]),It(this,Ct,new Rt.MessageReceiver(e),"f"),It(this,bt,new Ot.RTCICEManager(e),"f"),e.registerMessageHandler(this.onmessage.bind(this))}createProvider(e,t){const n=Object.assign(this.wire.environment.getDefaultChannelOptions().create,e||{}),i=this.protocolManager.getProviderProtocols(n?.protocols),r=i.map((e=>{switch(e){case"rtc":return new _t.RTCStrategy;case"classic":return new Mt.ClassicStrategy(this.wire,Et(this,Ct,"f"),t.channelId,t);default:return(0,At.exhaustiveCheck)(e,["rtc","classic"])}}));let o;if(2===r.length){const[e,t]=r;o=jt.default.combine(e,t)}else{if(1!==r.length)throw new Error("failed to combine strategies");[o]=r}const s=new St.ChannelProvider(t,(()=>St.ChannelProvider.wireClose(this.wire,t.channelName)),o),a=t.channelId;return this.providerMap.set(a,{provider:s,strategy:o,supportedProtocols:kt.getProtocolOptionsFromStrings(i)}),St.ChannelProvider.setProviderRemoval(s,this.removeChannelFromProviderMap.bind(this)),s}async createClientOffer(e){const t=this.protocolManager.getClientProtocols(e?.protocols);let n;return{offer:{supportedProtocols:await Promise.all(t.map((async e=>{switch(e){case"rtc":{const{rtcClient:e,channels:t,offer:i,rtcConnectionId:r,channelsOpened:o}=await Et(this,bt,"f").startClientOffer();return n={rtcClient:e,channels:t,channelsOpened:o},{type:"rtc",version:_t.RTCInfo.version,payload:{offer:i,rtcConnectionId:r}}}case"classic":return{type:"classic",version:Mt.ClassicInfo.version};default:return(0,At.exhaustiveCheck)(e,["rtc","classic"])}}))),maxProtocols:2},rtc:n}}async createClientStrategy(e,t){t.endpointId||(t.endpointId=this.wire.environment.getNextMessageId(),Et(this,Ct,"f").checkForPreviousClientConnection(t.channelId));const n=t.answer??{supportedProtocols:[{type:"classic",version:1}]},i=(await Promise.all(n.supportedProtocols.map((async n=>"rtc"===n.type&&e?(await Et(this,bt,"f").finishClientOffer(e.rtcClient,n.payload.answer,e.channelsOpened),new _t.RTCStrategy):"classic"===n.type?new Mt.ClassicStrategy(this.wire,Et(this,Ct,"f"),t.endpointId,t):null)))).filter((e=>null!==e));let r;if(e&&!i.some((e=>e instanceof _t.RTCStrategy))&&e&&e.rtcClient.close(),i.length>=2)r=jt.default.combine(i[0],i[1]);else{if(!i.length)throw new Error("No compatible protocols");[r]=i}const o={endpointIdentity:t,rtc:e};return r.addEndpoint(t.channelId,o),r}async processChannelConnection(e){const{clientIdentity:t,providerIdentity:n,ackToSender:i,payload:r,offer:o}=e.payload;t.endpointId?t.isLocalEndpointId=!1:(t.endpointId=this.wire.environment.getNextMessageId(),t.isLocalEndpointId=!0);const s=n.channelId,a=this.providerMap.get(s);if(!a)return i.payload.success=!1,i.payload.reason=`Channel "${n.channelName}" has been destroyed.`,this.wire.sendRaw(i);const{provider:c,strategy:d,supportedProtocols:h}=a;try{if(!(c instanceof St.ChannelProvider))throw Error("Cannot connect to a channel client");const e=o??{supportedProtocols:[{type:"classic",version:1}],maxProtocols:1},n=this.protocolManager.getCompatibleProtocols(h,e);if(!n.length)throw new Error("This provider does not support any of the offered protocols.");const s=await c.processConnection(t,r);i.payload.payload=i.payload.payload||{};let a={supportedProtocols:[],endpointPayloadPromise:Promise.resolve({endpointIdentity:t})};return a=await n.reduce((async(e,t)=>{const n=await e;if("rtc"===t.type){const{answer:e,rtcClient:i,channels:r}=await Et(this,bt,"f").createProviderAnswer(t.payload.rtcConnectionId,t.payload.offer);n.supportedProtocols.push({type:"rtc",version:_t.RTCInfo.version,payload:{answer:e}}),n.endpointPayloadPromise=n.endpointPayloadPromise.then((e=>r.then((t=>({...e,rtc:{rtcClient:i,channels:t}})))))}else n.supportedProtocols.push({type:"classic",version:Mt.ClassicInfo.version});return n}),Promise.resolve(a)),a.endpointPayloadPromise.then((e=>d.addEndpoint(t.endpointId,e))),i.payload.payload.result=s,i.payload.payload.answer=a,this.wire.sendRaw(i)}catch(e){return i.payload.success=!1,i.payload.reason=e.message,this.wire.sendRaw(i)}}}xe.ConnectionManager=kt,Ct=new WeakMap,bt=new WeakMap;var Lt,Tt,$t,Bt=s&&s.__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},Gt=s&&s.__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)};Object.defineProperty(le,"__esModule",{value:!0}),le.Channel=void 0;const Wt=t,Ht=G,Nt=d,Dt=ue,Ut=xe,Vt=Qe;function zt(e){const t=Math.floor(e/10),n=Math.min(3e4,500*2**t);return new Promise((e=>{setTimeout((()=>{e(!1)}),n)}))}class Kt extends Nt.EmitterBase{constructor(e){super(e,"channel"),Lt.set(this,void 0),Tt.set(this,new Wt.EventEmitter),$t.set(this,new Ht.AsyncRetryableLazy((async()=>{await Promise.all([this.on("disconnected",(e=>{Dt.ChannelClient.handleProviderDisconnect(e)})),this.on("connected",((...e)=>{Gt(this,Tt,"f").emit("connected",...e)}))]).catch((()=>new Error("error setting up channel connection listeners")))}))),Bt(this,Lt,new Ut.ConnectionManager(e),"f")}async getAllChannels(){return this.wire.sendAction("get-all-channels").then((({payload:e})=>e.data))}async onChannelConnect(e){await this.on("connected",e)}async onChannelDisconnect(e){await this.on("disconnected",e)}async safeConnect(e,t,n){const i={count:0};do{let r=()=>{};const o=new Promise((t=>{r=n=>{e===n.channelName&&t(!0)},Gt(this,Tt,"f").on("connected",r)}));try{if(i.count>0){i.gotConnectedEvent=await Promise.race([zt(i.count),o]);const t=await this.wire.sendAction("connect-to-channel",{...n,retryInfo:i});return console.log(`Successfully connected to channelName: ${e}`),t.payload.data}const t=this.wire.sendAction("connect-to-channel",n);i.originalMessageId=t.messageId;return(await t).payload.data}catch(n){if(!n.message.includes("internal-nack"))throw n;t&&0===i.count&&console.warn(`No channel found for channelName: ${e}. Waiting for connection...`)}finally{i.count+=1,Gt(this,Tt,"f").removeListener("connected",r)}}while(t);throw new Error(`No channel found for channelName: ${e}.`)}async connect(e,t={}){if(await Gt(this,$t,"f").getValue(),!e||"string"!=typeof e)throw new Error("Please provide a channelName string to connect to a channel.");const n={wait:!0,...this.wire.environment.getDefaultChannelOptions().connect,...t},{offer:i,rtc:r}=await Gt(this,Lt,"f").createClientOffer(n);let o;(this.fin.me.isFrame||this.fin.me.isView||this.fin.me.isWindow)&&(o=(await this.fin.me.getInfo()).url);const s={channelName:e,...n,offer:i,connectionUrl:o},a=await this.safeConnect(e,n.wait,s),c=await Gt(this,Lt,"f").createClientStrategy(r,a),d=new Dt.ChannelClient(a,(()=>Dt.ChannelClient.wireClose(this.wire,a,a.endpointId)),c);return c.onEndpointDisconnect(a.channelId,(async()=>{try{await d.sendDisconnectAction()}catch(e){console.warn(`Something went wrong during disconnect for client with uuid: ${a.uuid} / name: ${a.name} / endpointId: ${a.endpointId}.`)}finally{Dt.ChannelClient.handleProviderDisconnect(a)}})),d}async create(e,t){if(!e)throw new Error("Please provide a channelName to create a channel");const{payload:{data:n}}=await this.wire.sendAction("create-channel",{channelName:e}),i=Gt(this,Lt,"f").createProvider(t,n);return this.on("client-disconnected",(t=>{t.channelName===e&&Vt.ChannelProvider.handleClientDisconnection(i,t)})),i}}le.Channel=Kt,Lt=new WeakMap,Tt=new WeakMap,$t=new WeakMap,Object.defineProperty(de,"__esModule",{value:!0}),de.InterAppPayload=de.InterApplicationBus=void 0;const qt=t,Jt=d,Yt=he,Zt=le,Qt=O;class Xt extends Jt.Base{constructor(e){super(e),this.events={subscriberAdded:"subscriber-added",subscriberRemoved:"subscriber-removed"},this.refCounter=new Yt.RefCounter,this.Channel=new Zt.Channel(e),this.emitter=new qt.EventEmitter,e.registerMessageHandler(this.onmessage.bind(this)),this.on=this.emitter.on.bind(this.emitter),this.removeAllListeners=this.emitter.removeAllListeners.bind(this.emitter)}async publish(e,t){await this.wire.sendAction("publish-message",{topic:e,message:t,sourceWindowName:this.me.name})}async send(e,t,n){const i=(0,Qt.validateIdentity)(e);if(i)throw new Error(i);await this.wire.sendAction("send-message",{destinationUuid:e.uuid,destinationWindowName:e.name,topic:t,message:n,sourceWindowName:this.me.name})}subscribe(e,t,n){const i=this.createSubscriptionKey(e.uuid,e.name||"*",t);return this.emitter.on(i,n),this.refCounter.actOnFirst(i,(async()=>{await this.wire.sendAction("subscribe",{sourceUuid:e.uuid,sourceWindowName:e.name||"*",topic:t,destinationWindowName:this.me.name})}),(()=>Promise.resolve()))}unsubscribe(e,t,n){const i=e.name||"*",r=this.createSubscriptionKey(e.uuid,i,t);return this.emitter.removeListener(r,n),this.refCounter.actOnLast(r,(async()=>{await this.wire.sendAction("unsubscribe",{sourceUuid:e.uuid,sourceWindowName:i,topic:t,destinationWindowName:this.me.name})}),(()=>new Promise((e=>e)).then((()=>{}))))}processMessage(e){const{payload:{message:t,sourceWindowName:n,sourceUuid:i,topic:r}}=e,o=[this.createSubscriptionKey(i,n,r),this.createSubscriptionKey(i,"*",r),this.createSubscriptionKey("*","*",r)],s={uuid:i,name:n};o.forEach((e=>{this.emitter.emit(e,t,s)}))}emitSubscriverEvent(e,t){const{payload:{targetName:n,uuid:i,topic:r}}=t,o={name:n,uuid:i,topic:r};this.emitter.emit(e,o)}createSubscriptionKey(e,t,n){const i=t||"*";if(!(e&&i&&n))throw new Error("Missing uuid, name, or topic string");return function(...e){return e.map((e=>Buffer.from(`${e}`).toString("base64"))).join("/")}(e,i,n)}onmessage(e){const{action:t}=e;switch(t){case"process-message":this.processMessage(e);break;case this.events.subscriberAdded:this.emitSubscriverEvent(this.events.subscriberAdded,e);break;case this.events.subscriberRemoved:this.emitSubscriverEvent(this.events.subscriberRemoved,e)}return!0}}de.InterApplicationBus=Xt;de.InterAppPayload=class{};var en={};Object.defineProperty(en,"__esModule",{value:!0}),en.Clipboard=void 0;const tn=d;class nn extends tn.Base{async writeText(e){await this.wire.sendAction("clipboard-write-text",e)}async readText(e){const{payload:t}=await this.wire.sendAction("clipboard-read-text",{type:e});return t.data}async writeImage(e){await this.wire.sendAction("clipboard-write-image",e)}async readImage(e={format:"dataURL"}){const{payload:t}=await this.wire.sendAction("clipboard-read-image",e);return t.data}async writeHtml(e){await this.wire.sendAction("clipboard-write-html",e)}async readHtml(e){const{payload:t}=await this.wire.sendAction("clipboard-read-html",{type:e});return t.data}async writeRtf(e){await this.wire.sendAction("clipboard-write-rtf",e)}async readRtf(e){const{payload:t}=await this.wire.sendAction("clipboard-read-rtf",{type:e});return t.data}async write(e){await this.wire.sendAction("clipboard-write",e)}async getAvailableFormats(e){const{payload:t}=await this.wire.sendAction("clipboard-read-formats",{type:e});return t.data}}en.Clipboard=nn;var rn={},on={},sn={};Object.defineProperty(sn,"__esModule",{value:!0}),sn.ExternalApplication=void 0;const an=d;class cn extends an.EmitterBase{constructor(e,t){super(e,"external-application",t.uuid),this.identity=t}getInfo(){return this.wire.sendAction("get-external-application-info",this.identity).then((({payload:e})=>e.data))}}sn.ExternalApplication=cn,Object.defineProperty(on,"__esModule",{value:!0}),on.ExternalApplicationModule=void 0;const dn=d,hn=sn;class ln extends dn.Base{wrap(e){return this.wire.sendAction("external-application-wrap").catch((e=>{})),Promise.resolve(new hn.ExternalApplication(this.wire,{uuid:e}))}wrapSync(e){return this.wire.sendAction("external-application-wrap-sync").catch((e=>{})),new hn.ExternalApplication(this.wire,{uuid:e})}}on.ExternalApplicationModule=ln,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(on,e),n(sn,e)}(rn);var un={},pn={},wn={};Object.defineProperty(wn,"__esModule",{value:!0}),wn._Frame=void 0;const yn=d;class fn extends yn.EmitterBase{constructor(e,t){super(e,"frame",t.uuid,t.name),this.identity=t}getInfo(){return this.wire.sendAction("get-frame-info",this.identity).then((({payload:e})=>e.data))}getParentWindow(){return this.wire.sendAction("get-parent-window",this.identity).then((({payload:e})=>e.data))}}wn._Frame=fn,Object.defineProperty(pn,"__esModule",{value:!0}),pn._FrameModule=void 0;const gn=d,mn=O,vn=wn;class Cn extends gn.Base{async wrap(e){this.wire.sendAction("frame-wrap").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}wrapSync(e){this.wire.sendAction("frame-wrap-sync").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}getCurrent(){return this.wire.sendAction("frame-get-current").catch((e=>{})),Promise.resolve(new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity()))}getCurrentSync(){return this.wire.sendAction("frame-get-current-sync").catch((e=>{})),new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity())}}pn._FrameModule=Cn,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(pn,e),n(wn,e)}(un);var bn={};Object.defineProperty(bn,"__esModule",{value:!0}),bn.GlobalHotkey=void 0;const In=d;class En extends In.EmitterBase{constructor(e){super(e,"global-hotkey")}async register(e,t){await this.on(e,t),await this.wire.sendAction("global-hotkey-register",{hotkey:e})}async unregister(e){await this.removeAllListeners(e),await this.wire.sendAction("global-hotkey-unregister",{hotkey:e})}async unregisterAll(){await Promise.all(this.eventNames().filter((e=>!("registered"===e||"unregistered"===e))).map((e=>this.removeAllListeners(e)))),await this.wire.sendAction("global-hotkey-unregister-all",{})}async isRegistered(e){const{payload:{data:t}}=await this.wire.sendAction("global-hotkey-is-registered",{hotkey:e});return t}}bn.GlobalHotkey=En;var xn,An={},Pn={},Mn={},_n=s&&s.__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)};Object.defineProperty(Mn,"__esModule",{value:!0}),Mn.Platform=void 0;const On=d,Sn=O,Rn=new Map;class Fn extends On.EmitterBase{constructor(e,t){super(t.wire,"application",e.uuid),this.getClient=e=>{this.wire.sendAction("platform-get-client",this.identity).catch((e=>{}));const t=e||this.identity,{uuid:n}=t;if(!Rn.has(n)){const e=_n(this,xn,"f").call(this,n);Rn.set(n,e)}return Rn.get(n)},xn.set(this,(async e=>{try{const t=`custom-frame-${e}`,n=await this._channel.connect(t,{wait:!1});return n.onDisconnection((()=>{Rn.delete(e)})),n}catch(t){throw Rn.delete(e),new Error("The targeted Platform is not currently running. Listen for application-started event for the given Uuid.")}})),this.launchLegacyManifest=this.launchContentManifest;const n=(0,Sn.validateIdentity)(e);if(n)throw new Error(n);this._channel=t,this.identity={uuid:e.uuid},this.Layout=this.fin.Platform.Layout,this.Application=this.fin.Application.wrapSync(this.identity)}async createView(e,t,n){this.wire.sendAction("platform-create-view",this.identity).catch((e=>{}));const i=await this.getClient(),r=await i.dispatch("create-view",{target:t,opts:e,targetView:n});if(!r||(0,Sn.validateIdentity)(r.identity))throw new Error(`When overwriting the createView call, please return an object that has a valid 'identity' property: ${JSON.stringify(r)}`);return this.fin.View.wrapSync(r.identity)}async createWindow(e){this.wire.sendAction("platform-create-window",this.identity).catch((e=>{}));const t=await this.getClient();e.reason||(e.reason="api-call");const n=await t.dispatch("create-view-container",e);if(!n||(0,Sn.validateIdentity)(n.identity))throw new Error(`When overwriting the createWindow call, please return an object that has a valid 'identity' property: ${JSON.stringify(n)}`);const{identity:i}=n,r=this.fin.Window.wrapSync(i);return r.name=i.name,r.uuid=i.uuid,r}async quit(){this.wire.sendAction("platform-quit",this.identity).catch((e=>{}));return(await this.getClient()).dispatch("quit")}async closeView(e){this.wire.sendAction("platform-close-view",this.identity).catch((e=>{}));const t=await this.getClient();await t.dispatch("close-view",{view:e})}async reparentView(e,t){console.warn("Platform.reparentView has been deprecated, please use Platform.createView"),this.wire.sendAction("platform-reparent-view",this.identity).catch((e=>{}));const n={...e,uuid:e.uuid??this.identity.uuid},i=await this.fin.View.wrap(n),r=await i.getOptions();return this.createView(r,t)}async getSnapshot(){this.wire.sendAction("platform-get-snapshot",this.identity).catch((e=>{}));return(await this.getClient()).dispatch("get-snapshot")}async getViewSnapshot(e){return(await this.getClient()).dispatch("get-view-snapshot",{viewIdentity:e})}async applySnapshot(e,t){this.wire.sendAction("platform-apply-snapshot",this.identity).catch((e=>{}));const n="Requested snapshot must be a valid Snapshot object, or a url or filepath to such an object.";let i;if("string"==typeof e)try{i=(await this._channel.wire.sendAction("get-application-manifest",{manifestUrl:e})).payload.data}catch(e){throw new Error(`${n}: ${e}`)}else i=e;if(!i.windows)throw new Error(n);const r=await this.getClient();return await r.dispatch("apply-snapshot",{snapshot:i,options:t}),this}async fetchManifest(e){return(await this.getClient()).dispatch("platform-fetch-manifest",{manifestUrl:e})}async launchContentManifest(e){this.wire.sendAction("platform-launch-content-manifest",this.identity).catch((()=>{}));const t=await this.getClient(),n=await this.fetchManifest(e);return t.dispatch("launch-into-platform",{manifest:n,manifestUrl:e}),this}async setWindowContext(e={},t){if(this.wire.sendAction("platform-set-window-context",this.identity).catch((e=>{})),!e)throw new Error("Please provide a serializable object or string to set the context.");const n=await this.getClient(),{entityType:i}=t?await this.fin.System.getEntityInfo(t.uuid,t.name):this.fin.me;await n.dispatch("set-window-context",{context:e,entityType:i,target:t||{uuid:this.fin.me.uuid,name:this.fin.me.name}})}async getWindowContext(e){this.wire.sendAction("platform-get-window-context",this.identity).catch((e=>{}));const t=await this.getClient(),{entityType:n}=e?await this.fin.System.getEntityInfo(e.uuid,e.name):this.fin.me;return t.dispatch("get-window-context",{target:e||{uuid:this.fin.me.uuid,name:this.fin.me.name},entityType:n})}async closeWindow(e,t={skipBeforeUnload:!1}){this.wire.sendAction("platform-close-window",this.identity).catch((e=>{}));return(await this.getClient()).dispatch("close-window",{windowId:e,options:t})}}Mn.Platform=Fn,xn=new WeakMap;var jn={},kn={},Ln={},Tn={};function $n(e){switch(e){case"columns":case"grid":case"rows":case"tabs":return!0;default:return!1}}Object.defineProperty(Tn,"__esModule",{value:!0}),Tn.overrideFromComposables=Tn.isValidPresetType=void 0,Tn.isValidPresetType=$n,Tn.overrideFromComposables=function(...e){return t=>e.reduceRight(((e,t)=>n=>t(e(n))),(e=>e))(t)},Tn.default={isValidPresetType:$n};var Bn={},Gn={},Wn={};Object.defineProperty(Wn,"__esModule",{value:!0}),Wn.ApiConsumer=void 0;Wn.ApiConsumer=class{constructor(e){this.strategy=e,this.consume=async e=>(await this.strategy.getExposedFunctions(e)).reduce(((t,n)=>({...t,[n.key]:this.strategy.createFunction(n,e)})),{})}};var Hn={},Nn={};Object.defineProperty(Nn,"__esModule",{value:!0}),Nn.expose=Nn.getExposedProperties=void 0;const Dn=Symbol("exposedProperties");Nn.getExposedProperties=e=>e[Dn]||e.prototype[Dn]||[];Nn.expose=e=>(t,n,i)=>{t[Dn]=t[Dn]||[],t[Dn].push({key:n,descriptor:i,options:e})},Object.defineProperty(Hn,"__esModule",{value:!0}),Hn.ApiExposer=void 0;const Un=Nn;Hn.ApiExposer=class{constructor(e){this.strategy=e,this.exposeInstance=async(e,t)=>{const n=(0,Un.getExposedProperties)(e),i=await Promise.all(n.map((async({key:n,options:i})=>({key:n,options:await this.strategy.exposeFunction(e[n].bind(e),{key:n,options:i,meta:t})}))));await this.strategy.exposeMeta(t,i)}}};var Vn={},zn={},Kn={};Object.defineProperty(Kn,"__esModule",{value:!0}),Kn.ChannelsConsumer=void 0;Kn.ChannelsConsumer=class{constructor(e){this.channel=e,this.getExposedFunctions=async e=>{const{id:t}=e,{props:n}=await this.channel.dispatch(`api-meta:${t}`);return n},this.createFunction=e=>(...t)=>{const{action:n}=e.options;return this.channel.dispatch(n,{args:t})}}};var qn={};Object.defineProperty(qn,"__esModule",{value:!0}),qn.ChannelsExposer=void 0;qn.ChannelsExposer=class{constructor(e){this.channelProviderOrClient=e,this.exposeFunction=async(e,t)=>{const{key:n,options:i,meta:r}=t,{id:o}=r,s=`${o}.${i?.action||n}`;return await this.channelProviderOrClient.register(s,(async({args:t})=>e(...t))),{action:s}},this.exposeMeta=async({id:e},t)=>{const n=`api-meta:${e}`;await this.channelProviderOrClient.register(n,(()=>({props:t})))}}},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Kn,e),n(qn,e)}(zn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(zn,e)}(Vn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Wn,e),n(Hn,e),n(Vn,e),n(Nn,e)}(Gn);var Jn={};Object.defineProperty(Jn,"__esModule",{value:!0}),Jn.createRelayedDispatch=exports.relayChannelClientApi_1=Jn.relayChannelClientApi=void 0;const Yn=["no longer connected","RTCDataChannel closed unexpectedly","The client you are trying to dispatch from is disconnected from the target provider"];exports.relayChannelClientApi_1=Jn.relayChannelClientApi=async(e,t)=>{e.register(`relay:${t}`,(({action:t,target:n,payload:i})=>e.dispatch(n,t,i))),await Promise.resolve()};Jn.createRelayedDispatch=(e,t,n,i)=>async(r,o)=>{try{return await e.dispatch(`relay:${n}`,{action:r,payload:o,target:t})}catch(e){if(s=e.message,Yn.some((e=>s.includes(e)))&&i)throw new Error(i);throw e}var s};var Zn,Qn,Xn,ei=s&&s.__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},ti=s&&s.__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)};Object.defineProperty(Bn,"__esModule",{value:!0}),Bn.ColumnOrRow=Bn.TabStack=Bn.LayoutNode=void 0;const ni=Gn,ii=Jn;class ri{constructor(e,t){Zn.set(this,void 0),this.isRoot=()=>ti(this,Zn,"f").isRoot(this.entityId),this.exists=()=>ti(this,Zn,"f").exists(this.entityId),this.getParent=async()=>{const e=await ti(this,Zn,"f").getParent(this.entityId);if(e)return ri.getEntity(e,ti(this,Zn,"f"))},this.createAdjacentStack=async(e,t)=>{const n=await ti(this,Zn,"f").createAdjacentStack(this.entityId,e,t);return ri.getEntity({entityId:n,type:"stack"},ti(this,Zn,"f"))},this.getAdjacentStacks=async e=>(await ti(this,Zn,"f").getAdjacentStacks({targetId:this.entityId,edge:e})).map((e=>ri.getEntity({type:"stack",entityId:e.entityId},ti(this,Zn,"f")))),ei(this,Zn,e,"f"),this.entityId=t}}Bn.LayoutNode=ri,Zn=new WeakMap,ri.newLayoutEntitiesClient=async(e,t,n)=>{const i=(0,ii.createRelayedDispatch)(e,n,"layout-relay","You are trying to interact with a layout component on a window that does not exist or has been destroyed.");return new ni.ApiConsumer(new ni.ChannelsConsumer({dispatch:i})).consume({id:t})},ri.getEntity=(e,t)=>{const{entityId:n,type:i}=e;switch(i){case"column":case"row":return new si(t,n,i);case"stack":return new oi(t,n);default:throw new Error(`Unrecognised Layout Entity encountered ('${JSON.stringify(e)})`)}};class oi extends ri{constructor(e,t){super(e,t),Qn.set(this,void 0),this.type="stack",this.getViews=()=>ti(this,Qn,"f").getStackViews(this.entityId),this.addView=async(e,t={index:0})=>ti(this,Qn,"f").addViewToStack(this.entityId,e,t),this.removeView=async e=>{await ti(this,Qn,"f").removeViewFromStack(this.entityId,e)},this.setActiveView=async e=>{await ti(this,Qn,"f").setStackActiveView(this.entityId,e)},ei(this,Qn,e,"f")}}Bn.TabStack=oi,Qn=new WeakMap;class si extends ri{constructor(e,t,n){super(e,t),Xn.set(this,void 0),this.getContent=async()=>(await ti(this,Xn,"f").getContent(this.entityId)).map((e=>ri.getEntity(e,ti(this,Xn,"f")))),ei(this,Xn,e,"f"),this.type=n}}Bn.ColumnOrRow=si,Xn=new WeakMap;var ai={};Object.defineProperty(ai,"__esModule",{value:!0}),ai.DEFAULT_LAYOUT_KEY=ai.LAYOUT_CONTROLLER_ID=void 0,ai.LAYOUT_CONTROLLER_ID="layout-entities",ai.DEFAULT_LAYOUT_KEY="__default__";var ci,di,hi,li=s&&s.__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)};Object.defineProperty(Ln,"__esModule",{value:!0}),Ln.Layout=void 0;const ui=G,pi=O,wi=d,yi=Tn,fi=Bn,gi=ai;class mi extends wi.Base{static getClient(e){return li(e,di,"f").getValue()}constructor(e,t){super(t),ci.add(this),di.set(this,new ui.Lazy((async()=>fi.LayoutNode.newLayoutEntitiesClient(await this.platform.getClient(),gi.LAYOUT_CONTROLLER_ID,this.identity)))),this.replace=async e=>{this.wire.sendAction("layout-replace").catch((e=>{}));const t=await this.platform.getClient();await t.dispatch("replace-layout",{target:this.identity,opts:{layout:e}})},this.replaceView=async(e,t)=>{this.wire.sendAction("layout-replace-view").catch((e=>{}));const n=await this.platform.getClient();await n.dispatch("replace-view",{target:this.identity,opts:{viewToReplace:e,newView:t}})},this.applyPreset=async e=>{this.wire.sendAction("layout-apply-preset").catch((e=>{}));const t=await this.platform.getClient(),{presetType:n}=e;if(!n||!(0,yi.isValidPresetType)(n))throw new Error("Cannot apply preset layout, please include an applicable presetType property in the PresetLayoutOptions.");await t.dispatch("apply-preset-layout",{target:this.identity,opts:{presetType:n}})};const n=(0,pi.validateIdentity)(e);if(n)throw new Error(n);this.identity=e,this.platform=this.fin.Platform.wrapSync({uuid:e.uuid}),e.uuid===this.fin.me.uuid&&e.name===this.fin.me.name&&(this.init=this.fin.Platform.Layout.init)}async getConfig(){this.wire.sendAction("layout-get-config").catch((e=>{}));return(await this.platform.getClient()).dispatch("get-frame-snapshot",{target:this.identity})}async getCurrentViews(){this.wire.sendAction("layout-get-views").catch((e=>{}));const e=await this.platform.getClient();return(await e.dispatch("get-layout-views",{target:this.identity})).map((e=>this.fin.View.wrapSync(e)))}async getRootItem(){this.wire.sendAction("layout-get-root-item").catch((()=>{}));const e=await li(this,di,"f").getValue(),t=await e.getRoot("layoutName"in this.identity?this.identity:void 0);return fi.LayoutNode.getEntity(t,e)}async getStackByViewIdentity(e){this.wire.sendAction("layout-get-stack-by-view").catch((()=>{}));const t=await li(this,di,"f").getValue(),n=await t.getStackByView(e);if(!n)throw new Error(`No stack found for view: ${e.uuid}/${e.name}`);return fi.LayoutNode.getEntity(n,t)}async addView(e,{location:t,targetView:n}={}){this.wire.sendAction("layout-add-view").catch((e=>{}));const{identity:i}=await li(this,ci,"m",hi).call(this,"layout-add-view",{viewOptions:e,location:t,targetView:n});return{identity:i}}async closeView(e){this.wire.sendAction("layout-close-view").catch((e=>{})),await li(this,ci,"m",hi).call(this,"layout-close-view",{viewIdentity:e})}}Ln.Layout=mi,di=new WeakMap,ci=new WeakSet,hi=async function(e,t){return(await this.platform.getClient()).dispatch(e,{target:this.identity,opts:t})};var vi,Ci,bi,Ii,Ei,xi=s&&s.__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)},Ai=s&&s.__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};Object.defineProperty(kn,"__esModule",{value:!0}),kn.LayoutModule=void 0;const Pi=d,Mi=Ln,_i=ai;class Oi extends Pi.Base{constructor(){super(...arguments),vi.add(this),Ci.set(this,!1),bi.set(this,null),this.init=async(e={})=>{if(this.wire.sendAction("layout-init").catch((e=>{})),!this.wire.environment.layoutAllowedInContext(this.fin))throw new Error("Layout.init can only be called from a Window context.");if(xi(this,Ci,"f"))throw new Error("Layout.init was already called, please use Layout.create to add additional layouts.");"openfin"===this.wire.environment.type&&await this.fin.Platform.getCurrentSync().getClient(),Ai(this,Ci,!0,"f"),Ai(this,bi,await this.wire.environment.initLayoutManager(this.fin,this.wire,e),"f"),await this.wire.environment.applyLayoutSnapshot(this.fin,xi(this,bi,"f"),e);const t={name:this.fin.me.name,uuid:this.fin.me.uuid};if(!e.layoutManagerOverride){const e={layoutName:_i.DEFAULT_LAYOUT_KEY,...t};return xi(this,Ii,"f").call(this,e)}return this.wrapSync(t)},Ii.set(this,(e=>{const t="[Layout] You are using a deprecated property `layoutManager` - it will throw if you access it starting in v37.",n=new Proxy({},{get(e,n){throw console.warn(`[Layout-mgr-proxy] accessing ${n.toString()}`),new Error(t)}}),i=Object.assign(this.wrapSync(e),{layoutManager:n});return new Proxy(i,{get(e,n){if("layoutManager"===n)throw console.warn(`[Layout-proxy] accessing ${n.toString()}`),new Error(t);return e[n]}})})),this.getCurrentLayoutManagerSync=()=>xi(this,vi,"m",Ei).call(this,"fin.Platform.Layout.getCurrentLayoutManagerSync()"),this.create=async e=>this.wire.environment.createLayout(xi(this,vi,"m",Ei).call(this,"fin.Platform.Layout.create()"),e),this.destroy=async e=>this.wire.environment.destroyLayout(xi(this,vi,"m",Ei).call(this,"fin.Platform.Layout.destroy()"),e)}async wrap(e){return this.wire.sendAction("layout-wrap").catch((e=>{})),new Mi.Layout(e,this.wire)}wrapSync(e){return this.wire.sendAction("layout-wrap-sync").catch((e=>{})),new Mi.Layout(e,this.wire)}async getCurrent(){if(this.wire.sendAction("layout-get-current").catch((e=>{})),"openfin"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error("You are not in a Window context. Only Windows can have a Layout.");const{uuid:e,name:t}=this.fin.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction("layout-get-current-sync").catch((e=>{})),"openfin"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error("You are not in a Window context. Only Windows can have a Layout.");const{uuid:e,name:t}=this.fin.me;return this.wrapSync({uuid:e,name:t})}async getLayoutByViewIdentity(e){this.wire.sendAction("layout-get-by-view-identity").catch((()=>{}));let t=await this.wire.environment.getViewWindowIdentity(this.fin,e);t.identity&&(t=t.identity);try{const n=this.wrapSync(t),i=await Mi.Layout.getClient(n),r=await i.getLayoutIdentityForViewOrThrow(e);return this.wrapSync(r)}catch(n){if(!["No action registered at target for","getLayoutIdentityForViewOrThrow is not a function"].some((e=>n.message.includes(e))))throw n;if(t.uuid===t.name)throw new Error(`View identity ${JSON.stringify(e)} is not attached to any layout in provider window ${JSON.stringify(t)}.`);return this.wrapSync(t)}}}kn.LayoutModule=Oi,Ci=new WeakMap,bi=new WeakMap,Ii=new WeakMap,vi=new WeakSet,Ei=function(e){if(!xi(this,bi,"f"))throw new Error(`You must call init before using the API ${e}`);return xi(this,bi,"f")},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(kn,e),n(Ln,e)}(jn),Object.defineProperty(Pn,"__esModule",{value:!0}),Pn.PlatformModule=void 0;const Si=d,Ri=Mn,Fi=jn;class ji extends Si.Base{constructor(e,t){super(e),this._channel=t,this.Layout=new Fi.LayoutModule(this.wire)}async init(e){if(!fin.__internal_.isPlatform||fin.me.name!==fin.me.uuid)throw new Error("fin.Platform.init should only be called from a custom platform provider running in the main window of the application.");return this.wire.environment.initPlatform(this.fin,e)}async wrap(e){return this.wire.sendAction("platform-wrap").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}wrapSync(e){return this.wire.sendAction("platform-wrap-sync").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}async getCurrent(){return this.wire.sendAction("platform-get-current").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction("platform-get-current-sync").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}start(e){return this.wire.sendAction("platform-start").catch((e=>{})),new Promise((async(t,n)=>{try{const{uuid:n}=e,i=await this.fin.Application._create({...e,isPlatformController:!0});i.once("platform-api-ready",(()=>t(this.wrapSync({uuid:n})))),i._run({uuid:n})}catch(e){n(e)}}))}startFromManifest(e,t){return this.wire.sendAction("platform-start-from-manifest").catch((e=>{})),new Promise((async(n,i)=>{try{const i=await this.fin.Application._createFromManifest(e);i.once("platform-api-ready",(()=>n(this.wrapSync({uuid:i.identity.uuid})))),i._run(t)}catch(e){i(e)}}))}}Pn.PlatformModule=ji,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Pn,e),n(Mn,e)}(An);var ki={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getMe=e.getBaseMe=e.environmentUnsupportedMessage=void 0;const t=J(),n=un,i=ie(),r=rn;function o(e,t,n){return{...{isView:"view"===e,isWindow:"window"===e,isFrame:"iframe"===e,isExternal:"external connection"===e},uuid:t,name:n,entityType:e}}e.environmentUnsupportedMessage="You are not running in OpenFin.",e.getBaseMe=o,e.getMe=function(s){const{uuid:a,name:c,entityType:d}=s.me,h={setContext(){throw new Error(e.environmentUnsupportedMessage)},addContextHandler(){throw new Error(e.environmentUnsupportedMessage)},getContextGroups(){throw new Error(e.environmentUnsupportedMessage)},joinContextGroup(){throw new Error(e.environmentUnsupportedMessage)},removeFromContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getAllClientsInContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getInfoForContextGroup(){throw new Error(e.environmentUnsupportedMessage)}},l="Interop API has not been instantiated. Either connection has failed or you have not declared interop in your config.",u={setContext(){throw new Error(l)},addContextHandler(){throw new Error(l)},getContextGroups(){throw new Error(l)},joinContextGroup(){throw new Error(l)},removeFromContextGroup(){throw new Error(l)},getAllClientsInContextGroup(){throw new Error(l)},getInfoForContextGroup(){throw new Error(l)}},p={eventNames:()=>{throw new Error(e.environmentUnsupportedMessage)},emit:()=>{throw new Error(e.environmentUnsupportedMessage)},listeners:()=>{throw new Error(e.environmentUnsupportedMessage)},listenerCount:()=>{throw new Error(e.environmentUnsupportedMessage)},on:()=>{throw new Error(e.environmentUnsupportedMessage)},addListener:()=>{throw new Error(e.environmentUnsupportedMessage)},once:()=>{throw new Error(e.environmentUnsupportedMessage)},prependListener:()=>{throw new Error(e.environmentUnsupportedMessage)},prependOnceListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeAllListeners:()=>{throw new Error(e.environmentUnsupportedMessage)}};switch(d){case"view":return Object.assign(new t.View(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case"window":return Object.assign(new i._Window(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case"iframe":return Object.assign(new n._Frame(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case"external connection":return Object.assign(new r.ExternalApplication(s,{uuid:a}),o(d,a,c),{interop:u,isOpenFin:!1});default:return{...o(d,a,c),...p,interop:h,isOpenFin:!1}}}}(ki);var Li={},Ti={},$i={};Object.defineProperty($i,"__esModule",{value:!0}),$i.createWarningObject=$i.createUnusableObject=void 0,$i.createUnusableObject=function(e){const t=()=>{throw new Error(e)};return new Proxy({},{apply:t,construct:t,defineProperty:t,deleteProperty:t,get:t,getOwnPropertyDescriptor:t,getPrototypeOf:t,has:t,isExtensible:t,ownKeys:t,preventExtensions:t,set:t,setPrototypeOf:t})},$i.createWarningObject=function(e,t){return new Proxy(t,{get:(...t)=>(console.warn(e),Reflect.get(...t)),set:(...t)=>(console.warn(e),Reflect.set(...t)),getOwnPropertyDescriptor:(...t)=>(console.warn(e),Reflect.getOwnPropertyDescriptor(...t)),ownKeys:(...t)=>(console.warn(e),Reflect.ownKeys(...t))})};var Bi,Gi={},Wi={};var Hi={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.wrapIntentHandler=e.BROKER_ERRORS=e.generateOverrideWarning=e.generateOverrideError=e.wrapContextHandler=e.wrapInTryCatch=e.generateId=void 0;e.generateId=()=>`${Math.random()}${Date.now()}`;e.wrapInTryCatch=(e,t)=>(...n)=>{try{return e(...n)}catch(e){throw new Error((t||"")+e)}};e.wrapContextHandler=(e,t)=>async n=>{try{await e(n)}catch(e){throw console.error(`Error thrown by handler ${t} for context type ${n.type}: ${e}`),e}};e.generateOverrideError=(e,t)=>`You have tried to to use ${e} but ${t} has not been overridden in the Interop Broker. Please override this function. Refer to our documentation for more info.`;e.generateOverrideWarning=(e,t,n,i)=>{const{uuid:r,name:o}=n;return i?`Entity with identity: ${r}/${o} has called ${i} or ${e} but ${t} has not been overridden.`:`Entity with identity: ${r}/${o} has called ${e} but ${t} has not been overridden.`},e.BROKER_ERRORS={fireIntent:(0,e.generateOverrideError)("fireIntent","handleFiredIntent"),fireIntentForContext:(0,e.generateOverrideError)("fireIntentForContext","handleFiredIntentForContext"),getInfoForIntent:(0,e.generateOverrideError)("getInfoForIntent","handleInfoForIntent"),getInfoForIntentsByContext:(0,e.generateOverrideError)("getInfoForIntentsByContext","handleInfoForIntentsByContext"),joinSessionContextGroupWithJoinContextGroup:"The Context Group you have tried to join is a Session Context Group. Custom Context Groups can only be defined by the Interop Broker through code or manifest configuration. Please use joinSessionContextGroup.",fdc3Open:(0,e.generateOverrideError)("fdc3.open","fdc3HandleOpen"),fdc3FindInstances:(0,e.generateOverrideError)("fdc3.findInstances","fdc3HandleFindInstances"),fdc3GetAppMetadata:(0,e.generateOverrideError)("fdc3.getAppMetadata","fdc3HandleGetAppMetadata"),fdc3GetInfo:(0,e.generateOverrideError)("fdc3.getInfo","fdc3HandleGetInfo")};e.wrapIntentHandler=(e,t)=>async n=>{try{return e(n)}catch(e){throw console.error(`Error thrown by handler ${t}: ${e}`),e}}}(Hi);var Ni,Di,Ui={};function Vi(){if(Di)return Gi;Di=1;var e,t,n,r=s&&s.__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},o=s&&s.__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)},a=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Gi,"__esModule",{value:!0}),Gi.InteropBroker=void 0;const c=d,h=a(function(){if(Bi)return Wi;Bi=1,Object.defineProperty(Wi,"__esModule",{value:!0});const e=Cr();return Wi.default=class{constructor(e,t){this.provider=e,this.id=t,this.lastContext=void 0,this.contextGroupMap=new Map,this.clients=new Map,this.registerListeners()}registerListeners(){this.provider.register(`sessionContextGroup:getContext-${this.id}`,this.getCurrentContext.bind(this)),this.provider.register(`sessionContextGroup:setContext-${this.id}`,this.setContext.bind(this)),this.provider.register(`sessionContextGroup:handlerAdded-${this.id}`,this.handlerAdded.bind(this)),this.provider.register(`sessionContextGroup:handlerRemoved-${this.id}`,this.handlerRemoved.bind(this))}getCurrentContext(e){return e.type?this.contextGroupMap.get(e.type):this.lastContext}setContext(t,n){const{context:i}=t,r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name} not in Session Client State Map`);this.contextGroupMap.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{e.contextHandlers.get(i.type)?.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getClientState(e){return this.clients.get(e.endpointId)}async handlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(i){const e=r.contextHandlers.get(i)||[];r.contextHandlers.set(i,[...e,n]);const o=this.contextGroupMap.get(i);o&&await this.provider.dispatch(t,n,o)}else{r.globalHandler=n;const e=[...this.contextGroupMap.keys()].map((async e=>{const i=this.contextGroupMap.get(e);i&&await this.provider.dispatch(t,n,i)}));await Promise.all(e)}}handlerRemoved(e,t){const{handlerId:n}=e,i=this.clients.get(t.endpointId);i?(Array.from(i.contextHandlers).forEach((([,e])=>{const t=e.indexOf(n);t>-1&&e.splice(t,1)})),i.globalHandler===n&&(i.globalHandler=void 0)):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={contextHandlers:new Map,clientIdentity:e,globalHandler:void 0};this.clients.set(e.endpointId,t)}}onDisconnection(e){this.clients.delete(e.endpointId)}},Wi}()),l=Hi,u=a(i),p=function(){if(Ni)return Ui;Ni=1,Object.defineProperty(Ui,"__esModule",{value:!0}),Ui.PrivateChannelProvider=void 0;const e=Vi();return Ui.PrivateChannelProvider=class t{constructor(e,t){this.provider=e,this.id=t,this.clients=new Map,this.registerListeners(),this.contextByContextType=new Map,this.lastContext=void 0,this.provider.onConnection((e=>this.registerNewClient(e))),this.provider.onDisconnection((async e=>{const{endpointId:t}=e;this.clients.has(t)&&await this.handleClientDisconnecting(e),0===(await this.provider.getAllClientInfo()).length&&this.provider.destroy()}))}getClientState(e){return this.clients.get(e.endpointId)}registerListeners(){this.provider.register("broadcast",this.broadcast.bind(this)),this.provider.register("getCurrentContext",this.getCurrentContext.bind(this)),this.provider.register("contextHandlerAdded",this.contextHandlerAdded.bind(this)),this.provider.register("contextHandlerRemoved",this.contextHandlerRemoved.bind(this)),this.provider.register("nonStandardHandlerRemoved",this.nonStandardHandlerRemoved.bind(this)),this.provider.register("onAddContextHandlerAdded",this.onAddContextHandlerAdded.bind(this)),this.provider.register("onDisconnectHandlerAdded",this.onDisconnectHandlerAdded.bind(this)),this.provider.register("onUnsubscribeHandlerAdded",this.onUnsubscribeHandlerAdded.bind(this)),this.provider.register("clientDisconnecting",((e,t)=>{this.handleClientDisconnecting(t)}))}broadcast(t,n){const{context:i}=t;if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name}, tried to call broadcast, is not connected to this Private Channel`);const r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to broadcast - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);this.contextByContextType.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{const t=e.handlerIdsByContextTypes.get(i.type);t&&t.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getCurrentContext(e,t){const{contextType:n}=e;if(!this.getClientState(t))throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call getCurrentContext, is not connected to this Private Channel`);if(void 0!==n){return this.contextByContextType.get(n)||null}return this.lastContext?this.lastContext:null}contextHandlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call addContextListener, is not connected to this Private Channel`);if(i){const e=r.handlerIdsByContextTypes.get(i)||[];r.handlerIdsByContextTypes.set(i,[...e,n])}else r.globalHandler=n;Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&e.onAddContextListenerHandlerId&&this.provider.dispatch(e.clientIdentity,e.onAddContextListenerHandlerId,i)}))}async contextHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);if(i){let e;if(i.globalHandler===n)i.globalHandler=void 0;else for(const[t,r]of i.handlerIdsByContextTypes){const i=r.indexOf(n);i>-1&&(r.splice(i,1),e=t)}const r=(await this.getConnectedClients()).map((async n=>{const{clientIdentity:i,clientIdentity:{endpointId:r},onUnsubscribeHandlerId:o}=n;r!==t.endpointId&&o&&await this.provider.dispatch(i,o,e)}));try{await Promise.all(r)}catch(e){throw console.error(`Problem when attempting to dispatch to onUnsubscribeHandlers. Error: ${e} Removing Client: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}`),new Error(e)}}else console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}.`)}nonStandardHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);i?i.onDisconnectHandlerId===n?i.onDisconnectHandlerId=void 0:i.onAddContextListenerHandlerId===n?i.onAddContextListenerHandlerId=void 0:i.onUnsubscribeHandlerId===n&&(i.onUnsubscribeHandlerId=void 0):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}onAddContextHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onAddContextListener, is not connected to this Private Channel`);n.onAddContextListenerHandlerId=i,Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&Array.from(e.handlerIdsByContextTypes.keys()).forEach((e=>{this.provider.dispatch(t,i,e)}))}))}onDisconnectHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onDisconnect, is not connected to this Private Channel`);n.onDisconnectHandlerId=i}onUnsubscribeHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onUnsubscribe, is not connected to this Private Channel`);n.onUnsubscribeHandlerId=i}removeClient(e){const t=this.getClientState(e);if(!t)throw new Error(`Client with Identity: ${e.uuid} ${e.name}, tried to call disconnect, is not connected to this Private Channel`);t.handlerIdsByContextTypes.clear(),this.clients.delete(e.endpointId)}async fireOnDisconnectForOtherClients(e){const{endpointId:t}=e,n=(await this.getConnectedClients()).map((async e=>{const{clientIdentity:{endpointId:n},onDisconnectHandlerId:i}=e;n!==t&&i&&await this.provider.dispatch(e.clientIdentity,i)}));try{await Promise.all(n)}catch(t){throw console.error(`Problem when attempting to dispatch to onDisconnectHandlers. Error: ${t} Disconnecting Client: uuid: ${e.uuid}. name: ${e.name}. endpointId: ${e.endpointId}`),new Error(t)}}async unsubscribeAll(e){const{endpointId:t}=e,n=this.clients.get(t);if(n){const t=Array.from(n.handlerIdsByContextTypes.values()).flat(),i=n.globalHandler;if(t.length>0){const n=t.map((async t=>this.contextHandlerRemoved({handlerId:t},e)));try{await Promise.all(n)}catch(e){console.error(e.message)}}if(i)try{await this.contextHandlerRemoved({handlerId:i},e)}catch(e){console.error(e.message)}}}async handleClientDisconnecting(e){await this.unsubscribeAll(e),this.removeClient(e),await this.fireOnDisconnectForOtherClients(e)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={clientIdentity:e,handlerIdsByContextTypes:new Map,globalHandler:void 0,onAddContextListenerHandlerId:void 0,onUnsubscribeHandlerId:void 0,onDisconnectHandlerId:void 0};this.clients.set(e.endpointId,t)}}async getConnectedClients(){const e=await this.provider.getAllClientInfo();return Array.from(this.clients.values()).filter((t=>{const{uuid:n,name:i}=t.clientIdentity;return e.some((e=>i===e.name&&n===e.uuid))}))}static init(e,n){return new t(e,n)}},Ui}(),w=G,y=[{id:"green",displayMetadata:{color:"#00CC88",name:"green"}},{id:"purple",displayMetadata:{color:"#8C61FF",name:"purple"}},{id:"orange",displayMetadata:{color:"#FF8C4C",name:"orange"}},{id:"red",displayMetadata:{color:"#FF5E60",name:"red"}},{id:"pink",displayMetadata:{color:"#FF8FB8",name:"pink"}},{id:"yellow",displayMetadata:{color:"#E9FF8F",name:"yellow"}}];let f=class i extends c.Base{constructor(i,s,a){super(i),e.set(this,void 0),t.set(this,void 0),n.set(this,void 0),this.getProvider=()=>o(this,n,"f").getValue(),this.interopClients=new Map,this.contextGroupsById=new Map,r(this,t,a.contextGroups??[...y],"f"),r(this,e,a.fdc3Info,"f"),a?.logging&&(this.logging=a.logging),this.intentClientMap=new Map,this.lastContextMap=new Map,this.sessionContextGroupMap=new Map,r(this,n,new w.Lazy(s),"f"),this.setContextGroupMap(),this.setupChannelProvider()}static createClosedConstructor(...e){return class extends i{constructor(...t){if(t.length){const[n,i,r]=t;if(r&&"object"==typeof r&&!(0,u.default)(r,e[2]))return console.warn("You have modified the parameters of the InteropOverride constructor. This behavior is deprecated and will be removed in a future version. You can modify these options in your manifest. Please consult our Interop docs for guidance on migrating to the new override scheme."),void super(e[0],e[1],r);console.warn("You are attempting to pass arguments to the InteropOverride constructor. This is not necessary, and these passed arguments will be ignored. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.")}super(...e)}}}setContext({context:e},t){this.wire.sendAction("interop-broker-set-context").catch((e=>{}));const n=this.getClientState(t);if(!n||!n.contextGroupId)throw n?new Error("You must join a context group before you can set context."):new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);{const{contextGroupId:t}=n;this.setContextForGroup({context:e},t)}}setContextForGroup({context:e},t){this.wire.sendAction("interop-broker-set-context-for-group").catch((e=>{}));const n=this.contextGroupsById.get(t);if(!n)throw new Error(`Unable to set context for context group that isn't in the context group mapping: ${t}.`);const r=i.checkContextIntegrity(e);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(e)}`);const o=e.type;n.set(o,e),this.lastContextMap.set(t,o);Array.from(this.interopClients.values()).filter((e=>e.contextGroupId===t)).forEach((t=>{for(const[,n]of t.contextHandlers)i.isContextTypeCompatible(o,n.contextType)&&this.invokeContextHandler(t.clientIdentity,n.handlerId,e)}))}getCurrentContext(e,t){this.wire.sendAction("interop-broker-get-current-context").catch((e=>{}));const n=this.getClientState(t);if(!n?.contextGroupId)throw new Error("You must be a member of a context group to call getCurrentContext");const{contextGroupId:i}=n,r=this.contextGroupsById.get(i),o=this.lastContextMap.get(i),s=e?.contextType??o;return r&&s?r.get(s):void 0}async joinContextGroup({contextGroupId:e,target:t},n){if(this.wire.sendAction("interop-broker-join-context-group").catch((e=>{})),this.sessionContextGroupMap.has(e))throw new Error(l.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup);if(t){i.hasEndpointId(t)&&await this.addClientToContextGroup({contextGroupId:e},t);try{const n=this.channel.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name));if(!n.length)throw new Error(`Given Identity ${t.uuid} ${t.name} is not connected to the Interop Broker.`);n.length>1&&console.warn(`More than one connection found for identity ${t.uuid} ${t.name}`);const i=[];for(const t of n)i.push(this.addClientToContextGroup({contextGroupId:e},t));await Promise.all(i)}catch(e){throw new Error(e)}}else await this.addClientToContextGroup({contextGroupId:e},n)}async addClientToContextGroup({contextGroupId:e},t){this.wire.sendAction("interop-broker-add-client-to-context-group").catch((e=>{}));const n=this.getClientState(t);if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(!this.getContextGroups().find((t=>t.id===e)))throw new Error(`Attempting to join a context group that does not exist: ${e}. You may only join existing context groups.`);if(n.contextGroupId!==e){n.contextGroupId=e,await this.setCurrentContextGroupInClientOptions(t,e);const i=this.contextGroupsById.get(e);for(const[,e]of n.contextHandlers){const{contextType:n,handlerId:r}=e;if(void 0===n)i.forEach(((e,n)=>{this.invokeContextHandler(t,r,e)}));else if(i.has(n)){const e=i.get(n);e&&this.invokeContextHandler(t,r,e)}}}}async removeFromContextGroup({target:e},t){if(this.wire.sendAction("interop-broker-remove-from-context-group").catch((e=>{})),e){i.hasEndpointId(e)&&await this.removeClientFromContextGroup(e);try{const t=this.channel.connections.filter((t=>t.uuid===e.uuid&&t.name===e.name));if(!t.length)throw new Error(`No connection found for given Identity ${e.uuid} ${e.name}`);t.length>1&&console.warn(`More than one connection found for identity ${e.uuid} ${e.name}`);const n=[];for(const e of t)n.push(this.removeClientFromContextGroup(e));await Promise.all(n)}catch(e){throw new Error(e)}}else await this.removeClientFromContextGroup(t)}async removeClientFromContextGroup(e){this.wire.sendAction("interop-broker-remove-client-from-context-group").catch((e=>{}));const t=this.getClientState(e);t&&(t.contextGroupId=void 0),await this.setCurrentContextGroupInClientOptions(e,null)}getContextGroups(){return this.wire.sendAction("interop-broker-get-context-groups").catch((e=>{})),o(this,t,"f").map((e=>({...e})))}getInfoForContextGroup({contextGroupId:e}){return this.wire.sendAction("interop-broker-get-info-for-context-group").catch((e=>{})),this.getContextGroups().find((t=>t.id===e))}getAllClientsInContextGroup({contextGroupId:e}){this.wire.sendAction("interop-broker-get-all-clients-in-context-group").catch((e=>{}));return Array.from(this.interopClients.values()).filter((t=>t.contextGroupId===e)).map((e=>e.clientIdentity))}async handleFiredIntent(e,t){const n=(0,l.generateOverrideWarning)("fdc3.raiseIntent","InteropBroker.handleFiredIntent",t,"interopClient.fireIntent");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntent)}async setIntentTarget(e,t){this.wire.sendAction("interop-broker-set-intent-target").catch((e=>{}));const n=this.intentClientMap.get(t.name),i=`intent-handler-${e.name}`;if(n){const t=n.get(i);if(t){if(t.pendingIntents.push(e),t.clientIdentity&&t.isReady){const{clientIdentity:e,pendingIntents:n}=t;try{const r=n[n.length-1];await this.invokeIntentHandler(e,i,r),t.pendingIntents=[]}catch(n){console.error(`Error invoking intent handler for client ${e.uuid}/${e.name}/${e.endpointId}`),t.isReady=!1}}}else n.set(i,{isReady:!1,pendingIntents:[e]})}else{this.intentClientMap.set(t.name,new Map);const n=this.intentClientMap.get(t.name);n&&n.set(i,{isReady:!1,pendingIntents:[e]})}}async handleInfoForIntent(e,t){const n=(0,l.generateOverrideWarning)("fdc3.findIntent","InteropBroker.handleInfoForIntent",t,"interopClient.getInfoForIntent");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntent)}async handleInfoForIntentsByContext(e,t){const n=(0,l.generateOverrideWarning)("fdc3.findIntentsByContext","InteropBroker.handleInfoForIntentsByContext",t,"interopClient.getInfoForIntentsByContext");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntentsByContext)}async handleFiredIntentForContext(e,t){const n=(0,l.generateOverrideWarning)("fdc3.raiseIntentForContext","InteropBroker.handleFiredIntentForContext",t,"interopClient.fireIntentForContext");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntentForContext)}async clientDisconnected(e){}async fdc3HandleOpen({app:e,context:t},n){const i=(0,l.generateOverrideWarning)("fdc3.open","InteropBroker.fdc3HandleOpen",n);throw console.warn(i),new Error(l.BROKER_ERRORS.fdc3Open)}async fdc3HandleFindInstances(e,t){const n=(0,l.generateOverrideWarning)("fdc3.open","InteropBroker.fdc3HandleFindInstances",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3FindInstances)}async fdc3HandleGetAppMetadata(e,t){const n=(0,l.generateOverrideWarning)("fdc3.getAppMetadata","InteropBroker.fdc3HandleGetAppMetadata",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3GetAppMetadata)}async invokeContextHandler(e,t,n){const i=await this.getProvider();try{await i.dispatch(e,t,n)}catch(i){console.error(`Error invoking context handler ${t} for context type ${n.type} in client ${e.uuid}/${e.name}/${e.endpointId}`,i)}}async invokeIntentHandler(e,t,n){const i=await this.getProvider();await i.dispatch(e,t,n)}async fdc3HandleGetInfo(t,n){const{fdc3Version:i}=t;return{fdc3Version:i,...o(this,e,"f"),optionalFeatures:{OriginatingAppMetadata:!1,UserChannelMembershipAPIs:!0},appMetadata:{appId:"",instanceId:""}}}async getAllClientInfo(){return(await this.getProvider()).getAllClientInfo()}decorateSnapshot(e){return{...e,interopSnapshotDetails:{contextGroupStates:this.getContextGroupStates()}}}applySnapshot(e,t){const n=e?.interopSnapshotDetails?.contextGroupStates;n&&(t?.closeExistingWindows||this.updateExistingClients(n),this.rehydrateContextGroupStates(n))}updateExistingClients(e){this.interopClients.forEach((t=>{const{clientIdentity:n,contextGroupId:r,contextHandlers:o}=t;if(r){const t=e[r];for(const[,e]of Object.entries(t))o.forEach((t=>{const{handlerId:r,contextType:o}=t;i.isContextTypeCompatible(e.type,o)&&this.invokeContextHandler(n,r,e)}))}}))}getContextGroupStates(){return i.toObject(this.contextGroupsById)}rehydrateContextGroupStates(e){const t=Object.entries(e);for(const[e,n]of t){const t=Object.entries(n);for(const[n,i]of t)if(this.contextGroupsById.has(e)){this.contextGroupsById.get(e).set(n,i)}else console.warn(`Attempting to set a context group that isn't in the context group mapping. Skipping context group rehydration for: ${e}`)}}contextHandlerRegistered({contextType:e,handlerId:t},n){const i={contextType:e,handlerId:t},r=this.getClientState(n);if(r?.contextHandlers.set(t,i),r&&r.contextGroupId){const{contextGroupId:i}=r,o=this.contextGroupsById.get(i);if(void 0===e)o.forEach(((e,i)=>{this.invokeContextHandler(n,t,e)}));else if(o.has(e)){const i=o.get(e);i&&this.invokeContextHandler(n,t,i)}}}async intentHandlerRegistered(e,t){const{handlerId:n}=e,i=this.intentClientMap.get(t.name),r=i?.get(n);if(i)if(r){const{pendingIntents:e}=r;r.clientIdentity=t,r.isReady=!0;try{if(e.length>0){const i=e[e.length-1];await this.invokeIntentHandler(t,n,i),r.pendingIntents=[]}}catch(e){console.error(`Error invoking intent handler: ${n} for client ${t.uuid}/${t.name}/${t.endpointId}`)}}else i.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t});else{this.intentClientMap.set(t.name,new Map);const e=this.intentClientMap.get(t.name);e&&e.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t})}}removeContextHandler({handlerId:e},t){const n=this.getClientState(t);n&&n.contextHandlers.delete(e)}handleJoinSessionContextGroup({sessionContextGroupId:e},t){try{if(!e)throw new Error("Failed to join session context group: must specify group id.");const n=this.sessionContextGroupMap.get(e);if(n)n.registerNewClient(t);else{const n=new h.default(this.channel,e);n.registerNewClient(t),this.sessionContextGroupMap.set(e,n)}return{hasConflict:this.contextGroupsById.has(e)}}catch(e){throw new Error(e)}}getClientState(e){return this.interopClients.get(e.endpointId)}static toObject(e){const t=Object.fromEntries(e),n={};return Object.entries(t).forEach((([e,t])=>{const i=Object.fromEntries(t);n[e]=i})),n}static checkContextIntegrity(e){if(!e)return{isValid:!1,reason:"No context supplied"};if("object"!=typeof e)return{isValid:!1,reason:"Context must be an Object"};if(!e.type)return{isValid:!1,reason:"Context must have a type property"};if(e.id&&"object"!=typeof e.id)return{isValid:!1,reason:"Context id must be an Object populated with key-value identifiers (if set)"};if(e.id){const{id:t}=e,n=Object.keys(t);let i=!1;if(!n.length)return{isValid:!1,reason:"Context id must have at least one key-value identifier"};if(n.forEach((e=>{"string"==typeof e&&"string"==typeof t[e]||(i=!0)})),i)return{isValid:!1,reason:"Context id key-value identifiers must be of type string"}}return e.name&&"string"!=typeof e.name?{isValid:!1,reason:"Context name must be of string type (if set)"}:{isValid:!0}}static hasEndpointId(e){return void 0!==e.endpointId}static isContextTypeCompatible(e,t){return void 0===t||e===t}setContextGroupMap(){for(const e of this.getContextGroups())this.contextGroupsById.set(e.id,new Map)}async setCurrentContextGroupInClientOptions(e,t){try{const n=await this.fin.System.getEntityInfo(e.uuid,e.name);let i;"view"===n.entityType?i=await this.fin.View.wrap(e):"window"===n.entityType&&(i=await this.fin.Window.wrap(e)),i&&await i.updateOptions({interop:{currentContextGroup:t}})}catch(e){}}async setupChannelProvider(){try{const e=await this.getProvider();this.channel=e,this.wireChannel(e)}catch(e){throw new Error(`Error setting up Interop Broker Channel Provider: ${e}`)}}wireChannel(e){e.onConnection((async(e,t)=>{if(!await this.isConnectionAuthorized(e,t))throw new Error(`Connection not authorized for ${e.uuid}, ${e.name}`);if(!e.endpointId)throw new Error("Version too old to be compatible with Interop. Please upgrade your runtime to a more recent version.");const n={contextGroupId:void 0,contextHandlers:new Map,clientIdentity:e};t?.currentContextGroup&&this.contextGroupsById.has(t.currentContextGroup)&&(n.contextGroupId=t?.currentContextGroup),this.interopClients.set(e.endpointId,n)})),e.onDisconnection((e=>{this.interopClients.delete(e.endpointId);const t=this.intentClientMap.get(e.name);t&&e.uuid===this.fin.me.uuid&&t.forEach((e=>{e.isReady=!1})),this.sessionContextGroupMap.forEach((t=>{t.onDisconnection(e)})),this.clientDisconnected(e)})),e.beforeAction((async(e,t,n)=>{if(!await this.isActionAuthorized(e,t,n))throw new Error(`Action (${e}) not authorized for ${n.uuid}, ${n.name}`);this.logging?.beforeAction?.enabled&&console.log(e,t,n)})),e.afterAction(((e,t,n)=>{this.logging?.afterAction?.enabled&&console.log(e,t,n)})),e.register("setContext",this.setContext.bind(this)),e.register("fireIntent",this.handleFiredIntent.bind(this)),e.register("getCurrentContext",this.getCurrentContext.bind(this)),e.register("getInfoForIntent",this.handleInfoForIntent.bind(this)),e.register("getInfoForIntentsByContext",this.handleInfoForIntentsByContext.bind(this)),e.register("fireIntentForContext",this.handleFiredIntentForContext.bind(this)),e.register("getContextGroups",this.getContextGroups.bind(this)),e.register("joinContextGroup",this.joinContextGroup.bind(this)),e.register("removeFromContextGroup",this.removeFromContextGroup.bind(this)),e.register("getAllClientsInContextGroup",this.getAllClientsInContextGroup.bind(this)),e.register("getInfoForContextGroup",this.getInfoForContextGroup.bind(this)),e.register("contextHandlerRegistered",this.contextHandlerRegistered.bind(this)),e.register("intentHandlerRegistered",this.intentHandlerRegistered.bind(this)),e.register("removeContextHandler",this.removeContextHandler.bind(this)),e.register("sessionContextGroup:createIfNeeded",this.handleJoinSessionContextGroup.bind(this)),e.register("fdc3Open",this.fdc3HandleOpen.bind(this)),e.register("fdc3v2FindIntentsByContext",this.handleInfoForIntentsByContext.bind(this)),e.register("fdc3FindInstances",this.fdc3HandleFindInstances.bind(this)),e.register("fdc3GetAppMetadata",this.fdc3HandleGetAppMetadata.bind(this)),e.register("fdc3v2GetInfo",(async(e,t)=>this.fdc3HandleGetInfo.bind(this)(e,t))),e.register("createPrivateChannelProvider",(async e=>{const{channelId:t}=e,n=await this.fin.InterApplicationBus.Channel.create(t);p.PrivateChannelProvider.init(n,t)}))}isConnectionAuthorized(e,t){return this.wire.sendAction("interop-broker-is-connection-authorized").catch((e=>{})),Promise.resolve(!0)}isActionAuthorized(e,t,n){return this.wire.sendAction("interop-broker-is-action-authorized").catch((e=>{})),Promise.resolve(!0)}};return Gi.InteropBroker=f,e=new WeakMap,t=new WeakMap,n=new WeakMap,Gi}var zi,Ki={},qi={},Ji=s&&s.__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},Yi=s&&s.__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)};Object.defineProperty(qi,"__esModule",{value:!0});const Zi=d,Qi=Hi;class Xi extends Zi.Base{constructor(e,t,n){super(e),zi.set(this,void 0),this.id=n,Ji(this,zi,t,"f")}async setContext(e){this.wire.sendAction("interop-session-context-group-set-context").catch((e=>{}));return(await Yi(this,zi,"f")).dispatch(`sessionContextGroup:setContext-${this.id}`,{sessionContextGroupId:this.id,context:e})}async getCurrentContext(e){this.wire.sendAction("interop-session-context-group-get-context").catch((e=>{}));return(await Yi(this,zi,"f")).dispatch(`sessionContextGroup:getContext-${this.id}`,{sessionContextGroupId:this.id,type:e})}async addContextHandler(e,t){if(this.wire.sendAction("interop-session-context-group-add-handler").catch((e=>{})),"function"!=typeof e)throw new Error("Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");const n=await Yi(this,zi,"f");let i;return i=t?`sessionContextHandler:invoke-${this.id}-${t}-${(0,Qi.generateId)()}`:`sessionContextHandler:invoke-${this.id}`,n.register(i,(0,Qi.wrapContextHandler)(e,i)),await n.dispatch(`sessionContextGroup:handlerAdded-${this.id}`,{handlerId:i,contextType:t}),{unsubscribe:await this.createUnsubscribeCb(i)}}async createUnsubscribeCb(e){const t=await Yi(this,zi,"f");return async()=>{t.remove(e),await t.dispatch(`sessionContextGroup:handlerRemoved-${this.id}`,{handlerId:e})}}getUserInstance(){return{id:this.id,setContext:(0,Qi.wrapInTryCatch)(this.setContext.bind(this),"Failed to set context: "),getCurrentContext:(0,Qi.wrapInTryCatch)(this.getCurrentContext.bind(this),"Failed to get context: "),addContextHandler:(0,Qi.wrapInTryCatch)(this.addContextHandler.bind(this),"Failed to add context handler: ")}}}qi.default=Xi,zi=new WeakMap;var er={},tr={},nr={},ir={},rr=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),or=s&&s.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),sr=s&&s.__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)&&rr(t,e,n);return or(t,e),t};Object.defineProperty(ir,"__esModule",{value:!0}),ir.PrivateChannelClient=void 0;const ar=sr(Hi);var cr,dr;function hr(){if(cr)return tr;cr=1;var e,t=s&&s.__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)},n=s&&s.__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},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(tr,"__esModule",{value:!0}),tr.FDC3ModuleBase=void 0;const o=nr,a=Hi,c=wr(),d=r(i);return tr.FDC3ModuleBase=class{get client(){return t(this,e,"f").call(this)}get fin(){return this.wire.getFin()}constructor(t,i){this.wire=i,e.set(this,void 0),n(this,e,t,"f")}async broadcast(e){return this.wire.sendAction("fdc3-broadcast").catch((e=>{})),this.client.setContext(e)}async _open(e,t){this.wire.sendAction("fdc3-open").catch((e=>{}));try{return await c.InteropClient.ferryFdc3Call(this.client,"fdc3Open",{app:e,context:t})}catch(e){const t=e.message===a.BROKER_ERRORS.fdc3Open?"ResolverUnavailable":e.message;throw new Error(t)}}async _getChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:"system",...(0,o.getUnsupportedChannelApis)()})))}async getOrCreateChannel(e){this.wire.sendAction("fdc3-get-or-create-channel").catch((e=>{}));const t=(await this._getChannels()).find((t=>t.id===e));if(t)return{...t,type:"system",...(0,o.getUnsupportedChannelApis)()};try{const t=await this.client.joinSessionContextGroup(e);return(0,o.buildAppChannelObject)(t)}catch(e){throw console.error(e.message),new Error(o.ChannelError.CreationFailed)}}async getSystemChannels(){return this.wire.sendAction("fdc3-get-system-channels").catch((e=>{})),this._getChannels()}async joinChannel(e){this.wire.sendAction("fdc3-join-channel").catch((e=>{}));try{return await this.client.joinContextGroup(e)}catch(e){if(e.message===a.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup?console.error("The Channel you have tried to join is an App Channel. Custom Channels can only be defined by the Interop Broker through code or manifest configuration. Please use getOrCreateChannel."):console.error(e.message),e.message.startsWith("Attempting to join a context group that does not exist"))throw new Error(o.ChannelError.NoChannelFound);throw new Error(o.ChannelError.AccessDenied)}}async getCurrentChannel(){this.wire.sendAction("fdc3-get-current-channel").catch((e=>{}));const e=await this.getCurrentContextGroupInfo();return e?this.buildChannelObject(e):null}async leaveCurrentChannel(){return this.wire.sendAction("fdc3-leave-current-channel").catch((e=>{})),this.client.removeFromContextGroup()}async getCurrentContextGroupInfo(){const e=await this.client.getContextGroups(),t=e.map((async e=>this.client.getAllClientsInContextGroup(e.id))),n=(await Promise.all(t)).findIndex((e=>e.some((e=>{const{uuid:t,name:n}=e;return this.wire.me.uuid===t&&this.wire.me.name===n}))));return e[n]}async buildChannelObject(e){return{...e,type:"system",addContextListener:(...[e,t])=>{let n,i;"function"==typeof e?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),n=e):(n=t,"string"==typeof e&&(i=e));const r=(async()=>{let e=!0;const t=await this.client.getCurrentContext(i);return this.client.addContextHandler(((i,r)=>{if(!e||(e=!1,!(0,d.default)(t,i)))return n(i,r)}),i)})();return{...r,unsubscribe:()=>r.then((e=>e.unsubscribe()))}},broadcast:this.broadcast.bind(this),getCurrentContext:async e=>{const t=await this.client.getCurrentContext(e);return void 0===t?null:t}}}},e=new WeakMap,tr}ir.PrivateChannelClient=class{constructor(e,t){this.id=t,this.client=e,this.listeners=new Map}async broadcast(e){return this.client.dispatch("broadcast",{context:e})}async getCurrentContext(e){return this.client.dispatch("getCurrentContext",{contextType:e})}async addContextListener(e,t){if("function"!=typeof t)throw new Error("Non-function argument passed to the second parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");let n;n=e?`contextHandler:invoke-${this.id}-${e}-${ar.generateId()}`:`contextHandler:invoke-${this.id}-${ar.generateId()}`,this.client.register(n,ar.wrapContextHandler(t,n));const i={unsubscribe:await this.createContextUnsubscribeCb(n)};return this.listeners.set(n,i),await this.client.dispatch("contextHandlerAdded",{handlerId:n,contextType:e}),i}createNonStandardUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch("nonStandardHandlerRemoved",{handlerId:e})}}createContextUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch("contextHandlerRemoved",{handlerId:e})}}onAddContextListener(e){const t=`onContextHandlerAdded:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch("onAddContextHandlerAdded",{handlerId:t}),n}onDisconnect(e){const t=`onDisconnect:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch("onDisconnectHandlerAdded",{handlerId:t}),n}onUnsubscribe(e){const t=`onUnsubscribe:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch("onUnsubscribeHandlerAdded",{handlerId:t}),n}async cleanUpAllSubs(){Array.from(this.listeners.keys()).forEach((e=>{this.client.remove(e),this.listeners.delete(e)}))}async disconnect(){try{await this.client.dispatch("clientDisconnecting"),await this.cleanUpAllSubs(),await this.client.disconnect()}catch(e){throw new Error(e.message)}}},function(e){var t=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.getIntentResolution=e.isChannel=e.isContext=e.connectPrivateChannel=e.buildAppChannelObject=e.buildPrivateChannelObject=e.ChannelError=e.ResultError=e.UnsupportedChannelApiError=e.getUnsupportedChannelApis=void 0;const n=Hi,r=ir,o=t(i);e.getUnsupportedChannelApis=e=>({addContextListener:()=>{throw new a("Channel.addContextListener",e)},broadcast:()=>{throw new a("Channel.broadcast",e)},getCurrentContext:()=>{throw new a("Channel.getCurrentContext",e)}});class a extends Error{constructor(e,t="System"){super(e),this.message=`Calling ${e} on an instance of a ${t} Channel returned by fdc3.get${t}Channels is not supported. If you would like to use a ${t} Channel, please use fdc3.joinChannel, fdc3.addContextListener, and fdc3.broadcast instead.`}}var c,d;e.UnsupportedChannelApiError=a,function(e){e.NoResultReturned="NoResultReturned",e.IntentHandlerRejected="IntentHandlerRejected"}(c=e.ResultError||(e.ResultError={})),(d=e.ChannelError||(e.ChannelError={})).NoChannelFound="NoChannelFound",d.AccessDenied="AccessDenied",d.CreationFailed="CreationFailed";e.buildPrivateChannelObject=e=>{let t=!1;const n=()=>{if(t)throw new Error("Private Channel Client has been disconnected from the Private Channel")};return{id:e.id,type:"private",broadcast:async t=>(n(),e.broadcast(t)),getCurrentContext:async t=>(n(),e.getCurrentContext(t)),addContextListener:async(t,i)=>{n();let r=i,o=t;"function"==typeof t&&(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),r=t,o=null);return e.addContextListener(o,r)},onAddContextListener:t=>(n(),e.onAddContextListener(t)),disconnect:async()=>(n(),t=!0,e.disconnect()),onDisconnect:t=>(n(),e.onDisconnect(t)),onUnsubscribe:t=>(n(),e.onUnsubscribe(t))}};e.buildAppChannelObject=e=>({id:e.id,type:"app",broadcast:e.setContext,getCurrentContext:async t=>{const n=await e.getCurrentContext(t);return void 0===n?null:n},addContextListener:(t,n)=>{let i,r;"function"==typeof t?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),i=t):(i=n,"string"==typeof t&&(r=t));const s=(async()=>{let t=!0;const n=await e.getCurrentContext(r);return e.addContextHandler(((e,r)=>{if(!t||(t=!1,!(0,o.default)(n,e)))return i(e,r)}),r)})();return{...s,unsubscribe:()=>s.then((e=>e.unsubscribe()))}}});e.connectPrivateChannel=async t=>{try{const n=await fin.InterApplicationBus.Channel.connect(t),i=new r.PrivateChannelClient(n,t);return(0,e.buildPrivateChannelObject)(i)}catch(e){throw new Error(`Private Channel with id: ${t} doesn't exist`)}};e.isContext=e=>{if(e&&"object"==typeof e&&"type"in e){const{type:t}=e;return"string"==typeof t}return!1};e.isChannel=e=>{if(e&&"object"==typeof e&&"type"in e&&"id"in e){const{type:t,id:n}=e;return"string"==typeof t&&"string"==typeof n&&("app"===t||"private"===t)}return!1};e.getIntentResolution=async(t,i,r,o)=>{const s=(0,n.generateId)(),a=new Promise(((e,t)=>{fin.InterApplicationBus.subscribe({uuid:"*"},s,(t=>{e(t)})).catch((()=>t(new Error("getResult is not supported in this environment"))))})),d=r?{target:r,intentResolutionResultId:s}:{intentResolutionResultId:s},h=o?{name:o,context:i,metadata:d}:{...i,metadata:d},l=async()=>{let n=await a;if(!n||"object"!=typeof n)throw new Error(c.NoResultReturned);const{error:i}=n;if(i)throw new Error(c.IntentHandlerRejected);if((0,e.isChannel)(n)){const{id:i,type:r}=n;switch(r){case"private":n=await(0,e.connectPrivateChannel)(i);break;case"app":{const r=await t.joinSessionContextGroup(i);n=(0,e.buildAppChannelObject)(r);break}}}else if(!(0,e.isContext)(n))throw new Error(c.NoResultReturned);return n},u=o?await t.fireIntent(h):await t.fireIntentForContext(h);return"object"!=typeof u?{source:{appId:"",instanceId:""},intent:"",version:"2.0",getResult:l}:{...u,getResult:l}}}(nr);var lr,ur,pr={};function wr(){if(ur)return Ki;ur=1;var e,t,n=s&&s.__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},i=s&&s.__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)},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ki,"__esModule",{value:!0}),Ki.InteropClient=void 0;const o=d,a=r(qi),c=function(){if(dr)return er;dr=1,Object.defineProperty(er,"__esModule",{value:!0}),er.Fdc3Module=void 0;const e=Hi,t=hr();class n extends t.FDC3ModuleBase{async open(e,t){await super._open(e,t)}addContextListener(e,t){let n;return this.wire.sendAction("fdc3-add-context-listener").catch((e=>{})),"function"==typeof e?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),n=this.client.addContextHandler(e)):n=this.client.addContextHandler(t,null===e?void 0:e),{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}addIntentListener(e,t){this.wire.sendAction("fdc3-add-intent-listener").catch((e=>{}));const n=this.client.registerIntentHandler((e=>{const{context:n,metadata:i}=e,{metadata:r}=n,o=i?.intentResolutionResultId||r?.intentResolutionResultId;o&&this.fin.InterApplicationBus.publish(o,null).catch((()=>null)),t(e.context)}),e,{fdc3Version:"1.2"});return{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}async raiseIntent(t,n,i){this.wire.sendAction("fdc3-raise-intent").catch((e=>{}));const r=i?{name:t,context:n,metadata:{target:i}}:{name:t,context:n};try{return await this.client.fireIntent(r)}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntent?"ResolverUnavailable":t.message;throw new Error(n)}}async findIntent(t,n){this.wire.sendAction("fdc3-find-intent").catch((e=>{}));try{return await this.client.getInfoForIntent({name:t,context:n})}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntent?"ResolverUnavailable":t.message;throw new Error(n)}}async findIntentsByContext(t){this.wire.sendAction("fdc3-find-intents-by-context").catch((e=>{}));try{return await this.client.getInfoForIntentsByContext(t)}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntentsByContext?"ResolverUnavailable":t.message;throw new Error(n)}}async raiseIntentForContext(t,n){this.wire.sendAction("fdc3-raise-intent-for-context").catch((e=>{}));try{return await this.client.fireIntentForContext({...t,metadata:{target:n}})}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntentForContext?"ResolverUnavailable":t.message;throw new Error(n)}}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}getInfo(){return this.wire.sendAction("fdc3-get-info").catch((e=>{})),{providerVersion:this.wire.environment.getAdapterVersionSync(),provider:`openfin-${this.wire.me.uuid}`,fdc3Version:"1.2"}}}return er.Fdc3Module=n,er}(),h=function(){if(lr)return pr;lr=1,Object.defineProperty(pr,"__esModule",{value:!0}),pr.Fdc3Module2=void 0;const e=hr(),t=Hi,n=wr(),i=nr,r=ir;class o extends e.FDC3ModuleBase{async open(e,t){return"string"==typeof e&&console.warn("Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string })."),super._open(e,t)}async findInstances(e){this.wire.sendAction("fdc3-find-instances").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,"fdc3FindInstances",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3FindInstances?"ResolverUnavailable":e.message;throw new Error(n)}}async getAppMetadata(e){this.wire.sendAction("fdc3-get-app-metadata").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,"fdc3GetAppMetadata",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3GetAppMetadata?"ResolverUnavailable":e.message;throw new Error(n)}}async addContextListener(e,t){this.wire.sendAction("fdc3-add-context-listener").catch((e=>{}));const n=e=>t=>{const{contextMetadata:n,...i}=t,r=n?[{...i},n]:[t,null];e(...r)};let i=t,r=n(i);return"function"==typeof e?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),i=e,r=n(i),this.client.addContextHandler(r)):this.client.addContextHandler(r,null===e?void 0:e)}async findIntent(e,n,i){this.wire.sendAction("fdc3-find-intent").catch((e=>{}));try{return await this.client.getInfoForIntent({name:e,context:n,metadata:{resultType:i}})}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntent?"ResolverUnavailable":e.message;throw new Error(n)}}async findIntentsByContext(e,i){this.wire.sendAction("fdc3-find-intents-by-context").catch((e=>{}));const r=i?{context:e,metadata:{resultType:i}}:e;try{return await n.InteropClient.ferryFdc3Call(this.client,"fdc3v2FindIntentsByContext",r)}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntentsByContext?"ResolverUnavailable":e.message;throw new Error(n)}}async raiseIntent(e,n,r){this.wire.sendAction("fdc3-raise-intent").catch((e=>{}));try{return"string"==typeof r&&console.warn("Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string })."),(0,i.getIntentResolution)(this.client,n,r,e)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?"ResolverUnavailable":e.message;throw new Error(n)}}async raiseIntentForContext(e,n){this.wire.sendAction("fdc3-raise-intent-for-context").catch((e=>{}));try{return"string"==typeof n&&console.warn("Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string })."),(0,i.getIntentResolution)(this.client,e,n)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?"ResolverUnavailable":e.message;throw new Error(n)}}async addIntentListener(e,t){if(this.wire.sendAction("fdc3-add-intent-listener").catch((e=>{})),"string"!=typeof e)throw new Error("First argument must be an Intent name");return this.client.registerIntentHandler((async e=>{let n,i;const{context:r,metadata:o}=e,{contextMetadata:s,metadata:a,...c}=r,d=o?.intentResolutionResultId||a?.intentResolutionResultId;try{const e=a?{metadata:a,...c}:{...c};n=await t(e,s),i=n}catch(e){n=e,i={error:!0}}if(d&&this.fin.InterApplicationBus.publish(d,i).catch((()=>null)),n instanceof Error)throw new Error(n.message);return n}),e,{fdc3Version:"2.0"})}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}async createPrivateChannel(){const e=(0,t.generateId)();await n.InteropClient.ferryFdc3Call(this.client,"createPrivateChannelProvider",{channelId:e});const o=await this.fin.InterApplicationBus.Channel.connect(e),s=new r.PrivateChannelClient(o,e);return(0,i.buildPrivateChannelObject)(s)}async getUserChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:"user",...(0,i.getUnsupportedChannelApis)("User")})))}async getSystemChannels(){return console.warn("This API has been deprecated. Please use fdc3.getUserChannels instead."),super.getSystemChannels()}async joinUserChannel(e){return super.joinChannel(e)}async joinChannel(e){return console.warn("This API has been deprecated. Please use fdc3.joinUserChannel instead."),super.joinChannel(e)}async getCurrentChannel(){const e=await super.getCurrentChannel();return e?{...e,type:"user",broadcast:this.broadcast.bind(this)}:null}async getInfo(){return n.InteropClient.ferryFdc3Call(this.client,"fdc3v2GetInfo",{fdc3Version:"2.0"})}}return pr.Fdc3Module2=o,pr}(),l=Hi;let u=class extends o.Base{constructor(i,r){super(i),e.set(this,void 0),t.set(this,void 0),n(this,t,new Map,"f"),n(this,e,r,"f")}async setContext(t){this.wire.sendAction("interop-client-set-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("setContext",{context:t})}async addContextHandler(t,n){if(this.wire.sendAction("interop-client-add-context-handler").catch((e=>{})),"function"!=typeof t)throw new Error("Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");const r=await i(this,e,"f");let o;o=n?`invokeContextHandler-${n}-${(0,l.generateId)()}`:"invokeContextHandler";const s=(0,l.wrapContextHandler)(t,o);return r.register(o,s),await r.dispatch("contextHandlerRegistered",{handlerId:o,contextType:n}),{unsubscribe:async()=>{r.remove(o),await r.dispatch("removeContextHandler",{handlerId:o})}}}async getContextGroups(){this.wire.sendAction("interop-client-get-context-groups").catch((e=>{}));return(await i(this,e,"f")).dispatch("getContextGroups")}async joinContextGroup(t,n){this.wire.sendAction("interop-client-join-context-group").catch((e=>{}));const r=await i(this,e,"f");if(!t)throw new Error("No contextGroupId specified for joinContextGroup.");return r.dispatch("joinContextGroup",{contextGroupId:t,target:n})}async removeFromContextGroup(t){this.wire.sendAction("interop-client-remove-from-context-group").catch((e=>{}));return(await i(this,e,"f")).dispatch("removeFromContextGroup",{target:t})}async getAllClientsInContextGroup(t){this.wire.sendAction("interop-client-get-all-clients-in-context-group").catch((e=>{}));const n=await i(this,e,"f");if(!t)throw new Error("No contextGroupId specified for getAllClientsInContextGroup.");return n.dispatch("getAllClientsInContextGroup",{contextGroupId:t})}async getInfoForContextGroup(t){this.wire.sendAction("interop-client-get-info-for-context-group").catch((e=>{}));const n=await i(this,e,"f");if(!t)throw new Error("No contextGroupId specified for getInfoForContextGroup.");return n.dispatch("getInfoForContextGroup",{contextGroupId:t})}async fireIntent(t){this.wire.sendAction("interop-client-fire-intent").catch((e=>{}));return(await i(this,e,"f")).dispatch("fireIntent",t)}async registerIntentHandler(t,n,r){this.wire.sendAction("interop-client-register-intent-handler").catch((e=>{}));const o=await i(this,e,"f"),s=`intent-handler-${n}`,a=(0,l.wrapIntentHandler)(t,s);try{await o.register(s,a),await o.dispatch("intentHandlerRegistered",{handlerId:s,...r})}catch(e){throw new Error("Unable to register intent handler")}return{unsubscribe:async()=>{o.remove(s)}}}async getCurrentContext(t){this.wire.sendAction("interop-client-get-current-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("getCurrentContext",{contextType:t})}async getInfoForIntent(t){this.wire.sendAction("interop-client-get-info-for-intent").catch((e=>{}));return(await i(this,e,"f")).dispatch("getInfoForIntent",t)}async getInfoForIntentsByContext(t){this.wire.sendAction("interop-client-get-info-for-intents-by-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("getInfoForIntentsByContext",t)}async fireIntentForContext(t){this.wire.sendAction("interop-client-fire-intent-for-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("fireIntentForContext",t)}async joinSessionContextGroup(n){try{const r=i(this,t,"f").get(n);if(r)return r.getUserInstance();const o=await i(this,e,"f"),{hasConflict:s}=await o.dispatch("sessionContextGroup:createIfNeeded",{sessionContextGroupId:n});s&&console.warn(`A (non-session) context group with the name "${n}" already exists. If you are trying to join a Context Group, call joinContextGroup instead.`);const c=new a.default(this.wire,i(this,e,"f"),n);return i(this,t,"f").set(n,c),c.getUserInstance()}catch(e){throw console.error(`Error thrown trying to create Session Context Group with id "${n}": ${e}`),e}}async onDisconnection(t){this.wire.sendAction("interop-client-add-ondisconnection-listener").catch((e=>{}));return(await i(this,e,"f")).onDisconnection((e=>{const{uuid:n}=e;t({type:"interop-broker",topic:"disconnected",brokerName:n})}))}getFDC3Sync(e){switch(e){case"1.2":return new c.Fdc3Module((()=>this),this.wire);case"2.0":return new h.Fdc3Module2((()=>this),this.wire);default:throw new Error(`Invalid FDC3 version provided: ${e}. Must be '1.2' or '2.0'`)}}async getFDC3(e){return this.getFDC3Sync(e)}static async ferryFdc3Call(t,n,r){return(await i(t,e,"f")).dispatch(n,r||null)}};return Ki.InteropClient=u,e=new WeakMap,t=new WeakMap,Ki}var yr,fr,gr,mr={};function vr(){if(yr)return mr;yr=1,Object.defineProperty(mr,"__esModule",{value:!0}),mr.overrideCheck=mr.checkFDC32Overrides=mr.getDefaultViewFdc3VersionFromAppInfo=void 0;const e=Vi();function t(t){return["fdc3HandleFindInstances","handleInfoForIntent","handleInfoForIntentsByContext","fdc3HandleGetAppMetadata","fdc3HandleGetInfo","fdc3HandleOpen","handleFiredIntent","handleFiredIntentForContext"].filter((n=>t[n]===e.InteropBroker.prototype[n]))}return mr.getDefaultViewFdc3VersionFromAppInfo=function({manifest:e,initialOptions:t}){const n=e?.platform?.defaultViewOptions?.fdc3InteropApi??t.defaultViewOptions?.fdc3InteropApi;return["1.2","2.0"].includes(n??"")?n:void 0},mr.checkFDC32Overrides=t,mr.overrideCheck=function(e,n){if(n&&"2.0"===n){const n=t(e);n.length>0&&console.warn(`WARNING: FDC3 2.0 has been set as a default option for Views in this Platform, but the required InteropBroker APIs for FDC3 2.0 compliance have not all been overridden.\nThe following APIs need to be overridden:\n${n.join("\n")}`)}},mr}function Cr(){return gr||(gr=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),i=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),i(function(){if(fr)return Ti;fr=1;var e=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ti,"__esModule",{value:!0}),Ti.InteropModule=void 0;const t=e(n),i=$i,r=d,o=Vi(),a=wr(),c=vr(),h=Tn,l=e=>new e,u="You have attempted to use or modify InteropBroker parameters, which is not allowed. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.";class p extends r.Base{async init(e,n=l){this.wire.sendAction("interop-init").catch((()=>{}));const r=await this.wire.environment.getInteropInfo(this.wire.getFin()),s=(0,i.createUnusableObject)(u),a=(0,i.createWarningObject)(u,(0,t.default)(r)),d=async()=>{throw new Error(u)},p=o.InteropBroker.createClosedConstructor(this.wire,(()=>this.fin.InterApplicationBus.Channel.create(`interop-broker-${e}`)),r);let w;return w=Array.isArray(n)?new((0,h.overrideFromComposables)(...n)(p))(s,d,a):await n(p,s,d,a),(0,c.overrideCheck)(w,r.fdc3Version),w}connectSync(e,t){return this.wire.sendAction("interop-connect-sync").catch((()=>{})),new a.InteropClient(this.wire,this.wire.environment.whenReady().then((()=>this.fin.InterApplicationBus.Channel.connect(`interop-broker-${e}`,{payload:t}))))}}return Ti.InteropModule=p,Ti}(),e),i(wr(),e),i(Vi(),e)}(Li)),Li}var br={},Ir={},Er={},xr={};Object.defineProperty(xr,"__esModule",{value:!0}),xr.getSnapshotSourceChannelName=void 0;xr.getSnapshotSourceChannelName=e=>`snapshot-source-provider-${e.uuid}`;var Ar,Pr,Mr,_r,Or,Sr=s&&s.__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},Rr=s&&s.__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)};Object.defineProperty(Er,"__esModule",{value:!0}),Er.SnapshotSource=void 0;const Fr=d,jr=xr,kr=new Map;class Lr extends Fr.Base{constructor(e,t){super(e),Ar.set(this,void 0),Pr.set(this,(()=>(kr.has(this.identity.uuid)||kr.set(this.identity.uuid,{eventFired:null,clientPromise:null}),kr.get(this.identity.uuid)))),Mr.set(this,(()=>(Rr(this,Pr,"f").call(this).clientPromise||(Rr(this,Pr,"f").call(this).clientPromise=Rr(this,_r,"f").call(this)),Rr(this,Pr,"f").call(this).clientPromise))),_r.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);try{Rr(this,Pr,"f").call(this).eventFired||await Rr(this,Or,"f").call(this);const t=await this.fin.InterApplicationBus.Channel.connect(e,{wait:!1});return t.onDisconnection((()=>{Rr(this,Pr,"f").call(this).clientPromise=null,Rr(this,Pr,"f").call(this).eventFired=null})),t}catch(e){throw Rr(this,Pr,"f").call(this).clientPromise=null,new Error("The targeted SnapshotSource is not currently initialized. Await this object's ready() method.")}})),Or.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);let t,n;const i=new Promise(((e,i)=>{t=e,n=i}));Rr(this,Pr,"f").call(this).eventFired=i;const r=async i=>{try{i.channelName===e&&(t(),await this.fin.InterApplicationBus.Channel.removeListener("connected",r))}catch(e){n(e)}};await this.fin.InterApplicationBus.Channel.on("connected",r)})),Sr(this,Ar,t,"f")}get identity(){return Rr(this,Ar,"f")}async ready(){this.wire.sendAction("snapshot-source-ready").catch((e=>{}));try{await Rr(this,Mr,"f").call(this)}catch(e){await Rr(this,Pr,"f").call(this).eventFired}}async getSnapshot(){this.wire.sendAction("snapshot-source-get-snapshot").catch((e=>{}));const e=await Rr(this,Mr,"f").call(this),t=await e.dispatch("get-snapshot");return(await t).snapshot}async applySnapshot(e){this.wire.sendAction("snapshot-source-apply-snapshot").catch((e=>{}));return(await Rr(this,Mr,"f").call(this)).dispatch("apply-snapshot",{snapshot:e})}}Er.SnapshotSource=Lr,Ar=new WeakMap,Pr=new WeakMap,Mr=new WeakMap,_r=new WeakMap,Or=new WeakMap,Object.defineProperty(Ir,"__esModule",{value:!0}),Ir.SnapshotSourceModule=void 0;const Tr=d,$r=Er,Br=xr;class Gr extends Tr.Base{async init(e){if(this.wire.sendAction("snapshot-source-init").catch((e=>{})),"object"!=typeof e||"function"!=typeof e.getSnapshot||"function"!=typeof e.applySnapshot)throw new Error("you must pass in a valid SnapshotProvider");const t=await this.fin.InterApplicationBus.Channel.create((0,Br.getSnapshotSourceChannelName)(this.fin.me));t.register("get-snapshot",(async()=>({snapshot:await e.getSnapshot()}))),t.register("apply-snapshot",(({snapshot:t})=>e.applySnapshot(t)))}wrapSync(e){return this.wire.sendAction("snapshot-source-wrap-sync").catch((e=>{})),new $r.SnapshotSource(this.wire,e)}async wrap(e){return this.wire.sendAction("snapshot-source-wrap").catch((e=>{})),this.wrapSync(e)}}Ir.SnapshotSourceModule=Gr,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Ir,e),n(Er,e)}(br),Object.defineProperty(a,"__esModule",{value:!0});var Wr=a.Fin=void 0;const Hr=t,Nr=c,Dr=ie(),Ur=Z(),Vr=de,zr=en,Kr=rn,qr=un,Jr=bn,Yr=J(),Zr=An,Qr=ki,Xr=Cr(),eo=br;class to extends Hr.EventEmitter{constructor(e){super(),this.wire=e,this.System=new Nr.System(e),this.Window=new Dr._WindowModule(e),this.Application=new Ur.ApplicationModule(e),this.InterApplicationBus=new Vr.InterApplicationBus(e),this.Clipboard=new zr.Clipboard(e),this.ExternalApplication=new Kr.ExternalApplicationModule(e),this.Frame=new qr._FrameModule(e),this.GlobalHotkey=new Jr.GlobalHotkey(e),this.Platform=new Zr.PlatformModule(e,this.InterApplicationBus.Channel),this.View=new Yr.ViewModule(e),this.Interop=new Xr.InteropModule(e),this.SnapshotSource=new eo.SnapshotSourceModule(e),e.registerFin(this),this.me=(0,Qr.getMe)(e),e.on("disconnected",(()=>{this.emit("disconnected")}))}}Wr=a.Fin=to;var no={},io={};function ro(e){return"string"==typeof e.manifestUrl}function oo(e){return ao(e)&&"string"==typeof e.address}function so(e){return oo(e)&&"string"==typeof e.token}function ao(e){return"string"==typeof e.uuid}function co(e){return e.runtime&&"string"==typeof e.runtime.version}function ho(e){return ao(e)&&co(e)}Object.defineProperty(io,"__esModule",{value:!0}),io.isInternalConnectConfig=io.isPortDiscoveryConfig=io.isNewConnectConfig=io.isConfigWithReceiver=io.isRemoteConfig=io.isExistingConnectConfig=io.isExternalConfig=void 0,io.isExternalConfig=ro,io.isExistingConnectConfig=oo,io.isRemoteConfig=so,io.isConfigWithReceiver=function(e){return"object"==typeof e.receiver&&so({...e,address:""})},io.isNewConnectConfig=ho,io.isPortDiscoveryConfig=function(e){return ro(e)&&co(e)||ho(e)},io.isInternalConnectConfig=function(e){return oo(e)||ho(e)};var lo={},uo={};Object.defineProperty(uo,"__esModule",{value:!0}),uo.EmitterMap=void 0;const po=t;function wo(e){return Buffer.from(e).toString("base64")}uo.EmitterMap=class{constructor(){this.storage=new Map}hashKeys(e){return e.map(wo).join("/")}getOrCreate(e){const t=this.hashKeys(e);return this.storage.has(t)||this.storage.set(t,new po.EventEmitter),this.storage.get(t)}has(e){return this.storage.has(this.hashKeys(e))}delete(e){const t=this.hashKeys(e);return this.storage.delete(t)}},Object.defineProperty(lo,"__esModule",{value:!0});const yo=uo;class fo extends yo.EmitterMap{constructor(){super(...arguments),this.dispatchEvent=e=>{if(function(e){return"process-desktop-event"===e.action}(e)){const{payload:t}=e,n=function(e){const{topic:t}=e;if("frame"===t||"window"===t||"view"===t){const{uuid:n,name:i}=e;return[t,n,i]}if("application"===t){const{uuid:n}=e;return[t,n]}return[t]}(t);if(this.has(n))return this.getOrCreate(n).emit(t.type,t),!0}return!1}}}lo.default=fo;var go,mo,vo=s&&s.__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},Co=s&&s.__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)},bo=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(no,"__esModule",{value:!0});var Io=no.Transport=void 0;const Eo=t,xo=io,Ao=g,Po=bo(lo),Mo=ki,_o=ke;class Oo extends Eo.EventEmitter{constructor(e,t,n){super(),this.wireListeners=new Map,this.topicRefMap=new Map,this.eventAggregator=new Po.default,this.messageHandlers=[this.eventAggregator.dispatchEvent],go.set(this,void 0),mo.set(this,void 0),this.connectSync=()=>{Co(this,go,"f").connectSync()},this.getPort=()=>Co(this,go,"f").getPort(),vo(this,go,new e(this.onmessage.bind(this)),"f"),this.environment=t,this.sendRaw=Co(this,go,"f").send.bind(Co(this,go,"f")),this.registerMessageHandler(this.handleMessage.bind(this)),Co(this,go,"f").on("disconnected",(()=>{for(const[,{handleNack:e}]of this.wireListeners)e({reason:"Remote connection has closed"});this.wireListeners.clear(),this.emit("disconnected")}));const{uuid:i,name:r}=n,o=this.environment.getCurrentEntityType();this.me=(0,Mo.getBaseMe)(o,i,r)}getFin(){if(!Co(this,mo,"f"))throw new Error("No Fin object registered for this transport");return Co(this,mo,"f")}registerFin(e){if(Co(this,mo,"f"))throw new Error("Fin object has already been registered for this transport");vo(this,mo,e,"f")}shutdown(){return Co(this,go,"f").shutdown()}async connect(e){if((0,xo.isConfigWithReceiver)(e))return await Co(this,go,"f").connect(e.receiver),this.authorize(e);if((0,xo.isRemoteConfig)(e))return this.connectRemote(e);if((0,xo.isExistingConnectConfig)(e))return this.connectByPort(e);if((0,xo.isNewConnectConfig)(e)){const t=await this.environment.retrievePort(e);return this.connectByPort({...e,address:`ws://localhost:${t}`})}}async connectRemote(e){return await Co(this,go,"f").connect(new(this.environment.getWsConstructor())(e.address)),this.authorize(e)}async connectByPort(e){const{address:t,uuid:n}=e,i={...e,type:"file-token"},r=Co(this,go,"f");await r.connect(new(this.environment.getWsConstructor())(e.address));const o=await this.sendAction("request-external-authorization",{uuid:n,type:"file-token"},!0);if("external-authorization-response"!==o.action)throw new Ao.UnexpectedActionError(o.action);return await this.environment.writeToken(o.payload.file,o.payload.token),this.authorize(i)}async authorize(e){const t=await this.sendAction("request-authorization",e,!0);if("authorization-response"!==t.action)throw new Ao.UnexpectedActionError(t.action);if(!0!==t.payload.success)throw new Ao.RuntimeError(t.payload)}sendAction(e,t={},n=!1){let i=()=>{};const r=Ao.RuntimeError.getCallSite(1),o=this.environment.getNextMessageId(),s=new Promise(((s,a)=>{i=a;const c={action:e,payload:t,messageId:o},d=Co(this,go,"f");return this.addWireListener(o,s,(e=>this.nackHandler(e,a,r)),n),d.send(c).catch(a)}));return Object.assign(s,{cancel:i,messageId:o})}nackHandler(e,t,n){t("string"==typeof e?e:new Ao.RuntimeError(e,n))}ferryAction(e){return new Promise(((t,n)=>{const i=this.environment.getNextMessageId();e.messageId=i;const r=e=>{t(e.payload)};return Co(this,go,"f").send(e).then((()=>this.addWireListener(i,r,(e=>this.nackHandler(e,n)),!1))).catch(n)}))}registerMessageHandler(e){this.messageHandlers.push(e)}addWireListener(e,t,n,i){i?this.uncorrelatedListener=t:this.wireListeners.has(e)?n({reason:"Duplicate handler id",error:(0,_o.errorToPOJO)(new Ao.DuplicateCorrelationError(String(e)))}):this.wireListeners.set(e,{resolve:t,handleNack:n})}onmessage(e){for(const t of this.messageHandlers)t.call(null,e)}handleMessage(e){const t=e.correlationId||NaN;if("correlationId"in e){if(!this.wireListeners.has(t))return!1;{const{resolve:n,handleNack:i}=this.wireListeners.get(t);"ack"!==e.action?i({reason:"Did not receive ack action",error:(0,_o.errorToPOJO)(new Ao.NoAckError(e.action))}):"payload"in e?e.payload.success?n.call(null,e):i(e.payload):"string"==typeof e.reason?i(e):(console.warn("Received invalid response from core",e),i({reason:"invalid response shape"})),this.wireListeners.delete(t)}}else this.uncorrelatedListener&&this.uncorrelatedListener.call(null,e),this.uncorrelatedListener=()=>{};return!0}}Io=no.Transport=Oo,go=new WeakMap,mo=new WeakMap;const So=(...e)=>({log:(...t)=>console.debug(`[${(new Date).toISOString()}]`,...(e=>e.map((e=>`[${e}]`)))(e),...t),getLogger:(...t)=>So(...e,...t)}),Ro=So("@openfin/core-web/client");function Fo(e,t){if(!function(e){return"string"==typeof e}(e))throw new Error(`Property ${t} has invalid type. Expected string, got ${typeof e}.`)}const jo="web-broker-ports-ready",ko=Ro.getLogger("get-web-interop-ports");function Lo(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)}function To(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}"function"==typeof SuppressedError&&SuppressedError;const $o=e=>{var n,i,r;return r=class extends t.EventEmitter{constructor(t){super(),n.set(this,void 0),i.set(this,!1),this.connectSync=()=>{Lo(this,i,"f")||(e.addEventListener("message",(e=>{e.data?.topic?.startsWith("wire-message")&&e.data.message&&Lo(this,n,"f").call(this,{...JSON.parse(e.data.message),ports:e.ports})})),e.start())},this.connect=async()=>{this.connectSync()},this.send=t=>(e.postMessage({topic:"wire-message",message:JSON.stringify(t)}),Promise.resolve()),this.shutdown=async()=>{e.close()},To(this,n,t,"f")}getPort(){return e}},n=new WeakMap,i=new WeakMap,r};var Bo={},Go={};Object.defineProperty(Go,"__esModule",{value:!0}),Go.BaseEnvironment=void 0;const Wo=vr();Go.BaseEnvironment=class{async getViewWindowIdentity(e,t){const{identity:n}=await e.View.wrapSync(t).getCurrentWindow();return n}async getInteropInfo(e){const t=await e.Application.getCurrentSync().getInfo().catch((()=>null)),n=t?.initialOptions?.interopBrokerConfiguration??{};return{fdc3Version:t?(0,Wo.getDefaultViewFdc3VersionFromAppInfo)(t):void 0,...n,fdc3Info:{providerVersion:await e.System.getVersion(),provider:"OpenFin"}}}},Object.defineProperty(Bo,"__esModule",{value:!0});var Ho=Bo.BrowserEnvironment=void 0;const No=Go;class Do extends No.BaseEnvironment{constructor(){super(...arguments),this.type="other",this.getRandomId=()=>{const e=new Uint32Array(1);return window.crypto.getRandomValues(e)[0].toString(32)}}getAdapterVersionSync(){return""}observeBounds(e,t){throw new Error("Method not implemented.")}layoutAllowedInContext(e){return!1}initLayoutManager(e,t,n){throw new Error("Method not implemented.")}applyLayoutSnapshot(e,t,n){throw new Error("Method not implemented.")}createLayout(e,t){throw new Error("Method not implemented.")}destroyLayout(e,t){throw new Error("Method not implemented.")}resolveLayout(e,t){throw new Error("Method not implemented.")}initPlatform(...e){throw new Error("Method not implemented.")}writeToken(e,t){return Promise.resolve("")}retrievePort(e){throw new Error("Method not implemented.")}getNextMessageId(){return this.getRandomId()}createChildContent(e){throw new Error("Method not implemented.")}getWebWindow(e){throw new Error("Method not implemented.")}getCurrentEntityIdentity(){throw new Error("Method not implemented.")}getCurrentEntityType(){return"external connection"}raiseEvent(e,t){throw new Error("Method not implemented.")}getUrl(){return location.href}getDefaultChannelOptions(){return{create:{},connect:{}}}getRtcPeer(){return new RTCPeerConnection}getWsConstructor(){return WebSocket}whenReady(){return Promise.resolve()}}Ho=Bo.BrowserEnvironment=Do;const Uo=e=>"platform"in e&&void 0!==e.platform;var Vo,zo;class Ko extends Ho{constructor(e){super(),this.connectConfig=e,Vo.set(this,void 0),zo.set(this,new W((async()=>Promise.resolve().then((function(){return __webpack_require__(/*! ./main-b14f67c9.js */ "../../node_modules/@openfin/core-web/out/main-b14f67c9.js")}))))),Uo(e)&&this.validatePlatformOptions(e)}getAdapterVersionSync(){return"0.39.21"}validatePlatformOptions({platform:e}){if(!("layoutSnapshot"in e))throw new Error("Platform options are missing layoutSnapshot. Please provide a layoutSnapshot in the platform options.");if("windows"in e||"windows"in e.layoutSnapshot)throw new Error("It appears you tried to call connect() with a snapshot object from an OpenFin desktop environment. Note that connect() expects to be called with a platform property with this structure: { platform: { layoutSnapshot } }. To get a layoutSnapshot of the expected structure, use fin.Platform.Layout.getCurrentLayoutManagerSync().getLayoutSnapshot() in v34+ in your desktop environment.");const{layouts:t}=e.layoutSnapshot;Object.entries(t).map((([e,t])=>{if("object"!=typeof t||null===t)throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must be an object.`);if(!("content"in t))throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must contain a 'content' property.`)}))}async getInteropInfo(e){return{...{contextGroups:void 0,logging:{beforeAction:{enabled:!1},afterAction:{enabled:!1}}},fdc3Version:void 0,fdc3Info:{providerVersion:"0.39.21",provider:"OpenFin Web"}}}layoutAllowedInContext(e){return!0}async initLayoutManager(e,t,n){if(Lo(this,Vo,"f"))throw new Error("Layout already initialized.");if(!Uo(this.connectConfig))throw new Error("Platform options are missing from connection config.");const{WebLayoutEntryPoint:i}=await Lo(this,zo,"f").getValue();return To(this,Vo,new i(this.connectConfig),"f"),await Lo(this,Vo,"f").initLayoutManager(e,t,n)}async applyLayoutSnapshot(e,t,n){Lo(this,Vo,"f")?.applyLayoutSnapshot(e,t,n)}async createLayout(e,t){return Lo(this,Vo,"f")?.createLayout(e,t)}async destroyLayout(e,t){return Lo(this,Vo,"f")?.destroyLayout(e,t)}async getViewWindowIdentity(e,t){return Promise.resolve({uuid:t.uuid,name:t.uuid})}}Vo=new WeakMap,zo=new WeakMap;const qo=()=>{const e=((e,t)=>{const n=new RegExp(`^${t}<(?.*)>$`).exec(e)?.groups?.meta;if(n)try{return JSON.parse(atob(n))}catch(e){throw new Error(`Failed to decode JSON from ${n}.`)}})(window.name,"of-frame");if(e)try{const{name:t,uuid:n,brokerUrl:i,providerId:r,contextGroup:o}=e;return Fo(i,"brokerUrl"),Fo(n,"uuid"),Fo(t,"name"),{identity:{name:t,uuid:n},brokerUrl:i,interopConfig:{providerId:r,currentContextGroup:o}}}catch(e){throw new Error(`Unexpected error occurred when inferring platform information: ${e.stack}`)}},Jo=()=>{const e=r.v4();return{uuid:e,name:e}},Yo=async e=>{if("enabled"===e.connectionInheritance){const t=await(async e=>{const t=qo();if(t){const{validateOptions:n=(()=>!0)}=e,{identity:i,...r}=t;if(!await n(r))throw new Error("Parent options were rejected by validateOptions.");return t}})(e);if(t)return t}if(!e.options){const t="enabled"===e.connectionInheritance?"Broker URL was not specified nor provided by a platform container.":"Connection inheritance is disabled but no options were provided.";throw new Error(t)}return{...e.options,identity:Jo()}};exports.__classPrivateFieldGet=Lo,exports.__classPrivateFieldSet=To,exports.apiExposer=Gn,exports.commonjsGlobal=s,exports.connect=async t=>{try{Ro.log("Establishing connection",t);const{brokerUrl:n,identity:i,timeout:r,interopConfig:s}=await Yo(t),{workerPort:a,iframeBrokerPort:c}=await(async(e,t,n)=>{const{origin:i}=new URL(e),r=document.createElement("IFRAME");let s;r.style.display="none";try{return await new Promise(((a,c)=>{const d=e=>{if(e.source===r.contentWindow&&e.data?.topic===`ack-${jo}`){if(e.origin!==i)c(new Error(`Broker redirected to unexpected origin ${e.origin}, expected ${i}.`));else if(e.data.success){const[t,n]=e.ports;a({iframeBrokerPort:t,workerPort:n})}else c(new m(e.data));window.removeEventListener("message",d),clearTimeout(s)}};window.addEventListener("message",d),ko.log(`Connecting to broker ${e}`),r.setAttribute("src",e),r.setAttribute("name",o(t,"of-broker")),document.body.appendChild(r),ko.log("Iframe loaded, awaiting init message from iframe"),n&&(s=setTimeout((()=>{window.removeEventListener("message",d),document.body.removeChild(r),c(new Error("Worker did not initialize in time"))}),n))}))}catch(e){throw new Error(`Failed to initialise Fin Web Client. ${e.message}`,{cause:e})}})(n,i,r);Ro.log("Successfully established connection to shared worker");const d={entityType:"external connection",...i};a.start(),c.start();const h=((t,n,i)=>{const r=$o(n),o=new Ko(t),s=new Io(r,o,i);return s.connectSync(),window.Buffer=e.Buffer,new Wr(s)})(t,a,d);return s?.providerId&&(h.me.interop=h.Interop.connectSync(s.providerId),s?.currentContextGroup&&h.me.interop.joinContextGroup(s.currentContextGroup).catch((e=>{console.warn(`Error joining specified context group: ${s?.currentContextGroup}, continuing`,e)}))),{...h,me:{...h.me,identity:{uuid:h.me.uuid,name:h.me.name}}}}catch(e){throw new Error(`An error occured during web-interop connection: ${e.message}`)}},exports.decorators=Nn,exports.encodeOptions=o,exports.layout_constants=ai,exports.lazy=G; /***/ }), -/***/ "./node_modules/@openfin/core-web/out/main-b14f67c9.js": -/*!*************************************************************!*\ - !*** ./node_modules/@openfin/core-web/out/main-b14f67c9.js ***! - \*************************************************************/ +/***/ "../../node_modules/@openfin/core-web/out/main-b14f67c9.js": +/*!*****************************************************************!*\ + !*** ../../node_modules/@openfin/core-web/out/main-b14f67c9.js ***! + \*****************************************************************/ /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; -var t=__webpack_require__(/*! ./main-8cad4070.js */ "./node_modules/@openfin/core-web/out/main-8cad4070.js"),e=__webpack_require__(/*! uuid */ "../../node_modules/uuid/dist/esm-browser/index.js");__webpack_require__(/*! buffer/ */ "../../node_modules/buffer/index.js"),__webpack_require__(/*! events */ "../../node_modules/events/events.js"),__webpack_require__(/*! lodash/cloneDeep */ "../../node_modules/lodash/cloneDeep.js"),__webpack_require__(/*! lodash/isEqual */ "../../node_modules/lodash/isEqual.js");var i={},n={};Object.defineProperty(n,"__esModule",{value:!0}),n.mapValuesAsync=n.mapEntriesAsync=void 0;const o=(t,[e,i])=>({...t,[e]:i});async function s(t,e){return(await Promise.all(e.map((async([e,i])=>[e,await t(i,e)])))).reduce(o,{})}n.mapEntriesAsync=s,n.mapValuesAsync=async function(t,e){let i;return i=e instanceof Map?[...e.entries()]:Object.entries(e),s(t,i)};var r,a,l,h,d=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldSet||function(t,e,i,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(t,i):o?o.value=i:e.set(t,i),i},c=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldGet||function(t,e,i,n){if("a"===i&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?n:"a"===i?n.call(t):n?n.value:e.get(t)};Object.defineProperty(i,"__esModule",{value:!0});var m=i.DefaultLayoutManager=void 0;const u=n;class p{constructor(t){a.set(this,void 0),l.set(this,new Map),d(this,a,t,"f")}size(){return c(this,l,"f").size}async applyLayoutSnapshot({layouts:t}){if(Object.keys(t).length>1)throw new Error("[LayoutManager] Tried to call applyLayoutSnapshot with more than 1 layout. When implementing multiple layouts via overridden LayoutManager class, you must override and fully implement the applyLayoutSnapshot method without calling super.applyLayoutSnapshot().");const[[e,i]]=Object.entries(t);await p.createLayout(this,{layoutName:e,layout:i})}async showLayout({layoutName:t}){}async getLayoutSnapshot(){return{layouts:await(0,u.mapValuesAsync)((t=>t.getFrameSnapshot()),c(this,l,"f"))}}async removeLayout({layoutName:t}){}getLayoutIdentityForView(t){const e=[...c(this,l,"f").values()].find((e=>e.getCurrentViews().some((e=>e.name===t.name&&e.uuid===t.uuid))));return e?.identity??void 0}isLayoutVisible({layoutName:t}){return c(p,r,"m",h).call(p,this,t).isVisible()}resolveLayoutIdentity(t){if(t&&"layoutName"in t)return t;const e=[...c(this,l,"f").values()];if(1===e.length)return e[0].identity;const i=e.find((t=>t.isVisible()));return i?.identity??void 0}static async resolveLayout(t,e){const i=t.resolveLayoutIdentity(e);if(void 0===i||!("layoutName"in i))throw new Error("[layout-manager] resolveLayout: Could not resolve the layout identity. Make sure you include 'layoutName' in the identity object.");return c(p,r,"m",h).call(p,t,i.layoutName)}static async handleSharedView(t,e,i){await(0,u.mapValuesAsync)((async t=>{if(t.identity.layoutName!==e.layoutName){const e=t.getCurrentViews().find((t=>t.name===i.name));e&&await t.onViewDetached({viewIdentity:e,target:null}).catch(console.error)}}),c(t,l,"f"))}static async handleLastViewRemoved(t,e){await t.removeLayout(e),await c(t,a,"f").handleLastViewRemoved(t)}static async destroyLayout(t,{layoutName:e}){await c(p,r,"m",h).call(p,t,e).destroy(),c(t,l,"f").delete(e)}static async createLayout(t,e){const{layoutName:i}=e;if(c(t,l,"f").has(i))throw new Error(`Layout name ${i} already exists`);await c(t,a,"f").createLayout(e,t)}static registerLayout(t,e,i){c(t,l,"f").set(e,i)}static getAllLayouts(t){return[...c(t,l,"f").values()]}static setInitialSnapshot(t,e){c(t,a,"f").setInitialSnapshot(e)}static createClosedConstructor(...t){return class extends p{constructor(){super(...t)}}}}m=i.DefaultLayoutManager=p,r=p,a=new WeakMap,l=new WeakMap,h=function(t,e){const i=c(t,l,"f").get(e);if(!i)throw new Error(`[layout-manager] getLayoutByName: Could not locate layout with name '${e}'`);return i};var g={},f={},v={};Object.defineProperty(v,"__esModule",{value:!0}),v.ReversibleMap=void 0;v.ReversibleMap=class{constructor(){this.valueToKey=new Map,this.keyToValue=new Map,this.setUnique=(t,e)=>{if(this.hasKey(t)||this.hasValue(e))throw new Error("Key or value already in the map.");this.keyToValue.set(t,e),this.valueToKey.set(e,t)},this.getKey=t=>{const e=this.valueToKey.get(t);if(!e)throw new Error("Value not found in the map.");return e},this.deleteKey=t=>{const e=this.getValue(t);return this.keyToValue.delete(t),this.valueToKey.delete(e),e},this.deleteValue=t=>{const e=this.getKey(t);return this.keyToValue.delete(e),this.valueToKey.delete(t),e},this.hasKey=t=>this.keyToValue.has(t),this.hasValue=t=>this.valueToKey.has(t)}getValue(t){const e=this.keyToValue.get(t);if(!e)throw new Error("Key not found in the map.");return e}},Object.defineProperty(f,"__esModule",{value:!0});var _=f.LayoutContentCache=void 0;const y=t.lazy,C=v;class w{constructor(){this.contentItemCache=new C.ReversibleMap,this.contentItemCacheId=0,this.createCacheKey=()=>{const t=`entity-${this.contentItemCacheId.toString()}`;return this.contentItemCacheId+=1,t},this.hasKey=t=>this.contentItemCache.hasKey(t),this.getItemOrUndefined=t=>{try{return this.getContentItemOrThrow(t)}catch(t){return}},this.getContentItemOrThrow=(t,e)=>{if(!this.contentItemCache.hasKey(t))throw new Error("Layout component has been destroyed or detached from the current layout.");const i=this.contentItemCache.getValue(t);if(e&&!e.includes(i.type))throw new Error(`Layout item is not the expected type. Expected ${e.join(", ")}, got ${i.type}.`);return i},this.getOrCreateEntityId=t=>{if(this.contentItemCache.hasValue(t))return this.contentItemCache.getKey(t);t.onDestroyed((()=>{this.contentItemCache.deleteValue(t)}));const e=this.createCacheKey();return this.contentItemCache.setUnique(e,t),e}}static getSingleInstance(){return w.singleton.getValue()}}_=f.LayoutContentCache=w,w.singleton=new y.Lazy((()=>new w));var I={},b={};!function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.getAdjacentStacks=t.doShareEdge=t.getAdjacentItem=void 0;t.getAdjacentItem=(e,i)=>{const{parent:n}=e;if(e.isRoot()||!n)return;const o=["top","bottom"].includes(i)?"column":"row",s=["top","left"].includes(i)?-1:1;if(n.type===o){const t=n.contentItems.indexOf(e)+s;if(t>=0&&t{const n=t.getBounds(),o=e.getBounds();if(!n||!o)return!1;if(["top","bottom"].includes(i)){return!(n.righto.right)}return!(n.bottomo.bottom)};t.getAdjacentStacks=(e,i)=>{const n=["top","bottom"].includes(i)?"row":"column",o=s=>"stack"===s.type?(0,t.doShareEdge)(e,s,i)?[s]:[]:"root"===s.type||"ground"===s.type?[]:s.type===n?s.contentItems.map((t=>o(t))).flat():s.type!==n?["top","right"].includes(i)?o(s.contentItems[s.contentItems.length-1]):o(s.contentItems[0]):[],s=(0,t.getAdjacentItem)(e,i);return s?o(s):[]}}(b);var S=t.commonjsGlobal&&t.commonjsGlobal.__decorate||function(t,e,i,n){var o,s=arguments.length,r=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(s<3?o(r):s>3?o(e,i,r):o(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};Object.defineProperty(I,"__esModule",{value:!0}),I.LayoutEntitiesController=void 0;const E=t.decorators,x=b,L=i;class z{constructor(t,e,i){this.wire=t,this.layoutManager=e,this.layoutContentCache=i,this.analytics=t=>{this.wire.sendAction(`layout-controller-${t}`).catch((()=>{}))},this.getLayoutIdentityForViewOrThrow=async t=>{const e=this.layoutManager.getLayoutIdentityForView(t);if(!e)throw new Error(`View identity ${t.name} is not attached to any layouts.`);return e},this.getRoot=async t=>{this.analytics("get-root");const e=(await this.getLayout(t)).getRoot();return{type:e.type,entityId:this.layoutContentCache.getOrCreateEntityId(e)}},this.getStackByView=async t=>{this.analytics("get-stack-by-view");const e=await this.getLayoutIdentityForViewOrThrow(t),i=(await this.getLayout(e)).getStackByView(t);if("stack"===i?.type)return{entityId:this.layoutContentCache.getOrCreateEntityId(i),type:"stack"}},this.getStackViews=t=>{this.analytics("get-stack-views");return this.layoutContentCache.getContentItemOrThrow(t,["stack"]).contentItems.map((t=>({name:t.viewName,uuid:this.wire.me.uuid})))},this.isRoot=t=>{this.analytics("is-root");return this.layoutContentCache.getContentItemOrThrow(t).isRoot()},this.exists=t=>(this.analytics("exists"),this.layoutContentCache.hasKey(t)),this.addViewToStack=async(t,e,{index:i}={index:0})=>{this.analytics("add-view-to-stack");const n=this.layoutContentCache.getContentItemOrThrow(t);if(i&&i>n.contentItems.length+1)throw new Error(`Index '${i}' out of range, please exclude the index or specify a number between 0 and ${n.contentItems.length}`);const o={id:t,index:i},{identity:s}=await n.layout.platformCreateView(e,{location:o});return s},this.findViewInStack=(t,e)=>t.contentItems.find((t=>t.viewName===e.name)),this.removeViewFromStack=async(t,e)=>{this.analytics("remove-view-from-stack");const i=this.layoutContentCache.getContentItemOrThrow(t,["stack"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to remove a view ('${e.name}') which does not belong to the stack.`);await n.layout.platformCloseView(e)},this.createAdjacentStack=async(t,e,{position:i="right"}={})=>{if(this.analytics("create-adjacent-stack"),!Array.isArray(e)||0===e.length)throw new Error('The parameter "views" must be an array with at least 1 element.');if(!["top","bottom","left","right"].includes(i))throw new Error(`Invalid position '${i}' specified.`);const n=this.layoutContentCache.getContentItemOrThrow(t).createAdjacentStack({position:i}),o=this.layoutContentCache.getOrCreateEntityId(n);return await Promise.all(e.reverse().map((t=>this.addViewToStack(o,t)))),o},this.getAdjacentStacks=async({targetId:t,edge:e})=>{this.analytics("get-adjacent-stacks");const i=this.layoutContentCache.getContentItemOrThrow(t);return(0,x.getAdjacentStacks)(i,e).map((t=>({entityId:this.layoutContentCache.getOrCreateEntityId(t)})))},this.setStackActiveView=async(t,e)=>{this.analytics("set-stack-active-view");const i=this.layoutContentCache.getContentItemOrThrow(t,["stack"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to set a view ('${e.name}') as active when it does not belong to the stack.`);i.setActiveContentItem(n,!0)}}async getLayout(t){const e=await L.DefaultLayoutManager.resolveLayout(this.layoutManager,t);if(!e)throw new Error(`Could not resolve target layout identity ${JSON.stringify(t)}`);return e}getContent(t){this.analytics("get-content");return this.layoutContentCache.getContentItemOrThrow(t,["column","row"]).contentItems.map((t=>({type:t.type,entityId:this.layoutContentCache.getOrCreateEntityId(t)})))}getParent(t){this.analytics("get-parent");const e=this.layoutContentCache.getContentItemOrThrow(t);if(!e.isRoot())return e.parent?.contentItems.includes(e)?{type:e.parent.type,entityId:this.layoutContentCache.getOrCreateEntityId(e.parent)}:void 0}}S([(0,E.expose)()],z.prototype,"getLayoutIdentityForViewOrThrow",void 0),S([(0,E.expose)()],z.prototype,"getRoot",void 0),S([(0,E.expose)()],z.prototype,"getStackByView",void 0),S([(0,E.expose)()],z.prototype,"getStackViews",void 0),S([(0,E.expose)()],z.prototype,"getContent",null),S([(0,E.expose)()],z.prototype,"getParent",null),S([(0,E.expose)()],z.prototype,"isRoot",void 0),S([(0,E.expose)()],z.prototype,"exists",void 0),S([(0,E.expose)()],z.prototype,"addViewToStack",void 0),S([(0,E.expose)()],z.prototype,"removeViewFromStack",void 0),S([(0,E.expose)()],z.prototype,"createAdjacentStack",void 0),S([(0,E.expose)()],z.prototype,"getAdjacentStacks",void 0),S([(0,E.expose)()],z.prototype,"setStackActiveView",void 0),I.LayoutEntitiesController=z,Object.defineProperty(g,"__esModule",{value:!0});var M=g.initLayoutEndpoints=void 0;const P=t.apiExposer,T=t.layout_constants,A=f,k=I,D=i;M=g.initLayoutEndpoints=async function(t,e){const i=t.getFin(),n=await i.Platform.getCurrentSync().getClient(),o=new P.ChannelsExposer(n);await new P.ApiExposer(o).exposeInstance(new k.LayoutEntitiesController(t,e,A.LayoutContentCache.getSingleInstance()),{id:T.LAYOUT_CONTROLLER_ID}),await async function(t,e){const i=t=>async i=>{const n=await D.DefaultLayoutManager.resolveLayout(e,i.target);if(!n)throw new Error(`Could not resolve the layout target from payload ${JSON.stringify(i)}`);return t(n,i)},n=(e,n)=>{t.register(e,i(n))},o=(t,e)=>{n(t,e)};n("replace-view",((t,e)=>t.replaceView(e))),n("replace-layout",((t,{layout:e})=>t.replaceLayout(e))),n("add-view",((t,e)=>t.insertView(e))),o("layout-add-view",((t,{viewOptions:e,location:i,targetView:n})=>t.platformCreateView(e,{location:i,targetView:n}))),n("close-view",((t,e)=>t.cleanupView(e.viewIdentity))),o("layout-close-view",((t,e)=>t.platformCloseView(e.viewIdentity))),n("apply-preset-layout",((t,e)=>t.applyPreset(e))),n("get-layout-views",(t=>t.getCurrentViews())),n("get-frame-snapshot",(t=>t.getFrameSnapshot())),n("is-visible",(t=>t.isVisible())),n("destroy",(t=>t.destroy())),t.register("get-layout-snapshot",(()=>e.getLayoutSnapshot()))}(n,e)};var R={};Object.defineProperty(R,"__esModule",{value:!0});var U=R.BaseLayout=void 0;U=R.BaseLayout=class{};var O={};Object.defineProperty(O,"__esModule",{value:!0});var V=O.DOMEmitter=void 0;V=O.DOMEmitter=class{constructor(t){this.container=t}dispatchLocalEvent(t,e){const i={...e,type:t,tabSelector:`tab-${e.name}`,containerSelector:`container-${e.name}`,topic:"openfin-DOM-event"};this.container.dispatchEvent(new CustomEvent(t,{detail:i}))}};var B={};Object.defineProperty(B,"__esModule",{value:!0});var H=B.mapLayoutContentItemsImmutableSync=B.mapLayoutContentItemsImmutable=W=B.isVisible=void 0;var W=B.isVisible=t=>(0!==t.offsetWidth||0!==t.offsetHeight)&&"hidden"!==window.getComputedStyle(t).visibility&&t.offsetTop>=0&&t.offsetLeft>=0&&t.offsetTop<=window.innerHeight&&t.offsetLeft<=window.innerWidth;const F=t=>"type"in t&&"component"===t.type;B.mapLayoutContentItemsImmutable=async function t(e,i){return F(i)?e(i):{...i,content:await Promise.all(i.content?.map((i=>t(e,i))))}},H=B.mapLayoutContentItemsImmutableSync=function t(e,i){return F(i)?e(i):{...i,content:i.content?.map((i=>t(e,i)))}};class N extends Error{constructor(t,e){super(e),this.type=t}}class G extends N{constructor(t,e){super("Configuration",t),this.node=e}}class j extends N{constructor(t){super("PopoutBlocked",t)}}class $ extends N{constructor(t){super("API",t)}}class Z extends N{constructor(t){super("Bind",t)}}class q extends Error{constructor(t,e,i){super(`${t}: ${e}${void 0===i?"":": "+i}`)}}class X extends q{constructor(t,e){super("Assert",t,e)}}class Y extends q{constructor(t,e,i){super("UnreachableCase",t,`${e}${void 0===i?"":": "+i}`)}}class K extends q{constructor(t,e){super("UnexpectedNull",t,e)}}class J extends q{constructor(t,e){super("UnexpectedUndefined",t,e)}}var Q;!function(t){let e=!1;const i={PopoutCannotBeCreatedWithGroundItemConfig:{id:0,default:"Popout cannot be created with ground ItemConfig"},PleaseRegisterAConstructorFunction:{id:1,default:"Please register a constructor function"},ComponentTypeNotRegisteredAndBindComponentEventHandlerNotAssigned:{id:2,default:"Component type not registered and BindComponentEvent handler not assigned"},ComponentIsAlreadyRegistered:{id:3,default:"Component is already registered"},ComponentIsNotVirtuable:{id:4,default:"Component is not virtuable. Requires rootHtmlElement field/getter"},VirtualComponentDoesNotHaveRootHtmlElement:{id:5,default:'Virtual component does not have getter "rootHtmlElement"'},ItemConfigIsNotTypeComponent:{id:6,default:"ItemConfig is not of type component"},InvalidNumberPartInSizeString:{id:7,default:"Invalid number part in size string"},UnknownUnitInSizeString:{id:8,default:"Unknown unit in size string"},UnsupportedUnitInSizeString:{id:9,default:"Unsupported unit in size string"}};t.idCount=Object.keys(i).length;const n=Object.values(i);t.checkInitialise=function(){if(!e)for(let e=0;e="0"&&t<="9"}function Tt(t,e){const i=zt(e);t.style.width=i}function At(t,e){const i=zt(e);t.style.height=i}function kt(t){return{width:t.offsetWidth,height:t.offsetHeight}}function Dt(t,e){t.style.display=e?"":"none"}function Rt(t,e){if(void 0!==e)for(const i in e)if(e.hasOwnProperty(i)){const n=e[i],o=t[i];t[i]=Ut(o,n)}return t}function Ut(t,e){if("object"!=typeof e)return e;if(Array.isArray(e)){const t=e.length,i=new Array(t);for(let n=0;n36)throw new Error("Too many keys in config minifier map")},t.translateObject=n}(dt||(dt={})),function(t){t.defaults={type:at.ground,content:[],size:1,sizeUnit:ht.Fractional,minSize:void 0,minSizeUnit:ht.Pixel,id:"",isClosable:!0},t.createCopy=function(t,e){switch(t.type){case at.ground:case at.row:case at.column:return gt.createCopy(t,e);case at.stack:return ut.createCopy(t,e);case at.component:return pt.createCopy(t);default:throw new Y("CICC91354",t.type,"Invalid Config Item type specified")}},t.createDefault=function(t){switch(t){case at.ground:throw new X("CICCDR91562");case at.row:case at.column:return gt.createDefault(t);case at.stack:return ut.createDefault();case at.component:return pt.createDefault();default:throw new Y("CICCDD91563",t,"Invalid Config Item type specified")}},t.isComponentItem=function(t){return t.type===at.component},t.isStackItem=function(t){return t.type===at.stack},t.isGroundItem=function(t){return t.type===at.ground}}(ct||(ct={})),function(t){t.defaultMaximised=!1,function(t){t.createCopy=function(t,e){return void 0===t?void 0:{show:null!=e?e:t.show,popout:t.popout,close:t.close,maximise:t.maximise,minimise:t.minimise,tabDropdown:t.tabDropdown}}}(t.Header||(t.Header={}))}(mt||(mt={})),function(t){function e(t){const e=t.length,i=new Array(e);for(let n=0;n"__glMaximised"===t));t>0&&(o=!0,n=n.splice(t,1)),e=n.length>0?n[0]:ct.defaults.id}else e=n;return i=void 0!==t.maximised?t.maximised:o,{id:e,maximised:i}}}(wt||(wt={})),function(t){function e(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0;return{resolved:!0,root:Et.resolve(i),openPopouts:t.resolveOpenPopouts(e.openPopouts),dimensions:t.Dimensions.resolve(e.dimensions),settings:t.Settings.resolve(e.settings),header:t.Header.resolve(e.header,e.settings,e.labels)}}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:Lt.fromResolvedArray(e.openPopouts),settings:_t.Settings.createCopy(e.settings),dimensions:t.Dimensions.fromResolved(e.dimensions),header:_t.Header.createCopy(e.header)}},t.isResolved=function(t){const e=t;return void 0!==e.resolved&&!0===e.resolved},t.resolveOpenPopouts=function(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0,{root:Et.resolve(o),openPopouts:xt.resolveOpenPopouts(e.openPopouts),dimensions:xt.Dimensions.resolve(e.dimensions),settings:xt.Settings.resolve(e.settings),header:xt.Header.resolve(e.header,e.settings,e.labels),parentId:null!==(i=e.parentId)&&void 0!==i?i:null,indexInParent:null!==(n=e.indexInParent)&&void 0!==n?n:null,window:t.Window.resolve(e.window,e.dimensions),resolved:!0}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:i(e.openPopouts),dimensions:xt.Dimensions.fromResolved(e.dimensions),settings:_t.Settings.createCopy(e.settings),header:_t.Header.createCopy(e.header),parentId:e.parentId,indexInParent:e.indexInParent,window:t.Window.fromResolved(e.window)}},t.fromResolvedArray=i}(Lt||(Lt={}));class Wt{constructor(){this._allEventSubscriptions=[],this._subscriptionsMap=new Map,this.unbind=this.removeEventListener,this.trigger=this.emit}tryBubbleEvent(t,e){}emit(t,...e){let i=this._subscriptionsMap.get(t);if(void 0!==i){i=i.slice();for(let t=0;t0){const n=e.slice();n.unshift(t);const o=this._allEventSubscriptions.slice();for(let t=0;t0?n.contentItems[0]:n,e=0);const o=this._layoutManager.createAndInitContentItem(i,t);t.addChild(o,e),this._layoutManager.layoutConfig.settings.popInOnClose?this._onClose():this.close()}createWindow(){const t=this.createUrl(),e=Math.floor(1e6*Math.random()).toString(36),i=this.serializeWindowFeatures({width:this._initialWindowSize.width,height:this._initialWindowSize.height,innerWidth:this._initialWindowSize.width,innerHeight:this._initialWindowSize.height,menubar:"no",toolbar:"no",location:"no",personalbar:"no",resizable:"yes",scrollbars:"no",status:"no"});if(this._popoutWindow=globalThis.open(t,e,i),this._popoutWindow)this._popoutWindow.addEventListener("load",(()=>this.positionWindow()),{passive:!0}),this._popoutWindow.addEventListener("beforeunload",(()=>{this._layoutManager.layoutConfig.settings.popInOnClose?this.popIn():this._onClose()}),{passive:!0}),this._checkReadyInterval=setInterval((()=>this.checkReady()),10);else if(!0===this._layoutManager.layoutConfig.settings.blockedPopoutsThrowError){throw new j("Popout blocked")}}checkReady(){if(null===this._popoutWindow)throw new K("BPCR01844");this._popoutWindow.__glInstance&&this._popoutWindow.__glInstance.isInitialised&&(this.onInitialised(),void 0!==this._checkReadyInterval&&(clearInterval(this._checkReadyInterval),this._checkReadyInterval=void 0))}serializeWindowFeatures(t){const e=[];for(const i in t)e.push(i+"="+t[i].toString());return e.join(",")}createUrl(){const t="gl-window-config-"+Ot(),e=_t.minifyConfig(this._config);try{localStorage.setItem(t,JSON.stringify(e))}catch(t){throw new Error("Error while writing to localStorage "+function(t){return t instanceof Error?t.message:"string"==typeof t?t:"Unknown Error"}(t))}const i=new URL(location.href);return i.searchParams.set("gl-window",t),i.toString()}positionWindow(){if(null===this._popoutWindow)throw new Error("BrowserPopout.positionWindow: null popoutWindow");this._popoutWindow.moveTo(this._initialWindowSize.left,this._initialWindowSize.top),this._popoutWindow.focus()}onInitialised(){this._isInitialised=!0,this.getGlInstance().on("popIn",(()=>this.popIn())),this.emit("initialised")}_onClose(){setTimeout((()=>this.emit("closed")),50)}}class Gt extends Wt{constructor(t,e,i,n){super(),this.layoutManager=t,this._parent=i,this._element=n,this._popInParentIds=[],this._type=e.type,this._id=e.id,this._isInitialised=!1,this.isGround=!1,this.isRow=!1,this.isColumn=!1,this.isStack=!1,this.isComponent=!1,this.size=e.size,this.sizeUnit=e.sizeUnit,this.minSize=e.minSize,this.minSizeUnit=e.minSizeUnit,this._isClosable=e.isClosable,this._pendingEventPropagations={},this._throttledEvents=["stateChanged"],this._contentItems=this.createContentItems(e.content)}get type(){return this._type}get id(){return this._id}set id(t){this._id=t}get popInParentIds(){return this._popInParentIds}get parent(){return this._parent}get contentItems(){return this._contentItems}get isClosable(){return this._isClosable}get element(){return this._element}get isInitialised(){return this._isInitialised}static isStack(t){return t.isStack}static isComponentItem(t){return t.isComponent}static isComponentParentableItem(t){return t.isStack||t.isGround}removeChild(t,e=!1){const i=this._contentItems.indexOf(t);if(-1===i)throw new Error("Can't remove child item. Unknown content item");if(e||this._contentItems[i].destroy(),this._contentItems.splice(i,1),this._contentItems.length>0)this.updateSize(!1);else if(!this.isGround&&!0===this._isClosable){if(null===this._parent)throw new K("CIUC00874");this._parent.removeChild(this)}}addChild(t,e,i){return null!=e||(e=this._contentItems.length),this._contentItems.splice(e,0,t),t.setParent(this),!0===this._isInitialised&&!1===t._isInitialised&&t.init(),e}replaceChild(t,e,i=!1){const n=this._contentItems.indexOf(t),o=t._element.parentNode;if(-1===n)throw new X("CIRCI23232","Can't replace child. oldChild is not child of this");if(null===o)throw new K("CIRCP23232");if(o.replaceChild(e._element,t._element),!0===i&&(t._parent=null,t.destroy()),this._contentItems[n]=e,e.setParent(this),e.size=t.size,e.sizeUnit=t.sizeUnit,e.minSize=t.minSize,e.minSizeUnit=t.minSizeUnit,null===e._parent)throw new K("CIRCNC45699");!0===e._parent._isInitialised&&!1===e._isInitialised&&e.init(),this.updateSize(!1)}remove(){if(null===this._parent)throw new K("CIR11110");this._parent.removeChild(this)}popout(){const t=Ot(),e=this.layoutManager.createPopoutFromContentItem(this,void 0,t,void 0);return this.emitBaseBubblingEvent("stateChanged"),e}calculateConfigContent(){const t=this._contentItems,e=t.length,i=new Array(e);for(let n=0;nthis.propagateEventToLayoutManager(t,e))))}propagateEventToLayoutManager(t,e){this._pendingEventPropagations[t]=!1,this.layoutManager.emitUnknown(t,e)}}class jt extends Gt{constructor(t,e,i){super(t,e,i,document.createElement("div")),this._parentItem=i,this._focused=!1,this.isComponent=!0,this._reorderEnabled=e.reorderEnabled,this.applyUpdatableConfig(e),this._initialWantMaximise=e.maximised;const n=document.createElement("div");n.classList.add("lm_content"),this.element.appendChild(n),this._container=new Ft(e,this,t,n,(t=>this.handleUpdateItemConfigEvent(t)),(()=>this.show()),(()=>this.hide()),(t=>this.focus(t)),(t=>this.blur(t)))}get componentName(){return this._container.componentType}get componentType(){return this._container.componentType}get reorderEnabled(){return this._reorderEnabled}get initialWantMaximise(){return this._initialWantMaximise}get component(){return this._container.component}get container(){return this._container}get parentItem(){return this._parentItem}get headerConfig(){return this._headerConfig}get title(){return this._title}get tab(){return this._tab}get focused(){return this._focused}destroy(){this._container.destroy(),super.destroy()}applyUpdatableConfig(t){this.setTitle(t.title),this._headerConfig=t.header}toConfig(){const t=this._container.stateRequestEvent,e=void 0===t?this._container.state:t();return{type:at.component,content:[],size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,maximised:!1,isClosable:this.isClosable,reorderEnabled:this._reorderEnabled,title:this._title,header:mt.Header.createCopy(this._headerConfig),componentType:pt.copyComponentType(this.componentType),componentState:e}}close(){if(null===this.parent)throw new K("CIC68883");this.parent.removeChild(this,!1)}enterDragMode(t,e){Tt(this.element,t),At(this.element,e),this._container.enterDragMode(t,e)}exitDragMode(){this._container.exitDragMode()}enterStackMaximised(){this._container.enterStackMaximised()}exitStackMaximised(){this._container.exitStackMaximised()}drag(){this._container.drag()}updateSize(t){this.updateNodeSize(t)}init(){this.updateNodeSize(!1),super.init(),this._container.emit("open"),this.initContentItems()}setTitle(t){this._title=t,this.emit("titleChanged",t),this.emit("stateChanged")}setTab(t){this._tab=t,this.emit("tab",t),this._container.setTab(t)}hide(){super.hide(),this._container.setVisibility(!1)}show(){super.show(),this._container.setVisibility(!0)}focus(t=!1){this.parentItem.setActiveComponentItem(this,!0,t)}setFocused(t){this._focused=!0,this.tab.setFocused(),t||this.emitBaseBubblingEvent("focus")}blur(t=!1){this._focused&&this.layoutManager.setFocusedComponentItem(void 0,t)}setBlurred(t){this._focused=!1,this.tab.setBlurred(),t||this.emitBaseBubblingEvent("blur")}setParent(t){this._parentItem=t,super.setParent(t)}handleUpdateItemConfigEvent(t){this.applyUpdatableConfig(t)}updateNodeSize(t){if("none"!==this.element.style.display){const{width:e,height:i}=kt(this.element);this._container.setSizeToNodeSize(e,i,t)}}}class $t extends Gt{constructor(){super(...arguments),this._focused=!1}get focused(){return this._focused}setFocusedValue(t){this._focused=t}}class Zt extends Wt{constructor(t,e){super(),this._eElement=t,this._pointerTracking=!1,this._pointerDownEventListener=t=>this.onPointerDown(t),this._pointerMoveEventListener=t=>this.onPointerMove(t),this._pointerUpEventListener=t=>this.onPointerUp(t),this._timeout=void 0,this._allowableTargets=[t,...e],this._oDocument=document,this._eBody=document.body,this._nDelay=1800,this._nDistance=10,this._nX=0,this._nY=0,this._nOriginalX=0,this._nOriginalY=0,this._dragging=!1,this._eElement.addEventListener("pointerdown",this._pointerDownEventListener,{passive:!0})}destroy(){this.checkRemovePointerTrackingEventListeners(),this._eElement.removeEventListener("pointerdown",this._pointerDownEventListener)}cancelDrag(){this.processDragStop(void 0)}onPointerDown(t){if(this._allowableTargets.includes(t.target)&&t.isPrimary){const e=this.getPointerCoordinates(t);this.processPointerDown(e)}}processPointerDown(t){this._nOriginalX=t.x,this._nOriginalY=t.y,this._oDocument.addEventListener("pointermove",this._pointerMoveEventListener),this._oDocument.addEventListener("pointerup",this._pointerUpEventListener,{passive:!0}),this._pointerTracking=!0,this._timeout=setTimeout((()=>{try{this.startDrag()}catch(t){throw console.error(t),t}}),this._nDelay)}onPointerMove(t){this._pointerTracking&&(this.processDragMove(t),t.preventDefault())}processDragMove(t){this._nX=t.pageX-this._nOriginalX,this._nY=t.pageY-this._nOriginalY,!1===this._dragging&&(Math.abs(this._nX)>this._nDistance||Math.abs(this._nY)>this._nDistance)&&this.startDrag(),this._dragging&&this.emit("drag",this._nX,this._nY,t)}onPointerUp(t){this.processDragStop(t)}processDragStop(t){var e;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this.checkRemovePointerTrackingEventListeners(),!0===this._dragging&&(this._eBody.classList.remove("lm_dragging"),this._eElement.classList.remove("lm_dragging"),null===(e=this._oDocument.querySelector("iframe"))||void 0===e||e.style.setProperty("pointer-events",""),this._dragging=!1,this.emit("dragStop",t))}checkRemovePointerTrackingEventListeners(){this._pointerTracking&&(this._oDocument.removeEventListener("pointermove",this._pointerMoveEventListener),this._oDocument.removeEventListener("pointerup",this._pointerUpEventListener),this._pointerTracking=!1)}startDrag(){var t;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this._dragging=!0,this._eBody.classList.add("lm_dragging"),this._eElement.classList.add("lm_dragging"),null===(t=this._oDocument.querySelector("iframe"))||void 0===t||t.style.setProperty("pointer-events","none"),this.emit("dragStart",this._nOriginalX,this._nOriginalY)}getPointerCoordinates(t){return{x:t.pageX,y:t.pageY}}}class qt{constructor(t,e,i){this._isVertical=t,this._size=e,this._grabSize=i0){const i=this.createSplitter(Math.max(0,e-1)).element;e>0?(this.contentItems[e-1].element.insertAdjacentElement("afterend",i),i.insertAdjacentElement("afterend",t.element)):(this.contentItems[0].element.insertAdjacentElement("beforebegin",i),i.insertAdjacentElement("beforebegin",t.element))}else this._childElementContainer.appendChild(t.element);super.addChild(t,e);const n=1/this.contentItems.length*100;if(!0===i)return this.emitBaseBubblingEvent("stateChanged"),e;for(let e=0;e0&&(this.calculateRelativeSizes(),this.setAbsoluteSizes()),this.emitBaseBubblingEvent("stateChanged"),this.emit("resize")}setAbsoluteSizes(){const t=this.calculateAbsoluteSizes();for(let e=0;e0&&t.itemSizes[e]++,this._isColumn?(Tt(this.contentItems[e].element,t.crossAxisSize),At(this.contentItems[e].element,t.itemSizes[e])):(Tt(this.contentItems[e].element,t.itemSizes[e]),At(this.contentItems[e].element,t.crossAxisSize))}calculateAbsoluteSizes(){const t=(this.contentItems.length-1)*this._splitterSize,{width:e,height:i}=kt(this.element);let n,o;this._isColumn?(n=i-t,o=e):(n=e-t,o=i);let s=0;const r=[];for(let t=0;t0){const n=100-t;for(let t=0;t100&&e.length>0){for(let t=0;te)return;{const r=i/e;let a=i;for(let e=0;ethis.onSplitterDrag(e,t,i))),e.on("dragStop",(()=>this.onSplitterDragStop(e))),e.on("dragStart",(()=>this.onSplitterDragStart(e))),this._splitter.splice(t,0,e),e}getSplitItems(t){const e=this._splitter.indexOf(t);return{before:this.contentItems[e],after:this.contentItems[e+1]}}calculateContentItemMinSize(t){const e=t.minSize;if(void 0!==e){if(t.minSizeUnit===ht.Pixel)return e;throw new X("ROCGMD98831",JSON.stringify(t))}{const t=this.layoutManager.layoutConfig.dimensions;return this._isColumn?t.defaultMinItemHeight:t.defaultMinItemWidth}}calculateContentItemsTotalMinSize(t){let e=0;for(const i of t)e+=this.calculateContentItemMinSize(i);return e}onSplitterDragStart(t){const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=this.calculateContentItemsTotalMinSize(e.before.contentItems),s=this.calculateContentItemsTotalMinSize(e.after.contentItems);this._splitterPosition=0,this._splitterMinPosition=-1*(i-o),this._splitterMaxPosition=n-s}onSplitterDrag(t,e,i){let n=this._isColumn?i:e;if(null===this._splitterMinPosition||null===this._splitterMaxPosition)throw new K("ROCOSD59226");n=Math.max(n,this._splitterMinPosition),n=Math.min(n,this._splitterMaxPosition),this._splitterPosition=n;const o=zt(n);this._isColumn?t.element.style.top=o:t.element.style.left=o}onSplitterDragStop(t){if(null===this._splitterPosition)throw new K("ROCOSDS66932");{const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=(this._splitterPosition+i)/(i+n),s=e.before.size+e.after.size;e.before.size=o*s,e.after.size=(1-o)*s,t.element.style.top=zt(0),t.element.style.left=zt(0),globalThis.requestAnimationFrame((()=>this.updateSize(!1)))}}}!function(t){t.getElementDimensionSize=function(t,e){return"width"===e?function(t){return t.offsetWidth}(t):function(t){return t.offsetHeight}(t)},t.setElementDimensionSize=function(t,e,i){return"width"===e?Tt(t,i):At(t,i)},t.createElement=function(t,e){const i=t.createElement("div");return i.classList.add("lm_item"),e?i.classList.add("lm_column"):i.classList.add("lm_row"),i}}(Xt||(Xt={}));class Yt extends $t{constructor(t,e,i){super(t,vt.create(e),null,Yt.createElement(document)),this.isGround=!0,this._childElementContainer=this.element,this._containerElement=i;let n=null;for(;;){const t=n?n.previousSibling:this._containerElement.lastChild;if(!(t instanceof Element&&t.classList.contains("lm_content")))break;n=t}this._containerElement.insertBefore(this.element,n)}init(){if(!0!==this.isInitialised){this.updateNodeSize();for(let t=0;t0?this.contentItems[0]:this,n.isComponent)throw new Error("Cannot add item as child to ComponentItem");{const t=this.layoutManager.createAndInitContentItem(i,n);return e=n.addChild(t,e),n===this?-1:e}}loadComponentAsRoot(t){this.clearRoot();const e=Ct.resolve(t,!1);if(e.maximised)throw new Error("Root Component cannot be maximised");{const t=new jt(this.layoutManager,e,this);t.init(),this.addChild(t,0)}}addChild(t,e){if(this.contentItems.length>0)throw new Error("Ground node can only have a single child");return this._childElementContainer.appendChild(t.element),e=super.addChild(t,e),this.updateSize(!1),this.emitBaseBubblingEvent("stateChanged"),e}calculateConfigContent(){const t=this.contentItems,e=t.length,i=new Array(e);for(let n=0;n0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e)),this.updateContentItemsSize(!1))}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}createSideAreas(){const t=Yt.Area.oppositeSides,e=new Array(Object.keys(t).length);let i=0;for(const n in t){const o=n,s=this.getElementArea();if(null===s)throw new K("RCSA77553");s.side=o,"2"===t[o][1]?s[o]=s[t[o]]-50:s[o]=s[t[o]]+50,s.surface=(s.x2-s.x1)*(s.y2-s.y1),e[i++]=s}return e}highlightDropZone(t,e,i){this.layoutManager.tabDropPlaceholder.remove(),super.highlightDropZone(t,e,i)}onDrop(t,e){if(t.isComponent){const e=ut.createDefault(),i=t;e.header=mt.Header.createCopy(i.headerConfig);const n=this.layoutManager.createAndInitContentItem(e,this);n.addChild(t),t=n}if(0===this.contentItems.length)this.addChild(t);else{if(t.type===at.row||t.type===at.column){const e=ut.createDefault(),i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}const i="x"==e.side[0]?at.row:at.column,n="2"==e.side[1],o=this.contentItems[0];if(o instanceof Xt&&o.type===i){const e=o.contentItems[n?0:o.contentItems.length-1];o.addChild(t,n?0:void 0,!0),e.size*=.5,t.size=e.size,t.sizeUnit=ht.Percent,o.updateSize(!1)}else{const e=ct.createDefault(i),s=this.layoutManager.createContentItem(e,this);this.replaceChild(o,s),s.addChild(t,n?0:void 0,!0),s.addChild(o,n?void 0:0,!0),o.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}}dock(){throw new X("GID87731")}validateDocking(){throw new X("GIVD87732")}getAllContentItems(){const t=[this];return this.deepGetAllContentItems(this.contentItems,t),t}getConfigMaximisedItems(){const t=[];return this.deepFilterContentItems(this.contentItems,t,(t=>!(!Gt.isStack(t)||!t.initialWantMaximise)||!(!Gt.isComponentItem(t)||!t.initialWantMaximise))),t}getItemsByPopInParentId(t){const e=[];return this.deepFilterContentItems(this.contentItems,e,(e=>e.popInParentIds.includes(t))),e}toConfig(){throw new Error("Cannot generate GroundItem config")}setActiveComponentItem(t,e,i){}updateNodeSize(){const{width:t,height:e}=kt(this._containerElement);Tt(this.element,t),At(this.element,e),this.contentItems.length>0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e))}deepGetAllContentItems(t,e){for(let i=0;ithis.onClick(t),this._touchStartEventListener=t=>this.onTouchStart(t),this._element=document.createElement("div"),this._element.classList.add(i),this._element.title=e,this._header.on("destroy",(()=>this.destroy())),this._element.addEventListener("click",this._clickEventListener,{passive:!0}),this._element.addEventListener("touchstart",this._touchStartEventListener,{passive:!0}),this._header.controlsContainerElement.appendChild(this._element)}get element(){return this._element}destroy(){var t;this._element.removeEventListener("click",this._clickEventListener),this._element.removeEventListener("touchstart",this._touchStartEventListener),null===(t=this._element.parentNode)||void 0===t||t.removeChild(this._element)}onClick(t){this._pushEvent(t)}onTouchStart(t){this._pushEvent(t)}}class Jt{constructor(t,e,i,n,o){var s;this._layoutManager=t,this._componentItem=e,this._closeEvent=i,this._focusEvent=n,this._dragStartEvent=o,this._isActive=!1,this._tabClickListener=t=>this.onTabClickDown(t),this._tabTouchStartListener=t=>this.onTabTouchStart(t),this._closeClickListener=()=>this.onCloseClick(),this._closeTouchStartListener=()=>this.onCloseTouchStart(),this._dragStartListener=(t,e)=>this.onDragStart(t,e),this._contentItemDestroyListener=()=>this.onContentItemDestroy(),this._tabTitleChangedListener=t=>this.setTitle(t),this._element=document.createElement("div"),this._element.classList.add("lm_tab"),this._titleElement=document.createElement("span"),this._titleElement.classList.add("lm_title"),this._closeElement=document.createElement("div"),this._closeElement.classList.add("lm_close_tab"),this._element.appendChild(this._titleElement),this._element.appendChild(this._closeElement),e.isClosable?this._closeElement.style.display="":this._closeElement.style.display="none",this.setTitle(e.title),this._componentItem.on("titleChanged",this._tabTitleChangedListener);(null!==(s=e.reorderEnabled)&&void 0!==s?s:this._layoutManager.layoutConfig.settings.reorderEnabled)&&this.enableReorder(),this._element.addEventListener("click",this._tabClickListener,{passive:!0}),this._element.addEventListener("touchstart",this._tabTouchStartListener,{passive:!0}),this._componentItem.isClosable?(this._closeElement.addEventListener("click",this._closeClickListener,{passive:!0}),this._closeElement.addEventListener("touchstart",this._closeTouchStartListener,{passive:!0})):(this._closeElement.remove(),this._closeElement=void 0),this._componentItem.setTab(this),this._layoutManager.emit("tabCreated",this)}get isActive(){return this._isActive}get componentItem(){return this._componentItem}get contentItem(){return this._componentItem}get element(){return this._element}get titleElement(){return this._titleElement}get closeElement(){return this._closeElement}get reorderEnabled(){return void 0!==this._dragListener}set reorderEnabled(t){t!==this.reorderEnabled&&(t?this.enableReorder():this.disableReorder())}setTitle(t){this._titleElement.innerText=t,this._element.title=t}setActive(t){t!==this._isActive&&(this._isActive=t,t?this._element.classList.add("lm_active"):this._element.classList.remove("lm_active"))}destroy(){var t,e;this._closeEvent=void 0,this._focusEvent=void 0,this._dragStartEvent=void 0,this._element.removeEventListener("click",this._tabClickListener),this._element.removeEventListener("touchstart",this._tabTouchStartListener),null===(t=this._closeElement)||void 0===t||t.removeEventListener("click",this._closeClickListener),null===(e=this._closeElement)||void 0===e||e.removeEventListener("touchstart",this._closeTouchStartListener),this._componentItem.off("titleChanged",this._tabTitleChangedListener),this.reorderEnabled&&this.disableReorder(),this._element.remove()}setBlurred(){this._element.classList.remove("lm_focused"),this._titleElement.classList.remove("lm_focused")}setFocused(){this._element.classList.add("lm_focused"),this._titleElement.classList.add("lm_focused")}onDragStart(t,e){if(void 0===this._dragListener)throw new J("TODSDLU10093");if(void 0===this._dragStartEvent)throw new J("TODS23309");this._dragStartEvent(t,e,this._dragListener,this.componentItem)}onContentItemDestroy(){void 0!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=void 0)}onTabClickDown(t){const e=t.target;e!==this._element&&e!==this._titleElement||(0===t.button?this.notifyFocus():1===t.button&&this._componentItem.isClosable&&this.notifyClose())}onTabTouchStart(t){t.target===this._element&&this.notifyFocus()}onCloseClick(){this.notifyClose()}onCloseTouchStart(){this.notifyClose()}notifyClose(){if(void 0===this._closeEvent)throw new J("TNC15007");this._closeEvent(this._componentItem)}notifyFocus(){if(void 0===this._focusEvent)throw new J("TNA15007");this._focusEvent(this._componentItem)}enableReorder(){this._dragListener=new Zt(this._element,[this._titleElement]),this._dragListener.on("dragStart",this._dragStartListener),this._componentItem.on("destroy",this._contentItemDestroyListener)}disableReorder(){if(void 0===this._dragListener)throw new J("TDR87745");this._componentItem.off("destroy",this._contentItemDestroyListener),this._dragListener.off("dragStart",this._dragStartListener),this._dragListener=void 0}}class Qt{constructor(t,e,i,n,o){this._layoutManager=t,this._componentRemoveEvent=e,this._componentFocusEvent=i,this._componentDragStartEvent=n,this._dropdownActiveChangedEvent=o,this._tabs=[],this._lastVisibleTabIndex=-1,this._dropdownActive=!1,this._element=document.createElement("section"),this._element.classList.add("lm_tabs"),this._dropdownElement=document.createElement("section"),this._dropdownElement.classList.add("lm_tabdropdown_list"),this._dropdownElement.style.display="none"}get tabs(){return this._tabs}get tabCount(){return this._tabs.length}get lastVisibleTabIndex(){return this._lastVisibleTabIndex}get element(){return this._element}get dropdownElement(){return this._dropdownElement}get dropdownActive(){return this._dropdownActive}destroy(){for(let t=0;tthis.handleTabCloseEvent(t)),(t=>this.handleTabFocusEvent(t)),((t,e,i,n)=>this.handleTabDragStartEvent(t,e,i,n)));void 0===e&&(e=this._tabs.length),this._tabs.splice(e,0,i),ethis._lastVisibleTabIndex){const t=this._tabs[e];for(let t=e;t>0;t--)this._tabs[t]=this._tabs[t-1];this._tabs[0]=t}}updateTabSizes(t,e){let i=!1;this.tryUpdateTabSizes(i,t,e)||(i=!0,this.tryUpdateTabSizes(i,t,e)),i!==this._dropdownActive&&(this._dropdownActive=i,this._dropdownActiveChangedEvent())}tryUpdateTabSizes(t,e,i){if(this._tabs.length>0){if(void 0===i)throw new Error("non-empty tabs must have active component item");let n=0,o=!1;const s=this._layoutManager.layoutConfig.settings.tabOverlapAllowance,r=this._tabs.indexOf(i.tab),a=this._tabs[r];this._lastVisibleTabIndex=-1;for(let i=0;ie){if(o)i===r&&(l.style.zIndex="auto",l.style.marginLeft="",l.parentElement!==this._element&&this._element.appendChild(l));else{let t;if(t=r>0&&r<=i?(d-e)/(i-1):(d-e)/i,tthis.onClick(t),this._touchStartListener=t=>this.onTouchStart(t),this._rowColumnClosable=!0,this._closeButton=null,this._popoutButton=null,this._tabsContainer=new Qt(this._layoutManager,(t=>this.handleTabInitiatedComponentRemoveEvent(t)),(t=>this.handleTabInitiatedComponentFocusEvent(t)),((t,e,i,n)=>this.handleTabInitiatedDragStartEvent(t,e,i,n)),(()=>this.processTabDropdownActiveChanged())),this._show=i.show,this._popoutEnabled=i.popoutEnabled,this._popoutLabel=i.popoutLabel,this._maximiseEnabled=i.maximiseEnabled,this._maximiseLabel=i.maximiseLabel,this._minimiseEnabled=i.minimiseEnabled,this._minimiseLabel=i.minimiseLabel,this._closeEnabled=i.closeEnabled,this._closeLabel=i.closeLabel,this._tabDropdownEnabled=i.tabDropdownEnabled,this._tabDropdownLabel=i.tabDropdownLabel,this.setSide(i.side),this._canRemoveComponent=this._configClosable,this._element=document.createElement("section"),this._element.classList.add("lm_header"),this._controlsContainerElement=document.createElement("section"),this._controlsContainerElement.classList.add("lm_controls"),this._element.appendChild(this._tabsContainer.element),this._element.appendChild(this._controlsContainerElement),this._element.appendChild(this._tabsContainer.dropdownElement),this._element.addEventListener("click",this._clickListener,{passive:!0}),this._element.addEventListener("touchstart",this._touchStartListener,{passive:!0}),this._documentMouseUpListener=()=>this._tabsContainer.hideAdditionalTabsDropdown(),globalThis.document.addEventListener("mouseup",this._documentMouseUpListener,{passive:!0}),this._tabControlOffset=this._layoutManager.layoutConfig.settings.tabControlOffset,this._tabDropdownEnabled&&(this._tabDropdownButton=new Kt(this,this._tabDropdownLabel,"lm_tabdropdown",(()=>this._tabsContainer.showAdditionalTabsDropdown()))),this._popoutEnabled&&(this._popoutButton=new Kt(this,this._popoutLabel,"lm_popout",(()=>this.handleButtonPopoutEvent()))),this._maximiseEnabled&&(this._maximiseButton=new Kt(this,this._maximiseLabel,"lm_maximise",(t=>this.handleButtonMaximiseToggleEvent(t)))),this._configClosable&&(this._closeButton=new Kt(this,this._closeLabel,"lm_close",(()=>s()))),this.processTabDropdownActiveChanged()}get show(){return this._show}get side(){return this._side}get leftRightSided(){return this._leftRightSided}get layoutManager(){return this._layoutManager}get parent(){return this._parent}get tabs(){return this._tabsContainer.tabs}get lastVisibleTabIndex(){return this._tabsContainer.lastVisibleTabIndex}get element(){return this._element}get tabsContainerElement(){return this._tabsContainer.element}get controlsContainerElement(){return this._controlsContainerElement}destroy(){this.emit("destroy"),this._popoutEvent=void 0,this._maximiseToggleEvent=void 0,this._clickEvent=void 0,this._touchStartEvent=void 0,this._componentRemoveEvent=void 0,this._componentFocusEvent=void 0,this._componentDragStartEvent=void 0,this._tabsContainer.destroy(),globalThis.document.removeEventListener("mouseup",this._documentMouseUpListener),this._element.remove()}createTab(t,e){this._tabsContainer.createTab(t,e)}removeTab(t){this._tabsContainer.removeTab(t)}processActiveComponentChanged(t){this._tabsContainer.processActiveComponentChanged(t),this.updateTabSizes()}setSide(t){this._side=t,this._leftRightSided=[nt.right,nt.left].includes(this._side)}setRowColumnClosable(t){this._rowColumnClosable=t,this.updateClosability()}updateClosability(){let t;if(this._configClosable)if(this._rowColumnClosable){t=!0;const e=this.tabs.length;for(let i=0;i1}applyFocusedValue(t){t?this._element.classList.add("lm_focused"):this._element.classList.remove("lm_focused")}processMaximised(){if(void 0===this._maximiseButton)throw new J("HPMAX16997");this._maximiseButton.element.setAttribute("title",this._minimiseLabel)}processMinimised(){if(void 0===this._maximiseButton)throw new J("HPMIN16997");this._maximiseButton.element.setAttribute("title",this._maximiseLabel)}updateTabSizes(){if(this._tabsContainer.tabCount>0){const t=this._show?this._layoutManager.layoutConfig.dimensions.headerHeight:0;let e;this._leftRightSided?(this._element.style.height="",this._element.style.width=zt(t)):(this._element.style.width="",this._element.style.height=zt(t)),e=this._leftRightSided?this._element.offsetHeight-this._controlsContainerElement.offsetHeight-this._tabControlOffset:this._element.offsetWidth-this._controlsContainerElement.offsetWidth-this._tabControlOffset,this._tabsContainer.updateTabSizes(e,this._getActiveComponentItemEvent())}}handleTabInitiatedComponentRemoveEvent(t){if(this._canRemoveComponent){if(void 0===this._componentRemoveEvent)throw new J("HHTCE22294");this._componentRemoveEvent(t)}}handleTabInitiatedComponentFocusEvent(t){if(void 0===this._componentFocusEvent)throw new J("HHTAE22294");this._componentFocusEvent(t)}handleTabInitiatedDragStartEvent(t,e,i,n){if(this._canRemoveComponent){if(void 0===this._componentDragStartEvent)throw new J("HHTDSE22294");this._componentDragStartEvent(t,e,i,n)}else i.cancelDrag()}processTabDropdownActiveChanged(){void 0!==this._tabDropdownButton&&Dt(this._tabDropdownButton.element,this._tabsContainer.dropdownActive)}handleButtonPopoutEvent(){if(this._layoutManager.layoutConfig.settings.popoutWholeStack){if(void 0===this._popoutEvent)throw new J("HHBPOE17834");this._popoutEvent()}else{const t=this._getActiveComponentItemEvent();t&&t.popout()}}handleButtonMaximiseToggleEvent(t){if(void 0===this._maximiseToggleEvent)throw new J("HHBMTE16834");this._maximiseToggleEvent()}onClick(t){t.target===this._element&&this.notifyClick(t)}onTouchStart(t){t.target===this._element&&this.notifyTouchStart(t)}notifyClick(t){if(void 0===this._clickEvent)throw new J("HNHC46834");this._clickEvent(t)}notifyTouchStart(t){if(void 0===this._touchStartEvent)throw new J("HNHTS46834");this._touchStartEvent(t)}}class ee extends $t{constructor(t,e,i){var n,o,s,r,a,l,h,d,c,m,u,p,g,f,v,_,y,C,w;super(t,e,i,ee.createElement(document)),this._headerSideChanged=!1,this._resizeListener=()=>this.handleResize(),this._maximisedListener=()=>this.handleMaximised(),this._minimisedListener=()=>this.handleMinimised(),this._headerConfig=e.header;const I=t.layoutConfig.header,b=e.content;let S;if(1!==b.length)S=void 0;else{S=b[0].header}this._initialWantMaximise=e.maximised,this._initialActiveItemIndex=null!==(n=e.activeItemIndex)&&void 0!==n?n:0;const E=null!==(r=null!==(s=null===(o=this._headerConfig)||void 0===o?void 0:o.show)&&void 0!==s?s:null==S?void 0:S.show)&&void 0!==r?r:I.show,x=null!==(h=null!==(l=null===(a=this._headerConfig)||void 0===a?void 0:a.popout)&&void 0!==l?l:null==S?void 0:S.popout)&&void 0!==h?h:I.popout,L=null!==(m=null!==(c=null===(d=this._headerConfig)||void 0===d?void 0:d.maximise)&&void 0!==c?c:null==S?void 0:S.maximise)&&void 0!==m?m:I.maximise,z=null!==(g=null!==(p=null===(u=this._headerConfig)||void 0===u?void 0:u.close)&&void 0!==p?p:null==S?void 0:S.close)&&void 0!==g?g:I.close,M=null!==(_=null!==(v=null===(f=this._headerConfig)||void 0===f?void 0:f.minimise)&&void 0!==v?v:null==S?void 0:S.minimise)&&void 0!==_?_:I.minimise,P=null!==(w=null!==(C=null===(y=this._headerConfig)||void 0===y?void 0:y.tabDropdown)&&void 0!==C?C:null==S?void 0:S.tabDropdown)&&void 0!==w?w:I.tabDropdown;this._maximisedEnabled=!1!==L;const T={show:!1!==E,side:!1===E?nt.top:E,popoutEnabled:!1!==x,popoutLabel:!1===x?"":x,maximiseEnabled:this._maximisedEnabled,maximiseLabel:!1===L?"":L,closeEnabled:!1!==z,closeLabel:!1===z?"":z,minimiseEnabled:!0,minimiseLabel:M,tabDropdownEnabled:!1!==P,tabDropdownLabel:!1===P?"":P};this._header=new te(t,this,T,e.isClosable&&!1!==z,(()=>this.getActiveComponentItem()),(()=>this.remove()),(()=>this.handlePopoutEvent()),(()=>this.toggleMaximise()),(t=>this.handleHeaderClickEvent(t)),(t=>this.handleHeaderTouchStartEvent(t)),(t=>this.handleHeaderComponentRemoveEvent(t)),(t=>this.handleHeaderComponentFocusEvent(t)),((t,e,i,n)=>this.handleHeaderComponentStartDragEvent(t,e,i,n))),this.isStack=!0,this._childElementContainer=document.createElement("section"),this._childElementContainer.classList.add("lm_items"),this.on("resize",this._resizeListener),this._maximisedEnabled&&(this.on("maximised",this._maximisedListener),this.on("minimised",this._minimisedListener)),this.element.appendChild(this._header.element),this.element.appendChild(this._childElementContainer),this.setupHeaderPosition(),this._header.updateClosability()}get childElementContainer(){return this._childElementContainer}get header(){return this._header}get headerShow(){return this._header.show}get headerSide(){return this._header.side}get headerLeftRightSided(){return this._header.leftRightSided}get contentAreaDimensions(){return this._contentAreaDimensions}get initialWantMaximise(){return this._initialWantMaximise}get isMaximised(){return this===this.layoutManager.maximisedStack}get stackParent(){if(!this.parent)throw new Error("Stack should always have a parent");return this.parent}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}init(){if(!0===this.isInitialised)return;this.updateNodeSize();for(let t=0;t0){if(this._initialActiveItemIndex<0||this._initialActiveItemIndex>=e)throw new Error(`ActiveItemIndex out of range: ${this._initialActiveItemIndex} id: ${this.id}`);for(let i=0;ithis.contentItems.length)throw e-=1,new X("SAC99728");if(t instanceof jt)return e=super.addChild(t,e),this._childElementContainer.appendChild(t.element),this._header.createTab(t,e),this.setActiveComponentItem(t,i),this._header.updateTabSizes(),this.updateSize(!1),t.container.setBaseLogicalZIndex(),this._header.updateClosability(),this.emitStateChangedEvent(),e;throw new X("SACC88532")}removeChild(t,e){const i=t,n=this.contentItems.indexOf(i),o=1===this.contentItems.length;if(this._activeComponentItem===i&&(i.focused&&i.blur(),!o)){const t=0===n?1:n-1;this.setActiveComponentItem(this.contentItems[t],!1)}this._header.removeTab(i),super.removeChild(i,e),o||this._header.updateClosability(),this.emitStateChangedEvent()}toggleMaximise(){this.isMaximised?this.minimise():this.maximise()}maximise(){if(!this.isMaximised){this.layoutManager.setMaximisedStack(this);const t=this.contentItems,e=t.length;for(let i=0;i0&&void 0===t)throw new Error("expected non-empty stack to have an active component item");return{type:"stack",content:this.calculateConfigContent(),size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,isClosable:this.isClosable,maximised:this.isMaximised,header:this.createHeaderConfig(),activeItemIndex:t}}onDrop(t,e){if("header"===this._dropSegment){if(this.resetHeaderDropZone(),void 0===this._dropIndex)throw new J("SODDI68990");return void this.addChild(t,this._dropIndex)}if("body"===this._dropSegment)return void this.addChild(t,0,!0);const i="top"===this._dropSegment||"bottom"===this._dropSegment,n="left"===this._dropSegment||"right"===this._dropSegment,o="top"===this._dropSegment||"left"===this._dropSegment,s=i&&this.stackParent.isColumn||n&&this.stackParent.isRow;if(t.isComponent){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createAndInitContentItem(e,this);i.addChild(t),t=i}if(t.type===at.row||t.type===at.column){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}if(s){const e=this.stackParent.contentItems.indexOf(this);this.stackParent.addChild(t,o?e:e+1,!0),this.size*=.5,t.size=this.size,t.sizeUnit=this.sizeUnit,this.stackParent.updateSize(!1)}else{const e=i?at.column:at.row,n=ct.createDefault(e),s=this.layoutManager.createContentItem(n,this);this.stackParent.replaceChild(this,s),s.addChild(t,o?0:void 0,!0),s.addChild(this,o?void 0:0,!0),this.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}highlightDropZone(t,e){for(const i in this._contentAreaDimensions){const n=i,o=this._contentAreaDimensions[n].hoverArea;if(o.x1t&&o.y1e)return void("header"===n?(this._dropSegment="header",this.highlightHeaderDropZone(this._header.leftRightSided?e:t)):(this.resetHeaderDropZone(),this.highlightBodyDropZone(n)))}}getArea(){if("none"===this.element.style.display)return null;const t=super.getElementArea(this._header.element),e=super.getElementArea(this._childElementContainer);if(null===t||null===e)throw new K("SGAHC13086");const i=e.x2-e.x1,n=e.y2-e.y1;return this._contentAreaDimensions={header:{hoverArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2},highlightArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2}}},0===this.contentItems.length?(this._contentAreaDimensions.body={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2}},super.getElementArea(this.element)):(this._contentAreaDimensions.left={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x1+.25*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x1+.5*i,y2:e.y2}},this._contentAreaDimensions.top={hoverArea:{x1:e.x1+.25*i,y1:e.y1,x2:e.x1+.75*i,y2:e.y1+.5*n},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y1+.5*n}},this._contentAreaDimensions.right={hoverArea:{x1:e.x1+.75*i,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1+.5*i,y1:e.y1,x2:e.x2,y2:e.y2}},this._contentAreaDimensions.bottom={hoverArea:{x1:e.x1+.25*i,y1:e.y1+.5*n,x2:e.x1+.75*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1+.5*n,x2:e.x2,y2:e.y2}},super.getElementArea(this.element))}positionHeader(t){this._header.side!==t&&(this._header.setSide(t),this._headerSideChanged=!0,this.setupHeaderPosition())}updateNodeSize(){if("none"!==this.element.style.display){const t=kt(this.element);if(this._header.show){t[this._header.leftRightSided?it.width:it.height]-=this.layoutManager.layoutConfig.dimensions.headerHeight}this._childElementContainer.style.width=zt(t.width),this._childElementContainer.style.height=zt(t.height);for(let e=0;e=o&&t({...t,[e]:i});async function s(t,e){return(await Promise.all(e.map((async([e,i])=>[e,await t(i,e)])))).reduce(o,{})}n.mapEntriesAsync=s,n.mapValuesAsync=async function(t,e){let i;return i=e instanceof Map?[...e.entries()]:Object.entries(e),s(t,i)};var r,a,l,h,d=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldSet||function(t,e,i,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(t,i):o?o.value=i:e.set(t,i),i},c=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldGet||function(t,e,i,n){if("a"===i&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?n:"a"===i?n.call(t):n?n.value:e.get(t)};Object.defineProperty(i,"__esModule",{value:!0});var m=i.DefaultLayoutManager=void 0;const u=n;class p{constructor(t){a.set(this,void 0),l.set(this,new Map),d(this,a,t,"f")}size(){return c(this,l,"f").size}async applyLayoutSnapshot({layouts:t}){if(Object.keys(t).length>1)throw new Error("[LayoutManager] Tried to call applyLayoutSnapshot with more than 1 layout. When implementing multiple layouts via overridden LayoutManager class, you must override and fully implement the applyLayoutSnapshot method without calling super.applyLayoutSnapshot().");const[[e,i]]=Object.entries(t);await p.createLayout(this,{layoutName:e,layout:i})}async showLayout({layoutName:t}){}async getLayoutSnapshot(){return{layouts:await(0,u.mapValuesAsync)((t=>t.getFrameSnapshot()),c(this,l,"f"))}}async removeLayout({layoutName:t}){}getLayoutIdentityForView(t){const e=[...c(this,l,"f").values()].find((e=>e.getCurrentViews().some((e=>e.name===t.name&&e.uuid===t.uuid))));return e?.identity??void 0}isLayoutVisible({layoutName:t}){return c(p,r,"m",h).call(p,this,t).isVisible()}resolveLayoutIdentity(t){if(t&&"layoutName"in t)return t;const e=[...c(this,l,"f").values()];if(1===e.length)return e[0].identity;const i=e.find((t=>t.isVisible()));return i?.identity??void 0}static async resolveLayout(t,e){const i=t.resolveLayoutIdentity(e);if(void 0===i||!("layoutName"in i))throw new Error("[layout-manager] resolveLayout: Could not resolve the layout identity. Make sure you include 'layoutName' in the identity object.");return c(p,r,"m",h).call(p,t,i.layoutName)}static async handleSharedView(t,e,i){await(0,u.mapValuesAsync)((async t=>{if(t.identity.layoutName!==e.layoutName){const e=t.getCurrentViews().find((t=>t.name===i.name));e&&await t.onViewDetached({viewIdentity:e,target:null}).catch(console.error)}}),c(t,l,"f"))}static async handleLastViewRemoved(t,e){await t.removeLayout(e),await c(t,a,"f").handleLastViewRemoved(t)}static async destroyLayout(t,{layoutName:e}){await c(p,r,"m",h).call(p,t,e).destroy(),c(t,l,"f").delete(e)}static async createLayout(t,e){const{layoutName:i}=e;if(c(t,l,"f").has(i))throw new Error(`Layout name ${i} already exists`);await c(t,a,"f").createLayout(e,t)}static registerLayout(t,e,i){c(t,l,"f").set(e,i)}static getAllLayouts(t){return[...c(t,l,"f").values()]}static setInitialSnapshot(t,e){c(t,a,"f").setInitialSnapshot(e)}static createClosedConstructor(...t){return class extends p{constructor(){super(...t)}}}}m=i.DefaultLayoutManager=p,r=p,a=new WeakMap,l=new WeakMap,h=function(t,e){const i=c(t,l,"f").get(e);if(!i)throw new Error(`[layout-manager] getLayoutByName: Could not locate layout with name '${e}'`);return i};var g={},f={},v={};Object.defineProperty(v,"__esModule",{value:!0}),v.ReversibleMap=void 0;v.ReversibleMap=class{constructor(){this.valueToKey=new Map,this.keyToValue=new Map,this.setUnique=(t,e)=>{if(this.hasKey(t)||this.hasValue(e))throw new Error("Key or value already in the map.");this.keyToValue.set(t,e),this.valueToKey.set(e,t)},this.getKey=t=>{const e=this.valueToKey.get(t);if(!e)throw new Error("Value not found in the map.");return e},this.deleteKey=t=>{const e=this.getValue(t);return this.keyToValue.delete(t),this.valueToKey.delete(e),e},this.deleteValue=t=>{const e=this.getKey(t);return this.keyToValue.delete(e),this.valueToKey.delete(t),e},this.hasKey=t=>this.keyToValue.has(t),this.hasValue=t=>this.valueToKey.has(t)}getValue(t){const e=this.keyToValue.get(t);if(!e)throw new Error("Key not found in the map.");return e}},Object.defineProperty(f,"__esModule",{value:!0});var _=f.LayoutContentCache=void 0;const y=t.lazy,C=v;class w{constructor(){this.contentItemCache=new C.ReversibleMap,this.contentItemCacheId=0,this.createCacheKey=()=>{const t=`entity-${this.contentItemCacheId.toString()}`;return this.contentItemCacheId+=1,t},this.hasKey=t=>this.contentItemCache.hasKey(t),this.getItemOrUndefined=t=>{try{return this.getContentItemOrThrow(t)}catch(t){return}},this.getContentItemOrThrow=(t,e)=>{if(!this.contentItemCache.hasKey(t))throw new Error("Layout component has been destroyed or detached from the current layout.");const i=this.contentItemCache.getValue(t);if(e&&!e.includes(i.type))throw new Error(`Layout item is not the expected type. Expected ${e.join(", ")}, got ${i.type}.`);return i},this.getOrCreateEntityId=t=>{if(this.contentItemCache.hasValue(t))return this.contentItemCache.getKey(t);t.onDestroyed((()=>{this.contentItemCache.deleteValue(t)}));const e=this.createCacheKey();return this.contentItemCache.setUnique(e,t),e}}static getSingleInstance(){return w.singleton.getValue()}}_=f.LayoutContentCache=w,w.singleton=new y.Lazy((()=>new w));var I={},b={};!function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.getAdjacentStacks=t.doShareEdge=t.getAdjacentItem=void 0;t.getAdjacentItem=(e,i)=>{const{parent:n}=e;if(e.isRoot()||!n)return;const o=["top","bottom"].includes(i)?"column":"row",s=["top","left"].includes(i)?-1:1;if(n.type===o){const t=n.contentItems.indexOf(e)+s;if(t>=0&&t{const n=t.getBounds(),o=e.getBounds();if(!n||!o)return!1;if(["top","bottom"].includes(i)){return!(n.righto.right)}return!(n.bottomo.bottom)};t.getAdjacentStacks=(e,i)=>{const n=["top","bottom"].includes(i)?"row":"column",o=s=>"stack"===s.type?(0,t.doShareEdge)(e,s,i)?[s]:[]:"root"===s.type||"ground"===s.type?[]:s.type===n?s.contentItems.map((t=>o(t))).flat():s.type!==n?["top","right"].includes(i)?o(s.contentItems[s.contentItems.length-1]):o(s.contentItems[0]):[],s=(0,t.getAdjacentItem)(e,i);return s?o(s):[]}}(b);var S=t.commonjsGlobal&&t.commonjsGlobal.__decorate||function(t,e,i,n){var o,s=arguments.length,r=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(s<3?o(r):s>3?o(e,i,r):o(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};Object.defineProperty(I,"__esModule",{value:!0}),I.LayoutEntitiesController=void 0;const E=t.decorators,x=b,L=i;class z{constructor(t,e,i){this.wire=t,this.layoutManager=e,this.layoutContentCache=i,this.analytics=t=>{this.wire.sendAction(`layout-controller-${t}`).catch((()=>{}))},this.getLayoutIdentityForViewOrThrow=async t=>{const e=this.layoutManager.getLayoutIdentityForView(t);if(!e)throw new Error(`View identity ${t.name} is not attached to any layouts.`);return e},this.getRoot=async t=>{this.analytics("get-root");const e=(await this.getLayout(t)).getRoot();return{type:e.type,entityId:this.layoutContentCache.getOrCreateEntityId(e)}},this.getStackByView=async t=>{this.analytics("get-stack-by-view");const e=await this.getLayoutIdentityForViewOrThrow(t),i=(await this.getLayout(e)).getStackByView(t);if("stack"===i?.type)return{entityId:this.layoutContentCache.getOrCreateEntityId(i),type:"stack"}},this.getStackViews=t=>{this.analytics("get-stack-views");return this.layoutContentCache.getContentItemOrThrow(t,["stack"]).contentItems.map((t=>({name:t.viewName,uuid:this.wire.me.uuid})))},this.isRoot=t=>{this.analytics("is-root");return this.layoutContentCache.getContentItemOrThrow(t).isRoot()},this.exists=t=>(this.analytics("exists"),this.layoutContentCache.hasKey(t)),this.addViewToStack=async(t,e,{index:i}={index:0})=>{this.analytics("add-view-to-stack");const n=this.layoutContentCache.getContentItemOrThrow(t);if(i&&i>n.contentItems.length+1)throw new Error(`Index '${i}' out of range, please exclude the index or specify a number between 0 and ${n.contentItems.length}`);const o={id:t,index:i},{identity:s}=await n.layout.platformCreateView(e,{location:o});return s},this.findViewInStack=(t,e)=>t.contentItems.find((t=>t.viewName===e.name)),this.removeViewFromStack=async(t,e)=>{this.analytics("remove-view-from-stack");const i=this.layoutContentCache.getContentItemOrThrow(t,["stack"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to remove a view ('${e.name}') which does not belong to the stack.`);await n.layout.platformCloseView(e)},this.createAdjacentStack=async(t,e,{position:i="right"}={})=>{if(this.analytics("create-adjacent-stack"),!Array.isArray(e)||0===e.length)throw new Error('The parameter "views" must be an array with at least 1 element.');if(!["top","bottom","left","right"].includes(i))throw new Error(`Invalid position '${i}' specified.`);const n=this.layoutContentCache.getContentItemOrThrow(t).createAdjacentStack({position:i}),o=this.layoutContentCache.getOrCreateEntityId(n);return await Promise.all(e.reverse().map((t=>this.addViewToStack(o,t)))),o},this.getAdjacentStacks=async({targetId:t,edge:e})=>{this.analytics("get-adjacent-stacks");const i=this.layoutContentCache.getContentItemOrThrow(t);return(0,x.getAdjacentStacks)(i,e).map((t=>({entityId:this.layoutContentCache.getOrCreateEntityId(t)})))},this.setStackActiveView=async(t,e)=>{this.analytics("set-stack-active-view");const i=this.layoutContentCache.getContentItemOrThrow(t,["stack"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to set a view ('${e.name}') as active when it does not belong to the stack.`);i.setActiveContentItem(n,!0)}}async getLayout(t){const e=await L.DefaultLayoutManager.resolveLayout(this.layoutManager,t);if(!e)throw new Error(`Could not resolve target layout identity ${JSON.stringify(t)}`);return e}getContent(t){this.analytics("get-content");return this.layoutContentCache.getContentItemOrThrow(t,["column","row"]).contentItems.map((t=>({type:t.type,entityId:this.layoutContentCache.getOrCreateEntityId(t)})))}getParent(t){this.analytics("get-parent");const e=this.layoutContentCache.getContentItemOrThrow(t);if(!e.isRoot())return e.parent?.contentItems.includes(e)?{type:e.parent.type,entityId:this.layoutContentCache.getOrCreateEntityId(e.parent)}:void 0}}S([(0,E.expose)()],z.prototype,"getLayoutIdentityForViewOrThrow",void 0),S([(0,E.expose)()],z.prototype,"getRoot",void 0),S([(0,E.expose)()],z.prototype,"getStackByView",void 0),S([(0,E.expose)()],z.prototype,"getStackViews",void 0),S([(0,E.expose)()],z.prototype,"getContent",null),S([(0,E.expose)()],z.prototype,"getParent",null),S([(0,E.expose)()],z.prototype,"isRoot",void 0),S([(0,E.expose)()],z.prototype,"exists",void 0),S([(0,E.expose)()],z.prototype,"addViewToStack",void 0),S([(0,E.expose)()],z.prototype,"removeViewFromStack",void 0),S([(0,E.expose)()],z.prototype,"createAdjacentStack",void 0),S([(0,E.expose)()],z.prototype,"getAdjacentStacks",void 0),S([(0,E.expose)()],z.prototype,"setStackActiveView",void 0),I.LayoutEntitiesController=z,Object.defineProperty(g,"__esModule",{value:!0});var M=g.initLayoutEndpoints=void 0;const P=t.apiExposer,T=t.layout_constants,A=f,k=I,D=i;M=g.initLayoutEndpoints=async function(t,e){const i=t.getFin(),n=await i.Platform.getCurrentSync().getClient(),o=new P.ChannelsExposer(n);await new P.ApiExposer(o).exposeInstance(new k.LayoutEntitiesController(t,e,A.LayoutContentCache.getSingleInstance()),{id:T.LAYOUT_CONTROLLER_ID}),await async function(t,e){const i=t=>async i=>{const n=await D.DefaultLayoutManager.resolveLayout(e,i.target);if(!n)throw new Error(`Could not resolve the layout target from payload ${JSON.stringify(i)}`);return t(n,i)},n=(e,n)=>{t.register(e,i(n))},o=(t,e)=>{n(t,e)};n("replace-view",((t,e)=>t.replaceView(e))),n("replace-layout",((t,{layout:e})=>t.replaceLayout(e))),n("add-view",((t,e)=>t.insertView(e))),o("layout-add-view",((t,{viewOptions:e,location:i,targetView:n})=>t.platformCreateView(e,{location:i,targetView:n}))),n("close-view",((t,e)=>t.cleanupView(e.viewIdentity))),o("layout-close-view",((t,e)=>t.platformCloseView(e.viewIdentity))),n("apply-preset-layout",((t,e)=>t.applyPreset(e))),n("get-layout-views",(t=>t.getCurrentViews())),n("get-frame-snapshot",(t=>t.getFrameSnapshot())),n("is-visible",(t=>t.isVisible())),n("destroy",(t=>t.destroy())),t.register("get-layout-snapshot",(()=>e.getLayoutSnapshot()))}(n,e)};var R={};Object.defineProperty(R,"__esModule",{value:!0});var U=R.BaseLayout=void 0;U=R.BaseLayout=class{};var O={};Object.defineProperty(O,"__esModule",{value:!0});var V=O.DOMEmitter=void 0;V=O.DOMEmitter=class{constructor(t){this.container=t}dispatchLocalEvent(t,e){const i={...e,type:t,tabSelector:`tab-${e.name}`,containerSelector:`container-${e.name}`,topic:"openfin-DOM-event"};this.container.dispatchEvent(new CustomEvent(t,{detail:i}))}};var B={};Object.defineProperty(B,"__esModule",{value:!0});var H=B.mapLayoutContentItemsImmutableSync=B.mapLayoutContentItemsImmutable=W=B.isVisible=void 0;var W=B.isVisible=t=>(0!==t.offsetWidth||0!==t.offsetHeight)&&"hidden"!==window.getComputedStyle(t).visibility&&t.offsetTop>=0&&t.offsetLeft>=0&&t.offsetTop<=window.innerHeight&&t.offsetLeft<=window.innerWidth;const F=t=>"type"in t&&"component"===t.type;B.mapLayoutContentItemsImmutable=async function t(e,i){return F(i)?e(i):{...i,content:await Promise.all(i.content?.map((i=>t(e,i))))}},H=B.mapLayoutContentItemsImmutableSync=function t(e,i){return F(i)?e(i):{...i,content:i.content?.map((i=>t(e,i)))}};class N extends Error{constructor(t,e){super(e),this.type=t}}class G extends N{constructor(t,e){super("Configuration",t),this.node=e}}class j extends N{constructor(t){super("PopoutBlocked",t)}}class $ extends N{constructor(t){super("API",t)}}class Z extends N{constructor(t){super("Bind",t)}}class q extends Error{constructor(t,e,i){super(`${t}: ${e}${void 0===i?"":": "+i}`)}}class X extends q{constructor(t,e){super("Assert",t,e)}}class Y extends q{constructor(t,e,i){super("UnreachableCase",t,`${e}${void 0===i?"":": "+i}`)}}class K extends q{constructor(t,e){super("UnexpectedNull",t,e)}}class J extends q{constructor(t,e){super("UnexpectedUndefined",t,e)}}var Q;!function(t){let e=!1;const i={PopoutCannotBeCreatedWithGroundItemConfig:{id:0,default:"Popout cannot be created with ground ItemConfig"},PleaseRegisterAConstructorFunction:{id:1,default:"Please register a constructor function"},ComponentTypeNotRegisteredAndBindComponentEventHandlerNotAssigned:{id:2,default:"Component type not registered and BindComponentEvent handler not assigned"},ComponentIsAlreadyRegistered:{id:3,default:"Component is already registered"},ComponentIsNotVirtuable:{id:4,default:"Component is not virtuable. Requires rootHtmlElement field/getter"},VirtualComponentDoesNotHaveRootHtmlElement:{id:5,default:'Virtual component does not have getter "rootHtmlElement"'},ItemConfigIsNotTypeComponent:{id:6,default:"ItemConfig is not of type component"},InvalidNumberPartInSizeString:{id:7,default:"Invalid number part in size string"},UnknownUnitInSizeString:{id:8,default:"Unknown unit in size string"},UnsupportedUnitInSizeString:{id:9,default:"Unsupported unit in size string"}};t.idCount=Object.keys(i).length;const n=Object.values(i);t.checkInitialise=function(){if(!e)for(let e=0;e="0"&&t<="9"}function Tt(t,e){const i=zt(e);t.style.width=i}function At(t,e){const i=zt(e);t.style.height=i}function kt(t){return{width:t.offsetWidth,height:t.offsetHeight}}function Dt(t,e){t.style.display=e?"":"none"}function Rt(t,e){if(void 0!==e)for(const i in e)if(e.hasOwnProperty(i)){const n=e[i],o=t[i];t[i]=Ut(o,n)}return t}function Ut(t,e){if("object"!=typeof e)return e;if(Array.isArray(e)){const t=e.length,i=new Array(t);for(let n=0;n36)throw new Error("Too many keys in config minifier map")},t.translateObject=n}(dt||(dt={})),function(t){t.defaults={type:at.ground,content:[],size:1,sizeUnit:ht.Fractional,minSize:void 0,minSizeUnit:ht.Pixel,id:"",isClosable:!0},t.createCopy=function(t,e){switch(t.type){case at.ground:case at.row:case at.column:return gt.createCopy(t,e);case at.stack:return ut.createCopy(t,e);case at.component:return pt.createCopy(t);default:throw new Y("CICC91354",t.type,"Invalid Config Item type specified")}},t.createDefault=function(t){switch(t){case at.ground:throw new X("CICCDR91562");case at.row:case at.column:return gt.createDefault(t);case at.stack:return ut.createDefault();case at.component:return pt.createDefault();default:throw new Y("CICCDD91563",t,"Invalid Config Item type specified")}},t.isComponentItem=function(t){return t.type===at.component},t.isStackItem=function(t){return t.type===at.stack},t.isGroundItem=function(t){return t.type===at.ground}}(ct||(ct={})),function(t){t.defaultMaximised=!1,function(t){t.createCopy=function(t,e){return void 0===t?void 0:{show:null!=e?e:t.show,popout:t.popout,close:t.close,maximise:t.maximise,minimise:t.minimise,tabDropdown:t.tabDropdown}}}(t.Header||(t.Header={}))}(mt||(mt={})),function(t){function e(t){const e=t.length,i=new Array(e);for(let n=0;n"__glMaximised"===t));t>0&&(o=!0,n=n.splice(t,1)),e=n.length>0?n[0]:ct.defaults.id}else e=n;return i=void 0!==t.maximised?t.maximised:o,{id:e,maximised:i}}}(wt||(wt={})),function(t){function e(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0;return{resolved:!0,root:Et.resolve(i),openPopouts:t.resolveOpenPopouts(e.openPopouts),dimensions:t.Dimensions.resolve(e.dimensions),settings:t.Settings.resolve(e.settings),header:t.Header.resolve(e.header,e.settings,e.labels)}}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:Lt.fromResolvedArray(e.openPopouts),settings:_t.Settings.createCopy(e.settings),dimensions:t.Dimensions.fromResolved(e.dimensions),header:_t.Header.createCopy(e.header)}},t.isResolved=function(t){const e=t;return void 0!==e.resolved&&!0===e.resolved},t.resolveOpenPopouts=function(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0,{root:Et.resolve(o),openPopouts:xt.resolveOpenPopouts(e.openPopouts),dimensions:xt.Dimensions.resolve(e.dimensions),settings:xt.Settings.resolve(e.settings),header:xt.Header.resolve(e.header,e.settings,e.labels),parentId:null!==(i=e.parentId)&&void 0!==i?i:null,indexInParent:null!==(n=e.indexInParent)&&void 0!==n?n:null,window:t.Window.resolve(e.window,e.dimensions),resolved:!0}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:i(e.openPopouts),dimensions:xt.Dimensions.fromResolved(e.dimensions),settings:_t.Settings.createCopy(e.settings),header:_t.Header.createCopy(e.header),parentId:e.parentId,indexInParent:e.indexInParent,window:t.Window.fromResolved(e.window)}},t.fromResolvedArray=i}(Lt||(Lt={}));class Wt{constructor(){this._allEventSubscriptions=[],this._subscriptionsMap=new Map,this.unbind=this.removeEventListener,this.trigger=this.emit}tryBubbleEvent(t,e){}emit(t,...e){let i=this._subscriptionsMap.get(t);if(void 0!==i){i=i.slice();for(let t=0;t0){const n=e.slice();n.unshift(t);const o=this._allEventSubscriptions.slice();for(let t=0;t0?n.contentItems[0]:n,e=0);const o=this._layoutManager.createAndInitContentItem(i,t);t.addChild(o,e),this._layoutManager.layoutConfig.settings.popInOnClose?this._onClose():this.close()}createWindow(){const t=this.createUrl(),e=Math.floor(1e6*Math.random()).toString(36),i=this.serializeWindowFeatures({width:this._initialWindowSize.width,height:this._initialWindowSize.height,innerWidth:this._initialWindowSize.width,innerHeight:this._initialWindowSize.height,menubar:"no",toolbar:"no",location:"no",personalbar:"no",resizable:"yes",scrollbars:"no",status:"no"});if(this._popoutWindow=globalThis.open(t,e,i),this._popoutWindow)this._popoutWindow.addEventListener("load",(()=>this.positionWindow()),{passive:!0}),this._popoutWindow.addEventListener("beforeunload",(()=>{this._layoutManager.layoutConfig.settings.popInOnClose?this.popIn():this._onClose()}),{passive:!0}),this._checkReadyInterval=setInterval((()=>this.checkReady()),10);else if(!0===this._layoutManager.layoutConfig.settings.blockedPopoutsThrowError){throw new j("Popout blocked")}}checkReady(){if(null===this._popoutWindow)throw new K("BPCR01844");this._popoutWindow.__glInstance&&this._popoutWindow.__glInstance.isInitialised&&(this.onInitialised(),void 0!==this._checkReadyInterval&&(clearInterval(this._checkReadyInterval),this._checkReadyInterval=void 0))}serializeWindowFeatures(t){const e=[];for(const i in t)e.push(i+"="+t[i].toString());return e.join(",")}createUrl(){const t="gl-window-config-"+Ot(),e=_t.minifyConfig(this._config);try{localStorage.setItem(t,JSON.stringify(e))}catch(t){throw new Error("Error while writing to localStorage "+function(t){return t instanceof Error?t.message:"string"==typeof t?t:"Unknown Error"}(t))}const i=new URL(location.href);return i.searchParams.set("gl-window",t),i.toString()}positionWindow(){if(null===this._popoutWindow)throw new Error("BrowserPopout.positionWindow: null popoutWindow");this._popoutWindow.moveTo(this._initialWindowSize.left,this._initialWindowSize.top),this._popoutWindow.focus()}onInitialised(){this._isInitialised=!0,this.getGlInstance().on("popIn",(()=>this.popIn())),this.emit("initialised")}_onClose(){setTimeout((()=>this.emit("closed")),50)}}class Gt extends Wt{constructor(t,e,i,n){super(),this.layoutManager=t,this._parent=i,this._element=n,this._popInParentIds=[],this._type=e.type,this._id=e.id,this._isInitialised=!1,this.isGround=!1,this.isRow=!1,this.isColumn=!1,this.isStack=!1,this.isComponent=!1,this.size=e.size,this.sizeUnit=e.sizeUnit,this.minSize=e.minSize,this.minSizeUnit=e.minSizeUnit,this._isClosable=e.isClosable,this._pendingEventPropagations={},this._throttledEvents=["stateChanged"],this._contentItems=this.createContentItems(e.content)}get type(){return this._type}get id(){return this._id}set id(t){this._id=t}get popInParentIds(){return this._popInParentIds}get parent(){return this._parent}get contentItems(){return this._contentItems}get isClosable(){return this._isClosable}get element(){return this._element}get isInitialised(){return this._isInitialised}static isStack(t){return t.isStack}static isComponentItem(t){return t.isComponent}static isComponentParentableItem(t){return t.isStack||t.isGround}removeChild(t,e=!1){const i=this._contentItems.indexOf(t);if(-1===i)throw new Error("Can't remove child item. Unknown content item");if(e||this._contentItems[i].destroy(),this._contentItems.splice(i,1),this._contentItems.length>0)this.updateSize(!1);else if(!this.isGround&&!0===this._isClosable){if(null===this._parent)throw new K("CIUC00874");this._parent.removeChild(this)}}addChild(t,e,i){return null!=e||(e=this._contentItems.length),this._contentItems.splice(e,0,t),t.setParent(this),!0===this._isInitialised&&!1===t._isInitialised&&t.init(),e}replaceChild(t,e,i=!1){const n=this._contentItems.indexOf(t),o=t._element.parentNode;if(-1===n)throw new X("CIRCI23232","Can't replace child. oldChild is not child of this");if(null===o)throw new K("CIRCP23232");if(o.replaceChild(e._element,t._element),!0===i&&(t._parent=null,t.destroy()),this._contentItems[n]=e,e.setParent(this),e.size=t.size,e.sizeUnit=t.sizeUnit,e.minSize=t.minSize,e.minSizeUnit=t.minSizeUnit,null===e._parent)throw new K("CIRCNC45699");!0===e._parent._isInitialised&&!1===e._isInitialised&&e.init(),this.updateSize(!1)}remove(){if(null===this._parent)throw new K("CIR11110");this._parent.removeChild(this)}popout(){const t=Ot(),e=this.layoutManager.createPopoutFromContentItem(this,void 0,t,void 0);return this.emitBaseBubblingEvent("stateChanged"),e}calculateConfigContent(){const t=this._contentItems,e=t.length,i=new Array(e);for(let n=0;nthis.propagateEventToLayoutManager(t,e))))}propagateEventToLayoutManager(t,e){this._pendingEventPropagations[t]=!1,this.layoutManager.emitUnknown(t,e)}}class jt extends Gt{constructor(t,e,i){super(t,e,i,document.createElement("div")),this._parentItem=i,this._focused=!1,this.isComponent=!0,this._reorderEnabled=e.reorderEnabled,this.applyUpdatableConfig(e),this._initialWantMaximise=e.maximised;const n=document.createElement("div");n.classList.add("lm_content"),this.element.appendChild(n),this._container=new Ft(e,this,t,n,(t=>this.handleUpdateItemConfigEvent(t)),(()=>this.show()),(()=>this.hide()),(t=>this.focus(t)),(t=>this.blur(t)))}get componentName(){return this._container.componentType}get componentType(){return this._container.componentType}get reorderEnabled(){return this._reorderEnabled}get initialWantMaximise(){return this._initialWantMaximise}get component(){return this._container.component}get container(){return this._container}get parentItem(){return this._parentItem}get headerConfig(){return this._headerConfig}get title(){return this._title}get tab(){return this._tab}get focused(){return this._focused}destroy(){this._container.destroy(),super.destroy()}applyUpdatableConfig(t){this.setTitle(t.title),this._headerConfig=t.header}toConfig(){const t=this._container.stateRequestEvent,e=void 0===t?this._container.state:t();return{type:at.component,content:[],size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,maximised:!1,isClosable:this.isClosable,reorderEnabled:this._reorderEnabled,title:this._title,header:mt.Header.createCopy(this._headerConfig),componentType:pt.copyComponentType(this.componentType),componentState:e}}close(){if(null===this.parent)throw new K("CIC68883");this.parent.removeChild(this,!1)}enterDragMode(t,e){Tt(this.element,t),At(this.element,e),this._container.enterDragMode(t,e)}exitDragMode(){this._container.exitDragMode()}enterStackMaximised(){this._container.enterStackMaximised()}exitStackMaximised(){this._container.exitStackMaximised()}drag(){this._container.drag()}updateSize(t){this.updateNodeSize(t)}init(){this.updateNodeSize(!1),super.init(),this._container.emit("open"),this.initContentItems()}setTitle(t){this._title=t,this.emit("titleChanged",t),this.emit("stateChanged")}setTab(t){this._tab=t,this.emit("tab",t),this._container.setTab(t)}hide(){super.hide(),this._container.setVisibility(!1)}show(){super.show(),this._container.setVisibility(!0)}focus(t=!1){this.parentItem.setActiveComponentItem(this,!0,t)}setFocused(t){this._focused=!0,this.tab.setFocused(),t||this.emitBaseBubblingEvent("focus")}blur(t=!1){this._focused&&this.layoutManager.setFocusedComponentItem(void 0,t)}setBlurred(t){this._focused=!1,this.tab.setBlurred(),t||this.emitBaseBubblingEvent("blur")}setParent(t){this._parentItem=t,super.setParent(t)}handleUpdateItemConfigEvent(t){this.applyUpdatableConfig(t)}updateNodeSize(t){if("none"!==this.element.style.display){const{width:e,height:i}=kt(this.element);this._container.setSizeToNodeSize(e,i,t)}}}class $t extends Gt{constructor(){super(...arguments),this._focused=!1}get focused(){return this._focused}setFocusedValue(t){this._focused=t}}class Zt extends Wt{constructor(t,e){super(),this._eElement=t,this._pointerTracking=!1,this._pointerDownEventListener=t=>this.onPointerDown(t),this._pointerMoveEventListener=t=>this.onPointerMove(t),this._pointerUpEventListener=t=>this.onPointerUp(t),this._timeout=void 0,this._allowableTargets=[t,...e],this._oDocument=document,this._eBody=document.body,this._nDelay=1800,this._nDistance=10,this._nX=0,this._nY=0,this._nOriginalX=0,this._nOriginalY=0,this._dragging=!1,this._eElement.addEventListener("pointerdown",this._pointerDownEventListener,{passive:!0})}destroy(){this.checkRemovePointerTrackingEventListeners(),this._eElement.removeEventListener("pointerdown",this._pointerDownEventListener)}cancelDrag(){this.processDragStop(void 0)}onPointerDown(t){if(this._allowableTargets.includes(t.target)&&t.isPrimary){const e=this.getPointerCoordinates(t);this.processPointerDown(e)}}processPointerDown(t){this._nOriginalX=t.x,this._nOriginalY=t.y,this._oDocument.addEventListener("pointermove",this._pointerMoveEventListener),this._oDocument.addEventListener("pointerup",this._pointerUpEventListener,{passive:!0}),this._pointerTracking=!0,this._timeout=setTimeout((()=>{try{this.startDrag()}catch(t){throw console.error(t),t}}),this._nDelay)}onPointerMove(t){this._pointerTracking&&(this.processDragMove(t),t.preventDefault())}processDragMove(t){this._nX=t.pageX-this._nOriginalX,this._nY=t.pageY-this._nOriginalY,!1===this._dragging&&(Math.abs(this._nX)>this._nDistance||Math.abs(this._nY)>this._nDistance)&&this.startDrag(),this._dragging&&this.emit("drag",this._nX,this._nY,t)}onPointerUp(t){this.processDragStop(t)}processDragStop(t){var e;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this.checkRemovePointerTrackingEventListeners(),!0===this._dragging&&(this._eBody.classList.remove("lm_dragging"),this._eElement.classList.remove("lm_dragging"),null===(e=this._oDocument.querySelector("iframe"))||void 0===e||e.style.setProperty("pointer-events",""),this._dragging=!1,this.emit("dragStop",t))}checkRemovePointerTrackingEventListeners(){this._pointerTracking&&(this._oDocument.removeEventListener("pointermove",this._pointerMoveEventListener),this._oDocument.removeEventListener("pointerup",this._pointerUpEventListener),this._pointerTracking=!1)}startDrag(){var t;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this._dragging=!0,this._eBody.classList.add("lm_dragging"),this._eElement.classList.add("lm_dragging"),null===(t=this._oDocument.querySelector("iframe"))||void 0===t||t.style.setProperty("pointer-events","none"),this.emit("dragStart",this._nOriginalX,this._nOriginalY)}getPointerCoordinates(t){return{x:t.pageX,y:t.pageY}}}class qt{constructor(t,e,i){this._isVertical=t,this._size=e,this._grabSize=i0){const i=this.createSplitter(Math.max(0,e-1)).element;e>0?(this.contentItems[e-1].element.insertAdjacentElement("afterend",i),i.insertAdjacentElement("afterend",t.element)):(this.contentItems[0].element.insertAdjacentElement("beforebegin",i),i.insertAdjacentElement("beforebegin",t.element))}else this._childElementContainer.appendChild(t.element);super.addChild(t,e);const n=1/this.contentItems.length*100;if(!0===i)return this.emitBaseBubblingEvent("stateChanged"),e;for(let e=0;e0&&(this.calculateRelativeSizes(),this.setAbsoluteSizes()),this.emitBaseBubblingEvent("stateChanged"),this.emit("resize")}setAbsoluteSizes(){const t=this.calculateAbsoluteSizes();for(let e=0;e0&&t.itemSizes[e]++,this._isColumn?(Tt(this.contentItems[e].element,t.crossAxisSize),At(this.contentItems[e].element,t.itemSizes[e])):(Tt(this.contentItems[e].element,t.itemSizes[e]),At(this.contentItems[e].element,t.crossAxisSize))}calculateAbsoluteSizes(){const t=(this.contentItems.length-1)*this._splitterSize,{width:e,height:i}=kt(this.element);let n,o;this._isColumn?(n=i-t,o=e):(n=e-t,o=i);let s=0;const r=[];for(let t=0;t0){const n=100-t;for(let t=0;t100&&e.length>0){for(let t=0;te)return;{const r=i/e;let a=i;for(let e=0;ethis.onSplitterDrag(e,t,i))),e.on("dragStop",(()=>this.onSplitterDragStop(e))),e.on("dragStart",(()=>this.onSplitterDragStart(e))),this._splitter.splice(t,0,e),e}getSplitItems(t){const e=this._splitter.indexOf(t);return{before:this.contentItems[e],after:this.contentItems[e+1]}}calculateContentItemMinSize(t){const e=t.minSize;if(void 0!==e){if(t.minSizeUnit===ht.Pixel)return e;throw new X("ROCGMD98831",JSON.stringify(t))}{const t=this.layoutManager.layoutConfig.dimensions;return this._isColumn?t.defaultMinItemHeight:t.defaultMinItemWidth}}calculateContentItemsTotalMinSize(t){let e=0;for(const i of t)e+=this.calculateContentItemMinSize(i);return e}onSplitterDragStart(t){const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=this.calculateContentItemsTotalMinSize(e.before.contentItems),s=this.calculateContentItemsTotalMinSize(e.after.contentItems);this._splitterPosition=0,this._splitterMinPosition=-1*(i-o),this._splitterMaxPosition=n-s}onSplitterDrag(t,e,i){let n=this._isColumn?i:e;if(null===this._splitterMinPosition||null===this._splitterMaxPosition)throw new K("ROCOSD59226");n=Math.max(n,this._splitterMinPosition),n=Math.min(n,this._splitterMaxPosition),this._splitterPosition=n;const o=zt(n);this._isColumn?t.element.style.top=o:t.element.style.left=o}onSplitterDragStop(t){if(null===this._splitterPosition)throw new K("ROCOSDS66932");{const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=(this._splitterPosition+i)/(i+n),s=e.before.size+e.after.size;e.before.size=o*s,e.after.size=(1-o)*s,t.element.style.top=zt(0),t.element.style.left=zt(0),globalThis.requestAnimationFrame((()=>this.updateSize(!1)))}}}!function(t){t.getElementDimensionSize=function(t,e){return"width"===e?function(t){return t.offsetWidth}(t):function(t){return t.offsetHeight}(t)},t.setElementDimensionSize=function(t,e,i){return"width"===e?Tt(t,i):At(t,i)},t.createElement=function(t,e){const i=t.createElement("div");return i.classList.add("lm_item"),e?i.classList.add("lm_column"):i.classList.add("lm_row"),i}}(Xt||(Xt={}));class Yt extends $t{constructor(t,e,i){super(t,vt.create(e),null,Yt.createElement(document)),this.isGround=!0,this._childElementContainer=this.element,this._containerElement=i;let n=null;for(;;){const t=n?n.previousSibling:this._containerElement.lastChild;if(!(t instanceof Element&&t.classList.contains("lm_content")))break;n=t}this._containerElement.insertBefore(this.element,n)}init(){if(!0!==this.isInitialised){this.updateNodeSize();for(let t=0;t0?this.contentItems[0]:this,n.isComponent)throw new Error("Cannot add item as child to ComponentItem");{const t=this.layoutManager.createAndInitContentItem(i,n);return e=n.addChild(t,e),n===this?-1:e}}loadComponentAsRoot(t){this.clearRoot();const e=Ct.resolve(t,!1);if(e.maximised)throw new Error("Root Component cannot be maximised");{const t=new jt(this.layoutManager,e,this);t.init(),this.addChild(t,0)}}addChild(t,e){if(this.contentItems.length>0)throw new Error("Ground node can only have a single child");return this._childElementContainer.appendChild(t.element),e=super.addChild(t,e),this.updateSize(!1),this.emitBaseBubblingEvent("stateChanged"),e}calculateConfigContent(){const t=this.contentItems,e=t.length,i=new Array(e);for(let n=0;n0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e)),this.updateContentItemsSize(!1))}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}createSideAreas(){const t=Yt.Area.oppositeSides,e=new Array(Object.keys(t).length);let i=0;for(const n in t){const o=n,s=this.getElementArea();if(null===s)throw new K("RCSA77553");s.side=o,"2"===t[o][1]?s[o]=s[t[o]]-50:s[o]=s[t[o]]+50,s.surface=(s.x2-s.x1)*(s.y2-s.y1),e[i++]=s}return e}highlightDropZone(t,e,i){this.layoutManager.tabDropPlaceholder.remove(),super.highlightDropZone(t,e,i)}onDrop(t,e){if(t.isComponent){const e=ut.createDefault(),i=t;e.header=mt.Header.createCopy(i.headerConfig);const n=this.layoutManager.createAndInitContentItem(e,this);n.addChild(t),t=n}if(0===this.contentItems.length)this.addChild(t);else{if(t.type===at.row||t.type===at.column){const e=ut.createDefault(),i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}const i="x"==e.side[0]?at.row:at.column,n="2"==e.side[1],o=this.contentItems[0];if(o instanceof Xt&&o.type===i){const e=o.contentItems[n?0:o.contentItems.length-1];o.addChild(t,n?0:void 0,!0),e.size*=.5,t.size=e.size,t.sizeUnit=ht.Percent,o.updateSize(!1)}else{const e=ct.createDefault(i),s=this.layoutManager.createContentItem(e,this);this.replaceChild(o,s),s.addChild(t,n?0:void 0,!0),s.addChild(o,n?void 0:0,!0),o.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}}dock(){throw new X("GID87731")}validateDocking(){throw new X("GIVD87732")}getAllContentItems(){const t=[this];return this.deepGetAllContentItems(this.contentItems,t),t}getConfigMaximisedItems(){const t=[];return this.deepFilterContentItems(this.contentItems,t,(t=>!(!Gt.isStack(t)||!t.initialWantMaximise)||!(!Gt.isComponentItem(t)||!t.initialWantMaximise))),t}getItemsByPopInParentId(t){const e=[];return this.deepFilterContentItems(this.contentItems,e,(e=>e.popInParentIds.includes(t))),e}toConfig(){throw new Error("Cannot generate GroundItem config")}setActiveComponentItem(t,e,i){}updateNodeSize(){const{width:t,height:e}=kt(this._containerElement);Tt(this.element,t),At(this.element,e),this.contentItems.length>0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e))}deepGetAllContentItems(t,e){for(let i=0;ithis.onClick(t),this._touchStartEventListener=t=>this.onTouchStart(t),this._element=document.createElement("div"),this._element.classList.add(i),this._element.title=e,this._header.on("destroy",(()=>this.destroy())),this._element.addEventListener("click",this._clickEventListener,{passive:!0}),this._element.addEventListener("touchstart",this._touchStartEventListener,{passive:!0}),this._header.controlsContainerElement.appendChild(this._element)}get element(){return this._element}destroy(){var t;this._element.removeEventListener("click",this._clickEventListener),this._element.removeEventListener("touchstart",this._touchStartEventListener),null===(t=this._element.parentNode)||void 0===t||t.removeChild(this._element)}onClick(t){this._pushEvent(t)}onTouchStart(t){this._pushEvent(t)}}class Jt{constructor(t,e,i,n,o){var s;this._layoutManager=t,this._componentItem=e,this._closeEvent=i,this._focusEvent=n,this._dragStartEvent=o,this._isActive=!1,this._tabClickListener=t=>this.onTabClickDown(t),this._tabTouchStartListener=t=>this.onTabTouchStart(t),this._closeClickListener=()=>this.onCloseClick(),this._closeTouchStartListener=()=>this.onCloseTouchStart(),this._dragStartListener=(t,e)=>this.onDragStart(t,e),this._contentItemDestroyListener=()=>this.onContentItemDestroy(),this._tabTitleChangedListener=t=>this.setTitle(t),this._element=document.createElement("div"),this._element.classList.add("lm_tab"),this._titleElement=document.createElement("span"),this._titleElement.classList.add("lm_title"),this._closeElement=document.createElement("div"),this._closeElement.classList.add("lm_close_tab"),this._element.appendChild(this._titleElement),this._element.appendChild(this._closeElement),e.isClosable?this._closeElement.style.display="":this._closeElement.style.display="none",this.setTitle(e.title),this._componentItem.on("titleChanged",this._tabTitleChangedListener);(null!==(s=e.reorderEnabled)&&void 0!==s?s:this._layoutManager.layoutConfig.settings.reorderEnabled)&&this.enableReorder(),this._element.addEventListener("click",this._tabClickListener,{passive:!0}),this._element.addEventListener("touchstart",this._tabTouchStartListener,{passive:!0}),this._componentItem.isClosable?(this._closeElement.addEventListener("click",this._closeClickListener,{passive:!0}),this._closeElement.addEventListener("touchstart",this._closeTouchStartListener,{passive:!0})):(this._closeElement.remove(),this._closeElement=void 0),this._componentItem.setTab(this),this._layoutManager.emit("tabCreated",this)}get isActive(){return this._isActive}get componentItem(){return this._componentItem}get contentItem(){return this._componentItem}get element(){return this._element}get titleElement(){return this._titleElement}get closeElement(){return this._closeElement}get reorderEnabled(){return void 0!==this._dragListener}set reorderEnabled(t){t!==this.reorderEnabled&&(t?this.enableReorder():this.disableReorder())}setTitle(t){this._titleElement.innerText=t,this._element.title=t}setActive(t){t!==this._isActive&&(this._isActive=t,t?this._element.classList.add("lm_active"):this._element.classList.remove("lm_active"))}destroy(){var t,e;this._closeEvent=void 0,this._focusEvent=void 0,this._dragStartEvent=void 0,this._element.removeEventListener("click",this._tabClickListener),this._element.removeEventListener("touchstart",this._tabTouchStartListener),null===(t=this._closeElement)||void 0===t||t.removeEventListener("click",this._closeClickListener),null===(e=this._closeElement)||void 0===e||e.removeEventListener("touchstart",this._closeTouchStartListener),this._componentItem.off("titleChanged",this._tabTitleChangedListener),this.reorderEnabled&&this.disableReorder(),this._element.remove()}setBlurred(){this._element.classList.remove("lm_focused"),this._titleElement.classList.remove("lm_focused")}setFocused(){this._element.classList.add("lm_focused"),this._titleElement.classList.add("lm_focused")}onDragStart(t,e){if(void 0===this._dragListener)throw new J("TODSDLU10093");if(void 0===this._dragStartEvent)throw new J("TODS23309");this._dragStartEvent(t,e,this._dragListener,this.componentItem)}onContentItemDestroy(){void 0!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=void 0)}onTabClickDown(t){const e=t.target;e!==this._element&&e!==this._titleElement||(0===t.button?this.notifyFocus():1===t.button&&this._componentItem.isClosable&&this.notifyClose())}onTabTouchStart(t){t.target===this._element&&this.notifyFocus()}onCloseClick(){this.notifyClose()}onCloseTouchStart(){this.notifyClose()}notifyClose(){if(void 0===this._closeEvent)throw new J("TNC15007");this._closeEvent(this._componentItem)}notifyFocus(){if(void 0===this._focusEvent)throw new J("TNA15007");this._focusEvent(this._componentItem)}enableReorder(){this._dragListener=new Zt(this._element,[this._titleElement]),this._dragListener.on("dragStart",this._dragStartListener),this._componentItem.on("destroy",this._contentItemDestroyListener)}disableReorder(){if(void 0===this._dragListener)throw new J("TDR87745");this._componentItem.off("destroy",this._contentItemDestroyListener),this._dragListener.off("dragStart",this._dragStartListener),this._dragListener=void 0}}class Qt{constructor(t,e,i,n,o){this._layoutManager=t,this._componentRemoveEvent=e,this._componentFocusEvent=i,this._componentDragStartEvent=n,this._dropdownActiveChangedEvent=o,this._tabs=[],this._lastVisibleTabIndex=-1,this._dropdownActive=!1,this._element=document.createElement("section"),this._element.classList.add("lm_tabs"),this._dropdownElement=document.createElement("section"),this._dropdownElement.classList.add("lm_tabdropdown_list"),this._dropdownElement.style.display="none"}get tabs(){return this._tabs}get tabCount(){return this._tabs.length}get lastVisibleTabIndex(){return this._lastVisibleTabIndex}get element(){return this._element}get dropdownElement(){return this._dropdownElement}get dropdownActive(){return this._dropdownActive}destroy(){for(let t=0;tthis.handleTabCloseEvent(t)),(t=>this.handleTabFocusEvent(t)),((t,e,i,n)=>this.handleTabDragStartEvent(t,e,i,n)));void 0===e&&(e=this._tabs.length),this._tabs.splice(e,0,i),ethis._lastVisibleTabIndex){const t=this._tabs[e];for(let t=e;t>0;t--)this._tabs[t]=this._tabs[t-1];this._tabs[0]=t}}updateTabSizes(t,e){let i=!1;this.tryUpdateTabSizes(i,t,e)||(i=!0,this.tryUpdateTabSizes(i,t,e)),i!==this._dropdownActive&&(this._dropdownActive=i,this._dropdownActiveChangedEvent())}tryUpdateTabSizes(t,e,i){if(this._tabs.length>0){if(void 0===i)throw new Error("non-empty tabs must have active component item");let n=0,o=!1;const s=this._layoutManager.layoutConfig.settings.tabOverlapAllowance,r=this._tabs.indexOf(i.tab),a=this._tabs[r];this._lastVisibleTabIndex=-1;for(let i=0;ie){if(o)i===r&&(l.style.zIndex="auto",l.style.marginLeft="",l.parentElement!==this._element&&this._element.appendChild(l));else{let t;if(t=r>0&&r<=i?(d-e)/(i-1):(d-e)/i,tthis.onClick(t),this._touchStartListener=t=>this.onTouchStart(t),this._rowColumnClosable=!0,this._closeButton=null,this._popoutButton=null,this._tabsContainer=new Qt(this._layoutManager,(t=>this.handleTabInitiatedComponentRemoveEvent(t)),(t=>this.handleTabInitiatedComponentFocusEvent(t)),((t,e,i,n)=>this.handleTabInitiatedDragStartEvent(t,e,i,n)),(()=>this.processTabDropdownActiveChanged())),this._show=i.show,this._popoutEnabled=i.popoutEnabled,this._popoutLabel=i.popoutLabel,this._maximiseEnabled=i.maximiseEnabled,this._maximiseLabel=i.maximiseLabel,this._minimiseEnabled=i.minimiseEnabled,this._minimiseLabel=i.minimiseLabel,this._closeEnabled=i.closeEnabled,this._closeLabel=i.closeLabel,this._tabDropdownEnabled=i.tabDropdownEnabled,this._tabDropdownLabel=i.tabDropdownLabel,this.setSide(i.side),this._canRemoveComponent=this._configClosable,this._element=document.createElement("section"),this._element.classList.add("lm_header"),this._controlsContainerElement=document.createElement("section"),this._controlsContainerElement.classList.add("lm_controls"),this._element.appendChild(this._tabsContainer.element),this._element.appendChild(this._controlsContainerElement),this._element.appendChild(this._tabsContainer.dropdownElement),this._element.addEventListener("click",this._clickListener,{passive:!0}),this._element.addEventListener("touchstart",this._touchStartListener,{passive:!0}),this._documentMouseUpListener=()=>this._tabsContainer.hideAdditionalTabsDropdown(),globalThis.document.addEventListener("mouseup",this._documentMouseUpListener,{passive:!0}),this._tabControlOffset=this._layoutManager.layoutConfig.settings.tabControlOffset,this._tabDropdownEnabled&&(this._tabDropdownButton=new Kt(this,this._tabDropdownLabel,"lm_tabdropdown",(()=>this._tabsContainer.showAdditionalTabsDropdown()))),this._popoutEnabled&&(this._popoutButton=new Kt(this,this._popoutLabel,"lm_popout",(()=>this.handleButtonPopoutEvent()))),this._maximiseEnabled&&(this._maximiseButton=new Kt(this,this._maximiseLabel,"lm_maximise",(t=>this.handleButtonMaximiseToggleEvent(t)))),this._configClosable&&(this._closeButton=new Kt(this,this._closeLabel,"lm_close",(()=>s()))),this.processTabDropdownActiveChanged()}get show(){return this._show}get side(){return this._side}get leftRightSided(){return this._leftRightSided}get layoutManager(){return this._layoutManager}get parent(){return this._parent}get tabs(){return this._tabsContainer.tabs}get lastVisibleTabIndex(){return this._tabsContainer.lastVisibleTabIndex}get element(){return this._element}get tabsContainerElement(){return this._tabsContainer.element}get controlsContainerElement(){return this._controlsContainerElement}destroy(){this.emit("destroy"),this._popoutEvent=void 0,this._maximiseToggleEvent=void 0,this._clickEvent=void 0,this._touchStartEvent=void 0,this._componentRemoveEvent=void 0,this._componentFocusEvent=void 0,this._componentDragStartEvent=void 0,this._tabsContainer.destroy(),globalThis.document.removeEventListener("mouseup",this._documentMouseUpListener),this._element.remove()}createTab(t,e){this._tabsContainer.createTab(t,e)}removeTab(t){this._tabsContainer.removeTab(t)}processActiveComponentChanged(t){this._tabsContainer.processActiveComponentChanged(t),this.updateTabSizes()}setSide(t){this._side=t,this._leftRightSided=[nt.right,nt.left].includes(this._side)}setRowColumnClosable(t){this._rowColumnClosable=t,this.updateClosability()}updateClosability(){let t;if(this._configClosable)if(this._rowColumnClosable){t=!0;const e=this.tabs.length;for(let i=0;i1}applyFocusedValue(t){t?this._element.classList.add("lm_focused"):this._element.classList.remove("lm_focused")}processMaximised(){if(void 0===this._maximiseButton)throw new J("HPMAX16997");this._maximiseButton.element.setAttribute("title",this._minimiseLabel)}processMinimised(){if(void 0===this._maximiseButton)throw new J("HPMIN16997");this._maximiseButton.element.setAttribute("title",this._maximiseLabel)}updateTabSizes(){if(this._tabsContainer.tabCount>0){const t=this._show?this._layoutManager.layoutConfig.dimensions.headerHeight:0;let e;this._leftRightSided?(this._element.style.height="",this._element.style.width=zt(t)):(this._element.style.width="",this._element.style.height=zt(t)),e=this._leftRightSided?this._element.offsetHeight-this._controlsContainerElement.offsetHeight-this._tabControlOffset:this._element.offsetWidth-this._controlsContainerElement.offsetWidth-this._tabControlOffset,this._tabsContainer.updateTabSizes(e,this._getActiveComponentItemEvent())}}handleTabInitiatedComponentRemoveEvent(t){if(this._canRemoveComponent){if(void 0===this._componentRemoveEvent)throw new J("HHTCE22294");this._componentRemoveEvent(t)}}handleTabInitiatedComponentFocusEvent(t){if(void 0===this._componentFocusEvent)throw new J("HHTAE22294");this._componentFocusEvent(t)}handleTabInitiatedDragStartEvent(t,e,i,n){if(this._canRemoveComponent){if(void 0===this._componentDragStartEvent)throw new J("HHTDSE22294");this._componentDragStartEvent(t,e,i,n)}else i.cancelDrag()}processTabDropdownActiveChanged(){void 0!==this._tabDropdownButton&&Dt(this._tabDropdownButton.element,this._tabsContainer.dropdownActive)}handleButtonPopoutEvent(){if(this._layoutManager.layoutConfig.settings.popoutWholeStack){if(void 0===this._popoutEvent)throw new J("HHBPOE17834");this._popoutEvent()}else{const t=this._getActiveComponentItemEvent();t&&t.popout()}}handleButtonMaximiseToggleEvent(t){if(void 0===this._maximiseToggleEvent)throw new J("HHBMTE16834");this._maximiseToggleEvent()}onClick(t){t.target===this._element&&this.notifyClick(t)}onTouchStart(t){t.target===this._element&&this.notifyTouchStart(t)}notifyClick(t){if(void 0===this._clickEvent)throw new J("HNHC46834");this._clickEvent(t)}notifyTouchStart(t){if(void 0===this._touchStartEvent)throw new J("HNHTS46834");this._touchStartEvent(t)}}class ee extends $t{constructor(t,e,i){var n,o,s,r,a,l,h,d,c,m,u,p,g,f,v,_,y,C,w;super(t,e,i,ee.createElement(document)),this._headerSideChanged=!1,this._resizeListener=()=>this.handleResize(),this._maximisedListener=()=>this.handleMaximised(),this._minimisedListener=()=>this.handleMinimised(),this._headerConfig=e.header;const I=t.layoutConfig.header,b=e.content;let S;if(1!==b.length)S=void 0;else{S=b[0].header}this._initialWantMaximise=e.maximised,this._initialActiveItemIndex=null!==(n=e.activeItemIndex)&&void 0!==n?n:0;const E=null!==(r=null!==(s=null===(o=this._headerConfig)||void 0===o?void 0:o.show)&&void 0!==s?s:null==S?void 0:S.show)&&void 0!==r?r:I.show,x=null!==(h=null!==(l=null===(a=this._headerConfig)||void 0===a?void 0:a.popout)&&void 0!==l?l:null==S?void 0:S.popout)&&void 0!==h?h:I.popout,L=null!==(m=null!==(c=null===(d=this._headerConfig)||void 0===d?void 0:d.maximise)&&void 0!==c?c:null==S?void 0:S.maximise)&&void 0!==m?m:I.maximise,z=null!==(g=null!==(p=null===(u=this._headerConfig)||void 0===u?void 0:u.close)&&void 0!==p?p:null==S?void 0:S.close)&&void 0!==g?g:I.close,M=null!==(_=null!==(v=null===(f=this._headerConfig)||void 0===f?void 0:f.minimise)&&void 0!==v?v:null==S?void 0:S.minimise)&&void 0!==_?_:I.minimise,P=null!==(w=null!==(C=null===(y=this._headerConfig)||void 0===y?void 0:y.tabDropdown)&&void 0!==C?C:null==S?void 0:S.tabDropdown)&&void 0!==w?w:I.tabDropdown;this._maximisedEnabled=!1!==L;const T={show:!1!==E,side:!1===E?nt.top:E,popoutEnabled:!1!==x,popoutLabel:!1===x?"":x,maximiseEnabled:this._maximisedEnabled,maximiseLabel:!1===L?"":L,closeEnabled:!1!==z,closeLabel:!1===z?"":z,minimiseEnabled:!0,minimiseLabel:M,tabDropdownEnabled:!1!==P,tabDropdownLabel:!1===P?"":P};this._header=new te(t,this,T,e.isClosable&&!1!==z,(()=>this.getActiveComponentItem()),(()=>this.remove()),(()=>this.handlePopoutEvent()),(()=>this.toggleMaximise()),(t=>this.handleHeaderClickEvent(t)),(t=>this.handleHeaderTouchStartEvent(t)),(t=>this.handleHeaderComponentRemoveEvent(t)),(t=>this.handleHeaderComponentFocusEvent(t)),((t,e,i,n)=>this.handleHeaderComponentStartDragEvent(t,e,i,n))),this.isStack=!0,this._childElementContainer=document.createElement("section"),this._childElementContainer.classList.add("lm_items"),this.on("resize",this._resizeListener),this._maximisedEnabled&&(this.on("maximised",this._maximisedListener),this.on("minimised",this._minimisedListener)),this.element.appendChild(this._header.element),this.element.appendChild(this._childElementContainer),this.setupHeaderPosition(),this._header.updateClosability()}get childElementContainer(){return this._childElementContainer}get header(){return this._header}get headerShow(){return this._header.show}get headerSide(){return this._header.side}get headerLeftRightSided(){return this._header.leftRightSided}get contentAreaDimensions(){return this._contentAreaDimensions}get initialWantMaximise(){return this._initialWantMaximise}get isMaximised(){return this===this.layoutManager.maximisedStack}get stackParent(){if(!this.parent)throw new Error("Stack should always have a parent");return this.parent}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}init(){if(!0===this.isInitialised)return;this.updateNodeSize();for(let t=0;t0){if(this._initialActiveItemIndex<0||this._initialActiveItemIndex>=e)throw new Error(`ActiveItemIndex out of range: ${this._initialActiveItemIndex} id: ${this.id}`);for(let i=0;ithis.contentItems.length)throw e-=1,new X("SAC99728");if(t instanceof jt)return e=super.addChild(t,e),this._childElementContainer.appendChild(t.element),this._header.createTab(t,e),this.setActiveComponentItem(t,i),this._header.updateTabSizes(),this.updateSize(!1),t.container.setBaseLogicalZIndex(),this._header.updateClosability(),this.emitStateChangedEvent(),e;throw new X("SACC88532")}removeChild(t,e){const i=t,n=this.contentItems.indexOf(i),o=1===this.contentItems.length;if(this._activeComponentItem===i&&(i.focused&&i.blur(),!o)){const t=0===n?1:n-1;this.setActiveComponentItem(this.contentItems[t],!1)}this._header.removeTab(i),super.removeChild(i,e),o||this._header.updateClosability(),this.emitStateChangedEvent()}toggleMaximise(){this.isMaximised?this.minimise():this.maximise()}maximise(){if(!this.isMaximised){this.layoutManager.setMaximisedStack(this);const t=this.contentItems,e=t.length;for(let i=0;i0&&void 0===t)throw new Error("expected non-empty stack to have an active component item");return{type:"stack",content:this.calculateConfigContent(),size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,isClosable:this.isClosable,maximised:this.isMaximised,header:this.createHeaderConfig(),activeItemIndex:t}}onDrop(t,e){if("header"===this._dropSegment){if(this.resetHeaderDropZone(),void 0===this._dropIndex)throw new J("SODDI68990");return void this.addChild(t,this._dropIndex)}if("body"===this._dropSegment)return void this.addChild(t,0,!0);const i="top"===this._dropSegment||"bottom"===this._dropSegment,n="left"===this._dropSegment||"right"===this._dropSegment,o="top"===this._dropSegment||"left"===this._dropSegment,s=i&&this.stackParent.isColumn||n&&this.stackParent.isRow;if(t.isComponent){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createAndInitContentItem(e,this);i.addChild(t),t=i}if(t.type===at.row||t.type===at.column){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}if(s){const e=this.stackParent.contentItems.indexOf(this);this.stackParent.addChild(t,o?e:e+1,!0),this.size*=.5,t.size=this.size,t.sizeUnit=this.sizeUnit,this.stackParent.updateSize(!1)}else{const e=i?at.column:at.row,n=ct.createDefault(e),s=this.layoutManager.createContentItem(n,this);this.stackParent.replaceChild(this,s),s.addChild(t,o?0:void 0,!0),s.addChild(this,o?void 0:0,!0),this.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}highlightDropZone(t,e){for(const i in this._contentAreaDimensions){const n=i,o=this._contentAreaDimensions[n].hoverArea;if(o.x1t&&o.y1e)return void("header"===n?(this._dropSegment="header",this.highlightHeaderDropZone(this._header.leftRightSided?e:t)):(this.resetHeaderDropZone(),this.highlightBodyDropZone(n)))}}getArea(){if("none"===this.element.style.display)return null;const t=super.getElementArea(this._header.element),e=super.getElementArea(this._childElementContainer);if(null===t||null===e)throw new K("SGAHC13086");const i=e.x2-e.x1,n=e.y2-e.y1;return this._contentAreaDimensions={header:{hoverArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2},highlightArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2}}},0===this.contentItems.length?(this._contentAreaDimensions.body={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2}},super.getElementArea(this.element)):(this._contentAreaDimensions.left={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x1+.25*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x1+.5*i,y2:e.y2}},this._contentAreaDimensions.top={hoverArea:{x1:e.x1+.25*i,y1:e.y1,x2:e.x1+.75*i,y2:e.y1+.5*n},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y1+.5*n}},this._contentAreaDimensions.right={hoverArea:{x1:e.x1+.75*i,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1+.5*i,y1:e.y1,x2:e.x2,y2:e.y2}},this._contentAreaDimensions.bottom={hoverArea:{x1:e.x1+.25*i,y1:e.y1+.5*n,x2:e.x1+.75*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1+.5*n,x2:e.x2,y2:e.y2}},super.getElementArea(this.element))}positionHeader(t){this._header.side!==t&&(this._header.setSide(t),this._headerSideChanged=!0,this.setupHeaderPosition())}updateNodeSize(){if("none"!==this.element.style.display){const t=kt(this.element);if(this._header.show){t[this._header.leftRightSided?it.width:it.height]-=this.layoutManager.layoutConfig.dimensions.headerHeight}this._childElementContainer.style.width=zt(t.width),this._childElementContainer.style.height=zt(t.height);for(let e=0;e=o&&tthis.onDrag(t,e,i))),this._dragListener.on("dragStop",(()=>this.onDrop())),this.createDragProxyElements(t,e),null===this._componentItem.parent)throw new K("DPC10097");this._componentItemFocused=this._componentItem.focused,this._componentItemFocused&&this._componentItem.blur(),this._componentItem.parent.removeChild(this._componentItem,!0),this.setDimensions(),document.body.appendChild(this._element),this.determineMinMaxXY(),this._layoutManager.calculateItemAreas(),this.setDropPosition(t,e)}get element(){return this._element}createDragProxyElements(t,e){this._element=document.createElement("div"),this._element.classList.add("lm_dragProxy");const i=document.createElement("div");i.classList.add("lm_header");const n=document.createElement("div");n.classList.add("lm_tabs");const o=document.createElement("div");o.classList.add("lm_tab");const s=document.createElement("span");s.classList.add("lm_title"),o.appendChild(s),n.appendChild(o),i.appendChild(n),this._proxyContainerElement=document.createElement("div"),this._proxyContainerElement.classList.add("lm_content"),this._element.appendChild(i),this._element.appendChild(this._proxyContainerElement),this._originalParent instanceof ee&&this._originalParent.headerShow&&(this._sided=this._originalParent.headerLeftRightSided,this._element.classList.add("lm_"+this._originalParent.headerSide),[nt.right,nt.bottom].indexOf(this._originalParent.headerSide)>=0&&this._proxyContainerElement.insertAdjacentElement("afterend",i)),this._element.style.left=zt(t),this._element.style.top=zt(e),o.setAttribute("title",this._componentItem.title),s.insertAdjacentText("afterbegin",this._componentItem.title),this._proxyContainerElement.appendChild(this._componentItem.element)}determineMinMaxXY(){const t=this._layoutManager.groundItem;if(void 0===t)throw new J("DPDMMXY73109");{const e=t.element.getBoundingClientRect();this._minX=e.left+document.body.scrollLeft,this._minY=e.top+document.body.scrollTop,this._maxX=this._minX+e.width,this._maxY=this._minY+e.height}}onDrag(t,e,i){const n=i.pageX,o=i.pageY;this.setDropPosition(n,o),this._componentItem.drag()}setDropPosition(t,e){this._layoutManager.layoutConfig.settings.constrainDragToContainer&&(t<=this._minX?t=Math.ceil(this._minX):t>=this._maxX&&(t=Math.floor(this._maxX)),e<=this._minY?e=Math.ceil(this._minY):e>=this._maxY&&(e=Math.floor(this._maxY))),this._element.style.left=zt(t),this._element.style.top=zt(e),this._area=this._layoutManager.getArea(t,e),null!==this._area&&(this._lastValidArea=this._area,this._area.contentItem.highlightDropZone(t,e,this._area))}onDrop(){const t=this._layoutManager.dropTargetIndicator;if(null===t)throw new K("DPOD30011");let e;if(t.hide(),this._componentItem.exitDragMode(),null!==this._area)e=this._componentItem,this._area.contentItem.onDrop(e,this._area);else if(null!==this._lastValidArea){e=this._componentItem;this._lastValidArea.contentItem.onDrop(e,this._lastValidArea)}else this._originalParent?(e=this._componentItem,this._originalParent.addChild(e)):this._componentItem.destroy();this._element.remove(),this._layoutManager.emit("itemDropped",this._componentItem),this._componentItemFocused&&void 0!==e&&e.focus()}setDimensions(){const t=this._layoutManager.layoutConfig.dimensions;if(void 0===t)throw new Error("DragProxy.setDimensions: dimensions undefined");let e=t.dragProxyWidth,i=t.dragProxyHeight;if(void 0===e||void 0===i)throw new Error("DragProxy.setDimensions: width and/or height undefined");const n=!1===this._layoutManager.layoutConfig.header.show?0:t.headerHeight;this._element.style.width=zt(e),this._element.style.height=zt(i),e-=this._sided?n:0,i-=this._sided?0:n,this._proxyContainerElement.style.width=zt(e),this._proxyContainerElement.style.height=zt(i),this._componentItem.enterDragMode(e,i),this._componentItem.show()}}class ne{constructor(t,e,i,n,o,s,r){this._layoutManager=t,this._element=e,this._extraAllowableChildTargets=i,this._componentTypeOrFtn=n,this._componentState=o,this._title=s,this._id=r,this._dragListener=null,this._dummyGroundContainer=document.createElement("div");const a=gt.createDefault("row");this._dummyGroundContentItem=new Yt(this._layoutManager,a,this._dummyGroundContainer),this.createDragListener()}destroy(){this.removeDragListener()}createDragListener(){this.removeDragListener(),this._dragListener=new Zt(this._element,this._extraAllowableChildTargets),this._dragListener.on("dragStart",((t,e)=>this.onDragStart(t,e))),this._dragListener.on("dragStop",(()=>this.onDragStop()))}onDragStart(t,e){var i;const n="component";let o;if("function"==typeof this._componentTypeOrFtn){const t=this._componentTypeOrFtn();o=ne.isDragSourceComponentItemConfig(t)?{type:n,componentState:t.state,componentType:t.type,title:null!==(i=t.title)&&void 0!==i?i:this._title}:t}else o={type:n,componentState:this._componentState,componentType:this._componentTypeOrFtn,title:this._title,id:this._id};const s=bt.resolve(o,!1),r=new jt(this._layoutManager,s,this._dummyGroundContentItem);if(this._dummyGroundContentItem.contentItems.push(r),null===this._dragListener)throw new K("DSODSD66746");{const i=new ie(t,e,this._dragListener,this._layoutManager,r,this._dummyGroundContentItem),n=this._layoutManager.transitionIndicator;if(null===n)throw new K("DSODST66746");n.transitionElements(this._element,i.element)}}onDragStop(){this.createDragListener()}removeDragListener(){null!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=null)}}!function(t){t.isDragSourceComponentItemConfig=function(t){return!("componentType"in t)}}(ne||(ne={}));class oe{constructor(){this._element=document.createElement("div"),this._element.classList.add("lm_dropTargetIndicator");const t=document.createElement("div");t.classList.add("lm_inner"),this._element.appendChild(t),document.body.appendChild(this._element)}destroy(){this._element.remove()}highlightArea(t,e){this._element.style.left=zt(t.x1+e),this._element.style.top=zt(t.y1+e),this._element.style.width=zt(t.x2-t.x1-e),this._element.style.height=zt(t.y2-t.y1-e),this._element.style.display="block"}hide(){Dt(this._element,!1)}}class se{constructor(){this._element=document.createElement("div"),this._element.classList.add("lm_transition_indicator"),document.body.appendChild(this._element),this._toElement=null,this._fromDimensions=null,this._totalAnimationDuration=200,this._animationStartTime=null}destroy(){this._element.remove()}transitionElements(t,e){}nextAnimationFrame(){}measure(t){const e=t.getBoundingClientRect();return{left:e.left,top:e.top,width:t.offsetWidth,height:t.offsetHeight}}}class re extends Wt{constructor(t){super(),this._layoutManager=t,this._childEventListener=t=>this.onEventFromChild(t),globalThis.addEventListener(re.ChildEventName,this._childEventListener,{passive:!0})}emit(t,...e){"userBroadcast"===t?this.emitUserBroadcast(...e):super.emit(t,...e)}emitUserBroadcast(...t){this.handleUserBroadcastEvent("userBroadcast",t)}destroy(){globalThis.removeEventListener(re.ChildEventName,this._childEventListener)}handleUserBroadcastEvent(t,e){this._layoutManager.isSubWindow?this.propagateToParent(t,e):this.propagateToThisAndSubtree(t,e)}onEventFromChild(t){const e=t.detail;this.handleUserBroadcastEvent(e.eventName,e.args)}propagateToParent(t,e){const i={bubbles:!0,cancelable:!0,detail:{layoutManager:this._layoutManager,eventName:t,args:e}},n=new CustomEvent(re.ChildEventName,i),o=globalThis.opener;if(null===o)throw new K("EHPTP15778");o.dispatchEvent(n)}propagateToThisAndSubtree(t,e){this.emitUnknown(t,...e);for(let i=0;ithis.handleContainerResize())),this._windowBeforeUnloadListener=()=>this.onBeforeUnload(),this._windowBeforeUnloadListening=!1,this._maximisedStackBeforeDestroyedListener=t=>this.cleanupBeforeMaximisedStackDestroyed(t),this.isSubWindow=t.isSubWindow,this._constructorOrSubWindowLayoutConfig=t.constructorOrSubWindowLayoutConfig,Q.checkInitialise(),dt.checkInitialise(),void 0!==t.containerElement&&(this._containerElement=t.containerElement)}get container(){return this._containerElement}get isInitialised(){return this._isInitialised}get groundItem(){return this._groundItem}get root(){return this._groundItem}get openPopouts(){return this._openPopouts}get dropTargetIndicator(){return this._dropTargetIndicator}get transitionIndicator(){return this._transitionIndicator}get width(){return this._width}get height(){return this._height}get eventHub(){return this._eventHub}get rootItem(){if(void 0===this._groundItem)throw new Error("Cannot access rootItem before init");return 0===this._groundItem.contentItems.length?void 0:this._groundItem.contentItems[0]}get focusedComponentItem(){return this._focusedComponentItem}get tabDropPlaceholder(){return this._tabDropPlaceholder}get maximisedStack(){return this._maximisedStack}get deprecatedConstructor(){return!this.isSubWindow&&void 0!==this._constructorOrSubWindowLayoutConfig}destroy(){if(this._isInitialised){this._windowBeforeUnloadListening&&(globalThis.removeEventListener("beforeunload",this._windowBeforeUnloadListener),this._windowBeforeUnloadListening=!1),!0===this.layoutConfig.settings.closePopoutsOnUnload&&this.closeAllOpenPopouts(),this._resizeObserver.disconnect(),this.checkClearResizeTimeout(),void 0!==this._groundItem&&this._groundItem.destroy(),this._tabDropPlaceholder.remove(),null!==this._dropTargetIndicator&&this._dropTargetIndicator.destroy(),null!==this._transitionIndicator&&this._transitionIndicator.destroy(),this._eventHub.destroy();for(const t of this._dragSources)t.destroy();this._dragSources=[],this._isInitialised=!1}}minifyConfig(t){return _t.minifyConfig(t)}unminifyConfig(t){return _t.unminifyConfig(t)}init(){let t;if(this.setContainer(),this._dropTargetIndicator=new oe,this._transitionIndicator=new se,this.updateSizeFromContainer(),this.isSubWindow){if(void 0===this._constructorOrSubWindowLayoutConfig)throw new J("LMIU07155");{const e=this._constructorOrSubWindowLayoutConfig.root;if(void 0===e)throw new X("LMIC07156");if(!Ct.isComponent(e))throw new X("LMIC07157");t=e;const i=xt.resolve(this._constructorOrSubWindowLayoutConfig);this.layoutConfig=Object.assign(Object.assign({},i),{root:void 0})}}else void 0===this._constructorOrSubWindowLayoutConfig?this.layoutConfig=_t.createDefault():this.layoutConfig=xt.resolve(this._constructorOrSubWindowLayoutConfig);const e=this.layoutConfig;this._groundItem=new Yt(this,e.root,this._containerElement),this._groundItem.init(),this.checkLoadedLayoutMaximiseItem(),this._resizeObserver.observe(this._containerElement),this._isInitialised=!0,this.adjustColumnsResponsive(),this.emit("initialised"),void 0!==t&&this.loadComponentAsRoot(t)}loadLayout(t){if(!this.isInitialised)throw new Error("GoldenLayout: Need to call init() if LayoutConfig with defined root passed to constructor");if(void 0===this._groundItem)throw new J("LMLL11119");this.createSubWindows(),this.layoutConfig=xt.resolve(t),this._groundItem.loadRoot(this.layoutConfig.root),this.checkLoadedLayoutMaximiseItem(),this.adjustColumnsResponsive()}saveLayout(){if(!1===this._isInitialised)throw new Error("Can't create config, layout not yet initialised");if(void 0===this._groundItem)throw new J("LMTC18244");{const t=this._groundItem.calculateConfigContent();let e;e=1!==t.length?void 0:t[0],this.reconcilePopoutWindows();const i=[];for(let t=0;t=0?n=this._groundItem.contentItems[0]:e=0;break;case at.row:case at.column:e=n.addItem(t,i.index);break;case at.stack:if(Ct.isComponent(t)){e=n.addItem(t,i.index);break}throw Error(tt[6]);case at.component:throw new X("LMAIALC87444602");default:throw new Y("LMAIALU98881733",n.type)}if(Ct.isComponent(t)){const t=n.contentItems[e];Gt.isStack(t)&&(n=t,e=0)}return i.parentItem=n,i.index=e,i}}}loadComponentAsRoot(t){if(void 0===this._groundItem)throw new Error("Cannot add item before init");this._groundItem.loadComponentAsRoot(t)}updateSize(t,e){this.setSize(t,e)}setSize(t,e){if(this._width=t,this._height=e,!0===this._isInitialised){if(void 0===this._groundItem)throw new J("LMUS18881");if(this._groundItem.setSize(this._width,this._height),this._maximisedStack){const{width:t,height:e}=kt(this._containerElement);Tt(this._maximisedStack.element,t),At(this._maximisedStack.element,e),this._maximisedStack.updateSize(!1)}this.adjustColumnsResponsive()}}beginSizeInvalidation(){this._sizeInvalidationBeginCount++}endSizeInvalidation(){0==--this._sizeInvalidationBeginCount&&this.updateSizeFromContainer()}updateSizeFromContainer(){const{width:t,height:e}=kt(this._containerElement);this.setSize(t,e)}updateRootSize(t=!1){if(void 0===this._groundItem)throw new J("LMURS28881");this._groundItem.updateSize(t)}createAndInitContentItem(t,e){const i=this.createContentItem(t,e);return i.init(),i}createContentItem(t,e){if("string"!=typeof t.type)throw new G("Missing parameter 'type'",JSON.stringify(t));if(ct.isComponentItem(t)&&!(e instanceof ee)&&e&&!(!0===this.isSubWindow&&e instanceof Yt)){t={type:at.stack,content:[t],size:t.size,sizeUnit:t.sizeUnit,minSize:t.minSize,minSizeUnit:t.minSizeUnit,id:t.id,maximised:t.maximised,isClosable:t.isClosable,activeItemIndex:0,header:void 0}}return this.createContentItemFromConfig(t,e)}findFirstComponentItemById(t){if(void 0===this._groundItem)throw new J("LMFFCIBI82446");return this.findFirstContentItemTypeByIdRecursive(at.component,t,this._groundItem)}createPopout(t,e,i,n){return t instanceof Gt?this.createPopoutFromContentItem(t,e,i,n):this.createPopoutFromItemConfig(t,e,i,n)}createPopoutFromContentItem(t,e,i,n){let o=t.parent,s=t;for(;null!==o&&1===o.contentItems.length&&!o.isGround;)s=o,o=o.parent;if(null===o)throw new K("LMCPFCI00834");{if(void 0===n&&(n=o.contentItems.indexOf(s)),null!==i&&o.addPopInParentId(i),void 0===e){const i=globalThis.screenX||globalThis.screenLeft,n=globalThis.screenY||globalThis.screenTop,o=t.element.offsetLeft,s=t.element.offsetTop,{width:r,height:a}=kt(t.element);e={left:i+o,top:n+s,width:r,height:a}}const r=t.toConfig();if(t.remove(),ft.isRootItemConfig(r))return this.createPopoutFromItemConfig(r,e,i,n);throw new Error(`${tt[0]}`)}}beginVirtualSizedContainerAdding(){0==++this._virtualSizedContainerAddingBeginCount&&(this._virtualSizedContainers.length=0)}addVirtualSizedContainer(t){this._virtualSizedContainers.push(t)}endVirtualSizedContainerAdding(){if(0==--this._virtualSizedContainerAddingBeginCount){const t=this._virtualSizedContainers.length;if(t>0){this.fireBeforeVirtualRectingEvent(t);for(let e=0;ethis.emit("windowOpened",a))),a.on("closed",(()=>this.reconcilePopoutWindows())),this._openPopouts.push(a),this.layoutConfig.settings.closePopoutsOnUnload&&!this._windowBeforeUnloadListening&&(globalThis.addEventListener("beforeunload",this._windowBeforeUnloadListener,{passive:!0}),this._windowBeforeUnloadListening=!0),a}closeAllOpenPopouts(){for(let t=0;tglobalThis.close()),1)}getArea(t,e){let i=null,n=1/0;for(let o=0;o=s.x1&&t=s.y1&&es.surface&&(n=s.surface,i=s)}return i}calculateItemAreas(){const t=this.getAllContentItems(),e=this._groundItem;if(void 0===e)throw new J("LMCIAR44365");if(1!==t.length){e.contentItems[0].isStack?this._itemAreas=[]:this._itemAreas=e.createSideAreas();for(let e=0;e0){let e=t[0];if(Gt.isComponentItem(e)){const t=e.parent;if(null===t)throw new K("LMXLLMI69999");e=t}if(!Gt.isStack(e))throw new X("LMCLLMI19993");e.maximise()}}}processMaximiseStack(t){if(this._maximisedStack=t,t.on("beforeItemDestroyed",this._maximisedStackBeforeDestroyedListener),t.element.classList.add("lm_maximised"),t.element.insertAdjacentElement("afterend",this._maximisePlaceholder),void 0===this._groundItem)throw new J("LMMXI19993");{this._groundItem.element.prepend(t.element);const{width:e,height:i}=kt(this._containerElement);Tt(t.element,e),At(t.element,i),t.updateSize(!0),t.focusActiveContentItem(),this._maximisedStack.emit("maximised"),this.emit("stateChanged")}}processMinimiseMaximisedStack(){if(void 0===this._maximisedStack)throw new X("LMMMS74422");{const t=this._maximisedStack;if(null===t.parent)throw new K("LMMI13668");t.element.classList.remove("lm_maximised"),this._maximisePlaceholder.insertAdjacentElement("afterend",t.element),this._maximisePlaceholder.remove(),this.updateRootSize(!0),this._maximisedStack=void 0,t.off("beforeItemDestroyed",this._maximisedStackBeforeDestroyedListener),t.emit("minimised"),this.emit("stateChanged")}}reconcilePopoutWindows(){const t=[];for(let e=0;e{this._resizeTimeoutId=void 0,this.beginSizeInvalidation(),this.endSizeInvalidation()}),this.resizeDebounceInterval))}checkClearResizeTimeout(){void 0!==this._resizeTimeoutId&&(clearTimeout(this._resizeTimeoutId),this._resizeTimeoutId=void 0)}setContainer(){var t;const e=document.body,i=null!==(t=this._containerElement)&&void 0!==t?t:e;if(i===e){this.resizeWithContainerAutomatically=!0;const t=document.documentElement;t.style.height="100%",t.style.margin="0",t.style.padding="0",t.style.overflow="clip",e.style.height="100%",e.style.margin="0",e.style.padding="0",e.style.overflow="clip"}this._containerElement=i}onBeforeUnload(){this.destroy()}adjustColumnsResponsive(){if(void 0===this._groundItem)throw new J("LMACR20883");if(this._firstLoad=!1,this.useResponsiveLayout()&&!this._updatingColumnsResponsive&&this._groundItem.contentItems.length>0&&this._groundItem.contentItems[0].isRow){if(void 0===this._groundItem||null===this._width)throw new J("LMACR77412");{const t=this._groundItem.contentItems[0].contentItems.length;if(t<=1)return;{const e=this.layoutConfig.dimensions.defaultMinItemWidth;if(t*e<=this._width)return;{this._updatingColumnsResponsive=!0;const i=t-Math.max(Math.floor(this._width/e),1),n=this._groundItem.contentItems[0],o=this.getAllStacks();if(0===o.length)throw new X("LMACRS77413");{const t=o[0];for(let e=0;en?void 0:{parentItem:t,index:o}}}case 1:if(void 0===this._focusedComponentItem)return;{const t=this._focusedComponentItem.parentItem;return this.tryCreateLocationFromParentItem(t,e)}case 2:{const t=this.findFirstContentItemType(at.stack);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 3:{let t=this.findFirstContentItemType(at.row);return void 0!==t?this.tryCreateLocationFromParentItem(t,e):(t=this.findFirstContentItemType(at.column),void 0!==t?this.tryCreateLocationFromParentItem(t,e):void 0)}case 4:{const t=this.findFirstContentItemType(at.row);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 5:{const t=this.findFirstContentItemType(at.column);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 6:if(void 0===this._groundItem)throw new J("LMFLRIF18244");return void 0!==this.rootItem?void 0:void 0===e||0===e?{parentItem:this._groundItem,index:0}:void 0;case 7:if(void 0===this._groundItem)throw new J("LMFLF18244");{const t=this._groundItem.contentItems;if(0===t.length)return void 0===e||0===e?{parentItem:this._groundItem,index:0}:void 0;{const i=t[0];return this.tryCreateLocationFromParentItem(i,e)}}}}tryCreateLocationFromParentItem(t,e){const i=t.contentItems.length;return void 0===e?{parentItem:t,index:i}:e<0||e>i?void 0:{parentItem:t,index:e}}}!function(t){t.createMaximisePlaceElement=function(t){const e=t.createElement("div");return e.classList.add("lm_maximise_place"),e},t.createTabDropPlaceholderElement=function(t){const e=t.createElement("div");return e.classList.add("lm_drop_tab_placeholder"),e},t.defaultLocationSelectors=[{typeId:1,index:void 0},{typeId:2,index:void 0},{typeId:3,index:void 0},{typeId:7,index:void 0}],t.afterFocusedItemIfPossibleLocationSelectors=[{typeId:0,index:1},{typeId:2,index:void 0},{typeId:3,index:void 0},{typeId:7,index:void 0}]}(ae||(ae={}));class le extends ae{constructor(t,e,i,n){if(super(le.createLayoutManagerConstructorParameters(t,e)),this._bindComponentEventHanlderPassedInConstructor=!1,this._creationTimeoutPassed=!1,void 0!==e&&"function"==typeof e&&(this.bindComponentEvent=e,this._bindComponentEventHanlderPassedInConstructor=!0,void 0!==i&&(this.unbindComponentEvent=i)),!this._bindComponentEventHanlderPassedInConstructor&&this.isSubWindow){if(void 0===this._constructorOrSubWindowLayoutConfig)throw new J("VLC98823");{const t=xt.resolve(this._constructorOrSubWindowLayoutConfig);this.layoutConfig=Object.assign(Object.assign({},t),{root:void 0})}}!0!==n&&(this.deprecatedConstructor||this.init())}destroy(){this.bindComponentEvent=void 0,this.unbindComponentEvent=void 0,super.destroy()}init(){if(this._bindComponentEventHanlderPassedInConstructor||"loading"!==document.readyState&&null!==document.body){if(!this._bindComponentEventHanlderPassedInConstructor&&!0===this.isSubWindow&&!this._creationTimeoutPassed)return setTimeout((()=>this.init()),7),void(this._creationTimeoutPassed=!0);!0===this.isSubWindow&&(this._bindComponentEventHanlderPassedInConstructor||this.clearHtmlAndAdjustStylesForSubWindow(),window.__glInstance=this),super.init()}else document.addEventListener("DOMContentLoaded",(()=>this.init()),{passive:!0})}clearHtmlAndAdjustStylesForSubWindow(){const t=document.head,e=new Array(4);e[0]=document.querySelectorAll("body link"),e[1]=document.querySelectorAll("body style"),e[2]=document.querySelectorAll("template"),e[3]=document.querySelectorAll(".gl_keep");for(let i=0;ithis.emit("popIn"))),document.body.appendChild(t),!0}}bindComponent(t,e){if(void 0!==this.bindComponentEvent){return this.bindComponentEvent(t,e)}if(void 0!==this.getComponentEvent)return{virtual:!1,component:this.getComponentEvent(t,e)};{const t=`${tt[2]}: ${JSON.stringify(e)}`;throw new Z(t)}}unbindComponent(t,e,i){if(void 0!==this.unbindComponentEvent)this.unbindComponentEvent(t);else if(!e&&void 0!==this.releaseComponentEvent){if(void 0===i)throw new J("VCUCRCU333998");this.releaseComponentEvent(t,i)}}}!function(t){let e=!1;t.createLayoutManagerConstructorParameters=function(t,i){const n=e?null:new URL(document.location.href).searchParams.get("gl-window");e=!0;const o=null!==n;let s,r;if(null!==n){const e=localStorage.getItem(n);if(null===e)throw new Error("Null gl-window Config");localStorage.removeItem(n);const i=JSON.parse(e),o=_t.unminifyConfig(i);r=xt.fromResolved(o),t instanceof HTMLElement&&(s=t)}else void 0===t?r=void 0:t instanceof HTMLElement?(r=void 0,s=t):r=t,void 0===s&&i instanceof HTMLElement&&(s=i);return{constructorOrSubWindowLayoutConfig:r,isSubWindow:o,containerElement:s}}}(le||(le={}));class he extends le{constructor(t,e,i){super(t,e,i,!0),this._componentTypesMap=new Map,this._registeredComponentMap=new Map,this._virtuableComponentMap=new Map,this._containerVirtualRectingRequiredEventListener=(t,e,i)=>this.handleContainerVirtualRectingRequiredEvent(t,e,i),this._containerVirtualVisibilityChangeRequiredEventListener=(t,e)=>this.handleContainerVirtualVisibilityChangeRequiredEvent(t,e),this._containerVirtualZIndexChangeRequiredEventListener=(t,e,i)=>this.handleContainerVirtualZIndexChangeRequiredEvent(t,e,i),this.deprecatedConstructor||this.init()}registerComponent(t,e,i=!1){if("function"!=typeof e)throw new $("registerComponent() componentConstructorOrFactoryFtn parameter is not a function");if(e.hasOwnProperty("prototype")){const n=e;this.registerComponentConstructor(t,n,i)}else{const n=e;this.registerComponentFactoryFunction(t,n,i)}}registerComponentConstructor(t,e,i=!1){if("function"!=typeof e)throw new Error(tt[1]);if(void 0!==this._componentTypesMap.get(t))throw new Z(`${tt[3]}: ${t}`);this._componentTypesMap.set(t,{constructor:e,factoryFunction:void 0,virtual:i})}registerComponentFactoryFunction(t,e,i=!1){if("function"!=typeof e)throw new Z("Please register a constructor function");if(void 0!==this._componentTypesMap.get(t))throw new Z(`${tt[3]}: ${t}`);this._componentTypesMap.set(t,{constructor:void 0,factoryFunction:e,virtual:i})}registerComponentFunction(t){this.registerGetComponentConstructorCallback(t)}registerGetComponentConstructorCallback(t){if("function"!=typeof t)throw new Error("Please register a callback function");void 0!==this._getComponentConstructorFtn&&console.warn("Multiple component functions are being registered. Only the final registered function will be used."),this._getComponentConstructorFtn=t}getRegisteredComponentTypeNames(){const t=this._componentTypesMap.keys();return Array.from(t)}getComponentInstantiator(t){let e;const i=pt.resolveComponentTypeName(t);return void 0!==i&&(e=this._componentTypesMap.get(i)),void 0===e&&void 0!==this._getComponentConstructorFtn&&(e={constructor:this._getComponentConstructorFtn(t),factoryFunction:void 0,virtual:!1}),e}bindComponent(t,e){let i;const n=pt.resolveComponentTypeName(e);let o;if(void 0!==n&&(i=this._componentTypesMap.get(n)),void 0===i&&void 0!==this._getComponentConstructorFtn&&(i={constructor:this._getComponentConstructorFtn(e),factoryFunction:void 0,virtual:!1}),void 0!==i){const s=i.virtual;let r,a;r=void 0===e.componentState?void 0:Ut({},e.componentState);const l=i.constructor;if(void 0!==l)a=new l(t,r,s);else{const e=i.factoryFunction;if(void 0===e)throw new X("LMBCFFU10008");a=e(t,r,s)}if(s){if(void 0===a)throw new J("GLBCVCU988774");{const e=a,i=e.rootHtmlElement;if(void 0===i)throw new Z(`${tt[5]}: ${n}`);!function(t){const e="absolute";t.style.position!==e&&(t.style.position=e)}(i),this.container.appendChild(i),this._virtuableComponentMap.set(t,e),t.virtualRectingRequiredEvent=this._containerVirtualRectingRequiredEventListener,t.virtualVisibilityChangeRequiredEvent=this._containerVirtualVisibilityChangeRequiredEventListener,t.virtualZIndexChangeRequiredEvent=this._containerVirtualZIndexChangeRequiredEventListener}}this._registeredComponentMap.set(t,a),o={virtual:i.virtual,component:a}}else o=super.bindComponent(t,e);return o}unbindComponent(t,e,i){if(void 0===this._registeredComponentMap.get(t))super.unbindComponent(t,e,i);else{const e=this._virtuableComponentMap.get(t);if(void 0!==e){const i=e.rootHtmlElement;if(void 0===i)throw new X("GLUC77743",t.title);this.container.removeChild(i),this._virtuableComponentMap.delete(t)}}}fireBeforeVirtualRectingEvent(t){this._goldenLayoutBoundingClientRect=this.container.getBoundingClientRect(),super.fireBeforeVirtualRectingEvent(t)}handleContainerVirtualRectingRequiredEvent(t,e,i){const n=this._virtuableComponentMap.get(t);if(void 0===n)throw new J("GLHCSCE55933");{const o=n.rootHtmlElement;if(void 0===o)throw new Z(tt[4]+" "+t.title);{const n=t.element.getBoundingClientRect(),s=n.left-this._goldenLayoutBoundingClientRect.left;o.style.left=zt(s);const r=n.top-this._goldenLayoutBoundingClientRect.top;o.style.top=zt(r),Tt(o,e),At(o,i)}}}handleContainerVirtualVisibilityChangeRequiredEvent(t,e){const i=this._virtuableComponentMap.get(t);if(void 0===i)throw new J("GLHCVVCRE55934");{const n=i.rootHtmlElement;if(void 0===n)throw new Z(tt[4]+" "+t.title);Dt(n,e)}}handleContainerVirtualZIndexChangeRequiredEvent(t,e,i){const n=this._virtuableComponentMap.get(t);if(void 0===n)throw new J("GLHCVZICRE55935");{const e=n.rootHtmlElement;if(void 0===e)throw new Z(tt[4]+" "+t.title);e.style.zIndex=i}}}const de="initial_",ce={show:"top",popout:!1,maximise:!1,close:"close-tab-unused"},me={headerHeight:31},ue={hasHeaders:!0,reorderEnabled:!0},pe={popoutWholeStack:!1,constrainDragToContainer:!1,constrainDragToHeaders:!1,preventDragout:!1,showMaximiseIcon:!1,showPopoutIcon:!1,showCloseIcon:!1,blockedPopoutsThrowError:!0,closePopoutsOnUnload:!0,selectionEnabled:!1};var ge,fe;class ve{constructor(e){this.layout=e,ge.set(this,void 0),fe.set(this,void 0),this.handleResize=t=>{t.forEach((t=>this.resizeElement(t.target)))},this.handleMutation=()=>{this.layout.viewComponentsByContainerElement.forEach((t=>{this.resizeElement(t.container.element)}))},t.__classPrivateFieldSet(this,ge,new ResizeObserver(this.handleResize),"f"),t.__classPrivateFieldSet(this,fe,new MutationObserver(this.handleMutation),"f")}observeMutations(e){t.__classPrivateFieldGet(this,fe,"f")?.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["class"]})}destroy(){t.__classPrivateFieldGet(this,ge,"f").disconnect(),t.__classPrivateFieldGet(this,fe,"f").disconnect()}observeContainer(e){t.__classPrivateFieldGet(this,ge,"f").observe(e)}unobserveContainer(e){t.__classPrivateFieldGet(this,ge,"f").unobserve(e)}resizeElement(t){const e=this.layout.viewComponentsByContainerElement.get(t);e&&e.resize()}}ge=new WeakMap,fe=new WeakMap;var _e={};Object.defineProperty(_e,"__esModule",{value:!0});var ye=_e.BaseItem=void 0;class Ce{constructor(t,e,i){this._item=t,this._layout=e,this._wrap=i}get raw(){return this._item}get layout(){return this._layout}get type(){return this._item.type}get contentItems(){return(this._item.contentItems??[]).map((t=>this._wrap(t)))}get parent(){const t=this._item.parent;return t?this._wrap(t):null}setActiveContentItem(t,e){if("stack"!==this.type)throw new Error(`Cannot call setActiveContentItem from a non-stack item: ${this.type}`);this._item.setActiveContentItem(t.raw,e)}static wrapInternal(t,e,i){const n=Ce.wrapCache.get(e);if(n)return n;const o=new t(e,i,(e=>Ce.wrapInternal(t,e,i)));return Ce.wrapCache.set(e,o),o}}ye=_e.BaseItem=Ce,Ce.wrapCache=new WeakMap;const we=t=>!!t&&"contentItems"in t&&(t.isRow||t.isColumn);class Ie extends ye{isRoot(){return!!this._item.parent?.isGround}getBounds(){return this._item.element.getBoundingClientRect()}get viewName(){if(this._item.isComponent){const{component:t}=this._item;return t.identity.name}throw new Error("View name not found")}onDestroyed(t){const e=({target:i})=>{i===this._item&&(t(),this._item.off("itemDestroyed",e))};this._item.on("itemDestroyed",e)}createAdjacentStack({position:t="right"}={}){const e=this.raw;if(ee.isStack(e)&&e.parent){const i=["top","bottom"].includes(t)?"column":"row",n=["left","top"].includes(t)?1:0,o=we(e.parent)?e.parent:e.layoutManager,s=o,r=e.parent.contentItems.indexOf(e);e.parent.isGround&&e.parent.removeChild(e,!0);const a=o.newItem({type:i,content:[{type:"stack",content:[]}]},r);if(!a)throw new Error("createAdjacentStack: Failed to create new container");const l=a.contentItems[0];return a.addChild(this.raw,n),we(s)&&s.removeChild(e,!0),this._wrap(l)}throw new Error(`Cannot creat adjacent stacks for type: ${e.type}, must be type 'stack'`)}setActiveContentItem(t,e=!0){if(!ee.isStack(this._item))throw new Error(`Cannot call setActiveContentItem from a non-stack item: ${this.type}`);this._item.setActiveComponentItem(t.raw,!e)}static wrap(t,e){return ye.wrapInternal(Ie,t,e)}}function be(t=[],e){for(const i of t)"component"===i.type?Object.keys(e).forEach((t=>{t in i&&(i.componentState={[`${de}${t}`]:i[t],...i.componentState}),i[t]=e[t]})):be(i.content,e)}function Se(t=[],e,i){for(const n of t)if("component"===n.type)Object.keys(e).forEach((t=>{if(`${de}${t}`in n.componentState)return n[t]=n.componentState[`${de}${t}`],void delete n.componentState[`${de}${t}`];n[t]=e[t]}));else{if(n.size&&("row"===i||"column"===i)){n["row"===i?"width":"height"]=n.size?.includes(".")?parseFloat(n.size):parseInt(n.size)}Se(n.content,e,n.type)}}function Ee(t){if(t.root){t.root.content&&Se([t.root],{componentName:"view",isClosable:!0});const e=t.root;t.content=[e],delete t.root}return t}const xe=e=>class extends e{connectedCallback(){if(!this.name||!this.uuid)throw new Error(" Name or uuid attribute missing");if(!this.src)throw new Error(" missing 'src' attribute.");this.#t||(this.#t=document.createElement("iframe"),this.#t.src=this.src,this.#t.style.height="100%",this.#t.style.width="100%",this.#t.style.border="none",this.forceFrameName?this.#t.setAttribute("name",this.forceFrameName):this.#t.setAttribute("name",t.encodeOptions({brokerUrl:this.brokerUrl,name:this.name,uuid:this.uuid,providerId:this.providerId,contextGroup:this.contextGroup},"of-frame")),this.#t.setAttribute("id",this.name),this.appendChild(this.#t))}#t;get brokerUrl(){return this.getAttribute("of-broker")}set brokerUrl(t){t&&this.setAttribute("of-broker",t)}get name(){return this.getAttribute("of-name")}set name(t){t&&this.setAttribute("of-name",t)}get forceFrameName(){return this.getAttribute("forceFrameName")}set forceFrameName(t){t&&this.setAttribute("forceFrameName",t)}get uuid(){return this.getAttribute("of-uuid")}set uuid(t){t&&this.setAttribute("of-uuid",t)}get src(){return this.getAttribute("src")}set src(t){t&&this.setAttribute("src",t)}get providerId(){return this.getAttribute("of-provider-id")}set providerId(t){t&&this.setAttribute("of-provider-id",t)}get contextGroup(){return this.getAttribute("of-context-group")}set contextGroup(t){t&&this.setAttribute("of-context-group",t)}static get observedAttributes(){return["name"]}};class Le{static create(t){const e=document.createElement("of-view");return Object.entries(t).forEach((([t,i])=>{e.setAttribute(t,i)})),e}}customElements.define("of-view",xe(HTMLElement));class ze{constructor(t,i,n,{brokerUrl:o,interopConfig:s},r){this.container=t,this.config=i,this.ofView=null,this.isDragging=()=>this.container.tab.element?.className.includes("lm_dragging")??!1;const{url:a,web:l,interop:h,name:d}=i||{},c=d??`internal-generated-view-${e.v4()}`;if(this.identity={uuid:n,name:c},this.container.element.setAttribute("of-name",c),this.container.element.id=`container-${c}`,this.container.parent.id=c,void 0===a)return void this.handleUrlMissing();const m=this.updateTitleIfNotSet(a),u={"of-broker":o,"of-uuid":n,"of-name":c,src:a};l?.frameName&&(u.forceFrameName=l.frameName);const p=h?.currentContextGroup??s?.currentContextGroup;p&&(u["of-context-group"]=p),s?.providerId&&(u["of-provider-id"]=s?.providerId),this.ofView=Le.create(u),this.ofView.title=m??`Iframe: ${a}`,r.appendChild(this.ofView),this.ofView.style.position="absolute"}updateTitleIfNotSet(t){return"view"===this.container.parent.title&&this.container.parent.setTitle(t),this.container.parent.title}handleUrlMissing(){const t=document.createElement("div");t.setAttribute("style","padding: 20px");t.innerText="No URL provided",this.container.element.appendChild(t)}destroy(){this.ofView?.remove(),this.ofView=null}closeView(){this.container.close()}resize(){if(this.ofView){if(this.isDragging())return void(this.ofView.style.display="none");const t=this.container.element.getBoundingClientRect();this.ofView.style.position="absolute",this.ofView.style.height=`${t.height}px`,this.ofView.style.width=`${t.width}px`,this.ofView.style.inset=`${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`,this.ofView.style.display="block"}}}class Me extends U{static overrideConfig(t){const e={...ue,...t.settings,...pe};return e.reorderEnabled?be(t.content,{isClosable:!0}):be(t.content,{reorderEnabled:!1}),{dimensions:me,...t,settings:e,header:{...ce,show:!1!==t.settings?.hasHeaders&&ce.show}}}constructor(t,e,i,{options:n},o,s){super(),this.identity=t,this.container=e,this.initialConfig=i,this.layoutManager=o,this.platformProvider=s,this.viewComponentsByContainerElement=new Map,this.layoutContentCache=_.getSingleInstance(),this.reparentingViews=new Set,this.goldenLayoutDestroyed=!1,this.createViewComponent=(t,e)=>{m.handleSharedView(this.layoutManager,this.identity,e);const i=new ze(t,e,this.identity.uuid,this.options,this.iframeContainer);return e&&!1===e[`${de}isClosable`]&&this.stylesheet.insertRule(`#tab-${i.identity.name} .lm_close_tab { display: none; }`),this.viewComponentsByContainerElement.set(t.element,i),this.resizeController.observeContainer(t.element),i},this.iframeContainer=document.createElement("div"),this.iframeContainer.id=`openfin-layout-iframe-container-${this.identity.layoutName}`,this.domEmitter=new V(e),this.setupStylesheets(),this.layout=new he(this.container),this.layout.resizeWithContainerAutomatically=!0,this.options=n,this.layout.registerComponent("view",this.createViewComponent),this.setupListeners(),this.resizeController=new ve(this),this.layout.loadLayout(Me.overrideConfig(i));const r=document.createElement("div");r.id=`openfin-layout-shadow-container-${this.identity.layoutName}`,r.attachShadow({mode:"open",delegatesFocus:!1}).appendChild(this.iframeContainer),this.container.appendChild(r),this.resizeController.observeMutations(this.container)}getStackByView({name:t}){const e=this.layout.findFirstComponentItemById(t);if(e?.parent&&e?.parent?.isStack)return Ie.wrap(e.parent,this)}getRoot(){return Ie.wrap(this.layout.rootItem,this)}async platformCloseView(t){const e=[...this.viewComponentsByContainerElement.values()].find((e=>e.identity.name===t.name));if(!e)throw new Error(`View with name: ${t.name} not found in layout.`);e.closeView()}async platformCreateView(t,{location:e,targetView:i}={}){if(i)throw new Error("TargetView not supported in web");const n={options:this.platformProvider.normalizeOptions(t),target:this.identity,location:e};return this.insertView(n)}setupStylesheets(){if(this.container.setAttribute("data-openfin-layout-name",this.identity.layoutName),this.stylesheet=new CSSStyleSheet,this.stylesheet.insertRule(".lm_close { display: none; }"),document.adoptedStyleSheets.push(this.stylesheet),this.initialConfig.settings?.preventSplitterResize){const t=`\n [data-openfin-layout-name='${this.identity.layoutName}'] .lm_splitter {\n pointer-events: none;\n }`;this.stylesheet.insertRule(t)}}insertView({options:t,location:e,targetView:i}){const n=e?this.layoutContentCache.getItemOrUndefined(e.id):void 0,o=i?this.layoutContentCache.getItemOrUndefined(i.name):void 0,s=n??o??Ie.wrap(this.layout.rootItem,this);let r;if(ee.isStack(s.raw))r=s.raw;else{if(!we(s.raw))throw new Error("Cannot add a view at the requested location");r=s.raw.newItem({type:"stack",content:[]})}const a=Math.min(r.contentItems.length,e?.index??r.contentItems.length);let l=this.layout.findFirstComponentItemById(t.name);l?(l.parent&&l.parent.removeChild(l,!0),r.addChild(l,a)):l=r.newComponent("view",t,t.title??t.url??"Default Title",a);const h=l.component.identity;return Promise.resolve({identity:h})}replaceView({viewToReplace:t,newView:e}){throw new Error("Method not implemented.")}replaceLayout(t){throw new Error("Method not implemented.")}async cleanupView(t){}applyPreset(t){throw new Error("Method not implemented.")}getCurrentViews(){return[...this.viewComponentsByContainerElement.values()].map((t=>t.identity))}async getFrameSnapshot(){return Ee(xt.fromResolved(this.layout.toConfig()))}isVisible(){return W(this.container)}async onViewDetached({viewIdentity:t}){this.reparentingViews.add(t.name),this.platformCloseView(t)}async destroy(){this.goldenLayoutDestroyed||(this.goldenLayoutDestroyed=!0,this.layout.destroy()),this.iframeContainer.remove(),this.resizeController.destroy(),document.adoptedStyleSheets=document.adoptedStyleSheets.filter((t=>t!==this.stylesheet)),this.viewComponentsByContainerElement.clear()}setupListeners(){this.container.addEventListener("pointerdown",(t=>{if(t.target instanceof HTMLElement){const e=t.target.classList;["lm_tab","lm_title","lm_splitter","lm_drag_handle"].some((t=>e.contains(t)))&&(this.handleDragStart(),2===t.button&&t.stopPropagation())}}),!0),document.addEventListener("pointerup",(()=>this.handleDragEnd()),!0),this.layout.on("tabCreated",(t=>{const e=t.componentItem.component;t.element.id=`tab-${e.identity.name}`,this.domEmitter.dispatchLocalEvent("tab-created",e.identity)})),this.layout.on("itemCreated",(({target:t})=>{const e=t;if(Gt.isComponentItem(e)){const t=e.component;this.domEmitter.dispatchLocalEvent("container-created",t.identity)}})),this.layout.on("itemDestroyed",(t=>{const e=t.target;if(Gt.isComponentItem(e)){const t=e.component;this.removeViewComponent(t)}})),this.layout.on("itemDropped",(()=>{this.handleDragEnd()}))}handleDragStart(){this.iframeContainer.style.pointerEvents="none"}handleDragEnd(){this.iframeContainer.style.pointerEvents=""}removeViewComponent(t){if(t.config&&!1===t.config[`${de}isClosable`]){const e=[...this.stylesheet.cssRules].findIndex((e=>e.cssText.includes(`#tab-${t.identity.name}`)));this.stylesheet.deleteRule(e)}t.destroy(),this.viewComponentsByContainerElement.delete(t.container.element),this.resizeController.unobserveContainer(t.container.element),this.reparentingViews.has(t.identity.name)?this.reparentingViews.delete(t.identity.name):this.platformProvider.closeView(t.identity.name);0===this.getCurrentViews().length&&(this.goldenLayoutDestroyed||(this.goldenLayoutDestroyed=!0,m.handleLastViewRemoved(this.layoutManager,this.identity)))}}class Pe{constructor(t,e,i,n){this.windowIdentity=t,this.connectConfig=e,this.provider=i,this.fallbackContainer=n}async createLayout(t,e){if(!("container"in t)&&!this.fallbackContainer)throw new Error("Container property is not optional in web");const{layoutName:i}=t,n=t,o=this.provider.initLayoutViews(n),s=n.container??this.fallbackContainer,r={...this.windowIdentity,layoutName:i},a=new Me(r,s,o,this.connectConfig,e,this.provider);m.registerLayout(e,i,a),this.fallbackContainer=null}async getLayoutSnapshot(t){return t.getLayoutSnapshot()}async handleLastViewRemoved(t){}}class Te{static async init(e){const i=e.getFin().InterApplicationBus.Channel,n=await i.create(`custom-frame-${e.me.uuid}`);return n.setDefaultAction((async(t,{target:e,opts:i},o)=>{const s=n.connections.find((t=>t.name===e.name));if(s)return n.dispatch(s,t,{...i,target:e});throw new Error(`Client with name ${e.name} not found`)})),await t.relayChannelClientApi_1(n,"layout-relay"),new Te(e)}constructor(t){this.wire=t,this.viewNames=new Set}normalizeOptions(t,i="default"){const n=this.wire.me.uuid;let{name:o=`internal-generated-view-${e.v4()}`}=t;return o.match(/^internal-generated-view-/)&&this.viewNames.has(o)&&"duplicate"===i&&(o=`internal-generated-view-${e.v4()}`),this.viewNames.add(o),{...t,name:o,uuid:n}}closeView(t){this.viewNames.delete(t)}initLayoutViews({layout:t,multiInstanceViewBehavior:e}){return H((t=>{if("component"===t.type&&t.componentState){const i=this.normalizeOptions(t.componentState,e);return{...t,componentState:i}}return t}),t)}}var Ae;const ke=t=>t;Ae=new WeakMap,exports.WebLayoutEntryPoint=class{constructor(e){Ae.set(this,void 0),this.initLayoutManager=async(e,i,{container:n,layoutManagerOverride:o})=>{const s=await Te.init(i),r=o??ke,a=new Pe(i.me,t.__classPrivateFieldGet(this,Ae,"f"),s,n),l=new(r(m.createClosedConstructor(a)));return await M(i,l),l},this.applyLayoutSnapshot=async(e,i,n)=>{await i.applyLayoutSnapshot(t.__classPrivateFieldGet(this,Ae,"f").platform.layoutSnapshot)},this.createLayout=async(t,e)=>m.createLayout(t,e),this.destroyLayout=async(t,e)=>m.destroyLayout(t,e),t.__classPrivateFieldSet(this,Ae,e,"f")}}; @@ -7340,7 +7340,7 @@ module.exports = stubFalse; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.init = init; -const core_web_1 = __webpack_require__(/*! @openfin/core-web */ "./node_modules/@openfin/core-web/out/api-client.js"); +const core_web_1 = __webpack_require__(/*! @openfin/core-web */ "../../node_modules/@openfin/core-web/out/api-client.js"); const settings_1 = __webpack_require__(/*! ../platform/settings/settings */ "./client/src/platform/settings/settings.ts"); /** * Initializes the OpenFin Web Broker connection. @@ -8441,7 +8441,7 @@ function version(uuid) { /******/ /************************************************************************/ var __webpack_exports__ = {}; -// This entry need to be wrapped in an IIFE because it need to be in strict mode. +// This entry needs to be wrapped in an IIFE because it needs to be in strict mode. (() => { "use strict"; var exports = __webpack_exports__; diff --git a/web/v19.2.0/web-interop-support-context-and-intents/js/fdc3-view.bundle.js.map b/web/v19.2.0/web-interop-support-context-and-intents/js/fdc3-view.bundle.js.map index 9e2f0f4..a3802d4 100644 --- a/web/v19.2.0/web-interop-support-context-and-intents/js/fdc3-view.bundle.js.map +++ b/web/v19.2.0/web-interop-support-context-and-intents/js/fdc3-view.bundle.js.map @@ -1 +1 @@ -{"version":3,"file":"fdc3-view.bundle.js","mappings":";;;;;;;;;;AAAa,MAAM,mBAAO,CAAC,iFAAoB,EAAE,mBAAO,CAAC,mDAAS,EAAE,mBAAO,CAAC,+DAAM,EAAE,mBAAO,CAAC,mDAAQ,EAAE,mBAAO,CAAC,gEAAkB,EAAE,mBAAO,CAAC,4DAAgB,EAAE,eAAe;;;;;;;;;;;;ACA9J,MAAM,mBAAO,CAAC,mDAAS,IAAI,mBAAO,CAAC,mDAAQ,IAAI,mBAAO,CAAC,gEAAkB,IAAI,mBAAO,CAAC,4DAAgB,IAAI,mBAAO,CAAC,+DAAM,EAAE,kBAAkB,EAAE,GAAG,wBAAwB,GAAG,sGAAsG,qBAAM,CAAC,qBAAM,iCAAiC,KAAK,KAAK,KAAK,MAAM,oBAAoB,WAAW,kBAAkB,kBAAkB,UAAU,SAAS,sCAAsC,SAAS,sFAAsF,mCAAmC,6BA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v6nD;;AAEZ,kBAAkB;AAClB,mBAAmB;AACnB,qBAAqB;;AAErB;AACA;AACA;;AAEA;AACA,mCAAmC,SAAS;AAC5C;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,cAAc,SAAS;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,2CAA2C,UAAU;AACrD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;ACrJA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEY;;AAEZ,eAAe,mBAAO,CAAC,wDAAW;AAClC,gBAAgB,mBAAO,CAAC,oDAAS;AACjC;AACA;AACA;AACA;;AAEA,cAAc;AACd,kBAAkB;AAClB,yBAAyB;;AAEzB;AACA,kBAAkB;;AAElB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,kBAAkB,YAAY;AAC9B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA,wCAAwC,SAAS;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;;AAEA;AACA;AACA,cAAc,iBAAiB;AAC/B;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,iDAAiD,EAAE;AACnD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C;AAC1C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA,yBAAyB,eAAe;AACxC;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,yBAAyB,QAAQ;AACjC;AACA,sBAAsB,eAAe;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc,YAAY;AAC1B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB,sBAAsB;AACxC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,mBAAmB;AACnB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA,oBAAoB,SAAS;AAC7B;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA,qBAAqB,WAAW,GAAG,IAAI;AACvC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA,gBAAgB,WAAW,GAAG,IAAI,KAAK,aAAa;AACpD;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;;AAEA;AACA,GAAG;AACH;AACA;AACA,mBAAmB,KAAK,mDAAmD,cAAc;AACzF,GAAG;AACH;AACA;AACA,+BAA+B,IAAI;AACnC;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,MAAM,aAAa,SAAS;AACtD;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,SAAS,gBAAgB;AACzB,cAAc,oBAAoB,EAAE,IAAI;AACxC;AACA,YAAY,gBAAgB,EAAE,IAAI;AAClC;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,GAAG,SAAS,GAAG,KAAK,qBAAqB,EAAE,EAAE;AACpE,QAAQ;AACR,yBAAyB,GAAG,KAAK,yBAAyB,EAAE,EAAE;AAC9D,mBAAmB,yBAAyB,EAAE,EAAE;AAChD;AACA,MAAM;AACN,oBAAoB,IAAI,EAAE,GAAG,SAAS,IAAI,EAAE,EAAE;AAC9C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,0CAA0C,cAAc,SAAS,OAAO;AACxE;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,kBAAkB,YAAY;AAC9B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,kBAAkB,gBAAgB;AAClC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,kBAAkB,gBAAgB;AAClC;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,cAAc,YAAY;AAC1B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,QAAQ;AAC1B;AACA,oBAAoB,QAAQ;AAC5B;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;;;;;ACzjEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEa;;AAEb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB;;AAEnB;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,sBAAsB;AACxC;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA,eAAe;AACf;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA,oBAAoB,SAAS;AAC7B;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;;AAEA,kCAAkC,QAAQ;AAC1C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oBAAoB,iBAAiB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,QAAQ;AACR;AACA,uCAAuC,QAAQ;AAC/C;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,OAAO;AACzB;AACA;AACA;;AAEA;AACA,SAAS,yBAAyB;AAClC;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,gBAAgB;AAClC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,8DAA8D,YAAY;AAC1E;AACA,8DAA8D,YAAY;AAC1E;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,qCAAqC,YAAY;AACjD;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;AACA;;;;;;;;;;;AChfA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,SAAS,WAAW;;AAEpB;AACA;AACA;AACA,SAAS,WAAW;;AAEpB;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA,SAAS,WAAW;;AAEpB;AACA;AACA,SAAS,UAAU;;AAEnB;AACA;;;;;;;;;;;ACpFA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,WAAW,mBAAO,CAAC,mDAAS;;AAE5B;AACA;;AAEA;;;;;;;;;;;ACNA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,iBAAiB,mBA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,CAAC,yDAAY;AACnC,cAAc,mBAAO,CAAC,yDAAY;AAClC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,SAAS;AACpB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AChDA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACnBA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,UAAU;AACrB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACtBA,sBAAsB,mBAAO,CAAC,yEAAoB;AAClD,SAAS,mBAAO,CAAC,6CAAM;;AAEvB;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC3BA,SAAS,mBAAO,CAAC,6CAAM;;AAEvB;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpBA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,WAAW,mBAAO,CAAC,iDAAQ;;AAE3B;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA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A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,SAAS;AACpB;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa,GAAG;AAChB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;AACA,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;;;;;;;;;;ACrKA,eAAe,mBAAO,CAAC,yDAAY;;AAEnC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;;;;;;;;;;AC7BA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,cAAc,mBAAO,CAAC,uDAAW;;AAEjC;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACnBA,aAAa,mBAAO,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EA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClFA,aAAa,mBAAO,CAAC,uDAAW;AAChC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA,iBAAiB,mBAAO,CAAC,6DAAc;AACvC,eAAe,mBAAO,CAAC,2DAAa;AACpC,eAAe,mBAAO,CAAC,yDAAY;AACnC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;AACA;AACA;AACA,oCAAoC;;AAEpC;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC9CA,aAAa,mBAAO,CAAC,uDAAW;AAChC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,eAAe,mBAAO,CAAC,yDAAY;AACnC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA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AAe;AACxC,SAAS,mBAAO,CAAC,6CAAM;AACvB,kBAAkB,mBAAO,CAAC,iEAAgB;AAC1C,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC/GA,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;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AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACdA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AChBA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,GAAG;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC7BA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACtBA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACtBA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACzBA,uBAAuB,mBAAO,CAAC,2EAAqB;AACpD,oBAAoB,mBAAO,CAAC,qEAAkB;AAC9C,kBAAkB,mBAAO,CAAC,iEAAgB;AAC1C,kBAAkB,mBAAO,CAAC,iEAAgB;AAC1C,sBAAsB,mBAAO,CAAC,yEAAoB;;AAElD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC5EA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,mBAAmB,mBAAO,CAAC,mEAAiB;AAC5C,kBAAkB,mBAAO,CAAC,iEAAgB;;AAE1C;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACxBA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACdA,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACnBA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACZA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAA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d,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACbA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;;;;;;;;;;ACjBA,gBAAgB,mBAAO,CAAC,6DAAc;;AAEtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACdA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,GAAG;AAChB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACbA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACbA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,UAAU,mBAAO,CAAC,iDAAQ;AAC1B,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjCA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;;;;;;;;;;;ACzBA,gBAAgB,mBAAO,CAAC,6DAAc;;AAEtC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,GAAG;AAChB;AACA;AACA;AACA,oBAAoB,QAAQ,IAAI,QAAQ;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,kBAAkB;AAClB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpCA,sBAAsB,mBAAO,CAAC,yEAAoB;AAClD,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA,8BAA8B,mBAAmB;AACjD;AACA;AACA;AACA;AACA;AACA,+CAA+C,mBAAmB;AAClE;AACA;AACA;;AAEA;;;;;;;;;;;ACnCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACzBA,iBAAiB,mBAAO,CAAC,6DAAc;AACvC,eAAe,mBAAO,CAAC,yDAAY;;AAEnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AChCA,WAAW,mBAAO,CAAC,mDAAS;AAC5B,gBAAgB,mBAAO,CAAC,2DAAa;;AAErC;AACA,kBAAkB,KAA0B;;AAE5C;AACA,gCAAgC,QAAa;;AAE7C;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACrCA,kBAAkB,mBAAO,CAAC,iEAAgB;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,kBAAkB;AAClB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClCA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,eAAe,mBAAO,CAAC,yDAAY;;AAEnC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpCA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClCA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC1BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC9BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC5BA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC1BA,uBAAuB,mBAAO,CAAC,2EAAqB;AACpD,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC1BA,oBAAoB,mBAAO,CAAC,qEAAkB;AAC9C,eAAe,mBAAO,CAAC,2DAAa;AACpC,kBAAkB,mBAAO,CAAC,+DAAe;;AAEzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpCA,oBAAoB,mBAAO,CAAC,qEAAkB;AAC9C,iBAAiB,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CAAC,CAAC,UAAU,CAAC;IACzD,OAAO,WAAW,CAAC;AACpB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACjHuC;AACA;AACA;AACA;AACE;AACQ;AACE;AACE;;;;;;;;;;;;;;;;ACPtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD;;AAEnD;;AAEA,oBAAoB,gBAAgB;AACpC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA,kBAAkB,cAAc;AAChC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,kBAAkB,cAAc;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,kBAAkB,aAAa;AAC/B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,iEAAe,GAAG;;;;;;;;;;;;;;;ACtNlB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AAI,IAAI,eAAe,KAAK,IAAI,IAAI,cAAc,KAAK,IAAI,EAAE,CAAC;QACrF,eAAe,CAAC,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;QAC3C,eAAe,CAAC,WAAW,GAAG,OAAO,CAAC,IAAI,IAAI,mBAAmB,CAAC;QAClE,cAAc,CAAC,WAAW,GAAG,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;IAC/D,CAAC;AACF,CAAC;AAED;;GAEG;AACH,KAAK,UAAU,aAAa;IAC3B,MAAM,eAAe,GAAG,QAAQ,CAAC,aAAa,CAAoB,YAAY,CAAC,CAAC;IAEhF,IAAI,eAAe,KAAK,IAAI,EAAE,CAAC;QAC9B,eAAe,CAAC,gBAAgB,CAAC,OAAO,EAAE,KAAK,IAAI,EAAE;YACpD,MAAM,gBAAgB,EAAE,CAAC;QAC1B,CAAC,CAAC,CAAC;IACJ,CAAC;IAED,MAAM,eAAe,EAAE,CAAC;AACzB,CAAC","sources":["webpack://openfin-web--web-interop-support-context-and-intents/./node_modules/@openfin/core-web/out/api-client.js","webpack://openfin-web--web-interop-support-context-and-intents/./node_modules/@openfin/core-web/out/main-8cad4070.js","webpack://openfin-web--web-interop-support-context-and-intents/./node_modules/@openfin/core-web/out/main-b14f67c9.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/base64-js/index.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/buffer/index.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/events/events.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/ieee754/index.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_DataView.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_Hash.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_ListCache.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_Map.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_MapCache.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_Promise.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_Set.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_SetCache.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_Stack.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_Symbol.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_Uint8Array.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_WeakMap.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_arrayEach.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_arrayFilter.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_arrayLikeKeys.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_arrayPush.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_arraySome.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_assignValue.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_assocIndexOf.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseAssign.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseAssignIn.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseAssignValue.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseClone.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseCreate.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseGetAllKeys.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseGetTag.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseIsArguments.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseIsEqual.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseIsEqualDeep.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseIsMap.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseIsNative.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseIsSet.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseIsTypedArray.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseKeys.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseKeysIn.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseTimes.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseUnary.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_cacheHas.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_cloneArrayBuffer.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_cloneBuffer.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_cloneDataView.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_cloneRegExp.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_cloneSymbol.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_cloneTypedArray.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_copyArray.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_copyObject.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_copySymbols.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_copySymbolsIn.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_coreJsData.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_defineProperty.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_equalArrays.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_equalByTag.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_equalObjects.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_freeGlobal.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_getAllKeys.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_getAllKeysIn.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_getMapData.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_getNative.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_getPrototype.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_getRawTag.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_getSymbols.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_getSymbolsIn.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_getTag.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_getValue.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_hashClear.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_hashDelete.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_hashGet.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_hashHas.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_hashSet.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_initCloneArray.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_initCloneByTag.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_initCloneObject.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_isIndex.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_isKeyable.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_isMasked.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_isPrototype.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_listCacheClear.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_listCacheDelete.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_listCacheGet.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_listCacheHas.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_listCacheSet.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_mapCacheClear.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_mapCacheDelete.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_mapCacheGet.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_mapCacheHas.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_mapCacheSet.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_mapToArray.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_nativeCreate.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_nativeKeys.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_nativeKeysIn.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_nodeUtil.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_objectToString.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_overArg.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_root.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_setCacheAdd.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_setCacheHas.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_setToArray.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_stackClear.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_stackDelete.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_stackGet.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_stackHas.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_stackSet.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_toSource.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/cloneDeep.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/eq.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/isArguments.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/isArray.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/isArrayLike.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/isBuffer.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/isEqual.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/isFunction.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/isLength.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/isMap.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/isObject.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/isObjectLike.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/isSet.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/isTypedArray.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/keys.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/keysIn.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/stubArray.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/stubFalse.js","webpack://openfin-web--web-interop-support-context-and-intents/./client/src/content/api.ts","webpack://openfin-web--web-interop-support-context-and-intents/./client/src/platform/settings/settings.ts","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/index.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/md5.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/nil.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/parse.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/regex.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/rng.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/sha1.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/stringify.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/v1.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/v3.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/v35.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/v4.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/v5.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/validate.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/version.js","webpack://openfin-web--web-interop-support-context-and-intents/webpack/bootstrap","webpack://openfin-web--web-interop-support-context-and-intents/webpack/runtime/define property getters","webpack://openfin-web--web-interop-support-context-and-intents/webpack/runtime/global","webpack://openfin-web--web-interop-support-context-and-intents/webpack/runtime/hasOwnProperty shorthand","webpack://openfin-web--web-interop-support-context-and-intents/webpack/runtime/make namespace object","webpack://openfin-web--web-interop-support-context-and-intents/webpack/runtime/node module decorator","webpack://openfin-web--web-interop-support-context-and-intents/./client/src/content/fdc3-view.ts"],"sourcesContent":["\"use strict\";var e=require(\"./main-8cad4070.js\");require(\"buffer/\"),require(\"uuid\"),require(\"events\"),require(\"lodash/cloneDeep\"),require(\"lodash/isEqual\"),exports.connect=e.connect;\n","\"use strict\";var e=require(\"buffer/\"),t=require(\"events\"),n=require(\"lodash/cloneDeep\"),i=require(\"lodash/isEqual\"),r=require(\"uuid\");const o=(e,t)=>`${t}<${btoa(JSON.stringify(e))}>`;var s=\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof window?window:\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:{},a={},c={},d={},h={};async function l(e){const t=[];for(const n of e){const e=await n();t.push(e)}return t}Object.defineProperty(h,\"__esModule\",{value:!0}),h.promiseMapSerial=h.serial=h.promiseMap=h.promisify=void 0,h.promisify=function(e){return(...t)=>new Promise(((n,i)=>{e(...t,((e,t)=>e?i(e):n(t)))}))},h.promiseMap=async function(e,t){return Promise.all(e.map(t))},h.serial=l,h.promiseMapSerial=async function(e,t){return l(e.map(((e,n,i)=>()=>t(e,n,i))))};var u,p=s&&s.__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},w=s&&s.__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)};Object.defineProperty(d,\"__esModule\",{value:!0}),d.Reply=d.EmitterBase=d.Base=void 0;const y=h;class f{constructor(e){this.isNodeEnvironment=()=>\"node\"===this.wire.environment.type,this.isOpenFinEnvironment=()=>\"openfin\"===this.wire.environment.type,this.isBrowserEnvironment=()=>\"other\"===this.wire.environment.type,this.wire=e}get fin(){return this.wire.getFin()}get me(){return this.wire.me}}d.Base=f;d.EmitterBase=class extends f{constructor(e,t,...n){super(e),this.topic=t,u.set(this,void 0),this.eventNames=()=>this.hasEmitter()?this.getOrCreateEmitter().eventNames():[],this.emit=(e,t,...n)=>!!this.hasEmitter()&&this.getOrCreateEmitter().emit(e,t,...n),this.hasEmitter=()=>this.wire.eventAggregator.has(w(this,u,\"f\")),this.getOrCreateEmitter=()=>this.wire.eventAggregator.getOrCreate(w(this,u,\"f\")),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[],this.listenerCount=e=>this.hasEmitter()?this.getOrCreateEmitter().listenerCount(e):0,this.registerEventListener=async(e,t={},n,i)=>{const r={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e},o=this.getOrCreateEmitter();n(o);try{await this.wire.sendAction(\"subscribe-to-desktop-event\",r)}catch(e){throw i(o),this.deleteEmitterIfNothingRegistered(o),e}},this.deregisterEventListener=async(e,t={})=>{if(this.hasEmitter()){const n={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e};await this.wire.sendAction(\"unsubscribe-to-desktop-event\",n).catch((()=>null));return this.getOrCreateEmitter()}return Promise.resolve()},p(this,u,[t,...n],\"f\"),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[]}async on(e,t,n){return await this.registerEventListener(e,n,(n=>{n.on(e,t)}),(n=>{n.removeListener(e,t)})),this}async addListener(e,t,n){return this.on(e,t,n)}async once(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.once(e,i),n.once(e,t)}),(n=>{n.removeListener(e,i),n.removeListener(e,t)})),this}async prependListener(e,t,n){return await this.registerEventListener(e,n,(n=>{n.prependListener(e,t)}),(n=>{n.removeListener(e,t)})),this}async prependOnceListener(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.prependOnceListener(e,t),n.once(e,i)}),(n=>{n.removeListener(e,t),n.removeListener(e,i)})),this}async removeListener(e,t,n){const i=await this.deregisterEventListener(e,n);return i&&(i.removeListener(e,t),this.deleteEmitterIfNothingRegistered(i)),this}async deregisterAllListeners(e){const t={...this.identity,type:e,topic:this.topic};if(this.hasEmitter()){const e=this.getOrCreateEmitter(),n=e.listenerCount(t.type),i=[];for(let e=0;enull)));return await Promise.all(i),e}}async removeAllListeners(e){const t=async e=>{const t=await this.deregisterAllListeners(e);t&&(t.removeAllListeners(e),this.deleteEmitterIfNothingRegistered(t))};if(e)await t(e);else if(this.hasEmitter()){const e=this.getOrCreateEmitter().eventNames();await(0,y.promiseMap)(e,t)}return this}deleteEmitterIfNothingRegistered(e){0===e.eventNames().length&&this.wire.eventAggregator.delete(w(this,u,\"f\"))}},u=new WeakMap;d.Reply=class{};var g={};Object.defineProperty(g,\"__esModule\",{value:!0});var m=g.RuntimeError=g.NotSupportedError=g.NotImplementedError=g.NoAckError=g.DuplicateCorrelationError=g.UnexpectedActionError=g.DisconnectedError=void 0;class v extends Error{constructor(e){super(`Expected websocket state OPEN but found ${e}`),this.readyState=e}}g.DisconnectedError=v;class C extends Error{}g.UnexpectedActionError=C;class b extends Error{}g.DuplicateCorrelationError=b;class I extends Error{}g.NoAckError=I;class E extends Error{}g.NotImplementedError=E;class x extends Error{}g.NotSupportedError=x;class A extends Error{constructor(e){const{message:t,name:n,stack:i,...r}=e;super(t),this.name=n||\"Error\",this.stack=i??this.toString(),Object.keys(r).forEach((e=>{this[e]=r[e]}))}}class P extends Error{static getCallSite(e=0){const t=Error.stackTraceLimit,n=e+1;Error.stackTraceLimit=t+n;const i=Error.prepareStackTrace;Error.prepareStackTrace=(e,t)=>t;const r=(new Error).stack?.slice(n)??[];return Error.prepareStackTrace=i,Error.stackTraceLimit=t,r}static prepareStackTrace(e,t){if(\"function\"==typeof Error.prepareStackTrace)return Error.prepareStackTrace(e,t);let n=\"\";n+=e.name||\"Error\",n+=`: ${e.message||\"\"}`;for(const e of t)n+=`\\n at ${e.toString()}`;return n}constructor(e,t){const{reason:n,error:i}=e;super(n),this.name=\"RuntimeError\",i?.stack&&(this.cause=new A(i)),t&&(this.stack=P.prepareStackTrace(this,t))}}m=g.RuntimeError=P;var M={},_={},O={};Object.defineProperty(O,\"__esModule\",{value:!0}),O.validateIdentity=void 0,O.validateIdentity=function(e){let t;return\"object\"==typeof e&&\"string\"==typeof e.uuid||(t=\"Not a valid identity object\"),t};var S={},R={},F={},j={},k={},L={},T={};Object.defineProperty(T,\"__esModule\",{value:!0}),T.handleDeprecatedWarnings=void 0;var $;T.handleDeprecatedWarnings=e=>{(e.contentNavigation?.whitelist||e.contentNavigation?.blacklist||e.contentRedirect?.whitelist||e.contentRedirect?.blacklist)&&console.warn(\"The properties 'whitelist' and 'blacklist' have been marked as deprecated and will be removed in a future version. Please use 'allowlist' and 'denylist'.\")};var B={},G={};Object.defineProperty(G,\"__esModule\",{value:!0}),G.AsyncRetryableLazy=W=G.Lazy=void 0;var W=G.Lazy=class{constructor(e){this.producerFn=e}getValue(){return this.value||(this.value=this.producerFn()),this.value}};G.AsyncRetryableLazy=class{constructor(e){this.producerFn=e}async getValue(){return this.promise||(this.promise=this.producerFn().catch((e=>{throw delete this.promise,e}))),this.promise}};var H={};Object.defineProperty(H,\"__esModule\",{value:!0}),H.WebContents=void 0;const N=d;class D extends N.EmitterBase{constructor(e,t,n){super(e,n,t.uuid,t.name),this.identity=t,this.entityType=n}capturePage(e){return this.wire.sendAction(\"capture-page\",{options:e,...this.identity}).then((({payload:e})=>e.data))}executeJavaScript(e){return this.wire.sendAction(\"execute-javascript-in-window\",{...this.identity,code:e}).then((({payload:e})=>e.data))}getZoomLevel(){return this.wire.sendAction(\"get-zoom-level\",this.identity).then((({payload:e})=>e.data))}setZoomLevel(e){return this.wire.sendAction(\"set-zoom-level\",{...this.identity,level:e}).then((()=>{}))}navigate(e){return this.wire.sendAction(\"navigate-window\",{...this.identity,url:e}).then((()=>{}))}navigateBack(){return this.wire.sendAction(\"navigate-window-back\",{...this.identity}).then((()=>{}))}async navigateForward(){await this.wire.sendAction(\"navigate-window-forward\",{...this.identity})}stopNavigation(){return this.wire.sendAction(\"stop-window-navigation\",{...this.identity}).then((()=>{}))}reload(e=!1){return this.wire.sendAction(\"reload-window\",{ignoreCache:e,...this.identity}).then((()=>{}))}print(e={}){return this.wire.sendAction(\"print\",{...this.identity,options:e}).then((()=>{}))}findInPage(e,t){return this.wire.sendAction(\"find-in-page\",{...this.identity,searchTerm:e,options:t}).then((({payload:e})=>e.data))}stopFindInPage(e){return this.wire.sendAction(\"stop-find-in-page\",{...this.identity,action:e}).then((()=>{}))}getPrinters(){return this.wire.sendAction(\"get-printers\",{...this.identity}).then((({payload:e})=>e.data))}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){await this.wire.sendAction(\"focus-window\",{emitSynthFocused:e,...this.identity})}async showDeveloperTools(){await this.wire.sendAction(\"show-developer-tools\",this.identity)}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction(\"get-process-info\",this.identity);return e}async getSharedWorkers(){return this.wire.sendAction(\"get-shared-workers\",this.identity).then((({payload:e})=>e.data))}async inspectSharedWorker(){await this.wire.sendAction(\"inspect-shared-worker\",{...this.identity})}async inspectSharedWorkerById(e){await this.wire.sendAction(\"inspect-shared-worker-by-id\",{...this.identity,workerId:e})}async inspectServiceWorker(){await this.wire.sendAction(\"inspect-service-worker\",{...this.identity})}async showPopupWindow(e){if(this.wire.sendAction(`${this.entityType}-show-popup-window`,this.identity).catch((()=>{})),e?.onPopupReady){const t=async({popupName:t})=>{try{const n=this.fin.Window.wrapSync({uuid:this.fin.me.uuid,name:t});await e.onPopupReady(n)}catch(e){throw new Error(`Something went wrong during onPopupReady execution: ${e}`)}};await this.once(\"popup-ready\",t)}const{payload:t}=await this.wire.sendAction(\"try-create-popup-window\",{options:{...e,hasResultCallback:!!e?.onPopupResult,hasReadyCallback:!!e?.onPopupReady},...this.identity}),{data:{willOpen:n,options:i}}=t;n&&await this.fin.Window.create(i.initialOptions);if(e?.onPopupResult){const t=async t=>{await e.onPopupResult((e=>{const{name:t,uuid:n,result:i,data:r}=e,o={identity:{name:t,uuid:n},result:i};return r&&(o.data=r),o})(t))},n=async()=>{await this.removeListener(\"popup-result\",t)};await this.on(\"popup-result\",t),await this.once(\"popup-teardown\",n)}const{payload:r}=await this.wire.sendAction(\"show-popup-window\",{options:i,...this.identity});return r.data}}var U,V,z,K,q;function J(){return V||(V=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(function(){if($)return L;$=1,Object.defineProperty(L,\"__esModule\",{value:!0}),L.ViewModule=void 0;const e=d,t=O,n=J(),i=T;class r extends e.Base{async create(e){const{uuid:t}=this.wire.me;if(!e.name||\"string\"!=typeof e.name)throw new Error(\"Please provide a name property as a string in order to create a View.\");return(0,i.handleDeprecatedWarnings)(e),this.wire.environment.childViews?await this.wire.environment.createChildContent({entityType:\"view\",options:{...e,uuid:t}}):await this.wire.sendAction(\"create-view\",{...e,uuid:t}),this.wrapSync({uuid:t,name:e.name})}async wrap(e){this.wire.sendAction(\"view-wrap\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}wrapSync(e){this.wire.sendAction(\"view-wrap-sync\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}getCurrent(){if(this.wire.sendAction(\"view-get-current\").catch((e=>{})),!this.wire.me.isView)throw new Error(\"You are not in a View context\");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction(\"view-get-current-sync\").catch((e=>{})),!this.wire.me.isView)throw new Error(\"You are not in a View context\");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return L.ViewModule=r,L}(),e),n(function(){if(U)return B;var e;U=1,Object.defineProperty(B,\"__esModule\",{value:!0}),B.View=void 0;const t=g,n=G,i=H,r=ie();class o extends i.WebContents{constructor(i,o){super(i,o,\"view\"),this.identity=o,e.set(this,new n.Lazy((()=>this.fin.Platform.wrapSync(this.identity).getClient()))),this.attach=async e=>{await this.wire.sendAction(\"attach-view\",{target:e,...this.identity})},this.destroy=async()=>{await this.wire.sendAction(\"destroy-view\",{...this.identity})},this.show=async()=>{await this.wire.sendAction(\"show-view\",{...this.identity})},this.showAt=async(e,t={})=>{await this.wire.sendAction(\"show-view-at\",{bounds:e,...this.identity,options:t})},this.bringToFront=async()=>{await this.wire.sendAction(\"bring-view-to-front\",{...this.identity})},this.hide=async()=>{await this.wire.sendAction(\"hide-view\",{...this.identity})},this.setBounds=async e=>{await this.wire.sendAction(\"set-view-bounds\",{bounds:e,...this.identity})},this.getBounds=async()=>(await this.wire.sendAction(\"get-view-bounds\",{...this.identity})).payload.data,this.getInfo=async()=>(await this.wire.sendAction(\"get-view-info\",{...this.identity})).payload.data,this.getParentLayout=async()=>(this.wire.sendAction(\"view-get-parent-layout\",{...this.identity}).catch((()=>{})),this.fin.Platform.Layout.getLayoutByViewIdentity(this.identity)),this.getOptions=async()=>this.wire.sendAction(\"get-view-options\",{...this.identity}).then((({payload:e})=>e.data)),this.updateOptions=async e=>this.wire.sendAction(\"update-view-options\",{options:e,...this.identity}).then((()=>{})),this.getCurrentWindow=async()=>{const{payload:{data:e}}=await this.wire.sendAction(\"get-view-window\",{...this.identity});return new r._Window(this.wire,e)},this.getCurrentStack=async()=>{this.wire.sendAction(\"view-get-current-stack\").catch((()=>{}));try{return(await this.getParentLayout()).getStackByViewIdentity(this.identity)}catch(e){throw new t.RuntimeError({reason:\"This view does not belong to a stack.\",error:e})}},this.triggerBeforeUnload=async()=>(await this.wire.sendAction(\"trigger-before-unload\",{...this.identity})).payload.data,this.bindToElement=async e=>{if(!e)throw new Error(\"Element not found.\");return this.wire.environment.observeBounds(e,(async e=>this.setBounds(e)))}}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){const t=await this.getCurrentWindow();await t.focusedWebViewWasChanged(),await super.focus({emitSynthFocused:e})}}return B.View=o,e=new WeakMap,B}(),e)}(k)),k}function Y(){if(z)return j;z=1,Object.defineProperty(j,\"__esModule\",{value:!0}),j.Application=void 0;const e=d,t=ie(),n=J();class i extends e.EmitterBase{constructor(e,n){super(e,\"application\",n.uuid),this.identity=n,this.window=new t._Window(this.wire,{uuid:this.identity.uuid,name:this.identity.uuid})}windowListFromIdentityList(e){const n=[];return e.forEach((e=>{n.push(new t._Window(this.wire,{uuid:e.uuid,name:e.name}))})),n}isRunning(){return this.wire.sendAction(\"is-application-running\",this.identity).then((({payload:e})=>e.data))}async quit(e=!1){try{await this._close(e),await this.wire.sendAction(\"destroy-application\",{force:e,...this.identity})}catch(e){if(![\"Remote connection has closed\",\"Could not locate the requested application\"].some((t=>e.message.includes(t))))throw e}}async _close(e=!1){try{await this.wire.sendAction(\"close-application\",{force:e,...this.identity})}catch(e){if(!e.message.includes(\"Remote connection has closed\"))throw e}}close(e=!1){return console.warn(\"Deprecation Warning: Application.close is deprecated Please use Application.quit\"),this.wire.sendAction(\"application-close\",this.identity).catch((e=>{})),this._close(e)}getChildWindows(){return this.wire.sendAction(\"get-child-windows\",this.identity).then((({payload:e})=>{const t=[];return e.data.forEach((e=>{t.push({uuid:this.identity.uuid,name:e})})),this.windowListFromIdentityList(t)}))}getManifest(){return this.wire.sendAction(\"get-application-manifest\",this.identity).then((({payload:e})=>e.data))}getParentUuid(){return this.wire.sendAction(\"get-parent-application\",this.identity).then((({payload:e})=>e.data))}getShortcuts(){return this.wire.sendAction(\"get-shortcuts\",this.identity).then((({payload:e})=>e.data))}async getViews(){const{payload:e}=await this.wire.sendAction(\"application-get-views\",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}getZoomLevel(){return this.wire.sendAction(\"get-application-zoom-level\",this.identity).then((({payload:e})=>e.data))}getWindow(){return this.wire.sendAction(\"application-get-window\",this.identity).catch((e=>{})),Promise.resolve(this.window)}registerUser(e,t){return this.wire.sendAction(\"register-user\",{userName:e,appName:t,...this.identity}).then((()=>{}))}removeTrayIcon(){return this.wire.sendAction(\"remove-tray-icon\",this.identity).then((()=>{}))}restart(){return this.wire.sendAction(\"restart-application\",this.identity).then((()=>{}))}run(){return console.warn(\"Deprecation Warning: Application.run is deprecated Please use fin.Application.start\"),this.wire.sendAction(\"application-run\",this.identity).catch((e=>{})),this._run()}_run(e={}){return this.wire.sendAction(\"run-application\",{manifestUrl:this._manifestUrl,opts:e,...this.identity}).then((()=>{}))}scheduleRestart(){return this.wire.sendAction(\"relaunch-on-close\",this.identity).then((()=>{}))}async sendApplicationLog(){const{payload:e}=await this.wire.sendAction(\"send-application-log\",this.identity);return e.data}async setJumpList(e){await this.wire.sendAction(\"set-jump-list\",{config:e,...this.identity})}setTrayIcon(e){return this.wire.sendAction(\"set-tray-icon\",{enabledIcon:e,...this.identity}).then((()=>{}))}setShortcuts(e){return this.wire.sendAction(\"set-shortcuts\",{data:e,...this.identity}).then((()=>{}))}async setShortcutQueryParams(e){await this.wire.sendAction(\"set-shortcut-query-args\",{data:e,...this.identity})}setZoomLevel(e){return this.wire.sendAction(\"set-application-zoom-level\",{level:e,...this.identity}).then((()=>{}))}async setAppLogUsername(e){await this.wire.sendAction(\"set-app-log-username\",{data:e,...this.identity})}getTrayIconInfo(){return this.wire.sendAction(\"get-tray-icon-info\",this.identity).then((({payload:e})=>e.data))}hasTrayIcon(){return this.wire.sendAction(\"has-tray-icon\",this.identity).then((({payload:e})=>e.data))}terminate(){return this.wire.sendAction(\"terminate-application\",this.identity).then((()=>{}))}wait(){return this.wire.sendAction(\"wait-for-hung-application\",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction(\"get-info\",this.identity).then((({payload:e})=>e.data))}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction(\"application-get-process-info\",this.identity);return e}async setFileDownloadLocation(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t};await this.wire.sendAction(\"set-file-download-location\",{...n,downloadLocation:e})}async getFileDownloadLocation(){const{payload:{data:e}}=await this.wire.sendAction(\"get-file-download-location\",this.identity);return e}async showTrayIconPopupMenu(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t},{payload:i}=await this.wire.sendAction(\"show-tray-icon-popup-menu\",{...n,options:e});return i.data}async closeTrayIconPopupMenu(){const{name:e}=this.wire.me,t={uuid:this.identity.uuid,name:e};await this.wire.sendAction(\"close-tray-icon-popup-menu\",{...t})}}return j.Application=i,j}function Z(){return q||(q=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(function(){if(K)return F;K=1,Object.defineProperty(F,\"__esModule\",{value:!0}),F.ApplicationModule=void 0;const e=d,t=O,n=Y();class i extends e.Base{async wrap(e){this.wire.sendAction(\"wrap-application\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}wrapSync(e){this.wire.sendAction(\"wrap-application-sync\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}async _create(e){return void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&void 0===e.isPlatformController&&(e.autoShow=!0),await this.wire.sendAction(\"create-application\",e),this.wrap({uuid:e.uuid})}create(e){return console.warn(\"Deprecation Warning: fin.Application.create is deprecated. Please use fin.Application.start\"),this.wire.sendAction(\"application-create\").catch((e=>{})),this._create(e)}async start(e){this.wire.sendAction(\"start-application\").catch((e=>{}));const t=await this._create(e);return await this.wire.sendAction(\"run-application\",{uuid:e.uuid}),t}async startManyManifests(e,t){return this.wire.sendAction(\"run-applications\",{applications:e,opts:t}).then((()=>{}))}getCurrent(){return this.wire.sendAction(\"get-current-application\").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction(\"get-current-application-sync\").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}async startFromManifest(e,t){this.wire.sendAction(\"application-start-from-manifest\").catch((e=>{}));const n=await this._createFromManifest(e);return await n._run(t),n}createFromManifest(e){return console.warn(\"Deprecation Warning: fin.Application.createFromManifest is deprecated. Please use fin.Application.startFromManifest\"),this.wire.sendAction(\"application-create-from-manifest\").catch((e=>{})),this._createFromManifest(e)}_createFromManifest(e){return this.wire.sendAction(\"get-application-manifest\",{manifestUrl:e}).then((({payload:e})=>{const t=e.data.platform?e.data.platform.uuid:e.data.startup_app.uuid;return this.wrap({uuid:t})})).then((t=>(t._manifestUrl=e,t)))}}return F.ApplicationModule=i,F}(),e),n(Y(),e)}(R)),R}H.WebContents=D;var Q={};Object.defineProperty(Q,\"__esModule\",{value:!0}),Q.promisifySubscription=void 0;var X,ee,te;function ne(){if(X)return S;X=1,Object.defineProperty(S,\"__esModule\",{value:!0}),S._Window=void 0;const e=Z(),t=H,n=J(),i=T,r=Q;class o extends t.WebContents{constructor(e,t){super(e,t,\"window\")}async createWindow(e){this.wire.sendAction(\"window-create-window\",this.identity).catch((e=>{}));const t=await(0,r.promisifySubscription)(this,\"fire-constructor-callback\");void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&(e.autoShow=!0),(0,i.handleDeprecatedWarnings)(e);const n=this.wire.environment.createChildContent({entityType:\"window\",options:e}),[o]=await Promise.all([t.getValue(),n]);let s;const{success:a}=o,c=o.data,{message:d}=c;s=a?{httpResponseCode:c.httpResponseCode,apiInjected:c.apiInjected}:{message:c.message,networkErrorCode:c.networkErrorCode,stack:c.stack};const h={message:d,cbPayload:s,success:a};try{this.getWebWindow().fin.__internal_.openerSuccessCBCalled()}catch(e){}return h.success?this:Promise.reject(h)}getAllFrames(){return this.wire.sendAction(\"get-all-frames\",this.identity).then((({payload:e})=>e.data))}getBounds(){return this.wire.sendAction(\"get-window-bounds\",this.identity).then((({payload:e})=>e.data))}center(){return this.wire.sendAction(\"center-window\",this.identity).then((()=>{}))}blur(){return this.wire.sendAction(\"blur-window\",this.identity).then((()=>{}))}bringToFront(){return this.wire.sendAction(\"bring-window-to-front\",this.identity).then((()=>{}))}animate(e,t){return this.wire.sendAction(\"animate-window\",{transitions:e,options:t,...this.identity}).then((()=>{}))}hide(){return this.wire.sendAction(\"hide-window\",this.identity).then((()=>{}))}close(e=!1){return this.wire.sendAction(\"close-window\",{force:e,...this.identity}).then((()=>{Object.setPrototypeOf(this,null)}))}focusedWebViewWasChanged(){return this.wire.sendAction(\"focused-webview-changed\",this.identity).then((()=>{}))}getNativeId(){return this.wire.sendAction(\"get-window-native-id\",this.identity).then((({payload:e})=>e.data))}async getCurrentViews(){const{payload:e}=await this.wire.sendAction(\"window-get-views\",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}disableFrame(){return console.warn(\"Function is deprecated; use disableUserMovement instead.\"),this.wire.sendAction(\"disable-window-frame\",this.identity).then((()=>{}))}disableUserMovement(){return this.wire.sendAction(\"disable-window-frame\",this.identity).then((()=>{}))}enableFrame(){return console.warn(\"Function is deprecated; use enableUserMovement instead.\"),this.wire.sendAction(\"enable-window-frame\",this.identity).then((()=>{}))}enableUserMovement(){return this.wire.sendAction(\"enable-window-frame\",this.identity).then((()=>{}))}flash(){return this.wire.sendAction(\"flash-window\",this.identity).then((()=>{}))}stopFlashing(){return this.wire.sendAction(\"stop-flash-window\",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction(\"get-window-info\",this.identity).then((({payload:e})=>e.data))}async getLayout(e){this.wire.sendAction(\"window-get-layout\",this.identity).catch((e=>{}));const t=await this.getOptions();if(!t.layout&&!t.layoutSnapshot)throw new Error(\"Window does not have a Layout\");return this.fin.Platform.Layout.wrap(e??this.identity)}getOptions(){return this.wire.sendAction(\"get-window-options\",this.identity).then((({payload:e})=>e.data))}getParentApplication(){return this.wire.sendAction(\"window-get-parent-application\",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity))}getParentWindow(){return this.wire.sendAction(\"window-get-parent-window\",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity)).then((e=>e.getWindow()))}async getSnapshot(e){const t={area:e,...this.identity};console.warn(\"Window.getSnapshot has been deprecated, please use Window.capturePage\");return(await this.wire.sendAction(\"get-window-snapshot\",t)).payload.data}getState(){return this.wire.sendAction(\"get-window-state\",this.identity).then((({payload:e})=>e.data))}getWebWindow(){return this.wire.sendAction(\"window-get-web-window\",this.identity).catch((e=>{})),this.wire.environment.getWebWindow(this.identity)}isMainWindow(){return this.wire.sendAction(\"window-is-main-window\",this.identity).catch((e=>{})),this.me.uuid===this.me.name}isShowing(){return this.wire.sendAction(\"is-window-showing\",this.identity).then((({payload:e})=>e.data))}maximize(){return this.wire.sendAction(\"maximize-window\",this.identity).then((()=>{}))}minimize(){return this.wire.sendAction(\"minimize-window\",this.identity).then((()=>{}))}moveBy(e,t,n){return this.wire.sendAction(\"move-window-by\",{deltaLeft:e,deltaTop:t,positioningOptions:n,...this.identity}).then((()=>{}))}moveTo(e,t,n){return this.wire.sendAction(\"move-window\",{left:e,top:t,positioningOptions:n,...this.identity}).then((()=>{}))}resizeBy(e,t,n,i){return this.wire.sendAction(\"resize-window-by\",{deltaWidth:Math.floor(e),deltaHeight:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}resizeTo(e,t,n,i){return this.wire.sendAction(\"resize-window\",{width:Math.floor(e),height:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}restore(){return this.wire.sendAction(\"restore-window\",this.identity).then((()=>{}))}setAsForeground(){return this.wire.sendAction(\"set-foreground-window\",this.identity).then((()=>{}))}setBounds(e,t){return this.wire.sendAction(\"set-window-bounds\",{...e,...this.identity,positioningOptions:t}).then((()=>{}))}show(e=!1){return this.wire.sendAction(\"show-window\",{force:e,...this.identity}).then((()=>{}))}showAt(e,t,n=!1){return this.wire.sendAction(\"show-at-window\",{force:n,left:Math.floor(e),top:Math.floor(t),...this.identity}).then((()=>{}))}updateOptions(e){return this.wire.sendAction(\"update-window-options\",{options:e,...this.identity}).then((()=>{}))}authenticate(e,t){return this.wire.sendAction(\"window-authenticate\",{userName:e,password:t,...this.identity}).then((()=>{}))}async showPopupMenu(e){const{payload:t}=await this.wire.sendAction(\"show-popup-menu\",{options:e,...this.identity});return t.data}async closePopupMenu(){return this.wire.sendAction(\"close-popup-menu\",{...this.identity}).then((()=>{}))}async dispatchPopupResult(e){this.wire.sendAction(\"window-dispatch-popup-result\",this.identity).catch((e=>{})),await this.wire.sendAction(\"dispatch-popup-result\",{data:e,...this.identity})}async print(e={content:\"self\"}){switch(e.content){case void 0:case\"self\":return super.print(e);case\"screenshot\":return this.wire.sendAction(\"print-screenshot\",this.identity).then((()=>{}));case\"views\":return this.wire.sendAction(\"print-views\",{...this.identity,options:e}).then((()=>{}));default:return}}}return S._Window=o,S}function ie(){return te||(te=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(function(){if(ee)return _;ee=1,Object.defineProperty(_,\"__esModule\",{value:!0}),_._WindowModule=void 0;const e=d,t=O,n=ne();class i extends e.Base{async wrap(e){this.wire.sendAction(\"window-wrap\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}wrapSync(e){this.wire.sendAction(\"window-wrap-sync\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}create(e){return this.wire.sendAction(\"create-window\").catch((e=>{})),new n._Window(this.wire,{uuid:this.me.uuid,name:e.name}).createWindow(e)}getCurrent(){if(this.wire.sendAction(\"get-current-window\").catch((e=>{})),!this.wire.me.isWindow)throw new Error(\"You are not in a Window context\");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction(\"get-current-window-sync\").catch((e=>{})),!this.wire.me.isWindow)throw new Error(\"You are not in a Window context\");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return _._WindowModule=i,_}(),e),n(ne(),e)}(M)),M}Q.promisifySubscription=async(e,t,n=(()=>!0),i)=>{let r,o,s;const a=new Promise(((e,t)=>{r=e,o=t})),c=e=>{n(e)&&(clearTimeout(s),r(e))};return await e.on(t,c),i&&(s=setTimeout((()=>o(new Error(\"event timed out\"))),i)),a.finally((()=>{e.removeListener(t,c).catch((()=>null))})),{getValue:()=>a}},Object.defineProperty(c,\"__esModule\",{value:!0}),c.System=void 0;const re=d,oe=g,se=ie(),ae=t;class ce extends re.EmitterBase{constructor(e){super(e,\"system\")}sendExternalProcessRequest(e,t){return new Promise(((n,i)=>{const r=\"external-process-exited\";let o,s,a,c;\"function\"==typeof t.listener&&(a=e=>{const n=e||{};s={topic:\"exited\",uuid:n.processUuid||\"\",exitCode:n.exitCode||0},o===e.processUuid&&(t.listener(s),c.removeListener(r,a))},this.wire.me.name||(this.wire.me.name=this.wire.me.uuid),c=new se._Window(this.wire,this.wire.me),c.on(r,a)),this.wire.sendAction(e,t).then((({payload:e})=>{o=e.data.uuid,n(e.data),s&&o===s.uuid&&(t.listener(s),c.removeListener(r,a))})).catch((e=>{c&&c.removeListener(r,a),i(e)}))}))}getVersion(){return this.wire.sendAction(\"get-version\").then((({payload:e})=>e.data))}clearCache(e){return this.wire.sendAction(\"clear-cache\",e).then((()=>{}))}deleteCacheOnExit(){return this.wire.sendAction(\"delete-cache-request\").then((()=>{}))}exit(){return this.wire.sendAction(\"exit-desktop\").then((()=>{}))}async fetchManifest(e){const{payload:{data:t}}=await this.wire.sendAction(\"fetch-manifest\",{manifestUrl:e});return t}flushCookieStore(){return this.wire.sendAction(\"flush-cookie-store\").then((()=>{}))}getAllWindows(){return this.wire.sendAction(\"get-all-windows\").then((({payload:e})=>e.data))}getAllApplications(){return this.wire.sendAction(\"get-all-applications\").then((({payload:e})=>e.data))}getCommandLineArguments(){return this.wire.sendAction(\"get-command-line-arguments\").then((({payload:e})=>e.data))}async getCrashReporterState(){const{payload:{data:{diagnosticMode:e,isRunning:t}}}=await this.wire.sendAction(\"get-crash-reporter-state\");return console.warn(\"diagnosticMode property is deprecated. It will be removed in a future version\"),{diagnosticMode:e,diagnosticsMode:e,isRunning:t}}async startCrashReporter(e){const t=e,n={...t,diagnosticMode:t.diagnosticsMode||t.diagnosticMode},{payload:{data:{diagnosticMode:i,isRunning:r}}}=await this.wire.sendAction(\"start-crash-reporter\",n);return{diagnosticMode:i,diagnosticsMode:i,isRunning:r}}getUniqueUserId(){return this.wire.sendAction(\"get-unique-user-id\").then((({payload:e})=>e.data))}getEntityInfo(e,t){return this.wire.sendAction(\"get-entity-info\",{uuid:e,name:t}).then((({payload:e})=>e.data))}getEnvironmentVariable(e){return this.wire.sendAction(\"get-environment-variable\",{environmentVariables:e}).then((({payload:e})=>e.data))}getFocusedWindow(){return this.wire.sendAction(\"get-focused-window\").then((({payload:e})=>e.data))}async isAppCertified(e){const{payload:{data:{certifiedInfo:t}}}=await this.wire.sendAction(\"is-app-certified\",{manifestUrl:e});return t}getInstalledRuntimes(){return this.wire.sendAction(\"get-installed-runtimes\").then((({payload:e})=>e.data.runtimes))}async getInstalledApps(){const{payload:{data:{installedApps:e}}}=await this.wire.sendAction(\"get-installed-apps\");return e}getLog(e){return this.wire.sendAction(\"view-log\",e).then((({payload:e})=>e.data))}getMachineId(){return this.wire.sendAction(\"get-machine-id\").then((({payload:e})=>e.data))}getMinLogLevel(){return this.wire.sendAction(\"get-min-log-level\").then((({payload:e})=>e.data))}getLogList(){return this.wire.sendAction(\"list-logs\").then((({payload:e})=>e.data))}getMonitorInfo(){return this.wire.sendAction(\"get-monitor-info\").then((({payload:e})=>e.data))}getMousePosition(){return this.wire.sendAction(\"get-mouse-position\").then((({payload:e})=>e.data))}getProcessList(){return console.warn(\"System.getProcessList has been deprecated. Please consider using our new process APIs: Window.getProcessInfo, View.getProcessInfo, Application.getProcessInfo, System.getAllProcessInfo\"),this.wire.sendAction(\"process-snapshot\").then((({payload:e})=>e.data))}async getAllProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction(\"get-all-process-info\",this.identity);return e}getProxySettings(){return this.wire.sendAction(\"get-proxy-settings\").then((({payload:e})=>e.data))}getRuntimeInfo(){return this.wire.sendAction(\"get-runtime-info\").then((({payload:e})=>e.data))}getRvmInfo(){return this.wire.sendAction(\"get-rvm-info\").then((({payload:e})=>e.data))}getHostSpecs(){return this.wire.sendAction(\"get-host-specs\").then((({payload:e})=>e.data))}getOSInfo(){return this.wire.sendAction(\"get-os-info\").then((({payload:e})=>e.data))}launchExternalProcess(e){return this.sendExternalProcessRequest(\"launch-external-process\",e)}monitorExternalProcess(e){return this.sendExternalProcessRequest(\"monitor-external-process\",e)}log(e,t){return this.wire.sendAction(\"write-to-log\",{level:e,message:t}).then((()=>{}))}openUrlWithBrowser(e){return this.wire.sendAction(\"open-url-with-browser\",{url:e}).then((()=>{}))}async registerCustomProtocol(e){if(\"object\"!=typeof e)throw new Error(\"Must provide an object with a `protocolName` property having a string value.\");await this.wire.sendAction(\"register-custom-protocol\",e)}async unregisterCustomProtocol(e){await this.wire.sendAction(\"unregister-custom-protocol\",{protocolName:e})}async getCustomProtocolState(e){return this.wire.sendAction(\"get-custom-protocol-state\",{protocolName:e}).then((({payload:e})=>e.data))}releaseExternalProcess(e){return this.wire.sendAction(\"release-external-process\",{uuid:e}).then((()=>{}))}showDeveloperTools(e){return this.wire.sendAction(\"show-developer-tools\",e).then((()=>{}))}terminateExternalProcess(e){return this.wire.sendAction(\"terminate-external-process\",e).then((()=>{}))}updateProxySettings(e){return this.wire.sendAction(\"update-proxy\",e).then((()=>{}))}async downloadAsset(e,t){const n=()=>{};let i=n,r=n;const o=new Promise(((e,t)=>{i=e,r=t}));if(\"openfin\"!==this.wire.environment.type)throw new oe.NotSupportedError(\"downloadAsset only supported in an OpenFin Render process\");const s=oe.RuntimeError.getCallSite(),a=this.wire.environment.getNextMessageId().toString(),c=`asset-download-progress-${a}`,d=`asset-download-error-${a}`,h=`asset-download-complete-${a}`,l=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},u=()=>{this.removeListener(c,l)};await Promise.all([this.on(c,l),this.once(d,(e=>{u();const{reason:t,err:n}=e;r(new oe.RuntimeError({reason:t,error:n},s))})),this.once(h,(()=>{u(),i()}))]);const p=Object.assign(e,{downloadId:a});return await this.wire.sendAction(\"download-asset\",p).catch((e=>{throw u(),e})),o}downloadRuntime(e,t){const n=oe.RuntimeError.getCallSite();return new Promise(((i,r)=>{if(\"openfin\"!==this.wire.environment.type)return void r(new oe.NotSupportedError(\"downloadRuntime only supported in an OpenFin Render process\"));const o=this.wire.environment.getNextMessageId().toString(),s=`runtime-download-progress-${o}`,a=`runtime-download-error-${o}`,c=`runtime-download-complete-${o}`,d=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},h=()=>{this.removeListener(s,d)};this.on(s,d),this.once(a,(e=>{h();const{reason:t,err:i}=e;r(new oe.RuntimeError({reason:t,error:i},n))})),this.once(c,(()=>{h(),i()}));const l=Object.assign(e,{downloadId:o});this.wire.sendAction(\"download-runtime\",l).catch((e=>{h(),r(e)}))}))}downloadPreloadScripts(e){return this.wire.sendAction(\"download-preload-scripts\",{scripts:e}).then((({payload:e})=>e.data))}getAllExternalApplications(){return this.wire.sendAction(\"get-all-external-applications\").then((({payload:e})=>e.data))}getAppAssetInfo(e){return this.wire.sendAction(\"get-app-asset-info\",e).then((({payload:e})=>e.data))}getCookies(e){const t=this.wire.environment.getUrl(),n=Object.assign(e,{url:t});return this.wire.sendAction(\"get-cookies\",n).then((({payload:e})=>e.data))}setMinLogLevel(e){return this.wire.sendAction(\"set-min-log-level\",{level:e}).then((()=>{}))}resolveUuid(e){return this.wire.sendAction(\"resolve-uuid\",{entityKey:e}).then((({payload:e})=>e.data))}executeOnRemote(e,t){return t.requestingIdentity=e,this.wire.ferryAction(t)}readRegistryValue(e,t,n){return this.wire.sendAction(\"read-registry-value\",{rootKey:e,subkey:t,value:n}).then((({payload:e})=>e.data))}registerExternalConnection(e){return this.wire.sendAction(\"register-external-connection\",{uuid:e}).then((({payload:e})=>e.data))}async getServiceConfiguration(e){if(\"string\"!=typeof e.name)throw new Error(\"Must provide an object with a `name` property having a string value\");const{name:t}=e;return this.wire.sendAction(\"get-service-configuration\",{name:t}).then((({payload:e})=>e.data))}async getSystemAppConfig(e){if(\"string\"!=typeof e)throw new Error(\"Must provide a string value for name of system app\");return this.wire.sendAction(\"get-system-app-configuration\",{name:e}).then((({payload:e})=>e.data))}async registerShutdownHandler(e){this.wire.sendAction(\"system-register-shutdown-handler\").catch((e=>{}));const{uuid:t,name:n}=this.wire.me;this.on(\"system-shutdown\",(i=>{e({proceed:()=>{this.wire.environment.raiseEvent(\"application/system-shutdown-handled\",{uuid:t,name:n,topic:\"application\"})}})}))}runRvmHealthCheck(){return this.wire.sendAction(\"run-rvm-health-check\").then((({payload:e})=>e.data))}async launchManifest(e,t={}){const{subscribe:n,...i}=t,r=i;if(n){const e=new ae.EventEmitter;n(e);const t=\"app-version-progress\",i=\"runtime-status\",o=\"app-version-complete\",s=\"app-version-error\",a=this.wire.environment.getNextMessageId().toString();r.appVersionId=a;const c=[o,t,i,s],d=e=>{const{appVersionId:t,topic:n,type:i,...r}=e;return{...r,type:c.find((e=>i.includes(e)))}},h=t=>{const n=d(t);e.emit(n.type,n)},l=()=>{this.removeListener(`${t}.${a}`,h),this.removeListener(`${i}.${a}`,h),this.removeListener(`${o}.${a}`,h),this.removeListener(`${s}.${a}`,h),this.removeListener(`${o}.${a}`,l),this.removeListener(`${s}.${a}`,l)};await Promise.all([this.on(`${t}.${a}`,h),this.on(`${i}.${a}`,h),this.once(`${o}.${a}`,h),this.once(`${s}.${a}`,h),this.once(`${o}.${a}`,l),this.once(`${s}.${a}`,l)])}return(await this.wire.sendAction(\"launch-manifest\",{manifestUrl:e,opts:r})).payload.data.manifest}async queryPermissionForCurrentContext(e){const t={uuid:this.wire.me.uuid,name:this.wire.me.name};return(await this.wire.sendAction(\"query-permission-for-current-context\",{apiName:e,identity:t})).payload.data}async enableNativeWindowIntegrationProvider(e){const{payload:t}=await this.wire.sendAction(\"enable-native-window-integration-provider\",{permissions:e});return t.data}async registerUsage({data:e,type:t}){await this.wire.sendAction(\"register-usage\",{data:e,type:t})}async getPrinters(){const{payload:e}=await this.wire.sendAction(\"system-get-printers\");return e.data}async updateProcessLoggingOptions(e){await this.wire.sendAction(\"system-update-process-logging-options\",{options:e})}async getDomainSettings(){const{payload:{data:e}}=await this.wire.sendAction(\"get-domain-settings\",this.identity);return e}async setDomainSettings(e){await this.wire.sendAction(\"set-domain-settings\",{domainSettings:e,...this.identity})}async refreshExtensions(){const{payload:e}=await this.wire.sendAction(\"refresh-extensions\");return e.data}async getInstalledExtensions(){const{payload:e}=await this.wire.sendAction(\"get-installed-extensions\");return e.data}}c.System=ce;var de={},he={};Object.defineProperty(he,\"__esModule\",{value:!0}),he.RefCounter=void 0;he.RefCounter=class{constructor(){this.topicRefMap=new Map}incRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t+1;n=i,this.topicRefMap.set(e,i)}else this.topicRefMap.set(e,1),n=1;return n}decRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t-1;this.topicRefMap.set(e,i),n=i}else n=-1;return n}actOnFirst(e,t,n){return 1===this.incRefCount(e)?t():n()}actOnLast(e,t,n){return 0===this.decRefCount(e)?t():n()}};var le={},ue={},pe={};Object.defineProperty(pe,\"__esModule\",{value:!0}),pe.ChannelBase=pe.ProtectedItems=void 0;const we=e=>async(t,n,i)=>{const r=await e(t,n,i);return void 0===r?n:r};pe.ProtectedItems=class{constructor(e,t){this.providerIdentity=e,this.close=t}};class ye{static defaultAction(e){throw new Error(`No action registered at target for ${e}`)}constructor(){this.subscriptions=new Map}async processAction(e,t,n){try{const i=this.subscriptions.has(e)?this.subscriptions.get(e):(t,n)=>(this.defaultAction??ye.defaultAction)(e,t,n),r=this.preAction?await this.preAction(e,t,n):t,o=await i(r,n);return this.postAction?await this.postAction(e,o,n):o}catch(t){if(this.errorMiddleware)return this.errorMiddleware(e,t,n);throw t}}beforeAction(e){if(this.preAction)throw new Error(\"Already registered beforeAction middleware\");this.preAction=we(e)}onError(e){if(this.errorMiddleware)throw new Error(\"Already registered error middleware\");this.errorMiddleware=e}afterAction(e){if(this.postAction)throw new Error(\"Already registered afterAction middleware\");this.postAction=we(e)}remove(e){this.subscriptions.delete(e)}setDefaultAction(e){if(this.defaultAction)throw new Error(\"default action can only be set once\");this.defaultAction=e}register(e,t){if(this.subscriptions.has(e))throw new Error(`Subscription already registered for action: ${e}. Unsubscribe before adding new subscription`);return this.subscriptions.set(e,t),!0}}pe.ChannelBase=ye;var fe,ge,me,ve=s&&s.__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)},Ce=s&&s.__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};Object.defineProperty(ue,\"__esModule\",{value:!0}),ue.ChannelClient=void 0;const be=pe,Ie=new Map;class Ee extends be.ChannelBase{static closeChannelByEndpointId(e){const t=Ie.get(e);t&&ve(t,me,\"f\").call(t)}static handleProviderDisconnect(e){for(const t of Ie.values())t.providerIdentity.channelId===e.channelId&&(t.disconnectListener(e),ve(t,me,\"f\").call(t))}constructor(e,t,n){super(),fe.set(this,void 0),ge.set(this,void 0),this.processAction=(e,t,n)=>super.processAction(e,t,n),me.set(this,(()=>{Ie.delete(this.endpointId),ve(this,ge,\"f\").close()})),Ce(this,fe,new be.ProtectedItems(e,t),\"f\"),this.disconnectListener=()=>{},this.endpointId=e.endpointId,Ce(this,ge,n,\"f\"),Ie.set(this.endpointId,this),n.receive(this.processAction)}get providerIdentity(){return ve(this,fe,\"f\").providerIdentity}async dispatch(e,t){if(ve(this,ge,\"f\").isEndpointConnected(this.providerIdentity.channelId))return ve(this,ge,\"f\").send(this.providerIdentity.channelId,e,t);throw new Error(\"The client you are trying to dispatch from is disconnected from the target provider.\")}onDisconnection(e){this.disconnectListener=t=>{try{e(t)}catch(e){throw new Error(`Error while calling the onDisconnection callback: ${e.message}`)}finally{this.disconnectListener=()=>{}}}}async disconnect(){await this.sendDisconnectAction(),ve(this,me,\"f\").call(this)}async sendDisconnectAction(){const e=ve(this,fe,\"f\");await e.close()}static async wireClose(e,t,n){const{channelName:i,uuid:r,name:o}=t;await e.sendAction(\"disconnect-from-channel\",{channelName:i,uuid:r,name:o,endpointId:n})}}ue.ChannelClient=Ee,fe=new WeakMap,ge=new WeakMap,me=new WeakMap;var xe={},Ae={};Object.defineProperty(Ae,\"__esModule\",{value:!0}),Ae.exhaustiveCheck=void 0,Ae.exhaustiveCheck=function(e,t){throw new Error(`Unsupported value: ${e}${t?`\\n Supported values are: ${t.join(\"\")}`:\"\"}`)};var Pe,Me,_e,Oe={},Se=s&&s.__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},Re=s&&s.__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)};Object.defineProperty(Oe,\"__esModule\",{value:!0}),Oe.ClassicInfo=Oe.ClassicStrategy=void 0;Oe.ClassicStrategy=class{constructor(e,t,n,i){this.messageReceiver=t,this.endpointId=n,this.providerIdentity=i,Pe.set(this,void 0),Me.set(this,new Map),_e.set(this,new Map),this.send=async(e,t,n)=>{const i=Re(this,Me,\"f\").get(e);if(!i)throw new Error(`Could not locate routing info for endpoint ${e}`);const r={...i};r.isLocalEndpointId&&delete r.endpointId,delete r.isLocalEndpointId;const o=Re(this,Pe,\"f\").sendAction(\"send-channel-message\",{...r,providerIdentity:this.providerIdentity,action:t,payload:n});Re(this,_e,\"f\").get(e)?.add(o);return(await o.catch((e=>{throw new Error(e.message)})).finally((()=>{Re(this,_e,\"f\").get(e)?.delete(o)}))).payload.data.result},this.close=async()=>{this.messageReceiver.removeEndpoint(this.providerIdentity.channelId,this.endpointId),[...Re(this,Me,\"f\").keys()].forEach((e=>this.closeEndpoint(e))),Se(this,Me,new Map,\"f\")},Se(this,Pe,e,\"f\")}onEndpointDisconnect(e,t){}receive(e){this.messageReceiver.addEndpoint(e,this.providerIdentity.channelId,this.endpointId)}async closeEndpoint(e){const t=Re(this,Me,\"f\").get(e);Re(this,Me,\"f\").delete(e);const n=Re(this,_e,\"f\").get(e);n?.forEach((n=>{const i=`Channel connection with identity uuid: ${t?.uuid} / name: ${t?.name} / endpointId: ${e} no longer connected.`;n.cancel(new Error(i))}))}isEndpointConnected(e){return Re(this,Me,\"f\").has(e)}addEndpoint(e,t){Re(this,Me,\"f\").set(e,t.endpointIdentity),Re(this,_e,\"f\").set(e,new Set)}isValidEndpointPayload(e){return\"string\"==typeof e?.endpointIdentity?.endpointId||\"string\"==typeof e?.endpointIdentity?.channelId}},Pe=new WeakMap,Me=new WeakMap,_e=new WeakMap,Oe.ClassicInfo={version:5,minimumVersion:0,type:\"classic\"};var Fe={},je={},ke={};Object.defineProperty(ke,\"__esModule\",{value:!0}),ke.errorToPOJO=void 0,ke.errorToPOJO=function(e){return{stack:e.stack,name:e.name,message:e.message,toString:()=>e.stack||e.toString()}};var Le,Te,$e=s&&s.__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)},Be=s&&s.__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};Object.defineProperty(je,\"__esModule\",{value:!0}),je.RTCEndpoint=void 0;const Ge=ke;je.RTCEndpoint=class{static isValidEndpointPayload(e){const t=e=>\"object\"==typeof e&&null!==e;return t(e)&&t(e.endpointIdentity)&&t(e.rtc)&&\"string\"==typeof e.endpointIdentity.endpointId}constructor({rtc:e,endpointIdentity:t}){this.responseMap=new Map,Le.set(this,null),Te.set(this,void 0),this.connectionStateChangeHandler=e=>{\"connected\"!==this.rtc.rtcClient.connectionState&&(this.rtc.rtcClient.removeEventListener(\"connectionstatechange\",this.connectionStateChangeHandler),this.close(),$e(this,Te,\"f\")&&$e(this,Te,\"f\").call(this))},this.send=async(e,t)=>{const n=`message-${Math.random()}`,i=new Promise(((e,t)=>{this.responseMap.set(n,{resolve:e,reject:t})}));return this.rtc.channels.request.send(JSON.stringify({action:e,payload:t,messageId:n})),i},this.close=()=>{this.responseMap.forEach((e=>e.reject(\"Connection has closed.\"))),this.responseMap=new Map,this.rtc.channels.request.close(),this.rtc.channels.response.close(),this.rtc.rtcClient.close()},this.rtc=e,this.endpointIdentity=t,this.rtc.channels.response.addEventListener(\"message\",(e=>{let{data:t}=e;e.data instanceof ArrayBuffer&&(t=(new TextDecoder).decode(e.data));const{messageId:n,payload:i,success:r,error:o}=JSON.parse(t),{resolve:s,reject:a}=this.responseMap.get(n)??{};s&&a?(this.responseMap.delete(n),r?s(i):a(o)):(console.log(\"Could not find id in responseMap.\"),console.log(e))})),this.rtc.channels.request.addEventListener(\"message\",(async e=>{let{data:n}=e;e.data instanceof ArrayBuffer&&(n=(new TextDecoder).decode(e.data));const{messageId:i,action:r,payload:o}=JSON.parse(n);if($e(this,Le,\"f\"))try{const e=await $e(this,Le,\"f\").call(this,r,o,t);this.rtc.channels.response.send(JSON.stringify({messageId:i,payload:e,success:!0}))}catch(e){\"open\"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,error:(0,Ge.errorToPOJO)(e),success:!1}))}else\"open\"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,success:!1,error:\"Connection not ready.\"}))})),this.rtc.rtcClient.addEventListener(\"connectionstatechange\",this.connectionStateChangeHandler),Object.values(this.rtc.channels).forEach((e=>{e.onclose=e=>{[...this.responseMap.values()].forEach((e=>e.reject(new Error(\"RTCDataChannel closed unexpectedly, this is most commonly caused by message size. Note: RTC Channels have a message size limit of ~255kB.\")))),this.close(),$e(this,Te,\"f\")&&$e(this,Te,\"f\").call(this)}}))}onDisconnect(e){if($e(this,Te,\"f\"))throw new Error(\"RTCEndpoint disconnectListener cannot be set twice.\");Be(this,Te,e,\"f\")}receive(e){if($e(this,Le,\"f\"))throw new Error(\"You have already set a listener for this RTC Endpoint.\");Be(this,Le,e,\"f\")}get connected(){return\"connected\"===this.rtc.rtcClient.connectionState}},Le=new WeakMap,Te=new WeakMap;var We,He,Ne,De={},Ue=s&&s.__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)},Ve=s&&s.__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};Object.defineProperty(De,\"__esModule\",{value:!0}),De.EndpointStrategy=void 0;De.EndpointStrategy=class{constructor(e,t,n){this.EndpointType=e,this.StrategyName=n,We.set(this,null),He.set(this,new Map),Ne.set(this,!0),this.send=async(e,t,n)=>this.getEndpointById(e).send(t,n),this.close=async()=>{Ue(this,Ne,\"f\")&&(Ue(this,He,\"f\").forEach((e=>e.close())),Ve(this,He,new Map,\"f\")),Ve(this,Ne,!1,\"f\")},this.isValidEndpointPayload=t}onEndpointDisconnect(e,t){this.getEndpointById(e).onDisconnect(t)}receive(e){if(Ue(this,We,\"f\"))throw new Error(`You have already set a listener for this ${this.StrategyName} Strategy`);Ve(this,We,e,\"f\"),Ue(this,He,\"f\").forEach((e=>e.receive(Ue(this,We,\"f\"))))}getEndpointById(e){const t=Ue(this,He,\"f\").get(e);if(!t)throw new Error(`Client with endpoint id ${e} is not connected`);return t}get connected(){return Ue(this,Ne,\"f\")}isEndpointConnected(e){return Ue(this,He,\"f\").has(e)}addEndpoint(e,t){if(!Ue(this,Ne,\"f\"))return void console.warn(`Adding endpoint to disconnected ${this.StrategyName} Strategy`);const n=new this.EndpointType(t);Ue(this,We,\"f\")&&n.receive(Ue(this,We,\"f\")),Ue(this,He,\"f\").set(e,n)}async closeEndpoint(e){Ue(this,He,\"f\").delete(e)}},We=new WeakMap,He=new WeakMap,Ne=new WeakMap,Object.defineProperty(Fe,\"__esModule\",{value:!0}),Fe.RTCInfo=Fe.RTCStrategy=void 0;const ze=je,Ke=De;class qe extends Ke.EndpointStrategy{constructor(){super(ze.RTCEndpoint,ze.RTCEndpoint.isValidEndpointPayload,\"RTC\")}}Fe.RTCStrategy=qe,Fe.RTCInfo={version:2,minimumVersion:0,type:\"rtc\"};var Je={};Object.defineProperty(Je,\"__esModule\",{value:!0}),Je.RTCICEManager=void 0;const Ye=d;class Ze extends Ye.EmitterBase{constructor(e){super(e,\"channel\"),this.ensureChannelOpened=e=>new Promise(((t,n)=>{if(\"open\"===e.readyState)t();else if(\"connecting\"===e.readyState){const n=()=>{e.removeEventListener(\"open\",n),t()};e.addEventListener(\"open\",n)}else n(new Error(\"This Channel has already closed\"))}))}static createDataChannelPromise(e,t){let n;const i=new Promise((e=>{n=e})),r=i=>{const o=()=>{i.channel.removeEventListener(\"open\",o),n(i.channel)};i.channel.label===e&&(i.channel.addEventListener(\"open\",o),t.removeEventListener(\"datachannel\",r))};return t.addEventListener(\"datachannel\",r),i}async listenForProviderIce(e,t){await this.on(this.createProviderEventName(e),t,{timestamp:Date.now()})}async raiseProviderIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createProviderEventName(e)),t)}async listenForClientIce(e,t){await this.on(this.createClientEventName(e),t,{timestamp:Date.now()})}async raiseClientIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createClientEventName(e)),t)}cleanupIceListeners(e){this.removeAllListeners(this.createClientEventName(e)),this.removeAllListeners(this.createProviderEventName(e))}createClientEventName(e){return`ice-client-${e}`}createProviderEventName(e){return`ice-provider-${e}`}createRouteString(e){return`channel/${e}`}createRtcPeer(){return this.wire.environment.getRtcPeer()}async startClientOffer(){const e=Math.random().toString(),t=this.createRtcPeer();t.addEventListener(\"icecandidate\",(async t=>{t.candidate&&await this.raiseClientIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForProviderIce(e,(async e=>{await t.addIceCandidate(e.candidate)}));const n={request:t.createDataChannel(\"request\"),response:t.createDataChannel(\"response\")},i=await t.createOffer();await t.setLocalDescription(i);const r=Promise.all([n.request,n.response].map(this.ensureChannelOpened)).then((()=>{}));return{rtcClient:t,channels:n,offer:i,rtcConnectionId:e,channelsOpened:r}}async finishClientOffer(e,t,n){return await e.setRemoteDescription(t),await n,!0}async createProviderAnswer(e,t){const n=this.createRtcPeer(),i=Ze.createDataChannelPromise(\"request\",n),r=Ze.createDataChannelPromise(\"response\",n);n.addEventListener(\"icecandidate\",(async t=>{t.candidate&&await this.raiseProviderIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForClientIce(e,(async e=>{await n.addIceCandidate(e.candidate)})),await n.setRemoteDescription(t);const o=await n.createAnswer();await n.setLocalDescription(o);const s=Promise.all([i,r]).then((([t,n])=>(this.cleanupIceListeners(e),{request:t,response:n})));return{rtcClient:n,answer:o,channels:s}}}Je.RTCICEManager=Ze;var Qe={},Xe={};function et(e){return[...e.split(\".\").reverse().entries()].reduce(((e,[t,n])=>e+ +n*1e4**t),0)}function tt(e,t){return et(e)>=et(t)}function nt(e){return e.split(\"/\")[0]}Object.defineProperty(Xe,\"__esModule\",{value:!0}),Xe.runtimeUuidMeetsMinimumRuntimeVersion=Xe.parseRuntimeUuid=Xe.meetsMinimumRuntimeVersion=void 0,Xe.meetsMinimumRuntimeVersion=tt,Xe.parseRuntimeUuid=nt,Xe.runtimeUuidMeetsMinimumRuntimeVersion=function(e,t){return tt(nt(e),t)};var it,rt,ot,st,at,ct=s&&s.__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)},dt=s&&s.__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};Object.defineProperty(Qe,\"__esModule\",{value:!0}),Qe.ChannelProvider=void 0;const ht=pe,lt=Xe;class ut extends ht.ChannelBase{get connections(){return[...ct(this,it,\"f\")]}static handleClientDisconnection(e,t){const n=e.connections.find((e=>e.endpointId===t.endpointId));if(n)ct(e,st,\"f\").call(e,n);else{e.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name)).forEach(ct(e,st,\"f\"))}e.disconnectListener(t)}static setProviderRemoval(e,t){ut.removalMap.set(e,t)}constructor(e,t,n){super(),it.set(this,void 0),rt.set(this,void 0),ot.set(this,void 0),st.set(this,(e=>{const t=this.connections.filter((t=>t.endpointId!==e.endpointId));ct(this,ot,\"f\").closeEndpoint(e.endpointId),dt(this,it,t,\"f\")})),this.processAction=async(e,t,n)=>(ut.clientIsMultiRuntime(n)&&!(0,lt.runtimeUuidMeetsMinimumRuntimeVersion)(n.runtimeUuid,\"18.87.56.0\")?this.handleMultiRuntimeLegacyClient(n):this.checkForClientConnection(n),super.processAction(e,t,n)),at.set(this,(()=>{ct(this,ot,\"f\").close();const e=ut.removalMap.get(this);e&&e()})),dt(this,rt,new ht.ProtectedItems(e,t),\"f\"),this.connectListener=()=>{},this.disconnectListener=()=>{},dt(this,it,[],\"f\"),dt(this,ot,n,\"f\"),n.receive(this.processAction)}dispatch(e,t,n){const i=e.endpointId??this.getEndpointIdForOpenFinId(e,t);return i&&ct(this,ot,\"f\").isEndpointConnected(i)?ct(this,ot,\"f\").send(i,t,n):Promise.reject(new Error(`Client connection with identity uuid: ${e.uuid} / name: ${e.name} / endpointId: ${i} no longer connected.`))}async processConnection(e,t){return ct(this,it,\"f\").push(e),this.connectListener(e,t)}publish(e,t){return this.connections.map((n=>ct(this,ot,\"f\").send(n.endpointId,e,t)))}onConnection(e){this.connectListener=e}onDisconnection(e){this.disconnectListener=e}async destroy(){const e=ct(this,rt,\"f\");e.providerIdentity,dt(this,it,[],\"f\"),await e.close(),ct(this,at,\"f\").call(this)}async getAllClientInfo(){return this.connections.map((e=>{const{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}=e;return{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}}))}checkForClientConnection(e){if(!this.isClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider.\\n Client Identity: {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}isClientConnected(e){return ut.clientIdentityIncludesEndpointId(e)?this.connections.some((t=>t.endpointId===e.endpointId&&t.uuid===e.uuid&&t.name===e.name)):this.isLegacyClientConnected(e)}isLegacyClientConnected(e){return this.connections.some((t=>t.uuid===e.uuid&&t.name===e.name))}handleMultiRuntimeLegacyClient(e){if(!this.isLegacyClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider. Client Identity:\\n {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}getEndpointIdForOpenFinId(e,t){const n=this.connections.filter((t=>t.name===e.name&&t.uuid===e.uuid));if(n.length>=2){const n=ct(this,rt,\"f\"),{uuid:i,name:r}=e,o=n?.providerIdentity.uuid,s=n?.providerIdentity.name;console.warn(`WARNING: Dispatch call may have unintended results. The \"to\" argument of your dispatch call is missing the\\n \"endpointId\" parameter. The identity you are dispatching to ({uuid: ${i}, name: ${r}})\\n has multiple channelClients for this channel. Your dispatched action: (${t}) from the provider:\\n ({uuid: ${o}, name: ${s}}) will only be processed by the most recently-created client.`)}return n.pop()?.endpointId}static clientIdentityIncludesEndpointId(e){return void 0!==e.endpointId}static clientIsMultiRuntime(e){return void 0!==e.runtimeUuid}static async wireClose(e,t){await e.sendAction(\"destroy-channel\",{channelName:t})}}Qe.ChannelProvider=ut,it=new WeakMap,rt=new WeakMap,ot=new WeakMap,st=new WeakMap,at=new WeakMap,ut.removalMap=new WeakMap;var pt={};Object.defineProperty(pt,\"__esModule\",{value:!0}),pt.MessageReceiver=void 0;const wt=ue,yt=d;class ft extends yt.Base{constructor(e){super(e),this.onmessage=e=>\"process-channel-message\"===e.action&&(this.processChannelMessage(e),!0),this.endpointMap=new Map,this.latestEndpointIdByChannelId=new Map,e.registerMessageHandler(this.onmessage.bind(this))}async processChannelMessage(e){const{senderIdentity:t,providerIdentity:n,action:i,ackToSender:r,payload:o,intendedTargetIdentity:s}=e.payload,a=s.channelId??s.endpointId??this.latestEndpointIdByChannelId.get(n.channelId),c=this.endpointMap.get(a);if(!c)return r.payload.success=!1,r.payload.reason=`Client connection with identity uuid: ${this.wire.me.uuid} / name: ${this.wire.me.name} / endpointId: ${a} no longer connected.`,this.wire.sendRaw(r);try{const e=await c(i,o,t);return r.payload.payload=r.payload.payload||{},r.payload.payload.result=e,this.wire.sendRaw(r)}catch(e){return r.payload.success=!1,r.payload.reason=e.message,this.wire.sendRaw(r)}}addEndpoint(e,t,n){this.endpointMap.set(n,e),t!==n&&this.latestEndpointIdByChannelId.set(t,n)}removeEndpoint(e,t){this.endpointMap.delete(t),this.latestEndpointIdByChannelId.get(e)===t&&this.latestEndpointIdByChannelId.delete(e)}checkForPreviousClientConnection(e){const t=this.latestEndpointIdByChannelId.get(e);t&&(wt.ChannelClient.closeChannelByEndpointId(t),console.warn(\"You have created a second connection to an older provider. First connection has been removed from the clientMap\"),console.warn(\"If the provider calls publish(), you may receive multiple messages.\"))}}pt.MessageReceiver=ft;var gt={};Object.defineProperty(gt,\"__esModule\",{value:!0}),gt.ProtocolManager=void 0;gt.ProtocolManager=class{constructor(e){this.ProtocolsInPreferenceOrder=e,this.DefaultClientProtocols=[\"classic\"],this.DefaultProviderProtocols=[\"classic\"],this.getClientProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultClientProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(\", \")}.`);return t},this.getProviderProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultProviderProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(\", \")}.`);return t},this.getCompatibleProtocols=(e,t)=>t.supportedProtocols.filter((t=>e.some((e=>e.type===t.type&&t.version>=e.minimumVersion&&e.version>=(t.minimumVersion??0))))).slice(0,t.maxProtocols)}};var mt={};Object.defineProperty(mt,\"__esModule\",{value:!0});class vt{static combine(e,t){return new vt(e,t)}constructor(e,t){this.primary=e,this.secondary=t}onEndpointDisconnect(e,t){this.primary.onEndpointDisconnect(e,(()=>{this.secondary.isEndpointConnected(e)||t()})),this.secondary.onEndpointDisconnect(e,(()=>{this.primary.isEndpointConnected(e)||t()}))}isValidEndpointPayload(e){return this.primary.isValidEndpointPayload(e)||this.secondary.isValidEndpointPayload(e)}async closeEndpoint(e){await this.primary.closeEndpoint(e),await this.secondary.closeEndpoint(e)}isEndpointConnected(e){return this.primary.isEndpointConnected(e)||this.secondary.isEndpointConnected(e)}async addEndpoint(e,t){this.primary.isValidEndpointPayload(t)&&await this.primary.addEndpoint(e,t),this.secondary.isValidEndpointPayload(t)&&await this.secondary.addEndpoint(e,t)}receive(e){this.primary.receive(e),this.secondary.receive(e)}send(e,t,n){return this.primary.isEndpointConnected(e)?this.primary.send(e,t,n):this.secondary.send(e,t,n)}async close(){await Promise.all([this.primary.close(),this.secondary.close()])}}mt.default=vt;var Ct,bt,It=s&&s.__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},Et=s&&s.__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)},xt=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(xe,\"__esModule\",{value:!0}),xe.ConnectionManager=void 0;const At=Ae,Pt=d,Mt=Oe,_t=Fe,Ot=Je,St=Qe,Rt=pt,Ft=gt,jt=xt(mt);class kt extends Pt.Base{static getProtocolOptionsFromStrings(e){return e.map((e=>{switch(e){case\"rtc\":return _t.RTCInfo;case\"classic\":return Mt.ClassicInfo;default:return(0,At.exhaustiveCheck)(e,[\"rtc\",\"classic\"])}}))}constructor(e){super(e),Ct.set(this,void 0),bt.set(this,void 0),this.removeChannelFromProviderMap=e=>{this.providerMap.delete(e)},this.onmessage=e=>\"process-channel-connection\"===e.action&&(this.processChannelConnection(e),!0),this.providerMap=new Map,this.protocolManager=new Ft.ProtocolManager(\"node\"===this.wire.environment.type?[\"classic\"]:[\"rtc\",\"classic\"]),It(this,Ct,new Rt.MessageReceiver(e),\"f\"),It(this,bt,new Ot.RTCICEManager(e),\"f\"),e.registerMessageHandler(this.onmessage.bind(this))}createProvider(e,t){const n=Object.assign(this.wire.environment.getDefaultChannelOptions().create,e||{}),i=this.protocolManager.getProviderProtocols(n?.protocols),r=i.map((e=>{switch(e){case\"rtc\":return new _t.RTCStrategy;case\"classic\":return new Mt.ClassicStrategy(this.wire,Et(this,Ct,\"f\"),t.channelId,t);default:return(0,At.exhaustiveCheck)(e,[\"rtc\",\"classic\"])}}));let o;if(2===r.length){const[e,t]=r;o=jt.default.combine(e,t)}else{if(1!==r.length)throw new Error(\"failed to combine strategies\");[o]=r}const s=new St.ChannelProvider(t,(()=>St.ChannelProvider.wireClose(this.wire,t.channelName)),o),a=t.channelId;return this.providerMap.set(a,{provider:s,strategy:o,supportedProtocols:kt.getProtocolOptionsFromStrings(i)}),St.ChannelProvider.setProviderRemoval(s,this.removeChannelFromProviderMap.bind(this)),s}async createClientOffer(e){const t=this.protocolManager.getClientProtocols(e?.protocols);let n;return{offer:{supportedProtocols:await Promise.all(t.map((async e=>{switch(e){case\"rtc\":{const{rtcClient:e,channels:t,offer:i,rtcConnectionId:r,channelsOpened:o}=await Et(this,bt,\"f\").startClientOffer();return n={rtcClient:e,channels:t,channelsOpened:o},{type:\"rtc\",version:_t.RTCInfo.version,payload:{offer:i,rtcConnectionId:r}}}case\"classic\":return{type:\"classic\",version:Mt.ClassicInfo.version};default:return(0,At.exhaustiveCheck)(e,[\"rtc\",\"classic\"])}}))),maxProtocols:2},rtc:n}}async createClientStrategy(e,t){t.endpointId||(t.endpointId=this.wire.environment.getNextMessageId(),Et(this,Ct,\"f\").checkForPreviousClientConnection(t.channelId));const n=t.answer??{supportedProtocols:[{type:\"classic\",version:1}]},i=(await Promise.all(n.supportedProtocols.map((async n=>\"rtc\"===n.type&&e?(await Et(this,bt,\"f\").finishClientOffer(e.rtcClient,n.payload.answer,e.channelsOpened),new _t.RTCStrategy):\"classic\"===n.type?new Mt.ClassicStrategy(this.wire,Et(this,Ct,\"f\"),t.endpointId,t):null)))).filter((e=>null!==e));let r;if(e&&!i.some((e=>e instanceof _t.RTCStrategy))&&e&&e.rtcClient.close(),i.length>=2)r=jt.default.combine(i[0],i[1]);else{if(!i.length)throw new Error(\"No compatible protocols\");[r]=i}const o={endpointIdentity:t,rtc:e};return r.addEndpoint(t.channelId,o),r}async processChannelConnection(e){const{clientIdentity:t,providerIdentity:n,ackToSender:i,payload:r,offer:o}=e.payload;t.endpointId?t.isLocalEndpointId=!1:(t.endpointId=this.wire.environment.getNextMessageId(),t.isLocalEndpointId=!0);const s=n.channelId,a=this.providerMap.get(s);if(!a)return i.payload.success=!1,i.payload.reason=`Channel \"${n.channelName}\" has been destroyed.`,this.wire.sendRaw(i);const{provider:c,strategy:d,supportedProtocols:h}=a;try{if(!(c instanceof St.ChannelProvider))throw Error(\"Cannot connect to a channel client\");const e=o??{supportedProtocols:[{type:\"classic\",version:1}],maxProtocols:1},n=this.protocolManager.getCompatibleProtocols(h,e);if(!n.length)throw new Error(\"This provider does not support any of the offered protocols.\");const s=await c.processConnection(t,r);i.payload.payload=i.payload.payload||{};let a={supportedProtocols:[],endpointPayloadPromise:Promise.resolve({endpointIdentity:t})};return a=await n.reduce((async(e,t)=>{const n=await e;if(\"rtc\"===t.type){const{answer:e,rtcClient:i,channels:r}=await Et(this,bt,\"f\").createProviderAnswer(t.payload.rtcConnectionId,t.payload.offer);n.supportedProtocols.push({type:\"rtc\",version:_t.RTCInfo.version,payload:{answer:e}}),n.endpointPayloadPromise=n.endpointPayloadPromise.then((e=>r.then((t=>({...e,rtc:{rtcClient:i,channels:t}})))))}else n.supportedProtocols.push({type:\"classic\",version:Mt.ClassicInfo.version});return n}),Promise.resolve(a)),a.endpointPayloadPromise.then((e=>d.addEndpoint(t.endpointId,e))),i.payload.payload.result=s,i.payload.payload.answer=a,this.wire.sendRaw(i)}catch(e){return i.payload.success=!1,i.payload.reason=e.message,this.wire.sendRaw(i)}}}xe.ConnectionManager=kt,Ct=new WeakMap,bt=new WeakMap;var Lt,Tt,$t,Bt=s&&s.__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},Gt=s&&s.__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)};Object.defineProperty(le,\"__esModule\",{value:!0}),le.Channel=void 0;const Wt=t,Ht=G,Nt=d,Dt=ue,Ut=xe,Vt=Qe;function zt(e){const t=Math.floor(e/10),n=Math.min(3e4,500*2**t);return new Promise((e=>{setTimeout((()=>{e(!1)}),n)}))}class Kt extends Nt.EmitterBase{constructor(e){super(e,\"channel\"),Lt.set(this,void 0),Tt.set(this,new Wt.EventEmitter),$t.set(this,new Ht.AsyncRetryableLazy((async()=>{await Promise.all([this.on(\"disconnected\",(e=>{Dt.ChannelClient.handleProviderDisconnect(e)})),this.on(\"connected\",((...e)=>{Gt(this,Tt,\"f\").emit(\"connected\",...e)}))]).catch((()=>new Error(\"error setting up channel connection listeners\")))}))),Bt(this,Lt,new Ut.ConnectionManager(e),\"f\")}async getAllChannels(){return this.wire.sendAction(\"get-all-channels\").then((({payload:e})=>e.data))}async onChannelConnect(e){await this.on(\"connected\",e)}async onChannelDisconnect(e){await this.on(\"disconnected\",e)}async safeConnect(e,t,n){const i={count:0};do{let r=()=>{};const o=new Promise((t=>{r=n=>{e===n.channelName&&t(!0)},Gt(this,Tt,\"f\").on(\"connected\",r)}));try{if(i.count>0){i.gotConnectedEvent=await Promise.race([zt(i.count),o]);const t=await this.wire.sendAction(\"connect-to-channel\",{...n,retryInfo:i});return console.log(`Successfully connected to channelName: ${e}`),t.payload.data}const t=this.wire.sendAction(\"connect-to-channel\",n);i.originalMessageId=t.messageId;return(await t).payload.data}catch(n){if(!n.message.includes(\"internal-nack\"))throw n;t&&0===i.count&&console.warn(`No channel found for channelName: ${e}. Waiting for connection...`)}finally{i.count+=1,Gt(this,Tt,\"f\").removeListener(\"connected\",r)}}while(t);throw new Error(`No channel found for channelName: ${e}.`)}async connect(e,t={}){if(await Gt(this,$t,\"f\").getValue(),!e||\"string\"!=typeof e)throw new Error(\"Please provide a channelName string to connect to a channel.\");const n={wait:!0,...this.wire.environment.getDefaultChannelOptions().connect,...t},{offer:i,rtc:r}=await Gt(this,Lt,\"f\").createClientOffer(n);let o;(this.fin.me.isFrame||this.fin.me.isView||this.fin.me.isWindow)&&(o=(await this.fin.me.getInfo()).url);const s={channelName:e,...n,offer:i,connectionUrl:o},a=await this.safeConnect(e,n.wait,s),c=await Gt(this,Lt,\"f\").createClientStrategy(r,a),d=new Dt.ChannelClient(a,(()=>Dt.ChannelClient.wireClose(this.wire,a,a.endpointId)),c);return c.onEndpointDisconnect(a.channelId,(async()=>{try{await d.sendDisconnectAction()}catch(e){console.warn(`Something went wrong during disconnect for client with uuid: ${a.uuid} / name: ${a.name} / endpointId: ${a.endpointId}.`)}finally{Dt.ChannelClient.handleProviderDisconnect(a)}})),d}async create(e,t){if(!e)throw new Error(\"Please provide a channelName to create a channel\");const{payload:{data:n}}=await this.wire.sendAction(\"create-channel\",{channelName:e}),i=Gt(this,Lt,\"f\").createProvider(t,n);return this.on(\"client-disconnected\",(t=>{t.channelName===e&&Vt.ChannelProvider.handleClientDisconnection(i,t)})),i}}le.Channel=Kt,Lt=new WeakMap,Tt=new WeakMap,$t=new WeakMap,Object.defineProperty(de,\"__esModule\",{value:!0}),de.InterAppPayload=de.InterApplicationBus=void 0;const qt=t,Jt=d,Yt=he,Zt=le,Qt=O;class Xt extends Jt.Base{constructor(e){super(e),this.events={subscriberAdded:\"subscriber-added\",subscriberRemoved:\"subscriber-removed\"},this.refCounter=new Yt.RefCounter,this.Channel=new Zt.Channel(e),this.emitter=new qt.EventEmitter,e.registerMessageHandler(this.onmessage.bind(this)),this.on=this.emitter.on.bind(this.emitter),this.removeAllListeners=this.emitter.removeAllListeners.bind(this.emitter)}async publish(e,t){await this.wire.sendAction(\"publish-message\",{topic:e,message:t,sourceWindowName:this.me.name})}async send(e,t,n){const i=(0,Qt.validateIdentity)(e);if(i)throw new Error(i);await this.wire.sendAction(\"send-message\",{destinationUuid:e.uuid,destinationWindowName:e.name,topic:t,message:n,sourceWindowName:this.me.name})}subscribe(e,t,n){const i=this.createSubscriptionKey(e.uuid,e.name||\"*\",t);return this.emitter.on(i,n),this.refCounter.actOnFirst(i,(async()=>{await this.wire.sendAction(\"subscribe\",{sourceUuid:e.uuid,sourceWindowName:e.name||\"*\",topic:t,destinationWindowName:this.me.name})}),(()=>Promise.resolve()))}unsubscribe(e,t,n){const i=e.name||\"*\",r=this.createSubscriptionKey(e.uuid,i,t);return this.emitter.removeListener(r,n),this.refCounter.actOnLast(r,(async()=>{await this.wire.sendAction(\"unsubscribe\",{sourceUuid:e.uuid,sourceWindowName:i,topic:t,destinationWindowName:this.me.name})}),(()=>new Promise((e=>e)).then((()=>{}))))}processMessage(e){const{payload:{message:t,sourceWindowName:n,sourceUuid:i,topic:r}}=e,o=[this.createSubscriptionKey(i,n,r),this.createSubscriptionKey(i,\"*\",r),this.createSubscriptionKey(\"*\",\"*\",r)],s={uuid:i,name:n};o.forEach((e=>{this.emitter.emit(e,t,s)}))}emitSubscriverEvent(e,t){const{payload:{targetName:n,uuid:i,topic:r}}=t,o={name:n,uuid:i,topic:r};this.emitter.emit(e,o)}createSubscriptionKey(e,t,n){const i=t||\"*\";if(!(e&&i&&n))throw new Error(\"Missing uuid, name, or topic string\");return function(...e){return e.map((e=>Buffer.from(`${e}`).toString(\"base64\"))).join(\"/\")}(e,i,n)}onmessage(e){const{action:t}=e;switch(t){case\"process-message\":this.processMessage(e);break;case this.events.subscriberAdded:this.emitSubscriverEvent(this.events.subscriberAdded,e);break;case this.events.subscriberRemoved:this.emitSubscriverEvent(this.events.subscriberRemoved,e)}return!0}}de.InterApplicationBus=Xt;de.InterAppPayload=class{};var en={};Object.defineProperty(en,\"__esModule\",{value:!0}),en.Clipboard=void 0;const tn=d;class nn extends tn.Base{async writeText(e){await this.wire.sendAction(\"clipboard-write-text\",e)}async readText(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-text\",{type:e});return t.data}async writeImage(e){await this.wire.sendAction(\"clipboard-write-image\",e)}async readImage(e={format:\"dataURL\"}){const{payload:t}=await this.wire.sendAction(\"clipboard-read-image\",e);return t.data}async writeHtml(e){await this.wire.sendAction(\"clipboard-write-html\",e)}async readHtml(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-html\",{type:e});return t.data}async writeRtf(e){await this.wire.sendAction(\"clipboard-write-rtf\",e)}async readRtf(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-rtf\",{type:e});return t.data}async write(e){await this.wire.sendAction(\"clipboard-write\",e)}async getAvailableFormats(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-formats\",{type:e});return t.data}}en.Clipboard=nn;var rn={},on={},sn={};Object.defineProperty(sn,\"__esModule\",{value:!0}),sn.ExternalApplication=void 0;const an=d;class cn extends an.EmitterBase{constructor(e,t){super(e,\"external-application\",t.uuid),this.identity=t}getInfo(){return this.wire.sendAction(\"get-external-application-info\",this.identity).then((({payload:e})=>e.data))}}sn.ExternalApplication=cn,Object.defineProperty(on,\"__esModule\",{value:!0}),on.ExternalApplicationModule=void 0;const dn=d,hn=sn;class ln extends dn.Base{wrap(e){return this.wire.sendAction(\"external-application-wrap\").catch((e=>{})),Promise.resolve(new hn.ExternalApplication(this.wire,{uuid:e}))}wrapSync(e){return this.wire.sendAction(\"external-application-wrap-sync\").catch((e=>{})),new hn.ExternalApplication(this.wire,{uuid:e})}}on.ExternalApplicationModule=ln,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(on,e),n(sn,e)}(rn);var un={},pn={},wn={};Object.defineProperty(wn,\"__esModule\",{value:!0}),wn._Frame=void 0;const yn=d;class fn extends yn.EmitterBase{constructor(e,t){super(e,\"frame\",t.uuid,t.name),this.identity=t}getInfo(){return this.wire.sendAction(\"get-frame-info\",this.identity).then((({payload:e})=>e.data))}getParentWindow(){return this.wire.sendAction(\"get-parent-window\",this.identity).then((({payload:e})=>e.data))}}wn._Frame=fn,Object.defineProperty(pn,\"__esModule\",{value:!0}),pn._FrameModule=void 0;const gn=d,mn=O,vn=wn;class Cn extends gn.Base{async wrap(e){this.wire.sendAction(\"frame-wrap\").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}wrapSync(e){this.wire.sendAction(\"frame-wrap-sync\").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}getCurrent(){return this.wire.sendAction(\"frame-get-current\").catch((e=>{})),Promise.resolve(new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity()))}getCurrentSync(){return this.wire.sendAction(\"frame-get-current-sync\").catch((e=>{})),new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity())}}pn._FrameModule=Cn,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(pn,e),n(wn,e)}(un);var bn={};Object.defineProperty(bn,\"__esModule\",{value:!0}),bn.GlobalHotkey=void 0;const In=d;class En extends In.EmitterBase{constructor(e){super(e,\"global-hotkey\")}async register(e,t){await this.on(e,t),await this.wire.sendAction(\"global-hotkey-register\",{hotkey:e})}async unregister(e){await this.removeAllListeners(e),await this.wire.sendAction(\"global-hotkey-unregister\",{hotkey:e})}async unregisterAll(){await Promise.all(this.eventNames().filter((e=>!(\"registered\"===e||\"unregistered\"===e))).map((e=>this.removeAllListeners(e)))),await this.wire.sendAction(\"global-hotkey-unregister-all\",{})}async isRegistered(e){const{payload:{data:t}}=await this.wire.sendAction(\"global-hotkey-is-registered\",{hotkey:e});return t}}bn.GlobalHotkey=En;var xn,An={},Pn={},Mn={},_n=s&&s.__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)};Object.defineProperty(Mn,\"__esModule\",{value:!0}),Mn.Platform=void 0;const On=d,Sn=O,Rn=new Map;class Fn extends On.EmitterBase{constructor(e,t){super(t.wire,\"application\",e.uuid),this.getClient=e=>{this.wire.sendAction(\"platform-get-client\",this.identity).catch((e=>{}));const t=e||this.identity,{uuid:n}=t;if(!Rn.has(n)){const e=_n(this,xn,\"f\").call(this,n);Rn.set(n,e)}return Rn.get(n)},xn.set(this,(async e=>{try{const t=`custom-frame-${e}`,n=await this._channel.connect(t,{wait:!1});return n.onDisconnection((()=>{Rn.delete(e)})),n}catch(t){throw Rn.delete(e),new Error(\"The targeted Platform is not currently running. Listen for application-started event for the given Uuid.\")}})),this.launchLegacyManifest=this.launchContentManifest;const n=(0,Sn.validateIdentity)(e);if(n)throw new Error(n);this._channel=t,this.identity={uuid:e.uuid},this.Layout=this.fin.Platform.Layout,this.Application=this.fin.Application.wrapSync(this.identity)}async createView(e,t,n){this.wire.sendAction(\"platform-create-view\",this.identity).catch((e=>{}));const i=await this.getClient(),r=await i.dispatch(\"create-view\",{target:t,opts:e,targetView:n});if(!r||(0,Sn.validateIdentity)(r.identity))throw new Error(`When overwriting the createView call, please return an object that has a valid 'identity' property: ${JSON.stringify(r)}`);return this.fin.View.wrapSync(r.identity)}async createWindow(e){this.wire.sendAction(\"platform-create-window\",this.identity).catch((e=>{}));const t=await this.getClient();e.reason||(e.reason=\"api-call\");const n=await t.dispatch(\"create-view-container\",e);if(!n||(0,Sn.validateIdentity)(n.identity))throw new Error(`When overwriting the createWindow call, please return an object that has a valid 'identity' property: ${JSON.stringify(n)}`);const{identity:i}=n,r=this.fin.Window.wrapSync(i);return r.name=i.name,r.uuid=i.uuid,r}async quit(){this.wire.sendAction(\"platform-quit\",this.identity).catch((e=>{}));return(await this.getClient()).dispatch(\"quit\")}async closeView(e){this.wire.sendAction(\"platform-close-view\",this.identity).catch((e=>{}));const t=await this.getClient();await t.dispatch(\"close-view\",{view:e})}async reparentView(e,t){console.warn(\"Platform.reparentView has been deprecated, please use Platform.createView\"),this.wire.sendAction(\"platform-reparent-view\",this.identity).catch((e=>{}));const n={...e,uuid:e.uuid??this.identity.uuid},i=await this.fin.View.wrap(n),r=await i.getOptions();return this.createView(r,t)}async getSnapshot(){this.wire.sendAction(\"platform-get-snapshot\",this.identity).catch((e=>{}));return(await this.getClient()).dispatch(\"get-snapshot\")}async getViewSnapshot(e){return(await this.getClient()).dispatch(\"get-view-snapshot\",{viewIdentity:e})}async applySnapshot(e,t){this.wire.sendAction(\"platform-apply-snapshot\",this.identity).catch((e=>{}));const n=\"Requested snapshot must be a valid Snapshot object, or a url or filepath to such an object.\";let i;if(\"string\"==typeof e)try{i=(await this._channel.wire.sendAction(\"get-application-manifest\",{manifestUrl:e})).payload.data}catch(e){throw new Error(`${n}: ${e}`)}else i=e;if(!i.windows)throw new Error(n);const r=await this.getClient();return await r.dispatch(\"apply-snapshot\",{snapshot:i,options:t}),this}async fetchManifest(e){return(await this.getClient()).dispatch(\"platform-fetch-manifest\",{manifestUrl:e})}async launchContentManifest(e){this.wire.sendAction(\"platform-launch-content-manifest\",this.identity).catch((()=>{}));const t=await this.getClient(),n=await this.fetchManifest(e);return t.dispatch(\"launch-into-platform\",{manifest:n,manifestUrl:e}),this}async setWindowContext(e={},t){if(this.wire.sendAction(\"platform-set-window-context\",this.identity).catch((e=>{})),!e)throw new Error(\"Please provide a serializable object or string to set the context.\");const n=await this.getClient(),{entityType:i}=t?await this.fin.System.getEntityInfo(t.uuid,t.name):this.fin.me;await n.dispatch(\"set-window-context\",{context:e,entityType:i,target:t||{uuid:this.fin.me.uuid,name:this.fin.me.name}})}async getWindowContext(e){this.wire.sendAction(\"platform-get-window-context\",this.identity).catch((e=>{}));const t=await this.getClient(),{entityType:n}=e?await this.fin.System.getEntityInfo(e.uuid,e.name):this.fin.me;return t.dispatch(\"get-window-context\",{target:e||{uuid:this.fin.me.uuid,name:this.fin.me.name},entityType:n})}async closeWindow(e,t={skipBeforeUnload:!1}){this.wire.sendAction(\"platform-close-window\",this.identity).catch((e=>{}));return(await this.getClient()).dispatch(\"close-window\",{windowId:e,options:t})}}Mn.Platform=Fn,xn=new WeakMap;var jn={},kn={},Ln={},Tn={};function $n(e){switch(e){case\"columns\":case\"grid\":case\"rows\":case\"tabs\":return!0;default:return!1}}Object.defineProperty(Tn,\"__esModule\",{value:!0}),Tn.overrideFromComposables=Tn.isValidPresetType=void 0,Tn.isValidPresetType=$n,Tn.overrideFromComposables=function(...e){return t=>e.reduceRight(((e,t)=>n=>t(e(n))),(e=>e))(t)},Tn.default={isValidPresetType:$n};var Bn={},Gn={},Wn={};Object.defineProperty(Wn,\"__esModule\",{value:!0}),Wn.ApiConsumer=void 0;Wn.ApiConsumer=class{constructor(e){this.strategy=e,this.consume=async e=>(await this.strategy.getExposedFunctions(e)).reduce(((t,n)=>({...t,[n.key]:this.strategy.createFunction(n,e)})),{})}};var Hn={},Nn={};Object.defineProperty(Nn,\"__esModule\",{value:!0}),Nn.expose=Nn.getExposedProperties=void 0;const Dn=Symbol(\"exposedProperties\");Nn.getExposedProperties=e=>e[Dn]||e.prototype[Dn]||[];Nn.expose=e=>(t,n,i)=>{t[Dn]=t[Dn]||[],t[Dn].push({key:n,descriptor:i,options:e})},Object.defineProperty(Hn,\"__esModule\",{value:!0}),Hn.ApiExposer=void 0;const Un=Nn;Hn.ApiExposer=class{constructor(e){this.strategy=e,this.exposeInstance=async(e,t)=>{const n=(0,Un.getExposedProperties)(e),i=await Promise.all(n.map((async({key:n,options:i})=>({key:n,options:await this.strategy.exposeFunction(e[n].bind(e),{key:n,options:i,meta:t})}))));await this.strategy.exposeMeta(t,i)}}};var Vn={},zn={},Kn={};Object.defineProperty(Kn,\"__esModule\",{value:!0}),Kn.ChannelsConsumer=void 0;Kn.ChannelsConsumer=class{constructor(e){this.channel=e,this.getExposedFunctions=async e=>{const{id:t}=e,{props:n}=await this.channel.dispatch(`api-meta:${t}`);return n},this.createFunction=e=>(...t)=>{const{action:n}=e.options;return this.channel.dispatch(n,{args:t})}}};var qn={};Object.defineProperty(qn,\"__esModule\",{value:!0}),qn.ChannelsExposer=void 0;qn.ChannelsExposer=class{constructor(e){this.channelProviderOrClient=e,this.exposeFunction=async(e,t)=>{const{key:n,options:i,meta:r}=t,{id:o}=r,s=`${o}.${i?.action||n}`;return await this.channelProviderOrClient.register(s,(async({args:t})=>e(...t))),{action:s}},this.exposeMeta=async({id:e},t)=>{const n=`api-meta:${e}`;await this.channelProviderOrClient.register(n,(()=>({props:t})))}}},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Kn,e),n(qn,e)}(zn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(zn,e)}(Vn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Wn,e),n(Hn,e),n(Vn,e),n(Nn,e)}(Gn);var Jn={};Object.defineProperty(Jn,\"__esModule\",{value:!0}),Jn.createRelayedDispatch=exports.relayChannelClientApi_1=Jn.relayChannelClientApi=void 0;const Yn=[\"no longer connected\",\"RTCDataChannel closed unexpectedly\",\"The client you are trying to dispatch from is disconnected from the target provider\"];exports.relayChannelClientApi_1=Jn.relayChannelClientApi=async(e,t)=>{e.register(`relay:${t}`,(({action:t,target:n,payload:i})=>e.dispatch(n,t,i))),await Promise.resolve()};Jn.createRelayedDispatch=(e,t,n,i)=>async(r,o)=>{try{return await e.dispatch(`relay:${n}`,{action:r,payload:o,target:t})}catch(e){if(s=e.message,Yn.some((e=>s.includes(e)))&&i)throw new Error(i);throw e}var s};var Zn,Qn,Xn,ei=s&&s.__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},ti=s&&s.__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)};Object.defineProperty(Bn,\"__esModule\",{value:!0}),Bn.ColumnOrRow=Bn.TabStack=Bn.LayoutNode=void 0;const ni=Gn,ii=Jn;class ri{constructor(e,t){Zn.set(this,void 0),this.isRoot=()=>ti(this,Zn,\"f\").isRoot(this.entityId),this.exists=()=>ti(this,Zn,\"f\").exists(this.entityId),this.getParent=async()=>{const e=await ti(this,Zn,\"f\").getParent(this.entityId);if(e)return ri.getEntity(e,ti(this,Zn,\"f\"))},this.createAdjacentStack=async(e,t)=>{const n=await ti(this,Zn,\"f\").createAdjacentStack(this.entityId,e,t);return ri.getEntity({entityId:n,type:\"stack\"},ti(this,Zn,\"f\"))},this.getAdjacentStacks=async e=>(await ti(this,Zn,\"f\").getAdjacentStacks({targetId:this.entityId,edge:e})).map((e=>ri.getEntity({type:\"stack\",entityId:e.entityId},ti(this,Zn,\"f\")))),ei(this,Zn,e,\"f\"),this.entityId=t}}Bn.LayoutNode=ri,Zn=new WeakMap,ri.newLayoutEntitiesClient=async(e,t,n)=>{const i=(0,ii.createRelayedDispatch)(e,n,\"layout-relay\",\"You are trying to interact with a layout component on a window that does not exist or has been destroyed.\");return new ni.ApiConsumer(new ni.ChannelsConsumer({dispatch:i})).consume({id:t})},ri.getEntity=(e,t)=>{const{entityId:n,type:i}=e;switch(i){case\"column\":case\"row\":return new si(t,n,i);case\"stack\":return new oi(t,n);default:throw new Error(`Unrecognised Layout Entity encountered ('${JSON.stringify(e)})`)}};class oi extends ri{constructor(e,t){super(e,t),Qn.set(this,void 0),this.type=\"stack\",this.getViews=()=>ti(this,Qn,\"f\").getStackViews(this.entityId),this.addView=async(e,t={index:0})=>ti(this,Qn,\"f\").addViewToStack(this.entityId,e,t),this.removeView=async e=>{await ti(this,Qn,\"f\").removeViewFromStack(this.entityId,e)},this.setActiveView=async e=>{await ti(this,Qn,\"f\").setStackActiveView(this.entityId,e)},ei(this,Qn,e,\"f\")}}Bn.TabStack=oi,Qn=new WeakMap;class si extends ri{constructor(e,t,n){super(e,t),Xn.set(this,void 0),this.getContent=async()=>(await ti(this,Xn,\"f\").getContent(this.entityId)).map((e=>ri.getEntity(e,ti(this,Xn,\"f\")))),ei(this,Xn,e,\"f\"),this.type=n}}Bn.ColumnOrRow=si,Xn=new WeakMap;var ai={};Object.defineProperty(ai,\"__esModule\",{value:!0}),ai.DEFAULT_LAYOUT_KEY=ai.LAYOUT_CONTROLLER_ID=void 0,ai.LAYOUT_CONTROLLER_ID=\"layout-entities\",ai.DEFAULT_LAYOUT_KEY=\"__default__\";var ci,di,hi,li=s&&s.__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)};Object.defineProperty(Ln,\"__esModule\",{value:!0}),Ln.Layout=void 0;const ui=G,pi=O,wi=d,yi=Tn,fi=Bn,gi=ai;class mi extends wi.Base{static getClient(e){return li(e,di,\"f\").getValue()}constructor(e,t){super(t),ci.add(this),di.set(this,new ui.Lazy((async()=>fi.LayoutNode.newLayoutEntitiesClient(await this.platform.getClient(),gi.LAYOUT_CONTROLLER_ID,this.identity)))),this.replace=async e=>{this.wire.sendAction(\"layout-replace\").catch((e=>{}));const t=await this.platform.getClient();await t.dispatch(\"replace-layout\",{target:this.identity,opts:{layout:e}})},this.replaceView=async(e,t)=>{this.wire.sendAction(\"layout-replace-view\").catch((e=>{}));const n=await this.platform.getClient();await n.dispatch(\"replace-view\",{target:this.identity,opts:{viewToReplace:e,newView:t}})},this.applyPreset=async e=>{this.wire.sendAction(\"layout-apply-preset\").catch((e=>{}));const t=await this.platform.getClient(),{presetType:n}=e;if(!n||!(0,yi.isValidPresetType)(n))throw new Error(\"Cannot apply preset layout, please include an applicable presetType property in the PresetLayoutOptions.\");await t.dispatch(\"apply-preset-layout\",{target:this.identity,opts:{presetType:n}})};const n=(0,pi.validateIdentity)(e);if(n)throw new Error(n);this.identity=e,this.platform=this.fin.Platform.wrapSync({uuid:e.uuid}),e.uuid===this.fin.me.uuid&&e.name===this.fin.me.name&&(this.init=this.fin.Platform.Layout.init)}async getConfig(){this.wire.sendAction(\"layout-get-config\").catch((e=>{}));return(await this.platform.getClient()).dispatch(\"get-frame-snapshot\",{target:this.identity})}async getCurrentViews(){this.wire.sendAction(\"layout-get-views\").catch((e=>{}));const e=await this.platform.getClient();return(await e.dispatch(\"get-layout-views\",{target:this.identity})).map((e=>this.fin.View.wrapSync(e)))}async getRootItem(){this.wire.sendAction(\"layout-get-root-item\").catch((()=>{}));const e=await li(this,di,\"f\").getValue(),t=await e.getRoot(\"layoutName\"in this.identity?this.identity:void 0);return fi.LayoutNode.getEntity(t,e)}async getStackByViewIdentity(e){this.wire.sendAction(\"layout-get-stack-by-view\").catch((()=>{}));const t=await li(this,di,\"f\").getValue(),n=await t.getStackByView(e);if(!n)throw new Error(`No stack found for view: ${e.uuid}/${e.name}`);return fi.LayoutNode.getEntity(n,t)}async addView(e,{location:t,targetView:n}={}){this.wire.sendAction(\"layout-add-view\").catch((e=>{}));const{identity:i}=await li(this,ci,\"m\",hi).call(this,\"layout-add-view\",{viewOptions:e,location:t,targetView:n});return{identity:i}}async closeView(e){this.wire.sendAction(\"layout-close-view\").catch((e=>{})),await li(this,ci,\"m\",hi).call(this,\"layout-close-view\",{viewIdentity:e})}}Ln.Layout=mi,di=new WeakMap,ci=new WeakSet,hi=async function(e,t){return(await this.platform.getClient()).dispatch(e,{target:this.identity,opts:t})};var vi,Ci,bi,Ii,Ei,xi=s&&s.__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)},Ai=s&&s.__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};Object.defineProperty(kn,\"__esModule\",{value:!0}),kn.LayoutModule=void 0;const Pi=d,Mi=Ln,_i=ai;class Oi extends Pi.Base{constructor(){super(...arguments),vi.add(this),Ci.set(this,!1),bi.set(this,null),this.init=async(e={})=>{if(this.wire.sendAction(\"layout-init\").catch((e=>{})),!this.wire.environment.layoutAllowedInContext(this.fin))throw new Error(\"Layout.init can only be called from a Window context.\");if(xi(this,Ci,\"f\"))throw new Error(\"Layout.init was already called, please use Layout.create to add additional layouts.\");\"openfin\"===this.wire.environment.type&&await this.fin.Platform.getCurrentSync().getClient(),Ai(this,Ci,!0,\"f\"),Ai(this,bi,await this.wire.environment.initLayoutManager(this.fin,this.wire,e),\"f\"),await this.wire.environment.applyLayoutSnapshot(this.fin,xi(this,bi,\"f\"),e);const t={name:this.fin.me.name,uuid:this.fin.me.uuid};if(!e.layoutManagerOverride){const e={layoutName:_i.DEFAULT_LAYOUT_KEY,...t};return xi(this,Ii,\"f\").call(this,e)}return this.wrapSync(t)},Ii.set(this,(e=>{const t=\"[Layout] You are using a deprecated property `layoutManager` - it will throw if you access it starting in v37.\",n=new Proxy({},{get(e,n){throw console.warn(`[Layout-mgr-proxy] accessing ${n.toString()}`),new Error(t)}}),i=Object.assign(this.wrapSync(e),{layoutManager:n});return new Proxy(i,{get(e,n){if(\"layoutManager\"===n)throw console.warn(`[Layout-proxy] accessing ${n.toString()}`),new Error(t);return e[n]}})})),this.getCurrentLayoutManagerSync=()=>xi(this,vi,\"m\",Ei).call(this,\"fin.Platform.Layout.getCurrentLayoutManagerSync()\"),this.create=async e=>this.wire.environment.createLayout(xi(this,vi,\"m\",Ei).call(this,\"fin.Platform.Layout.create()\"),e),this.destroy=async e=>this.wire.environment.destroyLayout(xi(this,vi,\"m\",Ei).call(this,\"fin.Platform.Layout.destroy()\"),e)}async wrap(e){return this.wire.sendAction(\"layout-wrap\").catch((e=>{})),new Mi.Layout(e,this.wire)}wrapSync(e){return this.wire.sendAction(\"layout-wrap-sync\").catch((e=>{})),new Mi.Layout(e,this.wire)}async getCurrent(){if(this.wire.sendAction(\"layout-get-current\").catch((e=>{})),\"openfin\"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error(\"You are not in a Window context. Only Windows can have a Layout.\");const{uuid:e,name:t}=this.fin.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction(\"layout-get-current-sync\").catch((e=>{})),\"openfin\"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error(\"You are not in a Window context. Only Windows can have a Layout.\");const{uuid:e,name:t}=this.fin.me;return this.wrapSync({uuid:e,name:t})}async getLayoutByViewIdentity(e){this.wire.sendAction(\"layout-get-by-view-identity\").catch((()=>{}));let t=await this.wire.environment.getViewWindowIdentity(this.fin,e);t.identity&&(t=t.identity);try{const n=this.wrapSync(t),i=await Mi.Layout.getClient(n),r=await i.getLayoutIdentityForViewOrThrow(e);return this.wrapSync(r)}catch(n){if(![\"No action registered at target for\",\"getLayoutIdentityForViewOrThrow is not a function\"].some((e=>n.message.includes(e))))throw n;if(t.uuid===t.name)throw new Error(`View identity ${JSON.stringify(e)} is not attached to any layout in provider window ${JSON.stringify(t)}.`);return this.wrapSync(t)}}}kn.LayoutModule=Oi,Ci=new WeakMap,bi=new WeakMap,Ii=new WeakMap,vi=new WeakSet,Ei=function(e){if(!xi(this,bi,\"f\"))throw new Error(`You must call init before using the API ${e}`);return xi(this,bi,\"f\")},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(kn,e),n(Ln,e)}(jn),Object.defineProperty(Pn,\"__esModule\",{value:!0}),Pn.PlatformModule=void 0;const Si=d,Ri=Mn,Fi=jn;class ji extends Si.Base{constructor(e,t){super(e),this._channel=t,this.Layout=new Fi.LayoutModule(this.wire)}async init(e){if(!fin.__internal_.isPlatform||fin.me.name!==fin.me.uuid)throw new Error(\"fin.Platform.init should only be called from a custom platform provider running in the main window of the application.\");return this.wire.environment.initPlatform(this.fin,e)}async wrap(e){return this.wire.sendAction(\"platform-wrap\").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}wrapSync(e){return this.wire.sendAction(\"platform-wrap-sync\").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}async getCurrent(){return this.wire.sendAction(\"platform-get-current\").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction(\"platform-get-current-sync\").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}start(e){return this.wire.sendAction(\"platform-start\").catch((e=>{})),new Promise((async(t,n)=>{try{const{uuid:n}=e,i=await this.fin.Application._create({...e,isPlatformController:!0});i.once(\"platform-api-ready\",(()=>t(this.wrapSync({uuid:n})))),i._run({uuid:n})}catch(e){n(e)}}))}startFromManifest(e,t){return this.wire.sendAction(\"platform-start-from-manifest\").catch((e=>{})),new Promise((async(n,i)=>{try{const i=await this.fin.Application._createFromManifest(e);i.once(\"platform-api-ready\",(()=>n(this.wrapSync({uuid:i.identity.uuid})))),i._run(t)}catch(e){i(e)}}))}}Pn.PlatformModule=ji,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Pn,e),n(Mn,e)}(An);var ki={};!function(e){Object.defineProperty(e,\"__esModule\",{value:!0}),e.getMe=e.getBaseMe=e.environmentUnsupportedMessage=void 0;const t=J(),n=un,i=ie(),r=rn;function o(e,t,n){return{...{isView:\"view\"===e,isWindow:\"window\"===e,isFrame:\"iframe\"===e,isExternal:\"external connection\"===e},uuid:t,name:n,entityType:e}}e.environmentUnsupportedMessage=\"You are not running in OpenFin.\",e.getBaseMe=o,e.getMe=function(s){const{uuid:a,name:c,entityType:d}=s.me,h={setContext(){throw new Error(e.environmentUnsupportedMessage)},addContextHandler(){throw new Error(e.environmentUnsupportedMessage)},getContextGroups(){throw new Error(e.environmentUnsupportedMessage)},joinContextGroup(){throw new Error(e.environmentUnsupportedMessage)},removeFromContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getAllClientsInContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getInfoForContextGroup(){throw new Error(e.environmentUnsupportedMessage)}},l=\"Interop API has not been instantiated. Either connection has failed or you have not declared interop in your config.\",u={setContext(){throw new Error(l)},addContextHandler(){throw new Error(l)},getContextGroups(){throw new Error(l)},joinContextGroup(){throw new Error(l)},removeFromContextGroup(){throw new Error(l)},getAllClientsInContextGroup(){throw new Error(l)},getInfoForContextGroup(){throw new Error(l)}},p={eventNames:()=>{throw new Error(e.environmentUnsupportedMessage)},emit:()=>{throw new Error(e.environmentUnsupportedMessage)},listeners:()=>{throw new Error(e.environmentUnsupportedMessage)},listenerCount:()=>{throw new Error(e.environmentUnsupportedMessage)},on:()=>{throw new Error(e.environmentUnsupportedMessage)},addListener:()=>{throw new Error(e.environmentUnsupportedMessage)},once:()=>{throw new Error(e.environmentUnsupportedMessage)},prependListener:()=>{throw new Error(e.environmentUnsupportedMessage)},prependOnceListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeAllListeners:()=>{throw new Error(e.environmentUnsupportedMessage)}};switch(d){case\"view\":return Object.assign(new t.View(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case\"window\":return Object.assign(new i._Window(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case\"iframe\":return Object.assign(new n._Frame(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case\"external connection\":return Object.assign(new r.ExternalApplication(s,{uuid:a}),o(d,a,c),{interop:u,isOpenFin:!1});default:return{...o(d,a,c),...p,interop:h,isOpenFin:!1}}}}(ki);var Li={},Ti={},$i={};Object.defineProperty($i,\"__esModule\",{value:!0}),$i.createWarningObject=$i.createUnusableObject=void 0,$i.createUnusableObject=function(e){const t=()=>{throw new Error(e)};return new Proxy({},{apply:t,construct:t,defineProperty:t,deleteProperty:t,get:t,getOwnPropertyDescriptor:t,getPrototypeOf:t,has:t,isExtensible:t,ownKeys:t,preventExtensions:t,set:t,setPrototypeOf:t})},$i.createWarningObject=function(e,t){return new Proxy(t,{get:(...t)=>(console.warn(e),Reflect.get(...t)),set:(...t)=>(console.warn(e),Reflect.set(...t)),getOwnPropertyDescriptor:(...t)=>(console.warn(e),Reflect.getOwnPropertyDescriptor(...t)),ownKeys:(...t)=>(console.warn(e),Reflect.ownKeys(...t))})};var Bi,Gi={},Wi={};var Hi={};!function(e){Object.defineProperty(e,\"__esModule\",{value:!0}),e.wrapIntentHandler=e.BROKER_ERRORS=e.generateOverrideWarning=e.generateOverrideError=e.wrapContextHandler=e.wrapInTryCatch=e.generateId=void 0;e.generateId=()=>`${Math.random()}${Date.now()}`;e.wrapInTryCatch=(e,t)=>(...n)=>{try{return e(...n)}catch(e){throw new Error((t||\"\")+e)}};e.wrapContextHandler=(e,t)=>async n=>{try{await e(n)}catch(e){throw console.error(`Error thrown by handler ${t} for context type ${n.type}: ${e}`),e}};e.generateOverrideError=(e,t)=>`You have tried to to use ${e} but ${t} has not been overridden in the Interop Broker. Please override this function. Refer to our documentation for more info.`;e.generateOverrideWarning=(e,t,n,i)=>{const{uuid:r,name:o}=n;return i?`Entity with identity: ${r}/${o} has called ${i} or ${e} but ${t} has not been overridden.`:`Entity with identity: ${r}/${o} has called ${e} but ${t} has not been overridden.`},e.BROKER_ERRORS={fireIntent:(0,e.generateOverrideError)(\"fireIntent\",\"handleFiredIntent\"),fireIntentForContext:(0,e.generateOverrideError)(\"fireIntentForContext\",\"handleFiredIntentForContext\"),getInfoForIntent:(0,e.generateOverrideError)(\"getInfoForIntent\",\"handleInfoForIntent\"),getInfoForIntentsByContext:(0,e.generateOverrideError)(\"getInfoForIntentsByContext\",\"handleInfoForIntentsByContext\"),joinSessionContextGroupWithJoinContextGroup:\"The Context Group you have tried to join is a Session Context Group. Custom Context Groups can only be defined by the Interop Broker through code or manifest configuration. Please use joinSessionContextGroup.\",fdc3Open:(0,e.generateOverrideError)(\"fdc3.open\",\"fdc3HandleOpen\"),fdc3FindInstances:(0,e.generateOverrideError)(\"fdc3.findInstances\",\"fdc3HandleFindInstances\"),fdc3GetAppMetadata:(0,e.generateOverrideError)(\"fdc3.getAppMetadata\",\"fdc3HandleGetAppMetadata\"),fdc3GetInfo:(0,e.generateOverrideError)(\"fdc3.getInfo\",\"fdc3HandleGetInfo\")};e.wrapIntentHandler=(e,t)=>async n=>{try{return e(n)}catch(e){throw console.error(`Error thrown by handler ${t}: ${e}`),e}}}(Hi);var Ni,Di,Ui={};function Vi(){if(Di)return Gi;Di=1;var e,t,n,r=s&&s.__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},o=s&&s.__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)},a=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Gi,\"__esModule\",{value:!0}),Gi.InteropBroker=void 0;const c=d,h=a(function(){if(Bi)return Wi;Bi=1,Object.defineProperty(Wi,\"__esModule\",{value:!0});const e=Cr();return Wi.default=class{constructor(e,t){this.provider=e,this.id=t,this.lastContext=void 0,this.contextGroupMap=new Map,this.clients=new Map,this.registerListeners()}registerListeners(){this.provider.register(`sessionContextGroup:getContext-${this.id}`,this.getCurrentContext.bind(this)),this.provider.register(`sessionContextGroup:setContext-${this.id}`,this.setContext.bind(this)),this.provider.register(`sessionContextGroup:handlerAdded-${this.id}`,this.handlerAdded.bind(this)),this.provider.register(`sessionContextGroup:handlerRemoved-${this.id}`,this.handlerRemoved.bind(this))}getCurrentContext(e){return e.type?this.contextGroupMap.get(e.type):this.lastContext}setContext(t,n){const{context:i}=t,r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name} not in Session Client State Map`);this.contextGroupMap.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{e.contextHandlers.get(i.type)?.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getClientState(e){return this.clients.get(e.endpointId)}async handlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(i){const e=r.contextHandlers.get(i)||[];r.contextHandlers.set(i,[...e,n]);const o=this.contextGroupMap.get(i);o&&await this.provider.dispatch(t,n,o)}else{r.globalHandler=n;const e=[...this.contextGroupMap.keys()].map((async e=>{const i=this.contextGroupMap.get(e);i&&await this.provider.dispatch(t,n,i)}));await Promise.all(e)}}handlerRemoved(e,t){const{handlerId:n}=e,i=this.clients.get(t.endpointId);i?(Array.from(i.contextHandlers).forEach((([,e])=>{const t=e.indexOf(n);t>-1&&e.splice(t,1)})),i.globalHandler===n&&(i.globalHandler=void 0)):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={contextHandlers:new Map,clientIdentity:e,globalHandler:void 0};this.clients.set(e.endpointId,t)}}onDisconnection(e){this.clients.delete(e.endpointId)}},Wi}()),l=Hi,u=a(i),p=function(){if(Ni)return Ui;Ni=1,Object.defineProperty(Ui,\"__esModule\",{value:!0}),Ui.PrivateChannelProvider=void 0;const e=Vi();return Ui.PrivateChannelProvider=class t{constructor(e,t){this.provider=e,this.id=t,this.clients=new Map,this.registerListeners(),this.contextByContextType=new Map,this.lastContext=void 0,this.provider.onConnection((e=>this.registerNewClient(e))),this.provider.onDisconnection((async e=>{const{endpointId:t}=e;this.clients.has(t)&&await this.handleClientDisconnecting(e),0===(await this.provider.getAllClientInfo()).length&&this.provider.destroy()}))}getClientState(e){return this.clients.get(e.endpointId)}registerListeners(){this.provider.register(\"broadcast\",this.broadcast.bind(this)),this.provider.register(\"getCurrentContext\",this.getCurrentContext.bind(this)),this.provider.register(\"contextHandlerAdded\",this.contextHandlerAdded.bind(this)),this.provider.register(\"contextHandlerRemoved\",this.contextHandlerRemoved.bind(this)),this.provider.register(\"nonStandardHandlerRemoved\",this.nonStandardHandlerRemoved.bind(this)),this.provider.register(\"onAddContextHandlerAdded\",this.onAddContextHandlerAdded.bind(this)),this.provider.register(\"onDisconnectHandlerAdded\",this.onDisconnectHandlerAdded.bind(this)),this.provider.register(\"onUnsubscribeHandlerAdded\",this.onUnsubscribeHandlerAdded.bind(this)),this.provider.register(\"clientDisconnecting\",((e,t)=>{this.handleClientDisconnecting(t)}))}broadcast(t,n){const{context:i}=t;if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name}, tried to call broadcast, is not connected to this Private Channel`);const r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to broadcast - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);this.contextByContextType.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{const t=e.handlerIdsByContextTypes.get(i.type);t&&t.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getCurrentContext(e,t){const{contextType:n}=e;if(!this.getClientState(t))throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call getCurrentContext, is not connected to this Private Channel`);if(void 0!==n){return this.contextByContextType.get(n)||null}return this.lastContext?this.lastContext:null}contextHandlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call addContextListener, is not connected to this Private Channel`);if(i){const e=r.handlerIdsByContextTypes.get(i)||[];r.handlerIdsByContextTypes.set(i,[...e,n])}else r.globalHandler=n;Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&e.onAddContextListenerHandlerId&&this.provider.dispatch(e.clientIdentity,e.onAddContextListenerHandlerId,i)}))}async contextHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);if(i){let e;if(i.globalHandler===n)i.globalHandler=void 0;else for(const[t,r]of i.handlerIdsByContextTypes){const i=r.indexOf(n);i>-1&&(r.splice(i,1),e=t)}const r=(await this.getConnectedClients()).map((async n=>{const{clientIdentity:i,clientIdentity:{endpointId:r},onUnsubscribeHandlerId:o}=n;r!==t.endpointId&&o&&await this.provider.dispatch(i,o,e)}));try{await Promise.all(r)}catch(e){throw console.error(`Problem when attempting to dispatch to onUnsubscribeHandlers. Error: ${e} Removing Client: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}`),new Error(e)}}else console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}.`)}nonStandardHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);i?i.onDisconnectHandlerId===n?i.onDisconnectHandlerId=void 0:i.onAddContextListenerHandlerId===n?i.onAddContextListenerHandlerId=void 0:i.onUnsubscribeHandlerId===n&&(i.onUnsubscribeHandlerId=void 0):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}onAddContextHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onAddContextListener, is not connected to this Private Channel`);n.onAddContextListenerHandlerId=i,Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&Array.from(e.handlerIdsByContextTypes.keys()).forEach((e=>{this.provider.dispatch(t,i,e)}))}))}onDisconnectHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onDisconnect, is not connected to this Private Channel`);n.onDisconnectHandlerId=i}onUnsubscribeHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onUnsubscribe, is not connected to this Private Channel`);n.onUnsubscribeHandlerId=i}removeClient(e){const t=this.getClientState(e);if(!t)throw new Error(`Client with Identity: ${e.uuid} ${e.name}, tried to call disconnect, is not connected to this Private Channel`);t.handlerIdsByContextTypes.clear(),this.clients.delete(e.endpointId)}async fireOnDisconnectForOtherClients(e){const{endpointId:t}=e,n=(await this.getConnectedClients()).map((async e=>{const{clientIdentity:{endpointId:n},onDisconnectHandlerId:i}=e;n!==t&&i&&await this.provider.dispatch(e.clientIdentity,i)}));try{await Promise.all(n)}catch(t){throw console.error(`Problem when attempting to dispatch to onDisconnectHandlers. Error: ${t} Disconnecting Client: uuid: ${e.uuid}. name: ${e.name}. endpointId: ${e.endpointId}`),new Error(t)}}async unsubscribeAll(e){const{endpointId:t}=e,n=this.clients.get(t);if(n){const t=Array.from(n.handlerIdsByContextTypes.values()).flat(),i=n.globalHandler;if(t.length>0){const n=t.map((async t=>this.contextHandlerRemoved({handlerId:t},e)));try{await Promise.all(n)}catch(e){console.error(e.message)}}if(i)try{await this.contextHandlerRemoved({handlerId:i},e)}catch(e){console.error(e.message)}}}async handleClientDisconnecting(e){await this.unsubscribeAll(e),this.removeClient(e),await this.fireOnDisconnectForOtherClients(e)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={clientIdentity:e,handlerIdsByContextTypes:new Map,globalHandler:void 0,onAddContextListenerHandlerId:void 0,onUnsubscribeHandlerId:void 0,onDisconnectHandlerId:void 0};this.clients.set(e.endpointId,t)}}async getConnectedClients(){const e=await this.provider.getAllClientInfo();return Array.from(this.clients.values()).filter((t=>{const{uuid:n,name:i}=t.clientIdentity;return e.some((e=>i===e.name&&n===e.uuid))}))}static init(e,n){return new t(e,n)}},Ui}(),w=G,y=[{id:\"green\",displayMetadata:{color:\"#00CC88\",name:\"green\"}},{id:\"purple\",displayMetadata:{color:\"#8C61FF\",name:\"purple\"}},{id:\"orange\",displayMetadata:{color:\"#FF8C4C\",name:\"orange\"}},{id:\"red\",displayMetadata:{color:\"#FF5E60\",name:\"red\"}},{id:\"pink\",displayMetadata:{color:\"#FF8FB8\",name:\"pink\"}},{id:\"yellow\",displayMetadata:{color:\"#E9FF8F\",name:\"yellow\"}}];let f=class i extends c.Base{constructor(i,s,a){super(i),e.set(this,void 0),t.set(this,void 0),n.set(this,void 0),this.getProvider=()=>o(this,n,\"f\").getValue(),this.interopClients=new Map,this.contextGroupsById=new Map,r(this,t,a.contextGroups??[...y],\"f\"),r(this,e,a.fdc3Info,\"f\"),a?.logging&&(this.logging=a.logging),this.intentClientMap=new Map,this.lastContextMap=new Map,this.sessionContextGroupMap=new Map,r(this,n,new w.Lazy(s),\"f\"),this.setContextGroupMap(),this.setupChannelProvider()}static createClosedConstructor(...e){return class extends i{constructor(...t){if(t.length){const[n,i,r]=t;if(r&&\"object\"==typeof r&&!(0,u.default)(r,e[2]))return console.warn(\"You have modified the parameters of the InteropOverride constructor. This behavior is deprecated and will be removed in a future version. You can modify these options in your manifest. Please consult our Interop docs for guidance on migrating to the new override scheme.\"),void super(e[0],e[1],r);console.warn(\"You are attempting to pass arguments to the InteropOverride constructor. This is not necessary, and these passed arguments will be ignored. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.\")}super(...e)}}}setContext({context:e},t){this.wire.sendAction(\"interop-broker-set-context\").catch((e=>{}));const n=this.getClientState(t);if(!n||!n.contextGroupId)throw n?new Error(\"You must join a context group before you can set context.\"):new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);{const{contextGroupId:t}=n;this.setContextForGroup({context:e},t)}}setContextForGroup({context:e},t){this.wire.sendAction(\"interop-broker-set-context-for-group\").catch((e=>{}));const n=this.contextGroupsById.get(t);if(!n)throw new Error(`Unable to set context for context group that isn't in the context group mapping: ${t}.`);const r=i.checkContextIntegrity(e);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(e)}`);const o=e.type;n.set(o,e),this.lastContextMap.set(t,o);Array.from(this.interopClients.values()).filter((e=>e.contextGroupId===t)).forEach((t=>{for(const[,n]of t.contextHandlers)i.isContextTypeCompatible(o,n.contextType)&&this.invokeContextHandler(t.clientIdentity,n.handlerId,e)}))}getCurrentContext(e,t){this.wire.sendAction(\"interop-broker-get-current-context\").catch((e=>{}));const n=this.getClientState(t);if(!n?.contextGroupId)throw new Error(\"You must be a member of a context group to call getCurrentContext\");const{contextGroupId:i}=n,r=this.contextGroupsById.get(i),o=this.lastContextMap.get(i),s=e?.contextType??o;return r&&s?r.get(s):void 0}async joinContextGroup({contextGroupId:e,target:t},n){if(this.wire.sendAction(\"interop-broker-join-context-group\").catch((e=>{})),this.sessionContextGroupMap.has(e))throw new Error(l.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup);if(t){i.hasEndpointId(t)&&await this.addClientToContextGroup({contextGroupId:e},t);try{const n=this.channel.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name));if(!n.length)throw new Error(`Given Identity ${t.uuid} ${t.name} is not connected to the Interop Broker.`);n.length>1&&console.warn(`More than one connection found for identity ${t.uuid} ${t.name}`);const i=[];for(const t of n)i.push(this.addClientToContextGroup({contextGroupId:e},t));await Promise.all(i)}catch(e){throw new Error(e)}}else await this.addClientToContextGroup({contextGroupId:e},n)}async addClientToContextGroup({contextGroupId:e},t){this.wire.sendAction(\"interop-broker-add-client-to-context-group\").catch((e=>{}));const n=this.getClientState(t);if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(!this.getContextGroups().find((t=>t.id===e)))throw new Error(`Attempting to join a context group that does not exist: ${e}. You may only join existing context groups.`);if(n.contextGroupId!==e){n.contextGroupId=e,await this.setCurrentContextGroupInClientOptions(t,e);const i=this.contextGroupsById.get(e);for(const[,e]of n.contextHandlers){const{contextType:n,handlerId:r}=e;if(void 0===n)i.forEach(((e,n)=>{this.invokeContextHandler(t,r,e)}));else if(i.has(n)){const e=i.get(n);e&&this.invokeContextHandler(t,r,e)}}}}async removeFromContextGroup({target:e},t){if(this.wire.sendAction(\"interop-broker-remove-from-context-group\").catch((e=>{})),e){i.hasEndpointId(e)&&await this.removeClientFromContextGroup(e);try{const t=this.channel.connections.filter((t=>t.uuid===e.uuid&&t.name===e.name));if(!t.length)throw new Error(`No connection found for given Identity ${e.uuid} ${e.name}`);t.length>1&&console.warn(`More than one connection found for identity ${e.uuid} ${e.name}`);const n=[];for(const e of t)n.push(this.removeClientFromContextGroup(e));await Promise.all(n)}catch(e){throw new Error(e)}}else await this.removeClientFromContextGroup(t)}async removeClientFromContextGroup(e){this.wire.sendAction(\"interop-broker-remove-client-from-context-group\").catch((e=>{}));const t=this.getClientState(e);t&&(t.contextGroupId=void 0),await this.setCurrentContextGroupInClientOptions(e,null)}getContextGroups(){return this.wire.sendAction(\"interop-broker-get-context-groups\").catch((e=>{})),o(this,t,\"f\").map((e=>({...e})))}getInfoForContextGroup({contextGroupId:e}){return this.wire.sendAction(\"interop-broker-get-info-for-context-group\").catch((e=>{})),this.getContextGroups().find((t=>t.id===e))}getAllClientsInContextGroup({contextGroupId:e}){this.wire.sendAction(\"interop-broker-get-all-clients-in-context-group\").catch((e=>{}));return Array.from(this.interopClients.values()).filter((t=>t.contextGroupId===e)).map((e=>e.clientIdentity))}async handleFiredIntent(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.raiseIntent\",\"InteropBroker.handleFiredIntent\",t,\"interopClient.fireIntent\");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntent)}async setIntentTarget(e,t){this.wire.sendAction(\"interop-broker-set-intent-target\").catch((e=>{}));const n=this.intentClientMap.get(t.name),i=`intent-handler-${e.name}`;if(n){const t=n.get(i);if(t){if(t.pendingIntents.push(e),t.clientIdentity&&t.isReady){const{clientIdentity:e,pendingIntents:n}=t;try{const r=n[n.length-1];await this.invokeIntentHandler(e,i,r),t.pendingIntents=[]}catch(n){console.error(`Error invoking intent handler for client ${e.uuid}/${e.name}/${e.endpointId}`),t.isReady=!1}}}else n.set(i,{isReady:!1,pendingIntents:[e]})}else{this.intentClientMap.set(t.name,new Map);const n=this.intentClientMap.get(t.name);n&&n.set(i,{isReady:!1,pendingIntents:[e]})}}async handleInfoForIntent(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.findIntent\",\"InteropBroker.handleInfoForIntent\",t,\"interopClient.getInfoForIntent\");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntent)}async handleInfoForIntentsByContext(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.findIntentsByContext\",\"InteropBroker.handleInfoForIntentsByContext\",t,\"interopClient.getInfoForIntentsByContext\");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntentsByContext)}async handleFiredIntentForContext(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.raiseIntentForContext\",\"InteropBroker.handleFiredIntentForContext\",t,\"interopClient.fireIntentForContext\");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntentForContext)}async clientDisconnected(e){}async fdc3HandleOpen({app:e,context:t},n){const i=(0,l.generateOverrideWarning)(\"fdc3.open\",\"InteropBroker.fdc3HandleOpen\",n);throw console.warn(i),new Error(l.BROKER_ERRORS.fdc3Open)}async fdc3HandleFindInstances(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.open\",\"InteropBroker.fdc3HandleFindInstances\",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3FindInstances)}async fdc3HandleGetAppMetadata(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.getAppMetadata\",\"InteropBroker.fdc3HandleGetAppMetadata\",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3GetAppMetadata)}async invokeContextHandler(e,t,n){const i=await this.getProvider();try{await i.dispatch(e,t,n)}catch(i){console.error(`Error invoking context handler ${t} for context type ${n.type} in client ${e.uuid}/${e.name}/${e.endpointId}`,i)}}async invokeIntentHandler(e,t,n){const i=await this.getProvider();await i.dispatch(e,t,n)}async fdc3HandleGetInfo(t,n){const{fdc3Version:i}=t;return{fdc3Version:i,...o(this,e,\"f\"),optionalFeatures:{OriginatingAppMetadata:!1,UserChannelMembershipAPIs:!0},appMetadata:{appId:\"\",instanceId:\"\"}}}async getAllClientInfo(){return(await this.getProvider()).getAllClientInfo()}decorateSnapshot(e){return{...e,interopSnapshotDetails:{contextGroupStates:this.getContextGroupStates()}}}applySnapshot(e,t){const n=e?.interopSnapshotDetails?.contextGroupStates;n&&(t?.closeExistingWindows||this.updateExistingClients(n),this.rehydrateContextGroupStates(n))}updateExistingClients(e){this.interopClients.forEach((t=>{const{clientIdentity:n,contextGroupId:r,contextHandlers:o}=t;if(r){const t=e[r];for(const[,e]of Object.entries(t))o.forEach((t=>{const{handlerId:r,contextType:o}=t;i.isContextTypeCompatible(e.type,o)&&this.invokeContextHandler(n,r,e)}))}}))}getContextGroupStates(){return i.toObject(this.contextGroupsById)}rehydrateContextGroupStates(e){const t=Object.entries(e);for(const[e,n]of t){const t=Object.entries(n);for(const[n,i]of t)if(this.contextGroupsById.has(e)){this.contextGroupsById.get(e).set(n,i)}else console.warn(`Attempting to set a context group that isn't in the context group mapping. Skipping context group rehydration for: ${e}`)}}contextHandlerRegistered({contextType:e,handlerId:t},n){const i={contextType:e,handlerId:t},r=this.getClientState(n);if(r?.contextHandlers.set(t,i),r&&r.contextGroupId){const{contextGroupId:i}=r,o=this.contextGroupsById.get(i);if(void 0===e)o.forEach(((e,i)=>{this.invokeContextHandler(n,t,e)}));else if(o.has(e)){const i=o.get(e);i&&this.invokeContextHandler(n,t,i)}}}async intentHandlerRegistered(e,t){const{handlerId:n}=e,i=this.intentClientMap.get(t.name),r=i?.get(n);if(i)if(r){const{pendingIntents:e}=r;r.clientIdentity=t,r.isReady=!0;try{if(e.length>0){const i=e[e.length-1];await this.invokeIntentHandler(t,n,i),r.pendingIntents=[]}}catch(e){console.error(`Error invoking intent handler: ${n} for client ${t.uuid}/${t.name}/${t.endpointId}`)}}else i.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t});else{this.intentClientMap.set(t.name,new Map);const e=this.intentClientMap.get(t.name);e&&e.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t})}}removeContextHandler({handlerId:e},t){const n=this.getClientState(t);n&&n.contextHandlers.delete(e)}handleJoinSessionContextGroup({sessionContextGroupId:e},t){try{if(!e)throw new Error(\"Failed to join session context group: must specify group id.\");const n=this.sessionContextGroupMap.get(e);if(n)n.registerNewClient(t);else{const n=new h.default(this.channel,e);n.registerNewClient(t),this.sessionContextGroupMap.set(e,n)}return{hasConflict:this.contextGroupsById.has(e)}}catch(e){throw new Error(e)}}getClientState(e){return this.interopClients.get(e.endpointId)}static toObject(e){const t=Object.fromEntries(e),n={};return Object.entries(t).forEach((([e,t])=>{const i=Object.fromEntries(t);n[e]=i})),n}static checkContextIntegrity(e){if(!e)return{isValid:!1,reason:\"No context supplied\"};if(\"object\"!=typeof e)return{isValid:!1,reason:\"Context must be an Object\"};if(!e.type)return{isValid:!1,reason:\"Context must have a type property\"};if(e.id&&\"object\"!=typeof e.id)return{isValid:!1,reason:\"Context id must be an Object populated with key-value identifiers (if set)\"};if(e.id){const{id:t}=e,n=Object.keys(t);let i=!1;if(!n.length)return{isValid:!1,reason:\"Context id must have at least one key-value identifier\"};if(n.forEach((e=>{\"string\"==typeof e&&\"string\"==typeof t[e]||(i=!0)})),i)return{isValid:!1,reason:\"Context id key-value identifiers must be of type string\"}}return e.name&&\"string\"!=typeof e.name?{isValid:!1,reason:\"Context name must be of string type (if set)\"}:{isValid:!0}}static hasEndpointId(e){return void 0!==e.endpointId}static isContextTypeCompatible(e,t){return void 0===t||e===t}setContextGroupMap(){for(const e of this.getContextGroups())this.contextGroupsById.set(e.id,new Map)}async setCurrentContextGroupInClientOptions(e,t){try{const n=await this.fin.System.getEntityInfo(e.uuid,e.name);let i;\"view\"===n.entityType?i=await this.fin.View.wrap(e):\"window\"===n.entityType&&(i=await this.fin.Window.wrap(e)),i&&await i.updateOptions({interop:{currentContextGroup:t}})}catch(e){}}async setupChannelProvider(){try{const e=await this.getProvider();this.channel=e,this.wireChannel(e)}catch(e){throw new Error(`Error setting up Interop Broker Channel Provider: ${e}`)}}wireChannel(e){e.onConnection((async(e,t)=>{if(!await this.isConnectionAuthorized(e,t))throw new Error(`Connection not authorized for ${e.uuid}, ${e.name}`);if(!e.endpointId)throw new Error(\"Version too old to be compatible with Interop. Please upgrade your runtime to a more recent version.\");const n={contextGroupId:void 0,contextHandlers:new Map,clientIdentity:e};t?.currentContextGroup&&this.contextGroupsById.has(t.currentContextGroup)&&(n.contextGroupId=t?.currentContextGroup),this.interopClients.set(e.endpointId,n)})),e.onDisconnection((e=>{this.interopClients.delete(e.endpointId);const t=this.intentClientMap.get(e.name);t&&e.uuid===this.fin.me.uuid&&t.forEach((e=>{e.isReady=!1})),this.sessionContextGroupMap.forEach((t=>{t.onDisconnection(e)})),this.clientDisconnected(e)})),e.beforeAction((async(e,t,n)=>{if(!await this.isActionAuthorized(e,t,n))throw new Error(`Action (${e}) not authorized for ${n.uuid}, ${n.name}`);this.logging?.beforeAction?.enabled&&console.log(e,t,n)})),e.afterAction(((e,t,n)=>{this.logging?.afterAction?.enabled&&console.log(e,t,n)})),e.register(\"setContext\",this.setContext.bind(this)),e.register(\"fireIntent\",this.handleFiredIntent.bind(this)),e.register(\"getCurrentContext\",this.getCurrentContext.bind(this)),e.register(\"getInfoForIntent\",this.handleInfoForIntent.bind(this)),e.register(\"getInfoForIntentsByContext\",this.handleInfoForIntentsByContext.bind(this)),e.register(\"fireIntentForContext\",this.handleFiredIntentForContext.bind(this)),e.register(\"getContextGroups\",this.getContextGroups.bind(this)),e.register(\"joinContextGroup\",this.joinContextGroup.bind(this)),e.register(\"removeFromContextGroup\",this.removeFromContextGroup.bind(this)),e.register(\"getAllClientsInContextGroup\",this.getAllClientsInContextGroup.bind(this)),e.register(\"getInfoForContextGroup\",this.getInfoForContextGroup.bind(this)),e.register(\"contextHandlerRegistered\",this.contextHandlerRegistered.bind(this)),e.register(\"intentHandlerRegistered\",this.intentHandlerRegistered.bind(this)),e.register(\"removeContextHandler\",this.removeContextHandler.bind(this)),e.register(\"sessionContextGroup:createIfNeeded\",this.handleJoinSessionContextGroup.bind(this)),e.register(\"fdc3Open\",this.fdc3HandleOpen.bind(this)),e.register(\"fdc3v2FindIntentsByContext\",this.handleInfoForIntentsByContext.bind(this)),e.register(\"fdc3FindInstances\",this.fdc3HandleFindInstances.bind(this)),e.register(\"fdc3GetAppMetadata\",this.fdc3HandleGetAppMetadata.bind(this)),e.register(\"fdc3v2GetInfo\",(async(e,t)=>this.fdc3HandleGetInfo.bind(this)(e,t))),e.register(\"createPrivateChannelProvider\",(async e=>{const{channelId:t}=e,n=await this.fin.InterApplicationBus.Channel.create(t);p.PrivateChannelProvider.init(n,t)}))}isConnectionAuthorized(e,t){return this.wire.sendAction(\"interop-broker-is-connection-authorized\").catch((e=>{})),Promise.resolve(!0)}isActionAuthorized(e,t,n){return this.wire.sendAction(\"interop-broker-is-action-authorized\").catch((e=>{})),Promise.resolve(!0)}};return Gi.InteropBroker=f,e=new WeakMap,t=new WeakMap,n=new WeakMap,Gi}var zi,Ki={},qi={},Ji=s&&s.__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},Yi=s&&s.__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)};Object.defineProperty(qi,\"__esModule\",{value:!0});const Zi=d,Qi=Hi;class Xi extends Zi.Base{constructor(e,t,n){super(e),zi.set(this,void 0),this.id=n,Ji(this,zi,t,\"f\")}async setContext(e){this.wire.sendAction(\"interop-session-context-group-set-context\").catch((e=>{}));return(await Yi(this,zi,\"f\")).dispatch(`sessionContextGroup:setContext-${this.id}`,{sessionContextGroupId:this.id,context:e})}async getCurrentContext(e){this.wire.sendAction(\"interop-session-context-group-get-context\").catch((e=>{}));return(await Yi(this,zi,\"f\")).dispatch(`sessionContextGroup:getContext-${this.id}`,{sessionContextGroupId:this.id,type:e})}async addContextHandler(e,t){if(this.wire.sendAction(\"interop-session-context-group-add-handler\").catch((e=>{})),\"function\"!=typeof e)throw new Error(\"Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.\");const n=await Yi(this,zi,\"f\");let i;return i=t?`sessionContextHandler:invoke-${this.id}-${t}-${(0,Qi.generateId)()}`:`sessionContextHandler:invoke-${this.id}`,n.register(i,(0,Qi.wrapContextHandler)(e,i)),await n.dispatch(`sessionContextGroup:handlerAdded-${this.id}`,{handlerId:i,contextType:t}),{unsubscribe:await this.createUnsubscribeCb(i)}}async createUnsubscribeCb(e){const t=await Yi(this,zi,\"f\");return async()=>{t.remove(e),await t.dispatch(`sessionContextGroup:handlerRemoved-${this.id}`,{handlerId:e})}}getUserInstance(){return{id:this.id,setContext:(0,Qi.wrapInTryCatch)(this.setContext.bind(this),\"Failed to set context: \"),getCurrentContext:(0,Qi.wrapInTryCatch)(this.getCurrentContext.bind(this),\"Failed to get context: \"),addContextHandler:(0,Qi.wrapInTryCatch)(this.addContextHandler.bind(this),\"Failed to add context handler: \")}}}qi.default=Xi,zi=new WeakMap;var er={},tr={},nr={},ir={},rr=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),or=s&&s.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,\"default\",{enumerable:!0,value:t})}:function(e,t){e.default=t}),sr=s&&s.__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)&&rr(t,e,n);return or(t,e),t};Object.defineProperty(ir,\"__esModule\",{value:!0}),ir.PrivateChannelClient=void 0;const ar=sr(Hi);var cr,dr;function hr(){if(cr)return tr;cr=1;var e,t=s&&s.__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)},n=s&&s.__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},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(tr,\"__esModule\",{value:!0}),tr.FDC3ModuleBase=void 0;const o=nr,a=Hi,c=wr(),d=r(i);return tr.FDC3ModuleBase=class{get client(){return t(this,e,\"f\").call(this)}get fin(){return this.wire.getFin()}constructor(t,i){this.wire=i,e.set(this,void 0),n(this,e,t,\"f\")}async broadcast(e){return this.wire.sendAction(\"fdc3-broadcast\").catch((e=>{})),this.client.setContext(e)}async _open(e,t){this.wire.sendAction(\"fdc3-open\").catch((e=>{}));try{return await c.InteropClient.ferryFdc3Call(this.client,\"fdc3Open\",{app:e,context:t})}catch(e){const t=e.message===a.BROKER_ERRORS.fdc3Open?\"ResolverUnavailable\":e.message;throw new Error(t)}}async _getChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:\"system\",...(0,o.getUnsupportedChannelApis)()})))}async getOrCreateChannel(e){this.wire.sendAction(\"fdc3-get-or-create-channel\").catch((e=>{}));const t=(await this._getChannels()).find((t=>t.id===e));if(t)return{...t,type:\"system\",...(0,o.getUnsupportedChannelApis)()};try{const t=await this.client.joinSessionContextGroup(e);return(0,o.buildAppChannelObject)(t)}catch(e){throw console.error(e.message),new Error(o.ChannelError.CreationFailed)}}async getSystemChannels(){return this.wire.sendAction(\"fdc3-get-system-channels\").catch((e=>{})),this._getChannels()}async joinChannel(e){this.wire.sendAction(\"fdc3-join-channel\").catch((e=>{}));try{return await this.client.joinContextGroup(e)}catch(e){if(e.message===a.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup?console.error(\"The Channel you have tried to join is an App Channel. Custom Channels can only be defined by the Interop Broker through code or manifest configuration. Please use getOrCreateChannel.\"):console.error(e.message),e.message.startsWith(\"Attempting to join a context group that does not exist\"))throw new Error(o.ChannelError.NoChannelFound);throw new Error(o.ChannelError.AccessDenied)}}async getCurrentChannel(){this.wire.sendAction(\"fdc3-get-current-channel\").catch((e=>{}));const e=await this.getCurrentContextGroupInfo();return e?this.buildChannelObject(e):null}async leaveCurrentChannel(){return this.wire.sendAction(\"fdc3-leave-current-channel\").catch((e=>{})),this.client.removeFromContextGroup()}async getCurrentContextGroupInfo(){const e=await this.client.getContextGroups(),t=e.map((async e=>this.client.getAllClientsInContextGroup(e.id))),n=(await Promise.all(t)).findIndex((e=>e.some((e=>{const{uuid:t,name:n}=e;return this.wire.me.uuid===t&&this.wire.me.name===n}))));return e[n]}async buildChannelObject(e){return{...e,type:\"system\",addContextListener:(...[e,t])=>{let n,i;\"function\"==typeof e?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),n=e):(n=t,\"string\"==typeof e&&(i=e));const r=(async()=>{let e=!0;const t=await this.client.getCurrentContext(i);return this.client.addContextHandler(((i,r)=>{if(!e||(e=!1,!(0,d.default)(t,i)))return n(i,r)}),i)})();return{...r,unsubscribe:()=>r.then((e=>e.unsubscribe()))}},broadcast:this.broadcast.bind(this),getCurrentContext:async e=>{const t=await this.client.getCurrentContext(e);return void 0===t?null:t}}}},e=new WeakMap,tr}ir.PrivateChannelClient=class{constructor(e,t){this.id=t,this.client=e,this.listeners=new Map}async broadcast(e){return this.client.dispatch(\"broadcast\",{context:e})}async getCurrentContext(e){return this.client.dispatch(\"getCurrentContext\",{contextType:e})}async addContextListener(e,t){if(\"function\"!=typeof t)throw new Error(\"Non-function argument passed to the second parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.\");let n;n=e?`contextHandler:invoke-${this.id}-${e}-${ar.generateId()}`:`contextHandler:invoke-${this.id}-${ar.generateId()}`,this.client.register(n,ar.wrapContextHandler(t,n));const i={unsubscribe:await this.createContextUnsubscribeCb(n)};return this.listeners.set(n,i),await this.client.dispatch(\"contextHandlerAdded\",{handlerId:n,contextType:e}),i}createNonStandardUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch(\"nonStandardHandlerRemoved\",{handlerId:e})}}createContextUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch(\"contextHandlerRemoved\",{handlerId:e})}}onAddContextListener(e){const t=`onContextHandlerAdded:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch(\"onAddContextHandlerAdded\",{handlerId:t}),n}onDisconnect(e){const t=`onDisconnect:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch(\"onDisconnectHandlerAdded\",{handlerId:t}),n}onUnsubscribe(e){const t=`onUnsubscribe:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch(\"onUnsubscribeHandlerAdded\",{handlerId:t}),n}async cleanUpAllSubs(){Array.from(this.listeners.keys()).forEach((e=>{this.client.remove(e),this.listeners.delete(e)}))}async disconnect(){try{await this.client.dispatch(\"clientDisconnecting\"),await this.cleanUpAllSubs(),await this.client.disconnect()}catch(e){throw new Error(e.message)}}},function(e){var t=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,\"__esModule\",{value:!0}),e.getIntentResolution=e.isChannel=e.isContext=e.connectPrivateChannel=e.buildAppChannelObject=e.buildPrivateChannelObject=e.ChannelError=e.ResultError=e.UnsupportedChannelApiError=e.getUnsupportedChannelApis=void 0;const n=Hi,r=ir,o=t(i);e.getUnsupportedChannelApis=e=>({addContextListener:()=>{throw new a(\"Channel.addContextListener\",e)},broadcast:()=>{throw new a(\"Channel.broadcast\",e)},getCurrentContext:()=>{throw new a(\"Channel.getCurrentContext\",e)}});class a extends Error{constructor(e,t=\"System\"){super(e),this.message=`Calling ${e} on an instance of a ${t} Channel returned by fdc3.get${t}Channels is not supported. If you would like to use a ${t} Channel, please use fdc3.joinChannel, fdc3.addContextListener, and fdc3.broadcast instead.`}}var c,d;e.UnsupportedChannelApiError=a,function(e){e.NoResultReturned=\"NoResultReturned\",e.IntentHandlerRejected=\"IntentHandlerRejected\"}(c=e.ResultError||(e.ResultError={})),(d=e.ChannelError||(e.ChannelError={})).NoChannelFound=\"NoChannelFound\",d.AccessDenied=\"AccessDenied\",d.CreationFailed=\"CreationFailed\";e.buildPrivateChannelObject=e=>{let t=!1;const n=()=>{if(t)throw new Error(\"Private Channel Client has been disconnected from the Private Channel\")};return{id:e.id,type:\"private\",broadcast:async t=>(n(),e.broadcast(t)),getCurrentContext:async t=>(n(),e.getCurrentContext(t)),addContextListener:async(t,i)=>{n();let r=i,o=t;\"function\"==typeof t&&(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),r=t,o=null);return e.addContextListener(o,r)},onAddContextListener:t=>(n(),e.onAddContextListener(t)),disconnect:async()=>(n(),t=!0,e.disconnect()),onDisconnect:t=>(n(),e.onDisconnect(t)),onUnsubscribe:t=>(n(),e.onUnsubscribe(t))}};e.buildAppChannelObject=e=>({id:e.id,type:\"app\",broadcast:e.setContext,getCurrentContext:async t=>{const n=await e.getCurrentContext(t);return void 0===n?null:n},addContextListener:(t,n)=>{let i,r;\"function\"==typeof t?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),i=t):(i=n,\"string\"==typeof t&&(r=t));const s=(async()=>{let t=!0;const n=await e.getCurrentContext(r);return e.addContextHandler(((e,r)=>{if(!t||(t=!1,!(0,o.default)(n,e)))return i(e,r)}),r)})();return{...s,unsubscribe:()=>s.then((e=>e.unsubscribe()))}}});e.connectPrivateChannel=async t=>{try{const n=await fin.InterApplicationBus.Channel.connect(t),i=new r.PrivateChannelClient(n,t);return(0,e.buildPrivateChannelObject)(i)}catch(e){throw new Error(`Private Channel with id: ${t} doesn't exist`)}};e.isContext=e=>{if(e&&\"object\"==typeof e&&\"type\"in e){const{type:t}=e;return\"string\"==typeof t}return!1};e.isChannel=e=>{if(e&&\"object\"==typeof e&&\"type\"in e&&\"id\"in e){const{type:t,id:n}=e;return\"string\"==typeof t&&\"string\"==typeof n&&(\"app\"===t||\"private\"===t)}return!1};e.getIntentResolution=async(t,i,r,o)=>{const s=(0,n.generateId)(),a=new Promise(((e,t)=>{fin.InterApplicationBus.subscribe({uuid:\"*\"},s,(t=>{e(t)})).catch((()=>t(new Error(\"getResult is not supported in this environment\"))))})),d=r?{target:r,intentResolutionResultId:s}:{intentResolutionResultId:s},h=o?{name:o,context:i,metadata:d}:{...i,metadata:d},l=async()=>{let n=await a;if(!n||\"object\"!=typeof n)throw new Error(c.NoResultReturned);const{error:i}=n;if(i)throw new Error(c.IntentHandlerRejected);if((0,e.isChannel)(n)){const{id:i,type:r}=n;switch(r){case\"private\":n=await(0,e.connectPrivateChannel)(i);break;case\"app\":{const r=await t.joinSessionContextGroup(i);n=(0,e.buildAppChannelObject)(r);break}}}else if(!(0,e.isContext)(n))throw new Error(c.NoResultReturned);return n},u=o?await t.fireIntent(h):await t.fireIntentForContext(h);return\"object\"!=typeof u?{source:{appId:\"\",instanceId:\"\"},intent:\"\",version:\"2.0\",getResult:l}:{...u,getResult:l}}}(nr);var lr,ur,pr={};function wr(){if(ur)return Ki;ur=1;var e,t,n=s&&s.__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},i=s&&s.__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)},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ki,\"__esModule\",{value:!0}),Ki.InteropClient=void 0;const o=d,a=r(qi),c=function(){if(dr)return er;dr=1,Object.defineProperty(er,\"__esModule\",{value:!0}),er.Fdc3Module=void 0;const e=Hi,t=hr();class n extends t.FDC3ModuleBase{async open(e,t){await super._open(e,t)}addContextListener(e,t){let n;return this.wire.sendAction(\"fdc3-add-context-listener\").catch((e=>{})),\"function\"==typeof e?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),n=this.client.addContextHandler(e)):n=this.client.addContextHandler(t,null===e?void 0:e),{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}addIntentListener(e,t){this.wire.sendAction(\"fdc3-add-intent-listener\").catch((e=>{}));const n=this.client.registerIntentHandler((e=>{const{context:n,metadata:i}=e,{metadata:r}=n,o=i?.intentResolutionResultId||r?.intentResolutionResultId;o&&this.fin.InterApplicationBus.publish(o,null).catch((()=>null)),t(e.context)}),e,{fdc3Version:\"1.2\"});return{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}async raiseIntent(t,n,i){this.wire.sendAction(\"fdc3-raise-intent\").catch((e=>{}));const r=i?{name:t,context:n,metadata:{target:i}}:{name:t,context:n};try{return await this.client.fireIntent(r)}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntent?\"ResolverUnavailable\":t.message;throw new Error(n)}}async findIntent(t,n){this.wire.sendAction(\"fdc3-find-intent\").catch((e=>{}));try{return await this.client.getInfoForIntent({name:t,context:n})}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntent?\"ResolverUnavailable\":t.message;throw new Error(n)}}async findIntentsByContext(t){this.wire.sendAction(\"fdc3-find-intents-by-context\").catch((e=>{}));try{return await this.client.getInfoForIntentsByContext(t)}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntentsByContext?\"ResolverUnavailable\":t.message;throw new Error(n)}}async raiseIntentForContext(t,n){this.wire.sendAction(\"fdc3-raise-intent-for-context\").catch((e=>{}));try{return await this.client.fireIntentForContext({...t,metadata:{target:n}})}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntentForContext?\"ResolverUnavailable\":t.message;throw new Error(n)}}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}getInfo(){return this.wire.sendAction(\"fdc3-get-info\").catch((e=>{})),{providerVersion:this.wire.environment.getAdapterVersionSync(),provider:`openfin-${this.wire.me.uuid}`,fdc3Version:\"1.2\"}}}return er.Fdc3Module=n,er}(),h=function(){if(lr)return pr;lr=1,Object.defineProperty(pr,\"__esModule\",{value:!0}),pr.Fdc3Module2=void 0;const e=hr(),t=Hi,n=wr(),i=nr,r=ir;class o extends e.FDC3ModuleBase{async open(e,t){return\"string\"==typeof e&&console.warn(\"Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).\"),super._open(e,t)}async findInstances(e){this.wire.sendAction(\"fdc3-find-instances\").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,\"fdc3FindInstances\",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3FindInstances?\"ResolverUnavailable\":e.message;throw new Error(n)}}async getAppMetadata(e){this.wire.sendAction(\"fdc3-get-app-metadata\").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,\"fdc3GetAppMetadata\",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3GetAppMetadata?\"ResolverUnavailable\":e.message;throw new Error(n)}}async addContextListener(e,t){this.wire.sendAction(\"fdc3-add-context-listener\").catch((e=>{}));const n=e=>t=>{const{contextMetadata:n,...i}=t,r=n?[{...i},n]:[t,null];e(...r)};let i=t,r=n(i);return\"function\"==typeof e?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),i=e,r=n(i),this.client.addContextHandler(r)):this.client.addContextHandler(r,null===e?void 0:e)}async findIntent(e,n,i){this.wire.sendAction(\"fdc3-find-intent\").catch((e=>{}));try{return await this.client.getInfoForIntent({name:e,context:n,metadata:{resultType:i}})}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntent?\"ResolverUnavailable\":e.message;throw new Error(n)}}async findIntentsByContext(e,i){this.wire.sendAction(\"fdc3-find-intents-by-context\").catch((e=>{}));const r=i?{context:e,metadata:{resultType:i}}:e;try{return await n.InteropClient.ferryFdc3Call(this.client,\"fdc3v2FindIntentsByContext\",r)}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntentsByContext?\"ResolverUnavailable\":e.message;throw new Error(n)}}async raiseIntent(e,n,r){this.wire.sendAction(\"fdc3-raise-intent\").catch((e=>{}));try{return\"string\"==typeof r&&console.warn(\"Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).\"),(0,i.getIntentResolution)(this.client,n,r,e)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?\"ResolverUnavailable\":e.message;throw new Error(n)}}async raiseIntentForContext(e,n){this.wire.sendAction(\"fdc3-raise-intent-for-context\").catch((e=>{}));try{return\"string\"==typeof n&&console.warn(\"Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).\"),(0,i.getIntentResolution)(this.client,e,n)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?\"ResolverUnavailable\":e.message;throw new Error(n)}}async addIntentListener(e,t){if(this.wire.sendAction(\"fdc3-add-intent-listener\").catch((e=>{})),\"string\"!=typeof e)throw new Error(\"First argument must be an Intent name\");return this.client.registerIntentHandler((async e=>{let n,i;const{context:r,metadata:o}=e,{contextMetadata:s,metadata:a,...c}=r,d=o?.intentResolutionResultId||a?.intentResolutionResultId;try{const e=a?{metadata:a,...c}:{...c};n=await t(e,s),i=n}catch(e){n=e,i={error:!0}}if(d&&this.fin.InterApplicationBus.publish(d,i).catch((()=>null)),n instanceof Error)throw new Error(n.message);return n}),e,{fdc3Version:\"2.0\"})}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}async createPrivateChannel(){const e=(0,t.generateId)();await n.InteropClient.ferryFdc3Call(this.client,\"createPrivateChannelProvider\",{channelId:e});const o=await this.fin.InterApplicationBus.Channel.connect(e),s=new r.PrivateChannelClient(o,e);return(0,i.buildPrivateChannelObject)(s)}async getUserChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:\"user\",...(0,i.getUnsupportedChannelApis)(\"User\")})))}async getSystemChannels(){return console.warn(\"This API has been deprecated. Please use fdc3.getUserChannels instead.\"),super.getSystemChannels()}async joinUserChannel(e){return super.joinChannel(e)}async joinChannel(e){return console.warn(\"This API has been deprecated. Please use fdc3.joinUserChannel instead.\"),super.joinChannel(e)}async getCurrentChannel(){const e=await super.getCurrentChannel();return e?{...e,type:\"user\",broadcast:this.broadcast.bind(this)}:null}async getInfo(){return n.InteropClient.ferryFdc3Call(this.client,\"fdc3v2GetInfo\",{fdc3Version:\"2.0\"})}}return pr.Fdc3Module2=o,pr}(),l=Hi;let u=class extends o.Base{constructor(i,r){super(i),e.set(this,void 0),t.set(this,void 0),n(this,t,new Map,\"f\"),n(this,e,r,\"f\")}async setContext(t){this.wire.sendAction(\"interop-client-set-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"setContext\",{context:t})}async addContextHandler(t,n){if(this.wire.sendAction(\"interop-client-add-context-handler\").catch((e=>{})),\"function\"!=typeof t)throw new Error(\"Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.\");const r=await i(this,e,\"f\");let o;o=n?`invokeContextHandler-${n}-${(0,l.generateId)()}`:\"invokeContextHandler\";const s=(0,l.wrapContextHandler)(t,o);return r.register(o,s),await r.dispatch(\"contextHandlerRegistered\",{handlerId:o,contextType:n}),{unsubscribe:async()=>{r.remove(o),await r.dispatch(\"removeContextHandler\",{handlerId:o})}}}async getContextGroups(){this.wire.sendAction(\"interop-client-get-context-groups\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getContextGroups\")}async joinContextGroup(t,n){this.wire.sendAction(\"interop-client-join-context-group\").catch((e=>{}));const r=await i(this,e,\"f\");if(!t)throw new Error(\"No contextGroupId specified for joinContextGroup.\");return r.dispatch(\"joinContextGroup\",{contextGroupId:t,target:n})}async removeFromContextGroup(t){this.wire.sendAction(\"interop-client-remove-from-context-group\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"removeFromContextGroup\",{target:t})}async getAllClientsInContextGroup(t){this.wire.sendAction(\"interop-client-get-all-clients-in-context-group\").catch((e=>{}));const n=await i(this,e,\"f\");if(!t)throw new Error(\"No contextGroupId specified for getAllClientsInContextGroup.\");return n.dispatch(\"getAllClientsInContextGroup\",{contextGroupId:t})}async getInfoForContextGroup(t){this.wire.sendAction(\"interop-client-get-info-for-context-group\").catch((e=>{}));const n=await i(this,e,\"f\");if(!t)throw new Error(\"No contextGroupId specified for getInfoForContextGroup.\");return n.dispatch(\"getInfoForContextGroup\",{contextGroupId:t})}async fireIntent(t){this.wire.sendAction(\"interop-client-fire-intent\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"fireIntent\",t)}async registerIntentHandler(t,n,r){this.wire.sendAction(\"interop-client-register-intent-handler\").catch((e=>{}));const o=await i(this,e,\"f\"),s=`intent-handler-${n}`,a=(0,l.wrapIntentHandler)(t,s);try{await o.register(s,a),await o.dispatch(\"intentHandlerRegistered\",{handlerId:s,...r})}catch(e){throw new Error(\"Unable to register intent handler\")}return{unsubscribe:async()=>{o.remove(s)}}}async getCurrentContext(t){this.wire.sendAction(\"interop-client-get-current-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getCurrentContext\",{contextType:t})}async getInfoForIntent(t){this.wire.sendAction(\"interop-client-get-info-for-intent\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getInfoForIntent\",t)}async getInfoForIntentsByContext(t){this.wire.sendAction(\"interop-client-get-info-for-intents-by-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getInfoForIntentsByContext\",t)}async fireIntentForContext(t){this.wire.sendAction(\"interop-client-fire-intent-for-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"fireIntentForContext\",t)}async joinSessionContextGroup(n){try{const r=i(this,t,\"f\").get(n);if(r)return r.getUserInstance();const o=await i(this,e,\"f\"),{hasConflict:s}=await o.dispatch(\"sessionContextGroup:createIfNeeded\",{sessionContextGroupId:n});s&&console.warn(`A (non-session) context group with the name \"${n}\" already exists. If you are trying to join a Context Group, call joinContextGroup instead.`);const c=new a.default(this.wire,i(this,e,\"f\"),n);return i(this,t,\"f\").set(n,c),c.getUserInstance()}catch(e){throw console.error(`Error thrown trying to create Session Context Group with id \"${n}\": ${e}`),e}}async onDisconnection(t){this.wire.sendAction(\"interop-client-add-ondisconnection-listener\").catch((e=>{}));return(await i(this,e,\"f\")).onDisconnection((e=>{const{uuid:n}=e;t({type:\"interop-broker\",topic:\"disconnected\",brokerName:n})}))}getFDC3Sync(e){switch(e){case\"1.2\":return new c.Fdc3Module((()=>this),this.wire);case\"2.0\":return new h.Fdc3Module2((()=>this),this.wire);default:throw new Error(`Invalid FDC3 version provided: ${e}. Must be '1.2' or '2.0'`)}}async getFDC3(e){return this.getFDC3Sync(e)}static async ferryFdc3Call(t,n,r){return(await i(t,e,\"f\")).dispatch(n,r||null)}};return Ki.InteropClient=u,e=new WeakMap,t=new WeakMap,Ki}var yr,fr,gr,mr={};function vr(){if(yr)return mr;yr=1,Object.defineProperty(mr,\"__esModule\",{value:!0}),mr.overrideCheck=mr.checkFDC32Overrides=mr.getDefaultViewFdc3VersionFromAppInfo=void 0;const e=Vi();function t(t){return[\"fdc3HandleFindInstances\",\"handleInfoForIntent\",\"handleInfoForIntentsByContext\",\"fdc3HandleGetAppMetadata\",\"fdc3HandleGetInfo\",\"fdc3HandleOpen\",\"handleFiredIntent\",\"handleFiredIntentForContext\"].filter((n=>t[n]===e.InteropBroker.prototype[n]))}return mr.getDefaultViewFdc3VersionFromAppInfo=function({manifest:e,initialOptions:t}){const n=e?.platform?.defaultViewOptions?.fdc3InteropApi??t.defaultViewOptions?.fdc3InteropApi;return[\"1.2\",\"2.0\"].includes(n??\"\")?n:void 0},mr.checkFDC32Overrides=t,mr.overrideCheck=function(e,n){if(n&&\"2.0\"===n){const n=t(e);n.length>0&&console.warn(`WARNING: FDC3 2.0 has been set as a default option for Views in this Platform, but the required InteropBroker APIs for FDC3 2.0 compliance have not all been overridden.\\nThe following APIs need to be overridden:\\n${n.join(\"\\n\")}`)}},mr}function Cr(){return gr||(gr=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),i=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),i(function(){if(fr)return Ti;fr=1;var e=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ti,\"__esModule\",{value:!0}),Ti.InteropModule=void 0;const t=e(n),i=$i,r=d,o=Vi(),a=wr(),c=vr(),h=Tn,l=e=>new e,u=\"You have attempted to use or modify InteropBroker parameters, which is not allowed. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.\";class p extends r.Base{async init(e,n=l){this.wire.sendAction(\"interop-init\").catch((()=>{}));const r=await this.wire.environment.getInteropInfo(this.wire.getFin()),s=(0,i.createUnusableObject)(u),a=(0,i.createWarningObject)(u,(0,t.default)(r)),d=async()=>{throw new Error(u)},p=o.InteropBroker.createClosedConstructor(this.wire,(()=>this.fin.InterApplicationBus.Channel.create(`interop-broker-${e}`)),r);let w;return w=Array.isArray(n)?new((0,h.overrideFromComposables)(...n)(p))(s,d,a):await n(p,s,d,a),(0,c.overrideCheck)(w,r.fdc3Version),w}connectSync(e,t){return this.wire.sendAction(\"interop-connect-sync\").catch((()=>{})),new a.InteropClient(this.wire,this.wire.environment.whenReady().then((()=>this.fin.InterApplicationBus.Channel.connect(`interop-broker-${e}`,{payload:t}))))}}return Ti.InteropModule=p,Ti}(),e),i(wr(),e),i(Vi(),e)}(Li)),Li}var br={},Ir={},Er={},xr={};Object.defineProperty(xr,\"__esModule\",{value:!0}),xr.getSnapshotSourceChannelName=void 0;xr.getSnapshotSourceChannelName=e=>`snapshot-source-provider-${e.uuid}`;var Ar,Pr,Mr,_r,Or,Sr=s&&s.__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},Rr=s&&s.__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)};Object.defineProperty(Er,\"__esModule\",{value:!0}),Er.SnapshotSource=void 0;const Fr=d,jr=xr,kr=new Map;class Lr extends Fr.Base{constructor(e,t){super(e),Ar.set(this,void 0),Pr.set(this,(()=>(kr.has(this.identity.uuid)||kr.set(this.identity.uuid,{eventFired:null,clientPromise:null}),kr.get(this.identity.uuid)))),Mr.set(this,(()=>(Rr(this,Pr,\"f\").call(this).clientPromise||(Rr(this,Pr,\"f\").call(this).clientPromise=Rr(this,_r,\"f\").call(this)),Rr(this,Pr,\"f\").call(this).clientPromise))),_r.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);try{Rr(this,Pr,\"f\").call(this).eventFired||await Rr(this,Or,\"f\").call(this);const t=await this.fin.InterApplicationBus.Channel.connect(e,{wait:!1});return t.onDisconnection((()=>{Rr(this,Pr,\"f\").call(this).clientPromise=null,Rr(this,Pr,\"f\").call(this).eventFired=null})),t}catch(e){throw Rr(this,Pr,\"f\").call(this).clientPromise=null,new Error(\"The targeted SnapshotSource is not currently initialized. Await this object's ready() method.\")}})),Or.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);let t,n;const i=new Promise(((e,i)=>{t=e,n=i}));Rr(this,Pr,\"f\").call(this).eventFired=i;const r=async i=>{try{i.channelName===e&&(t(),await this.fin.InterApplicationBus.Channel.removeListener(\"connected\",r))}catch(e){n(e)}};await this.fin.InterApplicationBus.Channel.on(\"connected\",r)})),Sr(this,Ar,t,\"f\")}get identity(){return Rr(this,Ar,\"f\")}async ready(){this.wire.sendAction(\"snapshot-source-ready\").catch((e=>{}));try{await Rr(this,Mr,\"f\").call(this)}catch(e){await Rr(this,Pr,\"f\").call(this).eventFired}}async getSnapshot(){this.wire.sendAction(\"snapshot-source-get-snapshot\").catch((e=>{}));const e=await Rr(this,Mr,\"f\").call(this),t=await e.dispatch(\"get-snapshot\");return(await t).snapshot}async applySnapshot(e){this.wire.sendAction(\"snapshot-source-apply-snapshot\").catch((e=>{}));return(await Rr(this,Mr,\"f\").call(this)).dispatch(\"apply-snapshot\",{snapshot:e})}}Er.SnapshotSource=Lr,Ar=new WeakMap,Pr=new WeakMap,Mr=new WeakMap,_r=new WeakMap,Or=new WeakMap,Object.defineProperty(Ir,\"__esModule\",{value:!0}),Ir.SnapshotSourceModule=void 0;const Tr=d,$r=Er,Br=xr;class Gr extends Tr.Base{async init(e){if(this.wire.sendAction(\"snapshot-source-init\").catch((e=>{})),\"object\"!=typeof e||\"function\"!=typeof e.getSnapshot||\"function\"!=typeof e.applySnapshot)throw new Error(\"you must pass in a valid SnapshotProvider\");const t=await this.fin.InterApplicationBus.Channel.create((0,Br.getSnapshotSourceChannelName)(this.fin.me));t.register(\"get-snapshot\",(async()=>({snapshot:await e.getSnapshot()}))),t.register(\"apply-snapshot\",(({snapshot:t})=>e.applySnapshot(t)))}wrapSync(e){return this.wire.sendAction(\"snapshot-source-wrap-sync\").catch((e=>{})),new $r.SnapshotSource(this.wire,e)}async wrap(e){return this.wire.sendAction(\"snapshot-source-wrap\").catch((e=>{})),this.wrapSync(e)}}Ir.SnapshotSourceModule=Gr,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Ir,e),n(Er,e)}(br),Object.defineProperty(a,\"__esModule\",{value:!0});var Wr=a.Fin=void 0;const Hr=t,Nr=c,Dr=ie(),Ur=Z(),Vr=de,zr=en,Kr=rn,qr=un,Jr=bn,Yr=J(),Zr=An,Qr=ki,Xr=Cr(),eo=br;class to extends Hr.EventEmitter{constructor(e){super(),this.wire=e,this.System=new Nr.System(e),this.Window=new Dr._WindowModule(e),this.Application=new Ur.ApplicationModule(e),this.InterApplicationBus=new Vr.InterApplicationBus(e),this.Clipboard=new zr.Clipboard(e),this.ExternalApplication=new Kr.ExternalApplicationModule(e),this.Frame=new qr._FrameModule(e),this.GlobalHotkey=new Jr.GlobalHotkey(e),this.Platform=new Zr.PlatformModule(e,this.InterApplicationBus.Channel),this.View=new Yr.ViewModule(e),this.Interop=new Xr.InteropModule(e),this.SnapshotSource=new eo.SnapshotSourceModule(e),e.registerFin(this),this.me=(0,Qr.getMe)(e),e.on(\"disconnected\",(()=>{this.emit(\"disconnected\")}))}}Wr=a.Fin=to;var no={},io={};function ro(e){return\"string\"==typeof e.manifestUrl}function oo(e){return ao(e)&&\"string\"==typeof e.address}function so(e){return oo(e)&&\"string\"==typeof e.token}function ao(e){return\"string\"==typeof e.uuid}function co(e){return e.runtime&&\"string\"==typeof e.runtime.version}function ho(e){return ao(e)&&co(e)}Object.defineProperty(io,\"__esModule\",{value:!0}),io.isInternalConnectConfig=io.isPortDiscoveryConfig=io.isNewConnectConfig=io.isConfigWithReceiver=io.isRemoteConfig=io.isExistingConnectConfig=io.isExternalConfig=void 0,io.isExternalConfig=ro,io.isExistingConnectConfig=oo,io.isRemoteConfig=so,io.isConfigWithReceiver=function(e){return\"object\"==typeof e.receiver&&so({...e,address:\"\"})},io.isNewConnectConfig=ho,io.isPortDiscoveryConfig=function(e){return ro(e)&&co(e)||ho(e)},io.isInternalConnectConfig=function(e){return oo(e)||ho(e)};var lo={},uo={};Object.defineProperty(uo,\"__esModule\",{value:!0}),uo.EmitterMap=void 0;const po=t;function wo(e){return Buffer.from(e).toString(\"base64\")}uo.EmitterMap=class{constructor(){this.storage=new Map}hashKeys(e){return e.map(wo).join(\"/\")}getOrCreate(e){const t=this.hashKeys(e);return this.storage.has(t)||this.storage.set(t,new po.EventEmitter),this.storage.get(t)}has(e){return this.storage.has(this.hashKeys(e))}delete(e){const t=this.hashKeys(e);return this.storage.delete(t)}},Object.defineProperty(lo,\"__esModule\",{value:!0});const yo=uo;class fo extends yo.EmitterMap{constructor(){super(...arguments),this.dispatchEvent=e=>{if(function(e){return\"process-desktop-event\"===e.action}(e)){const{payload:t}=e,n=function(e){const{topic:t}=e;if(\"frame\"===t||\"window\"===t||\"view\"===t){const{uuid:n,name:i}=e;return[t,n,i]}if(\"application\"===t){const{uuid:n}=e;return[t,n]}return[t]}(t);if(this.has(n))return this.getOrCreate(n).emit(t.type,t),!0}return!1}}}lo.default=fo;var go,mo,vo=s&&s.__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},Co=s&&s.__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)},bo=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(no,\"__esModule\",{value:!0});var Io=no.Transport=void 0;const Eo=t,xo=io,Ao=g,Po=bo(lo),Mo=ki,_o=ke;class Oo extends Eo.EventEmitter{constructor(e,t,n){super(),this.wireListeners=new Map,this.topicRefMap=new Map,this.eventAggregator=new Po.default,this.messageHandlers=[this.eventAggregator.dispatchEvent],go.set(this,void 0),mo.set(this,void 0),this.connectSync=()=>{Co(this,go,\"f\").connectSync()},this.getPort=()=>Co(this,go,\"f\").getPort(),vo(this,go,new e(this.onmessage.bind(this)),\"f\"),this.environment=t,this.sendRaw=Co(this,go,\"f\").send.bind(Co(this,go,\"f\")),this.registerMessageHandler(this.handleMessage.bind(this)),Co(this,go,\"f\").on(\"disconnected\",(()=>{for(const[,{handleNack:e}]of this.wireListeners)e({reason:\"Remote connection has closed\"});this.wireListeners.clear(),this.emit(\"disconnected\")}));const{uuid:i,name:r}=n,o=this.environment.getCurrentEntityType();this.me=(0,Mo.getBaseMe)(o,i,r)}getFin(){if(!Co(this,mo,\"f\"))throw new Error(\"No Fin object registered for this transport\");return Co(this,mo,\"f\")}registerFin(e){if(Co(this,mo,\"f\"))throw new Error(\"Fin object has already been registered for this transport\");vo(this,mo,e,\"f\")}shutdown(){return Co(this,go,\"f\").shutdown()}async connect(e){if((0,xo.isConfigWithReceiver)(e))return await Co(this,go,\"f\").connect(e.receiver),this.authorize(e);if((0,xo.isRemoteConfig)(e))return this.connectRemote(e);if((0,xo.isExistingConnectConfig)(e))return this.connectByPort(e);if((0,xo.isNewConnectConfig)(e)){const t=await this.environment.retrievePort(e);return this.connectByPort({...e,address:`ws://localhost:${t}`})}}async connectRemote(e){return await Co(this,go,\"f\").connect(new(this.environment.getWsConstructor())(e.address)),this.authorize(e)}async connectByPort(e){const{address:t,uuid:n}=e,i={...e,type:\"file-token\"},r=Co(this,go,\"f\");await r.connect(new(this.environment.getWsConstructor())(e.address));const o=await this.sendAction(\"request-external-authorization\",{uuid:n,type:\"file-token\"},!0);if(\"external-authorization-response\"!==o.action)throw new Ao.UnexpectedActionError(o.action);return await this.environment.writeToken(o.payload.file,o.payload.token),this.authorize(i)}async authorize(e){const t=await this.sendAction(\"request-authorization\",e,!0);if(\"authorization-response\"!==t.action)throw new Ao.UnexpectedActionError(t.action);if(!0!==t.payload.success)throw new Ao.RuntimeError(t.payload)}sendAction(e,t={},n=!1){let i=()=>{};const r=Ao.RuntimeError.getCallSite(1),o=this.environment.getNextMessageId(),s=new Promise(((s,a)=>{i=a;const c={action:e,payload:t,messageId:o},d=Co(this,go,\"f\");return this.addWireListener(o,s,(e=>this.nackHandler(e,a,r)),n),d.send(c).catch(a)}));return Object.assign(s,{cancel:i,messageId:o})}nackHandler(e,t,n){t(\"string\"==typeof e?e:new Ao.RuntimeError(e,n))}ferryAction(e){return new Promise(((t,n)=>{const i=this.environment.getNextMessageId();e.messageId=i;const r=e=>{t(e.payload)};return Co(this,go,\"f\").send(e).then((()=>this.addWireListener(i,r,(e=>this.nackHandler(e,n)),!1))).catch(n)}))}registerMessageHandler(e){this.messageHandlers.push(e)}addWireListener(e,t,n,i){i?this.uncorrelatedListener=t:this.wireListeners.has(e)?n({reason:\"Duplicate handler id\",error:(0,_o.errorToPOJO)(new Ao.DuplicateCorrelationError(String(e)))}):this.wireListeners.set(e,{resolve:t,handleNack:n})}onmessage(e){for(const t of this.messageHandlers)t.call(null,e)}handleMessage(e){const t=e.correlationId||NaN;if(\"correlationId\"in e){if(!this.wireListeners.has(t))return!1;{const{resolve:n,handleNack:i}=this.wireListeners.get(t);\"ack\"!==e.action?i({reason:\"Did not receive ack action\",error:(0,_o.errorToPOJO)(new Ao.NoAckError(e.action))}):\"payload\"in e?e.payload.success?n.call(null,e):i(e.payload):\"string\"==typeof e.reason?i(e):(console.warn(\"Received invalid response from core\",e),i({reason:\"invalid response shape\"})),this.wireListeners.delete(t)}}else this.uncorrelatedListener&&this.uncorrelatedListener.call(null,e),this.uncorrelatedListener=()=>{};return!0}}Io=no.Transport=Oo,go=new WeakMap,mo=new WeakMap;const So=(...e)=>({log:(...t)=>console.debug(`[${(new Date).toISOString()}]`,...(e=>e.map((e=>`[${e}]`)))(e),...t),getLogger:(...t)=>So(...e,...t)}),Ro=So(\"@openfin/core-web/client\");function Fo(e,t){if(!function(e){return\"string\"==typeof e}(e))throw new Error(`Property ${t} has invalid type. Expected string, got ${typeof e}.`)}const jo=\"web-broker-ports-ready\",ko=Ro.getLogger(\"get-web-interop-ports\");function Lo(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)}function To(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}\"function\"==typeof SuppressedError&&SuppressedError;const $o=e=>{var n,i,r;return r=class extends t.EventEmitter{constructor(t){super(),n.set(this,void 0),i.set(this,!1),this.connectSync=()=>{Lo(this,i,\"f\")||(e.addEventListener(\"message\",(e=>{e.data?.topic?.startsWith(\"wire-message\")&&e.data.message&&Lo(this,n,\"f\").call(this,{...JSON.parse(e.data.message),ports:e.ports})})),e.start())},this.connect=async()=>{this.connectSync()},this.send=t=>(e.postMessage({topic:\"wire-message\",message:JSON.stringify(t)}),Promise.resolve()),this.shutdown=async()=>{e.close()},To(this,n,t,\"f\")}getPort(){return e}},n=new WeakMap,i=new WeakMap,r};var Bo={},Go={};Object.defineProperty(Go,\"__esModule\",{value:!0}),Go.BaseEnvironment=void 0;const Wo=vr();Go.BaseEnvironment=class{async getViewWindowIdentity(e,t){const{identity:n}=await e.View.wrapSync(t).getCurrentWindow();return n}async getInteropInfo(e){const t=await e.Application.getCurrentSync().getInfo().catch((()=>null)),n=t?.initialOptions?.interopBrokerConfiguration??{};return{fdc3Version:t?(0,Wo.getDefaultViewFdc3VersionFromAppInfo)(t):void 0,...n,fdc3Info:{providerVersion:await e.System.getVersion(),provider:\"OpenFin\"}}}},Object.defineProperty(Bo,\"__esModule\",{value:!0});var Ho=Bo.BrowserEnvironment=void 0;const No=Go;class Do extends No.BaseEnvironment{constructor(){super(...arguments),this.type=\"other\",this.getRandomId=()=>{const e=new Uint32Array(1);return window.crypto.getRandomValues(e)[0].toString(32)}}getAdapterVersionSync(){return\"\"}observeBounds(e,t){throw new Error(\"Method not implemented.\")}layoutAllowedInContext(e){return!1}initLayoutManager(e,t,n){throw new Error(\"Method not implemented.\")}applyLayoutSnapshot(e,t,n){throw new Error(\"Method not implemented.\")}createLayout(e,t){throw new Error(\"Method not implemented.\")}destroyLayout(e,t){throw new Error(\"Method not implemented.\")}resolveLayout(e,t){throw new Error(\"Method not implemented.\")}initPlatform(...e){throw new Error(\"Method not implemented.\")}writeToken(e,t){return Promise.resolve(\"\")}retrievePort(e){throw new Error(\"Method not implemented.\")}getNextMessageId(){return this.getRandomId()}createChildContent(e){throw new Error(\"Method not implemented.\")}getWebWindow(e){throw new Error(\"Method not implemented.\")}getCurrentEntityIdentity(){throw new Error(\"Method not implemented.\")}getCurrentEntityType(){return\"external connection\"}raiseEvent(e,t){throw new Error(\"Method not implemented.\")}getUrl(){return location.href}getDefaultChannelOptions(){return{create:{},connect:{}}}getRtcPeer(){return new RTCPeerConnection}getWsConstructor(){return WebSocket}whenReady(){return Promise.resolve()}}Ho=Bo.BrowserEnvironment=Do;const Uo=e=>\"platform\"in e&&void 0!==e.platform;var Vo,zo;class Ko extends Ho{constructor(e){super(),this.connectConfig=e,Vo.set(this,void 0),zo.set(this,new W((async()=>Promise.resolve().then((function(){return require(\"./main-b14f67c9.js\")}))))),Uo(e)&&this.validatePlatformOptions(e)}getAdapterVersionSync(){return\"0.39.21\"}validatePlatformOptions({platform:e}){if(!(\"layoutSnapshot\"in e))throw new Error(\"Platform options are missing layoutSnapshot. Please provide a layoutSnapshot in the platform options.\");if(\"windows\"in e||\"windows\"in e.layoutSnapshot)throw new Error(\"It appears you tried to call connect() with a snapshot object from an OpenFin desktop environment. Note that connect() expects to be called with a platform property with this structure: { platform: { layoutSnapshot } }. To get a layoutSnapshot of the expected structure, use fin.Platform.Layout.getCurrentLayoutManagerSync().getLayoutSnapshot() in v34+ in your desktop environment.\");const{layouts:t}=e.layoutSnapshot;Object.entries(t).map((([e,t])=>{if(\"object\"!=typeof t||null===t)throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must be an object.`);if(!(\"content\"in t))throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must contain a 'content' property.`)}))}async getInteropInfo(e){return{...{contextGroups:void 0,logging:{beforeAction:{enabled:!1},afterAction:{enabled:!1}}},fdc3Version:void 0,fdc3Info:{providerVersion:\"0.39.21\",provider:\"OpenFin Web\"}}}layoutAllowedInContext(e){return!0}async initLayoutManager(e,t,n){if(Lo(this,Vo,\"f\"))throw new Error(\"Layout already initialized.\");if(!Uo(this.connectConfig))throw new Error(\"Platform options are missing from connection config.\");const{WebLayoutEntryPoint:i}=await Lo(this,zo,\"f\").getValue();return To(this,Vo,new i(this.connectConfig),\"f\"),await Lo(this,Vo,\"f\").initLayoutManager(e,t,n)}async applyLayoutSnapshot(e,t,n){Lo(this,Vo,\"f\")?.applyLayoutSnapshot(e,t,n)}async createLayout(e,t){return Lo(this,Vo,\"f\")?.createLayout(e,t)}async destroyLayout(e,t){return Lo(this,Vo,\"f\")?.destroyLayout(e,t)}async getViewWindowIdentity(e,t){return Promise.resolve({uuid:t.uuid,name:t.uuid})}}Vo=new WeakMap,zo=new WeakMap;const qo=()=>{const e=((e,t)=>{const n=new RegExp(`^${t}<(?.*)>$`).exec(e)?.groups?.meta;if(n)try{return JSON.parse(atob(n))}catch(e){throw new Error(`Failed to decode JSON from ${n}.`)}})(window.name,\"of-frame\");if(e)try{const{name:t,uuid:n,brokerUrl:i,providerId:r,contextGroup:o}=e;return Fo(i,\"brokerUrl\"),Fo(n,\"uuid\"),Fo(t,\"name\"),{identity:{name:t,uuid:n},brokerUrl:i,interopConfig:{providerId:r,currentContextGroup:o}}}catch(e){throw new Error(`Unexpected error occurred when inferring platform information: ${e.stack}`)}},Jo=()=>{const e=r.v4();return{uuid:e,name:e}},Yo=async e=>{if(\"enabled\"===e.connectionInheritance){const t=await(async e=>{const t=qo();if(t){const{validateOptions:n=(()=>!0)}=e,{identity:i,...r}=t;if(!await n(r))throw new Error(\"Parent options were rejected by validateOptions.\");return t}})(e);if(t)return t}if(!e.options){const t=\"enabled\"===e.connectionInheritance?\"Broker URL was not specified nor provided by a platform container.\":\"Connection inheritance is disabled but no options were provided.\";throw new Error(t)}return{...e.options,identity:Jo()}};exports.__classPrivateFieldGet=Lo,exports.__classPrivateFieldSet=To,exports.apiExposer=Gn,exports.commonjsGlobal=s,exports.connect=async t=>{try{Ro.log(\"Establishing connection\",t);const{brokerUrl:n,identity:i,timeout:r,interopConfig:s}=await Yo(t),{workerPort:a,iframeBrokerPort:c}=await(async(e,t,n)=>{const{origin:i}=new URL(e),r=document.createElement(\"IFRAME\");let s;r.style.display=\"none\";try{return await new Promise(((a,c)=>{const d=e=>{if(e.source===r.contentWindow&&e.data?.topic===`ack-${jo}`){if(e.origin!==i)c(new Error(`Broker redirected to unexpected origin ${e.origin}, expected ${i}.`));else if(e.data.success){const[t,n]=e.ports;a({iframeBrokerPort:t,workerPort:n})}else c(new m(e.data));window.removeEventListener(\"message\",d),clearTimeout(s)}};window.addEventListener(\"message\",d),ko.log(`Connecting to broker ${e}`),r.setAttribute(\"src\",e),r.setAttribute(\"name\",o(t,\"of-broker\")),document.body.appendChild(r),ko.log(\"Iframe loaded, awaiting init message from iframe\"),n&&(s=setTimeout((()=>{window.removeEventListener(\"message\",d),document.body.removeChild(r),c(new Error(\"Worker did not initialize in time\"))}),n))}))}catch(e){throw new Error(`Failed to initialise Fin Web Client. ${e.message}`,{cause:e})}})(n,i,r);Ro.log(\"Successfully established connection to shared worker\");const d={entityType:\"external connection\",...i};a.start(),c.start();const h=((t,n,i)=>{const r=$o(n),o=new Ko(t),s=new Io(r,o,i);return s.connectSync(),window.Buffer=e.Buffer,new Wr(s)})(t,a,d);return s?.providerId&&(h.me.interop=h.Interop.connectSync(s.providerId),s?.currentContextGroup&&h.me.interop.joinContextGroup(s.currentContextGroup).catch((e=>{console.warn(`Error joining specified context group: ${s?.currentContextGroup}, continuing`,e)}))),{...h,me:{...h.me,identity:{uuid:h.me.uuid,name:h.me.name}}}}catch(e){throw new Error(`An error occured during web-interop connection: ${e.message}`)}},exports.decorators=Nn,exports.encodeOptions=o,exports.layout_constants=ai,exports.lazy=G;\n","\"use strict\";var t=require(\"./main-8cad4070.js\"),e=require(\"uuid\");require(\"buffer/\"),require(\"events\"),require(\"lodash/cloneDeep\"),require(\"lodash/isEqual\");var i={},n={};Object.defineProperty(n,\"__esModule\",{value:!0}),n.mapValuesAsync=n.mapEntriesAsync=void 0;const o=(t,[e,i])=>({...t,[e]:i});async function s(t,e){return(await Promise.all(e.map((async([e,i])=>[e,await t(i,e)])))).reduce(o,{})}n.mapEntriesAsync=s,n.mapValuesAsync=async function(t,e){let i;return i=e instanceof Map?[...e.entries()]:Object.entries(e),s(t,i)};var r,a,l,h,d=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldSet||function(t,e,i,n,o){if(\"m\"===n)throw new TypeError(\"Private method is not writable\");if(\"a\"===n&&!o)throw new TypeError(\"Private accessor was defined without a setter\");if(\"function\"==typeof e?t!==e||!o:!e.has(t))throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");return\"a\"===n?o.call(t,i):o?o.value=i:e.set(t,i),i},c=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldGet||function(t,e,i,n){if(\"a\"===i&&!n)throw new TypeError(\"Private accessor was defined without a getter\");if(\"function\"==typeof e?t!==e||!n:!e.has(t))throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");return\"m\"===i?n:\"a\"===i?n.call(t):n?n.value:e.get(t)};Object.defineProperty(i,\"__esModule\",{value:!0});var m=i.DefaultLayoutManager=void 0;const u=n;class p{constructor(t){a.set(this,void 0),l.set(this,new Map),d(this,a,t,\"f\")}size(){return c(this,l,\"f\").size}async applyLayoutSnapshot({layouts:t}){if(Object.keys(t).length>1)throw new Error(\"[LayoutManager] Tried to call applyLayoutSnapshot with more than 1 layout. When implementing multiple layouts via overridden LayoutManager class, you must override and fully implement the applyLayoutSnapshot method without calling super.applyLayoutSnapshot().\");const[[e,i]]=Object.entries(t);await p.createLayout(this,{layoutName:e,layout:i})}async showLayout({layoutName:t}){}async getLayoutSnapshot(){return{layouts:await(0,u.mapValuesAsync)((t=>t.getFrameSnapshot()),c(this,l,\"f\"))}}async removeLayout({layoutName:t}){}getLayoutIdentityForView(t){const e=[...c(this,l,\"f\").values()].find((e=>e.getCurrentViews().some((e=>e.name===t.name&&e.uuid===t.uuid))));return e?.identity??void 0}isLayoutVisible({layoutName:t}){return c(p,r,\"m\",h).call(p,this,t).isVisible()}resolveLayoutIdentity(t){if(t&&\"layoutName\"in t)return t;const e=[...c(this,l,\"f\").values()];if(1===e.length)return e[0].identity;const i=e.find((t=>t.isVisible()));return i?.identity??void 0}static async resolveLayout(t,e){const i=t.resolveLayoutIdentity(e);if(void 0===i||!(\"layoutName\"in i))throw new Error(\"[layout-manager] resolveLayout: Could not resolve the layout identity. Make sure you include 'layoutName' in the identity object.\");return c(p,r,\"m\",h).call(p,t,i.layoutName)}static async handleSharedView(t,e,i){await(0,u.mapValuesAsync)((async t=>{if(t.identity.layoutName!==e.layoutName){const e=t.getCurrentViews().find((t=>t.name===i.name));e&&await t.onViewDetached({viewIdentity:e,target:null}).catch(console.error)}}),c(t,l,\"f\"))}static async handleLastViewRemoved(t,e){await t.removeLayout(e),await c(t,a,\"f\").handleLastViewRemoved(t)}static async destroyLayout(t,{layoutName:e}){await c(p,r,\"m\",h).call(p,t,e).destroy(),c(t,l,\"f\").delete(e)}static async createLayout(t,e){const{layoutName:i}=e;if(c(t,l,\"f\").has(i))throw new Error(`Layout name ${i} already exists`);await c(t,a,\"f\").createLayout(e,t)}static registerLayout(t,e,i){c(t,l,\"f\").set(e,i)}static getAllLayouts(t){return[...c(t,l,\"f\").values()]}static setInitialSnapshot(t,e){c(t,a,\"f\").setInitialSnapshot(e)}static createClosedConstructor(...t){return class extends p{constructor(){super(...t)}}}}m=i.DefaultLayoutManager=p,r=p,a=new WeakMap,l=new WeakMap,h=function(t,e){const i=c(t,l,\"f\").get(e);if(!i)throw new Error(`[layout-manager] getLayoutByName: Could not locate layout with name '${e}'`);return i};var g={},f={},v={};Object.defineProperty(v,\"__esModule\",{value:!0}),v.ReversibleMap=void 0;v.ReversibleMap=class{constructor(){this.valueToKey=new Map,this.keyToValue=new Map,this.setUnique=(t,e)=>{if(this.hasKey(t)||this.hasValue(e))throw new Error(\"Key or value already in the map.\");this.keyToValue.set(t,e),this.valueToKey.set(e,t)},this.getKey=t=>{const e=this.valueToKey.get(t);if(!e)throw new Error(\"Value not found in the map.\");return e},this.deleteKey=t=>{const e=this.getValue(t);return this.keyToValue.delete(t),this.valueToKey.delete(e),e},this.deleteValue=t=>{const e=this.getKey(t);return this.keyToValue.delete(e),this.valueToKey.delete(t),e},this.hasKey=t=>this.keyToValue.has(t),this.hasValue=t=>this.valueToKey.has(t)}getValue(t){const e=this.keyToValue.get(t);if(!e)throw new Error(\"Key not found in the map.\");return e}},Object.defineProperty(f,\"__esModule\",{value:!0});var _=f.LayoutContentCache=void 0;const y=t.lazy,C=v;class w{constructor(){this.contentItemCache=new C.ReversibleMap,this.contentItemCacheId=0,this.createCacheKey=()=>{const t=`entity-${this.contentItemCacheId.toString()}`;return this.contentItemCacheId+=1,t},this.hasKey=t=>this.contentItemCache.hasKey(t),this.getItemOrUndefined=t=>{try{return this.getContentItemOrThrow(t)}catch(t){return}},this.getContentItemOrThrow=(t,e)=>{if(!this.contentItemCache.hasKey(t))throw new Error(\"Layout component has been destroyed or detached from the current layout.\");const i=this.contentItemCache.getValue(t);if(e&&!e.includes(i.type))throw new Error(`Layout item is not the expected type. Expected ${e.join(\", \")}, got ${i.type}.`);return i},this.getOrCreateEntityId=t=>{if(this.contentItemCache.hasValue(t))return this.contentItemCache.getKey(t);t.onDestroyed((()=>{this.contentItemCache.deleteValue(t)}));const e=this.createCacheKey();return this.contentItemCache.setUnique(e,t),e}}static getSingleInstance(){return w.singleton.getValue()}}_=f.LayoutContentCache=w,w.singleton=new y.Lazy((()=>new w));var I={},b={};!function(t){Object.defineProperty(t,\"__esModule\",{value:!0}),t.getAdjacentStacks=t.doShareEdge=t.getAdjacentItem=void 0;t.getAdjacentItem=(e,i)=>{const{parent:n}=e;if(e.isRoot()||!n)return;const o=[\"top\",\"bottom\"].includes(i)?\"column\":\"row\",s=[\"top\",\"left\"].includes(i)?-1:1;if(n.type===o){const t=n.contentItems.indexOf(e)+s;if(t>=0&&t{const n=t.getBounds(),o=e.getBounds();if(!n||!o)return!1;if([\"top\",\"bottom\"].includes(i)){return!(n.righto.right)}return!(n.bottomo.bottom)};t.getAdjacentStacks=(e,i)=>{const n=[\"top\",\"bottom\"].includes(i)?\"row\":\"column\",o=s=>\"stack\"===s.type?(0,t.doShareEdge)(e,s,i)?[s]:[]:\"root\"===s.type||\"ground\"===s.type?[]:s.type===n?s.contentItems.map((t=>o(t))).flat():s.type!==n?[\"top\",\"right\"].includes(i)?o(s.contentItems[s.contentItems.length-1]):o(s.contentItems[0]):[],s=(0,t.getAdjacentItem)(e,i);return s?o(s):[]}}(b);var S=t.commonjsGlobal&&t.commonjsGlobal.__decorate||function(t,e,i,n){var o,s=arguments.length,r=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if(\"object\"==typeof Reflect&&\"function\"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(s<3?o(r):s>3?o(e,i,r):o(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};Object.defineProperty(I,\"__esModule\",{value:!0}),I.LayoutEntitiesController=void 0;const E=t.decorators,x=b,L=i;class z{constructor(t,e,i){this.wire=t,this.layoutManager=e,this.layoutContentCache=i,this.analytics=t=>{this.wire.sendAction(`layout-controller-${t}`).catch((()=>{}))},this.getLayoutIdentityForViewOrThrow=async t=>{const e=this.layoutManager.getLayoutIdentityForView(t);if(!e)throw new Error(`View identity ${t.name} is not attached to any layouts.`);return e},this.getRoot=async t=>{this.analytics(\"get-root\");const e=(await this.getLayout(t)).getRoot();return{type:e.type,entityId:this.layoutContentCache.getOrCreateEntityId(e)}},this.getStackByView=async t=>{this.analytics(\"get-stack-by-view\");const e=await this.getLayoutIdentityForViewOrThrow(t),i=(await this.getLayout(e)).getStackByView(t);if(\"stack\"===i?.type)return{entityId:this.layoutContentCache.getOrCreateEntityId(i),type:\"stack\"}},this.getStackViews=t=>{this.analytics(\"get-stack-views\");return this.layoutContentCache.getContentItemOrThrow(t,[\"stack\"]).contentItems.map((t=>({name:t.viewName,uuid:this.wire.me.uuid})))},this.isRoot=t=>{this.analytics(\"is-root\");return this.layoutContentCache.getContentItemOrThrow(t).isRoot()},this.exists=t=>(this.analytics(\"exists\"),this.layoutContentCache.hasKey(t)),this.addViewToStack=async(t,e,{index:i}={index:0})=>{this.analytics(\"add-view-to-stack\");const n=this.layoutContentCache.getContentItemOrThrow(t);if(i&&i>n.contentItems.length+1)throw new Error(`Index '${i}' out of range, please exclude the index or specify a number between 0 and ${n.contentItems.length}`);const o={id:t,index:i},{identity:s}=await n.layout.platformCreateView(e,{location:o});return s},this.findViewInStack=(t,e)=>t.contentItems.find((t=>t.viewName===e.name)),this.removeViewFromStack=async(t,e)=>{this.analytics(\"remove-view-from-stack\");const i=this.layoutContentCache.getContentItemOrThrow(t,[\"stack\"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to remove a view ('${e.name}') which does not belong to the stack.`);await n.layout.platformCloseView(e)},this.createAdjacentStack=async(t,e,{position:i=\"right\"}={})=>{if(this.analytics(\"create-adjacent-stack\"),!Array.isArray(e)||0===e.length)throw new Error('The parameter \"views\" must be an array with at least 1 element.');if(![\"top\",\"bottom\",\"left\",\"right\"].includes(i))throw new Error(`Invalid position '${i}' specified.`);const n=this.layoutContentCache.getContentItemOrThrow(t).createAdjacentStack({position:i}),o=this.layoutContentCache.getOrCreateEntityId(n);return await Promise.all(e.reverse().map((t=>this.addViewToStack(o,t)))),o},this.getAdjacentStacks=async({targetId:t,edge:e})=>{this.analytics(\"get-adjacent-stacks\");const i=this.layoutContentCache.getContentItemOrThrow(t);return(0,x.getAdjacentStacks)(i,e).map((t=>({entityId:this.layoutContentCache.getOrCreateEntityId(t)})))},this.setStackActiveView=async(t,e)=>{this.analytics(\"set-stack-active-view\");const i=this.layoutContentCache.getContentItemOrThrow(t,[\"stack\"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to set a view ('${e.name}') as active when it does not belong to the stack.`);i.setActiveContentItem(n,!0)}}async getLayout(t){const e=await L.DefaultLayoutManager.resolveLayout(this.layoutManager,t);if(!e)throw new Error(`Could not resolve target layout identity ${JSON.stringify(t)}`);return e}getContent(t){this.analytics(\"get-content\");return this.layoutContentCache.getContentItemOrThrow(t,[\"column\",\"row\"]).contentItems.map((t=>({type:t.type,entityId:this.layoutContentCache.getOrCreateEntityId(t)})))}getParent(t){this.analytics(\"get-parent\");const e=this.layoutContentCache.getContentItemOrThrow(t);if(!e.isRoot())return e.parent?.contentItems.includes(e)?{type:e.parent.type,entityId:this.layoutContentCache.getOrCreateEntityId(e.parent)}:void 0}}S([(0,E.expose)()],z.prototype,\"getLayoutIdentityForViewOrThrow\",void 0),S([(0,E.expose)()],z.prototype,\"getRoot\",void 0),S([(0,E.expose)()],z.prototype,\"getStackByView\",void 0),S([(0,E.expose)()],z.prototype,\"getStackViews\",void 0),S([(0,E.expose)()],z.prototype,\"getContent\",null),S([(0,E.expose)()],z.prototype,\"getParent\",null),S([(0,E.expose)()],z.prototype,\"isRoot\",void 0),S([(0,E.expose)()],z.prototype,\"exists\",void 0),S([(0,E.expose)()],z.prototype,\"addViewToStack\",void 0),S([(0,E.expose)()],z.prototype,\"removeViewFromStack\",void 0),S([(0,E.expose)()],z.prototype,\"createAdjacentStack\",void 0),S([(0,E.expose)()],z.prototype,\"getAdjacentStacks\",void 0),S([(0,E.expose)()],z.prototype,\"setStackActiveView\",void 0),I.LayoutEntitiesController=z,Object.defineProperty(g,\"__esModule\",{value:!0});var M=g.initLayoutEndpoints=void 0;const P=t.apiExposer,T=t.layout_constants,A=f,k=I,D=i;M=g.initLayoutEndpoints=async function(t,e){const i=t.getFin(),n=await i.Platform.getCurrentSync().getClient(),o=new P.ChannelsExposer(n);await new P.ApiExposer(o).exposeInstance(new k.LayoutEntitiesController(t,e,A.LayoutContentCache.getSingleInstance()),{id:T.LAYOUT_CONTROLLER_ID}),await async function(t,e){const i=t=>async i=>{const n=await D.DefaultLayoutManager.resolveLayout(e,i.target);if(!n)throw new Error(`Could not resolve the layout target from payload ${JSON.stringify(i)}`);return t(n,i)},n=(e,n)=>{t.register(e,i(n))},o=(t,e)=>{n(t,e)};n(\"replace-view\",((t,e)=>t.replaceView(e))),n(\"replace-layout\",((t,{layout:e})=>t.replaceLayout(e))),n(\"add-view\",((t,e)=>t.insertView(e))),o(\"layout-add-view\",((t,{viewOptions:e,location:i,targetView:n})=>t.platformCreateView(e,{location:i,targetView:n}))),n(\"close-view\",((t,e)=>t.cleanupView(e.viewIdentity))),o(\"layout-close-view\",((t,e)=>t.platformCloseView(e.viewIdentity))),n(\"apply-preset-layout\",((t,e)=>t.applyPreset(e))),n(\"get-layout-views\",(t=>t.getCurrentViews())),n(\"get-frame-snapshot\",(t=>t.getFrameSnapshot())),n(\"is-visible\",(t=>t.isVisible())),n(\"destroy\",(t=>t.destroy())),t.register(\"get-layout-snapshot\",(()=>e.getLayoutSnapshot()))}(n,e)};var R={};Object.defineProperty(R,\"__esModule\",{value:!0});var U=R.BaseLayout=void 0;U=R.BaseLayout=class{};var O={};Object.defineProperty(O,\"__esModule\",{value:!0});var V=O.DOMEmitter=void 0;V=O.DOMEmitter=class{constructor(t){this.container=t}dispatchLocalEvent(t,e){const i={...e,type:t,tabSelector:`tab-${e.name}`,containerSelector:`container-${e.name}`,topic:\"openfin-DOM-event\"};this.container.dispatchEvent(new CustomEvent(t,{detail:i}))}};var B={};Object.defineProperty(B,\"__esModule\",{value:!0});var H=B.mapLayoutContentItemsImmutableSync=B.mapLayoutContentItemsImmutable=W=B.isVisible=void 0;var W=B.isVisible=t=>(0!==t.offsetWidth||0!==t.offsetHeight)&&\"hidden\"!==window.getComputedStyle(t).visibility&&t.offsetTop>=0&&t.offsetLeft>=0&&t.offsetTop<=window.innerHeight&&t.offsetLeft<=window.innerWidth;const F=t=>\"type\"in t&&\"component\"===t.type;B.mapLayoutContentItemsImmutable=async function t(e,i){return F(i)?e(i):{...i,content:await Promise.all(i.content?.map((i=>t(e,i))))}},H=B.mapLayoutContentItemsImmutableSync=function t(e,i){return F(i)?e(i):{...i,content:i.content?.map((i=>t(e,i)))}};class N extends Error{constructor(t,e){super(e),this.type=t}}class G extends N{constructor(t,e){super(\"Configuration\",t),this.node=e}}class j extends N{constructor(t){super(\"PopoutBlocked\",t)}}class $ extends N{constructor(t){super(\"API\",t)}}class Z extends N{constructor(t){super(\"Bind\",t)}}class q extends Error{constructor(t,e,i){super(`${t}: ${e}${void 0===i?\"\":\": \"+i}`)}}class X extends q{constructor(t,e){super(\"Assert\",t,e)}}class Y extends q{constructor(t,e,i){super(\"UnreachableCase\",t,`${e}${void 0===i?\"\":\": \"+i}`)}}class K extends q{constructor(t,e){super(\"UnexpectedNull\",t,e)}}class J extends q{constructor(t,e){super(\"UnexpectedUndefined\",t,e)}}var Q;!function(t){let e=!1;const i={PopoutCannotBeCreatedWithGroundItemConfig:{id:0,default:\"Popout cannot be created with ground ItemConfig\"},PleaseRegisterAConstructorFunction:{id:1,default:\"Please register a constructor function\"},ComponentTypeNotRegisteredAndBindComponentEventHandlerNotAssigned:{id:2,default:\"Component type not registered and BindComponentEvent handler not assigned\"},ComponentIsAlreadyRegistered:{id:3,default:\"Component is already registered\"},ComponentIsNotVirtuable:{id:4,default:\"Component is not virtuable. Requires rootHtmlElement field/getter\"},VirtualComponentDoesNotHaveRootHtmlElement:{id:5,default:'Virtual component does not have getter \"rootHtmlElement\"'},ItemConfigIsNotTypeComponent:{id:6,default:\"ItemConfig is not of type component\"},InvalidNumberPartInSizeString:{id:7,default:\"Invalid number part in size string\"},UnknownUnitInSizeString:{id:8,default:\"Unknown unit in size string\"},UnsupportedUnitInSizeString:{id:9,default:\"Unsupported unit in size string\"}};t.idCount=Object.keys(i).length;const n=Object.values(i);t.checkInitialise=function(){if(!e)for(let e=0;e=\"0\"&&t<=\"9\"}function Tt(t,e){const i=zt(e);t.style.width=i}function At(t,e){const i=zt(e);t.style.height=i}function kt(t){return{width:t.offsetWidth,height:t.offsetHeight}}function Dt(t,e){t.style.display=e?\"\":\"none\"}function Rt(t,e){if(void 0!==e)for(const i in e)if(e.hasOwnProperty(i)){const n=e[i],o=t[i];t[i]=Ut(o,n)}return t}function Ut(t,e){if(\"object\"!=typeof e)return e;if(Array.isArray(e)){const t=e.length,i=new Array(t);for(let n=0;n36)throw new Error(\"Too many keys in config minifier map\")},t.translateObject=n}(dt||(dt={})),function(t){t.defaults={type:at.ground,content:[],size:1,sizeUnit:ht.Fractional,minSize:void 0,minSizeUnit:ht.Pixel,id:\"\",isClosable:!0},t.createCopy=function(t,e){switch(t.type){case at.ground:case at.row:case at.column:return gt.createCopy(t,e);case at.stack:return ut.createCopy(t,e);case at.component:return pt.createCopy(t);default:throw new Y(\"CICC91354\",t.type,\"Invalid Config Item type specified\")}},t.createDefault=function(t){switch(t){case at.ground:throw new X(\"CICCDR91562\");case at.row:case at.column:return gt.createDefault(t);case at.stack:return ut.createDefault();case at.component:return pt.createDefault();default:throw new Y(\"CICCDD91563\",t,\"Invalid Config Item type specified\")}},t.isComponentItem=function(t){return t.type===at.component},t.isStackItem=function(t){return t.type===at.stack},t.isGroundItem=function(t){return t.type===at.ground}}(ct||(ct={})),function(t){t.defaultMaximised=!1,function(t){t.createCopy=function(t,e){return void 0===t?void 0:{show:null!=e?e:t.show,popout:t.popout,close:t.close,maximise:t.maximise,minimise:t.minimise,tabDropdown:t.tabDropdown}}}(t.Header||(t.Header={}))}(mt||(mt={})),function(t){function e(t){const e=t.length,i=new Array(e);for(let n=0;n\"__glMaximised\"===t));t>0&&(o=!0,n=n.splice(t,1)),e=n.length>0?n[0]:ct.defaults.id}else e=n;return i=void 0!==t.maximised?t.maximised:o,{id:e,maximised:i}}}(wt||(wt={})),function(t){function e(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0;return{resolved:!0,root:Et.resolve(i),openPopouts:t.resolveOpenPopouts(e.openPopouts),dimensions:t.Dimensions.resolve(e.dimensions),settings:t.Settings.resolve(e.settings),header:t.Header.resolve(e.header,e.settings,e.labels)}}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:Lt.fromResolvedArray(e.openPopouts),settings:_t.Settings.createCopy(e.settings),dimensions:t.Dimensions.fromResolved(e.dimensions),header:_t.Header.createCopy(e.header)}},t.isResolved=function(t){const e=t;return void 0!==e.resolved&&!0===e.resolved},t.resolveOpenPopouts=function(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0,{root:Et.resolve(o),openPopouts:xt.resolveOpenPopouts(e.openPopouts),dimensions:xt.Dimensions.resolve(e.dimensions),settings:xt.Settings.resolve(e.settings),header:xt.Header.resolve(e.header,e.settings,e.labels),parentId:null!==(i=e.parentId)&&void 0!==i?i:null,indexInParent:null!==(n=e.indexInParent)&&void 0!==n?n:null,window:t.Window.resolve(e.window,e.dimensions),resolved:!0}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:i(e.openPopouts),dimensions:xt.Dimensions.fromResolved(e.dimensions),settings:_t.Settings.createCopy(e.settings),header:_t.Header.createCopy(e.header),parentId:e.parentId,indexInParent:e.indexInParent,window:t.Window.fromResolved(e.window)}},t.fromResolvedArray=i}(Lt||(Lt={}));class Wt{constructor(){this._allEventSubscriptions=[],this._subscriptionsMap=new Map,this.unbind=this.removeEventListener,this.trigger=this.emit}tryBubbleEvent(t,e){}emit(t,...e){let i=this._subscriptionsMap.get(t);if(void 0!==i){i=i.slice();for(let t=0;t0){const n=e.slice();n.unshift(t);const o=this._allEventSubscriptions.slice();for(let t=0;t0?n.contentItems[0]:n,e=0);const o=this._layoutManager.createAndInitContentItem(i,t);t.addChild(o,e),this._layoutManager.layoutConfig.settings.popInOnClose?this._onClose():this.close()}createWindow(){const t=this.createUrl(),e=Math.floor(1e6*Math.random()).toString(36),i=this.serializeWindowFeatures({width:this._initialWindowSize.width,height:this._initialWindowSize.height,innerWidth:this._initialWindowSize.width,innerHeight:this._initialWindowSize.height,menubar:\"no\",toolbar:\"no\",location:\"no\",personalbar:\"no\",resizable:\"yes\",scrollbars:\"no\",status:\"no\"});if(this._popoutWindow=globalThis.open(t,e,i),this._popoutWindow)this._popoutWindow.addEventListener(\"load\",(()=>this.positionWindow()),{passive:!0}),this._popoutWindow.addEventListener(\"beforeunload\",(()=>{this._layoutManager.layoutConfig.settings.popInOnClose?this.popIn():this._onClose()}),{passive:!0}),this._checkReadyInterval=setInterval((()=>this.checkReady()),10);else if(!0===this._layoutManager.layoutConfig.settings.blockedPopoutsThrowError){throw new j(\"Popout blocked\")}}checkReady(){if(null===this._popoutWindow)throw new K(\"BPCR01844\");this._popoutWindow.__glInstance&&this._popoutWindow.__glInstance.isInitialised&&(this.onInitialised(),void 0!==this._checkReadyInterval&&(clearInterval(this._checkReadyInterval),this._checkReadyInterval=void 0))}serializeWindowFeatures(t){const e=[];for(const i in t)e.push(i+\"=\"+t[i].toString());return e.join(\",\")}createUrl(){const t=\"gl-window-config-\"+Ot(),e=_t.minifyConfig(this._config);try{localStorage.setItem(t,JSON.stringify(e))}catch(t){throw new Error(\"Error while writing to localStorage \"+function(t){return t instanceof Error?t.message:\"string\"==typeof t?t:\"Unknown Error\"}(t))}const i=new URL(location.href);return i.searchParams.set(\"gl-window\",t),i.toString()}positionWindow(){if(null===this._popoutWindow)throw new Error(\"BrowserPopout.positionWindow: null popoutWindow\");this._popoutWindow.moveTo(this._initialWindowSize.left,this._initialWindowSize.top),this._popoutWindow.focus()}onInitialised(){this._isInitialised=!0,this.getGlInstance().on(\"popIn\",(()=>this.popIn())),this.emit(\"initialised\")}_onClose(){setTimeout((()=>this.emit(\"closed\")),50)}}class Gt extends Wt{constructor(t,e,i,n){super(),this.layoutManager=t,this._parent=i,this._element=n,this._popInParentIds=[],this._type=e.type,this._id=e.id,this._isInitialised=!1,this.isGround=!1,this.isRow=!1,this.isColumn=!1,this.isStack=!1,this.isComponent=!1,this.size=e.size,this.sizeUnit=e.sizeUnit,this.minSize=e.minSize,this.minSizeUnit=e.minSizeUnit,this._isClosable=e.isClosable,this._pendingEventPropagations={},this._throttledEvents=[\"stateChanged\"],this._contentItems=this.createContentItems(e.content)}get type(){return this._type}get id(){return this._id}set id(t){this._id=t}get popInParentIds(){return this._popInParentIds}get parent(){return this._parent}get contentItems(){return this._contentItems}get isClosable(){return this._isClosable}get element(){return this._element}get isInitialised(){return this._isInitialised}static isStack(t){return t.isStack}static isComponentItem(t){return t.isComponent}static isComponentParentableItem(t){return t.isStack||t.isGround}removeChild(t,e=!1){const i=this._contentItems.indexOf(t);if(-1===i)throw new Error(\"Can't remove child item. Unknown content item\");if(e||this._contentItems[i].destroy(),this._contentItems.splice(i,1),this._contentItems.length>0)this.updateSize(!1);else if(!this.isGround&&!0===this._isClosable){if(null===this._parent)throw new K(\"CIUC00874\");this._parent.removeChild(this)}}addChild(t,e,i){return null!=e||(e=this._contentItems.length),this._contentItems.splice(e,0,t),t.setParent(this),!0===this._isInitialised&&!1===t._isInitialised&&t.init(),e}replaceChild(t,e,i=!1){const n=this._contentItems.indexOf(t),o=t._element.parentNode;if(-1===n)throw new X(\"CIRCI23232\",\"Can't replace child. oldChild is not child of this\");if(null===o)throw new K(\"CIRCP23232\");if(o.replaceChild(e._element,t._element),!0===i&&(t._parent=null,t.destroy()),this._contentItems[n]=e,e.setParent(this),e.size=t.size,e.sizeUnit=t.sizeUnit,e.minSize=t.minSize,e.minSizeUnit=t.minSizeUnit,null===e._parent)throw new K(\"CIRCNC45699\");!0===e._parent._isInitialised&&!1===e._isInitialised&&e.init(),this.updateSize(!1)}remove(){if(null===this._parent)throw new K(\"CIR11110\");this._parent.removeChild(this)}popout(){const t=Ot(),e=this.layoutManager.createPopoutFromContentItem(this,void 0,t,void 0);return this.emitBaseBubblingEvent(\"stateChanged\"),e}calculateConfigContent(){const t=this._contentItems,e=t.length,i=new Array(e);for(let n=0;nthis.propagateEventToLayoutManager(t,e))))}propagateEventToLayoutManager(t,e){this._pendingEventPropagations[t]=!1,this.layoutManager.emitUnknown(t,e)}}class jt extends Gt{constructor(t,e,i){super(t,e,i,document.createElement(\"div\")),this._parentItem=i,this._focused=!1,this.isComponent=!0,this._reorderEnabled=e.reorderEnabled,this.applyUpdatableConfig(e),this._initialWantMaximise=e.maximised;const n=document.createElement(\"div\");n.classList.add(\"lm_content\"),this.element.appendChild(n),this._container=new Ft(e,this,t,n,(t=>this.handleUpdateItemConfigEvent(t)),(()=>this.show()),(()=>this.hide()),(t=>this.focus(t)),(t=>this.blur(t)))}get componentName(){return this._container.componentType}get componentType(){return this._container.componentType}get reorderEnabled(){return this._reorderEnabled}get initialWantMaximise(){return this._initialWantMaximise}get component(){return this._container.component}get container(){return this._container}get parentItem(){return this._parentItem}get headerConfig(){return this._headerConfig}get title(){return this._title}get tab(){return this._tab}get focused(){return this._focused}destroy(){this._container.destroy(),super.destroy()}applyUpdatableConfig(t){this.setTitle(t.title),this._headerConfig=t.header}toConfig(){const t=this._container.stateRequestEvent,e=void 0===t?this._container.state:t();return{type:at.component,content:[],size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,maximised:!1,isClosable:this.isClosable,reorderEnabled:this._reorderEnabled,title:this._title,header:mt.Header.createCopy(this._headerConfig),componentType:pt.copyComponentType(this.componentType),componentState:e}}close(){if(null===this.parent)throw new K(\"CIC68883\");this.parent.removeChild(this,!1)}enterDragMode(t,e){Tt(this.element,t),At(this.element,e),this._container.enterDragMode(t,e)}exitDragMode(){this._container.exitDragMode()}enterStackMaximised(){this._container.enterStackMaximised()}exitStackMaximised(){this._container.exitStackMaximised()}drag(){this._container.drag()}updateSize(t){this.updateNodeSize(t)}init(){this.updateNodeSize(!1),super.init(),this._container.emit(\"open\"),this.initContentItems()}setTitle(t){this._title=t,this.emit(\"titleChanged\",t),this.emit(\"stateChanged\")}setTab(t){this._tab=t,this.emit(\"tab\",t),this._container.setTab(t)}hide(){super.hide(),this._container.setVisibility(!1)}show(){super.show(),this._container.setVisibility(!0)}focus(t=!1){this.parentItem.setActiveComponentItem(this,!0,t)}setFocused(t){this._focused=!0,this.tab.setFocused(),t||this.emitBaseBubblingEvent(\"focus\")}blur(t=!1){this._focused&&this.layoutManager.setFocusedComponentItem(void 0,t)}setBlurred(t){this._focused=!1,this.tab.setBlurred(),t||this.emitBaseBubblingEvent(\"blur\")}setParent(t){this._parentItem=t,super.setParent(t)}handleUpdateItemConfigEvent(t){this.applyUpdatableConfig(t)}updateNodeSize(t){if(\"none\"!==this.element.style.display){const{width:e,height:i}=kt(this.element);this._container.setSizeToNodeSize(e,i,t)}}}class $t extends Gt{constructor(){super(...arguments),this._focused=!1}get focused(){return this._focused}setFocusedValue(t){this._focused=t}}class Zt extends Wt{constructor(t,e){super(),this._eElement=t,this._pointerTracking=!1,this._pointerDownEventListener=t=>this.onPointerDown(t),this._pointerMoveEventListener=t=>this.onPointerMove(t),this._pointerUpEventListener=t=>this.onPointerUp(t),this._timeout=void 0,this._allowableTargets=[t,...e],this._oDocument=document,this._eBody=document.body,this._nDelay=1800,this._nDistance=10,this._nX=0,this._nY=0,this._nOriginalX=0,this._nOriginalY=0,this._dragging=!1,this._eElement.addEventListener(\"pointerdown\",this._pointerDownEventListener,{passive:!0})}destroy(){this.checkRemovePointerTrackingEventListeners(),this._eElement.removeEventListener(\"pointerdown\",this._pointerDownEventListener)}cancelDrag(){this.processDragStop(void 0)}onPointerDown(t){if(this._allowableTargets.includes(t.target)&&t.isPrimary){const e=this.getPointerCoordinates(t);this.processPointerDown(e)}}processPointerDown(t){this._nOriginalX=t.x,this._nOriginalY=t.y,this._oDocument.addEventListener(\"pointermove\",this._pointerMoveEventListener),this._oDocument.addEventListener(\"pointerup\",this._pointerUpEventListener,{passive:!0}),this._pointerTracking=!0,this._timeout=setTimeout((()=>{try{this.startDrag()}catch(t){throw console.error(t),t}}),this._nDelay)}onPointerMove(t){this._pointerTracking&&(this.processDragMove(t),t.preventDefault())}processDragMove(t){this._nX=t.pageX-this._nOriginalX,this._nY=t.pageY-this._nOriginalY,!1===this._dragging&&(Math.abs(this._nX)>this._nDistance||Math.abs(this._nY)>this._nDistance)&&this.startDrag(),this._dragging&&this.emit(\"drag\",this._nX,this._nY,t)}onPointerUp(t){this.processDragStop(t)}processDragStop(t){var e;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this.checkRemovePointerTrackingEventListeners(),!0===this._dragging&&(this._eBody.classList.remove(\"lm_dragging\"),this._eElement.classList.remove(\"lm_dragging\"),null===(e=this._oDocument.querySelector(\"iframe\"))||void 0===e||e.style.setProperty(\"pointer-events\",\"\"),this._dragging=!1,this.emit(\"dragStop\",t))}checkRemovePointerTrackingEventListeners(){this._pointerTracking&&(this._oDocument.removeEventListener(\"pointermove\",this._pointerMoveEventListener),this._oDocument.removeEventListener(\"pointerup\",this._pointerUpEventListener),this._pointerTracking=!1)}startDrag(){var t;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this._dragging=!0,this._eBody.classList.add(\"lm_dragging\"),this._eElement.classList.add(\"lm_dragging\"),null===(t=this._oDocument.querySelector(\"iframe\"))||void 0===t||t.style.setProperty(\"pointer-events\",\"none\"),this.emit(\"dragStart\",this._nOriginalX,this._nOriginalY)}getPointerCoordinates(t){return{x:t.pageX,y:t.pageY}}}class qt{constructor(t,e,i){this._isVertical=t,this._size=e,this._grabSize=i0){const i=this.createSplitter(Math.max(0,e-1)).element;e>0?(this.contentItems[e-1].element.insertAdjacentElement(\"afterend\",i),i.insertAdjacentElement(\"afterend\",t.element)):(this.contentItems[0].element.insertAdjacentElement(\"beforebegin\",i),i.insertAdjacentElement(\"beforebegin\",t.element))}else this._childElementContainer.appendChild(t.element);super.addChild(t,e);const n=1/this.contentItems.length*100;if(!0===i)return this.emitBaseBubblingEvent(\"stateChanged\"),e;for(let e=0;e0&&(this.calculateRelativeSizes(),this.setAbsoluteSizes()),this.emitBaseBubblingEvent(\"stateChanged\"),this.emit(\"resize\")}setAbsoluteSizes(){const t=this.calculateAbsoluteSizes();for(let e=0;e0&&t.itemSizes[e]++,this._isColumn?(Tt(this.contentItems[e].element,t.crossAxisSize),At(this.contentItems[e].element,t.itemSizes[e])):(Tt(this.contentItems[e].element,t.itemSizes[e]),At(this.contentItems[e].element,t.crossAxisSize))}calculateAbsoluteSizes(){const t=(this.contentItems.length-1)*this._splitterSize,{width:e,height:i}=kt(this.element);let n,o;this._isColumn?(n=i-t,o=e):(n=e-t,o=i);let s=0;const r=[];for(let t=0;t0){const n=100-t;for(let t=0;t100&&e.length>0){for(let t=0;te)return;{const r=i/e;let a=i;for(let e=0;ethis.onSplitterDrag(e,t,i))),e.on(\"dragStop\",(()=>this.onSplitterDragStop(e))),e.on(\"dragStart\",(()=>this.onSplitterDragStart(e))),this._splitter.splice(t,0,e),e}getSplitItems(t){const e=this._splitter.indexOf(t);return{before:this.contentItems[e],after:this.contentItems[e+1]}}calculateContentItemMinSize(t){const e=t.minSize;if(void 0!==e){if(t.minSizeUnit===ht.Pixel)return e;throw new X(\"ROCGMD98831\",JSON.stringify(t))}{const t=this.layoutManager.layoutConfig.dimensions;return this._isColumn?t.defaultMinItemHeight:t.defaultMinItemWidth}}calculateContentItemsTotalMinSize(t){let e=0;for(const i of t)e+=this.calculateContentItemMinSize(i);return e}onSplitterDragStart(t){const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=this.calculateContentItemsTotalMinSize(e.before.contentItems),s=this.calculateContentItemsTotalMinSize(e.after.contentItems);this._splitterPosition=0,this._splitterMinPosition=-1*(i-o),this._splitterMaxPosition=n-s}onSplitterDrag(t,e,i){let n=this._isColumn?i:e;if(null===this._splitterMinPosition||null===this._splitterMaxPosition)throw new K(\"ROCOSD59226\");n=Math.max(n,this._splitterMinPosition),n=Math.min(n,this._splitterMaxPosition),this._splitterPosition=n;const o=zt(n);this._isColumn?t.element.style.top=o:t.element.style.left=o}onSplitterDragStop(t){if(null===this._splitterPosition)throw new K(\"ROCOSDS66932\");{const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=(this._splitterPosition+i)/(i+n),s=e.before.size+e.after.size;e.before.size=o*s,e.after.size=(1-o)*s,t.element.style.top=zt(0),t.element.style.left=zt(0),globalThis.requestAnimationFrame((()=>this.updateSize(!1)))}}}!function(t){t.getElementDimensionSize=function(t,e){return\"width\"===e?function(t){return t.offsetWidth}(t):function(t){return t.offsetHeight}(t)},t.setElementDimensionSize=function(t,e,i){return\"width\"===e?Tt(t,i):At(t,i)},t.createElement=function(t,e){const i=t.createElement(\"div\");return i.classList.add(\"lm_item\"),e?i.classList.add(\"lm_column\"):i.classList.add(\"lm_row\"),i}}(Xt||(Xt={}));class Yt extends $t{constructor(t,e,i){super(t,vt.create(e),null,Yt.createElement(document)),this.isGround=!0,this._childElementContainer=this.element,this._containerElement=i;let n=null;for(;;){const t=n?n.previousSibling:this._containerElement.lastChild;if(!(t instanceof Element&&t.classList.contains(\"lm_content\")))break;n=t}this._containerElement.insertBefore(this.element,n)}init(){if(!0!==this.isInitialised){this.updateNodeSize();for(let t=0;t0?this.contentItems[0]:this,n.isComponent)throw new Error(\"Cannot add item as child to ComponentItem\");{const t=this.layoutManager.createAndInitContentItem(i,n);return e=n.addChild(t,e),n===this?-1:e}}loadComponentAsRoot(t){this.clearRoot();const e=Ct.resolve(t,!1);if(e.maximised)throw new Error(\"Root Component cannot be maximised\");{const t=new jt(this.layoutManager,e,this);t.init(),this.addChild(t,0)}}addChild(t,e){if(this.contentItems.length>0)throw new Error(\"Ground node can only have a single child\");return this._childElementContainer.appendChild(t.element),e=super.addChild(t,e),this.updateSize(!1),this.emitBaseBubblingEvent(\"stateChanged\"),e}calculateConfigContent(){const t=this.contentItems,e=t.length,i=new Array(e);for(let n=0;n0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e)),this.updateContentItemsSize(!1))}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}createSideAreas(){const t=Yt.Area.oppositeSides,e=new Array(Object.keys(t).length);let i=0;for(const n in t){const o=n,s=this.getElementArea();if(null===s)throw new K(\"RCSA77553\");s.side=o,\"2\"===t[o][1]?s[o]=s[t[o]]-50:s[o]=s[t[o]]+50,s.surface=(s.x2-s.x1)*(s.y2-s.y1),e[i++]=s}return e}highlightDropZone(t,e,i){this.layoutManager.tabDropPlaceholder.remove(),super.highlightDropZone(t,e,i)}onDrop(t,e){if(t.isComponent){const e=ut.createDefault(),i=t;e.header=mt.Header.createCopy(i.headerConfig);const n=this.layoutManager.createAndInitContentItem(e,this);n.addChild(t),t=n}if(0===this.contentItems.length)this.addChild(t);else{if(t.type===at.row||t.type===at.column){const e=ut.createDefault(),i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}const i=\"x\"==e.side[0]?at.row:at.column,n=\"2\"==e.side[1],o=this.contentItems[0];if(o instanceof Xt&&o.type===i){const e=o.contentItems[n?0:o.contentItems.length-1];o.addChild(t,n?0:void 0,!0),e.size*=.5,t.size=e.size,t.sizeUnit=ht.Percent,o.updateSize(!1)}else{const e=ct.createDefault(i),s=this.layoutManager.createContentItem(e,this);this.replaceChild(o,s),s.addChild(t,n?0:void 0,!0),s.addChild(o,n?void 0:0,!0),o.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}}dock(){throw new X(\"GID87731\")}validateDocking(){throw new X(\"GIVD87732\")}getAllContentItems(){const t=[this];return this.deepGetAllContentItems(this.contentItems,t),t}getConfigMaximisedItems(){const t=[];return this.deepFilterContentItems(this.contentItems,t,(t=>!(!Gt.isStack(t)||!t.initialWantMaximise)||!(!Gt.isComponentItem(t)||!t.initialWantMaximise))),t}getItemsByPopInParentId(t){const e=[];return this.deepFilterContentItems(this.contentItems,e,(e=>e.popInParentIds.includes(t))),e}toConfig(){throw new Error(\"Cannot generate GroundItem config\")}setActiveComponentItem(t,e,i){}updateNodeSize(){const{width:t,height:e}=kt(this._containerElement);Tt(this.element,t),At(this.element,e),this.contentItems.length>0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e))}deepGetAllContentItems(t,e){for(let i=0;ithis.onClick(t),this._touchStartEventListener=t=>this.onTouchStart(t),this._element=document.createElement(\"div\"),this._element.classList.add(i),this._element.title=e,this._header.on(\"destroy\",(()=>this.destroy())),this._element.addEventListener(\"click\",this._clickEventListener,{passive:!0}),this._element.addEventListener(\"touchstart\",this._touchStartEventListener,{passive:!0}),this._header.controlsContainerElement.appendChild(this._element)}get element(){return this._element}destroy(){var t;this._element.removeEventListener(\"click\",this._clickEventListener),this._element.removeEventListener(\"touchstart\",this._touchStartEventListener),null===(t=this._element.parentNode)||void 0===t||t.removeChild(this._element)}onClick(t){this._pushEvent(t)}onTouchStart(t){this._pushEvent(t)}}class Jt{constructor(t,e,i,n,o){var s;this._layoutManager=t,this._componentItem=e,this._closeEvent=i,this._focusEvent=n,this._dragStartEvent=o,this._isActive=!1,this._tabClickListener=t=>this.onTabClickDown(t),this._tabTouchStartListener=t=>this.onTabTouchStart(t),this._closeClickListener=()=>this.onCloseClick(),this._closeTouchStartListener=()=>this.onCloseTouchStart(),this._dragStartListener=(t,e)=>this.onDragStart(t,e),this._contentItemDestroyListener=()=>this.onContentItemDestroy(),this._tabTitleChangedListener=t=>this.setTitle(t),this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_tab\"),this._titleElement=document.createElement(\"span\"),this._titleElement.classList.add(\"lm_title\"),this._closeElement=document.createElement(\"div\"),this._closeElement.classList.add(\"lm_close_tab\"),this._element.appendChild(this._titleElement),this._element.appendChild(this._closeElement),e.isClosable?this._closeElement.style.display=\"\":this._closeElement.style.display=\"none\",this.setTitle(e.title),this._componentItem.on(\"titleChanged\",this._tabTitleChangedListener);(null!==(s=e.reorderEnabled)&&void 0!==s?s:this._layoutManager.layoutConfig.settings.reorderEnabled)&&this.enableReorder(),this._element.addEventListener(\"click\",this._tabClickListener,{passive:!0}),this._element.addEventListener(\"touchstart\",this._tabTouchStartListener,{passive:!0}),this._componentItem.isClosable?(this._closeElement.addEventListener(\"click\",this._closeClickListener,{passive:!0}),this._closeElement.addEventListener(\"touchstart\",this._closeTouchStartListener,{passive:!0})):(this._closeElement.remove(),this._closeElement=void 0),this._componentItem.setTab(this),this._layoutManager.emit(\"tabCreated\",this)}get isActive(){return this._isActive}get componentItem(){return this._componentItem}get contentItem(){return this._componentItem}get element(){return this._element}get titleElement(){return this._titleElement}get closeElement(){return this._closeElement}get reorderEnabled(){return void 0!==this._dragListener}set reorderEnabled(t){t!==this.reorderEnabled&&(t?this.enableReorder():this.disableReorder())}setTitle(t){this._titleElement.innerText=t,this._element.title=t}setActive(t){t!==this._isActive&&(this._isActive=t,t?this._element.classList.add(\"lm_active\"):this._element.classList.remove(\"lm_active\"))}destroy(){var t,e;this._closeEvent=void 0,this._focusEvent=void 0,this._dragStartEvent=void 0,this._element.removeEventListener(\"click\",this._tabClickListener),this._element.removeEventListener(\"touchstart\",this._tabTouchStartListener),null===(t=this._closeElement)||void 0===t||t.removeEventListener(\"click\",this._closeClickListener),null===(e=this._closeElement)||void 0===e||e.removeEventListener(\"touchstart\",this._closeTouchStartListener),this._componentItem.off(\"titleChanged\",this._tabTitleChangedListener),this.reorderEnabled&&this.disableReorder(),this._element.remove()}setBlurred(){this._element.classList.remove(\"lm_focused\"),this._titleElement.classList.remove(\"lm_focused\")}setFocused(){this._element.classList.add(\"lm_focused\"),this._titleElement.classList.add(\"lm_focused\")}onDragStart(t,e){if(void 0===this._dragListener)throw new J(\"TODSDLU10093\");if(void 0===this._dragStartEvent)throw new J(\"TODS23309\");this._dragStartEvent(t,e,this._dragListener,this.componentItem)}onContentItemDestroy(){void 0!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=void 0)}onTabClickDown(t){const e=t.target;e!==this._element&&e!==this._titleElement||(0===t.button?this.notifyFocus():1===t.button&&this._componentItem.isClosable&&this.notifyClose())}onTabTouchStart(t){t.target===this._element&&this.notifyFocus()}onCloseClick(){this.notifyClose()}onCloseTouchStart(){this.notifyClose()}notifyClose(){if(void 0===this._closeEvent)throw new J(\"TNC15007\");this._closeEvent(this._componentItem)}notifyFocus(){if(void 0===this._focusEvent)throw new J(\"TNA15007\");this._focusEvent(this._componentItem)}enableReorder(){this._dragListener=new Zt(this._element,[this._titleElement]),this._dragListener.on(\"dragStart\",this._dragStartListener),this._componentItem.on(\"destroy\",this._contentItemDestroyListener)}disableReorder(){if(void 0===this._dragListener)throw new J(\"TDR87745\");this._componentItem.off(\"destroy\",this._contentItemDestroyListener),this._dragListener.off(\"dragStart\",this._dragStartListener),this._dragListener=void 0}}class Qt{constructor(t,e,i,n,o){this._layoutManager=t,this._componentRemoveEvent=e,this._componentFocusEvent=i,this._componentDragStartEvent=n,this._dropdownActiveChangedEvent=o,this._tabs=[],this._lastVisibleTabIndex=-1,this._dropdownActive=!1,this._element=document.createElement(\"section\"),this._element.classList.add(\"lm_tabs\"),this._dropdownElement=document.createElement(\"section\"),this._dropdownElement.classList.add(\"lm_tabdropdown_list\"),this._dropdownElement.style.display=\"none\"}get tabs(){return this._tabs}get tabCount(){return this._tabs.length}get lastVisibleTabIndex(){return this._lastVisibleTabIndex}get element(){return this._element}get dropdownElement(){return this._dropdownElement}get dropdownActive(){return this._dropdownActive}destroy(){for(let t=0;tthis.handleTabCloseEvent(t)),(t=>this.handleTabFocusEvent(t)),((t,e,i,n)=>this.handleTabDragStartEvent(t,e,i,n)));void 0===e&&(e=this._tabs.length),this._tabs.splice(e,0,i),ethis._lastVisibleTabIndex){const t=this._tabs[e];for(let t=e;t>0;t--)this._tabs[t]=this._tabs[t-1];this._tabs[0]=t}}updateTabSizes(t,e){let i=!1;this.tryUpdateTabSizes(i,t,e)||(i=!0,this.tryUpdateTabSizes(i,t,e)),i!==this._dropdownActive&&(this._dropdownActive=i,this._dropdownActiveChangedEvent())}tryUpdateTabSizes(t,e,i){if(this._tabs.length>0){if(void 0===i)throw new Error(\"non-empty tabs must have active component item\");let n=0,o=!1;const s=this._layoutManager.layoutConfig.settings.tabOverlapAllowance,r=this._tabs.indexOf(i.tab),a=this._tabs[r];this._lastVisibleTabIndex=-1;for(let i=0;ie){if(o)i===r&&(l.style.zIndex=\"auto\",l.style.marginLeft=\"\",l.parentElement!==this._element&&this._element.appendChild(l));else{let t;if(t=r>0&&r<=i?(d-e)/(i-1):(d-e)/i,tthis.onClick(t),this._touchStartListener=t=>this.onTouchStart(t),this._rowColumnClosable=!0,this._closeButton=null,this._popoutButton=null,this._tabsContainer=new Qt(this._layoutManager,(t=>this.handleTabInitiatedComponentRemoveEvent(t)),(t=>this.handleTabInitiatedComponentFocusEvent(t)),((t,e,i,n)=>this.handleTabInitiatedDragStartEvent(t,e,i,n)),(()=>this.processTabDropdownActiveChanged())),this._show=i.show,this._popoutEnabled=i.popoutEnabled,this._popoutLabel=i.popoutLabel,this._maximiseEnabled=i.maximiseEnabled,this._maximiseLabel=i.maximiseLabel,this._minimiseEnabled=i.minimiseEnabled,this._minimiseLabel=i.minimiseLabel,this._closeEnabled=i.closeEnabled,this._closeLabel=i.closeLabel,this._tabDropdownEnabled=i.tabDropdownEnabled,this._tabDropdownLabel=i.tabDropdownLabel,this.setSide(i.side),this._canRemoveComponent=this._configClosable,this._element=document.createElement(\"section\"),this._element.classList.add(\"lm_header\"),this._controlsContainerElement=document.createElement(\"section\"),this._controlsContainerElement.classList.add(\"lm_controls\"),this._element.appendChild(this._tabsContainer.element),this._element.appendChild(this._controlsContainerElement),this._element.appendChild(this._tabsContainer.dropdownElement),this._element.addEventListener(\"click\",this._clickListener,{passive:!0}),this._element.addEventListener(\"touchstart\",this._touchStartListener,{passive:!0}),this._documentMouseUpListener=()=>this._tabsContainer.hideAdditionalTabsDropdown(),globalThis.document.addEventListener(\"mouseup\",this._documentMouseUpListener,{passive:!0}),this._tabControlOffset=this._layoutManager.layoutConfig.settings.tabControlOffset,this._tabDropdownEnabled&&(this._tabDropdownButton=new Kt(this,this._tabDropdownLabel,\"lm_tabdropdown\",(()=>this._tabsContainer.showAdditionalTabsDropdown()))),this._popoutEnabled&&(this._popoutButton=new Kt(this,this._popoutLabel,\"lm_popout\",(()=>this.handleButtonPopoutEvent()))),this._maximiseEnabled&&(this._maximiseButton=new Kt(this,this._maximiseLabel,\"lm_maximise\",(t=>this.handleButtonMaximiseToggleEvent(t)))),this._configClosable&&(this._closeButton=new Kt(this,this._closeLabel,\"lm_close\",(()=>s()))),this.processTabDropdownActiveChanged()}get show(){return this._show}get side(){return this._side}get leftRightSided(){return this._leftRightSided}get layoutManager(){return this._layoutManager}get parent(){return this._parent}get tabs(){return this._tabsContainer.tabs}get lastVisibleTabIndex(){return this._tabsContainer.lastVisibleTabIndex}get element(){return this._element}get tabsContainerElement(){return this._tabsContainer.element}get controlsContainerElement(){return this._controlsContainerElement}destroy(){this.emit(\"destroy\"),this._popoutEvent=void 0,this._maximiseToggleEvent=void 0,this._clickEvent=void 0,this._touchStartEvent=void 0,this._componentRemoveEvent=void 0,this._componentFocusEvent=void 0,this._componentDragStartEvent=void 0,this._tabsContainer.destroy(),globalThis.document.removeEventListener(\"mouseup\",this._documentMouseUpListener),this._element.remove()}createTab(t,e){this._tabsContainer.createTab(t,e)}removeTab(t){this._tabsContainer.removeTab(t)}processActiveComponentChanged(t){this._tabsContainer.processActiveComponentChanged(t),this.updateTabSizes()}setSide(t){this._side=t,this._leftRightSided=[nt.right,nt.left].includes(this._side)}setRowColumnClosable(t){this._rowColumnClosable=t,this.updateClosability()}updateClosability(){let t;if(this._configClosable)if(this._rowColumnClosable){t=!0;const e=this.tabs.length;for(let i=0;i1}applyFocusedValue(t){t?this._element.classList.add(\"lm_focused\"):this._element.classList.remove(\"lm_focused\")}processMaximised(){if(void 0===this._maximiseButton)throw new J(\"HPMAX16997\");this._maximiseButton.element.setAttribute(\"title\",this._minimiseLabel)}processMinimised(){if(void 0===this._maximiseButton)throw new J(\"HPMIN16997\");this._maximiseButton.element.setAttribute(\"title\",this._maximiseLabel)}updateTabSizes(){if(this._tabsContainer.tabCount>0){const t=this._show?this._layoutManager.layoutConfig.dimensions.headerHeight:0;let e;this._leftRightSided?(this._element.style.height=\"\",this._element.style.width=zt(t)):(this._element.style.width=\"\",this._element.style.height=zt(t)),e=this._leftRightSided?this._element.offsetHeight-this._controlsContainerElement.offsetHeight-this._tabControlOffset:this._element.offsetWidth-this._controlsContainerElement.offsetWidth-this._tabControlOffset,this._tabsContainer.updateTabSizes(e,this._getActiveComponentItemEvent())}}handleTabInitiatedComponentRemoveEvent(t){if(this._canRemoveComponent){if(void 0===this._componentRemoveEvent)throw new J(\"HHTCE22294\");this._componentRemoveEvent(t)}}handleTabInitiatedComponentFocusEvent(t){if(void 0===this._componentFocusEvent)throw new J(\"HHTAE22294\");this._componentFocusEvent(t)}handleTabInitiatedDragStartEvent(t,e,i,n){if(this._canRemoveComponent){if(void 0===this._componentDragStartEvent)throw new J(\"HHTDSE22294\");this._componentDragStartEvent(t,e,i,n)}else i.cancelDrag()}processTabDropdownActiveChanged(){void 0!==this._tabDropdownButton&&Dt(this._tabDropdownButton.element,this._tabsContainer.dropdownActive)}handleButtonPopoutEvent(){if(this._layoutManager.layoutConfig.settings.popoutWholeStack){if(void 0===this._popoutEvent)throw new J(\"HHBPOE17834\");this._popoutEvent()}else{const t=this._getActiveComponentItemEvent();t&&t.popout()}}handleButtonMaximiseToggleEvent(t){if(void 0===this._maximiseToggleEvent)throw new J(\"HHBMTE16834\");this._maximiseToggleEvent()}onClick(t){t.target===this._element&&this.notifyClick(t)}onTouchStart(t){t.target===this._element&&this.notifyTouchStart(t)}notifyClick(t){if(void 0===this._clickEvent)throw new J(\"HNHC46834\");this._clickEvent(t)}notifyTouchStart(t){if(void 0===this._touchStartEvent)throw new J(\"HNHTS46834\");this._touchStartEvent(t)}}class ee extends $t{constructor(t,e,i){var n,o,s,r,a,l,h,d,c,m,u,p,g,f,v,_,y,C,w;super(t,e,i,ee.createElement(document)),this._headerSideChanged=!1,this._resizeListener=()=>this.handleResize(),this._maximisedListener=()=>this.handleMaximised(),this._minimisedListener=()=>this.handleMinimised(),this._headerConfig=e.header;const I=t.layoutConfig.header,b=e.content;let S;if(1!==b.length)S=void 0;else{S=b[0].header}this._initialWantMaximise=e.maximised,this._initialActiveItemIndex=null!==(n=e.activeItemIndex)&&void 0!==n?n:0;const E=null!==(r=null!==(s=null===(o=this._headerConfig)||void 0===o?void 0:o.show)&&void 0!==s?s:null==S?void 0:S.show)&&void 0!==r?r:I.show,x=null!==(h=null!==(l=null===(a=this._headerConfig)||void 0===a?void 0:a.popout)&&void 0!==l?l:null==S?void 0:S.popout)&&void 0!==h?h:I.popout,L=null!==(m=null!==(c=null===(d=this._headerConfig)||void 0===d?void 0:d.maximise)&&void 0!==c?c:null==S?void 0:S.maximise)&&void 0!==m?m:I.maximise,z=null!==(g=null!==(p=null===(u=this._headerConfig)||void 0===u?void 0:u.close)&&void 0!==p?p:null==S?void 0:S.close)&&void 0!==g?g:I.close,M=null!==(_=null!==(v=null===(f=this._headerConfig)||void 0===f?void 0:f.minimise)&&void 0!==v?v:null==S?void 0:S.minimise)&&void 0!==_?_:I.minimise,P=null!==(w=null!==(C=null===(y=this._headerConfig)||void 0===y?void 0:y.tabDropdown)&&void 0!==C?C:null==S?void 0:S.tabDropdown)&&void 0!==w?w:I.tabDropdown;this._maximisedEnabled=!1!==L;const T={show:!1!==E,side:!1===E?nt.top:E,popoutEnabled:!1!==x,popoutLabel:!1===x?\"\":x,maximiseEnabled:this._maximisedEnabled,maximiseLabel:!1===L?\"\":L,closeEnabled:!1!==z,closeLabel:!1===z?\"\":z,minimiseEnabled:!0,minimiseLabel:M,tabDropdownEnabled:!1!==P,tabDropdownLabel:!1===P?\"\":P};this._header=new te(t,this,T,e.isClosable&&!1!==z,(()=>this.getActiveComponentItem()),(()=>this.remove()),(()=>this.handlePopoutEvent()),(()=>this.toggleMaximise()),(t=>this.handleHeaderClickEvent(t)),(t=>this.handleHeaderTouchStartEvent(t)),(t=>this.handleHeaderComponentRemoveEvent(t)),(t=>this.handleHeaderComponentFocusEvent(t)),((t,e,i,n)=>this.handleHeaderComponentStartDragEvent(t,e,i,n))),this.isStack=!0,this._childElementContainer=document.createElement(\"section\"),this._childElementContainer.classList.add(\"lm_items\"),this.on(\"resize\",this._resizeListener),this._maximisedEnabled&&(this.on(\"maximised\",this._maximisedListener),this.on(\"minimised\",this._minimisedListener)),this.element.appendChild(this._header.element),this.element.appendChild(this._childElementContainer),this.setupHeaderPosition(),this._header.updateClosability()}get childElementContainer(){return this._childElementContainer}get header(){return this._header}get headerShow(){return this._header.show}get headerSide(){return this._header.side}get headerLeftRightSided(){return this._header.leftRightSided}get contentAreaDimensions(){return this._contentAreaDimensions}get initialWantMaximise(){return this._initialWantMaximise}get isMaximised(){return this===this.layoutManager.maximisedStack}get stackParent(){if(!this.parent)throw new Error(\"Stack should always have a parent\");return this.parent}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}init(){if(!0===this.isInitialised)return;this.updateNodeSize();for(let t=0;t0){if(this._initialActiveItemIndex<0||this._initialActiveItemIndex>=e)throw new Error(`ActiveItemIndex out of range: ${this._initialActiveItemIndex} id: ${this.id}`);for(let i=0;ithis.contentItems.length)throw e-=1,new X(\"SAC99728\");if(t instanceof jt)return e=super.addChild(t,e),this._childElementContainer.appendChild(t.element),this._header.createTab(t,e),this.setActiveComponentItem(t,i),this._header.updateTabSizes(),this.updateSize(!1),t.container.setBaseLogicalZIndex(),this._header.updateClosability(),this.emitStateChangedEvent(),e;throw new X(\"SACC88532\")}removeChild(t,e){const i=t,n=this.contentItems.indexOf(i),o=1===this.contentItems.length;if(this._activeComponentItem===i&&(i.focused&&i.blur(),!o)){const t=0===n?1:n-1;this.setActiveComponentItem(this.contentItems[t],!1)}this._header.removeTab(i),super.removeChild(i,e),o||this._header.updateClosability(),this.emitStateChangedEvent()}toggleMaximise(){this.isMaximised?this.minimise():this.maximise()}maximise(){if(!this.isMaximised){this.layoutManager.setMaximisedStack(this);const t=this.contentItems,e=t.length;for(let i=0;i0&&void 0===t)throw new Error(\"expected non-empty stack to have an active component item\");return{type:\"stack\",content:this.calculateConfigContent(),size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,isClosable:this.isClosable,maximised:this.isMaximised,header:this.createHeaderConfig(),activeItemIndex:t}}onDrop(t,e){if(\"header\"===this._dropSegment){if(this.resetHeaderDropZone(),void 0===this._dropIndex)throw new J(\"SODDI68990\");return void this.addChild(t,this._dropIndex)}if(\"body\"===this._dropSegment)return void this.addChild(t,0,!0);const i=\"top\"===this._dropSegment||\"bottom\"===this._dropSegment,n=\"left\"===this._dropSegment||\"right\"===this._dropSegment,o=\"top\"===this._dropSegment||\"left\"===this._dropSegment,s=i&&this.stackParent.isColumn||n&&this.stackParent.isRow;if(t.isComponent){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createAndInitContentItem(e,this);i.addChild(t),t=i}if(t.type===at.row||t.type===at.column){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}if(s){const e=this.stackParent.contentItems.indexOf(this);this.stackParent.addChild(t,o?e:e+1,!0),this.size*=.5,t.size=this.size,t.sizeUnit=this.sizeUnit,this.stackParent.updateSize(!1)}else{const e=i?at.column:at.row,n=ct.createDefault(e),s=this.layoutManager.createContentItem(n,this);this.stackParent.replaceChild(this,s),s.addChild(t,o?0:void 0,!0),s.addChild(this,o?void 0:0,!0),this.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}highlightDropZone(t,e){for(const i in this._contentAreaDimensions){const n=i,o=this._contentAreaDimensions[n].hoverArea;if(o.x1t&&o.y1e)return void(\"header\"===n?(this._dropSegment=\"header\",this.highlightHeaderDropZone(this._header.leftRightSided?e:t)):(this.resetHeaderDropZone(),this.highlightBodyDropZone(n)))}}getArea(){if(\"none\"===this.element.style.display)return null;const t=super.getElementArea(this._header.element),e=super.getElementArea(this._childElementContainer);if(null===t||null===e)throw new K(\"SGAHC13086\");const i=e.x2-e.x1,n=e.y2-e.y1;return this._contentAreaDimensions={header:{hoverArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2},highlightArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2}}},0===this.contentItems.length?(this._contentAreaDimensions.body={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2}},super.getElementArea(this.element)):(this._contentAreaDimensions.left={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x1+.25*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x1+.5*i,y2:e.y2}},this._contentAreaDimensions.top={hoverArea:{x1:e.x1+.25*i,y1:e.y1,x2:e.x1+.75*i,y2:e.y1+.5*n},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y1+.5*n}},this._contentAreaDimensions.right={hoverArea:{x1:e.x1+.75*i,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1+.5*i,y1:e.y1,x2:e.x2,y2:e.y2}},this._contentAreaDimensions.bottom={hoverArea:{x1:e.x1+.25*i,y1:e.y1+.5*n,x2:e.x1+.75*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1+.5*n,x2:e.x2,y2:e.y2}},super.getElementArea(this.element))}positionHeader(t){this._header.side!==t&&(this._header.setSide(t),this._headerSideChanged=!0,this.setupHeaderPosition())}updateNodeSize(){if(\"none\"!==this.element.style.display){const t=kt(this.element);if(this._header.show){t[this._header.leftRightSided?it.width:it.height]-=this.layoutManager.layoutConfig.dimensions.headerHeight}this._childElementContainer.style.width=zt(t.width),this._childElementContainer.style.height=zt(t.height);for(let e=0;e=o&&tthis.onDrag(t,e,i))),this._dragListener.on(\"dragStop\",(()=>this.onDrop())),this.createDragProxyElements(t,e),null===this._componentItem.parent)throw new K(\"DPC10097\");this._componentItemFocused=this._componentItem.focused,this._componentItemFocused&&this._componentItem.blur(),this._componentItem.parent.removeChild(this._componentItem,!0),this.setDimensions(),document.body.appendChild(this._element),this.determineMinMaxXY(),this._layoutManager.calculateItemAreas(),this.setDropPosition(t,e)}get element(){return this._element}createDragProxyElements(t,e){this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_dragProxy\");const i=document.createElement(\"div\");i.classList.add(\"lm_header\");const n=document.createElement(\"div\");n.classList.add(\"lm_tabs\");const o=document.createElement(\"div\");o.classList.add(\"lm_tab\");const s=document.createElement(\"span\");s.classList.add(\"lm_title\"),o.appendChild(s),n.appendChild(o),i.appendChild(n),this._proxyContainerElement=document.createElement(\"div\"),this._proxyContainerElement.classList.add(\"lm_content\"),this._element.appendChild(i),this._element.appendChild(this._proxyContainerElement),this._originalParent instanceof ee&&this._originalParent.headerShow&&(this._sided=this._originalParent.headerLeftRightSided,this._element.classList.add(\"lm_\"+this._originalParent.headerSide),[nt.right,nt.bottom].indexOf(this._originalParent.headerSide)>=0&&this._proxyContainerElement.insertAdjacentElement(\"afterend\",i)),this._element.style.left=zt(t),this._element.style.top=zt(e),o.setAttribute(\"title\",this._componentItem.title),s.insertAdjacentText(\"afterbegin\",this._componentItem.title),this._proxyContainerElement.appendChild(this._componentItem.element)}determineMinMaxXY(){const t=this._layoutManager.groundItem;if(void 0===t)throw new J(\"DPDMMXY73109\");{const e=t.element.getBoundingClientRect();this._minX=e.left+document.body.scrollLeft,this._minY=e.top+document.body.scrollTop,this._maxX=this._minX+e.width,this._maxY=this._minY+e.height}}onDrag(t,e,i){const n=i.pageX,o=i.pageY;this.setDropPosition(n,o),this._componentItem.drag()}setDropPosition(t,e){this._layoutManager.layoutConfig.settings.constrainDragToContainer&&(t<=this._minX?t=Math.ceil(this._minX):t>=this._maxX&&(t=Math.floor(this._maxX)),e<=this._minY?e=Math.ceil(this._minY):e>=this._maxY&&(e=Math.floor(this._maxY))),this._element.style.left=zt(t),this._element.style.top=zt(e),this._area=this._layoutManager.getArea(t,e),null!==this._area&&(this._lastValidArea=this._area,this._area.contentItem.highlightDropZone(t,e,this._area))}onDrop(){const t=this._layoutManager.dropTargetIndicator;if(null===t)throw new K(\"DPOD30011\");let e;if(t.hide(),this._componentItem.exitDragMode(),null!==this._area)e=this._componentItem,this._area.contentItem.onDrop(e,this._area);else if(null!==this._lastValidArea){e=this._componentItem;this._lastValidArea.contentItem.onDrop(e,this._lastValidArea)}else this._originalParent?(e=this._componentItem,this._originalParent.addChild(e)):this._componentItem.destroy();this._element.remove(),this._layoutManager.emit(\"itemDropped\",this._componentItem),this._componentItemFocused&&void 0!==e&&e.focus()}setDimensions(){const t=this._layoutManager.layoutConfig.dimensions;if(void 0===t)throw new Error(\"DragProxy.setDimensions: dimensions undefined\");let e=t.dragProxyWidth,i=t.dragProxyHeight;if(void 0===e||void 0===i)throw new Error(\"DragProxy.setDimensions: width and/or height undefined\");const n=!1===this._layoutManager.layoutConfig.header.show?0:t.headerHeight;this._element.style.width=zt(e),this._element.style.height=zt(i),e-=this._sided?n:0,i-=this._sided?0:n,this._proxyContainerElement.style.width=zt(e),this._proxyContainerElement.style.height=zt(i),this._componentItem.enterDragMode(e,i),this._componentItem.show()}}class ne{constructor(t,e,i,n,o,s,r){this._layoutManager=t,this._element=e,this._extraAllowableChildTargets=i,this._componentTypeOrFtn=n,this._componentState=o,this._title=s,this._id=r,this._dragListener=null,this._dummyGroundContainer=document.createElement(\"div\");const a=gt.createDefault(\"row\");this._dummyGroundContentItem=new Yt(this._layoutManager,a,this._dummyGroundContainer),this.createDragListener()}destroy(){this.removeDragListener()}createDragListener(){this.removeDragListener(),this._dragListener=new Zt(this._element,this._extraAllowableChildTargets),this._dragListener.on(\"dragStart\",((t,e)=>this.onDragStart(t,e))),this._dragListener.on(\"dragStop\",(()=>this.onDragStop()))}onDragStart(t,e){var i;const n=\"component\";let o;if(\"function\"==typeof this._componentTypeOrFtn){const t=this._componentTypeOrFtn();o=ne.isDragSourceComponentItemConfig(t)?{type:n,componentState:t.state,componentType:t.type,title:null!==(i=t.title)&&void 0!==i?i:this._title}:t}else o={type:n,componentState:this._componentState,componentType:this._componentTypeOrFtn,title:this._title,id:this._id};const s=bt.resolve(o,!1),r=new jt(this._layoutManager,s,this._dummyGroundContentItem);if(this._dummyGroundContentItem.contentItems.push(r),null===this._dragListener)throw new K(\"DSODSD66746\");{const i=new ie(t,e,this._dragListener,this._layoutManager,r,this._dummyGroundContentItem),n=this._layoutManager.transitionIndicator;if(null===n)throw new K(\"DSODST66746\");n.transitionElements(this._element,i.element)}}onDragStop(){this.createDragListener()}removeDragListener(){null!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=null)}}!function(t){t.isDragSourceComponentItemConfig=function(t){return!(\"componentType\"in t)}}(ne||(ne={}));class oe{constructor(){this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_dropTargetIndicator\");const t=document.createElement(\"div\");t.classList.add(\"lm_inner\"),this._element.appendChild(t),document.body.appendChild(this._element)}destroy(){this._element.remove()}highlightArea(t,e){this._element.style.left=zt(t.x1+e),this._element.style.top=zt(t.y1+e),this._element.style.width=zt(t.x2-t.x1-e),this._element.style.height=zt(t.y2-t.y1-e),this._element.style.display=\"block\"}hide(){Dt(this._element,!1)}}class se{constructor(){this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_transition_indicator\"),document.body.appendChild(this._element),this._toElement=null,this._fromDimensions=null,this._totalAnimationDuration=200,this._animationStartTime=null}destroy(){this._element.remove()}transitionElements(t,e){}nextAnimationFrame(){}measure(t){const e=t.getBoundingClientRect();return{left:e.left,top:e.top,width:t.offsetWidth,height:t.offsetHeight}}}class re extends Wt{constructor(t){super(),this._layoutManager=t,this._childEventListener=t=>this.onEventFromChild(t),globalThis.addEventListener(re.ChildEventName,this._childEventListener,{passive:!0})}emit(t,...e){\"userBroadcast\"===t?this.emitUserBroadcast(...e):super.emit(t,...e)}emitUserBroadcast(...t){this.handleUserBroadcastEvent(\"userBroadcast\",t)}destroy(){globalThis.removeEventListener(re.ChildEventName,this._childEventListener)}handleUserBroadcastEvent(t,e){this._layoutManager.isSubWindow?this.propagateToParent(t,e):this.propagateToThisAndSubtree(t,e)}onEventFromChild(t){const e=t.detail;this.handleUserBroadcastEvent(e.eventName,e.args)}propagateToParent(t,e){const i={bubbles:!0,cancelable:!0,detail:{layoutManager:this._layoutManager,eventName:t,args:e}},n=new CustomEvent(re.ChildEventName,i),o=globalThis.opener;if(null===o)throw new K(\"EHPTP15778\");o.dispatchEvent(n)}propagateToThisAndSubtree(t,e){this.emitUnknown(t,...e);for(let i=0;ithis.handleContainerResize())),this._windowBeforeUnloadListener=()=>this.onBeforeUnload(),this._windowBeforeUnloadListening=!1,this._maximisedStackBeforeDestroyedListener=t=>this.cleanupBeforeMaximisedStackDestroyed(t),this.isSubWindow=t.isSubWindow,this._constructorOrSubWindowLayoutConfig=t.constructorOrSubWindowLayoutConfig,Q.checkInitialise(),dt.checkInitialise(),void 0!==t.containerElement&&(this._containerElement=t.containerElement)}get container(){return this._containerElement}get isInitialised(){return this._isInitialised}get groundItem(){return this._groundItem}get root(){return this._groundItem}get openPopouts(){return this._openPopouts}get dropTargetIndicator(){return this._dropTargetIndicator}get transitionIndicator(){return this._transitionIndicator}get width(){return this._width}get height(){return this._height}get eventHub(){return this._eventHub}get rootItem(){if(void 0===this._groundItem)throw new Error(\"Cannot access rootItem before init\");return 0===this._groundItem.contentItems.length?void 0:this._groundItem.contentItems[0]}get focusedComponentItem(){return this._focusedComponentItem}get tabDropPlaceholder(){return this._tabDropPlaceholder}get maximisedStack(){return this._maximisedStack}get deprecatedConstructor(){return!this.isSubWindow&&void 0!==this._constructorOrSubWindowLayoutConfig}destroy(){if(this._isInitialised){this._windowBeforeUnloadListening&&(globalThis.removeEventListener(\"beforeunload\",this._windowBeforeUnloadListener),this._windowBeforeUnloadListening=!1),!0===this.layoutConfig.settings.closePopoutsOnUnload&&this.closeAllOpenPopouts(),this._resizeObserver.disconnect(),this.checkClearResizeTimeout(),void 0!==this._groundItem&&this._groundItem.destroy(),this._tabDropPlaceholder.remove(),null!==this._dropTargetIndicator&&this._dropTargetIndicator.destroy(),null!==this._transitionIndicator&&this._transitionIndicator.destroy(),this._eventHub.destroy();for(const t of this._dragSources)t.destroy();this._dragSources=[],this._isInitialised=!1}}minifyConfig(t){return _t.minifyConfig(t)}unminifyConfig(t){return _t.unminifyConfig(t)}init(){let t;if(this.setContainer(),this._dropTargetIndicator=new oe,this._transitionIndicator=new se,this.updateSizeFromContainer(),this.isSubWindow){if(void 0===this._constructorOrSubWindowLayoutConfig)throw new J(\"LMIU07155\");{const e=this._constructorOrSubWindowLayoutConfig.root;if(void 0===e)throw new X(\"LMIC07156\");if(!Ct.isComponent(e))throw new X(\"LMIC07157\");t=e;const i=xt.resolve(this._constructorOrSubWindowLayoutConfig);this.layoutConfig=Object.assign(Object.assign({},i),{root:void 0})}}else void 0===this._constructorOrSubWindowLayoutConfig?this.layoutConfig=_t.createDefault():this.layoutConfig=xt.resolve(this._constructorOrSubWindowLayoutConfig);const e=this.layoutConfig;this._groundItem=new Yt(this,e.root,this._containerElement),this._groundItem.init(),this.checkLoadedLayoutMaximiseItem(),this._resizeObserver.observe(this._containerElement),this._isInitialised=!0,this.adjustColumnsResponsive(),this.emit(\"initialised\"),void 0!==t&&this.loadComponentAsRoot(t)}loadLayout(t){if(!this.isInitialised)throw new Error(\"GoldenLayout: Need to call init() if LayoutConfig with defined root passed to constructor\");if(void 0===this._groundItem)throw new J(\"LMLL11119\");this.createSubWindows(),this.layoutConfig=xt.resolve(t),this._groundItem.loadRoot(this.layoutConfig.root),this.checkLoadedLayoutMaximiseItem(),this.adjustColumnsResponsive()}saveLayout(){if(!1===this._isInitialised)throw new Error(\"Can't create config, layout not yet initialised\");if(void 0===this._groundItem)throw new J(\"LMTC18244\");{const t=this._groundItem.calculateConfigContent();let e;e=1!==t.length?void 0:t[0],this.reconcilePopoutWindows();const i=[];for(let t=0;t=0?n=this._groundItem.contentItems[0]:e=0;break;case at.row:case at.column:e=n.addItem(t,i.index);break;case at.stack:if(Ct.isComponent(t)){e=n.addItem(t,i.index);break}throw Error(tt[6]);case at.component:throw new X(\"LMAIALC87444602\");default:throw new Y(\"LMAIALU98881733\",n.type)}if(Ct.isComponent(t)){const t=n.contentItems[e];Gt.isStack(t)&&(n=t,e=0)}return i.parentItem=n,i.index=e,i}}}loadComponentAsRoot(t){if(void 0===this._groundItem)throw new Error(\"Cannot add item before init\");this._groundItem.loadComponentAsRoot(t)}updateSize(t,e){this.setSize(t,e)}setSize(t,e){if(this._width=t,this._height=e,!0===this._isInitialised){if(void 0===this._groundItem)throw new J(\"LMUS18881\");if(this._groundItem.setSize(this._width,this._height),this._maximisedStack){const{width:t,height:e}=kt(this._containerElement);Tt(this._maximisedStack.element,t),At(this._maximisedStack.element,e),this._maximisedStack.updateSize(!1)}this.adjustColumnsResponsive()}}beginSizeInvalidation(){this._sizeInvalidationBeginCount++}endSizeInvalidation(){0==--this._sizeInvalidationBeginCount&&this.updateSizeFromContainer()}updateSizeFromContainer(){const{width:t,height:e}=kt(this._containerElement);this.setSize(t,e)}updateRootSize(t=!1){if(void 0===this._groundItem)throw new J(\"LMURS28881\");this._groundItem.updateSize(t)}createAndInitContentItem(t,e){const i=this.createContentItem(t,e);return i.init(),i}createContentItem(t,e){if(\"string\"!=typeof t.type)throw new G(\"Missing parameter 'type'\",JSON.stringify(t));if(ct.isComponentItem(t)&&!(e instanceof ee)&&e&&!(!0===this.isSubWindow&&e instanceof Yt)){t={type:at.stack,content:[t],size:t.size,sizeUnit:t.sizeUnit,minSize:t.minSize,minSizeUnit:t.minSizeUnit,id:t.id,maximised:t.maximised,isClosable:t.isClosable,activeItemIndex:0,header:void 0}}return this.createContentItemFromConfig(t,e)}findFirstComponentItemById(t){if(void 0===this._groundItem)throw new J(\"LMFFCIBI82446\");return this.findFirstContentItemTypeByIdRecursive(at.component,t,this._groundItem)}createPopout(t,e,i,n){return t instanceof Gt?this.createPopoutFromContentItem(t,e,i,n):this.createPopoutFromItemConfig(t,e,i,n)}createPopoutFromContentItem(t,e,i,n){let o=t.parent,s=t;for(;null!==o&&1===o.contentItems.length&&!o.isGround;)s=o,o=o.parent;if(null===o)throw new K(\"LMCPFCI00834\");{if(void 0===n&&(n=o.contentItems.indexOf(s)),null!==i&&o.addPopInParentId(i),void 0===e){const i=globalThis.screenX||globalThis.screenLeft,n=globalThis.screenY||globalThis.screenTop,o=t.element.offsetLeft,s=t.element.offsetTop,{width:r,height:a}=kt(t.element);e={left:i+o,top:n+s,width:r,height:a}}const r=t.toConfig();if(t.remove(),ft.isRootItemConfig(r))return this.createPopoutFromItemConfig(r,e,i,n);throw new Error(`${tt[0]}`)}}beginVirtualSizedContainerAdding(){0==++this._virtualSizedContainerAddingBeginCount&&(this._virtualSizedContainers.length=0)}addVirtualSizedContainer(t){this._virtualSizedContainers.push(t)}endVirtualSizedContainerAdding(){if(0==--this._virtualSizedContainerAddingBeginCount){const t=this._virtualSizedContainers.length;if(t>0){this.fireBeforeVirtualRectingEvent(t);for(let e=0;ethis.emit(\"windowOpened\",a))),a.on(\"closed\",(()=>this.reconcilePopoutWindows())),this._openPopouts.push(a),this.layoutConfig.settings.closePopoutsOnUnload&&!this._windowBeforeUnloadListening&&(globalThis.addEventListener(\"beforeunload\",this._windowBeforeUnloadListener,{passive:!0}),this._windowBeforeUnloadListening=!0),a}closeAllOpenPopouts(){for(let t=0;tglobalThis.close()),1)}getArea(t,e){let i=null,n=1/0;for(let o=0;o=s.x1&&t=s.y1&&es.surface&&(n=s.surface,i=s)}return i}calculateItemAreas(){const t=this.getAllContentItems(),e=this._groundItem;if(void 0===e)throw new J(\"LMCIAR44365\");if(1!==t.length){e.contentItems[0].isStack?this._itemAreas=[]:this._itemAreas=e.createSideAreas();for(let e=0;e0){let e=t[0];if(Gt.isComponentItem(e)){const t=e.parent;if(null===t)throw new K(\"LMXLLMI69999\");e=t}if(!Gt.isStack(e))throw new X(\"LMCLLMI19993\");e.maximise()}}}processMaximiseStack(t){if(this._maximisedStack=t,t.on(\"beforeItemDestroyed\",this._maximisedStackBeforeDestroyedListener),t.element.classList.add(\"lm_maximised\"),t.element.insertAdjacentElement(\"afterend\",this._maximisePlaceholder),void 0===this._groundItem)throw new J(\"LMMXI19993\");{this._groundItem.element.prepend(t.element);const{width:e,height:i}=kt(this._containerElement);Tt(t.element,e),At(t.element,i),t.updateSize(!0),t.focusActiveContentItem(),this._maximisedStack.emit(\"maximised\"),this.emit(\"stateChanged\")}}processMinimiseMaximisedStack(){if(void 0===this._maximisedStack)throw new X(\"LMMMS74422\");{const t=this._maximisedStack;if(null===t.parent)throw new K(\"LMMI13668\");t.element.classList.remove(\"lm_maximised\"),this._maximisePlaceholder.insertAdjacentElement(\"afterend\",t.element),this._maximisePlaceholder.remove(),this.updateRootSize(!0),this._maximisedStack=void 0,t.off(\"beforeItemDestroyed\",this._maximisedStackBeforeDestroyedListener),t.emit(\"minimised\"),this.emit(\"stateChanged\")}}reconcilePopoutWindows(){const t=[];for(let e=0;e{this._resizeTimeoutId=void 0,this.beginSizeInvalidation(),this.endSizeInvalidation()}),this.resizeDebounceInterval))}checkClearResizeTimeout(){void 0!==this._resizeTimeoutId&&(clearTimeout(this._resizeTimeoutId),this._resizeTimeoutId=void 0)}setContainer(){var t;const e=document.body,i=null!==(t=this._containerElement)&&void 0!==t?t:e;if(i===e){this.resizeWithContainerAutomatically=!0;const t=document.documentElement;t.style.height=\"100%\",t.style.margin=\"0\",t.style.padding=\"0\",t.style.overflow=\"clip\",e.style.height=\"100%\",e.style.margin=\"0\",e.style.padding=\"0\",e.style.overflow=\"clip\"}this._containerElement=i}onBeforeUnload(){this.destroy()}adjustColumnsResponsive(){if(void 0===this._groundItem)throw new J(\"LMACR20883\");if(this._firstLoad=!1,this.useResponsiveLayout()&&!this._updatingColumnsResponsive&&this._groundItem.contentItems.length>0&&this._groundItem.contentItems[0].isRow){if(void 0===this._groundItem||null===this._width)throw new J(\"LMACR77412\");{const t=this._groundItem.contentItems[0].contentItems.length;if(t<=1)return;{const e=this.layoutConfig.dimensions.defaultMinItemWidth;if(t*e<=this._width)return;{this._updatingColumnsResponsive=!0;const i=t-Math.max(Math.floor(this._width/e),1),n=this._groundItem.contentItems[0],o=this.getAllStacks();if(0===o.length)throw new X(\"LMACRS77413\");{const t=o[0];for(let e=0;en?void 0:{parentItem:t,index:o}}}case 1:if(void 0===this._focusedComponentItem)return;{const t=this._focusedComponentItem.parentItem;return this.tryCreateLocationFromParentItem(t,e)}case 2:{const t=this.findFirstContentItemType(at.stack);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 3:{let t=this.findFirstContentItemType(at.row);return void 0!==t?this.tryCreateLocationFromParentItem(t,e):(t=this.findFirstContentItemType(at.column),void 0!==t?this.tryCreateLocationFromParentItem(t,e):void 0)}case 4:{const t=this.findFirstContentItemType(at.row);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 5:{const t=this.findFirstContentItemType(at.column);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 6:if(void 0===this._groundItem)throw new J(\"LMFLRIF18244\");return void 0!==this.rootItem?void 0:void 0===e||0===e?{parentItem:this._groundItem,index:0}:void 0;case 7:if(void 0===this._groundItem)throw new J(\"LMFLF18244\");{const t=this._groundItem.contentItems;if(0===t.length)return void 0===e||0===e?{parentItem:this._groundItem,index:0}:void 0;{const i=t[0];return this.tryCreateLocationFromParentItem(i,e)}}}}tryCreateLocationFromParentItem(t,e){const i=t.contentItems.length;return void 0===e?{parentItem:t,index:i}:e<0||e>i?void 0:{parentItem:t,index:e}}}!function(t){t.createMaximisePlaceElement=function(t){const e=t.createElement(\"div\");return e.classList.add(\"lm_maximise_place\"),e},t.createTabDropPlaceholderElement=function(t){const e=t.createElement(\"div\");return e.classList.add(\"lm_drop_tab_placeholder\"),e},t.defaultLocationSelectors=[{typeId:1,index:void 0},{typeId:2,index:void 0},{typeId:3,index:void 0},{typeId:7,index:void 0}],t.afterFocusedItemIfPossibleLocationSelectors=[{typeId:0,index:1},{typeId:2,index:void 0},{typeId:3,index:void 0},{typeId:7,index:void 0}]}(ae||(ae={}));class le extends ae{constructor(t,e,i,n){if(super(le.createLayoutManagerConstructorParameters(t,e)),this._bindComponentEventHanlderPassedInConstructor=!1,this._creationTimeoutPassed=!1,void 0!==e&&\"function\"==typeof e&&(this.bindComponentEvent=e,this._bindComponentEventHanlderPassedInConstructor=!0,void 0!==i&&(this.unbindComponentEvent=i)),!this._bindComponentEventHanlderPassedInConstructor&&this.isSubWindow){if(void 0===this._constructorOrSubWindowLayoutConfig)throw new J(\"VLC98823\");{const t=xt.resolve(this._constructorOrSubWindowLayoutConfig);this.layoutConfig=Object.assign(Object.assign({},t),{root:void 0})}}!0!==n&&(this.deprecatedConstructor||this.init())}destroy(){this.bindComponentEvent=void 0,this.unbindComponentEvent=void 0,super.destroy()}init(){if(this._bindComponentEventHanlderPassedInConstructor||\"loading\"!==document.readyState&&null!==document.body){if(!this._bindComponentEventHanlderPassedInConstructor&&!0===this.isSubWindow&&!this._creationTimeoutPassed)return setTimeout((()=>this.init()),7),void(this._creationTimeoutPassed=!0);!0===this.isSubWindow&&(this._bindComponentEventHanlderPassedInConstructor||this.clearHtmlAndAdjustStylesForSubWindow(),window.__glInstance=this),super.init()}else document.addEventListener(\"DOMContentLoaded\",(()=>this.init()),{passive:!0})}clearHtmlAndAdjustStylesForSubWindow(){const t=document.head,e=new Array(4);e[0]=document.querySelectorAll(\"body link\"),e[1]=document.querySelectorAll(\"body style\"),e[2]=document.querySelectorAll(\"template\"),e[3]=document.querySelectorAll(\".gl_keep\");for(let i=0;ithis.emit(\"popIn\"))),document.body.appendChild(t),!0}}bindComponent(t,e){if(void 0!==this.bindComponentEvent){return this.bindComponentEvent(t,e)}if(void 0!==this.getComponentEvent)return{virtual:!1,component:this.getComponentEvent(t,e)};{const t=`${tt[2]}: ${JSON.stringify(e)}`;throw new Z(t)}}unbindComponent(t,e,i){if(void 0!==this.unbindComponentEvent)this.unbindComponentEvent(t);else if(!e&&void 0!==this.releaseComponentEvent){if(void 0===i)throw new J(\"VCUCRCU333998\");this.releaseComponentEvent(t,i)}}}!function(t){let e=!1;t.createLayoutManagerConstructorParameters=function(t,i){const n=e?null:new URL(document.location.href).searchParams.get(\"gl-window\");e=!0;const o=null!==n;let s,r;if(null!==n){const e=localStorage.getItem(n);if(null===e)throw new Error(\"Null gl-window Config\");localStorage.removeItem(n);const i=JSON.parse(e),o=_t.unminifyConfig(i);r=xt.fromResolved(o),t instanceof HTMLElement&&(s=t)}else void 0===t?r=void 0:t instanceof HTMLElement?(r=void 0,s=t):r=t,void 0===s&&i instanceof HTMLElement&&(s=i);return{constructorOrSubWindowLayoutConfig:r,isSubWindow:o,containerElement:s}}}(le||(le={}));class he extends le{constructor(t,e,i){super(t,e,i,!0),this._componentTypesMap=new Map,this._registeredComponentMap=new Map,this._virtuableComponentMap=new Map,this._containerVirtualRectingRequiredEventListener=(t,e,i)=>this.handleContainerVirtualRectingRequiredEvent(t,e,i),this._containerVirtualVisibilityChangeRequiredEventListener=(t,e)=>this.handleContainerVirtualVisibilityChangeRequiredEvent(t,e),this._containerVirtualZIndexChangeRequiredEventListener=(t,e,i)=>this.handleContainerVirtualZIndexChangeRequiredEvent(t,e,i),this.deprecatedConstructor||this.init()}registerComponent(t,e,i=!1){if(\"function\"!=typeof e)throw new $(\"registerComponent() componentConstructorOrFactoryFtn parameter is not a function\");if(e.hasOwnProperty(\"prototype\")){const n=e;this.registerComponentConstructor(t,n,i)}else{const n=e;this.registerComponentFactoryFunction(t,n,i)}}registerComponentConstructor(t,e,i=!1){if(\"function\"!=typeof e)throw new Error(tt[1]);if(void 0!==this._componentTypesMap.get(t))throw new Z(`${tt[3]}: ${t}`);this._componentTypesMap.set(t,{constructor:e,factoryFunction:void 0,virtual:i})}registerComponentFactoryFunction(t,e,i=!1){if(\"function\"!=typeof e)throw new Z(\"Please register a constructor function\");if(void 0!==this._componentTypesMap.get(t))throw new Z(`${tt[3]}: ${t}`);this._componentTypesMap.set(t,{constructor:void 0,factoryFunction:e,virtual:i})}registerComponentFunction(t){this.registerGetComponentConstructorCallback(t)}registerGetComponentConstructorCallback(t){if(\"function\"!=typeof t)throw new Error(\"Please register a callback function\");void 0!==this._getComponentConstructorFtn&&console.warn(\"Multiple component functions are being registered. Only the final registered function will be used.\"),this._getComponentConstructorFtn=t}getRegisteredComponentTypeNames(){const t=this._componentTypesMap.keys();return Array.from(t)}getComponentInstantiator(t){let e;const i=pt.resolveComponentTypeName(t);return void 0!==i&&(e=this._componentTypesMap.get(i)),void 0===e&&void 0!==this._getComponentConstructorFtn&&(e={constructor:this._getComponentConstructorFtn(t),factoryFunction:void 0,virtual:!1}),e}bindComponent(t,e){let i;const n=pt.resolveComponentTypeName(e);let o;if(void 0!==n&&(i=this._componentTypesMap.get(n)),void 0===i&&void 0!==this._getComponentConstructorFtn&&(i={constructor:this._getComponentConstructorFtn(e),factoryFunction:void 0,virtual:!1}),void 0!==i){const s=i.virtual;let r,a;r=void 0===e.componentState?void 0:Ut({},e.componentState);const l=i.constructor;if(void 0!==l)a=new l(t,r,s);else{const e=i.factoryFunction;if(void 0===e)throw new X(\"LMBCFFU10008\");a=e(t,r,s)}if(s){if(void 0===a)throw new J(\"GLBCVCU988774\");{const e=a,i=e.rootHtmlElement;if(void 0===i)throw new Z(`${tt[5]}: ${n}`);!function(t){const e=\"absolute\";t.style.position!==e&&(t.style.position=e)}(i),this.container.appendChild(i),this._virtuableComponentMap.set(t,e),t.virtualRectingRequiredEvent=this._containerVirtualRectingRequiredEventListener,t.virtualVisibilityChangeRequiredEvent=this._containerVirtualVisibilityChangeRequiredEventListener,t.virtualZIndexChangeRequiredEvent=this._containerVirtualZIndexChangeRequiredEventListener}}this._registeredComponentMap.set(t,a),o={virtual:i.virtual,component:a}}else o=super.bindComponent(t,e);return o}unbindComponent(t,e,i){if(void 0===this._registeredComponentMap.get(t))super.unbindComponent(t,e,i);else{const e=this._virtuableComponentMap.get(t);if(void 0!==e){const i=e.rootHtmlElement;if(void 0===i)throw new X(\"GLUC77743\",t.title);this.container.removeChild(i),this._virtuableComponentMap.delete(t)}}}fireBeforeVirtualRectingEvent(t){this._goldenLayoutBoundingClientRect=this.container.getBoundingClientRect(),super.fireBeforeVirtualRectingEvent(t)}handleContainerVirtualRectingRequiredEvent(t,e,i){const n=this._virtuableComponentMap.get(t);if(void 0===n)throw new J(\"GLHCSCE55933\");{const o=n.rootHtmlElement;if(void 0===o)throw new Z(tt[4]+\" \"+t.title);{const n=t.element.getBoundingClientRect(),s=n.left-this._goldenLayoutBoundingClientRect.left;o.style.left=zt(s);const r=n.top-this._goldenLayoutBoundingClientRect.top;o.style.top=zt(r),Tt(o,e),At(o,i)}}}handleContainerVirtualVisibilityChangeRequiredEvent(t,e){const i=this._virtuableComponentMap.get(t);if(void 0===i)throw new J(\"GLHCVVCRE55934\");{const n=i.rootHtmlElement;if(void 0===n)throw new Z(tt[4]+\" \"+t.title);Dt(n,e)}}handleContainerVirtualZIndexChangeRequiredEvent(t,e,i){const n=this._virtuableComponentMap.get(t);if(void 0===n)throw new J(\"GLHCVZICRE55935\");{const e=n.rootHtmlElement;if(void 0===e)throw new Z(tt[4]+\" \"+t.title);e.style.zIndex=i}}}const de=\"initial_\",ce={show:\"top\",popout:!1,maximise:!1,close:\"close-tab-unused\"},me={headerHeight:31},ue={hasHeaders:!0,reorderEnabled:!0},pe={popoutWholeStack:!1,constrainDragToContainer:!1,constrainDragToHeaders:!1,preventDragout:!1,showMaximiseIcon:!1,showPopoutIcon:!1,showCloseIcon:!1,blockedPopoutsThrowError:!0,closePopoutsOnUnload:!0,selectionEnabled:!1};var ge,fe;class ve{constructor(e){this.layout=e,ge.set(this,void 0),fe.set(this,void 0),this.handleResize=t=>{t.forEach((t=>this.resizeElement(t.target)))},this.handleMutation=()=>{this.layout.viewComponentsByContainerElement.forEach((t=>{this.resizeElement(t.container.element)}))},t.__classPrivateFieldSet(this,ge,new ResizeObserver(this.handleResize),\"f\"),t.__classPrivateFieldSet(this,fe,new MutationObserver(this.handleMutation),\"f\")}observeMutations(e){t.__classPrivateFieldGet(this,fe,\"f\")?.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[\"class\"]})}destroy(){t.__classPrivateFieldGet(this,ge,\"f\").disconnect(),t.__classPrivateFieldGet(this,fe,\"f\").disconnect()}observeContainer(e){t.__classPrivateFieldGet(this,ge,\"f\").observe(e)}unobserveContainer(e){t.__classPrivateFieldGet(this,ge,\"f\").unobserve(e)}resizeElement(t){const e=this.layout.viewComponentsByContainerElement.get(t);e&&e.resize()}}ge=new WeakMap,fe=new WeakMap;var _e={};Object.defineProperty(_e,\"__esModule\",{value:!0});var ye=_e.BaseItem=void 0;class Ce{constructor(t,e,i){this._item=t,this._layout=e,this._wrap=i}get raw(){return this._item}get layout(){return this._layout}get type(){return this._item.type}get contentItems(){return(this._item.contentItems??[]).map((t=>this._wrap(t)))}get parent(){const t=this._item.parent;return t?this._wrap(t):null}setActiveContentItem(t,e){if(\"stack\"!==this.type)throw new Error(`Cannot call setActiveContentItem from a non-stack item: ${this.type}`);this._item.setActiveContentItem(t.raw,e)}static wrapInternal(t,e,i){const n=Ce.wrapCache.get(e);if(n)return n;const o=new t(e,i,(e=>Ce.wrapInternal(t,e,i)));return Ce.wrapCache.set(e,o),o}}ye=_e.BaseItem=Ce,Ce.wrapCache=new WeakMap;const we=t=>!!t&&\"contentItems\"in t&&(t.isRow||t.isColumn);class Ie extends ye{isRoot(){return!!this._item.parent?.isGround}getBounds(){return this._item.element.getBoundingClientRect()}get viewName(){if(this._item.isComponent){const{component:t}=this._item;return t.identity.name}throw new Error(\"View name not found\")}onDestroyed(t){const e=({target:i})=>{i===this._item&&(t(),this._item.off(\"itemDestroyed\",e))};this._item.on(\"itemDestroyed\",e)}createAdjacentStack({position:t=\"right\"}={}){const e=this.raw;if(ee.isStack(e)&&e.parent){const i=[\"top\",\"bottom\"].includes(t)?\"column\":\"row\",n=[\"left\",\"top\"].includes(t)?1:0,o=we(e.parent)?e.parent:e.layoutManager,s=o,r=e.parent.contentItems.indexOf(e);e.parent.isGround&&e.parent.removeChild(e,!0);const a=o.newItem({type:i,content:[{type:\"stack\",content:[]}]},r);if(!a)throw new Error(\"createAdjacentStack: Failed to create new container\");const l=a.contentItems[0];return a.addChild(this.raw,n),we(s)&&s.removeChild(e,!0),this._wrap(l)}throw new Error(`Cannot creat adjacent stacks for type: ${e.type}, must be type 'stack'`)}setActiveContentItem(t,e=!0){if(!ee.isStack(this._item))throw new Error(`Cannot call setActiveContentItem from a non-stack item: ${this.type}`);this._item.setActiveComponentItem(t.raw,!e)}static wrap(t,e){return ye.wrapInternal(Ie,t,e)}}function be(t=[],e){for(const i of t)\"component\"===i.type?Object.keys(e).forEach((t=>{t in i&&(i.componentState={[`${de}${t}`]:i[t],...i.componentState}),i[t]=e[t]})):be(i.content,e)}function Se(t=[],e,i){for(const n of t)if(\"component\"===n.type)Object.keys(e).forEach((t=>{if(`${de}${t}`in n.componentState)return n[t]=n.componentState[`${de}${t}`],void delete n.componentState[`${de}${t}`];n[t]=e[t]}));else{if(n.size&&(\"row\"===i||\"column\"===i)){n[\"row\"===i?\"width\":\"height\"]=n.size?.includes(\".\")?parseFloat(n.size):parseInt(n.size)}Se(n.content,e,n.type)}}function Ee(t){if(t.root){t.root.content&&Se([t.root],{componentName:\"view\",isClosable:!0});const e=t.root;t.content=[e],delete t.root}return t}const xe=e=>class extends e{connectedCallback(){if(!this.name||!this.uuid)throw new Error(\" Name or uuid attribute missing\");if(!this.src)throw new Error(\" missing 'src' attribute.\");this.#t||(this.#t=document.createElement(\"iframe\"),this.#t.src=this.src,this.#t.style.height=\"100%\",this.#t.style.width=\"100%\",this.#t.style.border=\"none\",this.forceFrameName?this.#t.setAttribute(\"name\",this.forceFrameName):this.#t.setAttribute(\"name\",t.encodeOptions({brokerUrl:this.brokerUrl,name:this.name,uuid:this.uuid,providerId:this.providerId,contextGroup:this.contextGroup},\"of-frame\")),this.#t.setAttribute(\"id\",this.name),this.appendChild(this.#t))}#t;get brokerUrl(){return this.getAttribute(\"of-broker\")}set brokerUrl(t){t&&this.setAttribute(\"of-broker\",t)}get name(){return this.getAttribute(\"of-name\")}set name(t){t&&this.setAttribute(\"of-name\",t)}get forceFrameName(){return this.getAttribute(\"forceFrameName\")}set forceFrameName(t){t&&this.setAttribute(\"forceFrameName\",t)}get uuid(){return this.getAttribute(\"of-uuid\")}set uuid(t){t&&this.setAttribute(\"of-uuid\",t)}get src(){return this.getAttribute(\"src\")}set src(t){t&&this.setAttribute(\"src\",t)}get providerId(){return this.getAttribute(\"of-provider-id\")}set providerId(t){t&&this.setAttribute(\"of-provider-id\",t)}get contextGroup(){return this.getAttribute(\"of-context-group\")}set contextGroup(t){t&&this.setAttribute(\"of-context-group\",t)}static get observedAttributes(){return[\"name\"]}};class Le{static create(t){const e=document.createElement(\"of-view\");return Object.entries(t).forEach((([t,i])=>{e.setAttribute(t,i)})),e}}customElements.define(\"of-view\",xe(HTMLElement));class ze{constructor(t,i,n,{brokerUrl:o,interopConfig:s},r){this.container=t,this.config=i,this.ofView=null,this.isDragging=()=>this.container.tab.element?.className.includes(\"lm_dragging\")??!1;const{url:a,web:l,interop:h,name:d}=i||{},c=d??`internal-generated-view-${e.v4()}`;if(this.identity={uuid:n,name:c},this.container.element.setAttribute(\"of-name\",c),this.container.element.id=`container-${c}`,this.container.parent.id=c,void 0===a)return void this.handleUrlMissing();const m=this.updateTitleIfNotSet(a),u={\"of-broker\":o,\"of-uuid\":n,\"of-name\":c,src:a};l?.frameName&&(u.forceFrameName=l.frameName);const p=h?.currentContextGroup??s?.currentContextGroup;p&&(u[\"of-context-group\"]=p),s?.providerId&&(u[\"of-provider-id\"]=s?.providerId),this.ofView=Le.create(u),this.ofView.title=m??`Iframe: ${a}`,r.appendChild(this.ofView),this.ofView.style.position=\"absolute\"}updateTitleIfNotSet(t){return\"view\"===this.container.parent.title&&this.container.parent.setTitle(t),this.container.parent.title}handleUrlMissing(){const t=document.createElement(\"div\");t.setAttribute(\"style\",\"padding: 20px\");t.innerText=\"No URL provided\",this.container.element.appendChild(t)}destroy(){this.ofView?.remove(),this.ofView=null}closeView(){this.container.close()}resize(){if(this.ofView){if(this.isDragging())return void(this.ofView.style.display=\"none\");const t=this.container.element.getBoundingClientRect();this.ofView.style.position=\"absolute\",this.ofView.style.height=`${t.height}px`,this.ofView.style.width=`${t.width}px`,this.ofView.style.inset=`${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`,this.ofView.style.display=\"block\"}}}class Me extends U{static overrideConfig(t){const e={...ue,...t.settings,...pe};return e.reorderEnabled?be(t.content,{isClosable:!0}):be(t.content,{reorderEnabled:!1}),{dimensions:me,...t,settings:e,header:{...ce,show:!1!==t.settings?.hasHeaders&&ce.show}}}constructor(t,e,i,{options:n},o,s){super(),this.identity=t,this.container=e,this.initialConfig=i,this.layoutManager=o,this.platformProvider=s,this.viewComponentsByContainerElement=new Map,this.layoutContentCache=_.getSingleInstance(),this.reparentingViews=new Set,this.goldenLayoutDestroyed=!1,this.createViewComponent=(t,e)=>{m.handleSharedView(this.layoutManager,this.identity,e);const i=new ze(t,e,this.identity.uuid,this.options,this.iframeContainer);return e&&!1===e[`${de}isClosable`]&&this.stylesheet.insertRule(`#tab-${i.identity.name} .lm_close_tab { display: none; }`),this.viewComponentsByContainerElement.set(t.element,i),this.resizeController.observeContainer(t.element),i},this.iframeContainer=document.createElement(\"div\"),this.iframeContainer.id=`openfin-layout-iframe-container-${this.identity.layoutName}`,this.domEmitter=new V(e),this.setupStylesheets(),this.layout=new he(this.container),this.layout.resizeWithContainerAutomatically=!0,this.options=n,this.layout.registerComponent(\"view\",this.createViewComponent),this.setupListeners(),this.resizeController=new ve(this),this.layout.loadLayout(Me.overrideConfig(i));const r=document.createElement(\"div\");r.id=`openfin-layout-shadow-container-${this.identity.layoutName}`,r.attachShadow({mode:\"open\",delegatesFocus:!1}).appendChild(this.iframeContainer),this.container.appendChild(r),this.resizeController.observeMutations(this.container)}getStackByView({name:t}){const e=this.layout.findFirstComponentItemById(t);if(e?.parent&&e?.parent?.isStack)return Ie.wrap(e.parent,this)}getRoot(){return Ie.wrap(this.layout.rootItem,this)}async platformCloseView(t){const e=[...this.viewComponentsByContainerElement.values()].find((e=>e.identity.name===t.name));if(!e)throw new Error(`View with name: ${t.name} not found in layout.`);e.closeView()}async platformCreateView(t,{location:e,targetView:i}={}){if(i)throw new Error(\"TargetView not supported in web\");const n={options:this.platformProvider.normalizeOptions(t),target:this.identity,location:e};return this.insertView(n)}setupStylesheets(){if(this.container.setAttribute(\"data-openfin-layout-name\",this.identity.layoutName),this.stylesheet=new CSSStyleSheet,this.stylesheet.insertRule(\".lm_close { display: none; }\"),document.adoptedStyleSheets.push(this.stylesheet),this.initialConfig.settings?.preventSplitterResize){const t=`\\n [data-openfin-layout-name='${this.identity.layoutName}'] .lm_splitter {\\n pointer-events: none;\\n }`;this.stylesheet.insertRule(t)}}insertView({options:t,location:e,targetView:i}){const n=e?this.layoutContentCache.getItemOrUndefined(e.id):void 0,o=i?this.layoutContentCache.getItemOrUndefined(i.name):void 0,s=n??o??Ie.wrap(this.layout.rootItem,this);let r;if(ee.isStack(s.raw))r=s.raw;else{if(!we(s.raw))throw new Error(\"Cannot add a view at the requested location\");r=s.raw.newItem({type:\"stack\",content:[]})}const a=Math.min(r.contentItems.length,e?.index??r.contentItems.length);let l=this.layout.findFirstComponentItemById(t.name);l?(l.parent&&l.parent.removeChild(l,!0),r.addChild(l,a)):l=r.newComponent(\"view\",t,t.title??t.url??\"Default Title\",a);const h=l.component.identity;return Promise.resolve({identity:h})}replaceView({viewToReplace:t,newView:e}){throw new Error(\"Method not implemented.\")}replaceLayout(t){throw new Error(\"Method not implemented.\")}async cleanupView(t){}applyPreset(t){throw new Error(\"Method not implemented.\")}getCurrentViews(){return[...this.viewComponentsByContainerElement.values()].map((t=>t.identity))}async getFrameSnapshot(){return Ee(xt.fromResolved(this.layout.toConfig()))}isVisible(){return W(this.container)}async onViewDetached({viewIdentity:t}){this.reparentingViews.add(t.name),this.platformCloseView(t)}async destroy(){this.goldenLayoutDestroyed||(this.goldenLayoutDestroyed=!0,this.layout.destroy()),this.iframeContainer.remove(),this.resizeController.destroy(),document.adoptedStyleSheets=document.adoptedStyleSheets.filter((t=>t!==this.stylesheet)),this.viewComponentsByContainerElement.clear()}setupListeners(){this.container.addEventListener(\"pointerdown\",(t=>{if(t.target instanceof HTMLElement){const e=t.target.classList;[\"lm_tab\",\"lm_title\",\"lm_splitter\",\"lm_drag_handle\"].some((t=>e.contains(t)))&&(this.handleDragStart(),2===t.button&&t.stopPropagation())}}),!0),document.addEventListener(\"pointerup\",(()=>this.handleDragEnd()),!0),this.layout.on(\"tabCreated\",(t=>{const e=t.componentItem.component;t.element.id=`tab-${e.identity.name}`,this.domEmitter.dispatchLocalEvent(\"tab-created\",e.identity)})),this.layout.on(\"itemCreated\",(({target:t})=>{const e=t;if(Gt.isComponentItem(e)){const t=e.component;this.domEmitter.dispatchLocalEvent(\"container-created\",t.identity)}})),this.layout.on(\"itemDestroyed\",(t=>{const e=t.target;if(Gt.isComponentItem(e)){const t=e.component;this.removeViewComponent(t)}})),this.layout.on(\"itemDropped\",(()=>{this.handleDragEnd()}))}handleDragStart(){this.iframeContainer.style.pointerEvents=\"none\"}handleDragEnd(){this.iframeContainer.style.pointerEvents=\"\"}removeViewComponent(t){if(t.config&&!1===t.config[`${de}isClosable`]){const e=[...this.stylesheet.cssRules].findIndex((e=>e.cssText.includes(`#tab-${t.identity.name}`)));this.stylesheet.deleteRule(e)}t.destroy(),this.viewComponentsByContainerElement.delete(t.container.element),this.resizeController.unobserveContainer(t.container.element),this.reparentingViews.has(t.identity.name)?this.reparentingViews.delete(t.identity.name):this.platformProvider.closeView(t.identity.name);0===this.getCurrentViews().length&&(this.goldenLayoutDestroyed||(this.goldenLayoutDestroyed=!0,m.handleLastViewRemoved(this.layoutManager,this.identity)))}}class Pe{constructor(t,e,i,n){this.windowIdentity=t,this.connectConfig=e,this.provider=i,this.fallbackContainer=n}async createLayout(t,e){if(!(\"container\"in t)&&!this.fallbackContainer)throw new Error(\"Container property is not optional in web\");const{layoutName:i}=t,n=t,o=this.provider.initLayoutViews(n),s=n.container??this.fallbackContainer,r={...this.windowIdentity,layoutName:i},a=new Me(r,s,o,this.connectConfig,e,this.provider);m.registerLayout(e,i,a),this.fallbackContainer=null}async getLayoutSnapshot(t){return t.getLayoutSnapshot()}async handleLastViewRemoved(t){}}class Te{static async init(e){const i=e.getFin().InterApplicationBus.Channel,n=await i.create(`custom-frame-${e.me.uuid}`);return n.setDefaultAction((async(t,{target:e,opts:i},o)=>{const s=n.connections.find((t=>t.name===e.name));if(s)return n.dispatch(s,t,{...i,target:e});throw new Error(`Client with name ${e.name} not found`)})),await t.relayChannelClientApi_1(n,\"layout-relay\"),new Te(e)}constructor(t){this.wire=t,this.viewNames=new Set}normalizeOptions(t,i=\"default\"){const n=this.wire.me.uuid;let{name:o=`internal-generated-view-${e.v4()}`}=t;return o.match(/^internal-generated-view-/)&&this.viewNames.has(o)&&\"duplicate\"===i&&(o=`internal-generated-view-${e.v4()}`),this.viewNames.add(o),{...t,name:o,uuid:n}}closeView(t){this.viewNames.delete(t)}initLayoutViews({layout:t,multiInstanceViewBehavior:e}){return H((t=>{if(\"component\"===t.type&&t.componentState){const i=this.normalizeOptions(t.componentState,e);return{...t,componentState:i}}return t}),t)}}var Ae;const ke=t=>t;Ae=new WeakMap,exports.WebLayoutEntryPoint=class{constructor(e){Ae.set(this,void 0),this.initLayoutManager=async(e,i,{container:n,layoutManagerOverride:o})=>{const s=await Te.init(i),r=o??ke,a=new Pe(i.me,t.__classPrivateFieldGet(this,Ae,\"f\"),s,n),l=new(r(m.createClosedConstructor(a)));return await M(i,l),l},this.applyLayoutSnapshot=async(e,i,n)=>{await i.applyLayoutSnapshot(t.__classPrivateFieldGet(this,Ae,\"f\").platform.layoutSnapshot)},this.createLayout=async(t,e)=>m.createLayout(t,e),this.destroyLayout=async(t,e)=>m.destroyLayout(t,e),t.__classPrivateFieldSet(this,Ae,e,\"f\")}};\n","'use strict'\n\nexports.byteLength = byteLength\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\nfor (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i]\n revLookup[code.charCodeAt(i)] = i\n}\n\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction getLens (b64) {\n var len = b64.length\n\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // Trim off extra bytes after placeholder bytes are found\n // See: https://github.com/beatgammit/base64-js/issues/42\n var validLen = b64.indexOf('=')\n if (validLen === -1) validLen = len\n\n var placeHoldersLen = validLen === len\n ? 0\n : 4 - (validLen % 4)\n\n return [validLen, placeHoldersLen]\n}\n\n// base64 is 4/3 + up to two characters of the original data\nfunction byteLength (b64) {\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction _byteLength (b64, validLen, placeHoldersLen) {\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction toByteArray (b64) {\n var tmp\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n\n var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))\n\n var curByte = 0\n\n // if there are placeholders, only get up to the last complete 4 chars\n var len = placeHoldersLen > 0\n ? validLen - 4\n : validLen\n\n var i\n for (i = 0; i < len; i += 4) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 18) |\n (revLookup[b64.charCodeAt(i + 1)] << 12) |\n (revLookup[b64.charCodeAt(i + 2)] << 6) |\n revLookup[b64.charCodeAt(i + 3)]\n arr[curByte++] = (tmp >> 16) & 0xFF\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 2) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 2) |\n (revLookup[b64.charCodeAt(i + 1)] >> 4)\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 1) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 10) |\n (revLookup[b64.charCodeAt(i + 1)] << 4) |\n (revLookup[b64.charCodeAt(i + 2)] >> 2)\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] +\n lookup[num >> 12 & 0x3F] +\n lookup[num >> 6 & 0x3F] +\n lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n var tmp\n var output = []\n for (var i = start; i < end; i += 3) {\n tmp =\n ((uint8[i] << 16) & 0xFF0000) +\n ((uint8[i + 1] << 8) & 0xFF00) +\n (uint8[i + 2] & 0xFF)\n output.push(tripletToBase64(tmp))\n }\n return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n var tmp\n var len = uint8.length\n var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n var parts = []\n var maxChunkLength = 16383 // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1]\n parts.push(\n lookup[tmp >> 2] +\n lookup[(tmp << 4) & 0x3F] +\n '=='\n )\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + uint8[len - 1]\n parts.push(\n lookup[tmp >> 10] +\n lookup[(tmp >> 4) & 0x3F] +\n lookup[(tmp << 2) & 0x3F] +\n '='\n )\n }\n\n return parts.join('')\n}\n","/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n/* eslint-disable no-proto */\n\n'use strict'\n\nconst base64 = require('base64-js')\nconst ieee754 = require('ieee754')\nconst customInspectSymbol =\n (typeof Symbol === 'function' && typeof Symbol['for'] === 'function') // eslint-disable-line dot-notation\n ? Symbol['for']('nodejs.util.inspect.custom') // eslint-disable-line dot-notation\n : null\n\nexports.Buffer = Buffer\nexports.SlowBuffer = SlowBuffer\nexports.INSPECT_MAX_BYTES = 50\n\nconst K_MAX_LENGTH = 0x7fffffff\nexports.kMaxLength = K_MAX_LENGTH\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Print warning and recommend using `buffer` v4.x which has an Object\n * implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * We report that the browser does not support typed arrays if the are not subclassable\n * using __proto__. Firefox 4-29 lacks support for adding new properties to `Uint8Array`\n * (See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438). IE 10 lacks support\n * for __proto__ and has a buggy typed array implementation.\n */\nBuffer.TYPED_ARRAY_SUPPORT = typedArraySupport()\n\nif (!Buffer.TYPED_ARRAY_SUPPORT && typeof console !== 'undefined' &&\n typeof console.error === 'function') {\n console.error(\n 'This browser lacks typed array (Uint8Array) support which is required by ' +\n '`buffer` v5.x. Use `buffer` v4.x if you require old browser support.'\n )\n}\n\nfunction typedArraySupport () {\n // Can typed array instances can be augmented?\n try {\n const arr = new Uint8Array(1)\n const proto = { foo: function () { return 42 } }\n Object.setPrototypeOf(proto, Uint8Array.prototype)\n Object.setPrototypeOf(arr, proto)\n return arr.foo() === 42\n } catch (e) {\n return false\n }\n}\n\nObject.defineProperty(Buffer.prototype, 'parent', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.buffer\n }\n})\n\nObject.defineProperty(Buffer.prototype, 'offset', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.byteOffset\n }\n})\n\nfunction createBuffer (length) {\n if (length > K_MAX_LENGTH) {\n throw new RangeError('The value \"' + length + '\" is invalid for option \"size\"')\n }\n // Return an augmented `Uint8Array` instance\n const buf = new Uint8Array(length)\n Object.setPrototypeOf(buf, Buffer.prototype)\n return buf\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new TypeError(\n 'The \"string\" argument must be of type string. Received type number'\n )\n }\n return allocUnsafe(arg)\n }\n return from(arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\nfunction from (value, encodingOrOffset, length) {\n if (typeof value === 'string') {\n return fromString(value, encodingOrOffset)\n }\n\n if (ArrayBuffer.isView(value)) {\n return fromArrayView(value)\n }\n\n if (value == null) {\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n }\n\n if (isInstance(value, ArrayBuffer) ||\n (value && isInstance(value.buffer, ArrayBuffer))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof SharedArrayBuffer !== 'undefined' &&\n (isInstance(value, SharedArrayBuffer) ||\n (value && isInstance(value.buffer, SharedArrayBuffer)))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof value === 'number') {\n throw new TypeError(\n 'The \"value\" argument must not be of type number. Received type number'\n )\n }\n\n const valueOf = value.valueOf && value.valueOf()\n if (valueOf != null && valueOf !== value) {\n return Buffer.from(valueOf, encodingOrOffset, length)\n }\n\n const b = fromObject(value)\n if (b) return b\n\n if (typeof Symbol !== 'undefined' && Symbol.toPrimitive != null &&\n typeof value[Symbol.toPrimitive] === 'function') {\n return Buffer.from(value[Symbol.toPrimitive]('string'), encodingOrOffset, length)\n }\n\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n return from(value, encodingOrOffset, length)\n}\n\n// Note: Change prototype *after* Buffer.from is defined to workaround Chrome bug:\n// https://github.com/feross/buffer/pull/148\nObject.setPrototypeOf(Buffer.prototype, Uint8Array.prototype)\nObject.setPrototypeOf(Buffer, Uint8Array)\n\nfunction assertSize (size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be of type number')\n } else if (size < 0) {\n throw new RangeError('The value \"' + size + '\" is invalid for option \"size\"')\n }\n}\n\nfunction alloc (size, fill, encoding) {\n assertSize(size)\n if (size <= 0) {\n return createBuffer(size)\n }\n if (fill !== undefined) {\n // Only pay attention to encoding if it's a string. This\n // prevents accidentally sending in a number that would\n // be interpreted as a start offset.\n return typeof encoding === 'string'\n ? createBuffer(size).fill(fill, encoding)\n : createBuffer(size).fill(fill)\n }\n return createBuffer(size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n return alloc(size, fill, encoding)\n}\n\nfunction allocUnsafe (size) {\n assertSize(size)\n return createBuffer(size < 0 ? 0 : checked(size) | 0)\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n return allocUnsafe(size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n return allocUnsafe(size)\n}\n\nfunction fromString (string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8'\n }\n\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n\n const length = byteLength(string, encoding) | 0\n let buf = createBuffer(length)\n\n const actual = buf.write(string, encoding)\n\n if (actual !== length) {\n // Writing a hex string, for example, that contains invalid characters will\n // cause everything after the first invalid character to be ignored. (e.g.\n // 'abxxcd' will be treated as 'ab')\n buf = buf.slice(0, actual)\n }\n\n return buf\n}\n\nfunction fromArrayLike (array) {\n const length = array.length < 0 ? 0 : checked(array.length) | 0\n const buf = createBuffer(length)\n for (let i = 0; i < length; i += 1) {\n buf[i] = array[i] & 255\n }\n return buf\n}\n\nfunction fromArrayView (arrayView) {\n if (isInstance(arrayView, Uint8Array)) {\n const copy = new Uint8Array(arrayView)\n return fromArrayBuffer(copy.buffer, copy.byteOffset, copy.byteLength)\n }\n return fromArrayLike(arrayView)\n}\n\nfunction fromArrayBuffer (array, byteOffset, length) {\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\"offset\" is outside of buffer bounds')\n }\n\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\"length\" is outside of buffer bounds')\n }\n\n let buf\n if (byteOffset === undefined && length === undefined) {\n buf = new Uint8Array(array)\n } else if (length === undefined) {\n buf = new Uint8Array(array, byteOffset)\n } else {\n buf = new Uint8Array(array, byteOffset, length)\n }\n\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(buf, Buffer.prototype)\n\n return buf\n}\n\nfunction fromObject (obj) {\n if (Buffer.isBuffer(obj)) {\n const len = checked(obj.length) | 0\n const buf = createBuffer(len)\n\n if (buf.length === 0) {\n return buf\n }\n\n obj.copy(buf, 0, 0, len)\n return buf\n }\n\n if (obj.length !== undefined) {\n if (typeof obj.length !== 'number' || numberIsNaN(obj.length)) {\n return createBuffer(0)\n }\n return fromArrayLike(obj)\n }\n\n if (obj.type === 'Buffer' && Array.isArray(obj.data)) {\n return fromArrayLike(obj.data)\n }\n}\n\nfunction checked (length) {\n // Note: cannot use `length < K_MAX_LENGTH` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= K_MAX_LENGTH) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + K_MAX_LENGTH.toString(16) + ' bytes')\n }\n return length | 0\n}\n\nfunction SlowBuffer (length) {\n if (+length != length) { // eslint-disable-line eqeqeq\n length = 0\n }\n return Buffer.alloc(+length)\n}\n\nBuffer.isBuffer = function isBuffer (b) {\n return b != null && b._isBuffer === true &&\n b !== Buffer.prototype // so Buffer.isBuffer(Buffer.prototype) will be false\n}\n\nBuffer.compare = function compare (a, b) {\n if (isInstance(a, Uint8Array)) a = Buffer.from(a, a.offset, a.byteLength)\n if (isInstance(b, Uint8Array)) b = Buffer.from(b, b.offset, b.byteLength)\n if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n throw new TypeError(\n 'The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array'\n )\n }\n\n if (a === b) return 0\n\n let x = a.length\n let y = b.length\n\n for (let i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i]\n y = b[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n switch (String(encoding).toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'latin1':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return true\n default:\n return false\n }\n}\n\nBuffer.concat = function concat (list, length) {\n if (!Array.isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n\n if (list.length === 0) {\n return Buffer.alloc(0)\n }\n\n let i\n if (length === undefined) {\n length = 0\n for (i = 0; i < list.length; ++i) {\n length += list[i].length\n }\n }\n\n const buffer = Buffer.allocUnsafe(length)\n let pos = 0\n for (i = 0; i < list.length; ++i) {\n let buf = list[i]\n if (isInstance(buf, Uint8Array)) {\n if (pos + buf.length > buffer.length) {\n if (!Buffer.isBuffer(buf)) buf = Buffer.from(buf)\n buf.copy(buffer, pos)\n } else {\n Uint8Array.prototype.set.call(\n buffer,\n buf,\n pos\n )\n }\n } else if (!Buffer.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n } else {\n buf.copy(buffer, pos)\n }\n pos += buf.length\n }\n return buffer\n}\n\nfunction byteLength (string, encoding) {\n if (Buffer.isBuffer(string)) {\n return string.length\n }\n if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) {\n return string.byteLength\n }\n if (typeof string !== 'string') {\n throw new TypeError(\n 'The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. ' +\n 'Received type ' + typeof string\n )\n }\n\n const len = string.length\n const mustMatch = (arguments.length > 2 && arguments[2] === true)\n if (!mustMatch && len === 0) return 0\n\n // Use a for loop to avoid recursion\n let loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'ascii':\n case 'latin1':\n case 'binary':\n return len\n case 'utf8':\n case 'utf-8':\n return utf8ToBytes(string).length\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return len * 2\n case 'hex':\n return len >>> 1\n case 'base64':\n return base64ToBytes(string).length\n default:\n if (loweredCase) {\n return mustMatch ? -1 : utf8ToBytes(string).length // assume utf8\n }\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n let loweredCase = false\n\n // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n // property of a typed array.\n\n // This behaves neither like String nor Uint8Array in that we set start/end\n // to their upper/lower bounds if the value passed is out of range.\n // undefined is handled specially as per ECMA-262 6th Edition,\n // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n if (start === undefined || start < 0) {\n start = 0\n }\n // Return early if start > this.length. Done here to prevent potential uint32\n // coercion fail below.\n if (start > this.length) {\n return ''\n }\n\n if (end === undefined || end > this.length) {\n end = this.length\n }\n\n if (end <= 0) {\n return ''\n }\n\n // Force coercion to uint32. This will also coerce falsey/NaN values to 0.\n end >>>= 0\n start >>>= 0\n\n if (end <= start) {\n return ''\n }\n\n if (!encoding) encoding = 'utf8'\n\n while (true) {\n switch (encoding) {\n case 'hex':\n return hexSlice(this, start, end)\n\n case 'utf8':\n case 'utf-8':\n return utf8Slice(this, start, end)\n\n case 'ascii':\n return asciiSlice(this, start, end)\n\n case 'latin1':\n case 'binary':\n return latin1Slice(this, start, end)\n\n case 'base64':\n return base64Slice(this, start, end)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return utf16leSlice(this, start, end)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = (encoding + '').toLowerCase()\n loweredCase = true\n }\n }\n}\n\n// This property is used by `Buffer.isBuffer` (and the `is-buffer` npm package)\n// to detect a Buffer instance. It's not possible to use `instanceof Buffer`\n// reliably in a browserify context because there could be multiple different\n// copies of the 'buffer' package in use. This method works even for Buffer\n// instances that were created from another copy of the `buffer` package.\n// See: https://github.com/feross/buffer/issues/154\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n const i = b[n]\n b[n] = b[m]\n b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n const len = this.length\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits')\n }\n for (let i = 0; i < len; i += 2) {\n swap(this, i, i + 1)\n }\n return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n const len = this.length\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits')\n }\n for (let i = 0; i < len; i += 4) {\n swap(this, i, i + 3)\n swap(this, i + 1, i + 2)\n }\n return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n const len = this.length\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits')\n }\n for (let i = 0; i < len; i += 8) {\n swap(this, i, i + 7)\n swap(this, i + 1, i + 6)\n swap(this, i + 2, i + 5)\n swap(this, i + 3, i + 4)\n }\n return this\n}\n\nBuffer.prototype.toString = function toString () {\n const length = this.length\n if (length === 0) return ''\n if (arguments.length === 0) return utf8Slice(this, 0, length)\n return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.toLocaleString = Buffer.prototype.toString\n\nBuffer.prototype.equals = function equals (b) {\n if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n if (this === b) return true\n return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n let str = ''\n const max = exports.INSPECT_MAX_BYTES\n str = this.toString('hex', 0, max).replace(/(.{2})/g, '$1 ').trim()\n if (this.length > max) str += ' ... '\n return ''\n}\nif (customInspectSymbol) {\n Buffer.prototype[customInspectSymbol] = Buffer.prototype.inspect\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n if (isInstance(target, Uint8Array)) {\n target = Buffer.from(target, target.offset, target.byteLength)\n }\n if (!Buffer.isBuffer(target)) {\n throw new TypeError(\n 'The \"target\" argument must be one of type Buffer or Uint8Array. ' +\n 'Received type ' + (typeof target)\n )\n }\n\n if (start === undefined) {\n start = 0\n }\n if (end === undefined) {\n end = target ? target.length : 0\n }\n if (thisStart === undefined) {\n thisStart = 0\n }\n if (thisEnd === undefined) {\n thisEnd = this.length\n }\n\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError('out of range index')\n }\n\n if (thisStart >= thisEnd && start >= end) {\n return 0\n }\n if (thisStart >= thisEnd) {\n return -1\n }\n if (start >= end) {\n return 1\n }\n\n start >>>= 0\n end >>>= 0\n thisStart >>>= 0\n thisEnd >>>= 0\n\n if (this === target) return 0\n\n let x = thisEnd - thisStart\n let y = end - start\n const len = Math.min(x, y)\n\n const thisCopy = this.slice(thisStart, thisEnd)\n const targetCopy = target.slice(start, end)\n\n for (let i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i]\n y = targetCopy[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (numberIsNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [val], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n let indexSize = 1\n let arrLength = arr.length\n let valLength = val.length\n\n if (encoding !== undefined) {\n encoding = String(encoding).toLowerCase()\n if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n encoding === 'utf16le' || encoding === 'utf-16le') {\n if (arr.length < 2 || val.length < 2) {\n return -1\n }\n indexSize = 2\n arrLength /= 2\n valLength /= 2\n byteOffset /= 2\n }\n }\n\n function read (buf, i) {\n if (indexSize === 1) {\n return buf[i]\n } else {\n return buf.readUInt16BE(i * indexSize)\n }\n }\n\n let i\n if (dir) {\n let foundIndex = -1\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1) foundIndex = i\n if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n } else {\n if (foundIndex !== -1) i -= i - foundIndex\n foundIndex = -1\n }\n }\n } else {\n if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n for (i = byteOffset; i >= 0; i--) {\n let found = true\n for (let j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false\n break\n }\n }\n if (found) return i\n }\n }\n\n return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n offset = Number(offset) || 0\n const remaining = buf.length - offset\n if (!length) {\n length = remaining\n } else {\n length = Number(length)\n if (length > remaining) {\n length = remaining\n }\n }\n\n const strLen = string.length\n\n if (length > strLen / 2) {\n length = strLen / 2\n }\n let i\n for (i = 0; i < length; ++i) {\n const parsed = parseInt(string.substr(i * 2, 2), 16)\n if (numberIsNaN(parsed)) return i\n buf[offset + i] = parsed\n }\n return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n // Buffer#write(string)\n if (offset === undefined) {\n encoding = 'utf8'\n length = this.length\n offset = 0\n // Buffer#write(string, encoding)\n } else if (length === undefined && typeof offset === 'string') {\n encoding = offset\n length = this.length\n offset = 0\n // Buffer#write(string, offset[, length][, encoding])\n } else if (isFinite(offset)) {\n offset = offset >>> 0\n if (isFinite(length)) {\n length = length >>> 0\n if (encoding === undefined) encoding = 'utf8'\n } else {\n encoding = length\n length = undefined\n }\n } else {\n throw new Error(\n 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n )\n }\n\n const remaining = this.length - offset\n if (length === undefined || length > remaining) length = remaining\n\n if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n throw new RangeError('Attempt to write outside buffer bounds')\n }\n\n if (!encoding) encoding = 'utf8'\n\n let loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'hex':\n return hexWrite(this, string, offset, length)\n\n case 'utf8':\n case 'utf-8':\n return utf8Write(this, string, offset, length)\n\n case 'ascii':\n case 'latin1':\n case 'binary':\n return asciiWrite(this, string, offset, length)\n\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return base64Write(this, string, offset, length)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return ucs2Write(this, string, offset, length)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0)\n }\n}\n\nfunction base64Slice (buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf)\n } else {\n return base64.fromByteArray(buf.slice(start, end))\n }\n}\n\nfunction utf8Slice (buf, start, end) {\n end = Math.min(buf.length, end)\n const res = []\n\n let i = start\n while (i < end) {\n const firstByte = buf[i]\n let codePoint = null\n let bytesPerSequence = (firstByte > 0xEF)\n ? 4\n : (firstByte > 0xDF)\n ? 3\n : (firstByte > 0xBF)\n ? 2\n : 1\n\n if (i + bytesPerSequence <= end) {\n let secondByte, thirdByte, fourthByte, tempCodePoint\n\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 0x80) {\n codePoint = firstByte\n }\n break\n case 2:\n secondByte = buf[i + 1]\n if ((secondByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n if (tempCodePoint > 0x7F) {\n codePoint = tempCodePoint\n }\n }\n break\n case 3:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n codePoint = tempCodePoint\n }\n }\n break\n case 4:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n fourthByte = buf[i + 3]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n codePoint = tempCodePoint\n }\n }\n }\n }\n\n if (codePoint === null) {\n // we did not generate a valid codePoint so insert a\n // replacement char (U+FFFD) and advance only 1 byte\n codePoint = 0xFFFD\n bytesPerSequence = 1\n } else if (codePoint > 0xFFFF) {\n // encode to utf16 (surrogate pair dance)\n codePoint -= 0x10000\n res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n codePoint = 0xDC00 | codePoint & 0x3FF\n }\n\n res.push(codePoint)\n i += bytesPerSequence\n }\n\n return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nconst MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n const len = codePoints.length\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n }\n\n // Decode in chunks to avoid \"call stack size exceeded\".\n let res = ''\n let i = 0\n while (i < len) {\n res += String.fromCharCode.apply(\n String,\n codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n )\n }\n return res\n}\n\nfunction asciiSlice (buf, start, end) {\n let ret = ''\n end = Math.min(buf.length, end)\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F)\n }\n return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n let ret = ''\n end = Math.min(buf.length, end)\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i])\n }\n return ret\n}\n\nfunction hexSlice (buf, start, end) {\n const len = buf.length\n\n if (!start || start < 0) start = 0\n if (!end || end < 0 || end > len) end = len\n\n let out = ''\n for (let i = start; i < end; ++i) {\n out += hexSliceLookupTable[buf[i]]\n }\n return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n const bytes = buf.slice(start, end)\n let res = ''\n // If bytes.length is odd, the last 8 bits must be ignored (same as node.js)\n for (let i = 0; i < bytes.length - 1; i += 2) {\n res += String.fromCharCode(bytes[i] + (bytes[i + 1] * 256))\n }\n return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n const len = this.length\n start = ~~start\n end = end === undefined ? len : ~~end\n\n if (start < 0) {\n start += len\n if (start < 0) start = 0\n } else if (start > len) {\n start = len\n }\n\n if (end < 0) {\n end += len\n if (end < 0) end = 0\n } else if (end > len) {\n end = len\n }\n\n if (end < start) end = start\n\n const newBuf = this.subarray(start, end)\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(newBuf, Buffer.prototype)\n\n return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUintLE =\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let val = this[offset]\n let mul = 1\n let i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUintBE =\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n checkOffset(offset, byteLength, this.length)\n }\n\n let val = this[offset + --byteLength]\n let mul = 1\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUint8 =\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n return this[offset]\n}\n\nBuffer.prototype.readUint16LE =\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUint16BE =\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUint32LE =\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return ((this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16)) +\n (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUint32BE =\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] * 0x1000000) +\n ((this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n this[offset + 3])\n}\n\nBuffer.prototype.readBigUInt64LE = defineBigIntMethod(function readBigUInt64LE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const lo = first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24\n\n const hi = this[++offset] +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n last * 2 ** 24\n\n return BigInt(lo) + (BigInt(hi) << BigInt(32))\n})\n\nBuffer.prototype.readBigUInt64BE = defineBigIntMethod(function readBigUInt64BE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const hi = first * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset]\n\n const lo = this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last\n\n return (BigInt(hi) << BigInt(32)) + BigInt(lo)\n})\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let val = this[offset]\n let mul = 1\n let i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let i = byteLength\n let mul = 1\n let val = this[offset + --i]\n while (i > 0 && (mul *= 0x100)) {\n val += this[offset + --i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n if (!(this[offset] & 0x80)) return (this[offset])\n return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n const val = this[offset] | (this[offset + 1] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n const val = this[offset + 1] | (this[offset] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16) |\n (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] << 24) |\n (this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n (this[offset + 3])\n}\n\nBuffer.prototype.readBigInt64LE = defineBigIntMethod(function readBigInt64LE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const val = this[offset + 4] +\n this[offset + 5] * 2 ** 8 +\n this[offset + 6] * 2 ** 16 +\n (last << 24) // Overflow\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24)\n})\n\nBuffer.prototype.readBigInt64BE = defineBigIntMethod(function readBigInt64BE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const val = (first << 24) + // Overflow\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset]\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last)\n})\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUintLE =\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n let mul = 1\n let i = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUintBE =\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n let i = byteLength - 1\n let mul = 1\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUint8 =\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeUint16LE =\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeUint16BE =\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeUint32LE =\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset + 3] = (value >>> 24)\n this[offset + 2] = (value >>> 16)\n this[offset + 1] = (value >>> 8)\n this[offset] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeUint32BE =\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nfunction wrtBigUInt64LE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7)\n\n let lo = Number(value & BigInt(0xffffffff))\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n return offset\n}\n\nfunction wrtBigUInt64BE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7)\n\n let lo = Number(value & BigInt(0xffffffff))\n buf[offset + 7] = lo\n lo = lo >> 8\n buf[offset + 6] = lo\n lo = lo >> 8\n buf[offset + 5] = lo\n lo = lo >> 8\n buf[offset + 4] = lo\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n buf[offset + 3] = hi\n hi = hi >> 8\n buf[offset + 2] = hi\n hi = hi >> 8\n buf[offset + 1] = hi\n hi = hi >> 8\n buf[offset] = hi\n return offset + 8\n}\n\nBuffer.prototype.writeBigUInt64LE = defineBigIntMethod(function writeBigUInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeBigUInt64BE = defineBigIntMethod(function writeBigUInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n let i = 0\n let mul = 1\n let sub = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n let i = byteLength - 1\n let mul = 1\n let sub = 0\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n if (value < 0) value = 0xff + value + 1\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n this[offset + 2] = (value >>> 16)\n this[offset + 3] = (value >>> 24)\n return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (value < 0) value = 0xffffffff + value + 1\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeBigInt64LE = defineBigIntMethod(function writeBigInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nBuffer.prototype.writeBigInt64BE = defineBigIntMethod(function writeBigInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n }\n ieee754.write(buf, value, offset, littleEndian, 23, 4)\n return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n }\n ieee754.write(buf, value, offset, littleEndian, 52, 8)\n return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n if (!Buffer.isBuffer(target)) throw new TypeError('argument should be a Buffer')\n if (!start) start = 0\n if (!end && end !== 0) end = this.length\n if (targetStart >= target.length) targetStart = target.length\n if (!targetStart) targetStart = 0\n if (end > 0 && end < start) end = start\n\n // Copy 0 bytes; we're done\n if (end === start) return 0\n if (target.length === 0 || this.length === 0) return 0\n\n // Fatal error conditions\n if (targetStart < 0) {\n throw new RangeError('targetStart out of bounds')\n }\n if (start < 0 || start >= this.length) throw new RangeError('Index out of range')\n if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n // Are we oob?\n if (end > this.length) end = this.length\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start\n }\n\n const len = end - start\n\n if (this === target && typeof Uint8Array.prototype.copyWithin === 'function') {\n // Use built-in when available, missing from IE11\n this.copyWithin(targetStart, start, end)\n } else {\n Uint8Array.prototype.set.call(\n target,\n this.subarray(start, end),\n targetStart\n )\n }\n\n return len\n}\n\n// Usage:\n// buffer.fill(number[, offset[, end]])\n// buffer.fill(buffer[, offset[, end]])\n// buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n // Handle string cases:\n if (typeof val === 'string') {\n if (typeof start === 'string') {\n encoding = start\n start = 0\n end = this.length\n } else if (typeof end === 'string') {\n encoding = end\n end = this.length\n }\n if (encoding !== undefined && typeof encoding !== 'string') {\n throw new TypeError('encoding must be a string')\n }\n if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n if (val.length === 1) {\n const code = val.charCodeAt(0)\n if ((encoding === 'utf8' && code < 128) ||\n encoding === 'latin1') {\n // Fast path: If `val` fits into a single byte, use that numeric value.\n val = code\n }\n }\n } else if (typeof val === 'number') {\n val = val & 255\n } else if (typeof val === 'boolean') {\n val = Number(val)\n }\n\n // Invalid ranges are not set to a default, so can range check early.\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError('Out of range index')\n }\n\n if (end <= start) {\n return this\n }\n\n start = start >>> 0\n end = end === undefined ? this.length : end >>> 0\n\n if (!val) val = 0\n\n let i\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val\n }\n } else {\n const bytes = Buffer.isBuffer(val)\n ? val\n : Buffer.from(val, encoding)\n const len = bytes.length\n if (len === 0) {\n throw new TypeError('The value \"' + val +\n '\" is invalid for argument \"value\"')\n }\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len]\n }\n }\n\n return this\n}\n\n// CUSTOM ERRORS\n// =============\n\n// Simplified versions from Node, changed for Buffer-only usage\nconst errors = {}\nfunction E (sym, getMessage, Base) {\n errors[sym] = class NodeError extends Base {\n constructor () {\n super()\n\n Object.defineProperty(this, 'message', {\n value: getMessage.apply(this, arguments),\n writable: true,\n configurable: true\n })\n\n // Add the error code to the name to include it in the stack trace.\n this.name = `${this.name} [${sym}]`\n // Access the stack to generate the error message including the error code\n // from the name.\n this.stack // eslint-disable-line no-unused-expressions\n // Reset the name to the actual name.\n delete this.name\n }\n\n get code () {\n return sym\n }\n\n set code (value) {\n Object.defineProperty(this, 'code', {\n configurable: true,\n enumerable: true,\n value,\n writable: true\n })\n }\n\n toString () {\n return `${this.name} [${sym}]: ${this.message}`\n }\n }\n}\n\nE('ERR_BUFFER_OUT_OF_BOUNDS',\n function (name) {\n if (name) {\n return `${name} is outside of buffer bounds`\n }\n\n return 'Attempt to access memory outside buffer bounds'\n }, RangeError)\nE('ERR_INVALID_ARG_TYPE',\n function (name, actual) {\n return `The \"${name}\" argument must be of type number. Received type ${typeof actual}`\n }, TypeError)\nE('ERR_OUT_OF_RANGE',\n function (str, range, input) {\n let msg = `The value of \"${str}\" is out of range.`\n let received = input\n if (Number.isInteger(input) && Math.abs(input) > 2 ** 32) {\n received = addNumericalSeparator(String(input))\n } else if (typeof input === 'bigint') {\n received = String(input)\n if (input > BigInt(2) ** BigInt(32) || input < -(BigInt(2) ** BigInt(32))) {\n received = addNumericalSeparator(received)\n }\n received += 'n'\n }\n msg += ` It must be ${range}. Received ${received}`\n return msg\n }, RangeError)\n\nfunction addNumericalSeparator (val) {\n let res = ''\n let i = val.length\n const start = val[0] === '-' ? 1 : 0\n for (; i >= start + 4; i -= 3) {\n res = `_${val.slice(i - 3, i)}${res}`\n }\n return `${val.slice(0, i)}${res}`\n}\n\n// CHECK FUNCTIONS\n// ===============\n\nfunction checkBounds (buf, offset, byteLength) {\n validateNumber(offset, 'offset')\n if (buf[offset] === undefined || buf[offset + byteLength] === undefined) {\n boundsError(offset, buf.length - (byteLength + 1))\n }\n}\n\nfunction checkIntBI (value, min, max, buf, offset, byteLength) {\n if (value > max || value < min) {\n const n = typeof min === 'bigint' ? 'n' : ''\n let range\n if (byteLength > 3) {\n if (min === 0 || min === BigInt(0)) {\n range = `>= 0${n} and < 2${n} ** ${(byteLength + 1) * 8}${n}`\n } else {\n range = `>= -(2${n} ** ${(byteLength + 1) * 8 - 1}${n}) and < 2 ** ` +\n `${(byteLength + 1) * 8 - 1}${n}`\n }\n } else {\n range = `>= ${min}${n} and <= ${max}${n}`\n }\n throw new errors.ERR_OUT_OF_RANGE('value', range, value)\n }\n checkBounds(buf, offset, byteLength)\n}\n\nfunction validateNumber (value, name) {\n if (typeof value !== 'number') {\n throw new errors.ERR_INVALID_ARG_TYPE(name, 'number', value)\n }\n}\n\nfunction boundsError (value, length, type) {\n if (Math.floor(value) !== value) {\n validateNumber(value, type)\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset', 'an integer', value)\n }\n\n if (length < 0) {\n throw new errors.ERR_BUFFER_OUT_OF_BOUNDS()\n }\n\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset',\n `>= ${type ? 1 : 0} and <= ${length}`,\n value)\n}\n\n// HELPER FUNCTIONS\n// ================\n\nconst INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n // Node takes equal signs as end of the Base64 encoding\n str = str.split('=')[0]\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = str.trim().replace(INVALID_BASE64_RE, '')\n // Node converts strings with length < 2 to ''\n if (str.length < 2) return ''\n // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n while (str.length % 4 !== 0) {\n str = str + '='\n }\n return str\n}\n\nfunction utf8ToBytes (string, units) {\n units = units || Infinity\n let codePoint\n const length = string.length\n let leadSurrogate = null\n const bytes = []\n\n for (let i = 0; i < length; ++i) {\n codePoint = string.charCodeAt(i)\n\n // is surrogate component\n if (codePoint > 0xD7FF && codePoint < 0xE000) {\n // last char was a lead\n if (!leadSurrogate) {\n // no lead yet\n if (codePoint > 0xDBFF) {\n // unexpected trail\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n } else if (i + 1 === length) {\n // unpaired lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n }\n\n // valid lead\n leadSurrogate = codePoint\n\n continue\n }\n\n // 2 leads in a row\n if (codePoint < 0xDC00) {\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n leadSurrogate = codePoint\n continue\n }\n\n // valid surrogate pair\n codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n } else if (leadSurrogate) {\n // valid bmp char, but last char was a lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n }\n\n leadSurrogate = null\n\n // encode utf8\n if (codePoint < 0x80) {\n if ((units -= 1) < 0) break\n bytes.push(codePoint)\n } else if (codePoint < 0x800) {\n if ((units -= 2) < 0) break\n bytes.push(\n codePoint >> 0x6 | 0xC0,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x10000) {\n if ((units -= 3) < 0) break\n bytes.push(\n codePoint >> 0xC | 0xE0,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x110000) {\n if ((units -= 4) < 0) break\n bytes.push(\n codePoint >> 0x12 | 0xF0,\n codePoint >> 0xC & 0x3F | 0x80,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else {\n throw new Error('Invalid code point')\n }\n }\n\n return bytes\n}\n\nfunction asciiToBytes (str) {\n const byteArray = []\n for (let i = 0; i < str.length; ++i) {\n // Node's code seems to be doing this and not & 0x7F..\n byteArray.push(str.charCodeAt(i) & 0xFF)\n }\n return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n let c, hi, lo\n const byteArray = []\n for (let i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0) break\n\n c = str.charCodeAt(i)\n hi = c >> 8\n lo = c % 256\n byteArray.push(lo)\n byteArray.push(hi)\n }\n\n return byteArray\n}\n\nfunction base64ToBytes (str) {\n return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n let i\n for (i = 0; i < length; ++i) {\n if ((i + offset >= dst.length) || (i >= src.length)) break\n dst[i + offset] = src[i]\n }\n return i\n}\n\n// ArrayBuffer or Uint8Array objects from other contexts (i.e. iframes) do not pass\n// the `instanceof` check but they should be treated as of that type.\n// See: https://github.com/feross/buffer/issues/166\nfunction isInstance (obj, type) {\n return obj instanceof type ||\n (obj != null && obj.constructor != null && obj.constructor.name != null &&\n obj.constructor.name === type.name)\n}\nfunction numberIsNaN (obj) {\n // For IE11 support\n return obj !== obj // eslint-disable-line no-self-compare\n}\n\n// Create lookup table for `toString('hex')`\n// See: https://github.com/feross/buffer/issues/219\nconst hexSliceLookupTable = (function () {\n const alphabet = '0123456789abcdef'\n const table = new Array(256)\n for (let i = 0; i < 16; ++i) {\n const i16 = i * 16\n for (let j = 0; j < 16; ++j) {\n table[i16 + j] = alphabet[i] + alphabet[j]\n }\n }\n return table\n})()\n\n// Return not function with Error if BigInt not supported\nfunction defineBigIntMethod (fn) {\n return typeof BigInt === 'undefined' ? BufferBigIntNotDefined : fn\n}\n\nfunction BufferBigIntNotDefined () {\n throw new Error('BigInt not supported')\n}\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\nvar R = typeof Reflect === 'object' ? Reflect : null\nvar ReflectApply = R && typeof R.apply === 'function'\n ? R.apply\n : function ReflectApply(target, receiver, args) {\n return Function.prototype.apply.call(target, receiver, args);\n }\n\nvar ReflectOwnKeys\nif (R && typeof R.ownKeys === 'function') {\n ReflectOwnKeys = R.ownKeys\n} else if (Object.getOwnPropertySymbols) {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target)\n .concat(Object.getOwnPropertySymbols(target));\n };\n} else {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target);\n };\n}\n\nfunction ProcessEmitWarning(warning) {\n if (console && console.warn) console.warn(warning);\n}\n\nvar NumberIsNaN = Number.isNaN || function NumberIsNaN(value) {\n return value !== value;\n}\n\nfunction EventEmitter() {\n EventEmitter.init.call(this);\n}\nmodule.exports = EventEmitter;\nmodule.exports.once = once;\n\n// Backwards-compat with node 0.10.x\nEventEmitter.EventEmitter = EventEmitter;\n\nEventEmitter.prototype._events = undefined;\nEventEmitter.prototype._eventsCount = 0;\nEventEmitter.prototype._maxListeners = undefined;\n\n// By default EventEmitters will print a warning if more than 10 listeners are\n// added to it. This is a useful default which helps finding memory leaks.\nvar defaultMaxListeners = 10;\n\nfunction checkListener(listener) {\n if (typeof listener !== 'function') {\n throw new TypeError('The \"listener\" argument must be of type Function. Received type ' + typeof listener);\n }\n}\n\nObject.defineProperty(EventEmitter, 'defaultMaxListeners', {\n enumerable: true,\n get: function() {\n return defaultMaxListeners;\n },\n set: function(arg) {\n if (typeof arg !== 'number' || arg < 0 || NumberIsNaN(arg)) {\n throw new RangeError('The value of \"defaultMaxListeners\" is out of range. It must be a non-negative number. Received ' + arg + '.');\n }\n defaultMaxListeners = arg;\n }\n});\n\nEventEmitter.init = function() {\n\n if (this._events === undefined ||\n this._events === Object.getPrototypeOf(this)._events) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n }\n\n this._maxListeners = this._maxListeners || undefined;\n};\n\n// Obviously not all Emitters should be limited to 10. This function allows\n// that to be increased. Set to zero for unlimited.\nEventEmitter.prototype.setMaxListeners = function setMaxListeners(n) {\n if (typeof n !== 'number' || n < 0 || NumberIsNaN(n)) {\n throw new RangeError('The value of \"n\" is out of range. It must be a non-negative number. Received ' + n + '.');\n }\n this._maxListeners = n;\n return this;\n};\n\nfunction _getMaxListeners(that) {\n if (that._maxListeners === undefined)\n return EventEmitter.defaultMaxListeners;\n return that._maxListeners;\n}\n\nEventEmitter.prototype.getMaxListeners = function getMaxListeners() {\n return _getMaxListeners(this);\n};\n\nEventEmitter.prototype.emit = function emit(type) {\n var args = [];\n for (var i = 1; i < arguments.length; i++) args.push(arguments[i]);\n var doError = (type === 'error');\n\n var events = this._events;\n if (events !== undefined)\n doError = (doError && events.error === undefined);\n else if (!doError)\n return false;\n\n // If there is no 'error' event listener then throw.\n if (doError) {\n var er;\n if (args.length > 0)\n er = args[0];\n if (er instanceof Error) {\n // Note: The comments on the `throw` lines are intentional, they show\n // up in Node's output if this results in an unhandled exception.\n throw er; // Unhandled 'error' event\n }\n // At least give some kind of context to the user\n var err = new Error('Unhandled error.' + (er ? ' (' + er.message + ')' : ''));\n err.context = er;\n throw err; // Unhandled 'error' event\n }\n\n var handler = events[type];\n\n if (handler === undefined)\n return false;\n\n if (typeof handler === 'function') {\n ReflectApply(handler, this, args);\n } else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n ReflectApply(listeners[i], this, args);\n }\n\n return true;\n};\n\nfunction _addListener(target, type, listener, prepend) {\n var m;\n var events;\n var existing;\n\n checkListener(listener);\n\n events = target._events;\n if (events === undefined) {\n events = target._events = Object.create(null);\n target._eventsCount = 0;\n } else {\n // To avoid recursion in the case that type === \"newListener\"! Before\n // adding it to the listeners, first emit \"newListener\".\n if (events.newListener !== undefined) {\n target.emit('newListener', type,\n listener.listener ? listener.listener : listener);\n\n // Re-assign `events` because a newListener handler could have caused the\n // this._events to be assigned to a new object\n events = target._events;\n }\n existing = events[type];\n }\n\n if (existing === undefined) {\n // Optimize the case of one listener. Don't need the extra array object.\n existing = events[type] = listener;\n ++target._eventsCount;\n } else {\n if (typeof existing === 'function') {\n // Adding the second element, need to change to array.\n existing = events[type] =\n prepend ? [listener, existing] : [existing, listener];\n // If we've already got an array, just append.\n } else if (prepend) {\n existing.unshift(listener);\n } else {\n existing.push(listener);\n }\n\n // Check for listener leak\n m = _getMaxListeners(target);\n if (m > 0 && existing.length > m && !existing.warned) {\n existing.warned = true;\n // No error code for this since it is a Warning\n // eslint-disable-next-line no-restricted-syntax\n var w = new Error('Possible EventEmitter memory leak detected. ' +\n existing.length + ' ' + String(type) + ' listeners ' +\n 'added. Use emitter.setMaxListeners() to ' +\n 'increase limit');\n w.name = 'MaxListenersExceededWarning';\n w.emitter = target;\n w.type = type;\n w.count = existing.length;\n ProcessEmitWarning(w);\n }\n }\n\n return target;\n}\n\nEventEmitter.prototype.addListener = function addListener(type, listener) {\n return _addListener(this, type, listener, false);\n};\n\nEventEmitter.prototype.on = EventEmitter.prototype.addListener;\n\nEventEmitter.prototype.prependListener =\n function prependListener(type, listener) {\n return _addListener(this, type, listener, true);\n };\n\nfunction onceWrapper() {\n if (!this.fired) {\n this.target.removeListener(this.type, this.wrapFn);\n this.fired = true;\n if (arguments.length === 0)\n return this.listener.call(this.target);\n return this.listener.apply(this.target, arguments);\n }\n}\n\nfunction _onceWrap(target, type, listener) {\n var state = { fired: false, wrapFn: undefined, target: target, type: type, listener: listener };\n var wrapped = onceWrapper.bind(state);\n wrapped.listener = listener;\n state.wrapFn = wrapped;\n return wrapped;\n}\n\nEventEmitter.prototype.once = function once(type, listener) {\n checkListener(listener);\n this.on(type, _onceWrap(this, type, listener));\n return this;\n};\n\nEventEmitter.prototype.prependOnceListener =\n function prependOnceListener(type, listener) {\n checkListener(listener);\n this.prependListener(type, _onceWrap(this, type, listener));\n return this;\n };\n\n// Emits a 'removeListener' event if and only if the listener was removed.\nEventEmitter.prototype.removeListener =\n function removeListener(type, listener) {\n var list, events, position, i, originalListener;\n\n checkListener(listener);\n\n events = this._events;\n if (events === undefined)\n return this;\n\n list = events[type];\n if (list === undefined)\n return this;\n\n if (list === listener || list.listener === listener) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else {\n delete events[type];\n if (events.removeListener)\n this.emit('removeListener', type, list.listener || listener);\n }\n } else if (typeof list !== 'function') {\n position = -1;\n\n for (i = list.length - 1; i >= 0; i--) {\n if (list[i] === listener || list[i].listener === listener) {\n originalListener = list[i].listener;\n position = i;\n break;\n }\n }\n\n if (position < 0)\n return this;\n\n if (position === 0)\n list.shift();\n else {\n spliceOne(list, position);\n }\n\n if (list.length === 1)\n events[type] = list[0];\n\n if (events.removeListener !== undefined)\n this.emit('removeListener', type, originalListener || listener);\n }\n\n return this;\n };\n\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\n\nEventEmitter.prototype.removeAllListeners =\n function removeAllListeners(type) {\n var listeners, events, i;\n\n events = this._events;\n if (events === undefined)\n return this;\n\n // not listening for removeListener, no need to emit\n if (events.removeListener === undefined) {\n if (arguments.length === 0) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n } else if (events[type] !== undefined) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else\n delete events[type];\n }\n return this;\n }\n\n // emit removeListener for all listeners on all events\n if (arguments.length === 0) {\n var keys = Object.keys(events);\n var key;\n for (i = 0; i < keys.length; ++i) {\n key = keys[i];\n if (key === 'removeListener') continue;\n this.removeAllListeners(key);\n }\n this.removeAllListeners('removeListener');\n this._events = Object.create(null);\n this._eventsCount = 0;\n return this;\n }\n\n listeners = events[type];\n\n if (typeof listeners === 'function') {\n this.removeListener(type, listeners);\n } else if (listeners !== undefined) {\n // LIFO order\n for (i = listeners.length - 1; i >= 0; i--) {\n this.removeListener(type, listeners[i]);\n }\n }\n\n return this;\n };\n\nfunction _listeners(target, type, unwrap) {\n var events = target._events;\n\n if (events === undefined)\n return [];\n\n var evlistener = events[type];\n if (evlistener === undefined)\n return [];\n\n if (typeof evlistener === 'function')\n return unwrap ? [evlistener.listener || evlistener] : [evlistener];\n\n return unwrap ?\n unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length);\n}\n\nEventEmitter.prototype.listeners = function listeners(type) {\n return _listeners(this, type, true);\n};\n\nEventEmitter.prototype.rawListeners = function rawListeners(type) {\n return _listeners(this, type, false);\n};\n\nEventEmitter.listenerCount = function(emitter, type) {\n if (typeof emitter.listenerCount === 'function') {\n return emitter.listenerCount(type);\n } else {\n return listenerCount.call(emitter, type);\n }\n};\n\nEventEmitter.prototype.listenerCount = listenerCount;\nfunction listenerCount(type) {\n var events = this._events;\n\n if (events !== undefined) {\n var evlistener = events[type];\n\n if (typeof evlistener === 'function') {\n return 1;\n } else if (evlistener !== undefined) {\n return evlistener.length;\n }\n }\n\n return 0;\n}\n\nEventEmitter.prototype.eventNames = function eventNames() {\n return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : [];\n};\n\nfunction arrayClone(arr, n) {\n var copy = new Array(n);\n for (var i = 0; i < n; ++i)\n copy[i] = arr[i];\n return copy;\n}\n\nfunction spliceOne(list, index) {\n for (; index + 1 < list.length; index++)\n list[index] = list[index + 1];\n list.pop();\n}\n\nfunction unwrapListeners(arr) {\n var ret = new Array(arr.length);\n for (var i = 0; i < ret.length; ++i) {\n ret[i] = arr[i].listener || arr[i];\n }\n return ret;\n}\n\nfunction once(emitter, name) {\n return new Promise(function (resolve, reject) {\n function errorListener(err) {\n emitter.removeListener(name, resolver);\n reject(err);\n }\n\n function resolver() {\n if (typeof emitter.removeListener === 'function') {\n emitter.removeListener('error', errorListener);\n }\n resolve([].slice.call(arguments));\n };\n\n eventTargetAgnosticAddListener(emitter, name, resolver, { once: true });\n if (name !== 'error') {\n addErrorHandlerIfEventEmitter(emitter, errorListener, { once: true });\n }\n });\n}\n\nfunction addErrorHandlerIfEventEmitter(emitter, handler, flags) {\n if (typeof emitter.on === 'function') {\n eventTargetAgnosticAddListener(emitter, 'error', handler, flags);\n }\n}\n\nfunction eventTargetAgnosticAddListener(emitter, name, listener, flags) {\n if (typeof emitter.on === 'function') {\n if (flags.once) {\n emitter.once(name, listener);\n } else {\n emitter.on(name, listener);\n }\n } else if (typeof emitter.addEventListener === 'function') {\n // EventTarget does not have `error` event semantics like Node\n // EventEmitters, we do not listen for `error` events here.\n emitter.addEventListener(name, function wrapListener(arg) {\n // IE does not have builtin `{ once: true }` support so we\n // have to do it manually.\n if (flags.once) {\n emitter.removeEventListener(name, wrapListener);\n }\n listener(arg);\n });\n } else {\n throw new TypeError('The \"emitter\" argument must be of type EventEmitter. Received type ' + typeof emitter);\n }\n}\n","/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */\nexports.read = function (buffer, offset, isLE, mLen, nBytes) {\n var e, m\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var nBits = -7\n var i = isLE ? (nBytes - 1) : 0\n var d = isLE ? -1 : 1\n var s = buffer[offset + i]\n\n i += d\n\n e = s & ((1 << (-nBits)) - 1)\n s >>= (-nBits)\n nBits += eLen\n for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & ((1 << (-nBits)) - 1)\n e >>= (-nBits)\n nBits += mLen\n for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias\n } else if (e === eMax) {\n return m ? NaN : ((s ? -1 : 1) * Infinity)\n } else {\n m = m + Math.pow(2, mLen)\n e = e - eBias\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n var i = isLE ? 0 : (nBytes - 1)\n var d = isLE ? 1 : -1\n var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n value = Math.abs(value)\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0\n e = eMax\n } else {\n e = Math.floor(Math.log(value) / Math.LN2)\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--\n c *= 2\n }\n if (e + eBias >= 1) {\n value += rt / c\n } else {\n value += rt * Math.pow(2, 1 - eBias)\n }\n if (value * c >= 2) {\n e++\n c /= 2\n }\n\n if (e + eBias >= eMax) {\n m = 0\n e = eMax\n } else if (e + eBias >= 1) {\n m = ((value * c) - 1) * Math.pow(2, mLen)\n e = e + eBias\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n e = 0\n }\n }\n\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n e = (e << mLen) | m\n eLen += mLen\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128\n}\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView');\n\nmodule.exports = DataView;\n","var hashClear = require('./_hashClear'),\n hashDelete = require('./_hashDelete'),\n hashGet = require('./_hashGet'),\n hashHas = require('./_hashHas'),\n hashSet = require('./_hashSet');\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\nmodule.exports = Hash;\n","var listCacheClear = require('./_listCacheClear'),\n listCacheDelete = require('./_listCacheDelete'),\n listCacheGet = require('./_listCacheGet'),\n listCacheHas = require('./_listCacheHas'),\n listCacheSet = require('./_listCacheSet');\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\nmodule.exports = ListCache;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map');\n\nmodule.exports = Map;\n","var mapCacheClear = require('./_mapCacheClear'),\n mapCacheDelete = require('./_mapCacheDelete'),\n mapCacheGet = require('./_mapCacheGet'),\n mapCacheHas = require('./_mapCacheHas'),\n mapCacheSet = require('./_mapCacheSet');\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\nmodule.exports = MapCache;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Promise = getNative(root, 'Promise');\n\nmodule.exports = Promise;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Set = getNative(root, 'Set');\n\nmodule.exports = Set;\n","var MapCache = require('./_MapCache'),\n setCacheAdd = require('./_setCacheAdd'),\n setCacheHas = require('./_setCacheHas');\n\n/**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\nfunction SetCache(values) {\n var index = -1,\n length = values == null ? 0 : values.length;\n\n this.__data__ = new MapCache;\n while (++index < length) {\n this.add(values[index]);\n }\n}\n\n// Add methods to `SetCache`.\nSetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\nSetCache.prototype.has = setCacheHas;\n\nmodule.exports = SetCache;\n","var ListCache = require('./_ListCache'),\n stackClear = require('./_stackClear'),\n stackDelete = require('./_stackDelete'),\n stackGet = require('./_stackGet'),\n stackHas = require('./_stackHas'),\n stackSet = require('./_stackSet');\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\nmodule.exports = Stack;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Uint8Array = root.Uint8Array;\n\nmodule.exports = Uint8Array;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar WeakMap = getNative(root, 'WeakMap');\n\nmodule.exports = WeakMap;\n","/**\n * A specialized version of `_.forEach` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\nfunction arrayEach(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (iteratee(array[index], index, array) === false) {\n break;\n }\n }\n return array;\n}\n\nmodule.exports = arrayEach;\n","/**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\nfunction arrayFilter(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result[resIndex++] = value;\n }\n }\n return result;\n}\n\nmodule.exports = arrayFilter;\n","var baseTimes = require('./_baseTimes'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isIndex = require('./_isIndex'),\n isTypedArray = require('./isTypedArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = arrayLikeKeys;\n","/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n}\n\nmodule.exports = arrayPush;\n","/**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\nfunction arraySome(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (predicate(array[index], index, array)) {\n return true;\n }\n }\n return false;\n}\n\nmodule.exports = arraySome;\n","var baseAssignValue = require('./_baseAssignValue'),\n eq = require('./eq');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\nmodule.exports = assignValue;\n","var eq = require('./eq');\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\nmodule.exports = assocIndexOf;\n","var copyObject = require('./_copyObject'),\n keys = require('./keys');\n\n/**\n * The base implementation of `_.assign` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssign(object, source) {\n return object && copyObject(source, keys(source), object);\n}\n\nmodule.exports = baseAssign;\n","var copyObject = require('./_copyObject'),\n keysIn = require('./keysIn');\n\n/**\n * The base implementation of `_.assignIn` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssignIn(object, source) {\n return object && copyObject(source, keysIn(source), object);\n}\n\nmodule.exports = baseAssignIn;\n","var defineProperty = require('./_defineProperty');\n\n/**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction baseAssignValue(object, key, value) {\n if (key == '__proto__' && defineProperty) {\n defineProperty(object, key, {\n 'configurable': true,\n 'enumerable': true,\n 'value': value,\n 'writable': true\n });\n } else {\n object[key] = value;\n }\n}\n\nmodule.exports = baseAssignValue;\n","var Stack = require('./_Stack'),\n arrayEach = require('./_arrayEach'),\n assignValue = require('./_assignValue'),\n baseAssign = require('./_baseAssign'),\n baseAssignIn = require('./_baseAssignIn'),\n cloneBuffer = require('./_cloneBuffer'),\n copyArray = require('./_copyArray'),\n copySymbols = require('./_copySymbols'),\n copySymbolsIn = require('./_copySymbolsIn'),\n getAllKeys = require('./_getAllKeys'),\n getAllKeysIn = require('./_getAllKeysIn'),\n getTag = require('./_getTag'),\n initCloneArray = require('./_initCloneArray'),\n initCloneByTag = require('./_initCloneByTag'),\n initCloneObject = require('./_initCloneObject'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isMap = require('./isMap'),\n isObject = require('./isObject'),\n isSet = require('./isSet'),\n keys = require('./keys'),\n keysIn = require('./keysIn');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_FLAT_FLAG = 2,\n CLONE_SYMBOLS_FLAG = 4;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values supported by `_.clone`. */\nvar cloneableTags = {};\ncloneableTags[argsTag] = cloneableTags[arrayTag] =\ncloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =\ncloneableTags[boolTag] = cloneableTags[dateTag] =\ncloneableTags[float32Tag] = cloneableTags[float64Tag] =\ncloneableTags[int8Tag] = cloneableTags[int16Tag] =\ncloneableTags[int32Tag] = cloneableTags[mapTag] =\ncloneableTags[numberTag] = cloneableTags[objectTag] =\ncloneableTags[regexpTag] = cloneableTags[setTag] =\ncloneableTags[stringTag] = cloneableTags[symbolTag] =\ncloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =\ncloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;\ncloneableTags[errorTag] = cloneableTags[funcTag] =\ncloneableTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.clone` and `_.cloneDeep` which tracks\n * traversed objects.\n *\n * @private\n * @param {*} value The value to clone.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Deep clone\n * 2 - Flatten inherited properties\n * 4 - Clone symbols\n * @param {Function} [customizer] The function to customize cloning.\n * @param {string} [key] The key of `value`.\n * @param {Object} [object] The parent object of `value`.\n * @param {Object} [stack] Tracks traversed objects and their clone counterparts.\n * @returns {*} Returns the cloned value.\n */\nfunction baseClone(value, bitmask, customizer, key, object, stack) {\n var result,\n isDeep = bitmask & CLONE_DEEP_FLAG,\n isFlat = bitmask & CLONE_FLAT_FLAG,\n isFull = bitmask & CLONE_SYMBOLS_FLAG;\n\n if (customizer) {\n result = object ? customizer(value, key, object, stack) : customizer(value);\n }\n if (result !== undefined) {\n return result;\n }\n if (!isObject(value)) {\n return value;\n }\n var isArr = isArray(value);\n if (isArr) {\n result = initCloneArray(value);\n if (!isDeep) {\n return copyArray(value, result);\n }\n } else {\n var tag = getTag(value),\n isFunc = tag == funcTag || tag == genTag;\n\n if (isBuffer(value)) {\n return cloneBuffer(value, isDeep);\n }\n if (tag == objectTag || tag == argsTag || (isFunc && !object)) {\n result = (isFlat || isFunc) ? {} : initCloneObject(value);\n if (!isDeep) {\n return isFlat\n ? copySymbolsIn(value, baseAssignIn(result, value))\n : copySymbols(value, baseAssign(result, value));\n }\n } else {\n if (!cloneableTags[tag]) {\n return object ? value : {};\n }\n result = initCloneByTag(value, tag, isDeep);\n }\n }\n // Check for circular references and return its corresponding clone.\n stack || (stack = new Stack);\n var stacked = stack.get(value);\n if (stacked) {\n return stacked;\n }\n stack.set(value, result);\n\n if (isSet(value)) {\n value.forEach(function(subValue) {\n result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));\n });\n } else if (isMap(value)) {\n value.forEach(function(subValue, key) {\n result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n }\n\n var keysFunc = isFull\n ? (isFlat ? getAllKeysIn : getAllKeys)\n : (isFlat ? keysIn : keys);\n\n var props = isArr ? undefined : keysFunc(value);\n arrayEach(props || value, function(subValue, key) {\n if (props) {\n key = subValue;\n subValue = value[key];\n }\n // Recursively populate clone (susceptible to call stack limits).\n assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n return result;\n}\n\nmodule.exports = baseClone;\n","var isObject = require('./isObject');\n\n/** Built-in value references. */\nvar objectCreate = Object.create;\n\n/**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} proto The object to inherit from.\n * @returns {Object} Returns the new object.\n */\nvar baseCreate = (function() {\n function object() {}\n return function(proto) {\n if (!isObject(proto)) {\n return {};\n }\n if (objectCreate) {\n return objectCreate(proto);\n }\n object.prototype = proto;\n var result = new object;\n object.prototype = undefined;\n return result;\n };\n}());\n\nmodule.exports = baseCreate;\n","var arrayPush = require('./_arrayPush'),\n isArray = require('./isArray');\n\n/**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction baseGetAllKeys(object, keysFunc, symbolsFunc) {\n var result = keysFunc(object);\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n}\n\nmodule.exports = baseGetAllKeys;\n","var Symbol = require('./_Symbol'),\n getRawTag = require('./_getRawTag'),\n objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]';\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\nmodule.exports = baseIsArguments;\n","var baseIsEqualDeep = require('./_baseIsEqualDeep'),\n isObjectLike = require('./isObjectLike');\n\n/**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Unordered comparison\n * 2 - Partial comparison\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\nfunction baseIsEqual(value, other, bitmask, customizer, stack) {\n if (value === other) {\n return true;\n }\n if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\n return value !== value && other !== other;\n }\n return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n}\n\nmodule.exports = baseIsEqual;\n","var Stack = require('./_Stack'),\n equalArrays = require('./_equalArrays'),\n equalByTag = require('./_equalByTag'),\n equalObjects = require('./_equalObjects'),\n getTag = require('./_getTag'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isTypedArray = require('./isTypedArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n var objIsArr = isArray(object),\n othIsArr = isArray(other),\n objTag = objIsArr ? arrayTag : getTag(object),\n othTag = othIsArr ? arrayTag : getTag(other);\n\n objTag = objTag == argsTag ? objectTag : objTag;\n othTag = othTag == argsTag ? objectTag : othTag;\n\n var objIsObj = objTag == objectTag,\n othIsObj = othTag == objectTag,\n isSameTag = objTag == othTag;\n\n if (isSameTag && isBuffer(object)) {\n if (!isBuffer(other)) {\n return false;\n }\n objIsArr = true;\n objIsObj = false;\n }\n if (isSameTag && !objIsObj) {\n stack || (stack = new Stack);\n return (objIsArr || isTypedArray(object))\n ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n }\n if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n if (objIsWrapped || othIsWrapped) {\n var objUnwrapped = objIsWrapped ? object.value() : object,\n othUnwrapped = othIsWrapped ? other.value() : other;\n\n stack || (stack = new Stack);\n return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n }\n }\n if (!isSameTag) {\n return false;\n }\n stack || (stack = new Stack);\n return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n}\n\nmodule.exports = baseIsEqualDeep;\n","var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]';\n\n/**\n * The base implementation of `_.isMap` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n */\nfunction baseIsMap(value) {\n return isObjectLike(value) && getTag(value) == mapTag;\n}\n\nmodule.exports = baseIsMap;\n","var isFunction = require('./isFunction'),\n isMasked = require('./_isMasked'),\n isObject = require('./isObject'),\n toSource = require('./_toSource');\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\nmodule.exports = baseIsNative;\n","var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar setTag = '[object Set]';\n\n/**\n * The base implementation of `_.isSet` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n */\nfunction baseIsSet(value) {\n return isObjectLike(value) && getTag(value) == setTag;\n}\n\nmodule.exports = baseIsSet;\n","var baseGetTag = require('./_baseGetTag'),\n isLength = require('./isLength'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n\nmodule.exports = baseIsTypedArray;\n","var isPrototype = require('./_isPrototype'),\n nativeKeys = require('./_nativeKeys');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeys;\n","var isObject = require('./isObject'),\n isPrototype = require('./_isPrototype'),\n nativeKeysIn = require('./_nativeKeysIn');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeysIn(object) {\n if (!isObject(object)) {\n return nativeKeysIn(object);\n }\n var isProto = isPrototype(object),\n result = [];\n\n for (var key in object) {\n if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeysIn;\n","/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\nmodule.exports = baseTimes;\n","/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n return function(value) {\n return func(value);\n };\n}\n\nmodule.exports = baseUnary;\n","/**\n * Checks if a `cache` value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction cacheHas(cache, key) {\n return cache.has(key);\n}\n\nmodule.exports = cacheHas;\n","var Uint8Array = require('./_Uint8Array');\n\n/**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\nfunction cloneArrayBuffer(arrayBuffer) {\n var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n return result;\n}\n\nmodule.exports = cloneArrayBuffer;\n","var root = require('./_root');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined,\n allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;\n\n/**\n * Creates a clone of `buffer`.\n *\n * @private\n * @param {Buffer} buffer The buffer to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Buffer} Returns the cloned buffer.\n */\nfunction cloneBuffer(buffer, isDeep) {\n if (isDeep) {\n return buffer.slice();\n }\n var length = buffer.length,\n result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\n\n buffer.copy(result);\n return result;\n}\n\nmodule.exports = cloneBuffer;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer');\n\n/**\n * Creates a clone of `dataView`.\n *\n * @private\n * @param {Object} dataView The data view to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned data view.\n */\nfunction cloneDataView(dataView, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;\n return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);\n}\n\nmodule.exports = cloneDataView;\n","/** Used to match `RegExp` flags from their coerced string values. */\nvar reFlags = /\\w*$/;\n\n/**\n * Creates a clone of `regexp`.\n *\n * @private\n * @param {Object} regexp The regexp to clone.\n * @returns {Object} Returns the cloned regexp.\n */\nfunction cloneRegExp(regexp) {\n var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));\n result.lastIndex = regexp.lastIndex;\n return result;\n}\n\nmodule.exports = cloneRegExp;\n","var Symbol = require('./_Symbol');\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * Creates a clone of the `symbol` object.\n *\n * @private\n * @param {Object} symbol The symbol object to clone.\n * @returns {Object} Returns the cloned symbol object.\n */\nfunction cloneSymbol(symbol) {\n return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};\n}\n\nmodule.exports = cloneSymbol;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer');\n\n/**\n * Creates a clone of `typedArray`.\n *\n * @private\n * @param {Object} typedArray The typed array to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned typed array.\n */\nfunction cloneTypedArray(typedArray, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n}\n\nmodule.exports = cloneTypedArray;\n","/**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\nfunction copyArray(source, array) {\n var index = -1,\n length = source.length;\n\n array || (array = Array(length));\n while (++index < length) {\n array[index] = source[index];\n }\n return array;\n}\n\nmodule.exports = copyArray;\n","var assignValue = require('./_assignValue'),\n baseAssignValue = require('./_baseAssignValue');\n\n/**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\nfunction copyObject(source, props, object, customizer) {\n var isNew = !object;\n object || (object = {});\n\n var index = -1,\n length = props.length;\n\n while (++index < length) {\n var key = props[index];\n\n var newValue = customizer\n ? customizer(object[key], source[key], key, object, source)\n : undefined;\n\n if (newValue === undefined) {\n newValue = source[key];\n }\n if (isNew) {\n baseAssignValue(object, key, newValue);\n } else {\n assignValue(object, key, newValue);\n }\n }\n return object;\n}\n\nmodule.exports = copyObject;\n","var copyObject = require('./_copyObject'),\n getSymbols = require('./_getSymbols');\n\n/**\n * Copies own symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbols(source, object) {\n return copyObject(source, getSymbols(source), object);\n}\n\nmodule.exports = copySymbols;\n","var copyObject = require('./_copyObject'),\n getSymbolsIn = require('./_getSymbolsIn');\n\n/**\n * Copies own and inherited symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbolsIn(source, object) {\n return copyObject(source, getSymbolsIn(source), object);\n}\n\nmodule.exports = copySymbolsIn;\n","var root = require('./_root');\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\nmodule.exports = coreJsData;\n","var getNative = require('./_getNative');\n\nvar defineProperty = (function() {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n}());\n\nmodule.exports = defineProperty;\n","var SetCache = require('./_SetCache'),\n arraySome = require('./_arraySome'),\n cacheHas = require('./_cacheHas');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\nfunction equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n arrLength = array.length,\n othLength = other.length;\n\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n return false;\n }\n // Check that cyclic values are equal.\n var arrStacked = stack.get(array);\n var othStacked = stack.get(other);\n if (arrStacked && othStacked) {\n return arrStacked == other && othStacked == array;\n }\n var index = -1,\n result = true,\n seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n stack.set(array, other);\n stack.set(other, array);\n\n // Ignore non-index properties.\n while (++index < arrLength) {\n var arrValue = array[index],\n othValue = other[index];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, arrValue, index, other, array, stack)\n : customizer(arrValue, othValue, index, array, other, stack);\n }\n if (compared !== undefined) {\n if (compared) {\n continue;\n }\n result = false;\n break;\n }\n // Recursively compare arrays (susceptible to call stack limits).\n if (seen) {\n if (!arraySome(other, function(othValue, othIndex) {\n if (!cacheHas(seen, othIndex) &&\n (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n return seen.push(othIndex);\n }\n })) {\n result = false;\n break;\n }\n } else if (!(\n arrValue === othValue ||\n equalFunc(arrValue, othValue, bitmask, customizer, stack)\n )) {\n result = false;\n break;\n }\n }\n stack['delete'](array);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalArrays;\n","var Symbol = require('./_Symbol'),\n Uint8Array = require('./_Uint8Array'),\n eq = require('./eq'),\n equalArrays = require('./_equalArrays'),\n mapToArray = require('./_mapToArray'),\n setToArray = require('./_setToArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]';\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n switch (tag) {\n case dataViewTag:\n if ((object.byteLength != other.byteLength) ||\n (object.byteOffset != other.byteOffset)) {\n return false;\n }\n object = object.buffer;\n other = other.buffer;\n\n case arrayBufferTag:\n if ((object.byteLength != other.byteLength) ||\n !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n return false;\n }\n return true;\n\n case boolTag:\n case dateTag:\n case numberTag:\n // Coerce booleans to `1` or `0` and dates to milliseconds.\n // Invalid dates are coerced to `NaN`.\n return eq(+object, +other);\n\n case errorTag:\n return object.name == other.name && object.message == other.message;\n\n case regexpTag:\n case stringTag:\n // Coerce regexes to strings and treat strings, primitives and objects,\n // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n // for more details.\n return object == (other + '');\n\n case mapTag:\n var convert = mapToArray;\n\n case setTag:\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n convert || (convert = setToArray);\n\n if (object.size != other.size && !isPartial) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked) {\n return stacked == other;\n }\n bitmask |= COMPARE_UNORDERED_FLAG;\n\n // Recursively compare objects (susceptible to call stack limits).\n stack.set(object, other);\n var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n stack['delete'](object);\n return result;\n\n case symbolTag:\n if (symbolValueOf) {\n return symbolValueOf.call(object) == symbolValueOf.call(other);\n }\n }\n return false;\n}\n\nmodule.exports = equalByTag;\n","var getAllKeys = require('./_getAllKeys');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n objProps = getAllKeys(object),\n objLength = objProps.length,\n othProps = getAllKeys(other),\n othLength = othProps.length;\n\n if (objLength != othLength && !isPartial) {\n return false;\n }\n var index = objLength;\n while (index--) {\n var key = objProps[index];\n if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n return false;\n }\n }\n // Check that cyclic values are equal.\n var objStacked = stack.get(object);\n var othStacked = stack.get(other);\n if (objStacked && othStacked) {\n return objStacked == other && othStacked == object;\n }\n var result = true;\n stack.set(object, other);\n stack.set(other, object);\n\n var skipCtor = isPartial;\n while (++index < objLength) {\n key = objProps[index];\n var objValue = object[key],\n othValue = other[key];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, objValue, key, other, object, stack)\n : customizer(objValue, othValue, key, object, other, stack);\n }\n // Recursively compare objects (susceptible to call stack limits).\n if (!(compared === undefined\n ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n : compared\n )) {\n result = false;\n break;\n }\n skipCtor || (skipCtor = key == 'constructor');\n }\n if (result && !skipCtor) {\n var objCtor = object.constructor,\n othCtor = other.constructor;\n\n // Non `Object` object instances with different constructors are not equal.\n if (objCtor != othCtor &&\n ('constructor' in object && 'constructor' in other) &&\n !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n result = false;\n }\n }\n stack['delete'](object);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalObjects;\n","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n","var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbols = require('./_getSymbols'),\n keys = require('./keys');\n\n/**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeys(object) {\n return baseGetAllKeys(object, keys, getSymbols);\n}\n\nmodule.exports = getAllKeys;\n","var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbolsIn = require('./_getSymbolsIn'),\n keysIn = require('./keysIn');\n\n/**\n * Creates an array of own and inherited enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeysIn(object) {\n return baseGetAllKeys(object, keysIn, getSymbolsIn);\n}\n\nmodule.exports = getAllKeysIn;\n","var isKeyable = require('./_isKeyable');\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\nmodule.exports = getMapData;\n","var baseIsNative = require('./_baseIsNative'),\n getValue = require('./_getValue');\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\nmodule.exports = getNative;\n","var overArg = require('./_overArg');\n\n/** Built-in value references. */\nvar getPrototype = overArg(Object.getPrototypeOf, Object);\n\nmodule.exports = getPrototype;\n","var Symbol = require('./_Symbol');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nmodule.exports = getRawTag;\n","var arrayFilter = require('./_arrayFilter'),\n stubArray = require('./stubArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n if (object == null) {\n return [];\n }\n object = Object(object);\n return arrayFilter(nativeGetSymbols(object), function(symbol) {\n return propertyIsEnumerable.call(object, symbol);\n });\n};\n\nmodule.exports = getSymbols;\n","var arrayPush = require('./_arrayPush'),\n getPrototype = require('./_getPrototype'),\n getSymbols = require('./_getSymbols'),\n stubArray = require('./stubArray');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own and inherited enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {\n var result = [];\n while (object) {\n arrayPush(result, getSymbols(object));\n object = getPrototype(object);\n }\n return result;\n};\n\nmodule.exports = getSymbolsIn;\n","var DataView = require('./_DataView'),\n Map = require('./_Map'),\n Promise = require('./_Promise'),\n Set = require('./_Set'),\n WeakMap = require('./_WeakMap'),\n baseGetTag = require('./_baseGetTag'),\n toSource = require('./_toSource');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n setTag = '[object Set]',\n weakMapTag = '[object WeakMap]';\n\nvar dataViewTag = '[object DataView]';\n\n/** Used to detect maps, sets, and weakmaps. */\nvar dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nvar getTag = baseGetTag;\n\n// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\nif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = baseGetTag(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : '';\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n}\n\nmodule.exports = getTag;\n","/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\nmodule.exports = getValue;\n","var nativeCreate = require('./_nativeCreate');\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n}\n\nmodule.exports = hashClear;\n","/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = hashDelete;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\nmodule.exports = hashGet;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\nmodule.exports = hashHas;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\nmodule.exports = hashSet;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Initializes an array clone.\n *\n * @private\n * @param {Array} array The array to clone.\n * @returns {Array} Returns the initialized clone.\n */\nfunction initCloneArray(array) {\n var length = array.length,\n result = new array.constructor(length);\n\n // Add properties assigned by `RegExp#exec`.\n if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {\n result.index = array.index;\n result.input = array.input;\n }\n return result;\n}\n\nmodule.exports = initCloneArray;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer'),\n cloneDataView = require('./_cloneDataView'),\n cloneRegExp = require('./_cloneRegExp'),\n cloneSymbol = require('./_cloneSymbol'),\n cloneTypedArray = require('./_cloneTypedArray');\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/**\n * Initializes an object clone based on its `toStringTag`.\n *\n * **Note:** This function only supports cloning values with tags of\n * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.\n *\n * @private\n * @param {Object} object The object to clone.\n * @param {string} tag The `toStringTag` of the object to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneByTag(object, tag, isDeep) {\n var Ctor = object.constructor;\n switch (tag) {\n case arrayBufferTag:\n return cloneArrayBuffer(object);\n\n case boolTag:\n case dateTag:\n return new Ctor(+object);\n\n case dataViewTag:\n return cloneDataView(object, isDeep);\n\n case float32Tag: case float64Tag:\n case int8Tag: case int16Tag: case int32Tag:\n case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:\n return cloneTypedArray(object, isDeep);\n\n case mapTag:\n return new Ctor;\n\n case numberTag:\n case stringTag:\n return new Ctor(object);\n\n case regexpTag:\n return cloneRegExp(object);\n\n case setTag:\n return new Ctor;\n\n case symbolTag:\n return cloneSymbol(object);\n }\n}\n\nmodule.exports = initCloneByTag;\n","var baseCreate = require('./_baseCreate'),\n getPrototype = require('./_getPrototype'),\n isPrototype = require('./_isPrototype');\n\n/**\n * Initializes an object clone.\n *\n * @private\n * @param {Object} object The object to clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneObject(object) {\n return (typeof object.constructor == 'function' && !isPrototype(object))\n ? baseCreate(getPrototype(object))\n : {};\n}\n\nmodule.exports = initCloneObject;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n var type = typeof value;\n length = length == null ? MAX_SAFE_INTEGER : length;\n\n return !!length &&\n (type == 'number' ||\n (type != 'symbol' && reIsUint.test(value))) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\nmodule.exports = isIndex;\n","/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\nmodule.exports = isKeyable;\n","var coreJsData = require('./_coreJsData');\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\nmodule.exports = isMasked;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\nmodule.exports = isPrototype;\n","/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n}\n\nmodule.exports = listCacheClear;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype;\n\n/** Built-in value references. */\nvar splice = arrayProto.splice;\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n}\n\nmodule.exports = listCacheDelete;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\nmodule.exports = listCacheGet;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\nmodule.exports = listCacheHas;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\nmodule.exports = listCacheSet;\n","var Hash = require('./_Hash'),\n ListCache = require('./_ListCache'),\n Map = require('./_Map');\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\nmodule.exports = mapCacheClear;\n","var getMapData = require('./_getMapData');\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = mapCacheDelete;\n","var getMapData = require('./_getMapData');\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\nmodule.exports = mapCacheGet;\n","var getMapData = require('./_getMapData');\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\nmodule.exports = mapCacheHas;\n","var getMapData = require('./_getMapData');\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n}\n\nmodule.exports = mapCacheSet;\n","/**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\nfunction mapToArray(map) {\n var index = -1,\n result = Array(map.size);\n\n map.forEach(function(value, key) {\n result[++index] = [key, value];\n });\n return result;\n}\n\nmodule.exports = mapToArray;\n","var getNative = require('./_getNative');\n\n/* Built-in method references that are verified to be native. */\nvar nativeCreate = getNative(Object, 'create');\n\nmodule.exports = nativeCreate;\n","var overArg = require('./_overArg');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeKeys = overArg(Object.keys, Object);\n\nmodule.exports = nativeKeys;\n","/**\n * This function is like\n * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * except that it includes inherited enumerable properties.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction nativeKeysIn(object) {\n var result = [];\n if (object != null) {\n for (var key in Object(object)) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = nativeKeysIn;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n try {\n // Use `util.types` for Node.js 10+.\n var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n if (types) {\n return types;\n }\n\n // Legacy `process.binding('util')` for Node.js < 10.\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n}());\n\nmodule.exports = nodeUtil;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n","/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\nmodule.exports = overArg;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n","/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\nfunction setCacheAdd(value) {\n this.__data__.set(value, HASH_UNDEFINED);\n return this;\n}\n\nmodule.exports = setCacheAdd;\n","/**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\nfunction setCacheHas(value) {\n return this.__data__.has(value);\n}\n\nmodule.exports = setCacheHas;\n","/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\nfunction setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n}\n\nmodule.exports = setToArray;\n","var ListCache = require('./_ListCache');\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}\n\nmodule.exports = stackClear;\n","/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n var data = this.__data__,\n result = data['delete'](key);\n\n this.size = data.size;\n return result;\n}\n\nmodule.exports = stackDelete;\n","/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n return this.__data__.get(key);\n}\n\nmodule.exports = stackGet;\n","/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n return this.__data__.has(key);\n}\n\nmodule.exports = stackHas;\n","var ListCache = require('./_ListCache'),\n Map = require('./_Map'),\n MapCache = require('./_MapCache');\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n var data = this.__data__;\n if (data instanceof ListCache) {\n var pairs = data.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n this.size = ++data.size;\n return this;\n }\n data = this.__data__ = new MapCache(pairs);\n }\n data.set(key, value);\n this.size = data.size;\n return this;\n}\n\nmodule.exports = stackSet;\n","/** Used for built-in method references. */\nvar funcProto = Function.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\nmodule.exports = toSource;\n","var baseClone = require('./_baseClone');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_SYMBOLS_FLAG = 4;\n\n/**\n * This method is like `_.clone` except that it recursively clones `value`.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Lang\n * @param {*} value The value to recursively clone.\n * @returns {*} Returns the deep cloned value.\n * @see _.clone\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var deep = _.cloneDeep(objects);\n * console.log(deep[0] === objects[0]);\n * // => false\n */\nfunction cloneDeep(value) {\n return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);\n}\n\nmodule.exports = cloneDeep;\n","/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\nmodule.exports = eq;\n","var baseIsArguments = require('./_baseIsArguments'),\n isObjectLike = require('./isObjectLike');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n};\n\nmodule.exports = isArguments;\n","/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\nmodule.exports = isArray;\n","var isFunction = require('./isFunction'),\n isLength = require('./isLength');\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\nmodule.exports = isArrayLike;\n","var root = require('./_root'),\n stubFalse = require('./stubFalse');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\nmodule.exports = isBuffer;\n","var baseIsEqual = require('./_baseIsEqual');\n\n/**\n * Performs a deep comparison between two values to determine if they are\n * equivalent.\n *\n * **Note:** This method supports comparing arrays, array buffers, booleans,\n * date objects, error objects, maps, numbers, `Object` objects, regexes,\n * sets, strings, symbols, and typed arrays. `Object` objects are compared\n * by their own, not inherited, enumerable properties. Functions and DOM\n * nodes are compared by strict equality, i.e. `===`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.isEqual(object, other);\n * // => true\n *\n * object === other;\n * // => false\n */\nfunction isEqual(value, other) {\n return baseIsEqual(value, other);\n}\n\nmodule.exports = isEqual;\n","var baseGetTag = require('./_baseGetTag'),\n isObject = require('./isObject');\n\n/** `Object#toString` result references. */\nvar asyncTag = '[object AsyncFunction]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n proxyTag = '[object Proxy]';\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\nmodule.exports = isFunction;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\nmodule.exports = isLength;\n","var baseIsMap = require('./_baseIsMap'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsMap = nodeUtil && nodeUtil.isMap;\n\n/**\n * Checks if `value` is classified as a `Map` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n * @example\n *\n * _.isMap(new Map);\n * // => true\n *\n * _.isMap(new WeakMap);\n * // => false\n */\nvar isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;\n\nmodule.exports = isMap;\n","/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n","var baseIsSet = require('./_baseIsSet'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsSet = nodeUtil && nodeUtil.isSet;\n\n/**\n * Checks if `value` is classified as a `Set` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n * @example\n *\n * _.isSet(new Set);\n * // => true\n *\n * _.isSet(new WeakSet);\n * // => false\n */\nvar isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;\n\nmodule.exports = isSet;\n","var baseIsTypedArray = require('./_baseIsTypedArray'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\nmodule.exports = isTypedArray;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeys = require('./_baseKeys'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\nmodule.exports = keys;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeysIn = require('./_baseKeysIn'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\nfunction keysIn(object) {\n return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n}\n\nmodule.exports = keysIn;\n","/**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\nfunction stubArray() {\n return [];\n}\n\nmodule.exports = stubArray;\n","/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n return false;\n}\n\nmodule.exports = stubFalse;\n","import { connect, type BaseConnectionOptions } from \"@openfin/core-web\";\nimport { getSettings } from \"../platform/settings/settings\";\n\n/**\n * Initializes the OpenFin Web Broker connection.\n * @param inherit Should we inherit settings from the host (available in the OpenFin layout system) or use settings? Default is true.\n */\nexport async function init(inherit: boolean = true): Promise {\n\t// Set window.fin to the `fin` object.\n\tlet options: BaseConnectionOptions | undefined;\n\tif (window.fin === undefined) {\n\t\tif (!inherit) {\n\t\t\tconst settings = await getSettings();\n\t\t\tif (settings === undefined) {\n\t\t\t\tconsole.error(\n\t\t\t\t\t\"Unable to run the sample as we have been unable to load the web manifest and it's settings from the currently running html page. Please ensure that the web manifest is being served and that it contains the custom_settings section.\"\n\t\t\t\t);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\toptions = {\n\t\t\t\tbrokerUrl: settings.platform.interop.brokerUrl,\n\t\t\t\tinteropConfig: {\n\t\t\t\t\tproviderId: settings.platform.interop.providerId,\n\t\t\t\t\tcurrentContextGroup: settings.platform.interop.defaultContextGroup\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t\t// Specify an interopConfig with a specific provider ID and a context group to initialize the `fin.me.interop` client on connection.\n\t\tif (options) {\n\t\t\twindow.fin = await connect({\n\t\t\t\toptions\n\t\t\t});\n\t\t} else {\n\t\t\twindow.fin = await connect({\n\t\t\t\tconnectionInheritance: \"enabled\"\n\t\t\t});\n\t\t}\n\t\tconsole.log(\"Finished initializing the fin API.\");\n\t\t// Create and dispatch the finReady event\n\t\tconst event = new CustomEvent(\"finReady\");\n\t\twindow.dispatchEvent(event);\n\t}\n\n\tif (window.fdc3 === undefined && window?.fin?.me.interop?.getFDC3Sync !== undefined) {\n\t\twindow.fdc3 = fin.me.interop.getFDC3Sync(\"2.0\");\n\t\tconsole.log(\"Finished initializing the fdc3 API.\");\n\t\t// Create and dispatch the FDC3Ready event\n\t\tconst event = new CustomEvent(\"fdc3Ready\");\n\t\twindow.dispatchEvent(event);\n\t}\n}\n","import type { OpenFin } from \"@openfin/core\";\nimport type { ManifestSettings, Settings } from \"../../shapes/setting-shapes\";\n\n/**\n * Fetches the settings for the application.\n * @returns The settings for the application.\n */\nexport async function getSettings(): Promise {\n\tconst savedSettings = await getSavedSettings();\n\tif (savedSettings) {\n\t\treturn savedSettings;\n\t}\n\tconst settings = await getManifestSettings();\n\tif (!Array.isArray(settings?.endpointProvider?.endpoints)) {\n\t\tconsole.error(\n\t\t\t\"Unable to run the example as settings are required and we fetch them from the link web manifest from the html page that is being served. It should exist in the customSettings section of the web manifest.\"\n\t\t);\n\t\treturn;\n\t}\n\tconst settingsEndpoint = settings.endpointProvider.endpoints.find(\n\t\t(endpoint) => endpoint.id === \"platform-settings\"\n\t);\n\n\tif (\n\t\tsettingsEndpoint === undefined ||\n\t\tsettingsEndpoint.type !== \"fetch\" ||\n\t\tsettingsEndpoint.options.method !== \"GET\" ||\n\t\tsettingsEndpoint.options.url === undefined\n\t) {\n\t\tconsole.error(\n\t\t\t\"Unable to run the example as settings are required and we fetch them from the endpoint defined with the id: 'platform-settings' in the manifest. It needs to be of type fetch, performing a GET and it must have a url defined.\"\n\t\t);\n\t\treturn;\n\t}\n\tconst platformSettings = await fetch(settingsEndpoint?.options.url);\n\tconst settingsJson = (await platformSettings.json()) as Settings;\n\treturn settingsJson;\n}\n\n/**\n * Returns a default layout from the settings if provided.\n * @returns The default layout from the settings.\n */\nexport async function getDefaultLayout(): Promise {\n\tconst settings = await getSettings();\n\tif (settings?.platform?.layout?.defaultLayout === undefined) {\n\t\tconsole.error(\n\t\t\t\"Unable to run the example as without a layout being defined. Please ensure that settings have been provided in the web manifest.\"\n\t\t);\n\t\treturn;\n\t}\n\tif (typeof settings.platform.layout.defaultLayout === \"string\") {\n\t\tconst layoutResponse = await fetch(settings.platform.layout.defaultLayout);\n\t\tconst layoutJson = (await layoutResponse.json()) as OpenFin.LayoutSnapshot;\n\t\treturn layoutJson;\n\t}\n\treturn settings.platform.layout.defaultLayout;\n}\n\n/**\n * Returns the settings from the manifest file.\n * @returns customSettings for this example\n */\nasync function getManifestSettings(): Promise {\n\t// Get the manifest link\n\tconst link = document.querySelector('link[rel=\"manifest\"]');\n\tif (link !== null) {\n\t\tconst manifestResponse = await fetch(link.href);\n\t\tconst manifestJson = (await manifestResponse.json()) as { custom_settings: ManifestSettings };\n\t\treturn manifestJson.custom_settings;\n\t}\n}\n\n/**\n * Clears any saved settings.\n * @returns The saved settings.\n */\nexport async function clearSettings(): Promise {\n\tconst settingsId = getSavedSettingsId();\n\tlocalStorage.removeItem(settingsId);\n}\n\n/**\n * Saves the settings.\n * @param settings The settings to save.\n */\nexport async function saveSettings(settings: Settings): Promise {\n\tconst settingsId = getSavedSettingsId();\n\tlocalStorage.setItem(settingsId, JSON.stringify(settings));\n}\n\n/**\n * Retrieves saved settings from local storage.\n * @returns The saved settings.\n */\nasync function getSavedSettings(): Promise {\n\tconst settingsId = getSavedSettingsId();\n\tconst settings = localStorage.getItem(settingsId);\n\tif (settings !== null) {\n\t\treturn JSON.parse(settings);\n\t}\n}\n\n/**\n * Get the Id used for saving and fetching settings from storage.\n * @returns The settings id.\n */\nfunction getSavedSettingsId(): string {\n\tconst urlParams = new URLSearchParams(window.location.search);\n\tconst env = urlParams.get(\"env\");\n\n\tconst settingsKey = env ? `${env}-settings` : \"settings\";\n\treturn settingsKey;\n}\n","export { default as v1 } from './v1.js';\nexport { default as v3 } from './v3.js';\nexport { default as v4 } from './v4.js';\nexport { default as v5 } from './v5.js';\nexport { default as NIL } from './nil.js';\nexport { default as version } from './version.js';\nexport { default as validate } from './validate.js';\nexport { default as stringify } from './stringify.js';\nexport { default as parse } from './parse.js';","/*\n * Browser-compatible JavaScript MD5\n *\n * Modification of JavaScript MD5\n * https://github.com/blueimp/JavaScript-MD5\n *\n * Copyright 2011, Sebastian Tschan\n * https://blueimp.net\n *\n * Licensed under the MIT license:\n * https://opensource.org/licenses/MIT\n *\n * Based on\n * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message\n * Digest Algorithm, as defined in RFC 1321.\n * Version 2.2 Copyright (C) Paul Johnston 1999 - 2009\n * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet\n * Distributed under the BSD License\n * See http://pajhome.org.uk/crypt/md5 for more info.\n */\nfunction md5(bytes) {\n if (typeof bytes === 'string') {\n var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape\n\n bytes = new Uint8Array(msg.length);\n\n for (var i = 0; i < msg.length; ++i) {\n bytes[i] = msg.charCodeAt(i);\n }\n }\n\n return md5ToHexEncodedArray(wordsToMd5(bytesToWords(bytes), bytes.length * 8));\n}\n/*\n * Convert an array of little-endian words to an array of bytes\n */\n\n\nfunction md5ToHexEncodedArray(input) {\n var output = [];\n var length32 = input.length * 32;\n var hexTab = '0123456789abcdef';\n\n for (var i = 0; i < length32; i += 8) {\n var x = input[i >> 5] >>> i % 32 & 0xff;\n var hex = parseInt(hexTab.charAt(x >>> 4 & 0x0f) + hexTab.charAt(x & 0x0f), 16);\n output.push(hex);\n }\n\n return output;\n}\n/**\n * Calculate output length with padding and bit length\n */\n\n\nfunction getOutputLength(inputLength8) {\n return (inputLength8 + 64 >>> 9 << 4) + 14 + 1;\n}\n/*\n * Calculate the MD5 of an array of little-endian words, and a bit length.\n */\n\n\nfunction wordsToMd5(x, len) {\n /* append padding */\n x[len >> 5] |= 0x80 << len % 32;\n x[getOutputLength(len) - 1] = len;\n var a = 1732584193;\n var b = -271733879;\n var c = -1732584194;\n var d = 271733878;\n\n for (var i = 0; i < x.length; i += 16) {\n var olda = a;\n var oldb = b;\n var oldc = c;\n var oldd = d;\n a = md5ff(a, b, c, d, x[i], 7, -680876936);\n d = md5ff(d, a, b, c, x[i + 1], 12, -389564586);\n c = md5ff(c, d, a, b, x[i + 2], 17, 606105819);\n b = md5ff(b, c, d, a, x[i + 3], 22, -1044525330);\n a = md5ff(a, b, c, d, x[i + 4], 7, -176418897);\n d = md5ff(d, a, b, c, x[i + 5], 12, 1200080426);\n c = md5ff(c, d, a, b, x[i + 6], 17, -1473231341);\n b = md5ff(b, c, d, a, x[i + 7], 22, -45705983);\n a = md5ff(a, b, c, d, x[i + 8], 7, 1770035416);\n d = md5ff(d, a, b, c, x[i + 9], 12, -1958414417);\n c = md5ff(c, d, a, b, x[i + 10], 17, -42063);\n b = md5ff(b, c, d, a, x[i + 11], 22, -1990404162);\n a = md5ff(a, b, c, d, x[i + 12], 7, 1804603682);\n d = md5ff(d, a, b, c, x[i + 13], 12, -40341101);\n c = md5ff(c, d, a, b, x[i + 14], 17, -1502002290);\n b = md5ff(b, c, d, a, x[i + 15], 22, 1236535329);\n a = md5gg(a, b, c, d, x[i + 1], 5, -165796510);\n d = md5gg(d, a, b, c, x[i + 6], 9, -1069501632);\n c = md5gg(c, d, a, b, x[i + 11], 14, 643717713);\n b = md5gg(b, c, d, a, x[i], 20, -373897302);\n a = md5gg(a, b, c, d, x[i + 5], 5, -701558691);\n d = md5gg(d, a, b, c, x[i + 10], 9, 38016083);\n c = md5gg(c, d, a, b, x[i + 15], 14, -660478335);\n b = md5gg(b, c, d, a, x[i + 4], 20, -405537848);\n a = md5gg(a, b, c, d, x[i + 9], 5, 568446438);\n d = md5gg(d, a, b, c, x[i + 14], 9, -1019803690);\n c = md5gg(c, d, a, b, x[i + 3], 14, -187363961);\n b = md5gg(b, c, d, a, x[i + 8], 20, 1163531501);\n a = md5gg(a, b, c, d, x[i + 13], 5, -1444681467);\n d = md5gg(d, a, b, c, x[i + 2], 9, -51403784);\n c = md5gg(c, d, a, b, x[i + 7], 14, 1735328473);\n b = md5gg(b, c, d, a, x[i + 12], 20, -1926607734);\n a = md5hh(a, b, c, d, x[i + 5], 4, -378558);\n d = md5hh(d, a, b, c, x[i + 8], 11, -2022574463);\n c = md5hh(c, d, a, b, x[i + 11], 16, 1839030562);\n b = md5hh(b, c, d, a, x[i + 14], 23, -35309556);\n a = md5hh(a, b, c, d, x[i + 1], 4, -1530992060);\n d = md5hh(d, a, b, c, x[i + 4], 11, 1272893353);\n c = md5hh(c, d, a, b, x[i + 7], 16, -155497632);\n b = md5hh(b, c, d, a, x[i + 10], 23, -1094730640);\n a = md5hh(a, b, c, d, x[i + 13], 4, 681279174);\n d = md5hh(d, a, b, c, x[i], 11, -358537222);\n c = md5hh(c, d, a, b, x[i + 3], 16, -722521979);\n b = md5hh(b, c, d, a, x[i + 6], 23, 76029189);\n a = md5hh(a, b, c, d, x[i + 9], 4, -640364487);\n d = md5hh(d, a, b, c, x[i + 12], 11, -421815835);\n c = md5hh(c, d, a, b, x[i + 15], 16, 530742520);\n b = md5hh(b, c, d, a, x[i + 2], 23, -995338651);\n a = md5ii(a, b, c, d, x[i], 6, -198630844);\n d = md5ii(d, a, b, c, x[i + 7], 10, 1126891415);\n c = md5ii(c, d, a, b, x[i + 14], 15, -1416354905);\n b = md5ii(b, c, d, a, x[i + 5], 21, -57434055);\n a = md5ii(a, b, c, d, x[i + 12], 6, 1700485571);\n d = md5ii(d, a, b, c, x[i + 3], 10, -1894986606);\n c = md5ii(c, d, a, b, x[i + 10], 15, -1051523);\n b = md5ii(b, c, d, a, x[i + 1], 21, -2054922799);\n a = md5ii(a, b, c, d, x[i + 8], 6, 1873313359);\n d = md5ii(d, a, b, c, x[i + 15], 10, -30611744);\n c = md5ii(c, d, a, b, x[i + 6], 15, -1560198380);\n b = md5ii(b, c, d, a, x[i + 13], 21, 1309151649);\n a = md5ii(a, b, c, d, x[i + 4], 6, -145523070);\n d = md5ii(d, a, b, c, x[i + 11], 10, -1120210379);\n c = md5ii(c, d, a, b, x[i + 2], 15, 718787259);\n b = md5ii(b, c, d, a, x[i + 9], 21, -343485551);\n a = safeAdd(a, olda);\n b = safeAdd(b, oldb);\n c = safeAdd(c, oldc);\n d = safeAdd(d, oldd);\n }\n\n return [a, b, c, d];\n}\n/*\n * Convert an array bytes to an array of little-endian words\n * Characters >255 have their high-byte silently ignored.\n */\n\n\nfunction bytesToWords(input) {\n if (input.length === 0) {\n return [];\n }\n\n var length8 = input.length * 8;\n var output = new Uint32Array(getOutputLength(length8));\n\n for (var i = 0; i < length8; i += 8) {\n output[i >> 5] |= (input[i / 8] & 0xff) << i % 32;\n }\n\n return output;\n}\n/*\n * Add integers, wrapping at 2^32. This uses 16-bit operations internally\n * to work around bugs in some JS interpreters.\n */\n\n\nfunction safeAdd(x, y) {\n var lsw = (x & 0xffff) + (y & 0xffff);\n var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n return msw << 16 | lsw & 0xffff;\n}\n/*\n * Bitwise rotate a 32-bit number to the left.\n */\n\n\nfunction bitRotateLeft(num, cnt) {\n return num << cnt | num >>> 32 - cnt;\n}\n/*\n * These functions implement the four basic operations the algorithm uses.\n */\n\n\nfunction md5cmn(q, a, b, x, s, t) {\n return safeAdd(bitRotateLeft(safeAdd(safeAdd(a, q), safeAdd(x, t)), s), b);\n}\n\nfunction md5ff(a, b, c, d, x, s, t) {\n return md5cmn(b & c | ~b & d, a, b, x, s, t);\n}\n\nfunction md5gg(a, b, c, d, x, s, t) {\n return md5cmn(b & d | c & ~d, a, b, x, s, t);\n}\n\nfunction md5hh(a, b, c, d, x, s, t) {\n return md5cmn(b ^ c ^ d, a, b, x, s, t);\n}\n\nfunction md5ii(a, b, c, d, x, s, t) {\n return md5cmn(c ^ (b | ~d), a, b, x, s, t);\n}\n\nexport default md5;","export default '00000000-0000-0000-0000-000000000000';","import validate from './validate.js';\n\nfunction parse(uuid) {\n if (!validate(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n var v;\n var arr = new Uint8Array(16); // Parse ########-....-....-....-............\n\n arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24;\n arr[1] = v >>> 16 & 0xff;\n arr[2] = v >>> 8 & 0xff;\n arr[3] = v & 0xff; // Parse ........-####-....-....-............\n\n arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8;\n arr[5] = v & 0xff; // Parse ........-....-####-....-............\n\n arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8;\n arr[7] = v & 0xff; // Parse ........-....-....-####-............\n\n arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8;\n arr[9] = v & 0xff; // Parse ........-....-....-....-############\n // (Use \"/\" to avoid 32-bit truncation when bit-shifting high-order bytes)\n\n arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff;\n arr[11] = v / 0x100000000 & 0xff;\n arr[12] = v >>> 24 & 0xff;\n arr[13] = v >>> 16 & 0xff;\n arr[14] = v >>> 8 & 0xff;\n arr[15] = v & 0xff;\n return arr;\n}\n\nexport default parse;","export default /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;","// Unique ID creation requires a high quality random # generator. In the browser we therefore\n// require the crypto API and do not support built-in fallback to lower quality random number\n// generators (like Math.random()).\nvar getRandomValues;\nvar rnds8 = new Uint8Array(16);\nexport default function rng() {\n // lazy load so that environments that need to polyfill have a chance to do so\n if (!getRandomValues) {\n // getRandomValues needs to be invoked in a context where \"this\" is a Crypto implementation. Also,\n // find the complete implementation of crypto (msCrypto) on IE11.\n getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto !== 'undefined' && typeof msCrypto.getRandomValues === 'function' && msCrypto.getRandomValues.bind(msCrypto);\n\n if (!getRandomValues) {\n throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');\n }\n }\n\n return getRandomValues(rnds8);\n}","// Adapted from Chris Veness' SHA1 code at\n// http://www.movable-type.co.uk/scripts/sha1.html\nfunction f(s, x, y, z) {\n switch (s) {\n case 0:\n return x & y ^ ~x & z;\n\n case 1:\n return x ^ y ^ z;\n\n case 2:\n return x & y ^ x & z ^ y & z;\n\n case 3:\n return x ^ y ^ z;\n }\n}\n\nfunction ROTL(x, n) {\n return x << n | x >>> 32 - n;\n}\n\nfunction sha1(bytes) {\n var K = [0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xca62c1d6];\n var H = [0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0];\n\n if (typeof bytes === 'string') {\n var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape\n\n bytes = [];\n\n for (var i = 0; i < msg.length; ++i) {\n bytes.push(msg.charCodeAt(i));\n }\n } else if (!Array.isArray(bytes)) {\n // Convert Array-like to Array\n bytes = Array.prototype.slice.call(bytes);\n }\n\n bytes.push(0x80);\n var l = bytes.length / 4 + 2;\n var N = Math.ceil(l / 16);\n var M = new Array(N);\n\n for (var _i = 0; _i < N; ++_i) {\n var arr = new Uint32Array(16);\n\n for (var j = 0; j < 16; ++j) {\n arr[j] = bytes[_i * 64 + j * 4] << 24 | bytes[_i * 64 + j * 4 + 1] << 16 | bytes[_i * 64 + j * 4 + 2] << 8 | bytes[_i * 64 + j * 4 + 3];\n }\n\n M[_i] = arr;\n }\n\n M[N - 1][14] = (bytes.length - 1) * 8 / Math.pow(2, 32);\n M[N - 1][14] = Math.floor(M[N - 1][14]);\n M[N - 1][15] = (bytes.length - 1) * 8 & 0xffffffff;\n\n for (var _i2 = 0; _i2 < N; ++_i2) {\n var W = new Uint32Array(80);\n\n for (var t = 0; t < 16; ++t) {\n W[t] = M[_i2][t];\n }\n\n for (var _t = 16; _t < 80; ++_t) {\n W[_t] = ROTL(W[_t - 3] ^ W[_t - 8] ^ W[_t - 14] ^ W[_t - 16], 1);\n }\n\n var a = H[0];\n var b = H[1];\n var c = H[2];\n var d = H[3];\n var e = H[4];\n\n for (var _t2 = 0; _t2 < 80; ++_t2) {\n var s = Math.floor(_t2 / 20);\n var T = ROTL(a, 5) + f(s, b, c, d) + e + K[s] + W[_t2] >>> 0;\n e = d;\n d = c;\n c = ROTL(b, 30) >>> 0;\n b = a;\n a = T;\n }\n\n H[0] = H[0] + a >>> 0;\n H[1] = H[1] + b >>> 0;\n H[2] = H[2] + c >>> 0;\n H[3] = H[3] + d >>> 0;\n H[4] = H[4] + e >>> 0;\n }\n\n return [H[0] >> 24 & 0xff, H[0] >> 16 & 0xff, H[0] >> 8 & 0xff, H[0] & 0xff, H[1] >> 24 & 0xff, H[1] >> 16 & 0xff, H[1] >> 8 & 0xff, H[1] & 0xff, H[2] >> 24 & 0xff, H[2] >> 16 & 0xff, H[2] >> 8 & 0xff, H[2] & 0xff, H[3] >> 24 & 0xff, H[3] >> 16 & 0xff, H[3] >> 8 & 0xff, H[3] & 0xff, H[4] >> 24 & 0xff, H[4] >> 16 & 0xff, H[4] >> 8 & 0xff, H[4] & 0xff];\n}\n\nexport default sha1;","import validate from './validate.js';\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\n\nvar byteToHex = [];\n\nfor (var i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).substr(1));\n}\n\nfunction stringify(arr) {\n var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n var uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!validate(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n\n return uuid;\n}\n\nexport default stringify;","import rng from './rng.js';\nimport stringify from './stringify.js'; // **`v1()` - Generate time-based UUID**\n//\n// Inspired by https://github.com/LiosK/UUID.js\n// and http://docs.python.org/library/uuid.html\n\nvar _nodeId;\n\nvar _clockseq; // Previous uuid creation time\n\n\nvar _lastMSecs = 0;\nvar _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details\n\nfunction v1(options, buf, offset) {\n var i = buf && offset || 0;\n var b = buf || new Array(16);\n options = options || {};\n var node = options.node || _nodeId;\n var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not\n // specified. We do this lazily to minimize issues related to insufficient\n // system entropy. See #189\n\n if (node == null || clockseq == null) {\n var seedBytes = options.random || (options.rng || rng)();\n\n if (node == null) {\n // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)\n node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]];\n }\n\n if (clockseq == null) {\n // Per 4.2.2, randomize (14 bit) clockseq\n clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;\n }\n } // UUID timestamps are 100 nano-second units since the Gregorian epoch,\n // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so\n // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'\n // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.\n\n\n var msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock\n // cycle to simulate higher resolution clock\n\n var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs)\n\n var dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression\n\n if (dt < 0 && options.clockseq === undefined) {\n clockseq = clockseq + 1 & 0x3fff;\n } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new\n // time interval\n\n\n if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {\n nsecs = 0;\n } // Per 4.2.1.2 Throw error if too many uuids are requested\n\n\n if (nsecs >= 10000) {\n throw new Error(\"uuid.v1(): Can't create more than 10M uuids/sec\");\n }\n\n _lastMSecs = msecs;\n _lastNSecs = nsecs;\n _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch\n\n msecs += 12219292800000; // `time_low`\n\n var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;\n b[i++] = tl >>> 24 & 0xff;\n b[i++] = tl >>> 16 & 0xff;\n b[i++] = tl >>> 8 & 0xff;\n b[i++] = tl & 0xff; // `time_mid`\n\n var tmh = msecs / 0x100000000 * 10000 & 0xfffffff;\n b[i++] = tmh >>> 8 & 0xff;\n b[i++] = tmh & 0xff; // `time_high_and_version`\n\n b[i++] = tmh >>> 24 & 0xf | 0x10; // include version\n\n b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)\n\n b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low`\n\n b[i++] = clockseq & 0xff; // `node`\n\n for (var n = 0; n < 6; ++n) {\n b[i + n] = node[n];\n }\n\n return buf || stringify(b);\n}\n\nexport default v1;","import v35 from './v35.js';\nimport md5 from './md5.js';\nvar v3 = v35('v3', 0x30, md5);\nexport default v3;","import stringify from './stringify.js';\nimport parse from './parse.js';\n\nfunction stringToBytes(str) {\n str = unescape(encodeURIComponent(str)); // UTF8 escape\n\n var bytes = [];\n\n for (var i = 0; i < str.length; ++i) {\n bytes.push(str.charCodeAt(i));\n }\n\n return bytes;\n}\n\nexport var DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8';\nexport var URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8';\nexport default function (name, version, hashfunc) {\n function generateUUID(value, namespace, buf, offset) {\n if (typeof value === 'string') {\n value = stringToBytes(value);\n }\n\n if (typeof namespace === 'string') {\n namespace = parse(namespace);\n }\n\n if (namespace.length !== 16) {\n throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)');\n } // Compute hash of namespace and value, Per 4.3\n // Future: Use spread syntax when supported on all platforms, e.g. `bytes =\n // hashfunc([...namespace, ... value])`\n\n\n var bytes = new Uint8Array(16 + value.length);\n bytes.set(namespace);\n bytes.set(value, namespace.length);\n bytes = hashfunc(bytes);\n bytes[6] = bytes[6] & 0x0f | version;\n bytes[8] = bytes[8] & 0x3f | 0x80;\n\n if (buf) {\n offset = offset || 0;\n\n for (var i = 0; i < 16; ++i) {\n buf[offset + i] = bytes[i];\n }\n\n return buf;\n }\n\n return stringify(bytes);\n } // Function#name is not settable on some platforms (#270)\n\n\n try {\n generateUUID.name = name; // eslint-disable-next-line no-empty\n } catch (err) {} // For CommonJS default export support\n\n\n generateUUID.DNS = DNS;\n generateUUID.URL = URL;\n return generateUUID;\n}","import rng from './rng.js';\nimport stringify from './stringify.js';\n\nfunction v4(options, buf, offset) {\n options = options || {};\n var rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n offset = offset || 0;\n\n for (var i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n\n return buf;\n }\n\n return stringify(rnds);\n}\n\nexport default v4;","import v35 from './v35.js';\nimport sha1 from './sha1.js';\nvar v5 = v35('v5', 0x50, sha1);\nexport default v5;","import REGEX from './regex.js';\n\nfunction validate(uuid) {\n return typeof uuid === 'string' && REGEX.test(uuid);\n}\n\nexport default validate;","import validate from './validate.js';\n\nfunction version(uuid) {\n if (!validate(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n return parseInt(uuid.substr(14, 1), 16);\n}\n\nexport default version;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = (module) => {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","import type { Context } from \"@finos/fdc3\";\nimport { init } from \"./api\";\n\nwindow.addEventListener(\"DOMContentLoaded\", async () => {\n\tawait init(true);\n\tawait initializeDOM();\n});\n\n/**\n * Broadcasts a context using FDC3.\n */\nasync function broadcastContext(): Promise {\n\tconst contextType = \"fdc3.instrument\";\n\tconst contextName = \"Apple\";\n\tconst idData = {\n\t\tticker: \"AAPL\"\n\t};\n\tconst context = {\n\t\ttype: contextType,\n\t\tname: contextName,\n\t\tid: idData\n\t};\n\tif (window.fdc3) {\n\t\tawait window.fdc3.broadcast(context);\n\t\tconsole.log(`Broadcasted context: ${contextType} - ${contextName}`);\n\t} else {\n\t\twindow.addEventListener(\"fdc3Ready\", async () => {\n\t\t\tawait window.fdc3.broadcast(context);\n\t\t\tconsole.log(`Broadcasted context: ${contextType} - ${contextName}`);\n\t\t});\n\t}\n}\n\n/**\n * Adds an FDC3 context listener to the window.\n */\nasync function addFDC3Listener(): Promise {\n\tif (window.fdc3) {\n\t\tawait window.fdc3.addContextListener(null, (context) => {\n\t\t\tupdateDOMElements(context);\n\t\t});\n\t} else {\n\t\twindow.addEventListener(\"fdc3Ready\", async () => {\n\t\t\tawait window.fdc3.addContextListener(null, (context) => {\n\t\t\t\tupdateDOMElements(context);\n\t\t\t});\n\t\t});\n\t}\n}\n\n/**\n * Updates the DOM elements with the provided context.\n * @param context The context to update the DOM elements with.\n */\nfunction updateDOMElements(context: Context): void {\n\tconst contextTypeSpan = document.querySelector(\"#contextType\");\n\tconst contextNameSpan = document.querySelector(\"#contextName\");\n\tconst contextBodyPre = document.querySelector(\"#contextBody\");\n\n\tif (contextTypeSpan !== null && contextNameSpan !== null && contextBodyPre !== null) {\n\t\tcontextTypeSpan.textContent = context.type;\n\t\tcontextNameSpan.textContent = context.name ?? \"No name provided.\";\n\t\tcontextBodyPre.textContent = JSON.stringify(context, null, 2);\n\t}\n}\n\n/**\n * Initialize the DOM elements.\n */\nasync function initializeDOM(): Promise {\n\tconst broadcastButton = document.querySelector(\"#broadcast\");\n\n\tif (broadcastButton !== null) {\n\t\tbroadcastButton.addEventListener(\"click\", async () => {\n\t\t\tawait broadcastContext();\n\t\t});\n\t}\n\n\tawait addFDC3Listener();\n}\n"],"names":[],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"fdc3-view.bundle.js","mappings":";;;;;;;;;;AAAa,MAAM,mBAAO,CAAC,qFAAoB,EAAE,mBAAO,CAAC,mDAAS,EAAE,mBAAO,CAAC,+DAAM,EAAE,mBAAO,CAAC,mDAAQ,EAAE,mBAAO,CAAC,gEAAkB,EAAE,mBAAO,CAAC,4DAAgB,EAAE,eAAe;;;;;;;;;;;;ACA9J,MAAM,mBAAO,CAAC,mDAAS,IAAI,mBAAO,CAAC,mDAAQ,IAAI,mBAAO,CAAC,gEAAkB,IAAI,mBAAO,CAAC,4DAAgB,IAAI,mBAAO,CAAC,+DAAM,EAAE,kBAAkB,EAAE,GAAG,wBAAwB,GAAG,sGAAsG,qBAAM,CAAC,qBAAM,iCAAiC,KAAK,KAAK,KAAK,MAAM,oBAAoB,WAAW,kBAAkB,kBAAkB,UAAU,SAAS,sCAAsC,SAAS,sFAAsF,mCAAmC,6BAA6B,GAAG,kCAAkC,6BAA6B,mDAAmD,0CAA0C,yDAAyD,iEAAiE,oFAAoF,2IAA2I,mDAAmD,kDAAkD,oFAAoF,4IAA4I,sDAAsD,sCAAsC,SAAS,sCAAsC,UAAU,QAAQ,eAAe,mNAAmN,UAAU,0BAA0B,SAAS,qBAAqB,SAAS,8BAA8B,sBAAsB,yiBAAyiB,QAAQ,SAAS,2EAA2E,6BAA6B,KAAK,IAAI,2DAA2D,SAAS,uDAAuD,0CAA0C,IAAI,sBAAsB,SAAS,4EAA4E,+EAA+E,iCAAiC,yBAAyB,sGAAsG,gBAAgB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;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,2CAA2C,UAAU;AACrD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;ACrJA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEY;;AAEZ,eAAe,mBAAO,CAAC,wDAAW;AAClC,gBAAgB,mBAAO,CAAC,oDAAS;AACjC;AACA;AACA;AACA;;AAEA,cAAc;AACd,kBAAkB;AAClB,yBAAyB;;AAEzB;AACA,kBAAkB;;AAElB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,kBAAkB,YAAY;AAC9B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA,wCAAwC,SAAS;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;;AAEA;AACA;AACA,cAAc,iBAAiB;AAC/B;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,iDAAiD,EAAE;AACnD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C;AAC1C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA,yBAAyB,eAAe;AACxC;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,yBAAyB,QAAQ;AACjC;AACA,sBAAsB,eAAe;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc,YAAY;AAC1B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB,sBAAsB;AACxC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,mBAAmB;AACnB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA,oBAAoB,SAAS;AAC7B;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA,qBAAqB,WAAW,GAAG,IAAI;AACvC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA,gBAAgB,WAAW,GAAG,IAAI,KAAK,aAAa;AACpD;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;;AAEA;AACA,GAAG;AACH;AACA;AACA,mBAAmB,KAAK,mDAAmD,cAAc;AACzF,GAAG;AACH;AACA;AACA,+BAA+B,IAAI;AACnC;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,MAAM,aAAa,SAAS;AACtD;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,SAAS,gBAAgB;AACzB,cAAc,oBAAoB,EAAE,IAAI;AACxC;AACA,YAAY,gBAAgB,EAAE,IAAI;AAClC;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,GAAG,SAAS,GAAG,KAAK,qBAAqB,EAAE,EAAE;AACpE,QAAQ;AACR,yBAAyB,GAAG,KAAK,yBAAyB,EAAE,EAAE;AAC9D,mBAAmB,yBAAyB,EAAE,EAAE;AAChD;AACA,MAAM;AACN,oBAAoB,IAAI,EAAE,GAAG,SAAS,IAAI,EAAE,EAAE;AAC9C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,0CAA0C,cAAc,SAAS,OAAO;AACxE;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,kBAAkB,YAAY;AAC9B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,kBAAkB,gBAAgB;AAClC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,kBAAkB,gBAAgB;AAClC;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,cAAc,YAAY;AAC1B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,QAAQ;AAC1B;AACA,oBAAoB,QAAQ;AAC5B;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;;;;;ACzjEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEa;;AAEb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB;;AAEnB;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,sBAAsB;AACxC;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA,eAAe;AACf;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA,oBAAoB,SAAS;AAC7B;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;;AAEA,kCAAkC,QAAQ;AAC1C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oBAAoB,iBAAiB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,QAAQ;AACR;AACA,uCAAuC,QAAQ;AAC/C;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,OAAO;AACzB;AACA;AACA;;AAEA;AACA,SAAS,yBAAyB;AAClC;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,gBAAgB;AAClC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,8DAA8D,YAAY;AAC1E;AACA,8DAA8D,YAAY;AAC1E;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,qCAAqC,YAAY;AACjD;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;AACA;;;;;;;;;;;AChfA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,SAAS,WAAW;;AAEpB;AACA;AACA;AACA,SAAS,WAAW;;AAEpB;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA,SAAS,WAAW;;AAEpB;AACA;AACA,SAAS,UAAU;;AAEnB;AACA;;;;;;;;;;;ACpFA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,WAAW,mBAAO,CAAC,mDAAS;;AAE5B;AACA;;AAEA;;;;;;;;;;;ACNA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,cAAc,mBAAO,CAAC,yDAAY;AAClC,cAAc,mBAAO,CAAC,yDAAY;AAClC,cAAc,mBAAO,CAAC,yDAAY;;AAElC;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC/BA,qBAAqB,mBAAO,CAAC,uEAAmB;AAChD,sBAAsB,mBAAO,CAAC,yEAAoB;AAClD,mBAAmB,mBAAO,CAAC,mEAAiB;AAC5C,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A;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;AACA,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;;;;;;;;;;ACrKA,eAAe,mBAAO,CAAC,yDAAY;;AAEnC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;;;;;;;;;;AC7BA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,cAAc,mBAAO,CAAC,uDAAW;;AAEjC;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACnBA,aAAa,mBAAO,CAAC,uDAAW;AAChC,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,qBAAqB,mBAAO,CAAC,uEAAmB;;AAEhD;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC3BA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;A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BAAiB,mBAAO,CAAC,6DAAc;AACvC,eAAe,mBAAO,CAAC,2DAAa;AACpC,eAAe,mBAAO,CAAC,yDAAY;AACnC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;AACA;AACA;AACA,oCAAoC;;AAEpC;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC9CA,aAAa,mBAAO,CAAC,uDAAW;AAChC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,eAAe,mBAAO,CAAC,yDAAY;AACnC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC3DA,kBAAkB,mBAAO,CAAC,iEAAgB;AAC1C,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC7BA,eAAe,mBAAO,CAAC,yDAAY;AACnC,kBAAkB,m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ACrB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC/GA,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACzFA;AACA,wBAAwB,qBAAM,gBAAgB,qBAAM,IAAI,qBAAM,sBAAsB,qBAAM;;AAE1F;;;;;;;;;;;ACHA,qBAAqB,mBAAO,CAAC,uEAAmB;AAChD,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,WAAW,mBAAO,CAAC,iDAAQ;;AAE3B;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACfA,qBAAqB,mBA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1C;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACxBA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACdA,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACnBA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACZA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClCA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,GAAG;AAChB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;AClBA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;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c;;AAEtC;AACA;;AAEA;;;;;;;;;;;ACLA,cAAc,mBAAO,CAAC,yDAAY;;AAElC;AACA;;AAEA;;;;;;;;;;;ACLA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACnBA,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA,kBAAkB,KAA0B;;AAE5C;AACA,gCAAgC,QAAa;;AAE7C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ,CAAC;;AAED;;;;;;;;;;;AC7BA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACrBA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,aAAa,UAAU;AACvB;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACdA,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;ACRA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACbA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;;;;;;;;;;ACjBA,gBAAgB,mBAAO,CAAC,6DAAc;;AAEtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACdA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,GAAG;AAChB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACbA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACbA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,UAAU,mBAAO,CAAC,iDAAQ;AAC1B,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjCA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;;;;;;;;;;;ACzBA,gBAAgB,mBAAO,CAAC,6DAAc;;AAEtC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,GAAG;AAChB;AACA;AACA;AACA,oBAAoB,QAAQ,IAAI,QAAQ;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,kBAAkB;AAClB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpCA,sBAAsB,mBAAO,CAAC,yEAAoB;AAClD,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA,8BAA8B,mBAAmB;AACjD;AACA;AACA;AACA;AACA;AACA,+CAA+C,mBAAmB;AAClE;AACA;AACA;;AAEA;;;;;;;;;;;ACnCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACzBA,iBAAiB,mBAAO,CAAC,6DAAc;AACvC,eAAe,mBAAO,CAAC,yDAAY;;AAEnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AChCA,WAAW,mBAAO,CAAC,mDAAS;AAC5B,gBAAgB,mBAAO,CAAC,2DAAa;;AAErC;AACA,kBAAkB,KAA0B;;AAE5C;AACA,gCAAgC,QAAa;;AAE7C;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACrCA,kBAAkB,mBAAO,CAAC,iEAAgB;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,kBAAkB;AAClB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClCA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,eAAe,mBAAO,CAAC,yDAAY;;AAEnC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpCA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClCA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC1BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC9BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC5BA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC1BA,uBAAuB,mBAAO,CAAC,2EAAqB;AACpD,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC1BA,oBAAoB,mBAAO,CAAC,qEAAkB;AAC9C,eAAe,mBAAO,CAAC,2DAAa;AACpC,kBAAkB,mBAAO,CAAC,+DAAe;;AAEzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpCA,oBAAoB,mBAAO,CAAC,qEAAkB;AAC9C,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,kBAAkB,mBAAO,CAAC,+DAAe;;AAEzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC/BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACtBA;AAC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A;;AAEA,kBAAkB,cAAc;AAChC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,kBAAkB,cAAc;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,kBAAkB,aAAa;AAC/B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,iEAAe,GAAG;;;;;;;;;;;;;;;ACtNlB,iEAAe,sCAAsC;;;;;;;;;;;;;;;;ACAhB;;AAErC;AACA,OAAO,wDAAQ;AACf;AACA;;AAEA;AACA,gCAAgC;;AAEhC;AACA;AACA;AACA,qBAAqB;;AAErB;AACA,qBAAqB;;AAErB;AACA,qBAAqB;;AAErB;AACA,qBAAqB;AACrB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,iEAAe,KAAK;;;;;;;;;;;;;;;AClCpB,iEAAe,cAAc,EAAE,UAAU,EAAE,eAAe,EAAE,gBAAgB,EAAE,UAAU,GAAG,yCAAyC;;;;;;;;;;;;;;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CAAC,aAAa,CAAoB,YAAY,CAAC,CAAC;IAEhF,IAAI,eAAe,KAAK,IAAI,EAAE,CAAC;QAC9B,eAAe,CAAC,gBAAgB,CAAC,OAAO,EAAE,KAAK,IAAI,EAAE;YACpD,MAAM,gBAAgB,EAAE,CAAC;QAC1B,CAAC,CAAC,CAAC;IACJ,CAAC;IAED,MAAM,eAAe,EAAE,CAAC;AACzB,CAAC","sources":["webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/@openfin/core-web/out/api-client.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/@openfin/core-web/out/main-8cad4070.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/@openfin/core-web/out/main-b14f67c9.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/base64-js/index.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/buffer/index.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/events/events.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/ieee754/index.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_DataView.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_Hash.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_ListCache.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_Map.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_MapCache.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_Promise.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_Set.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_SetCache.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_Stack.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_Symbol.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_Uint8Array.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_WeakMap.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_arrayEach.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_arrayFilter.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_arrayLikeKeys.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_arrayPush.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_arraySome.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_assignValue.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_assocIndexOf.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseAssign.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseAssignIn.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseAssignValue.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseClone.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseCreate.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseGetAllKeys.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseGetTag.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseIsArguments.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseIsEqual.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseIsEqualDeep.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseIsMap.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseIsNative.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseIsSet.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseIsTypedArray.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseKeys.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseKeysIn.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseTimes.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseUnary.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_cacheHas.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_cloneArrayBuffer.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_cloneBuffer.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_cloneDataView.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_cloneRegExp.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_cloneSymbol.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_cloneTypedArray.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_copyArray.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_copyObject.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_copySymbols.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_copySymbolsIn.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_coreJsData.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_defineProperty.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_equalArrays.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_equalByTag.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_equalObjects.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_freeGlobal.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_getAllKeys.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_getAllKeysIn.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_getMapData.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_getNative.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_getPrototype.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_getRawTag.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_getSymbols.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_getSymbolsIn.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_getTag.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_getValue.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_hashClear.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_hashDelete.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_hashGet.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_hashHas.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_hashSet.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_initCloneArray.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_initCloneByTag.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_initCloneObject.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_isIndex.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_isKeyable.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_isMasked.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_isPrototype.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_listCacheClear.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_listCacheDelete.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_listCacheGet.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_listCacheHas.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_listCacheSet.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_mapCacheClear.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_mapCacheDelete.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_mapCacheGet.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_mapCacheHas.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_mapCacheSet.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_mapToArray.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_nativeCreate.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_nativeKeys.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_nativeKeysIn.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_nodeUtil.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_objectToString.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_overArg.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_root.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_setCacheAdd.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_setCacheHas.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_setToArray.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_stackClear.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_stackDelete.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_stackGet.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_stackHas.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_stackSet.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_toSource.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/cloneDeep.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/eq.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/isArguments.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/isArray.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/isArrayLike.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/isBuffer.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/isEqual.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/isFunction.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/isLength.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/isMap.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/isObject.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/isObjectLike.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/isSet.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/isTypedArray.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/keys.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/keysIn.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/stubArray.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/stubFalse.js","webpack://openfin-web--web-interop-support-context-and-intents/./client/src/content/api.ts","webpack://openfin-web--web-interop-support-context-and-intents/./client/src/platform/settings/settings.ts","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/index.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/md5.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/nil.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/parse.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/regex.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/rng.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/sha1.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/stringify.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/v1.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/v3.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/v35.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/v4.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/v5.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/validate.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/version.js","webpack://openfin-web--web-interop-support-context-and-intents/webpack/bootstrap","webpack://openfin-web--web-interop-support-context-and-intents/webpack/runtime/define property getters","webpack://openfin-web--web-interop-support-context-and-intents/webpack/runtime/global","webpack://openfin-web--web-interop-support-context-and-intents/webpack/runtime/hasOwnProperty shorthand","webpack://openfin-web--web-interop-support-context-and-intents/webpack/runtime/make namespace object","webpack://openfin-web--web-interop-support-context-and-intents/webpack/runtime/node module decorator","webpack://openfin-web--web-interop-support-context-and-intents/./client/src/content/fdc3-view.ts"],"sourcesContent":["\"use strict\";var e=require(\"./main-8cad4070.js\");require(\"buffer/\"),require(\"uuid\"),require(\"events\"),require(\"lodash/cloneDeep\"),require(\"lodash/isEqual\"),exports.connect=e.connect;\n","\"use strict\";var e=require(\"buffer/\"),t=require(\"events\"),n=require(\"lodash/cloneDeep\"),i=require(\"lodash/isEqual\"),r=require(\"uuid\");const o=(e,t)=>`${t}<${btoa(JSON.stringify(e))}>`;var s=\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof window?window:\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:{},a={},c={},d={},h={};async function l(e){const t=[];for(const n of e){const e=await n();t.push(e)}return t}Object.defineProperty(h,\"__esModule\",{value:!0}),h.promiseMapSerial=h.serial=h.promiseMap=h.promisify=void 0,h.promisify=function(e){return(...t)=>new Promise(((n,i)=>{e(...t,((e,t)=>e?i(e):n(t)))}))},h.promiseMap=async function(e,t){return Promise.all(e.map(t))},h.serial=l,h.promiseMapSerial=async function(e,t){return l(e.map(((e,n,i)=>()=>t(e,n,i))))};var u,p=s&&s.__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},w=s&&s.__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)};Object.defineProperty(d,\"__esModule\",{value:!0}),d.Reply=d.EmitterBase=d.Base=void 0;const y=h;class f{constructor(e){this.isNodeEnvironment=()=>\"node\"===this.wire.environment.type,this.isOpenFinEnvironment=()=>\"openfin\"===this.wire.environment.type,this.isBrowserEnvironment=()=>\"other\"===this.wire.environment.type,this.wire=e}get fin(){return this.wire.getFin()}get me(){return this.wire.me}}d.Base=f;d.EmitterBase=class extends f{constructor(e,t,...n){super(e),this.topic=t,u.set(this,void 0),this.eventNames=()=>this.hasEmitter()?this.getOrCreateEmitter().eventNames():[],this.emit=(e,t,...n)=>!!this.hasEmitter()&&this.getOrCreateEmitter().emit(e,t,...n),this.hasEmitter=()=>this.wire.eventAggregator.has(w(this,u,\"f\")),this.getOrCreateEmitter=()=>this.wire.eventAggregator.getOrCreate(w(this,u,\"f\")),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[],this.listenerCount=e=>this.hasEmitter()?this.getOrCreateEmitter().listenerCount(e):0,this.registerEventListener=async(e,t={},n,i)=>{const r={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e},o=this.getOrCreateEmitter();n(o);try{await this.wire.sendAction(\"subscribe-to-desktop-event\",r)}catch(e){throw i(o),this.deleteEmitterIfNothingRegistered(o),e}},this.deregisterEventListener=async(e,t={})=>{if(this.hasEmitter()){const n={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e};await this.wire.sendAction(\"unsubscribe-to-desktop-event\",n).catch((()=>null));return this.getOrCreateEmitter()}return Promise.resolve()},p(this,u,[t,...n],\"f\"),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[]}async on(e,t,n){return await this.registerEventListener(e,n,(n=>{n.on(e,t)}),(n=>{n.removeListener(e,t)})),this}async addListener(e,t,n){return this.on(e,t,n)}async once(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.once(e,i),n.once(e,t)}),(n=>{n.removeListener(e,i),n.removeListener(e,t)})),this}async prependListener(e,t,n){return await this.registerEventListener(e,n,(n=>{n.prependListener(e,t)}),(n=>{n.removeListener(e,t)})),this}async prependOnceListener(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.prependOnceListener(e,t),n.once(e,i)}),(n=>{n.removeListener(e,t),n.removeListener(e,i)})),this}async removeListener(e,t,n){const i=await this.deregisterEventListener(e,n);return i&&(i.removeListener(e,t),this.deleteEmitterIfNothingRegistered(i)),this}async deregisterAllListeners(e){const t={...this.identity,type:e,topic:this.topic};if(this.hasEmitter()){const e=this.getOrCreateEmitter(),n=e.listenerCount(t.type),i=[];for(let e=0;enull)));return await Promise.all(i),e}}async removeAllListeners(e){const t=async e=>{const t=await this.deregisterAllListeners(e);t&&(t.removeAllListeners(e),this.deleteEmitterIfNothingRegistered(t))};if(e)await t(e);else if(this.hasEmitter()){const e=this.getOrCreateEmitter().eventNames();await(0,y.promiseMap)(e,t)}return this}deleteEmitterIfNothingRegistered(e){0===e.eventNames().length&&this.wire.eventAggregator.delete(w(this,u,\"f\"))}},u=new WeakMap;d.Reply=class{};var g={};Object.defineProperty(g,\"__esModule\",{value:!0});var m=g.RuntimeError=g.NotSupportedError=g.NotImplementedError=g.NoAckError=g.DuplicateCorrelationError=g.UnexpectedActionError=g.DisconnectedError=void 0;class v extends Error{constructor(e){super(`Expected websocket state OPEN but found ${e}`),this.readyState=e}}g.DisconnectedError=v;class C extends Error{}g.UnexpectedActionError=C;class b extends Error{}g.DuplicateCorrelationError=b;class I extends Error{}g.NoAckError=I;class E extends Error{}g.NotImplementedError=E;class x extends Error{}g.NotSupportedError=x;class A extends Error{constructor(e){const{message:t,name:n,stack:i,...r}=e;super(t),this.name=n||\"Error\",this.stack=i??this.toString(),Object.keys(r).forEach((e=>{this[e]=r[e]}))}}class P extends Error{static getCallSite(e=0){const t=Error.stackTraceLimit,n=e+1;Error.stackTraceLimit=t+n;const i=Error.prepareStackTrace;Error.prepareStackTrace=(e,t)=>t;const r=(new Error).stack?.slice(n)??[];return Error.prepareStackTrace=i,Error.stackTraceLimit=t,r}static prepareStackTrace(e,t){if(\"function\"==typeof Error.prepareStackTrace)return Error.prepareStackTrace(e,t);let n=\"\";n+=e.name||\"Error\",n+=`: ${e.message||\"\"}`;for(const e of t)n+=`\\n at ${e.toString()}`;return n}constructor(e,t){const{reason:n,error:i}=e;super(n),this.name=\"RuntimeError\",i?.stack&&(this.cause=new A(i)),t&&(this.stack=P.prepareStackTrace(this,t))}}m=g.RuntimeError=P;var M={},_={},O={};Object.defineProperty(O,\"__esModule\",{value:!0}),O.validateIdentity=void 0,O.validateIdentity=function(e){let t;return\"object\"==typeof e&&\"string\"==typeof e.uuid||(t=\"Not a valid identity object\"),t};var S={},R={},F={},j={},k={},L={},T={};Object.defineProperty(T,\"__esModule\",{value:!0}),T.handleDeprecatedWarnings=void 0;var $;T.handleDeprecatedWarnings=e=>{(e.contentNavigation?.whitelist||e.contentNavigation?.blacklist||e.contentRedirect?.whitelist||e.contentRedirect?.blacklist)&&console.warn(\"The properties 'whitelist' and 'blacklist' have been marked as deprecated and will be removed in a future version. Please use 'allowlist' and 'denylist'.\")};var B={},G={};Object.defineProperty(G,\"__esModule\",{value:!0}),G.AsyncRetryableLazy=W=G.Lazy=void 0;var W=G.Lazy=class{constructor(e){this.producerFn=e}getValue(){return this.value||(this.value=this.producerFn()),this.value}};G.AsyncRetryableLazy=class{constructor(e){this.producerFn=e}async getValue(){return this.promise||(this.promise=this.producerFn().catch((e=>{throw delete this.promise,e}))),this.promise}};var H={};Object.defineProperty(H,\"__esModule\",{value:!0}),H.WebContents=void 0;const N=d;class D extends N.EmitterBase{constructor(e,t,n){super(e,n,t.uuid,t.name),this.identity=t,this.entityType=n}capturePage(e){return this.wire.sendAction(\"capture-page\",{options:e,...this.identity}).then((({payload:e})=>e.data))}executeJavaScript(e){return this.wire.sendAction(\"execute-javascript-in-window\",{...this.identity,code:e}).then((({payload:e})=>e.data))}getZoomLevel(){return this.wire.sendAction(\"get-zoom-level\",this.identity).then((({payload:e})=>e.data))}setZoomLevel(e){return this.wire.sendAction(\"set-zoom-level\",{...this.identity,level:e}).then((()=>{}))}navigate(e){return this.wire.sendAction(\"navigate-window\",{...this.identity,url:e}).then((()=>{}))}navigateBack(){return this.wire.sendAction(\"navigate-window-back\",{...this.identity}).then((()=>{}))}async navigateForward(){await this.wire.sendAction(\"navigate-window-forward\",{...this.identity})}stopNavigation(){return this.wire.sendAction(\"stop-window-navigation\",{...this.identity}).then((()=>{}))}reload(e=!1){return this.wire.sendAction(\"reload-window\",{ignoreCache:e,...this.identity}).then((()=>{}))}print(e={}){return this.wire.sendAction(\"print\",{...this.identity,options:e}).then((()=>{}))}findInPage(e,t){return this.wire.sendAction(\"find-in-page\",{...this.identity,searchTerm:e,options:t}).then((({payload:e})=>e.data))}stopFindInPage(e){return this.wire.sendAction(\"stop-find-in-page\",{...this.identity,action:e}).then((()=>{}))}getPrinters(){return this.wire.sendAction(\"get-printers\",{...this.identity}).then((({payload:e})=>e.data))}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){await this.wire.sendAction(\"focus-window\",{emitSynthFocused:e,...this.identity})}async showDeveloperTools(){await this.wire.sendAction(\"show-developer-tools\",this.identity)}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction(\"get-process-info\",this.identity);return e}async getSharedWorkers(){return this.wire.sendAction(\"get-shared-workers\",this.identity).then((({payload:e})=>e.data))}async inspectSharedWorker(){await this.wire.sendAction(\"inspect-shared-worker\",{...this.identity})}async inspectSharedWorkerById(e){await this.wire.sendAction(\"inspect-shared-worker-by-id\",{...this.identity,workerId:e})}async inspectServiceWorker(){await this.wire.sendAction(\"inspect-service-worker\",{...this.identity})}async showPopupWindow(e){if(this.wire.sendAction(`${this.entityType}-show-popup-window`,this.identity).catch((()=>{})),e?.onPopupReady){const t=async({popupName:t})=>{try{const n=this.fin.Window.wrapSync({uuid:this.fin.me.uuid,name:t});await e.onPopupReady(n)}catch(e){throw new Error(`Something went wrong during onPopupReady execution: ${e}`)}};await this.once(\"popup-ready\",t)}const{payload:t}=await this.wire.sendAction(\"try-create-popup-window\",{options:{...e,hasResultCallback:!!e?.onPopupResult,hasReadyCallback:!!e?.onPopupReady},...this.identity}),{data:{willOpen:n,options:i}}=t;n&&await this.fin.Window.create(i.initialOptions);if(e?.onPopupResult){const t=async t=>{await e.onPopupResult((e=>{const{name:t,uuid:n,result:i,data:r}=e,o={identity:{name:t,uuid:n},result:i};return r&&(o.data=r),o})(t))},n=async()=>{await this.removeListener(\"popup-result\",t)};await this.on(\"popup-result\",t),await this.once(\"popup-teardown\",n)}const{payload:r}=await this.wire.sendAction(\"show-popup-window\",{options:i,...this.identity});return r.data}}var U,V,z,K,q;function J(){return V||(V=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(function(){if($)return L;$=1,Object.defineProperty(L,\"__esModule\",{value:!0}),L.ViewModule=void 0;const e=d,t=O,n=J(),i=T;class r extends e.Base{async create(e){const{uuid:t}=this.wire.me;if(!e.name||\"string\"!=typeof e.name)throw new Error(\"Please provide a name property as a string in order to create a View.\");return(0,i.handleDeprecatedWarnings)(e),this.wire.environment.childViews?await this.wire.environment.createChildContent({entityType:\"view\",options:{...e,uuid:t}}):await this.wire.sendAction(\"create-view\",{...e,uuid:t}),this.wrapSync({uuid:t,name:e.name})}async wrap(e){this.wire.sendAction(\"view-wrap\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}wrapSync(e){this.wire.sendAction(\"view-wrap-sync\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}getCurrent(){if(this.wire.sendAction(\"view-get-current\").catch((e=>{})),!this.wire.me.isView)throw new Error(\"You are not in a View context\");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction(\"view-get-current-sync\").catch((e=>{})),!this.wire.me.isView)throw new Error(\"You are not in a View context\");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return L.ViewModule=r,L}(),e),n(function(){if(U)return B;var e;U=1,Object.defineProperty(B,\"__esModule\",{value:!0}),B.View=void 0;const t=g,n=G,i=H,r=ie();class o extends i.WebContents{constructor(i,o){super(i,o,\"view\"),this.identity=o,e.set(this,new n.Lazy((()=>this.fin.Platform.wrapSync(this.identity).getClient()))),this.attach=async e=>{await this.wire.sendAction(\"attach-view\",{target:e,...this.identity})},this.destroy=async()=>{await this.wire.sendAction(\"destroy-view\",{...this.identity})},this.show=async()=>{await this.wire.sendAction(\"show-view\",{...this.identity})},this.showAt=async(e,t={})=>{await this.wire.sendAction(\"show-view-at\",{bounds:e,...this.identity,options:t})},this.bringToFront=async()=>{await this.wire.sendAction(\"bring-view-to-front\",{...this.identity})},this.hide=async()=>{await this.wire.sendAction(\"hide-view\",{...this.identity})},this.setBounds=async e=>{await this.wire.sendAction(\"set-view-bounds\",{bounds:e,...this.identity})},this.getBounds=async()=>(await this.wire.sendAction(\"get-view-bounds\",{...this.identity})).payload.data,this.getInfo=async()=>(await this.wire.sendAction(\"get-view-info\",{...this.identity})).payload.data,this.getParentLayout=async()=>(this.wire.sendAction(\"view-get-parent-layout\",{...this.identity}).catch((()=>{})),this.fin.Platform.Layout.getLayoutByViewIdentity(this.identity)),this.getOptions=async()=>this.wire.sendAction(\"get-view-options\",{...this.identity}).then((({payload:e})=>e.data)),this.updateOptions=async e=>this.wire.sendAction(\"update-view-options\",{options:e,...this.identity}).then((()=>{})),this.getCurrentWindow=async()=>{const{payload:{data:e}}=await this.wire.sendAction(\"get-view-window\",{...this.identity});return new r._Window(this.wire,e)},this.getCurrentStack=async()=>{this.wire.sendAction(\"view-get-current-stack\").catch((()=>{}));try{return(await this.getParentLayout()).getStackByViewIdentity(this.identity)}catch(e){throw new t.RuntimeError({reason:\"This view does not belong to a stack.\",error:e})}},this.triggerBeforeUnload=async()=>(await this.wire.sendAction(\"trigger-before-unload\",{...this.identity})).payload.data,this.bindToElement=async e=>{if(!e)throw new Error(\"Element not found.\");return this.wire.environment.observeBounds(e,(async e=>this.setBounds(e)))}}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){const t=await this.getCurrentWindow();await t.focusedWebViewWasChanged(),await super.focus({emitSynthFocused:e})}}return B.View=o,e=new WeakMap,B}(),e)}(k)),k}function Y(){if(z)return j;z=1,Object.defineProperty(j,\"__esModule\",{value:!0}),j.Application=void 0;const e=d,t=ie(),n=J();class i extends e.EmitterBase{constructor(e,n){super(e,\"application\",n.uuid),this.identity=n,this.window=new t._Window(this.wire,{uuid:this.identity.uuid,name:this.identity.uuid})}windowListFromIdentityList(e){const n=[];return e.forEach((e=>{n.push(new t._Window(this.wire,{uuid:e.uuid,name:e.name}))})),n}isRunning(){return this.wire.sendAction(\"is-application-running\",this.identity).then((({payload:e})=>e.data))}async quit(e=!1){try{await this._close(e),await this.wire.sendAction(\"destroy-application\",{force:e,...this.identity})}catch(e){if(![\"Remote connection has closed\",\"Could not locate the requested application\"].some((t=>e.message.includes(t))))throw e}}async _close(e=!1){try{await this.wire.sendAction(\"close-application\",{force:e,...this.identity})}catch(e){if(!e.message.includes(\"Remote connection has closed\"))throw e}}close(e=!1){return console.warn(\"Deprecation Warning: Application.close is deprecated Please use Application.quit\"),this.wire.sendAction(\"application-close\",this.identity).catch((e=>{})),this._close(e)}getChildWindows(){return this.wire.sendAction(\"get-child-windows\",this.identity).then((({payload:e})=>{const t=[];return e.data.forEach((e=>{t.push({uuid:this.identity.uuid,name:e})})),this.windowListFromIdentityList(t)}))}getManifest(){return this.wire.sendAction(\"get-application-manifest\",this.identity).then((({payload:e})=>e.data))}getParentUuid(){return this.wire.sendAction(\"get-parent-application\",this.identity).then((({payload:e})=>e.data))}getShortcuts(){return this.wire.sendAction(\"get-shortcuts\",this.identity).then((({payload:e})=>e.data))}async getViews(){const{payload:e}=await this.wire.sendAction(\"application-get-views\",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}getZoomLevel(){return this.wire.sendAction(\"get-application-zoom-level\",this.identity).then((({payload:e})=>e.data))}getWindow(){return this.wire.sendAction(\"application-get-window\",this.identity).catch((e=>{})),Promise.resolve(this.window)}registerUser(e,t){return this.wire.sendAction(\"register-user\",{userName:e,appName:t,...this.identity}).then((()=>{}))}removeTrayIcon(){return this.wire.sendAction(\"remove-tray-icon\",this.identity).then((()=>{}))}restart(){return this.wire.sendAction(\"restart-application\",this.identity).then((()=>{}))}run(){return console.warn(\"Deprecation Warning: Application.run is deprecated Please use fin.Application.start\"),this.wire.sendAction(\"application-run\",this.identity).catch((e=>{})),this._run()}_run(e={}){return this.wire.sendAction(\"run-application\",{manifestUrl:this._manifestUrl,opts:e,...this.identity}).then((()=>{}))}scheduleRestart(){return this.wire.sendAction(\"relaunch-on-close\",this.identity).then((()=>{}))}async sendApplicationLog(){const{payload:e}=await this.wire.sendAction(\"send-application-log\",this.identity);return e.data}async setJumpList(e){await this.wire.sendAction(\"set-jump-list\",{config:e,...this.identity})}setTrayIcon(e){return this.wire.sendAction(\"set-tray-icon\",{enabledIcon:e,...this.identity}).then((()=>{}))}setShortcuts(e){return this.wire.sendAction(\"set-shortcuts\",{data:e,...this.identity}).then((()=>{}))}async setShortcutQueryParams(e){await this.wire.sendAction(\"set-shortcut-query-args\",{data:e,...this.identity})}setZoomLevel(e){return this.wire.sendAction(\"set-application-zoom-level\",{level:e,...this.identity}).then((()=>{}))}async setAppLogUsername(e){await this.wire.sendAction(\"set-app-log-username\",{data:e,...this.identity})}getTrayIconInfo(){return this.wire.sendAction(\"get-tray-icon-info\",this.identity).then((({payload:e})=>e.data))}hasTrayIcon(){return this.wire.sendAction(\"has-tray-icon\",this.identity).then((({payload:e})=>e.data))}terminate(){return this.wire.sendAction(\"terminate-application\",this.identity).then((()=>{}))}wait(){return this.wire.sendAction(\"wait-for-hung-application\",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction(\"get-info\",this.identity).then((({payload:e})=>e.data))}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction(\"application-get-process-info\",this.identity);return e}async setFileDownloadLocation(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t};await this.wire.sendAction(\"set-file-download-location\",{...n,downloadLocation:e})}async getFileDownloadLocation(){const{payload:{data:e}}=await this.wire.sendAction(\"get-file-download-location\",this.identity);return e}async showTrayIconPopupMenu(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t},{payload:i}=await this.wire.sendAction(\"show-tray-icon-popup-menu\",{...n,options:e});return i.data}async closeTrayIconPopupMenu(){const{name:e}=this.wire.me,t={uuid:this.identity.uuid,name:e};await this.wire.sendAction(\"close-tray-icon-popup-menu\",{...t})}}return j.Application=i,j}function Z(){return q||(q=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(function(){if(K)return F;K=1,Object.defineProperty(F,\"__esModule\",{value:!0}),F.ApplicationModule=void 0;const e=d,t=O,n=Y();class i extends e.Base{async wrap(e){this.wire.sendAction(\"wrap-application\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}wrapSync(e){this.wire.sendAction(\"wrap-application-sync\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}async _create(e){return void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&void 0===e.isPlatformController&&(e.autoShow=!0),await this.wire.sendAction(\"create-application\",e),this.wrap({uuid:e.uuid})}create(e){return console.warn(\"Deprecation Warning: fin.Application.create is deprecated. Please use fin.Application.start\"),this.wire.sendAction(\"application-create\").catch((e=>{})),this._create(e)}async start(e){this.wire.sendAction(\"start-application\").catch((e=>{}));const t=await this._create(e);return await this.wire.sendAction(\"run-application\",{uuid:e.uuid}),t}async startManyManifests(e,t){return this.wire.sendAction(\"run-applications\",{applications:e,opts:t}).then((()=>{}))}getCurrent(){return this.wire.sendAction(\"get-current-application\").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction(\"get-current-application-sync\").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}async startFromManifest(e,t){this.wire.sendAction(\"application-start-from-manifest\").catch((e=>{}));const n=await this._createFromManifest(e);return await n._run(t),n}createFromManifest(e){return console.warn(\"Deprecation Warning: fin.Application.createFromManifest is deprecated. Please use fin.Application.startFromManifest\"),this.wire.sendAction(\"application-create-from-manifest\").catch((e=>{})),this._createFromManifest(e)}_createFromManifest(e){return this.wire.sendAction(\"get-application-manifest\",{manifestUrl:e}).then((({payload:e})=>{const t=e.data.platform?e.data.platform.uuid:e.data.startup_app.uuid;return this.wrap({uuid:t})})).then((t=>(t._manifestUrl=e,t)))}}return F.ApplicationModule=i,F}(),e),n(Y(),e)}(R)),R}H.WebContents=D;var Q={};Object.defineProperty(Q,\"__esModule\",{value:!0}),Q.promisifySubscription=void 0;var X,ee,te;function ne(){if(X)return S;X=1,Object.defineProperty(S,\"__esModule\",{value:!0}),S._Window=void 0;const e=Z(),t=H,n=J(),i=T,r=Q;class o extends t.WebContents{constructor(e,t){super(e,t,\"window\")}async createWindow(e){this.wire.sendAction(\"window-create-window\",this.identity).catch((e=>{}));const t=await(0,r.promisifySubscription)(this,\"fire-constructor-callback\");void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&(e.autoShow=!0),(0,i.handleDeprecatedWarnings)(e);const n=this.wire.environment.createChildContent({entityType:\"window\",options:e}),[o]=await Promise.all([t.getValue(),n]);let s;const{success:a}=o,c=o.data,{message:d}=c;s=a?{httpResponseCode:c.httpResponseCode,apiInjected:c.apiInjected}:{message:c.message,networkErrorCode:c.networkErrorCode,stack:c.stack};const h={message:d,cbPayload:s,success:a};try{this.getWebWindow().fin.__internal_.openerSuccessCBCalled()}catch(e){}return h.success?this:Promise.reject(h)}getAllFrames(){return this.wire.sendAction(\"get-all-frames\",this.identity).then((({payload:e})=>e.data))}getBounds(){return this.wire.sendAction(\"get-window-bounds\",this.identity).then((({payload:e})=>e.data))}center(){return this.wire.sendAction(\"center-window\",this.identity).then((()=>{}))}blur(){return this.wire.sendAction(\"blur-window\",this.identity).then((()=>{}))}bringToFront(){return this.wire.sendAction(\"bring-window-to-front\",this.identity).then((()=>{}))}animate(e,t){return this.wire.sendAction(\"animate-window\",{transitions:e,options:t,...this.identity}).then((()=>{}))}hide(){return this.wire.sendAction(\"hide-window\",this.identity).then((()=>{}))}close(e=!1){return this.wire.sendAction(\"close-window\",{force:e,...this.identity}).then((()=>{Object.setPrototypeOf(this,null)}))}focusedWebViewWasChanged(){return this.wire.sendAction(\"focused-webview-changed\",this.identity).then((()=>{}))}getNativeId(){return this.wire.sendAction(\"get-window-native-id\",this.identity).then((({payload:e})=>e.data))}async getCurrentViews(){const{payload:e}=await this.wire.sendAction(\"window-get-views\",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}disableFrame(){return console.warn(\"Function is deprecated; use disableUserMovement instead.\"),this.wire.sendAction(\"disable-window-frame\",this.identity).then((()=>{}))}disableUserMovement(){return this.wire.sendAction(\"disable-window-frame\",this.identity).then((()=>{}))}enableFrame(){return console.warn(\"Function is deprecated; use enableUserMovement instead.\"),this.wire.sendAction(\"enable-window-frame\",this.identity).then((()=>{}))}enableUserMovement(){return this.wire.sendAction(\"enable-window-frame\",this.identity).then((()=>{}))}flash(){return this.wire.sendAction(\"flash-window\",this.identity).then((()=>{}))}stopFlashing(){return this.wire.sendAction(\"stop-flash-window\",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction(\"get-window-info\",this.identity).then((({payload:e})=>e.data))}async getLayout(e){this.wire.sendAction(\"window-get-layout\",this.identity).catch((e=>{}));const t=await this.getOptions();if(!t.layout&&!t.layoutSnapshot)throw new Error(\"Window does not have a Layout\");return this.fin.Platform.Layout.wrap(e??this.identity)}getOptions(){return this.wire.sendAction(\"get-window-options\",this.identity).then((({payload:e})=>e.data))}getParentApplication(){return this.wire.sendAction(\"window-get-parent-application\",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity))}getParentWindow(){return this.wire.sendAction(\"window-get-parent-window\",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity)).then((e=>e.getWindow()))}async getSnapshot(e){const t={area:e,...this.identity};console.warn(\"Window.getSnapshot has been deprecated, please use Window.capturePage\");return(await this.wire.sendAction(\"get-window-snapshot\",t)).payload.data}getState(){return this.wire.sendAction(\"get-window-state\",this.identity).then((({payload:e})=>e.data))}getWebWindow(){return this.wire.sendAction(\"window-get-web-window\",this.identity).catch((e=>{})),this.wire.environment.getWebWindow(this.identity)}isMainWindow(){return this.wire.sendAction(\"window-is-main-window\",this.identity).catch((e=>{})),this.me.uuid===this.me.name}isShowing(){return this.wire.sendAction(\"is-window-showing\",this.identity).then((({payload:e})=>e.data))}maximize(){return this.wire.sendAction(\"maximize-window\",this.identity).then((()=>{}))}minimize(){return this.wire.sendAction(\"minimize-window\",this.identity).then((()=>{}))}moveBy(e,t,n){return this.wire.sendAction(\"move-window-by\",{deltaLeft:e,deltaTop:t,positioningOptions:n,...this.identity}).then((()=>{}))}moveTo(e,t,n){return this.wire.sendAction(\"move-window\",{left:e,top:t,positioningOptions:n,...this.identity}).then((()=>{}))}resizeBy(e,t,n,i){return this.wire.sendAction(\"resize-window-by\",{deltaWidth:Math.floor(e),deltaHeight:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}resizeTo(e,t,n,i){return this.wire.sendAction(\"resize-window\",{width:Math.floor(e),height:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}restore(){return this.wire.sendAction(\"restore-window\",this.identity).then((()=>{}))}setAsForeground(){return this.wire.sendAction(\"set-foreground-window\",this.identity).then((()=>{}))}setBounds(e,t){return this.wire.sendAction(\"set-window-bounds\",{...e,...this.identity,positioningOptions:t}).then((()=>{}))}show(e=!1){return this.wire.sendAction(\"show-window\",{force:e,...this.identity}).then((()=>{}))}showAt(e,t,n=!1){return this.wire.sendAction(\"show-at-window\",{force:n,left:Math.floor(e),top:Math.floor(t),...this.identity}).then((()=>{}))}updateOptions(e){return this.wire.sendAction(\"update-window-options\",{options:e,...this.identity}).then((()=>{}))}authenticate(e,t){return this.wire.sendAction(\"window-authenticate\",{userName:e,password:t,...this.identity}).then((()=>{}))}async showPopupMenu(e){const{payload:t}=await this.wire.sendAction(\"show-popup-menu\",{options:e,...this.identity});return t.data}async closePopupMenu(){return this.wire.sendAction(\"close-popup-menu\",{...this.identity}).then((()=>{}))}async dispatchPopupResult(e){this.wire.sendAction(\"window-dispatch-popup-result\",this.identity).catch((e=>{})),await this.wire.sendAction(\"dispatch-popup-result\",{data:e,...this.identity})}async print(e={content:\"self\"}){switch(e.content){case void 0:case\"self\":return super.print(e);case\"screenshot\":return this.wire.sendAction(\"print-screenshot\",this.identity).then((()=>{}));case\"views\":return this.wire.sendAction(\"print-views\",{...this.identity,options:e}).then((()=>{}));default:return}}}return S._Window=o,S}function ie(){return te||(te=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(function(){if(ee)return _;ee=1,Object.defineProperty(_,\"__esModule\",{value:!0}),_._WindowModule=void 0;const e=d,t=O,n=ne();class i extends e.Base{async wrap(e){this.wire.sendAction(\"window-wrap\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}wrapSync(e){this.wire.sendAction(\"window-wrap-sync\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}create(e){return this.wire.sendAction(\"create-window\").catch((e=>{})),new n._Window(this.wire,{uuid:this.me.uuid,name:e.name}).createWindow(e)}getCurrent(){if(this.wire.sendAction(\"get-current-window\").catch((e=>{})),!this.wire.me.isWindow)throw new Error(\"You are not in a Window context\");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction(\"get-current-window-sync\").catch((e=>{})),!this.wire.me.isWindow)throw new Error(\"You are not in a Window context\");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return _._WindowModule=i,_}(),e),n(ne(),e)}(M)),M}Q.promisifySubscription=async(e,t,n=(()=>!0),i)=>{let r,o,s;const a=new Promise(((e,t)=>{r=e,o=t})),c=e=>{n(e)&&(clearTimeout(s),r(e))};return await e.on(t,c),i&&(s=setTimeout((()=>o(new Error(\"event timed out\"))),i)),a.finally((()=>{e.removeListener(t,c).catch((()=>null))})),{getValue:()=>a}},Object.defineProperty(c,\"__esModule\",{value:!0}),c.System=void 0;const re=d,oe=g,se=ie(),ae=t;class ce extends re.EmitterBase{constructor(e){super(e,\"system\")}sendExternalProcessRequest(e,t){return new Promise(((n,i)=>{const r=\"external-process-exited\";let o,s,a,c;\"function\"==typeof t.listener&&(a=e=>{const n=e||{};s={topic:\"exited\",uuid:n.processUuid||\"\",exitCode:n.exitCode||0},o===e.processUuid&&(t.listener(s),c.removeListener(r,a))},this.wire.me.name||(this.wire.me.name=this.wire.me.uuid),c=new se._Window(this.wire,this.wire.me),c.on(r,a)),this.wire.sendAction(e,t).then((({payload:e})=>{o=e.data.uuid,n(e.data),s&&o===s.uuid&&(t.listener(s),c.removeListener(r,a))})).catch((e=>{c&&c.removeListener(r,a),i(e)}))}))}getVersion(){return this.wire.sendAction(\"get-version\").then((({payload:e})=>e.data))}clearCache(e){return this.wire.sendAction(\"clear-cache\",e).then((()=>{}))}deleteCacheOnExit(){return this.wire.sendAction(\"delete-cache-request\").then((()=>{}))}exit(){return this.wire.sendAction(\"exit-desktop\").then((()=>{}))}async fetchManifest(e){const{payload:{data:t}}=await this.wire.sendAction(\"fetch-manifest\",{manifestUrl:e});return t}flushCookieStore(){return this.wire.sendAction(\"flush-cookie-store\").then((()=>{}))}getAllWindows(){return this.wire.sendAction(\"get-all-windows\").then((({payload:e})=>e.data))}getAllApplications(){return this.wire.sendAction(\"get-all-applications\").then((({payload:e})=>e.data))}getCommandLineArguments(){return this.wire.sendAction(\"get-command-line-arguments\").then((({payload:e})=>e.data))}async getCrashReporterState(){const{payload:{data:{diagnosticMode:e,isRunning:t}}}=await this.wire.sendAction(\"get-crash-reporter-state\");return console.warn(\"diagnosticMode property is deprecated. It will be removed in a future version\"),{diagnosticMode:e,diagnosticsMode:e,isRunning:t}}async startCrashReporter(e){const t=e,n={...t,diagnosticMode:t.diagnosticsMode||t.diagnosticMode},{payload:{data:{diagnosticMode:i,isRunning:r}}}=await this.wire.sendAction(\"start-crash-reporter\",n);return{diagnosticMode:i,diagnosticsMode:i,isRunning:r}}getUniqueUserId(){return this.wire.sendAction(\"get-unique-user-id\").then((({payload:e})=>e.data))}getEntityInfo(e,t){return this.wire.sendAction(\"get-entity-info\",{uuid:e,name:t}).then((({payload:e})=>e.data))}getEnvironmentVariable(e){return this.wire.sendAction(\"get-environment-variable\",{environmentVariables:e}).then((({payload:e})=>e.data))}getFocusedWindow(){return this.wire.sendAction(\"get-focused-window\").then((({payload:e})=>e.data))}async isAppCertified(e){const{payload:{data:{certifiedInfo:t}}}=await this.wire.sendAction(\"is-app-certified\",{manifestUrl:e});return t}getInstalledRuntimes(){return this.wire.sendAction(\"get-installed-runtimes\").then((({payload:e})=>e.data.runtimes))}async getInstalledApps(){const{payload:{data:{installedApps:e}}}=await this.wire.sendAction(\"get-installed-apps\");return e}getLog(e){return this.wire.sendAction(\"view-log\",e).then((({payload:e})=>e.data))}getMachineId(){return this.wire.sendAction(\"get-machine-id\").then((({payload:e})=>e.data))}getMinLogLevel(){return this.wire.sendAction(\"get-min-log-level\").then((({payload:e})=>e.data))}getLogList(){return this.wire.sendAction(\"list-logs\").then((({payload:e})=>e.data))}getMonitorInfo(){return this.wire.sendAction(\"get-monitor-info\").then((({payload:e})=>e.data))}getMousePosition(){return this.wire.sendAction(\"get-mouse-position\").then((({payload:e})=>e.data))}getProcessList(){return console.warn(\"System.getProcessList has been deprecated. Please consider using our new process APIs: Window.getProcessInfo, View.getProcessInfo, Application.getProcessInfo, System.getAllProcessInfo\"),this.wire.sendAction(\"process-snapshot\").then((({payload:e})=>e.data))}async getAllProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction(\"get-all-process-info\",this.identity);return e}getProxySettings(){return this.wire.sendAction(\"get-proxy-settings\").then((({payload:e})=>e.data))}getRuntimeInfo(){return this.wire.sendAction(\"get-runtime-info\").then((({payload:e})=>e.data))}getRvmInfo(){return this.wire.sendAction(\"get-rvm-info\").then((({payload:e})=>e.data))}getHostSpecs(){return this.wire.sendAction(\"get-host-specs\").then((({payload:e})=>e.data))}getOSInfo(){return this.wire.sendAction(\"get-os-info\").then((({payload:e})=>e.data))}launchExternalProcess(e){return this.sendExternalProcessRequest(\"launch-external-process\",e)}monitorExternalProcess(e){return this.sendExternalProcessRequest(\"monitor-external-process\",e)}log(e,t){return this.wire.sendAction(\"write-to-log\",{level:e,message:t}).then((()=>{}))}openUrlWithBrowser(e){return this.wire.sendAction(\"open-url-with-browser\",{url:e}).then((()=>{}))}async registerCustomProtocol(e){if(\"object\"!=typeof e)throw new Error(\"Must provide an object with a `protocolName` property having a string value.\");await this.wire.sendAction(\"register-custom-protocol\",e)}async unregisterCustomProtocol(e){await this.wire.sendAction(\"unregister-custom-protocol\",{protocolName:e})}async getCustomProtocolState(e){return this.wire.sendAction(\"get-custom-protocol-state\",{protocolName:e}).then((({payload:e})=>e.data))}releaseExternalProcess(e){return this.wire.sendAction(\"release-external-process\",{uuid:e}).then((()=>{}))}showDeveloperTools(e){return this.wire.sendAction(\"show-developer-tools\",e).then((()=>{}))}terminateExternalProcess(e){return this.wire.sendAction(\"terminate-external-process\",e).then((()=>{}))}updateProxySettings(e){return this.wire.sendAction(\"update-proxy\",e).then((()=>{}))}async downloadAsset(e,t){const n=()=>{};let i=n,r=n;const o=new Promise(((e,t)=>{i=e,r=t}));if(\"openfin\"!==this.wire.environment.type)throw new oe.NotSupportedError(\"downloadAsset only supported in an OpenFin Render process\");const s=oe.RuntimeError.getCallSite(),a=this.wire.environment.getNextMessageId().toString(),c=`asset-download-progress-${a}`,d=`asset-download-error-${a}`,h=`asset-download-complete-${a}`,l=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},u=()=>{this.removeListener(c,l)};await Promise.all([this.on(c,l),this.once(d,(e=>{u();const{reason:t,err:n}=e;r(new oe.RuntimeError({reason:t,error:n},s))})),this.once(h,(()=>{u(),i()}))]);const p=Object.assign(e,{downloadId:a});return await this.wire.sendAction(\"download-asset\",p).catch((e=>{throw u(),e})),o}downloadRuntime(e,t){const n=oe.RuntimeError.getCallSite();return new Promise(((i,r)=>{if(\"openfin\"!==this.wire.environment.type)return void r(new oe.NotSupportedError(\"downloadRuntime only supported in an OpenFin Render process\"));const o=this.wire.environment.getNextMessageId().toString(),s=`runtime-download-progress-${o}`,a=`runtime-download-error-${o}`,c=`runtime-download-complete-${o}`,d=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},h=()=>{this.removeListener(s,d)};this.on(s,d),this.once(a,(e=>{h();const{reason:t,err:i}=e;r(new oe.RuntimeError({reason:t,error:i},n))})),this.once(c,(()=>{h(),i()}));const l=Object.assign(e,{downloadId:o});this.wire.sendAction(\"download-runtime\",l).catch((e=>{h(),r(e)}))}))}downloadPreloadScripts(e){return this.wire.sendAction(\"download-preload-scripts\",{scripts:e}).then((({payload:e})=>e.data))}getAllExternalApplications(){return this.wire.sendAction(\"get-all-external-applications\").then((({payload:e})=>e.data))}getAppAssetInfo(e){return this.wire.sendAction(\"get-app-asset-info\",e).then((({payload:e})=>e.data))}getCookies(e){const t=this.wire.environment.getUrl(),n=Object.assign(e,{url:t});return this.wire.sendAction(\"get-cookies\",n).then((({payload:e})=>e.data))}setMinLogLevel(e){return this.wire.sendAction(\"set-min-log-level\",{level:e}).then((()=>{}))}resolveUuid(e){return this.wire.sendAction(\"resolve-uuid\",{entityKey:e}).then((({payload:e})=>e.data))}executeOnRemote(e,t){return t.requestingIdentity=e,this.wire.ferryAction(t)}readRegistryValue(e,t,n){return this.wire.sendAction(\"read-registry-value\",{rootKey:e,subkey:t,value:n}).then((({payload:e})=>e.data))}registerExternalConnection(e){return this.wire.sendAction(\"register-external-connection\",{uuid:e}).then((({payload:e})=>e.data))}async getServiceConfiguration(e){if(\"string\"!=typeof e.name)throw new Error(\"Must provide an object with a `name` property having a string value\");const{name:t}=e;return this.wire.sendAction(\"get-service-configuration\",{name:t}).then((({payload:e})=>e.data))}async getSystemAppConfig(e){if(\"string\"!=typeof e)throw new Error(\"Must provide a string value for name of system app\");return this.wire.sendAction(\"get-system-app-configuration\",{name:e}).then((({payload:e})=>e.data))}async registerShutdownHandler(e){this.wire.sendAction(\"system-register-shutdown-handler\").catch((e=>{}));const{uuid:t,name:n}=this.wire.me;this.on(\"system-shutdown\",(i=>{e({proceed:()=>{this.wire.environment.raiseEvent(\"application/system-shutdown-handled\",{uuid:t,name:n,topic:\"application\"})}})}))}runRvmHealthCheck(){return this.wire.sendAction(\"run-rvm-health-check\").then((({payload:e})=>e.data))}async launchManifest(e,t={}){const{subscribe:n,...i}=t,r=i;if(n){const e=new ae.EventEmitter;n(e);const t=\"app-version-progress\",i=\"runtime-status\",o=\"app-version-complete\",s=\"app-version-error\",a=this.wire.environment.getNextMessageId().toString();r.appVersionId=a;const c=[o,t,i,s],d=e=>{const{appVersionId:t,topic:n,type:i,...r}=e;return{...r,type:c.find((e=>i.includes(e)))}},h=t=>{const n=d(t);e.emit(n.type,n)},l=()=>{this.removeListener(`${t}.${a}`,h),this.removeListener(`${i}.${a}`,h),this.removeListener(`${o}.${a}`,h),this.removeListener(`${s}.${a}`,h),this.removeListener(`${o}.${a}`,l),this.removeListener(`${s}.${a}`,l)};await Promise.all([this.on(`${t}.${a}`,h),this.on(`${i}.${a}`,h),this.once(`${o}.${a}`,h),this.once(`${s}.${a}`,h),this.once(`${o}.${a}`,l),this.once(`${s}.${a}`,l)])}return(await this.wire.sendAction(\"launch-manifest\",{manifestUrl:e,opts:r})).payload.data.manifest}async queryPermissionForCurrentContext(e){const t={uuid:this.wire.me.uuid,name:this.wire.me.name};return(await this.wire.sendAction(\"query-permission-for-current-context\",{apiName:e,identity:t})).payload.data}async enableNativeWindowIntegrationProvider(e){const{payload:t}=await this.wire.sendAction(\"enable-native-window-integration-provider\",{permissions:e});return t.data}async registerUsage({data:e,type:t}){await this.wire.sendAction(\"register-usage\",{data:e,type:t})}async getPrinters(){const{payload:e}=await this.wire.sendAction(\"system-get-printers\");return e.data}async updateProcessLoggingOptions(e){await this.wire.sendAction(\"system-update-process-logging-options\",{options:e})}async getDomainSettings(){const{payload:{data:e}}=await this.wire.sendAction(\"get-domain-settings\",this.identity);return e}async setDomainSettings(e){await this.wire.sendAction(\"set-domain-settings\",{domainSettings:e,...this.identity})}async refreshExtensions(){const{payload:e}=await this.wire.sendAction(\"refresh-extensions\");return e.data}async getInstalledExtensions(){const{payload:e}=await this.wire.sendAction(\"get-installed-extensions\");return e.data}}c.System=ce;var de={},he={};Object.defineProperty(he,\"__esModule\",{value:!0}),he.RefCounter=void 0;he.RefCounter=class{constructor(){this.topicRefMap=new Map}incRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t+1;n=i,this.topicRefMap.set(e,i)}else this.topicRefMap.set(e,1),n=1;return n}decRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t-1;this.topicRefMap.set(e,i),n=i}else n=-1;return n}actOnFirst(e,t,n){return 1===this.incRefCount(e)?t():n()}actOnLast(e,t,n){return 0===this.decRefCount(e)?t():n()}};var le={},ue={},pe={};Object.defineProperty(pe,\"__esModule\",{value:!0}),pe.ChannelBase=pe.ProtectedItems=void 0;const we=e=>async(t,n,i)=>{const r=await e(t,n,i);return void 0===r?n:r};pe.ProtectedItems=class{constructor(e,t){this.providerIdentity=e,this.close=t}};class ye{static defaultAction(e){throw new Error(`No action registered at target for ${e}`)}constructor(){this.subscriptions=new Map}async processAction(e,t,n){try{const i=this.subscriptions.has(e)?this.subscriptions.get(e):(t,n)=>(this.defaultAction??ye.defaultAction)(e,t,n),r=this.preAction?await this.preAction(e,t,n):t,o=await i(r,n);return this.postAction?await this.postAction(e,o,n):o}catch(t){if(this.errorMiddleware)return this.errorMiddleware(e,t,n);throw t}}beforeAction(e){if(this.preAction)throw new Error(\"Already registered beforeAction middleware\");this.preAction=we(e)}onError(e){if(this.errorMiddleware)throw new Error(\"Already registered error middleware\");this.errorMiddleware=e}afterAction(e){if(this.postAction)throw new Error(\"Already registered afterAction middleware\");this.postAction=we(e)}remove(e){this.subscriptions.delete(e)}setDefaultAction(e){if(this.defaultAction)throw new Error(\"default action can only be set once\");this.defaultAction=e}register(e,t){if(this.subscriptions.has(e))throw new Error(`Subscription already registered for action: ${e}. Unsubscribe before adding new subscription`);return this.subscriptions.set(e,t),!0}}pe.ChannelBase=ye;var fe,ge,me,ve=s&&s.__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)},Ce=s&&s.__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};Object.defineProperty(ue,\"__esModule\",{value:!0}),ue.ChannelClient=void 0;const be=pe,Ie=new Map;class Ee extends be.ChannelBase{static closeChannelByEndpointId(e){const t=Ie.get(e);t&&ve(t,me,\"f\").call(t)}static handleProviderDisconnect(e){for(const t of Ie.values())t.providerIdentity.channelId===e.channelId&&(t.disconnectListener(e),ve(t,me,\"f\").call(t))}constructor(e,t,n){super(),fe.set(this,void 0),ge.set(this,void 0),this.processAction=(e,t,n)=>super.processAction(e,t,n),me.set(this,(()=>{Ie.delete(this.endpointId),ve(this,ge,\"f\").close()})),Ce(this,fe,new be.ProtectedItems(e,t),\"f\"),this.disconnectListener=()=>{},this.endpointId=e.endpointId,Ce(this,ge,n,\"f\"),Ie.set(this.endpointId,this),n.receive(this.processAction)}get providerIdentity(){return ve(this,fe,\"f\").providerIdentity}async dispatch(e,t){if(ve(this,ge,\"f\").isEndpointConnected(this.providerIdentity.channelId))return ve(this,ge,\"f\").send(this.providerIdentity.channelId,e,t);throw new Error(\"The client you are trying to dispatch from is disconnected from the target provider.\")}onDisconnection(e){this.disconnectListener=t=>{try{e(t)}catch(e){throw new Error(`Error while calling the onDisconnection callback: ${e.message}`)}finally{this.disconnectListener=()=>{}}}}async disconnect(){await this.sendDisconnectAction(),ve(this,me,\"f\").call(this)}async sendDisconnectAction(){const e=ve(this,fe,\"f\");await e.close()}static async wireClose(e,t,n){const{channelName:i,uuid:r,name:o}=t;await e.sendAction(\"disconnect-from-channel\",{channelName:i,uuid:r,name:o,endpointId:n})}}ue.ChannelClient=Ee,fe=new WeakMap,ge=new WeakMap,me=new WeakMap;var xe={},Ae={};Object.defineProperty(Ae,\"__esModule\",{value:!0}),Ae.exhaustiveCheck=void 0,Ae.exhaustiveCheck=function(e,t){throw new Error(`Unsupported value: ${e}${t?`\\n Supported values are: ${t.join(\"\")}`:\"\"}`)};var Pe,Me,_e,Oe={},Se=s&&s.__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},Re=s&&s.__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)};Object.defineProperty(Oe,\"__esModule\",{value:!0}),Oe.ClassicInfo=Oe.ClassicStrategy=void 0;Oe.ClassicStrategy=class{constructor(e,t,n,i){this.messageReceiver=t,this.endpointId=n,this.providerIdentity=i,Pe.set(this,void 0),Me.set(this,new Map),_e.set(this,new Map),this.send=async(e,t,n)=>{const i=Re(this,Me,\"f\").get(e);if(!i)throw new Error(`Could not locate routing info for endpoint ${e}`);const r={...i};r.isLocalEndpointId&&delete r.endpointId,delete r.isLocalEndpointId;const o=Re(this,Pe,\"f\").sendAction(\"send-channel-message\",{...r,providerIdentity:this.providerIdentity,action:t,payload:n});Re(this,_e,\"f\").get(e)?.add(o);return(await o.catch((e=>{throw new Error(e.message)})).finally((()=>{Re(this,_e,\"f\").get(e)?.delete(o)}))).payload.data.result},this.close=async()=>{this.messageReceiver.removeEndpoint(this.providerIdentity.channelId,this.endpointId),[...Re(this,Me,\"f\").keys()].forEach((e=>this.closeEndpoint(e))),Se(this,Me,new Map,\"f\")},Se(this,Pe,e,\"f\")}onEndpointDisconnect(e,t){}receive(e){this.messageReceiver.addEndpoint(e,this.providerIdentity.channelId,this.endpointId)}async closeEndpoint(e){const t=Re(this,Me,\"f\").get(e);Re(this,Me,\"f\").delete(e);const n=Re(this,_e,\"f\").get(e);n?.forEach((n=>{const i=`Channel connection with identity uuid: ${t?.uuid} / name: ${t?.name} / endpointId: ${e} no longer connected.`;n.cancel(new Error(i))}))}isEndpointConnected(e){return Re(this,Me,\"f\").has(e)}addEndpoint(e,t){Re(this,Me,\"f\").set(e,t.endpointIdentity),Re(this,_e,\"f\").set(e,new Set)}isValidEndpointPayload(e){return\"string\"==typeof e?.endpointIdentity?.endpointId||\"string\"==typeof e?.endpointIdentity?.channelId}},Pe=new WeakMap,Me=new WeakMap,_e=new WeakMap,Oe.ClassicInfo={version:5,minimumVersion:0,type:\"classic\"};var Fe={},je={},ke={};Object.defineProperty(ke,\"__esModule\",{value:!0}),ke.errorToPOJO=void 0,ke.errorToPOJO=function(e){return{stack:e.stack,name:e.name,message:e.message,toString:()=>e.stack||e.toString()}};var Le,Te,$e=s&&s.__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)},Be=s&&s.__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};Object.defineProperty(je,\"__esModule\",{value:!0}),je.RTCEndpoint=void 0;const Ge=ke;je.RTCEndpoint=class{static isValidEndpointPayload(e){const t=e=>\"object\"==typeof e&&null!==e;return t(e)&&t(e.endpointIdentity)&&t(e.rtc)&&\"string\"==typeof e.endpointIdentity.endpointId}constructor({rtc:e,endpointIdentity:t}){this.responseMap=new Map,Le.set(this,null),Te.set(this,void 0),this.connectionStateChangeHandler=e=>{\"connected\"!==this.rtc.rtcClient.connectionState&&(this.rtc.rtcClient.removeEventListener(\"connectionstatechange\",this.connectionStateChangeHandler),this.close(),$e(this,Te,\"f\")&&$e(this,Te,\"f\").call(this))},this.send=async(e,t)=>{const n=`message-${Math.random()}`,i=new Promise(((e,t)=>{this.responseMap.set(n,{resolve:e,reject:t})}));return this.rtc.channels.request.send(JSON.stringify({action:e,payload:t,messageId:n})),i},this.close=()=>{this.responseMap.forEach((e=>e.reject(\"Connection has closed.\"))),this.responseMap=new Map,this.rtc.channels.request.close(),this.rtc.channels.response.close(),this.rtc.rtcClient.close()},this.rtc=e,this.endpointIdentity=t,this.rtc.channels.response.addEventListener(\"message\",(e=>{let{data:t}=e;e.data instanceof ArrayBuffer&&(t=(new TextDecoder).decode(e.data));const{messageId:n,payload:i,success:r,error:o}=JSON.parse(t),{resolve:s,reject:a}=this.responseMap.get(n)??{};s&&a?(this.responseMap.delete(n),r?s(i):a(o)):(console.log(\"Could not find id in responseMap.\"),console.log(e))})),this.rtc.channels.request.addEventListener(\"message\",(async e=>{let{data:n}=e;e.data instanceof ArrayBuffer&&(n=(new TextDecoder).decode(e.data));const{messageId:i,action:r,payload:o}=JSON.parse(n);if($e(this,Le,\"f\"))try{const e=await $e(this,Le,\"f\").call(this,r,o,t);this.rtc.channels.response.send(JSON.stringify({messageId:i,payload:e,success:!0}))}catch(e){\"open\"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,error:(0,Ge.errorToPOJO)(e),success:!1}))}else\"open\"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,success:!1,error:\"Connection not ready.\"}))})),this.rtc.rtcClient.addEventListener(\"connectionstatechange\",this.connectionStateChangeHandler),Object.values(this.rtc.channels).forEach((e=>{e.onclose=e=>{[...this.responseMap.values()].forEach((e=>e.reject(new Error(\"RTCDataChannel closed unexpectedly, this is most commonly caused by message size. Note: RTC Channels have a message size limit of ~255kB.\")))),this.close(),$e(this,Te,\"f\")&&$e(this,Te,\"f\").call(this)}}))}onDisconnect(e){if($e(this,Te,\"f\"))throw new Error(\"RTCEndpoint disconnectListener cannot be set twice.\");Be(this,Te,e,\"f\")}receive(e){if($e(this,Le,\"f\"))throw new Error(\"You have already set a listener for this RTC Endpoint.\");Be(this,Le,e,\"f\")}get connected(){return\"connected\"===this.rtc.rtcClient.connectionState}},Le=new WeakMap,Te=new WeakMap;var We,He,Ne,De={},Ue=s&&s.__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)},Ve=s&&s.__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};Object.defineProperty(De,\"__esModule\",{value:!0}),De.EndpointStrategy=void 0;De.EndpointStrategy=class{constructor(e,t,n){this.EndpointType=e,this.StrategyName=n,We.set(this,null),He.set(this,new Map),Ne.set(this,!0),this.send=async(e,t,n)=>this.getEndpointById(e).send(t,n),this.close=async()=>{Ue(this,Ne,\"f\")&&(Ue(this,He,\"f\").forEach((e=>e.close())),Ve(this,He,new Map,\"f\")),Ve(this,Ne,!1,\"f\")},this.isValidEndpointPayload=t}onEndpointDisconnect(e,t){this.getEndpointById(e).onDisconnect(t)}receive(e){if(Ue(this,We,\"f\"))throw new Error(`You have already set a listener for this ${this.StrategyName} Strategy`);Ve(this,We,e,\"f\"),Ue(this,He,\"f\").forEach((e=>e.receive(Ue(this,We,\"f\"))))}getEndpointById(e){const t=Ue(this,He,\"f\").get(e);if(!t)throw new Error(`Client with endpoint id ${e} is not connected`);return t}get connected(){return Ue(this,Ne,\"f\")}isEndpointConnected(e){return Ue(this,He,\"f\").has(e)}addEndpoint(e,t){if(!Ue(this,Ne,\"f\"))return void console.warn(`Adding endpoint to disconnected ${this.StrategyName} Strategy`);const n=new this.EndpointType(t);Ue(this,We,\"f\")&&n.receive(Ue(this,We,\"f\")),Ue(this,He,\"f\").set(e,n)}async closeEndpoint(e){Ue(this,He,\"f\").delete(e)}},We=new WeakMap,He=new WeakMap,Ne=new WeakMap,Object.defineProperty(Fe,\"__esModule\",{value:!0}),Fe.RTCInfo=Fe.RTCStrategy=void 0;const ze=je,Ke=De;class qe extends Ke.EndpointStrategy{constructor(){super(ze.RTCEndpoint,ze.RTCEndpoint.isValidEndpointPayload,\"RTC\")}}Fe.RTCStrategy=qe,Fe.RTCInfo={version:2,minimumVersion:0,type:\"rtc\"};var Je={};Object.defineProperty(Je,\"__esModule\",{value:!0}),Je.RTCICEManager=void 0;const Ye=d;class Ze extends Ye.EmitterBase{constructor(e){super(e,\"channel\"),this.ensureChannelOpened=e=>new Promise(((t,n)=>{if(\"open\"===e.readyState)t();else if(\"connecting\"===e.readyState){const n=()=>{e.removeEventListener(\"open\",n),t()};e.addEventListener(\"open\",n)}else n(new Error(\"This Channel has already closed\"))}))}static createDataChannelPromise(e,t){let n;const i=new Promise((e=>{n=e})),r=i=>{const o=()=>{i.channel.removeEventListener(\"open\",o),n(i.channel)};i.channel.label===e&&(i.channel.addEventListener(\"open\",o),t.removeEventListener(\"datachannel\",r))};return t.addEventListener(\"datachannel\",r),i}async listenForProviderIce(e,t){await this.on(this.createProviderEventName(e),t,{timestamp:Date.now()})}async raiseProviderIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createProviderEventName(e)),t)}async listenForClientIce(e,t){await this.on(this.createClientEventName(e),t,{timestamp:Date.now()})}async raiseClientIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createClientEventName(e)),t)}cleanupIceListeners(e){this.removeAllListeners(this.createClientEventName(e)),this.removeAllListeners(this.createProviderEventName(e))}createClientEventName(e){return`ice-client-${e}`}createProviderEventName(e){return`ice-provider-${e}`}createRouteString(e){return`channel/${e}`}createRtcPeer(){return this.wire.environment.getRtcPeer()}async startClientOffer(){const e=Math.random().toString(),t=this.createRtcPeer();t.addEventListener(\"icecandidate\",(async t=>{t.candidate&&await this.raiseClientIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForProviderIce(e,(async e=>{await t.addIceCandidate(e.candidate)}));const n={request:t.createDataChannel(\"request\"),response:t.createDataChannel(\"response\")},i=await t.createOffer();await t.setLocalDescription(i);const r=Promise.all([n.request,n.response].map(this.ensureChannelOpened)).then((()=>{}));return{rtcClient:t,channels:n,offer:i,rtcConnectionId:e,channelsOpened:r}}async finishClientOffer(e,t,n){return await e.setRemoteDescription(t),await n,!0}async createProviderAnswer(e,t){const n=this.createRtcPeer(),i=Ze.createDataChannelPromise(\"request\",n),r=Ze.createDataChannelPromise(\"response\",n);n.addEventListener(\"icecandidate\",(async t=>{t.candidate&&await this.raiseProviderIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForClientIce(e,(async e=>{await n.addIceCandidate(e.candidate)})),await n.setRemoteDescription(t);const o=await n.createAnswer();await n.setLocalDescription(o);const s=Promise.all([i,r]).then((([t,n])=>(this.cleanupIceListeners(e),{request:t,response:n})));return{rtcClient:n,answer:o,channels:s}}}Je.RTCICEManager=Ze;var Qe={},Xe={};function et(e){return[...e.split(\".\").reverse().entries()].reduce(((e,[t,n])=>e+ +n*1e4**t),0)}function tt(e,t){return et(e)>=et(t)}function nt(e){return e.split(\"/\")[0]}Object.defineProperty(Xe,\"__esModule\",{value:!0}),Xe.runtimeUuidMeetsMinimumRuntimeVersion=Xe.parseRuntimeUuid=Xe.meetsMinimumRuntimeVersion=void 0,Xe.meetsMinimumRuntimeVersion=tt,Xe.parseRuntimeUuid=nt,Xe.runtimeUuidMeetsMinimumRuntimeVersion=function(e,t){return tt(nt(e),t)};var it,rt,ot,st,at,ct=s&&s.__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)},dt=s&&s.__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};Object.defineProperty(Qe,\"__esModule\",{value:!0}),Qe.ChannelProvider=void 0;const ht=pe,lt=Xe;class ut extends ht.ChannelBase{get connections(){return[...ct(this,it,\"f\")]}static handleClientDisconnection(e,t){const n=e.connections.find((e=>e.endpointId===t.endpointId));if(n)ct(e,st,\"f\").call(e,n);else{e.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name)).forEach(ct(e,st,\"f\"))}e.disconnectListener(t)}static setProviderRemoval(e,t){ut.removalMap.set(e,t)}constructor(e,t,n){super(),it.set(this,void 0),rt.set(this,void 0),ot.set(this,void 0),st.set(this,(e=>{const t=this.connections.filter((t=>t.endpointId!==e.endpointId));ct(this,ot,\"f\").closeEndpoint(e.endpointId),dt(this,it,t,\"f\")})),this.processAction=async(e,t,n)=>(ut.clientIsMultiRuntime(n)&&!(0,lt.runtimeUuidMeetsMinimumRuntimeVersion)(n.runtimeUuid,\"18.87.56.0\")?this.handleMultiRuntimeLegacyClient(n):this.checkForClientConnection(n),super.processAction(e,t,n)),at.set(this,(()=>{ct(this,ot,\"f\").close();const e=ut.removalMap.get(this);e&&e()})),dt(this,rt,new ht.ProtectedItems(e,t),\"f\"),this.connectListener=()=>{},this.disconnectListener=()=>{},dt(this,it,[],\"f\"),dt(this,ot,n,\"f\"),n.receive(this.processAction)}dispatch(e,t,n){const i=e.endpointId??this.getEndpointIdForOpenFinId(e,t);return i&&ct(this,ot,\"f\").isEndpointConnected(i)?ct(this,ot,\"f\").send(i,t,n):Promise.reject(new Error(`Client connection with identity uuid: ${e.uuid} / name: ${e.name} / endpointId: ${i} no longer connected.`))}async processConnection(e,t){return ct(this,it,\"f\").push(e),this.connectListener(e,t)}publish(e,t){return this.connections.map((n=>ct(this,ot,\"f\").send(n.endpointId,e,t)))}onConnection(e){this.connectListener=e}onDisconnection(e){this.disconnectListener=e}async destroy(){const e=ct(this,rt,\"f\");e.providerIdentity,dt(this,it,[],\"f\"),await e.close(),ct(this,at,\"f\").call(this)}async getAllClientInfo(){return this.connections.map((e=>{const{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}=e;return{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}}))}checkForClientConnection(e){if(!this.isClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider.\\n Client Identity: {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}isClientConnected(e){return ut.clientIdentityIncludesEndpointId(e)?this.connections.some((t=>t.endpointId===e.endpointId&&t.uuid===e.uuid&&t.name===e.name)):this.isLegacyClientConnected(e)}isLegacyClientConnected(e){return this.connections.some((t=>t.uuid===e.uuid&&t.name===e.name))}handleMultiRuntimeLegacyClient(e){if(!this.isLegacyClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider. Client Identity:\\n {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}getEndpointIdForOpenFinId(e,t){const n=this.connections.filter((t=>t.name===e.name&&t.uuid===e.uuid));if(n.length>=2){const n=ct(this,rt,\"f\"),{uuid:i,name:r}=e,o=n?.providerIdentity.uuid,s=n?.providerIdentity.name;console.warn(`WARNING: Dispatch call may have unintended results. The \"to\" argument of your dispatch call is missing the\\n \"endpointId\" parameter. The identity you are dispatching to ({uuid: ${i}, name: ${r}})\\n has multiple channelClients for this channel. Your dispatched action: (${t}) from the provider:\\n ({uuid: ${o}, name: ${s}}) will only be processed by the most recently-created client.`)}return n.pop()?.endpointId}static clientIdentityIncludesEndpointId(e){return void 0!==e.endpointId}static clientIsMultiRuntime(e){return void 0!==e.runtimeUuid}static async wireClose(e,t){await e.sendAction(\"destroy-channel\",{channelName:t})}}Qe.ChannelProvider=ut,it=new WeakMap,rt=new WeakMap,ot=new WeakMap,st=new WeakMap,at=new WeakMap,ut.removalMap=new WeakMap;var pt={};Object.defineProperty(pt,\"__esModule\",{value:!0}),pt.MessageReceiver=void 0;const wt=ue,yt=d;class ft extends yt.Base{constructor(e){super(e),this.onmessage=e=>\"process-channel-message\"===e.action&&(this.processChannelMessage(e),!0),this.endpointMap=new Map,this.latestEndpointIdByChannelId=new Map,e.registerMessageHandler(this.onmessage.bind(this))}async processChannelMessage(e){const{senderIdentity:t,providerIdentity:n,action:i,ackToSender:r,payload:o,intendedTargetIdentity:s}=e.payload,a=s.channelId??s.endpointId??this.latestEndpointIdByChannelId.get(n.channelId),c=this.endpointMap.get(a);if(!c)return r.payload.success=!1,r.payload.reason=`Client connection with identity uuid: ${this.wire.me.uuid} / name: ${this.wire.me.name} / endpointId: ${a} no longer connected.`,this.wire.sendRaw(r);try{const e=await c(i,o,t);return r.payload.payload=r.payload.payload||{},r.payload.payload.result=e,this.wire.sendRaw(r)}catch(e){return r.payload.success=!1,r.payload.reason=e.message,this.wire.sendRaw(r)}}addEndpoint(e,t,n){this.endpointMap.set(n,e),t!==n&&this.latestEndpointIdByChannelId.set(t,n)}removeEndpoint(e,t){this.endpointMap.delete(t),this.latestEndpointIdByChannelId.get(e)===t&&this.latestEndpointIdByChannelId.delete(e)}checkForPreviousClientConnection(e){const t=this.latestEndpointIdByChannelId.get(e);t&&(wt.ChannelClient.closeChannelByEndpointId(t),console.warn(\"You have created a second connection to an older provider. First connection has been removed from the clientMap\"),console.warn(\"If the provider calls publish(), you may receive multiple messages.\"))}}pt.MessageReceiver=ft;var gt={};Object.defineProperty(gt,\"__esModule\",{value:!0}),gt.ProtocolManager=void 0;gt.ProtocolManager=class{constructor(e){this.ProtocolsInPreferenceOrder=e,this.DefaultClientProtocols=[\"classic\"],this.DefaultProviderProtocols=[\"classic\"],this.getClientProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultClientProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(\", \")}.`);return t},this.getProviderProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultProviderProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(\", \")}.`);return t},this.getCompatibleProtocols=(e,t)=>t.supportedProtocols.filter((t=>e.some((e=>e.type===t.type&&t.version>=e.minimumVersion&&e.version>=(t.minimumVersion??0))))).slice(0,t.maxProtocols)}};var mt={};Object.defineProperty(mt,\"__esModule\",{value:!0});class vt{static combine(e,t){return new vt(e,t)}constructor(e,t){this.primary=e,this.secondary=t}onEndpointDisconnect(e,t){this.primary.onEndpointDisconnect(e,(()=>{this.secondary.isEndpointConnected(e)||t()})),this.secondary.onEndpointDisconnect(e,(()=>{this.primary.isEndpointConnected(e)||t()}))}isValidEndpointPayload(e){return this.primary.isValidEndpointPayload(e)||this.secondary.isValidEndpointPayload(e)}async closeEndpoint(e){await this.primary.closeEndpoint(e),await this.secondary.closeEndpoint(e)}isEndpointConnected(e){return this.primary.isEndpointConnected(e)||this.secondary.isEndpointConnected(e)}async addEndpoint(e,t){this.primary.isValidEndpointPayload(t)&&await this.primary.addEndpoint(e,t),this.secondary.isValidEndpointPayload(t)&&await this.secondary.addEndpoint(e,t)}receive(e){this.primary.receive(e),this.secondary.receive(e)}send(e,t,n){return this.primary.isEndpointConnected(e)?this.primary.send(e,t,n):this.secondary.send(e,t,n)}async close(){await Promise.all([this.primary.close(),this.secondary.close()])}}mt.default=vt;var Ct,bt,It=s&&s.__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},Et=s&&s.__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)},xt=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(xe,\"__esModule\",{value:!0}),xe.ConnectionManager=void 0;const At=Ae,Pt=d,Mt=Oe,_t=Fe,Ot=Je,St=Qe,Rt=pt,Ft=gt,jt=xt(mt);class kt extends Pt.Base{static getProtocolOptionsFromStrings(e){return e.map((e=>{switch(e){case\"rtc\":return _t.RTCInfo;case\"classic\":return Mt.ClassicInfo;default:return(0,At.exhaustiveCheck)(e,[\"rtc\",\"classic\"])}}))}constructor(e){super(e),Ct.set(this,void 0),bt.set(this,void 0),this.removeChannelFromProviderMap=e=>{this.providerMap.delete(e)},this.onmessage=e=>\"process-channel-connection\"===e.action&&(this.processChannelConnection(e),!0),this.providerMap=new Map,this.protocolManager=new Ft.ProtocolManager(\"node\"===this.wire.environment.type?[\"classic\"]:[\"rtc\",\"classic\"]),It(this,Ct,new Rt.MessageReceiver(e),\"f\"),It(this,bt,new Ot.RTCICEManager(e),\"f\"),e.registerMessageHandler(this.onmessage.bind(this))}createProvider(e,t){const n=Object.assign(this.wire.environment.getDefaultChannelOptions().create,e||{}),i=this.protocolManager.getProviderProtocols(n?.protocols),r=i.map((e=>{switch(e){case\"rtc\":return new _t.RTCStrategy;case\"classic\":return new Mt.ClassicStrategy(this.wire,Et(this,Ct,\"f\"),t.channelId,t);default:return(0,At.exhaustiveCheck)(e,[\"rtc\",\"classic\"])}}));let o;if(2===r.length){const[e,t]=r;o=jt.default.combine(e,t)}else{if(1!==r.length)throw new Error(\"failed to combine strategies\");[o]=r}const s=new St.ChannelProvider(t,(()=>St.ChannelProvider.wireClose(this.wire,t.channelName)),o),a=t.channelId;return this.providerMap.set(a,{provider:s,strategy:o,supportedProtocols:kt.getProtocolOptionsFromStrings(i)}),St.ChannelProvider.setProviderRemoval(s,this.removeChannelFromProviderMap.bind(this)),s}async createClientOffer(e){const t=this.protocolManager.getClientProtocols(e?.protocols);let n;return{offer:{supportedProtocols:await Promise.all(t.map((async e=>{switch(e){case\"rtc\":{const{rtcClient:e,channels:t,offer:i,rtcConnectionId:r,channelsOpened:o}=await Et(this,bt,\"f\").startClientOffer();return n={rtcClient:e,channels:t,channelsOpened:o},{type:\"rtc\",version:_t.RTCInfo.version,payload:{offer:i,rtcConnectionId:r}}}case\"classic\":return{type:\"classic\",version:Mt.ClassicInfo.version};default:return(0,At.exhaustiveCheck)(e,[\"rtc\",\"classic\"])}}))),maxProtocols:2},rtc:n}}async createClientStrategy(e,t){t.endpointId||(t.endpointId=this.wire.environment.getNextMessageId(),Et(this,Ct,\"f\").checkForPreviousClientConnection(t.channelId));const n=t.answer??{supportedProtocols:[{type:\"classic\",version:1}]},i=(await Promise.all(n.supportedProtocols.map((async n=>\"rtc\"===n.type&&e?(await Et(this,bt,\"f\").finishClientOffer(e.rtcClient,n.payload.answer,e.channelsOpened),new _t.RTCStrategy):\"classic\"===n.type?new Mt.ClassicStrategy(this.wire,Et(this,Ct,\"f\"),t.endpointId,t):null)))).filter((e=>null!==e));let r;if(e&&!i.some((e=>e instanceof _t.RTCStrategy))&&e&&e.rtcClient.close(),i.length>=2)r=jt.default.combine(i[0],i[1]);else{if(!i.length)throw new Error(\"No compatible protocols\");[r]=i}const o={endpointIdentity:t,rtc:e};return r.addEndpoint(t.channelId,o),r}async processChannelConnection(e){const{clientIdentity:t,providerIdentity:n,ackToSender:i,payload:r,offer:o}=e.payload;t.endpointId?t.isLocalEndpointId=!1:(t.endpointId=this.wire.environment.getNextMessageId(),t.isLocalEndpointId=!0);const s=n.channelId,a=this.providerMap.get(s);if(!a)return i.payload.success=!1,i.payload.reason=`Channel \"${n.channelName}\" has been destroyed.`,this.wire.sendRaw(i);const{provider:c,strategy:d,supportedProtocols:h}=a;try{if(!(c instanceof St.ChannelProvider))throw Error(\"Cannot connect to a channel client\");const e=o??{supportedProtocols:[{type:\"classic\",version:1}],maxProtocols:1},n=this.protocolManager.getCompatibleProtocols(h,e);if(!n.length)throw new Error(\"This provider does not support any of the offered protocols.\");const s=await c.processConnection(t,r);i.payload.payload=i.payload.payload||{};let a={supportedProtocols:[],endpointPayloadPromise:Promise.resolve({endpointIdentity:t})};return a=await n.reduce((async(e,t)=>{const n=await e;if(\"rtc\"===t.type){const{answer:e,rtcClient:i,channels:r}=await Et(this,bt,\"f\").createProviderAnswer(t.payload.rtcConnectionId,t.payload.offer);n.supportedProtocols.push({type:\"rtc\",version:_t.RTCInfo.version,payload:{answer:e}}),n.endpointPayloadPromise=n.endpointPayloadPromise.then((e=>r.then((t=>({...e,rtc:{rtcClient:i,channels:t}})))))}else n.supportedProtocols.push({type:\"classic\",version:Mt.ClassicInfo.version});return n}),Promise.resolve(a)),a.endpointPayloadPromise.then((e=>d.addEndpoint(t.endpointId,e))),i.payload.payload.result=s,i.payload.payload.answer=a,this.wire.sendRaw(i)}catch(e){return i.payload.success=!1,i.payload.reason=e.message,this.wire.sendRaw(i)}}}xe.ConnectionManager=kt,Ct=new WeakMap,bt=new WeakMap;var Lt,Tt,$t,Bt=s&&s.__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},Gt=s&&s.__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)};Object.defineProperty(le,\"__esModule\",{value:!0}),le.Channel=void 0;const Wt=t,Ht=G,Nt=d,Dt=ue,Ut=xe,Vt=Qe;function zt(e){const t=Math.floor(e/10),n=Math.min(3e4,500*2**t);return new Promise((e=>{setTimeout((()=>{e(!1)}),n)}))}class Kt extends Nt.EmitterBase{constructor(e){super(e,\"channel\"),Lt.set(this,void 0),Tt.set(this,new Wt.EventEmitter),$t.set(this,new Ht.AsyncRetryableLazy((async()=>{await Promise.all([this.on(\"disconnected\",(e=>{Dt.ChannelClient.handleProviderDisconnect(e)})),this.on(\"connected\",((...e)=>{Gt(this,Tt,\"f\").emit(\"connected\",...e)}))]).catch((()=>new Error(\"error setting up channel connection listeners\")))}))),Bt(this,Lt,new Ut.ConnectionManager(e),\"f\")}async getAllChannels(){return this.wire.sendAction(\"get-all-channels\").then((({payload:e})=>e.data))}async onChannelConnect(e){await this.on(\"connected\",e)}async onChannelDisconnect(e){await this.on(\"disconnected\",e)}async safeConnect(e,t,n){const i={count:0};do{let r=()=>{};const o=new Promise((t=>{r=n=>{e===n.channelName&&t(!0)},Gt(this,Tt,\"f\").on(\"connected\",r)}));try{if(i.count>0){i.gotConnectedEvent=await Promise.race([zt(i.count),o]);const t=await this.wire.sendAction(\"connect-to-channel\",{...n,retryInfo:i});return console.log(`Successfully connected to channelName: ${e}`),t.payload.data}const t=this.wire.sendAction(\"connect-to-channel\",n);i.originalMessageId=t.messageId;return(await t).payload.data}catch(n){if(!n.message.includes(\"internal-nack\"))throw n;t&&0===i.count&&console.warn(`No channel found for channelName: ${e}. Waiting for connection...`)}finally{i.count+=1,Gt(this,Tt,\"f\").removeListener(\"connected\",r)}}while(t);throw new Error(`No channel found for channelName: ${e}.`)}async connect(e,t={}){if(await Gt(this,$t,\"f\").getValue(),!e||\"string\"!=typeof e)throw new Error(\"Please provide a channelName string to connect to a channel.\");const n={wait:!0,...this.wire.environment.getDefaultChannelOptions().connect,...t},{offer:i,rtc:r}=await Gt(this,Lt,\"f\").createClientOffer(n);let o;(this.fin.me.isFrame||this.fin.me.isView||this.fin.me.isWindow)&&(o=(await this.fin.me.getInfo()).url);const s={channelName:e,...n,offer:i,connectionUrl:o},a=await this.safeConnect(e,n.wait,s),c=await Gt(this,Lt,\"f\").createClientStrategy(r,a),d=new Dt.ChannelClient(a,(()=>Dt.ChannelClient.wireClose(this.wire,a,a.endpointId)),c);return c.onEndpointDisconnect(a.channelId,(async()=>{try{await d.sendDisconnectAction()}catch(e){console.warn(`Something went wrong during disconnect for client with uuid: ${a.uuid} / name: ${a.name} / endpointId: ${a.endpointId}.`)}finally{Dt.ChannelClient.handleProviderDisconnect(a)}})),d}async create(e,t){if(!e)throw new Error(\"Please provide a channelName to create a channel\");const{payload:{data:n}}=await this.wire.sendAction(\"create-channel\",{channelName:e}),i=Gt(this,Lt,\"f\").createProvider(t,n);return this.on(\"client-disconnected\",(t=>{t.channelName===e&&Vt.ChannelProvider.handleClientDisconnection(i,t)})),i}}le.Channel=Kt,Lt=new WeakMap,Tt=new WeakMap,$t=new WeakMap,Object.defineProperty(de,\"__esModule\",{value:!0}),de.InterAppPayload=de.InterApplicationBus=void 0;const qt=t,Jt=d,Yt=he,Zt=le,Qt=O;class Xt extends Jt.Base{constructor(e){super(e),this.events={subscriberAdded:\"subscriber-added\",subscriberRemoved:\"subscriber-removed\"},this.refCounter=new Yt.RefCounter,this.Channel=new Zt.Channel(e),this.emitter=new qt.EventEmitter,e.registerMessageHandler(this.onmessage.bind(this)),this.on=this.emitter.on.bind(this.emitter),this.removeAllListeners=this.emitter.removeAllListeners.bind(this.emitter)}async publish(e,t){await this.wire.sendAction(\"publish-message\",{topic:e,message:t,sourceWindowName:this.me.name})}async send(e,t,n){const i=(0,Qt.validateIdentity)(e);if(i)throw new Error(i);await this.wire.sendAction(\"send-message\",{destinationUuid:e.uuid,destinationWindowName:e.name,topic:t,message:n,sourceWindowName:this.me.name})}subscribe(e,t,n){const i=this.createSubscriptionKey(e.uuid,e.name||\"*\",t);return this.emitter.on(i,n),this.refCounter.actOnFirst(i,(async()=>{await this.wire.sendAction(\"subscribe\",{sourceUuid:e.uuid,sourceWindowName:e.name||\"*\",topic:t,destinationWindowName:this.me.name})}),(()=>Promise.resolve()))}unsubscribe(e,t,n){const i=e.name||\"*\",r=this.createSubscriptionKey(e.uuid,i,t);return this.emitter.removeListener(r,n),this.refCounter.actOnLast(r,(async()=>{await this.wire.sendAction(\"unsubscribe\",{sourceUuid:e.uuid,sourceWindowName:i,topic:t,destinationWindowName:this.me.name})}),(()=>new Promise((e=>e)).then((()=>{}))))}processMessage(e){const{payload:{message:t,sourceWindowName:n,sourceUuid:i,topic:r}}=e,o=[this.createSubscriptionKey(i,n,r),this.createSubscriptionKey(i,\"*\",r),this.createSubscriptionKey(\"*\",\"*\",r)],s={uuid:i,name:n};o.forEach((e=>{this.emitter.emit(e,t,s)}))}emitSubscriverEvent(e,t){const{payload:{targetName:n,uuid:i,topic:r}}=t,o={name:n,uuid:i,topic:r};this.emitter.emit(e,o)}createSubscriptionKey(e,t,n){const i=t||\"*\";if(!(e&&i&&n))throw new Error(\"Missing uuid, name, or topic string\");return function(...e){return e.map((e=>Buffer.from(`${e}`).toString(\"base64\"))).join(\"/\")}(e,i,n)}onmessage(e){const{action:t}=e;switch(t){case\"process-message\":this.processMessage(e);break;case this.events.subscriberAdded:this.emitSubscriverEvent(this.events.subscriberAdded,e);break;case this.events.subscriberRemoved:this.emitSubscriverEvent(this.events.subscriberRemoved,e)}return!0}}de.InterApplicationBus=Xt;de.InterAppPayload=class{};var en={};Object.defineProperty(en,\"__esModule\",{value:!0}),en.Clipboard=void 0;const tn=d;class nn extends tn.Base{async writeText(e){await this.wire.sendAction(\"clipboard-write-text\",e)}async readText(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-text\",{type:e});return t.data}async writeImage(e){await this.wire.sendAction(\"clipboard-write-image\",e)}async readImage(e={format:\"dataURL\"}){const{payload:t}=await this.wire.sendAction(\"clipboard-read-image\",e);return t.data}async writeHtml(e){await this.wire.sendAction(\"clipboard-write-html\",e)}async readHtml(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-html\",{type:e});return t.data}async writeRtf(e){await this.wire.sendAction(\"clipboard-write-rtf\",e)}async readRtf(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-rtf\",{type:e});return t.data}async write(e){await this.wire.sendAction(\"clipboard-write\",e)}async getAvailableFormats(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-formats\",{type:e});return t.data}}en.Clipboard=nn;var rn={},on={},sn={};Object.defineProperty(sn,\"__esModule\",{value:!0}),sn.ExternalApplication=void 0;const an=d;class cn extends an.EmitterBase{constructor(e,t){super(e,\"external-application\",t.uuid),this.identity=t}getInfo(){return this.wire.sendAction(\"get-external-application-info\",this.identity).then((({payload:e})=>e.data))}}sn.ExternalApplication=cn,Object.defineProperty(on,\"__esModule\",{value:!0}),on.ExternalApplicationModule=void 0;const dn=d,hn=sn;class ln extends dn.Base{wrap(e){return this.wire.sendAction(\"external-application-wrap\").catch((e=>{})),Promise.resolve(new hn.ExternalApplication(this.wire,{uuid:e}))}wrapSync(e){return this.wire.sendAction(\"external-application-wrap-sync\").catch((e=>{})),new hn.ExternalApplication(this.wire,{uuid:e})}}on.ExternalApplicationModule=ln,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(on,e),n(sn,e)}(rn);var un={},pn={},wn={};Object.defineProperty(wn,\"__esModule\",{value:!0}),wn._Frame=void 0;const yn=d;class fn extends yn.EmitterBase{constructor(e,t){super(e,\"frame\",t.uuid,t.name),this.identity=t}getInfo(){return this.wire.sendAction(\"get-frame-info\",this.identity).then((({payload:e})=>e.data))}getParentWindow(){return this.wire.sendAction(\"get-parent-window\",this.identity).then((({payload:e})=>e.data))}}wn._Frame=fn,Object.defineProperty(pn,\"__esModule\",{value:!0}),pn._FrameModule=void 0;const gn=d,mn=O,vn=wn;class Cn extends gn.Base{async wrap(e){this.wire.sendAction(\"frame-wrap\").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}wrapSync(e){this.wire.sendAction(\"frame-wrap-sync\").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}getCurrent(){return this.wire.sendAction(\"frame-get-current\").catch((e=>{})),Promise.resolve(new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity()))}getCurrentSync(){return this.wire.sendAction(\"frame-get-current-sync\").catch((e=>{})),new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity())}}pn._FrameModule=Cn,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(pn,e),n(wn,e)}(un);var bn={};Object.defineProperty(bn,\"__esModule\",{value:!0}),bn.GlobalHotkey=void 0;const In=d;class En extends In.EmitterBase{constructor(e){super(e,\"global-hotkey\")}async register(e,t){await this.on(e,t),await this.wire.sendAction(\"global-hotkey-register\",{hotkey:e})}async unregister(e){await this.removeAllListeners(e),await this.wire.sendAction(\"global-hotkey-unregister\",{hotkey:e})}async unregisterAll(){await Promise.all(this.eventNames().filter((e=>!(\"registered\"===e||\"unregistered\"===e))).map((e=>this.removeAllListeners(e)))),await this.wire.sendAction(\"global-hotkey-unregister-all\",{})}async isRegistered(e){const{payload:{data:t}}=await this.wire.sendAction(\"global-hotkey-is-registered\",{hotkey:e});return t}}bn.GlobalHotkey=En;var xn,An={},Pn={},Mn={},_n=s&&s.__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)};Object.defineProperty(Mn,\"__esModule\",{value:!0}),Mn.Platform=void 0;const On=d,Sn=O,Rn=new Map;class Fn extends On.EmitterBase{constructor(e,t){super(t.wire,\"application\",e.uuid),this.getClient=e=>{this.wire.sendAction(\"platform-get-client\",this.identity).catch((e=>{}));const t=e||this.identity,{uuid:n}=t;if(!Rn.has(n)){const e=_n(this,xn,\"f\").call(this,n);Rn.set(n,e)}return Rn.get(n)},xn.set(this,(async e=>{try{const t=`custom-frame-${e}`,n=await this._channel.connect(t,{wait:!1});return n.onDisconnection((()=>{Rn.delete(e)})),n}catch(t){throw Rn.delete(e),new Error(\"The targeted Platform is not currently running. Listen for application-started event for the given Uuid.\")}})),this.launchLegacyManifest=this.launchContentManifest;const n=(0,Sn.validateIdentity)(e);if(n)throw new Error(n);this._channel=t,this.identity={uuid:e.uuid},this.Layout=this.fin.Platform.Layout,this.Application=this.fin.Application.wrapSync(this.identity)}async createView(e,t,n){this.wire.sendAction(\"platform-create-view\",this.identity).catch((e=>{}));const i=await this.getClient(),r=await i.dispatch(\"create-view\",{target:t,opts:e,targetView:n});if(!r||(0,Sn.validateIdentity)(r.identity))throw new Error(`When overwriting the createView call, please return an object that has a valid 'identity' property: ${JSON.stringify(r)}`);return this.fin.View.wrapSync(r.identity)}async createWindow(e){this.wire.sendAction(\"platform-create-window\",this.identity).catch((e=>{}));const t=await this.getClient();e.reason||(e.reason=\"api-call\");const n=await t.dispatch(\"create-view-container\",e);if(!n||(0,Sn.validateIdentity)(n.identity))throw new Error(`When overwriting the createWindow call, please return an object that has a valid 'identity' property: ${JSON.stringify(n)}`);const{identity:i}=n,r=this.fin.Window.wrapSync(i);return r.name=i.name,r.uuid=i.uuid,r}async quit(){this.wire.sendAction(\"platform-quit\",this.identity).catch((e=>{}));return(await this.getClient()).dispatch(\"quit\")}async closeView(e){this.wire.sendAction(\"platform-close-view\",this.identity).catch((e=>{}));const t=await this.getClient();await t.dispatch(\"close-view\",{view:e})}async reparentView(e,t){console.warn(\"Platform.reparentView has been deprecated, please use Platform.createView\"),this.wire.sendAction(\"platform-reparent-view\",this.identity).catch((e=>{}));const n={...e,uuid:e.uuid??this.identity.uuid},i=await this.fin.View.wrap(n),r=await i.getOptions();return this.createView(r,t)}async getSnapshot(){this.wire.sendAction(\"platform-get-snapshot\",this.identity).catch((e=>{}));return(await this.getClient()).dispatch(\"get-snapshot\")}async getViewSnapshot(e){return(await this.getClient()).dispatch(\"get-view-snapshot\",{viewIdentity:e})}async applySnapshot(e,t){this.wire.sendAction(\"platform-apply-snapshot\",this.identity).catch((e=>{}));const n=\"Requested snapshot must be a valid Snapshot object, or a url or filepath to such an object.\";let i;if(\"string\"==typeof e)try{i=(await this._channel.wire.sendAction(\"get-application-manifest\",{manifestUrl:e})).payload.data}catch(e){throw new Error(`${n}: ${e}`)}else i=e;if(!i.windows)throw new Error(n);const r=await this.getClient();return await r.dispatch(\"apply-snapshot\",{snapshot:i,options:t}),this}async fetchManifest(e){return(await this.getClient()).dispatch(\"platform-fetch-manifest\",{manifestUrl:e})}async launchContentManifest(e){this.wire.sendAction(\"platform-launch-content-manifest\",this.identity).catch((()=>{}));const t=await this.getClient(),n=await this.fetchManifest(e);return t.dispatch(\"launch-into-platform\",{manifest:n,manifestUrl:e}),this}async setWindowContext(e={},t){if(this.wire.sendAction(\"platform-set-window-context\",this.identity).catch((e=>{})),!e)throw new Error(\"Please provide a serializable object or string to set the context.\");const n=await this.getClient(),{entityType:i}=t?await this.fin.System.getEntityInfo(t.uuid,t.name):this.fin.me;await n.dispatch(\"set-window-context\",{context:e,entityType:i,target:t||{uuid:this.fin.me.uuid,name:this.fin.me.name}})}async getWindowContext(e){this.wire.sendAction(\"platform-get-window-context\",this.identity).catch((e=>{}));const t=await this.getClient(),{entityType:n}=e?await this.fin.System.getEntityInfo(e.uuid,e.name):this.fin.me;return t.dispatch(\"get-window-context\",{target:e||{uuid:this.fin.me.uuid,name:this.fin.me.name},entityType:n})}async closeWindow(e,t={skipBeforeUnload:!1}){this.wire.sendAction(\"platform-close-window\",this.identity).catch((e=>{}));return(await this.getClient()).dispatch(\"close-window\",{windowId:e,options:t})}}Mn.Platform=Fn,xn=new WeakMap;var jn={},kn={},Ln={},Tn={};function $n(e){switch(e){case\"columns\":case\"grid\":case\"rows\":case\"tabs\":return!0;default:return!1}}Object.defineProperty(Tn,\"__esModule\",{value:!0}),Tn.overrideFromComposables=Tn.isValidPresetType=void 0,Tn.isValidPresetType=$n,Tn.overrideFromComposables=function(...e){return t=>e.reduceRight(((e,t)=>n=>t(e(n))),(e=>e))(t)},Tn.default={isValidPresetType:$n};var Bn={},Gn={},Wn={};Object.defineProperty(Wn,\"__esModule\",{value:!0}),Wn.ApiConsumer=void 0;Wn.ApiConsumer=class{constructor(e){this.strategy=e,this.consume=async e=>(await this.strategy.getExposedFunctions(e)).reduce(((t,n)=>({...t,[n.key]:this.strategy.createFunction(n,e)})),{})}};var Hn={},Nn={};Object.defineProperty(Nn,\"__esModule\",{value:!0}),Nn.expose=Nn.getExposedProperties=void 0;const Dn=Symbol(\"exposedProperties\");Nn.getExposedProperties=e=>e[Dn]||e.prototype[Dn]||[];Nn.expose=e=>(t,n,i)=>{t[Dn]=t[Dn]||[],t[Dn].push({key:n,descriptor:i,options:e})},Object.defineProperty(Hn,\"__esModule\",{value:!0}),Hn.ApiExposer=void 0;const Un=Nn;Hn.ApiExposer=class{constructor(e){this.strategy=e,this.exposeInstance=async(e,t)=>{const n=(0,Un.getExposedProperties)(e),i=await Promise.all(n.map((async({key:n,options:i})=>({key:n,options:await this.strategy.exposeFunction(e[n].bind(e),{key:n,options:i,meta:t})}))));await this.strategy.exposeMeta(t,i)}}};var Vn={},zn={},Kn={};Object.defineProperty(Kn,\"__esModule\",{value:!0}),Kn.ChannelsConsumer=void 0;Kn.ChannelsConsumer=class{constructor(e){this.channel=e,this.getExposedFunctions=async e=>{const{id:t}=e,{props:n}=await this.channel.dispatch(`api-meta:${t}`);return n},this.createFunction=e=>(...t)=>{const{action:n}=e.options;return this.channel.dispatch(n,{args:t})}}};var qn={};Object.defineProperty(qn,\"__esModule\",{value:!0}),qn.ChannelsExposer=void 0;qn.ChannelsExposer=class{constructor(e){this.channelProviderOrClient=e,this.exposeFunction=async(e,t)=>{const{key:n,options:i,meta:r}=t,{id:o}=r,s=`${o}.${i?.action||n}`;return await this.channelProviderOrClient.register(s,(async({args:t})=>e(...t))),{action:s}},this.exposeMeta=async({id:e},t)=>{const n=`api-meta:${e}`;await this.channelProviderOrClient.register(n,(()=>({props:t})))}}},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Kn,e),n(qn,e)}(zn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(zn,e)}(Vn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Wn,e),n(Hn,e),n(Vn,e),n(Nn,e)}(Gn);var Jn={};Object.defineProperty(Jn,\"__esModule\",{value:!0}),Jn.createRelayedDispatch=exports.relayChannelClientApi_1=Jn.relayChannelClientApi=void 0;const Yn=[\"no longer connected\",\"RTCDataChannel closed unexpectedly\",\"The client you are trying to dispatch from is disconnected from the target provider\"];exports.relayChannelClientApi_1=Jn.relayChannelClientApi=async(e,t)=>{e.register(`relay:${t}`,(({action:t,target:n,payload:i})=>e.dispatch(n,t,i))),await Promise.resolve()};Jn.createRelayedDispatch=(e,t,n,i)=>async(r,o)=>{try{return await e.dispatch(`relay:${n}`,{action:r,payload:o,target:t})}catch(e){if(s=e.message,Yn.some((e=>s.includes(e)))&&i)throw new Error(i);throw e}var s};var Zn,Qn,Xn,ei=s&&s.__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},ti=s&&s.__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)};Object.defineProperty(Bn,\"__esModule\",{value:!0}),Bn.ColumnOrRow=Bn.TabStack=Bn.LayoutNode=void 0;const ni=Gn,ii=Jn;class ri{constructor(e,t){Zn.set(this,void 0),this.isRoot=()=>ti(this,Zn,\"f\").isRoot(this.entityId),this.exists=()=>ti(this,Zn,\"f\").exists(this.entityId),this.getParent=async()=>{const e=await ti(this,Zn,\"f\").getParent(this.entityId);if(e)return ri.getEntity(e,ti(this,Zn,\"f\"))},this.createAdjacentStack=async(e,t)=>{const n=await ti(this,Zn,\"f\").createAdjacentStack(this.entityId,e,t);return ri.getEntity({entityId:n,type:\"stack\"},ti(this,Zn,\"f\"))},this.getAdjacentStacks=async e=>(await ti(this,Zn,\"f\").getAdjacentStacks({targetId:this.entityId,edge:e})).map((e=>ri.getEntity({type:\"stack\",entityId:e.entityId},ti(this,Zn,\"f\")))),ei(this,Zn,e,\"f\"),this.entityId=t}}Bn.LayoutNode=ri,Zn=new WeakMap,ri.newLayoutEntitiesClient=async(e,t,n)=>{const i=(0,ii.createRelayedDispatch)(e,n,\"layout-relay\",\"You are trying to interact with a layout component on a window that does not exist or has been destroyed.\");return new ni.ApiConsumer(new ni.ChannelsConsumer({dispatch:i})).consume({id:t})},ri.getEntity=(e,t)=>{const{entityId:n,type:i}=e;switch(i){case\"column\":case\"row\":return new si(t,n,i);case\"stack\":return new oi(t,n);default:throw new Error(`Unrecognised Layout Entity encountered ('${JSON.stringify(e)})`)}};class oi extends ri{constructor(e,t){super(e,t),Qn.set(this,void 0),this.type=\"stack\",this.getViews=()=>ti(this,Qn,\"f\").getStackViews(this.entityId),this.addView=async(e,t={index:0})=>ti(this,Qn,\"f\").addViewToStack(this.entityId,e,t),this.removeView=async e=>{await ti(this,Qn,\"f\").removeViewFromStack(this.entityId,e)},this.setActiveView=async e=>{await ti(this,Qn,\"f\").setStackActiveView(this.entityId,e)},ei(this,Qn,e,\"f\")}}Bn.TabStack=oi,Qn=new WeakMap;class si extends ri{constructor(e,t,n){super(e,t),Xn.set(this,void 0),this.getContent=async()=>(await ti(this,Xn,\"f\").getContent(this.entityId)).map((e=>ri.getEntity(e,ti(this,Xn,\"f\")))),ei(this,Xn,e,\"f\"),this.type=n}}Bn.ColumnOrRow=si,Xn=new WeakMap;var ai={};Object.defineProperty(ai,\"__esModule\",{value:!0}),ai.DEFAULT_LAYOUT_KEY=ai.LAYOUT_CONTROLLER_ID=void 0,ai.LAYOUT_CONTROLLER_ID=\"layout-entities\",ai.DEFAULT_LAYOUT_KEY=\"__default__\";var ci,di,hi,li=s&&s.__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)};Object.defineProperty(Ln,\"__esModule\",{value:!0}),Ln.Layout=void 0;const ui=G,pi=O,wi=d,yi=Tn,fi=Bn,gi=ai;class mi extends wi.Base{static getClient(e){return li(e,di,\"f\").getValue()}constructor(e,t){super(t),ci.add(this),di.set(this,new ui.Lazy((async()=>fi.LayoutNode.newLayoutEntitiesClient(await this.platform.getClient(),gi.LAYOUT_CONTROLLER_ID,this.identity)))),this.replace=async e=>{this.wire.sendAction(\"layout-replace\").catch((e=>{}));const t=await this.platform.getClient();await t.dispatch(\"replace-layout\",{target:this.identity,opts:{layout:e}})},this.replaceView=async(e,t)=>{this.wire.sendAction(\"layout-replace-view\").catch((e=>{}));const n=await this.platform.getClient();await n.dispatch(\"replace-view\",{target:this.identity,opts:{viewToReplace:e,newView:t}})},this.applyPreset=async e=>{this.wire.sendAction(\"layout-apply-preset\").catch((e=>{}));const t=await this.platform.getClient(),{presetType:n}=e;if(!n||!(0,yi.isValidPresetType)(n))throw new Error(\"Cannot apply preset layout, please include an applicable presetType property in the PresetLayoutOptions.\");await t.dispatch(\"apply-preset-layout\",{target:this.identity,opts:{presetType:n}})};const n=(0,pi.validateIdentity)(e);if(n)throw new Error(n);this.identity=e,this.platform=this.fin.Platform.wrapSync({uuid:e.uuid}),e.uuid===this.fin.me.uuid&&e.name===this.fin.me.name&&(this.init=this.fin.Platform.Layout.init)}async getConfig(){this.wire.sendAction(\"layout-get-config\").catch((e=>{}));return(await this.platform.getClient()).dispatch(\"get-frame-snapshot\",{target:this.identity})}async getCurrentViews(){this.wire.sendAction(\"layout-get-views\").catch((e=>{}));const e=await this.platform.getClient();return(await e.dispatch(\"get-layout-views\",{target:this.identity})).map((e=>this.fin.View.wrapSync(e)))}async getRootItem(){this.wire.sendAction(\"layout-get-root-item\").catch((()=>{}));const e=await li(this,di,\"f\").getValue(),t=await e.getRoot(\"layoutName\"in this.identity?this.identity:void 0);return fi.LayoutNode.getEntity(t,e)}async getStackByViewIdentity(e){this.wire.sendAction(\"layout-get-stack-by-view\").catch((()=>{}));const t=await li(this,di,\"f\").getValue(),n=await t.getStackByView(e);if(!n)throw new Error(`No stack found for view: ${e.uuid}/${e.name}`);return fi.LayoutNode.getEntity(n,t)}async addView(e,{location:t,targetView:n}={}){this.wire.sendAction(\"layout-add-view\").catch((e=>{}));const{identity:i}=await li(this,ci,\"m\",hi).call(this,\"layout-add-view\",{viewOptions:e,location:t,targetView:n});return{identity:i}}async closeView(e){this.wire.sendAction(\"layout-close-view\").catch((e=>{})),await li(this,ci,\"m\",hi).call(this,\"layout-close-view\",{viewIdentity:e})}}Ln.Layout=mi,di=new WeakMap,ci=new WeakSet,hi=async function(e,t){return(await this.platform.getClient()).dispatch(e,{target:this.identity,opts:t})};var vi,Ci,bi,Ii,Ei,xi=s&&s.__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)},Ai=s&&s.__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};Object.defineProperty(kn,\"__esModule\",{value:!0}),kn.LayoutModule=void 0;const Pi=d,Mi=Ln,_i=ai;class Oi extends Pi.Base{constructor(){super(...arguments),vi.add(this),Ci.set(this,!1),bi.set(this,null),this.init=async(e={})=>{if(this.wire.sendAction(\"layout-init\").catch((e=>{})),!this.wire.environment.layoutAllowedInContext(this.fin))throw new Error(\"Layout.init can only be called from a Window context.\");if(xi(this,Ci,\"f\"))throw new Error(\"Layout.init was already called, please use Layout.create to add additional layouts.\");\"openfin\"===this.wire.environment.type&&await this.fin.Platform.getCurrentSync().getClient(),Ai(this,Ci,!0,\"f\"),Ai(this,bi,await this.wire.environment.initLayoutManager(this.fin,this.wire,e),\"f\"),await this.wire.environment.applyLayoutSnapshot(this.fin,xi(this,bi,\"f\"),e);const t={name:this.fin.me.name,uuid:this.fin.me.uuid};if(!e.layoutManagerOverride){const e={layoutName:_i.DEFAULT_LAYOUT_KEY,...t};return xi(this,Ii,\"f\").call(this,e)}return this.wrapSync(t)},Ii.set(this,(e=>{const t=\"[Layout] You are using a deprecated property `layoutManager` - it will throw if you access it starting in v37.\",n=new Proxy({},{get(e,n){throw console.warn(`[Layout-mgr-proxy] accessing ${n.toString()}`),new Error(t)}}),i=Object.assign(this.wrapSync(e),{layoutManager:n});return new Proxy(i,{get(e,n){if(\"layoutManager\"===n)throw console.warn(`[Layout-proxy] accessing ${n.toString()}`),new Error(t);return e[n]}})})),this.getCurrentLayoutManagerSync=()=>xi(this,vi,\"m\",Ei).call(this,\"fin.Platform.Layout.getCurrentLayoutManagerSync()\"),this.create=async e=>this.wire.environment.createLayout(xi(this,vi,\"m\",Ei).call(this,\"fin.Platform.Layout.create()\"),e),this.destroy=async e=>this.wire.environment.destroyLayout(xi(this,vi,\"m\",Ei).call(this,\"fin.Platform.Layout.destroy()\"),e)}async wrap(e){return this.wire.sendAction(\"layout-wrap\").catch((e=>{})),new Mi.Layout(e,this.wire)}wrapSync(e){return this.wire.sendAction(\"layout-wrap-sync\").catch((e=>{})),new Mi.Layout(e,this.wire)}async getCurrent(){if(this.wire.sendAction(\"layout-get-current\").catch((e=>{})),\"openfin\"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error(\"You are not in a Window context. Only Windows can have a Layout.\");const{uuid:e,name:t}=this.fin.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction(\"layout-get-current-sync\").catch((e=>{})),\"openfin\"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error(\"You are not in a Window context. Only Windows can have a Layout.\");const{uuid:e,name:t}=this.fin.me;return this.wrapSync({uuid:e,name:t})}async getLayoutByViewIdentity(e){this.wire.sendAction(\"layout-get-by-view-identity\").catch((()=>{}));let t=await this.wire.environment.getViewWindowIdentity(this.fin,e);t.identity&&(t=t.identity);try{const n=this.wrapSync(t),i=await Mi.Layout.getClient(n),r=await i.getLayoutIdentityForViewOrThrow(e);return this.wrapSync(r)}catch(n){if(![\"No action registered at target for\",\"getLayoutIdentityForViewOrThrow is not a function\"].some((e=>n.message.includes(e))))throw n;if(t.uuid===t.name)throw new Error(`View identity ${JSON.stringify(e)} is not attached to any layout in provider window ${JSON.stringify(t)}.`);return this.wrapSync(t)}}}kn.LayoutModule=Oi,Ci=new WeakMap,bi=new WeakMap,Ii=new WeakMap,vi=new WeakSet,Ei=function(e){if(!xi(this,bi,\"f\"))throw new Error(`You must call init before using the API ${e}`);return xi(this,bi,\"f\")},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(kn,e),n(Ln,e)}(jn),Object.defineProperty(Pn,\"__esModule\",{value:!0}),Pn.PlatformModule=void 0;const Si=d,Ri=Mn,Fi=jn;class ji extends Si.Base{constructor(e,t){super(e),this._channel=t,this.Layout=new Fi.LayoutModule(this.wire)}async init(e){if(!fin.__internal_.isPlatform||fin.me.name!==fin.me.uuid)throw new Error(\"fin.Platform.init should only be called from a custom platform provider running in the main window of the application.\");return this.wire.environment.initPlatform(this.fin,e)}async wrap(e){return this.wire.sendAction(\"platform-wrap\").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}wrapSync(e){return this.wire.sendAction(\"platform-wrap-sync\").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}async getCurrent(){return this.wire.sendAction(\"platform-get-current\").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction(\"platform-get-current-sync\").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}start(e){return this.wire.sendAction(\"platform-start\").catch((e=>{})),new Promise((async(t,n)=>{try{const{uuid:n}=e,i=await this.fin.Application._create({...e,isPlatformController:!0});i.once(\"platform-api-ready\",(()=>t(this.wrapSync({uuid:n})))),i._run({uuid:n})}catch(e){n(e)}}))}startFromManifest(e,t){return this.wire.sendAction(\"platform-start-from-manifest\").catch((e=>{})),new Promise((async(n,i)=>{try{const i=await this.fin.Application._createFromManifest(e);i.once(\"platform-api-ready\",(()=>n(this.wrapSync({uuid:i.identity.uuid})))),i._run(t)}catch(e){i(e)}}))}}Pn.PlatformModule=ji,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Pn,e),n(Mn,e)}(An);var ki={};!function(e){Object.defineProperty(e,\"__esModule\",{value:!0}),e.getMe=e.getBaseMe=e.environmentUnsupportedMessage=void 0;const t=J(),n=un,i=ie(),r=rn;function o(e,t,n){return{...{isView:\"view\"===e,isWindow:\"window\"===e,isFrame:\"iframe\"===e,isExternal:\"external connection\"===e},uuid:t,name:n,entityType:e}}e.environmentUnsupportedMessage=\"You are not running in OpenFin.\",e.getBaseMe=o,e.getMe=function(s){const{uuid:a,name:c,entityType:d}=s.me,h={setContext(){throw new Error(e.environmentUnsupportedMessage)},addContextHandler(){throw new Error(e.environmentUnsupportedMessage)},getContextGroups(){throw new Error(e.environmentUnsupportedMessage)},joinContextGroup(){throw new Error(e.environmentUnsupportedMessage)},removeFromContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getAllClientsInContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getInfoForContextGroup(){throw new Error(e.environmentUnsupportedMessage)}},l=\"Interop API has not been instantiated. Either connection has failed or you have not declared interop in your config.\",u={setContext(){throw new Error(l)},addContextHandler(){throw new Error(l)},getContextGroups(){throw new Error(l)},joinContextGroup(){throw new Error(l)},removeFromContextGroup(){throw new Error(l)},getAllClientsInContextGroup(){throw new Error(l)},getInfoForContextGroup(){throw new Error(l)}},p={eventNames:()=>{throw new Error(e.environmentUnsupportedMessage)},emit:()=>{throw new Error(e.environmentUnsupportedMessage)},listeners:()=>{throw new Error(e.environmentUnsupportedMessage)},listenerCount:()=>{throw new Error(e.environmentUnsupportedMessage)},on:()=>{throw new Error(e.environmentUnsupportedMessage)},addListener:()=>{throw new Error(e.environmentUnsupportedMessage)},once:()=>{throw new Error(e.environmentUnsupportedMessage)},prependListener:()=>{throw new Error(e.environmentUnsupportedMessage)},prependOnceListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeAllListeners:()=>{throw new Error(e.environmentUnsupportedMessage)}};switch(d){case\"view\":return Object.assign(new t.View(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case\"window\":return Object.assign(new i._Window(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case\"iframe\":return Object.assign(new n._Frame(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case\"external connection\":return Object.assign(new r.ExternalApplication(s,{uuid:a}),o(d,a,c),{interop:u,isOpenFin:!1});default:return{...o(d,a,c),...p,interop:h,isOpenFin:!1}}}}(ki);var Li={},Ti={},$i={};Object.defineProperty($i,\"__esModule\",{value:!0}),$i.createWarningObject=$i.createUnusableObject=void 0,$i.createUnusableObject=function(e){const t=()=>{throw new Error(e)};return new Proxy({},{apply:t,construct:t,defineProperty:t,deleteProperty:t,get:t,getOwnPropertyDescriptor:t,getPrototypeOf:t,has:t,isExtensible:t,ownKeys:t,preventExtensions:t,set:t,setPrototypeOf:t})},$i.createWarningObject=function(e,t){return new Proxy(t,{get:(...t)=>(console.warn(e),Reflect.get(...t)),set:(...t)=>(console.warn(e),Reflect.set(...t)),getOwnPropertyDescriptor:(...t)=>(console.warn(e),Reflect.getOwnPropertyDescriptor(...t)),ownKeys:(...t)=>(console.warn(e),Reflect.ownKeys(...t))})};var Bi,Gi={},Wi={};var Hi={};!function(e){Object.defineProperty(e,\"__esModule\",{value:!0}),e.wrapIntentHandler=e.BROKER_ERRORS=e.generateOverrideWarning=e.generateOverrideError=e.wrapContextHandler=e.wrapInTryCatch=e.generateId=void 0;e.generateId=()=>`${Math.random()}${Date.now()}`;e.wrapInTryCatch=(e,t)=>(...n)=>{try{return e(...n)}catch(e){throw new Error((t||\"\")+e)}};e.wrapContextHandler=(e,t)=>async n=>{try{await e(n)}catch(e){throw console.error(`Error thrown by handler ${t} for context type ${n.type}: ${e}`),e}};e.generateOverrideError=(e,t)=>`You have tried to to use ${e} but ${t} has not been overridden in the Interop Broker. Please override this function. Refer to our documentation for more info.`;e.generateOverrideWarning=(e,t,n,i)=>{const{uuid:r,name:o}=n;return i?`Entity with identity: ${r}/${o} has called ${i} or ${e} but ${t} has not been overridden.`:`Entity with identity: ${r}/${o} has called ${e} but ${t} has not been overridden.`},e.BROKER_ERRORS={fireIntent:(0,e.generateOverrideError)(\"fireIntent\",\"handleFiredIntent\"),fireIntentForContext:(0,e.generateOverrideError)(\"fireIntentForContext\",\"handleFiredIntentForContext\"),getInfoForIntent:(0,e.generateOverrideError)(\"getInfoForIntent\",\"handleInfoForIntent\"),getInfoForIntentsByContext:(0,e.generateOverrideError)(\"getInfoForIntentsByContext\",\"handleInfoForIntentsByContext\"),joinSessionContextGroupWithJoinContextGroup:\"The Context Group you have tried to join is a Session Context Group. Custom Context Groups can only be defined by the Interop Broker through code or manifest configuration. Please use joinSessionContextGroup.\",fdc3Open:(0,e.generateOverrideError)(\"fdc3.open\",\"fdc3HandleOpen\"),fdc3FindInstances:(0,e.generateOverrideError)(\"fdc3.findInstances\",\"fdc3HandleFindInstances\"),fdc3GetAppMetadata:(0,e.generateOverrideError)(\"fdc3.getAppMetadata\",\"fdc3HandleGetAppMetadata\"),fdc3GetInfo:(0,e.generateOverrideError)(\"fdc3.getInfo\",\"fdc3HandleGetInfo\")};e.wrapIntentHandler=(e,t)=>async n=>{try{return e(n)}catch(e){throw console.error(`Error thrown by handler ${t}: ${e}`),e}}}(Hi);var Ni,Di,Ui={};function Vi(){if(Di)return Gi;Di=1;var e,t,n,r=s&&s.__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},o=s&&s.__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)},a=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Gi,\"__esModule\",{value:!0}),Gi.InteropBroker=void 0;const c=d,h=a(function(){if(Bi)return Wi;Bi=1,Object.defineProperty(Wi,\"__esModule\",{value:!0});const e=Cr();return Wi.default=class{constructor(e,t){this.provider=e,this.id=t,this.lastContext=void 0,this.contextGroupMap=new Map,this.clients=new Map,this.registerListeners()}registerListeners(){this.provider.register(`sessionContextGroup:getContext-${this.id}`,this.getCurrentContext.bind(this)),this.provider.register(`sessionContextGroup:setContext-${this.id}`,this.setContext.bind(this)),this.provider.register(`sessionContextGroup:handlerAdded-${this.id}`,this.handlerAdded.bind(this)),this.provider.register(`sessionContextGroup:handlerRemoved-${this.id}`,this.handlerRemoved.bind(this))}getCurrentContext(e){return e.type?this.contextGroupMap.get(e.type):this.lastContext}setContext(t,n){const{context:i}=t,r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name} not in Session Client State Map`);this.contextGroupMap.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{e.contextHandlers.get(i.type)?.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getClientState(e){return this.clients.get(e.endpointId)}async handlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(i){const e=r.contextHandlers.get(i)||[];r.contextHandlers.set(i,[...e,n]);const o=this.contextGroupMap.get(i);o&&await this.provider.dispatch(t,n,o)}else{r.globalHandler=n;const e=[...this.contextGroupMap.keys()].map((async e=>{const i=this.contextGroupMap.get(e);i&&await this.provider.dispatch(t,n,i)}));await Promise.all(e)}}handlerRemoved(e,t){const{handlerId:n}=e,i=this.clients.get(t.endpointId);i?(Array.from(i.contextHandlers).forEach((([,e])=>{const t=e.indexOf(n);t>-1&&e.splice(t,1)})),i.globalHandler===n&&(i.globalHandler=void 0)):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={contextHandlers:new Map,clientIdentity:e,globalHandler:void 0};this.clients.set(e.endpointId,t)}}onDisconnection(e){this.clients.delete(e.endpointId)}},Wi}()),l=Hi,u=a(i),p=function(){if(Ni)return Ui;Ni=1,Object.defineProperty(Ui,\"__esModule\",{value:!0}),Ui.PrivateChannelProvider=void 0;const e=Vi();return Ui.PrivateChannelProvider=class t{constructor(e,t){this.provider=e,this.id=t,this.clients=new Map,this.registerListeners(),this.contextByContextType=new Map,this.lastContext=void 0,this.provider.onConnection((e=>this.registerNewClient(e))),this.provider.onDisconnection((async e=>{const{endpointId:t}=e;this.clients.has(t)&&await this.handleClientDisconnecting(e),0===(await this.provider.getAllClientInfo()).length&&this.provider.destroy()}))}getClientState(e){return this.clients.get(e.endpointId)}registerListeners(){this.provider.register(\"broadcast\",this.broadcast.bind(this)),this.provider.register(\"getCurrentContext\",this.getCurrentContext.bind(this)),this.provider.register(\"contextHandlerAdded\",this.contextHandlerAdded.bind(this)),this.provider.register(\"contextHandlerRemoved\",this.contextHandlerRemoved.bind(this)),this.provider.register(\"nonStandardHandlerRemoved\",this.nonStandardHandlerRemoved.bind(this)),this.provider.register(\"onAddContextHandlerAdded\",this.onAddContextHandlerAdded.bind(this)),this.provider.register(\"onDisconnectHandlerAdded\",this.onDisconnectHandlerAdded.bind(this)),this.provider.register(\"onUnsubscribeHandlerAdded\",this.onUnsubscribeHandlerAdded.bind(this)),this.provider.register(\"clientDisconnecting\",((e,t)=>{this.handleClientDisconnecting(t)}))}broadcast(t,n){const{context:i}=t;if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name}, tried to call broadcast, is not connected to this Private Channel`);const r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to broadcast - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);this.contextByContextType.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{const t=e.handlerIdsByContextTypes.get(i.type);t&&t.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getCurrentContext(e,t){const{contextType:n}=e;if(!this.getClientState(t))throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call getCurrentContext, is not connected to this Private Channel`);if(void 0!==n){return this.contextByContextType.get(n)||null}return this.lastContext?this.lastContext:null}contextHandlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call addContextListener, is not connected to this Private Channel`);if(i){const e=r.handlerIdsByContextTypes.get(i)||[];r.handlerIdsByContextTypes.set(i,[...e,n])}else r.globalHandler=n;Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&e.onAddContextListenerHandlerId&&this.provider.dispatch(e.clientIdentity,e.onAddContextListenerHandlerId,i)}))}async contextHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);if(i){let e;if(i.globalHandler===n)i.globalHandler=void 0;else for(const[t,r]of i.handlerIdsByContextTypes){const i=r.indexOf(n);i>-1&&(r.splice(i,1),e=t)}const r=(await this.getConnectedClients()).map((async n=>{const{clientIdentity:i,clientIdentity:{endpointId:r},onUnsubscribeHandlerId:o}=n;r!==t.endpointId&&o&&await this.provider.dispatch(i,o,e)}));try{await Promise.all(r)}catch(e){throw console.error(`Problem when attempting to dispatch to onUnsubscribeHandlers. Error: ${e} Removing Client: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}`),new Error(e)}}else console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}.`)}nonStandardHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);i?i.onDisconnectHandlerId===n?i.onDisconnectHandlerId=void 0:i.onAddContextListenerHandlerId===n?i.onAddContextListenerHandlerId=void 0:i.onUnsubscribeHandlerId===n&&(i.onUnsubscribeHandlerId=void 0):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}onAddContextHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onAddContextListener, is not connected to this Private Channel`);n.onAddContextListenerHandlerId=i,Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&Array.from(e.handlerIdsByContextTypes.keys()).forEach((e=>{this.provider.dispatch(t,i,e)}))}))}onDisconnectHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onDisconnect, is not connected to this Private Channel`);n.onDisconnectHandlerId=i}onUnsubscribeHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onUnsubscribe, is not connected to this Private Channel`);n.onUnsubscribeHandlerId=i}removeClient(e){const t=this.getClientState(e);if(!t)throw new Error(`Client with Identity: ${e.uuid} ${e.name}, tried to call disconnect, is not connected to this Private Channel`);t.handlerIdsByContextTypes.clear(),this.clients.delete(e.endpointId)}async fireOnDisconnectForOtherClients(e){const{endpointId:t}=e,n=(await this.getConnectedClients()).map((async e=>{const{clientIdentity:{endpointId:n},onDisconnectHandlerId:i}=e;n!==t&&i&&await this.provider.dispatch(e.clientIdentity,i)}));try{await Promise.all(n)}catch(t){throw console.error(`Problem when attempting to dispatch to onDisconnectHandlers. Error: ${t} Disconnecting Client: uuid: ${e.uuid}. name: ${e.name}. endpointId: ${e.endpointId}`),new Error(t)}}async unsubscribeAll(e){const{endpointId:t}=e,n=this.clients.get(t);if(n){const t=Array.from(n.handlerIdsByContextTypes.values()).flat(),i=n.globalHandler;if(t.length>0){const n=t.map((async t=>this.contextHandlerRemoved({handlerId:t},e)));try{await Promise.all(n)}catch(e){console.error(e.message)}}if(i)try{await this.contextHandlerRemoved({handlerId:i},e)}catch(e){console.error(e.message)}}}async handleClientDisconnecting(e){await this.unsubscribeAll(e),this.removeClient(e),await this.fireOnDisconnectForOtherClients(e)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={clientIdentity:e,handlerIdsByContextTypes:new Map,globalHandler:void 0,onAddContextListenerHandlerId:void 0,onUnsubscribeHandlerId:void 0,onDisconnectHandlerId:void 0};this.clients.set(e.endpointId,t)}}async getConnectedClients(){const e=await this.provider.getAllClientInfo();return Array.from(this.clients.values()).filter((t=>{const{uuid:n,name:i}=t.clientIdentity;return e.some((e=>i===e.name&&n===e.uuid))}))}static init(e,n){return new t(e,n)}},Ui}(),w=G,y=[{id:\"green\",displayMetadata:{color:\"#00CC88\",name:\"green\"}},{id:\"purple\",displayMetadata:{color:\"#8C61FF\",name:\"purple\"}},{id:\"orange\",displayMetadata:{color:\"#FF8C4C\",name:\"orange\"}},{id:\"red\",displayMetadata:{color:\"#FF5E60\",name:\"red\"}},{id:\"pink\",displayMetadata:{color:\"#FF8FB8\",name:\"pink\"}},{id:\"yellow\",displayMetadata:{color:\"#E9FF8F\",name:\"yellow\"}}];let f=class i extends c.Base{constructor(i,s,a){super(i),e.set(this,void 0),t.set(this,void 0),n.set(this,void 0),this.getProvider=()=>o(this,n,\"f\").getValue(),this.interopClients=new Map,this.contextGroupsById=new Map,r(this,t,a.contextGroups??[...y],\"f\"),r(this,e,a.fdc3Info,\"f\"),a?.logging&&(this.logging=a.logging),this.intentClientMap=new Map,this.lastContextMap=new Map,this.sessionContextGroupMap=new Map,r(this,n,new w.Lazy(s),\"f\"),this.setContextGroupMap(),this.setupChannelProvider()}static createClosedConstructor(...e){return class extends i{constructor(...t){if(t.length){const[n,i,r]=t;if(r&&\"object\"==typeof r&&!(0,u.default)(r,e[2]))return console.warn(\"You have modified the parameters of the InteropOverride constructor. This behavior is deprecated and will be removed in a future version. You can modify these options in your manifest. Please consult our Interop docs for guidance on migrating to the new override scheme.\"),void super(e[0],e[1],r);console.warn(\"You are attempting to pass arguments to the InteropOverride constructor. This is not necessary, and these passed arguments will be ignored. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.\")}super(...e)}}}setContext({context:e},t){this.wire.sendAction(\"interop-broker-set-context\").catch((e=>{}));const n=this.getClientState(t);if(!n||!n.contextGroupId)throw n?new Error(\"You must join a context group before you can set context.\"):new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);{const{contextGroupId:t}=n;this.setContextForGroup({context:e},t)}}setContextForGroup({context:e},t){this.wire.sendAction(\"interop-broker-set-context-for-group\").catch((e=>{}));const n=this.contextGroupsById.get(t);if(!n)throw new Error(`Unable to set context for context group that isn't in the context group mapping: ${t}.`);const r=i.checkContextIntegrity(e);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(e)}`);const o=e.type;n.set(o,e),this.lastContextMap.set(t,o);Array.from(this.interopClients.values()).filter((e=>e.contextGroupId===t)).forEach((t=>{for(const[,n]of t.contextHandlers)i.isContextTypeCompatible(o,n.contextType)&&this.invokeContextHandler(t.clientIdentity,n.handlerId,e)}))}getCurrentContext(e,t){this.wire.sendAction(\"interop-broker-get-current-context\").catch((e=>{}));const n=this.getClientState(t);if(!n?.contextGroupId)throw new Error(\"You must be a member of a context group to call getCurrentContext\");const{contextGroupId:i}=n,r=this.contextGroupsById.get(i),o=this.lastContextMap.get(i),s=e?.contextType??o;return r&&s?r.get(s):void 0}async joinContextGroup({contextGroupId:e,target:t},n){if(this.wire.sendAction(\"interop-broker-join-context-group\").catch((e=>{})),this.sessionContextGroupMap.has(e))throw new Error(l.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup);if(t){i.hasEndpointId(t)&&await this.addClientToContextGroup({contextGroupId:e},t);try{const n=this.channel.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name));if(!n.length)throw new Error(`Given Identity ${t.uuid} ${t.name} is not connected to the Interop Broker.`);n.length>1&&console.warn(`More than one connection found for identity ${t.uuid} ${t.name}`);const i=[];for(const t of n)i.push(this.addClientToContextGroup({contextGroupId:e},t));await Promise.all(i)}catch(e){throw new Error(e)}}else await this.addClientToContextGroup({contextGroupId:e},n)}async addClientToContextGroup({contextGroupId:e},t){this.wire.sendAction(\"interop-broker-add-client-to-context-group\").catch((e=>{}));const n=this.getClientState(t);if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(!this.getContextGroups().find((t=>t.id===e)))throw new Error(`Attempting to join a context group that does not exist: ${e}. You may only join existing context groups.`);if(n.contextGroupId!==e){n.contextGroupId=e,await this.setCurrentContextGroupInClientOptions(t,e);const i=this.contextGroupsById.get(e);for(const[,e]of n.contextHandlers){const{contextType:n,handlerId:r}=e;if(void 0===n)i.forEach(((e,n)=>{this.invokeContextHandler(t,r,e)}));else if(i.has(n)){const e=i.get(n);e&&this.invokeContextHandler(t,r,e)}}}}async removeFromContextGroup({target:e},t){if(this.wire.sendAction(\"interop-broker-remove-from-context-group\").catch((e=>{})),e){i.hasEndpointId(e)&&await this.removeClientFromContextGroup(e);try{const t=this.channel.connections.filter((t=>t.uuid===e.uuid&&t.name===e.name));if(!t.length)throw new Error(`No connection found for given Identity ${e.uuid} ${e.name}`);t.length>1&&console.warn(`More than one connection found for identity ${e.uuid} ${e.name}`);const n=[];for(const e of t)n.push(this.removeClientFromContextGroup(e));await Promise.all(n)}catch(e){throw new Error(e)}}else await this.removeClientFromContextGroup(t)}async removeClientFromContextGroup(e){this.wire.sendAction(\"interop-broker-remove-client-from-context-group\").catch((e=>{}));const t=this.getClientState(e);t&&(t.contextGroupId=void 0),await this.setCurrentContextGroupInClientOptions(e,null)}getContextGroups(){return this.wire.sendAction(\"interop-broker-get-context-groups\").catch((e=>{})),o(this,t,\"f\").map((e=>({...e})))}getInfoForContextGroup({contextGroupId:e}){return this.wire.sendAction(\"interop-broker-get-info-for-context-group\").catch((e=>{})),this.getContextGroups().find((t=>t.id===e))}getAllClientsInContextGroup({contextGroupId:e}){this.wire.sendAction(\"interop-broker-get-all-clients-in-context-group\").catch((e=>{}));return Array.from(this.interopClients.values()).filter((t=>t.contextGroupId===e)).map((e=>e.clientIdentity))}async handleFiredIntent(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.raiseIntent\",\"InteropBroker.handleFiredIntent\",t,\"interopClient.fireIntent\");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntent)}async setIntentTarget(e,t){this.wire.sendAction(\"interop-broker-set-intent-target\").catch((e=>{}));const n=this.intentClientMap.get(t.name),i=`intent-handler-${e.name}`;if(n){const t=n.get(i);if(t){if(t.pendingIntents.push(e),t.clientIdentity&&t.isReady){const{clientIdentity:e,pendingIntents:n}=t;try{const r=n[n.length-1];await this.invokeIntentHandler(e,i,r),t.pendingIntents=[]}catch(n){console.error(`Error invoking intent handler for client ${e.uuid}/${e.name}/${e.endpointId}`),t.isReady=!1}}}else n.set(i,{isReady:!1,pendingIntents:[e]})}else{this.intentClientMap.set(t.name,new Map);const n=this.intentClientMap.get(t.name);n&&n.set(i,{isReady:!1,pendingIntents:[e]})}}async handleInfoForIntent(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.findIntent\",\"InteropBroker.handleInfoForIntent\",t,\"interopClient.getInfoForIntent\");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntent)}async handleInfoForIntentsByContext(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.findIntentsByContext\",\"InteropBroker.handleInfoForIntentsByContext\",t,\"interopClient.getInfoForIntentsByContext\");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntentsByContext)}async handleFiredIntentForContext(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.raiseIntentForContext\",\"InteropBroker.handleFiredIntentForContext\",t,\"interopClient.fireIntentForContext\");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntentForContext)}async clientDisconnected(e){}async fdc3HandleOpen({app:e,context:t},n){const i=(0,l.generateOverrideWarning)(\"fdc3.open\",\"InteropBroker.fdc3HandleOpen\",n);throw console.warn(i),new Error(l.BROKER_ERRORS.fdc3Open)}async fdc3HandleFindInstances(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.open\",\"InteropBroker.fdc3HandleFindInstances\",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3FindInstances)}async fdc3HandleGetAppMetadata(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.getAppMetadata\",\"InteropBroker.fdc3HandleGetAppMetadata\",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3GetAppMetadata)}async invokeContextHandler(e,t,n){const i=await this.getProvider();try{await i.dispatch(e,t,n)}catch(i){console.error(`Error invoking context handler ${t} for context type ${n.type} in client ${e.uuid}/${e.name}/${e.endpointId}`,i)}}async invokeIntentHandler(e,t,n){const i=await this.getProvider();await i.dispatch(e,t,n)}async fdc3HandleGetInfo(t,n){const{fdc3Version:i}=t;return{fdc3Version:i,...o(this,e,\"f\"),optionalFeatures:{OriginatingAppMetadata:!1,UserChannelMembershipAPIs:!0},appMetadata:{appId:\"\",instanceId:\"\"}}}async getAllClientInfo(){return(await this.getProvider()).getAllClientInfo()}decorateSnapshot(e){return{...e,interopSnapshotDetails:{contextGroupStates:this.getContextGroupStates()}}}applySnapshot(e,t){const n=e?.interopSnapshotDetails?.contextGroupStates;n&&(t?.closeExistingWindows||this.updateExistingClients(n),this.rehydrateContextGroupStates(n))}updateExistingClients(e){this.interopClients.forEach((t=>{const{clientIdentity:n,contextGroupId:r,contextHandlers:o}=t;if(r){const t=e[r];for(const[,e]of Object.entries(t))o.forEach((t=>{const{handlerId:r,contextType:o}=t;i.isContextTypeCompatible(e.type,o)&&this.invokeContextHandler(n,r,e)}))}}))}getContextGroupStates(){return i.toObject(this.contextGroupsById)}rehydrateContextGroupStates(e){const t=Object.entries(e);for(const[e,n]of t){const t=Object.entries(n);for(const[n,i]of t)if(this.contextGroupsById.has(e)){this.contextGroupsById.get(e).set(n,i)}else console.warn(`Attempting to set a context group that isn't in the context group mapping. Skipping context group rehydration for: ${e}`)}}contextHandlerRegistered({contextType:e,handlerId:t},n){const i={contextType:e,handlerId:t},r=this.getClientState(n);if(r?.contextHandlers.set(t,i),r&&r.contextGroupId){const{contextGroupId:i}=r,o=this.contextGroupsById.get(i);if(void 0===e)o.forEach(((e,i)=>{this.invokeContextHandler(n,t,e)}));else if(o.has(e)){const i=o.get(e);i&&this.invokeContextHandler(n,t,i)}}}async intentHandlerRegistered(e,t){const{handlerId:n}=e,i=this.intentClientMap.get(t.name),r=i?.get(n);if(i)if(r){const{pendingIntents:e}=r;r.clientIdentity=t,r.isReady=!0;try{if(e.length>0){const i=e[e.length-1];await this.invokeIntentHandler(t,n,i),r.pendingIntents=[]}}catch(e){console.error(`Error invoking intent handler: ${n} for client ${t.uuid}/${t.name}/${t.endpointId}`)}}else i.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t});else{this.intentClientMap.set(t.name,new Map);const e=this.intentClientMap.get(t.name);e&&e.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t})}}removeContextHandler({handlerId:e},t){const n=this.getClientState(t);n&&n.contextHandlers.delete(e)}handleJoinSessionContextGroup({sessionContextGroupId:e},t){try{if(!e)throw new Error(\"Failed to join session context group: must specify group id.\");const n=this.sessionContextGroupMap.get(e);if(n)n.registerNewClient(t);else{const n=new h.default(this.channel,e);n.registerNewClient(t),this.sessionContextGroupMap.set(e,n)}return{hasConflict:this.contextGroupsById.has(e)}}catch(e){throw new Error(e)}}getClientState(e){return this.interopClients.get(e.endpointId)}static toObject(e){const t=Object.fromEntries(e),n={};return Object.entries(t).forEach((([e,t])=>{const i=Object.fromEntries(t);n[e]=i})),n}static checkContextIntegrity(e){if(!e)return{isValid:!1,reason:\"No context supplied\"};if(\"object\"!=typeof e)return{isValid:!1,reason:\"Context must be an Object\"};if(!e.type)return{isValid:!1,reason:\"Context must have a type property\"};if(e.id&&\"object\"!=typeof e.id)return{isValid:!1,reason:\"Context id must be an Object populated with key-value identifiers (if set)\"};if(e.id){const{id:t}=e,n=Object.keys(t);let i=!1;if(!n.length)return{isValid:!1,reason:\"Context id must have at least one key-value identifier\"};if(n.forEach((e=>{\"string\"==typeof e&&\"string\"==typeof t[e]||(i=!0)})),i)return{isValid:!1,reason:\"Context id key-value identifiers must be of type string\"}}return e.name&&\"string\"!=typeof e.name?{isValid:!1,reason:\"Context name must be of string type (if set)\"}:{isValid:!0}}static hasEndpointId(e){return void 0!==e.endpointId}static isContextTypeCompatible(e,t){return void 0===t||e===t}setContextGroupMap(){for(const e of this.getContextGroups())this.contextGroupsById.set(e.id,new Map)}async setCurrentContextGroupInClientOptions(e,t){try{const n=await this.fin.System.getEntityInfo(e.uuid,e.name);let i;\"view\"===n.entityType?i=await this.fin.View.wrap(e):\"window\"===n.entityType&&(i=await this.fin.Window.wrap(e)),i&&await i.updateOptions({interop:{currentContextGroup:t}})}catch(e){}}async setupChannelProvider(){try{const e=await this.getProvider();this.channel=e,this.wireChannel(e)}catch(e){throw new Error(`Error setting up Interop Broker Channel Provider: ${e}`)}}wireChannel(e){e.onConnection((async(e,t)=>{if(!await this.isConnectionAuthorized(e,t))throw new Error(`Connection not authorized for ${e.uuid}, ${e.name}`);if(!e.endpointId)throw new Error(\"Version too old to be compatible with Interop. Please upgrade your runtime to a more recent version.\");const n={contextGroupId:void 0,contextHandlers:new Map,clientIdentity:e};t?.currentContextGroup&&this.contextGroupsById.has(t.currentContextGroup)&&(n.contextGroupId=t?.currentContextGroup),this.interopClients.set(e.endpointId,n)})),e.onDisconnection((e=>{this.interopClients.delete(e.endpointId);const t=this.intentClientMap.get(e.name);t&&e.uuid===this.fin.me.uuid&&t.forEach((e=>{e.isReady=!1})),this.sessionContextGroupMap.forEach((t=>{t.onDisconnection(e)})),this.clientDisconnected(e)})),e.beforeAction((async(e,t,n)=>{if(!await this.isActionAuthorized(e,t,n))throw new Error(`Action (${e}) not authorized for ${n.uuid}, ${n.name}`);this.logging?.beforeAction?.enabled&&console.log(e,t,n)})),e.afterAction(((e,t,n)=>{this.logging?.afterAction?.enabled&&console.log(e,t,n)})),e.register(\"setContext\",this.setContext.bind(this)),e.register(\"fireIntent\",this.handleFiredIntent.bind(this)),e.register(\"getCurrentContext\",this.getCurrentContext.bind(this)),e.register(\"getInfoForIntent\",this.handleInfoForIntent.bind(this)),e.register(\"getInfoForIntentsByContext\",this.handleInfoForIntentsByContext.bind(this)),e.register(\"fireIntentForContext\",this.handleFiredIntentForContext.bind(this)),e.register(\"getContextGroups\",this.getContextGroups.bind(this)),e.register(\"joinContextGroup\",this.joinContextGroup.bind(this)),e.register(\"removeFromContextGroup\",this.removeFromContextGroup.bind(this)),e.register(\"getAllClientsInContextGroup\",this.getAllClientsInContextGroup.bind(this)),e.register(\"getInfoForContextGroup\",this.getInfoForContextGroup.bind(this)),e.register(\"contextHandlerRegistered\",this.contextHandlerRegistered.bind(this)),e.register(\"intentHandlerRegistered\",this.intentHandlerRegistered.bind(this)),e.register(\"removeContextHandler\",this.removeContextHandler.bind(this)),e.register(\"sessionContextGroup:createIfNeeded\",this.handleJoinSessionContextGroup.bind(this)),e.register(\"fdc3Open\",this.fdc3HandleOpen.bind(this)),e.register(\"fdc3v2FindIntentsByContext\",this.handleInfoForIntentsByContext.bind(this)),e.register(\"fdc3FindInstances\",this.fdc3HandleFindInstances.bind(this)),e.register(\"fdc3GetAppMetadata\",this.fdc3HandleGetAppMetadata.bind(this)),e.register(\"fdc3v2GetInfo\",(async(e,t)=>this.fdc3HandleGetInfo.bind(this)(e,t))),e.register(\"createPrivateChannelProvider\",(async e=>{const{channelId:t}=e,n=await this.fin.InterApplicationBus.Channel.create(t);p.PrivateChannelProvider.init(n,t)}))}isConnectionAuthorized(e,t){return this.wire.sendAction(\"interop-broker-is-connection-authorized\").catch((e=>{})),Promise.resolve(!0)}isActionAuthorized(e,t,n){return this.wire.sendAction(\"interop-broker-is-action-authorized\").catch((e=>{})),Promise.resolve(!0)}};return Gi.InteropBroker=f,e=new WeakMap,t=new WeakMap,n=new WeakMap,Gi}var zi,Ki={},qi={},Ji=s&&s.__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},Yi=s&&s.__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)};Object.defineProperty(qi,\"__esModule\",{value:!0});const Zi=d,Qi=Hi;class Xi extends Zi.Base{constructor(e,t,n){super(e),zi.set(this,void 0),this.id=n,Ji(this,zi,t,\"f\")}async setContext(e){this.wire.sendAction(\"interop-session-context-group-set-context\").catch((e=>{}));return(await Yi(this,zi,\"f\")).dispatch(`sessionContextGroup:setContext-${this.id}`,{sessionContextGroupId:this.id,context:e})}async getCurrentContext(e){this.wire.sendAction(\"interop-session-context-group-get-context\").catch((e=>{}));return(await Yi(this,zi,\"f\")).dispatch(`sessionContextGroup:getContext-${this.id}`,{sessionContextGroupId:this.id,type:e})}async addContextHandler(e,t){if(this.wire.sendAction(\"interop-session-context-group-add-handler\").catch((e=>{})),\"function\"!=typeof e)throw new Error(\"Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.\");const n=await Yi(this,zi,\"f\");let i;return i=t?`sessionContextHandler:invoke-${this.id}-${t}-${(0,Qi.generateId)()}`:`sessionContextHandler:invoke-${this.id}`,n.register(i,(0,Qi.wrapContextHandler)(e,i)),await n.dispatch(`sessionContextGroup:handlerAdded-${this.id}`,{handlerId:i,contextType:t}),{unsubscribe:await this.createUnsubscribeCb(i)}}async createUnsubscribeCb(e){const t=await Yi(this,zi,\"f\");return async()=>{t.remove(e),await t.dispatch(`sessionContextGroup:handlerRemoved-${this.id}`,{handlerId:e})}}getUserInstance(){return{id:this.id,setContext:(0,Qi.wrapInTryCatch)(this.setContext.bind(this),\"Failed to set context: \"),getCurrentContext:(0,Qi.wrapInTryCatch)(this.getCurrentContext.bind(this),\"Failed to get context: \"),addContextHandler:(0,Qi.wrapInTryCatch)(this.addContextHandler.bind(this),\"Failed to add context handler: \")}}}qi.default=Xi,zi=new WeakMap;var er={},tr={},nr={},ir={},rr=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),or=s&&s.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,\"default\",{enumerable:!0,value:t})}:function(e,t){e.default=t}),sr=s&&s.__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)&&rr(t,e,n);return or(t,e),t};Object.defineProperty(ir,\"__esModule\",{value:!0}),ir.PrivateChannelClient=void 0;const ar=sr(Hi);var cr,dr;function hr(){if(cr)return tr;cr=1;var e,t=s&&s.__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)},n=s&&s.__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},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(tr,\"__esModule\",{value:!0}),tr.FDC3ModuleBase=void 0;const o=nr,a=Hi,c=wr(),d=r(i);return tr.FDC3ModuleBase=class{get client(){return t(this,e,\"f\").call(this)}get fin(){return this.wire.getFin()}constructor(t,i){this.wire=i,e.set(this,void 0),n(this,e,t,\"f\")}async broadcast(e){return this.wire.sendAction(\"fdc3-broadcast\").catch((e=>{})),this.client.setContext(e)}async _open(e,t){this.wire.sendAction(\"fdc3-open\").catch((e=>{}));try{return await c.InteropClient.ferryFdc3Call(this.client,\"fdc3Open\",{app:e,context:t})}catch(e){const t=e.message===a.BROKER_ERRORS.fdc3Open?\"ResolverUnavailable\":e.message;throw new Error(t)}}async _getChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:\"system\",...(0,o.getUnsupportedChannelApis)()})))}async getOrCreateChannel(e){this.wire.sendAction(\"fdc3-get-or-create-channel\").catch((e=>{}));const t=(await this._getChannels()).find((t=>t.id===e));if(t)return{...t,type:\"system\",...(0,o.getUnsupportedChannelApis)()};try{const t=await this.client.joinSessionContextGroup(e);return(0,o.buildAppChannelObject)(t)}catch(e){throw console.error(e.message),new Error(o.ChannelError.CreationFailed)}}async getSystemChannels(){return this.wire.sendAction(\"fdc3-get-system-channels\").catch((e=>{})),this._getChannels()}async joinChannel(e){this.wire.sendAction(\"fdc3-join-channel\").catch((e=>{}));try{return await this.client.joinContextGroup(e)}catch(e){if(e.message===a.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup?console.error(\"The Channel you have tried to join is an App Channel. Custom Channels can only be defined by the Interop Broker through code or manifest configuration. Please use getOrCreateChannel.\"):console.error(e.message),e.message.startsWith(\"Attempting to join a context group that does not exist\"))throw new Error(o.ChannelError.NoChannelFound);throw new Error(o.ChannelError.AccessDenied)}}async getCurrentChannel(){this.wire.sendAction(\"fdc3-get-current-channel\").catch((e=>{}));const e=await this.getCurrentContextGroupInfo();return e?this.buildChannelObject(e):null}async leaveCurrentChannel(){return this.wire.sendAction(\"fdc3-leave-current-channel\").catch((e=>{})),this.client.removeFromContextGroup()}async getCurrentContextGroupInfo(){const e=await this.client.getContextGroups(),t=e.map((async e=>this.client.getAllClientsInContextGroup(e.id))),n=(await Promise.all(t)).findIndex((e=>e.some((e=>{const{uuid:t,name:n}=e;return this.wire.me.uuid===t&&this.wire.me.name===n}))));return e[n]}async buildChannelObject(e){return{...e,type:\"system\",addContextListener:(...[e,t])=>{let n,i;\"function\"==typeof e?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),n=e):(n=t,\"string\"==typeof e&&(i=e));const r=(async()=>{let e=!0;const t=await this.client.getCurrentContext(i);return this.client.addContextHandler(((i,r)=>{if(!e||(e=!1,!(0,d.default)(t,i)))return n(i,r)}),i)})();return{...r,unsubscribe:()=>r.then((e=>e.unsubscribe()))}},broadcast:this.broadcast.bind(this),getCurrentContext:async e=>{const t=await this.client.getCurrentContext(e);return void 0===t?null:t}}}},e=new WeakMap,tr}ir.PrivateChannelClient=class{constructor(e,t){this.id=t,this.client=e,this.listeners=new Map}async broadcast(e){return this.client.dispatch(\"broadcast\",{context:e})}async getCurrentContext(e){return this.client.dispatch(\"getCurrentContext\",{contextType:e})}async addContextListener(e,t){if(\"function\"!=typeof t)throw new Error(\"Non-function argument passed to the second parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.\");let n;n=e?`contextHandler:invoke-${this.id}-${e}-${ar.generateId()}`:`contextHandler:invoke-${this.id}-${ar.generateId()}`,this.client.register(n,ar.wrapContextHandler(t,n));const i={unsubscribe:await this.createContextUnsubscribeCb(n)};return this.listeners.set(n,i),await this.client.dispatch(\"contextHandlerAdded\",{handlerId:n,contextType:e}),i}createNonStandardUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch(\"nonStandardHandlerRemoved\",{handlerId:e})}}createContextUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch(\"contextHandlerRemoved\",{handlerId:e})}}onAddContextListener(e){const t=`onContextHandlerAdded:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch(\"onAddContextHandlerAdded\",{handlerId:t}),n}onDisconnect(e){const t=`onDisconnect:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch(\"onDisconnectHandlerAdded\",{handlerId:t}),n}onUnsubscribe(e){const t=`onUnsubscribe:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch(\"onUnsubscribeHandlerAdded\",{handlerId:t}),n}async cleanUpAllSubs(){Array.from(this.listeners.keys()).forEach((e=>{this.client.remove(e),this.listeners.delete(e)}))}async disconnect(){try{await this.client.dispatch(\"clientDisconnecting\"),await this.cleanUpAllSubs(),await this.client.disconnect()}catch(e){throw new Error(e.message)}}},function(e){var t=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,\"__esModule\",{value:!0}),e.getIntentResolution=e.isChannel=e.isContext=e.connectPrivateChannel=e.buildAppChannelObject=e.buildPrivateChannelObject=e.ChannelError=e.ResultError=e.UnsupportedChannelApiError=e.getUnsupportedChannelApis=void 0;const n=Hi,r=ir,o=t(i);e.getUnsupportedChannelApis=e=>({addContextListener:()=>{throw new a(\"Channel.addContextListener\",e)},broadcast:()=>{throw new a(\"Channel.broadcast\",e)},getCurrentContext:()=>{throw new a(\"Channel.getCurrentContext\",e)}});class a extends Error{constructor(e,t=\"System\"){super(e),this.message=`Calling ${e} on an instance of a ${t} Channel returned by fdc3.get${t}Channels is not supported. If you would like to use a ${t} Channel, please use fdc3.joinChannel, fdc3.addContextListener, and fdc3.broadcast instead.`}}var c,d;e.UnsupportedChannelApiError=a,function(e){e.NoResultReturned=\"NoResultReturned\",e.IntentHandlerRejected=\"IntentHandlerRejected\"}(c=e.ResultError||(e.ResultError={})),(d=e.ChannelError||(e.ChannelError={})).NoChannelFound=\"NoChannelFound\",d.AccessDenied=\"AccessDenied\",d.CreationFailed=\"CreationFailed\";e.buildPrivateChannelObject=e=>{let t=!1;const n=()=>{if(t)throw new Error(\"Private Channel Client has been disconnected from the Private Channel\")};return{id:e.id,type:\"private\",broadcast:async t=>(n(),e.broadcast(t)),getCurrentContext:async t=>(n(),e.getCurrentContext(t)),addContextListener:async(t,i)=>{n();let r=i,o=t;\"function\"==typeof t&&(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),r=t,o=null);return e.addContextListener(o,r)},onAddContextListener:t=>(n(),e.onAddContextListener(t)),disconnect:async()=>(n(),t=!0,e.disconnect()),onDisconnect:t=>(n(),e.onDisconnect(t)),onUnsubscribe:t=>(n(),e.onUnsubscribe(t))}};e.buildAppChannelObject=e=>({id:e.id,type:\"app\",broadcast:e.setContext,getCurrentContext:async t=>{const n=await e.getCurrentContext(t);return void 0===n?null:n},addContextListener:(t,n)=>{let i,r;\"function\"==typeof t?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),i=t):(i=n,\"string\"==typeof t&&(r=t));const s=(async()=>{let t=!0;const n=await e.getCurrentContext(r);return e.addContextHandler(((e,r)=>{if(!t||(t=!1,!(0,o.default)(n,e)))return i(e,r)}),r)})();return{...s,unsubscribe:()=>s.then((e=>e.unsubscribe()))}}});e.connectPrivateChannel=async t=>{try{const n=await fin.InterApplicationBus.Channel.connect(t),i=new r.PrivateChannelClient(n,t);return(0,e.buildPrivateChannelObject)(i)}catch(e){throw new Error(`Private Channel with id: ${t} doesn't exist`)}};e.isContext=e=>{if(e&&\"object\"==typeof e&&\"type\"in e){const{type:t}=e;return\"string\"==typeof t}return!1};e.isChannel=e=>{if(e&&\"object\"==typeof e&&\"type\"in e&&\"id\"in e){const{type:t,id:n}=e;return\"string\"==typeof t&&\"string\"==typeof n&&(\"app\"===t||\"private\"===t)}return!1};e.getIntentResolution=async(t,i,r,o)=>{const s=(0,n.generateId)(),a=new Promise(((e,t)=>{fin.InterApplicationBus.subscribe({uuid:\"*\"},s,(t=>{e(t)})).catch((()=>t(new Error(\"getResult is not supported in this environment\"))))})),d=r?{target:r,intentResolutionResultId:s}:{intentResolutionResultId:s},h=o?{name:o,context:i,metadata:d}:{...i,metadata:d},l=async()=>{let n=await a;if(!n||\"object\"!=typeof n)throw new Error(c.NoResultReturned);const{error:i}=n;if(i)throw new Error(c.IntentHandlerRejected);if((0,e.isChannel)(n)){const{id:i,type:r}=n;switch(r){case\"private\":n=await(0,e.connectPrivateChannel)(i);break;case\"app\":{const r=await t.joinSessionContextGroup(i);n=(0,e.buildAppChannelObject)(r);break}}}else if(!(0,e.isContext)(n))throw new Error(c.NoResultReturned);return n},u=o?await t.fireIntent(h):await t.fireIntentForContext(h);return\"object\"!=typeof u?{source:{appId:\"\",instanceId:\"\"},intent:\"\",version:\"2.0\",getResult:l}:{...u,getResult:l}}}(nr);var lr,ur,pr={};function wr(){if(ur)return Ki;ur=1;var e,t,n=s&&s.__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},i=s&&s.__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)},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ki,\"__esModule\",{value:!0}),Ki.InteropClient=void 0;const o=d,a=r(qi),c=function(){if(dr)return er;dr=1,Object.defineProperty(er,\"__esModule\",{value:!0}),er.Fdc3Module=void 0;const e=Hi,t=hr();class n extends t.FDC3ModuleBase{async open(e,t){await super._open(e,t)}addContextListener(e,t){let n;return this.wire.sendAction(\"fdc3-add-context-listener\").catch((e=>{})),\"function\"==typeof e?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),n=this.client.addContextHandler(e)):n=this.client.addContextHandler(t,null===e?void 0:e),{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}addIntentListener(e,t){this.wire.sendAction(\"fdc3-add-intent-listener\").catch((e=>{}));const n=this.client.registerIntentHandler((e=>{const{context:n,metadata:i}=e,{metadata:r}=n,o=i?.intentResolutionResultId||r?.intentResolutionResultId;o&&this.fin.InterApplicationBus.publish(o,null).catch((()=>null)),t(e.context)}),e,{fdc3Version:\"1.2\"});return{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}async raiseIntent(t,n,i){this.wire.sendAction(\"fdc3-raise-intent\").catch((e=>{}));const r=i?{name:t,context:n,metadata:{target:i}}:{name:t,context:n};try{return await this.client.fireIntent(r)}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntent?\"ResolverUnavailable\":t.message;throw new Error(n)}}async findIntent(t,n){this.wire.sendAction(\"fdc3-find-intent\").catch((e=>{}));try{return await this.client.getInfoForIntent({name:t,context:n})}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntent?\"ResolverUnavailable\":t.message;throw new Error(n)}}async findIntentsByContext(t){this.wire.sendAction(\"fdc3-find-intents-by-context\").catch((e=>{}));try{return await this.client.getInfoForIntentsByContext(t)}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntentsByContext?\"ResolverUnavailable\":t.message;throw new Error(n)}}async raiseIntentForContext(t,n){this.wire.sendAction(\"fdc3-raise-intent-for-context\").catch((e=>{}));try{return await this.client.fireIntentForContext({...t,metadata:{target:n}})}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntentForContext?\"ResolverUnavailable\":t.message;throw new Error(n)}}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}getInfo(){return this.wire.sendAction(\"fdc3-get-info\").catch((e=>{})),{providerVersion:this.wire.environment.getAdapterVersionSync(),provider:`openfin-${this.wire.me.uuid}`,fdc3Version:\"1.2\"}}}return er.Fdc3Module=n,er}(),h=function(){if(lr)return pr;lr=1,Object.defineProperty(pr,\"__esModule\",{value:!0}),pr.Fdc3Module2=void 0;const e=hr(),t=Hi,n=wr(),i=nr,r=ir;class o extends e.FDC3ModuleBase{async open(e,t){return\"string\"==typeof e&&console.warn(\"Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).\"),super._open(e,t)}async findInstances(e){this.wire.sendAction(\"fdc3-find-instances\").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,\"fdc3FindInstances\",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3FindInstances?\"ResolverUnavailable\":e.message;throw new Error(n)}}async getAppMetadata(e){this.wire.sendAction(\"fdc3-get-app-metadata\").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,\"fdc3GetAppMetadata\",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3GetAppMetadata?\"ResolverUnavailable\":e.message;throw new Error(n)}}async addContextListener(e,t){this.wire.sendAction(\"fdc3-add-context-listener\").catch((e=>{}));const n=e=>t=>{const{contextMetadata:n,...i}=t,r=n?[{...i},n]:[t,null];e(...r)};let i=t,r=n(i);return\"function\"==typeof e?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),i=e,r=n(i),this.client.addContextHandler(r)):this.client.addContextHandler(r,null===e?void 0:e)}async findIntent(e,n,i){this.wire.sendAction(\"fdc3-find-intent\").catch((e=>{}));try{return await this.client.getInfoForIntent({name:e,context:n,metadata:{resultType:i}})}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntent?\"ResolverUnavailable\":e.message;throw new Error(n)}}async findIntentsByContext(e,i){this.wire.sendAction(\"fdc3-find-intents-by-context\").catch((e=>{}));const r=i?{context:e,metadata:{resultType:i}}:e;try{return await n.InteropClient.ferryFdc3Call(this.client,\"fdc3v2FindIntentsByContext\",r)}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntentsByContext?\"ResolverUnavailable\":e.message;throw new Error(n)}}async raiseIntent(e,n,r){this.wire.sendAction(\"fdc3-raise-intent\").catch((e=>{}));try{return\"string\"==typeof r&&console.warn(\"Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).\"),(0,i.getIntentResolution)(this.client,n,r,e)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?\"ResolverUnavailable\":e.message;throw new Error(n)}}async raiseIntentForContext(e,n){this.wire.sendAction(\"fdc3-raise-intent-for-context\").catch((e=>{}));try{return\"string\"==typeof n&&console.warn(\"Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).\"),(0,i.getIntentResolution)(this.client,e,n)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?\"ResolverUnavailable\":e.message;throw new Error(n)}}async addIntentListener(e,t){if(this.wire.sendAction(\"fdc3-add-intent-listener\").catch((e=>{})),\"string\"!=typeof e)throw new Error(\"First argument must be an Intent name\");return this.client.registerIntentHandler((async e=>{let n,i;const{context:r,metadata:o}=e,{contextMetadata:s,metadata:a,...c}=r,d=o?.intentResolutionResultId||a?.intentResolutionResultId;try{const e=a?{metadata:a,...c}:{...c};n=await t(e,s),i=n}catch(e){n=e,i={error:!0}}if(d&&this.fin.InterApplicationBus.publish(d,i).catch((()=>null)),n instanceof Error)throw new Error(n.message);return n}),e,{fdc3Version:\"2.0\"})}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}async createPrivateChannel(){const e=(0,t.generateId)();await n.InteropClient.ferryFdc3Call(this.client,\"createPrivateChannelProvider\",{channelId:e});const o=await this.fin.InterApplicationBus.Channel.connect(e),s=new r.PrivateChannelClient(o,e);return(0,i.buildPrivateChannelObject)(s)}async getUserChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:\"user\",...(0,i.getUnsupportedChannelApis)(\"User\")})))}async getSystemChannels(){return console.warn(\"This API has been deprecated. Please use fdc3.getUserChannels instead.\"),super.getSystemChannels()}async joinUserChannel(e){return super.joinChannel(e)}async joinChannel(e){return console.warn(\"This API has been deprecated. Please use fdc3.joinUserChannel instead.\"),super.joinChannel(e)}async getCurrentChannel(){const e=await super.getCurrentChannel();return e?{...e,type:\"user\",broadcast:this.broadcast.bind(this)}:null}async getInfo(){return n.InteropClient.ferryFdc3Call(this.client,\"fdc3v2GetInfo\",{fdc3Version:\"2.0\"})}}return pr.Fdc3Module2=o,pr}(),l=Hi;let u=class extends o.Base{constructor(i,r){super(i),e.set(this,void 0),t.set(this,void 0),n(this,t,new Map,\"f\"),n(this,e,r,\"f\")}async setContext(t){this.wire.sendAction(\"interop-client-set-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"setContext\",{context:t})}async addContextHandler(t,n){if(this.wire.sendAction(\"interop-client-add-context-handler\").catch((e=>{})),\"function\"!=typeof t)throw new Error(\"Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.\");const r=await i(this,e,\"f\");let o;o=n?`invokeContextHandler-${n}-${(0,l.generateId)()}`:\"invokeContextHandler\";const s=(0,l.wrapContextHandler)(t,o);return r.register(o,s),await r.dispatch(\"contextHandlerRegistered\",{handlerId:o,contextType:n}),{unsubscribe:async()=>{r.remove(o),await r.dispatch(\"removeContextHandler\",{handlerId:o})}}}async getContextGroups(){this.wire.sendAction(\"interop-client-get-context-groups\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getContextGroups\")}async joinContextGroup(t,n){this.wire.sendAction(\"interop-client-join-context-group\").catch((e=>{}));const r=await i(this,e,\"f\");if(!t)throw new Error(\"No contextGroupId specified for joinContextGroup.\");return r.dispatch(\"joinContextGroup\",{contextGroupId:t,target:n})}async removeFromContextGroup(t){this.wire.sendAction(\"interop-client-remove-from-context-group\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"removeFromContextGroup\",{target:t})}async getAllClientsInContextGroup(t){this.wire.sendAction(\"interop-client-get-all-clients-in-context-group\").catch((e=>{}));const n=await i(this,e,\"f\");if(!t)throw new Error(\"No contextGroupId specified for getAllClientsInContextGroup.\");return n.dispatch(\"getAllClientsInContextGroup\",{contextGroupId:t})}async getInfoForContextGroup(t){this.wire.sendAction(\"interop-client-get-info-for-context-group\").catch((e=>{}));const n=await i(this,e,\"f\");if(!t)throw new Error(\"No contextGroupId specified for getInfoForContextGroup.\");return n.dispatch(\"getInfoForContextGroup\",{contextGroupId:t})}async fireIntent(t){this.wire.sendAction(\"interop-client-fire-intent\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"fireIntent\",t)}async registerIntentHandler(t,n,r){this.wire.sendAction(\"interop-client-register-intent-handler\").catch((e=>{}));const o=await i(this,e,\"f\"),s=`intent-handler-${n}`,a=(0,l.wrapIntentHandler)(t,s);try{await o.register(s,a),await o.dispatch(\"intentHandlerRegistered\",{handlerId:s,...r})}catch(e){throw new Error(\"Unable to register intent handler\")}return{unsubscribe:async()=>{o.remove(s)}}}async getCurrentContext(t){this.wire.sendAction(\"interop-client-get-current-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getCurrentContext\",{contextType:t})}async getInfoForIntent(t){this.wire.sendAction(\"interop-client-get-info-for-intent\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getInfoForIntent\",t)}async getInfoForIntentsByContext(t){this.wire.sendAction(\"interop-client-get-info-for-intents-by-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getInfoForIntentsByContext\",t)}async fireIntentForContext(t){this.wire.sendAction(\"interop-client-fire-intent-for-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"fireIntentForContext\",t)}async joinSessionContextGroup(n){try{const r=i(this,t,\"f\").get(n);if(r)return r.getUserInstance();const o=await i(this,e,\"f\"),{hasConflict:s}=await o.dispatch(\"sessionContextGroup:createIfNeeded\",{sessionContextGroupId:n});s&&console.warn(`A (non-session) context group with the name \"${n}\" already exists. If you are trying to join a Context Group, call joinContextGroup instead.`);const c=new a.default(this.wire,i(this,e,\"f\"),n);return i(this,t,\"f\").set(n,c),c.getUserInstance()}catch(e){throw console.error(`Error thrown trying to create Session Context Group with id \"${n}\": ${e}`),e}}async onDisconnection(t){this.wire.sendAction(\"interop-client-add-ondisconnection-listener\").catch((e=>{}));return(await i(this,e,\"f\")).onDisconnection((e=>{const{uuid:n}=e;t({type:\"interop-broker\",topic:\"disconnected\",brokerName:n})}))}getFDC3Sync(e){switch(e){case\"1.2\":return new c.Fdc3Module((()=>this),this.wire);case\"2.0\":return new h.Fdc3Module2((()=>this),this.wire);default:throw new Error(`Invalid FDC3 version provided: ${e}. Must be '1.2' or '2.0'`)}}async getFDC3(e){return this.getFDC3Sync(e)}static async ferryFdc3Call(t,n,r){return(await i(t,e,\"f\")).dispatch(n,r||null)}};return Ki.InteropClient=u,e=new WeakMap,t=new WeakMap,Ki}var yr,fr,gr,mr={};function vr(){if(yr)return mr;yr=1,Object.defineProperty(mr,\"__esModule\",{value:!0}),mr.overrideCheck=mr.checkFDC32Overrides=mr.getDefaultViewFdc3VersionFromAppInfo=void 0;const e=Vi();function t(t){return[\"fdc3HandleFindInstances\",\"handleInfoForIntent\",\"handleInfoForIntentsByContext\",\"fdc3HandleGetAppMetadata\",\"fdc3HandleGetInfo\",\"fdc3HandleOpen\",\"handleFiredIntent\",\"handleFiredIntentForContext\"].filter((n=>t[n]===e.InteropBroker.prototype[n]))}return mr.getDefaultViewFdc3VersionFromAppInfo=function({manifest:e,initialOptions:t}){const n=e?.platform?.defaultViewOptions?.fdc3InteropApi??t.defaultViewOptions?.fdc3InteropApi;return[\"1.2\",\"2.0\"].includes(n??\"\")?n:void 0},mr.checkFDC32Overrides=t,mr.overrideCheck=function(e,n){if(n&&\"2.0\"===n){const n=t(e);n.length>0&&console.warn(`WARNING: FDC3 2.0 has been set as a default option for Views in this Platform, but the required InteropBroker APIs for FDC3 2.0 compliance have not all been overridden.\\nThe following APIs need to be overridden:\\n${n.join(\"\\n\")}`)}},mr}function Cr(){return gr||(gr=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),i=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),i(function(){if(fr)return Ti;fr=1;var e=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ti,\"__esModule\",{value:!0}),Ti.InteropModule=void 0;const t=e(n),i=$i,r=d,o=Vi(),a=wr(),c=vr(),h=Tn,l=e=>new e,u=\"You have attempted to use or modify InteropBroker parameters, which is not allowed. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.\";class p extends r.Base{async init(e,n=l){this.wire.sendAction(\"interop-init\").catch((()=>{}));const r=await this.wire.environment.getInteropInfo(this.wire.getFin()),s=(0,i.createUnusableObject)(u),a=(0,i.createWarningObject)(u,(0,t.default)(r)),d=async()=>{throw new Error(u)},p=o.InteropBroker.createClosedConstructor(this.wire,(()=>this.fin.InterApplicationBus.Channel.create(`interop-broker-${e}`)),r);let w;return w=Array.isArray(n)?new((0,h.overrideFromComposables)(...n)(p))(s,d,a):await n(p,s,d,a),(0,c.overrideCheck)(w,r.fdc3Version),w}connectSync(e,t){return this.wire.sendAction(\"interop-connect-sync\").catch((()=>{})),new a.InteropClient(this.wire,this.wire.environment.whenReady().then((()=>this.fin.InterApplicationBus.Channel.connect(`interop-broker-${e}`,{payload:t}))))}}return Ti.InteropModule=p,Ti}(),e),i(wr(),e),i(Vi(),e)}(Li)),Li}var br={},Ir={},Er={},xr={};Object.defineProperty(xr,\"__esModule\",{value:!0}),xr.getSnapshotSourceChannelName=void 0;xr.getSnapshotSourceChannelName=e=>`snapshot-source-provider-${e.uuid}`;var Ar,Pr,Mr,_r,Or,Sr=s&&s.__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},Rr=s&&s.__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)};Object.defineProperty(Er,\"__esModule\",{value:!0}),Er.SnapshotSource=void 0;const Fr=d,jr=xr,kr=new Map;class Lr extends Fr.Base{constructor(e,t){super(e),Ar.set(this,void 0),Pr.set(this,(()=>(kr.has(this.identity.uuid)||kr.set(this.identity.uuid,{eventFired:null,clientPromise:null}),kr.get(this.identity.uuid)))),Mr.set(this,(()=>(Rr(this,Pr,\"f\").call(this).clientPromise||(Rr(this,Pr,\"f\").call(this).clientPromise=Rr(this,_r,\"f\").call(this)),Rr(this,Pr,\"f\").call(this).clientPromise))),_r.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);try{Rr(this,Pr,\"f\").call(this).eventFired||await Rr(this,Or,\"f\").call(this);const t=await this.fin.InterApplicationBus.Channel.connect(e,{wait:!1});return t.onDisconnection((()=>{Rr(this,Pr,\"f\").call(this).clientPromise=null,Rr(this,Pr,\"f\").call(this).eventFired=null})),t}catch(e){throw Rr(this,Pr,\"f\").call(this).clientPromise=null,new Error(\"The targeted SnapshotSource is not currently initialized. Await this object's ready() method.\")}})),Or.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);let t,n;const i=new Promise(((e,i)=>{t=e,n=i}));Rr(this,Pr,\"f\").call(this).eventFired=i;const r=async i=>{try{i.channelName===e&&(t(),await this.fin.InterApplicationBus.Channel.removeListener(\"connected\",r))}catch(e){n(e)}};await this.fin.InterApplicationBus.Channel.on(\"connected\",r)})),Sr(this,Ar,t,\"f\")}get identity(){return Rr(this,Ar,\"f\")}async ready(){this.wire.sendAction(\"snapshot-source-ready\").catch((e=>{}));try{await Rr(this,Mr,\"f\").call(this)}catch(e){await Rr(this,Pr,\"f\").call(this).eventFired}}async getSnapshot(){this.wire.sendAction(\"snapshot-source-get-snapshot\").catch((e=>{}));const e=await Rr(this,Mr,\"f\").call(this),t=await e.dispatch(\"get-snapshot\");return(await t).snapshot}async applySnapshot(e){this.wire.sendAction(\"snapshot-source-apply-snapshot\").catch((e=>{}));return(await Rr(this,Mr,\"f\").call(this)).dispatch(\"apply-snapshot\",{snapshot:e})}}Er.SnapshotSource=Lr,Ar=new WeakMap,Pr=new WeakMap,Mr=new WeakMap,_r=new WeakMap,Or=new WeakMap,Object.defineProperty(Ir,\"__esModule\",{value:!0}),Ir.SnapshotSourceModule=void 0;const Tr=d,$r=Er,Br=xr;class Gr extends Tr.Base{async init(e){if(this.wire.sendAction(\"snapshot-source-init\").catch((e=>{})),\"object\"!=typeof e||\"function\"!=typeof e.getSnapshot||\"function\"!=typeof e.applySnapshot)throw new Error(\"you must pass in a valid SnapshotProvider\");const t=await this.fin.InterApplicationBus.Channel.create((0,Br.getSnapshotSourceChannelName)(this.fin.me));t.register(\"get-snapshot\",(async()=>({snapshot:await e.getSnapshot()}))),t.register(\"apply-snapshot\",(({snapshot:t})=>e.applySnapshot(t)))}wrapSync(e){return this.wire.sendAction(\"snapshot-source-wrap-sync\").catch((e=>{})),new $r.SnapshotSource(this.wire,e)}async wrap(e){return this.wire.sendAction(\"snapshot-source-wrap\").catch((e=>{})),this.wrapSync(e)}}Ir.SnapshotSourceModule=Gr,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Ir,e),n(Er,e)}(br),Object.defineProperty(a,\"__esModule\",{value:!0});var Wr=a.Fin=void 0;const Hr=t,Nr=c,Dr=ie(),Ur=Z(),Vr=de,zr=en,Kr=rn,qr=un,Jr=bn,Yr=J(),Zr=An,Qr=ki,Xr=Cr(),eo=br;class to extends Hr.EventEmitter{constructor(e){super(),this.wire=e,this.System=new Nr.System(e),this.Window=new Dr._WindowModule(e),this.Application=new Ur.ApplicationModule(e),this.InterApplicationBus=new Vr.InterApplicationBus(e),this.Clipboard=new zr.Clipboard(e),this.ExternalApplication=new Kr.ExternalApplicationModule(e),this.Frame=new qr._FrameModule(e),this.GlobalHotkey=new Jr.GlobalHotkey(e),this.Platform=new Zr.PlatformModule(e,this.InterApplicationBus.Channel),this.View=new Yr.ViewModule(e),this.Interop=new Xr.InteropModule(e),this.SnapshotSource=new eo.SnapshotSourceModule(e),e.registerFin(this),this.me=(0,Qr.getMe)(e),e.on(\"disconnected\",(()=>{this.emit(\"disconnected\")}))}}Wr=a.Fin=to;var no={},io={};function ro(e){return\"string\"==typeof e.manifestUrl}function oo(e){return ao(e)&&\"string\"==typeof e.address}function so(e){return oo(e)&&\"string\"==typeof e.token}function ao(e){return\"string\"==typeof e.uuid}function co(e){return e.runtime&&\"string\"==typeof e.runtime.version}function ho(e){return ao(e)&&co(e)}Object.defineProperty(io,\"__esModule\",{value:!0}),io.isInternalConnectConfig=io.isPortDiscoveryConfig=io.isNewConnectConfig=io.isConfigWithReceiver=io.isRemoteConfig=io.isExistingConnectConfig=io.isExternalConfig=void 0,io.isExternalConfig=ro,io.isExistingConnectConfig=oo,io.isRemoteConfig=so,io.isConfigWithReceiver=function(e){return\"object\"==typeof e.receiver&&so({...e,address:\"\"})},io.isNewConnectConfig=ho,io.isPortDiscoveryConfig=function(e){return ro(e)&&co(e)||ho(e)},io.isInternalConnectConfig=function(e){return oo(e)||ho(e)};var lo={},uo={};Object.defineProperty(uo,\"__esModule\",{value:!0}),uo.EmitterMap=void 0;const po=t;function wo(e){return Buffer.from(e).toString(\"base64\")}uo.EmitterMap=class{constructor(){this.storage=new Map}hashKeys(e){return e.map(wo).join(\"/\")}getOrCreate(e){const t=this.hashKeys(e);return this.storage.has(t)||this.storage.set(t,new po.EventEmitter),this.storage.get(t)}has(e){return this.storage.has(this.hashKeys(e))}delete(e){const t=this.hashKeys(e);return this.storage.delete(t)}},Object.defineProperty(lo,\"__esModule\",{value:!0});const yo=uo;class fo extends yo.EmitterMap{constructor(){super(...arguments),this.dispatchEvent=e=>{if(function(e){return\"process-desktop-event\"===e.action}(e)){const{payload:t}=e,n=function(e){const{topic:t}=e;if(\"frame\"===t||\"window\"===t||\"view\"===t){const{uuid:n,name:i}=e;return[t,n,i]}if(\"application\"===t){const{uuid:n}=e;return[t,n]}return[t]}(t);if(this.has(n))return this.getOrCreate(n).emit(t.type,t),!0}return!1}}}lo.default=fo;var go,mo,vo=s&&s.__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},Co=s&&s.__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)},bo=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(no,\"__esModule\",{value:!0});var Io=no.Transport=void 0;const Eo=t,xo=io,Ao=g,Po=bo(lo),Mo=ki,_o=ke;class Oo extends Eo.EventEmitter{constructor(e,t,n){super(),this.wireListeners=new Map,this.topicRefMap=new Map,this.eventAggregator=new Po.default,this.messageHandlers=[this.eventAggregator.dispatchEvent],go.set(this,void 0),mo.set(this,void 0),this.connectSync=()=>{Co(this,go,\"f\").connectSync()},this.getPort=()=>Co(this,go,\"f\").getPort(),vo(this,go,new e(this.onmessage.bind(this)),\"f\"),this.environment=t,this.sendRaw=Co(this,go,\"f\").send.bind(Co(this,go,\"f\")),this.registerMessageHandler(this.handleMessage.bind(this)),Co(this,go,\"f\").on(\"disconnected\",(()=>{for(const[,{handleNack:e}]of this.wireListeners)e({reason:\"Remote connection has closed\"});this.wireListeners.clear(),this.emit(\"disconnected\")}));const{uuid:i,name:r}=n,o=this.environment.getCurrentEntityType();this.me=(0,Mo.getBaseMe)(o,i,r)}getFin(){if(!Co(this,mo,\"f\"))throw new Error(\"No Fin object registered for this transport\");return Co(this,mo,\"f\")}registerFin(e){if(Co(this,mo,\"f\"))throw new Error(\"Fin object has already been registered for this transport\");vo(this,mo,e,\"f\")}shutdown(){return Co(this,go,\"f\").shutdown()}async connect(e){if((0,xo.isConfigWithReceiver)(e))return await Co(this,go,\"f\").connect(e.receiver),this.authorize(e);if((0,xo.isRemoteConfig)(e))return this.connectRemote(e);if((0,xo.isExistingConnectConfig)(e))return this.connectByPort(e);if((0,xo.isNewConnectConfig)(e)){const t=await this.environment.retrievePort(e);return this.connectByPort({...e,address:`ws://localhost:${t}`})}}async connectRemote(e){return await Co(this,go,\"f\").connect(new(this.environment.getWsConstructor())(e.address)),this.authorize(e)}async connectByPort(e){const{address:t,uuid:n}=e,i={...e,type:\"file-token\"},r=Co(this,go,\"f\");await r.connect(new(this.environment.getWsConstructor())(e.address));const o=await this.sendAction(\"request-external-authorization\",{uuid:n,type:\"file-token\"},!0);if(\"external-authorization-response\"!==o.action)throw new Ao.UnexpectedActionError(o.action);return await this.environment.writeToken(o.payload.file,o.payload.token),this.authorize(i)}async authorize(e){const t=await this.sendAction(\"request-authorization\",e,!0);if(\"authorization-response\"!==t.action)throw new Ao.UnexpectedActionError(t.action);if(!0!==t.payload.success)throw new Ao.RuntimeError(t.payload)}sendAction(e,t={},n=!1){let i=()=>{};const r=Ao.RuntimeError.getCallSite(1),o=this.environment.getNextMessageId(),s=new Promise(((s,a)=>{i=a;const c={action:e,payload:t,messageId:o},d=Co(this,go,\"f\");return this.addWireListener(o,s,(e=>this.nackHandler(e,a,r)),n),d.send(c).catch(a)}));return Object.assign(s,{cancel:i,messageId:o})}nackHandler(e,t,n){t(\"string\"==typeof e?e:new Ao.RuntimeError(e,n))}ferryAction(e){return new Promise(((t,n)=>{const i=this.environment.getNextMessageId();e.messageId=i;const r=e=>{t(e.payload)};return Co(this,go,\"f\").send(e).then((()=>this.addWireListener(i,r,(e=>this.nackHandler(e,n)),!1))).catch(n)}))}registerMessageHandler(e){this.messageHandlers.push(e)}addWireListener(e,t,n,i){i?this.uncorrelatedListener=t:this.wireListeners.has(e)?n({reason:\"Duplicate handler id\",error:(0,_o.errorToPOJO)(new Ao.DuplicateCorrelationError(String(e)))}):this.wireListeners.set(e,{resolve:t,handleNack:n})}onmessage(e){for(const t of this.messageHandlers)t.call(null,e)}handleMessage(e){const t=e.correlationId||NaN;if(\"correlationId\"in e){if(!this.wireListeners.has(t))return!1;{const{resolve:n,handleNack:i}=this.wireListeners.get(t);\"ack\"!==e.action?i({reason:\"Did not receive ack action\",error:(0,_o.errorToPOJO)(new Ao.NoAckError(e.action))}):\"payload\"in e?e.payload.success?n.call(null,e):i(e.payload):\"string\"==typeof e.reason?i(e):(console.warn(\"Received invalid response from core\",e),i({reason:\"invalid response shape\"})),this.wireListeners.delete(t)}}else this.uncorrelatedListener&&this.uncorrelatedListener.call(null,e),this.uncorrelatedListener=()=>{};return!0}}Io=no.Transport=Oo,go=new WeakMap,mo=new WeakMap;const So=(...e)=>({log:(...t)=>console.debug(`[${(new Date).toISOString()}]`,...(e=>e.map((e=>`[${e}]`)))(e),...t),getLogger:(...t)=>So(...e,...t)}),Ro=So(\"@openfin/core-web/client\");function Fo(e,t){if(!function(e){return\"string\"==typeof e}(e))throw new Error(`Property ${t} has invalid type. Expected string, got ${typeof e}.`)}const jo=\"web-broker-ports-ready\",ko=Ro.getLogger(\"get-web-interop-ports\");function Lo(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)}function To(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}\"function\"==typeof SuppressedError&&SuppressedError;const $o=e=>{var n,i,r;return r=class extends t.EventEmitter{constructor(t){super(),n.set(this,void 0),i.set(this,!1),this.connectSync=()=>{Lo(this,i,\"f\")||(e.addEventListener(\"message\",(e=>{e.data?.topic?.startsWith(\"wire-message\")&&e.data.message&&Lo(this,n,\"f\").call(this,{...JSON.parse(e.data.message),ports:e.ports})})),e.start())},this.connect=async()=>{this.connectSync()},this.send=t=>(e.postMessage({topic:\"wire-message\",message:JSON.stringify(t)}),Promise.resolve()),this.shutdown=async()=>{e.close()},To(this,n,t,\"f\")}getPort(){return e}},n=new WeakMap,i=new WeakMap,r};var Bo={},Go={};Object.defineProperty(Go,\"__esModule\",{value:!0}),Go.BaseEnvironment=void 0;const Wo=vr();Go.BaseEnvironment=class{async getViewWindowIdentity(e,t){const{identity:n}=await e.View.wrapSync(t).getCurrentWindow();return n}async getInteropInfo(e){const t=await e.Application.getCurrentSync().getInfo().catch((()=>null)),n=t?.initialOptions?.interopBrokerConfiguration??{};return{fdc3Version:t?(0,Wo.getDefaultViewFdc3VersionFromAppInfo)(t):void 0,...n,fdc3Info:{providerVersion:await e.System.getVersion(),provider:\"OpenFin\"}}}},Object.defineProperty(Bo,\"__esModule\",{value:!0});var Ho=Bo.BrowserEnvironment=void 0;const No=Go;class Do extends No.BaseEnvironment{constructor(){super(...arguments),this.type=\"other\",this.getRandomId=()=>{const e=new Uint32Array(1);return window.crypto.getRandomValues(e)[0].toString(32)}}getAdapterVersionSync(){return\"\"}observeBounds(e,t){throw new Error(\"Method not implemented.\")}layoutAllowedInContext(e){return!1}initLayoutManager(e,t,n){throw new Error(\"Method not implemented.\")}applyLayoutSnapshot(e,t,n){throw new Error(\"Method not implemented.\")}createLayout(e,t){throw new Error(\"Method not implemented.\")}destroyLayout(e,t){throw new Error(\"Method not implemented.\")}resolveLayout(e,t){throw new Error(\"Method not implemented.\")}initPlatform(...e){throw new Error(\"Method not implemented.\")}writeToken(e,t){return Promise.resolve(\"\")}retrievePort(e){throw new Error(\"Method not implemented.\")}getNextMessageId(){return this.getRandomId()}createChildContent(e){throw new Error(\"Method not implemented.\")}getWebWindow(e){throw new Error(\"Method not implemented.\")}getCurrentEntityIdentity(){throw new Error(\"Method not implemented.\")}getCurrentEntityType(){return\"external connection\"}raiseEvent(e,t){throw new Error(\"Method not implemented.\")}getUrl(){return location.href}getDefaultChannelOptions(){return{create:{},connect:{}}}getRtcPeer(){return new RTCPeerConnection}getWsConstructor(){return WebSocket}whenReady(){return Promise.resolve()}}Ho=Bo.BrowserEnvironment=Do;const Uo=e=>\"platform\"in e&&void 0!==e.platform;var Vo,zo;class Ko extends Ho{constructor(e){super(),this.connectConfig=e,Vo.set(this,void 0),zo.set(this,new W((async()=>Promise.resolve().then((function(){return require(\"./main-b14f67c9.js\")}))))),Uo(e)&&this.validatePlatformOptions(e)}getAdapterVersionSync(){return\"0.39.21\"}validatePlatformOptions({platform:e}){if(!(\"layoutSnapshot\"in e))throw new Error(\"Platform options are missing layoutSnapshot. Please provide a layoutSnapshot in the platform options.\");if(\"windows\"in e||\"windows\"in e.layoutSnapshot)throw new Error(\"It appears you tried to call connect() with a snapshot object from an OpenFin desktop environment. Note that connect() expects to be called with a platform property with this structure: { platform: { layoutSnapshot } }. To get a layoutSnapshot of the expected structure, use fin.Platform.Layout.getCurrentLayoutManagerSync().getLayoutSnapshot() in v34+ in your desktop environment.\");const{layouts:t}=e.layoutSnapshot;Object.entries(t).map((([e,t])=>{if(\"object\"!=typeof t||null===t)throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must be an object.`);if(!(\"content\"in t))throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must contain a 'content' property.`)}))}async getInteropInfo(e){return{...{contextGroups:void 0,logging:{beforeAction:{enabled:!1},afterAction:{enabled:!1}}},fdc3Version:void 0,fdc3Info:{providerVersion:\"0.39.21\",provider:\"OpenFin Web\"}}}layoutAllowedInContext(e){return!0}async initLayoutManager(e,t,n){if(Lo(this,Vo,\"f\"))throw new Error(\"Layout already initialized.\");if(!Uo(this.connectConfig))throw new Error(\"Platform options are missing from connection config.\");const{WebLayoutEntryPoint:i}=await Lo(this,zo,\"f\").getValue();return To(this,Vo,new i(this.connectConfig),\"f\"),await Lo(this,Vo,\"f\").initLayoutManager(e,t,n)}async applyLayoutSnapshot(e,t,n){Lo(this,Vo,\"f\")?.applyLayoutSnapshot(e,t,n)}async createLayout(e,t){return Lo(this,Vo,\"f\")?.createLayout(e,t)}async destroyLayout(e,t){return Lo(this,Vo,\"f\")?.destroyLayout(e,t)}async getViewWindowIdentity(e,t){return Promise.resolve({uuid:t.uuid,name:t.uuid})}}Vo=new WeakMap,zo=new WeakMap;const qo=()=>{const e=((e,t)=>{const n=new RegExp(`^${t}<(?.*)>$`).exec(e)?.groups?.meta;if(n)try{return JSON.parse(atob(n))}catch(e){throw new Error(`Failed to decode JSON from ${n}.`)}})(window.name,\"of-frame\");if(e)try{const{name:t,uuid:n,brokerUrl:i,providerId:r,contextGroup:o}=e;return Fo(i,\"brokerUrl\"),Fo(n,\"uuid\"),Fo(t,\"name\"),{identity:{name:t,uuid:n},brokerUrl:i,interopConfig:{providerId:r,currentContextGroup:o}}}catch(e){throw new Error(`Unexpected error occurred when inferring platform information: ${e.stack}`)}},Jo=()=>{const e=r.v4();return{uuid:e,name:e}},Yo=async e=>{if(\"enabled\"===e.connectionInheritance){const t=await(async e=>{const t=qo();if(t){const{validateOptions:n=(()=>!0)}=e,{identity:i,...r}=t;if(!await n(r))throw new Error(\"Parent options were rejected by validateOptions.\");return t}})(e);if(t)return t}if(!e.options){const t=\"enabled\"===e.connectionInheritance?\"Broker URL was not specified nor provided by a platform container.\":\"Connection inheritance is disabled but no options were provided.\";throw new Error(t)}return{...e.options,identity:Jo()}};exports.__classPrivateFieldGet=Lo,exports.__classPrivateFieldSet=To,exports.apiExposer=Gn,exports.commonjsGlobal=s,exports.connect=async t=>{try{Ro.log(\"Establishing connection\",t);const{brokerUrl:n,identity:i,timeout:r,interopConfig:s}=await Yo(t),{workerPort:a,iframeBrokerPort:c}=await(async(e,t,n)=>{const{origin:i}=new URL(e),r=document.createElement(\"IFRAME\");let s;r.style.display=\"none\";try{return await new Promise(((a,c)=>{const d=e=>{if(e.source===r.contentWindow&&e.data?.topic===`ack-${jo}`){if(e.origin!==i)c(new Error(`Broker redirected to unexpected origin ${e.origin}, expected ${i}.`));else if(e.data.success){const[t,n]=e.ports;a({iframeBrokerPort:t,workerPort:n})}else c(new m(e.data));window.removeEventListener(\"message\",d),clearTimeout(s)}};window.addEventListener(\"message\",d),ko.log(`Connecting to broker ${e}`),r.setAttribute(\"src\",e),r.setAttribute(\"name\",o(t,\"of-broker\")),document.body.appendChild(r),ko.log(\"Iframe loaded, awaiting init message from iframe\"),n&&(s=setTimeout((()=>{window.removeEventListener(\"message\",d),document.body.removeChild(r),c(new Error(\"Worker did not initialize in time\"))}),n))}))}catch(e){throw new Error(`Failed to initialise Fin Web Client. ${e.message}`,{cause:e})}})(n,i,r);Ro.log(\"Successfully established connection to shared worker\");const d={entityType:\"external connection\",...i};a.start(),c.start();const h=((t,n,i)=>{const r=$o(n),o=new Ko(t),s=new Io(r,o,i);return s.connectSync(),window.Buffer=e.Buffer,new Wr(s)})(t,a,d);return s?.providerId&&(h.me.interop=h.Interop.connectSync(s.providerId),s?.currentContextGroup&&h.me.interop.joinContextGroup(s.currentContextGroup).catch((e=>{console.warn(`Error joining specified context group: ${s?.currentContextGroup}, continuing`,e)}))),{...h,me:{...h.me,identity:{uuid:h.me.uuid,name:h.me.name}}}}catch(e){throw new Error(`An error occured during web-interop connection: ${e.message}`)}},exports.decorators=Nn,exports.encodeOptions=o,exports.layout_constants=ai,exports.lazy=G;\n","\"use strict\";var t=require(\"./main-8cad4070.js\"),e=require(\"uuid\");require(\"buffer/\"),require(\"events\"),require(\"lodash/cloneDeep\"),require(\"lodash/isEqual\");var i={},n={};Object.defineProperty(n,\"__esModule\",{value:!0}),n.mapValuesAsync=n.mapEntriesAsync=void 0;const o=(t,[e,i])=>({...t,[e]:i});async function s(t,e){return(await Promise.all(e.map((async([e,i])=>[e,await t(i,e)])))).reduce(o,{})}n.mapEntriesAsync=s,n.mapValuesAsync=async function(t,e){let i;return i=e instanceof Map?[...e.entries()]:Object.entries(e),s(t,i)};var r,a,l,h,d=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldSet||function(t,e,i,n,o){if(\"m\"===n)throw new TypeError(\"Private method is not writable\");if(\"a\"===n&&!o)throw new TypeError(\"Private accessor was defined without a setter\");if(\"function\"==typeof e?t!==e||!o:!e.has(t))throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");return\"a\"===n?o.call(t,i):o?o.value=i:e.set(t,i),i},c=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldGet||function(t,e,i,n){if(\"a\"===i&&!n)throw new TypeError(\"Private accessor was defined without a getter\");if(\"function\"==typeof e?t!==e||!n:!e.has(t))throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");return\"m\"===i?n:\"a\"===i?n.call(t):n?n.value:e.get(t)};Object.defineProperty(i,\"__esModule\",{value:!0});var m=i.DefaultLayoutManager=void 0;const u=n;class p{constructor(t){a.set(this,void 0),l.set(this,new Map),d(this,a,t,\"f\")}size(){return c(this,l,\"f\").size}async applyLayoutSnapshot({layouts:t}){if(Object.keys(t).length>1)throw new Error(\"[LayoutManager] Tried to call applyLayoutSnapshot with more than 1 layout. When implementing multiple layouts via overridden LayoutManager class, you must override and fully implement the applyLayoutSnapshot method without calling super.applyLayoutSnapshot().\");const[[e,i]]=Object.entries(t);await p.createLayout(this,{layoutName:e,layout:i})}async showLayout({layoutName:t}){}async getLayoutSnapshot(){return{layouts:await(0,u.mapValuesAsync)((t=>t.getFrameSnapshot()),c(this,l,\"f\"))}}async removeLayout({layoutName:t}){}getLayoutIdentityForView(t){const e=[...c(this,l,\"f\").values()].find((e=>e.getCurrentViews().some((e=>e.name===t.name&&e.uuid===t.uuid))));return e?.identity??void 0}isLayoutVisible({layoutName:t}){return c(p,r,\"m\",h).call(p,this,t).isVisible()}resolveLayoutIdentity(t){if(t&&\"layoutName\"in t)return t;const e=[...c(this,l,\"f\").values()];if(1===e.length)return e[0].identity;const i=e.find((t=>t.isVisible()));return i?.identity??void 0}static async resolveLayout(t,e){const i=t.resolveLayoutIdentity(e);if(void 0===i||!(\"layoutName\"in i))throw new Error(\"[layout-manager] resolveLayout: Could not resolve the layout identity. Make sure you include 'layoutName' in the identity object.\");return c(p,r,\"m\",h).call(p,t,i.layoutName)}static async handleSharedView(t,e,i){await(0,u.mapValuesAsync)((async t=>{if(t.identity.layoutName!==e.layoutName){const e=t.getCurrentViews().find((t=>t.name===i.name));e&&await t.onViewDetached({viewIdentity:e,target:null}).catch(console.error)}}),c(t,l,\"f\"))}static async handleLastViewRemoved(t,e){await t.removeLayout(e),await c(t,a,\"f\").handleLastViewRemoved(t)}static async destroyLayout(t,{layoutName:e}){await c(p,r,\"m\",h).call(p,t,e).destroy(),c(t,l,\"f\").delete(e)}static async createLayout(t,e){const{layoutName:i}=e;if(c(t,l,\"f\").has(i))throw new Error(`Layout name ${i} already exists`);await c(t,a,\"f\").createLayout(e,t)}static registerLayout(t,e,i){c(t,l,\"f\").set(e,i)}static getAllLayouts(t){return[...c(t,l,\"f\").values()]}static setInitialSnapshot(t,e){c(t,a,\"f\").setInitialSnapshot(e)}static createClosedConstructor(...t){return class extends p{constructor(){super(...t)}}}}m=i.DefaultLayoutManager=p,r=p,a=new WeakMap,l=new WeakMap,h=function(t,e){const i=c(t,l,\"f\").get(e);if(!i)throw new Error(`[layout-manager] getLayoutByName: Could not locate layout with name '${e}'`);return i};var g={},f={},v={};Object.defineProperty(v,\"__esModule\",{value:!0}),v.ReversibleMap=void 0;v.ReversibleMap=class{constructor(){this.valueToKey=new Map,this.keyToValue=new Map,this.setUnique=(t,e)=>{if(this.hasKey(t)||this.hasValue(e))throw new Error(\"Key or value already in the map.\");this.keyToValue.set(t,e),this.valueToKey.set(e,t)},this.getKey=t=>{const e=this.valueToKey.get(t);if(!e)throw new Error(\"Value not found in the map.\");return e},this.deleteKey=t=>{const e=this.getValue(t);return this.keyToValue.delete(t),this.valueToKey.delete(e),e},this.deleteValue=t=>{const e=this.getKey(t);return this.keyToValue.delete(e),this.valueToKey.delete(t),e},this.hasKey=t=>this.keyToValue.has(t),this.hasValue=t=>this.valueToKey.has(t)}getValue(t){const e=this.keyToValue.get(t);if(!e)throw new Error(\"Key not found in the map.\");return e}},Object.defineProperty(f,\"__esModule\",{value:!0});var _=f.LayoutContentCache=void 0;const y=t.lazy,C=v;class w{constructor(){this.contentItemCache=new C.ReversibleMap,this.contentItemCacheId=0,this.createCacheKey=()=>{const t=`entity-${this.contentItemCacheId.toString()}`;return this.contentItemCacheId+=1,t},this.hasKey=t=>this.contentItemCache.hasKey(t),this.getItemOrUndefined=t=>{try{return this.getContentItemOrThrow(t)}catch(t){return}},this.getContentItemOrThrow=(t,e)=>{if(!this.contentItemCache.hasKey(t))throw new Error(\"Layout component has been destroyed or detached from the current layout.\");const i=this.contentItemCache.getValue(t);if(e&&!e.includes(i.type))throw new Error(`Layout item is not the expected type. Expected ${e.join(\", \")}, got ${i.type}.`);return i},this.getOrCreateEntityId=t=>{if(this.contentItemCache.hasValue(t))return this.contentItemCache.getKey(t);t.onDestroyed((()=>{this.contentItemCache.deleteValue(t)}));const e=this.createCacheKey();return this.contentItemCache.setUnique(e,t),e}}static getSingleInstance(){return w.singleton.getValue()}}_=f.LayoutContentCache=w,w.singleton=new y.Lazy((()=>new w));var I={},b={};!function(t){Object.defineProperty(t,\"__esModule\",{value:!0}),t.getAdjacentStacks=t.doShareEdge=t.getAdjacentItem=void 0;t.getAdjacentItem=(e,i)=>{const{parent:n}=e;if(e.isRoot()||!n)return;const o=[\"top\",\"bottom\"].includes(i)?\"column\":\"row\",s=[\"top\",\"left\"].includes(i)?-1:1;if(n.type===o){const t=n.contentItems.indexOf(e)+s;if(t>=0&&t{const n=t.getBounds(),o=e.getBounds();if(!n||!o)return!1;if([\"top\",\"bottom\"].includes(i)){return!(n.righto.right)}return!(n.bottomo.bottom)};t.getAdjacentStacks=(e,i)=>{const n=[\"top\",\"bottom\"].includes(i)?\"row\":\"column\",o=s=>\"stack\"===s.type?(0,t.doShareEdge)(e,s,i)?[s]:[]:\"root\"===s.type||\"ground\"===s.type?[]:s.type===n?s.contentItems.map((t=>o(t))).flat():s.type!==n?[\"top\",\"right\"].includes(i)?o(s.contentItems[s.contentItems.length-1]):o(s.contentItems[0]):[],s=(0,t.getAdjacentItem)(e,i);return s?o(s):[]}}(b);var S=t.commonjsGlobal&&t.commonjsGlobal.__decorate||function(t,e,i,n){var o,s=arguments.length,r=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if(\"object\"==typeof Reflect&&\"function\"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(s<3?o(r):s>3?o(e,i,r):o(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};Object.defineProperty(I,\"__esModule\",{value:!0}),I.LayoutEntitiesController=void 0;const E=t.decorators,x=b,L=i;class z{constructor(t,e,i){this.wire=t,this.layoutManager=e,this.layoutContentCache=i,this.analytics=t=>{this.wire.sendAction(`layout-controller-${t}`).catch((()=>{}))},this.getLayoutIdentityForViewOrThrow=async t=>{const e=this.layoutManager.getLayoutIdentityForView(t);if(!e)throw new Error(`View identity ${t.name} is not attached to any layouts.`);return e},this.getRoot=async t=>{this.analytics(\"get-root\");const e=(await this.getLayout(t)).getRoot();return{type:e.type,entityId:this.layoutContentCache.getOrCreateEntityId(e)}},this.getStackByView=async t=>{this.analytics(\"get-stack-by-view\");const e=await this.getLayoutIdentityForViewOrThrow(t),i=(await this.getLayout(e)).getStackByView(t);if(\"stack\"===i?.type)return{entityId:this.layoutContentCache.getOrCreateEntityId(i),type:\"stack\"}},this.getStackViews=t=>{this.analytics(\"get-stack-views\");return this.layoutContentCache.getContentItemOrThrow(t,[\"stack\"]).contentItems.map((t=>({name:t.viewName,uuid:this.wire.me.uuid})))},this.isRoot=t=>{this.analytics(\"is-root\");return this.layoutContentCache.getContentItemOrThrow(t).isRoot()},this.exists=t=>(this.analytics(\"exists\"),this.layoutContentCache.hasKey(t)),this.addViewToStack=async(t,e,{index:i}={index:0})=>{this.analytics(\"add-view-to-stack\");const n=this.layoutContentCache.getContentItemOrThrow(t);if(i&&i>n.contentItems.length+1)throw new Error(`Index '${i}' out of range, please exclude the index or specify a number between 0 and ${n.contentItems.length}`);const o={id:t,index:i},{identity:s}=await n.layout.platformCreateView(e,{location:o});return s},this.findViewInStack=(t,e)=>t.contentItems.find((t=>t.viewName===e.name)),this.removeViewFromStack=async(t,e)=>{this.analytics(\"remove-view-from-stack\");const i=this.layoutContentCache.getContentItemOrThrow(t,[\"stack\"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to remove a view ('${e.name}') which does not belong to the stack.`);await n.layout.platformCloseView(e)},this.createAdjacentStack=async(t,e,{position:i=\"right\"}={})=>{if(this.analytics(\"create-adjacent-stack\"),!Array.isArray(e)||0===e.length)throw new Error('The parameter \"views\" must be an array with at least 1 element.');if(![\"top\",\"bottom\",\"left\",\"right\"].includes(i))throw new Error(`Invalid position '${i}' specified.`);const n=this.layoutContentCache.getContentItemOrThrow(t).createAdjacentStack({position:i}),o=this.layoutContentCache.getOrCreateEntityId(n);return await Promise.all(e.reverse().map((t=>this.addViewToStack(o,t)))),o},this.getAdjacentStacks=async({targetId:t,edge:e})=>{this.analytics(\"get-adjacent-stacks\");const i=this.layoutContentCache.getContentItemOrThrow(t);return(0,x.getAdjacentStacks)(i,e).map((t=>({entityId:this.layoutContentCache.getOrCreateEntityId(t)})))},this.setStackActiveView=async(t,e)=>{this.analytics(\"set-stack-active-view\");const i=this.layoutContentCache.getContentItemOrThrow(t,[\"stack\"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to set a view ('${e.name}') as active when it does not belong to the stack.`);i.setActiveContentItem(n,!0)}}async getLayout(t){const e=await L.DefaultLayoutManager.resolveLayout(this.layoutManager,t);if(!e)throw new Error(`Could not resolve target layout identity ${JSON.stringify(t)}`);return e}getContent(t){this.analytics(\"get-content\");return this.layoutContentCache.getContentItemOrThrow(t,[\"column\",\"row\"]).contentItems.map((t=>({type:t.type,entityId:this.layoutContentCache.getOrCreateEntityId(t)})))}getParent(t){this.analytics(\"get-parent\");const e=this.layoutContentCache.getContentItemOrThrow(t);if(!e.isRoot())return e.parent?.contentItems.includes(e)?{type:e.parent.type,entityId:this.layoutContentCache.getOrCreateEntityId(e.parent)}:void 0}}S([(0,E.expose)()],z.prototype,\"getLayoutIdentityForViewOrThrow\",void 0),S([(0,E.expose)()],z.prototype,\"getRoot\",void 0),S([(0,E.expose)()],z.prototype,\"getStackByView\",void 0),S([(0,E.expose)()],z.prototype,\"getStackViews\",void 0),S([(0,E.expose)()],z.prototype,\"getContent\",null),S([(0,E.expose)()],z.prototype,\"getParent\",null),S([(0,E.expose)()],z.prototype,\"isRoot\",void 0),S([(0,E.expose)()],z.prototype,\"exists\",void 0),S([(0,E.expose)()],z.prototype,\"addViewToStack\",void 0),S([(0,E.expose)()],z.prototype,\"removeViewFromStack\",void 0),S([(0,E.expose)()],z.prototype,\"createAdjacentStack\",void 0),S([(0,E.expose)()],z.prototype,\"getAdjacentStacks\",void 0),S([(0,E.expose)()],z.prototype,\"setStackActiveView\",void 0),I.LayoutEntitiesController=z,Object.defineProperty(g,\"__esModule\",{value:!0});var M=g.initLayoutEndpoints=void 0;const P=t.apiExposer,T=t.layout_constants,A=f,k=I,D=i;M=g.initLayoutEndpoints=async function(t,e){const i=t.getFin(),n=await i.Platform.getCurrentSync().getClient(),o=new P.ChannelsExposer(n);await new P.ApiExposer(o).exposeInstance(new k.LayoutEntitiesController(t,e,A.LayoutContentCache.getSingleInstance()),{id:T.LAYOUT_CONTROLLER_ID}),await async function(t,e){const i=t=>async i=>{const n=await D.DefaultLayoutManager.resolveLayout(e,i.target);if(!n)throw new Error(`Could not resolve the layout target from payload ${JSON.stringify(i)}`);return t(n,i)},n=(e,n)=>{t.register(e,i(n))},o=(t,e)=>{n(t,e)};n(\"replace-view\",((t,e)=>t.replaceView(e))),n(\"replace-layout\",((t,{layout:e})=>t.replaceLayout(e))),n(\"add-view\",((t,e)=>t.insertView(e))),o(\"layout-add-view\",((t,{viewOptions:e,location:i,targetView:n})=>t.platformCreateView(e,{location:i,targetView:n}))),n(\"close-view\",((t,e)=>t.cleanupView(e.viewIdentity))),o(\"layout-close-view\",((t,e)=>t.platformCloseView(e.viewIdentity))),n(\"apply-preset-layout\",((t,e)=>t.applyPreset(e))),n(\"get-layout-views\",(t=>t.getCurrentViews())),n(\"get-frame-snapshot\",(t=>t.getFrameSnapshot())),n(\"is-visible\",(t=>t.isVisible())),n(\"destroy\",(t=>t.destroy())),t.register(\"get-layout-snapshot\",(()=>e.getLayoutSnapshot()))}(n,e)};var R={};Object.defineProperty(R,\"__esModule\",{value:!0});var U=R.BaseLayout=void 0;U=R.BaseLayout=class{};var O={};Object.defineProperty(O,\"__esModule\",{value:!0});var V=O.DOMEmitter=void 0;V=O.DOMEmitter=class{constructor(t){this.container=t}dispatchLocalEvent(t,e){const i={...e,type:t,tabSelector:`tab-${e.name}`,containerSelector:`container-${e.name}`,topic:\"openfin-DOM-event\"};this.container.dispatchEvent(new CustomEvent(t,{detail:i}))}};var B={};Object.defineProperty(B,\"__esModule\",{value:!0});var H=B.mapLayoutContentItemsImmutableSync=B.mapLayoutContentItemsImmutable=W=B.isVisible=void 0;var W=B.isVisible=t=>(0!==t.offsetWidth||0!==t.offsetHeight)&&\"hidden\"!==window.getComputedStyle(t).visibility&&t.offsetTop>=0&&t.offsetLeft>=0&&t.offsetTop<=window.innerHeight&&t.offsetLeft<=window.innerWidth;const F=t=>\"type\"in t&&\"component\"===t.type;B.mapLayoutContentItemsImmutable=async function t(e,i){return F(i)?e(i):{...i,content:await Promise.all(i.content?.map((i=>t(e,i))))}},H=B.mapLayoutContentItemsImmutableSync=function t(e,i){return F(i)?e(i):{...i,content:i.content?.map((i=>t(e,i)))}};class N extends Error{constructor(t,e){super(e),this.type=t}}class G extends N{constructor(t,e){super(\"Configuration\",t),this.node=e}}class j extends N{constructor(t){super(\"PopoutBlocked\",t)}}class $ extends N{constructor(t){super(\"API\",t)}}class Z extends N{constructor(t){super(\"Bind\",t)}}class q extends Error{constructor(t,e,i){super(`${t}: ${e}${void 0===i?\"\":\": \"+i}`)}}class X extends q{constructor(t,e){super(\"Assert\",t,e)}}class Y extends q{constructor(t,e,i){super(\"UnreachableCase\",t,`${e}${void 0===i?\"\":\": \"+i}`)}}class K extends q{constructor(t,e){super(\"UnexpectedNull\",t,e)}}class J extends q{constructor(t,e){super(\"UnexpectedUndefined\",t,e)}}var Q;!function(t){let e=!1;const i={PopoutCannotBeCreatedWithGroundItemConfig:{id:0,default:\"Popout cannot be created with ground ItemConfig\"},PleaseRegisterAConstructorFunction:{id:1,default:\"Please register a constructor function\"},ComponentTypeNotRegisteredAndBindComponentEventHandlerNotAssigned:{id:2,default:\"Component type not registered and BindComponentEvent handler not assigned\"},ComponentIsAlreadyRegistered:{id:3,default:\"Component is already registered\"},ComponentIsNotVirtuable:{id:4,default:\"Component is not virtuable. Requires rootHtmlElement field/getter\"},VirtualComponentDoesNotHaveRootHtmlElement:{id:5,default:'Virtual component does not have getter \"rootHtmlElement\"'},ItemConfigIsNotTypeComponent:{id:6,default:\"ItemConfig is not of type component\"},InvalidNumberPartInSizeString:{id:7,default:\"Invalid number part in size string\"},UnknownUnitInSizeString:{id:8,default:\"Unknown unit in size string\"},UnsupportedUnitInSizeString:{id:9,default:\"Unsupported unit in size string\"}};t.idCount=Object.keys(i).length;const n=Object.values(i);t.checkInitialise=function(){if(!e)for(let e=0;e=\"0\"&&t<=\"9\"}function Tt(t,e){const i=zt(e);t.style.width=i}function At(t,e){const i=zt(e);t.style.height=i}function kt(t){return{width:t.offsetWidth,height:t.offsetHeight}}function Dt(t,e){t.style.display=e?\"\":\"none\"}function Rt(t,e){if(void 0!==e)for(const i in e)if(e.hasOwnProperty(i)){const n=e[i],o=t[i];t[i]=Ut(o,n)}return t}function Ut(t,e){if(\"object\"!=typeof e)return e;if(Array.isArray(e)){const t=e.length,i=new Array(t);for(let n=0;n36)throw new Error(\"Too many keys in config minifier map\")},t.translateObject=n}(dt||(dt={})),function(t){t.defaults={type:at.ground,content:[],size:1,sizeUnit:ht.Fractional,minSize:void 0,minSizeUnit:ht.Pixel,id:\"\",isClosable:!0},t.createCopy=function(t,e){switch(t.type){case at.ground:case at.row:case at.column:return gt.createCopy(t,e);case at.stack:return ut.createCopy(t,e);case at.component:return pt.createCopy(t);default:throw new Y(\"CICC91354\",t.type,\"Invalid Config Item type specified\")}},t.createDefault=function(t){switch(t){case at.ground:throw new X(\"CICCDR91562\");case at.row:case at.column:return gt.createDefault(t);case at.stack:return ut.createDefault();case at.component:return pt.createDefault();default:throw new Y(\"CICCDD91563\",t,\"Invalid Config Item type specified\")}},t.isComponentItem=function(t){return t.type===at.component},t.isStackItem=function(t){return t.type===at.stack},t.isGroundItem=function(t){return t.type===at.ground}}(ct||(ct={})),function(t){t.defaultMaximised=!1,function(t){t.createCopy=function(t,e){return void 0===t?void 0:{show:null!=e?e:t.show,popout:t.popout,close:t.close,maximise:t.maximise,minimise:t.minimise,tabDropdown:t.tabDropdown}}}(t.Header||(t.Header={}))}(mt||(mt={})),function(t){function e(t){const e=t.length,i=new Array(e);for(let n=0;n\"__glMaximised\"===t));t>0&&(o=!0,n=n.splice(t,1)),e=n.length>0?n[0]:ct.defaults.id}else e=n;return i=void 0!==t.maximised?t.maximised:o,{id:e,maximised:i}}}(wt||(wt={})),function(t){function e(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0;return{resolved:!0,root:Et.resolve(i),openPopouts:t.resolveOpenPopouts(e.openPopouts),dimensions:t.Dimensions.resolve(e.dimensions),settings:t.Settings.resolve(e.settings),header:t.Header.resolve(e.header,e.settings,e.labels)}}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:Lt.fromResolvedArray(e.openPopouts),settings:_t.Settings.createCopy(e.settings),dimensions:t.Dimensions.fromResolved(e.dimensions),header:_t.Header.createCopy(e.header)}},t.isResolved=function(t){const e=t;return void 0!==e.resolved&&!0===e.resolved},t.resolveOpenPopouts=function(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0,{root:Et.resolve(o),openPopouts:xt.resolveOpenPopouts(e.openPopouts),dimensions:xt.Dimensions.resolve(e.dimensions),settings:xt.Settings.resolve(e.settings),header:xt.Header.resolve(e.header,e.settings,e.labels),parentId:null!==(i=e.parentId)&&void 0!==i?i:null,indexInParent:null!==(n=e.indexInParent)&&void 0!==n?n:null,window:t.Window.resolve(e.window,e.dimensions),resolved:!0}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:i(e.openPopouts),dimensions:xt.Dimensions.fromResolved(e.dimensions),settings:_t.Settings.createCopy(e.settings),header:_t.Header.createCopy(e.header),parentId:e.parentId,indexInParent:e.indexInParent,window:t.Window.fromResolved(e.window)}},t.fromResolvedArray=i}(Lt||(Lt={}));class Wt{constructor(){this._allEventSubscriptions=[],this._subscriptionsMap=new Map,this.unbind=this.removeEventListener,this.trigger=this.emit}tryBubbleEvent(t,e){}emit(t,...e){let i=this._subscriptionsMap.get(t);if(void 0!==i){i=i.slice();for(let t=0;t0){const n=e.slice();n.unshift(t);const o=this._allEventSubscriptions.slice();for(let t=0;t0?n.contentItems[0]:n,e=0);const o=this._layoutManager.createAndInitContentItem(i,t);t.addChild(o,e),this._layoutManager.layoutConfig.settings.popInOnClose?this._onClose():this.close()}createWindow(){const t=this.createUrl(),e=Math.floor(1e6*Math.random()).toString(36),i=this.serializeWindowFeatures({width:this._initialWindowSize.width,height:this._initialWindowSize.height,innerWidth:this._initialWindowSize.width,innerHeight:this._initialWindowSize.height,menubar:\"no\",toolbar:\"no\",location:\"no\",personalbar:\"no\",resizable:\"yes\",scrollbars:\"no\",status:\"no\"});if(this._popoutWindow=globalThis.open(t,e,i),this._popoutWindow)this._popoutWindow.addEventListener(\"load\",(()=>this.positionWindow()),{passive:!0}),this._popoutWindow.addEventListener(\"beforeunload\",(()=>{this._layoutManager.layoutConfig.settings.popInOnClose?this.popIn():this._onClose()}),{passive:!0}),this._checkReadyInterval=setInterval((()=>this.checkReady()),10);else if(!0===this._layoutManager.layoutConfig.settings.blockedPopoutsThrowError){throw new j(\"Popout blocked\")}}checkReady(){if(null===this._popoutWindow)throw new K(\"BPCR01844\");this._popoutWindow.__glInstance&&this._popoutWindow.__glInstance.isInitialised&&(this.onInitialised(),void 0!==this._checkReadyInterval&&(clearInterval(this._checkReadyInterval),this._checkReadyInterval=void 0))}serializeWindowFeatures(t){const e=[];for(const i in t)e.push(i+\"=\"+t[i].toString());return e.join(\",\")}createUrl(){const t=\"gl-window-config-\"+Ot(),e=_t.minifyConfig(this._config);try{localStorage.setItem(t,JSON.stringify(e))}catch(t){throw new Error(\"Error while writing to localStorage \"+function(t){return t instanceof Error?t.message:\"string\"==typeof t?t:\"Unknown Error\"}(t))}const i=new URL(location.href);return i.searchParams.set(\"gl-window\",t),i.toString()}positionWindow(){if(null===this._popoutWindow)throw new Error(\"BrowserPopout.positionWindow: null popoutWindow\");this._popoutWindow.moveTo(this._initialWindowSize.left,this._initialWindowSize.top),this._popoutWindow.focus()}onInitialised(){this._isInitialised=!0,this.getGlInstance().on(\"popIn\",(()=>this.popIn())),this.emit(\"initialised\")}_onClose(){setTimeout((()=>this.emit(\"closed\")),50)}}class Gt extends Wt{constructor(t,e,i,n){super(),this.layoutManager=t,this._parent=i,this._element=n,this._popInParentIds=[],this._type=e.type,this._id=e.id,this._isInitialised=!1,this.isGround=!1,this.isRow=!1,this.isColumn=!1,this.isStack=!1,this.isComponent=!1,this.size=e.size,this.sizeUnit=e.sizeUnit,this.minSize=e.minSize,this.minSizeUnit=e.minSizeUnit,this._isClosable=e.isClosable,this._pendingEventPropagations={},this._throttledEvents=[\"stateChanged\"],this._contentItems=this.createContentItems(e.content)}get type(){return this._type}get id(){return this._id}set id(t){this._id=t}get popInParentIds(){return this._popInParentIds}get parent(){return this._parent}get contentItems(){return this._contentItems}get isClosable(){return this._isClosable}get element(){return this._element}get isInitialised(){return this._isInitialised}static isStack(t){return t.isStack}static isComponentItem(t){return t.isComponent}static isComponentParentableItem(t){return t.isStack||t.isGround}removeChild(t,e=!1){const i=this._contentItems.indexOf(t);if(-1===i)throw new Error(\"Can't remove child item. Unknown content item\");if(e||this._contentItems[i].destroy(),this._contentItems.splice(i,1),this._contentItems.length>0)this.updateSize(!1);else if(!this.isGround&&!0===this._isClosable){if(null===this._parent)throw new K(\"CIUC00874\");this._parent.removeChild(this)}}addChild(t,e,i){return null!=e||(e=this._contentItems.length),this._contentItems.splice(e,0,t),t.setParent(this),!0===this._isInitialised&&!1===t._isInitialised&&t.init(),e}replaceChild(t,e,i=!1){const n=this._contentItems.indexOf(t),o=t._element.parentNode;if(-1===n)throw new X(\"CIRCI23232\",\"Can't replace child. oldChild is not child of this\");if(null===o)throw new K(\"CIRCP23232\");if(o.replaceChild(e._element,t._element),!0===i&&(t._parent=null,t.destroy()),this._contentItems[n]=e,e.setParent(this),e.size=t.size,e.sizeUnit=t.sizeUnit,e.minSize=t.minSize,e.minSizeUnit=t.minSizeUnit,null===e._parent)throw new K(\"CIRCNC45699\");!0===e._parent._isInitialised&&!1===e._isInitialised&&e.init(),this.updateSize(!1)}remove(){if(null===this._parent)throw new K(\"CIR11110\");this._parent.removeChild(this)}popout(){const t=Ot(),e=this.layoutManager.createPopoutFromContentItem(this,void 0,t,void 0);return this.emitBaseBubblingEvent(\"stateChanged\"),e}calculateConfigContent(){const t=this._contentItems,e=t.length,i=new Array(e);for(let n=0;nthis.propagateEventToLayoutManager(t,e))))}propagateEventToLayoutManager(t,e){this._pendingEventPropagations[t]=!1,this.layoutManager.emitUnknown(t,e)}}class jt extends Gt{constructor(t,e,i){super(t,e,i,document.createElement(\"div\")),this._parentItem=i,this._focused=!1,this.isComponent=!0,this._reorderEnabled=e.reorderEnabled,this.applyUpdatableConfig(e),this._initialWantMaximise=e.maximised;const n=document.createElement(\"div\");n.classList.add(\"lm_content\"),this.element.appendChild(n),this._container=new Ft(e,this,t,n,(t=>this.handleUpdateItemConfigEvent(t)),(()=>this.show()),(()=>this.hide()),(t=>this.focus(t)),(t=>this.blur(t)))}get componentName(){return this._container.componentType}get componentType(){return this._container.componentType}get reorderEnabled(){return this._reorderEnabled}get initialWantMaximise(){return this._initialWantMaximise}get component(){return this._container.component}get container(){return this._container}get parentItem(){return this._parentItem}get headerConfig(){return this._headerConfig}get title(){return this._title}get tab(){return this._tab}get focused(){return this._focused}destroy(){this._container.destroy(),super.destroy()}applyUpdatableConfig(t){this.setTitle(t.title),this._headerConfig=t.header}toConfig(){const t=this._container.stateRequestEvent,e=void 0===t?this._container.state:t();return{type:at.component,content:[],size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,maximised:!1,isClosable:this.isClosable,reorderEnabled:this._reorderEnabled,title:this._title,header:mt.Header.createCopy(this._headerConfig),componentType:pt.copyComponentType(this.componentType),componentState:e}}close(){if(null===this.parent)throw new K(\"CIC68883\");this.parent.removeChild(this,!1)}enterDragMode(t,e){Tt(this.element,t),At(this.element,e),this._container.enterDragMode(t,e)}exitDragMode(){this._container.exitDragMode()}enterStackMaximised(){this._container.enterStackMaximised()}exitStackMaximised(){this._container.exitStackMaximised()}drag(){this._container.drag()}updateSize(t){this.updateNodeSize(t)}init(){this.updateNodeSize(!1),super.init(),this._container.emit(\"open\"),this.initContentItems()}setTitle(t){this._title=t,this.emit(\"titleChanged\",t),this.emit(\"stateChanged\")}setTab(t){this._tab=t,this.emit(\"tab\",t),this._container.setTab(t)}hide(){super.hide(),this._container.setVisibility(!1)}show(){super.show(),this._container.setVisibility(!0)}focus(t=!1){this.parentItem.setActiveComponentItem(this,!0,t)}setFocused(t){this._focused=!0,this.tab.setFocused(),t||this.emitBaseBubblingEvent(\"focus\")}blur(t=!1){this._focused&&this.layoutManager.setFocusedComponentItem(void 0,t)}setBlurred(t){this._focused=!1,this.tab.setBlurred(),t||this.emitBaseBubblingEvent(\"blur\")}setParent(t){this._parentItem=t,super.setParent(t)}handleUpdateItemConfigEvent(t){this.applyUpdatableConfig(t)}updateNodeSize(t){if(\"none\"!==this.element.style.display){const{width:e,height:i}=kt(this.element);this._container.setSizeToNodeSize(e,i,t)}}}class $t extends Gt{constructor(){super(...arguments),this._focused=!1}get focused(){return this._focused}setFocusedValue(t){this._focused=t}}class Zt extends Wt{constructor(t,e){super(),this._eElement=t,this._pointerTracking=!1,this._pointerDownEventListener=t=>this.onPointerDown(t),this._pointerMoveEventListener=t=>this.onPointerMove(t),this._pointerUpEventListener=t=>this.onPointerUp(t),this._timeout=void 0,this._allowableTargets=[t,...e],this._oDocument=document,this._eBody=document.body,this._nDelay=1800,this._nDistance=10,this._nX=0,this._nY=0,this._nOriginalX=0,this._nOriginalY=0,this._dragging=!1,this._eElement.addEventListener(\"pointerdown\",this._pointerDownEventListener,{passive:!0})}destroy(){this.checkRemovePointerTrackingEventListeners(),this._eElement.removeEventListener(\"pointerdown\",this._pointerDownEventListener)}cancelDrag(){this.processDragStop(void 0)}onPointerDown(t){if(this._allowableTargets.includes(t.target)&&t.isPrimary){const e=this.getPointerCoordinates(t);this.processPointerDown(e)}}processPointerDown(t){this._nOriginalX=t.x,this._nOriginalY=t.y,this._oDocument.addEventListener(\"pointermove\",this._pointerMoveEventListener),this._oDocument.addEventListener(\"pointerup\",this._pointerUpEventListener,{passive:!0}),this._pointerTracking=!0,this._timeout=setTimeout((()=>{try{this.startDrag()}catch(t){throw console.error(t),t}}),this._nDelay)}onPointerMove(t){this._pointerTracking&&(this.processDragMove(t),t.preventDefault())}processDragMove(t){this._nX=t.pageX-this._nOriginalX,this._nY=t.pageY-this._nOriginalY,!1===this._dragging&&(Math.abs(this._nX)>this._nDistance||Math.abs(this._nY)>this._nDistance)&&this.startDrag(),this._dragging&&this.emit(\"drag\",this._nX,this._nY,t)}onPointerUp(t){this.processDragStop(t)}processDragStop(t){var e;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this.checkRemovePointerTrackingEventListeners(),!0===this._dragging&&(this._eBody.classList.remove(\"lm_dragging\"),this._eElement.classList.remove(\"lm_dragging\"),null===(e=this._oDocument.querySelector(\"iframe\"))||void 0===e||e.style.setProperty(\"pointer-events\",\"\"),this._dragging=!1,this.emit(\"dragStop\",t))}checkRemovePointerTrackingEventListeners(){this._pointerTracking&&(this._oDocument.removeEventListener(\"pointermove\",this._pointerMoveEventListener),this._oDocument.removeEventListener(\"pointerup\",this._pointerUpEventListener),this._pointerTracking=!1)}startDrag(){var t;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this._dragging=!0,this._eBody.classList.add(\"lm_dragging\"),this._eElement.classList.add(\"lm_dragging\"),null===(t=this._oDocument.querySelector(\"iframe\"))||void 0===t||t.style.setProperty(\"pointer-events\",\"none\"),this.emit(\"dragStart\",this._nOriginalX,this._nOriginalY)}getPointerCoordinates(t){return{x:t.pageX,y:t.pageY}}}class qt{constructor(t,e,i){this._isVertical=t,this._size=e,this._grabSize=i0){const i=this.createSplitter(Math.max(0,e-1)).element;e>0?(this.contentItems[e-1].element.insertAdjacentElement(\"afterend\",i),i.insertAdjacentElement(\"afterend\",t.element)):(this.contentItems[0].element.insertAdjacentElement(\"beforebegin\",i),i.insertAdjacentElement(\"beforebegin\",t.element))}else this._childElementContainer.appendChild(t.element);super.addChild(t,e);const n=1/this.contentItems.length*100;if(!0===i)return this.emitBaseBubblingEvent(\"stateChanged\"),e;for(let e=0;e0&&(this.calculateRelativeSizes(),this.setAbsoluteSizes()),this.emitBaseBubblingEvent(\"stateChanged\"),this.emit(\"resize\")}setAbsoluteSizes(){const t=this.calculateAbsoluteSizes();for(let e=0;e0&&t.itemSizes[e]++,this._isColumn?(Tt(this.contentItems[e].element,t.crossAxisSize),At(this.contentItems[e].element,t.itemSizes[e])):(Tt(this.contentItems[e].element,t.itemSizes[e]),At(this.contentItems[e].element,t.crossAxisSize))}calculateAbsoluteSizes(){const t=(this.contentItems.length-1)*this._splitterSize,{width:e,height:i}=kt(this.element);let n,o;this._isColumn?(n=i-t,o=e):(n=e-t,o=i);let s=0;const r=[];for(let t=0;t0){const n=100-t;for(let t=0;t100&&e.length>0){for(let t=0;te)return;{const r=i/e;let a=i;for(let e=0;ethis.onSplitterDrag(e,t,i))),e.on(\"dragStop\",(()=>this.onSplitterDragStop(e))),e.on(\"dragStart\",(()=>this.onSplitterDragStart(e))),this._splitter.splice(t,0,e),e}getSplitItems(t){const e=this._splitter.indexOf(t);return{before:this.contentItems[e],after:this.contentItems[e+1]}}calculateContentItemMinSize(t){const e=t.minSize;if(void 0!==e){if(t.minSizeUnit===ht.Pixel)return e;throw new X(\"ROCGMD98831\",JSON.stringify(t))}{const t=this.layoutManager.layoutConfig.dimensions;return this._isColumn?t.defaultMinItemHeight:t.defaultMinItemWidth}}calculateContentItemsTotalMinSize(t){let e=0;for(const i of t)e+=this.calculateContentItemMinSize(i);return e}onSplitterDragStart(t){const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=this.calculateContentItemsTotalMinSize(e.before.contentItems),s=this.calculateContentItemsTotalMinSize(e.after.contentItems);this._splitterPosition=0,this._splitterMinPosition=-1*(i-o),this._splitterMaxPosition=n-s}onSplitterDrag(t,e,i){let n=this._isColumn?i:e;if(null===this._splitterMinPosition||null===this._splitterMaxPosition)throw new K(\"ROCOSD59226\");n=Math.max(n,this._splitterMinPosition),n=Math.min(n,this._splitterMaxPosition),this._splitterPosition=n;const o=zt(n);this._isColumn?t.element.style.top=o:t.element.style.left=o}onSplitterDragStop(t){if(null===this._splitterPosition)throw new K(\"ROCOSDS66932\");{const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=(this._splitterPosition+i)/(i+n),s=e.before.size+e.after.size;e.before.size=o*s,e.after.size=(1-o)*s,t.element.style.top=zt(0),t.element.style.left=zt(0),globalThis.requestAnimationFrame((()=>this.updateSize(!1)))}}}!function(t){t.getElementDimensionSize=function(t,e){return\"width\"===e?function(t){return t.offsetWidth}(t):function(t){return t.offsetHeight}(t)},t.setElementDimensionSize=function(t,e,i){return\"width\"===e?Tt(t,i):At(t,i)},t.createElement=function(t,e){const i=t.createElement(\"div\");return i.classList.add(\"lm_item\"),e?i.classList.add(\"lm_column\"):i.classList.add(\"lm_row\"),i}}(Xt||(Xt={}));class Yt extends $t{constructor(t,e,i){super(t,vt.create(e),null,Yt.createElement(document)),this.isGround=!0,this._childElementContainer=this.element,this._containerElement=i;let n=null;for(;;){const t=n?n.previousSibling:this._containerElement.lastChild;if(!(t instanceof Element&&t.classList.contains(\"lm_content\")))break;n=t}this._containerElement.insertBefore(this.element,n)}init(){if(!0!==this.isInitialised){this.updateNodeSize();for(let t=0;t0?this.contentItems[0]:this,n.isComponent)throw new Error(\"Cannot add item as child to ComponentItem\");{const t=this.layoutManager.createAndInitContentItem(i,n);return e=n.addChild(t,e),n===this?-1:e}}loadComponentAsRoot(t){this.clearRoot();const e=Ct.resolve(t,!1);if(e.maximised)throw new Error(\"Root Component cannot be maximised\");{const t=new jt(this.layoutManager,e,this);t.init(),this.addChild(t,0)}}addChild(t,e){if(this.contentItems.length>0)throw new Error(\"Ground node can only have a single child\");return this._childElementContainer.appendChild(t.element),e=super.addChild(t,e),this.updateSize(!1),this.emitBaseBubblingEvent(\"stateChanged\"),e}calculateConfigContent(){const t=this.contentItems,e=t.length,i=new Array(e);for(let n=0;n0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e)),this.updateContentItemsSize(!1))}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}createSideAreas(){const t=Yt.Area.oppositeSides,e=new Array(Object.keys(t).length);let i=0;for(const n in t){const o=n,s=this.getElementArea();if(null===s)throw new K(\"RCSA77553\");s.side=o,\"2\"===t[o][1]?s[o]=s[t[o]]-50:s[o]=s[t[o]]+50,s.surface=(s.x2-s.x1)*(s.y2-s.y1),e[i++]=s}return e}highlightDropZone(t,e,i){this.layoutManager.tabDropPlaceholder.remove(),super.highlightDropZone(t,e,i)}onDrop(t,e){if(t.isComponent){const e=ut.createDefault(),i=t;e.header=mt.Header.createCopy(i.headerConfig);const n=this.layoutManager.createAndInitContentItem(e,this);n.addChild(t),t=n}if(0===this.contentItems.length)this.addChild(t);else{if(t.type===at.row||t.type===at.column){const e=ut.createDefault(),i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}const i=\"x\"==e.side[0]?at.row:at.column,n=\"2\"==e.side[1],o=this.contentItems[0];if(o instanceof Xt&&o.type===i){const e=o.contentItems[n?0:o.contentItems.length-1];o.addChild(t,n?0:void 0,!0),e.size*=.5,t.size=e.size,t.sizeUnit=ht.Percent,o.updateSize(!1)}else{const e=ct.createDefault(i),s=this.layoutManager.createContentItem(e,this);this.replaceChild(o,s),s.addChild(t,n?0:void 0,!0),s.addChild(o,n?void 0:0,!0),o.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}}dock(){throw new X(\"GID87731\")}validateDocking(){throw new X(\"GIVD87732\")}getAllContentItems(){const t=[this];return this.deepGetAllContentItems(this.contentItems,t),t}getConfigMaximisedItems(){const t=[];return this.deepFilterContentItems(this.contentItems,t,(t=>!(!Gt.isStack(t)||!t.initialWantMaximise)||!(!Gt.isComponentItem(t)||!t.initialWantMaximise))),t}getItemsByPopInParentId(t){const e=[];return this.deepFilterContentItems(this.contentItems,e,(e=>e.popInParentIds.includes(t))),e}toConfig(){throw new Error(\"Cannot generate GroundItem config\")}setActiveComponentItem(t,e,i){}updateNodeSize(){const{width:t,height:e}=kt(this._containerElement);Tt(this.element,t),At(this.element,e),this.contentItems.length>0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e))}deepGetAllContentItems(t,e){for(let i=0;ithis.onClick(t),this._touchStartEventListener=t=>this.onTouchStart(t),this._element=document.createElement(\"div\"),this._element.classList.add(i),this._element.title=e,this._header.on(\"destroy\",(()=>this.destroy())),this._element.addEventListener(\"click\",this._clickEventListener,{passive:!0}),this._element.addEventListener(\"touchstart\",this._touchStartEventListener,{passive:!0}),this._header.controlsContainerElement.appendChild(this._element)}get element(){return this._element}destroy(){var t;this._element.removeEventListener(\"click\",this._clickEventListener),this._element.removeEventListener(\"touchstart\",this._touchStartEventListener),null===(t=this._element.parentNode)||void 0===t||t.removeChild(this._element)}onClick(t){this._pushEvent(t)}onTouchStart(t){this._pushEvent(t)}}class Jt{constructor(t,e,i,n,o){var s;this._layoutManager=t,this._componentItem=e,this._closeEvent=i,this._focusEvent=n,this._dragStartEvent=o,this._isActive=!1,this._tabClickListener=t=>this.onTabClickDown(t),this._tabTouchStartListener=t=>this.onTabTouchStart(t),this._closeClickListener=()=>this.onCloseClick(),this._closeTouchStartListener=()=>this.onCloseTouchStart(),this._dragStartListener=(t,e)=>this.onDragStart(t,e),this._contentItemDestroyListener=()=>this.onContentItemDestroy(),this._tabTitleChangedListener=t=>this.setTitle(t),this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_tab\"),this._titleElement=document.createElement(\"span\"),this._titleElement.classList.add(\"lm_title\"),this._closeElement=document.createElement(\"div\"),this._closeElement.classList.add(\"lm_close_tab\"),this._element.appendChild(this._titleElement),this._element.appendChild(this._closeElement),e.isClosable?this._closeElement.style.display=\"\":this._closeElement.style.display=\"none\",this.setTitle(e.title),this._componentItem.on(\"titleChanged\",this._tabTitleChangedListener);(null!==(s=e.reorderEnabled)&&void 0!==s?s:this._layoutManager.layoutConfig.settings.reorderEnabled)&&this.enableReorder(),this._element.addEventListener(\"click\",this._tabClickListener,{passive:!0}),this._element.addEventListener(\"touchstart\",this._tabTouchStartListener,{passive:!0}),this._componentItem.isClosable?(this._closeElement.addEventListener(\"click\",this._closeClickListener,{passive:!0}),this._closeElement.addEventListener(\"touchstart\",this._closeTouchStartListener,{passive:!0})):(this._closeElement.remove(),this._closeElement=void 0),this._componentItem.setTab(this),this._layoutManager.emit(\"tabCreated\",this)}get isActive(){return this._isActive}get componentItem(){return this._componentItem}get contentItem(){return this._componentItem}get element(){return this._element}get titleElement(){return this._titleElement}get closeElement(){return this._closeElement}get reorderEnabled(){return void 0!==this._dragListener}set reorderEnabled(t){t!==this.reorderEnabled&&(t?this.enableReorder():this.disableReorder())}setTitle(t){this._titleElement.innerText=t,this._element.title=t}setActive(t){t!==this._isActive&&(this._isActive=t,t?this._element.classList.add(\"lm_active\"):this._element.classList.remove(\"lm_active\"))}destroy(){var t,e;this._closeEvent=void 0,this._focusEvent=void 0,this._dragStartEvent=void 0,this._element.removeEventListener(\"click\",this._tabClickListener),this._element.removeEventListener(\"touchstart\",this._tabTouchStartListener),null===(t=this._closeElement)||void 0===t||t.removeEventListener(\"click\",this._closeClickListener),null===(e=this._closeElement)||void 0===e||e.removeEventListener(\"touchstart\",this._closeTouchStartListener),this._componentItem.off(\"titleChanged\",this._tabTitleChangedListener),this.reorderEnabled&&this.disableReorder(),this._element.remove()}setBlurred(){this._element.classList.remove(\"lm_focused\"),this._titleElement.classList.remove(\"lm_focused\")}setFocused(){this._element.classList.add(\"lm_focused\"),this._titleElement.classList.add(\"lm_focused\")}onDragStart(t,e){if(void 0===this._dragListener)throw new J(\"TODSDLU10093\");if(void 0===this._dragStartEvent)throw new J(\"TODS23309\");this._dragStartEvent(t,e,this._dragListener,this.componentItem)}onContentItemDestroy(){void 0!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=void 0)}onTabClickDown(t){const e=t.target;e!==this._element&&e!==this._titleElement||(0===t.button?this.notifyFocus():1===t.button&&this._componentItem.isClosable&&this.notifyClose())}onTabTouchStart(t){t.target===this._element&&this.notifyFocus()}onCloseClick(){this.notifyClose()}onCloseTouchStart(){this.notifyClose()}notifyClose(){if(void 0===this._closeEvent)throw new J(\"TNC15007\");this._closeEvent(this._componentItem)}notifyFocus(){if(void 0===this._focusEvent)throw new J(\"TNA15007\");this._focusEvent(this._componentItem)}enableReorder(){this._dragListener=new Zt(this._element,[this._titleElement]),this._dragListener.on(\"dragStart\",this._dragStartListener),this._componentItem.on(\"destroy\",this._contentItemDestroyListener)}disableReorder(){if(void 0===this._dragListener)throw new J(\"TDR87745\");this._componentItem.off(\"destroy\",this._contentItemDestroyListener),this._dragListener.off(\"dragStart\",this._dragStartListener),this._dragListener=void 0}}class Qt{constructor(t,e,i,n,o){this._layoutManager=t,this._componentRemoveEvent=e,this._componentFocusEvent=i,this._componentDragStartEvent=n,this._dropdownActiveChangedEvent=o,this._tabs=[],this._lastVisibleTabIndex=-1,this._dropdownActive=!1,this._element=document.createElement(\"section\"),this._element.classList.add(\"lm_tabs\"),this._dropdownElement=document.createElement(\"section\"),this._dropdownElement.classList.add(\"lm_tabdropdown_list\"),this._dropdownElement.style.display=\"none\"}get tabs(){return this._tabs}get tabCount(){return this._tabs.length}get lastVisibleTabIndex(){return this._lastVisibleTabIndex}get element(){return this._element}get dropdownElement(){return this._dropdownElement}get dropdownActive(){return this._dropdownActive}destroy(){for(let t=0;tthis.handleTabCloseEvent(t)),(t=>this.handleTabFocusEvent(t)),((t,e,i,n)=>this.handleTabDragStartEvent(t,e,i,n)));void 0===e&&(e=this._tabs.length),this._tabs.splice(e,0,i),ethis._lastVisibleTabIndex){const t=this._tabs[e];for(let t=e;t>0;t--)this._tabs[t]=this._tabs[t-1];this._tabs[0]=t}}updateTabSizes(t,e){let i=!1;this.tryUpdateTabSizes(i,t,e)||(i=!0,this.tryUpdateTabSizes(i,t,e)),i!==this._dropdownActive&&(this._dropdownActive=i,this._dropdownActiveChangedEvent())}tryUpdateTabSizes(t,e,i){if(this._tabs.length>0){if(void 0===i)throw new Error(\"non-empty tabs must have active component item\");let n=0,o=!1;const s=this._layoutManager.layoutConfig.settings.tabOverlapAllowance,r=this._tabs.indexOf(i.tab),a=this._tabs[r];this._lastVisibleTabIndex=-1;for(let i=0;ie){if(o)i===r&&(l.style.zIndex=\"auto\",l.style.marginLeft=\"\",l.parentElement!==this._element&&this._element.appendChild(l));else{let t;if(t=r>0&&r<=i?(d-e)/(i-1):(d-e)/i,tthis.onClick(t),this._touchStartListener=t=>this.onTouchStart(t),this._rowColumnClosable=!0,this._closeButton=null,this._popoutButton=null,this._tabsContainer=new Qt(this._layoutManager,(t=>this.handleTabInitiatedComponentRemoveEvent(t)),(t=>this.handleTabInitiatedComponentFocusEvent(t)),((t,e,i,n)=>this.handleTabInitiatedDragStartEvent(t,e,i,n)),(()=>this.processTabDropdownActiveChanged())),this._show=i.show,this._popoutEnabled=i.popoutEnabled,this._popoutLabel=i.popoutLabel,this._maximiseEnabled=i.maximiseEnabled,this._maximiseLabel=i.maximiseLabel,this._minimiseEnabled=i.minimiseEnabled,this._minimiseLabel=i.minimiseLabel,this._closeEnabled=i.closeEnabled,this._closeLabel=i.closeLabel,this._tabDropdownEnabled=i.tabDropdownEnabled,this._tabDropdownLabel=i.tabDropdownLabel,this.setSide(i.side),this._canRemoveComponent=this._configClosable,this._element=document.createElement(\"section\"),this._element.classList.add(\"lm_header\"),this._controlsContainerElement=document.createElement(\"section\"),this._controlsContainerElement.classList.add(\"lm_controls\"),this._element.appendChild(this._tabsContainer.element),this._element.appendChild(this._controlsContainerElement),this._element.appendChild(this._tabsContainer.dropdownElement),this._element.addEventListener(\"click\",this._clickListener,{passive:!0}),this._element.addEventListener(\"touchstart\",this._touchStartListener,{passive:!0}),this._documentMouseUpListener=()=>this._tabsContainer.hideAdditionalTabsDropdown(),globalThis.document.addEventListener(\"mouseup\",this._documentMouseUpListener,{passive:!0}),this._tabControlOffset=this._layoutManager.layoutConfig.settings.tabControlOffset,this._tabDropdownEnabled&&(this._tabDropdownButton=new Kt(this,this._tabDropdownLabel,\"lm_tabdropdown\",(()=>this._tabsContainer.showAdditionalTabsDropdown()))),this._popoutEnabled&&(this._popoutButton=new Kt(this,this._popoutLabel,\"lm_popout\",(()=>this.handleButtonPopoutEvent()))),this._maximiseEnabled&&(this._maximiseButton=new Kt(this,this._maximiseLabel,\"lm_maximise\",(t=>this.handleButtonMaximiseToggleEvent(t)))),this._configClosable&&(this._closeButton=new Kt(this,this._closeLabel,\"lm_close\",(()=>s()))),this.processTabDropdownActiveChanged()}get show(){return this._show}get side(){return this._side}get leftRightSided(){return this._leftRightSided}get layoutManager(){return this._layoutManager}get parent(){return this._parent}get tabs(){return this._tabsContainer.tabs}get lastVisibleTabIndex(){return this._tabsContainer.lastVisibleTabIndex}get element(){return this._element}get tabsContainerElement(){return this._tabsContainer.element}get controlsContainerElement(){return this._controlsContainerElement}destroy(){this.emit(\"destroy\"),this._popoutEvent=void 0,this._maximiseToggleEvent=void 0,this._clickEvent=void 0,this._touchStartEvent=void 0,this._componentRemoveEvent=void 0,this._componentFocusEvent=void 0,this._componentDragStartEvent=void 0,this._tabsContainer.destroy(),globalThis.document.removeEventListener(\"mouseup\",this._documentMouseUpListener),this._element.remove()}createTab(t,e){this._tabsContainer.createTab(t,e)}removeTab(t){this._tabsContainer.removeTab(t)}processActiveComponentChanged(t){this._tabsContainer.processActiveComponentChanged(t),this.updateTabSizes()}setSide(t){this._side=t,this._leftRightSided=[nt.right,nt.left].includes(this._side)}setRowColumnClosable(t){this._rowColumnClosable=t,this.updateClosability()}updateClosability(){let t;if(this._configClosable)if(this._rowColumnClosable){t=!0;const e=this.tabs.length;for(let i=0;i1}applyFocusedValue(t){t?this._element.classList.add(\"lm_focused\"):this._element.classList.remove(\"lm_focused\")}processMaximised(){if(void 0===this._maximiseButton)throw new J(\"HPMAX16997\");this._maximiseButton.element.setAttribute(\"title\",this._minimiseLabel)}processMinimised(){if(void 0===this._maximiseButton)throw new J(\"HPMIN16997\");this._maximiseButton.element.setAttribute(\"title\",this._maximiseLabel)}updateTabSizes(){if(this._tabsContainer.tabCount>0){const t=this._show?this._layoutManager.layoutConfig.dimensions.headerHeight:0;let e;this._leftRightSided?(this._element.style.height=\"\",this._element.style.width=zt(t)):(this._element.style.width=\"\",this._element.style.height=zt(t)),e=this._leftRightSided?this._element.offsetHeight-this._controlsContainerElement.offsetHeight-this._tabControlOffset:this._element.offsetWidth-this._controlsContainerElement.offsetWidth-this._tabControlOffset,this._tabsContainer.updateTabSizes(e,this._getActiveComponentItemEvent())}}handleTabInitiatedComponentRemoveEvent(t){if(this._canRemoveComponent){if(void 0===this._componentRemoveEvent)throw new J(\"HHTCE22294\");this._componentRemoveEvent(t)}}handleTabInitiatedComponentFocusEvent(t){if(void 0===this._componentFocusEvent)throw new J(\"HHTAE22294\");this._componentFocusEvent(t)}handleTabInitiatedDragStartEvent(t,e,i,n){if(this._canRemoveComponent){if(void 0===this._componentDragStartEvent)throw new J(\"HHTDSE22294\");this._componentDragStartEvent(t,e,i,n)}else i.cancelDrag()}processTabDropdownActiveChanged(){void 0!==this._tabDropdownButton&&Dt(this._tabDropdownButton.element,this._tabsContainer.dropdownActive)}handleButtonPopoutEvent(){if(this._layoutManager.layoutConfig.settings.popoutWholeStack){if(void 0===this._popoutEvent)throw new J(\"HHBPOE17834\");this._popoutEvent()}else{const t=this._getActiveComponentItemEvent();t&&t.popout()}}handleButtonMaximiseToggleEvent(t){if(void 0===this._maximiseToggleEvent)throw new J(\"HHBMTE16834\");this._maximiseToggleEvent()}onClick(t){t.target===this._element&&this.notifyClick(t)}onTouchStart(t){t.target===this._element&&this.notifyTouchStart(t)}notifyClick(t){if(void 0===this._clickEvent)throw new J(\"HNHC46834\");this._clickEvent(t)}notifyTouchStart(t){if(void 0===this._touchStartEvent)throw new J(\"HNHTS46834\");this._touchStartEvent(t)}}class ee extends $t{constructor(t,e,i){var n,o,s,r,a,l,h,d,c,m,u,p,g,f,v,_,y,C,w;super(t,e,i,ee.createElement(document)),this._headerSideChanged=!1,this._resizeListener=()=>this.handleResize(),this._maximisedListener=()=>this.handleMaximised(),this._minimisedListener=()=>this.handleMinimised(),this._headerConfig=e.header;const I=t.layoutConfig.header,b=e.content;let S;if(1!==b.length)S=void 0;else{S=b[0].header}this._initialWantMaximise=e.maximised,this._initialActiveItemIndex=null!==(n=e.activeItemIndex)&&void 0!==n?n:0;const E=null!==(r=null!==(s=null===(o=this._headerConfig)||void 0===o?void 0:o.show)&&void 0!==s?s:null==S?void 0:S.show)&&void 0!==r?r:I.show,x=null!==(h=null!==(l=null===(a=this._headerConfig)||void 0===a?void 0:a.popout)&&void 0!==l?l:null==S?void 0:S.popout)&&void 0!==h?h:I.popout,L=null!==(m=null!==(c=null===(d=this._headerConfig)||void 0===d?void 0:d.maximise)&&void 0!==c?c:null==S?void 0:S.maximise)&&void 0!==m?m:I.maximise,z=null!==(g=null!==(p=null===(u=this._headerConfig)||void 0===u?void 0:u.close)&&void 0!==p?p:null==S?void 0:S.close)&&void 0!==g?g:I.close,M=null!==(_=null!==(v=null===(f=this._headerConfig)||void 0===f?void 0:f.minimise)&&void 0!==v?v:null==S?void 0:S.minimise)&&void 0!==_?_:I.minimise,P=null!==(w=null!==(C=null===(y=this._headerConfig)||void 0===y?void 0:y.tabDropdown)&&void 0!==C?C:null==S?void 0:S.tabDropdown)&&void 0!==w?w:I.tabDropdown;this._maximisedEnabled=!1!==L;const T={show:!1!==E,side:!1===E?nt.top:E,popoutEnabled:!1!==x,popoutLabel:!1===x?\"\":x,maximiseEnabled:this._maximisedEnabled,maximiseLabel:!1===L?\"\":L,closeEnabled:!1!==z,closeLabel:!1===z?\"\":z,minimiseEnabled:!0,minimiseLabel:M,tabDropdownEnabled:!1!==P,tabDropdownLabel:!1===P?\"\":P};this._header=new te(t,this,T,e.isClosable&&!1!==z,(()=>this.getActiveComponentItem()),(()=>this.remove()),(()=>this.handlePopoutEvent()),(()=>this.toggleMaximise()),(t=>this.handleHeaderClickEvent(t)),(t=>this.handleHeaderTouchStartEvent(t)),(t=>this.handleHeaderComponentRemoveEvent(t)),(t=>this.handleHeaderComponentFocusEvent(t)),((t,e,i,n)=>this.handleHeaderComponentStartDragEvent(t,e,i,n))),this.isStack=!0,this._childElementContainer=document.createElement(\"section\"),this._childElementContainer.classList.add(\"lm_items\"),this.on(\"resize\",this._resizeListener),this._maximisedEnabled&&(this.on(\"maximised\",this._maximisedListener),this.on(\"minimised\",this._minimisedListener)),this.element.appendChild(this._header.element),this.element.appendChild(this._childElementContainer),this.setupHeaderPosition(),this._header.updateClosability()}get childElementContainer(){return this._childElementContainer}get header(){return this._header}get headerShow(){return this._header.show}get headerSide(){return this._header.side}get headerLeftRightSided(){return this._header.leftRightSided}get contentAreaDimensions(){return this._contentAreaDimensions}get initialWantMaximise(){return this._initialWantMaximise}get isMaximised(){return this===this.layoutManager.maximisedStack}get stackParent(){if(!this.parent)throw new Error(\"Stack should always have a parent\");return this.parent}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}init(){if(!0===this.isInitialised)return;this.updateNodeSize();for(let t=0;t0){if(this._initialActiveItemIndex<0||this._initialActiveItemIndex>=e)throw new Error(`ActiveItemIndex out of range: ${this._initialActiveItemIndex} id: ${this.id}`);for(let i=0;ithis.contentItems.length)throw e-=1,new X(\"SAC99728\");if(t instanceof jt)return e=super.addChild(t,e),this._childElementContainer.appendChild(t.element),this._header.createTab(t,e),this.setActiveComponentItem(t,i),this._header.updateTabSizes(),this.updateSize(!1),t.container.setBaseLogicalZIndex(),this._header.updateClosability(),this.emitStateChangedEvent(),e;throw new X(\"SACC88532\")}removeChild(t,e){const i=t,n=this.contentItems.indexOf(i),o=1===this.contentItems.length;if(this._activeComponentItem===i&&(i.focused&&i.blur(),!o)){const t=0===n?1:n-1;this.setActiveComponentItem(this.contentItems[t],!1)}this._header.removeTab(i),super.removeChild(i,e),o||this._header.updateClosability(),this.emitStateChangedEvent()}toggleMaximise(){this.isMaximised?this.minimise():this.maximise()}maximise(){if(!this.isMaximised){this.layoutManager.setMaximisedStack(this);const t=this.contentItems,e=t.length;for(let i=0;i0&&void 0===t)throw new Error(\"expected non-empty stack to have an active component item\");return{type:\"stack\",content:this.calculateConfigContent(),size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,isClosable:this.isClosable,maximised:this.isMaximised,header:this.createHeaderConfig(),activeItemIndex:t}}onDrop(t,e){if(\"header\"===this._dropSegment){if(this.resetHeaderDropZone(),void 0===this._dropIndex)throw new J(\"SODDI68990\");return void this.addChild(t,this._dropIndex)}if(\"body\"===this._dropSegment)return void this.addChild(t,0,!0);const i=\"top\"===this._dropSegment||\"bottom\"===this._dropSegment,n=\"left\"===this._dropSegment||\"right\"===this._dropSegment,o=\"top\"===this._dropSegment||\"left\"===this._dropSegment,s=i&&this.stackParent.isColumn||n&&this.stackParent.isRow;if(t.isComponent){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createAndInitContentItem(e,this);i.addChild(t),t=i}if(t.type===at.row||t.type===at.column){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}if(s){const e=this.stackParent.contentItems.indexOf(this);this.stackParent.addChild(t,o?e:e+1,!0),this.size*=.5,t.size=this.size,t.sizeUnit=this.sizeUnit,this.stackParent.updateSize(!1)}else{const e=i?at.column:at.row,n=ct.createDefault(e),s=this.layoutManager.createContentItem(n,this);this.stackParent.replaceChild(this,s),s.addChild(t,o?0:void 0,!0),s.addChild(this,o?void 0:0,!0),this.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}highlightDropZone(t,e){for(const i in this._contentAreaDimensions){const n=i,o=this._contentAreaDimensions[n].hoverArea;if(o.x1t&&o.y1e)return void(\"header\"===n?(this._dropSegment=\"header\",this.highlightHeaderDropZone(this._header.leftRightSided?e:t)):(this.resetHeaderDropZone(),this.highlightBodyDropZone(n)))}}getArea(){if(\"none\"===this.element.style.display)return null;const t=super.getElementArea(this._header.element),e=super.getElementArea(this._childElementContainer);if(null===t||null===e)throw new K(\"SGAHC13086\");const i=e.x2-e.x1,n=e.y2-e.y1;return this._contentAreaDimensions={header:{hoverArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2},highlightArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2}}},0===this.contentItems.length?(this._contentAreaDimensions.body={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2}},super.getElementArea(this.element)):(this._contentAreaDimensions.left={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x1+.25*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x1+.5*i,y2:e.y2}},this._contentAreaDimensions.top={hoverArea:{x1:e.x1+.25*i,y1:e.y1,x2:e.x1+.75*i,y2:e.y1+.5*n},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y1+.5*n}},this._contentAreaDimensions.right={hoverArea:{x1:e.x1+.75*i,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1+.5*i,y1:e.y1,x2:e.x2,y2:e.y2}},this._contentAreaDimensions.bottom={hoverArea:{x1:e.x1+.25*i,y1:e.y1+.5*n,x2:e.x1+.75*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1+.5*n,x2:e.x2,y2:e.y2}},super.getElementArea(this.element))}positionHeader(t){this._header.side!==t&&(this._header.setSide(t),this._headerSideChanged=!0,this.setupHeaderPosition())}updateNodeSize(){if(\"none\"!==this.element.style.display){const t=kt(this.element);if(this._header.show){t[this._header.leftRightSided?it.width:it.height]-=this.layoutManager.layoutConfig.dimensions.headerHeight}this._childElementContainer.style.width=zt(t.width),this._childElementContainer.style.height=zt(t.height);for(let e=0;e=o&&tthis.onDrag(t,e,i))),this._dragListener.on(\"dragStop\",(()=>this.onDrop())),this.createDragProxyElements(t,e),null===this._componentItem.parent)throw new K(\"DPC10097\");this._componentItemFocused=this._componentItem.focused,this._componentItemFocused&&this._componentItem.blur(),this._componentItem.parent.removeChild(this._componentItem,!0),this.setDimensions(),document.body.appendChild(this._element),this.determineMinMaxXY(),this._layoutManager.calculateItemAreas(),this.setDropPosition(t,e)}get element(){return this._element}createDragProxyElements(t,e){this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_dragProxy\");const i=document.createElement(\"div\");i.classList.add(\"lm_header\");const n=document.createElement(\"div\");n.classList.add(\"lm_tabs\");const o=document.createElement(\"div\");o.classList.add(\"lm_tab\");const s=document.createElement(\"span\");s.classList.add(\"lm_title\"),o.appendChild(s),n.appendChild(o),i.appendChild(n),this._proxyContainerElement=document.createElement(\"div\"),this._proxyContainerElement.classList.add(\"lm_content\"),this._element.appendChild(i),this._element.appendChild(this._proxyContainerElement),this._originalParent instanceof ee&&this._originalParent.headerShow&&(this._sided=this._originalParent.headerLeftRightSided,this._element.classList.add(\"lm_\"+this._originalParent.headerSide),[nt.right,nt.bottom].indexOf(this._originalParent.headerSide)>=0&&this._proxyContainerElement.insertAdjacentElement(\"afterend\",i)),this._element.style.left=zt(t),this._element.style.top=zt(e),o.setAttribute(\"title\",this._componentItem.title),s.insertAdjacentText(\"afterbegin\",this._componentItem.title),this._proxyContainerElement.appendChild(this._componentItem.element)}determineMinMaxXY(){const t=this._layoutManager.groundItem;if(void 0===t)throw new J(\"DPDMMXY73109\");{const e=t.element.getBoundingClientRect();this._minX=e.left+document.body.scrollLeft,this._minY=e.top+document.body.scrollTop,this._maxX=this._minX+e.width,this._maxY=this._minY+e.height}}onDrag(t,e,i){const n=i.pageX,o=i.pageY;this.setDropPosition(n,o),this._componentItem.drag()}setDropPosition(t,e){this._layoutManager.layoutConfig.settings.constrainDragToContainer&&(t<=this._minX?t=Math.ceil(this._minX):t>=this._maxX&&(t=Math.floor(this._maxX)),e<=this._minY?e=Math.ceil(this._minY):e>=this._maxY&&(e=Math.floor(this._maxY))),this._element.style.left=zt(t),this._element.style.top=zt(e),this._area=this._layoutManager.getArea(t,e),null!==this._area&&(this._lastValidArea=this._area,this._area.contentItem.highlightDropZone(t,e,this._area))}onDrop(){const t=this._layoutManager.dropTargetIndicator;if(null===t)throw new K(\"DPOD30011\");let e;if(t.hide(),this._componentItem.exitDragMode(),null!==this._area)e=this._componentItem,this._area.contentItem.onDrop(e,this._area);else if(null!==this._lastValidArea){e=this._componentItem;this._lastValidArea.contentItem.onDrop(e,this._lastValidArea)}else this._originalParent?(e=this._componentItem,this._originalParent.addChild(e)):this._componentItem.destroy();this._element.remove(),this._layoutManager.emit(\"itemDropped\",this._componentItem),this._componentItemFocused&&void 0!==e&&e.focus()}setDimensions(){const t=this._layoutManager.layoutConfig.dimensions;if(void 0===t)throw new Error(\"DragProxy.setDimensions: dimensions undefined\");let e=t.dragProxyWidth,i=t.dragProxyHeight;if(void 0===e||void 0===i)throw new Error(\"DragProxy.setDimensions: width and/or height undefined\");const n=!1===this._layoutManager.layoutConfig.header.show?0:t.headerHeight;this._element.style.width=zt(e),this._element.style.height=zt(i),e-=this._sided?n:0,i-=this._sided?0:n,this._proxyContainerElement.style.width=zt(e),this._proxyContainerElement.style.height=zt(i),this._componentItem.enterDragMode(e,i),this._componentItem.show()}}class ne{constructor(t,e,i,n,o,s,r){this._layoutManager=t,this._element=e,this._extraAllowableChildTargets=i,this._componentTypeOrFtn=n,this._componentState=o,this._title=s,this._id=r,this._dragListener=null,this._dummyGroundContainer=document.createElement(\"div\");const a=gt.createDefault(\"row\");this._dummyGroundContentItem=new Yt(this._layoutManager,a,this._dummyGroundContainer),this.createDragListener()}destroy(){this.removeDragListener()}createDragListener(){this.removeDragListener(),this._dragListener=new Zt(this._element,this._extraAllowableChildTargets),this._dragListener.on(\"dragStart\",((t,e)=>this.onDragStart(t,e))),this._dragListener.on(\"dragStop\",(()=>this.onDragStop()))}onDragStart(t,e){var i;const n=\"component\";let o;if(\"function\"==typeof this._componentTypeOrFtn){const t=this._componentTypeOrFtn();o=ne.isDragSourceComponentItemConfig(t)?{type:n,componentState:t.state,componentType:t.type,title:null!==(i=t.title)&&void 0!==i?i:this._title}:t}else o={type:n,componentState:this._componentState,componentType:this._componentTypeOrFtn,title:this._title,id:this._id};const s=bt.resolve(o,!1),r=new jt(this._layoutManager,s,this._dummyGroundContentItem);if(this._dummyGroundContentItem.contentItems.push(r),null===this._dragListener)throw new K(\"DSODSD66746\");{const i=new ie(t,e,this._dragListener,this._layoutManager,r,this._dummyGroundContentItem),n=this._layoutManager.transitionIndicator;if(null===n)throw new K(\"DSODST66746\");n.transitionElements(this._element,i.element)}}onDragStop(){this.createDragListener()}removeDragListener(){null!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=null)}}!function(t){t.isDragSourceComponentItemConfig=function(t){return!(\"componentType\"in t)}}(ne||(ne={}));class oe{constructor(){this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_dropTargetIndicator\");const t=document.createElement(\"div\");t.classList.add(\"lm_inner\"),this._element.appendChild(t),document.body.appendChild(this._element)}destroy(){this._element.remove()}highlightArea(t,e){this._element.style.left=zt(t.x1+e),this._element.style.top=zt(t.y1+e),this._element.style.width=zt(t.x2-t.x1-e),this._element.style.height=zt(t.y2-t.y1-e),this._element.style.display=\"block\"}hide(){Dt(this._element,!1)}}class se{constructor(){this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_transition_indicator\"),document.body.appendChild(this._element),this._toElement=null,this._fromDimensions=null,this._totalAnimationDuration=200,this._animationStartTime=null}destroy(){this._element.remove()}transitionElements(t,e){}nextAnimationFrame(){}measure(t){const e=t.getBoundingClientRect();return{left:e.left,top:e.top,width:t.offsetWidth,height:t.offsetHeight}}}class re extends Wt{constructor(t){super(),this._layoutManager=t,this._childEventListener=t=>this.onEventFromChild(t),globalThis.addEventListener(re.ChildEventName,this._childEventListener,{passive:!0})}emit(t,...e){\"userBroadcast\"===t?this.emitUserBroadcast(...e):super.emit(t,...e)}emitUserBroadcast(...t){this.handleUserBroadcastEvent(\"userBroadcast\",t)}destroy(){globalThis.removeEventListener(re.ChildEventName,this._childEventListener)}handleUserBroadcastEvent(t,e){this._layoutManager.isSubWindow?this.propagateToParent(t,e):this.propagateToThisAndSubtree(t,e)}onEventFromChild(t){const e=t.detail;this.handleUserBroadcastEvent(e.eventName,e.args)}propagateToParent(t,e){const i={bubbles:!0,cancelable:!0,detail:{layoutManager:this._layoutManager,eventName:t,args:e}},n=new CustomEvent(re.ChildEventName,i),o=globalThis.opener;if(null===o)throw new K(\"EHPTP15778\");o.dispatchEvent(n)}propagateToThisAndSubtree(t,e){this.emitUnknown(t,...e);for(let i=0;ithis.handleContainerResize())),this._windowBeforeUnloadListener=()=>this.onBeforeUnload(),this._windowBeforeUnloadListening=!1,this._maximisedStackBeforeDestroyedListener=t=>this.cleanupBeforeMaximisedStackDestroyed(t),this.isSubWindow=t.isSubWindow,this._constructorOrSubWindowLayoutConfig=t.constructorOrSubWindowLayoutConfig,Q.checkInitialise(),dt.checkInitialise(),void 0!==t.containerElement&&(this._containerElement=t.containerElement)}get container(){return this._containerElement}get isInitialised(){return this._isInitialised}get groundItem(){return this._groundItem}get root(){return this._groundItem}get openPopouts(){return this._openPopouts}get dropTargetIndicator(){return this._dropTargetIndicator}get transitionIndicator(){return this._transitionIndicator}get width(){return this._width}get height(){return this._height}get eventHub(){return this._eventHub}get rootItem(){if(void 0===this._groundItem)throw new Error(\"Cannot access rootItem before init\");return 0===this._groundItem.contentItems.length?void 0:this._groundItem.contentItems[0]}get focusedComponentItem(){return this._focusedComponentItem}get tabDropPlaceholder(){return this._tabDropPlaceholder}get maximisedStack(){return this._maximisedStack}get deprecatedConstructor(){return!this.isSubWindow&&void 0!==this._constructorOrSubWindowLayoutConfig}destroy(){if(this._isInitialised){this._windowBeforeUnloadListening&&(globalThis.removeEventListener(\"beforeunload\",this._windowBeforeUnloadListener),this._windowBeforeUnloadListening=!1),!0===this.layoutConfig.settings.closePopoutsOnUnload&&this.closeAllOpenPopouts(),this._resizeObserver.disconnect(),this.checkClearResizeTimeout(),void 0!==this._groundItem&&this._groundItem.destroy(),this._tabDropPlaceholder.remove(),null!==this._dropTargetIndicator&&this._dropTargetIndicator.destroy(),null!==this._transitionIndicator&&this._transitionIndicator.destroy(),this._eventHub.destroy();for(const t of this._dragSources)t.destroy();this._dragSources=[],this._isInitialised=!1}}minifyConfig(t){return _t.minifyConfig(t)}unminifyConfig(t){return _t.unminifyConfig(t)}init(){let t;if(this.setContainer(),this._dropTargetIndicator=new oe,this._transitionIndicator=new se,this.updateSizeFromContainer(),this.isSubWindow){if(void 0===this._constructorOrSubWindowLayoutConfig)throw new J(\"LMIU07155\");{const e=this._constructorOrSubWindowLayoutConfig.root;if(void 0===e)throw new X(\"LMIC07156\");if(!Ct.isComponent(e))throw new X(\"LMIC07157\");t=e;const i=xt.resolve(this._constructorOrSubWindowLayoutConfig);this.layoutConfig=Object.assign(Object.assign({},i),{root:void 0})}}else void 0===this._constructorOrSubWindowLayoutConfig?this.layoutConfig=_t.createDefault():this.layoutConfig=xt.resolve(this._constructorOrSubWindowLayoutConfig);const e=this.layoutConfig;this._groundItem=new Yt(this,e.root,this._containerElement),this._groundItem.init(),this.checkLoadedLayoutMaximiseItem(),this._resizeObserver.observe(this._containerElement),this._isInitialised=!0,this.adjustColumnsResponsive(),this.emit(\"initialised\"),void 0!==t&&this.loadComponentAsRoot(t)}loadLayout(t){if(!this.isInitialised)throw new Error(\"GoldenLayout: Need to call init() if LayoutConfig with defined root passed to constructor\");if(void 0===this._groundItem)throw new J(\"LMLL11119\");this.createSubWindows(),this.layoutConfig=xt.resolve(t),this._groundItem.loadRoot(this.layoutConfig.root),this.checkLoadedLayoutMaximiseItem(),this.adjustColumnsResponsive()}saveLayout(){if(!1===this._isInitialised)throw new Error(\"Can't create config, layout not yet initialised\");if(void 0===this._groundItem)throw new J(\"LMTC18244\");{const t=this._groundItem.calculateConfigContent();let e;e=1!==t.length?void 0:t[0],this.reconcilePopoutWindows();const i=[];for(let t=0;t=0?n=this._groundItem.contentItems[0]:e=0;break;case at.row:case at.column:e=n.addItem(t,i.index);break;case at.stack:if(Ct.isComponent(t)){e=n.addItem(t,i.index);break}throw Error(tt[6]);case at.component:throw new X(\"LMAIALC87444602\");default:throw new Y(\"LMAIALU98881733\",n.type)}if(Ct.isComponent(t)){const t=n.contentItems[e];Gt.isStack(t)&&(n=t,e=0)}return i.parentItem=n,i.index=e,i}}}loadComponentAsRoot(t){if(void 0===this._groundItem)throw new Error(\"Cannot add item before init\");this._groundItem.loadComponentAsRoot(t)}updateSize(t,e){this.setSize(t,e)}setSize(t,e){if(this._width=t,this._height=e,!0===this._isInitialised){if(void 0===this._groundItem)throw new J(\"LMUS18881\");if(this._groundItem.setSize(this._width,this._height),this._maximisedStack){const{width:t,height:e}=kt(this._containerElement);Tt(this._maximisedStack.element,t),At(this._maximisedStack.element,e),this._maximisedStack.updateSize(!1)}this.adjustColumnsResponsive()}}beginSizeInvalidation(){this._sizeInvalidationBeginCount++}endSizeInvalidation(){0==--this._sizeInvalidationBeginCount&&this.updateSizeFromContainer()}updateSizeFromContainer(){const{width:t,height:e}=kt(this._containerElement);this.setSize(t,e)}updateRootSize(t=!1){if(void 0===this._groundItem)throw new J(\"LMURS28881\");this._groundItem.updateSize(t)}createAndInitContentItem(t,e){const i=this.createContentItem(t,e);return i.init(),i}createContentItem(t,e){if(\"string\"!=typeof t.type)throw new G(\"Missing parameter 'type'\",JSON.stringify(t));if(ct.isComponentItem(t)&&!(e instanceof ee)&&e&&!(!0===this.isSubWindow&&e instanceof Yt)){t={type:at.stack,content:[t],size:t.size,sizeUnit:t.sizeUnit,minSize:t.minSize,minSizeUnit:t.minSizeUnit,id:t.id,maximised:t.maximised,isClosable:t.isClosable,activeItemIndex:0,header:void 0}}return this.createContentItemFromConfig(t,e)}findFirstComponentItemById(t){if(void 0===this._groundItem)throw new J(\"LMFFCIBI82446\");return this.findFirstContentItemTypeByIdRecursive(at.component,t,this._groundItem)}createPopout(t,e,i,n){return t instanceof Gt?this.createPopoutFromContentItem(t,e,i,n):this.createPopoutFromItemConfig(t,e,i,n)}createPopoutFromContentItem(t,e,i,n){let o=t.parent,s=t;for(;null!==o&&1===o.contentItems.length&&!o.isGround;)s=o,o=o.parent;if(null===o)throw new K(\"LMCPFCI00834\");{if(void 0===n&&(n=o.contentItems.indexOf(s)),null!==i&&o.addPopInParentId(i),void 0===e){const i=globalThis.screenX||globalThis.screenLeft,n=globalThis.screenY||globalThis.screenTop,o=t.element.offsetLeft,s=t.element.offsetTop,{width:r,height:a}=kt(t.element);e={left:i+o,top:n+s,width:r,height:a}}const r=t.toConfig();if(t.remove(),ft.isRootItemConfig(r))return this.createPopoutFromItemConfig(r,e,i,n);throw new Error(`${tt[0]}`)}}beginVirtualSizedContainerAdding(){0==++this._virtualSizedContainerAddingBeginCount&&(this._virtualSizedContainers.length=0)}addVirtualSizedContainer(t){this._virtualSizedContainers.push(t)}endVirtualSizedContainerAdding(){if(0==--this._virtualSizedContainerAddingBeginCount){const t=this._virtualSizedContainers.length;if(t>0){this.fireBeforeVirtualRectingEvent(t);for(let e=0;ethis.emit(\"windowOpened\",a))),a.on(\"closed\",(()=>this.reconcilePopoutWindows())),this._openPopouts.push(a),this.layoutConfig.settings.closePopoutsOnUnload&&!this._windowBeforeUnloadListening&&(globalThis.addEventListener(\"beforeunload\",this._windowBeforeUnloadListener,{passive:!0}),this._windowBeforeUnloadListening=!0),a}closeAllOpenPopouts(){for(let t=0;tglobalThis.close()),1)}getArea(t,e){let i=null,n=1/0;for(let o=0;o=s.x1&&t=s.y1&&es.surface&&(n=s.surface,i=s)}return i}calculateItemAreas(){const t=this.getAllContentItems(),e=this._groundItem;if(void 0===e)throw new J(\"LMCIAR44365\");if(1!==t.length){e.contentItems[0].isStack?this._itemAreas=[]:this._itemAreas=e.createSideAreas();for(let e=0;e0){let e=t[0];if(Gt.isComponentItem(e)){const t=e.parent;if(null===t)throw new K(\"LMXLLMI69999\");e=t}if(!Gt.isStack(e))throw new X(\"LMCLLMI19993\");e.maximise()}}}processMaximiseStack(t){if(this._maximisedStack=t,t.on(\"beforeItemDestroyed\",this._maximisedStackBeforeDestroyedListener),t.element.classList.add(\"lm_maximised\"),t.element.insertAdjacentElement(\"afterend\",this._maximisePlaceholder),void 0===this._groundItem)throw new J(\"LMMXI19993\");{this._groundItem.element.prepend(t.element);const{width:e,height:i}=kt(this._containerElement);Tt(t.element,e),At(t.element,i),t.updateSize(!0),t.focusActiveContentItem(),this._maximisedStack.emit(\"maximised\"),this.emit(\"stateChanged\")}}processMinimiseMaximisedStack(){if(void 0===this._maximisedStack)throw new X(\"LMMMS74422\");{const t=this._maximisedStack;if(null===t.parent)throw new K(\"LMMI13668\");t.element.classList.remove(\"lm_maximised\"),this._maximisePlaceholder.insertAdjacentElement(\"afterend\",t.element),this._maximisePlaceholder.remove(),this.updateRootSize(!0),this._maximisedStack=void 0,t.off(\"beforeItemDestroyed\",this._maximisedStackBeforeDestroyedListener),t.emit(\"minimised\"),this.emit(\"stateChanged\")}}reconcilePopoutWindows(){const t=[];for(let e=0;e{this._resizeTimeoutId=void 0,this.beginSizeInvalidation(),this.endSizeInvalidation()}),this.resizeDebounceInterval))}checkClearResizeTimeout(){void 0!==this._resizeTimeoutId&&(clearTimeout(this._resizeTimeoutId),this._resizeTimeoutId=void 0)}setContainer(){var t;const e=document.body,i=null!==(t=this._containerElement)&&void 0!==t?t:e;if(i===e){this.resizeWithContainerAutomatically=!0;const t=document.documentElement;t.style.height=\"100%\",t.style.margin=\"0\",t.style.padding=\"0\",t.style.overflow=\"clip\",e.style.height=\"100%\",e.style.margin=\"0\",e.style.padding=\"0\",e.style.overflow=\"clip\"}this._containerElement=i}onBeforeUnload(){this.destroy()}adjustColumnsResponsive(){if(void 0===this._groundItem)throw new J(\"LMACR20883\");if(this._firstLoad=!1,this.useResponsiveLayout()&&!this._updatingColumnsResponsive&&this._groundItem.contentItems.length>0&&this._groundItem.contentItems[0].isRow){if(void 0===this._groundItem||null===this._width)throw new J(\"LMACR77412\");{const t=this._groundItem.contentItems[0].contentItems.length;if(t<=1)return;{const e=this.layoutConfig.dimensions.defaultMinItemWidth;if(t*e<=this._width)return;{this._updatingColumnsResponsive=!0;const i=t-Math.max(Math.floor(this._width/e),1),n=this._groundItem.contentItems[0],o=this.getAllStacks();if(0===o.length)throw new X(\"LMACRS77413\");{const t=o[0];for(let e=0;en?void 0:{parentItem:t,index:o}}}case 1:if(void 0===this._focusedComponentItem)return;{const t=this._focusedComponentItem.parentItem;return this.tryCreateLocationFromParentItem(t,e)}case 2:{const t=this.findFirstContentItemType(at.stack);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 3:{let t=this.findFirstContentItemType(at.row);return void 0!==t?this.tryCreateLocationFromParentItem(t,e):(t=this.findFirstContentItemType(at.column),void 0!==t?this.tryCreateLocationFromParentItem(t,e):void 0)}case 4:{const t=this.findFirstContentItemType(at.row);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 5:{const t=this.findFirstContentItemType(at.column);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 6:if(void 0===this._groundItem)throw new J(\"LMFLRIF18244\");return void 0!==this.rootItem?void 0:void 0===e||0===e?{parentItem:this._groundItem,index:0}:void 0;case 7:if(void 0===this._groundItem)throw new J(\"LMFLF18244\");{const t=this._groundItem.contentItems;if(0===t.length)return void 0===e||0===e?{parentItem:this._groundItem,index:0}:void 0;{const i=t[0];return this.tryCreateLocationFromParentItem(i,e)}}}}tryCreateLocationFromParentItem(t,e){const i=t.contentItems.length;return void 0===e?{parentItem:t,index:i}:e<0||e>i?void 0:{parentItem:t,index:e}}}!function(t){t.createMaximisePlaceElement=function(t){const e=t.createElement(\"div\");return e.classList.add(\"lm_maximise_place\"),e},t.createTabDropPlaceholderElement=function(t){const e=t.createElement(\"div\");return e.classList.add(\"lm_drop_tab_placeholder\"),e},t.defaultLocationSelectors=[{typeId:1,index:void 0},{typeId:2,index:void 0},{typeId:3,index:void 0},{typeId:7,index:void 0}],t.afterFocusedItemIfPossibleLocationSelectors=[{typeId:0,index:1},{typeId:2,index:void 0},{typeId:3,index:void 0},{typeId:7,index:void 0}]}(ae||(ae={}));class le extends ae{constructor(t,e,i,n){if(super(le.createLayoutManagerConstructorParameters(t,e)),this._bindComponentEventHanlderPassedInConstructor=!1,this._creationTimeoutPassed=!1,void 0!==e&&\"function\"==typeof e&&(this.bindComponentEvent=e,this._bindComponentEventHanlderPassedInConstructor=!0,void 0!==i&&(this.unbindComponentEvent=i)),!this._bindComponentEventHanlderPassedInConstructor&&this.isSubWindow){if(void 0===this._constructorOrSubWindowLayoutConfig)throw new J(\"VLC98823\");{const t=xt.resolve(this._constructorOrSubWindowLayoutConfig);this.layoutConfig=Object.assign(Object.assign({},t),{root:void 0})}}!0!==n&&(this.deprecatedConstructor||this.init())}destroy(){this.bindComponentEvent=void 0,this.unbindComponentEvent=void 0,super.destroy()}init(){if(this._bindComponentEventHanlderPassedInConstructor||\"loading\"!==document.readyState&&null!==document.body){if(!this._bindComponentEventHanlderPassedInConstructor&&!0===this.isSubWindow&&!this._creationTimeoutPassed)return setTimeout((()=>this.init()),7),void(this._creationTimeoutPassed=!0);!0===this.isSubWindow&&(this._bindComponentEventHanlderPassedInConstructor||this.clearHtmlAndAdjustStylesForSubWindow(),window.__glInstance=this),super.init()}else document.addEventListener(\"DOMContentLoaded\",(()=>this.init()),{passive:!0})}clearHtmlAndAdjustStylesForSubWindow(){const t=document.head,e=new Array(4);e[0]=document.querySelectorAll(\"body link\"),e[1]=document.querySelectorAll(\"body style\"),e[2]=document.querySelectorAll(\"template\"),e[3]=document.querySelectorAll(\".gl_keep\");for(let i=0;ithis.emit(\"popIn\"))),document.body.appendChild(t),!0}}bindComponent(t,e){if(void 0!==this.bindComponentEvent){return this.bindComponentEvent(t,e)}if(void 0!==this.getComponentEvent)return{virtual:!1,component:this.getComponentEvent(t,e)};{const t=`${tt[2]}: ${JSON.stringify(e)}`;throw new Z(t)}}unbindComponent(t,e,i){if(void 0!==this.unbindComponentEvent)this.unbindComponentEvent(t);else if(!e&&void 0!==this.releaseComponentEvent){if(void 0===i)throw new J(\"VCUCRCU333998\");this.releaseComponentEvent(t,i)}}}!function(t){let e=!1;t.createLayoutManagerConstructorParameters=function(t,i){const n=e?null:new URL(document.location.href).searchParams.get(\"gl-window\");e=!0;const o=null!==n;let s,r;if(null!==n){const e=localStorage.getItem(n);if(null===e)throw new Error(\"Null gl-window Config\");localStorage.removeItem(n);const i=JSON.parse(e),o=_t.unminifyConfig(i);r=xt.fromResolved(o),t instanceof HTMLElement&&(s=t)}else void 0===t?r=void 0:t instanceof HTMLElement?(r=void 0,s=t):r=t,void 0===s&&i instanceof HTMLElement&&(s=i);return{constructorOrSubWindowLayoutConfig:r,isSubWindow:o,containerElement:s}}}(le||(le={}));class he extends le{constructor(t,e,i){super(t,e,i,!0),this._componentTypesMap=new Map,this._registeredComponentMap=new Map,this._virtuableComponentMap=new Map,this._containerVirtualRectingRequiredEventListener=(t,e,i)=>this.handleContainerVirtualRectingRequiredEvent(t,e,i),this._containerVirtualVisibilityChangeRequiredEventListener=(t,e)=>this.handleContainerVirtualVisibilityChangeRequiredEvent(t,e),this._containerVirtualZIndexChangeRequiredEventListener=(t,e,i)=>this.handleContainerVirtualZIndexChangeRequiredEvent(t,e,i),this.deprecatedConstructor||this.init()}registerComponent(t,e,i=!1){if(\"function\"!=typeof e)throw new $(\"registerComponent() componentConstructorOrFactoryFtn parameter is not a function\");if(e.hasOwnProperty(\"prototype\")){const n=e;this.registerComponentConstructor(t,n,i)}else{const n=e;this.registerComponentFactoryFunction(t,n,i)}}registerComponentConstructor(t,e,i=!1){if(\"function\"!=typeof e)throw new Error(tt[1]);if(void 0!==this._componentTypesMap.get(t))throw new Z(`${tt[3]}: ${t}`);this._componentTypesMap.set(t,{constructor:e,factoryFunction:void 0,virtual:i})}registerComponentFactoryFunction(t,e,i=!1){if(\"function\"!=typeof e)throw new Z(\"Please register a constructor function\");if(void 0!==this._componentTypesMap.get(t))throw new Z(`${tt[3]}: ${t}`);this._componentTypesMap.set(t,{constructor:void 0,factoryFunction:e,virtual:i})}registerComponentFunction(t){this.registerGetComponentConstructorCallback(t)}registerGetComponentConstructorCallback(t){if(\"function\"!=typeof t)throw new Error(\"Please register a callback function\");void 0!==this._getComponentConstructorFtn&&console.warn(\"Multiple component functions are being registered. Only the final registered function will be used.\"),this._getComponentConstructorFtn=t}getRegisteredComponentTypeNames(){const t=this._componentTypesMap.keys();return Array.from(t)}getComponentInstantiator(t){let e;const i=pt.resolveComponentTypeName(t);return void 0!==i&&(e=this._componentTypesMap.get(i)),void 0===e&&void 0!==this._getComponentConstructorFtn&&(e={constructor:this._getComponentConstructorFtn(t),factoryFunction:void 0,virtual:!1}),e}bindComponent(t,e){let i;const n=pt.resolveComponentTypeName(e);let o;if(void 0!==n&&(i=this._componentTypesMap.get(n)),void 0===i&&void 0!==this._getComponentConstructorFtn&&(i={constructor:this._getComponentConstructorFtn(e),factoryFunction:void 0,virtual:!1}),void 0!==i){const s=i.virtual;let r,a;r=void 0===e.componentState?void 0:Ut({},e.componentState);const l=i.constructor;if(void 0!==l)a=new l(t,r,s);else{const e=i.factoryFunction;if(void 0===e)throw new X(\"LMBCFFU10008\");a=e(t,r,s)}if(s){if(void 0===a)throw new J(\"GLBCVCU988774\");{const e=a,i=e.rootHtmlElement;if(void 0===i)throw new Z(`${tt[5]}: ${n}`);!function(t){const e=\"absolute\";t.style.position!==e&&(t.style.position=e)}(i),this.container.appendChild(i),this._virtuableComponentMap.set(t,e),t.virtualRectingRequiredEvent=this._containerVirtualRectingRequiredEventListener,t.virtualVisibilityChangeRequiredEvent=this._containerVirtualVisibilityChangeRequiredEventListener,t.virtualZIndexChangeRequiredEvent=this._containerVirtualZIndexChangeRequiredEventListener}}this._registeredComponentMap.set(t,a),o={virtual:i.virtual,component:a}}else o=super.bindComponent(t,e);return o}unbindComponent(t,e,i){if(void 0===this._registeredComponentMap.get(t))super.unbindComponent(t,e,i);else{const e=this._virtuableComponentMap.get(t);if(void 0!==e){const i=e.rootHtmlElement;if(void 0===i)throw new X(\"GLUC77743\",t.title);this.container.removeChild(i),this._virtuableComponentMap.delete(t)}}}fireBeforeVirtualRectingEvent(t){this._goldenLayoutBoundingClientRect=this.container.getBoundingClientRect(),super.fireBeforeVirtualRectingEvent(t)}handleContainerVirtualRectingRequiredEvent(t,e,i){const n=this._virtuableComponentMap.get(t);if(void 0===n)throw new J(\"GLHCSCE55933\");{const o=n.rootHtmlElement;if(void 0===o)throw new Z(tt[4]+\" \"+t.title);{const n=t.element.getBoundingClientRect(),s=n.left-this._goldenLayoutBoundingClientRect.left;o.style.left=zt(s);const r=n.top-this._goldenLayoutBoundingClientRect.top;o.style.top=zt(r),Tt(o,e),At(o,i)}}}handleContainerVirtualVisibilityChangeRequiredEvent(t,e){const i=this._virtuableComponentMap.get(t);if(void 0===i)throw new J(\"GLHCVVCRE55934\");{const n=i.rootHtmlElement;if(void 0===n)throw new Z(tt[4]+\" \"+t.title);Dt(n,e)}}handleContainerVirtualZIndexChangeRequiredEvent(t,e,i){const n=this._virtuableComponentMap.get(t);if(void 0===n)throw new J(\"GLHCVZICRE55935\");{const e=n.rootHtmlElement;if(void 0===e)throw new Z(tt[4]+\" \"+t.title);e.style.zIndex=i}}}const de=\"initial_\",ce={show:\"top\",popout:!1,maximise:!1,close:\"close-tab-unused\"},me={headerHeight:31},ue={hasHeaders:!0,reorderEnabled:!0},pe={popoutWholeStack:!1,constrainDragToContainer:!1,constrainDragToHeaders:!1,preventDragout:!1,showMaximiseIcon:!1,showPopoutIcon:!1,showCloseIcon:!1,blockedPopoutsThrowError:!0,closePopoutsOnUnload:!0,selectionEnabled:!1};var ge,fe;class ve{constructor(e){this.layout=e,ge.set(this,void 0),fe.set(this,void 0),this.handleResize=t=>{t.forEach((t=>this.resizeElement(t.target)))},this.handleMutation=()=>{this.layout.viewComponentsByContainerElement.forEach((t=>{this.resizeElement(t.container.element)}))},t.__classPrivateFieldSet(this,ge,new ResizeObserver(this.handleResize),\"f\"),t.__classPrivateFieldSet(this,fe,new MutationObserver(this.handleMutation),\"f\")}observeMutations(e){t.__classPrivateFieldGet(this,fe,\"f\")?.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[\"class\"]})}destroy(){t.__classPrivateFieldGet(this,ge,\"f\").disconnect(),t.__classPrivateFieldGet(this,fe,\"f\").disconnect()}observeContainer(e){t.__classPrivateFieldGet(this,ge,\"f\").observe(e)}unobserveContainer(e){t.__classPrivateFieldGet(this,ge,\"f\").unobserve(e)}resizeElement(t){const e=this.layout.viewComponentsByContainerElement.get(t);e&&e.resize()}}ge=new WeakMap,fe=new WeakMap;var _e={};Object.defineProperty(_e,\"__esModule\",{value:!0});var ye=_e.BaseItem=void 0;class Ce{constructor(t,e,i){this._item=t,this._layout=e,this._wrap=i}get raw(){return this._item}get layout(){return this._layout}get type(){return this._item.type}get contentItems(){return(this._item.contentItems??[]).map((t=>this._wrap(t)))}get parent(){const t=this._item.parent;return t?this._wrap(t):null}setActiveContentItem(t,e){if(\"stack\"!==this.type)throw new Error(`Cannot call setActiveContentItem from a non-stack item: ${this.type}`);this._item.setActiveContentItem(t.raw,e)}static wrapInternal(t,e,i){const n=Ce.wrapCache.get(e);if(n)return n;const o=new t(e,i,(e=>Ce.wrapInternal(t,e,i)));return Ce.wrapCache.set(e,o),o}}ye=_e.BaseItem=Ce,Ce.wrapCache=new WeakMap;const we=t=>!!t&&\"contentItems\"in t&&(t.isRow||t.isColumn);class Ie extends ye{isRoot(){return!!this._item.parent?.isGround}getBounds(){return this._item.element.getBoundingClientRect()}get viewName(){if(this._item.isComponent){const{component:t}=this._item;return t.identity.name}throw new Error(\"View name not found\")}onDestroyed(t){const e=({target:i})=>{i===this._item&&(t(),this._item.off(\"itemDestroyed\",e))};this._item.on(\"itemDestroyed\",e)}createAdjacentStack({position:t=\"right\"}={}){const e=this.raw;if(ee.isStack(e)&&e.parent){const i=[\"top\",\"bottom\"].includes(t)?\"column\":\"row\",n=[\"left\",\"top\"].includes(t)?1:0,o=we(e.parent)?e.parent:e.layoutManager,s=o,r=e.parent.contentItems.indexOf(e);e.parent.isGround&&e.parent.removeChild(e,!0);const a=o.newItem({type:i,content:[{type:\"stack\",content:[]}]},r);if(!a)throw new Error(\"createAdjacentStack: Failed to create new container\");const l=a.contentItems[0];return a.addChild(this.raw,n),we(s)&&s.removeChild(e,!0),this._wrap(l)}throw new Error(`Cannot creat adjacent stacks for type: ${e.type}, must be type 'stack'`)}setActiveContentItem(t,e=!0){if(!ee.isStack(this._item))throw new Error(`Cannot call setActiveContentItem from a non-stack item: ${this.type}`);this._item.setActiveComponentItem(t.raw,!e)}static wrap(t,e){return ye.wrapInternal(Ie,t,e)}}function be(t=[],e){for(const i of t)\"component\"===i.type?Object.keys(e).forEach((t=>{t in i&&(i.componentState={[`${de}${t}`]:i[t],...i.componentState}),i[t]=e[t]})):be(i.content,e)}function Se(t=[],e,i){for(const n of t)if(\"component\"===n.type)Object.keys(e).forEach((t=>{if(`${de}${t}`in n.componentState)return n[t]=n.componentState[`${de}${t}`],void delete n.componentState[`${de}${t}`];n[t]=e[t]}));else{if(n.size&&(\"row\"===i||\"column\"===i)){n[\"row\"===i?\"width\":\"height\"]=n.size?.includes(\".\")?parseFloat(n.size):parseInt(n.size)}Se(n.content,e,n.type)}}function Ee(t){if(t.root){t.root.content&&Se([t.root],{componentName:\"view\",isClosable:!0});const e=t.root;t.content=[e],delete t.root}return t}const xe=e=>class extends e{connectedCallback(){if(!this.name||!this.uuid)throw new Error(\" Name or uuid attribute missing\");if(!this.src)throw new Error(\" missing 'src' attribute.\");this.#t||(this.#t=document.createElement(\"iframe\"),this.#t.src=this.src,this.#t.style.height=\"100%\",this.#t.style.width=\"100%\",this.#t.style.border=\"none\",this.forceFrameName?this.#t.setAttribute(\"name\",this.forceFrameName):this.#t.setAttribute(\"name\",t.encodeOptions({brokerUrl:this.brokerUrl,name:this.name,uuid:this.uuid,providerId:this.providerId,contextGroup:this.contextGroup},\"of-frame\")),this.#t.setAttribute(\"id\",this.name),this.appendChild(this.#t))}#t;get brokerUrl(){return this.getAttribute(\"of-broker\")}set brokerUrl(t){t&&this.setAttribute(\"of-broker\",t)}get name(){return this.getAttribute(\"of-name\")}set name(t){t&&this.setAttribute(\"of-name\",t)}get forceFrameName(){return this.getAttribute(\"forceFrameName\")}set forceFrameName(t){t&&this.setAttribute(\"forceFrameName\",t)}get uuid(){return this.getAttribute(\"of-uuid\")}set uuid(t){t&&this.setAttribute(\"of-uuid\",t)}get src(){return this.getAttribute(\"src\")}set src(t){t&&this.setAttribute(\"src\",t)}get providerId(){return this.getAttribute(\"of-provider-id\")}set providerId(t){t&&this.setAttribute(\"of-provider-id\",t)}get contextGroup(){return this.getAttribute(\"of-context-group\")}set contextGroup(t){t&&this.setAttribute(\"of-context-group\",t)}static get observedAttributes(){return[\"name\"]}};class Le{static create(t){const e=document.createElement(\"of-view\");return Object.entries(t).forEach((([t,i])=>{e.setAttribute(t,i)})),e}}customElements.define(\"of-view\",xe(HTMLElement));class ze{constructor(t,i,n,{brokerUrl:o,interopConfig:s},r){this.container=t,this.config=i,this.ofView=null,this.isDragging=()=>this.container.tab.element?.className.includes(\"lm_dragging\")??!1;const{url:a,web:l,interop:h,name:d}=i||{},c=d??`internal-generated-view-${e.v4()}`;if(this.identity={uuid:n,name:c},this.container.element.setAttribute(\"of-name\",c),this.container.element.id=`container-${c}`,this.container.parent.id=c,void 0===a)return void this.handleUrlMissing();const m=this.updateTitleIfNotSet(a),u={\"of-broker\":o,\"of-uuid\":n,\"of-name\":c,src:a};l?.frameName&&(u.forceFrameName=l.frameName);const p=h?.currentContextGroup??s?.currentContextGroup;p&&(u[\"of-context-group\"]=p),s?.providerId&&(u[\"of-provider-id\"]=s?.providerId),this.ofView=Le.create(u),this.ofView.title=m??`Iframe: ${a}`,r.appendChild(this.ofView),this.ofView.style.position=\"absolute\"}updateTitleIfNotSet(t){return\"view\"===this.container.parent.title&&this.container.parent.setTitle(t),this.container.parent.title}handleUrlMissing(){const t=document.createElement(\"div\");t.setAttribute(\"style\",\"padding: 20px\");t.innerText=\"No URL provided\",this.container.element.appendChild(t)}destroy(){this.ofView?.remove(),this.ofView=null}closeView(){this.container.close()}resize(){if(this.ofView){if(this.isDragging())return void(this.ofView.style.display=\"none\");const t=this.container.element.getBoundingClientRect();this.ofView.style.position=\"absolute\",this.ofView.style.height=`${t.height}px`,this.ofView.style.width=`${t.width}px`,this.ofView.style.inset=`${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`,this.ofView.style.display=\"block\"}}}class Me extends U{static overrideConfig(t){const e={...ue,...t.settings,...pe};return e.reorderEnabled?be(t.content,{isClosable:!0}):be(t.content,{reorderEnabled:!1}),{dimensions:me,...t,settings:e,header:{...ce,show:!1!==t.settings?.hasHeaders&&ce.show}}}constructor(t,e,i,{options:n},o,s){super(),this.identity=t,this.container=e,this.initialConfig=i,this.layoutManager=o,this.platformProvider=s,this.viewComponentsByContainerElement=new Map,this.layoutContentCache=_.getSingleInstance(),this.reparentingViews=new Set,this.goldenLayoutDestroyed=!1,this.createViewComponent=(t,e)=>{m.handleSharedView(this.layoutManager,this.identity,e);const i=new ze(t,e,this.identity.uuid,this.options,this.iframeContainer);return e&&!1===e[`${de}isClosable`]&&this.stylesheet.insertRule(`#tab-${i.identity.name} .lm_close_tab { display: none; }`),this.viewComponentsByContainerElement.set(t.element,i),this.resizeController.observeContainer(t.element),i},this.iframeContainer=document.createElement(\"div\"),this.iframeContainer.id=`openfin-layout-iframe-container-${this.identity.layoutName}`,this.domEmitter=new V(e),this.setupStylesheets(),this.layout=new he(this.container),this.layout.resizeWithContainerAutomatically=!0,this.options=n,this.layout.registerComponent(\"view\",this.createViewComponent),this.setupListeners(),this.resizeController=new ve(this),this.layout.loadLayout(Me.overrideConfig(i));const r=document.createElement(\"div\");r.id=`openfin-layout-shadow-container-${this.identity.layoutName}`,r.attachShadow({mode:\"open\",delegatesFocus:!1}).appendChild(this.iframeContainer),this.container.appendChild(r),this.resizeController.observeMutations(this.container)}getStackByView({name:t}){const e=this.layout.findFirstComponentItemById(t);if(e?.parent&&e?.parent?.isStack)return Ie.wrap(e.parent,this)}getRoot(){return Ie.wrap(this.layout.rootItem,this)}async platformCloseView(t){const e=[...this.viewComponentsByContainerElement.values()].find((e=>e.identity.name===t.name));if(!e)throw new Error(`View with name: ${t.name} not found in layout.`);e.closeView()}async platformCreateView(t,{location:e,targetView:i}={}){if(i)throw new Error(\"TargetView not supported in web\");const n={options:this.platformProvider.normalizeOptions(t),target:this.identity,location:e};return this.insertView(n)}setupStylesheets(){if(this.container.setAttribute(\"data-openfin-layout-name\",this.identity.layoutName),this.stylesheet=new CSSStyleSheet,this.stylesheet.insertRule(\".lm_close { display: none; }\"),document.adoptedStyleSheets.push(this.stylesheet),this.initialConfig.settings?.preventSplitterResize){const t=`\\n [data-openfin-layout-name='${this.identity.layoutName}'] .lm_splitter {\\n pointer-events: none;\\n }`;this.stylesheet.insertRule(t)}}insertView({options:t,location:e,targetView:i}){const n=e?this.layoutContentCache.getItemOrUndefined(e.id):void 0,o=i?this.layoutContentCache.getItemOrUndefined(i.name):void 0,s=n??o??Ie.wrap(this.layout.rootItem,this);let r;if(ee.isStack(s.raw))r=s.raw;else{if(!we(s.raw))throw new Error(\"Cannot add a view at the requested location\");r=s.raw.newItem({type:\"stack\",content:[]})}const a=Math.min(r.contentItems.length,e?.index??r.contentItems.length);let l=this.layout.findFirstComponentItemById(t.name);l?(l.parent&&l.parent.removeChild(l,!0),r.addChild(l,a)):l=r.newComponent(\"view\",t,t.title??t.url??\"Default Title\",a);const h=l.component.identity;return Promise.resolve({identity:h})}replaceView({viewToReplace:t,newView:e}){throw new Error(\"Method not implemented.\")}replaceLayout(t){throw new Error(\"Method not implemented.\")}async cleanupView(t){}applyPreset(t){throw new Error(\"Method not implemented.\")}getCurrentViews(){return[...this.viewComponentsByContainerElement.values()].map((t=>t.identity))}async getFrameSnapshot(){return Ee(xt.fromResolved(this.layout.toConfig()))}isVisible(){return W(this.container)}async onViewDetached({viewIdentity:t}){this.reparentingViews.add(t.name),this.platformCloseView(t)}async destroy(){this.goldenLayoutDestroyed||(this.goldenLayoutDestroyed=!0,this.layout.destroy()),this.iframeContainer.remove(),this.resizeController.destroy(),document.adoptedStyleSheets=document.adoptedStyleSheets.filter((t=>t!==this.stylesheet)),this.viewComponentsByContainerElement.clear()}setupListeners(){this.container.addEventListener(\"pointerdown\",(t=>{if(t.target instanceof HTMLElement){const e=t.target.classList;[\"lm_tab\",\"lm_title\",\"lm_splitter\",\"lm_drag_handle\"].some((t=>e.contains(t)))&&(this.handleDragStart(),2===t.button&&t.stopPropagation())}}),!0),document.addEventListener(\"pointerup\",(()=>this.handleDragEnd()),!0),this.layout.on(\"tabCreated\",(t=>{const e=t.componentItem.component;t.element.id=`tab-${e.identity.name}`,this.domEmitter.dispatchLocalEvent(\"tab-created\",e.identity)})),this.layout.on(\"itemCreated\",(({target:t})=>{const e=t;if(Gt.isComponentItem(e)){const t=e.component;this.domEmitter.dispatchLocalEvent(\"container-created\",t.identity)}})),this.layout.on(\"itemDestroyed\",(t=>{const e=t.target;if(Gt.isComponentItem(e)){const t=e.component;this.removeViewComponent(t)}})),this.layout.on(\"itemDropped\",(()=>{this.handleDragEnd()}))}handleDragStart(){this.iframeContainer.style.pointerEvents=\"none\"}handleDragEnd(){this.iframeContainer.style.pointerEvents=\"\"}removeViewComponent(t){if(t.config&&!1===t.config[`${de}isClosable`]){const e=[...this.stylesheet.cssRules].findIndex((e=>e.cssText.includes(`#tab-${t.identity.name}`)));this.stylesheet.deleteRule(e)}t.destroy(),this.viewComponentsByContainerElement.delete(t.container.element),this.resizeController.unobserveContainer(t.container.element),this.reparentingViews.has(t.identity.name)?this.reparentingViews.delete(t.identity.name):this.platformProvider.closeView(t.identity.name);0===this.getCurrentViews().length&&(this.goldenLayoutDestroyed||(this.goldenLayoutDestroyed=!0,m.handleLastViewRemoved(this.layoutManager,this.identity)))}}class Pe{constructor(t,e,i,n){this.windowIdentity=t,this.connectConfig=e,this.provider=i,this.fallbackContainer=n}async createLayout(t,e){if(!(\"container\"in t)&&!this.fallbackContainer)throw new Error(\"Container property is not optional in web\");const{layoutName:i}=t,n=t,o=this.provider.initLayoutViews(n),s=n.container??this.fallbackContainer,r={...this.windowIdentity,layoutName:i},a=new Me(r,s,o,this.connectConfig,e,this.provider);m.registerLayout(e,i,a),this.fallbackContainer=null}async getLayoutSnapshot(t){return t.getLayoutSnapshot()}async handleLastViewRemoved(t){}}class Te{static async init(e){const i=e.getFin().InterApplicationBus.Channel,n=await i.create(`custom-frame-${e.me.uuid}`);return n.setDefaultAction((async(t,{target:e,opts:i},o)=>{const s=n.connections.find((t=>t.name===e.name));if(s)return n.dispatch(s,t,{...i,target:e});throw new Error(`Client with name ${e.name} not found`)})),await t.relayChannelClientApi_1(n,\"layout-relay\"),new Te(e)}constructor(t){this.wire=t,this.viewNames=new Set}normalizeOptions(t,i=\"default\"){const n=this.wire.me.uuid;let{name:o=`internal-generated-view-${e.v4()}`}=t;return o.match(/^internal-generated-view-/)&&this.viewNames.has(o)&&\"duplicate\"===i&&(o=`internal-generated-view-${e.v4()}`),this.viewNames.add(o),{...t,name:o,uuid:n}}closeView(t){this.viewNames.delete(t)}initLayoutViews({layout:t,multiInstanceViewBehavior:e}){return H((t=>{if(\"component\"===t.type&&t.componentState){const i=this.normalizeOptions(t.componentState,e);return{...t,componentState:i}}return t}),t)}}var Ae;const ke=t=>t;Ae=new WeakMap,exports.WebLayoutEntryPoint=class{constructor(e){Ae.set(this,void 0),this.initLayoutManager=async(e,i,{container:n,layoutManagerOverride:o})=>{const s=await Te.init(i),r=o??ke,a=new Pe(i.me,t.__classPrivateFieldGet(this,Ae,\"f\"),s,n),l=new(r(m.createClosedConstructor(a)));return await M(i,l),l},this.applyLayoutSnapshot=async(e,i,n)=>{await i.applyLayoutSnapshot(t.__classPrivateFieldGet(this,Ae,\"f\").platform.layoutSnapshot)},this.createLayout=async(t,e)=>m.createLayout(t,e),this.destroyLayout=async(t,e)=>m.destroyLayout(t,e),t.__classPrivateFieldSet(this,Ae,e,\"f\")}};\n","'use strict'\n\nexports.byteLength = byteLength\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\nfor (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i]\n revLookup[code.charCodeAt(i)] = i\n}\n\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction getLens (b64) {\n var len = b64.length\n\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // Trim off extra bytes after placeholder bytes are found\n // See: https://github.com/beatgammit/base64-js/issues/42\n var validLen = b64.indexOf('=')\n if (validLen === -1) validLen = len\n\n var placeHoldersLen = validLen === len\n ? 0\n : 4 - (validLen % 4)\n\n return [validLen, placeHoldersLen]\n}\n\n// base64 is 4/3 + up to two characters of the original data\nfunction byteLength (b64) {\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction _byteLength (b64, validLen, placeHoldersLen) {\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction toByteArray (b64) {\n var tmp\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n\n var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))\n\n var curByte = 0\n\n // if there are placeholders, only get up to the last complete 4 chars\n var len = placeHoldersLen > 0\n ? validLen - 4\n : validLen\n\n var i\n for (i = 0; i < len; i += 4) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 18) |\n (revLookup[b64.charCodeAt(i + 1)] << 12) |\n (revLookup[b64.charCodeAt(i + 2)] << 6) |\n revLookup[b64.charCodeAt(i + 3)]\n arr[curByte++] = (tmp >> 16) & 0xFF\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 2) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 2) |\n (revLookup[b64.charCodeAt(i + 1)] >> 4)\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 1) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 10) |\n (revLookup[b64.charCodeAt(i + 1)] << 4) |\n (revLookup[b64.charCodeAt(i + 2)] >> 2)\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] +\n lookup[num >> 12 & 0x3F] +\n lookup[num >> 6 & 0x3F] +\n lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n var tmp\n var output = []\n for (var i = start; i < end; i += 3) {\n tmp =\n ((uint8[i] << 16) & 0xFF0000) +\n ((uint8[i + 1] << 8) & 0xFF00) +\n (uint8[i + 2] & 0xFF)\n output.push(tripletToBase64(tmp))\n }\n return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n var tmp\n var len = uint8.length\n var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n var parts = []\n var maxChunkLength = 16383 // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1]\n parts.push(\n lookup[tmp >> 2] +\n lookup[(tmp << 4) & 0x3F] +\n '=='\n )\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + uint8[len - 1]\n parts.push(\n lookup[tmp >> 10] +\n lookup[(tmp >> 4) & 0x3F] +\n lookup[(tmp << 2) & 0x3F] +\n '='\n )\n }\n\n return parts.join('')\n}\n","/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n/* eslint-disable no-proto */\n\n'use strict'\n\nconst base64 = require('base64-js')\nconst ieee754 = require('ieee754')\nconst customInspectSymbol =\n (typeof Symbol === 'function' && typeof Symbol['for'] === 'function') // eslint-disable-line dot-notation\n ? Symbol['for']('nodejs.util.inspect.custom') // eslint-disable-line dot-notation\n : null\n\nexports.Buffer = Buffer\nexports.SlowBuffer = SlowBuffer\nexports.INSPECT_MAX_BYTES = 50\n\nconst K_MAX_LENGTH = 0x7fffffff\nexports.kMaxLength = K_MAX_LENGTH\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Print warning and recommend using `buffer` v4.x which has an Object\n * implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * We report that the browser does not support typed arrays if the are not subclassable\n * using __proto__. Firefox 4-29 lacks support for adding new properties to `Uint8Array`\n * (See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438). IE 10 lacks support\n * for __proto__ and has a buggy typed array implementation.\n */\nBuffer.TYPED_ARRAY_SUPPORT = typedArraySupport()\n\nif (!Buffer.TYPED_ARRAY_SUPPORT && typeof console !== 'undefined' &&\n typeof console.error === 'function') {\n console.error(\n 'This browser lacks typed array (Uint8Array) support which is required by ' +\n '`buffer` v5.x. Use `buffer` v4.x if you require old browser support.'\n )\n}\n\nfunction typedArraySupport () {\n // Can typed array instances can be augmented?\n try {\n const arr = new Uint8Array(1)\n const proto = { foo: function () { return 42 } }\n Object.setPrototypeOf(proto, Uint8Array.prototype)\n Object.setPrototypeOf(arr, proto)\n return arr.foo() === 42\n } catch (e) {\n return false\n }\n}\n\nObject.defineProperty(Buffer.prototype, 'parent', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.buffer\n }\n})\n\nObject.defineProperty(Buffer.prototype, 'offset', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.byteOffset\n }\n})\n\nfunction createBuffer (length) {\n if (length > K_MAX_LENGTH) {\n throw new RangeError('The value \"' + length + '\" is invalid for option \"size\"')\n }\n // Return an augmented `Uint8Array` instance\n const buf = new Uint8Array(length)\n Object.setPrototypeOf(buf, Buffer.prototype)\n return buf\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new TypeError(\n 'The \"string\" argument must be of type string. Received type number'\n )\n }\n return allocUnsafe(arg)\n }\n return from(arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\nfunction from (value, encodingOrOffset, length) {\n if (typeof value === 'string') {\n return fromString(value, encodingOrOffset)\n }\n\n if (ArrayBuffer.isView(value)) {\n return fromArrayView(value)\n }\n\n if (value == null) {\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n }\n\n if (isInstance(value, ArrayBuffer) ||\n (value && isInstance(value.buffer, ArrayBuffer))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof SharedArrayBuffer !== 'undefined' &&\n (isInstance(value, SharedArrayBuffer) ||\n (value && isInstance(value.buffer, SharedArrayBuffer)))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof value === 'number') {\n throw new TypeError(\n 'The \"value\" argument must not be of type number. Received type number'\n )\n }\n\n const valueOf = value.valueOf && value.valueOf()\n if (valueOf != null && valueOf !== value) {\n return Buffer.from(valueOf, encodingOrOffset, length)\n }\n\n const b = fromObject(value)\n if (b) return b\n\n if (typeof Symbol !== 'undefined' && Symbol.toPrimitive != null &&\n typeof value[Symbol.toPrimitive] === 'function') {\n return Buffer.from(value[Symbol.toPrimitive]('string'), encodingOrOffset, length)\n }\n\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n return from(value, encodingOrOffset, length)\n}\n\n// Note: Change prototype *after* Buffer.from is defined to workaround Chrome bug:\n// https://github.com/feross/buffer/pull/148\nObject.setPrototypeOf(Buffer.prototype, Uint8Array.prototype)\nObject.setPrototypeOf(Buffer, Uint8Array)\n\nfunction assertSize (size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be of type number')\n } else if (size < 0) {\n throw new RangeError('The value \"' + size + '\" is invalid for option \"size\"')\n }\n}\n\nfunction alloc (size, fill, encoding) {\n assertSize(size)\n if (size <= 0) {\n return createBuffer(size)\n }\n if (fill !== undefined) {\n // Only pay attention to encoding if it's a string. This\n // prevents accidentally sending in a number that would\n // be interpreted as a start offset.\n return typeof encoding === 'string'\n ? createBuffer(size).fill(fill, encoding)\n : createBuffer(size).fill(fill)\n }\n return createBuffer(size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n return alloc(size, fill, encoding)\n}\n\nfunction allocUnsafe (size) {\n assertSize(size)\n return createBuffer(size < 0 ? 0 : checked(size) | 0)\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n return allocUnsafe(size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n return allocUnsafe(size)\n}\n\nfunction fromString (string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8'\n }\n\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n\n const length = byteLength(string, encoding) | 0\n let buf = createBuffer(length)\n\n const actual = buf.write(string, encoding)\n\n if (actual !== length) {\n // Writing a hex string, for example, that contains invalid characters will\n // cause everything after the first invalid character to be ignored. (e.g.\n // 'abxxcd' will be treated as 'ab')\n buf = buf.slice(0, actual)\n }\n\n return buf\n}\n\nfunction fromArrayLike (array) {\n const length = array.length < 0 ? 0 : checked(array.length) | 0\n const buf = createBuffer(length)\n for (let i = 0; i < length; i += 1) {\n buf[i] = array[i] & 255\n }\n return buf\n}\n\nfunction fromArrayView (arrayView) {\n if (isInstance(arrayView, Uint8Array)) {\n const copy = new Uint8Array(arrayView)\n return fromArrayBuffer(copy.buffer, copy.byteOffset, copy.byteLength)\n }\n return fromArrayLike(arrayView)\n}\n\nfunction fromArrayBuffer (array, byteOffset, length) {\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\"offset\" is outside of buffer bounds')\n }\n\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\"length\" is outside of buffer bounds')\n }\n\n let buf\n if (byteOffset === undefined && length === undefined) {\n buf = new Uint8Array(array)\n } else if (length === undefined) {\n buf = new Uint8Array(array, byteOffset)\n } else {\n buf = new Uint8Array(array, byteOffset, length)\n }\n\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(buf, Buffer.prototype)\n\n return buf\n}\n\nfunction fromObject (obj) {\n if (Buffer.isBuffer(obj)) {\n const len = checked(obj.length) | 0\n const buf = createBuffer(len)\n\n if (buf.length === 0) {\n return buf\n }\n\n obj.copy(buf, 0, 0, len)\n return buf\n }\n\n if (obj.length !== undefined) {\n if (typeof obj.length !== 'number' || numberIsNaN(obj.length)) {\n return createBuffer(0)\n }\n return fromArrayLike(obj)\n }\n\n if (obj.type === 'Buffer' && Array.isArray(obj.data)) {\n return fromArrayLike(obj.data)\n }\n}\n\nfunction checked (length) {\n // Note: cannot use `length < K_MAX_LENGTH` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= K_MAX_LENGTH) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + K_MAX_LENGTH.toString(16) + ' bytes')\n }\n return length | 0\n}\n\nfunction SlowBuffer (length) {\n if (+length != length) { // eslint-disable-line eqeqeq\n length = 0\n }\n return Buffer.alloc(+length)\n}\n\nBuffer.isBuffer = function isBuffer (b) {\n return b != null && b._isBuffer === true &&\n b !== Buffer.prototype // so Buffer.isBuffer(Buffer.prototype) will be false\n}\n\nBuffer.compare = function compare (a, b) {\n if (isInstance(a, Uint8Array)) a = Buffer.from(a, a.offset, a.byteLength)\n if (isInstance(b, Uint8Array)) b = Buffer.from(b, b.offset, b.byteLength)\n if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n throw new TypeError(\n 'The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array'\n )\n }\n\n if (a === b) return 0\n\n let x = a.length\n let y = b.length\n\n for (let i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i]\n y = b[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n switch (String(encoding).toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'latin1':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return true\n default:\n return false\n }\n}\n\nBuffer.concat = function concat (list, length) {\n if (!Array.isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n\n if (list.length === 0) {\n return Buffer.alloc(0)\n }\n\n let i\n if (length === undefined) {\n length = 0\n for (i = 0; i < list.length; ++i) {\n length += list[i].length\n }\n }\n\n const buffer = Buffer.allocUnsafe(length)\n let pos = 0\n for (i = 0; i < list.length; ++i) {\n let buf = list[i]\n if (isInstance(buf, Uint8Array)) {\n if (pos + buf.length > buffer.length) {\n if (!Buffer.isBuffer(buf)) buf = Buffer.from(buf)\n buf.copy(buffer, pos)\n } else {\n Uint8Array.prototype.set.call(\n buffer,\n buf,\n pos\n )\n }\n } else if (!Buffer.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n } else {\n buf.copy(buffer, pos)\n }\n pos += buf.length\n }\n return buffer\n}\n\nfunction byteLength (string, encoding) {\n if (Buffer.isBuffer(string)) {\n return string.length\n }\n if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) {\n return string.byteLength\n }\n if (typeof string !== 'string') {\n throw new TypeError(\n 'The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. ' +\n 'Received type ' + typeof string\n )\n }\n\n const len = string.length\n const mustMatch = (arguments.length > 2 && arguments[2] === true)\n if (!mustMatch && len === 0) return 0\n\n // Use a for loop to avoid recursion\n let loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'ascii':\n case 'latin1':\n case 'binary':\n return len\n case 'utf8':\n case 'utf-8':\n return utf8ToBytes(string).length\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return len * 2\n case 'hex':\n return len >>> 1\n case 'base64':\n return base64ToBytes(string).length\n default:\n if (loweredCase) {\n return mustMatch ? -1 : utf8ToBytes(string).length // assume utf8\n }\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n let loweredCase = false\n\n // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n // property of a typed array.\n\n // This behaves neither like String nor Uint8Array in that we set start/end\n // to their upper/lower bounds if the value passed is out of range.\n // undefined is handled specially as per ECMA-262 6th Edition,\n // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n if (start === undefined || start < 0) {\n start = 0\n }\n // Return early if start > this.length. Done here to prevent potential uint32\n // coercion fail below.\n if (start > this.length) {\n return ''\n }\n\n if (end === undefined || end > this.length) {\n end = this.length\n }\n\n if (end <= 0) {\n return ''\n }\n\n // Force coercion to uint32. This will also coerce falsey/NaN values to 0.\n end >>>= 0\n start >>>= 0\n\n if (end <= start) {\n return ''\n }\n\n if (!encoding) encoding = 'utf8'\n\n while (true) {\n switch (encoding) {\n case 'hex':\n return hexSlice(this, start, end)\n\n case 'utf8':\n case 'utf-8':\n return utf8Slice(this, start, end)\n\n case 'ascii':\n return asciiSlice(this, start, end)\n\n case 'latin1':\n case 'binary':\n return latin1Slice(this, start, end)\n\n case 'base64':\n return base64Slice(this, start, end)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return utf16leSlice(this, start, end)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = (encoding + '').toLowerCase()\n loweredCase = true\n }\n }\n}\n\n// This property is used by `Buffer.isBuffer` (and the `is-buffer` npm package)\n// to detect a Buffer instance. It's not possible to use `instanceof Buffer`\n// reliably in a browserify context because there could be multiple different\n// copies of the 'buffer' package in use. This method works even for Buffer\n// instances that were created from another copy of the `buffer` package.\n// See: https://github.com/feross/buffer/issues/154\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n const i = b[n]\n b[n] = b[m]\n b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n const len = this.length\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits')\n }\n for (let i = 0; i < len; i += 2) {\n swap(this, i, i + 1)\n }\n return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n const len = this.length\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits')\n }\n for (let i = 0; i < len; i += 4) {\n swap(this, i, i + 3)\n swap(this, i + 1, i + 2)\n }\n return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n const len = this.length\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits')\n }\n for (let i = 0; i < len; i += 8) {\n swap(this, i, i + 7)\n swap(this, i + 1, i + 6)\n swap(this, i + 2, i + 5)\n swap(this, i + 3, i + 4)\n }\n return this\n}\n\nBuffer.prototype.toString = function toString () {\n const length = this.length\n if (length === 0) return ''\n if (arguments.length === 0) return utf8Slice(this, 0, length)\n return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.toLocaleString = Buffer.prototype.toString\n\nBuffer.prototype.equals = function equals (b) {\n if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n if (this === b) return true\n return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n let str = ''\n const max = exports.INSPECT_MAX_BYTES\n str = this.toString('hex', 0, max).replace(/(.{2})/g, '$1 ').trim()\n if (this.length > max) str += ' ... '\n return ''\n}\nif (customInspectSymbol) {\n Buffer.prototype[customInspectSymbol] = Buffer.prototype.inspect\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n if (isInstance(target, Uint8Array)) {\n target = Buffer.from(target, target.offset, target.byteLength)\n }\n if (!Buffer.isBuffer(target)) {\n throw new TypeError(\n 'The \"target\" argument must be one of type Buffer or Uint8Array. ' +\n 'Received type ' + (typeof target)\n )\n }\n\n if (start === undefined) {\n start = 0\n }\n if (end === undefined) {\n end = target ? target.length : 0\n }\n if (thisStart === undefined) {\n thisStart = 0\n }\n if (thisEnd === undefined) {\n thisEnd = this.length\n }\n\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError('out of range index')\n }\n\n if (thisStart >= thisEnd && start >= end) {\n return 0\n }\n if (thisStart >= thisEnd) {\n return -1\n }\n if (start >= end) {\n return 1\n }\n\n start >>>= 0\n end >>>= 0\n thisStart >>>= 0\n thisEnd >>>= 0\n\n if (this === target) return 0\n\n let x = thisEnd - thisStart\n let y = end - start\n const len = Math.min(x, y)\n\n const thisCopy = this.slice(thisStart, thisEnd)\n const targetCopy = target.slice(start, end)\n\n for (let i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i]\n y = targetCopy[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (numberIsNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [val], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n let indexSize = 1\n let arrLength = arr.length\n let valLength = val.length\n\n if (encoding !== undefined) {\n encoding = String(encoding).toLowerCase()\n if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n encoding === 'utf16le' || encoding === 'utf-16le') {\n if (arr.length < 2 || val.length < 2) {\n return -1\n }\n indexSize = 2\n arrLength /= 2\n valLength /= 2\n byteOffset /= 2\n }\n }\n\n function read (buf, i) {\n if (indexSize === 1) {\n return buf[i]\n } else {\n return buf.readUInt16BE(i * indexSize)\n }\n }\n\n let i\n if (dir) {\n let foundIndex = -1\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1) foundIndex = i\n if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n } else {\n if (foundIndex !== -1) i -= i - foundIndex\n foundIndex = -1\n }\n }\n } else {\n if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n for (i = byteOffset; i >= 0; i--) {\n let found = true\n for (let j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false\n break\n }\n }\n if (found) return i\n }\n }\n\n return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n offset = Number(offset) || 0\n const remaining = buf.length - offset\n if (!length) {\n length = remaining\n } else {\n length = Number(length)\n if (length > remaining) {\n length = remaining\n }\n }\n\n const strLen = string.length\n\n if (length > strLen / 2) {\n length = strLen / 2\n }\n let i\n for (i = 0; i < length; ++i) {\n const parsed = parseInt(string.substr(i * 2, 2), 16)\n if (numberIsNaN(parsed)) return i\n buf[offset + i] = parsed\n }\n return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n // Buffer#write(string)\n if (offset === undefined) {\n encoding = 'utf8'\n length = this.length\n offset = 0\n // Buffer#write(string, encoding)\n } else if (length === undefined && typeof offset === 'string') {\n encoding = offset\n length = this.length\n offset = 0\n // Buffer#write(string, offset[, length][, encoding])\n } else if (isFinite(offset)) {\n offset = offset >>> 0\n if (isFinite(length)) {\n length = length >>> 0\n if (encoding === undefined) encoding = 'utf8'\n } else {\n encoding = length\n length = undefined\n }\n } else {\n throw new Error(\n 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n )\n }\n\n const remaining = this.length - offset\n if (length === undefined || length > remaining) length = remaining\n\n if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n throw new RangeError('Attempt to write outside buffer bounds')\n }\n\n if (!encoding) encoding = 'utf8'\n\n let loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'hex':\n return hexWrite(this, string, offset, length)\n\n case 'utf8':\n case 'utf-8':\n return utf8Write(this, string, offset, length)\n\n case 'ascii':\n case 'latin1':\n case 'binary':\n return asciiWrite(this, string, offset, length)\n\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return base64Write(this, string, offset, length)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return ucs2Write(this, string, offset, length)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0)\n }\n}\n\nfunction base64Slice (buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf)\n } else {\n return base64.fromByteArray(buf.slice(start, end))\n }\n}\n\nfunction utf8Slice (buf, start, end) {\n end = Math.min(buf.length, end)\n const res = []\n\n let i = start\n while (i < end) {\n const firstByte = buf[i]\n let codePoint = null\n let bytesPerSequence = (firstByte > 0xEF)\n ? 4\n : (firstByte > 0xDF)\n ? 3\n : (firstByte > 0xBF)\n ? 2\n : 1\n\n if (i + bytesPerSequence <= end) {\n let secondByte, thirdByte, fourthByte, tempCodePoint\n\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 0x80) {\n codePoint = firstByte\n }\n break\n case 2:\n secondByte = buf[i + 1]\n if ((secondByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n if (tempCodePoint > 0x7F) {\n codePoint = tempCodePoint\n }\n }\n break\n case 3:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n codePoint = tempCodePoint\n }\n }\n break\n case 4:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n fourthByte = buf[i + 3]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n codePoint = tempCodePoint\n }\n }\n }\n }\n\n if (codePoint === null) {\n // we did not generate a valid codePoint so insert a\n // replacement char (U+FFFD) and advance only 1 byte\n codePoint = 0xFFFD\n bytesPerSequence = 1\n } else if (codePoint > 0xFFFF) {\n // encode to utf16 (surrogate pair dance)\n codePoint -= 0x10000\n res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n codePoint = 0xDC00 | codePoint & 0x3FF\n }\n\n res.push(codePoint)\n i += bytesPerSequence\n }\n\n return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nconst MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n const len = codePoints.length\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n }\n\n // Decode in chunks to avoid \"call stack size exceeded\".\n let res = ''\n let i = 0\n while (i < len) {\n res += String.fromCharCode.apply(\n String,\n codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n )\n }\n return res\n}\n\nfunction asciiSlice (buf, start, end) {\n let ret = ''\n end = Math.min(buf.length, end)\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F)\n }\n return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n let ret = ''\n end = Math.min(buf.length, end)\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i])\n }\n return ret\n}\n\nfunction hexSlice (buf, start, end) {\n const len = buf.length\n\n if (!start || start < 0) start = 0\n if (!end || end < 0 || end > len) end = len\n\n let out = ''\n for (let i = start; i < end; ++i) {\n out += hexSliceLookupTable[buf[i]]\n }\n return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n const bytes = buf.slice(start, end)\n let res = ''\n // If bytes.length is odd, the last 8 bits must be ignored (same as node.js)\n for (let i = 0; i < bytes.length - 1; i += 2) {\n res += String.fromCharCode(bytes[i] + (bytes[i + 1] * 256))\n }\n return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n const len = this.length\n start = ~~start\n end = end === undefined ? len : ~~end\n\n if (start < 0) {\n start += len\n if (start < 0) start = 0\n } else if (start > len) {\n start = len\n }\n\n if (end < 0) {\n end += len\n if (end < 0) end = 0\n } else if (end > len) {\n end = len\n }\n\n if (end < start) end = start\n\n const newBuf = this.subarray(start, end)\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(newBuf, Buffer.prototype)\n\n return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUintLE =\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let val = this[offset]\n let mul = 1\n let i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUintBE =\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n checkOffset(offset, byteLength, this.length)\n }\n\n let val = this[offset + --byteLength]\n let mul = 1\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUint8 =\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n return this[offset]\n}\n\nBuffer.prototype.readUint16LE =\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUint16BE =\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUint32LE =\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return ((this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16)) +\n (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUint32BE =\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] * 0x1000000) +\n ((this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n this[offset + 3])\n}\n\nBuffer.prototype.readBigUInt64LE = defineBigIntMethod(function readBigUInt64LE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const lo = first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24\n\n const hi = this[++offset] +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n last * 2 ** 24\n\n return BigInt(lo) + (BigInt(hi) << BigInt(32))\n})\n\nBuffer.prototype.readBigUInt64BE = defineBigIntMethod(function readBigUInt64BE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const hi = first * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset]\n\n const lo = this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last\n\n return (BigInt(hi) << BigInt(32)) + BigInt(lo)\n})\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let val = this[offset]\n let mul = 1\n let i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let i = byteLength\n let mul = 1\n let val = this[offset + --i]\n while (i > 0 && (mul *= 0x100)) {\n val += this[offset + --i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n if (!(this[offset] & 0x80)) return (this[offset])\n return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n const val = this[offset] | (this[offset + 1] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n const val = this[offset + 1] | (this[offset] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16) |\n (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] << 24) |\n (this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n (this[offset + 3])\n}\n\nBuffer.prototype.readBigInt64LE = defineBigIntMethod(function readBigInt64LE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const val = this[offset + 4] +\n this[offset + 5] * 2 ** 8 +\n this[offset + 6] * 2 ** 16 +\n (last << 24) // Overflow\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24)\n})\n\nBuffer.prototype.readBigInt64BE = defineBigIntMethod(function readBigInt64BE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const val = (first << 24) + // Overflow\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset]\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last)\n})\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUintLE =\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n let mul = 1\n let i = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUintBE =\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n let i = byteLength - 1\n let mul = 1\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUint8 =\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeUint16LE =\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeUint16BE =\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeUint32LE =\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset + 3] = (value >>> 24)\n this[offset + 2] = (value >>> 16)\n this[offset + 1] = (value >>> 8)\n this[offset] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeUint32BE =\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nfunction wrtBigUInt64LE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7)\n\n let lo = Number(value & BigInt(0xffffffff))\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n return offset\n}\n\nfunction wrtBigUInt64BE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7)\n\n let lo = Number(value & BigInt(0xffffffff))\n buf[offset + 7] = lo\n lo = lo >> 8\n buf[offset + 6] = lo\n lo = lo >> 8\n buf[offset + 5] = lo\n lo = lo >> 8\n buf[offset + 4] = lo\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n buf[offset + 3] = hi\n hi = hi >> 8\n buf[offset + 2] = hi\n hi = hi >> 8\n buf[offset + 1] = hi\n hi = hi >> 8\n buf[offset] = hi\n return offset + 8\n}\n\nBuffer.prototype.writeBigUInt64LE = defineBigIntMethod(function writeBigUInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeBigUInt64BE = defineBigIntMethod(function writeBigUInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n let i = 0\n let mul = 1\n let sub = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n let i = byteLength - 1\n let mul = 1\n let sub = 0\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n if (value < 0) value = 0xff + value + 1\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n this[offset + 2] = (value >>> 16)\n this[offset + 3] = (value >>> 24)\n return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (value < 0) value = 0xffffffff + value + 1\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeBigInt64LE = defineBigIntMethod(function writeBigInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nBuffer.prototype.writeBigInt64BE = defineBigIntMethod(function writeBigInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n }\n ieee754.write(buf, value, offset, littleEndian, 23, 4)\n return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n }\n ieee754.write(buf, value, offset, littleEndian, 52, 8)\n return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n if (!Buffer.isBuffer(target)) throw new TypeError('argument should be a Buffer')\n if (!start) start = 0\n if (!end && end !== 0) end = this.length\n if (targetStart >= target.length) targetStart = target.length\n if (!targetStart) targetStart = 0\n if (end > 0 && end < start) end = start\n\n // Copy 0 bytes; we're done\n if (end === start) return 0\n if (target.length === 0 || this.length === 0) return 0\n\n // Fatal error conditions\n if (targetStart < 0) {\n throw new RangeError('targetStart out of bounds')\n }\n if (start < 0 || start >= this.length) throw new RangeError('Index out of range')\n if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n // Are we oob?\n if (end > this.length) end = this.length\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start\n }\n\n const len = end - start\n\n if (this === target && typeof Uint8Array.prototype.copyWithin === 'function') {\n // Use built-in when available, missing from IE11\n this.copyWithin(targetStart, start, end)\n } else {\n Uint8Array.prototype.set.call(\n target,\n this.subarray(start, end),\n targetStart\n )\n }\n\n return len\n}\n\n// Usage:\n// buffer.fill(number[, offset[, end]])\n// buffer.fill(buffer[, offset[, end]])\n// buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n // Handle string cases:\n if (typeof val === 'string') {\n if (typeof start === 'string') {\n encoding = start\n start = 0\n end = this.length\n } else if (typeof end === 'string') {\n encoding = end\n end = this.length\n }\n if (encoding !== undefined && typeof encoding !== 'string') {\n throw new TypeError('encoding must be a string')\n }\n if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n if (val.length === 1) {\n const code = val.charCodeAt(0)\n if ((encoding === 'utf8' && code < 128) ||\n encoding === 'latin1') {\n // Fast path: If `val` fits into a single byte, use that numeric value.\n val = code\n }\n }\n } else if (typeof val === 'number') {\n val = val & 255\n } else if (typeof val === 'boolean') {\n val = Number(val)\n }\n\n // Invalid ranges are not set to a default, so can range check early.\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError('Out of range index')\n }\n\n if (end <= start) {\n return this\n }\n\n start = start >>> 0\n end = end === undefined ? this.length : end >>> 0\n\n if (!val) val = 0\n\n let i\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val\n }\n } else {\n const bytes = Buffer.isBuffer(val)\n ? val\n : Buffer.from(val, encoding)\n const len = bytes.length\n if (len === 0) {\n throw new TypeError('The value \"' + val +\n '\" is invalid for argument \"value\"')\n }\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len]\n }\n }\n\n return this\n}\n\n// CUSTOM ERRORS\n// =============\n\n// Simplified versions from Node, changed for Buffer-only usage\nconst errors = {}\nfunction E (sym, getMessage, Base) {\n errors[sym] = class NodeError extends Base {\n constructor () {\n super()\n\n Object.defineProperty(this, 'message', {\n value: getMessage.apply(this, arguments),\n writable: true,\n configurable: true\n })\n\n // Add the error code to the name to include it in the stack trace.\n this.name = `${this.name} [${sym}]`\n // Access the stack to generate the error message including the error code\n // from the name.\n this.stack // eslint-disable-line no-unused-expressions\n // Reset the name to the actual name.\n delete this.name\n }\n\n get code () {\n return sym\n }\n\n set code (value) {\n Object.defineProperty(this, 'code', {\n configurable: true,\n enumerable: true,\n value,\n writable: true\n })\n }\n\n toString () {\n return `${this.name} [${sym}]: ${this.message}`\n }\n }\n}\n\nE('ERR_BUFFER_OUT_OF_BOUNDS',\n function (name) {\n if (name) {\n return `${name} is outside of buffer bounds`\n }\n\n return 'Attempt to access memory outside buffer bounds'\n }, RangeError)\nE('ERR_INVALID_ARG_TYPE',\n function (name, actual) {\n return `The \"${name}\" argument must be of type number. Received type ${typeof actual}`\n }, TypeError)\nE('ERR_OUT_OF_RANGE',\n function (str, range, input) {\n let msg = `The value of \"${str}\" is out of range.`\n let received = input\n if (Number.isInteger(input) && Math.abs(input) > 2 ** 32) {\n received = addNumericalSeparator(String(input))\n } else if (typeof input === 'bigint') {\n received = String(input)\n if (input > BigInt(2) ** BigInt(32) || input < -(BigInt(2) ** BigInt(32))) {\n received = addNumericalSeparator(received)\n }\n received += 'n'\n }\n msg += ` It must be ${range}. Received ${received}`\n return msg\n }, RangeError)\n\nfunction addNumericalSeparator (val) {\n let res = ''\n let i = val.length\n const start = val[0] === '-' ? 1 : 0\n for (; i >= start + 4; i -= 3) {\n res = `_${val.slice(i - 3, i)}${res}`\n }\n return `${val.slice(0, i)}${res}`\n}\n\n// CHECK FUNCTIONS\n// ===============\n\nfunction checkBounds (buf, offset, byteLength) {\n validateNumber(offset, 'offset')\n if (buf[offset] === undefined || buf[offset + byteLength] === undefined) {\n boundsError(offset, buf.length - (byteLength + 1))\n }\n}\n\nfunction checkIntBI (value, min, max, buf, offset, byteLength) {\n if (value > max || value < min) {\n const n = typeof min === 'bigint' ? 'n' : ''\n let range\n if (byteLength > 3) {\n if (min === 0 || min === BigInt(0)) {\n range = `>= 0${n} and < 2${n} ** ${(byteLength + 1) * 8}${n}`\n } else {\n range = `>= -(2${n} ** ${(byteLength + 1) * 8 - 1}${n}) and < 2 ** ` +\n `${(byteLength + 1) * 8 - 1}${n}`\n }\n } else {\n range = `>= ${min}${n} and <= ${max}${n}`\n }\n throw new errors.ERR_OUT_OF_RANGE('value', range, value)\n }\n checkBounds(buf, offset, byteLength)\n}\n\nfunction validateNumber (value, name) {\n if (typeof value !== 'number') {\n throw new errors.ERR_INVALID_ARG_TYPE(name, 'number', value)\n }\n}\n\nfunction boundsError (value, length, type) {\n if (Math.floor(value) !== value) {\n validateNumber(value, type)\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset', 'an integer', value)\n }\n\n if (length < 0) {\n throw new errors.ERR_BUFFER_OUT_OF_BOUNDS()\n }\n\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset',\n `>= ${type ? 1 : 0} and <= ${length}`,\n value)\n}\n\n// HELPER FUNCTIONS\n// ================\n\nconst INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n // Node takes equal signs as end of the Base64 encoding\n str = str.split('=')[0]\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = str.trim().replace(INVALID_BASE64_RE, '')\n // Node converts strings with length < 2 to ''\n if (str.length < 2) return ''\n // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n while (str.length % 4 !== 0) {\n str = str + '='\n }\n return str\n}\n\nfunction utf8ToBytes (string, units) {\n units = units || Infinity\n let codePoint\n const length = string.length\n let leadSurrogate = null\n const bytes = []\n\n for (let i = 0; i < length; ++i) {\n codePoint = string.charCodeAt(i)\n\n // is surrogate component\n if (codePoint > 0xD7FF && codePoint < 0xE000) {\n // last char was a lead\n if (!leadSurrogate) {\n // no lead yet\n if (codePoint > 0xDBFF) {\n // unexpected trail\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n } else if (i + 1 === length) {\n // unpaired lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n }\n\n // valid lead\n leadSurrogate = codePoint\n\n continue\n }\n\n // 2 leads in a row\n if (codePoint < 0xDC00) {\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n leadSurrogate = codePoint\n continue\n }\n\n // valid surrogate pair\n codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n } else if (leadSurrogate) {\n // valid bmp char, but last char was a lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n }\n\n leadSurrogate = null\n\n // encode utf8\n if (codePoint < 0x80) {\n if ((units -= 1) < 0) break\n bytes.push(codePoint)\n } else if (codePoint < 0x800) {\n if ((units -= 2) < 0) break\n bytes.push(\n codePoint >> 0x6 | 0xC0,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x10000) {\n if ((units -= 3) < 0) break\n bytes.push(\n codePoint >> 0xC | 0xE0,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x110000) {\n if ((units -= 4) < 0) break\n bytes.push(\n codePoint >> 0x12 | 0xF0,\n codePoint >> 0xC & 0x3F | 0x80,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else {\n throw new Error('Invalid code point')\n }\n }\n\n return bytes\n}\n\nfunction asciiToBytes (str) {\n const byteArray = []\n for (let i = 0; i < str.length; ++i) {\n // Node's code seems to be doing this and not & 0x7F..\n byteArray.push(str.charCodeAt(i) & 0xFF)\n }\n return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n let c, hi, lo\n const byteArray = []\n for (let i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0) break\n\n c = str.charCodeAt(i)\n hi = c >> 8\n lo = c % 256\n byteArray.push(lo)\n byteArray.push(hi)\n }\n\n return byteArray\n}\n\nfunction base64ToBytes (str) {\n return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n let i\n for (i = 0; i < length; ++i) {\n if ((i + offset >= dst.length) || (i >= src.length)) break\n dst[i + offset] = src[i]\n }\n return i\n}\n\n// ArrayBuffer or Uint8Array objects from other contexts (i.e. iframes) do not pass\n// the `instanceof` check but they should be treated as of that type.\n// See: https://github.com/feross/buffer/issues/166\nfunction isInstance (obj, type) {\n return obj instanceof type ||\n (obj != null && obj.constructor != null && obj.constructor.name != null &&\n obj.constructor.name === type.name)\n}\nfunction numberIsNaN (obj) {\n // For IE11 support\n return obj !== obj // eslint-disable-line no-self-compare\n}\n\n// Create lookup table for `toString('hex')`\n// See: https://github.com/feross/buffer/issues/219\nconst hexSliceLookupTable = (function () {\n const alphabet = '0123456789abcdef'\n const table = new Array(256)\n for (let i = 0; i < 16; ++i) {\n const i16 = i * 16\n for (let j = 0; j < 16; ++j) {\n table[i16 + j] = alphabet[i] + alphabet[j]\n }\n }\n return table\n})()\n\n// Return not function with Error if BigInt not supported\nfunction defineBigIntMethod (fn) {\n return typeof BigInt === 'undefined' ? BufferBigIntNotDefined : fn\n}\n\nfunction BufferBigIntNotDefined () {\n throw new Error('BigInt not supported')\n}\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\nvar R = typeof Reflect === 'object' ? Reflect : null\nvar ReflectApply = R && typeof R.apply === 'function'\n ? R.apply\n : function ReflectApply(target, receiver, args) {\n return Function.prototype.apply.call(target, receiver, args);\n }\n\nvar ReflectOwnKeys\nif (R && typeof R.ownKeys === 'function') {\n ReflectOwnKeys = R.ownKeys\n} else if (Object.getOwnPropertySymbols) {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target)\n .concat(Object.getOwnPropertySymbols(target));\n };\n} else {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target);\n };\n}\n\nfunction ProcessEmitWarning(warning) {\n if (console && console.warn) console.warn(warning);\n}\n\nvar NumberIsNaN = Number.isNaN || function NumberIsNaN(value) {\n return value !== value;\n}\n\nfunction EventEmitter() {\n EventEmitter.init.call(this);\n}\nmodule.exports = EventEmitter;\nmodule.exports.once = once;\n\n// Backwards-compat with node 0.10.x\nEventEmitter.EventEmitter = EventEmitter;\n\nEventEmitter.prototype._events = undefined;\nEventEmitter.prototype._eventsCount = 0;\nEventEmitter.prototype._maxListeners = undefined;\n\n// By default EventEmitters will print a warning if more than 10 listeners are\n// added to it. This is a useful default which helps finding memory leaks.\nvar defaultMaxListeners = 10;\n\nfunction checkListener(listener) {\n if (typeof listener !== 'function') {\n throw new TypeError('The \"listener\" argument must be of type Function. Received type ' + typeof listener);\n }\n}\n\nObject.defineProperty(EventEmitter, 'defaultMaxListeners', {\n enumerable: true,\n get: function() {\n return defaultMaxListeners;\n },\n set: function(arg) {\n if (typeof arg !== 'number' || arg < 0 || NumberIsNaN(arg)) {\n throw new RangeError('The value of \"defaultMaxListeners\" is out of range. It must be a non-negative number. Received ' + arg + '.');\n }\n defaultMaxListeners = arg;\n }\n});\n\nEventEmitter.init = function() {\n\n if (this._events === undefined ||\n this._events === Object.getPrototypeOf(this)._events) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n }\n\n this._maxListeners = this._maxListeners || undefined;\n};\n\n// Obviously not all Emitters should be limited to 10. This function allows\n// that to be increased. Set to zero for unlimited.\nEventEmitter.prototype.setMaxListeners = function setMaxListeners(n) {\n if (typeof n !== 'number' || n < 0 || NumberIsNaN(n)) {\n throw new RangeError('The value of \"n\" is out of range. It must be a non-negative number. Received ' + n + '.');\n }\n this._maxListeners = n;\n return this;\n};\n\nfunction _getMaxListeners(that) {\n if (that._maxListeners === undefined)\n return EventEmitter.defaultMaxListeners;\n return that._maxListeners;\n}\n\nEventEmitter.prototype.getMaxListeners = function getMaxListeners() {\n return _getMaxListeners(this);\n};\n\nEventEmitter.prototype.emit = function emit(type) {\n var args = [];\n for (var i = 1; i < arguments.length; i++) args.push(arguments[i]);\n var doError = (type === 'error');\n\n var events = this._events;\n if (events !== undefined)\n doError = (doError && events.error === undefined);\n else if (!doError)\n return false;\n\n // If there is no 'error' event listener then throw.\n if (doError) {\n var er;\n if (args.length > 0)\n er = args[0];\n if (er instanceof Error) {\n // Note: The comments on the `throw` lines are intentional, they show\n // up in Node's output if this results in an unhandled exception.\n throw er; // Unhandled 'error' event\n }\n // At least give some kind of context to the user\n var err = new Error('Unhandled error.' + (er ? ' (' + er.message + ')' : ''));\n err.context = er;\n throw err; // Unhandled 'error' event\n }\n\n var handler = events[type];\n\n if (handler === undefined)\n return false;\n\n if (typeof handler === 'function') {\n ReflectApply(handler, this, args);\n } else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n ReflectApply(listeners[i], this, args);\n }\n\n return true;\n};\n\nfunction _addListener(target, type, listener, prepend) {\n var m;\n var events;\n var existing;\n\n checkListener(listener);\n\n events = target._events;\n if (events === undefined) {\n events = target._events = Object.create(null);\n target._eventsCount = 0;\n } else {\n // To avoid recursion in the case that type === \"newListener\"! Before\n // adding it to the listeners, first emit \"newListener\".\n if (events.newListener !== undefined) {\n target.emit('newListener', type,\n listener.listener ? listener.listener : listener);\n\n // Re-assign `events` because a newListener handler could have caused the\n // this._events to be assigned to a new object\n events = target._events;\n }\n existing = events[type];\n }\n\n if (existing === undefined) {\n // Optimize the case of one listener. Don't need the extra array object.\n existing = events[type] = listener;\n ++target._eventsCount;\n } else {\n if (typeof existing === 'function') {\n // Adding the second element, need to change to array.\n existing = events[type] =\n prepend ? [listener, existing] : [existing, listener];\n // If we've already got an array, just append.\n } else if (prepend) {\n existing.unshift(listener);\n } else {\n existing.push(listener);\n }\n\n // Check for listener leak\n m = _getMaxListeners(target);\n if (m > 0 && existing.length > m && !existing.warned) {\n existing.warned = true;\n // No error code for this since it is a Warning\n // eslint-disable-next-line no-restricted-syntax\n var w = new Error('Possible EventEmitter memory leak detected. ' +\n existing.length + ' ' + String(type) + ' listeners ' +\n 'added. Use emitter.setMaxListeners() to ' +\n 'increase limit');\n w.name = 'MaxListenersExceededWarning';\n w.emitter = target;\n w.type = type;\n w.count = existing.length;\n ProcessEmitWarning(w);\n }\n }\n\n return target;\n}\n\nEventEmitter.prototype.addListener = function addListener(type, listener) {\n return _addListener(this, type, listener, false);\n};\n\nEventEmitter.prototype.on = EventEmitter.prototype.addListener;\n\nEventEmitter.prototype.prependListener =\n function prependListener(type, listener) {\n return _addListener(this, type, listener, true);\n };\n\nfunction onceWrapper() {\n if (!this.fired) {\n this.target.removeListener(this.type, this.wrapFn);\n this.fired = true;\n if (arguments.length === 0)\n return this.listener.call(this.target);\n return this.listener.apply(this.target, arguments);\n }\n}\n\nfunction _onceWrap(target, type, listener) {\n var state = { fired: false, wrapFn: undefined, target: target, type: type, listener: listener };\n var wrapped = onceWrapper.bind(state);\n wrapped.listener = listener;\n state.wrapFn = wrapped;\n return wrapped;\n}\n\nEventEmitter.prototype.once = function once(type, listener) {\n checkListener(listener);\n this.on(type, _onceWrap(this, type, listener));\n return this;\n};\n\nEventEmitter.prototype.prependOnceListener =\n function prependOnceListener(type, listener) {\n checkListener(listener);\n this.prependListener(type, _onceWrap(this, type, listener));\n return this;\n };\n\n// Emits a 'removeListener' event if and only if the listener was removed.\nEventEmitter.prototype.removeListener =\n function removeListener(type, listener) {\n var list, events, position, i, originalListener;\n\n checkListener(listener);\n\n events = this._events;\n if (events === undefined)\n return this;\n\n list = events[type];\n if (list === undefined)\n return this;\n\n if (list === listener || list.listener === listener) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else {\n delete events[type];\n if (events.removeListener)\n this.emit('removeListener', type, list.listener || listener);\n }\n } else if (typeof list !== 'function') {\n position = -1;\n\n for (i = list.length - 1; i >= 0; i--) {\n if (list[i] === listener || list[i].listener === listener) {\n originalListener = list[i].listener;\n position = i;\n break;\n }\n }\n\n if (position < 0)\n return this;\n\n if (position === 0)\n list.shift();\n else {\n spliceOne(list, position);\n }\n\n if (list.length === 1)\n events[type] = list[0];\n\n if (events.removeListener !== undefined)\n this.emit('removeListener', type, originalListener || listener);\n }\n\n return this;\n };\n\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\n\nEventEmitter.prototype.removeAllListeners =\n function removeAllListeners(type) {\n var listeners, events, i;\n\n events = this._events;\n if (events === undefined)\n return this;\n\n // not listening for removeListener, no need to emit\n if (events.removeListener === undefined) {\n if (arguments.length === 0) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n } else if (events[type] !== undefined) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else\n delete events[type];\n }\n return this;\n }\n\n // emit removeListener for all listeners on all events\n if (arguments.length === 0) {\n var keys = Object.keys(events);\n var key;\n for (i = 0; i < keys.length; ++i) {\n key = keys[i];\n if (key === 'removeListener') continue;\n this.removeAllListeners(key);\n }\n this.removeAllListeners('removeListener');\n this._events = Object.create(null);\n this._eventsCount = 0;\n return this;\n }\n\n listeners = events[type];\n\n if (typeof listeners === 'function') {\n this.removeListener(type, listeners);\n } else if (listeners !== undefined) {\n // LIFO order\n for (i = listeners.length - 1; i >= 0; i--) {\n this.removeListener(type, listeners[i]);\n }\n }\n\n return this;\n };\n\nfunction _listeners(target, type, unwrap) {\n var events = target._events;\n\n if (events === undefined)\n return [];\n\n var evlistener = events[type];\n if (evlistener === undefined)\n return [];\n\n if (typeof evlistener === 'function')\n return unwrap ? [evlistener.listener || evlistener] : [evlistener];\n\n return unwrap ?\n unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length);\n}\n\nEventEmitter.prototype.listeners = function listeners(type) {\n return _listeners(this, type, true);\n};\n\nEventEmitter.prototype.rawListeners = function rawListeners(type) {\n return _listeners(this, type, false);\n};\n\nEventEmitter.listenerCount = function(emitter, type) {\n if (typeof emitter.listenerCount === 'function') {\n return emitter.listenerCount(type);\n } else {\n return listenerCount.call(emitter, type);\n }\n};\n\nEventEmitter.prototype.listenerCount = listenerCount;\nfunction listenerCount(type) {\n var events = this._events;\n\n if (events !== undefined) {\n var evlistener = events[type];\n\n if (typeof evlistener === 'function') {\n return 1;\n } else if (evlistener !== undefined) {\n return evlistener.length;\n }\n }\n\n return 0;\n}\n\nEventEmitter.prototype.eventNames = function eventNames() {\n return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : [];\n};\n\nfunction arrayClone(arr, n) {\n var copy = new Array(n);\n for (var i = 0; i < n; ++i)\n copy[i] = arr[i];\n return copy;\n}\n\nfunction spliceOne(list, index) {\n for (; index + 1 < list.length; index++)\n list[index] = list[index + 1];\n list.pop();\n}\n\nfunction unwrapListeners(arr) {\n var ret = new Array(arr.length);\n for (var i = 0; i < ret.length; ++i) {\n ret[i] = arr[i].listener || arr[i];\n }\n return ret;\n}\n\nfunction once(emitter, name) {\n return new Promise(function (resolve, reject) {\n function errorListener(err) {\n emitter.removeListener(name, resolver);\n reject(err);\n }\n\n function resolver() {\n if (typeof emitter.removeListener === 'function') {\n emitter.removeListener('error', errorListener);\n }\n resolve([].slice.call(arguments));\n };\n\n eventTargetAgnosticAddListener(emitter, name, resolver, { once: true });\n if (name !== 'error') {\n addErrorHandlerIfEventEmitter(emitter, errorListener, { once: true });\n }\n });\n}\n\nfunction addErrorHandlerIfEventEmitter(emitter, handler, flags) {\n if (typeof emitter.on === 'function') {\n eventTargetAgnosticAddListener(emitter, 'error', handler, flags);\n }\n}\n\nfunction eventTargetAgnosticAddListener(emitter, name, listener, flags) {\n if (typeof emitter.on === 'function') {\n if (flags.once) {\n emitter.once(name, listener);\n } else {\n emitter.on(name, listener);\n }\n } else if (typeof emitter.addEventListener === 'function') {\n // EventTarget does not have `error` event semantics like Node\n // EventEmitters, we do not listen for `error` events here.\n emitter.addEventListener(name, function wrapListener(arg) {\n // IE does not have builtin `{ once: true }` support so we\n // have to do it manually.\n if (flags.once) {\n emitter.removeEventListener(name, wrapListener);\n }\n listener(arg);\n });\n } else {\n throw new TypeError('The \"emitter\" argument must be of type EventEmitter. Received type ' + typeof emitter);\n }\n}\n","/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */\nexports.read = function (buffer, offset, isLE, mLen, nBytes) {\n var e, m\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var nBits = -7\n var i = isLE ? (nBytes - 1) : 0\n var d = isLE ? -1 : 1\n var s = buffer[offset + i]\n\n i += d\n\n e = s & ((1 << (-nBits)) - 1)\n s >>= (-nBits)\n nBits += eLen\n for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & ((1 << (-nBits)) - 1)\n e >>= (-nBits)\n nBits += mLen\n for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias\n } else if (e === eMax) {\n return m ? NaN : ((s ? -1 : 1) * Infinity)\n } else {\n m = m + Math.pow(2, mLen)\n e = e - eBias\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n var i = isLE ? 0 : (nBytes - 1)\n var d = isLE ? 1 : -1\n var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n value = Math.abs(value)\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0\n e = eMax\n } else {\n e = Math.floor(Math.log(value) / Math.LN2)\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--\n c *= 2\n }\n if (e + eBias >= 1) {\n value += rt / c\n } else {\n value += rt * Math.pow(2, 1 - eBias)\n }\n if (value * c >= 2) {\n e++\n c /= 2\n }\n\n if (e + eBias >= eMax) {\n m = 0\n e = eMax\n } else if (e + eBias >= 1) {\n m = ((value * c) - 1) * Math.pow(2, mLen)\n e = e + eBias\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n e = 0\n }\n }\n\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n e = (e << mLen) | m\n eLen += mLen\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128\n}\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView');\n\nmodule.exports = DataView;\n","var hashClear = require('./_hashClear'),\n hashDelete = require('./_hashDelete'),\n hashGet = require('./_hashGet'),\n hashHas = require('./_hashHas'),\n hashSet = require('./_hashSet');\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\nmodule.exports = Hash;\n","var listCacheClear = require('./_listCacheClear'),\n listCacheDelete = require('./_listCacheDelete'),\n listCacheGet = require('./_listCacheGet'),\n listCacheHas = require('./_listCacheHas'),\n listCacheSet = require('./_listCacheSet');\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\nmodule.exports = ListCache;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map');\n\nmodule.exports = Map;\n","var mapCacheClear = require('./_mapCacheClear'),\n mapCacheDelete = require('./_mapCacheDelete'),\n mapCacheGet = require('./_mapCacheGet'),\n mapCacheHas = require('./_mapCacheHas'),\n mapCacheSet = require('./_mapCacheSet');\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\nmodule.exports = MapCache;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Promise = getNative(root, 'Promise');\n\nmodule.exports = Promise;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Set = getNative(root, 'Set');\n\nmodule.exports = Set;\n","var MapCache = require('./_MapCache'),\n setCacheAdd = require('./_setCacheAdd'),\n setCacheHas = require('./_setCacheHas');\n\n/**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\nfunction SetCache(values) {\n var index = -1,\n length = values == null ? 0 : values.length;\n\n this.__data__ = new MapCache;\n while (++index < length) {\n this.add(values[index]);\n }\n}\n\n// Add methods to `SetCache`.\nSetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\nSetCache.prototype.has = setCacheHas;\n\nmodule.exports = SetCache;\n","var ListCache = require('./_ListCache'),\n stackClear = require('./_stackClear'),\n stackDelete = require('./_stackDelete'),\n stackGet = require('./_stackGet'),\n stackHas = require('./_stackHas'),\n stackSet = require('./_stackSet');\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\nmodule.exports = Stack;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Uint8Array = root.Uint8Array;\n\nmodule.exports = Uint8Array;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar WeakMap = getNative(root, 'WeakMap');\n\nmodule.exports = WeakMap;\n","/**\n * A specialized version of `_.forEach` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\nfunction arrayEach(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (iteratee(array[index], index, array) === false) {\n break;\n }\n }\n return array;\n}\n\nmodule.exports = arrayEach;\n","/**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\nfunction arrayFilter(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result[resIndex++] = value;\n }\n }\n return result;\n}\n\nmodule.exports = arrayFilter;\n","var baseTimes = require('./_baseTimes'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isIndex = require('./_isIndex'),\n isTypedArray = require('./isTypedArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = arrayLikeKeys;\n","/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n}\n\nmodule.exports = arrayPush;\n","/**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\nfunction arraySome(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (predicate(array[index], index, array)) {\n return true;\n }\n }\n return false;\n}\n\nmodule.exports = arraySome;\n","var baseAssignValue = require('./_baseAssignValue'),\n eq = require('./eq');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\nmodule.exports = assignValue;\n","var eq = require('./eq');\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\nmodule.exports = assocIndexOf;\n","var copyObject = require('./_copyObject'),\n keys = require('./keys');\n\n/**\n * The base implementation of `_.assign` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssign(object, source) {\n return object && copyObject(source, keys(source), object);\n}\n\nmodule.exports = baseAssign;\n","var copyObject = require('./_copyObject'),\n keysIn = require('./keysIn');\n\n/**\n * The base implementation of `_.assignIn` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssignIn(object, source) {\n return object && copyObject(source, keysIn(source), object);\n}\n\nmodule.exports = baseAssignIn;\n","var defineProperty = require('./_defineProperty');\n\n/**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction baseAssignValue(object, key, value) {\n if (key == '__proto__' && defineProperty) {\n defineProperty(object, key, {\n 'configurable': true,\n 'enumerable': true,\n 'value': value,\n 'writable': true\n });\n } else {\n object[key] = value;\n }\n}\n\nmodule.exports = baseAssignValue;\n","var Stack = require('./_Stack'),\n arrayEach = require('./_arrayEach'),\n assignValue = require('./_assignValue'),\n baseAssign = require('./_baseAssign'),\n baseAssignIn = require('./_baseAssignIn'),\n cloneBuffer = require('./_cloneBuffer'),\n copyArray = require('./_copyArray'),\n copySymbols = require('./_copySymbols'),\n copySymbolsIn = require('./_copySymbolsIn'),\n getAllKeys = require('./_getAllKeys'),\n getAllKeysIn = require('./_getAllKeysIn'),\n getTag = require('./_getTag'),\n initCloneArray = require('./_initCloneArray'),\n initCloneByTag = require('./_initCloneByTag'),\n initCloneObject = require('./_initCloneObject'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isMap = require('./isMap'),\n isObject = require('./isObject'),\n isSet = require('./isSet'),\n keys = require('./keys'),\n keysIn = require('./keysIn');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_FLAT_FLAG = 2,\n CLONE_SYMBOLS_FLAG = 4;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values supported by `_.clone`. */\nvar cloneableTags = {};\ncloneableTags[argsTag] = cloneableTags[arrayTag] =\ncloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =\ncloneableTags[boolTag] = cloneableTags[dateTag] =\ncloneableTags[float32Tag] = cloneableTags[float64Tag] =\ncloneableTags[int8Tag] = cloneableTags[int16Tag] =\ncloneableTags[int32Tag] = cloneableTags[mapTag] =\ncloneableTags[numberTag] = cloneableTags[objectTag] =\ncloneableTags[regexpTag] = cloneableTags[setTag] =\ncloneableTags[stringTag] = cloneableTags[symbolTag] =\ncloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =\ncloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;\ncloneableTags[errorTag] = cloneableTags[funcTag] =\ncloneableTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.clone` and `_.cloneDeep` which tracks\n * traversed objects.\n *\n * @private\n * @param {*} value The value to clone.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Deep clone\n * 2 - Flatten inherited properties\n * 4 - Clone symbols\n * @param {Function} [customizer] The function to customize cloning.\n * @param {string} [key] The key of `value`.\n * @param {Object} [object] The parent object of `value`.\n * @param {Object} [stack] Tracks traversed objects and their clone counterparts.\n * @returns {*} Returns the cloned value.\n */\nfunction baseClone(value, bitmask, customizer, key, object, stack) {\n var result,\n isDeep = bitmask & CLONE_DEEP_FLAG,\n isFlat = bitmask & CLONE_FLAT_FLAG,\n isFull = bitmask & CLONE_SYMBOLS_FLAG;\n\n if (customizer) {\n result = object ? customizer(value, key, object, stack) : customizer(value);\n }\n if (result !== undefined) {\n return result;\n }\n if (!isObject(value)) {\n return value;\n }\n var isArr = isArray(value);\n if (isArr) {\n result = initCloneArray(value);\n if (!isDeep) {\n return copyArray(value, result);\n }\n } else {\n var tag = getTag(value),\n isFunc = tag == funcTag || tag == genTag;\n\n if (isBuffer(value)) {\n return cloneBuffer(value, isDeep);\n }\n if (tag == objectTag || tag == argsTag || (isFunc && !object)) {\n result = (isFlat || isFunc) ? {} : initCloneObject(value);\n if (!isDeep) {\n return isFlat\n ? copySymbolsIn(value, baseAssignIn(result, value))\n : copySymbols(value, baseAssign(result, value));\n }\n } else {\n if (!cloneableTags[tag]) {\n return object ? value : {};\n }\n result = initCloneByTag(value, tag, isDeep);\n }\n }\n // Check for circular references and return its corresponding clone.\n stack || (stack = new Stack);\n var stacked = stack.get(value);\n if (stacked) {\n return stacked;\n }\n stack.set(value, result);\n\n if (isSet(value)) {\n value.forEach(function(subValue) {\n result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));\n });\n } else if (isMap(value)) {\n value.forEach(function(subValue, key) {\n result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n }\n\n var keysFunc = isFull\n ? (isFlat ? getAllKeysIn : getAllKeys)\n : (isFlat ? keysIn : keys);\n\n var props = isArr ? undefined : keysFunc(value);\n arrayEach(props || value, function(subValue, key) {\n if (props) {\n key = subValue;\n subValue = value[key];\n }\n // Recursively populate clone (susceptible to call stack limits).\n assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n return result;\n}\n\nmodule.exports = baseClone;\n","var isObject = require('./isObject');\n\n/** Built-in value references. */\nvar objectCreate = Object.create;\n\n/**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} proto The object to inherit from.\n * @returns {Object} Returns the new object.\n */\nvar baseCreate = (function() {\n function object() {}\n return function(proto) {\n if (!isObject(proto)) {\n return {};\n }\n if (objectCreate) {\n return objectCreate(proto);\n }\n object.prototype = proto;\n var result = new object;\n object.prototype = undefined;\n return result;\n };\n}());\n\nmodule.exports = baseCreate;\n","var arrayPush = require('./_arrayPush'),\n isArray = require('./isArray');\n\n/**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction baseGetAllKeys(object, keysFunc, symbolsFunc) {\n var result = keysFunc(object);\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n}\n\nmodule.exports = baseGetAllKeys;\n","var Symbol = require('./_Symbol'),\n getRawTag = require('./_getRawTag'),\n objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]';\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\nmodule.exports = baseIsArguments;\n","var baseIsEqualDeep = require('./_baseIsEqualDeep'),\n isObjectLike = require('./isObjectLike');\n\n/**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Unordered comparison\n * 2 - Partial comparison\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\nfunction baseIsEqual(value, other, bitmask, customizer, stack) {\n if (value === other) {\n return true;\n }\n if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\n return value !== value && other !== other;\n }\n return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n}\n\nmodule.exports = baseIsEqual;\n","var Stack = require('./_Stack'),\n equalArrays = require('./_equalArrays'),\n equalByTag = require('./_equalByTag'),\n equalObjects = require('./_equalObjects'),\n getTag = require('./_getTag'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isTypedArray = require('./isTypedArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n var objIsArr = isArray(object),\n othIsArr = isArray(other),\n objTag = objIsArr ? arrayTag : getTag(object),\n othTag = othIsArr ? arrayTag : getTag(other);\n\n objTag = objTag == argsTag ? objectTag : objTag;\n othTag = othTag == argsTag ? objectTag : othTag;\n\n var objIsObj = objTag == objectTag,\n othIsObj = othTag == objectTag,\n isSameTag = objTag == othTag;\n\n if (isSameTag && isBuffer(object)) {\n if (!isBuffer(other)) {\n return false;\n }\n objIsArr = true;\n objIsObj = false;\n }\n if (isSameTag && !objIsObj) {\n stack || (stack = new Stack);\n return (objIsArr || isTypedArray(object))\n ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n }\n if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n if (objIsWrapped || othIsWrapped) {\n var objUnwrapped = objIsWrapped ? object.value() : object,\n othUnwrapped = othIsWrapped ? other.value() : other;\n\n stack || (stack = new Stack);\n return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n }\n }\n if (!isSameTag) {\n return false;\n }\n stack || (stack = new Stack);\n return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n}\n\nmodule.exports = baseIsEqualDeep;\n","var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]';\n\n/**\n * The base implementation of `_.isMap` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n */\nfunction baseIsMap(value) {\n return isObjectLike(value) && getTag(value) == mapTag;\n}\n\nmodule.exports = baseIsMap;\n","var isFunction = require('./isFunction'),\n isMasked = require('./_isMasked'),\n isObject = require('./isObject'),\n toSource = require('./_toSource');\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\nmodule.exports = baseIsNative;\n","var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar setTag = '[object Set]';\n\n/**\n * The base implementation of `_.isSet` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n */\nfunction baseIsSet(value) {\n return isObjectLike(value) && getTag(value) == setTag;\n}\n\nmodule.exports = baseIsSet;\n","var baseGetTag = require('./_baseGetTag'),\n isLength = require('./isLength'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n\nmodule.exports = baseIsTypedArray;\n","var isPrototype = require('./_isPrototype'),\n nativeKeys = require('./_nativeKeys');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeys;\n","var isObject = require('./isObject'),\n isPrototype = require('./_isPrototype'),\n nativeKeysIn = require('./_nativeKeysIn');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeysIn(object) {\n if (!isObject(object)) {\n return nativeKeysIn(object);\n }\n var isProto = isPrototype(object),\n result = [];\n\n for (var key in object) {\n if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeysIn;\n","/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\nmodule.exports = baseTimes;\n","/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n return function(value) {\n return func(value);\n };\n}\n\nmodule.exports = baseUnary;\n","/**\n * Checks if a `cache` value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction cacheHas(cache, key) {\n return cache.has(key);\n}\n\nmodule.exports = cacheHas;\n","var Uint8Array = require('./_Uint8Array');\n\n/**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\nfunction cloneArrayBuffer(arrayBuffer) {\n var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n return result;\n}\n\nmodule.exports = cloneArrayBuffer;\n","var root = require('./_root');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined,\n allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;\n\n/**\n * Creates a clone of `buffer`.\n *\n * @private\n * @param {Buffer} buffer The buffer to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Buffer} Returns the cloned buffer.\n */\nfunction cloneBuffer(buffer, isDeep) {\n if (isDeep) {\n return buffer.slice();\n }\n var length = buffer.length,\n result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\n\n buffer.copy(result);\n return result;\n}\n\nmodule.exports = cloneBuffer;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer');\n\n/**\n * Creates a clone of `dataView`.\n *\n * @private\n * @param {Object} dataView The data view to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned data view.\n */\nfunction cloneDataView(dataView, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;\n return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);\n}\n\nmodule.exports = cloneDataView;\n","/** Used to match `RegExp` flags from their coerced string values. */\nvar reFlags = /\\w*$/;\n\n/**\n * Creates a clone of `regexp`.\n *\n * @private\n * @param {Object} regexp The regexp to clone.\n * @returns {Object} Returns the cloned regexp.\n */\nfunction cloneRegExp(regexp) {\n var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));\n result.lastIndex = regexp.lastIndex;\n return result;\n}\n\nmodule.exports = cloneRegExp;\n","var Symbol = require('./_Symbol');\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * Creates a clone of the `symbol` object.\n *\n * @private\n * @param {Object} symbol The symbol object to clone.\n * @returns {Object} Returns the cloned symbol object.\n */\nfunction cloneSymbol(symbol) {\n return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};\n}\n\nmodule.exports = cloneSymbol;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer');\n\n/**\n * Creates a clone of `typedArray`.\n *\n * @private\n * @param {Object} typedArray The typed array to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned typed array.\n */\nfunction cloneTypedArray(typedArray, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n}\n\nmodule.exports = cloneTypedArray;\n","/**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\nfunction copyArray(source, array) {\n var index = -1,\n length = source.length;\n\n array || (array = Array(length));\n while (++index < length) {\n array[index] = source[index];\n }\n return array;\n}\n\nmodule.exports = copyArray;\n","var assignValue = require('./_assignValue'),\n baseAssignValue = require('./_baseAssignValue');\n\n/**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\nfunction copyObject(source, props, object, customizer) {\n var isNew = !object;\n object || (object = {});\n\n var index = -1,\n length = props.length;\n\n while (++index < length) {\n var key = props[index];\n\n var newValue = customizer\n ? customizer(object[key], source[key], key, object, source)\n : undefined;\n\n if (newValue === undefined) {\n newValue = source[key];\n }\n if (isNew) {\n baseAssignValue(object, key, newValue);\n } else {\n assignValue(object, key, newValue);\n }\n }\n return object;\n}\n\nmodule.exports = copyObject;\n","var copyObject = require('./_copyObject'),\n getSymbols = require('./_getSymbols');\n\n/**\n * Copies own symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbols(source, object) {\n return copyObject(source, getSymbols(source), object);\n}\n\nmodule.exports = copySymbols;\n","var copyObject = require('./_copyObject'),\n getSymbolsIn = require('./_getSymbolsIn');\n\n/**\n * Copies own and inherited symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbolsIn(source, object) {\n return copyObject(source, getSymbolsIn(source), object);\n}\n\nmodule.exports = copySymbolsIn;\n","var root = require('./_root');\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\nmodule.exports = coreJsData;\n","var getNative = require('./_getNative');\n\nvar defineProperty = (function() {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n}());\n\nmodule.exports = defineProperty;\n","var SetCache = require('./_SetCache'),\n arraySome = require('./_arraySome'),\n cacheHas = require('./_cacheHas');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\nfunction equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n arrLength = array.length,\n othLength = other.length;\n\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n return false;\n }\n // Check that cyclic values are equal.\n var arrStacked = stack.get(array);\n var othStacked = stack.get(other);\n if (arrStacked && othStacked) {\n return arrStacked == other && othStacked == array;\n }\n var index = -1,\n result = true,\n seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n stack.set(array, other);\n stack.set(other, array);\n\n // Ignore non-index properties.\n while (++index < arrLength) {\n var arrValue = array[index],\n othValue = other[index];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, arrValue, index, other, array, stack)\n : customizer(arrValue, othValue, index, array, other, stack);\n }\n if (compared !== undefined) {\n if (compared) {\n continue;\n }\n result = false;\n break;\n }\n // Recursively compare arrays (susceptible to call stack limits).\n if (seen) {\n if (!arraySome(other, function(othValue, othIndex) {\n if (!cacheHas(seen, othIndex) &&\n (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n return seen.push(othIndex);\n }\n })) {\n result = false;\n break;\n }\n } else if (!(\n arrValue === othValue ||\n equalFunc(arrValue, othValue, bitmask, customizer, stack)\n )) {\n result = false;\n break;\n }\n }\n stack['delete'](array);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalArrays;\n","var Symbol = require('./_Symbol'),\n Uint8Array = require('./_Uint8Array'),\n eq = require('./eq'),\n equalArrays = require('./_equalArrays'),\n mapToArray = require('./_mapToArray'),\n setToArray = require('./_setToArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]';\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n switch (tag) {\n case dataViewTag:\n if ((object.byteLength != other.byteLength) ||\n (object.byteOffset != other.byteOffset)) {\n return false;\n }\n object = object.buffer;\n other = other.buffer;\n\n case arrayBufferTag:\n if ((object.byteLength != other.byteLength) ||\n !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n return false;\n }\n return true;\n\n case boolTag:\n case dateTag:\n case numberTag:\n // Coerce booleans to `1` or `0` and dates to milliseconds.\n // Invalid dates are coerced to `NaN`.\n return eq(+object, +other);\n\n case errorTag:\n return object.name == other.name && object.message == other.message;\n\n case regexpTag:\n case stringTag:\n // Coerce regexes to strings and treat strings, primitives and objects,\n // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n // for more details.\n return object == (other + '');\n\n case mapTag:\n var convert = mapToArray;\n\n case setTag:\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n convert || (convert = setToArray);\n\n if (object.size != other.size && !isPartial) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked) {\n return stacked == other;\n }\n bitmask |= COMPARE_UNORDERED_FLAG;\n\n // Recursively compare objects (susceptible to call stack limits).\n stack.set(object, other);\n var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n stack['delete'](object);\n return result;\n\n case symbolTag:\n if (symbolValueOf) {\n return symbolValueOf.call(object) == symbolValueOf.call(other);\n }\n }\n return false;\n}\n\nmodule.exports = equalByTag;\n","var getAllKeys = require('./_getAllKeys');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n objProps = getAllKeys(object),\n objLength = objProps.length,\n othProps = getAllKeys(other),\n othLength = othProps.length;\n\n if (objLength != othLength && !isPartial) {\n return false;\n }\n var index = objLength;\n while (index--) {\n var key = objProps[index];\n if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n return false;\n }\n }\n // Check that cyclic values are equal.\n var objStacked = stack.get(object);\n var othStacked = stack.get(other);\n if (objStacked && othStacked) {\n return objStacked == other && othStacked == object;\n }\n var result = true;\n stack.set(object, other);\n stack.set(other, object);\n\n var skipCtor = isPartial;\n while (++index < objLength) {\n key = objProps[index];\n var objValue = object[key],\n othValue = other[key];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, objValue, key, other, object, stack)\n : customizer(objValue, othValue, key, object, other, stack);\n }\n // Recursively compare objects (susceptible to call stack limits).\n if (!(compared === undefined\n ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n : compared\n )) {\n result = false;\n break;\n }\n skipCtor || (skipCtor = key == 'constructor');\n }\n if (result && !skipCtor) {\n var objCtor = object.constructor,\n othCtor = other.constructor;\n\n // Non `Object` object instances with different constructors are not equal.\n if (objCtor != othCtor &&\n ('constructor' in object && 'constructor' in other) &&\n !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n result = false;\n }\n }\n stack['delete'](object);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalObjects;\n","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n","var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbols = require('./_getSymbols'),\n keys = require('./keys');\n\n/**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeys(object) {\n return baseGetAllKeys(object, keys, getSymbols);\n}\n\nmodule.exports = getAllKeys;\n","var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbolsIn = require('./_getSymbolsIn'),\n keysIn = require('./keysIn');\n\n/**\n * Creates an array of own and inherited enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeysIn(object) {\n return baseGetAllKeys(object, keysIn, getSymbolsIn);\n}\n\nmodule.exports = getAllKeysIn;\n","var isKeyable = require('./_isKeyable');\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\nmodule.exports = getMapData;\n","var baseIsNative = require('./_baseIsNative'),\n getValue = require('./_getValue');\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\nmodule.exports = getNative;\n","var overArg = require('./_overArg');\n\n/** Built-in value references. */\nvar getPrototype = overArg(Object.getPrototypeOf, Object);\n\nmodule.exports = getPrototype;\n","var Symbol = require('./_Symbol');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nmodule.exports = getRawTag;\n","var arrayFilter = require('./_arrayFilter'),\n stubArray = require('./stubArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n if (object == null) {\n return [];\n }\n object = Object(object);\n return arrayFilter(nativeGetSymbols(object), function(symbol) {\n return propertyIsEnumerable.call(object, symbol);\n });\n};\n\nmodule.exports = getSymbols;\n","var arrayPush = require('./_arrayPush'),\n getPrototype = require('./_getPrototype'),\n getSymbols = require('./_getSymbols'),\n stubArray = require('./stubArray');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own and inherited enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {\n var result = [];\n while (object) {\n arrayPush(result, getSymbols(object));\n object = getPrototype(object);\n }\n return result;\n};\n\nmodule.exports = getSymbolsIn;\n","var DataView = require('./_DataView'),\n Map = require('./_Map'),\n Promise = require('./_Promise'),\n Set = require('./_Set'),\n WeakMap = require('./_WeakMap'),\n baseGetTag = require('./_baseGetTag'),\n toSource = require('./_toSource');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n setTag = '[object Set]',\n weakMapTag = '[object WeakMap]';\n\nvar dataViewTag = '[object DataView]';\n\n/** Used to detect maps, sets, and weakmaps. */\nvar dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nvar getTag = baseGetTag;\n\n// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\nif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = baseGetTag(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : '';\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n}\n\nmodule.exports = getTag;\n","/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\nmodule.exports = getValue;\n","var nativeCreate = require('./_nativeCreate');\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n}\n\nmodule.exports = hashClear;\n","/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = hashDelete;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\nmodule.exports = hashGet;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\nmodule.exports = hashHas;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\nmodule.exports = hashSet;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Initializes an array clone.\n *\n * @private\n * @param {Array} array The array to clone.\n * @returns {Array} Returns the initialized clone.\n */\nfunction initCloneArray(array) {\n var length = array.length,\n result = new array.constructor(length);\n\n // Add properties assigned by `RegExp#exec`.\n if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {\n result.index = array.index;\n result.input = array.input;\n }\n return result;\n}\n\nmodule.exports = initCloneArray;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer'),\n cloneDataView = require('./_cloneDataView'),\n cloneRegExp = require('./_cloneRegExp'),\n cloneSymbol = require('./_cloneSymbol'),\n cloneTypedArray = require('./_cloneTypedArray');\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/**\n * Initializes an object clone based on its `toStringTag`.\n *\n * **Note:** This function only supports cloning values with tags of\n * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.\n *\n * @private\n * @param {Object} object The object to clone.\n * @param {string} tag The `toStringTag` of the object to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneByTag(object, tag, isDeep) {\n var Ctor = object.constructor;\n switch (tag) {\n case arrayBufferTag:\n return cloneArrayBuffer(object);\n\n case boolTag:\n case dateTag:\n return new Ctor(+object);\n\n case dataViewTag:\n return cloneDataView(object, isDeep);\n\n case float32Tag: case float64Tag:\n case int8Tag: case int16Tag: case int32Tag:\n case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:\n return cloneTypedArray(object, isDeep);\n\n case mapTag:\n return new Ctor;\n\n case numberTag:\n case stringTag:\n return new Ctor(object);\n\n case regexpTag:\n return cloneRegExp(object);\n\n case setTag:\n return new Ctor;\n\n case symbolTag:\n return cloneSymbol(object);\n }\n}\n\nmodule.exports = initCloneByTag;\n","var baseCreate = require('./_baseCreate'),\n getPrototype = require('./_getPrototype'),\n isPrototype = require('./_isPrototype');\n\n/**\n * Initializes an object clone.\n *\n * @private\n * @param {Object} object The object to clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneObject(object) {\n return (typeof object.constructor == 'function' && !isPrototype(object))\n ? baseCreate(getPrototype(object))\n : {};\n}\n\nmodule.exports = initCloneObject;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n var type = typeof value;\n length = length == null ? MAX_SAFE_INTEGER : length;\n\n return !!length &&\n (type == 'number' ||\n (type != 'symbol' && reIsUint.test(value))) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\nmodule.exports = isIndex;\n","/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\nmodule.exports = isKeyable;\n","var coreJsData = require('./_coreJsData');\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\nmodule.exports = isMasked;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\nmodule.exports = isPrototype;\n","/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n}\n\nmodule.exports = listCacheClear;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype;\n\n/** Built-in value references. */\nvar splice = arrayProto.splice;\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n}\n\nmodule.exports = listCacheDelete;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\nmodule.exports = listCacheGet;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\nmodule.exports = listCacheHas;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\nmodule.exports = listCacheSet;\n","var Hash = require('./_Hash'),\n ListCache = require('./_ListCache'),\n Map = require('./_Map');\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\nmodule.exports = mapCacheClear;\n","var getMapData = require('./_getMapData');\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = mapCacheDelete;\n","var getMapData = require('./_getMapData');\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\nmodule.exports = mapCacheGet;\n","var getMapData = require('./_getMapData');\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\nmodule.exports = mapCacheHas;\n","var getMapData = require('./_getMapData');\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n}\n\nmodule.exports = mapCacheSet;\n","/**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\nfunction mapToArray(map) {\n var index = -1,\n result = Array(map.size);\n\n map.forEach(function(value, key) {\n result[++index] = [key, value];\n });\n return result;\n}\n\nmodule.exports = mapToArray;\n","var getNative = require('./_getNative');\n\n/* Built-in method references that are verified to be native. */\nvar nativeCreate = getNative(Object, 'create');\n\nmodule.exports = nativeCreate;\n","var overArg = require('./_overArg');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeKeys = overArg(Object.keys, Object);\n\nmodule.exports = nativeKeys;\n","/**\n * This function is like\n * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * except that it includes inherited enumerable properties.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction nativeKeysIn(object) {\n var result = [];\n if (object != null) {\n for (var key in Object(object)) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = nativeKeysIn;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n try {\n // Use `util.types` for Node.js 10+.\n var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n if (types) {\n return types;\n }\n\n // Legacy `process.binding('util')` for Node.js < 10.\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n}());\n\nmodule.exports = nodeUtil;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n","/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\nmodule.exports = overArg;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n","/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\nfunction setCacheAdd(value) {\n this.__data__.set(value, HASH_UNDEFINED);\n return this;\n}\n\nmodule.exports = setCacheAdd;\n","/**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\nfunction setCacheHas(value) {\n return this.__data__.has(value);\n}\n\nmodule.exports = setCacheHas;\n","/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\nfunction setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n}\n\nmodule.exports = setToArray;\n","var ListCache = require('./_ListCache');\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}\n\nmodule.exports = stackClear;\n","/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n var data = this.__data__,\n result = data['delete'](key);\n\n this.size = data.size;\n return result;\n}\n\nmodule.exports = stackDelete;\n","/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n return this.__data__.get(key);\n}\n\nmodule.exports = stackGet;\n","/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n return this.__data__.has(key);\n}\n\nmodule.exports = stackHas;\n","var ListCache = require('./_ListCache'),\n Map = require('./_Map'),\n MapCache = require('./_MapCache');\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n var data = this.__data__;\n if (data instanceof ListCache) {\n var pairs = data.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n this.size = ++data.size;\n return this;\n }\n data = this.__data__ = new MapCache(pairs);\n }\n data.set(key, value);\n this.size = data.size;\n return this;\n}\n\nmodule.exports = stackSet;\n","/** Used for built-in method references. */\nvar funcProto = Function.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\nmodule.exports = toSource;\n","var baseClone = require('./_baseClone');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_SYMBOLS_FLAG = 4;\n\n/**\n * This method is like `_.clone` except that it recursively clones `value`.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Lang\n * @param {*} value The value to recursively clone.\n * @returns {*} Returns the deep cloned value.\n * @see _.clone\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var deep = _.cloneDeep(objects);\n * console.log(deep[0] === objects[0]);\n * // => false\n */\nfunction cloneDeep(value) {\n return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);\n}\n\nmodule.exports = cloneDeep;\n","/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\nmodule.exports = eq;\n","var baseIsArguments = require('./_baseIsArguments'),\n isObjectLike = require('./isObjectLike');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n};\n\nmodule.exports = isArguments;\n","/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\nmodule.exports = isArray;\n","var isFunction = require('./isFunction'),\n isLength = require('./isLength');\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\nmodule.exports = isArrayLike;\n","var root = require('./_root'),\n stubFalse = require('./stubFalse');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\nmodule.exports = isBuffer;\n","var baseIsEqual = require('./_baseIsEqual');\n\n/**\n * Performs a deep comparison between two values to determine if they are\n * equivalent.\n *\n * **Note:** This method supports comparing arrays, array buffers, booleans,\n * date objects, error objects, maps, numbers, `Object` objects, regexes,\n * sets, strings, symbols, and typed arrays. `Object` objects are compared\n * by their own, not inherited, enumerable properties. Functions and DOM\n * nodes are compared by strict equality, i.e. `===`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.isEqual(object, other);\n * // => true\n *\n * object === other;\n * // => false\n */\nfunction isEqual(value, other) {\n return baseIsEqual(value, other);\n}\n\nmodule.exports = isEqual;\n","var baseGetTag = require('./_baseGetTag'),\n isObject = require('./isObject');\n\n/** `Object#toString` result references. */\nvar asyncTag = '[object AsyncFunction]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n proxyTag = '[object Proxy]';\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\nmodule.exports = isFunction;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\nmodule.exports = isLength;\n","var baseIsMap = require('./_baseIsMap'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsMap = nodeUtil && nodeUtil.isMap;\n\n/**\n * Checks if `value` is classified as a `Map` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n * @example\n *\n * _.isMap(new Map);\n * // => true\n *\n * _.isMap(new WeakMap);\n * // => false\n */\nvar isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;\n\nmodule.exports = isMap;\n","/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n","var baseIsSet = require('./_baseIsSet'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsSet = nodeUtil && nodeUtil.isSet;\n\n/**\n * Checks if `value` is classified as a `Set` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n * @example\n *\n * _.isSet(new Set);\n * // => true\n *\n * _.isSet(new WeakSet);\n * // => false\n */\nvar isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;\n\nmodule.exports = isSet;\n","var baseIsTypedArray = require('./_baseIsTypedArray'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\nmodule.exports = isTypedArray;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeys = require('./_baseKeys'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\nmodule.exports = keys;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeysIn = require('./_baseKeysIn'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\nfunction keysIn(object) {\n return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n}\n\nmodule.exports = keysIn;\n","/**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\nfunction stubArray() {\n return [];\n}\n\nmodule.exports = stubArray;\n","/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n return false;\n}\n\nmodule.exports = stubFalse;\n","import { connect, type BaseConnectionOptions } from \"@openfin/core-web\";\nimport { getSettings } from \"../platform/settings/settings\";\n\n/**\n * Initializes the OpenFin Web Broker connection.\n * @param inherit Should we inherit settings from the host (available in the OpenFin layout system) or use settings? Default is true.\n */\nexport async function init(inherit: boolean = true): Promise {\n\t// Set window.fin to the `fin` object.\n\tlet options: BaseConnectionOptions | undefined;\n\tif (window.fin === undefined) {\n\t\tif (!inherit) {\n\t\t\tconst settings = await getSettings();\n\t\t\tif (settings === undefined) {\n\t\t\t\tconsole.error(\n\t\t\t\t\t\"Unable to run the sample as we have been unable to load the web manifest and it's settings from the currently running html page. Please ensure that the web manifest is being served and that it contains the custom_settings section.\"\n\t\t\t\t);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\toptions = {\n\t\t\t\tbrokerUrl: settings.platform.interop.brokerUrl,\n\t\t\t\tinteropConfig: {\n\t\t\t\t\tproviderId: settings.platform.interop.providerId,\n\t\t\t\t\tcurrentContextGroup: settings.platform.interop.defaultContextGroup\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t\t// Specify an interopConfig with a specific provider ID and a context group to initialize the `fin.me.interop` client on connection.\n\t\tif (options) {\n\t\t\twindow.fin = await connect({\n\t\t\t\toptions\n\t\t\t});\n\t\t} else {\n\t\t\twindow.fin = await connect({\n\t\t\t\tconnectionInheritance: \"enabled\"\n\t\t\t});\n\t\t}\n\t\tconsole.log(\"Finished initializing the fin API.\");\n\t\t// Create and dispatch the finReady event\n\t\tconst event = new CustomEvent(\"finReady\");\n\t\twindow.dispatchEvent(event);\n\t}\n\n\tif (window.fdc3 === undefined && window?.fin?.me.interop?.getFDC3Sync !== undefined) {\n\t\twindow.fdc3 = fin.me.interop.getFDC3Sync(\"2.0\");\n\t\tconsole.log(\"Finished initializing the fdc3 API.\");\n\t\t// Create and dispatch the FDC3Ready event\n\t\tconst event = new CustomEvent(\"fdc3Ready\");\n\t\twindow.dispatchEvent(event);\n\t}\n}\n","import type { OpenFin } from \"@openfin/core\";\nimport type { ManifestSettings, Settings } from \"../../shapes/setting-shapes\";\n\n/**\n * Fetches the settings for the application.\n * @returns The settings for the application.\n */\nexport async function getSettings(): Promise {\n\tconst savedSettings = await getSavedSettings();\n\tif (savedSettings) {\n\t\treturn savedSettings;\n\t}\n\tconst settings = await getManifestSettings();\n\tif (!Array.isArray(settings?.endpointProvider?.endpoints)) {\n\t\tconsole.error(\n\t\t\t\"Unable to run the example as settings are required and we fetch them from the link web manifest from the html page that is being served. It should exist in the customSettings section of the web manifest.\"\n\t\t);\n\t\treturn;\n\t}\n\tconst settingsEndpoint = settings.endpointProvider.endpoints.find(\n\t\t(endpoint) => endpoint.id === \"platform-settings\"\n\t);\n\n\tif (\n\t\tsettingsEndpoint === undefined ||\n\t\tsettingsEndpoint.type !== \"fetch\" ||\n\t\tsettingsEndpoint.options.method !== \"GET\" ||\n\t\tsettingsEndpoint.options.url === undefined\n\t) {\n\t\tconsole.error(\n\t\t\t\"Unable to run the example as settings are required and we fetch them from the endpoint defined with the id: 'platform-settings' in the manifest. It needs to be of type fetch, performing a GET and it must have a url defined.\"\n\t\t);\n\t\treturn;\n\t}\n\tconst platformSettings = await fetch(settingsEndpoint?.options.url);\n\tconst settingsJson = (await platformSettings.json()) as Settings;\n\treturn settingsJson;\n}\n\n/**\n * Returns a default layout from the settings if provided.\n * @returns The default layout from the settings.\n */\nexport async function getDefaultLayout(): Promise {\n\tconst settings = await getSettings();\n\tif (settings?.platform?.layout?.defaultLayout === undefined) {\n\t\tconsole.error(\n\t\t\t\"Unable to run the example as without a layout being defined. Please ensure that settings have been provided in the web manifest.\"\n\t\t);\n\t\treturn;\n\t}\n\tif (typeof settings.platform.layout.defaultLayout === \"string\") {\n\t\tconst layoutResponse = await fetch(settings.platform.layout.defaultLayout);\n\t\tconst layoutJson = (await layoutResponse.json()) as OpenFin.LayoutSnapshot;\n\t\treturn layoutJson;\n\t}\n\treturn settings.platform.layout.defaultLayout;\n}\n\n/**\n * Returns the settings from the manifest file.\n * @returns customSettings for this example\n */\nasync function getManifestSettings(): Promise {\n\t// Get the manifest link\n\tconst link = document.querySelector('link[rel=\"manifest\"]');\n\tif (link !== null) {\n\t\tconst manifestResponse = await fetch(link.href);\n\t\tconst manifestJson = (await manifestResponse.json()) as { custom_settings: ManifestSettings };\n\t\treturn manifestJson.custom_settings;\n\t}\n}\n\n/**\n * Clears any saved settings.\n * @returns The saved settings.\n */\nexport async function clearSettings(): Promise {\n\tconst settingsId = getSavedSettingsId();\n\tlocalStorage.removeItem(settingsId);\n}\n\n/**\n * Saves the settings.\n * @param settings The settings to save.\n */\nexport async function saveSettings(settings: Settings): Promise {\n\tconst settingsId = getSavedSettingsId();\n\tlocalStorage.setItem(settingsId, JSON.stringify(settings));\n}\n\n/**\n * Retrieves saved settings from local storage.\n * @returns The saved settings.\n */\nasync function getSavedSettings(): Promise {\n\tconst settingsId = getSavedSettingsId();\n\tconst settings = localStorage.getItem(settingsId);\n\tif (settings !== null) {\n\t\treturn JSON.parse(settings);\n\t}\n}\n\n/**\n * Get the Id used for saving and fetching settings from storage.\n * @returns The settings id.\n */\nfunction getSavedSettingsId(): string {\n\tconst urlParams = new URLSearchParams(window.location.search);\n\tconst env = urlParams.get(\"env\");\n\n\tconst settingsKey = env ? `${env}-settings` : \"settings\";\n\treturn settingsKey;\n}\n","export { default as v1 } from './v1.js';\nexport { default as v3 } from './v3.js';\nexport { default as v4 } from './v4.js';\nexport { default as v5 } from './v5.js';\nexport { default as NIL } from './nil.js';\nexport { default as version } from './version.js';\nexport { default as validate } from './validate.js';\nexport { default as stringify } from './stringify.js';\nexport { default as parse } from './parse.js';","/*\n * Browser-compatible JavaScript MD5\n *\n * Modification of JavaScript MD5\n * https://github.com/blueimp/JavaScript-MD5\n *\n * Copyright 2011, Sebastian Tschan\n * https://blueimp.net\n *\n * Licensed under the MIT license:\n * https://opensource.org/licenses/MIT\n *\n * Based on\n * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message\n * Digest Algorithm, as defined in RFC 1321.\n * Version 2.2 Copyright (C) Paul Johnston 1999 - 2009\n * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet\n * Distributed under the BSD License\n * See http://pajhome.org.uk/crypt/md5 for more info.\n */\nfunction md5(bytes) {\n if (typeof bytes === 'string') {\n var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape\n\n bytes = new Uint8Array(msg.length);\n\n for (var i = 0; i < msg.length; ++i) {\n bytes[i] = msg.charCodeAt(i);\n }\n }\n\n return md5ToHexEncodedArray(wordsToMd5(bytesToWords(bytes), bytes.length * 8));\n}\n/*\n * Convert an array of little-endian words to an array of bytes\n */\n\n\nfunction md5ToHexEncodedArray(input) {\n var output = [];\n var length32 = input.length * 32;\n var hexTab = '0123456789abcdef';\n\n for (var i = 0; i < length32; i += 8) {\n var x = input[i >> 5] >>> i % 32 & 0xff;\n var hex = parseInt(hexTab.charAt(x >>> 4 & 0x0f) + hexTab.charAt(x & 0x0f), 16);\n output.push(hex);\n }\n\n return output;\n}\n/**\n * Calculate output length with padding and bit length\n */\n\n\nfunction getOutputLength(inputLength8) {\n return (inputLength8 + 64 >>> 9 << 4) + 14 + 1;\n}\n/*\n * Calculate the MD5 of an array of little-endian words, and a bit length.\n */\n\n\nfunction wordsToMd5(x, len) {\n /* append padding */\n x[len >> 5] |= 0x80 << len % 32;\n x[getOutputLength(len) - 1] = len;\n var a = 1732584193;\n var b = -271733879;\n var c = -1732584194;\n var d = 271733878;\n\n for (var i = 0; i < x.length; i += 16) {\n var olda = a;\n var oldb = b;\n var oldc = c;\n var oldd = d;\n a = md5ff(a, b, c, d, x[i], 7, -680876936);\n d = md5ff(d, a, b, c, x[i + 1], 12, -389564586);\n c = md5ff(c, d, a, b, x[i + 2], 17, 606105819);\n b = md5ff(b, c, d, a, x[i + 3], 22, -1044525330);\n a = md5ff(a, b, c, d, x[i + 4], 7, -176418897);\n d = md5ff(d, a, b, c, x[i + 5], 12, 1200080426);\n c = md5ff(c, d, a, b, x[i + 6], 17, -1473231341);\n b = md5ff(b, c, d, a, x[i + 7], 22, -45705983);\n a = md5ff(a, b, c, d, x[i + 8], 7, 1770035416);\n d = md5ff(d, a, b, c, x[i + 9], 12, -1958414417);\n c = md5ff(c, d, a, b, x[i + 10], 17, -42063);\n b = md5ff(b, c, d, a, x[i + 11], 22, -1990404162);\n a = md5ff(a, b, c, d, x[i + 12], 7, 1804603682);\n d = md5ff(d, a, b, c, x[i + 13], 12, -40341101);\n c = md5ff(c, d, a, b, x[i + 14], 17, -1502002290);\n b = md5ff(b, c, d, a, x[i + 15], 22, 1236535329);\n a = md5gg(a, b, c, d, x[i + 1], 5, -165796510);\n d = md5gg(d, a, b, c, x[i + 6], 9, -1069501632);\n c = md5gg(c, d, a, b, x[i + 11], 14, 643717713);\n b = md5gg(b, c, d, a, x[i], 20, -373897302);\n a = md5gg(a, b, c, d, x[i + 5], 5, -701558691);\n d = md5gg(d, a, b, c, x[i + 10], 9, 38016083);\n c = md5gg(c, d, a, b, x[i + 15], 14, -660478335);\n b = md5gg(b, c, d, a, x[i + 4], 20, -405537848);\n a = md5gg(a, b, c, d, x[i + 9], 5, 568446438);\n d = md5gg(d, a, b, c, x[i + 14], 9, -1019803690);\n c = md5gg(c, d, a, b, x[i + 3], 14, -187363961);\n b = md5gg(b, c, d, a, x[i + 8], 20, 1163531501);\n a = md5gg(a, b, c, d, x[i + 13], 5, -1444681467);\n d = md5gg(d, a, b, c, x[i + 2], 9, -51403784);\n c = md5gg(c, d, a, b, x[i + 7], 14, 1735328473);\n b = md5gg(b, c, d, a, x[i + 12], 20, -1926607734);\n a = md5hh(a, b, c, d, x[i + 5], 4, -378558);\n d = md5hh(d, a, b, c, x[i + 8], 11, -2022574463);\n c = md5hh(c, d, a, b, x[i + 11], 16, 1839030562);\n b = md5hh(b, c, d, a, x[i + 14], 23, -35309556);\n a = md5hh(a, b, c, d, x[i + 1], 4, -1530992060);\n d = md5hh(d, a, b, c, x[i + 4], 11, 1272893353);\n c = md5hh(c, d, a, b, x[i + 7], 16, -155497632);\n b = md5hh(b, c, d, a, x[i + 10], 23, -1094730640);\n a = md5hh(a, b, c, d, x[i + 13], 4, 681279174);\n d = md5hh(d, a, b, c, x[i], 11, -358537222);\n c = md5hh(c, d, a, b, x[i + 3], 16, -722521979);\n b = md5hh(b, c, d, a, x[i + 6], 23, 76029189);\n a = md5hh(a, b, c, d, x[i + 9], 4, -640364487);\n d = md5hh(d, a, b, c, x[i + 12], 11, -421815835);\n c = md5hh(c, d, a, b, x[i + 15], 16, 530742520);\n b = md5hh(b, c, d, a, x[i + 2], 23, -995338651);\n a = md5ii(a, b, c, d, x[i], 6, -198630844);\n d = md5ii(d, a, b, c, x[i + 7], 10, 1126891415);\n c = md5ii(c, d, a, b, x[i + 14], 15, -1416354905);\n b = md5ii(b, c, d, a, x[i + 5], 21, -57434055);\n a = md5ii(a, b, c, d, x[i + 12], 6, 1700485571);\n d = md5ii(d, a, b, c, x[i + 3], 10, -1894986606);\n c = md5ii(c, d, a, b, x[i + 10], 15, -1051523);\n b = md5ii(b, c, d, a, x[i + 1], 21, -2054922799);\n a = md5ii(a, b, c, d, x[i + 8], 6, 1873313359);\n d = md5ii(d, a, b, c, x[i + 15], 10, -30611744);\n c = md5ii(c, d, a, b, x[i + 6], 15, -1560198380);\n b = md5ii(b, c, d, a, x[i + 13], 21, 1309151649);\n a = md5ii(a, b, c, d, x[i + 4], 6, -145523070);\n d = md5ii(d, a, b, c, x[i + 11], 10, -1120210379);\n c = md5ii(c, d, a, b, x[i + 2], 15, 718787259);\n b = md5ii(b, c, d, a, x[i + 9], 21, -343485551);\n a = safeAdd(a, olda);\n b = safeAdd(b, oldb);\n c = safeAdd(c, oldc);\n d = safeAdd(d, oldd);\n }\n\n return [a, b, c, d];\n}\n/*\n * Convert an array bytes to an array of little-endian words\n * Characters >255 have their high-byte silently ignored.\n */\n\n\nfunction bytesToWords(input) {\n if (input.length === 0) {\n return [];\n }\n\n var length8 = input.length * 8;\n var output = new Uint32Array(getOutputLength(length8));\n\n for (var i = 0; i < length8; i += 8) {\n output[i >> 5] |= (input[i / 8] & 0xff) << i % 32;\n }\n\n return output;\n}\n/*\n * Add integers, wrapping at 2^32. This uses 16-bit operations internally\n * to work around bugs in some JS interpreters.\n */\n\n\nfunction safeAdd(x, y) {\n var lsw = (x & 0xffff) + (y & 0xffff);\n var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n return msw << 16 | lsw & 0xffff;\n}\n/*\n * Bitwise rotate a 32-bit number to the left.\n */\n\n\nfunction bitRotateLeft(num, cnt) {\n return num << cnt | num >>> 32 - cnt;\n}\n/*\n * These functions implement the four basic operations the algorithm uses.\n */\n\n\nfunction md5cmn(q, a, b, x, s, t) {\n return safeAdd(bitRotateLeft(safeAdd(safeAdd(a, q), safeAdd(x, t)), s), b);\n}\n\nfunction md5ff(a, b, c, d, x, s, t) {\n return md5cmn(b & c | ~b & d, a, b, x, s, t);\n}\n\nfunction md5gg(a, b, c, d, x, s, t) {\n return md5cmn(b & d | c & ~d, a, b, x, s, t);\n}\n\nfunction md5hh(a, b, c, d, x, s, t) {\n return md5cmn(b ^ c ^ d, a, b, x, s, t);\n}\n\nfunction md5ii(a, b, c, d, x, s, t) {\n return md5cmn(c ^ (b | ~d), a, b, x, s, t);\n}\n\nexport default md5;","export default '00000000-0000-0000-0000-000000000000';","import validate from './validate.js';\n\nfunction parse(uuid) {\n if (!validate(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n var v;\n var arr = new Uint8Array(16); // Parse ########-....-....-....-............\n\n arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24;\n arr[1] = v >>> 16 & 0xff;\n arr[2] = v >>> 8 & 0xff;\n arr[3] = v & 0xff; // Parse ........-####-....-....-............\n\n arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8;\n arr[5] = v & 0xff; // Parse ........-....-####-....-............\n\n arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8;\n arr[7] = v & 0xff; // Parse ........-....-....-####-............\n\n arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8;\n arr[9] = v & 0xff; // Parse ........-....-....-....-############\n // (Use \"/\" to avoid 32-bit truncation when bit-shifting high-order bytes)\n\n arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff;\n arr[11] = v / 0x100000000 & 0xff;\n arr[12] = v >>> 24 & 0xff;\n arr[13] = v >>> 16 & 0xff;\n arr[14] = v >>> 8 & 0xff;\n arr[15] = v & 0xff;\n return arr;\n}\n\nexport default parse;","export default /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;","// Unique ID creation requires a high quality random # generator. In the browser we therefore\n// require the crypto API and do not support built-in fallback to lower quality random number\n// generators (like Math.random()).\nvar getRandomValues;\nvar rnds8 = new Uint8Array(16);\nexport default function rng() {\n // lazy load so that environments that need to polyfill have a chance to do so\n if (!getRandomValues) {\n // getRandomValues needs to be invoked in a context where \"this\" is a Crypto implementation. Also,\n // find the complete implementation of crypto (msCrypto) on IE11.\n getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto !== 'undefined' && typeof msCrypto.getRandomValues === 'function' && msCrypto.getRandomValues.bind(msCrypto);\n\n if (!getRandomValues) {\n throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');\n }\n }\n\n return getRandomValues(rnds8);\n}","// Adapted from Chris Veness' SHA1 code at\n// http://www.movable-type.co.uk/scripts/sha1.html\nfunction f(s, x, y, z) {\n switch (s) {\n case 0:\n return x & y ^ ~x & z;\n\n case 1:\n return x ^ y ^ z;\n\n case 2:\n return x & y ^ x & z ^ y & z;\n\n case 3:\n return x ^ y ^ z;\n }\n}\n\nfunction ROTL(x, n) {\n return x << n | x >>> 32 - n;\n}\n\nfunction sha1(bytes) {\n var K = [0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xca62c1d6];\n var H = [0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0];\n\n if (typeof bytes === 'string') {\n var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape\n\n bytes = [];\n\n for (var i = 0; i < msg.length; ++i) {\n bytes.push(msg.charCodeAt(i));\n }\n } else if (!Array.isArray(bytes)) {\n // Convert Array-like to Array\n bytes = Array.prototype.slice.call(bytes);\n }\n\n bytes.push(0x80);\n var l = bytes.length / 4 + 2;\n var N = Math.ceil(l / 16);\n var M = new Array(N);\n\n for (var _i = 0; _i < N; ++_i) {\n var arr = new Uint32Array(16);\n\n for (var j = 0; j < 16; ++j) {\n arr[j] = bytes[_i * 64 + j * 4] << 24 | bytes[_i * 64 + j * 4 + 1] << 16 | bytes[_i * 64 + j * 4 + 2] << 8 | bytes[_i * 64 + j * 4 + 3];\n }\n\n M[_i] = arr;\n }\n\n M[N - 1][14] = (bytes.length - 1) * 8 / Math.pow(2, 32);\n M[N - 1][14] = Math.floor(M[N - 1][14]);\n M[N - 1][15] = (bytes.length - 1) * 8 & 0xffffffff;\n\n for (var _i2 = 0; _i2 < N; ++_i2) {\n var W = new Uint32Array(80);\n\n for (var t = 0; t < 16; ++t) {\n W[t] = M[_i2][t];\n }\n\n for (var _t = 16; _t < 80; ++_t) {\n W[_t] = ROTL(W[_t - 3] ^ W[_t - 8] ^ W[_t - 14] ^ W[_t - 16], 1);\n }\n\n var a = H[0];\n var b = H[1];\n var c = H[2];\n var d = H[3];\n var e = H[4];\n\n for (var _t2 = 0; _t2 < 80; ++_t2) {\n var s = Math.floor(_t2 / 20);\n var T = ROTL(a, 5) + f(s, b, c, d) + e + K[s] + W[_t2] >>> 0;\n e = d;\n d = c;\n c = ROTL(b, 30) >>> 0;\n b = a;\n a = T;\n }\n\n H[0] = H[0] + a >>> 0;\n H[1] = H[1] + b >>> 0;\n H[2] = H[2] + c >>> 0;\n H[3] = H[3] + d >>> 0;\n H[4] = H[4] + e >>> 0;\n }\n\n return [H[0] >> 24 & 0xff, H[0] >> 16 & 0xff, H[0] >> 8 & 0xff, H[0] & 0xff, H[1] >> 24 & 0xff, H[1] >> 16 & 0xff, H[1] >> 8 & 0xff, H[1] & 0xff, H[2] >> 24 & 0xff, H[2] >> 16 & 0xff, H[2] >> 8 & 0xff, H[2] & 0xff, H[3] >> 24 & 0xff, H[3] >> 16 & 0xff, H[3] >> 8 & 0xff, H[3] & 0xff, H[4] >> 24 & 0xff, H[4] >> 16 & 0xff, H[4] >> 8 & 0xff, H[4] & 0xff];\n}\n\nexport default sha1;","import validate from './validate.js';\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\n\nvar byteToHex = [];\n\nfor (var i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).substr(1));\n}\n\nfunction stringify(arr) {\n var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n var uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!validate(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n\n return uuid;\n}\n\nexport default stringify;","import rng from './rng.js';\nimport stringify from './stringify.js'; // **`v1()` - Generate time-based UUID**\n//\n// Inspired by https://github.com/LiosK/UUID.js\n// and http://docs.python.org/library/uuid.html\n\nvar _nodeId;\n\nvar _clockseq; // Previous uuid creation time\n\n\nvar _lastMSecs = 0;\nvar _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details\n\nfunction v1(options, buf, offset) {\n var i = buf && offset || 0;\n var b = buf || new Array(16);\n options = options || {};\n var node = options.node || _nodeId;\n var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not\n // specified. We do this lazily to minimize issues related to insufficient\n // system entropy. See #189\n\n if (node == null || clockseq == null) {\n var seedBytes = options.random || (options.rng || rng)();\n\n if (node == null) {\n // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)\n node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]];\n }\n\n if (clockseq == null) {\n // Per 4.2.2, randomize (14 bit) clockseq\n clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;\n }\n } // UUID timestamps are 100 nano-second units since the Gregorian epoch,\n // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so\n // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'\n // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.\n\n\n var msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock\n // cycle to simulate higher resolution clock\n\n var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs)\n\n var dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression\n\n if (dt < 0 && options.clockseq === undefined) {\n clockseq = clockseq + 1 & 0x3fff;\n } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new\n // time interval\n\n\n if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {\n nsecs = 0;\n } // Per 4.2.1.2 Throw error if too many uuids are requested\n\n\n if (nsecs >= 10000) {\n throw new Error(\"uuid.v1(): Can't create more than 10M uuids/sec\");\n }\n\n _lastMSecs = msecs;\n _lastNSecs = nsecs;\n _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch\n\n msecs += 12219292800000; // `time_low`\n\n var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;\n b[i++] = tl >>> 24 & 0xff;\n b[i++] = tl >>> 16 & 0xff;\n b[i++] = tl >>> 8 & 0xff;\n b[i++] = tl & 0xff; // `time_mid`\n\n var tmh = msecs / 0x100000000 * 10000 & 0xfffffff;\n b[i++] = tmh >>> 8 & 0xff;\n b[i++] = tmh & 0xff; // `time_high_and_version`\n\n b[i++] = tmh >>> 24 & 0xf | 0x10; // include version\n\n b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)\n\n b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low`\n\n b[i++] = clockseq & 0xff; // `node`\n\n for (var n = 0; n < 6; ++n) {\n b[i + n] = node[n];\n }\n\n return buf || stringify(b);\n}\n\nexport default v1;","import v35 from './v35.js';\nimport md5 from './md5.js';\nvar v3 = v35('v3', 0x30, md5);\nexport default v3;","import stringify from './stringify.js';\nimport parse from './parse.js';\n\nfunction stringToBytes(str) {\n str = unescape(encodeURIComponent(str)); // UTF8 escape\n\n var bytes = [];\n\n for (var i = 0; i < str.length; ++i) {\n bytes.push(str.charCodeAt(i));\n }\n\n return bytes;\n}\n\nexport var DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8';\nexport var URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8';\nexport default function (name, version, hashfunc) {\n function generateUUID(value, namespace, buf, offset) {\n if (typeof value === 'string') {\n value = stringToBytes(value);\n }\n\n if (typeof namespace === 'string') {\n namespace = parse(namespace);\n }\n\n if (namespace.length !== 16) {\n throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)');\n } // Compute hash of namespace and value, Per 4.3\n // Future: Use spread syntax when supported on all platforms, e.g. `bytes =\n // hashfunc([...namespace, ... value])`\n\n\n var bytes = new Uint8Array(16 + value.length);\n bytes.set(namespace);\n bytes.set(value, namespace.length);\n bytes = hashfunc(bytes);\n bytes[6] = bytes[6] & 0x0f | version;\n bytes[8] = bytes[8] & 0x3f | 0x80;\n\n if (buf) {\n offset = offset || 0;\n\n for (var i = 0; i < 16; ++i) {\n buf[offset + i] = bytes[i];\n }\n\n return buf;\n }\n\n return stringify(bytes);\n } // Function#name is not settable on some platforms (#270)\n\n\n try {\n generateUUID.name = name; // eslint-disable-next-line no-empty\n } catch (err) {} // For CommonJS default export support\n\n\n generateUUID.DNS = DNS;\n generateUUID.URL = URL;\n return generateUUID;\n}","import rng from './rng.js';\nimport stringify from './stringify.js';\n\nfunction v4(options, buf, offset) {\n options = options || {};\n var rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n offset = offset || 0;\n\n for (var i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n\n return buf;\n }\n\n return stringify(rnds);\n}\n\nexport default v4;","import v35 from './v35.js';\nimport sha1 from './sha1.js';\nvar v5 = v35('v5', 0x50, sha1);\nexport default v5;","import REGEX from './regex.js';\n\nfunction validate(uuid) {\n return typeof uuid === 'string' && REGEX.test(uuid);\n}\n\nexport default validate;","import validate from './validate.js';\n\nfunction version(uuid) {\n if (!validate(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n return parseInt(uuid.substr(14, 1), 16);\n}\n\nexport default version;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = (module) => {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","import type { Context } from \"@finos/fdc3\";\nimport { init } from \"./api\";\n\nwindow.addEventListener(\"DOMContentLoaded\", async () => {\n\tawait init(true);\n\tawait initializeDOM();\n});\n\n/**\n * Broadcasts a context using FDC3.\n */\nasync function broadcastContext(): Promise {\n\tconst contextType = \"fdc3.instrument\";\n\tconst contextName = \"Apple\";\n\tconst idData = {\n\t\tticker: \"AAPL\"\n\t};\n\tconst context = {\n\t\ttype: contextType,\n\t\tname: contextName,\n\t\tid: idData\n\t};\n\tif (window.fdc3) {\n\t\tawait window.fdc3.broadcast(context);\n\t\tconsole.log(`Broadcasted context: ${contextType} - ${contextName}`);\n\t} else {\n\t\twindow.addEventListener(\"fdc3Ready\", async () => {\n\t\t\tawait window.fdc3.broadcast(context);\n\t\t\tconsole.log(`Broadcasted context: ${contextType} - ${contextName}`);\n\t\t});\n\t}\n}\n\n/**\n * Adds an FDC3 context listener to the window.\n */\nasync function addFDC3Listener(): Promise {\n\tif (window.fdc3) {\n\t\tawait window.fdc3.addContextListener(null, (context) => {\n\t\t\tupdateDOMElements(context);\n\t\t});\n\t} else {\n\t\twindow.addEventListener(\"fdc3Ready\", async () => {\n\t\t\tawait window.fdc3.addContextListener(null, (context) => {\n\t\t\t\tupdateDOMElements(context);\n\t\t\t});\n\t\t});\n\t}\n}\n\n/**\n * Updates the DOM elements with the provided context.\n * @param context The context to update the DOM elements with.\n */\nfunction updateDOMElements(context: Context): void {\n\tconst contextTypeSpan = document.querySelector(\"#contextType\");\n\tconst contextNameSpan = document.querySelector(\"#contextName\");\n\tconst contextBodyPre = document.querySelector(\"#contextBody\");\n\n\tif (contextTypeSpan !== null && contextNameSpan !== null && contextBodyPre !== null) {\n\t\tcontextTypeSpan.textContent = context.type;\n\t\tcontextNameSpan.textContent = context.name ?? \"No name provided.\";\n\t\tcontextBodyPre.textContent = JSON.stringify(context, null, 2);\n\t}\n}\n\n/**\n * Initialize the DOM elements.\n */\nasync function initializeDOM(): Promise {\n\tconst broadcastButton = document.querySelector(\"#broadcast\");\n\n\tif (broadcastButton !== null) {\n\t\tbroadcastButton.addEventListener(\"click\", async () => {\n\t\t\tawait broadcastContext();\n\t\t});\n\t}\n\n\tawait addFDC3Listener();\n}\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/web/v19.2.0/web-interop-support-context-and-intents/js/iframe-broker.bundle.js b/web/v19.2.0/web-interop-support-context-and-intents/js/iframe-broker.bundle.js index 7fdd3ed..c8191e4 100644 --- a/web/v19.2.0/web-interop-support-context-and-intents/js/iframe-broker.bundle.js +++ b/web/v19.2.0/web-interop-support-context-and-intents/js/iframe-broker.bundle.js @@ -2,10 +2,10 @@ /******/ "use strict"; /******/ var __webpack_modules__ = ({ -/***/ "./node_modules/@openfin/core-web/out/iframe-broker.js": -/*!*************************************************************!*\ - !*** ./node_modules/@openfin/core-web/out/iframe-broker.js ***! - \*************************************************************/ +/***/ "../../node_modules/@openfin/core-web/out/iframe-broker.js": +/*!*****************************************************************!*\ + !*** ../../node_modules/@openfin/core-web/out/iframe-broker.js ***! + \*****************************************************************/ /***/ ((__unused_webpack_module, exports) => { const e="web-broker-ports-ready",t="worker-initialize-connection",i="create-fallback-connection",r="request-fallback-connection",n=e=>`ack-${e}`,o=(...e)=>({log:(...t)=>console.debug(`[${(new Date).toISOString()}]`,...(e=>e.map((e=>`[${e}]`)))(e),...t),getLogger:(...t)=>o(...e,...t)}),s=e=>window.top===e,a=(e,t)=>{try{return e.origin===t.origin}catch(e){return!1}},c="openfin/web-shared-worker";class d{static get lockApi(){return navigator.locks}constructor(e){this.name=e,this.releaseCallback=null,d.pending.add(this),this.lockAcquiredPromise=new Promise(((e,t)=>{this.lockReleasedPromise=d.lockApi.request(this.name,(()=>(d.pending.delete(this),e(),new Promise((e=>{d.held.add(this),this.releaseCallback=e}))))).catch((e=>{throw t(e),e}))}))}async acquired(){await this.lockAcquiredPromise}async release(){if(!this.releaseCallback)throw new Error(`Lock ${this.name} not acquired.`);this.releaseCallback(),this.releaseCallback=null,await this.lockReleasedPromise,d.held.delete(this)}async onReleased(e){if(!this.lockReleasedPromise)throw new Error(`Lock ${this.name} not queued.`);return this.lockReleasedPromise.then(e)}autoRelease(){this.acquired().then((()=>this.release()))}static async releaseAll(){const e=Promise.all([...this.pending].map((async e=>{await e.acquired(),await e.release()})));await Promise.all([...this.held].map((async e=>{await e.release()}))),await e}}d.pending=new Set,d.held=new Set;class l{constructor(e=100,t=2){this.pingIntervalMs=e,this.allowedMissedPings=t,this.lockSelf=async e=>{const t=new d((e=>`__OPENFIN__${e.uuid}_${e.name}`)(e));return await t.acquired(),t}}async lockProxiedConnection(e,t){let i=0;t.addEventListener("message",(e=>{"pong"===e.data.topic&&i--}));const r=await this.lockSelf(e);let n=setInterval((()=>{i>=this.allowedMissedPings?(r.release(),clearInterval(n)):(i++,t.postMessage({topic:"ping"}))}),this.pingIntervalMs);t.start()}registerProxiedConnection(e){e.addEventListener("message",(t=>{"ping"===t.data.topic&&e.postMessage({topic:"pong"})})),e.start()}}class h{constructor(e,t,o){this.workerUrl=e,this.iframeWindow=t,this.forceWorker=o,this.identityDisconnectionController=new l,this.isSharedWorkerSupported=()=>!this.forceWorker&&!!window.SharedWorker,this.state="ready",this.establishWorkerConnectionViaWindow=async(e,t)=>{if(a(this.iframeWindow,e)){const o=new MessageChannel,s=new MessageChannel;return this.identityDisconnectionController.registerProxiedConnection(s.port1),new Promise(((a,c)=>{o.port1.addEventListener("message",(e=>{e.data.topic===n(i)&&(e.data.success?a(o.port1):c(e.data.reason))})),o.port1.start();const d={topic:r,payload:{identity:t}};e.postMessage(d,location.origin,[o.port2,s.port2])}))}throw new Error("Could not connect via top level browsing context as its origin does not much the web interop broker.")},this.listenForNestedConnections=e=>{"top-window"===this.state&&a(this.iframeWindow,this.iframeWindow.parent)&&this.iframeWindow.parent.addEventListener("message",(async t=>{const{data:n}=t;if(t.origin===location.origin&&n.topic===r){const[r,...o]=t.ports;if(o.length>0&&n.payload?.identity){const[e]=o;await this.identityDisconnectionController.lockProxiedConnection(n.payload.identity,e)}const s={topic:i};e.postMessage(s,[r])}}))},this.initialize=async e=>{if("ready"!==this.state)throw new Error("Worker connection already initialized");return(e=>{const t=i=>!(!(e=>{try{return!e.origin}catch(e){return!0}})(i)&&i.origin===e.origin)||!s(i)&&t(i.parent);return!s(e)&&t(e.parent)})(this.iframeWindow)&&a(this.iframeWindow,this.iframeWindow.top)?this.state="partitioned-frame":s(this.iframeWindow.parent)?this.state="top-window":this.state="frame",this.connect(e)}}async connect(e){if("ready"===this.state)throw new Error("Must call initialize before connect");switch(this.state){case"partitioned-frame":return this.establishWorkerConnectionViaWindow(this.iframeWindow.top,e);case"top-window":{let t;return t=this.isSharedWorkerSupported()?new SharedWorker(this.workerUrl,c).port:new Worker(this.workerUrl),await this.identityDisconnectionController.lockSelf(e),this.listenForNestedConnections(t),t}case"frame":{if(!this.isSharedWorkerSupported())try{return await this.establishWorkerConnectionViaWindow(this.iframeWindow.top,e)}catch(e){throw new Error(`SharedWorker is not supported and an unexpected error occured when trying to connect via fallback mechanism: ${e.message}`,{cause:e})}await this.identityDisconnectionController.lockSelf(e);const{port:t}=new SharedWorker(this.workerUrl,c);return t}default:throw this.state,new Error(`Invalid state: ${this.state}`)}}}const w=o("@openfin/core-web/iframe-broker"),p=()=>{const e=((e,t)=>{const i=new RegExp(`^${t}<(?.*)>$`).exec(e)?.groups?.meta;if(i)try{return JSON.parse(atob(i))}catch(e){throw new Error(`Failed to decode JSON from ${i}.`)}})(window.name,"of-broker");if(!e)throw new Error("Invalid or missing identity string in iframe context. Ensure that this iframe is being renderered via the @openfin/core-web library.");return e};function g(t){const i={topic:n(e),success:!1,reason:t?.reason??"Connection Rejected"};window.parent.postMessage(i,"*")}exports.init=async i=>{try{const{sharedWorkerUrl:r}=i;await("loading"===document.readyState?new Promise((e=>{const t=()=>{e(),window.removeEventListener("DOMContentLoaded",t)};window.addEventListener("DOMContentLoaded",t)})):Promise.resolve());const o=p(),s=new h(r,window,"same-site"!==i.experimental?.crossTab),a=await s.initialize(o);w.log(`Loading ${r} in ${s.state} mode...`);const c=await(async(i,r,o)=>{const s=new MessageChannel,a=new MessageChannel,c={topic:t,payload:{identity:o}};await new Promise(((e,i)=>{r.addEventListener("message",(r=>{r.data.topic===n(t)&&(r.data.success?e():i(new Error(r.data.reason)))})),r.start?.(),r.postMessage(c,[a.port2])}));const d={topic:n(e),success:!0,payload:{identity:o}};return i.postMessage(d,"*",[s.port2,a.port1]),s.port1})(window.parent,a,o);c.start(),a.start?.(),w.log(`Port transfer complete in ${s.state} mode. Connection established with identity ${JSON.stringify(o)}. SharedWorker support=${s.isSharedWorkerSupported()}`)}catch(e){const t=new Error(`An unexpected error occured during initialization. ${e.message}`);g({reason:t.message}),console.error(t)}},exports.rejectConnections=g; @@ -150,7 +150,7 @@ function getSavedSettingsId() { /******/ /************************************************************************/ var __webpack_exports__ = {}; -// This entry need to be wrapped in an IIFE because it uses a non-standard name for the exports (exports). +// This entry needs to be wrapped in an IIFE because it needs to be isolated against other modules in the chunk. (() => { var exports = __webpack_exports__; /*!**********************************************!*\ @@ -158,7 +158,7 @@ var exports = __webpack_exports__; \**********************************************/ Object.defineProperty(exports, "__esModule", ({ value: true })); -const iframe_broker_1 = __webpack_require__(/*! @openfin/core-web/iframe-broker */ "./node_modules/@openfin/core-web/out/iframe-broker.js"); +const iframe_broker_1 = __webpack_require__(/*! @openfin/core-web/iframe-broker */ "../../node_modules/@openfin/core-web/out/iframe-broker.js"); const settings_1 = __webpack_require__(/*! ./settings/settings */ "./client/src/platform/settings/settings.ts"); /** * Initializes the OpenFin Web Broker connection. diff --git a/web/v19.2.0/web-interop-support-context-and-intents/js/iframe-broker.bundle.js.map b/web/v19.2.0/web-interop-support-context-and-intents/js/iframe-broker.bundle.js.map index 2178251..9f09e46 100644 --- a/web/v19.2.0/web-interop-support-context-and-intents/js/iframe-broker.bundle.js.map +++ b/web/v19.2.0/web-interop-support-context-and-intents/js/iframe-broker.bundle.js.map @@ -1 +1 @@ -{"version":3,"file":"iframe-broker.bundle.js","mappings":";;;;;;;;;;AAAa,6IAA6I,EAAE,cAAc,8BAA8B,yBAAyB,wBAAwB,EAAE,8CAA8C,gCAAgC,IAAI,2BAA2B,SAAS,UAAU,+BAA+B,QAAQ,qBAAqB,uBAAuB,eAAe,wGAAwG,uGAAuG,wCAAwC,iBAAiB,aAAa,GAAG,GAAG,iBAAiB,+B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C,CAAC,GAAG,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC","sources":["webpack://openfin-web--web-interop-support-context-and-intents/./node_modules/@openfin/core-web/out/iframe-broker.js","webpack://openfin-web--web-interop-support-context-and-intents/./client/src/platform/settings/settings.ts","webpack://openfin-web--web-interop-support-context-and-intents/webpack/bootstrap","webpack://openfin-web--web-interop-support-context-and-intents/./client/src/platform/iframe-broker.ts"],"sourcesContent":["\"use strict\";const e=\"web-broker-ports-ready\",t=\"worker-initialize-connection\",i=\"create-fallback-connection\",r=\"request-fallback-connection\",n=e=>`ack-${e}`,o=(...e)=>({log:(...t)=>console.debug(`[${(new Date).toISOString()}]`,...(e=>e.map((e=>`[${e}]`)))(e),...t),getLogger:(...t)=>o(...e,...t)}),s=e=>window.top===e,a=(e,t)=>{try{return e.origin===t.origin}catch(e){return!1}},c=\"openfin/web-shared-worker\";class d{static get lockApi(){return navigator.locks}constructor(e){this.name=e,this.releaseCallback=null,d.pending.add(this),this.lockAcquiredPromise=new Promise(((e,t)=>{this.lockReleasedPromise=d.lockApi.request(this.name,(()=>(d.pending.delete(this),e(),new Promise((e=>{d.held.add(this),this.releaseCallback=e}))))).catch((e=>{throw t(e),e}))}))}async acquired(){await this.lockAcquiredPromise}async release(){if(!this.releaseCallback)throw new Error(`Lock ${this.name} not acquired.`);this.releaseCallback(),this.releaseCallback=null,await this.lockReleasedPromise,d.held.delete(this)}async onReleased(e){if(!this.lockReleasedPromise)throw new Error(`Lock ${this.name} not queued.`);return this.lockReleasedPromise.then(e)}autoRelease(){this.acquired().then((()=>this.release()))}static async releaseAll(){const e=Promise.all([...this.pending].map((async e=>{await e.acquired(),await e.release()})));await Promise.all([...this.held].map((async e=>{await e.release()}))),await e}}d.pending=new Set,d.held=new Set;class l{constructor(e=100,t=2){this.pingIntervalMs=e,this.allowedMissedPings=t,this.lockSelf=async e=>{const t=new d((e=>`__OPENFIN__${e.uuid}_${e.name}`)(e));return await t.acquired(),t}}async lockProxiedConnection(e,t){let i=0;t.addEventListener(\"message\",(e=>{\"pong\"===e.data.topic&&i--}));const r=await this.lockSelf(e);let n=setInterval((()=>{i>=this.allowedMissedPings?(r.release(),clearInterval(n)):(i++,t.postMessage({topic:\"ping\"}))}),this.pingIntervalMs);t.start()}registerProxiedConnection(e){e.addEventListener(\"message\",(t=>{\"ping\"===t.data.topic&&e.postMessage({topic:\"pong\"})})),e.start()}}class h{constructor(e,t,o){this.workerUrl=e,this.iframeWindow=t,this.forceWorker=o,this.identityDisconnectionController=new l,this.isSharedWorkerSupported=()=>!this.forceWorker&&!!window.SharedWorker,this.state=\"ready\",this.establishWorkerConnectionViaWindow=async(e,t)=>{if(a(this.iframeWindow,e)){const o=new MessageChannel,s=new MessageChannel;return this.identityDisconnectionController.registerProxiedConnection(s.port1),new Promise(((a,c)=>{o.port1.addEventListener(\"message\",(e=>{e.data.topic===n(i)&&(e.data.success?a(o.port1):c(e.data.reason))})),o.port1.start();const d={topic:r,payload:{identity:t}};e.postMessage(d,location.origin,[o.port2,s.port2])}))}throw new Error(\"Could not connect via top level browsing context as its origin does not much the web interop broker.\")},this.listenForNestedConnections=e=>{\"top-window\"===this.state&&a(this.iframeWindow,this.iframeWindow.parent)&&this.iframeWindow.parent.addEventListener(\"message\",(async t=>{const{data:n}=t;if(t.origin===location.origin&&n.topic===r){const[r,...o]=t.ports;if(o.length>0&&n.payload?.identity){const[e]=o;await this.identityDisconnectionController.lockProxiedConnection(n.payload.identity,e)}const s={topic:i};e.postMessage(s,[r])}}))},this.initialize=async e=>{if(\"ready\"!==this.state)throw new Error(\"Worker connection already initialized\");return(e=>{const t=i=>!(!(e=>{try{return!e.origin}catch(e){return!0}})(i)&&i.origin===e.origin)||!s(i)&&t(i.parent);return!s(e)&&t(e.parent)})(this.iframeWindow)&&a(this.iframeWindow,this.iframeWindow.top)?this.state=\"partitioned-frame\":s(this.iframeWindow.parent)?this.state=\"top-window\":this.state=\"frame\",this.connect(e)}}async connect(e){if(\"ready\"===this.state)throw new Error(\"Must call initialize before connect\");switch(this.state){case\"partitioned-frame\":return this.establishWorkerConnectionViaWindow(this.iframeWindow.top,e);case\"top-window\":{let t;return t=this.isSharedWorkerSupported()?new SharedWorker(this.workerUrl,c).port:new Worker(this.workerUrl),await this.identityDisconnectionController.lockSelf(e),this.listenForNestedConnections(t),t}case\"frame\":{if(!this.isSharedWorkerSupported())try{return await this.establishWorkerConnectionViaWindow(this.iframeWindow.top,e)}catch(e){throw new Error(`SharedWorker is not supported and an unexpected error occured when trying to connect via fallback mechanism: ${e.message}`,{cause:e})}await this.identityDisconnectionController.lockSelf(e);const{port:t}=new SharedWorker(this.workerUrl,c);return t}default:throw this.state,new Error(`Invalid state: ${this.state}`)}}}const w=o(\"@openfin/core-web/iframe-broker\"),p=()=>{const e=((e,t)=>{const i=new RegExp(`^${t}<(?.*)>$`).exec(e)?.groups?.meta;if(i)try{return JSON.parse(atob(i))}catch(e){throw new Error(`Failed to decode JSON from ${i}.`)}})(window.name,\"of-broker\");if(!e)throw new Error(\"Invalid or missing identity string in iframe context. Ensure that this iframe is being renderered via the @openfin/core-web library.\");return e};function g(t){const i={topic:n(e),success:!1,reason:t?.reason??\"Connection Rejected\"};window.parent.postMessage(i,\"*\")}exports.init=async i=>{try{const{sharedWorkerUrl:r}=i;await(\"loading\"===document.readyState?new Promise((e=>{const t=()=>{e(),window.removeEventListener(\"DOMContentLoaded\",t)};window.addEventListener(\"DOMContentLoaded\",t)})):Promise.resolve());const o=p(),s=new h(r,window,\"same-site\"!==i.experimental?.crossTab),a=await s.initialize(o);w.log(`Loading ${r} in ${s.state} mode...`);const c=await(async(i,r,o)=>{const s=new MessageChannel,a=new MessageChannel,c={topic:t,payload:{identity:o}};await new Promise(((e,i)=>{r.addEventListener(\"message\",(r=>{r.data.topic===n(t)&&(r.data.success?e():i(new Error(r.data.reason)))})),r.start?.(),r.postMessage(c,[a.port2])}));const d={topic:n(e),success:!0,payload:{identity:o}};return i.postMessage(d,\"*\",[s.port2,a.port1]),s.port1})(window.parent,a,o);c.start(),a.start?.(),w.log(`Port transfer complete in ${s.state} mode. Connection established with identity ${JSON.stringify(o)}. SharedWorker support=${s.isSharedWorkerSupported()}`)}catch(e){const t=new Error(`An unexpected error occured during initialization. ${e.message}`);g({reason:t.message}),console.error(t)}},exports.rejectConnections=g;\n","import type { OpenFin } from \"@openfin/core\";\nimport type { ManifestSettings, Settings } from \"../../shapes/setting-shapes\";\n\n/**\n * Fetches the settings for the application.\n * @returns The settings for the application.\n */\nexport async function getSettings(): Promise {\n\tconst savedSettings = await getSavedSettings();\n\tif (savedSettings) {\n\t\treturn savedSettings;\n\t}\n\tconst settings = await getManifestSettings();\n\tif (!Array.isArray(settings?.endpointProvider?.endpoints)) {\n\t\tconsole.error(\n\t\t\t\"Unable to run the example as settings are required and we fetch them from the link web manifest from the html page that is being served. It should exist in the customSettings section of the web manifest.\"\n\t\t);\n\t\treturn;\n\t}\n\tconst settingsEndpoint = settings.endpointProvider.endpoints.find(\n\t\t(endpoint) => endpoint.id === \"platform-settings\"\n\t);\n\n\tif (\n\t\tsettingsEndpoint === undefined ||\n\t\tsettingsEndpoint.type !== \"fetch\" ||\n\t\tsettingsEndpoint.options.method !== \"GET\" ||\n\t\tsettingsEndpoint.options.url === undefined\n\t) {\n\t\tconsole.error(\n\t\t\t\"Unable to run the example as settings are required and we fetch them from the endpoint defined with the id: 'platform-settings' in the manifest. It needs to be of type fetch, performing a GET and it must have a url defined.\"\n\t\t);\n\t\treturn;\n\t}\n\tconst platformSettings = await fetch(settingsEndpoint?.options.url);\n\tconst settingsJson = (await platformSettings.json()) as Settings;\n\treturn settingsJson;\n}\n\n/**\n * Returns a default layout from the settings if provided.\n * @returns The default layout from the settings.\n */\nexport async function getDefaultLayout(): Promise {\n\tconst settings = await getSettings();\n\tif (settings?.platform?.layout?.defaultLayout === undefined) {\n\t\tconsole.error(\n\t\t\t\"Unable to run the example as without a layout being defined. Please ensure that settings have been provided in the web manifest.\"\n\t\t);\n\t\treturn;\n\t}\n\tif (typeof settings.platform.layout.defaultLayout === \"string\") {\n\t\tconst layoutResponse = await fetch(settings.platform.layout.defaultLayout);\n\t\tconst layoutJson = (await layoutResponse.json()) as OpenFin.LayoutSnapshot;\n\t\treturn layoutJson;\n\t}\n\treturn settings.platform.layout.defaultLayout;\n}\n\n/**\n * Returns the settings from the manifest file.\n * @returns customSettings for this example\n */\nasync function getManifestSettings(): Promise {\n\t// Get the manifest link\n\tconst link = document.querySelector('link[rel=\"manifest\"]');\n\tif (link !== null) {\n\t\tconst manifestResponse = await fetch(link.href);\n\t\tconst manifestJson = (await manifestResponse.json()) as { custom_settings: ManifestSettings };\n\t\treturn manifestJson.custom_settings;\n\t}\n}\n\n/**\n * Clears any saved settings.\n * @returns The saved settings.\n */\nexport async function clearSettings(): Promise {\n\tconst settingsId = getSavedSettingsId();\n\tlocalStorage.removeItem(settingsId);\n}\n\n/**\n * Saves the settings.\n * @param settings The settings to save.\n */\nexport async function saveSettings(settings: Settings): Promise {\n\tconst settingsId = getSavedSettingsId();\n\tlocalStorage.setItem(settingsId, JSON.stringify(settings));\n}\n\n/**\n * Retrieves saved settings from local storage.\n * @returns The saved settings.\n */\nasync function getSavedSettings(): Promise {\n\tconst settingsId = getSavedSettingsId();\n\tconst settings = localStorage.getItem(settingsId);\n\tif (settings !== null) {\n\t\treturn JSON.parse(settings);\n\t}\n}\n\n/**\n * Get the Id used for saving and fetching settings from storage.\n * @returns The settings id.\n */\nfunction getSavedSettingsId(): string {\n\tconst urlParams = new URLSearchParams(window.location.search);\n\tconst env = urlParams.get(\"env\");\n\n\tconst settingsKey = env ? `${env}-settings` : \"settings\";\n\treturn settingsKey;\n}\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","import { init as initBrokerConnection } from \"@openfin/core-web/iframe-broker\";\nimport { getSettings } from \"./settings/settings\";\n\n/**\n * Initializes the OpenFin Web Broker connection.\n * @returns A promise that resolves when the connection is established.\n */\nasync function init(): Promise {\n\tconst settings = await getSettings();\n\tif (settings === undefined) {\n\t\tconsole.error(\n\t\t\t\"Unable to run the sample as we have been unable to load the web manifest and it's settings from the currently running html page. Please ensure that the web manifest is being served and that it contains the custom_settings section.\"\n\t\t);\n\t\treturn;\n\t}\n\treturn initBrokerConnection({\n\t\tsharedWorkerUrl: settings.platform.interop.sharedWorkerUrl\n\t});\n}\n\ninit()\n\t.then(() => {\n\t\tconsole.log(\"Connected to the OpenFin IFrame Web Broker.\");\n\t\treturn true;\n\t})\n\t.catch((err) => console.error(err));\n"],"names":[],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"iframe-broker.bundle.js","mappings":";;;;;;;;;;AAAa,6IAA6I,EAAE,cAAc,8BAA8B,yBAAyB,wBAAwB,EAAE,8CAA8C,gCAAgC,IAAI,2BAA2B,SAAS,UAAU,+BAA+B,QAAQ,qBAAqB,uBAAuB,eAAe,wGAAwG,uGAAuG,wCAAwC,iBAAiB,aAAa,GAAG,GAAG,iBAAiB,+BAA+B,gBAAgB,iDAAiD,WAAW,gBAAgB,oGAAoG,oBAAoB,qDAAqD,WAAW,cAAc,wCAAwC,cAAc,2CAA2C,0BAA0B,qDAAqD,qCAAqC,IAAI,gDAAgD,kBAAkB,aAAa,iCAAiC,QAAQ,uBAAuB,wEAAwE,gCAAgC,OAAO,GAAG,OAAO,OAAO,6BAA6B,iCAAiC,QAAQ,kCAAkC,2BAA2B,GAAG,+BAA+B,wBAAwB,8EAA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AGG;AACH,SAAS,kBAAkB;IAC1B,MAAM,SAAS,GAAG,IAAI,eAAe,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;IAC9D,MAAM,GAAG,GAAG,SAAS,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IAEjC,MAAM,WAAW,GAAG,GAAG,CAAC,CAAC,CAAC,GAAG,GAAG,WAAW,CAAC,CAAC,CAAC,UAAU,CAAC;IACzD,OAAO,WAAW,CAAC;AACpB,CAAC;;;;;;;UCjHD;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;;;;;;;;ACtBA,gJAA+E;AAC/E,gHAAkD;AAElD;;;GAGG;AACH,KAAK,UAAU,IAAI;IAClB,MAAM,QAAQ,GAAG,MAAM,0BAAW,GAAE,CAAC;IACrC,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;QAC5B,OAAO,CAAC,KAAK,CACZ,wOAAwO,CACxO,CAAC;QACF,OAAO;IACR,CAAC;IACD,OAAO,wBAAoB,EAAC;QAC3B,eAAe,EAAE,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,eAAe;KAC1D,CAAC,CAAC;AACJ,CAAC;AAED,IAAI,EAAE;KACJ,IAAI,CAAC,GAAG,EAAE;IACV,OAAO,CAAC,GAAG,CAAC,6CAA6C,CAAC,CAAC;IAC3D,OAAO,IAAI,CAAC;AACb,CAAC,CAAC;KACD,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC","sources":["webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/@openfin/core-web/out/iframe-broker.js","webpack://openfin-web--web-interop-support-context-and-intents/./client/src/platform/settings/settings.ts","webpack://openfin-web--web-interop-support-context-and-intents/webpack/bootstrap","webpack://openfin-web--web-interop-support-context-and-intents/./client/src/platform/iframe-broker.ts"],"sourcesContent":["\"use strict\";const e=\"web-broker-ports-ready\",t=\"worker-initialize-connection\",i=\"create-fallback-connection\",r=\"request-fallback-connection\",n=e=>`ack-${e}`,o=(...e)=>({log:(...t)=>console.debug(`[${(new Date).toISOString()}]`,...(e=>e.map((e=>`[${e}]`)))(e),...t),getLogger:(...t)=>o(...e,...t)}),s=e=>window.top===e,a=(e,t)=>{try{return e.origin===t.origin}catch(e){return!1}},c=\"openfin/web-shared-worker\";class d{static get lockApi(){return navigator.locks}constructor(e){this.name=e,this.releaseCallback=null,d.pending.add(this),this.lockAcquiredPromise=new Promise(((e,t)=>{this.lockReleasedPromise=d.lockApi.request(this.name,(()=>(d.pending.delete(this),e(),new Promise((e=>{d.held.add(this),this.releaseCallback=e}))))).catch((e=>{throw t(e),e}))}))}async acquired(){await this.lockAcquiredPromise}async release(){if(!this.releaseCallback)throw new Error(`Lock ${this.name} not acquired.`);this.releaseCallback(),this.releaseCallback=null,await this.lockReleasedPromise,d.held.delete(this)}async onReleased(e){if(!this.lockReleasedPromise)throw new Error(`Lock ${this.name} not queued.`);return this.lockReleasedPromise.then(e)}autoRelease(){this.acquired().then((()=>this.release()))}static async releaseAll(){const e=Promise.all([...this.pending].map((async e=>{await e.acquired(),await e.release()})));await Promise.all([...this.held].map((async e=>{await e.release()}))),await e}}d.pending=new Set,d.held=new Set;class l{constructor(e=100,t=2){this.pingIntervalMs=e,this.allowedMissedPings=t,this.lockSelf=async e=>{const t=new d((e=>`__OPENFIN__${e.uuid}_${e.name}`)(e));return await t.acquired(),t}}async lockProxiedConnection(e,t){let i=0;t.addEventListener(\"message\",(e=>{\"pong\"===e.data.topic&&i--}));const r=await this.lockSelf(e);let n=setInterval((()=>{i>=this.allowedMissedPings?(r.release(),clearInterval(n)):(i++,t.postMessage({topic:\"ping\"}))}),this.pingIntervalMs);t.start()}registerProxiedConnection(e){e.addEventListener(\"message\",(t=>{\"ping\"===t.data.topic&&e.postMessage({topic:\"pong\"})})),e.start()}}class h{constructor(e,t,o){this.workerUrl=e,this.iframeWindow=t,this.forceWorker=o,this.identityDisconnectionController=new l,this.isSharedWorkerSupported=()=>!this.forceWorker&&!!window.SharedWorker,this.state=\"ready\",this.establishWorkerConnectionViaWindow=async(e,t)=>{if(a(this.iframeWindow,e)){const o=new MessageChannel,s=new MessageChannel;return this.identityDisconnectionController.registerProxiedConnection(s.port1),new Promise(((a,c)=>{o.port1.addEventListener(\"message\",(e=>{e.data.topic===n(i)&&(e.data.success?a(o.port1):c(e.data.reason))})),o.port1.start();const d={topic:r,payload:{identity:t}};e.postMessage(d,location.origin,[o.port2,s.port2])}))}throw new Error(\"Could not connect via top level browsing context as its origin does not much the web interop broker.\")},this.listenForNestedConnections=e=>{\"top-window\"===this.state&&a(this.iframeWindow,this.iframeWindow.parent)&&this.iframeWindow.parent.addEventListener(\"message\",(async t=>{const{data:n}=t;if(t.origin===location.origin&&n.topic===r){const[r,...o]=t.ports;if(o.length>0&&n.payload?.identity){const[e]=o;await this.identityDisconnectionController.lockProxiedConnection(n.payload.identity,e)}const s={topic:i};e.postMessage(s,[r])}}))},this.initialize=async e=>{if(\"ready\"!==this.state)throw new Error(\"Worker connection already initialized\");return(e=>{const t=i=>!(!(e=>{try{return!e.origin}catch(e){return!0}})(i)&&i.origin===e.origin)||!s(i)&&t(i.parent);return!s(e)&&t(e.parent)})(this.iframeWindow)&&a(this.iframeWindow,this.iframeWindow.top)?this.state=\"partitioned-frame\":s(this.iframeWindow.parent)?this.state=\"top-window\":this.state=\"frame\",this.connect(e)}}async connect(e){if(\"ready\"===this.state)throw new Error(\"Must call initialize before connect\");switch(this.state){case\"partitioned-frame\":return this.establishWorkerConnectionViaWindow(this.iframeWindow.top,e);case\"top-window\":{let t;return t=this.isSharedWorkerSupported()?new SharedWorker(this.workerUrl,c).port:new Worker(this.workerUrl),await this.identityDisconnectionController.lockSelf(e),this.listenForNestedConnections(t),t}case\"frame\":{if(!this.isSharedWorkerSupported())try{return await this.establishWorkerConnectionViaWindow(this.iframeWindow.top,e)}catch(e){throw new Error(`SharedWorker is not supported and an unexpected error occured when trying to connect via fallback mechanism: ${e.message}`,{cause:e})}await this.identityDisconnectionController.lockSelf(e);const{port:t}=new SharedWorker(this.workerUrl,c);return t}default:throw this.state,new Error(`Invalid state: ${this.state}`)}}}const w=o(\"@openfin/core-web/iframe-broker\"),p=()=>{const e=((e,t)=>{const i=new RegExp(`^${t}<(?.*)>$`).exec(e)?.groups?.meta;if(i)try{return JSON.parse(atob(i))}catch(e){throw new Error(`Failed to decode JSON from ${i}.`)}})(window.name,\"of-broker\");if(!e)throw new Error(\"Invalid or missing identity string in iframe context. Ensure that this iframe is being renderered via the @openfin/core-web library.\");return e};function g(t){const i={topic:n(e),success:!1,reason:t?.reason??\"Connection Rejected\"};window.parent.postMessage(i,\"*\")}exports.init=async i=>{try{const{sharedWorkerUrl:r}=i;await(\"loading\"===document.readyState?new Promise((e=>{const t=()=>{e(),window.removeEventListener(\"DOMContentLoaded\",t)};window.addEventListener(\"DOMContentLoaded\",t)})):Promise.resolve());const o=p(),s=new h(r,window,\"same-site\"!==i.experimental?.crossTab),a=await s.initialize(o);w.log(`Loading ${r} in ${s.state} mode...`);const c=await(async(i,r,o)=>{const s=new MessageChannel,a=new MessageChannel,c={topic:t,payload:{identity:o}};await new Promise(((e,i)=>{r.addEventListener(\"message\",(r=>{r.data.topic===n(t)&&(r.data.success?e():i(new Error(r.data.reason)))})),r.start?.(),r.postMessage(c,[a.port2])}));const d={topic:n(e),success:!0,payload:{identity:o}};return i.postMessage(d,\"*\",[s.port2,a.port1]),s.port1})(window.parent,a,o);c.start(),a.start?.(),w.log(`Port transfer complete in ${s.state} mode. Connection established with identity ${JSON.stringify(o)}. SharedWorker support=${s.isSharedWorkerSupported()}`)}catch(e){const t=new Error(`An unexpected error occured during initialization. ${e.message}`);g({reason:t.message}),console.error(t)}},exports.rejectConnections=g;\n","import type { OpenFin } from \"@openfin/core\";\nimport type { ManifestSettings, Settings } from \"../../shapes/setting-shapes\";\n\n/**\n * Fetches the settings for the application.\n * @returns The settings for the application.\n */\nexport async function getSettings(): Promise {\n\tconst savedSettings = await getSavedSettings();\n\tif (savedSettings) {\n\t\treturn savedSettings;\n\t}\n\tconst settings = await getManifestSettings();\n\tif (!Array.isArray(settings?.endpointProvider?.endpoints)) {\n\t\tconsole.error(\n\t\t\t\"Unable to run the example as settings are required and we fetch them from the link web manifest from the html page that is being served. It should exist in the customSettings section of the web manifest.\"\n\t\t);\n\t\treturn;\n\t}\n\tconst settingsEndpoint = settings.endpointProvider.endpoints.find(\n\t\t(endpoint) => endpoint.id === \"platform-settings\"\n\t);\n\n\tif (\n\t\tsettingsEndpoint === undefined ||\n\t\tsettingsEndpoint.type !== \"fetch\" ||\n\t\tsettingsEndpoint.options.method !== \"GET\" ||\n\t\tsettingsEndpoint.options.url === undefined\n\t) {\n\t\tconsole.error(\n\t\t\t\"Unable to run the example as settings are required and we fetch them from the endpoint defined with the id: 'platform-settings' in the manifest. It needs to be of type fetch, performing a GET and it must have a url defined.\"\n\t\t);\n\t\treturn;\n\t}\n\tconst platformSettings = await fetch(settingsEndpoint?.options.url);\n\tconst settingsJson = (await platformSettings.json()) as Settings;\n\treturn settingsJson;\n}\n\n/**\n * Returns a default layout from the settings if provided.\n * @returns The default layout from the settings.\n */\nexport async function getDefaultLayout(): Promise {\n\tconst settings = await getSettings();\n\tif (settings?.platform?.layout?.defaultLayout === undefined) {\n\t\tconsole.error(\n\t\t\t\"Unable to run the example as without a layout being defined. Please ensure that settings have been provided in the web manifest.\"\n\t\t);\n\t\treturn;\n\t}\n\tif (typeof settings.platform.layout.defaultLayout === \"string\") {\n\t\tconst layoutResponse = await fetch(settings.platform.layout.defaultLayout);\n\t\tconst layoutJson = (await layoutResponse.json()) as OpenFin.LayoutSnapshot;\n\t\treturn layoutJson;\n\t}\n\treturn settings.platform.layout.defaultLayout;\n}\n\n/**\n * Returns the settings from the manifest file.\n * @returns customSettings for this example\n */\nasync function getManifestSettings(): Promise {\n\t// Get the manifest link\n\tconst link = document.querySelector('link[rel=\"manifest\"]');\n\tif (link !== null) {\n\t\tconst manifestResponse = await fetch(link.href);\n\t\tconst manifestJson = (await manifestResponse.json()) as { custom_settings: ManifestSettings };\n\t\treturn manifestJson.custom_settings;\n\t}\n}\n\n/**\n * Clears any saved settings.\n * @returns The saved settings.\n */\nexport async function clearSettings(): Promise {\n\tconst settingsId = getSavedSettingsId();\n\tlocalStorage.removeItem(settingsId);\n}\n\n/**\n * Saves the settings.\n * @param settings The settings to save.\n */\nexport async function saveSettings(settings: Settings): Promise {\n\tconst settingsId = getSavedSettingsId();\n\tlocalStorage.setItem(settingsId, JSON.stringify(settings));\n}\n\n/**\n * Retrieves saved settings from local storage.\n * @returns The saved settings.\n */\nasync function getSavedSettings(): Promise {\n\tconst settingsId = getSavedSettingsId();\n\tconst settings = localStorage.getItem(settingsId);\n\tif (settings !== null) {\n\t\treturn JSON.parse(settings);\n\t}\n}\n\n/**\n * Get the Id used for saving and fetching settings from storage.\n * @returns The settings id.\n */\nfunction getSavedSettingsId(): string {\n\tconst urlParams = new URLSearchParams(window.location.search);\n\tconst env = urlParams.get(\"env\");\n\n\tconst settingsKey = env ? `${env}-settings` : \"settings\";\n\treturn settingsKey;\n}\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","import { init as initBrokerConnection } from \"@openfin/core-web/iframe-broker\";\nimport { getSettings } from \"./settings/settings\";\n\n/**\n * Initializes the OpenFin Web Broker connection.\n * @returns A promise that resolves when the connection is established.\n */\nasync function init(): Promise {\n\tconst settings = await getSettings();\n\tif (settings === undefined) {\n\t\tconsole.error(\n\t\t\t\"Unable to run the sample as we have been unable to load the web manifest and it's settings from the currently running html page. Please ensure that the web manifest is being served and that it contains the custom_settings section.\"\n\t\t);\n\t\treturn;\n\t}\n\treturn initBrokerConnection({\n\t\tsharedWorkerUrl: settings.platform.interop.sharedWorkerUrl\n\t});\n}\n\ninit()\n\t.then(() => {\n\t\tconsole.log(\"Connected to the OpenFin IFrame Web Broker.\");\n\t\treturn true;\n\t})\n\t.catch((err) => console.error(err));\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/web/v19.2.0/web-interop-support-context-and-intents/js/interop-intent-view.bundle.js b/web/v19.2.0/web-interop-support-context-and-intents/js/interop-intent-view.bundle.js index 415cce7..a1d5d93 100644 --- a/web/v19.2.0/web-interop-support-context-and-intents/js/interop-intent-view.bundle.js +++ b/web/v19.2.0/web-interop-support-context-and-intents/js/interop-intent-view.bundle.js @@ -1,38 +1,38 @@ /******/ (() => { // webpackBootstrap /******/ var __webpack_modules__ = ({ -/***/ "./node_modules/@openfin/core-web/out/api-client.js": -/*!**********************************************************!*\ - !*** ./node_modules/@openfin/core-web/out/api-client.js ***! - \**********************************************************/ +/***/ "../../node_modules/@openfin/core-web/out/api-client.js": +/*!**************************************************************!*\ + !*** ../../node_modules/@openfin/core-web/out/api-client.js ***! + \**************************************************************/ /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; -var e=__webpack_require__(/*! ./main-8cad4070.js */ "./node_modules/@openfin/core-web/out/main-8cad4070.js");__webpack_require__(/*! buffer/ */ "../../node_modules/buffer/index.js"),__webpack_require__(/*! uuid */ "../../node_modules/uuid/dist/esm-browser/index.js"),__webpack_require__(/*! events */ "../../node_modules/events/events.js"),__webpack_require__(/*! lodash/cloneDeep */ "../../node_modules/lodash/cloneDeep.js"),__webpack_require__(/*! lodash/isEqual */ "../../node_modules/lodash/isEqual.js"),exports.connect=e.connect; +var e=__webpack_require__(/*! ./main-8cad4070.js */ "../../node_modules/@openfin/core-web/out/main-8cad4070.js");__webpack_require__(/*! buffer/ */ "../../node_modules/buffer/index.js"),__webpack_require__(/*! uuid */ "../../node_modules/uuid/dist/esm-browser/index.js"),__webpack_require__(/*! events */ "../../node_modules/events/events.js"),__webpack_require__(/*! lodash/cloneDeep */ "../../node_modules/lodash/cloneDeep.js"),__webpack_require__(/*! lodash/isEqual */ "../../node_modules/lodash/isEqual.js"),exports.connect=e.connect; /***/ }), -/***/ "./node_modules/@openfin/core-web/out/main-8cad4070.js": -/*!*************************************************************!*\ - !*** ./node_modules/@openfin/core-web/out/main-8cad4070.js ***! - \*************************************************************/ +/***/ "../../node_modules/@openfin/core-web/out/main-8cad4070.js": +/*!*****************************************************************!*\ + !*** ../../node_modules/@openfin/core-web/out/main-8cad4070.js ***! + \*****************************************************************/ /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; -var e=__webpack_require__(/*! buffer/ */ "../../node_modules/buffer/index.js"),t=__webpack_require__(/*! events */ "../../node_modules/events/events.js"),n=__webpack_require__(/*! lodash/cloneDeep */ "../../node_modules/lodash/cloneDeep.js"),i=__webpack_require__(/*! lodash/isEqual */ "../../node_modules/lodash/isEqual.js"),r=__webpack_require__(/*! uuid */ "../../node_modules/uuid/dist/esm-browser/index.js");const o=(e,t)=>`${t}<${btoa(JSON.stringify(e))}>`;var s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof __webpack_require__.g?__webpack_require__.g:"undefined"!=typeof self?self:{},a={},c={},d={},h={};async function l(e){const t=[];for(const n of e){const e=await n();t.push(e)}return t}Object.defineProperty(h,"__esModule",{value:!0}),h.promiseMapSerial=h.serial=h.promiseMap=h.promisify=void 0,h.promisify=function(e){return(...t)=>new Promise(((n,i)=>{e(...t,((e,t)=>e?i(e):n(t)))}))},h.promiseMap=async function(e,t){return Promise.all(e.map(t))},h.serial=l,h.promiseMapSerial=async function(e,t){return l(e.map(((e,n,i)=>()=>t(e,n,i))))};var u,p=s&&s.__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},w=s&&s.__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)};Object.defineProperty(d,"__esModule",{value:!0}),d.Reply=d.EmitterBase=d.Base=void 0;const y=h;class f{constructor(e){this.isNodeEnvironment=()=>"node"===this.wire.environment.type,this.isOpenFinEnvironment=()=>"openfin"===this.wire.environment.type,this.isBrowserEnvironment=()=>"other"===this.wire.environment.type,this.wire=e}get fin(){return this.wire.getFin()}get me(){return this.wire.me}}d.Base=f;d.EmitterBase=class extends f{constructor(e,t,...n){super(e),this.topic=t,u.set(this,void 0),this.eventNames=()=>this.hasEmitter()?this.getOrCreateEmitter().eventNames():[],this.emit=(e,t,...n)=>!!this.hasEmitter()&&this.getOrCreateEmitter().emit(e,t,...n),this.hasEmitter=()=>this.wire.eventAggregator.has(w(this,u,"f")),this.getOrCreateEmitter=()=>this.wire.eventAggregator.getOrCreate(w(this,u,"f")),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[],this.listenerCount=e=>this.hasEmitter()?this.getOrCreateEmitter().listenerCount(e):0,this.registerEventListener=async(e,t={},n,i)=>{const r={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e},o=this.getOrCreateEmitter();n(o);try{await this.wire.sendAction("subscribe-to-desktop-event",r)}catch(e){throw i(o),this.deleteEmitterIfNothingRegistered(o),e}},this.deregisterEventListener=async(e,t={})=>{if(this.hasEmitter()){const n={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e};await this.wire.sendAction("unsubscribe-to-desktop-event",n).catch((()=>null));return this.getOrCreateEmitter()}return Promise.resolve()},p(this,u,[t,...n],"f"),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[]}async on(e,t,n){return await this.registerEventListener(e,n,(n=>{n.on(e,t)}),(n=>{n.removeListener(e,t)})),this}async addListener(e,t,n){return this.on(e,t,n)}async once(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.once(e,i),n.once(e,t)}),(n=>{n.removeListener(e,i),n.removeListener(e,t)})),this}async prependListener(e,t,n){return await this.registerEventListener(e,n,(n=>{n.prependListener(e,t)}),(n=>{n.removeListener(e,t)})),this}async prependOnceListener(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.prependOnceListener(e,t),n.once(e,i)}),(n=>{n.removeListener(e,t),n.removeListener(e,i)})),this}async removeListener(e,t,n){const i=await this.deregisterEventListener(e,n);return i&&(i.removeListener(e,t),this.deleteEmitterIfNothingRegistered(i)),this}async deregisterAllListeners(e){const t={...this.identity,type:e,topic:this.topic};if(this.hasEmitter()){const e=this.getOrCreateEmitter(),n=e.listenerCount(t.type),i=[];for(let e=0;enull)));return await Promise.all(i),e}}async removeAllListeners(e){const t=async e=>{const t=await this.deregisterAllListeners(e);t&&(t.removeAllListeners(e),this.deleteEmitterIfNothingRegistered(t))};if(e)await t(e);else if(this.hasEmitter()){const e=this.getOrCreateEmitter().eventNames();await(0,y.promiseMap)(e,t)}return this}deleteEmitterIfNothingRegistered(e){0===e.eventNames().length&&this.wire.eventAggregator.delete(w(this,u,"f"))}},u=new WeakMap;d.Reply=class{};var g={};Object.defineProperty(g,"__esModule",{value:!0});var m=g.RuntimeError=g.NotSupportedError=g.NotImplementedError=g.NoAckError=g.DuplicateCorrelationError=g.UnexpectedActionError=g.DisconnectedError=void 0;class v extends Error{constructor(e){super(`Expected websocket state OPEN but found ${e}`),this.readyState=e}}g.DisconnectedError=v;class C extends Error{}g.UnexpectedActionError=C;class b extends Error{}g.DuplicateCorrelationError=b;class I extends Error{}g.NoAckError=I;class E extends Error{}g.NotImplementedError=E;class x extends Error{}g.NotSupportedError=x;class A extends Error{constructor(e){const{message:t,name:n,stack:i,...r}=e;super(t),this.name=n||"Error",this.stack=i??this.toString(),Object.keys(r).forEach((e=>{this[e]=r[e]}))}}class P extends Error{static getCallSite(e=0){const t=Error.stackTraceLimit,n=e+1;Error.stackTraceLimit=t+n;const i=Error.prepareStackTrace;Error.prepareStackTrace=(e,t)=>t;const r=(new Error).stack?.slice(n)??[];return Error.prepareStackTrace=i,Error.stackTraceLimit=t,r}static prepareStackTrace(e,t){if("function"==typeof Error.prepareStackTrace)return Error.prepareStackTrace(e,t);let n="";n+=e.name||"Error",n+=`: ${e.message||""}`;for(const e of t)n+=`\n at ${e.toString()}`;return n}constructor(e,t){const{reason:n,error:i}=e;super(n),this.name="RuntimeError",i?.stack&&(this.cause=new A(i)),t&&(this.stack=P.prepareStackTrace(this,t))}}m=g.RuntimeError=P;var M={},_={},O={};Object.defineProperty(O,"__esModule",{value:!0}),O.validateIdentity=void 0,O.validateIdentity=function(e){let t;return"object"==typeof e&&"string"==typeof e.uuid||(t="Not a valid identity object"),t};var S={},R={},F={},j={},k={},L={},T={};Object.defineProperty(T,"__esModule",{value:!0}),T.handleDeprecatedWarnings=void 0;var $;T.handleDeprecatedWarnings=e=>{(e.contentNavigation?.whitelist||e.contentNavigation?.blacklist||e.contentRedirect?.whitelist||e.contentRedirect?.blacklist)&&console.warn("The properties 'whitelist' and 'blacklist' have been marked as deprecated and will be removed in a future version. Please use 'allowlist' and 'denylist'.")};var B={},G={};Object.defineProperty(G,"__esModule",{value:!0}),G.AsyncRetryableLazy=W=G.Lazy=void 0;var W=G.Lazy=class{constructor(e){this.producerFn=e}getValue(){return this.value||(this.value=this.producerFn()),this.value}};G.AsyncRetryableLazy=class{constructor(e){this.producerFn=e}async getValue(){return this.promise||(this.promise=this.producerFn().catch((e=>{throw delete this.promise,e}))),this.promise}};var H={};Object.defineProperty(H,"__esModule",{value:!0}),H.WebContents=void 0;const N=d;class D extends N.EmitterBase{constructor(e,t,n){super(e,n,t.uuid,t.name),this.identity=t,this.entityType=n}capturePage(e){return this.wire.sendAction("capture-page",{options:e,...this.identity}).then((({payload:e})=>e.data))}executeJavaScript(e){return this.wire.sendAction("execute-javascript-in-window",{...this.identity,code:e}).then((({payload:e})=>e.data))}getZoomLevel(){return this.wire.sendAction("get-zoom-level",this.identity).then((({payload:e})=>e.data))}setZoomLevel(e){return this.wire.sendAction("set-zoom-level",{...this.identity,level:e}).then((()=>{}))}navigate(e){return this.wire.sendAction("navigate-window",{...this.identity,url:e}).then((()=>{}))}navigateBack(){return this.wire.sendAction("navigate-window-back",{...this.identity}).then((()=>{}))}async navigateForward(){await this.wire.sendAction("navigate-window-forward",{...this.identity})}stopNavigation(){return this.wire.sendAction("stop-window-navigation",{...this.identity}).then((()=>{}))}reload(e=!1){return this.wire.sendAction("reload-window",{ignoreCache:e,...this.identity}).then((()=>{}))}print(e={}){return this.wire.sendAction("print",{...this.identity,options:e}).then((()=>{}))}findInPage(e,t){return this.wire.sendAction("find-in-page",{...this.identity,searchTerm:e,options:t}).then((({payload:e})=>e.data))}stopFindInPage(e){return this.wire.sendAction("stop-find-in-page",{...this.identity,action:e}).then((()=>{}))}getPrinters(){return this.wire.sendAction("get-printers",{...this.identity}).then((({payload:e})=>e.data))}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){await this.wire.sendAction("focus-window",{emitSynthFocused:e,...this.identity})}async showDeveloperTools(){await this.wire.sendAction("show-developer-tools",this.identity)}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction("get-process-info",this.identity);return e}async getSharedWorkers(){return this.wire.sendAction("get-shared-workers",this.identity).then((({payload:e})=>e.data))}async inspectSharedWorker(){await this.wire.sendAction("inspect-shared-worker",{...this.identity})}async inspectSharedWorkerById(e){await this.wire.sendAction("inspect-shared-worker-by-id",{...this.identity,workerId:e})}async inspectServiceWorker(){await this.wire.sendAction("inspect-service-worker",{...this.identity})}async showPopupWindow(e){if(this.wire.sendAction(`${this.entityType}-show-popup-window`,this.identity).catch((()=>{})),e?.onPopupReady){const t=async({popupName:t})=>{try{const n=this.fin.Window.wrapSync({uuid:this.fin.me.uuid,name:t});await e.onPopupReady(n)}catch(e){throw new Error(`Something went wrong during onPopupReady execution: ${e}`)}};await this.once("popup-ready",t)}const{payload:t}=await this.wire.sendAction("try-create-popup-window",{options:{...e,hasResultCallback:!!e?.onPopupResult,hasReadyCallback:!!e?.onPopupReady},...this.identity}),{data:{willOpen:n,options:i}}=t;n&&await this.fin.Window.create(i.initialOptions);if(e?.onPopupResult){const t=async t=>{await e.onPopupResult((e=>{const{name:t,uuid:n,result:i,data:r}=e,o={identity:{name:t,uuid:n},result:i};return r&&(o.data=r),o})(t))},n=async()=>{await this.removeListener("popup-result",t)};await this.on("popup-result",t),await this.once("popup-teardown",n)}const{payload:r}=await this.wire.sendAction("show-popup-window",{options:i,...this.identity});return r.data}}var U,V,z,K,q;function J(){return V||(V=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(function(){if($)return L;$=1,Object.defineProperty(L,"__esModule",{value:!0}),L.ViewModule=void 0;const e=d,t=O,n=J(),i=T;class r extends e.Base{async create(e){const{uuid:t}=this.wire.me;if(!e.name||"string"!=typeof e.name)throw new Error("Please provide a name property as a string in order to create a View.");return(0,i.handleDeprecatedWarnings)(e),this.wire.environment.childViews?await this.wire.environment.createChildContent({entityType:"view",options:{...e,uuid:t}}):await this.wire.sendAction("create-view",{...e,uuid:t}),this.wrapSync({uuid:t,name:e.name})}async wrap(e){this.wire.sendAction("view-wrap").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}wrapSync(e){this.wire.sendAction("view-wrap-sync").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}getCurrent(){if(this.wire.sendAction("view-get-current").catch((e=>{})),!this.wire.me.isView)throw new Error("You are not in a View context");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction("view-get-current-sync").catch((e=>{})),!this.wire.me.isView)throw new Error("You are not in a View context");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return L.ViewModule=r,L}(),e),n(function(){if(U)return B;var e;U=1,Object.defineProperty(B,"__esModule",{value:!0}),B.View=void 0;const t=g,n=G,i=H,r=ie();class o extends i.WebContents{constructor(i,o){super(i,o,"view"),this.identity=o,e.set(this,new n.Lazy((()=>this.fin.Platform.wrapSync(this.identity).getClient()))),this.attach=async e=>{await this.wire.sendAction("attach-view",{target:e,...this.identity})},this.destroy=async()=>{await this.wire.sendAction("destroy-view",{...this.identity})},this.show=async()=>{await this.wire.sendAction("show-view",{...this.identity})},this.showAt=async(e,t={})=>{await this.wire.sendAction("show-view-at",{bounds:e,...this.identity,options:t})},this.bringToFront=async()=>{await this.wire.sendAction("bring-view-to-front",{...this.identity})},this.hide=async()=>{await this.wire.sendAction("hide-view",{...this.identity})},this.setBounds=async e=>{await this.wire.sendAction("set-view-bounds",{bounds:e,...this.identity})},this.getBounds=async()=>(await this.wire.sendAction("get-view-bounds",{...this.identity})).payload.data,this.getInfo=async()=>(await this.wire.sendAction("get-view-info",{...this.identity})).payload.data,this.getParentLayout=async()=>(this.wire.sendAction("view-get-parent-layout",{...this.identity}).catch((()=>{})),this.fin.Platform.Layout.getLayoutByViewIdentity(this.identity)),this.getOptions=async()=>this.wire.sendAction("get-view-options",{...this.identity}).then((({payload:e})=>e.data)),this.updateOptions=async e=>this.wire.sendAction("update-view-options",{options:e,...this.identity}).then((()=>{})),this.getCurrentWindow=async()=>{const{payload:{data:e}}=await this.wire.sendAction("get-view-window",{...this.identity});return new r._Window(this.wire,e)},this.getCurrentStack=async()=>{this.wire.sendAction("view-get-current-stack").catch((()=>{}));try{return(await this.getParentLayout()).getStackByViewIdentity(this.identity)}catch(e){throw new t.RuntimeError({reason:"This view does not belong to a stack.",error:e})}},this.triggerBeforeUnload=async()=>(await this.wire.sendAction("trigger-before-unload",{...this.identity})).payload.data,this.bindToElement=async e=>{if(!e)throw new Error("Element not found.");return this.wire.environment.observeBounds(e,(async e=>this.setBounds(e)))}}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){const t=await this.getCurrentWindow();await t.focusedWebViewWasChanged(),await super.focus({emitSynthFocused:e})}}return B.View=o,e=new WeakMap,B}(),e)}(k)),k}function Y(){if(z)return j;z=1,Object.defineProperty(j,"__esModule",{value:!0}),j.Application=void 0;const e=d,t=ie(),n=J();class i extends e.EmitterBase{constructor(e,n){super(e,"application",n.uuid),this.identity=n,this.window=new t._Window(this.wire,{uuid:this.identity.uuid,name:this.identity.uuid})}windowListFromIdentityList(e){const n=[];return e.forEach((e=>{n.push(new t._Window(this.wire,{uuid:e.uuid,name:e.name}))})),n}isRunning(){return this.wire.sendAction("is-application-running",this.identity).then((({payload:e})=>e.data))}async quit(e=!1){try{await this._close(e),await this.wire.sendAction("destroy-application",{force:e,...this.identity})}catch(e){if(!["Remote connection has closed","Could not locate the requested application"].some((t=>e.message.includes(t))))throw e}}async _close(e=!1){try{await this.wire.sendAction("close-application",{force:e,...this.identity})}catch(e){if(!e.message.includes("Remote connection has closed"))throw e}}close(e=!1){return console.warn("Deprecation Warning: Application.close is deprecated Please use Application.quit"),this.wire.sendAction("application-close",this.identity).catch((e=>{})),this._close(e)}getChildWindows(){return this.wire.sendAction("get-child-windows",this.identity).then((({payload:e})=>{const t=[];return e.data.forEach((e=>{t.push({uuid:this.identity.uuid,name:e})})),this.windowListFromIdentityList(t)}))}getManifest(){return this.wire.sendAction("get-application-manifest",this.identity).then((({payload:e})=>e.data))}getParentUuid(){return this.wire.sendAction("get-parent-application",this.identity).then((({payload:e})=>e.data))}getShortcuts(){return this.wire.sendAction("get-shortcuts",this.identity).then((({payload:e})=>e.data))}async getViews(){const{payload:e}=await this.wire.sendAction("application-get-views",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}getZoomLevel(){return this.wire.sendAction("get-application-zoom-level",this.identity).then((({payload:e})=>e.data))}getWindow(){return this.wire.sendAction("application-get-window",this.identity).catch((e=>{})),Promise.resolve(this.window)}registerUser(e,t){return this.wire.sendAction("register-user",{userName:e,appName:t,...this.identity}).then((()=>{}))}removeTrayIcon(){return this.wire.sendAction("remove-tray-icon",this.identity).then((()=>{}))}restart(){return this.wire.sendAction("restart-application",this.identity).then((()=>{}))}run(){return console.warn("Deprecation Warning: Application.run is deprecated Please use fin.Application.start"),this.wire.sendAction("application-run",this.identity).catch((e=>{})),this._run()}_run(e={}){return this.wire.sendAction("run-application",{manifestUrl:this._manifestUrl,opts:e,...this.identity}).then((()=>{}))}scheduleRestart(){return this.wire.sendAction("relaunch-on-close",this.identity).then((()=>{}))}async sendApplicationLog(){const{payload:e}=await this.wire.sendAction("send-application-log",this.identity);return e.data}async setJumpList(e){await this.wire.sendAction("set-jump-list",{config:e,...this.identity})}setTrayIcon(e){return this.wire.sendAction("set-tray-icon",{enabledIcon:e,...this.identity}).then((()=>{}))}setShortcuts(e){return this.wire.sendAction("set-shortcuts",{data:e,...this.identity}).then((()=>{}))}async setShortcutQueryParams(e){await this.wire.sendAction("set-shortcut-query-args",{data:e,...this.identity})}setZoomLevel(e){return this.wire.sendAction("set-application-zoom-level",{level:e,...this.identity}).then((()=>{}))}async setAppLogUsername(e){await this.wire.sendAction("set-app-log-username",{data:e,...this.identity})}getTrayIconInfo(){return this.wire.sendAction("get-tray-icon-info",this.identity).then((({payload:e})=>e.data))}hasTrayIcon(){return this.wire.sendAction("has-tray-icon",this.identity).then((({payload:e})=>e.data))}terminate(){return this.wire.sendAction("terminate-application",this.identity).then((()=>{}))}wait(){return this.wire.sendAction("wait-for-hung-application",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction("get-info",this.identity).then((({payload:e})=>e.data))}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction("application-get-process-info",this.identity);return e}async setFileDownloadLocation(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t};await this.wire.sendAction("set-file-download-location",{...n,downloadLocation:e})}async getFileDownloadLocation(){const{payload:{data:e}}=await this.wire.sendAction("get-file-download-location",this.identity);return e}async showTrayIconPopupMenu(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t},{payload:i}=await this.wire.sendAction("show-tray-icon-popup-menu",{...n,options:e});return i.data}async closeTrayIconPopupMenu(){const{name:e}=this.wire.me,t={uuid:this.identity.uuid,name:e};await this.wire.sendAction("close-tray-icon-popup-menu",{...t})}}return j.Application=i,j}function Z(){return q||(q=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(function(){if(K)return F;K=1,Object.defineProperty(F,"__esModule",{value:!0}),F.ApplicationModule=void 0;const e=d,t=O,n=Y();class i extends e.Base{async wrap(e){this.wire.sendAction("wrap-application").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}wrapSync(e){this.wire.sendAction("wrap-application-sync").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}async _create(e){return void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&void 0===e.isPlatformController&&(e.autoShow=!0),await this.wire.sendAction("create-application",e),this.wrap({uuid:e.uuid})}create(e){return console.warn("Deprecation Warning: fin.Application.create is deprecated. Please use fin.Application.start"),this.wire.sendAction("application-create").catch((e=>{})),this._create(e)}async start(e){this.wire.sendAction("start-application").catch((e=>{}));const t=await this._create(e);return await this.wire.sendAction("run-application",{uuid:e.uuid}),t}async startManyManifests(e,t){return this.wire.sendAction("run-applications",{applications:e,opts:t}).then((()=>{}))}getCurrent(){return this.wire.sendAction("get-current-application").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction("get-current-application-sync").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}async startFromManifest(e,t){this.wire.sendAction("application-start-from-manifest").catch((e=>{}));const n=await this._createFromManifest(e);return await n._run(t),n}createFromManifest(e){return console.warn("Deprecation Warning: fin.Application.createFromManifest is deprecated. Please use fin.Application.startFromManifest"),this.wire.sendAction("application-create-from-manifest").catch((e=>{})),this._createFromManifest(e)}_createFromManifest(e){return this.wire.sendAction("get-application-manifest",{manifestUrl:e}).then((({payload:e})=>{const t=e.data.platform?e.data.platform.uuid:e.data.startup_app.uuid;return this.wrap({uuid:t})})).then((t=>(t._manifestUrl=e,t)))}}return F.ApplicationModule=i,F}(),e),n(Y(),e)}(R)),R}H.WebContents=D;var Q={};Object.defineProperty(Q,"__esModule",{value:!0}),Q.promisifySubscription=void 0;var X,ee,te;function ne(){if(X)return S;X=1,Object.defineProperty(S,"__esModule",{value:!0}),S._Window=void 0;const e=Z(),t=H,n=J(),i=T,r=Q;class o extends t.WebContents{constructor(e,t){super(e,t,"window")}async createWindow(e){this.wire.sendAction("window-create-window",this.identity).catch((e=>{}));const t=await(0,r.promisifySubscription)(this,"fire-constructor-callback");void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&(e.autoShow=!0),(0,i.handleDeprecatedWarnings)(e);const n=this.wire.environment.createChildContent({entityType:"window",options:e}),[o]=await Promise.all([t.getValue(),n]);let s;const{success:a}=o,c=o.data,{message:d}=c;s=a?{httpResponseCode:c.httpResponseCode,apiInjected:c.apiInjected}:{message:c.message,networkErrorCode:c.networkErrorCode,stack:c.stack};const h={message:d,cbPayload:s,success:a};try{this.getWebWindow().fin.__internal_.openerSuccessCBCalled()}catch(e){}return h.success?this:Promise.reject(h)}getAllFrames(){return this.wire.sendAction("get-all-frames",this.identity).then((({payload:e})=>e.data))}getBounds(){return this.wire.sendAction("get-window-bounds",this.identity).then((({payload:e})=>e.data))}center(){return this.wire.sendAction("center-window",this.identity).then((()=>{}))}blur(){return this.wire.sendAction("blur-window",this.identity).then((()=>{}))}bringToFront(){return this.wire.sendAction("bring-window-to-front",this.identity).then((()=>{}))}animate(e,t){return this.wire.sendAction("animate-window",{transitions:e,options:t,...this.identity}).then((()=>{}))}hide(){return this.wire.sendAction("hide-window",this.identity).then((()=>{}))}close(e=!1){return this.wire.sendAction("close-window",{force:e,...this.identity}).then((()=>{Object.setPrototypeOf(this,null)}))}focusedWebViewWasChanged(){return this.wire.sendAction("focused-webview-changed",this.identity).then((()=>{}))}getNativeId(){return this.wire.sendAction("get-window-native-id",this.identity).then((({payload:e})=>e.data))}async getCurrentViews(){const{payload:e}=await this.wire.sendAction("window-get-views",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}disableFrame(){return console.warn("Function is deprecated; use disableUserMovement instead."),this.wire.sendAction("disable-window-frame",this.identity).then((()=>{}))}disableUserMovement(){return this.wire.sendAction("disable-window-frame",this.identity).then((()=>{}))}enableFrame(){return console.warn("Function is deprecated; use enableUserMovement instead."),this.wire.sendAction("enable-window-frame",this.identity).then((()=>{}))}enableUserMovement(){return this.wire.sendAction("enable-window-frame",this.identity).then((()=>{}))}flash(){return this.wire.sendAction("flash-window",this.identity).then((()=>{}))}stopFlashing(){return this.wire.sendAction("stop-flash-window",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction("get-window-info",this.identity).then((({payload:e})=>e.data))}async getLayout(e){this.wire.sendAction("window-get-layout",this.identity).catch((e=>{}));const t=await this.getOptions();if(!t.layout&&!t.layoutSnapshot)throw new Error("Window does not have a Layout");return this.fin.Platform.Layout.wrap(e??this.identity)}getOptions(){return this.wire.sendAction("get-window-options",this.identity).then((({payload:e})=>e.data))}getParentApplication(){return this.wire.sendAction("window-get-parent-application",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity))}getParentWindow(){return this.wire.sendAction("window-get-parent-window",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity)).then((e=>e.getWindow()))}async getSnapshot(e){const t={area:e,...this.identity};console.warn("Window.getSnapshot has been deprecated, please use Window.capturePage");return(await this.wire.sendAction("get-window-snapshot",t)).payload.data}getState(){return this.wire.sendAction("get-window-state",this.identity).then((({payload:e})=>e.data))}getWebWindow(){return this.wire.sendAction("window-get-web-window",this.identity).catch((e=>{})),this.wire.environment.getWebWindow(this.identity)}isMainWindow(){return this.wire.sendAction("window-is-main-window",this.identity).catch((e=>{})),this.me.uuid===this.me.name}isShowing(){return this.wire.sendAction("is-window-showing",this.identity).then((({payload:e})=>e.data))}maximize(){return this.wire.sendAction("maximize-window",this.identity).then((()=>{}))}minimize(){return this.wire.sendAction("minimize-window",this.identity).then((()=>{}))}moveBy(e,t,n){return this.wire.sendAction("move-window-by",{deltaLeft:e,deltaTop:t,positioningOptions:n,...this.identity}).then((()=>{}))}moveTo(e,t,n){return this.wire.sendAction("move-window",{left:e,top:t,positioningOptions:n,...this.identity}).then((()=>{}))}resizeBy(e,t,n,i){return this.wire.sendAction("resize-window-by",{deltaWidth:Math.floor(e),deltaHeight:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}resizeTo(e,t,n,i){return this.wire.sendAction("resize-window",{width:Math.floor(e),height:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}restore(){return this.wire.sendAction("restore-window",this.identity).then((()=>{}))}setAsForeground(){return this.wire.sendAction("set-foreground-window",this.identity).then((()=>{}))}setBounds(e,t){return this.wire.sendAction("set-window-bounds",{...e,...this.identity,positioningOptions:t}).then((()=>{}))}show(e=!1){return this.wire.sendAction("show-window",{force:e,...this.identity}).then((()=>{}))}showAt(e,t,n=!1){return this.wire.sendAction("show-at-window",{force:n,left:Math.floor(e),top:Math.floor(t),...this.identity}).then((()=>{}))}updateOptions(e){return this.wire.sendAction("update-window-options",{options:e,...this.identity}).then((()=>{}))}authenticate(e,t){return this.wire.sendAction("window-authenticate",{userName:e,password:t,...this.identity}).then((()=>{}))}async showPopupMenu(e){const{payload:t}=await this.wire.sendAction("show-popup-menu",{options:e,...this.identity});return t.data}async closePopupMenu(){return this.wire.sendAction("close-popup-menu",{...this.identity}).then((()=>{}))}async dispatchPopupResult(e){this.wire.sendAction("window-dispatch-popup-result",this.identity).catch((e=>{})),await this.wire.sendAction("dispatch-popup-result",{data:e,...this.identity})}async print(e={content:"self"}){switch(e.content){case void 0:case"self":return super.print(e);case"screenshot":return this.wire.sendAction("print-screenshot",this.identity).then((()=>{}));case"views":return this.wire.sendAction("print-views",{...this.identity,options:e}).then((()=>{}));default:return}}}return S._Window=o,S}function ie(){return te||(te=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(function(){if(ee)return _;ee=1,Object.defineProperty(_,"__esModule",{value:!0}),_._WindowModule=void 0;const e=d,t=O,n=ne();class i extends e.Base{async wrap(e){this.wire.sendAction("window-wrap").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}wrapSync(e){this.wire.sendAction("window-wrap-sync").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}create(e){return this.wire.sendAction("create-window").catch((e=>{})),new n._Window(this.wire,{uuid:this.me.uuid,name:e.name}).createWindow(e)}getCurrent(){if(this.wire.sendAction("get-current-window").catch((e=>{})),!this.wire.me.isWindow)throw new Error("You are not in a Window context");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction("get-current-window-sync").catch((e=>{})),!this.wire.me.isWindow)throw new Error("You are not in a Window context");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return _._WindowModule=i,_}(),e),n(ne(),e)}(M)),M}Q.promisifySubscription=async(e,t,n=(()=>!0),i)=>{let r,o,s;const a=new Promise(((e,t)=>{r=e,o=t})),c=e=>{n(e)&&(clearTimeout(s),r(e))};return await e.on(t,c),i&&(s=setTimeout((()=>o(new Error("event timed out"))),i)),a.finally((()=>{e.removeListener(t,c).catch((()=>null))})),{getValue:()=>a}},Object.defineProperty(c,"__esModule",{value:!0}),c.System=void 0;const re=d,oe=g,se=ie(),ae=t;class ce extends re.EmitterBase{constructor(e){super(e,"system")}sendExternalProcessRequest(e,t){return new Promise(((n,i)=>{const r="external-process-exited";let o,s,a,c;"function"==typeof t.listener&&(a=e=>{const n=e||{};s={topic:"exited",uuid:n.processUuid||"",exitCode:n.exitCode||0},o===e.processUuid&&(t.listener(s),c.removeListener(r,a))},this.wire.me.name||(this.wire.me.name=this.wire.me.uuid),c=new se._Window(this.wire,this.wire.me),c.on(r,a)),this.wire.sendAction(e,t).then((({payload:e})=>{o=e.data.uuid,n(e.data),s&&o===s.uuid&&(t.listener(s),c.removeListener(r,a))})).catch((e=>{c&&c.removeListener(r,a),i(e)}))}))}getVersion(){return this.wire.sendAction("get-version").then((({payload:e})=>e.data))}clearCache(e){return this.wire.sendAction("clear-cache",e).then((()=>{}))}deleteCacheOnExit(){return this.wire.sendAction("delete-cache-request").then((()=>{}))}exit(){return this.wire.sendAction("exit-desktop").then((()=>{}))}async fetchManifest(e){const{payload:{data:t}}=await this.wire.sendAction("fetch-manifest",{manifestUrl:e});return t}flushCookieStore(){return this.wire.sendAction("flush-cookie-store").then((()=>{}))}getAllWindows(){return this.wire.sendAction("get-all-windows").then((({payload:e})=>e.data))}getAllApplications(){return this.wire.sendAction("get-all-applications").then((({payload:e})=>e.data))}getCommandLineArguments(){return this.wire.sendAction("get-command-line-arguments").then((({payload:e})=>e.data))}async getCrashReporterState(){const{payload:{data:{diagnosticMode:e,isRunning:t}}}=await this.wire.sendAction("get-crash-reporter-state");return console.warn("diagnosticMode property is deprecated. It will be removed in a future version"),{diagnosticMode:e,diagnosticsMode:e,isRunning:t}}async startCrashReporter(e){const t=e,n={...t,diagnosticMode:t.diagnosticsMode||t.diagnosticMode},{payload:{data:{diagnosticMode:i,isRunning:r}}}=await this.wire.sendAction("start-crash-reporter",n);return{diagnosticMode:i,diagnosticsMode:i,isRunning:r}}getUniqueUserId(){return this.wire.sendAction("get-unique-user-id").then((({payload:e})=>e.data))}getEntityInfo(e,t){return this.wire.sendAction("get-entity-info",{uuid:e,name:t}).then((({payload:e})=>e.data))}getEnvironmentVariable(e){return this.wire.sendAction("get-environment-variable",{environmentVariables:e}).then((({payload:e})=>e.data))}getFocusedWindow(){return this.wire.sendAction("get-focused-window").then((({payload:e})=>e.data))}async isAppCertified(e){const{payload:{data:{certifiedInfo:t}}}=await this.wire.sendAction("is-app-certified",{manifestUrl:e});return t}getInstalledRuntimes(){return this.wire.sendAction("get-installed-runtimes").then((({payload:e})=>e.data.runtimes))}async getInstalledApps(){const{payload:{data:{installedApps:e}}}=await this.wire.sendAction("get-installed-apps");return e}getLog(e){return this.wire.sendAction("view-log",e).then((({payload:e})=>e.data))}getMachineId(){return this.wire.sendAction("get-machine-id").then((({payload:e})=>e.data))}getMinLogLevel(){return this.wire.sendAction("get-min-log-level").then((({payload:e})=>e.data))}getLogList(){return this.wire.sendAction("list-logs").then((({payload:e})=>e.data))}getMonitorInfo(){return this.wire.sendAction("get-monitor-info").then((({payload:e})=>e.data))}getMousePosition(){return this.wire.sendAction("get-mouse-position").then((({payload:e})=>e.data))}getProcessList(){return console.warn("System.getProcessList has been deprecated. Please consider using our new process APIs: Window.getProcessInfo, View.getProcessInfo, Application.getProcessInfo, System.getAllProcessInfo"),this.wire.sendAction("process-snapshot").then((({payload:e})=>e.data))}async getAllProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction("get-all-process-info",this.identity);return e}getProxySettings(){return this.wire.sendAction("get-proxy-settings").then((({payload:e})=>e.data))}getRuntimeInfo(){return this.wire.sendAction("get-runtime-info").then((({payload:e})=>e.data))}getRvmInfo(){return this.wire.sendAction("get-rvm-info").then((({payload:e})=>e.data))}getHostSpecs(){return this.wire.sendAction("get-host-specs").then((({payload:e})=>e.data))}getOSInfo(){return this.wire.sendAction("get-os-info").then((({payload:e})=>e.data))}launchExternalProcess(e){return this.sendExternalProcessRequest("launch-external-process",e)}monitorExternalProcess(e){return this.sendExternalProcessRequest("monitor-external-process",e)}log(e,t){return this.wire.sendAction("write-to-log",{level:e,message:t}).then((()=>{}))}openUrlWithBrowser(e){return this.wire.sendAction("open-url-with-browser",{url:e}).then((()=>{}))}async registerCustomProtocol(e){if("object"!=typeof e)throw new Error("Must provide an object with a `protocolName` property having a string value.");await this.wire.sendAction("register-custom-protocol",e)}async unregisterCustomProtocol(e){await this.wire.sendAction("unregister-custom-protocol",{protocolName:e})}async getCustomProtocolState(e){return this.wire.sendAction("get-custom-protocol-state",{protocolName:e}).then((({payload:e})=>e.data))}releaseExternalProcess(e){return this.wire.sendAction("release-external-process",{uuid:e}).then((()=>{}))}showDeveloperTools(e){return this.wire.sendAction("show-developer-tools",e).then((()=>{}))}terminateExternalProcess(e){return this.wire.sendAction("terminate-external-process",e).then((()=>{}))}updateProxySettings(e){return this.wire.sendAction("update-proxy",e).then((()=>{}))}async downloadAsset(e,t){const n=()=>{};let i=n,r=n;const o=new Promise(((e,t)=>{i=e,r=t}));if("openfin"!==this.wire.environment.type)throw new oe.NotSupportedError("downloadAsset only supported in an OpenFin Render process");const s=oe.RuntimeError.getCallSite(),a=this.wire.environment.getNextMessageId().toString(),c=`asset-download-progress-${a}`,d=`asset-download-error-${a}`,h=`asset-download-complete-${a}`,l=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},u=()=>{this.removeListener(c,l)};await Promise.all([this.on(c,l),this.once(d,(e=>{u();const{reason:t,err:n}=e;r(new oe.RuntimeError({reason:t,error:n},s))})),this.once(h,(()=>{u(),i()}))]);const p=Object.assign(e,{downloadId:a});return await this.wire.sendAction("download-asset",p).catch((e=>{throw u(),e})),o}downloadRuntime(e,t){const n=oe.RuntimeError.getCallSite();return new Promise(((i,r)=>{if("openfin"!==this.wire.environment.type)return void r(new oe.NotSupportedError("downloadRuntime only supported in an OpenFin Render process"));const o=this.wire.environment.getNextMessageId().toString(),s=`runtime-download-progress-${o}`,a=`runtime-download-error-${o}`,c=`runtime-download-complete-${o}`,d=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},h=()=>{this.removeListener(s,d)};this.on(s,d),this.once(a,(e=>{h();const{reason:t,err:i}=e;r(new oe.RuntimeError({reason:t,error:i},n))})),this.once(c,(()=>{h(),i()}));const l=Object.assign(e,{downloadId:o});this.wire.sendAction("download-runtime",l).catch((e=>{h(),r(e)}))}))}downloadPreloadScripts(e){return this.wire.sendAction("download-preload-scripts",{scripts:e}).then((({payload:e})=>e.data))}getAllExternalApplications(){return this.wire.sendAction("get-all-external-applications").then((({payload:e})=>e.data))}getAppAssetInfo(e){return this.wire.sendAction("get-app-asset-info",e).then((({payload:e})=>e.data))}getCookies(e){const t=this.wire.environment.getUrl(),n=Object.assign(e,{url:t});return this.wire.sendAction("get-cookies",n).then((({payload:e})=>e.data))}setMinLogLevel(e){return this.wire.sendAction("set-min-log-level",{level:e}).then((()=>{}))}resolveUuid(e){return this.wire.sendAction("resolve-uuid",{entityKey:e}).then((({payload:e})=>e.data))}executeOnRemote(e,t){return t.requestingIdentity=e,this.wire.ferryAction(t)}readRegistryValue(e,t,n){return this.wire.sendAction("read-registry-value",{rootKey:e,subkey:t,value:n}).then((({payload:e})=>e.data))}registerExternalConnection(e){return this.wire.sendAction("register-external-connection",{uuid:e}).then((({payload:e})=>e.data))}async getServiceConfiguration(e){if("string"!=typeof e.name)throw new Error("Must provide an object with a `name` property having a string value");const{name:t}=e;return this.wire.sendAction("get-service-configuration",{name:t}).then((({payload:e})=>e.data))}async getSystemAppConfig(e){if("string"!=typeof e)throw new Error("Must provide a string value for name of system app");return this.wire.sendAction("get-system-app-configuration",{name:e}).then((({payload:e})=>e.data))}async registerShutdownHandler(e){this.wire.sendAction("system-register-shutdown-handler").catch((e=>{}));const{uuid:t,name:n}=this.wire.me;this.on("system-shutdown",(i=>{e({proceed:()=>{this.wire.environment.raiseEvent("application/system-shutdown-handled",{uuid:t,name:n,topic:"application"})}})}))}runRvmHealthCheck(){return this.wire.sendAction("run-rvm-health-check").then((({payload:e})=>e.data))}async launchManifest(e,t={}){const{subscribe:n,...i}=t,r=i;if(n){const e=new ae.EventEmitter;n(e);const t="app-version-progress",i="runtime-status",o="app-version-complete",s="app-version-error",a=this.wire.environment.getNextMessageId().toString();r.appVersionId=a;const c=[o,t,i,s],d=e=>{const{appVersionId:t,topic:n,type:i,...r}=e;return{...r,type:c.find((e=>i.includes(e)))}},h=t=>{const n=d(t);e.emit(n.type,n)},l=()=>{this.removeListener(`${t}.${a}`,h),this.removeListener(`${i}.${a}`,h),this.removeListener(`${o}.${a}`,h),this.removeListener(`${s}.${a}`,h),this.removeListener(`${o}.${a}`,l),this.removeListener(`${s}.${a}`,l)};await Promise.all([this.on(`${t}.${a}`,h),this.on(`${i}.${a}`,h),this.once(`${o}.${a}`,h),this.once(`${s}.${a}`,h),this.once(`${o}.${a}`,l),this.once(`${s}.${a}`,l)])}return(await this.wire.sendAction("launch-manifest",{manifestUrl:e,opts:r})).payload.data.manifest}async queryPermissionForCurrentContext(e){const t={uuid:this.wire.me.uuid,name:this.wire.me.name};return(await this.wire.sendAction("query-permission-for-current-context",{apiName:e,identity:t})).payload.data}async enableNativeWindowIntegrationProvider(e){const{payload:t}=await this.wire.sendAction("enable-native-window-integration-provider",{permissions:e});return t.data}async registerUsage({data:e,type:t}){await this.wire.sendAction("register-usage",{data:e,type:t})}async getPrinters(){const{payload:e}=await this.wire.sendAction("system-get-printers");return e.data}async updateProcessLoggingOptions(e){await this.wire.sendAction("system-update-process-logging-options",{options:e})}async getDomainSettings(){const{payload:{data:e}}=await this.wire.sendAction("get-domain-settings",this.identity);return e}async setDomainSettings(e){await this.wire.sendAction("set-domain-settings",{domainSettings:e,...this.identity})}async refreshExtensions(){const{payload:e}=await this.wire.sendAction("refresh-extensions");return e.data}async getInstalledExtensions(){const{payload:e}=await this.wire.sendAction("get-installed-extensions");return e.data}}c.System=ce;var de={},he={};Object.defineProperty(he,"__esModule",{value:!0}),he.RefCounter=void 0;he.RefCounter=class{constructor(){this.topicRefMap=new Map}incRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t+1;n=i,this.topicRefMap.set(e,i)}else this.topicRefMap.set(e,1),n=1;return n}decRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t-1;this.topicRefMap.set(e,i),n=i}else n=-1;return n}actOnFirst(e,t,n){return 1===this.incRefCount(e)?t():n()}actOnLast(e,t,n){return 0===this.decRefCount(e)?t():n()}};var le={},ue={},pe={};Object.defineProperty(pe,"__esModule",{value:!0}),pe.ChannelBase=pe.ProtectedItems=void 0;const we=e=>async(t,n,i)=>{const r=await e(t,n,i);return void 0===r?n:r};pe.ProtectedItems=class{constructor(e,t){this.providerIdentity=e,this.close=t}};class ye{static defaultAction(e){throw new Error(`No action registered at target for ${e}`)}constructor(){this.subscriptions=new Map}async processAction(e,t,n){try{const i=this.subscriptions.has(e)?this.subscriptions.get(e):(t,n)=>(this.defaultAction??ye.defaultAction)(e,t,n),r=this.preAction?await this.preAction(e,t,n):t,o=await i(r,n);return this.postAction?await this.postAction(e,o,n):o}catch(t){if(this.errorMiddleware)return this.errorMiddleware(e,t,n);throw t}}beforeAction(e){if(this.preAction)throw new Error("Already registered beforeAction middleware");this.preAction=we(e)}onError(e){if(this.errorMiddleware)throw new Error("Already registered error middleware");this.errorMiddleware=e}afterAction(e){if(this.postAction)throw new Error("Already registered afterAction middleware");this.postAction=we(e)}remove(e){this.subscriptions.delete(e)}setDefaultAction(e){if(this.defaultAction)throw new Error("default action can only be set once");this.defaultAction=e}register(e,t){if(this.subscriptions.has(e))throw new Error(`Subscription already registered for action: ${e}. Unsubscribe before adding new subscription`);return this.subscriptions.set(e,t),!0}}pe.ChannelBase=ye;var fe,ge,me,ve=s&&s.__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)},Ce=s&&s.__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};Object.defineProperty(ue,"__esModule",{value:!0}),ue.ChannelClient=void 0;const be=pe,Ie=new Map;class Ee extends be.ChannelBase{static closeChannelByEndpointId(e){const t=Ie.get(e);t&&ve(t,me,"f").call(t)}static handleProviderDisconnect(e){for(const t of Ie.values())t.providerIdentity.channelId===e.channelId&&(t.disconnectListener(e),ve(t,me,"f").call(t))}constructor(e,t,n){super(),fe.set(this,void 0),ge.set(this,void 0),this.processAction=(e,t,n)=>super.processAction(e,t,n),me.set(this,(()=>{Ie.delete(this.endpointId),ve(this,ge,"f").close()})),Ce(this,fe,new be.ProtectedItems(e,t),"f"),this.disconnectListener=()=>{},this.endpointId=e.endpointId,Ce(this,ge,n,"f"),Ie.set(this.endpointId,this),n.receive(this.processAction)}get providerIdentity(){return ve(this,fe,"f").providerIdentity}async dispatch(e,t){if(ve(this,ge,"f").isEndpointConnected(this.providerIdentity.channelId))return ve(this,ge,"f").send(this.providerIdentity.channelId,e,t);throw new Error("The client you are trying to dispatch from is disconnected from the target provider.")}onDisconnection(e){this.disconnectListener=t=>{try{e(t)}catch(e){throw new Error(`Error while calling the onDisconnection callback: ${e.message}`)}finally{this.disconnectListener=()=>{}}}}async disconnect(){await this.sendDisconnectAction(),ve(this,me,"f").call(this)}async sendDisconnectAction(){const e=ve(this,fe,"f");await e.close()}static async wireClose(e,t,n){const{channelName:i,uuid:r,name:o}=t;await e.sendAction("disconnect-from-channel",{channelName:i,uuid:r,name:o,endpointId:n})}}ue.ChannelClient=Ee,fe=new WeakMap,ge=new WeakMap,me=new WeakMap;var xe={},Ae={};Object.defineProperty(Ae,"__esModule",{value:!0}),Ae.exhaustiveCheck=void 0,Ae.exhaustiveCheck=function(e,t){throw new Error(`Unsupported value: ${e}${t?`\n Supported values are: ${t.join("")}`:""}`)};var Pe,Me,_e,Oe={},Se=s&&s.__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},Re=s&&s.__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)};Object.defineProperty(Oe,"__esModule",{value:!0}),Oe.ClassicInfo=Oe.ClassicStrategy=void 0;Oe.ClassicStrategy=class{constructor(e,t,n,i){this.messageReceiver=t,this.endpointId=n,this.providerIdentity=i,Pe.set(this,void 0),Me.set(this,new Map),_e.set(this,new Map),this.send=async(e,t,n)=>{const i=Re(this,Me,"f").get(e);if(!i)throw new Error(`Could not locate routing info for endpoint ${e}`);const r={...i};r.isLocalEndpointId&&delete r.endpointId,delete r.isLocalEndpointId;const o=Re(this,Pe,"f").sendAction("send-channel-message",{...r,providerIdentity:this.providerIdentity,action:t,payload:n});Re(this,_e,"f").get(e)?.add(o);return(await o.catch((e=>{throw new Error(e.message)})).finally((()=>{Re(this,_e,"f").get(e)?.delete(o)}))).payload.data.result},this.close=async()=>{this.messageReceiver.removeEndpoint(this.providerIdentity.channelId,this.endpointId),[...Re(this,Me,"f").keys()].forEach((e=>this.closeEndpoint(e))),Se(this,Me,new Map,"f")},Se(this,Pe,e,"f")}onEndpointDisconnect(e,t){}receive(e){this.messageReceiver.addEndpoint(e,this.providerIdentity.channelId,this.endpointId)}async closeEndpoint(e){const t=Re(this,Me,"f").get(e);Re(this,Me,"f").delete(e);const n=Re(this,_e,"f").get(e);n?.forEach((n=>{const i=`Channel connection with identity uuid: ${t?.uuid} / name: ${t?.name} / endpointId: ${e} no longer connected.`;n.cancel(new Error(i))}))}isEndpointConnected(e){return Re(this,Me,"f").has(e)}addEndpoint(e,t){Re(this,Me,"f").set(e,t.endpointIdentity),Re(this,_e,"f").set(e,new Set)}isValidEndpointPayload(e){return"string"==typeof e?.endpointIdentity?.endpointId||"string"==typeof e?.endpointIdentity?.channelId}},Pe=new WeakMap,Me=new WeakMap,_e=new WeakMap,Oe.ClassicInfo={version:5,minimumVersion:0,type:"classic"};var Fe={},je={},ke={};Object.defineProperty(ke,"__esModule",{value:!0}),ke.errorToPOJO=void 0,ke.errorToPOJO=function(e){return{stack:e.stack,name:e.name,message:e.message,toString:()=>e.stack||e.toString()}};var Le,Te,$e=s&&s.__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)},Be=s&&s.__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};Object.defineProperty(je,"__esModule",{value:!0}),je.RTCEndpoint=void 0;const Ge=ke;je.RTCEndpoint=class{static isValidEndpointPayload(e){const t=e=>"object"==typeof e&&null!==e;return t(e)&&t(e.endpointIdentity)&&t(e.rtc)&&"string"==typeof e.endpointIdentity.endpointId}constructor({rtc:e,endpointIdentity:t}){this.responseMap=new Map,Le.set(this,null),Te.set(this,void 0),this.connectionStateChangeHandler=e=>{"connected"!==this.rtc.rtcClient.connectionState&&(this.rtc.rtcClient.removeEventListener("connectionstatechange",this.connectionStateChangeHandler),this.close(),$e(this,Te,"f")&&$e(this,Te,"f").call(this))},this.send=async(e,t)=>{const n=`message-${Math.random()}`,i=new Promise(((e,t)=>{this.responseMap.set(n,{resolve:e,reject:t})}));return this.rtc.channels.request.send(JSON.stringify({action:e,payload:t,messageId:n})),i},this.close=()=>{this.responseMap.forEach((e=>e.reject("Connection has closed."))),this.responseMap=new Map,this.rtc.channels.request.close(),this.rtc.channels.response.close(),this.rtc.rtcClient.close()},this.rtc=e,this.endpointIdentity=t,this.rtc.channels.response.addEventListener("message",(e=>{let{data:t}=e;e.data instanceof ArrayBuffer&&(t=(new TextDecoder).decode(e.data));const{messageId:n,payload:i,success:r,error:o}=JSON.parse(t),{resolve:s,reject:a}=this.responseMap.get(n)??{};s&&a?(this.responseMap.delete(n),r?s(i):a(o)):(console.log("Could not find id in responseMap."),console.log(e))})),this.rtc.channels.request.addEventListener("message",(async e=>{let{data:n}=e;e.data instanceof ArrayBuffer&&(n=(new TextDecoder).decode(e.data));const{messageId:i,action:r,payload:o}=JSON.parse(n);if($e(this,Le,"f"))try{const e=await $e(this,Le,"f").call(this,r,o,t);this.rtc.channels.response.send(JSON.stringify({messageId:i,payload:e,success:!0}))}catch(e){"open"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,error:(0,Ge.errorToPOJO)(e),success:!1}))}else"open"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,success:!1,error:"Connection not ready."}))})),this.rtc.rtcClient.addEventListener("connectionstatechange",this.connectionStateChangeHandler),Object.values(this.rtc.channels).forEach((e=>{e.onclose=e=>{[...this.responseMap.values()].forEach((e=>e.reject(new Error("RTCDataChannel closed unexpectedly, this is most commonly caused by message size. Note: RTC Channels have a message size limit of ~255kB.")))),this.close(),$e(this,Te,"f")&&$e(this,Te,"f").call(this)}}))}onDisconnect(e){if($e(this,Te,"f"))throw new Error("RTCEndpoint disconnectListener cannot be set twice.");Be(this,Te,e,"f")}receive(e){if($e(this,Le,"f"))throw new Error("You have already set a listener for this RTC Endpoint.");Be(this,Le,e,"f")}get connected(){return"connected"===this.rtc.rtcClient.connectionState}},Le=new WeakMap,Te=new WeakMap;var We,He,Ne,De={},Ue=s&&s.__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)},Ve=s&&s.__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};Object.defineProperty(De,"__esModule",{value:!0}),De.EndpointStrategy=void 0;De.EndpointStrategy=class{constructor(e,t,n){this.EndpointType=e,this.StrategyName=n,We.set(this,null),He.set(this,new Map),Ne.set(this,!0),this.send=async(e,t,n)=>this.getEndpointById(e).send(t,n),this.close=async()=>{Ue(this,Ne,"f")&&(Ue(this,He,"f").forEach((e=>e.close())),Ve(this,He,new Map,"f")),Ve(this,Ne,!1,"f")},this.isValidEndpointPayload=t}onEndpointDisconnect(e,t){this.getEndpointById(e).onDisconnect(t)}receive(e){if(Ue(this,We,"f"))throw new Error(`You have already set a listener for this ${this.StrategyName} Strategy`);Ve(this,We,e,"f"),Ue(this,He,"f").forEach((e=>e.receive(Ue(this,We,"f"))))}getEndpointById(e){const t=Ue(this,He,"f").get(e);if(!t)throw new Error(`Client with endpoint id ${e} is not connected`);return t}get connected(){return Ue(this,Ne,"f")}isEndpointConnected(e){return Ue(this,He,"f").has(e)}addEndpoint(e,t){if(!Ue(this,Ne,"f"))return void console.warn(`Adding endpoint to disconnected ${this.StrategyName} Strategy`);const n=new this.EndpointType(t);Ue(this,We,"f")&&n.receive(Ue(this,We,"f")),Ue(this,He,"f").set(e,n)}async closeEndpoint(e){Ue(this,He,"f").delete(e)}},We=new WeakMap,He=new WeakMap,Ne=new WeakMap,Object.defineProperty(Fe,"__esModule",{value:!0}),Fe.RTCInfo=Fe.RTCStrategy=void 0;const ze=je,Ke=De;class qe extends Ke.EndpointStrategy{constructor(){super(ze.RTCEndpoint,ze.RTCEndpoint.isValidEndpointPayload,"RTC")}}Fe.RTCStrategy=qe,Fe.RTCInfo={version:2,minimumVersion:0,type:"rtc"};var Je={};Object.defineProperty(Je,"__esModule",{value:!0}),Je.RTCICEManager=void 0;const Ye=d;class Ze extends Ye.EmitterBase{constructor(e){super(e,"channel"),this.ensureChannelOpened=e=>new Promise(((t,n)=>{if("open"===e.readyState)t();else if("connecting"===e.readyState){const n=()=>{e.removeEventListener("open",n),t()};e.addEventListener("open",n)}else n(new Error("This Channel has already closed"))}))}static createDataChannelPromise(e,t){let n;const i=new Promise((e=>{n=e})),r=i=>{const o=()=>{i.channel.removeEventListener("open",o),n(i.channel)};i.channel.label===e&&(i.channel.addEventListener("open",o),t.removeEventListener("datachannel",r))};return t.addEventListener("datachannel",r),i}async listenForProviderIce(e,t){await this.on(this.createProviderEventName(e),t,{timestamp:Date.now()})}async raiseProviderIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createProviderEventName(e)),t)}async listenForClientIce(e,t){await this.on(this.createClientEventName(e),t,{timestamp:Date.now()})}async raiseClientIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createClientEventName(e)),t)}cleanupIceListeners(e){this.removeAllListeners(this.createClientEventName(e)),this.removeAllListeners(this.createProviderEventName(e))}createClientEventName(e){return`ice-client-${e}`}createProviderEventName(e){return`ice-provider-${e}`}createRouteString(e){return`channel/${e}`}createRtcPeer(){return this.wire.environment.getRtcPeer()}async startClientOffer(){const e=Math.random().toString(),t=this.createRtcPeer();t.addEventListener("icecandidate",(async t=>{t.candidate&&await this.raiseClientIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForProviderIce(e,(async e=>{await t.addIceCandidate(e.candidate)}));const n={request:t.createDataChannel("request"),response:t.createDataChannel("response")},i=await t.createOffer();await t.setLocalDescription(i);const r=Promise.all([n.request,n.response].map(this.ensureChannelOpened)).then((()=>{}));return{rtcClient:t,channels:n,offer:i,rtcConnectionId:e,channelsOpened:r}}async finishClientOffer(e,t,n){return await e.setRemoteDescription(t),await n,!0}async createProviderAnswer(e,t){const n=this.createRtcPeer(),i=Ze.createDataChannelPromise("request",n),r=Ze.createDataChannelPromise("response",n);n.addEventListener("icecandidate",(async t=>{t.candidate&&await this.raiseProviderIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForClientIce(e,(async e=>{await n.addIceCandidate(e.candidate)})),await n.setRemoteDescription(t);const o=await n.createAnswer();await n.setLocalDescription(o);const s=Promise.all([i,r]).then((([t,n])=>(this.cleanupIceListeners(e),{request:t,response:n})));return{rtcClient:n,answer:o,channels:s}}}Je.RTCICEManager=Ze;var Qe={},Xe={};function et(e){return[...e.split(".").reverse().entries()].reduce(((e,[t,n])=>e+ +n*1e4**t),0)}function tt(e,t){return et(e)>=et(t)}function nt(e){return e.split("/")[0]}Object.defineProperty(Xe,"__esModule",{value:!0}),Xe.runtimeUuidMeetsMinimumRuntimeVersion=Xe.parseRuntimeUuid=Xe.meetsMinimumRuntimeVersion=void 0,Xe.meetsMinimumRuntimeVersion=tt,Xe.parseRuntimeUuid=nt,Xe.runtimeUuidMeetsMinimumRuntimeVersion=function(e,t){return tt(nt(e),t)};var it,rt,ot,st,at,ct=s&&s.__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)},dt=s&&s.__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};Object.defineProperty(Qe,"__esModule",{value:!0}),Qe.ChannelProvider=void 0;const ht=pe,lt=Xe;class ut extends ht.ChannelBase{get connections(){return[...ct(this,it,"f")]}static handleClientDisconnection(e,t){const n=e.connections.find((e=>e.endpointId===t.endpointId));if(n)ct(e,st,"f").call(e,n);else{e.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name)).forEach(ct(e,st,"f"))}e.disconnectListener(t)}static setProviderRemoval(e,t){ut.removalMap.set(e,t)}constructor(e,t,n){super(),it.set(this,void 0),rt.set(this,void 0),ot.set(this,void 0),st.set(this,(e=>{const t=this.connections.filter((t=>t.endpointId!==e.endpointId));ct(this,ot,"f").closeEndpoint(e.endpointId),dt(this,it,t,"f")})),this.processAction=async(e,t,n)=>(ut.clientIsMultiRuntime(n)&&!(0,lt.runtimeUuidMeetsMinimumRuntimeVersion)(n.runtimeUuid,"18.87.56.0")?this.handleMultiRuntimeLegacyClient(n):this.checkForClientConnection(n),super.processAction(e,t,n)),at.set(this,(()=>{ct(this,ot,"f").close();const e=ut.removalMap.get(this);e&&e()})),dt(this,rt,new ht.ProtectedItems(e,t),"f"),this.connectListener=()=>{},this.disconnectListener=()=>{},dt(this,it,[],"f"),dt(this,ot,n,"f"),n.receive(this.processAction)}dispatch(e,t,n){const i=e.endpointId??this.getEndpointIdForOpenFinId(e,t);return i&&ct(this,ot,"f").isEndpointConnected(i)?ct(this,ot,"f").send(i,t,n):Promise.reject(new Error(`Client connection with identity uuid: ${e.uuid} / name: ${e.name} / endpointId: ${i} no longer connected.`))}async processConnection(e,t){return ct(this,it,"f").push(e),this.connectListener(e,t)}publish(e,t){return this.connections.map((n=>ct(this,ot,"f").send(n.endpointId,e,t)))}onConnection(e){this.connectListener=e}onDisconnection(e){this.disconnectListener=e}async destroy(){const e=ct(this,rt,"f");e.providerIdentity,dt(this,it,[],"f"),await e.close(),ct(this,at,"f").call(this)}async getAllClientInfo(){return this.connections.map((e=>{const{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}=e;return{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}}))}checkForClientConnection(e){if(!this.isClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider.\n Client Identity: {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}isClientConnected(e){return ut.clientIdentityIncludesEndpointId(e)?this.connections.some((t=>t.endpointId===e.endpointId&&t.uuid===e.uuid&&t.name===e.name)):this.isLegacyClientConnected(e)}isLegacyClientConnected(e){return this.connections.some((t=>t.uuid===e.uuid&&t.name===e.name))}handleMultiRuntimeLegacyClient(e){if(!this.isLegacyClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider. Client Identity:\n {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}getEndpointIdForOpenFinId(e,t){const n=this.connections.filter((t=>t.name===e.name&&t.uuid===e.uuid));if(n.length>=2){const n=ct(this,rt,"f"),{uuid:i,name:r}=e,o=n?.providerIdentity.uuid,s=n?.providerIdentity.name;console.warn(`WARNING: Dispatch call may have unintended results. The "to" argument of your dispatch call is missing the\n "endpointId" parameter. The identity you are dispatching to ({uuid: ${i}, name: ${r}})\n has multiple channelClients for this channel. Your dispatched action: (${t}) from the provider:\n ({uuid: ${o}, name: ${s}}) will only be processed by the most recently-created client.`)}return n.pop()?.endpointId}static clientIdentityIncludesEndpointId(e){return void 0!==e.endpointId}static clientIsMultiRuntime(e){return void 0!==e.runtimeUuid}static async wireClose(e,t){await e.sendAction("destroy-channel",{channelName:t})}}Qe.ChannelProvider=ut,it=new WeakMap,rt=new WeakMap,ot=new WeakMap,st=new WeakMap,at=new WeakMap,ut.removalMap=new WeakMap;var pt={};Object.defineProperty(pt,"__esModule",{value:!0}),pt.MessageReceiver=void 0;const wt=ue,yt=d;class ft extends yt.Base{constructor(e){super(e),this.onmessage=e=>"process-channel-message"===e.action&&(this.processChannelMessage(e),!0),this.endpointMap=new Map,this.latestEndpointIdByChannelId=new Map,e.registerMessageHandler(this.onmessage.bind(this))}async processChannelMessage(e){const{senderIdentity:t,providerIdentity:n,action:i,ackToSender:r,payload:o,intendedTargetIdentity:s}=e.payload,a=s.channelId??s.endpointId??this.latestEndpointIdByChannelId.get(n.channelId),c=this.endpointMap.get(a);if(!c)return r.payload.success=!1,r.payload.reason=`Client connection with identity uuid: ${this.wire.me.uuid} / name: ${this.wire.me.name} / endpointId: ${a} no longer connected.`,this.wire.sendRaw(r);try{const e=await c(i,o,t);return r.payload.payload=r.payload.payload||{},r.payload.payload.result=e,this.wire.sendRaw(r)}catch(e){return r.payload.success=!1,r.payload.reason=e.message,this.wire.sendRaw(r)}}addEndpoint(e,t,n){this.endpointMap.set(n,e),t!==n&&this.latestEndpointIdByChannelId.set(t,n)}removeEndpoint(e,t){this.endpointMap.delete(t),this.latestEndpointIdByChannelId.get(e)===t&&this.latestEndpointIdByChannelId.delete(e)}checkForPreviousClientConnection(e){const t=this.latestEndpointIdByChannelId.get(e);t&&(wt.ChannelClient.closeChannelByEndpointId(t),console.warn("You have created a second connection to an older provider. First connection has been removed from the clientMap"),console.warn("If the provider calls publish(), you may receive multiple messages."))}}pt.MessageReceiver=ft;var gt={};Object.defineProperty(gt,"__esModule",{value:!0}),gt.ProtocolManager=void 0;gt.ProtocolManager=class{constructor(e){this.ProtocolsInPreferenceOrder=e,this.DefaultClientProtocols=["classic"],this.DefaultProviderProtocols=["classic"],this.getClientProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultClientProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(", ")}.`);return t},this.getProviderProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultProviderProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(", ")}.`);return t},this.getCompatibleProtocols=(e,t)=>t.supportedProtocols.filter((t=>e.some((e=>e.type===t.type&&t.version>=e.minimumVersion&&e.version>=(t.minimumVersion??0))))).slice(0,t.maxProtocols)}};var mt={};Object.defineProperty(mt,"__esModule",{value:!0});class vt{static combine(e,t){return new vt(e,t)}constructor(e,t){this.primary=e,this.secondary=t}onEndpointDisconnect(e,t){this.primary.onEndpointDisconnect(e,(()=>{this.secondary.isEndpointConnected(e)||t()})),this.secondary.onEndpointDisconnect(e,(()=>{this.primary.isEndpointConnected(e)||t()}))}isValidEndpointPayload(e){return this.primary.isValidEndpointPayload(e)||this.secondary.isValidEndpointPayload(e)}async closeEndpoint(e){await this.primary.closeEndpoint(e),await this.secondary.closeEndpoint(e)}isEndpointConnected(e){return this.primary.isEndpointConnected(e)||this.secondary.isEndpointConnected(e)}async addEndpoint(e,t){this.primary.isValidEndpointPayload(t)&&await this.primary.addEndpoint(e,t),this.secondary.isValidEndpointPayload(t)&&await this.secondary.addEndpoint(e,t)}receive(e){this.primary.receive(e),this.secondary.receive(e)}send(e,t,n){return this.primary.isEndpointConnected(e)?this.primary.send(e,t,n):this.secondary.send(e,t,n)}async close(){await Promise.all([this.primary.close(),this.secondary.close()])}}mt.default=vt;var Ct,bt,It=s&&s.__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},Et=s&&s.__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)},xt=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(xe,"__esModule",{value:!0}),xe.ConnectionManager=void 0;const At=Ae,Pt=d,Mt=Oe,_t=Fe,Ot=Je,St=Qe,Rt=pt,Ft=gt,jt=xt(mt);class kt extends Pt.Base{static getProtocolOptionsFromStrings(e){return e.map((e=>{switch(e){case"rtc":return _t.RTCInfo;case"classic":return Mt.ClassicInfo;default:return(0,At.exhaustiveCheck)(e,["rtc","classic"])}}))}constructor(e){super(e),Ct.set(this,void 0),bt.set(this,void 0),this.removeChannelFromProviderMap=e=>{this.providerMap.delete(e)},this.onmessage=e=>"process-channel-connection"===e.action&&(this.processChannelConnection(e),!0),this.providerMap=new Map,this.protocolManager=new Ft.ProtocolManager("node"===this.wire.environment.type?["classic"]:["rtc","classic"]),It(this,Ct,new Rt.MessageReceiver(e),"f"),It(this,bt,new Ot.RTCICEManager(e),"f"),e.registerMessageHandler(this.onmessage.bind(this))}createProvider(e,t){const n=Object.assign(this.wire.environment.getDefaultChannelOptions().create,e||{}),i=this.protocolManager.getProviderProtocols(n?.protocols),r=i.map((e=>{switch(e){case"rtc":return new _t.RTCStrategy;case"classic":return new Mt.ClassicStrategy(this.wire,Et(this,Ct,"f"),t.channelId,t);default:return(0,At.exhaustiveCheck)(e,["rtc","classic"])}}));let o;if(2===r.length){const[e,t]=r;o=jt.default.combine(e,t)}else{if(1!==r.length)throw new Error("failed to combine strategies");[o]=r}const s=new St.ChannelProvider(t,(()=>St.ChannelProvider.wireClose(this.wire,t.channelName)),o),a=t.channelId;return this.providerMap.set(a,{provider:s,strategy:o,supportedProtocols:kt.getProtocolOptionsFromStrings(i)}),St.ChannelProvider.setProviderRemoval(s,this.removeChannelFromProviderMap.bind(this)),s}async createClientOffer(e){const t=this.protocolManager.getClientProtocols(e?.protocols);let n;return{offer:{supportedProtocols:await Promise.all(t.map((async e=>{switch(e){case"rtc":{const{rtcClient:e,channels:t,offer:i,rtcConnectionId:r,channelsOpened:o}=await Et(this,bt,"f").startClientOffer();return n={rtcClient:e,channels:t,channelsOpened:o},{type:"rtc",version:_t.RTCInfo.version,payload:{offer:i,rtcConnectionId:r}}}case"classic":return{type:"classic",version:Mt.ClassicInfo.version};default:return(0,At.exhaustiveCheck)(e,["rtc","classic"])}}))),maxProtocols:2},rtc:n}}async createClientStrategy(e,t){t.endpointId||(t.endpointId=this.wire.environment.getNextMessageId(),Et(this,Ct,"f").checkForPreviousClientConnection(t.channelId));const n=t.answer??{supportedProtocols:[{type:"classic",version:1}]},i=(await Promise.all(n.supportedProtocols.map((async n=>"rtc"===n.type&&e?(await Et(this,bt,"f").finishClientOffer(e.rtcClient,n.payload.answer,e.channelsOpened),new _t.RTCStrategy):"classic"===n.type?new Mt.ClassicStrategy(this.wire,Et(this,Ct,"f"),t.endpointId,t):null)))).filter((e=>null!==e));let r;if(e&&!i.some((e=>e instanceof _t.RTCStrategy))&&e&&e.rtcClient.close(),i.length>=2)r=jt.default.combine(i[0],i[1]);else{if(!i.length)throw new Error("No compatible protocols");[r]=i}const o={endpointIdentity:t,rtc:e};return r.addEndpoint(t.channelId,o),r}async processChannelConnection(e){const{clientIdentity:t,providerIdentity:n,ackToSender:i,payload:r,offer:o}=e.payload;t.endpointId?t.isLocalEndpointId=!1:(t.endpointId=this.wire.environment.getNextMessageId(),t.isLocalEndpointId=!0);const s=n.channelId,a=this.providerMap.get(s);if(!a)return i.payload.success=!1,i.payload.reason=`Channel "${n.channelName}" has been destroyed.`,this.wire.sendRaw(i);const{provider:c,strategy:d,supportedProtocols:h}=a;try{if(!(c instanceof St.ChannelProvider))throw Error("Cannot connect to a channel client");const e=o??{supportedProtocols:[{type:"classic",version:1}],maxProtocols:1},n=this.protocolManager.getCompatibleProtocols(h,e);if(!n.length)throw new Error("This provider does not support any of the offered protocols.");const s=await c.processConnection(t,r);i.payload.payload=i.payload.payload||{};let a={supportedProtocols:[],endpointPayloadPromise:Promise.resolve({endpointIdentity:t})};return a=await n.reduce((async(e,t)=>{const n=await e;if("rtc"===t.type){const{answer:e,rtcClient:i,channels:r}=await Et(this,bt,"f").createProviderAnswer(t.payload.rtcConnectionId,t.payload.offer);n.supportedProtocols.push({type:"rtc",version:_t.RTCInfo.version,payload:{answer:e}}),n.endpointPayloadPromise=n.endpointPayloadPromise.then((e=>r.then((t=>({...e,rtc:{rtcClient:i,channels:t}})))))}else n.supportedProtocols.push({type:"classic",version:Mt.ClassicInfo.version});return n}),Promise.resolve(a)),a.endpointPayloadPromise.then((e=>d.addEndpoint(t.endpointId,e))),i.payload.payload.result=s,i.payload.payload.answer=a,this.wire.sendRaw(i)}catch(e){return i.payload.success=!1,i.payload.reason=e.message,this.wire.sendRaw(i)}}}xe.ConnectionManager=kt,Ct=new WeakMap,bt=new WeakMap;var Lt,Tt,$t,Bt=s&&s.__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},Gt=s&&s.__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)};Object.defineProperty(le,"__esModule",{value:!0}),le.Channel=void 0;const Wt=t,Ht=G,Nt=d,Dt=ue,Ut=xe,Vt=Qe;function zt(e){const t=Math.floor(e/10),n=Math.min(3e4,500*2**t);return new Promise((e=>{setTimeout((()=>{e(!1)}),n)}))}class Kt extends Nt.EmitterBase{constructor(e){super(e,"channel"),Lt.set(this,void 0),Tt.set(this,new Wt.EventEmitter),$t.set(this,new Ht.AsyncRetryableLazy((async()=>{await Promise.all([this.on("disconnected",(e=>{Dt.ChannelClient.handleProviderDisconnect(e)})),this.on("connected",((...e)=>{Gt(this,Tt,"f").emit("connected",...e)}))]).catch((()=>new Error("error setting up channel connection listeners")))}))),Bt(this,Lt,new Ut.ConnectionManager(e),"f")}async getAllChannels(){return this.wire.sendAction("get-all-channels").then((({payload:e})=>e.data))}async onChannelConnect(e){await this.on("connected",e)}async onChannelDisconnect(e){await this.on("disconnected",e)}async safeConnect(e,t,n){const i={count:0};do{let r=()=>{};const o=new Promise((t=>{r=n=>{e===n.channelName&&t(!0)},Gt(this,Tt,"f").on("connected",r)}));try{if(i.count>0){i.gotConnectedEvent=await Promise.race([zt(i.count),o]);const t=await this.wire.sendAction("connect-to-channel",{...n,retryInfo:i});return console.log(`Successfully connected to channelName: ${e}`),t.payload.data}const t=this.wire.sendAction("connect-to-channel",n);i.originalMessageId=t.messageId;return(await t).payload.data}catch(n){if(!n.message.includes("internal-nack"))throw n;t&&0===i.count&&console.warn(`No channel found for channelName: ${e}. Waiting for connection...`)}finally{i.count+=1,Gt(this,Tt,"f").removeListener("connected",r)}}while(t);throw new Error(`No channel found for channelName: ${e}.`)}async connect(e,t={}){if(await Gt(this,$t,"f").getValue(),!e||"string"!=typeof e)throw new Error("Please provide a channelName string to connect to a channel.");const n={wait:!0,...this.wire.environment.getDefaultChannelOptions().connect,...t},{offer:i,rtc:r}=await Gt(this,Lt,"f").createClientOffer(n);let o;(this.fin.me.isFrame||this.fin.me.isView||this.fin.me.isWindow)&&(o=(await this.fin.me.getInfo()).url);const s={channelName:e,...n,offer:i,connectionUrl:o},a=await this.safeConnect(e,n.wait,s),c=await Gt(this,Lt,"f").createClientStrategy(r,a),d=new Dt.ChannelClient(a,(()=>Dt.ChannelClient.wireClose(this.wire,a,a.endpointId)),c);return c.onEndpointDisconnect(a.channelId,(async()=>{try{await d.sendDisconnectAction()}catch(e){console.warn(`Something went wrong during disconnect for client with uuid: ${a.uuid} / name: ${a.name} / endpointId: ${a.endpointId}.`)}finally{Dt.ChannelClient.handleProviderDisconnect(a)}})),d}async create(e,t){if(!e)throw new Error("Please provide a channelName to create a channel");const{payload:{data:n}}=await this.wire.sendAction("create-channel",{channelName:e}),i=Gt(this,Lt,"f").createProvider(t,n);return this.on("client-disconnected",(t=>{t.channelName===e&&Vt.ChannelProvider.handleClientDisconnection(i,t)})),i}}le.Channel=Kt,Lt=new WeakMap,Tt=new WeakMap,$t=new WeakMap,Object.defineProperty(de,"__esModule",{value:!0}),de.InterAppPayload=de.InterApplicationBus=void 0;const qt=t,Jt=d,Yt=he,Zt=le,Qt=O;class Xt extends Jt.Base{constructor(e){super(e),this.events={subscriberAdded:"subscriber-added",subscriberRemoved:"subscriber-removed"},this.refCounter=new Yt.RefCounter,this.Channel=new Zt.Channel(e),this.emitter=new qt.EventEmitter,e.registerMessageHandler(this.onmessage.bind(this)),this.on=this.emitter.on.bind(this.emitter),this.removeAllListeners=this.emitter.removeAllListeners.bind(this.emitter)}async publish(e,t){await this.wire.sendAction("publish-message",{topic:e,message:t,sourceWindowName:this.me.name})}async send(e,t,n){const i=(0,Qt.validateIdentity)(e);if(i)throw new Error(i);await this.wire.sendAction("send-message",{destinationUuid:e.uuid,destinationWindowName:e.name,topic:t,message:n,sourceWindowName:this.me.name})}subscribe(e,t,n){const i=this.createSubscriptionKey(e.uuid,e.name||"*",t);return this.emitter.on(i,n),this.refCounter.actOnFirst(i,(async()=>{await this.wire.sendAction("subscribe",{sourceUuid:e.uuid,sourceWindowName:e.name||"*",topic:t,destinationWindowName:this.me.name})}),(()=>Promise.resolve()))}unsubscribe(e,t,n){const i=e.name||"*",r=this.createSubscriptionKey(e.uuid,i,t);return this.emitter.removeListener(r,n),this.refCounter.actOnLast(r,(async()=>{await this.wire.sendAction("unsubscribe",{sourceUuid:e.uuid,sourceWindowName:i,topic:t,destinationWindowName:this.me.name})}),(()=>new Promise((e=>e)).then((()=>{}))))}processMessage(e){const{payload:{message:t,sourceWindowName:n,sourceUuid:i,topic:r}}=e,o=[this.createSubscriptionKey(i,n,r),this.createSubscriptionKey(i,"*",r),this.createSubscriptionKey("*","*",r)],s={uuid:i,name:n};o.forEach((e=>{this.emitter.emit(e,t,s)}))}emitSubscriverEvent(e,t){const{payload:{targetName:n,uuid:i,topic:r}}=t,o={name:n,uuid:i,topic:r};this.emitter.emit(e,o)}createSubscriptionKey(e,t,n){const i=t||"*";if(!(e&&i&&n))throw new Error("Missing uuid, name, or topic string");return function(...e){return e.map((e=>Buffer.from(`${e}`).toString("base64"))).join("/")}(e,i,n)}onmessage(e){const{action:t}=e;switch(t){case"process-message":this.processMessage(e);break;case this.events.subscriberAdded:this.emitSubscriverEvent(this.events.subscriberAdded,e);break;case this.events.subscriberRemoved:this.emitSubscriverEvent(this.events.subscriberRemoved,e)}return!0}}de.InterApplicationBus=Xt;de.InterAppPayload=class{};var en={};Object.defineProperty(en,"__esModule",{value:!0}),en.Clipboard=void 0;const tn=d;class nn extends tn.Base{async writeText(e){await this.wire.sendAction("clipboard-write-text",e)}async readText(e){const{payload:t}=await this.wire.sendAction("clipboard-read-text",{type:e});return t.data}async writeImage(e){await this.wire.sendAction("clipboard-write-image",e)}async readImage(e={format:"dataURL"}){const{payload:t}=await this.wire.sendAction("clipboard-read-image",e);return t.data}async writeHtml(e){await this.wire.sendAction("clipboard-write-html",e)}async readHtml(e){const{payload:t}=await this.wire.sendAction("clipboard-read-html",{type:e});return t.data}async writeRtf(e){await this.wire.sendAction("clipboard-write-rtf",e)}async readRtf(e){const{payload:t}=await this.wire.sendAction("clipboard-read-rtf",{type:e});return t.data}async write(e){await this.wire.sendAction("clipboard-write",e)}async getAvailableFormats(e){const{payload:t}=await this.wire.sendAction("clipboard-read-formats",{type:e});return t.data}}en.Clipboard=nn;var rn={},on={},sn={};Object.defineProperty(sn,"__esModule",{value:!0}),sn.ExternalApplication=void 0;const an=d;class cn extends an.EmitterBase{constructor(e,t){super(e,"external-application",t.uuid),this.identity=t}getInfo(){return this.wire.sendAction("get-external-application-info",this.identity).then((({payload:e})=>e.data))}}sn.ExternalApplication=cn,Object.defineProperty(on,"__esModule",{value:!0}),on.ExternalApplicationModule=void 0;const dn=d,hn=sn;class ln extends dn.Base{wrap(e){return this.wire.sendAction("external-application-wrap").catch((e=>{})),Promise.resolve(new hn.ExternalApplication(this.wire,{uuid:e}))}wrapSync(e){return this.wire.sendAction("external-application-wrap-sync").catch((e=>{})),new hn.ExternalApplication(this.wire,{uuid:e})}}on.ExternalApplicationModule=ln,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(on,e),n(sn,e)}(rn);var un={},pn={},wn={};Object.defineProperty(wn,"__esModule",{value:!0}),wn._Frame=void 0;const yn=d;class fn extends yn.EmitterBase{constructor(e,t){super(e,"frame",t.uuid,t.name),this.identity=t}getInfo(){return this.wire.sendAction("get-frame-info",this.identity).then((({payload:e})=>e.data))}getParentWindow(){return this.wire.sendAction("get-parent-window",this.identity).then((({payload:e})=>e.data))}}wn._Frame=fn,Object.defineProperty(pn,"__esModule",{value:!0}),pn._FrameModule=void 0;const gn=d,mn=O,vn=wn;class Cn extends gn.Base{async wrap(e){this.wire.sendAction("frame-wrap").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}wrapSync(e){this.wire.sendAction("frame-wrap-sync").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}getCurrent(){return this.wire.sendAction("frame-get-current").catch((e=>{})),Promise.resolve(new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity()))}getCurrentSync(){return this.wire.sendAction("frame-get-current-sync").catch((e=>{})),new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity())}}pn._FrameModule=Cn,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(pn,e),n(wn,e)}(un);var bn={};Object.defineProperty(bn,"__esModule",{value:!0}),bn.GlobalHotkey=void 0;const In=d;class En extends In.EmitterBase{constructor(e){super(e,"global-hotkey")}async register(e,t){await this.on(e,t),await this.wire.sendAction("global-hotkey-register",{hotkey:e})}async unregister(e){await this.removeAllListeners(e),await this.wire.sendAction("global-hotkey-unregister",{hotkey:e})}async unregisterAll(){await Promise.all(this.eventNames().filter((e=>!("registered"===e||"unregistered"===e))).map((e=>this.removeAllListeners(e)))),await this.wire.sendAction("global-hotkey-unregister-all",{})}async isRegistered(e){const{payload:{data:t}}=await this.wire.sendAction("global-hotkey-is-registered",{hotkey:e});return t}}bn.GlobalHotkey=En;var xn,An={},Pn={},Mn={},_n=s&&s.__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)};Object.defineProperty(Mn,"__esModule",{value:!0}),Mn.Platform=void 0;const On=d,Sn=O,Rn=new Map;class Fn extends On.EmitterBase{constructor(e,t){super(t.wire,"application",e.uuid),this.getClient=e=>{this.wire.sendAction("platform-get-client",this.identity).catch((e=>{}));const t=e||this.identity,{uuid:n}=t;if(!Rn.has(n)){const e=_n(this,xn,"f").call(this,n);Rn.set(n,e)}return Rn.get(n)},xn.set(this,(async e=>{try{const t=`custom-frame-${e}`,n=await this._channel.connect(t,{wait:!1});return n.onDisconnection((()=>{Rn.delete(e)})),n}catch(t){throw Rn.delete(e),new Error("The targeted Platform is not currently running. Listen for application-started event for the given Uuid.")}})),this.launchLegacyManifest=this.launchContentManifest;const n=(0,Sn.validateIdentity)(e);if(n)throw new Error(n);this._channel=t,this.identity={uuid:e.uuid},this.Layout=this.fin.Platform.Layout,this.Application=this.fin.Application.wrapSync(this.identity)}async createView(e,t,n){this.wire.sendAction("platform-create-view",this.identity).catch((e=>{}));const i=await this.getClient(),r=await i.dispatch("create-view",{target:t,opts:e,targetView:n});if(!r||(0,Sn.validateIdentity)(r.identity))throw new Error(`When overwriting the createView call, please return an object that has a valid 'identity' property: ${JSON.stringify(r)}`);return this.fin.View.wrapSync(r.identity)}async createWindow(e){this.wire.sendAction("platform-create-window",this.identity).catch((e=>{}));const t=await this.getClient();e.reason||(e.reason="api-call");const n=await t.dispatch("create-view-container",e);if(!n||(0,Sn.validateIdentity)(n.identity))throw new Error(`When overwriting the createWindow call, please return an object that has a valid 'identity' property: ${JSON.stringify(n)}`);const{identity:i}=n,r=this.fin.Window.wrapSync(i);return r.name=i.name,r.uuid=i.uuid,r}async quit(){this.wire.sendAction("platform-quit",this.identity).catch((e=>{}));return(await this.getClient()).dispatch("quit")}async closeView(e){this.wire.sendAction("platform-close-view",this.identity).catch((e=>{}));const t=await this.getClient();await t.dispatch("close-view",{view:e})}async reparentView(e,t){console.warn("Platform.reparentView has been deprecated, please use Platform.createView"),this.wire.sendAction("platform-reparent-view",this.identity).catch((e=>{}));const n={...e,uuid:e.uuid??this.identity.uuid},i=await this.fin.View.wrap(n),r=await i.getOptions();return this.createView(r,t)}async getSnapshot(){this.wire.sendAction("platform-get-snapshot",this.identity).catch((e=>{}));return(await this.getClient()).dispatch("get-snapshot")}async getViewSnapshot(e){return(await this.getClient()).dispatch("get-view-snapshot",{viewIdentity:e})}async applySnapshot(e,t){this.wire.sendAction("platform-apply-snapshot",this.identity).catch((e=>{}));const n="Requested snapshot must be a valid Snapshot object, or a url or filepath to such an object.";let i;if("string"==typeof e)try{i=(await this._channel.wire.sendAction("get-application-manifest",{manifestUrl:e})).payload.data}catch(e){throw new Error(`${n}: ${e}`)}else i=e;if(!i.windows)throw new Error(n);const r=await this.getClient();return await r.dispatch("apply-snapshot",{snapshot:i,options:t}),this}async fetchManifest(e){return(await this.getClient()).dispatch("platform-fetch-manifest",{manifestUrl:e})}async launchContentManifest(e){this.wire.sendAction("platform-launch-content-manifest",this.identity).catch((()=>{}));const t=await this.getClient(),n=await this.fetchManifest(e);return t.dispatch("launch-into-platform",{manifest:n,manifestUrl:e}),this}async setWindowContext(e={},t){if(this.wire.sendAction("platform-set-window-context",this.identity).catch((e=>{})),!e)throw new Error("Please provide a serializable object or string to set the context.");const n=await this.getClient(),{entityType:i}=t?await this.fin.System.getEntityInfo(t.uuid,t.name):this.fin.me;await n.dispatch("set-window-context",{context:e,entityType:i,target:t||{uuid:this.fin.me.uuid,name:this.fin.me.name}})}async getWindowContext(e){this.wire.sendAction("platform-get-window-context",this.identity).catch((e=>{}));const t=await this.getClient(),{entityType:n}=e?await this.fin.System.getEntityInfo(e.uuid,e.name):this.fin.me;return t.dispatch("get-window-context",{target:e||{uuid:this.fin.me.uuid,name:this.fin.me.name},entityType:n})}async closeWindow(e,t={skipBeforeUnload:!1}){this.wire.sendAction("platform-close-window",this.identity).catch((e=>{}));return(await this.getClient()).dispatch("close-window",{windowId:e,options:t})}}Mn.Platform=Fn,xn=new WeakMap;var jn={},kn={},Ln={},Tn={};function $n(e){switch(e){case"columns":case"grid":case"rows":case"tabs":return!0;default:return!1}}Object.defineProperty(Tn,"__esModule",{value:!0}),Tn.overrideFromComposables=Tn.isValidPresetType=void 0,Tn.isValidPresetType=$n,Tn.overrideFromComposables=function(...e){return t=>e.reduceRight(((e,t)=>n=>t(e(n))),(e=>e))(t)},Tn.default={isValidPresetType:$n};var Bn={},Gn={},Wn={};Object.defineProperty(Wn,"__esModule",{value:!0}),Wn.ApiConsumer=void 0;Wn.ApiConsumer=class{constructor(e){this.strategy=e,this.consume=async e=>(await this.strategy.getExposedFunctions(e)).reduce(((t,n)=>({...t,[n.key]:this.strategy.createFunction(n,e)})),{})}};var Hn={},Nn={};Object.defineProperty(Nn,"__esModule",{value:!0}),Nn.expose=Nn.getExposedProperties=void 0;const Dn=Symbol("exposedProperties");Nn.getExposedProperties=e=>e[Dn]||e.prototype[Dn]||[];Nn.expose=e=>(t,n,i)=>{t[Dn]=t[Dn]||[],t[Dn].push({key:n,descriptor:i,options:e})},Object.defineProperty(Hn,"__esModule",{value:!0}),Hn.ApiExposer=void 0;const Un=Nn;Hn.ApiExposer=class{constructor(e){this.strategy=e,this.exposeInstance=async(e,t)=>{const n=(0,Un.getExposedProperties)(e),i=await Promise.all(n.map((async({key:n,options:i})=>({key:n,options:await this.strategy.exposeFunction(e[n].bind(e),{key:n,options:i,meta:t})}))));await this.strategy.exposeMeta(t,i)}}};var Vn={},zn={},Kn={};Object.defineProperty(Kn,"__esModule",{value:!0}),Kn.ChannelsConsumer=void 0;Kn.ChannelsConsumer=class{constructor(e){this.channel=e,this.getExposedFunctions=async e=>{const{id:t}=e,{props:n}=await this.channel.dispatch(`api-meta:${t}`);return n},this.createFunction=e=>(...t)=>{const{action:n}=e.options;return this.channel.dispatch(n,{args:t})}}};var qn={};Object.defineProperty(qn,"__esModule",{value:!0}),qn.ChannelsExposer=void 0;qn.ChannelsExposer=class{constructor(e){this.channelProviderOrClient=e,this.exposeFunction=async(e,t)=>{const{key:n,options:i,meta:r}=t,{id:o}=r,s=`${o}.${i?.action||n}`;return await this.channelProviderOrClient.register(s,(async({args:t})=>e(...t))),{action:s}},this.exposeMeta=async({id:e},t)=>{const n=`api-meta:${e}`;await this.channelProviderOrClient.register(n,(()=>({props:t})))}}},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Kn,e),n(qn,e)}(zn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(zn,e)}(Vn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Wn,e),n(Hn,e),n(Vn,e),n(Nn,e)}(Gn);var Jn={};Object.defineProperty(Jn,"__esModule",{value:!0}),Jn.createRelayedDispatch=exports.relayChannelClientApi_1=Jn.relayChannelClientApi=void 0;const Yn=["no longer connected","RTCDataChannel closed unexpectedly","The client you are trying to dispatch from is disconnected from the target provider"];exports.relayChannelClientApi_1=Jn.relayChannelClientApi=async(e,t)=>{e.register(`relay:${t}`,(({action:t,target:n,payload:i})=>e.dispatch(n,t,i))),await Promise.resolve()};Jn.createRelayedDispatch=(e,t,n,i)=>async(r,o)=>{try{return await e.dispatch(`relay:${n}`,{action:r,payload:o,target:t})}catch(e){if(s=e.message,Yn.some((e=>s.includes(e)))&&i)throw new Error(i);throw e}var s};var Zn,Qn,Xn,ei=s&&s.__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},ti=s&&s.__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)};Object.defineProperty(Bn,"__esModule",{value:!0}),Bn.ColumnOrRow=Bn.TabStack=Bn.LayoutNode=void 0;const ni=Gn,ii=Jn;class ri{constructor(e,t){Zn.set(this,void 0),this.isRoot=()=>ti(this,Zn,"f").isRoot(this.entityId),this.exists=()=>ti(this,Zn,"f").exists(this.entityId),this.getParent=async()=>{const e=await ti(this,Zn,"f").getParent(this.entityId);if(e)return ri.getEntity(e,ti(this,Zn,"f"))},this.createAdjacentStack=async(e,t)=>{const n=await ti(this,Zn,"f").createAdjacentStack(this.entityId,e,t);return ri.getEntity({entityId:n,type:"stack"},ti(this,Zn,"f"))},this.getAdjacentStacks=async e=>(await ti(this,Zn,"f").getAdjacentStacks({targetId:this.entityId,edge:e})).map((e=>ri.getEntity({type:"stack",entityId:e.entityId},ti(this,Zn,"f")))),ei(this,Zn,e,"f"),this.entityId=t}}Bn.LayoutNode=ri,Zn=new WeakMap,ri.newLayoutEntitiesClient=async(e,t,n)=>{const i=(0,ii.createRelayedDispatch)(e,n,"layout-relay","You are trying to interact with a layout component on a window that does not exist or has been destroyed.");return new ni.ApiConsumer(new ni.ChannelsConsumer({dispatch:i})).consume({id:t})},ri.getEntity=(e,t)=>{const{entityId:n,type:i}=e;switch(i){case"column":case"row":return new si(t,n,i);case"stack":return new oi(t,n);default:throw new Error(`Unrecognised Layout Entity encountered ('${JSON.stringify(e)})`)}};class oi extends ri{constructor(e,t){super(e,t),Qn.set(this,void 0),this.type="stack",this.getViews=()=>ti(this,Qn,"f").getStackViews(this.entityId),this.addView=async(e,t={index:0})=>ti(this,Qn,"f").addViewToStack(this.entityId,e,t),this.removeView=async e=>{await ti(this,Qn,"f").removeViewFromStack(this.entityId,e)},this.setActiveView=async e=>{await ti(this,Qn,"f").setStackActiveView(this.entityId,e)},ei(this,Qn,e,"f")}}Bn.TabStack=oi,Qn=new WeakMap;class si extends ri{constructor(e,t,n){super(e,t),Xn.set(this,void 0),this.getContent=async()=>(await ti(this,Xn,"f").getContent(this.entityId)).map((e=>ri.getEntity(e,ti(this,Xn,"f")))),ei(this,Xn,e,"f"),this.type=n}}Bn.ColumnOrRow=si,Xn=new WeakMap;var ai={};Object.defineProperty(ai,"__esModule",{value:!0}),ai.DEFAULT_LAYOUT_KEY=ai.LAYOUT_CONTROLLER_ID=void 0,ai.LAYOUT_CONTROLLER_ID="layout-entities",ai.DEFAULT_LAYOUT_KEY="__default__";var ci,di,hi,li=s&&s.__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)};Object.defineProperty(Ln,"__esModule",{value:!0}),Ln.Layout=void 0;const ui=G,pi=O,wi=d,yi=Tn,fi=Bn,gi=ai;class mi extends wi.Base{static getClient(e){return li(e,di,"f").getValue()}constructor(e,t){super(t),ci.add(this),di.set(this,new ui.Lazy((async()=>fi.LayoutNode.newLayoutEntitiesClient(await this.platform.getClient(),gi.LAYOUT_CONTROLLER_ID,this.identity)))),this.replace=async e=>{this.wire.sendAction("layout-replace").catch((e=>{}));const t=await this.platform.getClient();await t.dispatch("replace-layout",{target:this.identity,opts:{layout:e}})},this.replaceView=async(e,t)=>{this.wire.sendAction("layout-replace-view").catch((e=>{}));const n=await this.platform.getClient();await n.dispatch("replace-view",{target:this.identity,opts:{viewToReplace:e,newView:t}})},this.applyPreset=async e=>{this.wire.sendAction("layout-apply-preset").catch((e=>{}));const t=await this.platform.getClient(),{presetType:n}=e;if(!n||!(0,yi.isValidPresetType)(n))throw new Error("Cannot apply preset layout, please include an applicable presetType property in the PresetLayoutOptions.");await t.dispatch("apply-preset-layout",{target:this.identity,opts:{presetType:n}})};const n=(0,pi.validateIdentity)(e);if(n)throw new Error(n);this.identity=e,this.platform=this.fin.Platform.wrapSync({uuid:e.uuid}),e.uuid===this.fin.me.uuid&&e.name===this.fin.me.name&&(this.init=this.fin.Platform.Layout.init)}async getConfig(){this.wire.sendAction("layout-get-config").catch((e=>{}));return(await this.platform.getClient()).dispatch("get-frame-snapshot",{target:this.identity})}async getCurrentViews(){this.wire.sendAction("layout-get-views").catch((e=>{}));const e=await this.platform.getClient();return(await e.dispatch("get-layout-views",{target:this.identity})).map((e=>this.fin.View.wrapSync(e)))}async getRootItem(){this.wire.sendAction("layout-get-root-item").catch((()=>{}));const e=await li(this,di,"f").getValue(),t=await e.getRoot("layoutName"in this.identity?this.identity:void 0);return fi.LayoutNode.getEntity(t,e)}async getStackByViewIdentity(e){this.wire.sendAction("layout-get-stack-by-view").catch((()=>{}));const t=await li(this,di,"f").getValue(),n=await t.getStackByView(e);if(!n)throw new Error(`No stack found for view: ${e.uuid}/${e.name}`);return fi.LayoutNode.getEntity(n,t)}async addView(e,{location:t,targetView:n}={}){this.wire.sendAction("layout-add-view").catch((e=>{}));const{identity:i}=await li(this,ci,"m",hi).call(this,"layout-add-view",{viewOptions:e,location:t,targetView:n});return{identity:i}}async closeView(e){this.wire.sendAction("layout-close-view").catch((e=>{})),await li(this,ci,"m",hi).call(this,"layout-close-view",{viewIdentity:e})}}Ln.Layout=mi,di=new WeakMap,ci=new WeakSet,hi=async function(e,t){return(await this.platform.getClient()).dispatch(e,{target:this.identity,opts:t})};var vi,Ci,bi,Ii,Ei,xi=s&&s.__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)},Ai=s&&s.__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};Object.defineProperty(kn,"__esModule",{value:!0}),kn.LayoutModule=void 0;const Pi=d,Mi=Ln,_i=ai;class Oi extends Pi.Base{constructor(){super(...arguments),vi.add(this),Ci.set(this,!1),bi.set(this,null),this.init=async(e={})=>{if(this.wire.sendAction("layout-init").catch((e=>{})),!this.wire.environment.layoutAllowedInContext(this.fin))throw new Error("Layout.init can only be called from a Window context.");if(xi(this,Ci,"f"))throw new Error("Layout.init was already called, please use Layout.create to add additional layouts.");"openfin"===this.wire.environment.type&&await this.fin.Platform.getCurrentSync().getClient(),Ai(this,Ci,!0,"f"),Ai(this,bi,await this.wire.environment.initLayoutManager(this.fin,this.wire,e),"f"),await this.wire.environment.applyLayoutSnapshot(this.fin,xi(this,bi,"f"),e);const t={name:this.fin.me.name,uuid:this.fin.me.uuid};if(!e.layoutManagerOverride){const e={layoutName:_i.DEFAULT_LAYOUT_KEY,...t};return xi(this,Ii,"f").call(this,e)}return this.wrapSync(t)},Ii.set(this,(e=>{const t="[Layout] You are using a deprecated property `layoutManager` - it will throw if you access it starting in v37.",n=new Proxy({},{get(e,n){throw console.warn(`[Layout-mgr-proxy] accessing ${n.toString()}`),new Error(t)}}),i=Object.assign(this.wrapSync(e),{layoutManager:n});return new Proxy(i,{get(e,n){if("layoutManager"===n)throw console.warn(`[Layout-proxy] accessing ${n.toString()}`),new Error(t);return e[n]}})})),this.getCurrentLayoutManagerSync=()=>xi(this,vi,"m",Ei).call(this,"fin.Platform.Layout.getCurrentLayoutManagerSync()"),this.create=async e=>this.wire.environment.createLayout(xi(this,vi,"m",Ei).call(this,"fin.Platform.Layout.create()"),e),this.destroy=async e=>this.wire.environment.destroyLayout(xi(this,vi,"m",Ei).call(this,"fin.Platform.Layout.destroy()"),e)}async wrap(e){return this.wire.sendAction("layout-wrap").catch((e=>{})),new Mi.Layout(e,this.wire)}wrapSync(e){return this.wire.sendAction("layout-wrap-sync").catch((e=>{})),new Mi.Layout(e,this.wire)}async getCurrent(){if(this.wire.sendAction("layout-get-current").catch((e=>{})),"openfin"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error("You are not in a Window context. Only Windows can have a Layout.");const{uuid:e,name:t}=this.fin.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction("layout-get-current-sync").catch((e=>{})),"openfin"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error("You are not in a Window context. Only Windows can have a Layout.");const{uuid:e,name:t}=this.fin.me;return this.wrapSync({uuid:e,name:t})}async getLayoutByViewIdentity(e){this.wire.sendAction("layout-get-by-view-identity").catch((()=>{}));let t=await this.wire.environment.getViewWindowIdentity(this.fin,e);t.identity&&(t=t.identity);try{const n=this.wrapSync(t),i=await Mi.Layout.getClient(n),r=await i.getLayoutIdentityForViewOrThrow(e);return this.wrapSync(r)}catch(n){if(!["No action registered at target for","getLayoutIdentityForViewOrThrow is not a function"].some((e=>n.message.includes(e))))throw n;if(t.uuid===t.name)throw new Error(`View identity ${JSON.stringify(e)} is not attached to any layout in provider window ${JSON.stringify(t)}.`);return this.wrapSync(t)}}}kn.LayoutModule=Oi,Ci=new WeakMap,bi=new WeakMap,Ii=new WeakMap,vi=new WeakSet,Ei=function(e){if(!xi(this,bi,"f"))throw new Error(`You must call init before using the API ${e}`);return xi(this,bi,"f")},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(kn,e),n(Ln,e)}(jn),Object.defineProperty(Pn,"__esModule",{value:!0}),Pn.PlatformModule=void 0;const Si=d,Ri=Mn,Fi=jn;class ji extends Si.Base{constructor(e,t){super(e),this._channel=t,this.Layout=new Fi.LayoutModule(this.wire)}async init(e){if(!fin.__internal_.isPlatform||fin.me.name!==fin.me.uuid)throw new Error("fin.Platform.init should only be called from a custom platform provider running in the main window of the application.");return this.wire.environment.initPlatform(this.fin,e)}async wrap(e){return this.wire.sendAction("platform-wrap").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}wrapSync(e){return this.wire.sendAction("platform-wrap-sync").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}async getCurrent(){return this.wire.sendAction("platform-get-current").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction("platform-get-current-sync").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}start(e){return this.wire.sendAction("platform-start").catch((e=>{})),new Promise((async(t,n)=>{try{const{uuid:n}=e,i=await this.fin.Application._create({...e,isPlatformController:!0});i.once("platform-api-ready",(()=>t(this.wrapSync({uuid:n})))),i._run({uuid:n})}catch(e){n(e)}}))}startFromManifest(e,t){return this.wire.sendAction("platform-start-from-manifest").catch((e=>{})),new Promise((async(n,i)=>{try{const i=await this.fin.Application._createFromManifest(e);i.once("platform-api-ready",(()=>n(this.wrapSync({uuid:i.identity.uuid})))),i._run(t)}catch(e){i(e)}}))}}Pn.PlatformModule=ji,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Pn,e),n(Mn,e)}(An);var ki={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getMe=e.getBaseMe=e.environmentUnsupportedMessage=void 0;const t=J(),n=un,i=ie(),r=rn;function o(e,t,n){return{...{isView:"view"===e,isWindow:"window"===e,isFrame:"iframe"===e,isExternal:"external connection"===e},uuid:t,name:n,entityType:e}}e.environmentUnsupportedMessage="You are not running in OpenFin.",e.getBaseMe=o,e.getMe=function(s){const{uuid:a,name:c,entityType:d}=s.me,h={setContext(){throw new Error(e.environmentUnsupportedMessage)},addContextHandler(){throw new Error(e.environmentUnsupportedMessage)},getContextGroups(){throw new Error(e.environmentUnsupportedMessage)},joinContextGroup(){throw new Error(e.environmentUnsupportedMessage)},removeFromContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getAllClientsInContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getInfoForContextGroup(){throw new Error(e.environmentUnsupportedMessage)}},l="Interop API has not been instantiated. Either connection has failed or you have not declared interop in your config.",u={setContext(){throw new Error(l)},addContextHandler(){throw new Error(l)},getContextGroups(){throw new Error(l)},joinContextGroup(){throw new Error(l)},removeFromContextGroup(){throw new Error(l)},getAllClientsInContextGroup(){throw new Error(l)},getInfoForContextGroup(){throw new Error(l)}},p={eventNames:()=>{throw new Error(e.environmentUnsupportedMessage)},emit:()=>{throw new Error(e.environmentUnsupportedMessage)},listeners:()=>{throw new Error(e.environmentUnsupportedMessage)},listenerCount:()=>{throw new Error(e.environmentUnsupportedMessage)},on:()=>{throw new Error(e.environmentUnsupportedMessage)},addListener:()=>{throw new Error(e.environmentUnsupportedMessage)},once:()=>{throw new Error(e.environmentUnsupportedMessage)},prependListener:()=>{throw new Error(e.environmentUnsupportedMessage)},prependOnceListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeAllListeners:()=>{throw new Error(e.environmentUnsupportedMessage)}};switch(d){case"view":return Object.assign(new t.View(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case"window":return Object.assign(new i._Window(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case"iframe":return Object.assign(new n._Frame(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case"external connection":return Object.assign(new r.ExternalApplication(s,{uuid:a}),o(d,a,c),{interop:u,isOpenFin:!1});default:return{...o(d,a,c),...p,interop:h,isOpenFin:!1}}}}(ki);var Li={},Ti={},$i={};Object.defineProperty($i,"__esModule",{value:!0}),$i.createWarningObject=$i.createUnusableObject=void 0,$i.createUnusableObject=function(e){const t=()=>{throw new Error(e)};return new Proxy({},{apply:t,construct:t,defineProperty:t,deleteProperty:t,get:t,getOwnPropertyDescriptor:t,getPrototypeOf:t,has:t,isExtensible:t,ownKeys:t,preventExtensions:t,set:t,setPrototypeOf:t})},$i.createWarningObject=function(e,t){return new Proxy(t,{get:(...t)=>(console.warn(e),Reflect.get(...t)),set:(...t)=>(console.warn(e),Reflect.set(...t)),getOwnPropertyDescriptor:(...t)=>(console.warn(e),Reflect.getOwnPropertyDescriptor(...t)),ownKeys:(...t)=>(console.warn(e),Reflect.ownKeys(...t))})};var Bi,Gi={},Wi={};var Hi={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.wrapIntentHandler=e.BROKER_ERRORS=e.generateOverrideWarning=e.generateOverrideError=e.wrapContextHandler=e.wrapInTryCatch=e.generateId=void 0;e.generateId=()=>`${Math.random()}${Date.now()}`;e.wrapInTryCatch=(e,t)=>(...n)=>{try{return e(...n)}catch(e){throw new Error((t||"")+e)}};e.wrapContextHandler=(e,t)=>async n=>{try{await e(n)}catch(e){throw console.error(`Error thrown by handler ${t} for context type ${n.type}: ${e}`),e}};e.generateOverrideError=(e,t)=>`You have tried to to use ${e} but ${t} has not been overridden in the Interop Broker. Please override this function. Refer to our documentation for more info.`;e.generateOverrideWarning=(e,t,n,i)=>{const{uuid:r,name:o}=n;return i?`Entity with identity: ${r}/${o} has called ${i} or ${e} but ${t} has not been overridden.`:`Entity with identity: ${r}/${o} has called ${e} but ${t} has not been overridden.`},e.BROKER_ERRORS={fireIntent:(0,e.generateOverrideError)("fireIntent","handleFiredIntent"),fireIntentForContext:(0,e.generateOverrideError)("fireIntentForContext","handleFiredIntentForContext"),getInfoForIntent:(0,e.generateOverrideError)("getInfoForIntent","handleInfoForIntent"),getInfoForIntentsByContext:(0,e.generateOverrideError)("getInfoForIntentsByContext","handleInfoForIntentsByContext"),joinSessionContextGroupWithJoinContextGroup:"The Context Group you have tried to join is a Session Context Group. Custom Context Groups can only be defined by the Interop Broker through code or manifest configuration. Please use joinSessionContextGroup.",fdc3Open:(0,e.generateOverrideError)("fdc3.open","fdc3HandleOpen"),fdc3FindInstances:(0,e.generateOverrideError)("fdc3.findInstances","fdc3HandleFindInstances"),fdc3GetAppMetadata:(0,e.generateOverrideError)("fdc3.getAppMetadata","fdc3HandleGetAppMetadata"),fdc3GetInfo:(0,e.generateOverrideError)("fdc3.getInfo","fdc3HandleGetInfo")};e.wrapIntentHandler=(e,t)=>async n=>{try{return e(n)}catch(e){throw console.error(`Error thrown by handler ${t}: ${e}`),e}}}(Hi);var Ni,Di,Ui={};function Vi(){if(Di)return Gi;Di=1;var e,t,n,r=s&&s.__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},o=s&&s.__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)},a=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Gi,"__esModule",{value:!0}),Gi.InteropBroker=void 0;const c=d,h=a(function(){if(Bi)return Wi;Bi=1,Object.defineProperty(Wi,"__esModule",{value:!0});const e=Cr();return Wi.default=class{constructor(e,t){this.provider=e,this.id=t,this.lastContext=void 0,this.contextGroupMap=new Map,this.clients=new Map,this.registerListeners()}registerListeners(){this.provider.register(`sessionContextGroup:getContext-${this.id}`,this.getCurrentContext.bind(this)),this.provider.register(`sessionContextGroup:setContext-${this.id}`,this.setContext.bind(this)),this.provider.register(`sessionContextGroup:handlerAdded-${this.id}`,this.handlerAdded.bind(this)),this.provider.register(`sessionContextGroup:handlerRemoved-${this.id}`,this.handlerRemoved.bind(this))}getCurrentContext(e){return e.type?this.contextGroupMap.get(e.type):this.lastContext}setContext(t,n){const{context:i}=t,r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name} not in Session Client State Map`);this.contextGroupMap.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{e.contextHandlers.get(i.type)?.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getClientState(e){return this.clients.get(e.endpointId)}async handlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(i){const e=r.contextHandlers.get(i)||[];r.contextHandlers.set(i,[...e,n]);const o=this.contextGroupMap.get(i);o&&await this.provider.dispatch(t,n,o)}else{r.globalHandler=n;const e=[...this.contextGroupMap.keys()].map((async e=>{const i=this.contextGroupMap.get(e);i&&await this.provider.dispatch(t,n,i)}));await Promise.all(e)}}handlerRemoved(e,t){const{handlerId:n}=e,i=this.clients.get(t.endpointId);i?(Array.from(i.contextHandlers).forEach((([,e])=>{const t=e.indexOf(n);t>-1&&e.splice(t,1)})),i.globalHandler===n&&(i.globalHandler=void 0)):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={contextHandlers:new Map,clientIdentity:e,globalHandler:void 0};this.clients.set(e.endpointId,t)}}onDisconnection(e){this.clients.delete(e.endpointId)}},Wi}()),l=Hi,u=a(i),p=function(){if(Ni)return Ui;Ni=1,Object.defineProperty(Ui,"__esModule",{value:!0}),Ui.PrivateChannelProvider=void 0;const e=Vi();return Ui.PrivateChannelProvider=class t{constructor(e,t){this.provider=e,this.id=t,this.clients=new Map,this.registerListeners(),this.contextByContextType=new Map,this.lastContext=void 0,this.provider.onConnection((e=>this.registerNewClient(e))),this.provider.onDisconnection((async e=>{const{endpointId:t}=e;this.clients.has(t)&&await this.handleClientDisconnecting(e),0===(await this.provider.getAllClientInfo()).length&&this.provider.destroy()}))}getClientState(e){return this.clients.get(e.endpointId)}registerListeners(){this.provider.register("broadcast",this.broadcast.bind(this)),this.provider.register("getCurrentContext",this.getCurrentContext.bind(this)),this.provider.register("contextHandlerAdded",this.contextHandlerAdded.bind(this)),this.provider.register("contextHandlerRemoved",this.contextHandlerRemoved.bind(this)),this.provider.register("nonStandardHandlerRemoved",this.nonStandardHandlerRemoved.bind(this)),this.provider.register("onAddContextHandlerAdded",this.onAddContextHandlerAdded.bind(this)),this.provider.register("onDisconnectHandlerAdded",this.onDisconnectHandlerAdded.bind(this)),this.provider.register("onUnsubscribeHandlerAdded",this.onUnsubscribeHandlerAdded.bind(this)),this.provider.register("clientDisconnecting",((e,t)=>{this.handleClientDisconnecting(t)}))}broadcast(t,n){const{context:i}=t;if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name}, tried to call broadcast, is not connected to this Private Channel`);const r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to broadcast - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);this.contextByContextType.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{const t=e.handlerIdsByContextTypes.get(i.type);t&&t.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getCurrentContext(e,t){const{contextType:n}=e;if(!this.getClientState(t))throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call getCurrentContext, is not connected to this Private Channel`);if(void 0!==n){return this.contextByContextType.get(n)||null}return this.lastContext?this.lastContext:null}contextHandlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call addContextListener, is not connected to this Private Channel`);if(i){const e=r.handlerIdsByContextTypes.get(i)||[];r.handlerIdsByContextTypes.set(i,[...e,n])}else r.globalHandler=n;Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&e.onAddContextListenerHandlerId&&this.provider.dispatch(e.clientIdentity,e.onAddContextListenerHandlerId,i)}))}async contextHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);if(i){let e;if(i.globalHandler===n)i.globalHandler=void 0;else for(const[t,r]of i.handlerIdsByContextTypes){const i=r.indexOf(n);i>-1&&(r.splice(i,1),e=t)}const r=(await this.getConnectedClients()).map((async n=>{const{clientIdentity:i,clientIdentity:{endpointId:r},onUnsubscribeHandlerId:o}=n;r!==t.endpointId&&o&&await this.provider.dispatch(i,o,e)}));try{await Promise.all(r)}catch(e){throw console.error(`Problem when attempting to dispatch to onUnsubscribeHandlers. Error: ${e} Removing Client: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}`),new Error(e)}}else console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}.`)}nonStandardHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);i?i.onDisconnectHandlerId===n?i.onDisconnectHandlerId=void 0:i.onAddContextListenerHandlerId===n?i.onAddContextListenerHandlerId=void 0:i.onUnsubscribeHandlerId===n&&(i.onUnsubscribeHandlerId=void 0):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}onAddContextHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onAddContextListener, is not connected to this Private Channel`);n.onAddContextListenerHandlerId=i,Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&Array.from(e.handlerIdsByContextTypes.keys()).forEach((e=>{this.provider.dispatch(t,i,e)}))}))}onDisconnectHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onDisconnect, is not connected to this Private Channel`);n.onDisconnectHandlerId=i}onUnsubscribeHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onUnsubscribe, is not connected to this Private Channel`);n.onUnsubscribeHandlerId=i}removeClient(e){const t=this.getClientState(e);if(!t)throw new Error(`Client with Identity: ${e.uuid} ${e.name}, tried to call disconnect, is not connected to this Private Channel`);t.handlerIdsByContextTypes.clear(),this.clients.delete(e.endpointId)}async fireOnDisconnectForOtherClients(e){const{endpointId:t}=e,n=(await this.getConnectedClients()).map((async e=>{const{clientIdentity:{endpointId:n},onDisconnectHandlerId:i}=e;n!==t&&i&&await this.provider.dispatch(e.clientIdentity,i)}));try{await Promise.all(n)}catch(t){throw console.error(`Problem when attempting to dispatch to onDisconnectHandlers. Error: ${t} Disconnecting Client: uuid: ${e.uuid}. name: ${e.name}. endpointId: ${e.endpointId}`),new Error(t)}}async unsubscribeAll(e){const{endpointId:t}=e,n=this.clients.get(t);if(n){const t=Array.from(n.handlerIdsByContextTypes.values()).flat(),i=n.globalHandler;if(t.length>0){const n=t.map((async t=>this.contextHandlerRemoved({handlerId:t},e)));try{await Promise.all(n)}catch(e){console.error(e.message)}}if(i)try{await this.contextHandlerRemoved({handlerId:i},e)}catch(e){console.error(e.message)}}}async handleClientDisconnecting(e){await this.unsubscribeAll(e),this.removeClient(e),await this.fireOnDisconnectForOtherClients(e)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={clientIdentity:e,handlerIdsByContextTypes:new Map,globalHandler:void 0,onAddContextListenerHandlerId:void 0,onUnsubscribeHandlerId:void 0,onDisconnectHandlerId:void 0};this.clients.set(e.endpointId,t)}}async getConnectedClients(){const e=await this.provider.getAllClientInfo();return Array.from(this.clients.values()).filter((t=>{const{uuid:n,name:i}=t.clientIdentity;return e.some((e=>i===e.name&&n===e.uuid))}))}static init(e,n){return new t(e,n)}},Ui}(),w=G,y=[{id:"green",displayMetadata:{color:"#00CC88",name:"green"}},{id:"purple",displayMetadata:{color:"#8C61FF",name:"purple"}},{id:"orange",displayMetadata:{color:"#FF8C4C",name:"orange"}},{id:"red",displayMetadata:{color:"#FF5E60",name:"red"}},{id:"pink",displayMetadata:{color:"#FF8FB8",name:"pink"}},{id:"yellow",displayMetadata:{color:"#E9FF8F",name:"yellow"}}];let f=class i extends c.Base{constructor(i,s,a){super(i),e.set(this,void 0),t.set(this,void 0),n.set(this,void 0),this.getProvider=()=>o(this,n,"f").getValue(),this.interopClients=new Map,this.contextGroupsById=new Map,r(this,t,a.contextGroups??[...y],"f"),r(this,e,a.fdc3Info,"f"),a?.logging&&(this.logging=a.logging),this.intentClientMap=new Map,this.lastContextMap=new Map,this.sessionContextGroupMap=new Map,r(this,n,new w.Lazy(s),"f"),this.setContextGroupMap(),this.setupChannelProvider()}static createClosedConstructor(...e){return class extends i{constructor(...t){if(t.length){const[n,i,r]=t;if(r&&"object"==typeof r&&!(0,u.default)(r,e[2]))return console.warn("You have modified the parameters of the InteropOverride constructor. This behavior is deprecated and will be removed in a future version. You can modify these options in your manifest. Please consult our Interop docs for guidance on migrating to the new override scheme."),void super(e[0],e[1],r);console.warn("You are attempting to pass arguments to the InteropOverride constructor. This is not necessary, and these passed arguments will be ignored. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.")}super(...e)}}}setContext({context:e},t){this.wire.sendAction("interop-broker-set-context").catch((e=>{}));const n=this.getClientState(t);if(!n||!n.contextGroupId)throw n?new Error("You must join a context group before you can set context."):new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);{const{contextGroupId:t}=n;this.setContextForGroup({context:e},t)}}setContextForGroup({context:e},t){this.wire.sendAction("interop-broker-set-context-for-group").catch((e=>{}));const n=this.contextGroupsById.get(t);if(!n)throw new Error(`Unable to set context for context group that isn't in the context group mapping: ${t}.`);const r=i.checkContextIntegrity(e);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(e)}`);const o=e.type;n.set(o,e),this.lastContextMap.set(t,o);Array.from(this.interopClients.values()).filter((e=>e.contextGroupId===t)).forEach((t=>{for(const[,n]of t.contextHandlers)i.isContextTypeCompatible(o,n.contextType)&&this.invokeContextHandler(t.clientIdentity,n.handlerId,e)}))}getCurrentContext(e,t){this.wire.sendAction("interop-broker-get-current-context").catch((e=>{}));const n=this.getClientState(t);if(!n?.contextGroupId)throw new Error("You must be a member of a context group to call getCurrentContext");const{contextGroupId:i}=n,r=this.contextGroupsById.get(i),o=this.lastContextMap.get(i),s=e?.contextType??o;return r&&s?r.get(s):void 0}async joinContextGroup({contextGroupId:e,target:t},n){if(this.wire.sendAction("interop-broker-join-context-group").catch((e=>{})),this.sessionContextGroupMap.has(e))throw new Error(l.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup);if(t){i.hasEndpointId(t)&&await this.addClientToContextGroup({contextGroupId:e},t);try{const n=this.channel.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name));if(!n.length)throw new Error(`Given Identity ${t.uuid} ${t.name} is not connected to the Interop Broker.`);n.length>1&&console.warn(`More than one connection found for identity ${t.uuid} ${t.name}`);const i=[];for(const t of n)i.push(this.addClientToContextGroup({contextGroupId:e},t));await Promise.all(i)}catch(e){throw new Error(e)}}else await this.addClientToContextGroup({contextGroupId:e},n)}async addClientToContextGroup({contextGroupId:e},t){this.wire.sendAction("interop-broker-add-client-to-context-group").catch((e=>{}));const n=this.getClientState(t);if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(!this.getContextGroups().find((t=>t.id===e)))throw new Error(`Attempting to join a context group that does not exist: ${e}. You may only join existing context groups.`);if(n.contextGroupId!==e){n.contextGroupId=e,await this.setCurrentContextGroupInClientOptions(t,e);const i=this.contextGroupsById.get(e);for(const[,e]of n.contextHandlers){const{contextType:n,handlerId:r}=e;if(void 0===n)i.forEach(((e,n)=>{this.invokeContextHandler(t,r,e)}));else if(i.has(n)){const e=i.get(n);e&&this.invokeContextHandler(t,r,e)}}}}async removeFromContextGroup({target:e},t){if(this.wire.sendAction("interop-broker-remove-from-context-group").catch((e=>{})),e){i.hasEndpointId(e)&&await this.removeClientFromContextGroup(e);try{const t=this.channel.connections.filter((t=>t.uuid===e.uuid&&t.name===e.name));if(!t.length)throw new Error(`No connection found for given Identity ${e.uuid} ${e.name}`);t.length>1&&console.warn(`More than one connection found for identity ${e.uuid} ${e.name}`);const n=[];for(const e of t)n.push(this.removeClientFromContextGroup(e));await Promise.all(n)}catch(e){throw new Error(e)}}else await this.removeClientFromContextGroup(t)}async removeClientFromContextGroup(e){this.wire.sendAction("interop-broker-remove-client-from-context-group").catch((e=>{}));const t=this.getClientState(e);t&&(t.contextGroupId=void 0),await this.setCurrentContextGroupInClientOptions(e,null)}getContextGroups(){return this.wire.sendAction("interop-broker-get-context-groups").catch((e=>{})),o(this,t,"f").map((e=>({...e})))}getInfoForContextGroup({contextGroupId:e}){return this.wire.sendAction("interop-broker-get-info-for-context-group").catch((e=>{})),this.getContextGroups().find((t=>t.id===e))}getAllClientsInContextGroup({contextGroupId:e}){this.wire.sendAction("interop-broker-get-all-clients-in-context-group").catch((e=>{}));return Array.from(this.interopClients.values()).filter((t=>t.contextGroupId===e)).map((e=>e.clientIdentity))}async handleFiredIntent(e,t){const n=(0,l.generateOverrideWarning)("fdc3.raiseIntent","InteropBroker.handleFiredIntent",t,"interopClient.fireIntent");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntent)}async setIntentTarget(e,t){this.wire.sendAction("interop-broker-set-intent-target").catch((e=>{}));const n=this.intentClientMap.get(t.name),i=`intent-handler-${e.name}`;if(n){const t=n.get(i);if(t){if(t.pendingIntents.push(e),t.clientIdentity&&t.isReady){const{clientIdentity:e,pendingIntents:n}=t;try{const r=n[n.length-1];await this.invokeIntentHandler(e,i,r),t.pendingIntents=[]}catch(n){console.error(`Error invoking intent handler for client ${e.uuid}/${e.name}/${e.endpointId}`),t.isReady=!1}}}else n.set(i,{isReady:!1,pendingIntents:[e]})}else{this.intentClientMap.set(t.name,new Map);const n=this.intentClientMap.get(t.name);n&&n.set(i,{isReady:!1,pendingIntents:[e]})}}async handleInfoForIntent(e,t){const n=(0,l.generateOverrideWarning)("fdc3.findIntent","InteropBroker.handleInfoForIntent",t,"interopClient.getInfoForIntent");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntent)}async handleInfoForIntentsByContext(e,t){const n=(0,l.generateOverrideWarning)("fdc3.findIntentsByContext","InteropBroker.handleInfoForIntentsByContext",t,"interopClient.getInfoForIntentsByContext");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntentsByContext)}async handleFiredIntentForContext(e,t){const n=(0,l.generateOverrideWarning)("fdc3.raiseIntentForContext","InteropBroker.handleFiredIntentForContext",t,"interopClient.fireIntentForContext");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntentForContext)}async clientDisconnected(e){}async fdc3HandleOpen({app:e,context:t},n){const i=(0,l.generateOverrideWarning)("fdc3.open","InteropBroker.fdc3HandleOpen",n);throw console.warn(i),new Error(l.BROKER_ERRORS.fdc3Open)}async fdc3HandleFindInstances(e,t){const n=(0,l.generateOverrideWarning)("fdc3.open","InteropBroker.fdc3HandleFindInstances",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3FindInstances)}async fdc3HandleGetAppMetadata(e,t){const n=(0,l.generateOverrideWarning)("fdc3.getAppMetadata","InteropBroker.fdc3HandleGetAppMetadata",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3GetAppMetadata)}async invokeContextHandler(e,t,n){const i=await this.getProvider();try{await i.dispatch(e,t,n)}catch(i){console.error(`Error invoking context handler ${t} for context type ${n.type} in client ${e.uuid}/${e.name}/${e.endpointId}`,i)}}async invokeIntentHandler(e,t,n){const i=await this.getProvider();await i.dispatch(e,t,n)}async fdc3HandleGetInfo(t,n){const{fdc3Version:i}=t;return{fdc3Version:i,...o(this,e,"f"),optionalFeatures:{OriginatingAppMetadata:!1,UserChannelMembershipAPIs:!0},appMetadata:{appId:"",instanceId:""}}}async getAllClientInfo(){return(await this.getProvider()).getAllClientInfo()}decorateSnapshot(e){return{...e,interopSnapshotDetails:{contextGroupStates:this.getContextGroupStates()}}}applySnapshot(e,t){const n=e?.interopSnapshotDetails?.contextGroupStates;n&&(t?.closeExistingWindows||this.updateExistingClients(n),this.rehydrateContextGroupStates(n))}updateExistingClients(e){this.interopClients.forEach((t=>{const{clientIdentity:n,contextGroupId:r,contextHandlers:o}=t;if(r){const t=e[r];for(const[,e]of Object.entries(t))o.forEach((t=>{const{handlerId:r,contextType:o}=t;i.isContextTypeCompatible(e.type,o)&&this.invokeContextHandler(n,r,e)}))}}))}getContextGroupStates(){return i.toObject(this.contextGroupsById)}rehydrateContextGroupStates(e){const t=Object.entries(e);for(const[e,n]of t){const t=Object.entries(n);for(const[n,i]of t)if(this.contextGroupsById.has(e)){this.contextGroupsById.get(e).set(n,i)}else console.warn(`Attempting to set a context group that isn't in the context group mapping. Skipping context group rehydration for: ${e}`)}}contextHandlerRegistered({contextType:e,handlerId:t},n){const i={contextType:e,handlerId:t},r=this.getClientState(n);if(r?.contextHandlers.set(t,i),r&&r.contextGroupId){const{contextGroupId:i}=r,o=this.contextGroupsById.get(i);if(void 0===e)o.forEach(((e,i)=>{this.invokeContextHandler(n,t,e)}));else if(o.has(e)){const i=o.get(e);i&&this.invokeContextHandler(n,t,i)}}}async intentHandlerRegistered(e,t){const{handlerId:n}=e,i=this.intentClientMap.get(t.name),r=i?.get(n);if(i)if(r){const{pendingIntents:e}=r;r.clientIdentity=t,r.isReady=!0;try{if(e.length>0){const i=e[e.length-1];await this.invokeIntentHandler(t,n,i),r.pendingIntents=[]}}catch(e){console.error(`Error invoking intent handler: ${n} for client ${t.uuid}/${t.name}/${t.endpointId}`)}}else i.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t});else{this.intentClientMap.set(t.name,new Map);const e=this.intentClientMap.get(t.name);e&&e.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t})}}removeContextHandler({handlerId:e},t){const n=this.getClientState(t);n&&n.contextHandlers.delete(e)}handleJoinSessionContextGroup({sessionContextGroupId:e},t){try{if(!e)throw new Error("Failed to join session context group: must specify group id.");const n=this.sessionContextGroupMap.get(e);if(n)n.registerNewClient(t);else{const n=new h.default(this.channel,e);n.registerNewClient(t),this.sessionContextGroupMap.set(e,n)}return{hasConflict:this.contextGroupsById.has(e)}}catch(e){throw new Error(e)}}getClientState(e){return this.interopClients.get(e.endpointId)}static toObject(e){const t=Object.fromEntries(e),n={};return Object.entries(t).forEach((([e,t])=>{const i=Object.fromEntries(t);n[e]=i})),n}static checkContextIntegrity(e){if(!e)return{isValid:!1,reason:"No context supplied"};if("object"!=typeof e)return{isValid:!1,reason:"Context must be an Object"};if(!e.type)return{isValid:!1,reason:"Context must have a type property"};if(e.id&&"object"!=typeof e.id)return{isValid:!1,reason:"Context id must be an Object populated with key-value identifiers (if set)"};if(e.id){const{id:t}=e,n=Object.keys(t);let i=!1;if(!n.length)return{isValid:!1,reason:"Context id must have at least one key-value identifier"};if(n.forEach((e=>{"string"==typeof e&&"string"==typeof t[e]||(i=!0)})),i)return{isValid:!1,reason:"Context id key-value identifiers must be of type string"}}return e.name&&"string"!=typeof e.name?{isValid:!1,reason:"Context name must be of string type (if set)"}:{isValid:!0}}static hasEndpointId(e){return void 0!==e.endpointId}static isContextTypeCompatible(e,t){return void 0===t||e===t}setContextGroupMap(){for(const e of this.getContextGroups())this.contextGroupsById.set(e.id,new Map)}async setCurrentContextGroupInClientOptions(e,t){try{const n=await this.fin.System.getEntityInfo(e.uuid,e.name);let i;"view"===n.entityType?i=await this.fin.View.wrap(e):"window"===n.entityType&&(i=await this.fin.Window.wrap(e)),i&&await i.updateOptions({interop:{currentContextGroup:t}})}catch(e){}}async setupChannelProvider(){try{const e=await this.getProvider();this.channel=e,this.wireChannel(e)}catch(e){throw new Error(`Error setting up Interop Broker Channel Provider: ${e}`)}}wireChannel(e){e.onConnection((async(e,t)=>{if(!await this.isConnectionAuthorized(e,t))throw new Error(`Connection not authorized for ${e.uuid}, ${e.name}`);if(!e.endpointId)throw new Error("Version too old to be compatible with Interop. Please upgrade your runtime to a more recent version.");const n={contextGroupId:void 0,contextHandlers:new Map,clientIdentity:e};t?.currentContextGroup&&this.contextGroupsById.has(t.currentContextGroup)&&(n.contextGroupId=t?.currentContextGroup),this.interopClients.set(e.endpointId,n)})),e.onDisconnection((e=>{this.interopClients.delete(e.endpointId);const t=this.intentClientMap.get(e.name);t&&e.uuid===this.fin.me.uuid&&t.forEach((e=>{e.isReady=!1})),this.sessionContextGroupMap.forEach((t=>{t.onDisconnection(e)})),this.clientDisconnected(e)})),e.beforeAction((async(e,t,n)=>{if(!await this.isActionAuthorized(e,t,n))throw new Error(`Action (${e}) not authorized for ${n.uuid}, ${n.name}`);this.logging?.beforeAction?.enabled&&console.log(e,t,n)})),e.afterAction(((e,t,n)=>{this.logging?.afterAction?.enabled&&console.log(e,t,n)})),e.register("setContext",this.setContext.bind(this)),e.register("fireIntent",this.handleFiredIntent.bind(this)),e.register("getCurrentContext",this.getCurrentContext.bind(this)),e.register("getInfoForIntent",this.handleInfoForIntent.bind(this)),e.register("getInfoForIntentsByContext",this.handleInfoForIntentsByContext.bind(this)),e.register("fireIntentForContext",this.handleFiredIntentForContext.bind(this)),e.register("getContextGroups",this.getContextGroups.bind(this)),e.register("joinContextGroup",this.joinContextGroup.bind(this)),e.register("removeFromContextGroup",this.removeFromContextGroup.bind(this)),e.register("getAllClientsInContextGroup",this.getAllClientsInContextGroup.bind(this)),e.register("getInfoForContextGroup",this.getInfoForContextGroup.bind(this)),e.register("contextHandlerRegistered",this.contextHandlerRegistered.bind(this)),e.register("intentHandlerRegistered",this.intentHandlerRegistered.bind(this)),e.register("removeContextHandler",this.removeContextHandler.bind(this)),e.register("sessionContextGroup:createIfNeeded",this.handleJoinSessionContextGroup.bind(this)),e.register("fdc3Open",this.fdc3HandleOpen.bind(this)),e.register("fdc3v2FindIntentsByContext",this.handleInfoForIntentsByContext.bind(this)),e.register("fdc3FindInstances",this.fdc3HandleFindInstances.bind(this)),e.register("fdc3GetAppMetadata",this.fdc3HandleGetAppMetadata.bind(this)),e.register("fdc3v2GetInfo",(async(e,t)=>this.fdc3HandleGetInfo.bind(this)(e,t))),e.register("createPrivateChannelProvider",(async e=>{const{channelId:t}=e,n=await this.fin.InterApplicationBus.Channel.create(t);p.PrivateChannelProvider.init(n,t)}))}isConnectionAuthorized(e,t){return this.wire.sendAction("interop-broker-is-connection-authorized").catch((e=>{})),Promise.resolve(!0)}isActionAuthorized(e,t,n){return this.wire.sendAction("interop-broker-is-action-authorized").catch((e=>{})),Promise.resolve(!0)}};return Gi.InteropBroker=f,e=new WeakMap,t=new WeakMap,n=new WeakMap,Gi}var zi,Ki={},qi={},Ji=s&&s.__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},Yi=s&&s.__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)};Object.defineProperty(qi,"__esModule",{value:!0});const Zi=d,Qi=Hi;class Xi extends Zi.Base{constructor(e,t,n){super(e),zi.set(this,void 0),this.id=n,Ji(this,zi,t,"f")}async setContext(e){this.wire.sendAction("interop-session-context-group-set-context").catch((e=>{}));return(await Yi(this,zi,"f")).dispatch(`sessionContextGroup:setContext-${this.id}`,{sessionContextGroupId:this.id,context:e})}async getCurrentContext(e){this.wire.sendAction("interop-session-context-group-get-context").catch((e=>{}));return(await Yi(this,zi,"f")).dispatch(`sessionContextGroup:getContext-${this.id}`,{sessionContextGroupId:this.id,type:e})}async addContextHandler(e,t){if(this.wire.sendAction("interop-session-context-group-add-handler").catch((e=>{})),"function"!=typeof e)throw new Error("Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");const n=await Yi(this,zi,"f");let i;return i=t?`sessionContextHandler:invoke-${this.id}-${t}-${(0,Qi.generateId)()}`:`sessionContextHandler:invoke-${this.id}`,n.register(i,(0,Qi.wrapContextHandler)(e,i)),await n.dispatch(`sessionContextGroup:handlerAdded-${this.id}`,{handlerId:i,contextType:t}),{unsubscribe:await this.createUnsubscribeCb(i)}}async createUnsubscribeCb(e){const t=await Yi(this,zi,"f");return async()=>{t.remove(e),await t.dispatch(`sessionContextGroup:handlerRemoved-${this.id}`,{handlerId:e})}}getUserInstance(){return{id:this.id,setContext:(0,Qi.wrapInTryCatch)(this.setContext.bind(this),"Failed to set context: "),getCurrentContext:(0,Qi.wrapInTryCatch)(this.getCurrentContext.bind(this),"Failed to get context: "),addContextHandler:(0,Qi.wrapInTryCatch)(this.addContextHandler.bind(this),"Failed to add context handler: ")}}}qi.default=Xi,zi=new WeakMap;var er={},tr={},nr={},ir={},rr=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),or=s&&s.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),sr=s&&s.__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)&&rr(t,e,n);return or(t,e),t};Object.defineProperty(ir,"__esModule",{value:!0}),ir.PrivateChannelClient=void 0;const ar=sr(Hi);var cr,dr;function hr(){if(cr)return tr;cr=1;var e,t=s&&s.__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)},n=s&&s.__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},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(tr,"__esModule",{value:!0}),tr.FDC3ModuleBase=void 0;const o=nr,a=Hi,c=wr(),d=r(i);return tr.FDC3ModuleBase=class{get client(){return t(this,e,"f").call(this)}get fin(){return this.wire.getFin()}constructor(t,i){this.wire=i,e.set(this,void 0),n(this,e,t,"f")}async broadcast(e){return this.wire.sendAction("fdc3-broadcast").catch((e=>{})),this.client.setContext(e)}async _open(e,t){this.wire.sendAction("fdc3-open").catch((e=>{}));try{return await c.InteropClient.ferryFdc3Call(this.client,"fdc3Open",{app:e,context:t})}catch(e){const t=e.message===a.BROKER_ERRORS.fdc3Open?"ResolverUnavailable":e.message;throw new Error(t)}}async _getChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:"system",...(0,o.getUnsupportedChannelApis)()})))}async getOrCreateChannel(e){this.wire.sendAction("fdc3-get-or-create-channel").catch((e=>{}));const t=(await this._getChannels()).find((t=>t.id===e));if(t)return{...t,type:"system",...(0,o.getUnsupportedChannelApis)()};try{const t=await this.client.joinSessionContextGroup(e);return(0,o.buildAppChannelObject)(t)}catch(e){throw console.error(e.message),new Error(o.ChannelError.CreationFailed)}}async getSystemChannels(){return this.wire.sendAction("fdc3-get-system-channels").catch((e=>{})),this._getChannels()}async joinChannel(e){this.wire.sendAction("fdc3-join-channel").catch((e=>{}));try{return await this.client.joinContextGroup(e)}catch(e){if(e.message===a.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup?console.error("The Channel you have tried to join is an App Channel. Custom Channels can only be defined by the Interop Broker through code or manifest configuration. Please use getOrCreateChannel."):console.error(e.message),e.message.startsWith("Attempting to join a context group that does not exist"))throw new Error(o.ChannelError.NoChannelFound);throw new Error(o.ChannelError.AccessDenied)}}async getCurrentChannel(){this.wire.sendAction("fdc3-get-current-channel").catch((e=>{}));const e=await this.getCurrentContextGroupInfo();return e?this.buildChannelObject(e):null}async leaveCurrentChannel(){return this.wire.sendAction("fdc3-leave-current-channel").catch((e=>{})),this.client.removeFromContextGroup()}async getCurrentContextGroupInfo(){const e=await this.client.getContextGroups(),t=e.map((async e=>this.client.getAllClientsInContextGroup(e.id))),n=(await Promise.all(t)).findIndex((e=>e.some((e=>{const{uuid:t,name:n}=e;return this.wire.me.uuid===t&&this.wire.me.name===n}))));return e[n]}async buildChannelObject(e){return{...e,type:"system",addContextListener:(...[e,t])=>{let n,i;"function"==typeof e?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),n=e):(n=t,"string"==typeof e&&(i=e));const r=(async()=>{let e=!0;const t=await this.client.getCurrentContext(i);return this.client.addContextHandler(((i,r)=>{if(!e||(e=!1,!(0,d.default)(t,i)))return n(i,r)}),i)})();return{...r,unsubscribe:()=>r.then((e=>e.unsubscribe()))}},broadcast:this.broadcast.bind(this),getCurrentContext:async e=>{const t=await this.client.getCurrentContext(e);return void 0===t?null:t}}}},e=new WeakMap,tr}ir.PrivateChannelClient=class{constructor(e,t){this.id=t,this.client=e,this.listeners=new Map}async broadcast(e){return this.client.dispatch("broadcast",{context:e})}async getCurrentContext(e){return this.client.dispatch("getCurrentContext",{contextType:e})}async addContextListener(e,t){if("function"!=typeof t)throw new Error("Non-function argument passed to the second parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");let n;n=e?`contextHandler:invoke-${this.id}-${e}-${ar.generateId()}`:`contextHandler:invoke-${this.id}-${ar.generateId()}`,this.client.register(n,ar.wrapContextHandler(t,n));const i={unsubscribe:await this.createContextUnsubscribeCb(n)};return this.listeners.set(n,i),await this.client.dispatch("contextHandlerAdded",{handlerId:n,contextType:e}),i}createNonStandardUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch("nonStandardHandlerRemoved",{handlerId:e})}}createContextUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch("contextHandlerRemoved",{handlerId:e})}}onAddContextListener(e){const t=`onContextHandlerAdded:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch("onAddContextHandlerAdded",{handlerId:t}),n}onDisconnect(e){const t=`onDisconnect:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch("onDisconnectHandlerAdded",{handlerId:t}),n}onUnsubscribe(e){const t=`onUnsubscribe:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch("onUnsubscribeHandlerAdded",{handlerId:t}),n}async cleanUpAllSubs(){Array.from(this.listeners.keys()).forEach((e=>{this.client.remove(e),this.listeners.delete(e)}))}async disconnect(){try{await this.client.dispatch("clientDisconnecting"),await this.cleanUpAllSubs(),await this.client.disconnect()}catch(e){throw new Error(e.message)}}},function(e){var t=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.getIntentResolution=e.isChannel=e.isContext=e.connectPrivateChannel=e.buildAppChannelObject=e.buildPrivateChannelObject=e.ChannelError=e.ResultError=e.UnsupportedChannelApiError=e.getUnsupportedChannelApis=void 0;const n=Hi,r=ir,o=t(i);e.getUnsupportedChannelApis=e=>({addContextListener:()=>{throw new a("Channel.addContextListener",e)},broadcast:()=>{throw new a("Channel.broadcast",e)},getCurrentContext:()=>{throw new a("Channel.getCurrentContext",e)}});class a extends Error{constructor(e,t="System"){super(e),this.message=`Calling ${e} on an instance of a ${t} Channel returned by fdc3.get${t}Channels is not supported. If you would like to use a ${t} Channel, please use fdc3.joinChannel, fdc3.addContextListener, and fdc3.broadcast instead.`}}var c,d;e.UnsupportedChannelApiError=a,function(e){e.NoResultReturned="NoResultReturned",e.IntentHandlerRejected="IntentHandlerRejected"}(c=e.ResultError||(e.ResultError={})),(d=e.ChannelError||(e.ChannelError={})).NoChannelFound="NoChannelFound",d.AccessDenied="AccessDenied",d.CreationFailed="CreationFailed";e.buildPrivateChannelObject=e=>{let t=!1;const n=()=>{if(t)throw new Error("Private Channel Client has been disconnected from the Private Channel")};return{id:e.id,type:"private",broadcast:async t=>(n(),e.broadcast(t)),getCurrentContext:async t=>(n(),e.getCurrentContext(t)),addContextListener:async(t,i)=>{n();let r=i,o=t;"function"==typeof t&&(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),r=t,o=null);return e.addContextListener(o,r)},onAddContextListener:t=>(n(),e.onAddContextListener(t)),disconnect:async()=>(n(),t=!0,e.disconnect()),onDisconnect:t=>(n(),e.onDisconnect(t)),onUnsubscribe:t=>(n(),e.onUnsubscribe(t))}};e.buildAppChannelObject=e=>({id:e.id,type:"app",broadcast:e.setContext,getCurrentContext:async t=>{const n=await e.getCurrentContext(t);return void 0===n?null:n},addContextListener:(t,n)=>{let i,r;"function"==typeof t?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),i=t):(i=n,"string"==typeof t&&(r=t));const s=(async()=>{let t=!0;const n=await e.getCurrentContext(r);return e.addContextHandler(((e,r)=>{if(!t||(t=!1,!(0,o.default)(n,e)))return i(e,r)}),r)})();return{...s,unsubscribe:()=>s.then((e=>e.unsubscribe()))}}});e.connectPrivateChannel=async t=>{try{const n=await fin.InterApplicationBus.Channel.connect(t),i=new r.PrivateChannelClient(n,t);return(0,e.buildPrivateChannelObject)(i)}catch(e){throw new Error(`Private Channel with id: ${t} doesn't exist`)}};e.isContext=e=>{if(e&&"object"==typeof e&&"type"in e){const{type:t}=e;return"string"==typeof t}return!1};e.isChannel=e=>{if(e&&"object"==typeof e&&"type"in e&&"id"in e){const{type:t,id:n}=e;return"string"==typeof t&&"string"==typeof n&&("app"===t||"private"===t)}return!1};e.getIntentResolution=async(t,i,r,o)=>{const s=(0,n.generateId)(),a=new Promise(((e,t)=>{fin.InterApplicationBus.subscribe({uuid:"*"},s,(t=>{e(t)})).catch((()=>t(new Error("getResult is not supported in this environment"))))})),d=r?{target:r,intentResolutionResultId:s}:{intentResolutionResultId:s},h=o?{name:o,context:i,metadata:d}:{...i,metadata:d},l=async()=>{let n=await a;if(!n||"object"!=typeof n)throw new Error(c.NoResultReturned);const{error:i}=n;if(i)throw new Error(c.IntentHandlerRejected);if((0,e.isChannel)(n)){const{id:i,type:r}=n;switch(r){case"private":n=await(0,e.connectPrivateChannel)(i);break;case"app":{const r=await t.joinSessionContextGroup(i);n=(0,e.buildAppChannelObject)(r);break}}}else if(!(0,e.isContext)(n))throw new Error(c.NoResultReturned);return n},u=o?await t.fireIntent(h):await t.fireIntentForContext(h);return"object"!=typeof u?{source:{appId:"",instanceId:""},intent:"",version:"2.0",getResult:l}:{...u,getResult:l}}}(nr);var lr,ur,pr={};function wr(){if(ur)return Ki;ur=1;var e,t,n=s&&s.__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},i=s&&s.__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)},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ki,"__esModule",{value:!0}),Ki.InteropClient=void 0;const o=d,a=r(qi),c=function(){if(dr)return er;dr=1,Object.defineProperty(er,"__esModule",{value:!0}),er.Fdc3Module=void 0;const e=Hi,t=hr();class n extends t.FDC3ModuleBase{async open(e,t){await super._open(e,t)}addContextListener(e,t){let n;return this.wire.sendAction("fdc3-add-context-listener").catch((e=>{})),"function"==typeof e?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),n=this.client.addContextHandler(e)):n=this.client.addContextHandler(t,null===e?void 0:e),{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}addIntentListener(e,t){this.wire.sendAction("fdc3-add-intent-listener").catch((e=>{}));const n=this.client.registerIntentHandler((e=>{const{context:n,metadata:i}=e,{metadata:r}=n,o=i?.intentResolutionResultId||r?.intentResolutionResultId;o&&this.fin.InterApplicationBus.publish(o,null).catch((()=>null)),t(e.context)}),e,{fdc3Version:"1.2"});return{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}async raiseIntent(t,n,i){this.wire.sendAction("fdc3-raise-intent").catch((e=>{}));const r=i?{name:t,context:n,metadata:{target:i}}:{name:t,context:n};try{return await this.client.fireIntent(r)}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntent?"ResolverUnavailable":t.message;throw new Error(n)}}async findIntent(t,n){this.wire.sendAction("fdc3-find-intent").catch((e=>{}));try{return await this.client.getInfoForIntent({name:t,context:n})}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntent?"ResolverUnavailable":t.message;throw new Error(n)}}async findIntentsByContext(t){this.wire.sendAction("fdc3-find-intents-by-context").catch((e=>{}));try{return await this.client.getInfoForIntentsByContext(t)}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntentsByContext?"ResolverUnavailable":t.message;throw new Error(n)}}async raiseIntentForContext(t,n){this.wire.sendAction("fdc3-raise-intent-for-context").catch((e=>{}));try{return await this.client.fireIntentForContext({...t,metadata:{target:n}})}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntentForContext?"ResolverUnavailable":t.message;throw new Error(n)}}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}getInfo(){return this.wire.sendAction("fdc3-get-info").catch((e=>{})),{providerVersion:this.wire.environment.getAdapterVersionSync(),provider:`openfin-${this.wire.me.uuid}`,fdc3Version:"1.2"}}}return er.Fdc3Module=n,er}(),h=function(){if(lr)return pr;lr=1,Object.defineProperty(pr,"__esModule",{value:!0}),pr.Fdc3Module2=void 0;const e=hr(),t=Hi,n=wr(),i=nr,r=ir;class o extends e.FDC3ModuleBase{async open(e,t){return"string"==typeof e&&console.warn("Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string })."),super._open(e,t)}async findInstances(e){this.wire.sendAction("fdc3-find-instances").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,"fdc3FindInstances",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3FindInstances?"ResolverUnavailable":e.message;throw new Error(n)}}async getAppMetadata(e){this.wire.sendAction("fdc3-get-app-metadata").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,"fdc3GetAppMetadata",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3GetAppMetadata?"ResolverUnavailable":e.message;throw new Error(n)}}async addContextListener(e,t){this.wire.sendAction("fdc3-add-context-listener").catch((e=>{}));const n=e=>t=>{const{contextMetadata:n,...i}=t,r=n?[{...i},n]:[t,null];e(...r)};let i=t,r=n(i);return"function"==typeof e?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),i=e,r=n(i),this.client.addContextHandler(r)):this.client.addContextHandler(r,null===e?void 0:e)}async findIntent(e,n,i){this.wire.sendAction("fdc3-find-intent").catch((e=>{}));try{return await this.client.getInfoForIntent({name:e,context:n,metadata:{resultType:i}})}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntent?"ResolverUnavailable":e.message;throw new Error(n)}}async findIntentsByContext(e,i){this.wire.sendAction("fdc3-find-intents-by-context").catch((e=>{}));const r=i?{context:e,metadata:{resultType:i}}:e;try{return await n.InteropClient.ferryFdc3Call(this.client,"fdc3v2FindIntentsByContext",r)}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntentsByContext?"ResolverUnavailable":e.message;throw new Error(n)}}async raiseIntent(e,n,r){this.wire.sendAction("fdc3-raise-intent").catch((e=>{}));try{return"string"==typeof r&&console.warn("Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string })."),(0,i.getIntentResolution)(this.client,n,r,e)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?"ResolverUnavailable":e.message;throw new Error(n)}}async raiseIntentForContext(e,n){this.wire.sendAction("fdc3-raise-intent-for-context").catch((e=>{}));try{return"string"==typeof n&&console.warn("Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string })."),(0,i.getIntentResolution)(this.client,e,n)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?"ResolverUnavailable":e.message;throw new Error(n)}}async addIntentListener(e,t){if(this.wire.sendAction("fdc3-add-intent-listener").catch((e=>{})),"string"!=typeof e)throw new Error("First argument must be an Intent name");return this.client.registerIntentHandler((async e=>{let n,i;const{context:r,metadata:o}=e,{contextMetadata:s,metadata:a,...c}=r,d=o?.intentResolutionResultId||a?.intentResolutionResultId;try{const e=a?{metadata:a,...c}:{...c};n=await t(e,s),i=n}catch(e){n=e,i={error:!0}}if(d&&this.fin.InterApplicationBus.publish(d,i).catch((()=>null)),n instanceof Error)throw new Error(n.message);return n}),e,{fdc3Version:"2.0"})}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}async createPrivateChannel(){const e=(0,t.generateId)();await n.InteropClient.ferryFdc3Call(this.client,"createPrivateChannelProvider",{channelId:e});const o=await this.fin.InterApplicationBus.Channel.connect(e),s=new r.PrivateChannelClient(o,e);return(0,i.buildPrivateChannelObject)(s)}async getUserChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:"user",...(0,i.getUnsupportedChannelApis)("User")})))}async getSystemChannels(){return console.warn("This API has been deprecated. Please use fdc3.getUserChannels instead."),super.getSystemChannels()}async joinUserChannel(e){return super.joinChannel(e)}async joinChannel(e){return console.warn("This API has been deprecated. Please use fdc3.joinUserChannel instead."),super.joinChannel(e)}async getCurrentChannel(){const e=await super.getCurrentChannel();return e?{...e,type:"user",broadcast:this.broadcast.bind(this)}:null}async getInfo(){return n.InteropClient.ferryFdc3Call(this.client,"fdc3v2GetInfo",{fdc3Version:"2.0"})}}return pr.Fdc3Module2=o,pr}(),l=Hi;let u=class extends o.Base{constructor(i,r){super(i),e.set(this,void 0),t.set(this,void 0),n(this,t,new Map,"f"),n(this,e,r,"f")}async setContext(t){this.wire.sendAction("interop-client-set-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("setContext",{context:t})}async addContextHandler(t,n){if(this.wire.sendAction("interop-client-add-context-handler").catch((e=>{})),"function"!=typeof t)throw new Error("Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");const r=await i(this,e,"f");let o;o=n?`invokeContextHandler-${n}-${(0,l.generateId)()}`:"invokeContextHandler";const s=(0,l.wrapContextHandler)(t,o);return r.register(o,s),await r.dispatch("contextHandlerRegistered",{handlerId:o,contextType:n}),{unsubscribe:async()=>{r.remove(o),await r.dispatch("removeContextHandler",{handlerId:o})}}}async getContextGroups(){this.wire.sendAction("interop-client-get-context-groups").catch((e=>{}));return(await i(this,e,"f")).dispatch("getContextGroups")}async joinContextGroup(t,n){this.wire.sendAction("interop-client-join-context-group").catch((e=>{}));const r=await i(this,e,"f");if(!t)throw new Error("No contextGroupId specified for joinContextGroup.");return r.dispatch("joinContextGroup",{contextGroupId:t,target:n})}async removeFromContextGroup(t){this.wire.sendAction("interop-client-remove-from-context-group").catch((e=>{}));return(await i(this,e,"f")).dispatch("removeFromContextGroup",{target:t})}async getAllClientsInContextGroup(t){this.wire.sendAction("interop-client-get-all-clients-in-context-group").catch((e=>{}));const n=await i(this,e,"f");if(!t)throw new Error("No contextGroupId specified for getAllClientsInContextGroup.");return n.dispatch("getAllClientsInContextGroup",{contextGroupId:t})}async getInfoForContextGroup(t){this.wire.sendAction("interop-client-get-info-for-context-group").catch((e=>{}));const n=await i(this,e,"f");if(!t)throw new Error("No contextGroupId specified for getInfoForContextGroup.");return n.dispatch("getInfoForContextGroup",{contextGroupId:t})}async fireIntent(t){this.wire.sendAction("interop-client-fire-intent").catch((e=>{}));return(await i(this,e,"f")).dispatch("fireIntent",t)}async registerIntentHandler(t,n,r){this.wire.sendAction("interop-client-register-intent-handler").catch((e=>{}));const o=await i(this,e,"f"),s=`intent-handler-${n}`,a=(0,l.wrapIntentHandler)(t,s);try{await o.register(s,a),await o.dispatch("intentHandlerRegistered",{handlerId:s,...r})}catch(e){throw new Error("Unable to register intent handler")}return{unsubscribe:async()=>{o.remove(s)}}}async getCurrentContext(t){this.wire.sendAction("interop-client-get-current-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("getCurrentContext",{contextType:t})}async getInfoForIntent(t){this.wire.sendAction("interop-client-get-info-for-intent").catch((e=>{}));return(await i(this,e,"f")).dispatch("getInfoForIntent",t)}async getInfoForIntentsByContext(t){this.wire.sendAction("interop-client-get-info-for-intents-by-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("getInfoForIntentsByContext",t)}async fireIntentForContext(t){this.wire.sendAction("interop-client-fire-intent-for-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("fireIntentForContext",t)}async joinSessionContextGroup(n){try{const r=i(this,t,"f").get(n);if(r)return r.getUserInstance();const o=await i(this,e,"f"),{hasConflict:s}=await o.dispatch("sessionContextGroup:createIfNeeded",{sessionContextGroupId:n});s&&console.warn(`A (non-session) context group with the name "${n}" already exists. If you are trying to join a Context Group, call joinContextGroup instead.`);const c=new a.default(this.wire,i(this,e,"f"),n);return i(this,t,"f").set(n,c),c.getUserInstance()}catch(e){throw console.error(`Error thrown trying to create Session Context Group with id "${n}": ${e}`),e}}async onDisconnection(t){this.wire.sendAction("interop-client-add-ondisconnection-listener").catch((e=>{}));return(await i(this,e,"f")).onDisconnection((e=>{const{uuid:n}=e;t({type:"interop-broker",topic:"disconnected",brokerName:n})}))}getFDC3Sync(e){switch(e){case"1.2":return new c.Fdc3Module((()=>this),this.wire);case"2.0":return new h.Fdc3Module2((()=>this),this.wire);default:throw new Error(`Invalid FDC3 version provided: ${e}. Must be '1.2' or '2.0'`)}}async getFDC3(e){return this.getFDC3Sync(e)}static async ferryFdc3Call(t,n,r){return(await i(t,e,"f")).dispatch(n,r||null)}};return Ki.InteropClient=u,e=new WeakMap,t=new WeakMap,Ki}var yr,fr,gr,mr={};function vr(){if(yr)return mr;yr=1,Object.defineProperty(mr,"__esModule",{value:!0}),mr.overrideCheck=mr.checkFDC32Overrides=mr.getDefaultViewFdc3VersionFromAppInfo=void 0;const e=Vi();function t(t){return["fdc3HandleFindInstances","handleInfoForIntent","handleInfoForIntentsByContext","fdc3HandleGetAppMetadata","fdc3HandleGetInfo","fdc3HandleOpen","handleFiredIntent","handleFiredIntentForContext"].filter((n=>t[n]===e.InteropBroker.prototype[n]))}return mr.getDefaultViewFdc3VersionFromAppInfo=function({manifest:e,initialOptions:t}){const n=e?.platform?.defaultViewOptions?.fdc3InteropApi??t.defaultViewOptions?.fdc3InteropApi;return["1.2","2.0"].includes(n??"")?n:void 0},mr.checkFDC32Overrides=t,mr.overrideCheck=function(e,n){if(n&&"2.0"===n){const n=t(e);n.length>0&&console.warn(`WARNING: FDC3 2.0 has been set as a default option for Views in this Platform, but the required InteropBroker APIs for FDC3 2.0 compliance have not all been overridden.\nThe following APIs need to be overridden:\n${n.join("\n")}`)}},mr}function Cr(){return gr||(gr=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),i=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),i(function(){if(fr)return Ti;fr=1;var e=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ti,"__esModule",{value:!0}),Ti.InteropModule=void 0;const t=e(n),i=$i,r=d,o=Vi(),a=wr(),c=vr(),h=Tn,l=e=>new e,u="You have attempted to use or modify InteropBroker parameters, which is not allowed. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.";class p extends r.Base{async init(e,n=l){this.wire.sendAction("interop-init").catch((()=>{}));const r=await this.wire.environment.getInteropInfo(this.wire.getFin()),s=(0,i.createUnusableObject)(u),a=(0,i.createWarningObject)(u,(0,t.default)(r)),d=async()=>{throw new Error(u)},p=o.InteropBroker.createClosedConstructor(this.wire,(()=>this.fin.InterApplicationBus.Channel.create(`interop-broker-${e}`)),r);let w;return w=Array.isArray(n)?new((0,h.overrideFromComposables)(...n)(p))(s,d,a):await n(p,s,d,a),(0,c.overrideCheck)(w,r.fdc3Version),w}connectSync(e,t){return this.wire.sendAction("interop-connect-sync").catch((()=>{})),new a.InteropClient(this.wire,this.wire.environment.whenReady().then((()=>this.fin.InterApplicationBus.Channel.connect(`interop-broker-${e}`,{payload:t}))))}}return Ti.InteropModule=p,Ti}(),e),i(wr(),e),i(Vi(),e)}(Li)),Li}var br={},Ir={},Er={},xr={};Object.defineProperty(xr,"__esModule",{value:!0}),xr.getSnapshotSourceChannelName=void 0;xr.getSnapshotSourceChannelName=e=>`snapshot-source-provider-${e.uuid}`;var Ar,Pr,Mr,_r,Or,Sr=s&&s.__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},Rr=s&&s.__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)};Object.defineProperty(Er,"__esModule",{value:!0}),Er.SnapshotSource=void 0;const Fr=d,jr=xr,kr=new Map;class Lr extends Fr.Base{constructor(e,t){super(e),Ar.set(this,void 0),Pr.set(this,(()=>(kr.has(this.identity.uuid)||kr.set(this.identity.uuid,{eventFired:null,clientPromise:null}),kr.get(this.identity.uuid)))),Mr.set(this,(()=>(Rr(this,Pr,"f").call(this).clientPromise||(Rr(this,Pr,"f").call(this).clientPromise=Rr(this,_r,"f").call(this)),Rr(this,Pr,"f").call(this).clientPromise))),_r.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);try{Rr(this,Pr,"f").call(this).eventFired||await Rr(this,Or,"f").call(this);const t=await this.fin.InterApplicationBus.Channel.connect(e,{wait:!1});return t.onDisconnection((()=>{Rr(this,Pr,"f").call(this).clientPromise=null,Rr(this,Pr,"f").call(this).eventFired=null})),t}catch(e){throw Rr(this,Pr,"f").call(this).clientPromise=null,new Error("The targeted SnapshotSource is not currently initialized. Await this object's ready() method.")}})),Or.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);let t,n;const i=new Promise(((e,i)=>{t=e,n=i}));Rr(this,Pr,"f").call(this).eventFired=i;const r=async i=>{try{i.channelName===e&&(t(),await this.fin.InterApplicationBus.Channel.removeListener("connected",r))}catch(e){n(e)}};await this.fin.InterApplicationBus.Channel.on("connected",r)})),Sr(this,Ar,t,"f")}get identity(){return Rr(this,Ar,"f")}async ready(){this.wire.sendAction("snapshot-source-ready").catch((e=>{}));try{await Rr(this,Mr,"f").call(this)}catch(e){await Rr(this,Pr,"f").call(this).eventFired}}async getSnapshot(){this.wire.sendAction("snapshot-source-get-snapshot").catch((e=>{}));const e=await Rr(this,Mr,"f").call(this),t=await e.dispatch("get-snapshot");return(await t).snapshot}async applySnapshot(e){this.wire.sendAction("snapshot-source-apply-snapshot").catch((e=>{}));return(await Rr(this,Mr,"f").call(this)).dispatch("apply-snapshot",{snapshot:e})}}Er.SnapshotSource=Lr,Ar=new WeakMap,Pr=new WeakMap,Mr=new WeakMap,_r=new WeakMap,Or=new WeakMap,Object.defineProperty(Ir,"__esModule",{value:!0}),Ir.SnapshotSourceModule=void 0;const Tr=d,$r=Er,Br=xr;class Gr extends Tr.Base{async init(e){if(this.wire.sendAction("snapshot-source-init").catch((e=>{})),"object"!=typeof e||"function"!=typeof e.getSnapshot||"function"!=typeof e.applySnapshot)throw new Error("you must pass in a valid SnapshotProvider");const t=await this.fin.InterApplicationBus.Channel.create((0,Br.getSnapshotSourceChannelName)(this.fin.me));t.register("get-snapshot",(async()=>({snapshot:await e.getSnapshot()}))),t.register("apply-snapshot",(({snapshot:t})=>e.applySnapshot(t)))}wrapSync(e){return this.wire.sendAction("snapshot-source-wrap-sync").catch((e=>{})),new $r.SnapshotSource(this.wire,e)}async wrap(e){return this.wire.sendAction("snapshot-source-wrap").catch((e=>{})),this.wrapSync(e)}}Ir.SnapshotSourceModule=Gr,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Ir,e),n(Er,e)}(br),Object.defineProperty(a,"__esModule",{value:!0});var Wr=a.Fin=void 0;const Hr=t,Nr=c,Dr=ie(),Ur=Z(),Vr=de,zr=en,Kr=rn,qr=un,Jr=bn,Yr=J(),Zr=An,Qr=ki,Xr=Cr(),eo=br;class to extends Hr.EventEmitter{constructor(e){super(),this.wire=e,this.System=new Nr.System(e),this.Window=new Dr._WindowModule(e),this.Application=new Ur.ApplicationModule(e),this.InterApplicationBus=new Vr.InterApplicationBus(e),this.Clipboard=new zr.Clipboard(e),this.ExternalApplication=new Kr.ExternalApplicationModule(e),this.Frame=new qr._FrameModule(e),this.GlobalHotkey=new Jr.GlobalHotkey(e),this.Platform=new Zr.PlatformModule(e,this.InterApplicationBus.Channel),this.View=new Yr.ViewModule(e),this.Interop=new Xr.InteropModule(e),this.SnapshotSource=new eo.SnapshotSourceModule(e),e.registerFin(this),this.me=(0,Qr.getMe)(e),e.on("disconnected",(()=>{this.emit("disconnected")}))}}Wr=a.Fin=to;var no={},io={};function ro(e){return"string"==typeof e.manifestUrl}function oo(e){return ao(e)&&"string"==typeof e.address}function so(e){return oo(e)&&"string"==typeof e.token}function ao(e){return"string"==typeof e.uuid}function co(e){return e.runtime&&"string"==typeof e.runtime.version}function ho(e){return ao(e)&&co(e)}Object.defineProperty(io,"__esModule",{value:!0}),io.isInternalConnectConfig=io.isPortDiscoveryConfig=io.isNewConnectConfig=io.isConfigWithReceiver=io.isRemoteConfig=io.isExistingConnectConfig=io.isExternalConfig=void 0,io.isExternalConfig=ro,io.isExistingConnectConfig=oo,io.isRemoteConfig=so,io.isConfigWithReceiver=function(e){return"object"==typeof e.receiver&&so({...e,address:""})},io.isNewConnectConfig=ho,io.isPortDiscoveryConfig=function(e){return ro(e)&&co(e)||ho(e)},io.isInternalConnectConfig=function(e){return oo(e)||ho(e)};var lo={},uo={};Object.defineProperty(uo,"__esModule",{value:!0}),uo.EmitterMap=void 0;const po=t;function wo(e){return Buffer.from(e).toString("base64")}uo.EmitterMap=class{constructor(){this.storage=new Map}hashKeys(e){return e.map(wo).join("/")}getOrCreate(e){const t=this.hashKeys(e);return this.storage.has(t)||this.storage.set(t,new po.EventEmitter),this.storage.get(t)}has(e){return this.storage.has(this.hashKeys(e))}delete(e){const t=this.hashKeys(e);return this.storage.delete(t)}},Object.defineProperty(lo,"__esModule",{value:!0});const yo=uo;class fo extends yo.EmitterMap{constructor(){super(...arguments),this.dispatchEvent=e=>{if(function(e){return"process-desktop-event"===e.action}(e)){const{payload:t}=e,n=function(e){const{topic:t}=e;if("frame"===t||"window"===t||"view"===t){const{uuid:n,name:i}=e;return[t,n,i]}if("application"===t){const{uuid:n}=e;return[t,n]}return[t]}(t);if(this.has(n))return this.getOrCreate(n).emit(t.type,t),!0}return!1}}}lo.default=fo;var go,mo,vo=s&&s.__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},Co=s&&s.__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)},bo=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(no,"__esModule",{value:!0});var Io=no.Transport=void 0;const Eo=t,xo=io,Ao=g,Po=bo(lo),Mo=ki,_o=ke;class Oo extends Eo.EventEmitter{constructor(e,t,n){super(),this.wireListeners=new Map,this.topicRefMap=new Map,this.eventAggregator=new Po.default,this.messageHandlers=[this.eventAggregator.dispatchEvent],go.set(this,void 0),mo.set(this,void 0),this.connectSync=()=>{Co(this,go,"f").connectSync()},this.getPort=()=>Co(this,go,"f").getPort(),vo(this,go,new e(this.onmessage.bind(this)),"f"),this.environment=t,this.sendRaw=Co(this,go,"f").send.bind(Co(this,go,"f")),this.registerMessageHandler(this.handleMessage.bind(this)),Co(this,go,"f").on("disconnected",(()=>{for(const[,{handleNack:e}]of this.wireListeners)e({reason:"Remote connection has closed"});this.wireListeners.clear(),this.emit("disconnected")}));const{uuid:i,name:r}=n,o=this.environment.getCurrentEntityType();this.me=(0,Mo.getBaseMe)(o,i,r)}getFin(){if(!Co(this,mo,"f"))throw new Error("No Fin object registered for this transport");return Co(this,mo,"f")}registerFin(e){if(Co(this,mo,"f"))throw new Error("Fin object has already been registered for this transport");vo(this,mo,e,"f")}shutdown(){return Co(this,go,"f").shutdown()}async connect(e){if((0,xo.isConfigWithReceiver)(e))return await Co(this,go,"f").connect(e.receiver),this.authorize(e);if((0,xo.isRemoteConfig)(e))return this.connectRemote(e);if((0,xo.isExistingConnectConfig)(e))return this.connectByPort(e);if((0,xo.isNewConnectConfig)(e)){const t=await this.environment.retrievePort(e);return this.connectByPort({...e,address:`ws://localhost:${t}`})}}async connectRemote(e){return await Co(this,go,"f").connect(new(this.environment.getWsConstructor())(e.address)),this.authorize(e)}async connectByPort(e){const{address:t,uuid:n}=e,i={...e,type:"file-token"},r=Co(this,go,"f");await r.connect(new(this.environment.getWsConstructor())(e.address));const o=await this.sendAction("request-external-authorization",{uuid:n,type:"file-token"},!0);if("external-authorization-response"!==o.action)throw new Ao.UnexpectedActionError(o.action);return await this.environment.writeToken(o.payload.file,o.payload.token),this.authorize(i)}async authorize(e){const t=await this.sendAction("request-authorization",e,!0);if("authorization-response"!==t.action)throw new Ao.UnexpectedActionError(t.action);if(!0!==t.payload.success)throw new Ao.RuntimeError(t.payload)}sendAction(e,t={},n=!1){let i=()=>{};const r=Ao.RuntimeError.getCallSite(1),o=this.environment.getNextMessageId(),s=new Promise(((s,a)=>{i=a;const c={action:e,payload:t,messageId:o},d=Co(this,go,"f");return this.addWireListener(o,s,(e=>this.nackHandler(e,a,r)),n),d.send(c).catch(a)}));return Object.assign(s,{cancel:i,messageId:o})}nackHandler(e,t,n){t("string"==typeof e?e:new Ao.RuntimeError(e,n))}ferryAction(e){return new Promise(((t,n)=>{const i=this.environment.getNextMessageId();e.messageId=i;const r=e=>{t(e.payload)};return Co(this,go,"f").send(e).then((()=>this.addWireListener(i,r,(e=>this.nackHandler(e,n)),!1))).catch(n)}))}registerMessageHandler(e){this.messageHandlers.push(e)}addWireListener(e,t,n,i){i?this.uncorrelatedListener=t:this.wireListeners.has(e)?n({reason:"Duplicate handler id",error:(0,_o.errorToPOJO)(new Ao.DuplicateCorrelationError(String(e)))}):this.wireListeners.set(e,{resolve:t,handleNack:n})}onmessage(e){for(const t of this.messageHandlers)t.call(null,e)}handleMessage(e){const t=e.correlationId||NaN;if("correlationId"in e){if(!this.wireListeners.has(t))return!1;{const{resolve:n,handleNack:i}=this.wireListeners.get(t);"ack"!==e.action?i({reason:"Did not receive ack action",error:(0,_o.errorToPOJO)(new Ao.NoAckError(e.action))}):"payload"in e?e.payload.success?n.call(null,e):i(e.payload):"string"==typeof e.reason?i(e):(console.warn("Received invalid response from core",e),i({reason:"invalid response shape"})),this.wireListeners.delete(t)}}else this.uncorrelatedListener&&this.uncorrelatedListener.call(null,e),this.uncorrelatedListener=()=>{};return!0}}Io=no.Transport=Oo,go=new WeakMap,mo=new WeakMap;const So=(...e)=>({log:(...t)=>console.debug(`[${(new Date).toISOString()}]`,...(e=>e.map((e=>`[${e}]`)))(e),...t),getLogger:(...t)=>So(...e,...t)}),Ro=So("@openfin/core-web/client");function Fo(e,t){if(!function(e){return"string"==typeof e}(e))throw new Error(`Property ${t} has invalid type. Expected string, got ${typeof e}.`)}const jo="web-broker-ports-ready",ko=Ro.getLogger("get-web-interop-ports");function Lo(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)}function To(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}"function"==typeof SuppressedError&&SuppressedError;const $o=e=>{var n,i,r;return r=class extends t.EventEmitter{constructor(t){super(),n.set(this,void 0),i.set(this,!1),this.connectSync=()=>{Lo(this,i,"f")||(e.addEventListener("message",(e=>{e.data?.topic?.startsWith("wire-message")&&e.data.message&&Lo(this,n,"f").call(this,{...JSON.parse(e.data.message),ports:e.ports})})),e.start())},this.connect=async()=>{this.connectSync()},this.send=t=>(e.postMessage({topic:"wire-message",message:JSON.stringify(t)}),Promise.resolve()),this.shutdown=async()=>{e.close()},To(this,n,t,"f")}getPort(){return e}},n=new WeakMap,i=new WeakMap,r};var Bo={},Go={};Object.defineProperty(Go,"__esModule",{value:!0}),Go.BaseEnvironment=void 0;const Wo=vr();Go.BaseEnvironment=class{async getViewWindowIdentity(e,t){const{identity:n}=await e.View.wrapSync(t).getCurrentWindow();return n}async getInteropInfo(e){const t=await e.Application.getCurrentSync().getInfo().catch((()=>null)),n=t?.initialOptions?.interopBrokerConfiguration??{};return{fdc3Version:t?(0,Wo.getDefaultViewFdc3VersionFromAppInfo)(t):void 0,...n,fdc3Info:{providerVersion:await e.System.getVersion(),provider:"OpenFin"}}}},Object.defineProperty(Bo,"__esModule",{value:!0});var Ho=Bo.BrowserEnvironment=void 0;const No=Go;class Do extends No.BaseEnvironment{constructor(){super(...arguments),this.type="other",this.getRandomId=()=>{const e=new Uint32Array(1);return window.crypto.getRandomValues(e)[0].toString(32)}}getAdapterVersionSync(){return""}observeBounds(e,t){throw new Error("Method not implemented.")}layoutAllowedInContext(e){return!1}initLayoutManager(e,t,n){throw new Error("Method not implemented.")}applyLayoutSnapshot(e,t,n){throw new Error("Method not implemented.")}createLayout(e,t){throw new Error("Method not implemented.")}destroyLayout(e,t){throw new Error("Method not implemented.")}resolveLayout(e,t){throw new Error("Method not implemented.")}initPlatform(...e){throw new Error("Method not implemented.")}writeToken(e,t){return Promise.resolve("")}retrievePort(e){throw new Error("Method not implemented.")}getNextMessageId(){return this.getRandomId()}createChildContent(e){throw new Error("Method not implemented.")}getWebWindow(e){throw new Error("Method not implemented.")}getCurrentEntityIdentity(){throw new Error("Method not implemented.")}getCurrentEntityType(){return"external connection"}raiseEvent(e,t){throw new Error("Method not implemented.")}getUrl(){return location.href}getDefaultChannelOptions(){return{create:{},connect:{}}}getRtcPeer(){return new RTCPeerConnection}getWsConstructor(){return WebSocket}whenReady(){return Promise.resolve()}}Ho=Bo.BrowserEnvironment=Do;const Uo=e=>"platform"in e&&void 0!==e.platform;var Vo,zo;class Ko extends Ho{constructor(e){super(),this.connectConfig=e,Vo.set(this,void 0),zo.set(this,new W((async()=>Promise.resolve().then((function(){return __webpack_require__(/*! ./main-b14f67c9.js */ "./node_modules/@openfin/core-web/out/main-b14f67c9.js")}))))),Uo(e)&&this.validatePlatformOptions(e)}getAdapterVersionSync(){return"0.39.21"}validatePlatformOptions({platform:e}){if(!("layoutSnapshot"in e))throw new Error("Platform options are missing layoutSnapshot. Please provide a layoutSnapshot in the platform options.");if("windows"in e||"windows"in e.layoutSnapshot)throw new Error("It appears you tried to call connect() with a snapshot object from an OpenFin desktop environment. Note that connect() expects to be called with a platform property with this structure: { platform: { layoutSnapshot } }. To get a layoutSnapshot of the expected structure, use fin.Platform.Layout.getCurrentLayoutManagerSync().getLayoutSnapshot() in v34+ in your desktop environment.");const{layouts:t}=e.layoutSnapshot;Object.entries(t).map((([e,t])=>{if("object"!=typeof t||null===t)throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must be an object.`);if(!("content"in t))throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must contain a 'content' property.`)}))}async getInteropInfo(e){return{...{contextGroups:void 0,logging:{beforeAction:{enabled:!1},afterAction:{enabled:!1}}},fdc3Version:void 0,fdc3Info:{providerVersion:"0.39.21",provider:"OpenFin Web"}}}layoutAllowedInContext(e){return!0}async initLayoutManager(e,t,n){if(Lo(this,Vo,"f"))throw new Error("Layout already initialized.");if(!Uo(this.connectConfig))throw new Error("Platform options are missing from connection config.");const{WebLayoutEntryPoint:i}=await Lo(this,zo,"f").getValue();return To(this,Vo,new i(this.connectConfig),"f"),await Lo(this,Vo,"f").initLayoutManager(e,t,n)}async applyLayoutSnapshot(e,t,n){Lo(this,Vo,"f")?.applyLayoutSnapshot(e,t,n)}async createLayout(e,t){return Lo(this,Vo,"f")?.createLayout(e,t)}async destroyLayout(e,t){return Lo(this,Vo,"f")?.destroyLayout(e,t)}async getViewWindowIdentity(e,t){return Promise.resolve({uuid:t.uuid,name:t.uuid})}}Vo=new WeakMap,zo=new WeakMap;const qo=()=>{const e=((e,t)=>{const n=new RegExp(`^${t}<(?.*)>$`).exec(e)?.groups?.meta;if(n)try{return JSON.parse(atob(n))}catch(e){throw new Error(`Failed to decode JSON from ${n}.`)}})(window.name,"of-frame");if(e)try{const{name:t,uuid:n,brokerUrl:i,providerId:r,contextGroup:o}=e;return Fo(i,"brokerUrl"),Fo(n,"uuid"),Fo(t,"name"),{identity:{name:t,uuid:n},brokerUrl:i,interopConfig:{providerId:r,currentContextGroup:o}}}catch(e){throw new Error(`Unexpected error occurred when inferring platform information: ${e.stack}`)}},Jo=()=>{const e=r.v4();return{uuid:e,name:e}},Yo=async e=>{if("enabled"===e.connectionInheritance){const t=await(async e=>{const t=qo();if(t){const{validateOptions:n=(()=>!0)}=e,{identity:i,...r}=t;if(!await n(r))throw new Error("Parent options were rejected by validateOptions.");return t}})(e);if(t)return t}if(!e.options){const t="enabled"===e.connectionInheritance?"Broker URL was not specified nor provided by a platform container.":"Connection inheritance is disabled but no options were provided.";throw new Error(t)}return{...e.options,identity:Jo()}};exports.__classPrivateFieldGet=Lo,exports.__classPrivateFieldSet=To,exports.apiExposer=Gn,exports.commonjsGlobal=s,exports.connect=async t=>{try{Ro.log("Establishing connection",t);const{brokerUrl:n,identity:i,timeout:r,interopConfig:s}=await Yo(t),{workerPort:a,iframeBrokerPort:c}=await(async(e,t,n)=>{const{origin:i}=new URL(e),r=document.createElement("IFRAME");let s;r.style.display="none";try{return await new Promise(((a,c)=>{const d=e=>{if(e.source===r.contentWindow&&e.data?.topic===`ack-${jo}`){if(e.origin!==i)c(new Error(`Broker redirected to unexpected origin ${e.origin}, expected ${i}.`));else if(e.data.success){const[t,n]=e.ports;a({iframeBrokerPort:t,workerPort:n})}else c(new m(e.data));window.removeEventListener("message",d),clearTimeout(s)}};window.addEventListener("message",d),ko.log(`Connecting to broker ${e}`),r.setAttribute("src",e),r.setAttribute("name",o(t,"of-broker")),document.body.appendChild(r),ko.log("Iframe loaded, awaiting init message from iframe"),n&&(s=setTimeout((()=>{window.removeEventListener("message",d),document.body.removeChild(r),c(new Error("Worker did not initialize in time"))}),n))}))}catch(e){throw new Error(`Failed to initialise Fin Web Client. ${e.message}`,{cause:e})}})(n,i,r);Ro.log("Successfully established connection to shared worker");const d={entityType:"external connection",...i};a.start(),c.start();const h=((t,n,i)=>{const r=$o(n),o=new Ko(t),s=new Io(r,o,i);return s.connectSync(),window.Buffer=e.Buffer,new Wr(s)})(t,a,d);return s?.providerId&&(h.me.interop=h.Interop.connectSync(s.providerId),s?.currentContextGroup&&h.me.interop.joinContextGroup(s.currentContextGroup).catch((e=>{console.warn(`Error joining specified context group: ${s?.currentContextGroup}, continuing`,e)}))),{...h,me:{...h.me,identity:{uuid:h.me.uuid,name:h.me.name}}}}catch(e){throw new Error(`An error occured during web-interop connection: ${e.message}`)}},exports.decorators=Nn,exports.encodeOptions=o,exports.layout_constants=ai,exports.lazy=G; +var e=__webpack_require__(/*! buffer/ */ "../../node_modules/buffer/index.js"),t=__webpack_require__(/*! events */ "../../node_modules/events/events.js"),n=__webpack_require__(/*! lodash/cloneDeep */ "../../node_modules/lodash/cloneDeep.js"),i=__webpack_require__(/*! lodash/isEqual */ "../../node_modules/lodash/isEqual.js"),r=__webpack_require__(/*! uuid */ "../../node_modules/uuid/dist/esm-browser/index.js");const o=(e,t)=>`${t}<${btoa(JSON.stringify(e))}>`;var s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof __webpack_require__.g?__webpack_require__.g:"undefined"!=typeof self?self:{},a={},c={},d={},h={};async function l(e){const t=[];for(const n of e){const e=await n();t.push(e)}return t}Object.defineProperty(h,"__esModule",{value:!0}),h.promiseMapSerial=h.serial=h.promiseMap=h.promisify=void 0,h.promisify=function(e){return(...t)=>new Promise(((n,i)=>{e(...t,((e,t)=>e?i(e):n(t)))}))},h.promiseMap=async function(e,t){return Promise.all(e.map(t))},h.serial=l,h.promiseMapSerial=async function(e,t){return l(e.map(((e,n,i)=>()=>t(e,n,i))))};var u,p=s&&s.__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},w=s&&s.__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)};Object.defineProperty(d,"__esModule",{value:!0}),d.Reply=d.EmitterBase=d.Base=void 0;const y=h;class f{constructor(e){this.isNodeEnvironment=()=>"node"===this.wire.environment.type,this.isOpenFinEnvironment=()=>"openfin"===this.wire.environment.type,this.isBrowserEnvironment=()=>"other"===this.wire.environment.type,this.wire=e}get fin(){return this.wire.getFin()}get me(){return this.wire.me}}d.Base=f;d.EmitterBase=class extends f{constructor(e,t,...n){super(e),this.topic=t,u.set(this,void 0),this.eventNames=()=>this.hasEmitter()?this.getOrCreateEmitter().eventNames():[],this.emit=(e,t,...n)=>!!this.hasEmitter()&&this.getOrCreateEmitter().emit(e,t,...n),this.hasEmitter=()=>this.wire.eventAggregator.has(w(this,u,"f")),this.getOrCreateEmitter=()=>this.wire.eventAggregator.getOrCreate(w(this,u,"f")),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[],this.listenerCount=e=>this.hasEmitter()?this.getOrCreateEmitter().listenerCount(e):0,this.registerEventListener=async(e,t={},n,i)=>{const r={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e},o=this.getOrCreateEmitter();n(o);try{await this.wire.sendAction("subscribe-to-desktop-event",r)}catch(e){throw i(o),this.deleteEmitterIfNothingRegistered(o),e}},this.deregisterEventListener=async(e,t={})=>{if(this.hasEmitter()){const n={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e};await this.wire.sendAction("unsubscribe-to-desktop-event",n).catch((()=>null));return this.getOrCreateEmitter()}return Promise.resolve()},p(this,u,[t,...n],"f"),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[]}async on(e,t,n){return await this.registerEventListener(e,n,(n=>{n.on(e,t)}),(n=>{n.removeListener(e,t)})),this}async addListener(e,t,n){return this.on(e,t,n)}async once(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.once(e,i),n.once(e,t)}),(n=>{n.removeListener(e,i),n.removeListener(e,t)})),this}async prependListener(e,t,n){return await this.registerEventListener(e,n,(n=>{n.prependListener(e,t)}),(n=>{n.removeListener(e,t)})),this}async prependOnceListener(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.prependOnceListener(e,t),n.once(e,i)}),(n=>{n.removeListener(e,t),n.removeListener(e,i)})),this}async removeListener(e,t,n){const i=await this.deregisterEventListener(e,n);return i&&(i.removeListener(e,t),this.deleteEmitterIfNothingRegistered(i)),this}async deregisterAllListeners(e){const t={...this.identity,type:e,topic:this.topic};if(this.hasEmitter()){const e=this.getOrCreateEmitter(),n=e.listenerCount(t.type),i=[];for(let e=0;enull)));return await Promise.all(i),e}}async removeAllListeners(e){const t=async e=>{const t=await this.deregisterAllListeners(e);t&&(t.removeAllListeners(e),this.deleteEmitterIfNothingRegistered(t))};if(e)await t(e);else if(this.hasEmitter()){const e=this.getOrCreateEmitter().eventNames();await(0,y.promiseMap)(e,t)}return this}deleteEmitterIfNothingRegistered(e){0===e.eventNames().length&&this.wire.eventAggregator.delete(w(this,u,"f"))}},u=new WeakMap;d.Reply=class{};var g={};Object.defineProperty(g,"__esModule",{value:!0});var m=g.RuntimeError=g.NotSupportedError=g.NotImplementedError=g.NoAckError=g.DuplicateCorrelationError=g.UnexpectedActionError=g.DisconnectedError=void 0;class v extends Error{constructor(e){super(`Expected websocket state OPEN but found ${e}`),this.readyState=e}}g.DisconnectedError=v;class C extends Error{}g.UnexpectedActionError=C;class b extends Error{}g.DuplicateCorrelationError=b;class I extends Error{}g.NoAckError=I;class E extends Error{}g.NotImplementedError=E;class x extends Error{}g.NotSupportedError=x;class A extends Error{constructor(e){const{message:t,name:n,stack:i,...r}=e;super(t),this.name=n||"Error",this.stack=i??this.toString(),Object.keys(r).forEach((e=>{this[e]=r[e]}))}}class P extends Error{static getCallSite(e=0){const t=Error.stackTraceLimit,n=e+1;Error.stackTraceLimit=t+n;const i=Error.prepareStackTrace;Error.prepareStackTrace=(e,t)=>t;const r=(new Error).stack?.slice(n)??[];return Error.prepareStackTrace=i,Error.stackTraceLimit=t,r}static prepareStackTrace(e,t){if("function"==typeof Error.prepareStackTrace)return Error.prepareStackTrace(e,t);let n="";n+=e.name||"Error",n+=`: ${e.message||""}`;for(const e of t)n+=`\n at ${e.toString()}`;return n}constructor(e,t){const{reason:n,error:i}=e;super(n),this.name="RuntimeError",i?.stack&&(this.cause=new A(i)),t&&(this.stack=P.prepareStackTrace(this,t))}}m=g.RuntimeError=P;var M={},_={},O={};Object.defineProperty(O,"__esModule",{value:!0}),O.validateIdentity=void 0,O.validateIdentity=function(e){let t;return"object"==typeof e&&"string"==typeof e.uuid||(t="Not a valid identity object"),t};var S={},R={},F={},j={},k={},L={},T={};Object.defineProperty(T,"__esModule",{value:!0}),T.handleDeprecatedWarnings=void 0;var $;T.handleDeprecatedWarnings=e=>{(e.contentNavigation?.whitelist||e.contentNavigation?.blacklist||e.contentRedirect?.whitelist||e.contentRedirect?.blacklist)&&console.warn("The properties 'whitelist' and 'blacklist' have been marked as deprecated and will be removed in a future version. Please use 'allowlist' and 'denylist'.")};var B={},G={};Object.defineProperty(G,"__esModule",{value:!0}),G.AsyncRetryableLazy=W=G.Lazy=void 0;var W=G.Lazy=class{constructor(e){this.producerFn=e}getValue(){return this.value||(this.value=this.producerFn()),this.value}};G.AsyncRetryableLazy=class{constructor(e){this.producerFn=e}async getValue(){return this.promise||(this.promise=this.producerFn().catch((e=>{throw delete this.promise,e}))),this.promise}};var H={};Object.defineProperty(H,"__esModule",{value:!0}),H.WebContents=void 0;const N=d;class D extends N.EmitterBase{constructor(e,t,n){super(e,n,t.uuid,t.name),this.identity=t,this.entityType=n}capturePage(e){return this.wire.sendAction("capture-page",{options:e,...this.identity}).then((({payload:e})=>e.data))}executeJavaScript(e){return this.wire.sendAction("execute-javascript-in-window",{...this.identity,code:e}).then((({payload:e})=>e.data))}getZoomLevel(){return this.wire.sendAction("get-zoom-level",this.identity).then((({payload:e})=>e.data))}setZoomLevel(e){return this.wire.sendAction("set-zoom-level",{...this.identity,level:e}).then((()=>{}))}navigate(e){return this.wire.sendAction("navigate-window",{...this.identity,url:e}).then((()=>{}))}navigateBack(){return this.wire.sendAction("navigate-window-back",{...this.identity}).then((()=>{}))}async navigateForward(){await this.wire.sendAction("navigate-window-forward",{...this.identity})}stopNavigation(){return this.wire.sendAction("stop-window-navigation",{...this.identity}).then((()=>{}))}reload(e=!1){return this.wire.sendAction("reload-window",{ignoreCache:e,...this.identity}).then((()=>{}))}print(e={}){return this.wire.sendAction("print",{...this.identity,options:e}).then((()=>{}))}findInPage(e,t){return this.wire.sendAction("find-in-page",{...this.identity,searchTerm:e,options:t}).then((({payload:e})=>e.data))}stopFindInPage(e){return this.wire.sendAction("stop-find-in-page",{...this.identity,action:e}).then((()=>{}))}getPrinters(){return this.wire.sendAction("get-printers",{...this.identity}).then((({payload:e})=>e.data))}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){await this.wire.sendAction("focus-window",{emitSynthFocused:e,...this.identity})}async showDeveloperTools(){await this.wire.sendAction("show-developer-tools",this.identity)}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction("get-process-info",this.identity);return e}async getSharedWorkers(){return this.wire.sendAction("get-shared-workers",this.identity).then((({payload:e})=>e.data))}async inspectSharedWorker(){await this.wire.sendAction("inspect-shared-worker",{...this.identity})}async inspectSharedWorkerById(e){await this.wire.sendAction("inspect-shared-worker-by-id",{...this.identity,workerId:e})}async inspectServiceWorker(){await this.wire.sendAction("inspect-service-worker",{...this.identity})}async showPopupWindow(e){if(this.wire.sendAction(`${this.entityType}-show-popup-window`,this.identity).catch((()=>{})),e?.onPopupReady){const t=async({popupName:t})=>{try{const n=this.fin.Window.wrapSync({uuid:this.fin.me.uuid,name:t});await e.onPopupReady(n)}catch(e){throw new Error(`Something went wrong during onPopupReady execution: ${e}`)}};await this.once("popup-ready",t)}const{payload:t}=await this.wire.sendAction("try-create-popup-window",{options:{...e,hasResultCallback:!!e?.onPopupResult,hasReadyCallback:!!e?.onPopupReady},...this.identity}),{data:{willOpen:n,options:i}}=t;n&&await this.fin.Window.create(i.initialOptions);if(e?.onPopupResult){const t=async t=>{await e.onPopupResult((e=>{const{name:t,uuid:n,result:i,data:r}=e,o={identity:{name:t,uuid:n},result:i};return r&&(o.data=r),o})(t))},n=async()=>{await this.removeListener("popup-result",t)};await this.on("popup-result",t),await this.once("popup-teardown",n)}const{payload:r}=await this.wire.sendAction("show-popup-window",{options:i,...this.identity});return r.data}}var U,V,z,K,q;function J(){return V||(V=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(function(){if($)return L;$=1,Object.defineProperty(L,"__esModule",{value:!0}),L.ViewModule=void 0;const e=d,t=O,n=J(),i=T;class r extends e.Base{async create(e){const{uuid:t}=this.wire.me;if(!e.name||"string"!=typeof e.name)throw new Error("Please provide a name property as a string in order to create a View.");return(0,i.handleDeprecatedWarnings)(e),this.wire.environment.childViews?await this.wire.environment.createChildContent({entityType:"view",options:{...e,uuid:t}}):await this.wire.sendAction("create-view",{...e,uuid:t}),this.wrapSync({uuid:t,name:e.name})}async wrap(e){this.wire.sendAction("view-wrap").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}wrapSync(e){this.wire.sendAction("view-wrap-sync").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}getCurrent(){if(this.wire.sendAction("view-get-current").catch((e=>{})),!this.wire.me.isView)throw new Error("You are not in a View context");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction("view-get-current-sync").catch((e=>{})),!this.wire.me.isView)throw new Error("You are not in a View context");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return L.ViewModule=r,L}(),e),n(function(){if(U)return B;var e;U=1,Object.defineProperty(B,"__esModule",{value:!0}),B.View=void 0;const t=g,n=G,i=H,r=ie();class o extends i.WebContents{constructor(i,o){super(i,o,"view"),this.identity=o,e.set(this,new n.Lazy((()=>this.fin.Platform.wrapSync(this.identity).getClient()))),this.attach=async e=>{await this.wire.sendAction("attach-view",{target:e,...this.identity})},this.destroy=async()=>{await this.wire.sendAction("destroy-view",{...this.identity})},this.show=async()=>{await this.wire.sendAction("show-view",{...this.identity})},this.showAt=async(e,t={})=>{await this.wire.sendAction("show-view-at",{bounds:e,...this.identity,options:t})},this.bringToFront=async()=>{await this.wire.sendAction("bring-view-to-front",{...this.identity})},this.hide=async()=>{await this.wire.sendAction("hide-view",{...this.identity})},this.setBounds=async e=>{await this.wire.sendAction("set-view-bounds",{bounds:e,...this.identity})},this.getBounds=async()=>(await this.wire.sendAction("get-view-bounds",{...this.identity})).payload.data,this.getInfo=async()=>(await this.wire.sendAction("get-view-info",{...this.identity})).payload.data,this.getParentLayout=async()=>(this.wire.sendAction("view-get-parent-layout",{...this.identity}).catch((()=>{})),this.fin.Platform.Layout.getLayoutByViewIdentity(this.identity)),this.getOptions=async()=>this.wire.sendAction("get-view-options",{...this.identity}).then((({payload:e})=>e.data)),this.updateOptions=async e=>this.wire.sendAction("update-view-options",{options:e,...this.identity}).then((()=>{})),this.getCurrentWindow=async()=>{const{payload:{data:e}}=await this.wire.sendAction("get-view-window",{...this.identity});return new r._Window(this.wire,e)},this.getCurrentStack=async()=>{this.wire.sendAction("view-get-current-stack").catch((()=>{}));try{return(await this.getParentLayout()).getStackByViewIdentity(this.identity)}catch(e){throw new t.RuntimeError({reason:"This view does not belong to a stack.",error:e})}},this.triggerBeforeUnload=async()=>(await this.wire.sendAction("trigger-before-unload",{...this.identity})).payload.data,this.bindToElement=async e=>{if(!e)throw new Error("Element not found.");return this.wire.environment.observeBounds(e,(async e=>this.setBounds(e)))}}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){const t=await this.getCurrentWindow();await t.focusedWebViewWasChanged(),await super.focus({emitSynthFocused:e})}}return B.View=o,e=new WeakMap,B}(),e)}(k)),k}function Y(){if(z)return j;z=1,Object.defineProperty(j,"__esModule",{value:!0}),j.Application=void 0;const e=d,t=ie(),n=J();class i extends e.EmitterBase{constructor(e,n){super(e,"application",n.uuid),this.identity=n,this.window=new t._Window(this.wire,{uuid:this.identity.uuid,name:this.identity.uuid})}windowListFromIdentityList(e){const n=[];return e.forEach((e=>{n.push(new t._Window(this.wire,{uuid:e.uuid,name:e.name}))})),n}isRunning(){return this.wire.sendAction("is-application-running",this.identity).then((({payload:e})=>e.data))}async quit(e=!1){try{await this._close(e),await this.wire.sendAction("destroy-application",{force:e,...this.identity})}catch(e){if(!["Remote connection has closed","Could not locate the requested application"].some((t=>e.message.includes(t))))throw e}}async _close(e=!1){try{await this.wire.sendAction("close-application",{force:e,...this.identity})}catch(e){if(!e.message.includes("Remote connection has closed"))throw e}}close(e=!1){return console.warn("Deprecation Warning: Application.close is deprecated Please use Application.quit"),this.wire.sendAction("application-close",this.identity).catch((e=>{})),this._close(e)}getChildWindows(){return this.wire.sendAction("get-child-windows",this.identity).then((({payload:e})=>{const t=[];return e.data.forEach((e=>{t.push({uuid:this.identity.uuid,name:e})})),this.windowListFromIdentityList(t)}))}getManifest(){return this.wire.sendAction("get-application-manifest",this.identity).then((({payload:e})=>e.data))}getParentUuid(){return this.wire.sendAction("get-parent-application",this.identity).then((({payload:e})=>e.data))}getShortcuts(){return this.wire.sendAction("get-shortcuts",this.identity).then((({payload:e})=>e.data))}async getViews(){const{payload:e}=await this.wire.sendAction("application-get-views",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}getZoomLevel(){return this.wire.sendAction("get-application-zoom-level",this.identity).then((({payload:e})=>e.data))}getWindow(){return this.wire.sendAction("application-get-window",this.identity).catch((e=>{})),Promise.resolve(this.window)}registerUser(e,t){return this.wire.sendAction("register-user",{userName:e,appName:t,...this.identity}).then((()=>{}))}removeTrayIcon(){return this.wire.sendAction("remove-tray-icon",this.identity).then((()=>{}))}restart(){return this.wire.sendAction("restart-application",this.identity).then((()=>{}))}run(){return console.warn("Deprecation Warning: Application.run is deprecated Please use fin.Application.start"),this.wire.sendAction("application-run",this.identity).catch((e=>{})),this._run()}_run(e={}){return this.wire.sendAction("run-application",{manifestUrl:this._manifestUrl,opts:e,...this.identity}).then((()=>{}))}scheduleRestart(){return this.wire.sendAction("relaunch-on-close",this.identity).then((()=>{}))}async sendApplicationLog(){const{payload:e}=await this.wire.sendAction("send-application-log",this.identity);return e.data}async setJumpList(e){await this.wire.sendAction("set-jump-list",{config:e,...this.identity})}setTrayIcon(e){return this.wire.sendAction("set-tray-icon",{enabledIcon:e,...this.identity}).then((()=>{}))}setShortcuts(e){return this.wire.sendAction("set-shortcuts",{data:e,...this.identity}).then((()=>{}))}async setShortcutQueryParams(e){await this.wire.sendAction("set-shortcut-query-args",{data:e,...this.identity})}setZoomLevel(e){return this.wire.sendAction("set-application-zoom-level",{level:e,...this.identity}).then((()=>{}))}async setAppLogUsername(e){await this.wire.sendAction("set-app-log-username",{data:e,...this.identity})}getTrayIconInfo(){return this.wire.sendAction("get-tray-icon-info",this.identity).then((({payload:e})=>e.data))}hasTrayIcon(){return this.wire.sendAction("has-tray-icon",this.identity).then((({payload:e})=>e.data))}terminate(){return this.wire.sendAction("terminate-application",this.identity).then((()=>{}))}wait(){return this.wire.sendAction("wait-for-hung-application",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction("get-info",this.identity).then((({payload:e})=>e.data))}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction("application-get-process-info",this.identity);return e}async setFileDownloadLocation(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t};await this.wire.sendAction("set-file-download-location",{...n,downloadLocation:e})}async getFileDownloadLocation(){const{payload:{data:e}}=await this.wire.sendAction("get-file-download-location",this.identity);return e}async showTrayIconPopupMenu(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t},{payload:i}=await this.wire.sendAction("show-tray-icon-popup-menu",{...n,options:e});return i.data}async closeTrayIconPopupMenu(){const{name:e}=this.wire.me,t={uuid:this.identity.uuid,name:e};await this.wire.sendAction("close-tray-icon-popup-menu",{...t})}}return j.Application=i,j}function Z(){return q||(q=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(function(){if(K)return F;K=1,Object.defineProperty(F,"__esModule",{value:!0}),F.ApplicationModule=void 0;const e=d,t=O,n=Y();class i extends e.Base{async wrap(e){this.wire.sendAction("wrap-application").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}wrapSync(e){this.wire.sendAction("wrap-application-sync").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}async _create(e){return void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&void 0===e.isPlatformController&&(e.autoShow=!0),await this.wire.sendAction("create-application",e),this.wrap({uuid:e.uuid})}create(e){return console.warn("Deprecation Warning: fin.Application.create is deprecated. Please use fin.Application.start"),this.wire.sendAction("application-create").catch((e=>{})),this._create(e)}async start(e){this.wire.sendAction("start-application").catch((e=>{}));const t=await this._create(e);return await this.wire.sendAction("run-application",{uuid:e.uuid}),t}async startManyManifests(e,t){return this.wire.sendAction("run-applications",{applications:e,opts:t}).then((()=>{}))}getCurrent(){return this.wire.sendAction("get-current-application").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction("get-current-application-sync").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}async startFromManifest(e,t){this.wire.sendAction("application-start-from-manifest").catch((e=>{}));const n=await this._createFromManifest(e);return await n._run(t),n}createFromManifest(e){return console.warn("Deprecation Warning: fin.Application.createFromManifest is deprecated. Please use fin.Application.startFromManifest"),this.wire.sendAction("application-create-from-manifest").catch((e=>{})),this._createFromManifest(e)}_createFromManifest(e){return this.wire.sendAction("get-application-manifest",{manifestUrl:e}).then((({payload:e})=>{const t=e.data.platform?e.data.platform.uuid:e.data.startup_app.uuid;return this.wrap({uuid:t})})).then((t=>(t._manifestUrl=e,t)))}}return F.ApplicationModule=i,F}(),e),n(Y(),e)}(R)),R}H.WebContents=D;var Q={};Object.defineProperty(Q,"__esModule",{value:!0}),Q.promisifySubscription=void 0;var X,ee,te;function ne(){if(X)return S;X=1,Object.defineProperty(S,"__esModule",{value:!0}),S._Window=void 0;const e=Z(),t=H,n=J(),i=T,r=Q;class o extends t.WebContents{constructor(e,t){super(e,t,"window")}async createWindow(e){this.wire.sendAction("window-create-window",this.identity).catch((e=>{}));const t=await(0,r.promisifySubscription)(this,"fire-constructor-callback");void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&(e.autoShow=!0),(0,i.handleDeprecatedWarnings)(e);const n=this.wire.environment.createChildContent({entityType:"window",options:e}),[o]=await Promise.all([t.getValue(),n]);let s;const{success:a}=o,c=o.data,{message:d}=c;s=a?{httpResponseCode:c.httpResponseCode,apiInjected:c.apiInjected}:{message:c.message,networkErrorCode:c.networkErrorCode,stack:c.stack};const h={message:d,cbPayload:s,success:a};try{this.getWebWindow().fin.__internal_.openerSuccessCBCalled()}catch(e){}return h.success?this:Promise.reject(h)}getAllFrames(){return this.wire.sendAction("get-all-frames",this.identity).then((({payload:e})=>e.data))}getBounds(){return this.wire.sendAction("get-window-bounds",this.identity).then((({payload:e})=>e.data))}center(){return this.wire.sendAction("center-window",this.identity).then((()=>{}))}blur(){return this.wire.sendAction("blur-window",this.identity).then((()=>{}))}bringToFront(){return this.wire.sendAction("bring-window-to-front",this.identity).then((()=>{}))}animate(e,t){return this.wire.sendAction("animate-window",{transitions:e,options:t,...this.identity}).then((()=>{}))}hide(){return this.wire.sendAction("hide-window",this.identity).then((()=>{}))}close(e=!1){return this.wire.sendAction("close-window",{force:e,...this.identity}).then((()=>{Object.setPrototypeOf(this,null)}))}focusedWebViewWasChanged(){return this.wire.sendAction("focused-webview-changed",this.identity).then((()=>{}))}getNativeId(){return this.wire.sendAction("get-window-native-id",this.identity).then((({payload:e})=>e.data))}async getCurrentViews(){const{payload:e}=await this.wire.sendAction("window-get-views",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}disableFrame(){return console.warn("Function is deprecated; use disableUserMovement instead."),this.wire.sendAction("disable-window-frame",this.identity).then((()=>{}))}disableUserMovement(){return this.wire.sendAction("disable-window-frame",this.identity).then((()=>{}))}enableFrame(){return console.warn("Function is deprecated; use enableUserMovement instead."),this.wire.sendAction("enable-window-frame",this.identity).then((()=>{}))}enableUserMovement(){return this.wire.sendAction("enable-window-frame",this.identity).then((()=>{}))}flash(){return this.wire.sendAction("flash-window",this.identity).then((()=>{}))}stopFlashing(){return this.wire.sendAction("stop-flash-window",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction("get-window-info",this.identity).then((({payload:e})=>e.data))}async getLayout(e){this.wire.sendAction("window-get-layout",this.identity).catch((e=>{}));const t=await this.getOptions();if(!t.layout&&!t.layoutSnapshot)throw new Error("Window does not have a Layout");return this.fin.Platform.Layout.wrap(e??this.identity)}getOptions(){return this.wire.sendAction("get-window-options",this.identity).then((({payload:e})=>e.data))}getParentApplication(){return this.wire.sendAction("window-get-parent-application",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity))}getParentWindow(){return this.wire.sendAction("window-get-parent-window",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity)).then((e=>e.getWindow()))}async getSnapshot(e){const t={area:e,...this.identity};console.warn("Window.getSnapshot has been deprecated, please use Window.capturePage");return(await this.wire.sendAction("get-window-snapshot",t)).payload.data}getState(){return this.wire.sendAction("get-window-state",this.identity).then((({payload:e})=>e.data))}getWebWindow(){return this.wire.sendAction("window-get-web-window",this.identity).catch((e=>{})),this.wire.environment.getWebWindow(this.identity)}isMainWindow(){return this.wire.sendAction("window-is-main-window",this.identity).catch((e=>{})),this.me.uuid===this.me.name}isShowing(){return this.wire.sendAction("is-window-showing",this.identity).then((({payload:e})=>e.data))}maximize(){return this.wire.sendAction("maximize-window",this.identity).then((()=>{}))}minimize(){return this.wire.sendAction("minimize-window",this.identity).then((()=>{}))}moveBy(e,t,n){return this.wire.sendAction("move-window-by",{deltaLeft:e,deltaTop:t,positioningOptions:n,...this.identity}).then((()=>{}))}moveTo(e,t,n){return this.wire.sendAction("move-window",{left:e,top:t,positioningOptions:n,...this.identity}).then((()=>{}))}resizeBy(e,t,n,i){return this.wire.sendAction("resize-window-by",{deltaWidth:Math.floor(e),deltaHeight:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}resizeTo(e,t,n,i){return this.wire.sendAction("resize-window",{width:Math.floor(e),height:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}restore(){return this.wire.sendAction("restore-window",this.identity).then((()=>{}))}setAsForeground(){return this.wire.sendAction("set-foreground-window",this.identity).then((()=>{}))}setBounds(e,t){return this.wire.sendAction("set-window-bounds",{...e,...this.identity,positioningOptions:t}).then((()=>{}))}show(e=!1){return this.wire.sendAction("show-window",{force:e,...this.identity}).then((()=>{}))}showAt(e,t,n=!1){return this.wire.sendAction("show-at-window",{force:n,left:Math.floor(e),top:Math.floor(t),...this.identity}).then((()=>{}))}updateOptions(e){return this.wire.sendAction("update-window-options",{options:e,...this.identity}).then((()=>{}))}authenticate(e,t){return this.wire.sendAction("window-authenticate",{userName:e,password:t,...this.identity}).then((()=>{}))}async showPopupMenu(e){const{payload:t}=await this.wire.sendAction("show-popup-menu",{options:e,...this.identity});return t.data}async closePopupMenu(){return this.wire.sendAction("close-popup-menu",{...this.identity}).then((()=>{}))}async dispatchPopupResult(e){this.wire.sendAction("window-dispatch-popup-result",this.identity).catch((e=>{})),await this.wire.sendAction("dispatch-popup-result",{data:e,...this.identity})}async print(e={content:"self"}){switch(e.content){case void 0:case"self":return super.print(e);case"screenshot":return this.wire.sendAction("print-screenshot",this.identity).then((()=>{}));case"views":return this.wire.sendAction("print-views",{...this.identity,options:e}).then((()=>{}));default:return}}}return S._Window=o,S}function ie(){return te||(te=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(function(){if(ee)return _;ee=1,Object.defineProperty(_,"__esModule",{value:!0}),_._WindowModule=void 0;const e=d,t=O,n=ne();class i extends e.Base{async wrap(e){this.wire.sendAction("window-wrap").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}wrapSync(e){this.wire.sendAction("window-wrap-sync").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}create(e){return this.wire.sendAction("create-window").catch((e=>{})),new n._Window(this.wire,{uuid:this.me.uuid,name:e.name}).createWindow(e)}getCurrent(){if(this.wire.sendAction("get-current-window").catch((e=>{})),!this.wire.me.isWindow)throw new Error("You are not in a Window context");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction("get-current-window-sync").catch((e=>{})),!this.wire.me.isWindow)throw new Error("You are not in a Window context");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return _._WindowModule=i,_}(),e),n(ne(),e)}(M)),M}Q.promisifySubscription=async(e,t,n=(()=>!0),i)=>{let r,o,s;const a=new Promise(((e,t)=>{r=e,o=t})),c=e=>{n(e)&&(clearTimeout(s),r(e))};return await e.on(t,c),i&&(s=setTimeout((()=>o(new Error("event timed out"))),i)),a.finally((()=>{e.removeListener(t,c).catch((()=>null))})),{getValue:()=>a}},Object.defineProperty(c,"__esModule",{value:!0}),c.System=void 0;const re=d,oe=g,se=ie(),ae=t;class ce extends re.EmitterBase{constructor(e){super(e,"system")}sendExternalProcessRequest(e,t){return new Promise(((n,i)=>{const r="external-process-exited";let o,s,a,c;"function"==typeof t.listener&&(a=e=>{const n=e||{};s={topic:"exited",uuid:n.processUuid||"",exitCode:n.exitCode||0},o===e.processUuid&&(t.listener(s),c.removeListener(r,a))},this.wire.me.name||(this.wire.me.name=this.wire.me.uuid),c=new se._Window(this.wire,this.wire.me),c.on(r,a)),this.wire.sendAction(e,t).then((({payload:e})=>{o=e.data.uuid,n(e.data),s&&o===s.uuid&&(t.listener(s),c.removeListener(r,a))})).catch((e=>{c&&c.removeListener(r,a),i(e)}))}))}getVersion(){return this.wire.sendAction("get-version").then((({payload:e})=>e.data))}clearCache(e){return this.wire.sendAction("clear-cache",e).then((()=>{}))}deleteCacheOnExit(){return this.wire.sendAction("delete-cache-request").then((()=>{}))}exit(){return this.wire.sendAction("exit-desktop").then((()=>{}))}async fetchManifest(e){const{payload:{data:t}}=await this.wire.sendAction("fetch-manifest",{manifestUrl:e});return t}flushCookieStore(){return this.wire.sendAction("flush-cookie-store").then((()=>{}))}getAllWindows(){return this.wire.sendAction("get-all-windows").then((({payload:e})=>e.data))}getAllApplications(){return this.wire.sendAction("get-all-applications").then((({payload:e})=>e.data))}getCommandLineArguments(){return this.wire.sendAction("get-command-line-arguments").then((({payload:e})=>e.data))}async getCrashReporterState(){const{payload:{data:{diagnosticMode:e,isRunning:t}}}=await this.wire.sendAction("get-crash-reporter-state");return console.warn("diagnosticMode property is deprecated. It will be removed in a future version"),{diagnosticMode:e,diagnosticsMode:e,isRunning:t}}async startCrashReporter(e){const t=e,n={...t,diagnosticMode:t.diagnosticsMode||t.diagnosticMode},{payload:{data:{diagnosticMode:i,isRunning:r}}}=await this.wire.sendAction("start-crash-reporter",n);return{diagnosticMode:i,diagnosticsMode:i,isRunning:r}}getUniqueUserId(){return this.wire.sendAction("get-unique-user-id").then((({payload:e})=>e.data))}getEntityInfo(e,t){return this.wire.sendAction("get-entity-info",{uuid:e,name:t}).then((({payload:e})=>e.data))}getEnvironmentVariable(e){return this.wire.sendAction("get-environment-variable",{environmentVariables:e}).then((({payload:e})=>e.data))}getFocusedWindow(){return this.wire.sendAction("get-focused-window").then((({payload:e})=>e.data))}async isAppCertified(e){const{payload:{data:{certifiedInfo:t}}}=await this.wire.sendAction("is-app-certified",{manifestUrl:e});return t}getInstalledRuntimes(){return this.wire.sendAction("get-installed-runtimes").then((({payload:e})=>e.data.runtimes))}async getInstalledApps(){const{payload:{data:{installedApps:e}}}=await this.wire.sendAction("get-installed-apps");return e}getLog(e){return this.wire.sendAction("view-log",e).then((({payload:e})=>e.data))}getMachineId(){return this.wire.sendAction("get-machine-id").then((({payload:e})=>e.data))}getMinLogLevel(){return this.wire.sendAction("get-min-log-level").then((({payload:e})=>e.data))}getLogList(){return this.wire.sendAction("list-logs").then((({payload:e})=>e.data))}getMonitorInfo(){return this.wire.sendAction("get-monitor-info").then((({payload:e})=>e.data))}getMousePosition(){return this.wire.sendAction("get-mouse-position").then((({payload:e})=>e.data))}getProcessList(){return console.warn("System.getProcessList has been deprecated. Please consider using our new process APIs: Window.getProcessInfo, View.getProcessInfo, Application.getProcessInfo, System.getAllProcessInfo"),this.wire.sendAction("process-snapshot").then((({payload:e})=>e.data))}async getAllProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction("get-all-process-info",this.identity);return e}getProxySettings(){return this.wire.sendAction("get-proxy-settings").then((({payload:e})=>e.data))}getRuntimeInfo(){return this.wire.sendAction("get-runtime-info").then((({payload:e})=>e.data))}getRvmInfo(){return this.wire.sendAction("get-rvm-info").then((({payload:e})=>e.data))}getHostSpecs(){return this.wire.sendAction("get-host-specs").then((({payload:e})=>e.data))}getOSInfo(){return this.wire.sendAction("get-os-info").then((({payload:e})=>e.data))}launchExternalProcess(e){return this.sendExternalProcessRequest("launch-external-process",e)}monitorExternalProcess(e){return this.sendExternalProcessRequest("monitor-external-process",e)}log(e,t){return this.wire.sendAction("write-to-log",{level:e,message:t}).then((()=>{}))}openUrlWithBrowser(e){return this.wire.sendAction("open-url-with-browser",{url:e}).then((()=>{}))}async registerCustomProtocol(e){if("object"!=typeof e)throw new Error("Must provide an object with a `protocolName` property having a string value.");await this.wire.sendAction("register-custom-protocol",e)}async unregisterCustomProtocol(e){await this.wire.sendAction("unregister-custom-protocol",{protocolName:e})}async getCustomProtocolState(e){return this.wire.sendAction("get-custom-protocol-state",{protocolName:e}).then((({payload:e})=>e.data))}releaseExternalProcess(e){return this.wire.sendAction("release-external-process",{uuid:e}).then((()=>{}))}showDeveloperTools(e){return this.wire.sendAction("show-developer-tools",e).then((()=>{}))}terminateExternalProcess(e){return this.wire.sendAction("terminate-external-process",e).then((()=>{}))}updateProxySettings(e){return this.wire.sendAction("update-proxy",e).then((()=>{}))}async downloadAsset(e,t){const n=()=>{};let i=n,r=n;const o=new Promise(((e,t)=>{i=e,r=t}));if("openfin"!==this.wire.environment.type)throw new oe.NotSupportedError("downloadAsset only supported in an OpenFin Render process");const s=oe.RuntimeError.getCallSite(),a=this.wire.environment.getNextMessageId().toString(),c=`asset-download-progress-${a}`,d=`asset-download-error-${a}`,h=`asset-download-complete-${a}`,l=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},u=()=>{this.removeListener(c,l)};await Promise.all([this.on(c,l),this.once(d,(e=>{u();const{reason:t,err:n}=e;r(new oe.RuntimeError({reason:t,error:n},s))})),this.once(h,(()=>{u(),i()}))]);const p=Object.assign(e,{downloadId:a});return await this.wire.sendAction("download-asset",p).catch((e=>{throw u(),e})),o}downloadRuntime(e,t){const n=oe.RuntimeError.getCallSite();return new Promise(((i,r)=>{if("openfin"!==this.wire.environment.type)return void r(new oe.NotSupportedError("downloadRuntime only supported in an OpenFin Render process"));const o=this.wire.environment.getNextMessageId().toString(),s=`runtime-download-progress-${o}`,a=`runtime-download-error-${o}`,c=`runtime-download-complete-${o}`,d=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},h=()=>{this.removeListener(s,d)};this.on(s,d),this.once(a,(e=>{h();const{reason:t,err:i}=e;r(new oe.RuntimeError({reason:t,error:i},n))})),this.once(c,(()=>{h(),i()}));const l=Object.assign(e,{downloadId:o});this.wire.sendAction("download-runtime",l).catch((e=>{h(),r(e)}))}))}downloadPreloadScripts(e){return this.wire.sendAction("download-preload-scripts",{scripts:e}).then((({payload:e})=>e.data))}getAllExternalApplications(){return this.wire.sendAction("get-all-external-applications").then((({payload:e})=>e.data))}getAppAssetInfo(e){return this.wire.sendAction("get-app-asset-info",e).then((({payload:e})=>e.data))}getCookies(e){const t=this.wire.environment.getUrl(),n=Object.assign(e,{url:t});return this.wire.sendAction("get-cookies",n).then((({payload:e})=>e.data))}setMinLogLevel(e){return this.wire.sendAction("set-min-log-level",{level:e}).then((()=>{}))}resolveUuid(e){return this.wire.sendAction("resolve-uuid",{entityKey:e}).then((({payload:e})=>e.data))}executeOnRemote(e,t){return t.requestingIdentity=e,this.wire.ferryAction(t)}readRegistryValue(e,t,n){return this.wire.sendAction("read-registry-value",{rootKey:e,subkey:t,value:n}).then((({payload:e})=>e.data))}registerExternalConnection(e){return this.wire.sendAction("register-external-connection",{uuid:e}).then((({payload:e})=>e.data))}async getServiceConfiguration(e){if("string"!=typeof e.name)throw new Error("Must provide an object with a `name` property having a string value");const{name:t}=e;return this.wire.sendAction("get-service-configuration",{name:t}).then((({payload:e})=>e.data))}async getSystemAppConfig(e){if("string"!=typeof e)throw new Error("Must provide a string value for name of system app");return this.wire.sendAction("get-system-app-configuration",{name:e}).then((({payload:e})=>e.data))}async registerShutdownHandler(e){this.wire.sendAction("system-register-shutdown-handler").catch((e=>{}));const{uuid:t,name:n}=this.wire.me;this.on("system-shutdown",(i=>{e({proceed:()=>{this.wire.environment.raiseEvent("application/system-shutdown-handled",{uuid:t,name:n,topic:"application"})}})}))}runRvmHealthCheck(){return this.wire.sendAction("run-rvm-health-check").then((({payload:e})=>e.data))}async launchManifest(e,t={}){const{subscribe:n,...i}=t,r=i;if(n){const e=new ae.EventEmitter;n(e);const t="app-version-progress",i="runtime-status",o="app-version-complete",s="app-version-error",a=this.wire.environment.getNextMessageId().toString();r.appVersionId=a;const c=[o,t,i,s],d=e=>{const{appVersionId:t,topic:n,type:i,...r}=e;return{...r,type:c.find((e=>i.includes(e)))}},h=t=>{const n=d(t);e.emit(n.type,n)},l=()=>{this.removeListener(`${t}.${a}`,h),this.removeListener(`${i}.${a}`,h),this.removeListener(`${o}.${a}`,h),this.removeListener(`${s}.${a}`,h),this.removeListener(`${o}.${a}`,l),this.removeListener(`${s}.${a}`,l)};await Promise.all([this.on(`${t}.${a}`,h),this.on(`${i}.${a}`,h),this.once(`${o}.${a}`,h),this.once(`${s}.${a}`,h),this.once(`${o}.${a}`,l),this.once(`${s}.${a}`,l)])}return(await this.wire.sendAction("launch-manifest",{manifestUrl:e,opts:r})).payload.data.manifest}async queryPermissionForCurrentContext(e){const t={uuid:this.wire.me.uuid,name:this.wire.me.name};return(await this.wire.sendAction("query-permission-for-current-context",{apiName:e,identity:t})).payload.data}async enableNativeWindowIntegrationProvider(e){const{payload:t}=await this.wire.sendAction("enable-native-window-integration-provider",{permissions:e});return t.data}async registerUsage({data:e,type:t}){await this.wire.sendAction("register-usage",{data:e,type:t})}async getPrinters(){const{payload:e}=await this.wire.sendAction("system-get-printers");return e.data}async updateProcessLoggingOptions(e){await this.wire.sendAction("system-update-process-logging-options",{options:e})}async getDomainSettings(){const{payload:{data:e}}=await this.wire.sendAction("get-domain-settings",this.identity);return e}async setDomainSettings(e){await this.wire.sendAction("set-domain-settings",{domainSettings:e,...this.identity})}async refreshExtensions(){const{payload:e}=await this.wire.sendAction("refresh-extensions");return e.data}async getInstalledExtensions(){const{payload:e}=await this.wire.sendAction("get-installed-extensions");return e.data}}c.System=ce;var de={},he={};Object.defineProperty(he,"__esModule",{value:!0}),he.RefCounter=void 0;he.RefCounter=class{constructor(){this.topicRefMap=new Map}incRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t+1;n=i,this.topicRefMap.set(e,i)}else this.topicRefMap.set(e,1),n=1;return n}decRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t-1;this.topicRefMap.set(e,i),n=i}else n=-1;return n}actOnFirst(e,t,n){return 1===this.incRefCount(e)?t():n()}actOnLast(e,t,n){return 0===this.decRefCount(e)?t():n()}};var le={},ue={},pe={};Object.defineProperty(pe,"__esModule",{value:!0}),pe.ChannelBase=pe.ProtectedItems=void 0;const we=e=>async(t,n,i)=>{const r=await e(t,n,i);return void 0===r?n:r};pe.ProtectedItems=class{constructor(e,t){this.providerIdentity=e,this.close=t}};class ye{static defaultAction(e){throw new Error(`No action registered at target for ${e}`)}constructor(){this.subscriptions=new Map}async processAction(e,t,n){try{const i=this.subscriptions.has(e)?this.subscriptions.get(e):(t,n)=>(this.defaultAction??ye.defaultAction)(e,t,n),r=this.preAction?await this.preAction(e,t,n):t,o=await i(r,n);return this.postAction?await this.postAction(e,o,n):o}catch(t){if(this.errorMiddleware)return this.errorMiddleware(e,t,n);throw t}}beforeAction(e){if(this.preAction)throw new Error("Already registered beforeAction middleware");this.preAction=we(e)}onError(e){if(this.errorMiddleware)throw new Error("Already registered error middleware");this.errorMiddleware=e}afterAction(e){if(this.postAction)throw new Error("Already registered afterAction middleware");this.postAction=we(e)}remove(e){this.subscriptions.delete(e)}setDefaultAction(e){if(this.defaultAction)throw new Error("default action can only be set once");this.defaultAction=e}register(e,t){if(this.subscriptions.has(e))throw new Error(`Subscription already registered for action: ${e}. Unsubscribe before adding new subscription`);return this.subscriptions.set(e,t),!0}}pe.ChannelBase=ye;var fe,ge,me,ve=s&&s.__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)},Ce=s&&s.__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};Object.defineProperty(ue,"__esModule",{value:!0}),ue.ChannelClient=void 0;const be=pe,Ie=new Map;class Ee extends be.ChannelBase{static closeChannelByEndpointId(e){const t=Ie.get(e);t&&ve(t,me,"f").call(t)}static handleProviderDisconnect(e){for(const t of Ie.values())t.providerIdentity.channelId===e.channelId&&(t.disconnectListener(e),ve(t,me,"f").call(t))}constructor(e,t,n){super(),fe.set(this,void 0),ge.set(this,void 0),this.processAction=(e,t,n)=>super.processAction(e,t,n),me.set(this,(()=>{Ie.delete(this.endpointId),ve(this,ge,"f").close()})),Ce(this,fe,new be.ProtectedItems(e,t),"f"),this.disconnectListener=()=>{},this.endpointId=e.endpointId,Ce(this,ge,n,"f"),Ie.set(this.endpointId,this),n.receive(this.processAction)}get providerIdentity(){return ve(this,fe,"f").providerIdentity}async dispatch(e,t){if(ve(this,ge,"f").isEndpointConnected(this.providerIdentity.channelId))return ve(this,ge,"f").send(this.providerIdentity.channelId,e,t);throw new Error("The client you are trying to dispatch from is disconnected from the target provider.")}onDisconnection(e){this.disconnectListener=t=>{try{e(t)}catch(e){throw new Error(`Error while calling the onDisconnection callback: ${e.message}`)}finally{this.disconnectListener=()=>{}}}}async disconnect(){await this.sendDisconnectAction(),ve(this,me,"f").call(this)}async sendDisconnectAction(){const e=ve(this,fe,"f");await e.close()}static async wireClose(e,t,n){const{channelName:i,uuid:r,name:o}=t;await e.sendAction("disconnect-from-channel",{channelName:i,uuid:r,name:o,endpointId:n})}}ue.ChannelClient=Ee,fe=new WeakMap,ge=new WeakMap,me=new WeakMap;var xe={},Ae={};Object.defineProperty(Ae,"__esModule",{value:!0}),Ae.exhaustiveCheck=void 0,Ae.exhaustiveCheck=function(e,t){throw new Error(`Unsupported value: ${e}${t?`\n Supported values are: ${t.join("")}`:""}`)};var Pe,Me,_e,Oe={},Se=s&&s.__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},Re=s&&s.__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)};Object.defineProperty(Oe,"__esModule",{value:!0}),Oe.ClassicInfo=Oe.ClassicStrategy=void 0;Oe.ClassicStrategy=class{constructor(e,t,n,i){this.messageReceiver=t,this.endpointId=n,this.providerIdentity=i,Pe.set(this,void 0),Me.set(this,new Map),_e.set(this,new Map),this.send=async(e,t,n)=>{const i=Re(this,Me,"f").get(e);if(!i)throw new Error(`Could not locate routing info for endpoint ${e}`);const r={...i};r.isLocalEndpointId&&delete r.endpointId,delete r.isLocalEndpointId;const o=Re(this,Pe,"f").sendAction("send-channel-message",{...r,providerIdentity:this.providerIdentity,action:t,payload:n});Re(this,_e,"f").get(e)?.add(o);return(await o.catch((e=>{throw new Error(e.message)})).finally((()=>{Re(this,_e,"f").get(e)?.delete(o)}))).payload.data.result},this.close=async()=>{this.messageReceiver.removeEndpoint(this.providerIdentity.channelId,this.endpointId),[...Re(this,Me,"f").keys()].forEach((e=>this.closeEndpoint(e))),Se(this,Me,new Map,"f")},Se(this,Pe,e,"f")}onEndpointDisconnect(e,t){}receive(e){this.messageReceiver.addEndpoint(e,this.providerIdentity.channelId,this.endpointId)}async closeEndpoint(e){const t=Re(this,Me,"f").get(e);Re(this,Me,"f").delete(e);const n=Re(this,_e,"f").get(e);n?.forEach((n=>{const i=`Channel connection with identity uuid: ${t?.uuid} / name: ${t?.name} / endpointId: ${e} no longer connected.`;n.cancel(new Error(i))}))}isEndpointConnected(e){return Re(this,Me,"f").has(e)}addEndpoint(e,t){Re(this,Me,"f").set(e,t.endpointIdentity),Re(this,_e,"f").set(e,new Set)}isValidEndpointPayload(e){return"string"==typeof e?.endpointIdentity?.endpointId||"string"==typeof e?.endpointIdentity?.channelId}},Pe=new WeakMap,Me=new WeakMap,_e=new WeakMap,Oe.ClassicInfo={version:5,minimumVersion:0,type:"classic"};var Fe={},je={},ke={};Object.defineProperty(ke,"__esModule",{value:!0}),ke.errorToPOJO=void 0,ke.errorToPOJO=function(e){return{stack:e.stack,name:e.name,message:e.message,toString:()=>e.stack||e.toString()}};var Le,Te,$e=s&&s.__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)},Be=s&&s.__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};Object.defineProperty(je,"__esModule",{value:!0}),je.RTCEndpoint=void 0;const Ge=ke;je.RTCEndpoint=class{static isValidEndpointPayload(e){const t=e=>"object"==typeof e&&null!==e;return t(e)&&t(e.endpointIdentity)&&t(e.rtc)&&"string"==typeof e.endpointIdentity.endpointId}constructor({rtc:e,endpointIdentity:t}){this.responseMap=new Map,Le.set(this,null),Te.set(this,void 0),this.connectionStateChangeHandler=e=>{"connected"!==this.rtc.rtcClient.connectionState&&(this.rtc.rtcClient.removeEventListener("connectionstatechange",this.connectionStateChangeHandler),this.close(),$e(this,Te,"f")&&$e(this,Te,"f").call(this))},this.send=async(e,t)=>{const n=`message-${Math.random()}`,i=new Promise(((e,t)=>{this.responseMap.set(n,{resolve:e,reject:t})}));return this.rtc.channels.request.send(JSON.stringify({action:e,payload:t,messageId:n})),i},this.close=()=>{this.responseMap.forEach((e=>e.reject("Connection has closed."))),this.responseMap=new Map,this.rtc.channels.request.close(),this.rtc.channels.response.close(),this.rtc.rtcClient.close()},this.rtc=e,this.endpointIdentity=t,this.rtc.channels.response.addEventListener("message",(e=>{let{data:t}=e;e.data instanceof ArrayBuffer&&(t=(new TextDecoder).decode(e.data));const{messageId:n,payload:i,success:r,error:o}=JSON.parse(t),{resolve:s,reject:a}=this.responseMap.get(n)??{};s&&a?(this.responseMap.delete(n),r?s(i):a(o)):(console.log("Could not find id in responseMap."),console.log(e))})),this.rtc.channels.request.addEventListener("message",(async e=>{let{data:n}=e;e.data instanceof ArrayBuffer&&(n=(new TextDecoder).decode(e.data));const{messageId:i,action:r,payload:o}=JSON.parse(n);if($e(this,Le,"f"))try{const e=await $e(this,Le,"f").call(this,r,o,t);this.rtc.channels.response.send(JSON.stringify({messageId:i,payload:e,success:!0}))}catch(e){"open"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,error:(0,Ge.errorToPOJO)(e),success:!1}))}else"open"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,success:!1,error:"Connection not ready."}))})),this.rtc.rtcClient.addEventListener("connectionstatechange",this.connectionStateChangeHandler),Object.values(this.rtc.channels).forEach((e=>{e.onclose=e=>{[...this.responseMap.values()].forEach((e=>e.reject(new Error("RTCDataChannel closed unexpectedly, this is most commonly caused by message size. Note: RTC Channels have a message size limit of ~255kB.")))),this.close(),$e(this,Te,"f")&&$e(this,Te,"f").call(this)}}))}onDisconnect(e){if($e(this,Te,"f"))throw new Error("RTCEndpoint disconnectListener cannot be set twice.");Be(this,Te,e,"f")}receive(e){if($e(this,Le,"f"))throw new Error("You have already set a listener for this RTC Endpoint.");Be(this,Le,e,"f")}get connected(){return"connected"===this.rtc.rtcClient.connectionState}},Le=new WeakMap,Te=new WeakMap;var We,He,Ne,De={},Ue=s&&s.__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)},Ve=s&&s.__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};Object.defineProperty(De,"__esModule",{value:!0}),De.EndpointStrategy=void 0;De.EndpointStrategy=class{constructor(e,t,n){this.EndpointType=e,this.StrategyName=n,We.set(this,null),He.set(this,new Map),Ne.set(this,!0),this.send=async(e,t,n)=>this.getEndpointById(e).send(t,n),this.close=async()=>{Ue(this,Ne,"f")&&(Ue(this,He,"f").forEach((e=>e.close())),Ve(this,He,new Map,"f")),Ve(this,Ne,!1,"f")},this.isValidEndpointPayload=t}onEndpointDisconnect(e,t){this.getEndpointById(e).onDisconnect(t)}receive(e){if(Ue(this,We,"f"))throw new Error(`You have already set a listener for this ${this.StrategyName} Strategy`);Ve(this,We,e,"f"),Ue(this,He,"f").forEach((e=>e.receive(Ue(this,We,"f"))))}getEndpointById(e){const t=Ue(this,He,"f").get(e);if(!t)throw new Error(`Client with endpoint id ${e} is not connected`);return t}get connected(){return Ue(this,Ne,"f")}isEndpointConnected(e){return Ue(this,He,"f").has(e)}addEndpoint(e,t){if(!Ue(this,Ne,"f"))return void console.warn(`Adding endpoint to disconnected ${this.StrategyName} Strategy`);const n=new this.EndpointType(t);Ue(this,We,"f")&&n.receive(Ue(this,We,"f")),Ue(this,He,"f").set(e,n)}async closeEndpoint(e){Ue(this,He,"f").delete(e)}},We=new WeakMap,He=new WeakMap,Ne=new WeakMap,Object.defineProperty(Fe,"__esModule",{value:!0}),Fe.RTCInfo=Fe.RTCStrategy=void 0;const ze=je,Ke=De;class qe extends Ke.EndpointStrategy{constructor(){super(ze.RTCEndpoint,ze.RTCEndpoint.isValidEndpointPayload,"RTC")}}Fe.RTCStrategy=qe,Fe.RTCInfo={version:2,minimumVersion:0,type:"rtc"};var Je={};Object.defineProperty(Je,"__esModule",{value:!0}),Je.RTCICEManager=void 0;const Ye=d;class Ze extends Ye.EmitterBase{constructor(e){super(e,"channel"),this.ensureChannelOpened=e=>new Promise(((t,n)=>{if("open"===e.readyState)t();else if("connecting"===e.readyState){const n=()=>{e.removeEventListener("open",n),t()};e.addEventListener("open",n)}else n(new Error("This Channel has already closed"))}))}static createDataChannelPromise(e,t){let n;const i=new Promise((e=>{n=e})),r=i=>{const o=()=>{i.channel.removeEventListener("open",o),n(i.channel)};i.channel.label===e&&(i.channel.addEventListener("open",o),t.removeEventListener("datachannel",r))};return t.addEventListener("datachannel",r),i}async listenForProviderIce(e,t){await this.on(this.createProviderEventName(e),t,{timestamp:Date.now()})}async raiseProviderIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createProviderEventName(e)),t)}async listenForClientIce(e,t){await this.on(this.createClientEventName(e),t,{timestamp:Date.now()})}async raiseClientIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createClientEventName(e)),t)}cleanupIceListeners(e){this.removeAllListeners(this.createClientEventName(e)),this.removeAllListeners(this.createProviderEventName(e))}createClientEventName(e){return`ice-client-${e}`}createProviderEventName(e){return`ice-provider-${e}`}createRouteString(e){return`channel/${e}`}createRtcPeer(){return this.wire.environment.getRtcPeer()}async startClientOffer(){const e=Math.random().toString(),t=this.createRtcPeer();t.addEventListener("icecandidate",(async t=>{t.candidate&&await this.raiseClientIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForProviderIce(e,(async e=>{await t.addIceCandidate(e.candidate)}));const n={request:t.createDataChannel("request"),response:t.createDataChannel("response")},i=await t.createOffer();await t.setLocalDescription(i);const r=Promise.all([n.request,n.response].map(this.ensureChannelOpened)).then((()=>{}));return{rtcClient:t,channels:n,offer:i,rtcConnectionId:e,channelsOpened:r}}async finishClientOffer(e,t,n){return await e.setRemoteDescription(t),await n,!0}async createProviderAnswer(e,t){const n=this.createRtcPeer(),i=Ze.createDataChannelPromise("request",n),r=Ze.createDataChannelPromise("response",n);n.addEventListener("icecandidate",(async t=>{t.candidate&&await this.raiseProviderIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForClientIce(e,(async e=>{await n.addIceCandidate(e.candidate)})),await n.setRemoteDescription(t);const o=await n.createAnswer();await n.setLocalDescription(o);const s=Promise.all([i,r]).then((([t,n])=>(this.cleanupIceListeners(e),{request:t,response:n})));return{rtcClient:n,answer:o,channels:s}}}Je.RTCICEManager=Ze;var Qe={},Xe={};function et(e){return[...e.split(".").reverse().entries()].reduce(((e,[t,n])=>e+ +n*1e4**t),0)}function tt(e,t){return et(e)>=et(t)}function nt(e){return e.split("/")[0]}Object.defineProperty(Xe,"__esModule",{value:!0}),Xe.runtimeUuidMeetsMinimumRuntimeVersion=Xe.parseRuntimeUuid=Xe.meetsMinimumRuntimeVersion=void 0,Xe.meetsMinimumRuntimeVersion=tt,Xe.parseRuntimeUuid=nt,Xe.runtimeUuidMeetsMinimumRuntimeVersion=function(e,t){return tt(nt(e),t)};var it,rt,ot,st,at,ct=s&&s.__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)},dt=s&&s.__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};Object.defineProperty(Qe,"__esModule",{value:!0}),Qe.ChannelProvider=void 0;const ht=pe,lt=Xe;class ut extends ht.ChannelBase{get connections(){return[...ct(this,it,"f")]}static handleClientDisconnection(e,t){const n=e.connections.find((e=>e.endpointId===t.endpointId));if(n)ct(e,st,"f").call(e,n);else{e.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name)).forEach(ct(e,st,"f"))}e.disconnectListener(t)}static setProviderRemoval(e,t){ut.removalMap.set(e,t)}constructor(e,t,n){super(),it.set(this,void 0),rt.set(this,void 0),ot.set(this,void 0),st.set(this,(e=>{const t=this.connections.filter((t=>t.endpointId!==e.endpointId));ct(this,ot,"f").closeEndpoint(e.endpointId),dt(this,it,t,"f")})),this.processAction=async(e,t,n)=>(ut.clientIsMultiRuntime(n)&&!(0,lt.runtimeUuidMeetsMinimumRuntimeVersion)(n.runtimeUuid,"18.87.56.0")?this.handleMultiRuntimeLegacyClient(n):this.checkForClientConnection(n),super.processAction(e,t,n)),at.set(this,(()=>{ct(this,ot,"f").close();const e=ut.removalMap.get(this);e&&e()})),dt(this,rt,new ht.ProtectedItems(e,t),"f"),this.connectListener=()=>{},this.disconnectListener=()=>{},dt(this,it,[],"f"),dt(this,ot,n,"f"),n.receive(this.processAction)}dispatch(e,t,n){const i=e.endpointId??this.getEndpointIdForOpenFinId(e,t);return i&&ct(this,ot,"f").isEndpointConnected(i)?ct(this,ot,"f").send(i,t,n):Promise.reject(new Error(`Client connection with identity uuid: ${e.uuid} / name: ${e.name} / endpointId: ${i} no longer connected.`))}async processConnection(e,t){return ct(this,it,"f").push(e),this.connectListener(e,t)}publish(e,t){return this.connections.map((n=>ct(this,ot,"f").send(n.endpointId,e,t)))}onConnection(e){this.connectListener=e}onDisconnection(e){this.disconnectListener=e}async destroy(){const e=ct(this,rt,"f");e.providerIdentity,dt(this,it,[],"f"),await e.close(),ct(this,at,"f").call(this)}async getAllClientInfo(){return this.connections.map((e=>{const{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}=e;return{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}}))}checkForClientConnection(e){if(!this.isClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider.\n Client Identity: {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}isClientConnected(e){return ut.clientIdentityIncludesEndpointId(e)?this.connections.some((t=>t.endpointId===e.endpointId&&t.uuid===e.uuid&&t.name===e.name)):this.isLegacyClientConnected(e)}isLegacyClientConnected(e){return this.connections.some((t=>t.uuid===e.uuid&&t.name===e.name))}handleMultiRuntimeLegacyClient(e){if(!this.isLegacyClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider. Client Identity:\n {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}getEndpointIdForOpenFinId(e,t){const n=this.connections.filter((t=>t.name===e.name&&t.uuid===e.uuid));if(n.length>=2){const n=ct(this,rt,"f"),{uuid:i,name:r}=e,o=n?.providerIdentity.uuid,s=n?.providerIdentity.name;console.warn(`WARNING: Dispatch call may have unintended results. The "to" argument of your dispatch call is missing the\n "endpointId" parameter. The identity you are dispatching to ({uuid: ${i}, name: ${r}})\n has multiple channelClients for this channel. Your dispatched action: (${t}) from the provider:\n ({uuid: ${o}, name: ${s}}) will only be processed by the most recently-created client.`)}return n.pop()?.endpointId}static clientIdentityIncludesEndpointId(e){return void 0!==e.endpointId}static clientIsMultiRuntime(e){return void 0!==e.runtimeUuid}static async wireClose(e,t){await e.sendAction("destroy-channel",{channelName:t})}}Qe.ChannelProvider=ut,it=new WeakMap,rt=new WeakMap,ot=new WeakMap,st=new WeakMap,at=new WeakMap,ut.removalMap=new WeakMap;var pt={};Object.defineProperty(pt,"__esModule",{value:!0}),pt.MessageReceiver=void 0;const wt=ue,yt=d;class ft extends yt.Base{constructor(e){super(e),this.onmessage=e=>"process-channel-message"===e.action&&(this.processChannelMessage(e),!0),this.endpointMap=new Map,this.latestEndpointIdByChannelId=new Map,e.registerMessageHandler(this.onmessage.bind(this))}async processChannelMessage(e){const{senderIdentity:t,providerIdentity:n,action:i,ackToSender:r,payload:o,intendedTargetIdentity:s}=e.payload,a=s.channelId??s.endpointId??this.latestEndpointIdByChannelId.get(n.channelId),c=this.endpointMap.get(a);if(!c)return r.payload.success=!1,r.payload.reason=`Client connection with identity uuid: ${this.wire.me.uuid} / name: ${this.wire.me.name} / endpointId: ${a} no longer connected.`,this.wire.sendRaw(r);try{const e=await c(i,o,t);return r.payload.payload=r.payload.payload||{},r.payload.payload.result=e,this.wire.sendRaw(r)}catch(e){return r.payload.success=!1,r.payload.reason=e.message,this.wire.sendRaw(r)}}addEndpoint(e,t,n){this.endpointMap.set(n,e),t!==n&&this.latestEndpointIdByChannelId.set(t,n)}removeEndpoint(e,t){this.endpointMap.delete(t),this.latestEndpointIdByChannelId.get(e)===t&&this.latestEndpointIdByChannelId.delete(e)}checkForPreviousClientConnection(e){const t=this.latestEndpointIdByChannelId.get(e);t&&(wt.ChannelClient.closeChannelByEndpointId(t),console.warn("You have created a second connection to an older provider. First connection has been removed from the clientMap"),console.warn("If the provider calls publish(), you may receive multiple messages."))}}pt.MessageReceiver=ft;var gt={};Object.defineProperty(gt,"__esModule",{value:!0}),gt.ProtocolManager=void 0;gt.ProtocolManager=class{constructor(e){this.ProtocolsInPreferenceOrder=e,this.DefaultClientProtocols=["classic"],this.DefaultProviderProtocols=["classic"],this.getClientProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultClientProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(", ")}.`);return t},this.getProviderProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultProviderProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(", ")}.`);return t},this.getCompatibleProtocols=(e,t)=>t.supportedProtocols.filter((t=>e.some((e=>e.type===t.type&&t.version>=e.minimumVersion&&e.version>=(t.minimumVersion??0))))).slice(0,t.maxProtocols)}};var mt={};Object.defineProperty(mt,"__esModule",{value:!0});class vt{static combine(e,t){return new vt(e,t)}constructor(e,t){this.primary=e,this.secondary=t}onEndpointDisconnect(e,t){this.primary.onEndpointDisconnect(e,(()=>{this.secondary.isEndpointConnected(e)||t()})),this.secondary.onEndpointDisconnect(e,(()=>{this.primary.isEndpointConnected(e)||t()}))}isValidEndpointPayload(e){return this.primary.isValidEndpointPayload(e)||this.secondary.isValidEndpointPayload(e)}async closeEndpoint(e){await this.primary.closeEndpoint(e),await this.secondary.closeEndpoint(e)}isEndpointConnected(e){return this.primary.isEndpointConnected(e)||this.secondary.isEndpointConnected(e)}async addEndpoint(e,t){this.primary.isValidEndpointPayload(t)&&await this.primary.addEndpoint(e,t),this.secondary.isValidEndpointPayload(t)&&await this.secondary.addEndpoint(e,t)}receive(e){this.primary.receive(e),this.secondary.receive(e)}send(e,t,n){return this.primary.isEndpointConnected(e)?this.primary.send(e,t,n):this.secondary.send(e,t,n)}async close(){await Promise.all([this.primary.close(),this.secondary.close()])}}mt.default=vt;var Ct,bt,It=s&&s.__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},Et=s&&s.__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)},xt=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(xe,"__esModule",{value:!0}),xe.ConnectionManager=void 0;const At=Ae,Pt=d,Mt=Oe,_t=Fe,Ot=Je,St=Qe,Rt=pt,Ft=gt,jt=xt(mt);class kt extends Pt.Base{static getProtocolOptionsFromStrings(e){return e.map((e=>{switch(e){case"rtc":return _t.RTCInfo;case"classic":return Mt.ClassicInfo;default:return(0,At.exhaustiveCheck)(e,["rtc","classic"])}}))}constructor(e){super(e),Ct.set(this,void 0),bt.set(this,void 0),this.removeChannelFromProviderMap=e=>{this.providerMap.delete(e)},this.onmessage=e=>"process-channel-connection"===e.action&&(this.processChannelConnection(e),!0),this.providerMap=new Map,this.protocolManager=new Ft.ProtocolManager("node"===this.wire.environment.type?["classic"]:["rtc","classic"]),It(this,Ct,new Rt.MessageReceiver(e),"f"),It(this,bt,new Ot.RTCICEManager(e),"f"),e.registerMessageHandler(this.onmessage.bind(this))}createProvider(e,t){const n=Object.assign(this.wire.environment.getDefaultChannelOptions().create,e||{}),i=this.protocolManager.getProviderProtocols(n?.protocols),r=i.map((e=>{switch(e){case"rtc":return new _t.RTCStrategy;case"classic":return new Mt.ClassicStrategy(this.wire,Et(this,Ct,"f"),t.channelId,t);default:return(0,At.exhaustiveCheck)(e,["rtc","classic"])}}));let o;if(2===r.length){const[e,t]=r;o=jt.default.combine(e,t)}else{if(1!==r.length)throw new Error("failed to combine strategies");[o]=r}const s=new St.ChannelProvider(t,(()=>St.ChannelProvider.wireClose(this.wire,t.channelName)),o),a=t.channelId;return this.providerMap.set(a,{provider:s,strategy:o,supportedProtocols:kt.getProtocolOptionsFromStrings(i)}),St.ChannelProvider.setProviderRemoval(s,this.removeChannelFromProviderMap.bind(this)),s}async createClientOffer(e){const t=this.protocolManager.getClientProtocols(e?.protocols);let n;return{offer:{supportedProtocols:await Promise.all(t.map((async e=>{switch(e){case"rtc":{const{rtcClient:e,channels:t,offer:i,rtcConnectionId:r,channelsOpened:o}=await Et(this,bt,"f").startClientOffer();return n={rtcClient:e,channels:t,channelsOpened:o},{type:"rtc",version:_t.RTCInfo.version,payload:{offer:i,rtcConnectionId:r}}}case"classic":return{type:"classic",version:Mt.ClassicInfo.version};default:return(0,At.exhaustiveCheck)(e,["rtc","classic"])}}))),maxProtocols:2},rtc:n}}async createClientStrategy(e,t){t.endpointId||(t.endpointId=this.wire.environment.getNextMessageId(),Et(this,Ct,"f").checkForPreviousClientConnection(t.channelId));const n=t.answer??{supportedProtocols:[{type:"classic",version:1}]},i=(await Promise.all(n.supportedProtocols.map((async n=>"rtc"===n.type&&e?(await Et(this,bt,"f").finishClientOffer(e.rtcClient,n.payload.answer,e.channelsOpened),new _t.RTCStrategy):"classic"===n.type?new Mt.ClassicStrategy(this.wire,Et(this,Ct,"f"),t.endpointId,t):null)))).filter((e=>null!==e));let r;if(e&&!i.some((e=>e instanceof _t.RTCStrategy))&&e&&e.rtcClient.close(),i.length>=2)r=jt.default.combine(i[0],i[1]);else{if(!i.length)throw new Error("No compatible protocols");[r]=i}const o={endpointIdentity:t,rtc:e};return r.addEndpoint(t.channelId,o),r}async processChannelConnection(e){const{clientIdentity:t,providerIdentity:n,ackToSender:i,payload:r,offer:o}=e.payload;t.endpointId?t.isLocalEndpointId=!1:(t.endpointId=this.wire.environment.getNextMessageId(),t.isLocalEndpointId=!0);const s=n.channelId,a=this.providerMap.get(s);if(!a)return i.payload.success=!1,i.payload.reason=`Channel "${n.channelName}" has been destroyed.`,this.wire.sendRaw(i);const{provider:c,strategy:d,supportedProtocols:h}=a;try{if(!(c instanceof St.ChannelProvider))throw Error("Cannot connect to a channel client");const e=o??{supportedProtocols:[{type:"classic",version:1}],maxProtocols:1},n=this.protocolManager.getCompatibleProtocols(h,e);if(!n.length)throw new Error("This provider does not support any of the offered protocols.");const s=await c.processConnection(t,r);i.payload.payload=i.payload.payload||{};let a={supportedProtocols:[],endpointPayloadPromise:Promise.resolve({endpointIdentity:t})};return a=await n.reduce((async(e,t)=>{const n=await e;if("rtc"===t.type){const{answer:e,rtcClient:i,channels:r}=await Et(this,bt,"f").createProviderAnswer(t.payload.rtcConnectionId,t.payload.offer);n.supportedProtocols.push({type:"rtc",version:_t.RTCInfo.version,payload:{answer:e}}),n.endpointPayloadPromise=n.endpointPayloadPromise.then((e=>r.then((t=>({...e,rtc:{rtcClient:i,channels:t}})))))}else n.supportedProtocols.push({type:"classic",version:Mt.ClassicInfo.version});return n}),Promise.resolve(a)),a.endpointPayloadPromise.then((e=>d.addEndpoint(t.endpointId,e))),i.payload.payload.result=s,i.payload.payload.answer=a,this.wire.sendRaw(i)}catch(e){return i.payload.success=!1,i.payload.reason=e.message,this.wire.sendRaw(i)}}}xe.ConnectionManager=kt,Ct=new WeakMap,bt=new WeakMap;var Lt,Tt,$t,Bt=s&&s.__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},Gt=s&&s.__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)};Object.defineProperty(le,"__esModule",{value:!0}),le.Channel=void 0;const Wt=t,Ht=G,Nt=d,Dt=ue,Ut=xe,Vt=Qe;function zt(e){const t=Math.floor(e/10),n=Math.min(3e4,500*2**t);return new Promise((e=>{setTimeout((()=>{e(!1)}),n)}))}class Kt extends Nt.EmitterBase{constructor(e){super(e,"channel"),Lt.set(this,void 0),Tt.set(this,new Wt.EventEmitter),$t.set(this,new Ht.AsyncRetryableLazy((async()=>{await Promise.all([this.on("disconnected",(e=>{Dt.ChannelClient.handleProviderDisconnect(e)})),this.on("connected",((...e)=>{Gt(this,Tt,"f").emit("connected",...e)}))]).catch((()=>new Error("error setting up channel connection listeners")))}))),Bt(this,Lt,new Ut.ConnectionManager(e),"f")}async getAllChannels(){return this.wire.sendAction("get-all-channels").then((({payload:e})=>e.data))}async onChannelConnect(e){await this.on("connected",e)}async onChannelDisconnect(e){await this.on("disconnected",e)}async safeConnect(e,t,n){const i={count:0};do{let r=()=>{};const o=new Promise((t=>{r=n=>{e===n.channelName&&t(!0)},Gt(this,Tt,"f").on("connected",r)}));try{if(i.count>0){i.gotConnectedEvent=await Promise.race([zt(i.count),o]);const t=await this.wire.sendAction("connect-to-channel",{...n,retryInfo:i});return console.log(`Successfully connected to channelName: ${e}`),t.payload.data}const t=this.wire.sendAction("connect-to-channel",n);i.originalMessageId=t.messageId;return(await t).payload.data}catch(n){if(!n.message.includes("internal-nack"))throw n;t&&0===i.count&&console.warn(`No channel found for channelName: ${e}. Waiting for connection...`)}finally{i.count+=1,Gt(this,Tt,"f").removeListener("connected",r)}}while(t);throw new Error(`No channel found for channelName: ${e}.`)}async connect(e,t={}){if(await Gt(this,$t,"f").getValue(),!e||"string"!=typeof e)throw new Error("Please provide a channelName string to connect to a channel.");const n={wait:!0,...this.wire.environment.getDefaultChannelOptions().connect,...t},{offer:i,rtc:r}=await Gt(this,Lt,"f").createClientOffer(n);let o;(this.fin.me.isFrame||this.fin.me.isView||this.fin.me.isWindow)&&(o=(await this.fin.me.getInfo()).url);const s={channelName:e,...n,offer:i,connectionUrl:o},a=await this.safeConnect(e,n.wait,s),c=await Gt(this,Lt,"f").createClientStrategy(r,a),d=new Dt.ChannelClient(a,(()=>Dt.ChannelClient.wireClose(this.wire,a,a.endpointId)),c);return c.onEndpointDisconnect(a.channelId,(async()=>{try{await d.sendDisconnectAction()}catch(e){console.warn(`Something went wrong during disconnect for client with uuid: ${a.uuid} / name: ${a.name} / endpointId: ${a.endpointId}.`)}finally{Dt.ChannelClient.handleProviderDisconnect(a)}})),d}async create(e,t){if(!e)throw new Error("Please provide a channelName to create a channel");const{payload:{data:n}}=await this.wire.sendAction("create-channel",{channelName:e}),i=Gt(this,Lt,"f").createProvider(t,n);return this.on("client-disconnected",(t=>{t.channelName===e&&Vt.ChannelProvider.handleClientDisconnection(i,t)})),i}}le.Channel=Kt,Lt=new WeakMap,Tt=new WeakMap,$t=new WeakMap,Object.defineProperty(de,"__esModule",{value:!0}),de.InterAppPayload=de.InterApplicationBus=void 0;const qt=t,Jt=d,Yt=he,Zt=le,Qt=O;class Xt extends Jt.Base{constructor(e){super(e),this.events={subscriberAdded:"subscriber-added",subscriberRemoved:"subscriber-removed"},this.refCounter=new Yt.RefCounter,this.Channel=new Zt.Channel(e),this.emitter=new qt.EventEmitter,e.registerMessageHandler(this.onmessage.bind(this)),this.on=this.emitter.on.bind(this.emitter),this.removeAllListeners=this.emitter.removeAllListeners.bind(this.emitter)}async publish(e,t){await this.wire.sendAction("publish-message",{topic:e,message:t,sourceWindowName:this.me.name})}async send(e,t,n){const i=(0,Qt.validateIdentity)(e);if(i)throw new Error(i);await this.wire.sendAction("send-message",{destinationUuid:e.uuid,destinationWindowName:e.name,topic:t,message:n,sourceWindowName:this.me.name})}subscribe(e,t,n){const i=this.createSubscriptionKey(e.uuid,e.name||"*",t);return this.emitter.on(i,n),this.refCounter.actOnFirst(i,(async()=>{await this.wire.sendAction("subscribe",{sourceUuid:e.uuid,sourceWindowName:e.name||"*",topic:t,destinationWindowName:this.me.name})}),(()=>Promise.resolve()))}unsubscribe(e,t,n){const i=e.name||"*",r=this.createSubscriptionKey(e.uuid,i,t);return this.emitter.removeListener(r,n),this.refCounter.actOnLast(r,(async()=>{await this.wire.sendAction("unsubscribe",{sourceUuid:e.uuid,sourceWindowName:i,topic:t,destinationWindowName:this.me.name})}),(()=>new Promise((e=>e)).then((()=>{}))))}processMessage(e){const{payload:{message:t,sourceWindowName:n,sourceUuid:i,topic:r}}=e,o=[this.createSubscriptionKey(i,n,r),this.createSubscriptionKey(i,"*",r),this.createSubscriptionKey("*","*",r)],s={uuid:i,name:n};o.forEach((e=>{this.emitter.emit(e,t,s)}))}emitSubscriverEvent(e,t){const{payload:{targetName:n,uuid:i,topic:r}}=t,o={name:n,uuid:i,topic:r};this.emitter.emit(e,o)}createSubscriptionKey(e,t,n){const i=t||"*";if(!(e&&i&&n))throw new Error("Missing uuid, name, or topic string");return function(...e){return e.map((e=>Buffer.from(`${e}`).toString("base64"))).join("/")}(e,i,n)}onmessage(e){const{action:t}=e;switch(t){case"process-message":this.processMessage(e);break;case this.events.subscriberAdded:this.emitSubscriverEvent(this.events.subscriberAdded,e);break;case this.events.subscriberRemoved:this.emitSubscriverEvent(this.events.subscriberRemoved,e)}return!0}}de.InterApplicationBus=Xt;de.InterAppPayload=class{};var en={};Object.defineProperty(en,"__esModule",{value:!0}),en.Clipboard=void 0;const tn=d;class nn extends tn.Base{async writeText(e){await this.wire.sendAction("clipboard-write-text",e)}async readText(e){const{payload:t}=await this.wire.sendAction("clipboard-read-text",{type:e});return t.data}async writeImage(e){await this.wire.sendAction("clipboard-write-image",e)}async readImage(e={format:"dataURL"}){const{payload:t}=await this.wire.sendAction("clipboard-read-image",e);return t.data}async writeHtml(e){await this.wire.sendAction("clipboard-write-html",e)}async readHtml(e){const{payload:t}=await this.wire.sendAction("clipboard-read-html",{type:e});return t.data}async writeRtf(e){await this.wire.sendAction("clipboard-write-rtf",e)}async readRtf(e){const{payload:t}=await this.wire.sendAction("clipboard-read-rtf",{type:e});return t.data}async write(e){await this.wire.sendAction("clipboard-write",e)}async getAvailableFormats(e){const{payload:t}=await this.wire.sendAction("clipboard-read-formats",{type:e});return t.data}}en.Clipboard=nn;var rn={},on={},sn={};Object.defineProperty(sn,"__esModule",{value:!0}),sn.ExternalApplication=void 0;const an=d;class cn extends an.EmitterBase{constructor(e,t){super(e,"external-application",t.uuid),this.identity=t}getInfo(){return this.wire.sendAction("get-external-application-info",this.identity).then((({payload:e})=>e.data))}}sn.ExternalApplication=cn,Object.defineProperty(on,"__esModule",{value:!0}),on.ExternalApplicationModule=void 0;const dn=d,hn=sn;class ln extends dn.Base{wrap(e){return this.wire.sendAction("external-application-wrap").catch((e=>{})),Promise.resolve(new hn.ExternalApplication(this.wire,{uuid:e}))}wrapSync(e){return this.wire.sendAction("external-application-wrap-sync").catch((e=>{})),new hn.ExternalApplication(this.wire,{uuid:e})}}on.ExternalApplicationModule=ln,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(on,e),n(sn,e)}(rn);var un={},pn={},wn={};Object.defineProperty(wn,"__esModule",{value:!0}),wn._Frame=void 0;const yn=d;class fn extends yn.EmitterBase{constructor(e,t){super(e,"frame",t.uuid,t.name),this.identity=t}getInfo(){return this.wire.sendAction("get-frame-info",this.identity).then((({payload:e})=>e.data))}getParentWindow(){return this.wire.sendAction("get-parent-window",this.identity).then((({payload:e})=>e.data))}}wn._Frame=fn,Object.defineProperty(pn,"__esModule",{value:!0}),pn._FrameModule=void 0;const gn=d,mn=O,vn=wn;class Cn extends gn.Base{async wrap(e){this.wire.sendAction("frame-wrap").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}wrapSync(e){this.wire.sendAction("frame-wrap-sync").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}getCurrent(){return this.wire.sendAction("frame-get-current").catch((e=>{})),Promise.resolve(new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity()))}getCurrentSync(){return this.wire.sendAction("frame-get-current-sync").catch((e=>{})),new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity())}}pn._FrameModule=Cn,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(pn,e),n(wn,e)}(un);var bn={};Object.defineProperty(bn,"__esModule",{value:!0}),bn.GlobalHotkey=void 0;const In=d;class En extends In.EmitterBase{constructor(e){super(e,"global-hotkey")}async register(e,t){await this.on(e,t),await this.wire.sendAction("global-hotkey-register",{hotkey:e})}async unregister(e){await this.removeAllListeners(e),await this.wire.sendAction("global-hotkey-unregister",{hotkey:e})}async unregisterAll(){await Promise.all(this.eventNames().filter((e=>!("registered"===e||"unregistered"===e))).map((e=>this.removeAllListeners(e)))),await this.wire.sendAction("global-hotkey-unregister-all",{})}async isRegistered(e){const{payload:{data:t}}=await this.wire.sendAction("global-hotkey-is-registered",{hotkey:e});return t}}bn.GlobalHotkey=En;var xn,An={},Pn={},Mn={},_n=s&&s.__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)};Object.defineProperty(Mn,"__esModule",{value:!0}),Mn.Platform=void 0;const On=d,Sn=O,Rn=new Map;class Fn extends On.EmitterBase{constructor(e,t){super(t.wire,"application",e.uuid),this.getClient=e=>{this.wire.sendAction("platform-get-client",this.identity).catch((e=>{}));const t=e||this.identity,{uuid:n}=t;if(!Rn.has(n)){const e=_n(this,xn,"f").call(this,n);Rn.set(n,e)}return Rn.get(n)},xn.set(this,(async e=>{try{const t=`custom-frame-${e}`,n=await this._channel.connect(t,{wait:!1});return n.onDisconnection((()=>{Rn.delete(e)})),n}catch(t){throw Rn.delete(e),new Error("The targeted Platform is not currently running. Listen for application-started event for the given Uuid.")}})),this.launchLegacyManifest=this.launchContentManifest;const n=(0,Sn.validateIdentity)(e);if(n)throw new Error(n);this._channel=t,this.identity={uuid:e.uuid},this.Layout=this.fin.Platform.Layout,this.Application=this.fin.Application.wrapSync(this.identity)}async createView(e,t,n){this.wire.sendAction("platform-create-view",this.identity).catch((e=>{}));const i=await this.getClient(),r=await i.dispatch("create-view",{target:t,opts:e,targetView:n});if(!r||(0,Sn.validateIdentity)(r.identity))throw new Error(`When overwriting the createView call, please return an object that has a valid 'identity' property: ${JSON.stringify(r)}`);return this.fin.View.wrapSync(r.identity)}async createWindow(e){this.wire.sendAction("platform-create-window",this.identity).catch((e=>{}));const t=await this.getClient();e.reason||(e.reason="api-call");const n=await t.dispatch("create-view-container",e);if(!n||(0,Sn.validateIdentity)(n.identity))throw new Error(`When overwriting the createWindow call, please return an object that has a valid 'identity' property: ${JSON.stringify(n)}`);const{identity:i}=n,r=this.fin.Window.wrapSync(i);return r.name=i.name,r.uuid=i.uuid,r}async quit(){this.wire.sendAction("platform-quit",this.identity).catch((e=>{}));return(await this.getClient()).dispatch("quit")}async closeView(e){this.wire.sendAction("platform-close-view",this.identity).catch((e=>{}));const t=await this.getClient();await t.dispatch("close-view",{view:e})}async reparentView(e,t){console.warn("Platform.reparentView has been deprecated, please use Platform.createView"),this.wire.sendAction("platform-reparent-view",this.identity).catch((e=>{}));const n={...e,uuid:e.uuid??this.identity.uuid},i=await this.fin.View.wrap(n),r=await i.getOptions();return this.createView(r,t)}async getSnapshot(){this.wire.sendAction("platform-get-snapshot",this.identity).catch((e=>{}));return(await this.getClient()).dispatch("get-snapshot")}async getViewSnapshot(e){return(await this.getClient()).dispatch("get-view-snapshot",{viewIdentity:e})}async applySnapshot(e,t){this.wire.sendAction("platform-apply-snapshot",this.identity).catch((e=>{}));const n="Requested snapshot must be a valid Snapshot object, or a url or filepath to such an object.";let i;if("string"==typeof e)try{i=(await this._channel.wire.sendAction("get-application-manifest",{manifestUrl:e})).payload.data}catch(e){throw new Error(`${n}: ${e}`)}else i=e;if(!i.windows)throw new Error(n);const r=await this.getClient();return await r.dispatch("apply-snapshot",{snapshot:i,options:t}),this}async fetchManifest(e){return(await this.getClient()).dispatch("platform-fetch-manifest",{manifestUrl:e})}async launchContentManifest(e){this.wire.sendAction("platform-launch-content-manifest",this.identity).catch((()=>{}));const t=await this.getClient(),n=await this.fetchManifest(e);return t.dispatch("launch-into-platform",{manifest:n,manifestUrl:e}),this}async setWindowContext(e={},t){if(this.wire.sendAction("platform-set-window-context",this.identity).catch((e=>{})),!e)throw new Error("Please provide a serializable object or string to set the context.");const n=await this.getClient(),{entityType:i}=t?await this.fin.System.getEntityInfo(t.uuid,t.name):this.fin.me;await n.dispatch("set-window-context",{context:e,entityType:i,target:t||{uuid:this.fin.me.uuid,name:this.fin.me.name}})}async getWindowContext(e){this.wire.sendAction("platform-get-window-context",this.identity).catch((e=>{}));const t=await this.getClient(),{entityType:n}=e?await this.fin.System.getEntityInfo(e.uuid,e.name):this.fin.me;return t.dispatch("get-window-context",{target:e||{uuid:this.fin.me.uuid,name:this.fin.me.name},entityType:n})}async closeWindow(e,t={skipBeforeUnload:!1}){this.wire.sendAction("platform-close-window",this.identity).catch((e=>{}));return(await this.getClient()).dispatch("close-window",{windowId:e,options:t})}}Mn.Platform=Fn,xn=new WeakMap;var jn={},kn={},Ln={},Tn={};function $n(e){switch(e){case"columns":case"grid":case"rows":case"tabs":return!0;default:return!1}}Object.defineProperty(Tn,"__esModule",{value:!0}),Tn.overrideFromComposables=Tn.isValidPresetType=void 0,Tn.isValidPresetType=$n,Tn.overrideFromComposables=function(...e){return t=>e.reduceRight(((e,t)=>n=>t(e(n))),(e=>e))(t)},Tn.default={isValidPresetType:$n};var Bn={},Gn={},Wn={};Object.defineProperty(Wn,"__esModule",{value:!0}),Wn.ApiConsumer=void 0;Wn.ApiConsumer=class{constructor(e){this.strategy=e,this.consume=async e=>(await this.strategy.getExposedFunctions(e)).reduce(((t,n)=>({...t,[n.key]:this.strategy.createFunction(n,e)})),{})}};var Hn={},Nn={};Object.defineProperty(Nn,"__esModule",{value:!0}),Nn.expose=Nn.getExposedProperties=void 0;const Dn=Symbol("exposedProperties");Nn.getExposedProperties=e=>e[Dn]||e.prototype[Dn]||[];Nn.expose=e=>(t,n,i)=>{t[Dn]=t[Dn]||[],t[Dn].push({key:n,descriptor:i,options:e})},Object.defineProperty(Hn,"__esModule",{value:!0}),Hn.ApiExposer=void 0;const Un=Nn;Hn.ApiExposer=class{constructor(e){this.strategy=e,this.exposeInstance=async(e,t)=>{const n=(0,Un.getExposedProperties)(e),i=await Promise.all(n.map((async({key:n,options:i})=>({key:n,options:await this.strategy.exposeFunction(e[n].bind(e),{key:n,options:i,meta:t})}))));await this.strategy.exposeMeta(t,i)}}};var Vn={},zn={},Kn={};Object.defineProperty(Kn,"__esModule",{value:!0}),Kn.ChannelsConsumer=void 0;Kn.ChannelsConsumer=class{constructor(e){this.channel=e,this.getExposedFunctions=async e=>{const{id:t}=e,{props:n}=await this.channel.dispatch(`api-meta:${t}`);return n},this.createFunction=e=>(...t)=>{const{action:n}=e.options;return this.channel.dispatch(n,{args:t})}}};var qn={};Object.defineProperty(qn,"__esModule",{value:!0}),qn.ChannelsExposer=void 0;qn.ChannelsExposer=class{constructor(e){this.channelProviderOrClient=e,this.exposeFunction=async(e,t)=>{const{key:n,options:i,meta:r}=t,{id:o}=r,s=`${o}.${i?.action||n}`;return await this.channelProviderOrClient.register(s,(async({args:t})=>e(...t))),{action:s}},this.exposeMeta=async({id:e},t)=>{const n=`api-meta:${e}`;await this.channelProviderOrClient.register(n,(()=>({props:t})))}}},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Kn,e),n(qn,e)}(zn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(zn,e)}(Vn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Wn,e),n(Hn,e),n(Vn,e),n(Nn,e)}(Gn);var Jn={};Object.defineProperty(Jn,"__esModule",{value:!0}),Jn.createRelayedDispatch=exports.relayChannelClientApi_1=Jn.relayChannelClientApi=void 0;const Yn=["no longer connected","RTCDataChannel closed unexpectedly","The client you are trying to dispatch from is disconnected from the target provider"];exports.relayChannelClientApi_1=Jn.relayChannelClientApi=async(e,t)=>{e.register(`relay:${t}`,(({action:t,target:n,payload:i})=>e.dispatch(n,t,i))),await Promise.resolve()};Jn.createRelayedDispatch=(e,t,n,i)=>async(r,o)=>{try{return await e.dispatch(`relay:${n}`,{action:r,payload:o,target:t})}catch(e){if(s=e.message,Yn.some((e=>s.includes(e)))&&i)throw new Error(i);throw e}var s};var Zn,Qn,Xn,ei=s&&s.__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},ti=s&&s.__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)};Object.defineProperty(Bn,"__esModule",{value:!0}),Bn.ColumnOrRow=Bn.TabStack=Bn.LayoutNode=void 0;const ni=Gn,ii=Jn;class ri{constructor(e,t){Zn.set(this,void 0),this.isRoot=()=>ti(this,Zn,"f").isRoot(this.entityId),this.exists=()=>ti(this,Zn,"f").exists(this.entityId),this.getParent=async()=>{const e=await ti(this,Zn,"f").getParent(this.entityId);if(e)return ri.getEntity(e,ti(this,Zn,"f"))},this.createAdjacentStack=async(e,t)=>{const n=await ti(this,Zn,"f").createAdjacentStack(this.entityId,e,t);return ri.getEntity({entityId:n,type:"stack"},ti(this,Zn,"f"))},this.getAdjacentStacks=async e=>(await ti(this,Zn,"f").getAdjacentStacks({targetId:this.entityId,edge:e})).map((e=>ri.getEntity({type:"stack",entityId:e.entityId},ti(this,Zn,"f")))),ei(this,Zn,e,"f"),this.entityId=t}}Bn.LayoutNode=ri,Zn=new WeakMap,ri.newLayoutEntitiesClient=async(e,t,n)=>{const i=(0,ii.createRelayedDispatch)(e,n,"layout-relay","You are trying to interact with a layout component on a window that does not exist or has been destroyed.");return new ni.ApiConsumer(new ni.ChannelsConsumer({dispatch:i})).consume({id:t})},ri.getEntity=(e,t)=>{const{entityId:n,type:i}=e;switch(i){case"column":case"row":return new si(t,n,i);case"stack":return new oi(t,n);default:throw new Error(`Unrecognised Layout Entity encountered ('${JSON.stringify(e)})`)}};class oi extends ri{constructor(e,t){super(e,t),Qn.set(this,void 0),this.type="stack",this.getViews=()=>ti(this,Qn,"f").getStackViews(this.entityId),this.addView=async(e,t={index:0})=>ti(this,Qn,"f").addViewToStack(this.entityId,e,t),this.removeView=async e=>{await ti(this,Qn,"f").removeViewFromStack(this.entityId,e)},this.setActiveView=async e=>{await ti(this,Qn,"f").setStackActiveView(this.entityId,e)},ei(this,Qn,e,"f")}}Bn.TabStack=oi,Qn=new WeakMap;class si extends ri{constructor(e,t,n){super(e,t),Xn.set(this,void 0),this.getContent=async()=>(await ti(this,Xn,"f").getContent(this.entityId)).map((e=>ri.getEntity(e,ti(this,Xn,"f")))),ei(this,Xn,e,"f"),this.type=n}}Bn.ColumnOrRow=si,Xn=new WeakMap;var ai={};Object.defineProperty(ai,"__esModule",{value:!0}),ai.DEFAULT_LAYOUT_KEY=ai.LAYOUT_CONTROLLER_ID=void 0,ai.LAYOUT_CONTROLLER_ID="layout-entities",ai.DEFAULT_LAYOUT_KEY="__default__";var ci,di,hi,li=s&&s.__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)};Object.defineProperty(Ln,"__esModule",{value:!0}),Ln.Layout=void 0;const ui=G,pi=O,wi=d,yi=Tn,fi=Bn,gi=ai;class mi extends wi.Base{static getClient(e){return li(e,di,"f").getValue()}constructor(e,t){super(t),ci.add(this),di.set(this,new ui.Lazy((async()=>fi.LayoutNode.newLayoutEntitiesClient(await this.platform.getClient(),gi.LAYOUT_CONTROLLER_ID,this.identity)))),this.replace=async e=>{this.wire.sendAction("layout-replace").catch((e=>{}));const t=await this.platform.getClient();await t.dispatch("replace-layout",{target:this.identity,opts:{layout:e}})},this.replaceView=async(e,t)=>{this.wire.sendAction("layout-replace-view").catch((e=>{}));const n=await this.platform.getClient();await n.dispatch("replace-view",{target:this.identity,opts:{viewToReplace:e,newView:t}})},this.applyPreset=async e=>{this.wire.sendAction("layout-apply-preset").catch((e=>{}));const t=await this.platform.getClient(),{presetType:n}=e;if(!n||!(0,yi.isValidPresetType)(n))throw new Error("Cannot apply preset layout, please include an applicable presetType property in the PresetLayoutOptions.");await t.dispatch("apply-preset-layout",{target:this.identity,opts:{presetType:n}})};const n=(0,pi.validateIdentity)(e);if(n)throw new Error(n);this.identity=e,this.platform=this.fin.Platform.wrapSync({uuid:e.uuid}),e.uuid===this.fin.me.uuid&&e.name===this.fin.me.name&&(this.init=this.fin.Platform.Layout.init)}async getConfig(){this.wire.sendAction("layout-get-config").catch((e=>{}));return(await this.platform.getClient()).dispatch("get-frame-snapshot",{target:this.identity})}async getCurrentViews(){this.wire.sendAction("layout-get-views").catch((e=>{}));const e=await this.platform.getClient();return(await e.dispatch("get-layout-views",{target:this.identity})).map((e=>this.fin.View.wrapSync(e)))}async getRootItem(){this.wire.sendAction("layout-get-root-item").catch((()=>{}));const e=await li(this,di,"f").getValue(),t=await e.getRoot("layoutName"in this.identity?this.identity:void 0);return fi.LayoutNode.getEntity(t,e)}async getStackByViewIdentity(e){this.wire.sendAction("layout-get-stack-by-view").catch((()=>{}));const t=await li(this,di,"f").getValue(),n=await t.getStackByView(e);if(!n)throw new Error(`No stack found for view: ${e.uuid}/${e.name}`);return fi.LayoutNode.getEntity(n,t)}async addView(e,{location:t,targetView:n}={}){this.wire.sendAction("layout-add-view").catch((e=>{}));const{identity:i}=await li(this,ci,"m",hi).call(this,"layout-add-view",{viewOptions:e,location:t,targetView:n});return{identity:i}}async closeView(e){this.wire.sendAction("layout-close-view").catch((e=>{})),await li(this,ci,"m",hi).call(this,"layout-close-view",{viewIdentity:e})}}Ln.Layout=mi,di=new WeakMap,ci=new WeakSet,hi=async function(e,t){return(await this.platform.getClient()).dispatch(e,{target:this.identity,opts:t})};var vi,Ci,bi,Ii,Ei,xi=s&&s.__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)},Ai=s&&s.__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};Object.defineProperty(kn,"__esModule",{value:!0}),kn.LayoutModule=void 0;const Pi=d,Mi=Ln,_i=ai;class Oi extends Pi.Base{constructor(){super(...arguments),vi.add(this),Ci.set(this,!1),bi.set(this,null),this.init=async(e={})=>{if(this.wire.sendAction("layout-init").catch((e=>{})),!this.wire.environment.layoutAllowedInContext(this.fin))throw new Error("Layout.init can only be called from a Window context.");if(xi(this,Ci,"f"))throw new Error("Layout.init was already called, please use Layout.create to add additional layouts.");"openfin"===this.wire.environment.type&&await this.fin.Platform.getCurrentSync().getClient(),Ai(this,Ci,!0,"f"),Ai(this,bi,await this.wire.environment.initLayoutManager(this.fin,this.wire,e),"f"),await this.wire.environment.applyLayoutSnapshot(this.fin,xi(this,bi,"f"),e);const t={name:this.fin.me.name,uuid:this.fin.me.uuid};if(!e.layoutManagerOverride){const e={layoutName:_i.DEFAULT_LAYOUT_KEY,...t};return xi(this,Ii,"f").call(this,e)}return this.wrapSync(t)},Ii.set(this,(e=>{const t="[Layout] You are using a deprecated property `layoutManager` - it will throw if you access it starting in v37.",n=new Proxy({},{get(e,n){throw console.warn(`[Layout-mgr-proxy] accessing ${n.toString()}`),new Error(t)}}),i=Object.assign(this.wrapSync(e),{layoutManager:n});return new Proxy(i,{get(e,n){if("layoutManager"===n)throw console.warn(`[Layout-proxy] accessing ${n.toString()}`),new Error(t);return e[n]}})})),this.getCurrentLayoutManagerSync=()=>xi(this,vi,"m",Ei).call(this,"fin.Platform.Layout.getCurrentLayoutManagerSync()"),this.create=async e=>this.wire.environment.createLayout(xi(this,vi,"m",Ei).call(this,"fin.Platform.Layout.create()"),e),this.destroy=async e=>this.wire.environment.destroyLayout(xi(this,vi,"m",Ei).call(this,"fin.Platform.Layout.destroy()"),e)}async wrap(e){return this.wire.sendAction("layout-wrap").catch((e=>{})),new Mi.Layout(e,this.wire)}wrapSync(e){return this.wire.sendAction("layout-wrap-sync").catch((e=>{})),new Mi.Layout(e,this.wire)}async getCurrent(){if(this.wire.sendAction("layout-get-current").catch((e=>{})),"openfin"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error("You are not in a Window context. Only Windows can have a Layout.");const{uuid:e,name:t}=this.fin.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction("layout-get-current-sync").catch((e=>{})),"openfin"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error("You are not in a Window context. Only Windows can have a Layout.");const{uuid:e,name:t}=this.fin.me;return this.wrapSync({uuid:e,name:t})}async getLayoutByViewIdentity(e){this.wire.sendAction("layout-get-by-view-identity").catch((()=>{}));let t=await this.wire.environment.getViewWindowIdentity(this.fin,e);t.identity&&(t=t.identity);try{const n=this.wrapSync(t),i=await Mi.Layout.getClient(n),r=await i.getLayoutIdentityForViewOrThrow(e);return this.wrapSync(r)}catch(n){if(!["No action registered at target for","getLayoutIdentityForViewOrThrow is not a function"].some((e=>n.message.includes(e))))throw n;if(t.uuid===t.name)throw new Error(`View identity ${JSON.stringify(e)} is not attached to any layout in provider window ${JSON.stringify(t)}.`);return this.wrapSync(t)}}}kn.LayoutModule=Oi,Ci=new WeakMap,bi=new WeakMap,Ii=new WeakMap,vi=new WeakSet,Ei=function(e){if(!xi(this,bi,"f"))throw new Error(`You must call init before using the API ${e}`);return xi(this,bi,"f")},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(kn,e),n(Ln,e)}(jn),Object.defineProperty(Pn,"__esModule",{value:!0}),Pn.PlatformModule=void 0;const Si=d,Ri=Mn,Fi=jn;class ji extends Si.Base{constructor(e,t){super(e),this._channel=t,this.Layout=new Fi.LayoutModule(this.wire)}async init(e){if(!fin.__internal_.isPlatform||fin.me.name!==fin.me.uuid)throw new Error("fin.Platform.init should only be called from a custom platform provider running in the main window of the application.");return this.wire.environment.initPlatform(this.fin,e)}async wrap(e){return this.wire.sendAction("platform-wrap").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}wrapSync(e){return this.wire.sendAction("platform-wrap-sync").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}async getCurrent(){return this.wire.sendAction("platform-get-current").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction("platform-get-current-sync").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}start(e){return this.wire.sendAction("platform-start").catch((e=>{})),new Promise((async(t,n)=>{try{const{uuid:n}=e,i=await this.fin.Application._create({...e,isPlatformController:!0});i.once("platform-api-ready",(()=>t(this.wrapSync({uuid:n})))),i._run({uuid:n})}catch(e){n(e)}}))}startFromManifest(e,t){return this.wire.sendAction("platform-start-from-manifest").catch((e=>{})),new Promise((async(n,i)=>{try{const i=await this.fin.Application._createFromManifest(e);i.once("platform-api-ready",(()=>n(this.wrapSync({uuid:i.identity.uuid})))),i._run(t)}catch(e){i(e)}}))}}Pn.PlatformModule=ji,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Pn,e),n(Mn,e)}(An);var ki={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getMe=e.getBaseMe=e.environmentUnsupportedMessage=void 0;const t=J(),n=un,i=ie(),r=rn;function o(e,t,n){return{...{isView:"view"===e,isWindow:"window"===e,isFrame:"iframe"===e,isExternal:"external connection"===e},uuid:t,name:n,entityType:e}}e.environmentUnsupportedMessage="You are not running in OpenFin.",e.getBaseMe=o,e.getMe=function(s){const{uuid:a,name:c,entityType:d}=s.me,h={setContext(){throw new Error(e.environmentUnsupportedMessage)},addContextHandler(){throw new Error(e.environmentUnsupportedMessage)},getContextGroups(){throw new Error(e.environmentUnsupportedMessage)},joinContextGroup(){throw new Error(e.environmentUnsupportedMessage)},removeFromContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getAllClientsInContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getInfoForContextGroup(){throw new Error(e.environmentUnsupportedMessage)}},l="Interop API has not been instantiated. Either connection has failed or you have not declared interop in your config.",u={setContext(){throw new Error(l)},addContextHandler(){throw new Error(l)},getContextGroups(){throw new Error(l)},joinContextGroup(){throw new Error(l)},removeFromContextGroup(){throw new Error(l)},getAllClientsInContextGroup(){throw new Error(l)},getInfoForContextGroup(){throw new Error(l)}},p={eventNames:()=>{throw new Error(e.environmentUnsupportedMessage)},emit:()=>{throw new Error(e.environmentUnsupportedMessage)},listeners:()=>{throw new Error(e.environmentUnsupportedMessage)},listenerCount:()=>{throw new Error(e.environmentUnsupportedMessage)},on:()=>{throw new Error(e.environmentUnsupportedMessage)},addListener:()=>{throw new Error(e.environmentUnsupportedMessage)},once:()=>{throw new Error(e.environmentUnsupportedMessage)},prependListener:()=>{throw new Error(e.environmentUnsupportedMessage)},prependOnceListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeAllListeners:()=>{throw new Error(e.environmentUnsupportedMessage)}};switch(d){case"view":return Object.assign(new t.View(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case"window":return Object.assign(new i._Window(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case"iframe":return Object.assign(new n._Frame(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case"external connection":return Object.assign(new r.ExternalApplication(s,{uuid:a}),o(d,a,c),{interop:u,isOpenFin:!1});default:return{...o(d,a,c),...p,interop:h,isOpenFin:!1}}}}(ki);var Li={},Ti={},$i={};Object.defineProperty($i,"__esModule",{value:!0}),$i.createWarningObject=$i.createUnusableObject=void 0,$i.createUnusableObject=function(e){const t=()=>{throw new Error(e)};return new Proxy({},{apply:t,construct:t,defineProperty:t,deleteProperty:t,get:t,getOwnPropertyDescriptor:t,getPrototypeOf:t,has:t,isExtensible:t,ownKeys:t,preventExtensions:t,set:t,setPrototypeOf:t})},$i.createWarningObject=function(e,t){return new Proxy(t,{get:(...t)=>(console.warn(e),Reflect.get(...t)),set:(...t)=>(console.warn(e),Reflect.set(...t)),getOwnPropertyDescriptor:(...t)=>(console.warn(e),Reflect.getOwnPropertyDescriptor(...t)),ownKeys:(...t)=>(console.warn(e),Reflect.ownKeys(...t))})};var Bi,Gi={},Wi={};var Hi={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.wrapIntentHandler=e.BROKER_ERRORS=e.generateOverrideWarning=e.generateOverrideError=e.wrapContextHandler=e.wrapInTryCatch=e.generateId=void 0;e.generateId=()=>`${Math.random()}${Date.now()}`;e.wrapInTryCatch=(e,t)=>(...n)=>{try{return e(...n)}catch(e){throw new Error((t||"")+e)}};e.wrapContextHandler=(e,t)=>async n=>{try{await e(n)}catch(e){throw console.error(`Error thrown by handler ${t} for context type ${n.type}: ${e}`),e}};e.generateOverrideError=(e,t)=>`You have tried to to use ${e} but ${t} has not been overridden in the Interop Broker. Please override this function. Refer to our documentation for more info.`;e.generateOverrideWarning=(e,t,n,i)=>{const{uuid:r,name:o}=n;return i?`Entity with identity: ${r}/${o} has called ${i} or ${e} but ${t} has not been overridden.`:`Entity with identity: ${r}/${o} has called ${e} but ${t} has not been overridden.`},e.BROKER_ERRORS={fireIntent:(0,e.generateOverrideError)("fireIntent","handleFiredIntent"),fireIntentForContext:(0,e.generateOverrideError)("fireIntentForContext","handleFiredIntentForContext"),getInfoForIntent:(0,e.generateOverrideError)("getInfoForIntent","handleInfoForIntent"),getInfoForIntentsByContext:(0,e.generateOverrideError)("getInfoForIntentsByContext","handleInfoForIntentsByContext"),joinSessionContextGroupWithJoinContextGroup:"The Context Group you have tried to join is a Session Context Group. Custom Context Groups can only be defined by the Interop Broker through code or manifest configuration. Please use joinSessionContextGroup.",fdc3Open:(0,e.generateOverrideError)("fdc3.open","fdc3HandleOpen"),fdc3FindInstances:(0,e.generateOverrideError)("fdc3.findInstances","fdc3HandleFindInstances"),fdc3GetAppMetadata:(0,e.generateOverrideError)("fdc3.getAppMetadata","fdc3HandleGetAppMetadata"),fdc3GetInfo:(0,e.generateOverrideError)("fdc3.getInfo","fdc3HandleGetInfo")};e.wrapIntentHandler=(e,t)=>async n=>{try{return e(n)}catch(e){throw console.error(`Error thrown by handler ${t}: ${e}`),e}}}(Hi);var Ni,Di,Ui={};function Vi(){if(Di)return Gi;Di=1;var e,t,n,r=s&&s.__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},o=s&&s.__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)},a=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Gi,"__esModule",{value:!0}),Gi.InteropBroker=void 0;const c=d,h=a(function(){if(Bi)return Wi;Bi=1,Object.defineProperty(Wi,"__esModule",{value:!0});const e=Cr();return Wi.default=class{constructor(e,t){this.provider=e,this.id=t,this.lastContext=void 0,this.contextGroupMap=new Map,this.clients=new Map,this.registerListeners()}registerListeners(){this.provider.register(`sessionContextGroup:getContext-${this.id}`,this.getCurrentContext.bind(this)),this.provider.register(`sessionContextGroup:setContext-${this.id}`,this.setContext.bind(this)),this.provider.register(`sessionContextGroup:handlerAdded-${this.id}`,this.handlerAdded.bind(this)),this.provider.register(`sessionContextGroup:handlerRemoved-${this.id}`,this.handlerRemoved.bind(this))}getCurrentContext(e){return e.type?this.contextGroupMap.get(e.type):this.lastContext}setContext(t,n){const{context:i}=t,r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name} not in Session Client State Map`);this.contextGroupMap.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{e.contextHandlers.get(i.type)?.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getClientState(e){return this.clients.get(e.endpointId)}async handlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(i){const e=r.contextHandlers.get(i)||[];r.contextHandlers.set(i,[...e,n]);const o=this.contextGroupMap.get(i);o&&await this.provider.dispatch(t,n,o)}else{r.globalHandler=n;const e=[...this.contextGroupMap.keys()].map((async e=>{const i=this.contextGroupMap.get(e);i&&await this.provider.dispatch(t,n,i)}));await Promise.all(e)}}handlerRemoved(e,t){const{handlerId:n}=e,i=this.clients.get(t.endpointId);i?(Array.from(i.contextHandlers).forEach((([,e])=>{const t=e.indexOf(n);t>-1&&e.splice(t,1)})),i.globalHandler===n&&(i.globalHandler=void 0)):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={contextHandlers:new Map,clientIdentity:e,globalHandler:void 0};this.clients.set(e.endpointId,t)}}onDisconnection(e){this.clients.delete(e.endpointId)}},Wi}()),l=Hi,u=a(i),p=function(){if(Ni)return Ui;Ni=1,Object.defineProperty(Ui,"__esModule",{value:!0}),Ui.PrivateChannelProvider=void 0;const e=Vi();return Ui.PrivateChannelProvider=class t{constructor(e,t){this.provider=e,this.id=t,this.clients=new Map,this.registerListeners(),this.contextByContextType=new Map,this.lastContext=void 0,this.provider.onConnection((e=>this.registerNewClient(e))),this.provider.onDisconnection((async e=>{const{endpointId:t}=e;this.clients.has(t)&&await this.handleClientDisconnecting(e),0===(await this.provider.getAllClientInfo()).length&&this.provider.destroy()}))}getClientState(e){return this.clients.get(e.endpointId)}registerListeners(){this.provider.register("broadcast",this.broadcast.bind(this)),this.provider.register("getCurrentContext",this.getCurrentContext.bind(this)),this.provider.register("contextHandlerAdded",this.contextHandlerAdded.bind(this)),this.provider.register("contextHandlerRemoved",this.contextHandlerRemoved.bind(this)),this.provider.register("nonStandardHandlerRemoved",this.nonStandardHandlerRemoved.bind(this)),this.provider.register("onAddContextHandlerAdded",this.onAddContextHandlerAdded.bind(this)),this.provider.register("onDisconnectHandlerAdded",this.onDisconnectHandlerAdded.bind(this)),this.provider.register("onUnsubscribeHandlerAdded",this.onUnsubscribeHandlerAdded.bind(this)),this.provider.register("clientDisconnecting",((e,t)=>{this.handleClientDisconnecting(t)}))}broadcast(t,n){const{context:i}=t;if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name}, tried to call broadcast, is not connected to this Private Channel`);const r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to broadcast - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);this.contextByContextType.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{const t=e.handlerIdsByContextTypes.get(i.type);t&&t.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getCurrentContext(e,t){const{contextType:n}=e;if(!this.getClientState(t))throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call getCurrentContext, is not connected to this Private Channel`);if(void 0!==n){return this.contextByContextType.get(n)||null}return this.lastContext?this.lastContext:null}contextHandlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call addContextListener, is not connected to this Private Channel`);if(i){const e=r.handlerIdsByContextTypes.get(i)||[];r.handlerIdsByContextTypes.set(i,[...e,n])}else r.globalHandler=n;Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&e.onAddContextListenerHandlerId&&this.provider.dispatch(e.clientIdentity,e.onAddContextListenerHandlerId,i)}))}async contextHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);if(i){let e;if(i.globalHandler===n)i.globalHandler=void 0;else for(const[t,r]of i.handlerIdsByContextTypes){const i=r.indexOf(n);i>-1&&(r.splice(i,1),e=t)}const r=(await this.getConnectedClients()).map((async n=>{const{clientIdentity:i,clientIdentity:{endpointId:r},onUnsubscribeHandlerId:o}=n;r!==t.endpointId&&o&&await this.provider.dispatch(i,o,e)}));try{await Promise.all(r)}catch(e){throw console.error(`Problem when attempting to dispatch to onUnsubscribeHandlers. Error: ${e} Removing Client: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}`),new Error(e)}}else console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}.`)}nonStandardHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);i?i.onDisconnectHandlerId===n?i.onDisconnectHandlerId=void 0:i.onAddContextListenerHandlerId===n?i.onAddContextListenerHandlerId=void 0:i.onUnsubscribeHandlerId===n&&(i.onUnsubscribeHandlerId=void 0):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}onAddContextHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onAddContextListener, is not connected to this Private Channel`);n.onAddContextListenerHandlerId=i,Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&Array.from(e.handlerIdsByContextTypes.keys()).forEach((e=>{this.provider.dispatch(t,i,e)}))}))}onDisconnectHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onDisconnect, is not connected to this Private Channel`);n.onDisconnectHandlerId=i}onUnsubscribeHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onUnsubscribe, is not connected to this Private Channel`);n.onUnsubscribeHandlerId=i}removeClient(e){const t=this.getClientState(e);if(!t)throw new Error(`Client with Identity: ${e.uuid} ${e.name}, tried to call disconnect, is not connected to this Private Channel`);t.handlerIdsByContextTypes.clear(),this.clients.delete(e.endpointId)}async fireOnDisconnectForOtherClients(e){const{endpointId:t}=e,n=(await this.getConnectedClients()).map((async e=>{const{clientIdentity:{endpointId:n},onDisconnectHandlerId:i}=e;n!==t&&i&&await this.provider.dispatch(e.clientIdentity,i)}));try{await Promise.all(n)}catch(t){throw console.error(`Problem when attempting to dispatch to onDisconnectHandlers. Error: ${t} Disconnecting Client: uuid: ${e.uuid}. name: ${e.name}. endpointId: ${e.endpointId}`),new Error(t)}}async unsubscribeAll(e){const{endpointId:t}=e,n=this.clients.get(t);if(n){const t=Array.from(n.handlerIdsByContextTypes.values()).flat(),i=n.globalHandler;if(t.length>0){const n=t.map((async t=>this.contextHandlerRemoved({handlerId:t},e)));try{await Promise.all(n)}catch(e){console.error(e.message)}}if(i)try{await this.contextHandlerRemoved({handlerId:i},e)}catch(e){console.error(e.message)}}}async handleClientDisconnecting(e){await this.unsubscribeAll(e),this.removeClient(e),await this.fireOnDisconnectForOtherClients(e)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={clientIdentity:e,handlerIdsByContextTypes:new Map,globalHandler:void 0,onAddContextListenerHandlerId:void 0,onUnsubscribeHandlerId:void 0,onDisconnectHandlerId:void 0};this.clients.set(e.endpointId,t)}}async getConnectedClients(){const e=await this.provider.getAllClientInfo();return Array.from(this.clients.values()).filter((t=>{const{uuid:n,name:i}=t.clientIdentity;return e.some((e=>i===e.name&&n===e.uuid))}))}static init(e,n){return new t(e,n)}},Ui}(),w=G,y=[{id:"green",displayMetadata:{color:"#00CC88",name:"green"}},{id:"purple",displayMetadata:{color:"#8C61FF",name:"purple"}},{id:"orange",displayMetadata:{color:"#FF8C4C",name:"orange"}},{id:"red",displayMetadata:{color:"#FF5E60",name:"red"}},{id:"pink",displayMetadata:{color:"#FF8FB8",name:"pink"}},{id:"yellow",displayMetadata:{color:"#E9FF8F",name:"yellow"}}];let f=class i extends c.Base{constructor(i,s,a){super(i),e.set(this,void 0),t.set(this,void 0),n.set(this,void 0),this.getProvider=()=>o(this,n,"f").getValue(),this.interopClients=new Map,this.contextGroupsById=new Map,r(this,t,a.contextGroups??[...y],"f"),r(this,e,a.fdc3Info,"f"),a?.logging&&(this.logging=a.logging),this.intentClientMap=new Map,this.lastContextMap=new Map,this.sessionContextGroupMap=new Map,r(this,n,new w.Lazy(s),"f"),this.setContextGroupMap(),this.setupChannelProvider()}static createClosedConstructor(...e){return class extends i{constructor(...t){if(t.length){const[n,i,r]=t;if(r&&"object"==typeof r&&!(0,u.default)(r,e[2]))return console.warn("You have modified the parameters of the InteropOverride constructor. This behavior is deprecated and will be removed in a future version. You can modify these options in your manifest. Please consult our Interop docs for guidance on migrating to the new override scheme."),void super(e[0],e[1],r);console.warn("You are attempting to pass arguments to the InteropOverride constructor. This is not necessary, and these passed arguments will be ignored. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.")}super(...e)}}}setContext({context:e},t){this.wire.sendAction("interop-broker-set-context").catch((e=>{}));const n=this.getClientState(t);if(!n||!n.contextGroupId)throw n?new Error("You must join a context group before you can set context."):new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);{const{contextGroupId:t}=n;this.setContextForGroup({context:e},t)}}setContextForGroup({context:e},t){this.wire.sendAction("interop-broker-set-context-for-group").catch((e=>{}));const n=this.contextGroupsById.get(t);if(!n)throw new Error(`Unable to set context for context group that isn't in the context group mapping: ${t}.`);const r=i.checkContextIntegrity(e);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(e)}`);const o=e.type;n.set(o,e),this.lastContextMap.set(t,o);Array.from(this.interopClients.values()).filter((e=>e.contextGroupId===t)).forEach((t=>{for(const[,n]of t.contextHandlers)i.isContextTypeCompatible(o,n.contextType)&&this.invokeContextHandler(t.clientIdentity,n.handlerId,e)}))}getCurrentContext(e,t){this.wire.sendAction("interop-broker-get-current-context").catch((e=>{}));const n=this.getClientState(t);if(!n?.contextGroupId)throw new Error("You must be a member of a context group to call getCurrentContext");const{contextGroupId:i}=n,r=this.contextGroupsById.get(i),o=this.lastContextMap.get(i),s=e?.contextType??o;return r&&s?r.get(s):void 0}async joinContextGroup({contextGroupId:e,target:t},n){if(this.wire.sendAction("interop-broker-join-context-group").catch((e=>{})),this.sessionContextGroupMap.has(e))throw new Error(l.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup);if(t){i.hasEndpointId(t)&&await this.addClientToContextGroup({contextGroupId:e},t);try{const n=this.channel.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name));if(!n.length)throw new Error(`Given Identity ${t.uuid} ${t.name} is not connected to the Interop Broker.`);n.length>1&&console.warn(`More than one connection found for identity ${t.uuid} ${t.name}`);const i=[];for(const t of n)i.push(this.addClientToContextGroup({contextGroupId:e},t));await Promise.all(i)}catch(e){throw new Error(e)}}else await this.addClientToContextGroup({contextGroupId:e},n)}async addClientToContextGroup({contextGroupId:e},t){this.wire.sendAction("interop-broker-add-client-to-context-group").catch((e=>{}));const n=this.getClientState(t);if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(!this.getContextGroups().find((t=>t.id===e)))throw new Error(`Attempting to join a context group that does not exist: ${e}. You may only join existing context groups.`);if(n.contextGroupId!==e){n.contextGroupId=e,await this.setCurrentContextGroupInClientOptions(t,e);const i=this.contextGroupsById.get(e);for(const[,e]of n.contextHandlers){const{contextType:n,handlerId:r}=e;if(void 0===n)i.forEach(((e,n)=>{this.invokeContextHandler(t,r,e)}));else if(i.has(n)){const e=i.get(n);e&&this.invokeContextHandler(t,r,e)}}}}async removeFromContextGroup({target:e},t){if(this.wire.sendAction("interop-broker-remove-from-context-group").catch((e=>{})),e){i.hasEndpointId(e)&&await this.removeClientFromContextGroup(e);try{const t=this.channel.connections.filter((t=>t.uuid===e.uuid&&t.name===e.name));if(!t.length)throw new Error(`No connection found for given Identity ${e.uuid} ${e.name}`);t.length>1&&console.warn(`More than one connection found for identity ${e.uuid} ${e.name}`);const n=[];for(const e of t)n.push(this.removeClientFromContextGroup(e));await Promise.all(n)}catch(e){throw new Error(e)}}else await this.removeClientFromContextGroup(t)}async removeClientFromContextGroup(e){this.wire.sendAction("interop-broker-remove-client-from-context-group").catch((e=>{}));const t=this.getClientState(e);t&&(t.contextGroupId=void 0),await this.setCurrentContextGroupInClientOptions(e,null)}getContextGroups(){return this.wire.sendAction("interop-broker-get-context-groups").catch((e=>{})),o(this,t,"f").map((e=>({...e})))}getInfoForContextGroup({contextGroupId:e}){return this.wire.sendAction("interop-broker-get-info-for-context-group").catch((e=>{})),this.getContextGroups().find((t=>t.id===e))}getAllClientsInContextGroup({contextGroupId:e}){this.wire.sendAction("interop-broker-get-all-clients-in-context-group").catch((e=>{}));return Array.from(this.interopClients.values()).filter((t=>t.contextGroupId===e)).map((e=>e.clientIdentity))}async handleFiredIntent(e,t){const n=(0,l.generateOverrideWarning)("fdc3.raiseIntent","InteropBroker.handleFiredIntent",t,"interopClient.fireIntent");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntent)}async setIntentTarget(e,t){this.wire.sendAction("interop-broker-set-intent-target").catch((e=>{}));const n=this.intentClientMap.get(t.name),i=`intent-handler-${e.name}`;if(n){const t=n.get(i);if(t){if(t.pendingIntents.push(e),t.clientIdentity&&t.isReady){const{clientIdentity:e,pendingIntents:n}=t;try{const r=n[n.length-1];await this.invokeIntentHandler(e,i,r),t.pendingIntents=[]}catch(n){console.error(`Error invoking intent handler for client ${e.uuid}/${e.name}/${e.endpointId}`),t.isReady=!1}}}else n.set(i,{isReady:!1,pendingIntents:[e]})}else{this.intentClientMap.set(t.name,new Map);const n=this.intentClientMap.get(t.name);n&&n.set(i,{isReady:!1,pendingIntents:[e]})}}async handleInfoForIntent(e,t){const n=(0,l.generateOverrideWarning)("fdc3.findIntent","InteropBroker.handleInfoForIntent",t,"interopClient.getInfoForIntent");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntent)}async handleInfoForIntentsByContext(e,t){const n=(0,l.generateOverrideWarning)("fdc3.findIntentsByContext","InteropBroker.handleInfoForIntentsByContext",t,"interopClient.getInfoForIntentsByContext");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntentsByContext)}async handleFiredIntentForContext(e,t){const n=(0,l.generateOverrideWarning)("fdc3.raiseIntentForContext","InteropBroker.handleFiredIntentForContext",t,"interopClient.fireIntentForContext");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntentForContext)}async clientDisconnected(e){}async fdc3HandleOpen({app:e,context:t},n){const i=(0,l.generateOverrideWarning)("fdc3.open","InteropBroker.fdc3HandleOpen",n);throw console.warn(i),new Error(l.BROKER_ERRORS.fdc3Open)}async fdc3HandleFindInstances(e,t){const n=(0,l.generateOverrideWarning)("fdc3.open","InteropBroker.fdc3HandleFindInstances",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3FindInstances)}async fdc3HandleGetAppMetadata(e,t){const n=(0,l.generateOverrideWarning)("fdc3.getAppMetadata","InteropBroker.fdc3HandleGetAppMetadata",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3GetAppMetadata)}async invokeContextHandler(e,t,n){const i=await this.getProvider();try{await i.dispatch(e,t,n)}catch(i){console.error(`Error invoking context handler ${t} for context type ${n.type} in client ${e.uuid}/${e.name}/${e.endpointId}`,i)}}async invokeIntentHandler(e,t,n){const i=await this.getProvider();await i.dispatch(e,t,n)}async fdc3HandleGetInfo(t,n){const{fdc3Version:i}=t;return{fdc3Version:i,...o(this,e,"f"),optionalFeatures:{OriginatingAppMetadata:!1,UserChannelMembershipAPIs:!0},appMetadata:{appId:"",instanceId:""}}}async getAllClientInfo(){return(await this.getProvider()).getAllClientInfo()}decorateSnapshot(e){return{...e,interopSnapshotDetails:{contextGroupStates:this.getContextGroupStates()}}}applySnapshot(e,t){const n=e?.interopSnapshotDetails?.contextGroupStates;n&&(t?.closeExistingWindows||this.updateExistingClients(n),this.rehydrateContextGroupStates(n))}updateExistingClients(e){this.interopClients.forEach((t=>{const{clientIdentity:n,contextGroupId:r,contextHandlers:o}=t;if(r){const t=e[r];for(const[,e]of Object.entries(t))o.forEach((t=>{const{handlerId:r,contextType:o}=t;i.isContextTypeCompatible(e.type,o)&&this.invokeContextHandler(n,r,e)}))}}))}getContextGroupStates(){return i.toObject(this.contextGroupsById)}rehydrateContextGroupStates(e){const t=Object.entries(e);for(const[e,n]of t){const t=Object.entries(n);for(const[n,i]of t)if(this.contextGroupsById.has(e)){this.contextGroupsById.get(e).set(n,i)}else console.warn(`Attempting to set a context group that isn't in the context group mapping. Skipping context group rehydration for: ${e}`)}}contextHandlerRegistered({contextType:e,handlerId:t},n){const i={contextType:e,handlerId:t},r=this.getClientState(n);if(r?.contextHandlers.set(t,i),r&&r.contextGroupId){const{contextGroupId:i}=r,o=this.contextGroupsById.get(i);if(void 0===e)o.forEach(((e,i)=>{this.invokeContextHandler(n,t,e)}));else if(o.has(e)){const i=o.get(e);i&&this.invokeContextHandler(n,t,i)}}}async intentHandlerRegistered(e,t){const{handlerId:n}=e,i=this.intentClientMap.get(t.name),r=i?.get(n);if(i)if(r){const{pendingIntents:e}=r;r.clientIdentity=t,r.isReady=!0;try{if(e.length>0){const i=e[e.length-1];await this.invokeIntentHandler(t,n,i),r.pendingIntents=[]}}catch(e){console.error(`Error invoking intent handler: ${n} for client ${t.uuid}/${t.name}/${t.endpointId}`)}}else i.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t});else{this.intentClientMap.set(t.name,new Map);const e=this.intentClientMap.get(t.name);e&&e.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t})}}removeContextHandler({handlerId:e},t){const n=this.getClientState(t);n&&n.contextHandlers.delete(e)}handleJoinSessionContextGroup({sessionContextGroupId:e},t){try{if(!e)throw new Error("Failed to join session context group: must specify group id.");const n=this.sessionContextGroupMap.get(e);if(n)n.registerNewClient(t);else{const n=new h.default(this.channel,e);n.registerNewClient(t),this.sessionContextGroupMap.set(e,n)}return{hasConflict:this.contextGroupsById.has(e)}}catch(e){throw new Error(e)}}getClientState(e){return this.interopClients.get(e.endpointId)}static toObject(e){const t=Object.fromEntries(e),n={};return Object.entries(t).forEach((([e,t])=>{const i=Object.fromEntries(t);n[e]=i})),n}static checkContextIntegrity(e){if(!e)return{isValid:!1,reason:"No context supplied"};if("object"!=typeof e)return{isValid:!1,reason:"Context must be an Object"};if(!e.type)return{isValid:!1,reason:"Context must have a type property"};if(e.id&&"object"!=typeof e.id)return{isValid:!1,reason:"Context id must be an Object populated with key-value identifiers (if set)"};if(e.id){const{id:t}=e,n=Object.keys(t);let i=!1;if(!n.length)return{isValid:!1,reason:"Context id must have at least one key-value identifier"};if(n.forEach((e=>{"string"==typeof e&&"string"==typeof t[e]||(i=!0)})),i)return{isValid:!1,reason:"Context id key-value identifiers must be of type string"}}return e.name&&"string"!=typeof e.name?{isValid:!1,reason:"Context name must be of string type (if set)"}:{isValid:!0}}static hasEndpointId(e){return void 0!==e.endpointId}static isContextTypeCompatible(e,t){return void 0===t||e===t}setContextGroupMap(){for(const e of this.getContextGroups())this.contextGroupsById.set(e.id,new Map)}async setCurrentContextGroupInClientOptions(e,t){try{const n=await this.fin.System.getEntityInfo(e.uuid,e.name);let i;"view"===n.entityType?i=await this.fin.View.wrap(e):"window"===n.entityType&&(i=await this.fin.Window.wrap(e)),i&&await i.updateOptions({interop:{currentContextGroup:t}})}catch(e){}}async setupChannelProvider(){try{const e=await this.getProvider();this.channel=e,this.wireChannel(e)}catch(e){throw new Error(`Error setting up Interop Broker Channel Provider: ${e}`)}}wireChannel(e){e.onConnection((async(e,t)=>{if(!await this.isConnectionAuthorized(e,t))throw new Error(`Connection not authorized for ${e.uuid}, ${e.name}`);if(!e.endpointId)throw new Error("Version too old to be compatible with Interop. Please upgrade your runtime to a more recent version.");const n={contextGroupId:void 0,contextHandlers:new Map,clientIdentity:e};t?.currentContextGroup&&this.contextGroupsById.has(t.currentContextGroup)&&(n.contextGroupId=t?.currentContextGroup),this.interopClients.set(e.endpointId,n)})),e.onDisconnection((e=>{this.interopClients.delete(e.endpointId);const t=this.intentClientMap.get(e.name);t&&e.uuid===this.fin.me.uuid&&t.forEach((e=>{e.isReady=!1})),this.sessionContextGroupMap.forEach((t=>{t.onDisconnection(e)})),this.clientDisconnected(e)})),e.beforeAction((async(e,t,n)=>{if(!await this.isActionAuthorized(e,t,n))throw new Error(`Action (${e}) not authorized for ${n.uuid}, ${n.name}`);this.logging?.beforeAction?.enabled&&console.log(e,t,n)})),e.afterAction(((e,t,n)=>{this.logging?.afterAction?.enabled&&console.log(e,t,n)})),e.register("setContext",this.setContext.bind(this)),e.register("fireIntent",this.handleFiredIntent.bind(this)),e.register("getCurrentContext",this.getCurrentContext.bind(this)),e.register("getInfoForIntent",this.handleInfoForIntent.bind(this)),e.register("getInfoForIntentsByContext",this.handleInfoForIntentsByContext.bind(this)),e.register("fireIntentForContext",this.handleFiredIntentForContext.bind(this)),e.register("getContextGroups",this.getContextGroups.bind(this)),e.register("joinContextGroup",this.joinContextGroup.bind(this)),e.register("removeFromContextGroup",this.removeFromContextGroup.bind(this)),e.register("getAllClientsInContextGroup",this.getAllClientsInContextGroup.bind(this)),e.register("getInfoForContextGroup",this.getInfoForContextGroup.bind(this)),e.register("contextHandlerRegistered",this.contextHandlerRegistered.bind(this)),e.register("intentHandlerRegistered",this.intentHandlerRegistered.bind(this)),e.register("removeContextHandler",this.removeContextHandler.bind(this)),e.register("sessionContextGroup:createIfNeeded",this.handleJoinSessionContextGroup.bind(this)),e.register("fdc3Open",this.fdc3HandleOpen.bind(this)),e.register("fdc3v2FindIntentsByContext",this.handleInfoForIntentsByContext.bind(this)),e.register("fdc3FindInstances",this.fdc3HandleFindInstances.bind(this)),e.register("fdc3GetAppMetadata",this.fdc3HandleGetAppMetadata.bind(this)),e.register("fdc3v2GetInfo",(async(e,t)=>this.fdc3HandleGetInfo.bind(this)(e,t))),e.register("createPrivateChannelProvider",(async e=>{const{channelId:t}=e,n=await this.fin.InterApplicationBus.Channel.create(t);p.PrivateChannelProvider.init(n,t)}))}isConnectionAuthorized(e,t){return this.wire.sendAction("interop-broker-is-connection-authorized").catch((e=>{})),Promise.resolve(!0)}isActionAuthorized(e,t,n){return this.wire.sendAction("interop-broker-is-action-authorized").catch((e=>{})),Promise.resolve(!0)}};return Gi.InteropBroker=f,e=new WeakMap,t=new WeakMap,n=new WeakMap,Gi}var zi,Ki={},qi={},Ji=s&&s.__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},Yi=s&&s.__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)};Object.defineProperty(qi,"__esModule",{value:!0});const Zi=d,Qi=Hi;class Xi extends Zi.Base{constructor(e,t,n){super(e),zi.set(this,void 0),this.id=n,Ji(this,zi,t,"f")}async setContext(e){this.wire.sendAction("interop-session-context-group-set-context").catch((e=>{}));return(await Yi(this,zi,"f")).dispatch(`sessionContextGroup:setContext-${this.id}`,{sessionContextGroupId:this.id,context:e})}async getCurrentContext(e){this.wire.sendAction("interop-session-context-group-get-context").catch((e=>{}));return(await Yi(this,zi,"f")).dispatch(`sessionContextGroup:getContext-${this.id}`,{sessionContextGroupId:this.id,type:e})}async addContextHandler(e,t){if(this.wire.sendAction("interop-session-context-group-add-handler").catch((e=>{})),"function"!=typeof e)throw new Error("Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");const n=await Yi(this,zi,"f");let i;return i=t?`sessionContextHandler:invoke-${this.id}-${t}-${(0,Qi.generateId)()}`:`sessionContextHandler:invoke-${this.id}`,n.register(i,(0,Qi.wrapContextHandler)(e,i)),await n.dispatch(`sessionContextGroup:handlerAdded-${this.id}`,{handlerId:i,contextType:t}),{unsubscribe:await this.createUnsubscribeCb(i)}}async createUnsubscribeCb(e){const t=await Yi(this,zi,"f");return async()=>{t.remove(e),await t.dispatch(`sessionContextGroup:handlerRemoved-${this.id}`,{handlerId:e})}}getUserInstance(){return{id:this.id,setContext:(0,Qi.wrapInTryCatch)(this.setContext.bind(this),"Failed to set context: "),getCurrentContext:(0,Qi.wrapInTryCatch)(this.getCurrentContext.bind(this),"Failed to get context: "),addContextHandler:(0,Qi.wrapInTryCatch)(this.addContextHandler.bind(this),"Failed to add context handler: ")}}}qi.default=Xi,zi=new WeakMap;var er={},tr={},nr={},ir={},rr=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),or=s&&s.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),sr=s&&s.__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)&&rr(t,e,n);return or(t,e),t};Object.defineProperty(ir,"__esModule",{value:!0}),ir.PrivateChannelClient=void 0;const ar=sr(Hi);var cr,dr;function hr(){if(cr)return tr;cr=1;var e,t=s&&s.__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)},n=s&&s.__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},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(tr,"__esModule",{value:!0}),tr.FDC3ModuleBase=void 0;const o=nr,a=Hi,c=wr(),d=r(i);return tr.FDC3ModuleBase=class{get client(){return t(this,e,"f").call(this)}get fin(){return this.wire.getFin()}constructor(t,i){this.wire=i,e.set(this,void 0),n(this,e,t,"f")}async broadcast(e){return this.wire.sendAction("fdc3-broadcast").catch((e=>{})),this.client.setContext(e)}async _open(e,t){this.wire.sendAction("fdc3-open").catch((e=>{}));try{return await c.InteropClient.ferryFdc3Call(this.client,"fdc3Open",{app:e,context:t})}catch(e){const t=e.message===a.BROKER_ERRORS.fdc3Open?"ResolverUnavailable":e.message;throw new Error(t)}}async _getChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:"system",...(0,o.getUnsupportedChannelApis)()})))}async getOrCreateChannel(e){this.wire.sendAction("fdc3-get-or-create-channel").catch((e=>{}));const t=(await this._getChannels()).find((t=>t.id===e));if(t)return{...t,type:"system",...(0,o.getUnsupportedChannelApis)()};try{const t=await this.client.joinSessionContextGroup(e);return(0,o.buildAppChannelObject)(t)}catch(e){throw console.error(e.message),new Error(o.ChannelError.CreationFailed)}}async getSystemChannels(){return this.wire.sendAction("fdc3-get-system-channels").catch((e=>{})),this._getChannels()}async joinChannel(e){this.wire.sendAction("fdc3-join-channel").catch((e=>{}));try{return await this.client.joinContextGroup(e)}catch(e){if(e.message===a.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup?console.error("The Channel you have tried to join is an App Channel. Custom Channels can only be defined by the Interop Broker through code or manifest configuration. Please use getOrCreateChannel."):console.error(e.message),e.message.startsWith("Attempting to join a context group that does not exist"))throw new Error(o.ChannelError.NoChannelFound);throw new Error(o.ChannelError.AccessDenied)}}async getCurrentChannel(){this.wire.sendAction("fdc3-get-current-channel").catch((e=>{}));const e=await this.getCurrentContextGroupInfo();return e?this.buildChannelObject(e):null}async leaveCurrentChannel(){return this.wire.sendAction("fdc3-leave-current-channel").catch((e=>{})),this.client.removeFromContextGroup()}async getCurrentContextGroupInfo(){const e=await this.client.getContextGroups(),t=e.map((async e=>this.client.getAllClientsInContextGroup(e.id))),n=(await Promise.all(t)).findIndex((e=>e.some((e=>{const{uuid:t,name:n}=e;return this.wire.me.uuid===t&&this.wire.me.name===n}))));return e[n]}async buildChannelObject(e){return{...e,type:"system",addContextListener:(...[e,t])=>{let n,i;"function"==typeof e?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),n=e):(n=t,"string"==typeof e&&(i=e));const r=(async()=>{let e=!0;const t=await this.client.getCurrentContext(i);return this.client.addContextHandler(((i,r)=>{if(!e||(e=!1,!(0,d.default)(t,i)))return n(i,r)}),i)})();return{...r,unsubscribe:()=>r.then((e=>e.unsubscribe()))}},broadcast:this.broadcast.bind(this),getCurrentContext:async e=>{const t=await this.client.getCurrentContext(e);return void 0===t?null:t}}}},e=new WeakMap,tr}ir.PrivateChannelClient=class{constructor(e,t){this.id=t,this.client=e,this.listeners=new Map}async broadcast(e){return this.client.dispatch("broadcast",{context:e})}async getCurrentContext(e){return this.client.dispatch("getCurrentContext",{contextType:e})}async addContextListener(e,t){if("function"!=typeof t)throw new Error("Non-function argument passed to the second parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");let n;n=e?`contextHandler:invoke-${this.id}-${e}-${ar.generateId()}`:`contextHandler:invoke-${this.id}-${ar.generateId()}`,this.client.register(n,ar.wrapContextHandler(t,n));const i={unsubscribe:await this.createContextUnsubscribeCb(n)};return this.listeners.set(n,i),await this.client.dispatch("contextHandlerAdded",{handlerId:n,contextType:e}),i}createNonStandardUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch("nonStandardHandlerRemoved",{handlerId:e})}}createContextUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch("contextHandlerRemoved",{handlerId:e})}}onAddContextListener(e){const t=`onContextHandlerAdded:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch("onAddContextHandlerAdded",{handlerId:t}),n}onDisconnect(e){const t=`onDisconnect:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch("onDisconnectHandlerAdded",{handlerId:t}),n}onUnsubscribe(e){const t=`onUnsubscribe:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch("onUnsubscribeHandlerAdded",{handlerId:t}),n}async cleanUpAllSubs(){Array.from(this.listeners.keys()).forEach((e=>{this.client.remove(e),this.listeners.delete(e)}))}async disconnect(){try{await this.client.dispatch("clientDisconnecting"),await this.cleanUpAllSubs(),await this.client.disconnect()}catch(e){throw new Error(e.message)}}},function(e){var t=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.getIntentResolution=e.isChannel=e.isContext=e.connectPrivateChannel=e.buildAppChannelObject=e.buildPrivateChannelObject=e.ChannelError=e.ResultError=e.UnsupportedChannelApiError=e.getUnsupportedChannelApis=void 0;const n=Hi,r=ir,o=t(i);e.getUnsupportedChannelApis=e=>({addContextListener:()=>{throw new a("Channel.addContextListener",e)},broadcast:()=>{throw new a("Channel.broadcast",e)},getCurrentContext:()=>{throw new a("Channel.getCurrentContext",e)}});class a extends Error{constructor(e,t="System"){super(e),this.message=`Calling ${e} on an instance of a ${t} Channel returned by fdc3.get${t}Channels is not supported. If you would like to use a ${t} Channel, please use fdc3.joinChannel, fdc3.addContextListener, and fdc3.broadcast instead.`}}var c,d;e.UnsupportedChannelApiError=a,function(e){e.NoResultReturned="NoResultReturned",e.IntentHandlerRejected="IntentHandlerRejected"}(c=e.ResultError||(e.ResultError={})),(d=e.ChannelError||(e.ChannelError={})).NoChannelFound="NoChannelFound",d.AccessDenied="AccessDenied",d.CreationFailed="CreationFailed";e.buildPrivateChannelObject=e=>{let t=!1;const n=()=>{if(t)throw new Error("Private Channel Client has been disconnected from the Private Channel")};return{id:e.id,type:"private",broadcast:async t=>(n(),e.broadcast(t)),getCurrentContext:async t=>(n(),e.getCurrentContext(t)),addContextListener:async(t,i)=>{n();let r=i,o=t;"function"==typeof t&&(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),r=t,o=null);return e.addContextListener(o,r)},onAddContextListener:t=>(n(),e.onAddContextListener(t)),disconnect:async()=>(n(),t=!0,e.disconnect()),onDisconnect:t=>(n(),e.onDisconnect(t)),onUnsubscribe:t=>(n(),e.onUnsubscribe(t))}};e.buildAppChannelObject=e=>({id:e.id,type:"app",broadcast:e.setContext,getCurrentContext:async t=>{const n=await e.getCurrentContext(t);return void 0===n?null:n},addContextListener:(t,n)=>{let i,r;"function"==typeof t?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),i=t):(i=n,"string"==typeof t&&(r=t));const s=(async()=>{let t=!0;const n=await e.getCurrentContext(r);return e.addContextHandler(((e,r)=>{if(!t||(t=!1,!(0,o.default)(n,e)))return i(e,r)}),r)})();return{...s,unsubscribe:()=>s.then((e=>e.unsubscribe()))}}});e.connectPrivateChannel=async t=>{try{const n=await fin.InterApplicationBus.Channel.connect(t),i=new r.PrivateChannelClient(n,t);return(0,e.buildPrivateChannelObject)(i)}catch(e){throw new Error(`Private Channel with id: ${t} doesn't exist`)}};e.isContext=e=>{if(e&&"object"==typeof e&&"type"in e){const{type:t}=e;return"string"==typeof t}return!1};e.isChannel=e=>{if(e&&"object"==typeof e&&"type"in e&&"id"in e){const{type:t,id:n}=e;return"string"==typeof t&&"string"==typeof n&&("app"===t||"private"===t)}return!1};e.getIntentResolution=async(t,i,r,o)=>{const s=(0,n.generateId)(),a=new Promise(((e,t)=>{fin.InterApplicationBus.subscribe({uuid:"*"},s,(t=>{e(t)})).catch((()=>t(new Error("getResult is not supported in this environment"))))})),d=r?{target:r,intentResolutionResultId:s}:{intentResolutionResultId:s},h=o?{name:o,context:i,metadata:d}:{...i,metadata:d},l=async()=>{let n=await a;if(!n||"object"!=typeof n)throw new Error(c.NoResultReturned);const{error:i}=n;if(i)throw new Error(c.IntentHandlerRejected);if((0,e.isChannel)(n)){const{id:i,type:r}=n;switch(r){case"private":n=await(0,e.connectPrivateChannel)(i);break;case"app":{const r=await t.joinSessionContextGroup(i);n=(0,e.buildAppChannelObject)(r);break}}}else if(!(0,e.isContext)(n))throw new Error(c.NoResultReturned);return n},u=o?await t.fireIntent(h):await t.fireIntentForContext(h);return"object"!=typeof u?{source:{appId:"",instanceId:""},intent:"",version:"2.0",getResult:l}:{...u,getResult:l}}}(nr);var lr,ur,pr={};function wr(){if(ur)return Ki;ur=1;var e,t,n=s&&s.__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},i=s&&s.__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)},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ki,"__esModule",{value:!0}),Ki.InteropClient=void 0;const o=d,a=r(qi),c=function(){if(dr)return er;dr=1,Object.defineProperty(er,"__esModule",{value:!0}),er.Fdc3Module=void 0;const e=Hi,t=hr();class n extends t.FDC3ModuleBase{async open(e,t){await super._open(e,t)}addContextListener(e,t){let n;return this.wire.sendAction("fdc3-add-context-listener").catch((e=>{})),"function"==typeof e?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),n=this.client.addContextHandler(e)):n=this.client.addContextHandler(t,null===e?void 0:e),{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}addIntentListener(e,t){this.wire.sendAction("fdc3-add-intent-listener").catch((e=>{}));const n=this.client.registerIntentHandler((e=>{const{context:n,metadata:i}=e,{metadata:r}=n,o=i?.intentResolutionResultId||r?.intentResolutionResultId;o&&this.fin.InterApplicationBus.publish(o,null).catch((()=>null)),t(e.context)}),e,{fdc3Version:"1.2"});return{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}async raiseIntent(t,n,i){this.wire.sendAction("fdc3-raise-intent").catch((e=>{}));const r=i?{name:t,context:n,metadata:{target:i}}:{name:t,context:n};try{return await this.client.fireIntent(r)}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntent?"ResolverUnavailable":t.message;throw new Error(n)}}async findIntent(t,n){this.wire.sendAction("fdc3-find-intent").catch((e=>{}));try{return await this.client.getInfoForIntent({name:t,context:n})}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntent?"ResolverUnavailable":t.message;throw new Error(n)}}async findIntentsByContext(t){this.wire.sendAction("fdc3-find-intents-by-context").catch((e=>{}));try{return await this.client.getInfoForIntentsByContext(t)}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntentsByContext?"ResolverUnavailable":t.message;throw new Error(n)}}async raiseIntentForContext(t,n){this.wire.sendAction("fdc3-raise-intent-for-context").catch((e=>{}));try{return await this.client.fireIntentForContext({...t,metadata:{target:n}})}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntentForContext?"ResolverUnavailable":t.message;throw new Error(n)}}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}getInfo(){return this.wire.sendAction("fdc3-get-info").catch((e=>{})),{providerVersion:this.wire.environment.getAdapterVersionSync(),provider:`openfin-${this.wire.me.uuid}`,fdc3Version:"1.2"}}}return er.Fdc3Module=n,er}(),h=function(){if(lr)return pr;lr=1,Object.defineProperty(pr,"__esModule",{value:!0}),pr.Fdc3Module2=void 0;const e=hr(),t=Hi,n=wr(),i=nr,r=ir;class o extends e.FDC3ModuleBase{async open(e,t){return"string"==typeof e&&console.warn("Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string })."),super._open(e,t)}async findInstances(e){this.wire.sendAction("fdc3-find-instances").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,"fdc3FindInstances",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3FindInstances?"ResolverUnavailable":e.message;throw new Error(n)}}async getAppMetadata(e){this.wire.sendAction("fdc3-get-app-metadata").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,"fdc3GetAppMetadata",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3GetAppMetadata?"ResolverUnavailable":e.message;throw new Error(n)}}async addContextListener(e,t){this.wire.sendAction("fdc3-add-context-listener").catch((e=>{}));const n=e=>t=>{const{contextMetadata:n,...i}=t,r=n?[{...i},n]:[t,null];e(...r)};let i=t,r=n(i);return"function"==typeof e?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),i=e,r=n(i),this.client.addContextHandler(r)):this.client.addContextHandler(r,null===e?void 0:e)}async findIntent(e,n,i){this.wire.sendAction("fdc3-find-intent").catch((e=>{}));try{return await this.client.getInfoForIntent({name:e,context:n,metadata:{resultType:i}})}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntent?"ResolverUnavailable":e.message;throw new Error(n)}}async findIntentsByContext(e,i){this.wire.sendAction("fdc3-find-intents-by-context").catch((e=>{}));const r=i?{context:e,metadata:{resultType:i}}:e;try{return await n.InteropClient.ferryFdc3Call(this.client,"fdc3v2FindIntentsByContext",r)}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntentsByContext?"ResolverUnavailable":e.message;throw new Error(n)}}async raiseIntent(e,n,r){this.wire.sendAction("fdc3-raise-intent").catch((e=>{}));try{return"string"==typeof r&&console.warn("Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string })."),(0,i.getIntentResolution)(this.client,n,r,e)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?"ResolverUnavailable":e.message;throw new Error(n)}}async raiseIntentForContext(e,n){this.wire.sendAction("fdc3-raise-intent-for-context").catch((e=>{}));try{return"string"==typeof n&&console.warn("Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string })."),(0,i.getIntentResolution)(this.client,e,n)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?"ResolverUnavailable":e.message;throw new Error(n)}}async addIntentListener(e,t){if(this.wire.sendAction("fdc3-add-intent-listener").catch((e=>{})),"string"!=typeof e)throw new Error("First argument must be an Intent name");return this.client.registerIntentHandler((async e=>{let n,i;const{context:r,metadata:o}=e,{contextMetadata:s,metadata:a,...c}=r,d=o?.intentResolutionResultId||a?.intentResolutionResultId;try{const e=a?{metadata:a,...c}:{...c};n=await t(e,s),i=n}catch(e){n=e,i={error:!0}}if(d&&this.fin.InterApplicationBus.publish(d,i).catch((()=>null)),n instanceof Error)throw new Error(n.message);return n}),e,{fdc3Version:"2.0"})}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}async createPrivateChannel(){const e=(0,t.generateId)();await n.InteropClient.ferryFdc3Call(this.client,"createPrivateChannelProvider",{channelId:e});const o=await this.fin.InterApplicationBus.Channel.connect(e),s=new r.PrivateChannelClient(o,e);return(0,i.buildPrivateChannelObject)(s)}async getUserChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:"user",...(0,i.getUnsupportedChannelApis)("User")})))}async getSystemChannels(){return console.warn("This API has been deprecated. Please use fdc3.getUserChannels instead."),super.getSystemChannels()}async joinUserChannel(e){return super.joinChannel(e)}async joinChannel(e){return console.warn("This API has been deprecated. Please use fdc3.joinUserChannel instead."),super.joinChannel(e)}async getCurrentChannel(){const e=await super.getCurrentChannel();return e?{...e,type:"user",broadcast:this.broadcast.bind(this)}:null}async getInfo(){return n.InteropClient.ferryFdc3Call(this.client,"fdc3v2GetInfo",{fdc3Version:"2.0"})}}return pr.Fdc3Module2=o,pr}(),l=Hi;let u=class extends o.Base{constructor(i,r){super(i),e.set(this,void 0),t.set(this,void 0),n(this,t,new Map,"f"),n(this,e,r,"f")}async setContext(t){this.wire.sendAction("interop-client-set-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("setContext",{context:t})}async addContextHandler(t,n){if(this.wire.sendAction("interop-client-add-context-handler").catch((e=>{})),"function"!=typeof t)throw new Error("Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");const r=await i(this,e,"f");let o;o=n?`invokeContextHandler-${n}-${(0,l.generateId)()}`:"invokeContextHandler";const s=(0,l.wrapContextHandler)(t,o);return r.register(o,s),await r.dispatch("contextHandlerRegistered",{handlerId:o,contextType:n}),{unsubscribe:async()=>{r.remove(o),await r.dispatch("removeContextHandler",{handlerId:o})}}}async getContextGroups(){this.wire.sendAction("interop-client-get-context-groups").catch((e=>{}));return(await i(this,e,"f")).dispatch("getContextGroups")}async joinContextGroup(t,n){this.wire.sendAction("interop-client-join-context-group").catch((e=>{}));const r=await i(this,e,"f");if(!t)throw new Error("No contextGroupId specified for joinContextGroup.");return r.dispatch("joinContextGroup",{contextGroupId:t,target:n})}async removeFromContextGroup(t){this.wire.sendAction("interop-client-remove-from-context-group").catch((e=>{}));return(await i(this,e,"f")).dispatch("removeFromContextGroup",{target:t})}async getAllClientsInContextGroup(t){this.wire.sendAction("interop-client-get-all-clients-in-context-group").catch((e=>{}));const n=await i(this,e,"f");if(!t)throw new Error("No contextGroupId specified for getAllClientsInContextGroup.");return n.dispatch("getAllClientsInContextGroup",{contextGroupId:t})}async getInfoForContextGroup(t){this.wire.sendAction("interop-client-get-info-for-context-group").catch((e=>{}));const n=await i(this,e,"f");if(!t)throw new Error("No contextGroupId specified for getInfoForContextGroup.");return n.dispatch("getInfoForContextGroup",{contextGroupId:t})}async fireIntent(t){this.wire.sendAction("interop-client-fire-intent").catch((e=>{}));return(await i(this,e,"f")).dispatch("fireIntent",t)}async registerIntentHandler(t,n,r){this.wire.sendAction("interop-client-register-intent-handler").catch((e=>{}));const o=await i(this,e,"f"),s=`intent-handler-${n}`,a=(0,l.wrapIntentHandler)(t,s);try{await o.register(s,a),await o.dispatch("intentHandlerRegistered",{handlerId:s,...r})}catch(e){throw new Error("Unable to register intent handler")}return{unsubscribe:async()=>{o.remove(s)}}}async getCurrentContext(t){this.wire.sendAction("interop-client-get-current-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("getCurrentContext",{contextType:t})}async getInfoForIntent(t){this.wire.sendAction("interop-client-get-info-for-intent").catch((e=>{}));return(await i(this,e,"f")).dispatch("getInfoForIntent",t)}async getInfoForIntentsByContext(t){this.wire.sendAction("interop-client-get-info-for-intents-by-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("getInfoForIntentsByContext",t)}async fireIntentForContext(t){this.wire.sendAction("interop-client-fire-intent-for-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("fireIntentForContext",t)}async joinSessionContextGroup(n){try{const r=i(this,t,"f").get(n);if(r)return r.getUserInstance();const o=await i(this,e,"f"),{hasConflict:s}=await o.dispatch("sessionContextGroup:createIfNeeded",{sessionContextGroupId:n});s&&console.warn(`A (non-session) context group with the name "${n}" already exists. If you are trying to join a Context Group, call joinContextGroup instead.`);const c=new a.default(this.wire,i(this,e,"f"),n);return i(this,t,"f").set(n,c),c.getUserInstance()}catch(e){throw console.error(`Error thrown trying to create Session Context Group with id "${n}": ${e}`),e}}async onDisconnection(t){this.wire.sendAction("interop-client-add-ondisconnection-listener").catch((e=>{}));return(await i(this,e,"f")).onDisconnection((e=>{const{uuid:n}=e;t({type:"interop-broker",topic:"disconnected",brokerName:n})}))}getFDC3Sync(e){switch(e){case"1.2":return new c.Fdc3Module((()=>this),this.wire);case"2.0":return new h.Fdc3Module2((()=>this),this.wire);default:throw new Error(`Invalid FDC3 version provided: ${e}. Must be '1.2' or '2.0'`)}}async getFDC3(e){return this.getFDC3Sync(e)}static async ferryFdc3Call(t,n,r){return(await i(t,e,"f")).dispatch(n,r||null)}};return Ki.InteropClient=u,e=new WeakMap,t=new WeakMap,Ki}var yr,fr,gr,mr={};function vr(){if(yr)return mr;yr=1,Object.defineProperty(mr,"__esModule",{value:!0}),mr.overrideCheck=mr.checkFDC32Overrides=mr.getDefaultViewFdc3VersionFromAppInfo=void 0;const e=Vi();function t(t){return["fdc3HandleFindInstances","handleInfoForIntent","handleInfoForIntentsByContext","fdc3HandleGetAppMetadata","fdc3HandleGetInfo","fdc3HandleOpen","handleFiredIntent","handleFiredIntentForContext"].filter((n=>t[n]===e.InteropBroker.prototype[n]))}return mr.getDefaultViewFdc3VersionFromAppInfo=function({manifest:e,initialOptions:t}){const n=e?.platform?.defaultViewOptions?.fdc3InteropApi??t.defaultViewOptions?.fdc3InteropApi;return["1.2","2.0"].includes(n??"")?n:void 0},mr.checkFDC32Overrides=t,mr.overrideCheck=function(e,n){if(n&&"2.0"===n){const n=t(e);n.length>0&&console.warn(`WARNING: FDC3 2.0 has been set as a default option for Views in this Platform, but the required InteropBroker APIs for FDC3 2.0 compliance have not all been overridden.\nThe following APIs need to be overridden:\n${n.join("\n")}`)}},mr}function Cr(){return gr||(gr=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),i=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),i(function(){if(fr)return Ti;fr=1;var e=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ti,"__esModule",{value:!0}),Ti.InteropModule=void 0;const t=e(n),i=$i,r=d,o=Vi(),a=wr(),c=vr(),h=Tn,l=e=>new e,u="You have attempted to use or modify InteropBroker parameters, which is not allowed. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.";class p extends r.Base{async init(e,n=l){this.wire.sendAction("interop-init").catch((()=>{}));const r=await this.wire.environment.getInteropInfo(this.wire.getFin()),s=(0,i.createUnusableObject)(u),a=(0,i.createWarningObject)(u,(0,t.default)(r)),d=async()=>{throw new Error(u)},p=o.InteropBroker.createClosedConstructor(this.wire,(()=>this.fin.InterApplicationBus.Channel.create(`interop-broker-${e}`)),r);let w;return w=Array.isArray(n)?new((0,h.overrideFromComposables)(...n)(p))(s,d,a):await n(p,s,d,a),(0,c.overrideCheck)(w,r.fdc3Version),w}connectSync(e,t){return this.wire.sendAction("interop-connect-sync").catch((()=>{})),new a.InteropClient(this.wire,this.wire.environment.whenReady().then((()=>this.fin.InterApplicationBus.Channel.connect(`interop-broker-${e}`,{payload:t}))))}}return Ti.InteropModule=p,Ti}(),e),i(wr(),e),i(Vi(),e)}(Li)),Li}var br={},Ir={},Er={},xr={};Object.defineProperty(xr,"__esModule",{value:!0}),xr.getSnapshotSourceChannelName=void 0;xr.getSnapshotSourceChannelName=e=>`snapshot-source-provider-${e.uuid}`;var Ar,Pr,Mr,_r,Or,Sr=s&&s.__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},Rr=s&&s.__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)};Object.defineProperty(Er,"__esModule",{value:!0}),Er.SnapshotSource=void 0;const Fr=d,jr=xr,kr=new Map;class Lr extends Fr.Base{constructor(e,t){super(e),Ar.set(this,void 0),Pr.set(this,(()=>(kr.has(this.identity.uuid)||kr.set(this.identity.uuid,{eventFired:null,clientPromise:null}),kr.get(this.identity.uuid)))),Mr.set(this,(()=>(Rr(this,Pr,"f").call(this).clientPromise||(Rr(this,Pr,"f").call(this).clientPromise=Rr(this,_r,"f").call(this)),Rr(this,Pr,"f").call(this).clientPromise))),_r.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);try{Rr(this,Pr,"f").call(this).eventFired||await Rr(this,Or,"f").call(this);const t=await this.fin.InterApplicationBus.Channel.connect(e,{wait:!1});return t.onDisconnection((()=>{Rr(this,Pr,"f").call(this).clientPromise=null,Rr(this,Pr,"f").call(this).eventFired=null})),t}catch(e){throw Rr(this,Pr,"f").call(this).clientPromise=null,new Error("The targeted SnapshotSource is not currently initialized. Await this object's ready() method.")}})),Or.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);let t,n;const i=new Promise(((e,i)=>{t=e,n=i}));Rr(this,Pr,"f").call(this).eventFired=i;const r=async i=>{try{i.channelName===e&&(t(),await this.fin.InterApplicationBus.Channel.removeListener("connected",r))}catch(e){n(e)}};await this.fin.InterApplicationBus.Channel.on("connected",r)})),Sr(this,Ar,t,"f")}get identity(){return Rr(this,Ar,"f")}async ready(){this.wire.sendAction("snapshot-source-ready").catch((e=>{}));try{await Rr(this,Mr,"f").call(this)}catch(e){await Rr(this,Pr,"f").call(this).eventFired}}async getSnapshot(){this.wire.sendAction("snapshot-source-get-snapshot").catch((e=>{}));const e=await Rr(this,Mr,"f").call(this),t=await e.dispatch("get-snapshot");return(await t).snapshot}async applySnapshot(e){this.wire.sendAction("snapshot-source-apply-snapshot").catch((e=>{}));return(await Rr(this,Mr,"f").call(this)).dispatch("apply-snapshot",{snapshot:e})}}Er.SnapshotSource=Lr,Ar=new WeakMap,Pr=new WeakMap,Mr=new WeakMap,_r=new WeakMap,Or=new WeakMap,Object.defineProperty(Ir,"__esModule",{value:!0}),Ir.SnapshotSourceModule=void 0;const Tr=d,$r=Er,Br=xr;class Gr extends Tr.Base{async init(e){if(this.wire.sendAction("snapshot-source-init").catch((e=>{})),"object"!=typeof e||"function"!=typeof e.getSnapshot||"function"!=typeof e.applySnapshot)throw new Error("you must pass in a valid SnapshotProvider");const t=await this.fin.InterApplicationBus.Channel.create((0,Br.getSnapshotSourceChannelName)(this.fin.me));t.register("get-snapshot",(async()=>({snapshot:await e.getSnapshot()}))),t.register("apply-snapshot",(({snapshot:t})=>e.applySnapshot(t)))}wrapSync(e){return this.wire.sendAction("snapshot-source-wrap-sync").catch((e=>{})),new $r.SnapshotSource(this.wire,e)}async wrap(e){return this.wire.sendAction("snapshot-source-wrap").catch((e=>{})),this.wrapSync(e)}}Ir.SnapshotSourceModule=Gr,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Ir,e),n(Er,e)}(br),Object.defineProperty(a,"__esModule",{value:!0});var Wr=a.Fin=void 0;const Hr=t,Nr=c,Dr=ie(),Ur=Z(),Vr=de,zr=en,Kr=rn,qr=un,Jr=bn,Yr=J(),Zr=An,Qr=ki,Xr=Cr(),eo=br;class to extends Hr.EventEmitter{constructor(e){super(),this.wire=e,this.System=new Nr.System(e),this.Window=new Dr._WindowModule(e),this.Application=new Ur.ApplicationModule(e),this.InterApplicationBus=new Vr.InterApplicationBus(e),this.Clipboard=new zr.Clipboard(e),this.ExternalApplication=new Kr.ExternalApplicationModule(e),this.Frame=new qr._FrameModule(e),this.GlobalHotkey=new Jr.GlobalHotkey(e),this.Platform=new Zr.PlatformModule(e,this.InterApplicationBus.Channel),this.View=new Yr.ViewModule(e),this.Interop=new Xr.InteropModule(e),this.SnapshotSource=new eo.SnapshotSourceModule(e),e.registerFin(this),this.me=(0,Qr.getMe)(e),e.on("disconnected",(()=>{this.emit("disconnected")}))}}Wr=a.Fin=to;var no={},io={};function ro(e){return"string"==typeof e.manifestUrl}function oo(e){return ao(e)&&"string"==typeof e.address}function so(e){return oo(e)&&"string"==typeof e.token}function ao(e){return"string"==typeof e.uuid}function co(e){return e.runtime&&"string"==typeof e.runtime.version}function ho(e){return ao(e)&&co(e)}Object.defineProperty(io,"__esModule",{value:!0}),io.isInternalConnectConfig=io.isPortDiscoveryConfig=io.isNewConnectConfig=io.isConfigWithReceiver=io.isRemoteConfig=io.isExistingConnectConfig=io.isExternalConfig=void 0,io.isExternalConfig=ro,io.isExistingConnectConfig=oo,io.isRemoteConfig=so,io.isConfigWithReceiver=function(e){return"object"==typeof e.receiver&&so({...e,address:""})},io.isNewConnectConfig=ho,io.isPortDiscoveryConfig=function(e){return ro(e)&&co(e)||ho(e)},io.isInternalConnectConfig=function(e){return oo(e)||ho(e)};var lo={},uo={};Object.defineProperty(uo,"__esModule",{value:!0}),uo.EmitterMap=void 0;const po=t;function wo(e){return Buffer.from(e).toString("base64")}uo.EmitterMap=class{constructor(){this.storage=new Map}hashKeys(e){return e.map(wo).join("/")}getOrCreate(e){const t=this.hashKeys(e);return this.storage.has(t)||this.storage.set(t,new po.EventEmitter),this.storage.get(t)}has(e){return this.storage.has(this.hashKeys(e))}delete(e){const t=this.hashKeys(e);return this.storage.delete(t)}},Object.defineProperty(lo,"__esModule",{value:!0});const yo=uo;class fo extends yo.EmitterMap{constructor(){super(...arguments),this.dispatchEvent=e=>{if(function(e){return"process-desktop-event"===e.action}(e)){const{payload:t}=e,n=function(e){const{topic:t}=e;if("frame"===t||"window"===t||"view"===t){const{uuid:n,name:i}=e;return[t,n,i]}if("application"===t){const{uuid:n}=e;return[t,n]}return[t]}(t);if(this.has(n))return this.getOrCreate(n).emit(t.type,t),!0}return!1}}}lo.default=fo;var go,mo,vo=s&&s.__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},Co=s&&s.__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)},bo=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(no,"__esModule",{value:!0});var Io=no.Transport=void 0;const Eo=t,xo=io,Ao=g,Po=bo(lo),Mo=ki,_o=ke;class Oo extends Eo.EventEmitter{constructor(e,t,n){super(),this.wireListeners=new Map,this.topicRefMap=new Map,this.eventAggregator=new Po.default,this.messageHandlers=[this.eventAggregator.dispatchEvent],go.set(this,void 0),mo.set(this,void 0),this.connectSync=()=>{Co(this,go,"f").connectSync()},this.getPort=()=>Co(this,go,"f").getPort(),vo(this,go,new e(this.onmessage.bind(this)),"f"),this.environment=t,this.sendRaw=Co(this,go,"f").send.bind(Co(this,go,"f")),this.registerMessageHandler(this.handleMessage.bind(this)),Co(this,go,"f").on("disconnected",(()=>{for(const[,{handleNack:e}]of this.wireListeners)e({reason:"Remote connection has closed"});this.wireListeners.clear(),this.emit("disconnected")}));const{uuid:i,name:r}=n,o=this.environment.getCurrentEntityType();this.me=(0,Mo.getBaseMe)(o,i,r)}getFin(){if(!Co(this,mo,"f"))throw new Error("No Fin object registered for this transport");return Co(this,mo,"f")}registerFin(e){if(Co(this,mo,"f"))throw new Error("Fin object has already been registered for this transport");vo(this,mo,e,"f")}shutdown(){return Co(this,go,"f").shutdown()}async connect(e){if((0,xo.isConfigWithReceiver)(e))return await Co(this,go,"f").connect(e.receiver),this.authorize(e);if((0,xo.isRemoteConfig)(e))return this.connectRemote(e);if((0,xo.isExistingConnectConfig)(e))return this.connectByPort(e);if((0,xo.isNewConnectConfig)(e)){const t=await this.environment.retrievePort(e);return this.connectByPort({...e,address:`ws://localhost:${t}`})}}async connectRemote(e){return await Co(this,go,"f").connect(new(this.environment.getWsConstructor())(e.address)),this.authorize(e)}async connectByPort(e){const{address:t,uuid:n}=e,i={...e,type:"file-token"},r=Co(this,go,"f");await r.connect(new(this.environment.getWsConstructor())(e.address));const o=await this.sendAction("request-external-authorization",{uuid:n,type:"file-token"},!0);if("external-authorization-response"!==o.action)throw new Ao.UnexpectedActionError(o.action);return await this.environment.writeToken(o.payload.file,o.payload.token),this.authorize(i)}async authorize(e){const t=await this.sendAction("request-authorization",e,!0);if("authorization-response"!==t.action)throw new Ao.UnexpectedActionError(t.action);if(!0!==t.payload.success)throw new Ao.RuntimeError(t.payload)}sendAction(e,t={},n=!1){let i=()=>{};const r=Ao.RuntimeError.getCallSite(1),o=this.environment.getNextMessageId(),s=new Promise(((s,a)=>{i=a;const c={action:e,payload:t,messageId:o},d=Co(this,go,"f");return this.addWireListener(o,s,(e=>this.nackHandler(e,a,r)),n),d.send(c).catch(a)}));return Object.assign(s,{cancel:i,messageId:o})}nackHandler(e,t,n){t("string"==typeof e?e:new Ao.RuntimeError(e,n))}ferryAction(e){return new Promise(((t,n)=>{const i=this.environment.getNextMessageId();e.messageId=i;const r=e=>{t(e.payload)};return Co(this,go,"f").send(e).then((()=>this.addWireListener(i,r,(e=>this.nackHandler(e,n)),!1))).catch(n)}))}registerMessageHandler(e){this.messageHandlers.push(e)}addWireListener(e,t,n,i){i?this.uncorrelatedListener=t:this.wireListeners.has(e)?n({reason:"Duplicate handler id",error:(0,_o.errorToPOJO)(new Ao.DuplicateCorrelationError(String(e)))}):this.wireListeners.set(e,{resolve:t,handleNack:n})}onmessage(e){for(const t of this.messageHandlers)t.call(null,e)}handleMessage(e){const t=e.correlationId||NaN;if("correlationId"in e){if(!this.wireListeners.has(t))return!1;{const{resolve:n,handleNack:i}=this.wireListeners.get(t);"ack"!==e.action?i({reason:"Did not receive ack action",error:(0,_o.errorToPOJO)(new Ao.NoAckError(e.action))}):"payload"in e?e.payload.success?n.call(null,e):i(e.payload):"string"==typeof e.reason?i(e):(console.warn("Received invalid response from core",e),i({reason:"invalid response shape"})),this.wireListeners.delete(t)}}else this.uncorrelatedListener&&this.uncorrelatedListener.call(null,e),this.uncorrelatedListener=()=>{};return!0}}Io=no.Transport=Oo,go=new WeakMap,mo=new WeakMap;const So=(...e)=>({log:(...t)=>console.debug(`[${(new Date).toISOString()}]`,...(e=>e.map((e=>`[${e}]`)))(e),...t),getLogger:(...t)=>So(...e,...t)}),Ro=So("@openfin/core-web/client");function Fo(e,t){if(!function(e){return"string"==typeof e}(e))throw new Error(`Property ${t} has invalid type. Expected string, got ${typeof e}.`)}const jo="web-broker-ports-ready",ko=Ro.getLogger("get-web-interop-ports");function Lo(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)}function To(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}"function"==typeof SuppressedError&&SuppressedError;const $o=e=>{var n,i,r;return r=class extends t.EventEmitter{constructor(t){super(),n.set(this,void 0),i.set(this,!1),this.connectSync=()=>{Lo(this,i,"f")||(e.addEventListener("message",(e=>{e.data?.topic?.startsWith("wire-message")&&e.data.message&&Lo(this,n,"f").call(this,{...JSON.parse(e.data.message),ports:e.ports})})),e.start())},this.connect=async()=>{this.connectSync()},this.send=t=>(e.postMessage({topic:"wire-message",message:JSON.stringify(t)}),Promise.resolve()),this.shutdown=async()=>{e.close()},To(this,n,t,"f")}getPort(){return e}},n=new WeakMap,i=new WeakMap,r};var Bo={},Go={};Object.defineProperty(Go,"__esModule",{value:!0}),Go.BaseEnvironment=void 0;const Wo=vr();Go.BaseEnvironment=class{async getViewWindowIdentity(e,t){const{identity:n}=await e.View.wrapSync(t).getCurrentWindow();return n}async getInteropInfo(e){const t=await e.Application.getCurrentSync().getInfo().catch((()=>null)),n=t?.initialOptions?.interopBrokerConfiguration??{};return{fdc3Version:t?(0,Wo.getDefaultViewFdc3VersionFromAppInfo)(t):void 0,...n,fdc3Info:{providerVersion:await e.System.getVersion(),provider:"OpenFin"}}}},Object.defineProperty(Bo,"__esModule",{value:!0});var Ho=Bo.BrowserEnvironment=void 0;const No=Go;class Do extends No.BaseEnvironment{constructor(){super(...arguments),this.type="other",this.getRandomId=()=>{const e=new Uint32Array(1);return window.crypto.getRandomValues(e)[0].toString(32)}}getAdapterVersionSync(){return""}observeBounds(e,t){throw new Error("Method not implemented.")}layoutAllowedInContext(e){return!1}initLayoutManager(e,t,n){throw new Error("Method not implemented.")}applyLayoutSnapshot(e,t,n){throw new Error("Method not implemented.")}createLayout(e,t){throw new Error("Method not implemented.")}destroyLayout(e,t){throw new Error("Method not implemented.")}resolveLayout(e,t){throw new Error("Method not implemented.")}initPlatform(...e){throw new Error("Method not implemented.")}writeToken(e,t){return Promise.resolve("")}retrievePort(e){throw new Error("Method not implemented.")}getNextMessageId(){return this.getRandomId()}createChildContent(e){throw new Error("Method not implemented.")}getWebWindow(e){throw new Error("Method not implemented.")}getCurrentEntityIdentity(){throw new Error("Method not implemented.")}getCurrentEntityType(){return"external connection"}raiseEvent(e,t){throw new Error("Method not implemented.")}getUrl(){return location.href}getDefaultChannelOptions(){return{create:{},connect:{}}}getRtcPeer(){return new RTCPeerConnection}getWsConstructor(){return WebSocket}whenReady(){return Promise.resolve()}}Ho=Bo.BrowserEnvironment=Do;const Uo=e=>"platform"in e&&void 0!==e.platform;var Vo,zo;class Ko extends Ho{constructor(e){super(),this.connectConfig=e,Vo.set(this,void 0),zo.set(this,new W((async()=>Promise.resolve().then((function(){return __webpack_require__(/*! ./main-b14f67c9.js */ "../../node_modules/@openfin/core-web/out/main-b14f67c9.js")}))))),Uo(e)&&this.validatePlatformOptions(e)}getAdapterVersionSync(){return"0.39.21"}validatePlatformOptions({platform:e}){if(!("layoutSnapshot"in e))throw new Error("Platform options are missing layoutSnapshot. Please provide a layoutSnapshot in the platform options.");if("windows"in e||"windows"in e.layoutSnapshot)throw new Error("It appears you tried to call connect() with a snapshot object from an OpenFin desktop environment. Note that connect() expects to be called with a platform property with this structure: { platform: { layoutSnapshot } }. To get a layoutSnapshot of the expected structure, use fin.Platform.Layout.getCurrentLayoutManagerSync().getLayoutSnapshot() in v34+ in your desktop environment.");const{layouts:t}=e.layoutSnapshot;Object.entries(t).map((([e,t])=>{if("object"!=typeof t||null===t)throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must be an object.`);if(!("content"in t))throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must contain a 'content' property.`)}))}async getInteropInfo(e){return{...{contextGroups:void 0,logging:{beforeAction:{enabled:!1},afterAction:{enabled:!1}}},fdc3Version:void 0,fdc3Info:{providerVersion:"0.39.21",provider:"OpenFin Web"}}}layoutAllowedInContext(e){return!0}async initLayoutManager(e,t,n){if(Lo(this,Vo,"f"))throw new Error("Layout already initialized.");if(!Uo(this.connectConfig))throw new Error("Platform options are missing from connection config.");const{WebLayoutEntryPoint:i}=await Lo(this,zo,"f").getValue();return To(this,Vo,new i(this.connectConfig),"f"),await Lo(this,Vo,"f").initLayoutManager(e,t,n)}async applyLayoutSnapshot(e,t,n){Lo(this,Vo,"f")?.applyLayoutSnapshot(e,t,n)}async createLayout(e,t){return Lo(this,Vo,"f")?.createLayout(e,t)}async destroyLayout(e,t){return Lo(this,Vo,"f")?.destroyLayout(e,t)}async getViewWindowIdentity(e,t){return Promise.resolve({uuid:t.uuid,name:t.uuid})}}Vo=new WeakMap,zo=new WeakMap;const qo=()=>{const e=((e,t)=>{const n=new RegExp(`^${t}<(?.*)>$`).exec(e)?.groups?.meta;if(n)try{return JSON.parse(atob(n))}catch(e){throw new Error(`Failed to decode JSON from ${n}.`)}})(window.name,"of-frame");if(e)try{const{name:t,uuid:n,brokerUrl:i,providerId:r,contextGroup:o}=e;return Fo(i,"brokerUrl"),Fo(n,"uuid"),Fo(t,"name"),{identity:{name:t,uuid:n},brokerUrl:i,interopConfig:{providerId:r,currentContextGroup:o}}}catch(e){throw new Error(`Unexpected error occurred when inferring platform information: ${e.stack}`)}},Jo=()=>{const e=r.v4();return{uuid:e,name:e}},Yo=async e=>{if("enabled"===e.connectionInheritance){const t=await(async e=>{const t=qo();if(t){const{validateOptions:n=(()=>!0)}=e,{identity:i,...r}=t;if(!await n(r))throw new Error("Parent options were rejected by validateOptions.");return t}})(e);if(t)return t}if(!e.options){const t="enabled"===e.connectionInheritance?"Broker URL was not specified nor provided by a platform container.":"Connection inheritance is disabled but no options were provided.";throw new Error(t)}return{...e.options,identity:Jo()}};exports.__classPrivateFieldGet=Lo,exports.__classPrivateFieldSet=To,exports.apiExposer=Gn,exports.commonjsGlobal=s,exports.connect=async t=>{try{Ro.log("Establishing connection",t);const{brokerUrl:n,identity:i,timeout:r,interopConfig:s}=await Yo(t),{workerPort:a,iframeBrokerPort:c}=await(async(e,t,n)=>{const{origin:i}=new URL(e),r=document.createElement("IFRAME");let s;r.style.display="none";try{return await new Promise(((a,c)=>{const d=e=>{if(e.source===r.contentWindow&&e.data?.topic===`ack-${jo}`){if(e.origin!==i)c(new Error(`Broker redirected to unexpected origin ${e.origin}, expected ${i}.`));else if(e.data.success){const[t,n]=e.ports;a({iframeBrokerPort:t,workerPort:n})}else c(new m(e.data));window.removeEventListener("message",d),clearTimeout(s)}};window.addEventListener("message",d),ko.log(`Connecting to broker ${e}`),r.setAttribute("src",e),r.setAttribute("name",o(t,"of-broker")),document.body.appendChild(r),ko.log("Iframe loaded, awaiting init message from iframe"),n&&(s=setTimeout((()=>{window.removeEventListener("message",d),document.body.removeChild(r),c(new Error("Worker did not initialize in time"))}),n))}))}catch(e){throw new Error(`Failed to initialise Fin Web Client. ${e.message}`,{cause:e})}})(n,i,r);Ro.log("Successfully established connection to shared worker");const d={entityType:"external connection",...i};a.start(),c.start();const h=((t,n,i)=>{const r=$o(n),o=new Ko(t),s=new Io(r,o,i);return s.connectSync(),window.Buffer=e.Buffer,new Wr(s)})(t,a,d);return s?.providerId&&(h.me.interop=h.Interop.connectSync(s.providerId),s?.currentContextGroup&&h.me.interop.joinContextGroup(s.currentContextGroup).catch((e=>{console.warn(`Error joining specified context group: ${s?.currentContextGroup}, continuing`,e)}))),{...h,me:{...h.me,identity:{uuid:h.me.uuid,name:h.me.name}}}}catch(e){throw new Error(`An error occured during web-interop connection: ${e.message}`)}},exports.decorators=Nn,exports.encodeOptions=o,exports.layout_constants=ai,exports.lazy=G; /***/ }), -/***/ "./node_modules/@openfin/core-web/out/main-b14f67c9.js": -/*!*************************************************************!*\ - !*** ./node_modules/@openfin/core-web/out/main-b14f67c9.js ***! - \*************************************************************/ +/***/ "../../node_modules/@openfin/core-web/out/main-b14f67c9.js": +/*!*****************************************************************!*\ + !*** ../../node_modules/@openfin/core-web/out/main-b14f67c9.js ***! + \*****************************************************************/ /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; -var t=__webpack_require__(/*! ./main-8cad4070.js */ "./node_modules/@openfin/core-web/out/main-8cad4070.js"),e=__webpack_require__(/*! uuid */ "../../node_modules/uuid/dist/esm-browser/index.js");__webpack_require__(/*! buffer/ */ "../../node_modules/buffer/index.js"),__webpack_require__(/*! events */ "../../node_modules/events/events.js"),__webpack_require__(/*! lodash/cloneDeep */ "../../node_modules/lodash/cloneDeep.js"),__webpack_require__(/*! lodash/isEqual */ "../../node_modules/lodash/isEqual.js");var i={},n={};Object.defineProperty(n,"__esModule",{value:!0}),n.mapValuesAsync=n.mapEntriesAsync=void 0;const o=(t,[e,i])=>({...t,[e]:i});async function s(t,e){return(await Promise.all(e.map((async([e,i])=>[e,await t(i,e)])))).reduce(o,{})}n.mapEntriesAsync=s,n.mapValuesAsync=async function(t,e){let i;return i=e instanceof Map?[...e.entries()]:Object.entries(e),s(t,i)};var r,a,l,h,d=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldSet||function(t,e,i,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(t,i):o?o.value=i:e.set(t,i),i},c=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldGet||function(t,e,i,n){if("a"===i&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?n:"a"===i?n.call(t):n?n.value:e.get(t)};Object.defineProperty(i,"__esModule",{value:!0});var m=i.DefaultLayoutManager=void 0;const u=n;class p{constructor(t){a.set(this,void 0),l.set(this,new Map),d(this,a,t,"f")}size(){return c(this,l,"f").size}async applyLayoutSnapshot({layouts:t}){if(Object.keys(t).length>1)throw new Error("[LayoutManager] Tried to call applyLayoutSnapshot with more than 1 layout. When implementing multiple layouts via overridden LayoutManager class, you must override and fully implement the applyLayoutSnapshot method without calling super.applyLayoutSnapshot().");const[[e,i]]=Object.entries(t);await p.createLayout(this,{layoutName:e,layout:i})}async showLayout({layoutName:t}){}async getLayoutSnapshot(){return{layouts:await(0,u.mapValuesAsync)((t=>t.getFrameSnapshot()),c(this,l,"f"))}}async removeLayout({layoutName:t}){}getLayoutIdentityForView(t){const e=[...c(this,l,"f").values()].find((e=>e.getCurrentViews().some((e=>e.name===t.name&&e.uuid===t.uuid))));return e?.identity??void 0}isLayoutVisible({layoutName:t}){return c(p,r,"m",h).call(p,this,t).isVisible()}resolveLayoutIdentity(t){if(t&&"layoutName"in t)return t;const e=[...c(this,l,"f").values()];if(1===e.length)return e[0].identity;const i=e.find((t=>t.isVisible()));return i?.identity??void 0}static async resolveLayout(t,e){const i=t.resolveLayoutIdentity(e);if(void 0===i||!("layoutName"in i))throw new Error("[layout-manager] resolveLayout: Could not resolve the layout identity. Make sure you include 'layoutName' in the identity object.");return c(p,r,"m",h).call(p,t,i.layoutName)}static async handleSharedView(t,e,i){await(0,u.mapValuesAsync)((async t=>{if(t.identity.layoutName!==e.layoutName){const e=t.getCurrentViews().find((t=>t.name===i.name));e&&await t.onViewDetached({viewIdentity:e,target:null}).catch(console.error)}}),c(t,l,"f"))}static async handleLastViewRemoved(t,e){await t.removeLayout(e),await c(t,a,"f").handleLastViewRemoved(t)}static async destroyLayout(t,{layoutName:e}){await c(p,r,"m",h).call(p,t,e).destroy(),c(t,l,"f").delete(e)}static async createLayout(t,e){const{layoutName:i}=e;if(c(t,l,"f").has(i))throw new Error(`Layout name ${i} already exists`);await c(t,a,"f").createLayout(e,t)}static registerLayout(t,e,i){c(t,l,"f").set(e,i)}static getAllLayouts(t){return[...c(t,l,"f").values()]}static setInitialSnapshot(t,e){c(t,a,"f").setInitialSnapshot(e)}static createClosedConstructor(...t){return class extends p{constructor(){super(...t)}}}}m=i.DefaultLayoutManager=p,r=p,a=new WeakMap,l=new WeakMap,h=function(t,e){const i=c(t,l,"f").get(e);if(!i)throw new Error(`[layout-manager] getLayoutByName: Could not locate layout with name '${e}'`);return i};var g={},f={},v={};Object.defineProperty(v,"__esModule",{value:!0}),v.ReversibleMap=void 0;v.ReversibleMap=class{constructor(){this.valueToKey=new Map,this.keyToValue=new Map,this.setUnique=(t,e)=>{if(this.hasKey(t)||this.hasValue(e))throw new Error("Key or value already in the map.");this.keyToValue.set(t,e),this.valueToKey.set(e,t)},this.getKey=t=>{const e=this.valueToKey.get(t);if(!e)throw new Error("Value not found in the map.");return e},this.deleteKey=t=>{const e=this.getValue(t);return this.keyToValue.delete(t),this.valueToKey.delete(e),e},this.deleteValue=t=>{const e=this.getKey(t);return this.keyToValue.delete(e),this.valueToKey.delete(t),e},this.hasKey=t=>this.keyToValue.has(t),this.hasValue=t=>this.valueToKey.has(t)}getValue(t){const e=this.keyToValue.get(t);if(!e)throw new Error("Key not found in the map.");return e}},Object.defineProperty(f,"__esModule",{value:!0});var _=f.LayoutContentCache=void 0;const y=t.lazy,C=v;class w{constructor(){this.contentItemCache=new C.ReversibleMap,this.contentItemCacheId=0,this.createCacheKey=()=>{const t=`entity-${this.contentItemCacheId.toString()}`;return this.contentItemCacheId+=1,t},this.hasKey=t=>this.contentItemCache.hasKey(t),this.getItemOrUndefined=t=>{try{return this.getContentItemOrThrow(t)}catch(t){return}},this.getContentItemOrThrow=(t,e)=>{if(!this.contentItemCache.hasKey(t))throw new Error("Layout component has been destroyed or detached from the current layout.");const i=this.contentItemCache.getValue(t);if(e&&!e.includes(i.type))throw new Error(`Layout item is not the expected type. Expected ${e.join(", ")}, got ${i.type}.`);return i},this.getOrCreateEntityId=t=>{if(this.contentItemCache.hasValue(t))return this.contentItemCache.getKey(t);t.onDestroyed((()=>{this.contentItemCache.deleteValue(t)}));const e=this.createCacheKey();return this.contentItemCache.setUnique(e,t),e}}static getSingleInstance(){return w.singleton.getValue()}}_=f.LayoutContentCache=w,w.singleton=new y.Lazy((()=>new w));var I={},b={};!function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.getAdjacentStacks=t.doShareEdge=t.getAdjacentItem=void 0;t.getAdjacentItem=(e,i)=>{const{parent:n}=e;if(e.isRoot()||!n)return;const o=["top","bottom"].includes(i)?"column":"row",s=["top","left"].includes(i)?-1:1;if(n.type===o){const t=n.contentItems.indexOf(e)+s;if(t>=0&&t{const n=t.getBounds(),o=e.getBounds();if(!n||!o)return!1;if(["top","bottom"].includes(i)){return!(n.righto.right)}return!(n.bottomo.bottom)};t.getAdjacentStacks=(e,i)=>{const n=["top","bottom"].includes(i)?"row":"column",o=s=>"stack"===s.type?(0,t.doShareEdge)(e,s,i)?[s]:[]:"root"===s.type||"ground"===s.type?[]:s.type===n?s.contentItems.map((t=>o(t))).flat():s.type!==n?["top","right"].includes(i)?o(s.contentItems[s.contentItems.length-1]):o(s.contentItems[0]):[],s=(0,t.getAdjacentItem)(e,i);return s?o(s):[]}}(b);var S=t.commonjsGlobal&&t.commonjsGlobal.__decorate||function(t,e,i,n){var o,s=arguments.length,r=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(s<3?o(r):s>3?o(e,i,r):o(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};Object.defineProperty(I,"__esModule",{value:!0}),I.LayoutEntitiesController=void 0;const E=t.decorators,x=b,L=i;class z{constructor(t,e,i){this.wire=t,this.layoutManager=e,this.layoutContentCache=i,this.analytics=t=>{this.wire.sendAction(`layout-controller-${t}`).catch((()=>{}))},this.getLayoutIdentityForViewOrThrow=async t=>{const e=this.layoutManager.getLayoutIdentityForView(t);if(!e)throw new Error(`View identity ${t.name} is not attached to any layouts.`);return e},this.getRoot=async t=>{this.analytics("get-root");const e=(await this.getLayout(t)).getRoot();return{type:e.type,entityId:this.layoutContentCache.getOrCreateEntityId(e)}},this.getStackByView=async t=>{this.analytics("get-stack-by-view");const e=await this.getLayoutIdentityForViewOrThrow(t),i=(await this.getLayout(e)).getStackByView(t);if("stack"===i?.type)return{entityId:this.layoutContentCache.getOrCreateEntityId(i),type:"stack"}},this.getStackViews=t=>{this.analytics("get-stack-views");return this.layoutContentCache.getContentItemOrThrow(t,["stack"]).contentItems.map((t=>({name:t.viewName,uuid:this.wire.me.uuid})))},this.isRoot=t=>{this.analytics("is-root");return this.layoutContentCache.getContentItemOrThrow(t).isRoot()},this.exists=t=>(this.analytics("exists"),this.layoutContentCache.hasKey(t)),this.addViewToStack=async(t,e,{index:i}={index:0})=>{this.analytics("add-view-to-stack");const n=this.layoutContentCache.getContentItemOrThrow(t);if(i&&i>n.contentItems.length+1)throw new Error(`Index '${i}' out of range, please exclude the index or specify a number between 0 and ${n.contentItems.length}`);const o={id:t,index:i},{identity:s}=await n.layout.platformCreateView(e,{location:o});return s},this.findViewInStack=(t,e)=>t.contentItems.find((t=>t.viewName===e.name)),this.removeViewFromStack=async(t,e)=>{this.analytics("remove-view-from-stack");const i=this.layoutContentCache.getContentItemOrThrow(t,["stack"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to remove a view ('${e.name}') which does not belong to the stack.`);await n.layout.platformCloseView(e)},this.createAdjacentStack=async(t,e,{position:i="right"}={})=>{if(this.analytics("create-adjacent-stack"),!Array.isArray(e)||0===e.length)throw new Error('The parameter "views" must be an array with at least 1 element.');if(!["top","bottom","left","right"].includes(i))throw new Error(`Invalid position '${i}' specified.`);const n=this.layoutContentCache.getContentItemOrThrow(t).createAdjacentStack({position:i}),o=this.layoutContentCache.getOrCreateEntityId(n);return await Promise.all(e.reverse().map((t=>this.addViewToStack(o,t)))),o},this.getAdjacentStacks=async({targetId:t,edge:e})=>{this.analytics("get-adjacent-stacks");const i=this.layoutContentCache.getContentItemOrThrow(t);return(0,x.getAdjacentStacks)(i,e).map((t=>({entityId:this.layoutContentCache.getOrCreateEntityId(t)})))},this.setStackActiveView=async(t,e)=>{this.analytics("set-stack-active-view");const i=this.layoutContentCache.getContentItemOrThrow(t,["stack"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to set a view ('${e.name}') as active when it does not belong to the stack.`);i.setActiveContentItem(n,!0)}}async getLayout(t){const e=await L.DefaultLayoutManager.resolveLayout(this.layoutManager,t);if(!e)throw new Error(`Could not resolve target layout identity ${JSON.stringify(t)}`);return e}getContent(t){this.analytics("get-content");return this.layoutContentCache.getContentItemOrThrow(t,["column","row"]).contentItems.map((t=>({type:t.type,entityId:this.layoutContentCache.getOrCreateEntityId(t)})))}getParent(t){this.analytics("get-parent");const e=this.layoutContentCache.getContentItemOrThrow(t);if(!e.isRoot())return e.parent?.contentItems.includes(e)?{type:e.parent.type,entityId:this.layoutContentCache.getOrCreateEntityId(e.parent)}:void 0}}S([(0,E.expose)()],z.prototype,"getLayoutIdentityForViewOrThrow",void 0),S([(0,E.expose)()],z.prototype,"getRoot",void 0),S([(0,E.expose)()],z.prototype,"getStackByView",void 0),S([(0,E.expose)()],z.prototype,"getStackViews",void 0),S([(0,E.expose)()],z.prototype,"getContent",null),S([(0,E.expose)()],z.prototype,"getParent",null),S([(0,E.expose)()],z.prototype,"isRoot",void 0),S([(0,E.expose)()],z.prototype,"exists",void 0),S([(0,E.expose)()],z.prototype,"addViewToStack",void 0),S([(0,E.expose)()],z.prototype,"removeViewFromStack",void 0),S([(0,E.expose)()],z.prototype,"createAdjacentStack",void 0),S([(0,E.expose)()],z.prototype,"getAdjacentStacks",void 0),S([(0,E.expose)()],z.prototype,"setStackActiveView",void 0),I.LayoutEntitiesController=z,Object.defineProperty(g,"__esModule",{value:!0});var M=g.initLayoutEndpoints=void 0;const P=t.apiExposer,T=t.layout_constants,A=f,k=I,D=i;M=g.initLayoutEndpoints=async function(t,e){const i=t.getFin(),n=await i.Platform.getCurrentSync().getClient(),o=new P.ChannelsExposer(n);await new P.ApiExposer(o).exposeInstance(new k.LayoutEntitiesController(t,e,A.LayoutContentCache.getSingleInstance()),{id:T.LAYOUT_CONTROLLER_ID}),await async function(t,e){const i=t=>async i=>{const n=await D.DefaultLayoutManager.resolveLayout(e,i.target);if(!n)throw new Error(`Could not resolve the layout target from payload ${JSON.stringify(i)}`);return t(n,i)},n=(e,n)=>{t.register(e,i(n))},o=(t,e)=>{n(t,e)};n("replace-view",((t,e)=>t.replaceView(e))),n("replace-layout",((t,{layout:e})=>t.replaceLayout(e))),n("add-view",((t,e)=>t.insertView(e))),o("layout-add-view",((t,{viewOptions:e,location:i,targetView:n})=>t.platformCreateView(e,{location:i,targetView:n}))),n("close-view",((t,e)=>t.cleanupView(e.viewIdentity))),o("layout-close-view",((t,e)=>t.platformCloseView(e.viewIdentity))),n("apply-preset-layout",((t,e)=>t.applyPreset(e))),n("get-layout-views",(t=>t.getCurrentViews())),n("get-frame-snapshot",(t=>t.getFrameSnapshot())),n("is-visible",(t=>t.isVisible())),n("destroy",(t=>t.destroy())),t.register("get-layout-snapshot",(()=>e.getLayoutSnapshot()))}(n,e)};var R={};Object.defineProperty(R,"__esModule",{value:!0});var U=R.BaseLayout=void 0;U=R.BaseLayout=class{};var O={};Object.defineProperty(O,"__esModule",{value:!0});var V=O.DOMEmitter=void 0;V=O.DOMEmitter=class{constructor(t){this.container=t}dispatchLocalEvent(t,e){const i={...e,type:t,tabSelector:`tab-${e.name}`,containerSelector:`container-${e.name}`,topic:"openfin-DOM-event"};this.container.dispatchEvent(new CustomEvent(t,{detail:i}))}};var B={};Object.defineProperty(B,"__esModule",{value:!0});var H=B.mapLayoutContentItemsImmutableSync=B.mapLayoutContentItemsImmutable=W=B.isVisible=void 0;var W=B.isVisible=t=>(0!==t.offsetWidth||0!==t.offsetHeight)&&"hidden"!==window.getComputedStyle(t).visibility&&t.offsetTop>=0&&t.offsetLeft>=0&&t.offsetTop<=window.innerHeight&&t.offsetLeft<=window.innerWidth;const F=t=>"type"in t&&"component"===t.type;B.mapLayoutContentItemsImmutable=async function t(e,i){return F(i)?e(i):{...i,content:await Promise.all(i.content?.map((i=>t(e,i))))}},H=B.mapLayoutContentItemsImmutableSync=function t(e,i){return F(i)?e(i):{...i,content:i.content?.map((i=>t(e,i)))}};class N extends Error{constructor(t,e){super(e),this.type=t}}class G extends N{constructor(t,e){super("Configuration",t),this.node=e}}class j extends N{constructor(t){super("PopoutBlocked",t)}}class $ extends N{constructor(t){super("API",t)}}class Z extends N{constructor(t){super("Bind",t)}}class q extends Error{constructor(t,e,i){super(`${t}: ${e}${void 0===i?"":": "+i}`)}}class X extends q{constructor(t,e){super("Assert",t,e)}}class Y extends q{constructor(t,e,i){super("UnreachableCase",t,`${e}${void 0===i?"":": "+i}`)}}class K extends q{constructor(t,e){super("UnexpectedNull",t,e)}}class J extends q{constructor(t,e){super("UnexpectedUndefined",t,e)}}var Q;!function(t){let e=!1;const i={PopoutCannotBeCreatedWithGroundItemConfig:{id:0,default:"Popout cannot be created with ground ItemConfig"},PleaseRegisterAConstructorFunction:{id:1,default:"Please register a constructor function"},ComponentTypeNotRegisteredAndBindComponentEventHandlerNotAssigned:{id:2,default:"Component type not registered and BindComponentEvent handler not assigned"},ComponentIsAlreadyRegistered:{id:3,default:"Component is already registered"},ComponentIsNotVirtuable:{id:4,default:"Component is not virtuable. Requires rootHtmlElement field/getter"},VirtualComponentDoesNotHaveRootHtmlElement:{id:5,default:'Virtual component does not have getter "rootHtmlElement"'},ItemConfigIsNotTypeComponent:{id:6,default:"ItemConfig is not of type component"},InvalidNumberPartInSizeString:{id:7,default:"Invalid number part in size string"},UnknownUnitInSizeString:{id:8,default:"Unknown unit in size string"},UnsupportedUnitInSizeString:{id:9,default:"Unsupported unit in size string"}};t.idCount=Object.keys(i).length;const n=Object.values(i);t.checkInitialise=function(){if(!e)for(let e=0;e="0"&&t<="9"}function Tt(t,e){const i=zt(e);t.style.width=i}function At(t,e){const i=zt(e);t.style.height=i}function kt(t){return{width:t.offsetWidth,height:t.offsetHeight}}function Dt(t,e){t.style.display=e?"":"none"}function Rt(t,e){if(void 0!==e)for(const i in e)if(e.hasOwnProperty(i)){const n=e[i],o=t[i];t[i]=Ut(o,n)}return t}function Ut(t,e){if("object"!=typeof e)return e;if(Array.isArray(e)){const t=e.length,i=new Array(t);for(let n=0;n36)throw new Error("Too many keys in config minifier map")},t.translateObject=n}(dt||(dt={})),function(t){t.defaults={type:at.ground,content:[],size:1,sizeUnit:ht.Fractional,minSize:void 0,minSizeUnit:ht.Pixel,id:"",isClosable:!0},t.createCopy=function(t,e){switch(t.type){case at.ground:case at.row:case at.column:return gt.createCopy(t,e);case at.stack:return ut.createCopy(t,e);case at.component:return pt.createCopy(t);default:throw new Y("CICC91354",t.type,"Invalid Config Item type specified")}},t.createDefault=function(t){switch(t){case at.ground:throw new X("CICCDR91562");case at.row:case at.column:return gt.createDefault(t);case at.stack:return ut.createDefault();case at.component:return pt.createDefault();default:throw new Y("CICCDD91563",t,"Invalid Config Item type specified")}},t.isComponentItem=function(t){return t.type===at.component},t.isStackItem=function(t){return t.type===at.stack},t.isGroundItem=function(t){return t.type===at.ground}}(ct||(ct={})),function(t){t.defaultMaximised=!1,function(t){t.createCopy=function(t,e){return void 0===t?void 0:{show:null!=e?e:t.show,popout:t.popout,close:t.close,maximise:t.maximise,minimise:t.minimise,tabDropdown:t.tabDropdown}}}(t.Header||(t.Header={}))}(mt||(mt={})),function(t){function e(t){const e=t.length,i=new Array(e);for(let n=0;n"__glMaximised"===t));t>0&&(o=!0,n=n.splice(t,1)),e=n.length>0?n[0]:ct.defaults.id}else e=n;return i=void 0!==t.maximised?t.maximised:o,{id:e,maximised:i}}}(wt||(wt={})),function(t){function e(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0;return{resolved:!0,root:Et.resolve(i),openPopouts:t.resolveOpenPopouts(e.openPopouts),dimensions:t.Dimensions.resolve(e.dimensions),settings:t.Settings.resolve(e.settings),header:t.Header.resolve(e.header,e.settings,e.labels)}}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:Lt.fromResolvedArray(e.openPopouts),settings:_t.Settings.createCopy(e.settings),dimensions:t.Dimensions.fromResolved(e.dimensions),header:_t.Header.createCopy(e.header)}},t.isResolved=function(t){const e=t;return void 0!==e.resolved&&!0===e.resolved},t.resolveOpenPopouts=function(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0,{root:Et.resolve(o),openPopouts:xt.resolveOpenPopouts(e.openPopouts),dimensions:xt.Dimensions.resolve(e.dimensions),settings:xt.Settings.resolve(e.settings),header:xt.Header.resolve(e.header,e.settings,e.labels),parentId:null!==(i=e.parentId)&&void 0!==i?i:null,indexInParent:null!==(n=e.indexInParent)&&void 0!==n?n:null,window:t.Window.resolve(e.window,e.dimensions),resolved:!0}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:i(e.openPopouts),dimensions:xt.Dimensions.fromResolved(e.dimensions),settings:_t.Settings.createCopy(e.settings),header:_t.Header.createCopy(e.header),parentId:e.parentId,indexInParent:e.indexInParent,window:t.Window.fromResolved(e.window)}},t.fromResolvedArray=i}(Lt||(Lt={}));class Wt{constructor(){this._allEventSubscriptions=[],this._subscriptionsMap=new Map,this.unbind=this.removeEventListener,this.trigger=this.emit}tryBubbleEvent(t,e){}emit(t,...e){let i=this._subscriptionsMap.get(t);if(void 0!==i){i=i.slice();for(let t=0;t0){const n=e.slice();n.unshift(t);const o=this._allEventSubscriptions.slice();for(let t=0;t0?n.contentItems[0]:n,e=0);const o=this._layoutManager.createAndInitContentItem(i,t);t.addChild(o,e),this._layoutManager.layoutConfig.settings.popInOnClose?this._onClose():this.close()}createWindow(){const t=this.createUrl(),e=Math.floor(1e6*Math.random()).toString(36),i=this.serializeWindowFeatures({width:this._initialWindowSize.width,height:this._initialWindowSize.height,innerWidth:this._initialWindowSize.width,innerHeight:this._initialWindowSize.height,menubar:"no",toolbar:"no",location:"no",personalbar:"no",resizable:"yes",scrollbars:"no",status:"no"});if(this._popoutWindow=globalThis.open(t,e,i),this._popoutWindow)this._popoutWindow.addEventListener("load",(()=>this.positionWindow()),{passive:!0}),this._popoutWindow.addEventListener("beforeunload",(()=>{this._layoutManager.layoutConfig.settings.popInOnClose?this.popIn():this._onClose()}),{passive:!0}),this._checkReadyInterval=setInterval((()=>this.checkReady()),10);else if(!0===this._layoutManager.layoutConfig.settings.blockedPopoutsThrowError){throw new j("Popout blocked")}}checkReady(){if(null===this._popoutWindow)throw new K("BPCR01844");this._popoutWindow.__glInstance&&this._popoutWindow.__glInstance.isInitialised&&(this.onInitialised(),void 0!==this._checkReadyInterval&&(clearInterval(this._checkReadyInterval),this._checkReadyInterval=void 0))}serializeWindowFeatures(t){const e=[];for(const i in t)e.push(i+"="+t[i].toString());return e.join(",")}createUrl(){const t="gl-window-config-"+Ot(),e=_t.minifyConfig(this._config);try{localStorage.setItem(t,JSON.stringify(e))}catch(t){throw new Error("Error while writing to localStorage "+function(t){return t instanceof Error?t.message:"string"==typeof t?t:"Unknown Error"}(t))}const i=new URL(location.href);return i.searchParams.set("gl-window",t),i.toString()}positionWindow(){if(null===this._popoutWindow)throw new Error("BrowserPopout.positionWindow: null popoutWindow");this._popoutWindow.moveTo(this._initialWindowSize.left,this._initialWindowSize.top),this._popoutWindow.focus()}onInitialised(){this._isInitialised=!0,this.getGlInstance().on("popIn",(()=>this.popIn())),this.emit("initialised")}_onClose(){setTimeout((()=>this.emit("closed")),50)}}class Gt extends Wt{constructor(t,e,i,n){super(),this.layoutManager=t,this._parent=i,this._element=n,this._popInParentIds=[],this._type=e.type,this._id=e.id,this._isInitialised=!1,this.isGround=!1,this.isRow=!1,this.isColumn=!1,this.isStack=!1,this.isComponent=!1,this.size=e.size,this.sizeUnit=e.sizeUnit,this.minSize=e.minSize,this.minSizeUnit=e.minSizeUnit,this._isClosable=e.isClosable,this._pendingEventPropagations={},this._throttledEvents=["stateChanged"],this._contentItems=this.createContentItems(e.content)}get type(){return this._type}get id(){return this._id}set id(t){this._id=t}get popInParentIds(){return this._popInParentIds}get parent(){return this._parent}get contentItems(){return this._contentItems}get isClosable(){return this._isClosable}get element(){return this._element}get isInitialised(){return this._isInitialised}static isStack(t){return t.isStack}static isComponentItem(t){return t.isComponent}static isComponentParentableItem(t){return t.isStack||t.isGround}removeChild(t,e=!1){const i=this._contentItems.indexOf(t);if(-1===i)throw new Error("Can't remove child item. Unknown content item");if(e||this._contentItems[i].destroy(),this._contentItems.splice(i,1),this._contentItems.length>0)this.updateSize(!1);else if(!this.isGround&&!0===this._isClosable){if(null===this._parent)throw new K("CIUC00874");this._parent.removeChild(this)}}addChild(t,e,i){return null!=e||(e=this._contentItems.length),this._contentItems.splice(e,0,t),t.setParent(this),!0===this._isInitialised&&!1===t._isInitialised&&t.init(),e}replaceChild(t,e,i=!1){const n=this._contentItems.indexOf(t),o=t._element.parentNode;if(-1===n)throw new X("CIRCI23232","Can't replace child. oldChild is not child of this");if(null===o)throw new K("CIRCP23232");if(o.replaceChild(e._element,t._element),!0===i&&(t._parent=null,t.destroy()),this._contentItems[n]=e,e.setParent(this),e.size=t.size,e.sizeUnit=t.sizeUnit,e.minSize=t.minSize,e.minSizeUnit=t.minSizeUnit,null===e._parent)throw new K("CIRCNC45699");!0===e._parent._isInitialised&&!1===e._isInitialised&&e.init(),this.updateSize(!1)}remove(){if(null===this._parent)throw new K("CIR11110");this._parent.removeChild(this)}popout(){const t=Ot(),e=this.layoutManager.createPopoutFromContentItem(this,void 0,t,void 0);return this.emitBaseBubblingEvent("stateChanged"),e}calculateConfigContent(){const t=this._contentItems,e=t.length,i=new Array(e);for(let n=0;nthis.propagateEventToLayoutManager(t,e))))}propagateEventToLayoutManager(t,e){this._pendingEventPropagations[t]=!1,this.layoutManager.emitUnknown(t,e)}}class jt extends Gt{constructor(t,e,i){super(t,e,i,document.createElement("div")),this._parentItem=i,this._focused=!1,this.isComponent=!0,this._reorderEnabled=e.reorderEnabled,this.applyUpdatableConfig(e),this._initialWantMaximise=e.maximised;const n=document.createElement("div");n.classList.add("lm_content"),this.element.appendChild(n),this._container=new Ft(e,this,t,n,(t=>this.handleUpdateItemConfigEvent(t)),(()=>this.show()),(()=>this.hide()),(t=>this.focus(t)),(t=>this.blur(t)))}get componentName(){return this._container.componentType}get componentType(){return this._container.componentType}get reorderEnabled(){return this._reorderEnabled}get initialWantMaximise(){return this._initialWantMaximise}get component(){return this._container.component}get container(){return this._container}get parentItem(){return this._parentItem}get headerConfig(){return this._headerConfig}get title(){return this._title}get tab(){return this._tab}get focused(){return this._focused}destroy(){this._container.destroy(),super.destroy()}applyUpdatableConfig(t){this.setTitle(t.title),this._headerConfig=t.header}toConfig(){const t=this._container.stateRequestEvent,e=void 0===t?this._container.state:t();return{type:at.component,content:[],size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,maximised:!1,isClosable:this.isClosable,reorderEnabled:this._reorderEnabled,title:this._title,header:mt.Header.createCopy(this._headerConfig),componentType:pt.copyComponentType(this.componentType),componentState:e}}close(){if(null===this.parent)throw new K("CIC68883");this.parent.removeChild(this,!1)}enterDragMode(t,e){Tt(this.element,t),At(this.element,e),this._container.enterDragMode(t,e)}exitDragMode(){this._container.exitDragMode()}enterStackMaximised(){this._container.enterStackMaximised()}exitStackMaximised(){this._container.exitStackMaximised()}drag(){this._container.drag()}updateSize(t){this.updateNodeSize(t)}init(){this.updateNodeSize(!1),super.init(),this._container.emit("open"),this.initContentItems()}setTitle(t){this._title=t,this.emit("titleChanged",t),this.emit("stateChanged")}setTab(t){this._tab=t,this.emit("tab",t),this._container.setTab(t)}hide(){super.hide(),this._container.setVisibility(!1)}show(){super.show(),this._container.setVisibility(!0)}focus(t=!1){this.parentItem.setActiveComponentItem(this,!0,t)}setFocused(t){this._focused=!0,this.tab.setFocused(),t||this.emitBaseBubblingEvent("focus")}blur(t=!1){this._focused&&this.layoutManager.setFocusedComponentItem(void 0,t)}setBlurred(t){this._focused=!1,this.tab.setBlurred(),t||this.emitBaseBubblingEvent("blur")}setParent(t){this._parentItem=t,super.setParent(t)}handleUpdateItemConfigEvent(t){this.applyUpdatableConfig(t)}updateNodeSize(t){if("none"!==this.element.style.display){const{width:e,height:i}=kt(this.element);this._container.setSizeToNodeSize(e,i,t)}}}class $t extends Gt{constructor(){super(...arguments),this._focused=!1}get focused(){return this._focused}setFocusedValue(t){this._focused=t}}class Zt extends Wt{constructor(t,e){super(),this._eElement=t,this._pointerTracking=!1,this._pointerDownEventListener=t=>this.onPointerDown(t),this._pointerMoveEventListener=t=>this.onPointerMove(t),this._pointerUpEventListener=t=>this.onPointerUp(t),this._timeout=void 0,this._allowableTargets=[t,...e],this._oDocument=document,this._eBody=document.body,this._nDelay=1800,this._nDistance=10,this._nX=0,this._nY=0,this._nOriginalX=0,this._nOriginalY=0,this._dragging=!1,this._eElement.addEventListener("pointerdown",this._pointerDownEventListener,{passive:!0})}destroy(){this.checkRemovePointerTrackingEventListeners(),this._eElement.removeEventListener("pointerdown",this._pointerDownEventListener)}cancelDrag(){this.processDragStop(void 0)}onPointerDown(t){if(this._allowableTargets.includes(t.target)&&t.isPrimary){const e=this.getPointerCoordinates(t);this.processPointerDown(e)}}processPointerDown(t){this._nOriginalX=t.x,this._nOriginalY=t.y,this._oDocument.addEventListener("pointermove",this._pointerMoveEventListener),this._oDocument.addEventListener("pointerup",this._pointerUpEventListener,{passive:!0}),this._pointerTracking=!0,this._timeout=setTimeout((()=>{try{this.startDrag()}catch(t){throw console.error(t),t}}),this._nDelay)}onPointerMove(t){this._pointerTracking&&(this.processDragMove(t),t.preventDefault())}processDragMove(t){this._nX=t.pageX-this._nOriginalX,this._nY=t.pageY-this._nOriginalY,!1===this._dragging&&(Math.abs(this._nX)>this._nDistance||Math.abs(this._nY)>this._nDistance)&&this.startDrag(),this._dragging&&this.emit("drag",this._nX,this._nY,t)}onPointerUp(t){this.processDragStop(t)}processDragStop(t){var e;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this.checkRemovePointerTrackingEventListeners(),!0===this._dragging&&(this._eBody.classList.remove("lm_dragging"),this._eElement.classList.remove("lm_dragging"),null===(e=this._oDocument.querySelector("iframe"))||void 0===e||e.style.setProperty("pointer-events",""),this._dragging=!1,this.emit("dragStop",t))}checkRemovePointerTrackingEventListeners(){this._pointerTracking&&(this._oDocument.removeEventListener("pointermove",this._pointerMoveEventListener),this._oDocument.removeEventListener("pointerup",this._pointerUpEventListener),this._pointerTracking=!1)}startDrag(){var t;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this._dragging=!0,this._eBody.classList.add("lm_dragging"),this._eElement.classList.add("lm_dragging"),null===(t=this._oDocument.querySelector("iframe"))||void 0===t||t.style.setProperty("pointer-events","none"),this.emit("dragStart",this._nOriginalX,this._nOriginalY)}getPointerCoordinates(t){return{x:t.pageX,y:t.pageY}}}class qt{constructor(t,e,i){this._isVertical=t,this._size=e,this._grabSize=i0){const i=this.createSplitter(Math.max(0,e-1)).element;e>0?(this.contentItems[e-1].element.insertAdjacentElement("afterend",i),i.insertAdjacentElement("afterend",t.element)):(this.contentItems[0].element.insertAdjacentElement("beforebegin",i),i.insertAdjacentElement("beforebegin",t.element))}else this._childElementContainer.appendChild(t.element);super.addChild(t,e);const n=1/this.contentItems.length*100;if(!0===i)return this.emitBaseBubblingEvent("stateChanged"),e;for(let e=0;e0&&(this.calculateRelativeSizes(),this.setAbsoluteSizes()),this.emitBaseBubblingEvent("stateChanged"),this.emit("resize")}setAbsoluteSizes(){const t=this.calculateAbsoluteSizes();for(let e=0;e0&&t.itemSizes[e]++,this._isColumn?(Tt(this.contentItems[e].element,t.crossAxisSize),At(this.contentItems[e].element,t.itemSizes[e])):(Tt(this.contentItems[e].element,t.itemSizes[e]),At(this.contentItems[e].element,t.crossAxisSize))}calculateAbsoluteSizes(){const t=(this.contentItems.length-1)*this._splitterSize,{width:e,height:i}=kt(this.element);let n,o;this._isColumn?(n=i-t,o=e):(n=e-t,o=i);let s=0;const r=[];for(let t=0;t0){const n=100-t;for(let t=0;t100&&e.length>0){for(let t=0;te)return;{const r=i/e;let a=i;for(let e=0;ethis.onSplitterDrag(e,t,i))),e.on("dragStop",(()=>this.onSplitterDragStop(e))),e.on("dragStart",(()=>this.onSplitterDragStart(e))),this._splitter.splice(t,0,e),e}getSplitItems(t){const e=this._splitter.indexOf(t);return{before:this.contentItems[e],after:this.contentItems[e+1]}}calculateContentItemMinSize(t){const e=t.minSize;if(void 0!==e){if(t.minSizeUnit===ht.Pixel)return e;throw new X("ROCGMD98831",JSON.stringify(t))}{const t=this.layoutManager.layoutConfig.dimensions;return this._isColumn?t.defaultMinItemHeight:t.defaultMinItemWidth}}calculateContentItemsTotalMinSize(t){let e=0;for(const i of t)e+=this.calculateContentItemMinSize(i);return e}onSplitterDragStart(t){const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=this.calculateContentItemsTotalMinSize(e.before.contentItems),s=this.calculateContentItemsTotalMinSize(e.after.contentItems);this._splitterPosition=0,this._splitterMinPosition=-1*(i-o),this._splitterMaxPosition=n-s}onSplitterDrag(t,e,i){let n=this._isColumn?i:e;if(null===this._splitterMinPosition||null===this._splitterMaxPosition)throw new K("ROCOSD59226");n=Math.max(n,this._splitterMinPosition),n=Math.min(n,this._splitterMaxPosition),this._splitterPosition=n;const o=zt(n);this._isColumn?t.element.style.top=o:t.element.style.left=o}onSplitterDragStop(t){if(null===this._splitterPosition)throw new K("ROCOSDS66932");{const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=(this._splitterPosition+i)/(i+n),s=e.before.size+e.after.size;e.before.size=o*s,e.after.size=(1-o)*s,t.element.style.top=zt(0),t.element.style.left=zt(0),globalThis.requestAnimationFrame((()=>this.updateSize(!1)))}}}!function(t){t.getElementDimensionSize=function(t,e){return"width"===e?function(t){return t.offsetWidth}(t):function(t){return t.offsetHeight}(t)},t.setElementDimensionSize=function(t,e,i){return"width"===e?Tt(t,i):At(t,i)},t.createElement=function(t,e){const i=t.createElement("div");return i.classList.add("lm_item"),e?i.classList.add("lm_column"):i.classList.add("lm_row"),i}}(Xt||(Xt={}));class Yt extends $t{constructor(t,e,i){super(t,vt.create(e),null,Yt.createElement(document)),this.isGround=!0,this._childElementContainer=this.element,this._containerElement=i;let n=null;for(;;){const t=n?n.previousSibling:this._containerElement.lastChild;if(!(t instanceof Element&&t.classList.contains("lm_content")))break;n=t}this._containerElement.insertBefore(this.element,n)}init(){if(!0!==this.isInitialised){this.updateNodeSize();for(let t=0;t0?this.contentItems[0]:this,n.isComponent)throw new Error("Cannot add item as child to ComponentItem");{const t=this.layoutManager.createAndInitContentItem(i,n);return e=n.addChild(t,e),n===this?-1:e}}loadComponentAsRoot(t){this.clearRoot();const e=Ct.resolve(t,!1);if(e.maximised)throw new Error("Root Component cannot be maximised");{const t=new jt(this.layoutManager,e,this);t.init(),this.addChild(t,0)}}addChild(t,e){if(this.contentItems.length>0)throw new Error("Ground node can only have a single child");return this._childElementContainer.appendChild(t.element),e=super.addChild(t,e),this.updateSize(!1),this.emitBaseBubblingEvent("stateChanged"),e}calculateConfigContent(){const t=this.contentItems,e=t.length,i=new Array(e);for(let n=0;n0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e)),this.updateContentItemsSize(!1))}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}createSideAreas(){const t=Yt.Area.oppositeSides,e=new Array(Object.keys(t).length);let i=0;for(const n in t){const o=n,s=this.getElementArea();if(null===s)throw new K("RCSA77553");s.side=o,"2"===t[o][1]?s[o]=s[t[o]]-50:s[o]=s[t[o]]+50,s.surface=(s.x2-s.x1)*(s.y2-s.y1),e[i++]=s}return e}highlightDropZone(t,e,i){this.layoutManager.tabDropPlaceholder.remove(),super.highlightDropZone(t,e,i)}onDrop(t,e){if(t.isComponent){const e=ut.createDefault(),i=t;e.header=mt.Header.createCopy(i.headerConfig);const n=this.layoutManager.createAndInitContentItem(e,this);n.addChild(t),t=n}if(0===this.contentItems.length)this.addChild(t);else{if(t.type===at.row||t.type===at.column){const e=ut.createDefault(),i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}const i="x"==e.side[0]?at.row:at.column,n="2"==e.side[1],o=this.contentItems[0];if(o instanceof Xt&&o.type===i){const e=o.contentItems[n?0:o.contentItems.length-1];o.addChild(t,n?0:void 0,!0),e.size*=.5,t.size=e.size,t.sizeUnit=ht.Percent,o.updateSize(!1)}else{const e=ct.createDefault(i),s=this.layoutManager.createContentItem(e,this);this.replaceChild(o,s),s.addChild(t,n?0:void 0,!0),s.addChild(o,n?void 0:0,!0),o.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}}dock(){throw new X("GID87731")}validateDocking(){throw new X("GIVD87732")}getAllContentItems(){const t=[this];return this.deepGetAllContentItems(this.contentItems,t),t}getConfigMaximisedItems(){const t=[];return this.deepFilterContentItems(this.contentItems,t,(t=>!(!Gt.isStack(t)||!t.initialWantMaximise)||!(!Gt.isComponentItem(t)||!t.initialWantMaximise))),t}getItemsByPopInParentId(t){const e=[];return this.deepFilterContentItems(this.contentItems,e,(e=>e.popInParentIds.includes(t))),e}toConfig(){throw new Error("Cannot generate GroundItem config")}setActiveComponentItem(t,e,i){}updateNodeSize(){const{width:t,height:e}=kt(this._containerElement);Tt(this.element,t),At(this.element,e),this.contentItems.length>0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e))}deepGetAllContentItems(t,e){for(let i=0;ithis.onClick(t),this._touchStartEventListener=t=>this.onTouchStart(t),this._element=document.createElement("div"),this._element.classList.add(i),this._element.title=e,this._header.on("destroy",(()=>this.destroy())),this._element.addEventListener("click",this._clickEventListener,{passive:!0}),this._element.addEventListener("touchstart",this._touchStartEventListener,{passive:!0}),this._header.controlsContainerElement.appendChild(this._element)}get element(){return this._element}destroy(){var t;this._element.removeEventListener("click",this._clickEventListener),this._element.removeEventListener("touchstart",this._touchStartEventListener),null===(t=this._element.parentNode)||void 0===t||t.removeChild(this._element)}onClick(t){this._pushEvent(t)}onTouchStart(t){this._pushEvent(t)}}class Jt{constructor(t,e,i,n,o){var s;this._layoutManager=t,this._componentItem=e,this._closeEvent=i,this._focusEvent=n,this._dragStartEvent=o,this._isActive=!1,this._tabClickListener=t=>this.onTabClickDown(t),this._tabTouchStartListener=t=>this.onTabTouchStart(t),this._closeClickListener=()=>this.onCloseClick(),this._closeTouchStartListener=()=>this.onCloseTouchStart(),this._dragStartListener=(t,e)=>this.onDragStart(t,e),this._contentItemDestroyListener=()=>this.onContentItemDestroy(),this._tabTitleChangedListener=t=>this.setTitle(t),this._element=document.createElement("div"),this._element.classList.add("lm_tab"),this._titleElement=document.createElement("span"),this._titleElement.classList.add("lm_title"),this._closeElement=document.createElement("div"),this._closeElement.classList.add("lm_close_tab"),this._element.appendChild(this._titleElement),this._element.appendChild(this._closeElement),e.isClosable?this._closeElement.style.display="":this._closeElement.style.display="none",this.setTitle(e.title),this._componentItem.on("titleChanged",this._tabTitleChangedListener);(null!==(s=e.reorderEnabled)&&void 0!==s?s:this._layoutManager.layoutConfig.settings.reorderEnabled)&&this.enableReorder(),this._element.addEventListener("click",this._tabClickListener,{passive:!0}),this._element.addEventListener("touchstart",this._tabTouchStartListener,{passive:!0}),this._componentItem.isClosable?(this._closeElement.addEventListener("click",this._closeClickListener,{passive:!0}),this._closeElement.addEventListener("touchstart",this._closeTouchStartListener,{passive:!0})):(this._closeElement.remove(),this._closeElement=void 0),this._componentItem.setTab(this),this._layoutManager.emit("tabCreated",this)}get isActive(){return this._isActive}get componentItem(){return this._componentItem}get contentItem(){return this._componentItem}get element(){return this._element}get titleElement(){return this._titleElement}get closeElement(){return this._closeElement}get reorderEnabled(){return void 0!==this._dragListener}set reorderEnabled(t){t!==this.reorderEnabled&&(t?this.enableReorder():this.disableReorder())}setTitle(t){this._titleElement.innerText=t,this._element.title=t}setActive(t){t!==this._isActive&&(this._isActive=t,t?this._element.classList.add("lm_active"):this._element.classList.remove("lm_active"))}destroy(){var t,e;this._closeEvent=void 0,this._focusEvent=void 0,this._dragStartEvent=void 0,this._element.removeEventListener("click",this._tabClickListener),this._element.removeEventListener("touchstart",this._tabTouchStartListener),null===(t=this._closeElement)||void 0===t||t.removeEventListener("click",this._closeClickListener),null===(e=this._closeElement)||void 0===e||e.removeEventListener("touchstart",this._closeTouchStartListener),this._componentItem.off("titleChanged",this._tabTitleChangedListener),this.reorderEnabled&&this.disableReorder(),this._element.remove()}setBlurred(){this._element.classList.remove("lm_focused"),this._titleElement.classList.remove("lm_focused")}setFocused(){this._element.classList.add("lm_focused"),this._titleElement.classList.add("lm_focused")}onDragStart(t,e){if(void 0===this._dragListener)throw new J("TODSDLU10093");if(void 0===this._dragStartEvent)throw new J("TODS23309");this._dragStartEvent(t,e,this._dragListener,this.componentItem)}onContentItemDestroy(){void 0!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=void 0)}onTabClickDown(t){const e=t.target;e!==this._element&&e!==this._titleElement||(0===t.button?this.notifyFocus():1===t.button&&this._componentItem.isClosable&&this.notifyClose())}onTabTouchStart(t){t.target===this._element&&this.notifyFocus()}onCloseClick(){this.notifyClose()}onCloseTouchStart(){this.notifyClose()}notifyClose(){if(void 0===this._closeEvent)throw new J("TNC15007");this._closeEvent(this._componentItem)}notifyFocus(){if(void 0===this._focusEvent)throw new J("TNA15007");this._focusEvent(this._componentItem)}enableReorder(){this._dragListener=new Zt(this._element,[this._titleElement]),this._dragListener.on("dragStart",this._dragStartListener),this._componentItem.on("destroy",this._contentItemDestroyListener)}disableReorder(){if(void 0===this._dragListener)throw new J("TDR87745");this._componentItem.off("destroy",this._contentItemDestroyListener),this._dragListener.off("dragStart",this._dragStartListener),this._dragListener=void 0}}class Qt{constructor(t,e,i,n,o){this._layoutManager=t,this._componentRemoveEvent=e,this._componentFocusEvent=i,this._componentDragStartEvent=n,this._dropdownActiveChangedEvent=o,this._tabs=[],this._lastVisibleTabIndex=-1,this._dropdownActive=!1,this._element=document.createElement("section"),this._element.classList.add("lm_tabs"),this._dropdownElement=document.createElement("section"),this._dropdownElement.classList.add("lm_tabdropdown_list"),this._dropdownElement.style.display="none"}get tabs(){return this._tabs}get tabCount(){return this._tabs.length}get lastVisibleTabIndex(){return this._lastVisibleTabIndex}get element(){return this._element}get dropdownElement(){return this._dropdownElement}get dropdownActive(){return this._dropdownActive}destroy(){for(let t=0;tthis.handleTabCloseEvent(t)),(t=>this.handleTabFocusEvent(t)),((t,e,i,n)=>this.handleTabDragStartEvent(t,e,i,n)));void 0===e&&(e=this._tabs.length),this._tabs.splice(e,0,i),ethis._lastVisibleTabIndex){const t=this._tabs[e];for(let t=e;t>0;t--)this._tabs[t]=this._tabs[t-1];this._tabs[0]=t}}updateTabSizes(t,e){let i=!1;this.tryUpdateTabSizes(i,t,e)||(i=!0,this.tryUpdateTabSizes(i,t,e)),i!==this._dropdownActive&&(this._dropdownActive=i,this._dropdownActiveChangedEvent())}tryUpdateTabSizes(t,e,i){if(this._tabs.length>0){if(void 0===i)throw new Error("non-empty tabs must have active component item");let n=0,o=!1;const s=this._layoutManager.layoutConfig.settings.tabOverlapAllowance,r=this._tabs.indexOf(i.tab),a=this._tabs[r];this._lastVisibleTabIndex=-1;for(let i=0;ie){if(o)i===r&&(l.style.zIndex="auto",l.style.marginLeft="",l.parentElement!==this._element&&this._element.appendChild(l));else{let t;if(t=r>0&&r<=i?(d-e)/(i-1):(d-e)/i,tthis.onClick(t),this._touchStartListener=t=>this.onTouchStart(t),this._rowColumnClosable=!0,this._closeButton=null,this._popoutButton=null,this._tabsContainer=new Qt(this._layoutManager,(t=>this.handleTabInitiatedComponentRemoveEvent(t)),(t=>this.handleTabInitiatedComponentFocusEvent(t)),((t,e,i,n)=>this.handleTabInitiatedDragStartEvent(t,e,i,n)),(()=>this.processTabDropdownActiveChanged())),this._show=i.show,this._popoutEnabled=i.popoutEnabled,this._popoutLabel=i.popoutLabel,this._maximiseEnabled=i.maximiseEnabled,this._maximiseLabel=i.maximiseLabel,this._minimiseEnabled=i.minimiseEnabled,this._minimiseLabel=i.minimiseLabel,this._closeEnabled=i.closeEnabled,this._closeLabel=i.closeLabel,this._tabDropdownEnabled=i.tabDropdownEnabled,this._tabDropdownLabel=i.tabDropdownLabel,this.setSide(i.side),this._canRemoveComponent=this._configClosable,this._element=document.createElement("section"),this._element.classList.add("lm_header"),this._controlsContainerElement=document.createElement("section"),this._controlsContainerElement.classList.add("lm_controls"),this._element.appendChild(this._tabsContainer.element),this._element.appendChild(this._controlsContainerElement),this._element.appendChild(this._tabsContainer.dropdownElement),this._element.addEventListener("click",this._clickListener,{passive:!0}),this._element.addEventListener("touchstart",this._touchStartListener,{passive:!0}),this._documentMouseUpListener=()=>this._tabsContainer.hideAdditionalTabsDropdown(),globalThis.document.addEventListener("mouseup",this._documentMouseUpListener,{passive:!0}),this._tabControlOffset=this._layoutManager.layoutConfig.settings.tabControlOffset,this._tabDropdownEnabled&&(this._tabDropdownButton=new Kt(this,this._tabDropdownLabel,"lm_tabdropdown",(()=>this._tabsContainer.showAdditionalTabsDropdown()))),this._popoutEnabled&&(this._popoutButton=new Kt(this,this._popoutLabel,"lm_popout",(()=>this.handleButtonPopoutEvent()))),this._maximiseEnabled&&(this._maximiseButton=new Kt(this,this._maximiseLabel,"lm_maximise",(t=>this.handleButtonMaximiseToggleEvent(t)))),this._configClosable&&(this._closeButton=new Kt(this,this._closeLabel,"lm_close",(()=>s()))),this.processTabDropdownActiveChanged()}get show(){return this._show}get side(){return this._side}get leftRightSided(){return this._leftRightSided}get layoutManager(){return this._layoutManager}get parent(){return this._parent}get tabs(){return this._tabsContainer.tabs}get lastVisibleTabIndex(){return this._tabsContainer.lastVisibleTabIndex}get element(){return this._element}get tabsContainerElement(){return this._tabsContainer.element}get controlsContainerElement(){return this._controlsContainerElement}destroy(){this.emit("destroy"),this._popoutEvent=void 0,this._maximiseToggleEvent=void 0,this._clickEvent=void 0,this._touchStartEvent=void 0,this._componentRemoveEvent=void 0,this._componentFocusEvent=void 0,this._componentDragStartEvent=void 0,this._tabsContainer.destroy(),globalThis.document.removeEventListener("mouseup",this._documentMouseUpListener),this._element.remove()}createTab(t,e){this._tabsContainer.createTab(t,e)}removeTab(t){this._tabsContainer.removeTab(t)}processActiveComponentChanged(t){this._tabsContainer.processActiveComponentChanged(t),this.updateTabSizes()}setSide(t){this._side=t,this._leftRightSided=[nt.right,nt.left].includes(this._side)}setRowColumnClosable(t){this._rowColumnClosable=t,this.updateClosability()}updateClosability(){let t;if(this._configClosable)if(this._rowColumnClosable){t=!0;const e=this.tabs.length;for(let i=0;i1}applyFocusedValue(t){t?this._element.classList.add("lm_focused"):this._element.classList.remove("lm_focused")}processMaximised(){if(void 0===this._maximiseButton)throw new J("HPMAX16997");this._maximiseButton.element.setAttribute("title",this._minimiseLabel)}processMinimised(){if(void 0===this._maximiseButton)throw new J("HPMIN16997");this._maximiseButton.element.setAttribute("title",this._maximiseLabel)}updateTabSizes(){if(this._tabsContainer.tabCount>0){const t=this._show?this._layoutManager.layoutConfig.dimensions.headerHeight:0;let e;this._leftRightSided?(this._element.style.height="",this._element.style.width=zt(t)):(this._element.style.width="",this._element.style.height=zt(t)),e=this._leftRightSided?this._element.offsetHeight-this._controlsContainerElement.offsetHeight-this._tabControlOffset:this._element.offsetWidth-this._controlsContainerElement.offsetWidth-this._tabControlOffset,this._tabsContainer.updateTabSizes(e,this._getActiveComponentItemEvent())}}handleTabInitiatedComponentRemoveEvent(t){if(this._canRemoveComponent){if(void 0===this._componentRemoveEvent)throw new J("HHTCE22294");this._componentRemoveEvent(t)}}handleTabInitiatedComponentFocusEvent(t){if(void 0===this._componentFocusEvent)throw new J("HHTAE22294");this._componentFocusEvent(t)}handleTabInitiatedDragStartEvent(t,e,i,n){if(this._canRemoveComponent){if(void 0===this._componentDragStartEvent)throw new J("HHTDSE22294");this._componentDragStartEvent(t,e,i,n)}else i.cancelDrag()}processTabDropdownActiveChanged(){void 0!==this._tabDropdownButton&&Dt(this._tabDropdownButton.element,this._tabsContainer.dropdownActive)}handleButtonPopoutEvent(){if(this._layoutManager.layoutConfig.settings.popoutWholeStack){if(void 0===this._popoutEvent)throw new J("HHBPOE17834");this._popoutEvent()}else{const t=this._getActiveComponentItemEvent();t&&t.popout()}}handleButtonMaximiseToggleEvent(t){if(void 0===this._maximiseToggleEvent)throw new J("HHBMTE16834");this._maximiseToggleEvent()}onClick(t){t.target===this._element&&this.notifyClick(t)}onTouchStart(t){t.target===this._element&&this.notifyTouchStart(t)}notifyClick(t){if(void 0===this._clickEvent)throw new J("HNHC46834");this._clickEvent(t)}notifyTouchStart(t){if(void 0===this._touchStartEvent)throw new J("HNHTS46834");this._touchStartEvent(t)}}class ee extends $t{constructor(t,e,i){var n,o,s,r,a,l,h,d,c,m,u,p,g,f,v,_,y,C,w;super(t,e,i,ee.createElement(document)),this._headerSideChanged=!1,this._resizeListener=()=>this.handleResize(),this._maximisedListener=()=>this.handleMaximised(),this._minimisedListener=()=>this.handleMinimised(),this._headerConfig=e.header;const I=t.layoutConfig.header,b=e.content;let S;if(1!==b.length)S=void 0;else{S=b[0].header}this._initialWantMaximise=e.maximised,this._initialActiveItemIndex=null!==(n=e.activeItemIndex)&&void 0!==n?n:0;const E=null!==(r=null!==(s=null===(o=this._headerConfig)||void 0===o?void 0:o.show)&&void 0!==s?s:null==S?void 0:S.show)&&void 0!==r?r:I.show,x=null!==(h=null!==(l=null===(a=this._headerConfig)||void 0===a?void 0:a.popout)&&void 0!==l?l:null==S?void 0:S.popout)&&void 0!==h?h:I.popout,L=null!==(m=null!==(c=null===(d=this._headerConfig)||void 0===d?void 0:d.maximise)&&void 0!==c?c:null==S?void 0:S.maximise)&&void 0!==m?m:I.maximise,z=null!==(g=null!==(p=null===(u=this._headerConfig)||void 0===u?void 0:u.close)&&void 0!==p?p:null==S?void 0:S.close)&&void 0!==g?g:I.close,M=null!==(_=null!==(v=null===(f=this._headerConfig)||void 0===f?void 0:f.minimise)&&void 0!==v?v:null==S?void 0:S.minimise)&&void 0!==_?_:I.minimise,P=null!==(w=null!==(C=null===(y=this._headerConfig)||void 0===y?void 0:y.tabDropdown)&&void 0!==C?C:null==S?void 0:S.tabDropdown)&&void 0!==w?w:I.tabDropdown;this._maximisedEnabled=!1!==L;const T={show:!1!==E,side:!1===E?nt.top:E,popoutEnabled:!1!==x,popoutLabel:!1===x?"":x,maximiseEnabled:this._maximisedEnabled,maximiseLabel:!1===L?"":L,closeEnabled:!1!==z,closeLabel:!1===z?"":z,minimiseEnabled:!0,minimiseLabel:M,tabDropdownEnabled:!1!==P,tabDropdownLabel:!1===P?"":P};this._header=new te(t,this,T,e.isClosable&&!1!==z,(()=>this.getActiveComponentItem()),(()=>this.remove()),(()=>this.handlePopoutEvent()),(()=>this.toggleMaximise()),(t=>this.handleHeaderClickEvent(t)),(t=>this.handleHeaderTouchStartEvent(t)),(t=>this.handleHeaderComponentRemoveEvent(t)),(t=>this.handleHeaderComponentFocusEvent(t)),((t,e,i,n)=>this.handleHeaderComponentStartDragEvent(t,e,i,n))),this.isStack=!0,this._childElementContainer=document.createElement("section"),this._childElementContainer.classList.add("lm_items"),this.on("resize",this._resizeListener),this._maximisedEnabled&&(this.on("maximised",this._maximisedListener),this.on("minimised",this._minimisedListener)),this.element.appendChild(this._header.element),this.element.appendChild(this._childElementContainer),this.setupHeaderPosition(),this._header.updateClosability()}get childElementContainer(){return this._childElementContainer}get header(){return this._header}get headerShow(){return this._header.show}get headerSide(){return this._header.side}get headerLeftRightSided(){return this._header.leftRightSided}get contentAreaDimensions(){return this._contentAreaDimensions}get initialWantMaximise(){return this._initialWantMaximise}get isMaximised(){return this===this.layoutManager.maximisedStack}get stackParent(){if(!this.parent)throw new Error("Stack should always have a parent");return this.parent}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}init(){if(!0===this.isInitialised)return;this.updateNodeSize();for(let t=0;t0){if(this._initialActiveItemIndex<0||this._initialActiveItemIndex>=e)throw new Error(`ActiveItemIndex out of range: ${this._initialActiveItemIndex} id: ${this.id}`);for(let i=0;ithis.contentItems.length)throw e-=1,new X("SAC99728");if(t instanceof jt)return e=super.addChild(t,e),this._childElementContainer.appendChild(t.element),this._header.createTab(t,e),this.setActiveComponentItem(t,i),this._header.updateTabSizes(),this.updateSize(!1),t.container.setBaseLogicalZIndex(),this._header.updateClosability(),this.emitStateChangedEvent(),e;throw new X("SACC88532")}removeChild(t,e){const i=t,n=this.contentItems.indexOf(i),o=1===this.contentItems.length;if(this._activeComponentItem===i&&(i.focused&&i.blur(),!o)){const t=0===n?1:n-1;this.setActiveComponentItem(this.contentItems[t],!1)}this._header.removeTab(i),super.removeChild(i,e),o||this._header.updateClosability(),this.emitStateChangedEvent()}toggleMaximise(){this.isMaximised?this.minimise():this.maximise()}maximise(){if(!this.isMaximised){this.layoutManager.setMaximisedStack(this);const t=this.contentItems,e=t.length;for(let i=0;i0&&void 0===t)throw new Error("expected non-empty stack to have an active component item");return{type:"stack",content:this.calculateConfigContent(),size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,isClosable:this.isClosable,maximised:this.isMaximised,header:this.createHeaderConfig(),activeItemIndex:t}}onDrop(t,e){if("header"===this._dropSegment){if(this.resetHeaderDropZone(),void 0===this._dropIndex)throw new J("SODDI68990");return void this.addChild(t,this._dropIndex)}if("body"===this._dropSegment)return void this.addChild(t,0,!0);const i="top"===this._dropSegment||"bottom"===this._dropSegment,n="left"===this._dropSegment||"right"===this._dropSegment,o="top"===this._dropSegment||"left"===this._dropSegment,s=i&&this.stackParent.isColumn||n&&this.stackParent.isRow;if(t.isComponent){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createAndInitContentItem(e,this);i.addChild(t),t=i}if(t.type===at.row||t.type===at.column){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}if(s){const e=this.stackParent.contentItems.indexOf(this);this.stackParent.addChild(t,o?e:e+1,!0),this.size*=.5,t.size=this.size,t.sizeUnit=this.sizeUnit,this.stackParent.updateSize(!1)}else{const e=i?at.column:at.row,n=ct.createDefault(e),s=this.layoutManager.createContentItem(n,this);this.stackParent.replaceChild(this,s),s.addChild(t,o?0:void 0,!0),s.addChild(this,o?void 0:0,!0),this.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}highlightDropZone(t,e){for(const i in this._contentAreaDimensions){const n=i,o=this._contentAreaDimensions[n].hoverArea;if(o.x1t&&o.y1e)return void("header"===n?(this._dropSegment="header",this.highlightHeaderDropZone(this._header.leftRightSided?e:t)):(this.resetHeaderDropZone(),this.highlightBodyDropZone(n)))}}getArea(){if("none"===this.element.style.display)return null;const t=super.getElementArea(this._header.element),e=super.getElementArea(this._childElementContainer);if(null===t||null===e)throw new K("SGAHC13086");const i=e.x2-e.x1,n=e.y2-e.y1;return this._contentAreaDimensions={header:{hoverArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2},highlightArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2}}},0===this.contentItems.length?(this._contentAreaDimensions.body={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2}},super.getElementArea(this.element)):(this._contentAreaDimensions.left={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x1+.25*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x1+.5*i,y2:e.y2}},this._contentAreaDimensions.top={hoverArea:{x1:e.x1+.25*i,y1:e.y1,x2:e.x1+.75*i,y2:e.y1+.5*n},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y1+.5*n}},this._contentAreaDimensions.right={hoverArea:{x1:e.x1+.75*i,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1+.5*i,y1:e.y1,x2:e.x2,y2:e.y2}},this._contentAreaDimensions.bottom={hoverArea:{x1:e.x1+.25*i,y1:e.y1+.5*n,x2:e.x1+.75*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1+.5*n,x2:e.x2,y2:e.y2}},super.getElementArea(this.element))}positionHeader(t){this._header.side!==t&&(this._header.setSide(t),this._headerSideChanged=!0,this.setupHeaderPosition())}updateNodeSize(){if("none"!==this.element.style.display){const t=kt(this.element);if(this._header.show){t[this._header.leftRightSided?it.width:it.height]-=this.layoutManager.layoutConfig.dimensions.headerHeight}this._childElementContainer.style.width=zt(t.width),this._childElementContainer.style.height=zt(t.height);for(let e=0;e=o&&t({...t,[e]:i});async function s(t,e){return(await Promise.all(e.map((async([e,i])=>[e,await t(i,e)])))).reduce(o,{})}n.mapEntriesAsync=s,n.mapValuesAsync=async function(t,e){let i;return i=e instanceof Map?[...e.entries()]:Object.entries(e),s(t,i)};var r,a,l,h,d=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldSet||function(t,e,i,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(t,i):o?o.value=i:e.set(t,i),i},c=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldGet||function(t,e,i,n){if("a"===i&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?n:"a"===i?n.call(t):n?n.value:e.get(t)};Object.defineProperty(i,"__esModule",{value:!0});var m=i.DefaultLayoutManager=void 0;const u=n;class p{constructor(t){a.set(this,void 0),l.set(this,new Map),d(this,a,t,"f")}size(){return c(this,l,"f").size}async applyLayoutSnapshot({layouts:t}){if(Object.keys(t).length>1)throw new Error("[LayoutManager] Tried to call applyLayoutSnapshot with more than 1 layout. When implementing multiple layouts via overridden LayoutManager class, you must override and fully implement the applyLayoutSnapshot method without calling super.applyLayoutSnapshot().");const[[e,i]]=Object.entries(t);await p.createLayout(this,{layoutName:e,layout:i})}async showLayout({layoutName:t}){}async getLayoutSnapshot(){return{layouts:await(0,u.mapValuesAsync)((t=>t.getFrameSnapshot()),c(this,l,"f"))}}async removeLayout({layoutName:t}){}getLayoutIdentityForView(t){const e=[...c(this,l,"f").values()].find((e=>e.getCurrentViews().some((e=>e.name===t.name&&e.uuid===t.uuid))));return e?.identity??void 0}isLayoutVisible({layoutName:t}){return c(p,r,"m",h).call(p,this,t).isVisible()}resolveLayoutIdentity(t){if(t&&"layoutName"in t)return t;const e=[...c(this,l,"f").values()];if(1===e.length)return e[0].identity;const i=e.find((t=>t.isVisible()));return i?.identity??void 0}static async resolveLayout(t,e){const i=t.resolveLayoutIdentity(e);if(void 0===i||!("layoutName"in i))throw new Error("[layout-manager] resolveLayout: Could not resolve the layout identity. Make sure you include 'layoutName' in the identity object.");return c(p,r,"m",h).call(p,t,i.layoutName)}static async handleSharedView(t,e,i){await(0,u.mapValuesAsync)((async t=>{if(t.identity.layoutName!==e.layoutName){const e=t.getCurrentViews().find((t=>t.name===i.name));e&&await t.onViewDetached({viewIdentity:e,target:null}).catch(console.error)}}),c(t,l,"f"))}static async handleLastViewRemoved(t,e){await t.removeLayout(e),await c(t,a,"f").handleLastViewRemoved(t)}static async destroyLayout(t,{layoutName:e}){await c(p,r,"m",h).call(p,t,e).destroy(),c(t,l,"f").delete(e)}static async createLayout(t,e){const{layoutName:i}=e;if(c(t,l,"f").has(i))throw new Error(`Layout name ${i} already exists`);await c(t,a,"f").createLayout(e,t)}static registerLayout(t,e,i){c(t,l,"f").set(e,i)}static getAllLayouts(t){return[...c(t,l,"f").values()]}static setInitialSnapshot(t,e){c(t,a,"f").setInitialSnapshot(e)}static createClosedConstructor(...t){return class extends p{constructor(){super(...t)}}}}m=i.DefaultLayoutManager=p,r=p,a=new WeakMap,l=new WeakMap,h=function(t,e){const i=c(t,l,"f").get(e);if(!i)throw new Error(`[layout-manager] getLayoutByName: Could not locate layout with name '${e}'`);return i};var g={},f={},v={};Object.defineProperty(v,"__esModule",{value:!0}),v.ReversibleMap=void 0;v.ReversibleMap=class{constructor(){this.valueToKey=new Map,this.keyToValue=new Map,this.setUnique=(t,e)=>{if(this.hasKey(t)||this.hasValue(e))throw new Error("Key or value already in the map.");this.keyToValue.set(t,e),this.valueToKey.set(e,t)},this.getKey=t=>{const e=this.valueToKey.get(t);if(!e)throw new Error("Value not found in the map.");return e},this.deleteKey=t=>{const e=this.getValue(t);return this.keyToValue.delete(t),this.valueToKey.delete(e),e},this.deleteValue=t=>{const e=this.getKey(t);return this.keyToValue.delete(e),this.valueToKey.delete(t),e},this.hasKey=t=>this.keyToValue.has(t),this.hasValue=t=>this.valueToKey.has(t)}getValue(t){const e=this.keyToValue.get(t);if(!e)throw new Error("Key not found in the map.");return e}},Object.defineProperty(f,"__esModule",{value:!0});var _=f.LayoutContentCache=void 0;const y=t.lazy,C=v;class w{constructor(){this.contentItemCache=new C.ReversibleMap,this.contentItemCacheId=0,this.createCacheKey=()=>{const t=`entity-${this.contentItemCacheId.toString()}`;return this.contentItemCacheId+=1,t},this.hasKey=t=>this.contentItemCache.hasKey(t),this.getItemOrUndefined=t=>{try{return this.getContentItemOrThrow(t)}catch(t){return}},this.getContentItemOrThrow=(t,e)=>{if(!this.contentItemCache.hasKey(t))throw new Error("Layout component has been destroyed or detached from the current layout.");const i=this.contentItemCache.getValue(t);if(e&&!e.includes(i.type))throw new Error(`Layout item is not the expected type. Expected ${e.join(", ")}, got ${i.type}.`);return i},this.getOrCreateEntityId=t=>{if(this.contentItemCache.hasValue(t))return this.contentItemCache.getKey(t);t.onDestroyed((()=>{this.contentItemCache.deleteValue(t)}));const e=this.createCacheKey();return this.contentItemCache.setUnique(e,t),e}}static getSingleInstance(){return w.singleton.getValue()}}_=f.LayoutContentCache=w,w.singleton=new y.Lazy((()=>new w));var I={},b={};!function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.getAdjacentStacks=t.doShareEdge=t.getAdjacentItem=void 0;t.getAdjacentItem=(e,i)=>{const{parent:n}=e;if(e.isRoot()||!n)return;const o=["top","bottom"].includes(i)?"column":"row",s=["top","left"].includes(i)?-1:1;if(n.type===o){const t=n.contentItems.indexOf(e)+s;if(t>=0&&t{const n=t.getBounds(),o=e.getBounds();if(!n||!o)return!1;if(["top","bottom"].includes(i)){return!(n.righto.right)}return!(n.bottomo.bottom)};t.getAdjacentStacks=(e,i)=>{const n=["top","bottom"].includes(i)?"row":"column",o=s=>"stack"===s.type?(0,t.doShareEdge)(e,s,i)?[s]:[]:"root"===s.type||"ground"===s.type?[]:s.type===n?s.contentItems.map((t=>o(t))).flat():s.type!==n?["top","right"].includes(i)?o(s.contentItems[s.contentItems.length-1]):o(s.contentItems[0]):[],s=(0,t.getAdjacentItem)(e,i);return s?o(s):[]}}(b);var S=t.commonjsGlobal&&t.commonjsGlobal.__decorate||function(t,e,i,n){var o,s=arguments.length,r=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(s<3?o(r):s>3?o(e,i,r):o(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};Object.defineProperty(I,"__esModule",{value:!0}),I.LayoutEntitiesController=void 0;const E=t.decorators,x=b,L=i;class z{constructor(t,e,i){this.wire=t,this.layoutManager=e,this.layoutContentCache=i,this.analytics=t=>{this.wire.sendAction(`layout-controller-${t}`).catch((()=>{}))},this.getLayoutIdentityForViewOrThrow=async t=>{const e=this.layoutManager.getLayoutIdentityForView(t);if(!e)throw new Error(`View identity ${t.name} is not attached to any layouts.`);return e},this.getRoot=async t=>{this.analytics("get-root");const e=(await this.getLayout(t)).getRoot();return{type:e.type,entityId:this.layoutContentCache.getOrCreateEntityId(e)}},this.getStackByView=async t=>{this.analytics("get-stack-by-view");const e=await this.getLayoutIdentityForViewOrThrow(t),i=(await this.getLayout(e)).getStackByView(t);if("stack"===i?.type)return{entityId:this.layoutContentCache.getOrCreateEntityId(i),type:"stack"}},this.getStackViews=t=>{this.analytics("get-stack-views");return this.layoutContentCache.getContentItemOrThrow(t,["stack"]).contentItems.map((t=>({name:t.viewName,uuid:this.wire.me.uuid})))},this.isRoot=t=>{this.analytics("is-root");return this.layoutContentCache.getContentItemOrThrow(t).isRoot()},this.exists=t=>(this.analytics("exists"),this.layoutContentCache.hasKey(t)),this.addViewToStack=async(t,e,{index:i}={index:0})=>{this.analytics("add-view-to-stack");const n=this.layoutContentCache.getContentItemOrThrow(t);if(i&&i>n.contentItems.length+1)throw new Error(`Index '${i}' out of range, please exclude the index or specify a number between 0 and ${n.contentItems.length}`);const o={id:t,index:i},{identity:s}=await n.layout.platformCreateView(e,{location:o});return s},this.findViewInStack=(t,e)=>t.contentItems.find((t=>t.viewName===e.name)),this.removeViewFromStack=async(t,e)=>{this.analytics("remove-view-from-stack");const i=this.layoutContentCache.getContentItemOrThrow(t,["stack"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to remove a view ('${e.name}') which does not belong to the stack.`);await n.layout.platformCloseView(e)},this.createAdjacentStack=async(t,e,{position:i="right"}={})=>{if(this.analytics("create-adjacent-stack"),!Array.isArray(e)||0===e.length)throw new Error('The parameter "views" must be an array with at least 1 element.');if(!["top","bottom","left","right"].includes(i))throw new Error(`Invalid position '${i}' specified.`);const n=this.layoutContentCache.getContentItemOrThrow(t).createAdjacentStack({position:i}),o=this.layoutContentCache.getOrCreateEntityId(n);return await Promise.all(e.reverse().map((t=>this.addViewToStack(o,t)))),o},this.getAdjacentStacks=async({targetId:t,edge:e})=>{this.analytics("get-adjacent-stacks");const i=this.layoutContentCache.getContentItemOrThrow(t);return(0,x.getAdjacentStacks)(i,e).map((t=>({entityId:this.layoutContentCache.getOrCreateEntityId(t)})))},this.setStackActiveView=async(t,e)=>{this.analytics("set-stack-active-view");const i=this.layoutContentCache.getContentItemOrThrow(t,["stack"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to set a view ('${e.name}') as active when it does not belong to the stack.`);i.setActiveContentItem(n,!0)}}async getLayout(t){const e=await L.DefaultLayoutManager.resolveLayout(this.layoutManager,t);if(!e)throw new Error(`Could not resolve target layout identity ${JSON.stringify(t)}`);return e}getContent(t){this.analytics("get-content");return this.layoutContentCache.getContentItemOrThrow(t,["column","row"]).contentItems.map((t=>({type:t.type,entityId:this.layoutContentCache.getOrCreateEntityId(t)})))}getParent(t){this.analytics("get-parent");const e=this.layoutContentCache.getContentItemOrThrow(t);if(!e.isRoot())return e.parent?.contentItems.includes(e)?{type:e.parent.type,entityId:this.layoutContentCache.getOrCreateEntityId(e.parent)}:void 0}}S([(0,E.expose)()],z.prototype,"getLayoutIdentityForViewOrThrow",void 0),S([(0,E.expose)()],z.prototype,"getRoot",void 0),S([(0,E.expose)()],z.prototype,"getStackByView",void 0),S([(0,E.expose)()],z.prototype,"getStackViews",void 0),S([(0,E.expose)()],z.prototype,"getContent",null),S([(0,E.expose)()],z.prototype,"getParent",null),S([(0,E.expose)()],z.prototype,"isRoot",void 0),S([(0,E.expose)()],z.prototype,"exists",void 0),S([(0,E.expose)()],z.prototype,"addViewToStack",void 0),S([(0,E.expose)()],z.prototype,"removeViewFromStack",void 0),S([(0,E.expose)()],z.prototype,"createAdjacentStack",void 0),S([(0,E.expose)()],z.prototype,"getAdjacentStacks",void 0),S([(0,E.expose)()],z.prototype,"setStackActiveView",void 0),I.LayoutEntitiesController=z,Object.defineProperty(g,"__esModule",{value:!0});var M=g.initLayoutEndpoints=void 0;const P=t.apiExposer,T=t.layout_constants,A=f,k=I,D=i;M=g.initLayoutEndpoints=async function(t,e){const i=t.getFin(),n=await i.Platform.getCurrentSync().getClient(),o=new P.ChannelsExposer(n);await new P.ApiExposer(o).exposeInstance(new k.LayoutEntitiesController(t,e,A.LayoutContentCache.getSingleInstance()),{id:T.LAYOUT_CONTROLLER_ID}),await async function(t,e){const i=t=>async i=>{const n=await D.DefaultLayoutManager.resolveLayout(e,i.target);if(!n)throw new Error(`Could not resolve the layout target from payload ${JSON.stringify(i)}`);return t(n,i)},n=(e,n)=>{t.register(e,i(n))},o=(t,e)=>{n(t,e)};n("replace-view",((t,e)=>t.replaceView(e))),n("replace-layout",((t,{layout:e})=>t.replaceLayout(e))),n("add-view",((t,e)=>t.insertView(e))),o("layout-add-view",((t,{viewOptions:e,location:i,targetView:n})=>t.platformCreateView(e,{location:i,targetView:n}))),n("close-view",((t,e)=>t.cleanupView(e.viewIdentity))),o("layout-close-view",((t,e)=>t.platformCloseView(e.viewIdentity))),n("apply-preset-layout",((t,e)=>t.applyPreset(e))),n("get-layout-views",(t=>t.getCurrentViews())),n("get-frame-snapshot",(t=>t.getFrameSnapshot())),n("is-visible",(t=>t.isVisible())),n("destroy",(t=>t.destroy())),t.register("get-layout-snapshot",(()=>e.getLayoutSnapshot()))}(n,e)};var R={};Object.defineProperty(R,"__esModule",{value:!0});var U=R.BaseLayout=void 0;U=R.BaseLayout=class{};var O={};Object.defineProperty(O,"__esModule",{value:!0});var V=O.DOMEmitter=void 0;V=O.DOMEmitter=class{constructor(t){this.container=t}dispatchLocalEvent(t,e){const i={...e,type:t,tabSelector:`tab-${e.name}`,containerSelector:`container-${e.name}`,topic:"openfin-DOM-event"};this.container.dispatchEvent(new CustomEvent(t,{detail:i}))}};var B={};Object.defineProperty(B,"__esModule",{value:!0});var H=B.mapLayoutContentItemsImmutableSync=B.mapLayoutContentItemsImmutable=W=B.isVisible=void 0;var W=B.isVisible=t=>(0!==t.offsetWidth||0!==t.offsetHeight)&&"hidden"!==window.getComputedStyle(t).visibility&&t.offsetTop>=0&&t.offsetLeft>=0&&t.offsetTop<=window.innerHeight&&t.offsetLeft<=window.innerWidth;const F=t=>"type"in t&&"component"===t.type;B.mapLayoutContentItemsImmutable=async function t(e,i){return F(i)?e(i):{...i,content:await Promise.all(i.content?.map((i=>t(e,i))))}},H=B.mapLayoutContentItemsImmutableSync=function t(e,i){return F(i)?e(i):{...i,content:i.content?.map((i=>t(e,i)))}};class N extends Error{constructor(t,e){super(e),this.type=t}}class G extends N{constructor(t,e){super("Configuration",t),this.node=e}}class j extends N{constructor(t){super("PopoutBlocked",t)}}class $ extends N{constructor(t){super("API",t)}}class Z extends N{constructor(t){super("Bind",t)}}class q extends Error{constructor(t,e,i){super(`${t}: ${e}${void 0===i?"":": "+i}`)}}class X extends q{constructor(t,e){super("Assert",t,e)}}class Y extends q{constructor(t,e,i){super("UnreachableCase",t,`${e}${void 0===i?"":": "+i}`)}}class K extends q{constructor(t,e){super("UnexpectedNull",t,e)}}class J extends q{constructor(t,e){super("UnexpectedUndefined",t,e)}}var Q;!function(t){let e=!1;const i={PopoutCannotBeCreatedWithGroundItemConfig:{id:0,default:"Popout cannot be created with ground ItemConfig"},PleaseRegisterAConstructorFunction:{id:1,default:"Please register a constructor function"},ComponentTypeNotRegisteredAndBindComponentEventHandlerNotAssigned:{id:2,default:"Component type not registered and BindComponentEvent handler not assigned"},ComponentIsAlreadyRegistered:{id:3,default:"Component is already registered"},ComponentIsNotVirtuable:{id:4,default:"Component is not virtuable. Requires rootHtmlElement field/getter"},VirtualComponentDoesNotHaveRootHtmlElement:{id:5,default:'Virtual component does not have getter "rootHtmlElement"'},ItemConfigIsNotTypeComponent:{id:6,default:"ItemConfig is not of type component"},InvalidNumberPartInSizeString:{id:7,default:"Invalid number part in size string"},UnknownUnitInSizeString:{id:8,default:"Unknown unit in size string"},UnsupportedUnitInSizeString:{id:9,default:"Unsupported unit in size string"}};t.idCount=Object.keys(i).length;const n=Object.values(i);t.checkInitialise=function(){if(!e)for(let e=0;e="0"&&t<="9"}function Tt(t,e){const i=zt(e);t.style.width=i}function At(t,e){const i=zt(e);t.style.height=i}function kt(t){return{width:t.offsetWidth,height:t.offsetHeight}}function Dt(t,e){t.style.display=e?"":"none"}function Rt(t,e){if(void 0!==e)for(const i in e)if(e.hasOwnProperty(i)){const n=e[i],o=t[i];t[i]=Ut(o,n)}return t}function Ut(t,e){if("object"!=typeof e)return e;if(Array.isArray(e)){const t=e.length,i=new Array(t);for(let n=0;n36)throw new Error("Too many keys in config minifier map")},t.translateObject=n}(dt||(dt={})),function(t){t.defaults={type:at.ground,content:[],size:1,sizeUnit:ht.Fractional,minSize:void 0,minSizeUnit:ht.Pixel,id:"",isClosable:!0},t.createCopy=function(t,e){switch(t.type){case at.ground:case at.row:case at.column:return gt.createCopy(t,e);case at.stack:return ut.createCopy(t,e);case at.component:return pt.createCopy(t);default:throw new Y("CICC91354",t.type,"Invalid Config Item type specified")}},t.createDefault=function(t){switch(t){case at.ground:throw new X("CICCDR91562");case at.row:case at.column:return gt.createDefault(t);case at.stack:return ut.createDefault();case at.component:return pt.createDefault();default:throw new Y("CICCDD91563",t,"Invalid Config Item type specified")}},t.isComponentItem=function(t){return t.type===at.component},t.isStackItem=function(t){return t.type===at.stack},t.isGroundItem=function(t){return t.type===at.ground}}(ct||(ct={})),function(t){t.defaultMaximised=!1,function(t){t.createCopy=function(t,e){return void 0===t?void 0:{show:null!=e?e:t.show,popout:t.popout,close:t.close,maximise:t.maximise,minimise:t.minimise,tabDropdown:t.tabDropdown}}}(t.Header||(t.Header={}))}(mt||(mt={})),function(t){function e(t){const e=t.length,i=new Array(e);for(let n=0;n"__glMaximised"===t));t>0&&(o=!0,n=n.splice(t,1)),e=n.length>0?n[0]:ct.defaults.id}else e=n;return i=void 0!==t.maximised?t.maximised:o,{id:e,maximised:i}}}(wt||(wt={})),function(t){function e(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0;return{resolved:!0,root:Et.resolve(i),openPopouts:t.resolveOpenPopouts(e.openPopouts),dimensions:t.Dimensions.resolve(e.dimensions),settings:t.Settings.resolve(e.settings),header:t.Header.resolve(e.header,e.settings,e.labels)}}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:Lt.fromResolvedArray(e.openPopouts),settings:_t.Settings.createCopy(e.settings),dimensions:t.Dimensions.fromResolved(e.dimensions),header:_t.Header.createCopy(e.header)}},t.isResolved=function(t){const e=t;return void 0!==e.resolved&&!0===e.resolved},t.resolveOpenPopouts=function(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0,{root:Et.resolve(o),openPopouts:xt.resolveOpenPopouts(e.openPopouts),dimensions:xt.Dimensions.resolve(e.dimensions),settings:xt.Settings.resolve(e.settings),header:xt.Header.resolve(e.header,e.settings,e.labels),parentId:null!==(i=e.parentId)&&void 0!==i?i:null,indexInParent:null!==(n=e.indexInParent)&&void 0!==n?n:null,window:t.Window.resolve(e.window,e.dimensions),resolved:!0}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:i(e.openPopouts),dimensions:xt.Dimensions.fromResolved(e.dimensions),settings:_t.Settings.createCopy(e.settings),header:_t.Header.createCopy(e.header),parentId:e.parentId,indexInParent:e.indexInParent,window:t.Window.fromResolved(e.window)}},t.fromResolvedArray=i}(Lt||(Lt={}));class Wt{constructor(){this._allEventSubscriptions=[],this._subscriptionsMap=new Map,this.unbind=this.removeEventListener,this.trigger=this.emit}tryBubbleEvent(t,e){}emit(t,...e){let i=this._subscriptionsMap.get(t);if(void 0!==i){i=i.slice();for(let t=0;t0){const n=e.slice();n.unshift(t);const o=this._allEventSubscriptions.slice();for(let t=0;t0?n.contentItems[0]:n,e=0);const o=this._layoutManager.createAndInitContentItem(i,t);t.addChild(o,e),this._layoutManager.layoutConfig.settings.popInOnClose?this._onClose():this.close()}createWindow(){const t=this.createUrl(),e=Math.floor(1e6*Math.random()).toString(36),i=this.serializeWindowFeatures({width:this._initialWindowSize.width,height:this._initialWindowSize.height,innerWidth:this._initialWindowSize.width,innerHeight:this._initialWindowSize.height,menubar:"no",toolbar:"no",location:"no",personalbar:"no",resizable:"yes",scrollbars:"no",status:"no"});if(this._popoutWindow=globalThis.open(t,e,i),this._popoutWindow)this._popoutWindow.addEventListener("load",(()=>this.positionWindow()),{passive:!0}),this._popoutWindow.addEventListener("beforeunload",(()=>{this._layoutManager.layoutConfig.settings.popInOnClose?this.popIn():this._onClose()}),{passive:!0}),this._checkReadyInterval=setInterval((()=>this.checkReady()),10);else if(!0===this._layoutManager.layoutConfig.settings.blockedPopoutsThrowError){throw new j("Popout blocked")}}checkReady(){if(null===this._popoutWindow)throw new K("BPCR01844");this._popoutWindow.__glInstance&&this._popoutWindow.__glInstance.isInitialised&&(this.onInitialised(),void 0!==this._checkReadyInterval&&(clearInterval(this._checkReadyInterval),this._checkReadyInterval=void 0))}serializeWindowFeatures(t){const e=[];for(const i in t)e.push(i+"="+t[i].toString());return e.join(",")}createUrl(){const t="gl-window-config-"+Ot(),e=_t.minifyConfig(this._config);try{localStorage.setItem(t,JSON.stringify(e))}catch(t){throw new Error("Error while writing to localStorage "+function(t){return t instanceof Error?t.message:"string"==typeof t?t:"Unknown Error"}(t))}const i=new URL(location.href);return i.searchParams.set("gl-window",t),i.toString()}positionWindow(){if(null===this._popoutWindow)throw new Error("BrowserPopout.positionWindow: null popoutWindow");this._popoutWindow.moveTo(this._initialWindowSize.left,this._initialWindowSize.top),this._popoutWindow.focus()}onInitialised(){this._isInitialised=!0,this.getGlInstance().on("popIn",(()=>this.popIn())),this.emit("initialised")}_onClose(){setTimeout((()=>this.emit("closed")),50)}}class Gt extends Wt{constructor(t,e,i,n){super(),this.layoutManager=t,this._parent=i,this._element=n,this._popInParentIds=[],this._type=e.type,this._id=e.id,this._isInitialised=!1,this.isGround=!1,this.isRow=!1,this.isColumn=!1,this.isStack=!1,this.isComponent=!1,this.size=e.size,this.sizeUnit=e.sizeUnit,this.minSize=e.minSize,this.minSizeUnit=e.minSizeUnit,this._isClosable=e.isClosable,this._pendingEventPropagations={},this._throttledEvents=["stateChanged"],this._contentItems=this.createContentItems(e.content)}get type(){return this._type}get id(){return this._id}set id(t){this._id=t}get popInParentIds(){return this._popInParentIds}get parent(){return this._parent}get contentItems(){return this._contentItems}get isClosable(){return this._isClosable}get element(){return this._element}get isInitialised(){return this._isInitialised}static isStack(t){return t.isStack}static isComponentItem(t){return t.isComponent}static isComponentParentableItem(t){return t.isStack||t.isGround}removeChild(t,e=!1){const i=this._contentItems.indexOf(t);if(-1===i)throw new Error("Can't remove child item. Unknown content item");if(e||this._contentItems[i].destroy(),this._contentItems.splice(i,1),this._contentItems.length>0)this.updateSize(!1);else if(!this.isGround&&!0===this._isClosable){if(null===this._parent)throw new K("CIUC00874");this._parent.removeChild(this)}}addChild(t,e,i){return null!=e||(e=this._contentItems.length),this._contentItems.splice(e,0,t),t.setParent(this),!0===this._isInitialised&&!1===t._isInitialised&&t.init(),e}replaceChild(t,e,i=!1){const n=this._contentItems.indexOf(t),o=t._element.parentNode;if(-1===n)throw new X("CIRCI23232","Can't replace child. oldChild is not child of this");if(null===o)throw new K("CIRCP23232");if(o.replaceChild(e._element,t._element),!0===i&&(t._parent=null,t.destroy()),this._contentItems[n]=e,e.setParent(this),e.size=t.size,e.sizeUnit=t.sizeUnit,e.minSize=t.minSize,e.minSizeUnit=t.minSizeUnit,null===e._parent)throw new K("CIRCNC45699");!0===e._parent._isInitialised&&!1===e._isInitialised&&e.init(),this.updateSize(!1)}remove(){if(null===this._parent)throw new K("CIR11110");this._parent.removeChild(this)}popout(){const t=Ot(),e=this.layoutManager.createPopoutFromContentItem(this,void 0,t,void 0);return this.emitBaseBubblingEvent("stateChanged"),e}calculateConfigContent(){const t=this._contentItems,e=t.length,i=new Array(e);for(let n=0;nthis.propagateEventToLayoutManager(t,e))))}propagateEventToLayoutManager(t,e){this._pendingEventPropagations[t]=!1,this.layoutManager.emitUnknown(t,e)}}class jt extends Gt{constructor(t,e,i){super(t,e,i,document.createElement("div")),this._parentItem=i,this._focused=!1,this.isComponent=!0,this._reorderEnabled=e.reorderEnabled,this.applyUpdatableConfig(e),this._initialWantMaximise=e.maximised;const n=document.createElement("div");n.classList.add("lm_content"),this.element.appendChild(n),this._container=new Ft(e,this,t,n,(t=>this.handleUpdateItemConfigEvent(t)),(()=>this.show()),(()=>this.hide()),(t=>this.focus(t)),(t=>this.blur(t)))}get componentName(){return this._container.componentType}get componentType(){return this._container.componentType}get reorderEnabled(){return this._reorderEnabled}get initialWantMaximise(){return this._initialWantMaximise}get component(){return this._container.component}get container(){return this._container}get parentItem(){return this._parentItem}get headerConfig(){return this._headerConfig}get title(){return this._title}get tab(){return this._tab}get focused(){return this._focused}destroy(){this._container.destroy(),super.destroy()}applyUpdatableConfig(t){this.setTitle(t.title),this._headerConfig=t.header}toConfig(){const t=this._container.stateRequestEvent,e=void 0===t?this._container.state:t();return{type:at.component,content:[],size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,maximised:!1,isClosable:this.isClosable,reorderEnabled:this._reorderEnabled,title:this._title,header:mt.Header.createCopy(this._headerConfig),componentType:pt.copyComponentType(this.componentType),componentState:e}}close(){if(null===this.parent)throw new K("CIC68883");this.parent.removeChild(this,!1)}enterDragMode(t,e){Tt(this.element,t),At(this.element,e),this._container.enterDragMode(t,e)}exitDragMode(){this._container.exitDragMode()}enterStackMaximised(){this._container.enterStackMaximised()}exitStackMaximised(){this._container.exitStackMaximised()}drag(){this._container.drag()}updateSize(t){this.updateNodeSize(t)}init(){this.updateNodeSize(!1),super.init(),this._container.emit("open"),this.initContentItems()}setTitle(t){this._title=t,this.emit("titleChanged",t),this.emit("stateChanged")}setTab(t){this._tab=t,this.emit("tab",t),this._container.setTab(t)}hide(){super.hide(),this._container.setVisibility(!1)}show(){super.show(),this._container.setVisibility(!0)}focus(t=!1){this.parentItem.setActiveComponentItem(this,!0,t)}setFocused(t){this._focused=!0,this.tab.setFocused(),t||this.emitBaseBubblingEvent("focus")}blur(t=!1){this._focused&&this.layoutManager.setFocusedComponentItem(void 0,t)}setBlurred(t){this._focused=!1,this.tab.setBlurred(),t||this.emitBaseBubblingEvent("blur")}setParent(t){this._parentItem=t,super.setParent(t)}handleUpdateItemConfigEvent(t){this.applyUpdatableConfig(t)}updateNodeSize(t){if("none"!==this.element.style.display){const{width:e,height:i}=kt(this.element);this._container.setSizeToNodeSize(e,i,t)}}}class $t extends Gt{constructor(){super(...arguments),this._focused=!1}get focused(){return this._focused}setFocusedValue(t){this._focused=t}}class Zt extends Wt{constructor(t,e){super(),this._eElement=t,this._pointerTracking=!1,this._pointerDownEventListener=t=>this.onPointerDown(t),this._pointerMoveEventListener=t=>this.onPointerMove(t),this._pointerUpEventListener=t=>this.onPointerUp(t),this._timeout=void 0,this._allowableTargets=[t,...e],this._oDocument=document,this._eBody=document.body,this._nDelay=1800,this._nDistance=10,this._nX=0,this._nY=0,this._nOriginalX=0,this._nOriginalY=0,this._dragging=!1,this._eElement.addEventListener("pointerdown",this._pointerDownEventListener,{passive:!0})}destroy(){this.checkRemovePointerTrackingEventListeners(),this._eElement.removeEventListener("pointerdown",this._pointerDownEventListener)}cancelDrag(){this.processDragStop(void 0)}onPointerDown(t){if(this._allowableTargets.includes(t.target)&&t.isPrimary){const e=this.getPointerCoordinates(t);this.processPointerDown(e)}}processPointerDown(t){this._nOriginalX=t.x,this._nOriginalY=t.y,this._oDocument.addEventListener("pointermove",this._pointerMoveEventListener),this._oDocument.addEventListener("pointerup",this._pointerUpEventListener,{passive:!0}),this._pointerTracking=!0,this._timeout=setTimeout((()=>{try{this.startDrag()}catch(t){throw console.error(t),t}}),this._nDelay)}onPointerMove(t){this._pointerTracking&&(this.processDragMove(t),t.preventDefault())}processDragMove(t){this._nX=t.pageX-this._nOriginalX,this._nY=t.pageY-this._nOriginalY,!1===this._dragging&&(Math.abs(this._nX)>this._nDistance||Math.abs(this._nY)>this._nDistance)&&this.startDrag(),this._dragging&&this.emit("drag",this._nX,this._nY,t)}onPointerUp(t){this.processDragStop(t)}processDragStop(t){var e;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this.checkRemovePointerTrackingEventListeners(),!0===this._dragging&&(this._eBody.classList.remove("lm_dragging"),this._eElement.classList.remove("lm_dragging"),null===(e=this._oDocument.querySelector("iframe"))||void 0===e||e.style.setProperty("pointer-events",""),this._dragging=!1,this.emit("dragStop",t))}checkRemovePointerTrackingEventListeners(){this._pointerTracking&&(this._oDocument.removeEventListener("pointermove",this._pointerMoveEventListener),this._oDocument.removeEventListener("pointerup",this._pointerUpEventListener),this._pointerTracking=!1)}startDrag(){var t;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this._dragging=!0,this._eBody.classList.add("lm_dragging"),this._eElement.classList.add("lm_dragging"),null===(t=this._oDocument.querySelector("iframe"))||void 0===t||t.style.setProperty("pointer-events","none"),this.emit("dragStart",this._nOriginalX,this._nOriginalY)}getPointerCoordinates(t){return{x:t.pageX,y:t.pageY}}}class qt{constructor(t,e,i){this._isVertical=t,this._size=e,this._grabSize=i0){const i=this.createSplitter(Math.max(0,e-1)).element;e>0?(this.contentItems[e-1].element.insertAdjacentElement("afterend",i),i.insertAdjacentElement("afterend",t.element)):(this.contentItems[0].element.insertAdjacentElement("beforebegin",i),i.insertAdjacentElement("beforebegin",t.element))}else this._childElementContainer.appendChild(t.element);super.addChild(t,e);const n=1/this.contentItems.length*100;if(!0===i)return this.emitBaseBubblingEvent("stateChanged"),e;for(let e=0;e0&&(this.calculateRelativeSizes(),this.setAbsoluteSizes()),this.emitBaseBubblingEvent("stateChanged"),this.emit("resize")}setAbsoluteSizes(){const t=this.calculateAbsoluteSizes();for(let e=0;e0&&t.itemSizes[e]++,this._isColumn?(Tt(this.contentItems[e].element,t.crossAxisSize),At(this.contentItems[e].element,t.itemSizes[e])):(Tt(this.contentItems[e].element,t.itemSizes[e]),At(this.contentItems[e].element,t.crossAxisSize))}calculateAbsoluteSizes(){const t=(this.contentItems.length-1)*this._splitterSize,{width:e,height:i}=kt(this.element);let n,o;this._isColumn?(n=i-t,o=e):(n=e-t,o=i);let s=0;const r=[];for(let t=0;t0){const n=100-t;for(let t=0;t100&&e.length>0){for(let t=0;te)return;{const r=i/e;let a=i;for(let e=0;ethis.onSplitterDrag(e,t,i))),e.on("dragStop",(()=>this.onSplitterDragStop(e))),e.on("dragStart",(()=>this.onSplitterDragStart(e))),this._splitter.splice(t,0,e),e}getSplitItems(t){const e=this._splitter.indexOf(t);return{before:this.contentItems[e],after:this.contentItems[e+1]}}calculateContentItemMinSize(t){const e=t.minSize;if(void 0!==e){if(t.minSizeUnit===ht.Pixel)return e;throw new X("ROCGMD98831",JSON.stringify(t))}{const t=this.layoutManager.layoutConfig.dimensions;return this._isColumn?t.defaultMinItemHeight:t.defaultMinItemWidth}}calculateContentItemsTotalMinSize(t){let e=0;for(const i of t)e+=this.calculateContentItemMinSize(i);return e}onSplitterDragStart(t){const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=this.calculateContentItemsTotalMinSize(e.before.contentItems),s=this.calculateContentItemsTotalMinSize(e.after.contentItems);this._splitterPosition=0,this._splitterMinPosition=-1*(i-o),this._splitterMaxPosition=n-s}onSplitterDrag(t,e,i){let n=this._isColumn?i:e;if(null===this._splitterMinPosition||null===this._splitterMaxPosition)throw new K("ROCOSD59226");n=Math.max(n,this._splitterMinPosition),n=Math.min(n,this._splitterMaxPosition),this._splitterPosition=n;const o=zt(n);this._isColumn?t.element.style.top=o:t.element.style.left=o}onSplitterDragStop(t){if(null===this._splitterPosition)throw new K("ROCOSDS66932");{const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=(this._splitterPosition+i)/(i+n),s=e.before.size+e.after.size;e.before.size=o*s,e.after.size=(1-o)*s,t.element.style.top=zt(0),t.element.style.left=zt(0),globalThis.requestAnimationFrame((()=>this.updateSize(!1)))}}}!function(t){t.getElementDimensionSize=function(t,e){return"width"===e?function(t){return t.offsetWidth}(t):function(t){return t.offsetHeight}(t)},t.setElementDimensionSize=function(t,e,i){return"width"===e?Tt(t,i):At(t,i)},t.createElement=function(t,e){const i=t.createElement("div");return i.classList.add("lm_item"),e?i.classList.add("lm_column"):i.classList.add("lm_row"),i}}(Xt||(Xt={}));class Yt extends $t{constructor(t,e,i){super(t,vt.create(e),null,Yt.createElement(document)),this.isGround=!0,this._childElementContainer=this.element,this._containerElement=i;let n=null;for(;;){const t=n?n.previousSibling:this._containerElement.lastChild;if(!(t instanceof Element&&t.classList.contains("lm_content")))break;n=t}this._containerElement.insertBefore(this.element,n)}init(){if(!0!==this.isInitialised){this.updateNodeSize();for(let t=0;t0?this.contentItems[0]:this,n.isComponent)throw new Error("Cannot add item as child to ComponentItem");{const t=this.layoutManager.createAndInitContentItem(i,n);return e=n.addChild(t,e),n===this?-1:e}}loadComponentAsRoot(t){this.clearRoot();const e=Ct.resolve(t,!1);if(e.maximised)throw new Error("Root Component cannot be maximised");{const t=new jt(this.layoutManager,e,this);t.init(),this.addChild(t,0)}}addChild(t,e){if(this.contentItems.length>0)throw new Error("Ground node can only have a single child");return this._childElementContainer.appendChild(t.element),e=super.addChild(t,e),this.updateSize(!1),this.emitBaseBubblingEvent("stateChanged"),e}calculateConfigContent(){const t=this.contentItems,e=t.length,i=new Array(e);for(let n=0;n0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e)),this.updateContentItemsSize(!1))}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}createSideAreas(){const t=Yt.Area.oppositeSides,e=new Array(Object.keys(t).length);let i=0;for(const n in t){const o=n,s=this.getElementArea();if(null===s)throw new K("RCSA77553");s.side=o,"2"===t[o][1]?s[o]=s[t[o]]-50:s[o]=s[t[o]]+50,s.surface=(s.x2-s.x1)*(s.y2-s.y1),e[i++]=s}return e}highlightDropZone(t,e,i){this.layoutManager.tabDropPlaceholder.remove(),super.highlightDropZone(t,e,i)}onDrop(t,e){if(t.isComponent){const e=ut.createDefault(),i=t;e.header=mt.Header.createCopy(i.headerConfig);const n=this.layoutManager.createAndInitContentItem(e,this);n.addChild(t),t=n}if(0===this.contentItems.length)this.addChild(t);else{if(t.type===at.row||t.type===at.column){const e=ut.createDefault(),i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}const i="x"==e.side[0]?at.row:at.column,n="2"==e.side[1],o=this.contentItems[0];if(o instanceof Xt&&o.type===i){const e=o.contentItems[n?0:o.contentItems.length-1];o.addChild(t,n?0:void 0,!0),e.size*=.5,t.size=e.size,t.sizeUnit=ht.Percent,o.updateSize(!1)}else{const e=ct.createDefault(i),s=this.layoutManager.createContentItem(e,this);this.replaceChild(o,s),s.addChild(t,n?0:void 0,!0),s.addChild(o,n?void 0:0,!0),o.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}}dock(){throw new X("GID87731")}validateDocking(){throw new X("GIVD87732")}getAllContentItems(){const t=[this];return this.deepGetAllContentItems(this.contentItems,t),t}getConfigMaximisedItems(){const t=[];return this.deepFilterContentItems(this.contentItems,t,(t=>!(!Gt.isStack(t)||!t.initialWantMaximise)||!(!Gt.isComponentItem(t)||!t.initialWantMaximise))),t}getItemsByPopInParentId(t){const e=[];return this.deepFilterContentItems(this.contentItems,e,(e=>e.popInParentIds.includes(t))),e}toConfig(){throw new Error("Cannot generate GroundItem config")}setActiveComponentItem(t,e,i){}updateNodeSize(){const{width:t,height:e}=kt(this._containerElement);Tt(this.element,t),At(this.element,e),this.contentItems.length>0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e))}deepGetAllContentItems(t,e){for(let i=0;ithis.onClick(t),this._touchStartEventListener=t=>this.onTouchStart(t),this._element=document.createElement("div"),this._element.classList.add(i),this._element.title=e,this._header.on("destroy",(()=>this.destroy())),this._element.addEventListener("click",this._clickEventListener,{passive:!0}),this._element.addEventListener("touchstart",this._touchStartEventListener,{passive:!0}),this._header.controlsContainerElement.appendChild(this._element)}get element(){return this._element}destroy(){var t;this._element.removeEventListener("click",this._clickEventListener),this._element.removeEventListener("touchstart",this._touchStartEventListener),null===(t=this._element.parentNode)||void 0===t||t.removeChild(this._element)}onClick(t){this._pushEvent(t)}onTouchStart(t){this._pushEvent(t)}}class Jt{constructor(t,e,i,n,o){var s;this._layoutManager=t,this._componentItem=e,this._closeEvent=i,this._focusEvent=n,this._dragStartEvent=o,this._isActive=!1,this._tabClickListener=t=>this.onTabClickDown(t),this._tabTouchStartListener=t=>this.onTabTouchStart(t),this._closeClickListener=()=>this.onCloseClick(),this._closeTouchStartListener=()=>this.onCloseTouchStart(),this._dragStartListener=(t,e)=>this.onDragStart(t,e),this._contentItemDestroyListener=()=>this.onContentItemDestroy(),this._tabTitleChangedListener=t=>this.setTitle(t),this._element=document.createElement("div"),this._element.classList.add("lm_tab"),this._titleElement=document.createElement("span"),this._titleElement.classList.add("lm_title"),this._closeElement=document.createElement("div"),this._closeElement.classList.add("lm_close_tab"),this._element.appendChild(this._titleElement),this._element.appendChild(this._closeElement),e.isClosable?this._closeElement.style.display="":this._closeElement.style.display="none",this.setTitle(e.title),this._componentItem.on("titleChanged",this._tabTitleChangedListener);(null!==(s=e.reorderEnabled)&&void 0!==s?s:this._layoutManager.layoutConfig.settings.reorderEnabled)&&this.enableReorder(),this._element.addEventListener("click",this._tabClickListener,{passive:!0}),this._element.addEventListener("touchstart",this._tabTouchStartListener,{passive:!0}),this._componentItem.isClosable?(this._closeElement.addEventListener("click",this._closeClickListener,{passive:!0}),this._closeElement.addEventListener("touchstart",this._closeTouchStartListener,{passive:!0})):(this._closeElement.remove(),this._closeElement=void 0),this._componentItem.setTab(this),this._layoutManager.emit("tabCreated",this)}get isActive(){return this._isActive}get componentItem(){return this._componentItem}get contentItem(){return this._componentItem}get element(){return this._element}get titleElement(){return this._titleElement}get closeElement(){return this._closeElement}get reorderEnabled(){return void 0!==this._dragListener}set reorderEnabled(t){t!==this.reorderEnabled&&(t?this.enableReorder():this.disableReorder())}setTitle(t){this._titleElement.innerText=t,this._element.title=t}setActive(t){t!==this._isActive&&(this._isActive=t,t?this._element.classList.add("lm_active"):this._element.classList.remove("lm_active"))}destroy(){var t,e;this._closeEvent=void 0,this._focusEvent=void 0,this._dragStartEvent=void 0,this._element.removeEventListener("click",this._tabClickListener),this._element.removeEventListener("touchstart",this._tabTouchStartListener),null===(t=this._closeElement)||void 0===t||t.removeEventListener("click",this._closeClickListener),null===(e=this._closeElement)||void 0===e||e.removeEventListener("touchstart",this._closeTouchStartListener),this._componentItem.off("titleChanged",this._tabTitleChangedListener),this.reorderEnabled&&this.disableReorder(),this._element.remove()}setBlurred(){this._element.classList.remove("lm_focused"),this._titleElement.classList.remove("lm_focused")}setFocused(){this._element.classList.add("lm_focused"),this._titleElement.classList.add("lm_focused")}onDragStart(t,e){if(void 0===this._dragListener)throw new J("TODSDLU10093");if(void 0===this._dragStartEvent)throw new J("TODS23309");this._dragStartEvent(t,e,this._dragListener,this.componentItem)}onContentItemDestroy(){void 0!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=void 0)}onTabClickDown(t){const e=t.target;e!==this._element&&e!==this._titleElement||(0===t.button?this.notifyFocus():1===t.button&&this._componentItem.isClosable&&this.notifyClose())}onTabTouchStart(t){t.target===this._element&&this.notifyFocus()}onCloseClick(){this.notifyClose()}onCloseTouchStart(){this.notifyClose()}notifyClose(){if(void 0===this._closeEvent)throw new J("TNC15007");this._closeEvent(this._componentItem)}notifyFocus(){if(void 0===this._focusEvent)throw new J("TNA15007");this._focusEvent(this._componentItem)}enableReorder(){this._dragListener=new Zt(this._element,[this._titleElement]),this._dragListener.on("dragStart",this._dragStartListener),this._componentItem.on("destroy",this._contentItemDestroyListener)}disableReorder(){if(void 0===this._dragListener)throw new J("TDR87745");this._componentItem.off("destroy",this._contentItemDestroyListener),this._dragListener.off("dragStart",this._dragStartListener),this._dragListener=void 0}}class Qt{constructor(t,e,i,n,o){this._layoutManager=t,this._componentRemoveEvent=e,this._componentFocusEvent=i,this._componentDragStartEvent=n,this._dropdownActiveChangedEvent=o,this._tabs=[],this._lastVisibleTabIndex=-1,this._dropdownActive=!1,this._element=document.createElement("section"),this._element.classList.add("lm_tabs"),this._dropdownElement=document.createElement("section"),this._dropdownElement.classList.add("lm_tabdropdown_list"),this._dropdownElement.style.display="none"}get tabs(){return this._tabs}get tabCount(){return this._tabs.length}get lastVisibleTabIndex(){return this._lastVisibleTabIndex}get element(){return this._element}get dropdownElement(){return this._dropdownElement}get dropdownActive(){return this._dropdownActive}destroy(){for(let t=0;tthis.handleTabCloseEvent(t)),(t=>this.handleTabFocusEvent(t)),((t,e,i,n)=>this.handleTabDragStartEvent(t,e,i,n)));void 0===e&&(e=this._tabs.length),this._tabs.splice(e,0,i),ethis._lastVisibleTabIndex){const t=this._tabs[e];for(let t=e;t>0;t--)this._tabs[t]=this._tabs[t-1];this._tabs[0]=t}}updateTabSizes(t,e){let i=!1;this.tryUpdateTabSizes(i,t,e)||(i=!0,this.tryUpdateTabSizes(i,t,e)),i!==this._dropdownActive&&(this._dropdownActive=i,this._dropdownActiveChangedEvent())}tryUpdateTabSizes(t,e,i){if(this._tabs.length>0){if(void 0===i)throw new Error("non-empty tabs must have active component item");let n=0,o=!1;const s=this._layoutManager.layoutConfig.settings.tabOverlapAllowance,r=this._tabs.indexOf(i.tab),a=this._tabs[r];this._lastVisibleTabIndex=-1;for(let i=0;ie){if(o)i===r&&(l.style.zIndex="auto",l.style.marginLeft="",l.parentElement!==this._element&&this._element.appendChild(l));else{let t;if(t=r>0&&r<=i?(d-e)/(i-1):(d-e)/i,tthis.onClick(t),this._touchStartListener=t=>this.onTouchStart(t),this._rowColumnClosable=!0,this._closeButton=null,this._popoutButton=null,this._tabsContainer=new Qt(this._layoutManager,(t=>this.handleTabInitiatedComponentRemoveEvent(t)),(t=>this.handleTabInitiatedComponentFocusEvent(t)),((t,e,i,n)=>this.handleTabInitiatedDragStartEvent(t,e,i,n)),(()=>this.processTabDropdownActiveChanged())),this._show=i.show,this._popoutEnabled=i.popoutEnabled,this._popoutLabel=i.popoutLabel,this._maximiseEnabled=i.maximiseEnabled,this._maximiseLabel=i.maximiseLabel,this._minimiseEnabled=i.minimiseEnabled,this._minimiseLabel=i.minimiseLabel,this._closeEnabled=i.closeEnabled,this._closeLabel=i.closeLabel,this._tabDropdownEnabled=i.tabDropdownEnabled,this._tabDropdownLabel=i.tabDropdownLabel,this.setSide(i.side),this._canRemoveComponent=this._configClosable,this._element=document.createElement("section"),this._element.classList.add("lm_header"),this._controlsContainerElement=document.createElement("section"),this._controlsContainerElement.classList.add("lm_controls"),this._element.appendChild(this._tabsContainer.element),this._element.appendChild(this._controlsContainerElement),this._element.appendChild(this._tabsContainer.dropdownElement),this._element.addEventListener("click",this._clickListener,{passive:!0}),this._element.addEventListener("touchstart",this._touchStartListener,{passive:!0}),this._documentMouseUpListener=()=>this._tabsContainer.hideAdditionalTabsDropdown(),globalThis.document.addEventListener("mouseup",this._documentMouseUpListener,{passive:!0}),this._tabControlOffset=this._layoutManager.layoutConfig.settings.tabControlOffset,this._tabDropdownEnabled&&(this._tabDropdownButton=new Kt(this,this._tabDropdownLabel,"lm_tabdropdown",(()=>this._tabsContainer.showAdditionalTabsDropdown()))),this._popoutEnabled&&(this._popoutButton=new Kt(this,this._popoutLabel,"lm_popout",(()=>this.handleButtonPopoutEvent()))),this._maximiseEnabled&&(this._maximiseButton=new Kt(this,this._maximiseLabel,"lm_maximise",(t=>this.handleButtonMaximiseToggleEvent(t)))),this._configClosable&&(this._closeButton=new Kt(this,this._closeLabel,"lm_close",(()=>s()))),this.processTabDropdownActiveChanged()}get show(){return this._show}get side(){return this._side}get leftRightSided(){return this._leftRightSided}get layoutManager(){return this._layoutManager}get parent(){return this._parent}get tabs(){return this._tabsContainer.tabs}get lastVisibleTabIndex(){return this._tabsContainer.lastVisibleTabIndex}get element(){return this._element}get tabsContainerElement(){return this._tabsContainer.element}get controlsContainerElement(){return this._controlsContainerElement}destroy(){this.emit("destroy"),this._popoutEvent=void 0,this._maximiseToggleEvent=void 0,this._clickEvent=void 0,this._touchStartEvent=void 0,this._componentRemoveEvent=void 0,this._componentFocusEvent=void 0,this._componentDragStartEvent=void 0,this._tabsContainer.destroy(),globalThis.document.removeEventListener("mouseup",this._documentMouseUpListener),this._element.remove()}createTab(t,e){this._tabsContainer.createTab(t,e)}removeTab(t){this._tabsContainer.removeTab(t)}processActiveComponentChanged(t){this._tabsContainer.processActiveComponentChanged(t),this.updateTabSizes()}setSide(t){this._side=t,this._leftRightSided=[nt.right,nt.left].includes(this._side)}setRowColumnClosable(t){this._rowColumnClosable=t,this.updateClosability()}updateClosability(){let t;if(this._configClosable)if(this._rowColumnClosable){t=!0;const e=this.tabs.length;for(let i=0;i1}applyFocusedValue(t){t?this._element.classList.add("lm_focused"):this._element.classList.remove("lm_focused")}processMaximised(){if(void 0===this._maximiseButton)throw new J("HPMAX16997");this._maximiseButton.element.setAttribute("title",this._minimiseLabel)}processMinimised(){if(void 0===this._maximiseButton)throw new J("HPMIN16997");this._maximiseButton.element.setAttribute("title",this._maximiseLabel)}updateTabSizes(){if(this._tabsContainer.tabCount>0){const t=this._show?this._layoutManager.layoutConfig.dimensions.headerHeight:0;let e;this._leftRightSided?(this._element.style.height="",this._element.style.width=zt(t)):(this._element.style.width="",this._element.style.height=zt(t)),e=this._leftRightSided?this._element.offsetHeight-this._controlsContainerElement.offsetHeight-this._tabControlOffset:this._element.offsetWidth-this._controlsContainerElement.offsetWidth-this._tabControlOffset,this._tabsContainer.updateTabSizes(e,this._getActiveComponentItemEvent())}}handleTabInitiatedComponentRemoveEvent(t){if(this._canRemoveComponent){if(void 0===this._componentRemoveEvent)throw new J("HHTCE22294");this._componentRemoveEvent(t)}}handleTabInitiatedComponentFocusEvent(t){if(void 0===this._componentFocusEvent)throw new J("HHTAE22294");this._componentFocusEvent(t)}handleTabInitiatedDragStartEvent(t,e,i,n){if(this._canRemoveComponent){if(void 0===this._componentDragStartEvent)throw new J("HHTDSE22294");this._componentDragStartEvent(t,e,i,n)}else i.cancelDrag()}processTabDropdownActiveChanged(){void 0!==this._tabDropdownButton&&Dt(this._tabDropdownButton.element,this._tabsContainer.dropdownActive)}handleButtonPopoutEvent(){if(this._layoutManager.layoutConfig.settings.popoutWholeStack){if(void 0===this._popoutEvent)throw new J("HHBPOE17834");this._popoutEvent()}else{const t=this._getActiveComponentItemEvent();t&&t.popout()}}handleButtonMaximiseToggleEvent(t){if(void 0===this._maximiseToggleEvent)throw new J("HHBMTE16834");this._maximiseToggleEvent()}onClick(t){t.target===this._element&&this.notifyClick(t)}onTouchStart(t){t.target===this._element&&this.notifyTouchStart(t)}notifyClick(t){if(void 0===this._clickEvent)throw new J("HNHC46834");this._clickEvent(t)}notifyTouchStart(t){if(void 0===this._touchStartEvent)throw new J("HNHTS46834");this._touchStartEvent(t)}}class ee extends $t{constructor(t,e,i){var n,o,s,r,a,l,h,d,c,m,u,p,g,f,v,_,y,C,w;super(t,e,i,ee.createElement(document)),this._headerSideChanged=!1,this._resizeListener=()=>this.handleResize(),this._maximisedListener=()=>this.handleMaximised(),this._minimisedListener=()=>this.handleMinimised(),this._headerConfig=e.header;const I=t.layoutConfig.header,b=e.content;let S;if(1!==b.length)S=void 0;else{S=b[0].header}this._initialWantMaximise=e.maximised,this._initialActiveItemIndex=null!==(n=e.activeItemIndex)&&void 0!==n?n:0;const E=null!==(r=null!==(s=null===(o=this._headerConfig)||void 0===o?void 0:o.show)&&void 0!==s?s:null==S?void 0:S.show)&&void 0!==r?r:I.show,x=null!==(h=null!==(l=null===(a=this._headerConfig)||void 0===a?void 0:a.popout)&&void 0!==l?l:null==S?void 0:S.popout)&&void 0!==h?h:I.popout,L=null!==(m=null!==(c=null===(d=this._headerConfig)||void 0===d?void 0:d.maximise)&&void 0!==c?c:null==S?void 0:S.maximise)&&void 0!==m?m:I.maximise,z=null!==(g=null!==(p=null===(u=this._headerConfig)||void 0===u?void 0:u.close)&&void 0!==p?p:null==S?void 0:S.close)&&void 0!==g?g:I.close,M=null!==(_=null!==(v=null===(f=this._headerConfig)||void 0===f?void 0:f.minimise)&&void 0!==v?v:null==S?void 0:S.minimise)&&void 0!==_?_:I.minimise,P=null!==(w=null!==(C=null===(y=this._headerConfig)||void 0===y?void 0:y.tabDropdown)&&void 0!==C?C:null==S?void 0:S.tabDropdown)&&void 0!==w?w:I.tabDropdown;this._maximisedEnabled=!1!==L;const T={show:!1!==E,side:!1===E?nt.top:E,popoutEnabled:!1!==x,popoutLabel:!1===x?"":x,maximiseEnabled:this._maximisedEnabled,maximiseLabel:!1===L?"":L,closeEnabled:!1!==z,closeLabel:!1===z?"":z,minimiseEnabled:!0,minimiseLabel:M,tabDropdownEnabled:!1!==P,tabDropdownLabel:!1===P?"":P};this._header=new te(t,this,T,e.isClosable&&!1!==z,(()=>this.getActiveComponentItem()),(()=>this.remove()),(()=>this.handlePopoutEvent()),(()=>this.toggleMaximise()),(t=>this.handleHeaderClickEvent(t)),(t=>this.handleHeaderTouchStartEvent(t)),(t=>this.handleHeaderComponentRemoveEvent(t)),(t=>this.handleHeaderComponentFocusEvent(t)),((t,e,i,n)=>this.handleHeaderComponentStartDragEvent(t,e,i,n))),this.isStack=!0,this._childElementContainer=document.createElement("section"),this._childElementContainer.classList.add("lm_items"),this.on("resize",this._resizeListener),this._maximisedEnabled&&(this.on("maximised",this._maximisedListener),this.on("minimised",this._minimisedListener)),this.element.appendChild(this._header.element),this.element.appendChild(this._childElementContainer),this.setupHeaderPosition(),this._header.updateClosability()}get childElementContainer(){return this._childElementContainer}get header(){return this._header}get headerShow(){return this._header.show}get headerSide(){return this._header.side}get headerLeftRightSided(){return this._header.leftRightSided}get contentAreaDimensions(){return this._contentAreaDimensions}get initialWantMaximise(){return this._initialWantMaximise}get isMaximised(){return this===this.layoutManager.maximisedStack}get stackParent(){if(!this.parent)throw new Error("Stack should always have a parent");return this.parent}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}init(){if(!0===this.isInitialised)return;this.updateNodeSize();for(let t=0;t0){if(this._initialActiveItemIndex<0||this._initialActiveItemIndex>=e)throw new Error(`ActiveItemIndex out of range: ${this._initialActiveItemIndex} id: ${this.id}`);for(let i=0;ithis.contentItems.length)throw e-=1,new X("SAC99728");if(t instanceof jt)return e=super.addChild(t,e),this._childElementContainer.appendChild(t.element),this._header.createTab(t,e),this.setActiveComponentItem(t,i),this._header.updateTabSizes(),this.updateSize(!1),t.container.setBaseLogicalZIndex(),this._header.updateClosability(),this.emitStateChangedEvent(),e;throw new X("SACC88532")}removeChild(t,e){const i=t,n=this.contentItems.indexOf(i),o=1===this.contentItems.length;if(this._activeComponentItem===i&&(i.focused&&i.blur(),!o)){const t=0===n?1:n-1;this.setActiveComponentItem(this.contentItems[t],!1)}this._header.removeTab(i),super.removeChild(i,e),o||this._header.updateClosability(),this.emitStateChangedEvent()}toggleMaximise(){this.isMaximised?this.minimise():this.maximise()}maximise(){if(!this.isMaximised){this.layoutManager.setMaximisedStack(this);const t=this.contentItems,e=t.length;for(let i=0;i0&&void 0===t)throw new Error("expected non-empty stack to have an active component item");return{type:"stack",content:this.calculateConfigContent(),size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,isClosable:this.isClosable,maximised:this.isMaximised,header:this.createHeaderConfig(),activeItemIndex:t}}onDrop(t,e){if("header"===this._dropSegment){if(this.resetHeaderDropZone(),void 0===this._dropIndex)throw new J("SODDI68990");return void this.addChild(t,this._dropIndex)}if("body"===this._dropSegment)return void this.addChild(t,0,!0);const i="top"===this._dropSegment||"bottom"===this._dropSegment,n="left"===this._dropSegment||"right"===this._dropSegment,o="top"===this._dropSegment||"left"===this._dropSegment,s=i&&this.stackParent.isColumn||n&&this.stackParent.isRow;if(t.isComponent){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createAndInitContentItem(e,this);i.addChild(t),t=i}if(t.type===at.row||t.type===at.column){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}if(s){const e=this.stackParent.contentItems.indexOf(this);this.stackParent.addChild(t,o?e:e+1,!0),this.size*=.5,t.size=this.size,t.sizeUnit=this.sizeUnit,this.stackParent.updateSize(!1)}else{const e=i?at.column:at.row,n=ct.createDefault(e),s=this.layoutManager.createContentItem(n,this);this.stackParent.replaceChild(this,s),s.addChild(t,o?0:void 0,!0),s.addChild(this,o?void 0:0,!0),this.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}highlightDropZone(t,e){for(const i in this._contentAreaDimensions){const n=i,o=this._contentAreaDimensions[n].hoverArea;if(o.x1t&&o.y1e)return void("header"===n?(this._dropSegment="header",this.highlightHeaderDropZone(this._header.leftRightSided?e:t)):(this.resetHeaderDropZone(),this.highlightBodyDropZone(n)))}}getArea(){if("none"===this.element.style.display)return null;const t=super.getElementArea(this._header.element),e=super.getElementArea(this._childElementContainer);if(null===t||null===e)throw new K("SGAHC13086");const i=e.x2-e.x1,n=e.y2-e.y1;return this._contentAreaDimensions={header:{hoverArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2},highlightArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2}}},0===this.contentItems.length?(this._contentAreaDimensions.body={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2}},super.getElementArea(this.element)):(this._contentAreaDimensions.left={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x1+.25*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x1+.5*i,y2:e.y2}},this._contentAreaDimensions.top={hoverArea:{x1:e.x1+.25*i,y1:e.y1,x2:e.x1+.75*i,y2:e.y1+.5*n},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y1+.5*n}},this._contentAreaDimensions.right={hoverArea:{x1:e.x1+.75*i,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1+.5*i,y1:e.y1,x2:e.x2,y2:e.y2}},this._contentAreaDimensions.bottom={hoverArea:{x1:e.x1+.25*i,y1:e.y1+.5*n,x2:e.x1+.75*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1+.5*n,x2:e.x2,y2:e.y2}},super.getElementArea(this.element))}positionHeader(t){this._header.side!==t&&(this._header.setSide(t),this._headerSideChanged=!0,this.setupHeaderPosition())}updateNodeSize(){if("none"!==this.element.style.display){const t=kt(this.element);if(this._header.show){t[this._header.leftRightSided?it.width:it.height]-=this.layoutManager.layoutConfig.dimensions.headerHeight}this._childElementContainer.style.width=zt(t.width),this._childElementContainer.style.height=zt(t.height);for(let e=0;e=o&&tthis.onDrag(t,e,i))),this._dragListener.on("dragStop",(()=>this.onDrop())),this.createDragProxyElements(t,e),null===this._componentItem.parent)throw new K("DPC10097");this._componentItemFocused=this._componentItem.focused,this._componentItemFocused&&this._componentItem.blur(),this._componentItem.parent.removeChild(this._componentItem,!0),this.setDimensions(),document.body.appendChild(this._element),this.determineMinMaxXY(),this._layoutManager.calculateItemAreas(),this.setDropPosition(t,e)}get element(){return this._element}createDragProxyElements(t,e){this._element=document.createElement("div"),this._element.classList.add("lm_dragProxy");const i=document.createElement("div");i.classList.add("lm_header");const n=document.createElement("div");n.classList.add("lm_tabs");const o=document.createElement("div");o.classList.add("lm_tab");const s=document.createElement("span");s.classList.add("lm_title"),o.appendChild(s),n.appendChild(o),i.appendChild(n),this._proxyContainerElement=document.createElement("div"),this._proxyContainerElement.classList.add("lm_content"),this._element.appendChild(i),this._element.appendChild(this._proxyContainerElement),this._originalParent instanceof ee&&this._originalParent.headerShow&&(this._sided=this._originalParent.headerLeftRightSided,this._element.classList.add("lm_"+this._originalParent.headerSide),[nt.right,nt.bottom].indexOf(this._originalParent.headerSide)>=0&&this._proxyContainerElement.insertAdjacentElement("afterend",i)),this._element.style.left=zt(t),this._element.style.top=zt(e),o.setAttribute("title",this._componentItem.title),s.insertAdjacentText("afterbegin",this._componentItem.title),this._proxyContainerElement.appendChild(this._componentItem.element)}determineMinMaxXY(){const t=this._layoutManager.groundItem;if(void 0===t)throw new J("DPDMMXY73109");{const e=t.element.getBoundingClientRect();this._minX=e.left+document.body.scrollLeft,this._minY=e.top+document.body.scrollTop,this._maxX=this._minX+e.width,this._maxY=this._minY+e.height}}onDrag(t,e,i){const n=i.pageX,o=i.pageY;this.setDropPosition(n,o),this._componentItem.drag()}setDropPosition(t,e){this._layoutManager.layoutConfig.settings.constrainDragToContainer&&(t<=this._minX?t=Math.ceil(this._minX):t>=this._maxX&&(t=Math.floor(this._maxX)),e<=this._minY?e=Math.ceil(this._minY):e>=this._maxY&&(e=Math.floor(this._maxY))),this._element.style.left=zt(t),this._element.style.top=zt(e),this._area=this._layoutManager.getArea(t,e),null!==this._area&&(this._lastValidArea=this._area,this._area.contentItem.highlightDropZone(t,e,this._area))}onDrop(){const t=this._layoutManager.dropTargetIndicator;if(null===t)throw new K("DPOD30011");let e;if(t.hide(),this._componentItem.exitDragMode(),null!==this._area)e=this._componentItem,this._area.contentItem.onDrop(e,this._area);else if(null!==this._lastValidArea){e=this._componentItem;this._lastValidArea.contentItem.onDrop(e,this._lastValidArea)}else this._originalParent?(e=this._componentItem,this._originalParent.addChild(e)):this._componentItem.destroy();this._element.remove(),this._layoutManager.emit("itemDropped",this._componentItem),this._componentItemFocused&&void 0!==e&&e.focus()}setDimensions(){const t=this._layoutManager.layoutConfig.dimensions;if(void 0===t)throw new Error("DragProxy.setDimensions: dimensions undefined");let e=t.dragProxyWidth,i=t.dragProxyHeight;if(void 0===e||void 0===i)throw new Error("DragProxy.setDimensions: width and/or height undefined");const n=!1===this._layoutManager.layoutConfig.header.show?0:t.headerHeight;this._element.style.width=zt(e),this._element.style.height=zt(i),e-=this._sided?n:0,i-=this._sided?0:n,this._proxyContainerElement.style.width=zt(e),this._proxyContainerElement.style.height=zt(i),this._componentItem.enterDragMode(e,i),this._componentItem.show()}}class ne{constructor(t,e,i,n,o,s,r){this._layoutManager=t,this._element=e,this._extraAllowableChildTargets=i,this._componentTypeOrFtn=n,this._componentState=o,this._title=s,this._id=r,this._dragListener=null,this._dummyGroundContainer=document.createElement("div");const a=gt.createDefault("row");this._dummyGroundContentItem=new Yt(this._layoutManager,a,this._dummyGroundContainer),this.createDragListener()}destroy(){this.removeDragListener()}createDragListener(){this.removeDragListener(),this._dragListener=new Zt(this._element,this._extraAllowableChildTargets),this._dragListener.on("dragStart",((t,e)=>this.onDragStart(t,e))),this._dragListener.on("dragStop",(()=>this.onDragStop()))}onDragStart(t,e){var i;const n="component";let o;if("function"==typeof this._componentTypeOrFtn){const t=this._componentTypeOrFtn();o=ne.isDragSourceComponentItemConfig(t)?{type:n,componentState:t.state,componentType:t.type,title:null!==(i=t.title)&&void 0!==i?i:this._title}:t}else o={type:n,componentState:this._componentState,componentType:this._componentTypeOrFtn,title:this._title,id:this._id};const s=bt.resolve(o,!1),r=new jt(this._layoutManager,s,this._dummyGroundContentItem);if(this._dummyGroundContentItem.contentItems.push(r),null===this._dragListener)throw new K("DSODSD66746");{const i=new ie(t,e,this._dragListener,this._layoutManager,r,this._dummyGroundContentItem),n=this._layoutManager.transitionIndicator;if(null===n)throw new K("DSODST66746");n.transitionElements(this._element,i.element)}}onDragStop(){this.createDragListener()}removeDragListener(){null!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=null)}}!function(t){t.isDragSourceComponentItemConfig=function(t){return!("componentType"in t)}}(ne||(ne={}));class oe{constructor(){this._element=document.createElement("div"),this._element.classList.add("lm_dropTargetIndicator");const t=document.createElement("div");t.classList.add("lm_inner"),this._element.appendChild(t),document.body.appendChild(this._element)}destroy(){this._element.remove()}highlightArea(t,e){this._element.style.left=zt(t.x1+e),this._element.style.top=zt(t.y1+e),this._element.style.width=zt(t.x2-t.x1-e),this._element.style.height=zt(t.y2-t.y1-e),this._element.style.display="block"}hide(){Dt(this._element,!1)}}class se{constructor(){this._element=document.createElement("div"),this._element.classList.add("lm_transition_indicator"),document.body.appendChild(this._element),this._toElement=null,this._fromDimensions=null,this._totalAnimationDuration=200,this._animationStartTime=null}destroy(){this._element.remove()}transitionElements(t,e){}nextAnimationFrame(){}measure(t){const e=t.getBoundingClientRect();return{left:e.left,top:e.top,width:t.offsetWidth,height:t.offsetHeight}}}class re extends Wt{constructor(t){super(),this._layoutManager=t,this._childEventListener=t=>this.onEventFromChild(t),globalThis.addEventListener(re.ChildEventName,this._childEventListener,{passive:!0})}emit(t,...e){"userBroadcast"===t?this.emitUserBroadcast(...e):super.emit(t,...e)}emitUserBroadcast(...t){this.handleUserBroadcastEvent("userBroadcast",t)}destroy(){globalThis.removeEventListener(re.ChildEventName,this._childEventListener)}handleUserBroadcastEvent(t,e){this._layoutManager.isSubWindow?this.propagateToParent(t,e):this.propagateToThisAndSubtree(t,e)}onEventFromChild(t){const e=t.detail;this.handleUserBroadcastEvent(e.eventName,e.args)}propagateToParent(t,e){const i={bubbles:!0,cancelable:!0,detail:{layoutManager:this._layoutManager,eventName:t,args:e}},n=new CustomEvent(re.ChildEventName,i),o=globalThis.opener;if(null===o)throw new K("EHPTP15778");o.dispatchEvent(n)}propagateToThisAndSubtree(t,e){this.emitUnknown(t,...e);for(let i=0;ithis.handleContainerResize())),this._windowBeforeUnloadListener=()=>this.onBeforeUnload(),this._windowBeforeUnloadListening=!1,this._maximisedStackBeforeDestroyedListener=t=>this.cleanupBeforeMaximisedStackDestroyed(t),this.isSubWindow=t.isSubWindow,this._constructorOrSubWindowLayoutConfig=t.constructorOrSubWindowLayoutConfig,Q.checkInitialise(),dt.checkInitialise(),void 0!==t.containerElement&&(this._containerElement=t.containerElement)}get container(){return this._containerElement}get isInitialised(){return this._isInitialised}get groundItem(){return this._groundItem}get root(){return this._groundItem}get openPopouts(){return this._openPopouts}get dropTargetIndicator(){return this._dropTargetIndicator}get transitionIndicator(){return this._transitionIndicator}get width(){return this._width}get height(){return this._height}get eventHub(){return this._eventHub}get rootItem(){if(void 0===this._groundItem)throw new Error("Cannot access rootItem before init");return 0===this._groundItem.contentItems.length?void 0:this._groundItem.contentItems[0]}get focusedComponentItem(){return this._focusedComponentItem}get tabDropPlaceholder(){return this._tabDropPlaceholder}get maximisedStack(){return this._maximisedStack}get deprecatedConstructor(){return!this.isSubWindow&&void 0!==this._constructorOrSubWindowLayoutConfig}destroy(){if(this._isInitialised){this._windowBeforeUnloadListening&&(globalThis.removeEventListener("beforeunload",this._windowBeforeUnloadListener),this._windowBeforeUnloadListening=!1),!0===this.layoutConfig.settings.closePopoutsOnUnload&&this.closeAllOpenPopouts(),this._resizeObserver.disconnect(),this.checkClearResizeTimeout(),void 0!==this._groundItem&&this._groundItem.destroy(),this._tabDropPlaceholder.remove(),null!==this._dropTargetIndicator&&this._dropTargetIndicator.destroy(),null!==this._transitionIndicator&&this._transitionIndicator.destroy(),this._eventHub.destroy();for(const t of this._dragSources)t.destroy();this._dragSources=[],this._isInitialised=!1}}minifyConfig(t){return _t.minifyConfig(t)}unminifyConfig(t){return _t.unminifyConfig(t)}init(){let t;if(this.setContainer(),this._dropTargetIndicator=new oe,this._transitionIndicator=new se,this.updateSizeFromContainer(),this.isSubWindow){if(void 0===this._constructorOrSubWindowLayoutConfig)throw new J("LMIU07155");{const e=this._constructorOrSubWindowLayoutConfig.root;if(void 0===e)throw new X("LMIC07156");if(!Ct.isComponent(e))throw new X("LMIC07157");t=e;const i=xt.resolve(this._constructorOrSubWindowLayoutConfig);this.layoutConfig=Object.assign(Object.assign({},i),{root:void 0})}}else void 0===this._constructorOrSubWindowLayoutConfig?this.layoutConfig=_t.createDefault():this.layoutConfig=xt.resolve(this._constructorOrSubWindowLayoutConfig);const e=this.layoutConfig;this._groundItem=new Yt(this,e.root,this._containerElement),this._groundItem.init(),this.checkLoadedLayoutMaximiseItem(),this._resizeObserver.observe(this._containerElement),this._isInitialised=!0,this.adjustColumnsResponsive(),this.emit("initialised"),void 0!==t&&this.loadComponentAsRoot(t)}loadLayout(t){if(!this.isInitialised)throw new Error("GoldenLayout: Need to call init() if LayoutConfig with defined root passed to constructor");if(void 0===this._groundItem)throw new J("LMLL11119");this.createSubWindows(),this.layoutConfig=xt.resolve(t),this._groundItem.loadRoot(this.layoutConfig.root),this.checkLoadedLayoutMaximiseItem(),this.adjustColumnsResponsive()}saveLayout(){if(!1===this._isInitialised)throw new Error("Can't create config, layout not yet initialised");if(void 0===this._groundItem)throw new J("LMTC18244");{const t=this._groundItem.calculateConfigContent();let e;e=1!==t.length?void 0:t[0],this.reconcilePopoutWindows();const i=[];for(let t=0;t=0?n=this._groundItem.contentItems[0]:e=0;break;case at.row:case at.column:e=n.addItem(t,i.index);break;case at.stack:if(Ct.isComponent(t)){e=n.addItem(t,i.index);break}throw Error(tt[6]);case at.component:throw new X("LMAIALC87444602");default:throw new Y("LMAIALU98881733",n.type)}if(Ct.isComponent(t)){const t=n.contentItems[e];Gt.isStack(t)&&(n=t,e=0)}return i.parentItem=n,i.index=e,i}}}loadComponentAsRoot(t){if(void 0===this._groundItem)throw new Error("Cannot add item before init");this._groundItem.loadComponentAsRoot(t)}updateSize(t,e){this.setSize(t,e)}setSize(t,e){if(this._width=t,this._height=e,!0===this._isInitialised){if(void 0===this._groundItem)throw new J("LMUS18881");if(this._groundItem.setSize(this._width,this._height),this._maximisedStack){const{width:t,height:e}=kt(this._containerElement);Tt(this._maximisedStack.element,t),At(this._maximisedStack.element,e),this._maximisedStack.updateSize(!1)}this.adjustColumnsResponsive()}}beginSizeInvalidation(){this._sizeInvalidationBeginCount++}endSizeInvalidation(){0==--this._sizeInvalidationBeginCount&&this.updateSizeFromContainer()}updateSizeFromContainer(){const{width:t,height:e}=kt(this._containerElement);this.setSize(t,e)}updateRootSize(t=!1){if(void 0===this._groundItem)throw new J("LMURS28881");this._groundItem.updateSize(t)}createAndInitContentItem(t,e){const i=this.createContentItem(t,e);return i.init(),i}createContentItem(t,e){if("string"!=typeof t.type)throw new G("Missing parameter 'type'",JSON.stringify(t));if(ct.isComponentItem(t)&&!(e instanceof ee)&&e&&!(!0===this.isSubWindow&&e instanceof Yt)){t={type:at.stack,content:[t],size:t.size,sizeUnit:t.sizeUnit,minSize:t.minSize,minSizeUnit:t.minSizeUnit,id:t.id,maximised:t.maximised,isClosable:t.isClosable,activeItemIndex:0,header:void 0}}return this.createContentItemFromConfig(t,e)}findFirstComponentItemById(t){if(void 0===this._groundItem)throw new J("LMFFCIBI82446");return this.findFirstContentItemTypeByIdRecursive(at.component,t,this._groundItem)}createPopout(t,e,i,n){return t instanceof Gt?this.createPopoutFromContentItem(t,e,i,n):this.createPopoutFromItemConfig(t,e,i,n)}createPopoutFromContentItem(t,e,i,n){let o=t.parent,s=t;for(;null!==o&&1===o.contentItems.length&&!o.isGround;)s=o,o=o.parent;if(null===o)throw new K("LMCPFCI00834");{if(void 0===n&&(n=o.contentItems.indexOf(s)),null!==i&&o.addPopInParentId(i),void 0===e){const i=globalThis.screenX||globalThis.screenLeft,n=globalThis.screenY||globalThis.screenTop,o=t.element.offsetLeft,s=t.element.offsetTop,{width:r,height:a}=kt(t.element);e={left:i+o,top:n+s,width:r,height:a}}const r=t.toConfig();if(t.remove(),ft.isRootItemConfig(r))return this.createPopoutFromItemConfig(r,e,i,n);throw new Error(`${tt[0]}`)}}beginVirtualSizedContainerAdding(){0==++this._virtualSizedContainerAddingBeginCount&&(this._virtualSizedContainers.length=0)}addVirtualSizedContainer(t){this._virtualSizedContainers.push(t)}endVirtualSizedContainerAdding(){if(0==--this._virtualSizedContainerAddingBeginCount){const t=this._virtualSizedContainers.length;if(t>0){this.fireBeforeVirtualRectingEvent(t);for(let e=0;ethis.emit("windowOpened",a))),a.on("closed",(()=>this.reconcilePopoutWindows())),this._openPopouts.push(a),this.layoutConfig.settings.closePopoutsOnUnload&&!this._windowBeforeUnloadListening&&(globalThis.addEventListener("beforeunload",this._windowBeforeUnloadListener,{passive:!0}),this._windowBeforeUnloadListening=!0),a}closeAllOpenPopouts(){for(let t=0;tglobalThis.close()),1)}getArea(t,e){let i=null,n=1/0;for(let o=0;o=s.x1&&t=s.y1&&es.surface&&(n=s.surface,i=s)}return i}calculateItemAreas(){const t=this.getAllContentItems(),e=this._groundItem;if(void 0===e)throw new J("LMCIAR44365");if(1!==t.length){e.contentItems[0].isStack?this._itemAreas=[]:this._itemAreas=e.createSideAreas();for(let e=0;e0){let e=t[0];if(Gt.isComponentItem(e)){const t=e.parent;if(null===t)throw new K("LMXLLMI69999");e=t}if(!Gt.isStack(e))throw new X("LMCLLMI19993");e.maximise()}}}processMaximiseStack(t){if(this._maximisedStack=t,t.on("beforeItemDestroyed",this._maximisedStackBeforeDestroyedListener),t.element.classList.add("lm_maximised"),t.element.insertAdjacentElement("afterend",this._maximisePlaceholder),void 0===this._groundItem)throw new J("LMMXI19993");{this._groundItem.element.prepend(t.element);const{width:e,height:i}=kt(this._containerElement);Tt(t.element,e),At(t.element,i),t.updateSize(!0),t.focusActiveContentItem(),this._maximisedStack.emit("maximised"),this.emit("stateChanged")}}processMinimiseMaximisedStack(){if(void 0===this._maximisedStack)throw new X("LMMMS74422");{const t=this._maximisedStack;if(null===t.parent)throw new K("LMMI13668");t.element.classList.remove("lm_maximised"),this._maximisePlaceholder.insertAdjacentElement("afterend",t.element),this._maximisePlaceholder.remove(),this.updateRootSize(!0),this._maximisedStack=void 0,t.off("beforeItemDestroyed",this._maximisedStackBeforeDestroyedListener),t.emit("minimised"),this.emit("stateChanged")}}reconcilePopoutWindows(){const t=[];for(let e=0;e{this._resizeTimeoutId=void 0,this.beginSizeInvalidation(),this.endSizeInvalidation()}),this.resizeDebounceInterval))}checkClearResizeTimeout(){void 0!==this._resizeTimeoutId&&(clearTimeout(this._resizeTimeoutId),this._resizeTimeoutId=void 0)}setContainer(){var t;const e=document.body,i=null!==(t=this._containerElement)&&void 0!==t?t:e;if(i===e){this.resizeWithContainerAutomatically=!0;const t=document.documentElement;t.style.height="100%",t.style.margin="0",t.style.padding="0",t.style.overflow="clip",e.style.height="100%",e.style.margin="0",e.style.padding="0",e.style.overflow="clip"}this._containerElement=i}onBeforeUnload(){this.destroy()}adjustColumnsResponsive(){if(void 0===this._groundItem)throw new J("LMACR20883");if(this._firstLoad=!1,this.useResponsiveLayout()&&!this._updatingColumnsResponsive&&this._groundItem.contentItems.length>0&&this._groundItem.contentItems[0].isRow){if(void 0===this._groundItem||null===this._width)throw new J("LMACR77412");{const t=this._groundItem.contentItems[0].contentItems.length;if(t<=1)return;{const e=this.layoutConfig.dimensions.defaultMinItemWidth;if(t*e<=this._width)return;{this._updatingColumnsResponsive=!0;const i=t-Math.max(Math.floor(this._width/e),1),n=this._groundItem.contentItems[0],o=this.getAllStacks();if(0===o.length)throw new X("LMACRS77413");{const t=o[0];for(let e=0;en?void 0:{parentItem:t,index:o}}}case 1:if(void 0===this._focusedComponentItem)return;{const t=this._focusedComponentItem.parentItem;return this.tryCreateLocationFromParentItem(t,e)}case 2:{const t=this.findFirstContentItemType(at.stack);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 3:{let t=this.findFirstContentItemType(at.row);return void 0!==t?this.tryCreateLocationFromParentItem(t,e):(t=this.findFirstContentItemType(at.column),void 0!==t?this.tryCreateLocationFromParentItem(t,e):void 0)}case 4:{const t=this.findFirstContentItemType(at.row);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 5:{const t=this.findFirstContentItemType(at.column);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 6:if(void 0===this._groundItem)throw new J("LMFLRIF18244");return void 0!==this.rootItem?void 0:void 0===e||0===e?{parentItem:this._groundItem,index:0}:void 0;case 7:if(void 0===this._groundItem)throw new J("LMFLF18244");{const t=this._groundItem.contentItems;if(0===t.length)return void 0===e||0===e?{parentItem:this._groundItem,index:0}:void 0;{const i=t[0];return this.tryCreateLocationFromParentItem(i,e)}}}}tryCreateLocationFromParentItem(t,e){const i=t.contentItems.length;return void 0===e?{parentItem:t,index:i}:e<0||e>i?void 0:{parentItem:t,index:e}}}!function(t){t.createMaximisePlaceElement=function(t){const e=t.createElement("div");return e.classList.add("lm_maximise_place"),e},t.createTabDropPlaceholderElement=function(t){const e=t.createElement("div");return e.classList.add("lm_drop_tab_placeholder"),e},t.defaultLocationSelectors=[{typeId:1,index:void 0},{typeId:2,index:void 0},{typeId:3,index:void 0},{typeId:7,index:void 0}],t.afterFocusedItemIfPossibleLocationSelectors=[{typeId:0,index:1},{typeId:2,index:void 0},{typeId:3,index:void 0},{typeId:7,index:void 0}]}(ae||(ae={}));class le extends ae{constructor(t,e,i,n){if(super(le.createLayoutManagerConstructorParameters(t,e)),this._bindComponentEventHanlderPassedInConstructor=!1,this._creationTimeoutPassed=!1,void 0!==e&&"function"==typeof e&&(this.bindComponentEvent=e,this._bindComponentEventHanlderPassedInConstructor=!0,void 0!==i&&(this.unbindComponentEvent=i)),!this._bindComponentEventHanlderPassedInConstructor&&this.isSubWindow){if(void 0===this._constructorOrSubWindowLayoutConfig)throw new J("VLC98823");{const t=xt.resolve(this._constructorOrSubWindowLayoutConfig);this.layoutConfig=Object.assign(Object.assign({},t),{root:void 0})}}!0!==n&&(this.deprecatedConstructor||this.init())}destroy(){this.bindComponentEvent=void 0,this.unbindComponentEvent=void 0,super.destroy()}init(){if(this._bindComponentEventHanlderPassedInConstructor||"loading"!==document.readyState&&null!==document.body){if(!this._bindComponentEventHanlderPassedInConstructor&&!0===this.isSubWindow&&!this._creationTimeoutPassed)return setTimeout((()=>this.init()),7),void(this._creationTimeoutPassed=!0);!0===this.isSubWindow&&(this._bindComponentEventHanlderPassedInConstructor||this.clearHtmlAndAdjustStylesForSubWindow(),window.__glInstance=this),super.init()}else document.addEventListener("DOMContentLoaded",(()=>this.init()),{passive:!0})}clearHtmlAndAdjustStylesForSubWindow(){const t=document.head,e=new Array(4);e[0]=document.querySelectorAll("body link"),e[1]=document.querySelectorAll("body style"),e[2]=document.querySelectorAll("template"),e[3]=document.querySelectorAll(".gl_keep");for(let i=0;ithis.emit("popIn"))),document.body.appendChild(t),!0}}bindComponent(t,e){if(void 0!==this.bindComponentEvent){return this.bindComponentEvent(t,e)}if(void 0!==this.getComponentEvent)return{virtual:!1,component:this.getComponentEvent(t,e)};{const t=`${tt[2]}: ${JSON.stringify(e)}`;throw new Z(t)}}unbindComponent(t,e,i){if(void 0!==this.unbindComponentEvent)this.unbindComponentEvent(t);else if(!e&&void 0!==this.releaseComponentEvent){if(void 0===i)throw new J("VCUCRCU333998");this.releaseComponentEvent(t,i)}}}!function(t){let e=!1;t.createLayoutManagerConstructorParameters=function(t,i){const n=e?null:new URL(document.location.href).searchParams.get("gl-window");e=!0;const o=null!==n;let s,r;if(null!==n){const e=localStorage.getItem(n);if(null===e)throw new Error("Null gl-window Config");localStorage.removeItem(n);const i=JSON.parse(e),o=_t.unminifyConfig(i);r=xt.fromResolved(o),t instanceof HTMLElement&&(s=t)}else void 0===t?r=void 0:t instanceof HTMLElement?(r=void 0,s=t):r=t,void 0===s&&i instanceof HTMLElement&&(s=i);return{constructorOrSubWindowLayoutConfig:r,isSubWindow:o,containerElement:s}}}(le||(le={}));class he extends le{constructor(t,e,i){super(t,e,i,!0),this._componentTypesMap=new Map,this._registeredComponentMap=new Map,this._virtuableComponentMap=new Map,this._containerVirtualRectingRequiredEventListener=(t,e,i)=>this.handleContainerVirtualRectingRequiredEvent(t,e,i),this._containerVirtualVisibilityChangeRequiredEventListener=(t,e)=>this.handleContainerVirtualVisibilityChangeRequiredEvent(t,e),this._containerVirtualZIndexChangeRequiredEventListener=(t,e,i)=>this.handleContainerVirtualZIndexChangeRequiredEvent(t,e,i),this.deprecatedConstructor||this.init()}registerComponent(t,e,i=!1){if("function"!=typeof e)throw new $("registerComponent() componentConstructorOrFactoryFtn parameter is not a function");if(e.hasOwnProperty("prototype")){const n=e;this.registerComponentConstructor(t,n,i)}else{const n=e;this.registerComponentFactoryFunction(t,n,i)}}registerComponentConstructor(t,e,i=!1){if("function"!=typeof e)throw new Error(tt[1]);if(void 0!==this._componentTypesMap.get(t))throw new Z(`${tt[3]}: ${t}`);this._componentTypesMap.set(t,{constructor:e,factoryFunction:void 0,virtual:i})}registerComponentFactoryFunction(t,e,i=!1){if("function"!=typeof e)throw new Z("Please register a constructor function");if(void 0!==this._componentTypesMap.get(t))throw new Z(`${tt[3]}: ${t}`);this._componentTypesMap.set(t,{constructor:void 0,factoryFunction:e,virtual:i})}registerComponentFunction(t){this.registerGetComponentConstructorCallback(t)}registerGetComponentConstructorCallback(t){if("function"!=typeof t)throw new Error("Please register a callback function");void 0!==this._getComponentConstructorFtn&&console.warn("Multiple component functions are being registered. Only the final registered function will be used."),this._getComponentConstructorFtn=t}getRegisteredComponentTypeNames(){const t=this._componentTypesMap.keys();return Array.from(t)}getComponentInstantiator(t){let e;const i=pt.resolveComponentTypeName(t);return void 0!==i&&(e=this._componentTypesMap.get(i)),void 0===e&&void 0!==this._getComponentConstructorFtn&&(e={constructor:this._getComponentConstructorFtn(t),factoryFunction:void 0,virtual:!1}),e}bindComponent(t,e){let i;const n=pt.resolveComponentTypeName(e);let o;if(void 0!==n&&(i=this._componentTypesMap.get(n)),void 0===i&&void 0!==this._getComponentConstructorFtn&&(i={constructor:this._getComponentConstructorFtn(e),factoryFunction:void 0,virtual:!1}),void 0!==i){const s=i.virtual;let r,a;r=void 0===e.componentState?void 0:Ut({},e.componentState);const l=i.constructor;if(void 0!==l)a=new l(t,r,s);else{const e=i.factoryFunction;if(void 0===e)throw new X("LMBCFFU10008");a=e(t,r,s)}if(s){if(void 0===a)throw new J("GLBCVCU988774");{const e=a,i=e.rootHtmlElement;if(void 0===i)throw new Z(`${tt[5]}: ${n}`);!function(t){const e="absolute";t.style.position!==e&&(t.style.position=e)}(i),this.container.appendChild(i),this._virtuableComponentMap.set(t,e),t.virtualRectingRequiredEvent=this._containerVirtualRectingRequiredEventListener,t.virtualVisibilityChangeRequiredEvent=this._containerVirtualVisibilityChangeRequiredEventListener,t.virtualZIndexChangeRequiredEvent=this._containerVirtualZIndexChangeRequiredEventListener}}this._registeredComponentMap.set(t,a),o={virtual:i.virtual,component:a}}else o=super.bindComponent(t,e);return o}unbindComponent(t,e,i){if(void 0===this._registeredComponentMap.get(t))super.unbindComponent(t,e,i);else{const e=this._virtuableComponentMap.get(t);if(void 0!==e){const i=e.rootHtmlElement;if(void 0===i)throw new X("GLUC77743",t.title);this.container.removeChild(i),this._virtuableComponentMap.delete(t)}}}fireBeforeVirtualRectingEvent(t){this._goldenLayoutBoundingClientRect=this.container.getBoundingClientRect(),super.fireBeforeVirtualRectingEvent(t)}handleContainerVirtualRectingRequiredEvent(t,e,i){const n=this._virtuableComponentMap.get(t);if(void 0===n)throw new J("GLHCSCE55933");{const o=n.rootHtmlElement;if(void 0===o)throw new Z(tt[4]+" "+t.title);{const n=t.element.getBoundingClientRect(),s=n.left-this._goldenLayoutBoundingClientRect.left;o.style.left=zt(s);const r=n.top-this._goldenLayoutBoundingClientRect.top;o.style.top=zt(r),Tt(o,e),At(o,i)}}}handleContainerVirtualVisibilityChangeRequiredEvent(t,e){const i=this._virtuableComponentMap.get(t);if(void 0===i)throw new J("GLHCVVCRE55934");{const n=i.rootHtmlElement;if(void 0===n)throw new Z(tt[4]+" "+t.title);Dt(n,e)}}handleContainerVirtualZIndexChangeRequiredEvent(t,e,i){const n=this._virtuableComponentMap.get(t);if(void 0===n)throw new J("GLHCVZICRE55935");{const e=n.rootHtmlElement;if(void 0===e)throw new Z(tt[4]+" "+t.title);e.style.zIndex=i}}}const de="initial_",ce={show:"top",popout:!1,maximise:!1,close:"close-tab-unused"},me={headerHeight:31},ue={hasHeaders:!0,reorderEnabled:!0},pe={popoutWholeStack:!1,constrainDragToContainer:!1,constrainDragToHeaders:!1,preventDragout:!1,showMaximiseIcon:!1,showPopoutIcon:!1,showCloseIcon:!1,blockedPopoutsThrowError:!0,closePopoutsOnUnload:!0,selectionEnabled:!1};var ge,fe;class ve{constructor(e){this.layout=e,ge.set(this,void 0),fe.set(this,void 0),this.handleResize=t=>{t.forEach((t=>this.resizeElement(t.target)))},this.handleMutation=()=>{this.layout.viewComponentsByContainerElement.forEach((t=>{this.resizeElement(t.container.element)}))},t.__classPrivateFieldSet(this,ge,new ResizeObserver(this.handleResize),"f"),t.__classPrivateFieldSet(this,fe,new MutationObserver(this.handleMutation),"f")}observeMutations(e){t.__classPrivateFieldGet(this,fe,"f")?.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["class"]})}destroy(){t.__classPrivateFieldGet(this,ge,"f").disconnect(),t.__classPrivateFieldGet(this,fe,"f").disconnect()}observeContainer(e){t.__classPrivateFieldGet(this,ge,"f").observe(e)}unobserveContainer(e){t.__classPrivateFieldGet(this,ge,"f").unobserve(e)}resizeElement(t){const e=this.layout.viewComponentsByContainerElement.get(t);e&&e.resize()}}ge=new WeakMap,fe=new WeakMap;var _e={};Object.defineProperty(_e,"__esModule",{value:!0});var ye=_e.BaseItem=void 0;class Ce{constructor(t,e,i){this._item=t,this._layout=e,this._wrap=i}get raw(){return this._item}get layout(){return this._layout}get type(){return this._item.type}get contentItems(){return(this._item.contentItems??[]).map((t=>this._wrap(t)))}get parent(){const t=this._item.parent;return t?this._wrap(t):null}setActiveContentItem(t,e){if("stack"!==this.type)throw new Error(`Cannot call setActiveContentItem from a non-stack item: ${this.type}`);this._item.setActiveContentItem(t.raw,e)}static wrapInternal(t,e,i){const n=Ce.wrapCache.get(e);if(n)return n;const o=new t(e,i,(e=>Ce.wrapInternal(t,e,i)));return Ce.wrapCache.set(e,o),o}}ye=_e.BaseItem=Ce,Ce.wrapCache=new WeakMap;const we=t=>!!t&&"contentItems"in t&&(t.isRow||t.isColumn);class Ie extends ye{isRoot(){return!!this._item.parent?.isGround}getBounds(){return this._item.element.getBoundingClientRect()}get viewName(){if(this._item.isComponent){const{component:t}=this._item;return t.identity.name}throw new Error("View name not found")}onDestroyed(t){const e=({target:i})=>{i===this._item&&(t(),this._item.off("itemDestroyed",e))};this._item.on("itemDestroyed",e)}createAdjacentStack({position:t="right"}={}){const e=this.raw;if(ee.isStack(e)&&e.parent){const i=["top","bottom"].includes(t)?"column":"row",n=["left","top"].includes(t)?1:0,o=we(e.parent)?e.parent:e.layoutManager,s=o,r=e.parent.contentItems.indexOf(e);e.parent.isGround&&e.parent.removeChild(e,!0);const a=o.newItem({type:i,content:[{type:"stack",content:[]}]},r);if(!a)throw new Error("createAdjacentStack: Failed to create new container");const l=a.contentItems[0];return a.addChild(this.raw,n),we(s)&&s.removeChild(e,!0),this._wrap(l)}throw new Error(`Cannot creat adjacent stacks for type: ${e.type}, must be type 'stack'`)}setActiveContentItem(t,e=!0){if(!ee.isStack(this._item))throw new Error(`Cannot call setActiveContentItem from a non-stack item: ${this.type}`);this._item.setActiveComponentItem(t.raw,!e)}static wrap(t,e){return ye.wrapInternal(Ie,t,e)}}function be(t=[],e){for(const i of t)"component"===i.type?Object.keys(e).forEach((t=>{t in i&&(i.componentState={[`${de}${t}`]:i[t],...i.componentState}),i[t]=e[t]})):be(i.content,e)}function Se(t=[],e,i){for(const n of t)if("component"===n.type)Object.keys(e).forEach((t=>{if(`${de}${t}`in n.componentState)return n[t]=n.componentState[`${de}${t}`],void delete n.componentState[`${de}${t}`];n[t]=e[t]}));else{if(n.size&&("row"===i||"column"===i)){n["row"===i?"width":"height"]=n.size?.includes(".")?parseFloat(n.size):parseInt(n.size)}Se(n.content,e,n.type)}}function Ee(t){if(t.root){t.root.content&&Se([t.root],{componentName:"view",isClosable:!0});const e=t.root;t.content=[e],delete t.root}return t}const xe=e=>class extends e{connectedCallback(){if(!this.name||!this.uuid)throw new Error(" Name or uuid attribute missing");if(!this.src)throw new Error(" missing 'src' attribute.");this.#t||(this.#t=document.createElement("iframe"),this.#t.src=this.src,this.#t.style.height="100%",this.#t.style.width="100%",this.#t.style.border="none",this.forceFrameName?this.#t.setAttribute("name",this.forceFrameName):this.#t.setAttribute("name",t.encodeOptions({brokerUrl:this.brokerUrl,name:this.name,uuid:this.uuid,providerId:this.providerId,contextGroup:this.contextGroup},"of-frame")),this.#t.setAttribute("id",this.name),this.appendChild(this.#t))}#t;get brokerUrl(){return this.getAttribute("of-broker")}set brokerUrl(t){t&&this.setAttribute("of-broker",t)}get name(){return this.getAttribute("of-name")}set name(t){t&&this.setAttribute("of-name",t)}get forceFrameName(){return this.getAttribute("forceFrameName")}set forceFrameName(t){t&&this.setAttribute("forceFrameName",t)}get uuid(){return this.getAttribute("of-uuid")}set uuid(t){t&&this.setAttribute("of-uuid",t)}get src(){return this.getAttribute("src")}set src(t){t&&this.setAttribute("src",t)}get providerId(){return this.getAttribute("of-provider-id")}set providerId(t){t&&this.setAttribute("of-provider-id",t)}get contextGroup(){return this.getAttribute("of-context-group")}set contextGroup(t){t&&this.setAttribute("of-context-group",t)}static get observedAttributes(){return["name"]}};class Le{static create(t){const e=document.createElement("of-view");return Object.entries(t).forEach((([t,i])=>{e.setAttribute(t,i)})),e}}customElements.define("of-view",xe(HTMLElement));class ze{constructor(t,i,n,{brokerUrl:o,interopConfig:s},r){this.container=t,this.config=i,this.ofView=null,this.isDragging=()=>this.container.tab.element?.className.includes("lm_dragging")??!1;const{url:a,web:l,interop:h,name:d}=i||{},c=d??`internal-generated-view-${e.v4()}`;if(this.identity={uuid:n,name:c},this.container.element.setAttribute("of-name",c),this.container.element.id=`container-${c}`,this.container.parent.id=c,void 0===a)return void this.handleUrlMissing();const m=this.updateTitleIfNotSet(a),u={"of-broker":o,"of-uuid":n,"of-name":c,src:a};l?.frameName&&(u.forceFrameName=l.frameName);const p=h?.currentContextGroup??s?.currentContextGroup;p&&(u["of-context-group"]=p),s?.providerId&&(u["of-provider-id"]=s?.providerId),this.ofView=Le.create(u),this.ofView.title=m??`Iframe: ${a}`,r.appendChild(this.ofView),this.ofView.style.position="absolute"}updateTitleIfNotSet(t){return"view"===this.container.parent.title&&this.container.parent.setTitle(t),this.container.parent.title}handleUrlMissing(){const t=document.createElement("div");t.setAttribute("style","padding: 20px");t.innerText="No URL provided",this.container.element.appendChild(t)}destroy(){this.ofView?.remove(),this.ofView=null}closeView(){this.container.close()}resize(){if(this.ofView){if(this.isDragging())return void(this.ofView.style.display="none");const t=this.container.element.getBoundingClientRect();this.ofView.style.position="absolute",this.ofView.style.height=`${t.height}px`,this.ofView.style.width=`${t.width}px`,this.ofView.style.inset=`${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`,this.ofView.style.display="block"}}}class Me extends U{static overrideConfig(t){const e={...ue,...t.settings,...pe};return e.reorderEnabled?be(t.content,{isClosable:!0}):be(t.content,{reorderEnabled:!1}),{dimensions:me,...t,settings:e,header:{...ce,show:!1!==t.settings?.hasHeaders&&ce.show}}}constructor(t,e,i,{options:n},o,s){super(),this.identity=t,this.container=e,this.initialConfig=i,this.layoutManager=o,this.platformProvider=s,this.viewComponentsByContainerElement=new Map,this.layoutContentCache=_.getSingleInstance(),this.reparentingViews=new Set,this.goldenLayoutDestroyed=!1,this.createViewComponent=(t,e)=>{m.handleSharedView(this.layoutManager,this.identity,e);const i=new ze(t,e,this.identity.uuid,this.options,this.iframeContainer);return e&&!1===e[`${de}isClosable`]&&this.stylesheet.insertRule(`#tab-${i.identity.name} .lm_close_tab { display: none; }`),this.viewComponentsByContainerElement.set(t.element,i),this.resizeController.observeContainer(t.element),i},this.iframeContainer=document.createElement("div"),this.iframeContainer.id=`openfin-layout-iframe-container-${this.identity.layoutName}`,this.domEmitter=new V(e),this.setupStylesheets(),this.layout=new he(this.container),this.layout.resizeWithContainerAutomatically=!0,this.options=n,this.layout.registerComponent("view",this.createViewComponent),this.setupListeners(),this.resizeController=new ve(this),this.layout.loadLayout(Me.overrideConfig(i));const r=document.createElement("div");r.id=`openfin-layout-shadow-container-${this.identity.layoutName}`,r.attachShadow({mode:"open",delegatesFocus:!1}).appendChild(this.iframeContainer),this.container.appendChild(r),this.resizeController.observeMutations(this.container)}getStackByView({name:t}){const e=this.layout.findFirstComponentItemById(t);if(e?.parent&&e?.parent?.isStack)return Ie.wrap(e.parent,this)}getRoot(){return Ie.wrap(this.layout.rootItem,this)}async platformCloseView(t){const e=[...this.viewComponentsByContainerElement.values()].find((e=>e.identity.name===t.name));if(!e)throw new Error(`View with name: ${t.name} not found in layout.`);e.closeView()}async platformCreateView(t,{location:e,targetView:i}={}){if(i)throw new Error("TargetView not supported in web");const n={options:this.platformProvider.normalizeOptions(t),target:this.identity,location:e};return this.insertView(n)}setupStylesheets(){if(this.container.setAttribute("data-openfin-layout-name",this.identity.layoutName),this.stylesheet=new CSSStyleSheet,this.stylesheet.insertRule(".lm_close { display: none; }"),document.adoptedStyleSheets.push(this.stylesheet),this.initialConfig.settings?.preventSplitterResize){const t=`\n [data-openfin-layout-name='${this.identity.layoutName}'] .lm_splitter {\n pointer-events: none;\n }`;this.stylesheet.insertRule(t)}}insertView({options:t,location:e,targetView:i}){const n=e?this.layoutContentCache.getItemOrUndefined(e.id):void 0,o=i?this.layoutContentCache.getItemOrUndefined(i.name):void 0,s=n??o??Ie.wrap(this.layout.rootItem,this);let r;if(ee.isStack(s.raw))r=s.raw;else{if(!we(s.raw))throw new Error("Cannot add a view at the requested location");r=s.raw.newItem({type:"stack",content:[]})}const a=Math.min(r.contentItems.length,e?.index??r.contentItems.length);let l=this.layout.findFirstComponentItemById(t.name);l?(l.parent&&l.parent.removeChild(l,!0),r.addChild(l,a)):l=r.newComponent("view",t,t.title??t.url??"Default Title",a);const h=l.component.identity;return Promise.resolve({identity:h})}replaceView({viewToReplace:t,newView:e}){throw new Error("Method not implemented.")}replaceLayout(t){throw new Error("Method not implemented.")}async cleanupView(t){}applyPreset(t){throw new Error("Method not implemented.")}getCurrentViews(){return[...this.viewComponentsByContainerElement.values()].map((t=>t.identity))}async getFrameSnapshot(){return Ee(xt.fromResolved(this.layout.toConfig()))}isVisible(){return W(this.container)}async onViewDetached({viewIdentity:t}){this.reparentingViews.add(t.name),this.platformCloseView(t)}async destroy(){this.goldenLayoutDestroyed||(this.goldenLayoutDestroyed=!0,this.layout.destroy()),this.iframeContainer.remove(),this.resizeController.destroy(),document.adoptedStyleSheets=document.adoptedStyleSheets.filter((t=>t!==this.stylesheet)),this.viewComponentsByContainerElement.clear()}setupListeners(){this.container.addEventListener("pointerdown",(t=>{if(t.target instanceof HTMLElement){const e=t.target.classList;["lm_tab","lm_title","lm_splitter","lm_drag_handle"].some((t=>e.contains(t)))&&(this.handleDragStart(),2===t.button&&t.stopPropagation())}}),!0),document.addEventListener("pointerup",(()=>this.handleDragEnd()),!0),this.layout.on("tabCreated",(t=>{const e=t.componentItem.component;t.element.id=`tab-${e.identity.name}`,this.domEmitter.dispatchLocalEvent("tab-created",e.identity)})),this.layout.on("itemCreated",(({target:t})=>{const e=t;if(Gt.isComponentItem(e)){const t=e.component;this.domEmitter.dispatchLocalEvent("container-created",t.identity)}})),this.layout.on("itemDestroyed",(t=>{const e=t.target;if(Gt.isComponentItem(e)){const t=e.component;this.removeViewComponent(t)}})),this.layout.on("itemDropped",(()=>{this.handleDragEnd()}))}handleDragStart(){this.iframeContainer.style.pointerEvents="none"}handleDragEnd(){this.iframeContainer.style.pointerEvents=""}removeViewComponent(t){if(t.config&&!1===t.config[`${de}isClosable`]){const e=[...this.stylesheet.cssRules].findIndex((e=>e.cssText.includes(`#tab-${t.identity.name}`)));this.stylesheet.deleteRule(e)}t.destroy(),this.viewComponentsByContainerElement.delete(t.container.element),this.resizeController.unobserveContainer(t.container.element),this.reparentingViews.has(t.identity.name)?this.reparentingViews.delete(t.identity.name):this.platformProvider.closeView(t.identity.name);0===this.getCurrentViews().length&&(this.goldenLayoutDestroyed||(this.goldenLayoutDestroyed=!0,m.handleLastViewRemoved(this.layoutManager,this.identity)))}}class Pe{constructor(t,e,i,n){this.windowIdentity=t,this.connectConfig=e,this.provider=i,this.fallbackContainer=n}async createLayout(t,e){if(!("container"in t)&&!this.fallbackContainer)throw new Error("Container property is not optional in web");const{layoutName:i}=t,n=t,o=this.provider.initLayoutViews(n),s=n.container??this.fallbackContainer,r={...this.windowIdentity,layoutName:i},a=new Me(r,s,o,this.connectConfig,e,this.provider);m.registerLayout(e,i,a),this.fallbackContainer=null}async getLayoutSnapshot(t){return t.getLayoutSnapshot()}async handleLastViewRemoved(t){}}class Te{static async init(e){const i=e.getFin().InterApplicationBus.Channel,n=await i.create(`custom-frame-${e.me.uuid}`);return n.setDefaultAction((async(t,{target:e,opts:i},o)=>{const s=n.connections.find((t=>t.name===e.name));if(s)return n.dispatch(s,t,{...i,target:e});throw new Error(`Client with name ${e.name} not found`)})),await t.relayChannelClientApi_1(n,"layout-relay"),new Te(e)}constructor(t){this.wire=t,this.viewNames=new Set}normalizeOptions(t,i="default"){const n=this.wire.me.uuid;let{name:o=`internal-generated-view-${e.v4()}`}=t;return o.match(/^internal-generated-view-/)&&this.viewNames.has(o)&&"duplicate"===i&&(o=`internal-generated-view-${e.v4()}`),this.viewNames.add(o),{...t,name:o,uuid:n}}closeView(t){this.viewNames.delete(t)}initLayoutViews({layout:t,multiInstanceViewBehavior:e}){return H((t=>{if("component"===t.type&&t.componentState){const i=this.normalizeOptions(t.componentState,e);return{...t,componentState:i}}return t}),t)}}var Ae;const ke=t=>t;Ae=new WeakMap,exports.WebLayoutEntryPoint=class{constructor(e){Ae.set(this,void 0),this.initLayoutManager=async(e,i,{container:n,layoutManagerOverride:o})=>{const s=await Te.init(i),r=o??ke,a=new Pe(i.me,t.__classPrivateFieldGet(this,Ae,"f"),s,n),l=new(r(m.createClosedConstructor(a)));return await M(i,l),l},this.applyLayoutSnapshot=async(e,i,n)=>{await i.applyLayoutSnapshot(t.__classPrivateFieldGet(this,Ae,"f").platform.layoutSnapshot)},this.createLayout=async(t,e)=>m.createLayout(t,e),this.destroyLayout=async(t,e)=>m.destroyLayout(t,e),t.__classPrivateFieldSet(this,Ae,e,"f")}}; @@ -7340,7 +7340,7 @@ module.exports = stubFalse; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.init = init; -const core_web_1 = __webpack_require__(/*! @openfin/core-web */ "./node_modules/@openfin/core-web/out/api-client.js"); +const core_web_1 = __webpack_require__(/*! @openfin/core-web */ "../../node_modules/@openfin/core-web/out/api-client.js"); const settings_1 = __webpack_require__(/*! ../platform/settings/settings */ "./client/src/platform/settings/settings.ts"); /** * Initializes the OpenFin Web Broker connection. @@ -8441,7 +8441,7 @@ function version(uuid) { /******/ /************************************************************************/ var __webpack_exports__ = {}; -// This entry need to be wrapped in an IIFE because it need to be in strict mode. +// This entry needs to be wrapped in an IIFE because it needs to be in strict mode. (() => { "use strict"; var exports = __webpack_exports__; diff --git a/web/v19.2.0/web-interop-support-context-and-intents/js/interop-intent-view.bundle.js.map b/web/v19.2.0/web-interop-support-context-and-intents/js/interop-intent-view.bundle.js.map index 528144c..00533fe 100644 --- a/web/v19.2.0/web-interop-support-context-and-intents/js/interop-intent-view.bundle.js.map +++ b/web/v19.2.0/web-interop-support-context-and-intents/js/interop-intent-view.bundle.js.map @@ -1 +1 @@ -{"version":3,"file":"interop-intent-view.bundle.js","mappings":";;;;;;;;;;AAAa,MAAM,mBAAO,CAAC,iFAAoB,EAAE,mBAAO,CAAC,mDAAS,EAAE,mBAAO,CAAC,+DAAM,EAAE,mBAAO,CA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2F;;;;;;;;;;;;ACFv6nD;;AAEZ,kBAAkB;AAClB,mBAAmB;AACnB,qBAAqB;;AAErB;AACA;AACA;;AAEA;AACA,mCAAmC,SAAS;AAC5C;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,cAAc,SAAS;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,2CAA2C,UAAU;AACrD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;ACrJA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEY;;AAEZ,eAAe,mBAAO,CAAC,wDAAW;AAClC,gBAAgB,mBAAO,CAAC,oDAAS;AACjC;AACA;AACA;AACA;;AAEA,cAAc;AACd,kBAAkB;AAClB,yBAAyB;;AAEzB;AACA,kBAAkB;;AAElB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,kBAAkB,YAAY;AAC9B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA,wCAAwC,SAAS;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;;AAEA;AACA;AACA,cAAc,iBAAiB;AAC/B;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,iDAAiD,EAAE;AACnD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C;AAC1C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA,yBAAyB,eAAe;AACxC;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,yBAAyB,QAAQ;AACjC;AACA,sBAAsB,eAAe;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc,YAAY;AAC1B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB,sBAAsB;AACxC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,mBAAmB;AACnB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA,oBAAoB,SAAS;AAC7B;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA,qBAAqB,WAAW,GAAG,IAAI;AACvC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA,gBAAgB,WAAW,GAAG,IAAI,KAAK,aAAa;AACpD;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;;AAEA;AACA,GAAG;AACH;AACA;AACA,mBAAmB,KAAK,mDAAmD,cAAc;AACzF,GAAG;AACH;AACA;AACA,+BAA+B,IAAI;AACnC;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,MAAM,aAAa,SAAS;AACtD;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,SAAS,gBAAgB;AACzB,cAAc,oBAAoB,EAAE,IAAI;AACxC;AACA,YAAY,gBAAgB,EAAE,IAAI;AAClC;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,GAAG,SAAS,GAAG,KAAK,qBAAqB,EAAE,EAAE;AACpE,QAAQ;AACR,yBAAyB,GAAG,KAAK,yBAAyB,EAAE,EAAE;AAC9D,mBAAmB,yBAAyB,EAAE,EAAE;AAChD;AACA,MAAM;AACN,oBAAoB,IAAI,EAAE,GAAG,SAAS,IAAI,EAAE,EAAE;AAC9C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,0CAA0C,cAAc,SAAS,OAAO;AACxE;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,kBAAkB,YAAY;AAC9B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,kBAAkB,gBAAgB;AAClC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,kBAAkB,gBAAgB;AAClC;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,cAAc,YAAY;AAC1B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,QAAQ;AAC1B;AACA,oBAAoB,QAAQ;AAC5B;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;;;;;ACzjEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEa;;AAEb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB;;AAEnB;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,sBAAsB;AACxC;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA,eAAe;AACf;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA,oBAAoB,SAAS;AAC7B;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;;AAEA,kCAAkC,QAAQ;AAC1C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oBAAoB,iBAAiB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,QAAQ;AACR;AACA,uCAAuC,QAAQ;AAC/C;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,OAAO;AACzB;AACA;AACA;;AAEA;AACA,SAAS,yBAAyB;AAClC;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,gBAAgB;AAClC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,8DAA8D,YAAY;AAC1E;AACA,8DAA8D,YAAY;AAC1E;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,qCAAqC,YAAY;AACjD;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;AACA;;;;;;;;;;;AChfA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,SAAS,WAAW;;AAEpB;AACA;AACA;AACA,SAAS,WAAW;;AAEpB;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA,SAAS,WAAW;;AAEpB;AACA;AACA,SAAS,UAAU;;AAEnB;AACA;;;;;;;;;;;ACpFA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,WAAW,mBAAO,CAAC,mDAAS;;AAE5B;AACA;;AAEA;;;;;;;;;;;ACNA,gBAAgB,mBAAO,CAAC,6DAA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W;AACjC,eAAe,mBAAO,CAAC,yDAAY;AACnC,cAAc,mBAAO,CAAC,yDAAY;AAClC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,SAAS;AACpB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AChDA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACnBA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,UAAU;AACrB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACtBA,sBAAsB,mBAAO,CAAC,yEAAoB;AAClD,SAAS,mBAAO,CAAC,6CAAM;;AAEvB;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC3BA,SAAS,mBAAO,CAAC,6CAAM;;AAEvB;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpBA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,WAAW,mBAAO,CAAC,iDAAQ;;AAE3B;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa,QAAQ;AACrB;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;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,SAAS;AACpB;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa,GAAG;AAChB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;AACA,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;;;;;;;;;;ACrKA,eAAe,mBAAO,CAAC,yDAAY;;AAEnC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;;;;;;;;;;AC7BA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,cAAc,mBAAO,CAAC,uDAAW;;AAEjC;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;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A;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClFA,aAAa,mBAAO,CAAC,uDAAW;AAChC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA,iBAAiB,mBAAO,CAAC,6DAAc;AACvC,eAAe,mBAAO,CAAC,2DAAa;AACpC,eAAe,mBAAO,CAAC,yDAAY;AACnC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;AACA;AACA;AACA,oCAAoC;;AAEpC;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC9CA,aAAa,mBAAO,CAAC,uDAAW;AAChC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,eAAe,mBAAO,CAAC,yDAAY;AACnC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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AiB,mBAAO,CAAC,+DAAe;AACxC,SAAS,mBAAO,CAAC,6CAAM;AACvB,kBAAkB,mBAAO,CAAC,iEAAgB;AAC1C,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC/GA,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A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EAAiB;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACdA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AChBA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,GAAG;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC7BA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACtBA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACtBA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACzBA,uBAAuB,mBAAO,CAAC,2EAAqB;AACpD,oBAAoB,mBAAO,CAAC,qEAAkB;AAC9C,kBAAkB,mBAAO,CAAC,iEAAgB;AAC1C,kBAAkB,mBAAO,CAAC,iEAAgB;AAC1C,sBAAsB,mBAAO,CAAC,yEAAoB;;AAElD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC5EA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,mBAAmB,mBAAO,CAAC,mEAAiB;AAC5C,kBAAkB,mBAAO,CAAC,iEAAgB;;AAE1C;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACxBA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACdA,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACnBA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACZA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WA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;AACA,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACbA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;;;;;;;;;;ACjBA,gBAAgB,mBAAO,CAAC,6DAAc;;AAEtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACdA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,GAAG;AAChB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACbA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACbA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,UAAU,mBAAO,CAAC,iDAAQ;AAC1B,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjCA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;;;;;;;;;;;ACzBA,gBAAgB,mBAAO,CAAC,6DAAc;;AAEtC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,GAAG;AAChB;AACA;AACA;AACA,oBAAoB,QAAQ,IAAI,QAAQ;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,kBAAkB;AAClB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpCA,sBAAsB,mBAAO,CAAC,yEAAoB;AAClD,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA,8BAA8B,mBAAmB;AACjD;AACA;AACA;AACA;AACA;AACA,+CAA+C,mBAAmB;AAClE;AACA;AACA;;AAEA;;;;;;;;;;;ACnCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACzBA,iBAAiB,mBAAO,CAAC,6DAAc;AACvC,eAAe,mBAAO,CAAC,yDAAY;;AAEnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AChCA,WAAW,mBAAO,CAAC,mDAAS;AAC5B,gBAAgB,mBAAO,CAAC,2DAAa;;AAErC;AACA,kBAAkB,KAA0B;;AAE5C;AACA,gCAAgC,QAAa;;AAE7C;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACrCA,kBAAkB,mBAAO,CAAC,iEAAgB;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,kBAAkB;AAClB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClCA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,eAAe,mBAAO,CAAC,yDAAY;;AAEnC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpCA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClCA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC1BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC9BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC5BA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC1BA,uBAAuB,mBAAO,CAAC,2EAAqB;AACpD,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC1BA,oBAAoB,mBAAO,CAAC,qEAAkB;AAC9C,eAAe,mBAAO,CAAC,2DAAa;AACpC,kBAAkB,mBAAO,CAAC,+DAAe;;AAEzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpCA,oBAAoB,mBAAO,CAAC,qEA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G,GAAG,WAAW,CAAC,CAAC,CAAC,UAAU,CAAC;IACzD,OAAO,WAAW,CAAC;AACpB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACjHuC;AACA;AACA;AACA;AACE;AACQ;AACE;AACE;;;;;;;;;;;;;;;;ACPtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD;;AAEnD;;AAEA,oBAAoB,gBAAgB;AACpC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA,kBAAkB,cAAc;AAChC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,kBAAkB,cAAc;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,kBAAkB,aAAa;AAC/B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,iEAAe,GAAG;;;;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aAAa,CAAkB,cAAc,CAAC,CAAC;IAChF,MAAM,eAAe,GAAG,QAAQ,CAAC,aAAa,CAAkB,cAAc,CAAC,CAAC;IAChF,MAAM,cAAc,GAAG,QAAQ,CAAC,aAAa,CAAiB,cAAc,CAAC,CAAC;IAE9E,IAAI,eAAe,KAAK,IAAI,IAAI,eAAe,KAAK,IAAI,IAAI,cAAc,KAAK,IAAI,EAAE,CAAC;QACrF,eAAe,CAAC,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;QAC3C,eAAe,CAAC,WAAW,GAAG,OAAO,CAAC,IAAI,IAAI,mBAAmB,CAAC;QAClE,cAAc,CAAC,WAAW,GAAG,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;IAC/D,CAAC;AACF,CAAC;AAED;;GAEG;AACH,KAAK,UAAU,aAAa;IAC3B,MAAM,iBAAiB,GAAG,QAAQ,CAAC,aAAa,CAAoB,cAAc,CAAC,CAAC;IAEpF,IAAI,iBAAiB,KAAK,IAAI,EAAE,CAAC;QAChC,iBAAiB,CAAC,gBAAgB,CAAC,OAAO,EAAE,KAAK,IAAI,EAAE;YACtD,MAAM,WAAW,EAAE,CAAC;QACrB,CAAC,CAAC,CAAC;IACJ,CAAC;IAED,MAAM,iBAAiB,EAAE,CAAC;AAC3B,CAAC","sources":["webpack://openfin-web--web-interop-support-context-and-intents/./node_modules/@openfin/core-web/out/api-client.js","webpack://openfin-web--web-interop-support-context-and-intents/./node_modules/@openfin/core-web/out/main-8cad4070.js","webpack://openfin-web--web-interop-support-context-and-intents/./node_modules/@openfin/core-web/out/main-b14f67c9.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/base64-js/index.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/buffer/index.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/events/events.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/ieee754/index.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_DataView.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_Hash.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_ListCache.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_Map.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_MapCache.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_Promise.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_Set.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_SetCache.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_Stack.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_Symbol.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_Uint8Array.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_WeakMap.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_arrayEach.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_arrayFilter.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_arrayLikeKeys.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_arrayPush.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_arraySome.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_assignValue.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_assocIndexOf.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseAssign.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseAssignIn.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseAssignValue.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseClone.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseCreate.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseGetAllKeys.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseGetTag.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseIsArguments.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseIsEqual.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseIsEqualDeep.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseIsMap.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseIsNative.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseIsSet.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseIsTypedArray.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseKeys.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseKeysIn.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseTimes.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseUnary.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_cacheHas.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_cloneArrayBuffer.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_cloneBuffer.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_cloneDataView.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_cloneRegExp.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_cloneSymbol.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_cloneTypedArray.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_copyArray.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_copyObject.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_copySymbols.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_copySymbolsIn.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_coreJsData.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_defineProperty.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_equalArrays.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_equalByTag.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_equalObjects.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_freeGlobal.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_getAllKeys.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_getAllKeysIn.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_getMapData.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_getNative.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_getPrototype.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_getRawTag.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_getSymbols.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_getSymbolsIn.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_getTag.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_getValue.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_hashClear.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_hashDelete.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_hashGet.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_hashHas.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_hashSet.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_initCloneArray.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_initCloneByTag.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_initCloneObject.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_isIndex.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_isKeyable.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_isMasked.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_isPrototype.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_listCacheClear.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_listCacheDelete.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_listCacheGet.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_listCacheHas.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_listCacheSet.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_mapCacheClear.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_mapCacheDelete.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_mapCacheGet.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_mapCacheHas.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_mapCacheSet.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_mapToArray.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_nativeCreate.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_nativeKeys.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_nativeKeysIn.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_nodeUtil.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_objectToString.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_overArg.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_root.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_setCacheAdd.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_setCacheHas.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_setToArray.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_stackClear.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_stackDelete.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_stackGet.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_stackHas.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_stackSet.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_toSource.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/cloneDeep.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/eq.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/isArguments.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/isArray.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/isArrayLike.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/isBuffer.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/isEqual.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/isFunction.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/isLength.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/isMap.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/isObject.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/isObjectLike.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/isSet.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/isTypedArray.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/keys.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/keysIn.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/stubArray.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/stubFalse.js","webpack://openfin-web--web-interop-support-context-and-intents/./client/src/content/api.ts","webpack://openfin-web--web-interop-support-context-and-intents/./client/src/platform/settings/settings.ts","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/index.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/md5.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/nil.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/parse.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/regex.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/rng.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/sha1.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/stringify.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/v1.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/v3.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/v35.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/v4.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/v5.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/validate.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/version.js","webpack://openfin-web--web-interop-support-context-and-intents/webpack/bootstrap","webpack://openfin-web--web-interop-support-context-and-intents/webpack/runtime/define property getters","webpack://openfin-web--web-interop-support-context-and-intents/webpack/runtime/global","webpack://openfin-web--web-interop-support-context-and-intents/webpack/runtime/hasOwnProperty shorthand","webpack://openfin-web--web-interop-support-context-and-intents/webpack/runtime/make namespace object","webpack://openfin-web--web-interop-support-context-and-intents/webpack/runtime/node module decorator","webpack://openfin-web--web-interop-support-context-and-intents/./client/src/content/interop-intent-view.ts"],"sourcesContent":["\"use strict\";var e=require(\"./main-8cad4070.js\");require(\"buffer/\"),require(\"uuid\"),require(\"events\"),require(\"lodash/cloneDeep\"),require(\"lodash/isEqual\"),exports.connect=e.connect;\n","\"use strict\";var e=require(\"buffer/\"),t=require(\"events\"),n=require(\"lodash/cloneDeep\"),i=require(\"lodash/isEqual\"),r=require(\"uuid\");const o=(e,t)=>`${t}<${btoa(JSON.stringify(e))}>`;var s=\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof window?window:\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:{},a={},c={},d={},h={};async function l(e){const t=[];for(const n of e){const e=await n();t.push(e)}return t}Object.defineProperty(h,\"__esModule\",{value:!0}),h.promiseMapSerial=h.serial=h.promiseMap=h.promisify=void 0,h.promisify=function(e){return(...t)=>new Promise(((n,i)=>{e(...t,((e,t)=>e?i(e):n(t)))}))},h.promiseMap=async function(e,t){return Promise.all(e.map(t))},h.serial=l,h.promiseMapSerial=async function(e,t){return l(e.map(((e,n,i)=>()=>t(e,n,i))))};var u,p=s&&s.__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},w=s&&s.__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)};Object.defineProperty(d,\"__esModule\",{value:!0}),d.Reply=d.EmitterBase=d.Base=void 0;const y=h;class f{constructor(e){this.isNodeEnvironment=()=>\"node\"===this.wire.environment.type,this.isOpenFinEnvironment=()=>\"openfin\"===this.wire.environment.type,this.isBrowserEnvironment=()=>\"other\"===this.wire.environment.type,this.wire=e}get fin(){return this.wire.getFin()}get me(){return this.wire.me}}d.Base=f;d.EmitterBase=class extends f{constructor(e,t,...n){super(e),this.topic=t,u.set(this,void 0),this.eventNames=()=>this.hasEmitter()?this.getOrCreateEmitter().eventNames():[],this.emit=(e,t,...n)=>!!this.hasEmitter()&&this.getOrCreateEmitter().emit(e,t,...n),this.hasEmitter=()=>this.wire.eventAggregator.has(w(this,u,\"f\")),this.getOrCreateEmitter=()=>this.wire.eventAggregator.getOrCreate(w(this,u,\"f\")),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[],this.listenerCount=e=>this.hasEmitter()?this.getOrCreateEmitter().listenerCount(e):0,this.registerEventListener=async(e,t={},n,i)=>{const r={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e},o=this.getOrCreateEmitter();n(o);try{await this.wire.sendAction(\"subscribe-to-desktop-event\",r)}catch(e){throw i(o),this.deleteEmitterIfNothingRegistered(o),e}},this.deregisterEventListener=async(e,t={})=>{if(this.hasEmitter()){const n={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e};await this.wire.sendAction(\"unsubscribe-to-desktop-event\",n).catch((()=>null));return this.getOrCreateEmitter()}return Promise.resolve()},p(this,u,[t,...n],\"f\"),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[]}async on(e,t,n){return await this.registerEventListener(e,n,(n=>{n.on(e,t)}),(n=>{n.removeListener(e,t)})),this}async addListener(e,t,n){return this.on(e,t,n)}async once(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.once(e,i),n.once(e,t)}),(n=>{n.removeListener(e,i),n.removeListener(e,t)})),this}async prependListener(e,t,n){return await this.registerEventListener(e,n,(n=>{n.prependListener(e,t)}),(n=>{n.removeListener(e,t)})),this}async prependOnceListener(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.prependOnceListener(e,t),n.once(e,i)}),(n=>{n.removeListener(e,t),n.removeListener(e,i)})),this}async removeListener(e,t,n){const i=await this.deregisterEventListener(e,n);return i&&(i.removeListener(e,t),this.deleteEmitterIfNothingRegistered(i)),this}async deregisterAllListeners(e){const t={...this.identity,type:e,topic:this.topic};if(this.hasEmitter()){const e=this.getOrCreateEmitter(),n=e.listenerCount(t.type),i=[];for(let e=0;enull)));return await Promise.all(i),e}}async removeAllListeners(e){const t=async e=>{const t=await this.deregisterAllListeners(e);t&&(t.removeAllListeners(e),this.deleteEmitterIfNothingRegistered(t))};if(e)await t(e);else if(this.hasEmitter()){const e=this.getOrCreateEmitter().eventNames();await(0,y.promiseMap)(e,t)}return this}deleteEmitterIfNothingRegistered(e){0===e.eventNames().length&&this.wire.eventAggregator.delete(w(this,u,\"f\"))}},u=new WeakMap;d.Reply=class{};var g={};Object.defineProperty(g,\"__esModule\",{value:!0});var m=g.RuntimeError=g.NotSupportedError=g.NotImplementedError=g.NoAckError=g.DuplicateCorrelationError=g.UnexpectedActionError=g.DisconnectedError=void 0;class v extends Error{constructor(e){super(`Expected websocket state OPEN but found ${e}`),this.readyState=e}}g.DisconnectedError=v;class C extends Error{}g.UnexpectedActionError=C;class b extends Error{}g.DuplicateCorrelationError=b;class I extends Error{}g.NoAckError=I;class E extends Error{}g.NotImplementedError=E;class x extends Error{}g.NotSupportedError=x;class A extends Error{constructor(e){const{message:t,name:n,stack:i,...r}=e;super(t),this.name=n||\"Error\",this.stack=i??this.toString(),Object.keys(r).forEach((e=>{this[e]=r[e]}))}}class P extends Error{static getCallSite(e=0){const t=Error.stackTraceLimit,n=e+1;Error.stackTraceLimit=t+n;const i=Error.prepareStackTrace;Error.prepareStackTrace=(e,t)=>t;const r=(new Error).stack?.slice(n)??[];return Error.prepareStackTrace=i,Error.stackTraceLimit=t,r}static prepareStackTrace(e,t){if(\"function\"==typeof Error.prepareStackTrace)return Error.prepareStackTrace(e,t);let n=\"\";n+=e.name||\"Error\",n+=`: ${e.message||\"\"}`;for(const e of t)n+=`\\n at ${e.toString()}`;return n}constructor(e,t){const{reason:n,error:i}=e;super(n),this.name=\"RuntimeError\",i?.stack&&(this.cause=new A(i)),t&&(this.stack=P.prepareStackTrace(this,t))}}m=g.RuntimeError=P;var M={},_={},O={};Object.defineProperty(O,\"__esModule\",{value:!0}),O.validateIdentity=void 0,O.validateIdentity=function(e){let t;return\"object\"==typeof e&&\"string\"==typeof e.uuid||(t=\"Not a valid identity object\"),t};var S={},R={},F={},j={},k={},L={},T={};Object.defineProperty(T,\"__esModule\",{value:!0}),T.handleDeprecatedWarnings=void 0;var $;T.handleDeprecatedWarnings=e=>{(e.contentNavigation?.whitelist||e.contentNavigation?.blacklist||e.contentRedirect?.whitelist||e.contentRedirect?.blacklist)&&console.warn(\"The properties 'whitelist' and 'blacklist' have been marked as deprecated and will be removed in a future version. Please use 'allowlist' and 'denylist'.\")};var B={},G={};Object.defineProperty(G,\"__esModule\",{value:!0}),G.AsyncRetryableLazy=W=G.Lazy=void 0;var W=G.Lazy=class{constructor(e){this.producerFn=e}getValue(){return this.value||(this.value=this.producerFn()),this.value}};G.AsyncRetryableLazy=class{constructor(e){this.producerFn=e}async getValue(){return this.promise||(this.promise=this.producerFn().catch((e=>{throw delete this.promise,e}))),this.promise}};var H={};Object.defineProperty(H,\"__esModule\",{value:!0}),H.WebContents=void 0;const N=d;class D extends N.EmitterBase{constructor(e,t,n){super(e,n,t.uuid,t.name),this.identity=t,this.entityType=n}capturePage(e){return this.wire.sendAction(\"capture-page\",{options:e,...this.identity}).then((({payload:e})=>e.data))}executeJavaScript(e){return this.wire.sendAction(\"execute-javascript-in-window\",{...this.identity,code:e}).then((({payload:e})=>e.data))}getZoomLevel(){return this.wire.sendAction(\"get-zoom-level\",this.identity).then((({payload:e})=>e.data))}setZoomLevel(e){return this.wire.sendAction(\"set-zoom-level\",{...this.identity,level:e}).then((()=>{}))}navigate(e){return this.wire.sendAction(\"navigate-window\",{...this.identity,url:e}).then((()=>{}))}navigateBack(){return this.wire.sendAction(\"navigate-window-back\",{...this.identity}).then((()=>{}))}async navigateForward(){await this.wire.sendAction(\"navigate-window-forward\",{...this.identity})}stopNavigation(){return this.wire.sendAction(\"stop-window-navigation\",{...this.identity}).then((()=>{}))}reload(e=!1){return this.wire.sendAction(\"reload-window\",{ignoreCache:e,...this.identity}).then((()=>{}))}print(e={}){return this.wire.sendAction(\"print\",{...this.identity,options:e}).then((()=>{}))}findInPage(e,t){return this.wire.sendAction(\"find-in-page\",{...this.identity,searchTerm:e,options:t}).then((({payload:e})=>e.data))}stopFindInPage(e){return this.wire.sendAction(\"stop-find-in-page\",{...this.identity,action:e}).then((()=>{}))}getPrinters(){return this.wire.sendAction(\"get-printers\",{...this.identity}).then((({payload:e})=>e.data))}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){await this.wire.sendAction(\"focus-window\",{emitSynthFocused:e,...this.identity})}async showDeveloperTools(){await this.wire.sendAction(\"show-developer-tools\",this.identity)}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction(\"get-process-info\",this.identity);return e}async getSharedWorkers(){return this.wire.sendAction(\"get-shared-workers\",this.identity).then((({payload:e})=>e.data))}async inspectSharedWorker(){await this.wire.sendAction(\"inspect-shared-worker\",{...this.identity})}async inspectSharedWorkerById(e){await this.wire.sendAction(\"inspect-shared-worker-by-id\",{...this.identity,workerId:e})}async inspectServiceWorker(){await this.wire.sendAction(\"inspect-service-worker\",{...this.identity})}async showPopupWindow(e){if(this.wire.sendAction(`${this.entityType}-show-popup-window`,this.identity).catch((()=>{})),e?.onPopupReady){const t=async({popupName:t})=>{try{const n=this.fin.Window.wrapSync({uuid:this.fin.me.uuid,name:t});await e.onPopupReady(n)}catch(e){throw new Error(`Something went wrong during onPopupReady execution: ${e}`)}};await this.once(\"popup-ready\",t)}const{payload:t}=await this.wire.sendAction(\"try-create-popup-window\",{options:{...e,hasResultCallback:!!e?.onPopupResult,hasReadyCallback:!!e?.onPopupReady},...this.identity}),{data:{willOpen:n,options:i}}=t;n&&await this.fin.Window.create(i.initialOptions);if(e?.onPopupResult){const t=async t=>{await e.onPopupResult((e=>{const{name:t,uuid:n,result:i,data:r}=e,o={identity:{name:t,uuid:n},result:i};return r&&(o.data=r),o})(t))},n=async()=>{await this.removeListener(\"popup-result\",t)};await this.on(\"popup-result\",t),await this.once(\"popup-teardown\",n)}const{payload:r}=await this.wire.sendAction(\"show-popup-window\",{options:i,...this.identity});return r.data}}var U,V,z,K,q;function J(){return V||(V=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(function(){if($)return L;$=1,Object.defineProperty(L,\"__esModule\",{value:!0}),L.ViewModule=void 0;const e=d,t=O,n=J(),i=T;class r extends e.Base{async create(e){const{uuid:t}=this.wire.me;if(!e.name||\"string\"!=typeof e.name)throw new Error(\"Please provide a name property as a string in order to create a View.\");return(0,i.handleDeprecatedWarnings)(e),this.wire.environment.childViews?await this.wire.environment.createChildContent({entityType:\"view\",options:{...e,uuid:t}}):await this.wire.sendAction(\"create-view\",{...e,uuid:t}),this.wrapSync({uuid:t,name:e.name})}async wrap(e){this.wire.sendAction(\"view-wrap\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}wrapSync(e){this.wire.sendAction(\"view-wrap-sync\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}getCurrent(){if(this.wire.sendAction(\"view-get-current\").catch((e=>{})),!this.wire.me.isView)throw new Error(\"You are not in a View context\");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction(\"view-get-current-sync\").catch((e=>{})),!this.wire.me.isView)throw new Error(\"You are not in a View context\");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return L.ViewModule=r,L}(),e),n(function(){if(U)return B;var e;U=1,Object.defineProperty(B,\"__esModule\",{value:!0}),B.View=void 0;const t=g,n=G,i=H,r=ie();class o extends i.WebContents{constructor(i,o){super(i,o,\"view\"),this.identity=o,e.set(this,new n.Lazy((()=>this.fin.Platform.wrapSync(this.identity).getClient()))),this.attach=async e=>{await this.wire.sendAction(\"attach-view\",{target:e,...this.identity})},this.destroy=async()=>{await this.wire.sendAction(\"destroy-view\",{...this.identity})},this.show=async()=>{await this.wire.sendAction(\"show-view\",{...this.identity})},this.showAt=async(e,t={})=>{await this.wire.sendAction(\"show-view-at\",{bounds:e,...this.identity,options:t})},this.bringToFront=async()=>{await this.wire.sendAction(\"bring-view-to-front\",{...this.identity})},this.hide=async()=>{await this.wire.sendAction(\"hide-view\",{...this.identity})},this.setBounds=async e=>{await this.wire.sendAction(\"set-view-bounds\",{bounds:e,...this.identity})},this.getBounds=async()=>(await this.wire.sendAction(\"get-view-bounds\",{...this.identity})).payload.data,this.getInfo=async()=>(await this.wire.sendAction(\"get-view-info\",{...this.identity})).payload.data,this.getParentLayout=async()=>(this.wire.sendAction(\"view-get-parent-layout\",{...this.identity}).catch((()=>{})),this.fin.Platform.Layout.getLayoutByViewIdentity(this.identity)),this.getOptions=async()=>this.wire.sendAction(\"get-view-options\",{...this.identity}).then((({payload:e})=>e.data)),this.updateOptions=async e=>this.wire.sendAction(\"update-view-options\",{options:e,...this.identity}).then((()=>{})),this.getCurrentWindow=async()=>{const{payload:{data:e}}=await this.wire.sendAction(\"get-view-window\",{...this.identity});return new r._Window(this.wire,e)},this.getCurrentStack=async()=>{this.wire.sendAction(\"view-get-current-stack\").catch((()=>{}));try{return(await this.getParentLayout()).getStackByViewIdentity(this.identity)}catch(e){throw new t.RuntimeError({reason:\"This view does not belong to a stack.\",error:e})}},this.triggerBeforeUnload=async()=>(await this.wire.sendAction(\"trigger-before-unload\",{...this.identity})).payload.data,this.bindToElement=async e=>{if(!e)throw new Error(\"Element not found.\");return this.wire.environment.observeBounds(e,(async e=>this.setBounds(e)))}}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){const t=await this.getCurrentWindow();await t.focusedWebViewWasChanged(),await super.focus({emitSynthFocused:e})}}return B.View=o,e=new WeakMap,B}(),e)}(k)),k}function Y(){if(z)return j;z=1,Object.defineProperty(j,\"__esModule\",{value:!0}),j.Application=void 0;const e=d,t=ie(),n=J();class i extends e.EmitterBase{constructor(e,n){super(e,\"application\",n.uuid),this.identity=n,this.window=new t._Window(this.wire,{uuid:this.identity.uuid,name:this.identity.uuid})}windowListFromIdentityList(e){const n=[];return e.forEach((e=>{n.push(new t._Window(this.wire,{uuid:e.uuid,name:e.name}))})),n}isRunning(){return this.wire.sendAction(\"is-application-running\",this.identity).then((({payload:e})=>e.data))}async quit(e=!1){try{await this._close(e),await this.wire.sendAction(\"destroy-application\",{force:e,...this.identity})}catch(e){if(![\"Remote connection has closed\",\"Could not locate the requested application\"].some((t=>e.message.includes(t))))throw e}}async _close(e=!1){try{await this.wire.sendAction(\"close-application\",{force:e,...this.identity})}catch(e){if(!e.message.includes(\"Remote connection has closed\"))throw e}}close(e=!1){return console.warn(\"Deprecation Warning: Application.close is deprecated Please use Application.quit\"),this.wire.sendAction(\"application-close\",this.identity).catch((e=>{})),this._close(e)}getChildWindows(){return this.wire.sendAction(\"get-child-windows\",this.identity).then((({payload:e})=>{const t=[];return e.data.forEach((e=>{t.push({uuid:this.identity.uuid,name:e})})),this.windowListFromIdentityList(t)}))}getManifest(){return this.wire.sendAction(\"get-application-manifest\",this.identity).then((({payload:e})=>e.data))}getParentUuid(){return this.wire.sendAction(\"get-parent-application\",this.identity).then((({payload:e})=>e.data))}getShortcuts(){return this.wire.sendAction(\"get-shortcuts\",this.identity).then((({payload:e})=>e.data))}async getViews(){const{payload:e}=await this.wire.sendAction(\"application-get-views\",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}getZoomLevel(){return this.wire.sendAction(\"get-application-zoom-level\",this.identity).then((({payload:e})=>e.data))}getWindow(){return this.wire.sendAction(\"application-get-window\",this.identity).catch((e=>{})),Promise.resolve(this.window)}registerUser(e,t){return this.wire.sendAction(\"register-user\",{userName:e,appName:t,...this.identity}).then((()=>{}))}removeTrayIcon(){return this.wire.sendAction(\"remove-tray-icon\",this.identity).then((()=>{}))}restart(){return this.wire.sendAction(\"restart-application\",this.identity).then((()=>{}))}run(){return console.warn(\"Deprecation Warning: Application.run is deprecated Please use fin.Application.start\"),this.wire.sendAction(\"application-run\",this.identity).catch((e=>{})),this._run()}_run(e={}){return this.wire.sendAction(\"run-application\",{manifestUrl:this._manifestUrl,opts:e,...this.identity}).then((()=>{}))}scheduleRestart(){return this.wire.sendAction(\"relaunch-on-close\",this.identity).then((()=>{}))}async sendApplicationLog(){const{payload:e}=await this.wire.sendAction(\"send-application-log\",this.identity);return e.data}async setJumpList(e){await this.wire.sendAction(\"set-jump-list\",{config:e,...this.identity})}setTrayIcon(e){return this.wire.sendAction(\"set-tray-icon\",{enabledIcon:e,...this.identity}).then((()=>{}))}setShortcuts(e){return this.wire.sendAction(\"set-shortcuts\",{data:e,...this.identity}).then((()=>{}))}async setShortcutQueryParams(e){await this.wire.sendAction(\"set-shortcut-query-args\",{data:e,...this.identity})}setZoomLevel(e){return this.wire.sendAction(\"set-application-zoom-level\",{level:e,...this.identity}).then((()=>{}))}async setAppLogUsername(e){await this.wire.sendAction(\"set-app-log-username\",{data:e,...this.identity})}getTrayIconInfo(){return this.wire.sendAction(\"get-tray-icon-info\",this.identity).then((({payload:e})=>e.data))}hasTrayIcon(){return this.wire.sendAction(\"has-tray-icon\",this.identity).then((({payload:e})=>e.data))}terminate(){return this.wire.sendAction(\"terminate-application\",this.identity).then((()=>{}))}wait(){return this.wire.sendAction(\"wait-for-hung-application\",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction(\"get-info\",this.identity).then((({payload:e})=>e.data))}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction(\"application-get-process-info\",this.identity);return e}async setFileDownloadLocation(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t};await this.wire.sendAction(\"set-file-download-location\",{...n,downloadLocation:e})}async getFileDownloadLocation(){const{payload:{data:e}}=await this.wire.sendAction(\"get-file-download-location\",this.identity);return e}async showTrayIconPopupMenu(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t},{payload:i}=await this.wire.sendAction(\"show-tray-icon-popup-menu\",{...n,options:e});return i.data}async closeTrayIconPopupMenu(){const{name:e}=this.wire.me,t={uuid:this.identity.uuid,name:e};await this.wire.sendAction(\"close-tray-icon-popup-menu\",{...t})}}return j.Application=i,j}function Z(){return q||(q=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(function(){if(K)return F;K=1,Object.defineProperty(F,\"__esModule\",{value:!0}),F.ApplicationModule=void 0;const e=d,t=O,n=Y();class i extends e.Base{async wrap(e){this.wire.sendAction(\"wrap-application\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}wrapSync(e){this.wire.sendAction(\"wrap-application-sync\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}async _create(e){return void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&void 0===e.isPlatformController&&(e.autoShow=!0),await this.wire.sendAction(\"create-application\",e),this.wrap({uuid:e.uuid})}create(e){return console.warn(\"Deprecation Warning: fin.Application.create is deprecated. Please use fin.Application.start\"),this.wire.sendAction(\"application-create\").catch((e=>{})),this._create(e)}async start(e){this.wire.sendAction(\"start-application\").catch((e=>{}));const t=await this._create(e);return await this.wire.sendAction(\"run-application\",{uuid:e.uuid}),t}async startManyManifests(e,t){return this.wire.sendAction(\"run-applications\",{applications:e,opts:t}).then((()=>{}))}getCurrent(){return this.wire.sendAction(\"get-current-application\").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction(\"get-current-application-sync\").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}async startFromManifest(e,t){this.wire.sendAction(\"application-start-from-manifest\").catch((e=>{}));const n=await this._createFromManifest(e);return await n._run(t),n}createFromManifest(e){return console.warn(\"Deprecation Warning: fin.Application.createFromManifest is deprecated. Please use fin.Application.startFromManifest\"),this.wire.sendAction(\"application-create-from-manifest\").catch((e=>{})),this._createFromManifest(e)}_createFromManifest(e){return this.wire.sendAction(\"get-application-manifest\",{manifestUrl:e}).then((({payload:e})=>{const t=e.data.platform?e.data.platform.uuid:e.data.startup_app.uuid;return this.wrap({uuid:t})})).then((t=>(t._manifestUrl=e,t)))}}return F.ApplicationModule=i,F}(),e),n(Y(),e)}(R)),R}H.WebContents=D;var Q={};Object.defineProperty(Q,\"__esModule\",{value:!0}),Q.promisifySubscription=void 0;var X,ee,te;function ne(){if(X)return S;X=1,Object.defineProperty(S,\"__esModule\",{value:!0}),S._Window=void 0;const e=Z(),t=H,n=J(),i=T,r=Q;class o extends t.WebContents{constructor(e,t){super(e,t,\"window\")}async createWindow(e){this.wire.sendAction(\"window-create-window\",this.identity).catch((e=>{}));const t=await(0,r.promisifySubscription)(this,\"fire-constructor-callback\");void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&(e.autoShow=!0),(0,i.handleDeprecatedWarnings)(e);const n=this.wire.environment.createChildContent({entityType:\"window\",options:e}),[o]=await Promise.all([t.getValue(),n]);let s;const{success:a}=o,c=o.data,{message:d}=c;s=a?{httpResponseCode:c.httpResponseCode,apiInjected:c.apiInjected}:{message:c.message,networkErrorCode:c.networkErrorCode,stack:c.stack};const h={message:d,cbPayload:s,success:a};try{this.getWebWindow().fin.__internal_.openerSuccessCBCalled()}catch(e){}return h.success?this:Promise.reject(h)}getAllFrames(){return this.wire.sendAction(\"get-all-frames\",this.identity).then((({payload:e})=>e.data))}getBounds(){return this.wire.sendAction(\"get-window-bounds\",this.identity).then((({payload:e})=>e.data))}center(){return this.wire.sendAction(\"center-window\",this.identity).then((()=>{}))}blur(){return this.wire.sendAction(\"blur-window\",this.identity).then((()=>{}))}bringToFront(){return this.wire.sendAction(\"bring-window-to-front\",this.identity).then((()=>{}))}animate(e,t){return this.wire.sendAction(\"animate-window\",{transitions:e,options:t,...this.identity}).then((()=>{}))}hide(){return this.wire.sendAction(\"hide-window\",this.identity).then((()=>{}))}close(e=!1){return this.wire.sendAction(\"close-window\",{force:e,...this.identity}).then((()=>{Object.setPrototypeOf(this,null)}))}focusedWebViewWasChanged(){return this.wire.sendAction(\"focused-webview-changed\",this.identity).then((()=>{}))}getNativeId(){return this.wire.sendAction(\"get-window-native-id\",this.identity).then((({payload:e})=>e.data))}async getCurrentViews(){const{payload:e}=await this.wire.sendAction(\"window-get-views\",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}disableFrame(){return console.warn(\"Function is deprecated; use disableUserMovement instead.\"),this.wire.sendAction(\"disable-window-frame\",this.identity).then((()=>{}))}disableUserMovement(){return this.wire.sendAction(\"disable-window-frame\",this.identity).then((()=>{}))}enableFrame(){return console.warn(\"Function is deprecated; use enableUserMovement instead.\"),this.wire.sendAction(\"enable-window-frame\",this.identity).then((()=>{}))}enableUserMovement(){return this.wire.sendAction(\"enable-window-frame\",this.identity).then((()=>{}))}flash(){return this.wire.sendAction(\"flash-window\",this.identity).then((()=>{}))}stopFlashing(){return this.wire.sendAction(\"stop-flash-window\",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction(\"get-window-info\",this.identity).then((({payload:e})=>e.data))}async getLayout(e){this.wire.sendAction(\"window-get-layout\",this.identity).catch((e=>{}));const t=await this.getOptions();if(!t.layout&&!t.layoutSnapshot)throw new Error(\"Window does not have a Layout\");return this.fin.Platform.Layout.wrap(e??this.identity)}getOptions(){return this.wire.sendAction(\"get-window-options\",this.identity).then((({payload:e})=>e.data))}getParentApplication(){return this.wire.sendAction(\"window-get-parent-application\",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity))}getParentWindow(){return this.wire.sendAction(\"window-get-parent-window\",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity)).then((e=>e.getWindow()))}async getSnapshot(e){const t={area:e,...this.identity};console.warn(\"Window.getSnapshot has been deprecated, please use Window.capturePage\");return(await this.wire.sendAction(\"get-window-snapshot\",t)).payload.data}getState(){return this.wire.sendAction(\"get-window-state\",this.identity).then((({payload:e})=>e.data))}getWebWindow(){return this.wire.sendAction(\"window-get-web-window\",this.identity).catch((e=>{})),this.wire.environment.getWebWindow(this.identity)}isMainWindow(){return this.wire.sendAction(\"window-is-main-window\",this.identity).catch((e=>{})),this.me.uuid===this.me.name}isShowing(){return this.wire.sendAction(\"is-window-showing\",this.identity).then((({payload:e})=>e.data))}maximize(){return this.wire.sendAction(\"maximize-window\",this.identity).then((()=>{}))}minimize(){return this.wire.sendAction(\"minimize-window\",this.identity).then((()=>{}))}moveBy(e,t,n){return this.wire.sendAction(\"move-window-by\",{deltaLeft:e,deltaTop:t,positioningOptions:n,...this.identity}).then((()=>{}))}moveTo(e,t,n){return this.wire.sendAction(\"move-window\",{left:e,top:t,positioningOptions:n,...this.identity}).then((()=>{}))}resizeBy(e,t,n,i){return this.wire.sendAction(\"resize-window-by\",{deltaWidth:Math.floor(e),deltaHeight:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}resizeTo(e,t,n,i){return this.wire.sendAction(\"resize-window\",{width:Math.floor(e),height:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}restore(){return this.wire.sendAction(\"restore-window\",this.identity).then((()=>{}))}setAsForeground(){return this.wire.sendAction(\"set-foreground-window\",this.identity).then((()=>{}))}setBounds(e,t){return this.wire.sendAction(\"set-window-bounds\",{...e,...this.identity,positioningOptions:t}).then((()=>{}))}show(e=!1){return this.wire.sendAction(\"show-window\",{force:e,...this.identity}).then((()=>{}))}showAt(e,t,n=!1){return this.wire.sendAction(\"show-at-window\",{force:n,left:Math.floor(e),top:Math.floor(t),...this.identity}).then((()=>{}))}updateOptions(e){return this.wire.sendAction(\"update-window-options\",{options:e,...this.identity}).then((()=>{}))}authenticate(e,t){return this.wire.sendAction(\"window-authenticate\",{userName:e,password:t,...this.identity}).then((()=>{}))}async showPopupMenu(e){const{payload:t}=await this.wire.sendAction(\"show-popup-menu\",{options:e,...this.identity});return t.data}async closePopupMenu(){return this.wire.sendAction(\"close-popup-menu\",{...this.identity}).then((()=>{}))}async dispatchPopupResult(e){this.wire.sendAction(\"window-dispatch-popup-result\",this.identity).catch((e=>{})),await this.wire.sendAction(\"dispatch-popup-result\",{data:e,...this.identity})}async print(e={content:\"self\"}){switch(e.content){case void 0:case\"self\":return super.print(e);case\"screenshot\":return this.wire.sendAction(\"print-screenshot\",this.identity).then((()=>{}));case\"views\":return this.wire.sendAction(\"print-views\",{...this.identity,options:e}).then((()=>{}));default:return}}}return S._Window=o,S}function ie(){return te||(te=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(function(){if(ee)return _;ee=1,Object.defineProperty(_,\"__esModule\",{value:!0}),_._WindowModule=void 0;const e=d,t=O,n=ne();class i extends e.Base{async wrap(e){this.wire.sendAction(\"window-wrap\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}wrapSync(e){this.wire.sendAction(\"window-wrap-sync\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}create(e){return this.wire.sendAction(\"create-window\").catch((e=>{})),new n._Window(this.wire,{uuid:this.me.uuid,name:e.name}).createWindow(e)}getCurrent(){if(this.wire.sendAction(\"get-current-window\").catch((e=>{})),!this.wire.me.isWindow)throw new Error(\"You are not in a Window context\");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction(\"get-current-window-sync\").catch((e=>{})),!this.wire.me.isWindow)throw new Error(\"You are not in a Window context\");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return _._WindowModule=i,_}(),e),n(ne(),e)}(M)),M}Q.promisifySubscription=async(e,t,n=(()=>!0),i)=>{let r,o,s;const a=new Promise(((e,t)=>{r=e,o=t})),c=e=>{n(e)&&(clearTimeout(s),r(e))};return await e.on(t,c),i&&(s=setTimeout((()=>o(new Error(\"event timed out\"))),i)),a.finally((()=>{e.removeListener(t,c).catch((()=>null))})),{getValue:()=>a}},Object.defineProperty(c,\"__esModule\",{value:!0}),c.System=void 0;const re=d,oe=g,se=ie(),ae=t;class ce extends re.EmitterBase{constructor(e){super(e,\"system\")}sendExternalProcessRequest(e,t){return new Promise(((n,i)=>{const r=\"external-process-exited\";let o,s,a,c;\"function\"==typeof t.listener&&(a=e=>{const n=e||{};s={topic:\"exited\",uuid:n.processUuid||\"\",exitCode:n.exitCode||0},o===e.processUuid&&(t.listener(s),c.removeListener(r,a))},this.wire.me.name||(this.wire.me.name=this.wire.me.uuid),c=new se._Window(this.wire,this.wire.me),c.on(r,a)),this.wire.sendAction(e,t).then((({payload:e})=>{o=e.data.uuid,n(e.data),s&&o===s.uuid&&(t.listener(s),c.removeListener(r,a))})).catch((e=>{c&&c.removeListener(r,a),i(e)}))}))}getVersion(){return this.wire.sendAction(\"get-version\").then((({payload:e})=>e.data))}clearCache(e){return this.wire.sendAction(\"clear-cache\",e).then((()=>{}))}deleteCacheOnExit(){return this.wire.sendAction(\"delete-cache-request\").then((()=>{}))}exit(){return this.wire.sendAction(\"exit-desktop\").then((()=>{}))}async fetchManifest(e){const{payload:{data:t}}=await this.wire.sendAction(\"fetch-manifest\",{manifestUrl:e});return t}flushCookieStore(){return this.wire.sendAction(\"flush-cookie-store\").then((()=>{}))}getAllWindows(){return this.wire.sendAction(\"get-all-windows\").then((({payload:e})=>e.data))}getAllApplications(){return this.wire.sendAction(\"get-all-applications\").then((({payload:e})=>e.data))}getCommandLineArguments(){return this.wire.sendAction(\"get-command-line-arguments\").then((({payload:e})=>e.data))}async getCrashReporterState(){const{payload:{data:{diagnosticMode:e,isRunning:t}}}=await this.wire.sendAction(\"get-crash-reporter-state\");return console.warn(\"diagnosticMode property is deprecated. It will be removed in a future version\"),{diagnosticMode:e,diagnosticsMode:e,isRunning:t}}async startCrashReporter(e){const t=e,n={...t,diagnosticMode:t.diagnosticsMode||t.diagnosticMode},{payload:{data:{diagnosticMode:i,isRunning:r}}}=await this.wire.sendAction(\"start-crash-reporter\",n);return{diagnosticMode:i,diagnosticsMode:i,isRunning:r}}getUniqueUserId(){return this.wire.sendAction(\"get-unique-user-id\").then((({payload:e})=>e.data))}getEntityInfo(e,t){return this.wire.sendAction(\"get-entity-info\",{uuid:e,name:t}).then((({payload:e})=>e.data))}getEnvironmentVariable(e){return this.wire.sendAction(\"get-environment-variable\",{environmentVariables:e}).then((({payload:e})=>e.data))}getFocusedWindow(){return this.wire.sendAction(\"get-focused-window\").then((({payload:e})=>e.data))}async isAppCertified(e){const{payload:{data:{certifiedInfo:t}}}=await this.wire.sendAction(\"is-app-certified\",{manifestUrl:e});return t}getInstalledRuntimes(){return this.wire.sendAction(\"get-installed-runtimes\").then((({payload:e})=>e.data.runtimes))}async getInstalledApps(){const{payload:{data:{installedApps:e}}}=await this.wire.sendAction(\"get-installed-apps\");return e}getLog(e){return this.wire.sendAction(\"view-log\",e).then((({payload:e})=>e.data))}getMachineId(){return this.wire.sendAction(\"get-machine-id\").then((({payload:e})=>e.data))}getMinLogLevel(){return this.wire.sendAction(\"get-min-log-level\").then((({payload:e})=>e.data))}getLogList(){return this.wire.sendAction(\"list-logs\").then((({payload:e})=>e.data))}getMonitorInfo(){return this.wire.sendAction(\"get-monitor-info\").then((({payload:e})=>e.data))}getMousePosition(){return this.wire.sendAction(\"get-mouse-position\").then((({payload:e})=>e.data))}getProcessList(){return console.warn(\"System.getProcessList has been deprecated. Please consider using our new process APIs: Window.getProcessInfo, View.getProcessInfo, Application.getProcessInfo, System.getAllProcessInfo\"),this.wire.sendAction(\"process-snapshot\").then((({payload:e})=>e.data))}async getAllProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction(\"get-all-process-info\",this.identity);return e}getProxySettings(){return this.wire.sendAction(\"get-proxy-settings\").then((({payload:e})=>e.data))}getRuntimeInfo(){return this.wire.sendAction(\"get-runtime-info\").then((({payload:e})=>e.data))}getRvmInfo(){return this.wire.sendAction(\"get-rvm-info\").then((({payload:e})=>e.data))}getHostSpecs(){return this.wire.sendAction(\"get-host-specs\").then((({payload:e})=>e.data))}getOSInfo(){return this.wire.sendAction(\"get-os-info\").then((({payload:e})=>e.data))}launchExternalProcess(e){return this.sendExternalProcessRequest(\"launch-external-process\",e)}monitorExternalProcess(e){return this.sendExternalProcessRequest(\"monitor-external-process\",e)}log(e,t){return this.wire.sendAction(\"write-to-log\",{level:e,message:t}).then((()=>{}))}openUrlWithBrowser(e){return this.wire.sendAction(\"open-url-with-browser\",{url:e}).then((()=>{}))}async registerCustomProtocol(e){if(\"object\"!=typeof e)throw new Error(\"Must provide an object with a `protocolName` property having a string value.\");await this.wire.sendAction(\"register-custom-protocol\",e)}async unregisterCustomProtocol(e){await this.wire.sendAction(\"unregister-custom-protocol\",{protocolName:e})}async getCustomProtocolState(e){return this.wire.sendAction(\"get-custom-protocol-state\",{protocolName:e}).then((({payload:e})=>e.data))}releaseExternalProcess(e){return this.wire.sendAction(\"release-external-process\",{uuid:e}).then((()=>{}))}showDeveloperTools(e){return this.wire.sendAction(\"show-developer-tools\",e).then((()=>{}))}terminateExternalProcess(e){return this.wire.sendAction(\"terminate-external-process\",e).then((()=>{}))}updateProxySettings(e){return this.wire.sendAction(\"update-proxy\",e).then((()=>{}))}async downloadAsset(e,t){const n=()=>{};let i=n,r=n;const o=new Promise(((e,t)=>{i=e,r=t}));if(\"openfin\"!==this.wire.environment.type)throw new oe.NotSupportedError(\"downloadAsset only supported in an OpenFin Render process\");const s=oe.RuntimeError.getCallSite(),a=this.wire.environment.getNextMessageId().toString(),c=`asset-download-progress-${a}`,d=`asset-download-error-${a}`,h=`asset-download-complete-${a}`,l=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},u=()=>{this.removeListener(c,l)};await Promise.all([this.on(c,l),this.once(d,(e=>{u();const{reason:t,err:n}=e;r(new oe.RuntimeError({reason:t,error:n},s))})),this.once(h,(()=>{u(),i()}))]);const p=Object.assign(e,{downloadId:a});return await this.wire.sendAction(\"download-asset\",p).catch((e=>{throw u(),e})),o}downloadRuntime(e,t){const n=oe.RuntimeError.getCallSite();return new Promise(((i,r)=>{if(\"openfin\"!==this.wire.environment.type)return void r(new oe.NotSupportedError(\"downloadRuntime only supported in an OpenFin Render process\"));const o=this.wire.environment.getNextMessageId().toString(),s=`runtime-download-progress-${o}`,a=`runtime-download-error-${o}`,c=`runtime-download-complete-${o}`,d=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},h=()=>{this.removeListener(s,d)};this.on(s,d),this.once(a,(e=>{h();const{reason:t,err:i}=e;r(new oe.RuntimeError({reason:t,error:i},n))})),this.once(c,(()=>{h(),i()}));const l=Object.assign(e,{downloadId:o});this.wire.sendAction(\"download-runtime\",l).catch((e=>{h(),r(e)}))}))}downloadPreloadScripts(e){return this.wire.sendAction(\"download-preload-scripts\",{scripts:e}).then((({payload:e})=>e.data))}getAllExternalApplications(){return this.wire.sendAction(\"get-all-external-applications\").then((({payload:e})=>e.data))}getAppAssetInfo(e){return this.wire.sendAction(\"get-app-asset-info\",e).then((({payload:e})=>e.data))}getCookies(e){const t=this.wire.environment.getUrl(),n=Object.assign(e,{url:t});return this.wire.sendAction(\"get-cookies\",n).then((({payload:e})=>e.data))}setMinLogLevel(e){return this.wire.sendAction(\"set-min-log-level\",{level:e}).then((()=>{}))}resolveUuid(e){return this.wire.sendAction(\"resolve-uuid\",{entityKey:e}).then((({payload:e})=>e.data))}executeOnRemote(e,t){return t.requestingIdentity=e,this.wire.ferryAction(t)}readRegistryValue(e,t,n){return this.wire.sendAction(\"read-registry-value\",{rootKey:e,subkey:t,value:n}).then((({payload:e})=>e.data))}registerExternalConnection(e){return this.wire.sendAction(\"register-external-connection\",{uuid:e}).then((({payload:e})=>e.data))}async getServiceConfiguration(e){if(\"string\"!=typeof e.name)throw new Error(\"Must provide an object with a `name` property having a string value\");const{name:t}=e;return this.wire.sendAction(\"get-service-configuration\",{name:t}).then((({payload:e})=>e.data))}async getSystemAppConfig(e){if(\"string\"!=typeof e)throw new Error(\"Must provide a string value for name of system app\");return this.wire.sendAction(\"get-system-app-configuration\",{name:e}).then((({payload:e})=>e.data))}async registerShutdownHandler(e){this.wire.sendAction(\"system-register-shutdown-handler\").catch((e=>{}));const{uuid:t,name:n}=this.wire.me;this.on(\"system-shutdown\",(i=>{e({proceed:()=>{this.wire.environment.raiseEvent(\"application/system-shutdown-handled\",{uuid:t,name:n,topic:\"application\"})}})}))}runRvmHealthCheck(){return this.wire.sendAction(\"run-rvm-health-check\").then((({payload:e})=>e.data))}async launchManifest(e,t={}){const{subscribe:n,...i}=t,r=i;if(n){const e=new ae.EventEmitter;n(e);const t=\"app-version-progress\",i=\"runtime-status\",o=\"app-version-complete\",s=\"app-version-error\",a=this.wire.environment.getNextMessageId().toString();r.appVersionId=a;const c=[o,t,i,s],d=e=>{const{appVersionId:t,topic:n,type:i,...r}=e;return{...r,type:c.find((e=>i.includes(e)))}},h=t=>{const n=d(t);e.emit(n.type,n)},l=()=>{this.removeListener(`${t}.${a}`,h),this.removeListener(`${i}.${a}`,h),this.removeListener(`${o}.${a}`,h),this.removeListener(`${s}.${a}`,h),this.removeListener(`${o}.${a}`,l),this.removeListener(`${s}.${a}`,l)};await Promise.all([this.on(`${t}.${a}`,h),this.on(`${i}.${a}`,h),this.once(`${o}.${a}`,h),this.once(`${s}.${a}`,h),this.once(`${o}.${a}`,l),this.once(`${s}.${a}`,l)])}return(await this.wire.sendAction(\"launch-manifest\",{manifestUrl:e,opts:r})).payload.data.manifest}async queryPermissionForCurrentContext(e){const t={uuid:this.wire.me.uuid,name:this.wire.me.name};return(await this.wire.sendAction(\"query-permission-for-current-context\",{apiName:e,identity:t})).payload.data}async enableNativeWindowIntegrationProvider(e){const{payload:t}=await this.wire.sendAction(\"enable-native-window-integration-provider\",{permissions:e});return t.data}async registerUsage({data:e,type:t}){await this.wire.sendAction(\"register-usage\",{data:e,type:t})}async getPrinters(){const{payload:e}=await this.wire.sendAction(\"system-get-printers\");return e.data}async updateProcessLoggingOptions(e){await this.wire.sendAction(\"system-update-process-logging-options\",{options:e})}async getDomainSettings(){const{payload:{data:e}}=await this.wire.sendAction(\"get-domain-settings\",this.identity);return e}async setDomainSettings(e){await this.wire.sendAction(\"set-domain-settings\",{domainSettings:e,...this.identity})}async refreshExtensions(){const{payload:e}=await this.wire.sendAction(\"refresh-extensions\");return e.data}async getInstalledExtensions(){const{payload:e}=await this.wire.sendAction(\"get-installed-extensions\");return e.data}}c.System=ce;var de={},he={};Object.defineProperty(he,\"__esModule\",{value:!0}),he.RefCounter=void 0;he.RefCounter=class{constructor(){this.topicRefMap=new Map}incRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t+1;n=i,this.topicRefMap.set(e,i)}else this.topicRefMap.set(e,1),n=1;return n}decRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t-1;this.topicRefMap.set(e,i),n=i}else n=-1;return n}actOnFirst(e,t,n){return 1===this.incRefCount(e)?t():n()}actOnLast(e,t,n){return 0===this.decRefCount(e)?t():n()}};var le={},ue={},pe={};Object.defineProperty(pe,\"__esModule\",{value:!0}),pe.ChannelBase=pe.ProtectedItems=void 0;const we=e=>async(t,n,i)=>{const r=await e(t,n,i);return void 0===r?n:r};pe.ProtectedItems=class{constructor(e,t){this.providerIdentity=e,this.close=t}};class ye{static defaultAction(e){throw new Error(`No action registered at target for ${e}`)}constructor(){this.subscriptions=new Map}async processAction(e,t,n){try{const i=this.subscriptions.has(e)?this.subscriptions.get(e):(t,n)=>(this.defaultAction??ye.defaultAction)(e,t,n),r=this.preAction?await this.preAction(e,t,n):t,o=await i(r,n);return this.postAction?await this.postAction(e,o,n):o}catch(t){if(this.errorMiddleware)return this.errorMiddleware(e,t,n);throw t}}beforeAction(e){if(this.preAction)throw new Error(\"Already registered beforeAction middleware\");this.preAction=we(e)}onError(e){if(this.errorMiddleware)throw new Error(\"Already registered error middleware\");this.errorMiddleware=e}afterAction(e){if(this.postAction)throw new Error(\"Already registered afterAction middleware\");this.postAction=we(e)}remove(e){this.subscriptions.delete(e)}setDefaultAction(e){if(this.defaultAction)throw new Error(\"default action can only be set once\");this.defaultAction=e}register(e,t){if(this.subscriptions.has(e))throw new Error(`Subscription already registered for action: ${e}. Unsubscribe before adding new subscription`);return this.subscriptions.set(e,t),!0}}pe.ChannelBase=ye;var fe,ge,me,ve=s&&s.__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)},Ce=s&&s.__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};Object.defineProperty(ue,\"__esModule\",{value:!0}),ue.ChannelClient=void 0;const be=pe,Ie=new Map;class Ee extends be.ChannelBase{static closeChannelByEndpointId(e){const t=Ie.get(e);t&&ve(t,me,\"f\").call(t)}static handleProviderDisconnect(e){for(const t of Ie.values())t.providerIdentity.channelId===e.channelId&&(t.disconnectListener(e),ve(t,me,\"f\").call(t))}constructor(e,t,n){super(),fe.set(this,void 0),ge.set(this,void 0),this.processAction=(e,t,n)=>super.processAction(e,t,n),me.set(this,(()=>{Ie.delete(this.endpointId),ve(this,ge,\"f\").close()})),Ce(this,fe,new be.ProtectedItems(e,t),\"f\"),this.disconnectListener=()=>{},this.endpointId=e.endpointId,Ce(this,ge,n,\"f\"),Ie.set(this.endpointId,this),n.receive(this.processAction)}get providerIdentity(){return ve(this,fe,\"f\").providerIdentity}async dispatch(e,t){if(ve(this,ge,\"f\").isEndpointConnected(this.providerIdentity.channelId))return ve(this,ge,\"f\").send(this.providerIdentity.channelId,e,t);throw new Error(\"The client you are trying to dispatch from is disconnected from the target provider.\")}onDisconnection(e){this.disconnectListener=t=>{try{e(t)}catch(e){throw new Error(`Error while calling the onDisconnection callback: ${e.message}`)}finally{this.disconnectListener=()=>{}}}}async disconnect(){await this.sendDisconnectAction(),ve(this,me,\"f\").call(this)}async sendDisconnectAction(){const e=ve(this,fe,\"f\");await e.close()}static async wireClose(e,t,n){const{channelName:i,uuid:r,name:o}=t;await e.sendAction(\"disconnect-from-channel\",{channelName:i,uuid:r,name:o,endpointId:n})}}ue.ChannelClient=Ee,fe=new WeakMap,ge=new WeakMap,me=new WeakMap;var xe={},Ae={};Object.defineProperty(Ae,\"__esModule\",{value:!0}),Ae.exhaustiveCheck=void 0,Ae.exhaustiveCheck=function(e,t){throw new Error(`Unsupported value: ${e}${t?`\\n Supported values are: ${t.join(\"\")}`:\"\"}`)};var Pe,Me,_e,Oe={},Se=s&&s.__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},Re=s&&s.__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)};Object.defineProperty(Oe,\"__esModule\",{value:!0}),Oe.ClassicInfo=Oe.ClassicStrategy=void 0;Oe.ClassicStrategy=class{constructor(e,t,n,i){this.messageReceiver=t,this.endpointId=n,this.providerIdentity=i,Pe.set(this,void 0),Me.set(this,new Map),_e.set(this,new Map),this.send=async(e,t,n)=>{const i=Re(this,Me,\"f\").get(e);if(!i)throw new Error(`Could not locate routing info for endpoint ${e}`);const r={...i};r.isLocalEndpointId&&delete r.endpointId,delete r.isLocalEndpointId;const o=Re(this,Pe,\"f\").sendAction(\"send-channel-message\",{...r,providerIdentity:this.providerIdentity,action:t,payload:n});Re(this,_e,\"f\").get(e)?.add(o);return(await o.catch((e=>{throw new Error(e.message)})).finally((()=>{Re(this,_e,\"f\").get(e)?.delete(o)}))).payload.data.result},this.close=async()=>{this.messageReceiver.removeEndpoint(this.providerIdentity.channelId,this.endpointId),[...Re(this,Me,\"f\").keys()].forEach((e=>this.closeEndpoint(e))),Se(this,Me,new Map,\"f\")},Se(this,Pe,e,\"f\")}onEndpointDisconnect(e,t){}receive(e){this.messageReceiver.addEndpoint(e,this.providerIdentity.channelId,this.endpointId)}async closeEndpoint(e){const t=Re(this,Me,\"f\").get(e);Re(this,Me,\"f\").delete(e);const n=Re(this,_e,\"f\").get(e);n?.forEach((n=>{const i=`Channel connection with identity uuid: ${t?.uuid} / name: ${t?.name} / endpointId: ${e} no longer connected.`;n.cancel(new Error(i))}))}isEndpointConnected(e){return Re(this,Me,\"f\").has(e)}addEndpoint(e,t){Re(this,Me,\"f\").set(e,t.endpointIdentity),Re(this,_e,\"f\").set(e,new Set)}isValidEndpointPayload(e){return\"string\"==typeof e?.endpointIdentity?.endpointId||\"string\"==typeof e?.endpointIdentity?.channelId}},Pe=new WeakMap,Me=new WeakMap,_e=new WeakMap,Oe.ClassicInfo={version:5,minimumVersion:0,type:\"classic\"};var Fe={},je={},ke={};Object.defineProperty(ke,\"__esModule\",{value:!0}),ke.errorToPOJO=void 0,ke.errorToPOJO=function(e){return{stack:e.stack,name:e.name,message:e.message,toString:()=>e.stack||e.toString()}};var Le,Te,$e=s&&s.__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)},Be=s&&s.__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};Object.defineProperty(je,\"__esModule\",{value:!0}),je.RTCEndpoint=void 0;const Ge=ke;je.RTCEndpoint=class{static isValidEndpointPayload(e){const t=e=>\"object\"==typeof e&&null!==e;return t(e)&&t(e.endpointIdentity)&&t(e.rtc)&&\"string\"==typeof e.endpointIdentity.endpointId}constructor({rtc:e,endpointIdentity:t}){this.responseMap=new Map,Le.set(this,null),Te.set(this,void 0),this.connectionStateChangeHandler=e=>{\"connected\"!==this.rtc.rtcClient.connectionState&&(this.rtc.rtcClient.removeEventListener(\"connectionstatechange\",this.connectionStateChangeHandler),this.close(),$e(this,Te,\"f\")&&$e(this,Te,\"f\").call(this))},this.send=async(e,t)=>{const n=`message-${Math.random()}`,i=new Promise(((e,t)=>{this.responseMap.set(n,{resolve:e,reject:t})}));return this.rtc.channels.request.send(JSON.stringify({action:e,payload:t,messageId:n})),i},this.close=()=>{this.responseMap.forEach((e=>e.reject(\"Connection has closed.\"))),this.responseMap=new Map,this.rtc.channels.request.close(),this.rtc.channels.response.close(),this.rtc.rtcClient.close()},this.rtc=e,this.endpointIdentity=t,this.rtc.channels.response.addEventListener(\"message\",(e=>{let{data:t}=e;e.data instanceof ArrayBuffer&&(t=(new TextDecoder).decode(e.data));const{messageId:n,payload:i,success:r,error:o}=JSON.parse(t),{resolve:s,reject:a}=this.responseMap.get(n)??{};s&&a?(this.responseMap.delete(n),r?s(i):a(o)):(console.log(\"Could not find id in responseMap.\"),console.log(e))})),this.rtc.channels.request.addEventListener(\"message\",(async e=>{let{data:n}=e;e.data instanceof ArrayBuffer&&(n=(new TextDecoder).decode(e.data));const{messageId:i,action:r,payload:o}=JSON.parse(n);if($e(this,Le,\"f\"))try{const e=await $e(this,Le,\"f\").call(this,r,o,t);this.rtc.channels.response.send(JSON.stringify({messageId:i,payload:e,success:!0}))}catch(e){\"open\"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,error:(0,Ge.errorToPOJO)(e),success:!1}))}else\"open\"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,success:!1,error:\"Connection not ready.\"}))})),this.rtc.rtcClient.addEventListener(\"connectionstatechange\",this.connectionStateChangeHandler),Object.values(this.rtc.channels).forEach((e=>{e.onclose=e=>{[...this.responseMap.values()].forEach((e=>e.reject(new Error(\"RTCDataChannel closed unexpectedly, this is most commonly caused by message size. Note: RTC Channels have a message size limit of ~255kB.\")))),this.close(),$e(this,Te,\"f\")&&$e(this,Te,\"f\").call(this)}}))}onDisconnect(e){if($e(this,Te,\"f\"))throw new Error(\"RTCEndpoint disconnectListener cannot be set twice.\");Be(this,Te,e,\"f\")}receive(e){if($e(this,Le,\"f\"))throw new Error(\"You have already set a listener for this RTC Endpoint.\");Be(this,Le,e,\"f\")}get connected(){return\"connected\"===this.rtc.rtcClient.connectionState}},Le=new WeakMap,Te=new WeakMap;var We,He,Ne,De={},Ue=s&&s.__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)},Ve=s&&s.__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};Object.defineProperty(De,\"__esModule\",{value:!0}),De.EndpointStrategy=void 0;De.EndpointStrategy=class{constructor(e,t,n){this.EndpointType=e,this.StrategyName=n,We.set(this,null),He.set(this,new Map),Ne.set(this,!0),this.send=async(e,t,n)=>this.getEndpointById(e).send(t,n),this.close=async()=>{Ue(this,Ne,\"f\")&&(Ue(this,He,\"f\").forEach((e=>e.close())),Ve(this,He,new Map,\"f\")),Ve(this,Ne,!1,\"f\")},this.isValidEndpointPayload=t}onEndpointDisconnect(e,t){this.getEndpointById(e).onDisconnect(t)}receive(e){if(Ue(this,We,\"f\"))throw new Error(`You have already set a listener for this ${this.StrategyName} Strategy`);Ve(this,We,e,\"f\"),Ue(this,He,\"f\").forEach((e=>e.receive(Ue(this,We,\"f\"))))}getEndpointById(e){const t=Ue(this,He,\"f\").get(e);if(!t)throw new Error(`Client with endpoint id ${e} is not connected`);return t}get connected(){return Ue(this,Ne,\"f\")}isEndpointConnected(e){return Ue(this,He,\"f\").has(e)}addEndpoint(e,t){if(!Ue(this,Ne,\"f\"))return void console.warn(`Adding endpoint to disconnected ${this.StrategyName} Strategy`);const n=new this.EndpointType(t);Ue(this,We,\"f\")&&n.receive(Ue(this,We,\"f\")),Ue(this,He,\"f\").set(e,n)}async closeEndpoint(e){Ue(this,He,\"f\").delete(e)}},We=new WeakMap,He=new WeakMap,Ne=new WeakMap,Object.defineProperty(Fe,\"__esModule\",{value:!0}),Fe.RTCInfo=Fe.RTCStrategy=void 0;const ze=je,Ke=De;class qe extends Ke.EndpointStrategy{constructor(){super(ze.RTCEndpoint,ze.RTCEndpoint.isValidEndpointPayload,\"RTC\")}}Fe.RTCStrategy=qe,Fe.RTCInfo={version:2,minimumVersion:0,type:\"rtc\"};var Je={};Object.defineProperty(Je,\"__esModule\",{value:!0}),Je.RTCICEManager=void 0;const Ye=d;class Ze extends Ye.EmitterBase{constructor(e){super(e,\"channel\"),this.ensureChannelOpened=e=>new Promise(((t,n)=>{if(\"open\"===e.readyState)t();else if(\"connecting\"===e.readyState){const n=()=>{e.removeEventListener(\"open\",n),t()};e.addEventListener(\"open\",n)}else n(new Error(\"This Channel has already closed\"))}))}static createDataChannelPromise(e,t){let n;const i=new Promise((e=>{n=e})),r=i=>{const o=()=>{i.channel.removeEventListener(\"open\",o),n(i.channel)};i.channel.label===e&&(i.channel.addEventListener(\"open\",o),t.removeEventListener(\"datachannel\",r))};return t.addEventListener(\"datachannel\",r),i}async listenForProviderIce(e,t){await this.on(this.createProviderEventName(e),t,{timestamp:Date.now()})}async raiseProviderIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createProviderEventName(e)),t)}async listenForClientIce(e,t){await this.on(this.createClientEventName(e),t,{timestamp:Date.now()})}async raiseClientIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createClientEventName(e)),t)}cleanupIceListeners(e){this.removeAllListeners(this.createClientEventName(e)),this.removeAllListeners(this.createProviderEventName(e))}createClientEventName(e){return`ice-client-${e}`}createProviderEventName(e){return`ice-provider-${e}`}createRouteString(e){return`channel/${e}`}createRtcPeer(){return this.wire.environment.getRtcPeer()}async startClientOffer(){const e=Math.random().toString(),t=this.createRtcPeer();t.addEventListener(\"icecandidate\",(async t=>{t.candidate&&await this.raiseClientIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForProviderIce(e,(async e=>{await t.addIceCandidate(e.candidate)}));const n={request:t.createDataChannel(\"request\"),response:t.createDataChannel(\"response\")},i=await t.createOffer();await t.setLocalDescription(i);const r=Promise.all([n.request,n.response].map(this.ensureChannelOpened)).then((()=>{}));return{rtcClient:t,channels:n,offer:i,rtcConnectionId:e,channelsOpened:r}}async finishClientOffer(e,t,n){return await e.setRemoteDescription(t),await n,!0}async createProviderAnswer(e,t){const n=this.createRtcPeer(),i=Ze.createDataChannelPromise(\"request\",n),r=Ze.createDataChannelPromise(\"response\",n);n.addEventListener(\"icecandidate\",(async t=>{t.candidate&&await this.raiseProviderIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForClientIce(e,(async e=>{await n.addIceCandidate(e.candidate)})),await n.setRemoteDescription(t);const o=await n.createAnswer();await n.setLocalDescription(o);const s=Promise.all([i,r]).then((([t,n])=>(this.cleanupIceListeners(e),{request:t,response:n})));return{rtcClient:n,answer:o,channels:s}}}Je.RTCICEManager=Ze;var Qe={},Xe={};function et(e){return[...e.split(\".\").reverse().entries()].reduce(((e,[t,n])=>e+ +n*1e4**t),0)}function tt(e,t){return et(e)>=et(t)}function nt(e){return e.split(\"/\")[0]}Object.defineProperty(Xe,\"__esModule\",{value:!0}),Xe.runtimeUuidMeetsMinimumRuntimeVersion=Xe.parseRuntimeUuid=Xe.meetsMinimumRuntimeVersion=void 0,Xe.meetsMinimumRuntimeVersion=tt,Xe.parseRuntimeUuid=nt,Xe.runtimeUuidMeetsMinimumRuntimeVersion=function(e,t){return tt(nt(e),t)};var it,rt,ot,st,at,ct=s&&s.__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)},dt=s&&s.__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};Object.defineProperty(Qe,\"__esModule\",{value:!0}),Qe.ChannelProvider=void 0;const ht=pe,lt=Xe;class ut extends ht.ChannelBase{get connections(){return[...ct(this,it,\"f\")]}static handleClientDisconnection(e,t){const n=e.connections.find((e=>e.endpointId===t.endpointId));if(n)ct(e,st,\"f\").call(e,n);else{e.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name)).forEach(ct(e,st,\"f\"))}e.disconnectListener(t)}static setProviderRemoval(e,t){ut.removalMap.set(e,t)}constructor(e,t,n){super(),it.set(this,void 0),rt.set(this,void 0),ot.set(this,void 0),st.set(this,(e=>{const t=this.connections.filter((t=>t.endpointId!==e.endpointId));ct(this,ot,\"f\").closeEndpoint(e.endpointId),dt(this,it,t,\"f\")})),this.processAction=async(e,t,n)=>(ut.clientIsMultiRuntime(n)&&!(0,lt.runtimeUuidMeetsMinimumRuntimeVersion)(n.runtimeUuid,\"18.87.56.0\")?this.handleMultiRuntimeLegacyClient(n):this.checkForClientConnection(n),super.processAction(e,t,n)),at.set(this,(()=>{ct(this,ot,\"f\").close();const e=ut.removalMap.get(this);e&&e()})),dt(this,rt,new ht.ProtectedItems(e,t),\"f\"),this.connectListener=()=>{},this.disconnectListener=()=>{},dt(this,it,[],\"f\"),dt(this,ot,n,\"f\"),n.receive(this.processAction)}dispatch(e,t,n){const i=e.endpointId??this.getEndpointIdForOpenFinId(e,t);return i&&ct(this,ot,\"f\").isEndpointConnected(i)?ct(this,ot,\"f\").send(i,t,n):Promise.reject(new Error(`Client connection with identity uuid: ${e.uuid} / name: ${e.name} / endpointId: ${i} no longer connected.`))}async processConnection(e,t){return ct(this,it,\"f\").push(e),this.connectListener(e,t)}publish(e,t){return this.connections.map((n=>ct(this,ot,\"f\").send(n.endpointId,e,t)))}onConnection(e){this.connectListener=e}onDisconnection(e){this.disconnectListener=e}async destroy(){const e=ct(this,rt,\"f\");e.providerIdentity,dt(this,it,[],\"f\"),await e.close(),ct(this,at,\"f\").call(this)}async getAllClientInfo(){return this.connections.map((e=>{const{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}=e;return{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}}))}checkForClientConnection(e){if(!this.isClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider.\\n Client Identity: {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}isClientConnected(e){return ut.clientIdentityIncludesEndpointId(e)?this.connections.some((t=>t.endpointId===e.endpointId&&t.uuid===e.uuid&&t.name===e.name)):this.isLegacyClientConnected(e)}isLegacyClientConnected(e){return this.connections.some((t=>t.uuid===e.uuid&&t.name===e.name))}handleMultiRuntimeLegacyClient(e){if(!this.isLegacyClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider. Client Identity:\\n {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}getEndpointIdForOpenFinId(e,t){const n=this.connections.filter((t=>t.name===e.name&&t.uuid===e.uuid));if(n.length>=2){const n=ct(this,rt,\"f\"),{uuid:i,name:r}=e,o=n?.providerIdentity.uuid,s=n?.providerIdentity.name;console.warn(`WARNING: Dispatch call may have unintended results. The \"to\" argument of your dispatch call is missing the\\n \"endpointId\" parameter. The identity you are dispatching to ({uuid: ${i}, name: ${r}})\\n has multiple channelClients for this channel. Your dispatched action: (${t}) from the provider:\\n ({uuid: ${o}, name: ${s}}) will only be processed by the most recently-created client.`)}return n.pop()?.endpointId}static clientIdentityIncludesEndpointId(e){return void 0!==e.endpointId}static clientIsMultiRuntime(e){return void 0!==e.runtimeUuid}static async wireClose(e,t){await e.sendAction(\"destroy-channel\",{channelName:t})}}Qe.ChannelProvider=ut,it=new WeakMap,rt=new WeakMap,ot=new WeakMap,st=new WeakMap,at=new WeakMap,ut.removalMap=new WeakMap;var pt={};Object.defineProperty(pt,\"__esModule\",{value:!0}),pt.MessageReceiver=void 0;const wt=ue,yt=d;class ft extends yt.Base{constructor(e){super(e),this.onmessage=e=>\"process-channel-message\"===e.action&&(this.processChannelMessage(e),!0),this.endpointMap=new Map,this.latestEndpointIdByChannelId=new Map,e.registerMessageHandler(this.onmessage.bind(this))}async processChannelMessage(e){const{senderIdentity:t,providerIdentity:n,action:i,ackToSender:r,payload:o,intendedTargetIdentity:s}=e.payload,a=s.channelId??s.endpointId??this.latestEndpointIdByChannelId.get(n.channelId),c=this.endpointMap.get(a);if(!c)return r.payload.success=!1,r.payload.reason=`Client connection with identity uuid: ${this.wire.me.uuid} / name: ${this.wire.me.name} / endpointId: ${a} no longer connected.`,this.wire.sendRaw(r);try{const e=await c(i,o,t);return r.payload.payload=r.payload.payload||{},r.payload.payload.result=e,this.wire.sendRaw(r)}catch(e){return r.payload.success=!1,r.payload.reason=e.message,this.wire.sendRaw(r)}}addEndpoint(e,t,n){this.endpointMap.set(n,e),t!==n&&this.latestEndpointIdByChannelId.set(t,n)}removeEndpoint(e,t){this.endpointMap.delete(t),this.latestEndpointIdByChannelId.get(e)===t&&this.latestEndpointIdByChannelId.delete(e)}checkForPreviousClientConnection(e){const t=this.latestEndpointIdByChannelId.get(e);t&&(wt.ChannelClient.closeChannelByEndpointId(t),console.warn(\"You have created a second connection to an older provider. First connection has been removed from the clientMap\"),console.warn(\"If the provider calls publish(), you may receive multiple messages.\"))}}pt.MessageReceiver=ft;var gt={};Object.defineProperty(gt,\"__esModule\",{value:!0}),gt.ProtocolManager=void 0;gt.ProtocolManager=class{constructor(e){this.ProtocolsInPreferenceOrder=e,this.DefaultClientProtocols=[\"classic\"],this.DefaultProviderProtocols=[\"classic\"],this.getClientProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultClientProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(\", \")}.`);return t},this.getProviderProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultProviderProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(\", \")}.`);return t},this.getCompatibleProtocols=(e,t)=>t.supportedProtocols.filter((t=>e.some((e=>e.type===t.type&&t.version>=e.minimumVersion&&e.version>=(t.minimumVersion??0))))).slice(0,t.maxProtocols)}};var mt={};Object.defineProperty(mt,\"__esModule\",{value:!0});class vt{static combine(e,t){return new vt(e,t)}constructor(e,t){this.primary=e,this.secondary=t}onEndpointDisconnect(e,t){this.primary.onEndpointDisconnect(e,(()=>{this.secondary.isEndpointConnected(e)||t()})),this.secondary.onEndpointDisconnect(e,(()=>{this.primary.isEndpointConnected(e)||t()}))}isValidEndpointPayload(e){return this.primary.isValidEndpointPayload(e)||this.secondary.isValidEndpointPayload(e)}async closeEndpoint(e){await this.primary.closeEndpoint(e),await this.secondary.closeEndpoint(e)}isEndpointConnected(e){return this.primary.isEndpointConnected(e)||this.secondary.isEndpointConnected(e)}async addEndpoint(e,t){this.primary.isValidEndpointPayload(t)&&await this.primary.addEndpoint(e,t),this.secondary.isValidEndpointPayload(t)&&await this.secondary.addEndpoint(e,t)}receive(e){this.primary.receive(e),this.secondary.receive(e)}send(e,t,n){return this.primary.isEndpointConnected(e)?this.primary.send(e,t,n):this.secondary.send(e,t,n)}async close(){await Promise.all([this.primary.close(),this.secondary.close()])}}mt.default=vt;var Ct,bt,It=s&&s.__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},Et=s&&s.__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)},xt=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(xe,\"__esModule\",{value:!0}),xe.ConnectionManager=void 0;const At=Ae,Pt=d,Mt=Oe,_t=Fe,Ot=Je,St=Qe,Rt=pt,Ft=gt,jt=xt(mt);class kt extends Pt.Base{static getProtocolOptionsFromStrings(e){return e.map((e=>{switch(e){case\"rtc\":return _t.RTCInfo;case\"classic\":return Mt.ClassicInfo;default:return(0,At.exhaustiveCheck)(e,[\"rtc\",\"classic\"])}}))}constructor(e){super(e),Ct.set(this,void 0),bt.set(this,void 0),this.removeChannelFromProviderMap=e=>{this.providerMap.delete(e)},this.onmessage=e=>\"process-channel-connection\"===e.action&&(this.processChannelConnection(e),!0),this.providerMap=new Map,this.protocolManager=new Ft.ProtocolManager(\"node\"===this.wire.environment.type?[\"classic\"]:[\"rtc\",\"classic\"]),It(this,Ct,new Rt.MessageReceiver(e),\"f\"),It(this,bt,new Ot.RTCICEManager(e),\"f\"),e.registerMessageHandler(this.onmessage.bind(this))}createProvider(e,t){const n=Object.assign(this.wire.environment.getDefaultChannelOptions().create,e||{}),i=this.protocolManager.getProviderProtocols(n?.protocols),r=i.map((e=>{switch(e){case\"rtc\":return new _t.RTCStrategy;case\"classic\":return new Mt.ClassicStrategy(this.wire,Et(this,Ct,\"f\"),t.channelId,t);default:return(0,At.exhaustiveCheck)(e,[\"rtc\",\"classic\"])}}));let o;if(2===r.length){const[e,t]=r;o=jt.default.combine(e,t)}else{if(1!==r.length)throw new Error(\"failed to combine strategies\");[o]=r}const s=new St.ChannelProvider(t,(()=>St.ChannelProvider.wireClose(this.wire,t.channelName)),o),a=t.channelId;return this.providerMap.set(a,{provider:s,strategy:o,supportedProtocols:kt.getProtocolOptionsFromStrings(i)}),St.ChannelProvider.setProviderRemoval(s,this.removeChannelFromProviderMap.bind(this)),s}async createClientOffer(e){const t=this.protocolManager.getClientProtocols(e?.protocols);let n;return{offer:{supportedProtocols:await Promise.all(t.map((async e=>{switch(e){case\"rtc\":{const{rtcClient:e,channels:t,offer:i,rtcConnectionId:r,channelsOpened:o}=await Et(this,bt,\"f\").startClientOffer();return n={rtcClient:e,channels:t,channelsOpened:o},{type:\"rtc\",version:_t.RTCInfo.version,payload:{offer:i,rtcConnectionId:r}}}case\"classic\":return{type:\"classic\",version:Mt.ClassicInfo.version};default:return(0,At.exhaustiveCheck)(e,[\"rtc\",\"classic\"])}}))),maxProtocols:2},rtc:n}}async createClientStrategy(e,t){t.endpointId||(t.endpointId=this.wire.environment.getNextMessageId(),Et(this,Ct,\"f\").checkForPreviousClientConnection(t.channelId));const n=t.answer??{supportedProtocols:[{type:\"classic\",version:1}]},i=(await Promise.all(n.supportedProtocols.map((async n=>\"rtc\"===n.type&&e?(await Et(this,bt,\"f\").finishClientOffer(e.rtcClient,n.payload.answer,e.channelsOpened),new _t.RTCStrategy):\"classic\"===n.type?new Mt.ClassicStrategy(this.wire,Et(this,Ct,\"f\"),t.endpointId,t):null)))).filter((e=>null!==e));let r;if(e&&!i.some((e=>e instanceof _t.RTCStrategy))&&e&&e.rtcClient.close(),i.length>=2)r=jt.default.combine(i[0],i[1]);else{if(!i.length)throw new Error(\"No compatible protocols\");[r]=i}const o={endpointIdentity:t,rtc:e};return r.addEndpoint(t.channelId,o),r}async processChannelConnection(e){const{clientIdentity:t,providerIdentity:n,ackToSender:i,payload:r,offer:o}=e.payload;t.endpointId?t.isLocalEndpointId=!1:(t.endpointId=this.wire.environment.getNextMessageId(),t.isLocalEndpointId=!0);const s=n.channelId,a=this.providerMap.get(s);if(!a)return i.payload.success=!1,i.payload.reason=`Channel \"${n.channelName}\" has been destroyed.`,this.wire.sendRaw(i);const{provider:c,strategy:d,supportedProtocols:h}=a;try{if(!(c instanceof St.ChannelProvider))throw Error(\"Cannot connect to a channel client\");const e=o??{supportedProtocols:[{type:\"classic\",version:1}],maxProtocols:1},n=this.protocolManager.getCompatibleProtocols(h,e);if(!n.length)throw new Error(\"This provider does not support any of the offered protocols.\");const s=await c.processConnection(t,r);i.payload.payload=i.payload.payload||{};let a={supportedProtocols:[],endpointPayloadPromise:Promise.resolve({endpointIdentity:t})};return a=await n.reduce((async(e,t)=>{const n=await e;if(\"rtc\"===t.type){const{answer:e,rtcClient:i,channels:r}=await Et(this,bt,\"f\").createProviderAnswer(t.payload.rtcConnectionId,t.payload.offer);n.supportedProtocols.push({type:\"rtc\",version:_t.RTCInfo.version,payload:{answer:e}}),n.endpointPayloadPromise=n.endpointPayloadPromise.then((e=>r.then((t=>({...e,rtc:{rtcClient:i,channels:t}})))))}else n.supportedProtocols.push({type:\"classic\",version:Mt.ClassicInfo.version});return n}),Promise.resolve(a)),a.endpointPayloadPromise.then((e=>d.addEndpoint(t.endpointId,e))),i.payload.payload.result=s,i.payload.payload.answer=a,this.wire.sendRaw(i)}catch(e){return i.payload.success=!1,i.payload.reason=e.message,this.wire.sendRaw(i)}}}xe.ConnectionManager=kt,Ct=new WeakMap,bt=new WeakMap;var Lt,Tt,$t,Bt=s&&s.__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},Gt=s&&s.__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)};Object.defineProperty(le,\"__esModule\",{value:!0}),le.Channel=void 0;const Wt=t,Ht=G,Nt=d,Dt=ue,Ut=xe,Vt=Qe;function zt(e){const t=Math.floor(e/10),n=Math.min(3e4,500*2**t);return new Promise((e=>{setTimeout((()=>{e(!1)}),n)}))}class Kt extends Nt.EmitterBase{constructor(e){super(e,\"channel\"),Lt.set(this,void 0),Tt.set(this,new Wt.EventEmitter),$t.set(this,new Ht.AsyncRetryableLazy((async()=>{await Promise.all([this.on(\"disconnected\",(e=>{Dt.ChannelClient.handleProviderDisconnect(e)})),this.on(\"connected\",((...e)=>{Gt(this,Tt,\"f\").emit(\"connected\",...e)}))]).catch((()=>new Error(\"error setting up channel connection listeners\")))}))),Bt(this,Lt,new Ut.ConnectionManager(e),\"f\")}async getAllChannels(){return this.wire.sendAction(\"get-all-channels\").then((({payload:e})=>e.data))}async onChannelConnect(e){await this.on(\"connected\",e)}async onChannelDisconnect(e){await this.on(\"disconnected\",e)}async safeConnect(e,t,n){const i={count:0};do{let r=()=>{};const o=new Promise((t=>{r=n=>{e===n.channelName&&t(!0)},Gt(this,Tt,\"f\").on(\"connected\",r)}));try{if(i.count>0){i.gotConnectedEvent=await Promise.race([zt(i.count),o]);const t=await this.wire.sendAction(\"connect-to-channel\",{...n,retryInfo:i});return console.log(`Successfully connected to channelName: ${e}`),t.payload.data}const t=this.wire.sendAction(\"connect-to-channel\",n);i.originalMessageId=t.messageId;return(await t).payload.data}catch(n){if(!n.message.includes(\"internal-nack\"))throw n;t&&0===i.count&&console.warn(`No channel found for channelName: ${e}. Waiting for connection...`)}finally{i.count+=1,Gt(this,Tt,\"f\").removeListener(\"connected\",r)}}while(t);throw new Error(`No channel found for channelName: ${e}.`)}async connect(e,t={}){if(await Gt(this,$t,\"f\").getValue(),!e||\"string\"!=typeof e)throw new Error(\"Please provide a channelName string to connect to a channel.\");const n={wait:!0,...this.wire.environment.getDefaultChannelOptions().connect,...t},{offer:i,rtc:r}=await Gt(this,Lt,\"f\").createClientOffer(n);let o;(this.fin.me.isFrame||this.fin.me.isView||this.fin.me.isWindow)&&(o=(await this.fin.me.getInfo()).url);const s={channelName:e,...n,offer:i,connectionUrl:o},a=await this.safeConnect(e,n.wait,s),c=await Gt(this,Lt,\"f\").createClientStrategy(r,a),d=new Dt.ChannelClient(a,(()=>Dt.ChannelClient.wireClose(this.wire,a,a.endpointId)),c);return c.onEndpointDisconnect(a.channelId,(async()=>{try{await d.sendDisconnectAction()}catch(e){console.warn(`Something went wrong during disconnect for client with uuid: ${a.uuid} / name: ${a.name} / endpointId: ${a.endpointId}.`)}finally{Dt.ChannelClient.handleProviderDisconnect(a)}})),d}async create(e,t){if(!e)throw new Error(\"Please provide a channelName to create a channel\");const{payload:{data:n}}=await this.wire.sendAction(\"create-channel\",{channelName:e}),i=Gt(this,Lt,\"f\").createProvider(t,n);return this.on(\"client-disconnected\",(t=>{t.channelName===e&&Vt.ChannelProvider.handleClientDisconnection(i,t)})),i}}le.Channel=Kt,Lt=new WeakMap,Tt=new WeakMap,$t=new WeakMap,Object.defineProperty(de,\"__esModule\",{value:!0}),de.InterAppPayload=de.InterApplicationBus=void 0;const qt=t,Jt=d,Yt=he,Zt=le,Qt=O;class Xt extends Jt.Base{constructor(e){super(e),this.events={subscriberAdded:\"subscriber-added\",subscriberRemoved:\"subscriber-removed\"},this.refCounter=new Yt.RefCounter,this.Channel=new Zt.Channel(e),this.emitter=new qt.EventEmitter,e.registerMessageHandler(this.onmessage.bind(this)),this.on=this.emitter.on.bind(this.emitter),this.removeAllListeners=this.emitter.removeAllListeners.bind(this.emitter)}async publish(e,t){await this.wire.sendAction(\"publish-message\",{topic:e,message:t,sourceWindowName:this.me.name})}async send(e,t,n){const i=(0,Qt.validateIdentity)(e);if(i)throw new Error(i);await this.wire.sendAction(\"send-message\",{destinationUuid:e.uuid,destinationWindowName:e.name,topic:t,message:n,sourceWindowName:this.me.name})}subscribe(e,t,n){const i=this.createSubscriptionKey(e.uuid,e.name||\"*\",t);return this.emitter.on(i,n),this.refCounter.actOnFirst(i,(async()=>{await this.wire.sendAction(\"subscribe\",{sourceUuid:e.uuid,sourceWindowName:e.name||\"*\",topic:t,destinationWindowName:this.me.name})}),(()=>Promise.resolve()))}unsubscribe(e,t,n){const i=e.name||\"*\",r=this.createSubscriptionKey(e.uuid,i,t);return this.emitter.removeListener(r,n),this.refCounter.actOnLast(r,(async()=>{await this.wire.sendAction(\"unsubscribe\",{sourceUuid:e.uuid,sourceWindowName:i,topic:t,destinationWindowName:this.me.name})}),(()=>new Promise((e=>e)).then((()=>{}))))}processMessage(e){const{payload:{message:t,sourceWindowName:n,sourceUuid:i,topic:r}}=e,o=[this.createSubscriptionKey(i,n,r),this.createSubscriptionKey(i,\"*\",r),this.createSubscriptionKey(\"*\",\"*\",r)],s={uuid:i,name:n};o.forEach((e=>{this.emitter.emit(e,t,s)}))}emitSubscriverEvent(e,t){const{payload:{targetName:n,uuid:i,topic:r}}=t,o={name:n,uuid:i,topic:r};this.emitter.emit(e,o)}createSubscriptionKey(e,t,n){const i=t||\"*\";if(!(e&&i&&n))throw new Error(\"Missing uuid, name, or topic string\");return function(...e){return e.map((e=>Buffer.from(`${e}`).toString(\"base64\"))).join(\"/\")}(e,i,n)}onmessage(e){const{action:t}=e;switch(t){case\"process-message\":this.processMessage(e);break;case this.events.subscriberAdded:this.emitSubscriverEvent(this.events.subscriberAdded,e);break;case this.events.subscriberRemoved:this.emitSubscriverEvent(this.events.subscriberRemoved,e)}return!0}}de.InterApplicationBus=Xt;de.InterAppPayload=class{};var en={};Object.defineProperty(en,\"__esModule\",{value:!0}),en.Clipboard=void 0;const tn=d;class nn extends tn.Base{async writeText(e){await this.wire.sendAction(\"clipboard-write-text\",e)}async readText(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-text\",{type:e});return t.data}async writeImage(e){await this.wire.sendAction(\"clipboard-write-image\",e)}async readImage(e={format:\"dataURL\"}){const{payload:t}=await this.wire.sendAction(\"clipboard-read-image\",e);return t.data}async writeHtml(e){await this.wire.sendAction(\"clipboard-write-html\",e)}async readHtml(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-html\",{type:e});return t.data}async writeRtf(e){await this.wire.sendAction(\"clipboard-write-rtf\",e)}async readRtf(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-rtf\",{type:e});return t.data}async write(e){await this.wire.sendAction(\"clipboard-write\",e)}async getAvailableFormats(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-formats\",{type:e});return t.data}}en.Clipboard=nn;var rn={},on={},sn={};Object.defineProperty(sn,\"__esModule\",{value:!0}),sn.ExternalApplication=void 0;const an=d;class cn extends an.EmitterBase{constructor(e,t){super(e,\"external-application\",t.uuid),this.identity=t}getInfo(){return this.wire.sendAction(\"get-external-application-info\",this.identity).then((({payload:e})=>e.data))}}sn.ExternalApplication=cn,Object.defineProperty(on,\"__esModule\",{value:!0}),on.ExternalApplicationModule=void 0;const dn=d,hn=sn;class ln extends dn.Base{wrap(e){return this.wire.sendAction(\"external-application-wrap\").catch((e=>{})),Promise.resolve(new hn.ExternalApplication(this.wire,{uuid:e}))}wrapSync(e){return this.wire.sendAction(\"external-application-wrap-sync\").catch((e=>{})),new hn.ExternalApplication(this.wire,{uuid:e})}}on.ExternalApplicationModule=ln,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(on,e),n(sn,e)}(rn);var un={},pn={},wn={};Object.defineProperty(wn,\"__esModule\",{value:!0}),wn._Frame=void 0;const yn=d;class fn extends yn.EmitterBase{constructor(e,t){super(e,\"frame\",t.uuid,t.name),this.identity=t}getInfo(){return this.wire.sendAction(\"get-frame-info\",this.identity).then((({payload:e})=>e.data))}getParentWindow(){return this.wire.sendAction(\"get-parent-window\",this.identity).then((({payload:e})=>e.data))}}wn._Frame=fn,Object.defineProperty(pn,\"__esModule\",{value:!0}),pn._FrameModule=void 0;const gn=d,mn=O,vn=wn;class Cn extends gn.Base{async wrap(e){this.wire.sendAction(\"frame-wrap\").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}wrapSync(e){this.wire.sendAction(\"frame-wrap-sync\").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}getCurrent(){return this.wire.sendAction(\"frame-get-current\").catch((e=>{})),Promise.resolve(new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity()))}getCurrentSync(){return this.wire.sendAction(\"frame-get-current-sync\").catch((e=>{})),new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity())}}pn._FrameModule=Cn,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(pn,e),n(wn,e)}(un);var bn={};Object.defineProperty(bn,\"__esModule\",{value:!0}),bn.GlobalHotkey=void 0;const In=d;class En extends In.EmitterBase{constructor(e){super(e,\"global-hotkey\")}async register(e,t){await this.on(e,t),await this.wire.sendAction(\"global-hotkey-register\",{hotkey:e})}async unregister(e){await this.removeAllListeners(e),await this.wire.sendAction(\"global-hotkey-unregister\",{hotkey:e})}async unregisterAll(){await Promise.all(this.eventNames().filter((e=>!(\"registered\"===e||\"unregistered\"===e))).map((e=>this.removeAllListeners(e)))),await this.wire.sendAction(\"global-hotkey-unregister-all\",{})}async isRegistered(e){const{payload:{data:t}}=await this.wire.sendAction(\"global-hotkey-is-registered\",{hotkey:e});return t}}bn.GlobalHotkey=En;var xn,An={},Pn={},Mn={},_n=s&&s.__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)};Object.defineProperty(Mn,\"__esModule\",{value:!0}),Mn.Platform=void 0;const On=d,Sn=O,Rn=new Map;class Fn extends On.EmitterBase{constructor(e,t){super(t.wire,\"application\",e.uuid),this.getClient=e=>{this.wire.sendAction(\"platform-get-client\",this.identity).catch((e=>{}));const t=e||this.identity,{uuid:n}=t;if(!Rn.has(n)){const e=_n(this,xn,\"f\").call(this,n);Rn.set(n,e)}return Rn.get(n)},xn.set(this,(async e=>{try{const t=`custom-frame-${e}`,n=await this._channel.connect(t,{wait:!1});return n.onDisconnection((()=>{Rn.delete(e)})),n}catch(t){throw Rn.delete(e),new Error(\"The targeted Platform is not currently running. Listen for application-started event for the given Uuid.\")}})),this.launchLegacyManifest=this.launchContentManifest;const n=(0,Sn.validateIdentity)(e);if(n)throw new Error(n);this._channel=t,this.identity={uuid:e.uuid},this.Layout=this.fin.Platform.Layout,this.Application=this.fin.Application.wrapSync(this.identity)}async createView(e,t,n){this.wire.sendAction(\"platform-create-view\",this.identity).catch((e=>{}));const i=await this.getClient(),r=await i.dispatch(\"create-view\",{target:t,opts:e,targetView:n});if(!r||(0,Sn.validateIdentity)(r.identity))throw new Error(`When overwriting the createView call, please return an object that has a valid 'identity' property: ${JSON.stringify(r)}`);return this.fin.View.wrapSync(r.identity)}async createWindow(e){this.wire.sendAction(\"platform-create-window\",this.identity).catch((e=>{}));const t=await this.getClient();e.reason||(e.reason=\"api-call\");const n=await t.dispatch(\"create-view-container\",e);if(!n||(0,Sn.validateIdentity)(n.identity))throw new Error(`When overwriting the createWindow call, please return an object that has a valid 'identity' property: ${JSON.stringify(n)}`);const{identity:i}=n,r=this.fin.Window.wrapSync(i);return r.name=i.name,r.uuid=i.uuid,r}async quit(){this.wire.sendAction(\"platform-quit\",this.identity).catch((e=>{}));return(await this.getClient()).dispatch(\"quit\")}async closeView(e){this.wire.sendAction(\"platform-close-view\",this.identity).catch((e=>{}));const t=await this.getClient();await t.dispatch(\"close-view\",{view:e})}async reparentView(e,t){console.warn(\"Platform.reparentView has been deprecated, please use Platform.createView\"),this.wire.sendAction(\"platform-reparent-view\",this.identity).catch((e=>{}));const n={...e,uuid:e.uuid??this.identity.uuid},i=await this.fin.View.wrap(n),r=await i.getOptions();return this.createView(r,t)}async getSnapshot(){this.wire.sendAction(\"platform-get-snapshot\",this.identity).catch((e=>{}));return(await this.getClient()).dispatch(\"get-snapshot\")}async getViewSnapshot(e){return(await this.getClient()).dispatch(\"get-view-snapshot\",{viewIdentity:e})}async applySnapshot(e,t){this.wire.sendAction(\"platform-apply-snapshot\",this.identity).catch((e=>{}));const n=\"Requested snapshot must be a valid Snapshot object, or a url or filepath to such an object.\";let i;if(\"string\"==typeof e)try{i=(await this._channel.wire.sendAction(\"get-application-manifest\",{manifestUrl:e})).payload.data}catch(e){throw new Error(`${n}: ${e}`)}else i=e;if(!i.windows)throw new Error(n);const r=await this.getClient();return await r.dispatch(\"apply-snapshot\",{snapshot:i,options:t}),this}async fetchManifest(e){return(await this.getClient()).dispatch(\"platform-fetch-manifest\",{manifestUrl:e})}async launchContentManifest(e){this.wire.sendAction(\"platform-launch-content-manifest\",this.identity).catch((()=>{}));const t=await this.getClient(),n=await this.fetchManifest(e);return t.dispatch(\"launch-into-platform\",{manifest:n,manifestUrl:e}),this}async setWindowContext(e={},t){if(this.wire.sendAction(\"platform-set-window-context\",this.identity).catch((e=>{})),!e)throw new Error(\"Please provide a serializable object or string to set the context.\");const n=await this.getClient(),{entityType:i}=t?await this.fin.System.getEntityInfo(t.uuid,t.name):this.fin.me;await n.dispatch(\"set-window-context\",{context:e,entityType:i,target:t||{uuid:this.fin.me.uuid,name:this.fin.me.name}})}async getWindowContext(e){this.wire.sendAction(\"platform-get-window-context\",this.identity).catch((e=>{}));const t=await this.getClient(),{entityType:n}=e?await this.fin.System.getEntityInfo(e.uuid,e.name):this.fin.me;return t.dispatch(\"get-window-context\",{target:e||{uuid:this.fin.me.uuid,name:this.fin.me.name},entityType:n})}async closeWindow(e,t={skipBeforeUnload:!1}){this.wire.sendAction(\"platform-close-window\",this.identity).catch((e=>{}));return(await this.getClient()).dispatch(\"close-window\",{windowId:e,options:t})}}Mn.Platform=Fn,xn=new WeakMap;var jn={},kn={},Ln={},Tn={};function $n(e){switch(e){case\"columns\":case\"grid\":case\"rows\":case\"tabs\":return!0;default:return!1}}Object.defineProperty(Tn,\"__esModule\",{value:!0}),Tn.overrideFromComposables=Tn.isValidPresetType=void 0,Tn.isValidPresetType=$n,Tn.overrideFromComposables=function(...e){return t=>e.reduceRight(((e,t)=>n=>t(e(n))),(e=>e))(t)},Tn.default={isValidPresetType:$n};var Bn={},Gn={},Wn={};Object.defineProperty(Wn,\"__esModule\",{value:!0}),Wn.ApiConsumer=void 0;Wn.ApiConsumer=class{constructor(e){this.strategy=e,this.consume=async e=>(await this.strategy.getExposedFunctions(e)).reduce(((t,n)=>({...t,[n.key]:this.strategy.createFunction(n,e)})),{})}};var Hn={},Nn={};Object.defineProperty(Nn,\"__esModule\",{value:!0}),Nn.expose=Nn.getExposedProperties=void 0;const Dn=Symbol(\"exposedProperties\");Nn.getExposedProperties=e=>e[Dn]||e.prototype[Dn]||[];Nn.expose=e=>(t,n,i)=>{t[Dn]=t[Dn]||[],t[Dn].push({key:n,descriptor:i,options:e})},Object.defineProperty(Hn,\"__esModule\",{value:!0}),Hn.ApiExposer=void 0;const Un=Nn;Hn.ApiExposer=class{constructor(e){this.strategy=e,this.exposeInstance=async(e,t)=>{const n=(0,Un.getExposedProperties)(e),i=await Promise.all(n.map((async({key:n,options:i})=>({key:n,options:await this.strategy.exposeFunction(e[n].bind(e),{key:n,options:i,meta:t})}))));await this.strategy.exposeMeta(t,i)}}};var Vn={},zn={},Kn={};Object.defineProperty(Kn,\"__esModule\",{value:!0}),Kn.ChannelsConsumer=void 0;Kn.ChannelsConsumer=class{constructor(e){this.channel=e,this.getExposedFunctions=async e=>{const{id:t}=e,{props:n}=await this.channel.dispatch(`api-meta:${t}`);return n},this.createFunction=e=>(...t)=>{const{action:n}=e.options;return this.channel.dispatch(n,{args:t})}}};var qn={};Object.defineProperty(qn,\"__esModule\",{value:!0}),qn.ChannelsExposer=void 0;qn.ChannelsExposer=class{constructor(e){this.channelProviderOrClient=e,this.exposeFunction=async(e,t)=>{const{key:n,options:i,meta:r}=t,{id:o}=r,s=`${o}.${i?.action||n}`;return await this.channelProviderOrClient.register(s,(async({args:t})=>e(...t))),{action:s}},this.exposeMeta=async({id:e},t)=>{const n=`api-meta:${e}`;await this.channelProviderOrClient.register(n,(()=>({props:t})))}}},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Kn,e),n(qn,e)}(zn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(zn,e)}(Vn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Wn,e),n(Hn,e),n(Vn,e),n(Nn,e)}(Gn);var Jn={};Object.defineProperty(Jn,\"__esModule\",{value:!0}),Jn.createRelayedDispatch=exports.relayChannelClientApi_1=Jn.relayChannelClientApi=void 0;const Yn=[\"no longer connected\",\"RTCDataChannel closed unexpectedly\",\"The client you are trying to dispatch from is disconnected from the target provider\"];exports.relayChannelClientApi_1=Jn.relayChannelClientApi=async(e,t)=>{e.register(`relay:${t}`,(({action:t,target:n,payload:i})=>e.dispatch(n,t,i))),await Promise.resolve()};Jn.createRelayedDispatch=(e,t,n,i)=>async(r,o)=>{try{return await e.dispatch(`relay:${n}`,{action:r,payload:o,target:t})}catch(e){if(s=e.message,Yn.some((e=>s.includes(e)))&&i)throw new Error(i);throw e}var s};var Zn,Qn,Xn,ei=s&&s.__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},ti=s&&s.__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)};Object.defineProperty(Bn,\"__esModule\",{value:!0}),Bn.ColumnOrRow=Bn.TabStack=Bn.LayoutNode=void 0;const ni=Gn,ii=Jn;class ri{constructor(e,t){Zn.set(this,void 0),this.isRoot=()=>ti(this,Zn,\"f\").isRoot(this.entityId),this.exists=()=>ti(this,Zn,\"f\").exists(this.entityId),this.getParent=async()=>{const e=await ti(this,Zn,\"f\").getParent(this.entityId);if(e)return ri.getEntity(e,ti(this,Zn,\"f\"))},this.createAdjacentStack=async(e,t)=>{const n=await ti(this,Zn,\"f\").createAdjacentStack(this.entityId,e,t);return ri.getEntity({entityId:n,type:\"stack\"},ti(this,Zn,\"f\"))},this.getAdjacentStacks=async e=>(await ti(this,Zn,\"f\").getAdjacentStacks({targetId:this.entityId,edge:e})).map((e=>ri.getEntity({type:\"stack\",entityId:e.entityId},ti(this,Zn,\"f\")))),ei(this,Zn,e,\"f\"),this.entityId=t}}Bn.LayoutNode=ri,Zn=new WeakMap,ri.newLayoutEntitiesClient=async(e,t,n)=>{const i=(0,ii.createRelayedDispatch)(e,n,\"layout-relay\",\"You are trying to interact with a layout component on a window that does not exist or has been destroyed.\");return new ni.ApiConsumer(new ni.ChannelsConsumer({dispatch:i})).consume({id:t})},ri.getEntity=(e,t)=>{const{entityId:n,type:i}=e;switch(i){case\"column\":case\"row\":return new si(t,n,i);case\"stack\":return new oi(t,n);default:throw new Error(`Unrecognised Layout Entity encountered ('${JSON.stringify(e)})`)}};class oi extends ri{constructor(e,t){super(e,t),Qn.set(this,void 0),this.type=\"stack\",this.getViews=()=>ti(this,Qn,\"f\").getStackViews(this.entityId),this.addView=async(e,t={index:0})=>ti(this,Qn,\"f\").addViewToStack(this.entityId,e,t),this.removeView=async e=>{await ti(this,Qn,\"f\").removeViewFromStack(this.entityId,e)},this.setActiveView=async e=>{await ti(this,Qn,\"f\").setStackActiveView(this.entityId,e)},ei(this,Qn,e,\"f\")}}Bn.TabStack=oi,Qn=new WeakMap;class si extends ri{constructor(e,t,n){super(e,t),Xn.set(this,void 0),this.getContent=async()=>(await ti(this,Xn,\"f\").getContent(this.entityId)).map((e=>ri.getEntity(e,ti(this,Xn,\"f\")))),ei(this,Xn,e,\"f\"),this.type=n}}Bn.ColumnOrRow=si,Xn=new WeakMap;var ai={};Object.defineProperty(ai,\"__esModule\",{value:!0}),ai.DEFAULT_LAYOUT_KEY=ai.LAYOUT_CONTROLLER_ID=void 0,ai.LAYOUT_CONTROLLER_ID=\"layout-entities\",ai.DEFAULT_LAYOUT_KEY=\"__default__\";var ci,di,hi,li=s&&s.__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)};Object.defineProperty(Ln,\"__esModule\",{value:!0}),Ln.Layout=void 0;const ui=G,pi=O,wi=d,yi=Tn,fi=Bn,gi=ai;class mi extends wi.Base{static getClient(e){return li(e,di,\"f\").getValue()}constructor(e,t){super(t),ci.add(this),di.set(this,new ui.Lazy((async()=>fi.LayoutNode.newLayoutEntitiesClient(await this.platform.getClient(),gi.LAYOUT_CONTROLLER_ID,this.identity)))),this.replace=async e=>{this.wire.sendAction(\"layout-replace\").catch((e=>{}));const t=await this.platform.getClient();await t.dispatch(\"replace-layout\",{target:this.identity,opts:{layout:e}})},this.replaceView=async(e,t)=>{this.wire.sendAction(\"layout-replace-view\").catch((e=>{}));const n=await this.platform.getClient();await n.dispatch(\"replace-view\",{target:this.identity,opts:{viewToReplace:e,newView:t}})},this.applyPreset=async e=>{this.wire.sendAction(\"layout-apply-preset\").catch((e=>{}));const t=await this.platform.getClient(),{presetType:n}=e;if(!n||!(0,yi.isValidPresetType)(n))throw new Error(\"Cannot apply preset layout, please include an applicable presetType property in the PresetLayoutOptions.\");await t.dispatch(\"apply-preset-layout\",{target:this.identity,opts:{presetType:n}})};const n=(0,pi.validateIdentity)(e);if(n)throw new Error(n);this.identity=e,this.platform=this.fin.Platform.wrapSync({uuid:e.uuid}),e.uuid===this.fin.me.uuid&&e.name===this.fin.me.name&&(this.init=this.fin.Platform.Layout.init)}async getConfig(){this.wire.sendAction(\"layout-get-config\").catch((e=>{}));return(await this.platform.getClient()).dispatch(\"get-frame-snapshot\",{target:this.identity})}async getCurrentViews(){this.wire.sendAction(\"layout-get-views\").catch((e=>{}));const e=await this.platform.getClient();return(await e.dispatch(\"get-layout-views\",{target:this.identity})).map((e=>this.fin.View.wrapSync(e)))}async getRootItem(){this.wire.sendAction(\"layout-get-root-item\").catch((()=>{}));const e=await li(this,di,\"f\").getValue(),t=await e.getRoot(\"layoutName\"in this.identity?this.identity:void 0);return fi.LayoutNode.getEntity(t,e)}async getStackByViewIdentity(e){this.wire.sendAction(\"layout-get-stack-by-view\").catch((()=>{}));const t=await li(this,di,\"f\").getValue(),n=await t.getStackByView(e);if(!n)throw new Error(`No stack found for view: ${e.uuid}/${e.name}`);return fi.LayoutNode.getEntity(n,t)}async addView(e,{location:t,targetView:n}={}){this.wire.sendAction(\"layout-add-view\").catch((e=>{}));const{identity:i}=await li(this,ci,\"m\",hi).call(this,\"layout-add-view\",{viewOptions:e,location:t,targetView:n});return{identity:i}}async closeView(e){this.wire.sendAction(\"layout-close-view\").catch((e=>{})),await li(this,ci,\"m\",hi).call(this,\"layout-close-view\",{viewIdentity:e})}}Ln.Layout=mi,di=new WeakMap,ci=new WeakSet,hi=async function(e,t){return(await this.platform.getClient()).dispatch(e,{target:this.identity,opts:t})};var vi,Ci,bi,Ii,Ei,xi=s&&s.__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)},Ai=s&&s.__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};Object.defineProperty(kn,\"__esModule\",{value:!0}),kn.LayoutModule=void 0;const Pi=d,Mi=Ln,_i=ai;class Oi extends Pi.Base{constructor(){super(...arguments),vi.add(this),Ci.set(this,!1),bi.set(this,null),this.init=async(e={})=>{if(this.wire.sendAction(\"layout-init\").catch((e=>{})),!this.wire.environment.layoutAllowedInContext(this.fin))throw new Error(\"Layout.init can only be called from a Window context.\");if(xi(this,Ci,\"f\"))throw new Error(\"Layout.init was already called, please use Layout.create to add additional layouts.\");\"openfin\"===this.wire.environment.type&&await this.fin.Platform.getCurrentSync().getClient(),Ai(this,Ci,!0,\"f\"),Ai(this,bi,await this.wire.environment.initLayoutManager(this.fin,this.wire,e),\"f\"),await this.wire.environment.applyLayoutSnapshot(this.fin,xi(this,bi,\"f\"),e);const t={name:this.fin.me.name,uuid:this.fin.me.uuid};if(!e.layoutManagerOverride){const e={layoutName:_i.DEFAULT_LAYOUT_KEY,...t};return xi(this,Ii,\"f\").call(this,e)}return this.wrapSync(t)},Ii.set(this,(e=>{const t=\"[Layout] You are using a deprecated property `layoutManager` - it will throw if you access it starting in v37.\",n=new Proxy({},{get(e,n){throw console.warn(`[Layout-mgr-proxy] accessing ${n.toString()}`),new Error(t)}}),i=Object.assign(this.wrapSync(e),{layoutManager:n});return new Proxy(i,{get(e,n){if(\"layoutManager\"===n)throw console.warn(`[Layout-proxy] accessing ${n.toString()}`),new Error(t);return e[n]}})})),this.getCurrentLayoutManagerSync=()=>xi(this,vi,\"m\",Ei).call(this,\"fin.Platform.Layout.getCurrentLayoutManagerSync()\"),this.create=async e=>this.wire.environment.createLayout(xi(this,vi,\"m\",Ei).call(this,\"fin.Platform.Layout.create()\"),e),this.destroy=async e=>this.wire.environment.destroyLayout(xi(this,vi,\"m\",Ei).call(this,\"fin.Platform.Layout.destroy()\"),e)}async wrap(e){return this.wire.sendAction(\"layout-wrap\").catch((e=>{})),new Mi.Layout(e,this.wire)}wrapSync(e){return this.wire.sendAction(\"layout-wrap-sync\").catch((e=>{})),new Mi.Layout(e,this.wire)}async getCurrent(){if(this.wire.sendAction(\"layout-get-current\").catch((e=>{})),\"openfin\"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error(\"You are not in a Window context. Only Windows can have a Layout.\");const{uuid:e,name:t}=this.fin.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction(\"layout-get-current-sync\").catch((e=>{})),\"openfin\"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error(\"You are not in a Window context. Only Windows can have a Layout.\");const{uuid:e,name:t}=this.fin.me;return this.wrapSync({uuid:e,name:t})}async getLayoutByViewIdentity(e){this.wire.sendAction(\"layout-get-by-view-identity\").catch((()=>{}));let t=await this.wire.environment.getViewWindowIdentity(this.fin,e);t.identity&&(t=t.identity);try{const n=this.wrapSync(t),i=await Mi.Layout.getClient(n),r=await i.getLayoutIdentityForViewOrThrow(e);return this.wrapSync(r)}catch(n){if(![\"No action registered at target for\",\"getLayoutIdentityForViewOrThrow is not a function\"].some((e=>n.message.includes(e))))throw n;if(t.uuid===t.name)throw new Error(`View identity ${JSON.stringify(e)} is not attached to any layout in provider window ${JSON.stringify(t)}.`);return this.wrapSync(t)}}}kn.LayoutModule=Oi,Ci=new WeakMap,bi=new WeakMap,Ii=new WeakMap,vi=new WeakSet,Ei=function(e){if(!xi(this,bi,\"f\"))throw new Error(`You must call init before using the API ${e}`);return xi(this,bi,\"f\")},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(kn,e),n(Ln,e)}(jn),Object.defineProperty(Pn,\"__esModule\",{value:!0}),Pn.PlatformModule=void 0;const Si=d,Ri=Mn,Fi=jn;class ji extends Si.Base{constructor(e,t){super(e),this._channel=t,this.Layout=new Fi.LayoutModule(this.wire)}async init(e){if(!fin.__internal_.isPlatform||fin.me.name!==fin.me.uuid)throw new Error(\"fin.Platform.init should only be called from a custom platform provider running in the main window of the application.\");return this.wire.environment.initPlatform(this.fin,e)}async wrap(e){return this.wire.sendAction(\"platform-wrap\").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}wrapSync(e){return this.wire.sendAction(\"platform-wrap-sync\").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}async getCurrent(){return this.wire.sendAction(\"platform-get-current\").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction(\"platform-get-current-sync\").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}start(e){return this.wire.sendAction(\"platform-start\").catch((e=>{})),new Promise((async(t,n)=>{try{const{uuid:n}=e,i=await this.fin.Application._create({...e,isPlatformController:!0});i.once(\"platform-api-ready\",(()=>t(this.wrapSync({uuid:n})))),i._run({uuid:n})}catch(e){n(e)}}))}startFromManifest(e,t){return this.wire.sendAction(\"platform-start-from-manifest\").catch((e=>{})),new Promise((async(n,i)=>{try{const i=await this.fin.Application._createFromManifest(e);i.once(\"platform-api-ready\",(()=>n(this.wrapSync({uuid:i.identity.uuid})))),i._run(t)}catch(e){i(e)}}))}}Pn.PlatformModule=ji,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Pn,e),n(Mn,e)}(An);var ki={};!function(e){Object.defineProperty(e,\"__esModule\",{value:!0}),e.getMe=e.getBaseMe=e.environmentUnsupportedMessage=void 0;const t=J(),n=un,i=ie(),r=rn;function o(e,t,n){return{...{isView:\"view\"===e,isWindow:\"window\"===e,isFrame:\"iframe\"===e,isExternal:\"external connection\"===e},uuid:t,name:n,entityType:e}}e.environmentUnsupportedMessage=\"You are not running in OpenFin.\",e.getBaseMe=o,e.getMe=function(s){const{uuid:a,name:c,entityType:d}=s.me,h={setContext(){throw new Error(e.environmentUnsupportedMessage)},addContextHandler(){throw new Error(e.environmentUnsupportedMessage)},getContextGroups(){throw new Error(e.environmentUnsupportedMessage)},joinContextGroup(){throw new Error(e.environmentUnsupportedMessage)},removeFromContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getAllClientsInContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getInfoForContextGroup(){throw new Error(e.environmentUnsupportedMessage)}},l=\"Interop API has not been instantiated. Either connection has failed or you have not declared interop in your config.\",u={setContext(){throw new Error(l)},addContextHandler(){throw new Error(l)},getContextGroups(){throw new Error(l)},joinContextGroup(){throw new Error(l)},removeFromContextGroup(){throw new Error(l)},getAllClientsInContextGroup(){throw new Error(l)},getInfoForContextGroup(){throw new Error(l)}},p={eventNames:()=>{throw new Error(e.environmentUnsupportedMessage)},emit:()=>{throw new Error(e.environmentUnsupportedMessage)},listeners:()=>{throw new Error(e.environmentUnsupportedMessage)},listenerCount:()=>{throw new Error(e.environmentUnsupportedMessage)},on:()=>{throw new Error(e.environmentUnsupportedMessage)},addListener:()=>{throw new Error(e.environmentUnsupportedMessage)},once:()=>{throw new Error(e.environmentUnsupportedMessage)},prependListener:()=>{throw new Error(e.environmentUnsupportedMessage)},prependOnceListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeAllListeners:()=>{throw new Error(e.environmentUnsupportedMessage)}};switch(d){case\"view\":return Object.assign(new t.View(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case\"window\":return Object.assign(new i._Window(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case\"iframe\":return Object.assign(new n._Frame(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case\"external connection\":return Object.assign(new r.ExternalApplication(s,{uuid:a}),o(d,a,c),{interop:u,isOpenFin:!1});default:return{...o(d,a,c),...p,interop:h,isOpenFin:!1}}}}(ki);var Li={},Ti={},$i={};Object.defineProperty($i,\"__esModule\",{value:!0}),$i.createWarningObject=$i.createUnusableObject=void 0,$i.createUnusableObject=function(e){const t=()=>{throw new Error(e)};return new Proxy({},{apply:t,construct:t,defineProperty:t,deleteProperty:t,get:t,getOwnPropertyDescriptor:t,getPrototypeOf:t,has:t,isExtensible:t,ownKeys:t,preventExtensions:t,set:t,setPrototypeOf:t})},$i.createWarningObject=function(e,t){return new Proxy(t,{get:(...t)=>(console.warn(e),Reflect.get(...t)),set:(...t)=>(console.warn(e),Reflect.set(...t)),getOwnPropertyDescriptor:(...t)=>(console.warn(e),Reflect.getOwnPropertyDescriptor(...t)),ownKeys:(...t)=>(console.warn(e),Reflect.ownKeys(...t))})};var Bi,Gi={},Wi={};var Hi={};!function(e){Object.defineProperty(e,\"__esModule\",{value:!0}),e.wrapIntentHandler=e.BROKER_ERRORS=e.generateOverrideWarning=e.generateOverrideError=e.wrapContextHandler=e.wrapInTryCatch=e.generateId=void 0;e.generateId=()=>`${Math.random()}${Date.now()}`;e.wrapInTryCatch=(e,t)=>(...n)=>{try{return e(...n)}catch(e){throw new Error((t||\"\")+e)}};e.wrapContextHandler=(e,t)=>async n=>{try{await e(n)}catch(e){throw console.error(`Error thrown by handler ${t} for context type ${n.type}: ${e}`),e}};e.generateOverrideError=(e,t)=>`You have tried to to use ${e} but ${t} has not been overridden in the Interop Broker. Please override this function. Refer to our documentation for more info.`;e.generateOverrideWarning=(e,t,n,i)=>{const{uuid:r,name:o}=n;return i?`Entity with identity: ${r}/${o} has called ${i} or ${e} but ${t} has not been overridden.`:`Entity with identity: ${r}/${o} has called ${e} but ${t} has not been overridden.`},e.BROKER_ERRORS={fireIntent:(0,e.generateOverrideError)(\"fireIntent\",\"handleFiredIntent\"),fireIntentForContext:(0,e.generateOverrideError)(\"fireIntentForContext\",\"handleFiredIntentForContext\"),getInfoForIntent:(0,e.generateOverrideError)(\"getInfoForIntent\",\"handleInfoForIntent\"),getInfoForIntentsByContext:(0,e.generateOverrideError)(\"getInfoForIntentsByContext\",\"handleInfoForIntentsByContext\"),joinSessionContextGroupWithJoinContextGroup:\"The Context Group you have tried to join is a Session Context Group. Custom Context Groups can only be defined by the Interop Broker through code or manifest configuration. Please use joinSessionContextGroup.\",fdc3Open:(0,e.generateOverrideError)(\"fdc3.open\",\"fdc3HandleOpen\"),fdc3FindInstances:(0,e.generateOverrideError)(\"fdc3.findInstances\",\"fdc3HandleFindInstances\"),fdc3GetAppMetadata:(0,e.generateOverrideError)(\"fdc3.getAppMetadata\",\"fdc3HandleGetAppMetadata\"),fdc3GetInfo:(0,e.generateOverrideError)(\"fdc3.getInfo\",\"fdc3HandleGetInfo\")};e.wrapIntentHandler=(e,t)=>async n=>{try{return e(n)}catch(e){throw console.error(`Error thrown by handler ${t}: ${e}`),e}}}(Hi);var Ni,Di,Ui={};function Vi(){if(Di)return Gi;Di=1;var e,t,n,r=s&&s.__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},o=s&&s.__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)},a=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Gi,\"__esModule\",{value:!0}),Gi.InteropBroker=void 0;const c=d,h=a(function(){if(Bi)return Wi;Bi=1,Object.defineProperty(Wi,\"__esModule\",{value:!0});const e=Cr();return Wi.default=class{constructor(e,t){this.provider=e,this.id=t,this.lastContext=void 0,this.contextGroupMap=new Map,this.clients=new Map,this.registerListeners()}registerListeners(){this.provider.register(`sessionContextGroup:getContext-${this.id}`,this.getCurrentContext.bind(this)),this.provider.register(`sessionContextGroup:setContext-${this.id}`,this.setContext.bind(this)),this.provider.register(`sessionContextGroup:handlerAdded-${this.id}`,this.handlerAdded.bind(this)),this.provider.register(`sessionContextGroup:handlerRemoved-${this.id}`,this.handlerRemoved.bind(this))}getCurrentContext(e){return e.type?this.contextGroupMap.get(e.type):this.lastContext}setContext(t,n){const{context:i}=t,r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name} not in Session Client State Map`);this.contextGroupMap.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{e.contextHandlers.get(i.type)?.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getClientState(e){return this.clients.get(e.endpointId)}async handlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(i){const e=r.contextHandlers.get(i)||[];r.contextHandlers.set(i,[...e,n]);const o=this.contextGroupMap.get(i);o&&await this.provider.dispatch(t,n,o)}else{r.globalHandler=n;const e=[...this.contextGroupMap.keys()].map((async e=>{const i=this.contextGroupMap.get(e);i&&await this.provider.dispatch(t,n,i)}));await Promise.all(e)}}handlerRemoved(e,t){const{handlerId:n}=e,i=this.clients.get(t.endpointId);i?(Array.from(i.contextHandlers).forEach((([,e])=>{const t=e.indexOf(n);t>-1&&e.splice(t,1)})),i.globalHandler===n&&(i.globalHandler=void 0)):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={contextHandlers:new Map,clientIdentity:e,globalHandler:void 0};this.clients.set(e.endpointId,t)}}onDisconnection(e){this.clients.delete(e.endpointId)}},Wi}()),l=Hi,u=a(i),p=function(){if(Ni)return Ui;Ni=1,Object.defineProperty(Ui,\"__esModule\",{value:!0}),Ui.PrivateChannelProvider=void 0;const e=Vi();return Ui.PrivateChannelProvider=class t{constructor(e,t){this.provider=e,this.id=t,this.clients=new Map,this.registerListeners(),this.contextByContextType=new Map,this.lastContext=void 0,this.provider.onConnection((e=>this.registerNewClient(e))),this.provider.onDisconnection((async e=>{const{endpointId:t}=e;this.clients.has(t)&&await this.handleClientDisconnecting(e),0===(await this.provider.getAllClientInfo()).length&&this.provider.destroy()}))}getClientState(e){return this.clients.get(e.endpointId)}registerListeners(){this.provider.register(\"broadcast\",this.broadcast.bind(this)),this.provider.register(\"getCurrentContext\",this.getCurrentContext.bind(this)),this.provider.register(\"contextHandlerAdded\",this.contextHandlerAdded.bind(this)),this.provider.register(\"contextHandlerRemoved\",this.contextHandlerRemoved.bind(this)),this.provider.register(\"nonStandardHandlerRemoved\",this.nonStandardHandlerRemoved.bind(this)),this.provider.register(\"onAddContextHandlerAdded\",this.onAddContextHandlerAdded.bind(this)),this.provider.register(\"onDisconnectHandlerAdded\",this.onDisconnectHandlerAdded.bind(this)),this.provider.register(\"onUnsubscribeHandlerAdded\",this.onUnsubscribeHandlerAdded.bind(this)),this.provider.register(\"clientDisconnecting\",((e,t)=>{this.handleClientDisconnecting(t)}))}broadcast(t,n){const{context:i}=t;if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name}, tried to call broadcast, is not connected to this Private Channel`);const r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to broadcast - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);this.contextByContextType.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{const t=e.handlerIdsByContextTypes.get(i.type);t&&t.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getCurrentContext(e,t){const{contextType:n}=e;if(!this.getClientState(t))throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call getCurrentContext, is not connected to this Private Channel`);if(void 0!==n){return this.contextByContextType.get(n)||null}return this.lastContext?this.lastContext:null}contextHandlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call addContextListener, is not connected to this Private Channel`);if(i){const e=r.handlerIdsByContextTypes.get(i)||[];r.handlerIdsByContextTypes.set(i,[...e,n])}else r.globalHandler=n;Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&e.onAddContextListenerHandlerId&&this.provider.dispatch(e.clientIdentity,e.onAddContextListenerHandlerId,i)}))}async contextHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);if(i){let e;if(i.globalHandler===n)i.globalHandler=void 0;else for(const[t,r]of i.handlerIdsByContextTypes){const i=r.indexOf(n);i>-1&&(r.splice(i,1),e=t)}const r=(await this.getConnectedClients()).map((async n=>{const{clientIdentity:i,clientIdentity:{endpointId:r},onUnsubscribeHandlerId:o}=n;r!==t.endpointId&&o&&await this.provider.dispatch(i,o,e)}));try{await Promise.all(r)}catch(e){throw console.error(`Problem when attempting to dispatch to onUnsubscribeHandlers. Error: ${e} Removing Client: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}`),new Error(e)}}else console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}.`)}nonStandardHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);i?i.onDisconnectHandlerId===n?i.onDisconnectHandlerId=void 0:i.onAddContextListenerHandlerId===n?i.onAddContextListenerHandlerId=void 0:i.onUnsubscribeHandlerId===n&&(i.onUnsubscribeHandlerId=void 0):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}onAddContextHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onAddContextListener, is not connected to this Private Channel`);n.onAddContextListenerHandlerId=i,Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&Array.from(e.handlerIdsByContextTypes.keys()).forEach((e=>{this.provider.dispatch(t,i,e)}))}))}onDisconnectHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onDisconnect, is not connected to this Private Channel`);n.onDisconnectHandlerId=i}onUnsubscribeHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onUnsubscribe, is not connected to this Private Channel`);n.onUnsubscribeHandlerId=i}removeClient(e){const t=this.getClientState(e);if(!t)throw new Error(`Client with Identity: ${e.uuid} ${e.name}, tried to call disconnect, is not connected to this Private Channel`);t.handlerIdsByContextTypes.clear(),this.clients.delete(e.endpointId)}async fireOnDisconnectForOtherClients(e){const{endpointId:t}=e,n=(await this.getConnectedClients()).map((async e=>{const{clientIdentity:{endpointId:n},onDisconnectHandlerId:i}=e;n!==t&&i&&await this.provider.dispatch(e.clientIdentity,i)}));try{await Promise.all(n)}catch(t){throw console.error(`Problem when attempting to dispatch to onDisconnectHandlers. Error: ${t} Disconnecting Client: uuid: ${e.uuid}. name: ${e.name}. endpointId: ${e.endpointId}`),new Error(t)}}async unsubscribeAll(e){const{endpointId:t}=e,n=this.clients.get(t);if(n){const t=Array.from(n.handlerIdsByContextTypes.values()).flat(),i=n.globalHandler;if(t.length>0){const n=t.map((async t=>this.contextHandlerRemoved({handlerId:t},e)));try{await Promise.all(n)}catch(e){console.error(e.message)}}if(i)try{await this.contextHandlerRemoved({handlerId:i},e)}catch(e){console.error(e.message)}}}async handleClientDisconnecting(e){await this.unsubscribeAll(e),this.removeClient(e),await this.fireOnDisconnectForOtherClients(e)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={clientIdentity:e,handlerIdsByContextTypes:new Map,globalHandler:void 0,onAddContextListenerHandlerId:void 0,onUnsubscribeHandlerId:void 0,onDisconnectHandlerId:void 0};this.clients.set(e.endpointId,t)}}async getConnectedClients(){const e=await this.provider.getAllClientInfo();return Array.from(this.clients.values()).filter((t=>{const{uuid:n,name:i}=t.clientIdentity;return e.some((e=>i===e.name&&n===e.uuid))}))}static init(e,n){return new t(e,n)}},Ui}(),w=G,y=[{id:\"green\",displayMetadata:{color:\"#00CC88\",name:\"green\"}},{id:\"purple\",displayMetadata:{color:\"#8C61FF\",name:\"purple\"}},{id:\"orange\",displayMetadata:{color:\"#FF8C4C\",name:\"orange\"}},{id:\"red\",displayMetadata:{color:\"#FF5E60\",name:\"red\"}},{id:\"pink\",displayMetadata:{color:\"#FF8FB8\",name:\"pink\"}},{id:\"yellow\",displayMetadata:{color:\"#E9FF8F\",name:\"yellow\"}}];let f=class i extends c.Base{constructor(i,s,a){super(i),e.set(this,void 0),t.set(this,void 0),n.set(this,void 0),this.getProvider=()=>o(this,n,\"f\").getValue(),this.interopClients=new Map,this.contextGroupsById=new Map,r(this,t,a.contextGroups??[...y],\"f\"),r(this,e,a.fdc3Info,\"f\"),a?.logging&&(this.logging=a.logging),this.intentClientMap=new Map,this.lastContextMap=new Map,this.sessionContextGroupMap=new Map,r(this,n,new w.Lazy(s),\"f\"),this.setContextGroupMap(),this.setupChannelProvider()}static createClosedConstructor(...e){return class extends i{constructor(...t){if(t.length){const[n,i,r]=t;if(r&&\"object\"==typeof r&&!(0,u.default)(r,e[2]))return console.warn(\"You have modified the parameters of the InteropOverride constructor. This behavior is deprecated and will be removed in a future version. You can modify these options in your manifest. Please consult our Interop docs for guidance on migrating to the new override scheme.\"),void super(e[0],e[1],r);console.warn(\"You are attempting to pass arguments to the InteropOverride constructor. This is not necessary, and these passed arguments will be ignored. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.\")}super(...e)}}}setContext({context:e},t){this.wire.sendAction(\"interop-broker-set-context\").catch((e=>{}));const n=this.getClientState(t);if(!n||!n.contextGroupId)throw n?new Error(\"You must join a context group before you can set context.\"):new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);{const{contextGroupId:t}=n;this.setContextForGroup({context:e},t)}}setContextForGroup({context:e},t){this.wire.sendAction(\"interop-broker-set-context-for-group\").catch((e=>{}));const n=this.contextGroupsById.get(t);if(!n)throw new Error(`Unable to set context for context group that isn't in the context group mapping: ${t}.`);const r=i.checkContextIntegrity(e);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(e)}`);const o=e.type;n.set(o,e),this.lastContextMap.set(t,o);Array.from(this.interopClients.values()).filter((e=>e.contextGroupId===t)).forEach((t=>{for(const[,n]of t.contextHandlers)i.isContextTypeCompatible(o,n.contextType)&&this.invokeContextHandler(t.clientIdentity,n.handlerId,e)}))}getCurrentContext(e,t){this.wire.sendAction(\"interop-broker-get-current-context\").catch((e=>{}));const n=this.getClientState(t);if(!n?.contextGroupId)throw new Error(\"You must be a member of a context group to call getCurrentContext\");const{contextGroupId:i}=n,r=this.contextGroupsById.get(i),o=this.lastContextMap.get(i),s=e?.contextType??o;return r&&s?r.get(s):void 0}async joinContextGroup({contextGroupId:e,target:t},n){if(this.wire.sendAction(\"interop-broker-join-context-group\").catch((e=>{})),this.sessionContextGroupMap.has(e))throw new Error(l.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup);if(t){i.hasEndpointId(t)&&await this.addClientToContextGroup({contextGroupId:e},t);try{const n=this.channel.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name));if(!n.length)throw new Error(`Given Identity ${t.uuid} ${t.name} is not connected to the Interop Broker.`);n.length>1&&console.warn(`More than one connection found for identity ${t.uuid} ${t.name}`);const i=[];for(const t of n)i.push(this.addClientToContextGroup({contextGroupId:e},t));await Promise.all(i)}catch(e){throw new Error(e)}}else await this.addClientToContextGroup({contextGroupId:e},n)}async addClientToContextGroup({contextGroupId:e},t){this.wire.sendAction(\"interop-broker-add-client-to-context-group\").catch((e=>{}));const n=this.getClientState(t);if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(!this.getContextGroups().find((t=>t.id===e)))throw new Error(`Attempting to join a context group that does not exist: ${e}. You may only join existing context groups.`);if(n.contextGroupId!==e){n.contextGroupId=e,await this.setCurrentContextGroupInClientOptions(t,e);const i=this.contextGroupsById.get(e);for(const[,e]of n.contextHandlers){const{contextType:n,handlerId:r}=e;if(void 0===n)i.forEach(((e,n)=>{this.invokeContextHandler(t,r,e)}));else if(i.has(n)){const e=i.get(n);e&&this.invokeContextHandler(t,r,e)}}}}async removeFromContextGroup({target:e},t){if(this.wire.sendAction(\"interop-broker-remove-from-context-group\").catch((e=>{})),e){i.hasEndpointId(e)&&await this.removeClientFromContextGroup(e);try{const t=this.channel.connections.filter((t=>t.uuid===e.uuid&&t.name===e.name));if(!t.length)throw new Error(`No connection found for given Identity ${e.uuid} ${e.name}`);t.length>1&&console.warn(`More than one connection found for identity ${e.uuid} ${e.name}`);const n=[];for(const e of t)n.push(this.removeClientFromContextGroup(e));await Promise.all(n)}catch(e){throw new Error(e)}}else await this.removeClientFromContextGroup(t)}async removeClientFromContextGroup(e){this.wire.sendAction(\"interop-broker-remove-client-from-context-group\").catch((e=>{}));const t=this.getClientState(e);t&&(t.contextGroupId=void 0),await this.setCurrentContextGroupInClientOptions(e,null)}getContextGroups(){return this.wire.sendAction(\"interop-broker-get-context-groups\").catch((e=>{})),o(this,t,\"f\").map((e=>({...e})))}getInfoForContextGroup({contextGroupId:e}){return this.wire.sendAction(\"interop-broker-get-info-for-context-group\").catch((e=>{})),this.getContextGroups().find((t=>t.id===e))}getAllClientsInContextGroup({contextGroupId:e}){this.wire.sendAction(\"interop-broker-get-all-clients-in-context-group\").catch((e=>{}));return Array.from(this.interopClients.values()).filter((t=>t.contextGroupId===e)).map((e=>e.clientIdentity))}async handleFiredIntent(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.raiseIntent\",\"InteropBroker.handleFiredIntent\",t,\"interopClient.fireIntent\");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntent)}async setIntentTarget(e,t){this.wire.sendAction(\"interop-broker-set-intent-target\").catch((e=>{}));const n=this.intentClientMap.get(t.name),i=`intent-handler-${e.name}`;if(n){const t=n.get(i);if(t){if(t.pendingIntents.push(e),t.clientIdentity&&t.isReady){const{clientIdentity:e,pendingIntents:n}=t;try{const r=n[n.length-1];await this.invokeIntentHandler(e,i,r),t.pendingIntents=[]}catch(n){console.error(`Error invoking intent handler for client ${e.uuid}/${e.name}/${e.endpointId}`),t.isReady=!1}}}else n.set(i,{isReady:!1,pendingIntents:[e]})}else{this.intentClientMap.set(t.name,new Map);const n=this.intentClientMap.get(t.name);n&&n.set(i,{isReady:!1,pendingIntents:[e]})}}async handleInfoForIntent(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.findIntent\",\"InteropBroker.handleInfoForIntent\",t,\"interopClient.getInfoForIntent\");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntent)}async handleInfoForIntentsByContext(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.findIntentsByContext\",\"InteropBroker.handleInfoForIntentsByContext\",t,\"interopClient.getInfoForIntentsByContext\");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntentsByContext)}async handleFiredIntentForContext(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.raiseIntentForContext\",\"InteropBroker.handleFiredIntentForContext\",t,\"interopClient.fireIntentForContext\");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntentForContext)}async clientDisconnected(e){}async fdc3HandleOpen({app:e,context:t},n){const i=(0,l.generateOverrideWarning)(\"fdc3.open\",\"InteropBroker.fdc3HandleOpen\",n);throw console.warn(i),new Error(l.BROKER_ERRORS.fdc3Open)}async fdc3HandleFindInstances(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.open\",\"InteropBroker.fdc3HandleFindInstances\",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3FindInstances)}async fdc3HandleGetAppMetadata(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.getAppMetadata\",\"InteropBroker.fdc3HandleGetAppMetadata\",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3GetAppMetadata)}async invokeContextHandler(e,t,n){const i=await this.getProvider();try{await i.dispatch(e,t,n)}catch(i){console.error(`Error invoking context handler ${t} for context type ${n.type} in client ${e.uuid}/${e.name}/${e.endpointId}`,i)}}async invokeIntentHandler(e,t,n){const i=await this.getProvider();await i.dispatch(e,t,n)}async fdc3HandleGetInfo(t,n){const{fdc3Version:i}=t;return{fdc3Version:i,...o(this,e,\"f\"),optionalFeatures:{OriginatingAppMetadata:!1,UserChannelMembershipAPIs:!0},appMetadata:{appId:\"\",instanceId:\"\"}}}async getAllClientInfo(){return(await this.getProvider()).getAllClientInfo()}decorateSnapshot(e){return{...e,interopSnapshotDetails:{contextGroupStates:this.getContextGroupStates()}}}applySnapshot(e,t){const n=e?.interopSnapshotDetails?.contextGroupStates;n&&(t?.closeExistingWindows||this.updateExistingClients(n),this.rehydrateContextGroupStates(n))}updateExistingClients(e){this.interopClients.forEach((t=>{const{clientIdentity:n,contextGroupId:r,contextHandlers:o}=t;if(r){const t=e[r];for(const[,e]of Object.entries(t))o.forEach((t=>{const{handlerId:r,contextType:o}=t;i.isContextTypeCompatible(e.type,o)&&this.invokeContextHandler(n,r,e)}))}}))}getContextGroupStates(){return i.toObject(this.contextGroupsById)}rehydrateContextGroupStates(e){const t=Object.entries(e);for(const[e,n]of t){const t=Object.entries(n);for(const[n,i]of t)if(this.contextGroupsById.has(e)){this.contextGroupsById.get(e).set(n,i)}else console.warn(`Attempting to set a context group that isn't in the context group mapping. Skipping context group rehydration for: ${e}`)}}contextHandlerRegistered({contextType:e,handlerId:t},n){const i={contextType:e,handlerId:t},r=this.getClientState(n);if(r?.contextHandlers.set(t,i),r&&r.contextGroupId){const{contextGroupId:i}=r,o=this.contextGroupsById.get(i);if(void 0===e)o.forEach(((e,i)=>{this.invokeContextHandler(n,t,e)}));else if(o.has(e)){const i=o.get(e);i&&this.invokeContextHandler(n,t,i)}}}async intentHandlerRegistered(e,t){const{handlerId:n}=e,i=this.intentClientMap.get(t.name),r=i?.get(n);if(i)if(r){const{pendingIntents:e}=r;r.clientIdentity=t,r.isReady=!0;try{if(e.length>0){const i=e[e.length-1];await this.invokeIntentHandler(t,n,i),r.pendingIntents=[]}}catch(e){console.error(`Error invoking intent handler: ${n} for client ${t.uuid}/${t.name}/${t.endpointId}`)}}else i.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t});else{this.intentClientMap.set(t.name,new Map);const e=this.intentClientMap.get(t.name);e&&e.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t})}}removeContextHandler({handlerId:e},t){const n=this.getClientState(t);n&&n.contextHandlers.delete(e)}handleJoinSessionContextGroup({sessionContextGroupId:e},t){try{if(!e)throw new Error(\"Failed to join session context group: must specify group id.\");const n=this.sessionContextGroupMap.get(e);if(n)n.registerNewClient(t);else{const n=new h.default(this.channel,e);n.registerNewClient(t),this.sessionContextGroupMap.set(e,n)}return{hasConflict:this.contextGroupsById.has(e)}}catch(e){throw new Error(e)}}getClientState(e){return this.interopClients.get(e.endpointId)}static toObject(e){const t=Object.fromEntries(e),n={};return Object.entries(t).forEach((([e,t])=>{const i=Object.fromEntries(t);n[e]=i})),n}static checkContextIntegrity(e){if(!e)return{isValid:!1,reason:\"No context supplied\"};if(\"object\"!=typeof e)return{isValid:!1,reason:\"Context must be an Object\"};if(!e.type)return{isValid:!1,reason:\"Context must have a type property\"};if(e.id&&\"object\"!=typeof e.id)return{isValid:!1,reason:\"Context id must be an Object populated with key-value identifiers (if set)\"};if(e.id){const{id:t}=e,n=Object.keys(t);let i=!1;if(!n.length)return{isValid:!1,reason:\"Context id must have at least one key-value identifier\"};if(n.forEach((e=>{\"string\"==typeof e&&\"string\"==typeof t[e]||(i=!0)})),i)return{isValid:!1,reason:\"Context id key-value identifiers must be of type string\"}}return e.name&&\"string\"!=typeof e.name?{isValid:!1,reason:\"Context name must be of string type (if set)\"}:{isValid:!0}}static hasEndpointId(e){return void 0!==e.endpointId}static isContextTypeCompatible(e,t){return void 0===t||e===t}setContextGroupMap(){for(const e of this.getContextGroups())this.contextGroupsById.set(e.id,new Map)}async setCurrentContextGroupInClientOptions(e,t){try{const n=await this.fin.System.getEntityInfo(e.uuid,e.name);let i;\"view\"===n.entityType?i=await this.fin.View.wrap(e):\"window\"===n.entityType&&(i=await this.fin.Window.wrap(e)),i&&await i.updateOptions({interop:{currentContextGroup:t}})}catch(e){}}async setupChannelProvider(){try{const e=await this.getProvider();this.channel=e,this.wireChannel(e)}catch(e){throw new Error(`Error setting up Interop Broker Channel Provider: ${e}`)}}wireChannel(e){e.onConnection((async(e,t)=>{if(!await this.isConnectionAuthorized(e,t))throw new Error(`Connection not authorized for ${e.uuid}, ${e.name}`);if(!e.endpointId)throw new Error(\"Version too old to be compatible with Interop. Please upgrade your runtime to a more recent version.\");const n={contextGroupId:void 0,contextHandlers:new Map,clientIdentity:e};t?.currentContextGroup&&this.contextGroupsById.has(t.currentContextGroup)&&(n.contextGroupId=t?.currentContextGroup),this.interopClients.set(e.endpointId,n)})),e.onDisconnection((e=>{this.interopClients.delete(e.endpointId);const t=this.intentClientMap.get(e.name);t&&e.uuid===this.fin.me.uuid&&t.forEach((e=>{e.isReady=!1})),this.sessionContextGroupMap.forEach((t=>{t.onDisconnection(e)})),this.clientDisconnected(e)})),e.beforeAction((async(e,t,n)=>{if(!await this.isActionAuthorized(e,t,n))throw new Error(`Action (${e}) not authorized for ${n.uuid}, ${n.name}`);this.logging?.beforeAction?.enabled&&console.log(e,t,n)})),e.afterAction(((e,t,n)=>{this.logging?.afterAction?.enabled&&console.log(e,t,n)})),e.register(\"setContext\",this.setContext.bind(this)),e.register(\"fireIntent\",this.handleFiredIntent.bind(this)),e.register(\"getCurrentContext\",this.getCurrentContext.bind(this)),e.register(\"getInfoForIntent\",this.handleInfoForIntent.bind(this)),e.register(\"getInfoForIntentsByContext\",this.handleInfoForIntentsByContext.bind(this)),e.register(\"fireIntentForContext\",this.handleFiredIntentForContext.bind(this)),e.register(\"getContextGroups\",this.getContextGroups.bind(this)),e.register(\"joinContextGroup\",this.joinContextGroup.bind(this)),e.register(\"removeFromContextGroup\",this.removeFromContextGroup.bind(this)),e.register(\"getAllClientsInContextGroup\",this.getAllClientsInContextGroup.bind(this)),e.register(\"getInfoForContextGroup\",this.getInfoForContextGroup.bind(this)),e.register(\"contextHandlerRegistered\",this.contextHandlerRegistered.bind(this)),e.register(\"intentHandlerRegistered\",this.intentHandlerRegistered.bind(this)),e.register(\"removeContextHandler\",this.removeContextHandler.bind(this)),e.register(\"sessionContextGroup:createIfNeeded\",this.handleJoinSessionContextGroup.bind(this)),e.register(\"fdc3Open\",this.fdc3HandleOpen.bind(this)),e.register(\"fdc3v2FindIntentsByContext\",this.handleInfoForIntentsByContext.bind(this)),e.register(\"fdc3FindInstances\",this.fdc3HandleFindInstances.bind(this)),e.register(\"fdc3GetAppMetadata\",this.fdc3HandleGetAppMetadata.bind(this)),e.register(\"fdc3v2GetInfo\",(async(e,t)=>this.fdc3HandleGetInfo.bind(this)(e,t))),e.register(\"createPrivateChannelProvider\",(async e=>{const{channelId:t}=e,n=await this.fin.InterApplicationBus.Channel.create(t);p.PrivateChannelProvider.init(n,t)}))}isConnectionAuthorized(e,t){return this.wire.sendAction(\"interop-broker-is-connection-authorized\").catch((e=>{})),Promise.resolve(!0)}isActionAuthorized(e,t,n){return this.wire.sendAction(\"interop-broker-is-action-authorized\").catch((e=>{})),Promise.resolve(!0)}};return Gi.InteropBroker=f,e=new WeakMap,t=new WeakMap,n=new WeakMap,Gi}var zi,Ki={},qi={},Ji=s&&s.__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},Yi=s&&s.__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)};Object.defineProperty(qi,\"__esModule\",{value:!0});const Zi=d,Qi=Hi;class Xi extends Zi.Base{constructor(e,t,n){super(e),zi.set(this,void 0),this.id=n,Ji(this,zi,t,\"f\")}async setContext(e){this.wire.sendAction(\"interop-session-context-group-set-context\").catch((e=>{}));return(await Yi(this,zi,\"f\")).dispatch(`sessionContextGroup:setContext-${this.id}`,{sessionContextGroupId:this.id,context:e})}async getCurrentContext(e){this.wire.sendAction(\"interop-session-context-group-get-context\").catch((e=>{}));return(await Yi(this,zi,\"f\")).dispatch(`sessionContextGroup:getContext-${this.id}`,{sessionContextGroupId:this.id,type:e})}async addContextHandler(e,t){if(this.wire.sendAction(\"interop-session-context-group-add-handler\").catch((e=>{})),\"function\"!=typeof e)throw new Error(\"Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.\");const n=await Yi(this,zi,\"f\");let i;return i=t?`sessionContextHandler:invoke-${this.id}-${t}-${(0,Qi.generateId)()}`:`sessionContextHandler:invoke-${this.id}`,n.register(i,(0,Qi.wrapContextHandler)(e,i)),await n.dispatch(`sessionContextGroup:handlerAdded-${this.id}`,{handlerId:i,contextType:t}),{unsubscribe:await this.createUnsubscribeCb(i)}}async createUnsubscribeCb(e){const t=await Yi(this,zi,\"f\");return async()=>{t.remove(e),await t.dispatch(`sessionContextGroup:handlerRemoved-${this.id}`,{handlerId:e})}}getUserInstance(){return{id:this.id,setContext:(0,Qi.wrapInTryCatch)(this.setContext.bind(this),\"Failed to set context: \"),getCurrentContext:(0,Qi.wrapInTryCatch)(this.getCurrentContext.bind(this),\"Failed to get context: \"),addContextHandler:(0,Qi.wrapInTryCatch)(this.addContextHandler.bind(this),\"Failed to add context handler: \")}}}qi.default=Xi,zi=new WeakMap;var er={},tr={},nr={},ir={},rr=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),or=s&&s.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,\"default\",{enumerable:!0,value:t})}:function(e,t){e.default=t}),sr=s&&s.__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)&&rr(t,e,n);return or(t,e),t};Object.defineProperty(ir,\"__esModule\",{value:!0}),ir.PrivateChannelClient=void 0;const ar=sr(Hi);var cr,dr;function hr(){if(cr)return tr;cr=1;var e,t=s&&s.__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)},n=s&&s.__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},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(tr,\"__esModule\",{value:!0}),tr.FDC3ModuleBase=void 0;const o=nr,a=Hi,c=wr(),d=r(i);return tr.FDC3ModuleBase=class{get client(){return t(this,e,\"f\").call(this)}get fin(){return this.wire.getFin()}constructor(t,i){this.wire=i,e.set(this,void 0),n(this,e,t,\"f\")}async broadcast(e){return this.wire.sendAction(\"fdc3-broadcast\").catch((e=>{})),this.client.setContext(e)}async _open(e,t){this.wire.sendAction(\"fdc3-open\").catch((e=>{}));try{return await c.InteropClient.ferryFdc3Call(this.client,\"fdc3Open\",{app:e,context:t})}catch(e){const t=e.message===a.BROKER_ERRORS.fdc3Open?\"ResolverUnavailable\":e.message;throw new Error(t)}}async _getChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:\"system\",...(0,o.getUnsupportedChannelApis)()})))}async getOrCreateChannel(e){this.wire.sendAction(\"fdc3-get-or-create-channel\").catch((e=>{}));const t=(await this._getChannels()).find((t=>t.id===e));if(t)return{...t,type:\"system\",...(0,o.getUnsupportedChannelApis)()};try{const t=await this.client.joinSessionContextGroup(e);return(0,o.buildAppChannelObject)(t)}catch(e){throw console.error(e.message),new Error(o.ChannelError.CreationFailed)}}async getSystemChannels(){return this.wire.sendAction(\"fdc3-get-system-channels\").catch((e=>{})),this._getChannels()}async joinChannel(e){this.wire.sendAction(\"fdc3-join-channel\").catch((e=>{}));try{return await this.client.joinContextGroup(e)}catch(e){if(e.message===a.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup?console.error(\"The Channel you have tried to join is an App Channel. Custom Channels can only be defined by the Interop Broker through code or manifest configuration. Please use getOrCreateChannel.\"):console.error(e.message),e.message.startsWith(\"Attempting to join a context group that does not exist\"))throw new Error(o.ChannelError.NoChannelFound);throw new Error(o.ChannelError.AccessDenied)}}async getCurrentChannel(){this.wire.sendAction(\"fdc3-get-current-channel\").catch((e=>{}));const e=await this.getCurrentContextGroupInfo();return e?this.buildChannelObject(e):null}async leaveCurrentChannel(){return this.wire.sendAction(\"fdc3-leave-current-channel\").catch((e=>{})),this.client.removeFromContextGroup()}async getCurrentContextGroupInfo(){const e=await this.client.getContextGroups(),t=e.map((async e=>this.client.getAllClientsInContextGroup(e.id))),n=(await Promise.all(t)).findIndex((e=>e.some((e=>{const{uuid:t,name:n}=e;return this.wire.me.uuid===t&&this.wire.me.name===n}))));return e[n]}async buildChannelObject(e){return{...e,type:\"system\",addContextListener:(...[e,t])=>{let n,i;\"function\"==typeof e?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),n=e):(n=t,\"string\"==typeof e&&(i=e));const r=(async()=>{let e=!0;const t=await this.client.getCurrentContext(i);return this.client.addContextHandler(((i,r)=>{if(!e||(e=!1,!(0,d.default)(t,i)))return n(i,r)}),i)})();return{...r,unsubscribe:()=>r.then((e=>e.unsubscribe()))}},broadcast:this.broadcast.bind(this),getCurrentContext:async e=>{const t=await this.client.getCurrentContext(e);return void 0===t?null:t}}}},e=new WeakMap,tr}ir.PrivateChannelClient=class{constructor(e,t){this.id=t,this.client=e,this.listeners=new Map}async broadcast(e){return this.client.dispatch(\"broadcast\",{context:e})}async getCurrentContext(e){return this.client.dispatch(\"getCurrentContext\",{contextType:e})}async addContextListener(e,t){if(\"function\"!=typeof t)throw new Error(\"Non-function argument passed to the second parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.\");let n;n=e?`contextHandler:invoke-${this.id}-${e}-${ar.generateId()}`:`contextHandler:invoke-${this.id}-${ar.generateId()}`,this.client.register(n,ar.wrapContextHandler(t,n));const i={unsubscribe:await this.createContextUnsubscribeCb(n)};return this.listeners.set(n,i),await this.client.dispatch(\"contextHandlerAdded\",{handlerId:n,contextType:e}),i}createNonStandardUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch(\"nonStandardHandlerRemoved\",{handlerId:e})}}createContextUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch(\"contextHandlerRemoved\",{handlerId:e})}}onAddContextListener(e){const t=`onContextHandlerAdded:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch(\"onAddContextHandlerAdded\",{handlerId:t}),n}onDisconnect(e){const t=`onDisconnect:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch(\"onDisconnectHandlerAdded\",{handlerId:t}),n}onUnsubscribe(e){const t=`onUnsubscribe:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch(\"onUnsubscribeHandlerAdded\",{handlerId:t}),n}async cleanUpAllSubs(){Array.from(this.listeners.keys()).forEach((e=>{this.client.remove(e),this.listeners.delete(e)}))}async disconnect(){try{await this.client.dispatch(\"clientDisconnecting\"),await this.cleanUpAllSubs(),await this.client.disconnect()}catch(e){throw new Error(e.message)}}},function(e){var t=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,\"__esModule\",{value:!0}),e.getIntentResolution=e.isChannel=e.isContext=e.connectPrivateChannel=e.buildAppChannelObject=e.buildPrivateChannelObject=e.ChannelError=e.ResultError=e.UnsupportedChannelApiError=e.getUnsupportedChannelApis=void 0;const n=Hi,r=ir,o=t(i);e.getUnsupportedChannelApis=e=>({addContextListener:()=>{throw new a(\"Channel.addContextListener\",e)},broadcast:()=>{throw new a(\"Channel.broadcast\",e)},getCurrentContext:()=>{throw new a(\"Channel.getCurrentContext\",e)}});class a extends Error{constructor(e,t=\"System\"){super(e),this.message=`Calling ${e} on an instance of a ${t} Channel returned by fdc3.get${t}Channels is not supported. If you would like to use a ${t} Channel, please use fdc3.joinChannel, fdc3.addContextListener, and fdc3.broadcast instead.`}}var c,d;e.UnsupportedChannelApiError=a,function(e){e.NoResultReturned=\"NoResultReturned\",e.IntentHandlerRejected=\"IntentHandlerRejected\"}(c=e.ResultError||(e.ResultError={})),(d=e.ChannelError||(e.ChannelError={})).NoChannelFound=\"NoChannelFound\",d.AccessDenied=\"AccessDenied\",d.CreationFailed=\"CreationFailed\";e.buildPrivateChannelObject=e=>{let t=!1;const n=()=>{if(t)throw new Error(\"Private Channel Client has been disconnected from the Private Channel\")};return{id:e.id,type:\"private\",broadcast:async t=>(n(),e.broadcast(t)),getCurrentContext:async t=>(n(),e.getCurrentContext(t)),addContextListener:async(t,i)=>{n();let r=i,o=t;\"function\"==typeof t&&(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),r=t,o=null);return e.addContextListener(o,r)},onAddContextListener:t=>(n(),e.onAddContextListener(t)),disconnect:async()=>(n(),t=!0,e.disconnect()),onDisconnect:t=>(n(),e.onDisconnect(t)),onUnsubscribe:t=>(n(),e.onUnsubscribe(t))}};e.buildAppChannelObject=e=>({id:e.id,type:\"app\",broadcast:e.setContext,getCurrentContext:async t=>{const n=await e.getCurrentContext(t);return void 0===n?null:n},addContextListener:(t,n)=>{let i,r;\"function\"==typeof t?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),i=t):(i=n,\"string\"==typeof t&&(r=t));const s=(async()=>{let t=!0;const n=await e.getCurrentContext(r);return e.addContextHandler(((e,r)=>{if(!t||(t=!1,!(0,o.default)(n,e)))return i(e,r)}),r)})();return{...s,unsubscribe:()=>s.then((e=>e.unsubscribe()))}}});e.connectPrivateChannel=async t=>{try{const n=await fin.InterApplicationBus.Channel.connect(t),i=new r.PrivateChannelClient(n,t);return(0,e.buildPrivateChannelObject)(i)}catch(e){throw new Error(`Private Channel with id: ${t} doesn't exist`)}};e.isContext=e=>{if(e&&\"object\"==typeof e&&\"type\"in e){const{type:t}=e;return\"string\"==typeof t}return!1};e.isChannel=e=>{if(e&&\"object\"==typeof e&&\"type\"in e&&\"id\"in e){const{type:t,id:n}=e;return\"string\"==typeof t&&\"string\"==typeof n&&(\"app\"===t||\"private\"===t)}return!1};e.getIntentResolution=async(t,i,r,o)=>{const s=(0,n.generateId)(),a=new Promise(((e,t)=>{fin.InterApplicationBus.subscribe({uuid:\"*\"},s,(t=>{e(t)})).catch((()=>t(new Error(\"getResult is not supported in this environment\"))))})),d=r?{target:r,intentResolutionResultId:s}:{intentResolutionResultId:s},h=o?{name:o,context:i,metadata:d}:{...i,metadata:d},l=async()=>{let n=await a;if(!n||\"object\"!=typeof n)throw new Error(c.NoResultReturned);const{error:i}=n;if(i)throw new Error(c.IntentHandlerRejected);if((0,e.isChannel)(n)){const{id:i,type:r}=n;switch(r){case\"private\":n=await(0,e.connectPrivateChannel)(i);break;case\"app\":{const r=await t.joinSessionContextGroup(i);n=(0,e.buildAppChannelObject)(r);break}}}else if(!(0,e.isContext)(n))throw new Error(c.NoResultReturned);return n},u=o?await t.fireIntent(h):await t.fireIntentForContext(h);return\"object\"!=typeof u?{source:{appId:\"\",instanceId:\"\"},intent:\"\",version:\"2.0\",getResult:l}:{...u,getResult:l}}}(nr);var lr,ur,pr={};function wr(){if(ur)return Ki;ur=1;var e,t,n=s&&s.__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},i=s&&s.__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)},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ki,\"__esModule\",{value:!0}),Ki.InteropClient=void 0;const o=d,a=r(qi),c=function(){if(dr)return er;dr=1,Object.defineProperty(er,\"__esModule\",{value:!0}),er.Fdc3Module=void 0;const e=Hi,t=hr();class n extends t.FDC3ModuleBase{async open(e,t){await super._open(e,t)}addContextListener(e,t){let n;return this.wire.sendAction(\"fdc3-add-context-listener\").catch((e=>{})),\"function\"==typeof e?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),n=this.client.addContextHandler(e)):n=this.client.addContextHandler(t,null===e?void 0:e),{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}addIntentListener(e,t){this.wire.sendAction(\"fdc3-add-intent-listener\").catch((e=>{}));const n=this.client.registerIntentHandler((e=>{const{context:n,metadata:i}=e,{metadata:r}=n,o=i?.intentResolutionResultId||r?.intentResolutionResultId;o&&this.fin.InterApplicationBus.publish(o,null).catch((()=>null)),t(e.context)}),e,{fdc3Version:\"1.2\"});return{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}async raiseIntent(t,n,i){this.wire.sendAction(\"fdc3-raise-intent\").catch((e=>{}));const r=i?{name:t,context:n,metadata:{target:i}}:{name:t,context:n};try{return await this.client.fireIntent(r)}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntent?\"ResolverUnavailable\":t.message;throw new Error(n)}}async findIntent(t,n){this.wire.sendAction(\"fdc3-find-intent\").catch((e=>{}));try{return await this.client.getInfoForIntent({name:t,context:n})}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntent?\"ResolverUnavailable\":t.message;throw new Error(n)}}async findIntentsByContext(t){this.wire.sendAction(\"fdc3-find-intents-by-context\").catch((e=>{}));try{return await this.client.getInfoForIntentsByContext(t)}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntentsByContext?\"ResolverUnavailable\":t.message;throw new Error(n)}}async raiseIntentForContext(t,n){this.wire.sendAction(\"fdc3-raise-intent-for-context\").catch((e=>{}));try{return await this.client.fireIntentForContext({...t,metadata:{target:n}})}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntentForContext?\"ResolverUnavailable\":t.message;throw new Error(n)}}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}getInfo(){return this.wire.sendAction(\"fdc3-get-info\").catch((e=>{})),{providerVersion:this.wire.environment.getAdapterVersionSync(),provider:`openfin-${this.wire.me.uuid}`,fdc3Version:\"1.2\"}}}return er.Fdc3Module=n,er}(),h=function(){if(lr)return pr;lr=1,Object.defineProperty(pr,\"__esModule\",{value:!0}),pr.Fdc3Module2=void 0;const e=hr(),t=Hi,n=wr(),i=nr,r=ir;class o extends e.FDC3ModuleBase{async open(e,t){return\"string\"==typeof e&&console.warn(\"Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).\"),super._open(e,t)}async findInstances(e){this.wire.sendAction(\"fdc3-find-instances\").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,\"fdc3FindInstances\",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3FindInstances?\"ResolverUnavailable\":e.message;throw new Error(n)}}async getAppMetadata(e){this.wire.sendAction(\"fdc3-get-app-metadata\").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,\"fdc3GetAppMetadata\",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3GetAppMetadata?\"ResolverUnavailable\":e.message;throw new Error(n)}}async addContextListener(e,t){this.wire.sendAction(\"fdc3-add-context-listener\").catch((e=>{}));const n=e=>t=>{const{contextMetadata:n,...i}=t,r=n?[{...i},n]:[t,null];e(...r)};let i=t,r=n(i);return\"function\"==typeof e?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),i=e,r=n(i),this.client.addContextHandler(r)):this.client.addContextHandler(r,null===e?void 0:e)}async findIntent(e,n,i){this.wire.sendAction(\"fdc3-find-intent\").catch((e=>{}));try{return await this.client.getInfoForIntent({name:e,context:n,metadata:{resultType:i}})}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntent?\"ResolverUnavailable\":e.message;throw new Error(n)}}async findIntentsByContext(e,i){this.wire.sendAction(\"fdc3-find-intents-by-context\").catch((e=>{}));const r=i?{context:e,metadata:{resultType:i}}:e;try{return await n.InteropClient.ferryFdc3Call(this.client,\"fdc3v2FindIntentsByContext\",r)}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntentsByContext?\"ResolverUnavailable\":e.message;throw new Error(n)}}async raiseIntent(e,n,r){this.wire.sendAction(\"fdc3-raise-intent\").catch((e=>{}));try{return\"string\"==typeof r&&console.warn(\"Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).\"),(0,i.getIntentResolution)(this.client,n,r,e)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?\"ResolverUnavailable\":e.message;throw new Error(n)}}async raiseIntentForContext(e,n){this.wire.sendAction(\"fdc3-raise-intent-for-context\").catch((e=>{}));try{return\"string\"==typeof n&&console.warn(\"Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).\"),(0,i.getIntentResolution)(this.client,e,n)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?\"ResolverUnavailable\":e.message;throw new Error(n)}}async addIntentListener(e,t){if(this.wire.sendAction(\"fdc3-add-intent-listener\").catch((e=>{})),\"string\"!=typeof e)throw new Error(\"First argument must be an Intent name\");return this.client.registerIntentHandler((async e=>{let n,i;const{context:r,metadata:o}=e,{contextMetadata:s,metadata:a,...c}=r,d=o?.intentResolutionResultId||a?.intentResolutionResultId;try{const e=a?{metadata:a,...c}:{...c};n=await t(e,s),i=n}catch(e){n=e,i={error:!0}}if(d&&this.fin.InterApplicationBus.publish(d,i).catch((()=>null)),n instanceof Error)throw new Error(n.message);return n}),e,{fdc3Version:\"2.0\"})}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}async createPrivateChannel(){const e=(0,t.generateId)();await n.InteropClient.ferryFdc3Call(this.client,\"createPrivateChannelProvider\",{channelId:e});const o=await this.fin.InterApplicationBus.Channel.connect(e),s=new r.PrivateChannelClient(o,e);return(0,i.buildPrivateChannelObject)(s)}async getUserChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:\"user\",...(0,i.getUnsupportedChannelApis)(\"User\")})))}async getSystemChannels(){return console.warn(\"This API has been deprecated. Please use fdc3.getUserChannels instead.\"),super.getSystemChannels()}async joinUserChannel(e){return super.joinChannel(e)}async joinChannel(e){return console.warn(\"This API has been deprecated. Please use fdc3.joinUserChannel instead.\"),super.joinChannel(e)}async getCurrentChannel(){const e=await super.getCurrentChannel();return e?{...e,type:\"user\",broadcast:this.broadcast.bind(this)}:null}async getInfo(){return n.InteropClient.ferryFdc3Call(this.client,\"fdc3v2GetInfo\",{fdc3Version:\"2.0\"})}}return pr.Fdc3Module2=o,pr}(),l=Hi;let u=class extends o.Base{constructor(i,r){super(i),e.set(this,void 0),t.set(this,void 0),n(this,t,new Map,\"f\"),n(this,e,r,\"f\")}async setContext(t){this.wire.sendAction(\"interop-client-set-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"setContext\",{context:t})}async addContextHandler(t,n){if(this.wire.sendAction(\"interop-client-add-context-handler\").catch((e=>{})),\"function\"!=typeof t)throw new Error(\"Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.\");const r=await i(this,e,\"f\");let o;o=n?`invokeContextHandler-${n}-${(0,l.generateId)()}`:\"invokeContextHandler\";const s=(0,l.wrapContextHandler)(t,o);return r.register(o,s),await r.dispatch(\"contextHandlerRegistered\",{handlerId:o,contextType:n}),{unsubscribe:async()=>{r.remove(o),await r.dispatch(\"removeContextHandler\",{handlerId:o})}}}async getContextGroups(){this.wire.sendAction(\"interop-client-get-context-groups\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getContextGroups\")}async joinContextGroup(t,n){this.wire.sendAction(\"interop-client-join-context-group\").catch((e=>{}));const r=await i(this,e,\"f\");if(!t)throw new Error(\"No contextGroupId specified for joinContextGroup.\");return r.dispatch(\"joinContextGroup\",{contextGroupId:t,target:n})}async removeFromContextGroup(t){this.wire.sendAction(\"interop-client-remove-from-context-group\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"removeFromContextGroup\",{target:t})}async getAllClientsInContextGroup(t){this.wire.sendAction(\"interop-client-get-all-clients-in-context-group\").catch((e=>{}));const n=await i(this,e,\"f\");if(!t)throw new Error(\"No contextGroupId specified for getAllClientsInContextGroup.\");return n.dispatch(\"getAllClientsInContextGroup\",{contextGroupId:t})}async getInfoForContextGroup(t){this.wire.sendAction(\"interop-client-get-info-for-context-group\").catch((e=>{}));const n=await i(this,e,\"f\");if(!t)throw new Error(\"No contextGroupId specified for getInfoForContextGroup.\");return n.dispatch(\"getInfoForContextGroup\",{contextGroupId:t})}async fireIntent(t){this.wire.sendAction(\"interop-client-fire-intent\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"fireIntent\",t)}async registerIntentHandler(t,n,r){this.wire.sendAction(\"interop-client-register-intent-handler\").catch((e=>{}));const o=await i(this,e,\"f\"),s=`intent-handler-${n}`,a=(0,l.wrapIntentHandler)(t,s);try{await o.register(s,a),await o.dispatch(\"intentHandlerRegistered\",{handlerId:s,...r})}catch(e){throw new Error(\"Unable to register intent handler\")}return{unsubscribe:async()=>{o.remove(s)}}}async getCurrentContext(t){this.wire.sendAction(\"interop-client-get-current-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getCurrentContext\",{contextType:t})}async getInfoForIntent(t){this.wire.sendAction(\"interop-client-get-info-for-intent\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getInfoForIntent\",t)}async getInfoForIntentsByContext(t){this.wire.sendAction(\"interop-client-get-info-for-intents-by-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getInfoForIntentsByContext\",t)}async fireIntentForContext(t){this.wire.sendAction(\"interop-client-fire-intent-for-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"fireIntentForContext\",t)}async joinSessionContextGroup(n){try{const r=i(this,t,\"f\").get(n);if(r)return r.getUserInstance();const o=await i(this,e,\"f\"),{hasConflict:s}=await o.dispatch(\"sessionContextGroup:createIfNeeded\",{sessionContextGroupId:n});s&&console.warn(`A (non-session) context group with the name \"${n}\" already exists. If you are trying to join a Context Group, call joinContextGroup instead.`);const c=new a.default(this.wire,i(this,e,\"f\"),n);return i(this,t,\"f\").set(n,c),c.getUserInstance()}catch(e){throw console.error(`Error thrown trying to create Session Context Group with id \"${n}\": ${e}`),e}}async onDisconnection(t){this.wire.sendAction(\"interop-client-add-ondisconnection-listener\").catch((e=>{}));return(await i(this,e,\"f\")).onDisconnection((e=>{const{uuid:n}=e;t({type:\"interop-broker\",topic:\"disconnected\",brokerName:n})}))}getFDC3Sync(e){switch(e){case\"1.2\":return new c.Fdc3Module((()=>this),this.wire);case\"2.0\":return new h.Fdc3Module2((()=>this),this.wire);default:throw new Error(`Invalid FDC3 version provided: ${e}. Must be '1.2' or '2.0'`)}}async getFDC3(e){return this.getFDC3Sync(e)}static async ferryFdc3Call(t,n,r){return(await i(t,e,\"f\")).dispatch(n,r||null)}};return Ki.InteropClient=u,e=new WeakMap,t=new WeakMap,Ki}var yr,fr,gr,mr={};function vr(){if(yr)return mr;yr=1,Object.defineProperty(mr,\"__esModule\",{value:!0}),mr.overrideCheck=mr.checkFDC32Overrides=mr.getDefaultViewFdc3VersionFromAppInfo=void 0;const e=Vi();function t(t){return[\"fdc3HandleFindInstances\",\"handleInfoForIntent\",\"handleInfoForIntentsByContext\",\"fdc3HandleGetAppMetadata\",\"fdc3HandleGetInfo\",\"fdc3HandleOpen\",\"handleFiredIntent\",\"handleFiredIntentForContext\"].filter((n=>t[n]===e.InteropBroker.prototype[n]))}return mr.getDefaultViewFdc3VersionFromAppInfo=function({manifest:e,initialOptions:t}){const n=e?.platform?.defaultViewOptions?.fdc3InteropApi??t.defaultViewOptions?.fdc3InteropApi;return[\"1.2\",\"2.0\"].includes(n??\"\")?n:void 0},mr.checkFDC32Overrides=t,mr.overrideCheck=function(e,n){if(n&&\"2.0\"===n){const n=t(e);n.length>0&&console.warn(`WARNING: FDC3 2.0 has been set as a default option for Views in this Platform, but the required InteropBroker APIs for FDC3 2.0 compliance have not all been overridden.\\nThe following APIs need to be overridden:\\n${n.join(\"\\n\")}`)}},mr}function Cr(){return gr||(gr=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),i=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),i(function(){if(fr)return Ti;fr=1;var e=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ti,\"__esModule\",{value:!0}),Ti.InteropModule=void 0;const t=e(n),i=$i,r=d,o=Vi(),a=wr(),c=vr(),h=Tn,l=e=>new e,u=\"You have attempted to use or modify InteropBroker parameters, which is not allowed. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.\";class p extends r.Base{async init(e,n=l){this.wire.sendAction(\"interop-init\").catch((()=>{}));const r=await this.wire.environment.getInteropInfo(this.wire.getFin()),s=(0,i.createUnusableObject)(u),a=(0,i.createWarningObject)(u,(0,t.default)(r)),d=async()=>{throw new Error(u)},p=o.InteropBroker.createClosedConstructor(this.wire,(()=>this.fin.InterApplicationBus.Channel.create(`interop-broker-${e}`)),r);let w;return w=Array.isArray(n)?new((0,h.overrideFromComposables)(...n)(p))(s,d,a):await n(p,s,d,a),(0,c.overrideCheck)(w,r.fdc3Version),w}connectSync(e,t){return this.wire.sendAction(\"interop-connect-sync\").catch((()=>{})),new a.InteropClient(this.wire,this.wire.environment.whenReady().then((()=>this.fin.InterApplicationBus.Channel.connect(`interop-broker-${e}`,{payload:t}))))}}return Ti.InteropModule=p,Ti}(),e),i(wr(),e),i(Vi(),e)}(Li)),Li}var br={},Ir={},Er={},xr={};Object.defineProperty(xr,\"__esModule\",{value:!0}),xr.getSnapshotSourceChannelName=void 0;xr.getSnapshotSourceChannelName=e=>`snapshot-source-provider-${e.uuid}`;var Ar,Pr,Mr,_r,Or,Sr=s&&s.__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},Rr=s&&s.__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)};Object.defineProperty(Er,\"__esModule\",{value:!0}),Er.SnapshotSource=void 0;const Fr=d,jr=xr,kr=new Map;class Lr extends Fr.Base{constructor(e,t){super(e),Ar.set(this,void 0),Pr.set(this,(()=>(kr.has(this.identity.uuid)||kr.set(this.identity.uuid,{eventFired:null,clientPromise:null}),kr.get(this.identity.uuid)))),Mr.set(this,(()=>(Rr(this,Pr,\"f\").call(this).clientPromise||(Rr(this,Pr,\"f\").call(this).clientPromise=Rr(this,_r,\"f\").call(this)),Rr(this,Pr,\"f\").call(this).clientPromise))),_r.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);try{Rr(this,Pr,\"f\").call(this).eventFired||await Rr(this,Or,\"f\").call(this);const t=await this.fin.InterApplicationBus.Channel.connect(e,{wait:!1});return t.onDisconnection((()=>{Rr(this,Pr,\"f\").call(this).clientPromise=null,Rr(this,Pr,\"f\").call(this).eventFired=null})),t}catch(e){throw Rr(this,Pr,\"f\").call(this).clientPromise=null,new Error(\"The targeted SnapshotSource is not currently initialized. Await this object's ready() method.\")}})),Or.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);let t,n;const i=new Promise(((e,i)=>{t=e,n=i}));Rr(this,Pr,\"f\").call(this).eventFired=i;const r=async i=>{try{i.channelName===e&&(t(),await this.fin.InterApplicationBus.Channel.removeListener(\"connected\",r))}catch(e){n(e)}};await this.fin.InterApplicationBus.Channel.on(\"connected\",r)})),Sr(this,Ar,t,\"f\")}get identity(){return Rr(this,Ar,\"f\")}async ready(){this.wire.sendAction(\"snapshot-source-ready\").catch((e=>{}));try{await Rr(this,Mr,\"f\").call(this)}catch(e){await Rr(this,Pr,\"f\").call(this).eventFired}}async getSnapshot(){this.wire.sendAction(\"snapshot-source-get-snapshot\").catch((e=>{}));const e=await Rr(this,Mr,\"f\").call(this),t=await e.dispatch(\"get-snapshot\");return(await t).snapshot}async applySnapshot(e){this.wire.sendAction(\"snapshot-source-apply-snapshot\").catch((e=>{}));return(await Rr(this,Mr,\"f\").call(this)).dispatch(\"apply-snapshot\",{snapshot:e})}}Er.SnapshotSource=Lr,Ar=new WeakMap,Pr=new WeakMap,Mr=new WeakMap,_r=new WeakMap,Or=new WeakMap,Object.defineProperty(Ir,\"__esModule\",{value:!0}),Ir.SnapshotSourceModule=void 0;const Tr=d,$r=Er,Br=xr;class Gr extends Tr.Base{async init(e){if(this.wire.sendAction(\"snapshot-source-init\").catch((e=>{})),\"object\"!=typeof e||\"function\"!=typeof e.getSnapshot||\"function\"!=typeof e.applySnapshot)throw new Error(\"you must pass in a valid SnapshotProvider\");const t=await this.fin.InterApplicationBus.Channel.create((0,Br.getSnapshotSourceChannelName)(this.fin.me));t.register(\"get-snapshot\",(async()=>({snapshot:await e.getSnapshot()}))),t.register(\"apply-snapshot\",(({snapshot:t})=>e.applySnapshot(t)))}wrapSync(e){return this.wire.sendAction(\"snapshot-source-wrap-sync\").catch((e=>{})),new $r.SnapshotSource(this.wire,e)}async wrap(e){return this.wire.sendAction(\"snapshot-source-wrap\").catch((e=>{})),this.wrapSync(e)}}Ir.SnapshotSourceModule=Gr,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Ir,e),n(Er,e)}(br),Object.defineProperty(a,\"__esModule\",{value:!0});var Wr=a.Fin=void 0;const Hr=t,Nr=c,Dr=ie(),Ur=Z(),Vr=de,zr=en,Kr=rn,qr=un,Jr=bn,Yr=J(),Zr=An,Qr=ki,Xr=Cr(),eo=br;class to extends Hr.EventEmitter{constructor(e){super(),this.wire=e,this.System=new Nr.System(e),this.Window=new Dr._WindowModule(e),this.Application=new Ur.ApplicationModule(e),this.InterApplicationBus=new Vr.InterApplicationBus(e),this.Clipboard=new zr.Clipboard(e),this.ExternalApplication=new Kr.ExternalApplicationModule(e),this.Frame=new qr._FrameModule(e),this.GlobalHotkey=new Jr.GlobalHotkey(e),this.Platform=new Zr.PlatformModule(e,this.InterApplicationBus.Channel),this.View=new Yr.ViewModule(e),this.Interop=new Xr.InteropModule(e),this.SnapshotSource=new eo.SnapshotSourceModule(e),e.registerFin(this),this.me=(0,Qr.getMe)(e),e.on(\"disconnected\",(()=>{this.emit(\"disconnected\")}))}}Wr=a.Fin=to;var no={},io={};function ro(e){return\"string\"==typeof e.manifestUrl}function oo(e){return ao(e)&&\"string\"==typeof e.address}function so(e){return oo(e)&&\"string\"==typeof e.token}function ao(e){return\"string\"==typeof e.uuid}function co(e){return e.runtime&&\"string\"==typeof e.runtime.version}function ho(e){return ao(e)&&co(e)}Object.defineProperty(io,\"__esModule\",{value:!0}),io.isInternalConnectConfig=io.isPortDiscoveryConfig=io.isNewConnectConfig=io.isConfigWithReceiver=io.isRemoteConfig=io.isExistingConnectConfig=io.isExternalConfig=void 0,io.isExternalConfig=ro,io.isExistingConnectConfig=oo,io.isRemoteConfig=so,io.isConfigWithReceiver=function(e){return\"object\"==typeof e.receiver&&so({...e,address:\"\"})},io.isNewConnectConfig=ho,io.isPortDiscoveryConfig=function(e){return ro(e)&&co(e)||ho(e)},io.isInternalConnectConfig=function(e){return oo(e)||ho(e)};var lo={},uo={};Object.defineProperty(uo,\"__esModule\",{value:!0}),uo.EmitterMap=void 0;const po=t;function wo(e){return Buffer.from(e).toString(\"base64\")}uo.EmitterMap=class{constructor(){this.storage=new Map}hashKeys(e){return e.map(wo).join(\"/\")}getOrCreate(e){const t=this.hashKeys(e);return this.storage.has(t)||this.storage.set(t,new po.EventEmitter),this.storage.get(t)}has(e){return this.storage.has(this.hashKeys(e))}delete(e){const t=this.hashKeys(e);return this.storage.delete(t)}},Object.defineProperty(lo,\"__esModule\",{value:!0});const yo=uo;class fo extends yo.EmitterMap{constructor(){super(...arguments),this.dispatchEvent=e=>{if(function(e){return\"process-desktop-event\"===e.action}(e)){const{payload:t}=e,n=function(e){const{topic:t}=e;if(\"frame\"===t||\"window\"===t||\"view\"===t){const{uuid:n,name:i}=e;return[t,n,i]}if(\"application\"===t){const{uuid:n}=e;return[t,n]}return[t]}(t);if(this.has(n))return this.getOrCreate(n).emit(t.type,t),!0}return!1}}}lo.default=fo;var go,mo,vo=s&&s.__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},Co=s&&s.__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)},bo=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(no,\"__esModule\",{value:!0});var Io=no.Transport=void 0;const Eo=t,xo=io,Ao=g,Po=bo(lo),Mo=ki,_o=ke;class Oo extends Eo.EventEmitter{constructor(e,t,n){super(),this.wireListeners=new Map,this.topicRefMap=new Map,this.eventAggregator=new Po.default,this.messageHandlers=[this.eventAggregator.dispatchEvent],go.set(this,void 0),mo.set(this,void 0),this.connectSync=()=>{Co(this,go,\"f\").connectSync()},this.getPort=()=>Co(this,go,\"f\").getPort(),vo(this,go,new e(this.onmessage.bind(this)),\"f\"),this.environment=t,this.sendRaw=Co(this,go,\"f\").send.bind(Co(this,go,\"f\")),this.registerMessageHandler(this.handleMessage.bind(this)),Co(this,go,\"f\").on(\"disconnected\",(()=>{for(const[,{handleNack:e}]of this.wireListeners)e({reason:\"Remote connection has closed\"});this.wireListeners.clear(),this.emit(\"disconnected\")}));const{uuid:i,name:r}=n,o=this.environment.getCurrentEntityType();this.me=(0,Mo.getBaseMe)(o,i,r)}getFin(){if(!Co(this,mo,\"f\"))throw new Error(\"No Fin object registered for this transport\");return Co(this,mo,\"f\")}registerFin(e){if(Co(this,mo,\"f\"))throw new Error(\"Fin object has already been registered for this transport\");vo(this,mo,e,\"f\")}shutdown(){return Co(this,go,\"f\").shutdown()}async connect(e){if((0,xo.isConfigWithReceiver)(e))return await Co(this,go,\"f\").connect(e.receiver),this.authorize(e);if((0,xo.isRemoteConfig)(e))return this.connectRemote(e);if((0,xo.isExistingConnectConfig)(e))return this.connectByPort(e);if((0,xo.isNewConnectConfig)(e)){const t=await this.environment.retrievePort(e);return this.connectByPort({...e,address:`ws://localhost:${t}`})}}async connectRemote(e){return await Co(this,go,\"f\").connect(new(this.environment.getWsConstructor())(e.address)),this.authorize(e)}async connectByPort(e){const{address:t,uuid:n}=e,i={...e,type:\"file-token\"},r=Co(this,go,\"f\");await r.connect(new(this.environment.getWsConstructor())(e.address));const o=await this.sendAction(\"request-external-authorization\",{uuid:n,type:\"file-token\"},!0);if(\"external-authorization-response\"!==o.action)throw new Ao.UnexpectedActionError(o.action);return await this.environment.writeToken(o.payload.file,o.payload.token),this.authorize(i)}async authorize(e){const t=await this.sendAction(\"request-authorization\",e,!0);if(\"authorization-response\"!==t.action)throw new Ao.UnexpectedActionError(t.action);if(!0!==t.payload.success)throw new Ao.RuntimeError(t.payload)}sendAction(e,t={},n=!1){let i=()=>{};const r=Ao.RuntimeError.getCallSite(1),o=this.environment.getNextMessageId(),s=new Promise(((s,a)=>{i=a;const c={action:e,payload:t,messageId:o},d=Co(this,go,\"f\");return this.addWireListener(o,s,(e=>this.nackHandler(e,a,r)),n),d.send(c).catch(a)}));return Object.assign(s,{cancel:i,messageId:o})}nackHandler(e,t,n){t(\"string\"==typeof e?e:new Ao.RuntimeError(e,n))}ferryAction(e){return new Promise(((t,n)=>{const i=this.environment.getNextMessageId();e.messageId=i;const r=e=>{t(e.payload)};return Co(this,go,\"f\").send(e).then((()=>this.addWireListener(i,r,(e=>this.nackHandler(e,n)),!1))).catch(n)}))}registerMessageHandler(e){this.messageHandlers.push(e)}addWireListener(e,t,n,i){i?this.uncorrelatedListener=t:this.wireListeners.has(e)?n({reason:\"Duplicate handler id\",error:(0,_o.errorToPOJO)(new Ao.DuplicateCorrelationError(String(e)))}):this.wireListeners.set(e,{resolve:t,handleNack:n})}onmessage(e){for(const t of this.messageHandlers)t.call(null,e)}handleMessage(e){const t=e.correlationId||NaN;if(\"correlationId\"in e){if(!this.wireListeners.has(t))return!1;{const{resolve:n,handleNack:i}=this.wireListeners.get(t);\"ack\"!==e.action?i({reason:\"Did not receive ack action\",error:(0,_o.errorToPOJO)(new Ao.NoAckError(e.action))}):\"payload\"in e?e.payload.success?n.call(null,e):i(e.payload):\"string\"==typeof e.reason?i(e):(console.warn(\"Received invalid response from core\",e),i({reason:\"invalid response shape\"})),this.wireListeners.delete(t)}}else this.uncorrelatedListener&&this.uncorrelatedListener.call(null,e),this.uncorrelatedListener=()=>{};return!0}}Io=no.Transport=Oo,go=new WeakMap,mo=new WeakMap;const So=(...e)=>({log:(...t)=>console.debug(`[${(new Date).toISOString()}]`,...(e=>e.map((e=>`[${e}]`)))(e),...t),getLogger:(...t)=>So(...e,...t)}),Ro=So(\"@openfin/core-web/client\");function Fo(e,t){if(!function(e){return\"string\"==typeof e}(e))throw new Error(`Property ${t} has invalid type. Expected string, got ${typeof e}.`)}const jo=\"web-broker-ports-ready\",ko=Ro.getLogger(\"get-web-interop-ports\");function Lo(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)}function To(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}\"function\"==typeof SuppressedError&&SuppressedError;const $o=e=>{var n,i,r;return r=class extends t.EventEmitter{constructor(t){super(),n.set(this,void 0),i.set(this,!1),this.connectSync=()=>{Lo(this,i,\"f\")||(e.addEventListener(\"message\",(e=>{e.data?.topic?.startsWith(\"wire-message\")&&e.data.message&&Lo(this,n,\"f\").call(this,{...JSON.parse(e.data.message),ports:e.ports})})),e.start())},this.connect=async()=>{this.connectSync()},this.send=t=>(e.postMessage({topic:\"wire-message\",message:JSON.stringify(t)}),Promise.resolve()),this.shutdown=async()=>{e.close()},To(this,n,t,\"f\")}getPort(){return e}},n=new WeakMap,i=new WeakMap,r};var Bo={},Go={};Object.defineProperty(Go,\"__esModule\",{value:!0}),Go.BaseEnvironment=void 0;const Wo=vr();Go.BaseEnvironment=class{async getViewWindowIdentity(e,t){const{identity:n}=await e.View.wrapSync(t).getCurrentWindow();return n}async getInteropInfo(e){const t=await e.Application.getCurrentSync().getInfo().catch((()=>null)),n=t?.initialOptions?.interopBrokerConfiguration??{};return{fdc3Version:t?(0,Wo.getDefaultViewFdc3VersionFromAppInfo)(t):void 0,...n,fdc3Info:{providerVersion:await e.System.getVersion(),provider:\"OpenFin\"}}}},Object.defineProperty(Bo,\"__esModule\",{value:!0});var Ho=Bo.BrowserEnvironment=void 0;const No=Go;class Do extends No.BaseEnvironment{constructor(){super(...arguments),this.type=\"other\",this.getRandomId=()=>{const e=new Uint32Array(1);return window.crypto.getRandomValues(e)[0].toString(32)}}getAdapterVersionSync(){return\"\"}observeBounds(e,t){throw new Error(\"Method not implemented.\")}layoutAllowedInContext(e){return!1}initLayoutManager(e,t,n){throw new Error(\"Method not implemented.\")}applyLayoutSnapshot(e,t,n){throw new Error(\"Method not implemented.\")}createLayout(e,t){throw new Error(\"Method not implemented.\")}destroyLayout(e,t){throw new Error(\"Method not implemented.\")}resolveLayout(e,t){throw new Error(\"Method not implemented.\")}initPlatform(...e){throw new Error(\"Method not implemented.\")}writeToken(e,t){return Promise.resolve(\"\")}retrievePort(e){throw new Error(\"Method not implemented.\")}getNextMessageId(){return this.getRandomId()}createChildContent(e){throw new Error(\"Method not implemented.\")}getWebWindow(e){throw new Error(\"Method not implemented.\")}getCurrentEntityIdentity(){throw new Error(\"Method not implemented.\")}getCurrentEntityType(){return\"external connection\"}raiseEvent(e,t){throw new Error(\"Method not implemented.\")}getUrl(){return location.href}getDefaultChannelOptions(){return{create:{},connect:{}}}getRtcPeer(){return new RTCPeerConnection}getWsConstructor(){return WebSocket}whenReady(){return Promise.resolve()}}Ho=Bo.BrowserEnvironment=Do;const Uo=e=>\"platform\"in e&&void 0!==e.platform;var Vo,zo;class Ko extends Ho{constructor(e){super(),this.connectConfig=e,Vo.set(this,void 0),zo.set(this,new W((async()=>Promise.resolve().then((function(){return require(\"./main-b14f67c9.js\")}))))),Uo(e)&&this.validatePlatformOptions(e)}getAdapterVersionSync(){return\"0.39.21\"}validatePlatformOptions({platform:e}){if(!(\"layoutSnapshot\"in e))throw new Error(\"Platform options are missing layoutSnapshot. Please provide a layoutSnapshot in the platform options.\");if(\"windows\"in e||\"windows\"in e.layoutSnapshot)throw new Error(\"It appears you tried to call connect() with a snapshot object from an OpenFin desktop environment. Note that connect() expects to be called with a platform property with this structure: { platform: { layoutSnapshot } }. To get a layoutSnapshot of the expected structure, use fin.Platform.Layout.getCurrentLayoutManagerSync().getLayoutSnapshot() in v34+ in your desktop environment.\");const{layouts:t}=e.layoutSnapshot;Object.entries(t).map((([e,t])=>{if(\"object\"!=typeof t||null===t)throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must be an object.`);if(!(\"content\"in t))throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must contain a 'content' property.`)}))}async getInteropInfo(e){return{...{contextGroups:void 0,logging:{beforeAction:{enabled:!1},afterAction:{enabled:!1}}},fdc3Version:void 0,fdc3Info:{providerVersion:\"0.39.21\",provider:\"OpenFin Web\"}}}layoutAllowedInContext(e){return!0}async initLayoutManager(e,t,n){if(Lo(this,Vo,\"f\"))throw new Error(\"Layout already initialized.\");if(!Uo(this.connectConfig))throw new Error(\"Platform options are missing from connection config.\");const{WebLayoutEntryPoint:i}=await Lo(this,zo,\"f\").getValue();return To(this,Vo,new i(this.connectConfig),\"f\"),await Lo(this,Vo,\"f\").initLayoutManager(e,t,n)}async applyLayoutSnapshot(e,t,n){Lo(this,Vo,\"f\")?.applyLayoutSnapshot(e,t,n)}async createLayout(e,t){return Lo(this,Vo,\"f\")?.createLayout(e,t)}async destroyLayout(e,t){return Lo(this,Vo,\"f\")?.destroyLayout(e,t)}async getViewWindowIdentity(e,t){return Promise.resolve({uuid:t.uuid,name:t.uuid})}}Vo=new WeakMap,zo=new WeakMap;const qo=()=>{const e=((e,t)=>{const n=new RegExp(`^${t}<(?.*)>$`).exec(e)?.groups?.meta;if(n)try{return JSON.parse(atob(n))}catch(e){throw new Error(`Failed to decode JSON from ${n}.`)}})(window.name,\"of-frame\");if(e)try{const{name:t,uuid:n,brokerUrl:i,providerId:r,contextGroup:o}=e;return Fo(i,\"brokerUrl\"),Fo(n,\"uuid\"),Fo(t,\"name\"),{identity:{name:t,uuid:n},brokerUrl:i,interopConfig:{providerId:r,currentContextGroup:o}}}catch(e){throw new Error(`Unexpected error occurred when inferring platform information: ${e.stack}`)}},Jo=()=>{const e=r.v4();return{uuid:e,name:e}},Yo=async e=>{if(\"enabled\"===e.connectionInheritance){const t=await(async e=>{const t=qo();if(t){const{validateOptions:n=(()=>!0)}=e,{identity:i,...r}=t;if(!await n(r))throw new Error(\"Parent options were rejected by validateOptions.\");return t}})(e);if(t)return t}if(!e.options){const t=\"enabled\"===e.connectionInheritance?\"Broker URL was not specified nor provided by a platform container.\":\"Connection inheritance is disabled but no options were provided.\";throw new Error(t)}return{...e.options,identity:Jo()}};exports.__classPrivateFieldGet=Lo,exports.__classPrivateFieldSet=To,exports.apiExposer=Gn,exports.commonjsGlobal=s,exports.connect=async t=>{try{Ro.log(\"Establishing connection\",t);const{brokerUrl:n,identity:i,timeout:r,interopConfig:s}=await Yo(t),{workerPort:a,iframeBrokerPort:c}=await(async(e,t,n)=>{const{origin:i}=new URL(e),r=document.createElement(\"IFRAME\");let s;r.style.display=\"none\";try{return await new Promise(((a,c)=>{const d=e=>{if(e.source===r.contentWindow&&e.data?.topic===`ack-${jo}`){if(e.origin!==i)c(new Error(`Broker redirected to unexpected origin ${e.origin}, expected ${i}.`));else if(e.data.success){const[t,n]=e.ports;a({iframeBrokerPort:t,workerPort:n})}else c(new m(e.data));window.removeEventListener(\"message\",d),clearTimeout(s)}};window.addEventListener(\"message\",d),ko.log(`Connecting to broker ${e}`),r.setAttribute(\"src\",e),r.setAttribute(\"name\",o(t,\"of-broker\")),document.body.appendChild(r),ko.log(\"Iframe loaded, awaiting init message from iframe\"),n&&(s=setTimeout((()=>{window.removeEventListener(\"message\",d),document.body.removeChild(r),c(new Error(\"Worker did not initialize in time\"))}),n))}))}catch(e){throw new Error(`Failed to initialise Fin Web Client. ${e.message}`,{cause:e})}})(n,i,r);Ro.log(\"Successfully established connection to shared worker\");const d={entityType:\"external connection\",...i};a.start(),c.start();const h=((t,n,i)=>{const r=$o(n),o=new Ko(t),s=new Io(r,o,i);return s.connectSync(),window.Buffer=e.Buffer,new Wr(s)})(t,a,d);return s?.providerId&&(h.me.interop=h.Interop.connectSync(s.providerId),s?.currentContextGroup&&h.me.interop.joinContextGroup(s.currentContextGroup).catch((e=>{console.warn(`Error joining specified context group: ${s?.currentContextGroup}, continuing`,e)}))),{...h,me:{...h.me,identity:{uuid:h.me.uuid,name:h.me.name}}}}catch(e){throw new Error(`An error occured during web-interop connection: ${e.message}`)}},exports.decorators=Nn,exports.encodeOptions=o,exports.layout_constants=ai,exports.lazy=G;\n","\"use strict\";var t=require(\"./main-8cad4070.js\"),e=require(\"uuid\");require(\"buffer/\"),require(\"events\"),require(\"lodash/cloneDeep\"),require(\"lodash/isEqual\");var i={},n={};Object.defineProperty(n,\"__esModule\",{value:!0}),n.mapValuesAsync=n.mapEntriesAsync=void 0;const o=(t,[e,i])=>({...t,[e]:i});async function s(t,e){return(await Promise.all(e.map((async([e,i])=>[e,await t(i,e)])))).reduce(o,{})}n.mapEntriesAsync=s,n.mapValuesAsync=async function(t,e){let i;return i=e instanceof Map?[...e.entries()]:Object.entries(e),s(t,i)};var r,a,l,h,d=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldSet||function(t,e,i,n,o){if(\"m\"===n)throw new TypeError(\"Private method is not writable\");if(\"a\"===n&&!o)throw new TypeError(\"Private accessor was defined without a setter\");if(\"function\"==typeof e?t!==e||!o:!e.has(t))throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");return\"a\"===n?o.call(t,i):o?o.value=i:e.set(t,i),i},c=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldGet||function(t,e,i,n){if(\"a\"===i&&!n)throw new TypeError(\"Private accessor was defined without a getter\");if(\"function\"==typeof e?t!==e||!n:!e.has(t))throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");return\"m\"===i?n:\"a\"===i?n.call(t):n?n.value:e.get(t)};Object.defineProperty(i,\"__esModule\",{value:!0});var m=i.DefaultLayoutManager=void 0;const u=n;class p{constructor(t){a.set(this,void 0),l.set(this,new Map),d(this,a,t,\"f\")}size(){return c(this,l,\"f\").size}async applyLayoutSnapshot({layouts:t}){if(Object.keys(t).length>1)throw new Error(\"[LayoutManager] Tried to call applyLayoutSnapshot with more than 1 layout. When implementing multiple layouts via overridden LayoutManager class, you must override and fully implement the applyLayoutSnapshot method without calling super.applyLayoutSnapshot().\");const[[e,i]]=Object.entries(t);await p.createLayout(this,{layoutName:e,layout:i})}async showLayout({layoutName:t}){}async getLayoutSnapshot(){return{layouts:await(0,u.mapValuesAsync)((t=>t.getFrameSnapshot()),c(this,l,\"f\"))}}async removeLayout({layoutName:t}){}getLayoutIdentityForView(t){const e=[...c(this,l,\"f\").values()].find((e=>e.getCurrentViews().some((e=>e.name===t.name&&e.uuid===t.uuid))));return e?.identity??void 0}isLayoutVisible({layoutName:t}){return c(p,r,\"m\",h).call(p,this,t).isVisible()}resolveLayoutIdentity(t){if(t&&\"layoutName\"in t)return t;const e=[...c(this,l,\"f\").values()];if(1===e.length)return e[0].identity;const i=e.find((t=>t.isVisible()));return i?.identity??void 0}static async resolveLayout(t,e){const i=t.resolveLayoutIdentity(e);if(void 0===i||!(\"layoutName\"in i))throw new Error(\"[layout-manager] resolveLayout: Could not resolve the layout identity. Make sure you include 'layoutName' in the identity object.\");return c(p,r,\"m\",h).call(p,t,i.layoutName)}static async handleSharedView(t,e,i){await(0,u.mapValuesAsync)((async t=>{if(t.identity.layoutName!==e.layoutName){const e=t.getCurrentViews().find((t=>t.name===i.name));e&&await t.onViewDetached({viewIdentity:e,target:null}).catch(console.error)}}),c(t,l,\"f\"))}static async handleLastViewRemoved(t,e){await t.removeLayout(e),await c(t,a,\"f\").handleLastViewRemoved(t)}static async destroyLayout(t,{layoutName:e}){await c(p,r,\"m\",h).call(p,t,e).destroy(),c(t,l,\"f\").delete(e)}static async createLayout(t,e){const{layoutName:i}=e;if(c(t,l,\"f\").has(i))throw new Error(`Layout name ${i} already exists`);await c(t,a,\"f\").createLayout(e,t)}static registerLayout(t,e,i){c(t,l,\"f\").set(e,i)}static getAllLayouts(t){return[...c(t,l,\"f\").values()]}static setInitialSnapshot(t,e){c(t,a,\"f\").setInitialSnapshot(e)}static createClosedConstructor(...t){return class extends p{constructor(){super(...t)}}}}m=i.DefaultLayoutManager=p,r=p,a=new WeakMap,l=new WeakMap,h=function(t,e){const i=c(t,l,\"f\").get(e);if(!i)throw new Error(`[layout-manager] getLayoutByName: Could not locate layout with name '${e}'`);return i};var g={},f={},v={};Object.defineProperty(v,\"__esModule\",{value:!0}),v.ReversibleMap=void 0;v.ReversibleMap=class{constructor(){this.valueToKey=new Map,this.keyToValue=new Map,this.setUnique=(t,e)=>{if(this.hasKey(t)||this.hasValue(e))throw new Error(\"Key or value already in the map.\");this.keyToValue.set(t,e),this.valueToKey.set(e,t)},this.getKey=t=>{const e=this.valueToKey.get(t);if(!e)throw new Error(\"Value not found in the map.\");return e},this.deleteKey=t=>{const e=this.getValue(t);return this.keyToValue.delete(t),this.valueToKey.delete(e),e},this.deleteValue=t=>{const e=this.getKey(t);return this.keyToValue.delete(e),this.valueToKey.delete(t),e},this.hasKey=t=>this.keyToValue.has(t),this.hasValue=t=>this.valueToKey.has(t)}getValue(t){const e=this.keyToValue.get(t);if(!e)throw new Error(\"Key not found in the map.\");return e}},Object.defineProperty(f,\"__esModule\",{value:!0});var _=f.LayoutContentCache=void 0;const y=t.lazy,C=v;class w{constructor(){this.contentItemCache=new C.ReversibleMap,this.contentItemCacheId=0,this.createCacheKey=()=>{const t=`entity-${this.contentItemCacheId.toString()}`;return this.contentItemCacheId+=1,t},this.hasKey=t=>this.contentItemCache.hasKey(t),this.getItemOrUndefined=t=>{try{return this.getContentItemOrThrow(t)}catch(t){return}},this.getContentItemOrThrow=(t,e)=>{if(!this.contentItemCache.hasKey(t))throw new Error(\"Layout component has been destroyed or detached from the current layout.\");const i=this.contentItemCache.getValue(t);if(e&&!e.includes(i.type))throw new Error(`Layout item is not the expected type. Expected ${e.join(\", \")}, got ${i.type}.`);return i},this.getOrCreateEntityId=t=>{if(this.contentItemCache.hasValue(t))return this.contentItemCache.getKey(t);t.onDestroyed((()=>{this.contentItemCache.deleteValue(t)}));const e=this.createCacheKey();return this.contentItemCache.setUnique(e,t),e}}static getSingleInstance(){return w.singleton.getValue()}}_=f.LayoutContentCache=w,w.singleton=new y.Lazy((()=>new w));var I={},b={};!function(t){Object.defineProperty(t,\"__esModule\",{value:!0}),t.getAdjacentStacks=t.doShareEdge=t.getAdjacentItem=void 0;t.getAdjacentItem=(e,i)=>{const{parent:n}=e;if(e.isRoot()||!n)return;const o=[\"top\",\"bottom\"].includes(i)?\"column\":\"row\",s=[\"top\",\"left\"].includes(i)?-1:1;if(n.type===o){const t=n.contentItems.indexOf(e)+s;if(t>=0&&t{const n=t.getBounds(),o=e.getBounds();if(!n||!o)return!1;if([\"top\",\"bottom\"].includes(i)){return!(n.righto.right)}return!(n.bottomo.bottom)};t.getAdjacentStacks=(e,i)=>{const n=[\"top\",\"bottom\"].includes(i)?\"row\":\"column\",o=s=>\"stack\"===s.type?(0,t.doShareEdge)(e,s,i)?[s]:[]:\"root\"===s.type||\"ground\"===s.type?[]:s.type===n?s.contentItems.map((t=>o(t))).flat():s.type!==n?[\"top\",\"right\"].includes(i)?o(s.contentItems[s.contentItems.length-1]):o(s.contentItems[0]):[],s=(0,t.getAdjacentItem)(e,i);return s?o(s):[]}}(b);var S=t.commonjsGlobal&&t.commonjsGlobal.__decorate||function(t,e,i,n){var o,s=arguments.length,r=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if(\"object\"==typeof Reflect&&\"function\"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(s<3?o(r):s>3?o(e,i,r):o(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};Object.defineProperty(I,\"__esModule\",{value:!0}),I.LayoutEntitiesController=void 0;const E=t.decorators,x=b,L=i;class z{constructor(t,e,i){this.wire=t,this.layoutManager=e,this.layoutContentCache=i,this.analytics=t=>{this.wire.sendAction(`layout-controller-${t}`).catch((()=>{}))},this.getLayoutIdentityForViewOrThrow=async t=>{const e=this.layoutManager.getLayoutIdentityForView(t);if(!e)throw new Error(`View identity ${t.name} is not attached to any layouts.`);return e},this.getRoot=async t=>{this.analytics(\"get-root\");const e=(await this.getLayout(t)).getRoot();return{type:e.type,entityId:this.layoutContentCache.getOrCreateEntityId(e)}},this.getStackByView=async t=>{this.analytics(\"get-stack-by-view\");const e=await this.getLayoutIdentityForViewOrThrow(t),i=(await this.getLayout(e)).getStackByView(t);if(\"stack\"===i?.type)return{entityId:this.layoutContentCache.getOrCreateEntityId(i),type:\"stack\"}},this.getStackViews=t=>{this.analytics(\"get-stack-views\");return this.layoutContentCache.getContentItemOrThrow(t,[\"stack\"]).contentItems.map((t=>({name:t.viewName,uuid:this.wire.me.uuid})))},this.isRoot=t=>{this.analytics(\"is-root\");return this.layoutContentCache.getContentItemOrThrow(t).isRoot()},this.exists=t=>(this.analytics(\"exists\"),this.layoutContentCache.hasKey(t)),this.addViewToStack=async(t,e,{index:i}={index:0})=>{this.analytics(\"add-view-to-stack\");const n=this.layoutContentCache.getContentItemOrThrow(t);if(i&&i>n.contentItems.length+1)throw new Error(`Index '${i}' out of range, please exclude the index or specify a number between 0 and ${n.contentItems.length}`);const o={id:t,index:i},{identity:s}=await n.layout.platformCreateView(e,{location:o});return s},this.findViewInStack=(t,e)=>t.contentItems.find((t=>t.viewName===e.name)),this.removeViewFromStack=async(t,e)=>{this.analytics(\"remove-view-from-stack\");const i=this.layoutContentCache.getContentItemOrThrow(t,[\"stack\"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to remove a view ('${e.name}') which does not belong to the stack.`);await n.layout.platformCloseView(e)},this.createAdjacentStack=async(t,e,{position:i=\"right\"}={})=>{if(this.analytics(\"create-adjacent-stack\"),!Array.isArray(e)||0===e.length)throw new Error('The parameter \"views\" must be an array with at least 1 element.');if(![\"top\",\"bottom\",\"left\",\"right\"].includes(i))throw new Error(`Invalid position '${i}' specified.`);const n=this.layoutContentCache.getContentItemOrThrow(t).createAdjacentStack({position:i}),o=this.layoutContentCache.getOrCreateEntityId(n);return await Promise.all(e.reverse().map((t=>this.addViewToStack(o,t)))),o},this.getAdjacentStacks=async({targetId:t,edge:e})=>{this.analytics(\"get-adjacent-stacks\");const i=this.layoutContentCache.getContentItemOrThrow(t);return(0,x.getAdjacentStacks)(i,e).map((t=>({entityId:this.layoutContentCache.getOrCreateEntityId(t)})))},this.setStackActiveView=async(t,e)=>{this.analytics(\"set-stack-active-view\");const i=this.layoutContentCache.getContentItemOrThrow(t,[\"stack\"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to set a view ('${e.name}') as active when it does not belong to the stack.`);i.setActiveContentItem(n,!0)}}async getLayout(t){const e=await L.DefaultLayoutManager.resolveLayout(this.layoutManager,t);if(!e)throw new Error(`Could not resolve target layout identity ${JSON.stringify(t)}`);return e}getContent(t){this.analytics(\"get-content\");return this.layoutContentCache.getContentItemOrThrow(t,[\"column\",\"row\"]).contentItems.map((t=>({type:t.type,entityId:this.layoutContentCache.getOrCreateEntityId(t)})))}getParent(t){this.analytics(\"get-parent\");const e=this.layoutContentCache.getContentItemOrThrow(t);if(!e.isRoot())return e.parent?.contentItems.includes(e)?{type:e.parent.type,entityId:this.layoutContentCache.getOrCreateEntityId(e.parent)}:void 0}}S([(0,E.expose)()],z.prototype,\"getLayoutIdentityForViewOrThrow\",void 0),S([(0,E.expose)()],z.prototype,\"getRoot\",void 0),S([(0,E.expose)()],z.prototype,\"getStackByView\",void 0),S([(0,E.expose)()],z.prototype,\"getStackViews\",void 0),S([(0,E.expose)()],z.prototype,\"getContent\",null),S([(0,E.expose)()],z.prototype,\"getParent\",null),S([(0,E.expose)()],z.prototype,\"isRoot\",void 0),S([(0,E.expose)()],z.prototype,\"exists\",void 0),S([(0,E.expose)()],z.prototype,\"addViewToStack\",void 0),S([(0,E.expose)()],z.prototype,\"removeViewFromStack\",void 0),S([(0,E.expose)()],z.prototype,\"createAdjacentStack\",void 0),S([(0,E.expose)()],z.prototype,\"getAdjacentStacks\",void 0),S([(0,E.expose)()],z.prototype,\"setStackActiveView\",void 0),I.LayoutEntitiesController=z,Object.defineProperty(g,\"__esModule\",{value:!0});var M=g.initLayoutEndpoints=void 0;const P=t.apiExposer,T=t.layout_constants,A=f,k=I,D=i;M=g.initLayoutEndpoints=async function(t,e){const i=t.getFin(),n=await i.Platform.getCurrentSync().getClient(),o=new P.ChannelsExposer(n);await new P.ApiExposer(o).exposeInstance(new k.LayoutEntitiesController(t,e,A.LayoutContentCache.getSingleInstance()),{id:T.LAYOUT_CONTROLLER_ID}),await async function(t,e){const i=t=>async i=>{const n=await D.DefaultLayoutManager.resolveLayout(e,i.target);if(!n)throw new Error(`Could not resolve the layout target from payload ${JSON.stringify(i)}`);return t(n,i)},n=(e,n)=>{t.register(e,i(n))},o=(t,e)=>{n(t,e)};n(\"replace-view\",((t,e)=>t.replaceView(e))),n(\"replace-layout\",((t,{layout:e})=>t.replaceLayout(e))),n(\"add-view\",((t,e)=>t.insertView(e))),o(\"layout-add-view\",((t,{viewOptions:e,location:i,targetView:n})=>t.platformCreateView(e,{location:i,targetView:n}))),n(\"close-view\",((t,e)=>t.cleanupView(e.viewIdentity))),o(\"layout-close-view\",((t,e)=>t.platformCloseView(e.viewIdentity))),n(\"apply-preset-layout\",((t,e)=>t.applyPreset(e))),n(\"get-layout-views\",(t=>t.getCurrentViews())),n(\"get-frame-snapshot\",(t=>t.getFrameSnapshot())),n(\"is-visible\",(t=>t.isVisible())),n(\"destroy\",(t=>t.destroy())),t.register(\"get-layout-snapshot\",(()=>e.getLayoutSnapshot()))}(n,e)};var R={};Object.defineProperty(R,\"__esModule\",{value:!0});var U=R.BaseLayout=void 0;U=R.BaseLayout=class{};var O={};Object.defineProperty(O,\"__esModule\",{value:!0});var V=O.DOMEmitter=void 0;V=O.DOMEmitter=class{constructor(t){this.container=t}dispatchLocalEvent(t,e){const i={...e,type:t,tabSelector:`tab-${e.name}`,containerSelector:`container-${e.name}`,topic:\"openfin-DOM-event\"};this.container.dispatchEvent(new CustomEvent(t,{detail:i}))}};var B={};Object.defineProperty(B,\"__esModule\",{value:!0});var H=B.mapLayoutContentItemsImmutableSync=B.mapLayoutContentItemsImmutable=W=B.isVisible=void 0;var W=B.isVisible=t=>(0!==t.offsetWidth||0!==t.offsetHeight)&&\"hidden\"!==window.getComputedStyle(t).visibility&&t.offsetTop>=0&&t.offsetLeft>=0&&t.offsetTop<=window.innerHeight&&t.offsetLeft<=window.innerWidth;const F=t=>\"type\"in t&&\"component\"===t.type;B.mapLayoutContentItemsImmutable=async function t(e,i){return F(i)?e(i):{...i,content:await Promise.all(i.content?.map((i=>t(e,i))))}},H=B.mapLayoutContentItemsImmutableSync=function t(e,i){return F(i)?e(i):{...i,content:i.content?.map((i=>t(e,i)))}};class N extends Error{constructor(t,e){super(e),this.type=t}}class G extends N{constructor(t,e){super(\"Configuration\",t),this.node=e}}class j extends N{constructor(t){super(\"PopoutBlocked\",t)}}class $ extends N{constructor(t){super(\"API\",t)}}class Z extends N{constructor(t){super(\"Bind\",t)}}class q extends Error{constructor(t,e,i){super(`${t}: ${e}${void 0===i?\"\":\": \"+i}`)}}class X extends q{constructor(t,e){super(\"Assert\",t,e)}}class Y extends q{constructor(t,e,i){super(\"UnreachableCase\",t,`${e}${void 0===i?\"\":\": \"+i}`)}}class K extends q{constructor(t,e){super(\"UnexpectedNull\",t,e)}}class J extends q{constructor(t,e){super(\"UnexpectedUndefined\",t,e)}}var Q;!function(t){let e=!1;const i={PopoutCannotBeCreatedWithGroundItemConfig:{id:0,default:\"Popout cannot be created with ground ItemConfig\"},PleaseRegisterAConstructorFunction:{id:1,default:\"Please register a constructor function\"},ComponentTypeNotRegisteredAndBindComponentEventHandlerNotAssigned:{id:2,default:\"Component type not registered and BindComponentEvent handler not assigned\"},ComponentIsAlreadyRegistered:{id:3,default:\"Component is already registered\"},ComponentIsNotVirtuable:{id:4,default:\"Component is not virtuable. Requires rootHtmlElement field/getter\"},VirtualComponentDoesNotHaveRootHtmlElement:{id:5,default:'Virtual component does not have getter \"rootHtmlElement\"'},ItemConfigIsNotTypeComponent:{id:6,default:\"ItemConfig is not of type component\"},InvalidNumberPartInSizeString:{id:7,default:\"Invalid number part in size string\"},UnknownUnitInSizeString:{id:8,default:\"Unknown unit in size string\"},UnsupportedUnitInSizeString:{id:9,default:\"Unsupported unit in size string\"}};t.idCount=Object.keys(i).length;const n=Object.values(i);t.checkInitialise=function(){if(!e)for(let e=0;e=\"0\"&&t<=\"9\"}function Tt(t,e){const i=zt(e);t.style.width=i}function At(t,e){const i=zt(e);t.style.height=i}function kt(t){return{width:t.offsetWidth,height:t.offsetHeight}}function Dt(t,e){t.style.display=e?\"\":\"none\"}function Rt(t,e){if(void 0!==e)for(const i in e)if(e.hasOwnProperty(i)){const n=e[i],o=t[i];t[i]=Ut(o,n)}return t}function Ut(t,e){if(\"object\"!=typeof e)return e;if(Array.isArray(e)){const t=e.length,i=new Array(t);for(let n=0;n36)throw new Error(\"Too many keys in config minifier map\")},t.translateObject=n}(dt||(dt={})),function(t){t.defaults={type:at.ground,content:[],size:1,sizeUnit:ht.Fractional,minSize:void 0,minSizeUnit:ht.Pixel,id:\"\",isClosable:!0},t.createCopy=function(t,e){switch(t.type){case at.ground:case at.row:case at.column:return gt.createCopy(t,e);case at.stack:return ut.createCopy(t,e);case at.component:return pt.createCopy(t);default:throw new Y(\"CICC91354\",t.type,\"Invalid Config Item type specified\")}},t.createDefault=function(t){switch(t){case at.ground:throw new X(\"CICCDR91562\");case at.row:case at.column:return gt.createDefault(t);case at.stack:return ut.createDefault();case at.component:return pt.createDefault();default:throw new Y(\"CICCDD91563\",t,\"Invalid Config Item type specified\")}},t.isComponentItem=function(t){return t.type===at.component},t.isStackItem=function(t){return t.type===at.stack},t.isGroundItem=function(t){return t.type===at.ground}}(ct||(ct={})),function(t){t.defaultMaximised=!1,function(t){t.createCopy=function(t,e){return void 0===t?void 0:{show:null!=e?e:t.show,popout:t.popout,close:t.close,maximise:t.maximise,minimise:t.minimise,tabDropdown:t.tabDropdown}}}(t.Header||(t.Header={}))}(mt||(mt={})),function(t){function e(t){const e=t.length,i=new Array(e);for(let n=0;n\"__glMaximised\"===t));t>0&&(o=!0,n=n.splice(t,1)),e=n.length>0?n[0]:ct.defaults.id}else e=n;return i=void 0!==t.maximised?t.maximised:o,{id:e,maximised:i}}}(wt||(wt={})),function(t){function e(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0;return{resolved:!0,root:Et.resolve(i),openPopouts:t.resolveOpenPopouts(e.openPopouts),dimensions:t.Dimensions.resolve(e.dimensions),settings:t.Settings.resolve(e.settings),header:t.Header.resolve(e.header,e.settings,e.labels)}}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:Lt.fromResolvedArray(e.openPopouts),settings:_t.Settings.createCopy(e.settings),dimensions:t.Dimensions.fromResolved(e.dimensions),header:_t.Header.createCopy(e.header)}},t.isResolved=function(t){const e=t;return void 0!==e.resolved&&!0===e.resolved},t.resolveOpenPopouts=function(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0,{root:Et.resolve(o),openPopouts:xt.resolveOpenPopouts(e.openPopouts),dimensions:xt.Dimensions.resolve(e.dimensions),settings:xt.Settings.resolve(e.settings),header:xt.Header.resolve(e.header,e.settings,e.labels),parentId:null!==(i=e.parentId)&&void 0!==i?i:null,indexInParent:null!==(n=e.indexInParent)&&void 0!==n?n:null,window:t.Window.resolve(e.window,e.dimensions),resolved:!0}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:i(e.openPopouts),dimensions:xt.Dimensions.fromResolved(e.dimensions),settings:_t.Settings.createCopy(e.settings),header:_t.Header.createCopy(e.header),parentId:e.parentId,indexInParent:e.indexInParent,window:t.Window.fromResolved(e.window)}},t.fromResolvedArray=i}(Lt||(Lt={}));class Wt{constructor(){this._allEventSubscriptions=[],this._subscriptionsMap=new Map,this.unbind=this.removeEventListener,this.trigger=this.emit}tryBubbleEvent(t,e){}emit(t,...e){let i=this._subscriptionsMap.get(t);if(void 0!==i){i=i.slice();for(let t=0;t0){const n=e.slice();n.unshift(t);const o=this._allEventSubscriptions.slice();for(let t=0;t0?n.contentItems[0]:n,e=0);const o=this._layoutManager.createAndInitContentItem(i,t);t.addChild(o,e),this._layoutManager.layoutConfig.settings.popInOnClose?this._onClose():this.close()}createWindow(){const t=this.createUrl(),e=Math.floor(1e6*Math.random()).toString(36),i=this.serializeWindowFeatures({width:this._initialWindowSize.width,height:this._initialWindowSize.height,innerWidth:this._initialWindowSize.width,innerHeight:this._initialWindowSize.height,menubar:\"no\",toolbar:\"no\",location:\"no\",personalbar:\"no\",resizable:\"yes\",scrollbars:\"no\",status:\"no\"});if(this._popoutWindow=globalThis.open(t,e,i),this._popoutWindow)this._popoutWindow.addEventListener(\"load\",(()=>this.positionWindow()),{passive:!0}),this._popoutWindow.addEventListener(\"beforeunload\",(()=>{this._layoutManager.layoutConfig.settings.popInOnClose?this.popIn():this._onClose()}),{passive:!0}),this._checkReadyInterval=setInterval((()=>this.checkReady()),10);else if(!0===this._layoutManager.layoutConfig.settings.blockedPopoutsThrowError){throw new j(\"Popout blocked\")}}checkReady(){if(null===this._popoutWindow)throw new K(\"BPCR01844\");this._popoutWindow.__glInstance&&this._popoutWindow.__glInstance.isInitialised&&(this.onInitialised(),void 0!==this._checkReadyInterval&&(clearInterval(this._checkReadyInterval),this._checkReadyInterval=void 0))}serializeWindowFeatures(t){const e=[];for(const i in t)e.push(i+\"=\"+t[i].toString());return e.join(\",\")}createUrl(){const t=\"gl-window-config-\"+Ot(),e=_t.minifyConfig(this._config);try{localStorage.setItem(t,JSON.stringify(e))}catch(t){throw new Error(\"Error while writing to localStorage \"+function(t){return t instanceof Error?t.message:\"string\"==typeof t?t:\"Unknown Error\"}(t))}const i=new URL(location.href);return i.searchParams.set(\"gl-window\",t),i.toString()}positionWindow(){if(null===this._popoutWindow)throw new Error(\"BrowserPopout.positionWindow: null popoutWindow\");this._popoutWindow.moveTo(this._initialWindowSize.left,this._initialWindowSize.top),this._popoutWindow.focus()}onInitialised(){this._isInitialised=!0,this.getGlInstance().on(\"popIn\",(()=>this.popIn())),this.emit(\"initialised\")}_onClose(){setTimeout((()=>this.emit(\"closed\")),50)}}class Gt extends Wt{constructor(t,e,i,n){super(),this.layoutManager=t,this._parent=i,this._element=n,this._popInParentIds=[],this._type=e.type,this._id=e.id,this._isInitialised=!1,this.isGround=!1,this.isRow=!1,this.isColumn=!1,this.isStack=!1,this.isComponent=!1,this.size=e.size,this.sizeUnit=e.sizeUnit,this.minSize=e.minSize,this.minSizeUnit=e.minSizeUnit,this._isClosable=e.isClosable,this._pendingEventPropagations={},this._throttledEvents=[\"stateChanged\"],this._contentItems=this.createContentItems(e.content)}get type(){return this._type}get id(){return this._id}set id(t){this._id=t}get popInParentIds(){return this._popInParentIds}get parent(){return this._parent}get contentItems(){return this._contentItems}get isClosable(){return this._isClosable}get element(){return this._element}get isInitialised(){return this._isInitialised}static isStack(t){return t.isStack}static isComponentItem(t){return t.isComponent}static isComponentParentableItem(t){return t.isStack||t.isGround}removeChild(t,e=!1){const i=this._contentItems.indexOf(t);if(-1===i)throw new Error(\"Can't remove child item. Unknown content item\");if(e||this._contentItems[i].destroy(),this._contentItems.splice(i,1),this._contentItems.length>0)this.updateSize(!1);else if(!this.isGround&&!0===this._isClosable){if(null===this._parent)throw new K(\"CIUC00874\");this._parent.removeChild(this)}}addChild(t,e,i){return null!=e||(e=this._contentItems.length),this._contentItems.splice(e,0,t),t.setParent(this),!0===this._isInitialised&&!1===t._isInitialised&&t.init(),e}replaceChild(t,e,i=!1){const n=this._contentItems.indexOf(t),o=t._element.parentNode;if(-1===n)throw new X(\"CIRCI23232\",\"Can't replace child. oldChild is not child of this\");if(null===o)throw new K(\"CIRCP23232\");if(o.replaceChild(e._element,t._element),!0===i&&(t._parent=null,t.destroy()),this._contentItems[n]=e,e.setParent(this),e.size=t.size,e.sizeUnit=t.sizeUnit,e.minSize=t.minSize,e.minSizeUnit=t.minSizeUnit,null===e._parent)throw new K(\"CIRCNC45699\");!0===e._parent._isInitialised&&!1===e._isInitialised&&e.init(),this.updateSize(!1)}remove(){if(null===this._parent)throw new K(\"CIR11110\");this._parent.removeChild(this)}popout(){const t=Ot(),e=this.layoutManager.createPopoutFromContentItem(this,void 0,t,void 0);return this.emitBaseBubblingEvent(\"stateChanged\"),e}calculateConfigContent(){const t=this._contentItems,e=t.length,i=new Array(e);for(let n=0;nthis.propagateEventToLayoutManager(t,e))))}propagateEventToLayoutManager(t,e){this._pendingEventPropagations[t]=!1,this.layoutManager.emitUnknown(t,e)}}class jt extends Gt{constructor(t,e,i){super(t,e,i,document.createElement(\"div\")),this._parentItem=i,this._focused=!1,this.isComponent=!0,this._reorderEnabled=e.reorderEnabled,this.applyUpdatableConfig(e),this._initialWantMaximise=e.maximised;const n=document.createElement(\"div\");n.classList.add(\"lm_content\"),this.element.appendChild(n),this._container=new Ft(e,this,t,n,(t=>this.handleUpdateItemConfigEvent(t)),(()=>this.show()),(()=>this.hide()),(t=>this.focus(t)),(t=>this.blur(t)))}get componentName(){return this._container.componentType}get componentType(){return this._container.componentType}get reorderEnabled(){return this._reorderEnabled}get initialWantMaximise(){return this._initialWantMaximise}get component(){return this._container.component}get container(){return this._container}get parentItem(){return this._parentItem}get headerConfig(){return this._headerConfig}get title(){return this._title}get tab(){return this._tab}get focused(){return this._focused}destroy(){this._container.destroy(),super.destroy()}applyUpdatableConfig(t){this.setTitle(t.title),this._headerConfig=t.header}toConfig(){const t=this._container.stateRequestEvent,e=void 0===t?this._container.state:t();return{type:at.component,content:[],size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,maximised:!1,isClosable:this.isClosable,reorderEnabled:this._reorderEnabled,title:this._title,header:mt.Header.createCopy(this._headerConfig),componentType:pt.copyComponentType(this.componentType),componentState:e}}close(){if(null===this.parent)throw new K(\"CIC68883\");this.parent.removeChild(this,!1)}enterDragMode(t,e){Tt(this.element,t),At(this.element,e),this._container.enterDragMode(t,e)}exitDragMode(){this._container.exitDragMode()}enterStackMaximised(){this._container.enterStackMaximised()}exitStackMaximised(){this._container.exitStackMaximised()}drag(){this._container.drag()}updateSize(t){this.updateNodeSize(t)}init(){this.updateNodeSize(!1),super.init(),this._container.emit(\"open\"),this.initContentItems()}setTitle(t){this._title=t,this.emit(\"titleChanged\",t),this.emit(\"stateChanged\")}setTab(t){this._tab=t,this.emit(\"tab\",t),this._container.setTab(t)}hide(){super.hide(),this._container.setVisibility(!1)}show(){super.show(),this._container.setVisibility(!0)}focus(t=!1){this.parentItem.setActiveComponentItem(this,!0,t)}setFocused(t){this._focused=!0,this.tab.setFocused(),t||this.emitBaseBubblingEvent(\"focus\")}blur(t=!1){this._focused&&this.layoutManager.setFocusedComponentItem(void 0,t)}setBlurred(t){this._focused=!1,this.tab.setBlurred(),t||this.emitBaseBubblingEvent(\"blur\")}setParent(t){this._parentItem=t,super.setParent(t)}handleUpdateItemConfigEvent(t){this.applyUpdatableConfig(t)}updateNodeSize(t){if(\"none\"!==this.element.style.display){const{width:e,height:i}=kt(this.element);this._container.setSizeToNodeSize(e,i,t)}}}class $t extends Gt{constructor(){super(...arguments),this._focused=!1}get focused(){return this._focused}setFocusedValue(t){this._focused=t}}class Zt extends Wt{constructor(t,e){super(),this._eElement=t,this._pointerTracking=!1,this._pointerDownEventListener=t=>this.onPointerDown(t),this._pointerMoveEventListener=t=>this.onPointerMove(t),this._pointerUpEventListener=t=>this.onPointerUp(t),this._timeout=void 0,this._allowableTargets=[t,...e],this._oDocument=document,this._eBody=document.body,this._nDelay=1800,this._nDistance=10,this._nX=0,this._nY=0,this._nOriginalX=0,this._nOriginalY=0,this._dragging=!1,this._eElement.addEventListener(\"pointerdown\",this._pointerDownEventListener,{passive:!0})}destroy(){this.checkRemovePointerTrackingEventListeners(),this._eElement.removeEventListener(\"pointerdown\",this._pointerDownEventListener)}cancelDrag(){this.processDragStop(void 0)}onPointerDown(t){if(this._allowableTargets.includes(t.target)&&t.isPrimary){const e=this.getPointerCoordinates(t);this.processPointerDown(e)}}processPointerDown(t){this._nOriginalX=t.x,this._nOriginalY=t.y,this._oDocument.addEventListener(\"pointermove\",this._pointerMoveEventListener),this._oDocument.addEventListener(\"pointerup\",this._pointerUpEventListener,{passive:!0}),this._pointerTracking=!0,this._timeout=setTimeout((()=>{try{this.startDrag()}catch(t){throw console.error(t),t}}),this._nDelay)}onPointerMove(t){this._pointerTracking&&(this.processDragMove(t),t.preventDefault())}processDragMove(t){this._nX=t.pageX-this._nOriginalX,this._nY=t.pageY-this._nOriginalY,!1===this._dragging&&(Math.abs(this._nX)>this._nDistance||Math.abs(this._nY)>this._nDistance)&&this.startDrag(),this._dragging&&this.emit(\"drag\",this._nX,this._nY,t)}onPointerUp(t){this.processDragStop(t)}processDragStop(t){var e;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this.checkRemovePointerTrackingEventListeners(),!0===this._dragging&&(this._eBody.classList.remove(\"lm_dragging\"),this._eElement.classList.remove(\"lm_dragging\"),null===(e=this._oDocument.querySelector(\"iframe\"))||void 0===e||e.style.setProperty(\"pointer-events\",\"\"),this._dragging=!1,this.emit(\"dragStop\",t))}checkRemovePointerTrackingEventListeners(){this._pointerTracking&&(this._oDocument.removeEventListener(\"pointermove\",this._pointerMoveEventListener),this._oDocument.removeEventListener(\"pointerup\",this._pointerUpEventListener),this._pointerTracking=!1)}startDrag(){var t;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this._dragging=!0,this._eBody.classList.add(\"lm_dragging\"),this._eElement.classList.add(\"lm_dragging\"),null===(t=this._oDocument.querySelector(\"iframe\"))||void 0===t||t.style.setProperty(\"pointer-events\",\"none\"),this.emit(\"dragStart\",this._nOriginalX,this._nOriginalY)}getPointerCoordinates(t){return{x:t.pageX,y:t.pageY}}}class qt{constructor(t,e,i){this._isVertical=t,this._size=e,this._grabSize=i0){const i=this.createSplitter(Math.max(0,e-1)).element;e>0?(this.contentItems[e-1].element.insertAdjacentElement(\"afterend\",i),i.insertAdjacentElement(\"afterend\",t.element)):(this.contentItems[0].element.insertAdjacentElement(\"beforebegin\",i),i.insertAdjacentElement(\"beforebegin\",t.element))}else this._childElementContainer.appendChild(t.element);super.addChild(t,e);const n=1/this.contentItems.length*100;if(!0===i)return this.emitBaseBubblingEvent(\"stateChanged\"),e;for(let e=0;e0&&(this.calculateRelativeSizes(),this.setAbsoluteSizes()),this.emitBaseBubblingEvent(\"stateChanged\"),this.emit(\"resize\")}setAbsoluteSizes(){const t=this.calculateAbsoluteSizes();for(let e=0;e0&&t.itemSizes[e]++,this._isColumn?(Tt(this.contentItems[e].element,t.crossAxisSize),At(this.contentItems[e].element,t.itemSizes[e])):(Tt(this.contentItems[e].element,t.itemSizes[e]),At(this.contentItems[e].element,t.crossAxisSize))}calculateAbsoluteSizes(){const t=(this.contentItems.length-1)*this._splitterSize,{width:e,height:i}=kt(this.element);let n,o;this._isColumn?(n=i-t,o=e):(n=e-t,o=i);let s=0;const r=[];for(let t=0;t0){const n=100-t;for(let t=0;t100&&e.length>0){for(let t=0;te)return;{const r=i/e;let a=i;for(let e=0;ethis.onSplitterDrag(e,t,i))),e.on(\"dragStop\",(()=>this.onSplitterDragStop(e))),e.on(\"dragStart\",(()=>this.onSplitterDragStart(e))),this._splitter.splice(t,0,e),e}getSplitItems(t){const e=this._splitter.indexOf(t);return{before:this.contentItems[e],after:this.contentItems[e+1]}}calculateContentItemMinSize(t){const e=t.minSize;if(void 0!==e){if(t.minSizeUnit===ht.Pixel)return e;throw new X(\"ROCGMD98831\",JSON.stringify(t))}{const t=this.layoutManager.layoutConfig.dimensions;return this._isColumn?t.defaultMinItemHeight:t.defaultMinItemWidth}}calculateContentItemsTotalMinSize(t){let e=0;for(const i of t)e+=this.calculateContentItemMinSize(i);return e}onSplitterDragStart(t){const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=this.calculateContentItemsTotalMinSize(e.before.contentItems),s=this.calculateContentItemsTotalMinSize(e.after.contentItems);this._splitterPosition=0,this._splitterMinPosition=-1*(i-o),this._splitterMaxPosition=n-s}onSplitterDrag(t,e,i){let n=this._isColumn?i:e;if(null===this._splitterMinPosition||null===this._splitterMaxPosition)throw new K(\"ROCOSD59226\");n=Math.max(n,this._splitterMinPosition),n=Math.min(n,this._splitterMaxPosition),this._splitterPosition=n;const o=zt(n);this._isColumn?t.element.style.top=o:t.element.style.left=o}onSplitterDragStop(t){if(null===this._splitterPosition)throw new K(\"ROCOSDS66932\");{const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=(this._splitterPosition+i)/(i+n),s=e.before.size+e.after.size;e.before.size=o*s,e.after.size=(1-o)*s,t.element.style.top=zt(0),t.element.style.left=zt(0),globalThis.requestAnimationFrame((()=>this.updateSize(!1)))}}}!function(t){t.getElementDimensionSize=function(t,e){return\"width\"===e?function(t){return t.offsetWidth}(t):function(t){return t.offsetHeight}(t)},t.setElementDimensionSize=function(t,e,i){return\"width\"===e?Tt(t,i):At(t,i)},t.createElement=function(t,e){const i=t.createElement(\"div\");return i.classList.add(\"lm_item\"),e?i.classList.add(\"lm_column\"):i.classList.add(\"lm_row\"),i}}(Xt||(Xt={}));class Yt extends $t{constructor(t,e,i){super(t,vt.create(e),null,Yt.createElement(document)),this.isGround=!0,this._childElementContainer=this.element,this._containerElement=i;let n=null;for(;;){const t=n?n.previousSibling:this._containerElement.lastChild;if(!(t instanceof Element&&t.classList.contains(\"lm_content\")))break;n=t}this._containerElement.insertBefore(this.element,n)}init(){if(!0!==this.isInitialised){this.updateNodeSize();for(let t=0;t0?this.contentItems[0]:this,n.isComponent)throw new Error(\"Cannot add item as child to ComponentItem\");{const t=this.layoutManager.createAndInitContentItem(i,n);return e=n.addChild(t,e),n===this?-1:e}}loadComponentAsRoot(t){this.clearRoot();const e=Ct.resolve(t,!1);if(e.maximised)throw new Error(\"Root Component cannot be maximised\");{const t=new jt(this.layoutManager,e,this);t.init(),this.addChild(t,0)}}addChild(t,e){if(this.contentItems.length>0)throw new Error(\"Ground node can only have a single child\");return this._childElementContainer.appendChild(t.element),e=super.addChild(t,e),this.updateSize(!1),this.emitBaseBubblingEvent(\"stateChanged\"),e}calculateConfigContent(){const t=this.contentItems,e=t.length,i=new Array(e);for(let n=0;n0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e)),this.updateContentItemsSize(!1))}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}createSideAreas(){const t=Yt.Area.oppositeSides,e=new Array(Object.keys(t).length);let i=0;for(const n in t){const o=n,s=this.getElementArea();if(null===s)throw new K(\"RCSA77553\");s.side=o,\"2\"===t[o][1]?s[o]=s[t[o]]-50:s[o]=s[t[o]]+50,s.surface=(s.x2-s.x1)*(s.y2-s.y1),e[i++]=s}return e}highlightDropZone(t,e,i){this.layoutManager.tabDropPlaceholder.remove(),super.highlightDropZone(t,e,i)}onDrop(t,e){if(t.isComponent){const e=ut.createDefault(),i=t;e.header=mt.Header.createCopy(i.headerConfig);const n=this.layoutManager.createAndInitContentItem(e,this);n.addChild(t),t=n}if(0===this.contentItems.length)this.addChild(t);else{if(t.type===at.row||t.type===at.column){const e=ut.createDefault(),i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}const i=\"x\"==e.side[0]?at.row:at.column,n=\"2\"==e.side[1],o=this.contentItems[0];if(o instanceof Xt&&o.type===i){const e=o.contentItems[n?0:o.contentItems.length-1];o.addChild(t,n?0:void 0,!0),e.size*=.5,t.size=e.size,t.sizeUnit=ht.Percent,o.updateSize(!1)}else{const e=ct.createDefault(i),s=this.layoutManager.createContentItem(e,this);this.replaceChild(o,s),s.addChild(t,n?0:void 0,!0),s.addChild(o,n?void 0:0,!0),o.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}}dock(){throw new X(\"GID87731\")}validateDocking(){throw new X(\"GIVD87732\")}getAllContentItems(){const t=[this];return this.deepGetAllContentItems(this.contentItems,t),t}getConfigMaximisedItems(){const t=[];return this.deepFilterContentItems(this.contentItems,t,(t=>!(!Gt.isStack(t)||!t.initialWantMaximise)||!(!Gt.isComponentItem(t)||!t.initialWantMaximise))),t}getItemsByPopInParentId(t){const e=[];return this.deepFilterContentItems(this.contentItems,e,(e=>e.popInParentIds.includes(t))),e}toConfig(){throw new Error(\"Cannot generate GroundItem config\")}setActiveComponentItem(t,e,i){}updateNodeSize(){const{width:t,height:e}=kt(this._containerElement);Tt(this.element,t),At(this.element,e),this.contentItems.length>0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e))}deepGetAllContentItems(t,e){for(let i=0;ithis.onClick(t),this._touchStartEventListener=t=>this.onTouchStart(t),this._element=document.createElement(\"div\"),this._element.classList.add(i),this._element.title=e,this._header.on(\"destroy\",(()=>this.destroy())),this._element.addEventListener(\"click\",this._clickEventListener,{passive:!0}),this._element.addEventListener(\"touchstart\",this._touchStartEventListener,{passive:!0}),this._header.controlsContainerElement.appendChild(this._element)}get element(){return this._element}destroy(){var t;this._element.removeEventListener(\"click\",this._clickEventListener),this._element.removeEventListener(\"touchstart\",this._touchStartEventListener),null===(t=this._element.parentNode)||void 0===t||t.removeChild(this._element)}onClick(t){this._pushEvent(t)}onTouchStart(t){this._pushEvent(t)}}class Jt{constructor(t,e,i,n,o){var s;this._layoutManager=t,this._componentItem=e,this._closeEvent=i,this._focusEvent=n,this._dragStartEvent=o,this._isActive=!1,this._tabClickListener=t=>this.onTabClickDown(t),this._tabTouchStartListener=t=>this.onTabTouchStart(t),this._closeClickListener=()=>this.onCloseClick(),this._closeTouchStartListener=()=>this.onCloseTouchStart(),this._dragStartListener=(t,e)=>this.onDragStart(t,e),this._contentItemDestroyListener=()=>this.onContentItemDestroy(),this._tabTitleChangedListener=t=>this.setTitle(t),this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_tab\"),this._titleElement=document.createElement(\"span\"),this._titleElement.classList.add(\"lm_title\"),this._closeElement=document.createElement(\"div\"),this._closeElement.classList.add(\"lm_close_tab\"),this._element.appendChild(this._titleElement),this._element.appendChild(this._closeElement),e.isClosable?this._closeElement.style.display=\"\":this._closeElement.style.display=\"none\",this.setTitle(e.title),this._componentItem.on(\"titleChanged\",this._tabTitleChangedListener);(null!==(s=e.reorderEnabled)&&void 0!==s?s:this._layoutManager.layoutConfig.settings.reorderEnabled)&&this.enableReorder(),this._element.addEventListener(\"click\",this._tabClickListener,{passive:!0}),this._element.addEventListener(\"touchstart\",this._tabTouchStartListener,{passive:!0}),this._componentItem.isClosable?(this._closeElement.addEventListener(\"click\",this._closeClickListener,{passive:!0}),this._closeElement.addEventListener(\"touchstart\",this._closeTouchStartListener,{passive:!0})):(this._closeElement.remove(),this._closeElement=void 0),this._componentItem.setTab(this),this._layoutManager.emit(\"tabCreated\",this)}get isActive(){return this._isActive}get componentItem(){return this._componentItem}get contentItem(){return this._componentItem}get element(){return this._element}get titleElement(){return this._titleElement}get closeElement(){return this._closeElement}get reorderEnabled(){return void 0!==this._dragListener}set reorderEnabled(t){t!==this.reorderEnabled&&(t?this.enableReorder():this.disableReorder())}setTitle(t){this._titleElement.innerText=t,this._element.title=t}setActive(t){t!==this._isActive&&(this._isActive=t,t?this._element.classList.add(\"lm_active\"):this._element.classList.remove(\"lm_active\"))}destroy(){var t,e;this._closeEvent=void 0,this._focusEvent=void 0,this._dragStartEvent=void 0,this._element.removeEventListener(\"click\",this._tabClickListener),this._element.removeEventListener(\"touchstart\",this._tabTouchStartListener),null===(t=this._closeElement)||void 0===t||t.removeEventListener(\"click\",this._closeClickListener),null===(e=this._closeElement)||void 0===e||e.removeEventListener(\"touchstart\",this._closeTouchStartListener),this._componentItem.off(\"titleChanged\",this._tabTitleChangedListener),this.reorderEnabled&&this.disableReorder(),this._element.remove()}setBlurred(){this._element.classList.remove(\"lm_focused\"),this._titleElement.classList.remove(\"lm_focused\")}setFocused(){this._element.classList.add(\"lm_focused\"),this._titleElement.classList.add(\"lm_focused\")}onDragStart(t,e){if(void 0===this._dragListener)throw new J(\"TODSDLU10093\");if(void 0===this._dragStartEvent)throw new J(\"TODS23309\");this._dragStartEvent(t,e,this._dragListener,this.componentItem)}onContentItemDestroy(){void 0!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=void 0)}onTabClickDown(t){const e=t.target;e!==this._element&&e!==this._titleElement||(0===t.button?this.notifyFocus():1===t.button&&this._componentItem.isClosable&&this.notifyClose())}onTabTouchStart(t){t.target===this._element&&this.notifyFocus()}onCloseClick(){this.notifyClose()}onCloseTouchStart(){this.notifyClose()}notifyClose(){if(void 0===this._closeEvent)throw new J(\"TNC15007\");this._closeEvent(this._componentItem)}notifyFocus(){if(void 0===this._focusEvent)throw new J(\"TNA15007\");this._focusEvent(this._componentItem)}enableReorder(){this._dragListener=new Zt(this._element,[this._titleElement]),this._dragListener.on(\"dragStart\",this._dragStartListener),this._componentItem.on(\"destroy\",this._contentItemDestroyListener)}disableReorder(){if(void 0===this._dragListener)throw new J(\"TDR87745\");this._componentItem.off(\"destroy\",this._contentItemDestroyListener),this._dragListener.off(\"dragStart\",this._dragStartListener),this._dragListener=void 0}}class Qt{constructor(t,e,i,n,o){this._layoutManager=t,this._componentRemoveEvent=e,this._componentFocusEvent=i,this._componentDragStartEvent=n,this._dropdownActiveChangedEvent=o,this._tabs=[],this._lastVisibleTabIndex=-1,this._dropdownActive=!1,this._element=document.createElement(\"section\"),this._element.classList.add(\"lm_tabs\"),this._dropdownElement=document.createElement(\"section\"),this._dropdownElement.classList.add(\"lm_tabdropdown_list\"),this._dropdownElement.style.display=\"none\"}get tabs(){return this._tabs}get tabCount(){return this._tabs.length}get lastVisibleTabIndex(){return this._lastVisibleTabIndex}get element(){return this._element}get dropdownElement(){return this._dropdownElement}get dropdownActive(){return this._dropdownActive}destroy(){for(let t=0;tthis.handleTabCloseEvent(t)),(t=>this.handleTabFocusEvent(t)),((t,e,i,n)=>this.handleTabDragStartEvent(t,e,i,n)));void 0===e&&(e=this._tabs.length),this._tabs.splice(e,0,i),ethis._lastVisibleTabIndex){const t=this._tabs[e];for(let t=e;t>0;t--)this._tabs[t]=this._tabs[t-1];this._tabs[0]=t}}updateTabSizes(t,e){let i=!1;this.tryUpdateTabSizes(i,t,e)||(i=!0,this.tryUpdateTabSizes(i,t,e)),i!==this._dropdownActive&&(this._dropdownActive=i,this._dropdownActiveChangedEvent())}tryUpdateTabSizes(t,e,i){if(this._tabs.length>0){if(void 0===i)throw new Error(\"non-empty tabs must have active component item\");let n=0,o=!1;const s=this._layoutManager.layoutConfig.settings.tabOverlapAllowance,r=this._tabs.indexOf(i.tab),a=this._tabs[r];this._lastVisibleTabIndex=-1;for(let i=0;ie){if(o)i===r&&(l.style.zIndex=\"auto\",l.style.marginLeft=\"\",l.parentElement!==this._element&&this._element.appendChild(l));else{let t;if(t=r>0&&r<=i?(d-e)/(i-1):(d-e)/i,tthis.onClick(t),this._touchStartListener=t=>this.onTouchStart(t),this._rowColumnClosable=!0,this._closeButton=null,this._popoutButton=null,this._tabsContainer=new Qt(this._layoutManager,(t=>this.handleTabInitiatedComponentRemoveEvent(t)),(t=>this.handleTabInitiatedComponentFocusEvent(t)),((t,e,i,n)=>this.handleTabInitiatedDragStartEvent(t,e,i,n)),(()=>this.processTabDropdownActiveChanged())),this._show=i.show,this._popoutEnabled=i.popoutEnabled,this._popoutLabel=i.popoutLabel,this._maximiseEnabled=i.maximiseEnabled,this._maximiseLabel=i.maximiseLabel,this._minimiseEnabled=i.minimiseEnabled,this._minimiseLabel=i.minimiseLabel,this._closeEnabled=i.closeEnabled,this._closeLabel=i.closeLabel,this._tabDropdownEnabled=i.tabDropdownEnabled,this._tabDropdownLabel=i.tabDropdownLabel,this.setSide(i.side),this._canRemoveComponent=this._configClosable,this._element=document.createElement(\"section\"),this._element.classList.add(\"lm_header\"),this._controlsContainerElement=document.createElement(\"section\"),this._controlsContainerElement.classList.add(\"lm_controls\"),this._element.appendChild(this._tabsContainer.element),this._element.appendChild(this._controlsContainerElement),this._element.appendChild(this._tabsContainer.dropdownElement),this._element.addEventListener(\"click\",this._clickListener,{passive:!0}),this._element.addEventListener(\"touchstart\",this._touchStartListener,{passive:!0}),this._documentMouseUpListener=()=>this._tabsContainer.hideAdditionalTabsDropdown(),globalThis.document.addEventListener(\"mouseup\",this._documentMouseUpListener,{passive:!0}),this._tabControlOffset=this._layoutManager.layoutConfig.settings.tabControlOffset,this._tabDropdownEnabled&&(this._tabDropdownButton=new Kt(this,this._tabDropdownLabel,\"lm_tabdropdown\",(()=>this._tabsContainer.showAdditionalTabsDropdown()))),this._popoutEnabled&&(this._popoutButton=new Kt(this,this._popoutLabel,\"lm_popout\",(()=>this.handleButtonPopoutEvent()))),this._maximiseEnabled&&(this._maximiseButton=new Kt(this,this._maximiseLabel,\"lm_maximise\",(t=>this.handleButtonMaximiseToggleEvent(t)))),this._configClosable&&(this._closeButton=new Kt(this,this._closeLabel,\"lm_close\",(()=>s()))),this.processTabDropdownActiveChanged()}get show(){return this._show}get side(){return this._side}get leftRightSided(){return this._leftRightSided}get layoutManager(){return this._layoutManager}get parent(){return this._parent}get tabs(){return this._tabsContainer.tabs}get lastVisibleTabIndex(){return this._tabsContainer.lastVisibleTabIndex}get element(){return this._element}get tabsContainerElement(){return this._tabsContainer.element}get controlsContainerElement(){return this._controlsContainerElement}destroy(){this.emit(\"destroy\"),this._popoutEvent=void 0,this._maximiseToggleEvent=void 0,this._clickEvent=void 0,this._touchStartEvent=void 0,this._componentRemoveEvent=void 0,this._componentFocusEvent=void 0,this._componentDragStartEvent=void 0,this._tabsContainer.destroy(),globalThis.document.removeEventListener(\"mouseup\",this._documentMouseUpListener),this._element.remove()}createTab(t,e){this._tabsContainer.createTab(t,e)}removeTab(t){this._tabsContainer.removeTab(t)}processActiveComponentChanged(t){this._tabsContainer.processActiveComponentChanged(t),this.updateTabSizes()}setSide(t){this._side=t,this._leftRightSided=[nt.right,nt.left].includes(this._side)}setRowColumnClosable(t){this._rowColumnClosable=t,this.updateClosability()}updateClosability(){let t;if(this._configClosable)if(this._rowColumnClosable){t=!0;const e=this.tabs.length;for(let i=0;i1}applyFocusedValue(t){t?this._element.classList.add(\"lm_focused\"):this._element.classList.remove(\"lm_focused\")}processMaximised(){if(void 0===this._maximiseButton)throw new J(\"HPMAX16997\");this._maximiseButton.element.setAttribute(\"title\",this._minimiseLabel)}processMinimised(){if(void 0===this._maximiseButton)throw new J(\"HPMIN16997\");this._maximiseButton.element.setAttribute(\"title\",this._maximiseLabel)}updateTabSizes(){if(this._tabsContainer.tabCount>0){const t=this._show?this._layoutManager.layoutConfig.dimensions.headerHeight:0;let e;this._leftRightSided?(this._element.style.height=\"\",this._element.style.width=zt(t)):(this._element.style.width=\"\",this._element.style.height=zt(t)),e=this._leftRightSided?this._element.offsetHeight-this._controlsContainerElement.offsetHeight-this._tabControlOffset:this._element.offsetWidth-this._controlsContainerElement.offsetWidth-this._tabControlOffset,this._tabsContainer.updateTabSizes(e,this._getActiveComponentItemEvent())}}handleTabInitiatedComponentRemoveEvent(t){if(this._canRemoveComponent){if(void 0===this._componentRemoveEvent)throw new J(\"HHTCE22294\");this._componentRemoveEvent(t)}}handleTabInitiatedComponentFocusEvent(t){if(void 0===this._componentFocusEvent)throw new J(\"HHTAE22294\");this._componentFocusEvent(t)}handleTabInitiatedDragStartEvent(t,e,i,n){if(this._canRemoveComponent){if(void 0===this._componentDragStartEvent)throw new J(\"HHTDSE22294\");this._componentDragStartEvent(t,e,i,n)}else i.cancelDrag()}processTabDropdownActiveChanged(){void 0!==this._tabDropdownButton&&Dt(this._tabDropdownButton.element,this._tabsContainer.dropdownActive)}handleButtonPopoutEvent(){if(this._layoutManager.layoutConfig.settings.popoutWholeStack){if(void 0===this._popoutEvent)throw new J(\"HHBPOE17834\");this._popoutEvent()}else{const t=this._getActiveComponentItemEvent();t&&t.popout()}}handleButtonMaximiseToggleEvent(t){if(void 0===this._maximiseToggleEvent)throw new J(\"HHBMTE16834\");this._maximiseToggleEvent()}onClick(t){t.target===this._element&&this.notifyClick(t)}onTouchStart(t){t.target===this._element&&this.notifyTouchStart(t)}notifyClick(t){if(void 0===this._clickEvent)throw new J(\"HNHC46834\");this._clickEvent(t)}notifyTouchStart(t){if(void 0===this._touchStartEvent)throw new J(\"HNHTS46834\");this._touchStartEvent(t)}}class ee extends $t{constructor(t,e,i){var n,o,s,r,a,l,h,d,c,m,u,p,g,f,v,_,y,C,w;super(t,e,i,ee.createElement(document)),this._headerSideChanged=!1,this._resizeListener=()=>this.handleResize(),this._maximisedListener=()=>this.handleMaximised(),this._minimisedListener=()=>this.handleMinimised(),this._headerConfig=e.header;const I=t.layoutConfig.header,b=e.content;let S;if(1!==b.length)S=void 0;else{S=b[0].header}this._initialWantMaximise=e.maximised,this._initialActiveItemIndex=null!==(n=e.activeItemIndex)&&void 0!==n?n:0;const E=null!==(r=null!==(s=null===(o=this._headerConfig)||void 0===o?void 0:o.show)&&void 0!==s?s:null==S?void 0:S.show)&&void 0!==r?r:I.show,x=null!==(h=null!==(l=null===(a=this._headerConfig)||void 0===a?void 0:a.popout)&&void 0!==l?l:null==S?void 0:S.popout)&&void 0!==h?h:I.popout,L=null!==(m=null!==(c=null===(d=this._headerConfig)||void 0===d?void 0:d.maximise)&&void 0!==c?c:null==S?void 0:S.maximise)&&void 0!==m?m:I.maximise,z=null!==(g=null!==(p=null===(u=this._headerConfig)||void 0===u?void 0:u.close)&&void 0!==p?p:null==S?void 0:S.close)&&void 0!==g?g:I.close,M=null!==(_=null!==(v=null===(f=this._headerConfig)||void 0===f?void 0:f.minimise)&&void 0!==v?v:null==S?void 0:S.minimise)&&void 0!==_?_:I.minimise,P=null!==(w=null!==(C=null===(y=this._headerConfig)||void 0===y?void 0:y.tabDropdown)&&void 0!==C?C:null==S?void 0:S.tabDropdown)&&void 0!==w?w:I.tabDropdown;this._maximisedEnabled=!1!==L;const T={show:!1!==E,side:!1===E?nt.top:E,popoutEnabled:!1!==x,popoutLabel:!1===x?\"\":x,maximiseEnabled:this._maximisedEnabled,maximiseLabel:!1===L?\"\":L,closeEnabled:!1!==z,closeLabel:!1===z?\"\":z,minimiseEnabled:!0,minimiseLabel:M,tabDropdownEnabled:!1!==P,tabDropdownLabel:!1===P?\"\":P};this._header=new te(t,this,T,e.isClosable&&!1!==z,(()=>this.getActiveComponentItem()),(()=>this.remove()),(()=>this.handlePopoutEvent()),(()=>this.toggleMaximise()),(t=>this.handleHeaderClickEvent(t)),(t=>this.handleHeaderTouchStartEvent(t)),(t=>this.handleHeaderComponentRemoveEvent(t)),(t=>this.handleHeaderComponentFocusEvent(t)),((t,e,i,n)=>this.handleHeaderComponentStartDragEvent(t,e,i,n))),this.isStack=!0,this._childElementContainer=document.createElement(\"section\"),this._childElementContainer.classList.add(\"lm_items\"),this.on(\"resize\",this._resizeListener),this._maximisedEnabled&&(this.on(\"maximised\",this._maximisedListener),this.on(\"minimised\",this._minimisedListener)),this.element.appendChild(this._header.element),this.element.appendChild(this._childElementContainer),this.setupHeaderPosition(),this._header.updateClosability()}get childElementContainer(){return this._childElementContainer}get header(){return this._header}get headerShow(){return this._header.show}get headerSide(){return this._header.side}get headerLeftRightSided(){return this._header.leftRightSided}get contentAreaDimensions(){return this._contentAreaDimensions}get initialWantMaximise(){return this._initialWantMaximise}get isMaximised(){return this===this.layoutManager.maximisedStack}get stackParent(){if(!this.parent)throw new Error(\"Stack should always have a parent\");return this.parent}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}init(){if(!0===this.isInitialised)return;this.updateNodeSize();for(let t=0;t0){if(this._initialActiveItemIndex<0||this._initialActiveItemIndex>=e)throw new Error(`ActiveItemIndex out of range: ${this._initialActiveItemIndex} id: ${this.id}`);for(let i=0;ithis.contentItems.length)throw e-=1,new X(\"SAC99728\");if(t instanceof jt)return e=super.addChild(t,e),this._childElementContainer.appendChild(t.element),this._header.createTab(t,e),this.setActiveComponentItem(t,i),this._header.updateTabSizes(),this.updateSize(!1),t.container.setBaseLogicalZIndex(),this._header.updateClosability(),this.emitStateChangedEvent(),e;throw new X(\"SACC88532\")}removeChild(t,e){const i=t,n=this.contentItems.indexOf(i),o=1===this.contentItems.length;if(this._activeComponentItem===i&&(i.focused&&i.blur(),!o)){const t=0===n?1:n-1;this.setActiveComponentItem(this.contentItems[t],!1)}this._header.removeTab(i),super.removeChild(i,e),o||this._header.updateClosability(),this.emitStateChangedEvent()}toggleMaximise(){this.isMaximised?this.minimise():this.maximise()}maximise(){if(!this.isMaximised){this.layoutManager.setMaximisedStack(this);const t=this.contentItems,e=t.length;for(let i=0;i0&&void 0===t)throw new Error(\"expected non-empty stack to have an active component item\");return{type:\"stack\",content:this.calculateConfigContent(),size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,isClosable:this.isClosable,maximised:this.isMaximised,header:this.createHeaderConfig(),activeItemIndex:t}}onDrop(t,e){if(\"header\"===this._dropSegment){if(this.resetHeaderDropZone(),void 0===this._dropIndex)throw new J(\"SODDI68990\");return void this.addChild(t,this._dropIndex)}if(\"body\"===this._dropSegment)return void this.addChild(t,0,!0);const i=\"top\"===this._dropSegment||\"bottom\"===this._dropSegment,n=\"left\"===this._dropSegment||\"right\"===this._dropSegment,o=\"top\"===this._dropSegment||\"left\"===this._dropSegment,s=i&&this.stackParent.isColumn||n&&this.stackParent.isRow;if(t.isComponent){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createAndInitContentItem(e,this);i.addChild(t),t=i}if(t.type===at.row||t.type===at.column){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}if(s){const e=this.stackParent.contentItems.indexOf(this);this.stackParent.addChild(t,o?e:e+1,!0),this.size*=.5,t.size=this.size,t.sizeUnit=this.sizeUnit,this.stackParent.updateSize(!1)}else{const e=i?at.column:at.row,n=ct.createDefault(e),s=this.layoutManager.createContentItem(n,this);this.stackParent.replaceChild(this,s),s.addChild(t,o?0:void 0,!0),s.addChild(this,o?void 0:0,!0),this.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}highlightDropZone(t,e){for(const i in this._contentAreaDimensions){const n=i,o=this._contentAreaDimensions[n].hoverArea;if(o.x1t&&o.y1e)return void(\"header\"===n?(this._dropSegment=\"header\",this.highlightHeaderDropZone(this._header.leftRightSided?e:t)):(this.resetHeaderDropZone(),this.highlightBodyDropZone(n)))}}getArea(){if(\"none\"===this.element.style.display)return null;const t=super.getElementArea(this._header.element),e=super.getElementArea(this._childElementContainer);if(null===t||null===e)throw new K(\"SGAHC13086\");const i=e.x2-e.x1,n=e.y2-e.y1;return this._contentAreaDimensions={header:{hoverArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2},highlightArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2}}},0===this.contentItems.length?(this._contentAreaDimensions.body={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2}},super.getElementArea(this.element)):(this._contentAreaDimensions.left={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x1+.25*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x1+.5*i,y2:e.y2}},this._contentAreaDimensions.top={hoverArea:{x1:e.x1+.25*i,y1:e.y1,x2:e.x1+.75*i,y2:e.y1+.5*n},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y1+.5*n}},this._contentAreaDimensions.right={hoverArea:{x1:e.x1+.75*i,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1+.5*i,y1:e.y1,x2:e.x2,y2:e.y2}},this._contentAreaDimensions.bottom={hoverArea:{x1:e.x1+.25*i,y1:e.y1+.5*n,x2:e.x1+.75*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1+.5*n,x2:e.x2,y2:e.y2}},super.getElementArea(this.element))}positionHeader(t){this._header.side!==t&&(this._header.setSide(t),this._headerSideChanged=!0,this.setupHeaderPosition())}updateNodeSize(){if(\"none\"!==this.element.style.display){const t=kt(this.element);if(this._header.show){t[this._header.leftRightSided?it.width:it.height]-=this.layoutManager.layoutConfig.dimensions.headerHeight}this._childElementContainer.style.width=zt(t.width),this._childElementContainer.style.height=zt(t.height);for(let e=0;e=o&&tthis.onDrag(t,e,i))),this._dragListener.on(\"dragStop\",(()=>this.onDrop())),this.createDragProxyElements(t,e),null===this._componentItem.parent)throw new K(\"DPC10097\");this._componentItemFocused=this._componentItem.focused,this._componentItemFocused&&this._componentItem.blur(),this._componentItem.parent.removeChild(this._componentItem,!0),this.setDimensions(),document.body.appendChild(this._element),this.determineMinMaxXY(),this._layoutManager.calculateItemAreas(),this.setDropPosition(t,e)}get element(){return this._element}createDragProxyElements(t,e){this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_dragProxy\");const i=document.createElement(\"div\");i.classList.add(\"lm_header\");const n=document.createElement(\"div\");n.classList.add(\"lm_tabs\");const o=document.createElement(\"div\");o.classList.add(\"lm_tab\");const s=document.createElement(\"span\");s.classList.add(\"lm_title\"),o.appendChild(s),n.appendChild(o),i.appendChild(n),this._proxyContainerElement=document.createElement(\"div\"),this._proxyContainerElement.classList.add(\"lm_content\"),this._element.appendChild(i),this._element.appendChild(this._proxyContainerElement),this._originalParent instanceof ee&&this._originalParent.headerShow&&(this._sided=this._originalParent.headerLeftRightSided,this._element.classList.add(\"lm_\"+this._originalParent.headerSide),[nt.right,nt.bottom].indexOf(this._originalParent.headerSide)>=0&&this._proxyContainerElement.insertAdjacentElement(\"afterend\",i)),this._element.style.left=zt(t),this._element.style.top=zt(e),o.setAttribute(\"title\",this._componentItem.title),s.insertAdjacentText(\"afterbegin\",this._componentItem.title),this._proxyContainerElement.appendChild(this._componentItem.element)}determineMinMaxXY(){const t=this._layoutManager.groundItem;if(void 0===t)throw new J(\"DPDMMXY73109\");{const e=t.element.getBoundingClientRect();this._minX=e.left+document.body.scrollLeft,this._minY=e.top+document.body.scrollTop,this._maxX=this._minX+e.width,this._maxY=this._minY+e.height}}onDrag(t,e,i){const n=i.pageX,o=i.pageY;this.setDropPosition(n,o),this._componentItem.drag()}setDropPosition(t,e){this._layoutManager.layoutConfig.settings.constrainDragToContainer&&(t<=this._minX?t=Math.ceil(this._minX):t>=this._maxX&&(t=Math.floor(this._maxX)),e<=this._minY?e=Math.ceil(this._minY):e>=this._maxY&&(e=Math.floor(this._maxY))),this._element.style.left=zt(t),this._element.style.top=zt(e),this._area=this._layoutManager.getArea(t,e),null!==this._area&&(this._lastValidArea=this._area,this._area.contentItem.highlightDropZone(t,e,this._area))}onDrop(){const t=this._layoutManager.dropTargetIndicator;if(null===t)throw new K(\"DPOD30011\");let e;if(t.hide(),this._componentItem.exitDragMode(),null!==this._area)e=this._componentItem,this._area.contentItem.onDrop(e,this._area);else if(null!==this._lastValidArea){e=this._componentItem;this._lastValidArea.contentItem.onDrop(e,this._lastValidArea)}else this._originalParent?(e=this._componentItem,this._originalParent.addChild(e)):this._componentItem.destroy();this._element.remove(),this._layoutManager.emit(\"itemDropped\",this._componentItem),this._componentItemFocused&&void 0!==e&&e.focus()}setDimensions(){const t=this._layoutManager.layoutConfig.dimensions;if(void 0===t)throw new Error(\"DragProxy.setDimensions: dimensions undefined\");let e=t.dragProxyWidth,i=t.dragProxyHeight;if(void 0===e||void 0===i)throw new Error(\"DragProxy.setDimensions: width and/or height undefined\");const n=!1===this._layoutManager.layoutConfig.header.show?0:t.headerHeight;this._element.style.width=zt(e),this._element.style.height=zt(i),e-=this._sided?n:0,i-=this._sided?0:n,this._proxyContainerElement.style.width=zt(e),this._proxyContainerElement.style.height=zt(i),this._componentItem.enterDragMode(e,i),this._componentItem.show()}}class ne{constructor(t,e,i,n,o,s,r){this._layoutManager=t,this._element=e,this._extraAllowableChildTargets=i,this._componentTypeOrFtn=n,this._componentState=o,this._title=s,this._id=r,this._dragListener=null,this._dummyGroundContainer=document.createElement(\"div\");const a=gt.createDefault(\"row\");this._dummyGroundContentItem=new Yt(this._layoutManager,a,this._dummyGroundContainer),this.createDragListener()}destroy(){this.removeDragListener()}createDragListener(){this.removeDragListener(),this._dragListener=new Zt(this._element,this._extraAllowableChildTargets),this._dragListener.on(\"dragStart\",((t,e)=>this.onDragStart(t,e))),this._dragListener.on(\"dragStop\",(()=>this.onDragStop()))}onDragStart(t,e){var i;const n=\"component\";let o;if(\"function\"==typeof this._componentTypeOrFtn){const t=this._componentTypeOrFtn();o=ne.isDragSourceComponentItemConfig(t)?{type:n,componentState:t.state,componentType:t.type,title:null!==(i=t.title)&&void 0!==i?i:this._title}:t}else o={type:n,componentState:this._componentState,componentType:this._componentTypeOrFtn,title:this._title,id:this._id};const s=bt.resolve(o,!1),r=new jt(this._layoutManager,s,this._dummyGroundContentItem);if(this._dummyGroundContentItem.contentItems.push(r),null===this._dragListener)throw new K(\"DSODSD66746\");{const i=new ie(t,e,this._dragListener,this._layoutManager,r,this._dummyGroundContentItem),n=this._layoutManager.transitionIndicator;if(null===n)throw new K(\"DSODST66746\");n.transitionElements(this._element,i.element)}}onDragStop(){this.createDragListener()}removeDragListener(){null!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=null)}}!function(t){t.isDragSourceComponentItemConfig=function(t){return!(\"componentType\"in t)}}(ne||(ne={}));class oe{constructor(){this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_dropTargetIndicator\");const t=document.createElement(\"div\");t.classList.add(\"lm_inner\"),this._element.appendChild(t),document.body.appendChild(this._element)}destroy(){this._element.remove()}highlightArea(t,e){this._element.style.left=zt(t.x1+e),this._element.style.top=zt(t.y1+e),this._element.style.width=zt(t.x2-t.x1-e),this._element.style.height=zt(t.y2-t.y1-e),this._element.style.display=\"block\"}hide(){Dt(this._element,!1)}}class se{constructor(){this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_transition_indicator\"),document.body.appendChild(this._element),this._toElement=null,this._fromDimensions=null,this._totalAnimationDuration=200,this._animationStartTime=null}destroy(){this._element.remove()}transitionElements(t,e){}nextAnimationFrame(){}measure(t){const e=t.getBoundingClientRect();return{left:e.left,top:e.top,width:t.offsetWidth,height:t.offsetHeight}}}class re extends Wt{constructor(t){super(),this._layoutManager=t,this._childEventListener=t=>this.onEventFromChild(t),globalThis.addEventListener(re.ChildEventName,this._childEventListener,{passive:!0})}emit(t,...e){\"userBroadcast\"===t?this.emitUserBroadcast(...e):super.emit(t,...e)}emitUserBroadcast(...t){this.handleUserBroadcastEvent(\"userBroadcast\",t)}destroy(){globalThis.removeEventListener(re.ChildEventName,this._childEventListener)}handleUserBroadcastEvent(t,e){this._layoutManager.isSubWindow?this.propagateToParent(t,e):this.propagateToThisAndSubtree(t,e)}onEventFromChild(t){const e=t.detail;this.handleUserBroadcastEvent(e.eventName,e.args)}propagateToParent(t,e){const i={bubbles:!0,cancelable:!0,detail:{layoutManager:this._layoutManager,eventName:t,args:e}},n=new CustomEvent(re.ChildEventName,i),o=globalThis.opener;if(null===o)throw new K(\"EHPTP15778\");o.dispatchEvent(n)}propagateToThisAndSubtree(t,e){this.emitUnknown(t,...e);for(let i=0;ithis.handleContainerResize())),this._windowBeforeUnloadListener=()=>this.onBeforeUnload(),this._windowBeforeUnloadListening=!1,this._maximisedStackBeforeDestroyedListener=t=>this.cleanupBeforeMaximisedStackDestroyed(t),this.isSubWindow=t.isSubWindow,this._constructorOrSubWindowLayoutConfig=t.constructorOrSubWindowLayoutConfig,Q.checkInitialise(),dt.checkInitialise(),void 0!==t.containerElement&&(this._containerElement=t.containerElement)}get container(){return this._containerElement}get isInitialised(){return this._isInitialised}get groundItem(){return this._groundItem}get root(){return this._groundItem}get openPopouts(){return this._openPopouts}get dropTargetIndicator(){return this._dropTargetIndicator}get transitionIndicator(){return this._transitionIndicator}get width(){return this._width}get height(){return this._height}get eventHub(){return this._eventHub}get rootItem(){if(void 0===this._groundItem)throw new Error(\"Cannot access rootItem before init\");return 0===this._groundItem.contentItems.length?void 0:this._groundItem.contentItems[0]}get focusedComponentItem(){return this._focusedComponentItem}get tabDropPlaceholder(){return this._tabDropPlaceholder}get maximisedStack(){return this._maximisedStack}get deprecatedConstructor(){return!this.isSubWindow&&void 0!==this._constructorOrSubWindowLayoutConfig}destroy(){if(this._isInitialised){this._windowBeforeUnloadListening&&(globalThis.removeEventListener(\"beforeunload\",this._windowBeforeUnloadListener),this._windowBeforeUnloadListening=!1),!0===this.layoutConfig.settings.closePopoutsOnUnload&&this.closeAllOpenPopouts(),this._resizeObserver.disconnect(),this.checkClearResizeTimeout(),void 0!==this._groundItem&&this._groundItem.destroy(),this._tabDropPlaceholder.remove(),null!==this._dropTargetIndicator&&this._dropTargetIndicator.destroy(),null!==this._transitionIndicator&&this._transitionIndicator.destroy(),this._eventHub.destroy();for(const t of this._dragSources)t.destroy();this._dragSources=[],this._isInitialised=!1}}minifyConfig(t){return _t.minifyConfig(t)}unminifyConfig(t){return _t.unminifyConfig(t)}init(){let t;if(this.setContainer(),this._dropTargetIndicator=new oe,this._transitionIndicator=new se,this.updateSizeFromContainer(),this.isSubWindow){if(void 0===this._constructorOrSubWindowLayoutConfig)throw new J(\"LMIU07155\");{const e=this._constructorOrSubWindowLayoutConfig.root;if(void 0===e)throw new X(\"LMIC07156\");if(!Ct.isComponent(e))throw new X(\"LMIC07157\");t=e;const i=xt.resolve(this._constructorOrSubWindowLayoutConfig);this.layoutConfig=Object.assign(Object.assign({},i),{root:void 0})}}else void 0===this._constructorOrSubWindowLayoutConfig?this.layoutConfig=_t.createDefault():this.layoutConfig=xt.resolve(this._constructorOrSubWindowLayoutConfig);const e=this.layoutConfig;this._groundItem=new Yt(this,e.root,this._containerElement),this._groundItem.init(),this.checkLoadedLayoutMaximiseItem(),this._resizeObserver.observe(this._containerElement),this._isInitialised=!0,this.adjustColumnsResponsive(),this.emit(\"initialised\"),void 0!==t&&this.loadComponentAsRoot(t)}loadLayout(t){if(!this.isInitialised)throw new Error(\"GoldenLayout: Need to call init() if LayoutConfig with defined root passed to constructor\");if(void 0===this._groundItem)throw new J(\"LMLL11119\");this.createSubWindows(),this.layoutConfig=xt.resolve(t),this._groundItem.loadRoot(this.layoutConfig.root),this.checkLoadedLayoutMaximiseItem(),this.adjustColumnsResponsive()}saveLayout(){if(!1===this._isInitialised)throw new Error(\"Can't create config, layout not yet initialised\");if(void 0===this._groundItem)throw new J(\"LMTC18244\");{const t=this._groundItem.calculateConfigContent();let e;e=1!==t.length?void 0:t[0],this.reconcilePopoutWindows();const i=[];for(let t=0;t=0?n=this._groundItem.contentItems[0]:e=0;break;case at.row:case at.column:e=n.addItem(t,i.index);break;case at.stack:if(Ct.isComponent(t)){e=n.addItem(t,i.index);break}throw Error(tt[6]);case at.component:throw new X(\"LMAIALC87444602\");default:throw new Y(\"LMAIALU98881733\",n.type)}if(Ct.isComponent(t)){const t=n.contentItems[e];Gt.isStack(t)&&(n=t,e=0)}return i.parentItem=n,i.index=e,i}}}loadComponentAsRoot(t){if(void 0===this._groundItem)throw new Error(\"Cannot add item before init\");this._groundItem.loadComponentAsRoot(t)}updateSize(t,e){this.setSize(t,e)}setSize(t,e){if(this._width=t,this._height=e,!0===this._isInitialised){if(void 0===this._groundItem)throw new J(\"LMUS18881\");if(this._groundItem.setSize(this._width,this._height),this._maximisedStack){const{width:t,height:e}=kt(this._containerElement);Tt(this._maximisedStack.element,t),At(this._maximisedStack.element,e),this._maximisedStack.updateSize(!1)}this.adjustColumnsResponsive()}}beginSizeInvalidation(){this._sizeInvalidationBeginCount++}endSizeInvalidation(){0==--this._sizeInvalidationBeginCount&&this.updateSizeFromContainer()}updateSizeFromContainer(){const{width:t,height:e}=kt(this._containerElement);this.setSize(t,e)}updateRootSize(t=!1){if(void 0===this._groundItem)throw new J(\"LMURS28881\");this._groundItem.updateSize(t)}createAndInitContentItem(t,e){const i=this.createContentItem(t,e);return i.init(),i}createContentItem(t,e){if(\"string\"!=typeof t.type)throw new G(\"Missing parameter 'type'\",JSON.stringify(t));if(ct.isComponentItem(t)&&!(e instanceof ee)&&e&&!(!0===this.isSubWindow&&e instanceof Yt)){t={type:at.stack,content:[t],size:t.size,sizeUnit:t.sizeUnit,minSize:t.minSize,minSizeUnit:t.minSizeUnit,id:t.id,maximised:t.maximised,isClosable:t.isClosable,activeItemIndex:0,header:void 0}}return this.createContentItemFromConfig(t,e)}findFirstComponentItemById(t){if(void 0===this._groundItem)throw new J(\"LMFFCIBI82446\");return this.findFirstContentItemTypeByIdRecursive(at.component,t,this._groundItem)}createPopout(t,e,i,n){return t instanceof Gt?this.createPopoutFromContentItem(t,e,i,n):this.createPopoutFromItemConfig(t,e,i,n)}createPopoutFromContentItem(t,e,i,n){let o=t.parent,s=t;for(;null!==o&&1===o.contentItems.length&&!o.isGround;)s=o,o=o.parent;if(null===o)throw new K(\"LMCPFCI00834\");{if(void 0===n&&(n=o.contentItems.indexOf(s)),null!==i&&o.addPopInParentId(i),void 0===e){const i=globalThis.screenX||globalThis.screenLeft,n=globalThis.screenY||globalThis.screenTop,o=t.element.offsetLeft,s=t.element.offsetTop,{width:r,height:a}=kt(t.element);e={left:i+o,top:n+s,width:r,height:a}}const r=t.toConfig();if(t.remove(),ft.isRootItemConfig(r))return this.createPopoutFromItemConfig(r,e,i,n);throw new Error(`${tt[0]}`)}}beginVirtualSizedContainerAdding(){0==++this._virtualSizedContainerAddingBeginCount&&(this._virtualSizedContainers.length=0)}addVirtualSizedContainer(t){this._virtualSizedContainers.push(t)}endVirtualSizedContainerAdding(){if(0==--this._virtualSizedContainerAddingBeginCount){const t=this._virtualSizedContainers.length;if(t>0){this.fireBeforeVirtualRectingEvent(t);for(let e=0;ethis.emit(\"windowOpened\",a))),a.on(\"closed\",(()=>this.reconcilePopoutWindows())),this._openPopouts.push(a),this.layoutConfig.settings.closePopoutsOnUnload&&!this._windowBeforeUnloadListening&&(globalThis.addEventListener(\"beforeunload\",this._windowBeforeUnloadListener,{passive:!0}),this._windowBeforeUnloadListening=!0),a}closeAllOpenPopouts(){for(let t=0;tglobalThis.close()),1)}getArea(t,e){let i=null,n=1/0;for(let o=0;o=s.x1&&t=s.y1&&es.surface&&(n=s.surface,i=s)}return i}calculateItemAreas(){const t=this.getAllContentItems(),e=this._groundItem;if(void 0===e)throw new J(\"LMCIAR44365\");if(1!==t.length){e.contentItems[0].isStack?this._itemAreas=[]:this._itemAreas=e.createSideAreas();for(let e=0;e0){let e=t[0];if(Gt.isComponentItem(e)){const t=e.parent;if(null===t)throw new K(\"LMXLLMI69999\");e=t}if(!Gt.isStack(e))throw new X(\"LMCLLMI19993\");e.maximise()}}}processMaximiseStack(t){if(this._maximisedStack=t,t.on(\"beforeItemDestroyed\",this._maximisedStackBeforeDestroyedListener),t.element.classList.add(\"lm_maximised\"),t.element.insertAdjacentElement(\"afterend\",this._maximisePlaceholder),void 0===this._groundItem)throw new J(\"LMMXI19993\");{this._groundItem.element.prepend(t.element);const{width:e,height:i}=kt(this._containerElement);Tt(t.element,e),At(t.element,i),t.updateSize(!0),t.focusActiveContentItem(),this._maximisedStack.emit(\"maximised\"),this.emit(\"stateChanged\")}}processMinimiseMaximisedStack(){if(void 0===this._maximisedStack)throw new X(\"LMMMS74422\");{const t=this._maximisedStack;if(null===t.parent)throw new K(\"LMMI13668\");t.element.classList.remove(\"lm_maximised\"),this._maximisePlaceholder.insertAdjacentElement(\"afterend\",t.element),this._maximisePlaceholder.remove(),this.updateRootSize(!0),this._maximisedStack=void 0,t.off(\"beforeItemDestroyed\",this._maximisedStackBeforeDestroyedListener),t.emit(\"minimised\"),this.emit(\"stateChanged\")}}reconcilePopoutWindows(){const t=[];for(let e=0;e{this._resizeTimeoutId=void 0,this.beginSizeInvalidation(),this.endSizeInvalidation()}),this.resizeDebounceInterval))}checkClearResizeTimeout(){void 0!==this._resizeTimeoutId&&(clearTimeout(this._resizeTimeoutId),this._resizeTimeoutId=void 0)}setContainer(){var t;const e=document.body,i=null!==(t=this._containerElement)&&void 0!==t?t:e;if(i===e){this.resizeWithContainerAutomatically=!0;const t=document.documentElement;t.style.height=\"100%\",t.style.margin=\"0\",t.style.padding=\"0\",t.style.overflow=\"clip\",e.style.height=\"100%\",e.style.margin=\"0\",e.style.padding=\"0\",e.style.overflow=\"clip\"}this._containerElement=i}onBeforeUnload(){this.destroy()}adjustColumnsResponsive(){if(void 0===this._groundItem)throw new J(\"LMACR20883\");if(this._firstLoad=!1,this.useResponsiveLayout()&&!this._updatingColumnsResponsive&&this._groundItem.contentItems.length>0&&this._groundItem.contentItems[0].isRow){if(void 0===this._groundItem||null===this._width)throw new J(\"LMACR77412\");{const t=this._groundItem.contentItems[0].contentItems.length;if(t<=1)return;{const e=this.layoutConfig.dimensions.defaultMinItemWidth;if(t*e<=this._width)return;{this._updatingColumnsResponsive=!0;const i=t-Math.max(Math.floor(this._width/e),1),n=this._groundItem.contentItems[0],o=this.getAllStacks();if(0===o.length)throw new X(\"LMACRS77413\");{const t=o[0];for(let e=0;en?void 0:{parentItem:t,index:o}}}case 1:if(void 0===this._focusedComponentItem)return;{const t=this._focusedComponentItem.parentItem;return this.tryCreateLocationFromParentItem(t,e)}case 2:{const t=this.findFirstContentItemType(at.stack);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 3:{let t=this.findFirstContentItemType(at.row);return void 0!==t?this.tryCreateLocationFromParentItem(t,e):(t=this.findFirstContentItemType(at.column),void 0!==t?this.tryCreateLocationFromParentItem(t,e):void 0)}case 4:{const t=this.findFirstContentItemType(at.row);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 5:{const t=this.findFirstContentItemType(at.column);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 6:if(void 0===this._groundItem)throw new J(\"LMFLRIF18244\");return void 0!==this.rootItem?void 0:void 0===e||0===e?{parentItem:this._groundItem,index:0}:void 0;case 7:if(void 0===this._groundItem)throw new J(\"LMFLF18244\");{const t=this._groundItem.contentItems;if(0===t.length)return void 0===e||0===e?{parentItem:this._groundItem,index:0}:void 0;{const i=t[0];return this.tryCreateLocationFromParentItem(i,e)}}}}tryCreateLocationFromParentItem(t,e){const i=t.contentItems.length;return void 0===e?{parentItem:t,index:i}:e<0||e>i?void 0:{parentItem:t,index:e}}}!function(t){t.createMaximisePlaceElement=function(t){const e=t.createElement(\"div\");return e.classList.add(\"lm_maximise_place\"),e},t.createTabDropPlaceholderElement=function(t){const e=t.createElement(\"div\");return e.classList.add(\"lm_drop_tab_placeholder\"),e},t.defaultLocationSelectors=[{typeId:1,index:void 0},{typeId:2,index:void 0},{typeId:3,index:void 0},{typeId:7,index:void 0}],t.afterFocusedItemIfPossibleLocationSelectors=[{typeId:0,index:1},{typeId:2,index:void 0},{typeId:3,index:void 0},{typeId:7,index:void 0}]}(ae||(ae={}));class le extends ae{constructor(t,e,i,n){if(super(le.createLayoutManagerConstructorParameters(t,e)),this._bindComponentEventHanlderPassedInConstructor=!1,this._creationTimeoutPassed=!1,void 0!==e&&\"function\"==typeof e&&(this.bindComponentEvent=e,this._bindComponentEventHanlderPassedInConstructor=!0,void 0!==i&&(this.unbindComponentEvent=i)),!this._bindComponentEventHanlderPassedInConstructor&&this.isSubWindow){if(void 0===this._constructorOrSubWindowLayoutConfig)throw new J(\"VLC98823\");{const t=xt.resolve(this._constructorOrSubWindowLayoutConfig);this.layoutConfig=Object.assign(Object.assign({},t),{root:void 0})}}!0!==n&&(this.deprecatedConstructor||this.init())}destroy(){this.bindComponentEvent=void 0,this.unbindComponentEvent=void 0,super.destroy()}init(){if(this._bindComponentEventHanlderPassedInConstructor||\"loading\"!==document.readyState&&null!==document.body){if(!this._bindComponentEventHanlderPassedInConstructor&&!0===this.isSubWindow&&!this._creationTimeoutPassed)return setTimeout((()=>this.init()),7),void(this._creationTimeoutPassed=!0);!0===this.isSubWindow&&(this._bindComponentEventHanlderPassedInConstructor||this.clearHtmlAndAdjustStylesForSubWindow(),window.__glInstance=this),super.init()}else document.addEventListener(\"DOMContentLoaded\",(()=>this.init()),{passive:!0})}clearHtmlAndAdjustStylesForSubWindow(){const t=document.head,e=new Array(4);e[0]=document.querySelectorAll(\"body link\"),e[1]=document.querySelectorAll(\"body style\"),e[2]=document.querySelectorAll(\"template\"),e[3]=document.querySelectorAll(\".gl_keep\");for(let i=0;ithis.emit(\"popIn\"))),document.body.appendChild(t),!0}}bindComponent(t,e){if(void 0!==this.bindComponentEvent){return this.bindComponentEvent(t,e)}if(void 0!==this.getComponentEvent)return{virtual:!1,component:this.getComponentEvent(t,e)};{const t=`${tt[2]}: ${JSON.stringify(e)}`;throw new Z(t)}}unbindComponent(t,e,i){if(void 0!==this.unbindComponentEvent)this.unbindComponentEvent(t);else if(!e&&void 0!==this.releaseComponentEvent){if(void 0===i)throw new J(\"VCUCRCU333998\");this.releaseComponentEvent(t,i)}}}!function(t){let e=!1;t.createLayoutManagerConstructorParameters=function(t,i){const n=e?null:new URL(document.location.href).searchParams.get(\"gl-window\");e=!0;const o=null!==n;let s,r;if(null!==n){const e=localStorage.getItem(n);if(null===e)throw new Error(\"Null gl-window Config\");localStorage.removeItem(n);const i=JSON.parse(e),o=_t.unminifyConfig(i);r=xt.fromResolved(o),t instanceof HTMLElement&&(s=t)}else void 0===t?r=void 0:t instanceof HTMLElement?(r=void 0,s=t):r=t,void 0===s&&i instanceof HTMLElement&&(s=i);return{constructorOrSubWindowLayoutConfig:r,isSubWindow:o,containerElement:s}}}(le||(le={}));class he extends le{constructor(t,e,i){super(t,e,i,!0),this._componentTypesMap=new Map,this._registeredComponentMap=new Map,this._virtuableComponentMap=new Map,this._containerVirtualRectingRequiredEventListener=(t,e,i)=>this.handleContainerVirtualRectingRequiredEvent(t,e,i),this._containerVirtualVisibilityChangeRequiredEventListener=(t,e)=>this.handleContainerVirtualVisibilityChangeRequiredEvent(t,e),this._containerVirtualZIndexChangeRequiredEventListener=(t,e,i)=>this.handleContainerVirtualZIndexChangeRequiredEvent(t,e,i),this.deprecatedConstructor||this.init()}registerComponent(t,e,i=!1){if(\"function\"!=typeof e)throw new $(\"registerComponent() componentConstructorOrFactoryFtn parameter is not a function\");if(e.hasOwnProperty(\"prototype\")){const n=e;this.registerComponentConstructor(t,n,i)}else{const n=e;this.registerComponentFactoryFunction(t,n,i)}}registerComponentConstructor(t,e,i=!1){if(\"function\"!=typeof e)throw new Error(tt[1]);if(void 0!==this._componentTypesMap.get(t))throw new Z(`${tt[3]}: ${t}`);this._componentTypesMap.set(t,{constructor:e,factoryFunction:void 0,virtual:i})}registerComponentFactoryFunction(t,e,i=!1){if(\"function\"!=typeof e)throw new Z(\"Please register a constructor function\");if(void 0!==this._componentTypesMap.get(t))throw new Z(`${tt[3]}: ${t}`);this._componentTypesMap.set(t,{constructor:void 0,factoryFunction:e,virtual:i})}registerComponentFunction(t){this.registerGetComponentConstructorCallback(t)}registerGetComponentConstructorCallback(t){if(\"function\"!=typeof t)throw new Error(\"Please register a callback function\");void 0!==this._getComponentConstructorFtn&&console.warn(\"Multiple component functions are being registered. Only the final registered function will be used.\"),this._getComponentConstructorFtn=t}getRegisteredComponentTypeNames(){const t=this._componentTypesMap.keys();return Array.from(t)}getComponentInstantiator(t){let e;const i=pt.resolveComponentTypeName(t);return void 0!==i&&(e=this._componentTypesMap.get(i)),void 0===e&&void 0!==this._getComponentConstructorFtn&&(e={constructor:this._getComponentConstructorFtn(t),factoryFunction:void 0,virtual:!1}),e}bindComponent(t,e){let i;const n=pt.resolveComponentTypeName(e);let o;if(void 0!==n&&(i=this._componentTypesMap.get(n)),void 0===i&&void 0!==this._getComponentConstructorFtn&&(i={constructor:this._getComponentConstructorFtn(e),factoryFunction:void 0,virtual:!1}),void 0!==i){const s=i.virtual;let r,a;r=void 0===e.componentState?void 0:Ut({},e.componentState);const l=i.constructor;if(void 0!==l)a=new l(t,r,s);else{const e=i.factoryFunction;if(void 0===e)throw new X(\"LMBCFFU10008\");a=e(t,r,s)}if(s){if(void 0===a)throw new J(\"GLBCVCU988774\");{const e=a,i=e.rootHtmlElement;if(void 0===i)throw new Z(`${tt[5]}: ${n}`);!function(t){const e=\"absolute\";t.style.position!==e&&(t.style.position=e)}(i),this.container.appendChild(i),this._virtuableComponentMap.set(t,e),t.virtualRectingRequiredEvent=this._containerVirtualRectingRequiredEventListener,t.virtualVisibilityChangeRequiredEvent=this._containerVirtualVisibilityChangeRequiredEventListener,t.virtualZIndexChangeRequiredEvent=this._containerVirtualZIndexChangeRequiredEventListener}}this._registeredComponentMap.set(t,a),o={virtual:i.virtual,component:a}}else o=super.bindComponent(t,e);return o}unbindComponent(t,e,i){if(void 0===this._registeredComponentMap.get(t))super.unbindComponent(t,e,i);else{const e=this._virtuableComponentMap.get(t);if(void 0!==e){const i=e.rootHtmlElement;if(void 0===i)throw new X(\"GLUC77743\",t.title);this.container.removeChild(i),this._virtuableComponentMap.delete(t)}}}fireBeforeVirtualRectingEvent(t){this._goldenLayoutBoundingClientRect=this.container.getBoundingClientRect(),super.fireBeforeVirtualRectingEvent(t)}handleContainerVirtualRectingRequiredEvent(t,e,i){const n=this._virtuableComponentMap.get(t);if(void 0===n)throw new J(\"GLHCSCE55933\");{const o=n.rootHtmlElement;if(void 0===o)throw new Z(tt[4]+\" \"+t.title);{const n=t.element.getBoundingClientRect(),s=n.left-this._goldenLayoutBoundingClientRect.left;o.style.left=zt(s);const r=n.top-this._goldenLayoutBoundingClientRect.top;o.style.top=zt(r),Tt(o,e),At(o,i)}}}handleContainerVirtualVisibilityChangeRequiredEvent(t,e){const i=this._virtuableComponentMap.get(t);if(void 0===i)throw new J(\"GLHCVVCRE55934\");{const n=i.rootHtmlElement;if(void 0===n)throw new Z(tt[4]+\" \"+t.title);Dt(n,e)}}handleContainerVirtualZIndexChangeRequiredEvent(t,e,i){const n=this._virtuableComponentMap.get(t);if(void 0===n)throw new J(\"GLHCVZICRE55935\");{const e=n.rootHtmlElement;if(void 0===e)throw new Z(tt[4]+\" \"+t.title);e.style.zIndex=i}}}const de=\"initial_\",ce={show:\"top\",popout:!1,maximise:!1,close:\"close-tab-unused\"},me={headerHeight:31},ue={hasHeaders:!0,reorderEnabled:!0},pe={popoutWholeStack:!1,constrainDragToContainer:!1,constrainDragToHeaders:!1,preventDragout:!1,showMaximiseIcon:!1,showPopoutIcon:!1,showCloseIcon:!1,blockedPopoutsThrowError:!0,closePopoutsOnUnload:!0,selectionEnabled:!1};var ge,fe;class ve{constructor(e){this.layout=e,ge.set(this,void 0),fe.set(this,void 0),this.handleResize=t=>{t.forEach((t=>this.resizeElement(t.target)))},this.handleMutation=()=>{this.layout.viewComponentsByContainerElement.forEach((t=>{this.resizeElement(t.container.element)}))},t.__classPrivateFieldSet(this,ge,new ResizeObserver(this.handleResize),\"f\"),t.__classPrivateFieldSet(this,fe,new MutationObserver(this.handleMutation),\"f\")}observeMutations(e){t.__classPrivateFieldGet(this,fe,\"f\")?.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[\"class\"]})}destroy(){t.__classPrivateFieldGet(this,ge,\"f\").disconnect(),t.__classPrivateFieldGet(this,fe,\"f\").disconnect()}observeContainer(e){t.__classPrivateFieldGet(this,ge,\"f\").observe(e)}unobserveContainer(e){t.__classPrivateFieldGet(this,ge,\"f\").unobserve(e)}resizeElement(t){const e=this.layout.viewComponentsByContainerElement.get(t);e&&e.resize()}}ge=new WeakMap,fe=new WeakMap;var _e={};Object.defineProperty(_e,\"__esModule\",{value:!0});var ye=_e.BaseItem=void 0;class Ce{constructor(t,e,i){this._item=t,this._layout=e,this._wrap=i}get raw(){return this._item}get layout(){return this._layout}get type(){return this._item.type}get contentItems(){return(this._item.contentItems??[]).map((t=>this._wrap(t)))}get parent(){const t=this._item.parent;return t?this._wrap(t):null}setActiveContentItem(t,e){if(\"stack\"!==this.type)throw new Error(`Cannot call setActiveContentItem from a non-stack item: ${this.type}`);this._item.setActiveContentItem(t.raw,e)}static wrapInternal(t,e,i){const n=Ce.wrapCache.get(e);if(n)return n;const o=new t(e,i,(e=>Ce.wrapInternal(t,e,i)));return Ce.wrapCache.set(e,o),o}}ye=_e.BaseItem=Ce,Ce.wrapCache=new WeakMap;const we=t=>!!t&&\"contentItems\"in t&&(t.isRow||t.isColumn);class Ie extends ye{isRoot(){return!!this._item.parent?.isGround}getBounds(){return this._item.element.getBoundingClientRect()}get viewName(){if(this._item.isComponent){const{component:t}=this._item;return t.identity.name}throw new Error(\"View name not found\")}onDestroyed(t){const e=({target:i})=>{i===this._item&&(t(),this._item.off(\"itemDestroyed\",e))};this._item.on(\"itemDestroyed\",e)}createAdjacentStack({position:t=\"right\"}={}){const e=this.raw;if(ee.isStack(e)&&e.parent){const i=[\"top\",\"bottom\"].includes(t)?\"column\":\"row\",n=[\"left\",\"top\"].includes(t)?1:0,o=we(e.parent)?e.parent:e.layoutManager,s=o,r=e.parent.contentItems.indexOf(e);e.parent.isGround&&e.parent.removeChild(e,!0);const a=o.newItem({type:i,content:[{type:\"stack\",content:[]}]},r);if(!a)throw new Error(\"createAdjacentStack: Failed to create new container\");const l=a.contentItems[0];return a.addChild(this.raw,n),we(s)&&s.removeChild(e,!0),this._wrap(l)}throw new Error(`Cannot creat adjacent stacks for type: ${e.type}, must be type 'stack'`)}setActiveContentItem(t,e=!0){if(!ee.isStack(this._item))throw new Error(`Cannot call setActiveContentItem from a non-stack item: ${this.type}`);this._item.setActiveComponentItem(t.raw,!e)}static wrap(t,e){return ye.wrapInternal(Ie,t,e)}}function be(t=[],e){for(const i of t)\"component\"===i.type?Object.keys(e).forEach((t=>{t in i&&(i.componentState={[`${de}${t}`]:i[t],...i.componentState}),i[t]=e[t]})):be(i.content,e)}function Se(t=[],e,i){for(const n of t)if(\"component\"===n.type)Object.keys(e).forEach((t=>{if(`${de}${t}`in n.componentState)return n[t]=n.componentState[`${de}${t}`],void delete n.componentState[`${de}${t}`];n[t]=e[t]}));else{if(n.size&&(\"row\"===i||\"column\"===i)){n[\"row\"===i?\"width\":\"height\"]=n.size?.includes(\".\")?parseFloat(n.size):parseInt(n.size)}Se(n.content,e,n.type)}}function Ee(t){if(t.root){t.root.content&&Se([t.root],{componentName:\"view\",isClosable:!0});const e=t.root;t.content=[e],delete t.root}return t}const xe=e=>class extends e{connectedCallback(){if(!this.name||!this.uuid)throw new Error(\" Name or uuid attribute missing\");if(!this.src)throw new Error(\" missing 'src' attribute.\");this.#t||(this.#t=document.createElement(\"iframe\"),this.#t.src=this.src,this.#t.style.height=\"100%\",this.#t.style.width=\"100%\",this.#t.style.border=\"none\",this.forceFrameName?this.#t.setAttribute(\"name\",this.forceFrameName):this.#t.setAttribute(\"name\",t.encodeOptions({brokerUrl:this.brokerUrl,name:this.name,uuid:this.uuid,providerId:this.providerId,contextGroup:this.contextGroup},\"of-frame\")),this.#t.setAttribute(\"id\",this.name),this.appendChild(this.#t))}#t;get brokerUrl(){return this.getAttribute(\"of-broker\")}set brokerUrl(t){t&&this.setAttribute(\"of-broker\",t)}get name(){return this.getAttribute(\"of-name\")}set name(t){t&&this.setAttribute(\"of-name\",t)}get forceFrameName(){return this.getAttribute(\"forceFrameName\")}set forceFrameName(t){t&&this.setAttribute(\"forceFrameName\",t)}get uuid(){return this.getAttribute(\"of-uuid\")}set uuid(t){t&&this.setAttribute(\"of-uuid\",t)}get src(){return this.getAttribute(\"src\")}set src(t){t&&this.setAttribute(\"src\",t)}get providerId(){return this.getAttribute(\"of-provider-id\")}set providerId(t){t&&this.setAttribute(\"of-provider-id\",t)}get contextGroup(){return this.getAttribute(\"of-context-group\")}set contextGroup(t){t&&this.setAttribute(\"of-context-group\",t)}static get observedAttributes(){return[\"name\"]}};class Le{static create(t){const e=document.createElement(\"of-view\");return Object.entries(t).forEach((([t,i])=>{e.setAttribute(t,i)})),e}}customElements.define(\"of-view\",xe(HTMLElement));class ze{constructor(t,i,n,{brokerUrl:o,interopConfig:s},r){this.container=t,this.config=i,this.ofView=null,this.isDragging=()=>this.container.tab.element?.className.includes(\"lm_dragging\")??!1;const{url:a,web:l,interop:h,name:d}=i||{},c=d??`internal-generated-view-${e.v4()}`;if(this.identity={uuid:n,name:c},this.container.element.setAttribute(\"of-name\",c),this.container.element.id=`container-${c}`,this.container.parent.id=c,void 0===a)return void this.handleUrlMissing();const m=this.updateTitleIfNotSet(a),u={\"of-broker\":o,\"of-uuid\":n,\"of-name\":c,src:a};l?.frameName&&(u.forceFrameName=l.frameName);const p=h?.currentContextGroup??s?.currentContextGroup;p&&(u[\"of-context-group\"]=p),s?.providerId&&(u[\"of-provider-id\"]=s?.providerId),this.ofView=Le.create(u),this.ofView.title=m??`Iframe: ${a}`,r.appendChild(this.ofView),this.ofView.style.position=\"absolute\"}updateTitleIfNotSet(t){return\"view\"===this.container.parent.title&&this.container.parent.setTitle(t),this.container.parent.title}handleUrlMissing(){const t=document.createElement(\"div\");t.setAttribute(\"style\",\"padding: 20px\");t.innerText=\"No URL provided\",this.container.element.appendChild(t)}destroy(){this.ofView?.remove(),this.ofView=null}closeView(){this.container.close()}resize(){if(this.ofView){if(this.isDragging())return void(this.ofView.style.display=\"none\");const t=this.container.element.getBoundingClientRect();this.ofView.style.position=\"absolute\",this.ofView.style.height=`${t.height}px`,this.ofView.style.width=`${t.width}px`,this.ofView.style.inset=`${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`,this.ofView.style.display=\"block\"}}}class Me extends U{static overrideConfig(t){const e={...ue,...t.settings,...pe};return e.reorderEnabled?be(t.content,{isClosable:!0}):be(t.content,{reorderEnabled:!1}),{dimensions:me,...t,settings:e,header:{...ce,show:!1!==t.settings?.hasHeaders&&ce.show}}}constructor(t,e,i,{options:n},o,s){super(),this.identity=t,this.container=e,this.initialConfig=i,this.layoutManager=o,this.platformProvider=s,this.viewComponentsByContainerElement=new Map,this.layoutContentCache=_.getSingleInstance(),this.reparentingViews=new Set,this.goldenLayoutDestroyed=!1,this.createViewComponent=(t,e)=>{m.handleSharedView(this.layoutManager,this.identity,e);const i=new ze(t,e,this.identity.uuid,this.options,this.iframeContainer);return e&&!1===e[`${de}isClosable`]&&this.stylesheet.insertRule(`#tab-${i.identity.name} .lm_close_tab { display: none; }`),this.viewComponentsByContainerElement.set(t.element,i),this.resizeController.observeContainer(t.element),i},this.iframeContainer=document.createElement(\"div\"),this.iframeContainer.id=`openfin-layout-iframe-container-${this.identity.layoutName}`,this.domEmitter=new V(e),this.setupStylesheets(),this.layout=new he(this.container),this.layout.resizeWithContainerAutomatically=!0,this.options=n,this.layout.registerComponent(\"view\",this.createViewComponent),this.setupListeners(),this.resizeController=new ve(this),this.layout.loadLayout(Me.overrideConfig(i));const r=document.createElement(\"div\");r.id=`openfin-layout-shadow-container-${this.identity.layoutName}`,r.attachShadow({mode:\"open\",delegatesFocus:!1}).appendChild(this.iframeContainer),this.container.appendChild(r),this.resizeController.observeMutations(this.container)}getStackByView({name:t}){const e=this.layout.findFirstComponentItemById(t);if(e?.parent&&e?.parent?.isStack)return Ie.wrap(e.parent,this)}getRoot(){return Ie.wrap(this.layout.rootItem,this)}async platformCloseView(t){const e=[...this.viewComponentsByContainerElement.values()].find((e=>e.identity.name===t.name));if(!e)throw new Error(`View with name: ${t.name} not found in layout.`);e.closeView()}async platformCreateView(t,{location:e,targetView:i}={}){if(i)throw new Error(\"TargetView not supported in web\");const n={options:this.platformProvider.normalizeOptions(t),target:this.identity,location:e};return this.insertView(n)}setupStylesheets(){if(this.container.setAttribute(\"data-openfin-layout-name\",this.identity.layoutName),this.stylesheet=new CSSStyleSheet,this.stylesheet.insertRule(\".lm_close { display: none; }\"),document.adoptedStyleSheets.push(this.stylesheet),this.initialConfig.settings?.preventSplitterResize){const t=`\\n [data-openfin-layout-name='${this.identity.layoutName}'] .lm_splitter {\\n pointer-events: none;\\n }`;this.stylesheet.insertRule(t)}}insertView({options:t,location:e,targetView:i}){const n=e?this.layoutContentCache.getItemOrUndefined(e.id):void 0,o=i?this.layoutContentCache.getItemOrUndefined(i.name):void 0,s=n??o??Ie.wrap(this.layout.rootItem,this);let r;if(ee.isStack(s.raw))r=s.raw;else{if(!we(s.raw))throw new Error(\"Cannot add a view at the requested location\");r=s.raw.newItem({type:\"stack\",content:[]})}const a=Math.min(r.contentItems.length,e?.index??r.contentItems.length);let l=this.layout.findFirstComponentItemById(t.name);l?(l.parent&&l.parent.removeChild(l,!0),r.addChild(l,a)):l=r.newComponent(\"view\",t,t.title??t.url??\"Default Title\",a);const h=l.component.identity;return Promise.resolve({identity:h})}replaceView({viewToReplace:t,newView:e}){throw new Error(\"Method not implemented.\")}replaceLayout(t){throw new Error(\"Method not implemented.\")}async cleanupView(t){}applyPreset(t){throw new Error(\"Method not implemented.\")}getCurrentViews(){return[...this.viewComponentsByContainerElement.values()].map((t=>t.identity))}async getFrameSnapshot(){return Ee(xt.fromResolved(this.layout.toConfig()))}isVisible(){return W(this.container)}async onViewDetached({viewIdentity:t}){this.reparentingViews.add(t.name),this.platformCloseView(t)}async destroy(){this.goldenLayoutDestroyed||(this.goldenLayoutDestroyed=!0,this.layout.destroy()),this.iframeContainer.remove(),this.resizeController.destroy(),document.adoptedStyleSheets=document.adoptedStyleSheets.filter((t=>t!==this.stylesheet)),this.viewComponentsByContainerElement.clear()}setupListeners(){this.container.addEventListener(\"pointerdown\",(t=>{if(t.target instanceof HTMLElement){const e=t.target.classList;[\"lm_tab\",\"lm_title\",\"lm_splitter\",\"lm_drag_handle\"].some((t=>e.contains(t)))&&(this.handleDragStart(),2===t.button&&t.stopPropagation())}}),!0),document.addEventListener(\"pointerup\",(()=>this.handleDragEnd()),!0),this.layout.on(\"tabCreated\",(t=>{const e=t.componentItem.component;t.element.id=`tab-${e.identity.name}`,this.domEmitter.dispatchLocalEvent(\"tab-created\",e.identity)})),this.layout.on(\"itemCreated\",(({target:t})=>{const e=t;if(Gt.isComponentItem(e)){const t=e.component;this.domEmitter.dispatchLocalEvent(\"container-created\",t.identity)}})),this.layout.on(\"itemDestroyed\",(t=>{const e=t.target;if(Gt.isComponentItem(e)){const t=e.component;this.removeViewComponent(t)}})),this.layout.on(\"itemDropped\",(()=>{this.handleDragEnd()}))}handleDragStart(){this.iframeContainer.style.pointerEvents=\"none\"}handleDragEnd(){this.iframeContainer.style.pointerEvents=\"\"}removeViewComponent(t){if(t.config&&!1===t.config[`${de}isClosable`]){const e=[...this.stylesheet.cssRules].findIndex((e=>e.cssText.includes(`#tab-${t.identity.name}`)));this.stylesheet.deleteRule(e)}t.destroy(),this.viewComponentsByContainerElement.delete(t.container.element),this.resizeController.unobserveContainer(t.container.element),this.reparentingViews.has(t.identity.name)?this.reparentingViews.delete(t.identity.name):this.platformProvider.closeView(t.identity.name);0===this.getCurrentViews().length&&(this.goldenLayoutDestroyed||(this.goldenLayoutDestroyed=!0,m.handleLastViewRemoved(this.layoutManager,this.identity)))}}class Pe{constructor(t,e,i,n){this.windowIdentity=t,this.connectConfig=e,this.provider=i,this.fallbackContainer=n}async createLayout(t,e){if(!(\"container\"in t)&&!this.fallbackContainer)throw new Error(\"Container property is not optional in web\");const{layoutName:i}=t,n=t,o=this.provider.initLayoutViews(n),s=n.container??this.fallbackContainer,r={...this.windowIdentity,layoutName:i},a=new Me(r,s,o,this.connectConfig,e,this.provider);m.registerLayout(e,i,a),this.fallbackContainer=null}async getLayoutSnapshot(t){return t.getLayoutSnapshot()}async handleLastViewRemoved(t){}}class Te{static async init(e){const i=e.getFin().InterApplicationBus.Channel,n=await i.create(`custom-frame-${e.me.uuid}`);return n.setDefaultAction((async(t,{target:e,opts:i},o)=>{const s=n.connections.find((t=>t.name===e.name));if(s)return n.dispatch(s,t,{...i,target:e});throw new Error(`Client with name ${e.name} not found`)})),await t.relayChannelClientApi_1(n,\"layout-relay\"),new Te(e)}constructor(t){this.wire=t,this.viewNames=new Set}normalizeOptions(t,i=\"default\"){const n=this.wire.me.uuid;let{name:o=`internal-generated-view-${e.v4()}`}=t;return o.match(/^internal-generated-view-/)&&this.viewNames.has(o)&&\"duplicate\"===i&&(o=`internal-generated-view-${e.v4()}`),this.viewNames.add(o),{...t,name:o,uuid:n}}closeView(t){this.viewNames.delete(t)}initLayoutViews({layout:t,multiInstanceViewBehavior:e}){return H((t=>{if(\"component\"===t.type&&t.componentState){const i=this.normalizeOptions(t.componentState,e);return{...t,componentState:i}}return t}),t)}}var Ae;const ke=t=>t;Ae=new WeakMap,exports.WebLayoutEntryPoint=class{constructor(e){Ae.set(this,void 0),this.initLayoutManager=async(e,i,{container:n,layoutManagerOverride:o})=>{const s=await Te.init(i),r=o??ke,a=new Pe(i.me,t.__classPrivateFieldGet(this,Ae,\"f\"),s,n),l=new(r(m.createClosedConstructor(a)));return await M(i,l),l},this.applyLayoutSnapshot=async(e,i,n)=>{await i.applyLayoutSnapshot(t.__classPrivateFieldGet(this,Ae,\"f\").platform.layoutSnapshot)},this.createLayout=async(t,e)=>m.createLayout(t,e),this.destroyLayout=async(t,e)=>m.destroyLayout(t,e),t.__classPrivateFieldSet(this,Ae,e,\"f\")}};\n","'use strict'\n\nexports.byteLength = byteLength\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\nfor (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i]\n revLookup[code.charCodeAt(i)] = i\n}\n\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction getLens (b64) {\n var len = b64.length\n\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // Trim off extra bytes after placeholder bytes are found\n // See: https://github.com/beatgammit/base64-js/issues/42\n var validLen = b64.indexOf('=')\n if (validLen === -1) validLen = len\n\n var placeHoldersLen = validLen === len\n ? 0\n : 4 - (validLen % 4)\n\n return [validLen, placeHoldersLen]\n}\n\n// base64 is 4/3 + up to two characters of the original data\nfunction byteLength (b64) {\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction _byteLength (b64, validLen, placeHoldersLen) {\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction toByteArray (b64) {\n var tmp\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n\n var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))\n\n var curByte = 0\n\n // if there are placeholders, only get up to the last complete 4 chars\n var len = placeHoldersLen > 0\n ? validLen - 4\n : validLen\n\n var i\n for (i = 0; i < len; i += 4) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 18) |\n (revLookup[b64.charCodeAt(i + 1)] << 12) |\n (revLookup[b64.charCodeAt(i + 2)] << 6) |\n revLookup[b64.charCodeAt(i + 3)]\n arr[curByte++] = (tmp >> 16) & 0xFF\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 2) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 2) |\n (revLookup[b64.charCodeAt(i + 1)] >> 4)\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 1) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 10) |\n (revLookup[b64.charCodeAt(i + 1)] << 4) |\n (revLookup[b64.charCodeAt(i + 2)] >> 2)\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] +\n lookup[num >> 12 & 0x3F] +\n lookup[num >> 6 & 0x3F] +\n lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n var tmp\n var output = []\n for (var i = start; i < end; i += 3) {\n tmp =\n ((uint8[i] << 16) & 0xFF0000) +\n ((uint8[i + 1] << 8) & 0xFF00) +\n (uint8[i + 2] & 0xFF)\n output.push(tripletToBase64(tmp))\n }\n return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n var tmp\n var len = uint8.length\n var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n var parts = []\n var maxChunkLength = 16383 // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1]\n parts.push(\n lookup[tmp >> 2] +\n lookup[(tmp << 4) & 0x3F] +\n '=='\n )\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + uint8[len - 1]\n parts.push(\n lookup[tmp >> 10] +\n lookup[(tmp >> 4) & 0x3F] +\n lookup[(tmp << 2) & 0x3F] +\n '='\n )\n }\n\n return parts.join('')\n}\n","/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n/* eslint-disable no-proto */\n\n'use strict'\n\nconst base64 = require('base64-js')\nconst ieee754 = require('ieee754')\nconst customInspectSymbol =\n (typeof Symbol === 'function' && typeof Symbol['for'] === 'function') // eslint-disable-line dot-notation\n ? Symbol['for']('nodejs.util.inspect.custom') // eslint-disable-line dot-notation\n : null\n\nexports.Buffer = Buffer\nexports.SlowBuffer = SlowBuffer\nexports.INSPECT_MAX_BYTES = 50\n\nconst K_MAX_LENGTH = 0x7fffffff\nexports.kMaxLength = K_MAX_LENGTH\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Print warning and recommend using `buffer` v4.x which has an Object\n * implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * We report that the browser does not support typed arrays if the are not subclassable\n * using __proto__. Firefox 4-29 lacks support for adding new properties to `Uint8Array`\n * (See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438). IE 10 lacks support\n * for __proto__ and has a buggy typed array implementation.\n */\nBuffer.TYPED_ARRAY_SUPPORT = typedArraySupport()\n\nif (!Buffer.TYPED_ARRAY_SUPPORT && typeof console !== 'undefined' &&\n typeof console.error === 'function') {\n console.error(\n 'This browser lacks typed array (Uint8Array) support which is required by ' +\n '`buffer` v5.x. Use `buffer` v4.x if you require old browser support.'\n )\n}\n\nfunction typedArraySupport () {\n // Can typed array instances can be augmented?\n try {\n const arr = new Uint8Array(1)\n const proto = { foo: function () { return 42 } }\n Object.setPrototypeOf(proto, Uint8Array.prototype)\n Object.setPrototypeOf(arr, proto)\n return arr.foo() === 42\n } catch (e) {\n return false\n }\n}\n\nObject.defineProperty(Buffer.prototype, 'parent', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.buffer\n }\n})\n\nObject.defineProperty(Buffer.prototype, 'offset', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.byteOffset\n }\n})\n\nfunction createBuffer (length) {\n if (length > K_MAX_LENGTH) {\n throw new RangeError('The value \"' + length + '\" is invalid for option \"size\"')\n }\n // Return an augmented `Uint8Array` instance\n const buf = new Uint8Array(length)\n Object.setPrototypeOf(buf, Buffer.prototype)\n return buf\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new TypeError(\n 'The \"string\" argument must be of type string. Received type number'\n )\n }\n return allocUnsafe(arg)\n }\n return from(arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\nfunction from (value, encodingOrOffset, length) {\n if (typeof value === 'string') {\n return fromString(value, encodingOrOffset)\n }\n\n if (ArrayBuffer.isView(value)) {\n return fromArrayView(value)\n }\n\n if (value == null) {\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n }\n\n if (isInstance(value, ArrayBuffer) ||\n (value && isInstance(value.buffer, ArrayBuffer))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof SharedArrayBuffer !== 'undefined' &&\n (isInstance(value, SharedArrayBuffer) ||\n (value && isInstance(value.buffer, SharedArrayBuffer)))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof value === 'number') {\n throw new TypeError(\n 'The \"value\" argument must not be of type number. Received type number'\n )\n }\n\n const valueOf = value.valueOf && value.valueOf()\n if (valueOf != null && valueOf !== value) {\n return Buffer.from(valueOf, encodingOrOffset, length)\n }\n\n const b = fromObject(value)\n if (b) return b\n\n if (typeof Symbol !== 'undefined' && Symbol.toPrimitive != null &&\n typeof value[Symbol.toPrimitive] === 'function') {\n return Buffer.from(value[Symbol.toPrimitive]('string'), encodingOrOffset, length)\n }\n\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n return from(value, encodingOrOffset, length)\n}\n\n// Note: Change prototype *after* Buffer.from is defined to workaround Chrome bug:\n// https://github.com/feross/buffer/pull/148\nObject.setPrototypeOf(Buffer.prototype, Uint8Array.prototype)\nObject.setPrototypeOf(Buffer, Uint8Array)\n\nfunction assertSize (size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be of type number')\n } else if (size < 0) {\n throw new RangeError('The value \"' + size + '\" is invalid for option \"size\"')\n }\n}\n\nfunction alloc (size, fill, encoding) {\n assertSize(size)\n if (size <= 0) {\n return createBuffer(size)\n }\n if (fill !== undefined) {\n // Only pay attention to encoding if it's a string. This\n // prevents accidentally sending in a number that would\n // be interpreted as a start offset.\n return typeof encoding === 'string'\n ? createBuffer(size).fill(fill, encoding)\n : createBuffer(size).fill(fill)\n }\n return createBuffer(size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n return alloc(size, fill, encoding)\n}\n\nfunction allocUnsafe (size) {\n assertSize(size)\n return createBuffer(size < 0 ? 0 : checked(size) | 0)\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n return allocUnsafe(size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n return allocUnsafe(size)\n}\n\nfunction fromString (string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8'\n }\n\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n\n const length = byteLength(string, encoding) | 0\n let buf = createBuffer(length)\n\n const actual = buf.write(string, encoding)\n\n if (actual !== length) {\n // Writing a hex string, for example, that contains invalid characters will\n // cause everything after the first invalid character to be ignored. (e.g.\n // 'abxxcd' will be treated as 'ab')\n buf = buf.slice(0, actual)\n }\n\n return buf\n}\n\nfunction fromArrayLike (array) {\n const length = array.length < 0 ? 0 : checked(array.length) | 0\n const buf = createBuffer(length)\n for (let i = 0; i < length; i += 1) {\n buf[i] = array[i] & 255\n }\n return buf\n}\n\nfunction fromArrayView (arrayView) {\n if (isInstance(arrayView, Uint8Array)) {\n const copy = new Uint8Array(arrayView)\n return fromArrayBuffer(copy.buffer, copy.byteOffset, copy.byteLength)\n }\n return fromArrayLike(arrayView)\n}\n\nfunction fromArrayBuffer (array, byteOffset, length) {\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\"offset\" is outside of buffer bounds')\n }\n\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\"length\" is outside of buffer bounds')\n }\n\n let buf\n if (byteOffset === undefined && length === undefined) {\n buf = new Uint8Array(array)\n } else if (length === undefined) {\n buf = new Uint8Array(array, byteOffset)\n } else {\n buf = new Uint8Array(array, byteOffset, length)\n }\n\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(buf, Buffer.prototype)\n\n return buf\n}\n\nfunction fromObject (obj) {\n if (Buffer.isBuffer(obj)) {\n const len = checked(obj.length) | 0\n const buf = createBuffer(len)\n\n if (buf.length === 0) {\n return buf\n }\n\n obj.copy(buf, 0, 0, len)\n return buf\n }\n\n if (obj.length !== undefined) {\n if (typeof obj.length !== 'number' || numberIsNaN(obj.length)) {\n return createBuffer(0)\n }\n return fromArrayLike(obj)\n }\n\n if (obj.type === 'Buffer' && Array.isArray(obj.data)) {\n return fromArrayLike(obj.data)\n }\n}\n\nfunction checked (length) {\n // Note: cannot use `length < K_MAX_LENGTH` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= K_MAX_LENGTH) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + K_MAX_LENGTH.toString(16) + ' bytes')\n }\n return length | 0\n}\n\nfunction SlowBuffer (length) {\n if (+length != length) { // eslint-disable-line eqeqeq\n length = 0\n }\n return Buffer.alloc(+length)\n}\n\nBuffer.isBuffer = function isBuffer (b) {\n return b != null && b._isBuffer === true &&\n b !== Buffer.prototype // so Buffer.isBuffer(Buffer.prototype) will be false\n}\n\nBuffer.compare = function compare (a, b) {\n if (isInstance(a, Uint8Array)) a = Buffer.from(a, a.offset, a.byteLength)\n if (isInstance(b, Uint8Array)) b = Buffer.from(b, b.offset, b.byteLength)\n if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n throw new TypeError(\n 'The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array'\n )\n }\n\n if (a === b) return 0\n\n let x = a.length\n let y = b.length\n\n for (let i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i]\n y = b[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n switch (String(encoding).toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'latin1':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return true\n default:\n return false\n }\n}\n\nBuffer.concat = function concat (list, length) {\n if (!Array.isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n\n if (list.length === 0) {\n return Buffer.alloc(0)\n }\n\n let i\n if (length === undefined) {\n length = 0\n for (i = 0; i < list.length; ++i) {\n length += list[i].length\n }\n }\n\n const buffer = Buffer.allocUnsafe(length)\n let pos = 0\n for (i = 0; i < list.length; ++i) {\n let buf = list[i]\n if (isInstance(buf, Uint8Array)) {\n if (pos + buf.length > buffer.length) {\n if (!Buffer.isBuffer(buf)) buf = Buffer.from(buf)\n buf.copy(buffer, pos)\n } else {\n Uint8Array.prototype.set.call(\n buffer,\n buf,\n pos\n )\n }\n } else if (!Buffer.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n } else {\n buf.copy(buffer, pos)\n }\n pos += buf.length\n }\n return buffer\n}\n\nfunction byteLength (string, encoding) {\n if (Buffer.isBuffer(string)) {\n return string.length\n }\n if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) {\n return string.byteLength\n }\n if (typeof string !== 'string') {\n throw new TypeError(\n 'The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. ' +\n 'Received type ' + typeof string\n )\n }\n\n const len = string.length\n const mustMatch = (arguments.length > 2 && arguments[2] === true)\n if (!mustMatch && len === 0) return 0\n\n // Use a for loop to avoid recursion\n let loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'ascii':\n case 'latin1':\n case 'binary':\n return len\n case 'utf8':\n case 'utf-8':\n return utf8ToBytes(string).length\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return len * 2\n case 'hex':\n return len >>> 1\n case 'base64':\n return base64ToBytes(string).length\n default:\n if (loweredCase) {\n return mustMatch ? -1 : utf8ToBytes(string).length // assume utf8\n }\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n let loweredCase = false\n\n // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n // property of a typed array.\n\n // This behaves neither like String nor Uint8Array in that we set start/end\n // to their upper/lower bounds if the value passed is out of range.\n // undefined is handled specially as per ECMA-262 6th Edition,\n // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n if (start === undefined || start < 0) {\n start = 0\n }\n // Return early if start > this.length. Done here to prevent potential uint32\n // coercion fail below.\n if (start > this.length) {\n return ''\n }\n\n if (end === undefined || end > this.length) {\n end = this.length\n }\n\n if (end <= 0) {\n return ''\n }\n\n // Force coercion to uint32. This will also coerce falsey/NaN values to 0.\n end >>>= 0\n start >>>= 0\n\n if (end <= start) {\n return ''\n }\n\n if (!encoding) encoding = 'utf8'\n\n while (true) {\n switch (encoding) {\n case 'hex':\n return hexSlice(this, start, end)\n\n case 'utf8':\n case 'utf-8':\n return utf8Slice(this, start, end)\n\n case 'ascii':\n return asciiSlice(this, start, end)\n\n case 'latin1':\n case 'binary':\n return latin1Slice(this, start, end)\n\n case 'base64':\n return base64Slice(this, start, end)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return utf16leSlice(this, start, end)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = (encoding + '').toLowerCase()\n loweredCase = true\n }\n }\n}\n\n// This property is used by `Buffer.isBuffer` (and the `is-buffer` npm package)\n// to detect a Buffer instance. It's not possible to use `instanceof Buffer`\n// reliably in a browserify context because there could be multiple different\n// copies of the 'buffer' package in use. This method works even for Buffer\n// instances that were created from another copy of the `buffer` package.\n// See: https://github.com/feross/buffer/issues/154\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n const i = b[n]\n b[n] = b[m]\n b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n const len = this.length\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits')\n }\n for (let i = 0; i < len; i += 2) {\n swap(this, i, i + 1)\n }\n return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n const len = this.length\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits')\n }\n for (let i = 0; i < len; i += 4) {\n swap(this, i, i + 3)\n swap(this, i + 1, i + 2)\n }\n return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n const len = this.length\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits')\n }\n for (let i = 0; i < len; i += 8) {\n swap(this, i, i + 7)\n swap(this, i + 1, i + 6)\n swap(this, i + 2, i + 5)\n swap(this, i + 3, i + 4)\n }\n return this\n}\n\nBuffer.prototype.toString = function toString () {\n const length = this.length\n if (length === 0) return ''\n if (arguments.length === 0) return utf8Slice(this, 0, length)\n return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.toLocaleString = Buffer.prototype.toString\n\nBuffer.prototype.equals = function equals (b) {\n if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n if (this === b) return true\n return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n let str = ''\n const max = exports.INSPECT_MAX_BYTES\n str = this.toString('hex', 0, max).replace(/(.{2})/g, '$1 ').trim()\n if (this.length > max) str += ' ... '\n return ''\n}\nif (customInspectSymbol) {\n Buffer.prototype[customInspectSymbol] = Buffer.prototype.inspect\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n if (isInstance(target, Uint8Array)) {\n target = Buffer.from(target, target.offset, target.byteLength)\n }\n if (!Buffer.isBuffer(target)) {\n throw new TypeError(\n 'The \"target\" argument must be one of type Buffer or Uint8Array. ' +\n 'Received type ' + (typeof target)\n )\n }\n\n if (start === undefined) {\n start = 0\n }\n if (end === undefined) {\n end = target ? target.length : 0\n }\n if (thisStart === undefined) {\n thisStart = 0\n }\n if (thisEnd === undefined) {\n thisEnd = this.length\n }\n\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError('out of range index')\n }\n\n if (thisStart >= thisEnd && start >= end) {\n return 0\n }\n if (thisStart >= thisEnd) {\n return -1\n }\n if (start >= end) {\n return 1\n }\n\n start >>>= 0\n end >>>= 0\n thisStart >>>= 0\n thisEnd >>>= 0\n\n if (this === target) return 0\n\n let x = thisEnd - thisStart\n let y = end - start\n const len = Math.min(x, y)\n\n const thisCopy = this.slice(thisStart, thisEnd)\n const targetCopy = target.slice(start, end)\n\n for (let i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i]\n y = targetCopy[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (numberIsNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [val], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n let indexSize = 1\n let arrLength = arr.length\n let valLength = val.length\n\n if (encoding !== undefined) {\n encoding = String(encoding).toLowerCase()\n if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n encoding === 'utf16le' || encoding === 'utf-16le') {\n if (arr.length < 2 || val.length < 2) {\n return -1\n }\n indexSize = 2\n arrLength /= 2\n valLength /= 2\n byteOffset /= 2\n }\n }\n\n function read (buf, i) {\n if (indexSize === 1) {\n return buf[i]\n } else {\n return buf.readUInt16BE(i * indexSize)\n }\n }\n\n let i\n if (dir) {\n let foundIndex = -1\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1) foundIndex = i\n if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n } else {\n if (foundIndex !== -1) i -= i - foundIndex\n foundIndex = -1\n }\n }\n } else {\n if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n for (i = byteOffset; i >= 0; i--) {\n let found = true\n for (let j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false\n break\n }\n }\n if (found) return i\n }\n }\n\n return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n offset = Number(offset) || 0\n const remaining = buf.length - offset\n if (!length) {\n length = remaining\n } else {\n length = Number(length)\n if (length > remaining) {\n length = remaining\n }\n }\n\n const strLen = string.length\n\n if (length > strLen / 2) {\n length = strLen / 2\n }\n let i\n for (i = 0; i < length; ++i) {\n const parsed = parseInt(string.substr(i * 2, 2), 16)\n if (numberIsNaN(parsed)) return i\n buf[offset + i] = parsed\n }\n return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n // Buffer#write(string)\n if (offset === undefined) {\n encoding = 'utf8'\n length = this.length\n offset = 0\n // Buffer#write(string, encoding)\n } else if (length === undefined && typeof offset === 'string') {\n encoding = offset\n length = this.length\n offset = 0\n // Buffer#write(string, offset[, length][, encoding])\n } else if (isFinite(offset)) {\n offset = offset >>> 0\n if (isFinite(length)) {\n length = length >>> 0\n if (encoding === undefined) encoding = 'utf8'\n } else {\n encoding = length\n length = undefined\n }\n } else {\n throw new Error(\n 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n )\n }\n\n const remaining = this.length - offset\n if (length === undefined || length > remaining) length = remaining\n\n if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n throw new RangeError('Attempt to write outside buffer bounds')\n }\n\n if (!encoding) encoding = 'utf8'\n\n let loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'hex':\n return hexWrite(this, string, offset, length)\n\n case 'utf8':\n case 'utf-8':\n return utf8Write(this, string, offset, length)\n\n case 'ascii':\n case 'latin1':\n case 'binary':\n return asciiWrite(this, string, offset, length)\n\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return base64Write(this, string, offset, length)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return ucs2Write(this, string, offset, length)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0)\n }\n}\n\nfunction base64Slice (buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf)\n } else {\n return base64.fromByteArray(buf.slice(start, end))\n }\n}\n\nfunction utf8Slice (buf, start, end) {\n end = Math.min(buf.length, end)\n const res = []\n\n let i = start\n while (i < end) {\n const firstByte = buf[i]\n let codePoint = null\n let bytesPerSequence = (firstByte > 0xEF)\n ? 4\n : (firstByte > 0xDF)\n ? 3\n : (firstByte > 0xBF)\n ? 2\n : 1\n\n if (i + bytesPerSequence <= end) {\n let secondByte, thirdByte, fourthByte, tempCodePoint\n\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 0x80) {\n codePoint = firstByte\n }\n break\n case 2:\n secondByte = buf[i + 1]\n if ((secondByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n if (tempCodePoint > 0x7F) {\n codePoint = tempCodePoint\n }\n }\n break\n case 3:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n codePoint = tempCodePoint\n }\n }\n break\n case 4:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n fourthByte = buf[i + 3]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n codePoint = tempCodePoint\n }\n }\n }\n }\n\n if (codePoint === null) {\n // we did not generate a valid codePoint so insert a\n // replacement char (U+FFFD) and advance only 1 byte\n codePoint = 0xFFFD\n bytesPerSequence = 1\n } else if (codePoint > 0xFFFF) {\n // encode to utf16 (surrogate pair dance)\n codePoint -= 0x10000\n res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n codePoint = 0xDC00 | codePoint & 0x3FF\n }\n\n res.push(codePoint)\n i += bytesPerSequence\n }\n\n return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nconst MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n const len = codePoints.length\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n }\n\n // Decode in chunks to avoid \"call stack size exceeded\".\n let res = ''\n let i = 0\n while (i < len) {\n res += String.fromCharCode.apply(\n String,\n codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n )\n }\n return res\n}\n\nfunction asciiSlice (buf, start, end) {\n let ret = ''\n end = Math.min(buf.length, end)\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F)\n }\n return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n let ret = ''\n end = Math.min(buf.length, end)\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i])\n }\n return ret\n}\n\nfunction hexSlice (buf, start, end) {\n const len = buf.length\n\n if (!start || start < 0) start = 0\n if (!end || end < 0 || end > len) end = len\n\n let out = ''\n for (let i = start; i < end; ++i) {\n out += hexSliceLookupTable[buf[i]]\n }\n return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n const bytes = buf.slice(start, end)\n let res = ''\n // If bytes.length is odd, the last 8 bits must be ignored (same as node.js)\n for (let i = 0; i < bytes.length - 1; i += 2) {\n res += String.fromCharCode(bytes[i] + (bytes[i + 1] * 256))\n }\n return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n const len = this.length\n start = ~~start\n end = end === undefined ? len : ~~end\n\n if (start < 0) {\n start += len\n if (start < 0) start = 0\n } else if (start > len) {\n start = len\n }\n\n if (end < 0) {\n end += len\n if (end < 0) end = 0\n } else if (end > len) {\n end = len\n }\n\n if (end < start) end = start\n\n const newBuf = this.subarray(start, end)\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(newBuf, Buffer.prototype)\n\n return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUintLE =\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let val = this[offset]\n let mul = 1\n let i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUintBE =\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n checkOffset(offset, byteLength, this.length)\n }\n\n let val = this[offset + --byteLength]\n let mul = 1\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUint8 =\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n return this[offset]\n}\n\nBuffer.prototype.readUint16LE =\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUint16BE =\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUint32LE =\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return ((this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16)) +\n (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUint32BE =\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] * 0x1000000) +\n ((this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n this[offset + 3])\n}\n\nBuffer.prototype.readBigUInt64LE = defineBigIntMethod(function readBigUInt64LE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const lo = first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24\n\n const hi = this[++offset] +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n last * 2 ** 24\n\n return BigInt(lo) + (BigInt(hi) << BigInt(32))\n})\n\nBuffer.prototype.readBigUInt64BE = defineBigIntMethod(function readBigUInt64BE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const hi = first * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset]\n\n const lo = this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last\n\n return (BigInt(hi) << BigInt(32)) + BigInt(lo)\n})\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let val = this[offset]\n let mul = 1\n let i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let i = byteLength\n let mul = 1\n let val = this[offset + --i]\n while (i > 0 && (mul *= 0x100)) {\n val += this[offset + --i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n if (!(this[offset] & 0x80)) return (this[offset])\n return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n const val = this[offset] | (this[offset + 1] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n const val = this[offset + 1] | (this[offset] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16) |\n (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] << 24) |\n (this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n (this[offset + 3])\n}\n\nBuffer.prototype.readBigInt64LE = defineBigIntMethod(function readBigInt64LE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const val = this[offset + 4] +\n this[offset + 5] * 2 ** 8 +\n this[offset + 6] * 2 ** 16 +\n (last << 24) // Overflow\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24)\n})\n\nBuffer.prototype.readBigInt64BE = defineBigIntMethod(function readBigInt64BE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const val = (first << 24) + // Overflow\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset]\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last)\n})\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUintLE =\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n let mul = 1\n let i = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUintBE =\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n let i = byteLength - 1\n let mul = 1\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUint8 =\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeUint16LE =\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeUint16BE =\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeUint32LE =\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset + 3] = (value >>> 24)\n this[offset + 2] = (value >>> 16)\n this[offset + 1] = (value >>> 8)\n this[offset] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeUint32BE =\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nfunction wrtBigUInt64LE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7)\n\n let lo = Number(value & BigInt(0xffffffff))\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n return offset\n}\n\nfunction wrtBigUInt64BE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7)\n\n let lo = Number(value & BigInt(0xffffffff))\n buf[offset + 7] = lo\n lo = lo >> 8\n buf[offset + 6] = lo\n lo = lo >> 8\n buf[offset + 5] = lo\n lo = lo >> 8\n buf[offset + 4] = lo\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n buf[offset + 3] = hi\n hi = hi >> 8\n buf[offset + 2] = hi\n hi = hi >> 8\n buf[offset + 1] = hi\n hi = hi >> 8\n buf[offset] = hi\n return offset + 8\n}\n\nBuffer.prototype.writeBigUInt64LE = defineBigIntMethod(function writeBigUInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeBigUInt64BE = defineBigIntMethod(function writeBigUInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n let i = 0\n let mul = 1\n let sub = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n let i = byteLength - 1\n let mul = 1\n let sub = 0\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n if (value < 0) value = 0xff + value + 1\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n this[offset + 2] = (value >>> 16)\n this[offset + 3] = (value >>> 24)\n return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (value < 0) value = 0xffffffff + value + 1\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeBigInt64LE = defineBigIntMethod(function writeBigInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nBuffer.prototype.writeBigInt64BE = defineBigIntMethod(function writeBigInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n }\n ieee754.write(buf, value, offset, littleEndian, 23, 4)\n return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n }\n ieee754.write(buf, value, offset, littleEndian, 52, 8)\n return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n if (!Buffer.isBuffer(target)) throw new TypeError('argument should be a Buffer')\n if (!start) start = 0\n if (!end && end !== 0) end = this.length\n if (targetStart >= target.length) targetStart = target.length\n if (!targetStart) targetStart = 0\n if (end > 0 && end < start) end = start\n\n // Copy 0 bytes; we're done\n if (end === start) return 0\n if (target.length === 0 || this.length === 0) return 0\n\n // Fatal error conditions\n if (targetStart < 0) {\n throw new RangeError('targetStart out of bounds')\n }\n if (start < 0 || start >= this.length) throw new RangeError('Index out of range')\n if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n // Are we oob?\n if (end > this.length) end = this.length\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start\n }\n\n const len = end - start\n\n if (this === target && typeof Uint8Array.prototype.copyWithin === 'function') {\n // Use built-in when available, missing from IE11\n this.copyWithin(targetStart, start, end)\n } else {\n Uint8Array.prototype.set.call(\n target,\n this.subarray(start, end),\n targetStart\n )\n }\n\n return len\n}\n\n// Usage:\n// buffer.fill(number[, offset[, end]])\n// buffer.fill(buffer[, offset[, end]])\n// buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n // Handle string cases:\n if (typeof val === 'string') {\n if (typeof start === 'string') {\n encoding = start\n start = 0\n end = this.length\n } else if (typeof end === 'string') {\n encoding = end\n end = this.length\n }\n if (encoding !== undefined && typeof encoding !== 'string') {\n throw new TypeError('encoding must be a string')\n }\n if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n if (val.length === 1) {\n const code = val.charCodeAt(0)\n if ((encoding === 'utf8' && code < 128) ||\n encoding === 'latin1') {\n // Fast path: If `val` fits into a single byte, use that numeric value.\n val = code\n }\n }\n } else if (typeof val === 'number') {\n val = val & 255\n } else if (typeof val === 'boolean') {\n val = Number(val)\n }\n\n // Invalid ranges are not set to a default, so can range check early.\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError('Out of range index')\n }\n\n if (end <= start) {\n return this\n }\n\n start = start >>> 0\n end = end === undefined ? this.length : end >>> 0\n\n if (!val) val = 0\n\n let i\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val\n }\n } else {\n const bytes = Buffer.isBuffer(val)\n ? val\n : Buffer.from(val, encoding)\n const len = bytes.length\n if (len === 0) {\n throw new TypeError('The value \"' + val +\n '\" is invalid for argument \"value\"')\n }\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len]\n }\n }\n\n return this\n}\n\n// CUSTOM ERRORS\n// =============\n\n// Simplified versions from Node, changed for Buffer-only usage\nconst errors = {}\nfunction E (sym, getMessage, Base) {\n errors[sym] = class NodeError extends Base {\n constructor () {\n super()\n\n Object.defineProperty(this, 'message', {\n value: getMessage.apply(this, arguments),\n writable: true,\n configurable: true\n })\n\n // Add the error code to the name to include it in the stack trace.\n this.name = `${this.name} [${sym}]`\n // Access the stack to generate the error message including the error code\n // from the name.\n this.stack // eslint-disable-line no-unused-expressions\n // Reset the name to the actual name.\n delete this.name\n }\n\n get code () {\n return sym\n }\n\n set code (value) {\n Object.defineProperty(this, 'code', {\n configurable: true,\n enumerable: true,\n value,\n writable: true\n })\n }\n\n toString () {\n return `${this.name} [${sym}]: ${this.message}`\n }\n }\n}\n\nE('ERR_BUFFER_OUT_OF_BOUNDS',\n function (name) {\n if (name) {\n return `${name} is outside of buffer bounds`\n }\n\n return 'Attempt to access memory outside buffer bounds'\n }, RangeError)\nE('ERR_INVALID_ARG_TYPE',\n function (name, actual) {\n return `The \"${name}\" argument must be of type number. Received type ${typeof actual}`\n }, TypeError)\nE('ERR_OUT_OF_RANGE',\n function (str, range, input) {\n let msg = `The value of \"${str}\" is out of range.`\n let received = input\n if (Number.isInteger(input) && Math.abs(input) > 2 ** 32) {\n received = addNumericalSeparator(String(input))\n } else if (typeof input === 'bigint') {\n received = String(input)\n if (input > BigInt(2) ** BigInt(32) || input < -(BigInt(2) ** BigInt(32))) {\n received = addNumericalSeparator(received)\n }\n received += 'n'\n }\n msg += ` It must be ${range}. Received ${received}`\n return msg\n }, RangeError)\n\nfunction addNumericalSeparator (val) {\n let res = ''\n let i = val.length\n const start = val[0] === '-' ? 1 : 0\n for (; i >= start + 4; i -= 3) {\n res = `_${val.slice(i - 3, i)}${res}`\n }\n return `${val.slice(0, i)}${res}`\n}\n\n// CHECK FUNCTIONS\n// ===============\n\nfunction checkBounds (buf, offset, byteLength) {\n validateNumber(offset, 'offset')\n if (buf[offset] === undefined || buf[offset + byteLength] === undefined) {\n boundsError(offset, buf.length - (byteLength + 1))\n }\n}\n\nfunction checkIntBI (value, min, max, buf, offset, byteLength) {\n if (value > max || value < min) {\n const n = typeof min === 'bigint' ? 'n' : ''\n let range\n if (byteLength > 3) {\n if (min === 0 || min === BigInt(0)) {\n range = `>= 0${n} and < 2${n} ** ${(byteLength + 1) * 8}${n}`\n } else {\n range = `>= -(2${n} ** ${(byteLength + 1) * 8 - 1}${n}) and < 2 ** ` +\n `${(byteLength + 1) * 8 - 1}${n}`\n }\n } else {\n range = `>= ${min}${n} and <= ${max}${n}`\n }\n throw new errors.ERR_OUT_OF_RANGE('value', range, value)\n }\n checkBounds(buf, offset, byteLength)\n}\n\nfunction validateNumber (value, name) {\n if (typeof value !== 'number') {\n throw new errors.ERR_INVALID_ARG_TYPE(name, 'number', value)\n }\n}\n\nfunction boundsError (value, length, type) {\n if (Math.floor(value) !== value) {\n validateNumber(value, type)\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset', 'an integer', value)\n }\n\n if (length < 0) {\n throw new errors.ERR_BUFFER_OUT_OF_BOUNDS()\n }\n\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset',\n `>= ${type ? 1 : 0} and <= ${length}`,\n value)\n}\n\n// HELPER FUNCTIONS\n// ================\n\nconst INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n // Node takes equal signs as end of the Base64 encoding\n str = str.split('=')[0]\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = str.trim().replace(INVALID_BASE64_RE, '')\n // Node converts strings with length < 2 to ''\n if (str.length < 2) return ''\n // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n while (str.length % 4 !== 0) {\n str = str + '='\n }\n return str\n}\n\nfunction utf8ToBytes (string, units) {\n units = units || Infinity\n let codePoint\n const length = string.length\n let leadSurrogate = null\n const bytes = []\n\n for (let i = 0; i < length; ++i) {\n codePoint = string.charCodeAt(i)\n\n // is surrogate component\n if (codePoint > 0xD7FF && codePoint < 0xE000) {\n // last char was a lead\n if (!leadSurrogate) {\n // no lead yet\n if (codePoint > 0xDBFF) {\n // unexpected trail\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n } else if (i + 1 === length) {\n // unpaired lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n }\n\n // valid lead\n leadSurrogate = codePoint\n\n continue\n }\n\n // 2 leads in a row\n if (codePoint < 0xDC00) {\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n leadSurrogate = codePoint\n continue\n }\n\n // valid surrogate pair\n codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n } else if (leadSurrogate) {\n // valid bmp char, but last char was a lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n }\n\n leadSurrogate = null\n\n // encode utf8\n if (codePoint < 0x80) {\n if ((units -= 1) < 0) break\n bytes.push(codePoint)\n } else if (codePoint < 0x800) {\n if ((units -= 2) < 0) break\n bytes.push(\n codePoint >> 0x6 | 0xC0,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x10000) {\n if ((units -= 3) < 0) break\n bytes.push(\n codePoint >> 0xC | 0xE0,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x110000) {\n if ((units -= 4) < 0) break\n bytes.push(\n codePoint >> 0x12 | 0xF0,\n codePoint >> 0xC & 0x3F | 0x80,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else {\n throw new Error('Invalid code point')\n }\n }\n\n return bytes\n}\n\nfunction asciiToBytes (str) {\n const byteArray = []\n for (let i = 0; i < str.length; ++i) {\n // Node's code seems to be doing this and not & 0x7F..\n byteArray.push(str.charCodeAt(i) & 0xFF)\n }\n return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n let c, hi, lo\n const byteArray = []\n for (let i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0) break\n\n c = str.charCodeAt(i)\n hi = c >> 8\n lo = c % 256\n byteArray.push(lo)\n byteArray.push(hi)\n }\n\n return byteArray\n}\n\nfunction base64ToBytes (str) {\n return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n let i\n for (i = 0; i < length; ++i) {\n if ((i + offset >= dst.length) || (i >= src.length)) break\n dst[i + offset] = src[i]\n }\n return i\n}\n\n// ArrayBuffer or Uint8Array objects from other contexts (i.e. iframes) do not pass\n// the `instanceof` check but they should be treated as of that type.\n// See: https://github.com/feross/buffer/issues/166\nfunction isInstance (obj, type) {\n return obj instanceof type ||\n (obj != null && obj.constructor != null && obj.constructor.name != null &&\n obj.constructor.name === type.name)\n}\nfunction numberIsNaN (obj) {\n // For IE11 support\n return obj !== obj // eslint-disable-line no-self-compare\n}\n\n// Create lookup table for `toString('hex')`\n// See: https://github.com/feross/buffer/issues/219\nconst hexSliceLookupTable = (function () {\n const alphabet = '0123456789abcdef'\n const table = new Array(256)\n for (let i = 0; i < 16; ++i) {\n const i16 = i * 16\n for (let j = 0; j < 16; ++j) {\n table[i16 + j] = alphabet[i] + alphabet[j]\n }\n }\n return table\n})()\n\n// Return not function with Error if BigInt not supported\nfunction defineBigIntMethod (fn) {\n return typeof BigInt === 'undefined' ? BufferBigIntNotDefined : fn\n}\n\nfunction BufferBigIntNotDefined () {\n throw new Error('BigInt not supported')\n}\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\nvar R = typeof Reflect === 'object' ? Reflect : null\nvar ReflectApply = R && typeof R.apply === 'function'\n ? R.apply\n : function ReflectApply(target, receiver, args) {\n return Function.prototype.apply.call(target, receiver, args);\n }\n\nvar ReflectOwnKeys\nif (R && typeof R.ownKeys === 'function') {\n ReflectOwnKeys = R.ownKeys\n} else if (Object.getOwnPropertySymbols) {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target)\n .concat(Object.getOwnPropertySymbols(target));\n };\n} else {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target);\n };\n}\n\nfunction ProcessEmitWarning(warning) {\n if (console && console.warn) console.warn(warning);\n}\n\nvar NumberIsNaN = Number.isNaN || function NumberIsNaN(value) {\n return value !== value;\n}\n\nfunction EventEmitter() {\n EventEmitter.init.call(this);\n}\nmodule.exports = EventEmitter;\nmodule.exports.once = once;\n\n// Backwards-compat with node 0.10.x\nEventEmitter.EventEmitter = EventEmitter;\n\nEventEmitter.prototype._events = undefined;\nEventEmitter.prototype._eventsCount = 0;\nEventEmitter.prototype._maxListeners = undefined;\n\n// By default EventEmitters will print a warning if more than 10 listeners are\n// added to it. This is a useful default which helps finding memory leaks.\nvar defaultMaxListeners = 10;\n\nfunction checkListener(listener) {\n if (typeof listener !== 'function') {\n throw new TypeError('The \"listener\" argument must be of type Function. Received type ' + typeof listener);\n }\n}\n\nObject.defineProperty(EventEmitter, 'defaultMaxListeners', {\n enumerable: true,\n get: function() {\n return defaultMaxListeners;\n },\n set: function(arg) {\n if (typeof arg !== 'number' || arg < 0 || NumberIsNaN(arg)) {\n throw new RangeError('The value of \"defaultMaxListeners\" is out of range. It must be a non-negative number. Received ' + arg + '.');\n }\n defaultMaxListeners = arg;\n }\n});\n\nEventEmitter.init = function() {\n\n if (this._events === undefined ||\n this._events === Object.getPrototypeOf(this)._events) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n }\n\n this._maxListeners = this._maxListeners || undefined;\n};\n\n// Obviously not all Emitters should be limited to 10. This function allows\n// that to be increased. Set to zero for unlimited.\nEventEmitter.prototype.setMaxListeners = function setMaxListeners(n) {\n if (typeof n !== 'number' || n < 0 || NumberIsNaN(n)) {\n throw new RangeError('The value of \"n\" is out of range. It must be a non-negative number. Received ' + n + '.');\n }\n this._maxListeners = n;\n return this;\n};\n\nfunction _getMaxListeners(that) {\n if (that._maxListeners === undefined)\n return EventEmitter.defaultMaxListeners;\n return that._maxListeners;\n}\n\nEventEmitter.prototype.getMaxListeners = function getMaxListeners() {\n return _getMaxListeners(this);\n};\n\nEventEmitter.prototype.emit = function emit(type) {\n var args = [];\n for (var i = 1; i < arguments.length; i++) args.push(arguments[i]);\n var doError = (type === 'error');\n\n var events = this._events;\n if (events !== undefined)\n doError = (doError && events.error === undefined);\n else if (!doError)\n return false;\n\n // If there is no 'error' event listener then throw.\n if (doError) {\n var er;\n if (args.length > 0)\n er = args[0];\n if (er instanceof Error) {\n // Note: The comments on the `throw` lines are intentional, they show\n // up in Node's output if this results in an unhandled exception.\n throw er; // Unhandled 'error' event\n }\n // At least give some kind of context to the user\n var err = new Error('Unhandled error.' + (er ? ' (' + er.message + ')' : ''));\n err.context = er;\n throw err; // Unhandled 'error' event\n }\n\n var handler = events[type];\n\n if (handler === undefined)\n return false;\n\n if (typeof handler === 'function') {\n ReflectApply(handler, this, args);\n } else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n ReflectApply(listeners[i], this, args);\n }\n\n return true;\n};\n\nfunction _addListener(target, type, listener, prepend) {\n var m;\n var events;\n var existing;\n\n checkListener(listener);\n\n events = target._events;\n if (events === undefined) {\n events = target._events = Object.create(null);\n target._eventsCount = 0;\n } else {\n // To avoid recursion in the case that type === \"newListener\"! Before\n // adding it to the listeners, first emit \"newListener\".\n if (events.newListener !== undefined) {\n target.emit('newListener', type,\n listener.listener ? listener.listener : listener);\n\n // Re-assign `events` because a newListener handler could have caused the\n // this._events to be assigned to a new object\n events = target._events;\n }\n existing = events[type];\n }\n\n if (existing === undefined) {\n // Optimize the case of one listener. Don't need the extra array object.\n existing = events[type] = listener;\n ++target._eventsCount;\n } else {\n if (typeof existing === 'function') {\n // Adding the second element, need to change to array.\n existing = events[type] =\n prepend ? [listener, existing] : [existing, listener];\n // If we've already got an array, just append.\n } else if (prepend) {\n existing.unshift(listener);\n } else {\n existing.push(listener);\n }\n\n // Check for listener leak\n m = _getMaxListeners(target);\n if (m > 0 && existing.length > m && !existing.warned) {\n existing.warned = true;\n // No error code for this since it is a Warning\n // eslint-disable-next-line no-restricted-syntax\n var w = new Error('Possible EventEmitter memory leak detected. ' +\n existing.length + ' ' + String(type) + ' listeners ' +\n 'added. Use emitter.setMaxListeners() to ' +\n 'increase limit');\n w.name = 'MaxListenersExceededWarning';\n w.emitter = target;\n w.type = type;\n w.count = existing.length;\n ProcessEmitWarning(w);\n }\n }\n\n return target;\n}\n\nEventEmitter.prototype.addListener = function addListener(type, listener) {\n return _addListener(this, type, listener, false);\n};\n\nEventEmitter.prototype.on = EventEmitter.prototype.addListener;\n\nEventEmitter.prototype.prependListener =\n function prependListener(type, listener) {\n return _addListener(this, type, listener, true);\n };\n\nfunction onceWrapper() {\n if (!this.fired) {\n this.target.removeListener(this.type, this.wrapFn);\n this.fired = true;\n if (arguments.length === 0)\n return this.listener.call(this.target);\n return this.listener.apply(this.target, arguments);\n }\n}\n\nfunction _onceWrap(target, type, listener) {\n var state = { fired: false, wrapFn: undefined, target: target, type: type, listener: listener };\n var wrapped = onceWrapper.bind(state);\n wrapped.listener = listener;\n state.wrapFn = wrapped;\n return wrapped;\n}\n\nEventEmitter.prototype.once = function once(type, listener) {\n checkListener(listener);\n this.on(type, _onceWrap(this, type, listener));\n return this;\n};\n\nEventEmitter.prototype.prependOnceListener =\n function prependOnceListener(type, listener) {\n checkListener(listener);\n this.prependListener(type, _onceWrap(this, type, listener));\n return this;\n };\n\n// Emits a 'removeListener' event if and only if the listener was removed.\nEventEmitter.prototype.removeListener =\n function removeListener(type, listener) {\n var list, events, position, i, originalListener;\n\n checkListener(listener);\n\n events = this._events;\n if (events === undefined)\n return this;\n\n list = events[type];\n if (list === undefined)\n return this;\n\n if (list === listener || list.listener === listener) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else {\n delete events[type];\n if (events.removeListener)\n this.emit('removeListener', type, list.listener || listener);\n }\n } else if (typeof list !== 'function') {\n position = -1;\n\n for (i = list.length - 1; i >= 0; i--) {\n if (list[i] === listener || list[i].listener === listener) {\n originalListener = list[i].listener;\n position = i;\n break;\n }\n }\n\n if (position < 0)\n return this;\n\n if (position === 0)\n list.shift();\n else {\n spliceOne(list, position);\n }\n\n if (list.length === 1)\n events[type] = list[0];\n\n if (events.removeListener !== undefined)\n this.emit('removeListener', type, originalListener || listener);\n }\n\n return this;\n };\n\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\n\nEventEmitter.prototype.removeAllListeners =\n function removeAllListeners(type) {\n var listeners, events, i;\n\n events = this._events;\n if (events === undefined)\n return this;\n\n // not listening for removeListener, no need to emit\n if (events.removeListener === undefined) {\n if (arguments.length === 0) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n } else if (events[type] !== undefined) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else\n delete events[type];\n }\n return this;\n }\n\n // emit removeListener for all listeners on all events\n if (arguments.length === 0) {\n var keys = Object.keys(events);\n var key;\n for (i = 0; i < keys.length; ++i) {\n key = keys[i];\n if (key === 'removeListener') continue;\n this.removeAllListeners(key);\n }\n this.removeAllListeners('removeListener');\n this._events = Object.create(null);\n this._eventsCount = 0;\n return this;\n }\n\n listeners = events[type];\n\n if (typeof listeners === 'function') {\n this.removeListener(type, listeners);\n } else if (listeners !== undefined) {\n // LIFO order\n for (i = listeners.length - 1; i >= 0; i--) {\n this.removeListener(type, listeners[i]);\n }\n }\n\n return this;\n };\n\nfunction _listeners(target, type, unwrap) {\n var events = target._events;\n\n if (events === undefined)\n return [];\n\n var evlistener = events[type];\n if (evlistener === undefined)\n return [];\n\n if (typeof evlistener === 'function')\n return unwrap ? [evlistener.listener || evlistener] : [evlistener];\n\n return unwrap ?\n unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length);\n}\n\nEventEmitter.prototype.listeners = function listeners(type) {\n return _listeners(this, type, true);\n};\n\nEventEmitter.prototype.rawListeners = function rawListeners(type) {\n return _listeners(this, type, false);\n};\n\nEventEmitter.listenerCount = function(emitter, type) {\n if (typeof emitter.listenerCount === 'function') {\n return emitter.listenerCount(type);\n } else {\n return listenerCount.call(emitter, type);\n }\n};\n\nEventEmitter.prototype.listenerCount = listenerCount;\nfunction listenerCount(type) {\n var events = this._events;\n\n if (events !== undefined) {\n var evlistener = events[type];\n\n if (typeof evlistener === 'function') {\n return 1;\n } else if (evlistener !== undefined) {\n return evlistener.length;\n }\n }\n\n return 0;\n}\n\nEventEmitter.prototype.eventNames = function eventNames() {\n return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : [];\n};\n\nfunction arrayClone(arr, n) {\n var copy = new Array(n);\n for (var i = 0; i < n; ++i)\n copy[i] = arr[i];\n return copy;\n}\n\nfunction spliceOne(list, index) {\n for (; index + 1 < list.length; index++)\n list[index] = list[index + 1];\n list.pop();\n}\n\nfunction unwrapListeners(arr) {\n var ret = new Array(arr.length);\n for (var i = 0; i < ret.length; ++i) {\n ret[i] = arr[i].listener || arr[i];\n }\n return ret;\n}\n\nfunction once(emitter, name) {\n return new Promise(function (resolve, reject) {\n function errorListener(err) {\n emitter.removeListener(name, resolver);\n reject(err);\n }\n\n function resolver() {\n if (typeof emitter.removeListener === 'function') {\n emitter.removeListener('error', errorListener);\n }\n resolve([].slice.call(arguments));\n };\n\n eventTargetAgnosticAddListener(emitter, name, resolver, { once: true });\n if (name !== 'error') {\n addErrorHandlerIfEventEmitter(emitter, errorListener, { once: true });\n }\n });\n}\n\nfunction addErrorHandlerIfEventEmitter(emitter, handler, flags) {\n if (typeof emitter.on === 'function') {\n eventTargetAgnosticAddListener(emitter, 'error', handler, flags);\n }\n}\n\nfunction eventTargetAgnosticAddListener(emitter, name, listener, flags) {\n if (typeof emitter.on === 'function') {\n if (flags.once) {\n emitter.once(name, listener);\n } else {\n emitter.on(name, listener);\n }\n } else if (typeof emitter.addEventListener === 'function') {\n // EventTarget does not have `error` event semantics like Node\n // EventEmitters, we do not listen for `error` events here.\n emitter.addEventListener(name, function wrapListener(arg) {\n // IE does not have builtin `{ once: true }` support so we\n // have to do it manually.\n if (flags.once) {\n emitter.removeEventListener(name, wrapListener);\n }\n listener(arg);\n });\n } else {\n throw new TypeError('The \"emitter\" argument must be of type EventEmitter. Received type ' + typeof emitter);\n }\n}\n","/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */\nexports.read = function (buffer, offset, isLE, mLen, nBytes) {\n var e, m\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var nBits = -7\n var i = isLE ? (nBytes - 1) : 0\n var d = isLE ? -1 : 1\n var s = buffer[offset + i]\n\n i += d\n\n e = s & ((1 << (-nBits)) - 1)\n s >>= (-nBits)\n nBits += eLen\n for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & ((1 << (-nBits)) - 1)\n e >>= (-nBits)\n nBits += mLen\n for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias\n } else if (e === eMax) {\n return m ? NaN : ((s ? -1 : 1) * Infinity)\n } else {\n m = m + Math.pow(2, mLen)\n e = e - eBias\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n var i = isLE ? 0 : (nBytes - 1)\n var d = isLE ? 1 : -1\n var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n value = Math.abs(value)\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0\n e = eMax\n } else {\n e = Math.floor(Math.log(value) / Math.LN2)\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--\n c *= 2\n }\n if (e + eBias >= 1) {\n value += rt / c\n } else {\n value += rt * Math.pow(2, 1 - eBias)\n }\n if (value * c >= 2) {\n e++\n c /= 2\n }\n\n if (e + eBias >= eMax) {\n m = 0\n e = eMax\n } else if (e + eBias >= 1) {\n m = ((value * c) - 1) * Math.pow(2, mLen)\n e = e + eBias\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n e = 0\n }\n }\n\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n e = (e << mLen) | m\n eLen += mLen\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128\n}\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView');\n\nmodule.exports = DataView;\n","var hashClear = require('./_hashClear'),\n hashDelete = require('./_hashDelete'),\n hashGet = require('./_hashGet'),\n hashHas = require('./_hashHas'),\n hashSet = require('./_hashSet');\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\nmodule.exports = Hash;\n","var listCacheClear = require('./_listCacheClear'),\n listCacheDelete = require('./_listCacheDelete'),\n listCacheGet = require('./_listCacheGet'),\n listCacheHas = require('./_listCacheHas'),\n listCacheSet = require('./_listCacheSet');\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\nmodule.exports = ListCache;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map');\n\nmodule.exports = Map;\n","var mapCacheClear = require('./_mapCacheClear'),\n mapCacheDelete = require('./_mapCacheDelete'),\n mapCacheGet = require('./_mapCacheGet'),\n mapCacheHas = require('./_mapCacheHas'),\n mapCacheSet = require('./_mapCacheSet');\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\nmodule.exports = MapCache;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Promise = getNative(root, 'Promise');\n\nmodule.exports = Promise;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Set = getNative(root, 'Set');\n\nmodule.exports = Set;\n","var MapCache = require('./_MapCache'),\n setCacheAdd = require('./_setCacheAdd'),\n setCacheHas = require('./_setCacheHas');\n\n/**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\nfunction SetCache(values) {\n var index = -1,\n length = values == null ? 0 : values.length;\n\n this.__data__ = new MapCache;\n while (++index < length) {\n this.add(values[index]);\n }\n}\n\n// Add methods to `SetCache`.\nSetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\nSetCache.prototype.has = setCacheHas;\n\nmodule.exports = SetCache;\n","var ListCache = require('./_ListCache'),\n stackClear = require('./_stackClear'),\n stackDelete = require('./_stackDelete'),\n stackGet = require('./_stackGet'),\n stackHas = require('./_stackHas'),\n stackSet = require('./_stackSet');\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\nmodule.exports = Stack;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Uint8Array = root.Uint8Array;\n\nmodule.exports = Uint8Array;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar WeakMap = getNative(root, 'WeakMap');\n\nmodule.exports = WeakMap;\n","/**\n * A specialized version of `_.forEach` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\nfunction arrayEach(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (iteratee(array[index], index, array) === false) {\n break;\n }\n }\n return array;\n}\n\nmodule.exports = arrayEach;\n","/**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\nfunction arrayFilter(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result[resIndex++] = value;\n }\n }\n return result;\n}\n\nmodule.exports = arrayFilter;\n","var baseTimes = require('./_baseTimes'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isIndex = require('./_isIndex'),\n isTypedArray = require('./isTypedArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = arrayLikeKeys;\n","/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n}\n\nmodule.exports = arrayPush;\n","/**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\nfunction arraySome(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (predicate(array[index], index, array)) {\n return true;\n }\n }\n return false;\n}\n\nmodule.exports = arraySome;\n","var baseAssignValue = require('./_baseAssignValue'),\n eq = require('./eq');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\nmodule.exports = assignValue;\n","var eq = require('./eq');\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\nmodule.exports = assocIndexOf;\n","var copyObject = require('./_copyObject'),\n keys = require('./keys');\n\n/**\n * The base implementation of `_.assign` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssign(object, source) {\n return object && copyObject(source, keys(source), object);\n}\n\nmodule.exports = baseAssign;\n","var copyObject = require('./_copyObject'),\n keysIn = require('./keysIn');\n\n/**\n * The base implementation of `_.assignIn` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssignIn(object, source) {\n return object && copyObject(source, keysIn(source), object);\n}\n\nmodule.exports = baseAssignIn;\n","var defineProperty = require('./_defineProperty');\n\n/**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction baseAssignValue(object, key, value) {\n if (key == '__proto__' && defineProperty) {\n defineProperty(object, key, {\n 'configurable': true,\n 'enumerable': true,\n 'value': value,\n 'writable': true\n });\n } else {\n object[key] = value;\n }\n}\n\nmodule.exports = baseAssignValue;\n","var Stack = require('./_Stack'),\n arrayEach = require('./_arrayEach'),\n assignValue = require('./_assignValue'),\n baseAssign = require('./_baseAssign'),\n baseAssignIn = require('./_baseAssignIn'),\n cloneBuffer = require('./_cloneBuffer'),\n copyArray = require('./_copyArray'),\n copySymbols = require('./_copySymbols'),\n copySymbolsIn = require('./_copySymbolsIn'),\n getAllKeys = require('./_getAllKeys'),\n getAllKeysIn = require('./_getAllKeysIn'),\n getTag = require('./_getTag'),\n initCloneArray = require('./_initCloneArray'),\n initCloneByTag = require('./_initCloneByTag'),\n initCloneObject = require('./_initCloneObject'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isMap = require('./isMap'),\n isObject = require('./isObject'),\n isSet = require('./isSet'),\n keys = require('./keys'),\n keysIn = require('./keysIn');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_FLAT_FLAG = 2,\n CLONE_SYMBOLS_FLAG = 4;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values supported by `_.clone`. */\nvar cloneableTags = {};\ncloneableTags[argsTag] = cloneableTags[arrayTag] =\ncloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =\ncloneableTags[boolTag] = cloneableTags[dateTag] =\ncloneableTags[float32Tag] = cloneableTags[float64Tag] =\ncloneableTags[int8Tag] = cloneableTags[int16Tag] =\ncloneableTags[int32Tag] = cloneableTags[mapTag] =\ncloneableTags[numberTag] = cloneableTags[objectTag] =\ncloneableTags[regexpTag] = cloneableTags[setTag] =\ncloneableTags[stringTag] = cloneableTags[symbolTag] =\ncloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =\ncloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;\ncloneableTags[errorTag] = cloneableTags[funcTag] =\ncloneableTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.clone` and `_.cloneDeep` which tracks\n * traversed objects.\n *\n * @private\n * @param {*} value The value to clone.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Deep clone\n * 2 - Flatten inherited properties\n * 4 - Clone symbols\n * @param {Function} [customizer] The function to customize cloning.\n * @param {string} [key] The key of `value`.\n * @param {Object} [object] The parent object of `value`.\n * @param {Object} [stack] Tracks traversed objects and their clone counterparts.\n * @returns {*} Returns the cloned value.\n */\nfunction baseClone(value, bitmask, customizer, key, object, stack) {\n var result,\n isDeep = bitmask & CLONE_DEEP_FLAG,\n isFlat = bitmask & CLONE_FLAT_FLAG,\n isFull = bitmask & CLONE_SYMBOLS_FLAG;\n\n if (customizer) {\n result = object ? customizer(value, key, object, stack) : customizer(value);\n }\n if (result !== undefined) {\n return result;\n }\n if (!isObject(value)) {\n return value;\n }\n var isArr = isArray(value);\n if (isArr) {\n result = initCloneArray(value);\n if (!isDeep) {\n return copyArray(value, result);\n }\n } else {\n var tag = getTag(value),\n isFunc = tag == funcTag || tag == genTag;\n\n if (isBuffer(value)) {\n return cloneBuffer(value, isDeep);\n }\n if (tag == objectTag || tag == argsTag || (isFunc && !object)) {\n result = (isFlat || isFunc) ? {} : initCloneObject(value);\n if (!isDeep) {\n return isFlat\n ? copySymbolsIn(value, baseAssignIn(result, value))\n : copySymbols(value, baseAssign(result, value));\n }\n } else {\n if (!cloneableTags[tag]) {\n return object ? value : {};\n }\n result = initCloneByTag(value, tag, isDeep);\n }\n }\n // Check for circular references and return its corresponding clone.\n stack || (stack = new Stack);\n var stacked = stack.get(value);\n if (stacked) {\n return stacked;\n }\n stack.set(value, result);\n\n if (isSet(value)) {\n value.forEach(function(subValue) {\n result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));\n });\n } else if (isMap(value)) {\n value.forEach(function(subValue, key) {\n result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n }\n\n var keysFunc = isFull\n ? (isFlat ? getAllKeysIn : getAllKeys)\n : (isFlat ? keysIn : keys);\n\n var props = isArr ? undefined : keysFunc(value);\n arrayEach(props || value, function(subValue, key) {\n if (props) {\n key = subValue;\n subValue = value[key];\n }\n // Recursively populate clone (susceptible to call stack limits).\n assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n return result;\n}\n\nmodule.exports = baseClone;\n","var isObject = require('./isObject');\n\n/** Built-in value references. */\nvar objectCreate = Object.create;\n\n/**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} proto The object to inherit from.\n * @returns {Object} Returns the new object.\n */\nvar baseCreate = (function() {\n function object() {}\n return function(proto) {\n if (!isObject(proto)) {\n return {};\n }\n if (objectCreate) {\n return objectCreate(proto);\n }\n object.prototype = proto;\n var result = new object;\n object.prototype = undefined;\n return result;\n };\n}());\n\nmodule.exports = baseCreate;\n","var arrayPush = require('./_arrayPush'),\n isArray = require('./isArray');\n\n/**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction baseGetAllKeys(object, keysFunc, symbolsFunc) {\n var result = keysFunc(object);\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n}\n\nmodule.exports = baseGetAllKeys;\n","var Symbol = require('./_Symbol'),\n getRawTag = require('./_getRawTag'),\n objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]';\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\nmodule.exports = baseIsArguments;\n","var baseIsEqualDeep = require('./_baseIsEqualDeep'),\n isObjectLike = require('./isObjectLike');\n\n/**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Unordered comparison\n * 2 - Partial comparison\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\nfunction baseIsEqual(value, other, bitmask, customizer, stack) {\n if (value === other) {\n return true;\n }\n if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\n return value !== value && other !== other;\n }\n return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n}\n\nmodule.exports = baseIsEqual;\n","var Stack = require('./_Stack'),\n equalArrays = require('./_equalArrays'),\n equalByTag = require('./_equalByTag'),\n equalObjects = require('./_equalObjects'),\n getTag = require('./_getTag'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isTypedArray = require('./isTypedArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n var objIsArr = isArray(object),\n othIsArr = isArray(other),\n objTag = objIsArr ? arrayTag : getTag(object),\n othTag = othIsArr ? arrayTag : getTag(other);\n\n objTag = objTag == argsTag ? objectTag : objTag;\n othTag = othTag == argsTag ? objectTag : othTag;\n\n var objIsObj = objTag == objectTag,\n othIsObj = othTag == objectTag,\n isSameTag = objTag == othTag;\n\n if (isSameTag && isBuffer(object)) {\n if (!isBuffer(other)) {\n return false;\n }\n objIsArr = true;\n objIsObj = false;\n }\n if (isSameTag && !objIsObj) {\n stack || (stack = new Stack);\n return (objIsArr || isTypedArray(object))\n ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n }\n if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n if (objIsWrapped || othIsWrapped) {\n var objUnwrapped = objIsWrapped ? object.value() : object,\n othUnwrapped = othIsWrapped ? other.value() : other;\n\n stack || (stack = new Stack);\n return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n }\n }\n if (!isSameTag) {\n return false;\n }\n stack || (stack = new Stack);\n return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n}\n\nmodule.exports = baseIsEqualDeep;\n","var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]';\n\n/**\n * The base implementation of `_.isMap` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n */\nfunction baseIsMap(value) {\n return isObjectLike(value) && getTag(value) == mapTag;\n}\n\nmodule.exports = baseIsMap;\n","var isFunction = require('./isFunction'),\n isMasked = require('./_isMasked'),\n isObject = require('./isObject'),\n toSource = require('./_toSource');\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\nmodule.exports = baseIsNative;\n","var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar setTag = '[object Set]';\n\n/**\n * The base implementation of `_.isSet` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n */\nfunction baseIsSet(value) {\n return isObjectLike(value) && getTag(value) == setTag;\n}\n\nmodule.exports = baseIsSet;\n","var baseGetTag = require('./_baseGetTag'),\n isLength = require('./isLength'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n\nmodule.exports = baseIsTypedArray;\n","var isPrototype = require('./_isPrototype'),\n nativeKeys = require('./_nativeKeys');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeys;\n","var isObject = require('./isObject'),\n isPrototype = require('./_isPrototype'),\n nativeKeysIn = require('./_nativeKeysIn');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeysIn(object) {\n if (!isObject(object)) {\n return nativeKeysIn(object);\n }\n var isProto = isPrototype(object),\n result = [];\n\n for (var key in object) {\n if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeysIn;\n","/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\nmodule.exports = baseTimes;\n","/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n return function(value) {\n return func(value);\n };\n}\n\nmodule.exports = baseUnary;\n","/**\n * Checks if a `cache` value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction cacheHas(cache, key) {\n return cache.has(key);\n}\n\nmodule.exports = cacheHas;\n","var Uint8Array = require('./_Uint8Array');\n\n/**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\nfunction cloneArrayBuffer(arrayBuffer) {\n var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n return result;\n}\n\nmodule.exports = cloneArrayBuffer;\n","var root = require('./_root');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined,\n allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;\n\n/**\n * Creates a clone of `buffer`.\n *\n * @private\n * @param {Buffer} buffer The buffer to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Buffer} Returns the cloned buffer.\n */\nfunction cloneBuffer(buffer, isDeep) {\n if (isDeep) {\n return buffer.slice();\n }\n var length = buffer.length,\n result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\n\n buffer.copy(result);\n return result;\n}\n\nmodule.exports = cloneBuffer;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer');\n\n/**\n * Creates a clone of `dataView`.\n *\n * @private\n * @param {Object} dataView The data view to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned data view.\n */\nfunction cloneDataView(dataView, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;\n return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);\n}\n\nmodule.exports = cloneDataView;\n","/** Used to match `RegExp` flags from their coerced string values. */\nvar reFlags = /\\w*$/;\n\n/**\n * Creates a clone of `regexp`.\n *\n * @private\n * @param {Object} regexp The regexp to clone.\n * @returns {Object} Returns the cloned regexp.\n */\nfunction cloneRegExp(regexp) {\n var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));\n result.lastIndex = regexp.lastIndex;\n return result;\n}\n\nmodule.exports = cloneRegExp;\n","var Symbol = require('./_Symbol');\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * Creates a clone of the `symbol` object.\n *\n * @private\n * @param {Object} symbol The symbol object to clone.\n * @returns {Object} Returns the cloned symbol object.\n */\nfunction cloneSymbol(symbol) {\n return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};\n}\n\nmodule.exports = cloneSymbol;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer');\n\n/**\n * Creates a clone of `typedArray`.\n *\n * @private\n * @param {Object} typedArray The typed array to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned typed array.\n */\nfunction cloneTypedArray(typedArray, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n}\n\nmodule.exports = cloneTypedArray;\n","/**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\nfunction copyArray(source, array) {\n var index = -1,\n length = source.length;\n\n array || (array = Array(length));\n while (++index < length) {\n array[index] = source[index];\n }\n return array;\n}\n\nmodule.exports = copyArray;\n","var assignValue = require('./_assignValue'),\n baseAssignValue = require('./_baseAssignValue');\n\n/**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\nfunction copyObject(source, props, object, customizer) {\n var isNew = !object;\n object || (object = {});\n\n var index = -1,\n length = props.length;\n\n while (++index < length) {\n var key = props[index];\n\n var newValue = customizer\n ? customizer(object[key], source[key], key, object, source)\n : undefined;\n\n if (newValue === undefined) {\n newValue = source[key];\n }\n if (isNew) {\n baseAssignValue(object, key, newValue);\n } else {\n assignValue(object, key, newValue);\n }\n }\n return object;\n}\n\nmodule.exports = copyObject;\n","var copyObject = require('./_copyObject'),\n getSymbols = require('./_getSymbols');\n\n/**\n * Copies own symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbols(source, object) {\n return copyObject(source, getSymbols(source), object);\n}\n\nmodule.exports = copySymbols;\n","var copyObject = require('./_copyObject'),\n getSymbolsIn = require('./_getSymbolsIn');\n\n/**\n * Copies own and inherited symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbolsIn(source, object) {\n return copyObject(source, getSymbolsIn(source), object);\n}\n\nmodule.exports = copySymbolsIn;\n","var root = require('./_root');\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\nmodule.exports = coreJsData;\n","var getNative = require('./_getNative');\n\nvar defineProperty = (function() {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n}());\n\nmodule.exports = defineProperty;\n","var SetCache = require('./_SetCache'),\n arraySome = require('./_arraySome'),\n cacheHas = require('./_cacheHas');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\nfunction equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n arrLength = array.length,\n othLength = other.length;\n\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n return false;\n }\n // Check that cyclic values are equal.\n var arrStacked = stack.get(array);\n var othStacked = stack.get(other);\n if (arrStacked && othStacked) {\n return arrStacked == other && othStacked == array;\n }\n var index = -1,\n result = true,\n seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n stack.set(array, other);\n stack.set(other, array);\n\n // Ignore non-index properties.\n while (++index < arrLength) {\n var arrValue = array[index],\n othValue = other[index];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, arrValue, index, other, array, stack)\n : customizer(arrValue, othValue, index, array, other, stack);\n }\n if (compared !== undefined) {\n if (compared) {\n continue;\n }\n result = false;\n break;\n }\n // Recursively compare arrays (susceptible to call stack limits).\n if (seen) {\n if (!arraySome(other, function(othValue, othIndex) {\n if (!cacheHas(seen, othIndex) &&\n (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n return seen.push(othIndex);\n }\n })) {\n result = false;\n break;\n }\n } else if (!(\n arrValue === othValue ||\n equalFunc(arrValue, othValue, bitmask, customizer, stack)\n )) {\n result = false;\n break;\n }\n }\n stack['delete'](array);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalArrays;\n","var Symbol = require('./_Symbol'),\n Uint8Array = require('./_Uint8Array'),\n eq = require('./eq'),\n equalArrays = require('./_equalArrays'),\n mapToArray = require('./_mapToArray'),\n setToArray = require('./_setToArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]';\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n switch (tag) {\n case dataViewTag:\n if ((object.byteLength != other.byteLength) ||\n (object.byteOffset != other.byteOffset)) {\n return false;\n }\n object = object.buffer;\n other = other.buffer;\n\n case arrayBufferTag:\n if ((object.byteLength != other.byteLength) ||\n !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n return false;\n }\n return true;\n\n case boolTag:\n case dateTag:\n case numberTag:\n // Coerce booleans to `1` or `0` and dates to milliseconds.\n // Invalid dates are coerced to `NaN`.\n return eq(+object, +other);\n\n case errorTag:\n return object.name == other.name && object.message == other.message;\n\n case regexpTag:\n case stringTag:\n // Coerce regexes to strings and treat strings, primitives and objects,\n // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n // for more details.\n return object == (other + '');\n\n case mapTag:\n var convert = mapToArray;\n\n case setTag:\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n convert || (convert = setToArray);\n\n if (object.size != other.size && !isPartial) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked) {\n return stacked == other;\n }\n bitmask |= COMPARE_UNORDERED_FLAG;\n\n // Recursively compare objects (susceptible to call stack limits).\n stack.set(object, other);\n var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n stack['delete'](object);\n return result;\n\n case symbolTag:\n if (symbolValueOf) {\n return symbolValueOf.call(object) == symbolValueOf.call(other);\n }\n }\n return false;\n}\n\nmodule.exports = equalByTag;\n","var getAllKeys = require('./_getAllKeys');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n objProps = getAllKeys(object),\n objLength = objProps.length,\n othProps = getAllKeys(other),\n othLength = othProps.length;\n\n if (objLength != othLength && !isPartial) {\n return false;\n }\n var index = objLength;\n while (index--) {\n var key = objProps[index];\n if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n return false;\n }\n }\n // Check that cyclic values are equal.\n var objStacked = stack.get(object);\n var othStacked = stack.get(other);\n if (objStacked && othStacked) {\n return objStacked == other && othStacked == object;\n }\n var result = true;\n stack.set(object, other);\n stack.set(other, object);\n\n var skipCtor = isPartial;\n while (++index < objLength) {\n key = objProps[index];\n var objValue = object[key],\n othValue = other[key];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, objValue, key, other, object, stack)\n : customizer(objValue, othValue, key, object, other, stack);\n }\n // Recursively compare objects (susceptible to call stack limits).\n if (!(compared === undefined\n ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n : compared\n )) {\n result = false;\n break;\n }\n skipCtor || (skipCtor = key == 'constructor');\n }\n if (result && !skipCtor) {\n var objCtor = object.constructor,\n othCtor = other.constructor;\n\n // Non `Object` object instances with different constructors are not equal.\n if (objCtor != othCtor &&\n ('constructor' in object && 'constructor' in other) &&\n !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n result = false;\n }\n }\n stack['delete'](object);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalObjects;\n","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n","var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbols = require('./_getSymbols'),\n keys = require('./keys');\n\n/**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeys(object) {\n return baseGetAllKeys(object, keys, getSymbols);\n}\n\nmodule.exports = getAllKeys;\n","var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbolsIn = require('./_getSymbolsIn'),\n keysIn = require('./keysIn');\n\n/**\n * Creates an array of own and inherited enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeysIn(object) {\n return baseGetAllKeys(object, keysIn, getSymbolsIn);\n}\n\nmodule.exports = getAllKeysIn;\n","var isKeyable = require('./_isKeyable');\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\nmodule.exports = getMapData;\n","var baseIsNative = require('./_baseIsNative'),\n getValue = require('./_getValue');\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\nmodule.exports = getNative;\n","var overArg = require('./_overArg');\n\n/** Built-in value references. */\nvar getPrototype = overArg(Object.getPrototypeOf, Object);\n\nmodule.exports = getPrototype;\n","var Symbol = require('./_Symbol');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nmodule.exports = getRawTag;\n","var arrayFilter = require('./_arrayFilter'),\n stubArray = require('./stubArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n if (object == null) {\n return [];\n }\n object = Object(object);\n return arrayFilter(nativeGetSymbols(object), function(symbol) {\n return propertyIsEnumerable.call(object, symbol);\n });\n};\n\nmodule.exports = getSymbols;\n","var arrayPush = require('./_arrayPush'),\n getPrototype = require('./_getPrototype'),\n getSymbols = require('./_getSymbols'),\n stubArray = require('./stubArray');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own and inherited enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {\n var result = [];\n while (object) {\n arrayPush(result, getSymbols(object));\n object = getPrototype(object);\n }\n return result;\n};\n\nmodule.exports = getSymbolsIn;\n","var DataView = require('./_DataView'),\n Map = require('./_Map'),\n Promise = require('./_Promise'),\n Set = require('./_Set'),\n WeakMap = require('./_WeakMap'),\n baseGetTag = require('./_baseGetTag'),\n toSource = require('./_toSource');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n setTag = '[object Set]',\n weakMapTag = '[object WeakMap]';\n\nvar dataViewTag = '[object DataView]';\n\n/** Used to detect maps, sets, and weakmaps. */\nvar dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nvar getTag = baseGetTag;\n\n// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\nif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = baseGetTag(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : '';\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n}\n\nmodule.exports = getTag;\n","/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\nmodule.exports = getValue;\n","var nativeCreate = require('./_nativeCreate');\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n}\n\nmodule.exports = hashClear;\n","/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = hashDelete;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\nmodule.exports = hashGet;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\nmodule.exports = hashHas;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\nmodule.exports = hashSet;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Initializes an array clone.\n *\n * @private\n * @param {Array} array The array to clone.\n * @returns {Array} Returns the initialized clone.\n */\nfunction initCloneArray(array) {\n var length = array.length,\n result = new array.constructor(length);\n\n // Add properties assigned by `RegExp#exec`.\n if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {\n result.index = array.index;\n result.input = array.input;\n }\n return result;\n}\n\nmodule.exports = initCloneArray;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer'),\n cloneDataView = require('./_cloneDataView'),\n cloneRegExp = require('./_cloneRegExp'),\n cloneSymbol = require('./_cloneSymbol'),\n cloneTypedArray = require('./_cloneTypedArray');\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/**\n * Initializes an object clone based on its `toStringTag`.\n *\n * **Note:** This function only supports cloning values with tags of\n * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.\n *\n * @private\n * @param {Object} object The object to clone.\n * @param {string} tag The `toStringTag` of the object to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneByTag(object, tag, isDeep) {\n var Ctor = object.constructor;\n switch (tag) {\n case arrayBufferTag:\n return cloneArrayBuffer(object);\n\n case boolTag:\n case dateTag:\n return new Ctor(+object);\n\n case dataViewTag:\n return cloneDataView(object, isDeep);\n\n case float32Tag: case float64Tag:\n case int8Tag: case int16Tag: case int32Tag:\n case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:\n return cloneTypedArray(object, isDeep);\n\n case mapTag:\n return new Ctor;\n\n case numberTag:\n case stringTag:\n return new Ctor(object);\n\n case regexpTag:\n return cloneRegExp(object);\n\n case setTag:\n return new Ctor;\n\n case symbolTag:\n return cloneSymbol(object);\n }\n}\n\nmodule.exports = initCloneByTag;\n","var baseCreate = require('./_baseCreate'),\n getPrototype = require('./_getPrototype'),\n isPrototype = require('./_isPrototype');\n\n/**\n * Initializes an object clone.\n *\n * @private\n * @param {Object} object The object to clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneObject(object) {\n return (typeof object.constructor == 'function' && !isPrototype(object))\n ? baseCreate(getPrototype(object))\n : {};\n}\n\nmodule.exports = initCloneObject;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n var type = typeof value;\n length = length == null ? MAX_SAFE_INTEGER : length;\n\n return !!length &&\n (type == 'number' ||\n (type != 'symbol' && reIsUint.test(value))) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\nmodule.exports = isIndex;\n","/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\nmodule.exports = isKeyable;\n","var coreJsData = require('./_coreJsData');\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\nmodule.exports = isMasked;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\nmodule.exports = isPrototype;\n","/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n}\n\nmodule.exports = listCacheClear;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype;\n\n/** Built-in value references. */\nvar splice = arrayProto.splice;\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n}\n\nmodule.exports = listCacheDelete;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\nmodule.exports = listCacheGet;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\nmodule.exports = listCacheHas;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\nmodule.exports = listCacheSet;\n","var Hash = require('./_Hash'),\n ListCache = require('./_ListCache'),\n Map = require('./_Map');\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\nmodule.exports = mapCacheClear;\n","var getMapData = require('./_getMapData');\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = mapCacheDelete;\n","var getMapData = require('./_getMapData');\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\nmodule.exports = mapCacheGet;\n","var getMapData = require('./_getMapData');\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\nmodule.exports = mapCacheHas;\n","var getMapData = require('./_getMapData');\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n}\n\nmodule.exports = mapCacheSet;\n","/**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\nfunction mapToArray(map) {\n var index = -1,\n result = Array(map.size);\n\n map.forEach(function(value, key) {\n result[++index] = [key, value];\n });\n return result;\n}\n\nmodule.exports = mapToArray;\n","var getNative = require('./_getNative');\n\n/* Built-in method references that are verified to be native. */\nvar nativeCreate = getNative(Object, 'create');\n\nmodule.exports = nativeCreate;\n","var overArg = require('./_overArg');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeKeys = overArg(Object.keys, Object);\n\nmodule.exports = nativeKeys;\n","/**\n * This function is like\n * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * except that it includes inherited enumerable properties.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction nativeKeysIn(object) {\n var result = [];\n if (object != null) {\n for (var key in Object(object)) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = nativeKeysIn;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n try {\n // Use `util.types` for Node.js 10+.\n var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n if (types) {\n return types;\n }\n\n // Legacy `process.binding('util')` for Node.js < 10.\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n}());\n\nmodule.exports = nodeUtil;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n","/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\nmodule.exports = overArg;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n","/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\nfunction setCacheAdd(value) {\n this.__data__.set(value, HASH_UNDEFINED);\n return this;\n}\n\nmodule.exports = setCacheAdd;\n","/**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\nfunction setCacheHas(value) {\n return this.__data__.has(value);\n}\n\nmodule.exports = setCacheHas;\n","/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\nfunction setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n}\n\nmodule.exports = setToArray;\n","var ListCache = require('./_ListCache');\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}\n\nmodule.exports = stackClear;\n","/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n var data = this.__data__,\n result = data['delete'](key);\n\n this.size = data.size;\n return result;\n}\n\nmodule.exports = stackDelete;\n","/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n return this.__data__.get(key);\n}\n\nmodule.exports = stackGet;\n","/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n return this.__data__.has(key);\n}\n\nmodule.exports = stackHas;\n","var ListCache = require('./_ListCache'),\n Map = require('./_Map'),\n MapCache = require('./_MapCache');\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n var data = this.__data__;\n if (data instanceof ListCache) {\n var pairs = data.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n this.size = ++data.size;\n return this;\n }\n data = this.__data__ = new MapCache(pairs);\n }\n data.set(key, value);\n this.size = data.size;\n return this;\n}\n\nmodule.exports = stackSet;\n","/** Used for built-in method references. */\nvar funcProto = Function.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\nmodule.exports = toSource;\n","var baseClone = require('./_baseClone');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_SYMBOLS_FLAG = 4;\n\n/**\n * This method is like `_.clone` except that it recursively clones `value`.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Lang\n * @param {*} value The value to recursively clone.\n * @returns {*} Returns the deep cloned value.\n * @see _.clone\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var deep = _.cloneDeep(objects);\n * console.log(deep[0] === objects[0]);\n * // => false\n */\nfunction cloneDeep(value) {\n return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);\n}\n\nmodule.exports = cloneDeep;\n","/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\nmodule.exports = eq;\n","var baseIsArguments = require('./_baseIsArguments'),\n isObjectLike = require('./isObjectLike');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n};\n\nmodule.exports = isArguments;\n","/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\nmodule.exports = isArray;\n","var isFunction = require('./isFunction'),\n isLength = require('./isLength');\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\nmodule.exports = isArrayLike;\n","var root = require('./_root'),\n stubFalse = require('./stubFalse');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\nmodule.exports = isBuffer;\n","var baseIsEqual = require('./_baseIsEqual');\n\n/**\n * Performs a deep comparison between two values to determine if they are\n * equivalent.\n *\n * **Note:** This method supports comparing arrays, array buffers, booleans,\n * date objects, error objects, maps, numbers, `Object` objects, regexes,\n * sets, strings, symbols, and typed arrays. `Object` objects are compared\n * by their own, not inherited, enumerable properties. Functions and DOM\n * nodes are compared by strict equality, i.e. `===`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.isEqual(object, other);\n * // => true\n *\n * object === other;\n * // => false\n */\nfunction isEqual(value, other) {\n return baseIsEqual(value, other);\n}\n\nmodule.exports = isEqual;\n","var baseGetTag = require('./_baseGetTag'),\n isObject = require('./isObject');\n\n/** `Object#toString` result references. */\nvar asyncTag = '[object AsyncFunction]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n proxyTag = '[object Proxy]';\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\nmodule.exports = isFunction;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\nmodule.exports = isLength;\n","var baseIsMap = require('./_baseIsMap'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsMap = nodeUtil && nodeUtil.isMap;\n\n/**\n * Checks if `value` is classified as a `Map` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n * @example\n *\n * _.isMap(new Map);\n * // => true\n *\n * _.isMap(new WeakMap);\n * // => false\n */\nvar isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;\n\nmodule.exports = isMap;\n","/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n","var baseIsSet = require('./_baseIsSet'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsSet = nodeUtil && nodeUtil.isSet;\n\n/**\n * Checks if `value` is classified as a `Set` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n * @example\n *\n * _.isSet(new Set);\n * // => true\n *\n * _.isSet(new WeakSet);\n * // => false\n */\nvar isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;\n\nmodule.exports = isSet;\n","var baseIsTypedArray = require('./_baseIsTypedArray'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\nmodule.exports = isTypedArray;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeys = require('./_baseKeys'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\nmodule.exports = keys;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeysIn = require('./_baseKeysIn'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\nfunction keysIn(object) {\n return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n}\n\nmodule.exports = keysIn;\n","/**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\nfunction stubArray() {\n return [];\n}\n\nmodule.exports = stubArray;\n","/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n return false;\n}\n\nmodule.exports = stubFalse;\n","import { connect, type BaseConnectionOptions } from \"@openfin/core-web\";\nimport { getSettings } from \"../platform/settings/settings\";\n\n/**\n * Initializes the OpenFin Web Broker connection.\n * @param inherit Should we inherit settings from the host (available in the OpenFin layout system) or use settings? Default is true.\n */\nexport async function init(inherit: boolean = true): Promise {\n\t// Set window.fin to the `fin` object.\n\tlet options: BaseConnectionOptions | undefined;\n\tif (window.fin === undefined) {\n\t\tif (!inherit) {\n\t\t\tconst settings = await getSettings();\n\t\t\tif (settings === undefined) {\n\t\t\t\tconsole.error(\n\t\t\t\t\t\"Unable to run the sample as we have been unable to load the web manifest and it's settings from the currently running html page. Please ensure that the web manifest is being served and that it contains the custom_settings section.\"\n\t\t\t\t);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\toptions = {\n\t\t\t\tbrokerUrl: settings.platform.interop.brokerUrl,\n\t\t\t\tinteropConfig: {\n\t\t\t\t\tproviderId: settings.platform.interop.providerId,\n\t\t\t\t\tcurrentContextGroup: settings.platform.interop.defaultContextGroup\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t\t// Specify an interopConfig with a specific provider ID and a context group to initialize the `fin.me.interop` client on connection.\n\t\tif (options) {\n\t\t\twindow.fin = await connect({\n\t\t\t\toptions\n\t\t\t});\n\t\t} else {\n\t\t\twindow.fin = await connect({\n\t\t\t\tconnectionInheritance: \"enabled\"\n\t\t\t});\n\t\t}\n\t\tconsole.log(\"Finished initializing the fin API.\");\n\t\t// Create and dispatch the finReady event\n\t\tconst event = new CustomEvent(\"finReady\");\n\t\twindow.dispatchEvent(event);\n\t}\n\n\tif (window.fdc3 === undefined && window?.fin?.me.interop?.getFDC3Sync !== undefined) {\n\t\twindow.fdc3 = fin.me.interop.getFDC3Sync(\"2.0\");\n\t\tconsole.log(\"Finished initializing the fdc3 API.\");\n\t\t// Create and dispatch the FDC3Ready event\n\t\tconst event = new CustomEvent(\"fdc3Ready\");\n\t\twindow.dispatchEvent(event);\n\t}\n}\n","import type { OpenFin } from \"@openfin/core\";\nimport type { ManifestSettings, Settings } from \"../../shapes/setting-shapes\";\n\n/**\n * Fetches the settings for the application.\n * @returns The settings for the application.\n */\nexport async function getSettings(): Promise {\n\tconst savedSettings = await getSavedSettings();\n\tif (savedSettings) {\n\t\treturn savedSettings;\n\t}\n\tconst settings = await getManifestSettings();\n\tif (!Array.isArray(settings?.endpointProvider?.endpoints)) {\n\t\tconsole.error(\n\t\t\t\"Unable to run the example as settings are required and we fetch them from the link web manifest from the html page that is being served. It should exist in the customSettings section of the web manifest.\"\n\t\t);\n\t\treturn;\n\t}\n\tconst settingsEndpoint = settings.endpointProvider.endpoints.find(\n\t\t(endpoint) => endpoint.id === \"platform-settings\"\n\t);\n\n\tif (\n\t\tsettingsEndpoint === undefined ||\n\t\tsettingsEndpoint.type !== \"fetch\" ||\n\t\tsettingsEndpoint.options.method !== \"GET\" ||\n\t\tsettingsEndpoint.options.url === undefined\n\t) {\n\t\tconsole.error(\n\t\t\t\"Unable to run the example as settings are required and we fetch them from the endpoint defined with the id: 'platform-settings' in the manifest. It needs to be of type fetch, performing a GET and it must have a url defined.\"\n\t\t);\n\t\treturn;\n\t}\n\tconst platformSettings = await fetch(settingsEndpoint?.options.url);\n\tconst settingsJson = (await platformSettings.json()) as Settings;\n\treturn settingsJson;\n}\n\n/**\n * Returns a default layout from the settings if provided.\n * @returns The default layout from the settings.\n */\nexport async function getDefaultLayout(): Promise {\n\tconst settings = await getSettings();\n\tif (settings?.platform?.layout?.defaultLayout === undefined) {\n\t\tconsole.error(\n\t\t\t\"Unable to run the example as without a layout being defined. Please ensure that settings have been provided in the web manifest.\"\n\t\t);\n\t\treturn;\n\t}\n\tif (typeof settings.platform.layout.defaultLayout === \"string\") {\n\t\tconst layoutResponse = await fetch(settings.platform.layout.defaultLayout);\n\t\tconst layoutJson = (await layoutResponse.json()) as OpenFin.LayoutSnapshot;\n\t\treturn layoutJson;\n\t}\n\treturn settings.platform.layout.defaultLayout;\n}\n\n/**\n * Returns the settings from the manifest file.\n * @returns customSettings for this example\n */\nasync function getManifestSettings(): Promise {\n\t// Get the manifest link\n\tconst link = document.querySelector('link[rel=\"manifest\"]');\n\tif (link !== null) {\n\t\tconst manifestResponse = await fetch(link.href);\n\t\tconst manifestJson = (await manifestResponse.json()) as { custom_settings: ManifestSettings };\n\t\treturn manifestJson.custom_settings;\n\t}\n}\n\n/**\n * Clears any saved settings.\n * @returns The saved settings.\n */\nexport async function clearSettings(): Promise {\n\tconst settingsId = getSavedSettingsId();\n\tlocalStorage.removeItem(settingsId);\n}\n\n/**\n * Saves the settings.\n * @param settings The settings to save.\n */\nexport async function saveSettings(settings: Settings): Promise {\n\tconst settingsId = getSavedSettingsId();\n\tlocalStorage.setItem(settingsId, JSON.stringify(settings));\n}\n\n/**\n * Retrieves saved settings from local storage.\n * @returns The saved settings.\n */\nasync function getSavedSettings(): Promise {\n\tconst settingsId = getSavedSettingsId();\n\tconst settings = localStorage.getItem(settingsId);\n\tif (settings !== null) {\n\t\treturn JSON.parse(settings);\n\t}\n}\n\n/**\n * Get the Id used for saving and fetching settings from storage.\n * @returns The settings id.\n */\nfunction getSavedSettingsId(): string {\n\tconst urlParams = new URLSearchParams(window.location.search);\n\tconst env = urlParams.get(\"env\");\n\n\tconst settingsKey = env ? `${env}-settings` : \"settings\";\n\treturn settingsKey;\n}\n","export { default as v1 } from './v1.js';\nexport { default as v3 } from './v3.js';\nexport { default as v4 } from './v4.js';\nexport { default as v5 } from './v5.js';\nexport { default as NIL } from './nil.js';\nexport { default as version } from './version.js';\nexport { default as validate } from './validate.js';\nexport { default as stringify } from './stringify.js';\nexport { default as parse } from './parse.js';","/*\n * Browser-compatible JavaScript MD5\n *\n * Modification of JavaScript MD5\n * https://github.com/blueimp/JavaScript-MD5\n *\n * Copyright 2011, Sebastian Tschan\n * https://blueimp.net\n *\n * Licensed under the MIT license:\n * https://opensource.org/licenses/MIT\n *\n * Based on\n * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message\n * Digest Algorithm, as defined in RFC 1321.\n * Version 2.2 Copyright (C) Paul Johnston 1999 - 2009\n * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet\n * Distributed under the BSD License\n * See http://pajhome.org.uk/crypt/md5 for more info.\n */\nfunction md5(bytes) {\n if (typeof bytes === 'string') {\n var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape\n\n bytes = new Uint8Array(msg.length);\n\n for (var i = 0; i < msg.length; ++i) {\n bytes[i] = msg.charCodeAt(i);\n }\n }\n\n return md5ToHexEncodedArray(wordsToMd5(bytesToWords(bytes), bytes.length * 8));\n}\n/*\n * Convert an array of little-endian words to an array of bytes\n */\n\n\nfunction md5ToHexEncodedArray(input) {\n var output = [];\n var length32 = input.length * 32;\n var hexTab = '0123456789abcdef';\n\n for (var i = 0; i < length32; i += 8) {\n var x = input[i >> 5] >>> i % 32 & 0xff;\n var hex = parseInt(hexTab.charAt(x >>> 4 & 0x0f) + hexTab.charAt(x & 0x0f), 16);\n output.push(hex);\n }\n\n return output;\n}\n/**\n * Calculate output length with padding and bit length\n */\n\n\nfunction getOutputLength(inputLength8) {\n return (inputLength8 + 64 >>> 9 << 4) + 14 + 1;\n}\n/*\n * Calculate the MD5 of an array of little-endian words, and a bit length.\n */\n\n\nfunction wordsToMd5(x, len) {\n /* append padding */\n x[len >> 5] |= 0x80 << len % 32;\n x[getOutputLength(len) - 1] = len;\n var a = 1732584193;\n var b = -271733879;\n var c = -1732584194;\n var d = 271733878;\n\n for (var i = 0; i < x.length; i += 16) {\n var olda = a;\n var oldb = b;\n var oldc = c;\n var oldd = d;\n a = md5ff(a, b, c, d, x[i], 7, -680876936);\n d = md5ff(d, a, b, c, x[i + 1], 12, -389564586);\n c = md5ff(c, d, a, b, x[i + 2], 17, 606105819);\n b = md5ff(b, c, d, a, x[i + 3], 22, -1044525330);\n a = md5ff(a, b, c, d, x[i + 4], 7, -176418897);\n d = md5ff(d, a, b, c, x[i + 5], 12, 1200080426);\n c = md5ff(c, d, a, b, x[i + 6], 17, -1473231341);\n b = md5ff(b, c, d, a, x[i + 7], 22, -45705983);\n a = md5ff(a, b, c, d, x[i + 8], 7, 1770035416);\n d = md5ff(d, a, b, c, x[i + 9], 12, -1958414417);\n c = md5ff(c, d, a, b, x[i + 10], 17, -42063);\n b = md5ff(b, c, d, a, x[i + 11], 22, -1990404162);\n a = md5ff(a, b, c, d, x[i + 12], 7, 1804603682);\n d = md5ff(d, a, b, c, x[i + 13], 12, -40341101);\n c = md5ff(c, d, a, b, x[i + 14], 17, -1502002290);\n b = md5ff(b, c, d, a, x[i + 15], 22, 1236535329);\n a = md5gg(a, b, c, d, x[i + 1], 5, -165796510);\n d = md5gg(d, a, b, c, x[i + 6], 9, -1069501632);\n c = md5gg(c, d, a, b, x[i + 11], 14, 643717713);\n b = md5gg(b, c, d, a, x[i], 20, -373897302);\n a = md5gg(a, b, c, d, x[i + 5], 5, -701558691);\n d = md5gg(d, a, b, c, x[i + 10], 9, 38016083);\n c = md5gg(c, d, a, b, x[i + 15], 14, -660478335);\n b = md5gg(b, c, d, a, x[i + 4], 20, -405537848);\n a = md5gg(a, b, c, d, x[i + 9], 5, 568446438);\n d = md5gg(d, a, b, c, x[i + 14], 9, -1019803690);\n c = md5gg(c, d, a, b, x[i + 3], 14, -187363961);\n b = md5gg(b, c, d, a, x[i + 8], 20, 1163531501);\n a = md5gg(a, b, c, d, x[i + 13], 5, -1444681467);\n d = md5gg(d, a, b, c, x[i + 2], 9, -51403784);\n c = md5gg(c, d, a, b, x[i + 7], 14, 1735328473);\n b = md5gg(b, c, d, a, x[i + 12], 20, -1926607734);\n a = md5hh(a, b, c, d, x[i + 5], 4, -378558);\n d = md5hh(d, a, b, c, x[i + 8], 11, -2022574463);\n c = md5hh(c, d, a, b, x[i + 11], 16, 1839030562);\n b = md5hh(b, c, d, a, x[i + 14], 23, -35309556);\n a = md5hh(a, b, c, d, x[i + 1], 4, -1530992060);\n d = md5hh(d, a, b, c, x[i + 4], 11, 1272893353);\n c = md5hh(c, d, a, b, x[i + 7], 16, -155497632);\n b = md5hh(b, c, d, a, x[i + 10], 23, -1094730640);\n a = md5hh(a, b, c, d, x[i + 13], 4, 681279174);\n d = md5hh(d, a, b, c, x[i], 11, -358537222);\n c = md5hh(c, d, a, b, x[i + 3], 16, -722521979);\n b = md5hh(b, c, d, a, x[i + 6], 23, 76029189);\n a = md5hh(a, b, c, d, x[i + 9], 4, -640364487);\n d = md5hh(d, a, b, c, x[i + 12], 11, -421815835);\n c = md5hh(c, d, a, b, x[i + 15], 16, 530742520);\n b = md5hh(b, c, d, a, x[i + 2], 23, -995338651);\n a = md5ii(a, b, c, d, x[i], 6, -198630844);\n d = md5ii(d, a, b, c, x[i + 7], 10, 1126891415);\n c = md5ii(c, d, a, b, x[i + 14], 15, -1416354905);\n b = md5ii(b, c, d, a, x[i + 5], 21, -57434055);\n a = md5ii(a, b, c, d, x[i + 12], 6, 1700485571);\n d = md5ii(d, a, b, c, x[i + 3], 10, -1894986606);\n c = md5ii(c, d, a, b, x[i + 10], 15, -1051523);\n b = md5ii(b, c, d, a, x[i + 1], 21, -2054922799);\n a = md5ii(a, b, c, d, x[i + 8], 6, 1873313359);\n d = md5ii(d, a, b, c, x[i + 15], 10, -30611744);\n c = md5ii(c, d, a, b, x[i + 6], 15, -1560198380);\n b = md5ii(b, c, d, a, x[i + 13], 21, 1309151649);\n a = md5ii(a, b, c, d, x[i + 4], 6, -145523070);\n d = md5ii(d, a, b, c, x[i + 11], 10, -1120210379);\n c = md5ii(c, d, a, b, x[i + 2], 15, 718787259);\n b = md5ii(b, c, d, a, x[i + 9], 21, -343485551);\n a = safeAdd(a, olda);\n b = safeAdd(b, oldb);\n c = safeAdd(c, oldc);\n d = safeAdd(d, oldd);\n }\n\n return [a, b, c, d];\n}\n/*\n * Convert an array bytes to an array of little-endian words\n * Characters >255 have their high-byte silently ignored.\n */\n\n\nfunction bytesToWords(input) {\n if (input.length === 0) {\n return [];\n }\n\n var length8 = input.length * 8;\n var output = new Uint32Array(getOutputLength(length8));\n\n for (var i = 0; i < length8; i += 8) {\n output[i >> 5] |= (input[i / 8] & 0xff) << i % 32;\n }\n\n return output;\n}\n/*\n * Add integers, wrapping at 2^32. This uses 16-bit operations internally\n * to work around bugs in some JS interpreters.\n */\n\n\nfunction safeAdd(x, y) {\n var lsw = (x & 0xffff) + (y & 0xffff);\n var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n return msw << 16 | lsw & 0xffff;\n}\n/*\n * Bitwise rotate a 32-bit number to the left.\n */\n\n\nfunction bitRotateLeft(num, cnt) {\n return num << cnt | num >>> 32 - cnt;\n}\n/*\n * These functions implement the four basic operations the algorithm uses.\n */\n\n\nfunction md5cmn(q, a, b, x, s, t) {\n return safeAdd(bitRotateLeft(safeAdd(safeAdd(a, q), safeAdd(x, t)), s), b);\n}\n\nfunction md5ff(a, b, c, d, x, s, t) {\n return md5cmn(b & c | ~b & d, a, b, x, s, t);\n}\n\nfunction md5gg(a, b, c, d, x, s, t) {\n return md5cmn(b & d | c & ~d, a, b, x, s, t);\n}\n\nfunction md5hh(a, b, c, d, x, s, t) {\n return md5cmn(b ^ c ^ d, a, b, x, s, t);\n}\n\nfunction md5ii(a, b, c, d, x, s, t) {\n return md5cmn(c ^ (b | ~d), a, b, x, s, t);\n}\n\nexport default md5;","export default '00000000-0000-0000-0000-000000000000';","import validate from './validate.js';\n\nfunction parse(uuid) {\n if (!validate(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n var v;\n var arr = new Uint8Array(16); // Parse ########-....-....-....-............\n\n arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24;\n arr[1] = v >>> 16 & 0xff;\n arr[2] = v >>> 8 & 0xff;\n arr[3] = v & 0xff; // Parse ........-####-....-....-............\n\n arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8;\n arr[5] = v & 0xff; // Parse ........-....-####-....-............\n\n arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8;\n arr[7] = v & 0xff; // Parse ........-....-....-####-............\n\n arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8;\n arr[9] = v & 0xff; // Parse ........-....-....-....-############\n // (Use \"/\" to avoid 32-bit truncation when bit-shifting high-order bytes)\n\n arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff;\n arr[11] = v / 0x100000000 & 0xff;\n arr[12] = v >>> 24 & 0xff;\n arr[13] = v >>> 16 & 0xff;\n arr[14] = v >>> 8 & 0xff;\n arr[15] = v & 0xff;\n return arr;\n}\n\nexport default parse;","export default /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;","// Unique ID creation requires a high quality random # generator. In the browser we therefore\n// require the crypto API and do not support built-in fallback to lower quality random number\n// generators (like Math.random()).\nvar getRandomValues;\nvar rnds8 = new Uint8Array(16);\nexport default function rng() {\n // lazy load so that environments that need to polyfill have a chance to do so\n if (!getRandomValues) {\n // getRandomValues needs to be invoked in a context where \"this\" is a Crypto implementation. Also,\n // find the complete implementation of crypto (msCrypto) on IE11.\n getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto !== 'undefined' && typeof msCrypto.getRandomValues === 'function' && msCrypto.getRandomValues.bind(msCrypto);\n\n if (!getRandomValues) {\n throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');\n }\n }\n\n return getRandomValues(rnds8);\n}","// Adapted from Chris Veness' SHA1 code at\n// http://www.movable-type.co.uk/scripts/sha1.html\nfunction f(s, x, y, z) {\n switch (s) {\n case 0:\n return x & y ^ ~x & z;\n\n case 1:\n return x ^ y ^ z;\n\n case 2:\n return x & y ^ x & z ^ y & z;\n\n case 3:\n return x ^ y ^ z;\n }\n}\n\nfunction ROTL(x, n) {\n return x << n | x >>> 32 - n;\n}\n\nfunction sha1(bytes) {\n var K = [0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xca62c1d6];\n var H = [0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0];\n\n if (typeof bytes === 'string') {\n var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape\n\n bytes = [];\n\n for (var i = 0; i < msg.length; ++i) {\n bytes.push(msg.charCodeAt(i));\n }\n } else if (!Array.isArray(bytes)) {\n // Convert Array-like to Array\n bytes = Array.prototype.slice.call(bytes);\n }\n\n bytes.push(0x80);\n var l = bytes.length / 4 + 2;\n var N = Math.ceil(l / 16);\n var M = new Array(N);\n\n for (var _i = 0; _i < N; ++_i) {\n var arr = new Uint32Array(16);\n\n for (var j = 0; j < 16; ++j) {\n arr[j] = bytes[_i * 64 + j * 4] << 24 | bytes[_i * 64 + j * 4 + 1] << 16 | bytes[_i * 64 + j * 4 + 2] << 8 | bytes[_i * 64 + j * 4 + 3];\n }\n\n M[_i] = arr;\n }\n\n M[N - 1][14] = (bytes.length - 1) * 8 / Math.pow(2, 32);\n M[N - 1][14] = Math.floor(M[N - 1][14]);\n M[N - 1][15] = (bytes.length - 1) * 8 & 0xffffffff;\n\n for (var _i2 = 0; _i2 < N; ++_i2) {\n var W = new Uint32Array(80);\n\n for (var t = 0; t < 16; ++t) {\n W[t] = M[_i2][t];\n }\n\n for (var _t = 16; _t < 80; ++_t) {\n W[_t] = ROTL(W[_t - 3] ^ W[_t - 8] ^ W[_t - 14] ^ W[_t - 16], 1);\n }\n\n var a = H[0];\n var b = H[1];\n var c = H[2];\n var d = H[3];\n var e = H[4];\n\n for (var _t2 = 0; _t2 < 80; ++_t2) {\n var s = Math.floor(_t2 / 20);\n var T = ROTL(a, 5) + f(s, b, c, d) + e + K[s] + W[_t2] >>> 0;\n e = d;\n d = c;\n c = ROTL(b, 30) >>> 0;\n b = a;\n a = T;\n }\n\n H[0] = H[0] + a >>> 0;\n H[1] = H[1] + b >>> 0;\n H[2] = H[2] + c >>> 0;\n H[3] = H[3] + d >>> 0;\n H[4] = H[4] + e >>> 0;\n }\n\n return [H[0] >> 24 & 0xff, H[0] >> 16 & 0xff, H[0] >> 8 & 0xff, H[0] & 0xff, H[1] >> 24 & 0xff, H[1] >> 16 & 0xff, H[1] >> 8 & 0xff, H[1] & 0xff, H[2] >> 24 & 0xff, H[2] >> 16 & 0xff, H[2] >> 8 & 0xff, H[2] & 0xff, H[3] >> 24 & 0xff, H[3] >> 16 & 0xff, H[3] >> 8 & 0xff, H[3] & 0xff, H[4] >> 24 & 0xff, H[4] >> 16 & 0xff, H[4] >> 8 & 0xff, H[4] & 0xff];\n}\n\nexport default sha1;","import validate from './validate.js';\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\n\nvar byteToHex = [];\n\nfor (var i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).substr(1));\n}\n\nfunction stringify(arr) {\n var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n var uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!validate(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n\n return uuid;\n}\n\nexport default stringify;","import rng from './rng.js';\nimport stringify from './stringify.js'; // **`v1()` - Generate time-based UUID**\n//\n// Inspired by https://github.com/LiosK/UUID.js\n// and http://docs.python.org/library/uuid.html\n\nvar _nodeId;\n\nvar _clockseq; // Previous uuid creation time\n\n\nvar _lastMSecs = 0;\nvar _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details\n\nfunction v1(options, buf, offset) {\n var i = buf && offset || 0;\n var b = buf || new Array(16);\n options = options || {};\n var node = options.node || _nodeId;\n var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not\n // specified. We do this lazily to minimize issues related to insufficient\n // system entropy. See #189\n\n if (node == null || clockseq == null) {\n var seedBytes = options.random || (options.rng || rng)();\n\n if (node == null) {\n // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)\n node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]];\n }\n\n if (clockseq == null) {\n // Per 4.2.2, randomize (14 bit) clockseq\n clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;\n }\n } // UUID timestamps are 100 nano-second units since the Gregorian epoch,\n // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so\n // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'\n // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.\n\n\n var msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock\n // cycle to simulate higher resolution clock\n\n var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs)\n\n var dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression\n\n if (dt < 0 && options.clockseq === undefined) {\n clockseq = clockseq + 1 & 0x3fff;\n } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new\n // time interval\n\n\n if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {\n nsecs = 0;\n } // Per 4.2.1.2 Throw error if too many uuids are requested\n\n\n if (nsecs >= 10000) {\n throw new Error(\"uuid.v1(): Can't create more than 10M uuids/sec\");\n }\n\n _lastMSecs = msecs;\n _lastNSecs = nsecs;\n _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch\n\n msecs += 12219292800000; // `time_low`\n\n var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;\n b[i++] = tl >>> 24 & 0xff;\n b[i++] = tl >>> 16 & 0xff;\n b[i++] = tl >>> 8 & 0xff;\n b[i++] = tl & 0xff; // `time_mid`\n\n var tmh = msecs / 0x100000000 * 10000 & 0xfffffff;\n b[i++] = tmh >>> 8 & 0xff;\n b[i++] = tmh & 0xff; // `time_high_and_version`\n\n b[i++] = tmh >>> 24 & 0xf | 0x10; // include version\n\n b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)\n\n b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low`\n\n b[i++] = clockseq & 0xff; // `node`\n\n for (var n = 0; n < 6; ++n) {\n b[i + n] = node[n];\n }\n\n return buf || stringify(b);\n}\n\nexport default v1;","import v35 from './v35.js';\nimport md5 from './md5.js';\nvar v3 = v35('v3', 0x30, md5);\nexport default v3;","import stringify from './stringify.js';\nimport parse from './parse.js';\n\nfunction stringToBytes(str) {\n str = unescape(encodeURIComponent(str)); // UTF8 escape\n\n var bytes = [];\n\n for (var i = 0; i < str.length; ++i) {\n bytes.push(str.charCodeAt(i));\n }\n\n return bytes;\n}\n\nexport var DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8';\nexport var URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8';\nexport default function (name, version, hashfunc) {\n function generateUUID(value, namespace, buf, offset) {\n if (typeof value === 'string') {\n value = stringToBytes(value);\n }\n\n if (typeof namespace === 'string') {\n namespace = parse(namespace);\n }\n\n if (namespace.length !== 16) {\n throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)');\n } // Compute hash of namespace and value, Per 4.3\n // Future: Use spread syntax when supported on all platforms, e.g. `bytes =\n // hashfunc([...namespace, ... value])`\n\n\n var bytes = new Uint8Array(16 + value.length);\n bytes.set(namespace);\n bytes.set(value, namespace.length);\n bytes = hashfunc(bytes);\n bytes[6] = bytes[6] & 0x0f | version;\n bytes[8] = bytes[8] & 0x3f | 0x80;\n\n if (buf) {\n offset = offset || 0;\n\n for (var i = 0; i < 16; ++i) {\n buf[offset + i] = bytes[i];\n }\n\n return buf;\n }\n\n return stringify(bytes);\n } // Function#name is not settable on some platforms (#270)\n\n\n try {\n generateUUID.name = name; // eslint-disable-next-line no-empty\n } catch (err) {} // For CommonJS default export support\n\n\n generateUUID.DNS = DNS;\n generateUUID.URL = URL;\n return generateUUID;\n}","import rng from './rng.js';\nimport stringify from './stringify.js';\n\nfunction v4(options, buf, offset) {\n options = options || {};\n var rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n offset = offset || 0;\n\n for (var i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n\n return buf;\n }\n\n return stringify(rnds);\n}\n\nexport default v4;","import v35 from './v35.js';\nimport sha1 from './sha1.js';\nvar v5 = v35('v5', 0x50, sha1);\nexport default v5;","import REGEX from './regex.js';\n\nfunction validate(uuid) {\n return typeof uuid === 'string' && REGEX.test(uuid);\n}\n\nexport default validate;","import validate from './validate.js';\n\nfunction version(uuid) {\n if (!validate(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n return parseInt(uuid.substr(14, 1), 16);\n}\n\nexport default version;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = (module) => {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","import type { Context } from \"@finos/fdc3\";\nimport { init } from \"./api\";\n\nwindow.addEventListener(\"DOMContentLoaded\", async () => {\n\tawait init(true);\n\tawait initializeDOM();\n});\n\n/**\n * Raise an intent using the interop API.\n */\nasync function raiseIntent(): Promise {\n\tif (window.fin !== undefined) {\n\t\tconst context = {\n\t\t\ttype: \"fdc3.contact\",\n\t\t\tname: \"Andy Young\",\n\t\t\tid: {\n\t\t\t\temail: \"andy.young@example.com\"\n\t\t\t}\n\t\t};\n\t\tconst intent = \"ViewContact\";\n\t\tconst intentRequest = {\n\t\t\tname: intent,\n\t\t\tcontext\n\t\t};\n\t\tconst intentResolver = await fin.me.interop.fireIntent(intentRequest);\n\t\tif (intentResolver !== undefined) {\n\t\t\tconsole.log(\"Intent resolver received:\", intentResolver);\n\t\t}\n\t}\n}\n\n/**\n * Adds an interop intent listener to the window.\n */\nasync function addIntentListener(): Promise {\n\tconst intent = \"ViewContact\";\n\tif (window.fin) {\n\t\tawait fin.me.interop.registerIntentHandler((passedIntent) => {\n\t\t\tconsole.log(`Received Context For Intent: ${passedIntent.name}`, passedIntent.context);\n\t\t\tupdateDOMElements(passedIntent.context);\n\t\t}, intent);\n\t} else {\n\t\twindow.addEventListener(\"finReady\", async () => {\n\t\t\tif (window.fin) {\n\t\t\t\tawait fin.me.interop.registerIntentHandler((passedIntent) => {\n\t\t\t\t\tconsole.log(`Received Context For Intent: ${passedIntent.name}`, passedIntent.context);\n\t\t\t\t\tupdateDOMElements(passedIntent.context);\n\t\t\t\t}, intent);\n\t\t\t}\n\t\t});\n\t}\n}\n\n/**\n * Updates the DOM elements with the provided context.\n * @param context The context to update the DOM elements with.\n */\nfunction updateDOMElements(context: Context): void {\n\tconst contextTypeSpan = document.querySelector(\"#contextType\");\n\tconst contextNameSpan = document.querySelector(\"#contextName\");\n\tconst contextBodyPre = document.querySelector(\"#contextBody\");\n\n\tif (contextTypeSpan !== null && contextNameSpan !== null && contextBodyPre !== null) {\n\t\tcontextTypeSpan.textContent = context.type;\n\t\tcontextNameSpan.textContent = context.name ?? \"No name provided.\";\n\t\tcontextBodyPre.textContent = JSON.stringify(context, null, 2);\n\t}\n}\n\n/**\n * Initialize the DOM elements.\n */\nasync function initializeDOM(): Promise {\n\tconst raiseIntentButton = document.querySelector(\"#raiseIntent\");\n\n\tif (raiseIntentButton !== null) {\n\t\traiseIntentButton.addEventListener(\"click\", async () => {\n\t\t\tawait raiseIntent();\n\t\t});\n\t}\n\n\tawait addIntentListener();\n}\n"],"names":[],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"interop-intent-view.bundle.js","mappings":";;;;;;;;;;AAAa,MAAM,mBAAO,CAAC,qFAAoB,EAAE,mBAAO,CAAC,mDAAS,EAAE,mBAAO,CAAC,+DAAM,EAAE,mBAAO,CAAC,mDAAQ,EAAE,mBAAO,CAAC,gEAAkB,EAAE,mBAAO,CAAC,4DAAgB,EAAE,eAAe;;;;;;;;;;;;ACA9J,MAAM,mBAAO,CAAC,mDAAS,IAAI,mBAAO,CAAC,mDAAQ,IAAI,mBAAO,CAAC,gEAAkB,IAAI,mBAAO,CAAC,4DAAgB,IAAI,mBAAO,CAAC,+DAAM,EAAE,kBAAkB,EAAE,GAAG,wBAAwB,GAAG,sGAAsG,qBAAM,CAAC,qBAAM,iCAAiC,KAAK,KAAK,KAAK,MAAM,oBAAoB,WAAW,kBAAkB,kBAAkB,UAAU,SAAS,sCAAsC,SAAS,sFAAsF,mCAAmC,6B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Fv6nD;;AAEZ,kBAAkB;AAClB,mBAAmB;AACnB,qBAAqB;;AAErB;AACA;AACA;;AAEA;AACA,mCAAmC,SAAS;AAC5C;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,cAAc,SAAS;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,2CAA2C,UAAU;AACrD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;ACrJA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEY;;AAEZ,eAAe,mBAAO,CAAC,wDAAW;AAClC,gBAAgB,mBAAO,CAAC,oDAAS;AACjC;AACA;AACA;AACA;;AAEA,cAAc;AACd,kBAAkB;AAClB,yBAAyB;;AAEzB;AACA,kBAAkB;;AAElB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,kBAAkB,YAAY;AAC9B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA,wCAAwC,SAAS;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;;AAEA;AACA;AACA,cAAc,iBAAiB;AAC/B;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,iDAAiD,EAAE;AACnD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C;AAC1C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA,yBAAyB,eAAe;AACxC;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,yBAAyB,QAAQ;AACjC;AACA,sBAAsB,eAAe;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc,YAAY;AAC1B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB,sBAAsB;AACxC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,mBAAmB;AACnB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA,oBAAoB,SAAS;AAC7B;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA,qBAAqB,WAAW,GAAG,IAAI;AACvC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA,gBAAgB,WAAW,GAAG,IAAI,KAAK,aAAa;AACpD;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;;AAEA;AACA,GAAG;AACH;AACA;AACA,mBAAmB,KAAK,mDAAmD,cAAc;AACzF,GAAG;AACH;AACA;AACA,+BAA+B,IAAI;AACnC;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,MAAM,aAAa,SAAS;AACtD;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,SAAS,gBAAgB;AACzB,cAAc,oBAAoB,EAAE,IAAI;AACxC;AACA,YAAY,gBAAgB,EAAE,IAAI;AAClC;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,GAAG,SAAS,GAAG,KAAK,qBAAqB,EAAE,EAAE;AACpE,QAAQ;AACR,yBAAyB,GAAG,KAAK,yBAAyB,EAAE,EAAE;AAC9D,mBAAmB,yBAAyB,EAAE,EAAE;AAChD;AACA,MAAM;AACN,oBAAoB,IAAI,EAAE,GAAG,SAAS,IAAI,EAAE,EAAE;AAC9C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,0CAA0C,cAAc,SAAS,OAAO;AACxE;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,kBAAkB,YAAY;AAC9B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,kBAAkB,gBAAgB;AAClC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,kBAAkB,gBAAgB;AAClC;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,cAAc,YAAY;AAC1B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,QAAQ;AAC1B;AACA,oBAAoB,QAAQ;AAC5B;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;;;;;ACzjEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEa;;AAEb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB;;AAEnB;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,sBAAsB;AACxC;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA,eAAe;AACf;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA,oBAAoB,SAAS;AAC7B;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;;AAEA,kCAAkC,QAAQ;AAC1C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oBAAoB,iBAAiB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,QAAQ;AACR;AACA,uCAAuC,QAAQ;AAC/C;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,OAAO;AACzB;AACA;AACA;;AAEA;AACA,SAAS,yBAAyB;AAClC;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,gBAAgB;AAClC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,8DAA8D,YAAY;AAC1E;AACA,8DAA8D,YAAY;AAC1E;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,qCAAqC,YAAY;AACjD;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;AACA;;;;;;;;;;;AChfA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,SAAS,WAAW;;AAEpB;AACA;AACA;AACA,SAAS,WAAW;;AAEpB;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA,SAAS,WAAW;;AAEpB;AACA;AACA,SAAS,UAAU;;AAEnB;AACA;;;;;;;;;;;ACpFA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,WAAW,mBAAO,CAAC,mDAAS;;AAE5B;AACA;;AAEA;;;;;;;;;;;ACNA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,iBAAiB,mB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O,CAAC,yDAAY;AACnC,cAAc,mBAAO,CAAC,yDAAY;AAClC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,SAAS;AACpB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AChDA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACnBA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,UAAU;AACrB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACtBA,sBAAsB,mBAAO,CAAC,yEAAoB;AAClD,SAAS,mBAAO,CAAC,6CAAM;;AAEvB;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC3BA,SAAS,mBAAO,CAAC,6CAAM;;AAEvB;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpBA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,WAAW,mBAAO,CAAC,iDAAQ;;AAE3B;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAE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ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,SAAS;AACpB;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa,GAAG;AAChB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;AACA,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;;;;;;;;;;ACrKA,eAAe,mBAAO,CAAC,yDAAY;;AAEnC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;;;;;;;;;;AC7BA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,cAAc,mBAAO,CAAC,uDAAW;;AAEjC;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACnBA,aAAa,mBAAO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AEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClFA,aAAa,mBAAO,CAAC,uDAAW;AAChC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA,iBAAiB,mBAAO,CAAC,6DAAc;AACvC,eAAe,mBAAO,CAAC,2DAAa;AACpC,eAAe,mBAAO,CAAC,yDAAY;AACnC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;AACA;AACA;AACA,oCAAoC;;AAEpC;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC9CA,aAAa,mBAAO,CAAC,uDAAW;AAChC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,eAAe,mBAAO,CAAC,yDAAY;AACnC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AAC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DAAe;AACxC,SAAS,mBAAO,CAAC,6CAAM;AACvB,kBAAkB,mBAAO,CAAC,iEAAgB;AAC1C,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC/GA,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACdA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AChBA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,GAAG;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC7BA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACtBA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACtBA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACzBA,uBAAuB,mBAAO,CAAC,2EAAqB;AACpD,oBAAoB,mBAAO,CAAC,qEAAkB;AAC9C,kBAAkB,mBAAO,CAAC,iEAAgB;AAC1C,kBAAkB,mBAAO,CAAC,iEAAgB;AAC1C,sBAAsB,mBAAO,CAAC,yEAAoB;;AAElD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC5EA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,mBAAmB,mBAAO,CAAC,mEAAiB;AAC5C,kBAAkB,mBAAO,CAAC,iEAAgB;;AAE1C;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACxBA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACdA,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACnBA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACZA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aA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ACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACbA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;;;;;;;;;;ACjBA,gBAAgB,mBAAO,CAAC,6DAAc;;AAEtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACdA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,GAAG;AAChB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACbA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACbA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,UAAU,mBAAO,CAAC,iDAAQ;AAC1B,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjCA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;;;;;;;;;;;ACzBA,gBAAgB,mBAAO,CAAC,6DAAc;;AAEtC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,GAAG;AAChB;AACA;AACA;AACA,oBAAoB,QAAQ,IAAI,QAAQ;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,kBAAkB;AAClB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpCA,sBAAsB,mBAAO,CAAC,yEAAoB;AAClD,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA,8BAA8B,mBAAmB;AACjD;AACA;AACA;AACA;AACA;AACA,+CAA+C,mBAAmB;AAClE;AACA;AACA;;AAEA;;;;;;;;;;;ACnCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACzBA,iBAAiB,mBAAO,CAAC,6DAAc;AACvC,eAAe,mBAAO,CAAC,yDAAY;;AAEnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AChCA,WAAW,mBAAO,CAAC,mDAAS;AAC5B,gBAAgB,mBAAO,CAAC,2DAAa;;AAErC;AACA,kBAAkB,KAA0B;;AAE5C;AACA,gCAAgC,QAAa;;AAE7C;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACrCA,kBAAkB,mBAAO,CAAC,iEAAgB;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,kBAAkB;AAClB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClCA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,eAAe,mBAAO,CAAC,yDAAY;;AAEnC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpCA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClCA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC1BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC9BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC5BA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC1BA,uBAAuB,mBAAO,CAAC,2EAAqB;AACpD,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC1BA,oBAAoB,mBAAO,CAAC,qEAAkB;AAC9C,eAAe,mBAAO,CAAC,2DAAa;AACpC,kBAAkB,mBAAO,CAAC,+DAAe;;AAEzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpCA,oBAAoB,mBAAO,CAAC,qEAAkB;AAC9C,iBAAiB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,CAAC,CAAC,UAAU,CAAC;IACzD,OAAO,WAAW,CAAC;AACpB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACjHuC;AACA;AACA;AACA;AACE;AACQ;AACE;AACE;;;;;;;;;;;;;;;;ACPtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD;;AAEnD;;AAEA,oBAAoB,gBAAgB;AACpC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA,kBAAkB,cAAc;AAChC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,kBAAkB,cAAc;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,kBAAkB,aAAa;AAC/B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,iEAAe,GAAG;;;;;;;;;;;;;;;ACtNl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CAAC,CAAC;IAChF,MAAM,eAAe,GAAG,QAAQ,CAAC,aAAa,CAAkB,cAAc,CAAC,CAAC;IAChF,MAAM,cAAc,GAAG,QAAQ,CAAC,aAAa,CAAiB,cAAc,CAAC,CAAC;IAE9E,IAAI,eAAe,KAAK,IAAI,IAAI,eAAe,KAAK,IAAI,IAAI,cAAc,KAAK,IAAI,EAAE,CAAC;QACrF,eAAe,CAAC,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;QAC3C,eAAe,CAAC,WAAW,GAAG,OAAO,CAAC,IAAI,IAAI,mBAAmB,CAAC;QAClE,cAAc,CAAC,WAAW,GAAG,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;IAC/D,CAAC;AACF,CAAC;AAED;;GAEG;AACH,KAAK,UAAU,aAAa;IAC3B,MAAM,iBAAiB,GAAG,QAAQ,CAAC,aAAa,CAAoB,cAAc,CAAC,CAAC;IAEpF,IAAI,iBAAiB,KAAK,IAAI,EAAE,CAAC;QAChC,iBAAiB,CAAC,gBAAgB,CAAC,OAAO,EAAE,KAAK,IAAI,EAAE;YACtD,MAAM,WAAW,EAAE,CAAC;QACrB,CAAC,CAAC,CAAC;IACJ,CAAC;IAED,MAAM,iBAAiB,EAAE,CAAC;AAC3B,CAAC","sources":["webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/@openfin/core-web/out/api-client.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/@openfin/core-web/out/main-8cad4070.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/@openfin/core-web/out/main-b14f67c9.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/base64-js/index.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/buffer/index.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/events/events.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/ieee754/index.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_DataView.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_Hash.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_ListCache.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_Map.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_MapCache.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_Promise.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_Set.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_SetCache.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_Stack.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_Symbol.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_Uint8Array.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_WeakMap.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_arrayEach.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_arrayFilter.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_arrayLikeKeys.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_arrayPush.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_arraySome.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_assignValue.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_assocIndexOf.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseAssign.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseAssignIn.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseAssignValue.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseClone.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseCreate.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseGetAllKeys.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseGetTag.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseIsArguments.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseIsEqual.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseIsEqualDeep.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseIsMap.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseIsNative.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseIsSet.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseIsTypedArray.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseKeys.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseKeysIn.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseTimes.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseUnary.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_cacheHas.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_cloneArrayBuffer.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_cloneBuffer.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_cloneDataView.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_cloneRegExp.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_cloneSymbol.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_cloneTypedArray.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_copyArray.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_copyObject.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_copySymbols.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_copySymbolsIn.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_coreJsData.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_defineProperty.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_equalArrays.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_equalByTag.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_equalObjects.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_freeGlobal.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_getAllKeys.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_getAllKeysIn.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_getMapData.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_getNative.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_getPrototype.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_getRawTag.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_getSymbols.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_getSymbolsIn.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_getTag.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_getValue.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_hashClear.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_hashDelete.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_hashGet.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_hashHas.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_hashSet.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_initCloneArray.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_initCloneByTag.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_initCloneObject.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_isIndex.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_isKeyable.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_isMasked.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_isPrototype.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_listCacheClear.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_listCacheDelete.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_listCacheGet.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_listCacheHas.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_listCacheSet.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_mapCacheClear.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_mapCacheDelete.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_mapCacheGet.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_mapCacheHas.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_mapCacheSet.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_mapToArray.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_nativeCreate.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_nativeKeys.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_nativeKeysIn.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_nodeUtil.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_objectToString.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_overArg.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_root.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_setCacheAdd.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_setCacheHas.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_setToArray.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_stackClear.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_stackDelete.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_stackGet.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_stackHas.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_stackSet.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_toSource.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/cloneDeep.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/eq.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/isArguments.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/isArray.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/isArrayLike.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/isBuffer.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/isEqual.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/isFunction.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/isLength.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/isMap.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/isObject.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/isObjectLike.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/isSet.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/isTypedArray.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/keys.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/keysIn.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/stubArray.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/stubFalse.js","webpack://openfin-web--web-interop-support-context-and-intents/./client/src/content/api.ts","webpack://openfin-web--web-interop-support-context-and-intents/./client/src/platform/settings/settings.ts","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/index.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/md5.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/nil.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/parse.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/regex.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/rng.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/sha1.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/stringify.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/v1.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/v3.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/v35.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/v4.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/v5.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/validate.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/version.js","webpack://openfin-web--web-interop-support-context-and-intents/webpack/bootstrap","webpack://openfin-web--web-interop-support-context-and-intents/webpack/runtime/define property getters","webpack://openfin-web--web-interop-support-context-and-intents/webpack/runtime/global","webpack://openfin-web--web-interop-support-context-and-intents/webpack/runtime/hasOwnProperty shorthand","webpack://openfin-web--web-interop-support-context-and-intents/webpack/runtime/make namespace object","webpack://openfin-web--web-interop-support-context-and-intents/webpack/runtime/node module decorator","webpack://openfin-web--web-interop-support-context-and-intents/./client/src/content/interop-intent-view.ts"],"sourcesContent":["\"use strict\";var e=require(\"./main-8cad4070.js\");require(\"buffer/\"),require(\"uuid\"),require(\"events\"),require(\"lodash/cloneDeep\"),require(\"lodash/isEqual\"),exports.connect=e.connect;\n","\"use strict\";var e=require(\"buffer/\"),t=require(\"events\"),n=require(\"lodash/cloneDeep\"),i=require(\"lodash/isEqual\"),r=require(\"uuid\");const o=(e,t)=>`${t}<${btoa(JSON.stringify(e))}>`;var s=\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof window?window:\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:{},a={},c={},d={},h={};async function l(e){const t=[];for(const n of e){const e=await n();t.push(e)}return t}Object.defineProperty(h,\"__esModule\",{value:!0}),h.promiseMapSerial=h.serial=h.promiseMap=h.promisify=void 0,h.promisify=function(e){return(...t)=>new Promise(((n,i)=>{e(...t,((e,t)=>e?i(e):n(t)))}))},h.promiseMap=async function(e,t){return Promise.all(e.map(t))},h.serial=l,h.promiseMapSerial=async function(e,t){return l(e.map(((e,n,i)=>()=>t(e,n,i))))};var u,p=s&&s.__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},w=s&&s.__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)};Object.defineProperty(d,\"__esModule\",{value:!0}),d.Reply=d.EmitterBase=d.Base=void 0;const y=h;class f{constructor(e){this.isNodeEnvironment=()=>\"node\"===this.wire.environment.type,this.isOpenFinEnvironment=()=>\"openfin\"===this.wire.environment.type,this.isBrowserEnvironment=()=>\"other\"===this.wire.environment.type,this.wire=e}get fin(){return this.wire.getFin()}get me(){return this.wire.me}}d.Base=f;d.EmitterBase=class extends f{constructor(e,t,...n){super(e),this.topic=t,u.set(this,void 0),this.eventNames=()=>this.hasEmitter()?this.getOrCreateEmitter().eventNames():[],this.emit=(e,t,...n)=>!!this.hasEmitter()&&this.getOrCreateEmitter().emit(e,t,...n),this.hasEmitter=()=>this.wire.eventAggregator.has(w(this,u,\"f\")),this.getOrCreateEmitter=()=>this.wire.eventAggregator.getOrCreate(w(this,u,\"f\")),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[],this.listenerCount=e=>this.hasEmitter()?this.getOrCreateEmitter().listenerCount(e):0,this.registerEventListener=async(e,t={},n,i)=>{const r={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e},o=this.getOrCreateEmitter();n(o);try{await this.wire.sendAction(\"subscribe-to-desktop-event\",r)}catch(e){throw i(o),this.deleteEmitterIfNothingRegistered(o),e}},this.deregisterEventListener=async(e,t={})=>{if(this.hasEmitter()){const n={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e};await this.wire.sendAction(\"unsubscribe-to-desktop-event\",n).catch((()=>null));return this.getOrCreateEmitter()}return Promise.resolve()},p(this,u,[t,...n],\"f\"),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[]}async on(e,t,n){return await this.registerEventListener(e,n,(n=>{n.on(e,t)}),(n=>{n.removeListener(e,t)})),this}async addListener(e,t,n){return this.on(e,t,n)}async once(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.once(e,i),n.once(e,t)}),(n=>{n.removeListener(e,i),n.removeListener(e,t)})),this}async prependListener(e,t,n){return await this.registerEventListener(e,n,(n=>{n.prependListener(e,t)}),(n=>{n.removeListener(e,t)})),this}async prependOnceListener(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.prependOnceListener(e,t),n.once(e,i)}),(n=>{n.removeListener(e,t),n.removeListener(e,i)})),this}async removeListener(e,t,n){const i=await this.deregisterEventListener(e,n);return i&&(i.removeListener(e,t),this.deleteEmitterIfNothingRegistered(i)),this}async deregisterAllListeners(e){const t={...this.identity,type:e,topic:this.topic};if(this.hasEmitter()){const e=this.getOrCreateEmitter(),n=e.listenerCount(t.type),i=[];for(let e=0;enull)));return await Promise.all(i),e}}async removeAllListeners(e){const t=async e=>{const t=await this.deregisterAllListeners(e);t&&(t.removeAllListeners(e),this.deleteEmitterIfNothingRegistered(t))};if(e)await t(e);else if(this.hasEmitter()){const e=this.getOrCreateEmitter().eventNames();await(0,y.promiseMap)(e,t)}return this}deleteEmitterIfNothingRegistered(e){0===e.eventNames().length&&this.wire.eventAggregator.delete(w(this,u,\"f\"))}},u=new WeakMap;d.Reply=class{};var g={};Object.defineProperty(g,\"__esModule\",{value:!0});var m=g.RuntimeError=g.NotSupportedError=g.NotImplementedError=g.NoAckError=g.DuplicateCorrelationError=g.UnexpectedActionError=g.DisconnectedError=void 0;class v extends Error{constructor(e){super(`Expected websocket state OPEN but found ${e}`),this.readyState=e}}g.DisconnectedError=v;class C extends Error{}g.UnexpectedActionError=C;class b extends Error{}g.DuplicateCorrelationError=b;class I extends Error{}g.NoAckError=I;class E extends Error{}g.NotImplementedError=E;class x extends Error{}g.NotSupportedError=x;class A extends Error{constructor(e){const{message:t,name:n,stack:i,...r}=e;super(t),this.name=n||\"Error\",this.stack=i??this.toString(),Object.keys(r).forEach((e=>{this[e]=r[e]}))}}class P extends Error{static getCallSite(e=0){const t=Error.stackTraceLimit,n=e+1;Error.stackTraceLimit=t+n;const i=Error.prepareStackTrace;Error.prepareStackTrace=(e,t)=>t;const r=(new Error).stack?.slice(n)??[];return Error.prepareStackTrace=i,Error.stackTraceLimit=t,r}static prepareStackTrace(e,t){if(\"function\"==typeof Error.prepareStackTrace)return Error.prepareStackTrace(e,t);let n=\"\";n+=e.name||\"Error\",n+=`: ${e.message||\"\"}`;for(const e of t)n+=`\\n at ${e.toString()}`;return n}constructor(e,t){const{reason:n,error:i}=e;super(n),this.name=\"RuntimeError\",i?.stack&&(this.cause=new A(i)),t&&(this.stack=P.prepareStackTrace(this,t))}}m=g.RuntimeError=P;var M={},_={},O={};Object.defineProperty(O,\"__esModule\",{value:!0}),O.validateIdentity=void 0,O.validateIdentity=function(e){let t;return\"object\"==typeof e&&\"string\"==typeof e.uuid||(t=\"Not a valid identity object\"),t};var S={},R={},F={},j={},k={},L={},T={};Object.defineProperty(T,\"__esModule\",{value:!0}),T.handleDeprecatedWarnings=void 0;var $;T.handleDeprecatedWarnings=e=>{(e.contentNavigation?.whitelist||e.contentNavigation?.blacklist||e.contentRedirect?.whitelist||e.contentRedirect?.blacklist)&&console.warn(\"The properties 'whitelist' and 'blacklist' have been marked as deprecated and will be removed in a future version. Please use 'allowlist' and 'denylist'.\")};var B={},G={};Object.defineProperty(G,\"__esModule\",{value:!0}),G.AsyncRetryableLazy=W=G.Lazy=void 0;var W=G.Lazy=class{constructor(e){this.producerFn=e}getValue(){return this.value||(this.value=this.producerFn()),this.value}};G.AsyncRetryableLazy=class{constructor(e){this.producerFn=e}async getValue(){return this.promise||(this.promise=this.producerFn().catch((e=>{throw delete this.promise,e}))),this.promise}};var H={};Object.defineProperty(H,\"__esModule\",{value:!0}),H.WebContents=void 0;const N=d;class D extends N.EmitterBase{constructor(e,t,n){super(e,n,t.uuid,t.name),this.identity=t,this.entityType=n}capturePage(e){return this.wire.sendAction(\"capture-page\",{options:e,...this.identity}).then((({payload:e})=>e.data))}executeJavaScript(e){return this.wire.sendAction(\"execute-javascript-in-window\",{...this.identity,code:e}).then((({payload:e})=>e.data))}getZoomLevel(){return this.wire.sendAction(\"get-zoom-level\",this.identity).then((({payload:e})=>e.data))}setZoomLevel(e){return this.wire.sendAction(\"set-zoom-level\",{...this.identity,level:e}).then((()=>{}))}navigate(e){return this.wire.sendAction(\"navigate-window\",{...this.identity,url:e}).then((()=>{}))}navigateBack(){return this.wire.sendAction(\"navigate-window-back\",{...this.identity}).then((()=>{}))}async navigateForward(){await this.wire.sendAction(\"navigate-window-forward\",{...this.identity})}stopNavigation(){return this.wire.sendAction(\"stop-window-navigation\",{...this.identity}).then((()=>{}))}reload(e=!1){return this.wire.sendAction(\"reload-window\",{ignoreCache:e,...this.identity}).then((()=>{}))}print(e={}){return this.wire.sendAction(\"print\",{...this.identity,options:e}).then((()=>{}))}findInPage(e,t){return this.wire.sendAction(\"find-in-page\",{...this.identity,searchTerm:e,options:t}).then((({payload:e})=>e.data))}stopFindInPage(e){return this.wire.sendAction(\"stop-find-in-page\",{...this.identity,action:e}).then((()=>{}))}getPrinters(){return this.wire.sendAction(\"get-printers\",{...this.identity}).then((({payload:e})=>e.data))}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){await this.wire.sendAction(\"focus-window\",{emitSynthFocused:e,...this.identity})}async showDeveloperTools(){await this.wire.sendAction(\"show-developer-tools\",this.identity)}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction(\"get-process-info\",this.identity);return e}async getSharedWorkers(){return this.wire.sendAction(\"get-shared-workers\",this.identity).then((({payload:e})=>e.data))}async inspectSharedWorker(){await this.wire.sendAction(\"inspect-shared-worker\",{...this.identity})}async inspectSharedWorkerById(e){await this.wire.sendAction(\"inspect-shared-worker-by-id\",{...this.identity,workerId:e})}async inspectServiceWorker(){await this.wire.sendAction(\"inspect-service-worker\",{...this.identity})}async showPopupWindow(e){if(this.wire.sendAction(`${this.entityType}-show-popup-window`,this.identity).catch((()=>{})),e?.onPopupReady){const t=async({popupName:t})=>{try{const n=this.fin.Window.wrapSync({uuid:this.fin.me.uuid,name:t});await e.onPopupReady(n)}catch(e){throw new Error(`Something went wrong during onPopupReady execution: ${e}`)}};await this.once(\"popup-ready\",t)}const{payload:t}=await this.wire.sendAction(\"try-create-popup-window\",{options:{...e,hasResultCallback:!!e?.onPopupResult,hasReadyCallback:!!e?.onPopupReady},...this.identity}),{data:{willOpen:n,options:i}}=t;n&&await this.fin.Window.create(i.initialOptions);if(e?.onPopupResult){const t=async t=>{await e.onPopupResult((e=>{const{name:t,uuid:n,result:i,data:r}=e,o={identity:{name:t,uuid:n},result:i};return r&&(o.data=r),o})(t))},n=async()=>{await this.removeListener(\"popup-result\",t)};await this.on(\"popup-result\",t),await this.once(\"popup-teardown\",n)}const{payload:r}=await this.wire.sendAction(\"show-popup-window\",{options:i,...this.identity});return r.data}}var U,V,z,K,q;function J(){return V||(V=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(function(){if($)return L;$=1,Object.defineProperty(L,\"__esModule\",{value:!0}),L.ViewModule=void 0;const e=d,t=O,n=J(),i=T;class r extends e.Base{async create(e){const{uuid:t}=this.wire.me;if(!e.name||\"string\"!=typeof e.name)throw new Error(\"Please provide a name property as a string in order to create a View.\");return(0,i.handleDeprecatedWarnings)(e),this.wire.environment.childViews?await this.wire.environment.createChildContent({entityType:\"view\",options:{...e,uuid:t}}):await this.wire.sendAction(\"create-view\",{...e,uuid:t}),this.wrapSync({uuid:t,name:e.name})}async wrap(e){this.wire.sendAction(\"view-wrap\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}wrapSync(e){this.wire.sendAction(\"view-wrap-sync\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}getCurrent(){if(this.wire.sendAction(\"view-get-current\").catch((e=>{})),!this.wire.me.isView)throw new Error(\"You are not in a View context\");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction(\"view-get-current-sync\").catch((e=>{})),!this.wire.me.isView)throw new Error(\"You are not in a View context\");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return L.ViewModule=r,L}(),e),n(function(){if(U)return B;var e;U=1,Object.defineProperty(B,\"__esModule\",{value:!0}),B.View=void 0;const t=g,n=G,i=H,r=ie();class o extends i.WebContents{constructor(i,o){super(i,o,\"view\"),this.identity=o,e.set(this,new n.Lazy((()=>this.fin.Platform.wrapSync(this.identity).getClient()))),this.attach=async e=>{await this.wire.sendAction(\"attach-view\",{target:e,...this.identity})},this.destroy=async()=>{await this.wire.sendAction(\"destroy-view\",{...this.identity})},this.show=async()=>{await this.wire.sendAction(\"show-view\",{...this.identity})},this.showAt=async(e,t={})=>{await this.wire.sendAction(\"show-view-at\",{bounds:e,...this.identity,options:t})},this.bringToFront=async()=>{await this.wire.sendAction(\"bring-view-to-front\",{...this.identity})},this.hide=async()=>{await this.wire.sendAction(\"hide-view\",{...this.identity})},this.setBounds=async e=>{await this.wire.sendAction(\"set-view-bounds\",{bounds:e,...this.identity})},this.getBounds=async()=>(await this.wire.sendAction(\"get-view-bounds\",{...this.identity})).payload.data,this.getInfo=async()=>(await this.wire.sendAction(\"get-view-info\",{...this.identity})).payload.data,this.getParentLayout=async()=>(this.wire.sendAction(\"view-get-parent-layout\",{...this.identity}).catch((()=>{})),this.fin.Platform.Layout.getLayoutByViewIdentity(this.identity)),this.getOptions=async()=>this.wire.sendAction(\"get-view-options\",{...this.identity}).then((({payload:e})=>e.data)),this.updateOptions=async e=>this.wire.sendAction(\"update-view-options\",{options:e,...this.identity}).then((()=>{})),this.getCurrentWindow=async()=>{const{payload:{data:e}}=await this.wire.sendAction(\"get-view-window\",{...this.identity});return new r._Window(this.wire,e)},this.getCurrentStack=async()=>{this.wire.sendAction(\"view-get-current-stack\").catch((()=>{}));try{return(await this.getParentLayout()).getStackByViewIdentity(this.identity)}catch(e){throw new t.RuntimeError({reason:\"This view does not belong to a stack.\",error:e})}},this.triggerBeforeUnload=async()=>(await this.wire.sendAction(\"trigger-before-unload\",{...this.identity})).payload.data,this.bindToElement=async e=>{if(!e)throw new Error(\"Element not found.\");return this.wire.environment.observeBounds(e,(async e=>this.setBounds(e)))}}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){const t=await this.getCurrentWindow();await t.focusedWebViewWasChanged(),await super.focus({emitSynthFocused:e})}}return B.View=o,e=new WeakMap,B}(),e)}(k)),k}function Y(){if(z)return j;z=1,Object.defineProperty(j,\"__esModule\",{value:!0}),j.Application=void 0;const e=d,t=ie(),n=J();class i extends e.EmitterBase{constructor(e,n){super(e,\"application\",n.uuid),this.identity=n,this.window=new t._Window(this.wire,{uuid:this.identity.uuid,name:this.identity.uuid})}windowListFromIdentityList(e){const n=[];return e.forEach((e=>{n.push(new t._Window(this.wire,{uuid:e.uuid,name:e.name}))})),n}isRunning(){return this.wire.sendAction(\"is-application-running\",this.identity).then((({payload:e})=>e.data))}async quit(e=!1){try{await this._close(e),await this.wire.sendAction(\"destroy-application\",{force:e,...this.identity})}catch(e){if(![\"Remote connection has closed\",\"Could not locate the requested application\"].some((t=>e.message.includes(t))))throw e}}async _close(e=!1){try{await this.wire.sendAction(\"close-application\",{force:e,...this.identity})}catch(e){if(!e.message.includes(\"Remote connection has closed\"))throw e}}close(e=!1){return console.warn(\"Deprecation Warning: Application.close is deprecated Please use Application.quit\"),this.wire.sendAction(\"application-close\",this.identity).catch((e=>{})),this._close(e)}getChildWindows(){return this.wire.sendAction(\"get-child-windows\",this.identity).then((({payload:e})=>{const t=[];return e.data.forEach((e=>{t.push({uuid:this.identity.uuid,name:e})})),this.windowListFromIdentityList(t)}))}getManifest(){return this.wire.sendAction(\"get-application-manifest\",this.identity).then((({payload:e})=>e.data))}getParentUuid(){return this.wire.sendAction(\"get-parent-application\",this.identity).then((({payload:e})=>e.data))}getShortcuts(){return this.wire.sendAction(\"get-shortcuts\",this.identity).then((({payload:e})=>e.data))}async getViews(){const{payload:e}=await this.wire.sendAction(\"application-get-views\",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}getZoomLevel(){return this.wire.sendAction(\"get-application-zoom-level\",this.identity).then((({payload:e})=>e.data))}getWindow(){return this.wire.sendAction(\"application-get-window\",this.identity).catch((e=>{})),Promise.resolve(this.window)}registerUser(e,t){return this.wire.sendAction(\"register-user\",{userName:e,appName:t,...this.identity}).then((()=>{}))}removeTrayIcon(){return this.wire.sendAction(\"remove-tray-icon\",this.identity).then((()=>{}))}restart(){return this.wire.sendAction(\"restart-application\",this.identity).then((()=>{}))}run(){return console.warn(\"Deprecation Warning: Application.run is deprecated Please use fin.Application.start\"),this.wire.sendAction(\"application-run\",this.identity).catch((e=>{})),this._run()}_run(e={}){return this.wire.sendAction(\"run-application\",{manifestUrl:this._manifestUrl,opts:e,...this.identity}).then((()=>{}))}scheduleRestart(){return this.wire.sendAction(\"relaunch-on-close\",this.identity).then((()=>{}))}async sendApplicationLog(){const{payload:e}=await this.wire.sendAction(\"send-application-log\",this.identity);return e.data}async setJumpList(e){await this.wire.sendAction(\"set-jump-list\",{config:e,...this.identity})}setTrayIcon(e){return this.wire.sendAction(\"set-tray-icon\",{enabledIcon:e,...this.identity}).then((()=>{}))}setShortcuts(e){return this.wire.sendAction(\"set-shortcuts\",{data:e,...this.identity}).then((()=>{}))}async setShortcutQueryParams(e){await this.wire.sendAction(\"set-shortcut-query-args\",{data:e,...this.identity})}setZoomLevel(e){return this.wire.sendAction(\"set-application-zoom-level\",{level:e,...this.identity}).then((()=>{}))}async setAppLogUsername(e){await this.wire.sendAction(\"set-app-log-username\",{data:e,...this.identity})}getTrayIconInfo(){return this.wire.sendAction(\"get-tray-icon-info\",this.identity).then((({payload:e})=>e.data))}hasTrayIcon(){return this.wire.sendAction(\"has-tray-icon\",this.identity).then((({payload:e})=>e.data))}terminate(){return this.wire.sendAction(\"terminate-application\",this.identity).then((()=>{}))}wait(){return this.wire.sendAction(\"wait-for-hung-application\",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction(\"get-info\",this.identity).then((({payload:e})=>e.data))}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction(\"application-get-process-info\",this.identity);return e}async setFileDownloadLocation(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t};await this.wire.sendAction(\"set-file-download-location\",{...n,downloadLocation:e})}async getFileDownloadLocation(){const{payload:{data:e}}=await this.wire.sendAction(\"get-file-download-location\",this.identity);return e}async showTrayIconPopupMenu(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t},{payload:i}=await this.wire.sendAction(\"show-tray-icon-popup-menu\",{...n,options:e});return i.data}async closeTrayIconPopupMenu(){const{name:e}=this.wire.me,t={uuid:this.identity.uuid,name:e};await this.wire.sendAction(\"close-tray-icon-popup-menu\",{...t})}}return j.Application=i,j}function Z(){return q||(q=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(function(){if(K)return F;K=1,Object.defineProperty(F,\"__esModule\",{value:!0}),F.ApplicationModule=void 0;const e=d,t=O,n=Y();class i extends e.Base{async wrap(e){this.wire.sendAction(\"wrap-application\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}wrapSync(e){this.wire.sendAction(\"wrap-application-sync\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}async _create(e){return void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&void 0===e.isPlatformController&&(e.autoShow=!0),await this.wire.sendAction(\"create-application\",e),this.wrap({uuid:e.uuid})}create(e){return console.warn(\"Deprecation Warning: fin.Application.create is deprecated. Please use fin.Application.start\"),this.wire.sendAction(\"application-create\").catch((e=>{})),this._create(e)}async start(e){this.wire.sendAction(\"start-application\").catch((e=>{}));const t=await this._create(e);return await this.wire.sendAction(\"run-application\",{uuid:e.uuid}),t}async startManyManifests(e,t){return this.wire.sendAction(\"run-applications\",{applications:e,opts:t}).then((()=>{}))}getCurrent(){return this.wire.sendAction(\"get-current-application\").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction(\"get-current-application-sync\").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}async startFromManifest(e,t){this.wire.sendAction(\"application-start-from-manifest\").catch((e=>{}));const n=await this._createFromManifest(e);return await n._run(t),n}createFromManifest(e){return console.warn(\"Deprecation Warning: fin.Application.createFromManifest is deprecated. Please use fin.Application.startFromManifest\"),this.wire.sendAction(\"application-create-from-manifest\").catch((e=>{})),this._createFromManifest(e)}_createFromManifest(e){return this.wire.sendAction(\"get-application-manifest\",{manifestUrl:e}).then((({payload:e})=>{const t=e.data.platform?e.data.platform.uuid:e.data.startup_app.uuid;return this.wrap({uuid:t})})).then((t=>(t._manifestUrl=e,t)))}}return F.ApplicationModule=i,F}(),e),n(Y(),e)}(R)),R}H.WebContents=D;var Q={};Object.defineProperty(Q,\"__esModule\",{value:!0}),Q.promisifySubscription=void 0;var X,ee,te;function ne(){if(X)return S;X=1,Object.defineProperty(S,\"__esModule\",{value:!0}),S._Window=void 0;const e=Z(),t=H,n=J(),i=T,r=Q;class o extends t.WebContents{constructor(e,t){super(e,t,\"window\")}async createWindow(e){this.wire.sendAction(\"window-create-window\",this.identity).catch((e=>{}));const t=await(0,r.promisifySubscription)(this,\"fire-constructor-callback\");void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&(e.autoShow=!0),(0,i.handleDeprecatedWarnings)(e);const n=this.wire.environment.createChildContent({entityType:\"window\",options:e}),[o]=await Promise.all([t.getValue(),n]);let s;const{success:a}=o,c=o.data,{message:d}=c;s=a?{httpResponseCode:c.httpResponseCode,apiInjected:c.apiInjected}:{message:c.message,networkErrorCode:c.networkErrorCode,stack:c.stack};const h={message:d,cbPayload:s,success:a};try{this.getWebWindow().fin.__internal_.openerSuccessCBCalled()}catch(e){}return h.success?this:Promise.reject(h)}getAllFrames(){return this.wire.sendAction(\"get-all-frames\",this.identity).then((({payload:e})=>e.data))}getBounds(){return this.wire.sendAction(\"get-window-bounds\",this.identity).then((({payload:e})=>e.data))}center(){return this.wire.sendAction(\"center-window\",this.identity).then((()=>{}))}blur(){return this.wire.sendAction(\"blur-window\",this.identity).then((()=>{}))}bringToFront(){return this.wire.sendAction(\"bring-window-to-front\",this.identity).then((()=>{}))}animate(e,t){return this.wire.sendAction(\"animate-window\",{transitions:e,options:t,...this.identity}).then((()=>{}))}hide(){return this.wire.sendAction(\"hide-window\",this.identity).then((()=>{}))}close(e=!1){return this.wire.sendAction(\"close-window\",{force:e,...this.identity}).then((()=>{Object.setPrototypeOf(this,null)}))}focusedWebViewWasChanged(){return this.wire.sendAction(\"focused-webview-changed\",this.identity).then((()=>{}))}getNativeId(){return this.wire.sendAction(\"get-window-native-id\",this.identity).then((({payload:e})=>e.data))}async getCurrentViews(){const{payload:e}=await this.wire.sendAction(\"window-get-views\",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}disableFrame(){return console.warn(\"Function is deprecated; use disableUserMovement instead.\"),this.wire.sendAction(\"disable-window-frame\",this.identity).then((()=>{}))}disableUserMovement(){return this.wire.sendAction(\"disable-window-frame\",this.identity).then((()=>{}))}enableFrame(){return console.warn(\"Function is deprecated; use enableUserMovement instead.\"),this.wire.sendAction(\"enable-window-frame\",this.identity).then((()=>{}))}enableUserMovement(){return this.wire.sendAction(\"enable-window-frame\",this.identity).then((()=>{}))}flash(){return this.wire.sendAction(\"flash-window\",this.identity).then((()=>{}))}stopFlashing(){return this.wire.sendAction(\"stop-flash-window\",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction(\"get-window-info\",this.identity).then((({payload:e})=>e.data))}async getLayout(e){this.wire.sendAction(\"window-get-layout\",this.identity).catch((e=>{}));const t=await this.getOptions();if(!t.layout&&!t.layoutSnapshot)throw new Error(\"Window does not have a Layout\");return this.fin.Platform.Layout.wrap(e??this.identity)}getOptions(){return this.wire.sendAction(\"get-window-options\",this.identity).then((({payload:e})=>e.data))}getParentApplication(){return this.wire.sendAction(\"window-get-parent-application\",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity))}getParentWindow(){return this.wire.sendAction(\"window-get-parent-window\",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity)).then((e=>e.getWindow()))}async getSnapshot(e){const t={area:e,...this.identity};console.warn(\"Window.getSnapshot has been deprecated, please use Window.capturePage\");return(await this.wire.sendAction(\"get-window-snapshot\",t)).payload.data}getState(){return this.wire.sendAction(\"get-window-state\",this.identity).then((({payload:e})=>e.data))}getWebWindow(){return this.wire.sendAction(\"window-get-web-window\",this.identity).catch((e=>{})),this.wire.environment.getWebWindow(this.identity)}isMainWindow(){return this.wire.sendAction(\"window-is-main-window\",this.identity).catch((e=>{})),this.me.uuid===this.me.name}isShowing(){return this.wire.sendAction(\"is-window-showing\",this.identity).then((({payload:e})=>e.data))}maximize(){return this.wire.sendAction(\"maximize-window\",this.identity).then((()=>{}))}minimize(){return this.wire.sendAction(\"minimize-window\",this.identity).then((()=>{}))}moveBy(e,t,n){return this.wire.sendAction(\"move-window-by\",{deltaLeft:e,deltaTop:t,positioningOptions:n,...this.identity}).then((()=>{}))}moveTo(e,t,n){return this.wire.sendAction(\"move-window\",{left:e,top:t,positioningOptions:n,...this.identity}).then((()=>{}))}resizeBy(e,t,n,i){return this.wire.sendAction(\"resize-window-by\",{deltaWidth:Math.floor(e),deltaHeight:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}resizeTo(e,t,n,i){return this.wire.sendAction(\"resize-window\",{width:Math.floor(e),height:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}restore(){return this.wire.sendAction(\"restore-window\",this.identity).then((()=>{}))}setAsForeground(){return this.wire.sendAction(\"set-foreground-window\",this.identity).then((()=>{}))}setBounds(e,t){return this.wire.sendAction(\"set-window-bounds\",{...e,...this.identity,positioningOptions:t}).then((()=>{}))}show(e=!1){return this.wire.sendAction(\"show-window\",{force:e,...this.identity}).then((()=>{}))}showAt(e,t,n=!1){return this.wire.sendAction(\"show-at-window\",{force:n,left:Math.floor(e),top:Math.floor(t),...this.identity}).then((()=>{}))}updateOptions(e){return this.wire.sendAction(\"update-window-options\",{options:e,...this.identity}).then((()=>{}))}authenticate(e,t){return this.wire.sendAction(\"window-authenticate\",{userName:e,password:t,...this.identity}).then((()=>{}))}async showPopupMenu(e){const{payload:t}=await this.wire.sendAction(\"show-popup-menu\",{options:e,...this.identity});return t.data}async closePopupMenu(){return this.wire.sendAction(\"close-popup-menu\",{...this.identity}).then((()=>{}))}async dispatchPopupResult(e){this.wire.sendAction(\"window-dispatch-popup-result\",this.identity).catch((e=>{})),await this.wire.sendAction(\"dispatch-popup-result\",{data:e,...this.identity})}async print(e={content:\"self\"}){switch(e.content){case void 0:case\"self\":return super.print(e);case\"screenshot\":return this.wire.sendAction(\"print-screenshot\",this.identity).then((()=>{}));case\"views\":return this.wire.sendAction(\"print-views\",{...this.identity,options:e}).then((()=>{}));default:return}}}return S._Window=o,S}function ie(){return te||(te=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(function(){if(ee)return _;ee=1,Object.defineProperty(_,\"__esModule\",{value:!0}),_._WindowModule=void 0;const e=d,t=O,n=ne();class i extends e.Base{async wrap(e){this.wire.sendAction(\"window-wrap\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}wrapSync(e){this.wire.sendAction(\"window-wrap-sync\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}create(e){return this.wire.sendAction(\"create-window\").catch((e=>{})),new n._Window(this.wire,{uuid:this.me.uuid,name:e.name}).createWindow(e)}getCurrent(){if(this.wire.sendAction(\"get-current-window\").catch((e=>{})),!this.wire.me.isWindow)throw new Error(\"You are not in a Window context\");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction(\"get-current-window-sync\").catch((e=>{})),!this.wire.me.isWindow)throw new Error(\"You are not in a Window context\");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return _._WindowModule=i,_}(),e),n(ne(),e)}(M)),M}Q.promisifySubscription=async(e,t,n=(()=>!0),i)=>{let r,o,s;const a=new Promise(((e,t)=>{r=e,o=t})),c=e=>{n(e)&&(clearTimeout(s),r(e))};return await e.on(t,c),i&&(s=setTimeout((()=>o(new Error(\"event timed out\"))),i)),a.finally((()=>{e.removeListener(t,c).catch((()=>null))})),{getValue:()=>a}},Object.defineProperty(c,\"__esModule\",{value:!0}),c.System=void 0;const re=d,oe=g,se=ie(),ae=t;class ce extends re.EmitterBase{constructor(e){super(e,\"system\")}sendExternalProcessRequest(e,t){return new Promise(((n,i)=>{const r=\"external-process-exited\";let o,s,a,c;\"function\"==typeof t.listener&&(a=e=>{const n=e||{};s={topic:\"exited\",uuid:n.processUuid||\"\",exitCode:n.exitCode||0},o===e.processUuid&&(t.listener(s),c.removeListener(r,a))},this.wire.me.name||(this.wire.me.name=this.wire.me.uuid),c=new se._Window(this.wire,this.wire.me),c.on(r,a)),this.wire.sendAction(e,t).then((({payload:e})=>{o=e.data.uuid,n(e.data),s&&o===s.uuid&&(t.listener(s),c.removeListener(r,a))})).catch((e=>{c&&c.removeListener(r,a),i(e)}))}))}getVersion(){return this.wire.sendAction(\"get-version\").then((({payload:e})=>e.data))}clearCache(e){return this.wire.sendAction(\"clear-cache\",e).then((()=>{}))}deleteCacheOnExit(){return this.wire.sendAction(\"delete-cache-request\").then((()=>{}))}exit(){return this.wire.sendAction(\"exit-desktop\").then((()=>{}))}async fetchManifest(e){const{payload:{data:t}}=await this.wire.sendAction(\"fetch-manifest\",{manifestUrl:e});return t}flushCookieStore(){return this.wire.sendAction(\"flush-cookie-store\").then((()=>{}))}getAllWindows(){return this.wire.sendAction(\"get-all-windows\").then((({payload:e})=>e.data))}getAllApplications(){return this.wire.sendAction(\"get-all-applications\").then((({payload:e})=>e.data))}getCommandLineArguments(){return this.wire.sendAction(\"get-command-line-arguments\").then((({payload:e})=>e.data))}async getCrashReporterState(){const{payload:{data:{diagnosticMode:e,isRunning:t}}}=await this.wire.sendAction(\"get-crash-reporter-state\");return console.warn(\"diagnosticMode property is deprecated. It will be removed in a future version\"),{diagnosticMode:e,diagnosticsMode:e,isRunning:t}}async startCrashReporter(e){const t=e,n={...t,diagnosticMode:t.diagnosticsMode||t.diagnosticMode},{payload:{data:{diagnosticMode:i,isRunning:r}}}=await this.wire.sendAction(\"start-crash-reporter\",n);return{diagnosticMode:i,diagnosticsMode:i,isRunning:r}}getUniqueUserId(){return this.wire.sendAction(\"get-unique-user-id\").then((({payload:e})=>e.data))}getEntityInfo(e,t){return this.wire.sendAction(\"get-entity-info\",{uuid:e,name:t}).then((({payload:e})=>e.data))}getEnvironmentVariable(e){return this.wire.sendAction(\"get-environment-variable\",{environmentVariables:e}).then((({payload:e})=>e.data))}getFocusedWindow(){return this.wire.sendAction(\"get-focused-window\").then((({payload:e})=>e.data))}async isAppCertified(e){const{payload:{data:{certifiedInfo:t}}}=await this.wire.sendAction(\"is-app-certified\",{manifestUrl:e});return t}getInstalledRuntimes(){return this.wire.sendAction(\"get-installed-runtimes\").then((({payload:e})=>e.data.runtimes))}async getInstalledApps(){const{payload:{data:{installedApps:e}}}=await this.wire.sendAction(\"get-installed-apps\");return e}getLog(e){return this.wire.sendAction(\"view-log\",e).then((({payload:e})=>e.data))}getMachineId(){return this.wire.sendAction(\"get-machine-id\").then((({payload:e})=>e.data))}getMinLogLevel(){return this.wire.sendAction(\"get-min-log-level\").then((({payload:e})=>e.data))}getLogList(){return this.wire.sendAction(\"list-logs\").then((({payload:e})=>e.data))}getMonitorInfo(){return this.wire.sendAction(\"get-monitor-info\").then((({payload:e})=>e.data))}getMousePosition(){return this.wire.sendAction(\"get-mouse-position\").then((({payload:e})=>e.data))}getProcessList(){return console.warn(\"System.getProcessList has been deprecated. Please consider using our new process APIs: Window.getProcessInfo, View.getProcessInfo, Application.getProcessInfo, System.getAllProcessInfo\"),this.wire.sendAction(\"process-snapshot\").then((({payload:e})=>e.data))}async getAllProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction(\"get-all-process-info\",this.identity);return e}getProxySettings(){return this.wire.sendAction(\"get-proxy-settings\").then((({payload:e})=>e.data))}getRuntimeInfo(){return this.wire.sendAction(\"get-runtime-info\").then((({payload:e})=>e.data))}getRvmInfo(){return this.wire.sendAction(\"get-rvm-info\").then((({payload:e})=>e.data))}getHostSpecs(){return this.wire.sendAction(\"get-host-specs\").then((({payload:e})=>e.data))}getOSInfo(){return this.wire.sendAction(\"get-os-info\").then((({payload:e})=>e.data))}launchExternalProcess(e){return this.sendExternalProcessRequest(\"launch-external-process\",e)}monitorExternalProcess(e){return this.sendExternalProcessRequest(\"monitor-external-process\",e)}log(e,t){return this.wire.sendAction(\"write-to-log\",{level:e,message:t}).then((()=>{}))}openUrlWithBrowser(e){return this.wire.sendAction(\"open-url-with-browser\",{url:e}).then((()=>{}))}async registerCustomProtocol(e){if(\"object\"!=typeof e)throw new Error(\"Must provide an object with a `protocolName` property having a string value.\");await this.wire.sendAction(\"register-custom-protocol\",e)}async unregisterCustomProtocol(e){await this.wire.sendAction(\"unregister-custom-protocol\",{protocolName:e})}async getCustomProtocolState(e){return this.wire.sendAction(\"get-custom-protocol-state\",{protocolName:e}).then((({payload:e})=>e.data))}releaseExternalProcess(e){return this.wire.sendAction(\"release-external-process\",{uuid:e}).then((()=>{}))}showDeveloperTools(e){return this.wire.sendAction(\"show-developer-tools\",e).then((()=>{}))}terminateExternalProcess(e){return this.wire.sendAction(\"terminate-external-process\",e).then((()=>{}))}updateProxySettings(e){return this.wire.sendAction(\"update-proxy\",e).then((()=>{}))}async downloadAsset(e,t){const n=()=>{};let i=n,r=n;const o=new Promise(((e,t)=>{i=e,r=t}));if(\"openfin\"!==this.wire.environment.type)throw new oe.NotSupportedError(\"downloadAsset only supported in an OpenFin Render process\");const s=oe.RuntimeError.getCallSite(),a=this.wire.environment.getNextMessageId().toString(),c=`asset-download-progress-${a}`,d=`asset-download-error-${a}`,h=`asset-download-complete-${a}`,l=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},u=()=>{this.removeListener(c,l)};await Promise.all([this.on(c,l),this.once(d,(e=>{u();const{reason:t,err:n}=e;r(new oe.RuntimeError({reason:t,error:n},s))})),this.once(h,(()=>{u(),i()}))]);const p=Object.assign(e,{downloadId:a});return await this.wire.sendAction(\"download-asset\",p).catch((e=>{throw u(),e})),o}downloadRuntime(e,t){const n=oe.RuntimeError.getCallSite();return new Promise(((i,r)=>{if(\"openfin\"!==this.wire.environment.type)return void r(new oe.NotSupportedError(\"downloadRuntime only supported in an OpenFin Render process\"));const o=this.wire.environment.getNextMessageId().toString(),s=`runtime-download-progress-${o}`,a=`runtime-download-error-${o}`,c=`runtime-download-complete-${o}`,d=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},h=()=>{this.removeListener(s,d)};this.on(s,d),this.once(a,(e=>{h();const{reason:t,err:i}=e;r(new oe.RuntimeError({reason:t,error:i},n))})),this.once(c,(()=>{h(),i()}));const l=Object.assign(e,{downloadId:o});this.wire.sendAction(\"download-runtime\",l).catch((e=>{h(),r(e)}))}))}downloadPreloadScripts(e){return this.wire.sendAction(\"download-preload-scripts\",{scripts:e}).then((({payload:e})=>e.data))}getAllExternalApplications(){return this.wire.sendAction(\"get-all-external-applications\").then((({payload:e})=>e.data))}getAppAssetInfo(e){return this.wire.sendAction(\"get-app-asset-info\",e).then((({payload:e})=>e.data))}getCookies(e){const t=this.wire.environment.getUrl(),n=Object.assign(e,{url:t});return this.wire.sendAction(\"get-cookies\",n).then((({payload:e})=>e.data))}setMinLogLevel(e){return this.wire.sendAction(\"set-min-log-level\",{level:e}).then((()=>{}))}resolveUuid(e){return this.wire.sendAction(\"resolve-uuid\",{entityKey:e}).then((({payload:e})=>e.data))}executeOnRemote(e,t){return t.requestingIdentity=e,this.wire.ferryAction(t)}readRegistryValue(e,t,n){return this.wire.sendAction(\"read-registry-value\",{rootKey:e,subkey:t,value:n}).then((({payload:e})=>e.data))}registerExternalConnection(e){return this.wire.sendAction(\"register-external-connection\",{uuid:e}).then((({payload:e})=>e.data))}async getServiceConfiguration(e){if(\"string\"!=typeof e.name)throw new Error(\"Must provide an object with a `name` property having a string value\");const{name:t}=e;return this.wire.sendAction(\"get-service-configuration\",{name:t}).then((({payload:e})=>e.data))}async getSystemAppConfig(e){if(\"string\"!=typeof e)throw new Error(\"Must provide a string value for name of system app\");return this.wire.sendAction(\"get-system-app-configuration\",{name:e}).then((({payload:e})=>e.data))}async registerShutdownHandler(e){this.wire.sendAction(\"system-register-shutdown-handler\").catch((e=>{}));const{uuid:t,name:n}=this.wire.me;this.on(\"system-shutdown\",(i=>{e({proceed:()=>{this.wire.environment.raiseEvent(\"application/system-shutdown-handled\",{uuid:t,name:n,topic:\"application\"})}})}))}runRvmHealthCheck(){return this.wire.sendAction(\"run-rvm-health-check\").then((({payload:e})=>e.data))}async launchManifest(e,t={}){const{subscribe:n,...i}=t,r=i;if(n){const e=new ae.EventEmitter;n(e);const t=\"app-version-progress\",i=\"runtime-status\",o=\"app-version-complete\",s=\"app-version-error\",a=this.wire.environment.getNextMessageId().toString();r.appVersionId=a;const c=[o,t,i,s],d=e=>{const{appVersionId:t,topic:n,type:i,...r}=e;return{...r,type:c.find((e=>i.includes(e)))}},h=t=>{const n=d(t);e.emit(n.type,n)},l=()=>{this.removeListener(`${t}.${a}`,h),this.removeListener(`${i}.${a}`,h),this.removeListener(`${o}.${a}`,h),this.removeListener(`${s}.${a}`,h),this.removeListener(`${o}.${a}`,l),this.removeListener(`${s}.${a}`,l)};await Promise.all([this.on(`${t}.${a}`,h),this.on(`${i}.${a}`,h),this.once(`${o}.${a}`,h),this.once(`${s}.${a}`,h),this.once(`${o}.${a}`,l),this.once(`${s}.${a}`,l)])}return(await this.wire.sendAction(\"launch-manifest\",{manifestUrl:e,opts:r})).payload.data.manifest}async queryPermissionForCurrentContext(e){const t={uuid:this.wire.me.uuid,name:this.wire.me.name};return(await this.wire.sendAction(\"query-permission-for-current-context\",{apiName:e,identity:t})).payload.data}async enableNativeWindowIntegrationProvider(e){const{payload:t}=await this.wire.sendAction(\"enable-native-window-integration-provider\",{permissions:e});return t.data}async registerUsage({data:e,type:t}){await this.wire.sendAction(\"register-usage\",{data:e,type:t})}async getPrinters(){const{payload:e}=await this.wire.sendAction(\"system-get-printers\");return e.data}async updateProcessLoggingOptions(e){await this.wire.sendAction(\"system-update-process-logging-options\",{options:e})}async getDomainSettings(){const{payload:{data:e}}=await this.wire.sendAction(\"get-domain-settings\",this.identity);return e}async setDomainSettings(e){await this.wire.sendAction(\"set-domain-settings\",{domainSettings:e,...this.identity})}async refreshExtensions(){const{payload:e}=await this.wire.sendAction(\"refresh-extensions\");return e.data}async getInstalledExtensions(){const{payload:e}=await this.wire.sendAction(\"get-installed-extensions\");return e.data}}c.System=ce;var de={},he={};Object.defineProperty(he,\"__esModule\",{value:!0}),he.RefCounter=void 0;he.RefCounter=class{constructor(){this.topicRefMap=new Map}incRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t+1;n=i,this.topicRefMap.set(e,i)}else this.topicRefMap.set(e,1),n=1;return n}decRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t-1;this.topicRefMap.set(e,i),n=i}else n=-1;return n}actOnFirst(e,t,n){return 1===this.incRefCount(e)?t():n()}actOnLast(e,t,n){return 0===this.decRefCount(e)?t():n()}};var le={},ue={},pe={};Object.defineProperty(pe,\"__esModule\",{value:!0}),pe.ChannelBase=pe.ProtectedItems=void 0;const we=e=>async(t,n,i)=>{const r=await e(t,n,i);return void 0===r?n:r};pe.ProtectedItems=class{constructor(e,t){this.providerIdentity=e,this.close=t}};class ye{static defaultAction(e){throw new Error(`No action registered at target for ${e}`)}constructor(){this.subscriptions=new Map}async processAction(e,t,n){try{const i=this.subscriptions.has(e)?this.subscriptions.get(e):(t,n)=>(this.defaultAction??ye.defaultAction)(e,t,n),r=this.preAction?await this.preAction(e,t,n):t,o=await i(r,n);return this.postAction?await this.postAction(e,o,n):o}catch(t){if(this.errorMiddleware)return this.errorMiddleware(e,t,n);throw t}}beforeAction(e){if(this.preAction)throw new Error(\"Already registered beforeAction middleware\");this.preAction=we(e)}onError(e){if(this.errorMiddleware)throw new Error(\"Already registered error middleware\");this.errorMiddleware=e}afterAction(e){if(this.postAction)throw new Error(\"Already registered afterAction middleware\");this.postAction=we(e)}remove(e){this.subscriptions.delete(e)}setDefaultAction(e){if(this.defaultAction)throw new Error(\"default action can only be set once\");this.defaultAction=e}register(e,t){if(this.subscriptions.has(e))throw new Error(`Subscription already registered for action: ${e}. Unsubscribe before adding new subscription`);return this.subscriptions.set(e,t),!0}}pe.ChannelBase=ye;var fe,ge,me,ve=s&&s.__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)},Ce=s&&s.__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};Object.defineProperty(ue,\"__esModule\",{value:!0}),ue.ChannelClient=void 0;const be=pe,Ie=new Map;class Ee extends be.ChannelBase{static closeChannelByEndpointId(e){const t=Ie.get(e);t&&ve(t,me,\"f\").call(t)}static handleProviderDisconnect(e){for(const t of Ie.values())t.providerIdentity.channelId===e.channelId&&(t.disconnectListener(e),ve(t,me,\"f\").call(t))}constructor(e,t,n){super(),fe.set(this,void 0),ge.set(this,void 0),this.processAction=(e,t,n)=>super.processAction(e,t,n),me.set(this,(()=>{Ie.delete(this.endpointId),ve(this,ge,\"f\").close()})),Ce(this,fe,new be.ProtectedItems(e,t),\"f\"),this.disconnectListener=()=>{},this.endpointId=e.endpointId,Ce(this,ge,n,\"f\"),Ie.set(this.endpointId,this),n.receive(this.processAction)}get providerIdentity(){return ve(this,fe,\"f\").providerIdentity}async dispatch(e,t){if(ve(this,ge,\"f\").isEndpointConnected(this.providerIdentity.channelId))return ve(this,ge,\"f\").send(this.providerIdentity.channelId,e,t);throw new Error(\"The client you are trying to dispatch from is disconnected from the target provider.\")}onDisconnection(e){this.disconnectListener=t=>{try{e(t)}catch(e){throw new Error(`Error while calling the onDisconnection callback: ${e.message}`)}finally{this.disconnectListener=()=>{}}}}async disconnect(){await this.sendDisconnectAction(),ve(this,me,\"f\").call(this)}async sendDisconnectAction(){const e=ve(this,fe,\"f\");await e.close()}static async wireClose(e,t,n){const{channelName:i,uuid:r,name:o}=t;await e.sendAction(\"disconnect-from-channel\",{channelName:i,uuid:r,name:o,endpointId:n})}}ue.ChannelClient=Ee,fe=new WeakMap,ge=new WeakMap,me=new WeakMap;var xe={},Ae={};Object.defineProperty(Ae,\"__esModule\",{value:!0}),Ae.exhaustiveCheck=void 0,Ae.exhaustiveCheck=function(e,t){throw new Error(`Unsupported value: ${e}${t?`\\n Supported values are: ${t.join(\"\")}`:\"\"}`)};var Pe,Me,_e,Oe={},Se=s&&s.__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},Re=s&&s.__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)};Object.defineProperty(Oe,\"__esModule\",{value:!0}),Oe.ClassicInfo=Oe.ClassicStrategy=void 0;Oe.ClassicStrategy=class{constructor(e,t,n,i){this.messageReceiver=t,this.endpointId=n,this.providerIdentity=i,Pe.set(this,void 0),Me.set(this,new Map),_e.set(this,new Map),this.send=async(e,t,n)=>{const i=Re(this,Me,\"f\").get(e);if(!i)throw new Error(`Could not locate routing info for endpoint ${e}`);const r={...i};r.isLocalEndpointId&&delete r.endpointId,delete r.isLocalEndpointId;const o=Re(this,Pe,\"f\").sendAction(\"send-channel-message\",{...r,providerIdentity:this.providerIdentity,action:t,payload:n});Re(this,_e,\"f\").get(e)?.add(o);return(await o.catch((e=>{throw new Error(e.message)})).finally((()=>{Re(this,_e,\"f\").get(e)?.delete(o)}))).payload.data.result},this.close=async()=>{this.messageReceiver.removeEndpoint(this.providerIdentity.channelId,this.endpointId),[...Re(this,Me,\"f\").keys()].forEach((e=>this.closeEndpoint(e))),Se(this,Me,new Map,\"f\")},Se(this,Pe,e,\"f\")}onEndpointDisconnect(e,t){}receive(e){this.messageReceiver.addEndpoint(e,this.providerIdentity.channelId,this.endpointId)}async closeEndpoint(e){const t=Re(this,Me,\"f\").get(e);Re(this,Me,\"f\").delete(e);const n=Re(this,_e,\"f\").get(e);n?.forEach((n=>{const i=`Channel connection with identity uuid: ${t?.uuid} / name: ${t?.name} / endpointId: ${e} no longer connected.`;n.cancel(new Error(i))}))}isEndpointConnected(e){return Re(this,Me,\"f\").has(e)}addEndpoint(e,t){Re(this,Me,\"f\").set(e,t.endpointIdentity),Re(this,_e,\"f\").set(e,new Set)}isValidEndpointPayload(e){return\"string\"==typeof e?.endpointIdentity?.endpointId||\"string\"==typeof e?.endpointIdentity?.channelId}},Pe=new WeakMap,Me=new WeakMap,_e=new WeakMap,Oe.ClassicInfo={version:5,minimumVersion:0,type:\"classic\"};var Fe={},je={},ke={};Object.defineProperty(ke,\"__esModule\",{value:!0}),ke.errorToPOJO=void 0,ke.errorToPOJO=function(e){return{stack:e.stack,name:e.name,message:e.message,toString:()=>e.stack||e.toString()}};var Le,Te,$e=s&&s.__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)},Be=s&&s.__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};Object.defineProperty(je,\"__esModule\",{value:!0}),je.RTCEndpoint=void 0;const Ge=ke;je.RTCEndpoint=class{static isValidEndpointPayload(e){const t=e=>\"object\"==typeof e&&null!==e;return t(e)&&t(e.endpointIdentity)&&t(e.rtc)&&\"string\"==typeof e.endpointIdentity.endpointId}constructor({rtc:e,endpointIdentity:t}){this.responseMap=new Map,Le.set(this,null),Te.set(this,void 0),this.connectionStateChangeHandler=e=>{\"connected\"!==this.rtc.rtcClient.connectionState&&(this.rtc.rtcClient.removeEventListener(\"connectionstatechange\",this.connectionStateChangeHandler),this.close(),$e(this,Te,\"f\")&&$e(this,Te,\"f\").call(this))},this.send=async(e,t)=>{const n=`message-${Math.random()}`,i=new Promise(((e,t)=>{this.responseMap.set(n,{resolve:e,reject:t})}));return this.rtc.channels.request.send(JSON.stringify({action:e,payload:t,messageId:n})),i},this.close=()=>{this.responseMap.forEach((e=>e.reject(\"Connection has closed.\"))),this.responseMap=new Map,this.rtc.channels.request.close(),this.rtc.channels.response.close(),this.rtc.rtcClient.close()},this.rtc=e,this.endpointIdentity=t,this.rtc.channels.response.addEventListener(\"message\",(e=>{let{data:t}=e;e.data instanceof ArrayBuffer&&(t=(new TextDecoder).decode(e.data));const{messageId:n,payload:i,success:r,error:o}=JSON.parse(t),{resolve:s,reject:a}=this.responseMap.get(n)??{};s&&a?(this.responseMap.delete(n),r?s(i):a(o)):(console.log(\"Could not find id in responseMap.\"),console.log(e))})),this.rtc.channels.request.addEventListener(\"message\",(async e=>{let{data:n}=e;e.data instanceof ArrayBuffer&&(n=(new TextDecoder).decode(e.data));const{messageId:i,action:r,payload:o}=JSON.parse(n);if($e(this,Le,\"f\"))try{const e=await $e(this,Le,\"f\").call(this,r,o,t);this.rtc.channels.response.send(JSON.stringify({messageId:i,payload:e,success:!0}))}catch(e){\"open\"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,error:(0,Ge.errorToPOJO)(e),success:!1}))}else\"open\"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,success:!1,error:\"Connection not ready.\"}))})),this.rtc.rtcClient.addEventListener(\"connectionstatechange\",this.connectionStateChangeHandler),Object.values(this.rtc.channels).forEach((e=>{e.onclose=e=>{[...this.responseMap.values()].forEach((e=>e.reject(new Error(\"RTCDataChannel closed unexpectedly, this is most commonly caused by message size. Note: RTC Channels have a message size limit of ~255kB.\")))),this.close(),$e(this,Te,\"f\")&&$e(this,Te,\"f\").call(this)}}))}onDisconnect(e){if($e(this,Te,\"f\"))throw new Error(\"RTCEndpoint disconnectListener cannot be set twice.\");Be(this,Te,e,\"f\")}receive(e){if($e(this,Le,\"f\"))throw new Error(\"You have already set a listener for this RTC Endpoint.\");Be(this,Le,e,\"f\")}get connected(){return\"connected\"===this.rtc.rtcClient.connectionState}},Le=new WeakMap,Te=new WeakMap;var We,He,Ne,De={},Ue=s&&s.__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)},Ve=s&&s.__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};Object.defineProperty(De,\"__esModule\",{value:!0}),De.EndpointStrategy=void 0;De.EndpointStrategy=class{constructor(e,t,n){this.EndpointType=e,this.StrategyName=n,We.set(this,null),He.set(this,new Map),Ne.set(this,!0),this.send=async(e,t,n)=>this.getEndpointById(e).send(t,n),this.close=async()=>{Ue(this,Ne,\"f\")&&(Ue(this,He,\"f\").forEach((e=>e.close())),Ve(this,He,new Map,\"f\")),Ve(this,Ne,!1,\"f\")},this.isValidEndpointPayload=t}onEndpointDisconnect(e,t){this.getEndpointById(e).onDisconnect(t)}receive(e){if(Ue(this,We,\"f\"))throw new Error(`You have already set a listener for this ${this.StrategyName} Strategy`);Ve(this,We,e,\"f\"),Ue(this,He,\"f\").forEach((e=>e.receive(Ue(this,We,\"f\"))))}getEndpointById(e){const t=Ue(this,He,\"f\").get(e);if(!t)throw new Error(`Client with endpoint id ${e} is not connected`);return t}get connected(){return Ue(this,Ne,\"f\")}isEndpointConnected(e){return Ue(this,He,\"f\").has(e)}addEndpoint(e,t){if(!Ue(this,Ne,\"f\"))return void console.warn(`Adding endpoint to disconnected ${this.StrategyName} Strategy`);const n=new this.EndpointType(t);Ue(this,We,\"f\")&&n.receive(Ue(this,We,\"f\")),Ue(this,He,\"f\").set(e,n)}async closeEndpoint(e){Ue(this,He,\"f\").delete(e)}},We=new WeakMap,He=new WeakMap,Ne=new WeakMap,Object.defineProperty(Fe,\"__esModule\",{value:!0}),Fe.RTCInfo=Fe.RTCStrategy=void 0;const ze=je,Ke=De;class qe extends Ke.EndpointStrategy{constructor(){super(ze.RTCEndpoint,ze.RTCEndpoint.isValidEndpointPayload,\"RTC\")}}Fe.RTCStrategy=qe,Fe.RTCInfo={version:2,minimumVersion:0,type:\"rtc\"};var Je={};Object.defineProperty(Je,\"__esModule\",{value:!0}),Je.RTCICEManager=void 0;const Ye=d;class Ze extends Ye.EmitterBase{constructor(e){super(e,\"channel\"),this.ensureChannelOpened=e=>new Promise(((t,n)=>{if(\"open\"===e.readyState)t();else if(\"connecting\"===e.readyState){const n=()=>{e.removeEventListener(\"open\",n),t()};e.addEventListener(\"open\",n)}else n(new Error(\"This Channel has already closed\"))}))}static createDataChannelPromise(e,t){let n;const i=new Promise((e=>{n=e})),r=i=>{const o=()=>{i.channel.removeEventListener(\"open\",o),n(i.channel)};i.channel.label===e&&(i.channel.addEventListener(\"open\",o),t.removeEventListener(\"datachannel\",r))};return t.addEventListener(\"datachannel\",r),i}async listenForProviderIce(e,t){await this.on(this.createProviderEventName(e),t,{timestamp:Date.now()})}async raiseProviderIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createProviderEventName(e)),t)}async listenForClientIce(e,t){await this.on(this.createClientEventName(e),t,{timestamp:Date.now()})}async raiseClientIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createClientEventName(e)),t)}cleanupIceListeners(e){this.removeAllListeners(this.createClientEventName(e)),this.removeAllListeners(this.createProviderEventName(e))}createClientEventName(e){return`ice-client-${e}`}createProviderEventName(e){return`ice-provider-${e}`}createRouteString(e){return`channel/${e}`}createRtcPeer(){return this.wire.environment.getRtcPeer()}async startClientOffer(){const e=Math.random().toString(),t=this.createRtcPeer();t.addEventListener(\"icecandidate\",(async t=>{t.candidate&&await this.raiseClientIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForProviderIce(e,(async e=>{await t.addIceCandidate(e.candidate)}));const n={request:t.createDataChannel(\"request\"),response:t.createDataChannel(\"response\")},i=await t.createOffer();await t.setLocalDescription(i);const r=Promise.all([n.request,n.response].map(this.ensureChannelOpened)).then((()=>{}));return{rtcClient:t,channels:n,offer:i,rtcConnectionId:e,channelsOpened:r}}async finishClientOffer(e,t,n){return await e.setRemoteDescription(t),await n,!0}async createProviderAnswer(e,t){const n=this.createRtcPeer(),i=Ze.createDataChannelPromise(\"request\",n),r=Ze.createDataChannelPromise(\"response\",n);n.addEventListener(\"icecandidate\",(async t=>{t.candidate&&await this.raiseProviderIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForClientIce(e,(async e=>{await n.addIceCandidate(e.candidate)})),await n.setRemoteDescription(t);const o=await n.createAnswer();await n.setLocalDescription(o);const s=Promise.all([i,r]).then((([t,n])=>(this.cleanupIceListeners(e),{request:t,response:n})));return{rtcClient:n,answer:o,channels:s}}}Je.RTCICEManager=Ze;var Qe={},Xe={};function et(e){return[...e.split(\".\").reverse().entries()].reduce(((e,[t,n])=>e+ +n*1e4**t),0)}function tt(e,t){return et(e)>=et(t)}function nt(e){return e.split(\"/\")[0]}Object.defineProperty(Xe,\"__esModule\",{value:!0}),Xe.runtimeUuidMeetsMinimumRuntimeVersion=Xe.parseRuntimeUuid=Xe.meetsMinimumRuntimeVersion=void 0,Xe.meetsMinimumRuntimeVersion=tt,Xe.parseRuntimeUuid=nt,Xe.runtimeUuidMeetsMinimumRuntimeVersion=function(e,t){return tt(nt(e),t)};var it,rt,ot,st,at,ct=s&&s.__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)},dt=s&&s.__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};Object.defineProperty(Qe,\"__esModule\",{value:!0}),Qe.ChannelProvider=void 0;const ht=pe,lt=Xe;class ut extends ht.ChannelBase{get connections(){return[...ct(this,it,\"f\")]}static handleClientDisconnection(e,t){const n=e.connections.find((e=>e.endpointId===t.endpointId));if(n)ct(e,st,\"f\").call(e,n);else{e.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name)).forEach(ct(e,st,\"f\"))}e.disconnectListener(t)}static setProviderRemoval(e,t){ut.removalMap.set(e,t)}constructor(e,t,n){super(),it.set(this,void 0),rt.set(this,void 0),ot.set(this,void 0),st.set(this,(e=>{const t=this.connections.filter((t=>t.endpointId!==e.endpointId));ct(this,ot,\"f\").closeEndpoint(e.endpointId),dt(this,it,t,\"f\")})),this.processAction=async(e,t,n)=>(ut.clientIsMultiRuntime(n)&&!(0,lt.runtimeUuidMeetsMinimumRuntimeVersion)(n.runtimeUuid,\"18.87.56.0\")?this.handleMultiRuntimeLegacyClient(n):this.checkForClientConnection(n),super.processAction(e,t,n)),at.set(this,(()=>{ct(this,ot,\"f\").close();const e=ut.removalMap.get(this);e&&e()})),dt(this,rt,new ht.ProtectedItems(e,t),\"f\"),this.connectListener=()=>{},this.disconnectListener=()=>{},dt(this,it,[],\"f\"),dt(this,ot,n,\"f\"),n.receive(this.processAction)}dispatch(e,t,n){const i=e.endpointId??this.getEndpointIdForOpenFinId(e,t);return i&&ct(this,ot,\"f\").isEndpointConnected(i)?ct(this,ot,\"f\").send(i,t,n):Promise.reject(new Error(`Client connection with identity uuid: ${e.uuid} / name: ${e.name} / endpointId: ${i} no longer connected.`))}async processConnection(e,t){return ct(this,it,\"f\").push(e),this.connectListener(e,t)}publish(e,t){return this.connections.map((n=>ct(this,ot,\"f\").send(n.endpointId,e,t)))}onConnection(e){this.connectListener=e}onDisconnection(e){this.disconnectListener=e}async destroy(){const e=ct(this,rt,\"f\");e.providerIdentity,dt(this,it,[],\"f\"),await e.close(),ct(this,at,\"f\").call(this)}async getAllClientInfo(){return this.connections.map((e=>{const{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}=e;return{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}}))}checkForClientConnection(e){if(!this.isClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider.\\n Client Identity: {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}isClientConnected(e){return ut.clientIdentityIncludesEndpointId(e)?this.connections.some((t=>t.endpointId===e.endpointId&&t.uuid===e.uuid&&t.name===e.name)):this.isLegacyClientConnected(e)}isLegacyClientConnected(e){return this.connections.some((t=>t.uuid===e.uuid&&t.name===e.name))}handleMultiRuntimeLegacyClient(e){if(!this.isLegacyClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider. Client Identity:\\n {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}getEndpointIdForOpenFinId(e,t){const n=this.connections.filter((t=>t.name===e.name&&t.uuid===e.uuid));if(n.length>=2){const n=ct(this,rt,\"f\"),{uuid:i,name:r}=e,o=n?.providerIdentity.uuid,s=n?.providerIdentity.name;console.warn(`WARNING: Dispatch call may have unintended results. The \"to\" argument of your dispatch call is missing the\\n \"endpointId\" parameter. The identity you are dispatching to ({uuid: ${i}, name: ${r}})\\n has multiple channelClients for this channel. Your dispatched action: (${t}) from the provider:\\n ({uuid: ${o}, name: ${s}}) will only be processed by the most recently-created client.`)}return n.pop()?.endpointId}static clientIdentityIncludesEndpointId(e){return void 0!==e.endpointId}static clientIsMultiRuntime(e){return void 0!==e.runtimeUuid}static async wireClose(e,t){await e.sendAction(\"destroy-channel\",{channelName:t})}}Qe.ChannelProvider=ut,it=new WeakMap,rt=new WeakMap,ot=new WeakMap,st=new WeakMap,at=new WeakMap,ut.removalMap=new WeakMap;var pt={};Object.defineProperty(pt,\"__esModule\",{value:!0}),pt.MessageReceiver=void 0;const wt=ue,yt=d;class ft extends yt.Base{constructor(e){super(e),this.onmessage=e=>\"process-channel-message\"===e.action&&(this.processChannelMessage(e),!0),this.endpointMap=new Map,this.latestEndpointIdByChannelId=new Map,e.registerMessageHandler(this.onmessage.bind(this))}async processChannelMessage(e){const{senderIdentity:t,providerIdentity:n,action:i,ackToSender:r,payload:o,intendedTargetIdentity:s}=e.payload,a=s.channelId??s.endpointId??this.latestEndpointIdByChannelId.get(n.channelId),c=this.endpointMap.get(a);if(!c)return r.payload.success=!1,r.payload.reason=`Client connection with identity uuid: ${this.wire.me.uuid} / name: ${this.wire.me.name} / endpointId: ${a} no longer connected.`,this.wire.sendRaw(r);try{const e=await c(i,o,t);return r.payload.payload=r.payload.payload||{},r.payload.payload.result=e,this.wire.sendRaw(r)}catch(e){return r.payload.success=!1,r.payload.reason=e.message,this.wire.sendRaw(r)}}addEndpoint(e,t,n){this.endpointMap.set(n,e),t!==n&&this.latestEndpointIdByChannelId.set(t,n)}removeEndpoint(e,t){this.endpointMap.delete(t),this.latestEndpointIdByChannelId.get(e)===t&&this.latestEndpointIdByChannelId.delete(e)}checkForPreviousClientConnection(e){const t=this.latestEndpointIdByChannelId.get(e);t&&(wt.ChannelClient.closeChannelByEndpointId(t),console.warn(\"You have created a second connection to an older provider. First connection has been removed from the clientMap\"),console.warn(\"If the provider calls publish(), you may receive multiple messages.\"))}}pt.MessageReceiver=ft;var gt={};Object.defineProperty(gt,\"__esModule\",{value:!0}),gt.ProtocolManager=void 0;gt.ProtocolManager=class{constructor(e){this.ProtocolsInPreferenceOrder=e,this.DefaultClientProtocols=[\"classic\"],this.DefaultProviderProtocols=[\"classic\"],this.getClientProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultClientProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(\", \")}.`);return t},this.getProviderProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultProviderProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(\", \")}.`);return t},this.getCompatibleProtocols=(e,t)=>t.supportedProtocols.filter((t=>e.some((e=>e.type===t.type&&t.version>=e.minimumVersion&&e.version>=(t.minimumVersion??0))))).slice(0,t.maxProtocols)}};var mt={};Object.defineProperty(mt,\"__esModule\",{value:!0});class vt{static combine(e,t){return new vt(e,t)}constructor(e,t){this.primary=e,this.secondary=t}onEndpointDisconnect(e,t){this.primary.onEndpointDisconnect(e,(()=>{this.secondary.isEndpointConnected(e)||t()})),this.secondary.onEndpointDisconnect(e,(()=>{this.primary.isEndpointConnected(e)||t()}))}isValidEndpointPayload(e){return this.primary.isValidEndpointPayload(e)||this.secondary.isValidEndpointPayload(e)}async closeEndpoint(e){await this.primary.closeEndpoint(e),await this.secondary.closeEndpoint(e)}isEndpointConnected(e){return this.primary.isEndpointConnected(e)||this.secondary.isEndpointConnected(e)}async addEndpoint(e,t){this.primary.isValidEndpointPayload(t)&&await this.primary.addEndpoint(e,t),this.secondary.isValidEndpointPayload(t)&&await this.secondary.addEndpoint(e,t)}receive(e){this.primary.receive(e),this.secondary.receive(e)}send(e,t,n){return this.primary.isEndpointConnected(e)?this.primary.send(e,t,n):this.secondary.send(e,t,n)}async close(){await Promise.all([this.primary.close(),this.secondary.close()])}}mt.default=vt;var Ct,bt,It=s&&s.__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},Et=s&&s.__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)},xt=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(xe,\"__esModule\",{value:!0}),xe.ConnectionManager=void 0;const At=Ae,Pt=d,Mt=Oe,_t=Fe,Ot=Je,St=Qe,Rt=pt,Ft=gt,jt=xt(mt);class kt extends Pt.Base{static getProtocolOptionsFromStrings(e){return e.map((e=>{switch(e){case\"rtc\":return _t.RTCInfo;case\"classic\":return Mt.ClassicInfo;default:return(0,At.exhaustiveCheck)(e,[\"rtc\",\"classic\"])}}))}constructor(e){super(e),Ct.set(this,void 0),bt.set(this,void 0),this.removeChannelFromProviderMap=e=>{this.providerMap.delete(e)},this.onmessage=e=>\"process-channel-connection\"===e.action&&(this.processChannelConnection(e),!0),this.providerMap=new Map,this.protocolManager=new Ft.ProtocolManager(\"node\"===this.wire.environment.type?[\"classic\"]:[\"rtc\",\"classic\"]),It(this,Ct,new Rt.MessageReceiver(e),\"f\"),It(this,bt,new Ot.RTCICEManager(e),\"f\"),e.registerMessageHandler(this.onmessage.bind(this))}createProvider(e,t){const n=Object.assign(this.wire.environment.getDefaultChannelOptions().create,e||{}),i=this.protocolManager.getProviderProtocols(n?.protocols),r=i.map((e=>{switch(e){case\"rtc\":return new _t.RTCStrategy;case\"classic\":return new Mt.ClassicStrategy(this.wire,Et(this,Ct,\"f\"),t.channelId,t);default:return(0,At.exhaustiveCheck)(e,[\"rtc\",\"classic\"])}}));let o;if(2===r.length){const[e,t]=r;o=jt.default.combine(e,t)}else{if(1!==r.length)throw new Error(\"failed to combine strategies\");[o]=r}const s=new St.ChannelProvider(t,(()=>St.ChannelProvider.wireClose(this.wire,t.channelName)),o),a=t.channelId;return this.providerMap.set(a,{provider:s,strategy:o,supportedProtocols:kt.getProtocolOptionsFromStrings(i)}),St.ChannelProvider.setProviderRemoval(s,this.removeChannelFromProviderMap.bind(this)),s}async createClientOffer(e){const t=this.protocolManager.getClientProtocols(e?.protocols);let n;return{offer:{supportedProtocols:await Promise.all(t.map((async e=>{switch(e){case\"rtc\":{const{rtcClient:e,channels:t,offer:i,rtcConnectionId:r,channelsOpened:o}=await Et(this,bt,\"f\").startClientOffer();return n={rtcClient:e,channels:t,channelsOpened:o},{type:\"rtc\",version:_t.RTCInfo.version,payload:{offer:i,rtcConnectionId:r}}}case\"classic\":return{type:\"classic\",version:Mt.ClassicInfo.version};default:return(0,At.exhaustiveCheck)(e,[\"rtc\",\"classic\"])}}))),maxProtocols:2},rtc:n}}async createClientStrategy(e,t){t.endpointId||(t.endpointId=this.wire.environment.getNextMessageId(),Et(this,Ct,\"f\").checkForPreviousClientConnection(t.channelId));const n=t.answer??{supportedProtocols:[{type:\"classic\",version:1}]},i=(await Promise.all(n.supportedProtocols.map((async n=>\"rtc\"===n.type&&e?(await Et(this,bt,\"f\").finishClientOffer(e.rtcClient,n.payload.answer,e.channelsOpened),new _t.RTCStrategy):\"classic\"===n.type?new Mt.ClassicStrategy(this.wire,Et(this,Ct,\"f\"),t.endpointId,t):null)))).filter((e=>null!==e));let r;if(e&&!i.some((e=>e instanceof _t.RTCStrategy))&&e&&e.rtcClient.close(),i.length>=2)r=jt.default.combine(i[0],i[1]);else{if(!i.length)throw new Error(\"No compatible protocols\");[r]=i}const o={endpointIdentity:t,rtc:e};return r.addEndpoint(t.channelId,o),r}async processChannelConnection(e){const{clientIdentity:t,providerIdentity:n,ackToSender:i,payload:r,offer:o}=e.payload;t.endpointId?t.isLocalEndpointId=!1:(t.endpointId=this.wire.environment.getNextMessageId(),t.isLocalEndpointId=!0);const s=n.channelId,a=this.providerMap.get(s);if(!a)return i.payload.success=!1,i.payload.reason=`Channel \"${n.channelName}\" has been destroyed.`,this.wire.sendRaw(i);const{provider:c,strategy:d,supportedProtocols:h}=a;try{if(!(c instanceof St.ChannelProvider))throw Error(\"Cannot connect to a channel client\");const e=o??{supportedProtocols:[{type:\"classic\",version:1}],maxProtocols:1},n=this.protocolManager.getCompatibleProtocols(h,e);if(!n.length)throw new Error(\"This provider does not support any of the offered protocols.\");const s=await c.processConnection(t,r);i.payload.payload=i.payload.payload||{};let a={supportedProtocols:[],endpointPayloadPromise:Promise.resolve({endpointIdentity:t})};return a=await n.reduce((async(e,t)=>{const n=await e;if(\"rtc\"===t.type){const{answer:e,rtcClient:i,channels:r}=await Et(this,bt,\"f\").createProviderAnswer(t.payload.rtcConnectionId,t.payload.offer);n.supportedProtocols.push({type:\"rtc\",version:_t.RTCInfo.version,payload:{answer:e}}),n.endpointPayloadPromise=n.endpointPayloadPromise.then((e=>r.then((t=>({...e,rtc:{rtcClient:i,channels:t}})))))}else n.supportedProtocols.push({type:\"classic\",version:Mt.ClassicInfo.version});return n}),Promise.resolve(a)),a.endpointPayloadPromise.then((e=>d.addEndpoint(t.endpointId,e))),i.payload.payload.result=s,i.payload.payload.answer=a,this.wire.sendRaw(i)}catch(e){return i.payload.success=!1,i.payload.reason=e.message,this.wire.sendRaw(i)}}}xe.ConnectionManager=kt,Ct=new WeakMap,bt=new WeakMap;var Lt,Tt,$t,Bt=s&&s.__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},Gt=s&&s.__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)};Object.defineProperty(le,\"__esModule\",{value:!0}),le.Channel=void 0;const Wt=t,Ht=G,Nt=d,Dt=ue,Ut=xe,Vt=Qe;function zt(e){const t=Math.floor(e/10),n=Math.min(3e4,500*2**t);return new Promise((e=>{setTimeout((()=>{e(!1)}),n)}))}class Kt extends Nt.EmitterBase{constructor(e){super(e,\"channel\"),Lt.set(this,void 0),Tt.set(this,new Wt.EventEmitter),$t.set(this,new Ht.AsyncRetryableLazy((async()=>{await Promise.all([this.on(\"disconnected\",(e=>{Dt.ChannelClient.handleProviderDisconnect(e)})),this.on(\"connected\",((...e)=>{Gt(this,Tt,\"f\").emit(\"connected\",...e)}))]).catch((()=>new Error(\"error setting up channel connection listeners\")))}))),Bt(this,Lt,new Ut.ConnectionManager(e),\"f\")}async getAllChannels(){return this.wire.sendAction(\"get-all-channels\").then((({payload:e})=>e.data))}async onChannelConnect(e){await this.on(\"connected\",e)}async onChannelDisconnect(e){await this.on(\"disconnected\",e)}async safeConnect(e,t,n){const i={count:0};do{let r=()=>{};const o=new Promise((t=>{r=n=>{e===n.channelName&&t(!0)},Gt(this,Tt,\"f\").on(\"connected\",r)}));try{if(i.count>0){i.gotConnectedEvent=await Promise.race([zt(i.count),o]);const t=await this.wire.sendAction(\"connect-to-channel\",{...n,retryInfo:i});return console.log(`Successfully connected to channelName: ${e}`),t.payload.data}const t=this.wire.sendAction(\"connect-to-channel\",n);i.originalMessageId=t.messageId;return(await t).payload.data}catch(n){if(!n.message.includes(\"internal-nack\"))throw n;t&&0===i.count&&console.warn(`No channel found for channelName: ${e}. Waiting for connection...`)}finally{i.count+=1,Gt(this,Tt,\"f\").removeListener(\"connected\",r)}}while(t);throw new Error(`No channel found for channelName: ${e}.`)}async connect(e,t={}){if(await Gt(this,$t,\"f\").getValue(),!e||\"string\"!=typeof e)throw new Error(\"Please provide a channelName string to connect to a channel.\");const n={wait:!0,...this.wire.environment.getDefaultChannelOptions().connect,...t},{offer:i,rtc:r}=await Gt(this,Lt,\"f\").createClientOffer(n);let o;(this.fin.me.isFrame||this.fin.me.isView||this.fin.me.isWindow)&&(o=(await this.fin.me.getInfo()).url);const s={channelName:e,...n,offer:i,connectionUrl:o},a=await this.safeConnect(e,n.wait,s),c=await Gt(this,Lt,\"f\").createClientStrategy(r,a),d=new Dt.ChannelClient(a,(()=>Dt.ChannelClient.wireClose(this.wire,a,a.endpointId)),c);return c.onEndpointDisconnect(a.channelId,(async()=>{try{await d.sendDisconnectAction()}catch(e){console.warn(`Something went wrong during disconnect for client with uuid: ${a.uuid} / name: ${a.name} / endpointId: ${a.endpointId}.`)}finally{Dt.ChannelClient.handleProviderDisconnect(a)}})),d}async create(e,t){if(!e)throw new Error(\"Please provide a channelName to create a channel\");const{payload:{data:n}}=await this.wire.sendAction(\"create-channel\",{channelName:e}),i=Gt(this,Lt,\"f\").createProvider(t,n);return this.on(\"client-disconnected\",(t=>{t.channelName===e&&Vt.ChannelProvider.handleClientDisconnection(i,t)})),i}}le.Channel=Kt,Lt=new WeakMap,Tt=new WeakMap,$t=new WeakMap,Object.defineProperty(de,\"__esModule\",{value:!0}),de.InterAppPayload=de.InterApplicationBus=void 0;const qt=t,Jt=d,Yt=he,Zt=le,Qt=O;class Xt extends Jt.Base{constructor(e){super(e),this.events={subscriberAdded:\"subscriber-added\",subscriberRemoved:\"subscriber-removed\"},this.refCounter=new Yt.RefCounter,this.Channel=new Zt.Channel(e),this.emitter=new qt.EventEmitter,e.registerMessageHandler(this.onmessage.bind(this)),this.on=this.emitter.on.bind(this.emitter),this.removeAllListeners=this.emitter.removeAllListeners.bind(this.emitter)}async publish(e,t){await this.wire.sendAction(\"publish-message\",{topic:e,message:t,sourceWindowName:this.me.name})}async send(e,t,n){const i=(0,Qt.validateIdentity)(e);if(i)throw new Error(i);await this.wire.sendAction(\"send-message\",{destinationUuid:e.uuid,destinationWindowName:e.name,topic:t,message:n,sourceWindowName:this.me.name})}subscribe(e,t,n){const i=this.createSubscriptionKey(e.uuid,e.name||\"*\",t);return this.emitter.on(i,n),this.refCounter.actOnFirst(i,(async()=>{await this.wire.sendAction(\"subscribe\",{sourceUuid:e.uuid,sourceWindowName:e.name||\"*\",topic:t,destinationWindowName:this.me.name})}),(()=>Promise.resolve()))}unsubscribe(e,t,n){const i=e.name||\"*\",r=this.createSubscriptionKey(e.uuid,i,t);return this.emitter.removeListener(r,n),this.refCounter.actOnLast(r,(async()=>{await this.wire.sendAction(\"unsubscribe\",{sourceUuid:e.uuid,sourceWindowName:i,topic:t,destinationWindowName:this.me.name})}),(()=>new Promise((e=>e)).then((()=>{}))))}processMessage(e){const{payload:{message:t,sourceWindowName:n,sourceUuid:i,topic:r}}=e,o=[this.createSubscriptionKey(i,n,r),this.createSubscriptionKey(i,\"*\",r),this.createSubscriptionKey(\"*\",\"*\",r)],s={uuid:i,name:n};o.forEach((e=>{this.emitter.emit(e,t,s)}))}emitSubscriverEvent(e,t){const{payload:{targetName:n,uuid:i,topic:r}}=t,o={name:n,uuid:i,topic:r};this.emitter.emit(e,o)}createSubscriptionKey(e,t,n){const i=t||\"*\";if(!(e&&i&&n))throw new Error(\"Missing uuid, name, or topic string\");return function(...e){return e.map((e=>Buffer.from(`${e}`).toString(\"base64\"))).join(\"/\")}(e,i,n)}onmessage(e){const{action:t}=e;switch(t){case\"process-message\":this.processMessage(e);break;case this.events.subscriberAdded:this.emitSubscriverEvent(this.events.subscriberAdded,e);break;case this.events.subscriberRemoved:this.emitSubscriverEvent(this.events.subscriberRemoved,e)}return!0}}de.InterApplicationBus=Xt;de.InterAppPayload=class{};var en={};Object.defineProperty(en,\"__esModule\",{value:!0}),en.Clipboard=void 0;const tn=d;class nn extends tn.Base{async writeText(e){await this.wire.sendAction(\"clipboard-write-text\",e)}async readText(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-text\",{type:e});return t.data}async writeImage(e){await this.wire.sendAction(\"clipboard-write-image\",e)}async readImage(e={format:\"dataURL\"}){const{payload:t}=await this.wire.sendAction(\"clipboard-read-image\",e);return t.data}async writeHtml(e){await this.wire.sendAction(\"clipboard-write-html\",e)}async readHtml(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-html\",{type:e});return t.data}async writeRtf(e){await this.wire.sendAction(\"clipboard-write-rtf\",e)}async readRtf(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-rtf\",{type:e});return t.data}async write(e){await this.wire.sendAction(\"clipboard-write\",e)}async getAvailableFormats(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-formats\",{type:e});return t.data}}en.Clipboard=nn;var rn={},on={},sn={};Object.defineProperty(sn,\"__esModule\",{value:!0}),sn.ExternalApplication=void 0;const an=d;class cn extends an.EmitterBase{constructor(e,t){super(e,\"external-application\",t.uuid),this.identity=t}getInfo(){return this.wire.sendAction(\"get-external-application-info\",this.identity).then((({payload:e})=>e.data))}}sn.ExternalApplication=cn,Object.defineProperty(on,\"__esModule\",{value:!0}),on.ExternalApplicationModule=void 0;const dn=d,hn=sn;class ln extends dn.Base{wrap(e){return this.wire.sendAction(\"external-application-wrap\").catch((e=>{})),Promise.resolve(new hn.ExternalApplication(this.wire,{uuid:e}))}wrapSync(e){return this.wire.sendAction(\"external-application-wrap-sync\").catch((e=>{})),new hn.ExternalApplication(this.wire,{uuid:e})}}on.ExternalApplicationModule=ln,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(on,e),n(sn,e)}(rn);var un={},pn={},wn={};Object.defineProperty(wn,\"__esModule\",{value:!0}),wn._Frame=void 0;const yn=d;class fn extends yn.EmitterBase{constructor(e,t){super(e,\"frame\",t.uuid,t.name),this.identity=t}getInfo(){return this.wire.sendAction(\"get-frame-info\",this.identity).then((({payload:e})=>e.data))}getParentWindow(){return this.wire.sendAction(\"get-parent-window\",this.identity).then((({payload:e})=>e.data))}}wn._Frame=fn,Object.defineProperty(pn,\"__esModule\",{value:!0}),pn._FrameModule=void 0;const gn=d,mn=O,vn=wn;class Cn extends gn.Base{async wrap(e){this.wire.sendAction(\"frame-wrap\").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}wrapSync(e){this.wire.sendAction(\"frame-wrap-sync\").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}getCurrent(){return this.wire.sendAction(\"frame-get-current\").catch((e=>{})),Promise.resolve(new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity()))}getCurrentSync(){return this.wire.sendAction(\"frame-get-current-sync\").catch((e=>{})),new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity())}}pn._FrameModule=Cn,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(pn,e),n(wn,e)}(un);var bn={};Object.defineProperty(bn,\"__esModule\",{value:!0}),bn.GlobalHotkey=void 0;const In=d;class En extends In.EmitterBase{constructor(e){super(e,\"global-hotkey\")}async register(e,t){await this.on(e,t),await this.wire.sendAction(\"global-hotkey-register\",{hotkey:e})}async unregister(e){await this.removeAllListeners(e),await this.wire.sendAction(\"global-hotkey-unregister\",{hotkey:e})}async unregisterAll(){await Promise.all(this.eventNames().filter((e=>!(\"registered\"===e||\"unregistered\"===e))).map((e=>this.removeAllListeners(e)))),await this.wire.sendAction(\"global-hotkey-unregister-all\",{})}async isRegistered(e){const{payload:{data:t}}=await this.wire.sendAction(\"global-hotkey-is-registered\",{hotkey:e});return t}}bn.GlobalHotkey=En;var xn,An={},Pn={},Mn={},_n=s&&s.__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)};Object.defineProperty(Mn,\"__esModule\",{value:!0}),Mn.Platform=void 0;const On=d,Sn=O,Rn=new Map;class Fn extends On.EmitterBase{constructor(e,t){super(t.wire,\"application\",e.uuid),this.getClient=e=>{this.wire.sendAction(\"platform-get-client\",this.identity).catch((e=>{}));const t=e||this.identity,{uuid:n}=t;if(!Rn.has(n)){const e=_n(this,xn,\"f\").call(this,n);Rn.set(n,e)}return Rn.get(n)},xn.set(this,(async e=>{try{const t=`custom-frame-${e}`,n=await this._channel.connect(t,{wait:!1});return n.onDisconnection((()=>{Rn.delete(e)})),n}catch(t){throw Rn.delete(e),new Error(\"The targeted Platform is not currently running. Listen for application-started event for the given Uuid.\")}})),this.launchLegacyManifest=this.launchContentManifest;const n=(0,Sn.validateIdentity)(e);if(n)throw new Error(n);this._channel=t,this.identity={uuid:e.uuid},this.Layout=this.fin.Platform.Layout,this.Application=this.fin.Application.wrapSync(this.identity)}async createView(e,t,n){this.wire.sendAction(\"platform-create-view\",this.identity).catch((e=>{}));const i=await this.getClient(),r=await i.dispatch(\"create-view\",{target:t,opts:e,targetView:n});if(!r||(0,Sn.validateIdentity)(r.identity))throw new Error(`When overwriting the createView call, please return an object that has a valid 'identity' property: ${JSON.stringify(r)}`);return this.fin.View.wrapSync(r.identity)}async createWindow(e){this.wire.sendAction(\"platform-create-window\",this.identity).catch((e=>{}));const t=await this.getClient();e.reason||(e.reason=\"api-call\");const n=await t.dispatch(\"create-view-container\",e);if(!n||(0,Sn.validateIdentity)(n.identity))throw new Error(`When overwriting the createWindow call, please return an object that has a valid 'identity' property: ${JSON.stringify(n)}`);const{identity:i}=n,r=this.fin.Window.wrapSync(i);return r.name=i.name,r.uuid=i.uuid,r}async quit(){this.wire.sendAction(\"platform-quit\",this.identity).catch((e=>{}));return(await this.getClient()).dispatch(\"quit\")}async closeView(e){this.wire.sendAction(\"platform-close-view\",this.identity).catch((e=>{}));const t=await this.getClient();await t.dispatch(\"close-view\",{view:e})}async reparentView(e,t){console.warn(\"Platform.reparentView has been deprecated, please use Platform.createView\"),this.wire.sendAction(\"platform-reparent-view\",this.identity).catch((e=>{}));const n={...e,uuid:e.uuid??this.identity.uuid},i=await this.fin.View.wrap(n),r=await i.getOptions();return this.createView(r,t)}async getSnapshot(){this.wire.sendAction(\"platform-get-snapshot\",this.identity).catch((e=>{}));return(await this.getClient()).dispatch(\"get-snapshot\")}async getViewSnapshot(e){return(await this.getClient()).dispatch(\"get-view-snapshot\",{viewIdentity:e})}async applySnapshot(e,t){this.wire.sendAction(\"platform-apply-snapshot\",this.identity).catch((e=>{}));const n=\"Requested snapshot must be a valid Snapshot object, or a url or filepath to such an object.\";let i;if(\"string\"==typeof e)try{i=(await this._channel.wire.sendAction(\"get-application-manifest\",{manifestUrl:e})).payload.data}catch(e){throw new Error(`${n}: ${e}`)}else i=e;if(!i.windows)throw new Error(n);const r=await this.getClient();return await r.dispatch(\"apply-snapshot\",{snapshot:i,options:t}),this}async fetchManifest(e){return(await this.getClient()).dispatch(\"platform-fetch-manifest\",{manifestUrl:e})}async launchContentManifest(e){this.wire.sendAction(\"platform-launch-content-manifest\",this.identity).catch((()=>{}));const t=await this.getClient(),n=await this.fetchManifest(e);return t.dispatch(\"launch-into-platform\",{manifest:n,manifestUrl:e}),this}async setWindowContext(e={},t){if(this.wire.sendAction(\"platform-set-window-context\",this.identity).catch((e=>{})),!e)throw new Error(\"Please provide a serializable object or string to set the context.\");const n=await this.getClient(),{entityType:i}=t?await this.fin.System.getEntityInfo(t.uuid,t.name):this.fin.me;await n.dispatch(\"set-window-context\",{context:e,entityType:i,target:t||{uuid:this.fin.me.uuid,name:this.fin.me.name}})}async getWindowContext(e){this.wire.sendAction(\"platform-get-window-context\",this.identity).catch((e=>{}));const t=await this.getClient(),{entityType:n}=e?await this.fin.System.getEntityInfo(e.uuid,e.name):this.fin.me;return t.dispatch(\"get-window-context\",{target:e||{uuid:this.fin.me.uuid,name:this.fin.me.name},entityType:n})}async closeWindow(e,t={skipBeforeUnload:!1}){this.wire.sendAction(\"platform-close-window\",this.identity).catch((e=>{}));return(await this.getClient()).dispatch(\"close-window\",{windowId:e,options:t})}}Mn.Platform=Fn,xn=new WeakMap;var jn={},kn={},Ln={},Tn={};function $n(e){switch(e){case\"columns\":case\"grid\":case\"rows\":case\"tabs\":return!0;default:return!1}}Object.defineProperty(Tn,\"__esModule\",{value:!0}),Tn.overrideFromComposables=Tn.isValidPresetType=void 0,Tn.isValidPresetType=$n,Tn.overrideFromComposables=function(...e){return t=>e.reduceRight(((e,t)=>n=>t(e(n))),(e=>e))(t)},Tn.default={isValidPresetType:$n};var Bn={},Gn={},Wn={};Object.defineProperty(Wn,\"__esModule\",{value:!0}),Wn.ApiConsumer=void 0;Wn.ApiConsumer=class{constructor(e){this.strategy=e,this.consume=async e=>(await this.strategy.getExposedFunctions(e)).reduce(((t,n)=>({...t,[n.key]:this.strategy.createFunction(n,e)})),{})}};var Hn={},Nn={};Object.defineProperty(Nn,\"__esModule\",{value:!0}),Nn.expose=Nn.getExposedProperties=void 0;const Dn=Symbol(\"exposedProperties\");Nn.getExposedProperties=e=>e[Dn]||e.prototype[Dn]||[];Nn.expose=e=>(t,n,i)=>{t[Dn]=t[Dn]||[],t[Dn].push({key:n,descriptor:i,options:e})},Object.defineProperty(Hn,\"__esModule\",{value:!0}),Hn.ApiExposer=void 0;const Un=Nn;Hn.ApiExposer=class{constructor(e){this.strategy=e,this.exposeInstance=async(e,t)=>{const n=(0,Un.getExposedProperties)(e),i=await Promise.all(n.map((async({key:n,options:i})=>({key:n,options:await this.strategy.exposeFunction(e[n].bind(e),{key:n,options:i,meta:t})}))));await this.strategy.exposeMeta(t,i)}}};var Vn={},zn={},Kn={};Object.defineProperty(Kn,\"__esModule\",{value:!0}),Kn.ChannelsConsumer=void 0;Kn.ChannelsConsumer=class{constructor(e){this.channel=e,this.getExposedFunctions=async e=>{const{id:t}=e,{props:n}=await this.channel.dispatch(`api-meta:${t}`);return n},this.createFunction=e=>(...t)=>{const{action:n}=e.options;return this.channel.dispatch(n,{args:t})}}};var qn={};Object.defineProperty(qn,\"__esModule\",{value:!0}),qn.ChannelsExposer=void 0;qn.ChannelsExposer=class{constructor(e){this.channelProviderOrClient=e,this.exposeFunction=async(e,t)=>{const{key:n,options:i,meta:r}=t,{id:o}=r,s=`${o}.${i?.action||n}`;return await this.channelProviderOrClient.register(s,(async({args:t})=>e(...t))),{action:s}},this.exposeMeta=async({id:e},t)=>{const n=`api-meta:${e}`;await this.channelProviderOrClient.register(n,(()=>({props:t})))}}},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Kn,e),n(qn,e)}(zn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(zn,e)}(Vn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Wn,e),n(Hn,e),n(Vn,e),n(Nn,e)}(Gn);var Jn={};Object.defineProperty(Jn,\"__esModule\",{value:!0}),Jn.createRelayedDispatch=exports.relayChannelClientApi_1=Jn.relayChannelClientApi=void 0;const Yn=[\"no longer connected\",\"RTCDataChannel closed unexpectedly\",\"The client you are trying to dispatch from is disconnected from the target provider\"];exports.relayChannelClientApi_1=Jn.relayChannelClientApi=async(e,t)=>{e.register(`relay:${t}`,(({action:t,target:n,payload:i})=>e.dispatch(n,t,i))),await Promise.resolve()};Jn.createRelayedDispatch=(e,t,n,i)=>async(r,o)=>{try{return await e.dispatch(`relay:${n}`,{action:r,payload:o,target:t})}catch(e){if(s=e.message,Yn.some((e=>s.includes(e)))&&i)throw new Error(i);throw e}var s};var Zn,Qn,Xn,ei=s&&s.__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},ti=s&&s.__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)};Object.defineProperty(Bn,\"__esModule\",{value:!0}),Bn.ColumnOrRow=Bn.TabStack=Bn.LayoutNode=void 0;const ni=Gn,ii=Jn;class ri{constructor(e,t){Zn.set(this,void 0),this.isRoot=()=>ti(this,Zn,\"f\").isRoot(this.entityId),this.exists=()=>ti(this,Zn,\"f\").exists(this.entityId),this.getParent=async()=>{const e=await ti(this,Zn,\"f\").getParent(this.entityId);if(e)return ri.getEntity(e,ti(this,Zn,\"f\"))},this.createAdjacentStack=async(e,t)=>{const n=await ti(this,Zn,\"f\").createAdjacentStack(this.entityId,e,t);return ri.getEntity({entityId:n,type:\"stack\"},ti(this,Zn,\"f\"))},this.getAdjacentStacks=async e=>(await ti(this,Zn,\"f\").getAdjacentStacks({targetId:this.entityId,edge:e})).map((e=>ri.getEntity({type:\"stack\",entityId:e.entityId},ti(this,Zn,\"f\")))),ei(this,Zn,e,\"f\"),this.entityId=t}}Bn.LayoutNode=ri,Zn=new WeakMap,ri.newLayoutEntitiesClient=async(e,t,n)=>{const i=(0,ii.createRelayedDispatch)(e,n,\"layout-relay\",\"You are trying to interact with a layout component on a window that does not exist or has been destroyed.\");return new ni.ApiConsumer(new ni.ChannelsConsumer({dispatch:i})).consume({id:t})},ri.getEntity=(e,t)=>{const{entityId:n,type:i}=e;switch(i){case\"column\":case\"row\":return new si(t,n,i);case\"stack\":return new oi(t,n);default:throw new Error(`Unrecognised Layout Entity encountered ('${JSON.stringify(e)})`)}};class oi extends ri{constructor(e,t){super(e,t),Qn.set(this,void 0),this.type=\"stack\",this.getViews=()=>ti(this,Qn,\"f\").getStackViews(this.entityId),this.addView=async(e,t={index:0})=>ti(this,Qn,\"f\").addViewToStack(this.entityId,e,t),this.removeView=async e=>{await ti(this,Qn,\"f\").removeViewFromStack(this.entityId,e)},this.setActiveView=async e=>{await ti(this,Qn,\"f\").setStackActiveView(this.entityId,e)},ei(this,Qn,e,\"f\")}}Bn.TabStack=oi,Qn=new WeakMap;class si extends ri{constructor(e,t,n){super(e,t),Xn.set(this,void 0),this.getContent=async()=>(await ti(this,Xn,\"f\").getContent(this.entityId)).map((e=>ri.getEntity(e,ti(this,Xn,\"f\")))),ei(this,Xn,e,\"f\"),this.type=n}}Bn.ColumnOrRow=si,Xn=new WeakMap;var ai={};Object.defineProperty(ai,\"__esModule\",{value:!0}),ai.DEFAULT_LAYOUT_KEY=ai.LAYOUT_CONTROLLER_ID=void 0,ai.LAYOUT_CONTROLLER_ID=\"layout-entities\",ai.DEFAULT_LAYOUT_KEY=\"__default__\";var ci,di,hi,li=s&&s.__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)};Object.defineProperty(Ln,\"__esModule\",{value:!0}),Ln.Layout=void 0;const ui=G,pi=O,wi=d,yi=Tn,fi=Bn,gi=ai;class mi extends wi.Base{static getClient(e){return li(e,di,\"f\").getValue()}constructor(e,t){super(t),ci.add(this),di.set(this,new ui.Lazy((async()=>fi.LayoutNode.newLayoutEntitiesClient(await this.platform.getClient(),gi.LAYOUT_CONTROLLER_ID,this.identity)))),this.replace=async e=>{this.wire.sendAction(\"layout-replace\").catch((e=>{}));const t=await this.platform.getClient();await t.dispatch(\"replace-layout\",{target:this.identity,opts:{layout:e}})},this.replaceView=async(e,t)=>{this.wire.sendAction(\"layout-replace-view\").catch((e=>{}));const n=await this.platform.getClient();await n.dispatch(\"replace-view\",{target:this.identity,opts:{viewToReplace:e,newView:t}})},this.applyPreset=async e=>{this.wire.sendAction(\"layout-apply-preset\").catch((e=>{}));const t=await this.platform.getClient(),{presetType:n}=e;if(!n||!(0,yi.isValidPresetType)(n))throw new Error(\"Cannot apply preset layout, please include an applicable presetType property in the PresetLayoutOptions.\");await t.dispatch(\"apply-preset-layout\",{target:this.identity,opts:{presetType:n}})};const n=(0,pi.validateIdentity)(e);if(n)throw new Error(n);this.identity=e,this.platform=this.fin.Platform.wrapSync({uuid:e.uuid}),e.uuid===this.fin.me.uuid&&e.name===this.fin.me.name&&(this.init=this.fin.Platform.Layout.init)}async getConfig(){this.wire.sendAction(\"layout-get-config\").catch((e=>{}));return(await this.platform.getClient()).dispatch(\"get-frame-snapshot\",{target:this.identity})}async getCurrentViews(){this.wire.sendAction(\"layout-get-views\").catch((e=>{}));const e=await this.platform.getClient();return(await e.dispatch(\"get-layout-views\",{target:this.identity})).map((e=>this.fin.View.wrapSync(e)))}async getRootItem(){this.wire.sendAction(\"layout-get-root-item\").catch((()=>{}));const e=await li(this,di,\"f\").getValue(),t=await e.getRoot(\"layoutName\"in this.identity?this.identity:void 0);return fi.LayoutNode.getEntity(t,e)}async getStackByViewIdentity(e){this.wire.sendAction(\"layout-get-stack-by-view\").catch((()=>{}));const t=await li(this,di,\"f\").getValue(),n=await t.getStackByView(e);if(!n)throw new Error(`No stack found for view: ${e.uuid}/${e.name}`);return fi.LayoutNode.getEntity(n,t)}async addView(e,{location:t,targetView:n}={}){this.wire.sendAction(\"layout-add-view\").catch((e=>{}));const{identity:i}=await li(this,ci,\"m\",hi).call(this,\"layout-add-view\",{viewOptions:e,location:t,targetView:n});return{identity:i}}async closeView(e){this.wire.sendAction(\"layout-close-view\").catch((e=>{})),await li(this,ci,\"m\",hi).call(this,\"layout-close-view\",{viewIdentity:e})}}Ln.Layout=mi,di=new WeakMap,ci=new WeakSet,hi=async function(e,t){return(await this.platform.getClient()).dispatch(e,{target:this.identity,opts:t})};var vi,Ci,bi,Ii,Ei,xi=s&&s.__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)},Ai=s&&s.__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};Object.defineProperty(kn,\"__esModule\",{value:!0}),kn.LayoutModule=void 0;const Pi=d,Mi=Ln,_i=ai;class Oi extends Pi.Base{constructor(){super(...arguments),vi.add(this),Ci.set(this,!1),bi.set(this,null),this.init=async(e={})=>{if(this.wire.sendAction(\"layout-init\").catch((e=>{})),!this.wire.environment.layoutAllowedInContext(this.fin))throw new Error(\"Layout.init can only be called from a Window context.\");if(xi(this,Ci,\"f\"))throw new Error(\"Layout.init was already called, please use Layout.create to add additional layouts.\");\"openfin\"===this.wire.environment.type&&await this.fin.Platform.getCurrentSync().getClient(),Ai(this,Ci,!0,\"f\"),Ai(this,bi,await this.wire.environment.initLayoutManager(this.fin,this.wire,e),\"f\"),await this.wire.environment.applyLayoutSnapshot(this.fin,xi(this,bi,\"f\"),e);const t={name:this.fin.me.name,uuid:this.fin.me.uuid};if(!e.layoutManagerOverride){const e={layoutName:_i.DEFAULT_LAYOUT_KEY,...t};return xi(this,Ii,\"f\").call(this,e)}return this.wrapSync(t)},Ii.set(this,(e=>{const t=\"[Layout] You are using a deprecated property `layoutManager` - it will throw if you access it starting in v37.\",n=new Proxy({},{get(e,n){throw console.warn(`[Layout-mgr-proxy] accessing ${n.toString()}`),new Error(t)}}),i=Object.assign(this.wrapSync(e),{layoutManager:n});return new Proxy(i,{get(e,n){if(\"layoutManager\"===n)throw console.warn(`[Layout-proxy] accessing ${n.toString()}`),new Error(t);return e[n]}})})),this.getCurrentLayoutManagerSync=()=>xi(this,vi,\"m\",Ei).call(this,\"fin.Platform.Layout.getCurrentLayoutManagerSync()\"),this.create=async e=>this.wire.environment.createLayout(xi(this,vi,\"m\",Ei).call(this,\"fin.Platform.Layout.create()\"),e),this.destroy=async e=>this.wire.environment.destroyLayout(xi(this,vi,\"m\",Ei).call(this,\"fin.Platform.Layout.destroy()\"),e)}async wrap(e){return this.wire.sendAction(\"layout-wrap\").catch((e=>{})),new Mi.Layout(e,this.wire)}wrapSync(e){return this.wire.sendAction(\"layout-wrap-sync\").catch((e=>{})),new Mi.Layout(e,this.wire)}async getCurrent(){if(this.wire.sendAction(\"layout-get-current\").catch((e=>{})),\"openfin\"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error(\"You are not in a Window context. Only Windows can have a Layout.\");const{uuid:e,name:t}=this.fin.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction(\"layout-get-current-sync\").catch((e=>{})),\"openfin\"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error(\"You are not in a Window context. Only Windows can have a Layout.\");const{uuid:e,name:t}=this.fin.me;return this.wrapSync({uuid:e,name:t})}async getLayoutByViewIdentity(e){this.wire.sendAction(\"layout-get-by-view-identity\").catch((()=>{}));let t=await this.wire.environment.getViewWindowIdentity(this.fin,e);t.identity&&(t=t.identity);try{const n=this.wrapSync(t),i=await Mi.Layout.getClient(n),r=await i.getLayoutIdentityForViewOrThrow(e);return this.wrapSync(r)}catch(n){if(![\"No action registered at target for\",\"getLayoutIdentityForViewOrThrow is not a function\"].some((e=>n.message.includes(e))))throw n;if(t.uuid===t.name)throw new Error(`View identity ${JSON.stringify(e)} is not attached to any layout in provider window ${JSON.stringify(t)}.`);return this.wrapSync(t)}}}kn.LayoutModule=Oi,Ci=new WeakMap,bi=new WeakMap,Ii=new WeakMap,vi=new WeakSet,Ei=function(e){if(!xi(this,bi,\"f\"))throw new Error(`You must call init before using the API ${e}`);return xi(this,bi,\"f\")},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(kn,e),n(Ln,e)}(jn),Object.defineProperty(Pn,\"__esModule\",{value:!0}),Pn.PlatformModule=void 0;const Si=d,Ri=Mn,Fi=jn;class ji extends Si.Base{constructor(e,t){super(e),this._channel=t,this.Layout=new Fi.LayoutModule(this.wire)}async init(e){if(!fin.__internal_.isPlatform||fin.me.name!==fin.me.uuid)throw new Error(\"fin.Platform.init should only be called from a custom platform provider running in the main window of the application.\");return this.wire.environment.initPlatform(this.fin,e)}async wrap(e){return this.wire.sendAction(\"platform-wrap\").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}wrapSync(e){return this.wire.sendAction(\"platform-wrap-sync\").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}async getCurrent(){return this.wire.sendAction(\"platform-get-current\").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction(\"platform-get-current-sync\").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}start(e){return this.wire.sendAction(\"platform-start\").catch((e=>{})),new Promise((async(t,n)=>{try{const{uuid:n}=e,i=await this.fin.Application._create({...e,isPlatformController:!0});i.once(\"platform-api-ready\",(()=>t(this.wrapSync({uuid:n})))),i._run({uuid:n})}catch(e){n(e)}}))}startFromManifest(e,t){return this.wire.sendAction(\"platform-start-from-manifest\").catch((e=>{})),new Promise((async(n,i)=>{try{const i=await this.fin.Application._createFromManifest(e);i.once(\"platform-api-ready\",(()=>n(this.wrapSync({uuid:i.identity.uuid})))),i._run(t)}catch(e){i(e)}}))}}Pn.PlatformModule=ji,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Pn,e),n(Mn,e)}(An);var ki={};!function(e){Object.defineProperty(e,\"__esModule\",{value:!0}),e.getMe=e.getBaseMe=e.environmentUnsupportedMessage=void 0;const t=J(),n=un,i=ie(),r=rn;function o(e,t,n){return{...{isView:\"view\"===e,isWindow:\"window\"===e,isFrame:\"iframe\"===e,isExternal:\"external connection\"===e},uuid:t,name:n,entityType:e}}e.environmentUnsupportedMessage=\"You are not running in OpenFin.\",e.getBaseMe=o,e.getMe=function(s){const{uuid:a,name:c,entityType:d}=s.me,h={setContext(){throw new Error(e.environmentUnsupportedMessage)},addContextHandler(){throw new Error(e.environmentUnsupportedMessage)},getContextGroups(){throw new Error(e.environmentUnsupportedMessage)},joinContextGroup(){throw new Error(e.environmentUnsupportedMessage)},removeFromContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getAllClientsInContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getInfoForContextGroup(){throw new Error(e.environmentUnsupportedMessage)}},l=\"Interop API has not been instantiated. Either connection has failed or you have not declared interop in your config.\",u={setContext(){throw new Error(l)},addContextHandler(){throw new Error(l)},getContextGroups(){throw new Error(l)},joinContextGroup(){throw new Error(l)},removeFromContextGroup(){throw new Error(l)},getAllClientsInContextGroup(){throw new Error(l)},getInfoForContextGroup(){throw new Error(l)}},p={eventNames:()=>{throw new Error(e.environmentUnsupportedMessage)},emit:()=>{throw new Error(e.environmentUnsupportedMessage)},listeners:()=>{throw new Error(e.environmentUnsupportedMessage)},listenerCount:()=>{throw new Error(e.environmentUnsupportedMessage)},on:()=>{throw new Error(e.environmentUnsupportedMessage)},addListener:()=>{throw new Error(e.environmentUnsupportedMessage)},once:()=>{throw new Error(e.environmentUnsupportedMessage)},prependListener:()=>{throw new Error(e.environmentUnsupportedMessage)},prependOnceListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeAllListeners:()=>{throw new Error(e.environmentUnsupportedMessage)}};switch(d){case\"view\":return Object.assign(new t.View(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case\"window\":return Object.assign(new i._Window(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case\"iframe\":return Object.assign(new n._Frame(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case\"external connection\":return Object.assign(new r.ExternalApplication(s,{uuid:a}),o(d,a,c),{interop:u,isOpenFin:!1});default:return{...o(d,a,c),...p,interop:h,isOpenFin:!1}}}}(ki);var Li={},Ti={},$i={};Object.defineProperty($i,\"__esModule\",{value:!0}),$i.createWarningObject=$i.createUnusableObject=void 0,$i.createUnusableObject=function(e){const t=()=>{throw new Error(e)};return new Proxy({},{apply:t,construct:t,defineProperty:t,deleteProperty:t,get:t,getOwnPropertyDescriptor:t,getPrototypeOf:t,has:t,isExtensible:t,ownKeys:t,preventExtensions:t,set:t,setPrototypeOf:t})},$i.createWarningObject=function(e,t){return new Proxy(t,{get:(...t)=>(console.warn(e),Reflect.get(...t)),set:(...t)=>(console.warn(e),Reflect.set(...t)),getOwnPropertyDescriptor:(...t)=>(console.warn(e),Reflect.getOwnPropertyDescriptor(...t)),ownKeys:(...t)=>(console.warn(e),Reflect.ownKeys(...t))})};var Bi,Gi={},Wi={};var Hi={};!function(e){Object.defineProperty(e,\"__esModule\",{value:!0}),e.wrapIntentHandler=e.BROKER_ERRORS=e.generateOverrideWarning=e.generateOverrideError=e.wrapContextHandler=e.wrapInTryCatch=e.generateId=void 0;e.generateId=()=>`${Math.random()}${Date.now()}`;e.wrapInTryCatch=(e,t)=>(...n)=>{try{return e(...n)}catch(e){throw new Error((t||\"\")+e)}};e.wrapContextHandler=(e,t)=>async n=>{try{await e(n)}catch(e){throw console.error(`Error thrown by handler ${t} for context type ${n.type}: ${e}`),e}};e.generateOverrideError=(e,t)=>`You have tried to to use ${e} but ${t} has not been overridden in the Interop Broker. Please override this function. Refer to our documentation for more info.`;e.generateOverrideWarning=(e,t,n,i)=>{const{uuid:r,name:o}=n;return i?`Entity with identity: ${r}/${o} has called ${i} or ${e} but ${t} has not been overridden.`:`Entity with identity: ${r}/${o} has called ${e} but ${t} has not been overridden.`},e.BROKER_ERRORS={fireIntent:(0,e.generateOverrideError)(\"fireIntent\",\"handleFiredIntent\"),fireIntentForContext:(0,e.generateOverrideError)(\"fireIntentForContext\",\"handleFiredIntentForContext\"),getInfoForIntent:(0,e.generateOverrideError)(\"getInfoForIntent\",\"handleInfoForIntent\"),getInfoForIntentsByContext:(0,e.generateOverrideError)(\"getInfoForIntentsByContext\",\"handleInfoForIntentsByContext\"),joinSessionContextGroupWithJoinContextGroup:\"The Context Group you have tried to join is a Session Context Group. Custom Context Groups can only be defined by the Interop Broker through code or manifest configuration. Please use joinSessionContextGroup.\",fdc3Open:(0,e.generateOverrideError)(\"fdc3.open\",\"fdc3HandleOpen\"),fdc3FindInstances:(0,e.generateOverrideError)(\"fdc3.findInstances\",\"fdc3HandleFindInstances\"),fdc3GetAppMetadata:(0,e.generateOverrideError)(\"fdc3.getAppMetadata\",\"fdc3HandleGetAppMetadata\"),fdc3GetInfo:(0,e.generateOverrideError)(\"fdc3.getInfo\",\"fdc3HandleGetInfo\")};e.wrapIntentHandler=(e,t)=>async n=>{try{return e(n)}catch(e){throw console.error(`Error thrown by handler ${t}: ${e}`),e}}}(Hi);var Ni,Di,Ui={};function Vi(){if(Di)return Gi;Di=1;var e,t,n,r=s&&s.__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},o=s&&s.__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)},a=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Gi,\"__esModule\",{value:!0}),Gi.InteropBroker=void 0;const c=d,h=a(function(){if(Bi)return Wi;Bi=1,Object.defineProperty(Wi,\"__esModule\",{value:!0});const e=Cr();return Wi.default=class{constructor(e,t){this.provider=e,this.id=t,this.lastContext=void 0,this.contextGroupMap=new Map,this.clients=new Map,this.registerListeners()}registerListeners(){this.provider.register(`sessionContextGroup:getContext-${this.id}`,this.getCurrentContext.bind(this)),this.provider.register(`sessionContextGroup:setContext-${this.id}`,this.setContext.bind(this)),this.provider.register(`sessionContextGroup:handlerAdded-${this.id}`,this.handlerAdded.bind(this)),this.provider.register(`sessionContextGroup:handlerRemoved-${this.id}`,this.handlerRemoved.bind(this))}getCurrentContext(e){return e.type?this.contextGroupMap.get(e.type):this.lastContext}setContext(t,n){const{context:i}=t,r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name} not in Session Client State Map`);this.contextGroupMap.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{e.contextHandlers.get(i.type)?.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getClientState(e){return this.clients.get(e.endpointId)}async handlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(i){const e=r.contextHandlers.get(i)||[];r.contextHandlers.set(i,[...e,n]);const o=this.contextGroupMap.get(i);o&&await this.provider.dispatch(t,n,o)}else{r.globalHandler=n;const e=[...this.contextGroupMap.keys()].map((async e=>{const i=this.contextGroupMap.get(e);i&&await this.provider.dispatch(t,n,i)}));await Promise.all(e)}}handlerRemoved(e,t){const{handlerId:n}=e,i=this.clients.get(t.endpointId);i?(Array.from(i.contextHandlers).forEach((([,e])=>{const t=e.indexOf(n);t>-1&&e.splice(t,1)})),i.globalHandler===n&&(i.globalHandler=void 0)):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={contextHandlers:new Map,clientIdentity:e,globalHandler:void 0};this.clients.set(e.endpointId,t)}}onDisconnection(e){this.clients.delete(e.endpointId)}},Wi}()),l=Hi,u=a(i),p=function(){if(Ni)return Ui;Ni=1,Object.defineProperty(Ui,\"__esModule\",{value:!0}),Ui.PrivateChannelProvider=void 0;const e=Vi();return Ui.PrivateChannelProvider=class t{constructor(e,t){this.provider=e,this.id=t,this.clients=new Map,this.registerListeners(),this.contextByContextType=new Map,this.lastContext=void 0,this.provider.onConnection((e=>this.registerNewClient(e))),this.provider.onDisconnection((async e=>{const{endpointId:t}=e;this.clients.has(t)&&await this.handleClientDisconnecting(e),0===(await this.provider.getAllClientInfo()).length&&this.provider.destroy()}))}getClientState(e){return this.clients.get(e.endpointId)}registerListeners(){this.provider.register(\"broadcast\",this.broadcast.bind(this)),this.provider.register(\"getCurrentContext\",this.getCurrentContext.bind(this)),this.provider.register(\"contextHandlerAdded\",this.contextHandlerAdded.bind(this)),this.provider.register(\"contextHandlerRemoved\",this.contextHandlerRemoved.bind(this)),this.provider.register(\"nonStandardHandlerRemoved\",this.nonStandardHandlerRemoved.bind(this)),this.provider.register(\"onAddContextHandlerAdded\",this.onAddContextHandlerAdded.bind(this)),this.provider.register(\"onDisconnectHandlerAdded\",this.onDisconnectHandlerAdded.bind(this)),this.provider.register(\"onUnsubscribeHandlerAdded\",this.onUnsubscribeHandlerAdded.bind(this)),this.provider.register(\"clientDisconnecting\",((e,t)=>{this.handleClientDisconnecting(t)}))}broadcast(t,n){const{context:i}=t;if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name}, tried to call broadcast, is not connected to this Private Channel`);const r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to broadcast - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);this.contextByContextType.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{const t=e.handlerIdsByContextTypes.get(i.type);t&&t.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getCurrentContext(e,t){const{contextType:n}=e;if(!this.getClientState(t))throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call getCurrentContext, is not connected to this Private Channel`);if(void 0!==n){return this.contextByContextType.get(n)||null}return this.lastContext?this.lastContext:null}contextHandlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call addContextListener, is not connected to this Private Channel`);if(i){const e=r.handlerIdsByContextTypes.get(i)||[];r.handlerIdsByContextTypes.set(i,[...e,n])}else r.globalHandler=n;Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&e.onAddContextListenerHandlerId&&this.provider.dispatch(e.clientIdentity,e.onAddContextListenerHandlerId,i)}))}async contextHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);if(i){let e;if(i.globalHandler===n)i.globalHandler=void 0;else for(const[t,r]of i.handlerIdsByContextTypes){const i=r.indexOf(n);i>-1&&(r.splice(i,1),e=t)}const r=(await this.getConnectedClients()).map((async n=>{const{clientIdentity:i,clientIdentity:{endpointId:r},onUnsubscribeHandlerId:o}=n;r!==t.endpointId&&o&&await this.provider.dispatch(i,o,e)}));try{await Promise.all(r)}catch(e){throw console.error(`Problem when attempting to dispatch to onUnsubscribeHandlers. Error: ${e} Removing Client: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}`),new Error(e)}}else console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}.`)}nonStandardHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);i?i.onDisconnectHandlerId===n?i.onDisconnectHandlerId=void 0:i.onAddContextListenerHandlerId===n?i.onAddContextListenerHandlerId=void 0:i.onUnsubscribeHandlerId===n&&(i.onUnsubscribeHandlerId=void 0):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}onAddContextHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onAddContextListener, is not connected to this Private Channel`);n.onAddContextListenerHandlerId=i,Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&Array.from(e.handlerIdsByContextTypes.keys()).forEach((e=>{this.provider.dispatch(t,i,e)}))}))}onDisconnectHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onDisconnect, is not connected to this Private Channel`);n.onDisconnectHandlerId=i}onUnsubscribeHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onUnsubscribe, is not connected to this Private Channel`);n.onUnsubscribeHandlerId=i}removeClient(e){const t=this.getClientState(e);if(!t)throw new Error(`Client with Identity: ${e.uuid} ${e.name}, tried to call disconnect, is not connected to this Private Channel`);t.handlerIdsByContextTypes.clear(),this.clients.delete(e.endpointId)}async fireOnDisconnectForOtherClients(e){const{endpointId:t}=e,n=(await this.getConnectedClients()).map((async e=>{const{clientIdentity:{endpointId:n},onDisconnectHandlerId:i}=e;n!==t&&i&&await this.provider.dispatch(e.clientIdentity,i)}));try{await Promise.all(n)}catch(t){throw console.error(`Problem when attempting to dispatch to onDisconnectHandlers. Error: ${t} Disconnecting Client: uuid: ${e.uuid}. name: ${e.name}. endpointId: ${e.endpointId}`),new Error(t)}}async unsubscribeAll(e){const{endpointId:t}=e,n=this.clients.get(t);if(n){const t=Array.from(n.handlerIdsByContextTypes.values()).flat(),i=n.globalHandler;if(t.length>0){const n=t.map((async t=>this.contextHandlerRemoved({handlerId:t},e)));try{await Promise.all(n)}catch(e){console.error(e.message)}}if(i)try{await this.contextHandlerRemoved({handlerId:i},e)}catch(e){console.error(e.message)}}}async handleClientDisconnecting(e){await this.unsubscribeAll(e),this.removeClient(e),await this.fireOnDisconnectForOtherClients(e)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={clientIdentity:e,handlerIdsByContextTypes:new Map,globalHandler:void 0,onAddContextListenerHandlerId:void 0,onUnsubscribeHandlerId:void 0,onDisconnectHandlerId:void 0};this.clients.set(e.endpointId,t)}}async getConnectedClients(){const e=await this.provider.getAllClientInfo();return Array.from(this.clients.values()).filter((t=>{const{uuid:n,name:i}=t.clientIdentity;return e.some((e=>i===e.name&&n===e.uuid))}))}static init(e,n){return new t(e,n)}},Ui}(),w=G,y=[{id:\"green\",displayMetadata:{color:\"#00CC88\",name:\"green\"}},{id:\"purple\",displayMetadata:{color:\"#8C61FF\",name:\"purple\"}},{id:\"orange\",displayMetadata:{color:\"#FF8C4C\",name:\"orange\"}},{id:\"red\",displayMetadata:{color:\"#FF5E60\",name:\"red\"}},{id:\"pink\",displayMetadata:{color:\"#FF8FB8\",name:\"pink\"}},{id:\"yellow\",displayMetadata:{color:\"#E9FF8F\",name:\"yellow\"}}];let f=class i extends c.Base{constructor(i,s,a){super(i),e.set(this,void 0),t.set(this,void 0),n.set(this,void 0),this.getProvider=()=>o(this,n,\"f\").getValue(),this.interopClients=new Map,this.contextGroupsById=new Map,r(this,t,a.contextGroups??[...y],\"f\"),r(this,e,a.fdc3Info,\"f\"),a?.logging&&(this.logging=a.logging),this.intentClientMap=new Map,this.lastContextMap=new Map,this.sessionContextGroupMap=new Map,r(this,n,new w.Lazy(s),\"f\"),this.setContextGroupMap(),this.setupChannelProvider()}static createClosedConstructor(...e){return class extends i{constructor(...t){if(t.length){const[n,i,r]=t;if(r&&\"object\"==typeof r&&!(0,u.default)(r,e[2]))return console.warn(\"You have modified the parameters of the InteropOverride constructor. This behavior is deprecated and will be removed in a future version. You can modify these options in your manifest. Please consult our Interop docs for guidance on migrating to the new override scheme.\"),void super(e[0],e[1],r);console.warn(\"You are attempting to pass arguments to the InteropOverride constructor. This is not necessary, and these passed arguments will be ignored. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.\")}super(...e)}}}setContext({context:e},t){this.wire.sendAction(\"interop-broker-set-context\").catch((e=>{}));const n=this.getClientState(t);if(!n||!n.contextGroupId)throw n?new Error(\"You must join a context group before you can set context.\"):new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);{const{contextGroupId:t}=n;this.setContextForGroup({context:e},t)}}setContextForGroup({context:e},t){this.wire.sendAction(\"interop-broker-set-context-for-group\").catch((e=>{}));const n=this.contextGroupsById.get(t);if(!n)throw new Error(`Unable to set context for context group that isn't in the context group mapping: ${t}.`);const r=i.checkContextIntegrity(e);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(e)}`);const o=e.type;n.set(o,e),this.lastContextMap.set(t,o);Array.from(this.interopClients.values()).filter((e=>e.contextGroupId===t)).forEach((t=>{for(const[,n]of t.contextHandlers)i.isContextTypeCompatible(o,n.contextType)&&this.invokeContextHandler(t.clientIdentity,n.handlerId,e)}))}getCurrentContext(e,t){this.wire.sendAction(\"interop-broker-get-current-context\").catch((e=>{}));const n=this.getClientState(t);if(!n?.contextGroupId)throw new Error(\"You must be a member of a context group to call getCurrentContext\");const{contextGroupId:i}=n,r=this.contextGroupsById.get(i),o=this.lastContextMap.get(i),s=e?.contextType??o;return r&&s?r.get(s):void 0}async joinContextGroup({contextGroupId:e,target:t},n){if(this.wire.sendAction(\"interop-broker-join-context-group\").catch((e=>{})),this.sessionContextGroupMap.has(e))throw new Error(l.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup);if(t){i.hasEndpointId(t)&&await this.addClientToContextGroup({contextGroupId:e},t);try{const n=this.channel.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name));if(!n.length)throw new Error(`Given Identity ${t.uuid} ${t.name} is not connected to the Interop Broker.`);n.length>1&&console.warn(`More than one connection found for identity ${t.uuid} ${t.name}`);const i=[];for(const t of n)i.push(this.addClientToContextGroup({contextGroupId:e},t));await Promise.all(i)}catch(e){throw new Error(e)}}else await this.addClientToContextGroup({contextGroupId:e},n)}async addClientToContextGroup({contextGroupId:e},t){this.wire.sendAction(\"interop-broker-add-client-to-context-group\").catch((e=>{}));const n=this.getClientState(t);if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(!this.getContextGroups().find((t=>t.id===e)))throw new Error(`Attempting to join a context group that does not exist: ${e}. You may only join existing context groups.`);if(n.contextGroupId!==e){n.contextGroupId=e,await this.setCurrentContextGroupInClientOptions(t,e);const i=this.contextGroupsById.get(e);for(const[,e]of n.contextHandlers){const{contextType:n,handlerId:r}=e;if(void 0===n)i.forEach(((e,n)=>{this.invokeContextHandler(t,r,e)}));else if(i.has(n)){const e=i.get(n);e&&this.invokeContextHandler(t,r,e)}}}}async removeFromContextGroup({target:e},t){if(this.wire.sendAction(\"interop-broker-remove-from-context-group\").catch((e=>{})),e){i.hasEndpointId(e)&&await this.removeClientFromContextGroup(e);try{const t=this.channel.connections.filter((t=>t.uuid===e.uuid&&t.name===e.name));if(!t.length)throw new Error(`No connection found for given Identity ${e.uuid} ${e.name}`);t.length>1&&console.warn(`More than one connection found for identity ${e.uuid} ${e.name}`);const n=[];for(const e of t)n.push(this.removeClientFromContextGroup(e));await Promise.all(n)}catch(e){throw new Error(e)}}else await this.removeClientFromContextGroup(t)}async removeClientFromContextGroup(e){this.wire.sendAction(\"interop-broker-remove-client-from-context-group\").catch((e=>{}));const t=this.getClientState(e);t&&(t.contextGroupId=void 0),await this.setCurrentContextGroupInClientOptions(e,null)}getContextGroups(){return this.wire.sendAction(\"interop-broker-get-context-groups\").catch((e=>{})),o(this,t,\"f\").map((e=>({...e})))}getInfoForContextGroup({contextGroupId:e}){return this.wire.sendAction(\"interop-broker-get-info-for-context-group\").catch((e=>{})),this.getContextGroups().find((t=>t.id===e))}getAllClientsInContextGroup({contextGroupId:e}){this.wire.sendAction(\"interop-broker-get-all-clients-in-context-group\").catch((e=>{}));return Array.from(this.interopClients.values()).filter((t=>t.contextGroupId===e)).map((e=>e.clientIdentity))}async handleFiredIntent(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.raiseIntent\",\"InteropBroker.handleFiredIntent\",t,\"interopClient.fireIntent\");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntent)}async setIntentTarget(e,t){this.wire.sendAction(\"interop-broker-set-intent-target\").catch((e=>{}));const n=this.intentClientMap.get(t.name),i=`intent-handler-${e.name}`;if(n){const t=n.get(i);if(t){if(t.pendingIntents.push(e),t.clientIdentity&&t.isReady){const{clientIdentity:e,pendingIntents:n}=t;try{const r=n[n.length-1];await this.invokeIntentHandler(e,i,r),t.pendingIntents=[]}catch(n){console.error(`Error invoking intent handler for client ${e.uuid}/${e.name}/${e.endpointId}`),t.isReady=!1}}}else n.set(i,{isReady:!1,pendingIntents:[e]})}else{this.intentClientMap.set(t.name,new Map);const n=this.intentClientMap.get(t.name);n&&n.set(i,{isReady:!1,pendingIntents:[e]})}}async handleInfoForIntent(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.findIntent\",\"InteropBroker.handleInfoForIntent\",t,\"interopClient.getInfoForIntent\");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntent)}async handleInfoForIntentsByContext(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.findIntentsByContext\",\"InteropBroker.handleInfoForIntentsByContext\",t,\"interopClient.getInfoForIntentsByContext\");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntentsByContext)}async handleFiredIntentForContext(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.raiseIntentForContext\",\"InteropBroker.handleFiredIntentForContext\",t,\"interopClient.fireIntentForContext\");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntentForContext)}async clientDisconnected(e){}async fdc3HandleOpen({app:e,context:t},n){const i=(0,l.generateOverrideWarning)(\"fdc3.open\",\"InteropBroker.fdc3HandleOpen\",n);throw console.warn(i),new Error(l.BROKER_ERRORS.fdc3Open)}async fdc3HandleFindInstances(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.open\",\"InteropBroker.fdc3HandleFindInstances\",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3FindInstances)}async fdc3HandleGetAppMetadata(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.getAppMetadata\",\"InteropBroker.fdc3HandleGetAppMetadata\",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3GetAppMetadata)}async invokeContextHandler(e,t,n){const i=await this.getProvider();try{await i.dispatch(e,t,n)}catch(i){console.error(`Error invoking context handler ${t} for context type ${n.type} in client ${e.uuid}/${e.name}/${e.endpointId}`,i)}}async invokeIntentHandler(e,t,n){const i=await this.getProvider();await i.dispatch(e,t,n)}async fdc3HandleGetInfo(t,n){const{fdc3Version:i}=t;return{fdc3Version:i,...o(this,e,\"f\"),optionalFeatures:{OriginatingAppMetadata:!1,UserChannelMembershipAPIs:!0},appMetadata:{appId:\"\",instanceId:\"\"}}}async getAllClientInfo(){return(await this.getProvider()).getAllClientInfo()}decorateSnapshot(e){return{...e,interopSnapshotDetails:{contextGroupStates:this.getContextGroupStates()}}}applySnapshot(e,t){const n=e?.interopSnapshotDetails?.contextGroupStates;n&&(t?.closeExistingWindows||this.updateExistingClients(n),this.rehydrateContextGroupStates(n))}updateExistingClients(e){this.interopClients.forEach((t=>{const{clientIdentity:n,contextGroupId:r,contextHandlers:o}=t;if(r){const t=e[r];for(const[,e]of Object.entries(t))o.forEach((t=>{const{handlerId:r,contextType:o}=t;i.isContextTypeCompatible(e.type,o)&&this.invokeContextHandler(n,r,e)}))}}))}getContextGroupStates(){return i.toObject(this.contextGroupsById)}rehydrateContextGroupStates(e){const t=Object.entries(e);for(const[e,n]of t){const t=Object.entries(n);for(const[n,i]of t)if(this.contextGroupsById.has(e)){this.contextGroupsById.get(e).set(n,i)}else console.warn(`Attempting to set a context group that isn't in the context group mapping. Skipping context group rehydration for: ${e}`)}}contextHandlerRegistered({contextType:e,handlerId:t},n){const i={contextType:e,handlerId:t},r=this.getClientState(n);if(r?.contextHandlers.set(t,i),r&&r.contextGroupId){const{contextGroupId:i}=r,o=this.contextGroupsById.get(i);if(void 0===e)o.forEach(((e,i)=>{this.invokeContextHandler(n,t,e)}));else if(o.has(e)){const i=o.get(e);i&&this.invokeContextHandler(n,t,i)}}}async intentHandlerRegistered(e,t){const{handlerId:n}=e,i=this.intentClientMap.get(t.name),r=i?.get(n);if(i)if(r){const{pendingIntents:e}=r;r.clientIdentity=t,r.isReady=!0;try{if(e.length>0){const i=e[e.length-1];await this.invokeIntentHandler(t,n,i),r.pendingIntents=[]}}catch(e){console.error(`Error invoking intent handler: ${n} for client ${t.uuid}/${t.name}/${t.endpointId}`)}}else i.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t});else{this.intentClientMap.set(t.name,new Map);const e=this.intentClientMap.get(t.name);e&&e.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t})}}removeContextHandler({handlerId:e},t){const n=this.getClientState(t);n&&n.contextHandlers.delete(e)}handleJoinSessionContextGroup({sessionContextGroupId:e},t){try{if(!e)throw new Error(\"Failed to join session context group: must specify group id.\");const n=this.sessionContextGroupMap.get(e);if(n)n.registerNewClient(t);else{const n=new h.default(this.channel,e);n.registerNewClient(t),this.sessionContextGroupMap.set(e,n)}return{hasConflict:this.contextGroupsById.has(e)}}catch(e){throw new Error(e)}}getClientState(e){return this.interopClients.get(e.endpointId)}static toObject(e){const t=Object.fromEntries(e),n={};return Object.entries(t).forEach((([e,t])=>{const i=Object.fromEntries(t);n[e]=i})),n}static checkContextIntegrity(e){if(!e)return{isValid:!1,reason:\"No context supplied\"};if(\"object\"!=typeof e)return{isValid:!1,reason:\"Context must be an Object\"};if(!e.type)return{isValid:!1,reason:\"Context must have a type property\"};if(e.id&&\"object\"!=typeof e.id)return{isValid:!1,reason:\"Context id must be an Object populated with key-value identifiers (if set)\"};if(e.id){const{id:t}=e,n=Object.keys(t);let i=!1;if(!n.length)return{isValid:!1,reason:\"Context id must have at least one key-value identifier\"};if(n.forEach((e=>{\"string\"==typeof e&&\"string\"==typeof t[e]||(i=!0)})),i)return{isValid:!1,reason:\"Context id key-value identifiers must be of type string\"}}return e.name&&\"string\"!=typeof e.name?{isValid:!1,reason:\"Context name must be of string type (if set)\"}:{isValid:!0}}static hasEndpointId(e){return void 0!==e.endpointId}static isContextTypeCompatible(e,t){return void 0===t||e===t}setContextGroupMap(){for(const e of this.getContextGroups())this.contextGroupsById.set(e.id,new Map)}async setCurrentContextGroupInClientOptions(e,t){try{const n=await this.fin.System.getEntityInfo(e.uuid,e.name);let i;\"view\"===n.entityType?i=await this.fin.View.wrap(e):\"window\"===n.entityType&&(i=await this.fin.Window.wrap(e)),i&&await i.updateOptions({interop:{currentContextGroup:t}})}catch(e){}}async setupChannelProvider(){try{const e=await this.getProvider();this.channel=e,this.wireChannel(e)}catch(e){throw new Error(`Error setting up Interop Broker Channel Provider: ${e}`)}}wireChannel(e){e.onConnection((async(e,t)=>{if(!await this.isConnectionAuthorized(e,t))throw new Error(`Connection not authorized for ${e.uuid}, ${e.name}`);if(!e.endpointId)throw new Error(\"Version too old to be compatible with Interop. Please upgrade your runtime to a more recent version.\");const n={contextGroupId:void 0,contextHandlers:new Map,clientIdentity:e};t?.currentContextGroup&&this.contextGroupsById.has(t.currentContextGroup)&&(n.contextGroupId=t?.currentContextGroup),this.interopClients.set(e.endpointId,n)})),e.onDisconnection((e=>{this.interopClients.delete(e.endpointId);const t=this.intentClientMap.get(e.name);t&&e.uuid===this.fin.me.uuid&&t.forEach((e=>{e.isReady=!1})),this.sessionContextGroupMap.forEach((t=>{t.onDisconnection(e)})),this.clientDisconnected(e)})),e.beforeAction((async(e,t,n)=>{if(!await this.isActionAuthorized(e,t,n))throw new Error(`Action (${e}) not authorized for ${n.uuid}, ${n.name}`);this.logging?.beforeAction?.enabled&&console.log(e,t,n)})),e.afterAction(((e,t,n)=>{this.logging?.afterAction?.enabled&&console.log(e,t,n)})),e.register(\"setContext\",this.setContext.bind(this)),e.register(\"fireIntent\",this.handleFiredIntent.bind(this)),e.register(\"getCurrentContext\",this.getCurrentContext.bind(this)),e.register(\"getInfoForIntent\",this.handleInfoForIntent.bind(this)),e.register(\"getInfoForIntentsByContext\",this.handleInfoForIntentsByContext.bind(this)),e.register(\"fireIntentForContext\",this.handleFiredIntentForContext.bind(this)),e.register(\"getContextGroups\",this.getContextGroups.bind(this)),e.register(\"joinContextGroup\",this.joinContextGroup.bind(this)),e.register(\"removeFromContextGroup\",this.removeFromContextGroup.bind(this)),e.register(\"getAllClientsInContextGroup\",this.getAllClientsInContextGroup.bind(this)),e.register(\"getInfoForContextGroup\",this.getInfoForContextGroup.bind(this)),e.register(\"contextHandlerRegistered\",this.contextHandlerRegistered.bind(this)),e.register(\"intentHandlerRegistered\",this.intentHandlerRegistered.bind(this)),e.register(\"removeContextHandler\",this.removeContextHandler.bind(this)),e.register(\"sessionContextGroup:createIfNeeded\",this.handleJoinSessionContextGroup.bind(this)),e.register(\"fdc3Open\",this.fdc3HandleOpen.bind(this)),e.register(\"fdc3v2FindIntentsByContext\",this.handleInfoForIntentsByContext.bind(this)),e.register(\"fdc3FindInstances\",this.fdc3HandleFindInstances.bind(this)),e.register(\"fdc3GetAppMetadata\",this.fdc3HandleGetAppMetadata.bind(this)),e.register(\"fdc3v2GetInfo\",(async(e,t)=>this.fdc3HandleGetInfo.bind(this)(e,t))),e.register(\"createPrivateChannelProvider\",(async e=>{const{channelId:t}=e,n=await this.fin.InterApplicationBus.Channel.create(t);p.PrivateChannelProvider.init(n,t)}))}isConnectionAuthorized(e,t){return this.wire.sendAction(\"interop-broker-is-connection-authorized\").catch((e=>{})),Promise.resolve(!0)}isActionAuthorized(e,t,n){return this.wire.sendAction(\"interop-broker-is-action-authorized\").catch((e=>{})),Promise.resolve(!0)}};return Gi.InteropBroker=f,e=new WeakMap,t=new WeakMap,n=new WeakMap,Gi}var zi,Ki={},qi={},Ji=s&&s.__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},Yi=s&&s.__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)};Object.defineProperty(qi,\"__esModule\",{value:!0});const Zi=d,Qi=Hi;class Xi extends Zi.Base{constructor(e,t,n){super(e),zi.set(this,void 0),this.id=n,Ji(this,zi,t,\"f\")}async setContext(e){this.wire.sendAction(\"interop-session-context-group-set-context\").catch((e=>{}));return(await Yi(this,zi,\"f\")).dispatch(`sessionContextGroup:setContext-${this.id}`,{sessionContextGroupId:this.id,context:e})}async getCurrentContext(e){this.wire.sendAction(\"interop-session-context-group-get-context\").catch((e=>{}));return(await Yi(this,zi,\"f\")).dispatch(`sessionContextGroup:getContext-${this.id}`,{sessionContextGroupId:this.id,type:e})}async addContextHandler(e,t){if(this.wire.sendAction(\"interop-session-context-group-add-handler\").catch((e=>{})),\"function\"!=typeof e)throw new Error(\"Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.\");const n=await Yi(this,zi,\"f\");let i;return i=t?`sessionContextHandler:invoke-${this.id}-${t}-${(0,Qi.generateId)()}`:`sessionContextHandler:invoke-${this.id}`,n.register(i,(0,Qi.wrapContextHandler)(e,i)),await n.dispatch(`sessionContextGroup:handlerAdded-${this.id}`,{handlerId:i,contextType:t}),{unsubscribe:await this.createUnsubscribeCb(i)}}async createUnsubscribeCb(e){const t=await Yi(this,zi,\"f\");return async()=>{t.remove(e),await t.dispatch(`sessionContextGroup:handlerRemoved-${this.id}`,{handlerId:e})}}getUserInstance(){return{id:this.id,setContext:(0,Qi.wrapInTryCatch)(this.setContext.bind(this),\"Failed to set context: \"),getCurrentContext:(0,Qi.wrapInTryCatch)(this.getCurrentContext.bind(this),\"Failed to get context: \"),addContextHandler:(0,Qi.wrapInTryCatch)(this.addContextHandler.bind(this),\"Failed to add context handler: \")}}}qi.default=Xi,zi=new WeakMap;var er={},tr={},nr={},ir={},rr=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),or=s&&s.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,\"default\",{enumerable:!0,value:t})}:function(e,t){e.default=t}),sr=s&&s.__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)&&rr(t,e,n);return or(t,e),t};Object.defineProperty(ir,\"__esModule\",{value:!0}),ir.PrivateChannelClient=void 0;const ar=sr(Hi);var cr,dr;function hr(){if(cr)return tr;cr=1;var e,t=s&&s.__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)},n=s&&s.__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},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(tr,\"__esModule\",{value:!0}),tr.FDC3ModuleBase=void 0;const o=nr,a=Hi,c=wr(),d=r(i);return tr.FDC3ModuleBase=class{get client(){return t(this,e,\"f\").call(this)}get fin(){return this.wire.getFin()}constructor(t,i){this.wire=i,e.set(this,void 0),n(this,e,t,\"f\")}async broadcast(e){return this.wire.sendAction(\"fdc3-broadcast\").catch((e=>{})),this.client.setContext(e)}async _open(e,t){this.wire.sendAction(\"fdc3-open\").catch((e=>{}));try{return await c.InteropClient.ferryFdc3Call(this.client,\"fdc3Open\",{app:e,context:t})}catch(e){const t=e.message===a.BROKER_ERRORS.fdc3Open?\"ResolverUnavailable\":e.message;throw new Error(t)}}async _getChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:\"system\",...(0,o.getUnsupportedChannelApis)()})))}async getOrCreateChannel(e){this.wire.sendAction(\"fdc3-get-or-create-channel\").catch((e=>{}));const t=(await this._getChannels()).find((t=>t.id===e));if(t)return{...t,type:\"system\",...(0,o.getUnsupportedChannelApis)()};try{const t=await this.client.joinSessionContextGroup(e);return(0,o.buildAppChannelObject)(t)}catch(e){throw console.error(e.message),new Error(o.ChannelError.CreationFailed)}}async getSystemChannels(){return this.wire.sendAction(\"fdc3-get-system-channels\").catch((e=>{})),this._getChannels()}async joinChannel(e){this.wire.sendAction(\"fdc3-join-channel\").catch((e=>{}));try{return await this.client.joinContextGroup(e)}catch(e){if(e.message===a.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup?console.error(\"The Channel you have tried to join is an App Channel. Custom Channels can only be defined by the Interop Broker through code or manifest configuration. Please use getOrCreateChannel.\"):console.error(e.message),e.message.startsWith(\"Attempting to join a context group that does not exist\"))throw new Error(o.ChannelError.NoChannelFound);throw new Error(o.ChannelError.AccessDenied)}}async getCurrentChannel(){this.wire.sendAction(\"fdc3-get-current-channel\").catch((e=>{}));const e=await this.getCurrentContextGroupInfo();return e?this.buildChannelObject(e):null}async leaveCurrentChannel(){return this.wire.sendAction(\"fdc3-leave-current-channel\").catch((e=>{})),this.client.removeFromContextGroup()}async getCurrentContextGroupInfo(){const e=await this.client.getContextGroups(),t=e.map((async e=>this.client.getAllClientsInContextGroup(e.id))),n=(await Promise.all(t)).findIndex((e=>e.some((e=>{const{uuid:t,name:n}=e;return this.wire.me.uuid===t&&this.wire.me.name===n}))));return e[n]}async buildChannelObject(e){return{...e,type:\"system\",addContextListener:(...[e,t])=>{let n,i;\"function\"==typeof e?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),n=e):(n=t,\"string\"==typeof e&&(i=e));const r=(async()=>{let e=!0;const t=await this.client.getCurrentContext(i);return this.client.addContextHandler(((i,r)=>{if(!e||(e=!1,!(0,d.default)(t,i)))return n(i,r)}),i)})();return{...r,unsubscribe:()=>r.then((e=>e.unsubscribe()))}},broadcast:this.broadcast.bind(this),getCurrentContext:async e=>{const t=await this.client.getCurrentContext(e);return void 0===t?null:t}}}},e=new WeakMap,tr}ir.PrivateChannelClient=class{constructor(e,t){this.id=t,this.client=e,this.listeners=new Map}async broadcast(e){return this.client.dispatch(\"broadcast\",{context:e})}async getCurrentContext(e){return this.client.dispatch(\"getCurrentContext\",{contextType:e})}async addContextListener(e,t){if(\"function\"!=typeof t)throw new Error(\"Non-function argument passed to the second parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.\");let n;n=e?`contextHandler:invoke-${this.id}-${e}-${ar.generateId()}`:`contextHandler:invoke-${this.id}-${ar.generateId()}`,this.client.register(n,ar.wrapContextHandler(t,n));const i={unsubscribe:await this.createContextUnsubscribeCb(n)};return this.listeners.set(n,i),await this.client.dispatch(\"contextHandlerAdded\",{handlerId:n,contextType:e}),i}createNonStandardUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch(\"nonStandardHandlerRemoved\",{handlerId:e})}}createContextUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch(\"contextHandlerRemoved\",{handlerId:e})}}onAddContextListener(e){const t=`onContextHandlerAdded:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch(\"onAddContextHandlerAdded\",{handlerId:t}),n}onDisconnect(e){const t=`onDisconnect:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch(\"onDisconnectHandlerAdded\",{handlerId:t}),n}onUnsubscribe(e){const t=`onUnsubscribe:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch(\"onUnsubscribeHandlerAdded\",{handlerId:t}),n}async cleanUpAllSubs(){Array.from(this.listeners.keys()).forEach((e=>{this.client.remove(e),this.listeners.delete(e)}))}async disconnect(){try{await this.client.dispatch(\"clientDisconnecting\"),await this.cleanUpAllSubs(),await this.client.disconnect()}catch(e){throw new Error(e.message)}}},function(e){var t=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,\"__esModule\",{value:!0}),e.getIntentResolution=e.isChannel=e.isContext=e.connectPrivateChannel=e.buildAppChannelObject=e.buildPrivateChannelObject=e.ChannelError=e.ResultError=e.UnsupportedChannelApiError=e.getUnsupportedChannelApis=void 0;const n=Hi,r=ir,o=t(i);e.getUnsupportedChannelApis=e=>({addContextListener:()=>{throw new a(\"Channel.addContextListener\",e)},broadcast:()=>{throw new a(\"Channel.broadcast\",e)},getCurrentContext:()=>{throw new a(\"Channel.getCurrentContext\",e)}});class a extends Error{constructor(e,t=\"System\"){super(e),this.message=`Calling ${e} on an instance of a ${t} Channel returned by fdc3.get${t}Channels is not supported. If you would like to use a ${t} Channel, please use fdc3.joinChannel, fdc3.addContextListener, and fdc3.broadcast instead.`}}var c,d;e.UnsupportedChannelApiError=a,function(e){e.NoResultReturned=\"NoResultReturned\",e.IntentHandlerRejected=\"IntentHandlerRejected\"}(c=e.ResultError||(e.ResultError={})),(d=e.ChannelError||(e.ChannelError={})).NoChannelFound=\"NoChannelFound\",d.AccessDenied=\"AccessDenied\",d.CreationFailed=\"CreationFailed\";e.buildPrivateChannelObject=e=>{let t=!1;const n=()=>{if(t)throw new Error(\"Private Channel Client has been disconnected from the Private Channel\")};return{id:e.id,type:\"private\",broadcast:async t=>(n(),e.broadcast(t)),getCurrentContext:async t=>(n(),e.getCurrentContext(t)),addContextListener:async(t,i)=>{n();let r=i,o=t;\"function\"==typeof t&&(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),r=t,o=null);return e.addContextListener(o,r)},onAddContextListener:t=>(n(),e.onAddContextListener(t)),disconnect:async()=>(n(),t=!0,e.disconnect()),onDisconnect:t=>(n(),e.onDisconnect(t)),onUnsubscribe:t=>(n(),e.onUnsubscribe(t))}};e.buildAppChannelObject=e=>({id:e.id,type:\"app\",broadcast:e.setContext,getCurrentContext:async t=>{const n=await e.getCurrentContext(t);return void 0===n?null:n},addContextListener:(t,n)=>{let i,r;\"function\"==typeof t?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),i=t):(i=n,\"string\"==typeof t&&(r=t));const s=(async()=>{let t=!0;const n=await e.getCurrentContext(r);return e.addContextHandler(((e,r)=>{if(!t||(t=!1,!(0,o.default)(n,e)))return i(e,r)}),r)})();return{...s,unsubscribe:()=>s.then((e=>e.unsubscribe()))}}});e.connectPrivateChannel=async t=>{try{const n=await fin.InterApplicationBus.Channel.connect(t),i=new r.PrivateChannelClient(n,t);return(0,e.buildPrivateChannelObject)(i)}catch(e){throw new Error(`Private Channel with id: ${t} doesn't exist`)}};e.isContext=e=>{if(e&&\"object\"==typeof e&&\"type\"in e){const{type:t}=e;return\"string\"==typeof t}return!1};e.isChannel=e=>{if(e&&\"object\"==typeof e&&\"type\"in e&&\"id\"in e){const{type:t,id:n}=e;return\"string\"==typeof t&&\"string\"==typeof n&&(\"app\"===t||\"private\"===t)}return!1};e.getIntentResolution=async(t,i,r,o)=>{const s=(0,n.generateId)(),a=new Promise(((e,t)=>{fin.InterApplicationBus.subscribe({uuid:\"*\"},s,(t=>{e(t)})).catch((()=>t(new Error(\"getResult is not supported in this environment\"))))})),d=r?{target:r,intentResolutionResultId:s}:{intentResolutionResultId:s},h=o?{name:o,context:i,metadata:d}:{...i,metadata:d},l=async()=>{let n=await a;if(!n||\"object\"!=typeof n)throw new Error(c.NoResultReturned);const{error:i}=n;if(i)throw new Error(c.IntentHandlerRejected);if((0,e.isChannel)(n)){const{id:i,type:r}=n;switch(r){case\"private\":n=await(0,e.connectPrivateChannel)(i);break;case\"app\":{const r=await t.joinSessionContextGroup(i);n=(0,e.buildAppChannelObject)(r);break}}}else if(!(0,e.isContext)(n))throw new Error(c.NoResultReturned);return n},u=o?await t.fireIntent(h):await t.fireIntentForContext(h);return\"object\"!=typeof u?{source:{appId:\"\",instanceId:\"\"},intent:\"\",version:\"2.0\",getResult:l}:{...u,getResult:l}}}(nr);var lr,ur,pr={};function wr(){if(ur)return Ki;ur=1;var e,t,n=s&&s.__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},i=s&&s.__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)},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ki,\"__esModule\",{value:!0}),Ki.InteropClient=void 0;const o=d,a=r(qi),c=function(){if(dr)return er;dr=1,Object.defineProperty(er,\"__esModule\",{value:!0}),er.Fdc3Module=void 0;const e=Hi,t=hr();class n extends t.FDC3ModuleBase{async open(e,t){await super._open(e,t)}addContextListener(e,t){let n;return this.wire.sendAction(\"fdc3-add-context-listener\").catch((e=>{})),\"function\"==typeof e?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),n=this.client.addContextHandler(e)):n=this.client.addContextHandler(t,null===e?void 0:e),{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}addIntentListener(e,t){this.wire.sendAction(\"fdc3-add-intent-listener\").catch((e=>{}));const n=this.client.registerIntentHandler((e=>{const{context:n,metadata:i}=e,{metadata:r}=n,o=i?.intentResolutionResultId||r?.intentResolutionResultId;o&&this.fin.InterApplicationBus.publish(o,null).catch((()=>null)),t(e.context)}),e,{fdc3Version:\"1.2\"});return{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}async raiseIntent(t,n,i){this.wire.sendAction(\"fdc3-raise-intent\").catch((e=>{}));const r=i?{name:t,context:n,metadata:{target:i}}:{name:t,context:n};try{return await this.client.fireIntent(r)}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntent?\"ResolverUnavailable\":t.message;throw new Error(n)}}async findIntent(t,n){this.wire.sendAction(\"fdc3-find-intent\").catch((e=>{}));try{return await this.client.getInfoForIntent({name:t,context:n})}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntent?\"ResolverUnavailable\":t.message;throw new Error(n)}}async findIntentsByContext(t){this.wire.sendAction(\"fdc3-find-intents-by-context\").catch((e=>{}));try{return await this.client.getInfoForIntentsByContext(t)}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntentsByContext?\"ResolverUnavailable\":t.message;throw new Error(n)}}async raiseIntentForContext(t,n){this.wire.sendAction(\"fdc3-raise-intent-for-context\").catch((e=>{}));try{return await this.client.fireIntentForContext({...t,metadata:{target:n}})}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntentForContext?\"ResolverUnavailable\":t.message;throw new Error(n)}}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}getInfo(){return this.wire.sendAction(\"fdc3-get-info\").catch((e=>{})),{providerVersion:this.wire.environment.getAdapterVersionSync(),provider:`openfin-${this.wire.me.uuid}`,fdc3Version:\"1.2\"}}}return er.Fdc3Module=n,er}(),h=function(){if(lr)return pr;lr=1,Object.defineProperty(pr,\"__esModule\",{value:!0}),pr.Fdc3Module2=void 0;const e=hr(),t=Hi,n=wr(),i=nr,r=ir;class o extends e.FDC3ModuleBase{async open(e,t){return\"string\"==typeof e&&console.warn(\"Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).\"),super._open(e,t)}async findInstances(e){this.wire.sendAction(\"fdc3-find-instances\").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,\"fdc3FindInstances\",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3FindInstances?\"ResolverUnavailable\":e.message;throw new Error(n)}}async getAppMetadata(e){this.wire.sendAction(\"fdc3-get-app-metadata\").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,\"fdc3GetAppMetadata\",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3GetAppMetadata?\"ResolverUnavailable\":e.message;throw new Error(n)}}async addContextListener(e,t){this.wire.sendAction(\"fdc3-add-context-listener\").catch((e=>{}));const n=e=>t=>{const{contextMetadata:n,...i}=t,r=n?[{...i},n]:[t,null];e(...r)};let i=t,r=n(i);return\"function\"==typeof e?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),i=e,r=n(i),this.client.addContextHandler(r)):this.client.addContextHandler(r,null===e?void 0:e)}async findIntent(e,n,i){this.wire.sendAction(\"fdc3-find-intent\").catch((e=>{}));try{return await this.client.getInfoForIntent({name:e,context:n,metadata:{resultType:i}})}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntent?\"ResolverUnavailable\":e.message;throw new Error(n)}}async findIntentsByContext(e,i){this.wire.sendAction(\"fdc3-find-intents-by-context\").catch((e=>{}));const r=i?{context:e,metadata:{resultType:i}}:e;try{return await n.InteropClient.ferryFdc3Call(this.client,\"fdc3v2FindIntentsByContext\",r)}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntentsByContext?\"ResolverUnavailable\":e.message;throw new Error(n)}}async raiseIntent(e,n,r){this.wire.sendAction(\"fdc3-raise-intent\").catch((e=>{}));try{return\"string\"==typeof r&&console.warn(\"Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).\"),(0,i.getIntentResolution)(this.client,n,r,e)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?\"ResolverUnavailable\":e.message;throw new Error(n)}}async raiseIntentForContext(e,n){this.wire.sendAction(\"fdc3-raise-intent-for-context\").catch((e=>{}));try{return\"string\"==typeof n&&console.warn(\"Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).\"),(0,i.getIntentResolution)(this.client,e,n)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?\"ResolverUnavailable\":e.message;throw new Error(n)}}async addIntentListener(e,t){if(this.wire.sendAction(\"fdc3-add-intent-listener\").catch((e=>{})),\"string\"!=typeof e)throw new Error(\"First argument must be an Intent name\");return this.client.registerIntentHandler((async e=>{let n,i;const{context:r,metadata:o}=e,{contextMetadata:s,metadata:a,...c}=r,d=o?.intentResolutionResultId||a?.intentResolutionResultId;try{const e=a?{metadata:a,...c}:{...c};n=await t(e,s),i=n}catch(e){n=e,i={error:!0}}if(d&&this.fin.InterApplicationBus.publish(d,i).catch((()=>null)),n instanceof Error)throw new Error(n.message);return n}),e,{fdc3Version:\"2.0\"})}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}async createPrivateChannel(){const e=(0,t.generateId)();await n.InteropClient.ferryFdc3Call(this.client,\"createPrivateChannelProvider\",{channelId:e});const o=await this.fin.InterApplicationBus.Channel.connect(e),s=new r.PrivateChannelClient(o,e);return(0,i.buildPrivateChannelObject)(s)}async getUserChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:\"user\",...(0,i.getUnsupportedChannelApis)(\"User\")})))}async getSystemChannels(){return console.warn(\"This API has been deprecated. Please use fdc3.getUserChannels instead.\"),super.getSystemChannels()}async joinUserChannel(e){return super.joinChannel(e)}async joinChannel(e){return console.warn(\"This API has been deprecated. Please use fdc3.joinUserChannel instead.\"),super.joinChannel(e)}async getCurrentChannel(){const e=await super.getCurrentChannel();return e?{...e,type:\"user\",broadcast:this.broadcast.bind(this)}:null}async getInfo(){return n.InteropClient.ferryFdc3Call(this.client,\"fdc3v2GetInfo\",{fdc3Version:\"2.0\"})}}return pr.Fdc3Module2=o,pr}(),l=Hi;let u=class extends o.Base{constructor(i,r){super(i),e.set(this,void 0),t.set(this,void 0),n(this,t,new Map,\"f\"),n(this,e,r,\"f\")}async setContext(t){this.wire.sendAction(\"interop-client-set-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"setContext\",{context:t})}async addContextHandler(t,n){if(this.wire.sendAction(\"interop-client-add-context-handler\").catch((e=>{})),\"function\"!=typeof t)throw new Error(\"Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.\");const r=await i(this,e,\"f\");let o;o=n?`invokeContextHandler-${n}-${(0,l.generateId)()}`:\"invokeContextHandler\";const s=(0,l.wrapContextHandler)(t,o);return r.register(o,s),await r.dispatch(\"contextHandlerRegistered\",{handlerId:o,contextType:n}),{unsubscribe:async()=>{r.remove(o),await r.dispatch(\"removeContextHandler\",{handlerId:o})}}}async getContextGroups(){this.wire.sendAction(\"interop-client-get-context-groups\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getContextGroups\")}async joinContextGroup(t,n){this.wire.sendAction(\"interop-client-join-context-group\").catch((e=>{}));const r=await i(this,e,\"f\");if(!t)throw new Error(\"No contextGroupId specified for joinContextGroup.\");return r.dispatch(\"joinContextGroup\",{contextGroupId:t,target:n})}async removeFromContextGroup(t){this.wire.sendAction(\"interop-client-remove-from-context-group\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"removeFromContextGroup\",{target:t})}async getAllClientsInContextGroup(t){this.wire.sendAction(\"interop-client-get-all-clients-in-context-group\").catch((e=>{}));const n=await i(this,e,\"f\");if(!t)throw new Error(\"No contextGroupId specified for getAllClientsInContextGroup.\");return n.dispatch(\"getAllClientsInContextGroup\",{contextGroupId:t})}async getInfoForContextGroup(t){this.wire.sendAction(\"interop-client-get-info-for-context-group\").catch((e=>{}));const n=await i(this,e,\"f\");if(!t)throw new Error(\"No contextGroupId specified for getInfoForContextGroup.\");return n.dispatch(\"getInfoForContextGroup\",{contextGroupId:t})}async fireIntent(t){this.wire.sendAction(\"interop-client-fire-intent\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"fireIntent\",t)}async registerIntentHandler(t,n,r){this.wire.sendAction(\"interop-client-register-intent-handler\").catch((e=>{}));const o=await i(this,e,\"f\"),s=`intent-handler-${n}`,a=(0,l.wrapIntentHandler)(t,s);try{await o.register(s,a),await o.dispatch(\"intentHandlerRegistered\",{handlerId:s,...r})}catch(e){throw new Error(\"Unable to register intent handler\")}return{unsubscribe:async()=>{o.remove(s)}}}async getCurrentContext(t){this.wire.sendAction(\"interop-client-get-current-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getCurrentContext\",{contextType:t})}async getInfoForIntent(t){this.wire.sendAction(\"interop-client-get-info-for-intent\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getInfoForIntent\",t)}async getInfoForIntentsByContext(t){this.wire.sendAction(\"interop-client-get-info-for-intents-by-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getInfoForIntentsByContext\",t)}async fireIntentForContext(t){this.wire.sendAction(\"interop-client-fire-intent-for-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"fireIntentForContext\",t)}async joinSessionContextGroup(n){try{const r=i(this,t,\"f\").get(n);if(r)return r.getUserInstance();const o=await i(this,e,\"f\"),{hasConflict:s}=await o.dispatch(\"sessionContextGroup:createIfNeeded\",{sessionContextGroupId:n});s&&console.warn(`A (non-session) context group with the name \"${n}\" already exists. If you are trying to join a Context Group, call joinContextGroup instead.`);const c=new a.default(this.wire,i(this,e,\"f\"),n);return i(this,t,\"f\").set(n,c),c.getUserInstance()}catch(e){throw console.error(`Error thrown trying to create Session Context Group with id \"${n}\": ${e}`),e}}async onDisconnection(t){this.wire.sendAction(\"interop-client-add-ondisconnection-listener\").catch((e=>{}));return(await i(this,e,\"f\")).onDisconnection((e=>{const{uuid:n}=e;t({type:\"interop-broker\",topic:\"disconnected\",brokerName:n})}))}getFDC3Sync(e){switch(e){case\"1.2\":return new c.Fdc3Module((()=>this),this.wire);case\"2.0\":return new h.Fdc3Module2((()=>this),this.wire);default:throw new Error(`Invalid FDC3 version provided: ${e}. Must be '1.2' or '2.0'`)}}async getFDC3(e){return this.getFDC3Sync(e)}static async ferryFdc3Call(t,n,r){return(await i(t,e,\"f\")).dispatch(n,r||null)}};return Ki.InteropClient=u,e=new WeakMap,t=new WeakMap,Ki}var yr,fr,gr,mr={};function vr(){if(yr)return mr;yr=1,Object.defineProperty(mr,\"__esModule\",{value:!0}),mr.overrideCheck=mr.checkFDC32Overrides=mr.getDefaultViewFdc3VersionFromAppInfo=void 0;const e=Vi();function t(t){return[\"fdc3HandleFindInstances\",\"handleInfoForIntent\",\"handleInfoForIntentsByContext\",\"fdc3HandleGetAppMetadata\",\"fdc3HandleGetInfo\",\"fdc3HandleOpen\",\"handleFiredIntent\",\"handleFiredIntentForContext\"].filter((n=>t[n]===e.InteropBroker.prototype[n]))}return mr.getDefaultViewFdc3VersionFromAppInfo=function({manifest:e,initialOptions:t}){const n=e?.platform?.defaultViewOptions?.fdc3InteropApi??t.defaultViewOptions?.fdc3InteropApi;return[\"1.2\",\"2.0\"].includes(n??\"\")?n:void 0},mr.checkFDC32Overrides=t,mr.overrideCheck=function(e,n){if(n&&\"2.0\"===n){const n=t(e);n.length>0&&console.warn(`WARNING: FDC3 2.0 has been set as a default option for Views in this Platform, but the required InteropBroker APIs for FDC3 2.0 compliance have not all been overridden.\\nThe following APIs need to be overridden:\\n${n.join(\"\\n\")}`)}},mr}function Cr(){return gr||(gr=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),i=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),i(function(){if(fr)return Ti;fr=1;var e=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ti,\"__esModule\",{value:!0}),Ti.InteropModule=void 0;const t=e(n),i=$i,r=d,o=Vi(),a=wr(),c=vr(),h=Tn,l=e=>new e,u=\"You have attempted to use or modify InteropBroker parameters, which is not allowed. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.\";class p extends r.Base{async init(e,n=l){this.wire.sendAction(\"interop-init\").catch((()=>{}));const r=await this.wire.environment.getInteropInfo(this.wire.getFin()),s=(0,i.createUnusableObject)(u),a=(0,i.createWarningObject)(u,(0,t.default)(r)),d=async()=>{throw new Error(u)},p=o.InteropBroker.createClosedConstructor(this.wire,(()=>this.fin.InterApplicationBus.Channel.create(`interop-broker-${e}`)),r);let w;return w=Array.isArray(n)?new((0,h.overrideFromComposables)(...n)(p))(s,d,a):await n(p,s,d,a),(0,c.overrideCheck)(w,r.fdc3Version),w}connectSync(e,t){return this.wire.sendAction(\"interop-connect-sync\").catch((()=>{})),new a.InteropClient(this.wire,this.wire.environment.whenReady().then((()=>this.fin.InterApplicationBus.Channel.connect(`interop-broker-${e}`,{payload:t}))))}}return Ti.InteropModule=p,Ti}(),e),i(wr(),e),i(Vi(),e)}(Li)),Li}var br={},Ir={},Er={},xr={};Object.defineProperty(xr,\"__esModule\",{value:!0}),xr.getSnapshotSourceChannelName=void 0;xr.getSnapshotSourceChannelName=e=>`snapshot-source-provider-${e.uuid}`;var Ar,Pr,Mr,_r,Or,Sr=s&&s.__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},Rr=s&&s.__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)};Object.defineProperty(Er,\"__esModule\",{value:!0}),Er.SnapshotSource=void 0;const Fr=d,jr=xr,kr=new Map;class Lr extends Fr.Base{constructor(e,t){super(e),Ar.set(this,void 0),Pr.set(this,(()=>(kr.has(this.identity.uuid)||kr.set(this.identity.uuid,{eventFired:null,clientPromise:null}),kr.get(this.identity.uuid)))),Mr.set(this,(()=>(Rr(this,Pr,\"f\").call(this).clientPromise||(Rr(this,Pr,\"f\").call(this).clientPromise=Rr(this,_r,\"f\").call(this)),Rr(this,Pr,\"f\").call(this).clientPromise))),_r.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);try{Rr(this,Pr,\"f\").call(this).eventFired||await Rr(this,Or,\"f\").call(this);const t=await this.fin.InterApplicationBus.Channel.connect(e,{wait:!1});return t.onDisconnection((()=>{Rr(this,Pr,\"f\").call(this).clientPromise=null,Rr(this,Pr,\"f\").call(this).eventFired=null})),t}catch(e){throw Rr(this,Pr,\"f\").call(this).clientPromise=null,new Error(\"The targeted SnapshotSource is not currently initialized. Await this object's ready() method.\")}})),Or.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);let t,n;const i=new Promise(((e,i)=>{t=e,n=i}));Rr(this,Pr,\"f\").call(this).eventFired=i;const r=async i=>{try{i.channelName===e&&(t(),await this.fin.InterApplicationBus.Channel.removeListener(\"connected\",r))}catch(e){n(e)}};await this.fin.InterApplicationBus.Channel.on(\"connected\",r)})),Sr(this,Ar,t,\"f\")}get identity(){return Rr(this,Ar,\"f\")}async ready(){this.wire.sendAction(\"snapshot-source-ready\").catch((e=>{}));try{await Rr(this,Mr,\"f\").call(this)}catch(e){await Rr(this,Pr,\"f\").call(this).eventFired}}async getSnapshot(){this.wire.sendAction(\"snapshot-source-get-snapshot\").catch((e=>{}));const e=await Rr(this,Mr,\"f\").call(this),t=await e.dispatch(\"get-snapshot\");return(await t).snapshot}async applySnapshot(e){this.wire.sendAction(\"snapshot-source-apply-snapshot\").catch((e=>{}));return(await Rr(this,Mr,\"f\").call(this)).dispatch(\"apply-snapshot\",{snapshot:e})}}Er.SnapshotSource=Lr,Ar=new WeakMap,Pr=new WeakMap,Mr=new WeakMap,_r=new WeakMap,Or=new WeakMap,Object.defineProperty(Ir,\"__esModule\",{value:!0}),Ir.SnapshotSourceModule=void 0;const Tr=d,$r=Er,Br=xr;class Gr extends Tr.Base{async init(e){if(this.wire.sendAction(\"snapshot-source-init\").catch((e=>{})),\"object\"!=typeof e||\"function\"!=typeof e.getSnapshot||\"function\"!=typeof e.applySnapshot)throw new Error(\"you must pass in a valid SnapshotProvider\");const t=await this.fin.InterApplicationBus.Channel.create((0,Br.getSnapshotSourceChannelName)(this.fin.me));t.register(\"get-snapshot\",(async()=>({snapshot:await e.getSnapshot()}))),t.register(\"apply-snapshot\",(({snapshot:t})=>e.applySnapshot(t)))}wrapSync(e){return this.wire.sendAction(\"snapshot-source-wrap-sync\").catch((e=>{})),new $r.SnapshotSource(this.wire,e)}async wrap(e){return this.wire.sendAction(\"snapshot-source-wrap\").catch((e=>{})),this.wrapSync(e)}}Ir.SnapshotSourceModule=Gr,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Ir,e),n(Er,e)}(br),Object.defineProperty(a,\"__esModule\",{value:!0});var Wr=a.Fin=void 0;const Hr=t,Nr=c,Dr=ie(),Ur=Z(),Vr=de,zr=en,Kr=rn,qr=un,Jr=bn,Yr=J(),Zr=An,Qr=ki,Xr=Cr(),eo=br;class to extends Hr.EventEmitter{constructor(e){super(),this.wire=e,this.System=new Nr.System(e),this.Window=new Dr._WindowModule(e),this.Application=new Ur.ApplicationModule(e),this.InterApplicationBus=new Vr.InterApplicationBus(e),this.Clipboard=new zr.Clipboard(e),this.ExternalApplication=new Kr.ExternalApplicationModule(e),this.Frame=new qr._FrameModule(e),this.GlobalHotkey=new Jr.GlobalHotkey(e),this.Platform=new Zr.PlatformModule(e,this.InterApplicationBus.Channel),this.View=new Yr.ViewModule(e),this.Interop=new Xr.InteropModule(e),this.SnapshotSource=new eo.SnapshotSourceModule(e),e.registerFin(this),this.me=(0,Qr.getMe)(e),e.on(\"disconnected\",(()=>{this.emit(\"disconnected\")}))}}Wr=a.Fin=to;var no={},io={};function ro(e){return\"string\"==typeof e.manifestUrl}function oo(e){return ao(e)&&\"string\"==typeof e.address}function so(e){return oo(e)&&\"string\"==typeof e.token}function ao(e){return\"string\"==typeof e.uuid}function co(e){return e.runtime&&\"string\"==typeof e.runtime.version}function ho(e){return ao(e)&&co(e)}Object.defineProperty(io,\"__esModule\",{value:!0}),io.isInternalConnectConfig=io.isPortDiscoveryConfig=io.isNewConnectConfig=io.isConfigWithReceiver=io.isRemoteConfig=io.isExistingConnectConfig=io.isExternalConfig=void 0,io.isExternalConfig=ro,io.isExistingConnectConfig=oo,io.isRemoteConfig=so,io.isConfigWithReceiver=function(e){return\"object\"==typeof e.receiver&&so({...e,address:\"\"})},io.isNewConnectConfig=ho,io.isPortDiscoveryConfig=function(e){return ro(e)&&co(e)||ho(e)},io.isInternalConnectConfig=function(e){return oo(e)||ho(e)};var lo={},uo={};Object.defineProperty(uo,\"__esModule\",{value:!0}),uo.EmitterMap=void 0;const po=t;function wo(e){return Buffer.from(e).toString(\"base64\")}uo.EmitterMap=class{constructor(){this.storage=new Map}hashKeys(e){return e.map(wo).join(\"/\")}getOrCreate(e){const t=this.hashKeys(e);return this.storage.has(t)||this.storage.set(t,new po.EventEmitter),this.storage.get(t)}has(e){return this.storage.has(this.hashKeys(e))}delete(e){const t=this.hashKeys(e);return this.storage.delete(t)}},Object.defineProperty(lo,\"__esModule\",{value:!0});const yo=uo;class fo extends yo.EmitterMap{constructor(){super(...arguments),this.dispatchEvent=e=>{if(function(e){return\"process-desktop-event\"===e.action}(e)){const{payload:t}=e,n=function(e){const{topic:t}=e;if(\"frame\"===t||\"window\"===t||\"view\"===t){const{uuid:n,name:i}=e;return[t,n,i]}if(\"application\"===t){const{uuid:n}=e;return[t,n]}return[t]}(t);if(this.has(n))return this.getOrCreate(n).emit(t.type,t),!0}return!1}}}lo.default=fo;var go,mo,vo=s&&s.__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},Co=s&&s.__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)},bo=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(no,\"__esModule\",{value:!0});var Io=no.Transport=void 0;const Eo=t,xo=io,Ao=g,Po=bo(lo),Mo=ki,_o=ke;class Oo extends Eo.EventEmitter{constructor(e,t,n){super(),this.wireListeners=new Map,this.topicRefMap=new Map,this.eventAggregator=new Po.default,this.messageHandlers=[this.eventAggregator.dispatchEvent],go.set(this,void 0),mo.set(this,void 0),this.connectSync=()=>{Co(this,go,\"f\").connectSync()},this.getPort=()=>Co(this,go,\"f\").getPort(),vo(this,go,new e(this.onmessage.bind(this)),\"f\"),this.environment=t,this.sendRaw=Co(this,go,\"f\").send.bind(Co(this,go,\"f\")),this.registerMessageHandler(this.handleMessage.bind(this)),Co(this,go,\"f\").on(\"disconnected\",(()=>{for(const[,{handleNack:e}]of this.wireListeners)e({reason:\"Remote connection has closed\"});this.wireListeners.clear(),this.emit(\"disconnected\")}));const{uuid:i,name:r}=n,o=this.environment.getCurrentEntityType();this.me=(0,Mo.getBaseMe)(o,i,r)}getFin(){if(!Co(this,mo,\"f\"))throw new Error(\"No Fin object registered for this transport\");return Co(this,mo,\"f\")}registerFin(e){if(Co(this,mo,\"f\"))throw new Error(\"Fin object has already been registered for this transport\");vo(this,mo,e,\"f\")}shutdown(){return Co(this,go,\"f\").shutdown()}async connect(e){if((0,xo.isConfigWithReceiver)(e))return await Co(this,go,\"f\").connect(e.receiver),this.authorize(e);if((0,xo.isRemoteConfig)(e))return this.connectRemote(e);if((0,xo.isExistingConnectConfig)(e))return this.connectByPort(e);if((0,xo.isNewConnectConfig)(e)){const t=await this.environment.retrievePort(e);return this.connectByPort({...e,address:`ws://localhost:${t}`})}}async connectRemote(e){return await Co(this,go,\"f\").connect(new(this.environment.getWsConstructor())(e.address)),this.authorize(e)}async connectByPort(e){const{address:t,uuid:n}=e,i={...e,type:\"file-token\"},r=Co(this,go,\"f\");await r.connect(new(this.environment.getWsConstructor())(e.address));const o=await this.sendAction(\"request-external-authorization\",{uuid:n,type:\"file-token\"},!0);if(\"external-authorization-response\"!==o.action)throw new Ao.UnexpectedActionError(o.action);return await this.environment.writeToken(o.payload.file,o.payload.token),this.authorize(i)}async authorize(e){const t=await this.sendAction(\"request-authorization\",e,!0);if(\"authorization-response\"!==t.action)throw new Ao.UnexpectedActionError(t.action);if(!0!==t.payload.success)throw new Ao.RuntimeError(t.payload)}sendAction(e,t={},n=!1){let i=()=>{};const r=Ao.RuntimeError.getCallSite(1),o=this.environment.getNextMessageId(),s=new Promise(((s,a)=>{i=a;const c={action:e,payload:t,messageId:o},d=Co(this,go,\"f\");return this.addWireListener(o,s,(e=>this.nackHandler(e,a,r)),n),d.send(c).catch(a)}));return Object.assign(s,{cancel:i,messageId:o})}nackHandler(e,t,n){t(\"string\"==typeof e?e:new Ao.RuntimeError(e,n))}ferryAction(e){return new Promise(((t,n)=>{const i=this.environment.getNextMessageId();e.messageId=i;const r=e=>{t(e.payload)};return Co(this,go,\"f\").send(e).then((()=>this.addWireListener(i,r,(e=>this.nackHandler(e,n)),!1))).catch(n)}))}registerMessageHandler(e){this.messageHandlers.push(e)}addWireListener(e,t,n,i){i?this.uncorrelatedListener=t:this.wireListeners.has(e)?n({reason:\"Duplicate handler id\",error:(0,_o.errorToPOJO)(new Ao.DuplicateCorrelationError(String(e)))}):this.wireListeners.set(e,{resolve:t,handleNack:n})}onmessage(e){for(const t of this.messageHandlers)t.call(null,e)}handleMessage(e){const t=e.correlationId||NaN;if(\"correlationId\"in e){if(!this.wireListeners.has(t))return!1;{const{resolve:n,handleNack:i}=this.wireListeners.get(t);\"ack\"!==e.action?i({reason:\"Did not receive ack action\",error:(0,_o.errorToPOJO)(new Ao.NoAckError(e.action))}):\"payload\"in e?e.payload.success?n.call(null,e):i(e.payload):\"string\"==typeof e.reason?i(e):(console.warn(\"Received invalid response from core\",e),i({reason:\"invalid response shape\"})),this.wireListeners.delete(t)}}else this.uncorrelatedListener&&this.uncorrelatedListener.call(null,e),this.uncorrelatedListener=()=>{};return!0}}Io=no.Transport=Oo,go=new WeakMap,mo=new WeakMap;const So=(...e)=>({log:(...t)=>console.debug(`[${(new Date).toISOString()}]`,...(e=>e.map((e=>`[${e}]`)))(e),...t),getLogger:(...t)=>So(...e,...t)}),Ro=So(\"@openfin/core-web/client\");function Fo(e,t){if(!function(e){return\"string\"==typeof e}(e))throw new Error(`Property ${t} has invalid type. Expected string, got ${typeof e}.`)}const jo=\"web-broker-ports-ready\",ko=Ro.getLogger(\"get-web-interop-ports\");function Lo(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)}function To(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}\"function\"==typeof SuppressedError&&SuppressedError;const $o=e=>{var n,i,r;return r=class extends t.EventEmitter{constructor(t){super(),n.set(this,void 0),i.set(this,!1),this.connectSync=()=>{Lo(this,i,\"f\")||(e.addEventListener(\"message\",(e=>{e.data?.topic?.startsWith(\"wire-message\")&&e.data.message&&Lo(this,n,\"f\").call(this,{...JSON.parse(e.data.message),ports:e.ports})})),e.start())},this.connect=async()=>{this.connectSync()},this.send=t=>(e.postMessage({topic:\"wire-message\",message:JSON.stringify(t)}),Promise.resolve()),this.shutdown=async()=>{e.close()},To(this,n,t,\"f\")}getPort(){return e}},n=new WeakMap,i=new WeakMap,r};var Bo={},Go={};Object.defineProperty(Go,\"__esModule\",{value:!0}),Go.BaseEnvironment=void 0;const Wo=vr();Go.BaseEnvironment=class{async getViewWindowIdentity(e,t){const{identity:n}=await e.View.wrapSync(t).getCurrentWindow();return n}async getInteropInfo(e){const t=await e.Application.getCurrentSync().getInfo().catch((()=>null)),n=t?.initialOptions?.interopBrokerConfiguration??{};return{fdc3Version:t?(0,Wo.getDefaultViewFdc3VersionFromAppInfo)(t):void 0,...n,fdc3Info:{providerVersion:await e.System.getVersion(),provider:\"OpenFin\"}}}},Object.defineProperty(Bo,\"__esModule\",{value:!0});var Ho=Bo.BrowserEnvironment=void 0;const No=Go;class Do extends No.BaseEnvironment{constructor(){super(...arguments),this.type=\"other\",this.getRandomId=()=>{const e=new Uint32Array(1);return window.crypto.getRandomValues(e)[0].toString(32)}}getAdapterVersionSync(){return\"\"}observeBounds(e,t){throw new Error(\"Method not implemented.\")}layoutAllowedInContext(e){return!1}initLayoutManager(e,t,n){throw new Error(\"Method not implemented.\")}applyLayoutSnapshot(e,t,n){throw new Error(\"Method not implemented.\")}createLayout(e,t){throw new Error(\"Method not implemented.\")}destroyLayout(e,t){throw new Error(\"Method not implemented.\")}resolveLayout(e,t){throw new Error(\"Method not implemented.\")}initPlatform(...e){throw new Error(\"Method not implemented.\")}writeToken(e,t){return Promise.resolve(\"\")}retrievePort(e){throw new Error(\"Method not implemented.\")}getNextMessageId(){return this.getRandomId()}createChildContent(e){throw new Error(\"Method not implemented.\")}getWebWindow(e){throw new Error(\"Method not implemented.\")}getCurrentEntityIdentity(){throw new Error(\"Method not implemented.\")}getCurrentEntityType(){return\"external connection\"}raiseEvent(e,t){throw new Error(\"Method not implemented.\")}getUrl(){return location.href}getDefaultChannelOptions(){return{create:{},connect:{}}}getRtcPeer(){return new RTCPeerConnection}getWsConstructor(){return WebSocket}whenReady(){return Promise.resolve()}}Ho=Bo.BrowserEnvironment=Do;const Uo=e=>\"platform\"in e&&void 0!==e.platform;var Vo,zo;class Ko extends Ho{constructor(e){super(),this.connectConfig=e,Vo.set(this,void 0),zo.set(this,new W((async()=>Promise.resolve().then((function(){return require(\"./main-b14f67c9.js\")}))))),Uo(e)&&this.validatePlatformOptions(e)}getAdapterVersionSync(){return\"0.39.21\"}validatePlatformOptions({platform:e}){if(!(\"layoutSnapshot\"in e))throw new Error(\"Platform options are missing layoutSnapshot. Please provide a layoutSnapshot in the platform options.\");if(\"windows\"in e||\"windows\"in e.layoutSnapshot)throw new Error(\"It appears you tried to call connect() with a snapshot object from an OpenFin desktop environment. Note that connect() expects to be called with a platform property with this structure: { platform: { layoutSnapshot } }. To get a layoutSnapshot of the expected structure, use fin.Platform.Layout.getCurrentLayoutManagerSync().getLayoutSnapshot() in v34+ in your desktop environment.\");const{layouts:t}=e.layoutSnapshot;Object.entries(t).map((([e,t])=>{if(\"object\"!=typeof t||null===t)throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must be an object.`);if(!(\"content\"in t))throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must contain a 'content' property.`)}))}async getInteropInfo(e){return{...{contextGroups:void 0,logging:{beforeAction:{enabled:!1},afterAction:{enabled:!1}}},fdc3Version:void 0,fdc3Info:{providerVersion:\"0.39.21\",provider:\"OpenFin Web\"}}}layoutAllowedInContext(e){return!0}async initLayoutManager(e,t,n){if(Lo(this,Vo,\"f\"))throw new Error(\"Layout already initialized.\");if(!Uo(this.connectConfig))throw new Error(\"Platform options are missing from connection config.\");const{WebLayoutEntryPoint:i}=await Lo(this,zo,\"f\").getValue();return To(this,Vo,new i(this.connectConfig),\"f\"),await Lo(this,Vo,\"f\").initLayoutManager(e,t,n)}async applyLayoutSnapshot(e,t,n){Lo(this,Vo,\"f\")?.applyLayoutSnapshot(e,t,n)}async createLayout(e,t){return Lo(this,Vo,\"f\")?.createLayout(e,t)}async destroyLayout(e,t){return Lo(this,Vo,\"f\")?.destroyLayout(e,t)}async getViewWindowIdentity(e,t){return Promise.resolve({uuid:t.uuid,name:t.uuid})}}Vo=new WeakMap,zo=new WeakMap;const qo=()=>{const e=((e,t)=>{const n=new RegExp(`^${t}<(?.*)>$`).exec(e)?.groups?.meta;if(n)try{return JSON.parse(atob(n))}catch(e){throw new Error(`Failed to decode JSON from ${n}.`)}})(window.name,\"of-frame\");if(e)try{const{name:t,uuid:n,brokerUrl:i,providerId:r,contextGroup:o}=e;return Fo(i,\"brokerUrl\"),Fo(n,\"uuid\"),Fo(t,\"name\"),{identity:{name:t,uuid:n},brokerUrl:i,interopConfig:{providerId:r,currentContextGroup:o}}}catch(e){throw new Error(`Unexpected error occurred when inferring platform information: ${e.stack}`)}},Jo=()=>{const e=r.v4();return{uuid:e,name:e}},Yo=async e=>{if(\"enabled\"===e.connectionInheritance){const t=await(async e=>{const t=qo();if(t){const{validateOptions:n=(()=>!0)}=e,{identity:i,...r}=t;if(!await n(r))throw new Error(\"Parent options were rejected by validateOptions.\");return t}})(e);if(t)return t}if(!e.options){const t=\"enabled\"===e.connectionInheritance?\"Broker URL was not specified nor provided by a platform container.\":\"Connection inheritance is disabled but no options were provided.\";throw new Error(t)}return{...e.options,identity:Jo()}};exports.__classPrivateFieldGet=Lo,exports.__classPrivateFieldSet=To,exports.apiExposer=Gn,exports.commonjsGlobal=s,exports.connect=async t=>{try{Ro.log(\"Establishing connection\",t);const{brokerUrl:n,identity:i,timeout:r,interopConfig:s}=await Yo(t),{workerPort:a,iframeBrokerPort:c}=await(async(e,t,n)=>{const{origin:i}=new URL(e),r=document.createElement(\"IFRAME\");let s;r.style.display=\"none\";try{return await new Promise(((a,c)=>{const d=e=>{if(e.source===r.contentWindow&&e.data?.topic===`ack-${jo}`){if(e.origin!==i)c(new Error(`Broker redirected to unexpected origin ${e.origin}, expected ${i}.`));else if(e.data.success){const[t,n]=e.ports;a({iframeBrokerPort:t,workerPort:n})}else c(new m(e.data));window.removeEventListener(\"message\",d),clearTimeout(s)}};window.addEventListener(\"message\",d),ko.log(`Connecting to broker ${e}`),r.setAttribute(\"src\",e),r.setAttribute(\"name\",o(t,\"of-broker\")),document.body.appendChild(r),ko.log(\"Iframe loaded, awaiting init message from iframe\"),n&&(s=setTimeout((()=>{window.removeEventListener(\"message\",d),document.body.removeChild(r),c(new Error(\"Worker did not initialize in time\"))}),n))}))}catch(e){throw new Error(`Failed to initialise Fin Web Client. ${e.message}`,{cause:e})}})(n,i,r);Ro.log(\"Successfully established connection to shared worker\");const d={entityType:\"external connection\",...i};a.start(),c.start();const h=((t,n,i)=>{const r=$o(n),o=new Ko(t),s=new Io(r,o,i);return s.connectSync(),window.Buffer=e.Buffer,new Wr(s)})(t,a,d);return s?.providerId&&(h.me.interop=h.Interop.connectSync(s.providerId),s?.currentContextGroup&&h.me.interop.joinContextGroup(s.currentContextGroup).catch((e=>{console.warn(`Error joining specified context group: ${s?.currentContextGroup}, continuing`,e)}))),{...h,me:{...h.me,identity:{uuid:h.me.uuid,name:h.me.name}}}}catch(e){throw new Error(`An error occured during web-interop connection: ${e.message}`)}},exports.decorators=Nn,exports.encodeOptions=o,exports.layout_constants=ai,exports.lazy=G;\n","\"use strict\";var t=require(\"./main-8cad4070.js\"),e=require(\"uuid\");require(\"buffer/\"),require(\"events\"),require(\"lodash/cloneDeep\"),require(\"lodash/isEqual\");var i={},n={};Object.defineProperty(n,\"__esModule\",{value:!0}),n.mapValuesAsync=n.mapEntriesAsync=void 0;const o=(t,[e,i])=>({...t,[e]:i});async function s(t,e){return(await Promise.all(e.map((async([e,i])=>[e,await t(i,e)])))).reduce(o,{})}n.mapEntriesAsync=s,n.mapValuesAsync=async function(t,e){let i;return i=e instanceof Map?[...e.entries()]:Object.entries(e),s(t,i)};var r,a,l,h,d=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldSet||function(t,e,i,n,o){if(\"m\"===n)throw new TypeError(\"Private method is not writable\");if(\"a\"===n&&!o)throw new TypeError(\"Private accessor was defined without a setter\");if(\"function\"==typeof e?t!==e||!o:!e.has(t))throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");return\"a\"===n?o.call(t,i):o?o.value=i:e.set(t,i),i},c=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldGet||function(t,e,i,n){if(\"a\"===i&&!n)throw new TypeError(\"Private accessor was defined without a getter\");if(\"function\"==typeof e?t!==e||!n:!e.has(t))throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");return\"m\"===i?n:\"a\"===i?n.call(t):n?n.value:e.get(t)};Object.defineProperty(i,\"__esModule\",{value:!0});var m=i.DefaultLayoutManager=void 0;const u=n;class p{constructor(t){a.set(this,void 0),l.set(this,new Map),d(this,a,t,\"f\")}size(){return c(this,l,\"f\").size}async applyLayoutSnapshot({layouts:t}){if(Object.keys(t).length>1)throw new Error(\"[LayoutManager] Tried to call applyLayoutSnapshot with more than 1 layout. When implementing multiple layouts via overridden LayoutManager class, you must override and fully implement the applyLayoutSnapshot method without calling super.applyLayoutSnapshot().\");const[[e,i]]=Object.entries(t);await p.createLayout(this,{layoutName:e,layout:i})}async showLayout({layoutName:t}){}async getLayoutSnapshot(){return{layouts:await(0,u.mapValuesAsync)((t=>t.getFrameSnapshot()),c(this,l,\"f\"))}}async removeLayout({layoutName:t}){}getLayoutIdentityForView(t){const e=[...c(this,l,\"f\").values()].find((e=>e.getCurrentViews().some((e=>e.name===t.name&&e.uuid===t.uuid))));return e?.identity??void 0}isLayoutVisible({layoutName:t}){return c(p,r,\"m\",h).call(p,this,t).isVisible()}resolveLayoutIdentity(t){if(t&&\"layoutName\"in t)return t;const e=[...c(this,l,\"f\").values()];if(1===e.length)return e[0].identity;const i=e.find((t=>t.isVisible()));return i?.identity??void 0}static async resolveLayout(t,e){const i=t.resolveLayoutIdentity(e);if(void 0===i||!(\"layoutName\"in i))throw new Error(\"[layout-manager] resolveLayout: Could not resolve the layout identity. Make sure you include 'layoutName' in the identity object.\");return c(p,r,\"m\",h).call(p,t,i.layoutName)}static async handleSharedView(t,e,i){await(0,u.mapValuesAsync)((async t=>{if(t.identity.layoutName!==e.layoutName){const e=t.getCurrentViews().find((t=>t.name===i.name));e&&await t.onViewDetached({viewIdentity:e,target:null}).catch(console.error)}}),c(t,l,\"f\"))}static async handleLastViewRemoved(t,e){await t.removeLayout(e),await c(t,a,\"f\").handleLastViewRemoved(t)}static async destroyLayout(t,{layoutName:e}){await c(p,r,\"m\",h).call(p,t,e).destroy(),c(t,l,\"f\").delete(e)}static async createLayout(t,e){const{layoutName:i}=e;if(c(t,l,\"f\").has(i))throw new Error(`Layout name ${i} already exists`);await c(t,a,\"f\").createLayout(e,t)}static registerLayout(t,e,i){c(t,l,\"f\").set(e,i)}static getAllLayouts(t){return[...c(t,l,\"f\").values()]}static setInitialSnapshot(t,e){c(t,a,\"f\").setInitialSnapshot(e)}static createClosedConstructor(...t){return class extends p{constructor(){super(...t)}}}}m=i.DefaultLayoutManager=p,r=p,a=new WeakMap,l=new WeakMap,h=function(t,e){const i=c(t,l,\"f\").get(e);if(!i)throw new Error(`[layout-manager] getLayoutByName: Could not locate layout with name '${e}'`);return i};var g={},f={},v={};Object.defineProperty(v,\"__esModule\",{value:!0}),v.ReversibleMap=void 0;v.ReversibleMap=class{constructor(){this.valueToKey=new Map,this.keyToValue=new Map,this.setUnique=(t,e)=>{if(this.hasKey(t)||this.hasValue(e))throw new Error(\"Key or value already in the map.\");this.keyToValue.set(t,e),this.valueToKey.set(e,t)},this.getKey=t=>{const e=this.valueToKey.get(t);if(!e)throw new Error(\"Value not found in the map.\");return e},this.deleteKey=t=>{const e=this.getValue(t);return this.keyToValue.delete(t),this.valueToKey.delete(e),e},this.deleteValue=t=>{const e=this.getKey(t);return this.keyToValue.delete(e),this.valueToKey.delete(t),e},this.hasKey=t=>this.keyToValue.has(t),this.hasValue=t=>this.valueToKey.has(t)}getValue(t){const e=this.keyToValue.get(t);if(!e)throw new Error(\"Key not found in the map.\");return e}},Object.defineProperty(f,\"__esModule\",{value:!0});var _=f.LayoutContentCache=void 0;const y=t.lazy,C=v;class w{constructor(){this.contentItemCache=new C.ReversibleMap,this.contentItemCacheId=0,this.createCacheKey=()=>{const t=`entity-${this.contentItemCacheId.toString()}`;return this.contentItemCacheId+=1,t},this.hasKey=t=>this.contentItemCache.hasKey(t),this.getItemOrUndefined=t=>{try{return this.getContentItemOrThrow(t)}catch(t){return}},this.getContentItemOrThrow=(t,e)=>{if(!this.contentItemCache.hasKey(t))throw new Error(\"Layout component has been destroyed or detached from the current layout.\");const i=this.contentItemCache.getValue(t);if(e&&!e.includes(i.type))throw new Error(`Layout item is not the expected type. Expected ${e.join(\", \")}, got ${i.type}.`);return i},this.getOrCreateEntityId=t=>{if(this.contentItemCache.hasValue(t))return this.contentItemCache.getKey(t);t.onDestroyed((()=>{this.contentItemCache.deleteValue(t)}));const e=this.createCacheKey();return this.contentItemCache.setUnique(e,t),e}}static getSingleInstance(){return w.singleton.getValue()}}_=f.LayoutContentCache=w,w.singleton=new y.Lazy((()=>new w));var I={},b={};!function(t){Object.defineProperty(t,\"__esModule\",{value:!0}),t.getAdjacentStacks=t.doShareEdge=t.getAdjacentItem=void 0;t.getAdjacentItem=(e,i)=>{const{parent:n}=e;if(e.isRoot()||!n)return;const o=[\"top\",\"bottom\"].includes(i)?\"column\":\"row\",s=[\"top\",\"left\"].includes(i)?-1:1;if(n.type===o){const t=n.contentItems.indexOf(e)+s;if(t>=0&&t{const n=t.getBounds(),o=e.getBounds();if(!n||!o)return!1;if([\"top\",\"bottom\"].includes(i)){return!(n.righto.right)}return!(n.bottomo.bottom)};t.getAdjacentStacks=(e,i)=>{const n=[\"top\",\"bottom\"].includes(i)?\"row\":\"column\",o=s=>\"stack\"===s.type?(0,t.doShareEdge)(e,s,i)?[s]:[]:\"root\"===s.type||\"ground\"===s.type?[]:s.type===n?s.contentItems.map((t=>o(t))).flat():s.type!==n?[\"top\",\"right\"].includes(i)?o(s.contentItems[s.contentItems.length-1]):o(s.contentItems[0]):[],s=(0,t.getAdjacentItem)(e,i);return s?o(s):[]}}(b);var S=t.commonjsGlobal&&t.commonjsGlobal.__decorate||function(t,e,i,n){var o,s=arguments.length,r=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if(\"object\"==typeof Reflect&&\"function\"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(s<3?o(r):s>3?o(e,i,r):o(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};Object.defineProperty(I,\"__esModule\",{value:!0}),I.LayoutEntitiesController=void 0;const E=t.decorators,x=b,L=i;class z{constructor(t,e,i){this.wire=t,this.layoutManager=e,this.layoutContentCache=i,this.analytics=t=>{this.wire.sendAction(`layout-controller-${t}`).catch((()=>{}))},this.getLayoutIdentityForViewOrThrow=async t=>{const e=this.layoutManager.getLayoutIdentityForView(t);if(!e)throw new Error(`View identity ${t.name} is not attached to any layouts.`);return e},this.getRoot=async t=>{this.analytics(\"get-root\");const e=(await this.getLayout(t)).getRoot();return{type:e.type,entityId:this.layoutContentCache.getOrCreateEntityId(e)}},this.getStackByView=async t=>{this.analytics(\"get-stack-by-view\");const e=await this.getLayoutIdentityForViewOrThrow(t),i=(await this.getLayout(e)).getStackByView(t);if(\"stack\"===i?.type)return{entityId:this.layoutContentCache.getOrCreateEntityId(i),type:\"stack\"}},this.getStackViews=t=>{this.analytics(\"get-stack-views\");return this.layoutContentCache.getContentItemOrThrow(t,[\"stack\"]).contentItems.map((t=>({name:t.viewName,uuid:this.wire.me.uuid})))},this.isRoot=t=>{this.analytics(\"is-root\");return this.layoutContentCache.getContentItemOrThrow(t).isRoot()},this.exists=t=>(this.analytics(\"exists\"),this.layoutContentCache.hasKey(t)),this.addViewToStack=async(t,e,{index:i}={index:0})=>{this.analytics(\"add-view-to-stack\");const n=this.layoutContentCache.getContentItemOrThrow(t);if(i&&i>n.contentItems.length+1)throw new Error(`Index '${i}' out of range, please exclude the index or specify a number between 0 and ${n.contentItems.length}`);const o={id:t,index:i},{identity:s}=await n.layout.platformCreateView(e,{location:o});return s},this.findViewInStack=(t,e)=>t.contentItems.find((t=>t.viewName===e.name)),this.removeViewFromStack=async(t,e)=>{this.analytics(\"remove-view-from-stack\");const i=this.layoutContentCache.getContentItemOrThrow(t,[\"stack\"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to remove a view ('${e.name}') which does not belong to the stack.`);await n.layout.platformCloseView(e)},this.createAdjacentStack=async(t,e,{position:i=\"right\"}={})=>{if(this.analytics(\"create-adjacent-stack\"),!Array.isArray(e)||0===e.length)throw new Error('The parameter \"views\" must be an array with at least 1 element.');if(![\"top\",\"bottom\",\"left\",\"right\"].includes(i))throw new Error(`Invalid position '${i}' specified.`);const n=this.layoutContentCache.getContentItemOrThrow(t).createAdjacentStack({position:i}),o=this.layoutContentCache.getOrCreateEntityId(n);return await Promise.all(e.reverse().map((t=>this.addViewToStack(o,t)))),o},this.getAdjacentStacks=async({targetId:t,edge:e})=>{this.analytics(\"get-adjacent-stacks\");const i=this.layoutContentCache.getContentItemOrThrow(t);return(0,x.getAdjacentStacks)(i,e).map((t=>({entityId:this.layoutContentCache.getOrCreateEntityId(t)})))},this.setStackActiveView=async(t,e)=>{this.analytics(\"set-stack-active-view\");const i=this.layoutContentCache.getContentItemOrThrow(t,[\"stack\"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to set a view ('${e.name}') as active when it does not belong to the stack.`);i.setActiveContentItem(n,!0)}}async getLayout(t){const e=await L.DefaultLayoutManager.resolveLayout(this.layoutManager,t);if(!e)throw new Error(`Could not resolve target layout identity ${JSON.stringify(t)}`);return e}getContent(t){this.analytics(\"get-content\");return this.layoutContentCache.getContentItemOrThrow(t,[\"column\",\"row\"]).contentItems.map((t=>({type:t.type,entityId:this.layoutContentCache.getOrCreateEntityId(t)})))}getParent(t){this.analytics(\"get-parent\");const e=this.layoutContentCache.getContentItemOrThrow(t);if(!e.isRoot())return e.parent?.contentItems.includes(e)?{type:e.parent.type,entityId:this.layoutContentCache.getOrCreateEntityId(e.parent)}:void 0}}S([(0,E.expose)()],z.prototype,\"getLayoutIdentityForViewOrThrow\",void 0),S([(0,E.expose)()],z.prototype,\"getRoot\",void 0),S([(0,E.expose)()],z.prototype,\"getStackByView\",void 0),S([(0,E.expose)()],z.prototype,\"getStackViews\",void 0),S([(0,E.expose)()],z.prototype,\"getContent\",null),S([(0,E.expose)()],z.prototype,\"getParent\",null),S([(0,E.expose)()],z.prototype,\"isRoot\",void 0),S([(0,E.expose)()],z.prototype,\"exists\",void 0),S([(0,E.expose)()],z.prototype,\"addViewToStack\",void 0),S([(0,E.expose)()],z.prototype,\"removeViewFromStack\",void 0),S([(0,E.expose)()],z.prototype,\"createAdjacentStack\",void 0),S([(0,E.expose)()],z.prototype,\"getAdjacentStacks\",void 0),S([(0,E.expose)()],z.prototype,\"setStackActiveView\",void 0),I.LayoutEntitiesController=z,Object.defineProperty(g,\"__esModule\",{value:!0});var M=g.initLayoutEndpoints=void 0;const P=t.apiExposer,T=t.layout_constants,A=f,k=I,D=i;M=g.initLayoutEndpoints=async function(t,e){const i=t.getFin(),n=await i.Platform.getCurrentSync().getClient(),o=new P.ChannelsExposer(n);await new P.ApiExposer(o).exposeInstance(new k.LayoutEntitiesController(t,e,A.LayoutContentCache.getSingleInstance()),{id:T.LAYOUT_CONTROLLER_ID}),await async function(t,e){const i=t=>async i=>{const n=await D.DefaultLayoutManager.resolveLayout(e,i.target);if(!n)throw new Error(`Could not resolve the layout target from payload ${JSON.stringify(i)}`);return t(n,i)},n=(e,n)=>{t.register(e,i(n))},o=(t,e)=>{n(t,e)};n(\"replace-view\",((t,e)=>t.replaceView(e))),n(\"replace-layout\",((t,{layout:e})=>t.replaceLayout(e))),n(\"add-view\",((t,e)=>t.insertView(e))),o(\"layout-add-view\",((t,{viewOptions:e,location:i,targetView:n})=>t.platformCreateView(e,{location:i,targetView:n}))),n(\"close-view\",((t,e)=>t.cleanupView(e.viewIdentity))),o(\"layout-close-view\",((t,e)=>t.platformCloseView(e.viewIdentity))),n(\"apply-preset-layout\",((t,e)=>t.applyPreset(e))),n(\"get-layout-views\",(t=>t.getCurrentViews())),n(\"get-frame-snapshot\",(t=>t.getFrameSnapshot())),n(\"is-visible\",(t=>t.isVisible())),n(\"destroy\",(t=>t.destroy())),t.register(\"get-layout-snapshot\",(()=>e.getLayoutSnapshot()))}(n,e)};var R={};Object.defineProperty(R,\"__esModule\",{value:!0});var U=R.BaseLayout=void 0;U=R.BaseLayout=class{};var O={};Object.defineProperty(O,\"__esModule\",{value:!0});var V=O.DOMEmitter=void 0;V=O.DOMEmitter=class{constructor(t){this.container=t}dispatchLocalEvent(t,e){const i={...e,type:t,tabSelector:`tab-${e.name}`,containerSelector:`container-${e.name}`,topic:\"openfin-DOM-event\"};this.container.dispatchEvent(new CustomEvent(t,{detail:i}))}};var B={};Object.defineProperty(B,\"__esModule\",{value:!0});var H=B.mapLayoutContentItemsImmutableSync=B.mapLayoutContentItemsImmutable=W=B.isVisible=void 0;var W=B.isVisible=t=>(0!==t.offsetWidth||0!==t.offsetHeight)&&\"hidden\"!==window.getComputedStyle(t).visibility&&t.offsetTop>=0&&t.offsetLeft>=0&&t.offsetTop<=window.innerHeight&&t.offsetLeft<=window.innerWidth;const F=t=>\"type\"in t&&\"component\"===t.type;B.mapLayoutContentItemsImmutable=async function t(e,i){return F(i)?e(i):{...i,content:await Promise.all(i.content?.map((i=>t(e,i))))}},H=B.mapLayoutContentItemsImmutableSync=function t(e,i){return F(i)?e(i):{...i,content:i.content?.map((i=>t(e,i)))}};class N extends Error{constructor(t,e){super(e),this.type=t}}class G extends N{constructor(t,e){super(\"Configuration\",t),this.node=e}}class j extends N{constructor(t){super(\"PopoutBlocked\",t)}}class $ extends N{constructor(t){super(\"API\",t)}}class Z extends N{constructor(t){super(\"Bind\",t)}}class q extends Error{constructor(t,e,i){super(`${t}: ${e}${void 0===i?\"\":\": \"+i}`)}}class X extends q{constructor(t,e){super(\"Assert\",t,e)}}class Y extends q{constructor(t,e,i){super(\"UnreachableCase\",t,`${e}${void 0===i?\"\":\": \"+i}`)}}class K extends q{constructor(t,e){super(\"UnexpectedNull\",t,e)}}class J extends q{constructor(t,e){super(\"UnexpectedUndefined\",t,e)}}var Q;!function(t){let e=!1;const i={PopoutCannotBeCreatedWithGroundItemConfig:{id:0,default:\"Popout cannot be created with ground ItemConfig\"},PleaseRegisterAConstructorFunction:{id:1,default:\"Please register a constructor function\"},ComponentTypeNotRegisteredAndBindComponentEventHandlerNotAssigned:{id:2,default:\"Component type not registered and BindComponentEvent handler not assigned\"},ComponentIsAlreadyRegistered:{id:3,default:\"Component is already registered\"},ComponentIsNotVirtuable:{id:4,default:\"Component is not virtuable. Requires rootHtmlElement field/getter\"},VirtualComponentDoesNotHaveRootHtmlElement:{id:5,default:'Virtual component does not have getter \"rootHtmlElement\"'},ItemConfigIsNotTypeComponent:{id:6,default:\"ItemConfig is not of type component\"},InvalidNumberPartInSizeString:{id:7,default:\"Invalid number part in size string\"},UnknownUnitInSizeString:{id:8,default:\"Unknown unit in size string\"},UnsupportedUnitInSizeString:{id:9,default:\"Unsupported unit in size string\"}};t.idCount=Object.keys(i).length;const n=Object.values(i);t.checkInitialise=function(){if(!e)for(let e=0;e=\"0\"&&t<=\"9\"}function Tt(t,e){const i=zt(e);t.style.width=i}function At(t,e){const i=zt(e);t.style.height=i}function kt(t){return{width:t.offsetWidth,height:t.offsetHeight}}function Dt(t,e){t.style.display=e?\"\":\"none\"}function Rt(t,e){if(void 0!==e)for(const i in e)if(e.hasOwnProperty(i)){const n=e[i],o=t[i];t[i]=Ut(o,n)}return t}function Ut(t,e){if(\"object\"!=typeof e)return e;if(Array.isArray(e)){const t=e.length,i=new Array(t);for(let n=0;n36)throw new Error(\"Too many keys in config minifier map\")},t.translateObject=n}(dt||(dt={})),function(t){t.defaults={type:at.ground,content:[],size:1,sizeUnit:ht.Fractional,minSize:void 0,minSizeUnit:ht.Pixel,id:\"\",isClosable:!0},t.createCopy=function(t,e){switch(t.type){case at.ground:case at.row:case at.column:return gt.createCopy(t,e);case at.stack:return ut.createCopy(t,e);case at.component:return pt.createCopy(t);default:throw new Y(\"CICC91354\",t.type,\"Invalid Config Item type specified\")}},t.createDefault=function(t){switch(t){case at.ground:throw new X(\"CICCDR91562\");case at.row:case at.column:return gt.createDefault(t);case at.stack:return ut.createDefault();case at.component:return pt.createDefault();default:throw new Y(\"CICCDD91563\",t,\"Invalid Config Item type specified\")}},t.isComponentItem=function(t){return t.type===at.component},t.isStackItem=function(t){return t.type===at.stack},t.isGroundItem=function(t){return t.type===at.ground}}(ct||(ct={})),function(t){t.defaultMaximised=!1,function(t){t.createCopy=function(t,e){return void 0===t?void 0:{show:null!=e?e:t.show,popout:t.popout,close:t.close,maximise:t.maximise,minimise:t.minimise,tabDropdown:t.tabDropdown}}}(t.Header||(t.Header={}))}(mt||(mt={})),function(t){function e(t){const e=t.length,i=new Array(e);for(let n=0;n\"__glMaximised\"===t));t>0&&(o=!0,n=n.splice(t,1)),e=n.length>0?n[0]:ct.defaults.id}else e=n;return i=void 0!==t.maximised?t.maximised:o,{id:e,maximised:i}}}(wt||(wt={})),function(t){function e(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0;return{resolved:!0,root:Et.resolve(i),openPopouts:t.resolveOpenPopouts(e.openPopouts),dimensions:t.Dimensions.resolve(e.dimensions),settings:t.Settings.resolve(e.settings),header:t.Header.resolve(e.header,e.settings,e.labels)}}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:Lt.fromResolvedArray(e.openPopouts),settings:_t.Settings.createCopy(e.settings),dimensions:t.Dimensions.fromResolved(e.dimensions),header:_t.Header.createCopy(e.header)}},t.isResolved=function(t){const e=t;return void 0!==e.resolved&&!0===e.resolved},t.resolveOpenPopouts=function(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0,{root:Et.resolve(o),openPopouts:xt.resolveOpenPopouts(e.openPopouts),dimensions:xt.Dimensions.resolve(e.dimensions),settings:xt.Settings.resolve(e.settings),header:xt.Header.resolve(e.header,e.settings,e.labels),parentId:null!==(i=e.parentId)&&void 0!==i?i:null,indexInParent:null!==(n=e.indexInParent)&&void 0!==n?n:null,window:t.Window.resolve(e.window,e.dimensions),resolved:!0}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:i(e.openPopouts),dimensions:xt.Dimensions.fromResolved(e.dimensions),settings:_t.Settings.createCopy(e.settings),header:_t.Header.createCopy(e.header),parentId:e.parentId,indexInParent:e.indexInParent,window:t.Window.fromResolved(e.window)}},t.fromResolvedArray=i}(Lt||(Lt={}));class Wt{constructor(){this._allEventSubscriptions=[],this._subscriptionsMap=new Map,this.unbind=this.removeEventListener,this.trigger=this.emit}tryBubbleEvent(t,e){}emit(t,...e){let i=this._subscriptionsMap.get(t);if(void 0!==i){i=i.slice();for(let t=0;t0){const n=e.slice();n.unshift(t);const o=this._allEventSubscriptions.slice();for(let t=0;t0?n.contentItems[0]:n,e=0);const o=this._layoutManager.createAndInitContentItem(i,t);t.addChild(o,e),this._layoutManager.layoutConfig.settings.popInOnClose?this._onClose():this.close()}createWindow(){const t=this.createUrl(),e=Math.floor(1e6*Math.random()).toString(36),i=this.serializeWindowFeatures({width:this._initialWindowSize.width,height:this._initialWindowSize.height,innerWidth:this._initialWindowSize.width,innerHeight:this._initialWindowSize.height,menubar:\"no\",toolbar:\"no\",location:\"no\",personalbar:\"no\",resizable:\"yes\",scrollbars:\"no\",status:\"no\"});if(this._popoutWindow=globalThis.open(t,e,i),this._popoutWindow)this._popoutWindow.addEventListener(\"load\",(()=>this.positionWindow()),{passive:!0}),this._popoutWindow.addEventListener(\"beforeunload\",(()=>{this._layoutManager.layoutConfig.settings.popInOnClose?this.popIn():this._onClose()}),{passive:!0}),this._checkReadyInterval=setInterval((()=>this.checkReady()),10);else if(!0===this._layoutManager.layoutConfig.settings.blockedPopoutsThrowError){throw new j(\"Popout blocked\")}}checkReady(){if(null===this._popoutWindow)throw new K(\"BPCR01844\");this._popoutWindow.__glInstance&&this._popoutWindow.__glInstance.isInitialised&&(this.onInitialised(),void 0!==this._checkReadyInterval&&(clearInterval(this._checkReadyInterval),this._checkReadyInterval=void 0))}serializeWindowFeatures(t){const e=[];for(const i in t)e.push(i+\"=\"+t[i].toString());return e.join(\",\")}createUrl(){const t=\"gl-window-config-\"+Ot(),e=_t.minifyConfig(this._config);try{localStorage.setItem(t,JSON.stringify(e))}catch(t){throw new Error(\"Error while writing to localStorage \"+function(t){return t instanceof Error?t.message:\"string\"==typeof t?t:\"Unknown Error\"}(t))}const i=new URL(location.href);return i.searchParams.set(\"gl-window\",t),i.toString()}positionWindow(){if(null===this._popoutWindow)throw new Error(\"BrowserPopout.positionWindow: null popoutWindow\");this._popoutWindow.moveTo(this._initialWindowSize.left,this._initialWindowSize.top),this._popoutWindow.focus()}onInitialised(){this._isInitialised=!0,this.getGlInstance().on(\"popIn\",(()=>this.popIn())),this.emit(\"initialised\")}_onClose(){setTimeout((()=>this.emit(\"closed\")),50)}}class Gt extends Wt{constructor(t,e,i,n){super(),this.layoutManager=t,this._parent=i,this._element=n,this._popInParentIds=[],this._type=e.type,this._id=e.id,this._isInitialised=!1,this.isGround=!1,this.isRow=!1,this.isColumn=!1,this.isStack=!1,this.isComponent=!1,this.size=e.size,this.sizeUnit=e.sizeUnit,this.minSize=e.minSize,this.minSizeUnit=e.minSizeUnit,this._isClosable=e.isClosable,this._pendingEventPropagations={},this._throttledEvents=[\"stateChanged\"],this._contentItems=this.createContentItems(e.content)}get type(){return this._type}get id(){return this._id}set id(t){this._id=t}get popInParentIds(){return this._popInParentIds}get parent(){return this._parent}get contentItems(){return this._contentItems}get isClosable(){return this._isClosable}get element(){return this._element}get isInitialised(){return this._isInitialised}static isStack(t){return t.isStack}static isComponentItem(t){return t.isComponent}static isComponentParentableItem(t){return t.isStack||t.isGround}removeChild(t,e=!1){const i=this._contentItems.indexOf(t);if(-1===i)throw new Error(\"Can't remove child item. Unknown content item\");if(e||this._contentItems[i].destroy(),this._contentItems.splice(i,1),this._contentItems.length>0)this.updateSize(!1);else if(!this.isGround&&!0===this._isClosable){if(null===this._parent)throw new K(\"CIUC00874\");this._parent.removeChild(this)}}addChild(t,e,i){return null!=e||(e=this._contentItems.length),this._contentItems.splice(e,0,t),t.setParent(this),!0===this._isInitialised&&!1===t._isInitialised&&t.init(),e}replaceChild(t,e,i=!1){const n=this._contentItems.indexOf(t),o=t._element.parentNode;if(-1===n)throw new X(\"CIRCI23232\",\"Can't replace child. oldChild is not child of this\");if(null===o)throw new K(\"CIRCP23232\");if(o.replaceChild(e._element,t._element),!0===i&&(t._parent=null,t.destroy()),this._contentItems[n]=e,e.setParent(this),e.size=t.size,e.sizeUnit=t.sizeUnit,e.minSize=t.minSize,e.minSizeUnit=t.minSizeUnit,null===e._parent)throw new K(\"CIRCNC45699\");!0===e._parent._isInitialised&&!1===e._isInitialised&&e.init(),this.updateSize(!1)}remove(){if(null===this._parent)throw new K(\"CIR11110\");this._parent.removeChild(this)}popout(){const t=Ot(),e=this.layoutManager.createPopoutFromContentItem(this,void 0,t,void 0);return this.emitBaseBubblingEvent(\"stateChanged\"),e}calculateConfigContent(){const t=this._contentItems,e=t.length,i=new Array(e);for(let n=0;nthis.propagateEventToLayoutManager(t,e))))}propagateEventToLayoutManager(t,e){this._pendingEventPropagations[t]=!1,this.layoutManager.emitUnknown(t,e)}}class jt extends Gt{constructor(t,e,i){super(t,e,i,document.createElement(\"div\")),this._parentItem=i,this._focused=!1,this.isComponent=!0,this._reorderEnabled=e.reorderEnabled,this.applyUpdatableConfig(e),this._initialWantMaximise=e.maximised;const n=document.createElement(\"div\");n.classList.add(\"lm_content\"),this.element.appendChild(n),this._container=new Ft(e,this,t,n,(t=>this.handleUpdateItemConfigEvent(t)),(()=>this.show()),(()=>this.hide()),(t=>this.focus(t)),(t=>this.blur(t)))}get componentName(){return this._container.componentType}get componentType(){return this._container.componentType}get reorderEnabled(){return this._reorderEnabled}get initialWantMaximise(){return this._initialWantMaximise}get component(){return this._container.component}get container(){return this._container}get parentItem(){return this._parentItem}get headerConfig(){return this._headerConfig}get title(){return this._title}get tab(){return this._tab}get focused(){return this._focused}destroy(){this._container.destroy(),super.destroy()}applyUpdatableConfig(t){this.setTitle(t.title),this._headerConfig=t.header}toConfig(){const t=this._container.stateRequestEvent,e=void 0===t?this._container.state:t();return{type:at.component,content:[],size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,maximised:!1,isClosable:this.isClosable,reorderEnabled:this._reorderEnabled,title:this._title,header:mt.Header.createCopy(this._headerConfig),componentType:pt.copyComponentType(this.componentType),componentState:e}}close(){if(null===this.parent)throw new K(\"CIC68883\");this.parent.removeChild(this,!1)}enterDragMode(t,e){Tt(this.element,t),At(this.element,e),this._container.enterDragMode(t,e)}exitDragMode(){this._container.exitDragMode()}enterStackMaximised(){this._container.enterStackMaximised()}exitStackMaximised(){this._container.exitStackMaximised()}drag(){this._container.drag()}updateSize(t){this.updateNodeSize(t)}init(){this.updateNodeSize(!1),super.init(),this._container.emit(\"open\"),this.initContentItems()}setTitle(t){this._title=t,this.emit(\"titleChanged\",t),this.emit(\"stateChanged\")}setTab(t){this._tab=t,this.emit(\"tab\",t),this._container.setTab(t)}hide(){super.hide(),this._container.setVisibility(!1)}show(){super.show(),this._container.setVisibility(!0)}focus(t=!1){this.parentItem.setActiveComponentItem(this,!0,t)}setFocused(t){this._focused=!0,this.tab.setFocused(),t||this.emitBaseBubblingEvent(\"focus\")}blur(t=!1){this._focused&&this.layoutManager.setFocusedComponentItem(void 0,t)}setBlurred(t){this._focused=!1,this.tab.setBlurred(),t||this.emitBaseBubblingEvent(\"blur\")}setParent(t){this._parentItem=t,super.setParent(t)}handleUpdateItemConfigEvent(t){this.applyUpdatableConfig(t)}updateNodeSize(t){if(\"none\"!==this.element.style.display){const{width:e,height:i}=kt(this.element);this._container.setSizeToNodeSize(e,i,t)}}}class $t extends Gt{constructor(){super(...arguments),this._focused=!1}get focused(){return this._focused}setFocusedValue(t){this._focused=t}}class Zt extends Wt{constructor(t,e){super(),this._eElement=t,this._pointerTracking=!1,this._pointerDownEventListener=t=>this.onPointerDown(t),this._pointerMoveEventListener=t=>this.onPointerMove(t),this._pointerUpEventListener=t=>this.onPointerUp(t),this._timeout=void 0,this._allowableTargets=[t,...e],this._oDocument=document,this._eBody=document.body,this._nDelay=1800,this._nDistance=10,this._nX=0,this._nY=0,this._nOriginalX=0,this._nOriginalY=0,this._dragging=!1,this._eElement.addEventListener(\"pointerdown\",this._pointerDownEventListener,{passive:!0})}destroy(){this.checkRemovePointerTrackingEventListeners(),this._eElement.removeEventListener(\"pointerdown\",this._pointerDownEventListener)}cancelDrag(){this.processDragStop(void 0)}onPointerDown(t){if(this._allowableTargets.includes(t.target)&&t.isPrimary){const e=this.getPointerCoordinates(t);this.processPointerDown(e)}}processPointerDown(t){this._nOriginalX=t.x,this._nOriginalY=t.y,this._oDocument.addEventListener(\"pointermove\",this._pointerMoveEventListener),this._oDocument.addEventListener(\"pointerup\",this._pointerUpEventListener,{passive:!0}),this._pointerTracking=!0,this._timeout=setTimeout((()=>{try{this.startDrag()}catch(t){throw console.error(t),t}}),this._nDelay)}onPointerMove(t){this._pointerTracking&&(this.processDragMove(t),t.preventDefault())}processDragMove(t){this._nX=t.pageX-this._nOriginalX,this._nY=t.pageY-this._nOriginalY,!1===this._dragging&&(Math.abs(this._nX)>this._nDistance||Math.abs(this._nY)>this._nDistance)&&this.startDrag(),this._dragging&&this.emit(\"drag\",this._nX,this._nY,t)}onPointerUp(t){this.processDragStop(t)}processDragStop(t){var e;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this.checkRemovePointerTrackingEventListeners(),!0===this._dragging&&(this._eBody.classList.remove(\"lm_dragging\"),this._eElement.classList.remove(\"lm_dragging\"),null===(e=this._oDocument.querySelector(\"iframe\"))||void 0===e||e.style.setProperty(\"pointer-events\",\"\"),this._dragging=!1,this.emit(\"dragStop\",t))}checkRemovePointerTrackingEventListeners(){this._pointerTracking&&(this._oDocument.removeEventListener(\"pointermove\",this._pointerMoveEventListener),this._oDocument.removeEventListener(\"pointerup\",this._pointerUpEventListener),this._pointerTracking=!1)}startDrag(){var t;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this._dragging=!0,this._eBody.classList.add(\"lm_dragging\"),this._eElement.classList.add(\"lm_dragging\"),null===(t=this._oDocument.querySelector(\"iframe\"))||void 0===t||t.style.setProperty(\"pointer-events\",\"none\"),this.emit(\"dragStart\",this._nOriginalX,this._nOriginalY)}getPointerCoordinates(t){return{x:t.pageX,y:t.pageY}}}class qt{constructor(t,e,i){this._isVertical=t,this._size=e,this._grabSize=i0){const i=this.createSplitter(Math.max(0,e-1)).element;e>0?(this.contentItems[e-1].element.insertAdjacentElement(\"afterend\",i),i.insertAdjacentElement(\"afterend\",t.element)):(this.contentItems[0].element.insertAdjacentElement(\"beforebegin\",i),i.insertAdjacentElement(\"beforebegin\",t.element))}else this._childElementContainer.appendChild(t.element);super.addChild(t,e);const n=1/this.contentItems.length*100;if(!0===i)return this.emitBaseBubblingEvent(\"stateChanged\"),e;for(let e=0;e0&&(this.calculateRelativeSizes(),this.setAbsoluteSizes()),this.emitBaseBubblingEvent(\"stateChanged\"),this.emit(\"resize\")}setAbsoluteSizes(){const t=this.calculateAbsoluteSizes();for(let e=0;e0&&t.itemSizes[e]++,this._isColumn?(Tt(this.contentItems[e].element,t.crossAxisSize),At(this.contentItems[e].element,t.itemSizes[e])):(Tt(this.contentItems[e].element,t.itemSizes[e]),At(this.contentItems[e].element,t.crossAxisSize))}calculateAbsoluteSizes(){const t=(this.contentItems.length-1)*this._splitterSize,{width:e,height:i}=kt(this.element);let n,o;this._isColumn?(n=i-t,o=e):(n=e-t,o=i);let s=0;const r=[];for(let t=0;t0){const n=100-t;for(let t=0;t100&&e.length>0){for(let t=0;te)return;{const r=i/e;let a=i;for(let e=0;ethis.onSplitterDrag(e,t,i))),e.on(\"dragStop\",(()=>this.onSplitterDragStop(e))),e.on(\"dragStart\",(()=>this.onSplitterDragStart(e))),this._splitter.splice(t,0,e),e}getSplitItems(t){const e=this._splitter.indexOf(t);return{before:this.contentItems[e],after:this.contentItems[e+1]}}calculateContentItemMinSize(t){const e=t.minSize;if(void 0!==e){if(t.minSizeUnit===ht.Pixel)return e;throw new X(\"ROCGMD98831\",JSON.stringify(t))}{const t=this.layoutManager.layoutConfig.dimensions;return this._isColumn?t.defaultMinItemHeight:t.defaultMinItemWidth}}calculateContentItemsTotalMinSize(t){let e=0;for(const i of t)e+=this.calculateContentItemMinSize(i);return e}onSplitterDragStart(t){const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=this.calculateContentItemsTotalMinSize(e.before.contentItems),s=this.calculateContentItemsTotalMinSize(e.after.contentItems);this._splitterPosition=0,this._splitterMinPosition=-1*(i-o),this._splitterMaxPosition=n-s}onSplitterDrag(t,e,i){let n=this._isColumn?i:e;if(null===this._splitterMinPosition||null===this._splitterMaxPosition)throw new K(\"ROCOSD59226\");n=Math.max(n,this._splitterMinPosition),n=Math.min(n,this._splitterMaxPosition),this._splitterPosition=n;const o=zt(n);this._isColumn?t.element.style.top=o:t.element.style.left=o}onSplitterDragStop(t){if(null===this._splitterPosition)throw new K(\"ROCOSDS66932\");{const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=(this._splitterPosition+i)/(i+n),s=e.before.size+e.after.size;e.before.size=o*s,e.after.size=(1-o)*s,t.element.style.top=zt(0),t.element.style.left=zt(0),globalThis.requestAnimationFrame((()=>this.updateSize(!1)))}}}!function(t){t.getElementDimensionSize=function(t,e){return\"width\"===e?function(t){return t.offsetWidth}(t):function(t){return t.offsetHeight}(t)},t.setElementDimensionSize=function(t,e,i){return\"width\"===e?Tt(t,i):At(t,i)},t.createElement=function(t,e){const i=t.createElement(\"div\");return i.classList.add(\"lm_item\"),e?i.classList.add(\"lm_column\"):i.classList.add(\"lm_row\"),i}}(Xt||(Xt={}));class Yt extends $t{constructor(t,e,i){super(t,vt.create(e),null,Yt.createElement(document)),this.isGround=!0,this._childElementContainer=this.element,this._containerElement=i;let n=null;for(;;){const t=n?n.previousSibling:this._containerElement.lastChild;if(!(t instanceof Element&&t.classList.contains(\"lm_content\")))break;n=t}this._containerElement.insertBefore(this.element,n)}init(){if(!0!==this.isInitialised){this.updateNodeSize();for(let t=0;t0?this.contentItems[0]:this,n.isComponent)throw new Error(\"Cannot add item as child to ComponentItem\");{const t=this.layoutManager.createAndInitContentItem(i,n);return e=n.addChild(t,e),n===this?-1:e}}loadComponentAsRoot(t){this.clearRoot();const e=Ct.resolve(t,!1);if(e.maximised)throw new Error(\"Root Component cannot be maximised\");{const t=new jt(this.layoutManager,e,this);t.init(),this.addChild(t,0)}}addChild(t,e){if(this.contentItems.length>0)throw new Error(\"Ground node can only have a single child\");return this._childElementContainer.appendChild(t.element),e=super.addChild(t,e),this.updateSize(!1),this.emitBaseBubblingEvent(\"stateChanged\"),e}calculateConfigContent(){const t=this.contentItems,e=t.length,i=new Array(e);for(let n=0;n0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e)),this.updateContentItemsSize(!1))}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}createSideAreas(){const t=Yt.Area.oppositeSides,e=new Array(Object.keys(t).length);let i=0;for(const n in t){const o=n,s=this.getElementArea();if(null===s)throw new K(\"RCSA77553\");s.side=o,\"2\"===t[o][1]?s[o]=s[t[o]]-50:s[o]=s[t[o]]+50,s.surface=(s.x2-s.x1)*(s.y2-s.y1),e[i++]=s}return e}highlightDropZone(t,e,i){this.layoutManager.tabDropPlaceholder.remove(),super.highlightDropZone(t,e,i)}onDrop(t,e){if(t.isComponent){const e=ut.createDefault(),i=t;e.header=mt.Header.createCopy(i.headerConfig);const n=this.layoutManager.createAndInitContentItem(e,this);n.addChild(t),t=n}if(0===this.contentItems.length)this.addChild(t);else{if(t.type===at.row||t.type===at.column){const e=ut.createDefault(),i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}const i=\"x\"==e.side[0]?at.row:at.column,n=\"2\"==e.side[1],o=this.contentItems[0];if(o instanceof Xt&&o.type===i){const e=o.contentItems[n?0:o.contentItems.length-1];o.addChild(t,n?0:void 0,!0),e.size*=.5,t.size=e.size,t.sizeUnit=ht.Percent,o.updateSize(!1)}else{const e=ct.createDefault(i),s=this.layoutManager.createContentItem(e,this);this.replaceChild(o,s),s.addChild(t,n?0:void 0,!0),s.addChild(o,n?void 0:0,!0),o.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}}dock(){throw new X(\"GID87731\")}validateDocking(){throw new X(\"GIVD87732\")}getAllContentItems(){const t=[this];return this.deepGetAllContentItems(this.contentItems,t),t}getConfigMaximisedItems(){const t=[];return this.deepFilterContentItems(this.contentItems,t,(t=>!(!Gt.isStack(t)||!t.initialWantMaximise)||!(!Gt.isComponentItem(t)||!t.initialWantMaximise))),t}getItemsByPopInParentId(t){const e=[];return this.deepFilterContentItems(this.contentItems,e,(e=>e.popInParentIds.includes(t))),e}toConfig(){throw new Error(\"Cannot generate GroundItem config\")}setActiveComponentItem(t,e,i){}updateNodeSize(){const{width:t,height:e}=kt(this._containerElement);Tt(this.element,t),At(this.element,e),this.contentItems.length>0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e))}deepGetAllContentItems(t,e){for(let i=0;ithis.onClick(t),this._touchStartEventListener=t=>this.onTouchStart(t),this._element=document.createElement(\"div\"),this._element.classList.add(i),this._element.title=e,this._header.on(\"destroy\",(()=>this.destroy())),this._element.addEventListener(\"click\",this._clickEventListener,{passive:!0}),this._element.addEventListener(\"touchstart\",this._touchStartEventListener,{passive:!0}),this._header.controlsContainerElement.appendChild(this._element)}get element(){return this._element}destroy(){var t;this._element.removeEventListener(\"click\",this._clickEventListener),this._element.removeEventListener(\"touchstart\",this._touchStartEventListener),null===(t=this._element.parentNode)||void 0===t||t.removeChild(this._element)}onClick(t){this._pushEvent(t)}onTouchStart(t){this._pushEvent(t)}}class Jt{constructor(t,e,i,n,o){var s;this._layoutManager=t,this._componentItem=e,this._closeEvent=i,this._focusEvent=n,this._dragStartEvent=o,this._isActive=!1,this._tabClickListener=t=>this.onTabClickDown(t),this._tabTouchStartListener=t=>this.onTabTouchStart(t),this._closeClickListener=()=>this.onCloseClick(),this._closeTouchStartListener=()=>this.onCloseTouchStart(),this._dragStartListener=(t,e)=>this.onDragStart(t,e),this._contentItemDestroyListener=()=>this.onContentItemDestroy(),this._tabTitleChangedListener=t=>this.setTitle(t),this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_tab\"),this._titleElement=document.createElement(\"span\"),this._titleElement.classList.add(\"lm_title\"),this._closeElement=document.createElement(\"div\"),this._closeElement.classList.add(\"lm_close_tab\"),this._element.appendChild(this._titleElement),this._element.appendChild(this._closeElement),e.isClosable?this._closeElement.style.display=\"\":this._closeElement.style.display=\"none\",this.setTitle(e.title),this._componentItem.on(\"titleChanged\",this._tabTitleChangedListener);(null!==(s=e.reorderEnabled)&&void 0!==s?s:this._layoutManager.layoutConfig.settings.reorderEnabled)&&this.enableReorder(),this._element.addEventListener(\"click\",this._tabClickListener,{passive:!0}),this._element.addEventListener(\"touchstart\",this._tabTouchStartListener,{passive:!0}),this._componentItem.isClosable?(this._closeElement.addEventListener(\"click\",this._closeClickListener,{passive:!0}),this._closeElement.addEventListener(\"touchstart\",this._closeTouchStartListener,{passive:!0})):(this._closeElement.remove(),this._closeElement=void 0),this._componentItem.setTab(this),this._layoutManager.emit(\"tabCreated\",this)}get isActive(){return this._isActive}get componentItem(){return this._componentItem}get contentItem(){return this._componentItem}get element(){return this._element}get titleElement(){return this._titleElement}get closeElement(){return this._closeElement}get reorderEnabled(){return void 0!==this._dragListener}set reorderEnabled(t){t!==this.reorderEnabled&&(t?this.enableReorder():this.disableReorder())}setTitle(t){this._titleElement.innerText=t,this._element.title=t}setActive(t){t!==this._isActive&&(this._isActive=t,t?this._element.classList.add(\"lm_active\"):this._element.classList.remove(\"lm_active\"))}destroy(){var t,e;this._closeEvent=void 0,this._focusEvent=void 0,this._dragStartEvent=void 0,this._element.removeEventListener(\"click\",this._tabClickListener),this._element.removeEventListener(\"touchstart\",this._tabTouchStartListener),null===(t=this._closeElement)||void 0===t||t.removeEventListener(\"click\",this._closeClickListener),null===(e=this._closeElement)||void 0===e||e.removeEventListener(\"touchstart\",this._closeTouchStartListener),this._componentItem.off(\"titleChanged\",this._tabTitleChangedListener),this.reorderEnabled&&this.disableReorder(),this._element.remove()}setBlurred(){this._element.classList.remove(\"lm_focused\"),this._titleElement.classList.remove(\"lm_focused\")}setFocused(){this._element.classList.add(\"lm_focused\"),this._titleElement.classList.add(\"lm_focused\")}onDragStart(t,e){if(void 0===this._dragListener)throw new J(\"TODSDLU10093\");if(void 0===this._dragStartEvent)throw new J(\"TODS23309\");this._dragStartEvent(t,e,this._dragListener,this.componentItem)}onContentItemDestroy(){void 0!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=void 0)}onTabClickDown(t){const e=t.target;e!==this._element&&e!==this._titleElement||(0===t.button?this.notifyFocus():1===t.button&&this._componentItem.isClosable&&this.notifyClose())}onTabTouchStart(t){t.target===this._element&&this.notifyFocus()}onCloseClick(){this.notifyClose()}onCloseTouchStart(){this.notifyClose()}notifyClose(){if(void 0===this._closeEvent)throw new J(\"TNC15007\");this._closeEvent(this._componentItem)}notifyFocus(){if(void 0===this._focusEvent)throw new J(\"TNA15007\");this._focusEvent(this._componentItem)}enableReorder(){this._dragListener=new Zt(this._element,[this._titleElement]),this._dragListener.on(\"dragStart\",this._dragStartListener),this._componentItem.on(\"destroy\",this._contentItemDestroyListener)}disableReorder(){if(void 0===this._dragListener)throw new J(\"TDR87745\");this._componentItem.off(\"destroy\",this._contentItemDestroyListener),this._dragListener.off(\"dragStart\",this._dragStartListener),this._dragListener=void 0}}class Qt{constructor(t,e,i,n,o){this._layoutManager=t,this._componentRemoveEvent=e,this._componentFocusEvent=i,this._componentDragStartEvent=n,this._dropdownActiveChangedEvent=o,this._tabs=[],this._lastVisibleTabIndex=-1,this._dropdownActive=!1,this._element=document.createElement(\"section\"),this._element.classList.add(\"lm_tabs\"),this._dropdownElement=document.createElement(\"section\"),this._dropdownElement.classList.add(\"lm_tabdropdown_list\"),this._dropdownElement.style.display=\"none\"}get tabs(){return this._tabs}get tabCount(){return this._tabs.length}get lastVisibleTabIndex(){return this._lastVisibleTabIndex}get element(){return this._element}get dropdownElement(){return this._dropdownElement}get dropdownActive(){return this._dropdownActive}destroy(){for(let t=0;tthis.handleTabCloseEvent(t)),(t=>this.handleTabFocusEvent(t)),((t,e,i,n)=>this.handleTabDragStartEvent(t,e,i,n)));void 0===e&&(e=this._tabs.length),this._tabs.splice(e,0,i),ethis._lastVisibleTabIndex){const t=this._tabs[e];for(let t=e;t>0;t--)this._tabs[t]=this._tabs[t-1];this._tabs[0]=t}}updateTabSizes(t,e){let i=!1;this.tryUpdateTabSizes(i,t,e)||(i=!0,this.tryUpdateTabSizes(i,t,e)),i!==this._dropdownActive&&(this._dropdownActive=i,this._dropdownActiveChangedEvent())}tryUpdateTabSizes(t,e,i){if(this._tabs.length>0){if(void 0===i)throw new Error(\"non-empty tabs must have active component item\");let n=0,o=!1;const s=this._layoutManager.layoutConfig.settings.tabOverlapAllowance,r=this._tabs.indexOf(i.tab),a=this._tabs[r];this._lastVisibleTabIndex=-1;for(let i=0;ie){if(o)i===r&&(l.style.zIndex=\"auto\",l.style.marginLeft=\"\",l.parentElement!==this._element&&this._element.appendChild(l));else{let t;if(t=r>0&&r<=i?(d-e)/(i-1):(d-e)/i,tthis.onClick(t),this._touchStartListener=t=>this.onTouchStart(t),this._rowColumnClosable=!0,this._closeButton=null,this._popoutButton=null,this._tabsContainer=new Qt(this._layoutManager,(t=>this.handleTabInitiatedComponentRemoveEvent(t)),(t=>this.handleTabInitiatedComponentFocusEvent(t)),((t,e,i,n)=>this.handleTabInitiatedDragStartEvent(t,e,i,n)),(()=>this.processTabDropdownActiveChanged())),this._show=i.show,this._popoutEnabled=i.popoutEnabled,this._popoutLabel=i.popoutLabel,this._maximiseEnabled=i.maximiseEnabled,this._maximiseLabel=i.maximiseLabel,this._minimiseEnabled=i.minimiseEnabled,this._minimiseLabel=i.minimiseLabel,this._closeEnabled=i.closeEnabled,this._closeLabel=i.closeLabel,this._tabDropdownEnabled=i.tabDropdownEnabled,this._tabDropdownLabel=i.tabDropdownLabel,this.setSide(i.side),this._canRemoveComponent=this._configClosable,this._element=document.createElement(\"section\"),this._element.classList.add(\"lm_header\"),this._controlsContainerElement=document.createElement(\"section\"),this._controlsContainerElement.classList.add(\"lm_controls\"),this._element.appendChild(this._tabsContainer.element),this._element.appendChild(this._controlsContainerElement),this._element.appendChild(this._tabsContainer.dropdownElement),this._element.addEventListener(\"click\",this._clickListener,{passive:!0}),this._element.addEventListener(\"touchstart\",this._touchStartListener,{passive:!0}),this._documentMouseUpListener=()=>this._tabsContainer.hideAdditionalTabsDropdown(),globalThis.document.addEventListener(\"mouseup\",this._documentMouseUpListener,{passive:!0}),this._tabControlOffset=this._layoutManager.layoutConfig.settings.tabControlOffset,this._tabDropdownEnabled&&(this._tabDropdownButton=new Kt(this,this._tabDropdownLabel,\"lm_tabdropdown\",(()=>this._tabsContainer.showAdditionalTabsDropdown()))),this._popoutEnabled&&(this._popoutButton=new Kt(this,this._popoutLabel,\"lm_popout\",(()=>this.handleButtonPopoutEvent()))),this._maximiseEnabled&&(this._maximiseButton=new Kt(this,this._maximiseLabel,\"lm_maximise\",(t=>this.handleButtonMaximiseToggleEvent(t)))),this._configClosable&&(this._closeButton=new Kt(this,this._closeLabel,\"lm_close\",(()=>s()))),this.processTabDropdownActiveChanged()}get show(){return this._show}get side(){return this._side}get leftRightSided(){return this._leftRightSided}get layoutManager(){return this._layoutManager}get parent(){return this._parent}get tabs(){return this._tabsContainer.tabs}get lastVisibleTabIndex(){return this._tabsContainer.lastVisibleTabIndex}get element(){return this._element}get tabsContainerElement(){return this._tabsContainer.element}get controlsContainerElement(){return this._controlsContainerElement}destroy(){this.emit(\"destroy\"),this._popoutEvent=void 0,this._maximiseToggleEvent=void 0,this._clickEvent=void 0,this._touchStartEvent=void 0,this._componentRemoveEvent=void 0,this._componentFocusEvent=void 0,this._componentDragStartEvent=void 0,this._tabsContainer.destroy(),globalThis.document.removeEventListener(\"mouseup\",this._documentMouseUpListener),this._element.remove()}createTab(t,e){this._tabsContainer.createTab(t,e)}removeTab(t){this._tabsContainer.removeTab(t)}processActiveComponentChanged(t){this._tabsContainer.processActiveComponentChanged(t),this.updateTabSizes()}setSide(t){this._side=t,this._leftRightSided=[nt.right,nt.left].includes(this._side)}setRowColumnClosable(t){this._rowColumnClosable=t,this.updateClosability()}updateClosability(){let t;if(this._configClosable)if(this._rowColumnClosable){t=!0;const e=this.tabs.length;for(let i=0;i1}applyFocusedValue(t){t?this._element.classList.add(\"lm_focused\"):this._element.classList.remove(\"lm_focused\")}processMaximised(){if(void 0===this._maximiseButton)throw new J(\"HPMAX16997\");this._maximiseButton.element.setAttribute(\"title\",this._minimiseLabel)}processMinimised(){if(void 0===this._maximiseButton)throw new J(\"HPMIN16997\");this._maximiseButton.element.setAttribute(\"title\",this._maximiseLabel)}updateTabSizes(){if(this._tabsContainer.tabCount>0){const t=this._show?this._layoutManager.layoutConfig.dimensions.headerHeight:0;let e;this._leftRightSided?(this._element.style.height=\"\",this._element.style.width=zt(t)):(this._element.style.width=\"\",this._element.style.height=zt(t)),e=this._leftRightSided?this._element.offsetHeight-this._controlsContainerElement.offsetHeight-this._tabControlOffset:this._element.offsetWidth-this._controlsContainerElement.offsetWidth-this._tabControlOffset,this._tabsContainer.updateTabSizes(e,this._getActiveComponentItemEvent())}}handleTabInitiatedComponentRemoveEvent(t){if(this._canRemoveComponent){if(void 0===this._componentRemoveEvent)throw new J(\"HHTCE22294\");this._componentRemoveEvent(t)}}handleTabInitiatedComponentFocusEvent(t){if(void 0===this._componentFocusEvent)throw new J(\"HHTAE22294\");this._componentFocusEvent(t)}handleTabInitiatedDragStartEvent(t,e,i,n){if(this._canRemoveComponent){if(void 0===this._componentDragStartEvent)throw new J(\"HHTDSE22294\");this._componentDragStartEvent(t,e,i,n)}else i.cancelDrag()}processTabDropdownActiveChanged(){void 0!==this._tabDropdownButton&&Dt(this._tabDropdownButton.element,this._tabsContainer.dropdownActive)}handleButtonPopoutEvent(){if(this._layoutManager.layoutConfig.settings.popoutWholeStack){if(void 0===this._popoutEvent)throw new J(\"HHBPOE17834\");this._popoutEvent()}else{const t=this._getActiveComponentItemEvent();t&&t.popout()}}handleButtonMaximiseToggleEvent(t){if(void 0===this._maximiseToggleEvent)throw new J(\"HHBMTE16834\");this._maximiseToggleEvent()}onClick(t){t.target===this._element&&this.notifyClick(t)}onTouchStart(t){t.target===this._element&&this.notifyTouchStart(t)}notifyClick(t){if(void 0===this._clickEvent)throw new J(\"HNHC46834\");this._clickEvent(t)}notifyTouchStart(t){if(void 0===this._touchStartEvent)throw new J(\"HNHTS46834\");this._touchStartEvent(t)}}class ee extends $t{constructor(t,e,i){var n,o,s,r,a,l,h,d,c,m,u,p,g,f,v,_,y,C,w;super(t,e,i,ee.createElement(document)),this._headerSideChanged=!1,this._resizeListener=()=>this.handleResize(),this._maximisedListener=()=>this.handleMaximised(),this._minimisedListener=()=>this.handleMinimised(),this._headerConfig=e.header;const I=t.layoutConfig.header,b=e.content;let S;if(1!==b.length)S=void 0;else{S=b[0].header}this._initialWantMaximise=e.maximised,this._initialActiveItemIndex=null!==(n=e.activeItemIndex)&&void 0!==n?n:0;const E=null!==(r=null!==(s=null===(o=this._headerConfig)||void 0===o?void 0:o.show)&&void 0!==s?s:null==S?void 0:S.show)&&void 0!==r?r:I.show,x=null!==(h=null!==(l=null===(a=this._headerConfig)||void 0===a?void 0:a.popout)&&void 0!==l?l:null==S?void 0:S.popout)&&void 0!==h?h:I.popout,L=null!==(m=null!==(c=null===(d=this._headerConfig)||void 0===d?void 0:d.maximise)&&void 0!==c?c:null==S?void 0:S.maximise)&&void 0!==m?m:I.maximise,z=null!==(g=null!==(p=null===(u=this._headerConfig)||void 0===u?void 0:u.close)&&void 0!==p?p:null==S?void 0:S.close)&&void 0!==g?g:I.close,M=null!==(_=null!==(v=null===(f=this._headerConfig)||void 0===f?void 0:f.minimise)&&void 0!==v?v:null==S?void 0:S.minimise)&&void 0!==_?_:I.minimise,P=null!==(w=null!==(C=null===(y=this._headerConfig)||void 0===y?void 0:y.tabDropdown)&&void 0!==C?C:null==S?void 0:S.tabDropdown)&&void 0!==w?w:I.tabDropdown;this._maximisedEnabled=!1!==L;const T={show:!1!==E,side:!1===E?nt.top:E,popoutEnabled:!1!==x,popoutLabel:!1===x?\"\":x,maximiseEnabled:this._maximisedEnabled,maximiseLabel:!1===L?\"\":L,closeEnabled:!1!==z,closeLabel:!1===z?\"\":z,minimiseEnabled:!0,minimiseLabel:M,tabDropdownEnabled:!1!==P,tabDropdownLabel:!1===P?\"\":P};this._header=new te(t,this,T,e.isClosable&&!1!==z,(()=>this.getActiveComponentItem()),(()=>this.remove()),(()=>this.handlePopoutEvent()),(()=>this.toggleMaximise()),(t=>this.handleHeaderClickEvent(t)),(t=>this.handleHeaderTouchStartEvent(t)),(t=>this.handleHeaderComponentRemoveEvent(t)),(t=>this.handleHeaderComponentFocusEvent(t)),((t,e,i,n)=>this.handleHeaderComponentStartDragEvent(t,e,i,n))),this.isStack=!0,this._childElementContainer=document.createElement(\"section\"),this._childElementContainer.classList.add(\"lm_items\"),this.on(\"resize\",this._resizeListener),this._maximisedEnabled&&(this.on(\"maximised\",this._maximisedListener),this.on(\"minimised\",this._minimisedListener)),this.element.appendChild(this._header.element),this.element.appendChild(this._childElementContainer),this.setupHeaderPosition(),this._header.updateClosability()}get childElementContainer(){return this._childElementContainer}get header(){return this._header}get headerShow(){return this._header.show}get headerSide(){return this._header.side}get headerLeftRightSided(){return this._header.leftRightSided}get contentAreaDimensions(){return this._contentAreaDimensions}get initialWantMaximise(){return this._initialWantMaximise}get isMaximised(){return this===this.layoutManager.maximisedStack}get stackParent(){if(!this.parent)throw new Error(\"Stack should always have a parent\");return this.parent}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}init(){if(!0===this.isInitialised)return;this.updateNodeSize();for(let t=0;t0){if(this._initialActiveItemIndex<0||this._initialActiveItemIndex>=e)throw new Error(`ActiveItemIndex out of range: ${this._initialActiveItemIndex} id: ${this.id}`);for(let i=0;ithis.contentItems.length)throw e-=1,new X(\"SAC99728\");if(t instanceof jt)return e=super.addChild(t,e),this._childElementContainer.appendChild(t.element),this._header.createTab(t,e),this.setActiveComponentItem(t,i),this._header.updateTabSizes(),this.updateSize(!1),t.container.setBaseLogicalZIndex(),this._header.updateClosability(),this.emitStateChangedEvent(),e;throw new X(\"SACC88532\")}removeChild(t,e){const i=t,n=this.contentItems.indexOf(i),o=1===this.contentItems.length;if(this._activeComponentItem===i&&(i.focused&&i.blur(),!o)){const t=0===n?1:n-1;this.setActiveComponentItem(this.contentItems[t],!1)}this._header.removeTab(i),super.removeChild(i,e),o||this._header.updateClosability(),this.emitStateChangedEvent()}toggleMaximise(){this.isMaximised?this.minimise():this.maximise()}maximise(){if(!this.isMaximised){this.layoutManager.setMaximisedStack(this);const t=this.contentItems,e=t.length;for(let i=0;i0&&void 0===t)throw new Error(\"expected non-empty stack to have an active component item\");return{type:\"stack\",content:this.calculateConfigContent(),size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,isClosable:this.isClosable,maximised:this.isMaximised,header:this.createHeaderConfig(),activeItemIndex:t}}onDrop(t,e){if(\"header\"===this._dropSegment){if(this.resetHeaderDropZone(),void 0===this._dropIndex)throw new J(\"SODDI68990\");return void this.addChild(t,this._dropIndex)}if(\"body\"===this._dropSegment)return void this.addChild(t,0,!0);const i=\"top\"===this._dropSegment||\"bottom\"===this._dropSegment,n=\"left\"===this._dropSegment||\"right\"===this._dropSegment,o=\"top\"===this._dropSegment||\"left\"===this._dropSegment,s=i&&this.stackParent.isColumn||n&&this.stackParent.isRow;if(t.isComponent){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createAndInitContentItem(e,this);i.addChild(t),t=i}if(t.type===at.row||t.type===at.column){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}if(s){const e=this.stackParent.contentItems.indexOf(this);this.stackParent.addChild(t,o?e:e+1,!0),this.size*=.5,t.size=this.size,t.sizeUnit=this.sizeUnit,this.stackParent.updateSize(!1)}else{const e=i?at.column:at.row,n=ct.createDefault(e),s=this.layoutManager.createContentItem(n,this);this.stackParent.replaceChild(this,s),s.addChild(t,o?0:void 0,!0),s.addChild(this,o?void 0:0,!0),this.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}highlightDropZone(t,e){for(const i in this._contentAreaDimensions){const n=i,o=this._contentAreaDimensions[n].hoverArea;if(o.x1t&&o.y1e)return void(\"header\"===n?(this._dropSegment=\"header\",this.highlightHeaderDropZone(this._header.leftRightSided?e:t)):(this.resetHeaderDropZone(),this.highlightBodyDropZone(n)))}}getArea(){if(\"none\"===this.element.style.display)return null;const t=super.getElementArea(this._header.element),e=super.getElementArea(this._childElementContainer);if(null===t||null===e)throw new K(\"SGAHC13086\");const i=e.x2-e.x1,n=e.y2-e.y1;return this._contentAreaDimensions={header:{hoverArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2},highlightArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2}}},0===this.contentItems.length?(this._contentAreaDimensions.body={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2}},super.getElementArea(this.element)):(this._contentAreaDimensions.left={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x1+.25*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x1+.5*i,y2:e.y2}},this._contentAreaDimensions.top={hoverArea:{x1:e.x1+.25*i,y1:e.y1,x2:e.x1+.75*i,y2:e.y1+.5*n},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y1+.5*n}},this._contentAreaDimensions.right={hoverArea:{x1:e.x1+.75*i,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1+.5*i,y1:e.y1,x2:e.x2,y2:e.y2}},this._contentAreaDimensions.bottom={hoverArea:{x1:e.x1+.25*i,y1:e.y1+.5*n,x2:e.x1+.75*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1+.5*n,x2:e.x2,y2:e.y2}},super.getElementArea(this.element))}positionHeader(t){this._header.side!==t&&(this._header.setSide(t),this._headerSideChanged=!0,this.setupHeaderPosition())}updateNodeSize(){if(\"none\"!==this.element.style.display){const t=kt(this.element);if(this._header.show){t[this._header.leftRightSided?it.width:it.height]-=this.layoutManager.layoutConfig.dimensions.headerHeight}this._childElementContainer.style.width=zt(t.width),this._childElementContainer.style.height=zt(t.height);for(let e=0;e=o&&tthis.onDrag(t,e,i))),this._dragListener.on(\"dragStop\",(()=>this.onDrop())),this.createDragProxyElements(t,e),null===this._componentItem.parent)throw new K(\"DPC10097\");this._componentItemFocused=this._componentItem.focused,this._componentItemFocused&&this._componentItem.blur(),this._componentItem.parent.removeChild(this._componentItem,!0),this.setDimensions(),document.body.appendChild(this._element),this.determineMinMaxXY(),this._layoutManager.calculateItemAreas(),this.setDropPosition(t,e)}get element(){return this._element}createDragProxyElements(t,e){this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_dragProxy\");const i=document.createElement(\"div\");i.classList.add(\"lm_header\");const n=document.createElement(\"div\");n.classList.add(\"lm_tabs\");const o=document.createElement(\"div\");o.classList.add(\"lm_tab\");const s=document.createElement(\"span\");s.classList.add(\"lm_title\"),o.appendChild(s),n.appendChild(o),i.appendChild(n),this._proxyContainerElement=document.createElement(\"div\"),this._proxyContainerElement.classList.add(\"lm_content\"),this._element.appendChild(i),this._element.appendChild(this._proxyContainerElement),this._originalParent instanceof ee&&this._originalParent.headerShow&&(this._sided=this._originalParent.headerLeftRightSided,this._element.classList.add(\"lm_\"+this._originalParent.headerSide),[nt.right,nt.bottom].indexOf(this._originalParent.headerSide)>=0&&this._proxyContainerElement.insertAdjacentElement(\"afterend\",i)),this._element.style.left=zt(t),this._element.style.top=zt(e),o.setAttribute(\"title\",this._componentItem.title),s.insertAdjacentText(\"afterbegin\",this._componentItem.title),this._proxyContainerElement.appendChild(this._componentItem.element)}determineMinMaxXY(){const t=this._layoutManager.groundItem;if(void 0===t)throw new J(\"DPDMMXY73109\");{const e=t.element.getBoundingClientRect();this._minX=e.left+document.body.scrollLeft,this._minY=e.top+document.body.scrollTop,this._maxX=this._minX+e.width,this._maxY=this._minY+e.height}}onDrag(t,e,i){const n=i.pageX,o=i.pageY;this.setDropPosition(n,o),this._componentItem.drag()}setDropPosition(t,e){this._layoutManager.layoutConfig.settings.constrainDragToContainer&&(t<=this._minX?t=Math.ceil(this._minX):t>=this._maxX&&(t=Math.floor(this._maxX)),e<=this._minY?e=Math.ceil(this._minY):e>=this._maxY&&(e=Math.floor(this._maxY))),this._element.style.left=zt(t),this._element.style.top=zt(e),this._area=this._layoutManager.getArea(t,e),null!==this._area&&(this._lastValidArea=this._area,this._area.contentItem.highlightDropZone(t,e,this._area))}onDrop(){const t=this._layoutManager.dropTargetIndicator;if(null===t)throw new K(\"DPOD30011\");let e;if(t.hide(),this._componentItem.exitDragMode(),null!==this._area)e=this._componentItem,this._area.contentItem.onDrop(e,this._area);else if(null!==this._lastValidArea){e=this._componentItem;this._lastValidArea.contentItem.onDrop(e,this._lastValidArea)}else this._originalParent?(e=this._componentItem,this._originalParent.addChild(e)):this._componentItem.destroy();this._element.remove(),this._layoutManager.emit(\"itemDropped\",this._componentItem),this._componentItemFocused&&void 0!==e&&e.focus()}setDimensions(){const t=this._layoutManager.layoutConfig.dimensions;if(void 0===t)throw new Error(\"DragProxy.setDimensions: dimensions undefined\");let e=t.dragProxyWidth,i=t.dragProxyHeight;if(void 0===e||void 0===i)throw new Error(\"DragProxy.setDimensions: width and/or height undefined\");const n=!1===this._layoutManager.layoutConfig.header.show?0:t.headerHeight;this._element.style.width=zt(e),this._element.style.height=zt(i),e-=this._sided?n:0,i-=this._sided?0:n,this._proxyContainerElement.style.width=zt(e),this._proxyContainerElement.style.height=zt(i),this._componentItem.enterDragMode(e,i),this._componentItem.show()}}class ne{constructor(t,e,i,n,o,s,r){this._layoutManager=t,this._element=e,this._extraAllowableChildTargets=i,this._componentTypeOrFtn=n,this._componentState=o,this._title=s,this._id=r,this._dragListener=null,this._dummyGroundContainer=document.createElement(\"div\");const a=gt.createDefault(\"row\");this._dummyGroundContentItem=new Yt(this._layoutManager,a,this._dummyGroundContainer),this.createDragListener()}destroy(){this.removeDragListener()}createDragListener(){this.removeDragListener(),this._dragListener=new Zt(this._element,this._extraAllowableChildTargets),this._dragListener.on(\"dragStart\",((t,e)=>this.onDragStart(t,e))),this._dragListener.on(\"dragStop\",(()=>this.onDragStop()))}onDragStart(t,e){var i;const n=\"component\";let o;if(\"function\"==typeof this._componentTypeOrFtn){const t=this._componentTypeOrFtn();o=ne.isDragSourceComponentItemConfig(t)?{type:n,componentState:t.state,componentType:t.type,title:null!==(i=t.title)&&void 0!==i?i:this._title}:t}else o={type:n,componentState:this._componentState,componentType:this._componentTypeOrFtn,title:this._title,id:this._id};const s=bt.resolve(o,!1),r=new jt(this._layoutManager,s,this._dummyGroundContentItem);if(this._dummyGroundContentItem.contentItems.push(r),null===this._dragListener)throw new K(\"DSODSD66746\");{const i=new ie(t,e,this._dragListener,this._layoutManager,r,this._dummyGroundContentItem),n=this._layoutManager.transitionIndicator;if(null===n)throw new K(\"DSODST66746\");n.transitionElements(this._element,i.element)}}onDragStop(){this.createDragListener()}removeDragListener(){null!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=null)}}!function(t){t.isDragSourceComponentItemConfig=function(t){return!(\"componentType\"in t)}}(ne||(ne={}));class oe{constructor(){this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_dropTargetIndicator\");const t=document.createElement(\"div\");t.classList.add(\"lm_inner\"),this._element.appendChild(t),document.body.appendChild(this._element)}destroy(){this._element.remove()}highlightArea(t,e){this._element.style.left=zt(t.x1+e),this._element.style.top=zt(t.y1+e),this._element.style.width=zt(t.x2-t.x1-e),this._element.style.height=zt(t.y2-t.y1-e),this._element.style.display=\"block\"}hide(){Dt(this._element,!1)}}class se{constructor(){this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_transition_indicator\"),document.body.appendChild(this._element),this._toElement=null,this._fromDimensions=null,this._totalAnimationDuration=200,this._animationStartTime=null}destroy(){this._element.remove()}transitionElements(t,e){}nextAnimationFrame(){}measure(t){const e=t.getBoundingClientRect();return{left:e.left,top:e.top,width:t.offsetWidth,height:t.offsetHeight}}}class re extends Wt{constructor(t){super(),this._layoutManager=t,this._childEventListener=t=>this.onEventFromChild(t),globalThis.addEventListener(re.ChildEventName,this._childEventListener,{passive:!0})}emit(t,...e){\"userBroadcast\"===t?this.emitUserBroadcast(...e):super.emit(t,...e)}emitUserBroadcast(...t){this.handleUserBroadcastEvent(\"userBroadcast\",t)}destroy(){globalThis.removeEventListener(re.ChildEventName,this._childEventListener)}handleUserBroadcastEvent(t,e){this._layoutManager.isSubWindow?this.propagateToParent(t,e):this.propagateToThisAndSubtree(t,e)}onEventFromChild(t){const e=t.detail;this.handleUserBroadcastEvent(e.eventName,e.args)}propagateToParent(t,e){const i={bubbles:!0,cancelable:!0,detail:{layoutManager:this._layoutManager,eventName:t,args:e}},n=new CustomEvent(re.ChildEventName,i),o=globalThis.opener;if(null===o)throw new K(\"EHPTP15778\");o.dispatchEvent(n)}propagateToThisAndSubtree(t,e){this.emitUnknown(t,...e);for(let i=0;ithis.handleContainerResize())),this._windowBeforeUnloadListener=()=>this.onBeforeUnload(),this._windowBeforeUnloadListening=!1,this._maximisedStackBeforeDestroyedListener=t=>this.cleanupBeforeMaximisedStackDestroyed(t),this.isSubWindow=t.isSubWindow,this._constructorOrSubWindowLayoutConfig=t.constructorOrSubWindowLayoutConfig,Q.checkInitialise(),dt.checkInitialise(),void 0!==t.containerElement&&(this._containerElement=t.containerElement)}get container(){return this._containerElement}get isInitialised(){return this._isInitialised}get groundItem(){return this._groundItem}get root(){return this._groundItem}get openPopouts(){return this._openPopouts}get dropTargetIndicator(){return this._dropTargetIndicator}get transitionIndicator(){return this._transitionIndicator}get width(){return this._width}get height(){return this._height}get eventHub(){return this._eventHub}get rootItem(){if(void 0===this._groundItem)throw new Error(\"Cannot access rootItem before init\");return 0===this._groundItem.contentItems.length?void 0:this._groundItem.contentItems[0]}get focusedComponentItem(){return this._focusedComponentItem}get tabDropPlaceholder(){return this._tabDropPlaceholder}get maximisedStack(){return this._maximisedStack}get deprecatedConstructor(){return!this.isSubWindow&&void 0!==this._constructorOrSubWindowLayoutConfig}destroy(){if(this._isInitialised){this._windowBeforeUnloadListening&&(globalThis.removeEventListener(\"beforeunload\",this._windowBeforeUnloadListener),this._windowBeforeUnloadListening=!1),!0===this.layoutConfig.settings.closePopoutsOnUnload&&this.closeAllOpenPopouts(),this._resizeObserver.disconnect(),this.checkClearResizeTimeout(),void 0!==this._groundItem&&this._groundItem.destroy(),this._tabDropPlaceholder.remove(),null!==this._dropTargetIndicator&&this._dropTargetIndicator.destroy(),null!==this._transitionIndicator&&this._transitionIndicator.destroy(),this._eventHub.destroy();for(const t of this._dragSources)t.destroy();this._dragSources=[],this._isInitialised=!1}}minifyConfig(t){return _t.minifyConfig(t)}unminifyConfig(t){return _t.unminifyConfig(t)}init(){let t;if(this.setContainer(),this._dropTargetIndicator=new oe,this._transitionIndicator=new se,this.updateSizeFromContainer(),this.isSubWindow){if(void 0===this._constructorOrSubWindowLayoutConfig)throw new J(\"LMIU07155\");{const e=this._constructorOrSubWindowLayoutConfig.root;if(void 0===e)throw new X(\"LMIC07156\");if(!Ct.isComponent(e))throw new X(\"LMIC07157\");t=e;const i=xt.resolve(this._constructorOrSubWindowLayoutConfig);this.layoutConfig=Object.assign(Object.assign({},i),{root:void 0})}}else void 0===this._constructorOrSubWindowLayoutConfig?this.layoutConfig=_t.createDefault():this.layoutConfig=xt.resolve(this._constructorOrSubWindowLayoutConfig);const e=this.layoutConfig;this._groundItem=new Yt(this,e.root,this._containerElement),this._groundItem.init(),this.checkLoadedLayoutMaximiseItem(),this._resizeObserver.observe(this._containerElement),this._isInitialised=!0,this.adjustColumnsResponsive(),this.emit(\"initialised\"),void 0!==t&&this.loadComponentAsRoot(t)}loadLayout(t){if(!this.isInitialised)throw new Error(\"GoldenLayout: Need to call init() if LayoutConfig with defined root passed to constructor\");if(void 0===this._groundItem)throw new J(\"LMLL11119\");this.createSubWindows(),this.layoutConfig=xt.resolve(t),this._groundItem.loadRoot(this.layoutConfig.root),this.checkLoadedLayoutMaximiseItem(),this.adjustColumnsResponsive()}saveLayout(){if(!1===this._isInitialised)throw new Error(\"Can't create config, layout not yet initialised\");if(void 0===this._groundItem)throw new J(\"LMTC18244\");{const t=this._groundItem.calculateConfigContent();let e;e=1!==t.length?void 0:t[0],this.reconcilePopoutWindows();const i=[];for(let t=0;t=0?n=this._groundItem.contentItems[0]:e=0;break;case at.row:case at.column:e=n.addItem(t,i.index);break;case at.stack:if(Ct.isComponent(t)){e=n.addItem(t,i.index);break}throw Error(tt[6]);case at.component:throw new X(\"LMAIALC87444602\");default:throw new Y(\"LMAIALU98881733\",n.type)}if(Ct.isComponent(t)){const t=n.contentItems[e];Gt.isStack(t)&&(n=t,e=0)}return i.parentItem=n,i.index=e,i}}}loadComponentAsRoot(t){if(void 0===this._groundItem)throw new Error(\"Cannot add item before init\");this._groundItem.loadComponentAsRoot(t)}updateSize(t,e){this.setSize(t,e)}setSize(t,e){if(this._width=t,this._height=e,!0===this._isInitialised){if(void 0===this._groundItem)throw new J(\"LMUS18881\");if(this._groundItem.setSize(this._width,this._height),this._maximisedStack){const{width:t,height:e}=kt(this._containerElement);Tt(this._maximisedStack.element,t),At(this._maximisedStack.element,e),this._maximisedStack.updateSize(!1)}this.adjustColumnsResponsive()}}beginSizeInvalidation(){this._sizeInvalidationBeginCount++}endSizeInvalidation(){0==--this._sizeInvalidationBeginCount&&this.updateSizeFromContainer()}updateSizeFromContainer(){const{width:t,height:e}=kt(this._containerElement);this.setSize(t,e)}updateRootSize(t=!1){if(void 0===this._groundItem)throw new J(\"LMURS28881\");this._groundItem.updateSize(t)}createAndInitContentItem(t,e){const i=this.createContentItem(t,e);return i.init(),i}createContentItem(t,e){if(\"string\"!=typeof t.type)throw new G(\"Missing parameter 'type'\",JSON.stringify(t));if(ct.isComponentItem(t)&&!(e instanceof ee)&&e&&!(!0===this.isSubWindow&&e instanceof Yt)){t={type:at.stack,content:[t],size:t.size,sizeUnit:t.sizeUnit,minSize:t.minSize,minSizeUnit:t.minSizeUnit,id:t.id,maximised:t.maximised,isClosable:t.isClosable,activeItemIndex:0,header:void 0}}return this.createContentItemFromConfig(t,e)}findFirstComponentItemById(t){if(void 0===this._groundItem)throw new J(\"LMFFCIBI82446\");return this.findFirstContentItemTypeByIdRecursive(at.component,t,this._groundItem)}createPopout(t,e,i,n){return t instanceof Gt?this.createPopoutFromContentItem(t,e,i,n):this.createPopoutFromItemConfig(t,e,i,n)}createPopoutFromContentItem(t,e,i,n){let o=t.parent,s=t;for(;null!==o&&1===o.contentItems.length&&!o.isGround;)s=o,o=o.parent;if(null===o)throw new K(\"LMCPFCI00834\");{if(void 0===n&&(n=o.contentItems.indexOf(s)),null!==i&&o.addPopInParentId(i),void 0===e){const i=globalThis.screenX||globalThis.screenLeft,n=globalThis.screenY||globalThis.screenTop,o=t.element.offsetLeft,s=t.element.offsetTop,{width:r,height:a}=kt(t.element);e={left:i+o,top:n+s,width:r,height:a}}const r=t.toConfig();if(t.remove(),ft.isRootItemConfig(r))return this.createPopoutFromItemConfig(r,e,i,n);throw new Error(`${tt[0]}`)}}beginVirtualSizedContainerAdding(){0==++this._virtualSizedContainerAddingBeginCount&&(this._virtualSizedContainers.length=0)}addVirtualSizedContainer(t){this._virtualSizedContainers.push(t)}endVirtualSizedContainerAdding(){if(0==--this._virtualSizedContainerAddingBeginCount){const t=this._virtualSizedContainers.length;if(t>0){this.fireBeforeVirtualRectingEvent(t);for(let e=0;ethis.emit(\"windowOpened\",a))),a.on(\"closed\",(()=>this.reconcilePopoutWindows())),this._openPopouts.push(a),this.layoutConfig.settings.closePopoutsOnUnload&&!this._windowBeforeUnloadListening&&(globalThis.addEventListener(\"beforeunload\",this._windowBeforeUnloadListener,{passive:!0}),this._windowBeforeUnloadListening=!0),a}closeAllOpenPopouts(){for(let t=0;tglobalThis.close()),1)}getArea(t,e){let i=null,n=1/0;for(let o=0;o=s.x1&&t=s.y1&&es.surface&&(n=s.surface,i=s)}return i}calculateItemAreas(){const t=this.getAllContentItems(),e=this._groundItem;if(void 0===e)throw new J(\"LMCIAR44365\");if(1!==t.length){e.contentItems[0].isStack?this._itemAreas=[]:this._itemAreas=e.createSideAreas();for(let e=0;e0){let e=t[0];if(Gt.isComponentItem(e)){const t=e.parent;if(null===t)throw new K(\"LMXLLMI69999\");e=t}if(!Gt.isStack(e))throw new X(\"LMCLLMI19993\");e.maximise()}}}processMaximiseStack(t){if(this._maximisedStack=t,t.on(\"beforeItemDestroyed\",this._maximisedStackBeforeDestroyedListener),t.element.classList.add(\"lm_maximised\"),t.element.insertAdjacentElement(\"afterend\",this._maximisePlaceholder),void 0===this._groundItem)throw new J(\"LMMXI19993\");{this._groundItem.element.prepend(t.element);const{width:e,height:i}=kt(this._containerElement);Tt(t.element,e),At(t.element,i),t.updateSize(!0),t.focusActiveContentItem(),this._maximisedStack.emit(\"maximised\"),this.emit(\"stateChanged\")}}processMinimiseMaximisedStack(){if(void 0===this._maximisedStack)throw new X(\"LMMMS74422\");{const t=this._maximisedStack;if(null===t.parent)throw new K(\"LMMI13668\");t.element.classList.remove(\"lm_maximised\"),this._maximisePlaceholder.insertAdjacentElement(\"afterend\",t.element),this._maximisePlaceholder.remove(),this.updateRootSize(!0),this._maximisedStack=void 0,t.off(\"beforeItemDestroyed\",this._maximisedStackBeforeDestroyedListener),t.emit(\"minimised\"),this.emit(\"stateChanged\")}}reconcilePopoutWindows(){const t=[];for(let e=0;e{this._resizeTimeoutId=void 0,this.beginSizeInvalidation(),this.endSizeInvalidation()}),this.resizeDebounceInterval))}checkClearResizeTimeout(){void 0!==this._resizeTimeoutId&&(clearTimeout(this._resizeTimeoutId),this._resizeTimeoutId=void 0)}setContainer(){var t;const e=document.body,i=null!==(t=this._containerElement)&&void 0!==t?t:e;if(i===e){this.resizeWithContainerAutomatically=!0;const t=document.documentElement;t.style.height=\"100%\",t.style.margin=\"0\",t.style.padding=\"0\",t.style.overflow=\"clip\",e.style.height=\"100%\",e.style.margin=\"0\",e.style.padding=\"0\",e.style.overflow=\"clip\"}this._containerElement=i}onBeforeUnload(){this.destroy()}adjustColumnsResponsive(){if(void 0===this._groundItem)throw new J(\"LMACR20883\");if(this._firstLoad=!1,this.useResponsiveLayout()&&!this._updatingColumnsResponsive&&this._groundItem.contentItems.length>0&&this._groundItem.contentItems[0].isRow){if(void 0===this._groundItem||null===this._width)throw new J(\"LMACR77412\");{const t=this._groundItem.contentItems[0].contentItems.length;if(t<=1)return;{const e=this.layoutConfig.dimensions.defaultMinItemWidth;if(t*e<=this._width)return;{this._updatingColumnsResponsive=!0;const i=t-Math.max(Math.floor(this._width/e),1),n=this._groundItem.contentItems[0],o=this.getAllStacks();if(0===o.length)throw new X(\"LMACRS77413\");{const t=o[0];for(let e=0;en?void 0:{parentItem:t,index:o}}}case 1:if(void 0===this._focusedComponentItem)return;{const t=this._focusedComponentItem.parentItem;return this.tryCreateLocationFromParentItem(t,e)}case 2:{const t=this.findFirstContentItemType(at.stack);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 3:{let t=this.findFirstContentItemType(at.row);return void 0!==t?this.tryCreateLocationFromParentItem(t,e):(t=this.findFirstContentItemType(at.column),void 0!==t?this.tryCreateLocationFromParentItem(t,e):void 0)}case 4:{const t=this.findFirstContentItemType(at.row);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 5:{const t=this.findFirstContentItemType(at.column);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 6:if(void 0===this._groundItem)throw new J(\"LMFLRIF18244\");return void 0!==this.rootItem?void 0:void 0===e||0===e?{parentItem:this._groundItem,index:0}:void 0;case 7:if(void 0===this._groundItem)throw new J(\"LMFLF18244\");{const t=this._groundItem.contentItems;if(0===t.length)return void 0===e||0===e?{parentItem:this._groundItem,index:0}:void 0;{const i=t[0];return this.tryCreateLocationFromParentItem(i,e)}}}}tryCreateLocationFromParentItem(t,e){const i=t.contentItems.length;return void 0===e?{parentItem:t,index:i}:e<0||e>i?void 0:{parentItem:t,index:e}}}!function(t){t.createMaximisePlaceElement=function(t){const e=t.createElement(\"div\");return e.classList.add(\"lm_maximise_place\"),e},t.createTabDropPlaceholderElement=function(t){const e=t.createElement(\"div\");return e.classList.add(\"lm_drop_tab_placeholder\"),e},t.defaultLocationSelectors=[{typeId:1,index:void 0},{typeId:2,index:void 0},{typeId:3,index:void 0},{typeId:7,index:void 0}],t.afterFocusedItemIfPossibleLocationSelectors=[{typeId:0,index:1},{typeId:2,index:void 0},{typeId:3,index:void 0},{typeId:7,index:void 0}]}(ae||(ae={}));class le extends ae{constructor(t,e,i,n){if(super(le.createLayoutManagerConstructorParameters(t,e)),this._bindComponentEventHanlderPassedInConstructor=!1,this._creationTimeoutPassed=!1,void 0!==e&&\"function\"==typeof e&&(this.bindComponentEvent=e,this._bindComponentEventHanlderPassedInConstructor=!0,void 0!==i&&(this.unbindComponentEvent=i)),!this._bindComponentEventHanlderPassedInConstructor&&this.isSubWindow){if(void 0===this._constructorOrSubWindowLayoutConfig)throw new J(\"VLC98823\");{const t=xt.resolve(this._constructorOrSubWindowLayoutConfig);this.layoutConfig=Object.assign(Object.assign({},t),{root:void 0})}}!0!==n&&(this.deprecatedConstructor||this.init())}destroy(){this.bindComponentEvent=void 0,this.unbindComponentEvent=void 0,super.destroy()}init(){if(this._bindComponentEventHanlderPassedInConstructor||\"loading\"!==document.readyState&&null!==document.body){if(!this._bindComponentEventHanlderPassedInConstructor&&!0===this.isSubWindow&&!this._creationTimeoutPassed)return setTimeout((()=>this.init()),7),void(this._creationTimeoutPassed=!0);!0===this.isSubWindow&&(this._bindComponentEventHanlderPassedInConstructor||this.clearHtmlAndAdjustStylesForSubWindow(),window.__glInstance=this),super.init()}else document.addEventListener(\"DOMContentLoaded\",(()=>this.init()),{passive:!0})}clearHtmlAndAdjustStylesForSubWindow(){const t=document.head,e=new Array(4);e[0]=document.querySelectorAll(\"body link\"),e[1]=document.querySelectorAll(\"body style\"),e[2]=document.querySelectorAll(\"template\"),e[3]=document.querySelectorAll(\".gl_keep\");for(let i=0;ithis.emit(\"popIn\"))),document.body.appendChild(t),!0}}bindComponent(t,e){if(void 0!==this.bindComponentEvent){return this.bindComponentEvent(t,e)}if(void 0!==this.getComponentEvent)return{virtual:!1,component:this.getComponentEvent(t,e)};{const t=`${tt[2]}: ${JSON.stringify(e)}`;throw new Z(t)}}unbindComponent(t,e,i){if(void 0!==this.unbindComponentEvent)this.unbindComponentEvent(t);else if(!e&&void 0!==this.releaseComponentEvent){if(void 0===i)throw new J(\"VCUCRCU333998\");this.releaseComponentEvent(t,i)}}}!function(t){let e=!1;t.createLayoutManagerConstructorParameters=function(t,i){const n=e?null:new URL(document.location.href).searchParams.get(\"gl-window\");e=!0;const o=null!==n;let s,r;if(null!==n){const e=localStorage.getItem(n);if(null===e)throw new Error(\"Null gl-window Config\");localStorage.removeItem(n);const i=JSON.parse(e),o=_t.unminifyConfig(i);r=xt.fromResolved(o),t instanceof HTMLElement&&(s=t)}else void 0===t?r=void 0:t instanceof HTMLElement?(r=void 0,s=t):r=t,void 0===s&&i instanceof HTMLElement&&(s=i);return{constructorOrSubWindowLayoutConfig:r,isSubWindow:o,containerElement:s}}}(le||(le={}));class he extends le{constructor(t,e,i){super(t,e,i,!0),this._componentTypesMap=new Map,this._registeredComponentMap=new Map,this._virtuableComponentMap=new Map,this._containerVirtualRectingRequiredEventListener=(t,e,i)=>this.handleContainerVirtualRectingRequiredEvent(t,e,i),this._containerVirtualVisibilityChangeRequiredEventListener=(t,e)=>this.handleContainerVirtualVisibilityChangeRequiredEvent(t,e),this._containerVirtualZIndexChangeRequiredEventListener=(t,e,i)=>this.handleContainerVirtualZIndexChangeRequiredEvent(t,e,i),this.deprecatedConstructor||this.init()}registerComponent(t,e,i=!1){if(\"function\"!=typeof e)throw new $(\"registerComponent() componentConstructorOrFactoryFtn parameter is not a function\");if(e.hasOwnProperty(\"prototype\")){const n=e;this.registerComponentConstructor(t,n,i)}else{const n=e;this.registerComponentFactoryFunction(t,n,i)}}registerComponentConstructor(t,e,i=!1){if(\"function\"!=typeof e)throw new Error(tt[1]);if(void 0!==this._componentTypesMap.get(t))throw new Z(`${tt[3]}: ${t}`);this._componentTypesMap.set(t,{constructor:e,factoryFunction:void 0,virtual:i})}registerComponentFactoryFunction(t,e,i=!1){if(\"function\"!=typeof e)throw new Z(\"Please register a constructor function\");if(void 0!==this._componentTypesMap.get(t))throw new Z(`${tt[3]}: ${t}`);this._componentTypesMap.set(t,{constructor:void 0,factoryFunction:e,virtual:i})}registerComponentFunction(t){this.registerGetComponentConstructorCallback(t)}registerGetComponentConstructorCallback(t){if(\"function\"!=typeof t)throw new Error(\"Please register a callback function\");void 0!==this._getComponentConstructorFtn&&console.warn(\"Multiple component functions are being registered. Only the final registered function will be used.\"),this._getComponentConstructorFtn=t}getRegisteredComponentTypeNames(){const t=this._componentTypesMap.keys();return Array.from(t)}getComponentInstantiator(t){let e;const i=pt.resolveComponentTypeName(t);return void 0!==i&&(e=this._componentTypesMap.get(i)),void 0===e&&void 0!==this._getComponentConstructorFtn&&(e={constructor:this._getComponentConstructorFtn(t),factoryFunction:void 0,virtual:!1}),e}bindComponent(t,e){let i;const n=pt.resolveComponentTypeName(e);let o;if(void 0!==n&&(i=this._componentTypesMap.get(n)),void 0===i&&void 0!==this._getComponentConstructorFtn&&(i={constructor:this._getComponentConstructorFtn(e),factoryFunction:void 0,virtual:!1}),void 0!==i){const s=i.virtual;let r,a;r=void 0===e.componentState?void 0:Ut({},e.componentState);const l=i.constructor;if(void 0!==l)a=new l(t,r,s);else{const e=i.factoryFunction;if(void 0===e)throw new X(\"LMBCFFU10008\");a=e(t,r,s)}if(s){if(void 0===a)throw new J(\"GLBCVCU988774\");{const e=a,i=e.rootHtmlElement;if(void 0===i)throw new Z(`${tt[5]}: ${n}`);!function(t){const e=\"absolute\";t.style.position!==e&&(t.style.position=e)}(i),this.container.appendChild(i),this._virtuableComponentMap.set(t,e),t.virtualRectingRequiredEvent=this._containerVirtualRectingRequiredEventListener,t.virtualVisibilityChangeRequiredEvent=this._containerVirtualVisibilityChangeRequiredEventListener,t.virtualZIndexChangeRequiredEvent=this._containerVirtualZIndexChangeRequiredEventListener}}this._registeredComponentMap.set(t,a),o={virtual:i.virtual,component:a}}else o=super.bindComponent(t,e);return o}unbindComponent(t,e,i){if(void 0===this._registeredComponentMap.get(t))super.unbindComponent(t,e,i);else{const e=this._virtuableComponentMap.get(t);if(void 0!==e){const i=e.rootHtmlElement;if(void 0===i)throw new X(\"GLUC77743\",t.title);this.container.removeChild(i),this._virtuableComponentMap.delete(t)}}}fireBeforeVirtualRectingEvent(t){this._goldenLayoutBoundingClientRect=this.container.getBoundingClientRect(),super.fireBeforeVirtualRectingEvent(t)}handleContainerVirtualRectingRequiredEvent(t,e,i){const n=this._virtuableComponentMap.get(t);if(void 0===n)throw new J(\"GLHCSCE55933\");{const o=n.rootHtmlElement;if(void 0===o)throw new Z(tt[4]+\" \"+t.title);{const n=t.element.getBoundingClientRect(),s=n.left-this._goldenLayoutBoundingClientRect.left;o.style.left=zt(s);const r=n.top-this._goldenLayoutBoundingClientRect.top;o.style.top=zt(r),Tt(o,e),At(o,i)}}}handleContainerVirtualVisibilityChangeRequiredEvent(t,e){const i=this._virtuableComponentMap.get(t);if(void 0===i)throw new J(\"GLHCVVCRE55934\");{const n=i.rootHtmlElement;if(void 0===n)throw new Z(tt[4]+\" \"+t.title);Dt(n,e)}}handleContainerVirtualZIndexChangeRequiredEvent(t,e,i){const n=this._virtuableComponentMap.get(t);if(void 0===n)throw new J(\"GLHCVZICRE55935\");{const e=n.rootHtmlElement;if(void 0===e)throw new Z(tt[4]+\" \"+t.title);e.style.zIndex=i}}}const de=\"initial_\",ce={show:\"top\",popout:!1,maximise:!1,close:\"close-tab-unused\"},me={headerHeight:31},ue={hasHeaders:!0,reorderEnabled:!0},pe={popoutWholeStack:!1,constrainDragToContainer:!1,constrainDragToHeaders:!1,preventDragout:!1,showMaximiseIcon:!1,showPopoutIcon:!1,showCloseIcon:!1,blockedPopoutsThrowError:!0,closePopoutsOnUnload:!0,selectionEnabled:!1};var ge,fe;class ve{constructor(e){this.layout=e,ge.set(this,void 0),fe.set(this,void 0),this.handleResize=t=>{t.forEach((t=>this.resizeElement(t.target)))},this.handleMutation=()=>{this.layout.viewComponentsByContainerElement.forEach((t=>{this.resizeElement(t.container.element)}))},t.__classPrivateFieldSet(this,ge,new ResizeObserver(this.handleResize),\"f\"),t.__classPrivateFieldSet(this,fe,new MutationObserver(this.handleMutation),\"f\")}observeMutations(e){t.__classPrivateFieldGet(this,fe,\"f\")?.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[\"class\"]})}destroy(){t.__classPrivateFieldGet(this,ge,\"f\").disconnect(),t.__classPrivateFieldGet(this,fe,\"f\").disconnect()}observeContainer(e){t.__classPrivateFieldGet(this,ge,\"f\").observe(e)}unobserveContainer(e){t.__classPrivateFieldGet(this,ge,\"f\").unobserve(e)}resizeElement(t){const e=this.layout.viewComponentsByContainerElement.get(t);e&&e.resize()}}ge=new WeakMap,fe=new WeakMap;var _e={};Object.defineProperty(_e,\"__esModule\",{value:!0});var ye=_e.BaseItem=void 0;class Ce{constructor(t,e,i){this._item=t,this._layout=e,this._wrap=i}get raw(){return this._item}get layout(){return this._layout}get type(){return this._item.type}get contentItems(){return(this._item.contentItems??[]).map((t=>this._wrap(t)))}get parent(){const t=this._item.parent;return t?this._wrap(t):null}setActiveContentItem(t,e){if(\"stack\"!==this.type)throw new Error(`Cannot call setActiveContentItem from a non-stack item: ${this.type}`);this._item.setActiveContentItem(t.raw,e)}static wrapInternal(t,e,i){const n=Ce.wrapCache.get(e);if(n)return n;const o=new t(e,i,(e=>Ce.wrapInternal(t,e,i)));return Ce.wrapCache.set(e,o),o}}ye=_e.BaseItem=Ce,Ce.wrapCache=new WeakMap;const we=t=>!!t&&\"contentItems\"in t&&(t.isRow||t.isColumn);class Ie extends ye{isRoot(){return!!this._item.parent?.isGround}getBounds(){return this._item.element.getBoundingClientRect()}get viewName(){if(this._item.isComponent){const{component:t}=this._item;return t.identity.name}throw new Error(\"View name not found\")}onDestroyed(t){const e=({target:i})=>{i===this._item&&(t(),this._item.off(\"itemDestroyed\",e))};this._item.on(\"itemDestroyed\",e)}createAdjacentStack({position:t=\"right\"}={}){const e=this.raw;if(ee.isStack(e)&&e.parent){const i=[\"top\",\"bottom\"].includes(t)?\"column\":\"row\",n=[\"left\",\"top\"].includes(t)?1:0,o=we(e.parent)?e.parent:e.layoutManager,s=o,r=e.parent.contentItems.indexOf(e);e.parent.isGround&&e.parent.removeChild(e,!0);const a=o.newItem({type:i,content:[{type:\"stack\",content:[]}]},r);if(!a)throw new Error(\"createAdjacentStack: Failed to create new container\");const l=a.contentItems[0];return a.addChild(this.raw,n),we(s)&&s.removeChild(e,!0),this._wrap(l)}throw new Error(`Cannot creat adjacent stacks for type: ${e.type}, must be type 'stack'`)}setActiveContentItem(t,e=!0){if(!ee.isStack(this._item))throw new Error(`Cannot call setActiveContentItem from a non-stack item: ${this.type}`);this._item.setActiveComponentItem(t.raw,!e)}static wrap(t,e){return ye.wrapInternal(Ie,t,e)}}function be(t=[],e){for(const i of t)\"component\"===i.type?Object.keys(e).forEach((t=>{t in i&&(i.componentState={[`${de}${t}`]:i[t],...i.componentState}),i[t]=e[t]})):be(i.content,e)}function Se(t=[],e,i){for(const n of t)if(\"component\"===n.type)Object.keys(e).forEach((t=>{if(`${de}${t}`in n.componentState)return n[t]=n.componentState[`${de}${t}`],void delete n.componentState[`${de}${t}`];n[t]=e[t]}));else{if(n.size&&(\"row\"===i||\"column\"===i)){n[\"row\"===i?\"width\":\"height\"]=n.size?.includes(\".\")?parseFloat(n.size):parseInt(n.size)}Se(n.content,e,n.type)}}function Ee(t){if(t.root){t.root.content&&Se([t.root],{componentName:\"view\",isClosable:!0});const e=t.root;t.content=[e],delete t.root}return t}const xe=e=>class extends e{connectedCallback(){if(!this.name||!this.uuid)throw new Error(\" Name or uuid attribute missing\");if(!this.src)throw new Error(\" missing 'src' attribute.\");this.#t||(this.#t=document.createElement(\"iframe\"),this.#t.src=this.src,this.#t.style.height=\"100%\",this.#t.style.width=\"100%\",this.#t.style.border=\"none\",this.forceFrameName?this.#t.setAttribute(\"name\",this.forceFrameName):this.#t.setAttribute(\"name\",t.encodeOptions({brokerUrl:this.brokerUrl,name:this.name,uuid:this.uuid,providerId:this.providerId,contextGroup:this.contextGroup},\"of-frame\")),this.#t.setAttribute(\"id\",this.name),this.appendChild(this.#t))}#t;get brokerUrl(){return this.getAttribute(\"of-broker\")}set brokerUrl(t){t&&this.setAttribute(\"of-broker\",t)}get name(){return this.getAttribute(\"of-name\")}set name(t){t&&this.setAttribute(\"of-name\",t)}get forceFrameName(){return this.getAttribute(\"forceFrameName\")}set forceFrameName(t){t&&this.setAttribute(\"forceFrameName\",t)}get uuid(){return this.getAttribute(\"of-uuid\")}set uuid(t){t&&this.setAttribute(\"of-uuid\",t)}get src(){return this.getAttribute(\"src\")}set src(t){t&&this.setAttribute(\"src\",t)}get providerId(){return this.getAttribute(\"of-provider-id\")}set providerId(t){t&&this.setAttribute(\"of-provider-id\",t)}get contextGroup(){return this.getAttribute(\"of-context-group\")}set contextGroup(t){t&&this.setAttribute(\"of-context-group\",t)}static get observedAttributes(){return[\"name\"]}};class Le{static create(t){const e=document.createElement(\"of-view\");return Object.entries(t).forEach((([t,i])=>{e.setAttribute(t,i)})),e}}customElements.define(\"of-view\",xe(HTMLElement));class ze{constructor(t,i,n,{brokerUrl:o,interopConfig:s},r){this.container=t,this.config=i,this.ofView=null,this.isDragging=()=>this.container.tab.element?.className.includes(\"lm_dragging\")??!1;const{url:a,web:l,interop:h,name:d}=i||{},c=d??`internal-generated-view-${e.v4()}`;if(this.identity={uuid:n,name:c},this.container.element.setAttribute(\"of-name\",c),this.container.element.id=`container-${c}`,this.container.parent.id=c,void 0===a)return void this.handleUrlMissing();const m=this.updateTitleIfNotSet(a),u={\"of-broker\":o,\"of-uuid\":n,\"of-name\":c,src:a};l?.frameName&&(u.forceFrameName=l.frameName);const p=h?.currentContextGroup??s?.currentContextGroup;p&&(u[\"of-context-group\"]=p),s?.providerId&&(u[\"of-provider-id\"]=s?.providerId),this.ofView=Le.create(u),this.ofView.title=m??`Iframe: ${a}`,r.appendChild(this.ofView),this.ofView.style.position=\"absolute\"}updateTitleIfNotSet(t){return\"view\"===this.container.parent.title&&this.container.parent.setTitle(t),this.container.parent.title}handleUrlMissing(){const t=document.createElement(\"div\");t.setAttribute(\"style\",\"padding: 20px\");t.innerText=\"No URL provided\",this.container.element.appendChild(t)}destroy(){this.ofView?.remove(),this.ofView=null}closeView(){this.container.close()}resize(){if(this.ofView){if(this.isDragging())return void(this.ofView.style.display=\"none\");const t=this.container.element.getBoundingClientRect();this.ofView.style.position=\"absolute\",this.ofView.style.height=`${t.height}px`,this.ofView.style.width=`${t.width}px`,this.ofView.style.inset=`${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`,this.ofView.style.display=\"block\"}}}class Me extends U{static overrideConfig(t){const e={...ue,...t.settings,...pe};return e.reorderEnabled?be(t.content,{isClosable:!0}):be(t.content,{reorderEnabled:!1}),{dimensions:me,...t,settings:e,header:{...ce,show:!1!==t.settings?.hasHeaders&&ce.show}}}constructor(t,e,i,{options:n},o,s){super(),this.identity=t,this.container=e,this.initialConfig=i,this.layoutManager=o,this.platformProvider=s,this.viewComponentsByContainerElement=new Map,this.layoutContentCache=_.getSingleInstance(),this.reparentingViews=new Set,this.goldenLayoutDestroyed=!1,this.createViewComponent=(t,e)=>{m.handleSharedView(this.layoutManager,this.identity,e);const i=new ze(t,e,this.identity.uuid,this.options,this.iframeContainer);return e&&!1===e[`${de}isClosable`]&&this.stylesheet.insertRule(`#tab-${i.identity.name} .lm_close_tab { display: none; }`),this.viewComponentsByContainerElement.set(t.element,i),this.resizeController.observeContainer(t.element),i},this.iframeContainer=document.createElement(\"div\"),this.iframeContainer.id=`openfin-layout-iframe-container-${this.identity.layoutName}`,this.domEmitter=new V(e),this.setupStylesheets(),this.layout=new he(this.container),this.layout.resizeWithContainerAutomatically=!0,this.options=n,this.layout.registerComponent(\"view\",this.createViewComponent),this.setupListeners(),this.resizeController=new ve(this),this.layout.loadLayout(Me.overrideConfig(i));const r=document.createElement(\"div\");r.id=`openfin-layout-shadow-container-${this.identity.layoutName}`,r.attachShadow({mode:\"open\",delegatesFocus:!1}).appendChild(this.iframeContainer),this.container.appendChild(r),this.resizeController.observeMutations(this.container)}getStackByView({name:t}){const e=this.layout.findFirstComponentItemById(t);if(e?.parent&&e?.parent?.isStack)return Ie.wrap(e.parent,this)}getRoot(){return Ie.wrap(this.layout.rootItem,this)}async platformCloseView(t){const e=[...this.viewComponentsByContainerElement.values()].find((e=>e.identity.name===t.name));if(!e)throw new Error(`View with name: ${t.name} not found in layout.`);e.closeView()}async platformCreateView(t,{location:e,targetView:i}={}){if(i)throw new Error(\"TargetView not supported in web\");const n={options:this.platformProvider.normalizeOptions(t),target:this.identity,location:e};return this.insertView(n)}setupStylesheets(){if(this.container.setAttribute(\"data-openfin-layout-name\",this.identity.layoutName),this.stylesheet=new CSSStyleSheet,this.stylesheet.insertRule(\".lm_close { display: none; }\"),document.adoptedStyleSheets.push(this.stylesheet),this.initialConfig.settings?.preventSplitterResize){const t=`\\n [data-openfin-layout-name='${this.identity.layoutName}'] .lm_splitter {\\n pointer-events: none;\\n }`;this.stylesheet.insertRule(t)}}insertView({options:t,location:e,targetView:i}){const n=e?this.layoutContentCache.getItemOrUndefined(e.id):void 0,o=i?this.layoutContentCache.getItemOrUndefined(i.name):void 0,s=n??o??Ie.wrap(this.layout.rootItem,this);let r;if(ee.isStack(s.raw))r=s.raw;else{if(!we(s.raw))throw new Error(\"Cannot add a view at the requested location\");r=s.raw.newItem({type:\"stack\",content:[]})}const a=Math.min(r.contentItems.length,e?.index??r.contentItems.length);let l=this.layout.findFirstComponentItemById(t.name);l?(l.parent&&l.parent.removeChild(l,!0),r.addChild(l,a)):l=r.newComponent(\"view\",t,t.title??t.url??\"Default Title\",a);const h=l.component.identity;return Promise.resolve({identity:h})}replaceView({viewToReplace:t,newView:e}){throw new Error(\"Method not implemented.\")}replaceLayout(t){throw new Error(\"Method not implemented.\")}async cleanupView(t){}applyPreset(t){throw new Error(\"Method not implemented.\")}getCurrentViews(){return[...this.viewComponentsByContainerElement.values()].map((t=>t.identity))}async getFrameSnapshot(){return Ee(xt.fromResolved(this.layout.toConfig()))}isVisible(){return W(this.container)}async onViewDetached({viewIdentity:t}){this.reparentingViews.add(t.name),this.platformCloseView(t)}async destroy(){this.goldenLayoutDestroyed||(this.goldenLayoutDestroyed=!0,this.layout.destroy()),this.iframeContainer.remove(),this.resizeController.destroy(),document.adoptedStyleSheets=document.adoptedStyleSheets.filter((t=>t!==this.stylesheet)),this.viewComponentsByContainerElement.clear()}setupListeners(){this.container.addEventListener(\"pointerdown\",(t=>{if(t.target instanceof HTMLElement){const e=t.target.classList;[\"lm_tab\",\"lm_title\",\"lm_splitter\",\"lm_drag_handle\"].some((t=>e.contains(t)))&&(this.handleDragStart(),2===t.button&&t.stopPropagation())}}),!0),document.addEventListener(\"pointerup\",(()=>this.handleDragEnd()),!0),this.layout.on(\"tabCreated\",(t=>{const e=t.componentItem.component;t.element.id=`tab-${e.identity.name}`,this.domEmitter.dispatchLocalEvent(\"tab-created\",e.identity)})),this.layout.on(\"itemCreated\",(({target:t})=>{const e=t;if(Gt.isComponentItem(e)){const t=e.component;this.domEmitter.dispatchLocalEvent(\"container-created\",t.identity)}})),this.layout.on(\"itemDestroyed\",(t=>{const e=t.target;if(Gt.isComponentItem(e)){const t=e.component;this.removeViewComponent(t)}})),this.layout.on(\"itemDropped\",(()=>{this.handleDragEnd()}))}handleDragStart(){this.iframeContainer.style.pointerEvents=\"none\"}handleDragEnd(){this.iframeContainer.style.pointerEvents=\"\"}removeViewComponent(t){if(t.config&&!1===t.config[`${de}isClosable`]){const e=[...this.stylesheet.cssRules].findIndex((e=>e.cssText.includes(`#tab-${t.identity.name}`)));this.stylesheet.deleteRule(e)}t.destroy(),this.viewComponentsByContainerElement.delete(t.container.element),this.resizeController.unobserveContainer(t.container.element),this.reparentingViews.has(t.identity.name)?this.reparentingViews.delete(t.identity.name):this.platformProvider.closeView(t.identity.name);0===this.getCurrentViews().length&&(this.goldenLayoutDestroyed||(this.goldenLayoutDestroyed=!0,m.handleLastViewRemoved(this.layoutManager,this.identity)))}}class Pe{constructor(t,e,i,n){this.windowIdentity=t,this.connectConfig=e,this.provider=i,this.fallbackContainer=n}async createLayout(t,e){if(!(\"container\"in t)&&!this.fallbackContainer)throw new Error(\"Container property is not optional in web\");const{layoutName:i}=t,n=t,o=this.provider.initLayoutViews(n),s=n.container??this.fallbackContainer,r={...this.windowIdentity,layoutName:i},a=new Me(r,s,o,this.connectConfig,e,this.provider);m.registerLayout(e,i,a),this.fallbackContainer=null}async getLayoutSnapshot(t){return t.getLayoutSnapshot()}async handleLastViewRemoved(t){}}class Te{static async init(e){const i=e.getFin().InterApplicationBus.Channel,n=await i.create(`custom-frame-${e.me.uuid}`);return n.setDefaultAction((async(t,{target:e,opts:i},o)=>{const s=n.connections.find((t=>t.name===e.name));if(s)return n.dispatch(s,t,{...i,target:e});throw new Error(`Client with name ${e.name} not found`)})),await t.relayChannelClientApi_1(n,\"layout-relay\"),new Te(e)}constructor(t){this.wire=t,this.viewNames=new Set}normalizeOptions(t,i=\"default\"){const n=this.wire.me.uuid;let{name:o=`internal-generated-view-${e.v4()}`}=t;return o.match(/^internal-generated-view-/)&&this.viewNames.has(o)&&\"duplicate\"===i&&(o=`internal-generated-view-${e.v4()}`),this.viewNames.add(o),{...t,name:o,uuid:n}}closeView(t){this.viewNames.delete(t)}initLayoutViews({layout:t,multiInstanceViewBehavior:e}){return H((t=>{if(\"component\"===t.type&&t.componentState){const i=this.normalizeOptions(t.componentState,e);return{...t,componentState:i}}return t}),t)}}var Ae;const ke=t=>t;Ae=new WeakMap,exports.WebLayoutEntryPoint=class{constructor(e){Ae.set(this,void 0),this.initLayoutManager=async(e,i,{container:n,layoutManagerOverride:o})=>{const s=await Te.init(i),r=o??ke,a=new Pe(i.me,t.__classPrivateFieldGet(this,Ae,\"f\"),s,n),l=new(r(m.createClosedConstructor(a)));return await M(i,l),l},this.applyLayoutSnapshot=async(e,i,n)=>{await i.applyLayoutSnapshot(t.__classPrivateFieldGet(this,Ae,\"f\").platform.layoutSnapshot)},this.createLayout=async(t,e)=>m.createLayout(t,e),this.destroyLayout=async(t,e)=>m.destroyLayout(t,e),t.__classPrivateFieldSet(this,Ae,e,\"f\")}};\n","'use strict'\n\nexports.byteLength = byteLength\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\nfor (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i]\n revLookup[code.charCodeAt(i)] = i\n}\n\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction getLens (b64) {\n var len = b64.length\n\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // Trim off extra bytes after placeholder bytes are found\n // See: https://github.com/beatgammit/base64-js/issues/42\n var validLen = b64.indexOf('=')\n if (validLen === -1) validLen = len\n\n var placeHoldersLen = validLen === len\n ? 0\n : 4 - (validLen % 4)\n\n return [validLen, placeHoldersLen]\n}\n\n// base64 is 4/3 + up to two characters of the original data\nfunction byteLength (b64) {\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction _byteLength (b64, validLen, placeHoldersLen) {\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction toByteArray (b64) {\n var tmp\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n\n var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))\n\n var curByte = 0\n\n // if there are placeholders, only get up to the last complete 4 chars\n var len = placeHoldersLen > 0\n ? validLen - 4\n : validLen\n\n var i\n for (i = 0; i < len; i += 4) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 18) |\n (revLookup[b64.charCodeAt(i + 1)] << 12) |\n (revLookup[b64.charCodeAt(i + 2)] << 6) |\n revLookup[b64.charCodeAt(i + 3)]\n arr[curByte++] = (tmp >> 16) & 0xFF\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 2) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 2) |\n (revLookup[b64.charCodeAt(i + 1)] >> 4)\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 1) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 10) |\n (revLookup[b64.charCodeAt(i + 1)] << 4) |\n (revLookup[b64.charCodeAt(i + 2)] >> 2)\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] +\n lookup[num >> 12 & 0x3F] +\n lookup[num >> 6 & 0x3F] +\n lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n var tmp\n var output = []\n for (var i = start; i < end; i += 3) {\n tmp =\n ((uint8[i] << 16) & 0xFF0000) +\n ((uint8[i + 1] << 8) & 0xFF00) +\n (uint8[i + 2] & 0xFF)\n output.push(tripletToBase64(tmp))\n }\n return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n var tmp\n var len = uint8.length\n var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n var parts = []\n var maxChunkLength = 16383 // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1]\n parts.push(\n lookup[tmp >> 2] +\n lookup[(tmp << 4) & 0x3F] +\n '=='\n )\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + uint8[len - 1]\n parts.push(\n lookup[tmp >> 10] +\n lookup[(tmp >> 4) & 0x3F] +\n lookup[(tmp << 2) & 0x3F] +\n '='\n )\n }\n\n return parts.join('')\n}\n","/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n/* eslint-disable no-proto */\n\n'use strict'\n\nconst base64 = require('base64-js')\nconst ieee754 = require('ieee754')\nconst customInspectSymbol =\n (typeof Symbol === 'function' && typeof Symbol['for'] === 'function') // eslint-disable-line dot-notation\n ? Symbol['for']('nodejs.util.inspect.custom') // eslint-disable-line dot-notation\n : null\n\nexports.Buffer = Buffer\nexports.SlowBuffer = SlowBuffer\nexports.INSPECT_MAX_BYTES = 50\n\nconst K_MAX_LENGTH = 0x7fffffff\nexports.kMaxLength = K_MAX_LENGTH\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Print warning and recommend using `buffer` v4.x which has an Object\n * implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * We report that the browser does not support typed arrays if the are not subclassable\n * using __proto__. Firefox 4-29 lacks support for adding new properties to `Uint8Array`\n * (See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438). IE 10 lacks support\n * for __proto__ and has a buggy typed array implementation.\n */\nBuffer.TYPED_ARRAY_SUPPORT = typedArraySupport()\n\nif (!Buffer.TYPED_ARRAY_SUPPORT && typeof console !== 'undefined' &&\n typeof console.error === 'function') {\n console.error(\n 'This browser lacks typed array (Uint8Array) support which is required by ' +\n '`buffer` v5.x. Use `buffer` v4.x if you require old browser support.'\n )\n}\n\nfunction typedArraySupport () {\n // Can typed array instances can be augmented?\n try {\n const arr = new Uint8Array(1)\n const proto = { foo: function () { return 42 } }\n Object.setPrototypeOf(proto, Uint8Array.prototype)\n Object.setPrototypeOf(arr, proto)\n return arr.foo() === 42\n } catch (e) {\n return false\n }\n}\n\nObject.defineProperty(Buffer.prototype, 'parent', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.buffer\n }\n})\n\nObject.defineProperty(Buffer.prototype, 'offset', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.byteOffset\n }\n})\n\nfunction createBuffer (length) {\n if (length > K_MAX_LENGTH) {\n throw new RangeError('The value \"' + length + '\" is invalid for option \"size\"')\n }\n // Return an augmented `Uint8Array` instance\n const buf = new Uint8Array(length)\n Object.setPrototypeOf(buf, Buffer.prototype)\n return buf\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new TypeError(\n 'The \"string\" argument must be of type string. Received type number'\n )\n }\n return allocUnsafe(arg)\n }\n return from(arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\nfunction from (value, encodingOrOffset, length) {\n if (typeof value === 'string') {\n return fromString(value, encodingOrOffset)\n }\n\n if (ArrayBuffer.isView(value)) {\n return fromArrayView(value)\n }\n\n if (value == null) {\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n }\n\n if (isInstance(value, ArrayBuffer) ||\n (value && isInstance(value.buffer, ArrayBuffer))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof SharedArrayBuffer !== 'undefined' &&\n (isInstance(value, SharedArrayBuffer) ||\n (value && isInstance(value.buffer, SharedArrayBuffer)))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof value === 'number') {\n throw new TypeError(\n 'The \"value\" argument must not be of type number. Received type number'\n )\n }\n\n const valueOf = value.valueOf && value.valueOf()\n if (valueOf != null && valueOf !== value) {\n return Buffer.from(valueOf, encodingOrOffset, length)\n }\n\n const b = fromObject(value)\n if (b) return b\n\n if (typeof Symbol !== 'undefined' && Symbol.toPrimitive != null &&\n typeof value[Symbol.toPrimitive] === 'function') {\n return Buffer.from(value[Symbol.toPrimitive]('string'), encodingOrOffset, length)\n }\n\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n return from(value, encodingOrOffset, length)\n}\n\n// Note: Change prototype *after* Buffer.from is defined to workaround Chrome bug:\n// https://github.com/feross/buffer/pull/148\nObject.setPrototypeOf(Buffer.prototype, Uint8Array.prototype)\nObject.setPrototypeOf(Buffer, Uint8Array)\n\nfunction assertSize (size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be of type number')\n } else if (size < 0) {\n throw new RangeError('The value \"' + size + '\" is invalid for option \"size\"')\n }\n}\n\nfunction alloc (size, fill, encoding) {\n assertSize(size)\n if (size <= 0) {\n return createBuffer(size)\n }\n if (fill !== undefined) {\n // Only pay attention to encoding if it's a string. This\n // prevents accidentally sending in a number that would\n // be interpreted as a start offset.\n return typeof encoding === 'string'\n ? createBuffer(size).fill(fill, encoding)\n : createBuffer(size).fill(fill)\n }\n return createBuffer(size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n return alloc(size, fill, encoding)\n}\n\nfunction allocUnsafe (size) {\n assertSize(size)\n return createBuffer(size < 0 ? 0 : checked(size) | 0)\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n return allocUnsafe(size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n return allocUnsafe(size)\n}\n\nfunction fromString (string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8'\n }\n\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n\n const length = byteLength(string, encoding) | 0\n let buf = createBuffer(length)\n\n const actual = buf.write(string, encoding)\n\n if (actual !== length) {\n // Writing a hex string, for example, that contains invalid characters will\n // cause everything after the first invalid character to be ignored. (e.g.\n // 'abxxcd' will be treated as 'ab')\n buf = buf.slice(0, actual)\n }\n\n return buf\n}\n\nfunction fromArrayLike (array) {\n const length = array.length < 0 ? 0 : checked(array.length) | 0\n const buf = createBuffer(length)\n for (let i = 0; i < length; i += 1) {\n buf[i] = array[i] & 255\n }\n return buf\n}\n\nfunction fromArrayView (arrayView) {\n if (isInstance(arrayView, Uint8Array)) {\n const copy = new Uint8Array(arrayView)\n return fromArrayBuffer(copy.buffer, copy.byteOffset, copy.byteLength)\n }\n return fromArrayLike(arrayView)\n}\n\nfunction fromArrayBuffer (array, byteOffset, length) {\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\"offset\" is outside of buffer bounds')\n }\n\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\"length\" is outside of buffer bounds')\n }\n\n let buf\n if (byteOffset === undefined && length === undefined) {\n buf = new Uint8Array(array)\n } else if (length === undefined) {\n buf = new Uint8Array(array, byteOffset)\n } else {\n buf = new Uint8Array(array, byteOffset, length)\n }\n\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(buf, Buffer.prototype)\n\n return buf\n}\n\nfunction fromObject (obj) {\n if (Buffer.isBuffer(obj)) {\n const len = checked(obj.length) | 0\n const buf = createBuffer(len)\n\n if (buf.length === 0) {\n return buf\n }\n\n obj.copy(buf, 0, 0, len)\n return buf\n }\n\n if (obj.length !== undefined) {\n if (typeof obj.length !== 'number' || numberIsNaN(obj.length)) {\n return createBuffer(0)\n }\n return fromArrayLike(obj)\n }\n\n if (obj.type === 'Buffer' && Array.isArray(obj.data)) {\n return fromArrayLike(obj.data)\n }\n}\n\nfunction checked (length) {\n // Note: cannot use `length < K_MAX_LENGTH` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= K_MAX_LENGTH) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + K_MAX_LENGTH.toString(16) + ' bytes')\n }\n return length | 0\n}\n\nfunction SlowBuffer (length) {\n if (+length != length) { // eslint-disable-line eqeqeq\n length = 0\n }\n return Buffer.alloc(+length)\n}\n\nBuffer.isBuffer = function isBuffer (b) {\n return b != null && b._isBuffer === true &&\n b !== Buffer.prototype // so Buffer.isBuffer(Buffer.prototype) will be false\n}\n\nBuffer.compare = function compare (a, b) {\n if (isInstance(a, Uint8Array)) a = Buffer.from(a, a.offset, a.byteLength)\n if (isInstance(b, Uint8Array)) b = Buffer.from(b, b.offset, b.byteLength)\n if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n throw new TypeError(\n 'The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array'\n )\n }\n\n if (a === b) return 0\n\n let x = a.length\n let y = b.length\n\n for (let i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i]\n y = b[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n switch (String(encoding).toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'latin1':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return true\n default:\n return false\n }\n}\n\nBuffer.concat = function concat (list, length) {\n if (!Array.isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n\n if (list.length === 0) {\n return Buffer.alloc(0)\n }\n\n let i\n if (length === undefined) {\n length = 0\n for (i = 0; i < list.length; ++i) {\n length += list[i].length\n }\n }\n\n const buffer = Buffer.allocUnsafe(length)\n let pos = 0\n for (i = 0; i < list.length; ++i) {\n let buf = list[i]\n if (isInstance(buf, Uint8Array)) {\n if (pos + buf.length > buffer.length) {\n if (!Buffer.isBuffer(buf)) buf = Buffer.from(buf)\n buf.copy(buffer, pos)\n } else {\n Uint8Array.prototype.set.call(\n buffer,\n buf,\n pos\n )\n }\n } else if (!Buffer.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n } else {\n buf.copy(buffer, pos)\n }\n pos += buf.length\n }\n return buffer\n}\n\nfunction byteLength (string, encoding) {\n if (Buffer.isBuffer(string)) {\n return string.length\n }\n if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) {\n return string.byteLength\n }\n if (typeof string !== 'string') {\n throw new TypeError(\n 'The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. ' +\n 'Received type ' + typeof string\n )\n }\n\n const len = string.length\n const mustMatch = (arguments.length > 2 && arguments[2] === true)\n if (!mustMatch && len === 0) return 0\n\n // Use a for loop to avoid recursion\n let loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'ascii':\n case 'latin1':\n case 'binary':\n return len\n case 'utf8':\n case 'utf-8':\n return utf8ToBytes(string).length\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return len * 2\n case 'hex':\n return len >>> 1\n case 'base64':\n return base64ToBytes(string).length\n default:\n if (loweredCase) {\n return mustMatch ? -1 : utf8ToBytes(string).length // assume utf8\n }\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n let loweredCase = false\n\n // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n // property of a typed array.\n\n // This behaves neither like String nor Uint8Array in that we set start/end\n // to their upper/lower bounds if the value passed is out of range.\n // undefined is handled specially as per ECMA-262 6th Edition,\n // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n if (start === undefined || start < 0) {\n start = 0\n }\n // Return early if start > this.length. Done here to prevent potential uint32\n // coercion fail below.\n if (start > this.length) {\n return ''\n }\n\n if (end === undefined || end > this.length) {\n end = this.length\n }\n\n if (end <= 0) {\n return ''\n }\n\n // Force coercion to uint32. This will also coerce falsey/NaN values to 0.\n end >>>= 0\n start >>>= 0\n\n if (end <= start) {\n return ''\n }\n\n if (!encoding) encoding = 'utf8'\n\n while (true) {\n switch (encoding) {\n case 'hex':\n return hexSlice(this, start, end)\n\n case 'utf8':\n case 'utf-8':\n return utf8Slice(this, start, end)\n\n case 'ascii':\n return asciiSlice(this, start, end)\n\n case 'latin1':\n case 'binary':\n return latin1Slice(this, start, end)\n\n case 'base64':\n return base64Slice(this, start, end)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return utf16leSlice(this, start, end)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = (encoding + '').toLowerCase()\n loweredCase = true\n }\n }\n}\n\n// This property is used by `Buffer.isBuffer` (and the `is-buffer` npm package)\n// to detect a Buffer instance. It's not possible to use `instanceof Buffer`\n// reliably in a browserify context because there could be multiple different\n// copies of the 'buffer' package in use. This method works even for Buffer\n// instances that were created from another copy of the `buffer` package.\n// See: https://github.com/feross/buffer/issues/154\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n const i = b[n]\n b[n] = b[m]\n b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n const len = this.length\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits')\n }\n for (let i = 0; i < len; i += 2) {\n swap(this, i, i + 1)\n }\n return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n const len = this.length\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits')\n }\n for (let i = 0; i < len; i += 4) {\n swap(this, i, i + 3)\n swap(this, i + 1, i + 2)\n }\n return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n const len = this.length\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits')\n }\n for (let i = 0; i < len; i += 8) {\n swap(this, i, i + 7)\n swap(this, i + 1, i + 6)\n swap(this, i + 2, i + 5)\n swap(this, i + 3, i + 4)\n }\n return this\n}\n\nBuffer.prototype.toString = function toString () {\n const length = this.length\n if (length === 0) return ''\n if (arguments.length === 0) return utf8Slice(this, 0, length)\n return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.toLocaleString = Buffer.prototype.toString\n\nBuffer.prototype.equals = function equals (b) {\n if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n if (this === b) return true\n return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n let str = ''\n const max = exports.INSPECT_MAX_BYTES\n str = this.toString('hex', 0, max).replace(/(.{2})/g, '$1 ').trim()\n if (this.length > max) str += ' ... '\n return ''\n}\nif (customInspectSymbol) {\n Buffer.prototype[customInspectSymbol] = Buffer.prototype.inspect\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n if (isInstance(target, Uint8Array)) {\n target = Buffer.from(target, target.offset, target.byteLength)\n }\n if (!Buffer.isBuffer(target)) {\n throw new TypeError(\n 'The \"target\" argument must be one of type Buffer or Uint8Array. ' +\n 'Received type ' + (typeof target)\n )\n }\n\n if (start === undefined) {\n start = 0\n }\n if (end === undefined) {\n end = target ? target.length : 0\n }\n if (thisStart === undefined) {\n thisStart = 0\n }\n if (thisEnd === undefined) {\n thisEnd = this.length\n }\n\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError('out of range index')\n }\n\n if (thisStart >= thisEnd && start >= end) {\n return 0\n }\n if (thisStart >= thisEnd) {\n return -1\n }\n if (start >= end) {\n return 1\n }\n\n start >>>= 0\n end >>>= 0\n thisStart >>>= 0\n thisEnd >>>= 0\n\n if (this === target) return 0\n\n let x = thisEnd - thisStart\n let y = end - start\n const len = Math.min(x, y)\n\n const thisCopy = this.slice(thisStart, thisEnd)\n const targetCopy = target.slice(start, end)\n\n for (let i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i]\n y = targetCopy[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (numberIsNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [val], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n let indexSize = 1\n let arrLength = arr.length\n let valLength = val.length\n\n if (encoding !== undefined) {\n encoding = String(encoding).toLowerCase()\n if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n encoding === 'utf16le' || encoding === 'utf-16le') {\n if (arr.length < 2 || val.length < 2) {\n return -1\n }\n indexSize = 2\n arrLength /= 2\n valLength /= 2\n byteOffset /= 2\n }\n }\n\n function read (buf, i) {\n if (indexSize === 1) {\n return buf[i]\n } else {\n return buf.readUInt16BE(i * indexSize)\n }\n }\n\n let i\n if (dir) {\n let foundIndex = -1\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1) foundIndex = i\n if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n } else {\n if (foundIndex !== -1) i -= i - foundIndex\n foundIndex = -1\n }\n }\n } else {\n if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n for (i = byteOffset; i >= 0; i--) {\n let found = true\n for (let j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false\n break\n }\n }\n if (found) return i\n }\n }\n\n return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n offset = Number(offset) || 0\n const remaining = buf.length - offset\n if (!length) {\n length = remaining\n } else {\n length = Number(length)\n if (length > remaining) {\n length = remaining\n }\n }\n\n const strLen = string.length\n\n if (length > strLen / 2) {\n length = strLen / 2\n }\n let i\n for (i = 0; i < length; ++i) {\n const parsed = parseInt(string.substr(i * 2, 2), 16)\n if (numberIsNaN(parsed)) return i\n buf[offset + i] = parsed\n }\n return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n // Buffer#write(string)\n if (offset === undefined) {\n encoding = 'utf8'\n length = this.length\n offset = 0\n // Buffer#write(string, encoding)\n } else if (length === undefined && typeof offset === 'string') {\n encoding = offset\n length = this.length\n offset = 0\n // Buffer#write(string, offset[, length][, encoding])\n } else if (isFinite(offset)) {\n offset = offset >>> 0\n if (isFinite(length)) {\n length = length >>> 0\n if (encoding === undefined) encoding = 'utf8'\n } else {\n encoding = length\n length = undefined\n }\n } else {\n throw new Error(\n 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n )\n }\n\n const remaining = this.length - offset\n if (length === undefined || length > remaining) length = remaining\n\n if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n throw new RangeError('Attempt to write outside buffer bounds')\n }\n\n if (!encoding) encoding = 'utf8'\n\n let loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'hex':\n return hexWrite(this, string, offset, length)\n\n case 'utf8':\n case 'utf-8':\n return utf8Write(this, string, offset, length)\n\n case 'ascii':\n case 'latin1':\n case 'binary':\n return asciiWrite(this, string, offset, length)\n\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return base64Write(this, string, offset, length)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return ucs2Write(this, string, offset, length)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0)\n }\n}\n\nfunction base64Slice (buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf)\n } else {\n return base64.fromByteArray(buf.slice(start, end))\n }\n}\n\nfunction utf8Slice (buf, start, end) {\n end = Math.min(buf.length, end)\n const res = []\n\n let i = start\n while (i < end) {\n const firstByte = buf[i]\n let codePoint = null\n let bytesPerSequence = (firstByte > 0xEF)\n ? 4\n : (firstByte > 0xDF)\n ? 3\n : (firstByte > 0xBF)\n ? 2\n : 1\n\n if (i + bytesPerSequence <= end) {\n let secondByte, thirdByte, fourthByte, tempCodePoint\n\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 0x80) {\n codePoint = firstByte\n }\n break\n case 2:\n secondByte = buf[i + 1]\n if ((secondByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n if (tempCodePoint > 0x7F) {\n codePoint = tempCodePoint\n }\n }\n break\n case 3:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n codePoint = tempCodePoint\n }\n }\n break\n case 4:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n fourthByte = buf[i + 3]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n codePoint = tempCodePoint\n }\n }\n }\n }\n\n if (codePoint === null) {\n // we did not generate a valid codePoint so insert a\n // replacement char (U+FFFD) and advance only 1 byte\n codePoint = 0xFFFD\n bytesPerSequence = 1\n } else if (codePoint > 0xFFFF) {\n // encode to utf16 (surrogate pair dance)\n codePoint -= 0x10000\n res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n codePoint = 0xDC00 | codePoint & 0x3FF\n }\n\n res.push(codePoint)\n i += bytesPerSequence\n }\n\n return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nconst MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n const len = codePoints.length\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n }\n\n // Decode in chunks to avoid \"call stack size exceeded\".\n let res = ''\n let i = 0\n while (i < len) {\n res += String.fromCharCode.apply(\n String,\n codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n )\n }\n return res\n}\n\nfunction asciiSlice (buf, start, end) {\n let ret = ''\n end = Math.min(buf.length, end)\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F)\n }\n return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n let ret = ''\n end = Math.min(buf.length, end)\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i])\n }\n return ret\n}\n\nfunction hexSlice (buf, start, end) {\n const len = buf.length\n\n if (!start || start < 0) start = 0\n if (!end || end < 0 || end > len) end = len\n\n let out = ''\n for (let i = start; i < end; ++i) {\n out += hexSliceLookupTable[buf[i]]\n }\n return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n const bytes = buf.slice(start, end)\n let res = ''\n // If bytes.length is odd, the last 8 bits must be ignored (same as node.js)\n for (let i = 0; i < bytes.length - 1; i += 2) {\n res += String.fromCharCode(bytes[i] + (bytes[i + 1] * 256))\n }\n return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n const len = this.length\n start = ~~start\n end = end === undefined ? len : ~~end\n\n if (start < 0) {\n start += len\n if (start < 0) start = 0\n } else if (start > len) {\n start = len\n }\n\n if (end < 0) {\n end += len\n if (end < 0) end = 0\n } else if (end > len) {\n end = len\n }\n\n if (end < start) end = start\n\n const newBuf = this.subarray(start, end)\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(newBuf, Buffer.prototype)\n\n return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUintLE =\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let val = this[offset]\n let mul = 1\n let i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUintBE =\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n checkOffset(offset, byteLength, this.length)\n }\n\n let val = this[offset + --byteLength]\n let mul = 1\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUint8 =\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n return this[offset]\n}\n\nBuffer.prototype.readUint16LE =\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUint16BE =\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUint32LE =\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return ((this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16)) +\n (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUint32BE =\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] * 0x1000000) +\n ((this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n this[offset + 3])\n}\n\nBuffer.prototype.readBigUInt64LE = defineBigIntMethod(function readBigUInt64LE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const lo = first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24\n\n const hi = this[++offset] +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n last * 2 ** 24\n\n return BigInt(lo) + (BigInt(hi) << BigInt(32))\n})\n\nBuffer.prototype.readBigUInt64BE = defineBigIntMethod(function readBigUInt64BE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const hi = first * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset]\n\n const lo = this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last\n\n return (BigInt(hi) << BigInt(32)) + BigInt(lo)\n})\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let val = this[offset]\n let mul = 1\n let i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let i = byteLength\n let mul = 1\n let val = this[offset + --i]\n while (i > 0 && (mul *= 0x100)) {\n val += this[offset + --i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n if (!(this[offset] & 0x80)) return (this[offset])\n return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n const val = this[offset] | (this[offset + 1] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n const val = this[offset + 1] | (this[offset] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16) |\n (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] << 24) |\n (this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n (this[offset + 3])\n}\n\nBuffer.prototype.readBigInt64LE = defineBigIntMethod(function readBigInt64LE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const val = this[offset + 4] +\n this[offset + 5] * 2 ** 8 +\n this[offset + 6] * 2 ** 16 +\n (last << 24) // Overflow\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24)\n})\n\nBuffer.prototype.readBigInt64BE = defineBigIntMethod(function readBigInt64BE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const val = (first << 24) + // Overflow\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset]\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last)\n})\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUintLE =\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n let mul = 1\n let i = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUintBE =\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n let i = byteLength - 1\n let mul = 1\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUint8 =\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeUint16LE =\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeUint16BE =\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeUint32LE =\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset + 3] = (value >>> 24)\n this[offset + 2] = (value >>> 16)\n this[offset + 1] = (value >>> 8)\n this[offset] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeUint32BE =\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nfunction wrtBigUInt64LE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7)\n\n let lo = Number(value & BigInt(0xffffffff))\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n return offset\n}\n\nfunction wrtBigUInt64BE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7)\n\n let lo = Number(value & BigInt(0xffffffff))\n buf[offset + 7] = lo\n lo = lo >> 8\n buf[offset + 6] = lo\n lo = lo >> 8\n buf[offset + 5] = lo\n lo = lo >> 8\n buf[offset + 4] = lo\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n buf[offset + 3] = hi\n hi = hi >> 8\n buf[offset + 2] = hi\n hi = hi >> 8\n buf[offset + 1] = hi\n hi = hi >> 8\n buf[offset] = hi\n return offset + 8\n}\n\nBuffer.prototype.writeBigUInt64LE = defineBigIntMethod(function writeBigUInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeBigUInt64BE = defineBigIntMethod(function writeBigUInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n let i = 0\n let mul = 1\n let sub = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n let i = byteLength - 1\n let mul = 1\n let sub = 0\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n if (value < 0) value = 0xff + value + 1\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n this[offset + 2] = (value >>> 16)\n this[offset + 3] = (value >>> 24)\n return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (value < 0) value = 0xffffffff + value + 1\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeBigInt64LE = defineBigIntMethod(function writeBigInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nBuffer.prototype.writeBigInt64BE = defineBigIntMethod(function writeBigInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n }\n ieee754.write(buf, value, offset, littleEndian, 23, 4)\n return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n }\n ieee754.write(buf, value, offset, littleEndian, 52, 8)\n return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n if (!Buffer.isBuffer(target)) throw new TypeError('argument should be a Buffer')\n if (!start) start = 0\n if (!end && end !== 0) end = this.length\n if (targetStart >= target.length) targetStart = target.length\n if (!targetStart) targetStart = 0\n if (end > 0 && end < start) end = start\n\n // Copy 0 bytes; we're done\n if (end === start) return 0\n if (target.length === 0 || this.length === 0) return 0\n\n // Fatal error conditions\n if (targetStart < 0) {\n throw new RangeError('targetStart out of bounds')\n }\n if (start < 0 || start >= this.length) throw new RangeError('Index out of range')\n if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n // Are we oob?\n if (end > this.length) end = this.length\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start\n }\n\n const len = end - start\n\n if (this === target && typeof Uint8Array.prototype.copyWithin === 'function') {\n // Use built-in when available, missing from IE11\n this.copyWithin(targetStart, start, end)\n } else {\n Uint8Array.prototype.set.call(\n target,\n this.subarray(start, end),\n targetStart\n )\n }\n\n return len\n}\n\n// Usage:\n// buffer.fill(number[, offset[, end]])\n// buffer.fill(buffer[, offset[, end]])\n// buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n // Handle string cases:\n if (typeof val === 'string') {\n if (typeof start === 'string') {\n encoding = start\n start = 0\n end = this.length\n } else if (typeof end === 'string') {\n encoding = end\n end = this.length\n }\n if (encoding !== undefined && typeof encoding !== 'string') {\n throw new TypeError('encoding must be a string')\n }\n if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n if (val.length === 1) {\n const code = val.charCodeAt(0)\n if ((encoding === 'utf8' && code < 128) ||\n encoding === 'latin1') {\n // Fast path: If `val` fits into a single byte, use that numeric value.\n val = code\n }\n }\n } else if (typeof val === 'number') {\n val = val & 255\n } else if (typeof val === 'boolean') {\n val = Number(val)\n }\n\n // Invalid ranges are not set to a default, so can range check early.\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError('Out of range index')\n }\n\n if (end <= start) {\n return this\n }\n\n start = start >>> 0\n end = end === undefined ? this.length : end >>> 0\n\n if (!val) val = 0\n\n let i\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val\n }\n } else {\n const bytes = Buffer.isBuffer(val)\n ? val\n : Buffer.from(val, encoding)\n const len = bytes.length\n if (len === 0) {\n throw new TypeError('The value \"' + val +\n '\" is invalid for argument \"value\"')\n }\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len]\n }\n }\n\n return this\n}\n\n// CUSTOM ERRORS\n// =============\n\n// Simplified versions from Node, changed for Buffer-only usage\nconst errors = {}\nfunction E (sym, getMessage, Base) {\n errors[sym] = class NodeError extends Base {\n constructor () {\n super()\n\n Object.defineProperty(this, 'message', {\n value: getMessage.apply(this, arguments),\n writable: true,\n configurable: true\n })\n\n // Add the error code to the name to include it in the stack trace.\n this.name = `${this.name} [${sym}]`\n // Access the stack to generate the error message including the error code\n // from the name.\n this.stack // eslint-disable-line no-unused-expressions\n // Reset the name to the actual name.\n delete this.name\n }\n\n get code () {\n return sym\n }\n\n set code (value) {\n Object.defineProperty(this, 'code', {\n configurable: true,\n enumerable: true,\n value,\n writable: true\n })\n }\n\n toString () {\n return `${this.name} [${sym}]: ${this.message}`\n }\n }\n}\n\nE('ERR_BUFFER_OUT_OF_BOUNDS',\n function (name) {\n if (name) {\n return `${name} is outside of buffer bounds`\n }\n\n return 'Attempt to access memory outside buffer bounds'\n }, RangeError)\nE('ERR_INVALID_ARG_TYPE',\n function (name, actual) {\n return `The \"${name}\" argument must be of type number. Received type ${typeof actual}`\n }, TypeError)\nE('ERR_OUT_OF_RANGE',\n function (str, range, input) {\n let msg = `The value of \"${str}\" is out of range.`\n let received = input\n if (Number.isInteger(input) && Math.abs(input) > 2 ** 32) {\n received = addNumericalSeparator(String(input))\n } else if (typeof input === 'bigint') {\n received = String(input)\n if (input > BigInt(2) ** BigInt(32) || input < -(BigInt(2) ** BigInt(32))) {\n received = addNumericalSeparator(received)\n }\n received += 'n'\n }\n msg += ` It must be ${range}. Received ${received}`\n return msg\n }, RangeError)\n\nfunction addNumericalSeparator (val) {\n let res = ''\n let i = val.length\n const start = val[0] === '-' ? 1 : 0\n for (; i >= start + 4; i -= 3) {\n res = `_${val.slice(i - 3, i)}${res}`\n }\n return `${val.slice(0, i)}${res}`\n}\n\n// CHECK FUNCTIONS\n// ===============\n\nfunction checkBounds (buf, offset, byteLength) {\n validateNumber(offset, 'offset')\n if (buf[offset] === undefined || buf[offset + byteLength] === undefined) {\n boundsError(offset, buf.length - (byteLength + 1))\n }\n}\n\nfunction checkIntBI (value, min, max, buf, offset, byteLength) {\n if (value > max || value < min) {\n const n = typeof min === 'bigint' ? 'n' : ''\n let range\n if (byteLength > 3) {\n if (min === 0 || min === BigInt(0)) {\n range = `>= 0${n} and < 2${n} ** ${(byteLength + 1) * 8}${n}`\n } else {\n range = `>= -(2${n} ** ${(byteLength + 1) * 8 - 1}${n}) and < 2 ** ` +\n `${(byteLength + 1) * 8 - 1}${n}`\n }\n } else {\n range = `>= ${min}${n} and <= ${max}${n}`\n }\n throw new errors.ERR_OUT_OF_RANGE('value', range, value)\n }\n checkBounds(buf, offset, byteLength)\n}\n\nfunction validateNumber (value, name) {\n if (typeof value !== 'number') {\n throw new errors.ERR_INVALID_ARG_TYPE(name, 'number', value)\n }\n}\n\nfunction boundsError (value, length, type) {\n if (Math.floor(value) !== value) {\n validateNumber(value, type)\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset', 'an integer', value)\n }\n\n if (length < 0) {\n throw new errors.ERR_BUFFER_OUT_OF_BOUNDS()\n }\n\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset',\n `>= ${type ? 1 : 0} and <= ${length}`,\n value)\n}\n\n// HELPER FUNCTIONS\n// ================\n\nconst INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n // Node takes equal signs as end of the Base64 encoding\n str = str.split('=')[0]\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = str.trim().replace(INVALID_BASE64_RE, '')\n // Node converts strings with length < 2 to ''\n if (str.length < 2) return ''\n // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n while (str.length % 4 !== 0) {\n str = str + '='\n }\n return str\n}\n\nfunction utf8ToBytes (string, units) {\n units = units || Infinity\n let codePoint\n const length = string.length\n let leadSurrogate = null\n const bytes = []\n\n for (let i = 0; i < length; ++i) {\n codePoint = string.charCodeAt(i)\n\n // is surrogate component\n if (codePoint > 0xD7FF && codePoint < 0xE000) {\n // last char was a lead\n if (!leadSurrogate) {\n // no lead yet\n if (codePoint > 0xDBFF) {\n // unexpected trail\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n } else if (i + 1 === length) {\n // unpaired lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n }\n\n // valid lead\n leadSurrogate = codePoint\n\n continue\n }\n\n // 2 leads in a row\n if (codePoint < 0xDC00) {\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n leadSurrogate = codePoint\n continue\n }\n\n // valid surrogate pair\n codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n } else if (leadSurrogate) {\n // valid bmp char, but last char was a lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n }\n\n leadSurrogate = null\n\n // encode utf8\n if (codePoint < 0x80) {\n if ((units -= 1) < 0) break\n bytes.push(codePoint)\n } else if (codePoint < 0x800) {\n if ((units -= 2) < 0) break\n bytes.push(\n codePoint >> 0x6 | 0xC0,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x10000) {\n if ((units -= 3) < 0) break\n bytes.push(\n codePoint >> 0xC | 0xE0,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x110000) {\n if ((units -= 4) < 0) break\n bytes.push(\n codePoint >> 0x12 | 0xF0,\n codePoint >> 0xC & 0x3F | 0x80,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else {\n throw new Error('Invalid code point')\n }\n }\n\n return bytes\n}\n\nfunction asciiToBytes (str) {\n const byteArray = []\n for (let i = 0; i < str.length; ++i) {\n // Node's code seems to be doing this and not & 0x7F..\n byteArray.push(str.charCodeAt(i) & 0xFF)\n }\n return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n let c, hi, lo\n const byteArray = []\n for (let i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0) break\n\n c = str.charCodeAt(i)\n hi = c >> 8\n lo = c % 256\n byteArray.push(lo)\n byteArray.push(hi)\n }\n\n return byteArray\n}\n\nfunction base64ToBytes (str) {\n return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n let i\n for (i = 0; i < length; ++i) {\n if ((i + offset >= dst.length) || (i >= src.length)) break\n dst[i + offset] = src[i]\n }\n return i\n}\n\n// ArrayBuffer or Uint8Array objects from other contexts (i.e. iframes) do not pass\n// the `instanceof` check but they should be treated as of that type.\n// See: https://github.com/feross/buffer/issues/166\nfunction isInstance (obj, type) {\n return obj instanceof type ||\n (obj != null && obj.constructor != null && obj.constructor.name != null &&\n obj.constructor.name === type.name)\n}\nfunction numberIsNaN (obj) {\n // For IE11 support\n return obj !== obj // eslint-disable-line no-self-compare\n}\n\n// Create lookup table for `toString('hex')`\n// See: https://github.com/feross/buffer/issues/219\nconst hexSliceLookupTable = (function () {\n const alphabet = '0123456789abcdef'\n const table = new Array(256)\n for (let i = 0; i < 16; ++i) {\n const i16 = i * 16\n for (let j = 0; j < 16; ++j) {\n table[i16 + j] = alphabet[i] + alphabet[j]\n }\n }\n return table\n})()\n\n// Return not function with Error if BigInt not supported\nfunction defineBigIntMethod (fn) {\n return typeof BigInt === 'undefined' ? BufferBigIntNotDefined : fn\n}\n\nfunction BufferBigIntNotDefined () {\n throw new Error('BigInt not supported')\n}\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\nvar R = typeof Reflect === 'object' ? Reflect : null\nvar ReflectApply = R && typeof R.apply === 'function'\n ? R.apply\n : function ReflectApply(target, receiver, args) {\n return Function.prototype.apply.call(target, receiver, args);\n }\n\nvar ReflectOwnKeys\nif (R && typeof R.ownKeys === 'function') {\n ReflectOwnKeys = R.ownKeys\n} else if (Object.getOwnPropertySymbols) {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target)\n .concat(Object.getOwnPropertySymbols(target));\n };\n} else {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target);\n };\n}\n\nfunction ProcessEmitWarning(warning) {\n if (console && console.warn) console.warn(warning);\n}\n\nvar NumberIsNaN = Number.isNaN || function NumberIsNaN(value) {\n return value !== value;\n}\n\nfunction EventEmitter() {\n EventEmitter.init.call(this);\n}\nmodule.exports = EventEmitter;\nmodule.exports.once = once;\n\n// Backwards-compat with node 0.10.x\nEventEmitter.EventEmitter = EventEmitter;\n\nEventEmitter.prototype._events = undefined;\nEventEmitter.prototype._eventsCount = 0;\nEventEmitter.prototype._maxListeners = undefined;\n\n// By default EventEmitters will print a warning if more than 10 listeners are\n// added to it. This is a useful default which helps finding memory leaks.\nvar defaultMaxListeners = 10;\n\nfunction checkListener(listener) {\n if (typeof listener !== 'function') {\n throw new TypeError('The \"listener\" argument must be of type Function. Received type ' + typeof listener);\n }\n}\n\nObject.defineProperty(EventEmitter, 'defaultMaxListeners', {\n enumerable: true,\n get: function() {\n return defaultMaxListeners;\n },\n set: function(arg) {\n if (typeof arg !== 'number' || arg < 0 || NumberIsNaN(arg)) {\n throw new RangeError('The value of \"defaultMaxListeners\" is out of range. It must be a non-negative number. Received ' + arg + '.');\n }\n defaultMaxListeners = arg;\n }\n});\n\nEventEmitter.init = function() {\n\n if (this._events === undefined ||\n this._events === Object.getPrototypeOf(this)._events) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n }\n\n this._maxListeners = this._maxListeners || undefined;\n};\n\n// Obviously not all Emitters should be limited to 10. This function allows\n// that to be increased. Set to zero for unlimited.\nEventEmitter.prototype.setMaxListeners = function setMaxListeners(n) {\n if (typeof n !== 'number' || n < 0 || NumberIsNaN(n)) {\n throw new RangeError('The value of \"n\" is out of range. It must be a non-negative number. Received ' + n + '.');\n }\n this._maxListeners = n;\n return this;\n};\n\nfunction _getMaxListeners(that) {\n if (that._maxListeners === undefined)\n return EventEmitter.defaultMaxListeners;\n return that._maxListeners;\n}\n\nEventEmitter.prototype.getMaxListeners = function getMaxListeners() {\n return _getMaxListeners(this);\n};\n\nEventEmitter.prototype.emit = function emit(type) {\n var args = [];\n for (var i = 1; i < arguments.length; i++) args.push(arguments[i]);\n var doError = (type === 'error');\n\n var events = this._events;\n if (events !== undefined)\n doError = (doError && events.error === undefined);\n else if (!doError)\n return false;\n\n // If there is no 'error' event listener then throw.\n if (doError) {\n var er;\n if (args.length > 0)\n er = args[0];\n if (er instanceof Error) {\n // Note: The comments on the `throw` lines are intentional, they show\n // up in Node's output if this results in an unhandled exception.\n throw er; // Unhandled 'error' event\n }\n // At least give some kind of context to the user\n var err = new Error('Unhandled error.' + (er ? ' (' + er.message + ')' : ''));\n err.context = er;\n throw err; // Unhandled 'error' event\n }\n\n var handler = events[type];\n\n if (handler === undefined)\n return false;\n\n if (typeof handler === 'function') {\n ReflectApply(handler, this, args);\n } else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n ReflectApply(listeners[i], this, args);\n }\n\n return true;\n};\n\nfunction _addListener(target, type, listener, prepend) {\n var m;\n var events;\n var existing;\n\n checkListener(listener);\n\n events = target._events;\n if (events === undefined) {\n events = target._events = Object.create(null);\n target._eventsCount = 0;\n } else {\n // To avoid recursion in the case that type === \"newListener\"! Before\n // adding it to the listeners, first emit \"newListener\".\n if (events.newListener !== undefined) {\n target.emit('newListener', type,\n listener.listener ? listener.listener : listener);\n\n // Re-assign `events` because a newListener handler could have caused the\n // this._events to be assigned to a new object\n events = target._events;\n }\n existing = events[type];\n }\n\n if (existing === undefined) {\n // Optimize the case of one listener. Don't need the extra array object.\n existing = events[type] = listener;\n ++target._eventsCount;\n } else {\n if (typeof existing === 'function') {\n // Adding the second element, need to change to array.\n existing = events[type] =\n prepend ? [listener, existing] : [existing, listener];\n // If we've already got an array, just append.\n } else if (prepend) {\n existing.unshift(listener);\n } else {\n existing.push(listener);\n }\n\n // Check for listener leak\n m = _getMaxListeners(target);\n if (m > 0 && existing.length > m && !existing.warned) {\n existing.warned = true;\n // No error code for this since it is a Warning\n // eslint-disable-next-line no-restricted-syntax\n var w = new Error('Possible EventEmitter memory leak detected. ' +\n existing.length + ' ' + String(type) + ' listeners ' +\n 'added. Use emitter.setMaxListeners() to ' +\n 'increase limit');\n w.name = 'MaxListenersExceededWarning';\n w.emitter = target;\n w.type = type;\n w.count = existing.length;\n ProcessEmitWarning(w);\n }\n }\n\n return target;\n}\n\nEventEmitter.prototype.addListener = function addListener(type, listener) {\n return _addListener(this, type, listener, false);\n};\n\nEventEmitter.prototype.on = EventEmitter.prototype.addListener;\n\nEventEmitter.prototype.prependListener =\n function prependListener(type, listener) {\n return _addListener(this, type, listener, true);\n };\n\nfunction onceWrapper() {\n if (!this.fired) {\n this.target.removeListener(this.type, this.wrapFn);\n this.fired = true;\n if (arguments.length === 0)\n return this.listener.call(this.target);\n return this.listener.apply(this.target, arguments);\n }\n}\n\nfunction _onceWrap(target, type, listener) {\n var state = { fired: false, wrapFn: undefined, target: target, type: type, listener: listener };\n var wrapped = onceWrapper.bind(state);\n wrapped.listener = listener;\n state.wrapFn = wrapped;\n return wrapped;\n}\n\nEventEmitter.prototype.once = function once(type, listener) {\n checkListener(listener);\n this.on(type, _onceWrap(this, type, listener));\n return this;\n};\n\nEventEmitter.prototype.prependOnceListener =\n function prependOnceListener(type, listener) {\n checkListener(listener);\n this.prependListener(type, _onceWrap(this, type, listener));\n return this;\n };\n\n// Emits a 'removeListener' event if and only if the listener was removed.\nEventEmitter.prototype.removeListener =\n function removeListener(type, listener) {\n var list, events, position, i, originalListener;\n\n checkListener(listener);\n\n events = this._events;\n if (events === undefined)\n return this;\n\n list = events[type];\n if (list === undefined)\n return this;\n\n if (list === listener || list.listener === listener) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else {\n delete events[type];\n if (events.removeListener)\n this.emit('removeListener', type, list.listener || listener);\n }\n } else if (typeof list !== 'function') {\n position = -1;\n\n for (i = list.length - 1; i >= 0; i--) {\n if (list[i] === listener || list[i].listener === listener) {\n originalListener = list[i].listener;\n position = i;\n break;\n }\n }\n\n if (position < 0)\n return this;\n\n if (position === 0)\n list.shift();\n else {\n spliceOne(list, position);\n }\n\n if (list.length === 1)\n events[type] = list[0];\n\n if (events.removeListener !== undefined)\n this.emit('removeListener', type, originalListener || listener);\n }\n\n return this;\n };\n\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\n\nEventEmitter.prototype.removeAllListeners =\n function removeAllListeners(type) {\n var listeners, events, i;\n\n events = this._events;\n if (events === undefined)\n return this;\n\n // not listening for removeListener, no need to emit\n if (events.removeListener === undefined) {\n if (arguments.length === 0) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n } else if (events[type] !== undefined) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else\n delete events[type];\n }\n return this;\n }\n\n // emit removeListener for all listeners on all events\n if (arguments.length === 0) {\n var keys = Object.keys(events);\n var key;\n for (i = 0; i < keys.length; ++i) {\n key = keys[i];\n if (key === 'removeListener') continue;\n this.removeAllListeners(key);\n }\n this.removeAllListeners('removeListener');\n this._events = Object.create(null);\n this._eventsCount = 0;\n return this;\n }\n\n listeners = events[type];\n\n if (typeof listeners === 'function') {\n this.removeListener(type, listeners);\n } else if (listeners !== undefined) {\n // LIFO order\n for (i = listeners.length - 1; i >= 0; i--) {\n this.removeListener(type, listeners[i]);\n }\n }\n\n return this;\n };\n\nfunction _listeners(target, type, unwrap) {\n var events = target._events;\n\n if (events === undefined)\n return [];\n\n var evlistener = events[type];\n if (evlistener === undefined)\n return [];\n\n if (typeof evlistener === 'function')\n return unwrap ? [evlistener.listener || evlistener] : [evlistener];\n\n return unwrap ?\n unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length);\n}\n\nEventEmitter.prototype.listeners = function listeners(type) {\n return _listeners(this, type, true);\n};\n\nEventEmitter.prototype.rawListeners = function rawListeners(type) {\n return _listeners(this, type, false);\n};\n\nEventEmitter.listenerCount = function(emitter, type) {\n if (typeof emitter.listenerCount === 'function') {\n return emitter.listenerCount(type);\n } else {\n return listenerCount.call(emitter, type);\n }\n};\n\nEventEmitter.prototype.listenerCount = listenerCount;\nfunction listenerCount(type) {\n var events = this._events;\n\n if (events !== undefined) {\n var evlistener = events[type];\n\n if (typeof evlistener === 'function') {\n return 1;\n } else if (evlistener !== undefined) {\n return evlistener.length;\n }\n }\n\n return 0;\n}\n\nEventEmitter.prototype.eventNames = function eventNames() {\n return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : [];\n};\n\nfunction arrayClone(arr, n) {\n var copy = new Array(n);\n for (var i = 0; i < n; ++i)\n copy[i] = arr[i];\n return copy;\n}\n\nfunction spliceOne(list, index) {\n for (; index + 1 < list.length; index++)\n list[index] = list[index + 1];\n list.pop();\n}\n\nfunction unwrapListeners(arr) {\n var ret = new Array(arr.length);\n for (var i = 0; i < ret.length; ++i) {\n ret[i] = arr[i].listener || arr[i];\n }\n return ret;\n}\n\nfunction once(emitter, name) {\n return new Promise(function (resolve, reject) {\n function errorListener(err) {\n emitter.removeListener(name, resolver);\n reject(err);\n }\n\n function resolver() {\n if (typeof emitter.removeListener === 'function') {\n emitter.removeListener('error', errorListener);\n }\n resolve([].slice.call(arguments));\n };\n\n eventTargetAgnosticAddListener(emitter, name, resolver, { once: true });\n if (name !== 'error') {\n addErrorHandlerIfEventEmitter(emitter, errorListener, { once: true });\n }\n });\n}\n\nfunction addErrorHandlerIfEventEmitter(emitter, handler, flags) {\n if (typeof emitter.on === 'function') {\n eventTargetAgnosticAddListener(emitter, 'error', handler, flags);\n }\n}\n\nfunction eventTargetAgnosticAddListener(emitter, name, listener, flags) {\n if (typeof emitter.on === 'function') {\n if (flags.once) {\n emitter.once(name, listener);\n } else {\n emitter.on(name, listener);\n }\n } else if (typeof emitter.addEventListener === 'function') {\n // EventTarget does not have `error` event semantics like Node\n // EventEmitters, we do not listen for `error` events here.\n emitter.addEventListener(name, function wrapListener(arg) {\n // IE does not have builtin `{ once: true }` support so we\n // have to do it manually.\n if (flags.once) {\n emitter.removeEventListener(name, wrapListener);\n }\n listener(arg);\n });\n } else {\n throw new TypeError('The \"emitter\" argument must be of type EventEmitter. Received type ' + typeof emitter);\n }\n}\n","/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */\nexports.read = function (buffer, offset, isLE, mLen, nBytes) {\n var e, m\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var nBits = -7\n var i = isLE ? (nBytes - 1) : 0\n var d = isLE ? -1 : 1\n var s = buffer[offset + i]\n\n i += d\n\n e = s & ((1 << (-nBits)) - 1)\n s >>= (-nBits)\n nBits += eLen\n for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & ((1 << (-nBits)) - 1)\n e >>= (-nBits)\n nBits += mLen\n for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias\n } else if (e === eMax) {\n return m ? NaN : ((s ? -1 : 1) * Infinity)\n } else {\n m = m + Math.pow(2, mLen)\n e = e - eBias\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n var i = isLE ? 0 : (nBytes - 1)\n var d = isLE ? 1 : -1\n var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n value = Math.abs(value)\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0\n e = eMax\n } else {\n e = Math.floor(Math.log(value) / Math.LN2)\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--\n c *= 2\n }\n if (e + eBias >= 1) {\n value += rt / c\n } else {\n value += rt * Math.pow(2, 1 - eBias)\n }\n if (value * c >= 2) {\n e++\n c /= 2\n }\n\n if (e + eBias >= eMax) {\n m = 0\n e = eMax\n } else if (e + eBias >= 1) {\n m = ((value * c) - 1) * Math.pow(2, mLen)\n e = e + eBias\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n e = 0\n }\n }\n\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n e = (e << mLen) | m\n eLen += mLen\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128\n}\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView');\n\nmodule.exports = DataView;\n","var hashClear = require('./_hashClear'),\n hashDelete = require('./_hashDelete'),\n hashGet = require('./_hashGet'),\n hashHas = require('./_hashHas'),\n hashSet = require('./_hashSet');\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\nmodule.exports = Hash;\n","var listCacheClear = require('./_listCacheClear'),\n listCacheDelete = require('./_listCacheDelete'),\n listCacheGet = require('./_listCacheGet'),\n listCacheHas = require('./_listCacheHas'),\n listCacheSet = require('./_listCacheSet');\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\nmodule.exports = ListCache;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map');\n\nmodule.exports = Map;\n","var mapCacheClear = require('./_mapCacheClear'),\n mapCacheDelete = require('./_mapCacheDelete'),\n mapCacheGet = require('./_mapCacheGet'),\n mapCacheHas = require('./_mapCacheHas'),\n mapCacheSet = require('./_mapCacheSet');\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\nmodule.exports = MapCache;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Promise = getNative(root, 'Promise');\n\nmodule.exports = Promise;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Set = getNative(root, 'Set');\n\nmodule.exports = Set;\n","var MapCache = require('./_MapCache'),\n setCacheAdd = require('./_setCacheAdd'),\n setCacheHas = require('./_setCacheHas');\n\n/**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\nfunction SetCache(values) {\n var index = -1,\n length = values == null ? 0 : values.length;\n\n this.__data__ = new MapCache;\n while (++index < length) {\n this.add(values[index]);\n }\n}\n\n// Add methods to `SetCache`.\nSetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\nSetCache.prototype.has = setCacheHas;\n\nmodule.exports = SetCache;\n","var ListCache = require('./_ListCache'),\n stackClear = require('./_stackClear'),\n stackDelete = require('./_stackDelete'),\n stackGet = require('./_stackGet'),\n stackHas = require('./_stackHas'),\n stackSet = require('./_stackSet');\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\nmodule.exports = Stack;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Uint8Array = root.Uint8Array;\n\nmodule.exports = Uint8Array;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar WeakMap = getNative(root, 'WeakMap');\n\nmodule.exports = WeakMap;\n","/**\n * A specialized version of `_.forEach` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\nfunction arrayEach(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (iteratee(array[index], index, array) === false) {\n break;\n }\n }\n return array;\n}\n\nmodule.exports = arrayEach;\n","/**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\nfunction arrayFilter(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result[resIndex++] = value;\n }\n }\n return result;\n}\n\nmodule.exports = arrayFilter;\n","var baseTimes = require('./_baseTimes'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isIndex = require('./_isIndex'),\n isTypedArray = require('./isTypedArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = arrayLikeKeys;\n","/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n}\n\nmodule.exports = arrayPush;\n","/**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\nfunction arraySome(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (predicate(array[index], index, array)) {\n return true;\n }\n }\n return false;\n}\n\nmodule.exports = arraySome;\n","var baseAssignValue = require('./_baseAssignValue'),\n eq = require('./eq');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\nmodule.exports = assignValue;\n","var eq = require('./eq');\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\nmodule.exports = assocIndexOf;\n","var copyObject = require('./_copyObject'),\n keys = require('./keys');\n\n/**\n * The base implementation of `_.assign` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssign(object, source) {\n return object && copyObject(source, keys(source), object);\n}\n\nmodule.exports = baseAssign;\n","var copyObject = require('./_copyObject'),\n keysIn = require('./keysIn');\n\n/**\n * The base implementation of `_.assignIn` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssignIn(object, source) {\n return object && copyObject(source, keysIn(source), object);\n}\n\nmodule.exports = baseAssignIn;\n","var defineProperty = require('./_defineProperty');\n\n/**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction baseAssignValue(object, key, value) {\n if (key == '__proto__' && defineProperty) {\n defineProperty(object, key, {\n 'configurable': true,\n 'enumerable': true,\n 'value': value,\n 'writable': true\n });\n } else {\n object[key] = value;\n }\n}\n\nmodule.exports = baseAssignValue;\n","var Stack = require('./_Stack'),\n arrayEach = require('./_arrayEach'),\n assignValue = require('./_assignValue'),\n baseAssign = require('./_baseAssign'),\n baseAssignIn = require('./_baseAssignIn'),\n cloneBuffer = require('./_cloneBuffer'),\n copyArray = require('./_copyArray'),\n copySymbols = require('./_copySymbols'),\n copySymbolsIn = require('./_copySymbolsIn'),\n getAllKeys = require('./_getAllKeys'),\n getAllKeysIn = require('./_getAllKeysIn'),\n getTag = require('./_getTag'),\n initCloneArray = require('./_initCloneArray'),\n initCloneByTag = require('./_initCloneByTag'),\n initCloneObject = require('./_initCloneObject'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isMap = require('./isMap'),\n isObject = require('./isObject'),\n isSet = require('./isSet'),\n keys = require('./keys'),\n keysIn = require('./keysIn');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_FLAT_FLAG = 2,\n CLONE_SYMBOLS_FLAG = 4;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values supported by `_.clone`. */\nvar cloneableTags = {};\ncloneableTags[argsTag] = cloneableTags[arrayTag] =\ncloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =\ncloneableTags[boolTag] = cloneableTags[dateTag] =\ncloneableTags[float32Tag] = cloneableTags[float64Tag] =\ncloneableTags[int8Tag] = cloneableTags[int16Tag] =\ncloneableTags[int32Tag] = cloneableTags[mapTag] =\ncloneableTags[numberTag] = cloneableTags[objectTag] =\ncloneableTags[regexpTag] = cloneableTags[setTag] =\ncloneableTags[stringTag] = cloneableTags[symbolTag] =\ncloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =\ncloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;\ncloneableTags[errorTag] = cloneableTags[funcTag] =\ncloneableTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.clone` and `_.cloneDeep` which tracks\n * traversed objects.\n *\n * @private\n * @param {*} value The value to clone.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Deep clone\n * 2 - Flatten inherited properties\n * 4 - Clone symbols\n * @param {Function} [customizer] The function to customize cloning.\n * @param {string} [key] The key of `value`.\n * @param {Object} [object] The parent object of `value`.\n * @param {Object} [stack] Tracks traversed objects and their clone counterparts.\n * @returns {*} Returns the cloned value.\n */\nfunction baseClone(value, bitmask, customizer, key, object, stack) {\n var result,\n isDeep = bitmask & CLONE_DEEP_FLAG,\n isFlat = bitmask & CLONE_FLAT_FLAG,\n isFull = bitmask & CLONE_SYMBOLS_FLAG;\n\n if (customizer) {\n result = object ? customizer(value, key, object, stack) : customizer(value);\n }\n if (result !== undefined) {\n return result;\n }\n if (!isObject(value)) {\n return value;\n }\n var isArr = isArray(value);\n if (isArr) {\n result = initCloneArray(value);\n if (!isDeep) {\n return copyArray(value, result);\n }\n } else {\n var tag = getTag(value),\n isFunc = tag == funcTag || tag == genTag;\n\n if (isBuffer(value)) {\n return cloneBuffer(value, isDeep);\n }\n if (tag == objectTag || tag == argsTag || (isFunc && !object)) {\n result = (isFlat || isFunc) ? {} : initCloneObject(value);\n if (!isDeep) {\n return isFlat\n ? copySymbolsIn(value, baseAssignIn(result, value))\n : copySymbols(value, baseAssign(result, value));\n }\n } else {\n if (!cloneableTags[tag]) {\n return object ? value : {};\n }\n result = initCloneByTag(value, tag, isDeep);\n }\n }\n // Check for circular references and return its corresponding clone.\n stack || (stack = new Stack);\n var stacked = stack.get(value);\n if (stacked) {\n return stacked;\n }\n stack.set(value, result);\n\n if (isSet(value)) {\n value.forEach(function(subValue) {\n result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));\n });\n } else if (isMap(value)) {\n value.forEach(function(subValue, key) {\n result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n }\n\n var keysFunc = isFull\n ? (isFlat ? getAllKeysIn : getAllKeys)\n : (isFlat ? keysIn : keys);\n\n var props = isArr ? undefined : keysFunc(value);\n arrayEach(props || value, function(subValue, key) {\n if (props) {\n key = subValue;\n subValue = value[key];\n }\n // Recursively populate clone (susceptible to call stack limits).\n assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n return result;\n}\n\nmodule.exports = baseClone;\n","var isObject = require('./isObject');\n\n/** Built-in value references. */\nvar objectCreate = Object.create;\n\n/**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} proto The object to inherit from.\n * @returns {Object} Returns the new object.\n */\nvar baseCreate = (function() {\n function object() {}\n return function(proto) {\n if (!isObject(proto)) {\n return {};\n }\n if (objectCreate) {\n return objectCreate(proto);\n }\n object.prototype = proto;\n var result = new object;\n object.prototype = undefined;\n return result;\n };\n}());\n\nmodule.exports = baseCreate;\n","var arrayPush = require('./_arrayPush'),\n isArray = require('./isArray');\n\n/**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction baseGetAllKeys(object, keysFunc, symbolsFunc) {\n var result = keysFunc(object);\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n}\n\nmodule.exports = baseGetAllKeys;\n","var Symbol = require('./_Symbol'),\n getRawTag = require('./_getRawTag'),\n objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]';\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\nmodule.exports = baseIsArguments;\n","var baseIsEqualDeep = require('./_baseIsEqualDeep'),\n isObjectLike = require('./isObjectLike');\n\n/**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Unordered comparison\n * 2 - Partial comparison\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\nfunction baseIsEqual(value, other, bitmask, customizer, stack) {\n if (value === other) {\n return true;\n }\n if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\n return value !== value && other !== other;\n }\n return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n}\n\nmodule.exports = baseIsEqual;\n","var Stack = require('./_Stack'),\n equalArrays = require('./_equalArrays'),\n equalByTag = require('./_equalByTag'),\n equalObjects = require('./_equalObjects'),\n getTag = require('./_getTag'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isTypedArray = require('./isTypedArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n var objIsArr = isArray(object),\n othIsArr = isArray(other),\n objTag = objIsArr ? arrayTag : getTag(object),\n othTag = othIsArr ? arrayTag : getTag(other);\n\n objTag = objTag == argsTag ? objectTag : objTag;\n othTag = othTag == argsTag ? objectTag : othTag;\n\n var objIsObj = objTag == objectTag,\n othIsObj = othTag == objectTag,\n isSameTag = objTag == othTag;\n\n if (isSameTag && isBuffer(object)) {\n if (!isBuffer(other)) {\n return false;\n }\n objIsArr = true;\n objIsObj = false;\n }\n if (isSameTag && !objIsObj) {\n stack || (stack = new Stack);\n return (objIsArr || isTypedArray(object))\n ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n }\n if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n if (objIsWrapped || othIsWrapped) {\n var objUnwrapped = objIsWrapped ? object.value() : object,\n othUnwrapped = othIsWrapped ? other.value() : other;\n\n stack || (stack = new Stack);\n return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n }\n }\n if (!isSameTag) {\n return false;\n }\n stack || (stack = new Stack);\n return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n}\n\nmodule.exports = baseIsEqualDeep;\n","var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]';\n\n/**\n * The base implementation of `_.isMap` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n */\nfunction baseIsMap(value) {\n return isObjectLike(value) && getTag(value) == mapTag;\n}\n\nmodule.exports = baseIsMap;\n","var isFunction = require('./isFunction'),\n isMasked = require('./_isMasked'),\n isObject = require('./isObject'),\n toSource = require('./_toSource');\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\nmodule.exports = baseIsNative;\n","var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar setTag = '[object Set]';\n\n/**\n * The base implementation of `_.isSet` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n */\nfunction baseIsSet(value) {\n return isObjectLike(value) && getTag(value) == setTag;\n}\n\nmodule.exports = baseIsSet;\n","var baseGetTag = require('./_baseGetTag'),\n isLength = require('./isLength'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n\nmodule.exports = baseIsTypedArray;\n","var isPrototype = require('./_isPrototype'),\n nativeKeys = require('./_nativeKeys');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeys;\n","var isObject = require('./isObject'),\n isPrototype = require('./_isPrototype'),\n nativeKeysIn = require('./_nativeKeysIn');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeysIn(object) {\n if (!isObject(object)) {\n return nativeKeysIn(object);\n }\n var isProto = isPrototype(object),\n result = [];\n\n for (var key in object) {\n if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeysIn;\n","/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\nmodule.exports = baseTimes;\n","/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n return function(value) {\n return func(value);\n };\n}\n\nmodule.exports = baseUnary;\n","/**\n * Checks if a `cache` value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction cacheHas(cache, key) {\n return cache.has(key);\n}\n\nmodule.exports = cacheHas;\n","var Uint8Array = require('./_Uint8Array');\n\n/**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\nfunction cloneArrayBuffer(arrayBuffer) {\n var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n return result;\n}\n\nmodule.exports = cloneArrayBuffer;\n","var root = require('./_root');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined,\n allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;\n\n/**\n * Creates a clone of `buffer`.\n *\n * @private\n * @param {Buffer} buffer The buffer to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Buffer} Returns the cloned buffer.\n */\nfunction cloneBuffer(buffer, isDeep) {\n if (isDeep) {\n return buffer.slice();\n }\n var length = buffer.length,\n result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\n\n buffer.copy(result);\n return result;\n}\n\nmodule.exports = cloneBuffer;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer');\n\n/**\n * Creates a clone of `dataView`.\n *\n * @private\n * @param {Object} dataView The data view to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned data view.\n */\nfunction cloneDataView(dataView, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;\n return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);\n}\n\nmodule.exports = cloneDataView;\n","/** Used to match `RegExp` flags from their coerced string values. */\nvar reFlags = /\\w*$/;\n\n/**\n * Creates a clone of `regexp`.\n *\n * @private\n * @param {Object} regexp The regexp to clone.\n * @returns {Object} Returns the cloned regexp.\n */\nfunction cloneRegExp(regexp) {\n var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));\n result.lastIndex = regexp.lastIndex;\n return result;\n}\n\nmodule.exports = cloneRegExp;\n","var Symbol = require('./_Symbol');\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * Creates a clone of the `symbol` object.\n *\n * @private\n * @param {Object} symbol The symbol object to clone.\n * @returns {Object} Returns the cloned symbol object.\n */\nfunction cloneSymbol(symbol) {\n return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};\n}\n\nmodule.exports = cloneSymbol;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer');\n\n/**\n * Creates a clone of `typedArray`.\n *\n * @private\n * @param {Object} typedArray The typed array to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned typed array.\n */\nfunction cloneTypedArray(typedArray, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n}\n\nmodule.exports = cloneTypedArray;\n","/**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\nfunction copyArray(source, array) {\n var index = -1,\n length = source.length;\n\n array || (array = Array(length));\n while (++index < length) {\n array[index] = source[index];\n }\n return array;\n}\n\nmodule.exports = copyArray;\n","var assignValue = require('./_assignValue'),\n baseAssignValue = require('./_baseAssignValue');\n\n/**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\nfunction copyObject(source, props, object, customizer) {\n var isNew = !object;\n object || (object = {});\n\n var index = -1,\n length = props.length;\n\n while (++index < length) {\n var key = props[index];\n\n var newValue = customizer\n ? customizer(object[key], source[key], key, object, source)\n : undefined;\n\n if (newValue === undefined) {\n newValue = source[key];\n }\n if (isNew) {\n baseAssignValue(object, key, newValue);\n } else {\n assignValue(object, key, newValue);\n }\n }\n return object;\n}\n\nmodule.exports = copyObject;\n","var copyObject = require('./_copyObject'),\n getSymbols = require('./_getSymbols');\n\n/**\n * Copies own symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbols(source, object) {\n return copyObject(source, getSymbols(source), object);\n}\n\nmodule.exports = copySymbols;\n","var copyObject = require('./_copyObject'),\n getSymbolsIn = require('./_getSymbolsIn');\n\n/**\n * Copies own and inherited symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbolsIn(source, object) {\n return copyObject(source, getSymbolsIn(source), object);\n}\n\nmodule.exports = copySymbolsIn;\n","var root = require('./_root');\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\nmodule.exports = coreJsData;\n","var getNative = require('./_getNative');\n\nvar defineProperty = (function() {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n}());\n\nmodule.exports = defineProperty;\n","var SetCache = require('./_SetCache'),\n arraySome = require('./_arraySome'),\n cacheHas = require('./_cacheHas');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\nfunction equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n arrLength = array.length,\n othLength = other.length;\n\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n return false;\n }\n // Check that cyclic values are equal.\n var arrStacked = stack.get(array);\n var othStacked = stack.get(other);\n if (arrStacked && othStacked) {\n return arrStacked == other && othStacked == array;\n }\n var index = -1,\n result = true,\n seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n stack.set(array, other);\n stack.set(other, array);\n\n // Ignore non-index properties.\n while (++index < arrLength) {\n var arrValue = array[index],\n othValue = other[index];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, arrValue, index, other, array, stack)\n : customizer(arrValue, othValue, index, array, other, stack);\n }\n if (compared !== undefined) {\n if (compared) {\n continue;\n }\n result = false;\n break;\n }\n // Recursively compare arrays (susceptible to call stack limits).\n if (seen) {\n if (!arraySome(other, function(othValue, othIndex) {\n if (!cacheHas(seen, othIndex) &&\n (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n return seen.push(othIndex);\n }\n })) {\n result = false;\n break;\n }\n } else if (!(\n arrValue === othValue ||\n equalFunc(arrValue, othValue, bitmask, customizer, stack)\n )) {\n result = false;\n break;\n }\n }\n stack['delete'](array);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalArrays;\n","var Symbol = require('./_Symbol'),\n Uint8Array = require('./_Uint8Array'),\n eq = require('./eq'),\n equalArrays = require('./_equalArrays'),\n mapToArray = require('./_mapToArray'),\n setToArray = require('./_setToArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]';\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n switch (tag) {\n case dataViewTag:\n if ((object.byteLength != other.byteLength) ||\n (object.byteOffset != other.byteOffset)) {\n return false;\n }\n object = object.buffer;\n other = other.buffer;\n\n case arrayBufferTag:\n if ((object.byteLength != other.byteLength) ||\n !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n return false;\n }\n return true;\n\n case boolTag:\n case dateTag:\n case numberTag:\n // Coerce booleans to `1` or `0` and dates to milliseconds.\n // Invalid dates are coerced to `NaN`.\n return eq(+object, +other);\n\n case errorTag:\n return object.name == other.name && object.message == other.message;\n\n case regexpTag:\n case stringTag:\n // Coerce regexes to strings and treat strings, primitives and objects,\n // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n // for more details.\n return object == (other + '');\n\n case mapTag:\n var convert = mapToArray;\n\n case setTag:\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n convert || (convert = setToArray);\n\n if (object.size != other.size && !isPartial) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked) {\n return stacked == other;\n }\n bitmask |= COMPARE_UNORDERED_FLAG;\n\n // Recursively compare objects (susceptible to call stack limits).\n stack.set(object, other);\n var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n stack['delete'](object);\n return result;\n\n case symbolTag:\n if (symbolValueOf) {\n return symbolValueOf.call(object) == symbolValueOf.call(other);\n }\n }\n return false;\n}\n\nmodule.exports = equalByTag;\n","var getAllKeys = require('./_getAllKeys');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n objProps = getAllKeys(object),\n objLength = objProps.length,\n othProps = getAllKeys(other),\n othLength = othProps.length;\n\n if (objLength != othLength && !isPartial) {\n return false;\n }\n var index = objLength;\n while (index--) {\n var key = objProps[index];\n if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n return false;\n }\n }\n // Check that cyclic values are equal.\n var objStacked = stack.get(object);\n var othStacked = stack.get(other);\n if (objStacked && othStacked) {\n return objStacked == other && othStacked == object;\n }\n var result = true;\n stack.set(object, other);\n stack.set(other, object);\n\n var skipCtor = isPartial;\n while (++index < objLength) {\n key = objProps[index];\n var objValue = object[key],\n othValue = other[key];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, objValue, key, other, object, stack)\n : customizer(objValue, othValue, key, object, other, stack);\n }\n // Recursively compare objects (susceptible to call stack limits).\n if (!(compared === undefined\n ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n : compared\n )) {\n result = false;\n break;\n }\n skipCtor || (skipCtor = key == 'constructor');\n }\n if (result && !skipCtor) {\n var objCtor = object.constructor,\n othCtor = other.constructor;\n\n // Non `Object` object instances with different constructors are not equal.\n if (objCtor != othCtor &&\n ('constructor' in object && 'constructor' in other) &&\n !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n result = false;\n }\n }\n stack['delete'](object);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalObjects;\n","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n","var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbols = require('./_getSymbols'),\n keys = require('./keys');\n\n/**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeys(object) {\n return baseGetAllKeys(object, keys, getSymbols);\n}\n\nmodule.exports = getAllKeys;\n","var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbolsIn = require('./_getSymbolsIn'),\n keysIn = require('./keysIn');\n\n/**\n * Creates an array of own and inherited enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeysIn(object) {\n return baseGetAllKeys(object, keysIn, getSymbolsIn);\n}\n\nmodule.exports = getAllKeysIn;\n","var isKeyable = require('./_isKeyable');\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\nmodule.exports = getMapData;\n","var baseIsNative = require('./_baseIsNative'),\n getValue = require('./_getValue');\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\nmodule.exports = getNative;\n","var overArg = require('./_overArg');\n\n/** Built-in value references. */\nvar getPrototype = overArg(Object.getPrototypeOf, Object);\n\nmodule.exports = getPrototype;\n","var Symbol = require('./_Symbol');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nmodule.exports = getRawTag;\n","var arrayFilter = require('./_arrayFilter'),\n stubArray = require('./stubArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n if (object == null) {\n return [];\n }\n object = Object(object);\n return arrayFilter(nativeGetSymbols(object), function(symbol) {\n return propertyIsEnumerable.call(object, symbol);\n });\n};\n\nmodule.exports = getSymbols;\n","var arrayPush = require('./_arrayPush'),\n getPrototype = require('./_getPrototype'),\n getSymbols = require('./_getSymbols'),\n stubArray = require('./stubArray');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own and inherited enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {\n var result = [];\n while (object) {\n arrayPush(result, getSymbols(object));\n object = getPrototype(object);\n }\n return result;\n};\n\nmodule.exports = getSymbolsIn;\n","var DataView = require('./_DataView'),\n Map = require('./_Map'),\n Promise = require('./_Promise'),\n Set = require('./_Set'),\n WeakMap = require('./_WeakMap'),\n baseGetTag = require('./_baseGetTag'),\n toSource = require('./_toSource');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n setTag = '[object Set]',\n weakMapTag = '[object WeakMap]';\n\nvar dataViewTag = '[object DataView]';\n\n/** Used to detect maps, sets, and weakmaps. */\nvar dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nvar getTag = baseGetTag;\n\n// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\nif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = baseGetTag(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : '';\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n}\n\nmodule.exports = getTag;\n","/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\nmodule.exports = getValue;\n","var nativeCreate = require('./_nativeCreate');\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n}\n\nmodule.exports = hashClear;\n","/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = hashDelete;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\nmodule.exports = hashGet;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\nmodule.exports = hashHas;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\nmodule.exports = hashSet;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Initializes an array clone.\n *\n * @private\n * @param {Array} array The array to clone.\n * @returns {Array} Returns the initialized clone.\n */\nfunction initCloneArray(array) {\n var length = array.length,\n result = new array.constructor(length);\n\n // Add properties assigned by `RegExp#exec`.\n if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {\n result.index = array.index;\n result.input = array.input;\n }\n return result;\n}\n\nmodule.exports = initCloneArray;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer'),\n cloneDataView = require('./_cloneDataView'),\n cloneRegExp = require('./_cloneRegExp'),\n cloneSymbol = require('./_cloneSymbol'),\n cloneTypedArray = require('./_cloneTypedArray');\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/**\n * Initializes an object clone based on its `toStringTag`.\n *\n * **Note:** This function only supports cloning values with tags of\n * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.\n *\n * @private\n * @param {Object} object The object to clone.\n * @param {string} tag The `toStringTag` of the object to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneByTag(object, tag, isDeep) {\n var Ctor = object.constructor;\n switch (tag) {\n case arrayBufferTag:\n return cloneArrayBuffer(object);\n\n case boolTag:\n case dateTag:\n return new Ctor(+object);\n\n case dataViewTag:\n return cloneDataView(object, isDeep);\n\n case float32Tag: case float64Tag:\n case int8Tag: case int16Tag: case int32Tag:\n case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:\n return cloneTypedArray(object, isDeep);\n\n case mapTag:\n return new Ctor;\n\n case numberTag:\n case stringTag:\n return new Ctor(object);\n\n case regexpTag:\n return cloneRegExp(object);\n\n case setTag:\n return new Ctor;\n\n case symbolTag:\n return cloneSymbol(object);\n }\n}\n\nmodule.exports = initCloneByTag;\n","var baseCreate = require('./_baseCreate'),\n getPrototype = require('./_getPrototype'),\n isPrototype = require('./_isPrototype');\n\n/**\n * Initializes an object clone.\n *\n * @private\n * @param {Object} object The object to clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneObject(object) {\n return (typeof object.constructor == 'function' && !isPrototype(object))\n ? baseCreate(getPrototype(object))\n : {};\n}\n\nmodule.exports = initCloneObject;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n var type = typeof value;\n length = length == null ? MAX_SAFE_INTEGER : length;\n\n return !!length &&\n (type == 'number' ||\n (type != 'symbol' && reIsUint.test(value))) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\nmodule.exports = isIndex;\n","/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\nmodule.exports = isKeyable;\n","var coreJsData = require('./_coreJsData');\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\nmodule.exports = isMasked;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\nmodule.exports = isPrototype;\n","/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n}\n\nmodule.exports = listCacheClear;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype;\n\n/** Built-in value references. */\nvar splice = arrayProto.splice;\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n}\n\nmodule.exports = listCacheDelete;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\nmodule.exports = listCacheGet;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\nmodule.exports = listCacheHas;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\nmodule.exports = listCacheSet;\n","var Hash = require('./_Hash'),\n ListCache = require('./_ListCache'),\n Map = require('./_Map');\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\nmodule.exports = mapCacheClear;\n","var getMapData = require('./_getMapData');\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = mapCacheDelete;\n","var getMapData = require('./_getMapData');\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\nmodule.exports = mapCacheGet;\n","var getMapData = require('./_getMapData');\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\nmodule.exports = mapCacheHas;\n","var getMapData = require('./_getMapData');\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n}\n\nmodule.exports = mapCacheSet;\n","/**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\nfunction mapToArray(map) {\n var index = -1,\n result = Array(map.size);\n\n map.forEach(function(value, key) {\n result[++index] = [key, value];\n });\n return result;\n}\n\nmodule.exports = mapToArray;\n","var getNative = require('./_getNative');\n\n/* Built-in method references that are verified to be native. */\nvar nativeCreate = getNative(Object, 'create');\n\nmodule.exports = nativeCreate;\n","var overArg = require('./_overArg');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeKeys = overArg(Object.keys, Object);\n\nmodule.exports = nativeKeys;\n","/**\n * This function is like\n * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * except that it includes inherited enumerable properties.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction nativeKeysIn(object) {\n var result = [];\n if (object != null) {\n for (var key in Object(object)) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = nativeKeysIn;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n try {\n // Use `util.types` for Node.js 10+.\n var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n if (types) {\n return types;\n }\n\n // Legacy `process.binding('util')` for Node.js < 10.\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n}());\n\nmodule.exports = nodeUtil;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n","/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\nmodule.exports = overArg;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n","/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\nfunction setCacheAdd(value) {\n this.__data__.set(value, HASH_UNDEFINED);\n return this;\n}\n\nmodule.exports = setCacheAdd;\n","/**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\nfunction setCacheHas(value) {\n return this.__data__.has(value);\n}\n\nmodule.exports = setCacheHas;\n","/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\nfunction setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n}\n\nmodule.exports = setToArray;\n","var ListCache = require('./_ListCache');\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}\n\nmodule.exports = stackClear;\n","/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n var data = this.__data__,\n result = data['delete'](key);\n\n this.size = data.size;\n return result;\n}\n\nmodule.exports = stackDelete;\n","/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n return this.__data__.get(key);\n}\n\nmodule.exports = stackGet;\n","/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n return this.__data__.has(key);\n}\n\nmodule.exports = stackHas;\n","var ListCache = require('./_ListCache'),\n Map = require('./_Map'),\n MapCache = require('./_MapCache');\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n var data = this.__data__;\n if (data instanceof ListCache) {\n var pairs = data.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n this.size = ++data.size;\n return this;\n }\n data = this.__data__ = new MapCache(pairs);\n }\n data.set(key, value);\n this.size = data.size;\n return this;\n}\n\nmodule.exports = stackSet;\n","/** Used for built-in method references. */\nvar funcProto = Function.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\nmodule.exports = toSource;\n","var baseClone = require('./_baseClone');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_SYMBOLS_FLAG = 4;\n\n/**\n * This method is like `_.clone` except that it recursively clones `value`.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Lang\n * @param {*} value The value to recursively clone.\n * @returns {*} Returns the deep cloned value.\n * @see _.clone\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var deep = _.cloneDeep(objects);\n * console.log(deep[0] === objects[0]);\n * // => false\n */\nfunction cloneDeep(value) {\n return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);\n}\n\nmodule.exports = cloneDeep;\n","/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\nmodule.exports = eq;\n","var baseIsArguments = require('./_baseIsArguments'),\n isObjectLike = require('./isObjectLike');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n};\n\nmodule.exports = isArguments;\n","/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\nmodule.exports = isArray;\n","var isFunction = require('./isFunction'),\n isLength = require('./isLength');\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\nmodule.exports = isArrayLike;\n","var root = require('./_root'),\n stubFalse = require('./stubFalse');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\nmodule.exports = isBuffer;\n","var baseIsEqual = require('./_baseIsEqual');\n\n/**\n * Performs a deep comparison between two values to determine if they are\n * equivalent.\n *\n * **Note:** This method supports comparing arrays, array buffers, booleans,\n * date objects, error objects, maps, numbers, `Object` objects, regexes,\n * sets, strings, symbols, and typed arrays. `Object` objects are compared\n * by their own, not inherited, enumerable properties. Functions and DOM\n * nodes are compared by strict equality, i.e. `===`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.isEqual(object, other);\n * // => true\n *\n * object === other;\n * // => false\n */\nfunction isEqual(value, other) {\n return baseIsEqual(value, other);\n}\n\nmodule.exports = isEqual;\n","var baseGetTag = require('./_baseGetTag'),\n isObject = require('./isObject');\n\n/** `Object#toString` result references. */\nvar asyncTag = '[object AsyncFunction]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n proxyTag = '[object Proxy]';\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\nmodule.exports = isFunction;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\nmodule.exports = isLength;\n","var baseIsMap = require('./_baseIsMap'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsMap = nodeUtil && nodeUtil.isMap;\n\n/**\n * Checks if `value` is classified as a `Map` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n * @example\n *\n * _.isMap(new Map);\n * // => true\n *\n * _.isMap(new WeakMap);\n * // => false\n */\nvar isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;\n\nmodule.exports = isMap;\n","/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n","var baseIsSet = require('./_baseIsSet'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsSet = nodeUtil && nodeUtil.isSet;\n\n/**\n * Checks if `value` is classified as a `Set` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n * @example\n *\n * _.isSet(new Set);\n * // => true\n *\n * _.isSet(new WeakSet);\n * // => false\n */\nvar isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;\n\nmodule.exports = isSet;\n","var baseIsTypedArray = require('./_baseIsTypedArray'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\nmodule.exports = isTypedArray;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeys = require('./_baseKeys'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\nmodule.exports = keys;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeysIn = require('./_baseKeysIn'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\nfunction keysIn(object) {\n return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n}\n\nmodule.exports = keysIn;\n","/**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\nfunction stubArray() {\n return [];\n}\n\nmodule.exports = stubArray;\n","/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n return false;\n}\n\nmodule.exports = stubFalse;\n","import { connect, type BaseConnectionOptions } from \"@openfin/core-web\";\nimport { getSettings } from \"../platform/settings/settings\";\n\n/**\n * Initializes the OpenFin Web Broker connection.\n * @param inherit Should we inherit settings from the host (available in the OpenFin layout system) or use settings? Default is true.\n */\nexport async function init(inherit: boolean = true): Promise {\n\t// Set window.fin to the `fin` object.\n\tlet options: BaseConnectionOptions | undefined;\n\tif (window.fin === undefined) {\n\t\tif (!inherit) {\n\t\t\tconst settings = await getSettings();\n\t\t\tif (settings === undefined) {\n\t\t\t\tconsole.error(\n\t\t\t\t\t\"Unable to run the sample as we have been unable to load the web manifest and it's settings from the currently running html page. Please ensure that the web manifest is being served and that it contains the custom_settings section.\"\n\t\t\t\t);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\toptions = {\n\t\t\t\tbrokerUrl: settings.platform.interop.brokerUrl,\n\t\t\t\tinteropConfig: {\n\t\t\t\t\tproviderId: settings.platform.interop.providerId,\n\t\t\t\t\tcurrentContextGroup: settings.platform.interop.defaultContextGroup\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t\t// Specify an interopConfig with a specific provider ID and a context group to initialize the `fin.me.interop` client on connection.\n\t\tif (options) {\n\t\t\twindow.fin = await connect({\n\t\t\t\toptions\n\t\t\t});\n\t\t} else {\n\t\t\twindow.fin = await connect({\n\t\t\t\tconnectionInheritance: \"enabled\"\n\t\t\t});\n\t\t}\n\t\tconsole.log(\"Finished initializing the fin API.\");\n\t\t// Create and dispatch the finReady event\n\t\tconst event = new CustomEvent(\"finReady\");\n\t\twindow.dispatchEvent(event);\n\t}\n\n\tif (window.fdc3 === undefined && window?.fin?.me.interop?.getFDC3Sync !== undefined) {\n\t\twindow.fdc3 = fin.me.interop.getFDC3Sync(\"2.0\");\n\t\tconsole.log(\"Finished initializing the fdc3 API.\");\n\t\t// Create and dispatch the FDC3Ready event\n\t\tconst event = new CustomEvent(\"fdc3Ready\");\n\t\twindow.dispatchEvent(event);\n\t}\n}\n","import type { OpenFin } from \"@openfin/core\";\nimport type { ManifestSettings, Settings } from \"../../shapes/setting-shapes\";\n\n/**\n * Fetches the settings for the application.\n * @returns The settings for the application.\n */\nexport async function getSettings(): Promise {\n\tconst savedSettings = await getSavedSettings();\n\tif (savedSettings) {\n\t\treturn savedSettings;\n\t}\n\tconst settings = await getManifestSettings();\n\tif (!Array.isArray(settings?.endpointProvider?.endpoints)) {\n\t\tconsole.error(\n\t\t\t\"Unable to run the example as settings are required and we fetch them from the link web manifest from the html page that is being served. It should exist in the customSettings section of the web manifest.\"\n\t\t);\n\t\treturn;\n\t}\n\tconst settingsEndpoint = settings.endpointProvider.endpoints.find(\n\t\t(endpoint) => endpoint.id === \"platform-settings\"\n\t);\n\n\tif (\n\t\tsettingsEndpoint === undefined ||\n\t\tsettingsEndpoint.type !== \"fetch\" ||\n\t\tsettingsEndpoint.options.method !== \"GET\" ||\n\t\tsettingsEndpoint.options.url === undefined\n\t) {\n\t\tconsole.error(\n\t\t\t\"Unable to run the example as settings are required and we fetch them from the endpoint defined with the id: 'platform-settings' in the manifest. It needs to be of type fetch, performing a GET and it must have a url defined.\"\n\t\t);\n\t\treturn;\n\t}\n\tconst platformSettings = await fetch(settingsEndpoint?.options.url);\n\tconst settingsJson = (await platformSettings.json()) as Settings;\n\treturn settingsJson;\n}\n\n/**\n * Returns a default layout from the settings if provided.\n * @returns The default layout from the settings.\n */\nexport async function getDefaultLayout(): Promise {\n\tconst settings = await getSettings();\n\tif (settings?.platform?.layout?.defaultLayout === undefined) {\n\t\tconsole.error(\n\t\t\t\"Unable to run the example as without a layout being defined. Please ensure that settings have been provided in the web manifest.\"\n\t\t);\n\t\treturn;\n\t}\n\tif (typeof settings.platform.layout.defaultLayout === \"string\") {\n\t\tconst layoutResponse = await fetch(settings.platform.layout.defaultLayout);\n\t\tconst layoutJson = (await layoutResponse.json()) as OpenFin.LayoutSnapshot;\n\t\treturn layoutJson;\n\t}\n\treturn settings.platform.layout.defaultLayout;\n}\n\n/**\n * Returns the settings from the manifest file.\n * @returns customSettings for this example\n */\nasync function getManifestSettings(): Promise {\n\t// Get the manifest link\n\tconst link = document.querySelector('link[rel=\"manifest\"]');\n\tif (link !== null) {\n\t\tconst manifestResponse = await fetch(link.href);\n\t\tconst manifestJson = (await manifestResponse.json()) as { custom_settings: ManifestSettings };\n\t\treturn manifestJson.custom_settings;\n\t}\n}\n\n/**\n * Clears any saved settings.\n * @returns The saved settings.\n */\nexport async function clearSettings(): Promise {\n\tconst settingsId = getSavedSettingsId();\n\tlocalStorage.removeItem(settingsId);\n}\n\n/**\n * Saves the settings.\n * @param settings The settings to save.\n */\nexport async function saveSettings(settings: Settings): Promise {\n\tconst settingsId = getSavedSettingsId();\n\tlocalStorage.setItem(settingsId, JSON.stringify(settings));\n}\n\n/**\n * Retrieves saved settings from local storage.\n * @returns The saved settings.\n */\nasync function getSavedSettings(): Promise {\n\tconst settingsId = getSavedSettingsId();\n\tconst settings = localStorage.getItem(settingsId);\n\tif (settings !== null) {\n\t\treturn JSON.parse(settings);\n\t}\n}\n\n/**\n * Get the Id used for saving and fetching settings from storage.\n * @returns The settings id.\n */\nfunction getSavedSettingsId(): string {\n\tconst urlParams = new URLSearchParams(window.location.search);\n\tconst env = urlParams.get(\"env\");\n\n\tconst settingsKey = env ? `${env}-settings` : \"settings\";\n\treturn settingsKey;\n}\n","export { default as v1 } from './v1.js';\nexport { default as v3 } from './v3.js';\nexport { default as v4 } from './v4.js';\nexport { default as v5 } from './v5.js';\nexport { default as NIL } from './nil.js';\nexport { default as version } from './version.js';\nexport { default as validate } from './validate.js';\nexport { default as stringify } from './stringify.js';\nexport { default as parse } from './parse.js';","/*\n * Browser-compatible JavaScript MD5\n *\n * Modification of JavaScript MD5\n * https://github.com/blueimp/JavaScript-MD5\n *\n * Copyright 2011, Sebastian Tschan\n * https://blueimp.net\n *\n * Licensed under the MIT license:\n * https://opensource.org/licenses/MIT\n *\n * Based on\n * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message\n * Digest Algorithm, as defined in RFC 1321.\n * Version 2.2 Copyright (C) Paul Johnston 1999 - 2009\n * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet\n * Distributed under the BSD License\n * See http://pajhome.org.uk/crypt/md5 for more info.\n */\nfunction md5(bytes) {\n if (typeof bytes === 'string') {\n var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape\n\n bytes = new Uint8Array(msg.length);\n\n for (var i = 0; i < msg.length; ++i) {\n bytes[i] = msg.charCodeAt(i);\n }\n }\n\n return md5ToHexEncodedArray(wordsToMd5(bytesToWords(bytes), bytes.length * 8));\n}\n/*\n * Convert an array of little-endian words to an array of bytes\n */\n\n\nfunction md5ToHexEncodedArray(input) {\n var output = [];\n var length32 = input.length * 32;\n var hexTab = '0123456789abcdef';\n\n for (var i = 0; i < length32; i += 8) {\n var x = input[i >> 5] >>> i % 32 & 0xff;\n var hex = parseInt(hexTab.charAt(x >>> 4 & 0x0f) + hexTab.charAt(x & 0x0f), 16);\n output.push(hex);\n }\n\n return output;\n}\n/**\n * Calculate output length with padding and bit length\n */\n\n\nfunction getOutputLength(inputLength8) {\n return (inputLength8 + 64 >>> 9 << 4) + 14 + 1;\n}\n/*\n * Calculate the MD5 of an array of little-endian words, and a bit length.\n */\n\n\nfunction wordsToMd5(x, len) {\n /* append padding */\n x[len >> 5] |= 0x80 << len % 32;\n x[getOutputLength(len) - 1] = len;\n var a = 1732584193;\n var b = -271733879;\n var c = -1732584194;\n var d = 271733878;\n\n for (var i = 0; i < x.length; i += 16) {\n var olda = a;\n var oldb = b;\n var oldc = c;\n var oldd = d;\n a = md5ff(a, b, c, d, x[i], 7, -680876936);\n d = md5ff(d, a, b, c, x[i + 1], 12, -389564586);\n c = md5ff(c, d, a, b, x[i + 2], 17, 606105819);\n b = md5ff(b, c, d, a, x[i + 3], 22, -1044525330);\n a = md5ff(a, b, c, d, x[i + 4], 7, -176418897);\n d = md5ff(d, a, b, c, x[i + 5], 12, 1200080426);\n c = md5ff(c, d, a, b, x[i + 6], 17, -1473231341);\n b = md5ff(b, c, d, a, x[i + 7], 22, -45705983);\n a = md5ff(a, b, c, d, x[i + 8], 7, 1770035416);\n d = md5ff(d, a, b, c, x[i + 9], 12, -1958414417);\n c = md5ff(c, d, a, b, x[i + 10], 17, -42063);\n b = md5ff(b, c, d, a, x[i + 11], 22, -1990404162);\n a = md5ff(a, b, c, d, x[i + 12], 7, 1804603682);\n d = md5ff(d, a, b, c, x[i + 13], 12, -40341101);\n c = md5ff(c, d, a, b, x[i + 14], 17, -1502002290);\n b = md5ff(b, c, d, a, x[i + 15], 22, 1236535329);\n a = md5gg(a, b, c, d, x[i + 1], 5, -165796510);\n d = md5gg(d, a, b, c, x[i + 6], 9, -1069501632);\n c = md5gg(c, d, a, b, x[i + 11], 14, 643717713);\n b = md5gg(b, c, d, a, x[i], 20, -373897302);\n a = md5gg(a, b, c, d, x[i + 5], 5, -701558691);\n d = md5gg(d, a, b, c, x[i + 10], 9, 38016083);\n c = md5gg(c, d, a, b, x[i + 15], 14, -660478335);\n b = md5gg(b, c, d, a, x[i + 4], 20, -405537848);\n a = md5gg(a, b, c, d, x[i + 9], 5, 568446438);\n d = md5gg(d, a, b, c, x[i + 14], 9, -1019803690);\n c = md5gg(c, d, a, b, x[i + 3], 14, -187363961);\n b = md5gg(b, c, d, a, x[i + 8], 20, 1163531501);\n a = md5gg(a, b, c, d, x[i + 13], 5, -1444681467);\n d = md5gg(d, a, b, c, x[i + 2], 9, -51403784);\n c = md5gg(c, d, a, b, x[i + 7], 14, 1735328473);\n b = md5gg(b, c, d, a, x[i + 12], 20, -1926607734);\n a = md5hh(a, b, c, d, x[i + 5], 4, -378558);\n d = md5hh(d, a, b, c, x[i + 8], 11, -2022574463);\n c = md5hh(c, d, a, b, x[i + 11], 16, 1839030562);\n b = md5hh(b, c, d, a, x[i + 14], 23, -35309556);\n a = md5hh(a, b, c, d, x[i + 1], 4, -1530992060);\n d = md5hh(d, a, b, c, x[i + 4], 11, 1272893353);\n c = md5hh(c, d, a, b, x[i + 7], 16, -155497632);\n b = md5hh(b, c, d, a, x[i + 10], 23, -1094730640);\n a = md5hh(a, b, c, d, x[i + 13], 4, 681279174);\n d = md5hh(d, a, b, c, x[i], 11, -358537222);\n c = md5hh(c, d, a, b, x[i + 3], 16, -722521979);\n b = md5hh(b, c, d, a, x[i + 6], 23, 76029189);\n a = md5hh(a, b, c, d, x[i + 9], 4, -640364487);\n d = md5hh(d, a, b, c, x[i + 12], 11, -421815835);\n c = md5hh(c, d, a, b, x[i + 15], 16, 530742520);\n b = md5hh(b, c, d, a, x[i + 2], 23, -995338651);\n a = md5ii(a, b, c, d, x[i], 6, -198630844);\n d = md5ii(d, a, b, c, x[i + 7], 10, 1126891415);\n c = md5ii(c, d, a, b, x[i + 14], 15, -1416354905);\n b = md5ii(b, c, d, a, x[i + 5], 21, -57434055);\n a = md5ii(a, b, c, d, x[i + 12], 6, 1700485571);\n d = md5ii(d, a, b, c, x[i + 3], 10, -1894986606);\n c = md5ii(c, d, a, b, x[i + 10], 15, -1051523);\n b = md5ii(b, c, d, a, x[i + 1], 21, -2054922799);\n a = md5ii(a, b, c, d, x[i + 8], 6, 1873313359);\n d = md5ii(d, a, b, c, x[i + 15], 10, -30611744);\n c = md5ii(c, d, a, b, x[i + 6], 15, -1560198380);\n b = md5ii(b, c, d, a, x[i + 13], 21, 1309151649);\n a = md5ii(a, b, c, d, x[i + 4], 6, -145523070);\n d = md5ii(d, a, b, c, x[i + 11], 10, -1120210379);\n c = md5ii(c, d, a, b, x[i + 2], 15, 718787259);\n b = md5ii(b, c, d, a, x[i + 9], 21, -343485551);\n a = safeAdd(a, olda);\n b = safeAdd(b, oldb);\n c = safeAdd(c, oldc);\n d = safeAdd(d, oldd);\n }\n\n return [a, b, c, d];\n}\n/*\n * Convert an array bytes to an array of little-endian words\n * Characters >255 have their high-byte silently ignored.\n */\n\n\nfunction bytesToWords(input) {\n if (input.length === 0) {\n return [];\n }\n\n var length8 = input.length * 8;\n var output = new Uint32Array(getOutputLength(length8));\n\n for (var i = 0; i < length8; i += 8) {\n output[i >> 5] |= (input[i / 8] & 0xff) << i % 32;\n }\n\n return output;\n}\n/*\n * Add integers, wrapping at 2^32. This uses 16-bit operations internally\n * to work around bugs in some JS interpreters.\n */\n\n\nfunction safeAdd(x, y) {\n var lsw = (x & 0xffff) + (y & 0xffff);\n var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n return msw << 16 | lsw & 0xffff;\n}\n/*\n * Bitwise rotate a 32-bit number to the left.\n */\n\n\nfunction bitRotateLeft(num, cnt) {\n return num << cnt | num >>> 32 - cnt;\n}\n/*\n * These functions implement the four basic operations the algorithm uses.\n */\n\n\nfunction md5cmn(q, a, b, x, s, t) {\n return safeAdd(bitRotateLeft(safeAdd(safeAdd(a, q), safeAdd(x, t)), s), b);\n}\n\nfunction md5ff(a, b, c, d, x, s, t) {\n return md5cmn(b & c | ~b & d, a, b, x, s, t);\n}\n\nfunction md5gg(a, b, c, d, x, s, t) {\n return md5cmn(b & d | c & ~d, a, b, x, s, t);\n}\n\nfunction md5hh(a, b, c, d, x, s, t) {\n return md5cmn(b ^ c ^ d, a, b, x, s, t);\n}\n\nfunction md5ii(a, b, c, d, x, s, t) {\n return md5cmn(c ^ (b | ~d), a, b, x, s, t);\n}\n\nexport default md5;","export default '00000000-0000-0000-0000-000000000000';","import validate from './validate.js';\n\nfunction parse(uuid) {\n if (!validate(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n var v;\n var arr = new Uint8Array(16); // Parse ########-....-....-....-............\n\n arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24;\n arr[1] = v >>> 16 & 0xff;\n arr[2] = v >>> 8 & 0xff;\n arr[3] = v & 0xff; // Parse ........-####-....-....-............\n\n arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8;\n arr[5] = v & 0xff; // Parse ........-....-####-....-............\n\n arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8;\n arr[7] = v & 0xff; // Parse ........-....-....-####-............\n\n arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8;\n arr[9] = v & 0xff; // Parse ........-....-....-....-############\n // (Use \"/\" to avoid 32-bit truncation when bit-shifting high-order bytes)\n\n arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff;\n arr[11] = v / 0x100000000 & 0xff;\n arr[12] = v >>> 24 & 0xff;\n arr[13] = v >>> 16 & 0xff;\n arr[14] = v >>> 8 & 0xff;\n arr[15] = v & 0xff;\n return arr;\n}\n\nexport default parse;","export default /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;","// Unique ID creation requires a high quality random # generator. In the browser we therefore\n// require the crypto API and do not support built-in fallback to lower quality random number\n// generators (like Math.random()).\nvar getRandomValues;\nvar rnds8 = new Uint8Array(16);\nexport default function rng() {\n // lazy load so that environments that need to polyfill have a chance to do so\n if (!getRandomValues) {\n // getRandomValues needs to be invoked in a context where \"this\" is a Crypto implementation. Also,\n // find the complete implementation of crypto (msCrypto) on IE11.\n getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto !== 'undefined' && typeof msCrypto.getRandomValues === 'function' && msCrypto.getRandomValues.bind(msCrypto);\n\n if (!getRandomValues) {\n throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');\n }\n }\n\n return getRandomValues(rnds8);\n}","// Adapted from Chris Veness' SHA1 code at\n// http://www.movable-type.co.uk/scripts/sha1.html\nfunction f(s, x, y, z) {\n switch (s) {\n case 0:\n return x & y ^ ~x & z;\n\n case 1:\n return x ^ y ^ z;\n\n case 2:\n return x & y ^ x & z ^ y & z;\n\n case 3:\n return x ^ y ^ z;\n }\n}\n\nfunction ROTL(x, n) {\n return x << n | x >>> 32 - n;\n}\n\nfunction sha1(bytes) {\n var K = [0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xca62c1d6];\n var H = [0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0];\n\n if (typeof bytes === 'string') {\n var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape\n\n bytes = [];\n\n for (var i = 0; i < msg.length; ++i) {\n bytes.push(msg.charCodeAt(i));\n }\n } else if (!Array.isArray(bytes)) {\n // Convert Array-like to Array\n bytes = Array.prototype.slice.call(bytes);\n }\n\n bytes.push(0x80);\n var l = bytes.length / 4 + 2;\n var N = Math.ceil(l / 16);\n var M = new Array(N);\n\n for (var _i = 0; _i < N; ++_i) {\n var arr = new Uint32Array(16);\n\n for (var j = 0; j < 16; ++j) {\n arr[j] = bytes[_i * 64 + j * 4] << 24 | bytes[_i * 64 + j * 4 + 1] << 16 | bytes[_i * 64 + j * 4 + 2] << 8 | bytes[_i * 64 + j * 4 + 3];\n }\n\n M[_i] = arr;\n }\n\n M[N - 1][14] = (bytes.length - 1) * 8 / Math.pow(2, 32);\n M[N - 1][14] = Math.floor(M[N - 1][14]);\n M[N - 1][15] = (bytes.length - 1) * 8 & 0xffffffff;\n\n for (var _i2 = 0; _i2 < N; ++_i2) {\n var W = new Uint32Array(80);\n\n for (var t = 0; t < 16; ++t) {\n W[t] = M[_i2][t];\n }\n\n for (var _t = 16; _t < 80; ++_t) {\n W[_t] = ROTL(W[_t - 3] ^ W[_t - 8] ^ W[_t - 14] ^ W[_t - 16], 1);\n }\n\n var a = H[0];\n var b = H[1];\n var c = H[2];\n var d = H[3];\n var e = H[4];\n\n for (var _t2 = 0; _t2 < 80; ++_t2) {\n var s = Math.floor(_t2 / 20);\n var T = ROTL(a, 5) + f(s, b, c, d) + e + K[s] + W[_t2] >>> 0;\n e = d;\n d = c;\n c = ROTL(b, 30) >>> 0;\n b = a;\n a = T;\n }\n\n H[0] = H[0] + a >>> 0;\n H[1] = H[1] + b >>> 0;\n H[2] = H[2] + c >>> 0;\n H[3] = H[3] + d >>> 0;\n H[4] = H[4] + e >>> 0;\n }\n\n return [H[0] >> 24 & 0xff, H[0] >> 16 & 0xff, H[0] >> 8 & 0xff, H[0] & 0xff, H[1] >> 24 & 0xff, H[1] >> 16 & 0xff, H[1] >> 8 & 0xff, H[1] & 0xff, H[2] >> 24 & 0xff, H[2] >> 16 & 0xff, H[2] >> 8 & 0xff, H[2] & 0xff, H[3] >> 24 & 0xff, H[3] >> 16 & 0xff, H[3] >> 8 & 0xff, H[3] & 0xff, H[4] >> 24 & 0xff, H[4] >> 16 & 0xff, H[4] >> 8 & 0xff, H[4] & 0xff];\n}\n\nexport default sha1;","import validate from './validate.js';\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\n\nvar byteToHex = [];\n\nfor (var i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).substr(1));\n}\n\nfunction stringify(arr) {\n var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n var uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!validate(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n\n return uuid;\n}\n\nexport default stringify;","import rng from './rng.js';\nimport stringify from './stringify.js'; // **`v1()` - Generate time-based UUID**\n//\n// Inspired by https://github.com/LiosK/UUID.js\n// and http://docs.python.org/library/uuid.html\n\nvar _nodeId;\n\nvar _clockseq; // Previous uuid creation time\n\n\nvar _lastMSecs = 0;\nvar _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details\n\nfunction v1(options, buf, offset) {\n var i = buf && offset || 0;\n var b = buf || new Array(16);\n options = options || {};\n var node = options.node || _nodeId;\n var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not\n // specified. We do this lazily to minimize issues related to insufficient\n // system entropy. See #189\n\n if (node == null || clockseq == null) {\n var seedBytes = options.random || (options.rng || rng)();\n\n if (node == null) {\n // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)\n node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]];\n }\n\n if (clockseq == null) {\n // Per 4.2.2, randomize (14 bit) clockseq\n clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;\n }\n } // UUID timestamps are 100 nano-second units since the Gregorian epoch,\n // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so\n // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'\n // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.\n\n\n var msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock\n // cycle to simulate higher resolution clock\n\n var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs)\n\n var dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression\n\n if (dt < 0 && options.clockseq === undefined) {\n clockseq = clockseq + 1 & 0x3fff;\n } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new\n // time interval\n\n\n if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {\n nsecs = 0;\n } // Per 4.2.1.2 Throw error if too many uuids are requested\n\n\n if (nsecs >= 10000) {\n throw new Error(\"uuid.v1(): Can't create more than 10M uuids/sec\");\n }\n\n _lastMSecs = msecs;\n _lastNSecs = nsecs;\n _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch\n\n msecs += 12219292800000; // `time_low`\n\n var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;\n b[i++] = tl >>> 24 & 0xff;\n b[i++] = tl >>> 16 & 0xff;\n b[i++] = tl >>> 8 & 0xff;\n b[i++] = tl & 0xff; // `time_mid`\n\n var tmh = msecs / 0x100000000 * 10000 & 0xfffffff;\n b[i++] = tmh >>> 8 & 0xff;\n b[i++] = tmh & 0xff; // `time_high_and_version`\n\n b[i++] = tmh >>> 24 & 0xf | 0x10; // include version\n\n b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)\n\n b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low`\n\n b[i++] = clockseq & 0xff; // `node`\n\n for (var n = 0; n < 6; ++n) {\n b[i + n] = node[n];\n }\n\n return buf || stringify(b);\n}\n\nexport default v1;","import v35 from './v35.js';\nimport md5 from './md5.js';\nvar v3 = v35('v3', 0x30, md5);\nexport default v3;","import stringify from './stringify.js';\nimport parse from './parse.js';\n\nfunction stringToBytes(str) {\n str = unescape(encodeURIComponent(str)); // UTF8 escape\n\n var bytes = [];\n\n for (var i = 0; i < str.length; ++i) {\n bytes.push(str.charCodeAt(i));\n }\n\n return bytes;\n}\n\nexport var DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8';\nexport var URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8';\nexport default function (name, version, hashfunc) {\n function generateUUID(value, namespace, buf, offset) {\n if (typeof value === 'string') {\n value = stringToBytes(value);\n }\n\n if (typeof namespace === 'string') {\n namespace = parse(namespace);\n }\n\n if (namespace.length !== 16) {\n throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)');\n } // Compute hash of namespace and value, Per 4.3\n // Future: Use spread syntax when supported on all platforms, e.g. `bytes =\n // hashfunc([...namespace, ... value])`\n\n\n var bytes = new Uint8Array(16 + value.length);\n bytes.set(namespace);\n bytes.set(value, namespace.length);\n bytes = hashfunc(bytes);\n bytes[6] = bytes[6] & 0x0f | version;\n bytes[8] = bytes[8] & 0x3f | 0x80;\n\n if (buf) {\n offset = offset || 0;\n\n for (var i = 0; i < 16; ++i) {\n buf[offset + i] = bytes[i];\n }\n\n return buf;\n }\n\n return stringify(bytes);\n } // Function#name is not settable on some platforms (#270)\n\n\n try {\n generateUUID.name = name; // eslint-disable-next-line no-empty\n } catch (err) {} // For CommonJS default export support\n\n\n generateUUID.DNS = DNS;\n generateUUID.URL = URL;\n return generateUUID;\n}","import rng from './rng.js';\nimport stringify from './stringify.js';\n\nfunction v4(options, buf, offset) {\n options = options || {};\n var rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n offset = offset || 0;\n\n for (var i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n\n return buf;\n }\n\n return stringify(rnds);\n}\n\nexport default v4;","import v35 from './v35.js';\nimport sha1 from './sha1.js';\nvar v5 = v35('v5', 0x50, sha1);\nexport default v5;","import REGEX from './regex.js';\n\nfunction validate(uuid) {\n return typeof uuid === 'string' && REGEX.test(uuid);\n}\n\nexport default validate;","import validate from './validate.js';\n\nfunction version(uuid) {\n if (!validate(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n return parseInt(uuid.substr(14, 1), 16);\n}\n\nexport default version;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = (module) => {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","import type { Context } from \"@finos/fdc3\";\nimport { init } from \"./api\";\n\nwindow.addEventListener(\"DOMContentLoaded\", async () => {\n\tawait init(true);\n\tawait initializeDOM();\n});\n\n/**\n * Raise an intent using the interop API.\n */\nasync function raiseIntent(): Promise {\n\tif (window.fin !== undefined) {\n\t\tconst context = {\n\t\t\ttype: \"fdc3.contact\",\n\t\t\tname: \"Andy Young\",\n\t\t\tid: {\n\t\t\t\temail: \"andy.young@example.com\"\n\t\t\t}\n\t\t};\n\t\tconst intent = \"ViewContact\";\n\t\tconst intentRequest = {\n\t\t\tname: intent,\n\t\t\tcontext\n\t\t};\n\t\tconst intentResolver = await fin.me.interop.fireIntent(intentRequest);\n\t\tif (intentResolver !== undefined) {\n\t\t\tconsole.log(\"Intent resolver received:\", intentResolver);\n\t\t}\n\t}\n}\n\n/**\n * Adds an interop intent listener to the window.\n */\nasync function addIntentListener(): Promise {\n\tconst intent = \"ViewContact\";\n\tif (window.fin) {\n\t\tawait fin.me.interop.registerIntentHandler((passedIntent) => {\n\t\t\tconsole.log(`Received Context For Intent: ${passedIntent.name}`, passedIntent.context);\n\t\t\tupdateDOMElements(passedIntent.context);\n\t\t}, intent);\n\t} else {\n\t\twindow.addEventListener(\"finReady\", async () => {\n\t\t\tif (window.fin) {\n\t\t\t\tawait fin.me.interop.registerIntentHandler((passedIntent) => {\n\t\t\t\t\tconsole.log(`Received Context For Intent: ${passedIntent.name}`, passedIntent.context);\n\t\t\t\t\tupdateDOMElements(passedIntent.context);\n\t\t\t\t}, intent);\n\t\t\t}\n\t\t});\n\t}\n}\n\n/**\n * Updates the DOM elements with the provided context.\n * @param context The context to update the DOM elements with.\n */\nfunction updateDOMElements(context: Context): void {\n\tconst contextTypeSpan = document.querySelector(\"#contextType\");\n\tconst contextNameSpan = document.querySelector(\"#contextName\");\n\tconst contextBodyPre = document.querySelector(\"#contextBody\");\n\n\tif (contextTypeSpan !== null && contextNameSpan !== null && contextBodyPre !== null) {\n\t\tcontextTypeSpan.textContent = context.type;\n\t\tcontextNameSpan.textContent = context.name ?? \"No name provided.\";\n\t\tcontextBodyPre.textContent = JSON.stringify(context, null, 2);\n\t}\n}\n\n/**\n * Initialize the DOM elements.\n */\nasync function initializeDOM(): Promise {\n\tconst raiseIntentButton = document.querySelector(\"#raiseIntent\");\n\n\tif (raiseIntentButton !== null) {\n\t\traiseIntentButton.addEventListener(\"click\", async () => {\n\t\t\tawait raiseIntent();\n\t\t});\n\t}\n\n\tawait addIntentListener();\n}\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/web/v19.2.0/web-interop-support-context-and-intents/js/interop-view.bundle.js b/web/v19.2.0/web-interop-support-context-and-intents/js/interop-view.bundle.js index b5dd755..b7ac973 100644 --- a/web/v19.2.0/web-interop-support-context-and-intents/js/interop-view.bundle.js +++ b/web/v19.2.0/web-interop-support-context-and-intents/js/interop-view.bundle.js @@ -1,38 +1,38 @@ /******/ (() => { // webpackBootstrap /******/ var __webpack_modules__ = ({ -/***/ "./node_modules/@openfin/core-web/out/api-client.js": -/*!**********************************************************!*\ - !*** ./node_modules/@openfin/core-web/out/api-client.js ***! - \**********************************************************/ +/***/ "../../node_modules/@openfin/core-web/out/api-client.js": +/*!**************************************************************!*\ + !*** ../../node_modules/@openfin/core-web/out/api-client.js ***! + \**************************************************************/ /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; -var e=__webpack_require__(/*! ./main-8cad4070.js */ "./node_modules/@openfin/core-web/out/main-8cad4070.js");__webpack_require__(/*! buffer/ */ "../../node_modules/buffer/index.js"),__webpack_require__(/*! uuid */ "../../node_modules/uuid/dist/esm-browser/index.js"),__webpack_require__(/*! events */ "../../node_modules/events/events.js"),__webpack_require__(/*! lodash/cloneDeep */ "../../node_modules/lodash/cloneDeep.js"),__webpack_require__(/*! lodash/isEqual */ "../../node_modules/lodash/isEqual.js"),exports.connect=e.connect; +var e=__webpack_require__(/*! ./main-8cad4070.js */ "../../node_modules/@openfin/core-web/out/main-8cad4070.js");__webpack_require__(/*! buffer/ */ "../../node_modules/buffer/index.js"),__webpack_require__(/*! uuid */ "../../node_modules/uuid/dist/esm-browser/index.js"),__webpack_require__(/*! events */ "../../node_modules/events/events.js"),__webpack_require__(/*! lodash/cloneDeep */ "../../node_modules/lodash/cloneDeep.js"),__webpack_require__(/*! lodash/isEqual */ "../../node_modules/lodash/isEqual.js"),exports.connect=e.connect; /***/ }), -/***/ "./node_modules/@openfin/core-web/out/main-8cad4070.js": -/*!*************************************************************!*\ - !*** ./node_modules/@openfin/core-web/out/main-8cad4070.js ***! - \*************************************************************/ +/***/ "../../node_modules/@openfin/core-web/out/main-8cad4070.js": +/*!*****************************************************************!*\ + !*** ../../node_modules/@openfin/core-web/out/main-8cad4070.js ***! + \*****************************************************************/ /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; -var e=__webpack_require__(/*! buffer/ */ "../../node_modules/buffer/index.js"),t=__webpack_require__(/*! events */ "../../node_modules/events/events.js"),n=__webpack_require__(/*! lodash/cloneDeep */ "../../node_modules/lodash/cloneDeep.js"),i=__webpack_require__(/*! lodash/isEqual */ "../../node_modules/lodash/isEqual.js"),r=__webpack_require__(/*! uuid */ "../../node_modules/uuid/dist/esm-browser/index.js");const o=(e,t)=>`${t}<${btoa(JSON.stringify(e))}>`;var s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof __webpack_require__.g?__webpack_require__.g:"undefined"!=typeof self?self:{},a={},c={},d={},h={};async function l(e){const t=[];for(const n of e){const e=await n();t.push(e)}return t}Object.defineProperty(h,"__esModule",{value:!0}),h.promiseMapSerial=h.serial=h.promiseMap=h.promisify=void 0,h.promisify=function(e){return(...t)=>new Promise(((n,i)=>{e(...t,((e,t)=>e?i(e):n(t)))}))},h.promiseMap=async function(e,t){return Promise.all(e.map(t))},h.serial=l,h.promiseMapSerial=async function(e,t){return l(e.map(((e,n,i)=>()=>t(e,n,i))))};var u,p=s&&s.__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},w=s&&s.__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)};Object.defineProperty(d,"__esModule",{value:!0}),d.Reply=d.EmitterBase=d.Base=void 0;const y=h;class f{constructor(e){this.isNodeEnvironment=()=>"node"===this.wire.environment.type,this.isOpenFinEnvironment=()=>"openfin"===this.wire.environment.type,this.isBrowserEnvironment=()=>"other"===this.wire.environment.type,this.wire=e}get fin(){return this.wire.getFin()}get me(){return this.wire.me}}d.Base=f;d.EmitterBase=class extends f{constructor(e,t,...n){super(e),this.topic=t,u.set(this,void 0),this.eventNames=()=>this.hasEmitter()?this.getOrCreateEmitter().eventNames():[],this.emit=(e,t,...n)=>!!this.hasEmitter()&&this.getOrCreateEmitter().emit(e,t,...n),this.hasEmitter=()=>this.wire.eventAggregator.has(w(this,u,"f")),this.getOrCreateEmitter=()=>this.wire.eventAggregator.getOrCreate(w(this,u,"f")),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[],this.listenerCount=e=>this.hasEmitter()?this.getOrCreateEmitter().listenerCount(e):0,this.registerEventListener=async(e,t={},n,i)=>{const r={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e},o=this.getOrCreateEmitter();n(o);try{await this.wire.sendAction("subscribe-to-desktop-event",r)}catch(e){throw i(o),this.deleteEmitterIfNothingRegistered(o),e}},this.deregisterEventListener=async(e,t={})=>{if(this.hasEmitter()){const n={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e};await this.wire.sendAction("unsubscribe-to-desktop-event",n).catch((()=>null));return this.getOrCreateEmitter()}return Promise.resolve()},p(this,u,[t,...n],"f"),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[]}async on(e,t,n){return await this.registerEventListener(e,n,(n=>{n.on(e,t)}),(n=>{n.removeListener(e,t)})),this}async addListener(e,t,n){return this.on(e,t,n)}async once(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.once(e,i),n.once(e,t)}),(n=>{n.removeListener(e,i),n.removeListener(e,t)})),this}async prependListener(e,t,n){return await this.registerEventListener(e,n,(n=>{n.prependListener(e,t)}),(n=>{n.removeListener(e,t)})),this}async prependOnceListener(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.prependOnceListener(e,t),n.once(e,i)}),(n=>{n.removeListener(e,t),n.removeListener(e,i)})),this}async removeListener(e,t,n){const i=await this.deregisterEventListener(e,n);return i&&(i.removeListener(e,t),this.deleteEmitterIfNothingRegistered(i)),this}async deregisterAllListeners(e){const t={...this.identity,type:e,topic:this.topic};if(this.hasEmitter()){const e=this.getOrCreateEmitter(),n=e.listenerCount(t.type),i=[];for(let e=0;enull)));return await Promise.all(i),e}}async removeAllListeners(e){const t=async e=>{const t=await this.deregisterAllListeners(e);t&&(t.removeAllListeners(e),this.deleteEmitterIfNothingRegistered(t))};if(e)await t(e);else if(this.hasEmitter()){const e=this.getOrCreateEmitter().eventNames();await(0,y.promiseMap)(e,t)}return this}deleteEmitterIfNothingRegistered(e){0===e.eventNames().length&&this.wire.eventAggregator.delete(w(this,u,"f"))}},u=new WeakMap;d.Reply=class{};var g={};Object.defineProperty(g,"__esModule",{value:!0});var m=g.RuntimeError=g.NotSupportedError=g.NotImplementedError=g.NoAckError=g.DuplicateCorrelationError=g.UnexpectedActionError=g.DisconnectedError=void 0;class v extends Error{constructor(e){super(`Expected websocket state OPEN but found ${e}`),this.readyState=e}}g.DisconnectedError=v;class C extends Error{}g.UnexpectedActionError=C;class b extends Error{}g.DuplicateCorrelationError=b;class I extends Error{}g.NoAckError=I;class E extends Error{}g.NotImplementedError=E;class x extends Error{}g.NotSupportedError=x;class A extends Error{constructor(e){const{message:t,name:n,stack:i,...r}=e;super(t),this.name=n||"Error",this.stack=i??this.toString(),Object.keys(r).forEach((e=>{this[e]=r[e]}))}}class P extends Error{static getCallSite(e=0){const t=Error.stackTraceLimit,n=e+1;Error.stackTraceLimit=t+n;const i=Error.prepareStackTrace;Error.prepareStackTrace=(e,t)=>t;const r=(new Error).stack?.slice(n)??[];return Error.prepareStackTrace=i,Error.stackTraceLimit=t,r}static prepareStackTrace(e,t){if("function"==typeof Error.prepareStackTrace)return Error.prepareStackTrace(e,t);let n="";n+=e.name||"Error",n+=`: ${e.message||""}`;for(const e of t)n+=`\n at ${e.toString()}`;return n}constructor(e,t){const{reason:n,error:i}=e;super(n),this.name="RuntimeError",i?.stack&&(this.cause=new A(i)),t&&(this.stack=P.prepareStackTrace(this,t))}}m=g.RuntimeError=P;var M={},_={},O={};Object.defineProperty(O,"__esModule",{value:!0}),O.validateIdentity=void 0,O.validateIdentity=function(e){let t;return"object"==typeof e&&"string"==typeof e.uuid||(t="Not a valid identity object"),t};var S={},R={},F={},j={},k={},L={},T={};Object.defineProperty(T,"__esModule",{value:!0}),T.handleDeprecatedWarnings=void 0;var $;T.handleDeprecatedWarnings=e=>{(e.contentNavigation?.whitelist||e.contentNavigation?.blacklist||e.contentRedirect?.whitelist||e.contentRedirect?.blacklist)&&console.warn("The properties 'whitelist' and 'blacklist' have been marked as deprecated and will be removed in a future version. Please use 'allowlist' and 'denylist'.")};var B={},G={};Object.defineProperty(G,"__esModule",{value:!0}),G.AsyncRetryableLazy=W=G.Lazy=void 0;var W=G.Lazy=class{constructor(e){this.producerFn=e}getValue(){return this.value||(this.value=this.producerFn()),this.value}};G.AsyncRetryableLazy=class{constructor(e){this.producerFn=e}async getValue(){return this.promise||(this.promise=this.producerFn().catch((e=>{throw delete this.promise,e}))),this.promise}};var H={};Object.defineProperty(H,"__esModule",{value:!0}),H.WebContents=void 0;const N=d;class D extends N.EmitterBase{constructor(e,t,n){super(e,n,t.uuid,t.name),this.identity=t,this.entityType=n}capturePage(e){return this.wire.sendAction("capture-page",{options:e,...this.identity}).then((({payload:e})=>e.data))}executeJavaScript(e){return this.wire.sendAction("execute-javascript-in-window",{...this.identity,code:e}).then((({payload:e})=>e.data))}getZoomLevel(){return this.wire.sendAction("get-zoom-level",this.identity).then((({payload:e})=>e.data))}setZoomLevel(e){return this.wire.sendAction("set-zoom-level",{...this.identity,level:e}).then((()=>{}))}navigate(e){return this.wire.sendAction("navigate-window",{...this.identity,url:e}).then((()=>{}))}navigateBack(){return this.wire.sendAction("navigate-window-back",{...this.identity}).then((()=>{}))}async navigateForward(){await this.wire.sendAction("navigate-window-forward",{...this.identity})}stopNavigation(){return this.wire.sendAction("stop-window-navigation",{...this.identity}).then((()=>{}))}reload(e=!1){return this.wire.sendAction("reload-window",{ignoreCache:e,...this.identity}).then((()=>{}))}print(e={}){return this.wire.sendAction("print",{...this.identity,options:e}).then((()=>{}))}findInPage(e,t){return this.wire.sendAction("find-in-page",{...this.identity,searchTerm:e,options:t}).then((({payload:e})=>e.data))}stopFindInPage(e){return this.wire.sendAction("stop-find-in-page",{...this.identity,action:e}).then((()=>{}))}getPrinters(){return this.wire.sendAction("get-printers",{...this.identity}).then((({payload:e})=>e.data))}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){await this.wire.sendAction("focus-window",{emitSynthFocused:e,...this.identity})}async showDeveloperTools(){await this.wire.sendAction("show-developer-tools",this.identity)}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction("get-process-info",this.identity);return e}async getSharedWorkers(){return this.wire.sendAction("get-shared-workers",this.identity).then((({payload:e})=>e.data))}async inspectSharedWorker(){await this.wire.sendAction("inspect-shared-worker",{...this.identity})}async inspectSharedWorkerById(e){await this.wire.sendAction("inspect-shared-worker-by-id",{...this.identity,workerId:e})}async inspectServiceWorker(){await this.wire.sendAction("inspect-service-worker",{...this.identity})}async showPopupWindow(e){if(this.wire.sendAction(`${this.entityType}-show-popup-window`,this.identity).catch((()=>{})),e?.onPopupReady){const t=async({popupName:t})=>{try{const n=this.fin.Window.wrapSync({uuid:this.fin.me.uuid,name:t});await e.onPopupReady(n)}catch(e){throw new Error(`Something went wrong during onPopupReady execution: ${e}`)}};await this.once("popup-ready",t)}const{payload:t}=await this.wire.sendAction("try-create-popup-window",{options:{...e,hasResultCallback:!!e?.onPopupResult,hasReadyCallback:!!e?.onPopupReady},...this.identity}),{data:{willOpen:n,options:i}}=t;n&&await this.fin.Window.create(i.initialOptions);if(e?.onPopupResult){const t=async t=>{await e.onPopupResult((e=>{const{name:t,uuid:n,result:i,data:r}=e,o={identity:{name:t,uuid:n},result:i};return r&&(o.data=r),o})(t))},n=async()=>{await this.removeListener("popup-result",t)};await this.on("popup-result",t),await this.once("popup-teardown",n)}const{payload:r}=await this.wire.sendAction("show-popup-window",{options:i,...this.identity});return r.data}}var U,V,z,K,q;function J(){return V||(V=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(function(){if($)return L;$=1,Object.defineProperty(L,"__esModule",{value:!0}),L.ViewModule=void 0;const e=d,t=O,n=J(),i=T;class r extends e.Base{async create(e){const{uuid:t}=this.wire.me;if(!e.name||"string"!=typeof e.name)throw new Error("Please provide a name property as a string in order to create a View.");return(0,i.handleDeprecatedWarnings)(e),this.wire.environment.childViews?await this.wire.environment.createChildContent({entityType:"view",options:{...e,uuid:t}}):await this.wire.sendAction("create-view",{...e,uuid:t}),this.wrapSync({uuid:t,name:e.name})}async wrap(e){this.wire.sendAction("view-wrap").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}wrapSync(e){this.wire.sendAction("view-wrap-sync").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}getCurrent(){if(this.wire.sendAction("view-get-current").catch((e=>{})),!this.wire.me.isView)throw new Error("You are not in a View context");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction("view-get-current-sync").catch((e=>{})),!this.wire.me.isView)throw new Error("You are not in a View context");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return L.ViewModule=r,L}(),e),n(function(){if(U)return B;var e;U=1,Object.defineProperty(B,"__esModule",{value:!0}),B.View=void 0;const t=g,n=G,i=H,r=ie();class o extends i.WebContents{constructor(i,o){super(i,o,"view"),this.identity=o,e.set(this,new n.Lazy((()=>this.fin.Platform.wrapSync(this.identity).getClient()))),this.attach=async e=>{await this.wire.sendAction("attach-view",{target:e,...this.identity})},this.destroy=async()=>{await this.wire.sendAction("destroy-view",{...this.identity})},this.show=async()=>{await this.wire.sendAction("show-view",{...this.identity})},this.showAt=async(e,t={})=>{await this.wire.sendAction("show-view-at",{bounds:e,...this.identity,options:t})},this.bringToFront=async()=>{await this.wire.sendAction("bring-view-to-front",{...this.identity})},this.hide=async()=>{await this.wire.sendAction("hide-view",{...this.identity})},this.setBounds=async e=>{await this.wire.sendAction("set-view-bounds",{bounds:e,...this.identity})},this.getBounds=async()=>(await this.wire.sendAction("get-view-bounds",{...this.identity})).payload.data,this.getInfo=async()=>(await this.wire.sendAction("get-view-info",{...this.identity})).payload.data,this.getParentLayout=async()=>(this.wire.sendAction("view-get-parent-layout",{...this.identity}).catch((()=>{})),this.fin.Platform.Layout.getLayoutByViewIdentity(this.identity)),this.getOptions=async()=>this.wire.sendAction("get-view-options",{...this.identity}).then((({payload:e})=>e.data)),this.updateOptions=async e=>this.wire.sendAction("update-view-options",{options:e,...this.identity}).then((()=>{})),this.getCurrentWindow=async()=>{const{payload:{data:e}}=await this.wire.sendAction("get-view-window",{...this.identity});return new r._Window(this.wire,e)},this.getCurrentStack=async()=>{this.wire.sendAction("view-get-current-stack").catch((()=>{}));try{return(await this.getParentLayout()).getStackByViewIdentity(this.identity)}catch(e){throw new t.RuntimeError({reason:"This view does not belong to a stack.",error:e})}},this.triggerBeforeUnload=async()=>(await this.wire.sendAction("trigger-before-unload",{...this.identity})).payload.data,this.bindToElement=async e=>{if(!e)throw new Error("Element not found.");return this.wire.environment.observeBounds(e,(async e=>this.setBounds(e)))}}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){const t=await this.getCurrentWindow();await t.focusedWebViewWasChanged(),await super.focus({emitSynthFocused:e})}}return B.View=o,e=new WeakMap,B}(),e)}(k)),k}function Y(){if(z)return j;z=1,Object.defineProperty(j,"__esModule",{value:!0}),j.Application=void 0;const e=d,t=ie(),n=J();class i extends e.EmitterBase{constructor(e,n){super(e,"application",n.uuid),this.identity=n,this.window=new t._Window(this.wire,{uuid:this.identity.uuid,name:this.identity.uuid})}windowListFromIdentityList(e){const n=[];return e.forEach((e=>{n.push(new t._Window(this.wire,{uuid:e.uuid,name:e.name}))})),n}isRunning(){return this.wire.sendAction("is-application-running",this.identity).then((({payload:e})=>e.data))}async quit(e=!1){try{await this._close(e),await this.wire.sendAction("destroy-application",{force:e,...this.identity})}catch(e){if(!["Remote connection has closed","Could not locate the requested application"].some((t=>e.message.includes(t))))throw e}}async _close(e=!1){try{await this.wire.sendAction("close-application",{force:e,...this.identity})}catch(e){if(!e.message.includes("Remote connection has closed"))throw e}}close(e=!1){return console.warn("Deprecation Warning: Application.close is deprecated Please use Application.quit"),this.wire.sendAction("application-close",this.identity).catch((e=>{})),this._close(e)}getChildWindows(){return this.wire.sendAction("get-child-windows",this.identity).then((({payload:e})=>{const t=[];return e.data.forEach((e=>{t.push({uuid:this.identity.uuid,name:e})})),this.windowListFromIdentityList(t)}))}getManifest(){return this.wire.sendAction("get-application-manifest",this.identity).then((({payload:e})=>e.data))}getParentUuid(){return this.wire.sendAction("get-parent-application",this.identity).then((({payload:e})=>e.data))}getShortcuts(){return this.wire.sendAction("get-shortcuts",this.identity).then((({payload:e})=>e.data))}async getViews(){const{payload:e}=await this.wire.sendAction("application-get-views",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}getZoomLevel(){return this.wire.sendAction("get-application-zoom-level",this.identity).then((({payload:e})=>e.data))}getWindow(){return this.wire.sendAction("application-get-window",this.identity).catch((e=>{})),Promise.resolve(this.window)}registerUser(e,t){return this.wire.sendAction("register-user",{userName:e,appName:t,...this.identity}).then((()=>{}))}removeTrayIcon(){return this.wire.sendAction("remove-tray-icon",this.identity).then((()=>{}))}restart(){return this.wire.sendAction("restart-application",this.identity).then((()=>{}))}run(){return console.warn("Deprecation Warning: Application.run is deprecated Please use fin.Application.start"),this.wire.sendAction("application-run",this.identity).catch((e=>{})),this._run()}_run(e={}){return this.wire.sendAction("run-application",{manifestUrl:this._manifestUrl,opts:e,...this.identity}).then((()=>{}))}scheduleRestart(){return this.wire.sendAction("relaunch-on-close",this.identity).then((()=>{}))}async sendApplicationLog(){const{payload:e}=await this.wire.sendAction("send-application-log",this.identity);return e.data}async setJumpList(e){await this.wire.sendAction("set-jump-list",{config:e,...this.identity})}setTrayIcon(e){return this.wire.sendAction("set-tray-icon",{enabledIcon:e,...this.identity}).then((()=>{}))}setShortcuts(e){return this.wire.sendAction("set-shortcuts",{data:e,...this.identity}).then((()=>{}))}async setShortcutQueryParams(e){await this.wire.sendAction("set-shortcut-query-args",{data:e,...this.identity})}setZoomLevel(e){return this.wire.sendAction("set-application-zoom-level",{level:e,...this.identity}).then((()=>{}))}async setAppLogUsername(e){await this.wire.sendAction("set-app-log-username",{data:e,...this.identity})}getTrayIconInfo(){return this.wire.sendAction("get-tray-icon-info",this.identity).then((({payload:e})=>e.data))}hasTrayIcon(){return this.wire.sendAction("has-tray-icon",this.identity).then((({payload:e})=>e.data))}terminate(){return this.wire.sendAction("terminate-application",this.identity).then((()=>{}))}wait(){return this.wire.sendAction("wait-for-hung-application",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction("get-info",this.identity).then((({payload:e})=>e.data))}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction("application-get-process-info",this.identity);return e}async setFileDownloadLocation(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t};await this.wire.sendAction("set-file-download-location",{...n,downloadLocation:e})}async getFileDownloadLocation(){const{payload:{data:e}}=await this.wire.sendAction("get-file-download-location",this.identity);return e}async showTrayIconPopupMenu(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t},{payload:i}=await this.wire.sendAction("show-tray-icon-popup-menu",{...n,options:e});return i.data}async closeTrayIconPopupMenu(){const{name:e}=this.wire.me,t={uuid:this.identity.uuid,name:e};await this.wire.sendAction("close-tray-icon-popup-menu",{...t})}}return j.Application=i,j}function Z(){return q||(q=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(function(){if(K)return F;K=1,Object.defineProperty(F,"__esModule",{value:!0}),F.ApplicationModule=void 0;const e=d,t=O,n=Y();class i extends e.Base{async wrap(e){this.wire.sendAction("wrap-application").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}wrapSync(e){this.wire.sendAction("wrap-application-sync").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}async _create(e){return void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&void 0===e.isPlatformController&&(e.autoShow=!0),await this.wire.sendAction("create-application",e),this.wrap({uuid:e.uuid})}create(e){return console.warn("Deprecation Warning: fin.Application.create is deprecated. Please use fin.Application.start"),this.wire.sendAction("application-create").catch((e=>{})),this._create(e)}async start(e){this.wire.sendAction("start-application").catch((e=>{}));const t=await this._create(e);return await this.wire.sendAction("run-application",{uuid:e.uuid}),t}async startManyManifests(e,t){return this.wire.sendAction("run-applications",{applications:e,opts:t}).then((()=>{}))}getCurrent(){return this.wire.sendAction("get-current-application").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction("get-current-application-sync").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}async startFromManifest(e,t){this.wire.sendAction("application-start-from-manifest").catch((e=>{}));const n=await this._createFromManifest(e);return await n._run(t),n}createFromManifest(e){return console.warn("Deprecation Warning: fin.Application.createFromManifest is deprecated. Please use fin.Application.startFromManifest"),this.wire.sendAction("application-create-from-manifest").catch((e=>{})),this._createFromManifest(e)}_createFromManifest(e){return this.wire.sendAction("get-application-manifest",{manifestUrl:e}).then((({payload:e})=>{const t=e.data.platform?e.data.platform.uuid:e.data.startup_app.uuid;return this.wrap({uuid:t})})).then((t=>(t._manifestUrl=e,t)))}}return F.ApplicationModule=i,F}(),e),n(Y(),e)}(R)),R}H.WebContents=D;var Q={};Object.defineProperty(Q,"__esModule",{value:!0}),Q.promisifySubscription=void 0;var X,ee,te;function ne(){if(X)return S;X=1,Object.defineProperty(S,"__esModule",{value:!0}),S._Window=void 0;const e=Z(),t=H,n=J(),i=T,r=Q;class o extends t.WebContents{constructor(e,t){super(e,t,"window")}async createWindow(e){this.wire.sendAction("window-create-window",this.identity).catch((e=>{}));const t=await(0,r.promisifySubscription)(this,"fire-constructor-callback");void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&(e.autoShow=!0),(0,i.handleDeprecatedWarnings)(e);const n=this.wire.environment.createChildContent({entityType:"window",options:e}),[o]=await Promise.all([t.getValue(),n]);let s;const{success:a}=o,c=o.data,{message:d}=c;s=a?{httpResponseCode:c.httpResponseCode,apiInjected:c.apiInjected}:{message:c.message,networkErrorCode:c.networkErrorCode,stack:c.stack};const h={message:d,cbPayload:s,success:a};try{this.getWebWindow().fin.__internal_.openerSuccessCBCalled()}catch(e){}return h.success?this:Promise.reject(h)}getAllFrames(){return this.wire.sendAction("get-all-frames",this.identity).then((({payload:e})=>e.data))}getBounds(){return this.wire.sendAction("get-window-bounds",this.identity).then((({payload:e})=>e.data))}center(){return this.wire.sendAction("center-window",this.identity).then((()=>{}))}blur(){return this.wire.sendAction("blur-window",this.identity).then((()=>{}))}bringToFront(){return this.wire.sendAction("bring-window-to-front",this.identity).then((()=>{}))}animate(e,t){return this.wire.sendAction("animate-window",{transitions:e,options:t,...this.identity}).then((()=>{}))}hide(){return this.wire.sendAction("hide-window",this.identity).then((()=>{}))}close(e=!1){return this.wire.sendAction("close-window",{force:e,...this.identity}).then((()=>{Object.setPrototypeOf(this,null)}))}focusedWebViewWasChanged(){return this.wire.sendAction("focused-webview-changed",this.identity).then((()=>{}))}getNativeId(){return this.wire.sendAction("get-window-native-id",this.identity).then((({payload:e})=>e.data))}async getCurrentViews(){const{payload:e}=await this.wire.sendAction("window-get-views",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}disableFrame(){return console.warn("Function is deprecated; use disableUserMovement instead."),this.wire.sendAction("disable-window-frame",this.identity).then((()=>{}))}disableUserMovement(){return this.wire.sendAction("disable-window-frame",this.identity).then((()=>{}))}enableFrame(){return console.warn("Function is deprecated; use enableUserMovement instead."),this.wire.sendAction("enable-window-frame",this.identity).then((()=>{}))}enableUserMovement(){return this.wire.sendAction("enable-window-frame",this.identity).then((()=>{}))}flash(){return this.wire.sendAction("flash-window",this.identity).then((()=>{}))}stopFlashing(){return this.wire.sendAction("stop-flash-window",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction("get-window-info",this.identity).then((({payload:e})=>e.data))}async getLayout(e){this.wire.sendAction("window-get-layout",this.identity).catch((e=>{}));const t=await this.getOptions();if(!t.layout&&!t.layoutSnapshot)throw new Error("Window does not have a Layout");return this.fin.Platform.Layout.wrap(e??this.identity)}getOptions(){return this.wire.sendAction("get-window-options",this.identity).then((({payload:e})=>e.data))}getParentApplication(){return this.wire.sendAction("window-get-parent-application",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity))}getParentWindow(){return this.wire.sendAction("window-get-parent-window",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity)).then((e=>e.getWindow()))}async getSnapshot(e){const t={area:e,...this.identity};console.warn("Window.getSnapshot has been deprecated, please use Window.capturePage");return(await this.wire.sendAction("get-window-snapshot",t)).payload.data}getState(){return this.wire.sendAction("get-window-state",this.identity).then((({payload:e})=>e.data))}getWebWindow(){return this.wire.sendAction("window-get-web-window",this.identity).catch((e=>{})),this.wire.environment.getWebWindow(this.identity)}isMainWindow(){return this.wire.sendAction("window-is-main-window",this.identity).catch((e=>{})),this.me.uuid===this.me.name}isShowing(){return this.wire.sendAction("is-window-showing",this.identity).then((({payload:e})=>e.data))}maximize(){return this.wire.sendAction("maximize-window",this.identity).then((()=>{}))}minimize(){return this.wire.sendAction("minimize-window",this.identity).then((()=>{}))}moveBy(e,t,n){return this.wire.sendAction("move-window-by",{deltaLeft:e,deltaTop:t,positioningOptions:n,...this.identity}).then((()=>{}))}moveTo(e,t,n){return this.wire.sendAction("move-window",{left:e,top:t,positioningOptions:n,...this.identity}).then((()=>{}))}resizeBy(e,t,n,i){return this.wire.sendAction("resize-window-by",{deltaWidth:Math.floor(e),deltaHeight:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}resizeTo(e,t,n,i){return this.wire.sendAction("resize-window",{width:Math.floor(e),height:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}restore(){return this.wire.sendAction("restore-window",this.identity).then((()=>{}))}setAsForeground(){return this.wire.sendAction("set-foreground-window",this.identity).then((()=>{}))}setBounds(e,t){return this.wire.sendAction("set-window-bounds",{...e,...this.identity,positioningOptions:t}).then((()=>{}))}show(e=!1){return this.wire.sendAction("show-window",{force:e,...this.identity}).then((()=>{}))}showAt(e,t,n=!1){return this.wire.sendAction("show-at-window",{force:n,left:Math.floor(e),top:Math.floor(t),...this.identity}).then((()=>{}))}updateOptions(e){return this.wire.sendAction("update-window-options",{options:e,...this.identity}).then((()=>{}))}authenticate(e,t){return this.wire.sendAction("window-authenticate",{userName:e,password:t,...this.identity}).then((()=>{}))}async showPopupMenu(e){const{payload:t}=await this.wire.sendAction("show-popup-menu",{options:e,...this.identity});return t.data}async closePopupMenu(){return this.wire.sendAction("close-popup-menu",{...this.identity}).then((()=>{}))}async dispatchPopupResult(e){this.wire.sendAction("window-dispatch-popup-result",this.identity).catch((e=>{})),await this.wire.sendAction("dispatch-popup-result",{data:e,...this.identity})}async print(e={content:"self"}){switch(e.content){case void 0:case"self":return super.print(e);case"screenshot":return this.wire.sendAction("print-screenshot",this.identity).then((()=>{}));case"views":return this.wire.sendAction("print-views",{...this.identity,options:e}).then((()=>{}));default:return}}}return S._Window=o,S}function ie(){return te||(te=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(function(){if(ee)return _;ee=1,Object.defineProperty(_,"__esModule",{value:!0}),_._WindowModule=void 0;const e=d,t=O,n=ne();class i extends e.Base{async wrap(e){this.wire.sendAction("window-wrap").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}wrapSync(e){this.wire.sendAction("window-wrap-sync").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}create(e){return this.wire.sendAction("create-window").catch((e=>{})),new n._Window(this.wire,{uuid:this.me.uuid,name:e.name}).createWindow(e)}getCurrent(){if(this.wire.sendAction("get-current-window").catch((e=>{})),!this.wire.me.isWindow)throw new Error("You are not in a Window context");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction("get-current-window-sync").catch((e=>{})),!this.wire.me.isWindow)throw new Error("You are not in a Window context");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return _._WindowModule=i,_}(),e),n(ne(),e)}(M)),M}Q.promisifySubscription=async(e,t,n=(()=>!0),i)=>{let r,o,s;const a=new Promise(((e,t)=>{r=e,o=t})),c=e=>{n(e)&&(clearTimeout(s),r(e))};return await e.on(t,c),i&&(s=setTimeout((()=>o(new Error("event timed out"))),i)),a.finally((()=>{e.removeListener(t,c).catch((()=>null))})),{getValue:()=>a}},Object.defineProperty(c,"__esModule",{value:!0}),c.System=void 0;const re=d,oe=g,se=ie(),ae=t;class ce extends re.EmitterBase{constructor(e){super(e,"system")}sendExternalProcessRequest(e,t){return new Promise(((n,i)=>{const r="external-process-exited";let o,s,a,c;"function"==typeof t.listener&&(a=e=>{const n=e||{};s={topic:"exited",uuid:n.processUuid||"",exitCode:n.exitCode||0},o===e.processUuid&&(t.listener(s),c.removeListener(r,a))},this.wire.me.name||(this.wire.me.name=this.wire.me.uuid),c=new se._Window(this.wire,this.wire.me),c.on(r,a)),this.wire.sendAction(e,t).then((({payload:e})=>{o=e.data.uuid,n(e.data),s&&o===s.uuid&&(t.listener(s),c.removeListener(r,a))})).catch((e=>{c&&c.removeListener(r,a),i(e)}))}))}getVersion(){return this.wire.sendAction("get-version").then((({payload:e})=>e.data))}clearCache(e){return this.wire.sendAction("clear-cache",e).then((()=>{}))}deleteCacheOnExit(){return this.wire.sendAction("delete-cache-request").then((()=>{}))}exit(){return this.wire.sendAction("exit-desktop").then((()=>{}))}async fetchManifest(e){const{payload:{data:t}}=await this.wire.sendAction("fetch-manifest",{manifestUrl:e});return t}flushCookieStore(){return this.wire.sendAction("flush-cookie-store").then((()=>{}))}getAllWindows(){return this.wire.sendAction("get-all-windows").then((({payload:e})=>e.data))}getAllApplications(){return this.wire.sendAction("get-all-applications").then((({payload:e})=>e.data))}getCommandLineArguments(){return this.wire.sendAction("get-command-line-arguments").then((({payload:e})=>e.data))}async getCrashReporterState(){const{payload:{data:{diagnosticMode:e,isRunning:t}}}=await this.wire.sendAction("get-crash-reporter-state");return console.warn("diagnosticMode property is deprecated. It will be removed in a future version"),{diagnosticMode:e,diagnosticsMode:e,isRunning:t}}async startCrashReporter(e){const t=e,n={...t,diagnosticMode:t.diagnosticsMode||t.diagnosticMode},{payload:{data:{diagnosticMode:i,isRunning:r}}}=await this.wire.sendAction("start-crash-reporter",n);return{diagnosticMode:i,diagnosticsMode:i,isRunning:r}}getUniqueUserId(){return this.wire.sendAction("get-unique-user-id").then((({payload:e})=>e.data))}getEntityInfo(e,t){return this.wire.sendAction("get-entity-info",{uuid:e,name:t}).then((({payload:e})=>e.data))}getEnvironmentVariable(e){return this.wire.sendAction("get-environment-variable",{environmentVariables:e}).then((({payload:e})=>e.data))}getFocusedWindow(){return this.wire.sendAction("get-focused-window").then((({payload:e})=>e.data))}async isAppCertified(e){const{payload:{data:{certifiedInfo:t}}}=await this.wire.sendAction("is-app-certified",{manifestUrl:e});return t}getInstalledRuntimes(){return this.wire.sendAction("get-installed-runtimes").then((({payload:e})=>e.data.runtimes))}async getInstalledApps(){const{payload:{data:{installedApps:e}}}=await this.wire.sendAction("get-installed-apps");return e}getLog(e){return this.wire.sendAction("view-log",e).then((({payload:e})=>e.data))}getMachineId(){return this.wire.sendAction("get-machine-id").then((({payload:e})=>e.data))}getMinLogLevel(){return this.wire.sendAction("get-min-log-level").then((({payload:e})=>e.data))}getLogList(){return this.wire.sendAction("list-logs").then((({payload:e})=>e.data))}getMonitorInfo(){return this.wire.sendAction("get-monitor-info").then((({payload:e})=>e.data))}getMousePosition(){return this.wire.sendAction("get-mouse-position").then((({payload:e})=>e.data))}getProcessList(){return console.warn("System.getProcessList has been deprecated. Please consider using our new process APIs: Window.getProcessInfo, View.getProcessInfo, Application.getProcessInfo, System.getAllProcessInfo"),this.wire.sendAction("process-snapshot").then((({payload:e})=>e.data))}async getAllProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction("get-all-process-info",this.identity);return e}getProxySettings(){return this.wire.sendAction("get-proxy-settings").then((({payload:e})=>e.data))}getRuntimeInfo(){return this.wire.sendAction("get-runtime-info").then((({payload:e})=>e.data))}getRvmInfo(){return this.wire.sendAction("get-rvm-info").then((({payload:e})=>e.data))}getHostSpecs(){return this.wire.sendAction("get-host-specs").then((({payload:e})=>e.data))}getOSInfo(){return this.wire.sendAction("get-os-info").then((({payload:e})=>e.data))}launchExternalProcess(e){return this.sendExternalProcessRequest("launch-external-process",e)}monitorExternalProcess(e){return this.sendExternalProcessRequest("monitor-external-process",e)}log(e,t){return this.wire.sendAction("write-to-log",{level:e,message:t}).then((()=>{}))}openUrlWithBrowser(e){return this.wire.sendAction("open-url-with-browser",{url:e}).then((()=>{}))}async registerCustomProtocol(e){if("object"!=typeof e)throw new Error("Must provide an object with a `protocolName` property having a string value.");await this.wire.sendAction("register-custom-protocol",e)}async unregisterCustomProtocol(e){await this.wire.sendAction("unregister-custom-protocol",{protocolName:e})}async getCustomProtocolState(e){return this.wire.sendAction("get-custom-protocol-state",{protocolName:e}).then((({payload:e})=>e.data))}releaseExternalProcess(e){return this.wire.sendAction("release-external-process",{uuid:e}).then((()=>{}))}showDeveloperTools(e){return this.wire.sendAction("show-developer-tools",e).then((()=>{}))}terminateExternalProcess(e){return this.wire.sendAction("terminate-external-process",e).then((()=>{}))}updateProxySettings(e){return this.wire.sendAction("update-proxy",e).then((()=>{}))}async downloadAsset(e,t){const n=()=>{};let i=n,r=n;const o=new Promise(((e,t)=>{i=e,r=t}));if("openfin"!==this.wire.environment.type)throw new oe.NotSupportedError("downloadAsset only supported in an OpenFin Render process");const s=oe.RuntimeError.getCallSite(),a=this.wire.environment.getNextMessageId().toString(),c=`asset-download-progress-${a}`,d=`asset-download-error-${a}`,h=`asset-download-complete-${a}`,l=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},u=()=>{this.removeListener(c,l)};await Promise.all([this.on(c,l),this.once(d,(e=>{u();const{reason:t,err:n}=e;r(new oe.RuntimeError({reason:t,error:n},s))})),this.once(h,(()=>{u(),i()}))]);const p=Object.assign(e,{downloadId:a});return await this.wire.sendAction("download-asset",p).catch((e=>{throw u(),e})),o}downloadRuntime(e,t){const n=oe.RuntimeError.getCallSite();return new Promise(((i,r)=>{if("openfin"!==this.wire.environment.type)return void r(new oe.NotSupportedError("downloadRuntime only supported in an OpenFin Render process"));const o=this.wire.environment.getNextMessageId().toString(),s=`runtime-download-progress-${o}`,a=`runtime-download-error-${o}`,c=`runtime-download-complete-${o}`,d=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},h=()=>{this.removeListener(s,d)};this.on(s,d),this.once(a,(e=>{h();const{reason:t,err:i}=e;r(new oe.RuntimeError({reason:t,error:i},n))})),this.once(c,(()=>{h(),i()}));const l=Object.assign(e,{downloadId:o});this.wire.sendAction("download-runtime",l).catch((e=>{h(),r(e)}))}))}downloadPreloadScripts(e){return this.wire.sendAction("download-preload-scripts",{scripts:e}).then((({payload:e})=>e.data))}getAllExternalApplications(){return this.wire.sendAction("get-all-external-applications").then((({payload:e})=>e.data))}getAppAssetInfo(e){return this.wire.sendAction("get-app-asset-info",e).then((({payload:e})=>e.data))}getCookies(e){const t=this.wire.environment.getUrl(),n=Object.assign(e,{url:t});return this.wire.sendAction("get-cookies",n).then((({payload:e})=>e.data))}setMinLogLevel(e){return this.wire.sendAction("set-min-log-level",{level:e}).then((()=>{}))}resolveUuid(e){return this.wire.sendAction("resolve-uuid",{entityKey:e}).then((({payload:e})=>e.data))}executeOnRemote(e,t){return t.requestingIdentity=e,this.wire.ferryAction(t)}readRegistryValue(e,t,n){return this.wire.sendAction("read-registry-value",{rootKey:e,subkey:t,value:n}).then((({payload:e})=>e.data))}registerExternalConnection(e){return this.wire.sendAction("register-external-connection",{uuid:e}).then((({payload:e})=>e.data))}async getServiceConfiguration(e){if("string"!=typeof e.name)throw new Error("Must provide an object with a `name` property having a string value");const{name:t}=e;return this.wire.sendAction("get-service-configuration",{name:t}).then((({payload:e})=>e.data))}async getSystemAppConfig(e){if("string"!=typeof e)throw new Error("Must provide a string value for name of system app");return this.wire.sendAction("get-system-app-configuration",{name:e}).then((({payload:e})=>e.data))}async registerShutdownHandler(e){this.wire.sendAction("system-register-shutdown-handler").catch((e=>{}));const{uuid:t,name:n}=this.wire.me;this.on("system-shutdown",(i=>{e({proceed:()=>{this.wire.environment.raiseEvent("application/system-shutdown-handled",{uuid:t,name:n,topic:"application"})}})}))}runRvmHealthCheck(){return this.wire.sendAction("run-rvm-health-check").then((({payload:e})=>e.data))}async launchManifest(e,t={}){const{subscribe:n,...i}=t,r=i;if(n){const e=new ae.EventEmitter;n(e);const t="app-version-progress",i="runtime-status",o="app-version-complete",s="app-version-error",a=this.wire.environment.getNextMessageId().toString();r.appVersionId=a;const c=[o,t,i,s],d=e=>{const{appVersionId:t,topic:n,type:i,...r}=e;return{...r,type:c.find((e=>i.includes(e)))}},h=t=>{const n=d(t);e.emit(n.type,n)},l=()=>{this.removeListener(`${t}.${a}`,h),this.removeListener(`${i}.${a}`,h),this.removeListener(`${o}.${a}`,h),this.removeListener(`${s}.${a}`,h),this.removeListener(`${o}.${a}`,l),this.removeListener(`${s}.${a}`,l)};await Promise.all([this.on(`${t}.${a}`,h),this.on(`${i}.${a}`,h),this.once(`${o}.${a}`,h),this.once(`${s}.${a}`,h),this.once(`${o}.${a}`,l),this.once(`${s}.${a}`,l)])}return(await this.wire.sendAction("launch-manifest",{manifestUrl:e,opts:r})).payload.data.manifest}async queryPermissionForCurrentContext(e){const t={uuid:this.wire.me.uuid,name:this.wire.me.name};return(await this.wire.sendAction("query-permission-for-current-context",{apiName:e,identity:t})).payload.data}async enableNativeWindowIntegrationProvider(e){const{payload:t}=await this.wire.sendAction("enable-native-window-integration-provider",{permissions:e});return t.data}async registerUsage({data:e,type:t}){await this.wire.sendAction("register-usage",{data:e,type:t})}async getPrinters(){const{payload:e}=await this.wire.sendAction("system-get-printers");return e.data}async updateProcessLoggingOptions(e){await this.wire.sendAction("system-update-process-logging-options",{options:e})}async getDomainSettings(){const{payload:{data:e}}=await this.wire.sendAction("get-domain-settings",this.identity);return e}async setDomainSettings(e){await this.wire.sendAction("set-domain-settings",{domainSettings:e,...this.identity})}async refreshExtensions(){const{payload:e}=await this.wire.sendAction("refresh-extensions");return e.data}async getInstalledExtensions(){const{payload:e}=await this.wire.sendAction("get-installed-extensions");return e.data}}c.System=ce;var de={},he={};Object.defineProperty(he,"__esModule",{value:!0}),he.RefCounter=void 0;he.RefCounter=class{constructor(){this.topicRefMap=new Map}incRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t+1;n=i,this.topicRefMap.set(e,i)}else this.topicRefMap.set(e,1),n=1;return n}decRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t-1;this.topicRefMap.set(e,i),n=i}else n=-1;return n}actOnFirst(e,t,n){return 1===this.incRefCount(e)?t():n()}actOnLast(e,t,n){return 0===this.decRefCount(e)?t():n()}};var le={},ue={},pe={};Object.defineProperty(pe,"__esModule",{value:!0}),pe.ChannelBase=pe.ProtectedItems=void 0;const we=e=>async(t,n,i)=>{const r=await e(t,n,i);return void 0===r?n:r};pe.ProtectedItems=class{constructor(e,t){this.providerIdentity=e,this.close=t}};class ye{static defaultAction(e){throw new Error(`No action registered at target for ${e}`)}constructor(){this.subscriptions=new Map}async processAction(e,t,n){try{const i=this.subscriptions.has(e)?this.subscriptions.get(e):(t,n)=>(this.defaultAction??ye.defaultAction)(e,t,n),r=this.preAction?await this.preAction(e,t,n):t,o=await i(r,n);return this.postAction?await this.postAction(e,o,n):o}catch(t){if(this.errorMiddleware)return this.errorMiddleware(e,t,n);throw t}}beforeAction(e){if(this.preAction)throw new Error("Already registered beforeAction middleware");this.preAction=we(e)}onError(e){if(this.errorMiddleware)throw new Error("Already registered error middleware");this.errorMiddleware=e}afterAction(e){if(this.postAction)throw new Error("Already registered afterAction middleware");this.postAction=we(e)}remove(e){this.subscriptions.delete(e)}setDefaultAction(e){if(this.defaultAction)throw new Error("default action can only be set once");this.defaultAction=e}register(e,t){if(this.subscriptions.has(e))throw new Error(`Subscription already registered for action: ${e}. Unsubscribe before adding new subscription`);return this.subscriptions.set(e,t),!0}}pe.ChannelBase=ye;var fe,ge,me,ve=s&&s.__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)},Ce=s&&s.__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};Object.defineProperty(ue,"__esModule",{value:!0}),ue.ChannelClient=void 0;const be=pe,Ie=new Map;class Ee extends be.ChannelBase{static closeChannelByEndpointId(e){const t=Ie.get(e);t&&ve(t,me,"f").call(t)}static handleProviderDisconnect(e){for(const t of Ie.values())t.providerIdentity.channelId===e.channelId&&(t.disconnectListener(e),ve(t,me,"f").call(t))}constructor(e,t,n){super(),fe.set(this,void 0),ge.set(this,void 0),this.processAction=(e,t,n)=>super.processAction(e,t,n),me.set(this,(()=>{Ie.delete(this.endpointId),ve(this,ge,"f").close()})),Ce(this,fe,new be.ProtectedItems(e,t),"f"),this.disconnectListener=()=>{},this.endpointId=e.endpointId,Ce(this,ge,n,"f"),Ie.set(this.endpointId,this),n.receive(this.processAction)}get providerIdentity(){return ve(this,fe,"f").providerIdentity}async dispatch(e,t){if(ve(this,ge,"f").isEndpointConnected(this.providerIdentity.channelId))return ve(this,ge,"f").send(this.providerIdentity.channelId,e,t);throw new Error("The client you are trying to dispatch from is disconnected from the target provider.")}onDisconnection(e){this.disconnectListener=t=>{try{e(t)}catch(e){throw new Error(`Error while calling the onDisconnection callback: ${e.message}`)}finally{this.disconnectListener=()=>{}}}}async disconnect(){await this.sendDisconnectAction(),ve(this,me,"f").call(this)}async sendDisconnectAction(){const e=ve(this,fe,"f");await e.close()}static async wireClose(e,t,n){const{channelName:i,uuid:r,name:o}=t;await e.sendAction("disconnect-from-channel",{channelName:i,uuid:r,name:o,endpointId:n})}}ue.ChannelClient=Ee,fe=new WeakMap,ge=new WeakMap,me=new WeakMap;var xe={},Ae={};Object.defineProperty(Ae,"__esModule",{value:!0}),Ae.exhaustiveCheck=void 0,Ae.exhaustiveCheck=function(e,t){throw new Error(`Unsupported value: ${e}${t?`\n Supported values are: ${t.join("")}`:""}`)};var Pe,Me,_e,Oe={},Se=s&&s.__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},Re=s&&s.__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)};Object.defineProperty(Oe,"__esModule",{value:!0}),Oe.ClassicInfo=Oe.ClassicStrategy=void 0;Oe.ClassicStrategy=class{constructor(e,t,n,i){this.messageReceiver=t,this.endpointId=n,this.providerIdentity=i,Pe.set(this,void 0),Me.set(this,new Map),_e.set(this,new Map),this.send=async(e,t,n)=>{const i=Re(this,Me,"f").get(e);if(!i)throw new Error(`Could not locate routing info for endpoint ${e}`);const r={...i};r.isLocalEndpointId&&delete r.endpointId,delete r.isLocalEndpointId;const o=Re(this,Pe,"f").sendAction("send-channel-message",{...r,providerIdentity:this.providerIdentity,action:t,payload:n});Re(this,_e,"f").get(e)?.add(o);return(await o.catch((e=>{throw new Error(e.message)})).finally((()=>{Re(this,_e,"f").get(e)?.delete(o)}))).payload.data.result},this.close=async()=>{this.messageReceiver.removeEndpoint(this.providerIdentity.channelId,this.endpointId),[...Re(this,Me,"f").keys()].forEach((e=>this.closeEndpoint(e))),Se(this,Me,new Map,"f")},Se(this,Pe,e,"f")}onEndpointDisconnect(e,t){}receive(e){this.messageReceiver.addEndpoint(e,this.providerIdentity.channelId,this.endpointId)}async closeEndpoint(e){const t=Re(this,Me,"f").get(e);Re(this,Me,"f").delete(e);const n=Re(this,_e,"f").get(e);n?.forEach((n=>{const i=`Channel connection with identity uuid: ${t?.uuid} / name: ${t?.name} / endpointId: ${e} no longer connected.`;n.cancel(new Error(i))}))}isEndpointConnected(e){return Re(this,Me,"f").has(e)}addEndpoint(e,t){Re(this,Me,"f").set(e,t.endpointIdentity),Re(this,_e,"f").set(e,new Set)}isValidEndpointPayload(e){return"string"==typeof e?.endpointIdentity?.endpointId||"string"==typeof e?.endpointIdentity?.channelId}},Pe=new WeakMap,Me=new WeakMap,_e=new WeakMap,Oe.ClassicInfo={version:5,minimumVersion:0,type:"classic"};var Fe={},je={},ke={};Object.defineProperty(ke,"__esModule",{value:!0}),ke.errorToPOJO=void 0,ke.errorToPOJO=function(e){return{stack:e.stack,name:e.name,message:e.message,toString:()=>e.stack||e.toString()}};var Le,Te,$e=s&&s.__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)},Be=s&&s.__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};Object.defineProperty(je,"__esModule",{value:!0}),je.RTCEndpoint=void 0;const Ge=ke;je.RTCEndpoint=class{static isValidEndpointPayload(e){const t=e=>"object"==typeof e&&null!==e;return t(e)&&t(e.endpointIdentity)&&t(e.rtc)&&"string"==typeof e.endpointIdentity.endpointId}constructor({rtc:e,endpointIdentity:t}){this.responseMap=new Map,Le.set(this,null),Te.set(this,void 0),this.connectionStateChangeHandler=e=>{"connected"!==this.rtc.rtcClient.connectionState&&(this.rtc.rtcClient.removeEventListener("connectionstatechange",this.connectionStateChangeHandler),this.close(),$e(this,Te,"f")&&$e(this,Te,"f").call(this))},this.send=async(e,t)=>{const n=`message-${Math.random()}`,i=new Promise(((e,t)=>{this.responseMap.set(n,{resolve:e,reject:t})}));return this.rtc.channels.request.send(JSON.stringify({action:e,payload:t,messageId:n})),i},this.close=()=>{this.responseMap.forEach((e=>e.reject("Connection has closed."))),this.responseMap=new Map,this.rtc.channels.request.close(),this.rtc.channels.response.close(),this.rtc.rtcClient.close()},this.rtc=e,this.endpointIdentity=t,this.rtc.channels.response.addEventListener("message",(e=>{let{data:t}=e;e.data instanceof ArrayBuffer&&(t=(new TextDecoder).decode(e.data));const{messageId:n,payload:i,success:r,error:o}=JSON.parse(t),{resolve:s,reject:a}=this.responseMap.get(n)??{};s&&a?(this.responseMap.delete(n),r?s(i):a(o)):(console.log("Could not find id in responseMap."),console.log(e))})),this.rtc.channels.request.addEventListener("message",(async e=>{let{data:n}=e;e.data instanceof ArrayBuffer&&(n=(new TextDecoder).decode(e.data));const{messageId:i,action:r,payload:o}=JSON.parse(n);if($e(this,Le,"f"))try{const e=await $e(this,Le,"f").call(this,r,o,t);this.rtc.channels.response.send(JSON.stringify({messageId:i,payload:e,success:!0}))}catch(e){"open"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,error:(0,Ge.errorToPOJO)(e),success:!1}))}else"open"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,success:!1,error:"Connection not ready."}))})),this.rtc.rtcClient.addEventListener("connectionstatechange",this.connectionStateChangeHandler),Object.values(this.rtc.channels).forEach((e=>{e.onclose=e=>{[...this.responseMap.values()].forEach((e=>e.reject(new Error("RTCDataChannel closed unexpectedly, this is most commonly caused by message size. Note: RTC Channels have a message size limit of ~255kB.")))),this.close(),$e(this,Te,"f")&&$e(this,Te,"f").call(this)}}))}onDisconnect(e){if($e(this,Te,"f"))throw new Error("RTCEndpoint disconnectListener cannot be set twice.");Be(this,Te,e,"f")}receive(e){if($e(this,Le,"f"))throw new Error("You have already set a listener for this RTC Endpoint.");Be(this,Le,e,"f")}get connected(){return"connected"===this.rtc.rtcClient.connectionState}},Le=new WeakMap,Te=new WeakMap;var We,He,Ne,De={},Ue=s&&s.__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)},Ve=s&&s.__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};Object.defineProperty(De,"__esModule",{value:!0}),De.EndpointStrategy=void 0;De.EndpointStrategy=class{constructor(e,t,n){this.EndpointType=e,this.StrategyName=n,We.set(this,null),He.set(this,new Map),Ne.set(this,!0),this.send=async(e,t,n)=>this.getEndpointById(e).send(t,n),this.close=async()=>{Ue(this,Ne,"f")&&(Ue(this,He,"f").forEach((e=>e.close())),Ve(this,He,new Map,"f")),Ve(this,Ne,!1,"f")},this.isValidEndpointPayload=t}onEndpointDisconnect(e,t){this.getEndpointById(e).onDisconnect(t)}receive(e){if(Ue(this,We,"f"))throw new Error(`You have already set a listener for this ${this.StrategyName} Strategy`);Ve(this,We,e,"f"),Ue(this,He,"f").forEach((e=>e.receive(Ue(this,We,"f"))))}getEndpointById(e){const t=Ue(this,He,"f").get(e);if(!t)throw new Error(`Client with endpoint id ${e} is not connected`);return t}get connected(){return Ue(this,Ne,"f")}isEndpointConnected(e){return Ue(this,He,"f").has(e)}addEndpoint(e,t){if(!Ue(this,Ne,"f"))return void console.warn(`Adding endpoint to disconnected ${this.StrategyName} Strategy`);const n=new this.EndpointType(t);Ue(this,We,"f")&&n.receive(Ue(this,We,"f")),Ue(this,He,"f").set(e,n)}async closeEndpoint(e){Ue(this,He,"f").delete(e)}},We=new WeakMap,He=new WeakMap,Ne=new WeakMap,Object.defineProperty(Fe,"__esModule",{value:!0}),Fe.RTCInfo=Fe.RTCStrategy=void 0;const ze=je,Ke=De;class qe extends Ke.EndpointStrategy{constructor(){super(ze.RTCEndpoint,ze.RTCEndpoint.isValidEndpointPayload,"RTC")}}Fe.RTCStrategy=qe,Fe.RTCInfo={version:2,minimumVersion:0,type:"rtc"};var Je={};Object.defineProperty(Je,"__esModule",{value:!0}),Je.RTCICEManager=void 0;const Ye=d;class Ze extends Ye.EmitterBase{constructor(e){super(e,"channel"),this.ensureChannelOpened=e=>new Promise(((t,n)=>{if("open"===e.readyState)t();else if("connecting"===e.readyState){const n=()=>{e.removeEventListener("open",n),t()};e.addEventListener("open",n)}else n(new Error("This Channel has already closed"))}))}static createDataChannelPromise(e,t){let n;const i=new Promise((e=>{n=e})),r=i=>{const o=()=>{i.channel.removeEventListener("open",o),n(i.channel)};i.channel.label===e&&(i.channel.addEventListener("open",o),t.removeEventListener("datachannel",r))};return t.addEventListener("datachannel",r),i}async listenForProviderIce(e,t){await this.on(this.createProviderEventName(e),t,{timestamp:Date.now()})}async raiseProviderIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createProviderEventName(e)),t)}async listenForClientIce(e,t){await this.on(this.createClientEventName(e),t,{timestamp:Date.now()})}async raiseClientIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createClientEventName(e)),t)}cleanupIceListeners(e){this.removeAllListeners(this.createClientEventName(e)),this.removeAllListeners(this.createProviderEventName(e))}createClientEventName(e){return`ice-client-${e}`}createProviderEventName(e){return`ice-provider-${e}`}createRouteString(e){return`channel/${e}`}createRtcPeer(){return this.wire.environment.getRtcPeer()}async startClientOffer(){const e=Math.random().toString(),t=this.createRtcPeer();t.addEventListener("icecandidate",(async t=>{t.candidate&&await this.raiseClientIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForProviderIce(e,(async e=>{await t.addIceCandidate(e.candidate)}));const n={request:t.createDataChannel("request"),response:t.createDataChannel("response")},i=await t.createOffer();await t.setLocalDescription(i);const r=Promise.all([n.request,n.response].map(this.ensureChannelOpened)).then((()=>{}));return{rtcClient:t,channels:n,offer:i,rtcConnectionId:e,channelsOpened:r}}async finishClientOffer(e,t,n){return await e.setRemoteDescription(t),await n,!0}async createProviderAnswer(e,t){const n=this.createRtcPeer(),i=Ze.createDataChannelPromise("request",n),r=Ze.createDataChannelPromise("response",n);n.addEventListener("icecandidate",(async t=>{t.candidate&&await this.raiseProviderIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForClientIce(e,(async e=>{await n.addIceCandidate(e.candidate)})),await n.setRemoteDescription(t);const o=await n.createAnswer();await n.setLocalDescription(o);const s=Promise.all([i,r]).then((([t,n])=>(this.cleanupIceListeners(e),{request:t,response:n})));return{rtcClient:n,answer:o,channels:s}}}Je.RTCICEManager=Ze;var Qe={},Xe={};function et(e){return[...e.split(".").reverse().entries()].reduce(((e,[t,n])=>e+ +n*1e4**t),0)}function tt(e,t){return et(e)>=et(t)}function nt(e){return e.split("/")[0]}Object.defineProperty(Xe,"__esModule",{value:!0}),Xe.runtimeUuidMeetsMinimumRuntimeVersion=Xe.parseRuntimeUuid=Xe.meetsMinimumRuntimeVersion=void 0,Xe.meetsMinimumRuntimeVersion=tt,Xe.parseRuntimeUuid=nt,Xe.runtimeUuidMeetsMinimumRuntimeVersion=function(e,t){return tt(nt(e),t)};var it,rt,ot,st,at,ct=s&&s.__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)},dt=s&&s.__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};Object.defineProperty(Qe,"__esModule",{value:!0}),Qe.ChannelProvider=void 0;const ht=pe,lt=Xe;class ut extends ht.ChannelBase{get connections(){return[...ct(this,it,"f")]}static handleClientDisconnection(e,t){const n=e.connections.find((e=>e.endpointId===t.endpointId));if(n)ct(e,st,"f").call(e,n);else{e.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name)).forEach(ct(e,st,"f"))}e.disconnectListener(t)}static setProviderRemoval(e,t){ut.removalMap.set(e,t)}constructor(e,t,n){super(),it.set(this,void 0),rt.set(this,void 0),ot.set(this,void 0),st.set(this,(e=>{const t=this.connections.filter((t=>t.endpointId!==e.endpointId));ct(this,ot,"f").closeEndpoint(e.endpointId),dt(this,it,t,"f")})),this.processAction=async(e,t,n)=>(ut.clientIsMultiRuntime(n)&&!(0,lt.runtimeUuidMeetsMinimumRuntimeVersion)(n.runtimeUuid,"18.87.56.0")?this.handleMultiRuntimeLegacyClient(n):this.checkForClientConnection(n),super.processAction(e,t,n)),at.set(this,(()=>{ct(this,ot,"f").close();const e=ut.removalMap.get(this);e&&e()})),dt(this,rt,new ht.ProtectedItems(e,t),"f"),this.connectListener=()=>{},this.disconnectListener=()=>{},dt(this,it,[],"f"),dt(this,ot,n,"f"),n.receive(this.processAction)}dispatch(e,t,n){const i=e.endpointId??this.getEndpointIdForOpenFinId(e,t);return i&&ct(this,ot,"f").isEndpointConnected(i)?ct(this,ot,"f").send(i,t,n):Promise.reject(new Error(`Client connection with identity uuid: ${e.uuid} / name: ${e.name} / endpointId: ${i} no longer connected.`))}async processConnection(e,t){return ct(this,it,"f").push(e),this.connectListener(e,t)}publish(e,t){return this.connections.map((n=>ct(this,ot,"f").send(n.endpointId,e,t)))}onConnection(e){this.connectListener=e}onDisconnection(e){this.disconnectListener=e}async destroy(){const e=ct(this,rt,"f");e.providerIdentity,dt(this,it,[],"f"),await e.close(),ct(this,at,"f").call(this)}async getAllClientInfo(){return this.connections.map((e=>{const{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}=e;return{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}}))}checkForClientConnection(e){if(!this.isClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider.\n Client Identity: {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}isClientConnected(e){return ut.clientIdentityIncludesEndpointId(e)?this.connections.some((t=>t.endpointId===e.endpointId&&t.uuid===e.uuid&&t.name===e.name)):this.isLegacyClientConnected(e)}isLegacyClientConnected(e){return this.connections.some((t=>t.uuid===e.uuid&&t.name===e.name))}handleMultiRuntimeLegacyClient(e){if(!this.isLegacyClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider. Client Identity:\n {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}getEndpointIdForOpenFinId(e,t){const n=this.connections.filter((t=>t.name===e.name&&t.uuid===e.uuid));if(n.length>=2){const n=ct(this,rt,"f"),{uuid:i,name:r}=e,o=n?.providerIdentity.uuid,s=n?.providerIdentity.name;console.warn(`WARNING: Dispatch call may have unintended results. The "to" argument of your dispatch call is missing the\n "endpointId" parameter. The identity you are dispatching to ({uuid: ${i}, name: ${r}})\n has multiple channelClients for this channel. Your dispatched action: (${t}) from the provider:\n ({uuid: ${o}, name: ${s}}) will only be processed by the most recently-created client.`)}return n.pop()?.endpointId}static clientIdentityIncludesEndpointId(e){return void 0!==e.endpointId}static clientIsMultiRuntime(e){return void 0!==e.runtimeUuid}static async wireClose(e,t){await e.sendAction("destroy-channel",{channelName:t})}}Qe.ChannelProvider=ut,it=new WeakMap,rt=new WeakMap,ot=new WeakMap,st=new WeakMap,at=new WeakMap,ut.removalMap=new WeakMap;var pt={};Object.defineProperty(pt,"__esModule",{value:!0}),pt.MessageReceiver=void 0;const wt=ue,yt=d;class ft extends yt.Base{constructor(e){super(e),this.onmessage=e=>"process-channel-message"===e.action&&(this.processChannelMessage(e),!0),this.endpointMap=new Map,this.latestEndpointIdByChannelId=new Map,e.registerMessageHandler(this.onmessage.bind(this))}async processChannelMessage(e){const{senderIdentity:t,providerIdentity:n,action:i,ackToSender:r,payload:o,intendedTargetIdentity:s}=e.payload,a=s.channelId??s.endpointId??this.latestEndpointIdByChannelId.get(n.channelId),c=this.endpointMap.get(a);if(!c)return r.payload.success=!1,r.payload.reason=`Client connection with identity uuid: ${this.wire.me.uuid} / name: ${this.wire.me.name} / endpointId: ${a} no longer connected.`,this.wire.sendRaw(r);try{const e=await c(i,o,t);return r.payload.payload=r.payload.payload||{},r.payload.payload.result=e,this.wire.sendRaw(r)}catch(e){return r.payload.success=!1,r.payload.reason=e.message,this.wire.sendRaw(r)}}addEndpoint(e,t,n){this.endpointMap.set(n,e),t!==n&&this.latestEndpointIdByChannelId.set(t,n)}removeEndpoint(e,t){this.endpointMap.delete(t),this.latestEndpointIdByChannelId.get(e)===t&&this.latestEndpointIdByChannelId.delete(e)}checkForPreviousClientConnection(e){const t=this.latestEndpointIdByChannelId.get(e);t&&(wt.ChannelClient.closeChannelByEndpointId(t),console.warn("You have created a second connection to an older provider. First connection has been removed from the clientMap"),console.warn("If the provider calls publish(), you may receive multiple messages."))}}pt.MessageReceiver=ft;var gt={};Object.defineProperty(gt,"__esModule",{value:!0}),gt.ProtocolManager=void 0;gt.ProtocolManager=class{constructor(e){this.ProtocolsInPreferenceOrder=e,this.DefaultClientProtocols=["classic"],this.DefaultProviderProtocols=["classic"],this.getClientProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultClientProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(", ")}.`);return t},this.getProviderProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultProviderProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(", ")}.`);return t},this.getCompatibleProtocols=(e,t)=>t.supportedProtocols.filter((t=>e.some((e=>e.type===t.type&&t.version>=e.minimumVersion&&e.version>=(t.minimumVersion??0))))).slice(0,t.maxProtocols)}};var mt={};Object.defineProperty(mt,"__esModule",{value:!0});class vt{static combine(e,t){return new vt(e,t)}constructor(e,t){this.primary=e,this.secondary=t}onEndpointDisconnect(e,t){this.primary.onEndpointDisconnect(e,(()=>{this.secondary.isEndpointConnected(e)||t()})),this.secondary.onEndpointDisconnect(e,(()=>{this.primary.isEndpointConnected(e)||t()}))}isValidEndpointPayload(e){return this.primary.isValidEndpointPayload(e)||this.secondary.isValidEndpointPayload(e)}async closeEndpoint(e){await this.primary.closeEndpoint(e),await this.secondary.closeEndpoint(e)}isEndpointConnected(e){return this.primary.isEndpointConnected(e)||this.secondary.isEndpointConnected(e)}async addEndpoint(e,t){this.primary.isValidEndpointPayload(t)&&await this.primary.addEndpoint(e,t),this.secondary.isValidEndpointPayload(t)&&await this.secondary.addEndpoint(e,t)}receive(e){this.primary.receive(e),this.secondary.receive(e)}send(e,t,n){return this.primary.isEndpointConnected(e)?this.primary.send(e,t,n):this.secondary.send(e,t,n)}async close(){await Promise.all([this.primary.close(),this.secondary.close()])}}mt.default=vt;var Ct,bt,It=s&&s.__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},Et=s&&s.__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)},xt=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(xe,"__esModule",{value:!0}),xe.ConnectionManager=void 0;const At=Ae,Pt=d,Mt=Oe,_t=Fe,Ot=Je,St=Qe,Rt=pt,Ft=gt,jt=xt(mt);class kt extends Pt.Base{static getProtocolOptionsFromStrings(e){return e.map((e=>{switch(e){case"rtc":return _t.RTCInfo;case"classic":return Mt.ClassicInfo;default:return(0,At.exhaustiveCheck)(e,["rtc","classic"])}}))}constructor(e){super(e),Ct.set(this,void 0),bt.set(this,void 0),this.removeChannelFromProviderMap=e=>{this.providerMap.delete(e)},this.onmessage=e=>"process-channel-connection"===e.action&&(this.processChannelConnection(e),!0),this.providerMap=new Map,this.protocolManager=new Ft.ProtocolManager("node"===this.wire.environment.type?["classic"]:["rtc","classic"]),It(this,Ct,new Rt.MessageReceiver(e),"f"),It(this,bt,new Ot.RTCICEManager(e),"f"),e.registerMessageHandler(this.onmessage.bind(this))}createProvider(e,t){const n=Object.assign(this.wire.environment.getDefaultChannelOptions().create,e||{}),i=this.protocolManager.getProviderProtocols(n?.protocols),r=i.map((e=>{switch(e){case"rtc":return new _t.RTCStrategy;case"classic":return new Mt.ClassicStrategy(this.wire,Et(this,Ct,"f"),t.channelId,t);default:return(0,At.exhaustiveCheck)(e,["rtc","classic"])}}));let o;if(2===r.length){const[e,t]=r;o=jt.default.combine(e,t)}else{if(1!==r.length)throw new Error("failed to combine strategies");[o]=r}const s=new St.ChannelProvider(t,(()=>St.ChannelProvider.wireClose(this.wire,t.channelName)),o),a=t.channelId;return this.providerMap.set(a,{provider:s,strategy:o,supportedProtocols:kt.getProtocolOptionsFromStrings(i)}),St.ChannelProvider.setProviderRemoval(s,this.removeChannelFromProviderMap.bind(this)),s}async createClientOffer(e){const t=this.protocolManager.getClientProtocols(e?.protocols);let n;return{offer:{supportedProtocols:await Promise.all(t.map((async e=>{switch(e){case"rtc":{const{rtcClient:e,channels:t,offer:i,rtcConnectionId:r,channelsOpened:o}=await Et(this,bt,"f").startClientOffer();return n={rtcClient:e,channels:t,channelsOpened:o},{type:"rtc",version:_t.RTCInfo.version,payload:{offer:i,rtcConnectionId:r}}}case"classic":return{type:"classic",version:Mt.ClassicInfo.version};default:return(0,At.exhaustiveCheck)(e,["rtc","classic"])}}))),maxProtocols:2},rtc:n}}async createClientStrategy(e,t){t.endpointId||(t.endpointId=this.wire.environment.getNextMessageId(),Et(this,Ct,"f").checkForPreviousClientConnection(t.channelId));const n=t.answer??{supportedProtocols:[{type:"classic",version:1}]},i=(await Promise.all(n.supportedProtocols.map((async n=>"rtc"===n.type&&e?(await Et(this,bt,"f").finishClientOffer(e.rtcClient,n.payload.answer,e.channelsOpened),new _t.RTCStrategy):"classic"===n.type?new Mt.ClassicStrategy(this.wire,Et(this,Ct,"f"),t.endpointId,t):null)))).filter((e=>null!==e));let r;if(e&&!i.some((e=>e instanceof _t.RTCStrategy))&&e&&e.rtcClient.close(),i.length>=2)r=jt.default.combine(i[0],i[1]);else{if(!i.length)throw new Error("No compatible protocols");[r]=i}const o={endpointIdentity:t,rtc:e};return r.addEndpoint(t.channelId,o),r}async processChannelConnection(e){const{clientIdentity:t,providerIdentity:n,ackToSender:i,payload:r,offer:o}=e.payload;t.endpointId?t.isLocalEndpointId=!1:(t.endpointId=this.wire.environment.getNextMessageId(),t.isLocalEndpointId=!0);const s=n.channelId,a=this.providerMap.get(s);if(!a)return i.payload.success=!1,i.payload.reason=`Channel "${n.channelName}" has been destroyed.`,this.wire.sendRaw(i);const{provider:c,strategy:d,supportedProtocols:h}=a;try{if(!(c instanceof St.ChannelProvider))throw Error("Cannot connect to a channel client");const e=o??{supportedProtocols:[{type:"classic",version:1}],maxProtocols:1},n=this.protocolManager.getCompatibleProtocols(h,e);if(!n.length)throw new Error("This provider does not support any of the offered protocols.");const s=await c.processConnection(t,r);i.payload.payload=i.payload.payload||{};let a={supportedProtocols:[],endpointPayloadPromise:Promise.resolve({endpointIdentity:t})};return a=await n.reduce((async(e,t)=>{const n=await e;if("rtc"===t.type){const{answer:e,rtcClient:i,channels:r}=await Et(this,bt,"f").createProviderAnswer(t.payload.rtcConnectionId,t.payload.offer);n.supportedProtocols.push({type:"rtc",version:_t.RTCInfo.version,payload:{answer:e}}),n.endpointPayloadPromise=n.endpointPayloadPromise.then((e=>r.then((t=>({...e,rtc:{rtcClient:i,channels:t}})))))}else n.supportedProtocols.push({type:"classic",version:Mt.ClassicInfo.version});return n}),Promise.resolve(a)),a.endpointPayloadPromise.then((e=>d.addEndpoint(t.endpointId,e))),i.payload.payload.result=s,i.payload.payload.answer=a,this.wire.sendRaw(i)}catch(e){return i.payload.success=!1,i.payload.reason=e.message,this.wire.sendRaw(i)}}}xe.ConnectionManager=kt,Ct=new WeakMap,bt=new WeakMap;var Lt,Tt,$t,Bt=s&&s.__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},Gt=s&&s.__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)};Object.defineProperty(le,"__esModule",{value:!0}),le.Channel=void 0;const Wt=t,Ht=G,Nt=d,Dt=ue,Ut=xe,Vt=Qe;function zt(e){const t=Math.floor(e/10),n=Math.min(3e4,500*2**t);return new Promise((e=>{setTimeout((()=>{e(!1)}),n)}))}class Kt extends Nt.EmitterBase{constructor(e){super(e,"channel"),Lt.set(this,void 0),Tt.set(this,new Wt.EventEmitter),$t.set(this,new Ht.AsyncRetryableLazy((async()=>{await Promise.all([this.on("disconnected",(e=>{Dt.ChannelClient.handleProviderDisconnect(e)})),this.on("connected",((...e)=>{Gt(this,Tt,"f").emit("connected",...e)}))]).catch((()=>new Error("error setting up channel connection listeners")))}))),Bt(this,Lt,new Ut.ConnectionManager(e),"f")}async getAllChannels(){return this.wire.sendAction("get-all-channels").then((({payload:e})=>e.data))}async onChannelConnect(e){await this.on("connected",e)}async onChannelDisconnect(e){await this.on("disconnected",e)}async safeConnect(e,t,n){const i={count:0};do{let r=()=>{};const o=new Promise((t=>{r=n=>{e===n.channelName&&t(!0)},Gt(this,Tt,"f").on("connected",r)}));try{if(i.count>0){i.gotConnectedEvent=await Promise.race([zt(i.count),o]);const t=await this.wire.sendAction("connect-to-channel",{...n,retryInfo:i});return console.log(`Successfully connected to channelName: ${e}`),t.payload.data}const t=this.wire.sendAction("connect-to-channel",n);i.originalMessageId=t.messageId;return(await t).payload.data}catch(n){if(!n.message.includes("internal-nack"))throw n;t&&0===i.count&&console.warn(`No channel found for channelName: ${e}. Waiting for connection...`)}finally{i.count+=1,Gt(this,Tt,"f").removeListener("connected",r)}}while(t);throw new Error(`No channel found for channelName: ${e}.`)}async connect(e,t={}){if(await Gt(this,$t,"f").getValue(),!e||"string"!=typeof e)throw new Error("Please provide a channelName string to connect to a channel.");const n={wait:!0,...this.wire.environment.getDefaultChannelOptions().connect,...t},{offer:i,rtc:r}=await Gt(this,Lt,"f").createClientOffer(n);let o;(this.fin.me.isFrame||this.fin.me.isView||this.fin.me.isWindow)&&(o=(await this.fin.me.getInfo()).url);const s={channelName:e,...n,offer:i,connectionUrl:o},a=await this.safeConnect(e,n.wait,s),c=await Gt(this,Lt,"f").createClientStrategy(r,a),d=new Dt.ChannelClient(a,(()=>Dt.ChannelClient.wireClose(this.wire,a,a.endpointId)),c);return c.onEndpointDisconnect(a.channelId,(async()=>{try{await d.sendDisconnectAction()}catch(e){console.warn(`Something went wrong during disconnect for client with uuid: ${a.uuid} / name: ${a.name} / endpointId: ${a.endpointId}.`)}finally{Dt.ChannelClient.handleProviderDisconnect(a)}})),d}async create(e,t){if(!e)throw new Error("Please provide a channelName to create a channel");const{payload:{data:n}}=await this.wire.sendAction("create-channel",{channelName:e}),i=Gt(this,Lt,"f").createProvider(t,n);return this.on("client-disconnected",(t=>{t.channelName===e&&Vt.ChannelProvider.handleClientDisconnection(i,t)})),i}}le.Channel=Kt,Lt=new WeakMap,Tt=new WeakMap,$t=new WeakMap,Object.defineProperty(de,"__esModule",{value:!0}),de.InterAppPayload=de.InterApplicationBus=void 0;const qt=t,Jt=d,Yt=he,Zt=le,Qt=O;class Xt extends Jt.Base{constructor(e){super(e),this.events={subscriberAdded:"subscriber-added",subscriberRemoved:"subscriber-removed"},this.refCounter=new Yt.RefCounter,this.Channel=new Zt.Channel(e),this.emitter=new qt.EventEmitter,e.registerMessageHandler(this.onmessage.bind(this)),this.on=this.emitter.on.bind(this.emitter),this.removeAllListeners=this.emitter.removeAllListeners.bind(this.emitter)}async publish(e,t){await this.wire.sendAction("publish-message",{topic:e,message:t,sourceWindowName:this.me.name})}async send(e,t,n){const i=(0,Qt.validateIdentity)(e);if(i)throw new Error(i);await this.wire.sendAction("send-message",{destinationUuid:e.uuid,destinationWindowName:e.name,topic:t,message:n,sourceWindowName:this.me.name})}subscribe(e,t,n){const i=this.createSubscriptionKey(e.uuid,e.name||"*",t);return this.emitter.on(i,n),this.refCounter.actOnFirst(i,(async()=>{await this.wire.sendAction("subscribe",{sourceUuid:e.uuid,sourceWindowName:e.name||"*",topic:t,destinationWindowName:this.me.name})}),(()=>Promise.resolve()))}unsubscribe(e,t,n){const i=e.name||"*",r=this.createSubscriptionKey(e.uuid,i,t);return this.emitter.removeListener(r,n),this.refCounter.actOnLast(r,(async()=>{await this.wire.sendAction("unsubscribe",{sourceUuid:e.uuid,sourceWindowName:i,topic:t,destinationWindowName:this.me.name})}),(()=>new Promise((e=>e)).then((()=>{}))))}processMessage(e){const{payload:{message:t,sourceWindowName:n,sourceUuid:i,topic:r}}=e,o=[this.createSubscriptionKey(i,n,r),this.createSubscriptionKey(i,"*",r),this.createSubscriptionKey("*","*",r)],s={uuid:i,name:n};o.forEach((e=>{this.emitter.emit(e,t,s)}))}emitSubscriverEvent(e,t){const{payload:{targetName:n,uuid:i,topic:r}}=t,o={name:n,uuid:i,topic:r};this.emitter.emit(e,o)}createSubscriptionKey(e,t,n){const i=t||"*";if(!(e&&i&&n))throw new Error("Missing uuid, name, or topic string");return function(...e){return e.map((e=>Buffer.from(`${e}`).toString("base64"))).join("/")}(e,i,n)}onmessage(e){const{action:t}=e;switch(t){case"process-message":this.processMessage(e);break;case this.events.subscriberAdded:this.emitSubscriverEvent(this.events.subscriberAdded,e);break;case this.events.subscriberRemoved:this.emitSubscriverEvent(this.events.subscriberRemoved,e)}return!0}}de.InterApplicationBus=Xt;de.InterAppPayload=class{};var en={};Object.defineProperty(en,"__esModule",{value:!0}),en.Clipboard=void 0;const tn=d;class nn extends tn.Base{async writeText(e){await this.wire.sendAction("clipboard-write-text",e)}async readText(e){const{payload:t}=await this.wire.sendAction("clipboard-read-text",{type:e});return t.data}async writeImage(e){await this.wire.sendAction("clipboard-write-image",e)}async readImage(e={format:"dataURL"}){const{payload:t}=await this.wire.sendAction("clipboard-read-image",e);return t.data}async writeHtml(e){await this.wire.sendAction("clipboard-write-html",e)}async readHtml(e){const{payload:t}=await this.wire.sendAction("clipboard-read-html",{type:e});return t.data}async writeRtf(e){await this.wire.sendAction("clipboard-write-rtf",e)}async readRtf(e){const{payload:t}=await this.wire.sendAction("clipboard-read-rtf",{type:e});return t.data}async write(e){await this.wire.sendAction("clipboard-write",e)}async getAvailableFormats(e){const{payload:t}=await this.wire.sendAction("clipboard-read-formats",{type:e});return t.data}}en.Clipboard=nn;var rn={},on={},sn={};Object.defineProperty(sn,"__esModule",{value:!0}),sn.ExternalApplication=void 0;const an=d;class cn extends an.EmitterBase{constructor(e,t){super(e,"external-application",t.uuid),this.identity=t}getInfo(){return this.wire.sendAction("get-external-application-info",this.identity).then((({payload:e})=>e.data))}}sn.ExternalApplication=cn,Object.defineProperty(on,"__esModule",{value:!0}),on.ExternalApplicationModule=void 0;const dn=d,hn=sn;class ln extends dn.Base{wrap(e){return this.wire.sendAction("external-application-wrap").catch((e=>{})),Promise.resolve(new hn.ExternalApplication(this.wire,{uuid:e}))}wrapSync(e){return this.wire.sendAction("external-application-wrap-sync").catch((e=>{})),new hn.ExternalApplication(this.wire,{uuid:e})}}on.ExternalApplicationModule=ln,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(on,e),n(sn,e)}(rn);var un={},pn={},wn={};Object.defineProperty(wn,"__esModule",{value:!0}),wn._Frame=void 0;const yn=d;class fn extends yn.EmitterBase{constructor(e,t){super(e,"frame",t.uuid,t.name),this.identity=t}getInfo(){return this.wire.sendAction("get-frame-info",this.identity).then((({payload:e})=>e.data))}getParentWindow(){return this.wire.sendAction("get-parent-window",this.identity).then((({payload:e})=>e.data))}}wn._Frame=fn,Object.defineProperty(pn,"__esModule",{value:!0}),pn._FrameModule=void 0;const gn=d,mn=O,vn=wn;class Cn extends gn.Base{async wrap(e){this.wire.sendAction("frame-wrap").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}wrapSync(e){this.wire.sendAction("frame-wrap-sync").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}getCurrent(){return this.wire.sendAction("frame-get-current").catch((e=>{})),Promise.resolve(new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity()))}getCurrentSync(){return this.wire.sendAction("frame-get-current-sync").catch((e=>{})),new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity())}}pn._FrameModule=Cn,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(pn,e),n(wn,e)}(un);var bn={};Object.defineProperty(bn,"__esModule",{value:!0}),bn.GlobalHotkey=void 0;const In=d;class En extends In.EmitterBase{constructor(e){super(e,"global-hotkey")}async register(e,t){await this.on(e,t),await this.wire.sendAction("global-hotkey-register",{hotkey:e})}async unregister(e){await this.removeAllListeners(e),await this.wire.sendAction("global-hotkey-unregister",{hotkey:e})}async unregisterAll(){await Promise.all(this.eventNames().filter((e=>!("registered"===e||"unregistered"===e))).map((e=>this.removeAllListeners(e)))),await this.wire.sendAction("global-hotkey-unregister-all",{})}async isRegistered(e){const{payload:{data:t}}=await this.wire.sendAction("global-hotkey-is-registered",{hotkey:e});return t}}bn.GlobalHotkey=En;var xn,An={},Pn={},Mn={},_n=s&&s.__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)};Object.defineProperty(Mn,"__esModule",{value:!0}),Mn.Platform=void 0;const On=d,Sn=O,Rn=new Map;class Fn extends On.EmitterBase{constructor(e,t){super(t.wire,"application",e.uuid),this.getClient=e=>{this.wire.sendAction("platform-get-client",this.identity).catch((e=>{}));const t=e||this.identity,{uuid:n}=t;if(!Rn.has(n)){const e=_n(this,xn,"f").call(this,n);Rn.set(n,e)}return Rn.get(n)},xn.set(this,(async e=>{try{const t=`custom-frame-${e}`,n=await this._channel.connect(t,{wait:!1});return n.onDisconnection((()=>{Rn.delete(e)})),n}catch(t){throw Rn.delete(e),new Error("The targeted Platform is not currently running. Listen for application-started event for the given Uuid.")}})),this.launchLegacyManifest=this.launchContentManifest;const n=(0,Sn.validateIdentity)(e);if(n)throw new Error(n);this._channel=t,this.identity={uuid:e.uuid},this.Layout=this.fin.Platform.Layout,this.Application=this.fin.Application.wrapSync(this.identity)}async createView(e,t,n){this.wire.sendAction("platform-create-view",this.identity).catch((e=>{}));const i=await this.getClient(),r=await i.dispatch("create-view",{target:t,opts:e,targetView:n});if(!r||(0,Sn.validateIdentity)(r.identity))throw new Error(`When overwriting the createView call, please return an object that has a valid 'identity' property: ${JSON.stringify(r)}`);return this.fin.View.wrapSync(r.identity)}async createWindow(e){this.wire.sendAction("platform-create-window",this.identity).catch((e=>{}));const t=await this.getClient();e.reason||(e.reason="api-call");const n=await t.dispatch("create-view-container",e);if(!n||(0,Sn.validateIdentity)(n.identity))throw new Error(`When overwriting the createWindow call, please return an object that has a valid 'identity' property: ${JSON.stringify(n)}`);const{identity:i}=n,r=this.fin.Window.wrapSync(i);return r.name=i.name,r.uuid=i.uuid,r}async quit(){this.wire.sendAction("platform-quit",this.identity).catch((e=>{}));return(await this.getClient()).dispatch("quit")}async closeView(e){this.wire.sendAction("platform-close-view",this.identity).catch((e=>{}));const t=await this.getClient();await t.dispatch("close-view",{view:e})}async reparentView(e,t){console.warn("Platform.reparentView has been deprecated, please use Platform.createView"),this.wire.sendAction("platform-reparent-view",this.identity).catch((e=>{}));const n={...e,uuid:e.uuid??this.identity.uuid},i=await this.fin.View.wrap(n),r=await i.getOptions();return this.createView(r,t)}async getSnapshot(){this.wire.sendAction("platform-get-snapshot",this.identity).catch((e=>{}));return(await this.getClient()).dispatch("get-snapshot")}async getViewSnapshot(e){return(await this.getClient()).dispatch("get-view-snapshot",{viewIdentity:e})}async applySnapshot(e,t){this.wire.sendAction("platform-apply-snapshot",this.identity).catch((e=>{}));const n="Requested snapshot must be a valid Snapshot object, or a url or filepath to such an object.";let i;if("string"==typeof e)try{i=(await this._channel.wire.sendAction("get-application-manifest",{manifestUrl:e})).payload.data}catch(e){throw new Error(`${n}: ${e}`)}else i=e;if(!i.windows)throw new Error(n);const r=await this.getClient();return await r.dispatch("apply-snapshot",{snapshot:i,options:t}),this}async fetchManifest(e){return(await this.getClient()).dispatch("platform-fetch-manifest",{manifestUrl:e})}async launchContentManifest(e){this.wire.sendAction("platform-launch-content-manifest",this.identity).catch((()=>{}));const t=await this.getClient(),n=await this.fetchManifest(e);return t.dispatch("launch-into-platform",{manifest:n,manifestUrl:e}),this}async setWindowContext(e={},t){if(this.wire.sendAction("platform-set-window-context",this.identity).catch((e=>{})),!e)throw new Error("Please provide a serializable object or string to set the context.");const n=await this.getClient(),{entityType:i}=t?await this.fin.System.getEntityInfo(t.uuid,t.name):this.fin.me;await n.dispatch("set-window-context",{context:e,entityType:i,target:t||{uuid:this.fin.me.uuid,name:this.fin.me.name}})}async getWindowContext(e){this.wire.sendAction("platform-get-window-context",this.identity).catch((e=>{}));const t=await this.getClient(),{entityType:n}=e?await this.fin.System.getEntityInfo(e.uuid,e.name):this.fin.me;return t.dispatch("get-window-context",{target:e||{uuid:this.fin.me.uuid,name:this.fin.me.name},entityType:n})}async closeWindow(e,t={skipBeforeUnload:!1}){this.wire.sendAction("platform-close-window",this.identity).catch((e=>{}));return(await this.getClient()).dispatch("close-window",{windowId:e,options:t})}}Mn.Platform=Fn,xn=new WeakMap;var jn={},kn={},Ln={},Tn={};function $n(e){switch(e){case"columns":case"grid":case"rows":case"tabs":return!0;default:return!1}}Object.defineProperty(Tn,"__esModule",{value:!0}),Tn.overrideFromComposables=Tn.isValidPresetType=void 0,Tn.isValidPresetType=$n,Tn.overrideFromComposables=function(...e){return t=>e.reduceRight(((e,t)=>n=>t(e(n))),(e=>e))(t)},Tn.default={isValidPresetType:$n};var Bn={},Gn={},Wn={};Object.defineProperty(Wn,"__esModule",{value:!0}),Wn.ApiConsumer=void 0;Wn.ApiConsumer=class{constructor(e){this.strategy=e,this.consume=async e=>(await this.strategy.getExposedFunctions(e)).reduce(((t,n)=>({...t,[n.key]:this.strategy.createFunction(n,e)})),{})}};var Hn={},Nn={};Object.defineProperty(Nn,"__esModule",{value:!0}),Nn.expose=Nn.getExposedProperties=void 0;const Dn=Symbol("exposedProperties");Nn.getExposedProperties=e=>e[Dn]||e.prototype[Dn]||[];Nn.expose=e=>(t,n,i)=>{t[Dn]=t[Dn]||[],t[Dn].push({key:n,descriptor:i,options:e})},Object.defineProperty(Hn,"__esModule",{value:!0}),Hn.ApiExposer=void 0;const Un=Nn;Hn.ApiExposer=class{constructor(e){this.strategy=e,this.exposeInstance=async(e,t)=>{const n=(0,Un.getExposedProperties)(e),i=await Promise.all(n.map((async({key:n,options:i})=>({key:n,options:await this.strategy.exposeFunction(e[n].bind(e),{key:n,options:i,meta:t})}))));await this.strategy.exposeMeta(t,i)}}};var Vn={},zn={},Kn={};Object.defineProperty(Kn,"__esModule",{value:!0}),Kn.ChannelsConsumer=void 0;Kn.ChannelsConsumer=class{constructor(e){this.channel=e,this.getExposedFunctions=async e=>{const{id:t}=e,{props:n}=await this.channel.dispatch(`api-meta:${t}`);return n},this.createFunction=e=>(...t)=>{const{action:n}=e.options;return this.channel.dispatch(n,{args:t})}}};var qn={};Object.defineProperty(qn,"__esModule",{value:!0}),qn.ChannelsExposer=void 0;qn.ChannelsExposer=class{constructor(e){this.channelProviderOrClient=e,this.exposeFunction=async(e,t)=>{const{key:n,options:i,meta:r}=t,{id:o}=r,s=`${o}.${i?.action||n}`;return await this.channelProviderOrClient.register(s,(async({args:t})=>e(...t))),{action:s}},this.exposeMeta=async({id:e},t)=>{const n=`api-meta:${e}`;await this.channelProviderOrClient.register(n,(()=>({props:t})))}}},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Kn,e),n(qn,e)}(zn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(zn,e)}(Vn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Wn,e),n(Hn,e),n(Vn,e),n(Nn,e)}(Gn);var Jn={};Object.defineProperty(Jn,"__esModule",{value:!0}),Jn.createRelayedDispatch=exports.relayChannelClientApi_1=Jn.relayChannelClientApi=void 0;const Yn=["no longer connected","RTCDataChannel closed unexpectedly","The client you are trying to dispatch from is disconnected from the target provider"];exports.relayChannelClientApi_1=Jn.relayChannelClientApi=async(e,t)=>{e.register(`relay:${t}`,(({action:t,target:n,payload:i})=>e.dispatch(n,t,i))),await Promise.resolve()};Jn.createRelayedDispatch=(e,t,n,i)=>async(r,o)=>{try{return await e.dispatch(`relay:${n}`,{action:r,payload:o,target:t})}catch(e){if(s=e.message,Yn.some((e=>s.includes(e)))&&i)throw new Error(i);throw e}var s};var Zn,Qn,Xn,ei=s&&s.__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},ti=s&&s.__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)};Object.defineProperty(Bn,"__esModule",{value:!0}),Bn.ColumnOrRow=Bn.TabStack=Bn.LayoutNode=void 0;const ni=Gn,ii=Jn;class ri{constructor(e,t){Zn.set(this,void 0),this.isRoot=()=>ti(this,Zn,"f").isRoot(this.entityId),this.exists=()=>ti(this,Zn,"f").exists(this.entityId),this.getParent=async()=>{const e=await ti(this,Zn,"f").getParent(this.entityId);if(e)return ri.getEntity(e,ti(this,Zn,"f"))},this.createAdjacentStack=async(e,t)=>{const n=await ti(this,Zn,"f").createAdjacentStack(this.entityId,e,t);return ri.getEntity({entityId:n,type:"stack"},ti(this,Zn,"f"))},this.getAdjacentStacks=async e=>(await ti(this,Zn,"f").getAdjacentStacks({targetId:this.entityId,edge:e})).map((e=>ri.getEntity({type:"stack",entityId:e.entityId},ti(this,Zn,"f")))),ei(this,Zn,e,"f"),this.entityId=t}}Bn.LayoutNode=ri,Zn=new WeakMap,ri.newLayoutEntitiesClient=async(e,t,n)=>{const i=(0,ii.createRelayedDispatch)(e,n,"layout-relay","You are trying to interact with a layout component on a window that does not exist or has been destroyed.");return new ni.ApiConsumer(new ni.ChannelsConsumer({dispatch:i})).consume({id:t})},ri.getEntity=(e,t)=>{const{entityId:n,type:i}=e;switch(i){case"column":case"row":return new si(t,n,i);case"stack":return new oi(t,n);default:throw new Error(`Unrecognised Layout Entity encountered ('${JSON.stringify(e)})`)}};class oi extends ri{constructor(e,t){super(e,t),Qn.set(this,void 0),this.type="stack",this.getViews=()=>ti(this,Qn,"f").getStackViews(this.entityId),this.addView=async(e,t={index:0})=>ti(this,Qn,"f").addViewToStack(this.entityId,e,t),this.removeView=async e=>{await ti(this,Qn,"f").removeViewFromStack(this.entityId,e)},this.setActiveView=async e=>{await ti(this,Qn,"f").setStackActiveView(this.entityId,e)},ei(this,Qn,e,"f")}}Bn.TabStack=oi,Qn=new WeakMap;class si extends ri{constructor(e,t,n){super(e,t),Xn.set(this,void 0),this.getContent=async()=>(await ti(this,Xn,"f").getContent(this.entityId)).map((e=>ri.getEntity(e,ti(this,Xn,"f")))),ei(this,Xn,e,"f"),this.type=n}}Bn.ColumnOrRow=si,Xn=new WeakMap;var ai={};Object.defineProperty(ai,"__esModule",{value:!0}),ai.DEFAULT_LAYOUT_KEY=ai.LAYOUT_CONTROLLER_ID=void 0,ai.LAYOUT_CONTROLLER_ID="layout-entities",ai.DEFAULT_LAYOUT_KEY="__default__";var ci,di,hi,li=s&&s.__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)};Object.defineProperty(Ln,"__esModule",{value:!0}),Ln.Layout=void 0;const ui=G,pi=O,wi=d,yi=Tn,fi=Bn,gi=ai;class mi extends wi.Base{static getClient(e){return li(e,di,"f").getValue()}constructor(e,t){super(t),ci.add(this),di.set(this,new ui.Lazy((async()=>fi.LayoutNode.newLayoutEntitiesClient(await this.platform.getClient(),gi.LAYOUT_CONTROLLER_ID,this.identity)))),this.replace=async e=>{this.wire.sendAction("layout-replace").catch((e=>{}));const t=await this.platform.getClient();await t.dispatch("replace-layout",{target:this.identity,opts:{layout:e}})},this.replaceView=async(e,t)=>{this.wire.sendAction("layout-replace-view").catch((e=>{}));const n=await this.platform.getClient();await n.dispatch("replace-view",{target:this.identity,opts:{viewToReplace:e,newView:t}})},this.applyPreset=async e=>{this.wire.sendAction("layout-apply-preset").catch((e=>{}));const t=await this.platform.getClient(),{presetType:n}=e;if(!n||!(0,yi.isValidPresetType)(n))throw new Error("Cannot apply preset layout, please include an applicable presetType property in the PresetLayoutOptions.");await t.dispatch("apply-preset-layout",{target:this.identity,opts:{presetType:n}})};const n=(0,pi.validateIdentity)(e);if(n)throw new Error(n);this.identity=e,this.platform=this.fin.Platform.wrapSync({uuid:e.uuid}),e.uuid===this.fin.me.uuid&&e.name===this.fin.me.name&&(this.init=this.fin.Platform.Layout.init)}async getConfig(){this.wire.sendAction("layout-get-config").catch((e=>{}));return(await this.platform.getClient()).dispatch("get-frame-snapshot",{target:this.identity})}async getCurrentViews(){this.wire.sendAction("layout-get-views").catch((e=>{}));const e=await this.platform.getClient();return(await e.dispatch("get-layout-views",{target:this.identity})).map((e=>this.fin.View.wrapSync(e)))}async getRootItem(){this.wire.sendAction("layout-get-root-item").catch((()=>{}));const e=await li(this,di,"f").getValue(),t=await e.getRoot("layoutName"in this.identity?this.identity:void 0);return fi.LayoutNode.getEntity(t,e)}async getStackByViewIdentity(e){this.wire.sendAction("layout-get-stack-by-view").catch((()=>{}));const t=await li(this,di,"f").getValue(),n=await t.getStackByView(e);if(!n)throw new Error(`No stack found for view: ${e.uuid}/${e.name}`);return fi.LayoutNode.getEntity(n,t)}async addView(e,{location:t,targetView:n}={}){this.wire.sendAction("layout-add-view").catch((e=>{}));const{identity:i}=await li(this,ci,"m",hi).call(this,"layout-add-view",{viewOptions:e,location:t,targetView:n});return{identity:i}}async closeView(e){this.wire.sendAction("layout-close-view").catch((e=>{})),await li(this,ci,"m",hi).call(this,"layout-close-view",{viewIdentity:e})}}Ln.Layout=mi,di=new WeakMap,ci=new WeakSet,hi=async function(e,t){return(await this.platform.getClient()).dispatch(e,{target:this.identity,opts:t})};var vi,Ci,bi,Ii,Ei,xi=s&&s.__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)},Ai=s&&s.__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};Object.defineProperty(kn,"__esModule",{value:!0}),kn.LayoutModule=void 0;const Pi=d,Mi=Ln,_i=ai;class Oi extends Pi.Base{constructor(){super(...arguments),vi.add(this),Ci.set(this,!1),bi.set(this,null),this.init=async(e={})=>{if(this.wire.sendAction("layout-init").catch((e=>{})),!this.wire.environment.layoutAllowedInContext(this.fin))throw new Error("Layout.init can only be called from a Window context.");if(xi(this,Ci,"f"))throw new Error("Layout.init was already called, please use Layout.create to add additional layouts.");"openfin"===this.wire.environment.type&&await this.fin.Platform.getCurrentSync().getClient(),Ai(this,Ci,!0,"f"),Ai(this,bi,await this.wire.environment.initLayoutManager(this.fin,this.wire,e),"f"),await this.wire.environment.applyLayoutSnapshot(this.fin,xi(this,bi,"f"),e);const t={name:this.fin.me.name,uuid:this.fin.me.uuid};if(!e.layoutManagerOverride){const e={layoutName:_i.DEFAULT_LAYOUT_KEY,...t};return xi(this,Ii,"f").call(this,e)}return this.wrapSync(t)},Ii.set(this,(e=>{const t="[Layout] You are using a deprecated property `layoutManager` - it will throw if you access it starting in v37.",n=new Proxy({},{get(e,n){throw console.warn(`[Layout-mgr-proxy] accessing ${n.toString()}`),new Error(t)}}),i=Object.assign(this.wrapSync(e),{layoutManager:n});return new Proxy(i,{get(e,n){if("layoutManager"===n)throw console.warn(`[Layout-proxy] accessing ${n.toString()}`),new Error(t);return e[n]}})})),this.getCurrentLayoutManagerSync=()=>xi(this,vi,"m",Ei).call(this,"fin.Platform.Layout.getCurrentLayoutManagerSync()"),this.create=async e=>this.wire.environment.createLayout(xi(this,vi,"m",Ei).call(this,"fin.Platform.Layout.create()"),e),this.destroy=async e=>this.wire.environment.destroyLayout(xi(this,vi,"m",Ei).call(this,"fin.Platform.Layout.destroy()"),e)}async wrap(e){return this.wire.sendAction("layout-wrap").catch((e=>{})),new Mi.Layout(e,this.wire)}wrapSync(e){return this.wire.sendAction("layout-wrap-sync").catch((e=>{})),new Mi.Layout(e,this.wire)}async getCurrent(){if(this.wire.sendAction("layout-get-current").catch((e=>{})),"openfin"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error("You are not in a Window context. Only Windows can have a Layout.");const{uuid:e,name:t}=this.fin.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction("layout-get-current-sync").catch((e=>{})),"openfin"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error("You are not in a Window context. Only Windows can have a Layout.");const{uuid:e,name:t}=this.fin.me;return this.wrapSync({uuid:e,name:t})}async getLayoutByViewIdentity(e){this.wire.sendAction("layout-get-by-view-identity").catch((()=>{}));let t=await this.wire.environment.getViewWindowIdentity(this.fin,e);t.identity&&(t=t.identity);try{const n=this.wrapSync(t),i=await Mi.Layout.getClient(n),r=await i.getLayoutIdentityForViewOrThrow(e);return this.wrapSync(r)}catch(n){if(!["No action registered at target for","getLayoutIdentityForViewOrThrow is not a function"].some((e=>n.message.includes(e))))throw n;if(t.uuid===t.name)throw new Error(`View identity ${JSON.stringify(e)} is not attached to any layout in provider window ${JSON.stringify(t)}.`);return this.wrapSync(t)}}}kn.LayoutModule=Oi,Ci=new WeakMap,bi=new WeakMap,Ii=new WeakMap,vi=new WeakSet,Ei=function(e){if(!xi(this,bi,"f"))throw new Error(`You must call init before using the API ${e}`);return xi(this,bi,"f")},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(kn,e),n(Ln,e)}(jn),Object.defineProperty(Pn,"__esModule",{value:!0}),Pn.PlatformModule=void 0;const Si=d,Ri=Mn,Fi=jn;class ji extends Si.Base{constructor(e,t){super(e),this._channel=t,this.Layout=new Fi.LayoutModule(this.wire)}async init(e){if(!fin.__internal_.isPlatform||fin.me.name!==fin.me.uuid)throw new Error("fin.Platform.init should only be called from a custom platform provider running in the main window of the application.");return this.wire.environment.initPlatform(this.fin,e)}async wrap(e){return this.wire.sendAction("platform-wrap").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}wrapSync(e){return this.wire.sendAction("platform-wrap-sync").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}async getCurrent(){return this.wire.sendAction("platform-get-current").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction("platform-get-current-sync").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}start(e){return this.wire.sendAction("platform-start").catch((e=>{})),new Promise((async(t,n)=>{try{const{uuid:n}=e,i=await this.fin.Application._create({...e,isPlatformController:!0});i.once("platform-api-ready",(()=>t(this.wrapSync({uuid:n})))),i._run({uuid:n})}catch(e){n(e)}}))}startFromManifest(e,t){return this.wire.sendAction("platform-start-from-manifest").catch((e=>{})),new Promise((async(n,i)=>{try{const i=await this.fin.Application._createFromManifest(e);i.once("platform-api-ready",(()=>n(this.wrapSync({uuid:i.identity.uuid})))),i._run(t)}catch(e){i(e)}}))}}Pn.PlatformModule=ji,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Pn,e),n(Mn,e)}(An);var ki={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getMe=e.getBaseMe=e.environmentUnsupportedMessage=void 0;const t=J(),n=un,i=ie(),r=rn;function o(e,t,n){return{...{isView:"view"===e,isWindow:"window"===e,isFrame:"iframe"===e,isExternal:"external connection"===e},uuid:t,name:n,entityType:e}}e.environmentUnsupportedMessage="You are not running in OpenFin.",e.getBaseMe=o,e.getMe=function(s){const{uuid:a,name:c,entityType:d}=s.me,h={setContext(){throw new Error(e.environmentUnsupportedMessage)},addContextHandler(){throw new Error(e.environmentUnsupportedMessage)},getContextGroups(){throw new Error(e.environmentUnsupportedMessage)},joinContextGroup(){throw new Error(e.environmentUnsupportedMessage)},removeFromContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getAllClientsInContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getInfoForContextGroup(){throw new Error(e.environmentUnsupportedMessage)}},l="Interop API has not been instantiated. Either connection has failed or you have not declared interop in your config.",u={setContext(){throw new Error(l)},addContextHandler(){throw new Error(l)},getContextGroups(){throw new Error(l)},joinContextGroup(){throw new Error(l)},removeFromContextGroup(){throw new Error(l)},getAllClientsInContextGroup(){throw new Error(l)},getInfoForContextGroup(){throw new Error(l)}},p={eventNames:()=>{throw new Error(e.environmentUnsupportedMessage)},emit:()=>{throw new Error(e.environmentUnsupportedMessage)},listeners:()=>{throw new Error(e.environmentUnsupportedMessage)},listenerCount:()=>{throw new Error(e.environmentUnsupportedMessage)},on:()=>{throw new Error(e.environmentUnsupportedMessage)},addListener:()=>{throw new Error(e.environmentUnsupportedMessage)},once:()=>{throw new Error(e.environmentUnsupportedMessage)},prependListener:()=>{throw new Error(e.environmentUnsupportedMessage)},prependOnceListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeAllListeners:()=>{throw new Error(e.environmentUnsupportedMessage)}};switch(d){case"view":return Object.assign(new t.View(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case"window":return Object.assign(new i._Window(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case"iframe":return Object.assign(new n._Frame(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case"external connection":return Object.assign(new r.ExternalApplication(s,{uuid:a}),o(d,a,c),{interop:u,isOpenFin:!1});default:return{...o(d,a,c),...p,interop:h,isOpenFin:!1}}}}(ki);var Li={},Ti={},$i={};Object.defineProperty($i,"__esModule",{value:!0}),$i.createWarningObject=$i.createUnusableObject=void 0,$i.createUnusableObject=function(e){const t=()=>{throw new Error(e)};return new Proxy({},{apply:t,construct:t,defineProperty:t,deleteProperty:t,get:t,getOwnPropertyDescriptor:t,getPrototypeOf:t,has:t,isExtensible:t,ownKeys:t,preventExtensions:t,set:t,setPrototypeOf:t})},$i.createWarningObject=function(e,t){return new Proxy(t,{get:(...t)=>(console.warn(e),Reflect.get(...t)),set:(...t)=>(console.warn(e),Reflect.set(...t)),getOwnPropertyDescriptor:(...t)=>(console.warn(e),Reflect.getOwnPropertyDescriptor(...t)),ownKeys:(...t)=>(console.warn(e),Reflect.ownKeys(...t))})};var Bi,Gi={},Wi={};var Hi={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.wrapIntentHandler=e.BROKER_ERRORS=e.generateOverrideWarning=e.generateOverrideError=e.wrapContextHandler=e.wrapInTryCatch=e.generateId=void 0;e.generateId=()=>`${Math.random()}${Date.now()}`;e.wrapInTryCatch=(e,t)=>(...n)=>{try{return e(...n)}catch(e){throw new Error((t||"")+e)}};e.wrapContextHandler=(e,t)=>async n=>{try{await e(n)}catch(e){throw console.error(`Error thrown by handler ${t} for context type ${n.type}: ${e}`),e}};e.generateOverrideError=(e,t)=>`You have tried to to use ${e} but ${t} has not been overridden in the Interop Broker. Please override this function. Refer to our documentation for more info.`;e.generateOverrideWarning=(e,t,n,i)=>{const{uuid:r,name:o}=n;return i?`Entity with identity: ${r}/${o} has called ${i} or ${e} but ${t} has not been overridden.`:`Entity with identity: ${r}/${o} has called ${e} but ${t} has not been overridden.`},e.BROKER_ERRORS={fireIntent:(0,e.generateOverrideError)("fireIntent","handleFiredIntent"),fireIntentForContext:(0,e.generateOverrideError)("fireIntentForContext","handleFiredIntentForContext"),getInfoForIntent:(0,e.generateOverrideError)("getInfoForIntent","handleInfoForIntent"),getInfoForIntentsByContext:(0,e.generateOverrideError)("getInfoForIntentsByContext","handleInfoForIntentsByContext"),joinSessionContextGroupWithJoinContextGroup:"The Context Group you have tried to join is a Session Context Group. Custom Context Groups can only be defined by the Interop Broker through code or manifest configuration. Please use joinSessionContextGroup.",fdc3Open:(0,e.generateOverrideError)("fdc3.open","fdc3HandleOpen"),fdc3FindInstances:(0,e.generateOverrideError)("fdc3.findInstances","fdc3HandleFindInstances"),fdc3GetAppMetadata:(0,e.generateOverrideError)("fdc3.getAppMetadata","fdc3HandleGetAppMetadata"),fdc3GetInfo:(0,e.generateOverrideError)("fdc3.getInfo","fdc3HandleGetInfo")};e.wrapIntentHandler=(e,t)=>async n=>{try{return e(n)}catch(e){throw console.error(`Error thrown by handler ${t}: ${e}`),e}}}(Hi);var Ni,Di,Ui={};function Vi(){if(Di)return Gi;Di=1;var e,t,n,r=s&&s.__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},o=s&&s.__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)},a=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Gi,"__esModule",{value:!0}),Gi.InteropBroker=void 0;const c=d,h=a(function(){if(Bi)return Wi;Bi=1,Object.defineProperty(Wi,"__esModule",{value:!0});const e=Cr();return Wi.default=class{constructor(e,t){this.provider=e,this.id=t,this.lastContext=void 0,this.contextGroupMap=new Map,this.clients=new Map,this.registerListeners()}registerListeners(){this.provider.register(`sessionContextGroup:getContext-${this.id}`,this.getCurrentContext.bind(this)),this.provider.register(`sessionContextGroup:setContext-${this.id}`,this.setContext.bind(this)),this.provider.register(`sessionContextGroup:handlerAdded-${this.id}`,this.handlerAdded.bind(this)),this.provider.register(`sessionContextGroup:handlerRemoved-${this.id}`,this.handlerRemoved.bind(this))}getCurrentContext(e){return e.type?this.contextGroupMap.get(e.type):this.lastContext}setContext(t,n){const{context:i}=t,r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name} not in Session Client State Map`);this.contextGroupMap.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{e.contextHandlers.get(i.type)?.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getClientState(e){return this.clients.get(e.endpointId)}async handlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(i){const e=r.contextHandlers.get(i)||[];r.contextHandlers.set(i,[...e,n]);const o=this.contextGroupMap.get(i);o&&await this.provider.dispatch(t,n,o)}else{r.globalHandler=n;const e=[...this.contextGroupMap.keys()].map((async e=>{const i=this.contextGroupMap.get(e);i&&await this.provider.dispatch(t,n,i)}));await Promise.all(e)}}handlerRemoved(e,t){const{handlerId:n}=e,i=this.clients.get(t.endpointId);i?(Array.from(i.contextHandlers).forEach((([,e])=>{const t=e.indexOf(n);t>-1&&e.splice(t,1)})),i.globalHandler===n&&(i.globalHandler=void 0)):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={contextHandlers:new Map,clientIdentity:e,globalHandler:void 0};this.clients.set(e.endpointId,t)}}onDisconnection(e){this.clients.delete(e.endpointId)}},Wi}()),l=Hi,u=a(i),p=function(){if(Ni)return Ui;Ni=1,Object.defineProperty(Ui,"__esModule",{value:!0}),Ui.PrivateChannelProvider=void 0;const e=Vi();return Ui.PrivateChannelProvider=class t{constructor(e,t){this.provider=e,this.id=t,this.clients=new Map,this.registerListeners(),this.contextByContextType=new Map,this.lastContext=void 0,this.provider.onConnection((e=>this.registerNewClient(e))),this.provider.onDisconnection((async e=>{const{endpointId:t}=e;this.clients.has(t)&&await this.handleClientDisconnecting(e),0===(await this.provider.getAllClientInfo()).length&&this.provider.destroy()}))}getClientState(e){return this.clients.get(e.endpointId)}registerListeners(){this.provider.register("broadcast",this.broadcast.bind(this)),this.provider.register("getCurrentContext",this.getCurrentContext.bind(this)),this.provider.register("contextHandlerAdded",this.contextHandlerAdded.bind(this)),this.provider.register("contextHandlerRemoved",this.contextHandlerRemoved.bind(this)),this.provider.register("nonStandardHandlerRemoved",this.nonStandardHandlerRemoved.bind(this)),this.provider.register("onAddContextHandlerAdded",this.onAddContextHandlerAdded.bind(this)),this.provider.register("onDisconnectHandlerAdded",this.onDisconnectHandlerAdded.bind(this)),this.provider.register("onUnsubscribeHandlerAdded",this.onUnsubscribeHandlerAdded.bind(this)),this.provider.register("clientDisconnecting",((e,t)=>{this.handleClientDisconnecting(t)}))}broadcast(t,n){const{context:i}=t;if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name}, tried to call broadcast, is not connected to this Private Channel`);const r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to broadcast - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);this.contextByContextType.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{const t=e.handlerIdsByContextTypes.get(i.type);t&&t.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getCurrentContext(e,t){const{contextType:n}=e;if(!this.getClientState(t))throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call getCurrentContext, is not connected to this Private Channel`);if(void 0!==n){return this.contextByContextType.get(n)||null}return this.lastContext?this.lastContext:null}contextHandlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call addContextListener, is not connected to this Private Channel`);if(i){const e=r.handlerIdsByContextTypes.get(i)||[];r.handlerIdsByContextTypes.set(i,[...e,n])}else r.globalHandler=n;Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&e.onAddContextListenerHandlerId&&this.provider.dispatch(e.clientIdentity,e.onAddContextListenerHandlerId,i)}))}async contextHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);if(i){let e;if(i.globalHandler===n)i.globalHandler=void 0;else for(const[t,r]of i.handlerIdsByContextTypes){const i=r.indexOf(n);i>-1&&(r.splice(i,1),e=t)}const r=(await this.getConnectedClients()).map((async n=>{const{clientIdentity:i,clientIdentity:{endpointId:r},onUnsubscribeHandlerId:o}=n;r!==t.endpointId&&o&&await this.provider.dispatch(i,o,e)}));try{await Promise.all(r)}catch(e){throw console.error(`Problem when attempting to dispatch to onUnsubscribeHandlers. Error: ${e} Removing Client: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}`),new Error(e)}}else console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}.`)}nonStandardHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);i?i.onDisconnectHandlerId===n?i.onDisconnectHandlerId=void 0:i.onAddContextListenerHandlerId===n?i.onAddContextListenerHandlerId=void 0:i.onUnsubscribeHandlerId===n&&(i.onUnsubscribeHandlerId=void 0):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}onAddContextHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onAddContextListener, is not connected to this Private Channel`);n.onAddContextListenerHandlerId=i,Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&Array.from(e.handlerIdsByContextTypes.keys()).forEach((e=>{this.provider.dispatch(t,i,e)}))}))}onDisconnectHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onDisconnect, is not connected to this Private Channel`);n.onDisconnectHandlerId=i}onUnsubscribeHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onUnsubscribe, is not connected to this Private Channel`);n.onUnsubscribeHandlerId=i}removeClient(e){const t=this.getClientState(e);if(!t)throw new Error(`Client with Identity: ${e.uuid} ${e.name}, tried to call disconnect, is not connected to this Private Channel`);t.handlerIdsByContextTypes.clear(),this.clients.delete(e.endpointId)}async fireOnDisconnectForOtherClients(e){const{endpointId:t}=e,n=(await this.getConnectedClients()).map((async e=>{const{clientIdentity:{endpointId:n},onDisconnectHandlerId:i}=e;n!==t&&i&&await this.provider.dispatch(e.clientIdentity,i)}));try{await Promise.all(n)}catch(t){throw console.error(`Problem when attempting to dispatch to onDisconnectHandlers. Error: ${t} Disconnecting Client: uuid: ${e.uuid}. name: ${e.name}. endpointId: ${e.endpointId}`),new Error(t)}}async unsubscribeAll(e){const{endpointId:t}=e,n=this.clients.get(t);if(n){const t=Array.from(n.handlerIdsByContextTypes.values()).flat(),i=n.globalHandler;if(t.length>0){const n=t.map((async t=>this.contextHandlerRemoved({handlerId:t},e)));try{await Promise.all(n)}catch(e){console.error(e.message)}}if(i)try{await this.contextHandlerRemoved({handlerId:i},e)}catch(e){console.error(e.message)}}}async handleClientDisconnecting(e){await this.unsubscribeAll(e),this.removeClient(e),await this.fireOnDisconnectForOtherClients(e)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={clientIdentity:e,handlerIdsByContextTypes:new Map,globalHandler:void 0,onAddContextListenerHandlerId:void 0,onUnsubscribeHandlerId:void 0,onDisconnectHandlerId:void 0};this.clients.set(e.endpointId,t)}}async getConnectedClients(){const e=await this.provider.getAllClientInfo();return Array.from(this.clients.values()).filter((t=>{const{uuid:n,name:i}=t.clientIdentity;return e.some((e=>i===e.name&&n===e.uuid))}))}static init(e,n){return new t(e,n)}},Ui}(),w=G,y=[{id:"green",displayMetadata:{color:"#00CC88",name:"green"}},{id:"purple",displayMetadata:{color:"#8C61FF",name:"purple"}},{id:"orange",displayMetadata:{color:"#FF8C4C",name:"orange"}},{id:"red",displayMetadata:{color:"#FF5E60",name:"red"}},{id:"pink",displayMetadata:{color:"#FF8FB8",name:"pink"}},{id:"yellow",displayMetadata:{color:"#E9FF8F",name:"yellow"}}];let f=class i extends c.Base{constructor(i,s,a){super(i),e.set(this,void 0),t.set(this,void 0),n.set(this,void 0),this.getProvider=()=>o(this,n,"f").getValue(),this.interopClients=new Map,this.contextGroupsById=new Map,r(this,t,a.contextGroups??[...y],"f"),r(this,e,a.fdc3Info,"f"),a?.logging&&(this.logging=a.logging),this.intentClientMap=new Map,this.lastContextMap=new Map,this.sessionContextGroupMap=new Map,r(this,n,new w.Lazy(s),"f"),this.setContextGroupMap(),this.setupChannelProvider()}static createClosedConstructor(...e){return class extends i{constructor(...t){if(t.length){const[n,i,r]=t;if(r&&"object"==typeof r&&!(0,u.default)(r,e[2]))return console.warn("You have modified the parameters of the InteropOverride constructor. This behavior is deprecated and will be removed in a future version. You can modify these options in your manifest. Please consult our Interop docs for guidance on migrating to the new override scheme."),void super(e[0],e[1],r);console.warn("You are attempting to pass arguments to the InteropOverride constructor. This is not necessary, and these passed arguments will be ignored. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.")}super(...e)}}}setContext({context:e},t){this.wire.sendAction("interop-broker-set-context").catch((e=>{}));const n=this.getClientState(t);if(!n||!n.contextGroupId)throw n?new Error("You must join a context group before you can set context."):new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);{const{contextGroupId:t}=n;this.setContextForGroup({context:e},t)}}setContextForGroup({context:e},t){this.wire.sendAction("interop-broker-set-context-for-group").catch((e=>{}));const n=this.contextGroupsById.get(t);if(!n)throw new Error(`Unable to set context for context group that isn't in the context group mapping: ${t}.`);const r=i.checkContextIntegrity(e);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(e)}`);const o=e.type;n.set(o,e),this.lastContextMap.set(t,o);Array.from(this.interopClients.values()).filter((e=>e.contextGroupId===t)).forEach((t=>{for(const[,n]of t.contextHandlers)i.isContextTypeCompatible(o,n.contextType)&&this.invokeContextHandler(t.clientIdentity,n.handlerId,e)}))}getCurrentContext(e,t){this.wire.sendAction("interop-broker-get-current-context").catch((e=>{}));const n=this.getClientState(t);if(!n?.contextGroupId)throw new Error("You must be a member of a context group to call getCurrentContext");const{contextGroupId:i}=n,r=this.contextGroupsById.get(i),o=this.lastContextMap.get(i),s=e?.contextType??o;return r&&s?r.get(s):void 0}async joinContextGroup({contextGroupId:e,target:t},n){if(this.wire.sendAction("interop-broker-join-context-group").catch((e=>{})),this.sessionContextGroupMap.has(e))throw new Error(l.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup);if(t){i.hasEndpointId(t)&&await this.addClientToContextGroup({contextGroupId:e},t);try{const n=this.channel.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name));if(!n.length)throw new Error(`Given Identity ${t.uuid} ${t.name} is not connected to the Interop Broker.`);n.length>1&&console.warn(`More than one connection found for identity ${t.uuid} ${t.name}`);const i=[];for(const t of n)i.push(this.addClientToContextGroup({contextGroupId:e},t));await Promise.all(i)}catch(e){throw new Error(e)}}else await this.addClientToContextGroup({contextGroupId:e},n)}async addClientToContextGroup({contextGroupId:e},t){this.wire.sendAction("interop-broker-add-client-to-context-group").catch((e=>{}));const n=this.getClientState(t);if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(!this.getContextGroups().find((t=>t.id===e)))throw new Error(`Attempting to join a context group that does not exist: ${e}. You may only join existing context groups.`);if(n.contextGroupId!==e){n.contextGroupId=e,await this.setCurrentContextGroupInClientOptions(t,e);const i=this.contextGroupsById.get(e);for(const[,e]of n.contextHandlers){const{contextType:n,handlerId:r}=e;if(void 0===n)i.forEach(((e,n)=>{this.invokeContextHandler(t,r,e)}));else if(i.has(n)){const e=i.get(n);e&&this.invokeContextHandler(t,r,e)}}}}async removeFromContextGroup({target:e},t){if(this.wire.sendAction("interop-broker-remove-from-context-group").catch((e=>{})),e){i.hasEndpointId(e)&&await this.removeClientFromContextGroup(e);try{const t=this.channel.connections.filter((t=>t.uuid===e.uuid&&t.name===e.name));if(!t.length)throw new Error(`No connection found for given Identity ${e.uuid} ${e.name}`);t.length>1&&console.warn(`More than one connection found for identity ${e.uuid} ${e.name}`);const n=[];for(const e of t)n.push(this.removeClientFromContextGroup(e));await Promise.all(n)}catch(e){throw new Error(e)}}else await this.removeClientFromContextGroup(t)}async removeClientFromContextGroup(e){this.wire.sendAction("interop-broker-remove-client-from-context-group").catch((e=>{}));const t=this.getClientState(e);t&&(t.contextGroupId=void 0),await this.setCurrentContextGroupInClientOptions(e,null)}getContextGroups(){return this.wire.sendAction("interop-broker-get-context-groups").catch((e=>{})),o(this,t,"f").map((e=>({...e})))}getInfoForContextGroup({contextGroupId:e}){return this.wire.sendAction("interop-broker-get-info-for-context-group").catch((e=>{})),this.getContextGroups().find((t=>t.id===e))}getAllClientsInContextGroup({contextGroupId:e}){this.wire.sendAction("interop-broker-get-all-clients-in-context-group").catch((e=>{}));return Array.from(this.interopClients.values()).filter((t=>t.contextGroupId===e)).map((e=>e.clientIdentity))}async handleFiredIntent(e,t){const n=(0,l.generateOverrideWarning)("fdc3.raiseIntent","InteropBroker.handleFiredIntent",t,"interopClient.fireIntent");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntent)}async setIntentTarget(e,t){this.wire.sendAction("interop-broker-set-intent-target").catch((e=>{}));const n=this.intentClientMap.get(t.name),i=`intent-handler-${e.name}`;if(n){const t=n.get(i);if(t){if(t.pendingIntents.push(e),t.clientIdentity&&t.isReady){const{clientIdentity:e,pendingIntents:n}=t;try{const r=n[n.length-1];await this.invokeIntentHandler(e,i,r),t.pendingIntents=[]}catch(n){console.error(`Error invoking intent handler for client ${e.uuid}/${e.name}/${e.endpointId}`),t.isReady=!1}}}else n.set(i,{isReady:!1,pendingIntents:[e]})}else{this.intentClientMap.set(t.name,new Map);const n=this.intentClientMap.get(t.name);n&&n.set(i,{isReady:!1,pendingIntents:[e]})}}async handleInfoForIntent(e,t){const n=(0,l.generateOverrideWarning)("fdc3.findIntent","InteropBroker.handleInfoForIntent",t,"interopClient.getInfoForIntent");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntent)}async handleInfoForIntentsByContext(e,t){const n=(0,l.generateOverrideWarning)("fdc3.findIntentsByContext","InteropBroker.handleInfoForIntentsByContext",t,"interopClient.getInfoForIntentsByContext");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntentsByContext)}async handleFiredIntentForContext(e,t){const n=(0,l.generateOverrideWarning)("fdc3.raiseIntentForContext","InteropBroker.handleFiredIntentForContext",t,"interopClient.fireIntentForContext");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntentForContext)}async clientDisconnected(e){}async fdc3HandleOpen({app:e,context:t},n){const i=(0,l.generateOverrideWarning)("fdc3.open","InteropBroker.fdc3HandleOpen",n);throw console.warn(i),new Error(l.BROKER_ERRORS.fdc3Open)}async fdc3HandleFindInstances(e,t){const n=(0,l.generateOverrideWarning)("fdc3.open","InteropBroker.fdc3HandleFindInstances",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3FindInstances)}async fdc3HandleGetAppMetadata(e,t){const n=(0,l.generateOverrideWarning)("fdc3.getAppMetadata","InteropBroker.fdc3HandleGetAppMetadata",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3GetAppMetadata)}async invokeContextHandler(e,t,n){const i=await this.getProvider();try{await i.dispatch(e,t,n)}catch(i){console.error(`Error invoking context handler ${t} for context type ${n.type} in client ${e.uuid}/${e.name}/${e.endpointId}`,i)}}async invokeIntentHandler(e,t,n){const i=await this.getProvider();await i.dispatch(e,t,n)}async fdc3HandleGetInfo(t,n){const{fdc3Version:i}=t;return{fdc3Version:i,...o(this,e,"f"),optionalFeatures:{OriginatingAppMetadata:!1,UserChannelMembershipAPIs:!0},appMetadata:{appId:"",instanceId:""}}}async getAllClientInfo(){return(await this.getProvider()).getAllClientInfo()}decorateSnapshot(e){return{...e,interopSnapshotDetails:{contextGroupStates:this.getContextGroupStates()}}}applySnapshot(e,t){const n=e?.interopSnapshotDetails?.contextGroupStates;n&&(t?.closeExistingWindows||this.updateExistingClients(n),this.rehydrateContextGroupStates(n))}updateExistingClients(e){this.interopClients.forEach((t=>{const{clientIdentity:n,contextGroupId:r,contextHandlers:o}=t;if(r){const t=e[r];for(const[,e]of Object.entries(t))o.forEach((t=>{const{handlerId:r,contextType:o}=t;i.isContextTypeCompatible(e.type,o)&&this.invokeContextHandler(n,r,e)}))}}))}getContextGroupStates(){return i.toObject(this.contextGroupsById)}rehydrateContextGroupStates(e){const t=Object.entries(e);for(const[e,n]of t){const t=Object.entries(n);for(const[n,i]of t)if(this.contextGroupsById.has(e)){this.contextGroupsById.get(e).set(n,i)}else console.warn(`Attempting to set a context group that isn't in the context group mapping. Skipping context group rehydration for: ${e}`)}}contextHandlerRegistered({contextType:e,handlerId:t},n){const i={contextType:e,handlerId:t},r=this.getClientState(n);if(r?.contextHandlers.set(t,i),r&&r.contextGroupId){const{contextGroupId:i}=r,o=this.contextGroupsById.get(i);if(void 0===e)o.forEach(((e,i)=>{this.invokeContextHandler(n,t,e)}));else if(o.has(e)){const i=o.get(e);i&&this.invokeContextHandler(n,t,i)}}}async intentHandlerRegistered(e,t){const{handlerId:n}=e,i=this.intentClientMap.get(t.name),r=i?.get(n);if(i)if(r){const{pendingIntents:e}=r;r.clientIdentity=t,r.isReady=!0;try{if(e.length>0){const i=e[e.length-1];await this.invokeIntentHandler(t,n,i),r.pendingIntents=[]}}catch(e){console.error(`Error invoking intent handler: ${n} for client ${t.uuid}/${t.name}/${t.endpointId}`)}}else i.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t});else{this.intentClientMap.set(t.name,new Map);const e=this.intentClientMap.get(t.name);e&&e.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t})}}removeContextHandler({handlerId:e},t){const n=this.getClientState(t);n&&n.contextHandlers.delete(e)}handleJoinSessionContextGroup({sessionContextGroupId:e},t){try{if(!e)throw new Error("Failed to join session context group: must specify group id.");const n=this.sessionContextGroupMap.get(e);if(n)n.registerNewClient(t);else{const n=new h.default(this.channel,e);n.registerNewClient(t),this.sessionContextGroupMap.set(e,n)}return{hasConflict:this.contextGroupsById.has(e)}}catch(e){throw new Error(e)}}getClientState(e){return this.interopClients.get(e.endpointId)}static toObject(e){const t=Object.fromEntries(e),n={};return Object.entries(t).forEach((([e,t])=>{const i=Object.fromEntries(t);n[e]=i})),n}static checkContextIntegrity(e){if(!e)return{isValid:!1,reason:"No context supplied"};if("object"!=typeof e)return{isValid:!1,reason:"Context must be an Object"};if(!e.type)return{isValid:!1,reason:"Context must have a type property"};if(e.id&&"object"!=typeof e.id)return{isValid:!1,reason:"Context id must be an Object populated with key-value identifiers (if set)"};if(e.id){const{id:t}=e,n=Object.keys(t);let i=!1;if(!n.length)return{isValid:!1,reason:"Context id must have at least one key-value identifier"};if(n.forEach((e=>{"string"==typeof e&&"string"==typeof t[e]||(i=!0)})),i)return{isValid:!1,reason:"Context id key-value identifiers must be of type string"}}return e.name&&"string"!=typeof e.name?{isValid:!1,reason:"Context name must be of string type (if set)"}:{isValid:!0}}static hasEndpointId(e){return void 0!==e.endpointId}static isContextTypeCompatible(e,t){return void 0===t||e===t}setContextGroupMap(){for(const e of this.getContextGroups())this.contextGroupsById.set(e.id,new Map)}async setCurrentContextGroupInClientOptions(e,t){try{const n=await this.fin.System.getEntityInfo(e.uuid,e.name);let i;"view"===n.entityType?i=await this.fin.View.wrap(e):"window"===n.entityType&&(i=await this.fin.Window.wrap(e)),i&&await i.updateOptions({interop:{currentContextGroup:t}})}catch(e){}}async setupChannelProvider(){try{const e=await this.getProvider();this.channel=e,this.wireChannel(e)}catch(e){throw new Error(`Error setting up Interop Broker Channel Provider: ${e}`)}}wireChannel(e){e.onConnection((async(e,t)=>{if(!await this.isConnectionAuthorized(e,t))throw new Error(`Connection not authorized for ${e.uuid}, ${e.name}`);if(!e.endpointId)throw new Error("Version too old to be compatible with Interop. Please upgrade your runtime to a more recent version.");const n={contextGroupId:void 0,contextHandlers:new Map,clientIdentity:e};t?.currentContextGroup&&this.contextGroupsById.has(t.currentContextGroup)&&(n.contextGroupId=t?.currentContextGroup),this.interopClients.set(e.endpointId,n)})),e.onDisconnection((e=>{this.interopClients.delete(e.endpointId);const t=this.intentClientMap.get(e.name);t&&e.uuid===this.fin.me.uuid&&t.forEach((e=>{e.isReady=!1})),this.sessionContextGroupMap.forEach((t=>{t.onDisconnection(e)})),this.clientDisconnected(e)})),e.beforeAction((async(e,t,n)=>{if(!await this.isActionAuthorized(e,t,n))throw new Error(`Action (${e}) not authorized for ${n.uuid}, ${n.name}`);this.logging?.beforeAction?.enabled&&console.log(e,t,n)})),e.afterAction(((e,t,n)=>{this.logging?.afterAction?.enabled&&console.log(e,t,n)})),e.register("setContext",this.setContext.bind(this)),e.register("fireIntent",this.handleFiredIntent.bind(this)),e.register("getCurrentContext",this.getCurrentContext.bind(this)),e.register("getInfoForIntent",this.handleInfoForIntent.bind(this)),e.register("getInfoForIntentsByContext",this.handleInfoForIntentsByContext.bind(this)),e.register("fireIntentForContext",this.handleFiredIntentForContext.bind(this)),e.register("getContextGroups",this.getContextGroups.bind(this)),e.register("joinContextGroup",this.joinContextGroup.bind(this)),e.register("removeFromContextGroup",this.removeFromContextGroup.bind(this)),e.register("getAllClientsInContextGroup",this.getAllClientsInContextGroup.bind(this)),e.register("getInfoForContextGroup",this.getInfoForContextGroup.bind(this)),e.register("contextHandlerRegistered",this.contextHandlerRegistered.bind(this)),e.register("intentHandlerRegistered",this.intentHandlerRegistered.bind(this)),e.register("removeContextHandler",this.removeContextHandler.bind(this)),e.register("sessionContextGroup:createIfNeeded",this.handleJoinSessionContextGroup.bind(this)),e.register("fdc3Open",this.fdc3HandleOpen.bind(this)),e.register("fdc3v2FindIntentsByContext",this.handleInfoForIntentsByContext.bind(this)),e.register("fdc3FindInstances",this.fdc3HandleFindInstances.bind(this)),e.register("fdc3GetAppMetadata",this.fdc3HandleGetAppMetadata.bind(this)),e.register("fdc3v2GetInfo",(async(e,t)=>this.fdc3HandleGetInfo.bind(this)(e,t))),e.register("createPrivateChannelProvider",(async e=>{const{channelId:t}=e,n=await this.fin.InterApplicationBus.Channel.create(t);p.PrivateChannelProvider.init(n,t)}))}isConnectionAuthorized(e,t){return this.wire.sendAction("interop-broker-is-connection-authorized").catch((e=>{})),Promise.resolve(!0)}isActionAuthorized(e,t,n){return this.wire.sendAction("interop-broker-is-action-authorized").catch((e=>{})),Promise.resolve(!0)}};return Gi.InteropBroker=f,e=new WeakMap,t=new WeakMap,n=new WeakMap,Gi}var zi,Ki={},qi={},Ji=s&&s.__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},Yi=s&&s.__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)};Object.defineProperty(qi,"__esModule",{value:!0});const Zi=d,Qi=Hi;class Xi extends Zi.Base{constructor(e,t,n){super(e),zi.set(this,void 0),this.id=n,Ji(this,zi,t,"f")}async setContext(e){this.wire.sendAction("interop-session-context-group-set-context").catch((e=>{}));return(await Yi(this,zi,"f")).dispatch(`sessionContextGroup:setContext-${this.id}`,{sessionContextGroupId:this.id,context:e})}async getCurrentContext(e){this.wire.sendAction("interop-session-context-group-get-context").catch((e=>{}));return(await Yi(this,zi,"f")).dispatch(`sessionContextGroup:getContext-${this.id}`,{sessionContextGroupId:this.id,type:e})}async addContextHandler(e,t){if(this.wire.sendAction("interop-session-context-group-add-handler").catch((e=>{})),"function"!=typeof e)throw new Error("Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");const n=await Yi(this,zi,"f");let i;return i=t?`sessionContextHandler:invoke-${this.id}-${t}-${(0,Qi.generateId)()}`:`sessionContextHandler:invoke-${this.id}`,n.register(i,(0,Qi.wrapContextHandler)(e,i)),await n.dispatch(`sessionContextGroup:handlerAdded-${this.id}`,{handlerId:i,contextType:t}),{unsubscribe:await this.createUnsubscribeCb(i)}}async createUnsubscribeCb(e){const t=await Yi(this,zi,"f");return async()=>{t.remove(e),await t.dispatch(`sessionContextGroup:handlerRemoved-${this.id}`,{handlerId:e})}}getUserInstance(){return{id:this.id,setContext:(0,Qi.wrapInTryCatch)(this.setContext.bind(this),"Failed to set context: "),getCurrentContext:(0,Qi.wrapInTryCatch)(this.getCurrentContext.bind(this),"Failed to get context: "),addContextHandler:(0,Qi.wrapInTryCatch)(this.addContextHandler.bind(this),"Failed to add context handler: ")}}}qi.default=Xi,zi=new WeakMap;var er={},tr={},nr={},ir={},rr=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),or=s&&s.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),sr=s&&s.__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)&&rr(t,e,n);return or(t,e),t};Object.defineProperty(ir,"__esModule",{value:!0}),ir.PrivateChannelClient=void 0;const ar=sr(Hi);var cr,dr;function hr(){if(cr)return tr;cr=1;var e,t=s&&s.__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)},n=s&&s.__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},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(tr,"__esModule",{value:!0}),tr.FDC3ModuleBase=void 0;const o=nr,a=Hi,c=wr(),d=r(i);return tr.FDC3ModuleBase=class{get client(){return t(this,e,"f").call(this)}get fin(){return this.wire.getFin()}constructor(t,i){this.wire=i,e.set(this,void 0),n(this,e,t,"f")}async broadcast(e){return this.wire.sendAction("fdc3-broadcast").catch((e=>{})),this.client.setContext(e)}async _open(e,t){this.wire.sendAction("fdc3-open").catch((e=>{}));try{return await c.InteropClient.ferryFdc3Call(this.client,"fdc3Open",{app:e,context:t})}catch(e){const t=e.message===a.BROKER_ERRORS.fdc3Open?"ResolverUnavailable":e.message;throw new Error(t)}}async _getChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:"system",...(0,o.getUnsupportedChannelApis)()})))}async getOrCreateChannel(e){this.wire.sendAction("fdc3-get-or-create-channel").catch((e=>{}));const t=(await this._getChannels()).find((t=>t.id===e));if(t)return{...t,type:"system",...(0,o.getUnsupportedChannelApis)()};try{const t=await this.client.joinSessionContextGroup(e);return(0,o.buildAppChannelObject)(t)}catch(e){throw console.error(e.message),new Error(o.ChannelError.CreationFailed)}}async getSystemChannels(){return this.wire.sendAction("fdc3-get-system-channels").catch((e=>{})),this._getChannels()}async joinChannel(e){this.wire.sendAction("fdc3-join-channel").catch((e=>{}));try{return await this.client.joinContextGroup(e)}catch(e){if(e.message===a.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup?console.error("The Channel you have tried to join is an App Channel. Custom Channels can only be defined by the Interop Broker through code or manifest configuration. Please use getOrCreateChannel."):console.error(e.message),e.message.startsWith("Attempting to join a context group that does not exist"))throw new Error(o.ChannelError.NoChannelFound);throw new Error(o.ChannelError.AccessDenied)}}async getCurrentChannel(){this.wire.sendAction("fdc3-get-current-channel").catch((e=>{}));const e=await this.getCurrentContextGroupInfo();return e?this.buildChannelObject(e):null}async leaveCurrentChannel(){return this.wire.sendAction("fdc3-leave-current-channel").catch((e=>{})),this.client.removeFromContextGroup()}async getCurrentContextGroupInfo(){const e=await this.client.getContextGroups(),t=e.map((async e=>this.client.getAllClientsInContextGroup(e.id))),n=(await Promise.all(t)).findIndex((e=>e.some((e=>{const{uuid:t,name:n}=e;return this.wire.me.uuid===t&&this.wire.me.name===n}))));return e[n]}async buildChannelObject(e){return{...e,type:"system",addContextListener:(...[e,t])=>{let n,i;"function"==typeof e?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),n=e):(n=t,"string"==typeof e&&(i=e));const r=(async()=>{let e=!0;const t=await this.client.getCurrentContext(i);return this.client.addContextHandler(((i,r)=>{if(!e||(e=!1,!(0,d.default)(t,i)))return n(i,r)}),i)})();return{...r,unsubscribe:()=>r.then((e=>e.unsubscribe()))}},broadcast:this.broadcast.bind(this),getCurrentContext:async e=>{const t=await this.client.getCurrentContext(e);return void 0===t?null:t}}}},e=new WeakMap,tr}ir.PrivateChannelClient=class{constructor(e,t){this.id=t,this.client=e,this.listeners=new Map}async broadcast(e){return this.client.dispatch("broadcast",{context:e})}async getCurrentContext(e){return this.client.dispatch("getCurrentContext",{contextType:e})}async addContextListener(e,t){if("function"!=typeof t)throw new Error("Non-function argument passed to the second parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");let n;n=e?`contextHandler:invoke-${this.id}-${e}-${ar.generateId()}`:`contextHandler:invoke-${this.id}-${ar.generateId()}`,this.client.register(n,ar.wrapContextHandler(t,n));const i={unsubscribe:await this.createContextUnsubscribeCb(n)};return this.listeners.set(n,i),await this.client.dispatch("contextHandlerAdded",{handlerId:n,contextType:e}),i}createNonStandardUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch("nonStandardHandlerRemoved",{handlerId:e})}}createContextUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch("contextHandlerRemoved",{handlerId:e})}}onAddContextListener(e){const t=`onContextHandlerAdded:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch("onAddContextHandlerAdded",{handlerId:t}),n}onDisconnect(e){const t=`onDisconnect:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch("onDisconnectHandlerAdded",{handlerId:t}),n}onUnsubscribe(e){const t=`onUnsubscribe:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch("onUnsubscribeHandlerAdded",{handlerId:t}),n}async cleanUpAllSubs(){Array.from(this.listeners.keys()).forEach((e=>{this.client.remove(e),this.listeners.delete(e)}))}async disconnect(){try{await this.client.dispatch("clientDisconnecting"),await this.cleanUpAllSubs(),await this.client.disconnect()}catch(e){throw new Error(e.message)}}},function(e){var t=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.getIntentResolution=e.isChannel=e.isContext=e.connectPrivateChannel=e.buildAppChannelObject=e.buildPrivateChannelObject=e.ChannelError=e.ResultError=e.UnsupportedChannelApiError=e.getUnsupportedChannelApis=void 0;const n=Hi,r=ir,o=t(i);e.getUnsupportedChannelApis=e=>({addContextListener:()=>{throw new a("Channel.addContextListener",e)},broadcast:()=>{throw new a("Channel.broadcast",e)},getCurrentContext:()=>{throw new a("Channel.getCurrentContext",e)}});class a extends Error{constructor(e,t="System"){super(e),this.message=`Calling ${e} on an instance of a ${t} Channel returned by fdc3.get${t}Channels is not supported. If you would like to use a ${t} Channel, please use fdc3.joinChannel, fdc3.addContextListener, and fdc3.broadcast instead.`}}var c,d;e.UnsupportedChannelApiError=a,function(e){e.NoResultReturned="NoResultReturned",e.IntentHandlerRejected="IntentHandlerRejected"}(c=e.ResultError||(e.ResultError={})),(d=e.ChannelError||(e.ChannelError={})).NoChannelFound="NoChannelFound",d.AccessDenied="AccessDenied",d.CreationFailed="CreationFailed";e.buildPrivateChannelObject=e=>{let t=!1;const n=()=>{if(t)throw new Error("Private Channel Client has been disconnected from the Private Channel")};return{id:e.id,type:"private",broadcast:async t=>(n(),e.broadcast(t)),getCurrentContext:async t=>(n(),e.getCurrentContext(t)),addContextListener:async(t,i)=>{n();let r=i,o=t;"function"==typeof t&&(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),r=t,o=null);return e.addContextListener(o,r)},onAddContextListener:t=>(n(),e.onAddContextListener(t)),disconnect:async()=>(n(),t=!0,e.disconnect()),onDisconnect:t=>(n(),e.onDisconnect(t)),onUnsubscribe:t=>(n(),e.onUnsubscribe(t))}};e.buildAppChannelObject=e=>({id:e.id,type:"app",broadcast:e.setContext,getCurrentContext:async t=>{const n=await e.getCurrentContext(t);return void 0===n?null:n},addContextListener:(t,n)=>{let i,r;"function"==typeof t?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),i=t):(i=n,"string"==typeof t&&(r=t));const s=(async()=>{let t=!0;const n=await e.getCurrentContext(r);return e.addContextHandler(((e,r)=>{if(!t||(t=!1,!(0,o.default)(n,e)))return i(e,r)}),r)})();return{...s,unsubscribe:()=>s.then((e=>e.unsubscribe()))}}});e.connectPrivateChannel=async t=>{try{const n=await fin.InterApplicationBus.Channel.connect(t),i=new r.PrivateChannelClient(n,t);return(0,e.buildPrivateChannelObject)(i)}catch(e){throw new Error(`Private Channel with id: ${t} doesn't exist`)}};e.isContext=e=>{if(e&&"object"==typeof e&&"type"in e){const{type:t}=e;return"string"==typeof t}return!1};e.isChannel=e=>{if(e&&"object"==typeof e&&"type"in e&&"id"in e){const{type:t,id:n}=e;return"string"==typeof t&&"string"==typeof n&&("app"===t||"private"===t)}return!1};e.getIntentResolution=async(t,i,r,o)=>{const s=(0,n.generateId)(),a=new Promise(((e,t)=>{fin.InterApplicationBus.subscribe({uuid:"*"},s,(t=>{e(t)})).catch((()=>t(new Error("getResult is not supported in this environment"))))})),d=r?{target:r,intentResolutionResultId:s}:{intentResolutionResultId:s},h=o?{name:o,context:i,metadata:d}:{...i,metadata:d},l=async()=>{let n=await a;if(!n||"object"!=typeof n)throw new Error(c.NoResultReturned);const{error:i}=n;if(i)throw new Error(c.IntentHandlerRejected);if((0,e.isChannel)(n)){const{id:i,type:r}=n;switch(r){case"private":n=await(0,e.connectPrivateChannel)(i);break;case"app":{const r=await t.joinSessionContextGroup(i);n=(0,e.buildAppChannelObject)(r);break}}}else if(!(0,e.isContext)(n))throw new Error(c.NoResultReturned);return n},u=o?await t.fireIntent(h):await t.fireIntentForContext(h);return"object"!=typeof u?{source:{appId:"",instanceId:""},intent:"",version:"2.0",getResult:l}:{...u,getResult:l}}}(nr);var lr,ur,pr={};function wr(){if(ur)return Ki;ur=1;var e,t,n=s&&s.__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},i=s&&s.__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)},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ki,"__esModule",{value:!0}),Ki.InteropClient=void 0;const o=d,a=r(qi),c=function(){if(dr)return er;dr=1,Object.defineProperty(er,"__esModule",{value:!0}),er.Fdc3Module=void 0;const e=Hi,t=hr();class n extends t.FDC3ModuleBase{async open(e,t){await super._open(e,t)}addContextListener(e,t){let n;return this.wire.sendAction("fdc3-add-context-listener").catch((e=>{})),"function"==typeof e?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),n=this.client.addContextHandler(e)):n=this.client.addContextHandler(t,null===e?void 0:e),{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}addIntentListener(e,t){this.wire.sendAction("fdc3-add-intent-listener").catch((e=>{}));const n=this.client.registerIntentHandler((e=>{const{context:n,metadata:i}=e,{metadata:r}=n,o=i?.intentResolutionResultId||r?.intentResolutionResultId;o&&this.fin.InterApplicationBus.publish(o,null).catch((()=>null)),t(e.context)}),e,{fdc3Version:"1.2"});return{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}async raiseIntent(t,n,i){this.wire.sendAction("fdc3-raise-intent").catch((e=>{}));const r=i?{name:t,context:n,metadata:{target:i}}:{name:t,context:n};try{return await this.client.fireIntent(r)}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntent?"ResolverUnavailable":t.message;throw new Error(n)}}async findIntent(t,n){this.wire.sendAction("fdc3-find-intent").catch((e=>{}));try{return await this.client.getInfoForIntent({name:t,context:n})}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntent?"ResolverUnavailable":t.message;throw new Error(n)}}async findIntentsByContext(t){this.wire.sendAction("fdc3-find-intents-by-context").catch((e=>{}));try{return await this.client.getInfoForIntentsByContext(t)}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntentsByContext?"ResolverUnavailable":t.message;throw new Error(n)}}async raiseIntentForContext(t,n){this.wire.sendAction("fdc3-raise-intent-for-context").catch((e=>{}));try{return await this.client.fireIntentForContext({...t,metadata:{target:n}})}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntentForContext?"ResolverUnavailable":t.message;throw new Error(n)}}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}getInfo(){return this.wire.sendAction("fdc3-get-info").catch((e=>{})),{providerVersion:this.wire.environment.getAdapterVersionSync(),provider:`openfin-${this.wire.me.uuid}`,fdc3Version:"1.2"}}}return er.Fdc3Module=n,er}(),h=function(){if(lr)return pr;lr=1,Object.defineProperty(pr,"__esModule",{value:!0}),pr.Fdc3Module2=void 0;const e=hr(),t=Hi,n=wr(),i=nr,r=ir;class o extends e.FDC3ModuleBase{async open(e,t){return"string"==typeof e&&console.warn("Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string })."),super._open(e,t)}async findInstances(e){this.wire.sendAction("fdc3-find-instances").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,"fdc3FindInstances",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3FindInstances?"ResolverUnavailable":e.message;throw new Error(n)}}async getAppMetadata(e){this.wire.sendAction("fdc3-get-app-metadata").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,"fdc3GetAppMetadata",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3GetAppMetadata?"ResolverUnavailable":e.message;throw new Error(n)}}async addContextListener(e,t){this.wire.sendAction("fdc3-add-context-listener").catch((e=>{}));const n=e=>t=>{const{contextMetadata:n,...i}=t,r=n?[{...i},n]:[t,null];e(...r)};let i=t,r=n(i);return"function"==typeof e?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),i=e,r=n(i),this.client.addContextHandler(r)):this.client.addContextHandler(r,null===e?void 0:e)}async findIntent(e,n,i){this.wire.sendAction("fdc3-find-intent").catch((e=>{}));try{return await this.client.getInfoForIntent({name:e,context:n,metadata:{resultType:i}})}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntent?"ResolverUnavailable":e.message;throw new Error(n)}}async findIntentsByContext(e,i){this.wire.sendAction("fdc3-find-intents-by-context").catch((e=>{}));const r=i?{context:e,metadata:{resultType:i}}:e;try{return await n.InteropClient.ferryFdc3Call(this.client,"fdc3v2FindIntentsByContext",r)}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntentsByContext?"ResolverUnavailable":e.message;throw new Error(n)}}async raiseIntent(e,n,r){this.wire.sendAction("fdc3-raise-intent").catch((e=>{}));try{return"string"==typeof r&&console.warn("Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string })."),(0,i.getIntentResolution)(this.client,n,r,e)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?"ResolverUnavailable":e.message;throw new Error(n)}}async raiseIntentForContext(e,n){this.wire.sendAction("fdc3-raise-intent-for-context").catch((e=>{}));try{return"string"==typeof n&&console.warn("Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string })."),(0,i.getIntentResolution)(this.client,e,n)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?"ResolverUnavailable":e.message;throw new Error(n)}}async addIntentListener(e,t){if(this.wire.sendAction("fdc3-add-intent-listener").catch((e=>{})),"string"!=typeof e)throw new Error("First argument must be an Intent name");return this.client.registerIntentHandler((async e=>{let n,i;const{context:r,metadata:o}=e,{contextMetadata:s,metadata:a,...c}=r,d=o?.intentResolutionResultId||a?.intentResolutionResultId;try{const e=a?{metadata:a,...c}:{...c};n=await t(e,s),i=n}catch(e){n=e,i={error:!0}}if(d&&this.fin.InterApplicationBus.publish(d,i).catch((()=>null)),n instanceof Error)throw new Error(n.message);return n}),e,{fdc3Version:"2.0"})}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}async createPrivateChannel(){const e=(0,t.generateId)();await n.InteropClient.ferryFdc3Call(this.client,"createPrivateChannelProvider",{channelId:e});const o=await this.fin.InterApplicationBus.Channel.connect(e),s=new r.PrivateChannelClient(o,e);return(0,i.buildPrivateChannelObject)(s)}async getUserChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:"user",...(0,i.getUnsupportedChannelApis)("User")})))}async getSystemChannels(){return console.warn("This API has been deprecated. Please use fdc3.getUserChannels instead."),super.getSystemChannels()}async joinUserChannel(e){return super.joinChannel(e)}async joinChannel(e){return console.warn("This API has been deprecated. Please use fdc3.joinUserChannel instead."),super.joinChannel(e)}async getCurrentChannel(){const e=await super.getCurrentChannel();return e?{...e,type:"user",broadcast:this.broadcast.bind(this)}:null}async getInfo(){return n.InteropClient.ferryFdc3Call(this.client,"fdc3v2GetInfo",{fdc3Version:"2.0"})}}return pr.Fdc3Module2=o,pr}(),l=Hi;let u=class extends o.Base{constructor(i,r){super(i),e.set(this,void 0),t.set(this,void 0),n(this,t,new Map,"f"),n(this,e,r,"f")}async setContext(t){this.wire.sendAction("interop-client-set-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("setContext",{context:t})}async addContextHandler(t,n){if(this.wire.sendAction("interop-client-add-context-handler").catch((e=>{})),"function"!=typeof t)throw new Error("Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");const r=await i(this,e,"f");let o;o=n?`invokeContextHandler-${n}-${(0,l.generateId)()}`:"invokeContextHandler";const s=(0,l.wrapContextHandler)(t,o);return r.register(o,s),await r.dispatch("contextHandlerRegistered",{handlerId:o,contextType:n}),{unsubscribe:async()=>{r.remove(o),await r.dispatch("removeContextHandler",{handlerId:o})}}}async getContextGroups(){this.wire.sendAction("interop-client-get-context-groups").catch((e=>{}));return(await i(this,e,"f")).dispatch("getContextGroups")}async joinContextGroup(t,n){this.wire.sendAction("interop-client-join-context-group").catch((e=>{}));const r=await i(this,e,"f");if(!t)throw new Error("No contextGroupId specified for joinContextGroup.");return r.dispatch("joinContextGroup",{contextGroupId:t,target:n})}async removeFromContextGroup(t){this.wire.sendAction("interop-client-remove-from-context-group").catch((e=>{}));return(await i(this,e,"f")).dispatch("removeFromContextGroup",{target:t})}async getAllClientsInContextGroup(t){this.wire.sendAction("interop-client-get-all-clients-in-context-group").catch((e=>{}));const n=await i(this,e,"f");if(!t)throw new Error("No contextGroupId specified for getAllClientsInContextGroup.");return n.dispatch("getAllClientsInContextGroup",{contextGroupId:t})}async getInfoForContextGroup(t){this.wire.sendAction("interop-client-get-info-for-context-group").catch((e=>{}));const n=await i(this,e,"f");if(!t)throw new Error("No contextGroupId specified for getInfoForContextGroup.");return n.dispatch("getInfoForContextGroup",{contextGroupId:t})}async fireIntent(t){this.wire.sendAction("interop-client-fire-intent").catch((e=>{}));return(await i(this,e,"f")).dispatch("fireIntent",t)}async registerIntentHandler(t,n,r){this.wire.sendAction("interop-client-register-intent-handler").catch((e=>{}));const o=await i(this,e,"f"),s=`intent-handler-${n}`,a=(0,l.wrapIntentHandler)(t,s);try{await o.register(s,a),await o.dispatch("intentHandlerRegistered",{handlerId:s,...r})}catch(e){throw new Error("Unable to register intent handler")}return{unsubscribe:async()=>{o.remove(s)}}}async getCurrentContext(t){this.wire.sendAction("interop-client-get-current-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("getCurrentContext",{contextType:t})}async getInfoForIntent(t){this.wire.sendAction("interop-client-get-info-for-intent").catch((e=>{}));return(await i(this,e,"f")).dispatch("getInfoForIntent",t)}async getInfoForIntentsByContext(t){this.wire.sendAction("interop-client-get-info-for-intents-by-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("getInfoForIntentsByContext",t)}async fireIntentForContext(t){this.wire.sendAction("interop-client-fire-intent-for-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("fireIntentForContext",t)}async joinSessionContextGroup(n){try{const r=i(this,t,"f").get(n);if(r)return r.getUserInstance();const o=await i(this,e,"f"),{hasConflict:s}=await o.dispatch("sessionContextGroup:createIfNeeded",{sessionContextGroupId:n});s&&console.warn(`A (non-session) context group with the name "${n}" already exists. If you are trying to join a Context Group, call joinContextGroup instead.`);const c=new a.default(this.wire,i(this,e,"f"),n);return i(this,t,"f").set(n,c),c.getUserInstance()}catch(e){throw console.error(`Error thrown trying to create Session Context Group with id "${n}": ${e}`),e}}async onDisconnection(t){this.wire.sendAction("interop-client-add-ondisconnection-listener").catch((e=>{}));return(await i(this,e,"f")).onDisconnection((e=>{const{uuid:n}=e;t({type:"interop-broker",topic:"disconnected",brokerName:n})}))}getFDC3Sync(e){switch(e){case"1.2":return new c.Fdc3Module((()=>this),this.wire);case"2.0":return new h.Fdc3Module2((()=>this),this.wire);default:throw new Error(`Invalid FDC3 version provided: ${e}. Must be '1.2' or '2.0'`)}}async getFDC3(e){return this.getFDC3Sync(e)}static async ferryFdc3Call(t,n,r){return(await i(t,e,"f")).dispatch(n,r||null)}};return Ki.InteropClient=u,e=new WeakMap,t=new WeakMap,Ki}var yr,fr,gr,mr={};function vr(){if(yr)return mr;yr=1,Object.defineProperty(mr,"__esModule",{value:!0}),mr.overrideCheck=mr.checkFDC32Overrides=mr.getDefaultViewFdc3VersionFromAppInfo=void 0;const e=Vi();function t(t){return["fdc3HandleFindInstances","handleInfoForIntent","handleInfoForIntentsByContext","fdc3HandleGetAppMetadata","fdc3HandleGetInfo","fdc3HandleOpen","handleFiredIntent","handleFiredIntentForContext"].filter((n=>t[n]===e.InteropBroker.prototype[n]))}return mr.getDefaultViewFdc3VersionFromAppInfo=function({manifest:e,initialOptions:t}){const n=e?.platform?.defaultViewOptions?.fdc3InteropApi??t.defaultViewOptions?.fdc3InteropApi;return["1.2","2.0"].includes(n??"")?n:void 0},mr.checkFDC32Overrides=t,mr.overrideCheck=function(e,n){if(n&&"2.0"===n){const n=t(e);n.length>0&&console.warn(`WARNING: FDC3 2.0 has been set as a default option for Views in this Platform, but the required InteropBroker APIs for FDC3 2.0 compliance have not all been overridden.\nThe following APIs need to be overridden:\n${n.join("\n")}`)}},mr}function Cr(){return gr||(gr=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),i=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),i(function(){if(fr)return Ti;fr=1;var e=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ti,"__esModule",{value:!0}),Ti.InteropModule=void 0;const t=e(n),i=$i,r=d,o=Vi(),a=wr(),c=vr(),h=Tn,l=e=>new e,u="You have attempted to use or modify InteropBroker parameters, which is not allowed. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.";class p extends r.Base{async init(e,n=l){this.wire.sendAction("interop-init").catch((()=>{}));const r=await this.wire.environment.getInteropInfo(this.wire.getFin()),s=(0,i.createUnusableObject)(u),a=(0,i.createWarningObject)(u,(0,t.default)(r)),d=async()=>{throw new Error(u)},p=o.InteropBroker.createClosedConstructor(this.wire,(()=>this.fin.InterApplicationBus.Channel.create(`interop-broker-${e}`)),r);let w;return w=Array.isArray(n)?new((0,h.overrideFromComposables)(...n)(p))(s,d,a):await n(p,s,d,a),(0,c.overrideCheck)(w,r.fdc3Version),w}connectSync(e,t){return this.wire.sendAction("interop-connect-sync").catch((()=>{})),new a.InteropClient(this.wire,this.wire.environment.whenReady().then((()=>this.fin.InterApplicationBus.Channel.connect(`interop-broker-${e}`,{payload:t}))))}}return Ti.InteropModule=p,Ti}(),e),i(wr(),e),i(Vi(),e)}(Li)),Li}var br={},Ir={},Er={},xr={};Object.defineProperty(xr,"__esModule",{value:!0}),xr.getSnapshotSourceChannelName=void 0;xr.getSnapshotSourceChannelName=e=>`snapshot-source-provider-${e.uuid}`;var Ar,Pr,Mr,_r,Or,Sr=s&&s.__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},Rr=s&&s.__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)};Object.defineProperty(Er,"__esModule",{value:!0}),Er.SnapshotSource=void 0;const Fr=d,jr=xr,kr=new Map;class Lr extends Fr.Base{constructor(e,t){super(e),Ar.set(this,void 0),Pr.set(this,(()=>(kr.has(this.identity.uuid)||kr.set(this.identity.uuid,{eventFired:null,clientPromise:null}),kr.get(this.identity.uuid)))),Mr.set(this,(()=>(Rr(this,Pr,"f").call(this).clientPromise||(Rr(this,Pr,"f").call(this).clientPromise=Rr(this,_r,"f").call(this)),Rr(this,Pr,"f").call(this).clientPromise))),_r.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);try{Rr(this,Pr,"f").call(this).eventFired||await Rr(this,Or,"f").call(this);const t=await this.fin.InterApplicationBus.Channel.connect(e,{wait:!1});return t.onDisconnection((()=>{Rr(this,Pr,"f").call(this).clientPromise=null,Rr(this,Pr,"f").call(this).eventFired=null})),t}catch(e){throw Rr(this,Pr,"f").call(this).clientPromise=null,new Error("The targeted SnapshotSource is not currently initialized. Await this object's ready() method.")}})),Or.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);let t,n;const i=new Promise(((e,i)=>{t=e,n=i}));Rr(this,Pr,"f").call(this).eventFired=i;const r=async i=>{try{i.channelName===e&&(t(),await this.fin.InterApplicationBus.Channel.removeListener("connected",r))}catch(e){n(e)}};await this.fin.InterApplicationBus.Channel.on("connected",r)})),Sr(this,Ar,t,"f")}get identity(){return Rr(this,Ar,"f")}async ready(){this.wire.sendAction("snapshot-source-ready").catch((e=>{}));try{await Rr(this,Mr,"f").call(this)}catch(e){await Rr(this,Pr,"f").call(this).eventFired}}async getSnapshot(){this.wire.sendAction("snapshot-source-get-snapshot").catch((e=>{}));const e=await Rr(this,Mr,"f").call(this),t=await e.dispatch("get-snapshot");return(await t).snapshot}async applySnapshot(e){this.wire.sendAction("snapshot-source-apply-snapshot").catch((e=>{}));return(await Rr(this,Mr,"f").call(this)).dispatch("apply-snapshot",{snapshot:e})}}Er.SnapshotSource=Lr,Ar=new WeakMap,Pr=new WeakMap,Mr=new WeakMap,_r=new WeakMap,Or=new WeakMap,Object.defineProperty(Ir,"__esModule",{value:!0}),Ir.SnapshotSourceModule=void 0;const Tr=d,$r=Er,Br=xr;class Gr extends Tr.Base{async init(e){if(this.wire.sendAction("snapshot-source-init").catch((e=>{})),"object"!=typeof e||"function"!=typeof e.getSnapshot||"function"!=typeof e.applySnapshot)throw new Error("you must pass in a valid SnapshotProvider");const t=await this.fin.InterApplicationBus.Channel.create((0,Br.getSnapshotSourceChannelName)(this.fin.me));t.register("get-snapshot",(async()=>({snapshot:await e.getSnapshot()}))),t.register("apply-snapshot",(({snapshot:t})=>e.applySnapshot(t)))}wrapSync(e){return this.wire.sendAction("snapshot-source-wrap-sync").catch((e=>{})),new $r.SnapshotSource(this.wire,e)}async wrap(e){return this.wire.sendAction("snapshot-source-wrap").catch((e=>{})),this.wrapSync(e)}}Ir.SnapshotSourceModule=Gr,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Ir,e),n(Er,e)}(br),Object.defineProperty(a,"__esModule",{value:!0});var Wr=a.Fin=void 0;const Hr=t,Nr=c,Dr=ie(),Ur=Z(),Vr=de,zr=en,Kr=rn,qr=un,Jr=bn,Yr=J(),Zr=An,Qr=ki,Xr=Cr(),eo=br;class to extends Hr.EventEmitter{constructor(e){super(),this.wire=e,this.System=new Nr.System(e),this.Window=new Dr._WindowModule(e),this.Application=new Ur.ApplicationModule(e),this.InterApplicationBus=new Vr.InterApplicationBus(e),this.Clipboard=new zr.Clipboard(e),this.ExternalApplication=new Kr.ExternalApplicationModule(e),this.Frame=new qr._FrameModule(e),this.GlobalHotkey=new Jr.GlobalHotkey(e),this.Platform=new Zr.PlatformModule(e,this.InterApplicationBus.Channel),this.View=new Yr.ViewModule(e),this.Interop=new Xr.InteropModule(e),this.SnapshotSource=new eo.SnapshotSourceModule(e),e.registerFin(this),this.me=(0,Qr.getMe)(e),e.on("disconnected",(()=>{this.emit("disconnected")}))}}Wr=a.Fin=to;var no={},io={};function ro(e){return"string"==typeof e.manifestUrl}function oo(e){return ao(e)&&"string"==typeof e.address}function so(e){return oo(e)&&"string"==typeof e.token}function ao(e){return"string"==typeof e.uuid}function co(e){return e.runtime&&"string"==typeof e.runtime.version}function ho(e){return ao(e)&&co(e)}Object.defineProperty(io,"__esModule",{value:!0}),io.isInternalConnectConfig=io.isPortDiscoveryConfig=io.isNewConnectConfig=io.isConfigWithReceiver=io.isRemoteConfig=io.isExistingConnectConfig=io.isExternalConfig=void 0,io.isExternalConfig=ro,io.isExistingConnectConfig=oo,io.isRemoteConfig=so,io.isConfigWithReceiver=function(e){return"object"==typeof e.receiver&&so({...e,address:""})},io.isNewConnectConfig=ho,io.isPortDiscoveryConfig=function(e){return ro(e)&&co(e)||ho(e)},io.isInternalConnectConfig=function(e){return oo(e)||ho(e)};var lo={},uo={};Object.defineProperty(uo,"__esModule",{value:!0}),uo.EmitterMap=void 0;const po=t;function wo(e){return Buffer.from(e).toString("base64")}uo.EmitterMap=class{constructor(){this.storage=new Map}hashKeys(e){return e.map(wo).join("/")}getOrCreate(e){const t=this.hashKeys(e);return this.storage.has(t)||this.storage.set(t,new po.EventEmitter),this.storage.get(t)}has(e){return this.storage.has(this.hashKeys(e))}delete(e){const t=this.hashKeys(e);return this.storage.delete(t)}},Object.defineProperty(lo,"__esModule",{value:!0});const yo=uo;class fo extends yo.EmitterMap{constructor(){super(...arguments),this.dispatchEvent=e=>{if(function(e){return"process-desktop-event"===e.action}(e)){const{payload:t}=e,n=function(e){const{topic:t}=e;if("frame"===t||"window"===t||"view"===t){const{uuid:n,name:i}=e;return[t,n,i]}if("application"===t){const{uuid:n}=e;return[t,n]}return[t]}(t);if(this.has(n))return this.getOrCreate(n).emit(t.type,t),!0}return!1}}}lo.default=fo;var go,mo,vo=s&&s.__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},Co=s&&s.__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)},bo=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(no,"__esModule",{value:!0});var Io=no.Transport=void 0;const Eo=t,xo=io,Ao=g,Po=bo(lo),Mo=ki,_o=ke;class Oo extends Eo.EventEmitter{constructor(e,t,n){super(),this.wireListeners=new Map,this.topicRefMap=new Map,this.eventAggregator=new Po.default,this.messageHandlers=[this.eventAggregator.dispatchEvent],go.set(this,void 0),mo.set(this,void 0),this.connectSync=()=>{Co(this,go,"f").connectSync()},this.getPort=()=>Co(this,go,"f").getPort(),vo(this,go,new e(this.onmessage.bind(this)),"f"),this.environment=t,this.sendRaw=Co(this,go,"f").send.bind(Co(this,go,"f")),this.registerMessageHandler(this.handleMessage.bind(this)),Co(this,go,"f").on("disconnected",(()=>{for(const[,{handleNack:e}]of this.wireListeners)e({reason:"Remote connection has closed"});this.wireListeners.clear(),this.emit("disconnected")}));const{uuid:i,name:r}=n,o=this.environment.getCurrentEntityType();this.me=(0,Mo.getBaseMe)(o,i,r)}getFin(){if(!Co(this,mo,"f"))throw new Error("No Fin object registered for this transport");return Co(this,mo,"f")}registerFin(e){if(Co(this,mo,"f"))throw new Error("Fin object has already been registered for this transport");vo(this,mo,e,"f")}shutdown(){return Co(this,go,"f").shutdown()}async connect(e){if((0,xo.isConfigWithReceiver)(e))return await Co(this,go,"f").connect(e.receiver),this.authorize(e);if((0,xo.isRemoteConfig)(e))return this.connectRemote(e);if((0,xo.isExistingConnectConfig)(e))return this.connectByPort(e);if((0,xo.isNewConnectConfig)(e)){const t=await this.environment.retrievePort(e);return this.connectByPort({...e,address:`ws://localhost:${t}`})}}async connectRemote(e){return await Co(this,go,"f").connect(new(this.environment.getWsConstructor())(e.address)),this.authorize(e)}async connectByPort(e){const{address:t,uuid:n}=e,i={...e,type:"file-token"},r=Co(this,go,"f");await r.connect(new(this.environment.getWsConstructor())(e.address));const o=await this.sendAction("request-external-authorization",{uuid:n,type:"file-token"},!0);if("external-authorization-response"!==o.action)throw new Ao.UnexpectedActionError(o.action);return await this.environment.writeToken(o.payload.file,o.payload.token),this.authorize(i)}async authorize(e){const t=await this.sendAction("request-authorization",e,!0);if("authorization-response"!==t.action)throw new Ao.UnexpectedActionError(t.action);if(!0!==t.payload.success)throw new Ao.RuntimeError(t.payload)}sendAction(e,t={},n=!1){let i=()=>{};const r=Ao.RuntimeError.getCallSite(1),o=this.environment.getNextMessageId(),s=new Promise(((s,a)=>{i=a;const c={action:e,payload:t,messageId:o},d=Co(this,go,"f");return this.addWireListener(o,s,(e=>this.nackHandler(e,a,r)),n),d.send(c).catch(a)}));return Object.assign(s,{cancel:i,messageId:o})}nackHandler(e,t,n){t("string"==typeof e?e:new Ao.RuntimeError(e,n))}ferryAction(e){return new Promise(((t,n)=>{const i=this.environment.getNextMessageId();e.messageId=i;const r=e=>{t(e.payload)};return Co(this,go,"f").send(e).then((()=>this.addWireListener(i,r,(e=>this.nackHandler(e,n)),!1))).catch(n)}))}registerMessageHandler(e){this.messageHandlers.push(e)}addWireListener(e,t,n,i){i?this.uncorrelatedListener=t:this.wireListeners.has(e)?n({reason:"Duplicate handler id",error:(0,_o.errorToPOJO)(new Ao.DuplicateCorrelationError(String(e)))}):this.wireListeners.set(e,{resolve:t,handleNack:n})}onmessage(e){for(const t of this.messageHandlers)t.call(null,e)}handleMessage(e){const t=e.correlationId||NaN;if("correlationId"in e){if(!this.wireListeners.has(t))return!1;{const{resolve:n,handleNack:i}=this.wireListeners.get(t);"ack"!==e.action?i({reason:"Did not receive ack action",error:(0,_o.errorToPOJO)(new Ao.NoAckError(e.action))}):"payload"in e?e.payload.success?n.call(null,e):i(e.payload):"string"==typeof e.reason?i(e):(console.warn("Received invalid response from core",e),i({reason:"invalid response shape"})),this.wireListeners.delete(t)}}else this.uncorrelatedListener&&this.uncorrelatedListener.call(null,e),this.uncorrelatedListener=()=>{};return!0}}Io=no.Transport=Oo,go=new WeakMap,mo=new WeakMap;const So=(...e)=>({log:(...t)=>console.debug(`[${(new Date).toISOString()}]`,...(e=>e.map((e=>`[${e}]`)))(e),...t),getLogger:(...t)=>So(...e,...t)}),Ro=So("@openfin/core-web/client");function Fo(e,t){if(!function(e){return"string"==typeof e}(e))throw new Error(`Property ${t} has invalid type. Expected string, got ${typeof e}.`)}const jo="web-broker-ports-ready",ko=Ro.getLogger("get-web-interop-ports");function Lo(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)}function To(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}"function"==typeof SuppressedError&&SuppressedError;const $o=e=>{var n,i,r;return r=class extends t.EventEmitter{constructor(t){super(),n.set(this,void 0),i.set(this,!1),this.connectSync=()=>{Lo(this,i,"f")||(e.addEventListener("message",(e=>{e.data?.topic?.startsWith("wire-message")&&e.data.message&&Lo(this,n,"f").call(this,{...JSON.parse(e.data.message),ports:e.ports})})),e.start())},this.connect=async()=>{this.connectSync()},this.send=t=>(e.postMessage({topic:"wire-message",message:JSON.stringify(t)}),Promise.resolve()),this.shutdown=async()=>{e.close()},To(this,n,t,"f")}getPort(){return e}},n=new WeakMap,i=new WeakMap,r};var Bo={},Go={};Object.defineProperty(Go,"__esModule",{value:!0}),Go.BaseEnvironment=void 0;const Wo=vr();Go.BaseEnvironment=class{async getViewWindowIdentity(e,t){const{identity:n}=await e.View.wrapSync(t).getCurrentWindow();return n}async getInteropInfo(e){const t=await e.Application.getCurrentSync().getInfo().catch((()=>null)),n=t?.initialOptions?.interopBrokerConfiguration??{};return{fdc3Version:t?(0,Wo.getDefaultViewFdc3VersionFromAppInfo)(t):void 0,...n,fdc3Info:{providerVersion:await e.System.getVersion(),provider:"OpenFin"}}}},Object.defineProperty(Bo,"__esModule",{value:!0});var Ho=Bo.BrowserEnvironment=void 0;const No=Go;class Do extends No.BaseEnvironment{constructor(){super(...arguments),this.type="other",this.getRandomId=()=>{const e=new Uint32Array(1);return window.crypto.getRandomValues(e)[0].toString(32)}}getAdapterVersionSync(){return""}observeBounds(e,t){throw new Error("Method not implemented.")}layoutAllowedInContext(e){return!1}initLayoutManager(e,t,n){throw new Error("Method not implemented.")}applyLayoutSnapshot(e,t,n){throw new Error("Method not implemented.")}createLayout(e,t){throw new Error("Method not implemented.")}destroyLayout(e,t){throw new Error("Method not implemented.")}resolveLayout(e,t){throw new Error("Method not implemented.")}initPlatform(...e){throw new Error("Method not implemented.")}writeToken(e,t){return Promise.resolve("")}retrievePort(e){throw new Error("Method not implemented.")}getNextMessageId(){return this.getRandomId()}createChildContent(e){throw new Error("Method not implemented.")}getWebWindow(e){throw new Error("Method not implemented.")}getCurrentEntityIdentity(){throw new Error("Method not implemented.")}getCurrentEntityType(){return"external connection"}raiseEvent(e,t){throw new Error("Method not implemented.")}getUrl(){return location.href}getDefaultChannelOptions(){return{create:{},connect:{}}}getRtcPeer(){return new RTCPeerConnection}getWsConstructor(){return WebSocket}whenReady(){return Promise.resolve()}}Ho=Bo.BrowserEnvironment=Do;const Uo=e=>"platform"in e&&void 0!==e.platform;var Vo,zo;class Ko extends Ho{constructor(e){super(),this.connectConfig=e,Vo.set(this,void 0),zo.set(this,new W((async()=>Promise.resolve().then((function(){return __webpack_require__(/*! ./main-b14f67c9.js */ "./node_modules/@openfin/core-web/out/main-b14f67c9.js")}))))),Uo(e)&&this.validatePlatformOptions(e)}getAdapterVersionSync(){return"0.39.21"}validatePlatformOptions({platform:e}){if(!("layoutSnapshot"in e))throw new Error("Platform options are missing layoutSnapshot. Please provide a layoutSnapshot in the platform options.");if("windows"in e||"windows"in e.layoutSnapshot)throw new Error("It appears you tried to call connect() with a snapshot object from an OpenFin desktop environment. Note that connect() expects to be called with a platform property with this structure: { platform: { layoutSnapshot } }. To get a layoutSnapshot of the expected structure, use fin.Platform.Layout.getCurrentLayoutManagerSync().getLayoutSnapshot() in v34+ in your desktop environment.");const{layouts:t}=e.layoutSnapshot;Object.entries(t).map((([e,t])=>{if("object"!=typeof t||null===t)throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must be an object.`);if(!("content"in t))throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must contain a 'content' property.`)}))}async getInteropInfo(e){return{...{contextGroups:void 0,logging:{beforeAction:{enabled:!1},afterAction:{enabled:!1}}},fdc3Version:void 0,fdc3Info:{providerVersion:"0.39.21",provider:"OpenFin Web"}}}layoutAllowedInContext(e){return!0}async initLayoutManager(e,t,n){if(Lo(this,Vo,"f"))throw new Error("Layout already initialized.");if(!Uo(this.connectConfig))throw new Error("Platform options are missing from connection config.");const{WebLayoutEntryPoint:i}=await Lo(this,zo,"f").getValue();return To(this,Vo,new i(this.connectConfig),"f"),await Lo(this,Vo,"f").initLayoutManager(e,t,n)}async applyLayoutSnapshot(e,t,n){Lo(this,Vo,"f")?.applyLayoutSnapshot(e,t,n)}async createLayout(e,t){return Lo(this,Vo,"f")?.createLayout(e,t)}async destroyLayout(e,t){return Lo(this,Vo,"f")?.destroyLayout(e,t)}async getViewWindowIdentity(e,t){return Promise.resolve({uuid:t.uuid,name:t.uuid})}}Vo=new WeakMap,zo=new WeakMap;const qo=()=>{const e=((e,t)=>{const n=new RegExp(`^${t}<(?.*)>$`).exec(e)?.groups?.meta;if(n)try{return JSON.parse(atob(n))}catch(e){throw new Error(`Failed to decode JSON from ${n}.`)}})(window.name,"of-frame");if(e)try{const{name:t,uuid:n,brokerUrl:i,providerId:r,contextGroup:o}=e;return Fo(i,"brokerUrl"),Fo(n,"uuid"),Fo(t,"name"),{identity:{name:t,uuid:n},brokerUrl:i,interopConfig:{providerId:r,currentContextGroup:o}}}catch(e){throw new Error(`Unexpected error occurred when inferring platform information: ${e.stack}`)}},Jo=()=>{const e=r.v4();return{uuid:e,name:e}},Yo=async e=>{if("enabled"===e.connectionInheritance){const t=await(async e=>{const t=qo();if(t){const{validateOptions:n=(()=>!0)}=e,{identity:i,...r}=t;if(!await n(r))throw new Error("Parent options were rejected by validateOptions.");return t}})(e);if(t)return t}if(!e.options){const t="enabled"===e.connectionInheritance?"Broker URL was not specified nor provided by a platform container.":"Connection inheritance is disabled but no options were provided.";throw new Error(t)}return{...e.options,identity:Jo()}};exports.__classPrivateFieldGet=Lo,exports.__classPrivateFieldSet=To,exports.apiExposer=Gn,exports.commonjsGlobal=s,exports.connect=async t=>{try{Ro.log("Establishing connection",t);const{brokerUrl:n,identity:i,timeout:r,interopConfig:s}=await Yo(t),{workerPort:a,iframeBrokerPort:c}=await(async(e,t,n)=>{const{origin:i}=new URL(e),r=document.createElement("IFRAME");let s;r.style.display="none";try{return await new Promise(((a,c)=>{const d=e=>{if(e.source===r.contentWindow&&e.data?.topic===`ack-${jo}`){if(e.origin!==i)c(new Error(`Broker redirected to unexpected origin ${e.origin}, expected ${i}.`));else if(e.data.success){const[t,n]=e.ports;a({iframeBrokerPort:t,workerPort:n})}else c(new m(e.data));window.removeEventListener("message",d),clearTimeout(s)}};window.addEventListener("message",d),ko.log(`Connecting to broker ${e}`),r.setAttribute("src",e),r.setAttribute("name",o(t,"of-broker")),document.body.appendChild(r),ko.log("Iframe loaded, awaiting init message from iframe"),n&&(s=setTimeout((()=>{window.removeEventListener("message",d),document.body.removeChild(r),c(new Error("Worker did not initialize in time"))}),n))}))}catch(e){throw new Error(`Failed to initialise Fin Web Client. ${e.message}`,{cause:e})}})(n,i,r);Ro.log("Successfully established connection to shared worker");const d={entityType:"external connection",...i};a.start(),c.start();const h=((t,n,i)=>{const r=$o(n),o=new Ko(t),s=new Io(r,o,i);return s.connectSync(),window.Buffer=e.Buffer,new Wr(s)})(t,a,d);return s?.providerId&&(h.me.interop=h.Interop.connectSync(s.providerId),s?.currentContextGroup&&h.me.interop.joinContextGroup(s.currentContextGroup).catch((e=>{console.warn(`Error joining specified context group: ${s?.currentContextGroup}, continuing`,e)}))),{...h,me:{...h.me,identity:{uuid:h.me.uuid,name:h.me.name}}}}catch(e){throw new Error(`An error occured during web-interop connection: ${e.message}`)}},exports.decorators=Nn,exports.encodeOptions=o,exports.layout_constants=ai,exports.lazy=G; +var e=__webpack_require__(/*! buffer/ */ "../../node_modules/buffer/index.js"),t=__webpack_require__(/*! events */ "../../node_modules/events/events.js"),n=__webpack_require__(/*! lodash/cloneDeep */ "../../node_modules/lodash/cloneDeep.js"),i=__webpack_require__(/*! lodash/isEqual */ "../../node_modules/lodash/isEqual.js"),r=__webpack_require__(/*! uuid */ "../../node_modules/uuid/dist/esm-browser/index.js");const o=(e,t)=>`${t}<${btoa(JSON.stringify(e))}>`;var s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof __webpack_require__.g?__webpack_require__.g:"undefined"!=typeof self?self:{},a={},c={},d={},h={};async function l(e){const t=[];for(const n of e){const e=await n();t.push(e)}return t}Object.defineProperty(h,"__esModule",{value:!0}),h.promiseMapSerial=h.serial=h.promiseMap=h.promisify=void 0,h.promisify=function(e){return(...t)=>new Promise(((n,i)=>{e(...t,((e,t)=>e?i(e):n(t)))}))},h.promiseMap=async function(e,t){return Promise.all(e.map(t))},h.serial=l,h.promiseMapSerial=async function(e,t){return l(e.map(((e,n,i)=>()=>t(e,n,i))))};var u,p=s&&s.__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},w=s&&s.__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)};Object.defineProperty(d,"__esModule",{value:!0}),d.Reply=d.EmitterBase=d.Base=void 0;const y=h;class f{constructor(e){this.isNodeEnvironment=()=>"node"===this.wire.environment.type,this.isOpenFinEnvironment=()=>"openfin"===this.wire.environment.type,this.isBrowserEnvironment=()=>"other"===this.wire.environment.type,this.wire=e}get fin(){return this.wire.getFin()}get me(){return this.wire.me}}d.Base=f;d.EmitterBase=class extends f{constructor(e,t,...n){super(e),this.topic=t,u.set(this,void 0),this.eventNames=()=>this.hasEmitter()?this.getOrCreateEmitter().eventNames():[],this.emit=(e,t,...n)=>!!this.hasEmitter()&&this.getOrCreateEmitter().emit(e,t,...n),this.hasEmitter=()=>this.wire.eventAggregator.has(w(this,u,"f")),this.getOrCreateEmitter=()=>this.wire.eventAggregator.getOrCreate(w(this,u,"f")),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[],this.listenerCount=e=>this.hasEmitter()?this.getOrCreateEmitter().listenerCount(e):0,this.registerEventListener=async(e,t={},n,i)=>{const r={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e},o=this.getOrCreateEmitter();n(o);try{await this.wire.sendAction("subscribe-to-desktop-event",r)}catch(e){throw i(o),this.deleteEmitterIfNothingRegistered(o),e}},this.deregisterEventListener=async(e,t={})=>{if(this.hasEmitter()){const n={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e};await this.wire.sendAction("unsubscribe-to-desktop-event",n).catch((()=>null));return this.getOrCreateEmitter()}return Promise.resolve()},p(this,u,[t,...n],"f"),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[]}async on(e,t,n){return await this.registerEventListener(e,n,(n=>{n.on(e,t)}),(n=>{n.removeListener(e,t)})),this}async addListener(e,t,n){return this.on(e,t,n)}async once(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.once(e,i),n.once(e,t)}),(n=>{n.removeListener(e,i),n.removeListener(e,t)})),this}async prependListener(e,t,n){return await this.registerEventListener(e,n,(n=>{n.prependListener(e,t)}),(n=>{n.removeListener(e,t)})),this}async prependOnceListener(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.prependOnceListener(e,t),n.once(e,i)}),(n=>{n.removeListener(e,t),n.removeListener(e,i)})),this}async removeListener(e,t,n){const i=await this.deregisterEventListener(e,n);return i&&(i.removeListener(e,t),this.deleteEmitterIfNothingRegistered(i)),this}async deregisterAllListeners(e){const t={...this.identity,type:e,topic:this.topic};if(this.hasEmitter()){const e=this.getOrCreateEmitter(),n=e.listenerCount(t.type),i=[];for(let e=0;enull)));return await Promise.all(i),e}}async removeAllListeners(e){const t=async e=>{const t=await this.deregisterAllListeners(e);t&&(t.removeAllListeners(e),this.deleteEmitterIfNothingRegistered(t))};if(e)await t(e);else if(this.hasEmitter()){const e=this.getOrCreateEmitter().eventNames();await(0,y.promiseMap)(e,t)}return this}deleteEmitterIfNothingRegistered(e){0===e.eventNames().length&&this.wire.eventAggregator.delete(w(this,u,"f"))}},u=new WeakMap;d.Reply=class{};var g={};Object.defineProperty(g,"__esModule",{value:!0});var m=g.RuntimeError=g.NotSupportedError=g.NotImplementedError=g.NoAckError=g.DuplicateCorrelationError=g.UnexpectedActionError=g.DisconnectedError=void 0;class v extends Error{constructor(e){super(`Expected websocket state OPEN but found ${e}`),this.readyState=e}}g.DisconnectedError=v;class C extends Error{}g.UnexpectedActionError=C;class b extends Error{}g.DuplicateCorrelationError=b;class I extends Error{}g.NoAckError=I;class E extends Error{}g.NotImplementedError=E;class x extends Error{}g.NotSupportedError=x;class A extends Error{constructor(e){const{message:t,name:n,stack:i,...r}=e;super(t),this.name=n||"Error",this.stack=i??this.toString(),Object.keys(r).forEach((e=>{this[e]=r[e]}))}}class P extends Error{static getCallSite(e=0){const t=Error.stackTraceLimit,n=e+1;Error.stackTraceLimit=t+n;const i=Error.prepareStackTrace;Error.prepareStackTrace=(e,t)=>t;const r=(new Error).stack?.slice(n)??[];return Error.prepareStackTrace=i,Error.stackTraceLimit=t,r}static prepareStackTrace(e,t){if("function"==typeof Error.prepareStackTrace)return Error.prepareStackTrace(e,t);let n="";n+=e.name||"Error",n+=`: ${e.message||""}`;for(const e of t)n+=`\n at ${e.toString()}`;return n}constructor(e,t){const{reason:n,error:i}=e;super(n),this.name="RuntimeError",i?.stack&&(this.cause=new A(i)),t&&(this.stack=P.prepareStackTrace(this,t))}}m=g.RuntimeError=P;var M={},_={},O={};Object.defineProperty(O,"__esModule",{value:!0}),O.validateIdentity=void 0,O.validateIdentity=function(e){let t;return"object"==typeof e&&"string"==typeof e.uuid||(t="Not a valid identity object"),t};var S={},R={},F={},j={},k={},L={},T={};Object.defineProperty(T,"__esModule",{value:!0}),T.handleDeprecatedWarnings=void 0;var $;T.handleDeprecatedWarnings=e=>{(e.contentNavigation?.whitelist||e.contentNavigation?.blacklist||e.contentRedirect?.whitelist||e.contentRedirect?.blacklist)&&console.warn("The properties 'whitelist' and 'blacklist' have been marked as deprecated and will be removed in a future version. Please use 'allowlist' and 'denylist'.")};var B={},G={};Object.defineProperty(G,"__esModule",{value:!0}),G.AsyncRetryableLazy=W=G.Lazy=void 0;var W=G.Lazy=class{constructor(e){this.producerFn=e}getValue(){return this.value||(this.value=this.producerFn()),this.value}};G.AsyncRetryableLazy=class{constructor(e){this.producerFn=e}async getValue(){return this.promise||(this.promise=this.producerFn().catch((e=>{throw delete this.promise,e}))),this.promise}};var H={};Object.defineProperty(H,"__esModule",{value:!0}),H.WebContents=void 0;const N=d;class D extends N.EmitterBase{constructor(e,t,n){super(e,n,t.uuid,t.name),this.identity=t,this.entityType=n}capturePage(e){return this.wire.sendAction("capture-page",{options:e,...this.identity}).then((({payload:e})=>e.data))}executeJavaScript(e){return this.wire.sendAction("execute-javascript-in-window",{...this.identity,code:e}).then((({payload:e})=>e.data))}getZoomLevel(){return this.wire.sendAction("get-zoom-level",this.identity).then((({payload:e})=>e.data))}setZoomLevel(e){return this.wire.sendAction("set-zoom-level",{...this.identity,level:e}).then((()=>{}))}navigate(e){return this.wire.sendAction("navigate-window",{...this.identity,url:e}).then((()=>{}))}navigateBack(){return this.wire.sendAction("navigate-window-back",{...this.identity}).then((()=>{}))}async navigateForward(){await this.wire.sendAction("navigate-window-forward",{...this.identity})}stopNavigation(){return this.wire.sendAction("stop-window-navigation",{...this.identity}).then((()=>{}))}reload(e=!1){return this.wire.sendAction("reload-window",{ignoreCache:e,...this.identity}).then((()=>{}))}print(e={}){return this.wire.sendAction("print",{...this.identity,options:e}).then((()=>{}))}findInPage(e,t){return this.wire.sendAction("find-in-page",{...this.identity,searchTerm:e,options:t}).then((({payload:e})=>e.data))}stopFindInPage(e){return this.wire.sendAction("stop-find-in-page",{...this.identity,action:e}).then((()=>{}))}getPrinters(){return this.wire.sendAction("get-printers",{...this.identity}).then((({payload:e})=>e.data))}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){await this.wire.sendAction("focus-window",{emitSynthFocused:e,...this.identity})}async showDeveloperTools(){await this.wire.sendAction("show-developer-tools",this.identity)}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction("get-process-info",this.identity);return e}async getSharedWorkers(){return this.wire.sendAction("get-shared-workers",this.identity).then((({payload:e})=>e.data))}async inspectSharedWorker(){await this.wire.sendAction("inspect-shared-worker",{...this.identity})}async inspectSharedWorkerById(e){await this.wire.sendAction("inspect-shared-worker-by-id",{...this.identity,workerId:e})}async inspectServiceWorker(){await this.wire.sendAction("inspect-service-worker",{...this.identity})}async showPopupWindow(e){if(this.wire.sendAction(`${this.entityType}-show-popup-window`,this.identity).catch((()=>{})),e?.onPopupReady){const t=async({popupName:t})=>{try{const n=this.fin.Window.wrapSync({uuid:this.fin.me.uuid,name:t});await e.onPopupReady(n)}catch(e){throw new Error(`Something went wrong during onPopupReady execution: ${e}`)}};await this.once("popup-ready",t)}const{payload:t}=await this.wire.sendAction("try-create-popup-window",{options:{...e,hasResultCallback:!!e?.onPopupResult,hasReadyCallback:!!e?.onPopupReady},...this.identity}),{data:{willOpen:n,options:i}}=t;n&&await this.fin.Window.create(i.initialOptions);if(e?.onPopupResult){const t=async t=>{await e.onPopupResult((e=>{const{name:t,uuid:n,result:i,data:r}=e,o={identity:{name:t,uuid:n},result:i};return r&&(o.data=r),o})(t))},n=async()=>{await this.removeListener("popup-result",t)};await this.on("popup-result",t),await this.once("popup-teardown",n)}const{payload:r}=await this.wire.sendAction("show-popup-window",{options:i,...this.identity});return r.data}}var U,V,z,K,q;function J(){return V||(V=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(function(){if($)return L;$=1,Object.defineProperty(L,"__esModule",{value:!0}),L.ViewModule=void 0;const e=d,t=O,n=J(),i=T;class r extends e.Base{async create(e){const{uuid:t}=this.wire.me;if(!e.name||"string"!=typeof e.name)throw new Error("Please provide a name property as a string in order to create a View.");return(0,i.handleDeprecatedWarnings)(e),this.wire.environment.childViews?await this.wire.environment.createChildContent({entityType:"view",options:{...e,uuid:t}}):await this.wire.sendAction("create-view",{...e,uuid:t}),this.wrapSync({uuid:t,name:e.name})}async wrap(e){this.wire.sendAction("view-wrap").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}wrapSync(e){this.wire.sendAction("view-wrap-sync").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}getCurrent(){if(this.wire.sendAction("view-get-current").catch((e=>{})),!this.wire.me.isView)throw new Error("You are not in a View context");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction("view-get-current-sync").catch((e=>{})),!this.wire.me.isView)throw new Error("You are not in a View context");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return L.ViewModule=r,L}(),e),n(function(){if(U)return B;var e;U=1,Object.defineProperty(B,"__esModule",{value:!0}),B.View=void 0;const t=g,n=G,i=H,r=ie();class o extends i.WebContents{constructor(i,o){super(i,o,"view"),this.identity=o,e.set(this,new n.Lazy((()=>this.fin.Platform.wrapSync(this.identity).getClient()))),this.attach=async e=>{await this.wire.sendAction("attach-view",{target:e,...this.identity})},this.destroy=async()=>{await this.wire.sendAction("destroy-view",{...this.identity})},this.show=async()=>{await this.wire.sendAction("show-view",{...this.identity})},this.showAt=async(e,t={})=>{await this.wire.sendAction("show-view-at",{bounds:e,...this.identity,options:t})},this.bringToFront=async()=>{await this.wire.sendAction("bring-view-to-front",{...this.identity})},this.hide=async()=>{await this.wire.sendAction("hide-view",{...this.identity})},this.setBounds=async e=>{await this.wire.sendAction("set-view-bounds",{bounds:e,...this.identity})},this.getBounds=async()=>(await this.wire.sendAction("get-view-bounds",{...this.identity})).payload.data,this.getInfo=async()=>(await this.wire.sendAction("get-view-info",{...this.identity})).payload.data,this.getParentLayout=async()=>(this.wire.sendAction("view-get-parent-layout",{...this.identity}).catch((()=>{})),this.fin.Platform.Layout.getLayoutByViewIdentity(this.identity)),this.getOptions=async()=>this.wire.sendAction("get-view-options",{...this.identity}).then((({payload:e})=>e.data)),this.updateOptions=async e=>this.wire.sendAction("update-view-options",{options:e,...this.identity}).then((()=>{})),this.getCurrentWindow=async()=>{const{payload:{data:e}}=await this.wire.sendAction("get-view-window",{...this.identity});return new r._Window(this.wire,e)},this.getCurrentStack=async()=>{this.wire.sendAction("view-get-current-stack").catch((()=>{}));try{return(await this.getParentLayout()).getStackByViewIdentity(this.identity)}catch(e){throw new t.RuntimeError({reason:"This view does not belong to a stack.",error:e})}},this.triggerBeforeUnload=async()=>(await this.wire.sendAction("trigger-before-unload",{...this.identity})).payload.data,this.bindToElement=async e=>{if(!e)throw new Error("Element not found.");return this.wire.environment.observeBounds(e,(async e=>this.setBounds(e)))}}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){const t=await this.getCurrentWindow();await t.focusedWebViewWasChanged(),await super.focus({emitSynthFocused:e})}}return B.View=o,e=new WeakMap,B}(),e)}(k)),k}function Y(){if(z)return j;z=1,Object.defineProperty(j,"__esModule",{value:!0}),j.Application=void 0;const e=d,t=ie(),n=J();class i extends e.EmitterBase{constructor(e,n){super(e,"application",n.uuid),this.identity=n,this.window=new t._Window(this.wire,{uuid:this.identity.uuid,name:this.identity.uuid})}windowListFromIdentityList(e){const n=[];return e.forEach((e=>{n.push(new t._Window(this.wire,{uuid:e.uuid,name:e.name}))})),n}isRunning(){return this.wire.sendAction("is-application-running",this.identity).then((({payload:e})=>e.data))}async quit(e=!1){try{await this._close(e),await this.wire.sendAction("destroy-application",{force:e,...this.identity})}catch(e){if(!["Remote connection has closed","Could not locate the requested application"].some((t=>e.message.includes(t))))throw e}}async _close(e=!1){try{await this.wire.sendAction("close-application",{force:e,...this.identity})}catch(e){if(!e.message.includes("Remote connection has closed"))throw e}}close(e=!1){return console.warn("Deprecation Warning: Application.close is deprecated Please use Application.quit"),this.wire.sendAction("application-close",this.identity).catch((e=>{})),this._close(e)}getChildWindows(){return this.wire.sendAction("get-child-windows",this.identity).then((({payload:e})=>{const t=[];return e.data.forEach((e=>{t.push({uuid:this.identity.uuid,name:e})})),this.windowListFromIdentityList(t)}))}getManifest(){return this.wire.sendAction("get-application-manifest",this.identity).then((({payload:e})=>e.data))}getParentUuid(){return this.wire.sendAction("get-parent-application",this.identity).then((({payload:e})=>e.data))}getShortcuts(){return this.wire.sendAction("get-shortcuts",this.identity).then((({payload:e})=>e.data))}async getViews(){const{payload:e}=await this.wire.sendAction("application-get-views",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}getZoomLevel(){return this.wire.sendAction("get-application-zoom-level",this.identity).then((({payload:e})=>e.data))}getWindow(){return this.wire.sendAction("application-get-window",this.identity).catch((e=>{})),Promise.resolve(this.window)}registerUser(e,t){return this.wire.sendAction("register-user",{userName:e,appName:t,...this.identity}).then((()=>{}))}removeTrayIcon(){return this.wire.sendAction("remove-tray-icon",this.identity).then((()=>{}))}restart(){return this.wire.sendAction("restart-application",this.identity).then((()=>{}))}run(){return console.warn("Deprecation Warning: Application.run is deprecated Please use fin.Application.start"),this.wire.sendAction("application-run",this.identity).catch((e=>{})),this._run()}_run(e={}){return this.wire.sendAction("run-application",{manifestUrl:this._manifestUrl,opts:e,...this.identity}).then((()=>{}))}scheduleRestart(){return this.wire.sendAction("relaunch-on-close",this.identity).then((()=>{}))}async sendApplicationLog(){const{payload:e}=await this.wire.sendAction("send-application-log",this.identity);return e.data}async setJumpList(e){await this.wire.sendAction("set-jump-list",{config:e,...this.identity})}setTrayIcon(e){return this.wire.sendAction("set-tray-icon",{enabledIcon:e,...this.identity}).then((()=>{}))}setShortcuts(e){return this.wire.sendAction("set-shortcuts",{data:e,...this.identity}).then((()=>{}))}async setShortcutQueryParams(e){await this.wire.sendAction("set-shortcut-query-args",{data:e,...this.identity})}setZoomLevel(e){return this.wire.sendAction("set-application-zoom-level",{level:e,...this.identity}).then((()=>{}))}async setAppLogUsername(e){await this.wire.sendAction("set-app-log-username",{data:e,...this.identity})}getTrayIconInfo(){return this.wire.sendAction("get-tray-icon-info",this.identity).then((({payload:e})=>e.data))}hasTrayIcon(){return this.wire.sendAction("has-tray-icon",this.identity).then((({payload:e})=>e.data))}terminate(){return this.wire.sendAction("terminate-application",this.identity).then((()=>{}))}wait(){return this.wire.sendAction("wait-for-hung-application",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction("get-info",this.identity).then((({payload:e})=>e.data))}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction("application-get-process-info",this.identity);return e}async setFileDownloadLocation(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t};await this.wire.sendAction("set-file-download-location",{...n,downloadLocation:e})}async getFileDownloadLocation(){const{payload:{data:e}}=await this.wire.sendAction("get-file-download-location",this.identity);return e}async showTrayIconPopupMenu(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t},{payload:i}=await this.wire.sendAction("show-tray-icon-popup-menu",{...n,options:e});return i.data}async closeTrayIconPopupMenu(){const{name:e}=this.wire.me,t={uuid:this.identity.uuid,name:e};await this.wire.sendAction("close-tray-icon-popup-menu",{...t})}}return j.Application=i,j}function Z(){return q||(q=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(function(){if(K)return F;K=1,Object.defineProperty(F,"__esModule",{value:!0}),F.ApplicationModule=void 0;const e=d,t=O,n=Y();class i extends e.Base{async wrap(e){this.wire.sendAction("wrap-application").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}wrapSync(e){this.wire.sendAction("wrap-application-sync").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}async _create(e){return void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&void 0===e.isPlatformController&&(e.autoShow=!0),await this.wire.sendAction("create-application",e),this.wrap({uuid:e.uuid})}create(e){return console.warn("Deprecation Warning: fin.Application.create is deprecated. Please use fin.Application.start"),this.wire.sendAction("application-create").catch((e=>{})),this._create(e)}async start(e){this.wire.sendAction("start-application").catch((e=>{}));const t=await this._create(e);return await this.wire.sendAction("run-application",{uuid:e.uuid}),t}async startManyManifests(e,t){return this.wire.sendAction("run-applications",{applications:e,opts:t}).then((()=>{}))}getCurrent(){return this.wire.sendAction("get-current-application").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction("get-current-application-sync").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}async startFromManifest(e,t){this.wire.sendAction("application-start-from-manifest").catch((e=>{}));const n=await this._createFromManifest(e);return await n._run(t),n}createFromManifest(e){return console.warn("Deprecation Warning: fin.Application.createFromManifest is deprecated. Please use fin.Application.startFromManifest"),this.wire.sendAction("application-create-from-manifest").catch((e=>{})),this._createFromManifest(e)}_createFromManifest(e){return this.wire.sendAction("get-application-manifest",{manifestUrl:e}).then((({payload:e})=>{const t=e.data.platform?e.data.platform.uuid:e.data.startup_app.uuid;return this.wrap({uuid:t})})).then((t=>(t._manifestUrl=e,t)))}}return F.ApplicationModule=i,F}(),e),n(Y(),e)}(R)),R}H.WebContents=D;var Q={};Object.defineProperty(Q,"__esModule",{value:!0}),Q.promisifySubscription=void 0;var X,ee,te;function ne(){if(X)return S;X=1,Object.defineProperty(S,"__esModule",{value:!0}),S._Window=void 0;const e=Z(),t=H,n=J(),i=T,r=Q;class o extends t.WebContents{constructor(e,t){super(e,t,"window")}async createWindow(e){this.wire.sendAction("window-create-window",this.identity).catch((e=>{}));const t=await(0,r.promisifySubscription)(this,"fire-constructor-callback");void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&(e.autoShow=!0),(0,i.handleDeprecatedWarnings)(e);const n=this.wire.environment.createChildContent({entityType:"window",options:e}),[o]=await Promise.all([t.getValue(),n]);let s;const{success:a}=o,c=o.data,{message:d}=c;s=a?{httpResponseCode:c.httpResponseCode,apiInjected:c.apiInjected}:{message:c.message,networkErrorCode:c.networkErrorCode,stack:c.stack};const h={message:d,cbPayload:s,success:a};try{this.getWebWindow().fin.__internal_.openerSuccessCBCalled()}catch(e){}return h.success?this:Promise.reject(h)}getAllFrames(){return this.wire.sendAction("get-all-frames",this.identity).then((({payload:e})=>e.data))}getBounds(){return this.wire.sendAction("get-window-bounds",this.identity).then((({payload:e})=>e.data))}center(){return this.wire.sendAction("center-window",this.identity).then((()=>{}))}blur(){return this.wire.sendAction("blur-window",this.identity).then((()=>{}))}bringToFront(){return this.wire.sendAction("bring-window-to-front",this.identity).then((()=>{}))}animate(e,t){return this.wire.sendAction("animate-window",{transitions:e,options:t,...this.identity}).then((()=>{}))}hide(){return this.wire.sendAction("hide-window",this.identity).then((()=>{}))}close(e=!1){return this.wire.sendAction("close-window",{force:e,...this.identity}).then((()=>{Object.setPrototypeOf(this,null)}))}focusedWebViewWasChanged(){return this.wire.sendAction("focused-webview-changed",this.identity).then((()=>{}))}getNativeId(){return this.wire.sendAction("get-window-native-id",this.identity).then((({payload:e})=>e.data))}async getCurrentViews(){const{payload:e}=await this.wire.sendAction("window-get-views",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}disableFrame(){return console.warn("Function is deprecated; use disableUserMovement instead."),this.wire.sendAction("disable-window-frame",this.identity).then((()=>{}))}disableUserMovement(){return this.wire.sendAction("disable-window-frame",this.identity).then((()=>{}))}enableFrame(){return console.warn("Function is deprecated; use enableUserMovement instead."),this.wire.sendAction("enable-window-frame",this.identity).then((()=>{}))}enableUserMovement(){return this.wire.sendAction("enable-window-frame",this.identity).then((()=>{}))}flash(){return this.wire.sendAction("flash-window",this.identity).then((()=>{}))}stopFlashing(){return this.wire.sendAction("stop-flash-window",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction("get-window-info",this.identity).then((({payload:e})=>e.data))}async getLayout(e){this.wire.sendAction("window-get-layout",this.identity).catch((e=>{}));const t=await this.getOptions();if(!t.layout&&!t.layoutSnapshot)throw new Error("Window does not have a Layout");return this.fin.Platform.Layout.wrap(e??this.identity)}getOptions(){return this.wire.sendAction("get-window-options",this.identity).then((({payload:e})=>e.data))}getParentApplication(){return this.wire.sendAction("window-get-parent-application",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity))}getParentWindow(){return this.wire.sendAction("window-get-parent-window",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity)).then((e=>e.getWindow()))}async getSnapshot(e){const t={area:e,...this.identity};console.warn("Window.getSnapshot has been deprecated, please use Window.capturePage");return(await this.wire.sendAction("get-window-snapshot",t)).payload.data}getState(){return this.wire.sendAction("get-window-state",this.identity).then((({payload:e})=>e.data))}getWebWindow(){return this.wire.sendAction("window-get-web-window",this.identity).catch((e=>{})),this.wire.environment.getWebWindow(this.identity)}isMainWindow(){return this.wire.sendAction("window-is-main-window",this.identity).catch((e=>{})),this.me.uuid===this.me.name}isShowing(){return this.wire.sendAction("is-window-showing",this.identity).then((({payload:e})=>e.data))}maximize(){return this.wire.sendAction("maximize-window",this.identity).then((()=>{}))}minimize(){return this.wire.sendAction("minimize-window",this.identity).then((()=>{}))}moveBy(e,t,n){return this.wire.sendAction("move-window-by",{deltaLeft:e,deltaTop:t,positioningOptions:n,...this.identity}).then((()=>{}))}moveTo(e,t,n){return this.wire.sendAction("move-window",{left:e,top:t,positioningOptions:n,...this.identity}).then((()=>{}))}resizeBy(e,t,n,i){return this.wire.sendAction("resize-window-by",{deltaWidth:Math.floor(e),deltaHeight:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}resizeTo(e,t,n,i){return this.wire.sendAction("resize-window",{width:Math.floor(e),height:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}restore(){return this.wire.sendAction("restore-window",this.identity).then((()=>{}))}setAsForeground(){return this.wire.sendAction("set-foreground-window",this.identity).then((()=>{}))}setBounds(e,t){return this.wire.sendAction("set-window-bounds",{...e,...this.identity,positioningOptions:t}).then((()=>{}))}show(e=!1){return this.wire.sendAction("show-window",{force:e,...this.identity}).then((()=>{}))}showAt(e,t,n=!1){return this.wire.sendAction("show-at-window",{force:n,left:Math.floor(e),top:Math.floor(t),...this.identity}).then((()=>{}))}updateOptions(e){return this.wire.sendAction("update-window-options",{options:e,...this.identity}).then((()=>{}))}authenticate(e,t){return this.wire.sendAction("window-authenticate",{userName:e,password:t,...this.identity}).then((()=>{}))}async showPopupMenu(e){const{payload:t}=await this.wire.sendAction("show-popup-menu",{options:e,...this.identity});return t.data}async closePopupMenu(){return this.wire.sendAction("close-popup-menu",{...this.identity}).then((()=>{}))}async dispatchPopupResult(e){this.wire.sendAction("window-dispatch-popup-result",this.identity).catch((e=>{})),await this.wire.sendAction("dispatch-popup-result",{data:e,...this.identity})}async print(e={content:"self"}){switch(e.content){case void 0:case"self":return super.print(e);case"screenshot":return this.wire.sendAction("print-screenshot",this.identity).then((()=>{}));case"views":return this.wire.sendAction("print-views",{...this.identity,options:e}).then((()=>{}));default:return}}}return S._Window=o,S}function ie(){return te||(te=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(function(){if(ee)return _;ee=1,Object.defineProperty(_,"__esModule",{value:!0}),_._WindowModule=void 0;const e=d,t=O,n=ne();class i extends e.Base{async wrap(e){this.wire.sendAction("window-wrap").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}wrapSync(e){this.wire.sendAction("window-wrap-sync").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}create(e){return this.wire.sendAction("create-window").catch((e=>{})),new n._Window(this.wire,{uuid:this.me.uuid,name:e.name}).createWindow(e)}getCurrent(){if(this.wire.sendAction("get-current-window").catch((e=>{})),!this.wire.me.isWindow)throw new Error("You are not in a Window context");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction("get-current-window-sync").catch((e=>{})),!this.wire.me.isWindow)throw new Error("You are not in a Window context");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return _._WindowModule=i,_}(),e),n(ne(),e)}(M)),M}Q.promisifySubscription=async(e,t,n=(()=>!0),i)=>{let r,o,s;const a=new Promise(((e,t)=>{r=e,o=t})),c=e=>{n(e)&&(clearTimeout(s),r(e))};return await e.on(t,c),i&&(s=setTimeout((()=>o(new Error("event timed out"))),i)),a.finally((()=>{e.removeListener(t,c).catch((()=>null))})),{getValue:()=>a}},Object.defineProperty(c,"__esModule",{value:!0}),c.System=void 0;const re=d,oe=g,se=ie(),ae=t;class ce extends re.EmitterBase{constructor(e){super(e,"system")}sendExternalProcessRequest(e,t){return new Promise(((n,i)=>{const r="external-process-exited";let o,s,a,c;"function"==typeof t.listener&&(a=e=>{const n=e||{};s={topic:"exited",uuid:n.processUuid||"",exitCode:n.exitCode||0},o===e.processUuid&&(t.listener(s),c.removeListener(r,a))},this.wire.me.name||(this.wire.me.name=this.wire.me.uuid),c=new se._Window(this.wire,this.wire.me),c.on(r,a)),this.wire.sendAction(e,t).then((({payload:e})=>{o=e.data.uuid,n(e.data),s&&o===s.uuid&&(t.listener(s),c.removeListener(r,a))})).catch((e=>{c&&c.removeListener(r,a),i(e)}))}))}getVersion(){return this.wire.sendAction("get-version").then((({payload:e})=>e.data))}clearCache(e){return this.wire.sendAction("clear-cache",e).then((()=>{}))}deleteCacheOnExit(){return this.wire.sendAction("delete-cache-request").then((()=>{}))}exit(){return this.wire.sendAction("exit-desktop").then((()=>{}))}async fetchManifest(e){const{payload:{data:t}}=await this.wire.sendAction("fetch-manifest",{manifestUrl:e});return t}flushCookieStore(){return this.wire.sendAction("flush-cookie-store").then((()=>{}))}getAllWindows(){return this.wire.sendAction("get-all-windows").then((({payload:e})=>e.data))}getAllApplications(){return this.wire.sendAction("get-all-applications").then((({payload:e})=>e.data))}getCommandLineArguments(){return this.wire.sendAction("get-command-line-arguments").then((({payload:e})=>e.data))}async getCrashReporterState(){const{payload:{data:{diagnosticMode:e,isRunning:t}}}=await this.wire.sendAction("get-crash-reporter-state");return console.warn("diagnosticMode property is deprecated. It will be removed in a future version"),{diagnosticMode:e,diagnosticsMode:e,isRunning:t}}async startCrashReporter(e){const t=e,n={...t,diagnosticMode:t.diagnosticsMode||t.diagnosticMode},{payload:{data:{diagnosticMode:i,isRunning:r}}}=await this.wire.sendAction("start-crash-reporter",n);return{diagnosticMode:i,diagnosticsMode:i,isRunning:r}}getUniqueUserId(){return this.wire.sendAction("get-unique-user-id").then((({payload:e})=>e.data))}getEntityInfo(e,t){return this.wire.sendAction("get-entity-info",{uuid:e,name:t}).then((({payload:e})=>e.data))}getEnvironmentVariable(e){return this.wire.sendAction("get-environment-variable",{environmentVariables:e}).then((({payload:e})=>e.data))}getFocusedWindow(){return this.wire.sendAction("get-focused-window").then((({payload:e})=>e.data))}async isAppCertified(e){const{payload:{data:{certifiedInfo:t}}}=await this.wire.sendAction("is-app-certified",{manifestUrl:e});return t}getInstalledRuntimes(){return this.wire.sendAction("get-installed-runtimes").then((({payload:e})=>e.data.runtimes))}async getInstalledApps(){const{payload:{data:{installedApps:e}}}=await this.wire.sendAction("get-installed-apps");return e}getLog(e){return this.wire.sendAction("view-log",e).then((({payload:e})=>e.data))}getMachineId(){return this.wire.sendAction("get-machine-id").then((({payload:e})=>e.data))}getMinLogLevel(){return this.wire.sendAction("get-min-log-level").then((({payload:e})=>e.data))}getLogList(){return this.wire.sendAction("list-logs").then((({payload:e})=>e.data))}getMonitorInfo(){return this.wire.sendAction("get-monitor-info").then((({payload:e})=>e.data))}getMousePosition(){return this.wire.sendAction("get-mouse-position").then((({payload:e})=>e.data))}getProcessList(){return console.warn("System.getProcessList has been deprecated. Please consider using our new process APIs: Window.getProcessInfo, View.getProcessInfo, Application.getProcessInfo, System.getAllProcessInfo"),this.wire.sendAction("process-snapshot").then((({payload:e})=>e.data))}async getAllProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction("get-all-process-info",this.identity);return e}getProxySettings(){return this.wire.sendAction("get-proxy-settings").then((({payload:e})=>e.data))}getRuntimeInfo(){return this.wire.sendAction("get-runtime-info").then((({payload:e})=>e.data))}getRvmInfo(){return this.wire.sendAction("get-rvm-info").then((({payload:e})=>e.data))}getHostSpecs(){return this.wire.sendAction("get-host-specs").then((({payload:e})=>e.data))}getOSInfo(){return this.wire.sendAction("get-os-info").then((({payload:e})=>e.data))}launchExternalProcess(e){return this.sendExternalProcessRequest("launch-external-process",e)}monitorExternalProcess(e){return this.sendExternalProcessRequest("monitor-external-process",e)}log(e,t){return this.wire.sendAction("write-to-log",{level:e,message:t}).then((()=>{}))}openUrlWithBrowser(e){return this.wire.sendAction("open-url-with-browser",{url:e}).then((()=>{}))}async registerCustomProtocol(e){if("object"!=typeof e)throw new Error("Must provide an object with a `protocolName` property having a string value.");await this.wire.sendAction("register-custom-protocol",e)}async unregisterCustomProtocol(e){await this.wire.sendAction("unregister-custom-protocol",{protocolName:e})}async getCustomProtocolState(e){return this.wire.sendAction("get-custom-protocol-state",{protocolName:e}).then((({payload:e})=>e.data))}releaseExternalProcess(e){return this.wire.sendAction("release-external-process",{uuid:e}).then((()=>{}))}showDeveloperTools(e){return this.wire.sendAction("show-developer-tools",e).then((()=>{}))}terminateExternalProcess(e){return this.wire.sendAction("terminate-external-process",e).then((()=>{}))}updateProxySettings(e){return this.wire.sendAction("update-proxy",e).then((()=>{}))}async downloadAsset(e,t){const n=()=>{};let i=n,r=n;const o=new Promise(((e,t)=>{i=e,r=t}));if("openfin"!==this.wire.environment.type)throw new oe.NotSupportedError("downloadAsset only supported in an OpenFin Render process");const s=oe.RuntimeError.getCallSite(),a=this.wire.environment.getNextMessageId().toString(),c=`asset-download-progress-${a}`,d=`asset-download-error-${a}`,h=`asset-download-complete-${a}`,l=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},u=()=>{this.removeListener(c,l)};await Promise.all([this.on(c,l),this.once(d,(e=>{u();const{reason:t,err:n}=e;r(new oe.RuntimeError({reason:t,error:n},s))})),this.once(h,(()=>{u(),i()}))]);const p=Object.assign(e,{downloadId:a});return await this.wire.sendAction("download-asset",p).catch((e=>{throw u(),e})),o}downloadRuntime(e,t){const n=oe.RuntimeError.getCallSite();return new Promise(((i,r)=>{if("openfin"!==this.wire.environment.type)return void r(new oe.NotSupportedError("downloadRuntime only supported in an OpenFin Render process"));const o=this.wire.environment.getNextMessageId().toString(),s=`runtime-download-progress-${o}`,a=`runtime-download-error-${o}`,c=`runtime-download-complete-${o}`,d=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},h=()=>{this.removeListener(s,d)};this.on(s,d),this.once(a,(e=>{h();const{reason:t,err:i}=e;r(new oe.RuntimeError({reason:t,error:i},n))})),this.once(c,(()=>{h(),i()}));const l=Object.assign(e,{downloadId:o});this.wire.sendAction("download-runtime",l).catch((e=>{h(),r(e)}))}))}downloadPreloadScripts(e){return this.wire.sendAction("download-preload-scripts",{scripts:e}).then((({payload:e})=>e.data))}getAllExternalApplications(){return this.wire.sendAction("get-all-external-applications").then((({payload:e})=>e.data))}getAppAssetInfo(e){return this.wire.sendAction("get-app-asset-info",e).then((({payload:e})=>e.data))}getCookies(e){const t=this.wire.environment.getUrl(),n=Object.assign(e,{url:t});return this.wire.sendAction("get-cookies",n).then((({payload:e})=>e.data))}setMinLogLevel(e){return this.wire.sendAction("set-min-log-level",{level:e}).then((()=>{}))}resolveUuid(e){return this.wire.sendAction("resolve-uuid",{entityKey:e}).then((({payload:e})=>e.data))}executeOnRemote(e,t){return t.requestingIdentity=e,this.wire.ferryAction(t)}readRegistryValue(e,t,n){return this.wire.sendAction("read-registry-value",{rootKey:e,subkey:t,value:n}).then((({payload:e})=>e.data))}registerExternalConnection(e){return this.wire.sendAction("register-external-connection",{uuid:e}).then((({payload:e})=>e.data))}async getServiceConfiguration(e){if("string"!=typeof e.name)throw new Error("Must provide an object with a `name` property having a string value");const{name:t}=e;return this.wire.sendAction("get-service-configuration",{name:t}).then((({payload:e})=>e.data))}async getSystemAppConfig(e){if("string"!=typeof e)throw new Error("Must provide a string value for name of system app");return this.wire.sendAction("get-system-app-configuration",{name:e}).then((({payload:e})=>e.data))}async registerShutdownHandler(e){this.wire.sendAction("system-register-shutdown-handler").catch((e=>{}));const{uuid:t,name:n}=this.wire.me;this.on("system-shutdown",(i=>{e({proceed:()=>{this.wire.environment.raiseEvent("application/system-shutdown-handled",{uuid:t,name:n,topic:"application"})}})}))}runRvmHealthCheck(){return this.wire.sendAction("run-rvm-health-check").then((({payload:e})=>e.data))}async launchManifest(e,t={}){const{subscribe:n,...i}=t,r=i;if(n){const e=new ae.EventEmitter;n(e);const t="app-version-progress",i="runtime-status",o="app-version-complete",s="app-version-error",a=this.wire.environment.getNextMessageId().toString();r.appVersionId=a;const c=[o,t,i,s],d=e=>{const{appVersionId:t,topic:n,type:i,...r}=e;return{...r,type:c.find((e=>i.includes(e)))}},h=t=>{const n=d(t);e.emit(n.type,n)},l=()=>{this.removeListener(`${t}.${a}`,h),this.removeListener(`${i}.${a}`,h),this.removeListener(`${o}.${a}`,h),this.removeListener(`${s}.${a}`,h),this.removeListener(`${o}.${a}`,l),this.removeListener(`${s}.${a}`,l)};await Promise.all([this.on(`${t}.${a}`,h),this.on(`${i}.${a}`,h),this.once(`${o}.${a}`,h),this.once(`${s}.${a}`,h),this.once(`${o}.${a}`,l),this.once(`${s}.${a}`,l)])}return(await this.wire.sendAction("launch-manifest",{manifestUrl:e,opts:r})).payload.data.manifest}async queryPermissionForCurrentContext(e){const t={uuid:this.wire.me.uuid,name:this.wire.me.name};return(await this.wire.sendAction("query-permission-for-current-context",{apiName:e,identity:t})).payload.data}async enableNativeWindowIntegrationProvider(e){const{payload:t}=await this.wire.sendAction("enable-native-window-integration-provider",{permissions:e});return t.data}async registerUsage({data:e,type:t}){await this.wire.sendAction("register-usage",{data:e,type:t})}async getPrinters(){const{payload:e}=await this.wire.sendAction("system-get-printers");return e.data}async updateProcessLoggingOptions(e){await this.wire.sendAction("system-update-process-logging-options",{options:e})}async getDomainSettings(){const{payload:{data:e}}=await this.wire.sendAction("get-domain-settings",this.identity);return e}async setDomainSettings(e){await this.wire.sendAction("set-domain-settings",{domainSettings:e,...this.identity})}async refreshExtensions(){const{payload:e}=await this.wire.sendAction("refresh-extensions");return e.data}async getInstalledExtensions(){const{payload:e}=await this.wire.sendAction("get-installed-extensions");return e.data}}c.System=ce;var de={},he={};Object.defineProperty(he,"__esModule",{value:!0}),he.RefCounter=void 0;he.RefCounter=class{constructor(){this.topicRefMap=new Map}incRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t+1;n=i,this.topicRefMap.set(e,i)}else this.topicRefMap.set(e,1),n=1;return n}decRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t-1;this.topicRefMap.set(e,i),n=i}else n=-1;return n}actOnFirst(e,t,n){return 1===this.incRefCount(e)?t():n()}actOnLast(e,t,n){return 0===this.decRefCount(e)?t():n()}};var le={},ue={},pe={};Object.defineProperty(pe,"__esModule",{value:!0}),pe.ChannelBase=pe.ProtectedItems=void 0;const we=e=>async(t,n,i)=>{const r=await e(t,n,i);return void 0===r?n:r};pe.ProtectedItems=class{constructor(e,t){this.providerIdentity=e,this.close=t}};class ye{static defaultAction(e){throw new Error(`No action registered at target for ${e}`)}constructor(){this.subscriptions=new Map}async processAction(e,t,n){try{const i=this.subscriptions.has(e)?this.subscriptions.get(e):(t,n)=>(this.defaultAction??ye.defaultAction)(e,t,n),r=this.preAction?await this.preAction(e,t,n):t,o=await i(r,n);return this.postAction?await this.postAction(e,o,n):o}catch(t){if(this.errorMiddleware)return this.errorMiddleware(e,t,n);throw t}}beforeAction(e){if(this.preAction)throw new Error("Already registered beforeAction middleware");this.preAction=we(e)}onError(e){if(this.errorMiddleware)throw new Error("Already registered error middleware");this.errorMiddleware=e}afterAction(e){if(this.postAction)throw new Error("Already registered afterAction middleware");this.postAction=we(e)}remove(e){this.subscriptions.delete(e)}setDefaultAction(e){if(this.defaultAction)throw new Error("default action can only be set once");this.defaultAction=e}register(e,t){if(this.subscriptions.has(e))throw new Error(`Subscription already registered for action: ${e}. Unsubscribe before adding new subscription`);return this.subscriptions.set(e,t),!0}}pe.ChannelBase=ye;var fe,ge,me,ve=s&&s.__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)},Ce=s&&s.__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};Object.defineProperty(ue,"__esModule",{value:!0}),ue.ChannelClient=void 0;const be=pe,Ie=new Map;class Ee extends be.ChannelBase{static closeChannelByEndpointId(e){const t=Ie.get(e);t&&ve(t,me,"f").call(t)}static handleProviderDisconnect(e){for(const t of Ie.values())t.providerIdentity.channelId===e.channelId&&(t.disconnectListener(e),ve(t,me,"f").call(t))}constructor(e,t,n){super(),fe.set(this,void 0),ge.set(this,void 0),this.processAction=(e,t,n)=>super.processAction(e,t,n),me.set(this,(()=>{Ie.delete(this.endpointId),ve(this,ge,"f").close()})),Ce(this,fe,new be.ProtectedItems(e,t),"f"),this.disconnectListener=()=>{},this.endpointId=e.endpointId,Ce(this,ge,n,"f"),Ie.set(this.endpointId,this),n.receive(this.processAction)}get providerIdentity(){return ve(this,fe,"f").providerIdentity}async dispatch(e,t){if(ve(this,ge,"f").isEndpointConnected(this.providerIdentity.channelId))return ve(this,ge,"f").send(this.providerIdentity.channelId,e,t);throw new Error("The client you are trying to dispatch from is disconnected from the target provider.")}onDisconnection(e){this.disconnectListener=t=>{try{e(t)}catch(e){throw new Error(`Error while calling the onDisconnection callback: ${e.message}`)}finally{this.disconnectListener=()=>{}}}}async disconnect(){await this.sendDisconnectAction(),ve(this,me,"f").call(this)}async sendDisconnectAction(){const e=ve(this,fe,"f");await e.close()}static async wireClose(e,t,n){const{channelName:i,uuid:r,name:o}=t;await e.sendAction("disconnect-from-channel",{channelName:i,uuid:r,name:o,endpointId:n})}}ue.ChannelClient=Ee,fe=new WeakMap,ge=new WeakMap,me=new WeakMap;var xe={},Ae={};Object.defineProperty(Ae,"__esModule",{value:!0}),Ae.exhaustiveCheck=void 0,Ae.exhaustiveCheck=function(e,t){throw new Error(`Unsupported value: ${e}${t?`\n Supported values are: ${t.join("")}`:""}`)};var Pe,Me,_e,Oe={},Se=s&&s.__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},Re=s&&s.__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)};Object.defineProperty(Oe,"__esModule",{value:!0}),Oe.ClassicInfo=Oe.ClassicStrategy=void 0;Oe.ClassicStrategy=class{constructor(e,t,n,i){this.messageReceiver=t,this.endpointId=n,this.providerIdentity=i,Pe.set(this,void 0),Me.set(this,new Map),_e.set(this,new Map),this.send=async(e,t,n)=>{const i=Re(this,Me,"f").get(e);if(!i)throw new Error(`Could not locate routing info for endpoint ${e}`);const r={...i};r.isLocalEndpointId&&delete r.endpointId,delete r.isLocalEndpointId;const o=Re(this,Pe,"f").sendAction("send-channel-message",{...r,providerIdentity:this.providerIdentity,action:t,payload:n});Re(this,_e,"f").get(e)?.add(o);return(await o.catch((e=>{throw new Error(e.message)})).finally((()=>{Re(this,_e,"f").get(e)?.delete(o)}))).payload.data.result},this.close=async()=>{this.messageReceiver.removeEndpoint(this.providerIdentity.channelId,this.endpointId),[...Re(this,Me,"f").keys()].forEach((e=>this.closeEndpoint(e))),Se(this,Me,new Map,"f")},Se(this,Pe,e,"f")}onEndpointDisconnect(e,t){}receive(e){this.messageReceiver.addEndpoint(e,this.providerIdentity.channelId,this.endpointId)}async closeEndpoint(e){const t=Re(this,Me,"f").get(e);Re(this,Me,"f").delete(e);const n=Re(this,_e,"f").get(e);n?.forEach((n=>{const i=`Channel connection with identity uuid: ${t?.uuid} / name: ${t?.name} / endpointId: ${e} no longer connected.`;n.cancel(new Error(i))}))}isEndpointConnected(e){return Re(this,Me,"f").has(e)}addEndpoint(e,t){Re(this,Me,"f").set(e,t.endpointIdentity),Re(this,_e,"f").set(e,new Set)}isValidEndpointPayload(e){return"string"==typeof e?.endpointIdentity?.endpointId||"string"==typeof e?.endpointIdentity?.channelId}},Pe=new WeakMap,Me=new WeakMap,_e=new WeakMap,Oe.ClassicInfo={version:5,minimumVersion:0,type:"classic"};var Fe={},je={},ke={};Object.defineProperty(ke,"__esModule",{value:!0}),ke.errorToPOJO=void 0,ke.errorToPOJO=function(e){return{stack:e.stack,name:e.name,message:e.message,toString:()=>e.stack||e.toString()}};var Le,Te,$e=s&&s.__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)},Be=s&&s.__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};Object.defineProperty(je,"__esModule",{value:!0}),je.RTCEndpoint=void 0;const Ge=ke;je.RTCEndpoint=class{static isValidEndpointPayload(e){const t=e=>"object"==typeof e&&null!==e;return t(e)&&t(e.endpointIdentity)&&t(e.rtc)&&"string"==typeof e.endpointIdentity.endpointId}constructor({rtc:e,endpointIdentity:t}){this.responseMap=new Map,Le.set(this,null),Te.set(this,void 0),this.connectionStateChangeHandler=e=>{"connected"!==this.rtc.rtcClient.connectionState&&(this.rtc.rtcClient.removeEventListener("connectionstatechange",this.connectionStateChangeHandler),this.close(),$e(this,Te,"f")&&$e(this,Te,"f").call(this))},this.send=async(e,t)=>{const n=`message-${Math.random()}`,i=new Promise(((e,t)=>{this.responseMap.set(n,{resolve:e,reject:t})}));return this.rtc.channels.request.send(JSON.stringify({action:e,payload:t,messageId:n})),i},this.close=()=>{this.responseMap.forEach((e=>e.reject("Connection has closed."))),this.responseMap=new Map,this.rtc.channels.request.close(),this.rtc.channels.response.close(),this.rtc.rtcClient.close()},this.rtc=e,this.endpointIdentity=t,this.rtc.channels.response.addEventListener("message",(e=>{let{data:t}=e;e.data instanceof ArrayBuffer&&(t=(new TextDecoder).decode(e.data));const{messageId:n,payload:i,success:r,error:o}=JSON.parse(t),{resolve:s,reject:a}=this.responseMap.get(n)??{};s&&a?(this.responseMap.delete(n),r?s(i):a(o)):(console.log("Could not find id in responseMap."),console.log(e))})),this.rtc.channels.request.addEventListener("message",(async e=>{let{data:n}=e;e.data instanceof ArrayBuffer&&(n=(new TextDecoder).decode(e.data));const{messageId:i,action:r,payload:o}=JSON.parse(n);if($e(this,Le,"f"))try{const e=await $e(this,Le,"f").call(this,r,o,t);this.rtc.channels.response.send(JSON.stringify({messageId:i,payload:e,success:!0}))}catch(e){"open"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,error:(0,Ge.errorToPOJO)(e),success:!1}))}else"open"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,success:!1,error:"Connection not ready."}))})),this.rtc.rtcClient.addEventListener("connectionstatechange",this.connectionStateChangeHandler),Object.values(this.rtc.channels).forEach((e=>{e.onclose=e=>{[...this.responseMap.values()].forEach((e=>e.reject(new Error("RTCDataChannel closed unexpectedly, this is most commonly caused by message size. Note: RTC Channels have a message size limit of ~255kB.")))),this.close(),$e(this,Te,"f")&&$e(this,Te,"f").call(this)}}))}onDisconnect(e){if($e(this,Te,"f"))throw new Error("RTCEndpoint disconnectListener cannot be set twice.");Be(this,Te,e,"f")}receive(e){if($e(this,Le,"f"))throw new Error("You have already set a listener for this RTC Endpoint.");Be(this,Le,e,"f")}get connected(){return"connected"===this.rtc.rtcClient.connectionState}},Le=new WeakMap,Te=new WeakMap;var We,He,Ne,De={},Ue=s&&s.__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)},Ve=s&&s.__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};Object.defineProperty(De,"__esModule",{value:!0}),De.EndpointStrategy=void 0;De.EndpointStrategy=class{constructor(e,t,n){this.EndpointType=e,this.StrategyName=n,We.set(this,null),He.set(this,new Map),Ne.set(this,!0),this.send=async(e,t,n)=>this.getEndpointById(e).send(t,n),this.close=async()=>{Ue(this,Ne,"f")&&(Ue(this,He,"f").forEach((e=>e.close())),Ve(this,He,new Map,"f")),Ve(this,Ne,!1,"f")},this.isValidEndpointPayload=t}onEndpointDisconnect(e,t){this.getEndpointById(e).onDisconnect(t)}receive(e){if(Ue(this,We,"f"))throw new Error(`You have already set a listener for this ${this.StrategyName} Strategy`);Ve(this,We,e,"f"),Ue(this,He,"f").forEach((e=>e.receive(Ue(this,We,"f"))))}getEndpointById(e){const t=Ue(this,He,"f").get(e);if(!t)throw new Error(`Client with endpoint id ${e} is not connected`);return t}get connected(){return Ue(this,Ne,"f")}isEndpointConnected(e){return Ue(this,He,"f").has(e)}addEndpoint(e,t){if(!Ue(this,Ne,"f"))return void console.warn(`Adding endpoint to disconnected ${this.StrategyName} Strategy`);const n=new this.EndpointType(t);Ue(this,We,"f")&&n.receive(Ue(this,We,"f")),Ue(this,He,"f").set(e,n)}async closeEndpoint(e){Ue(this,He,"f").delete(e)}},We=new WeakMap,He=new WeakMap,Ne=new WeakMap,Object.defineProperty(Fe,"__esModule",{value:!0}),Fe.RTCInfo=Fe.RTCStrategy=void 0;const ze=je,Ke=De;class qe extends Ke.EndpointStrategy{constructor(){super(ze.RTCEndpoint,ze.RTCEndpoint.isValidEndpointPayload,"RTC")}}Fe.RTCStrategy=qe,Fe.RTCInfo={version:2,minimumVersion:0,type:"rtc"};var Je={};Object.defineProperty(Je,"__esModule",{value:!0}),Je.RTCICEManager=void 0;const Ye=d;class Ze extends Ye.EmitterBase{constructor(e){super(e,"channel"),this.ensureChannelOpened=e=>new Promise(((t,n)=>{if("open"===e.readyState)t();else if("connecting"===e.readyState){const n=()=>{e.removeEventListener("open",n),t()};e.addEventListener("open",n)}else n(new Error("This Channel has already closed"))}))}static createDataChannelPromise(e,t){let n;const i=new Promise((e=>{n=e})),r=i=>{const o=()=>{i.channel.removeEventListener("open",o),n(i.channel)};i.channel.label===e&&(i.channel.addEventListener("open",o),t.removeEventListener("datachannel",r))};return t.addEventListener("datachannel",r),i}async listenForProviderIce(e,t){await this.on(this.createProviderEventName(e),t,{timestamp:Date.now()})}async raiseProviderIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createProviderEventName(e)),t)}async listenForClientIce(e,t){await this.on(this.createClientEventName(e),t,{timestamp:Date.now()})}async raiseClientIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createClientEventName(e)),t)}cleanupIceListeners(e){this.removeAllListeners(this.createClientEventName(e)),this.removeAllListeners(this.createProviderEventName(e))}createClientEventName(e){return`ice-client-${e}`}createProviderEventName(e){return`ice-provider-${e}`}createRouteString(e){return`channel/${e}`}createRtcPeer(){return this.wire.environment.getRtcPeer()}async startClientOffer(){const e=Math.random().toString(),t=this.createRtcPeer();t.addEventListener("icecandidate",(async t=>{t.candidate&&await this.raiseClientIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForProviderIce(e,(async e=>{await t.addIceCandidate(e.candidate)}));const n={request:t.createDataChannel("request"),response:t.createDataChannel("response")},i=await t.createOffer();await t.setLocalDescription(i);const r=Promise.all([n.request,n.response].map(this.ensureChannelOpened)).then((()=>{}));return{rtcClient:t,channels:n,offer:i,rtcConnectionId:e,channelsOpened:r}}async finishClientOffer(e,t,n){return await e.setRemoteDescription(t),await n,!0}async createProviderAnswer(e,t){const n=this.createRtcPeer(),i=Ze.createDataChannelPromise("request",n),r=Ze.createDataChannelPromise("response",n);n.addEventListener("icecandidate",(async t=>{t.candidate&&await this.raiseProviderIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForClientIce(e,(async e=>{await n.addIceCandidate(e.candidate)})),await n.setRemoteDescription(t);const o=await n.createAnswer();await n.setLocalDescription(o);const s=Promise.all([i,r]).then((([t,n])=>(this.cleanupIceListeners(e),{request:t,response:n})));return{rtcClient:n,answer:o,channels:s}}}Je.RTCICEManager=Ze;var Qe={},Xe={};function et(e){return[...e.split(".").reverse().entries()].reduce(((e,[t,n])=>e+ +n*1e4**t),0)}function tt(e,t){return et(e)>=et(t)}function nt(e){return e.split("/")[0]}Object.defineProperty(Xe,"__esModule",{value:!0}),Xe.runtimeUuidMeetsMinimumRuntimeVersion=Xe.parseRuntimeUuid=Xe.meetsMinimumRuntimeVersion=void 0,Xe.meetsMinimumRuntimeVersion=tt,Xe.parseRuntimeUuid=nt,Xe.runtimeUuidMeetsMinimumRuntimeVersion=function(e,t){return tt(nt(e),t)};var it,rt,ot,st,at,ct=s&&s.__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)},dt=s&&s.__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};Object.defineProperty(Qe,"__esModule",{value:!0}),Qe.ChannelProvider=void 0;const ht=pe,lt=Xe;class ut extends ht.ChannelBase{get connections(){return[...ct(this,it,"f")]}static handleClientDisconnection(e,t){const n=e.connections.find((e=>e.endpointId===t.endpointId));if(n)ct(e,st,"f").call(e,n);else{e.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name)).forEach(ct(e,st,"f"))}e.disconnectListener(t)}static setProviderRemoval(e,t){ut.removalMap.set(e,t)}constructor(e,t,n){super(),it.set(this,void 0),rt.set(this,void 0),ot.set(this,void 0),st.set(this,(e=>{const t=this.connections.filter((t=>t.endpointId!==e.endpointId));ct(this,ot,"f").closeEndpoint(e.endpointId),dt(this,it,t,"f")})),this.processAction=async(e,t,n)=>(ut.clientIsMultiRuntime(n)&&!(0,lt.runtimeUuidMeetsMinimumRuntimeVersion)(n.runtimeUuid,"18.87.56.0")?this.handleMultiRuntimeLegacyClient(n):this.checkForClientConnection(n),super.processAction(e,t,n)),at.set(this,(()=>{ct(this,ot,"f").close();const e=ut.removalMap.get(this);e&&e()})),dt(this,rt,new ht.ProtectedItems(e,t),"f"),this.connectListener=()=>{},this.disconnectListener=()=>{},dt(this,it,[],"f"),dt(this,ot,n,"f"),n.receive(this.processAction)}dispatch(e,t,n){const i=e.endpointId??this.getEndpointIdForOpenFinId(e,t);return i&&ct(this,ot,"f").isEndpointConnected(i)?ct(this,ot,"f").send(i,t,n):Promise.reject(new Error(`Client connection with identity uuid: ${e.uuid} / name: ${e.name} / endpointId: ${i} no longer connected.`))}async processConnection(e,t){return ct(this,it,"f").push(e),this.connectListener(e,t)}publish(e,t){return this.connections.map((n=>ct(this,ot,"f").send(n.endpointId,e,t)))}onConnection(e){this.connectListener=e}onDisconnection(e){this.disconnectListener=e}async destroy(){const e=ct(this,rt,"f");e.providerIdentity,dt(this,it,[],"f"),await e.close(),ct(this,at,"f").call(this)}async getAllClientInfo(){return this.connections.map((e=>{const{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}=e;return{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}}))}checkForClientConnection(e){if(!this.isClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider.\n Client Identity: {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}isClientConnected(e){return ut.clientIdentityIncludesEndpointId(e)?this.connections.some((t=>t.endpointId===e.endpointId&&t.uuid===e.uuid&&t.name===e.name)):this.isLegacyClientConnected(e)}isLegacyClientConnected(e){return this.connections.some((t=>t.uuid===e.uuid&&t.name===e.name))}handleMultiRuntimeLegacyClient(e){if(!this.isLegacyClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider. Client Identity:\n {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}getEndpointIdForOpenFinId(e,t){const n=this.connections.filter((t=>t.name===e.name&&t.uuid===e.uuid));if(n.length>=2){const n=ct(this,rt,"f"),{uuid:i,name:r}=e,o=n?.providerIdentity.uuid,s=n?.providerIdentity.name;console.warn(`WARNING: Dispatch call may have unintended results. The "to" argument of your dispatch call is missing the\n "endpointId" parameter. The identity you are dispatching to ({uuid: ${i}, name: ${r}})\n has multiple channelClients for this channel. Your dispatched action: (${t}) from the provider:\n ({uuid: ${o}, name: ${s}}) will only be processed by the most recently-created client.`)}return n.pop()?.endpointId}static clientIdentityIncludesEndpointId(e){return void 0!==e.endpointId}static clientIsMultiRuntime(e){return void 0!==e.runtimeUuid}static async wireClose(e,t){await e.sendAction("destroy-channel",{channelName:t})}}Qe.ChannelProvider=ut,it=new WeakMap,rt=new WeakMap,ot=new WeakMap,st=new WeakMap,at=new WeakMap,ut.removalMap=new WeakMap;var pt={};Object.defineProperty(pt,"__esModule",{value:!0}),pt.MessageReceiver=void 0;const wt=ue,yt=d;class ft extends yt.Base{constructor(e){super(e),this.onmessage=e=>"process-channel-message"===e.action&&(this.processChannelMessage(e),!0),this.endpointMap=new Map,this.latestEndpointIdByChannelId=new Map,e.registerMessageHandler(this.onmessage.bind(this))}async processChannelMessage(e){const{senderIdentity:t,providerIdentity:n,action:i,ackToSender:r,payload:o,intendedTargetIdentity:s}=e.payload,a=s.channelId??s.endpointId??this.latestEndpointIdByChannelId.get(n.channelId),c=this.endpointMap.get(a);if(!c)return r.payload.success=!1,r.payload.reason=`Client connection with identity uuid: ${this.wire.me.uuid} / name: ${this.wire.me.name} / endpointId: ${a} no longer connected.`,this.wire.sendRaw(r);try{const e=await c(i,o,t);return r.payload.payload=r.payload.payload||{},r.payload.payload.result=e,this.wire.sendRaw(r)}catch(e){return r.payload.success=!1,r.payload.reason=e.message,this.wire.sendRaw(r)}}addEndpoint(e,t,n){this.endpointMap.set(n,e),t!==n&&this.latestEndpointIdByChannelId.set(t,n)}removeEndpoint(e,t){this.endpointMap.delete(t),this.latestEndpointIdByChannelId.get(e)===t&&this.latestEndpointIdByChannelId.delete(e)}checkForPreviousClientConnection(e){const t=this.latestEndpointIdByChannelId.get(e);t&&(wt.ChannelClient.closeChannelByEndpointId(t),console.warn("You have created a second connection to an older provider. First connection has been removed from the clientMap"),console.warn("If the provider calls publish(), you may receive multiple messages."))}}pt.MessageReceiver=ft;var gt={};Object.defineProperty(gt,"__esModule",{value:!0}),gt.ProtocolManager=void 0;gt.ProtocolManager=class{constructor(e){this.ProtocolsInPreferenceOrder=e,this.DefaultClientProtocols=["classic"],this.DefaultProviderProtocols=["classic"],this.getClientProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultClientProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(", ")}.`);return t},this.getProviderProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultProviderProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(", ")}.`);return t},this.getCompatibleProtocols=(e,t)=>t.supportedProtocols.filter((t=>e.some((e=>e.type===t.type&&t.version>=e.minimumVersion&&e.version>=(t.minimumVersion??0))))).slice(0,t.maxProtocols)}};var mt={};Object.defineProperty(mt,"__esModule",{value:!0});class vt{static combine(e,t){return new vt(e,t)}constructor(e,t){this.primary=e,this.secondary=t}onEndpointDisconnect(e,t){this.primary.onEndpointDisconnect(e,(()=>{this.secondary.isEndpointConnected(e)||t()})),this.secondary.onEndpointDisconnect(e,(()=>{this.primary.isEndpointConnected(e)||t()}))}isValidEndpointPayload(e){return this.primary.isValidEndpointPayload(e)||this.secondary.isValidEndpointPayload(e)}async closeEndpoint(e){await this.primary.closeEndpoint(e),await this.secondary.closeEndpoint(e)}isEndpointConnected(e){return this.primary.isEndpointConnected(e)||this.secondary.isEndpointConnected(e)}async addEndpoint(e,t){this.primary.isValidEndpointPayload(t)&&await this.primary.addEndpoint(e,t),this.secondary.isValidEndpointPayload(t)&&await this.secondary.addEndpoint(e,t)}receive(e){this.primary.receive(e),this.secondary.receive(e)}send(e,t,n){return this.primary.isEndpointConnected(e)?this.primary.send(e,t,n):this.secondary.send(e,t,n)}async close(){await Promise.all([this.primary.close(),this.secondary.close()])}}mt.default=vt;var Ct,bt,It=s&&s.__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},Et=s&&s.__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)},xt=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(xe,"__esModule",{value:!0}),xe.ConnectionManager=void 0;const At=Ae,Pt=d,Mt=Oe,_t=Fe,Ot=Je,St=Qe,Rt=pt,Ft=gt,jt=xt(mt);class kt extends Pt.Base{static getProtocolOptionsFromStrings(e){return e.map((e=>{switch(e){case"rtc":return _t.RTCInfo;case"classic":return Mt.ClassicInfo;default:return(0,At.exhaustiveCheck)(e,["rtc","classic"])}}))}constructor(e){super(e),Ct.set(this,void 0),bt.set(this,void 0),this.removeChannelFromProviderMap=e=>{this.providerMap.delete(e)},this.onmessage=e=>"process-channel-connection"===e.action&&(this.processChannelConnection(e),!0),this.providerMap=new Map,this.protocolManager=new Ft.ProtocolManager("node"===this.wire.environment.type?["classic"]:["rtc","classic"]),It(this,Ct,new Rt.MessageReceiver(e),"f"),It(this,bt,new Ot.RTCICEManager(e),"f"),e.registerMessageHandler(this.onmessage.bind(this))}createProvider(e,t){const n=Object.assign(this.wire.environment.getDefaultChannelOptions().create,e||{}),i=this.protocolManager.getProviderProtocols(n?.protocols),r=i.map((e=>{switch(e){case"rtc":return new _t.RTCStrategy;case"classic":return new Mt.ClassicStrategy(this.wire,Et(this,Ct,"f"),t.channelId,t);default:return(0,At.exhaustiveCheck)(e,["rtc","classic"])}}));let o;if(2===r.length){const[e,t]=r;o=jt.default.combine(e,t)}else{if(1!==r.length)throw new Error("failed to combine strategies");[o]=r}const s=new St.ChannelProvider(t,(()=>St.ChannelProvider.wireClose(this.wire,t.channelName)),o),a=t.channelId;return this.providerMap.set(a,{provider:s,strategy:o,supportedProtocols:kt.getProtocolOptionsFromStrings(i)}),St.ChannelProvider.setProviderRemoval(s,this.removeChannelFromProviderMap.bind(this)),s}async createClientOffer(e){const t=this.protocolManager.getClientProtocols(e?.protocols);let n;return{offer:{supportedProtocols:await Promise.all(t.map((async e=>{switch(e){case"rtc":{const{rtcClient:e,channels:t,offer:i,rtcConnectionId:r,channelsOpened:o}=await Et(this,bt,"f").startClientOffer();return n={rtcClient:e,channels:t,channelsOpened:o},{type:"rtc",version:_t.RTCInfo.version,payload:{offer:i,rtcConnectionId:r}}}case"classic":return{type:"classic",version:Mt.ClassicInfo.version};default:return(0,At.exhaustiveCheck)(e,["rtc","classic"])}}))),maxProtocols:2},rtc:n}}async createClientStrategy(e,t){t.endpointId||(t.endpointId=this.wire.environment.getNextMessageId(),Et(this,Ct,"f").checkForPreviousClientConnection(t.channelId));const n=t.answer??{supportedProtocols:[{type:"classic",version:1}]},i=(await Promise.all(n.supportedProtocols.map((async n=>"rtc"===n.type&&e?(await Et(this,bt,"f").finishClientOffer(e.rtcClient,n.payload.answer,e.channelsOpened),new _t.RTCStrategy):"classic"===n.type?new Mt.ClassicStrategy(this.wire,Et(this,Ct,"f"),t.endpointId,t):null)))).filter((e=>null!==e));let r;if(e&&!i.some((e=>e instanceof _t.RTCStrategy))&&e&&e.rtcClient.close(),i.length>=2)r=jt.default.combine(i[0],i[1]);else{if(!i.length)throw new Error("No compatible protocols");[r]=i}const o={endpointIdentity:t,rtc:e};return r.addEndpoint(t.channelId,o),r}async processChannelConnection(e){const{clientIdentity:t,providerIdentity:n,ackToSender:i,payload:r,offer:o}=e.payload;t.endpointId?t.isLocalEndpointId=!1:(t.endpointId=this.wire.environment.getNextMessageId(),t.isLocalEndpointId=!0);const s=n.channelId,a=this.providerMap.get(s);if(!a)return i.payload.success=!1,i.payload.reason=`Channel "${n.channelName}" has been destroyed.`,this.wire.sendRaw(i);const{provider:c,strategy:d,supportedProtocols:h}=a;try{if(!(c instanceof St.ChannelProvider))throw Error("Cannot connect to a channel client");const e=o??{supportedProtocols:[{type:"classic",version:1}],maxProtocols:1},n=this.protocolManager.getCompatibleProtocols(h,e);if(!n.length)throw new Error("This provider does not support any of the offered protocols.");const s=await c.processConnection(t,r);i.payload.payload=i.payload.payload||{};let a={supportedProtocols:[],endpointPayloadPromise:Promise.resolve({endpointIdentity:t})};return a=await n.reduce((async(e,t)=>{const n=await e;if("rtc"===t.type){const{answer:e,rtcClient:i,channels:r}=await Et(this,bt,"f").createProviderAnswer(t.payload.rtcConnectionId,t.payload.offer);n.supportedProtocols.push({type:"rtc",version:_t.RTCInfo.version,payload:{answer:e}}),n.endpointPayloadPromise=n.endpointPayloadPromise.then((e=>r.then((t=>({...e,rtc:{rtcClient:i,channels:t}})))))}else n.supportedProtocols.push({type:"classic",version:Mt.ClassicInfo.version});return n}),Promise.resolve(a)),a.endpointPayloadPromise.then((e=>d.addEndpoint(t.endpointId,e))),i.payload.payload.result=s,i.payload.payload.answer=a,this.wire.sendRaw(i)}catch(e){return i.payload.success=!1,i.payload.reason=e.message,this.wire.sendRaw(i)}}}xe.ConnectionManager=kt,Ct=new WeakMap,bt=new WeakMap;var Lt,Tt,$t,Bt=s&&s.__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},Gt=s&&s.__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)};Object.defineProperty(le,"__esModule",{value:!0}),le.Channel=void 0;const Wt=t,Ht=G,Nt=d,Dt=ue,Ut=xe,Vt=Qe;function zt(e){const t=Math.floor(e/10),n=Math.min(3e4,500*2**t);return new Promise((e=>{setTimeout((()=>{e(!1)}),n)}))}class Kt extends Nt.EmitterBase{constructor(e){super(e,"channel"),Lt.set(this,void 0),Tt.set(this,new Wt.EventEmitter),$t.set(this,new Ht.AsyncRetryableLazy((async()=>{await Promise.all([this.on("disconnected",(e=>{Dt.ChannelClient.handleProviderDisconnect(e)})),this.on("connected",((...e)=>{Gt(this,Tt,"f").emit("connected",...e)}))]).catch((()=>new Error("error setting up channel connection listeners")))}))),Bt(this,Lt,new Ut.ConnectionManager(e),"f")}async getAllChannels(){return this.wire.sendAction("get-all-channels").then((({payload:e})=>e.data))}async onChannelConnect(e){await this.on("connected",e)}async onChannelDisconnect(e){await this.on("disconnected",e)}async safeConnect(e,t,n){const i={count:0};do{let r=()=>{};const o=new Promise((t=>{r=n=>{e===n.channelName&&t(!0)},Gt(this,Tt,"f").on("connected",r)}));try{if(i.count>0){i.gotConnectedEvent=await Promise.race([zt(i.count),o]);const t=await this.wire.sendAction("connect-to-channel",{...n,retryInfo:i});return console.log(`Successfully connected to channelName: ${e}`),t.payload.data}const t=this.wire.sendAction("connect-to-channel",n);i.originalMessageId=t.messageId;return(await t).payload.data}catch(n){if(!n.message.includes("internal-nack"))throw n;t&&0===i.count&&console.warn(`No channel found for channelName: ${e}. Waiting for connection...`)}finally{i.count+=1,Gt(this,Tt,"f").removeListener("connected",r)}}while(t);throw new Error(`No channel found for channelName: ${e}.`)}async connect(e,t={}){if(await Gt(this,$t,"f").getValue(),!e||"string"!=typeof e)throw new Error("Please provide a channelName string to connect to a channel.");const n={wait:!0,...this.wire.environment.getDefaultChannelOptions().connect,...t},{offer:i,rtc:r}=await Gt(this,Lt,"f").createClientOffer(n);let o;(this.fin.me.isFrame||this.fin.me.isView||this.fin.me.isWindow)&&(o=(await this.fin.me.getInfo()).url);const s={channelName:e,...n,offer:i,connectionUrl:o},a=await this.safeConnect(e,n.wait,s),c=await Gt(this,Lt,"f").createClientStrategy(r,a),d=new Dt.ChannelClient(a,(()=>Dt.ChannelClient.wireClose(this.wire,a,a.endpointId)),c);return c.onEndpointDisconnect(a.channelId,(async()=>{try{await d.sendDisconnectAction()}catch(e){console.warn(`Something went wrong during disconnect for client with uuid: ${a.uuid} / name: ${a.name} / endpointId: ${a.endpointId}.`)}finally{Dt.ChannelClient.handleProviderDisconnect(a)}})),d}async create(e,t){if(!e)throw new Error("Please provide a channelName to create a channel");const{payload:{data:n}}=await this.wire.sendAction("create-channel",{channelName:e}),i=Gt(this,Lt,"f").createProvider(t,n);return this.on("client-disconnected",(t=>{t.channelName===e&&Vt.ChannelProvider.handleClientDisconnection(i,t)})),i}}le.Channel=Kt,Lt=new WeakMap,Tt=new WeakMap,$t=new WeakMap,Object.defineProperty(de,"__esModule",{value:!0}),de.InterAppPayload=de.InterApplicationBus=void 0;const qt=t,Jt=d,Yt=he,Zt=le,Qt=O;class Xt extends Jt.Base{constructor(e){super(e),this.events={subscriberAdded:"subscriber-added",subscriberRemoved:"subscriber-removed"},this.refCounter=new Yt.RefCounter,this.Channel=new Zt.Channel(e),this.emitter=new qt.EventEmitter,e.registerMessageHandler(this.onmessage.bind(this)),this.on=this.emitter.on.bind(this.emitter),this.removeAllListeners=this.emitter.removeAllListeners.bind(this.emitter)}async publish(e,t){await this.wire.sendAction("publish-message",{topic:e,message:t,sourceWindowName:this.me.name})}async send(e,t,n){const i=(0,Qt.validateIdentity)(e);if(i)throw new Error(i);await this.wire.sendAction("send-message",{destinationUuid:e.uuid,destinationWindowName:e.name,topic:t,message:n,sourceWindowName:this.me.name})}subscribe(e,t,n){const i=this.createSubscriptionKey(e.uuid,e.name||"*",t);return this.emitter.on(i,n),this.refCounter.actOnFirst(i,(async()=>{await this.wire.sendAction("subscribe",{sourceUuid:e.uuid,sourceWindowName:e.name||"*",topic:t,destinationWindowName:this.me.name})}),(()=>Promise.resolve()))}unsubscribe(e,t,n){const i=e.name||"*",r=this.createSubscriptionKey(e.uuid,i,t);return this.emitter.removeListener(r,n),this.refCounter.actOnLast(r,(async()=>{await this.wire.sendAction("unsubscribe",{sourceUuid:e.uuid,sourceWindowName:i,topic:t,destinationWindowName:this.me.name})}),(()=>new Promise((e=>e)).then((()=>{}))))}processMessage(e){const{payload:{message:t,sourceWindowName:n,sourceUuid:i,topic:r}}=e,o=[this.createSubscriptionKey(i,n,r),this.createSubscriptionKey(i,"*",r),this.createSubscriptionKey("*","*",r)],s={uuid:i,name:n};o.forEach((e=>{this.emitter.emit(e,t,s)}))}emitSubscriverEvent(e,t){const{payload:{targetName:n,uuid:i,topic:r}}=t,o={name:n,uuid:i,topic:r};this.emitter.emit(e,o)}createSubscriptionKey(e,t,n){const i=t||"*";if(!(e&&i&&n))throw new Error("Missing uuid, name, or topic string");return function(...e){return e.map((e=>Buffer.from(`${e}`).toString("base64"))).join("/")}(e,i,n)}onmessage(e){const{action:t}=e;switch(t){case"process-message":this.processMessage(e);break;case this.events.subscriberAdded:this.emitSubscriverEvent(this.events.subscriberAdded,e);break;case this.events.subscriberRemoved:this.emitSubscriverEvent(this.events.subscriberRemoved,e)}return!0}}de.InterApplicationBus=Xt;de.InterAppPayload=class{};var en={};Object.defineProperty(en,"__esModule",{value:!0}),en.Clipboard=void 0;const tn=d;class nn extends tn.Base{async writeText(e){await this.wire.sendAction("clipboard-write-text",e)}async readText(e){const{payload:t}=await this.wire.sendAction("clipboard-read-text",{type:e});return t.data}async writeImage(e){await this.wire.sendAction("clipboard-write-image",e)}async readImage(e={format:"dataURL"}){const{payload:t}=await this.wire.sendAction("clipboard-read-image",e);return t.data}async writeHtml(e){await this.wire.sendAction("clipboard-write-html",e)}async readHtml(e){const{payload:t}=await this.wire.sendAction("clipboard-read-html",{type:e});return t.data}async writeRtf(e){await this.wire.sendAction("clipboard-write-rtf",e)}async readRtf(e){const{payload:t}=await this.wire.sendAction("clipboard-read-rtf",{type:e});return t.data}async write(e){await this.wire.sendAction("clipboard-write",e)}async getAvailableFormats(e){const{payload:t}=await this.wire.sendAction("clipboard-read-formats",{type:e});return t.data}}en.Clipboard=nn;var rn={},on={},sn={};Object.defineProperty(sn,"__esModule",{value:!0}),sn.ExternalApplication=void 0;const an=d;class cn extends an.EmitterBase{constructor(e,t){super(e,"external-application",t.uuid),this.identity=t}getInfo(){return this.wire.sendAction("get-external-application-info",this.identity).then((({payload:e})=>e.data))}}sn.ExternalApplication=cn,Object.defineProperty(on,"__esModule",{value:!0}),on.ExternalApplicationModule=void 0;const dn=d,hn=sn;class ln extends dn.Base{wrap(e){return this.wire.sendAction("external-application-wrap").catch((e=>{})),Promise.resolve(new hn.ExternalApplication(this.wire,{uuid:e}))}wrapSync(e){return this.wire.sendAction("external-application-wrap-sync").catch((e=>{})),new hn.ExternalApplication(this.wire,{uuid:e})}}on.ExternalApplicationModule=ln,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(on,e),n(sn,e)}(rn);var un={},pn={},wn={};Object.defineProperty(wn,"__esModule",{value:!0}),wn._Frame=void 0;const yn=d;class fn extends yn.EmitterBase{constructor(e,t){super(e,"frame",t.uuid,t.name),this.identity=t}getInfo(){return this.wire.sendAction("get-frame-info",this.identity).then((({payload:e})=>e.data))}getParentWindow(){return this.wire.sendAction("get-parent-window",this.identity).then((({payload:e})=>e.data))}}wn._Frame=fn,Object.defineProperty(pn,"__esModule",{value:!0}),pn._FrameModule=void 0;const gn=d,mn=O,vn=wn;class Cn extends gn.Base{async wrap(e){this.wire.sendAction("frame-wrap").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}wrapSync(e){this.wire.sendAction("frame-wrap-sync").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}getCurrent(){return this.wire.sendAction("frame-get-current").catch((e=>{})),Promise.resolve(new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity()))}getCurrentSync(){return this.wire.sendAction("frame-get-current-sync").catch((e=>{})),new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity())}}pn._FrameModule=Cn,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(pn,e),n(wn,e)}(un);var bn={};Object.defineProperty(bn,"__esModule",{value:!0}),bn.GlobalHotkey=void 0;const In=d;class En extends In.EmitterBase{constructor(e){super(e,"global-hotkey")}async register(e,t){await this.on(e,t),await this.wire.sendAction("global-hotkey-register",{hotkey:e})}async unregister(e){await this.removeAllListeners(e),await this.wire.sendAction("global-hotkey-unregister",{hotkey:e})}async unregisterAll(){await Promise.all(this.eventNames().filter((e=>!("registered"===e||"unregistered"===e))).map((e=>this.removeAllListeners(e)))),await this.wire.sendAction("global-hotkey-unregister-all",{})}async isRegistered(e){const{payload:{data:t}}=await this.wire.sendAction("global-hotkey-is-registered",{hotkey:e});return t}}bn.GlobalHotkey=En;var xn,An={},Pn={},Mn={},_n=s&&s.__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)};Object.defineProperty(Mn,"__esModule",{value:!0}),Mn.Platform=void 0;const On=d,Sn=O,Rn=new Map;class Fn extends On.EmitterBase{constructor(e,t){super(t.wire,"application",e.uuid),this.getClient=e=>{this.wire.sendAction("platform-get-client",this.identity).catch((e=>{}));const t=e||this.identity,{uuid:n}=t;if(!Rn.has(n)){const e=_n(this,xn,"f").call(this,n);Rn.set(n,e)}return Rn.get(n)},xn.set(this,(async e=>{try{const t=`custom-frame-${e}`,n=await this._channel.connect(t,{wait:!1});return n.onDisconnection((()=>{Rn.delete(e)})),n}catch(t){throw Rn.delete(e),new Error("The targeted Platform is not currently running. Listen for application-started event for the given Uuid.")}})),this.launchLegacyManifest=this.launchContentManifest;const n=(0,Sn.validateIdentity)(e);if(n)throw new Error(n);this._channel=t,this.identity={uuid:e.uuid},this.Layout=this.fin.Platform.Layout,this.Application=this.fin.Application.wrapSync(this.identity)}async createView(e,t,n){this.wire.sendAction("platform-create-view",this.identity).catch((e=>{}));const i=await this.getClient(),r=await i.dispatch("create-view",{target:t,opts:e,targetView:n});if(!r||(0,Sn.validateIdentity)(r.identity))throw new Error(`When overwriting the createView call, please return an object that has a valid 'identity' property: ${JSON.stringify(r)}`);return this.fin.View.wrapSync(r.identity)}async createWindow(e){this.wire.sendAction("platform-create-window",this.identity).catch((e=>{}));const t=await this.getClient();e.reason||(e.reason="api-call");const n=await t.dispatch("create-view-container",e);if(!n||(0,Sn.validateIdentity)(n.identity))throw new Error(`When overwriting the createWindow call, please return an object that has a valid 'identity' property: ${JSON.stringify(n)}`);const{identity:i}=n,r=this.fin.Window.wrapSync(i);return r.name=i.name,r.uuid=i.uuid,r}async quit(){this.wire.sendAction("platform-quit",this.identity).catch((e=>{}));return(await this.getClient()).dispatch("quit")}async closeView(e){this.wire.sendAction("platform-close-view",this.identity).catch((e=>{}));const t=await this.getClient();await t.dispatch("close-view",{view:e})}async reparentView(e,t){console.warn("Platform.reparentView has been deprecated, please use Platform.createView"),this.wire.sendAction("platform-reparent-view",this.identity).catch((e=>{}));const n={...e,uuid:e.uuid??this.identity.uuid},i=await this.fin.View.wrap(n),r=await i.getOptions();return this.createView(r,t)}async getSnapshot(){this.wire.sendAction("platform-get-snapshot",this.identity).catch((e=>{}));return(await this.getClient()).dispatch("get-snapshot")}async getViewSnapshot(e){return(await this.getClient()).dispatch("get-view-snapshot",{viewIdentity:e})}async applySnapshot(e,t){this.wire.sendAction("platform-apply-snapshot",this.identity).catch((e=>{}));const n="Requested snapshot must be a valid Snapshot object, or a url or filepath to such an object.";let i;if("string"==typeof e)try{i=(await this._channel.wire.sendAction("get-application-manifest",{manifestUrl:e})).payload.data}catch(e){throw new Error(`${n}: ${e}`)}else i=e;if(!i.windows)throw new Error(n);const r=await this.getClient();return await r.dispatch("apply-snapshot",{snapshot:i,options:t}),this}async fetchManifest(e){return(await this.getClient()).dispatch("platform-fetch-manifest",{manifestUrl:e})}async launchContentManifest(e){this.wire.sendAction("platform-launch-content-manifest",this.identity).catch((()=>{}));const t=await this.getClient(),n=await this.fetchManifest(e);return t.dispatch("launch-into-platform",{manifest:n,manifestUrl:e}),this}async setWindowContext(e={},t){if(this.wire.sendAction("platform-set-window-context",this.identity).catch((e=>{})),!e)throw new Error("Please provide a serializable object or string to set the context.");const n=await this.getClient(),{entityType:i}=t?await this.fin.System.getEntityInfo(t.uuid,t.name):this.fin.me;await n.dispatch("set-window-context",{context:e,entityType:i,target:t||{uuid:this.fin.me.uuid,name:this.fin.me.name}})}async getWindowContext(e){this.wire.sendAction("platform-get-window-context",this.identity).catch((e=>{}));const t=await this.getClient(),{entityType:n}=e?await this.fin.System.getEntityInfo(e.uuid,e.name):this.fin.me;return t.dispatch("get-window-context",{target:e||{uuid:this.fin.me.uuid,name:this.fin.me.name},entityType:n})}async closeWindow(e,t={skipBeforeUnload:!1}){this.wire.sendAction("platform-close-window",this.identity).catch((e=>{}));return(await this.getClient()).dispatch("close-window",{windowId:e,options:t})}}Mn.Platform=Fn,xn=new WeakMap;var jn={},kn={},Ln={},Tn={};function $n(e){switch(e){case"columns":case"grid":case"rows":case"tabs":return!0;default:return!1}}Object.defineProperty(Tn,"__esModule",{value:!0}),Tn.overrideFromComposables=Tn.isValidPresetType=void 0,Tn.isValidPresetType=$n,Tn.overrideFromComposables=function(...e){return t=>e.reduceRight(((e,t)=>n=>t(e(n))),(e=>e))(t)},Tn.default={isValidPresetType:$n};var Bn={},Gn={},Wn={};Object.defineProperty(Wn,"__esModule",{value:!0}),Wn.ApiConsumer=void 0;Wn.ApiConsumer=class{constructor(e){this.strategy=e,this.consume=async e=>(await this.strategy.getExposedFunctions(e)).reduce(((t,n)=>({...t,[n.key]:this.strategy.createFunction(n,e)})),{})}};var Hn={},Nn={};Object.defineProperty(Nn,"__esModule",{value:!0}),Nn.expose=Nn.getExposedProperties=void 0;const Dn=Symbol("exposedProperties");Nn.getExposedProperties=e=>e[Dn]||e.prototype[Dn]||[];Nn.expose=e=>(t,n,i)=>{t[Dn]=t[Dn]||[],t[Dn].push({key:n,descriptor:i,options:e})},Object.defineProperty(Hn,"__esModule",{value:!0}),Hn.ApiExposer=void 0;const Un=Nn;Hn.ApiExposer=class{constructor(e){this.strategy=e,this.exposeInstance=async(e,t)=>{const n=(0,Un.getExposedProperties)(e),i=await Promise.all(n.map((async({key:n,options:i})=>({key:n,options:await this.strategy.exposeFunction(e[n].bind(e),{key:n,options:i,meta:t})}))));await this.strategy.exposeMeta(t,i)}}};var Vn={},zn={},Kn={};Object.defineProperty(Kn,"__esModule",{value:!0}),Kn.ChannelsConsumer=void 0;Kn.ChannelsConsumer=class{constructor(e){this.channel=e,this.getExposedFunctions=async e=>{const{id:t}=e,{props:n}=await this.channel.dispatch(`api-meta:${t}`);return n},this.createFunction=e=>(...t)=>{const{action:n}=e.options;return this.channel.dispatch(n,{args:t})}}};var qn={};Object.defineProperty(qn,"__esModule",{value:!0}),qn.ChannelsExposer=void 0;qn.ChannelsExposer=class{constructor(e){this.channelProviderOrClient=e,this.exposeFunction=async(e,t)=>{const{key:n,options:i,meta:r}=t,{id:o}=r,s=`${o}.${i?.action||n}`;return await this.channelProviderOrClient.register(s,(async({args:t})=>e(...t))),{action:s}},this.exposeMeta=async({id:e},t)=>{const n=`api-meta:${e}`;await this.channelProviderOrClient.register(n,(()=>({props:t})))}}},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Kn,e),n(qn,e)}(zn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(zn,e)}(Vn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Wn,e),n(Hn,e),n(Vn,e),n(Nn,e)}(Gn);var Jn={};Object.defineProperty(Jn,"__esModule",{value:!0}),Jn.createRelayedDispatch=exports.relayChannelClientApi_1=Jn.relayChannelClientApi=void 0;const Yn=["no longer connected","RTCDataChannel closed unexpectedly","The client you are trying to dispatch from is disconnected from the target provider"];exports.relayChannelClientApi_1=Jn.relayChannelClientApi=async(e,t)=>{e.register(`relay:${t}`,(({action:t,target:n,payload:i})=>e.dispatch(n,t,i))),await Promise.resolve()};Jn.createRelayedDispatch=(e,t,n,i)=>async(r,o)=>{try{return await e.dispatch(`relay:${n}`,{action:r,payload:o,target:t})}catch(e){if(s=e.message,Yn.some((e=>s.includes(e)))&&i)throw new Error(i);throw e}var s};var Zn,Qn,Xn,ei=s&&s.__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},ti=s&&s.__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)};Object.defineProperty(Bn,"__esModule",{value:!0}),Bn.ColumnOrRow=Bn.TabStack=Bn.LayoutNode=void 0;const ni=Gn,ii=Jn;class ri{constructor(e,t){Zn.set(this,void 0),this.isRoot=()=>ti(this,Zn,"f").isRoot(this.entityId),this.exists=()=>ti(this,Zn,"f").exists(this.entityId),this.getParent=async()=>{const e=await ti(this,Zn,"f").getParent(this.entityId);if(e)return ri.getEntity(e,ti(this,Zn,"f"))},this.createAdjacentStack=async(e,t)=>{const n=await ti(this,Zn,"f").createAdjacentStack(this.entityId,e,t);return ri.getEntity({entityId:n,type:"stack"},ti(this,Zn,"f"))},this.getAdjacentStacks=async e=>(await ti(this,Zn,"f").getAdjacentStacks({targetId:this.entityId,edge:e})).map((e=>ri.getEntity({type:"stack",entityId:e.entityId},ti(this,Zn,"f")))),ei(this,Zn,e,"f"),this.entityId=t}}Bn.LayoutNode=ri,Zn=new WeakMap,ri.newLayoutEntitiesClient=async(e,t,n)=>{const i=(0,ii.createRelayedDispatch)(e,n,"layout-relay","You are trying to interact with a layout component on a window that does not exist or has been destroyed.");return new ni.ApiConsumer(new ni.ChannelsConsumer({dispatch:i})).consume({id:t})},ri.getEntity=(e,t)=>{const{entityId:n,type:i}=e;switch(i){case"column":case"row":return new si(t,n,i);case"stack":return new oi(t,n);default:throw new Error(`Unrecognised Layout Entity encountered ('${JSON.stringify(e)})`)}};class oi extends ri{constructor(e,t){super(e,t),Qn.set(this,void 0),this.type="stack",this.getViews=()=>ti(this,Qn,"f").getStackViews(this.entityId),this.addView=async(e,t={index:0})=>ti(this,Qn,"f").addViewToStack(this.entityId,e,t),this.removeView=async e=>{await ti(this,Qn,"f").removeViewFromStack(this.entityId,e)},this.setActiveView=async e=>{await ti(this,Qn,"f").setStackActiveView(this.entityId,e)},ei(this,Qn,e,"f")}}Bn.TabStack=oi,Qn=new WeakMap;class si extends ri{constructor(e,t,n){super(e,t),Xn.set(this,void 0),this.getContent=async()=>(await ti(this,Xn,"f").getContent(this.entityId)).map((e=>ri.getEntity(e,ti(this,Xn,"f")))),ei(this,Xn,e,"f"),this.type=n}}Bn.ColumnOrRow=si,Xn=new WeakMap;var ai={};Object.defineProperty(ai,"__esModule",{value:!0}),ai.DEFAULT_LAYOUT_KEY=ai.LAYOUT_CONTROLLER_ID=void 0,ai.LAYOUT_CONTROLLER_ID="layout-entities",ai.DEFAULT_LAYOUT_KEY="__default__";var ci,di,hi,li=s&&s.__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)};Object.defineProperty(Ln,"__esModule",{value:!0}),Ln.Layout=void 0;const ui=G,pi=O,wi=d,yi=Tn,fi=Bn,gi=ai;class mi extends wi.Base{static getClient(e){return li(e,di,"f").getValue()}constructor(e,t){super(t),ci.add(this),di.set(this,new ui.Lazy((async()=>fi.LayoutNode.newLayoutEntitiesClient(await this.platform.getClient(),gi.LAYOUT_CONTROLLER_ID,this.identity)))),this.replace=async e=>{this.wire.sendAction("layout-replace").catch((e=>{}));const t=await this.platform.getClient();await t.dispatch("replace-layout",{target:this.identity,opts:{layout:e}})},this.replaceView=async(e,t)=>{this.wire.sendAction("layout-replace-view").catch((e=>{}));const n=await this.platform.getClient();await n.dispatch("replace-view",{target:this.identity,opts:{viewToReplace:e,newView:t}})},this.applyPreset=async e=>{this.wire.sendAction("layout-apply-preset").catch((e=>{}));const t=await this.platform.getClient(),{presetType:n}=e;if(!n||!(0,yi.isValidPresetType)(n))throw new Error("Cannot apply preset layout, please include an applicable presetType property in the PresetLayoutOptions.");await t.dispatch("apply-preset-layout",{target:this.identity,opts:{presetType:n}})};const n=(0,pi.validateIdentity)(e);if(n)throw new Error(n);this.identity=e,this.platform=this.fin.Platform.wrapSync({uuid:e.uuid}),e.uuid===this.fin.me.uuid&&e.name===this.fin.me.name&&(this.init=this.fin.Platform.Layout.init)}async getConfig(){this.wire.sendAction("layout-get-config").catch((e=>{}));return(await this.platform.getClient()).dispatch("get-frame-snapshot",{target:this.identity})}async getCurrentViews(){this.wire.sendAction("layout-get-views").catch((e=>{}));const e=await this.platform.getClient();return(await e.dispatch("get-layout-views",{target:this.identity})).map((e=>this.fin.View.wrapSync(e)))}async getRootItem(){this.wire.sendAction("layout-get-root-item").catch((()=>{}));const e=await li(this,di,"f").getValue(),t=await e.getRoot("layoutName"in this.identity?this.identity:void 0);return fi.LayoutNode.getEntity(t,e)}async getStackByViewIdentity(e){this.wire.sendAction("layout-get-stack-by-view").catch((()=>{}));const t=await li(this,di,"f").getValue(),n=await t.getStackByView(e);if(!n)throw new Error(`No stack found for view: ${e.uuid}/${e.name}`);return fi.LayoutNode.getEntity(n,t)}async addView(e,{location:t,targetView:n}={}){this.wire.sendAction("layout-add-view").catch((e=>{}));const{identity:i}=await li(this,ci,"m",hi).call(this,"layout-add-view",{viewOptions:e,location:t,targetView:n});return{identity:i}}async closeView(e){this.wire.sendAction("layout-close-view").catch((e=>{})),await li(this,ci,"m",hi).call(this,"layout-close-view",{viewIdentity:e})}}Ln.Layout=mi,di=new WeakMap,ci=new WeakSet,hi=async function(e,t){return(await this.platform.getClient()).dispatch(e,{target:this.identity,opts:t})};var vi,Ci,bi,Ii,Ei,xi=s&&s.__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)},Ai=s&&s.__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};Object.defineProperty(kn,"__esModule",{value:!0}),kn.LayoutModule=void 0;const Pi=d,Mi=Ln,_i=ai;class Oi extends Pi.Base{constructor(){super(...arguments),vi.add(this),Ci.set(this,!1),bi.set(this,null),this.init=async(e={})=>{if(this.wire.sendAction("layout-init").catch((e=>{})),!this.wire.environment.layoutAllowedInContext(this.fin))throw new Error("Layout.init can only be called from a Window context.");if(xi(this,Ci,"f"))throw new Error("Layout.init was already called, please use Layout.create to add additional layouts.");"openfin"===this.wire.environment.type&&await this.fin.Platform.getCurrentSync().getClient(),Ai(this,Ci,!0,"f"),Ai(this,bi,await this.wire.environment.initLayoutManager(this.fin,this.wire,e),"f"),await this.wire.environment.applyLayoutSnapshot(this.fin,xi(this,bi,"f"),e);const t={name:this.fin.me.name,uuid:this.fin.me.uuid};if(!e.layoutManagerOverride){const e={layoutName:_i.DEFAULT_LAYOUT_KEY,...t};return xi(this,Ii,"f").call(this,e)}return this.wrapSync(t)},Ii.set(this,(e=>{const t="[Layout] You are using a deprecated property `layoutManager` - it will throw if you access it starting in v37.",n=new Proxy({},{get(e,n){throw console.warn(`[Layout-mgr-proxy] accessing ${n.toString()}`),new Error(t)}}),i=Object.assign(this.wrapSync(e),{layoutManager:n});return new Proxy(i,{get(e,n){if("layoutManager"===n)throw console.warn(`[Layout-proxy] accessing ${n.toString()}`),new Error(t);return e[n]}})})),this.getCurrentLayoutManagerSync=()=>xi(this,vi,"m",Ei).call(this,"fin.Platform.Layout.getCurrentLayoutManagerSync()"),this.create=async e=>this.wire.environment.createLayout(xi(this,vi,"m",Ei).call(this,"fin.Platform.Layout.create()"),e),this.destroy=async e=>this.wire.environment.destroyLayout(xi(this,vi,"m",Ei).call(this,"fin.Platform.Layout.destroy()"),e)}async wrap(e){return this.wire.sendAction("layout-wrap").catch((e=>{})),new Mi.Layout(e,this.wire)}wrapSync(e){return this.wire.sendAction("layout-wrap-sync").catch((e=>{})),new Mi.Layout(e,this.wire)}async getCurrent(){if(this.wire.sendAction("layout-get-current").catch((e=>{})),"openfin"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error("You are not in a Window context. Only Windows can have a Layout.");const{uuid:e,name:t}=this.fin.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction("layout-get-current-sync").catch((e=>{})),"openfin"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error("You are not in a Window context. Only Windows can have a Layout.");const{uuid:e,name:t}=this.fin.me;return this.wrapSync({uuid:e,name:t})}async getLayoutByViewIdentity(e){this.wire.sendAction("layout-get-by-view-identity").catch((()=>{}));let t=await this.wire.environment.getViewWindowIdentity(this.fin,e);t.identity&&(t=t.identity);try{const n=this.wrapSync(t),i=await Mi.Layout.getClient(n),r=await i.getLayoutIdentityForViewOrThrow(e);return this.wrapSync(r)}catch(n){if(!["No action registered at target for","getLayoutIdentityForViewOrThrow is not a function"].some((e=>n.message.includes(e))))throw n;if(t.uuid===t.name)throw new Error(`View identity ${JSON.stringify(e)} is not attached to any layout in provider window ${JSON.stringify(t)}.`);return this.wrapSync(t)}}}kn.LayoutModule=Oi,Ci=new WeakMap,bi=new WeakMap,Ii=new WeakMap,vi=new WeakSet,Ei=function(e){if(!xi(this,bi,"f"))throw new Error(`You must call init before using the API ${e}`);return xi(this,bi,"f")},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(kn,e),n(Ln,e)}(jn),Object.defineProperty(Pn,"__esModule",{value:!0}),Pn.PlatformModule=void 0;const Si=d,Ri=Mn,Fi=jn;class ji extends Si.Base{constructor(e,t){super(e),this._channel=t,this.Layout=new Fi.LayoutModule(this.wire)}async init(e){if(!fin.__internal_.isPlatform||fin.me.name!==fin.me.uuid)throw new Error("fin.Platform.init should only be called from a custom platform provider running in the main window of the application.");return this.wire.environment.initPlatform(this.fin,e)}async wrap(e){return this.wire.sendAction("platform-wrap").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}wrapSync(e){return this.wire.sendAction("platform-wrap-sync").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}async getCurrent(){return this.wire.sendAction("platform-get-current").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction("platform-get-current-sync").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}start(e){return this.wire.sendAction("platform-start").catch((e=>{})),new Promise((async(t,n)=>{try{const{uuid:n}=e,i=await this.fin.Application._create({...e,isPlatformController:!0});i.once("platform-api-ready",(()=>t(this.wrapSync({uuid:n})))),i._run({uuid:n})}catch(e){n(e)}}))}startFromManifest(e,t){return this.wire.sendAction("platform-start-from-manifest").catch((e=>{})),new Promise((async(n,i)=>{try{const i=await this.fin.Application._createFromManifest(e);i.once("platform-api-ready",(()=>n(this.wrapSync({uuid:i.identity.uuid})))),i._run(t)}catch(e){i(e)}}))}}Pn.PlatformModule=ji,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Pn,e),n(Mn,e)}(An);var ki={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getMe=e.getBaseMe=e.environmentUnsupportedMessage=void 0;const t=J(),n=un,i=ie(),r=rn;function o(e,t,n){return{...{isView:"view"===e,isWindow:"window"===e,isFrame:"iframe"===e,isExternal:"external connection"===e},uuid:t,name:n,entityType:e}}e.environmentUnsupportedMessage="You are not running in OpenFin.",e.getBaseMe=o,e.getMe=function(s){const{uuid:a,name:c,entityType:d}=s.me,h={setContext(){throw new Error(e.environmentUnsupportedMessage)},addContextHandler(){throw new Error(e.environmentUnsupportedMessage)},getContextGroups(){throw new Error(e.environmentUnsupportedMessage)},joinContextGroup(){throw new Error(e.environmentUnsupportedMessage)},removeFromContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getAllClientsInContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getInfoForContextGroup(){throw new Error(e.environmentUnsupportedMessage)}},l="Interop API has not been instantiated. Either connection has failed or you have not declared interop in your config.",u={setContext(){throw new Error(l)},addContextHandler(){throw new Error(l)},getContextGroups(){throw new Error(l)},joinContextGroup(){throw new Error(l)},removeFromContextGroup(){throw new Error(l)},getAllClientsInContextGroup(){throw new Error(l)},getInfoForContextGroup(){throw new Error(l)}},p={eventNames:()=>{throw new Error(e.environmentUnsupportedMessage)},emit:()=>{throw new Error(e.environmentUnsupportedMessage)},listeners:()=>{throw new Error(e.environmentUnsupportedMessage)},listenerCount:()=>{throw new Error(e.environmentUnsupportedMessage)},on:()=>{throw new Error(e.environmentUnsupportedMessage)},addListener:()=>{throw new Error(e.environmentUnsupportedMessage)},once:()=>{throw new Error(e.environmentUnsupportedMessage)},prependListener:()=>{throw new Error(e.environmentUnsupportedMessage)},prependOnceListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeAllListeners:()=>{throw new Error(e.environmentUnsupportedMessage)}};switch(d){case"view":return Object.assign(new t.View(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case"window":return Object.assign(new i._Window(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case"iframe":return Object.assign(new n._Frame(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case"external connection":return Object.assign(new r.ExternalApplication(s,{uuid:a}),o(d,a,c),{interop:u,isOpenFin:!1});default:return{...o(d,a,c),...p,interop:h,isOpenFin:!1}}}}(ki);var Li={},Ti={},$i={};Object.defineProperty($i,"__esModule",{value:!0}),$i.createWarningObject=$i.createUnusableObject=void 0,$i.createUnusableObject=function(e){const t=()=>{throw new Error(e)};return new Proxy({},{apply:t,construct:t,defineProperty:t,deleteProperty:t,get:t,getOwnPropertyDescriptor:t,getPrototypeOf:t,has:t,isExtensible:t,ownKeys:t,preventExtensions:t,set:t,setPrototypeOf:t})},$i.createWarningObject=function(e,t){return new Proxy(t,{get:(...t)=>(console.warn(e),Reflect.get(...t)),set:(...t)=>(console.warn(e),Reflect.set(...t)),getOwnPropertyDescriptor:(...t)=>(console.warn(e),Reflect.getOwnPropertyDescriptor(...t)),ownKeys:(...t)=>(console.warn(e),Reflect.ownKeys(...t))})};var Bi,Gi={},Wi={};var Hi={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.wrapIntentHandler=e.BROKER_ERRORS=e.generateOverrideWarning=e.generateOverrideError=e.wrapContextHandler=e.wrapInTryCatch=e.generateId=void 0;e.generateId=()=>`${Math.random()}${Date.now()}`;e.wrapInTryCatch=(e,t)=>(...n)=>{try{return e(...n)}catch(e){throw new Error((t||"")+e)}};e.wrapContextHandler=(e,t)=>async n=>{try{await e(n)}catch(e){throw console.error(`Error thrown by handler ${t} for context type ${n.type}: ${e}`),e}};e.generateOverrideError=(e,t)=>`You have tried to to use ${e} but ${t} has not been overridden in the Interop Broker. Please override this function. Refer to our documentation for more info.`;e.generateOverrideWarning=(e,t,n,i)=>{const{uuid:r,name:o}=n;return i?`Entity with identity: ${r}/${o} has called ${i} or ${e} but ${t} has not been overridden.`:`Entity with identity: ${r}/${o} has called ${e} but ${t} has not been overridden.`},e.BROKER_ERRORS={fireIntent:(0,e.generateOverrideError)("fireIntent","handleFiredIntent"),fireIntentForContext:(0,e.generateOverrideError)("fireIntentForContext","handleFiredIntentForContext"),getInfoForIntent:(0,e.generateOverrideError)("getInfoForIntent","handleInfoForIntent"),getInfoForIntentsByContext:(0,e.generateOverrideError)("getInfoForIntentsByContext","handleInfoForIntentsByContext"),joinSessionContextGroupWithJoinContextGroup:"The Context Group you have tried to join is a Session Context Group. Custom Context Groups can only be defined by the Interop Broker through code or manifest configuration. Please use joinSessionContextGroup.",fdc3Open:(0,e.generateOverrideError)("fdc3.open","fdc3HandleOpen"),fdc3FindInstances:(0,e.generateOverrideError)("fdc3.findInstances","fdc3HandleFindInstances"),fdc3GetAppMetadata:(0,e.generateOverrideError)("fdc3.getAppMetadata","fdc3HandleGetAppMetadata"),fdc3GetInfo:(0,e.generateOverrideError)("fdc3.getInfo","fdc3HandleGetInfo")};e.wrapIntentHandler=(e,t)=>async n=>{try{return e(n)}catch(e){throw console.error(`Error thrown by handler ${t}: ${e}`),e}}}(Hi);var Ni,Di,Ui={};function Vi(){if(Di)return Gi;Di=1;var e,t,n,r=s&&s.__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},o=s&&s.__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)},a=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Gi,"__esModule",{value:!0}),Gi.InteropBroker=void 0;const c=d,h=a(function(){if(Bi)return Wi;Bi=1,Object.defineProperty(Wi,"__esModule",{value:!0});const e=Cr();return Wi.default=class{constructor(e,t){this.provider=e,this.id=t,this.lastContext=void 0,this.contextGroupMap=new Map,this.clients=new Map,this.registerListeners()}registerListeners(){this.provider.register(`sessionContextGroup:getContext-${this.id}`,this.getCurrentContext.bind(this)),this.provider.register(`sessionContextGroup:setContext-${this.id}`,this.setContext.bind(this)),this.provider.register(`sessionContextGroup:handlerAdded-${this.id}`,this.handlerAdded.bind(this)),this.provider.register(`sessionContextGroup:handlerRemoved-${this.id}`,this.handlerRemoved.bind(this))}getCurrentContext(e){return e.type?this.contextGroupMap.get(e.type):this.lastContext}setContext(t,n){const{context:i}=t,r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name} not in Session Client State Map`);this.contextGroupMap.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{e.contextHandlers.get(i.type)?.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getClientState(e){return this.clients.get(e.endpointId)}async handlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(i){const e=r.contextHandlers.get(i)||[];r.contextHandlers.set(i,[...e,n]);const o=this.contextGroupMap.get(i);o&&await this.provider.dispatch(t,n,o)}else{r.globalHandler=n;const e=[...this.contextGroupMap.keys()].map((async e=>{const i=this.contextGroupMap.get(e);i&&await this.provider.dispatch(t,n,i)}));await Promise.all(e)}}handlerRemoved(e,t){const{handlerId:n}=e,i=this.clients.get(t.endpointId);i?(Array.from(i.contextHandlers).forEach((([,e])=>{const t=e.indexOf(n);t>-1&&e.splice(t,1)})),i.globalHandler===n&&(i.globalHandler=void 0)):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={contextHandlers:new Map,clientIdentity:e,globalHandler:void 0};this.clients.set(e.endpointId,t)}}onDisconnection(e){this.clients.delete(e.endpointId)}},Wi}()),l=Hi,u=a(i),p=function(){if(Ni)return Ui;Ni=1,Object.defineProperty(Ui,"__esModule",{value:!0}),Ui.PrivateChannelProvider=void 0;const e=Vi();return Ui.PrivateChannelProvider=class t{constructor(e,t){this.provider=e,this.id=t,this.clients=new Map,this.registerListeners(),this.contextByContextType=new Map,this.lastContext=void 0,this.provider.onConnection((e=>this.registerNewClient(e))),this.provider.onDisconnection((async e=>{const{endpointId:t}=e;this.clients.has(t)&&await this.handleClientDisconnecting(e),0===(await this.provider.getAllClientInfo()).length&&this.provider.destroy()}))}getClientState(e){return this.clients.get(e.endpointId)}registerListeners(){this.provider.register("broadcast",this.broadcast.bind(this)),this.provider.register("getCurrentContext",this.getCurrentContext.bind(this)),this.provider.register("contextHandlerAdded",this.contextHandlerAdded.bind(this)),this.provider.register("contextHandlerRemoved",this.contextHandlerRemoved.bind(this)),this.provider.register("nonStandardHandlerRemoved",this.nonStandardHandlerRemoved.bind(this)),this.provider.register("onAddContextHandlerAdded",this.onAddContextHandlerAdded.bind(this)),this.provider.register("onDisconnectHandlerAdded",this.onDisconnectHandlerAdded.bind(this)),this.provider.register("onUnsubscribeHandlerAdded",this.onUnsubscribeHandlerAdded.bind(this)),this.provider.register("clientDisconnecting",((e,t)=>{this.handleClientDisconnecting(t)}))}broadcast(t,n){const{context:i}=t;if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name}, tried to call broadcast, is not connected to this Private Channel`);const r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to broadcast - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);this.contextByContextType.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{const t=e.handlerIdsByContextTypes.get(i.type);t&&t.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getCurrentContext(e,t){const{contextType:n}=e;if(!this.getClientState(t))throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call getCurrentContext, is not connected to this Private Channel`);if(void 0!==n){return this.contextByContextType.get(n)||null}return this.lastContext?this.lastContext:null}contextHandlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call addContextListener, is not connected to this Private Channel`);if(i){const e=r.handlerIdsByContextTypes.get(i)||[];r.handlerIdsByContextTypes.set(i,[...e,n])}else r.globalHandler=n;Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&e.onAddContextListenerHandlerId&&this.provider.dispatch(e.clientIdentity,e.onAddContextListenerHandlerId,i)}))}async contextHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);if(i){let e;if(i.globalHandler===n)i.globalHandler=void 0;else for(const[t,r]of i.handlerIdsByContextTypes){const i=r.indexOf(n);i>-1&&(r.splice(i,1),e=t)}const r=(await this.getConnectedClients()).map((async n=>{const{clientIdentity:i,clientIdentity:{endpointId:r},onUnsubscribeHandlerId:o}=n;r!==t.endpointId&&o&&await this.provider.dispatch(i,o,e)}));try{await Promise.all(r)}catch(e){throw console.error(`Problem when attempting to dispatch to onUnsubscribeHandlers. Error: ${e} Removing Client: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}`),new Error(e)}}else console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}.`)}nonStandardHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);i?i.onDisconnectHandlerId===n?i.onDisconnectHandlerId=void 0:i.onAddContextListenerHandlerId===n?i.onAddContextListenerHandlerId=void 0:i.onUnsubscribeHandlerId===n&&(i.onUnsubscribeHandlerId=void 0):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}onAddContextHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onAddContextListener, is not connected to this Private Channel`);n.onAddContextListenerHandlerId=i,Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&Array.from(e.handlerIdsByContextTypes.keys()).forEach((e=>{this.provider.dispatch(t,i,e)}))}))}onDisconnectHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onDisconnect, is not connected to this Private Channel`);n.onDisconnectHandlerId=i}onUnsubscribeHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onUnsubscribe, is not connected to this Private Channel`);n.onUnsubscribeHandlerId=i}removeClient(e){const t=this.getClientState(e);if(!t)throw new Error(`Client with Identity: ${e.uuid} ${e.name}, tried to call disconnect, is not connected to this Private Channel`);t.handlerIdsByContextTypes.clear(),this.clients.delete(e.endpointId)}async fireOnDisconnectForOtherClients(e){const{endpointId:t}=e,n=(await this.getConnectedClients()).map((async e=>{const{clientIdentity:{endpointId:n},onDisconnectHandlerId:i}=e;n!==t&&i&&await this.provider.dispatch(e.clientIdentity,i)}));try{await Promise.all(n)}catch(t){throw console.error(`Problem when attempting to dispatch to onDisconnectHandlers. Error: ${t} Disconnecting Client: uuid: ${e.uuid}. name: ${e.name}. endpointId: ${e.endpointId}`),new Error(t)}}async unsubscribeAll(e){const{endpointId:t}=e,n=this.clients.get(t);if(n){const t=Array.from(n.handlerIdsByContextTypes.values()).flat(),i=n.globalHandler;if(t.length>0){const n=t.map((async t=>this.contextHandlerRemoved({handlerId:t},e)));try{await Promise.all(n)}catch(e){console.error(e.message)}}if(i)try{await this.contextHandlerRemoved({handlerId:i},e)}catch(e){console.error(e.message)}}}async handleClientDisconnecting(e){await this.unsubscribeAll(e),this.removeClient(e),await this.fireOnDisconnectForOtherClients(e)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={clientIdentity:e,handlerIdsByContextTypes:new Map,globalHandler:void 0,onAddContextListenerHandlerId:void 0,onUnsubscribeHandlerId:void 0,onDisconnectHandlerId:void 0};this.clients.set(e.endpointId,t)}}async getConnectedClients(){const e=await this.provider.getAllClientInfo();return Array.from(this.clients.values()).filter((t=>{const{uuid:n,name:i}=t.clientIdentity;return e.some((e=>i===e.name&&n===e.uuid))}))}static init(e,n){return new t(e,n)}},Ui}(),w=G,y=[{id:"green",displayMetadata:{color:"#00CC88",name:"green"}},{id:"purple",displayMetadata:{color:"#8C61FF",name:"purple"}},{id:"orange",displayMetadata:{color:"#FF8C4C",name:"orange"}},{id:"red",displayMetadata:{color:"#FF5E60",name:"red"}},{id:"pink",displayMetadata:{color:"#FF8FB8",name:"pink"}},{id:"yellow",displayMetadata:{color:"#E9FF8F",name:"yellow"}}];let f=class i extends c.Base{constructor(i,s,a){super(i),e.set(this,void 0),t.set(this,void 0),n.set(this,void 0),this.getProvider=()=>o(this,n,"f").getValue(),this.interopClients=new Map,this.contextGroupsById=new Map,r(this,t,a.contextGroups??[...y],"f"),r(this,e,a.fdc3Info,"f"),a?.logging&&(this.logging=a.logging),this.intentClientMap=new Map,this.lastContextMap=new Map,this.sessionContextGroupMap=new Map,r(this,n,new w.Lazy(s),"f"),this.setContextGroupMap(),this.setupChannelProvider()}static createClosedConstructor(...e){return class extends i{constructor(...t){if(t.length){const[n,i,r]=t;if(r&&"object"==typeof r&&!(0,u.default)(r,e[2]))return console.warn("You have modified the parameters of the InteropOverride constructor. This behavior is deprecated and will be removed in a future version. You can modify these options in your manifest. Please consult our Interop docs for guidance on migrating to the new override scheme."),void super(e[0],e[1],r);console.warn("You are attempting to pass arguments to the InteropOverride constructor. This is not necessary, and these passed arguments will be ignored. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.")}super(...e)}}}setContext({context:e},t){this.wire.sendAction("interop-broker-set-context").catch((e=>{}));const n=this.getClientState(t);if(!n||!n.contextGroupId)throw n?new Error("You must join a context group before you can set context."):new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);{const{contextGroupId:t}=n;this.setContextForGroup({context:e},t)}}setContextForGroup({context:e},t){this.wire.sendAction("interop-broker-set-context-for-group").catch((e=>{}));const n=this.contextGroupsById.get(t);if(!n)throw new Error(`Unable to set context for context group that isn't in the context group mapping: ${t}.`);const r=i.checkContextIntegrity(e);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(e)}`);const o=e.type;n.set(o,e),this.lastContextMap.set(t,o);Array.from(this.interopClients.values()).filter((e=>e.contextGroupId===t)).forEach((t=>{for(const[,n]of t.contextHandlers)i.isContextTypeCompatible(o,n.contextType)&&this.invokeContextHandler(t.clientIdentity,n.handlerId,e)}))}getCurrentContext(e,t){this.wire.sendAction("interop-broker-get-current-context").catch((e=>{}));const n=this.getClientState(t);if(!n?.contextGroupId)throw new Error("You must be a member of a context group to call getCurrentContext");const{contextGroupId:i}=n,r=this.contextGroupsById.get(i),o=this.lastContextMap.get(i),s=e?.contextType??o;return r&&s?r.get(s):void 0}async joinContextGroup({contextGroupId:e,target:t},n){if(this.wire.sendAction("interop-broker-join-context-group").catch((e=>{})),this.sessionContextGroupMap.has(e))throw new Error(l.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup);if(t){i.hasEndpointId(t)&&await this.addClientToContextGroup({contextGroupId:e},t);try{const n=this.channel.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name));if(!n.length)throw new Error(`Given Identity ${t.uuid} ${t.name} is not connected to the Interop Broker.`);n.length>1&&console.warn(`More than one connection found for identity ${t.uuid} ${t.name}`);const i=[];for(const t of n)i.push(this.addClientToContextGroup({contextGroupId:e},t));await Promise.all(i)}catch(e){throw new Error(e)}}else await this.addClientToContextGroup({contextGroupId:e},n)}async addClientToContextGroup({contextGroupId:e},t){this.wire.sendAction("interop-broker-add-client-to-context-group").catch((e=>{}));const n=this.getClientState(t);if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(!this.getContextGroups().find((t=>t.id===e)))throw new Error(`Attempting to join a context group that does not exist: ${e}. You may only join existing context groups.`);if(n.contextGroupId!==e){n.contextGroupId=e,await this.setCurrentContextGroupInClientOptions(t,e);const i=this.contextGroupsById.get(e);for(const[,e]of n.contextHandlers){const{contextType:n,handlerId:r}=e;if(void 0===n)i.forEach(((e,n)=>{this.invokeContextHandler(t,r,e)}));else if(i.has(n)){const e=i.get(n);e&&this.invokeContextHandler(t,r,e)}}}}async removeFromContextGroup({target:e},t){if(this.wire.sendAction("interop-broker-remove-from-context-group").catch((e=>{})),e){i.hasEndpointId(e)&&await this.removeClientFromContextGroup(e);try{const t=this.channel.connections.filter((t=>t.uuid===e.uuid&&t.name===e.name));if(!t.length)throw new Error(`No connection found for given Identity ${e.uuid} ${e.name}`);t.length>1&&console.warn(`More than one connection found for identity ${e.uuid} ${e.name}`);const n=[];for(const e of t)n.push(this.removeClientFromContextGroup(e));await Promise.all(n)}catch(e){throw new Error(e)}}else await this.removeClientFromContextGroup(t)}async removeClientFromContextGroup(e){this.wire.sendAction("interop-broker-remove-client-from-context-group").catch((e=>{}));const t=this.getClientState(e);t&&(t.contextGroupId=void 0),await this.setCurrentContextGroupInClientOptions(e,null)}getContextGroups(){return this.wire.sendAction("interop-broker-get-context-groups").catch((e=>{})),o(this,t,"f").map((e=>({...e})))}getInfoForContextGroup({contextGroupId:e}){return this.wire.sendAction("interop-broker-get-info-for-context-group").catch((e=>{})),this.getContextGroups().find((t=>t.id===e))}getAllClientsInContextGroup({contextGroupId:e}){this.wire.sendAction("interop-broker-get-all-clients-in-context-group").catch((e=>{}));return Array.from(this.interopClients.values()).filter((t=>t.contextGroupId===e)).map((e=>e.clientIdentity))}async handleFiredIntent(e,t){const n=(0,l.generateOverrideWarning)("fdc3.raiseIntent","InteropBroker.handleFiredIntent",t,"interopClient.fireIntent");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntent)}async setIntentTarget(e,t){this.wire.sendAction("interop-broker-set-intent-target").catch((e=>{}));const n=this.intentClientMap.get(t.name),i=`intent-handler-${e.name}`;if(n){const t=n.get(i);if(t){if(t.pendingIntents.push(e),t.clientIdentity&&t.isReady){const{clientIdentity:e,pendingIntents:n}=t;try{const r=n[n.length-1];await this.invokeIntentHandler(e,i,r),t.pendingIntents=[]}catch(n){console.error(`Error invoking intent handler for client ${e.uuid}/${e.name}/${e.endpointId}`),t.isReady=!1}}}else n.set(i,{isReady:!1,pendingIntents:[e]})}else{this.intentClientMap.set(t.name,new Map);const n=this.intentClientMap.get(t.name);n&&n.set(i,{isReady:!1,pendingIntents:[e]})}}async handleInfoForIntent(e,t){const n=(0,l.generateOverrideWarning)("fdc3.findIntent","InteropBroker.handleInfoForIntent",t,"interopClient.getInfoForIntent");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntent)}async handleInfoForIntentsByContext(e,t){const n=(0,l.generateOverrideWarning)("fdc3.findIntentsByContext","InteropBroker.handleInfoForIntentsByContext",t,"interopClient.getInfoForIntentsByContext");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntentsByContext)}async handleFiredIntentForContext(e,t){const n=(0,l.generateOverrideWarning)("fdc3.raiseIntentForContext","InteropBroker.handleFiredIntentForContext",t,"interopClient.fireIntentForContext");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntentForContext)}async clientDisconnected(e){}async fdc3HandleOpen({app:e,context:t},n){const i=(0,l.generateOverrideWarning)("fdc3.open","InteropBroker.fdc3HandleOpen",n);throw console.warn(i),new Error(l.BROKER_ERRORS.fdc3Open)}async fdc3HandleFindInstances(e,t){const n=(0,l.generateOverrideWarning)("fdc3.open","InteropBroker.fdc3HandleFindInstances",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3FindInstances)}async fdc3HandleGetAppMetadata(e,t){const n=(0,l.generateOverrideWarning)("fdc3.getAppMetadata","InteropBroker.fdc3HandleGetAppMetadata",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3GetAppMetadata)}async invokeContextHandler(e,t,n){const i=await this.getProvider();try{await i.dispatch(e,t,n)}catch(i){console.error(`Error invoking context handler ${t} for context type ${n.type} in client ${e.uuid}/${e.name}/${e.endpointId}`,i)}}async invokeIntentHandler(e,t,n){const i=await this.getProvider();await i.dispatch(e,t,n)}async fdc3HandleGetInfo(t,n){const{fdc3Version:i}=t;return{fdc3Version:i,...o(this,e,"f"),optionalFeatures:{OriginatingAppMetadata:!1,UserChannelMembershipAPIs:!0},appMetadata:{appId:"",instanceId:""}}}async getAllClientInfo(){return(await this.getProvider()).getAllClientInfo()}decorateSnapshot(e){return{...e,interopSnapshotDetails:{contextGroupStates:this.getContextGroupStates()}}}applySnapshot(e,t){const n=e?.interopSnapshotDetails?.contextGroupStates;n&&(t?.closeExistingWindows||this.updateExistingClients(n),this.rehydrateContextGroupStates(n))}updateExistingClients(e){this.interopClients.forEach((t=>{const{clientIdentity:n,contextGroupId:r,contextHandlers:o}=t;if(r){const t=e[r];for(const[,e]of Object.entries(t))o.forEach((t=>{const{handlerId:r,contextType:o}=t;i.isContextTypeCompatible(e.type,o)&&this.invokeContextHandler(n,r,e)}))}}))}getContextGroupStates(){return i.toObject(this.contextGroupsById)}rehydrateContextGroupStates(e){const t=Object.entries(e);for(const[e,n]of t){const t=Object.entries(n);for(const[n,i]of t)if(this.contextGroupsById.has(e)){this.contextGroupsById.get(e).set(n,i)}else console.warn(`Attempting to set a context group that isn't in the context group mapping. Skipping context group rehydration for: ${e}`)}}contextHandlerRegistered({contextType:e,handlerId:t},n){const i={contextType:e,handlerId:t},r=this.getClientState(n);if(r?.contextHandlers.set(t,i),r&&r.contextGroupId){const{contextGroupId:i}=r,o=this.contextGroupsById.get(i);if(void 0===e)o.forEach(((e,i)=>{this.invokeContextHandler(n,t,e)}));else if(o.has(e)){const i=o.get(e);i&&this.invokeContextHandler(n,t,i)}}}async intentHandlerRegistered(e,t){const{handlerId:n}=e,i=this.intentClientMap.get(t.name),r=i?.get(n);if(i)if(r){const{pendingIntents:e}=r;r.clientIdentity=t,r.isReady=!0;try{if(e.length>0){const i=e[e.length-1];await this.invokeIntentHandler(t,n,i),r.pendingIntents=[]}}catch(e){console.error(`Error invoking intent handler: ${n} for client ${t.uuid}/${t.name}/${t.endpointId}`)}}else i.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t});else{this.intentClientMap.set(t.name,new Map);const e=this.intentClientMap.get(t.name);e&&e.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t})}}removeContextHandler({handlerId:e},t){const n=this.getClientState(t);n&&n.contextHandlers.delete(e)}handleJoinSessionContextGroup({sessionContextGroupId:e},t){try{if(!e)throw new Error("Failed to join session context group: must specify group id.");const n=this.sessionContextGroupMap.get(e);if(n)n.registerNewClient(t);else{const n=new h.default(this.channel,e);n.registerNewClient(t),this.sessionContextGroupMap.set(e,n)}return{hasConflict:this.contextGroupsById.has(e)}}catch(e){throw new Error(e)}}getClientState(e){return this.interopClients.get(e.endpointId)}static toObject(e){const t=Object.fromEntries(e),n={};return Object.entries(t).forEach((([e,t])=>{const i=Object.fromEntries(t);n[e]=i})),n}static checkContextIntegrity(e){if(!e)return{isValid:!1,reason:"No context supplied"};if("object"!=typeof e)return{isValid:!1,reason:"Context must be an Object"};if(!e.type)return{isValid:!1,reason:"Context must have a type property"};if(e.id&&"object"!=typeof e.id)return{isValid:!1,reason:"Context id must be an Object populated with key-value identifiers (if set)"};if(e.id){const{id:t}=e,n=Object.keys(t);let i=!1;if(!n.length)return{isValid:!1,reason:"Context id must have at least one key-value identifier"};if(n.forEach((e=>{"string"==typeof e&&"string"==typeof t[e]||(i=!0)})),i)return{isValid:!1,reason:"Context id key-value identifiers must be of type string"}}return e.name&&"string"!=typeof e.name?{isValid:!1,reason:"Context name must be of string type (if set)"}:{isValid:!0}}static hasEndpointId(e){return void 0!==e.endpointId}static isContextTypeCompatible(e,t){return void 0===t||e===t}setContextGroupMap(){for(const e of this.getContextGroups())this.contextGroupsById.set(e.id,new Map)}async setCurrentContextGroupInClientOptions(e,t){try{const n=await this.fin.System.getEntityInfo(e.uuid,e.name);let i;"view"===n.entityType?i=await this.fin.View.wrap(e):"window"===n.entityType&&(i=await this.fin.Window.wrap(e)),i&&await i.updateOptions({interop:{currentContextGroup:t}})}catch(e){}}async setupChannelProvider(){try{const e=await this.getProvider();this.channel=e,this.wireChannel(e)}catch(e){throw new Error(`Error setting up Interop Broker Channel Provider: ${e}`)}}wireChannel(e){e.onConnection((async(e,t)=>{if(!await this.isConnectionAuthorized(e,t))throw new Error(`Connection not authorized for ${e.uuid}, ${e.name}`);if(!e.endpointId)throw new Error("Version too old to be compatible with Interop. Please upgrade your runtime to a more recent version.");const n={contextGroupId:void 0,contextHandlers:new Map,clientIdentity:e};t?.currentContextGroup&&this.contextGroupsById.has(t.currentContextGroup)&&(n.contextGroupId=t?.currentContextGroup),this.interopClients.set(e.endpointId,n)})),e.onDisconnection((e=>{this.interopClients.delete(e.endpointId);const t=this.intentClientMap.get(e.name);t&&e.uuid===this.fin.me.uuid&&t.forEach((e=>{e.isReady=!1})),this.sessionContextGroupMap.forEach((t=>{t.onDisconnection(e)})),this.clientDisconnected(e)})),e.beforeAction((async(e,t,n)=>{if(!await this.isActionAuthorized(e,t,n))throw new Error(`Action (${e}) not authorized for ${n.uuid}, ${n.name}`);this.logging?.beforeAction?.enabled&&console.log(e,t,n)})),e.afterAction(((e,t,n)=>{this.logging?.afterAction?.enabled&&console.log(e,t,n)})),e.register("setContext",this.setContext.bind(this)),e.register("fireIntent",this.handleFiredIntent.bind(this)),e.register("getCurrentContext",this.getCurrentContext.bind(this)),e.register("getInfoForIntent",this.handleInfoForIntent.bind(this)),e.register("getInfoForIntentsByContext",this.handleInfoForIntentsByContext.bind(this)),e.register("fireIntentForContext",this.handleFiredIntentForContext.bind(this)),e.register("getContextGroups",this.getContextGroups.bind(this)),e.register("joinContextGroup",this.joinContextGroup.bind(this)),e.register("removeFromContextGroup",this.removeFromContextGroup.bind(this)),e.register("getAllClientsInContextGroup",this.getAllClientsInContextGroup.bind(this)),e.register("getInfoForContextGroup",this.getInfoForContextGroup.bind(this)),e.register("contextHandlerRegistered",this.contextHandlerRegistered.bind(this)),e.register("intentHandlerRegistered",this.intentHandlerRegistered.bind(this)),e.register("removeContextHandler",this.removeContextHandler.bind(this)),e.register("sessionContextGroup:createIfNeeded",this.handleJoinSessionContextGroup.bind(this)),e.register("fdc3Open",this.fdc3HandleOpen.bind(this)),e.register("fdc3v2FindIntentsByContext",this.handleInfoForIntentsByContext.bind(this)),e.register("fdc3FindInstances",this.fdc3HandleFindInstances.bind(this)),e.register("fdc3GetAppMetadata",this.fdc3HandleGetAppMetadata.bind(this)),e.register("fdc3v2GetInfo",(async(e,t)=>this.fdc3HandleGetInfo.bind(this)(e,t))),e.register("createPrivateChannelProvider",(async e=>{const{channelId:t}=e,n=await this.fin.InterApplicationBus.Channel.create(t);p.PrivateChannelProvider.init(n,t)}))}isConnectionAuthorized(e,t){return this.wire.sendAction("interop-broker-is-connection-authorized").catch((e=>{})),Promise.resolve(!0)}isActionAuthorized(e,t,n){return this.wire.sendAction("interop-broker-is-action-authorized").catch((e=>{})),Promise.resolve(!0)}};return Gi.InteropBroker=f,e=new WeakMap,t=new WeakMap,n=new WeakMap,Gi}var zi,Ki={},qi={},Ji=s&&s.__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},Yi=s&&s.__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)};Object.defineProperty(qi,"__esModule",{value:!0});const Zi=d,Qi=Hi;class Xi extends Zi.Base{constructor(e,t,n){super(e),zi.set(this,void 0),this.id=n,Ji(this,zi,t,"f")}async setContext(e){this.wire.sendAction("interop-session-context-group-set-context").catch((e=>{}));return(await Yi(this,zi,"f")).dispatch(`sessionContextGroup:setContext-${this.id}`,{sessionContextGroupId:this.id,context:e})}async getCurrentContext(e){this.wire.sendAction("interop-session-context-group-get-context").catch((e=>{}));return(await Yi(this,zi,"f")).dispatch(`sessionContextGroup:getContext-${this.id}`,{sessionContextGroupId:this.id,type:e})}async addContextHandler(e,t){if(this.wire.sendAction("interop-session-context-group-add-handler").catch((e=>{})),"function"!=typeof e)throw new Error("Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");const n=await Yi(this,zi,"f");let i;return i=t?`sessionContextHandler:invoke-${this.id}-${t}-${(0,Qi.generateId)()}`:`sessionContextHandler:invoke-${this.id}`,n.register(i,(0,Qi.wrapContextHandler)(e,i)),await n.dispatch(`sessionContextGroup:handlerAdded-${this.id}`,{handlerId:i,contextType:t}),{unsubscribe:await this.createUnsubscribeCb(i)}}async createUnsubscribeCb(e){const t=await Yi(this,zi,"f");return async()=>{t.remove(e),await t.dispatch(`sessionContextGroup:handlerRemoved-${this.id}`,{handlerId:e})}}getUserInstance(){return{id:this.id,setContext:(0,Qi.wrapInTryCatch)(this.setContext.bind(this),"Failed to set context: "),getCurrentContext:(0,Qi.wrapInTryCatch)(this.getCurrentContext.bind(this),"Failed to get context: "),addContextHandler:(0,Qi.wrapInTryCatch)(this.addContextHandler.bind(this),"Failed to add context handler: ")}}}qi.default=Xi,zi=new WeakMap;var er={},tr={},nr={},ir={},rr=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),or=s&&s.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),sr=s&&s.__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)&&rr(t,e,n);return or(t,e),t};Object.defineProperty(ir,"__esModule",{value:!0}),ir.PrivateChannelClient=void 0;const ar=sr(Hi);var cr,dr;function hr(){if(cr)return tr;cr=1;var e,t=s&&s.__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)},n=s&&s.__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},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(tr,"__esModule",{value:!0}),tr.FDC3ModuleBase=void 0;const o=nr,a=Hi,c=wr(),d=r(i);return tr.FDC3ModuleBase=class{get client(){return t(this,e,"f").call(this)}get fin(){return this.wire.getFin()}constructor(t,i){this.wire=i,e.set(this,void 0),n(this,e,t,"f")}async broadcast(e){return this.wire.sendAction("fdc3-broadcast").catch((e=>{})),this.client.setContext(e)}async _open(e,t){this.wire.sendAction("fdc3-open").catch((e=>{}));try{return await c.InteropClient.ferryFdc3Call(this.client,"fdc3Open",{app:e,context:t})}catch(e){const t=e.message===a.BROKER_ERRORS.fdc3Open?"ResolverUnavailable":e.message;throw new Error(t)}}async _getChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:"system",...(0,o.getUnsupportedChannelApis)()})))}async getOrCreateChannel(e){this.wire.sendAction("fdc3-get-or-create-channel").catch((e=>{}));const t=(await this._getChannels()).find((t=>t.id===e));if(t)return{...t,type:"system",...(0,o.getUnsupportedChannelApis)()};try{const t=await this.client.joinSessionContextGroup(e);return(0,o.buildAppChannelObject)(t)}catch(e){throw console.error(e.message),new Error(o.ChannelError.CreationFailed)}}async getSystemChannels(){return this.wire.sendAction("fdc3-get-system-channels").catch((e=>{})),this._getChannels()}async joinChannel(e){this.wire.sendAction("fdc3-join-channel").catch((e=>{}));try{return await this.client.joinContextGroup(e)}catch(e){if(e.message===a.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup?console.error("The Channel you have tried to join is an App Channel. Custom Channels can only be defined by the Interop Broker through code or manifest configuration. Please use getOrCreateChannel."):console.error(e.message),e.message.startsWith("Attempting to join a context group that does not exist"))throw new Error(o.ChannelError.NoChannelFound);throw new Error(o.ChannelError.AccessDenied)}}async getCurrentChannel(){this.wire.sendAction("fdc3-get-current-channel").catch((e=>{}));const e=await this.getCurrentContextGroupInfo();return e?this.buildChannelObject(e):null}async leaveCurrentChannel(){return this.wire.sendAction("fdc3-leave-current-channel").catch((e=>{})),this.client.removeFromContextGroup()}async getCurrentContextGroupInfo(){const e=await this.client.getContextGroups(),t=e.map((async e=>this.client.getAllClientsInContextGroup(e.id))),n=(await Promise.all(t)).findIndex((e=>e.some((e=>{const{uuid:t,name:n}=e;return this.wire.me.uuid===t&&this.wire.me.name===n}))));return e[n]}async buildChannelObject(e){return{...e,type:"system",addContextListener:(...[e,t])=>{let n,i;"function"==typeof e?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),n=e):(n=t,"string"==typeof e&&(i=e));const r=(async()=>{let e=!0;const t=await this.client.getCurrentContext(i);return this.client.addContextHandler(((i,r)=>{if(!e||(e=!1,!(0,d.default)(t,i)))return n(i,r)}),i)})();return{...r,unsubscribe:()=>r.then((e=>e.unsubscribe()))}},broadcast:this.broadcast.bind(this),getCurrentContext:async e=>{const t=await this.client.getCurrentContext(e);return void 0===t?null:t}}}},e=new WeakMap,tr}ir.PrivateChannelClient=class{constructor(e,t){this.id=t,this.client=e,this.listeners=new Map}async broadcast(e){return this.client.dispatch("broadcast",{context:e})}async getCurrentContext(e){return this.client.dispatch("getCurrentContext",{contextType:e})}async addContextListener(e,t){if("function"!=typeof t)throw new Error("Non-function argument passed to the second parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");let n;n=e?`contextHandler:invoke-${this.id}-${e}-${ar.generateId()}`:`contextHandler:invoke-${this.id}-${ar.generateId()}`,this.client.register(n,ar.wrapContextHandler(t,n));const i={unsubscribe:await this.createContextUnsubscribeCb(n)};return this.listeners.set(n,i),await this.client.dispatch("contextHandlerAdded",{handlerId:n,contextType:e}),i}createNonStandardUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch("nonStandardHandlerRemoved",{handlerId:e})}}createContextUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch("contextHandlerRemoved",{handlerId:e})}}onAddContextListener(e){const t=`onContextHandlerAdded:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch("onAddContextHandlerAdded",{handlerId:t}),n}onDisconnect(e){const t=`onDisconnect:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch("onDisconnectHandlerAdded",{handlerId:t}),n}onUnsubscribe(e){const t=`onUnsubscribe:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch("onUnsubscribeHandlerAdded",{handlerId:t}),n}async cleanUpAllSubs(){Array.from(this.listeners.keys()).forEach((e=>{this.client.remove(e),this.listeners.delete(e)}))}async disconnect(){try{await this.client.dispatch("clientDisconnecting"),await this.cleanUpAllSubs(),await this.client.disconnect()}catch(e){throw new Error(e.message)}}},function(e){var t=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.getIntentResolution=e.isChannel=e.isContext=e.connectPrivateChannel=e.buildAppChannelObject=e.buildPrivateChannelObject=e.ChannelError=e.ResultError=e.UnsupportedChannelApiError=e.getUnsupportedChannelApis=void 0;const n=Hi,r=ir,o=t(i);e.getUnsupportedChannelApis=e=>({addContextListener:()=>{throw new a("Channel.addContextListener",e)},broadcast:()=>{throw new a("Channel.broadcast",e)},getCurrentContext:()=>{throw new a("Channel.getCurrentContext",e)}});class a extends Error{constructor(e,t="System"){super(e),this.message=`Calling ${e} on an instance of a ${t} Channel returned by fdc3.get${t}Channels is not supported. If you would like to use a ${t} Channel, please use fdc3.joinChannel, fdc3.addContextListener, and fdc3.broadcast instead.`}}var c,d;e.UnsupportedChannelApiError=a,function(e){e.NoResultReturned="NoResultReturned",e.IntentHandlerRejected="IntentHandlerRejected"}(c=e.ResultError||(e.ResultError={})),(d=e.ChannelError||(e.ChannelError={})).NoChannelFound="NoChannelFound",d.AccessDenied="AccessDenied",d.CreationFailed="CreationFailed";e.buildPrivateChannelObject=e=>{let t=!1;const n=()=>{if(t)throw new Error("Private Channel Client has been disconnected from the Private Channel")};return{id:e.id,type:"private",broadcast:async t=>(n(),e.broadcast(t)),getCurrentContext:async t=>(n(),e.getCurrentContext(t)),addContextListener:async(t,i)=>{n();let r=i,o=t;"function"==typeof t&&(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),r=t,o=null);return e.addContextListener(o,r)},onAddContextListener:t=>(n(),e.onAddContextListener(t)),disconnect:async()=>(n(),t=!0,e.disconnect()),onDisconnect:t=>(n(),e.onDisconnect(t)),onUnsubscribe:t=>(n(),e.onUnsubscribe(t))}};e.buildAppChannelObject=e=>({id:e.id,type:"app",broadcast:e.setContext,getCurrentContext:async t=>{const n=await e.getCurrentContext(t);return void 0===n?null:n},addContextListener:(t,n)=>{let i,r;"function"==typeof t?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),i=t):(i=n,"string"==typeof t&&(r=t));const s=(async()=>{let t=!0;const n=await e.getCurrentContext(r);return e.addContextHandler(((e,r)=>{if(!t||(t=!1,!(0,o.default)(n,e)))return i(e,r)}),r)})();return{...s,unsubscribe:()=>s.then((e=>e.unsubscribe()))}}});e.connectPrivateChannel=async t=>{try{const n=await fin.InterApplicationBus.Channel.connect(t),i=new r.PrivateChannelClient(n,t);return(0,e.buildPrivateChannelObject)(i)}catch(e){throw new Error(`Private Channel with id: ${t} doesn't exist`)}};e.isContext=e=>{if(e&&"object"==typeof e&&"type"in e){const{type:t}=e;return"string"==typeof t}return!1};e.isChannel=e=>{if(e&&"object"==typeof e&&"type"in e&&"id"in e){const{type:t,id:n}=e;return"string"==typeof t&&"string"==typeof n&&("app"===t||"private"===t)}return!1};e.getIntentResolution=async(t,i,r,o)=>{const s=(0,n.generateId)(),a=new Promise(((e,t)=>{fin.InterApplicationBus.subscribe({uuid:"*"},s,(t=>{e(t)})).catch((()=>t(new Error("getResult is not supported in this environment"))))})),d=r?{target:r,intentResolutionResultId:s}:{intentResolutionResultId:s},h=o?{name:o,context:i,metadata:d}:{...i,metadata:d},l=async()=>{let n=await a;if(!n||"object"!=typeof n)throw new Error(c.NoResultReturned);const{error:i}=n;if(i)throw new Error(c.IntentHandlerRejected);if((0,e.isChannel)(n)){const{id:i,type:r}=n;switch(r){case"private":n=await(0,e.connectPrivateChannel)(i);break;case"app":{const r=await t.joinSessionContextGroup(i);n=(0,e.buildAppChannelObject)(r);break}}}else if(!(0,e.isContext)(n))throw new Error(c.NoResultReturned);return n},u=o?await t.fireIntent(h):await t.fireIntentForContext(h);return"object"!=typeof u?{source:{appId:"",instanceId:""},intent:"",version:"2.0",getResult:l}:{...u,getResult:l}}}(nr);var lr,ur,pr={};function wr(){if(ur)return Ki;ur=1;var e,t,n=s&&s.__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},i=s&&s.__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)},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ki,"__esModule",{value:!0}),Ki.InteropClient=void 0;const o=d,a=r(qi),c=function(){if(dr)return er;dr=1,Object.defineProperty(er,"__esModule",{value:!0}),er.Fdc3Module=void 0;const e=Hi,t=hr();class n extends t.FDC3ModuleBase{async open(e,t){await super._open(e,t)}addContextListener(e,t){let n;return this.wire.sendAction("fdc3-add-context-listener").catch((e=>{})),"function"==typeof e?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),n=this.client.addContextHandler(e)):n=this.client.addContextHandler(t,null===e?void 0:e),{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}addIntentListener(e,t){this.wire.sendAction("fdc3-add-intent-listener").catch((e=>{}));const n=this.client.registerIntentHandler((e=>{const{context:n,metadata:i}=e,{metadata:r}=n,o=i?.intentResolutionResultId||r?.intentResolutionResultId;o&&this.fin.InterApplicationBus.publish(o,null).catch((()=>null)),t(e.context)}),e,{fdc3Version:"1.2"});return{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}async raiseIntent(t,n,i){this.wire.sendAction("fdc3-raise-intent").catch((e=>{}));const r=i?{name:t,context:n,metadata:{target:i}}:{name:t,context:n};try{return await this.client.fireIntent(r)}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntent?"ResolverUnavailable":t.message;throw new Error(n)}}async findIntent(t,n){this.wire.sendAction("fdc3-find-intent").catch((e=>{}));try{return await this.client.getInfoForIntent({name:t,context:n})}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntent?"ResolverUnavailable":t.message;throw new Error(n)}}async findIntentsByContext(t){this.wire.sendAction("fdc3-find-intents-by-context").catch((e=>{}));try{return await this.client.getInfoForIntentsByContext(t)}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntentsByContext?"ResolverUnavailable":t.message;throw new Error(n)}}async raiseIntentForContext(t,n){this.wire.sendAction("fdc3-raise-intent-for-context").catch((e=>{}));try{return await this.client.fireIntentForContext({...t,metadata:{target:n}})}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntentForContext?"ResolverUnavailable":t.message;throw new Error(n)}}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}getInfo(){return this.wire.sendAction("fdc3-get-info").catch((e=>{})),{providerVersion:this.wire.environment.getAdapterVersionSync(),provider:`openfin-${this.wire.me.uuid}`,fdc3Version:"1.2"}}}return er.Fdc3Module=n,er}(),h=function(){if(lr)return pr;lr=1,Object.defineProperty(pr,"__esModule",{value:!0}),pr.Fdc3Module2=void 0;const e=hr(),t=Hi,n=wr(),i=nr,r=ir;class o extends e.FDC3ModuleBase{async open(e,t){return"string"==typeof e&&console.warn("Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string })."),super._open(e,t)}async findInstances(e){this.wire.sendAction("fdc3-find-instances").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,"fdc3FindInstances",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3FindInstances?"ResolverUnavailable":e.message;throw new Error(n)}}async getAppMetadata(e){this.wire.sendAction("fdc3-get-app-metadata").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,"fdc3GetAppMetadata",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3GetAppMetadata?"ResolverUnavailable":e.message;throw new Error(n)}}async addContextListener(e,t){this.wire.sendAction("fdc3-add-context-listener").catch((e=>{}));const n=e=>t=>{const{contextMetadata:n,...i}=t,r=n?[{...i},n]:[t,null];e(...r)};let i=t,r=n(i);return"function"==typeof e?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),i=e,r=n(i),this.client.addContextHandler(r)):this.client.addContextHandler(r,null===e?void 0:e)}async findIntent(e,n,i){this.wire.sendAction("fdc3-find-intent").catch((e=>{}));try{return await this.client.getInfoForIntent({name:e,context:n,metadata:{resultType:i}})}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntent?"ResolverUnavailable":e.message;throw new Error(n)}}async findIntentsByContext(e,i){this.wire.sendAction("fdc3-find-intents-by-context").catch((e=>{}));const r=i?{context:e,metadata:{resultType:i}}:e;try{return await n.InteropClient.ferryFdc3Call(this.client,"fdc3v2FindIntentsByContext",r)}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntentsByContext?"ResolverUnavailable":e.message;throw new Error(n)}}async raiseIntent(e,n,r){this.wire.sendAction("fdc3-raise-intent").catch((e=>{}));try{return"string"==typeof r&&console.warn("Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string })."),(0,i.getIntentResolution)(this.client,n,r,e)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?"ResolverUnavailable":e.message;throw new Error(n)}}async raiseIntentForContext(e,n){this.wire.sendAction("fdc3-raise-intent-for-context").catch((e=>{}));try{return"string"==typeof n&&console.warn("Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string })."),(0,i.getIntentResolution)(this.client,e,n)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?"ResolverUnavailable":e.message;throw new Error(n)}}async addIntentListener(e,t){if(this.wire.sendAction("fdc3-add-intent-listener").catch((e=>{})),"string"!=typeof e)throw new Error("First argument must be an Intent name");return this.client.registerIntentHandler((async e=>{let n,i;const{context:r,metadata:o}=e,{contextMetadata:s,metadata:a,...c}=r,d=o?.intentResolutionResultId||a?.intentResolutionResultId;try{const e=a?{metadata:a,...c}:{...c};n=await t(e,s),i=n}catch(e){n=e,i={error:!0}}if(d&&this.fin.InterApplicationBus.publish(d,i).catch((()=>null)),n instanceof Error)throw new Error(n.message);return n}),e,{fdc3Version:"2.0"})}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}async createPrivateChannel(){const e=(0,t.generateId)();await n.InteropClient.ferryFdc3Call(this.client,"createPrivateChannelProvider",{channelId:e});const o=await this.fin.InterApplicationBus.Channel.connect(e),s=new r.PrivateChannelClient(o,e);return(0,i.buildPrivateChannelObject)(s)}async getUserChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:"user",...(0,i.getUnsupportedChannelApis)("User")})))}async getSystemChannels(){return console.warn("This API has been deprecated. Please use fdc3.getUserChannels instead."),super.getSystemChannels()}async joinUserChannel(e){return super.joinChannel(e)}async joinChannel(e){return console.warn("This API has been deprecated. Please use fdc3.joinUserChannel instead."),super.joinChannel(e)}async getCurrentChannel(){const e=await super.getCurrentChannel();return e?{...e,type:"user",broadcast:this.broadcast.bind(this)}:null}async getInfo(){return n.InteropClient.ferryFdc3Call(this.client,"fdc3v2GetInfo",{fdc3Version:"2.0"})}}return pr.Fdc3Module2=o,pr}(),l=Hi;let u=class extends o.Base{constructor(i,r){super(i),e.set(this,void 0),t.set(this,void 0),n(this,t,new Map,"f"),n(this,e,r,"f")}async setContext(t){this.wire.sendAction("interop-client-set-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("setContext",{context:t})}async addContextHandler(t,n){if(this.wire.sendAction("interop-client-add-context-handler").catch((e=>{})),"function"!=typeof t)throw new Error("Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");const r=await i(this,e,"f");let o;o=n?`invokeContextHandler-${n}-${(0,l.generateId)()}`:"invokeContextHandler";const s=(0,l.wrapContextHandler)(t,o);return r.register(o,s),await r.dispatch("contextHandlerRegistered",{handlerId:o,contextType:n}),{unsubscribe:async()=>{r.remove(o),await r.dispatch("removeContextHandler",{handlerId:o})}}}async getContextGroups(){this.wire.sendAction("interop-client-get-context-groups").catch((e=>{}));return(await i(this,e,"f")).dispatch("getContextGroups")}async joinContextGroup(t,n){this.wire.sendAction("interop-client-join-context-group").catch((e=>{}));const r=await i(this,e,"f");if(!t)throw new Error("No contextGroupId specified for joinContextGroup.");return r.dispatch("joinContextGroup",{contextGroupId:t,target:n})}async removeFromContextGroup(t){this.wire.sendAction("interop-client-remove-from-context-group").catch((e=>{}));return(await i(this,e,"f")).dispatch("removeFromContextGroup",{target:t})}async getAllClientsInContextGroup(t){this.wire.sendAction("interop-client-get-all-clients-in-context-group").catch((e=>{}));const n=await i(this,e,"f");if(!t)throw new Error("No contextGroupId specified for getAllClientsInContextGroup.");return n.dispatch("getAllClientsInContextGroup",{contextGroupId:t})}async getInfoForContextGroup(t){this.wire.sendAction("interop-client-get-info-for-context-group").catch((e=>{}));const n=await i(this,e,"f");if(!t)throw new Error("No contextGroupId specified for getInfoForContextGroup.");return n.dispatch("getInfoForContextGroup",{contextGroupId:t})}async fireIntent(t){this.wire.sendAction("interop-client-fire-intent").catch((e=>{}));return(await i(this,e,"f")).dispatch("fireIntent",t)}async registerIntentHandler(t,n,r){this.wire.sendAction("interop-client-register-intent-handler").catch((e=>{}));const o=await i(this,e,"f"),s=`intent-handler-${n}`,a=(0,l.wrapIntentHandler)(t,s);try{await o.register(s,a),await o.dispatch("intentHandlerRegistered",{handlerId:s,...r})}catch(e){throw new Error("Unable to register intent handler")}return{unsubscribe:async()=>{o.remove(s)}}}async getCurrentContext(t){this.wire.sendAction("interop-client-get-current-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("getCurrentContext",{contextType:t})}async getInfoForIntent(t){this.wire.sendAction("interop-client-get-info-for-intent").catch((e=>{}));return(await i(this,e,"f")).dispatch("getInfoForIntent",t)}async getInfoForIntentsByContext(t){this.wire.sendAction("interop-client-get-info-for-intents-by-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("getInfoForIntentsByContext",t)}async fireIntentForContext(t){this.wire.sendAction("interop-client-fire-intent-for-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("fireIntentForContext",t)}async joinSessionContextGroup(n){try{const r=i(this,t,"f").get(n);if(r)return r.getUserInstance();const o=await i(this,e,"f"),{hasConflict:s}=await o.dispatch("sessionContextGroup:createIfNeeded",{sessionContextGroupId:n});s&&console.warn(`A (non-session) context group with the name "${n}" already exists. If you are trying to join a Context Group, call joinContextGroup instead.`);const c=new a.default(this.wire,i(this,e,"f"),n);return i(this,t,"f").set(n,c),c.getUserInstance()}catch(e){throw console.error(`Error thrown trying to create Session Context Group with id "${n}": ${e}`),e}}async onDisconnection(t){this.wire.sendAction("interop-client-add-ondisconnection-listener").catch((e=>{}));return(await i(this,e,"f")).onDisconnection((e=>{const{uuid:n}=e;t({type:"interop-broker",topic:"disconnected",brokerName:n})}))}getFDC3Sync(e){switch(e){case"1.2":return new c.Fdc3Module((()=>this),this.wire);case"2.0":return new h.Fdc3Module2((()=>this),this.wire);default:throw new Error(`Invalid FDC3 version provided: ${e}. Must be '1.2' or '2.0'`)}}async getFDC3(e){return this.getFDC3Sync(e)}static async ferryFdc3Call(t,n,r){return(await i(t,e,"f")).dispatch(n,r||null)}};return Ki.InteropClient=u,e=new WeakMap,t=new WeakMap,Ki}var yr,fr,gr,mr={};function vr(){if(yr)return mr;yr=1,Object.defineProperty(mr,"__esModule",{value:!0}),mr.overrideCheck=mr.checkFDC32Overrides=mr.getDefaultViewFdc3VersionFromAppInfo=void 0;const e=Vi();function t(t){return["fdc3HandleFindInstances","handleInfoForIntent","handleInfoForIntentsByContext","fdc3HandleGetAppMetadata","fdc3HandleGetInfo","fdc3HandleOpen","handleFiredIntent","handleFiredIntentForContext"].filter((n=>t[n]===e.InteropBroker.prototype[n]))}return mr.getDefaultViewFdc3VersionFromAppInfo=function({manifest:e,initialOptions:t}){const n=e?.platform?.defaultViewOptions?.fdc3InteropApi??t.defaultViewOptions?.fdc3InteropApi;return["1.2","2.0"].includes(n??"")?n:void 0},mr.checkFDC32Overrides=t,mr.overrideCheck=function(e,n){if(n&&"2.0"===n){const n=t(e);n.length>0&&console.warn(`WARNING: FDC3 2.0 has been set as a default option for Views in this Platform, but the required InteropBroker APIs for FDC3 2.0 compliance have not all been overridden.\nThe following APIs need to be overridden:\n${n.join("\n")}`)}},mr}function Cr(){return gr||(gr=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),i=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),i(function(){if(fr)return Ti;fr=1;var e=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ti,"__esModule",{value:!0}),Ti.InteropModule=void 0;const t=e(n),i=$i,r=d,o=Vi(),a=wr(),c=vr(),h=Tn,l=e=>new e,u="You have attempted to use or modify InteropBroker parameters, which is not allowed. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.";class p extends r.Base{async init(e,n=l){this.wire.sendAction("interop-init").catch((()=>{}));const r=await this.wire.environment.getInteropInfo(this.wire.getFin()),s=(0,i.createUnusableObject)(u),a=(0,i.createWarningObject)(u,(0,t.default)(r)),d=async()=>{throw new Error(u)},p=o.InteropBroker.createClosedConstructor(this.wire,(()=>this.fin.InterApplicationBus.Channel.create(`interop-broker-${e}`)),r);let w;return w=Array.isArray(n)?new((0,h.overrideFromComposables)(...n)(p))(s,d,a):await n(p,s,d,a),(0,c.overrideCheck)(w,r.fdc3Version),w}connectSync(e,t){return this.wire.sendAction("interop-connect-sync").catch((()=>{})),new a.InteropClient(this.wire,this.wire.environment.whenReady().then((()=>this.fin.InterApplicationBus.Channel.connect(`interop-broker-${e}`,{payload:t}))))}}return Ti.InteropModule=p,Ti}(),e),i(wr(),e),i(Vi(),e)}(Li)),Li}var br={},Ir={},Er={},xr={};Object.defineProperty(xr,"__esModule",{value:!0}),xr.getSnapshotSourceChannelName=void 0;xr.getSnapshotSourceChannelName=e=>`snapshot-source-provider-${e.uuid}`;var Ar,Pr,Mr,_r,Or,Sr=s&&s.__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},Rr=s&&s.__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)};Object.defineProperty(Er,"__esModule",{value:!0}),Er.SnapshotSource=void 0;const Fr=d,jr=xr,kr=new Map;class Lr extends Fr.Base{constructor(e,t){super(e),Ar.set(this,void 0),Pr.set(this,(()=>(kr.has(this.identity.uuid)||kr.set(this.identity.uuid,{eventFired:null,clientPromise:null}),kr.get(this.identity.uuid)))),Mr.set(this,(()=>(Rr(this,Pr,"f").call(this).clientPromise||(Rr(this,Pr,"f").call(this).clientPromise=Rr(this,_r,"f").call(this)),Rr(this,Pr,"f").call(this).clientPromise))),_r.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);try{Rr(this,Pr,"f").call(this).eventFired||await Rr(this,Or,"f").call(this);const t=await this.fin.InterApplicationBus.Channel.connect(e,{wait:!1});return t.onDisconnection((()=>{Rr(this,Pr,"f").call(this).clientPromise=null,Rr(this,Pr,"f").call(this).eventFired=null})),t}catch(e){throw Rr(this,Pr,"f").call(this).clientPromise=null,new Error("The targeted SnapshotSource is not currently initialized. Await this object's ready() method.")}})),Or.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);let t,n;const i=new Promise(((e,i)=>{t=e,n=i}));Rr(this,Pr,"f").call(this).eventFired=i;const r=async i=>{try{i.channelName===e&&(t(),await this.fin.InterApplicationBus.Channel.removeListener("connected",r))}catch(e){n(e)}};await this.fin.InterApplicationBus.Channel.on("connected",r)})),Sr(this,Ar,t,"f")}get identity(){return Rr(this,Ar,"f")}async ready(){this.wire.sendAction("snapshot-source-ready").catch((e=>{}));try{await Rr(this,Mr,"f").call(this)}catch(e){await Rr(this,Pr,"f").call(this).eventFired}}async getSnapshot(){this.wire.sendAction("snapshot-source-get-snapshot").catch((e=>{}));const e=await Rr(this,Mr,"f").call(this),t=await e.dispatch("get-snapshot");return(await t).snapshot}async applySnapshot(e){this.wire.sendAction("snapshot-source-apply-snapshot").catch((e=>{}));return(await Rr(this,Mr,"f").call(this)).dispatch("apply-snapshot",{snapshot:e})}}Er.SnapshotSource=Lr,Ar=new WeakMap,Pr=new WeakMap,Mr=new WeakMap,_r=new WeakMap,Or=new WeakMap,Object.defineProperty(Ir,"__esModule",{value:!0}),Ir.SnapshotSourceModule=void 0;const Tr=d,$r=Er,Br=xr;class Gr extends Tr.Base{async init(e){if(this.wire.sendAction("snapshot-source-init").catch((e=>{})),"object"!=typeof e||"function"!=typeof e.getSnapshot||"function"!=typeof e.applySnapshot)throw new Error("you must pass in a valid SnapshotProvider");const t=await this.fin.InterApplicationBus.Channel.create((0,Br.getSnapshotSourceChannelName)(this.fin.me));t.register("get-snapshot",(async()=>({snapshot:await e.getSnapshot()}))),t.register("apply-snapshot",(({snapshot:t})=>e.applySnapshot(t)))}wrapSync(e){return this.wire.sendAction("snapshot-source-wrap-sync").catch((e=>{})),new $r.SnapshotSource(this.wire,e)}async wrap(e){return this.wire.sendAction("snapshot-source-wrap").catch((e=>{})),this.wrapSync(e)}}Ir.SnapshotSourceModule=Gr,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Ir,e),n(Er,e)}(br),Object.defineProperty(a,"__esModule",{value:!0});var Wr=a.Fin=void 0;const Hr=t,Nr=c,Dr=ie(),Ur=Z(),Vr=de,zr=en,Kr=rn,qr=un,Jr=bn,Yr=J(),Zr=An,Qr=ki,Xr=Cr(),eo=br;class to extends Hr.EventEmitter{constructor(e){super(),this.wire=e,this.System=new Nr.System(e),this.Window=new Dr._WindowModule(e),this.Application=new Ur.ApplicationModule(e),this.InterApplicationBus=new Vr.InterApplicationBus(e),this.Clipboard=new zr.Clipboard(e),this.ExternalApplication=new Kr.ExternalApplicationModule(e),this.Frame=new qr._FrameModule(e),this.GlobalHotkey=new Jr.GlobalHotkey(e),this.Platform=new Zr.PlatformModule(e,this.InterApplicationBus.Channel),this.View=new Yr.ViewModule(e),this.Interop=new Xr.InteropModule(e),this.SnapshotSource=new eo.SnapshotSourceModule(e),e.registerFin(this),this.me=(0,Qr.getMe)(e),e.on("disconnected",(()=>{this.emit("disconnected")}))}}Wr=a.Fin=to;var no={},io={};function ro(e){return"string"==typeof e.manifestUrl}function oo(e){return ao(e)&&"string"==typeof e.address}function so(e){return oo(e)&&"string"==typeof e.token}function ao(e){return"string"==typeof e.uuid}function co(e){return e.runtime&&"string"==typeof e.runtime.version}function ho(e){return ao(e)&&co(e)}Object.defineProperty(io,"__esModule",{value:!0}),io.isInternalConnectConfig=io.isPortDiscoveryConfig=io.isNewConnectConfig=io.isConfigWithReceiver=io.isRemoteConfig=io.isExistingConnectConfig=io.isExternalConfig=void 0,io.isExternalConfig=ro,io.isExistingConnectConfig=oo,io.isRemoteConfig=so,io.isConfigWithReceiver=function(e){return"object"==typeof e.receiver&&so({...e,address:""})},io.isNewConnectConfig=ho,io.isPortDiscoveryConfig=function(e){return ro(e)&&co(e)||ho(e)},io.isInternalConnectConfig=function(e){return oo(e)||ho(e)};var lo={},uo={};Object.defineProperty(uo,"__esModule",{value:!0}),uo.EmitterMap=void 0;const po=t;function wo(e){return Buffer.from(e).toString("base64")}uo.EmitterMap=class{constructor(){this.storage=new Map}hashKeys(e){return e.map(wo).join("/")}getOrCreate(e){const t=this.hashKeys(e);return this.storage.has(t)||this.storage.set(t,new po.EventEmitter),this.storage.get(t)}has(e){return this.storage.has(this.hashKeys(e))}delete(e){const t=this.hashKeys(e);return this.storage.delete(t)}},Object.defineProperty(lo,"__esModule",{value:!0});const yo=uo;class fo extends yo.EmitterMap{constructor(){super(...arguments),this.dispatchEvent=e=>{if(function(e){return"process-desktop-event"===e.action}(e)){const{payload:t}=e,n=function(e){const{topic:t}=e;if("frame"===t||"window"===t||"view"===t){const{uuid:n,name:i}=e;return[t,n,i]}if("application"===t){const{uuid:n}=e;return[t,n]}return[t]}(t);if(this.has(n))return this.getOrCreate(n).emit(t.type,t),!0}return!1}}}lo.default=fo;var go,mo,vo=s&&s.__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},Co=s&&s.__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)},bo=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(no,"__esModule",{value:!0});var Io=no.Transport=void 0;const Eo=t,xo=io,Ao=g,Po=bo(lo),Mo=ki,_o=ke;class Oo extends Eo.EventEmitter{constructor(e,t,n){super(),this.wireListeners=new Map,this.topicRefMap=new Map,this.eventAggregator=new Po.default,this.messageHandlers=[this.eventAggregator.dispatchEvent],go.set(this,void 0),mo.set(this,void 0),this.connectSync=()=>{Co(this,go,"f").connectSync()},this.getPort=()=>Co(this,go,"f").getPort(),vo(this,go,new e(this.onmessage.bind(this)),"f"),this.environment=t,this.sendRaw=Co(this,go,"f").send.bind(Co(this,go,"f")),this.registerMessageHandler(this.handleMessage.bind(this)),Co(this,go,"f").on("disconnected",(()=>{for(const[,{handleNack:e}]of this.wireListeners)e({reason:"Remote connection has closed"});this.wireListeners.clear(),this.emit("disconnected")}));const{uuid:i,name:r}=n,o=this.environment.getCurrentEntityType();this.me=(0,Mo.getBaseMe)(o,i,r)}getFin(){if(!Co(this,mo,"f"))throw new Error("No Fin object registered for this transport");return Co(this,mo,"f")}registerFin(e){if(Co(this,mo,"f"))throw new Error("Fin object has already been registered for this transport");vo(this,mo,e,"f")}shutdown(){return Co(this,go,"f").shutdown()}async connect(e){if((0,xo.isConfigWithReceiver)(e))return await Co(this,go,"f").connect(e.receiver),this.authorize(e);if((0,xo.isRemoteConfig)(e))return this.connectRemote(e);if((0,xo.isExistingConnectConfig)(e))return this.connectByPort(e);if((0,xo.isNewConnectConfig)(e)){const t=await this.environment.retrievePort(e);return this.connectByPort({...e,address:`ws://localhost:${t}`})}}async connectRemote(e){return await Co(this,go,"f").connect(new(this.environment.getWsConstructor())(e.address)),this.authorize(e)}async connectByPort(e){const{address:t,uuid:n}=e,i={...e,type:"file-token"},r=Co(this,go,"f");await r.connect(new(this.environment.getWsConstructor())(e.address));const o=await this.sendAction("request-external-authorization",{uuid:n,type:"file-token"},!0);if("external-authorization-response"!==o.action)throw new Ao.UnexpectedActionError(o.action);return await this.environment.writeToken(o.payload.file,o.payload.token),this.authorize(i)}async authorize(e){const t=await this.sendAction("request-authorization",e,!0);if("authorization-response"!==t.action)throw new Ao.UnexpectedActionError(t.action);if(!0!==t.payload.success)throw new Ao.RuntimeError(t.payload)}sendAction(e,t={},n=!1){let i=()=>{};const r=Ao.RuntimeError.getCallSite(1),o=this.environment.getNextMessageId(),s=new Promise(((s,a)=>{i=a;const c={action:e,payload:t,messageId:o},d=Co(this,go,"f");return this.addWireListener(o,s,(e=>this.nackHandler(e,a,r)),n),d.send(c).catch(a)}));return Object.assign(s,{cancel:i,messageId:o})}nackHandler(e,t,n){t("string"==typeof e?e:new Ao.RuntimeError(e,n))}ferryAction(e){return new Promise(((t,n)=>{const i=this.environment.getNextMessageId();e.messageId=i;const r=e=>{t(e.payload)};return Co(this,go,"f").send(e).then((()=>this.addWireListener(i,r,(e=>this.nackHandler(e,n)),!1))).catch(n)}))}registerMessageHandler(e){this.messageHandlers.push(e)}addWireListener(e,t,n,i){i?this.uncorrelatedListener=t:this.wireListeners.has(e)?n({reason:"Duplicate handler id",error:(0,_o.errorToPOJO)(new Ao.DuplicateCorrelationError(String(e)))}):this.wireListeners.set(e,{resolve:t,handleNack:n})}onmessage(e){for(const t of this.messageHandlers)t.call(null,e)}handleMessage(e){const t=e.correlationId||NaN;if("correlationId"in e){if(!this.wireListeners.has(t))return!1;{const{resolve:n,handleNack:i}=this.wireListeners.get(t);"ack"!==e.action?i({reason:"Did not receive ack action",error:(0,_o.errorToPOJO)(new Ao.NoAckError(e.action))}):"payload"in e?e.payload.success?n.call(null,e):i(e.payload):"string"==typeof e.reason?i(e):(console.warn("Received invalid response from core",e),i({reason:"invalid response shape"})),this.wireListeners.delete(t)}}else this.uncorrelatedListener&&this.uncorrelatedListener.call(null,e),this.uncorrelatedListener=()=>{};return!0}}Io=no.Transport=Oo,go=new WeakMap,mo=new WeakMap;const So=(...e)=>({log:(...t)=>console.debug(`[${(new Date).toISOString()}]`,...(e=>e.map((e=>`[${e}]`)))(e),...t),getLogger:(...t)=>So(...e,...t)}),Ro=So("@openfin/core-web/client");function Fo(e,t){if(!function(e){return"string"==typeof e}(e))throw new Error(`Property ${t} has invalid type. Expected string, got ${typeof e}.`)}const jo="web-broker-ports-ready",ko=Ro.getLogger("get-web-interop-ports");function Lo(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)}function To(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}"function"==typeof SuppressedError&&SuppressedError;const $o=e=>{var n,i,r;return r=class extends t.EventEmitter{constructor(t){super(),n.set(this,void 0),i.set(this,!1),this.connectSync=()=>{Lo(this,i,"f")||(e.addEventListener("message",(e=>{e.data?.topic?.startsWith("wire-message")&&e.data.message&&Lo(this,n,"f").call(this,{...JSON.parse(e.data.message),ports:e.ports})})),e.start())},this.connect=async()=>{this.connectSync()},this.send=t=>(e.postMessage({topic:"wire-message",message:JSON.stringify(t)}),Promise.resolve()),this.shutdown=async()=>{e.close()},To(this,n,t,"f")}getPort(){return e}},n=new WeakMap,i=new WeakMap,r};var Bo={},Go={};Object.defineProperty(Go,"__esModule",{value:!0}),Go.BaseEnvironment=void 0;const Wo=vr();Go.BaseEnvironment=class{async getViewWindowIdentity(e,t){const{identity:n}=await e.View.wrapSync(t).getCurrentWindow();return n}async getInteropInfo(e){const t=await e.Application.getCurrentSync().getInfo().catch((()=>null)),n=t?.initialOptions?.interopBrokerConfiguration??{};return{fdc3Version:t?(0,Wo.getDefaultViewFdc3VersionFromAppInfo)(t):void 0,...n,fdc3Info:{providerVersion:await e.System.getVersion(),provider:"OpenFin"}}}},Object.defineProperty(Bo,"__esModule",{value:!0});var Ho=Bo.BrowserEnvironment=void 0;const No=Go;class Do extends No.BaseEnvironment{constructor(){super(...arguments),this.type="other",this.getRandomId=()=>{const e=new Uint32Array(1);return window.crypto.getRandomValues(e)[0].toString(32)}}getAdapterVersionSync(){return""}observeBounds(e,t){throw new Error("Method not implemented.")}layoutAllowedInContext(e){return!1}initLayoutManager(e,t,n){throw new Error("Method not implemented.")}applyLayoutSnapshot(e,t,n){throw new Error("Method not implemented.")}createLayout(e,t){throw new Error("Method not implemented.")}destroyLayout(e,t){throw new Error("Method not implemented.")}resolveLayout(e,t){throw new Error("Method not implemented.")}initPlatform(...e){throw new Error("Method not implemented.")}writeToken(e,t){return Promise.resolve("")}retrievePort(e){throw new Error("Method not implemented.")}getNextMessageId(){return this.getRandomId()}createChildContent(e){throw new Error("Method not implemented.")}getWebWindow(e){throw new Error("Method not implemented.")}getCurrentEntityIdentity(){throw new Error("Method not implemented.")}getCurrentEntityType(){return"external connection"}raiseEvent(e,t){throw new Error("Method not implemented.")}getUrl(){return location.href}getDefaultChannelOptions(){return{create:{},connect:{}}}getRtcPeer(){return new RTCPeerConnection}getWsConstructor(){return WebSocket}whenReady(){return Promise.resolve()}}Ho=Bo.BrowserEnvironment=Do;const Uo=e=>"platform"in e&&void 0!==e.platform;var Vo,zo;class Ko extends Ho{constructor(e){super(),this.connectConfig=e,Vo.set(this,void 0),zo.set(this,new W((async()=>Promise.resolve().then((function(){return __webpack_require__(/*! ./main-b14f67c9.js */ "../../node_modules/@openfin/core-web/out/main-b14f67c9.js")}))))),Uo(e)&&this.validatePlatformOptions(e)}getAdapterVersionSync(){return"0.39.21"}validatePlatformOptions({platform:e}){if(!("layoutSnapshot"in e))throw new Error("Platform options are missing layoutSnapshot. Please provide a layoutSnapshot in the platform options.");if("windows"in e||"windows"in e.layoutSnapshot)throw new Error("It appears you tried to call connect() with a snapshot object from an OpenFin desktop environment. Note that connect() expects to be called with a platform property with this structure: { platform: { layoutSnapshot } }. To get a layoutSnapshot of the expected structure, use fin.Platform.Layout.getCurrentLayoutManagerSync().getLayoutSnapshot() in v34+ in your desktop environment.");const{layouts:t}=e.layoutSnapshot;Object.entries(t).map((([e,t])=>{if("object"!=typeof t||null===t)throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must be an object.`);if(!("content"in t))throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must contain a 'content' property.`)}))}async getInteropInfo(e){return{...{contextGroups:void 0,logging:{beforeAction:{enabled:!1},afterAction:{enabled:!1}}},fdc3Version:void 0,fdc3Info:{providerVersion:"0.39.21",provider:"OpenFin Web"}}}layoutAllowedInContext(e){return!0}async initLayoutManager(e,t,n){if(Lo(this,Vo,"f"))throw new Error("Layout already initialized.");if(!Uo(this.connectConfig))throw new Error("Platform options are missing from connection config.");const{WebLayoutEntryPoint:i}=await Lo(this,zo,"f").getValue();return To(this,Vo,new i(this.connectConfig),"f"),await Lo(this,Vo,"f").initLayoutManager(e,t,n)}async applyLayoutSnapshot(e,t,n){Lo(this,Vo,"f")?.applyLayoutSnapshot(e,t,n)}async createLayout(e,t){return Lo(this,Vo,"f")?.createLayout(e,t)}async destroyLayout(e,t){return Lo(this,Vo,"f")?.destroyLayout(e,t)}async getViewWindowIdentity(e,t){return Promise.resolve({uuid:t.uuid,name:t.uuid})}}Vo=new WeakMap,zo=new WeakMap;const qo=()=>{const e=((e,t)=>{const n=new RegExp(`^${t}<(?.*)>$`).exec(e)?.groups?.meta;if(n)try{return JSON.parse(atob(n))}catch(e){throw new Error(`Failed to decode JSON from ${n}.`)}})(window.name,"of-frame");if(e)try{const{name:t,uuid:n,brokerUrl:i,providerId:r,contextGroup:o}=e;return Fo(i,"brokerUrl"),Fo(n,"uuid"),Fo(t,"name"),{identity:{name:t,uuid:n},brokerUrl:i,interopConfig:{providerId:r,currentContextGroup:o}}}catch(e){throw new Error(`Unexpected error occurred when inferring platform information: ${e.stack}`)}},Jo=()=>{const e=r.v4();return{uuid:e,name:e}},Yo=async e=>{if("enabled"===e.connectionInheritance){const t=await(async e=>{const t=qo();if(t){const{validateOptions:n=(()=>!0)}=e,{identity:i,...r}=t;if(!await n(r))throw new Error("Parent options were rejected by validateOptions.");return t}})(e);if(t)return t}if(!e.options){const t="enabled"===e.connectionInheritance?"Broker URL was not specified nor provided by a platform container.":"Connection inheritance is disabled but no options were provided.";throw new Error(t)}return{...e.options,identity:Jo()}};exports.__classPrivateFieldGet=Lo,exports.__classPrivateFieldSet=To,exports.apiExposer=Gn,exports.commonjsGlobal=s,exports.connect=async t=>{try{Ro.log("Establishing connection",t);const{brokerUrl:n,identity:i,timeout:r,interopConfig:s}=await Yo(t),{workerPort:a,iframeBrokerPort:c}=await(async(e,t,n)=>{const{origin:i}=new URL(e),r=document.createElement("IFRAME");let s;r.style.display="none";try{return await new Promise(((a,c)=>{const d=e=>{if(e.source===r.contentWindow&&e.data?.topic===`ack-${jo}`){if(e.origin!==i)c(new Error(`Broker redirected to unexpected origin ${e.origin}, expected ${i}.`));else if(e.data.success){const[t,n]=e.ports;a({iframeBrokerPort:t,workerPort:n})}else c(new m(e.data));window.removeEventListener("message",d),clearTimeout(s)}};window.addEventListener("message",d),ko.log(`Connecting to broker ${e}`),r.setAttribute("src",e),r.setAttribute("name",o(t,"of-broker")),document.body.appendChild(r),ko.log("Iframe loaded, awaiting init message from iframe"),n&&(s=setTimeout((()=>{window.removeEventListener("message",d),document.body.removeChild(r),c(new Error("Worker did not initialize in time"))}),n))}))}catch(e){throw new Error(`Failed to initialise Fin Web Client. ${e.message}`,{cause:e})}})(n,i,r);Ro.log("Successfully established connection to shared worker");const d={entityType:"external connection",...i};a.start(),c.start();const h=((t,n,i)=>{const r=$o(n),o=new Ko(t),s=new Io(r,o,i);return s.connectSync(),window.Buffer=e.Buffer,new Wr(s)})(t,a,d);return s?.providerId&&(h.me.interop=h.Interop.connectSync(s.providerId),s?.currentContextGroup&&h.me.interop.joinContextGroup(s.currentContextGroup).catch((e=>{console.warn(`Error joining specified context group: ${s?.currentContextGroup}, continuing`,e)}))),{...h,me:{...h.me,identity:{uuid:h.me.uuid,name:h.me.name}}}}catch(e){throw new Error(`An error occured during web-interop connection: ${e.message}`)}},exports.decorators=Nn,exports.encodeOptions=o,exports.layout_constants=ai,exports.lazy=G; /***/ }), -/***/ "./node_modules/@openfin/core-web/out/main-b14f67c9.js": -/*!*************************************************************!*\ - !*** ./node_modules/@openfin/core-web/out/main-b14f67c9.js ***! - \*************************************************************/ +/***/ "../../node_modules/@openfin/core-web/out/main-b14f67c9.js": +/*!*****************************************************************!*\ + !*** ../../node_modules/@openfin/core-web/out/main-b14f67c9.js ***! + \*****************************************************************/ /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; -var t=__webpack_require__(/*! ./main-8cad4070.js */ "./node_modules/@openfin/core-web/out/main-8cad4070.js"),e=__webpack_require__(/*! uuid */ "../../node_modules/uuid/dist/esm-browser/index.js");__webpack_require__(/*! buffer/ */ "../../node_modules/buffer/index.js"),__webpack_require__(/*! events */ "../../node_modules/events/events.js"),__webpack_require__(/*! lodash/cloneDeep */ "../../node_modules/lodash/cloneDeep.js"),__webpack_require__(/*! lodash/isEqual */ "../../node_modules/lodash/isEqual.js");var i={},n={};Object.defineProperty(n,"__esModule",{value:!0}),n.mapValuesAsync=n.mapEntriesAsync=void 0;const o=(t,[e,i])=>({...t,[e]:i});async function s(t,e){return(await Promise.all(e.map((async([e,i])=>[e,await t(i,e)])))).reduce(o,{})}n.mapEntriesAsync=s,n.mapValuesAsync=async function(t,e){let i;return i=e instanceof Map?[...e.entries()]:Object.entries(e),s(t,i)};var r,a,l,h,d=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldSet||function(t,e,i,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(t,i):o?o.value=i:e.set(t,i),i},c=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldGet||function(t,e,i,n){if("a"===i&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?n:"a"===i?n.call(t):n?n.value:e.get(t)};Object.defineProperty(i,"__esModule",{value:!0});var m=i.DefaultLayoutManager=void 0;const u=n;class p{constructor(t){a.set(this,void 0),l.set(this,new Map),d(this,a,t,"f")}size(){return c(this,l,"f").size}async applyLayoutSnapshot({layouts:t}){if(Object.keys(t).length>1)throw new Error("[LayoutManager] Tried to call applyLayoutSnapshot with more than 1 layout. When implementing multiple layouts via overridden LayoutManager class, you must override and fully implement the applyLayoutSnapshot method without calling super.applyLayoutSnapshot().");const[[e,i]]=Object.entries(t);await p.createLayout(this,{layoutName:e,layout:i})}async showLayout({layoutName:t}){}async getLayoutSnapshot(){return{layouts:await(0,u.mapValuesAsync)((t=>t.getFrameSnapshot()),c(this,l,"f"))}}async removeLayout({layoutName:t}){}getLayoutIdentityForView(t){const e=[...c(this,l,"f").values()].find((e=>e.getCurrentViews().some((e=>e.name===t.name&&e.uuid===t.uuid))));return e?.identity??void 0}isLayoutVisible({layoutName:t}){return c(p,r,"m",h).call(p,this,t).isVisible()}resolveLayoutIdentity(t){if(t&&"layoutName"in t)return t;const e=[...c(this,l,"f").values()];if(1===e.length)return e[0].identity;const i=e.find((t=>t.isVisible()));return i?.identity??void 0}static async resolveLayout(t,e){const i=t.resolveLayoutIdentity(e);if(void 0===i||!("layoutName"in i))throw new Error("[layout-manager] resolveLayout: Could not resolve the layout identity. Make sure you include 'layoutName' in the identity object.");return c(p,r,"m",h).call(p,t,i.layoutName)}static async handleSharedView(t,e,i){await(0,u.mapValuesAsync)((async t=>{if(t.identity.layoutName!==e.layoutName){const e=t.getCurrentViews().find((t=>t.name===i.name));e&&await t.onViewDetached({viewIdentity:e,target:null}).catch(console.error)}}),c(t,l,"f"))}static async handleLastViewRemoved(t,e){await t.removeLayout(e),await c(t,a,"f").handleLastViewRemoved(t)}static async destroyLayout(t,{layoutName:e}){await c(p,r,"m",h).call(p,t,e).destroy(),c(t,l,"f").delete(e)}static async createLayout(t,e){const{layoutName:i}=e;if(c(t,l,"f").has(i))throw new Error(`Layout name ${i} already exists`);await c(t,a,"f").createLayout(e,t)}static registerLayout(t,e,i){c(t,l,"f").set(e,i)}static getAllLayouts(t){return[...c(t,l,"f").values()]}static setInitialSnapshot(t,e){c(t,a,"f").setInitialSnapshot(e)}static createClosedConstructor(...t){return class extends p{constructor(){super(...t)}}}}m=i.DefaultLayoutManager=p,r=p,a=new WeakMap,l=new WeakMap,h=function(t,e){const i=c(t,l,"f").get(e);if(!i)throw new Error(`[layout-manager] getLayoutByName: Could not locate layout with name '${e}'`);return i};var g={},f={},v={};Object.defineProperty(v,"__esModule",{value:!0}),v.ReversibleMap=void 0;v.ReversibleMap=class{constructor(){this.valueToKey=new Map,this.keyToValue=new Map,this.setUnique=(t,e)=>{if(this.hasKey(t)||this.hasValue(e))throw new Error("Key or value already in the map.");this.keyToValue.set(t,e),this.valueToKey.set(e,t)},this.getKey=t=>{const e=this.valueToKey.get(t);if(!e)throw new Error("Value not found in the map.");return e},this.deleteKey=t=>{const e=this.getValue(t);return this.keyToValue.delete(t),this.valueToKey.delete(e),e},this.deleteValue=t=>{const e=this.getKey(t);return this.keyToValue.delete(e),this.valueToKey.delete(t),e},this.hasKey=t=>this.keyToValue.has(t),this.hasValue=t=>this.valueToKey.has(t)}getValue(t){const e=this.keyToValue.get(t);if(!e)throw new Error("Key not found in the map.");return e}},Object.defineProperty(f,"__esModule",{value:!0});var _=f.LayoutContentCache=void 0;const y=t.lazy,C=v;class w{constructor(){this.contentItemCache=new C.ReversibleMap,this.contentItemCacheId=0,this.createCacheKey=()=>{const t=`entity-${this.contentItemCacheId.toString()}`;return this.contentItemCacheId+=1,t},this.hasKey=t=>this.contentItemCache.hasKey(t),this.getItemOrUndefined=t=>{try{return this.getContentItemOrThrow(t)}catch(t){return}},this.getContentItemOrThrow=(t,e)=>{if(!this.contentItemCache.hasKey(t))throw new Error("Layout component has been destroyed or detached from the current layout.");const i=this.contentItemCache.getValue(t);if(e&&!e.includes(i.type))throw new Error(`Layout item is not the expected type. Expected ${e.join(", ")}, got ${i.type}.`);return i},this.getOrCreateEntityId=t=>{if(this.contentItemCache.hasValue(t))return this.contentItemCache.getKey(t);t.onDestroyed((()=>{this.contentItemCache.deleteValue(t)}));const e=this.createCacheKey();return this.contentItemCache.setUnique(e,t),e}}static getSingleInstance(){return w.singleton.getValue()}}_=f.LayoutContentCache=w,w.singleton=new y.Lazy((()=>new w));var I={},b={};!function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.getAdjacentStacks=t.doShareEdge=t.getAdjacentItem=void 0;t.getAdjacentItem=(e,i)=>{const{parent:n}=e;if(e.isRoot()||!n)return;const o=["top","bottom"].includes(i)?"column":"row",s=["top","left"].includes(i)?-1:1;if(n.type===o){const t=n.contentItems.indexOf(e)+s;if(t>=0&&t{const n=t.getBounds(),o=e.getBounds();if(!n||!o)return!1;if(["top","bottom"].includes(i)){return!(n.righto.right)}return!(n.bottomo.bottom)};t.getAdjacentStacks=(e,i)=>{const n=["top","bottom"].includes(i)?"row":"column",o=s=>"stack"===s.type?(0,t.doShareEdge)(e,s,i)?[s]:[]:"root"===s.type||"ground"===s.type?[]:s.type===n?s.contentItems.map((t=>o(t))).flat():s.type!==n?["top","right"].includes(i)?o(s.contentItems[s.contentItems.length-1]):o(s.contentItems[0]):[],s=(0,t.getAdjacentItem)(e,i);return s?o(s):[]}}(b);var S=t.commonjsGlobal&&t.commonjsGlobal.__decorate||function(t,e,i,n){var o,s=arguments.length,r=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(s<3?o(r):s>3?o(e,i,r):o(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};Object.defineProperty(I,"__esModule",{value:!0}),I.LayoutEntitiesController=void 0;const E=t.decorators,x=b,L=i;class z{constructor(t,e,i){this.wire=t,this.layoutManager=e,this.layoutContentCache=i,this.analytics=t=>{this.wire.sendAction(`layout-controller-${t}`).catch((()=>{}))},this.getLayoutIdentityForViewOrThrow=async t=>{const e=this.layoutManager.getLayoutIdentityForView(t);if(!e)throw new Error(`View identity ${t.name} is not attached to any layouts.`);return e},this.getRoot=async t=>{this.analytics("get-root");const e=(await this.getLayout(t)).getRoot();return{type:e.type,entityId:this.layoutContentCache.getOrCreateEntityId(e)}},this.getStackByView=async t=>{this.analytics("get-stack-by-view");const e=await this.getLayoutIdentityForViewOrThrow(t),i=(await this.getLayout(e)).getStackByView(t);if("stack"===i?.type)return{entityId:this.layoutContentCache.getOrCreateEntityId(i),type:"stack"}},this.getStackViews=t=>{this.analytics("get-stack-views");return this.layoutContentCache.getContentItemOrThrow(t,["stack"]).contentItems.map((t=>({name:t.viewName,uuid:this.wire.me.uuid})))},this.isRoot=t=>{this.analytics("is-root");return this.layoutContentCache.getContentItemOrThrow(t).isRoot()},this.exists=t=>(this.analytics("exists"),this.layoutContentCache.hasKey(t)),this.addViewToStack=async(t,e,{index:i}={index:0})=>{this.analytics("add-view-to-stack");const n=this.layoutContentCache.getContentItemOrThrow(t);if(i&&i>n.contentItems.length+1)throw new Error(`Index '${i}' out of range, please exclude the index or specify a number between 0 and ${n.contentItems.length}`);const o={id:t,index:i},{identity:s}=await n.layout.platformCreateView(e,{location:o});return s},this.findViewInStack=(t,e)=>t.contentItems.find((t=>t.viewName===e.name)),this.removeViewFromStack=async(t,e)=>{this.analytics("remove-view-from-stack");const i=this.layoutContentCache.getContentItemOrThrow(t,["stack"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to remove a view ('${e.name}') which does not belong to the stack.`);await n.layout.platformCloseView(e)},this.createAdjacentStack=async(t,e,{position:i="right"}={})=>{if(this.analytics("create-adjacent-stack"),!Array.isArray(e)||0===e.length)throw new Error('The parameter "views" must be an array with at least 1 element.');if(!["top","bottom","left","right"].includes(i))throw new Error(`Invalid position '${i}' specified.`);const n=this.layoutContentCache.getContentItemOrThrow(t).createAdjacentStack({position:i}),o=this.layoutContentCache.getOrCreateEntityId(n);return await Promise.all(e.reverse().map((t=>this.addViewToStack(o,t)))),o},this.getAdjacentStacks=async({targetId:t,edge:e})=>{this.analytics("get-adjacent-stacks");const i=this.layoutContentCache.getContentItemOrThrow(t);return(0,x.getAdjacentStacks)(i,e).map((t=>({entityId:this.layoutContentCache.getOrCreateEntityId(t)})))},this.setStackActiveView=async(t,e)=>{this.analytics("set-stack-active-view");const i=this.layoutContentCache.getContentItemOrThrow(t,["stack"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to set a view ('${e.name}') as active when it does not belong to the stack.`);i.setActiveContentItem(n,!0)}}async getLayout(t){const e=await L.DefaultLayoutManager.resolveLayout(this.layoutManager,t);if(!e)throw new Error(`Could not resolve target layout identity ${JSON.stringify(t)}`);return e}getContent(t){this.analytics("get-content");return this.layoutContentCache.getContentItemOrThrow(t,["column","row"]).contentItems.map((t=>({type:t.type,entityId:this.layoutContentCache.getOrCreateEntityId(t)})))}getParent(t){this.analytics("get-parent");const e=this.layoutContentCache.getContentItemOrThrow(t);if(!e.isRoot())return e.parent?.contentItems.includes(e)?{type:e.parent.type,entityId:this.layoutContentCache.getOrCreateEntityId(e.parent)}:void 0}}S([(0,E.expose)()],z.prototype,"getLayoutIdentityForViewOrThrow",void 0),S([(0,E.expose)()],z.prototype,"getRoot",void 0),S([(0,E.expose)()],z.prototype,"getStackByView",void 0),S([(0,E.expose)()],z.prototype,"getStackViews",void 0),S([(0,E.expose)()],z.prototype,"getContent",null),S([(0,E.expose)()],z.prototype,"getParent",null),S([(0,E.expose)()],z.prototype,"isRoot",void 0),S([(0,E.expose)()],z.prototype,"exists",void 0),S([(0,E.expose)()],z.prototype,"addViewToStack",void 0),S([(0,E.expose)()],z.prototype,"removeViewFromStack",void 0),S([(0,E.expose)()],z.prototype,"createAdjacentStack",void 0),S([(0,E.expose)()],z.prototype,"getAdjacentStacks",void 0),S([(0,E.expose)()],z.prototype,"setStackActiveView",void 0),I.LayoutEntitiesController=z,Object.defineProperty(g,"__esModule",{value:!0});var M=g.initLayoutEndpoints=void 0;const P=t.apiExposer,T=t.layout_constants,A=f,k=I,D=i;M=g.initLayoutEndpoints=async function(t,e){const i=t.getFin(),n=await i.Platform.getCurrentSync().getClient(),o=new P.ChannelsExposer(n);await new P.ApiExposer(o).exposeInstance(new k.LayoutEntitiesController(t,e,A.LayoutContentCache.getSingleInstance()),{id:T.LAYOUT_CONTROLLER_ID}),await async function(t,e){const i=t=>async i=>{const n=await D.DefaultLayoutManager.resolveLayout(e,i.target);if(!n)throw new Error(`Could not resolve the layout target from payload ${JSON.stringify(i)}`);return t(n,i)},n=(e,n)=>{t.register(e,i(n))},o=(t,e)=>{n(t,e)};n("replace-view",((t,e)=>t.replaceView(e))),n("replace-layout",((t,{layout:e})=>t.replaceLayout(e))),n("add-view",((t,e)=>t.insertView(e))),o("layout-add-view",((t,{viewOptions:e,location:i,targetView:n})=>t.platformCreateView(e,{location:i,targetView:n}))),n("close-view",((t,e)=>t.cleanupView(e.viewIdentity))),o("layout-close-view",((t,e)=>t.platformCloseView(e.viewIdentity))),n("apply-preset-layout",((t,e)=>t.applyPreset(e))),n("get-layout-views",(t=>t.getCurrentViews())),n("get-frame-snapshot",(t=>t.getFrameSnapshot())),n("is-visible",(t=>t.isVisible())),n("destroy",(t=>t.destroy())),t.register("get-layout-snapshot",(()=>e.getLayoutSnapshot()))}(n,e)};var R={};Object.defineProperty(R,"__esModule",{value:!0});var U=R.BaseLayout=void 0;U=R.BaseLayout=class{};var O={};Object.defineProperty(O,"__esModule",{value:!0});var V=O.DOMEmitter=void 0;V=O.DOMEmitter=class{constructor(t){this.container=t}dispatchLocalEvent(t,e){const i={...e,type:t,tabSelector:`tab-${e.name}`,containerSelector:`container-${e.name}`,topic:"openfin-DOM-event"};this.container.dispatchEvent(new CustomEvent(t,{detail:i}))}};var B={};Object.defineProperty(B,"__esModule",{value:!0});var H=B.mapLayoutContentItemsImmutableSync=B.mapLayoutContentItemsImmutable=W=B.isVisible=void 0;var W=B.isVisible=t=>(0!==t.offsetWidth||0!==t.offsetHeight)&&"hidden"!==window.getComputedStyle(t).visibility&&t.offsetTop>=0&&t.offsetLeft>=0&&t.offsetTop<=window.innerHeight&&t.offsetLeft<=window.innerWidth;const F=t=>"type"in t&&"component"===t.type;B.mapLayoutContentItemsImmutable=async function t(e,i){return F(i)?e(i):{...i,content:await Promise.all(i.content?.map((i=>t(e,i))))}},H=B.mapLayoutContentItemsImmutableSync=function t(e,i){return F(i)?e(i):{...i,content:i.content?.map((i=>t(e,i)))}};class N extends Error{constructor(t,e){super(e),this.type=t}}class G extends N{constructor(t,e){super("Configuration",t),this.node=e}}class j extends N{constructor(t){super("PopoutBlocked",t)}}class $ extends N{constructor(t){super("API",t)}}class Z extends N{constructor(t){super("Bind",t)}}class q extends Error{constructor(t,e,i){super(`${t}: ${e}${void 0===i?"":": "+i}`)}}class X extends q{constructor(t,e){super("Assert",t,e)}}class Y extends q{constructor(t,e,i){super("UnreachableCase",t,`${e}${void 0===i?"":": "+i}`)}}class K extends q{constructor(t,e){super("UnexpectedNull",t,e)}}class J extends q{constructor(t,e){super("UnexpectedUndefined",t,e)}}var Q;!function(t){let e=!1;const i={PopoutCannotBeCreatedWithGroundItemConfig:{id:0,default:"Popout cannot be created with ground ItemConfig"},PleaseRegisterAConstructorFunction:{id:1,default:"Please register a constructor function"},ComponentTypeNotRegisteredAndBindComponentEventHandlerNotAssigned:{id:2,default:"Component type not registered and BindComponentEvent handler not assigned"},ComponentIsAlreadyRegistered:{id:3,default:"Component is already registered"},ComponentIsNotVirtuable:{id:4,default:"Component is not virtuable. Requires rootHtmlElement field/getter"},VirtualComponentDoesNotHaveRootHtmlElement:{id:5,default:'Virtual component does not have getter "rootHtmlElement"'},ItemConfigIsNotTypeComponent:{id:6,default:"ItemConfig is not of type component"},InvalidNumberPartInSizeString:{id:7,default:"Invalid number part in size string"},UnknownUnitInSizeString:{id:8,default:"Unknown unit in size string"},UnsupportedUnitInSizeString:{id:9,default:"Unsupported unit in size string"}};t.idCount=Object.keys(i).length;const n=Object.values(i);t.checkInitialise=function(){if(!e)for(let e=0;e="0"&&t<="9"}function Tt(t,e){const i=zt(e);t.style.width=i}function At(t,e){const i=zt(e);t.style.height=i}function kt(t){return{width:t.offsetWidth,height:t.offsetHeight}}function Dt(t,e){t.style.display=e?"":"none"}function Rt(t,e){if(void 0!==e)for(const i in e)if(e.hasOwnProperty(i)){const n=e[i],o=t[i];t[i]=Ut(o,n)}return t}function Ut(t,e){if("object"!=typeof e)return e;if(Array.isArray(e)){const t=e.length,i=new Array(t);for(let n=0;n36)throw new Error("Too many keys in config minifier map")},t.translateObject=n}(dt||(dt={})),function(t){t.defaults={type:at.ground,content:[],size:1,sizeUnit:ht.Fractional,minSize:void 0,minSizeUnit:ht.Pixel,id:"",isClosable:!0},t.createCopy=function(t,e){switch(t.type){case at.ground:case at.row:case at.column:return gt.createCopy(t,e);case at.stack:return ut.createCopy(t,e);case at.component:return pt.createCopy(t);default:throw new Y("CICC91354",t.type,"Invalid Config Item type specified")}},t.createDefault=function(t){switch(t){case at.ground:throw new X("CICCDR91562");case at.row:case at.column:return gt.createDefault(t);case at.stack:return ut.createDefault();case at.component:return pt.createDefault();default:throw new Y("CICCDD91563",t,"Invalid Config Item type specified")}},t.isComponentItem=function(t){return t.type===at.component},t.isStackItem=function(t){return t.type===at.stack},t.isGroundItem=function(t){return t.type===at.ground}}(ct||(ct={})),function(t){t.defaultMaximised=!1,function(t){t.createCopy=function(t,e){return void 0===t?void 0:{show:null!=e?e:t.show,popout:t.popout,close:t.close,maximise:t.maximise,minimise:t.minimise,tabDropdown:t.tabDropdown}}}(t.Header||(t.Header={}))}(mt||(mt={})),function(t){function e(t){const e=t.length,i=new Array(e);for(let n=0;n"__glMaximised"===t));t>0&&(o=!0,n=n.splice(t,1)),e=n.length>0?n[0]:ct.defaults.id}else e=n;return i=void 0!==t.maximised?t.maximised:o,{id:e,maximised:i}}}(wt||(wt={})),function(t){function e(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0;return{resolved:!0,root:Et.resolve(i),openPopouts:t.resolveOpenPopouts(e.openPopouts),dimensions:t.Dimensions.resolve(e.dimensions),settings:t.Settings.resolve(e.settings),header:t.Header.resolve(e.header,e.settings,e.labels)}}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:Lt.fromResolvedArray(e.openPopouts),settings:_t.Settings.createCopy(e.settings),dimensions:t.Dimensions.fromResolved(e.dimensions),header:_t.Header.createCopy(e.header)}},t.isResolved=function(t){const e=t;return void 0!==e.resolved&&!0===e.resolved},t.resolveOpenPopouts=function(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0,{root:Et.resolve(o),openPopouts:xt.resolveOpenPopouts(e.openPopouts),dimensions:xt.Dimensions.resolve(e.dimensions),settings:xt.Settings.resolve(e.settings),header:xt.Header.resolve(e.header,e.settings,e.labels),parentId:null!==(i=e.parentId)&&void 0!==i?i:null,indexInParent:null!==(n=e.indexInParent)&&void 0!==n?n:null,window:t.Window.resolve(e.window,e.dimensions),resolved:!0}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:i(e.openPopouts),dimensions:xt.Dimensions.fromResolved(e.dimensions),settings:_t.Settings.createCopy(e.settings),header:_t.Header.createCopy(e.header),parentId:e.parentId,indexInParent:e.indexInParent,window:t.Window.fromResolved(e.window)}},t.fromResolvedArray=i}(Lt||(Lt={}));class Wt{constructor(){this._allEventSubscriptions=[],this._subscriptionsMap=new Map,this.unbind=this.removeEventListener,this.trigger=this.emit}tryBubbleEvent(t,e){}emit(t,...e){let i=this._subscriptionsMap.get(t);if(void 0!==i){i=i.slice();for(let t=0;t0){const n=e.slice();n.unshift(t);const o=this._allEventSubscriptions.slice();for(let t=0;t0?n.contentItems[0]:n,e=0);const o=this._layoutManager.createAndInitContentItem(i,t);t.addChild(o,e),this._layoutManager.layoutConfig.settings.popInOnClose?this._onClose():this.close()}createWindow(){const t=this.createUrl(),e=Math.floor(1e6*Math.random()).toString(36),i=this.serializeWindowFeatures({width:this._initialWindowSize.width,height:this._initialWindowSize.height,innerWidth:this._initialWindowSize.width,innerHeight:this._initialWindowSize.height,menubar:"no",toolbar:"no",location:"no",personalbar:"no",resizable:"yes",scrollbars:"no",status:"no"});if(this._popoutWindow=globalThis.open(t,e,i),this._popoutWindow)this._popoutWindow.addEventListener("load",(()=>this.positionWindow()),{passive:!0}),this._popoutWindow.addEventListener("beforeunload",(()=>{this._layoutManager.layoutConfig.settings.popInOnClose?this.popIn():this._onClose()}),{passive:!0}),this._checkReadyInterval=setInterval((()=>this.checkReady()),10);else if(!0===this._layoutManager.layoutConfig.settings.blockedPopoutsThrowError){throw new j("Popout blocked")}}checkReady(){if(null===this._popoutWindow)throw new K("BPCR01844");this._popoutWindow.__glInstance&&this._popoutWindow.__glInstance.isInitialised&&(this.onInitialised(),void 0!==this._checkReadyInterval&&(clearInterval(this._checkReadyInterval),this._checkReadyInterval=void 0))}serializeWindowFeatures(t){const e=[];for(const i in t)e.push(i+"="+t[i].toString());return e.join(",")}createUrl(){const t="gl-window-config-"+Ot(),e=_t.minifyConfig(this._config);try{localStorage.setItem(t,JSON.stringify(e))}catch(t){throw new Error("Error while writing to localStorage "+function(t){return t instanceof Error?t.message:"string"==typeof t?t:"Unknown Error"}(t))}const i=new URL(location.href);return i.searchParams.set("gl-window",t),i.toString()}positionWindow(){if(null===this._popoutWindow)throw new Error("BrowserPopout.positionWindow: null popoutWindow");this._popoutWindow.moveTo(this._initialWindowSize.left,this._initialWindowSize.top),this._popoutWindow.focus()}onInitialised(){this._isInitialised=!0,this.getGlInstance().on("popIn",(()=>this.popIn())),this.emit("initialised")}_onClose(){setTimeout((()=>this.emit("closed")),50)}}class Gt extends Wt{constructor(t,e,i,n){super(),this.layoutManager=t,this._parent=i,this._element=n,this._popInParentIds=[],this._type=e.type,this._id=e.id,this._isInitialised=!1,this.isGround=!1,this.isRow=!1,this.isColumn=!1,this.isStack=!1,this.isComponent=!1,this.size=e.size,this.sizeUnit=e.sizeUnit,this.minSize=e.minSize,this.minSizeUnit=e.minSizeUnit,this._isClosable=e.isClosable,this._pendingEventPropagations={},this._throttledEvents=["stateChanged"],this._contentItems=this.createContentItems(e.content)}get type(){return this._type}get id(){return this._id}set id(t){this._id=t}get popInParentIds(){return this._popInParentIds}get parent(){return this._parent}get contentItems(){return this._contentItems}get isClosable(){return this._isClosable}get element(){return this._element}get isInitialised(){return this._isInitialised}static isStack(t){return t.isStack}static isComponentItem(t){return t.isComponent}static isComponentParentableItem(t){return t.isStack||t.isGround}removeChild(t,e=!1){const i=this._contentItems.indexOf(t);if(-1===i)throw new Error("Can't remove child item. Unknown content item");if(e||this._contentItems[i].destroy(),this._contentItems.splice(i,1),this._contentItems.length>0)this.updateSize(!1);else if(!this.isGround&&!0===this._isClosable){if(null===this._parent)throw new K("CIUC00874");this._parent.removeChild(this)}}addChild(t,e,i){return null!=e||(e=this._contentItems.length),this._contentItems.splice(e,0,t),t.setParent(this),!0===this._isInitialised&&!1===t._isInitialised&&t.init(),e}replaceChild(t,e,i=!1){const n=this._contentItems.indexOf(t),o=t._element.parentNode;if(-1===n)throw new X("CIRCI23232","Can't replace child. oldChild is not child of this");if(null===o)throw new K("CIRCP23232");if(o.replaceChild(e._element,t._element),!0===i&&(t._parent=null,t.destroy()),this._contentItems[n]=e,e.setParent(this),e.size=t.size,e.sizeUnit=t.sizeUnit,e.minSize=t.minSize,e.minSizeUnit=t.minSizeUnit,null===e._parent)throw new K("CIRCNC45699");!0===e._parent._isInitialised&&!1===e._isInitialised&&e.init(),this.updateSize(!1)}remove(){if(null===this._parent)throw new K("CIR11110");this._parent.removeChild(this)}popout(){const t=Ot(),e=this.layoutManager.createPopoutFromContentItem(this,void 0,t,void 0);return this.emitBaseBubblingEvent("stateChanged"),e}calculateConfigContent(){const t=this._contentItems,e=t.length,i=new Array(e);for(let n=0;nthis.propagateEventToLayoutManager(t,e))))}propagateEventToLayoutManager(t,e){this._pendingEventPropagations[t]=!1,this.layoutManager.emitUnknown(t,e)}}class jt extends Gt{constructor(t,e,i){super(t,e,i,document.createElement("div")),this._parentItem=i,this._focused=!1,this.isComponent=!0,this._reorderEnabled=e.reorderEnabled,this.applyUpdatableConfig(e),this._initialWantMaximise=e.maximised;const n=document.createElement("div");n.classList.add("lm_content"),this.element.appendChild(n),this._container=new Ft(e,this,t,n,(t=>this.handleUpdateItemConfigEvent(t)),(()=>this.show()),(()=>this.hide()),(t=>this.focus(t)),(t=>this.blur(t)))}get componentName(){return this._container.componentType}get componentType(){return this._container.componentType}get reorderEnabled(){return this._reorderEnabled}get initialWantMaximise(){return this._initialWantMaximise}get component(){return this._container.component}get container(){return this._container}get parentItem(){return this._parentItem}get headerConfig(){return this._headerConfig}get title(){return this._title}get tab(){return this._tab}get focused(){return this._focused}destroy(){this._container.destroy(),super.destroy()}applyUpdatableConfig(t){this.setTitle(t.title),this._headerConfig=t.header}toConfig(){const t=this._container.stateRequestEvent,e=void 0===t?this._container.state:t();return{type:at.component,content:[],size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,maximised:!1,isClosable:this.isClosable,reorderEnabled:this._reorderEnabled,title:this._title,header:mt.Header.createCopy(this._headerConfig),componentType:pt.copyComponentType(this.componentType),componentState:e}}close(){if(null===this.parent)throw new K("CIC68883");this.parent.removeChild(this,!1)}enterDragMode(t,e){Tt(this.element,t),At(this.element,e),this._container.enterDragMode(t,e)}exitDragMode(){this._container.exitDragMode()}enterStackMaximised(){this._container.enterStackMaximised()}exitStackMaximised(){this._container.exitStackMaximised()}drag(){this._container.drag()}updateSize(t){this.updateNodeSize(t)}init(){this.updateNodeSize(!1),super.init(),this._container.emit("open"),this.initContentItems()}setTitle(t){this._title=t,this.emit("titleChanged",t),this.emit("stateChanged")}setTab(t){this._tab=t,this.emit("tab",t),this._container.setTab(t)}hide(){super.hide(),this._container.setVisibility(!1)}show(){super.show(),this._container.setVisibility(!0)}focus(t=!1){this.parentItem.setActiveComponentItem(this,!0,t)}setFocused(t){this._focused=!0,this.tab.setFocused(),t||this.emitBaseBubblingEvent("focus")}blur(t=!1){this._focused&&this.layoutManager.setFocusedComponentItem(void 0,t)}setBlurred(t){this._focused=!1,this.tab.setBlurred(),t||this.emitBaseBubblingEvent("blur")}setParent(t){this._parentItem=t,super.setParent(t)}handleUpdateItemConfigEvent(t){this.applyUpdatableConfig(t)}updateNodeSize(t){if("none"!==this.element.style.display){const{width:e,height:i}=kt(this.element);this._container.setSizeToNodeSize(e,i,t)}}}class $t extends Gt{constructor(){super(...arguments),this._focused=!1}get focused(){return this._focused}setFocusedValue(t){this._focused=t}}class Zt extends Wt{constructor(t,e){super(),this._eElement=t,this._pointerTracking=!1,this._pointerDownEventListener=t=>this.onPointerDown(t),this._pointerMoveEventListener=t=>this.onPointerMove(t),this._pointerUpEventListener=t=>this.onPointerUp(t),this._timeout=void 0,this._allowableTargets=[t,...e],this._oDocument=document,this._eBody=document.body,this._nDelay=1800,this._nDistance=10,this._nX=0,this._nY=0,this._nOriginalX=0,this._nOriginalY=0,this._dragging=!1,this._eElement.addEventListener("pointerdown",this._pointerDownEventListener,{passive:!0})}destroy(){this.checkRemovePointerTrackingEventListeners(),this._eElement.removeEventListener("pointerdown",this._pointerDownEventListener)}cancelDrag(){this.processDragStop(void 0)}onPointerDown(t){if(this._allowableTargets.includes(t.target)&&t.isPrimary){const e=this.getPointerCoordinates(t);this.processPointerDown(e)}}processPointerDown(t){this._nOriginalX=t.x,this._nOriginalY=t.y,this._oDocument.addEventListener("pointermove",this._pointerMoveEventListener),this._oDocument.addEventListener("pointerup",this._pointerUpEventListener,{passive:!0}),this._pointerTracking=!0,this._timeout=setTimeout((()=>{try{this.startDrag()}catch(t){throw console.error(t),t}}),this._nDelay)}onPointerMove(t){this._pointerTracking&&(this.processDragMove(t),t.preventDefault())}processDragMove(t){this._nX=t.pageX-this._nOriginalX,this._nY=t.pageY-this._nOriginalY,!1===this._dragging&&(Math.abs(this._nX)>this._nDistance||Math.abs(this._nY)>this._nDistance)&&this.startDrag(),this._dragging&&this.emit("drag",this._nX,this._nY,t)}onPointerUp(t){this.processDragStop(t)}processDragStop(t){var e;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this.checkRemovePointerTrackingEventListeners(),!0===this._dragging&&(this._eBody.classList.remove("lm_dragging"),this._eElement.classList.remove("lm_dragging"),null===(e=this._oDocument.querySelector("iframe"))||void 0===e||e.style.setProperty("pointer-events",""),this._dragging=!1,this.emit("dragStop",t))}checkRemovePointerTrackingEventListeners(){this._pointerTracking&&(this._oDocument.removeEventListener("pointermove",this._pointerMoveEventListener),this._oDocument.removeEventListener("pointerup",this._pointerUpEventListener),this._pointerTracking=!1)}startDrag(){var t;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this._dragging=!0,this._eBody.classList.add("lm_dragging"),this._eElement.classList.add("lm_dragging"),null===(t=this._oDocument.querySelector("iframe"))||void 0===t||t.style.setProperty("pointer-events","none"),this.emit("dragStart",this._nOriginalX,this._nOriginalY)}getPointerCoordinates(t){return{x:t.pageX,y:t.pageY}}}class qt{constructor(t,e,i){this._isVertical=t,this._size=e,this._grabSize=i0){const i=this.createSplitter(Math.max(0,e-1)).element;e>0?(this.contentItems[e-1].element.insertAdjacentElement("afterend",i),i.insertAdjacentElement("afterend",t.element)):(this.contentItems[0].element.insertAdjacentElement("beforebegin",i),i.insertAdjacentElement("beforebegin",t.element))}else this._childElementContainer.appendChild(t.element);super.addChild(t,e);const n=1/this.contentItems.length*100;if(!0===i)return this.emitBaseBubblingEvent("stateChanged"),e;for(let e=0;e0&&(this.calculateRelativeSizes(),this.setAbsoluteSizes()),this.emitBaseBubblingEvent("stateChanged"),this.emit("resize")}setAbsoluteSizes(){const t=this.calculateAbsoluteSizes();for(let e=0;e0&&t.itemSizes[e]++,this._isColumn?(Tt(this.contentItems[e].element,t.crossAxisSize),At(this.contentItems[e].element,t.itemSizes[e])):(Tt(this.contentItems[e].element,t.itemSizes[e]),At(this.contentItems[e].element,t.crossAxisSize))}calculateAbsoluteSizes(){const t=(this.contentItems.length-1)*this._splitterSize,{width:e,height:i}=kt(this.element);let n,o;this._isColumn?(n=i-t,o=e):(n=e-t,o=i);let s=0;const r=[];for(let t=0;t0){const n=100-t;for(let t=0;t100&&e.length>0){for(let t=0;te)return;{const r=i/e;let a=i;for(let e=0;ethis.onSplitterDrag(e,t,i))),e.on("dragStop",(()=>this.onSplitterDragStop(e))),e.on("dragStart",(()=>this.onSplitterDragStart(e))),this._splitter.splice(t,0,e),e}getSplitItems(t){const e=this._splitter.indexOf(t);return{before:this.contentItems[e],after:this.contentItems[e+1]}}calculateContentItemMinSize(t){const e=t.minSize;if(void 0!==e){if(t.minSizeUnit===ht.Pixel)return e;throw new X("ROCGMD98831",JSON.stringify(t))}{const t=this.layoutManager.layoutConfig.dimensions;return this._isColumn?t.defaultMinItemHeight:t.defaultMinItemWidth}}calculateContentItemsTotalMinSize(t){let e=0;for(const i of t)e+=this.calculateContentItemMinSize(i);return e}onSplitterDragStart(t){const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=this.calculateContentItemsTotalMinSize(e.before.contentItems),s=this.calculateContentItemsTotalMinSize(e.after.contentItems);this._splitterPosition=0,this._splitterMinPosition=-1*(i-o),this._splitterMaxPosition=n-s}onSplitterDrag(t,e,i){let n=this._isColumn?i:e;if(null===this._splitterMinPosition||null===this._splitterMaxPosition)throw new K("ROCOSD59226");n=Math.max(n,this._splitterMinPosition),n=Math.min(n,this._splitterMaxPosition),this._splitterPosition=n;const o=zt(n);this._isColumn?t.element.style.top=o:t.element.style.left=o}onSplitterDragStop(t){if(null===this._splitterPosition)throw new K("ROCOSDS66932");{const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=(this._splitterPosition+i)/(i+n),s=e.before.size+e.after.size;e.before.size=o*s,e.after.size=(1-o)*s,t.element.style.top=zt(0),t.element.style.left=zt(0),globalThis.requestAnimationFrame((()=>this.updateSize(!1)))}}}!function(t){t.getElementDimensionSize=function(t,e){return"width"===e?function(t){return t.offsetWidth}(t):function(t){return t.offsetHeight}(t)},t.setElementDimensionSize=function(t,e,i){return"width"===e?Tt(t,i):At(t,i)},t.createElement=function(t,e){const i=t.createElement("div");return i.classList.add("lm_item"),e?i.classList.add("lm_column"):i.classList.add("lm_row"),i}}(Xt||(Xt={}));class Yt extends $t{constructor(t,e,i){super(t,vt.create(e),null,Yt.createElement(document)),this.isGround=!0,this._childElementContainer=this.element,this._containerElement=i;let n=null;for(;;){const t=n?n.previousSibling:this._containerElement.lastChild;if(!(t instanceof Element&&t.classList.contains("lm_content")))break;n=t}this._containerElement.insertBefore(this.element,n)}init(){if(!0!==this.isInitialised){this.updateNodeSize();for(let t=0;t0?this.contentItems[0]:this,n.isComponent)throw new Error("Cannot add item as child to ComponentItem");{const t=this.layoutManager.createAndInitContentItem(i,n);return e=n.addChild(t,e),n===this?-1:e}}loadComponentAsRoot(t){this.clearRoot();const e=Ct.resolve(t,!1);if(e.maximised)throw new Error("Root Component cannot be maximised");{const t=new jt(this.layoutManager,e,this);t.init(),this.addChild(t,0)}}addChild(t,e){if(this.contentItems.length>0)throw new Error("Ground node can only have a single child");return this._childElementContainer.appendChild(t.element),e=super.addChild(t,e),this.updateSize(!1),this.emitBaseBubblingEvent("stateChanged"),e}calculateConfigContent(){const t=this.contentItems,e=t.length,i=new Array(e);for(let n=0;n0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e)),this.updateContentItemsSize(!1))}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}createSideAreas(){const t=Yt.Area.oppositeSides,e=new Array(Object.keys(t).length);let i=0;for(const n in t){const o=n,s=this.getElementArea();if(null===s)throw new K("RCSA77553");s.side=o,"2"===t[o][1]?s[o]=s[t[o]]-50:s[o]=s[t[o]]+50,s.surface=(s.x2-s.x1)*(s.y2-s.y1),e[i++]=s}return e}highlightDropZone(t,e,i){this.layoutManager.tabDropPlaceholder.remove(),super.highlightDropZone(t,e,i)}onDrop(t,e){if(t.isComponent){const e=ut.createDefault(),i=t;e.header=mt.Header.createCopy(i.headerConfig);const n=this.layoutManager.createAndInitContentItem(e,this);n.addChild(t),t=n}if(0===this.contentItems.length)this.addChild(t);else{if(t.type===at.row||t.type===at.column){const e=ut.createDefault(),i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}const i="x"==e.side[0]?at.row:at.column,n="2"==e.side[1],o=this.contentItems[0];if(o instanceof Xt&&o.type===i){const e=o.contentItems[n?0:o.contentItems.length-1];o.addChild(t,n?0:void 0,!0),e.size*=.5,t.size=e.size,t.sizeUnit=ht.Percent,o.updateSize(!1)}else{const e=ct.createDefault(i),s=this.layoutManager.createContentItem(e,this);this.replaceChild(o,s),s.addChild(t,n?0:void 0,!0),s.addChild(o,n?void 0:0,!0),o.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}}dock(){throw new X("GID87731")}validateDocking(){throw new X("GIVD87732")}getAllContentItems(){const t=[this];return this.deepGetAllContentItems(this.contentItems,t),t}getConfigMaximisedItems(){const t=[];return this.deepFilterContentItems(this.contentItems,t,(t=>!(!Gt.isStack(t)||!t.initialWantMaximise)||!(!Gt.isComponentItem(t)||!t.initialWantMaximise))),t}getItemsByPopInParentId(t){const e=[];return this.deepFilterContentItems(this.contentItems,e,(e=>e.popInParentIds.includes(t))),e}toConfig(){throw new Error("Cannot generate GroundItem config")}setActiveComponentItem(t,e,i){}updateNodeSize(){const{width:t,height:e}=kt(this._containerElement);Tt(this.element,t),At(this.element,e),this.contentItems.length>0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e))}deepGetAllContentItems(t,e){for(let i=0;ithis.onClick(t),this._touchStartEventListener=t=>this.onTouchStart(t),this._element=document.createElement("div"),this._element.classList.add(i),this._element.title=e,this._header.on("destroy",(()=>this.destroy())),this._element.addEventListener("click",this._clickEventListener,{passive:!0}),this._element.addEventListener("touchstart",this._touchStartEventListener,{passive:!0}),this._header.controlsContainerElement.appendChild(this._element)}get element(){return this._element}destroy(){var t;this._element.removeEventListener("click",this._clickEventListener),this._element.removeEventListener("touchstart",this._touchStartEventListener),null===(t=this._element.parentNode)||void 0===t||t.removeChild(this._element)}onClick(t){this._pushEvent(t)}onTouchStart(t){this._pushEvent(t)}}class Jt{constructor(t,e,i,n,o){var s;this._layoutManager=t,this._componentItem=e,this._closeEvent=i,this._focusEvent=n,this._dragStartEvent=o,this._isActive=!1,this._tabClickListener=t=>this.onTabClickDown(t),this._tabTouchStartListener=t=>this.onTabTouchStart(t),this._closeClickListener=()=>this.onCloseClick(),this._closeTouchStartListener=()=>this.onCloseTouchStart(),this._dragStartListener=(t,e)=>this.onDragStart(t,e),this._contentItemDestroyListener=()=>this.onContentItemDestroy(),this._tabTitleChangedListener=t=>this.setTitle(t),this._element=document.createElement("div"),this._element.classList.add("lm_tab"),this._titleElement=document.createElement("span"),this._titleElement.classList.add("lm_title"),this._closeElement=document.createElement("div"),this._closeElement.classList.add("lm_close_tab"),this._element.appendChild(this._titleElement),this._element.appendChild(this._closeElement),e.isClosable?this._closeElement.style.display="":this._closeElement.style.display="none",this.setTitle(e.title),this._componentItem.on("titleChanged",this._tabTitleChangedListener);(null!==(s=e.reorderEnabled)&&void 0!==s?s:this._layoutManager.layoutConfig.settings.reorderEnabled)&&this.enableReorder(),this._element.addEventListener("click",this._tabClickListener,{passive:!0}),this._element.addEventListener("touchstart",this._tabTouchStartListener,{passive:!0}),this._componentItem.isClosable?(this._closeElement.addEventListener("click",this._closeClickListener,{passive:!0}),this._closeElement.addEventListener("touchstart",this._closeTouchStartListener,{passive:!0})):(this._closeElement.remove(),this._closeElement=void 0),this._componentItem.setTab(this),this._layoutManager.emit("tabCreated",this)}get isActive(){return this._isActive}get componentItem(){return this._componentItem}get contentItem(){return this._componentItem}get element(){return this._element}get titleElement(){return this._titleElement}get closeElement(){return this._closeElement}get reorderEnabled(){return void 0!==this._dragListener}set reorderEnabled(t){t!==this.reorderEnabled&&(t?this.enableReorder():this.disableReorder())}setTitle(t){this._titleElement.innerText=t,this._element.title=t}setActive(t){t!==this._isActive&&(this._isActive=t,t?this._element.classList.add("lm_active"):this._element.classList.remove("lm_active"))}destroy(){var t,e;this._closeEvent=void 0,this._focusEvent=void 0,this._dragStartEvent=void 0,this._element.removeEventListener("click",this._tabClickListener),this._element.removeEventListener("touchstart",this._tabTouchStartListener),null===(t=this._closeElement)||void 0===t||t.removeEventListener("click",this._closeClickListener),null===(e=this._closeElement)||void 0===e||e.removeEventListener("touchstart",this._closeTouchStartListener),this._componentItem.off("titleChanged",this._tabTitleChangedListener),this.reorderEnabled&&this.disableReorder(),this._element.remove()}setBlurred(){this._element.classList.remove("lm_focused"),this._titleElement.classList.remove("lm_focused")}setFocused(){this._element.classList.add("lm_focused"),this._titleElement.classList.add("lm_focused")}onDragStart(t,e){if(void 0===this._dragListener)throw new J("TODSDLU10093");if(void 0===this._dragStartEvent)throw new J("TODS23309");this._dragStartEvent(t,e,this._dragListener,this.componentItem)}onContentItemDestroy(){void 0!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=void 0)}onTabClickDown(t){const e=t.target;e!==this._element&&e!==this._titleElement||(0===t.button?this.notifyFocus():1===t.button&&this._componentItem.isClosable&&this.notifyClose())}onTabTouchStart(t){t.target===this._element&&this.notifyFocus()}onCloseClick(){this.notifyClose()}onCloseTouchStart(){this.notifyClose()}notifyClose(){if(void 0===this._closeEvent)throw new J("TNC15007");this._closeEvent(this._componentItem)}notifyFocus(){if(void 0===this._focusEvent)throw new J("TNA15007");this._focusEvent(this._componentItem)}enableReorder(){this._dragListener=new Zt(this._element,[this._titleElement]),this._dragListener.on("dragStart",this._dragStartListener),this._componentItem.on("destroy",this._contentItemDestroyListener)}disableReorder(){if(void 0===this._dragListener)throw new J("TDR87745");this._componentItem.off("destroy",this._contentItemDestroyListener),this._dragListener.off("dragStart",this._dragStartListener),this._dragListener=void 0}}class Qt{constructor(t,e,i,n,o){this._layoutManager=t,this._componentRemoveEvent=e,this._componentFocusEvent=i,this._componentDragStartEvent=n,this._dropdownActiveChangedEvent=o,this._tabs=[],this._lastVisibleTabIndex=-1,this._dropdownActive=!1,this._element=document.createElement("section"),this._element.classList.add("lm_tabs"),this._dropdownElement=document.createElement("section"),this._dropdownElement.classList.add("lm_tabdropdown_list"),this._dropdownElement.style.display="none"}get tabs(){return this._tabs}get tabCount(){return this._tabs.length}get lastVisibleTabIndex(){return this._lastVisibleTabIndex}get element(){return this._element}get dropdownElement(){return this._dropdownElement}get dropdownActive(){return this._dropdownActive}destroy(){for(let t=0;tthis.handleTabCloseEvent(t)),(t=>this.handleTabFocusEvent(t)),((t,e,i,n)=>this.handleTabDragStartEvent(t,e,i,n)));void 0===e&&(e=this._tabs.length),this._tabs.splice(e,0,i),ethis._lastVisibleTabIndex){const t=this._tabs[e];for(let t=e;t>0;t--)this._tabs[t]=this._tabs[t-1];this._tabs[0]=t}}updateTabSizes(t,e){let i=!1;this.tryUpdateTabSizes(i,t,e)||(i=!0,this.tryUpdateTabSizes(i,t,e)),i!==this._dropdownActive&&(this._dropdownActive=i,this._dropdownActiveChangedEvent())}tryUpdateTabSizes(t,e,i){if(this._tabs.length>0){if(void 0===i)throw new Error("non-empty tabs must have active component item");let n=0,o=!1;const s=this._layoutManager.layoutConfig.settings.tabOverlapAllowance,r=this._tabs.indexOf(i.tab),a=this._tabs[r];this._lastVisibleTabIndex=-1;for(let i=0;ie){if(o)i===r&&(l.style.zIndex="auto",l.style.marginLeft="",l.parentElement!==this._element&&this._element.appendChild(l));else{let t;if(t=r>0&&r<=i?(d-e)/(i-1):(d-e)/i,tthis.onClick(t),this._touchStartListener=t=>this.onTouchStart(t),this._rowColumnClosable=!0,this._closeButton=null,this._popoutButton=null,this._tabsContainer=new Qt(this._layoutManager,(t=>this.handleTabInitiatedComponentRemoveEvent(t)),(t=>this.handleTabInitiatedComponentFocusEvent(t)),((t,e,i,n)=>this.handleTabInitiatedDragStartEvent(t,e,i,n)),(()=>this.processTabDropdownActiveChanged())),this._show=i.show,this._popoutEnabled=i.popoutEnabled,this._popoutLabel=i.popoutLabel,this._maximiseEnabled=i.maximiseEnabled,this._maximiseLabel=i.maximiseLabel,this._minimiseEnabled=i.minimiseEnabled,this._minimiseLabel=i.minimiseLabel,this._closeEnabled=i.closeEnabled,this._closeLabel=i.closeLabel,this._tabDropdownEnabled=i.tabDropdownEnabled,this._tabDropdownLabel=i.tabDropdownLabel,this.setSide(i.side),this._canRemoveComponent=this._configClosable,this._element=document.createElement("section"),this._element.classList.add("lm_header"),this._controlsContainerElement=document.createElement("section"),this._controlsContainerElement.classList.add("lm_controls"),this._element.appendChild(this._tabsContainer.element),this._element.appendChild(this._controlsContainerElement),this._element.appendChild(this._tabsContainer.dropdownElement),this._element.addEventListener("click",this._clickListener,{passive:!0}),this._element.addEventListener("touchstart",this._touchStartListener,{passive:!0}),this._documentMouseUpListener=()=>this._tabsContainer.hideAdditionalTabsDropdown(),globalThis.document.addEventListener("mouseup",this._documentMouseUpListener,{passive:!0}),this._tabControlOffset=this._layoutManager.layoutConfig.settings.tabControlOffset,this._tabDropdownEnabled&&(this._tabDropdownButton=new Kt(this,this._tabDropdownLabel,"lm_tabdropdown",(()=>this._tabsContainer.showAdditionalTabsDropdown()))),this._popoutEnabled&&(this._popoutButton=new Kt(this,this._popoutLabel,"lm_popout",(()=>this.handleButtonPopoutEvent()))),this._maximiseEnabled&&(this._maximiseButton=new Kt(this,this._maximiseLabel,"lm_maximise",(t=>this.handleButtonMaximiseToggleEvent(t)))),this._configClosable&&(this._closeButton=new Kt(this,this._closeLabel,"lm_close",(()=>s()))),this.processTabDropdownActiveChanged()}get show(){return this._show}get side(){return this._side}get leftRightSided(){return this._leftRightSided}get layoutManager(){return this._layoutManager}get parent(){return this._parent}get tabs(){return this._tabsContainer.tabs}get lastVisibleTabIndex(){return this._tabsContainer.lastVisibleTabIndex}get element(){return this._element}get tabsContainerElement(){return this._tabsContainer.element}get controlsContainerElement(){return this._controlsContainerElement}destroy(){this.emit("destroy"),this._popoutEvent=void 0,this._maximiseToggleEvent=void 0,this._clickEvent=void 0,this._touchStartEvent=void 0,this._componentRemoveEvent=void 0,this._componentFocusEvent=void 0,this._componentDragStartEvent=void 0,this._tabsContainer.destroy(),globalThis.document.removeEventListener("mouseup",this._documentMouseUpListener),this._element.remove()}createTab(t,e){this._tabsContainer.createTab(t,e)}removeTab(t){this._tabsContainer.removeTab(t)}processActiveComponentChanged(t){this._tabsContainer.processActiveComponentChanged(t),this.updateTabSizes()}setSide(t){this._side=t,this._leftRightSided=[nt.right,nt.left].includes(this._side)}setRowColumnClosable(t){this._rowColumnClosable=t,this.updateClosability()}updateClosability(){let t;if(this._configClosable)if(this._rowColumnClosable){t=!0;const e=this.tabs.length;for(let i=0;i1}applyFocusedValue(t){t?this._element.classList.add("lm_focused"):this._element.classList.remove("lm_focused")}processMaximised(){if(void 0===this._maximiseButton)throw new J("HPMAX16997");this._maximiseButton.element.setAttribute("title",this._minimiseLabel)}processMinimised(){if(void 0===this._maximiseButton)throw new J("HPMIN16997");this._maximiseButton.element.setAttribute("title",this._maximiseLabel)}updateTabSizes(){if(this._tabsContainer.tabCount>0){const t=this._show?this._layoutManager.layoutConfig.dimensions.headerHeight:0;let e;this._leftRightSided?(this._element.style.height="",this._element.style.width=zt(t)):(this._element.style.width="",this._element.style.height=zt(t)),e=this._leftRightSided?this._element.offsetHeight-this._controlsContainerElement.offsetHeight-this._tabControlOffset:this._element.offsetWidth-this._controlsContainerElement.offsetWidth-this._tabControlOffset,this._tabsContainer.updateTabSizes(e,this._getActiveComponentItemEvent())}}handleTabInitiatedComponentRemoveEvent(t){if(this._canRemoveComponent){if(void 0===this._componentRemoveEvent)throw new J("HHTCE22294");this._componentRemoveEvent(t)}}handleTabInitiatedComponentFocusEvent(t){if(void 0===this._componentFocusEvent)throw new J("HHTAE22294");this._componentFocusEvent(t)}handleTabInitiatedDragStartEvent(t,e,i,n){if(this._canRemoveComponent){if(void 0===this._componentDragStartEvent)throw new J("HHTDSE22294");this._componentDragStartEvent(t,e,i,n)}else i.cancelDrag()}processTabDropdownActiveChanged(){void 0!==this._tabDropdownButton&&Dt(this._tabDropdownButton.element,this._tabsContainer.dropdownActive)}handleButtonPopoutEvent(){if(this._layoutManager.layoutConfig.settings.popoutWholeStack){if(void 0===this._popoutEvent)throw new J("HHBPOE17834");this._popoutEvent()}else{const t=this._getActiveComponentItemEvent();t&&t.popout()}}handleButtonMaximiseToggleEvent(t){if(void 0===this._maximiseToggleEvent)throw new J("HHBMTE16834");this._maximiseToggleEvent()}onClick(t){t.target===this._element&&this.notifyClick(t)}onTouchStart(t){t.target===this._element&&this.notifyTouchStart(t)}notifyClick(t){if(void 0===this._clickEvent)throw new J("HNHC46834");this._clickEvent(t)}notifyTouchStart(t){if(void 0===this._touchStartEvent)throw new J("HNHTS46834");this._touchStartEvent(t)}}class ee extends $t{constructor(t,e,i){var n,o,s,r,a,l,h,d,c,m,u,p,g,f,v,_,y,C,w;super(t,e,i,ee.createElement(document)),this._headerSideChanged=!1,this._resizeListener=()=>this.handleResize(),this._maximisedListener=()=>this.handleMaximised(),this._minimisedListener=()=>this.handleMinimised(),this._headerConfig=e.header;const I=t.layoutConfig.header,b=e.content;let S;if(1!==b.length)S=void 0;else{S=b[0].header}this._initialWantMaximise=e.maximised,this._initialActiveItemIndex=null!==(n=e.activeItemIndex)&&void 0!==n?n:0;const E=null!==(r=null!==(s=null===(o=this._headerConfig)||void 0===o?void 0:o.show)&&void 0!==s?s:null==S?void 0:S.show)&&void 0!==r?r:I.show,x=null!==(h=null!==(l=null===(a=this._headerConfig)||void 0===a?void 0:a.popout)&&void 0!==l?l:null==S?void 0:S.popout)&&void 0!==h?h:I.popout,L=null!==(m=null!==(c=null===(d=this._headerConfig)||void 0===d?void 0:d.maximise)&&void 0!==c?c:null==S?void 0:S.maximise)&&void 0!==m?m:I.maximise,z=null!==(g=null!==(p=null===(u=this._headerConfig)||void 0===u?void 0:u.close)&&void 0!==p?p:null==S?void 0:S.close)&&void 0!==g?g:I.close,M=null!==(_=null!==(v=null===(f=this._headerConfig)||void 0===f?void 0:f.minimise)&&void 0!==v?v:null==S?void 0:S.minimise)&&void 0!==_?_:I.minimise,P=null!==(w=null!==(C=null===(y=this._headerConfig)||void 0===y?void 0:y.tabDropdown)&&void 0!==C?C:null==S?void 0:S.tabDropdown)&&void 0!==w?w:I.tabDropdown;this._maximisedEnabled=!1!==L;const T={show:!1!==E,side:!1===E?nt.top:E,popoutEnabled:!1!==x,popoutLabel:!1===x?"":x,maximiseEnabled:this._maximisedEnabled,maximiseLabel:!1===L?"":L,closeEnabled:!1!==z,closeLabel:!1===z?"":z,minimiseEnabled:!0,minimiseLabel:M,tabDropdownEnabled:!1!==P,tabDropdownLabel:!1===P?"":P};this._header=new te(t,this,T,e.isClosable&&!1!==z,(()=>this.getActiveComponentItem()),(()=>this.remove()),(()=>this.handlePopoutEvent()),(()=>this.toggleMaximise()),(t=>this.handleHeaderClickEvent(t)),(t=>this.handleHeaderTouchStartEvent(t)),(t=>this.handleHeaderComponentRemoveEvent(t)),(t=>this.handleHeaderComponentFocusEvent(t)),((t,e,i,n)=>this.handleHeaderComponentStartDragEvent(t,e,i,n))),this.isStack=!0,this._childElementContainer=document.createElement("section"),this._childElementContainer.classList.add("lm_items"),this.on("resize",this._resizeListener),this._maximisedEnabled&&(this.on("maximised",this._maximisedListener),this.on("minimised",this._minimisedListener)),this.element.appendChild(this._header.element),this.element.appendChild(this._childElementContainer),this.setupHeaderPosition(),this._header.updateClosability()}get childElementContainer(){return this._childElementContainer}get header(){return this._header}get headerShow(){return this._header.show}get headerSide(){return this._header.side}get headerLeftRightSided(){return this._header.leftRightSided}get contentAreaDimensions(){return this._contentAreaDimensions}get initialWantMaximise(){return this._initialWantMaximise}get isMaximised(){return this===this.layoutManager.maximisedStack}get stackParent(){if(!this.parent)throw new Error("Stack should always have a parent");return this.parent}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}init(){if(!0===this.isInitialised)return;this.updateNodeSize();for(let t=0;t0){if(this._initialActiveItemIndex<0||this._initialActiveItemIndex>=e)throw new Error(`ActiveItemIndex out of range: ${this._initialActiveItemIndex} id: ${this.id}`);for(let i=0;ithis.contentItems.length)throw e-=1,new X("SAC99728");if(t instanceof jt)return e=super.addChild(t,e),this._childElementContainer.appendChild(t.element),this._header.createTab(t,e),this.setActiveComponentItem(t,i),this._header.updateTabSizes(),this.updateSize(!1),t.container.setBaseLogicalZIndex(),this._header.updateClosability(),this.emitStateChangedEvent(),e;throw new X("SACC88532")}removeChild(t,e){const i=t,n=this.contentItems.indexOf(i),o=1===this.contentItems.length;if(this._activeComponentItem===i&&(i.focused&&i.blur(),!o)){const t=0===n?1:n-1;this.setActiveComponentItem(this.contentItems[t],!1)}this._header.removeTab(i),super.removeChild(i,e),o||this._header.updateClosability(),this.emitStateChangedEvent()}toggleMaximise(){this.isMaximised?this.minimise():this.maximise()}maximise(){if(!this.isMaximised){this.layoutManager.setMaximisedStack(this);const t=this.contentItems,e=t.length;for(let i=0;i0&&void 0===t)throw new Error("expected non-empty stack to have an active component item");return{type:"stack",content:this.calculateConfigContent(),size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,isClosable:this.isClosable,maximised:this.isMaximised,header:this.createHeaderConfig(),activeItemIndex:t}}onDrop(t,e){if("header"===this._dropSegment){if(this.resetHeaderDropZone(),void 0===this._dropIndex)throw new J("SODDI68990");return void this.addChild(t,this._dropIndex)}if("body"===this._dropSegment)return void this.addChild(t,0,!0);const i="top"===this._dropSegment||"bottom"===this._dropSegment,n="left"===this._dropSegment||"right"===this._dropSegment,o="top"===this._dropSegment||"left"===this._dropSegment,s=i&&this.stackParent.isColumn||n&&this.stackParent.isRow;if(t.isComponent){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createAndInitContentItem(e,this);i.addChild(t),t=i}if(t.type===at.row||t.type===at.column){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}if(s){const e=this.stackParent.contentItems.indexOf(this);this.stackParent.addChild(t,o?e:e+1,!0),this.size*=.5,t.size=this.size,t.sizeUnit=this.sizeUnit,this.stackParent.updateSize(!1)}else{const e=i?at.column:at.row,n=ct.createDefault(e),s=this.layoutManager.createContentItem(n,this);this.stackParent.replaceChild(this,s),s.addChild(t,o?0:void 0,!0),s.addChild(this,o?void 0:0,!0),this.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}highlightDropZone(t,e){for(const i in this._contentAreaDimensions){const n=i,o=this._contentAreaDimensions[n].hoverArea;if(o.x1t&&o.y1e)return void("header"===n?(this._dropSegment="header",this.highlightHeaderDropZone(this._header.leftRightSided?e:t)):(this.resetHeaderDropZone(),this.highlightBodyDropZone(n)))}}getArea(){if("none"===this.element.style.display)return null;const t=super.getElementArea(this._header.element),e=super.getElementArea(this._childElementContainer);if(null===t||null===e)throw new K("SGAHC13086");const i=e.x2-e.x1,n=e.y2-e.y1;return this._contentAreaDimensions={header:{hoverArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2},highlightArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2}}},0===this.contentItems.length?(this._contentAreaDimensions.body={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2}},super.getElementArea(this.element)):(this._contentAreaDimensions.left={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x1+.25*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x1+.5*i,y2:e.y2}},this._contentAreaDimensions.top={hoverArea:{x1:e.x1+.25*i,y1:e.y1,x2:e.x1+.75*i,y2:e.y1+.5*n},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y1+.5*n}},this._contentAreaDimensions.right={hoverArea:{x1:e.x1+.75*i,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1+.5*i,y1:e.y1,x2:e.x2,y2:e.y2}},this._contentAreaDimensions.bottom={hoverArea:{x1:e.x1+.25*i,y1:e.y1+.5*n,x2:e.x1+.75*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1+.5*n,x2:e.x2,y2:e.y2}},super.getElementArea(this.element))}positionHeader(t){this._header.side!==t&&(this._header.setSide(t),this._headerSideChanged=!0,this.setupHeaderPosition())}updateNodeSize(){if("none"!==this.element.style.display){const t=kt(this.element);if(this._header.show){t[this._header.leftRightSided?it.width:it.height]-=this.layoutManager.layoutConfig.dimensions.headerHeight}this._childElementContainer.style.width=zt(t.width),this._childElementContainer.style.height=zt(t.height);for(let e=0;e=o&&t({...t,[e]:i});async function s(t,e){return(await Promise.all(e.map((async([e,i])=>[e,await t(i,e)])))).reduce(o,{})}n.mapEntriesAsync=s,n.mapValuesAsync=async function(t,e){let i;return i=e instanceof Map?[...e.entries()]:Object.entries(e),s(t,i)};var r,a,l,h,d=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldSet||function(t,e,i,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(t,i):o?o.value=i:e.set(t,i),i},c=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldGet||function(t,e,i,n){if("a"===i&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?n:"a"===i?n.call(t):n?n.value:e.get(t)};Object.defineProperty(i,"__esModule",{value:!0});var m=i.DefaultLayoutManager=void 0;const u=n;class p{constructor(t){a.set(this,void 0),l.set(this,new Map),d(this,a,t,"f")}size(){return c(this,l,"f").size}async applyLayoutSnapshot({layouts:t}){if(Object.keys(t).length>1)throw new Error("[LayoutManager] Tried to call applyLayoutSnapshot with more than 1 layout. When implementing multiple layouts via overridden LayoutManager class, you must override and fully implement the applyLayoutSnapshot method without calling super.applyLayoutSnapshot().");const[[e,i]]=Object.entries(t);await p.createLayout(this,{layoutName:e,layout:i})}async showLayout({layoutName:t}){}async getLayoutSnapshot(){return{layouts:await(0,u.mapValuesAsync)((t=>t.getFrameSnapshot()),c(this,l,"f"))}}async removeLayout({layoutName:t}){}getLayoutIdentityForView(t){const e=[...c(this,l,"f").values()].find((e=>e.getCurrentViews().some((e=>e.name===t.name&&e.uuid===t.uuid))));return e?.identity??void 0}isLayoutVisible({layoutName:t}){return c(p,r,"m",h).call(p,this,t).isVisible()}resolveLayoutIdentity(t){if(t&&"layoutName"in t)return t;const e=[...c(this,l,"f").values()];if(1===e.length)return e[0].identity;const i=e.find((t=>t.isVisible()));return i?.identity??void 0}static async resolveLayout(t,e){const i=t.resolveLayoutIdentity(e);if(void 0===i||!("layoutName"in i))throw new Error("[layout-manager] resolveLayout: Could not resolve the layout identity. Make sure you include 'layoutName' in the identity object.");return c(p,r,"m",h).call(p,t,i.layoutName)}static async handleSharedView(t,e,i){await(0,u.mapValuesAsync)((async t=>{if(t.identity.layoutName!==e.layoutName){const e=t.getCurrentViews().find((t=>t.name===i.name));e&&await t.onViewDetached({viewIdentity:e,target:null}).catch(console.error)}}),c(t,l,"f"))}static async handleLastViewRemoved(t,e){await t.removeLayout(e),await c(t,a,"f").handleLastViewRemoved(t)}static async destroyLayout(t,{layoutName:e}){await c(p,r,"m",h).call(p,t,e).destroy(),c(t,l,"f").delete(e)}static async createLayout(t,e){const{layoutName:i}=e;if(c(t,l,"f").has(i))throw new Error(`Layout name ${i} already exists`);await c(t,a,"f").createLayout(e,t)}static registerLayout(t,e,i){c(t,l,"f").set(e,i)}static getAllLayouts(t){return[...c(t,l,"f").values()]}static setInitialSnapshot(t,e){c(t,a,"f").setInitialSnapshot(e)}static createClosedConstructor(...t){return class extends p{constructor(){super(...t)}}}}m=i.DefaultLayoutManager=p,r=p,a=new WeakMap,l=new WeakMap,h=function(t,e){const i=c(t,l,"f").get(e);if(!i)throw new Error(`[layout-manager] getLayoutByName: Could not locate layout with name '${e}'`);return i};var g={},f={},v={};Object.defineProperty(v,"__esModule",{value:!0}),v.ReversibleMap=void 0;v.ReversibleMap=class{constructor(){this.valueToKey=new Map,this.keyToValue=new Map,this.setUnique=(t,e)=>{if(this.hasKey(t)||this.hasValue(e))throw new Error("Key or value already in the map.");this.keyToValue.set(t,e),this.valueToKey.set(e,t)},this.getKey=t=>{const e=this.valueToKey.get(t);if(!e)throw new Error("Value not found in the map.");return e},this.deleteKey=t=>{const e=this.getValue(t);return this.keyToValue.delete(t),this.valueToKey.delete(e),e},this.deleteValue=t=>{const e=this.getKey(t);return this.keyToValue.delete(e),this.valueToKey.delete(t),e},this.hasKey=t=>this.keyToValue.has(t),this.hasValue=t=>this.valueToKey.has(t)}getValue(t){const e=this.keyToValue.get(t);if(!e)throw new Error("Key not found in the map.");return e}},Object.defineProperty(f,"__esModule",{value:!0});var _=f.LayoutContentCache=void 0;const y=t.lazy,C=v;class w{constructor(){this.contentItemCache=new C.ReversibleMap,this.contentItemCacheId=0,this.createCacheKey=()=>{const t=`entity-${this.contentItemCacheId.toString()}`;return this.contentItemCacheId+=1,t},this.hasKey=t=>this.contentItemCache.hasKey(t),this.getItemOrUndefined=t=>{try{return this.getContentItemOrThrow(t)}catch(t){return}},this.getContentItemOrThrow=(t,e)=>{if(!this.contentItemCache.hasKey(t))throw new Error("Layout component has been destroyed or detached from the current layout.");const i=this.contentItemCache.getValue(t);if(e&&!e.includes(i.type))throw new Error(`Layout item is not the expected type. Expected ${e.join(", ")}, got ${i.type}.`);return i},this.getOrCreateEntityId=t=>{if(this.contentItemCache.hasValue(t))return this.contentItemCache.getKey(t);t.onDestroyed((()=>{this.contentItemCache.deleteValue(t)}));const e=this.createCacheKey();return this.contentItemCache.setUnique(e,t),e}}static getSingleInstance(){return w.singleton.getValue()}}_=f.LayoutContentCache=w,w.singleton=new y.Lazy((()=>new w));var I={},b={};!function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.getAdjacentStacks=t.doShareEdge=t.getAdjacentItem=void 0;t.getAdjacentItem=(e,i)=>{const{parent:n}=e;if(e.isRoot()||!n)return;const o=["top","bottom"].includes(i)?"column":"row",s=["top","left"].includes(i)?-1:1;if(n.type===o){const t=n.contentItems.indexOf(e)+s;if(t>=0&&t{const n=t.getBounds(),o=e.getBounds();if(!n||!o)return!1;if(["top","bottom"].includes(i)){return!(n.righto.right)}return!(n.bottomo.bottom)};t.getAdjacentStacks=(e,i)=>{const n=["top","bottom"].includes(i)?"row":"column",o=s=>"stack"===s.type?(0,t.doShareEdge)(e,s,i)?[s]:[]:"root"===s.type||"ground"===s.type?[]:s.type===n?s.contentItems.map((t=>o(t))).flat():s.type!==n?["top","right"].includes(i)?o(s.contentItems[s.contentItems.length-1]):o(s.contentItems[0]):[],s=(0,t.getAdjacentItem)(e,i);return s?o(s):[]}}(b);var S=t.commonjsGlobal&&t.commonjsGlobal.__decorate||function(t,e,i,n){var o,s=arguments.length,r=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(s<3?o(r):s>3?o(e,i,r):o(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};Object.defineProperty(I,"__esModule",{value:!0}),I.LayoutEntitiesController=void 0;const E=t.decorators,x=b,L=i;class z{constructor(t,e,i){this.wire=t,this.layoutManager=e,this.layoutContentCache=i,this.analytics=t=>{this.wire.sendAction(`layout-controller-${t}`).catch((()=>{}))},this.getLayoutIdentityForViewOrThrow=async t=>{const e=this.layoutManager.getLayoutIdentityForView(t);if(!e)throw new Error(`View identity ${t.name} is not attached to any layouts.`);return e},this.getRoot=async t=>{this.analytics("get-root");const e=(await this.getLayout(t)).getRoot();return{type:e.type,entityId:this.layoutContentCache.getOrCreateEntityId(e)}},this.getStackByView=async t=>{this.analytics("get-stack-by-view");const e=await this.getLayoutIdentityForViewOrThrow(t),i=(await this.getLayout(e)).getStackByView(t);if("stack"===i?.type)return{entityId:this.layoutContentCache.getOrCreateEntityId(i),type:"stack"}},this.getStackViews=t=>{this.analytics("get-stack-views");return this.layoutContentCache.getContentItemOrThrow(t,["stack"]).contentItems.map((t=>({name:t.viewName,uuid:this.wire.me.uuid})))},this.isRoot=t=>{this.analytics("is-root");return this.layoutContentCache.getContentItemOrThrow(t).isRoot()},this.exists=t=>(this.analytics("exists"),this.layoutContentCache.hasKey(t)),this.addViewToStack=async(t,e,{index:i}={index:0})=>{this.analytics("add-view-to-stack");const n=this.layoutContentCache.getContentItemOrThrow(t);if(i&&i>n.contentItems.length+1)throw new Error(`Index '${i}' out of range, please exclude the index or specify a number between 0 and ${n.contentItems.length}`);const o={id:t,index:i},{identity:s}=await n.layout.platformCreateView(e,{location:o});return s},this.findViewInStack=(t,e)=>t.contentItems.find((t=>t.viewName===e.name)),this.removeViewFromStack=async(t,e)=>{this.analytics("remove-view-from-stack");const i=this.layoutContentCache.getContentItemOrThrow(t,["stack"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to remove a view ('${e.name}') which does not belong to the stack.`);await n.layout.platformCloseView(e)},this.createAdjacentStack=async(t,e,{position:i="right"}={})=>{if(this.analytics("create-adjacent-stack"),!Array.isArray(e)||0===e.length)throw new Error('The parameter "views" must be an array with at least 1 element.');if(!["top","bottom","left","right"].includes(i))throw new Error(`Invalid position '${i}' specified.`);const n=this.layoutContentCache.getContentItemOrThrow(t).createAdjacentStack({position:i}),o=this.layoutContentCache.getOrCreateEntityId(n);return await Promise.all(e.reverse().map((t=>this.addViewToStack(o,t)))),o},this.getAdjacentStacks=async({targetId:t,edge:e})=>{this.analytics("get-adjacent-stacks");const i=this.layoutContentCache.getContentItemOrThrow(t);return(0,x.getAdjacentStacks)(i,e).map((t=>({entityId:this.layoutContentCache.getOrCreateEntityId(t)})))},this.setStackActiveView=async(t,e)=>{this.analytics("set-stack-active-view");const i=this.layoutContentCache.getContentItemOrThrow(t,["stack"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to set a view ('${e.name}') as active when it does not belong to the stack.`);i.setActiveContentItem(n,!0)}}async getLayout(t){const e=await L.DefaultLayoutManager.resolveLayout(this.layoutManager,t);if(!e)throw new Error(`Could not resolve target layout identity ${JSON.stringify(t)}`);return e}getContent(t){this.analytics("get-content");return this.layoutContentCache.getContentItemOrThrow(t,["column","row"]).contentItems.map((t=>({type:t.type,entityId:this.layoutContentCache.getOrCreateEntityId(t)})))}getParent(t){this.analytics("get-parent");const e=this.layoutContentCache.getContentItemOrThrow(t);if(!e.isRoot())return e.parent?.contentItems.includes(e)?{type:e.parent.type,entityId:this.layoutContentCache.getOrCreateEntityId(e.parent)}:void 0}}S([(0,E.expose)()],z.prototype,"getLayoutIdentityForViewOrThrow",void 0),S([(0,E.expose)()],z.prototype,"getRoot",void 0),S([(0,E.expose)()],z.prototype,"getStackByView",void 0),S([(0,E.expose)()],z.prototype,"getStackViews",void 0),S([(0,E.expose)()],z.prototype,"getContent",null),S([(0,E.expose)()],z.prototype,"getParent",null),S([(0,E.expose)()],z.prototype,"isRoot",void 0),S([(0,E.expose)()],z.prototype,"exists",void 0),S([(0,E.expose)()],z.prototype,"addViewToStack",void 0),S([(0,E.expose)()],z.prototype,"removeViewFromStack",void 0),S([(0,E.expose)()],z.prototype,"createAdjacentStack",void 0),S([(0,E.expose)()],z.prototype,"getAdjacentStacks",void 0),S([(0,E.expose)()],z.prototype,"setStackActiveView",void 0),I.LayoutEntitiesController=z,Object.defineProperty(g,"__esModule",{value:!0});var M=g.initLayoutEndpoints=void 0;const P=t.apiExposer,T=t.layout_constants,A=f,k=I,D=i;M=g.initLayoutEndpoints=async function(t,e){const i=t.getFin(),n=await i.Platform.getCurrentSync().getClient(),o=new P.ChannelsExposer(n);await new P.ApiExposer(o).exposeInstance(new k.LayoutEntitiesController(t,e,A.LayoutContentCache.getSingleInstance()),{id:T.LAYOUT_CONTROLLER_ID}),await async function(t,e){const i=t=>async i=>{const n=await D.DefaultLayoutManager.resolveLayout(e,i.target);if(!n)throw new Error(`Could not resolve the layout target from payload ${JSON.stringify(i)}`);return t(n,i)},n=(e,n)=>{t.register(e,i(n))},o=(t,e)=>{n(t,e)};n("replace-view",((t,e)=>t.replaceView(e))),n("replace-layout",((t,{layout:e})=>t.replaceLayout(e))),n("add-view",((t,e)=>t.insertView(e))),o("layout-add-view",((t,{viewOptions:e,location:i,targetView:n})=>t.platformCreateView(e,{location:i,targetView:n}))),n("close-view",((t,e)=>t.cleanupView(e.viewIdentity))),o("layout-close-view",((t,e)=>t.platformCloseView(e.viewIdentity))),n("apply-preset-layout",((t,e)=>t.applyPreset(e))),n("get-layout-views",(t=>t.getCurrentViews())),n("get-frame-snapshot",(t=>t.getFrameSnapshot())),n("is-visible",(t=>t.isVisible())),n("destroy",(t=>t.destroy())),t.register("get-layout-snapshot",(()=>e.getLayoutSnapshot()))}(n,e)};var R={};Object.defineProperty(R,"__esModule",{value:!0});var U=R.BaseLayout=void 0;U=R.BaseLayout=class{};var O={};Object.defineProperty(O,"__esModule",{value:!0});var V=O.DOMEmitter=void 0;V=O.DOMEmitter=class{constructor(t){this.container=t}dispatchLocalEvent(t,e){const i={...e,type:t,tabSelector:`tab-${e.name}`,containerSelector:`container-${e.name}`,topic:"openfin-DOM-event"};this.container.dispatchEvent(new CustomEvent(t,{detail:i}))}};var B={};Object.defineProperty(B,"__esModule",{value:!0});var H=B.mapLayoutContentItemsImmutableSync=B.mapLayoutContentItemsImmutable=W=B.isVisible=void 0;var W=B.isVisible=t=>(0!==t.offsetWidth||0!==t.offsetHeight)&&"hidden"!==window.getComputedStyle(t).visibility&&t.offsetTop>=0&&t.offsetLeft>=0&&t.offsetTop<=window.innerHeight&&t.offsetLeft<=window.innerWidth;const F=t=>"type"in t&&"component"===t.type;B.mapLayoutContentItemsImmutable=async function t(e,i){return F(i)?e(i):{...i,content:await Promise.all(i.content?.map((i=>t(e,i))))}},H=B.mapLayoutContentItemsImmutableSync=function t(e,i){return F(i)?e(i):{...i,content:i.content?.map((i=>t(e,i)))}};class N extends Error{constructor(t,e){super(e),this.type=t}}class G extends N{constructor(t,e){super("Configuration",t),this.node=e}}class j extends N{constructor(t){super("PopoutBlocked",t)}}class $ extends N{constructor(t){super("API",t)}}class Z extends N{constructor(t){super("Bind",t)}}class q extends Error{constructor(t,e,i){super(`${t}: ${e}${void 0===i?"":": "+i}`)}}class X extends q{constructor(t,e){super("Assert",t,e)}}class Y extends q{constructor(t,e,i){super("UnreachableCase",t,`${e}${void 0===i?"":": "+i}`)}}class K extends q{constructor(t,e){super("UnexpectedNull",t,e)}}class J extends q{constructor(t,e){super("UnexpectedUndefined",t,e)}}var Q;!function(t){let e=!1;const i={PopoutCannotBeCreatedWithGroundItemConfig:{id:0,default:"Popout cannot be created with ground ItemConfig"},PleaseRegisterAConstructorFunction:{id:1,default:"Please register a constructor function"},ComponentTypeNotRegisteredAndBindComponentEventHandlerNotAssigned:{id:2,default:"Component type not registered and BindComponentEvent handler not assigned"},ComponentIsAlreadyRegistered:{id:3,default:"Component is already registered"},ComponentIsNotVirtuable:{id:4,default:"Component is not virtuable. Requires rootHtmlElement field/getter"},VirtualComponentDoesNotHaveRootHtmlElement:{id:5,default:'Virtual component does not have getter "rootHtmlElement"'},ItemConfigIsNotTypeComponent:{id:6,default:"ItemConfig is not of type component"},InvalidNumberPartInSizeString:{id:7,default:"Invalid number part in size string"},UnknownUnitInSizeString:{id:8,default:"Unknown unit in size string"},UnsupportedUnitInSizeString:{id:9,default:"Unsupported unit in size string"}};t.idCount=Object.keys(i).length;const n=Object.values(i);t.checkInitialise=function(){if(!e)for(let e=0;e="0"&&t<="9"}function Tt(t,e){const i=zt(e);t.style.width=i}function At(t,e){const i=zt(e);t.style.height=i}function kt(t){return{width:t.offsetWidth,height:t.offsetHeight}}function Dt(t,e){t.style.display=e?"":"none"}function Rt(t,e){if(void 0!==e)for(const i in e)if(e.hasOwnProperty(i)){const n=e[i],o=t[i];t[i]=Ut(o,n)}return t}function Ut(t,e){if("object"!=typeof e)return e;if(Array.isArray(e)){const t=e.length,i=new Array(t);for(let n=0;n36)throw new Error("Too many keys in config minifier map")},t.translateObject=n}(dt||(dt={})),function(t){t.defaults={type:at.ground,content:[],size:1,sizeUnit:ht.Fractional,minSize:void 0,minSizeUnit:ht.Pixel,id:"",isClosable:!0},t.createCopy=function(t,e){switch(t.type){case at.ground:case at.row:case at.column:return gt.createCopy(t,e);case at.stack:return ut.createCopy(t,e);case at.component:return pt.createCopy(t);default:throw new Y("CICC91354",t.type,"Invalid Config Item type specified")}},t.createDefault=function(t){switch(t){case at.ground:throw new X("CICCDR91562");case at.row:case at.column:return gt.createDefault(t);case at.stack:return ut.createDefault();case at.component:return pt.createDefault();default:throw new Y("CICCDD91563",t,"Invalid Config Item type specified")}},t.isComponentItem=function(t){return t.type===at.component},t.isStackItem=function(t){return t.type===at.stack},t.isGroundItem=function(t){return t.type===at.ground}}(ct||(ct={})),function(t){t.defaultMaximised=!1,function(t){t.createCopy=function(t,e){return void 0===t?void 0:{show:null!=e?e:t.show,popout:t.popout,close:t.close,maximise:t.maximise,minimise:t.minimise,tabDropdown:t.tabDropdown}}}(t.Header||(t.Header={}))}(mt||(mt={})),function(t){function e(t){const e=t.length,i=new Array(e);for(let n=0;n"__glMaximised"===t));t>0&&(o=!0,n=n.splice(t,1)),e=n.length>0?n[0]:ct.defaults.id}else e=n;return i=void 0!==t.maximised?t.maximised:o,{id:e,maximised:i}}}(wt||(wt={})),function(t){function e(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0;return{resolved:!0,root:Et.resolve(i),openPopouts:t.resolveOpenPopouts(e.openPopouts),dimensions:t.Dimensions.resolve(e.dimensions),settings:t.Settings.resolve(e.settings),header:t.Header.resolve(e.header,e.settings,e.labels)}}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:Lt.fromResolvedArray(e.openPopouts),settings:_t.Settings.createCopy(e.settings),dimensions:t.Dimensions.fromResolved(e.dimensions),header:_t.Header.createCopy(e.header)}},t.isResolved=function(t){const e=t;return void 0!==e.resolved&&!0===e.resolved},t.resolveOpenPopouts=function(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0,{root:Et.resolve(o),openPopouts:xt.resolveOpenPopouts(e.openPopouts),dimensions:xt.Dimensions.resolve(e.dimensions),settings:xt.Settings.resolve(e.settings),header:xt.Header.resolve(e.header,e.settings,e.labels),parentId:null!==(i=e.parentId)&&void 0!==i?i:null,indexInParent:null!==(n=e.indexInParent)&&void 0!==n?n:null,window:t.Window.resolve(e.window,e.dimensions),resolved:!0}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:i(e.openPopouts),dimensions:xt.Dimensions.fromResolved(e.dimensions),settings:_t.Settings.createCopy(e.settings),header:_t.Header.createCopy(e.header),parentId:e.parentId,indexInParent:e.indexInParent,window:t.Window.fromResolved(e.window)}},t.fromResolvedArray=i}(Lt||(Lt={}));class Wt{constructor(){this._allEventSubscriptions=[],this._subscriptionsMap=new Map,this.unbind=this.removeEventListener,this.trigger=this.emit}tryBubbleEvent(t,e){}emit(t,...e){let i=this._subscriptionsMap.get(t);if(void 0!==i){i=i.slice();for(let t=0;t0){const n=e.slice();n.unshift(t);const o=this._allEventSubscriptions.slice();for(let t=0;t0?n.contentItems[0]:n,e=0);const o=this._layoutManager.createAndInitContentItem(i,t);t.addChild(o,e),this._layoutManager.layoutConfig.settings.popInOnClose?this._onClose():this.close()}createWindow(){const t=this.createUrl(),e=Math.floor(1e6*Math.random()).toString(36),i=this.serializeWindowFeatures({width:this._initialWindowSize.width,height:this._initialWindowSize.height,innerWidth:this._initialWindowSize.width,innerHeight:this._initialWindowSize.height,menubar:"no",toolbar:"no",location:"no",personalbar:"no",resizable:"yes",scrollbars:"no",status:"no"});if(this._popoutWindow=globalThis.open(t,e,i),this._popoutWindow)this._popoutWindow.addEventListener("load",(()=>this.positionWindow()),{passive:!0}),this._popoutWindow.addEventListener("beforeunload",(()=>{this._layoutManager.layoutConfig.settings.popInOnClose?this.popIn():this._onClose()}),{passive:!0}),this._checkReadyInterval=setInterval((()=>this.checkReady()),10);else if(!0===this._layoutManager.layoutConfig.settings.blockedPopoutsThrowError){throw new j("Popout blocked")}}checkReady(){if(null===this._popoutWindow)throw new K("BPCR01844");this._popoutWindow.__glInstance&&this._popoutWindow.__glInstance.isInitialised&&(this.onInitialised(),void 0!==this._checkReadyInterval&&(clearInterval(this._checkReadyInterval),this._checkReadyInterval=void 0))}serializeWindowFeatures(t){const e=[];for(const i in t)e.push(i+"="+t[i].toString());return e.join(",")}createUrl(){const t="gl-window-config-"+Ot(),e=_t.minifyConfig(this._config);try{localStorage.setItem(t,JSON.stringify(e))}catch(t){throw new Error("Error while writing to localStorage "+function(t){return t instanceof Error?t.message:"string"==typeof t?t:"Unknown Error"}(t))}const i=new URL(location.href);return i.searchParams.set("gl-window",t),i.toString()}positionWindow(){if(null===this._popoutWindow)throw new Error("BrowserPopout.positionWindow: null popoutWindow");this._popoutWindow.moveTo(this._initialWindowSize.left,this._initialWindowSize.top),this._popoutWindow.focus()}onInitialised(){this._isInitialised=!0,this.getGlInstance().on("popIn",(()=>this.popIn())),this.emit("initialised")}_onClose(){setTimeout((()=>this.emit("closed")),50)}}class Gt extends Wt{constructor(t,e,i,n){super(),this.layoutManager=t,this._parent=i,this._element=n,this._popInParentIds=[],this._type=e.type,this._id=e.id,this._isInitialised=!1,this.isGround=!1,this.isRow=!1,this.isColumn=!1,this.isStack=!1,this.isComponent=!1,this.size=e.size,this.sizeUnit=e.sizeUnit,this.minSize=e.minSize,this.minSizeUnit=e.minSizeUnit,this._isClosable=e.isClosable,this._pendingEventPropagations={},this._throttledEvents=["stateChanged"],this._contentItems=this.createContentItems(e.content)}get type(){return this._type}get id(){return this._id}set id(t){this._id=t}get popInParentIds(){return this._popInParentIds}get parent(){return this._parent}get contentItems(){return this._contentItems}get isClosable(){return this._isClosable}get element(){return this._element}get isInitialised(){return this._isInitialised}static isStack(t){return t.isStack}static isComponentItem(t){return t.isComponent}static isComponentParentableItem(t){return t.isStack||t.isGround}removeChild(t,e=!1){const i=this._contentItems.indexOf(t);if(-1===i)throw new Error("Can't remove child item. Unknown content item");if(e||this._contentItems[i].destroy(),this._contentItems.splice(i,1),this._contentItems.length>0)this.updateSize(!1);else if(!this.isGround&&!0===this._isClosable){if(null===this._parent)throw new K("CIUC00874");this._parent.removeChild(this)}}addChild(t,e,i){return null!=e||(e=this._contentItems.length),this._contentItems.splice(e,0,t),t.setParent(this),!0===this._isInitialised&&!1===t._isInitialised&&t.init(),e}replaceChild(t,e,i=!1){const n=this._contentItems.indexOf(t),o=t._element.parentNode;if(-1===n)throw new X("CIRCI23232","Can't replace child. oldChild is not child of this");if(null===o)throw new K("CIRCP23232");if(o.replaceChild(e._element,t._element),!0===i&&(t._parent=null,t.destroy()),this._contentItems[n]=e,e.setParent(this),e.size=t.size,e.sizeUnit=t.sizeUnit,e.minSize=t.minSize,e.minSizeUnit=t.minSizeUnit,null===e._parent)throw new K("CIRCNC45699");!0===e._parent._isInitialised&&!1===e._isInitialised&&e.init(),this.updateSize(!1)}remove(){if(null===this._parent)throw new K("CIR11110");this._parent.removeChild(this)}popout(){const t=Ot(),e=this.layoutManager.createPopoutFromContentItem(this,void 0,t,void 0);return this.emitBaseBubblingEvent("stateChanged"),e}calculateConfigContent(){const t=this._contentItems,e=t.length,i=new Array(e);for(let n=0;nthis.propagateEventToLayoutManager(t,e))))}propagateEventToLayoutManager(t,e){this._pendingEventPropagations[t]=!1,this.layoutManager.emitUnknown(t,e)}}class jt extends Gt{constructor(t,e,i){super(t,e,i,document.createElement("div")),this._parentItem=i,this._focused=!1,this.isComponent=!0,this._reorderEnabled=e.reorderEnabled,this.applyUpdatableConfig(e),this._initialWantMaximise=e.maximised;const n=document.createElement("div");n.classList.add("lm_content"),this.element.appendChild(n),this._container=new Ft(e,this,t,n,(t=>this.handleUpdateItemConfigEvent(t)),(()=>this.show()),(()=>this.hide()),(t=>this.focus(t)),(t=>this.blur(t)))}get componentName(){return this._container.componentType}get componentType(){return this._container.componentType}get reorderEnabled(){return this._reorderEnabled}get initialWantMaximise(){return this._initialWantMaximise}get component(){return this._container.component}get container(){return this._container}get parentItem(){return this._parentItem}get headerConfig(){return this._headerConfig}get title(){return this._title}get tab(){return this._tab}get focused(){return this._focused}destroy(){this._container.destroy(),super.destroy()}applyUpdatableConfig(t){this.setTitle(t.title),this._headerConfig=t.header}toConfig(){const t=this._container.stateRequestEvent,e=void 0===t?this._container.state:t();return{type:at.component,content:[],size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,maximised:!1,isClosable:this.isClosable,reorderEnabled:this._reorderEnabled,title:this._title,header:mt.Header.createCopy(this._headerConfig),componentType:pt.copyComponentType(this.componentType),componentState:e}}close(){if(null===this.parent)throw new K("CIC68883");this.parent.removeChild(this,!1)}enterDragMode(t,e){Tt(this.element,t),At(this.element,e),this._container.enterDragMode(t,e)}exitDragMode(){this._container.exitDragMode()}enterStackMaximised(){this._container.enterStackMaximised()}exitStackMaximised(){this._container.exitStackMaximised()}drag(){this._container.drag()}updateSize(t){this.updateNodeSize(t)}init(){this.updateNodeSize(!1),super.init(),this._container.emit("open"),this.initContentItems()}setTitle(t){this._title=t,this.emit("titleChanged",t),this.emit("stateChanged")}setTab(t){this._tab=t,this.emit("tab",t),this._container.setTab(t)}hide(){super.hide(),this._container.setVisibility(!1)}show(){super.show(),this._container.setVisibility(!0)}focus(t=!1){this.parentItem.setActiveComponentItem(this,!0,t)}setFocused(t){this._focused=!0,this.tab.setFocused(),t||this.emitBaseBubblingEvent("focus")}blur(t=!1){this._focused&&this.layoutManager.setFocusedComponentItem(void 0,t)}setBlurred(t){this._focused=!1,this.tab.setBlurred(),t||this.emitBaseBubblingEvent("blur")}setParent(t){this._parentItem=t,super.setParent(t)}handleUpdateItemConfigEvent(t){this.applyUpdatableConfig(t)}updateNodeSize(t){if("none"!==this.element.style.display){const{width:e,height:i}=kt(this.element);this._container.setSizeToNodeSize(e,i,t)}}}class $t extends Gt{constructor(){super(...arguments),this._focused=!1}get focused(){return this._focused}setFocusedValue(t){this._focused=t}}class Zt extends Wt{constructor(t,e){super(),this._eElement=t,this._pointerTracking=!1,this._pointerDownEventListener=t=>this.onPointerDown(t),this._pointerMoveEventListener=t=>this.onPointerMove(t),this._pointerUpEventListener=t=>this.onPointerUp(t),this._timeout=void 0,this._allowableTargets=[t,...e],this._oDocument=document,this._eBody=document.body,this._nDelay=1800,this._nDistance=10,this._nX=0,this._nY=0,this._nOriginalX=0,this._nOriginalY=0,this._dragging=!1,this._eElement.addEventListener("pointerdown",this._pointerDownEventListener,{passive:!0})}destroy(){this.checkRemovePointerTrackingEventListeners(),this._eElement.removeEventListener("pointerdown",this._pointerDownEventListener)}cancelDrag(){this.processDragStop(void 0)}onPointerDown(t){if(this._allowableTargets.includes(t.target)&&t.isPrimary){const e=this.getPointerCoordinates(t);this.processPointerDown(e)}}processPointerDown(t){this._nOriginalX=t.x,this._nOriginalY=t.y,this._oDocument.addEventListener("pointermove",this._pointerMoveEventListener),this._oDocument.addEventListener("pointerup",this._pointerUpEventListener,{passive:!0}),this._pointerTracking=!0,this._timeout=setTimeout((()=>{try{this.startDrag()}catch(t){throw console.error(t),t}}),this._nDelay)}onPointerMove(t){this._pointerTracking&&(this.processDragMove(t),t.preventDefault())}processDragMove(t){this._nX=t.pageX-this._nOriginalX,this._nY=t.pageY-this._nOriginalY,!1===this._dragging&&(Math.abs(this._nX)>this._nDistance||Math.abs(this._nY)>this._nDistance)&&this.startDrag(),this._dragging&&this.emit("drag",this._nX,this._nY,t)}onPointerUp(t){this.processDragStop(t)}processDragStop(t){var e;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this.checkRemovePointerTrackingEventListeners(),!0===this._dragging&&(this._eBody.classList.remove("lm_dragging"),this._eElement.classList.remove("lm_dragging"),null===(e=this._oDocument.querySelector("iframe"))||void 0===e||e.style.setProperty("pointer-events",""),this._dragging=!1,this.emit("dragStop",t))}checkRemovePointerTrackingEventListeners(){this._pointerTracking&&(this._oDocument.removeEventListener("pointermove",this._pointerMoveEventListener),this._oDocument.removeEventListener("pointerup",this._pointerUpEventListener),this._pointerTracking=!1)}startDrag(){var t;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this._dragging=!0,this._eBody.classList.add("lm_dragging"),this._eElement.classList.add("lm_dragging"),null===(t=this._oDocument.querySelector("iframe"))||void 0===t||t.style.setProperty("pointer-events","none"),this.emit("dragStart",this._nOriginalX,this._nOriginalY)}getPointerCoordinates(t){return{x:t.pageX,y:t.pageY}}}class qt{constructor(t,e,i){this._isVertical=t,this._size=e,this._grabSize=i0){const i=this.createSplitter(Math.max(0,e-1)).element;e>0?(this.contentItems[e-1].element.insertAdjacentElement("afterend",i),i.insertAdjacentElement("afterend",t.element)):(this.contentItems[0].element.insertAdjacentElement("beforebegin",i),i.insertAdjacentElement("beforebegin",t.element))}else this._childElementContainer.appendChild(t.element);super.addChild(t,e);const n=1/this.contentItems.length*100;if(!0===i)return this.emitBaseBubblingEvent("stateChanged"),e;for(let e=0;e0&&(this.calculateRelativeSizes(),this.setAbsoluteSizes()),this.emitBaseBubblingEvent("stateChanged"),this.emit("resize")}setAbsoluteSizes(){const t=this.calculateAbsoluteSizes();for(let e=0;e0&&t.itemSizes[e]++,this._isColumn?(Tt(this.contentItems[e].element,t.crossAxisSize),At(this.contentItems[e].element,t.itemSizes[e])):(Tt(this.contentItems[e].element,t.itemSizes[e]),At(this.contentItems[e].element,t.crossAxisSize))}calculateAbsoluteSizes(){const t=(this.contentItems.length-1)*this._splitterSize,{width:e,height:i}=kt(this.element);let n,o;this._isColumn?(n=i-t,o=e):(n=e-t,o=i);let s=0;const r=[];for(let t=0;t0){const n=100-t;for(let t=0;t100&&e.length>0){for(let t=0;te)return;{const r=i/e;let a=i;for(let e=0;ethis.onSplitterDrag(e,t,i))),e.on("dragStop",(()=>this.onSplitterDragStop(e))),e.on("dragStart",(()=>this.onSplitterDragStart(e))),this._splitter.splice(t,0,e),e}getSplitItems(t){const e=this._splitter.indexOf(t);return{before:this.contentItems[e],after:this.contentItems[e+1]}}calculateContentItemMinSize(t){const e=t.minSize;if(void 0!==e){if(t.minSizeUnit===ht.Pixel)return e;throw new X("ROCGMD98831",JSON.stringify(t))}{const t=this.layoutManager.layoutConfig.dimensions;return this._isColumn?t.defaultMinItemHeight:t.defaultMinItemWidth}}calculateContentItemsTotalMinSize(t){let e=0;for(const i of t)e+=this.calculateContentItemMinSize(i);return e}onSplitterDragStart(t){const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=this.calculateContentItemsTotalMinSize(e.before.contentItems),s=this.calculateContentItemsTotalMinSize(e.after.contentItems);this._splitterPosition=0,this._splitterMinPosition=-1*(i-o),this._splitterMaxPosition=n-s}onSplitterDrag(t,e,i){let n=this._isColumn?i:e;if(null===this._splitterMinPosition||null===this._splitterMaxPosition)throw new K("ROCOSD59226");n=Math.max(n,this._splitterMinPosition),n=Math.min(n,this._splitterMaxPosition),this._splitterPosition=n;const o=zt(n);this._isColumn?t.element.style.top=o:t.element.style.left=o}onSplitterDragStop(t){if(null===this._splitterPosition)throw new K("ROCOSDS66932");{const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=(this._splitterPosition+i)/(i+n),s=e.before.size+e.after.size;e.before.size=o*s,e.after.size=(1-o)*s,t.element.style.top=zt(0),t.element.style.left=zt(0),globalThis.requestAnimationFrame((()=>this.updateSize(!1)))}}}!function(t){t.getElementDimensionSize=function(t,e){return"width"===e?function(t){return t.offsetWidth}(t):function(t){return t.offsetHeight}(t)},t.setElementDimensionSize=function(t,e,i){return"width"===e?Tt(t,i):At(t,i)},t.createElement=function(t,e){const i=t.createElement("div");return i.classList.add("lm_item"),e?i.classList.add("lm_column"):i.classList.add("lm_row"),i}}(Xt||(Xt={}));class Yt extends $t{constructor(t,e,i){super(t,vt.create(e),null,Yt.createElement(document)),this.isGround=!0,this._childElementContainer=this.element,this._containerElement=i;let n=null;for(;;){const t=n?n.previousSibling:this._containerElement.lastChild;if(!(t instanceof Element&&t.classList.contains("lm_content")))break;n=t}this._containerElement.insertBefore(this.element,n)}init(){if(!0!==this.isInitialised){this.updateNodeSize();for(let t=0;t0?this.contentItems[0]:this,n.isComponent)throw new Error("Cannot add item as child to ComponentItem");{const t=this.layoutManager.createAndInitContentItem(i,n);return e=n.addChild(t,e),n===this?-1:e}}loadComponentAsRoot(t){this.clearRoot();const e=Ct.resolve(t,!1);if(e.maximised)throw new Error("Root Component cannot be maximised");{const t=new jt(this.layoutManager,e,this);t.init(),this.addChild(t,0)}}addChild(t,e){if(this.contentItems.length>0)throw new Error("Ground node can only have a single child");return this._childElementContainer.appendChild(t.element),e=super.addChild(t,e),this.updateSize(!1),this.emitBaseBubblingEvent("stateChanged"),e}calculateConfigContent(){const t=this.contentItems,e=t.length,i=new Array(e);for(let n=0;n0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e)),this.updateContentItemsSize(!1))}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}createSideAreas(){const t=Yt.Area.oppositeSides,e=new Array(Object.keys(t).length);let i=0;for(const n in t){const o=n,s=this.getElementArea();if(null===s)throw new K("RCSA77553");s.side=o,"2"===t[o][1]?s[o]=s[t[o]]-50:s[o]=s[t[o]]+50,s.surface=(s.x2-s.x1)*(s.y2-s.y1),e[i++]=s}return e}highlightDropZone(t,e,i){this.layoutManager.tabDropPlaceholder.remove(),super.highlightDropZone(t,e,i)}onDrop(t,e){if(t.isComponent){const e=ut.createDefault(),i=t;e.header=mt.Header.createCopy(i.headerConfig);const n=this.layoutManager.createAndInitContentItem(e,this);n.addChild(t),t=n}if(0===this.contentItems.length)this.addChild(t);else{if(t.type===at.row||t.type===at.column){const e=ut.createDefault(),i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}const i="x"==e.side[0]?at.row:at.column,n="2"==e.side[1],o=this.contentItems[0];if(o instanceof Xt&&o.type===i){const e=o.contentItems[n?0:o.contentItems.length-1];o.addChild(t,n?0:void 0,!0),e.size*=.5,t.size=e.size,t.sizeUnit=ht.Percent,o.updateSize(!1)}else{const e=ct.createDefault(i),s=this.layoutManager.createContentItem(e,this);this.replaceChild(o,s),s.addChild(t,n?0:void 0,!0),s.addChild(o,n?void 0:0,!0),o.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}}dock(){throw new X("GID87731")}validateDocking(){throw new X("GIVD87732")}getAllContentItems(){const t=[this];return this.deepGetAllContentItems(this.contentItems,t),t}getConfigMaximisedItems(){const t=[];return this.deepFilterContentItems(this.contentItems,t,(t=>!(!Gt.isStack(t)||!t.initialWantMaximise)||!(!Gt.isComponentItem(t)||!t.initialWantMaximise))),t}getItemsByPopInParentId(t){const e=[];return this.deepFilterContentItems(this.contentItems,e,(e=>e.popInParentIds.includes(t))),e}toConfig(){throw new Error("Cannot generate GroundItem config")}setActiveComponentItem(t,e,i){}updateNodeSize(){const{width:t,height:e}=kt(this._containerElement);Tt(this.element,t),At(this.element,e),this.contentItems.length>0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e))}deepGetAllContentItems(t,e){for(let i=0;ithis.onClick(t),this._touchStartEventListener=t=>this.onTouchStart(t),this._element=document.createElement("div"),this._element.classList.add(i),this._element.title=e,this._header.on("destroy",(()=>this.destroy())),this._element.addEventListener("click",this._clickEventListener,{passive:!0}),this._element.addEventListener("touchstart",this._touchStartEventListener,{passive:!0}),this._header.controlsContainerElement.appendChild(this._element)}get element(){return this._element}destroy(){var t;this._element.removeEventListener("click",this._clickEventListener),this._element.removeEventListener("touchstart",this._touchStartEventListener),null===(t=this._element.parentNode)||void 0===t||t.removeChild(this._element)}onClick(t){this._pushEvent(t)}onTouchStart(t){this._pushEvent(t)}}class Jt{constructor(t,e,i,n,o){var s;this._layoutManager=t,this._componentItem=e,this._closeEvent=i,this._focusEvent=n,this._dragStartEvent=o,this._isActive=!1,this._tabClickListener=t=>this.onTabClickDown(t),this._tabTouchStartListener=t=>this.onTabTouchStart(t),this._closeClickListener=()=>this.onCloseClick(),this._closeTouchStartListener=()=>this.onCloseTouchStart(),this._dragStartListener=(t,e)=>this.onDragStart(t,e),this._contentItemDestroyListener=()=>this.onContentItemDestroy(),this._tabTitleChangedListener=t=>this.setTitle(t),this._element=document.createElement("div"),this._element.classList.add("lm_tab"),this._titleElement=document.createElement("span"),this._titleElement.classList.add("lm_title"),this._closeElement=document.createElement("div"),this._closeElement.classList.add("lm_close_tab"),this._element.appendChild(this._titleElement),this._element.appendChild(this._closeElement),e.isClosable?this._closeElement.style.display="":this._closeElement.style.display="none",this.setTitle(e.title),this._componentItem.on("titleChanged",this._tabTitleChangedListener);(null!==(s=e.reorderEnabled)&&void 0!==s?s:this._layoutManager.layoutConfig.settings.reorderEnabled)&&this.enableReorder(),this._element.addEventListener("click",this._tabClickListener,{passive:!0}),this._element.addEventListener("touchstart",this._tabTouchStartListener,{passive:!0}),this._componentItem.isClosable?(this._closeElement.addEventListener("click",this._closeClickListener,{passive:!0}),this._closeElement.addEventListener("touchstart",this._closeTouchStartListener,{passive:!0})):(this._closeElement.remove(),this._closeElement=void 0),this._componentItem.setTab(this),this._layoutManager.emit("tabCreated",this)}get isActive(){return this._isActive}get componentItem(){return this._componentItem}get contentItem(){return this._componentItem}get element(){return this._element}get titleElement(){return this._titleElement}get closeElement(){return this._closeElement}get reorderEnabled(){return void 0!==this._dragListener}set reorderEnabled(t){t!==this.reorderEnabled&&(t?this.enableReorder():this.disableReorder())}setTitle(t){this._titleElement.innerText=t,this._element.title=t}setActive(t){t!==this._isActive&&(this._isActive=t,t?this._element.classList.add("lm_active"):this._element.classList.remove("lm_active"))}destroy(){var t,e;this._closeEvent=void 0,this._focusEvent=void 0,this._dragStartEvent=void 0,this._element.removeEventListener("click",this._tabClickListener),this._element.removeEventListener("touchstart",this._tabTouchStartListener),null===(t=this._closeElement)||void 0===t||t.removeEventListener("click",this._closeClickListener),null===(e=this._closeElement)||void 0===e||e.removeEventListener("touchstart",this._closeTouchStartListener),this._componentItem.off("titleChanged",this._tabTitleChangedListener),this.reorderEnabled&&this.disableReorder(),this._element.remove()}setBlurred(){this._element.classList.remove("lm_focused"),this._titleElement.classList.remove("lm_focused")}setFocused(){this._element.classList.add("lm_focused"),this._titleElement.classList.add("lm_focused")}onDragStart(t,e){if(void 0===this._dragListener)throw new J("TODSDLU10093");if(void 0===this._dragStartEvent)throw new J("TODS23309");this._dragStartEvent(t,e,this._dragListener,this.componentItem)}onContentItemDestroy(){void 0!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=void 0)}onTabClickDown(t){const e=t.target;e!==this._element&&e!==this._titleElement||(0===t.button?this.notifyFocus():1===t.button&&this._componentItem.isClosable&&this.notifyClose())}onTabTouchStart(t){t.target===this._element&&this.notifyFocus()}onCloseClick(){this.notifyClose()}onCloseTouchStart(){this.notifyClose()}notifyClose(){if(void 0===this._closeEvent)throw new J("TNC15007");this._closeEvent(this._componentItem)}notifyFocus(){if(void 0===this._focusEvent)throw new J("TNA15007");this._focusEvent(this._componentItem)}enableReorder(){this._dragListener=new Zt(this._element,[this._titleElement]),this._dragListener.on("dragStart",this._dragStartListener),this._componentItem.on("destroy",this._contentItemDestroyListener)}disableReorder(){if(void 0===this._dragListener)throw new J("TDR87745");this._componentItem.off("destroy",this._contentItemDestroyListener),this._dragListener.off("dragStart",this._dragStartListener),this._dragListener=void 0}}class Qt{constructor(t,e,i,n,o){this._layoutManager=t,this._componentRemoveEvent=e,this._componentFocusEvent=i,this._componentDragStartEvent=n,this._dropdownActiveChangedEvent=o,this._tabs=[],this._lastVisibleTabIndex=-1,this._dropdownActive=!1,this._element=document.createElement("section"),this._element.classList.add("lm_tabs"),this._dropdownElement=document.createElement("section"),this._dropdownElement.classList.add("lm_tabdropdown_list"),this._dropdownElement.style.display="none"}get tabs(){return this._tabs}get tabCount(){return this._tabs.length}get lastVisibleTabIndex(){return this._lastVisibleTabIndex}get element(){return this._element}get dropdownElement(){return this._dropdownElement}get dropdownActive(){return this._dropdownActive}destroy(){for(let t=0;tthis.handleTabCloseEvent(t)),(t=>this.handleTabFocusEvent(t)),((t,e,i,n)=>this.handleTabDragStartEvent(t,e,i,n)));void 0===e&&(e=this._tabs.length),this._tabs.splice(e,0,i),ethis._lastVisibleTabIndex){const t=this._tabs[e];for(let t=e;t>0;t--)this._tabs[t]=this._tabs[t-1];this._tabs[0]=t}}updateTabSizes(t,e){let i=!1;this.tryUpdateTabSizes(i,t,e)||(i=!0,this.tryUpdateTabSizes(i,t,e)),i!==this._dropdownActive&&(this._dropdownActive=i,this._dropdownActiveChangedEvent())}tryUpdateTabSizes(t,e,i){if(this._tabs.length>0){if(void 0===i)throw new Error("non-empty tabs must have active component item");let n=0,o=!1;const s=this._layoutManager.layoutConfig.settings.tabOverlapAllowance,r=this._tabs.indexOf(i.tab),a=this._tabs[r];this._lastVisibleTabIndex=-1;for(let i=0;ie){if(o)i===r&&(l.style.zIndex="auto",l.style.marginLeft="",l.parentElement!==this._element&&this._element.appendChild(l));else{let t;if(t=r>0&&r<=i?(d-e)/(i-1):(d-e)/i,tthis.onClick(t),this._touchStartListener=t=>this.onTouchStart(t),this._rowColumnClosable=!0,this._closeButton=null,this._popoutButton=null,this._tabsContainer=new Qt(this._layoutManager,(t=>this.handleTabInitiatedComponentRemoveEvent(t)),(t=>this.handleTabInitiatedComponentFocusEvent(t)),((t,e,i,n)=>this.handleTabInitiatedDragStartEvent(t,e,i,n)),(()=>this.processTabDropdownActiveChanged())),this._show=i.show,this._popoutEnabled=i.popoutEnabled,this._popoutLabel=i.popoutLabel,this._maximiseEnabled=i.maximiseEnabled,this._maximiseLabel=i.maximiseLabel,this._minimiseEnabled=i.minimiseEnabled,this._minimiseLabel=i.minimiseLabel,this._closeEnabled=i.closeEnabled,this._closeLabel=i.closeLabel,this._tabDropdownEnabled=i.tabDropdownEnabled,this._tabDropdownLabel=i.tabDropdownLabel,this.setSide(i.side),this._canRemoveComponent=this._configClosable,this._element=document.createElement("section"),this._element.classList.add("lm_header"),this._controlsContainerElement=document.createElement("section"),this._controlsContainerElement.classList.add("lm_controls"),this._element.appendChild(this._tabsContainer.element),this._element.appendChild(this._controlsContainerElement),this._element.appendChild(this._tabsContainer.dropdownElement),this._element.addEventListener("click",this._clickListener,{passive:!0}),this._element.addEventListener("touchstart",this._touchStartListener,{passive:!0}),this._documentMouseUpListener=()=>this._tabsContainer.hideAdditionalTabsDropdown(),globalThis.document.addEventListener("mouseup",this._documentMouseUpListener,{passive:!0}),this._tabControlOffset=this._layoutManager.layoutConfig.settings.tabControlOffset,this._tabDropdownEnabled&&(this._tabDropdownButton=new Kt(this,this._tabDropdownLabel,"lm_tabdropdown",(()=>this._tabsContainer.showAdditionalTabsDropdown()))),this._popoutEnabled&&(this._popoutButton=new Kt(this,this._popoutLabel,"lm_popout",(()=>this.handleButtonPopoutEvent()))),this._maximiseEnabled&&(this._maximiseButton=new Kt(this,this._maximiseLabel,"lm_maximise",(t=>this.handleButtonMaximiseToggleEvent(t)))),this._configClosable&&(this._closeButton=new Kt(this,this._closeLabel,"lm_close",(()=>s()))),this.processTabDropdownActiveChanged()}get show(){return this._show}get side(){return this._side}get leftRightSided(){return this._leftRightSided}get layoutManager(){return this._layoutManager}get parent(){return this._parent}get tabs(){return this._tabsContainer.tabs}get lastVisibleTabIndex(){return this._tabsContainer.lastVisibleTabIndex}get element(){return this._element}get tabsContainerElement(){return this._tabsContainer.element}get controlsContainerElement(){return this._controlsContainerElement}destroy(){this.emit("destroy"),this._popoutEvent=void 0,this._maximiseToggleEvent=void 0,this._clickEvent=void 0,this._touchStartEvent=void 0,this._componentRemoveEvent=void 0,this._componentFocusEvent=void 0,this._componentDragStartEvent=void 0,this._tabsContainer.destroy(),globalThis.document.removeEventListener("mouseup",this._documentMouseUpListener),this._element.remove()}createTab(t,e){this._tabsContainer.createTab(t,e)}removeTab(t){this._tabsContainer.removeTab(t)}processActiveComponentChanged(t){this._tabsContainer.processActiveComponentChanged(t),this.updateTabSizes()}setSide(t){this._side=t,this._leftRightSided=[nt.right,nt.left].includes(this._side)}setRowColumnClosable(t){this._rowColumnClosable=t,this.updateClosability()}updateClosability(){let t;if(this._configClosable)if(this._rowColumnClosable){t=!0;const e=this.tabs.length;for(let i=0;i1}applyFocusedValue(t){t?this._element.classList.add("lm_focused"):this._element.classList.remove("lm_focused")}processMaximised(){if(void 0===this._maximiseButton)throw new J("HPMAX16997");this._maximiseButton.element.setAttribute("title",this._minimiseLabel)}processMinimised(){if(void 0===this._maximiseButton)throw new J("HPMIN16997");this._maximiseButton.element.setAttribute("title",this._maximiseLabel)}updateTabSizes(){if(this._tabsContainer.tabCount>0){const t=this._show?this._layoutManager.layoutConfig.dimensions.headerHeight:0;let e;this._leftRightSided?(this._element.style.height="",this._element.style.width=zt(t)):(this._element.style.width="",this._element.style.height=zt(t)),e=this._leftRightSided?this._element.offsetHeight-this._controlsContainerElement.offsetHeight-this._tabControlOffset:this._element.offsetWidth-this._controlsContainerElement.offsetWidth-this._tabControlOffset,this._tabsContainer.updateTabSizes(e,this._getActiveComponentItemEvent())}}handleTabInitiatedComponentRemoveEvent(t){if(this._canRemoveComponent){if(void 0===this._componentRemoveEvent)throw new J("HHTCE22294");this._componentRemoveEvent(t)}}handleTabInitiatedComponentFocusEvent(t){if(void 0===this._componentFocusEvent)throw new J("HHTAE22294");this._componentFocusEvent(t)}handleTabInitiatedDragStartEvent(t,e,i,n){if(this._canRemoveComponent){if(void 0===this._componentDragStartEvent)throw new J("HHTDSE22294");this._componentDragStartEvent(t,e,i,n)}else i.cancelDrag()}processTabDropdownActiveChanged(){void 0!==this._tabDropdownButton&&Dt(this._tabDropdownButton.element,this._tabsContainer.dropdownActive)}handleButtonPopoutEvent(){if(this._layoutManager.layoutConfig.settings.popoutWholeStack){if(void 0===this._popoutEvent)throw new J("HHBPOE17834");this._popoutEvent()}else{const t=this._getActiveComponentItemEvent();t&&t.popout()}}handleButtonMaximiseToggleEvent(t){if(void 0===this._maximiseToggleEvent)throw new J("HHBMTE16834");this._maximiseToggleEvent()}onClick(t){t.target===this._element&&this.notifyClick(t)}onTouchStart(t){t.target===this._element&&this.notifyTouchStart(t)}notifyClick(t){if(void 0===this._clickEvent)throw new J("HNHC46834");this._clickEvent(t)}notifyTouchStart(t){if(void 0===this._touchStartEvent)throw new J("HNHTS46834");this._touchStartEvent(t)}}class ee extends $t{constructor(t,e,i){var n,o,s,r,a,l,h,d,c,m,u,p,g,f,v,_,y,C,w;super(t,e,i,ee.createElement(document)),this._headerSideChanged=!1,this._resizeListener=()=>this.handleResize(),this._maximisedListener=()=>this.handleMaximised(),this._minimisedListener=()=>this.handleMinimised(),this._headerConfig=e.header;const I=t.layoutConfig.header,b=e.content;let S;if(1!==b.length)S=void 0;else{S=b[0].header}this._initialWantMaximise=e.maximised,this._initialActiveItemIndex=null!==(n=e.activeItemIndex)&&void 0!==n?n:0;const E=null!==(r=null!==(s=null===(o=this._headerConfig)||void 0===o?void 0:o.show)&&void 0!==s?s:null==S?void 0:S.show)&&void 0!==r?r:I.show,x=null!==(h=null!==(l=null===(a=this._headerConfig)||void 0===a?void 0:a.popout)&&void 0!==l?l:null==S?void 0:S.popout)&&void 0!==h?h:I.popout,L=null!==(m=null!==(c=null===(d=this._headerConfig)||void 0===d?void 0:d.maximise)&&void 0!==c?c:null==S?void 0:S.maximise)&&void 0!==m?m:I.maximise,z=null!==(g=null!==(p=null===(u=this._headerConfig)||void 0===u?void 0:u.close)&&void 0!==p?p:null==S?void 0:S.close)&&void 0!==g?g:I.close,M=null!==(_=null!==(v=null===(f=this._headerConfig)||void 0===f?void 0:f.minimise)&&void 0!==v?v:null==S?void 0:S.minimise)&&void 0!==_?_:I.minimise,P=null!==(w=null!==(C=null===(y=this._headerConfig)||void 0===y?void 0:y.tabDropdown)&&void 0!==C?C:null==S?void 0:S.tabDropdown)&&void 0!==w?w:I.tabDropdown;this._maximisedEnabled=!1!==L;const T={show:!1!==E,side:!1===E?nt.top:E,popoutEnabled:!1!==x,popoutLabel:!1===x?"":x,maximiseEnabled:this._maximisedEnabled,maximiseLabel:!1===L?"":L,closeEnabled:!1!==z,closeLabel:!1===z?"":z,minimiseEnabled:!0,minimiseLabel:M,tabDropdownEnabled:!1!==P,tabDropdownLabel:!1===P?"":P};this._header=new te(t,this,T,e.isClosable&&!1!==z,(()=>this.getActiveComponentItem()),(()=>this.remove()),(()=>this.handlePopoutEvent()),(()=>this.toggleMaximise()),(t=>this.handleHeaderClickEvent(t)),(t=>this.handleHeaderTouchStartEvent(t)),(t=>this.handleHeaderComponentRemoveEvent(t)),(t=>this.handleHeaderComponentFocusEvent(t)),((t,e,i,n)=>this.handleHeaderComponentStartDragEvent(t,e,i,n))),this.isStack=!0,this._childElementContainer=document.createElement("section"),this._childElementContainer.classList.add("lm_items"),this.on("resize",this._resizeListener),this._maximisedEnabled&&(this.on("maximised",this._maximisedListener),this.on("minimised",this._minimisedListener)),this.element.appendChild(this._header.element),this.element.appendChild(this._childElementContainer),this.setupHeaderPosition(),this._header.updateClosability()}get childElementContainer(){return this._childElementContainer}get header(){return this._header}get headerShow(){return this._header.show}get headerSide(){return this._header.side}get headerLeftRightSided(){return this._header.leftRightSided}get contentAreaDimensions(){return this._contentAreaDimensions}get initialWantMaximise(){return this._initialWantMaximise}get isMaximised(){return this===this.layoutManager.maximisedStack}get stackParent(){if(!this.parent)throw new Error("Stack should always have a parent");return this.parent}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}init(){if(!0===this.isInitialised)return;this.updateNodeSize();for(let t=0;t0){if(this._initialActiveItemIndex<0||this._initialActiveItemIndex>=e)throw new Error(`ActiveItemIndex out of range: ${this._initialActiveItemIndex} id: ${this.id}`);for(let i=0;ithis.contentItems.length)throw e-=1,new X("SAC99728");if(t instanceof jt)return e=super.addChild(t,e),this._childElementContainer.appendChild(t.element),this._header.createTab(t,e),this.setActiveComponentItem(t,i),this._header.updateTabSizes(),this.updateSize(!1),t.container.setBaseLogicalZIndex(),this._header.updateClosability(),this.emitStateChangedEvent(),e;throw new X("SACC88532")}removeChild(t,e){const i=t,n=this.contentItems.indexOf(i),o=1===this.contentItems.length;if(this._activeComponentItem===i&&(i.focused&&i.blur(),!o)){const t=0===n?1:n-1;this.setActiveComponentItem(this.contentItems[t],!1)}this._header.removeTab(i),super.removeChild(i,e),o||this._header.updateClosability(),this.emitStateChangedEvent()}toggleMaximise(){this.isMaximised?this.minimise():this.maximise()}maximise(){if(!this.isMaximised){this.layoutManager.setMaximisedStack(this);const t=this.contentItems,e=t.length;for(let i=0;i0&&void 0===t)throw new Error("expected non-empty stack to have an active component item");return{type:"stack",content:this.calculateConfigContent(),size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,isClosable:this.isClosable,maximised:this.isMaximised,header:this.createHeaderConfig(),activeItemIndex:t}}onDrop(t,e){if("header"===this._dropSegment){if(this.resetHeaderDropZone(),void 0===this._dropIndex)throw new J("SODDI68990");return void this.addChild(t,this._dropIndex)}if("body"===this._dropSegment)return void this.addChild(t,0,!0);const i="top"===this._dropSegment||"bottom"===this._dropSegment,n="left"===this._dropSegment||"right"===this._dropSegment,o="top"===this._dropSegment||"left"===this._dropSegment,s=i&&this.stackParent.isColumn||n&&this.stackParent.isRow;if(t.isComponent){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createAndInitContentItem(e,this);i.addChild(t),t=i}if(t.type===at.row||t.type===at.column){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}if(s){const e=this.stackParent.contentItems.indexOf(this);this.stackParent.addChild(t,o?e:e+1,!0),this.size*=.5,t.size=this.size,t.sizeUnit=this.sizeUnit,this.stackParent.updateSize(!1)}else{const e=i?at.column:at.row,n=ct.createDefault(e),s=this.layoutManager.createContentItem(n,this);this.stackParent.replaceChild(this,s),s.addChild(t,o?0:void 0,!0),s.addChild(this,o?void 0:0,!0),this.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}highlightDropZone(t,e){for(const i in this._contentAreaDimensions){const n=i,o=this._contentAreaDimensions[n].hoverArea;if(o.x1t&&o.y1e)return void("header"===n?(this._dropSegment="header",this.highlightHeaderDropZone(this._header.leftRightSided?e:t)):(this.resetHeaderDropZone(),this.highlightBodyDropZone(n)))}}getArea(){if("none"===this.element.style.display)return null;const t=super.getElementArea(this._header.element),e=super.getElementArea(this._childElementContainer);if(null===t||null===e)throw new K("SGAHC13086");const i=e.x2-e.x1,n=e.y2-e.y1;return this._contentAreaDimensions={header:{hoverArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2},highlightArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2}}},0===this.contentItems.length?(this._contentAreaDimensions.body={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2}},super.getElementArea(this.element)):(this._contentAreaDimensions.left={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x1+.25*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x1+.5*i,y2:e.y2}},this._contentAreaDimensions.top={hoverArea:{x1:e.x1+.25*i,y1:e.y1,x2:e.x1+.75*i,y2:e.y1+.5*n},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y1+.5*n}},this._contentAreaDimensions.right={hoverArea:{x1:e.x1+.75*i,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1+.5*i,y1:e.y1,x2:e.x2,y2:e.y2}},this._contentAreaDimensions.bottom={hoverArea:{x1:e.x1+.25*i,y1:e.y1+.5*n,x2:e.x1+.75*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1+.5*n,x2:e.x2,y2:e.y2}},super.getElementArea(this.element))}positionHeader(t){this._header.side!==t&&(this._header.setSide(t),this._headerSideChanged=!0,this.setupHeaderPosition())}updateNodeSize(){if("none"!==this.element.style.display){const t=kt(this.element);if(this._header.show){t[this._header.leftRightSided?it.width:it.height]-=this.layoutManager.layoutConfig.dimensions.headerHeight}this._childElementContainer.style.width=zt(t.width),this._childElementContainer.style.height=zt(t.height);for(let e=0;e=o&&tthis.onDrag(t,e,i))),this._dragListener.on("dragStop",(()=>this.onDrop())),this.createDragProxyElements(t,e),null===this._componentItem.parent)throw new K("DPC10097");this._componentItemFocused=this._componentItem.focused,this._componentItemFocused&&this._componentItem.blur(),this._componentItem.parent.removeChild(this._componentItem,!0),this.setDimensions(),document.body.appendChild(this._element),this.determineMinMaxXY(),this._layoutManager.calculateItemAreas(),this.setDropPosition(t,e)}get element(){return this._element}createDragProxyElements(t,e){this._element=document.createElement("div"),this._element.classList.add("lm_dragProxy");const i=document.createElement("div");i.classList.add("lm_header");const n=document.createElement("div");n.classList.add("lm_tabs");const o=document.createElement("div");o.classList.add("lm_tab");const s=document.createElement("span");s.classList.add("lm_title"),o.appendChild(s),n.appendChild(o),i.appendChild(n),this._proxyContainerElement=document.createElement("div"),this._proxyContainerElement.classList.add("lm_content"),this._element.appendChild(i),this._element.appendChild(this._proxyContainerElement),this._originalParent instanceof ee&&this._originalParent.headerShow&&(this._sided=this._originalParent.headerLeftRightSided,this._element.classList.add("lm_"+this._originalParent.headerSide),[nt.right,nt.bottom].indexOf(this._originalParent.headerSide)>=0&&this._proxyContainerElement.insertAdjacentElement("afterend",i)),this._element.style.left=zt(t),this._element.style.top=zt(e),o.setAttribute("title",this._componentItem.title),s.insertAdjacentText("afterbegin",this._componentItem.title),this._proxyContainerElement.appendChild(this._componentItem.element)}determineMinMaxXY(){const t=this._layoutManager.groundItem;if(void 0===t)throw new J("DPDMMXY73109");{const e=t.element.getBoundingClientRect();this._minX=e.left+document.body.scrollLeft,this._minY=e.top+document.body.scrollTop,this._maxX=this._minX+e.width,this._maxY=this._minY+e.height}}onDrag(t,e,i){const n=i.pageX,o=i.pageY;this.setDropPosition(n,o),this._componentItem.drag()}setDropPosition(t,e){this._layoutManager.layoutConfig.settings.constrainDragToContainer&&(t<=this._minX?t=Math.ceil(this._minX):t>=this._maxX&&(t=Math.floor(this._maxX)),e<=this._minY?e=Math.ceil(this._minY):e>=this._maxY&&(e=Math.floor(this._maxY))),this._element.style.left=zt(t),this._element.style.top=zt(e),this._area=this._layoutManager.getArea(t,e),null!==this._area&&(this._lastValidArea=this._area,this._area.contentItem.highlightDropZone(t,e,this._area))}onDrop(){const t=this._layoutManager.dropTargetIndicator;if(null===t)throw new K("DPOD30011");let e;if(t.hide(),this._componentItem.exitDragMode(),null!==this._area)e=this._componentItem,this._area.contentItem.onDrop(e,this._area);else if(null!==this._lastValidArea){e=this._componentItem;this._lastValidArea.contentItem.onDrop(e,this._lastValidArea)}else this._originalParent?(e=this._componentItem,this._originalParent.addChild(e)):this._componentItem.destroy();this._element.remove(),this._layoutManager.emit("itemDropped",this._componentItem),this._componentItemFocused&&void 0!==e&&e.focus()}setDimensions(){const t=this._layoutManager.layoutConfig.dimensions;if(void 0===t)throw new Error("DragProxy.setDimensions: dimensions undefined");let e=t.dragProxyWidth,i=t.dragProxyHeight;if(void 0===e||void 0===i)throw new Error("DragProxy.setDimensions: width and/or height undefined");const n=!1===this._layoutManager.layoutConfig.header.show?0:t.headerHeight;this._element.style.width=zt(e),this._element.style.height=zt(i),e-=this._sided?n:0,i-=this._sided?0:n,this._proxyContainerElement.style.width=zt(e),this._proxyContainerElement.style.height=zt(i),this._componentItem.enterDragMode(e,i),this._componentItem.show()}}class ne{constructor(t,e,i,n,o,s,r){this._layoutManager=t,this._element=e,this._extraAllowableChildTargets=i,this._componentTypeOrFtn=n,this._componentState=o,this._title=s,this._id=r,this._dragListener=null,this._dummyGroundContainer=document.createElement("div");const a=gt.createDefault("row");this._dummyGroundContentItem=new Yt(this._layoutManager,a,this._dummyGroundContainer),this.createDragListener()}destroy(){this.removeDragListener()}createDragListener(){this.removeDragListener(),this._dragListener=new Zt(this._element,this._extraAllowableChildTargets),this._dragListener.on("dragStart",((t,e)=>this.onDragStart(t,e))),this._dragListener.on("dragStop",(()=>this.onDragStop()))}onDragStart(t,e){var i;const n="component";let o;if("function"==typeof this._componentTypeOrFtn){const t=this._componentTypeOrFtn();o=ne.isDragSourceComponentItemConfig(t)?{type:n,componentState:t.state,componentType:t.type,title:null!==(i=t.title)&&void 0!==i?i:this._title}:t}else o={type:n,componentState:this._componentState,componentType:this._componentTypeOrFtn,title:this._title,id:this._id};const s=bt.resolve(o,!1),r=new jt(this._layoutManager,s,this._dummyGroundContentItem);if(this._dummyGroundContentItem.contentItems.push(r),null===this._dragListener)throw new K("DSODSD66746");{const i=new ie(t,e,this._dragListener,this._layoutManager,r,this._dummyGroundContentItem),n=this._layoutManager.transitionIndicator;if(null===n)throw new K("DSODST66746");n.transitionElements(this._element,i.element)}}onDragStop(){this.createDragListener()}removeDragListener(){null!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=null)}}!function(t){t.isDragSourceComponentItemConfig=function(t){return!("componentType"in t)}}(ne||(ne={}));class oe{constructor(){this._element=document.createElement("div"),this._element.classList.add("lm_dropTargetIndicator");const t=document.createElement("div");t.classList.add("lm_inner"),this._element.appendChild(t),document.body.appendChild(this._element)}destroy(){this._element.remove()}highlightArea(t,e){this._element.style.left=zt(t.x1+e),this._element.style.top=zt(t.y1+e),this._element.style.width=zt(t.x2-t.x1-e),this._element.style.height=zt(t.y2-t.y1-e),this._element.style.display="block"}hide(){Dt(this._element,!1)}}class se{constructor(){this._element=document.createElement("div"),this._element.classList.add("lm_transition_indicator"),document.body.appendChild(this._element),this._toElement=null,this._fromDimensions=null,this._totalAnimationDuration=200,this._animationStartTime=null}destroy(){this._element.remove()}transitionElements(t,e){}nextAnimationFrame(){}measure(t){const e=t.getBoundingClientRect();return{left:e.left,top:e.top,width:t.offsetWidth,height:t.offsetHeight}}}class re extends Wt{constructor(t){super(),this._layoutManager=t,this._childEventListener=t=>this.onEventFromChild(t),globalThis.addEventListener(re.ChildEventName,this._childEventListener,{passive:!0})}emit(t,...e){"userBroadcast"===t?this.emitUserBroadcast(...e):super.emit(t,...e)}emitUserBroadcast(...t){this.handleUserBroadcastEvent("userBroadcast",t)}destroy(){globalThis.removeEventListener(re.ChildEventName,this._childEventListener)}handleUserBroadcastEvent(t,e){this._layoutManager.isSubWindow?this.propagateToParent(t,e):this.propagateToThisAndSubtree(t,e)}onEventFromChild(t){const e=t.detail;this.handleUserBroadcastEvent(e.eventName,e.args)}propagateToParent(t,e){const i={bubbles:!0,cancelable:!0,detail:{layoutManager:this._layoutManager,eventName:t,args:e}},n=new CustomEvent(re.ChildEventName,i),o=globalThis.opener;if(null===o)throw new K("EHPTP15778");o.dispatchEvent(n)}propagateToThisAndSubtree(t,e){this.emitUnknown(t,...e);for(let i=0;ithis.handleContainerResize())),this._windowBeforeUnloadListener=()=>this.onBeforeUnload(),this._windowBeforeUnloadListening=!1,this._maximisedStackBeforeDestroyedListener=t=>this.cleanupBeforeMaximisedStackDestroyed(t),this.isSubWindow=t.isSubWindow,this._constructorOrSubWindowLayoutConfig=t.constructorOrSubWindowLayoutConfig,Q.checkInitialise(),dt.checkInitialise(),void 0!==t.containerElement&&(this._containerElement=t.containerElement)}get container(){return this._containerElement}get isInitialised(){return this._isInitialised}get groundItem(){return this._groundItem}get root(){return this._groundItem}get openPopouts(){return this._openPopouts}get dropTargetIndicator(){return this._dropTargetIndicator}get transitionIndicator(){return this._transitionIndicator}get width(){return this._width}get height(){return this._height}get eventHub(){return this._eventHub}get rootItem(){if(void 0===this._groundItem)throw new Error("Cannot access rootItem before init");return 0===this._groundItem.contentItems.length?void 0:this._groundItem.contentItems[0]}get focusedComponentItem(){return this._focusedComponentItem}get tabDropPlaceholder(){return this._tabDropPlaceholder}get maximisedStack(){return this._maximisedStack}get deprecatedConstructor(){return!this.isSubWindow&&void 0!==this._constructorOrSubWindowLayoutConfig}destroy(){if(this._isInitialised){this._windowBeforeUnloadListening&&(globalThis.removeEventListener("beforeunload",this._windowBeforeUnloadListener),this._windowBeforeUnloadListening=!1),!0===this.layoutConfig.settings.closePopoutsOnUnload&&this.closeAllOpenPopouts(),this._resizeObserver.disconnect(),this.checkClearResizeTimeout(),void 0!==this._groundItem&&this._groundItem.destroy(),this._tabDropPlaceholder.remove(),null!==this._dropTargetIndicator&&this._dropTargetIndicator.destroy(),null!==this._transitionIndicator&&this._transitionIndicator.destroy(),this._eventHub.destroy();for(const t of this._dragSources)t.destroy();this._dragSources=[],this._isInitialised=!1}}minifyConfig(t){return _t.minifyConfig(t)}unminifyConfig(t){return _t.unminifyConfig(t)}init(){let t;if(this.setContainer(),this._dropTargetIndicator=new oe,this._transitionIndicator=new se,this.updateSizeFromContainer(),this.isSubWindow){if(void 0===this._constructorOrSubWindowLayoutConfig)throw new J("LMIU07155");{const e=this._constructorOrSubWindowLayoutConfig.root;if(void 0===e)throw new X("LMIC07156");if(!Ct.isComponent(e))throw new X("LMIC07157");t=e;const i=xt.resolve(this._constructorOrSubWindowLayoutConfig);this.layoutConfig=Object.assign(Object.assign({},i),{root:void 0})}}else void 0===this._constructorOrSubWindowLayoutConfig?this.layoutConfig=_t.createDefault():this.layoutConfig=xt.resolve(this._constructorOrSubWindowLayoutConfig);const e=this.layoutConfig;this._groundItem=new Yt(this,e.root,this._containerElement),this._groundItem.init(),this.checkLoadedLayoutMaximiseItem(),this._resizeObserver.observe(this._containerElement),this._isInitialised=!0,this.adjustColumnsResponsive(),this.emit("initialised"),void 0!==t&&this.loadComponentAsRoot(t)}loadLayout(t){if(!this.isInitialised)throw new Error("GoldenLayout: Need to call init() if LayoutConfig with defined root passed to constructor");if(void 0===this._groundItem)throw new J("LMLL11119");this.createSubWindows(),this.layoutConfig=xt.resolve(t),this._groundItem.loadRoot(this.layoutConfig.root),this.checkLoadedLayoutMaximiseItem(),this.adjustColumnsResponsive()}saveLayout(){if(!1===this._isInitialised)throw new Error("Can't create config, layout not yet initialised");if(void 0===this._groundItem)throw new J("LMTC18244");{const t=this._groundItem.calculateConfigContent();let e;e=1!==t.length?void 0:t[0],this.reconcilePopoutWindows();const i=[];for(let t=0;t=0?n=this._groundItem.contentItems[0]:e=0;break;case at.row:case at.column:e=n.addItem(t,i.index);break;case at.stack:if(Ct.isComponent(t)){e=n.addItem(t,i.index);break}throw Error(tt[6]);case at.component:throw new X("LMAIALC87444602");default:throw new Y("LMAIALU98881733",n.type)}if(Ct.isComponent(t)){const t=n.contentItems[e];Gt.isStack(t)&&(n=t,e=0)}return i.parentItem=n,i.index=e,i}}}loadComponentAsRoot(t){if(void 0===this._groundItem)throw new Error("Cannot add item before init");this._groundItem.loadComponentAsRoot(t)}updateSize(t,e){this.setSize(t,e)}setSize(t,e){if(this._width=t,this._height=e,!0===this._isInitialised){if(void 0===this._groundItem)throw new J("LMUS18881");if(this._groundItem.setSize(this._width,this._height),this._maximisedStack){const{width:t,height:e}=kt(this._containerElement);Tt(this._maximisedStack.element,t),At(this._maximisedStack.element,e),this._maximisedStack.updateSize(!1)}this.adjustColumnsResponsive()}}beginSizeInvalidation(){this._sizeInvalidationBeginCount++}endSizeInvalidation(){0==--this._sizeInvalidationBeginCount&&this.updateSizeFromContainer()}updateSizeFromContainer(){const{width:t,height:e}=kt(this._containerElement);this.setSize(t,e)}updateRootSize(t=!1){if(void 0===this._groundItem)throw new J("LMURS28881");this._groundItem.updateSize(t)}createAndInitContentItem(t,e){const i=this.createContentItem(t,e);return i.init(),i}createContentItem(t,e){if("string"!=typeof t.type)throw new G("Missing parameter 'type'",JSON.stringify(t));if(ct.isComponentItem(t)&&!(e instanceof ee)&&e&&!(!0===this.isSubWindow&&e instanceof Yt)){t={type:at.stack,content:[t],size:t.size,sizeUnit:t.sizeUnit,minSize:t.minSize,minSizeUnit:t.minSizeUnit,id:t.id,maximised:t.maximised,isClosable:t.isClosable,activeItemIndex:0,header:void 0}}return this.createContentItemFromConfig(t,e)}findFirstComponentItemById(t){if(void 0===this._groundItem)throw new J("LMFFCIBI82446");return this.findFirstContentItemTypeByIdRecursive(at.component,t,this._groundItem)}createPopout(t,e,i,n){return t instanceof Gt?this.createPopoutFromContentItem(t,e,i,n):this.createPopoutFromItemConfig(t,e,i,n)}createPopoutFromContentItem(t,e,i,n){let o=t.parent,s=t;for(;null!==o&&1===o.contentItems.length&&!o.isGround;)s=o,o=o.parent;if(null===o)throw new K("LMCPFCI00834");{if(void 0===n&&(n=o.contentItems.indexOf(s)),null!==i&&o.addPopInParentId(i),void 0===e){const i=globalThis.screenX||globalThis.screenLeft,n=globalThis.screenY||globalThis.screenTop,o=t.element.offsetLeft,s=t.element.offsetTop,{width:r,height:a}=kt(t.element);e={left:i+o,top:n+s,width:r,height:a}}const r=t.toConfig();if(t.remove(),ft.isRootItemConfig(r))return this.createPopoutFromItemConfig(r,e,i,n);throw new Error(`${tt[0]}`)}}beginVirtualSizedContainerAdding(){0==++this._virtualSizedContainerAddingBeginCount&&(this._virtualSizedContainers.length=0)}addVirtualSizedContainer(t){this._virtualSizedContainers.push(t)}endVirtualSizedContainerAdding(){if(0==--this._virtualSizedContainerAddingBeginCount){const t=this._virtualSizedContainers.length;if(t>0){this.fireBeforeVirtualRectingEvent(t);for(let e=0;ethis.emit("windowOpened",a))),a.on("closed",(()=>this.reconcilePopoutWindows())),this._openPopouts.push(a),this.layoutConfig.settings.closePopoutsOnUnload&&!this._windowBeforeUnloadListening&&(globalThis.addEventListener("beforeunload",this._windowBeforeUnloadListener,{passive:!0}),this._windowBeforeUnloadListening=!0),a}closeAllOpenPopouts(){for(let t=0;tglobalThis.close()),1)}getArea(t,e){let i=null,n=1/0;for(let o=0;o=s.x1&&t=s.y1&&es.surface&&(n=s.surface,i=s)}return i}calculateItemAreas(){const t=this.getAllContentItems(),e=this._groundItem;if(void 0===e)throw new J("LMCIAR44365");if(1!==t.length){e.contentItems[0].isStack?this._itemAreas=[]:this._itemAreas=e.createSideAreas();for(let e=0;e0){let e=t[0];if(Gt.isComponentItem(e)){const t=e.parent;if(null===t)throw new K("LMXLLMI69999");e=t}if(!Gt.isStack(e))throw new X("LMCLLMI19993");e.maximise()}}}processMaximiseStack(t){if(this._maximisedStack=t,t.on("beforeItemDestroyed",this._maximisedStackBeforeDestroyedListener),t.element.classList.add("lm_maximised"),t.element.insertAdjacentElement("afterend",this._maximisePlaceholder),void 0===this._groundItem)throw new J("LMMXI19993");{this._groundItem.element.prepend(t.element);const{width:e,height:i}=kt(this._containerElement);Tt(t.element,e),At(t.element,i),t.updateSize(!0),t.focusActiveContentItem(),this._maximisedStack.emit("maximised"),this.emit("stateChanged")}}processMinimiseMaximisedStack(){if(void 0===this._maximisedStack)throw new X("LMMMS74422");{const t=this._maximisedStack;if(null===t.parent)throw new K("LMMI13668");t.element.classList.remove("lm_maximised"),this._maximisePlaceholder.insertAdjacentElement("afterend",t.element),this._maximisePlaceholder.remove(),this.updateRootSize(!0),this._maximisedStack=void 0,t.off("beforeItemDestroyed",this._maximisedStackBeforeDestroyedListener),t.emit("minimised"),this.emit("stateChanged")}}reconcilePopoutWindows(){const t=[];for(let e=0;e{this._resizeTimeoutId=void 0,this.beginSizeInvalidation(),this.endSizeInvalidation()}),this.resizeDebounceInterval))}checkClearResizeTimeout(){void 0!==this._resizeTimeoutId&&(clearTimeout(this._resizeTimeoutId),this._resizeTimeoutId=void 0)}setContainer(){var t;const e=document.body,i=null!==(t=this._containerElement)&&void 0!==t?t:e;if(i===e){this.resizeWithContainerAutomatically=!0;const t=document.documentElement;t.style.height="100%",t.style.margin="0",t.style.padding="0",t.style.overflow="clip",e.style.height="100%",e.style.margin="0",e.style.padding="0",e.style.overflow="clip"}this._containerElement=i}onBeforeUnload(){this.destroy()}adjustColumnsResponsive(){if(void 0===this._groundItem)throw new J("LMACR20883");if(this._firstLoad=!1,this.useResponsiveLayout()&&!this._updatingColumnsResponsive&&this._groundItem.contentItems.length>0&&this._groundItem.contentItems[0].isRow){if(void 0===this._groundItem||null===this._width)throw new J("LMACR77412");{const t=this._groundItem.contentItems[0].contentItems.length;if(t<=1)return;{const e=this.layoutConfig.dimensions.defaultMinItemWidth;if(t*e<=this._width)return;{this._updatingColumnsResponsive=!0;const i=t-Math.max(Math.floor(this._width/e),1),n=this._groundItem.contentItems[0],o=this.getAllStacks();if(0===o.length)throw new X("LMACRS77413");{const t=o[0];for(let e=0;en?void 0:{parentItem:t,index:o}}}case 1:if(void 0===this._focusedComponentItem)return;{const t=this._focusedComponentItem.parentItem;return this.tryCreateLocationFromParentItem(t,e)}case 2:{const t=this.findFirstContentItemType(at.stack);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 3:{let t=this.findFirstContentItemType(at.row);return void 0!==t?this.tryCreateLocationFromParentItem(t,e):(t=this.findFirstContentItemType(at.column),void 0!==t?this.tryCreateLocationFromParentItem(t,e):void 0)}case 4:{const t=this.findFirstContentItemType(at.row);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 5:{const t=this.findFirstContentItemType(at.column);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 6:if(void 0===this._groundItem)throw new J("LMFLRIF18244");return void 0!==this.rootItem?void 0:void 0===e||0===e?{parentItem:this._groundItem,index:0}:void 0;case 7:if(void 0===this._groundItem)throw new J("LMFLF18244");{const t=this._groundItem.contentItems;if(0===t.length)return void 0===e||0===e?{parentItem:this._groundItem,index:0}:void 0;{const i=t[0];return this.tryCreateLocationFromParentItem(i,e)}}}}tryCreateLocationFromParentItem(t,e){const i=t.contentItems.length;return void 0===e?{parentItem:t,index:i}:e<0||e>i?void 0:{parentItem:t,index:e}}}!function(t){t.createMaximisePlaceElement=function(t){const e=t.createElement("div");return e.classList.add("lm_maximise_place"),e},t.createTabDropPlaceholderElement=function(t){const e=t.createElement("div");return e.classList.add("lm_drop_tab_placeholder"),e},t.defaultLocationSelectors=[{typeId:1,index:void 0},{typeId:2,index:void 0},{typeId:3,index:void 0},{typeId:7,index:void 0}],t.afterFocusedItemIfPossibleLocationSelectors=[{typeId:0,index:1},{typeId:2,index:void 0},{typeId:3,index:void 0},{typeId:7,index:void 0}]}(ae||(ae={}));class le extends ae{constructor(t,e,i,n){if(super(le.createLayoutManagerConstructorParameters(t,e)),this._bindComponentEventHanlderPassedInConstructor=!1,this._creationTimeoutPassed=!1,void 0!==e&&"function"==typeof e&&(this.bindComponentEvent=e,this._bindComponentEventHanlderPassedInConstructor=!0,void 0!==i&&(this.unbindComponentEvent=i)),!this._bindComponentEventHanlderPassedInConstructor&&this.isSubWindow){if(void 0===this._constructorOrSubWindowLayoutConfig)throw new J("VLC98823");{const t=xt.resolve(this._constructorOrSubWindowLayoutConfig);this.layoutConfig=Object.assign(Object.assign({},t),{root:void 0})}}!0!==n&&(this.deprecatedConstructor||this.init())}destroy(){this.bindComponentEvent=void 0,this.unbindComponentEvent=void 0,super.destroy()}init(){if(this._bindComponentEventHanlderPassedInConstructor||"loading"!==document.readyState&&null!==document.body){if(!this._bindComponentEventHanlderPassedInConstructor&&!0===this.isSubWindow&&!this._creationTimeoutPassed)return setTimeout((()=>this.init()),7),void(this._creationTimeoutPassed=!0);!0===this.isSubWindow&&(this._bindComponentEventHanlderPassedInConstructor||this.clearHtmlAndAdjustStylesForSubWindow(),window.__glInstance=this),super.init()}else document.addEventListener("DOMContentLoaded",(()=>this.init()),{passive:!0})}clearHtmlAndAdjustStylesForSubWindow(){const t=document.head,e=new Array(4);e[0]=document.querySelectorAll("body link"),e[1]=document.querySelectorAll("body style"),e[2]=document.querySelectorAll("template"),e[3]=document.querySelectorAll(".gl_keep");for(let i=0;ithis.emit("popIn"))),document.body.appendChild(t),!0}}bindComponent(t,e){if(void 0!==this.bindComponentEvent){return this.bindComponentEvent(t,e)}if(void 0!==this.getComponentEvent)return{virtual:!1,component:this.getComponentEvent(t,e)};{const t=`${tt[2]}: ${JSON.stringify(e)}`;throw new Z(t)}}unbindComponent(t,e,i){if(void 0!==this.unbindComponentEvent)this.unbindComponentEvent(t);else if(!e&&void 0!==this.releaseComponentEvent){if(void 0===i)throw new J("VCUCRCU333998");this.releaseComponentEvent(t,i)}}}!function(t){let e=!1;t.createLayoutManagerConstructorParameters=function(t,i){const n=e?null:new URL(document.location.href).searchParams.get("gl-window");e=!0;const o=null!==n;let s,r;if(null!==n){const e=localStorage.getItem(n);if(null===e)throw new Error("Null gl-window Config");localStorage.removeItem(n);const i=JSON.parse(e),o=_t.unminifyConfig(i);r=xt.fromResolved(o),t instanceof HTMLElement&&(s=t)}else void 0===t?r=void 0:t instanceof HTMLElement?(r=void 0,s=t):r=t,void 0===s&&i instanceof HTMLElement&&(s=i);return{constructorOrSubWindowLayoutConfig:r,isSubWindow:o,containerElement:s}}}(le||(le={}));class he extends le{constructor(t,e,i){super(t,e,i,!0),this._componentTypesMap=new Map,this._registeredComponentMap=new Map,this._virtuableComponentMap=new Map,this._containerVirtualRectingRequiredEventListener=(t,e,i)=>this.handleContainerVirtualRectingRequiredEvent(t,e,i),this._containerVirtualVisibilityChangeRequiredEventListener=(t,e)=>this.handleContainerVirtualVisibilityChangeRequiredEvent(t,e),this._containerVirtualZIndexChangeRequiredEventListener=(t,e,i)=>this.handleContainerVirtualZIndexChangeRequiredEvent(t,e,i),this.deprecatedConstructor||this.init()}registerComponent(t,e,i=!1){if("function"!=typeof e)throw new $("registerComponent() componentConstructorOrFactoryFtn parameter is not a function");if(e.hasOwnProperty("prototype")){const n=e;this.registerComponentConstructor(t,n,i)}else{const n=e;this.registerComponentFactoryFunction(t,n,i)}}registerComponentConstructor(t,e,i=!1){if("function"!=typeof e)throw new Error(tt[1]);if(void 0!==this._componentTypesMap.get(t))throw new Z(`${tt[3]}: ${t}`);this._componentTypesMap.set(t,{constructor:e,factoryFunction:void 0,virtual:i})}registerComponentFactoryFunction(t,e,i=!1){if("function"!=typeof e)throw new Z("Please register a constructor function");if(void 0!==this._componentTypesMap.get(t))throw new Z(`${tt[3]}: ${t}`);this._componentTypesMap.set(t,{constructor:void 0,factoryFunction:e,virtual:i})}registerComponentFunction(t){this.registerGetComponentConstructorCallback(t)}registerGetComponentConstructorCallback(t){if("function"!=typeof t)throw new Error("Please register a callback function");void 0!==this._getComponentConstructorFtn&&console.warn("Multiple component functions are being registered. Only the final registered function will be used."),this._getComponentConstructorFtn=t}getRegisteredComponentTypeNames(){const t=this._componentTypesMap.keys();return Array.from(t)}getComponentInstantiator(t){let e;const i=pt.resolveComponentTypeName(t);return void 0!==i&&(e=this._componentTypesMap.get(i)),void 0===e&&void 0!==this._getComponentConstructorFtn&&(e={constructor:this._getComponentConstructorFtn(t),factoryFunction:void 0,virtual:!1}),e}bindComponent(t,e){let i;const n=pt.resolveComponentTypeName(e);let o;if(void 0!==n&&(i=this._componentTypesMap.get(n)),void 0===i&&void 0!==this._getComponentConstructorFtn&&(i={constructor:this._getComponentConstructorFtn(e),factoryFunction:void 0,virtual:!1}),void 0!==i){const s=i.virtual;let r,a;r=void 0===e.componentState?void 0:Ut({},e.componentState);const l=i.constructor;if(void 0!==l)a=new l(t,r,s);else{const e=i.factoryFunction;if(void 0===e)throw new X("LMBCFFU10008");a=e(t,r,s)}if(s){if(void 0===a)throw new J("GLBCVCU988774");{const e=a,i=e.rootHtmlElement;if(void 0===i)throw new Z(`${tt[5]}: ${n}`);!function(t){const e="absolute";t.style.position!==e&&(t.style.position=e)}(i),this.container.appendChild(i),this._virtuableComponentMap.set(t,e),t.virtualRectingRequiredEvent=this._containerVirtualRectingRequiredEventListener,t.virtualVisibilityChangeRequiredEvent=this._containerVirtualVisibilityChangeRequiredEventListener,t.virtualZIndexChangeRequiredEvent=this._containerVirtualZIndexChangeRequiredEventListener}}this._registeredComponentMap.set(t,a),o={virtual:i.virtual,component:a}}else o=super.bindComponent(t,e);return o}unbindComponent(t,e,i){if(void 0===this._registeredComponentMap.get(t))super.unbindComponent(t,e,i);else{const e=this._virtuableComponentMap.get(t);if(void 0!==e){const i=e.rootHtmlElement;if(void 0===i)throw new X("GLUC77743",t.title);this.container.removeChild(i),this._virtuableComponentMap.delete(t)}}}fireBeforeVirtualRectingEvent(t){this._goldenLayoutBoundingClientRect=this.container.getBoundingClientRect(),super.fireBeforeVirtualRectingEvent(t)}handleContainerVirtualRectingRequiredEvent(t,e,i){const n=this._virtuableComponentMap.get(t);if(void 0===n)throw new J("GLHCSCE55933");{const o=n.rootHtmlElement;if(void 0===o)throw new Z(tt[4]+" "+t.title);{const n=t.element.getBoundingClientRect(),s=n.left-this._goldenLayoutBoundingClientRect.left;o.style.left=zt(s);const r=n.top-this._goldenLayoutBoundingClientRect.top;o.style.top=zt(r),Tt(o,e),At(o,i)}}}handleContainerVirtualVisibilityChangeRequiredEvent(t,e){const i=this._virtuableComponentMap.get(t);if(void 0===i)throw new J("GLHCVVCRE55934");{const n=i.rootHtmlElement;if(void 0===n)throw new Z(tt[4]+" "+t.title);Dt(n,e)}}handleContainerVirtualZIndexChangeRequiredEvent(t,e,i){const n=this._virtuableComponentMap.get(t);if(void 0===n)throw new J("GLHCVZICRE55935");{const e=n.rootHtmlElement;if(void 0===e)throw new Z(tt[4]+" "+t.title);e.style.zIndex=i}}}const de="initial_",ce={show:"top",popout:!1,maximise:!1,close:"close-tab-unused"},me={headerHeight:31},ue={hasHeaders:!0,reorderEnabled:!0},pe={popoutWholeStack:!1,constrainDragToContainer:!1,constrainDragToHeaders:!1,preventDragout:!1,showMaximiseIcon:!1,showPopoutIcon:!1,showCloseIcon:!1,blockedPopoutsThrowError:!0,closePopoutsOnUnload:!0,selectionEnabled:!1};var ge,fe;class ve{constructor(e){this.layout=e,ge.set(this,void 0),fe.set(this,void 0),this.handleResize=t=>{t.forEach((t=>this.resizeElement(t.target)))},this.handleMutation=()=>{this.layout.viewComponentsByContainerElement.forEach((t=>{this.resizeElement(t.container.element)}))},t.__classPrivateFieldSet(this,ge,new ResizeObserver(this.handleResize),"f"),t.__classPrivateFieldSet(this,fe,new MutationObserver(this.handleMutation),"f")}observeMutations(e){t.__classPrivateFieldGet(this,fe,"f")?.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["class"]})}destroy(){t.__classPrivateFieldGet(this,ge,"f").disconnect(),t.__classPrivateFieldGet(this,fe,"f").disconnect()}observeContainer(e){t.__classPrivateFieldGet(this,ge,"f").observe(e)}unobserveContainer(e){t.__classPrivateFieldGet(this,ge,"f").unobserve(e)}resizeElement(t){const e=this.layout.viewComponentsByContainerElement.get(t);e&&e.resize()}}ge=new WeakMap,fe=new WeakMap;var _e={};Object.defineProperty(_e,"__esModule",{value:!0});var ye=_e.BaseItem=void 0;class Ce{constructor(t,e,i){this._item=t,this._layout=e,this._wrap=i}get raw(){return this._item}get layout(){return this._layout}get type(){return this._item.type}get contentItems(){return(this._item.contentItems??[]).map((t=>this._wrap(t)))}get parent(){const t=this._item.parent;return t?this._wrap(t):null}setActiveContentItem(t,e){if("stack"!==this.type)throw new Error(`Cannot call setActiveContentItem from a non-stack item: ${this.type}`);this._item.setActiveContentItem(t.raw,e)}static wrapInternal(t,e,i){const n=Ce.wrapCache.get(e);if(n)return n;const o=new t(e,i,(e=>Ce.wrapInternal(t,e,i)));return Ce.wrapCache.set(e,o),o}}ye=_e.BaseItem=Ce,Ce.wrapCache=new WeakMap;const we=t=>!!t&&"contentItems"in t&&(t.isRow||t.isColumn);class Ie extends ye{isRoot(){return!!this._item.parent?.isGround}getBounds(){return this._item.element.getBoundingClientRect()}get viewName(){if(this._item.isComponent){const{component:t}=this._item;return t.identity.name}throw new Error("View name not found")}onDestroyed(t){const e=({target:i})=>{i===this._item&&(t(),this._item.off("itemDestroyed",e))};this._item.on("itemDestroyed",e)}createAdjacentStack({position:t="right"}={}){const e=this.raw;if(ee.isStack(e)&&e.parent){const i=["top","bottom"].includes(t)?"column":"row",n=["left","top"].includes(t)?1:0,o=we(e.parent)?e.parent:e.layoutManager,s=o,r=e.parent.contentItems.indexOf(e);e.parent.isGround&&e.parent.removeChild(e,!0);const a=o.newItem({type:i,content:[{type:"stack",content:[]}]},r);if(!a)throw new Error("createAdjacentStack: Failed to create new container");const l=a.contentItems[0];return a.addChild(this.raw,n),we(s)&&s.removeChild(e,!0),this._wrap(l)}throw new Error(`Cannot creat adjacent stacks for type: ${e.type}, must be type 'stack'`)}setActiveContentItem(t,e=!0){if(!ee.isStack(this._item))throw new Error(`Cannot call setActiveContentItem from a non-stack item: ${this.type}`);this._item.setActiveComponentItem(t.raw,!e)}static wrap(t,e){return ye.wrapInternal(Ie,t,e)}}function be(t=[],e){for(const i of t)"component"===i.type?Object.keys(e).forEach((t=>{t in i&&(i.componentState={[`${de}${t}`]:i[t],...i.componentState}),i[t]=e[t]})):be(i.content,e)}function Se(t=[],e,i){for(const n of t)if("component"===n.type)Object.keys(e).forEach((t=>{if(`${de}${t}`in n.componentState)return n[t]=n.componentState[`${de}${t}`],void delete n.componentState[`${de}${t}`];n[t]=e[t]}));else{if(n.size&&("row"===i||"column"===i)){n["row"===i?"width":"height"]=n.size?.includes(".")?parseFloat(n.size):parseInt(n.size)}Se(n.content,e,n.type)}}function Ee(t){if(t.root){t.root.content&&Se([t.root],{componentName:"view",isClosable:!0});const e=t.root;t.content=[e],delete t.root}return t}const xe=e=>class extends e{connectedCallback(){if(!this.name||!this.uuid)throw new Error(" Name or uuid attribute missing");if(!this.src)throw new Error(" missing 'src' attribute.");this.#t||(this.#t=document.createElement("iframe"),this.#t.src=this.src,this.#t.style.height="100%",this.#t.style.width="100%",this.#t.style.border="none",this.forceFrameName?this.#t.setAttribute("name",this.forceFrameName):this.#t.setAttribute("name",t.encodeOptions({brokerUrl:this.brokerUrl,name:this.name,uuid:this.uuid,providerId:this.providerId,contextGroup:this.contextGroup},"of-frame")),this.#t.setAttribute("id",this.name),this.appendChild(this.#t))}#t;get brokerUrl(){return this.getAttribute("of-broker")}set brokerUrl(t){t&&this.setAttribute("of-broker",t)}get name(){return this.getAttribute("of-name")}set name(t){t&&this.setAttribute("of-name",t)}get forceFrameName(){return this.getAttribute("forceFrameName")}set forceFrameName(t){t&&this.setAttribute("forceFrameName",t)}get uuid(){return this.getAttribute("of-uuid")}set uuid(t){t&&this.setAttribute("of-uuid",t)}get src(){return this.getAttribute("src")}set src(t){t&&this.setAttribute("src",t)}get providerId(){return this.getAttribute("of-provider-id")}set providerId(t){t&&this.setAttribute("of-provider-id",t)}get contextGroup(){return this.getAttribute("of-context-group")}set contextGroup(t){t&&this.setAttribute("of-context-group",t)}static get observedAttributes(){return["name"]}};class Le{static create(t){const e=document.createElement("of-view");return Object.entries(t).forEach((([t,i])=>{e.setAttribute(t,i)})),e}}customElements.define("of-view",xe(HTMLElement));class ze{constructor(t,i,n,{brokerUrl:o,interopConfig:s},r){this.container=t,this.config=i,this.ofView=null,this.isDragging=()=>this.container.tab.element?.className.includes("lm_dragging")??!1;const{url:a,web:l,interop:h,name:d}=i||{},c=d??`internal-generated-view-${e.v4()}`;if(this.identity={uuid:n,name:c},this.container.element.setAttribute("of-name",c),this.container.element.id=`container-${c}`,this.container.parent.id=c,void 0===a)return void this.handleUrlMissing();const m=this.updateTitleIfNotSet(a),u={"of-broker":o,"of-uuid":n,"of-name":c,src:a};l?.frameName&&(u.forceFrameName=l.frameName);const p=h?.currentContextGroup??s?.currentContextGroup;p&&(u["of-context-group"]=p),s?.providerId&&(u["of-provider-id"]=s?.providerId),this.ofView=Le.create(u),this.ofView.title=m??`Iframe: ${a}`,r.appendChild(this.ofView),this.ofView.style.position="absolute"}updateTitleIfNotSet(t){return"view"===this.container.parent.title&&this.container.parent.setTitle(t),this.container.parent.title}handleUrlMissing(){const t=document.createElement("div");t.setAttribute("style","padding: 20px");t.innerText="No URL provided",this.container.element.appendChild(t)}destroy(){this.ofView?.remove(),this.ofView=null}closeView(){this.container.close()}resize(){if(this.ofView){if(this.isDragging())return void(this.ofView.style.display="none");const t=this.container.element.getBoundingClientRect();this.ofView.style.position="absolute",this.ofView.style.height=`${t.height}px`,this.ofView.style.width=`${t.width}px`,this.ofView.style.inset=`${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`,this.ofView.style.display="block"}}}class Me extends U{static overrideConfig(t){const e={...ue,...t.settings,...pe};return e.reorderEnabled?be(t.content,{isClosable:!0}):be(t.content,{reorderEnabled:!1}),{dimensions:me,...t,settings:e,header:{...ce,show:!1!==t.settings?.hasHeaders&&ce.show}}}constructor(t,e,i,{options:n},o,s){super(),this.identity=t,this.container=e,this.initialConfig=i,this.layoutManager=o,this.platformProvider=s,this.viewComponentsByContainerElement=new Map,this.layoutContentCache=_.getSingleInstance(),this.reparentingViews=new Set,this.goldenLayoutDestroyed=!1,this.createViewComponent=(t,e)=>{m.handleSharedView(this.layoutManager,this.identity,e);const i=new ze(t,e,this.identity.uuid,this.options,this.iframeContainer);return e&&!1===e[`${de}isClosable`]&&this.stylesheet.insertRule(`#tab-${i.identity.name} .lm_close_tab { display: none; }`),this.viewComponentsByContainerElement.set(t.element,i),this.resizeController.observeContainer(t.element),i},this.iframeContainer=document.createElement("div"),this.iframeContainer.id=`openfin-layout-iframe-container-${this.identity.layoutName}`,this.domEmitter=new V(e),this.setupStylesheets(),this.layout=new he(this.container),this.layout.resizeWithContainerAutomatically=!0,this.options=n,this.layout.registerComponent("view",this.createViewComponent),this.setupListeners(),this.resizeController=new ve(this),this.layout.loadLayout(Me.overrideConfig(i));const r=document.createElement("div");r.id=`openfin-layout-shadow-container-${this.identity.layoutName}`,r.attachShadow({mode:"open",delegatesFocus:!1}).appendChild(this.iframeContainer),this.container.appendChild(r),this.resizeController.observeMutations(this.container)}getStackByView({name:t}){const e=this.layout.findFirstComponentItemById(t);if(e?.parent&&e?.parent?.isStack)return Ie.wrap(e.parent,this)}getRoot(){return Ie.wrap(this.layout.rootItem,this)}async platformCloseView(t){const e=[...this.viewComponentsByContainerElement.values()].find((e=>e.identity.name===t.name));if(!e)throw new Error(`View with name: ${t.name} not found in layout.`);e.closeView()}async platformCreateView(t,{location:e,targetView:i}={}){if(i)throw new Error("TargetView not supported in web");const n={options:this.platformProvider.normalizeOptions(t),target:this.identity,location:e};return this.insertView(n)}setupStylesheets(){if(this.container.setAttribute("data-openfin-layout-name",this.identity.layoutName),this.stylesheet=new CSSStyleSheet,this.stylesheet.insertRule(".lm_close { display: none; }"),document.adoptedStyleSheets.push(this.stylesheet),this.initialConfig.settings?.preventSplitterResize){const t=`\n [data-openfin-layout-name='${this.identity.layoutName}'] .lm_splitter {\n pointer-events: none;\n }`;this.stylesheet.insertRule(t)}}insertView({options:t,location:e,targetView:i}){const n=e?this.layoutContentCache.getItemOrUndefined(e.id):void 0,o=i?this.layoutContentCache.getItemOrUndefined(i.name):void 0,s=n??o??Ie.wrap(this.layout.rootItem,this);let r;if(ee.isStack(s.raw))r=s.raw;else{if(!we(s.raw))throw new Error("Cannot add a view at the requested location");r=s.raw.newItem({type:"stack",content:[]})}const a=Math.min(r.contentItems.length,e?.index??r.contentItems.length);let l=this.layout.findFirstComponentItemById(t.name);l?(l.parent&&l.parent.removeChild(l,!0),r.addChild(l,a)):l=r.newComponent("view",t,t.title??t.url??"Default Title",a);const h=l.component.identity;return Promise.resolve({identity:h})}replaceView({viewToReplace:t,newView:e}){throw new Error("Method not implemented.")}replaceLayout(t){throw new Error("Method not implemented.")}async cleanupView(t){}applyPreset(t){throw new Error("Method not implemented.")}getCurrentViews(){return[...this.viewComponentsByContainerElement.values()].map((t=>t.identity))}async getFrameSnapshot(){return Ee(xt.fromResolved(this.layout.toConfig()))}isVisible(){return W(this.container)}async onViewDetached({viewIdentity:t}){this.reparentingViews.add(t.name),this.platformCloseView(t)}async destroy(){this.goldenLayoutDestroyed||(this.goldenLayoutDestroyed=!0,this.layout.destroy()),this.iframeContainer.remove(),this.resizeController.destroy(),document.adoptedStyleSheets=document.adoptedStyleSheets.filter((t=>t!==this.stylesheet)),this.viewComponentsByContainerElement.clear()}setupListeners(){this.container.addEventListener("pointerdown",(t=>{if(t.target instanceof HTMLElement){const e=t.target.classList;["lm_tab","lm_title","lm_splitter","lm_drag_handle"].some((t=>e.contains(t)))&&(this.handleDragStart(),2===t.button&&t.stopPropagation())}}),!0),document.addEventListener("pointerup",(()=>this.handleDragEnd()),!0),this.layout.on("tabCreated",(t=>{const e=t.componentItem.component;t.element.id=`tab-${e.identity.name}`,this.domEmitter.dispatchLocalEvent("tab-created",e.identity)})),this.layout.on("itemCreated",(({target:t})=>{const e=t;if(Gt.isComponentItem(e)){const t=e.component;this.domEmitter.dispatchLocalEvent("container-created",t.identity)}})),this.layout.on("itemDestroyed",(t=>{const e=t.target;if(Gt.isComponentItem(e)){const t=e.component;this.removeViewComponent(t)}})),this.layout.on("itemDropped",(()=>{this.handleDragEnd()}))}handleDragStart(){this.iframeContainer.style.pointerEvents="none"}handleDragEnd(){this.iframeContainer.style.pointerEvents=""}removeViewComponent(t){if(t.config&&!1===t.config[`${de}isClosable`]){const e=[...this.stylesheet.cssRules].findIndex((e=>e.cssText.includes(`#tab-${t.identity.name}`)));this.stylesheet.deleteRule(e)}t.destroy(),this.viewComponentsByContainerElement.delete(t.container.element),this.resizeController.unobserveContainer(t.container.element),this.reparentingViews.has(t.identity.name)?this.reparentingViews.delete(t.identity.name):this.platformProvider.closeView(t.identity.name);0===this.getCurrentViews().length&&(this.goldenLayoutDestroyed||(this.goldenLayoutDestroyed=!0,m.handleLastViewRemoved(this.layoutManager,this.identity)))}}class Pe{constructor(t,e,i,n){this.windowIdentity=t,this.connectConfig=e,this.provider=i,this.fallbackContainer=n}async createLayout(t,e){if(!("container"in t)&&!this.fallbackContainer)throw new Error("Container property is not optional in web");const{layoutName:i}=t,n=t,o=this.provider.initLayoutViews(n),s=n.container??this.fallbackContainer,r={...this.windowIdentity,layoutName:i},a=new Me(r,s,o,this.connectConfig,e,this.provider);m.registerLayout(e,i,a),this.fallbackContainer=null}async getLayoutSnapshot(t){return t.getLayoutSnapshot()}async handleLastViewRemoved(t){}}class Te{static async init(e){const i=e.getFin().InterApplicationBus.Channel,n=await i.create(`custom-frame-${e.me.uuid}`);return n.setDefaultAction((async(t,{target:e,opts:i},o)=>{const s=n.connections.find((t=>t.name===e.name));if(s)return n.dispatch(s,t,{...i,target:e});throw new Error(`Client with name ${e.name} not found`)})),await t.relayChannelClientApi_1(n,"layout-relay"),new Te(e)}constructor(t){this.wire=t,this.viewNames=new Set}normalizeOptions(t,i="default"){const n=this.wire.me.uuid;let{name:o=`internal-generated-view-${e.v4()}`}=t;return o.match(/^internal-generated-view-/)&&this.viewNames.has(o)&&"duplicate"===i&&(o=`internal-generated-view-${e.v4()}`),this.viewNames.add(o),{...t,name:o,uuid:n}}closeView(t){this.viewNames.delete(t)}initLayoutViews({layout:t,multiInstanceViewBehavior:e}){return H((t=>{if("component"===t.type&&t.componentState){const i=this.normalizeOptions(t.componentState,e);return{...t,componentState:i}}return t}),t)}}var Ae;const ke=t=>t;Ae=new WeakMap,exports.WebLayoutEntryPoint=class{constructor(e){Ae.set(this,void 0),this.initLayoutManager=async(e,i,{container:n,layoutManagerOverride:o})=>{const s=await Te.init(i),r=o??ke,a=new Pe(i.me,t.__classPrivateFieldGet(this,Ae,"f"),s,n),l=new(r(m.createClosedConstructor(a)));return await M(i,l),l},this.applyLayoutSnapshot=async(e,i,n)=>{await i.applyLayoutSnapshot(t.__classPrivateFieldGet(this,Ae,"f").platform.layoutSnapshot)},this.createLayout=async(t,e)=>m.createLayout(t,e),this.destroyLayout=async(t,e)=>m.destroyLayout(t,e),t.__classPrivateFieldSet(this,Ae,e,"f")}}; @@ -7340,7 +7340,7 @@ module.exports = stubFalse; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.init = init; -const core_web_1 = __webpack_require__(/*! @openfin/core-web */ "./node_modules/@openfin/core-web/out/api-client.js"); +const core_web_1 = __webpack_require__(/*! @openfin/core-web */ "../../node_modules/@openfin/core-web/out/api-client.js"); const settings_1 = __webpack_require__(/*! ../platform/settings/settings */ "./client/src/platform/settings/settings.ts"); /** * Initializes the OpenFin Web Broker connection. @@ -8441,7 +8441,7 @@ function version(uuid) { /******/ /************************************************************************/ var __webpack_exports__ = {}; -// This entry need to be wrapped in an IIFE because it need to be in strict mode. +// This entry needs to be wrapped in an IIFE because it needs to be in strict mode. (() => { "use strict"; var exports = __webpack_exports__; diff --git a/web/v19.2.0/web-interop-support-context-and-intents/js/interop-view.bundle.js.map b/web/v19.2.0/web-interop-support-context-and-intents/js/interop-view.bundle.js.map index 3e19c9d..6e3fc82 100644 --- a/web/v19.2.0/web-interop-support-context-and-intents/js/interop-view.bundle.js.map +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AACA;AACA;AACA;;AAEA;AACA,2CAA2C,UAAU;AACrD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;ACrJA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEY;;AAEZ,eAAe,mBAAO,CAAC,wDAAW;AAClC,gBAAgB,mBAAO,CAAC,oDAAS;AACjC;AACA;AACA;AACA;;AAEA,cAAc;AACd,kBAAkB;AAClB,yBAAyB;;AAEzB;AACA,kBAAkB;;AAElB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,kBAAkB,YAAY;AAC9B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA,wCAAwC,SAAS;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;;AAEA;AACA;AACA,cAAc,iBAAiB;AAC/B;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,iDAAiD,EAAE;AACnD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C;AAC1C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA,yBAAyB,eAAe;AACxC;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,yBAAyB,QAAQ;AACjC;AACA,sBAAsB,eAAe;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc,YAAY;AAC1B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB,sBAAsB;AACxC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,mBAAmB;AACnB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA,oBAAoB,SAAS;AAC7B;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA,qBAAqB,WAAW,GAAG,IAAI;AACvC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA,gBAAgB,WAAW,GAAG,IAAI,KAAK,aAAa;AACpD;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;;AAEA;AACA,GAAG;AACH;AACA;AACA,mBAAmB,KAAK,mDAAmD,cAAc;AACzF,GAAG;AACH;AACA;AACA,+BAA+B,IAAI;AACnC;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,MAAM,aAAa,SAAS;AACtD;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,SAAS,gBAAgB;AACzB,cAAc,oBAAoB,EAAE,IAAI;AACxC;AACA,YAAY,gBAAgB,EAAE,IAAI;AAClC;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,GAAG,SAAS,GAAG,KAAK,qBAAqB,EAAE,EAAE;AACpE,QAAQ;AACR,yBAAyB,GAAG,KAAK,yBAAyB,EAAE,EAAE;AAC9D,mBAAmB,yBAAyB,EAAE,EAAE;AAChD;AACA,MAAM;AACN,oBAAoB,IAAI,EAAE,GAAG,SAAS,IAAI,EAAE,EAAE;AAC9C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,0CAA0C,cAAc,SAAS,OAAO;AACxE;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,kBAAkB,YAAY;AAC9B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,kBAAkB,gBAAgB;AAClC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,kBAAkB,gBAAgB;AAClC;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,cAAc,YAAY;AAC1B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,QAAQ;AAC1B;AACA,oBAAoB,QAAQ;AAC5B;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;;;;;ACzjEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEa;;AAEb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB;;AAEnB;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,sBAAsB;AACxC;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA,eAAe;AACf;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA,oBAAoB,SAAS;AAC7B;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;;AAEA,kCAAkC,QAAQ;AAC1C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oBAAoB,iBAAiB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,QAAQ;AACR;AACA,uCAAuC,QAAQ;AAC/C;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,OAAO;AACzB;AACA;AACA;;AAEA;AACA,SAAS,yBAAyB;AAClC;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,gBAAgB;AAClC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,8DAA8D,YAAY;AAC1E;AACA,8DAA8D,YAAY;AAC1E;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,qCAAqC,YAAY;AACjD;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;AACA;;;;;;;;;;;AChfA;AACA,YAAY;AACZ;AACA;AAC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EA;;;;;;;;;;;ACLA,WAAW,mBAAO,CAAC,mDAAS;;AAE5B;AACA;;AAEA;;;;;;;;;;;ACLA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,WAAW,mBAAO,CAAC,mDAAS;;AAE5B;AACA;;AAEA;;;;;;;;;;;ACNA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,UAAU;AACrB,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACrBA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,UAAU;AACrB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACxBA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,kBAAkB,mBAAO,CAAC,+DAAe;AACzC,cAAc,mBAAO,CAAC,uDAAW;AACjC,eAAe,mBAAO,CAAC,yDAAY;AACnC,cAAc,mBAAO,CAAC,yDAAY;AAClC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,SAAS;AACpB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AChDA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACnBA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,UAAU;AACrB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;A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AAkB,mBAAO,CAAC,iEAAgB;AAC1C,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,kBAAkB,mBAAO,CAAC,iEAAgB;AAC1C,oBAAoB,mBAAO,CAAC,qEAAkB;AAC9C,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,mBAAmB,mBAAO,CAAC,mEAAiB;AAC5C,aAAa,mBAAO,CAAC,uDAAW;AAChC,qBAAqB,mBAAO,CAAC,uEAAmB;AAChD,qBAAqB,mBAAO,CAAC,uEAAmB;AAChD,sBAAsB,mBAAO,CAAC,yEAAoB;AAClD,cAAc,mBAAO,CAAC,uDAAW;AACjC,eAAe,mBAAO,CAAC,yDAAY;AACnC,YAAY,mBAAO,CAAC,mDAAS;AAC7B,eAAe,mBAAO,CAAC,yDAAY;AACnC,YAAY,mBAAO,CAAC,mDAAS;AAC7B,WAAW,mBAAO,CAAC,iDAAQ;AAC3B,aAAa,mBAAO,CAAC,qDAAU;;AAE/B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,SAAS;AACpB;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa,GAAG;AAChB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;AACA,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC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A;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC9CA,aAAa,mBAAO,CAAC,uDAAW;AAChC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,eAAe,mBAAO,CAAC,yDAAY;AACnC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC3DA,kBAAkB,mBAAO,CAAC,iEAAgB;AAC1C,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC7BA,eAAe,mBAAO,CAAC,yDAAY;AACnC,kBAAkB,mBAAO,CAAC,iEAAgB;AAC1C,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;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;AACpC,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACnFA,aAAa,mBAAO,CAAC,uDAAW;AAChC,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,SAAS,mBAAO,CAAC,6CAAM;AACvB,kBAAkB,mBAAO,CAAC,iEAAgB;AAC1C,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC/GA,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACzFA;AACA,wBAAwB,qBAAM,gBAAgB,qBAAM,IAAI,qBAAM,sBAAsB,qBAAM;;AAE1F;;;;;;;;;;;ACHA,qBAAqB,mBAAO,CAAC,uEAAmB;AAChD,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,WAAW,mBAAO,CAAC,iDAAQ;;AAE3B;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACfA,qBAAqB,mBAAO,CAAC,uEAAmB;AAChD,mBAAmB,mBAAO,CAAC,mEAAiB;AAC5C,aAAa,mBAAO,CAAC,qDAAU;;AAE/B;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AChBA,gBAAgB,mBAAO,CAAC,6DAAc;;AA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;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACxBA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACdA,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACnBA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACZA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClCA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,GAAG;AAChB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;AClBA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACfA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA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;;;;ACnBA,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA,kBAAkB,KAA0B;;AAE5C;AACA,gCAAgC,QAAa;;AAE7C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ,CAAC;;AAED;;;;;;;;;;;AC7BA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACrBA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,aAAa,UAAU;AACvB;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACdA,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;ACRA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACbA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;;;;;;;;;;ACjBA,gBAAgB,mBAAO,CAAC,6DAAc;;AAEtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACdA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,GAAG;AAChB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACbA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACbA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,UAAU,mBAAO,CAAC,iDAAQ;AAC1B,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjCA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;;;;;;;;;;;ACzBA,gBAAgB,mBAAO,CAAC,6DAAc;;AAEtC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,GAAG;AAChB;AACA;AACA;AACA,oBAAoB,QAAQ,IAAI,QAAQ;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,kBAAkB;AAClB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpCA,sBAAsB,mBAAO,CAAC,yEAAoB;AAClD,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA,8BAA8B,mBAAmB;AACjD;AACA;AACA;AACA;AACA;AACA,+CAA+C,mBAAmB;AAClE;AACA;AACA;;AAEA;;;;;;;;;;;ACnCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACzBA,iBAAiB,mBAAO,CAAC,6DAAc;AACvC,eAAe,mBAAO,CAAC,yDAAY;;AAEnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AChCA,WAAW,mBAAO,CAAC,mDAAS;AAC5B,gBAAgB,mBAAO,CAAC,2DAAa;;AAErC;AACA,kBAAkB,KAA0B;;AAE5C;AACA,gCAAgC,QAAa;;AAE7C;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACrCA,kBAAkB,mBAAO,CAAC,iEAAgB;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,kBAAkB;AAClB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClCA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,eAAe,mBAAO,CAAC,yDAAY;;AAEnC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpCA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClCA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC1BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC9BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC5BA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC1BA,uBAAuB,mBAAO,CAAC,2EAAqB;AACpD,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC1BA,oBAAoB,mBAAO,CAAC,qEAAkB;AAC9C,eAAe,mBAAO,CAAC,2DAAa;AACpC,kBAAkB,mBAAO,CAAC,+DAAe;;AAEzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpCA,oBAAoB,mBAAO,CAAC,qEAAkB;AAC9C,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,kBAAkB,mBAAO,CAAC,+DAAe;;AAEzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC/BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;;;ACVA,oBA2CC;AAlDD,sHAAwE;AACxE,0HAA4D;AAE5D;;;GAGG;AACI,KAAK,UAAU,IAAI,CAAC,UAAmB,IAAI;IACjD,sCAAsC;IACtC,I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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,kBAAkB,aAAa;AAC/B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,iEAAe,GAAG;;;;;;;;;;;;;;;ACtNlB,iEAAe,sCAAsC;;;;;;;;;;;;;;;;ACAhB;;AAErC;AACA,OAAO,wDAAQ;AACf;AACA;;AAEA;AACA,gCAAgC;;AAEhC;AACA;AACA;AACA,qBAAqB;;AAErB;AACA,qBAAqB;;AAErB;AACA,qBAAqB;;AAErB;AACA,qBAAqB;AACrB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,iEAAe,KAAK;;;;;;;;;;;;;;;AClCpB,iEAAe,cAAc,EAAE,UAAU,EAAE,eAAe,EAAE,gBAAgB,EAAE,UAAU,GAAG,yCAAyC;;;;;;;;;;;;;;;ACApI;AACA;AACA;AACA;AACA;AACe;AACf;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;AClBA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,mD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IAAI,gBAAgB,KAAK,IAAI,EAAE,CAAC;QAC/B,gBAAgB,CAAC,gBAAgB,CAAC,OAAO,EAAE,KAAK,IAAI,EAAE;YACrD,MAAM,UAAU,EAAE,CAAC;QACpB,CAAC,CAAC,CAAC;IACJ,CAAC;IAED,MAAM,kBAAkB,EAAE,CAAC;AAC5B,CAAC","sources":["webpack://openfin-web--web-interop-support-context-and-intents/./node_modules/@openfin/core-web/out/api-client.js","webpack://openfin-web--web-interop-support-context-and-intents/./node_modules/@openfin/core-web/out/main-8cad4070.js","webpack://openfin-web--web-interop-support-context-and-intents/./node_modules/@openfin/core-web/out/main-b14f67c9.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/base64-js/index.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/buffer/index.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/events/events.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/ieee754/index.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_DataView.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_Hash.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_ListCache.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_Map.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_MapCache.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_Promise.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_Set.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_SetCache.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_Stack.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_Symbol.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_Uint8Array.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_WeakMap.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_arrayEach.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_arrayFilter.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_arrayLikeKeys.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_arrayPush.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_arraySome.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_assignValue.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_assocIndexOf.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseAssign.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseAssignIn.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseAssignValue.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseClone.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseCreate.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseGetAllKeys.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseGetTag.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseIsArguments.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseIsEqual.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseIsEqualDeep.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseIsMap.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseIsNative.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseIsSet.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseIsTypedArray.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseKeys.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseKeysIn.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseTimes.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseUnary.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_cacheHas.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_cloneArrayBuffer.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_cloneBuffer.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_cloneDataView.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_cloneRegExp.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_cloneSymbol.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_cloneTypedArray.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_copyArray.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_copyObject.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_copySymbols.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_copySymbolsIn.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_coreJsData.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_defineProperty.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_equalArrays.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_equalByTag.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_equalObjects.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_freeGlobal.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_getAllKeys.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_getAllKeysIn.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_getMapData.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_getNative.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_getPrototype.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_getRawTag.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_getSymbols.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_getSymbolsIn.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_getTag.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_getValue.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_hashClear.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_hashDelete.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_hashGet.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_hashHas.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_hashSet.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_initCloneArray.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_initCloneByTag.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_initCloneObject.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_isIndex.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_isKeyable.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_isMasked.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_isPrototype.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_listCacheClear.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_listCacheDelete.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_listCacheGet.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_listCacheHas.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_listCacheSet.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_mapCacheClear.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_mapCacheDelete.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_mapCacheGet.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_mapCacheHas.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_mapCacheSet.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_mapToArray.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_nativeCreate.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_nativeKeys.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_nativeKeysIn.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_nodeUtil.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_objectToString.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_overArg.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_root.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_setCacheAdd.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_setCacheHas.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_setToArray.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_stackClear.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_stackDelete.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_stackGet.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_stackHas.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_stackSet.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_toSource.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/cloneDeep.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/eq.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/isArguments.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/isArray.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/isArrayLike.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/isBuffer.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/isEqual.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/isFunction.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/isLength.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/isMap.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/isObject.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/isObjectLike.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/isSet.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/isTypedArray.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/keys.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/keysIn.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/stubArray.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/stubFalse.js","webpack://openfin-web--web-interop-support-context-and-intents/./client/src/content/api.ts","webpack://openfin-web--web-interop-support-context-and-intents/./client/src/platform/settings/settings.ts","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/index.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/md5.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/nil.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/parse.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/regex.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/rng.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/sha1.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/stringify.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/v1.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/v3.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/v35.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/v4.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/v5.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/validate.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/version.js","webpack://openfin-web--web-interop-support-context-and-intents/webpack/bootstrap","webpack://openfin-web--web-interop-support-context-and-intents/webpack/runtime/define property getters","webpack://openfin-web--web-interop-support-context-and-intents/webpack/runtime/global","webpack://openfin-web--web-interop-support-context-and-intents/webpack/runtime/hasOwnProperty shorthand","webpack://openfin-web--web-interop-support-context-and-intents/webpack/runtime/make namespace object","webpack://openfin-web--web-interop-support-context-and-intents/webpack/runtime/node module decorator","webpack://openfin-web--web-interop-support-context-and-intents/./client/src/content/interop-view.ts"],"sourcesContent":["\"use strict\";var e=require(\"./main-8cad4070.js\");require(\"buffer/\"),require(\"uuid\"),require(\"events\"),require(\"lodash/cloneDeep\"),require(\"lodash/isEqual\"),exports.connect=e.connect;\n","\"use strict\";var e=require(\"buffer/\"),t=require(\"events\"),n=require(\"lodash/cloneDeep\"),i=require(\"lodash/isEqual\"),r=require(\"uuid\");const o=(e,t)=>`${t}<${btoa(JSON.stringify(e))}>`;var s=\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof window?window:\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:{},a={},c={},d={},h={};async function l(e){const t=[];for(const n of e){const e=await n();t.push(e)}return t}Object.defineProperty(h,\"__esModule\",{value:!0}),h.promiseMapSerial=h.serial=h.promiseMap=h.promisify=void 0,h.promisify=function(e){return(...t)=>new Promise(((n,i)=>{e(...t,((e,t)=>e?i(e):n(t)))}))},h.promiseMap=async function(e,t){return Promise.all(e.map(t))},h.serial=l,h.promiseMapSerial=async function(e,t){return l(e.map(((e,n,i)=>()=>t(e,n,i))))};var u,p=s&&s.__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},w=s&&s.__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)};Object.defineProperty(d,\"__esModule\",{value:!0}),d.Reply=d.EmitterBase=d.Base=void 0;const y=h;class f{constructor(e){this.isNodeEnvironment=()=>\"node\"===this.wire.environment.type,this.isOpenFinEnvironment=()=>\"openfin\"===this.wire.environment.type,this.isBrowserEnvironment=()=>\"other\"===this.wire.environment.type,this.wire=e}get fin(){return this.wire.getFin()}get me(){return this.wire.me}}d.Base=f;d.EmitterBase=class extends f{constructor(e,t,...n){super(e),this.topic=t,u.set(this,void 0),this.eventNames=()=>this.hasEmitter()?this.getOrCreateEmitter().eventNames():[],this.emit=(e,t,...n)=>!!this.hasEmitter()&&this.getOrCreateEmitter().emit(e,t,...n),this.hasEmitter=()=>this.wire.eventAggregator.has(w(this,u,\"f\")),this.getOrCreateEmitter=()=>this.wire.eventAggregator.getOrCreate(w(this,u,\"f\")),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[],this.listenerCount=e=>this.hasEmitter()?this.getOrCreateEmitter().listenerCount(e):0,this.registerEventListener=async(e,t={},n,i)=>{const r={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e},o=this.getOrCreateEmitter();n(o);try{await this.wire.sendAction(\"subscribe-to-desktop-event\",r)}catch(e){throw i(o),this.deleteEmitterIfNothingRegistered(o),e}},this.deregisterEventListener=async(e,t={})=>{if(this.hasEmitter()){const n={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e};await this.wire.sendAction(\"unsubscribe-to-desktop-event\",n).catch((()=>null));return this.getOrCreateEmitter()}return Promise.resolve()},p(this,u,[t,...n],\"f\"),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[]}async on(e,t,n){return await this.registerEventListener(e,n,(n=>{n.on(e,t)}),(n=>{n.removeListener(e,t)})),this}async addListener(e,t,n){return this.on(e,t,n)}async once(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.once(e,i),n.once(e,t)}),(n=>{n.removeListener(e,i),n.removeListener(e,t)})),this}async prependListener(e,t,n){return await this.registerEventListener(e,n,(n=>{n.prependListener(e,t)}),(n=>{n.removeListener(e,t)})),this}async prependOnceListener(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.prependOnceListener(e,t),n.once(e,i)}),(n=>{n.removeListener(e,t),n.removeListener(e,i)})),this}async removeListener(e,t,n){const i=await this.deregisterEventListener(e,n);return i&&(i.removeListener(e,t),this.deleteEmitterIfNothingRegistered(i)),this}async deregisterAllListeners(e){const t={...this.identity,type:e,topic:this.topic};if(this.hasEmitter()){const e=this.getOrCreateEmitter(),n=e.listenerCount(t.type),i=[];for(let e=0;enull)));return await Promise.all(i),e}}async removeAllListeners(e){const t=async e=>{const t=await this.deregisterAllListeners(e);t&&(t.removeAllListeners(e),this.deleteEmitterIfNothingRegistered(t))};if(e)await t(e);else if(this.hasEmitter()){const e=this.getOrCreateEmitter().eventNames();await(0,y.promiseMap)(e,t)}return this}deleteEmitterIfNothingRegistered(e){0===e.eventNames().length&&this.wire.eventAggregator.delete(w(this,u,\"f\"))}},u=new WeakMap;d.Reply=class{};var g={};Object.defineProperty(g,\"__esModule\",{value:!0});var m=g.RuntimeError=g.NotSupportedError=g.NotImplementedError=g.NoAckError=g.DuplicateCorrelationError=g.UnexpectedActionError=g.DisconnectedError=void 0;class v extends Error{constructor(e){super(`Expected websocket state OPEN but found ${e}`),this.readyState=e}}g.DisconnectedError=v;class C extends Error{}g.UnexpectedActionError=C;class b extends Error{}g.DuplicateCorrelationError=b;class I extends Error{}g.NoAckError=I;class E extends Error{}g.NotImplementedError=E;class x extends Error{}g.NotSupportedError=x;class A extends Error{constructor(e){const{message:t,name:n,stack:i,...r}=e;super(t),this.name=n||\"Error\",this.stack=i??this.toString(),Object.keys(r).forEach((e=>{this[e]=r[e]}))}}class P extends Error{static getCallSite(e=0){const t=Error.stackTraceLimit,n=e+1;Error.stackTraceLimit=t+n;const i=Error.prepareStackTrace;Error.prepareStackTrace=(e,t)=>t;const r=(new Error).stack?.slice(n)??[];return Error.prepareStackTrace=i,Error.stackTraceLimit=t,r}static prepareStackTrace(e,t){if(\"function\"==typeof Error.prepareStackTrace)return Error.prepareStackTrace(e,t);let n=\"\";n+=e.name||\"Error\",n+=`: ${e.message||\"\"}`;for(const e of t)n+=`\\n at ${e.toString()}`;return n}constructor(e,t){const{reason:n,error:i}=e;super(n),this.name=\"RuntimeError\",i?.stack&&(this.cause=new A(i)),t&&(this.stack=P.prepareStackTrace(this,t))}}m=g.RuntimeError=P;var M={},_={},O={};Object.defineProperty(O,\"__esModule\",{value:!0}),O.validateIdentity=void 0,O.validateIdentity=function(e){let t;return\"object\"==typeof e&&\"string\"==typeof e.uuid||(t=\"Not a valid identity object\"),t};var S={},R={},F={},j={},k={},L={},T={};Object.defineProperty(T,\"__esModule\",{value:!0}),T.handleDeprecatedWarnings=void 0;var $;T.handleDeprecatedWarnings=e=>{(e.contentNavigation?.whitelist||e.contentNavigation?.blacklist||e.contentRedirect?.whitelist||e.contentRedirect?.blacklist)&&console.warn(\"The properties 'whitelist' and 'blacklist' have been marked as deprecated and will be removed in a future version. Please use 'allowlist' and 'denylist'.\")};var B={},G={};Object.defineProperty(G,\"__esModule\",{value:!0}),G.AsyncRetryableLazy=W=G.Lazy=void 0;var W=G.Lazy=class{constructor(e){this.producerFn=e}getValue(){return this.value||(this.value=this.producerFn()),this.value}};G.AsyncRetryableLazy=class{constructor(e){this.producerFn=e}async getValue(){return this.promise||(this.promise=this.producerFn().catch((e=>{throw delete this.promise,e}))),this.promise}};var H={};Object.defineProperty(H,\"__esModule\",{value:!0}),H.WebContents=void 0;const N=d;class D extends N.EmitterBase{constructor(e,t,n){super(e,n,t.uuid,t.name),this.identity=t,this.entityType=n}capturePage(e){return this.wire.sendAction(\"capture-page\",{options:e,...this.identity}).then((({payload:e})=>e.data))}executeJavaScript(e){return this.wire.sendAction(\"execute-javascript-in-window\",{...this.identity,code:e}).then((({payload:e})=>e.data))}getZoomLevel(){return this.wire.sendAction(\"get-zoom-level\",this.identity).then((({payload:e})=>e.data))}setZoomLevel(e){return this.wire.sendAction(\"set-zoom-level\",{...this.identity,level:e}).then((()=>{}))}navigate(e){return this.wire.sendAction(\"navigate-window\",{...this.identity,url:e}).then((()=>{}))}navigateBack(){return this.wire.sendAction(\"navigate-window-back\",{...this.identity}).then((()=>{}))}async navigateForward(){await this.wire.sendAction(\"navigate-window-forward\",{...this.identity})}stopNavigation(){return this.wire.sendAction(\"stop-window-navigation\",{...this.identity}).then((()=>{}))}reload(e=!1){return this.wire.sendAction(\"reload-window\",{ignoreCache:e,...this.identity}).then((()=>{}))}print(e={}){return this.wire.sendAction(\"print\",{...this.identity,options:e}).then((()=>{}))}findInPage(e,t){return this.wire.sendAction(\"find-in-page\",{...this.identity,searchTerm:e,options:t}).then((({payload:e})=>e.data))}stopFindInPage(e){return this.wire.sendAction(\"stop-find-in-page\",{...this.identity,action:e}).then((()=>{}))}getPrinters(){return this.wire.sendAction(\"get-printers\",{...this.identity}).then((({payload:e})=>e.data))}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){await this.wire.sendAction(\"focus-window\",{emitSynthFocused:e,...this.identity})}async showDeveloperTools(){await this.wire.sendAction(\"show-developer-tools\",this.identity)}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction(\"get-process-info\",this.identity);return e}async getSharedWorkers(){return this.wire.sendAction(\"get-shared-workers\",this.identity).then((({payload:e})=>e.data))}async inspectSharedWorker(){await this.wire.sendAction(\"inspect-shared-worker\",{...this.identity})}async inspectSharedWorkerById(e){await this.wire.sendAction(\"inspect-shared-worker-by-id\",{...this.identity,workerId:e})}async inspectServiceWorker(){await this.wire.sendAction(\"inspect-service-worker\",{...this.identity})}async showPopupWindow(e){if(this.wire.sendAction(`${this.entityType}-show-popup-window`,this.identity).catch((()=>{})),e?.onPopupReady){const t=async({popupName:t})=>{try{const n=this.fin.Window.wrapSync({uuid:this.fin.me.uuid,name:t});await e.onPopupReady(n)}catch(e){throw new Error(`Something went wrong during onPopupReady execution: ${e}`)}};await this.once(\"popup-ready\",t)}const{payload:t}=await this.wire.sendAction(\"try-create-popup-window\",{options:{...e,hasResultCallback:!!e?.onPopupResult,hasReadyCallback:!!e?.onPopupReady},...this.identity}),{data:{willOpen:n,options:i}}=t;n&&await this.fin.Window.create(i.initialOptions);if(e?.onPopupResult){const t=async t=>{await e.onPopupResult((e=>{const{name:t,uuid:n,result:i,data:r}=e,o={identity:{name:t,uuid:n},result:i};return r&&(o.data=r),o})(t))},n=async()=>{await this.removeListener(\"popup-result\",t)};await this.on(\"popup-result\",t),await this.once(\"popup-teardown\",n)}const{payload:r}=await this.wire.sendAction(\"show-popup-window\",{options:i,...this.identity});return r.data}}var U,V,z,K,q;function J(){return V||(V=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(function(){if($)return L;$=1,Object.defineProperty(L,\"__esModule\",{value:!0}),L.ViewModule=void 0;const e=d,t=O,n=J(),i=T;class r extends e.Base{async create(e){const{uuid:t}=this.wire.me;if(!e.name||\"string\"!=typeof e.name)throw new Error(\"Please provide a name property as a string in order to create a View.\");return(0,i.handleDeprecatedWarnings)(e),this.wire.environment.childViews?await this.wire.environment.createChildContent({entityType:\"view\",options:{...e,uuid:t}}):await this.wire.sendAction(\"create-view\",{...e,uuid:t}),this.wrapSync({uuid:t,name:e.name})}async wrap(e){this.wire.sendAction(\"view-wrap\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}wrapSync(e){this.wire.sendAction(\"view-wrap-sync\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}getCurrent(){if(this.wire.sendAction(\"view-get-current\").catch((e=>{})),!this.wire.me.isView)throw new Error(\"You are not in a View context\");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction(\"view-get-current-sync\").catch((e=>{})),!this.wire.me.isView)throw new Error(\"You are not in a View context\");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return L.ViewModule=r,L}(),e),n(function(){if(U)return B;var e;U=1,Object.defineProperty(B,\"__esModule\",{value:!0}),B.View=void 0;const t=g,n=G,i=H,r=ie();class o extends i.WebContents{constructor(i,o){super(i,o,\"view\"),this.identity=o,e.set(this,new n.Lazy((()=>this.fin.Platform.wrapSync(this.identity).getClient()))),this.attach=async e=>{await this.wire.sendAction(\"attach-view\",{target:e,...this.identity})},this.destroy=async()=>{await this.wire.sendAction(\"destroy-view\",{...this.identity})},this.show=async()=>{await this.wire.sendAction(\"show-view\",{...this.identity})},this.showAt=async(e,t={})=>{await this.wire.sendAction(\"show-view-at\",{bounds:e,...this.identity,options:t})},this.bringToFront=async()=>{await this.wire.sendAction(\"bring-view-to-front\",{...this.identity})},this.hide=async()=>{await this.wire.sendAction(\"hide-view\",{...this.identity})},this.setBounds=async e=>{await this.wire.sendAction(\"set-view-bounds\",{bounds:e,...this.identity})},this.getBounds=async()=>(await this.wire.sendAction(\"get-view-bounds\",{...this.identity})).payload.data,this.getInfo=async()=>(await this.wire.sendAction(\"get-view-info\",{...this.identity})).payload.data,this.getParentLayout=async()=>(this.wire.sendAction(\"view-get-parent-layout\",{...this.identity}).catch((()=>{})),this.fin.Platform.Layout.getLayoutByViewIdentity(this.identity)),this.getOptions=async()=>this.wire.sendAction(\"get-view-options\",{...this.identity}).then((({payload:e})=>e.data)),this.updateOptions=async e=>this.wire.sendAction(\"update-view-options\",{options:e,...this.identity}).then((()=>{})),this.getCurrentWindow=async()=>{const{payload:{data:e}}=await this.wire.sendAction(\"get-view-window\",{...this.identity});return new r._Window(this.wire,e)},this.getCurrentStack=async()=>{this.wire.sendAction(\"view-get-current-stack\").catch((()=>{}));try{return(await this.getParentLayout()).getStackByViewIdentity(this.identity)}catch(e){throw new t.RuntimeError({reason:\"This view does not belong to a stack.\",error:e})}},this.triggerBeforeUnload=async()=>(await this.wire.sendAction(\"trigger-before-unload\",{...this.identity})).payload.data,this.bindToElement=async e=>{if(!e)throw new Error(\"Element not found.\");return this.wire.environment.observeBounds(e,(async e=>this.setBounds(e)))}}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){const t=await this.getCurrentWindow();await t.focusedWebViewWasChanged(),await super.focus({emitSynthFocused:e})}}return B.View=o,e=new WeakMap,B}(),e)}(k)),k}function Y(){if(z)return j;z=1,Object.defineProperty(j,\"__esModule\",{value:!0}),j.Application=void 0;const e=d,t=ie(),n=J();class i extends e.EmitterBase{constructor(e,n){super(e,\"application\",n.uuid),this.identity=n,this.window=new t._Window(this.wire,{uuid:this.identity.uuid,name:this.identity.uuid})}windowListFromIdentityList(e){const n=[];return e.forEach((e=>{n.push(new t._Window(this.wire,{uuid:e.uuid,name:e.name}))})),n}isRunning(){return this.wire.sendAction(\"is-application-running\",this.identity).then((({payload:e})=>e.data))}async quit(e=!1){try{await this._close(e),await this.wire.sendAction(\"destroy-application\",{force:e,...this.identity})}catch(e){if(![\"Remote connection has closed\",\"Could not locate the requested application\"].some((t=>e.message.includes(t))))throw e}}async _close(e=!1){try{await this.wire.sendAction(\"close-application\",{force:e,...this.identity})}catch(e){if(!e.message.includes(\"Remote connection has closed\"))throw e}}close(e=!1){return console.warn(\"Deprecation Warning: Application.close is deprecated Please use Application.quit\"),this.wire.sendAction(\"application-close\",this.identity).catch((e=>{})),this._close(e)}getChildWindows(){return this.wire.sendAction(\"get-child-windows\",this.identity).then((({payload:e})=>{const t=[];return e.data.forEach((e=>{t.push({uuid:this.identity.uuid,name:e})})),this.windowListFromIdentityList(t)}))}getManifest(){return this.wire.sendAction(\"get-application-manifest\",this.identity).then((({payload:e})=>e.data))}getParentUuid(){return this.wire.sendAction(\"get-parent-application\",this.identity).then((({payload:e})=>e.data))}getShortcuts(){return this.wire.sendAction(\"get-shortcuts\",this.identity).then((({payload:e})=>e.data))}async getViews(){const{payload:e}=await this.wire.sendAction(\"application-get-views\",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}getZoomLevel(){return this.wire.sendAction(\"get-application-zoom-level\",this.identity).then((({payload:e})=>e.data))}getWindow(){return this.wire.sendAction(\"application-get-window\",this.identity).catch((e=>{})),Promise.resolve(this.window)}registerUser(e,t){return this.wire.sendAction(\"register-user\",{userName:e,appName:t,...this.identity}).then((()=>{}))}removeTrayIcon(){return this.wire.sendAction(\"remove-tray-icon\",this.identity).then((()=>{}))}restart(){return this.wire.sendAction(\"restart-application\",this.identity).then((()=>{}))}run(){return console.warn(\"Deprecation Warning: Application.run is deprecated Please use fin.Application.start\"),this.wire.sendAction(\"application-run\",this.identity).catch((e=>{})),this._run()}_run(e={}){return this.wire.sendAction(\"run-application\",{manifestUrl:this._manifestUrl,opts:e,...this.identity}).then((()=>{}))}scheduleRestart(){return this.wire.sendAction(\"relaunch-on-close\",this.identity).then((()=>{}))}async sendApplicationLog(){const{payload:e}=await this.wire.sendAction(\"send-application-log\",this.identity);return e.data}async setJumpList(e){await this.wire.sendAction(\"set-jump-list\",{config:e,...this.identity})}setTrayIcon(e){return this.wire.sendAction(\"set-tray-icon\",{enabledIcon:e,...this.identity}).then((()=>{}))}setShortcuts(e){return this.wire.sendAction(\"set-shortcuts\",{data:e,...this.identity}).then((()=>{}))}async setShortcutQueryParams(e){await this.wire.sendAction(\"set-shortcut-query-args\",{data:e,...this.identity})}setZoomLevel(e){return this.wire.sendAction(\"set-application-zoom-level\",{level:e,...this.identity}).then((()=>{}))}async setAppLogUsername(e){await this.wire.sendAction(\"set-app-log-username\",{data:e,...this.identity})}getTrayIconInfo(){return this.wire.sendAction(\"get-tray-icon-info\",this.identity).then((({payload:e})=>e.data))}hasTrayIcon(){return this.wire.sendAction(\"has-tray-icon\",this.identity).then((({payload:e})=>e.data))}terminate(){return this.wire.sendAction(\"terminate-application\",this.identity).then((()=>{}))}wait(){return this.wire.sendAction(\"wait-for-hung-application\",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction(\"get-info\",this.identity).then((({payload:e})=>e.data))}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction(\"application-get-process-info\",this.identity);return e}async setFileDownloadLocation(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t};await this.wire.sendAction(\"set-file-download-location\",{...n,downloadLocation:e})}async getFileDownloadLocation(){const{payload:{data:e}}=await this.wire.sendAction(\"get-file-download-location\",this.identity);return e}async showTrayIconPopupMenu(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t},{payload:i}=await this.wire.sendAction(\"show-tray-icon-popup-menu\",{...n,options:e});return i.data}async closeTrayIconPopupMenu(){const{name:e}=this.wire.me,t={uuid:this.identity.uuid,name:e};await this.wire.sendAction(\"close-tray-icon-popup-menu\",{...t})}}return j.Application=i,j}function Z(){return q||(q=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(function(){if(K)return F;K=1,Object.defineProperty(F,\"__esModule\",{value:!0}),F.ApplicationModule=void 0;const e=d,t=O,n=Y();class i extends e.Base{async wrap(e){this.wire.sendAction(\"wrap-application\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}wrapSync(e){this.wire.sendAction(\"wrap-application-sync\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}async _create(e){return void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&void 0===e.isPlatformController&&(e.autoShow=!0),await this.wire.sendAction(\"create-application\",e),this.wrap({uuid:e.uuid})}create(e){return console.warn(\"Deprecation Warning: fin.Application.create is deprecated. Please use fin.Application.start\"),this.wire.sendAction(\"application-create\").catch((e=>{})),this._create(e)}async start(e){this.wire.sendAction(\"start-application\").catch((e=>{}));const t=await this._create(e);return await this.wire.sendAction(\"run-application\",{uuid:e.uuid}),t}async startManyManifests(e,t){return this.wire.sendAction(\"run-applications\",{applications:e,opts:t}).then((()=>{}))}getCurrent(){return this.wire.sendAction(\"get-current-application\").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction(\"get-current-application-sync\").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}async startFromManifest(e,t){this.wire.sendAction(\"application-start-from-manifest\").catch((e=>{}));const n=await this._createFromManifest(e);return await n._run(t),n}createFromManifest(e){return console.warn(\"Deprecation Warning: fin.Application.createFromManifest is deprecated. Please use fin.Application.startFromManifest\"),this.wire.sendAction(\"application-create-from-manifest\").catch((e=>{})),this._createFromManifest(e)}_createFromManifest(e){return this.wire.sendAction(\"get-application-manifest\",{manifestUrl:e}).then((({payload:e})=>{const t=e.data.platform?e.data.platform.uuid:e.data.startup_app.uuid;return this.wrap({uuid:t})})).then((t=>(t._manifestUrl=e,t)))}}return F.ApplicationModule=i,F}(),e),n(Y(),e)}(R)),R}H.WebContents=D;var Q={};Object.defineProperty(Q,\"__esModule\",{value:!0}),Q.promisifySubscription=void 0;var X,ee,te;function ne(){if(X)return S;X=1,Object.defineProperty(S,\"__esModule\",{value:!0}),S._Window=void 0;const e=Z(),t=H,n=J(),i=T,r=Q;class o extends t.WebContents{constructor(e,t){super(e,t,\"window\")}async createWindow(e){this.wire.sendAction(\"window-create-window\",this.identity).catch((e=>{}));const t=await(0,r.promisifySubscription)(this,\"fire-constructor-callback\");void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&(e.autoShow=!0),(0,i.handleDeprecatedWarnings)(e);const n=this.wire.environment.createChildContent({entityType:\"window\",options:e}),[o]=await Promise.all([t.getValue(),n]);let s;const{success:a}=o,c=o.data,{message:d}=c;s=a?{httpResponseCode:c.httpResponseCode,apiInjected:c.apiInjected}:{message:c.message,networkErrorCode:c.networkErrorCode,stack:c.stack};const h={message:d,cbPayload:s,success:a};try{this.getWebWindow().fin.__internal_.openerSuccessCBCalled()}catch(e){}return h.success?this:Promise.reject(h)}getAllFrames(){return this.wire.sendAction(\"get-all-frames\",this.identity).then((({payload:e})=>e.data))}getBounds(){return this.wire.sendAction(\"get-window-bounds\",this.identity).then((({payload:e})=>e.data))}center(){return this.wire.sendAction(\"center-window\",this.identity).then((()=>{}))}blur(){return this.wire.sendAction(\"blur-window\",this.identity).then((()=>{}))}bringToFront(){return this.wire.sendAction(\"bring-window-to-front\",this.identity).then((()=>{}))}animate(e,t){return this.wire.sendAction(\"animate-window\",{transitions:e,options:t,...this.identity}).then((()=>{}))}hide(){return this.wire.sendAction(\"hide-window\",this.identity).then((()=>{}))}close(e=!1){return this.wire.sendAction(\"close-window\",{force:e,...this.identity}).then((()=>{Object.setPrototypeOf(this,null)}))}focusedWebViewWasChanged(){return this.wire.sendAction(\"focused-webview-changed\",this.identity).then((()=>{}))}getNativeId(){return this.wire.sendAction(\"get-window-native-id\",this.identity).then((({payload:e})=>e.data))}async getCurrentViews(){const{payload:e}=await this.wire.sendAction(\"window-get-views\",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}disableFrame(){return console.warn(\"Function is deprecated; use disableUserMovement instead.\"),this.wire.sendAction(\"disable-window-frame\",this.identity).then((()=>{}))}disableUserMovement(){return this.wire.sendAction(\"disable-window-frame\",this.identity).then((()=>{}))}enableFrame(){return console.warn(\"Function is deprecated; use enableUserMovement instead.\"),this.wire.sendAction(\"enable-window-frame\",this.identity).then((()=>{}))}enableUserMovement(){return this.wire.sendAction(\"enable-window-frame\",this.identity).then((()=>{}))}flash(){return this.wire.sendAction(\"flash-window\",this.identity).then((()=>{}))}stopFlashing(){return this.wire.sendAction(\"stop-flash-window\",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction(\"get-window-info\",this.identity).then((({payload:e})=>e.data))}async getLayout(e){this.wire.sendAction(\"window-get-layout\",this.identity).catch((e=>{}));const t=await this.getOptions();if(!t.layout&&!t.layoutSnapshot)throw new Error(\"Window does not have a Layout\");return this.fin.Platform.Layout.wrap(e??this.identity)}getOptions(){return this.wire.sendAction(\"get-window-options\",this.identity).then((({payload:e})=>e.data))}getParentApplication(){return this.wire.sendAction(\"window-get-parent-application\",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity))}getParentWindow(){return this.wire.sendAction(\"window-get-parent-window\",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity)).then((e=>e.getWindow()))}async getSnapshot(e){const t={area:e,...this.identity};console.warn(\"Window.getSnapshot has been deprecated, please use Window.capturePage\");return(await this.wire.sendAction(\"get-window-snapshot\",t)).payload.data}getState(){return this.wire.sendAction(\"get-window-state\",this.identity).then((({payload:e})=>e.data))}getWebWindow(){return this.wire.sendAction(\"window-get-web-window\",this.identity).catch((e=>{})),this.wire.environment.getWebWindow(this.identity)}isMainWindow(){return this.wire.sendAction(\"window-is-main-window\",this.identity).catch((e=>{})),this.me.uuid===this.me.name}isShowing(){return this.wire.sendAction(\"is-window-showing\",this.identity).then((({payload:e})=>e.data))}maximize(){return this.wire.sendAction(\"maximize-window\",this.identity).then((()=>{}))}minimize(){return this.wire.sendAction(\"minimize-window\",this.identity).then((()=>{}))}moveBy(e,t,n){return this.wire.sendAction(\"move-window-by\",{deltaLeft:e,deltaTop:t,positioningOptions:n,...this.identity}).then((()=>{}))}moveTo(e,t,n){return this.wire.sendAction(\"move-window\",{left:e,top:t,positioningOptions:n,...this.identity}).then((()=>{}))}resizeBy(e,t,n,i){return this.wire.sendAction(\"resize-window-by\",{deltaWidth:Math.floor(e),deltaHeight:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}resizeTo(e,t,n,i){return this.wire.sendAction(\"resize-window\",{width:Math.floor(e),height:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}restore(){return this.wire.sendAction(\"restore-window\",this.identity).then((()=>{}))}setAsForeground(){return this.wire.sendAction(\"set-foreground-window\",this.identity).then((()=>{}))}setBounds(e,t){return this.wire.sendAction(\"set-window-bounds\",{...e,...this.identity,positioningOptions:t}).then((()=>{}))}show(e=!1){return this.wire.sendAction(\"show-window\",{force:e,...this.identity}).then((()=>{}))}showAt(e,t,n=!1){return this.wire.sendAction(\"show-at-window\",{force:n,left:Math.floor(e),top:Math.floor(t),...this.identity}).then((()=>{}))}updateOptions(e){return this.wire.sendAction(\"update-window-options\",{options:e,...this.identity}).then((()=>{}))}authenticate(e,t){return this.wire.sendAction(\"window-authenticate\",{userName:e,password:t,...this.identity}).then((()=>{}))}async showPopupMenu(e){const{payload:t}=await this.wire.sendAction(\"show-popup-menu\",{options:e,...this.identity});return t.data}async closePopupMenu(){return this.wire.sendAction(\"close-popup-menu\",{...this.identity}).then((()=>{}))}async dispatchPopupResult(e){this.wire.sendAction(\"window-dispatch-popup-result\",this.identity).catch((e=>{})),await this.wire.sendAction(\"dispatch-popup-result\",{data:e,...this.identity})}async print(e={content:\"self\"}){switch(e.content){case void 0:case\"self\":return super.print(e);case\"screenshot\":return this.wire.sendAction(\"print-screenshot\",this.identity).then((()=>{}));case\"views\":return this.wire.sendAction(\"print-views\",{...this.identity,options:e}).then((()=>{}));default:return}}}return S._Window=o,S}function ie(){return te||(te=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(function(){if(ee)return _;ee=1,Object.defineProperty(_,\"__esModule\",{value:!0}),_._WindowModule=void 0;const e=d,t=O,n=ne();class i extends e.Base{async wrap(e){this.wire.sendAction(\"window-wrap\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}wrapSync(e){this.wire.sendAction(\"window-wrap-sync\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}create(e){return this.wire.sendAction(\"create-window\").catch((e=>{})),new n._Window(this.wire,{uuid:this.me.uuid,name:e.name}).createWindow(e)}getCurrent(){if(this.wire.sendAction(\"get-current-window\").catch((e=>{})),!this.wire.me.isWindow)throw new Error(\"You are not in a Window context\");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction(\"get-current-window-sync\").catch((e=>{})),!this.wire.me.isWindow)throw new Error(\"You are not in a Window context\");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return _._WindowModule=i,_}(),e),n(ne(),e)}(M)),M}Q.promisifySubscription=async(e,t,n=(()=>!0),i)=>{let r,o,s;const a=new Promise(((e,t)=>{r=e,o=t})),c=e=>{n(e)&&(clearTimeout(s),r(e))};return await e.on(t,c),i&&(s=setTimeout((()=>o(new Error(\"event timed out\"))),i)),a.finally((()=>{e.removeListener(t,c).catch((()=>null))})),{getValue:()=>a}},Object.defineProperty(c,\"__esModule\",{value:!0}),c.System=void 0;const re=d,oe=g,se=ie(),ae=t;class ce extends re.EmitterBase{constructor(e){super(e,\"system\")}sendExternalProcessRequest(e,t){return new Promise(((n,i)=>{const r=\"external-process-exited\";let o,s,a,c;\"function\"==typeof t.listener&&(a=e=>{const n=e||{};s={topic:\"exited\",uuid:n.processUuid||\"\",exitCode:n.exitCode||0},o===e.processUuid&&(t.listener(s),c.removeListener(r,a))},this.wire.me.name||(this.wire.me.name=this.wire.me.uuid),c=new se._Window(this.wire,this.wire.me),c.on(r,a)),this.wire.sendAction(e,t).then((({payload:e})=>{o=e.data.uuid,n(e.data),s&&o===s.uuid&&(t.listener(s),c.removeListener(r,a))})).catch((e=>{c&&c.removeListener(r,a),i(e)}))}))}getVersion(){return this.wire.sendAction(\"get-version\").then((({payload:e})=>e.data))}clearCache(e){return this.wire.sendAction(\"clear-cache\",e).then((()=>{}))}deleteCacheOnExit(){return this.wire.sendAction(\"delete-cache-request\").then((()=>{}))}exit(){return this.wire.sendAction(\"exit-desktop\").then((()=>{}))}async fetchManifest(e){const{payload:{data:t}}=await this.wire.sendAction(\"fetch-manifest\",{manifestUrl:e});return t}flushCookieStore(){return this.wire.sendAction(\"flush-cookie-store\").then((()=>{}))}getAllWindows(){return this.wire.sendAction(\"get-all-windows\").then((({payload:e})=>e.data))}getAllApplications(){return this.wire.sendAction(\"get-all-applications\").then((({payload:e})=>e.data))}getCommandLineArguments(){return this.wire.sendAction(\"get-command-line-arguments\").then((({payload:e})=>e.data))}async getCrashReporterState(){const{payload:{data:{diagnosticMode:e,isRunning:t}}}=await this.wire.sendAction(\"get-crash-reporter-state\");return console.warn(\"diagnosticMode property is deprecated. It will be removed in a future version\"),{diagnosticMode:e,diagnosticsMode:e,isRunning:t}}async startCrashReporter(e){const t=e,n={...t,diagnosticMode:t.diagnosticsMode||t.diagnosticMode},{payload:{data:{diagnosticMode:i,isRunning:r}}}=await this.wire.sendAction(\"start-crash-reporter\",n);return{diagnosticMode:i,diagnosticsMode:i,isRunning:r}}getUniqueUserId(){return this.wire.sendAction(\"get-unique-user-id\").then((({payload:e})=>e.data))}getEntityInfo(e,t){return this.wire.sendAction(\"get-entity-info\",{uuid:e,name:t}).then((({payload:e})=>e.data))}getEnvironmentVariable(e){return this.wire.sendAction(\"get-environment-variable\",{environmentVariables:e}).then((({payload:e})=>e.data))}getFocusedWindow(){return this.wire.sendAction(\"get-focused-window\").then((({payload:e})=>e.data))}async isAppCertified(e){const{payload:{data:{certifiedInfo:t}}}=await this.wire.sendAction(\"is-app-certified\",{manifestUrl:e});return t}getInstalledRuntimes(){return this.wire.sendAction(\"get-installed-runtimes\").then((({payload:e})=>e.data.runtimes))}async getInstalledApps(){const{payload:{data:{installedApps:e}}}=await this.wire.sendAction(\"get-installed-apps\");return e}getLog(e){return this.wire.sendAction(\"view-log\",e).then((({payload:e})=>e.data))}getMachineId(){return this.wire.sendAction(\"get-machine-id\").then((({payload:e})=>e.data))}getMinLogLevel(){return this.wire.sendAction(\"get-min-log-level\").then((({payload:e})=>e.data))}getLogList(){return this.wire.sendAction(\"list-logs\").then((({payload:e})=>e.data))}getMonitorInfo(){return this.wire.sendAction(\"get-monitor-info\").then((({payload:e})=>e.data))}getMousePosition(){return this.wire.sendAction(\"get-mouse-position\").then((({payload:e})=>e.data))}getProcessList(){return console.warn(\"System.getProcessList has been deprecated. Please consider using our new process APIs: Window.getProcessInfo, View.getProcessInfo, Application.getProcessInfo, System.getAllProcessInfo\"),this.wire.sendAction(\"process-snapshot\").then((({payload:e})=>e.data))}async getAllProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction(\"get-all-process-info\",this.identity);return e}getProxySettings(){return this.wire.sendAction(\"get-proxy-settings\").then((({payload:e})=>e.data))}getRuntimeInfo(){return this.wire.sendAction(\"get-runtime-info\").then((({payload:e})=>e.data))}getRvmInfo(){return this.wire.sendAction(\"get-rvm-info\").then((({payload:e})=>e.data))}getHostSpecs(){return this.wire.sendAction(\"get-host-specs\").then((({payload:e})=>e.data))}getOSInfo(){return this.wire.sendAction(\"get-os-info\").then((({payload:e})=>e.data))}launchExternalProcess(e){return this.sendExternalProcessRequest(\"launch-external-process\",e)}monitorExternalProcess(e){return this.sendExternalProcessRequest(\"monitor-external-process\",e)}log(e,t){return this.wire.sendAction(\"write-to-log\",{level:e,message:t}).then((()=>{}))}openUrlWithBrowser(e){return this.wire.sendAction(\"open-url-with-browser\",{url:e}).then((()=>{}))}async registerCustomProtocol(e){if(\"object\"!=typeof e)throw new Error(\"Must provide an object with a `protocolName` property having a string value.\");await this.wire.sendAction(\"register-custom-protocol\",e)}async unregisterCustomProtocol(e){await this.wire.sendAction(\"unregister-custom-protocol\",{protocolName:e})}async getCustomProtocolState(e){return this.wire.sendAction(\"get-custom-protocol-state\",{protocolName:e}).then((({payload:e})=>e.data))}releaseExternalProcess(e){return this.wire.sendAction(\"release-external-process\",{uuid:e}).then((()=>{}))}showDeveloperTools(e){return this.wire.sendAction(\"show-developer-tools\",e).then((()=>{}))}terminateExternalProcess(e){return this.wire.sendAction(\"terminate-external-process\",e).then((()=>{}))}updateProxySettings(e){return this.wire.sendAction(\"update-proxy\",e).then((()=>{}))}async downloadAsset(e,t){const n=()=>{};let i=n,r=n;const o=new Promise(((e,t)=>{i=e,r=t}));if(\"openfin\"!==this.wire.environment.type)throw new oe.NotSupportedError(\"downloadAsset only supported in an OpenFin Render process\");const s=oe.RuntimeError.getCallSite(),a=this.wire.environment.getNextMessageId().toString(),c=`asset-download-progress-${a}`,d=`asset-download-error-${a}`,h=`asset-download-complete-${a}`,l=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},u=()=>{this.removeListener(c,l)};await Promise.all([this.on(c,l),this.once(d,(e=>{u();const{reason:t,err:n}=e;r(new oe.RuntimeError({reason:t,error:n},s))})),this.once(h,(()=>{u(),i()}))]);const p=Object.assign(e,{downloadId:a});return await this.wire.sendAction(\"download-asset\",p).catch((e=>{throw u(),e})),o}downloadRuntime(e,t){const n=oe.RuntimeError.getCallSite();return new Promise(((i,r)=>{if(\"openfin\"!==this.wire.environment.type)return void r(new oe.NotSupportedError(\"downloadRuntime only supported in an OpenFin Render process\"));const o=this.wire.environment.getNextMessageId().toString(),s=`runtime-download-progress-${o}`,a=`runtime-download-error-${o}`,c=`runtime-download-complete-${o}`,d=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},h=()=>{this.removeListener(s,d)};this.on(s,d),this.once(a,(e=>{h();const{reason:t,err:i}=e;r(new oe.RuntimeError({reason:t,error:i},n))})),this.once(c,(()=>{h(),i()}));const l=Object.assign(e,{downloadId:o});this.wire.sendAction(\"download-runtime\",l).catch((e=>{h(),r(e)}))}))}downloadPreloadScripts(e){return this.wire.sendAction(\"download-preload-scripts\",{scripts:e}).then((({payload:e})=>e.data))}getAllExternalApplications(){return this.wire.sendAction(\"get-all-external-applications\").then((({payload:e})=>e.data))}getAppAssetInfo(e){return this.wire.sendAction(\"get-app-asset-info\",e).then((({payload:e})=>e.data))}getCookies(e){const t=this.wire.environment.getUrl(),n=Object.assign(e,{url:t});return this.wire.sendAction(\"get-cookies\",n).then((({payload:e})=>e.data))}setMinLogLevel(e){return this.wire.sendAction(\"set-min-log-level\",{level:e}).then((()=>{}))}resolveUuid(e){return this.wire.sendAction(\"resolve-uuid\",{entityKey:e}).then((({payload:e})=>e.data))}executeOnRemote(e,t){return t.requestingIdentity=e,this.wire.ferryAction(t)}readRegistryValue(e,t,n){return this.wire.sendAction(\"read-registry-value\",{rootKey:e,subkey:t,value:n}).then((({payload:e})=>e.data))}registerExternalConnection(e){return this.wire.sendAction(\"register-external-connection\",{uuid:e}).then((({payload:e})=>e.data))}async getServiceConfiguration(e){if(\"string\"!=typeof e.name)throw new Error(\"Must provide an object with a `name` property having a string value\");const{name:t}=e;return this.wire.sendAction(\"get-service-configuration\",{name:t}).then((({payload:e})=>e.data))}async getSystemAppConfig(e){if(\"string\"!=typeof e)throw new Error(\"Must provide a string value for name of system app\");return this.wire.sendAction(\"get-system-app-configuration\",{name:e}).then((({payload:e})=>e.data))}async registerShutdownHandler(e){this.wire.sendAction(\"system-register-shutdown-handler\").catch((e=>{}));const{uuid:t,name:n}=this.wire.me;this.on(\"system-shutdown\",(i=>{e({proceed:()=>{this.wire.environment.raiseEvent(\"application/system-shutdown-handled\",{uuid:t,name:n,topic:\"application\"})}})}))}runRvmHealthCheck(){return this.wire.sendAction(\"run-rvm-health-check\").then((({payload:e})=>e.data))}async launchManifest(e,t={}){const{subscribe:n,...i}=t,r=i;if(n){const e=new ae.EventEmitter;n(e);const t=\"app-version-progress\",i=\"runtime-status\",o=\"app-version-complete\",s=\"app-version-error\",a=this.wire.environment.getNextMessageId().toString();r.appVersionId=a;const c=[o,t,i,s],d=e=>{const{appVersionId:t,topic:n,type:i,...r}=e;return{...r,type:c.find((e=>i.includes(e)))}},h=t=>{const n=d(t);e.emit(n.type,n)},l=()=>{this.removeListener(`${t}.${a}`,h),this.removeListener(`${i}.${a}`,h),this.removeListener(`${o}.${a}`,h),this.removeListener(`${s}.${a}`,h),this.removeListener(`${o}.${a}`,l),this.removeListener(`${s}.${a}`,l)};await Promise.all([this.on(`${t}.${a}`,h),this.on(`${i}.${a}`,h),this.once(`${o}.${a}`,h),this.once(`${s}.${a}`,h),this.once(`${o}.${a}`,l),this.once(`${s}.${a}`,l)])}return(await this.wire.sendAction(\"launch-manifest\",{manifestUrl:e,opts:r})).payload.data.manifest}async queryPermissionForCurrentContext(e){const t={uuid:this.wire.me.uuid,name:this.wire.me.name};return(await this.wire.sendAction(\"query-permission-for-current-context\",{apiName:e,identity:t})).payload.data}async enableNativeWindowIntegrationProvider(e){const{payload:t}=await this.wire.sendAction(\"enable-native-window-integration-provider\",{permissions:e});return t.data}async registerUsage({data:e,type:t}){await this.wire.sendAction(\"register-usage\",{data:e,type:t})}async getPrinters(){const{payload:e}=await this.wire.sendAction(\"system-get-printers\");return e.data}async updateProcessLoggingOptions(e){await this.wire.sendAction(\"system-update-process-logging-options\",{options:e})}async getDomainSettings(){const{payload:{data:e}}=await this.wire.sendAction(\"get-domain-settings\",this.identity);return e}async setDomainSettings(e){await this.wire.sendAction(\"set-domain-settings\",{domainSettings:e,...this.identity})}async refreshExtensions(){const{payload:e}=await this.wire.sendAction(\"refresh-extensions\");return e.data}async getInstalledExtensions(){const{payload:e}=await this.wire.sendAction(\"get-installed-extensions\");return e.data}}c.System=ce;var de={},he={};Object.defineProperty(he,\"__esModule\",{value:!0}),he.RefCounter=void 0;he.RefCounter=class{constructor(){this.topicRefMap=new Map}incRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t+1;n=i,this.topicRefMap.set(e,i)}else this.topicRefMap.set(e,1),n=1;return n}decRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t-1;this.topicRefMap.set(e,i),n=i}else n=-1;return n}actOnFirst(e,t,n){return 1===this.incRefCount(e)?t():n()}actOnLast(e,t,n){return 0===this.decRefCount(e)?t():n()}};var le={},ue={},pe={};Object.defineProperty(pe,\"__esModule\",{value:!0}),pe.ChannelBase=pe.ProtectedItems=void 0;const we=e=>async(t,n,i)=>{const r=await e(t,n,i);return void 0===r?n:r};pe.ProtectedItems=class{constructor(e,t){this.providerIdentity=e,this.close=t}};class ye{static defaultAction(e){throw new Error(`No action registered at target for ${e}`)}constructor(){this.subscriptions=new Map}async processAction(e,t,n){try{const i=this.subscriptions.has(e)?this.subscriptions.get(e):(t,n)=>(this.defaultAction??ye.defaultAction)(e,t,n),r=this.preAction?await this.preAction(e,t,n):t,o=await i(r,n);return this.postAction?await this.postAction(e,o,n):o}catch(t){if(this.errorMiddleware)return this.errorMiddleware(e,t,n);throw t}}beforeAction(e){if(this.preAction)throw new Error(\"Already registered beforeAction middleware\");this.preAction=we(e)}onError(e){if(this.errorMiddleware)throw new Error(\"Already registered error middleware\");this.errorMiddleware=e}afterAction(e){if(this.postAction)throw new Error(\"Already registered afterAction middleware\");this.postAction=we(e)}remove(e){this.subscriptions.delete(e)}setDefaultAction(e){if(this.defaultAction)throw new Error(\"default action can only be set once\");this.defaultAction=e}register(e,t){if(this.subscriptions.has(e))throw new Error(`Subscription already registered for action: ${e}. Unsubscribe before adding new subscription`);return this.subscriptions.set(e,t),!0}}pe.ChannelBase=ye;var fe,ge,me,ve=s&&s.__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)},Ce=s&&s.__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};Object.defineProperty(ue,\"__esModule\",{value:!0}),ue.ChannelClient=void 0;const be=pe,Ie=new Map;class Ee extends be.ChannelBase{static closeChannelByEndpointId(e){const t=Ie.get(e);t&&ve(t,me,\"f\").call(t)}static handleProviderDisconnect(e){for(const t of Ie.values())t.providerIdentity.channelId===e.channelId&&(t.disconnectListener(e),ve(t,me,\"f\").call(t))}constructor(e,t,n){super(),fe.set(this,void 0),ge.set(this,void 0),this.processAction=(e,t,n)=>super.processAction(e,t,n),me.set(this,(()=>{Ie.delete(this.endpointId),ve(this,ge,\"f\").close()})),Ce(this,fe,new be.ProtectedItems(e,t),\"f\"),this.disconnectListener=()=>{},this.endpointId=e.endpointId,Ce(this,ge,n,\"f\"),Ie.set(this.endpointId,this),n.receive(this.processAction)}get providerIdentity(){return ve(this,fe,\"f\").providerIdentity}async dispatch(e,t){if(ve(this,ge,\"f\").isEndpointConnected(this.providerIdentity.channelId))return ve(this,ge,\"f\").send(this.providerIdentity.channelId,e,t);throw new Error(\"The client you are trying to dispatch from is disconnected from the target provider.\")}onDisconnection(e){this.disconnectListener=t=>{try{e(t)}catch(e){throw new Error(`Error while calling the onDisconnection callback: ${e.message}`)}finally{this.disconnectListener=()=>{}}}}async disconnect(){await this.sendDisconnectAction(),ve(this,me,\"f\").call(this)}async sendDisconnectAction(){const e=ve(this,fe,\"f\");await e.close()}static async wireClose(e,t,n){const{channelName:i,uuid:r,name:o}=t;await e.sendAction(\"disconnect-from-channel\",{channelName:i,uuid:r,name:o,endpointId:n})}}ue.ChannelClient=Ee,fe=new WeakMap,ge=new WeakMap,me=new WeakMap;var xe={},Ae={};Object.defineProperty(Ae,\"__esModule\",{value:!0}),Ae.exhaustiveCheck=void 0,Ae.exhaustiveCheck=function(e,t){throw new Error(`Unsupported value: ${e}${t?`\\n Supported values are: ${t.join(\"\")}`:\"\"}`)};var Pe,Me,_e,Oe={},Se=s&&s.__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},Re=s&&s.__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)};Object.defineProperty(Oe,\"__esModule\",{value:!0}),Oe.ClassicInfo=Oe.ClassicStrategy=void 0;Oe.ClassicStrategy=class{constructor(e,t,n,i){this.messageReceiver=t,this.endpointId=n,this.providerIdentity=i,Pe.set(this,void 0),Me.set(this,new Map),_e.set(this,new Map),this.send=async(e,t,n)=>{const i=Re(this,Me,\"f\").get(e);if(!i)throw new Error(`Could not locate routing info for endpoint ${e}`);const r={...i};r.isLocalEndpointId&&delete r.endpointId,delete r.isLocalEndpointId;const o=Re(this,Pe,\"f\").sendAction(\"send-channel-message\",{...r,providerIdentity:this.providerIdentity,action:t,payload:n});Re(this,_e,\"f\").get(e)?.add(o);return(await o.catch((e=>{throw new Error(e.message)})).finally((()=>{Re(this,_e,\"f\").get(e)?.delete(o)}))).payload.data.result},this.close=async()=>{this.messageReceiver.removeEndpoint(this.providerIdentity.channelId,this.endpointId),[...Re(this,Me,\"f\").keys()].forEach((e=>this.closeEndpoint(e))),Se(this,Me,new Map,\"f\")},Se(this,Pe,e,\"f\")}onEndpointDisconnect(e,t){}receive(e){this.messageReceiver.addEndpoint(e,this.providerIdentity.channelId,this.endpointId)}async closeEndpoint(e){const t=Re(this,Me,\"f\").get(e);Re(this,Me,\"f\").delete(e);const n=Re(this,_e,\"f\").get(e);n?.forEach((n=>{const i=`Channel connection with identity uuid: ${t?.uuid} / name: ${t?.name} / endpointId: ${e} no longer connected.`;n.cancel(new Error(i))}))}isEndpointConnected(e){return Re(this,Me,\"f\").has(e)}addEndpoint(e,t){Re(this,Me,\"f\").set(e,t.endpointIdentity),Re(this,_e,\"f\").set(e,new Set)}isValidEndpointPayload(e){return\"string\"==typeof e?.endpointIdentity?.endpointId||\"string\"==typeof e?.endpointIdentity?.channelId}},Pe=new WeakMap,Me=new WeakMap,_e=new WeakMap,Oe.ClassicInfo={version:5,minimumVersion:0,type:\"classic\"};var Fe={},je={},ke={};Object.defineProperty(ke,\"__esModule\",{value:!0}),ke.errorToPOJO=void 0,ke.errorToPOJO=function(e){return{stack:e.stack,name:e.name,message:e.message,toString:()=>e.stack||e.toString()}};var Le,Te,$e=s&&s.__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)},Be=s&&s.__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};Object.defineProperty(je,\"__esModule\",{value:!0}),je.RTCEndpoint=void 0;const Ge=ke;je.RTCEndpoint=class{static isValidEndpointPayload(e){const t=e=>\"object\"==typeof e&&null!==e;return t(e)&&t(e.endpointIdentity)&&t(e.rtc)&&\"string\"==typeof e.endpointIdentity.endpointId}constructor({rtc:e,endpointIdentity:t}){this.responseMap=new Map,Le.set(this,null),Te.set(this,void 0),this.connectionStateChangeHandler=e=>{\"connected\"!==this.rtc.rtcClient.connectionState&&(this.rtc.rtcClient.removeEventListener(\"connectionstatechange\",this.connectionStateChangeHandler),this.close(),$e(this,Te,\"f\")&&$e(this,Te,\"f\").call(this))},this.send=async(e,t)=>{const n=`message-${Math.random()}`,i=new Promise(((e,t)=>{this.responseMap.set(n,{resolve:e,reject:t})}));return this.rtc.channels.request.send(JSON.stringify({action:e,payload:t,messageId:n})),i},this.close=()=>{this.responseMap.forEach((e=>e.reject(\"Connection has closed.\"))),this.responseMap=new Map,this.rtc.channels.request.close(),this.rtc.channels.response.close(),this.rtc.rtcClient.close()},this.rtc=e,this.endpointIdentity=t,this.rtc.channels.response.addEventListener(\"message\",(e=>{let{data:t}=e;e.data instanceof ArrayBuffer&&(t=(new TextDecoder).decode(e.data));const{messageId:n,payload:i,success:r,error:o}=JSON.parse(t),{resolve:s,reject:a}=this.responseMap.get(n)??{};s&&a?(this.responseMap.delete(n),r?s(i):a(o)):(console.log(\"Could not find id in responseMap.\"),console.log(e))})),this.rtc.channels.request.addEventListener(\"message\",(async e=>{let{data:n}=e;e.data instanceof ArrayBuffer&&(n=(new TextDecoder).decode(e.data));const{messageId:i,action:r,payload:o}=JSON.parse(n);if($e(this,Le,\"f\"))try{const e=await $e(this,Le,\"f\").call(this,r,o,t);this.rtc.channels.response.send(JSON.stringify({messageId:i,payload:e,success:!0}))}catch(e){\"open\"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,error:(0,Ge.errorToPOJO)(e),success:!1}))}else\"open\"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,success:!1,error:\"Connection not ready.\"}))})),this.rtc.rtcClient.addEventListener(\"connectionstatechange\",this.connectionStateChangeHandler),Object.values(this.rtc.channels).forEach((e=>{e.onclose=e=>{[...this.responseMap.values()].forEach((e=>e.reject(new Error(\"RTCDataChannel closed unexpectedly, this is most commonly caused by message size. Note: RTC Channels have a message size limit of ~255kB.\")))),this.close(),$e(this,Te,\"f\")&&$e(this,Te,\"f\").call(this)}}))}onDisconnect(e){if($e(this,Te,\"f\"))throw new Error(\"RTCEndpoint disconnectListener cannot be set twice.\");Be(this,Te,e,\"f\")}receive(e){if($e(this,Le,\"f\"))throw new Error(\"You have already set a listener for this RTC Endpoint.\");Be(this,Le,e,\"f\")}get connected(){return\"connected\"===this.rtc.rtcClient.connectionState}},Le=new WeakMap,Te=new WeakMap;var We,He,Ne,De={},Ue=s&&s.__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)},Ve=s&&s.__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};Object.defineProperty(De,\"__esModule\",{value:!0}),De.EndpointStrategy=void 0;De.EndpointStrategy=class{constructor(e,t,n){this.EndpointType=e,this.StrategyName=n,We.set(this,null),He.set(this,new Map),Ne.set(this,!0),this.send=async(e,t,n)=>this.getEndpointById(e).send(t,n),this.close=async()=>{Ue(this,Ne,\"f\")&&(Ue(this,He,\"f\").forEach((e=>e.close())),Ve(this,He,new Map,\"f\")),Ve(this,Ne,!1,\"f\")},this.isValidEndpointPayload=t}onEndpointDisconnect(e,t){this.getEndpointById(e).onDisconnect(t)}receive(e){if(Ue(this,We,\"f\"))throw new Error(`You have already set a listener for this ${this.StrategyName} Strategy`);Ve(this,We,e,\"f\"),Ue(this,He,\"f\").forEach((e=>e.receive(Ue(this,We,\"f\"))))}getEndpointById(e){const t=Ue(this,He,\"f\").get(e);if(!t)throw new Error(`Client with endpoint id ${e} is not connected`);return t}get connected(){return Ue(this,Ne,\"f\")}isEndpointConnected(e){return Ue(this,He,\"f\").has(e)}addEndpoint(e,t){if(!Ue(this,Ne,\"f\"))return void console.warn(`Adding endpoint to disconnected ${this.StrategyName} Strategy`);const n=new this.EndpointType(t);Ue(this,We,\"f\")&&n.receive(Ue(this,We,\"f\")),Ue(this,He,\"f\").set(e,n)}async closeEndpoint(e){Ue(this,He,\"f\").delete(e)}},We=new WeakMap,He=new WeakMap,Ne=new WeakMap,Object.defineProperty(Fe,\"__esModule\",{value:!0}),Fe.RTCInfo=Fe.RTCStrategy=void 0;const ze=je,Ke=De;class qe extends Ke.EndpointStrategy{constructor(){super(ze.RTCEndpoint,ze.RTCEndpoint.isValidEndpointPayload,\"RTC\")}}Fe.RTCStrategy=qe,Fe.RTCInfo={version:2,minimumVersion:0,type:\"rtc\"};var Je={};Object.defineProperty(Je,\"__esModule\",{value:!0}),Je.RTCICEManager=void 0;const Ye=d;class Ze extends Ye.EmitterBase{constructor(e){super(e,\"channel\"),this.ensureChannelOpened=e=>new Promise(((t,n)=>{if(\"open\"===e.readyState)t();else if(\"connecting\"===e.readyState){const n=()=>{e.removeEventListener(\"open\",n),t()};e.addEventListener(\"open\",n)}else n(new Error(\"This Channel has already closed\"))}))}static createDataChannelPromise(e,t){let n;const i=new Promise((e=>{n=e})),r=i=>{const o=()=>{i.channel.removeEventListener(\"open\",o),n(i.channel)};i.channel.label===e&&(i.channel.addEventListener(\"open\",o),t.removeEventListener(\"datachannel\",r))};return t.addEventListener(\"datachannel\",r),i}async listenForProviderIce(e,t){await this.on(this.createProviderEventName(e),t,{timestamp:Date.now()})}async raiseProviderIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createProviderEventName(e)),t)}async listenForClientIce(e,t){await this.on(this.createClientEventName(e),t,{timestamp:Date.now()})}async raiseClientIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createClientEventName(e)),t)}cleanupIceListeners(e){this.removeAllListeners(this.createClientEventName(e)),this.removeAllListeners(this.createProviderEventName(e))}createClientEventName(e){return`ice-client-${e}`}createProviderEventName(e){return`ice-provider-${e}`}createRouteString(e){return`channel/${e}`}createRtcPeer(){return this.wire.environment.getRtcPeer()}async startClientOffer(){const e=Math.random().toString(),t=this.createRtcPeer();t.addEventListener(\"icecandidate\",(async t=>{t.candidate&&await this.raiseClientIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForProviderIce(e,(async e=>{await t.addIceCandidate(e.candidate)}));const n={request:t.createDataChannel(\"request\"),response:t.createDataChannel(\"response\")},i=await t.createOffer();await t.setLocalDescription(i);const r=Promise.all([n.request,n.response].map(this.ensureChannelOpened)).then((()=>{}));return{rtcClient:t,channels:n,offer:i,rtcConnectionId:e,channelsOpened:r}}async finishClientOffer(e,t,n){return await e.setRemoteDescription(t),await n,!0}async createProviderAnswer(e,t){const n=this.createRtcPeer(),i=Ze.createDataChannelPromise(\"request\",n),r=Ze.createDataChannelPromise(\"response\",n);n.addEventListener(\"icecandidate\",(async t=>{t.candidate&&await this.raiseProviderIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForClientIce(e,(async e=>{await n.addIceCandidate(e.candidate)})),await n.setRemoteDescription(t);const o=await n.createAnswer();await n.setLocalDescription(o);const s=Promise.all([i,r]).then((([t,n])=>(this.cleanupIceListeners(e),{request:t,response:n})));return{rtcClient:n,answer:o,channels:s}}}Je.RTCICEManager=Ze;var Qe={},Xe={};function et(e){return[...e.split(\".\").reverse().entries()].reduce(((e,[t,n])=>e+ +n*1e4**t),0)}function tt(e,t){return et(e)>=et(t)}function nt(e){return e.split(\"/\")[0]}Object.defineProperty(Xe,\"__esModule\",{value:!0}),Xe.runtimeUuidMeetsMinimumRuntimeVersion=Xe.parseRuntimeUuid=Xe.meetsMinimumRuntimeVersion=void 0,Xe.meetsMinimumRuntimeVersion=tt,Xe.parseRuntimeUuid=nt,Xe.runtimeUuidMeetsMinimumRuntimeVersion=function(e,t){return tt(nt(e),t)};var it,rt,ot,st,at,ct=s&&s.__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)},dt=s&&s.__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};Object.defineProperty(Qe,\"__esModule\",{value:!0}),Qe.ChannelProvider=void 0;const ht=pe,lt=Xe;class ut extends ht.ChannelBase{get connections(){return[...ct(this,it,\"f\")]}static handleClientDisconnection(e,t){const n=e.connections.find((e=>e.endpointId===t.endpointId));if(n)ct(e,st,\"f\").call(e,n);else{e.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name)).forEach(ct(e,st,\"f\"))}e.disconnectListener(t)}static setProviderRemoval(e,t){ut.removalMap.set(e,t)}constructor(e,t,n){super(),it.set(this,void 0),rt.set(this,void 0),ot.set(this,void 0),st.set(this,(e=>{const t=this.connections.filter((t=>t.endpointId!==e.endpointId));ct(this,ot,\"f\").closeEndpoint(e.endpointId),dt(this,it,t,\"f\")})),this.processAction=async(e,t,n)=>(ut.clientIsMultiRuntime(n)&&!(0,lt.runtimeUuidMeetsMinimumRuntimeVersion)(n.runtimeUuid,\"18.87.56.0\")?this.handleMultiRuntimeLegacyClient(n):this.checkForClientConnection(n),super.processAction(e,t,n)),at.set(this,(()=>{ct(this,ot,\"f\").close();const e=ut.removalMap.get(this);e&&e()})),dt(this,rt,new ht.ProtectedItems(e,t),\"f\"),this.connectListener=()=>{},this.disconnectListener=()=>{},dt(this,it,[],\"f\"),dt(this,ot,n,\"f\"),n.receive(this.processAction)}dispatch(e,t,n){const i=e.endpointId??this.getEndpointIdForOpenFinId(e,t);return i&&ct(this,ot,\"f\").isEndpointConnected(i)?ct(this,ot,\"f\").send(i,t,n):Promise.reject(new Error(`Client connection with identity uuid: ${e.uuid} / name: ${e.name} / endpointId: ${i} no longer connected.`))}async processConnection(e,t){return ct(this,it,\"f\").push(e),this.connectListener(e,t)}publish(e,t){return this.connections.map((n=>ct(this,ot,\"f\").send(n.endpointId,e,t)))}onConnection(e){this.connectListener=e}onDisconnection(e){this.disconnectListener=e}async destroy(){const e=ct(this,rt,\"f\");e.providerIdentity,dt(this,it,[],\"f\"),await e.close(),ct(this,at,\"f\").call(this)}async getAllClientInfo(){return this.connections.map((e=>{const{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}=e;return{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}}))}checkForClientConnection(e){if(!this.isClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider.\\n Client Identity: {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}isClientConnected(e){return ut.clientIdentityIncludesEndpointId(e)?this.connections.some((t=>t.endpointId===e.endpointId&&t.uuid===e.uuid&&t.name===e.name)):this.isLegacyClientConnected(e)}isLegacyClientConnected(e){return this.connections.some((t=>t.uuid===e.uuid&&t.name===e.name))}handleMultiRuntimeLegacyClient(e){if(!this.isLegacyClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider. Client Identity:\\n {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}getEndpointIdForOpenFinId(e,t){const n=this.connections.filter((t=>t.name===e.name&&t.uuid===e.uuid));if(n.length>=2){const n=ct(this,rt,\"f\"),{uuid:i,name:r}=e,o=n?.providerIdentity.uuid,s=n?.providerIdentity.name;console.warn(`WARNING: Dispatch call may have unintended results. The \"to\" argument of your dispatch call is missing the\\n \"endpointId\" parameter. The identity you are dispatching to ({uuid: ${i}, name: ${r}})\\n has multiple channelClients for this channel. Your dispatched action: (${t}) from the provider:\\n ({uuid: ${o}, name: ${s}}) will only be processed by the most recently-created client.`)}return n.pop()?.endpointId}static clientIdentityIncludesEndpointId(e){return void 0!==e.endpointId}static clientIsMultiRuntime(e){return void 0!==e.runtimeUuid}static async wireClose(e,t){await e.sendAction(\"destroy-channel\",{channelName:t})}}Qe.ChannelProvider=ut,it=new WeakMap,rt=new WeakMap,ot=new WeakMap,st=new WeakMap,at=new WeakMap,ut.removalMap=new WeakMap;var pt={};Object.defineProperty(pt,\"__esModule\",{value:!0}),pt.MessageReceiver=void 0;const wt=ue,yt=d;class ft extends yt.Base{constructor(e){super(e),this.onmessage=e=>\"process-channel-message\"===e.action&&(this.processChannelMessage(e),!0),this.endpointMap=new Map,this.latestEndpointIdByChannelId=new Map,e.registerMessageHandler(this.onmessage.bind(this))}async processChannelMessage(e){const{senderIdentity:t,providerIdentity:n,action:i,ackToSender:r,payload:o,intendedTargetIdentity:s}=e.payload,a=s.channelId??s.endpointId??this.latestEndpointIdByChannelId.get(n.channelId),c=this.endpointMap.get(a);if(!c)return r.payload.success=!1,r.payload.reason=`Client connection with identity uuid: ${this.wire.me.uuid} / name: ${this.wire.me.name} / endpointId: ${a} no longer connected.`,this.wire.sendRaw(r);try{const e=await c(i,o,t);return r.payload.payload=r.payload.payload||{},r.payload.payload.result=e,this.wire.sendRaw(r)}catch(e){return r.payload.success=!1,r.payload.reason=e.message,this.wire.sendRaw(r)}}addEndpoint(e,t,n){this.endpointMap.set(n,e),t!==n&&this.latestEndpointIdByChannelId.set(t,n)}removeEndpoint(e,t){this.endpointMap.delete(t),this.latestEndpointIdByChannelId.get(e)===t&&this.latestEndpointIdByChannelId.delete(e)}checkForPreviousClientConnection(e){const t=this.latestEndpointIdByChannelId.get(e);t&&(wt.ChannelClient.closeChannelByEndpointId(t),console.warn(\"You have created a second connection to an older provider. First connection has been removed from the clientMap\"),console.warn(\"If the provider calls publish(), you may receive multiple messages.\"))}}pt.MessageReceiver=ft;var gt={};Object.defineProperty(gt,\"__esModule\",{value:!0}),gt.ProtocolManager=void 0;gt.ProtocolManager=class{constructor(e){this.ProtocolsInPreferenceOrder=e,this.DefaultClientProtocols=[\"classic\"],this.DefaultProviderProtocols=[\"classic\"],this.getClientProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultClientProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(\", \")}.`);return t},this.getProviderProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultProviderProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(\", \")}.`);return t},this.getCompatibleProtocols=(e,t)=>t.supportedProtocols.filter((t=>e.some((e=>e.type===t.type&&t.version>=e.minimumVersion&&e.version>=(t.minimumVersion??0))))).slice(0,t.maxProtocols)}};var mt={};Object.defineProperty(mt,\"__esModule\",{value:!0});class vt{static combine(e,t){return new vt(e,t)}constructor(e,t){this.primary=e,this.secondary=t}onEndpointDisconnect(e,t){this.primary.onEndpointDisconnect(e,(()=>{this.secondary.isEndpointConnected(e)||t()})),this.secondary.onEndpointDisconnect(e,(()=>{this.primary.isEndpointConnected(e)||t()}))}isValidEndpointPayload(e){return this.primary.isValidEndpointPayload(e)||this.secondary.isValidEndpointPayload(e)}async closeEndpoint(e){await this.primary.closeEndpoint(e),await this.secondary.closeEndpoint(e)}isEndpointConnected(e){return this.primary.isEndpointConnected(e)||this.secondary.isEndpointConnected(e)}async addEndpoint(e,t){this.primary.isValidEndpointPayload(t)&&await this.primary.addEndpoint(e,t),this.secondary.isValidEndpointPayload(t)&&await this.secondary.addEndpoint(e,t)}receive(e){this.primary.receive(e),this.secondary.receive(e)}send(e,t,n){return this.primary.isEndpointConnected(e)?this.primary.send(e,t,n):this.secondary.send(e,t,n)}async close(){await Promise.all([this.primary.close(),this.secondary.close()])}}mt.default=vt;var Ct,bt,It=s&&s.__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},Et=s&&s.__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)},xt=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(xe,\"__esModule\",{value:!0}),xe.ConnectionManager=void 0;const At=Ae,Pt=d,Mt=Oe,_t=Fe,Ot=Je,St=Qe,Rt=pt,Ft=gt,jt=xt(mt);class kt extends Pt.Base{static getProtocolOptionsFromStrings(e){return e.map((e=>{switch(e){case\"rtc\":return _t.RTCInfo;case\"classic\":return Mt.ClassicInfo;default:return(0,At.exhaustiveCheck)(e,[\"rtc\",\"classic\"])}}))}constructor(e){super(e),Ct.set(this,void 0),bt.set(this,void 0),this.removeChannelFromProviderMap=e=>{this.providerMap.delete(e)},this.onmessage=e=>\"process-channel-connection\"===e.action&&(this.processChannelConnection(e),!0),this.providerMap=new Map,this.protocolManager=new Ft.ProtocolManager(\"node\"===this.wire.environment.type?[\"classic\"]:[\"rtc\",\"classic\"]),It(this,Ct,new Rt.MessageReceiver(e),\"f\"),It(this,bt,new Ot.RTCICEManager(e),\"f\"),e.registerMessageHandler(this.onmessage.bind(this))}createProvider(e,t){const n=Object.assign(this.wire.environment.getDefaultChannelOptions().create,e||{}),i=this.protocolManager.getProviderProtocols(n?.protocols),r=i.map((e=>{switch(e){case\"rtc\":return new _t.RTCStrategy;case\"classic\":return new Mt.ClassicStrategy(this.wire,Et(this,Ct,\"f\"),t.channelId,t);default:return(0,At.exhaustiveCheck)(e,[\"rtc\",\"classic\"])}}));let o;if(2===r.length){const[e,t]=r;o=jt.default.combine(e,t)}else{if(1!==r.length)throw new Error(\"failed to combine strategies\");[o]=r}const s=new St.ChannelProvider(t,(()=>St.ChannelProvider.wireClose(this.wire,t.channelName)),o),a=t.channelId;return this.providerMap.set(a,{provider:s,strategy:o,supportedProtocols:kt.getProtocolOptionsFromStrings(i)}),St.ChannelProvider.setProviderRemoval(s,this.removeChannelFromProviderMap.bind(this)),s}async createClientOffer(e){const t=this.protocolManager.getClientProtocols(e?.protocols);let n;return{offer:{supportedProtocols:await Promise.all(t.map((async e=>{switch(e){case\"rtc\":{const{rtcClient:e,channels:t,offer:i,rtcConnectionId:r,channelsOpened:o}=await Et(this,bt,\"f\").startClientOffer();return n={rtcClient:e,channels:t,channelsOpened:o},{type:\"rtc\",version:_t.RTCInfo.version,payload:{offer:i,rtcConnectionId:r}}}case\"classic\":return{type:\"classic\",version:Mt.ClassicInfo.version};default:return(0,At.exhaustiveCheck)(e,[\"rtc\",\"classic\"])}}))),maxProtocols:2},rtc:n}}async createClientStrategy(e,t){t.endpointId||(t.endpointId=this.wire.environment.getNextMessageId(),Et(this,Ct,\"f\").checkForPreviousClientConnection(t.channelId));const n=t.answer??{supportedProtocols:[{type:\"classic\",version:1}]},i=(await Promise.all(n.supportedProtocols.map((async n=>\"rtc\"===n.type&&e?(await Et(this,bt,\"f\").finishClientOffer(e.rtcClient,n.payload.answer,e.channelsOpened),new _t.RTCStrategy):\"classic\"===n.type?new Mt.ClassicStrategy(this.wire,Et(this,Ct,\"f\"),t.endpointId,t):null)))).filter((e=>null!==e));let r;if(e&&!i.some((e=>e instanceof _t.RTCStrategy))&&e&&e.rtcClient.close(),i.length>=2)r=jt.default.combine(i[0],i[1]);else{if(!i.length)throw new Error(\"No compatible protocols\");[r]=i}const o={endpointIdentity:t,rtc:e};return r.addEndpoint(t.channelId,o),r}async processChannelConnection(e){const{clientIdentity:t,providerIdentity:n,ackToSender:i,payload:r,offer:o}=e.payload;t.endpointId?t.isLocalEndpointId=!1:(t.endpointId=this.wire.environment.getNextMessageId(),t.isLocalEndpointId=!0);const s=n.channelId,a=this.providerMap.get(s);if(!a)return i.payload.success=!1,i.payload.reason=`Channel \"${n.channelName}\" has been destroyed.`,this.wire.sendRaw(i);const{provider:c,strategy:d,supportedProtocols:h}=a;try{if(!(c instanceof St.ChannelProvider))throw Error(\"Cannot connect to a channel client\");const e=o??{supportedProtocols:[{type:\"classic\",version:1}],maxProtocols:1},n=this.protocolManager.getCompatibleProtocols(h,e);if(!n.length)throw new Error(\"This provider does not support any of the offered protocols.\");const s=await c.processConnection(t,r);i.payload.payload=i.payload.payload||{};let a={supportedProtocols:[],endpointPayloadPromise:Promise.resolve({endpointIdentity:t})};return a=await n.reduce((async(e,t)=>{const n=await e;if(\"rtc\"===t.type){const{answer:e,rtcClient:i,channels:r}=await Et(this,bt,\"f\").createProviderAnswer(t.payload.rtcConnectionId,t.payload.offer);n.supportedProtocols.push({type:\"rtc\",version:_t.RTCInfo.version,payload:{answer:e}}),n.endpointPayloadPromise=n.endpointPayloadPromise.then((e=>r.then((t=>({...e,rtc:{rtcClient:i,channels:t}})))))}else n.supportedProtocols.push({type:\"classic\",version:Mt.ClassicInfo.version});return n}),Promise.resolve(a)),a.endpointPayloadPromise.then((e=>d.addEndpoint(t.endpointId,e))),i.payload.payload.result=s,i.payload.payload.answer=a,this.wire.sendRaw(i)}catch(e){return i.payload.success=!1,i.payload.reason=e.message,this.wire.sendRaw(i)}}}xe.ConnectionManager=kt,Ct=new WeakMap,bt=new WeakMap;var Lt,Tt,$t,Bt=s&&s.__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},Gt=s&&s.__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)};Object.defineProperty(le,\"__esModule\",{value:!0}),le.Channel=void 0;const Wt=t,Ht=G,Nt=d,Dt=ue,Ut=xe,Vt=Qe;function zt(e){const t=Math.floor(e/10),n=Math.min(3e4,500*2**t);return new Promise((e=>{setTimeout((()=>{e(!1)}),n)}))}class Kt extends Nt.EmitterBase{constructor(e){super(e,\"channel\"),Lt.set(this,void 0),Tt.set(this,new Wt.EventEmitter),$t.set(this,new Ht.AsyncRetryableLazy((async()=>{await Promise.all([this.on(\"disconnected\",(e=>{Dt.ChannelClient.handleProviderDisconnect(e)})),this.on(\"connected\",((...e)=>{Gt(this,Tt,\"f\").emit(\"connected\",...e)}))]).catch((()=>new Error(\"error setting up channel connection listeners\")))}))),Bt(this,Lt,new Ut.ConnectionManager(e),\"f\")}async getAllChannels(){return this.wire.sendAction(\"get-all-channels\").then((({payload:e})=>e.data))}async onChannelConnect(e){await this.on(\"connected\",e)}async onChannelDisconnect(e){await this.on(\"disconnected\",e)}async safeConnect(e,t,n){const i={count:0};do{let r=()=>{};const o=new Promise((t=>{r=n=>{e===n.channelName&&t(!0)},Gt(this,Tt,\"f\").on(\"connected\",r)}));try{if(i.count>0){i.gotConnectedEvent=await Promise.race([zt(i.count),o]);const t=await this.wire.sendAction(\"connect-to-channel\",{...n,retryInfo:i});return console.log(`Successfully connected to channelName: ${e}`),t.payload.data}const t=this.wire.sendAction(\"connect-to-channel\",n);i.originalMessageId=t.messageId;return(await t).payload.data}catch(n){if(!n.message.includes(\"internal-nack\"))throw n;t&&0===i.count&&console.warn(`No channel found for channelName: ${e}. Waiting for connection...`)}finally{i.count+=1,Gt(this,Tt,\"f\").removeListener(\"connected\",r)}}while(t);throw new Error(`No channel found for channelName: ${e}.`)}async connect(e,t={}){if(await Gt(this,$t,\"f\").getValue(),!e||\"string\"!=typeof e)throw new Error(\"Please provide a channelName string to connect to a channel.\");const n={wait:!0,...this.wire.environment.getDefaultChannelOptions().connect,...t},{offer:i,rtc:r}=await Gt(this,Lt,\"f\").createClientOffer(n);let o;(this.fin.me.isFrame||this.fin.me.isView||this.fin.me.isWindow)&&(o=(await this.fin.me.getInfo()).url);const s={channelName:e,...n,offer:i,connectionUrl:o},a=await this.safeConnect(e,n.wait,s),c=await Gt(this,Lt,\"f\").createClientStrategy(r,a),d=new Dt.ChannelClient(a,(()=>Dt.ChannelClient.wireClose(this.wire,a,a.endpointId)),c);return c.onEndpointDisconnect(a.channelId,(async()=>{try{await d.sendDisconnectAction()}catch(e){console.warn(`Something went wrong during disconnect for client with uuid: ${a.uuid} / name: ${a.name} / endpointId: ${a.endpointId}.`)}finally{Dt.ChannelClient.handleProviderDisconnect(a)}})),d}async create(e,t){if(!e)throw new Error(\"Please provide a channelName to create a channel\");const{payload:{data:n}}=await this.wire.sendAction(\"create-channel\",{channelName:e}),i=Gt(this,Lt,\"f\").createProvider(t,n);return this.on(\"client-disconnected\",(t=>{t.channelName===e&&Vt.ChannelProvider.handleClientDisconnection(i,t)})),i}}le.Channel=Kt,Lt=new WeakMap,Tt=new WeakMap,$t=new WeakMap,Object.defineProperty(de,\"__esModule\",{value:!0}),de.InterAppPayload=de.InterApplicationBus=void 0;const qt=t,Jt=d,Yt=he,Zt=le,Qt=O;class Xt extends Jt.Base{constructor(e){super(e),this.events={subscriberAdded:\"subscriber-added\",subscriberRemoved:\"subscriber-removed\"},this.refCounter=new Yt.RefCounter,this.Channel=new Zt.Channel(e),this.emitter=new qt.EventEmitter,e.registerMessageHandler(this.onmessage.bind(this)),this.on=this.emitter.on.bind(this.emitter),this.removeAllListeners=this.emitter.removeAllListeners.bind(this.emitter)}async publish(e,t){await this.wire.sendAction(\"publish-message\",{topic:e,message:t,sourceWindowName:this.me.name})}async send(e,t,n){const i=(0,Qt.validateIdentity)(e);if(i)throw new Error(i);await this.wire.sendAction(\"send-message\",{destinationUuid:e.uuid,destinationWindowName:e.name,topic:t,message:n,sourceWindowName:this.me.name})}subscribe(e,t,n){const i=this.createSubscriptionKey(e.uuid,e.name||\"*\",t);return this.emitter.on(i,n),this.refCounter.actOnFirst(i,(async()=>{await this.wire.sendAction(\"subscribe\",{sourceUuid:e.uuid,sourceWindowName:e.name||\"*\",topic:t,destinationWindowName:this.me.name})}),(()=>Promise.resolve()))}unsubscribe(e,t,n){const i=e.name||\"*\",r=this.createSubscriptionKey(e.uuid,i,t);return this.emitter.removeListener(r,n),this.refCounter.actOnLast(r,(async()=>{await this.wire.sendAction(\"unsubscribe\",{sourceUuid:e.uuid,sourceWindowName:i,topic:t,destinationWindowName:this.me.name})}),(()=>new Promise((e=>e)).then((()=>{}))))}processMessage(e){const{payload:{message:t,sourceWindowName:n,sourceUuid:i,topic:r}}=e,o=[this.createSubscriptionKey(i,n,r),this.createSubscriptionKey(i,\"*\",r),this.createSubscriptionKey(\"*\",\"*\",r)],s={uuid:i,name:n};o.forEach((e=>{this.emitter.emit(e,t,s)}))}emitSubscriverEvent(e,t){const{payload:{targetName:n,uuid:i,topic:r}}=t,o={name:n,uuid:i,topic:r};this.emitter.emit(e,o)}createSubscriptionKey(e,t,n){const i=t||\"*\";if(!(e&&i&&n))throw new Error(\"Missing uuid, name, or topic string\");return function(...e){return e.map((e=>Buffer.from(`${e}`).toString(\"base64\"))).join(\"/\")}(e,i,n)}onmessage(e){const{action:t}=e;switch(t){case\"process-message\":this.processMessage(e);break;case this.events.subscriberAdded:this.emitSubscriverEvent(this.events.subscriberAdded,e);break;case this.events.subscriberRemoved:this.emitSubscriverEvent(this.events.subscriberRemoved,e)}return!0}}de.InterApplicationBus=Xt;de.InterAppPayload=class{};var en={};Object.defineProperty(en,\"__esModule\",{value:!0}),en.Clipboard=void 0;const tn=d;class nn extends tn.Base{async writeText(e){await this.wire.sendAction(\"clipboard-write-text\",e)}async readText(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-text\",{type:e});return t.data}async writeImage(e){await this.wire.sendAction(\"clipboard-write-image\",e)}async readImage(e={format:\"dataURL\"}){const{payload:t}=await this.wire.sendAction(\"clipboard-read-image\",e);return t.data}async writeHtml(e){await this.wire.sendAction(\"clipboard-write-html\",e)}async readHtml(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-html\",{type:e});return t.data}async writeRtf(e){await this.wire.sendAction(\"clipboard-write-rtf\",e)}async readRtf(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-rtf\",{type:e});return t.data}async write(e){await this.wire.sendAction(\"clipboard-write\",e)}async getAvailableFormats(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-formats\",{type:e});return t.data}}en.Clipboard=nn;var rn={},on={},sn={};Object.defineProperty(sn,\"__esModule\",{value:!0}),sn.ExternalApplication=void 0;const an=d;class cn extends an.EmitterBase{constructor(e,t){super(e,\"external-application\",t.uuid),this.identity=t}getInfo(){return this.wire.sendAction(\"get-external-application-info\",this.identity).then((({payload:e})=>e.data))}}sn.ExternalApplication=cn,Object.defineProperty(on,\"__esModule\",{value:!0}),on.ExternalApplicationModule=void 0;const dn=d,hn=sn;class ln extends dn.Base{wrap(e){return this.wire.sendAction(\"external-application-wrap\").catch((e=>{})),Promise.resolve(new hn.ExternalApplication(this.wire,{uuid:e}))}wrapSync(e){return this.wire.sendAction(\"external-application-wrap-sync\").catch((e=>{})),new hn.ExternalApplication(this.wire,{uuid:e})}}on.ExternalApplicationModule=ln,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(on,e),n(sn,e)}(rn);var un={},pn={},wn={};Object.defineProperty(wn,\"__esModule\",{value:!0}),wn._Frame=void 0;const yn=d;class fn extends yn.EmitterBase{constructor(e,t){super(e,\"frame\",t.uuid,t.name),this.identity=t}getInfo(){return this.wire.sendAction(\"get-frame-info\",this.identity).then((({payload:e})=>e.data))}getParentWindow(){return this.wire.sendAction(\"get-parent-window\",this.identity).then((({payload:e})=>e.data))}}wn._Frame=fn,Object.defineProperty(pn,\"__esModule\",{value:!0}),pn._FrameModule=void 0;const gn=d,mn=O,vn=wn;class Cn extends gn.Base{async wrap(e){this.wire.sendAction(\"frame-wrap\").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}wrapSync(e){this.wire.sendAction(\"frame-wrap-sync\").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}getCurrent(){return this.wire.sendAction(\"frame-get-current\").catch((e=>{})),Promise.resolve(new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity()))}getCurrentSync(){return this.wire.sendAction(\"frame-get-current-sync\").catch((e=>{})),new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity())}}pn._FrameModule=Cn,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(pn,e),n(wn,e)}(un);var bn={};Object.defineProperty(bn,\"__esModule\",{value:!0}),bn.GlobalHotkey=void 0;const In=d;class En extends In.EmitterBase{constructor(e){super(e,\"global-hotkey\")}async register(e,t){await this.on(e,t),await this.wire.sendAction(\"global-hotkey-register\",{hotkey:e})}async unregister(e){await this.removeAllListeners(e),await this.wire.sendAction(\"global-hotkey-unregister\",{hotkey:e})}async unregisterAll(){await Promise.all(this.eventNames().filter((e=>!(\"registered\"===e||\"unregistered\"===e))).map((e=>this.removeAllListeners(e)))),await this.wire.sendAction(\"global-hotkey-unregister-all\",{})}async isRegistered(e){const{payload:{data:t}}=await this.wire.sendAction(\"global-hotkey-is-registered\",{hotkey:e});return t}}bn.GlobalHotkey=En;var xn,An={},Pn={},Mn={},_n=s&&s.__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)};Object.defineProperty(Mn,\"__esModule\",{value:!0}),Mn.Platform=void 0;const On=d,Sn=O,Rn=new Map;class Fn extends On.EmitterBase{constructor(e,t){super(t.wire,\"application\",e.uuid),this.getClient=e=>{this.wire.sendAction(\"platform-get-client\",this.identity).catch((e=>{}));const t=e||this.identity,{uuid:n}=t;if(!Rn.has(n)){const e=_n(this,xn,\"f\").call(this,n);Rn.set(n,e)}return Rn.get(n)},xn.set(this,(async e=>{try{const t=`custom-frame-${e}`,n=await this._channel.connect(t,{wait:!1});return n.onDisconnection((()=>{Rn.delete(e)})),n}catch(t){throw Rn.delete(e),new Error(\"The targeted Platform is not currently running. Listen for application-started event for the given Uuid.\")}})),this.launchLegacyManifest=this.launchContentManifest;const n=(0,Sn.validateIdentity)(e);if(n)throw new Error(n);this._channel=t,this.identity={uuid:e.uuid},this.Layout=this.fin.Platform.Layout,this.Application=this.fin.Application.wrapSync(this.identity)}async createView(e,t,n){this.wire.sendAction(\"platform-create-view\",this.identity).catch((e=>{}));const i=await this.getClient(),r=await i.dispatch(\"create-view\",{target:t,opts:e,targetView:n});if(!r||(0,Sn.validateIdentity)(r.identity))throw new Error(`When overwriting the createView call, please return an object that has a valid 'identity' property: ${JSON.stringify(r)}`);return this.fin.View.wrapSync(r.identity)}async createWindow(e){this.wire.sendAction(\"platform-create-window\",this.identity).catch((e=>{}));const t=await this.getClient();e.reason||(e.reason=\"api-call\");const n=await t.dispatch(\"create-view-container\",e);if(!n||(0,Sn.validateIdentity)(n.identity))throw new Error(`When overwriting the createWindow call, please return an object that has a valid 'identity' property: ${JSON.stringify(n)}`);const{identity:i}=n,r=this.fin.Window.wrapSync(i);return r.name=i.name,r.uuid=i.uuid,r}async quit(){this.wire.sendAction(\"platform-quit\",this.identity).catch((e=>{}));return(await this.getClient()).dispatch(\"quit\")}async closeView(e){this.wire.sendAction(\"platform-close-view\",this.identity).catch((e=>{}));const t=await this.getClient();await t.dispatch(\"close-view\",{view:e})}async reparentView(e,t){console.warn(\"Platform.reparentView has been deprecated, please use Platform.createView\"),this.wire.sendAction(\"platform-reparent-view\",this.identity).catch((e=>{}));const n={...e,uuid:e.uuid??this.identity.uuid},i=await this.fin.View.wrap(n),r=await i.getOptions();return this.createView(r,t)}async getSnapshot(){this.wire.sendAction(\"platform-get-snapshot\",this.identity).catch((e=>{}));return(await this.getClient()).dispatch(\"get-snapshot\")}async getViewSnapshot(e){return(await this.getClient()).dispatch(\"get-view-snapshot\",{viewIdentity:e})}async applySnapshot(e,t){this.wire.sendAction(\"platform-apply-snapshot\",this.identity).catch((e=>{}));const n=\"Requested snapshot must be a valid Snapshot object, or a url or filepath to such an object.\";let i;if(\"string\"==typeof e)try{i=(await this._channel.wire.sendAction(\"get-application-manifest\",{manifestUrl:e})).payload.data}catch(e){throw new Error(`${n}: ${e}`)}else i=e;if(!i.windows)throw new Error(n);const r=await this.getClient();return await r.dispatch(\"apply-snapshot\",{snapshot:i,options:t}),this}async fetchManifest(e){return(await this.getClient()).dispatch(\"platform-fetch-manifest\",{manifestUrl:e})}async launchContentManifest(e){this.wire.sendAction(\"platform-launch-content-manifest\",this.identity).catch((()=>{}));const t=await this.getClient(),n=await this.fetchManifest(e);return t.dispatch(\"launch-into-platform\",{manifest:n,manifestUrl:e}),this}async setWindowContext(e={},t){if(this.wire.sendAction(\"platform-set-window-context\",this.identity).catch((e=>{})),!e)throw new Error(\"Please provide a serializable object or string to set the context.\");const n=await this.getClient(),{entityType:i}=t?await this.fin.System.getEntityInfo(t.uuid,t.name):this.fin.me;await n.dispatch(\"set-window-context\",{context:e,entityType:i,target:t||{uuid:this.fin.me.uuid,name:this.fin.me.name}})}async getWindowContext(e){this.wire.sendAction(\"platform-get-window-context\",this.identity).catch((e=>{}));const t=await this.getClient(),{entityType:n}=e?await this.fin.System.getEntityInfo(e.uuid,e.name):this.fin.me;return t.dispatch(\"get-window-context\",{target:e||{uuid:this.fin.me.uuid,name:this.fin.me.name},entityType:n})}async closeWindow(e,t={skipBeforeUnload:!1}){this.wire.sendAction(\"platform-close-window\",this.identity).catch((e=>{}));return(await this.getClient()).dispatch(\"close-window\",{windowId:e,options:t})}}Mn.Platform=Fn,xn=new WeakMap;var jn={},kn={},Ln={},Tn={};function $n(e){switch(e){case\"columns\":case\"grid\":case\"rows\":case\"tabs\":return!0;default:return!1}}Object.defineProperty(Tn,\"__esModule\",{value:!0}),Tn.overrideFromComposables=Tn.isValidPresetType=void 0,Tn.isValidPresetType=$n,Tn.overrideFromComposables=function(...e){return t=>e.reduceRight(((e,t)=>n=>t(e(n))),(e=>e))(t)},Tn.default={isValidPresetType:$n};var Bn={},Gn={},Wn={};Object.defineProperty(Wn,\"__esModule\",{value:!0}),Wn.ApiConsumer=void 0;Wn.ApiConsumer=class{constructor(e){this.strategy=e,this.consume=async e=>(await this.strategy.getExposedFunctions(e)).reduce(((t,n)=>({...t,[n.key]:this.strategy.createFunction(n,e)})),{})}};var Hn={},Nn={};Object.defineProperty(Nn,\"__esModule\",{value:!0}),Nn.expose=Nn.getExposedProperties=void 0;const Dn=Symbol(\"exposedProperties\");Nn.getExposedProperties=e=>e[Dn]||e.prototype[Dn]||[];Nn.expose=e=>(t,n,i)=>{t[Dn]=t[Dn]||[],t[Dn].push({key:n,descriptor:i,options:e})},Object.defineProperty(Hn,\"__esModule\",{value:!0}),Hn.ApiExposer=void 0;const Un=Nn;Hn.ApiExposer=class{constructor(e){this.strategy=e,this.exposeInstance=async(e,t)=>{const n=(0,Un.getExposedProperties)(e),i=await Promise.all(n.map((async({key:n,options:i})=>({key:n,options:await this.strategy.exposeFunction(e[n].bind(e),{key:n,options:i,meta:t})}))));await this.strategy.exposeMeta(t,i)}}};var Vn={},zn={},Kn={};Object.defineProperty(Kn,\"__esModule\",{value:!0}),Kn.ChannelsConsumer=void 0;Kn.ChannelsConsumer=class{constructor(e){this.channel=e,this.getExposedFunctions=async e=>{const{id:t}=e,{props:n}=await this.channel.dispatch(`api-meta:${t}`);return n},this.createFunction=e=>(...t)=>{const{action:n}=e.options;return this.channel.dispatch(n,{args:t})}}};var qn={};Object.defineProperty(qn,\"__esModule\",{value:!0}),qn.ChannelsExposer=void 0;qn.ChannelsExposer=class{constructor(e){this.channelProviderOrClient=e,this.exposeFunction=async(e,t)=>{const{key:n,options:i,meta:r}=t,{id:o}=r,s=`${o}.${i?.action||n}`;return await this.channelProviderOrClient.register(s,(async({args:t})=>e(...t))),{action:s}},this.exposeMeta=async({id:e},t)=>{const n=`api-meta:${e}`;await this.channelProviderOrClient.register(n,(()=>({props:t})))}}},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Kn,e),n(qn,e)}(zn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(zn,e)}(Vn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Wn,e),n(Hn,e),n(Vn,e),n(Nn,e)}(Gn);var Jn={};Object.defineProperty(Jn,\"__esModule\",{value:!0}),Jn.createRelayedDispatch=exports.relayChannelClientApi_1=Jn.relayChannelClientApi=void 0;const Yn=[\"no longer connected\",\"RTCDataChannel closed unexpectedly\",\"The client you are trying to dispatch from is disconnected from the target provider\"];exports.relayChannelClientApi_1=Jn.relayChannelClientApi=async(e,t)=>{e.register(`relay:${t}`,(({action:t,target:n,payload:i})=>e.dispatch(n,t,i))),await Promise.resolve()};Jn.createRelayedDispatch=(e,t,n,i)=>async(r,o)=>{try{return await e.dispatch(`relay:${n}`,{action:r,payload:o,target:t})}catch(e){if(s=e.message,Yn.some((e=>s.includes(e)))&&i)throw new Error(i);throw e}var s};var Zn,Qn,Xn,ei=s&&s.__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},ti=s&&s.__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)};Object.defineProperty(Bn,\"__esModule\",{value:!0}),Bn.ColumnOrRow=Bn.TabStack=Bn.LayoutNode=void 0;const ni=Gn,ii=Jn;class ri{constructor(e,t){Zn.set(this,void 0),this.isRoot=()=>ti(this,Zn,\"f\").isRoot(this.entityId),this.exists=()=>ti(this,Zn,\"f\").exists(this.entityId),this.getParent=async()=>{const e=await ti(this,Zn,\"f\").getParent(this.entityId);if(e)return ri.getEntity(e,ti(this,Zn,\"f\"))},this.createAdjacentStack=async(e,t)=>{const n=await ti(this,Zn,\"f\").createAdjacentStack(this.entityId,e,t);return ri.getEntity({entityId:n,type:\"stack\"},ti(this,Zn,\"f\"))},this.getAdjacentStacks=async e=>(await ti(this,Zn,\"f\").getAdjacentStacks({targetId:this.entityId,edge:e})).map((e=>ri.getEntity({type:\"stack\",entityId:e.entityId},ti(this,Zn,\"f\")))),ei(this,Zn,e,\"f\"),this.entityId=t}}Bn.LayoutNode=ri,Zn=new WeakMap,ri.newLayoutEntitiesClient=async(e,t,n)=>{const i=(0,ii.createRelayedDispatch)(e,n,\"layout-relay\",\"You are trying to interact with a layout component on a window that does not exist or has been destroyed.\");return new ni.ApiConsumer(new ni.ChannelsConsumer({dispatch:i})).consume({id:t})},ri.getEntity=(e,t)=>{const{entityId:n,type:i}=e;switch(i){case\"column\":case\"row\":return new si(t,n,i);case\"stack\":return new oi(t,n);default:throw new Error(`Unrecognised Layout Entity encountered ('${JSON.stringify(e)})`)}};class oi extends ri{constructor(e,t){super(e,t),Qn.set(this,void 0),this.type=\"stack\",this.getViews=()=>ti(this,Qn,\"f\").getStackViews(this.entityId),this.addView=async(e,t={index:0})=>ti(this,Qn,\"f\").addViewToStack(this.entityId,e,t),this.removeView=async e=>{await ti(this,Qn,\"f\").removeViewFromStack(this.entityId,e)},this.setActiveView=async e=>{await ti(this,Qn,\"f\").setStackActiveView(this.entityId,e)},ei(this,Qn,e,\"f\")}}Bn.TabStack=oi,Qn=new WeakMap;class si extends ri{constructor(e,t,n){super(e,t),Xn.set(this,void 0),this.getContent=async()=>(await ti(this,Xn,\"f\").getContent(this.entityId)).map((e=>ri.getEntity(e,ti(this,Xn,\"f\")))),ei(this,Xn,e,\"f\"),this.type=n}}Bn.ColumnOrRow=si,Xn=new WeakMap;var ai={};Object.defineProperty(ai,\"__esModule\",{value:!0}),ai.DEFAULT_LAYOUT_KEY=ai.LAYOUT_CONTROLLER_ID=void 0,ai.LAYOUT_CONTROLLER_ID=\"layout-entities\",ai.DEFAULT_LAYOUT_KEY=\"__default__\";var ci,di,hi,li=s&&s.__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)};Object.defineProperty(Ln,\"__esModule\",{value:!0}),Ln.Layout=void 0;const ui=G,pi=O,wi=d,yi=Tn,fi=Bn,gi=ai;class mi extends wi.Base{static getClient(e){return li(e,di,\"f\").getValue()}constructor(e,t){super(t),ci.add(this),di.set(this,new ui.Lazy((async()=>fi.LayoutNode.newLayoutEntitiesClient(await this.platform.getClient(),gi.LAYOUT_CONTROLLER_ID,this.identity)))),this.replace=async e=>{this.wire.sendAction(\"layout-replace\").catch((e=>{}));const t=await this.platform.getClient();await t.dispatch(\"replace-layout\",{target:this.identity,opts:{layout:e}})},this.replaceView=async(e,t)=>{this.wire.sendAction(\"layout-replace-view\").catch((e=>{}));const n=await this.platform.getClient();await n.dispatch(\"replace-view\",{target:this.identity,opts:{viewToReplace:e,newView:t}})},this.applyPreset=async e=>{this.wire.sendAction(\"layout-apply-preset\").catch((e=>{}));const t=await this.platform.getClient(),{presetType:n}=e;if(!n||!(0,yi.isValidPresetType)(n))throw new Error(\"Cannot apply preset layout, please include an applicable presetType property in the PresetLayoutOptions.\");await t.dispatch(\"apply-preset-layout\",{target:this.identity,opts:{presetType:n}})};const n=(0,pi.validateIdentity)(e);if(n)throw new Error(n);this.identity=e,this.platform=this.fin.Platform.wrapSync({uuid:e.uuid}),e.uuid===this.fin.me.uuid&&e.name===this.fin.me.name&&(this.init=this.fin.Platform.Layout.init)}async getConfig(){this.wire.sendAction(\"layout-get-config\").catch((e=>{}));return(await this.platform.getClient()).dispatch(\"get-frame-snapshot\",{target:this.identity})}async getCurrentViews(){this.wire.sendAction(\"layout-get-views\").catch((e=>{}));const e=await this.platform.getClient();return(await e.dispatch(\"get-layout-views\",{target:this.identity})).map((e=>this.fin.View.wrapSync(e)))}async getRootItem(){this.wire.sendAction(\"layout-get-root-item\").catch((()=>{}));const e=await li(this,di,\"f\").getValue(),t=await e.getRoot(\"layoutName\"in this.identity?this.identity:void 0);return fi.LayoutNode.getEntity(t,e)}async getStackByViewIdentity(e){this.wire.sendAction(\"layout-get-stack-by-view\").catch((()=>{}));const t=await li(this,di,\"f\").getValue(),n=await t.getStackByView(e);if(!n)throw new Error(`No stack found for view: ${e.uuid}/${e.name}`);return fi.LayoutNode.getEntity(n,t)}async addView(e,{location:t,targetView:n}={}){this.wire.sendAction(\"layout-add-view\").catch((e=>{}));const{identity:i}=await li(this,ci,\"m\",hi).call(this,\"layout-add-view\",{viewOptions:e,location:t,targetView:n});return{identity:i}}async closeView(e){this.wire.sendAction(\"layout-close-view\").catch((e=>{})),await li(this,ci,\"m\",hi).call(this,\"layout-close-view\",{viewIdentity:e})}}Ln.Layout=mi,di=new WeakMap,ci=new WeakSet,hi=async function(e,t){return(await this.platform.getClient()).dispatch(e,{target:this.identity,opts:t})};var vi,Ci,bi,Ii,Ei,xi=s&&s.__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)},Ai=s&&s.__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};Object.defineProperty(kn,\"__esModule\",{value:!0}),kn.LayoutModule=void 0;const Pi=d,Mi=Ln,_i=ai;class Oi extends Pi.Base{constructor(){super(...arguments),vi.add(this),Ci.set(this,!1),bi.set(this,null),this.init=async(e={})=>{if(this.wire.sendAction(\"layout-init\").catch((e=>{})),!this.wire.environment.layoutAllowedInContext(this.fin))throw new Error(\"Layout.init can only be called from a Window context.\");if(xi(this,Ci,\"f\"))throw new Error(\"Layout.init was already called, please use Layout.create to add additional layouts.\");\"openfin\"===this.wire.environment.type&&await this.fin.Platform.getCurrentSync().getClient(),Ai(this,Ci,!0,\"f\"),Ai(this,bi,await this.wire.environment.initLayoutManager(this.fin,this.wire,e),\"f\"),await this.wire.environment.applyLayoutSnapshot(this.fin,xi(this,bi,\"f\"),e);const t={name:this.fin.me.name,uuid:this.fin.me.uuid};if(!e.layoutManagerOverride){const e={layoutName:_i.DEFAULT_LAYOUT_KEY,...t};return xi(this,Ii,\"f\").call(this,e)}return this.wrapSync(t)},Ii.set(this,(e=>{const t=\"[Layout] You are using a deprecated property `layoutManager` - it will throw if you access it starting in v37.\",n=new Proxy({},{get(e,n){throw console.warn(`[Layout-mgr-proxy] accessing ${n.toString()}`),new Error(t)}}),i=Object.assign(this.wrapSync(e),{layoutManager:n});return new Proxy(i,{get(e,n){if(\"layoutManager\"===n)throw console.warn(`[Layout-proxy] accessing ${n.toString()}`),new Error(t);return e[n]}})})),this.getCurrentLayoutManagerSync=()=>xi(this,vi,\"m\",Ei).call(this,\"fin.Platform.Layout.getCurrentLayoutManagerSync()\"),this.create=async e=>this.wire.environment.createLayout(xi(this,vi,\"m\",Ei).call(this,\"fin.Platform.Layout.create()\"),e),this.destroy=async e=>this.wire.environment.destroyLayout(xi(this,vi,\"m\",Ei).call(this,\"fin.Platform.Layout.destroy()\"),e)}async wrap(e){return this.wire.sendAction(\"layout-wrap\").catch((e=>{})),new Mi.Layout(e,this.wire)}wrapSync(e){return this.wire.sendAction(\"layout-wrap-sync\").catch((e=>{})),new Mi.Layout(e,this.wire)}async getCurrent(){if(this.wire.sendAction(\"layout-get-current\").catch((e=>{})),\"openfin\"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error(\"You are not in a Window context. Only Windows can have a Layout.\");const{uuid:e,name:t}=this.fin.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction(\"layout-get-current-sync\").catch((e=>{})),\"openfin\"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error(\"You are not in a Window context. Only Windows can have a Layout.\");const{uuid:e,name:t}=this.fin.me;return this.wrapSync({uuid:e,name:t})}async getLayoutByViewIdentity(e){this.wire.sendAction(\"layout-get-by-view-identity\").catch((()=>{}));let t=await this.wire.environment.getViewWindowIdentity(this.fin,e);t.identity&&(t=t.identity);try{const n=this.wrapSync(t),i=await Mi.Layout.getClient(n),r=await i.getLayoutIdentityForViewOrThrow(e);return this.wrapSync(r)}catch(n){if(![\"No action registered at target for\",\"getLayoutIdentityForViewOrThrow is not a function\"].some((e=>n.message.includes(e))))throw n;if(t.uuid===t.name)throw new Error(`View identity ${JSON.stringify(e)} is not attached to any layout in provider window ${JSON.stringify(t)}.`);return this.wrapSync(t)}}}kn.LayoutModule=Oi,Ci=new WeakMap,bi=new WeakMap,Ii=new WeakMap,vi=new WeakSet,Ei=function(e){if(!xi(this,bi,\"f\"))throw new Error(`You must call init before using the API ${e}`);return xi(this,bi,\"f\")},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(kn,e),n(Ln,e)}(jn),Object.defineProperty(Pn,\"__esModule\",{value:!0}),Pn.PlatformModule=void 0;const Si=d,Ri=Mn,Fi=jn;class ji extends Si.Base{constructor(e,t){super(e),this._channel=t,this.Layout=new Fi.LayoutModule(this.wire)}async init(e){if(!fin.__internal_.isPlatform||fin.me.name!==fin.me.uuid)throw new Error(\"fin.Platform.init should only be called from a custom platform provider running in the main window of the application.\");return this.wire.environment.initPlatform(this.fin,e)}async wrap(e){return this.wire.sendAction(\"platform-wrap\").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}wrapSync(e){return this.wire.sendAction(\"platform-wrap-sync\").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}async getCurrent(){return this.wire.sendAction(\"platform-get-current\").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction(\"platform-get-current-sync\").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}start(e){return this.wire.sendAction(\"platform-start\").catch((e=>{})),new Promise((async(t,n)=>{try{const{uuid:n}=e,i=await this.fin.Application._create({...e,isPlatformController:!0});i.once(\"platform-api-ready\",(()=>t(this.wrapSync({uuid:n})))),i._run({uuid:n})}catch(e){n(e)}}))}startFromManifest(e,t){return this.wire.sendAction(\"platform-start-from-manifest\").catch((e=>{})),new Promise((async(n,i)=>{try{const i=await this.fin.Application._createFromManifest(e);i.once(\"platform-api-ready\",(()=>n(this.wrapSync({uuid:i.identity.uuid})))),i._run(t)}catch(e){i(e)}}))}}Pn.PlatformModule=ji,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Pn,e),n(Mn,e)}(An);var ki={};!function(e){Object.defineProperty(e,\"__esModule\",{value:!0}),e.getMe=e.getBaseMe=e.environmentUnsupportedMessage=void 0;const t=J(),n=un,i=ie(),r=rn;function o(e,t,n){return{...{isView:\"view\"===e,isWindow:\"window\"===e,isFrame:\"iframe\"===e,isExternal:\"external connection\"===e},uuid:t,name:n,entityType:e}}e.environmentUnsupportedMessage=\"You are not running in OpenFin.\",e.getBaseMe=o,e.getMe=function(s){const{uuid:a,name:c,entityType:d}=s.me,h={setContext(){throw new Error(e.environmentUnsupportedMessage)},addContextHandler(){throw new Error(e.environmentUnsupportedMessage)},getContextGroups(){throw new Error(e.environmentUnsupportedMessage)},joinContextGroup(){throw new Error(e.environmentUnsupportedMessage)},removeFromContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getAllClientsInContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getInfoForContextGroup(){throw new Error(e.environmentUnsupportedMessage)}},l=\"Interop API has not been instantiated. Either connection has failed or you have not declared interop in your config.\",u={setContext(){throw new Error(l)},addContextHandler(){throw new Error(l)},getContextGroups(){throw new Error(l)},joinContextGroup(){throw new Error(l)},removeFromContextGroup(){throw new Error(l)},getAllClientsInContextGroup(){throw new Error(l)},getInfoForContextGroup(){throw new Error(l)}},p={eventNames:()=>{throw new Error(e.environmentUnsupportedMessage)},emit:()=>{throw new Error(e.environmentUnsupportedMessage)},listeners:()=>{throw new Error(e.environmentUnsupportedMessage)},listenerCount:()=>{throw new Error(e.environmentUnsupportedMessage)},on:()=>{throw new Error(e.environmentUnsupportedMessage)},addListener:()=>{throw new Error(e.environmentUnsupportedMessage)},once:()=>{throw new Error(e.environmentUnsupportedMessage)},prependListener:()=>{throw new Error(e.environmentUnsupportedMessage)},prependOnceListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeAllListeners:()=>{throw new Error(e.environmentUnsupportedMessage)}};switch(d){case\"view\":return Object.assign(new t.View(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case\"window\":return Object.assign(new i._Window(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case\"iframe\":return Object.assign(new n._Frame(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case\"external connection\":return Object.assign(new r.ExternalApplication(s,{uuid:a}),o(d,a,c),{interop:u,isOpenFin:!1});default:return{...o(d,a,c),...p,interop:h,isOpenFin:!1}}}}(ki);var Li={},Ti={},$i={};Object.defineProperty($i,\"__esModule\",{value:!0}),$i.createWarningObject=$i.createUnusableObject=void 0,$i.createUnusableObject=function(e){const t=()=>{throw new Error(e)};return new Proxy({},{apply:t,construct:t,defineProperty:t,deleteProperty:t,get:t,getOwnPropertyDescriptor:t,getPrototypeOf:t,has:t,isExtensible:t,ownKeys:t,preventExtensions:t,set:t,setPrototypeOf:t})},$i.createWarningObject=function(e,t){return new Proxy(t,{get:(...t)=>(console.warn(e),Reflect.get(...t)),set:(...t)=>(console.warn(e),Reflect.set(...t)),getOwnPropertyDescriptor:(...t)=>(console.warn(e),Reflect.getOwnPropertyDescriptor(...t)),ownKeys:(...t)=>(console.warn(e),Reflect.ownKeys(...t))})};var Bi,Gi={},Wi={};var Hi={};!function(e){Object.defineProperty(e,\"__esModule\",{value:!0}),e.wrapIntentHandler=e.BROKER_ERRORS=e.generateOverrideWarning=e.generateOverrideError=e.wrapContextHandler=e.wrapInTryCatch=e.generateId=void 0;e.generateId=()=>`${Math.random()}${Date.now()}`;e.wrapInTryCatch=(e,t)=>(...n)=>{try{return e(...n)}catch(e){throw new Error((t||\"\")+e)}};e.wrapContextHandler=(e,t)=>async n=>{try{await e(n)}catch(e){throw console.error(`Error thrown by handler ${t} for context type ${n.type}: ${e}`),e}};e.generateOverrideError=(e,t)=>`You have tried to to use ${e} but ${t} has not been overridden in the Interop Broker. Please override this function. Refer to our documentation for more info.`;e.generateOverrideWarning=(e,t,n,i)=>{const{uuid:r,name:o}=n;return i?`Entity with identity: ${r}/${o} has called ${i} or ${e} but ${t} has not been overridden.`:`Entity with identity: ${r}/${o} has called ${e} but ${t} has not been overridden.`},e.BROKER_ERRORS={fireIntent:(0,e.generateOverrideError)(\"fireIntent\",\"handleFiredIntent\"),fireIntentForContext:(0,e.generateOverrideError)(\"fireIntentForContext\",\"handleFiredIntentForContext\"),getInfoForIntent:(0,e.generateOverrideError)(\"getInfoForIntent\",\"handleInfoForIntent\"),getInfoForIntentsByContext:(0,e.generateOverrideError)(\"getInfoForIntentsByContext\",\"handleInfoForIntentsByContext\"),joinSessionContextGroupWithJoinContextGroup:\"The Context Group you have tried to join is a Session Context Group. Custom Context Groups can only be defined by the Interop Broker through code or manifest configuration. Please use joinSessionContextGroup.\",fdc3Open:(0,e.generateOverrideError)(\"fdc3.open\",\"fdc3HandleOpen\"),fdc3FindInstances:(0,e.generateOverrideError)(\"fdc3.findInstances\",\"fdc3HandleFindInstances\"),fdc3GetAppMetadata:(0,e.generateOverrideError)(\"fdc3.getAppMetadata\",\"fdc3HandleGetAppMetadata\"),fdc3GetInfo:(0,e.generateOverrideError)(\"fdc3.getInfo\",\"fdc3HandleGetInfo\")};e.wrapIntentHandler=(e,t)=>async n=>{try{return e(n)}catch(e){throw console.error(`Error thrown by handler ${t}: ${e}`),e}}}(Hi);var Ni,Di,Ui={};function Vi(){if(Di)return Gi;Di=1;var e,t,n,r=s&&s.__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},o=s&&s.__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)},a=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Gi,\"__esModule\",{value:!0}),Gi.InteropBroker=void 0;const c=d,h=a(function(){if(Bi)return Wi;Bi=1,Object.defineProperty(Wi,\"__esModule\",{value:!0});const e=Cr();return Wi.default=class{constructor(e,t){this.provider=e,this.id=t,this.lastContext=void 0,this.contextGroupMap=new Map,this.clients=new Map,this.registerListeners()}registerListeners(){this.provider.register(`sessionContextGroup:getContext-${this.id}`,this.getCurrentContext.bind(this)),this.provider.register(`sessionContextGroup:setContext-${this.id}`,this.setContext.bind(this)),this.provider.register(`sessionContextGroup:handlerAdded-${this.id}`,this.handlerAdded.bind(this)),this.provider.register(`sessionContextGroup:handlerRemoved-${this.id}`,this.handlerRemoved.bind(this))}getCurrentContext(e){return e.type?this.contextGroupMap.get(e.type):this.lastContext}setContext(t,n){const{context:i}=t,r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name} not in Session Client State Map`);this.contextGroupMap.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{e.contextHandlers.get(i.type)?.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getClientState(e){return this.clients.get(e.endpointId)}async handlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(i){const e=r.contextHandlers.get(i)||[];r.contextHandlers.set(i,[...e,n]);const o=this.contextGroupMap.get(i);o&&await this.provider.dispatch(t,n,o)}else{r.globalHandler=n;const e=[...this.contextGroupMap.keys()].map((async e=>{const i=this.contextGroupMap.get(e);i&&await this.provider.dispatch(t,n,i)}));await Promise.all(e)}}handlerRemoved(e,t){const{handlerId:n}=e,i=this.clients.get(t.endpointId);i?(Array.from(i.contextHandlers).forEach((([,e])=>{const t=e.indexOf(n);t>-1&&e.splice(t,1)})),i.globalHandler===n&&(i.globalHandler=void 0)):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={contextHandlers:new Map,clientIdentity:e,globalHandler:void 0};this.clients.set(e.endpointId,t)}}onDisconnection(e){this.clients.delete(e.endpointId)}},Wi}()),l=Hi,u=a(i),p=function(){if(Ni)return Ui;Ni=1,Object.defineProperty(Ui,\"__esModule\",{value:!0}),Ui.PrivateChannelProvider=void 0;const e=Vi();return Ui.PrivateChannelProvider=class t{constructor(e,t){this.provider=e,this.id=t,this.clients=new Map,this.registerListeners(),this.contextByContextType=new Map,this.lastContext=void 0,this.provider.onConnection((e=>this.registerNewClient(e))),this.provider.onDisconnection((async e=>{const{endpointId:t}=e;this.clients.has(t)&&await this.handleClientDisconnecting(e),0===(await this.provider.getAllClientInfo()).length&&this.provider.destroy()}))}getClientState(e){return this.clients.get(e.endpointId)}registerListeners(){this.provider.register(\"broadcast\",this.broadcast.bind(this)),this.provider.register(\"getCurrentContext\",this.getCurrentContext.bind(this)),this.provider.register(\"contextHandlerAdded\",this.contextHandlerAdded.bind(this)),this.provider.register(\"contextHandlerRemoved\",this.contextHandlerRemoved.bind(this)),this.provider.register(\"nonStandardHandlerRemoved\",this.nonStandardHandlerRemoved.bind(this)),this.provider.register(\"onAddContextHandlerAdded\",this.onAddContextHandlerAdded.bind(this)),this.provider.register(\"onDisconnectHandlerAdded\",this.onDisconnectHandlerAdded.bind(this)),this.provider.register(\"onUnsubscribeHandlerAdded\",this.onUnsubscribeHandlerAdded.bind(this)),this.provider.register(\"clientDisconnecting\",((e,t)=>{this.handleClientDisconnecting(t)}))}broadcast(t,n){const{context:i}=t;if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name}, tried to call broadcast, is not connected to this Private Channel`);const r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to broadcast - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);this.contextByContextType.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{const t=e.handlerIdsByContextTypes.get(i.type);t&&t.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getCurrentContext(e,t){const{contextType:n}=e;if(!this.getClientState(t))throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call getCurrentContext, is not connected to this Private Channel`);if(void 0!==n){return this.contextByContextType.get(n)||null}return this.lastContext?this.lastContext:null}contextHandlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call addContextListener, is not connected to this Private Channel`);if(i){const e=r.handlerIdsByContextTypes.get(i)||[];r.handlerIdsByContextTypes.set(i,[...e,n])}else r.globalHandler=n;Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&e.onAddContextListenerHandlerId&&this.provider.dispatch(e.clientIdentity,e.onAddContextListenerHandlerId,i)}))}async contextHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);if(i){let e;if(i.globalHandler===n)i.globalHandler=void 0;else for(const[t,r]of i.handlerIdsByContextTypes){const i=r.indexOf(n);i>-1&&(r.splice(i,1),e=t)}const r=(await this.getConnectedClients()).map((async n=>{const{clientIdentity:i,clientIdentity:{endpointId:r},onUnsubscribeHandlerId:o}=n;r!==t.endpointId&&o&&await this.provider.dispatch(i,o,e)}));try{await Promise.all(r)}catch(e){throw console.error(`Problem when attempting to dispatch to onUnsubscribeHandlers. Error: ${e} Removing Client: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}`),new Error(e)}}else console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}.`)}nonStandardHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);i?i.onDisconnectHandlerId===n?i.onDisconnectHandlerId=void 0:i.onAddContextListenerHandlerId===n?i.onAddContextListenerHandlerId=void 0:i.onUnsubscribeHandlerId===n&&(i.onUnsubscribeHandlerId=void 0):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}onAddContextHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onAddContextListener, is not connected to this Private Channel`);n.onAddContextListenerHandlerId=i,Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&Array.from(e.handlerIdsByContextTypes.keys()).forEach((e=>{this.provider.dispatch(t,i,e)}))}))}onDisconnectHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onDisconnect, is not connected to this Private Channel`);n.onDisconnectHandlerId=i}onUnsubscribeHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onUnsubscribe, is not connected to this Private Channel`);n.onUnsubscribeHandlerId=i}removeClient(e){const t=this.getClientState(e);if(!t)throw new Error(`Client with Identity: ${e.uuid} ${e.name}, tried to call disconnect, is not connected to this Private Channel`);t.handlerIdsByContextTypes.clear(),this.clients.delete(e.endpointId)}async fireOnDisconnectForOtherClients(e){const{endpointId:t}=e,n=(await this.getConnectedClients()).map((async e=>{const{clientIdentity:{endpointId:n},onDisconnectHandlerId:i}=e;n!==t&&i&&await this.provider.dispatch(e.clientIdentity,i)}));try{await Promise.all(n)}catch(t){throw console.error(`Problem when attempting to dispatch to onDisconnectHandlers. Error: ${t} Disconnecting Client: uuid: ${e.uuid}. name: ${e.name}. endpointId: ${e.endpointId}`),new Error(t)}}async unsubscribeAll(e){const{endpointId:t}=e,n=this.clients.get(t);if(n){const t=Array.from(n.handlerIdsByContextTypes.values()).flat(),i=n.globalHandler;if(t.length>0){const n=t.map((async t=>this.contextHandlerRemoved({handlerId:t},e)));try{await Promise.all(n)}catch(e){console.error(e.message)}}if(i)try{await this.contextHandlerRemoved({handlerId:i},e)}catch(e){console.error(e.message)}}}async handleClientDisconnecting(e){await this.unsubscribeAll(e),this.removeClient(e),await this.fireOnDisconnectForOtherClients(e)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={clientIdentity:e,handlerIdsByContextTypes:new Map,globalHandler:void 0,onAddContextListenerHandlerId:void 0,onUnsubscribeHandlerId:void 0,onDisconnectHandlerId:void 0};this.clients.set(e.endpointId,t)}}async getConnectedClients(){const e=await this.provider.getAllClientInfo();return Array.from(this.clients.values()).filter((t=>{const{uuid:n,name:i}=t.clientIdentity;return e.some((e=>i===e.name&&n===e.uuid))}))}static init(e,n){return new t(e,n)}},Ui}(),w=G,y=[{id:\"green\",displayMetadata:{color:\"#00CC88\",name:\"green\"}},{id:\"purple\",displayMetadata:{color:\"#8C61FF\",name:\"purple\"}},{id:\"orange\",displayMetadata:{color:\"#FF8C4C\",name:\"orange\"}},{id:\"red\",displayMetadata:{color:\"#FF5E60\",name:\"red\"}},{id:\"pink\",displayMetadata:{color:\"#FF8FB8\",name:\"pink\"}},{id:\"yellow\",displayMetadata:{color:\"#E9FF8F\",name:\"yellow\"}}];let f=class i extends c.Base{constructor(i,s,a){super(i),e.set(this,void 0),t.set(this,void 0),n.set(this,void 0),this.getProvider=()=>o(this,n,\"f\").getValue(),this.interopClients=new Map,this.contextGroupsById=new Map,r(this,t,a.contextGroups??[...y],\"f\"),r(this,e,a.fdc3Info,\"f\"),a?.logging&&(this.logging=a.logging),this.intentClientMap=new Map,this.lastContextMap=new Map,this.sessionContextGroupMap=new Map,r(this,n,new w.Lazy(s),\"f\"),this.setContextGroupMap(),this.setupChannelProvider()}static createClosedConstructor(...e){return class extends i{constructor(...t){if(t.length){const[n,i,r]=t;if(r&&\"object\"==typeof r&&!(0,u.default)(r,e[2]))return console.warn(\"You have modified the parameters of the InteropOverride constructor. This behavior is deprecated and will be removed in a future version. You can modify these options in your manifest. Please consult our Interop docs for guidance on migrating to the new override scheme.\"),void super(e[0],e[1],r);console.warn(\"You are attempting to pass arguments to the InteropOverride constructor. This is not necessary, and these passed arguments will be ignored. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.\")}super(...e)}}}setContext({context:e},t){this.wire.sendAction(\"interop-broker-set-context\").catch((e=>{}));const n=this.getClientState(t);if(!n||!n.contextGroupId)throw n?new Error(\"You must join a context group before you can set context.\"):new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);{const{contextGroupId:t}=n;this.setContextForGroup({context:e},t)}}setContextForGroup({context:e},t){this.wire.sendAction(\"interop-broker-set-context-for-group\").catch((e=>{}));const n=this.contextGroupsById.get(t);if(!n)throw new Error(`Unable to set context for context group that isn't in the context group mapping: ${t}.`);const r=i.checkContextIntegrity(e);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(e)}`);const o=e.type;n.set(o,e),this.lastContextMap.set(t,o);Array.from(this.interopClients.values()).filter((e=>e.contextGroupId===t)).forEach((t=>{for(const[,n]of t.contextHandlers)i.isContextTypeCompatible(o,n.contextType)&&this.invokeContextHandler(t.clientIdentity,n.handlerId,e)}))}getCurrentContext(e,t){this.wire.sendAction(\"interop-broker-get-current-context\").catch((e=>{}));const n=this.getClientState(t);if(!n?.contextGroupId)throw new Error(\"You must be a member of a context group to call getCurrentContext\");const{contextGroupId:i}=n,r=this.contextGroupsById.get(i),o=this.lastContextMap.get(i),s=e?.contextType??o;return r&&s?r.get(s):void 0}async joinContextGroup({contextGroupId:e,target:t},n){if(this.wire.sendAction(\"interop-broker-join-context-group\").catch((e=>{})),this.sessionContextGroupMap.has(e))throw new Error(l.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup);if(t){i.hasEndpointId(t)&&await this.addClientToContextGroup({contextGroupId:e},t);try{const n=this.channel.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name));if(!n.length)throw new Error(`Given Identity ${t.uuid} ${t.name} is not connected to the Interop Broker.`);n.length>1&&console.warn(`More than one connection found for identity ${t.uuid} ${t.name}`);const i=[];for(const t of n)i.push(this.addClientToContextGroup({contextGroupId:e},t));await Promise.all(i)}catch(e){throw new Error(e)}}else await this.addClientToContextGroup({contextGroupId:e},n)}async addClientToContextGroup({contextGroupId:e},t){this.wire.sendAction(\"interop-broker-add-client-to-context-group\").catch((e=>{}));const n=this.getClientState(t);if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(!this.getContextGroups().find((t=>t.id===e)))throw new Error(`Attempting to join a context group that does not exist: ${e}. You may only join existing context groups.`);if(n.contextGroupId!==e){n.contextGroupId=e,await this.setCurrentContextGroupInClientOptions(t,e);const i=this.contextGroupsById.get(e);for(const[,e]of n.contextHandlers){const{contextType:n,handlerId:r}=e;if(void 0===n)i.forEach(((e,n)=>{this.invokeContextHandler(t,r,e)}));else if(i.has(n)){const e=i.get(n);e&&this.invokeContextHandler(t,r,e)}}}}async removeFromContextGroup({target:e},t){if(this.wire.sendAction(\"interop-broker-remove-from-context-group\").catch((e=>{})),e){i.hasEndpointId(e)&&await this.removeClientFromContextGroup(e);try{const t=this.channel.connections.filter((t=>t.uuid===e.uuid&&t.name===e.name));if(!t.length)throw new Error(`No connection found for given Identity ${e.uuid} ${e.name}`);t.length>1&&console.warn(`More than one connection found for identity ${e.uuid} ${e.name}`);const n=[];for(const e of t)n.push(this.removeClientFromContextGroup(e));await Promise.all(n)}catch(e){throw new Error(e)}}else await this.removeClientFromContextGroup(t)}async removeClientFromContextGroup(e){this.wire.sendAction(\"interop-broker-remove-client-from-context-group\").catch((e=>{}));const t=this.getClientState(e);t&&(t.contextGroupId=void 0),await this.setCurrentContextGroupInClientOptions(e,null)}getContextGroups(){return this.wire.sendAction(\"interop-broker-get-context-groups\").catch((e=>{})),o(this,t,\"f\").map((e=>({...e})))}getInfoForContextGroup({contextGroupId:e}){return this.wire.sendAction(\"interop-broker-get-info-for-context-group\").catch((e=>{})),this.getContextGroups().find((t=>t.id===e))}getAllClientsInContextGroup({contextGroupId:e}){this.wire.sendAction(\"interop-broker-get-all-clients-in-context-group\").catch((e=>{}));return Array.from(this.interopClients.values()).filter((t=>t.contextGroupId===e)).map((e=>e.clientIdentity))}async handleFiredIntent(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.raiseIntent\",\"InteropBroker.handleFiredIntent\",t,\"interopClient.fireIntent\");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntent)}async setIntentTarget(e,t){this.wire.sendAction(\"interop-broker-set-intent-target\").catch((e=>{}));const n=this.intentClientMap.get(t.name),i=`intent-handler-${e.name}`;if(n){const t=n.get(i);if(t){if(t.pendingIntents.push(e),t.clientIdentity&&t.isReady){const{clientIdentity:e,pendingIntents:n}=t;try{const r=n[n.length-1];await this.invokeIntentHandler(e,i,r),t.pendingIntents=[]}catch(n){console.error(`Error invoking intent handler for client ${e.uuid}/${e.name}/${e.endpointId}`),t.isReady=!1}}}else n.set(i,{isReady:!1,pendingIntents:[e]})}else{this.intentClientMap.set(t.name,new Map);const n=this.intentClientMap.get(t.name);n&&n.set(i,{isReady:!1,pendingIntents:[e]})}}async handleInfoForIntent(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.findIntent\",\"InteropBroker.handleInfoForIntent\",t,\"interopClient.getInfoForIntent\");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntent)}async handleInfoForIntentsByContext(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.findIntentsByContext\",\"InteropBroker.handleInfoForIntentsByContext\",t,\"interopClient.getInfoForIntentsByContext\");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntentsByContext)}async handleFiredIntentForContext(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.raiseIntentForContext\",\"InteropBroker.handleFiredIntentForContext\",t,\"interopClient.fireIntentForContext\");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntentForContext)}async clientDisconnected(e){}async fdc3HandleOpen({app:e,context:t},n){const i=(0,l.generateOverrideWarning)(\"fdc3.open\",\"InteropBroker.fdc3HandleOpen\",n);throw console.warn(i),new Error(l.BROKER_ERRORS.fdc3Open)}async fdc3HandleFindInstances(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.open\",\"InteropBroker.fdc3HandleFindInstances\",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3FindInstances)}async fdc3HandleGetAppMetadata(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.getAppMetadata\",\"InteropBroker.fdc3HandleGetAppMetadata\",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3GetAppMetadata)}async invokeContextHandler(e,t,n){const i=await this.getProvider();try{await i.dispatch(e,t,n)}catch(i){console.error(`Error invoking context handler ${t} for context type ${n.type} in client ${e.uuid}/${e.name}/${e.endpointId}`,i)}}async invokeIntentHandler(e,t,n){const i=await this.getProvider();await i.dispatch(e,t,n)}async fdc3HandleGetInfo(t,n){const{fdc3Version:i}=t;return{fdc3Version:i,...o(this,e,\"f\"),optionalFeatures:{OriginatingAppMetadata:!1,UserChannelMembershipAPIs:!0},appMetadata:{appId:\"\",instanceId:\"\"}}}async getAllClientInfo(){return(await this.getProvider()).getAllClientInfo()}decorateSnapshot(e){return{...e,interopSnapshotDetails:{contextGroupStates:this.getContextGroupStates()}}}applySnapshot(e,t){const n=e?.interopSnapshotDetails?.contextGroupStates;n&&(t?.closeExistingWindows||this.updateExistingClients(n),this.rehydrateContextGroupStates(n))}updateExistingClients(e){this.interopClients.forEach((t=>{const{clientIdentity:n,contextGroupId:r,contextHandlers:o}=t;if(r){const t=e[r];for(const[,e]of Object.entries(t))o.forEach((t=>{const{handlerId:r,contextType:o}=t;i.isContextTypeCompatible(e.type,o)&&this.invokeContextHandler(n,r,e)}))}}))}getContextGroupStates(){return i.toObject(this.contextGroupsById)}rehydrateContextGroupStates(e){const t=Object.entries(e);for(const[e,n]of t){const t=Object.entries(n);for(const[n,i]of t)if(this.contextGroupsById.has(e)){this.contextGroupsById.get(e).set(n,i)}else console.warn(`Attempting to set a context group that isn't in the context group mapping. Skipping context group rehydration for: ${e}`)}}contextHandlerRegistered({contextType:e,handlerId:t},n){const i={contextType:e,handlerId:t},r=this.getClientState(n);if(r?.contextHandlers.set(t,i),r&&r.contextGroupId){const{contextGroupId:i}=r,o=this.contextGroupsById.get(i);if(void 0===e)o.forEach(((e,i)=>{this.invokeContextHandler(n,t,e)}));else if(o.has(e)){const i=o.get(e);i&&this.invokeContextHandler(n,t,i)}}}async intentHandlerRegistered(e,t){const{handlerId:n}=e,i=this.intentClientMap.get(t.name),r=i?.get(n);if(i)if(r){const{pendingIntents:e}=r;r.clientIdentity=t,r.isReady=!0;try{if(e.length>0){const i=e[e.length-1];await this.invokeIntentHandler(t,n,i),r.pendingIntents=[]}}catch(e){console.error(`Error invoking intent handler: ${n} for client ${t.uuid}/${t.name}/${t.endpointId}`)}}else i.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t});else{this.intentClientMap.set(t.name,new Map);const e=this.intentClientMap.get(t.name);e&&e.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t})}}removeContextHandler({handlerId:e},t){const n=this.getClientState(t);n&&n.contextHandlers.delete(e)}handleJoinSessionContextGroup({sessionContextGroupId:e},t){try{if(!e)throw new Error(\"Failed to join session context group: must specify group id.\");const n=this.sessionContextGroupMap.get(e);if(n)n.registerNewClient(t);else{const n=new h.default(this.channel,e);n.registerNewClient(t),this.sessionContextGroupMap.set(e,n)}return{hasConflict:this.contextGroupsById.has(e)}}catch(e){throw new Error(e)}}getClientState(e){return this.interopClients.get(e.endpointId)}static toObject(e){const t=Object.fromEntries(e),n={};return Object.entries(t).forEach((([e,t])=>{const i=Object.fromEntries(t);n[e]=i})),n}static checkContextIntegrity(e){if(!e)return{isValid:!1,reason:\"No context supplied\"};if(\"object\"!=typeof e)return{isValid:!1,reason:\"Context must be an Object\"};if(!e.type)return{isValid:!1,reason:\"Context must have a type property\"};if(e.id&&\"object\"!=typeof e.id)return{isValid:!1,reason:\"Context id must be an Object populated with key-value identifiers (if set)\"};if(e.id){const{id:t}=e,n=Object.keys(t);let i=!1;if(!n.length)return{isValid:!1,reason:\"Context id must have at least one key-value identifier\"};if(n.forEach((e=>{\"string\"==typeof e&&\"string\"==typeof t[e]||(i=!0)})),i)return{isValid:!1,reason:\"Context id key-value identifiers must be of type string\"}}return e.name&&\"string\"!=typeof e.name?{isValid:!1,reason:\"Context name must be of string type (if set)\"}:{isValid:!0}}static hasEndpointId(e){return void 0!==e.endpointId}static isContextTypeCompatible(e,t){return void 0===t||e===t}setContextGroupMap(){for(const e of this.getContextGroups())this.contextGroupsById.set(e.id,new Map)}async setCurrentContextGroupInClientOptions(e,t){try{const n=await this.fin.System.getEntityInfo(e.uuid,e.name);let i;\"view\"===n.entityType?i=await this.fin.View.wrap(e):\"window\"===n.entityType&&(i=await this.fin.Window.wrap(e)),i&&await i.updateOptions({interop:{currentContextGroup:t}})}catch(e){}}async setupChannelProvider(){try{const e=await this.getProvider();this.channel=e,this.wireChannel(e)}catch(e){throw new Error(`Error setting up Interop Broker Channel Provider: ${e}`)}}wireChannel(e){e.onConnection((async(e,t)=>{if(!await this.isConnectionAuthorized(e,t))throw new Error(`Connection not authorized for ${e.uuid}, ${e.name}`);if(!e.endpointId)throw new Error(\"Version too old to be compatible with Interop. Please upgrade your runtime to a more recent version.\");const n={contextGroupId:void 0,contextHandlers:new Map,clientIdentity:e};t?.currentContextGroup&&this.contextGroupsById.has(t.currentContextGroup)&&(n.contextGroupId=t?.currentContextGroup),this.interopClients.set(e.endpointId,n)})),e.onDisconnection((e=>{this.interopClients.delete(e.endpointId);const t=this.intentClientMap.get(e.name);t&&e.uuid===this.fin.me.uuid&&t.forEach((e=>{e.isReady=!1})),this.sessionContextGroupMap.forEach((t=>{t.onDisconnection(e)})),this.clientDisconnected(e)})),e.beforeAction((async(e,t,n)=>{if(!await this.isActionAuthorized(e,t,n))throw new Error(`Action (${e}) not authorized for ${n.uuid}, ${n.name}`);this.logging?.beforeAction?.enabled&&console.log(e,t,n)})),e.afterAction(((e,t,n)=>{this.logging?.afterAction?.enabled&&console.log(e,t,n)})),e.register(\"setContext\",this.setContext.bind(this)),e.register(\"fireIntent\",this.handleFiredIntent.bind(this)),e.register(\"getCurrentContext\",this.getCurrentContext.bind(this)),e.register(\"getInfoForIntent\",this.handleInfoForIntent.bind(this)),e.register(\"getInfoForIntentsByContext\",this.handleInfoForIntentsByContext.bind(this)),e.register(\"fireIntentForContext\",this.handleFiredIntentForContext.bind(this)),e.register(\"getContextGroups\",this.getContextGroups.bind(this)),e.register(\"joinContextGroup\",this.joinContextGroup.bind(this)),e.register(\"removeFromContextGroup\",this.removeFromContextGroup.bind(this)),e.register(\"getAllClientsInContextGroup\",this.getAllClientsInContextGroup.bind(this)),e.register(\"getInfoForContextGroup\",this.getInfoForContextGroup.bind(this)),e.register(\"contextHandlerRegistered\",this.contextHandlerRegistered.bind(this)),e.register(\"intentHandlerRegistered\",this.intentHandlerRegistered.bind(this)),e.register(\"removeContextHandler\",this.removeContextHandler.bind(this)),e.register(\"sessionContextGroup:createIfNeeded\",this.handleJoinSessionContextGroup.bind(this)),e.register(\"fdc3Open\",this.fdc3HandleOpen.bind(this)),e.register(\"fdc3v2FindIntentsByContext\",this.handleInfoForIntentsByContext.bind(this)),e.register(\"fdc3FindInstances\",this.fdc3HandleFindInstances.bind(this)),e.register(\"fdc3GetAppMetadata\",this.fdc3HandleGetAppMetadata.bind(this)),e.register(\"fdc3v2GetInfo\",(async(e,t)=>this.fdc3HandleGetInfo.bind(this)(e,t))),e.register(\"createPrivateChannelProvider\",(async e=>{const{channelId:t}=e,n=await this.fin.InterApplicationBus.Channel.create(t);p.PrivateChannelProvider.init(n,t)}))}isConnectionAuthorized(e,t){return this.wire.sendAction(\"interop-broker-is-connection-authorized\").catch((e=>{})),Promise.resolve(!0)}isActionAuthorized(e,t,n){return this.wire.sendAction(\"interop-broker-is-action-authorized\").catch((e=>{})),Promise.resolve(!0)}};return Gi.InteropBroker=f,e=new WeakMap,t=new WeakMap,n=new WeakMap,Gi}var zi,Ki={},qi={},Ji=s&&s.__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},Yi=s&&s.__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)};Object.defineProperty(qi,\"__esModule\",{value:!0});const Zi=d,Qi=Hi;class Xi extends Zi.Base{constructor(e,t,n){super(e),zi.set(this,void 0),this.id=n,Ji(this,zi,t,\"f\")}async setContext(e){this.wire.sendAction(\"interop-session-context-group-set-context\").catch((e=>{}));return(await Yi(this,zi,\"f\")).dispatch(`sessionContextGroup:setContext-${this.id}`,{sessionContextGroupId:this.id,context:e})}async getCurrentContext(e){this.wire.sendAction(\"interop-session-context-group-get-context\").catch((e=>{}));return(await Yi(this,zi,\"f\")).dispatch(`sessionContextGroup:getContext-${this.id}`,{sessionContextGroupId:this.id,type:e})}async addContextHandler(e,t){if(this.wire.sendAction(\"interop-session-context-group-add-handler\").catch((e=>{})),\"function\"!=typeof e)throw new Error(\"Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.\");const n=await Yi(this,zi,\"f\");let i;return i=t?`sessionContextHandler:invoke-${this.id}-${t}-${(0,Qi.generateId)()}`:`sessionContextHandler:invoke-${this.id}`,n.register(i,(0,Qi.wrapContextHandler)(e,i)),await n.dispatch(`sessionContextGroup:handlerAdded-${this.id}`,{handlerId:i,contextType:t}),{unsubscribe:await this.createUnsubscribeCb(i)}}async createUnsubscribeCb(e){const t=await Yi(this,zi,\"f\");return async()=>{t.remove(e),await t.dispatch(`sessionContextGroup:handlerRemoved-${this.id}`,{handlerId:e})}}getUserInstance(){return{id:this.id,setContext:(0,Qi.wrapInTryCatch)(this.setContext.bind(this),\"Failed to set context: \"),getCurrentContext:(0,Qi.wrapInTryCatch)(this.getCurrentContext.bind(this),\"Failed to get context: \"),addContextHandler:(0,Qi.wrapInTryCatch)(this.addContextHandler.bind(this),\"Failed to add context handler: \")}}}qi.default=Xi,zi=new WeakMap;var er={},tr={},nr={},ir={},rr=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),or=s&&s.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,\"default\",{enumerable:!0,value:t})}:function(e,t){e.default=t}),sr=s&&s.__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)&&rr(t,e,n);return or(t,e),t};Object.defineProperty(ir,\"__esModule\",{value:!0}),ir.PrivateChannelClient=void 0;const ar=sr(Hi);var cr,dr;function hr(){if(cr)return tr;cr=1;var e,t=s&&s.__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)},n=s&&s.__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},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(tr,\"__esModule\",{value:!0}),tr.FDC3ModuleBase=void 0;const o=nr,a=Hi,c=wr(),d=r(i);return tr.FDC3ModuleBase=class{get client(){return t(this,e,\"f\").call(this)}get fin(){return this.wire.getFin()}constructor(t,i){this.wire=i,e.set(this,void 0),n(this,e,t,\"f\")}async broadcast(e){return this.wire.sendAction(\"fdc3-broadcast\").catch((e=>{})),this.client.setContext(e)}async _open(e,t){this.wire.sendAction(\"fdc3-open\").catch((e=>{}));try{return await c.InteropClient.ferryFdc3Call(this.client,\"fdc3Open\",{app:e,context:t})}catch(e){const t=e.message===a.BROKER_ERRORS.fdc3Open?\"ResolverUnavailable\":e.message;throw new Error(t)}}async _getChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:\"system\",...(0,o.getUnsupportedChannelApis)()})))}async getOrCreateChannel(e){this.wire.sendAction(\"fdc3-get-or-create-channel\").catch((e=>{}));const t=(await this._getChannels()).find((t=>t.id===e));if(t)return{...t,type:\"system\",...(0,o.getUnsupportedChannelApis)()};try{const t=await this.client.joinSessionContextGroup(e);return(0,o.buildAppChannelObject)(t)}catch(e){throw console.error(e.message),new Error(o.ChannelError.CreationFailed)}}async getSystemChannels(){return this.wire.sendAction(\"fdc3-get-system-channels\").catch((e=>{})),this._getChannels()}async joinChannel(e){this.wire.sendAction(\"fdc3-join-channel\").catch((e=>{}));try{return await this.client.joinContextGroup(e)}catch(e){if(e.message===a.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup?console.error(\"The Channel you have tried to join is an App Channel. Custom Channels can only be defined by the Interop Broker through code or manifest configuration. Please use getOrCreateChannel.\"):console.error(e.message),e.message.startsWith(\"Attempting to join a context group that does not exist\"))throw new Error(o.ChannelError.NoChannelFound);throw new Error(o.ChannelError.AccessDenied)}}async getCurrentChannel(){this.wire.sendAction(\"fdc3-get-current-channel\").catch((e=>{}));const e=await this.getCurrentContextGroupInfo();return e?this.buildChannelObject(e):null}async leaveCurrentChannel(){return this.wire.sendAction(\"fdc3-leave-current-channel\").catch((e=>{})),this.client.removeFromContextGroup()}async getCurrentContextGroupInfo(){const e=await this.client.getContextGroups(),t=e.map((async e=>this.client.getAllClientsInContextGroup(e.id))),n=(await Promise.all(t)).findIndex((e=>e.some((e=>{const{uuid:t,name:n}=e;return this.wire.me.uuid===t&&this.wire.me.name===n}))));return e[n]}async buildChannelObject(e){return{...e,type:\"system\",addContextListener:(...[e,t])=>{let n,i;\"function\"==typeof e?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),n=e):(n=t,\"string\"==typeof e&&(i=e));const r=(async()=>{let e=!0;const t=await this.client.getCurrentContext(i);return this.client.addContextHandler(((i,r)=>{if(!e||(e=!1,!(0,d.default)(t,i)))return n(i,r)}),i)})();return{...r,unsubscribe:()=>r.then((e=>e.unsubscribe()))}},broadcast:this.broadcast.bind(this),getCurrentContext:async e=>{const t=await this.client.getCurrentContext(e);return void 0===t?null:t}}}},e=new WeakMap,tr}ir.PrivateChannelClient=class{constructor(e,t){this.id=t,this.client=e,this.listeners=new Map}async broadcast(e){return this.client.dispatch(\"broadcast\",{context:e})}async getCurrentContext(e){return this.client.dispatch(\"getCurrentContext\",{contextType:e})}async addContextListener(e,t){if(\"function\"!=typeof t)throw new Error(\"Non-function argument passed to the second parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.\");let n;n=e?`contextHandler:invoke-${this.id}-${e}-${ar.generateId()}`:`contextHandler:invoke-${this.id}-${ar.generateId()}`,this.client.register(n,ar.wrapContextHandler(t,n));const i={unsubscribe:await this.createContextUnsubscribeCb(n)};return this.listeners.set(n,i),await this.client.dispatch(\"contextHandlerAdded\",{handlerId:n,contextType:e}),i}createNonStandardUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch(\"nonStandardHandlerRemoved\",{handlerId:e})}}createContextUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch(\"contextHandlerRemoved\",{handlerId:e})}}onAddContextListener(e){const t=`onContextHandlerAdded:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch(\"onAddContextHandlerAdded\",{handlerId:t}),n}onDisconnect(e){const t=`onDisconnect:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch(\"onDisconnectHandlerAdded\",{handlerId:t}),n}onUnsubscribe(e){const t=`onUnsubscribe:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch(\"onUnsubscribeHandlerAdded\",{handlerId:t}),n}async cleanUpAllSubs(){Array.from(this.listeners.keys()).forEach((e=>{this.client.remove(e),this.listeners.delete(e)}))}async disconnect(){try{await this.client.dispatch(\"clientDisconnecting\"),await this.cleanUpAllSubs(),await this.client.disconnect()}catch(e){throw new Error(e.message)}}},function(e){var t=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,\"__esModule\",{value:!0}),e.getIntentResolution=e.isChannel=e.isContext=e.connectPrivateChannel=e.buildAppChannelObject=e.buildPrivateChannelObject=e.ChannelError=e.ResultError=e.UnsupportedChannelApiError=e.getUnsupportedChannelApis=void 0;const n=Hi,r=ir,o=t(i);e.getUnsupportedChannelApis=e=>({addContextListener:()=>{throw new a(\"Channel.addContextListener\",e)},broadcast:()=>{throw new a(\"Channel.broadcast\",e)},getCurrentContext:()=>{throw new a(\"Channel.getCurrentContext\",e)}});class a extends Error{constructor(e,t=\"System\"){super(e),this.message=`Calling ${e} on an instance of a ${t} Channel returned by fdc3.get${t}Channels is not supported. If you would like to use a ${t} Channel, please use fdc3.joinChannel, fdc3.addContextListener, and fdc3.broadcast instead.`}}var c,d;e.UnsupportedChannelApiError=a,function(e){e.NoResultReturned=\"NoResultReturned\",e.IntentHandlerRejected=\"IntentHandlerRejected\"}(c=e.ResultError||(e.ResultError={})),(d=e.ChannelError||(e.ChannelError={})).NoChannelFound=\"NoChannelFound\",d.AccessDenied=\"AccessDenied\",d.CreationFailed=\"CreationFailed\";e.buildPrivateChannelObject=e=>{let t=!1;const n=()=>{if(t)throw new Error(\"Private Channel Client has been disconnected from the Private Channel\")};return{id:e.id,type:\"private\",broadcast:async t=>(n(),e.broadcast(t)),getCurrentContext:async t=>(n(),e.getCurrentContext(t)),addContextListener:async(t,i)=>{n();let r=i,o=t;\"function\"==typeof t&&(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),r=t,o=null);return e.addContextListener(o,r)},onAddContextListener:t=>(n(),e.onAddContextListener(t)),disconnect:async()=>(n(),t=!0,e.disconnect()),onDisconnect:t=>(n(),e.onDisconnect(t)),onUnsubscribe:t=>(n(),e.onUnsubscribe(t))}};e.buildAppChannelObject=e=>({id:e.id,type:\"app\",broadcast:e.setContext,getCurrentContext:async t=>{const n=await e.getCurrentContext(t);return void 0===n?null:n},addContextListener:(t,n)=>{let i,r;\"function\"==typeof t?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),i=t):(i=n,\"string\"==typeof t&&(r=t));const s=(async()=>{let t=!0;const n=await e.getCurrentContext(r);return e.addContextHandler(((e,r)=>{if(!t||(t=!1,!(0,o.default)(n,e)))return i(e,r)}),r)})();return{...s,unsubscribe:()=>s.then((e=>e.unsubscribe()))}}});e.connectPrivateChannel=async t=>{try{const n=await fin.InterApplicationBus.Channel.connect(t),i=new r.PrivateChannelClient(n,t);return(0,e.buildPrivateChannelObject)(i)}catch(e){throw new Error(`Private Channel with id: ${t} doesn't exist`)}};e.isContext=e=>{if(e&&\"object\"==typeof e&&\"type\"in e){const{type:t}=e;return\"string\"==typeof t}return!1};e.isChannel=e=>{if(e&&\"object\"==typeof e&&\"type\"in e&&\"id\"in e){const{type:t,id:n}=e;return\"string\"==typeof t&&\"string\"==typeof n&&(\"app\"===t||\"private\"===t)}return!1};e.getIntentResolution=async(t,i,r,o)=>{const s=(0,n.generateId)(),a=new Promise(((e,t)=>{fin.InterApplicationBus.subscribe({uuid:\"*\"},s,(t=>{e(t)})).catch((()=>t(new Error(\"getResult is not supported in this environment\"))))})),d=r?{target:r,intentResolutionResultId:s}:{intentResolutionResultId:s},h=o?{name:o,context:i,metadata:d}:{...i,metadata:d},l=async()=>{let n=await a;if(!n||\"object\"!=typeof n)throw new Error(c.NoResultReturned);const{error:i}=n;if(i)throw new Error(c.IntentHandlerRejected);if((0,e.isChannel)(n)){const{id:i,type:r}=n;switch(r){case\"private\":n=await(0,e.connectPrivateChannel)(i);break;case\"app\":{const r=await t.joinSessionContextGroup(i);n=(0,e.buildAppChannelObject)(r);break}}}else if(!(0,e.isContext)(n))throw new Error(c.NoResultReturned);return n},u=o?await t.fireIntent(h):await t.fireIntentForContext(h);return\"object\"!=typeof u?{source:{appId:\"\",instanceId:\"\"},intent:\"\",version:\"2.0\",getResult:l}:{...u,getResult:l}}}(nr);var lr,ur,pr={};function wr(){if(ur)return Ki;ur=1;var e,t,n=s&&s.__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},i=s&&s.__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)},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ki,\"__esModule\",{value:!0}),Ki.InteropClient=void 0;const o=d,a=r(qi),c=function(){if(dr)return er;dr=1,Object.defineProperty(er,\"__esModule\",{value:!0}),er.Fdc3Module=void 0;const e=Hi,t=hr();class n extends t.FDC3ModuleBase{async open(e,t){await super._open(e,t)}addContextListener(e,t){let n;return this.wire.sendAction(\"fdc3-add-context-listener\").catch((e=>{})),\"function\"==typeof e?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),n=this.client.addContextHandler(e)):n=this.client.addContextHandler(t,null===e?void 0:e),{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}addIntentListener(e,t){this.wire.sendAction(\"fdc3-add-intent-listener\").catch((e=>{}));const n=this.client.registerIntentHandler((e=>{const{context:n,metadata:i}=e,{metadata:r}=n,o=i?.intentResolutionResultId||r?.intentResolutionResultId;o&&this.fin.InterApplicationBus.publish(o,null).catch((()=>null)),t(e.context)}),e,{fdc3Version:\"1.2\"});return{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}async raiseIntent(t,n,i){this.wire.sendAction(\"fdc3-raise-intent\").catch((e=>{}));const r=i?{name:t,context:n,metadata:{target:i}}:{name:t,context:n};try{return await this.client.fireIntent(r)}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntent?\"ResolverUnavailable\":t.message;throw new Error(n)}}async findIntent(t,n){this.wire.sendAction(\"fdc3-find-intent\").catch((e=>{}));try{return await this.client.getInfoForIntent({name:t,context:n})}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntent?\"ResolverUnavailable\":t.message;throw new Error(n)}}async findIntentsByContext(t){this.wire.sendAction(\"fdc3-find-intents-by-context\").catch((e=>{}));try{return await this.client.getInfoForIntentsByContext(t)}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntentsByContext?\"ResolverUnavailable\":t.message;throw new Error(n)}}async raiseIntentForContext(t,n){this.wire.sendAction(\"fdc3-raise-intent-for-context\").catch((e=>{}));try{return await this.client.fireIntentForContext({...t,metadata:{target:n}})}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntentForContext?\"ResolverUnavailable\":t.message;throw new Error(n)}}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}getInfo(){return this.wire.sendAction(\"fdc3-get-info\").catch((e=>{})),{providerVersion:this.wire.environment.getAdapterVersionSync(),provider:`openfin-${this.wire.me.uuid}`,fdc3Version:\"1.2\"}}}return er.Fdc3Module=n,er}(),h=function(){if(lr)return pr;lr=1,Object.defineProperty(pr,\"__esModule\",{value:!0}),pr.Fdc3Module2=void 0;const e=hr(),t=Hi,n=wr(),i=nr,r=ir;class o extends e.FDC3ModuleBase{async open(e,t){return\"string\"==typeof e&&console.warn(\"Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).\"),super._open(e,t)}async findInstances(e){this.wire.sendAction(\"fdc3-find-instances\").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,\"fdc3FindInstances\",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3FindInstances?\"ResolverUnavailable\":e.message;throw new Error(n)}}async getAppMetadata(e){this.wire.sendAction(\"fdc3-get-app-metadata\").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,\"fdc3GetAppMetadata\",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3GetAppMetadata?\"ResolverUnavailable\":e.message;throw new Error(n)}}async addContextListener(e,t){this.wire.sendAction(\"fdc3-add-context-listener\").catch((e=>{}));const n=e=>t=>{const{contextMetadata:n,...i}=t,r=n?[{...i},n]:[t,null];e(...r)};let i=t,r=n(i);return\"function\"==typeof e?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),i=e,r=n(i),this.client.addContextHandler(r)):this.client.addContextHandler(r,null===e?void 0:e)}async findIntent(e,n,i){this.wire.sendAction(\"fdc3-find-intent\").catch((e=>{}));try{return await this.client.getInfoForIntent({name:e,context:n,metadata:{resultType:i}})}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntent?\"ResolverUnavailable\":e.message;throw new Error(n)}}async findIntentsByContext(e,i){this.wire.sendAction(\"fdc3-find-intents-by-context\").catch((e=>{}));const r=i?{context:e,metadata:{resultType:i}}:e;try{return await n.InteropClient.ferryFdc3Call(this.client,\"fdc3v2FindIntentsByContext\",r)}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntentsByContext?\"ResolverUnavailable\":e.message;throw new Error(n)}}async raiseIntent(e,n,r){this.wire.sendAction(\"fdc3-raise-intent\").catch((e=>{}));try{return\"string\"==typeof r&&console.warn(\"Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).\"),(0,i.getIntentResolution)(this.client,n,r,e)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?\"ResolverUnavailable\":e.message;throw new Error(n)}}async raiseIntentForContext(e,n){this.wire.sendAction(\"fdc3-raise-intent-for-context\").catch((e=>{}));try{return\"string\"==typeof n&&console.warn(\"Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).\"),(0,i.getIntentResolution)(this.client,e,n)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?\"ResolverUnavailable\":e.message;throw new Error(n)}}async addIntentListener(e,t){if(this.wire.sendAction(\"fdc3-add-intent-listener\").catch((e=>{})),\"string\"!=typeof e)throw new Error(\"First argument must be an Intent name\");return this.client.registerIntentHandler((async e=>{let n,i;const{context:r,metadata:o}=e,{contextMetadata:s,metadata:a,...c}=r,d=o?.intentResolutionResultId||a?.intentResolutionResultId;try{const e=a?{metadata:a,...c}:{...c};n=await t(e,s),i=n}catch(e){n=e,i={error:!0}}if(d&&this.fin.InterApplicationBus.publish(d,i).catch((()=>null)),n instanceof Error)throw new Error(n.message);return n}),e,{fdc3Version:\"2.0\"})}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}async createPrivateChannel(){const e=(0,t.generateId)();await n.InteropClient.ferryFdc3Call(this.client,\"createPrivateChannelProvider\",{channelId:e});const o=await this.fin.InterApplicationBus.Channel.connect(e),s=new r.PrivateChannelClient(o,e);return(0,i.buildPrivateChannelObject)(s)}async getUserChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:\"user\",...(0,i.getUnsupportedChannelApis)(\"User\")})))}async getSystemChannels(){return console.warn(\"This API has been deprecated. Please use fdc3.getUserChannels instead.\"),super.getSystemChannels()}async joinUserChannel(e){return super.joinChannel(e)}async joinChannel(e){return console.warn(\"This API has been deprecated. Please use fdc3.joinUserChannel instead.\"),super.joinChannel(e)}async getCurrentChannel(){const e=await super.getCurrentChannel();return e?{...e,type:\"user\",broadcast:this.broadcast.bind(this)}:null}async getInfo(){return n.InteropClient.ferryFdc3Call(this.client,\"fdc3v2GetInfo\",{fdc3Version:\"2.0\"})}}return pr.Fdc3Module2=o,pr}(),l=Hi;let u=class extends o.Base{constructor(i,r){super(i),e.set(this,void 0),t.set(this,void 0),n(this,t,new Map,\"f\"),n(this,e,r,\"f\")}async setContext(t){this.wire.sendAction(\"interop-client-set-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"setContext\",{context:t})}async addContextHandler(t,n){if(this.wire.sendAction(\"interop-client-add-context-handler\").catch((e=>{})),\"function\"!=typeof t)throw new Error(\"Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.\");const r=await i(this,e,\"f\");let o;o=n?`invokeContextHandler-${n}-${(0,l.generateId)()}`:\"invokeContextHandler\";const s=(0,l.wrapContextHandler)(t,o);return r.register(o,s),await r.dispatch(\"contextHandlerRegistered\",{handlerId:o,contextType:n}),{unsubscribe:async()=>{r.remove(o),await r.dispatch(\"removeContextHandler\",{handlerId:o})}}}async getContextGroups(){this.wire.sendAction(\"interop-client-get-context-groups\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getContextGroups\")}async joinContextGroup(t,n){this.wire.sendAction(\"interop-client-join-context-group\").catch((e=>{}));const r=await i(this,e,\"f\");if(!t)throw new Error(\"No contextGroupId specified for joinContextGroup.\");return r.dispatch(\"joinContextGroup\",{contextGroupId:t,target:n})}async removeFromContextGroup(t){this.wire.sendAction(\"interop-client-remove-from-context-group\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"removeFromContextGroup\",{target:t})}async getAllClientsInContextGroup(t){this.wire.sendAction(\"interop-client-get-all-clients-in-context-group\").catch((e=>{}));const n=await i(this,e,\"f\");if(!t)throw new Error(\"No contextGroupId specified for getAllClientsInContextGroup.\");return n.dispatch(\"getAllClientsInContextGroup\",{contextGroupId:t})}async getInfoForContextGroup(t){this.wire.sendAction(\"interop-client-get-info-for-context-group\").catch((e=>{}));const n=await i(this,e,\"f\");if(!t)throw new Error(\"No contextGroupId specified for getInfoForContextGroup.\");return n.dispatch(\"getInfoForContextGroup\",{contextGroupId:t})}async fireIntent(t){this.wire.sendAction(\"interop-client-fire-intent\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"fireIntent\",t)}async registerIntentHandler(t,n,r){this.wire.sendAction(\"interop-client-register-intent-handler\").catch((e=>{}));const o=await i(this,e,\"f\"),s=`intent-handler-${n}`,a=(0,l.wrapIntentHandler)(t,s);try{await o.register(s,a),await o.dispatch(\"intentHandlerRegistered\",{handlerId:s,...r})}catch(e){throw new Error(\"Unable to register intent handler\")}return{unsubscribe:async()=>{o.remove(s)}}}async getCurrentContext(t){this.wire.sendAction(\"interop-client-get-current-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getCurrentContext\",{contextType:t})}async getInfoForIntent(t){this.wire.sendAction(\"interop-client-get-info-for-intent\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getInfoForIntent\",t)}async getInfoForIntentsByContext(t){this.wire.sendAction(\"interop-client-get-info-for-intents-by-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getInfoForIntentsByContext\",t)}async fireIntentForContext(t){this.wire.sendAction(\"interop-client-fire-intent-for-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"fireIntentForContext\",t)}async joinSessionContextGroup(n){try{const r=i(this,t,\"f\").get(n);if(r)return r.getUserInstance();const o=await i(this,e,\"f\"),{hasConflict:s}=await o.dispatch(\"sessionContextGroup:createIfNeeded\",{sessionContextGroupId:n});s&&console.warn(`A (non-session) context group with the name \"${n}\" already exists. If you are trying to join a Context Group, call joinContextGroup instead.`);const c=new a.default(this.wire,i(this,e,\"f\"),n);return i(this,t,\"f\").set(n,c),c.getUserInstance()}catch(e){throw console.error(`Error thrown trying to create Session Context Group with id \"${n}\": ${e}`),e}}async onDisconnection(t){this.wire.sendAction(\"interop-client-add-ondisconnection-listener\").catch((e=>{}));return(await i(this,e,\"f\")).onDisconnection((e=>{const{uuid:n}=e;t({type:\"interop-broker\",topic:\"disconnected\",brokerName:n})}))}getFDC3Sync(e){switch(e){case\"1.2\":return new c.Fdc3Module((()=>this),this.wire);case\"2.0\":return new h.Fdc3Module2((()=>this),this.wire);default:throw new Error(`Invalid FDC3 version provided: ${e}. Must be '1.2' or '2.0'`)}}async getFDC3(e){return this.getFDC3Sync(e)}static async ferryFdc3Call(t,n,r){return(await i(t,e,\"f\")).dispatch(n,r||null)}};return Ki.InteropClient=u,e=new WeakMap,t=new WeakMap,Ki}var yr,fr,gr,mr={};function vr(){if(yr)return mr;yr=1,Object.defineProperty(mr,\"__esModule\",{value:!0}),mr.overrideCheck=mr.checkFDC32Overrides=mr.getDefaultViewFdc3VersionFromAppInfo=void 0;const e=Vi();function t(t){return[\"fdc3HandleFindInstances\",\"handleInfoForIntent\",\"handleInfoForIntentsByContext\",\"fdc3HandleGetAppMetadata\",\"fdc3HandleGetInfo\",\"fdc3HandleOpen\",\"handleFiredIntent\",\"handleFiredIntentForContext\"].filter((n=>t[n]===e.InteropBroker.prototype[n]))}return mr.getDefaultViewFdc3VersionFromAppInfo=function({manifest:e,initialOptions:t}){const n=e?.platform?.defaultViewOptions?.fdc3InteropApi??t.defaultViewOptions?.fdc3InteropApi;return[\"1.2\",\"2.0\"].includes(n??\"\")?n:void 0},mr.checkFDC32Overrides=t,mr.overrideCheck=function(e,n){if(n&&\"2.0\"===n){const n=t(e);n.length>0&&console.warn(`WARNING: FDC3 2.0 has been set as a default option for Views in this Platform, but the required InteropBroker APIs for FDC3 2.0 compliance have not all been overridden.\\nThe following APIs need to be overridden:\\n${n.join(\"\\n\")}`)}},mr}function Cr(){return gr||(gr=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),i=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),i(function(){if(fr)return Ti;fr=1;var e=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ti,\"__esModule\",{value:!0}),Ti.InteropModule=void 0;const t=e(n),i=$i,r=d,o=Vi(),a=wr(),c=vr(),h=Tn,l=e=>new e,u=\"You have attempted to use or modify InteropBroker parameters, which is not allowed. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.\";class p extends r.Base{async init(e,n=l){this.wire.sendAction(\"interop-init\").catch((()=>{}));const r=await this.wire.environment.getInteropInfo(this.wire.getFin()),s=(0,i.createUnusableObject)(u),a=(0,i.createWarningObject)(u,(0,t.default)(r)),d=async()=>{throw new Error(u)},p=o.InteropBroker.createClosedConstructor(this.wire,(()=>this.fin.InterApplicationBus.Channel.create(`interop-broker-${e}`)),r);let w;return w=Array.isArray(n)?new((0,h.overrideFromComposables)(...n)(p))(s,d,a):await n(p,s,d,a),(0,c.overrideCheck)(w,r.fdc3Version),w}connectSync(e,t){return this.wire.sendAction(\"interop-connect-sync\").catch((()=>{})),new a.InteropClient(this.wire,this.wire.environment.whenReady().then((()=>this.fin.InterApplicationBus.Channel.connect(`interop-broker-${e}`,{payload:t}))))}}return Ti.InteropModule=p,Ti}(),e),i(wr(),e),i(Vi(),e)}(Li)),Li}var br={},Ir={},Er={},xr={};Object.defineProperty(xr,\"__esModule\",{value:!0}),xr.getSnapshotSourceChannelName=void 0;xr.getSnapshotSourceChannelName=e=>`snapshot-source-provider-${e.uuid}`;var Ar,Pr,Mr,_r,Or,Sr=s&&s.__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},Rr=s&&s.__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)};Object.defineProperty(Er,\"__esModule\",{value:!0}),Er.SnapshotSource=void 0;const Fr=d,jr=xr,kr=new Map;class Lr extends Fr.Base{constructor(e,t){super(e),Ar.set(this,void 0),Pr.set(this,(()=>(kr.has(this.identity.uuid)||kr.set(this.identity.uuid,{eventFired:null,clientPromise:null}),kr.get(this.identity.uuid)))),Mr.set(this,(()=>(Rr(this,Pr,\"f\").call(this).clientPromise||(Rr(this,Pr,\"f\").call(this).clientPromise=Rr(this,_r,\"f\").call(this)),Rr(this,Pr,\"f\").call(this).clientPromise))),_r.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);try{Rr(this,Pr,\"f\").call(this).eventFired||await Rr(this,Or,\"f\").call(this);const t=await this.fin.InterApplicationBus.Channel.connect(e,{wait:!1});return t.onDisconnection((()=>{Rr(this,Pr,\"f\").call(this).clientPromise=null,Rr(this,Pr,\"f\").call(this).eventFired=null})),t}catch(e){throw Rr(this,Pr,\"f\").call(this).clientPromise=null,new Error(\"The targeted SnapshotSource is not currently initialized. Await this object's ready() method.\")}})),Or.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);let t,n;const i=new Promise(((e,i)=>{t=e,n=i}));Rr(this,Pr,\"f\").call(this).eventFired=i;const r=async i=>{try{i.channelName===e&&(t(),await this.fin.InterApplicationBus.Channel.removeListener(\"connected\",r))}catch(e){n(e)}};await this.fin.InterApplicationBus.Channel.on(\"connected\",r)})),Sr(this,Ar,t,\"f\")}get identity(){return Rr(this,Ar,\"f\")}async ready(){this.wire.sendAction(\"snapshot-source-ready\").catch((e=>{}));try{await Rr(this,Mr,\"f\").call(this)}catch(e){await Rr(this,Pr,\"f\").call(this).eventFired}}async getSnapshot(){this.wire.sendAction(\"snapshot-source-get-snapshot\").catch((e=>{}));const e=await Rr(this,Mr,\"f\").call(this),t=await e.dispatch(\"get-snapshot\");return(await t).snapshot}async applySnapshot(e){this.wire.sendAction(\"snapshot-source-apply-snapshot\").catch((e=>{}));return(await Rr(this,Mr,\"f\").call(this)).dispatch(\"apply-snapshot\",{snapshot:e})}}Er.SnapshotSource=Lr,Ar=new WeakMap,Pr=new WeakMap,Mr=new WeakMap,_r=new WeakMap,Or=new WeakMap,Object.defineProperty(Ir,\"__esModule\",{value:!0}),Ir.SnapshotSourceModule=void 0;const Tr=d,$r=Er,Br=xr;class Gr extends Tr.Base{async init(e){if(this.wire.sendAction(\"snapshot-source-init\").catch((e=>{})),\"object\"!=typeof e||\"function\"!=typeof e.getSnapshot||\"function\"!=typeof e.applySnapshot)throw new Error(\"you must pass in a valid SnapshotProvider\");const t=await this.fin.InterApplicationBus.Channel.create((0,Br.getSnapshotSourceChannelName)(this.fin.me));t.register(\"get-snapshot\",(async()=>({snapshot:await e.getSnapshot()}))),t.register(\"apply-snapshot\",(({snapshot:t})=>e.applySnapshot(t)))}wrapSync(e){return this.wire.sendAction(\"snapshot-source-wrap-sync\").catch((e=>{})),new $r.SnapshotSource(this.wire,e)}async wrap(e){return this.wire.sendAction(\"snapshot-source-wrap\").catch((e=>{})),this.wrapSync(e)}}Ir.SnapshotSourceModule=Gr,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Ir,e),n(Er,e)}(br),Object.defineProperty(a,\"__esModule\",{value:!0});var Wr=a.Fin=void 0;const Hr=t,Nr=c,Dr=ie(),Ur=Z(),Vr=de,zr=en,Kr=rn,qr=un,Jr=bn,Yr=J(),Zr=An,Qr=ki,Xr=Cr(),eo=br;class to extends Hr.EventEmitter{constructor(e){super(),this.wire=e,this.System=new Nr.System(e),this.Window=new Dr._WindowModule(e),this.Application=new Ur.ApplicationModule(e),this.InterApplicationBus=new Vr.InterApplicationBus(e),this.Clipboard=new zr.Clipboard(e),this.ExternalApplication=new Kr.ExternalApplicationModule(e),this.Frame=new qr._FrameModule(e),this.GlobalHotkey=new Jr.GlobalHotkey(e),this.Platform=new Zr.PlatformModule(e,this.InterApplicationBus.Channel),this.View=new Yr.ViewModule(e),this.Interop=new Xr.InteropModule(e),this.SnapshotSource=new eo.SnapshotSourceModule(e),e.registerFin(this),this.me=(0,Qr.getMe)(e),e.on(\"disconnected\",(()=>{this.emit(\"disconnected\")}))}}Wr=a.Fin=to;var no={},io={};function ro(e){return\"string\"==typeof e.manifestUrl}function oo(e){return ao(e)&&\"string\"==typeof e.address}function so(e){return oo(e)&&\"string\"==typeof e.token}function ao(e){return\"string\"==typeof e.uuid}function co(e){return e.runtime&&\"string\"==typeof e.runtime.version}function ho(e){return ao(e)&&co(e)}Object.defineProperty(io,\"__esModule\",{value:!0}),io.isInternalConnectConfig=io.isPortDiscoveryConfig=io.isNewConnectConfig=io.isConfigWithReceiver=io.isRemoteConfig=io.isExistingConnectConfig=io.isExternalConfig=void 0,io.isExternalConfig=ro,io.isExistingConnectConfig=oo,io.isRemoteConfig=so,io.isConfigWithReceiver=function(e){return\"object\"==typeof e.receiver&&so({...e,address:\"\"})},io.isNewConnectConfig=ho,io.isPortDiscoveryConfig=function(e){return ro(e)&&co(e)||ho(e)},io.isInternalConnectConfig=function(e){return oo(e)||ho(e)};var lo={},uo={};Object.defineProperty(uo,\"__esModule\",{value:!0}),uo.EmitterMap=void 0;const po=t;function wo(e){return Buffer.from(e).toString(\"base64\")}uo.EmitterMap=class{constructor(){this.storage=new Map}hashKeys(e){return e.map(wo).join(\"/\")}getOrCreate(e){const t=this.hashKeys(e);return this.storage.has(t)||this.storage.set(t,new po.EventEmitter),this.storage.get(t)}has(e){return this.storage.has(this.hashKeys(e))}delete(e){const t=this.hashKeys(e);return this.storage.delete(t)}},Object.defineProperty(lo,\"__esModule\",{value:!0});const yo=uo;class fo extends yo.EmitterMap{constructor(){super(...arguments),this.dispatchEvent=e=>{if(function(e){return\"process-desktop-event\"===e.action}(e)){const{payload:t}=e,n=function(e){const{topic:t}=e;if(\"frame\"===t||\"window\"===t||\"view\"===t){const{uuid:n,name:i}=e;return[t,n,i]}if(\"application\"===t){const{uuid:n}=e;return[t,n]}return[t]}(t);if(this.has(n))return this.getOrCreate(n).emit(t.type,t),!0}return!1}}}lo.default=fo;var go,mo,vo=s&&s.__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},Co=s&&s.__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)},bo=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(no,\"__esModule\",{value:!0});var Io=no.Transport=void 0;const Eo=t,xo=io,Ao=g,Po=bo(lo),Mo=ki,_o=ke;class Oo extends Eo.EventEmitter{constructor(e,t,n){super(),this.wireListeners=new Map,this.topicRefMap=new Map,this.eventAggregator=new Po.default,this.messageHandlers=[this.eventAggregator.dispatchEvent],go.set(this,void 0),mo.set(this,void 0),this.connectSync=()=>{Co(this,go,\"f\").connectSync()},this.getPort=()=>Co(this,go,\"f\").getPort(),vo(this,go,new e(this.onmessage.bind(this)),\"f\"),this.environment=t,this.sendRaw=Co(this,go,\"f\").send.bind(Co(this,go,\"f\")),this.registerMessageHandler(this.handleMessage.bind(this)),Co(this,go,\"f\").on(\"disconnected\",(()=>{for(const[,{handleNack:e}]of this.wireListeners)e({reason:\"Remote connection has closed\"});this.wireListeners.clear(),this.emit(\"disconnected\")}));const{uuid:i,name:r}=n,o=this.environment.getCurrentEntityType();this.me=(0,Mo.getBaseMe)(o,i,r)}getFin(){if(!Co(this,mo,\"f\"))throw new Error(\"No Fin object registered for this transport\");return Co(this,mo,\"f\")}registerFin(e){if(Co(this,mo,\"f\"))throw new Error(\"Fin object has already been registered for this transport\");vo(this,mo,e,\"f\")}shutdown(){return Co(this,go,\"f\").shutdown()}async connect(e){if((0,xo.isConfigWithReceiver)(e))return await Co(this,go,\"f\").connect(e.receiver),this.authorize(e);if((0,xo.isRemoteConfig)(e))return this.connectRemote(e);if((0,xo.isExistingConnectConfig)(e))return this.connectByPort(e);if((0,xo.isNewConnectConfig)(e)){const t=await this.environment.retrievePort(e);return this.connectByPort({...e,address:`ws://localhost:${t}`})}}async connectRemote(e){return await Co(this,go,\"f\").connect(new(this.environment.getWsConstructor())(e.address)),this.authorize(e)}async connectByPort(e){const{address:t,uuid:n}=e,i={...e,type:\"file-token\"},r=Co(this,go,\"f\");await r.connect(new(this.environment.getWsConstructor())(e.address));const o=await this.sendAction(\"request-external-authorization\",{uuid:n,type:\"file-token\"},!0);if(\"external-authorization-response\"!==o.action)throw new Ao.UnexpectedActionError(o.action);return await this.environment.writeToken(o.payload.file,o.payload.token),this.authorize(i)}async authorize(e){const t=await this.sendAction(\"request-authorization\",e,!0);if(\"authorization-response\"!==t.action)throw new Ao.UnexpectedActionError(t.action);if(!0!==t.payload.success)throw new Ao.RuntimeError(t.payload)}sendAction(e,t={},n=!1){let i=()=>{};const r=Ao.RuntimeError.getCallSite(1),o=this.environment.getNextMessageId(),s=new Promise(((s,a)=>{i=a;const c={action:e,payload:t,messageId:o},d=Co(this,go,\"f\");return this.addWireListener(o,s,(e=>this.nackHandler(e,a,r)),n),d.send(c).catch(a)}));return Object.assign(s,{cancel:i,messageId:o})}nackHandler(e,t,n){t(\"string\"==typeof e?e:new Ao.RuntimeError(e,n))}ferryAction(e){return new Promise(((t,n)=>{const i=this.environment.getNextMessageId();e.messageId=i;const r=e=>{t(e.payload)};return Co(this,go,\"f\").send(e).then((()=>this.addWireListener(i,r,(e=>this.nackHandler(e,n)),!1))).catch(n)}))}registerMessageHandler(e){this.messageHandlers.push(e)}addWireListener(e,t,n,i){i?this.uncorrelatedListener=t:this.wireListeners.has(e)?n({reason:\"Duplicate handler id\",error:(0,_o.errorToPOJO)(new Ao.DuplicateCorrelationError(String(e)))}):this.wireListeners.set(e,{resolve:t,handleNack:n})}onmessage(e){for(const t of this.messageHandlers)t.call(null,e)}handleMessage(e){const t=e.correlationId||NaN;if(\"correlationId\"in e){if(!this.wireListeners.has(t))return!1;{const{resolve:n,handleNack:i}=this.wireListeners.get(t);\"ack\"!==e.action?i({reason:\"Did not receive ack action\",error:(0,_o.errorToPOJO)(new Ao.NoAckError(e.action))}):\"payload\"in e?e.payload.success?n.call(null,e):i(e.payload):\"string\"==typeof e.reason?i(e):(console.warn(\"Received invalid response from core\",e),i({reason:\"invalid response shape\"})),this.wireListeners.delete(t)}}else this.uncorrelatedListener&&this.uncorrelatedListener.call(null,e),this.uncorrelatedListener=()=>{};return!0}}Io=no.Transport=Oo,go=new WeakMap,mo=new WeakMap;const So=(...e)=>({log:(...t)=>console.debug(`[${(new Date).toISOString()}]`,...(e=>e.map((e=>`[${e}]`)))(e),...t),getLogger:(...t)=>So(...e,...t)}),Ro=So(\"@openfin/core-web/client\");function Fo(e,t){if(!function(e){return\"string\"==typeof e}(e))throw new Error(`Property ${t} has invalid type. Expected string, got ${typeof e}.`)}const jo=\"web-broker-ports-ready\",ko=Ro.getLogger(\"get-web-interop-ports\");function Lo(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)}function To(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}\"function\"==typeof SuppressedError&&SuppressedError;const $o=e=>{var n,i,r;return r=class extends t.EventEmitter{constructor(t){super(),n.set(this,void 0),i.set(this,!1),this.connectSync=()=>{Lo(this,i,\"f\")||(e.addEventListener(\"message\",(e=>{e.data?.topic?.startsWith(\"wire-message\")&&e.data.message&&Lo(this,n,\"f\").call(this,{...JSON.parse(e.data.message),ports:e.ports})})),e.start())},this.connect=async()=>{this.connectSync()},this.send=t=>(e.postMessage({topic:\"wire-message\",message:JSON.stringify(t)}),Promise.resolve()),this.shutdown=async()=>{e.close()},To(this,n,t,\"f\")}getPort(){return e}},n=new WeakMap,i=new WeakMap,r};var Bo={},Go={};Object.defineProperty(Go,\"__esModule\",{value:!0}),Go.BaseEnvironment=void 0;const Wo=vr();Go.BaseEnvironment=class{async getViewWindowIdentity(e,t){const{identity:n}=await e.View.wrapSync(t).getCurrentWindow();return n}async getInteropInfo(e){const t=await e.Application.getCurrentSync().getInfo().catch((()=>null)),n=t?.initialOptions?.interopBrokerConfiguration??{};return{fdc3Version:t?(0,Wo.getDefaultViewFdc3VersionFromAppInfo)(t):void 0,...n,fdc3Info:{providerVersion:await e.System.getVersion(),provider:\"OpenFin\"}}}},Object.defineProperty(Bo,\"__esModule\",{value:!0});var Ho=Bo.BrowserEnvironment=void 0;const No=Go;class Do extends No.BaseEnvironment{constructor(){super(...arguments),this.type=\"other\",this.getRandomId=()=>{const e=new Uint32Array(1);return window.crypto.getRandomValues(e)[0].toString(32)}}getAdapterVersionSync(){return\"\"}observeBounds(e,t){throw new Error(\"Method not implemented.\")}layoutAllowedInContext(e){return!1}initLayoutManager(e,t,n){throw new Error(\"Method not implemented.\")}applyLayoutSnapshot(e,t,n){throw new Error(\"Method not implemented.\")}createLayout(e,t){throw new Error(\"Method not implemented.\")}destroyLayout(e,t){throw new Error(\"Method not implemented.\")}resolveLayout(e,t){throw new Error(\"Method not implemented.\")}initPlatform(...e){throw new Error(\"Method not implemented.\")}writeToken(e,t){return Promise.resolve(\"\")}retrievePort(e){throw new Error(\"Method not implemented.\")}getNextMessageId(){return this.getRandomId()}createChildContent(e){throw new Error(\"Method not implemented.\")}getWebWindow(e){throw new Error(\"Method not implemented.\")}getCurrentEntityIdentity(){throw new Error(\"Method not implemented.\")}getCurrentEntityType(){return\"external connection\"}raiseEvent(e,t){throw new Error(\"Method not implemented.\")}getUrl(){return location.href}getDefaultChannelOptions(){return{create:{},connect:{}}}getRtcPeer(){return new RTCPeerConnection}getWsConstructor(){return WebSocket}whenReady(){return Promise.resolve()}}Ho=Bo.BrowserEnvironment=Do;const Uo=e=>\"platform\"in e&&void 0!==e.platform;var Vo,zo;class Ko extends Ho{constructor(e){super(),this.connectConfig=e,Vo.set(this,void 0),zo.set(this,new W((async()=>Promise.resolve().then((function(){return require(\"./main-b14f67c9.js\")}))))),Uo(e)&&this.validatePlatformOptions(e)}getAdapterVersionSync(){return\"0.39.21\"}validatePlatformOptions({platform:e}){if(!(\"layoutSnapshot\"in e))throw new Error(\"Platform options are missing layoutSnapshot. Please provide a layoutSnapshot in the platform options.\");if(\"windows\"in e||\"windows\"in e.layoutSnapshot)throw new Error(\"It appears you tried to call connect() with a snapshot object from an OpenFin desktop environment. Note that connect() expects to be called with a platform property with this structure: { platform: { layoutSnapshot } }. To get a layoutSnapshot of the expected structure, use fin.Platform.Layout.getCurrentLayoutManagerSync().getLayoutSnapshot() in v34+ in your desktop environment.\");const{layouts:t}=e.layoutSnapshot;Object.entries(t).map((([e,t])=>{if(\"object\"!=typeof t||null===t)throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must be an object.`);if(!(\"content\"in t))throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must contain a 'content' property.`)}))}async getInteropInfo(e){return{...{contextGroups:void 0,logging:{beforeAction:{enabled:!1},afterAction:{enabled:!1}}},fdc3Version:void 0,fdc3Info:{providerVersion:\"0.39.21\",provider:\"OpenFin Web\"}}}layoutAllowedInContext(e){return!0}async initLayoutManager(e,t,n){if(Lo(this,Vo,\"f\"))throw new Error(\"Layout already initialized.\");if(!Uo(this.connectConfig))throw new Error(\"Platform options are missing from connection config.\");const{WebLayoutEntryPoint:i}=await Lo(this,zo,\"f\").getValue();return To(this,Vo,new i(this.connectConfig),\"f\"),await Lo(this,Vo,\"f\").initLayoutManager(e,t,n)}async applyLayoutSnapshot(e,t,n){Lo(this,Vo,\"f\")?.applyLayoutSnapshot(e,t,n)}async createLayout(e,t){return Lo(this,Vo,\"f\")?.createLayout(e,t)}async destroyLayout(e,t){return Lo(this,Vo,\"f\")?.destroyLayout(e,t)}async getViewWindowIdentity(e,t){return Promise.resolve({uuid:t.uuid,name:t.uuid})}}Vo=new WeakMap,zo=new WeakMap;const qo=()=>{const e=((e,t)=>{const n=new RegExp(`^${t}<(?.*)>$`).exec(e)?.groups?.meta;if(n)try{return JSON.parse(atob(n))}catch(e){throw new Error(`Failed to decode JSON from ${n}.`)}})(window.name,\"of-frame\");if(e)try{const{name:t,uuid:n,brokerUrl:i,providerId:r,contextGroup:o}=e;return Fo(i,\"brokerUrl\"),Fo(n,\"uuid\"),Fo(t,\"name\"),{identity:{name:t,uuid:n},brokerUrl:i,interopConfig:{providerId:r,currentContextGroup:o}}}catch(e){throw new Error(`Unexpected error occurred when inferring platform information: ${e.stack}`)}},Jo=()=>{const e=r.v4();return{uuid:e,name:e}},Yo=async e=>{if(\"enabled\"===e.connectionInheritance){const t=await(async e=>{const t=qo();if(t){const{validateOptions:n=(()=>!0)}=e,{identity:i,...r}=t;if(!await n(r))throw new Error(\"Parent options were rejected by validateOptions.\");return t}})(e);if(t)return t}if(!e.options){const t=\"enabled\"===e.connectionInheritance?\"Broker URL was not specified nor provided by a platform container.\":\"Connection inheritance is disabled but no options were provided.\";throw new Error(t)}return{...e.options,identity:Jo()}};exports.__classPrivateFieldGet=Lo,exports.__classPrivateFieldSet=To,exports.apiExposer=Gn,exports.commonjsGlobal=s,exports.connect=async t=>{try{Ro.log(\"Establishing connection\",t);const{brokerUrl:n,identity:i,timeout:r,interopConfig:s}=await Yo(t),{workerPort:a,iframeBrokerPort:c}=await(async(e,t,n)=>{const{origin:i}=new URL(e),r=document.createElement(\"IFRAME\");let s;r.style.display=\"none\";try{return await new Promise(((a,c)=>{const d=e=>{if(e.source===r.contentWindow&&e.data?.topic===`ack-${jo}`){if(e.origin!==i)c(new Error(`Broker redirected to unexpected origin ${e.origin}, expected ${i}.`));else if(e.data.success){const[t,n]=e.ports;a({iframeBrokerPort:t,workerPort:n})}else c(new m(e.data));window.removeEventListener(\"message\",d),clearTimeout(s)}};window.addEventListener(\"message\",d),ko.log(`Connecting to broker ${e}`),r.setAttribute(\"src\",e),r.setAttribute(\"name\",o(t,\"of-broker\")),document.body.appendChild(r),ko.log(\"Iframe loaded, awaiting init message from iframe\"),n&&(s=setTimeout((()=>{window.removeEventListener(\"message\",d),document.body.removeChild(r),c(new Error(\"Worker did not initialize in time\"))}),n))}))}catch(e){throw new Error(`Failed to initialise Fin Web Client. ${e.message}`,{cause:e})}})(n,i,r);Ro.log(\"Successfully established connection to shared worker\");const d={entityType:\"external connection\",...i};a.start(),c.start();const h=((t,n,i)=>{const r=$o(n),o=new Ko(t),s=new Io(r,o,i);return s.connectSync(),window.Buffer=e.Buffer,new Wr(s)})(t,a,d);return s?.providerId&&(h.me.interop=h.Interop.connectSync(s.providerId),s?.currentContextGroup&&h.me.interop.joinContextGroup(s.currentContextGroup).catch((e=>{console.warn(`Error joining specified context group: ${s?.currentContextGroup}, continuing`,e)}))),{...h,me:{...h.me,identity:{uuid:h.me.uuid,name:h.me.name}}}}catch(e){throw new Error(`An error occured during web-interop connection: ${e.message}`)}},exports.decorators=Nn,exports.encodeOptions=o,exports.layout_constants=ai,exports.lazy=G;\n","\"use strict\";var t=require(\"./main-8cad4070.js\"),e=require(\"uuid\");require(\"buffer/\"),require(\"events\"),require(\"lodash/cloneDeep\"),require(\"lodash/isEqual\");var i={},n={};Object.defineProperty(n,\"__esModule\",{value:!0}),n.mapValuesAsync=n.mapEntriesAsync=void 0;const o=(t,[e,i])=>({...t,[e]:i});async function s(t,e){return(await Promise.all(e.map((async([e,i])=>[e,await t(i,e)])))).reduce(o,{})}n.mapEntriesAsync=s,n.mapValuesAsync=async function(t,e){let i;return i=e instanceof Map?[...e.entries()]:Object.entries(e),s(t,i)};var r,a,l,h,d=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldSet||function(t,e,i,n,o){if(\"m\"===n)throw new TypeError(\"Private method is not writable\");if(\"a\"===n&&!o)throw new TypeError(\"Private accessor was defined without a setter\");if(\"function\"==typeof e?t!==e||!o:!e.has(t))throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");return\"a\"===n?o.call(t,i):o?o.value=i:e.set(t,i),i},c=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldGet||function(t,e,i,n){if(\"a\"===i&&!n)throw new TypeError(\"Private accessor was defined without a getter\");if(\"function\"==typeof e?t!==e||!n:!e.has(t))throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");return\"m\"===i?n:\"a\"===i?n.call(t):n?n.value:e.get(t)};Object.defineProperty(i,\"__esModule\",{value:!0});var m=i.DefaultLayoutManager=void 0;const u=n;class p{constructor(t){a.set(this,void 0),l.set(this,new Map),d(this,a,t,\"f\")}size(){return c(this,l,\"f\").size}async applyLayoutSnapshot({layouts:t}){if(Object.keys(t).length>1)throw new Error(\"[LayoutManager] Tried to call applyLayoutSnapshot with more than 1 layout. When implementing multiple layouts via overridden LayoutManager class, you must override and fully implement the applyLayoutSnapshot method without calling super.applyLayoutSnapshot().\");const[[e,i]]=Object.entries(t);await p.createLayout(this,{layoutName:e,layout:i})}async showLayout({layoutName:t}){}async getLayoutSnapshot(){return{layouts:await(0,u.mapValuesAsync)((t=>t.getFrameSnapshot()),c(this,l,\"f\"))}}async removeLayout({layoutName:t}){}getLayoutIdentityForView(t){const e=[...c(this,l,\"f\").values()].find((e=>e.getCurrentViews().some((e=>e.name===t.name&&e.uuid===t.uuid))));return e?.identity??void 0}isLayoutVisible({layoutName:t}){return c(p,r,\"m\",h).call(p,this,t).isVisible()}resolveLayoutIdentity(t){if(t&&\"layoutName\"in t)return t;const e=[...c(this,l,\"f\").values()];if(1===e.length)return e[0].identity;const i=e.find((t=>t.isVisible()));return i?.identity??void 0}static async resolveLayout(t,e){const i=t.resolveLayoutIdentity(e);if(void 0===i||!(\"layoutName\"in i))throw new Error(\"[layout-manager] resolveLayout: Could not resolve the layout identity. Make sure you include 'layoutName' in the identity object.\");return c(p,r,\"m\",h).call(p,t,i.layoutName)}static async handleSharedView(t,e,i){await(0,u.mapValuesAsync)((async t=>{if(t.identity.layoutName!==e.layoutName){const e=t.getCurrentViews().find((t=>t.name===i.name));e&&await t.onViewDetached({viewIdentity:e,target:null}).catch(console.error)}}),c(t,l,\"f\"))}static async handleLastViewRemoved(t,e){await t.removeLayout(e),await c(t,a,\"f\").handleLastViewRemoved(t)}static async destroyLayout(t,{layoutName:e}){await c(p,r,\"m\",h).call(p,t,e).destroy(),c(t,l,\"f\").delete(e)}static async createLayout(t,e){const{layoutName:i}=e;if(c(t,l,\"f\").has(i))throw new Error(`Layout name ${i} already exists`);await c(t,a,\"f\").createLayout(e,t)}static registerLayout(t,e,i){c(t,l,\"f\").set(e,i)}static getAllLayouts(t){return[...c(t,l,\"f\").values()]}static setInitialSnapshot(t,e){c(t,a,\"f\").setInitialSnapshot(e)}static createClosedConstructor(...t){return class extends p{constructor(){super(...t)}}}}m=i.DefaultLayoutManager=p,r=p,a=new WeakMap,l=new WeakMap,h=function(t,e){const i=c(t,l,\"f\").get(e);if(!i)throw new Error(`[layout-manager] getLayoutByName: Could not locate layout with name '${e}'`);return i};var g={},f={},v={};Object.defineProperty(v,\"__esModule\",{value:!0}),v.ReversibleMap=void 0;v.ReversibleMap=class{constructor(){this.valueToKey=new Map,this.keyToValue=new Map,this.setUnique=(t,e)=>{if(this.hasKey(t)||this.hasValue(e))throw new Error(\"Key or value already in the map.\");this.keyToValue.set(t,e),this.valueToKey.set(e,t)},this.getKey=t=>{const e=this.valueToKey.get(t);if(!e)throw new Error(\"Value not found in the map.\");return e},this.deleteKey=t=>{const e=this.getValue(t);return this.keyToValue.delete(t),this.valueToKey.delete(e),e},this.deleteValue=t=>{const e=this.getKey(t);return this.keyToValue.delete(e),this.valueToKey.delete(t),e},this.hasKey=t=>this.keyToValue.has(t),this.hasValue=t=>this.valueToKey.has(t)}getValue(t){const e=this.keyToValue.get(t);if(!e)throw new Error(\"Key not found in the map.\");return e}},Object.defineProperty(f,\"__esModule\",{value:!0});var _=f.LayoutContentCache=void 0;const y=t.lazy,C=v;class w{constructor(){this.contentItemCache=new C.ReversibleMap,this.contentItemCacheId=0,this.createCacheKey=()=>{const t=`entity-${this.contentItemCacheId.toString()}`;return this.contentItemCacheId+=1,t},this.hasKey=t=>this.contentItemCache.hasKey(t),this.getItemOrUndefined=t=>{try{return this.getContentItemOrThrow(t)}catch(t){return}},this.getContentItemOrThrow=(t,e)=>{if(!this.contentItemCache.hasKey(t))throw new Error(\"Layout component has been destroyed or detached from the current layout.\");const i=this.contentItemCache.getValue(t);if(e&&!e.includes(i.type))throw new Error(`Layout item is not the expected type. Expected ${e.join(\", \")}, got ${i.type}.`);return i},this.getOrCreateEntityId=t=>{if(this.contentItemCache.hasValue(t))return this.contentItemCache.getKey(t);t.onDestroyed((()=>{this.contentItemCache.deleteValue(t)}));const e=this.createCacheKey();return this.contentItemCache.setUnique(e,t),e}}static getSingleInstance(){return w.singleton.getValue()}}_=f.LayoutContentCache=w,w.singleton=new y.Lazy((()=>new w));var I={},b={};!function(t){Object.defineProperty(t,\"__esModule\",{value:!0}),t.getAdjacentStacks=t.doShareEdge=t.getAdjacentItem=void 0;t.getAdjacentItem=(e,i)=>{const{parent:n}=e;if(e.isRoot()||!n)return;const o=[\"top\",\"bottom\"].includes(i)?\"column\":\"row\",s=[\"top\",\"left\"].includes(i)?-1:1;if(n.type===o){const t=n.contentItems.indexOf(e)+s;if(t>=0&&t{const n=t.getBounds(),o=e.getBounds();if(!n||!o)return!1;if([\"top\",\"bottom\"].includes(i)){return!(n.righto.right)}return!(n.bottomo.bottom)};t.getAdjacentStacks=(e,i)=>{const n=[\"top\",\"bottom\"].includes(i)?\"row\":\"column\",o=s=>\"stack\"===s.type?(0,t.doShareEdge)(e,s,i)?[s]:[]:\"root\"===s.type||\"ground\"===s.type?[]:s.type===n?s.contentItems.map((t=>o(t))).flat():s.type!==n?[\"top\",\"right\"].includes(i)?o(s.contentItems[s.contentItems.length-1]):o(s.contentItems[0]):[],s=(0,t.getAdjacentItem)(e,i);return s?o(s):[]}}(b);var S=t.commonjsGlobal&&t.commonjsGlobal.__decorate||function(t,e,i,n){var o,s=arguments.length,r=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if(\"object\"==typeof Reflect&&\"function\"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(s<3?o(r):s>3?o(e,i,r):o(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};Object.defineProperty(I,\"__esModule\",{value:!0}),I.LayoutEntitiesController=void 0;const E=t.decorators,x=b,L=i;class z{constructor(t,e,i){this.wire=t,this.layoutManager=e,this.layoutContentCache=i,this.analytics=t=>{this.wire.sendAction(`layout-controller-${t}`).catch((()=>{}))},this.getLayoutIdentityForViewOrThrow=async t=>{const e=this.layoutManager.getLayoutIdentityForView(t);if(!e)throw new Error(`View identity ${t.name} is not attached to any layouts.`);return e},this.getRoot=async t=>{this.analytics(\"get-root\");const e=(await this.getLayout(t)).getRoot();return{type:e.type,entityId:this.layoutContentCache.getOrCreateEntityId(e)}},this.getStackByView=async t=>{this.analytics(\"get-stack-by-view\");const e=await this.getLayoutIdentityForViewOrThrow(t),i=(await this.getLayout(e)).getStackByView(t);if(\"stack\"===i?.type)return{entityId:this.layoutContentCache.getOrCreateEntityId(i),type:\"stack\"}},this.getStackViews=t=>{this.analytics(\"get-stack-views\");return this.layoutContentCache.getContentItemOrThrow(t,[\"stack\"]).contentItems.map((t=>({name:t.viewName,uuid:this.wire.me.uuid})))},this.isRoot=t=>{this.analytics(\"is-root\");return this.layoutContentCache.getContentItemOrThrow(t).isRoot()},this.exists=t=>(this.analytics(\"exists\"),this.layoutContentCache.hasKey(t)),this.addViewToStack=async(t,e,{index:i}={index:0})=>{this.analytics(\"add-view-to-stack\");const n=this.layoutContentCache.getContentItemOrThrow(t);if(i&&i>n.contentItems.length+1)throw new Error(`Index '${i}' out of range, please exclude the index or specify a number between 0 and ${n.contentItems.length}`);const o={id:t,index:i},{identity:s}=await n.layout.platformCreateView(e,{location:o});return s},this.findViewInStack=(t,e)=>t.contentItems.find((t=>t.viewName===e.name)),this.removeViewFromStack=async(t,e)=>{this.analytics(\"remove-view-from-stack\");const i=this.layoutContentCache.getContentItemOrThrow(t,[\"stack\"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to remove a view ('${e.name}') which does not belong to the stack.`);await n.layout.platformCloseView(e)},this.createAdjacentStack=async(t,e,{position:i=\"right\"}={})=>{if(this.analytics(\"create-adjacent-stack\"),!Array.isArray(e)||0===e.length)throw new Error('The parameter \"views\" must be an array with at least 1 element.');if(![\"top\",\"bottom\",\"left\",\"right\"].includes(i))throw new Error(`Invalid position '${i}' specified.`);const n=this.layoutContentCache.getContentItemOrThrow(t).createAdjacentStack({position:i}),o=this.layoutContentCache.getOrCreateEntityId(n);return await Promise.all(e.reverse().map((t=>this.addViewToStack(o,t)))),o},this.getAdjacentStacks=async({targetId:t,edge:e})=>{this.analytics(\"get-adjacent-stacks\");const i=this.layoutContentCache.getContentItemOrThrow(t);return(0,x.getAdjacentStacks)(i,e).map((t=>({entityId:this.layoutContentCache.getOrCreateEntityId(t)})))},this.setStackActiveView=async(t,e)=>{this.analytics(\"set-stack-active-view\");const i=this.layoutContentCache.getContentItemOrThrow(t,[\"stack\"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to set a view ('${e.name}') as active when it does not belong to the stack.`);i.setActiveContentItem(n,!0)}}async getLayout(t){const e=await L.DefaultLayoutManager.resolveLayout(this.layoutManager,t);if(!e)throw new Error(`Could not resolve target layout identity ${JSON.stringify(t)}`);return e}getContent(t){this.analytics(\"get-content\");return this.layoutContentCache.getContentItemOrThrow(t,[\"column\",\"row\"]).contentItems.map((t=>({type:t.type,entityId:this.layoutContentCache.getOrCreateEntityId(t)})))}getParent(t){this.analytics(\"get-parent\");const e=this.layoutContentCache.getContentItemOrThrow(t);if(!e.isRoot())return e.parent?.contentItems.includes(e)?{type:e.parent.type,entityId:this.layoutContentCache.getOrCreateEntityId(e.parent)}:void 0}}S([(0,E.expose)()],z.prototype,\"getLayoutIdentityForViewOrThrow\",void 0),S([(0,E.expose)()],z.prototype,\"getRoot\",void 0),S([(0,E.expose)()],z.prototype,\"getStackByView\",void 0),S([(0,E.expose)()],z.prototype,\"getStackViews\",void 0),S([(0,E.expose)()],z.prototype,\"getContent\",null),S([(0,E.expose)()],z.prototype,\"getParent\",null),S([(0,E.expose)()],z.prototype,\"isRoot\",void 0),S([(0,E.expose)()],z.prototype,\"exists\",void 0),S([(0,E.expose)()],z.prototype,\"addViewToStack\",void 0),S([(0,E.expose)()],z.prototype,\"removeViewFromStack\",void 0),S([(0,E.expose)()],z.prototype,\"createAdjacentStack\",void 0),S([(0,E.expose)()],z.prototype,\"getAdjacentStacks\",void 0),S([(0,E.expose)()],z.prototype,\"setStackActiveView\",void 0),I.LayoutEntitiesController=z,Object.defineProperty(g,\"__esModule\",{value:!0});var M=g.initLayoutEndpoints=void 0;const P=t.apiExposer,T=t.layout_constants,A=f,k=I,D=i;M=g.initLayoutEndpoints=async function(t,e){const i=t.getFin(),n=await i.Platform.getCurrentSync().getClient(),o=new P.ChannelsExposer(n);await new P.ApiExposer(o).exposeInstance(new k.LayoutEntitiesController(t,e,A.LayoutContentCache.getSingleInstance()),{id:T.LAYOUT_CONTROLLER_ID}),await async function(t,e){const i=t=>async i=>{const n=await D.DefaultLayoutManager.resolveLayout(e,i.target);if(!n)throw new Error(`Could not resolve the layout target from payload ${JSON.stringify(i)}`);return t(n,i)},n=(e,n)=>{t.register(e,i(n))},o=(t,e)=>{n(t,e)};n(\"replace-view\",((t,e)=>t.replaceView(e))),n(\"replace-layout\",((t,{layout:e})=>t.replaceLayout(e))),n(\"add-view\",((t,e)=>t.insertView(e))),o(\"layout-add-view\",((t,{viewOptions:e,location:i,targetView:n})=>t.platformCreateView(e,{location:i,targetView:n}))),n(\"close-view\",((t,e)=>t.cleanupView(e.viewIdentity))),o(\"layout-close-view\",((t,e)=>t.platformCloseView(e.viewIdentity))),n(\"apply-preset-layout\",((t,e)=>t.applyPreset(e))),n(\"get-layout-views\",(t=>t.getCurrentViews())),n(\"get-frame-snapshot\",(t=>t.getFrameSnapshot())),n(\"is-visible\",(t=>t.isVisible())),n(\"destroy\",(t=>t.destroy())),t.register(\"get-layout-snapshot\",(()=>e.getLayoutSnapshot()))}(n,e)};var R={};Object.defineProperty(R,\"__esModule\",{value:!0});var U=R.BaseLayout=void 0;U=R.BaseLayout=class{};var O={};Object.defineProperty(O,\"__esModule\",{value:!0});var V=O.DOMEmitter=void 0;V=O.DOMEmitter=class{constructor(t){this.container=t}dispatchLocalEvent(t,e){const i={...e,type:t,tabSelector:`tab-${e.name}`,containerSelector:`container-${e.name}`,topic:\"openfin-DOM-event\"};this.container.dispatchEvent(new CustomEvent(t,{detail:i}))}};var B={};Object.defineProperty(B,\"__esModule\",{value:!0});var H=B.mapLayoutContentItemsImmutableSync=B.mapLayoutContentItemsImmutable=W=B.isVisible=void 0;var W=B.isVisible=t=>(0!==t.offsetWidth||0!==t.offsetHeight)&&\"hidden\"!==window.getComputedStyle(t).visibility&&t.offsetTop>=0&&t.offsetLeft>=0&&t.offsetTop<=window.innerHeight&&t.offsetLeft<=window.innerWidth;const F=t=>\"type\"in t&&\"component\"===t.type;B.mapLayoutContentItemsImmutable=async function t(e,i){return F(i)?e(i):{...i,content:await Promise.all(i.content?.map((i=>t(e,i))))}},H=B.mapLayoutContentItemsImmutableSync=function t(e,i){return F(i)?e(i):{...i,content:i.content?.map((i=>t(e,i)))}};class N extends Error{constructor(t,e){super(e),this.type=t}}class G extends N{constructor(t,e){super(\"Configuration\",t),this.node=e}}class j extends N{constructor(t){super(\"PopoutBlocked\",t)}}class $ extends N{constructor(t){super(\"API\",t)}}class Z extends N{constructor(t){super(\"Bind\",t)}}class q extends Error{constructor(t,e,i){super(`${t}: ${e}${void 0===i?\"\":\": \"+i}`)}}class X extends q{constructor(t,e){super(\"Assert\",t,e)}}class Y extends q{constructor(t,e,i){super(\"UnreachableCase\",t,`${e}${void 0===i?\"\":\": \"+i}`)}}class K extends q{constructor(t,e){super(\"UnexpectedNull\",t,e)}}class J extends q{constructor(t,e){super(\"UnexpectedUndefined\",t,e)}}var Q;!function(t){let e=!1;const i={PopoutCannotBeCreatedWithGroundItemConfig:{id:0,default:\"Popout cannot be created with ground ItemConfig\"},PleaseRegisterAConstructorFunction:{id:1,default:\"Please register a constructor function\"},ComponentTypeNotRegisteredAndBindComponentEventHandlerNotAssigned:{id:2,default:\"Component type not registered and BindComponentEvent handler not assigned\"},ComponentIsAlreadyRegistered:{id:3,default:\"Component is already registered\"},ComponentIsNotVirtuable:{id:4,default:\"Component is not virtuable. Requires rootHtmlElement field/getter\"},VirtualComponentDoesNotHaveRootHtmlElement:{id:5,default:'Virtual component does not have getter \"rootHtmlElement\"'},ItemConfigIsNotTypeComponent:{id:6,default:\"ItemConfig is not of type component\"},InvalidNumberPartInSizeString:{id:7,default:\"Invalid number part in size string\"},UnknownUnitInSizeString:{id:8,default:\"Unknown unit in size string\"},UnsupportedUnitInSizeString:{id:9,default:\"Unsupported unit in size string\"}};t.idCount=Object.keys(i).length;const n=Object.values(i);t.checkInitialise=function(){if(!e)for(let e=0;e=\"0\"&&t<=\"9\"}function Tt(t,e){const i=zt(e);t.style.width=i}function At(t,e){const i=zt(e);t.style.height=i}function kt(t){return{width:t.offsetWidth,height:t.offsetHeight}}function Dt(t,e){t.style.display=e?\"\":\"none\"}function Rt(t,e){if(void 0!==e)for(const i in e)if(e.hasOwnProperty(i)){const n=e[i],o=t[i];t[i]=Ut(o,n)}return t}function Ut(t,e){if(\"object\"!=typeof e)return e;if(Array.isArray(e)){const t=e.length,i=new Array(t);for(let n=0;n36)throw new Error(\"Too many keys in config minifier map\")},t.translateObject=n}(dt||(dt={})),function(t){t.defaults={type:at.ground,content:[],size:1,sizeUnit:ht.Fractional,minSize:void 0,minSizeUnit:ht.Pixel,id:\"\",isClosable:!0},t.createCopy=function(t,e){switch(t.type){case at.ground:case at.row:case at.column:return gt.createCopy(t,e);case at.stack:return ut.createCopy(t,e);case at.component:return pt.createCopy(t);default:throw new Y(\"CICC91354\",t.type,\"Invalid Config Item type specified\")}},t.createDefault=function(t){switch(t){case at.ground:throw new X(\"CICCDR91562\");case at.row:case at.column:return gt.createDefault(t);case at.stack:return ut.createDefault();case at.component:return pt.createDefault();default:throw new Y(\"CICCDD91563\",t,\"Invalid Config Item type specified\")}},t.isComponentItem=function(t){return t.type===at.component},t.isStackItem=function(t){return t.type===at.stack},t.isGroundItem=function(t){return t.type===at.ground}}(ct||(ct={})),function(t){t.defaultMaximised=!1,function(t){t.createCopy=function(t,e){return void 0===t?void 0:{show:null!=e?e:t.show,popout:t.popout,close:t.close,maximise:t.maximise,minimise:t.minimise,tabDropdown:t.tabDropdown}}}(t.Header||(t.Header={}))}(mt||(mt={})),function(t){function e(t){const e=t.length,i=new Array(e);for(let n=0;n\"__glMaximised\"===t));t>0&&(o=!0,n=n.splice(t,1)),e=n.length>0?n[0]:ct.defaults.id}else e=n;return i=void 0!==t.maximised?t.maximised:o,{id:e,maximised:i}}}(wt||(wt={})),function(t){function e(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0;return{resolved:!0,root:Et.resolve(i),openPopouts:t.resolveOpenPopouts(e.openPopouts),dimensions:t.Dimensions.resolve(e.dimensions),settings:t.Settings.resolve(e.settings),header:t.Header.resolve(e.header,e.settings,e.labels)}}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:Lt.fromResolvedArray(e.openPopouts),settings:_t.Settings.createCopy(e.settings),dimensions:t.Dimensions.fromResolved(e.dimensions),header:_t.Header.createCopy(e.header)}},t.isResolved=function(t){const e=t;return void 0!==e.resolved&&!0===e.resolved},t.resolveOpenPopouts=function(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0,{root:Et.resolve(o),openPopouts:xt.resolveOpenPopouts(e.openPopouts),dimensions:xt.Dimensions.resolve(e.dimensions),settings:xt.Settings.resolve(e.settings),header:xt.Header.resolve(e.header,e.settings,e.labels),parentId:null!==(i=e.parentId)&&void 0!==i?i:null,indexInParent:null!==(n=e.indexInParent)&&void 0!==n?n:null,window:t.Window.resolve(e.window,e.dimensions),resolved:!0}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:i(e.openPopouts),dimensions:xt.Dimensions.fromResolved(e.dimensions),settings:_t.Settings.createCopy(e.settings),header:_t.Header.createCopy(e.header),parentId:e.parentId,indexInParent:e.indexInParent,window:t.Window.fromResolved(e.window)}},t.fromResolvedArray=i}(Lt||(Lt={}));class Wt{constructor(){this._allEventSubscriptions=[],this._subscriptionsMap=new Map,this.unbind=this.removeEventListener,this.trigger=this.emit}tryBubbleEvent(t,e){}emit(t,...e){let i=this._subscriptionsMap.get(t);if(void 0!==i){i=i.slice();for(let t=0;t0){const n=e.slice();n.unshift(t);const o=this._allEventSubscriptions.slice();for(let t=0;t0?n.contentItems[0]:n,e=0);const o=this._layoutManager.createAndInitContentItem(i,t);t.addChild(o,e),this._layoutManager.layoutConfig.settings.popInOnClose?this._onClose():this.close()}createWindow(){const t=this.createUrl(),e=Math.floor(1e6*Math.random()).toString(36),i=this.serializeWindowFeatures({width:this._initialWindowSize.width,height:this._initialWindowSize.height,innerWidth:this._initialWindowSize.width,innerHeight:this._initialWindowSize.height,menubar:\"no\",toolbar:\"no\",location:\"no\",personalbar:\"no\",resizable:\"yes\",scrollbars:\"no\",status:\"no\"});if(this._popoutWindow=globalThis.open(t,e,i),this._popoutWindow)this._popoutWindow.addEventListener(\"load\",(()=>this.positionWindow()),{passive:!0}),this._popoutWindow.addEventListener(\"beforeunload\",(()=>{this._layoutManager.layoutConfig.settings.popInOnClose?this.popIn():this._onClose()}),{passive:!0}),this._checkReadyInterval=setInterval((()=>this.checkReady()),10);else if(!0===this._layoutManager.layoutConfig.settings.blockedPopoutsThrowError){throw new j(\"Popout blocked\")}}checkReady(){if(null===this._popoutWindow)throw new K(\"BPCR01844\");this._popoutWindow.__glInstance&&this._popoutWindow.__glInstance.isInitialised&&(this.onInitialised(),void 0!==this._checkReadyInterval&&(clearInterval(this._checkReadyInterval),this._checkReadyInterval=void 0))}serializeWindowFeatures(t){const e=[];for(const i in t)e.push(i+\"=\"+t[i].toString());return e.join(\",\")}createUrl(){const t=\"gl-window-config-\"+Ot(),e=_t.minifyConfig(this._config);try{localStorage.setItem(t,JSON.stringify(e))}catch(t){throw new Error(\"Error while writing to localStorage \"+function(t){return t instanceof Error?t.message:\"string\"==typeof t?t:\"Unknown Error\"}(t))}const i=new URL(location.href);return i.searchParams.set(\"gl-window\",t),i.toString()}positionWindow(){if(null===this._popoutWindow)throw new Error(\"BrowserPopout.positionWindow: null popoutWindow\");this._popoutWindow.moveTo(this._initialWindowSize.left,this._initialWindowSize.top),this._popoutWindow.focus()}onInitialised(){this._isInitialised=!0,this.getGlInstance().on(\"popIn\",(()=>this.popIn())),this.emit(\"initialised\")}_onClose(){setTimeout((()=>this.emit(\"closed\")),50)}}class Gt extends Wt{constructor(t,e,i,n){super(),this.layoutManager=t,this._parent=i,this._element=n,this._popInParentIds=[],this._type=e.type,this._id=e.id,this._isInitialised=!1,this.isGround=!1,this.isRow=!1,this.isColumn=!1,this.isStack=!1,this.isComponent=!1,this.size=e.size,this.sizeUnit=e.sizeUnit,this.minSize=e.minSize,this.minSizeUnit=e.minSizeUnit,this._isClosable=e.isClosable,this._pendingEventPropagations={},this._throttledEvents=[\"stateChanged\"],this._contentItems=this.createContentItems(e.content)}get type(){return this._type}get id(){return this._id}set id(t){this._id=t}get popInParentIds(){return this._popInParentIds}get parent(){return this._parent}get contentItems(){return this._contentItems}get isClosable(){return this._isClosable}get element(){return this._element}get isInitialised(){return this._isInitialised}static isStack(t){return t.isStack}static isComponentItem(t){return t.isComponent}static isComponentParentableItem(t){return t.isStack||t.isGround}removeChild(t,e=!1){const i=this._contentItems.indexOf(t);if(-1===i)throw new Error(\"Can't remove child item. Unknown content item\");if(e||this._contentItems[i].destroy(),this._contentItems.splice(i,1),this._contentItems.length>0)this.updateSize(!1);else if(!this.isGround&&!0===this._isClosable){if(null===this._parent)throw new K(\"CIUC00874\");this._parent.removeChild(this)}}addChild(t,e,i){return null!=e||(e=this._contentItems.length),this._contentItems.splice(e,0,t),t.setParent(this),!0===this._isInitialised&&!1===t._isInitialised&&t.init(),e}replaceChild(t,e,i=!1){const n=this._contentItems.indexOf(t),o=t._element.parentNode;if(-1===n)throw new X(\"CIRCI23232\",\"Can't replace child. oldChild is not child of this\");if(null===o)throw new K(\"CIRCP23232\");if(o.replaceChild(e._element,t._element),!0===i&&(t._parent=null,t.destroy()),this._contentItems[n]=e,e.setParent(this),e.size=t.size,e.sizeUnit=t.sizeUnit,e.minSize=t.minSize,e.minSizeUnit=t.minSizeUnit,null===e._parent)throw new K(\"CIRCNC45699\");!0===e._parent._isInitialised&&!1===e._isInitialised&&e.init(),this.updateSize(!1)}remove(){if(null===this._parent)throw new K(\"CIR11110\");this._parent.removeChild(this)}popout(){const t=Ot(),e=this.layoutManager.createPopoutFromContentItem(this,void 0,t,void 0);return this.emitBaseBubblingEvent(\"stateChanged\"),e}calculateConfigContent(){const t=this._contentItems,e=t.length,i=new Array(e);for(let n=0;nthis.propagateEventToLayoutManager(t,e))))}propagateEventToLayoutManager(t,e){this._pendingEventPropagations[t]=!1,this.layoutManager.emitUnknown(t,e)}}class jt extends Gt{constructor(t,e,i){super(t,e,i,document.createElement(\"div\")),this._parentItem=i,this._focused=!1,this.isComponent=!0,this._reorderEnabled=e.reorderEnabled,this.applyUpdatableConfig(e),this._initialWantMaximise=e.maximised;const n=document.createElement(\"div\");n.classList.add(\"lm_content\"),this.element.appendChild(n),this._container=new Ft(e,this,t,n,(t=>this.handleUpdateItemConfigEvent(t)),(()=>this.show()),(()=>this.hide()),(t=>this.focus(t)),(t=>this.blur(t)))}get componentName(){return this._container.componentType}get componentType(){return this._container.componentType}get reorderEnabled(){return this._reorderEnabled}get initialWantMaximise(){return this._initialWantMaximise}get component(){return this._container.component}get container(){return this._container}get parentItem(){return this._parentItem}get headerConfig(){return this._headerConfig}get title(){return this._title}get tab(){return this._tab}get focused(){return this._focused}destroy(){this._container.destroy(),super.destroy()}applyUpdatableConfig(t){this.setTitle(t.title),this._headerConfig=t.header}toConfig(){const t=this._container.stateRequestEvent,e=void 0===t?this._container.state:t();return{type:at.component,content:[],size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,maximised:!1,isClosable:this.isClosable,reorderEnabled:this._reorderEnabled,title:this._title,header:mt.Header.createCopy(this._headerConfig),componentType:pt.copyComponentType(this.componentType),componentState:e}}close(){if(null===this.parent)throw new K(\"CIC68883\");this.parent.removeChild(this,!1)}enterDragMode(t,e){Tt(this.element,t),At(this.element,e),this._container.enterDragMode(t,e)}exitDragMode(){this._container.exitDragMode()}enterStackMaximised(){this._container.enterStackMaximised()}exitStackMaximised(){this._container.exitStackMaximised()}drag(){this._container.drag()}updateSize(t){this.updateNodeSize(t)}init(){this.updateNodeSize(!1),super.init(),this._container.emit(\"open\"),this.initContentItems()}setTitle(t){this._title=t,this.emit(\"titleChanged\",t),this.emit(\"stateChanged\")}setTab(t){this._tab=t,this.emit(\"tab\",t),this._container.setTab(t)}hide(){super.hide(),this._container.setVisibility(!1)}show(){super.show(),this._container.setVisibility(!0)}focus(t=!1){this.parentItem.setActiveComponentItem(this,!0,t)}setFocused(t){this._focused=!0,this.tab.setFocused(),t||this.emitBaseBubblingEvent(\"focus\")}blur(t=!1){this._focused&&this.layoutManager.setFocusedComponentItem(void 0,t)}setBlurred(t){this._focused=!1,this.tab.setBlurred(),t||this.emitBaseBubblingEvent(\"blur\")}setParent(t){this._parentItem=t,super.setParent(t)}handleUpdateItemConfigEvent(t){this.applyUpdatableConfig(t)}updateNodeSize(t){if(\"none\"!==this.element.style.display){const{width:e,height:i}=kt(this.element);this._container.setSizeToNodeSize(e,i,t)}}}class $t extends Gt{constructor(){super(...arguments),this._focused=!1}get focused(){return this._focused}setFocusedValue(t){this._focused=t}}class Zt extends Wt{constructor(t,e){super(),this._eElement=t,this._pointerTracking=!1,this._pointerDownEventListener=t=>this.onPointerDown(t),this._pointerMoveEventListener=t=>this.onPointerMove(t),this._pointerUpEventListener=t=>this.onPointerUp(t),this._timeout=void 0,this._allowableTargets=[t,...e],this._oDocument=document,this._eBody=document.body,this._nDelay=1800,this._nDistance=10,this._nX=0,this._nY=0,this._nOriginalX=0,this._nOriginalY=0,this._dragging=!1,this._eElement.addEventListener(\"pointerdown\",this._pointerDownEventListener,{passive:!0})}destroy(){this.checkRemovePointerTrackingEventListeners(),this._eElement.removeEventListener(\"pointerdown\",this._pointerDownEventListener)}cancelDrag(){this.processDragStop(void 0)}onPointerDown(t){if(this._allowableTargets.includes(t.target)&&t.isPrimary){const e=this.getPointerCoordinates(t);this.processPointerDown(e)}}processPointerDown(t){this._nOriginalX=t.x,this._nOriginalY=t.y,this._oDocument.addEventListener(\"pointermove\",this._pointerMoveEventListener),this._oDocument.addEventListener(\"pointerup\",this._pointerUpEventListener,{passive:!0}),this._pointerTracking=!0,this._timeout=setTimeout((()=>{try{this.startDrag()}catch(t){throw console.error(t),t}}),this._nDelay)}onPointerMove(t){this._pointerTracking&&(this.processDragMove(t),t.preventDefault())}processDragMove(t){this._nX=t.pageX-this._nOriginalX,this._nY=t.pageY-this._nOriginalY,!1===this._dragging&&(Math.abs(this._nX)>this._nDistance||Math.abs(this._nY)>this._nDistance)&&this.startDrag(),this._dragging&&this.emit(\"drag\",this._nX,this._nY,t)}onPointerUp(t){this.processDragStop(t)}processDragStop(t){var e;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this.checkRemovePointerTrackingEventListeners(),!0===this._dragging&&(this._eBody.classList.remove(\"lm_dragging\"),this._eElement.classList.remove(\"lm_dragging\"),null===(e=this._oDocument.querySelector(\"iframe\"))||void 0===e||e.style.setProperty(\"pointer-events\",\"\"),this._dragging=!1,this.emit(\"dragStop\",t))}checkRemovePointerTrackingEventListeners(){this._pointerTracking&&(this._oDocument.removeEventListener(\"pointermove\",this._pointerMoveEventListener),this._oDocument.removeEventListener(\"pointerup\",this._pointerUpEventListener),this._pointerTracking=!1)}startDrag(){var t;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this._dragging=!0,this._eBody.classList.add(\"lm_dragging\"),this._eElement.classList.add(\"lm_dragging\"),null===(t=this._oDocument.querySelector(\"iframe\"))||void 0===t||t.style.setProperty(\"pointer-events\",\"none\"),this.emit(\"dragStart\",this._nOriginalX,this._nOriginalY)}getPointerCoordinates(t){return{x:t.pageX,y:t.pageY}}}class qt{constructor(t,e,i){this._isVertical=t,this._size=e,this._grabSize=i0){const i=this.createSplitter(Math.max(0,e-1)).element;e>0?(this.contentItems[e-1].element.insertAdjacentElement(\"afterend\",i),i.insertAdjacentElement(\"afterend\",t.element)):(this.contentItems[0].element.insertAdjacentElement(\"beforebegin\",i),i.insertAdjacentElement(\"beforebegin\",t.element))}else this._childElementContainer.appendChild(t.element);super.addChild(t,e);const n=1/this.contentItems.length*100;if(!0===i)return this.emitBaseBubblingEvent(\"stateChanged\"),e;for(let e=0;e0&&(this.calculateRelativeSizes(),this.setAbsoluteSizes()),this.emitBaseBubblingEvent(\"stateChanged\"),this.emit(\"resize\")}setAbsoluteSizes(){const t=this.calculateAbsoluteSizes();for(let e=0;e0&&t.itemSizes[e]++,this._isColumn?(Tt(this.contentItems[e].element,t.crossAxisSize),At(this.contentItems[e].element,t.itemSizes[e])):(Tt(this.contentItems[e].element,t.itemSizes[e]),At(this.contentItems[e].element,t.crossAxisSize))}calculateAbsoluteSizes(){const t=(this.contentItems.length-1)*this._splitterSize,{width:e,height:i}=kt(this.element);let n,o;this._isColumn?(n=i-t,o=e):(n=e-t,o=i);let s=0;const r=[];for(let t=0;t0){const n=100-t;for(let t=0;t100&&e.length>0){for(let t=0;te)return;{const r=i/e;let a=i;for(let e=0;ethis.onSplitterDrag(e,t,i))),e.on(\"dragStop\",(()=>this.onSplitterDragStop(e))),e.on(\"dragStart\",(()=>this.onSplitterDragStart(e))),this._splitter.splice(t,0,e),e}getSplitItems(t){const e=this._splitter.indexOf(t);return{before:this.contentItems[e],after:this.contentItems[e+1]}}calculateContentItemMinSize(t){const e=t.minSize;if(void 0!==e){if(t.minSizeUnit===ht.Pixel)return e;throw new X(\"ROCGMD98831\",JSON.stringify(t))}{const t=this.layoutManager.layoutConfig.dimensions;return this._isColumn?t.defaultMinItemHeight:t.defaultMinItemWidth}}calculateContentItemsTotalMinSize(t){let e=0;for(const i of t)e+=this.calculateContentItemMinSize(i);return e}onSplitterDragStart(t){const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=this.calculateContentItemsTotalMinSize(e.before.contentItems),s=this.calculateContentItemsTotalMinSize(e.after.contentItems);this._splitterPosition=0,this._splitterMinPosition=-1*(i-o),this._splitterMaxPosition=n-s}onSplitterDrag(t,e,i){let n=this._isColumn?i:e;if(null===this._splitterMinPosition||null===this._splitterMaxPosition)throw new K(\"ROCOSD59226\");n=Math.max(n,this._splitterMinPosition),n=Math.min(n,this._splitterMaxPosition),this._splitterPosition=n;const o=zt(n);this._isColumn?t.element.style.top=o:t.element.style.left=o}onSplitterDragStop(t){if(null===this._splitterPosition)throw new K(\"ROCOSDS66932\");{const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=(this._splitterPosition+i)/(i+n),s=e.before.size+e.after.size;e.before.size=o*s,e.after.size=(1-o)*s,t.element.style.top=zt(0),t.element.style.left=zt(0),globalThis.requestAnimationFrame((()=>this.updateSize(!1)))}}}!function(t){t.getElementDimensionSize=function(t,e){return\"width\"===e?function(t){return t.offsetWidth}(t):function(t){return t.offsetHeight}(t)},t.setElementDimensionSize=function(t,e,i){return\"width\"===e?Tt(t,i):At(t,i)},t.createElement=function(t,e){const i=t.createElement(\"div\");return i.classList.add(\"lm_item\"),e?i.classList.add(\"lm_column\"):i.classList.add(\"lm_row\"),i}}(Xt||(Xt={}));class Yt extends $t{constructor(t,e,i){super(t,vt.create(e),null,Yt.createElement(document)),this.isGround=!0,this._childElementContainer=this.element,this._containerElement=i;let n=null;for(;;){const t=n?n.previousSibling:this._containerElement.lastChild;if(!(t instanceof Element&&t.classList.contains(\"lm_content\")))break;n=t}this._containerElement.insertBefore(this.element,n)}init(){if(!0!==this.isInitialised){this.updateNodeSize();for(let t=0;t0?this.contentItems[0]:this,n.isComponent)throw new Error(\"Cannot add item as child to ComponentItem\");{const t=this.layoutManager.createAndInitContentItem(i,n);return e=n.addChild(t,e),n===this?-1:e}}loadComponentAsRoot(t){this.clearRoot();const e=Ct.resolve(t,!1);if(e.maximised)throw new Error(\"Root Component cannot be maximised\");{const t=new jt(this.layoutManager,e,this);t.init(),this.addChild(t,0)}}addChild(t,e){if(this.contentItems.length>0)throw new Error(\"Ground node can only have a single child\");return this._childElementContainer.appendChild(t.element),e=super.addChild(t,e),this.updateSize(!1),this.emitBaseBubblingEvent(\"stateChanged\"),e}calculateConfigContent(){const t=this.contentItems,e=t.length,i=new Array(e);for(let n=0;n0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e)),this.updateContentItemsSize(!1))}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}createSideAreas(){const t=Yt.Area.oppositeSides,e=new Array(Object.keys(t).length);let i=0;for(const n in t){const o=n,s=this.getElementArea();if(null===s)throw new K(\"RCSA77553\");s.side=o,\"2\"===t[o][1]?s[o]=s[t[o]]-50:s[o]=s[t[o]]+50,s.surface=(s.x2-s.x1)*(s.y2-s.y1),e[i++]=s}return e}highlightDropZone(t,e,i){this.layoutManager.tabDropPlaceholder.remove(),super.highlightDropZone(t,e,i)}onDrop(t,e){if(t.isComponent){const e=ut.createDefault(),i=t;e.header=mt.Header.createCopy(i.headerConfig);const n=this.layoutManager.createAndInitContentItem(e,this);n.addChild(t),t=n}if(0===this.contentItems.length)this.addChild(t);else{if(t.type===at.row||t.type===at.column){const e=ut.createDefault(),i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}const i=\"x\"==e.side[0]?at.row:at.column,n=\"2\"==e.side[1],o=this.contentItems[0];if(o instanceof Xt&&o.type===i){const e=o.contentItems[n?0:o.contentItems.length-1];o.addChild(t,n?0:void 0,!0),e.size*=.5,t.size=e.size,t.sizeUnit=ht.Percent,o.updateSize(!1)}else{const e=ct.createDefault(i),s=this.layoutManager.createContentItem(e,this);this.replaceChild(o,s),s.addChild(t,n?0:void 0,!0),s.addChild(o,n?void 0:0,!0),o.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}}dock(){throw new X(\"GID87731\")}validateDocking(){throw new X(\"GIVD87732\")}getAllContentItems(){const t=[this];return this.deepGetAllContentItems(this.contentItems,t),t}getConfigMaximisedItems(){const t=[];return this.deepFilterContentItems(this.contentItems,t,(t=>!(!Gt.isStack(t)||!t.initialWantMaximise)||!(!Gt.isComponentItem(t)||!t.initialWantMaximise))),t}getItemsByPopInParentId(t){const e=[];return this.deepFilterContentItems(this.contentItems,e,(e=>e.popInParentIds.includes(t))),e}toConfig(){throw new Error(\"Cannot generate GroundItem config\")}setActiveComponentItem(t,e,i){}updateNodeSize(){const{width:t,height:e}=kt(this._containerElement);Tt(this.element,t),At(this.element,e),this.contentItems.length>0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e))}deepGetAllContentItems(t,e){for(let i=0;ithis.onClick(t),this._touchStartEventListener=t=>this.onTouchStart(t),this._element=document.createElement(\"div\"),this._element.classList.add(i),this._element.title=e,this._header.on(\"destroy\",(()=>this.destroy())),this._element.addEventListener(\"click\",this._clickEventListener,{passive:!0}),this._element.addEventListener(\"touchstart\",this._touchStartEventListener,{passive:!0}),this._header.controlsContainerElement.appendChild(this._element)}get element(){return this._element}destroy(){var t;this._element.removeEventListener(\"click\",this._clickEventListener),this._element.removeEventListener(\"touchstart\",this._touchStartEventListener),null===(t=this._element.parentNode)||void 0===t||t.removeChild(this._element)}onClick(t){this._pushEvent(t)}onTouchStart(t){this._pushEvent(t)}}class Jt{constructor(t,e,i,n,o){var s;this._layoutManager=t,this._componentItem=e,this._closeEvent=i,this._focusEvent=n,this._dragStartEvent=o,this._isActive=!1,this._tabClickListener=t=>this.onTabClickDown(t),this._tabTouchStartListener=t=>this.onTabTouchStart(t),this._closeClickListener=()=>this.onCloseClick(),this._closeTouchStartListener=()=>this.onCloseTouchStart(),this._dragStartListener=(t,e)=>this.onDragStart(t,e),this._contentItemDestroyListener=()=>this.onContentItemDestroy(),this._tabTitleChangedListener=t=>this.setTitle(t),this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_tab\"),this._titleElement=document.createElement(\"span\"),this._titleElement.classList.add(\"lm_title\"),this._closeElement=document.createElement(\"div\"),this._closeElement.classList.add(\"lm_close_tab\"),this._element.appendChild(this._titleElement),this._element.appendChild(this._closeElement),e.isClosable?this._closeElement.style.display=\"\":this._closeElement.style.display=\"none\",this.setTitle(e.title),this._componentItem.on(\"titleChanged\",this._tabTitleChangedListener);(null!==(s=e.reorderEnabled)&&void 0!==s?s:this._layoutManager.layoutConfig.settings.reorderEnabled)&&this.enableReorder(),this._element.addEventListener(\"click\",this._tabClickListener,{passive:!0}),this._element.addEventListener(\"touchstart\",this._tabTouchStartListener,{passive:!0}),this._componentItem.isClosable?(this._closeElement.addEventListener(\"click\",this._closeClickListener,{passive:!0}),this._closeElement.addEventListener(\"touchstart\",this._closeTouchStartListener,{passive:!0})):(this._closeElement.remove(),this._closeElement=void 0),this._componentItem.setTab(this),this._layoutManager.emit(\"tabCreated\",this)}get isActive(){return this._isActive}get componentItem(){return this._componentItem}get contentItem(){return this._componentItem}get element(){return this._element}get titleElement(){return this._titleElement}get closeElement(){return this._closeElement}get reorderEnabled(){return void 0!==this._dragListener}set reorderEnabled(t){t!==this.reorderEnabled&&(t?this.enableReorder():this.disableReorder())}setTitle(t){this._titleElement.innerText=t,this._element.title=t}setActive(t){t!==this._isActive&&(this._isActive=t,t?this._element.classList.add(\"lm_active\"):this._element.classList.remove(\"lm_active\"))}destroy(){var t,e;this._closeEvent=void 0,this._focusEvent=void 0,this._dragStartEvent=void 0,this._element.removeEventListener(\"click\",this._tabClickListener),this._element.removeEventListener(\"touchstart\",this._tabTouchStartListener),null===(t=this._closeElement)||void 0===t||t.removeEventListener(\"click\",this._closeClickListener),null===(e=this._closeElement)||void 0===e||e.removeEventListener(\"touchstart\",this._closeTouchStartListener),this._componentItem.off(\"titleChanged\",this._tabTitleChangedListener),this.reorderEnabled&&this.disableReorder(),this._element.remove()}setBlurred(){this._element.classList.remove(\"lm_focused\"),this._titleElement.classList.remove(\"lm_focused\")}setFocused(){this._element.classList.add(\"lm_focused\"),this._titleElement.classList.add(\"lm_focused\")}onDragStart(t,e){if(void 0===this._dragListener)throw new J(\"TODSDLU10093\");if(void 0===this._dragStartEvent)throw new J(\"TODS23309\");this._dragStartEvent(t,e,this._dragListener,this.componentItem)}onContentItemDestroy(){void 0!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=void 0)}onTabClickDown(t){const e=t.target;e!==this._element&&e!==this._titleElement||(0===t.button?this.notifyFocus():1===t.button&&this._componentItem.isClosable&&this.notifyClose())}onTabTouchStart(t){t.target===this._element&&this.notifyFocus()}onCloseClick(){this.notifyClose()}onCloseTouchStart(){this.notifyClose()}notifyClose(){if(void 0===this._closeEvent)throw new J(\"TNC15007\");this._closeEvent(this._componentItem)}notifyFocus(){if(void 0===this._focusEvent)throw new J(\"TNA15007\");this._focusEvent(this._componentItem)}enableReorder(){this._dragListener=new Zt(this._element,[this._titleElement]),this._dragListener.on(\"dragStart\",this._dragStartListener),this._componentItem.on(\"destroy\",this._contentItemDestroyListener)}disableReorder(){if(void 0===this._dragListener)throw new J(\"TDR87745\");this._componentItem.off(\"destroy\",this._contentItemDestroyListener),this._dragListener.off(\"dragStart\",this._dragStartListener),this._dragListener=void 0}}class Qt{constructor(t,e,i,n,o){this._layoutManager=t,this._componentRemoveEvent=e,this._componentFocusEvent=i,this._componentDragStartEvent=n,this._dropdownActiveChangedEvent=o,this._tabs=[],this._lastVisibleTabIndex=-1,this._dropdownActive=!1,this._element=document.createElement(\"section\"),this._element.classList.add(\"lm_tabs\"),this._dropdownElement=document.createElement(\"section\"),this._dropdownElement.classList.add(\"lm_tabdropdown_list\"),this._dropdownElement.style.display=\"none\"}get tabs(){return this._tabs}get tabCount(){return this._tabs.length}get lastVisibleTabIndex(){return this._lastVisibleTabIndex}get element(){return this._element}get dropdownElement(){return this._dropdownElement}get dropdownActive(){return this._dropdownActive}destroy(){for(let t=0;tthis.handleTabCloseEvent(t)),(t=>this.handleTabFocusEvent(t)),((t,e,i,n)=>this.handleTabDragStartEvent(t,e,i,n)));void 0===e&&(e=this._tabs.length),this._tabs.splice(e,0,i),ethis._lastVisibleTabIndex){const t=this._tabs[e];for(let t=e;t>0;t--)this._tabs[t]=this._tabs[t-1];this._tabs[0]=t}}updateTabSizes(t,e){let i=!1;this.tryUpdateTabSizes(i,t,e)||(i=!0,this.tryUpdateTabSizes(i,t,e)),i!==this._dropdownActive&&(this._dropdownActive=i,this._dropdownActiveChangedEvent())}tryUpdateTabSizes(t,e,i){if(this._tabs.length>0){if(void 0===i)throw new Error(\"non-empty tabs must have active component item\");let n=0,o=!1;const s=this._layoutManager.layoutConfig.settings.tabOverlapAllowance,r=this._tabs.indexOf(i.tab),a=this._tabs[r];this._lastVisibleTabIndex=-1;for(let i=0;ie){if(o)i===r&&(l.style.zIndex=\"auto\",l.style.marginLeft=\"\",l.parentElement!==this._element&&this._element.appendChild(l));else{let t;if(t=r>0&&r<=i?(d-e)/(i-1):(d-e)/i,tthis.onClick(t),this._touchStartListener=t=>this.onTouchStart(t),this._rowColumnClosable=!0,this._closeButton=null,this._popoutButton=null,this._tabsContainer=new Qt(this._layoutManager,(t=>this.handleTabInitiatedComponentRemoveEvent(t)),(t=>this.handleTabInitiatedComponentFocusEvent(t)),((t,e,i,n)=>this.handleTabInitiatedDragStartEvent(t,e,i,n)),(()=>this.processTabDropdownActiveChanged())),this._show=i.show,this._popoutEnabled=i.popoutEnabled,this._popoutLabel=i.popoutLabel,this._maximiseEnabled=i.maximiseEnabled,this._maximiseLabel=i.maximiseLabel,this._minimiseEnabled=i.minimiseEnabled,this._minimiseLabel=i.minimiseLabel,this._closeEnabled=i.closeEnabled,this._closeLabel=i.closeLabel,this._tabDropdownEnabled=i.tabDropdownEnabled,this._tabDropdownLabel=i.tabDropdownLabel,this.setSide(i.side),this._canRemoveComponent=this._configClosable,this._element=document.createElement(\"section\"),this._element.classList.add(\"lm_header\"),this._controlsContainerElement=document.createElement(\"section\"),this._controlsContainerElement.classList.add(\"lm_controls\"),this._element.appendChild(this._tabsContainer.element),this._element.appendChild(this._controlsContainerElement),this._element.appendChild(this._tabsContainer.dropdownElement),this._element.addEventListener(\"click\",this._clickListener,{passive:!0}),this._element.addEventListener(\"touchstart\",this._touchStartListener,{passive:!0}),this._documentMouseUpListener=()=>this._tabsContainer.hideAdditionalTabsDropdown(),globalThis.document.addEventListener(\"mouseup\",this._documentMouseUpListener,{passive:!0}),this._tabControlOffset=this._layoutManager.layoutConfig.settings.tabControlOffset,this._tabDropdownEnabled&&(this._tabDropdownButton=new Kt(this,this._tabDropdownLabel,\"lm_tabdropdown\",(()=>this._tabsContainer.showAdditionalTabsDropdown()))),this._popoutEnabled&&(this._popoutButton=new Kt(this,this._popoutLabel,\"lm_popout\",(()=>this.handleButtonPopoutEvent()))),this._maximiseEnabled&&(this._maximiseButton=new Kt(this,this._maximiseLabel,\"lm_maximise\",(t=>this.handleButtonMaximiseToggleEvent(t)))),this._configClosable&&(this._closeButton=new Kt(this,this._closeLabel,\"lm_close\",(()=>s()))),this.processTabDropdownActiveChanged()}get show(){return this._show}get side(){return this._side}get leftRightSided(){return this._leftRightSided}get layoutManager(){return this._layoutManager}get parent(){return this._parent}get tabs(){return this._tabsContainer.tabs}get lastVisibleTabIndex(){return this._tabsContainer.lastVisibleTabIndex}get element(){return this._element}get tabsContainerElement(){return this._tabsContainer.element}get controlsContainerElement(){return this._controlsContainerElement}destroy(){this.emit(\"destroy\"),this._popoutEvent=void 0,this._maximiseToggleEvent=void 0,this._clickEvent=void 0,this._touchStartEvent=void 0,this._componentRemoveEvent=void 0,this._componentFocusEvent=void 0,this._componentDragStartEvent=void 0,this._tabsContainer.destroy(),globalThis.document.removeEventListener(\"mouseup\",this._documentMouseUpListener),this._element.remove()}createTab(t,e){this._tabsContainer.createTab(t,e)}removeTab(t){this._tabsContainer.removeTab(t)}processActiveComponentChanged(t){this._tabsContainer.processActiveComponentChanged(t),this.updateTabSizes()}setSide(t){this._side=t,this._leftRightSided=[nt.right,nt.left].includes(this._side)}setRowColumnClosable(t){this._rowColumnClosable=t,this.updateClosability()}updateClosability(){let t;if(this._configClosable)if(this._rowColumnClosable){t=!0;const e=this.tabs.length;for(let i=0;i1}applyFocusedValue(t){t?this._element.classList.add(\"lm_focused\"):this._element.classList.remove(\"lm_focused\")}processMaximised(){if(void 0===this._maximiseButton)throw new J(\"HPMAX16997\");this._maximiseButton.element.setAttribute(\"title\",this._minimiseLabel)}processMinimised(){if(void 0===this._maximiseButton)throw new J(\"HPMIN16997\");this._maximiseButton.element.setAttribute(\"title\",this._maximiseLabel)}updateTabSizes(){if(this._tabsContainer.tabCount>0){const t=this._show?this._layoutManager.layoutConfig.dimensions.headerHeight:0;let e;this._leftRightSided?(this._element.style.height=\"\",this._element.style.width=zt(t)):(this._element.style.width=\"\",this._element.style.height=zt(t)),e=this._leftRightSided?this._element.offsetHeight-this._controlsContainerElement.offsetHeight-this._tabControlOffset:this._element.offsetWidth-this._controlsContainerElement.offsetWidth-this._tabControlOffset,this._tabsContainer.updateTabSizes(e,this._getActiveComponentItemEvent())}}handleTabInitiatedComponentRemoveEvent(t){if(this._canRemoveComponent){if(void 0===this._componentRemoveEvent)throw new J(\"HHTCE22294\");this._componentRemoveEvent(t)}}handleTabInitiatedComponentFocusEvent(t){if(void 0===this._componentFocusEvent)throw new J(\"HHTAE22294\");this._componentFocusEvent(t)}handleTabInitiatedDragStartEvent(t,e,i,n){if(this._canRemoveComponent){if(void 0===this._componentDragStartEvent)throw new J(\"HHTDSE22294\");this._componentDragStartEvent(t,e,i,n)}else i.cancelDrag()}processTabDropdownActiveChanged(){void 0!==this._tabDropdownButton&&Dt(this._tabDropdownButton.element,this._tabsContainer.dropdownActive)}handleButtonPopoutEvent(){if(this._layoutManager.layoutConfig.settings.popoutWholeStack){if(void 0===this._popoutEvent)throw new J(\"HHBPOE17834\");this._popoutEvent()}else{const t=this._getActiveComponentItemEvent();t&&t.popout()}}handleButtonMaximiseToggleEvent(t){if(void 0===this._maximiseToggleEvent)throw new J(\"HHBMTE16834\");this._maximiseToggleEvent()}onClick(t){t.target===this._element&&this.notifyClick(t)}onTouchStart(t){t.target===this._element&&this.notifyTouchStart(t)}notifyClick(t){if(void 0===this._clickEvent)throw new J(\"HNHC46834\");this._clickEvent(t)}notifyTouchStart(t){if(void 0===this._touchStartEvent)throw new J(\"HNHTS46834\");this._touchStartEvent(t)}}class ee extends $t{constructor(t,e,i){var n,o,s,r,a,l,h,d,c,m,u,p,g,f,v,_,y,C,w;super(t,e,i,ee.createElement(document)),this._headerSideChanged=!1,this._resizeListener=()=>this.handleResize(),this._maximisedListener=()=>this.handleMaximised(),this._minimisedListener=()=>this.handleMinimised(),this._headerConfig=e.header;const I=t.layoutConfig.header,b=e.content;let S;if(1!==b.length)S=void 0;else{S=b[0].header}this._initialWantMaximise=e.maximised,this._initialActiveItemIndex=null!==(n=e.activeItemIndex)&&void 0!==n?n:0;const E=null!==(r=null!==(s=null===(o=this._headerConfig)||void 0===o?void 0:o.show)&&void 0!==s?s:null==S?void 0:S.show)&&void 0!==r?r:I.show,x=null!==(h=null!==(l=null===(a=this._headerConfig)||void 0===a?void 0:a.popout)&&void 0!==l?l:null==S?void 0:S.popout)&&void 0!==h?h:I.popout,L=null!==(m=null!==(c=null===(d=this._headerConfig)||void 0===d?void 0:d.maximise)&&void 0!==c?c:null==S?void 0:S.maximise)&&void 0!==m?m:I.maximise,z=null!==(g=null!==(p=null===(u=this._headerConfig)||void 0===u?void 0:u.close)&&void 0!==p?p:null==S?void 0:S.close)&&void 0!==g?g:I.close,M=null!==(_=null!==(v=null===(f=this._headerConfig)||void 0===f?void 0:f.minimise)&&void 0!==v?v:null==S?void 0:S.minimise)&&void 0!==_?_:I.minimise,P=null!==(w=null!==(C=null===(y=this._headerConfig)||void 0===y?void 0:y.tabDropdown)&&void 0!==C?C:null==S?void 0:S.tabDropdown)&&void 0!==w?w:I.tabDropdown;this._maximisedEnabled=!1!==L;const T={show:!1!==E,side:!1===E?nt.top:E,popoutEnabled:!1!==x,popoutLabel:!1===x?\"\":x,maximiseEnabled:this._maximisedEnabled,maximiseLabel:!1===L?\"\":L,closeEnabled:!1!==z,closeLabel:!1===z?\"\":z,minimiseEnabled:!0,minimiseLabel:M,tabDropdownEnabled:!1!==P,tabDropdownLabel:!1===P?\"\":P};this._header=new te(t,this,T,e.isClosable&&!1!==z,(()=>this.getActiveComponentItem()),(()=>this.remove()),(()=>this.handlePopoutEvent()),(()=>this.toggleMaximise()),(t=>this.handleHeaderClickEvent(t)),(t=>this.handleHeaderTouchStartEvent(t)),(t=>this.handleHeaderComponentRemoveEvent(t)),(t=>this.handleHeaderComponentFocusEvent(t)),((t,e,i,n)=>this.handleHeaderComponentStartDragEvent(t,e,i,n))),this.isStack=!0,this._childElementContainer=document.createElement(\"section\"),this._childElementContainer.classList.add(\"lm_items\"),this.on(\"resize\",this._resizeListener),this._maximisedEnabled&&(this.on(\"maximised\",this._maximisedListener),this.on(\"minimised\",this._minimisedListener)),this.element.appendChild(this._header.element),this.element.appendChild(this._childElementContainer),this.setupHeaderPosition(),this._header.updateClosability()}get childElementContainer(){return this._childElementContainer}get header(){return this._header}get headerShow(){return this._header.show}get headerSide(){return this._header.side}get headerLeftRightSided(){return this._header.leftRightSided}get contentAreaDimensions(){return this._contentAreaDimensions}get initialWantMaximise(){return this._initialWantMaximise}get isMaximised(){return this===this.layoutManager.maximisedStack}get stackParent(){if(!this.parent)throw new Error(\"Stack should always have a parent\");return this.parent}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}init(){if(!0===this.isInitialised)return;this.updateNodeSize();for(let t=0;t0){if(this._initialActiveItemIndex<0||this._initialActiveItemIndex>=e)throw new Error(`ActiveItemIndex out of range: ${this._initialActiveItemIndex} id: ${this.id}`);for(let i=0;ithis.contentItems.length)throw e-=1,new X(\"SAC99728\");if(t instanceof jt)return e=super.addChild(t,e),this._childElementContainer.appendChild(t.element),this._header.createTab(t,e),this.setActiveComponentItem(t,i),this._header.updateTabSizes(),this.updateSize(!1),t.container.setBaseLogicalZIndex(),this._header.updateClosability(),this.emitStateChangedEvent(),e;throw new X(\"SACC88532\")}removeChild(t,e){const i=t,n=this.contentItems.indexOf(i),o=1===this.contentItems.length;if(this._activeComponentItem===i&&(i.focused&&i.blur(),!o)){const t=0===n?1:n-1;this.setActiveComponentItem(this.contentItems[t],!1)}this._header.removeTab(i),super.removeChild(i,e),o||this._header.updateClosability(),this.emitStateChangedEvent()}toggleMaximise(){this.isMaximised?this.minimise():this.maximise()}maximise(){if(!this.isMaximised){this.layoutManager.setMaximisedStack(this);const t=this.contentItems,e=t.length;for(let i=0;i0&&void 0===t)throw new Error(\"expected non-empty stack to have an active component item\");return{type:\"stack\",content:this.calculateConfigContent(),size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,isClosable:this.isClosable,maximised:this.isMaximised,header:this.createHeaderConfig(),activeItemIndex:t}}onDrop(t,e){if(\"header\"===this._dropSegment){if(this.resetHeaderDropZone(),void 0===this._dropIndex)throw new J(\"SODDI68990\");return void this.addChild(t,this._dropIndex)}if(\"body\"===this._dropSegment)return void this.addChild(t,0,!0);const i=\"top\"===this._dropSegment||\"bottom\"===this._dropSegment,n=\"left\"===this._dropSegment||\"right\"===this._dropSegment,o=\"top\"===this._dropSegment||\"left\"===this._dropSegment,s=i&&this.stackParent.isColumn||n&&this.stackParent.isRow;if(t.isComponent){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createAndInitContentItem(e,this);i.addChild(t),t=i}if(t.type===at.row||t.type===at.column){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}if(s){const e=this.stackParent.contentItems.indexOf(this);this.stackParent.addChild(t,o?e:e+1,!0),this.size*=.5,t.size=this.size,t.sizeUnit=this.sizeUnit,this.stackParent.updateSize(!1)}else{const e=i?at.column:at.row,n=ct.createDefault(e),s=this.layoutManager.createContentItem(n,this);this.stackParent.replaceChild(this,s),s.addChild(t,o?0:void 0,!0),s.addChild(this,o?void 0:0,!0),this.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}highlightDropZone(t,e){for(const i in this._contentAreaDimensions){const n=i,o=this._contentAreaDimensions[n].hoverArea;if(o.x1t&&o.y1e)return void(\"header\"===n?(this._dropSegment=\"header\",this.highlightHeaderDropZone(this._header.leftRightSided?e:t)):(this.resetHeaderDropZone(),this.highlightBodyDropZone(n)))}}getArea(){if(\"none\"===this.element.style.display)return null;const t=super.getElementArea(this._header.element),e=super.getElementArea(this._childElementContainer);if(null===t||null===e)throw new K(\"SGAHC13086\");const i=e.x2-e.x1,n=e.y2-e.y1;return this._contentAreaDimensions={header:{hoverArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2},highlightArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2}}},0===this.contentItems.length?(this._contentAreaDimensions.body={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2}},super.getElementArea(this.element)):(this._contentAreaDimensions.left={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x1+.25*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x1+.5*i,y2:e.y2}},this._contentAreaDimensions.top={hoverArea:{x1:e.x1+.25*i,y1:e.y1,x2:e.x1+.75*i,y2:e.y1+.5*n},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y1+.5*n}},this._contentAreaDimensions.right={hoverArea:{x1:e.x1+.75*i,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1+.5*i,y1:e.y1,x2:e.x2,y2:e.y2}},this._contentAreaDimensions.bottom={hoverArea:{x1:e.x1+.25*i,y1:e.y1+.5*n,x2:e.x1+.75*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1+.5*n,x2:e.x2,y2:e.y2}},super.getElementArea(this.element))}positionHeader(t){this._header.side!==t&&(this._header.setSide(t),this._headerSideChanged=!0,this.setupHeaderPosition())}updateNodeSize(){if(\"none\"!==this.element.style.display){const t=kt(this.element);if(this._header.show){t[this._header.leftRightSided?it.width:it.height]-=this.layoutManager.layoutConfig.dimensions.headerHeight}this._childElementContainer.style.width=zt(t.width),this._childElementContainer.style.height=zt(t.height);for(let e=0;e=o&&tthis.onDrag(t,e,i))),this._dragListener.on(\"dragStop\",(()=>this.onDrop())),this.createDragProxyElements(t,e),null===this._componentItem.parent)throw new K(\"DPC10097\");this._componentItemFocused=this._componentItem.focused,this._componentItemFocused&&this._componentItem.blur(),this._componentItem.parent.removeChild(this._componentItem,!0),this.setDimensions(),document.body.appendChild(this._element),this.determineMinMaxXY(),this._layoutManager.calculateItemAreas(),this.setDropPosition(t,e)}get element(){return this._element}createDragProxyElements(t,e){this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_dragProxy\");const i=document.createElement(\"div\");i.classList.add(\"lm_header\");const n=document.createElement(\"div\");n.classList.add(\"lm_tabs\");const o=document.createElement(\"div\");o.classList.add(\"lm_tab\");const s=document.createElement(\"span\");s.classList.add(\"lm_title\"),o.appendChild(s),n.appendChild(o),i.appendChild(n),this._proxyContainerElement=document.createElement(\"div\"),this._proxyContainerElement.classList.add(\"lm_content\"),this._element.appendChild(i),this._element.appendChild(this._proxyContainerElement),this._originalParent instanceof ee&&this._originalParent.headerShow&&(this._sided=this._originalParent.headerLeftRightSided,this._element.classList.add(\"lm_\"+this._originalParent.headerSide),[nt.right,nt.bottom].indexOf(this._originalParent.headerSide)>=0&&this._proxyContainerElement.insertAdjacentElement(\"afterend\",i)),this._element.style.left=zt(t),this._element.style.top=zt(e),o.setAttribute(\"title\",this._componentItem.title),s.insertAdjacentText(\"afterbegin\",this._componentItem.title),this._proxyContainerElement.appendChild(this._componentItem.element)}determineMinMaxXY(){const t=this._layoutManager.groundItem;if(void 0===t)throw new J(\"DPDMMXY73109\");{const e=t.element.getBoundingClientRect();this._minX=e.left+document.body.scrollLeft,this._minY=e.top+document.body.scrollTop,this._maxX=this._minX+e.width,this._maxY=this._minY+e.height}}onDrag(t,e,i){const n=i.pageX,o=i.pageY;this.setDropPosition(n,o),this._componentItem.drag()}setDropPosition(t,e){this._layoutManager.layoutConfig.settings.constrainDragToContainer&&(t<=this._minX?t=Math.ceil(this._minX):t>=this._maxX&&(t=Math.floor(this._maxX)),e<=this._minY?e=Math.ceil(this._minY):e>=this._maxY&&(e=Math.floor(this._maxY))),this._element.style.left=zt(t),this._element.style.top=zt(e),this._area=this._layoutManager.getArea(t,e),null!==this._area&&(this._lastValidArea=this._area,this._area.contentItem.highlightDropZone(t,e,this._area))}onDrop(){const t=this._layoutManager.dropTargetIndicator;if(null===t)throw new K(\"DPOD30011\");let e;if(t.hide(),this._componentItem.exitDragMode(),null!==this._area)e=this._componentItem,this._area.contentItem.onDrop(e,this._area);else if(null!==this._lastValidArea){e=this._componentItem;this._lastValidArea.contentItem.onDrop(e,this._lastValidArea)}else this._originalParent?(e=this._componentItem,this._originalParent.addChild(e)):this._componentItem.destroy();this._element.remove(),this._layoutManager.emit(\"itemDropped\",this._componentItem),this._componentItemFocused&&void 0!==e&&e.focus()}setDimensions(){const t=this._layoutManager.layoutConfig.dimensions;if(void 0===t)throw new Error(\"DragProxy.setDimensions: dimensions undefined\");let e=t.dragProxyWidth,i=t.dragProxyHeight;if(void 0===e||void 0===i)throw new Error(\"DragProxy.setDimensions: width and/or height undefined\");const n=!1===this._layoutManager.layoutConfig.header.show?0:t.headerHeight;this._element.style.width=zt(e),this._element.style.height=zt(i),e-=this._sided?n:0,i-=this._sided?0:n,this._proxyContainerElement.style.width=zt(e),this._proxyContainerElement.style.height=zt(i),this._componentItem.enterDragMode(e,i),this._componentItem.show()}}class ne{constructor(t,e,i,n,o,s,r){this._layoutManager=t,this._element=e,this._extraAllowableChildTargets=i,this._componentTypeOrFtn=n,this._componentState=o,this._title=s,this._id=r,this._dragListener=null,this._dummyGroundContainer=document.createElement(\"div\");const a=gt.createDefault(\"row\");this._dummyGroundContentItem=new Yt(this._layoutManager,a,this._dummyGroundContainer),this.createDragListener()}destroy(){this.removeDragListener()}createDragListener(){this.removeDragListener(),this._dragListener=new Zt(this._element,this._extraAllowableChildTargets),this._dragListener.on(\"dragStart\",((t,e)=>this.onDragStart(t,e))),this._dragListener.on(\"dragStop\",(()=>this.onDragStop()))}onDragStart(t,e){var i;const n=\"component\";let o;if(\"function\"==typeof this._componentTypeOrFtn){const t=this._componentTypeOrFtn();o=ne.isDragSourceComponentItemConfig(t)?{type:n,componentState:t.state,componentType:t.type,title:null!==(i=t.title)&&void 0!==i?i:this._title}:t}else o={type:n,componentState:this._componentState,componentType:this._componentTypeOrFtn,title:this._title,id:this._id};const s=bt.resolve(o,!1),r=new jt(this._layoutManager,s,this._dummyGroundContentItem);if(this._dummyGroundContentItem.contentItems.push(r),null===this._dragListener)throw new K(\"DSODSD66746\");{const i=new ie(t,e,this._dragListener,this._layoutManager,r,this._dummyGroundContentItem),n=this._layoutManager.transitionIndicator;if(null===n)throw new K(\"DSODST66746\");n.transitionElements(this._element,i.element)}}onDragStop(){this.createDragListener()}removeDragListener(){null!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=null)}}!function(t){t.isDragSourceComponentItemConfig=function(t){return!(\"componentType\"in t)}}(ne||(ne={}));class oe{constructor(){this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_dropTargetIndicator\");const t=document.createElement(\"div\");t.classList.add(\"lm_inner\"),this._element.appendChild(t),document.body.appendChild(this._element)}destroy(){this._element.remove()}highlightArea(t,e){this._element.style.left=zt(t.x1+e),this._element.style.top=zt(t.y1+e),this._element.style.width=zt(t.x2-t.x1-e),this._element.style.height=zt(t.y2-t.y1-e),this._element.style.display=\"block\"}hide(){Dt(this._element,!1)}}class se{constructor(){this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_transition_indicator\"),document.body.appendChild(this._element),this._toElement=null,this._fromDimensions=null,this._totalAnimationDuration=200,this._animationStartTime=null}destroy(){this._element.remove()}transitionElements(t,e){}nextAnimationFrame(){}measure(t){const e=t.getBoundingClientRect();return{left:e.left,top:e.top,width:t.offsetWidth,height:t.offsetHeight}}}class re extends Wt{constructor(t){super(),this._layoutManager=t,this._childEventListener=t=>this.onEventFromChild(t),globalThis.addEventListener(re.ChildEventName,this._childEventListener,{passive:!0})}emit(t,...e){\"userBroadcast\"===t?this.emitUserBroadcast(...e):super.emit(t,...e)}emitUserBroadcast(...t){this.handleUserBroadcastEvent(\"userBroadcast\",t)}destroy(){globalThis.removeEventListener(re.ChildEventName,this._childEventListener)}handleUserBroadcastEvent(t,e){this._layoutManager.isSubWindow?this.propagateToParent(t,e):this.propagateToThisAndSubtree(t,e)}onEventFromChild(t){const e=t.detail;this.handleUserBroadcastEvent(e.eventName,e.args)}propagateToParent(t,e){const i={bubbles:!0,cancelable:!0,detail:{layoutManager:this._layoutManager,eventName:t,args:e}},n=new CustomEvent(re.ChildEventName,i),o=globalThis.opener;if(null===o)throw new K(\"EHPTP15778\");o.dispatchEvent(n)}propagateToThisAndSubtree(t,e){this.emitUnknown(t,...e);for(let i=0;ithis.handleContainerResize())),this._windowBeforeUnloadListener=()=>this.onBeforeUnload(),this._windowBeforeUnloadListening=!1,this._maximisedStackBeforeDestroyedListener=t=>this.cleanupBeforeMaximisedStackDestroyed(t),this.isSubWindow=t.isSubWindow,this._constructorOrSubWindowLayoutConfig=t.constructorOrSubWindowLayoutConfig,Q.checkInitialise(),dt.checkInitialise(),void 0!==t.containerElement&&(this._containerElement=t.containerElement)}get container(){return this._containerElement}get isInitialised(){return this._isInitialised}get groundItem(){return this._groundItem}get root(){return this._groundItem}get openPopouts(){return this._openPopouts}get dropTargetIndicator(){return this._dropTargetIndicator}get transitionIndicator(){return this._transitionIndicator}get width(){return this._width}get height(){return this._height}get eventHub(){return this._eventHub}get rootItem(){if(void 0===this._groundItem)throw new Error(\"Cannot access rootItem before init\");return 0===this._groundItem.contentItems.length?void 0:this._groundItem.contentItems[0]}get focusedComponentItem(){return this._focusedComponentItem}get tabDropPlaceholder(){return this._tabDropPlaceholder}get maximisedStack(){return this._maximisedStack}get deprecatedConstructor(){return!this.isSubWindow&&void 0!==this._constructorOrSubWindowLayoutConfig}destroy(){if(this._isInitialised){this._windowBeforeUnloadListening&&(globalThis.removeEventListener(\"beforeunload\",this._windowBeforeUnloadListener),this._windowBeforeUnloadListening=!1),!0===this.layoutConfig.settings.closePopoutsOnUnload&&this.closeAllOpenPopouts(),this._resizeObserver.disconnect(),this.checkClearResizeTimeout(),void 0!==this._groundItem&&this._groundItem.destroy(),this._tabDropPlaceholder.remove(),null!==this._dropTargetIndicator&&this._dropTargetIndicator.destroy(),null!==this._transitionIndicator&&this._transitionIndicator.destroy(),this._eventHub.destroy();for(const t of this._dragSources)t.destroy();this._dragSources=[],this._isInitialised=!1}}minifyConfig(t){return _t.minifyConfig(t)}unminifyConfig(t){return _t.unminifyConfig(t)}init(){let t;if(this.setContainer(),this._dropTargetIndicator=new oe,this._transitionIndicator=new se,this.updateSizeFromContainer(),this.isSubWindow){if(void 0===this._constructorOrSubWindowLayoutConfig)throw new J(\"LMIU07155\");{const e=this._constructorOrSubWindowLayoutConfig.root;if(void 0===e)throw new X(\"LMIC07156\");if(!Ct.isComponent(e))throw new X(\"LMIC07157\");t=e;const i=xt.resolve(this._constructorOrSubWindowLayoutConfig);this.layoutConfig=Object.assign(Object.assign({},i),{root:void 0})}}else void 0===this._constructorOrSubWindowLayoutConfig?this.layoutConfig=_t.createDefault():this.layoutConfig=xt.resolve(this._constructorOrSubWindowLayoutConfig);const e=this.layoutConfig;this._groundItem=new Yt(this,e.root,this._containerElement),this._groundItem.init(),this.checkLoadedLayoutMaximiseItem(),this._resizeObserver.observe(this._containerElement),this._isInitialised=!0,this.adjustColumnsResponsive(),this.emit(\"initialised\"),void 0!==t&&this.loadComponentAsRoot(t)}loadLayout(t){if(!this.isInitialised)throw new Error(\"GoldenLayout: Need to call init() if LayoutConfig with defined root passed to constructor\");if(void 0===this._groundItem)throw new J(\"LMLL11119\");this.createSubWindows(),this.layoutConfig=xt.resolve(t),this._groundItem.loadRoot(this.layoutConfig.root),this.checkLoadedLayoutMaximiseItem(),this.adjustColumnsResponsive()}saveLayout(){if(!1===this._isInitialised)throw new Error(\"Can't create config, layout not yet initialised\");if(void 0===this._groundItem)throw new J(\"LMTC18244\");{const t=this._groundItem.calculateConfigContent();let e;e=1!==t.length?void 0:t[0],this.reconcilePopoutWindows();const i=[];for(let t=0;t=0?n=this._groundItem.contentItems[0]:e=0;break;case at.row:case at.column:e=n.addItem(t,i.index);break;case at.stack:if(Ct.isComponent(t)){e=n.addItem(t,i.index);break}throw Error(tt[6]);case at.component:throw new X(\"LMAIALC87444602\");default:throw new Y(\"LMAIALU98881733\",n.type)}if(Ct.isComponent(t)){const t=n.contentItems[e];Gt.isStack(t)&&(n=t,e=0)}return i.parentItem=n,i.index=e,i}}}loadComponentAsRoot(t){if(void 0===this._groundItem)throw new Error(\"Cannot add item before init\");this._groundItem.loadComponentAsRoot(t)}updateSize(t,e){this.setSize(t,e)}setSize(t,e){if(this._width=t,this._height=e,!0===this._isInitialised){if(void 0===this._groundItem)throw new J(\"LMUS18881\");if(this._groundItem.setSize(this._width,this._height),this._maximisedStack){const{width:t,height:e}=kt(this._containerElement);Tt(this._maximisedStack.element,t),At(this._maximisedStack.element,e),this._maximisedStack.updateSize(!1)}this.adjustColumnsResponsive()}}beginSizeInvalidation(){this._sizeInvalidationBeginCount++}endSizeInvalidation(){0==--this._sizeInvalidationBeginCount&&this.updateSizeFromContainer()}updateSizeFromContainer(){const{width:t,height:e}=kt(this._containerElement);this.setSize(t,e)}updateRootSize(t=!1){if(void 0===this._groundItem)throw new J(\"LMURS28881\");this._groundItem.updateSize(t)}createAndInitContentItem(t,e){const i=this.createContentItem(t,e);return i.init(),i}createContentItem(t,e){if(\"string\"!=typeof t.type)throw new G(\"Missing parameter 'type'\",JSON.stringify(t));if(ct.isComponentItem(t)&&!(e instanceof ee)&&e&&!(!0===this.isSubWindow&&e instanceof Yt)){t={type:at.stack,content:[t],size:t.size,sizeUnit:t.sizeUnit,minSize:t.minSize,minSizeUnit:t.minSizeUnit,id:t.id,maximised:t.maximised,isClosable:t.isClosable,activeItemIndex:0,header:void 0}}return this.createContentItemFromConfig(t,e)}findFirstComponentItemById(t){if(void 0===this._groundItem)throw new J(\"LMFFCIBI82446\");return this.findFirstContentItemTypeByIdRecursive(at.component,t,this._groundItem)}createPopout(t,e,i,n){return t instanceof Gt?this.createPopoutFromContentItem(t,e,i,n):this.createPopoutFromItemConfig(t,e,i,n)}createPopoutFromContentItem(t,e,i,n){let o=t.parent,s=t;for(;null!==o&&1===o.contentItems.length&&!o.isGround;)s=o,o=o.parent;if(null===o)throw new K(\"LMCPFCI00834\");{if(void 0===n&&(n=o.contentItems.indexOf(s)),null!==i&&o.addPopInParentId(i),void 0===e){const i=globalThis.screenX||globalThis.screenLeft,n=globalThis.screenY||globalThis.screenTop,o=t.element.offsetLeft,s=t.element.offsetTop,{width:r,height:a}=kt(t.element);e={left:i+o,top:n+s,width:r,height:a}}const r=t.toConfig();if(t.remove(),ft.isRootItemConfig(r))return this.createPopoutFromItemConfig(r,e,i,n);throw new Error(`${tt[0]}`)}}beginVirtualSizedContainerAdding(){0==++this._virtualSizedContainerAddingBeginCount&&(this._virtualSizedContainers.length=0)}addVirtualSizedContainer(t){this._virtualSizedContainers.push(t)}endVirtualSizedContainerAdding(){if(0==--this._virtualSizedContainerAddingBeginCount){const t=this._virtualSizedContainers.length;if(t>0){this.fireBeforeVirtualRectingEvent(t);for(let e=0;ethis.emit(\"windowOpened\",a))),a.on(\"closed\",(()=>this.reconcilePopoutWindows())),this._openPopouts.push(a),this.layoutConfig.settings.closePopoutsOnUnload&&!this._windowBeforeUnloadListening&&(globalThis.addEventListener(\"beforeunload\",this._windowBeforeUnloadListener,{passive:!0}),this._windowBeforeUnloadListening=!0),a}closeAllOpenPopouts(){for(let t=0;tglobalThis.close()),1)}getArea(t,e){let i=null,n=1/0;for(let o=0;o=s.x1&&t=s.y1&&es.surface&&(n=s.surface,i=s)}return i}calculateItemAreas(){const t=this.getAllContentItems(),e=this._groundItem;if(void 0===e)throw new J(\"LMCIAR44365\");if(1!==t.length){e.contentItems[0].isStack?this._itemAreas=[]:this._itemAreas=e.createSideAreas();for(let e=0;e0){let e=t[0];if(Gt.isComponentItem(e)){const t=e.parent;if(null===t)throw new K(\"LMXLLMI69999\");e=t}if(!Gt.isStack(e))throw new X(\"LMCLLMI19993\");e.maximise()}}}processMaximiseStack(t){if(this._maximisedStack=t,t.on(\"beforeItemDestroyed\",this._maximisedStackBeforeDestroyedListener),t.element.classList.add(\"lm_maximised\"),t.element.insertAdjacentElement(\"afterend\",this._maximisePlaceholder),void 0===this._groundItem)throw new J(\"LMMXI19993\");{this._groundItem.element.prepend(t.element);const{width:e,height:i}=kt(this._containerElement);Tt(t.element,e),At(t.element,i),t.updateSize(!0),t.focusActiveContentItem(),this._maximisedStack.emit(\"maximised\"),this.emit(\"stateChanged\")}}processMinimiseMaximisedStack(){if(void 0===this._maximisedStack)throw new X(\"LMMMS74422\");{const t=this._maximisedStack;if(null===t.parent)throw new K(\"LMMI13668\");t.element.classList.remove(\"lm_maximised\"),this._maximisePlaceholder.insertAdjacentElement(\"afterend\",t.element),this._maximisePlaceholder.remove(),this.updateRootSize(!0),this._maximisedStack=void 0,t.off(\"beforeItemDestroyed\",this._maximisedStackBeforeDestroyedListener),t.emit(\"minimised\"),this.emit(\"stateChanged\")}}reconcilePopoutWindows(){const t=[];for(let e=0;e{this._resizeTimeoutId=void 0,this.beginSizeInvalidation(),this.endSizeInvalidation()}),this.resizeDebounceInterval))}checkClearResizeTimeout(){void 0!==this._resizeTimeoutId&&(clearTimeout(this._resizeTimeoutId),this._resizeTimeoutId=void 0)}setContainer(){var t;const e=document.body,i=null!==(t=this._containerElement)&&void 0!==t?t:e;if(i===e){this.resizeWithContainerAutomatically=!0;const t=document.documentElement;t.style.height=\"100%\",t.style.margin=\"0\",t.style.padding=\"0\",t.style.overflow=\"clip\",e.style.height=\"100%\",e.style.margin=\"0\",e.style.padding=\"0\",e.style.overflow=\"clip\"}this._containerElement=i}onBeforeUnload(){this.destroy()}adjustColumnsResponsive(){if(void 0===this._groundItem)throw new J(\"LMACR20883\");if(this._firstLoad=!1,this.useResponsiveLayout()&&!this._updatingColumnsResponsive&&this._groundItem.contentItems.length>0&&this._groundItem.contentItems[0].isRow){if(void 0===this._groundItem||null===this._width)throw new J(\"LMACR77412\");{const t=this._groundItem.contentItems[0].contentItems.length;if(t<=1)return;{const e=this.layoutConfig.dimensions.defaultMinItemWidth;if(t*e<=this._width)return;{this._updatingColumnsResponsive=!0;const i=t-Math.max(Math.floor(this._width/e),1),n=this._groundItem.contentItems[0],o=this.getAllStacks();if(0===o.length)throw new X(\"LMACRS77413\");{const t=o[0];for(let e=0;en?void 0:{parentItem:t,index:o}}}case 1:if(void 0===this._focusedComponentItem)return;{const t=this._focusedComponentItem.parentItem;return this.tryCreateLocationFromParentItem(t,e)}case 2:{const t=this.findFirstContentItemType(at.stack);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 3:{let t=this.findFirstContentItemType(at.row);return void 0!==t?this.tryCreateLocationFromParentItem(t,e):(t=this.findFirstContentItemType(at.column),void 0!==t?this.tryCreateLocationFromParentItem(t,e):void 0)}case 4:{const t=this.findFirstContentItemType(at.row);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 5:{const t=this.findFirstContentItemType(at.column);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 6:if(void 0===this._groundItem)throw new J(\"LMFLRIF18244\");return void 0!==this.rootItem?void 0:void 0===e||0===e?{parentItem:this._groundItem,index:0}:void 0;case 7:if(void 0===this._groundItem)throw new J(\"LMFLF18244\");{const t=this._groundItem.contentItems;if(0===t.length)return void 0===e||0===e?{parentItem:this._groundItem,index:0}:void 0;{const i=t[0];return this.tryCreateLocationFromParentItem(i,e)}}}}tryCreateLocationFromParentItem(t,e){const i=t.contentItems.length;return void 0===e?{parentItem:t,index:i}:e<0||e>i?void 0:{parentItem:t,index:e}}}!function(t){t.createMaximisePlaceElement=function(t){const e=t.createElement(\"div\");return e.classList.add(\"lm_maximise_place\"),e},t.createTabDropPlaceholderElement=function(t){const e=t.createElement(\"div\");return e.classList.add(\"lm_drop_tab_placeholder\"),e},t.defaultLocationSelectors=[{typeId:1,index:void 0},{typeId:2,index:void 0},{typeId:3,index:void 0},{typeId:7,index:void 0}],t.afterFocusedItemIfPossibleLocationSelectors=[{typeId:0,index:1},{typeId:2,index:void 0},{typeId:3,index:void 0},{typeId:7,index:void 0}]}(ae||(ae={}));class le extends ae{constructor(t,e,i,n){if(super(le.createLayoutManagerConstructorParameters(t,e)),this._bindComponentEventHanlderPassedInConstructor=!1,this._creationTimeoutPassed=!1,void 0!==e&&\"function\"==typeof e&&(this.bindComponentEvent=e,this._bindComponentEventHanlderPassedInConstructor=!0,void 0!==i&&(this.unbindComponentEvent=i)),!this._bindComponentEventHanlderPassedInConstructor&&this.isSubWindow){if(void 0===this._constructorOrSubWindowLayoutConfig)throw new J(\"VLC98823\");{const t=xt.resolve(this._constructorOrSubWindowLayoutConfig);this.layoutConfig=Object.assign(Object.assign({},t),{root:void 0})}}!0!==n&&(this.deprecatedConstructor||this.init())}destroy(){this.bindComponentEvent=void 0,this.unbindComponentEvent=void 0,super.destroy()}init(){if(this._bindComponentEventHanlderPassedInConstructor||\"loading\"!==document.readyState&&null!==document.body){if(!this._bindComponentEventHanlderPassedInConstructor&&!0===this.isSubWindow&&!this._creationTimeoutPassed)return setTimeout((()=>this.init()),7),void(this._creationTimeoutPassed=!0);!0===this.isSubWindow&&(this._bindComponentEventHanlderPassedInConstructor||this.clearHtmlAndAdjustStylesForSubWindow(),window.__glInstance=this),super.init()}else document.addEventListener(\"DOMContentLoaded\",(()=>this.init()),{passive:!0})}clearHtmlAndAdjustStylesForSubWindow(){const t=document.head,e=new Array(4);e[0]=document.querySelectorAll(\"body link\"),e[1]=document.querySelectorAll(\"body style\"),e[2]=document.querySelectorAll(\"template\"),e[3]=document.querySelectorAll(\".gl_keep\");for(let i=0;ithis.emit(\"popIn\"))),document.body.appendChild(t),!0}}bindComponent(t,e){if(void 0!==this.bindComponentEvent){return this.bindComponentEvent(t,e)}if(void 0!==this.getComponentEvent)return{virtual:!1,component:this.getComponentEvent(t,e)};{const t=`${tt[2]}: ${JSON.stringify(e)}`;throw new Z(t)}}unbindComponent(t,e,i){if(void 0!==this.unbindComponentEvent)this.unbindComponentEvent(t);else if(!e&&void 0!==this.releaseComponentEvent){if(void 0===i)throw new J(\"VCUCRCU333998\");this.releaseComponentEvent(t,i)}}}!function(t){let e=!1;t.createLayoutManagerConstructorParameters=function(t,i){const n=e?null:new URL(document.location.href).searchParams.get(\"gl-window\");e=!0;const o=null!==n;let s,r;if(null!==n){const e=localStorage.getItem(n);if(null===e)throw new Error(\"Null gl-window Config\");localStorage.removeItem(n);const i=JSON.parse(e),o=_t.unminifyConfig(i);r=xt.fromResolved(o),t instanceof HTMLElement&&(s=t)}else void 0===t?r=void 0:t instanceof HTMLElement?(r=void 0,s=t):r=t,void 0===s&&i instanceof HTMLElement&&(s=i);return{constructorOrSubWindowLayoutConfig:r,isSubWindow:o,containerElement:s}}}(le||(le={}));class he extends le{constructor(t,e,i){super(t,e,i,!0),this._componentTypesMap=new Map,this._registeredComponentMap=new Map,this._virtuableComponentMap=new Map,this._containerVirtualRectingRequiredEventListener=(t,e,i)=>this.handleContainerVirtualRectingRequiredEvent(t,e,i),this._containerVirtualVisibilityChangeRequiredEventListener=(t,e)=>this.handleContainerVirtualVisibilityChangeRequiredEvent(t,e),this._containerVirtualZIndexChangeRequiredEventListener=(t,e,i)=>this.handleContainerVirtualZIndexChangeRequiredEvent(t,e,i),this.deprecatedConstructor||this.init()}registerComponent(t,e,i=!1){if(\"function\"!=typeof e)throw new $(\"registerComponent() componentConstructorOrFactoryFtn parameter is not a function\");if(e.hasOwnProperty(\"prototype\")){const n=e;this.registerComponentConstructor(t,n,i)}else{const n=e;this.registerComponentFactoryFunction(t,n,i)}}registerComponentConstructor(t,e,i=!1){if(\"function\"!=typeof e)throw new Error(tt[1]);if(void 0!==this._componentTypesMap.get(t))throw new Z(`${tt[3]}: ${t}`);this._componentTypesMap.set(t,{constructor:e,factoryFunction:void 0,virtual:i})}registerComponentFactoryFunction(t,e,i=!1){if(\"function\"!=typeof e)throw new Z(\"Please register a constructor function\");if(void 0!==this._componentTypesMap.get(t))throw new Z(`${tt[3]}: ${t}`);this._componentTypesMap.set(t,{constructor:void 0,factoryFunction:e,virtual:i})}registerComponentFunction(t){this.registerGetComponentConstructorCallback(t)}registerGetComponentConstructorCallback(t){if(\"function\"!=typeof t)throw new Error(\"Please register a callback function\");void 0!==this._getComponentConstructorFtn&&console.warn(\"Multiple component functions are being registered. Only the final registered function will be used.\"),this._getComponentConstructorFtn=t}getRegisteredComponentTypeNames(){const t=this._componentTypesMap.keys();return Array.from(t)}getComponentInstantiator(t){let e;const i=pt.resolveComponentTypeName(t);return void 0!==i&&(e=this._componentTypesMap.get(i)),void 0===e&&void 0!==this._getComponentConstructorFtn&&(e={constructor:this._getComponentConstructorFtn(t),factoryFunction:void 0,virtual:!1}),e}bindComponent(t,e){let i;const n=pt.resolveComponentTypeName(e);let o;if(void 0!==n&&(i=this._componentTypesMap.get(n)),void 0===i&&void 0!==this._getComponentConstructorFtn&&(i={constructor:this._getComponentConstructorFtn(e),factoryFunction:void 0,virtual:!1}),void 0!==i){const s=i.virtual;let r,a;r=void 0===e.componentState?void 0:Ut({},e.componentState);const l=i.constructor;if(void 0!==l)a=new l(t,r,s);else{const e=i.factoryFunction;if(void 0===e)throw new X(\"LMBCFFU10008\");a=e(t,r,s)}if(s){if(void 0===a)throw new J(\"GLBCVCU988774\");{const e=a,i=e.rootHtmlElement;if(void 0===i)throw new Z(`${tt[5]}: ${n}`);!function(t){const e=\"absolute\";t.style.position!==e&&(t.style.position=e)}(i),this.container.appendChild(i),this._virtuableComponentMap.set(t,e),t.virtualRectingRequiredEvent=this._containerVirtualRectingRequiredEventListener,t.virtualVisibilityChangeRequiredEvent=this._containerVirtualVisibilityChangeRequiredEventListener,t.virtualZIndexChangeRequiredEvent=this._containerVirtualZIndexChangeRequiredEventListener}}this._registeredComponentMap.set(t,a),o={virtual:i.virtual,component:a}}else o=super.bindComponent(t,e);return o}unbindComponent(t,e,i){if(void 0===this._registeredComponentMap.get(t))super.unbindComponent(t,e,i);else{const e=this._virtuableComponentMap.get(t);if(void 0!==e){const i=e.rootHtmlElement;if(void 0===i)throw new X(\"GLUC77743\",t.title);this.container.removeChild(i),this._virtuableComponentMap.delete(t)}}}fireBeforeVirtualRectingEvent(t){this._goldenLayoutBoundingClientRect=this.container.getBoundingClientRect(),super.fireBeforeVirtualRectingEvent(t)}handleContainerVirtualRectingRequiredEvent(t,e,i){const n=this._virtuableComponentMap.get(t);if(void 0===n)throw new J(\"GLHCSCE55933\");{const o=n.rootHtmlElement;if(void 0===o)throw new Z(tt[4]+\" \"+t.title);{const n=t.element.getBoundingClientRect(),s=n.left-this._goldenLayoutBoundingClientRect.left;o.style.left=zt(s);const r=n.top-this._goldenLayoutBoundingClientRect.top;o.style.top=zt(r),Tt(o,e),At(o,i)}}}handleContainerVirtualVisibilityChangeRequiredEvent(t,e){const i=this._virtuableComponentMap.get(t);if(void 0===i)throw new J(\"GLHCVVCRE55934\");{const n=i.rootHtmlElement;if(void 0===n)throw new Z(tt[4]+\" \"+t.title);Dt(n,e)}}handleContainerVirtualZIndexChangeRequiredEvent(t,e,i){const n=this._virtuableComponentMap.get(t);if(void 0===n)throw new J(\"GLHCVZICRE55935\");{const e=n.rootHtmlElement;if(void 0===e)throw new Z(tt[4]+\" \"+t.title);e.style.zIndex=i}}}const de=\"initial_\",ce={show:\"top\",popout:!1,maximise:!1,close:\"close-tab-unused\"},me={headerHeight:31},ue={hasHeaders:!0,reorderEnabled:!0},pe={popoutWholeStack:!1,constrainDragToContainer:!1,constrainDragToHeaders:!1,preventDragout:!1,showMaximiseIcon:!1,showPopoutIcon:!1,showCloseIcon:!1,blockedPopoutsThrowError:!0,closePopoutsOnUnload:!0,selectionEnabled:!1};var ge,fe;class ve{constructor(e){this.layout=e,ge.set(this,void 0),fe.set(this,void 0),this.handleResize=t=>{t.forEach((t=>this.resizeElement(t.target)))},this.handleMutation=()=>{this.layout.viewComponentsByContainerElement.forEach((t=>{this.resizeElement(t.container.element)}))},t.__classPrivateFieldSet(this,ge,new ResizeObserver(this.handleResize),\"f\"),t.__classPrivateFieldSet(this,fe,new MutationObserver(this.handleMutation),\"f\")}observeMutations(e){t.__classPrivateFieldGet(this,fe,\"f\")?.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[\"class\"]})}destroy(){t.__classPrivateFieldGet(this,ge,\"f\").disconnect(),t.__classPrivateFieldGet(this,fe,\"f\").disconnect()}observeContainer(e){t.__classPrivateFieldGet(this,ge,\"f\").observe(e)}unobserveContainer(e){t.__classPrivateFieldGet(this,ge,\"f\").unobserve(e)}resizeElement(t){const e=this.layout.viewComponentsByContainerElement.get(t);e&&e.resize()}}ge=new WeakMap,fe=new WeakMap;var _e={};Object.defineProperty(_e,\"__esModule\",{value:!0});var ye=_e.BaseItem=void 0;class Ce{constructor(t,e,i){this._item=t,this._layout=e,this._wrap=i}get raw(){return this._item}get layout(){return this._layout}get type(){return this._item.type}get contentItems(){return(this._item.contentItems??[]).map((t=>this._wrap(t)))}get parent(){const t=this._item.parent;return t?this._wrap(t):null}setActiveContentItem(t,e){if(\"stack\"!==this.type)throw new Error(`Cannot call setActiveContentItem from a non-stack item: ${this.type}`);this._item.setActiveContentItem(t.raw,e)}static wrapInternal(t,e,i){const n=Ce.wrapCache.get(e);if(n)return n;const o=new t(e,i,(e=>Ce.wrapInternal(t,e,i)));return Ce.wrapCache.set(e,o),o}}ye=_e.BaseItem=Ce,Ce.wrapCache=new WeakMap;const we=t=>!!t&&\"contentItems\"in t&&(t.isRow||t.isColumn);class Ie extends ye{isRoot(){return!!this._item.parent?.isGround}getBounds(){return this._item.element.getBoundingClientRect()}get viewName(){if(this._item.isComponent){const{component:t}=this._item;return t.identity.name}throw new Error(\"View name not found\")}onDestroyed(t){const e=({target:i})=>{i===this._item&&(t(),this._item.off(\"itemDestroyed\",e))};this._item.on(\"itemDestroyed\",e)}createAdjacentStack({position:t=\"right\"}={}){const e=this.raw;if(ee.isStack(e)&&e.parent){const i=[\"top\",\"bottom\"].includes(t)?\"column\":\"row\",n=[\"left\",\"top\"].includes(t)?1:0,o=we(e.parent)?e.parent:e.layoutManager,s=o,r=e.parent.contentItems.indexOf(e);e.parent.isGround&&e.parent.removeChild(e,!0);const a=o.newItem({type:i,content:[{type:\"stack\",content:[]}]},r);if(!a)throw new Error(\"createAdjacentStack: Failed to create new container\");const l=a.contentItems[0];return a.addChild(this.raw,n),we(s)&&s.removeChild(e,!0),this._wrap(l)}throw new Error(`Cannot creat adjacent stacks for type: ${e.type}, must be type 'stack'`)}setActiveContentItem(t,e=!0){if(!ee.isStack(this._item))throw new Error(`Cannot call setActiveContentItem from a non-stack item: ${this.type}`);this._item.setActiveComponentItem(t.raw,!e)}static wrap(t,e){return ye.wrapInternal(Ie,t,e)}}function be(t=[],e){for(const i of t)\"component\"===i.type?Object.keys(e).forEach((t=>{t in i&&(i.componentState={[`${de}${t}`]:i[t],...i.componentState}),i[t]=e[t]})):be(i.content,e)}function Se(t=[],e,i){for(const n of t)if(\"component\"===n.type)Object.keys(e).forEach((t=>{if(`${de}${t}`in n.componentState)return n[t]=n.componentState[`${de}${t}`],void delete n.componentState[`${de}${t}`];n[t]=e[t]}));else{if(n.size&&(\"row\"===i||\"column\"===i)){n[\"row\"===i?\"width\":\"height\"]=n.size?.includes(\".\")?parseFloat(n.size):parseInt(n.size)}Se(n.content,e,n.type)}}function Ee(t){if(t.root){t.root.content&&Se([t.root],{componentName:\"view\",isClosable:!0});const e=t.root;t.content=[e],delete t.root}return t}const xe=e=>class extends e{connectedCallback(){if(!this.name||!this.uuid)throw new Error(\" Name or uuid attribute missing\");if(!this.src)throw new Error(\" missing 'src' attribute.\");this.#t||(this.#t=document.createElement(\"iframe\"),this.#t.src=this.src,this.#t.style.height=\"100%\",this.#t.style.width=\"100%\",this.#t.style.border=\"none\",this.forceFrameName?this.#t.setAttribute(\"name\",this.forceFrameName):this.#t.setAttribute(\"name\",t.encodeOptions({brokerUrl:this.brokerUrl,name:this.name,uuid:this.uuid,providerId:this.providerId,contextGroup:this.contextGroup},\"of-frame\")),this.#t.setAttribute(\"id\",this.name),this.appendChild(this.#t))}#t;get brokerUrl(){return this.getAttribute(\"of-broker\")}set brokerUrl(t){t&&this.setAttribute(\"of-broker\",t)}get name(){return this.getAttribute(\"of-name\")}set name(t){t&&this.setAttribute(\"of-name\",t)}get forceFrameName(){return this.getAttribute(\"forceFrameName\")}set forceFrameName(t){t&&this.setAttribute(\"forceFrameName\",t)}get uuid(){return this.getAttribute(\"of-uuid\")}set uuid(t){t&&this.setAttribute(\"of-uuid\",t)}get src(){return this.getAttribute(\"src\")}set src(t){t&&this.setAttribute(\"src\",t)}get providerId(){return this.getAttribute(\"of-provider-id\")}set providerId(t){t&&this.setAttribute(\"of-provider-id\",t)}get contextGroup(){return this.getAttribute(\"of-context-group\")}set contextGroup(t){t&&this.setAttribute(\"of-context-group\",t)}static get observedAttributes(){return[\"name\"]}};class Le{static create(t){const e=document.createElement(\"of-view\");return Object.entries(t).forEach((([t,i])=>{e.setAttribute(t,i)})),e}}customElements.define(\"of-view\",xe(HTMLElement));class ze{constructor(t,i,n,{brokerUrl:o,interopConfig:s},r){this.container=t,this.config=i,this.ofView=null,this.isDragging=()=>this.container.tab.element?.className.includes(\"lm_dragging\")??!1;const{url:a,web:l,interop:h,name:d}=i||{},c=d??`internal-generated-view-${e.v4()}`;if(this.identity={uuid:n,name:c},this.container.element.setAttribute(\"of-name\",c),this.container.element.id=`container-${c}`,this.container.parent.id=c,void 0===a)return void this.handleUrlMissing();const m=this.updateTitleIfNotSet(a),u={\"of-broker\":o,\"of-uuid\":n,\"of-name\":c,src:a};l?.frameName&&(u.forceFrameName=l.frameName);const p=h?.currentContextGroup??s?.currentContextGroup;p&&(u[\"of-context-group\"]=p),s?.providerId&&(u[\"of-provider-id\"]=s?.providerId),this.ofView=Le.create(u),this.ofView.title=m??`Iframe: ${a}`,r.appendChild(this.ofView),this.ofView.style.position=\"absolute\"}updateTitleIfNotSet(t){return\"view\"===this.container.parent.title&&this.container.parent.setTitle(t),this.container.parent.title}handleUrlMissing(){const t=document.createElement(\"div\");t.setAttribute(\"style\",\"padding: 20px\");t.innerText=\"No URL provided\",this.container.element.appendChild(t)}destroy(){this.ofView?.remove(),this.ofView=null}closeView(){this.container.close()}resize(){if(this.ofView){if(this.isDragging())return void(this.ofView.style.display=\"none\");const t=this.container.element.getBoundingClientRect();this.ofView.style.position=\"absolute\",this.ofView.style.height=`${t.height}px`,this.ofView.style.width=`${t.width}px`,this.ofView.style.inset=`${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`,this.ofView.style.display=\"block\"}}}class Me extends U{static overrideConfig(t){const e={...ue,...t.settings,...pe};return e.reorderEnabled?be(t.content,{isClosable:!0}):be(t.content,{reorderEnabled:!1}),{dimensions:me,...t,settings:e,header:{...ce,show:!1!==t.settings?.hasHeaders&&ce.show}}}constructor(t,e,i,{options:n},o,s){super(),this.identity=t,this.container=e,this.initialConfig=i,this.layoutManager=o,this.platformProvider=s,this.viewComponentsByContainerElement=new Map,this.layoutContentCache=_.getSingleInstance(),this.reparentingViews=new Set,this.goldenLayoutDestroyed=!1,this.createViewComponent=(t,e)=>{m.handleSharedView(this.layoutManager,this.identity,e);const i=new ze(t,e,this.identity.uuid,this.options,this.iframeContainer);return e&&!1===e[`${de}isClosable`]&&this.stylesheet.insertRule(`#tab-${i.identity.name} .lm_close_tab { display: none; }`),this.viewComponentsByContainerElement.set(t.element,i),this.resizeController.observeContainer(t.element),i},this.iframeContainer=document.createElement(\"div\"),this.iframeContainer.id=`openfin-layout-iframe-container-${this.identity.layoutName}`,this.domEmitter=new V(e),this.setupStylesheets(),this.layout=new he(this.container),this.layout.resizeWithContainerAutomatically=!0,this.options=n,this.layout.registerComponent(\"view\",this.createViewComponent),this.setupListeners(),this.resizeController=new ve(this),this.layout.loadLayout(Me.overrideConfig(i));const r=document.createElement(\"div\");r.id=`openfin-layout-shadow-container-${this.identity.layoutName}`,r.attachShadow({mode:\"open\",delegatesFocus:!1}).appendChild(this.iframeContainer),this.container.appendChild(r),this.resizeController.observeMutations(this.container)}getStackByView({name:t}){const e=this.layout.findFirstComponentItemById(t);if(e?.parent&&e?.parent?.isStack)return Ie.wrap(e.parent,this)}getRoot(){return Ie.wrap(this.layout.rootItem,this)}async platformCloseView(t){const e=[...this.viewComponentsByContainerElement.values()].find((e=>e.identity.name===t.name));if(!e)throw new Error(`View with name: ${t.name} not found in layout.`);e.closeView()}async platformCreateView(t,{location:e,targetView:i}={}){if(i)throw new Error(\"TargetView not supported in web\");const n={options:this.platformProvider.normalizeOptions(t),target:this.identity,location:e};return this.insertView(n)}setupStylesheets(){if(this.container.setAttribute(\"data-openfin-layout-name\",this.identity.layoutName),this.stylesheet=new CSSStyleSheet,this.stylesheet.insertRule(\".lm_close { display: none; }\"),document.adoptedStyleSheets.push(this.stylesheet),this.initialConfig.settings?.preventSplitterResize){const t=`\\n [data-openfin-layout-name='${this.identity.layoutName}'] .lm_splitter {\\n pointer-events: none;\\n }`;this.stylesheet.insertRule(t)}}insertView({options:t,location:e,targetView:i}){const n=e?this.layoutContentCache.getItemOrUndefined(e.id):void 0,o=i?this.layoutContentCache.getItemOrUndefined(i.name):void 0,s=n??o??Ie.wrap(this.layout.rootItem,this);let r;if(ee.isStack(s.raw))r=s.raw;else{if(!we(s.raw))throw new Error(\"Cannot add a view at the requested location\");r=s.raw.newItem({type:\"stack\",content:[]})}const a=Math.min(r.contentItems.length,e?.index??r.contentItems.length);let l=this.layout.findFirstComponentItemById(t.name);l?(l.parent&&l.parent.removeChild(l,!0),r.addChild(l,a)):l=r.newComponent(\"view\",t,t.title??t.url??\"Default Title\",a);const h=l.component.identity;return Promise.resolve({identity:h})}replaceView({viewToReplace:t,newView:e}){throw new Error(\"Method not implemented.\")}replaceLayout(t){throw new Error(\"Method not implemented.\")}async cleanupView(t){}applyPreset(t){throw new Error(\"Method not implemented.\")}getCurrentViews(){return[...this.viewComponentsByContainerElement.values()].map((t=>t.identity))}async getFrameSnapshot(){return Ee(xt.fromResolved(this.layout.toConfig()))}isVisible(){return W(this.container)}async onViewDetached({viewIdentity:t}){this.reparentingViews.add(t.name),this.platformCloseView(t)}async destroy(){this.goldenLayoutDestroyed||(this.goldenLayoutDestroyed=!0,this.layout.destroy()),this.iframeContainer.remove(),this.resizeController.destroy(),document.adoptedStyleSheets=document.adoptedStyleSheets.filter((t=>t!==this.stylesheet)),this.viewComponentsByContainerElement.clear()}setupListeners(){this.container.addEventListener(\"pointerdown\",(t=>{if(t.target instanceof HTMLElement){const e=t.target.classList;[\"lm_tab\",\"lm_title\",\"lm_splitter\",\"lm_drag_handle\"].some((t=>e.contains(t)))&&(this.handleDragStart(),2===t.button&&t.stopPropagation())}}),!0),document.addEventListener(\"pointerup\",(()=>this.handleDragEnd()),!0),this.layout.on(\"tabCreated\",(t=>{const e=t.componentItem.component;t.element.id=`tab-${e.identity.name}`,this.domEmitter.dispatchLocalEvent(\"tab-created\",e.identity)})),this.layout.on(\"itemCreated\",(({target:t})=>{const e=t;if(Gt.isComponentItem(e)){const t=e.component;this.domEmitter.dispatchLocalEvent(\"container-created\",t.identity)}})),this.layout.on(\"itemDestroyed\",(t=>{const e=t.target;if(Gt.isComponentItem(e)){const t=e.component;this.removeViewComponent(t)}})),this.layout.on(\"itemDropped\",(()=>{this.handleDragEnd()}))}handleDragStart(){this.iframeContainer.style.pointerEvents=\"none\"}handleDragEnd(){this.iframeContainer.style.pointerEvents=\"\"}removeViewComponent(t){if(t.config&&!1===t.config[`${de}isClosable`]){const e=[...this.stylesheet.cssRules].findIndex((e=>e.cssText.includes(`#tab-${t.identity.name}`)));this.stylesheet.deleteRule(e)}t.destroy(),this.viewComponentsByContainerElement.delete(t.container.element),this.resizeController.unobserveContainer(t.container.element),this.reparentingViews.has(t.identity.name)?this.reparentingViews.delete(t.identity.name):this.platformProvider.closeView(t.identity.name);0===this.getCurrentViews().length&&(this.goldenLayoutDestroyed||(this.goldenLayoutDestroyed=!0,m.handleLastViewRemoved(this.layoutManager,this.identity)))}}class Pe{constructor(t,e,i,n){this.windowIdentity=t,this.connectConfig=e,this.provider=i,this.fallbackContainer=n}async createLayout(t,e){if(!(\"container\"in t)&&!this.fallbackContainer)throw new Error(\"Container property is not optional in web\");const{layoutName:i}=t,n=t,o=this.provider.initLayoutViews(n),s=n.container??this.fallbackContainer,r={...this.windowIdentity,layoutName:i},a=new Me(r,s,o,this.connectConfig,e,this.provider);m.registerLayout(e,i,a),this.fallbackContainer=null}async getLayoutSnapshot(t){return t.getLayoutSnapshot()}async handleLastViewRemoved(t){}}class Te{static async init(e){const i=e.getFin().InterApplicationBus.Channel,n=await i.create(`custom-frame-${e.me.uuid}`);return n.setDefaultAction((async(t,{target:e,opts:i},o)=>{const s=n.connections.find((t=>t.name===e.name));if(s)return n.dispatch(s,t,{...i,target:e});throw new Error(`Client with name ${e.name} not found`)})),await t.relayChannelClientApi_1(n,\"layout-relay\"),new Te(e)}constructor(t){this.wire=t,this.viewNames=new Set}normalizeOptions(t,i=\"default\"){const n=this.wire.me.uuid;let{name:o=`internal-generated-view-${e.v4()}`}=t;return o.match(/^internal-generated-view-/)&&this.viewNames.has(o)&&\"duplicate\"===i&&(o=`internal-generated-view-${e.v4()}`),this.viewNames.add(o),{...t,name:o,uuid:n}}closeView(t){this.viewNames.delete(t)}initLayoutViews({layout:t,multiInstanceViewBehavior:e}){return H((t=>{if(\"component\"===t.type&&t.componentState){const i=this.normalizeOptions(t.componentState,e);return{...t,componentState:i}}return t}),t)}}var Ae;const ke=t=>t;Ae=new WeakMap,exports.WebLayoutEntryPoint=class{constructor(e){Ae.set(this,void 0),this.initLayoutManager=async(e,i,{container:n,layoutManagerOverride:o})=>{const s=await Te.init(i),r=o??ke,a=new Pe(i.me,t.__classPrivateFieldGet(this,Ae,\"f\"),s,n),l=new(r(m.createClosedConstructor(a)));return await M(i,l),l},this.applyLayoutSnapshot=async(e,i,n)=>{await i.applyLayoutSnapshot(t.__classPrivateFieldGet(this,Ae,\"f\").platform.layoutSnapshot)},this.createLayout=async(t,e)=>m.createLayout(t,e),this.destroyLayout=async(t,e)=>m.destroyLayout(t,e),t.__classPrivateFieldSet(this,Ae,e,\"f\")}};\n","'use strict'\n\nexports.byteLength = byteLength\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\nfor (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i]\n revLookup[code.charCodeAt(i)] = i\n}\n\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction getLens (b64) {\n var len = b64.length\n\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // Trim off extra bytes after placeholder bytes are found\n // See: https://github.com/beatgammit/base64-js/issues/42\n var validLen = b64.indexOf('=')\n if (validLen === -1) validLen = len\n\n var placeHoldersLen = validLen === len\n ? 0\n : 4 - (validLen % 4)\n\n return [validLen, placeHoldersLen]\n}\n\n// base64 is 4/3 + up to two characters of the original data\nfunction byteLength (b64) {\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction _byteLength (b64, validLen, placeHoldersLen) {\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction toByteArray (b64) {\n var tmp\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n\n var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))\n\n var curByte = 0\n\n // if there are placeholders, only get up to the last complete 4 chars\n var len = placeHoldersLen > 0\n ? validLen - 4\n : validLen\n\n var i\n for (i = 0; i < len; i += 4) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 18) |\n (revLookup[b64.charCodeAt(i + 1)] << 12) |\n (revLookup[b64.charCodeAt(i + 2)] << 6) |\n revLookup[b64.charCodeAt(i + 3)]\n arr[curByte++] = (tmp >> 16) & 0xFF\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 2) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 2) |\n (revLookup[b64.charCodeAt(i + 1)] >> 4)\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 1) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 10) |\n (revLookup[b64.charCodeAt(i + 1)] << 4) |\n (revLookup[b64.charCodeAt(i + 2)] >> 2)\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] +\n lookup[num >> 12 & 0x3F] +\n lookup[num >> 6 & 0x3F] +\n lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n var tmp\n var output = []\n for (var i = start; i < end; i += 3) {\n tmp =\n ((uint8[i] << 16) & 0xFF0000) +\n ((uint8[i + 1] << 8) & 0xFF00) +\n (uint8[i + 2] & 0xFF)\n output.push(tripletToBase64(tmp))\n }\n return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n var tmp\n var len = uint8.length\n var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n var parts = []\n var maxChunkLength = 16383 // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1]\n parts.push(\n lookup[tmp >> 2] +\n lookup[(tmp << 4) & 0x3F] +\n '=='\n )\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + uint8[len - 1]\n parts.push(\n lookup[tmp >> 10] +\n lookup[(tmp >> 4) & 0x3F] +\n lookup[(tmp << 2) & 0x3F] +\n '='\n )\n }\n\n return parts.join('')\n}\n","/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n/* eslint-disable no-proto */\n\n'use strict'\n\nconst base64 = require('base64-js')\nconst ieee754 = require('ieee754')\nconst customInspectSymbol =\n (typeof Symbol === 'function' && typeof Symbol['for'] === 'function') // eslint-disable-line dot-notation\n ? Symbol['for']('nodejs.util.inspect.custom') // eslint-disable-line dot-notation\n : null\n\nexports.Buffer = Buffer\nexports.SlowBuffer = SlowBuffer\nexports.INSPECT_MAX_BYTES = 50\n\nconst K_MAX_LENGTH = 0x7fffffff\nexports.kMaxLength = K_MAX_LENGTH\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Print warning and recommend using `buffer` v4.x which has an Object\n * implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * We report that the browser does not support typed arrays if the are not subclassable\n * using __proto__. Firefox 4-29 lacks support for adding new properties to `Uint8Array`\n * (See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438). IE 10 lacks support\n * for __proto__ and has a buggy typed array implementation.\n */\nBuffer.TYPED_ARRAY_SUPPORT = typedArraySupport()\n\nif (!Buffer.TYPED_ARRAY_SUPPORT && typeof console !== 'undefined' &&\n typeof console.error === 'function') {\n console.error(\n 'This browser lacks typed array (Uint8Array) support which is required by ' +\n '`buffer` v5.x. Use `buffer` v4.x if you require old browser support.'\n )\n}\n\nfunction typedArraySupport () {\n // Can typed array instances can be augmented?\n try {\n const arr = new Uint8Array(1)\n const proto = { foo: function () { return 42 } }\n Object.setPrototypeOf(proto, Uint8Array.prototype)\n Object.setPrototypeOf(arr, proto)\n return arr.foo() === 42\n } catch (e) {\n return false\n }\n}\n\nObject.defineProperty(Buffer.prototype, 'parent', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.buffer\n }\n})\n\nObject.defineProperty(Buffer.prototype, 'offset', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.byteOffset\n }\n})\n\nfunction createBuffer (length) {\n if (length > K_MAX_LENGTH) {\n throw new RangeError('The value \"' + length + '\" is invalid for option \"size\"')\n }\n // Return an augmented `Uint8Array` instance\n const buf = new Uint8Array(length)\n Object.setPrototypeOf(buf, Buffer.prototype)\n return buf\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new TypeError(\n 'The \"string\" argument must be of type string. Received type number'\n )\n }\n return allocUnsafe(arg)\n }\n return from(arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\nfunction from (value, encodingOrOffset, length) {\n if (typeof value === 'string') {\n return fromString(value, encodingOrOffset)\n }\n\n if (ArrayBuffer.isView(value)) {\n return fromArrayView(value)\n }\n\n if (value == null) {\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n }\n\n if (isInstance(value, ArrayBuffer) ||\n (value && isInstance(value.buffer, ArrayBuffer))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof SharedArrayBuffer !== 'undefined' &&\n (isInstance(value, SharedArrayBuffer) ||\n (value && isInstance(value.buffer, SharedArrayBuffer)))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof value === 'number') {\n throw new TypeError(\n 'The \"value\" argument must not be of type number. Received type number'\n )\n }\n\n const valueOf = value.valueOf && value.valueOf()\n if (valueOf != null && valueOf !== value) {\n return Buffer.from(valueOf, encodingOrOffset, length)\n }\n\n const b = fromObject(value)\n if (b) return b\n\n if (typeof Symbol !== 'undefined' && Symbol.toPrimitive != null &&\n typeof value[Symbol.toPrimitive] === 'function') {\n return Buffer.from(value[Symbol.toPrimitive]('string'), encodingOrOffset, length)\n }\n\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n return from(value, encodingOrOffset, length)\n}\n\n// Note: Change prototype *after* Buffer.from is defined to workaround Chrome bug:\n// https://github.com/feross/buffer/pull/148\nObject.setPrototypeOf(Buffer.prototype, Uint8Array.prototype)\nObject.setPrototypeOf(Buffer, Uint8Array)\n\nfunction assertSize (size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be of type number')\n } else if (size < 0) {\n throw new RangeError('The value \"' + size + '\" is invalid for option \"size\"')\n }\n}\n\nfunction alloc (size, fill, encoding) {\n assertSize(size)\n if (size <= 0) {\n return createBuffer(size)\n }\n if (fill !== undefined) {\n // Only pay attention to encoding if it's a string. This\n // prevents accidentally sending in a number that would\n // be interpreted as a start offset.\n return typeof encoding === 'string'\n ? createBuffer(size).fill(fill, encoding)\n : createBuffer(size).fill(fill)\n }\n return createBuffer(size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n return alloc(size, fill, encoding)\n}\n\nfunction allocUnsafe (size) {\n assertSize(size)\n return createBuffer(size < 0 ? 0 : checked(size) | 0)\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n return allocUnsafe(size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n return allocUnsafe(size)\n}\n\nfunction fromString (string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8'\n }\n\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n\n const length = byteLength(string, encoding) | 0\n let buf = createBuffer(length)\n\n const actual = buf.write(string, encoding)\n\n if (actual !== length) {\n // Writing a hex string, for example, that contains invalid characters will\n // cause everything after the first invalid character to be ignored. (e.g.\n // 'abxxcd' will be treated as 'ab')\n buf = buf.slice(0, actual)\n }\n\n return buf\n}\n\nfunction fromArrayLike (array) {\n const length = array.length < 0 ? 0 : checked(array.length) | 0\n const buf = createBuffer(length)\n for (let i = 0; i < length; i += 1) {\n buf[i] = array[i] & 255\n }\n return buf\n}\n\nfunction fromArrayView (arrayView) {\n if (isInstance(arrayView, Uint8Array)) {\n const copy = new Uint8Array(arrayView)\n return fromArrayBuffer(copy.buffer, copy.byteOffset, copy.byteLength)\n }\n return fromArrayLike(arrayView)\n}\n\nfunction fromArrayBuffer (array, byteOffset, length) {\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\"offset\" is outside of buffer bounds')\n }\n\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\"length\" is outside of buffer bounds')\n }\n\n let buf\n if (byteOffset === undefined && length === undefined) {\n buf = new Uint8Array(array)\n } else if (length === undefined) {\n buf = new Uint8Array(array, byteOffset)\n } else {\n buf = new Uint8Array(array, byteOffset, length)\n }\n\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(buf, Buffer.prototype)\n\n return buf\n}\n\nfunction fromObject (obj) {\n if (Buffer.isBuffer(obj)) {\n const len = checked(obj.length) | 0\n const buf = createBuffer(len)\n\n if (buf.length === 0) {\n return buf\n }\n\n obj.copy(buf, 0, 0, len)\n return buf\n }\n\n if (obj.length !== undefined) {\n if (typeof obj.length !== 'number' || numberIsNaN(obj.length)) {\n return createBuffer(0)\n }\n return fromArrayLike(obj)\n }\n\n if (obj.type === 'Buffer' && Array.isArray(obj.data)) {\n return fromArrayLike(obj.data)\n }\n}\n\nfunction checked (length) {\n // Note: cannot use `length < K_MAX_LENGTH` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= K_MAX_LENGTH) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + K_MAX_LENGTH.toString(16) + ' bytes')\n }\n return length | 0\n}\n\nfunction SlowBuffer (length) {\n if (+length != length) { // eslint-disable-line eqeqeq\n length = 0\n }\n return Buffer.alloc(+length)\n}\n\nBuffer.isBuffer = function isBuffer (b) {\n return b != null && b._isBuffer === true &&\n b !== Buffer.prototype // so Buffer.isBuffer(Buffer.prototype) will be false\n}\n\nBuffer.compare = function compare (a, b) {\n if (isInstance(a, Uint8Array)) a = Buffer.from(a, a.offset, a.byteLength)\n if (isInstance(b, Uint8Array)) b = Buffer.from(b, b.offset, b.byteLength)\n if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n throw new TypeError(\n 'The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array'\n )\n }\n\n if (a === b) return 0\n\n let x = a.length\n let y = b.length\n\n for (let i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i]\n y = b[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n switch (String(encoding).toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'latin1':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return true\n default:\n return false\n }\n}\n\nBuffer.concat = function concat (list, length) {\n if (!Array.isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n\n if (list.length === 0) {\n return Buffer.alloc(0)\n }\n\n let i\n if (length === undefined) {\n length = 0\n for (i = 0; i < list.length; ++i) {\n length += list[i].length\n }\n }\n\n const buffer = Buffer.allocUnsafe(length)\n let pos = 0\n for (i = 0; i < list.length; ++i) {\n let buf = list[i]\n if (isInstance(buf, Uint8Array)) {\n if (pos + buf.length > buffer.length) {\n if (!Buffer.isBuffer(buf)) buf = Buffer.from(buf)\n buf.copy(buffer, pos)\n } else {\n Uint8Array.prototype.set.call(\n buffer,\n buf,\n pos\n )\n }\n } else if (!Buffer.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n } else {\n buf.copy(buffer, pos)\n }\n pos += buf.length\n }\n return buffer\n}\n\nfunction byteLength (string, encoding) {\n if (Buffer.isBuffer(string)) {\n return string.length\n }\n if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) {\n return string.byteLength\n }\n if (typeof string !== 'string') {\n throw new TypeError(\n 'The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. ' +\n 'Received type ' + typeof string\n )\n }\n\n const len = string.length\n const mustMatch = (arguments.length > 2 && arguments[2] === true)\n if (!mustMatch && len === 0) return 0\n\n // Use a for loop to avoid recursion\n let loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'ascii':\n case 'latin1':\n case 'binary':\n return len\n case 'utf8':\n case 'utf-8':\n return utf8ToBytes(string).length\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return len * 2\n case 'hex':\n return len >>> 1\n case 'base64':\n return base64ToBytes(string).length\n default:\n if (loweredCase) {\n return mustMatch ? -1 : utf8ToBytes(string).length // assume utf8\n }\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n let loweredCase = false\n\n // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n // property of a typed array.\n\n // This behaves neither like String nor Uint8Array in that we set start/end\n // to their upper/lower bounds if the value passed is out of range.\n // undefined is handled specially as per ECMA-262 6th Edition,\n // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n if (start === undefined || start < 0) {\n start = 0\n }\n // Return early if start > this.length. Done here to prevent potential uint32\n // coercion fail below.\n if (start > this.length) {\n return ''\n }\n\n if (end === undefined || end > this.length) {\n end = this.length\n }\n\n if (end <= 0) {\n return ''\n }\n\n // Force coercion to uint32. This will also coerce falsey/NaN values to 0.\n end >>>= 0\n start >>>= 0\n\n if (end <= start) {\n return ''\n }\n\n if (!encoding) encoding = 'utf8'\n\n while (true) {\n switch (encoding) {\n case 'hex':\n return hexSlice(this, start, end)\n\n case 'utf8':\n case 'utf-8':\n return utf8Slice(this, start, end)\n\n case 'ascii':\n return asciiSlice(this, start, end)\n\n case 'latin1':\n case 'binary':\n return latin1Slice(this, start, end)\n\n case 'base64':\n return base64Slice(this, start, end)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return utf16leSlice(this, start, end)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = (encoding + '').toLowerCase()\n loweredCase = true\n }\n }\n}\n\n// This property is used by `Buffer.isBuffer` (and the `is-buffer` npm package)\n// to detect a Buffer instance. It's not possible to use `instanceof Buffer`\n// reliably in a browserify context because there could be multiple different\n// copies of the 'buffer' package in use. This method works even for Buffer\n// instances that were created from another copy of the `buffer` package.\n// See: https://github.com/feross/buffer/issues/154\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n const i = b[n]\n b[n] = b[m]\n b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n const len = this.length\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits')\n }\n for (let i = 0; i < len; i += 2) {\n swap(this, i, i + 1)\n }\n return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n const len = this.length\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits')\n }\n for (let i = 0; i < len; i += 4) {\n swap(this, i, i + 3)\n swap(this, i + 1, i + 2)\n }\n return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n const len = this.length\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits')\n }\n for (let i = 0; i < len; i += 8) {\n swap(this, i, i + 7)\n swap(this, i + 1, i + 6)\n swap(this, i + 2, i + 5)\n swap(this, i + 3, i + 4)\n }\n return this\n}\n\nBuffer.prototype.toString = function toString () {\n const length = this.length\n if (length === 0) return ''\n if (arguments.length === 0) return utf8Slice(this, 0, length)\n return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.toLocaleString = Buffer.prototype.toString\n\nBuffer.prototype.equals = function equals (b) {\n if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n if (this === b) return true\n return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n let str = ''\n const max = exports.INSPECT_MAX_BYTES\n str = this.toString('hex', 0, max).replace(/(.{2})/g, '$1 ').trim()\n if (this.length > max) str += ' ... '\n return ''\n}\nif (customInspectSymbol) {\n Buffer.prototype[customInspectSymbol] = Buffer.prototype.inspect\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n if (isInstance(target, Uint8Array)) {\n target = Buffer.from(target, target.offset, target.byteLength)\n }\n if (!Buffer.isBuffer(target)) {\n throw new TypeError(\n 'The \"target\" argument must be one of type Buffer or Uint8Array. ' +\n 'Received type ' + (typeof target)\n )\n }\n\n if (start === undefined) {\n start = 0\n }\n if (end === undefined) {\n end = target ? target.length : 0\n }\n if (thisStart === undefined) {\n thisStart = 0\n }\n if (thisEnd === undefined) {\n thisEnd = this.length\n }\n\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError('out of range index')\n }\n\n if (thisStart >= thisEnd && start >= end) {\n return 0\n }\n if (thisStart >= thisEnd) {\n return -1\n }\n if (start >= end) {\n return 1\n }\n\n start >>>= 0\n end >>>= 0\n thisStart >>>= 0\n thisEnd >>>= 0\n\n if (this === target) return 0\n\n let x = thisEnd - thisStart\n let y = end - start\n const len = Math.min(x, y)\n\n const thisCopy = this.slice(thisStart, thisEnd)\n const targetCopy = target.slice(start, end)\n\n for (let i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i]\n y = targetCopy[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (numberIsNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [val], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n let indexSize = 1\n let arrLength = arr.length\n let valLength = val.length\n\n if (encoding !== undefined) {\n encoding = String(encoding).toLowerCase()\n if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n encoding === 'utf16le' || encoding === 'utf-16le') {\n if (arr.length < 2 || val.length < 2) {\n return -1\n }\n indexSize = 2\n arrLength /= 2\n valLength /= 2\n byteOffset /= 2\n }\n }\n\n function read (buf, i) {\n if (indexSize === 1) {\n return buf[i]\n } else {\n return buf.readUInt16BE(i * indexSize)\n }\n }\n\n let i\n if (dir) {\n let foundIndex = -1\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1) foundIndex = i\n if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n } else {\n if (foundIndex !== -1) i -= i - foundIndex\n foundIndex = -1\n }\n }\n } else {\n if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n for (i = byteOffset; i >= 0; i--) {\n let found = true\n for (let j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false\n break\n }\n }\n if (found) return i\n }\n }\n\n return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n offset = Number(offset) || 0\n const remaining = buf.length - offset\n if (!length) {\n length = remaining\n } else {\n length = Number(length)\n if (length > remaining) {\n length = remaining\n }\n }\n\n const strLen = string.length\n\n if (length > strLen / 2) {\n length = strLen / 2\n }\n let i\n for (i = 0; i < length; ++i) {\n const parsed = parseInt(string.substr(i * 2, 2), 16)\n if (numberIsNaN(parsed)) return i\n buf[offset + i] = parsed\n }\n return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n // Buffer#write(string)\n if (offset === undefined) {\n encoding = 'utf8'\n length = this.length\n offset = 0\n // Buffer#write(string, encoding)\n } else if (length === undefined && typeof offset === 'string') {\n encoding = offset\n length = this.length\n offset = 0\n // Buffer#write(string, offset[, length][, encoding])\n } else if (isFinite(offset)) {\n offset = offset >>> 0\n if (isFinite(length)) {\n length = length >>> 0\n if (encoding === undefined) encoding = 'utf8'\n } else {\n encoding = length\n length = undefined\n }\n } else {\n throw new Error(\n 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n )\n }\n\n const remaining = this.length - offset\n if (length === undefined || length > remaining) length = remaining\n\n if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n throw new RangeError('Attempt to write outside buffer bounds')\n }\n\n if (!encoding) encoding = 'utf8'\n\n let loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'hex':\n return hexWrite(this, string, offset, length)\n\n case 'utf8':\n case 'utf-8':\n return utf8Write(this, string, offset, length)\n\n case 'ascii':\n case 'latin1':\n case 'binary':\n return asciiWrite(this, string, offset, length)\n\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return base64Write(this, string, offset, length)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return ucs2Write(this, string, offset, length)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0)\n }\n}\n\nfunction base64Slice (buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf)\n } else {\n return base64.fromByteArray(buf.slice(start, end))\n }\n}\n\nfunction utf8Slice (buf, start, end) {\n end = Math.min(buf.length, end)\n const res = []\n\n let i = start\n while (i < end) {\n const firstByte = buf[i]\n let codePoint = null\n let bytesPerSequence = (firstByte > 0xEF)\n ? 4\n : (firstByte > 0xDF)\n ? 3\n : (firstByte > 0xBF)\n ? 2\n : 1\n\n if (i + bytesPerSequence <= end) {\n let secondByte, thirdByte, fourthByte, tempCodePoint\n\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 0x80) {\n codePoint = firstByte\n }\n break\n case 2:\n secondByte = buf[i + 1]\n if ((secondByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n if (tempCodePoint > 0x7F) {\n codePoint = tempCodePoint\n }\n }\n break\n case 3:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n codePoint = tempCodePoint\n }\n }\n break\n case 4:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n fourthByte = buf[i + 3]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n codePoint = tempCodePoint\n }\n }\n }\n }\n\n if (codePoint === null) {\n // we did not generate a valid codePoint so insert a\n // replacement char (U+FFFD) and advance only 1 byte\n codePoint = 0xFFFD\n bytesPerSequence = 1\n } else if (codePoint > 0xFFFF) {\n // encode to utf16 (surrogate pair dance)\n codePoint -= 0x10000\n res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n codePoint = 0xDC00 | codePoint & 0x3FF\n }\n\n res.push(codePoint)\n i += bytesPerSequence\n }\n\n return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nconst MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n const len = codePoints.length\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n }\n\n // Decode in chunks to avoid \"call stack size exceeded\".\n let res = ''\n let i = 0\n while (i < len) {\n res += String.fromCharCode.apply(\n String,\n codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n )\n }\n return res\n}\n\nfunction asciiSlice (buf, start, end) {\n let ret = ''\n end = Math.min(buf.length, end)\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F)\n }\n return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n let ret = ''\n end = Math.min(buf.length, end)\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i])\n }\n return ret\n}\n\nfunction hexSlice (buf, start, end) {\n const len = buf.length\n\n if (!start || start < 0) start = 0\n if (!end || end < 0 || end > len) end = len\n\n let out = ''\n for (let i = start; i < end; ++i) {\n out += hexSliceLookupTable[buf[i]]\n }\n return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n const bytes = buf.slice(start, end)\n let res = ''\n // If bytes.length is odd, the last 8 bits must be ignored (same as node.js)\n for (let i = 0; i < bytes.length - 1; i += 2) {\n res += String.fromCharCode(bytes[i] + (bytes[i + 1] * 256))\n }\n return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n const len = this.length\n start = ~~start\n end = end === undefined ? len : ~~end\n\n if (start < 0) {\n start += len\n if (start < 0) start = 0\n } else if (start > len) {\n start = len\n }\n\n if (end < 0) {\n end += len\n if (end < 0) end = 0\n } else if (end > len) {\n end = len\n }\n\n if (end < start) end = start\n\n const newBuf = this.subarray(start, end)\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(newBuf, Buffer.prototype)\n\n return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUintLE =\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let val = this[offset]\n let mul = 1\n let i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUintBE =\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n checkOffset(offset, byteLength, this.length)\n }\n\n let val = this[offset + --byteLength]\n let mul = 1\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUint8 =\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n return this[offset]\n}\n\nBuffer.prototype.readUint16LE =\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUint16BE =\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUint32LE =\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return ((this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16)) +\n (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUint32BE =\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] * 0x1000000) +\n ((this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n this[offset + 3])\n}\n\nBuffer.prototype.readBigUInt64LE = defineBigIntMethod(function readBigUInt64LE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const lo = first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24\n\n const hi = this[++offset] +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n last * 2 ** 24\n\n return BigInt(lo) + (BigInt(hi) << BigInt(32))\n})\n\nBuffer.prototype.readBigUInt64BE = defineBigIntMethod(function readBigUInt64BE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const hi = first * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset]\n\n const lo = this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last\n\n return (BigInt(hi) << BigInt(32)) + BigInt(lo)\n})\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let val = this[offset]\n let mul = 1\n let i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let i = byteLength\n let mul = 1\n let val = this[offset + --i]\n while (i > 0 && (mul *= 0x100)) {\n val += this[offset + --i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n if (!(this[offset] & 0x80)) return (this[offset])\n return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n const val = this[offset] | (this[offset + 1] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n const val = this[offset + 1] | (this[offset] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16) |\n (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] << 24) |\n (this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n (this[offset + 3])\n}\n\nBuffer.prototype.readBigInt64LE = defineBigIntMethod(function readBigInt64LE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const val = this[offset + 4] +\n this[offset + 5] * 2 ** 8 +\n this[offset + 6] * 2 ** 16 +\n (last << 24) // Overflow\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24)\n})\n\nBuffer.prototype.readBigInt64BE = defineBigIntMethod(function readBigInt64BE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const val = (first << 24) + // Overflow\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset]\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last)\n})\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUintLE =\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n let mul = 1\n let i = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUintBE =\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n let i = byteLength - 1\n let mul = 1\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUint8 =\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeUint16LE =\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeUint16BE =\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeUint32LE =\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset + 3] = (value >>> 24)\n this[offset + 2] = (value >>> 16)\n this[offset + 1] = (value >>> 8)\n this[offset] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeUint32BE =\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nfunction wrtBigUInt64LE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7)\n\n let lo = Number(value & BigInt(0xffffffff))\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n return offset\n}\n\nfunction wrtBigUInt64BE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7)\n\n let lo = Number(value & BigInt(0xffffffff))\n buf[offset + 7] = lo\n lo = lo >> 8\n buf[offset + 6] = lo\n lo = lo >> 8\n buf[offset + 5] = lo\n lo = lo >> 8\n buf[offset + 4] = lo\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n buf[offset + 3] = hi\n hi = hi >> 8\n buf[offset + 2] = hi\n hi = hi >> 8\n buf[offset + 1] = hi\n hi = hi >> 8\n buf[offset] = hi\n return offset + 8\n}\n\nBuffer.prototype.writeBigUInt64LE = defineBigIntMethod(function writeBigUInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeBigUInt64BE = defineBigIntMethod(function writeBigUInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n let i = 0\n let mul = 1\n let sub = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n let i = byteLength - 1\n let mul = 1\n let sub = 0\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n if (value < 0) value = 0xff + value + 1\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n this[offset + 2] = (value >>> 16)\n this[offset + 3] = (value >>> 24)\n return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (value < 0) value = 0xffffffff + value + 1\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeBigInt64LE = defineBigIntMethod(function writeBigInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nBuffer.prototype.writeBigInt64BE = defineBigIntMethod(function writeBigInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n }\n ieee754.write(buf, value, offset, littleEndian, 23, 4)\n return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n }\n ieee754.write(buf, value, offset, littleEndian, 52, 8)\n return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n if (!Buffer.isBuffer(target)) throw new TypeError('argument should be a Buffer')\n if (!start) start = 0\n if (!end && end !== 0) end = this.length\n if (targetStart >= target.length) targetStart = target.length\n if (!targetStart) targetStart = 0\n if (end > 0 && end < start) end = start\n\n // Copy 0 bytes; we're done\n if (end === start) return 0\n if (target.length === 0 || this.length === 0) return 0\n\n // Fatal error conditions\n if (targetStart < 0) {\n throw new RangeError('targetStart out of bounds')\n }\n if (start < 0 || start >= this.length) throw new RangeError('Index out of range')\n if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n // Are we oob?\n if (end > this.length) end = this.length\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start\n }\n\n const len = end - start\n\n if (this === target && typeof Uint8Array.prototype.copyWithin === 'function') {\n // Use built-in when available, missing from IE11\n this.copyWithin(targetStart, start, end)\n } else {\n Uint8Array.prototype.set.call(\n target,\n this.subarray(start, end),\n targetStart\n )\n }\n\n return len\n}\n\n// Usage:\n// buffer.fill(number[, offset[, end]])\n// buffer.fill(buffer[, offset[, end]])\n// buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n // Handle string cases:\n if (typeof val === 'string') {\n if (typeof start === 'string') {\n encoding = start\n start = 0\n end = this.length\n } else if (typeof end === 'string') {\n encoding = end\n end = this.length\n }\n if (encoding !== undefined && typeof encoding !== 'string') {\n throw new TypeError('encoding must be a string')\n }\n if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n if (val.length === 1) {\n const code = val.charCodeAt(0)\n if ((encoding === 'utf8' && code < 128) ||\n encoding === 'latin1') {\n // Fast path: If `val` fits into a single byte, use that numeric value.\n val = code\n }\n }\n } else if (typeof val === 'number') {\n val = val & 255\n } else if (typeof val === 'boolean') {\n val = Number(val)\n }\n\n // Invalid ranges are not set to a default, so can range check early.\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError('Out of range index')\n }\n\n if (end <= start) {\n return this\n }\n\n start = start >>> 0\n end = end === undefined ? this.length : end >>> 0\n\n if (!val) val = 0\n\n let i\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val\n }\n } else {\n const bytes = Buffer.isBuffer(val)\n ? val\n : Buffer.from(val, encoding)\n const len = bytes.length\n if (len === 0) {\n throw new TypeError('The value \"' + val +\n '\" is invalid for argument \"value\"')\n }\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len]\n }\n }\n\n return this\n}\n\n// CUSTOM ERRORS\n// =============\n\n// Simplified versions from Node, changed for Buffer-only usage\nconst errors = {}\nfunction E (sym, getMessage, Base) {\n errors[sym] = class NodeError extends Base {\n constructor () {\n super()\n\n Object.defineProperty(this, 'message', {\n value: getMessage.apply(this, arguments),\n writable: true,\n configurable: true\n })\n\n // Add the error code to the name to include it in the stack trace.\n this.name = `${this.name} [${sym}]`\n // Access the stack to generate the error message including the error code\n // from the name.\n this.stack // eslint-disable-line no-unused-expressions\n // Reset the name to the actual name.\n delete this.name\n }\n\n get code () {\n return sym\n }\n\n set code (value) {\n Object.defineProperty(this, 'code', {\n configurable: true,\n enumerable: true,\n value,\n writable: true\n })\n }\n\n toString () {\n return `${this.name} [${sym}]: ${this.message}`\n }\n }\n}\n\nE('ERR_BUFFER_OUT_OF_BOUNDS',\n function (name) {\n if (name) {\n return `${name} is outside of buffer bounds`\n }\n\n return 'Attempt to access memory outside buffer bounds'\n }, RangeError)\nE('ERR_INVALID_ARG_TYPE',\n function (name, actual) {\n return `The \"${name}\" argument must be of type number. Received type ${typeof actual}`\n }, TypeError)\nE('ERR_OUT_OF_RANGE',\n function (str, range, input) {\n let msg = `The value of \"${str}\" is out of range.`\n let received = input\n if (Number.isInteger(input) && Math.abs(input) > 2 ** 32) {\n received = addNumericalSeparator(String(input))\n } else if (typeof input === 'bigint') {\n received = String(input)\n if (input > BigInt(2) ** BigInt(32) || input < -(BigInt(2) ** BigInt(32))) {\n received = addNumericalSeparator(received)\n }\n received += 'n'\n }\n msg += ` It must be ${range}. Received ${received}`\n return msg\n }, RangeError)\n\nfunction addNumericalSeparator (val) {\n let res = ''\n let i = val.length\n const start = val[0] === '-' ? 1 : 0\n for (; i >= start + 4; i -= 3) {\n res = `_${val.slice(i - 3, i)}${res}`\n }\n return `${val.slice(0, i)}${res}`\n}\n\n// CHECK FUNCTIONS\n// ===============\n\nfunction checkBounds (buf, offset, byteLength) {\n validateNumber(offset, 'offset')\n if (buf[offset] === undefined || buf[offset + byteLength] === undefined) {\n boundsError(offset, buf.length - (byteLength + 1))\n }\n}\n\nfunction checkIntBI (value, min, max, buf, offset, byteLength) {\n if (value > max || value < min) {\n const n = typeof min === 'bigint' ? 'n' : ''\n let range\n if (byteLength > 3) {\n if (min === 0 || min === BigInt(0)) {\n range = `>= 0${n} and < 2${n} ** ${(byteLength + 1) * 8}${n}`\n } else {\n range = `>= -(2${n} ** ${(byteLength + 1) * 8 - 1}${n}) and < 2 ** ` +\n `${(byteLength + 1) * 8 - 1}${n}`\n }\n } else {\n range = `>= ${min}${n} and <= ${max}${n}`\n }\n throw new errors.ERR_OUT_OF_RANGE('value', range, value)\n }\n checkBounds(buf, offset, byteLength)\n}\n\nfunction validateNumber (value, name) {\n if (typeof value !== 'number') {\n throw new errors.ERR_INVALID_ARG_TYPE(name, 'number', value)\n }\n}\n\nfunction boundsError (value, length, type) {\n if (Math.floor(value) !== value) {\n validateNumber(value, type)\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset', 'an integer', value)\n }\n\n if (length < 0) {\n throw new errors.ERR_BUFFER_OUT_OF_BOUNDS()\n }\n\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset',\n `>= ${type ? 1 : 0} and <= ${length}`,\n value)\n}\n\n// HELPER FUNCTIONS\n// ================\n\nconst INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n // Node takes equal signs as end of the Base64 encoding\n str = str.split('=')[0]\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = str.trim().replace(INVALID_BASE64_RE, '')\n // Node converts strings with length < 2 to ''\n if (str.length < 2) return ''\n // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n while (str.length % 4 !== 0) {\n str = str + '='\n }\n return str\n}\n\nfunction utf8ToBytes (string, units) {\n units = units || Infinity\n let codePoint\n const length = string.length\n let leadSurrogate = null\n const bytes = []\n\n for (let i = 0; i < length; ++i) {\n codePoint = string.charCodeAt(i)\n\n // is surrogate component\n if (codePoint > 0xD7FF && codePoint < 0xE000) {\n // last char was a lead\n if (!leadSurrogate) {\n // no lead yet\n if (codePoint > 0xDBFF) {\n // unexpected trail\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n } else if (i + 1 === length) {\n // unpaired lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n }\n\n // valid lead\n leadSurrogate = codePoint\n\n continue\n }\n\n // 2 leads in a row\n if (codePoint < 0xDC00) {\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n leadSurrogate = codePoint\n continue\n }\n\n // valid surrogate pair\n codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n } else if (leadSurrogate) {\n // valid bmp char, but last char was a lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n }\n\n leadSurrogate = null\n\n // encode utf8\n if (codePoint < 0x80) {\n if ((units -= 1) < 0) break\n bytes.push(codePoint)\n } else if (codePoint < 0x800) {\n if ((units -= 2) < 0) break\n bytes.push(\n codePoint >> 0x6 | 0xC0,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x10000) {\n if ((units -= 3) < 0) break\n bytes.push(\n codePoint >> 0xC | 0xE0,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x110000) {\n if ((units -= 4) < 0) break\n bytes.push(\n codePoint >> 0x12 | 0xF0,\n codePoint >> 0xC & 0x3F | 0x80,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else {\n throw new Error('Invalid code point')\n }\n }\n\n return bytes\n}\n\nfunction asciiToBytes (str) {\n const byteArray = []\n for (let i = 0; i < str.length; ++i) {\n // Node's code seems to be doing this and not & 0x7F..\n byteArray.push(str.charCodeAt(i) & 0xFF)\n }\n return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n let c, hi, lo\n const byteArray = []\n for (let i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0) break\n\n c = str.charCodeAt(i)\n hi = c >> 8\n lo = c % 256\n byteArray.push(lo)\n byteArray.push(hi)\n }\n\n return byteArray\n}\n\nfunction base64ToBytes (str) {\n return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n let i\n for (i = 0; i < length; ++i) {\n if ((i + offset >= dst.length) || (i >= src.length)) break\n dst[i + offset] = src[i]\n }\n return i\n}\n\n// ArrayBuffer or Uint8Array objects from other contexts (i.e. iframes) do not pass\n// the `instanceof` check but they should be treated as of that type.\n// See: https://github.com/feross/buffer/issues/166\nfunction isInstance (obj, type) {\n return obj instanceof type ||\n (obj != null && obj.constructor != null && obj.constructor.name != null &&\n obj.constructor.name === type.name)\n}\nfunction numberIsNaN (obj) {\n // For IE11 support\n return obj !== obj // eslint-disable-line no-self-compare\n}\n\n// Create lookup table for `toString('hex')`\n// See: https://github.com/feross/buffer/issues/219\nconst hexSliceLookupTable = (function () {\n const alphabet = '0123456789abcdef'\n const table = new Array(256)\n for (let i = 0; i < 16; ++i) {\n const i16 = i * 16\n for (let j = 0; j < 16; ++j) {\n table[i16 + j] = alphabet[i] + alphabet[j]\n }\n }\n return table\n})()\n\n// Return not function with Error if BigInt not supported\nfunction defineBigIntMethod (fn) {\n return typeof BigInt === 'undefined' ? BufferBigIntNotDefined : fn\n}\n\nfunction BufferBigIntNotDefined () {\n throw new Error('BigInt not supported')\n}\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\nvar R = typeof Reflect === 'object' ? Reflect : null\nvar ReflectApply = R && typeof R.apply === 'function'\n ? R.apply\n : function ReflectApply(target, receiver, args) {\n return Function.prototype.apply.call(target, receiver, args);\n }\n\nvar ReflectOwnKeys\nif (R && typeof R.ownKeys === 'function') {\n ReflectOwnKeys = R.ownKeys\n} else if (Object.getOwnPropertySymbols) {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target)\n .concat(Object.getOwnPropertySymbols(target));\n };\n} else {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target);\n };\n}\n\nfunction ProcessEmitWarning(warning) {\n if (console && console.warn) console.warn(warning);\n}\n\nvar NumberIsNaN = Number.isNaN || function NumberIsNaN(value) {\n return value !== value;\n}\n\nfunction EventEmitter() {\n EventEmitter.init.call(this);\n}\nmodule.exports = EventEmitter;\nmodule.exports.once = once;\n\n// Backwards-compat with node 0.10.x\nEventEmitter.EventEmitter = EventEmitter;\n\nEventEmitter.prototype._events = undefined;\nEventEmitter.prototype._eventsCount = 0;\nEventEmitter.prototype._maxListeners = undefined;\n\n// By default EventEmitters will print a warning if more than 10 listeners are\n// added to it. This is a useful default which helps finding memory leaks.\nvar defaultMaxListeners = 10;\n\nfunction checkListener(listener) {\n if (typeof listener !== 'function') {\n throw new TypeError('The \"listener\" argument must be of type Function. Received type ' + typeof listener);\n }\n}\n\nObject.defineProperty(EventEmitter, 'defaultMaxListeners', {\n enumerable: true,\n get: function() {\n return defaultMaxListeners;\n },\n set: function(arg) {\n if (typeof arg !== 'number' || arg < 0 || NumberIsNaN(arg)) {\n throw new RangeError('The value of \"defaultMaxListeners\" is out of range. It must be a non-negative number. Received ' + arg + '.');\n }\n defaultMaxListeners = arg;\n }\n});\n\nEventEmitter.init = function() {\n\n if (this._events === undefined ||\n this._events === Object.getPrototypeOf(this)._events) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n }\n\n this._maxListeners = this._maxListeners || undefined;\n};\n\n// Obviously not all Emitters should be limited to 10. This function allows\n// that to be increased. Set to zero for unlimited.\nEventEmitter.prototype.setMaxListeners = function setMaxListeners(n) {\n if (typeof n !== 'number' || n < 0 || NumberIsNaN(n)) {\n throw new RangeError('The value of \"n\" is out of range. It must be a non-negative number. Received ' + n + '.');\n }\n this._maxListeners = n;\n return this;\n};\n\nfunction _getMaxListeners(that) {\n if (that._maxListeners === undefined)\n return EventEmitter.defaultMaxListeners;\n return that._maxListeners;\n}\n\nEventEmitter.prototype.getMaxListeners = function getMaxListeners() {\n return _getMaxListeners(this);\n};\n\nEventEmitter.prototype.emit = function emit(type) {\n var args = [];\n for (var i = 1; i < arguments.length; i++) args.push(arguments[i]);\n var doError = (type === 'error');\n\n var events = this._events;\n if (events !== undefined)\n doError = (doError && events.error === undefined);\n else if (!doError)\n return false;\n\n // If there is no 'error' event listener then throw.\n if (doError) {\n var er;\n if (args.length > 0)\n er = args[0];\n if (er instanceof Error) {\n // Note: The comments on the `throw` lines are intentional, they show\n // up in Node's output if this results in an unhandled exception.\n throw er; // Unhandled 'error' event\n }\n // At least give some kind of context to the user\n var err = new Error('Unhandled error.' + (er ? ' (' + er.message + ')' : ''));\n err.context = er;\n throw err; // Unhandled 'error' event\n }\n\n var handler = events[type];\n\n if (handler === undefined)\n return false;\n\n if (typeof handler === 'function') {\n ReflectApply(handler, this, args);\n } else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n ReflectApply(listeners[i], this, args);\n }\n\n return true;\n};\n\nfunction _addListener(target, type, listener, prepend) {\n var m;\n var events;\n var existing;\n\n checkListener(listener);\n\n events = target._events;\n if (events === undefined) {\n events = target._events = Object.create(null);\n target._eventsCount = 0;\n } else {\n // To avoid recursion in the case that type === \"newListener\"! Before\n // adding it to the listeners, first emit \"newListener\".\n if (events.newListener !== undefined) {\n target.emit('newListener', type,\n listener.listener ? listener.listener : listener);\n\n // Re-assign `events` because a newListener handler could have caused the\n // this._events to be assigned to a new object\n events = target._events;\n }\n existing = events[type];\n }\n\n if (existing === undefined) {\n // Optimize the case of one listener. Don't need the extra array object.\n existing = events[type] = listener;\n ++target._eventsCount;\n } else {\n if (typeof existing === 'function') {\n // Adding the second element, need to change to array.\n existing = events[type] =\n prepend ? [listener, existing] : [existing, listener];\n // If we've already got an array, just append.\n } else if (prepend) {\n existing.unshift(listener);\n } else {\n existing.push(listener);\n }\n\n // Check for listener leak\n m = _getMaxListeners(target);\n if (m > 0 && existing.length > m && !existing.warned) {\n existing.warned = true;\n // No error code for this since it is a Warning\n // eslint-disable-next-line no-restricted-syntax\n var w = new Error('Possible EventEmitter memory leak detected. ' +\n existing.length + ' ' + String(type) + ' listeners ' +\n 'added. Use emitter.setMaxListeners() to ' +\n 'increase limit');\n w.name = 'MaxListenersExceededWarning';\n w.emitter = target;\n w.type = type;\n w.count = existing.length;\n ProcessEmitWarning(w);\n }\n }\n\n return target;\n}\n\nEventEmitter.prototype.addListener = function addListener(type, listener) {\n return _addListener(this, type, listener, false);\n};\n\nEventEmitter.prototype.on = EventEmitter.prototype.addListener;\n\nEventEmitter.prototype.prependListener =\n function prependListener(type, listener) {\n return _addListener(this, type, listener, true);\n };\n\nfunction onceWrapper() {\n if (!this.fired) {\n this.target.removeListener(this.type, this.wrapFn);\n this.fired = true;\n if (arguments.length === 0)\n return this.listener.call(this.target);\n return this.listener.apply(this.target, arguments);\n }\n}\n\nfunction _onceWrap(target, type, listener) {\n var state = { fired: false, wrapFn: undefined, target: target, type: type, listener: listener };\n var wrapped = onceWrapper.bind(state);\n wrapped.listener = listener;\n state.wrapFn = wrapped;\n return wrapped;\n}\n\nEventEmitter.prototype.once = function once(type, listener) {\n checkListener(listener);\n this.on(type, _onceWrap(this, type, listener));\n return this;\n};\n\nEventEmitter.prototype.prependOnceListener =\n function prependOnceListener(type, listener) {\n checkListener(listener);\n this.prependListener(type, _onceWrap(this, type, listener));\n return this;\n };\n\n// Emits a 'removeListener' event if and only if the listener was removed.\nEventEmitter.prototype.removeListener =\n function removeListener(type, listener) {\n var list, events, position, i, originalListener;\n\n checkListener(listener);\n\n events = this._events;\n if (events === undefined)\n return this;\n\n list = events[type];\n if (list === undefined)\n return this;\n\n if (list === listener || list.listener === listener) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else {\n delete events[type];\n if (events.removeListener)\n this.emit('removeListener', type, list.listener || listener);\n }\n } else if (typeof list !== 'function') {\n position = -1;\n\n for (i = list.length - 1; i >= 0; i--) {\n if (list[i] === listener || list[i].listener === listener) {\n originalListener = list[i].listener;\n position = i;\n break;\n }\n }\n\n if (position < 0)\n return this;\n\n if (position === 0)\n list.shift();\n else {\n spliceOne(list, position);\n }\n\n if (list.length === 1)\n events[type] = list[0];\n\n if (events.removeListener !== undefined)\n this.emit('removeListener', type, originalListener || listener);\n }\n\n return this;\n };\n\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\n\nEventEmitter.prototype.removeAllListeners =\n function removeAllListeners(type) {\n var listeners, events, i;\n\n events = this._events;\n if (events === undefined)\n return this;\n\n // not listening for removeListener, no need to emit\n if (events.removeListener === undefined) {\n if (arguments.length === 0) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n } else if (events[type] !== undefined) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else\n delete events[type];\n }\n return this;\n }\n\n // emit removeListener for all listeners on all events\n if (arguments.length === 0) {\n var keys = Object.keys(events);\n var key;\n for (i = 0; i < keys.length; ++i) {\n key = keys[i];\n if (key === 'removeListener') continue;\n this.removeAllListeners(key);\n }\n this.removeAllListeners('removeListener');\n this._events = Object.create(null);\n this._eventsCount = 0;\n return this;\n }\n\n listeners = events[type];\n\n if (typeof listeners === 'function') {\n this.removeListener(type, listeners);\n } else if (listeners !== undefined) {\n // LIFO order\n for (i = listeners.length - 1; i >= 0; i--) {\n this.removeListener(type, listeners[i]);\n }\n }\n\n return this;\n };\n\nfunction _listeners(target, type, unwrap) {\n var events = target._events;\n\n if (events === undefined)\n return [];\n\n var evlistener = events[type];\n if (evlistener === undefined)\n return [];\n\n if (typeof evlistener === 'function')\n return unwrap ? [evlistener.listener || evlistener] : [evlistener];\n\n return unwrap ?\n unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length);\n}\n\nEventEmitter.prototype.listeners = function listeners(type) {\n return _listeners(this, type, true);\n};\n\nEventEmitter.prototype.rawListeners = function rawListeners(type) {\n return _listeners(this, type, false);\n};\n\nEventEmitter.listenerCount = function(emitter, type) {\n if (typeof emitter.listenerCount === 'function') {\n return emitter.listenerCount(type);\n } else {\n return listenerCount.call(emitter, type);\n }\n};\n\nEventEmitter.prototype.listenerCount = listenerCount;\nfunction listenerCount(type) {\n var events = this._events;\n\n if (events !== undefined) {\n var evlistener = events[type];\n\n if (typeof evlistener === 'function') {\n return 1;\n } else if (evlistener !== undefined) {\n return evlistener.length;\n }\n }\n\n return 0;\n}\n\nEventEmitter.prototype.eventNames = function eventNames() {\n return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : [];\n};\n\nfunction arrayClone(arr, n) {\n var copy = new Array(n);\n for (var i = 0; i < n; ++i)\n copy[i] = arr[i];\n return copy;\n}\n\nfunction spliceOne(list, index) {\n for (; index + 1 < list.length; index++)\n list[index] = list[index + 1];\n list.pop();\n}\n\nfunction unwrapListeners(arr) {\n var ret = new Array(arr.length);\n for (var i = 0; i < ret.length; ++i) {\n ret[i] = arr[i].listener || arr[i];\n }\n return ret;\n}\n\nfunction once(emitter, name) {\n return new Promise(function (resolve, reject) {\n function errorListener(err) {\n emitter.removeListener(name, resolver);\n reject(err);\n }\n\n function resolver() {\n if (typeof emitter.removeListener === 'function') {\n emitter.removeListener('error', errorListener);\n }\n resolve([].slice.call(arguments));\n };\n\n eventTargetAgnosticAddListener(emitter, name, resolver, { once: true });\n if (name !== 'error') {\n addErrorHandlerIfEventEmitter(emitter, errorListener, { once: true });\n }\n });\n}\n\nfunction addErrorHandlerIfEventEmitter(emitter, handler, flags) {\n if (typeof emitter.on === 'function') {\n eventTargetAgnosticAddListener(emitter, 'error', handler, flags);\n }\n}\n\nfunction eventTargetAgnosticAddListener(emitter, name, listener, flags) {\n if (typeof emitter.on === 'function') {\n if (flags.once) {\n emitter.once(name, listener);\n } else {\n emitter.on(name, listener);\n }\n } else if (typeof emitter.addEventListener === 'function') {\n // EventTarget does not have `error` event semantics like Node\n // EventEmitters, we do not listen for `error` events here.\n emitter.addEventListener(name, function wrapListener(arg) {\n // IE does not have builtin `{ once: true }` support so we\n // have to do it manually.\n if (flags.once) {\n emitter.removeEventListener(name, wrapListener);\n }\n listener(arg);\n });\n } else {\n throw new TypeError('The \"emitter\" argument must be of type EventEmitter. Received type ' + typeof emitter);\n }\n}\n","/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */\nexports.read = function (buffer, offset, isLE, mLen, nBytes) {\n var e, m\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var nBits = -7\n var i = isLE ? (nBytes - 1) : 0\n var d = isLE ? -1 : 1\n var s = buffer[offset + i]\n\n i += d\n\n e = s & ((1 << (-nBits)) - 1)\n s >>= (-nBits)\n nBits += eLen\n for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & ((1 << (-nBits)) - 1)\n e >>= (-nBits)\n nBits += mLen\n for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias\n } else if (e === eMax) {\n return m ? NaN : ((s ? -1 : 1) * Infinity)\n } else {\n m = m + Math.pow(2, mLen)\n e = e - eBias\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n var i = isLE ? 0 : (nBytes - 1)\n var d = isLE ? 1 : -1\n var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n value = Math.abs(value)\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0\n e = eMax\n } else {\n e = Math.floor(Math.log(value) / Math.LN2)\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--\n c *= 2\n }\n if (e + eBias >= 1) {\n value += rt / c\n } else {\n value += rt * Math.pow(2, 1 - eBias)\n }\n if (value * c >= 2) {\n e++\n c /= 2\n }\n\n if (e + eBias >= eMax) {\n m = 0\n e = eMax\n } else if (e + eBias >= 1) {\n m = ((value * c) - 1) * Math.pow(2, mLen)\n e = e + eBias\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n e = 0\n }\n }\n\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n e = (e << mLen) | m\n eLen += mLen\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128\n}\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView');\n\nmodule.exports = DataView;\n","var hashClear = require('./_hashClear'),\n hashDelete = require('./_hashDelete'),\n hashGet = require('./_hashGet'),\n hashHas = require('./_hashHas'),\n hashSet = require('./_hashSet');\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\nmodule.exports = Hash;\n","var listCacheClear = require('./_listCacheClear'),\n listCacheDelete = require('./_listCacheDelete'),\n listCacheGet = require('./_listCacheGet'),\n listCacheHas = require('./_listCacheHas'),\n listCacheSet = require('./_listCacheSet');\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\nmodule.exports = ListCache;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map');\n\nmodule.exports = Map;\n","var mapCacheClear = require('./_mapCacheClear'),\n mapCacheDelete = require('./_mapCacheDelete'),\n mapCacheGet = require('./_mapCacheGet'),\n mapCacheHas = require('./_mapCacheHas'),\n mapCacheSet = require('./_mapCacheSet');\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\nmodule.exports = MapCache;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Promise = getNative(root, 'Promise');\n\nmodule.exports = Promise;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Set = getNative(root, 'Set');\n\nmodule.exports = Set;\n","var MapCache = require('./_MapCache'),\n setCacheAdd = require('./_setCacheAdd'),\n setCacheHas = require('./_setCacheHas');\n\n/**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\nfunction SetCache(values) {\n var index = -1,\n length = values == null ? 0 : values.length;\n\n this.__data__ = new MapCache;\n while (++index < length) {\n this.add(values[index]);\n }\n}\n\n// Add methods to `SetCache`.\nSetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\nSetCache.prototype.has = setCacheHas;\n\nmodule.exports = SetCache;\n","var ListCache = require('./_ListCache'),\n stackClear = require('./_stackClear'),\n stackDelete = require('./_stackDelete'),\n stackGet = require('./_stackGet'),\n stackHas = require('./_stackHas'),\n stackSet = require('./_stackSet');\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\nmodule.exports = Stack;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Uint8Array = root.Uint8Array;\n\nmodule.exports = Uint8Array;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar WeakMap = getNative(root, 'WeakMap');\n\nmodule.exports = WeakMap;\n","/**\n * A specialized version of `_.forEach` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\nfunction arrayEach(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (iteratee(array[index], index, array) === false) {\n break;\n }\n }\n return array;\n}\n\nmodule.exports = arrayEach;\n","/**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\nfunction arrayFilter(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result[resIndex++] = value;\n }\n }\n return result;\n}\n\nmodule.exports = arrayFilter;\n","var baseTimes = require('./_baseTimes'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isIndex = require('./_isIndex'),\n isTypedArray = require('./isTypedArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = arrayLikeKeys;\n","/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n}\n\nmodule.exports = arrayPush;\n","/**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\nfunction arraySome(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (predicate(array[index], index, array)) {\n return true;\n }\n }\n return false;\n}\n\nmodule.exports = arraySome;\n","var baseAssignValue = require('./_baseAssignValue'),\n eq = require('./eq');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\nmodule.exports = assignValue;\n","var eq = require('./eq');\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\nmodule.exports = assocIndexOf;\n","var copyObject = require('./_copyObject'),\n keys = require('./keys');\n\n/**\n * The base implementation of `_.assign` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssign(object, source) {\n return object && copyObject(source, keys(source), object);\n}\n\nmodule.exports = baseAssign;\n","var copyObject = require('./_copyObject'),\n keysIn = require('./keysIn');\n\n/**\n * The base implementation of `_.assignIn` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssignIn(object, source) {\n return object && copyObject(source, keysIn(source), object);\n}\n\nmodule.exports = baseAssignIn;\n","var defineProperty = require('./_defineProperty');\n\n/**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction baseAssignValue(object, key, value) {\n if (key == '__proto__' && defineProperty) {\n defineProperty(object, key, {\n 'configurable': true,\n 'enumerable': true,\n 'value': value,\n 'writable': true\n });\n } else {\n object[key] = value;\n }\n}\n\nmodule.exports = baseAssignValue;\n","var Stack = require('./_Stack'),\n arrayEach = require('./_arrayEach'),\n assignValue = require('./_assignValue'),\n baseAssign = require('./_baseAssign'),\n baseAssignIn = require('./_baseAssignIn'),\n cloneBuffer = require('./_cloneBuffer'),\n copyArray = require('./_copyArray'),\n copySymbols = require('./_copySymbols'),\n copySymbolsIn = require('./_copySymbolsIn'),\n getAllKeys = require('./_getAllKeys'),\n getAllKeysIn = require('./_getAllKeysIn'),\n getTag = require('./_getTag'),\n initCloneArray = require('./_initCloneArray'),\n initCloneByTag = require('./_initCloneByTag'),\n initCloneObject = require('./_initCloneObject'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isMap = require('./isMap'),\n isObject = require('./isObject'),\n isSet = require('./isSet'),\n keys = require('./keys'),\n keysIn = require('./keysIn');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_FLAT_FLAG = 2,\n CLONE_SYMBOLS_FLAG = 4;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values supported by `_.clone`. */\nvar cloneableTags = {};\ncloneableTags[argsTag] = cloneableTags[arrayTag] =\ncloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =\ncloneableTags[boolTag] = cloneableTags[dateTag] =\ncloneableTags[float32Tag] = cloneableTags[float64Tag] =\ncloneableTags[int8Tag] = cloneableTags[int16Tag] =\ncloneableTags[int32Tag] = cloneableTags[mapTag] =\ncloneableTags[numberTag] = cloneableTags[objectTag] =\ncloneableTags[regexpTag] = cloneableTags[setTag] =\ncloneableTags[stringTag] = cloneableTags[symbolTag] =\ncloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =\ncloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;\ncloneableTags[errorTag] = cloneableTags[funcTag] =\ncloneableTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.clone` and `_.cloneDeep` which tracks\n * traversed objects.\n *\n * @private\n * @param {*} value The value to clone.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Deep clone\n * 2 - Flatten inherited properties\n * 4 - Clone symbols\n * @param {Function} [customizer] The function to customize cloning.\n * @param {string} [key] The key of `value`.\n * @param {Object} [object] The parent object of `value`.\n * @param {Object} [stack] Tracks traversed objects and their clone counterparts.\n * @returns {*} Returns the cloned value.\n */\nfunction baseClone(value, bitmask, customizer, key, object, stack) {\n var result,\n isDeep = bitmask & CLONE_DEEP_FLAG,\n isFlat = bitmask & CLONE_FLAT_FLAG,\n isFull = bitmask & CLONE_SYMBOLS_FLAG;\n\n if (customizer) {\n result = object ? customizer(value, key, object, stack) : customizer(value);\n }\n if (result !== undefined) {\n return result;\n }\n if (!isObject(value)) {\n return value;\n }\n var isArr = isArray(value);\n if (isArr) {\n result = initCloneArray(value);\n if (!isDeep) {\n return copyArray(value, result);\n }\n } else {\n var tag = getTag(value),\n isFunc = tag == funcTag || tag == genTag;\n\n if (isBuffer(value)) {\n return cloneBuffer(value, isDeep);\n }\n if (tag == objectTag || tag == argsTag || (isFunc && !object)) {\n result = (isFlat || isFunc) ? {} : initCloneObject(value);\n if (!isDeep) {\n return isFlat\n ? copySymbolsIn(value, baseAssignIn(result, value))\n : copySymbols(value, baseAssign(result, value));\n }\n } else {\n if (!cloneableTags[tag]) {\n return object ? value : {};\n }\n result = initCloneByTag(value, tag, isDeep);\n }\n }\n // Check for circular references and return its corresponding clone.\n stack || (stack = new Stack);\n var stacked = stack.get(value);\n if (stacked) {\n return stacked;\n }\n stack.set(value, result);\n\n if (isSet(value)) {\n value.forEach(function(subValue) {\n result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));\n });\n } else if (isMap(value)) {\n value.forEach(function(subValue, key) {\n result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n }\n\n var keysFunc = isFull\n ? (isFlat ? getAllKeysIn : getAllKeys)\n : (isFlat ? keysIn : keys);\n\n var props = isArr ? undefined : keysFunc(value);\n arrayEach(props || value, function(subValue, key) {\n if (props) {\n key = subValue;\n subValue = value[key];\n }\n // Recursively populate clone (susceptible to call stack limits).\n assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n return result;\n}\n\nmodule.exports = baseClone;\n","var isObject = require('./isObject');\n\n/** Built-in value references. */\nvar objectCreate = Object.create;\n\n/**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} proto The object to inherit from.\n * @returns {Object} Returns the new object.\n */\nvar baseCreate = (function() {\n function object() {}\n return function(proto) {\n if (!isObject(proto)) {\n return {};\n }\n if (objectCreate) {\n return objectCreate(proto);\n }\n object.prototype = proto;\n var result = new object;\n object.prototype = undefined;\n return result;\n };\n}());\n\nmodule.exports = baseCreate;\n","var arrayPush = require('./_arrayPush'),\n isArray = require('./isArray');\n\n/**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction baseGetAllKeys(object, keysFunc, symbolsFunc) {\n var result = keysFunc(object);\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n}\n\nmodule.exports = baseGetAllKeys;\n","var Symbol = require('./_Symbol'),\n getRawTag = require('./_getRawTag'),\n objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]';\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\nmodule.exports = baseIsArguments;\n","var baseIsEqualDeep = require('./_baseIsEqualDeep'),\n isObjectLike = require('./isObjectLike');\n\n/**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Unordered comparison\n * 2 - Partial comparison\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\nfunction baseIsEqual(value, other, bitmask, customizer, stack) {\n if (value === other) {\n return true;\n }\n if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\n return value !== value && other !== other;\n }\n return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n}\n\nmodule.exports = baseIsEqual;\n","var Stack = require('./_Stack'),\n equalArrays = require('./_equalArrays'),\n equalByTag = require('./_equalByTag'),\n equalObjects = require('./_equalObjects'),\n getTag = require('./_getTag'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isTypedArray = require('./isTypedArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n var objIsArr = isArray(object),\n othIsArr = isArray(other),\n objTag = objIsArr ? arrayTag : getTag(object),\n othTag = othIsArr ? arrayTag : getTag(other);\n\n objTag = objTag == argsTag ? objectTag : objTag;\n othTag = othTag == argsTag ? objectTag : othTag;\n\n var objIsObj = objTag == objectTag,\n othIsObj = othTag == objectTag,\n isSameTag = objTag == othTag;\n\n if (isSameTag && isBuffer(object)) {\n if (!isBuffer(other)) {\n return false;\n }\n objIsArr = true;\n objIsObj = false;\n }\n if (isSameTag && !objIsObj) {\n stack || (stack = new Stack);\n return (objIsArr || isTypedArray(object))\n ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n }\n if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n if (objIsWrapped || othIsWrapped) {\n var objUnwrapped = objIsWrapped ? object.value() : object,\n othUnwrapped = othIsWrapped ? other.value() : other;\n\n stack || (stack = new Stack);\n return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n }\n }\n if (!isSameTag) {\n return false;\n }\n stack || (stack = new Stack);\n return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n}\n\nmodule.exports = baseIsEqualDeep;\n","var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]';\n\n/**\n * The base implementation of `_.isMap` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n */\nfunction baseIsMap(value) {\n return isObjectLike(value) && getTag(value) == mapTag;\n}\n\nmodule.exports = baseIsMap;\n","var isFunction = require('./isFunction'),\n isMasked = require('./_isMasked'),\n isObject = require('./isObject'),\n toSource = require('./_toSource');\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\nmodule.exports = baseIsNative;\n","var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar setTag = '[object Set]';\n\n/**\n * The base implementation of `_.isSet` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n */\nfunction baseIsSet(value) {\n return isObjectLike(value) && getTag(value) == setTag;\n}\n\nmodule.exports = baseIsSet;\n","var baseGetTag = require('./_baseGetTag'),\n isLength = require('./isLength'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n\nmodule.exports = baseIsTypedArray;\n","var isPrototype = require('./_isPrototype'),\n nativeKeys = require('./_nativeKeys');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeys;\n","var isObject = require('./isObject'),\n isPrototype = require('./_isPrototype'),\n nativeKeysIn = require('./_nativeKeysIn');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeysIn(object) {\n if (!isObject(object)) {\n return nativeKeysIn(object);\n }\n var isProto = isPrototype(object),\n result = [];\n\n for (var key in object) {\n if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeysIn;\n","/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\nmodule.exports = baseTimes;\n","/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n return function(value) {\n return func(value);\n };\n}\n\nmodule.exports = baseUnary;\n","/**\n * Checks if a `cache` value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction cacheHas(cache, key) {\n return cache.has(key);\n}\n\nmodule.exports = cacheHas;\n","var Uint8Array = require('./_Uint8Array');\n\n/**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\nfunction cloneArrayBuffer(arrayBuffer) {\n var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n return result;\n}\n\nmodule.exports = cloneArrayBuffer;\n","var root = require('./_root');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined,\n allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;\n\n/**\n * Creates a clone of `buffer`.\n *\n * @private\n * @param {Buffer} buffer The buffer to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Buffer} Returns the cloned buffer.\n */\nfunction cloneBuffer(buffer, isDeep) {\n if (isDeep) {\n return buffer.slice();\n }\n var length = buffer.length,\n result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\n\n buffer.copy(result);\n return result;\n}\n\nmodule.exports = cloneBuffer;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer');\n\n/**\n * Creates a clone of `dataView`.\n *\n * @private\n * @param {Object} dataView The data view to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned data view.\n */\nfunction cloneDataView(dataView, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;\n return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);\n}\n\nmodule.exports = cloneDataView;\n","/** Used to match `RegExp` flags from their coerced string values. */\nvar reFlags = /\\w*$/;\n\n/**\n * Creates a clone of `regexp`.\n *\n * @private\n * @param {Object} regexp The regexp to clone.\n * @returns {Object} Returns the cloned regexp.\n */\nfunction cloneRegExp(regexp) {\n var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));\n result.lastIndex = regexp.lastIndex;\n return result;\n}\n\nmodule.exports = cloneRegExp;\n","var Symbol = require('./_Symbol');\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * Creates a clone of the `symbol` object.\n *\n * @private\n * @param {Object} symbol The symbol object to clone.\n * @returns {Object} Returns the cloned symbol object.\n */\nfunction cloneSymbol(symbol) {\n return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};\n}\n\nmodule.exports = cloneSymbol;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer');\n\n/**\n * Creates a clone of `typedArray`.\n *\n * @private\n * @param {Object} typedArray The typed array to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned typed array.\n */\nfunction cloneTypedArray(typedArray, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n}\n\nmodule.exports = cloneTypedArray;\n","/**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\nfunction copyArray(source, array) {\n var index = -1,\n length = source.length;\n\n array || (array = Array(length));\n while (++index < length) {\n array[index] = source[index];\n }\n return array;\n}\n\nmodule.exports = copyArray;\n","var assignValue = require('./_assignValue'),\n baseAssignValue = require('./_baseAssignValue');\n\n/**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\nfunction copyObject(source, props, object, customizer) {\n var isNew = !object;\n object || (object = {});\n\n var index = -1,\n length = props.length;\n\n while (++index < length) {\n var key = props[index];\n\n var newValue = customizer\n ? customizer(object[key], source[key], key, object, source)\n : undefined;\n\n if (newValue === undefined) {\n newValue = source[key];\n }\n if (isNew) {\n baseAssignValue(object, key, newValue);\n } else {\n assignValue(object, key, newValue);\n }\n }\n return object;\n}\n\nmodule.exports = copyObject;\n","var copyObject = require('./_copyObject'),\n getSymbols = require('./_getSymbols');\n\n/**\n * Copies own symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbols(source, object) {\n return copyObject(source, getSymbols(source), object);\n}\n\nmodule.exports = copySymbols;\n","var copyObject = require('./_copyObject'),\n getSymbolsIn = require('./_getSymbolsIn');\n\n/**\n * Copies own and inherited symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbolsIn(source, object) {\n return copyObject(source, getSymbolsIn(source), object);\n}\n\nmodule.exports = copySymbolsIn;\n","var root = require('./_root');\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\nmodule.exports = coreJsData;\n","var getNative = require('./_getNative');\n\nvar defineProperty = (function() {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n}());\n\nmodule.exports = defineProperty;\n","var SetCache = require('./_SetCache'),\n arraySome = require('./_arraySome'),\n cacheHas = require('./_cacheHas');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\nfunction equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n arrLength = array.length,\n othLength = other.length;\n\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n return false;\n }\n // Check that cyclic values are equal.\n var arrStacked = stack.get(array);\n var othStacked = stack.get(other);\n if (arrStacked && othStacked) {\n return arrStacked == other && othStacked == array;\n }\n var index = -1,\n result = true,\n seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n stack.set(array, other);\n stack.set(other, array);\n\n // Ignore non-index properties.\n while (++index < arrLength) {\n var arrValue = array[index],\n othValue = other[index];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, arrValue, index, other, array, stack)\n : customizer(arrValue, othValue, index, array, other, stack);\n }\n if (compared !== undefined) {\n if (compared) {\n continue;\n }\n result = false;\n break;\n }\n // Recursively compare arrays (susceptible to call stack limits).\n if (seen) {\n if (!arraySome(other, function(othValue, othIndex) {\n if (!cacheHas(seen, othIndex) &&\n (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n return seen.push(othIndex);\n }\n })) {\n result = false;\n break;\n }\n } else if (!(\n arrValue === othValue ||\n equalFunc(arrValue, othValue, bitmask, customizer, stack)\n )) {\n result = false;\n break;\n }\n }\n stack['delete'](array);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalArrays;\n","var Symbol = require('./_Symbol'),\n Uint8Array = require('./_Uint8Array'),\n eq = require('./eq'),\n equalArrays = require('./_equalArrays'),\n mapToArray = require('./_mapToArray'),\n setToArray = require('./_setToArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]';\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n switch (tag) {\n case dataViewTag:\n if ((object.byteLength != other.byteLength) ||\n (object.byteOffset != other.byteOffset)) {\n return false;\n }\n object = object.buffer;\n other = other.buffer;\n\n case arrayBufferTag:\n if ((object.byteLength != other.byteLength) ||\n !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n return false;\n }\n return true;\n\n case boolTag:\n case dateTag:\n case numberTag:\n // Coerce booleans to `1` or `0` and dates to milliseconds.\n // Invalid dates are coerced to `NaN`.\n return eq(+object, +other);\n\n case errorTag:\n return object.name == other.name && object.message == other.message;\n\n case regexpTag:\n case stringTag:\n // Coerce regexes to strings and treat strings, primitives and objects,\n // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n // for more details.\n return object == (other + '');\n\n case mapTag:\n var convert = mapToArray;\n\n case setTag:\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n convert || (convert = setToArray);\n\n if (object.size != other.size && !isPartial) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked) {\n return stacked == other;\n }\n bitmask |= COMPARE_UNORDERED_FLAG;\n\n // Recursively compare objects (susceptible to call stack limits).\n stack.set(object, other);\n var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n stack['delete'](object);\n return result;\n\n case symbolTag:\n if (symbolValueOf) {\n return symbolValueOf.call(object) == symbolValueOf.call(other);\n }\n }\n return false;\n}\n\nmodule.exports = equalByTag;\n","var getAllKeys = require('./_getAllKeys');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n objProps = getAllKeys(object),\n objLength = objProps.length,\n othProps = getAllKeys(other),\n othLength = othProps.length;\n\n if (objLength != othLength && !isPartial) {\n return false;\n }\n var index = objLength;\n while (index--) {\n var key = objProps[index];\n if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n return false;\n }\n }\n // Check that cyclic values are equal.\n var objStacked = stack.get(object);\n var othStacked = stack.get(other);\n if (objStacked && othStacked) {\n return objStacked == other && othStacked == object;\n }\n var result = true;\n stack.set(object, other);\n stack.set(other, object);\n\n var skipCtor = isPartial;\n while (++index < objLength) {\n key = objProps[index];\n var objValue = object[key],\n othValue = other[key];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, objValue, key, other, object, stack)\n : customizer(objValue, othValue, key, object, other, stack);\n }\n // Recursively compare objects (susceptible to call stack limits).\n if (!(compared === undefined\n ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n : compared\n )) {\n result = false;\n break;\n }\n skipCtor || (skipCtor = key == 'constructor');\n }\n if (result && !skipCtor) {\n var objCtor = object.constructor,\n othCtor = other.constructor;\n\n // Non `Object` object instances with different constructors are not equal.\n if (objCtor != othCtor &&\n ('constructor' in object && 'constructor' in other) &&\n !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n result = false;\n }\n }\n stack['delete'](object);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalObjects;\n","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n","var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbols = require('./_getSymbols'),\n keys = require('./keys');\n\n/**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeys(object) {\n return baseGetAllKeys(object, keys, getSymbols);\n}\n\nmodule.exports = getAllKeys;\n","var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbolsIn = require('./_getSymbolsIn'),\n keysIn = require('./keysIn');\n\n/**\n * Creates an array of own and inherited enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeysIn(object) {\n return baseGetAllKeys(object, keysIn, getSymbolsIn);\n}\n\nmodule.exports = getAllKeysIn;\n","var isKeyable = require('./_isKeyable');\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\nmodule.exports = getMapData;\n","var baseIsNative = require('./_baseIsNative'),\n getValue = require('./_getValue');\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\nmodule.exports = getNative;\n","var overArg = require('./_overArg');\n\n/** Built-in value references. */\nvar getPrototype = overArg(Object.getPrototypeOf, Object);\n\nmodule.exports = getPrototype;\n","var Symbol = require('./_Symbol');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nmodule.exports = getRawTag;\n","var arrayFilter = require('./_arrayFilter'),\n stubArray = require('./stubArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n if (object == null) {\n return [];\n }\n object = Object(object);\n return arrayFilter(nativeGetSymbols(object), function(symbol) {\n return propertyIsEnumerable.call(object, symbol);\n });\n};\n\nmodule.exports = getSymbols;\n","var arrayPush = require('./_arrayPush'),\n getPrototype = require('./_getPrototype'),\n getSymbols = require('./_getSymbols'),\n stubArray = require('./stubArray');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own and inherited enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {\n var result = [];\n while (object) {\n arrayPush(result, getSymbols(object));\n object = getPrototype(object);\n }\n return result;\n};\n\nmodule.exports = getSymbolsIn;\n","var DataView = require('./_DataView'),\n Map = require('./_Map'),\n Promise = require('./_Promise'),\n Set = require('./_Set'),\n WeakMap = require('./_WeakMap'),\n baseGetTag = require('./_baseGetTag'),\n toSource = require('./_toSource');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n setTag = '[object Set]',\n weakMapTag = '[object WeakMap]';\n\nvar dataViewTag = '[object DataView]';\n\n/** Used to detect maps, sets, and weakmaps. */\nvar dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nvar getTag = baseGetTag;\n\n// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\nif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = baseGetTag(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : '';\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n}\n\nmodule.exports = getTag;\n","/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\nmodule.exports = getValue;\n","var nativeCreate = require('./_nativeCreate');\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n}\n\nmodule.exports = hashClear;\n","/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = hashDelete;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\nmodule.exports = hashGet;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\nmodule.exports = hashHas;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\nmodule.exports = hashSet;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Initializes an array clone.\n *\n * @private\n * @param {Array} array The array to clone.\n * @returns {Array} Returns the initialized clone.\n */\nfunction initCloneArray(array) {\n var length = array.length,\n result = new array.constructor(length);\n\n // Add properties assigned by `RegExp#exec`.\n if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {\n result.index = array.index;\n result.input = array.input;\n }\n return result;\n}\n\nmodule.exports = initCloneArray;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer'),\n cloneDataView = require('./_cloneDataView'),\n cloneRegExp = require('./_cloneRegExp'),\n cloneSymbol = require('./_cloneSymbol'),\n cloneTypedArray = require('./_cloneTypedArray');\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/**\n * Initializes an object clone based on its `toStringTag`.\n *\n * **Note:** This function only supports cloning values with tags of\n * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.\n *\n * @private\n * @param {Object} object The object to clone.\n * @param {string} tag The `toStringTag` of the object to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneByTag(object, tag, isDeep) {\n var Ctor = object.constructor;\n switch (tag) {\n case arrayBufferTag:\n return cloneArrayBuffer(object);\n\n case boolTag:\n case dateTag:\n return new Ctor(+object);\n\n case dataViewTag:\n return cloneDataView(object, isDeep);\n\n case float32Tag: case float64Tag:\n case int8Tag: case int16Tag: case int32Tag:\n case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:\n return cloneTypedArray(object, isDeep);\n\n case mapTag:\n return new Ctor;\n\n case numberTag:\n case stringTag:\n return new Ctor(object);\n\n case regexpTag:\n return cloneRegExp(object);\n\n case setTag:\n return new Ctor;\n\n case symbolTag:\n return cloneSymbol(object);\n }\n}\n\nmodule.exports = initCloneByTag;\n","var baseCreate = require('./_baseCreate'),\n getPrototype = require('./_getPrototype'),\n isPrototype = require('./_isPrototype');\n\n/**\n * Initializes an object clone.\n *\n * @private\n * @param {Object} object The object to clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneObject(object) {\n return (typeof object.constructor == 'function' && !isPrototype(object))\n ? baseCreate(getPrototype(object))\n : {};\n}\n\nmodule.exports = initCloneObject;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n var type = typeof value;\n length = length == null ? MAX_SAFE_INTEGER : length;\n\n return !!length &&\n (type == 'number' ||\n (type != 'symbol' && reIsUint.test(value))) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\nmodule.exports = isIndex;\n","/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\nmodule.exports = isKeyable;\n","var coreJsData = require('./_coreJsData');\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\nmodule.exports = isMasked;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\nmodule.exports = isPrototype;\n","/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n}\n\nmodule.exports = listCacheClear;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype;\n\n/** Built-in value references. */\nvar splice = arrayProto.splice;\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n}\n\nmodule.exports = listCacheDelete;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\nmodule.exports = listCacheGet;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\nmodule.exports = listCacheHas;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\nmodule.exports = listCacheSet;\n","var Hash = require('./_Hash'),\n ListCache = require('./_ListCache'),\n Map = require('./_Map');\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\nmodule.exports = mapCacheClear;\n","var getMapData = require('./_getMapData');\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = mapCacheDelete;\n","var getMapData = require('./_getMapData');\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\nmodule.exports = mapCacheGet;\n","var getMapData = require('./_getMapData');\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\nmodule.exports = mapCacheHas;\n","var getMapData = require('./_getMapData');\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n}\n\nmodule.exports = mapCacheSet;\n","/**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\nfunction mapToArray(map) {\n var index = -1,\n result = Array(map.size);\n\n map.forEach(function(value, key) {\n result[++index] = [key, value];\n });\n return result;\n}\n\nmodule.exports = mapToArray;\n","var getNative = require('./_getNative');\n\n/* Built-in method references that are verified to be native. */\nvar nativeCreate = getNative(Object, 'create');\n\nmodule.exports = nativeCreate;\n","var overArg = require('./_overArg');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeKeys = overArg(Object.keys, Object);\n\nmodule.exports = nativeKeys;\n","/**\n * This function is like\n * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * except that it includes inherited enumerable properties.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction nativeKeysIn(object) {\n var result = [];\n if (object != null) {\n for (var key in Object(object)) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = nativeKeysIn;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n try {\n // Use `util.types` for Node.js 10+.\n var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n if (types) {\n return types;\n }\n\n // Legacy `process.binding('util')` for Node.js < 10.\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n}());\n\nmodule.exports = nodeUtil;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n","/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\nmodule.exports = overArg;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n","/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\nfunction setCacheAdd(value) {\n this.__data__.set(value, HASH_UNDEFINED);\n return this;\n}\n\nmodule.exports = setCacheAdd;\n","/**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\nfunction setCacheHas(value) {\n return this.__data__.has(value);\n}\n\nmodule.exports = setCacheHas;\n","/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\nfunction setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n}\n\nmodule.exports = setToArray;\n","var ListCache = require('./_ListCache');\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}\n\nmodule.exports = stackClear;\n","/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n var data = this.__data__,\n result = data['delete'](key);\n\n this.size = data.size;\n return result;\n}\n\nmodule.exports = stackDelete;\n","/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n return this.__data__.get(key);\n}\n\nmodule.exports = stackGet;\n","/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n return this.__data__.has(key);\n}\n\nmodule.exports = stackHas;\n","var ListCache = require('./_ListCache'),\n Map = require('./_Map'),\n MapCache = require('./_MapCache');\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n var data = this.__data__;\n if (data instanceof ListCache) {\n var pairs = data.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n this.size = ++data.size;\n return this;\n }\n data = this.__data__ = new MapCache(pairs);\n }\n data.set(key, value);\n this.size = data.size;\n return this;\n}\n\nmodule.exports = stackSet;\n","/** Used for built-in method references. */\nvar funcProto = Function.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\nmodule.exports = toSource;\n","var baseClone = require('./_baseClone');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_SYMBOLS_FLAG = 4;\n\n/**\n * This method is like `_.clone` except that it recursively clones `value`.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Lang\n * @param {*} value The value to recursively clone.\n * @returns {*} Returns the deep cloned value.\n * @see _.clone\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var deep = _.cloneDeep(objects);\n * console.log(deep[0] === objects[0]);\n * // => false\n */\nfunction cloneDeep(value) {\n return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);\n}\n\nmodule.exports = cloneDeep;\n","/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\nmodule.exports = eq;\n","var baseIsArguments = require('./_baseIsArguments'),\n isObjectLike = require('./isObjectLike');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n};\n\nmodule.exports = isArguments;\n","/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\nmodule.exports = isArray;\n","var isFunction = require('./isFunction'),\n isLength = require('./isLength');\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\nmodule.exports = isArrayLike;\n","var root = require('./_root'),\n stubFalse = require('./stubFalse');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\nmodule.exports = isBuffer;\n","var baseIsEqual = require('./_baseIsEqual');\n\n/**\n * Performs a deep comparison between two values to determine if they are\n * equivalent.\n *\n * **Note:** This method supports comparing arrays, array buffers, booleans,\n * date objects, error objects, maps, numbers, `Object` objects, regexes,\n * sets, strings, symbols, and typed arrays. `Object` objects are compared\n * by their own, not inherited, enumerable properties. Functions and DOM\n * nodes are compared by strict equality, i.e. `===`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.isEqual(object, other);\n * // => true\n *\n * object === other;\n * // => false\n */\nfunction isEqual(value, other) {\n return baseIsEqual(value, other);\n}\n\nmodule.exports = isEqual;\n","var baseGetTag = require('./_baseGetTag'),\n isObject = require('./isObject');\n\n/** `Object#toString` result references. */\nvar asyncTag = '[object AsyncFunction]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n proxyTag = '[object Proxy]';\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\nmodule.exports = isFunction;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\nmodule.exports = isLength;\n","var baseIsMap = require('./_baseIsMap'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsMap = nodeUtil && nodeUtil.isMap;\n\n/**\n * Checks if `value` is classified as a `Map` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n * @example\n *\n * _.isMap(new Map);\n * // => true\n *\n * _.isMap(new WeakMap);\n * // => false\n */\nvar isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;\n\nmodule.exports = isMap;\n","/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n","var baseIsSet = require('./_baseIsSet'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsSet = nodeUtil && nodeUtil.isSet;\n\n/**\n * Checks if `value` is classified as a `Set` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n * @example\n *\n * _.isSet(new Set);\n * // => true\n *\n * _.isSet(new WeakSet);\n * // => false\n */\nvar isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;\n\nmodule.exports = isSet;\n","var baseIsTypedArray = require('./_baseIsTypedArray'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\nmodule.exports = isTypedArray;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeys = require('./_baseKeys'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\nmodule.exports = keys;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeysIn = require('./_baseKeysIn'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\nfunction keysIn(object) {\n return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n}\n\nmodule.exports = keysIn;\n","/**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\nfunction stubArray() {\n return [];\n}\n\nmodule.exports = stubArray;\n","/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n return false;\n}\n\nmodule.exports = stubFalse;\n","import { connect, type BaseConnectionOptions } from \"@openfin/core-web\";\nimport { getSettings } from \"../platform/settings/settings\";\n\n/**\n * Initializes the OpenFin Web Broker connection.\n * @param inherit Should we inherit settings from the host (available in the OpenFin layout system) or use settings? Default is true.\n */\nexport async function init(inherit: boolean = true): Promise {\n\t// Set window.fin to the `fin` object.\n\tlet options: BaseConnectionOptions | undefined;\n\tif (window.fin === undefined) {\n\t\tif (!inherit) {\n\t\t\tconst settings = await getSettings();\n\t\t\tif (settings === undefined) {\n\t\t\t\tconsole.error(\n\t\t\t\t\t\"Unable to run the sample as we have been unable to load the web manifest and it's settings from the currently running html page. Please ensure that the web manifest is being served and that it contains the custom_settings section.\"\n\t\t\t\t);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\toptions = {\n\t\t\t\tbrokerUrl: settings.platform.interop.brokerUrl,\n\t\t\t\tinteropConfig: {\n\t\t\t\t\tproviderId: settings.platform.interop.providerId,\n\t\t\t\t\tcurrentContextGroup: settings.platform.interop.defaultContextGroup\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t\t// Specify an interopConfig with a specific provider ID and a context group to initialize the `fin.me.interop` client on connection.\n\t\tif (options) {\n\t\t\twindow.fin = await connect({\n\t\t\t\toptions\n\t\t\t});\n\t\t} else {\n\t\t\twindow.fin = await connect({\n\t\t\t\tconnectionInheritance: \"enabled\"\n\t\t\t});\n\t\t}\n\t\tconsole.log(\"Finished initializing the fin API.\");\n\t\t// Create and dispatch the finReady event\n\t\tconst event = new CustomEvent(\"finReady\");\n\t\twindow.dispatchEvent(event);\n\t}\n\n\tif (window.fdc3 === undefined && window?.fin?.me.interop?.getFDC3Sync !== undefined) {\n\t\twindow.fdc3 = fin.me.interop.getFDC3Sync(\"2.0\");\n\t\tconsole.log(\"Finished initializing the fdc3 API.\");\n\t\t// Create and dispatch the FDC3Ready event\n\t\tconst event = new CustomEvent(\"fdc3Ready\");\n\t\twindow.dispatchEvent(event);\n\t}\n}\n","import type { OpenFin } from \"@openfin/core\";\nimport type { ManifestSettings, Settings } from \"../../shapes/setting-shapes\";\n\n/**\n * Fetches the settings for the application.\n * @returns The settings for the application.\n */\nexport async function getSettings(): Promise {\n\tconst savedSettings = await getSavedSettings();\n\tif (savedSettings) {\n\t\treturn savedSettings;\n\t}\n\tconst settings = await getManifestSettings();\n\tif (!Array.isArray(settings?.endpointProvider?.endpoints)) {\n\t\tconsole.error(\n\t\t\t\"Unable to run the example as settings are required and we fetch them from the link web manifest from the html page that is being served. It should exist in the customSettings section of the web manifest.\"\n\t\t);\n\t\treturn;\n\t}\n\tconst settingsEndpoint = settings.endpointProvider.endpoints.find(\n\t\t(endpoint) => endpoint.id === \"platform-settings\"\n\t);\n\n\tif (\n\t\tsettingsEndpoint === undefined ||\n\t\tsettingsEndpoint.type !== \"fetch\" ||\n\t\tsettingsEndpoint.options.method !== \"GET\" ||\n\t\tsettingsEndpoint.options.url === undefined\n\t) {\n\t\tconsole.error(\n\t\t\t\"Unable to run the example as settings are required and we fetch them from the endpoint defined with the id: 'platform-settings' in the manifest. It needs to be of type fetch, performing a GET and it must have a url defined.\"\n\t\t);\n\t\treturn;\n\t}\n\tconst platformSettings = await fetch(settingsEndpoint?.options.url);\n\tconst settingsJson = (await platformSettings.json()) as Settings;\n\treturn settingsJson;\n}\n\n/**\n * Returns a default layout from the settings if provided.\n * @returns The default layout from the settings.\n */\nexport async function getDefaultLayout(): Promise {\n\tconst settings = await getSettings();\n\tif (settings?.platform?.layout?.defaultLayout === undefined) {\n\t\tconsole.error(\n\t\t\t\"Unable to run the example as without a layout being defined. Please ensure that settings have been provided in the web manifest.\"\n\t\t);\n\t\treturn;\n\t}\n\tif (typeof settings.platform.layout.defaultLayout === \"string\") {\n\t\tconst layoutResponse = await fetch(settings.platform.layout.defaultLayout);\n\t\tconst layoutJson = (await layoutResponse.json()) as OpenFin.LayoutSnapshot;\n\t\treturn layoutJson;\n\t}\n\treturn settings.platform.layout.defaultLayout;\n}\n\n/**\n * Returns the settings from the manifest file.\n * @returns customSettings for this example\n */\nasync function getManifestSettings(): Promise {\n\t// Get the manifest link\n\tconst link = document.querySelector('link[rel=\"manifest\"]');\n\tif (link !== null) {\n\t\tconst manifestResponse = await fetch(link.href);\n\t\tconst manifestJson = (await manifestResponse.json()) as { custom_settings: ManifestSettings };\n\t\treturn manifestJson.custom_settings;\n\t}\n}\n\n/**\n * Clears any saved settings.\n * @returns The saved settings.\n */\nexport async function clearSettings(): Promise {\n\tconst settingsId = getSavedSettingsId();\n\tlocalStorage.removeItem(settingsId);\n}\n\n/**\n * Saves the settings.\n * @param settings The settings to save.\n */\nexport async function saveSettings(settings: Settings): Promise {\n\tconst settingsId = getSavedSettingsId();\n\tlocalStorage.setItem(settingsId, JSON.stringify(settings));\n}\n\n/**\n * Retrieves saved settings from local storage.\n * @returns The saved settings.\n */\nasync function getSavedSettings(): Promise {\n\tconst settingsId = getSavedSettingsId();\n\tconst settings = localStorage.getItem(settingsId);\n\tif (settings !== null) {\n\t\treturn JSON.parse(settings);\n\t}\n}\n\n/**\n * Get the Id used for saving and fetching settings from storage.\n * @returns The settings id.\n */\nfunction getSavedSettingsId(): string {\n\tconst urlParams = new URLSearchParams(window.location.search);\n\tconst env = urlParams.get(\"env\");\n\n\tconst settingsKey = env ? `${env}-settings` : \"settings\";\n\treturn settingsKey;\n}\n","export { default as v1 } from './v1.js';\nexport { default as v3 } from './v3.js';\nexport { default as v4 } from './v4.js';\nexport { default as v5 } from './v5.js';\nexport { default as NIL } from './nil.js';\nexport { default as version } from './version.js';\nexport { default as validate } from './validate.js';\nexport { default as stringify } from './stringify.js';\nexport { default as parse } from './parse.js';","/*\n * Browser-compatible JavaScript MD5\n *\n * Modification of JavaScript MD5\n * https://github.com/blueimp/JavaScript-MD5\n *\n * Copyright 2011, Sebastian Tschan\n * https://blueimp.net\n *\n * Licensed under the MIT license:\n * https://opensource.org/licenses/MIT\n *\n * Based on\n * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message\n * Digest Algorithm, as defined in RFC 1321.\n * Version 2.2 Copyright (C) Paul Johnston 1999 - 2009\n * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet\n * Distributed under the BSD License\n * See http://pajhome.org.uk/crypt/md5 for more info.\n */\nfunction md5(bytes) {\n if (typeof bytes === 'string') {\n var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape\n\n bytes = new Uint8Array(msg.length);\n\n for (var i = 0; i < msg.length; ++i) {\n bytes[i] = msg.charCodeAt(i);\n }\n }\n\n return md5ToHexEncodedArray(wordsToMd5(bytesToWords(bytes), bytes.length * 8));\n}\n/*\n * Convert an array of little-endian words to an array of bytes\n */\n\n\nfunction md5ToHexEncodedArray(input) {\n var output = [];\n var length32 = input.length * 32;\n var hexTab = '0123456789abcdef';\n\n for (var i = 0; i < length32; i += 8) {\n var x = input[i >> 5] >>> i % 32 & 0xff;\n var hex = parseInt(hexTab.charAt(x >>> 4 & 0x0f) + hexTab.charAt(x & 0x0f), 16);\n output.push(hex);\n }\n\n return output;\n}\n/**\n * Calculate output length with padding and bit length\n */\n\n\nfunction getOutputLength(inputLength8) {\n return (inputLength8 + 64 >>> 9 << 4) + 14 + 1;\n}\n/*\n * Calculate the MD5 of an array of little-endian words, and a bit length.\n */\n\n\nfunction wordsToMd5(x, len) {\n /* append padding */\n x[len >> 5] |= 0x80 << len % 32;\n x[getOutputLength(len) - 1] = len;\n var a = 1732584193;\n var b = -271733879;\n var c = -1732584194;\n var d = 271733878;\n\n for (var i = 0; i < x.length; i += 16) {\n var olda = a;\n var oldb = b;\n var oldc = c;\n var oldd = d;\n a = md5ff(a, b, c, d, x[i], 7, -680876936);\n d = md5ff(d, a, b, c, x[i + 1], 12, -389564586);\n c = md5ff(c, d, a, b, x[i + 2], 17, 606105819);\n b = md5ff(b, c, d, a, x[i + 3], 22, -1044525330);\n a = md5ff(a, b, c, d, x[i + 4], 7, -176418897);\n d = md5ff(d, a, b, c, x[i + 5], 12, 1200080426);\n c = md5ff(c, d, a, b, x[i + 6], 17, -1473231341);\n b = md5ff(b, c, d, a, x[i + 7], 22, -45705983);\n a = md5ff(a, b, c, d, x[i + 8], 7, 1770035416);\n d = md5ff(d, a, b, c, x[i + 9], 12, -1958414417);\n c = md5ff(c, d, a, b, x[i + 10], 17, -42063);\n b = md5ff(b, c, d, a, x[i + 11], 22, -1990404162);\n a = md5ff(a, b, c, d, x[i + 12], 7, 1804603682);\n d = md5ff(d, a, b, c, x[i + 13], 12, -40341101);\n c = md5ff(c, d, a, b, x[i + 14], 17, -1502002290);\n b = md5ff(b, c, d, a, x[i + 15], 22, 1236535329);\n a = md5gg(a, b, c, d, x[i + 1], 5, -165796510);\n d = md5gg(d, a, b, c, x[i + 6], 9, -1069501632);\n c = md5gg(c, d, a, b, x[i + 11], 14, 643717713);\n b = md5gg(b, c, d, a, x[i], 20, -373897302);\n a = md5gg(a, b, c, d, x[i + 5], 5, -701558691);\n d = md5gg(d, a, b, c, x[i + 10], 9, 38016083);\n c = md5gg(c, d, a, b, x[i + 15], 14, -660478335);\n b = md5gg(b, c, d, a, x[i + 4], 20, -405537848);\n a = md5gg(a, b, c, d, x[i + 9], 5, 568446438);\n d = md5gg(d, a, b, c, x[i + 14], 9, -1019803690);\n c = md5gg(c, d, a, b, x[i + 3], 14, -187363961);\n b = md5gg(b, c, d, a, x[i + 8], 20, 1163531501);\n a = md5gg(a, b, c, d, x[i + 13], 5, -1444681467);\n d = md5gg(d, a, b, c, x[i + 2], 9, -51403784);\n c = md5gg(c, d, a, b, x[i + 7], 14, 1735328473);\n b = md5gg(b, c, d, a, x[i + 12], 20, -1926607734);\n a = md5hh(a, b, c, d, x[i + 5], 4, -378558);\n d = md5hh(d, a, b, c, x[i + 8], 11, -2022574463);\n c = md5hh(c, d, a, b, x[i + 11], 16, 1839030562);\n b = md5hh(b, c, d, a, x[i + 14], 23, -35309556);\n a = md5hh(a, b, c, d, x[i + 1], 4, -1530992060);\n d = md5hh(d, a, b, c, x[i + 4], 11, 1272893353);\n c = md5hh(c, d, a, b, x[i + 7], 16, -155497632);\n b = md5hh(b, c, d, a, x[i + 10], 23, -1094730640);\n a = md5hh(a, b, c, d, x[i + 13], 4, 681279174);\n d = md5hh(d, a, b, c, x[i], 11, -358537222);\n c = md5hh(c, d, a, b, x[i + 3], 16, -722521979);\n b = md5hh(b, c, d, a, x[i + 6], 23, 76029189);\n a = md5hh(a, b, c, d, x[i + 9], 4, -640364487);\n d = md5hh(d, a, b, c, x[i + 12], 11, -421815835);\n c = md5hh(c, d, a, b, x[i + 15], 16, 530742520);\n b = md5hh(b, c, d, a, x[i + 2], 23, -995338651);\n a = md5ii(a, b, c, d, x[i], 6, -198630844);\n d = md5ii(d, a, b, c, x[i + 7], 10, 1126891415);\n c = md5ii(c, d, a, b, x[i + 14], 15, -1416354905);\n b = md5ii(b, c, d, a, x[i + 5], 21, -57434055);\n a = md5ii(a, b, c, d, x[i + 12], 6, 1700485571);\n d = md5ii(d, a, b, c, x[i + 3], 10, -1894986606);\n c = md5ii(c, d, a, b, x[i + 10], 15, -1051523);\n b = md5ii(b, c, d, a, x[i + 1], 21, -2054922799);\n a = md5ii(a, b, c, d, x[i + 8], 6, 1873313359);\n d = md5ii(d, a, b, c, x[i + 15], 10, -30611744);\n c = md5ii(c, d, a, b, x[i + 6], 15, -1560198380);\n b = md5ii(b, c, d, a, x[i + 13], 21, 1309151649);\n a = md5ii(a, b, c, d, x[i + 4], 6, -145523070);\n d = md5ii(d, a, b, c, x[i + 11], 10, -1120210379);\n c = md5ii(c, d, a, b, x[i + 2], 15, 718787259);\n b = md5ii(b, c, d, a, x[i + 9], 21, -343485551);\n a = safeAdd(a, olda);\n b = safeAdd(b, oldb);\n c = safeAdd(c, oldc);\n d = safeAdd(d, oldd);\n }\n\n return [a, b, c, d];\n}\n/*\n * Convert an array bytes to an array of little-endian words\n * Characters >255 have their high-byte silently ignored.\n */\n\n\nfunction bytesToWords(input) {\n if (input.length === 0) {\n return [];\n }\n\n var length8 = input.length * 8;\n var output = new Uint32Array(getOutputLength(length8));\n\n for (var i = 0; i < length8; i += 8) {\n output[i >> 5] |= (input[i / 8] & 0xff) << i % 32;\n }\n\n return output;\n}\n/*\n * Add integers, wrapping at 2^32. This uses 16-bit operations internally\n * to work around bugs in some JS interpreters.\n */\n\n\nfunction safeAdd(x, y) {\n var lsw = (x & 0xffff) + (y & 0xffff);\n var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n return msw << 16 | lsw & 0xffff;\n}\n/*\n * Bitwise rotate a 32-bit number to the left.\n */\n\n\nfunction bitRotateLeft(num, cnt) {\n return num << cnt | num >>> 32 - cnt;\n}\n/*\n * These functions implement the four basic operations the algorithm uses.\n */\n\n\nfunction md5cmn(q, a, b, x, s, t) {\n return safeAdd(bitRotateLeft(safeAdd(safeAdd(a, q), safeAdd(x, t)), s), b);\n}\n\nfunction md5ff(a, b, c, d, x, s, t) {\n return md5cmn(b & c | ~b & d, a, b, x, s, t);\n}\n\nfunction md5gg(a, b, c, d, x, s, t) {\n return md5cmn(b & d | c & ~d, a, b, x, s, t);\n}\n\nfunction md5hh(a, b, c, d, x, s, t) {\n return md5cmn(b ^ c ^ d, a, b, x, s, t);\n}\n\nfunction md5ii(a, b, c, d, x, s, t) {\n return md5cmn(c ^ (b | ~d), a, b, x, s, t);\n}\n\nexport default md5;","export default '00000000-0000-0000-0000-000000000000';","import validate from './validate.js';\n\nfunction parse(uuid) {\n if (!validate(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n var v;\n var arr = new Uint8Array(16); // Parse ########-....-....-....-............\n\n arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24;\n arr[1] = v >>> 16 & 0xff;\n arr[2] = v >>> 8 & 0xff;\n arr[3] = v & 0xff; // Parse ........-####-....-....-............\n\n arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8;\n arr[5] = v & 0xff; // Parse ........-....-####-....-............\n\n arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8;\n arr[7] = v & 0xff; // Parse ........-....-....-####-............\n\n arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8;\n arr[9] = v & 0xff; // Parse ........-....-....-....-############\n // (Use \"/\" to avoid 32-bit truncation when bit-shifting high-order bytes)\n\n arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff;\n arr[11] = v / 0x100000000 & 0xff;\n arr[12] = v >>> 24 & 0xff;\n arr[13] = v >>> 16 & 0xff;\n arr[14] = v >>> 8 & 0xff;\n arr[15] = v & 0xff;\n return arr;\n}\n\nexport default parse;","export default /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;","// Unique ID creation requires a high quality random # generator. In the browser we therefore\n// require the crypto API and do not support built-in fallback to lower quality random number\n// generators (like Math.random()).\nvar getRandomValues;\nvar rnds8 = new Uint8Array(16);\nexport default function rng() {\n // lazy load so that environments that need to polyfill have a chance to do so\n if (!getRandomValues) {\n // getRandomValues needs to be invoked in a context where \"this\" is a Crypto implementation. Also,\n // find the complete implementation of crypto (msCrypto) on IE11.\n getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto !== 'undefined' && typeof msCrypto.getRandomValues === 'function' && msCrypto.getRandomValues.bind(msCrypto);\n\n if (!getRandomValues) {\n throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');\n }\n }\n\n return getRandomValues(rnds8);\n}","// Adapted from Chris Veness' SHA1 code at\n// http://www.movable-type.co.uk/scripts/sha1.html\nfunction f(s, x, y, z) {\n switch (s) {\n case 0:\n return x & y ^ ~x & z;\n\n case 1:\n return x ^ y ^ z;\n\n case 2:\n return x & y ^ x & z ^ y & z;\n\n case 3:\n return x ^ y ^ z;\n }\n}\n\nfunction ROTL(x, n) {\n return x << n | x >>> 32 - n;\n}\n\nfunction sha1(bytes) {\n var K = [0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xca62c1d6];\n var H = [0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0];\n\n if (typeof bytes === 'string') {\n var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape\n\n bytes = [];\n\n for (var i = 0; i < msg.length; ++i) {\n bytes.push(msg.charCodeAt(i));\n }\n } else if (!Array.isArray(bytes)) {\n // Convert Array-like to Array\n bytes = Array.prototype.slice.call(bytes);\n }\n\n bytes.push(0x80);\n var l = bytes.length / 4 + 2;\n var N = Math.ceil(l / 16);\n var M = new Array(N);\n\n for (var _i = 0; _i < N; ++_i) {\n var arr = new Uint32Array(16);\n\n for (var j = 0; j < 16; ++j) {\n arr[j] = bytes[_i * 64 + j * 4] << 24 | bytes[_i * 64 + j * 4 + 1] << 16 | bytes[_i * 64 + j * 4 + 2] << 8 | bytes[_i * 64 + j * 4 + 3];\n }\n\n M[_i] = arr;\n }\n\n M[N - 1][14] = (bytes.length - 1) * 8 / Math.pow(2, 32);\n M[N - 1][14] = Math.floor(M[N - 1][14]);\n M[N - 1][15] = (bytes.length - 1) * 8 & 0xffffffff;\n\n for (var _i2 = 0; _i2 < N; ++_i2) {\n var W = new Uint32Array(80);\n\n for (var t = 0; t < 16; ++t) {\n W[t] = M[_i2][t];\n }\n\n for (var _t = 16; _t < 80; ++_t) {\n W[_t] = ROTL(W[_t - 3] ^ W[_t - 8] ^ W[_t - 14] ^ W[_t - 16], 1);\n }\n\n var a = H[0];\n var b = H[1];\n var c = H[2];\n var d = H[3];\n var e = H[4];\n\n for (var _t2 = 0; _t2 < 80; ++_t2) {\n var s = Math.floor(_t2 / 20);\n var T = ROTL(a, 5) + f(s, b, c, d) + e + K[s] + W[_t2] >>> 0;\n e = d;\n d = c;\n c = ROTL(b, 30) >>> 0;\n b = a;\n a = T;\n }\n\n H[0] = H[0] + a >>> 0;\n H[1] = H[1] + b >>> 0;\n H[2] = H[2] + c >>> 0;\n H[3] = H[3] + d >>> 0;\n H[4] = H[4] + e >>> 0;\n }\n\n return [H[0] >> 24 & 0xff, H[0] >> 16 & 0xff, H[0] >> 8 & 0xff, H[0] & 0xff, H[1] >> 24 & 0xff, H[1] >> 16 & 0xff, H[1] >> 8 & 0xff, H[1] & 0xff, H[2] >> 24 & 0xff, H[2] >> 16 & 0xff, H[2] >> 8 & 0xff, H[2] & 0xff, H[3] >> 24 & 0xff, H[3] >> 16 & 0xff, H[3] >> 8 & 0xff, H[3] & 0xff, H[4] >> 24 & 0xff, H[4] >> 16 & 0xff, H[4] >> 8 & 0xff, H[4] & 0xff];\n}\n\nexport default sha1;","import validate from './validate.js';\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\n\nvar byteToHex = [];\n\nfor (var i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).substr(1));\n}\n\nfunction stringify(arr) {\n var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n var uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!validate(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n\n return uuid;\n}\n\nexport default stringify;","import rng from './rng.js';\nimport stringify from './stringify.js'; // **`v1()` - Generate time-based UUID**\n//\n// Inspired by https://github.com/LiosK/UUID.js\n// and http://docs.python.org/library/uuid.html\n\nvar _nodeId;\n\nvar _clockseq; // Previous uuid creation time\n\n\nvar _lastMSecs = 0;\nvar _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details\n\nfunction v1(options, buf, offset) {\n var i = buf && offset || 0;\n var b = buf || new Array(16);\n options = options || {};\n var node = options.node || _nodeId;\n var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not\n // specified. We do this lazily to minimize issues related to insufficient\n // system entropy. See #189\n\n if (node == null || clockseq == null) {\n var seedBytes = options.random || (options.rng || rng)();\n\n if (node == null) {\n // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)\n node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]];\n }\n\n if (clockseq == null) {\n // Per 4.2.2, randomize (14 bit) clockseq\n clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;\n }\n } // UUID timestamps are 100 nano-second units since the Gregorian epoch,\n // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so\n // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'\n // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.\n\n\n var msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock\n // cycle to simulate higher resolution clock\n\n var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs)\n\n var dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression\n\n if (dt < 0 && options.clockseq === undefined) {\n clockseq = clockseq + 1 & 0x3fff;\n } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new\n // time interval\n\n\n if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {\n nsecs = 0;\n } // Per 4.2.1.2 Throw error if too many uuids are requested\n\n\n if (nsecs >= 10000) {\n throw new Error(\"uuid.v1(): Can't create more than 10M uuids/sec\");\n }\n\n _lastMSecs = msecs;\n _lastNSecs = nsecs;\n _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch\n\n msecs += 12219292800000; // `time_low`\n\n var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;\n b[i++] = tl >>> 24 & 0xff;\n b[i++] = tl >>> 16 & 0xff;\n b[i++] = tl >>> 8 & 0xff;\n b[i++] = tl & 0xff; // `time_mid`\n\n var tmh = msecs / 0x100000000 * 10000 & 0xfffffff;\n b[i++] = tmh >>> 8 & 0xff;\n b[i++] = tmh & 0xff; // `time_high_and_version`\n\n b[i++] = tmh >>> 24 & 0xf | 0x10; // include version\n\n b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)\n\n b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low`\n\n b[i++] = clockseq & 0xff; // `node`\n\n for (var n = 0; n < 6; ++n) {\n b[i + n] = node[n];\n }\n\n return buf || stringify(b);\n}\n\nexport default v1;","import v35 from './v35.js';\nimport md5 from './md5.js';\nvar v3 = v35('v3', 0x30, md5);\nexport default v3;","import stringify from './stringify.js';\nimport parse from './parse.js';\n\nfunction stringToBytes(str) {\n str = unescape(encodeURIComponent(str)); // UTF8 escape\n\n var bytes = [];\n\n for (var i = 0; i < str.length; ++i) {\n bytes.push(str.charCodeAt(i));\n }\n\n return bytes;\n}\n\nexport var DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8';\nexport var URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8';\nexport default function (name, version, hashfunc) {\n function generateUUID(value, namespace, buf, offset) {\n if (typeof value === 'string') {\n value = stringToBytes(value);\n }\n\n if (typeof namespace === 'string') {\n namespace = parse(namespace);\n }\n\n if (namespace.length !== 16) {\n throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)');\n } // Compute hash of namespace and value, Per 4.3\n // Future: Use spread syntax when supported on all platforms, e.g. `bytes =\n // hashfunc([...namespace, ... value])`\n\n\n var bytes = new Uint8Array(16 + value.length);\n bytes.set(namespace);\n bytes.set(value, namespace.length);\n bytes = hashfunc(bytes);\n bytes[6] = bytes[6] & 0x0f | version;\n bytes[8] = bytes[8] & 0x3f | 0x80;\n\n if (buf) {\n offset = offset || 0;\n\n for (var i = 0; i < 16; ++i) {\n buf[offset + i] = bytes[i];\n }\n\n return buf;\n }\n\n return stringify(bytes);\n } // Function#name is not settable on some platforms (#270)\n\n\n try {\n generateUUID.name = name; // eslint-disable-next-line no-empty\n } catch (err) {} // For CommonJS default export support\n\n\n generateUUID.DNS = DNS;\n generateUUID.URL = URL;\n return generateUUID;\n}","import rng from './rng.js';\nimport stringify from './stringify.js';\n\nfunction v4(options, buf, offset) {\n options = options || {};\n var rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n offset = offset || 0;\n\n for (var i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n\n return buf;\n }\n\n return stringify(rnds);\n}\n\nexport default v4;","import v35 from './v35.js';\nimport sha1 from './sha1.js';\nvar v5 = v35('v5', 0x50, sha1);\nexport default v5;","import REGEX from './regex.js';\n\nfunction validate(uuid) {\n return typeof uuid === 'string' && REGEX.test(uuid);\n}\n\nexport default validate;","import validate from './validate.js';\n\nfunction version(uuid) {\n if (!validate(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n return parseInt(uuid.substr(14, 1), 16);\n}\n\nexport default version;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = (module) => {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","import type { Context } from \"@finos/fdc3\";\nimport { init } from \"./api\";\n\nwindow.addEventListener(\"DOMContentLoaded\", async () => {\n\tawait init(true);\n\tawait initializeDOM();\n});\n\n/**\n * Broadcasts a context using FDC3.\n */\nasync function setContext(): Promise {\n\tconst contextType = \"fdc3.instrument\";\n\tconst contextName = \"Tesla Inc.\";\n\tconst idData = {\n\t\tticker: \"TSLA\"\n\t};\n\tconst context = {\n\t\ttype: contextType,\n\t\tname: contextName,\n\t\tid: idData\n\t};\n\tif (window.fin) {\n\t\tawait window.fin.me.interop.setContext(context);\n\t\tconsole.log(`Set context: ${contextType} - ${contextName}`);\n\t} else {\n\t\twindow.addEventListener(\"finReady\", async () => {\n\t\t\tif (window.fin) {\n\t\t\t\tawait window.fin.me.interop.setContext(context);\n\t\t\t\tconsole.log(`Set context: ${contextType} - ${contextName}`);\n\t\t\t}\n\t\t});\n\t}\n}\n\n/**\n * Adds an interop context listener to the window.\n */\nasync function addContextListener(): Promise {\n\tif (window.fin) {\n\t\tawait window.fin.me.interop.addContextHandler((context: Context) => {\n\t\t\tupdateDOMElements(context);\n\t\t});\n\t} else {\n\t\twindow.addEventListener(\"finReady\", async () => {\n\t\t\tif (window.fin) {\n\t\t\t\tawait window.fin.me.interop.addContextHandler((context: Context) => {\n\t\t\t\t\tupdateDOMElements(context);\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t}\n}\n\n/**\n * Updates the DOM elements with the provided context.\n * @param context The context to update the DOM elements with.\n */\nfunction updateDOMElements(context: Context): void {\n\tconst contextTypeSpan = document.querySelector(\"#contextType\");\n\tconst contextNameSpan = document.querySelector(\"#contextName\");\n\tconst contextBodyPre = document.querySelector(\"#contextBody\");\n\n\tif (contextTypeSpan !== null && contextNameSpan !== null && contextBodyPre !== null) {\n\t\tcontextTypeSpan.textContent = context.type;\n\t\tcontextNameSpan.textContent = context.name ?? \"No name provided.\";\n\t\tcontextBodyPre.textContent = JSON.stringify(context, null, 2);\n\t}\n}\n\n/**\n * Initialize the DOM elements.\n */\nasync function initializeDOM(): Promise {\n\tconst setContextButton = document.querySelector(\"#setContext\");\n\n\tif (setContextButton !== null) {\n\t\tsetContextButton.addEventListener(\"click\", async () => {\n\t\t\tawait setContext();\n\t\t});\n\t}\n\n\tawait addContextListener();\n}\n"],"names":[],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"interop-view.bundle.js","mappings":";;;;;;;;;;AAAa,MAAM,mBAAO,CAAC,qFAAoB,EAAE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AEA;AACA;;;;;;;;;;;;ACrJA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEY;;AAEZ,eAAe,mBAAO,CAAC,wDAAW;AAClC,gBAAgB,mBAAO,CAAC,oDAAS;AACjC;AACA;AACA;AACA;;AAEA,cAAc;AACd,kBAAkB;AAClB,yBAAyB;;AAEzB;AACA,kBAAkB;;AAElB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,kBAAkB,YAAY;AAC9B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA,wCAAwC,SAAS;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;;AAEA;AACA;AACA,cAAc,iBAAiB;AAC/B;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,iDAAiD,EAAE;AACnD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C;AAC1C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA,yBAAyB,eAAe;AACxC;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,yBAAyB,QAAQ;AACjC;AACA,sBAAsB,eAAe;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc,YAAY;AAC1B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB,sBAAsB;AACxC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,mBAAmB;AACnB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA,oBAAoB,SAAS;AAC7B;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA,qBAAqB,WAAW,GAAG,IAAI;AACvC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA,gBAAgB,WAAW,GAAG,IAAI,KAAK,aAAa;AACpD;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;;AAEA;AACA,GAAG;AACH;AACA;AACA,mBAAmB,KAAK,mDAAmD,cAAc;AACzF,GAAG;AACH;AACA;AACA,+BAA+B,IAAI;AACnC;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,MAAM,aAAa,SAAS;AACtD;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,SAAS,gBAAgB;AACzB,cAAc,oBAAoB,EAAE,IAAI;AACxC;AACA,YAAY,gBAAgB,EAAE,IAAI;AAClC;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,GAAG,SAAS,GAAG,KAAK,qBAAqB,EAAE,EAAE;AACpE,QAAQ;AACR,yBAAyB,GAAG,KAAK,yBAAyB,EAAE,EAAE;AAC9D,mBAAmB,yBAAyB,EAAE,EAAE;AAChD;AACA,MAAM;AACN,oBAAoB,IAAI,EAAE,GAAG,SAAS,IAAI,EAAE,EAAE;AAC9C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,0CAA0C,cAAc,SAAS,OAAO;AACxE;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,kBAAkB,YAAY;AAC9B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,kBAAkB,gBAAgB;AAClC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,kBAAkB,gBAAgB;AAClC;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,cAAc,YAAY;AAC1B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,QAAQ;AAC1B;AACA,oBAAoB,QAAQ;AAC5B;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;;;;;ACzjEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEa;;AAEb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB;;AAEnB;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,sBAAsB;AACxC;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA,eAAe;AACf;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA,oBAAoB,SAAS;AAC7B;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;;AAEA,kCAAkC,QAAQ;AAC1C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oBAAoB,iBAAiB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,QAAQ;AACR;AACA,uCAAuC,QAAQ;AAC/C;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,OAAO;AACzB;AACA;AACA;;AAEA;AACA,SAAS,yBAAyB;AAClC;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,gBAAgB;AAClC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,8DAA8D,YAAY;AAC1E;AACA,8DAA8D,YAAY;AAC1E;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,qCAAqC,YAAY;AACjD;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;AACA;;;;;;;;;;;AChfA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,SAAS,WAAW;;AAEpB;AACA;AACA;AACA,SAAS,WAAW;;AAEpB;AACA;AACA,IAAI;AACJ;AACA,IAAI;AAC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S;;AAE5B;AACA;;AAEA;;;;;;;;;;;ACNA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,UAAU;AACrB,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACrBA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,UAAU;AACrB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACxBA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,kBAAkB,mBAAO,CAAC,+DAAe;AACzC,cAAc,mBAAO,CAAC,uDAAW;AACjC,eAAe,mBAAO,CAAC,yDAAY;AACnC,cAAc,mBAAO,CAAC,yDAAY;AAClC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,SAAS;AACpB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AChDA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACnBA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,UAAU;AACrB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACtBA,sBAAsB,mBAAO,CAAC,yEAAoB;AAClD,SAAS,mBAAO,CAAC,6CAAM;;AAEvB;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;A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BAAiB,mBAAO,CAAC,+DAAe;AACxC,mBAAmB,mBAAO,CAAC,mEAAiB;AAC5C,aAAa,mBAAO,CAAC,uDAAW;AAChC,qBAAqB,mBAAO,CAAC,uEAAmB;AAChD,qBAAqB,mBAAO,CAAC,uEAAmB;AAChD,sBAAsB,mBAAO,CAAC,yEAAoB;AAClD,cAAc,mBAAO,CAAC,uDAAW;AACjC,eAAe,mBAAO,CAAC,yDAAY;AACnC,YAAY,mBAAO,CAAC,mDAAS;AAC7B,eAAe,mBAAO,CAAC,yDAAY;AACnC,YAAY,mBAAO,CAAC,mDAAS;AAC7B,WAAW,mBAAO,CAAC,iDAAQ;AAC3B,aAAa,mBAAO,CAAC,qDAAU;;AAE/B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,SAAS;AACpB;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa,GAAG;AAChB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;AACA,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;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BAAO,CAAC,uDAAW;AAChC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,eAAe,mBAAO,CAAC,yDAAY;AACnC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC3DA,kBAAkB,mBAAO,CAAC,iEAAgB;AAC1C,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC7BA,eAAe,mBAAO,CAAC,yDAAY;AACnC,kBAAkB,mBAAO,CAAC,iEAAgB;AAC1C,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AChCA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;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O;AAClB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACnFA,aAAa,mBAAO,CAAC,uDAAW;AAChC,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,SAAS,mBAAO,CAAC,6CAAM;AACvB,kBAAkB,mBAAO,CAAC,iEAAgB;AAC1C,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC/GA,iB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CAAC,+DAAe;AACxC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACzDA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa,GAAG;AAChB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACZA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACdA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AChBA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,GAAG;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC7BA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACtBA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAE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A;;AAEA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ,CAAC;;AAED;;;;;;;;;;;AC7BA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACrBA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,aAAa,UAAU;AACvB;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACdA,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;ACRA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACbA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;;;;;;;;;;ACjBA,gBAAgB,mBAAO,CAAC,6DAAc;;AAEtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACdA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,GAAG;AAChB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACbA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACbA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,UAAU,mBAAO,CAAC,iDAAQ;AAC1B,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjCA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;;;;;;;;;;;ACzBA,gBAAgB,mBAAO,CAAC,6DAAc;;AAEtC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,GAAG;AAChB;AACA;AACA;AACA,oBAAoB,QAAQ,IAAI,QAAQ;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,kBAAkB;AAClB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpCA,sBAAsB,mBAAO,CAAC,yEAAoB;AAClD,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA,8BAA8B,mBAAmB;AACjD;AACA;AACA;AACA;AACA;AACA,+CAA+C,mBAAmB;AAClE;AACA;AACA;;AAEA;;;;;;;;;;;ACnCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACzBA,iBAAiB,mBAAO,CAAC,6DAAc;AACvC,eAAe,mBAAO,CAAC,yDAAY;;AAEnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AChCA,WAAW,mBAAO,CAAC,mDAAS;AAC5B,gBAAgB,mBAAO,CAAC,2DAAa;;AAErC;AACA,kBAAkB,KAA0B;;AAE5C;AACA,gCAAgC,QAAa;;AAE7C;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACrCA,kBAAkB,mBAAO,CAAC,iEAAgB;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,kBAAkB;AAClB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClCA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,eAAe,mBAAO,CAAC,yDAAY;;AAEnC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpCA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClCA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC1BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC9BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC5BA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC1BA,uBAAuB,mBAAO,CAAC,2EAAqB;AACpD,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC1BA,oBAAoB,mBAAO,CAAC,qEAAkB;AAC9C,eAAe,mBAAO,CAAC,2DAAa;AACpC,kBAAkB,mBAAO,CAAC,+DAAe;;AAEzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpCA,oBAAoB,mBAAO,CAAC,qEAAkB;AAC9C,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,kBAAkB,mBAAO,CAAC,+DAAe;;AAEzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC/BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;;;ACVA,oBA2CC;AAlDD,0HAAwE;AACxE,0HAA4D;AAE5D;;;GAGG;AACI,KAAK,UAAU,IAAI,CAAC,UAAmB,IAAI;IACjD,sCAAsC;IACtC,IAAI,OAA0C,CAAC;IAC/C,IAAI,MAAM,CAAC,GAAG,KAAK,SAAS,EAAE,CAAC;QAC9B,IAAI,CAAC,OAAO,EAAE,CAAC;YACd,MAAM,QAAQ,GAAG,MAAM,0BAA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AU,GAAG,kBAAkB,EAAE,CAAC;IACxC,MAAM,QAAQ,GAAG,YAAY,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;IAClD,IAAI,QAAQ,KAAK,IAAI,EAAE,CAAC;QACvB,OAAO,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;IAC7B,CAAC;AACF,CAAC;AAED;;;GAGG;AACH,SAAS,kBAAkB;IAC1B,MAAM,SAAS,GAAG,IAAI,eAAe,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;IAC9D,MAAM,GAAG,GAAG,SAAS,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IAEjC,MAAM,WAAW,GAAG,GAAG,CAAC,CAAC,CAAC,GAAG,GAAG,WAAW,CAAC,CAAC,CAAC,UAAU,CAAC;IACzD,OAAO,WAAW,CAAC;AACpB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACjHuC;AACA;AACA;AACA;AACE;AACQ;AACE;AACE;;;;;;;;;;;;;;;;ACPtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD;;AAEnD;;AAEA,oBAAoB,gBAAgB;AACpC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA,kBAAkB,cAAc;AAChC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,kBAAkB,cAAc;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,kBAAkB,aAAa;AAC/B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,iEAAe,GAAG;;;;;;;;;;;;;;;ACtNlB,iEAAe,sCAAsC;;;;;;;;;;;;;;;;ACAhB;;AAErC;AACA,OAAO,wDAAQ;AACf;AACA;;AAEA;AACA,gCAAgC;;AAEhC;AACA;AACA;AACA,qBAAqB;;AAErB;AACA,qBAAqB;;AAErB;AACA,qBAAqB;;AAErB;AACA,qBAAqB;AACrB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,iEAAe,KAAK;;;;;;;;;;;;;;;AClCpB,iEAAe,cAAc,EAAE,UAAU,EAAE,eAAe,EAAE,gBAAgB,EAAE,UAAU,GAAG,yCAAyC;;;;;;;;;;;;;;;ACApI;AACA;AACA;AACA;AACA;AACe;AACf;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;AClBA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,mDAAmD;;AAEnD;;AAEA,oBAAoB,gBAAgB;AACpC;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,mBAAmB,QAAQ;AAC3B;;AAEA,oBAAoB,QA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,CAAC,CAAC;IACJ,CAAC;IAED,MAAM,kBAAkB,EAAE,CAAC;AAC5B,CAAC","sources":["webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/@openfin/core-web/out/api-client.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/@openfin/core-web/out/main-8cad4070.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/@openfin/core-web/out/main-b14f67c9.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/base64-js/index.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/buffer/index.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/events/events.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/ieee754/index.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_DataView.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_Hash.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_ListCache.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_Map.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_MapCache.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_Promise.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_Set.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_SetCache.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_Stack.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_Symbol.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_Uint8Array.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_WeakMap.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_arrayEach.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_arrayFilter.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_arrayLikeKeys.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_arrayPush.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_arraySome.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_assignValue.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_assocIndexOf.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseAssign.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseAssignIn.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseAssignValue.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseClone.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseCreate.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseGetAllKeys.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseGetTag.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseIsArguments.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseIsEqual.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseIsEqualDeep.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseIsMap.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseIsNative.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseIsSet.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseIsTypedArray.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseKeys.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseKeysIn.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseTimes.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseUnary.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_cacheHas.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_cloneArrayBuffer.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_cloneBuffer.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_cloneDataView.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_cloneRegExp.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_cloneSymbol.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_cloneTypedArray.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_copyArray.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_copyObject.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_copySymbols.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_copySymbolsIn.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_coreJsData.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_defineProperty.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_equalArrays.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_equalByTag.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_equalObjects.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_freeGlobal.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_getAllKeys.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_getAllKeysIn.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_getMapData.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_getNative.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_getPrototype.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_getRawTag.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_getSymbols.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_getSymbolsIn.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_getTag.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_getValue.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_hashClear.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_hashDelete.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_hashGet.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_hashHas.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_hashSet.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_initCloneArray.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_initCloneByTag.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_initCloneObject.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_isIndex.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_isKeyable.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_isMasked.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_isPrototype.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_listCacheClear.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_listCacheDelete.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_listCacheGet.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_listCacheHas.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_listCacheSet.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_mapCacheClear.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_mapCacheDelete.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_mapCacheGet.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_mapCacheHas.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_mapCacheSet.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_mapToArray.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_nativeCreate.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_nativeKeys.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_nativeKeysIn.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_nodeUtil.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_objectToString.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_overArg.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_root.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_setCacheAdd.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_setCacheHas.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_setToArray.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_stackClear.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_stackDelete.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_stackGet.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_stackHas.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_stackSet.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_toSource.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/cloneDeep.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/eq.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/isArguments.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/isArray.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/isArrayLike.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/isBuffer.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/isEqual.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/isFunction.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/isLength.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/isMap.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/isObject.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/isObjectLike.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/isSet.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/isTypedArray.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/keys.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/keysIn.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/stubArray.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/stubFalse.js","webpack://openfin-web--web-interop-support-context-and-intents/./client/src/content/api.ts","webpack://openfin-web--web-interop-support-context-and-intents/./client/src/platform/settings/settings.ts","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/index.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/md5.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/nil.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/parse.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/regex.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/rng.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/sha1.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/stringify.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/v1.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/v3.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/v35.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/v4.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/v5.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/validate.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/version.js","webpack://openfin-web--web-interop-support-context-and-intents/webpack/bootstrap","webpack://openfin-web--web-interop-support-context-and-intents/webpack/runtime/define property getters","webpack://openfin-web--web-interop-support-context-and-intents/webpack/runtime/global","webpack://openfin-web--web-interop-support-context-and-intents/webpack/runtime/hasOwnProperty shorthand","webpack://openfin-web--web-interop-support-context-and-intents/webpack/runtime/make namespace object","webpack://openfin-web--web-interop-support-context-and-intents/webpack/runtime/node module decorator","webpack://openfin-web--web-interop-support-context-and-intents/./client/src/content/interop-view.ts"],"sourcesContent":["\"use strict\";var e=require(\"./main-8cad4070.js\");require(\"buffer/\"),require(\"uuid\"),require(\"events\"),require(\"lodash/cloneDeep\"),require(\"lodash/isEqual\"),exports.connect=e.connect;\n","\"use strict\";var e=require(\"buffer/\"),t=require(\"events\"),n=require(\"lodash/cloneDeep\"),i=require(\"lodash/isEqual\"),r=require(\"uuid\");const o=(e,t)=>`${t}<${btoa(JSON.stringify(e))}>`;var s=\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof window?window:\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:{},a={},c={},d={},h={};async function l(e){const t=[];for(const n of e){const e=await n();t.push(e)}return t}Object.defineProperty(h,\"__esModule\",{value:!0}),h.promiseMapSerial=h.serial=h.promiseMap=h.promisify=void 0,h.promisify=function(e){return(...t)=>new Promise(((n,i)=>{e(...t,((e,t)=>e?i(e):n(t)))}))},h.promiseMap=async function(e,t){return Promise.all(e.map(t))},h.serial=l,h.promiseMapSerial=async function(e,t){return l(e.map(((e,n,i)=>()=>t(e,n,i))))};var u,p=s&&s.__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},w=s&&s.__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)};Object.defineProperty(d,\"__esModule\",{value:!0}),d.Reply=d.EmitterBase=d.Base=void 0;const y=h;class f{constructor(e){this.isNodeEnvironment=()=>\"node\"===this.wire.environment.type,this.isOpenFinEnvironment=()=>\"openfin\"===this.wire.environment.type,this.isBrowserEnvironment=()=>\"other\"===this.wire.environment.type,this.wire=e}get fin(){return this.wire.getFin()}get me(){return this.wire.me}}d.Base=f;d.EmitterBase=class extends f{constructor(e,t,...n){super(e),this.topic=t,u.set(this,void 0),this.eventNames=()=>this.hasEmitter()?this.getOrCreateEmitter().eventNames():[],this.emit=(e,t,...n)=>!!this.hasEmitter()&&this.getOrCreateEmitter().emit(e,t,...n),this.hasEmitter=()=>this.wire.eventAggregator.has(w(this,u,\"f\")),this.getOrCreateEmitter=()=>this.wire.eventAggregator.getOrCreate(w(this,u,\"f\")),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[],this.listenerCount=e=>this.hasEmitter()?this.getOrCreateEmitter().listenerCount(e):0,this.registerEventListener=async(e,t={},n,i)=>{const r={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e},o=this.getOrCreateEmitter();n(o);try{await this.wire.sendAction(\"subscribe-to-desktop-event\",r)}catch(e){throw i(o),this.deleteEmitterIfNothingRegistered(o),e}},this.deregisterEventListener=async(e,t={})=>{if(this.hasEmitter()){const n={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e};await this.wire.sendAction(\"unsubscribe-to-desktop-event\",n).catch((()=>null));return this.getOrCreateEmitter()}return Promise.resolve()},p(this,u,[t,...n],\"f\"),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[]}async on(e,t,n){return await this.registerEventListener(e,n,(n=>{n.on(e,t)}),(n=>{n.removeListener(e,t)})),this}async addListener(e,t,n){return this.on(e,t,n)}async once(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.once(e,i),n.once(e,t)}),(n=>{n.removeListener(e,i),n.removeListener(e,t)})),this}async prependListener(e,t,n){return await this.registerEventListener(e,n,(n=>{n.prependListener(e,t)}),(n=>{n.removeListener(e,t)})),this}async prependOnceListener(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.prependOnceListener(e,t),n.once(e,i)}),(n=>{n.removeListener(e,t),n.removeListener(e,i)})),this}async removeListener(e,t,n){const i=await this.deregisterEventListener(e,n);return i&&(i.removeListener(e,t),this.deleteEmitterIfNothingRegistered(i)),this}async deregisterAllListeners(e){const t={...this.identity,type:e,topic:this.topic};if(this.hasEmitter()){const e=this.getOrCreateEmitter(),n=e.listenerCount(t.type),i=[];for(let e=0;enull)));return await Promise.all(i),e}}async removeAllListeners(e){const t=async e=>{const t=await this.deregisterAllListeners(e);t&&(t.removeAllListeners(e),this.deleteEmitterIfNothingRegistered(t))};if(e)await t(e);else if(this.hasEmitter()){const e=this.getOrCreateEmitter().eventNames();await(0,y.promiseMap)(e,t)}return this}deleteEmitterIfNothingRegistered(e){0===e.eventNames().length&&this.wire.eventAggregator.delete(w(this,u,\"f\"))}},u=new WeakMap;d.Reply=class{};var g={};Object.defineProperty(g,\"__esModule\",{value:!0});var m=g.RuntimeError=g.NotSupportedError=g.NotImplementedError=g.NoAckError=g.DuplicateCorrelationError=g.UnexpectedActionError=g.DisconnectedError=void 0;class v extends Error{constructor(e){super(`Expected websocket state OPEN but found ${e}`),this.readyState=e}}g.DisconnectedError=v;class C extends Error{}g.UnexpectedActionError=C;class b extends Error{}g.DuplicateCorrelationError=b;class I extends Error{}g.NoAckError=I;class E extends Error{}g.NotImplementedError=E;class x extends Error{}g.NotSupportedError=x;class A extends Error{constructor(e){const{message:t,name:n,stack:i,...r}=e;super(t),this.name=n||\"Error\",this.stack=i??this.toString(),Object.keys(r).forEach((e=>{this[e]=r[e]}))}}class P extends Error{static getCallSite(e=0){const t=Error.stackTraceLimit,n=e+1;Error.stackTraceLimit=t+n;const i=Error.prepareStackTrace;Error.prepareStackTrace=(e,t)=>t;const r=(new Error).stack?.slice(n)??[];return Error.prepareStackTrace=i,Error.stackTraceLimit=t,r}static prepareStackTrace(e,t){if(\"function\"==typeof Error.prepareStackTrace)return Error.prepareStackTrace(e,t);let n=\"\";n+=e.name||\"Error\",n+=`: ${e.message||\"\"}`;for(const e of t)n+=`\\n at ${e.toString()}`;return n}constructor(e,t){const{reason:n,error:i}=e;super(n),this.name=\"RuntimeError\",i?.stack&&(this.cause=new A(i)),t&&(this.stack=P.prepareStackTrace(this,t))}}m=g.RuntimeError=P;var M={},_={},O={};Object.defineProperty(O,\"__esModule\",{value:!0}),O.validateIdentity=void 0,O.validateIdentity=function(e){let t;return\"object\"==typeof e&&\"string\"==typeof e.uuid||(t=\"Not a valid identity object\"),t};var S={},R={},F={},j={},k={},L={},T={};Object.defineProperty(T,\"__esModule\",{value:!0}),T.handleDeprecatedWarnings=void 0;var $;T.handleDeprecatedWarnings=e=>{(e.contentNavigation?.whitelist||e.contentNavigation?.blacklist||e.contentRedirect?.whitelist||e.contentRedirect?.blacklist)&&console.warn(\"The properties 'whitelist' and 'blacklist' have been marked as deprecated and will be removed in a future version. Please use 'allowlist' and 'denylist'.\")};var B={},G={};Object.defineProperty(G,\"__esModule\",{value:!0}),G.AsyncRetryableLazy=W=G.Lazy=void 0;var W=G.Lazy=class{constructor(e){this.producerFn=e}getValue(){return this.value||(this.value=this.producerFn()),this.value}};G.AsyncRetryableLazy=class{constructor(e){this.producerFn=e}async getValue(){return this.promise||(this.promise=this.producerFn().catch((e=>{throw delete this.promise,e}))),this.promise}};var H={};Object.defineProperty(H,\"__esModule\",{value:!0}),H.WebContents=void 0;const N=d;class D extends N.EmitterBase{constructor(e,t,n){super(e,n,t.uuid,t.name),this.identity=t,this.entityType=n}capturePage(e){return this.wire.sendAction(\"capture-page\",{options:e,...this.identity}).then((({payload:e})=>e.data))}executeJavaScript(e){return this.wire.sendAction(\"execute-javascript-in-window\",{...this.identity,code:e}).then((({payload:e})=>e.data))}getZoomLevel(){return this.wire.sendAction(\"get-zoom-level\",this.identity).then((({payload:e})=>e.data))}setZoomLevel(e){return this.wire.sendAction(\"set-zoom-level\",{...this.identity,level:e}).then((()=>{}))}navigate(e){return this.wire.sendAction(\"navigate-window\",{...this.identity,url:e}).then((()=>{}))}navigateBack(){return this.wire.sendAction(\"navigate-window-back\",{...this.identity}).then((()=>{}))}async navigateForward(){await this.wire.sendAction(\"navigate-window-forward\",{...this.identity})}stopNavigation(){return this.wire.sendAction(\"stop-window-navigation\",{...this.identity}).then((()=>{}))}reload(e=!1){return this.wire.sendAction(\"reload-window\",{ignoreCache:e,...this.identity}).then((()=>{}))}print(e={}){return this.wire.sendAction(\"print\",{...this.identity,options:e}).then((()=>{}))}findInPage(e,t){return this.wire.sendAction(\"find-in-page\",{...this.identity,searchTerm:e,options:t}).then((({payload:e})=>e.data))}stopFindInPage(e){return this.wire.sendAction(\"stop-find-in-page\",{...this.identity,action:e}).then((()=>{}))}getPrinters(){return this.wire.sendAction(\"get-printers\",{...this.identity}).then((({payload:e})=>e.data))}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){await this.wire.sendAction(\"focus-window\",{emitSynthFocused:e,...this.identity})}async showDeveloperTools(){await this.wire.sendAction(\"show-developer-tools\",this.identity)}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction(\"get-process-info\",this.identity);return e}async getSharedWorkers(){return this.wire.sendAction(\"get-shared-workers\",this.identity).then((({payload:e})=>e.data))}async inspectSharedWorker(){await this.wire.sendAction(\"inspect-shared-worker\",{...this.identity})}async inspectSharedWorkerById(e){await this.wire.sendAction(\"inspect-shared-worker-by-id\",{...this.identity,workerId:e})}async inspectServiceWorker(){await this.wire.sendAction(\"inspect-service-worker\",{...this.identity})}async showPopupWindow(e){if(this.wire.sendAction(`${this.entityType}-show-popup-window`,this.identity).catch((()=>{})),e?.onPopupReady){const t=async({popupName:t})=>{try{const n=this.fin.Window.wrapSync({uuid:this.fin.me.uuid,name:t});await e.onPopupReady(n)}catch(e){throw new Error(`Something went wrong during onPopupReady execution: ${e}`)}};await this.once(\"popup-ready\",t)}const{payload:t}=await this.wire.sendAction(\"try-create-popup-window\",{options:{...e,hasResultCallback:!!e?.onPopupResult,hasReadyCallback:!!e?.onPopupReady},...this.identity}),{data:{willOpen:n,options:i}}=t;n&&await this.fin.Window.create(i.initialOptions);if(e?.onPopupResult){const t=async t=>{await e.onPopupResult((e=>{const{name:t,uuid:n,result:i,data:r}=e,o={identity:{name:t,uuid:n},result:i};return r&&(o.data=r),o})(t))},n=async()=>{await this.removeListener(\"popup-result\",t)};await this.on(\"popup-result\",t),await this.once(\"popup-teardown\",n)}const{payload:r}=await this.wire.sendAction(\"show-popup-window\",{options:i,...this.identity});return r.data}}var U,V,z,K,q;function J(){return V||(V=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(function(){if($)return L;$=1,Object.defineProperty(L,\"__esModule\",{value:!0}),L.ViewModule=void 0;const e=d,t=O,n=J(),i=T;class r extends e.Base{async create(e){const{uuid:t}=this.wire.me;if(!e.name||\"string\"!=typeof e.name)throw new Error(\"Please provide a name property as a string in order to create a View.\");return(0,i.handleDeprecatedWarnings)(e),this.wire.environment.childViews?await this.wire.environment.createChildContent({entityType:\"view\",options:{...e,uuid:t}}):await this.wire.sendAction(\"create-view\",{...e,uuid:t}),this.wrapSync({uuid:t,name:e.name})}async wrap(e){this.wire.sendAction(\"view-wrap\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}wrapSync(e){this.wire.sendAction(\"view-wrap-sync\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}getCurrent(){if(this.wire.sendAction(\"view-get-current\").catch((e=>{})),!this.wire.me.isView)throw new Error(\"You are not in a View context\");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction(\"view-get-current-sync\").catch((e=>{})),!this.wire.me.isView)throw new Error(\"You are not in a View context\");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return L.ViewModule=r,L}(),e),n(function(){if(U)return B;var e;U=1,Object.defineProperty(B,\"__esModule\",{value:!0}),B.View=void 0;const t=g,n=G,i=H,r=ie();class o extends i.WebContents{constructor(i,o){super(i,o,\"view\"),this.identity=o,e.set(this,new n.Lazy((()=>this.fin.Platform.wrapSync(this.identity).getClient()))),this.attach=async e=>{await this.wire.sendAction(\"attach-view\",{target:e,...this.identity})},this.destroy=async()=>{await this.wire.sendAction(\"destroy-view\",{...this.identity})},this.show=async()=>{await this.wire.sendAction(\"show-view\",{...this.identity})},this.showAt=async(e,t={})=>{await this.wire.sendAction(\"show-view-at\",{bounds:e,...this.identity,options:t})},this.bringToFront=async()=>{await this.wire.sendAction(\"bring-view-to-front\",{...this.identity})},this.hide=async()=>{await this.wire.sendAction(\"hide-view\",{...this.identity})},this.setBounds=async e=>{await this.wire.sendAction(\"set-view-bounds\",{bounds:e,...this.identity})},this.getBounds=async()=>(await this.wire.sendAction(\"get-view-bounds\",{...this.identity})).payload.data,this.getInfo=async()=>(await this.wire.sendAction(\"get-view-info\",{...this.identity})).payload.data,this.getParentLayout=async()=>(this.wire.sendAction(\"view-get-parent-layout\",{...this.identity}).catch((()=>{})),this.fin.Platform.Layout.getLayoutByViewIdentity(this.identity)),this.getOptions=async()=>this.wire.sendAction(\"get-view-options\",{...this.identity}).then((({payload:e})=>e.data)),this.updateOptions=async e=>this.wire.sendAction(\"update-view-options\",{options:e,...this.identity}).then((()=>{})),this.getCurrentWindow=async()=>{const{payload:{data:e}}=await this.wire.sendAction(\"get-view-window\",{...this.identity});return new r._Window(this.wire,e)},this.getCurrentStack=async()=>{this.wire.sendAction(\"view-get-current-stack\").catch((()=>{}));try{return(await this.getParentLayout()).getStackByViewIdentity(this.identity)}catch(e){throw new t.RuntimeError({reason:\"This view does not belong to a stack.\",error:e})}},this.triggerBeforeUnload=async()=>(await this.wire.sendAction(\"trigger-before-unload\",{...this.identity})).payload.data,this.bindToElement=async e=>{if(!e)throw new Error(\"Element not found.\");return this.wire.environment.observeBounds(e,(async e=>this.setBounds(e)))}}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){const t=await this.getCurrentWindow();await t.focusedWebViewWasChanged(),await super.focus({emitSynthFocused:e})}}return B.View=o,e=new WeakMap,B}(),e)}(k)),k}function Y(){if(z)return j;z=1,Object.defineProperty(j,\"__esModule\",{value:!0}),j.Application=void 0;const e=d,t=ie(),n=J();class i extends e.EmitterBase{constructor(e,n){super(e,\"application\",n.uuid),this.identity=n,this.window=new t._Window(this.wire,{uuid:this.identity.uuid,name:this.identity.uuid})}windowListFromIdentityList(e){const n=[];return e.forEach((e=>{n.push(new t._Window(this.wire,{uuid:e.uuid,name:e.name}))})),n}isRunning(){return this.wire.sendAction(\"is-application-running\",this.identity).then((({payload:e})=>e.data))}async quit(e=!1){try{await this._close(e),await this.wire.sendAction(\"destroy-application\",{force:e,...this.identity})}catch(e){if(![\"Remote connection has closed\",\"Could not locate the requested application\"].some((t=>e.message.includes(t))))throw e}}async _close(e=!1){try{await this.wire.sendAction(\"close-application\",{force:e,...this.identity})}catch(e){if(!e.message.includes(\"Remote connection has closed\"))throw e}}close(e=!1){return console.warn(\"Deprecation Warning: Application.close is deprecated Please use Application.quit\"),this.wire.sendAction(\"application-close\",this.identity).catch((e=>{})),this._close(e)}getChildWindows(){return this.wire.sendAction(\"get-child-windows\",this.identity).then((({payload:e})=>{const t=[];return e.data.forEach((e=>{t.push({uuid:this.identity.uuid,name:e})})),this.windowListFromIdentityList(t)}))}getManifest(){return this.wire.sendAction(\"get-application-manifest\",this.identity).then((({payload:e})=>e.data))}getParentUuid(){return this.wire.sendAction(\"get-parent-application\",this.identity).then((({payload:e})=>e.data))}getShortcuts(){return this.wire.sendAction(\"get-shortcuts\",this.identity).then((({payload:e})=>e.data))}async getViews(){const{payload:e}=await this.wire.sendAction(\"application-get-views\",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}getZoomLevel(){return this.wire.sendAction(\"get-application-zoom-level\",this.identity).then((({payload:e})=>e.data))}getWindow(){return this.wire.sendAction(\"application-get-window\",this.identity).catch((e=>{})),Promise.resolve(this.window)}registerUser(e,t){return this.wire.sendAction(\"register-user\",{userName:e,appName:t,...this.identity}).then((()=>{}))}removeTrayIcon(){return this.wire.sendAction(\"remove-tray-icon\",this.identity).then((()=>{}))}restart(){return this.wire.sendAction(\"restart-application\",this.identity).then((()=>{}))}run(){return console.warn(\"Deprecation Warning: Application.run is deprecated Please use fin.Application.start\"),this.wire.sendAction(\"application-run\",this.identity).catch((e=>{})),this._run()}_run(e={}){return this.wire.sendAction(\"run-application\",{manifestUrl:this._manifestUrl,opts:e,...this.identity}).then((()=>{}))}scheduleRestart(){return this.wire.sendAction(\"relaunch-on-close\",this.identity).then((()=>{}))}async sendApplicationLog(){const{payload:e}=await this.wire.sendAction(\"send-application-log\",this.identity);return e.data}async setJumpList(e){await this.wire.sendAction(\"set-jump-list\",{config:e,...this.identity})}setTrayIcon(e){return this.wire.sendAction(\"set-tray-icon\",{enabledIcon:e,...this.identity}).then((()=>{}))}setShortcuts(e){return this.wire.sendAction(\"set-shortcuts\",{data:e,...this.identity}).then((()=>{}))}async setShortcutQueryParams(e){await this.wire.sendAction(\"set-shortcut-query-args\",{data:e,...this.identity})}setZoomLevel(e){return this.wire.sendAction(\"set-application-zoom-level\",{level:e,...this.identity}).then((()=>{}))}async setAppLogUsername(e){await this.wire.sendAction(\"set-app-log-username\",{data:e,...this.identity})}getTrayIconInfo(){return this.wire.sendAction(\"get-tray-icon-info\",this.identity).then((({payload:e})=>e.data))}hasTrayIcon(){return this.wire.sendAction(\"has-tray-icon\",this.identity).then((({payload:e})=>e.data))}terminate(){return this.wire.sendAction(\"terminate-application\",this.identity).then((()=>{}))}wait(){return this.wire.sendAction(\"wait-for-hung-application\",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction(\"get-info\",this.identity).then((({payload:e})=>e.data))}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction(\"application-get-process-info\",this.identity);return e}async setFileDownloadLocation(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t};await this.wire.sendAction(\"set-file-download-location\",{...n,downloadLocation:e})}async getFileDownloadLocation(){const{payload:{data:e}}=await this.wire.sendAction(\"get-file-download-location\",this.identity);return e}async showTrayIconPopupMenu(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t},{payload:i}=await this.wire.sendAction(\"show-tray-icon-popup-menu\",{...n,options:e});return i.data}async closeTrayIconPopupMenu(){const{name:e}=this.wire.me,t={uuid:this.identity.uuid,name:e};await this.wire.sendAction(\"close-tray-icon-popup-menu\",{...t})}}return j.Application=i,j}function Z(){return q||(q=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(function(){if(K)return F;K=1,Object.defineProperty(F,\"__esModule\",{value:!0}),F.ApplicationModule=void 0;const e=d,t=O,n=Y();class i extends e.Base{async wrap(e){this.wire.sendAction(\"wrap-application\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}wrapSync(e){this.wire.sendAction(\"wrap-application-sync\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}async _create(e){return void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&void 0===e.isPlatformController&&(e.autoShow=!0),await this.wire.sendAction(\"create-application\",e),this.wrap({uuid:e.uuid})}create(e){return console.warn(\"Deprecation Warning: fin.Application.create is deprecated. Please use fin.Application.start\"),this.wire.sendAction(\"application-create\").catch((e=>{})),this._create(e)}async start(e){this.wire.sendAction(\"start-application\").catch((e=>{}));const t=await this._create(e);return await this.wire.sendAction(\"run-application\",{uuid:e.uuid}),t}async startManyManifests(e,t){return this.wire.sendAction(\"run-applications\",{applications:e,opts:t}).then((()=>{}))}getCurrent(){return this.wire.sendAction(\"get-current-application\").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction(\"get-current-application-sync\").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}async startFromManifest(e,t){this.wire.sendAction(\"application-start-from-manifest\").catch((e=>{}));const n=await this._createFromManifest(e);return await n._run(t),n}createFromManifest(e){return console.warn(\"Deprecation Warning: fin.Application.createFromManifest is deprecated. Please use fin.Application.startFromManifest\"),this.wire.sendAction(\"application-create-from-manifest\").catch((e=>{})),this._createFromManifest(e)}_createFromManifest(e){return this.wire.sendAction(\"get-application-manifest\",{manifestUrl:e}).then((({payload:e})=>{const t=e.data.platform?e.data.platform.uuid:e.data.startup_app.uuid;return this.wrap({uuid:t})})).then((t=>(t._manifestUrl=e,t)))}}return F.ApplicationModule=i,F}(),e),n(Y(),e)}(R)),R}H.WebContents=D;var Q={};Object.defineProperty(Q,\"__esModule\",{value:!0}),Q.promisifySubscription=void 0;var X,ee,te;function ne(){if(X)return S;X=1,Object.defineProperty(S,\"__esModule\",{value:!0}),S._Window=void 0;const e=Z(),t=H,n=J(),i=T,r=Q;class o extends t.WebContents{constructor(e,t){super(e,t,\"window\")}async createWindow(e){this.wire.sendAction(\"window-create-window\",this.identity).catch((e=>{}));const t=await(0,r.promisifySubscription)(this,\"fire-constructor-callback\");void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&(e.autoShow=!0),(0,i.handleDeprecatedWarnings)(e);const n=this.wire.environment.createChildContent({entityType:\"window\",options:e}),[o]=await Promise.all([t.getValue(),n]);let s;const{success:a}=o,c=o.data,{message:d}=c;s=a?{httpResponseCode:c.httpResponseCode,apiInjected:c.apiInjected}:{message:c.message,networkErrorCode:c.networkErrorCode,stack:c.stack};const h={message:d,cbPayload:s,success:a};try{this.getWebWindow().fin.__internal_.openerSuccessCBCalled()}catch(e){}return h.success?this:Promise.reject(h)}getAllFrames(){return this.wire.sendAction(\"get-all-frames\",this.identity).then((({payload:e})=>e.data))}getBounds(){return this.wire.sendAction(\"get-window-bounds\",this.identity).then((({payload:e})=>e.data))}center(){return this.wire.sendAction(\"center-window\",this.identity).then((()=>{}))}blur(){return this.wire.sendAction(\"blur-window\",this.identity).then((()=>{}))}bringToFront(){return this.wire.sendAction(\"bring-window-to-front\",this.identity).then((()=>{}))}animate(e,t){return this.wire.sendAction(\"animate-window\",{transitions:e,options:t,...this.identity}).then((()=>{}))}hide(){return this.wire.sendAction(\"hide-window\",this.identity).then((()=>{}))}close(e=!1){return this.wire.sendAction(\"close-window\",{force:e,...this.identity}).then((()=>{Object.setPrototypeOf(this,null)}))}focusedWebViewWasChanged(){return this.wire.sendAction(\"focused-webview-changed\",this.identity).then((()=>{}))}getNativeId(){return this.wire.sendAction(\"get-window-native-id\",this.identity).then((({payload:e})=>e.data))}async getCurrentViews(){const{payload:e}=await this.wire.sendAction(\"window-get-views\",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}disableFrame(){return console.warn(\"Function is deprecated; use disableUserMovement instead.\"),this.wire.sendAction(\"disable-window-frame\",this.identity).then((()=>{}))}disableUserMovement(){return this.wire.sendAction(\"disable-window-frame\",this.identity).then((()=>{}))}enableFrame(){return console.warn(\"Function is deprecated; use enableUserMovement instead.\"),this.wire.sendAction(\"enable-window-frame\",this.identity).then((()=>{}))}enableUserMovement(){return this.wire.sendAction(\"enable-window-frame\",this.identity).then((()=>{}))}flash(){return this.wire.sendAction(\"flash-window\",this.identity).then((()=>{}))}stopFlashing(){return this.wire.sendAction(\"stop-flash-window\",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction(\"get-window-info\",this.identity).then((({payload:e})=>e.data))}async getLayout(e){this.wire.sendAction(\"window-get-layout\",this.identity).catch((e=>{}));const t=await this.getOptions();if(!t.layout&&!t.layoutSnapshot)throw new Error(\"Window does not have a Layout\");return this.fin.Platform.Layout.wrap(e??this.identity)}getOptions(){return this.wire.sendAction(\"get-window-options\",this.identity).then((({payload:e})=>e.data))}getParentApplication(){return this.wire.sendAction(\"window-get-parent-application\",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity))}getParentWindow(){return this.wire.sendAction(\"window-get-parent-window\",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity)).then((e=>e.getWindow()))}async getSnapshot(e){const t={area:e,...this.identity};console.warn(\"Window.getSnapshot has been deprecated, please use Window.capturePage\");return(await this.wire.sendAction(\"get-window-snapshot\",t)).payload.data}getState(){return this.wire.sendAction(\"get-window-state\",this.identity).then((({payload:e})=>e.data))}getWebWindow(){return this.wire.sendAction(\"window-get-web-window\",this.identity).catch((e=>{})),this.wire.environment.getWebWindow(this.identity)}isMainWindow(){return this.wire.sendAction(\"window-is-main-window\",this.identity).catch((e=>{})),this.me.uuid===this.me.name}isShowing(){return this.wire.sendAction(\"is-window-showing\",this.identity).then((({payload:e})=>e.data))}maximize(){return this.wire.sendAction(\"maximize-window\",this.identity).then((()=>{}))}minimize(){return this.wire.sendAction(\"minimize-window\",this.identity).then((()=>{}))}moveBy(e,t,n){return this.wire.sendAction(\"move-window-by\",{deltaLeft:e,deltaTop:t,positioningOptions:n,...this.identity}).then((()=>{}))}moveTo(e,t,n){return this.wire.sendAction(\"move-window\",{left:e,top:t,positioningOptions:n,...this.identity}).then((()=>{}))}resizeBy(e,t,n,i){return this.wire.sendAction(\"resize-window-by\",{deltaWidth:Math.floor(e),deltaHeight:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}resizeTo(e,t,n,i){return this.wire.sendAction(\"resize-window\",{width:Math.floor(e),height:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}restore(){return this.wire.sendAction(\"restore-window\",this.identity).then((()=>{}))}setAsForeground(){return this.wire.sendAction(\"set-foreground-window\",this.identity).then((()=>{}))}setBounds(e,t){return this.wire.sendAction(\"set-window-bounds\",{...e,...this.identity,positioningOptions:t}).then((()=>{}))}show(e=!1){return this.wire.sendAction(\"show-window\",{force:e,...this.identity}).then((()=>{}))}showAt(e,t,n=!1){return this.wire.sendAction(\"show-at-window\",{force:n,left:Math.floor(e),top:Math.floor(t),...this.identity}).then((()=>{}))}updateOptions(e){return this.wire.sendAction(\"update-window-options\",{options:e,...this.identity}).then((()=>{}))}authenticate(e,t){return this.wire.sendAction(\"window-authenticate\",{userName:e,password:t,...this.identity}).then((()=>{}))}async showPopupMenu(e){const{payload:t}=await this.wire.sendAction(\"show-popup-menu\",{options:e,...this.identity});return t.data}async closePopupMenu(){return this.wire.sendAction(\"close-popup-menu\",{...this.identity}).then((()=>{}))}async dispatchPopupResult(e){this.wire.sendAction(\"window-dispatch-popup-result\",this.identity).catch((e=>{})),await this.wire.sendAction(\"dispatch-popup-result\",{data:e,...this.identity})}async print(e={content:\"self\"}){switch(e.content){case void 0:case\"self\":return super.print(e);case\"screenshot\":return this.wire.sendAction(\"print-screenshot\",this.identity).then((()=>{}));case\"views\":return this.wire.sendAction(\"print-views\",{...this.identity,options:e}).then((()=>{}));default:return}}}return S._Window=o,S}function ie(){return te||(te=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(function(){if(ee)return _;ee=1,Object.defineProperty(_,\"__esModule\",{value:!0}),_._WindowModule=void 0;const e=d,t=O,n=ne();class i extends e.Base{async wrap(e){this.wire.sendAction(\"window-wrap\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}wrapSync(e){this.wire.sendAction(\"window-wrap-sync\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}create(e){return this.wire.sendAction(\"create-window\").catch((e=>{})),new n._Window(this.wire,{uuid:this.me.uuid,name:e.name}).createWindow(e)}getCurrent(){if(this.wire.sendAction(\"get-current-window\").catch((e=>{})),!this.wire.me.isWindow)throw new Error(\"You are not in a Window context\");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction(\"get-current-window-sync\").catch((e=>{})),!this.wire.me.isWindow)throw new Error(\"You are not in a Window context\");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return _._WindowModule=i,_}(),e),n(ne(),e)}(M)),M}Q.promisifySubscription=async(e,t,n=(()=>!0),i)=>{let r,o,s;const a=new Promise(((e,t)=>{r=e,o=t})),c=e=>{n(e)&&(clearTimeout(s),r(e))};return await e.on(t,c),i&&(s=setTimeout((()=>o(new Error(\"event timed out\"))),i)),a.finally((()=>{e.removeListener(t,c).catch((()=>null))})),{getValue:()=>a}},Object.defineProperty(c,\"__esModule\",{value:!0}),c.System=void 0;const re=d,oe=g,se=ie(),ae=t;class ce extends re.EmitterBase{constructor(e){super(e,\"system\")}sendExternalProcessRequest(e,t){return new Promise(((n,i)=>{const r=\"external-process-exited\";let o,s,a,c;\"function\"==typeof t.listener&&(a=e=>{const n=e||{};s={topic:\"exited\",uuid:n.processUuid||\"\",exitCode:n.exitCode||0},o===e.processUuid&&(t.listener(s),c.removeListener(r,a))},this.wire.me.name||(this.wire.me.name=this.wire.me.uuid),c=new se._Window(this.wire,this.wire.me),c.on(r,a)),this.wire.sendAction(e,t).then((({payload:e})=>{o=e.data.uuid,n(e.data),s&&o===s.uuid&&(t.listener(s),c.removeListener(r,a))})).catch((e=>{c&&c.removeListener(r,a),i(e)}))}))}getVersion(){return this.wire.sendAction(\"get-version\").then((({payload:e})=>e.data))}clearCache(e){return this.wire.sendAction(\"clear-cache\",e).then((()=>{}))}deleteCacheOnExit(){return this.wire.sendAction(\"delete-cache-request\").then((()=>{}))}exit(){return this.wire.sendAction(\"exit-desktop\").then((()=>{}))}async fetchManifest(e){const{payload:{data:t}}=await this.wire.sendAction(\"fetch-manifest\",{manifestUrl:e});return t}flushCookieStore(){return this.wire.sendAction(\"flush-cookie-store\").then((()=>{}))}getAllWindows(){return this.wire.sendAction(\"get-all-windows\").then((({payload:e})=>e.data))}getAllApplications(){return this.wire.sendAction(\"get-all-applications\").then((({payload:e})=>e.data))}getCommandLineArguments(){return this.wire.sendAction(\"get-command-line-arguments\").then((({payload:e})=>e.data))}async getCrashReporterState(){const{payload:{data:{diagnosticMode:e,isRunning:t}}}=await this.wire.sendAction(\"get-crash-reporter-state\");return console.warn(\"diagnosticMode property is deprecated. It will be removed in a future version\"),{diagnosticMode:e,diagnosticsMode:e,isRunning:t}}async startCrashReporter(e){const t=e,n={...t,diagnosticMode:t.diagnosticsMode||t.diagnosticMode},{payload:{data:{diagnosticMode:i,isRunning:r}}}=await this.wire.sendAction(\"start-crash-reporter\",n);return{diagnosticMode:i,diagnosticsMode:i,isRunning:r}}getUniqueUserId(){return this.wire.sendAction(\"get-unique-user-id\").then((({payload:e})=>e.data))}getEntityInfo(e,t){return this.wire.sendAction(\"get-entity-info\",{uuid:e,name:t}).then((({payload:e})=>e.data))}getEnvironmentVariable(e){return this.wire.sendAction(\"get-environment-variable\",{environmentVariables:e}).then((({payload:e})=>e.data))}getFocusedWindow(){return this.wire.sendAction(\"get-focused-window\").then((({payload:e})=>e.data))}async isAppCertified(e){const{payload:{data:{certifiedInfo:t}}}=await this.wire.sendAction(\"is-app-certified\",{manifestUrl:e});return t}getInstalledRuntimes(){return this.wire.sendAction(\"get-installed-runtimes\").then((({payload:e})=>e.data.runtimes))}async getInstalledApps(){const{payload:{data:{installedApps:e}}}=await this.wire.sendAction(\"get-installed-apps\");return e}getLog(e){return this.wire.sendAction(\"view-log\",e).then((({payload:e})=>e.data))}getMachineId(){return this.wire.sendAction(\"get-machine-id\").then((({payload:e})=>e.data))}getMinLogLevel(){return this.wire.sendAction(\"get-min-log-level\").then((({payload:e})=>e.data))}getLogList(){return this.wire.sendAction(\"list-logs\").then((({payload:e})=>e.data))}getMonitorInfo(){return this.wire.sendAction(\"get-monitor-info\").then((({payload:e})=>e.data))}getMousePosition(){return this.wire.sendAction(\"get-mouse-position\").then((({payload:e})=>e.data))}getProcessList(){return console.warn(\"System.getProcessList has been deprecated. Please consider using our new process APIs: Window.getProcessInfo, View.getProcessInfo, Application.getProcessInfo, System.getAllProcessInfo\"),this.wire.sendAction(\"process-snapshot\").then((({payload:e})=>e.data))}async getAllProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction(\"get-all-process-info\",this.identity);return e}getProxySettings(){return this.wire.sendAction(\"get-proxy-settings\").then((({payload:e})=>e.data))}getRuntimeInfo(){return this.wire.sendAction(\"get-runtime-info\").then((({payload:e})=>e.data))}getRvmInfo(){return this.wire.sendAction(\"get-rvm-info\").then((({payload:e})=>e.data))}getHostSpecs(){return this.wire.sendAction(\"get-host-specs\").then((({payload:e})=>e.data))}getOSInfo(){return this.wire.sendAction(\"get-os-info\").then((({payload:e})=>e.data))}launchExternalProcess(e){return this.sendExternalProcessRequest(\"launch-external-process\",e)}monitorExternalProcess(e){return this.sendExternalProcessRequest(\"monitor-external-process\",e)}log(e,t){return this.wire.sendAction(\"write-to-log\",{level:e,message:t}).then((()=>{}))}openUrlWithBrowser(e){return this.wire.sendAction(\"open-url-with-browser\",{url:e}).then((()=>{}))}async registerCustomProtocol(e){if(\"object\"!=typeof e)throw new Error(\"Must provide an object with a `protocolName` property having a string value.\");await this.wire.sendAction(\"register-custom-protocol\",e)}async unregisterCustomProtocol(e){await this.wire.sendAction(\"unregister-custom-protocol\",{protocolName:e})}async getCustomProtocolState(e){return this.wire.sendAction(\"get-custom-protocol-state\",{protocolName:e}).then((({payload:e})=>e.data))}releaseExternalProcess(e){return this.wire.sendAction(\"release-external-process\",{uuid:e}).then((()=>{}))}showDeveloperTools(e){return this.wire.sendAction(\"show-developer-tools\",e).then((()=>{}))}terminateExternalProcess(e){return this.wire.sendAction(\"terminate-external-process\",e).then((()=>{}))}updateProxySettings(e){return this.wire.sendAction(\"update-proxy\",e).then((()=>{}))}async downloadAsset(e,t){const n=()=>{};let i=n,r=n;const o=new Promise(((e,t)=>{i=e,r=t}));if(\"openfin\"!==this.wire.environment.type)throw new oe.NotSupportedError(\"downloadAsset only supported in an OpenFin Render process\");const s=oe.RuntimeError.getCallSite(),a=this.wire.environment.getNextMessageId().toString(),c=`asset-download-progress-${a}`,d=`asset-download-error-${a}`,h=`asset-download-complete-${a}`,l=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},u=()=>{this.removeListener(c,l)};await Promise.all([this.on(c,l),this.once(d,(e=>{u();const{reason:t,err:n}=e;r(new oe.RuntimeError({reason:t,error:n},s))})),this.once(h,(()=>{u(),i()}))]);const p=Object.assign(e,{downloadId:a});return await this.wire.sendAction(\"download-asset\",p).catch((e=>{throw u(),e})),o}downloadRuntime(e,t){const n=oe.RuntimeError.getCallSite();return new Promise(((i,r)=>{if(\"openfin\"!==this.wire.environment.type)return void r(new oe.NotSupportedError(\"downloadRuntime only supported in an OpenFin Render process\"));const o=this.wire.environment.getNextMessageId().toString(),s=`runtime-download-progress-${o}`,a=`runtime-download-error-${o}`,c=`runtime-download-complete-${o}`,d=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},h=()=>{this.removeListener(s,d)};this.on(s,d),this.once(a,(e=>{h();const{reason:t,err:i}=e;r(new oe.RuntimeError({reason:t,error:i},n))})),this.once(c,(()=>{h(),i()}));const l=Object.assign(e,{downloadId:o});this.wire.sendAction(\"download-runtime\",l).catch((e=>{h(),r(e)}))}))}downloadPreloadScripts(e){return this.wire.sendAction(\"download-preload-scripts\",{scripts:e}).then((({payload:e})=>e.data))}getAllExternalApplications(){return this.wire.sendAction(\"get-all-external-applications\").then((({payload:e})=>e.data))}getAppAssetInfo(e){return this.wire.sendAction(\"get-app-asset-info\",e).then((({payload:e})=>e.data))}getCookies(e){const t=this.wire.environment.getUrl(),n=Object.assign(e,{url:t});return this.wire.sendAction(\"get-cookies\",n).then((({payload:e})=>e.data))}setMinLogLevel(e){return this.wire.sendAction(\"set-min-log-level\",{level:e}).then((()=>{}))}resolveUuid(e){return this.wire.sendAction(\"resolve-uuid\",{entityKey:e}).then((({payload:e})=>e.data))}executeOnRemote(e,t){return t.requestingIdentity=e,this.wire.ferryAction(t)}readRegistryValue(e,t,n){return this.wire.sendAction(\"read-registry-value\",{rootKey:e,subkey:t,value:n}).then((({payload:e})=>e.data))}registerExternalConnection(e){return this.wire.sendAction(\"register-external-connection\",{uuid:e}).then((({payload:e})=>e.data))}async getServiceConfiguration(e){if(\"string\"!=typeof e.name)throw new Error(\"Must provide an object with a `name` property having a string value\");const{name:t}=e;return this.wire.sendAction(\"get-service-configuration\",{name:t}).then((({payload:e})=>e.data))}async getSystemAppConfig(e){if(\"string\"!=typeof e)throw new Error(\"Must provide a string value for name of system app\");return this.wire.sendAction(\"get-system-app-configuration\",{name:e}).then((({payload:e})=>e.data))}async registerShutdownHandler(e){this.wire.sendAction(\"system-register-shutdown-handler\").catch((e=>{}));const{uuid:t,name:n}=this.wire.me;this.on(\"system-shutdown\",(i=>{e({proceed:()=>{this.wire.environment.raiseEvent(\"application/system-shutdown-handled\",{uuid:t,name:n,topic:\"application\"})}})}))}runRvmHealthCheck(){return this.wire.sendAction(\"run-rvm-health-check\").then((({payload:e})=>e.data))}async launchManifest(e,t={}){const{subscribe:n,...i}=t,r=i;if(n){const e=new ae.EventEmitter;n(e);const t=\"app-version-progress\",i=\"runtime-status\",o=\"app-version-complete\",s=\"app-version-error\",a=this.wire.environment.getNextMessageId().toString();r.appVersionId=a;const c=[o,t,i,s],d=e=>{const{appVersionId:t,topic:n,type:i,...r}=e;return{...r,type:c.find((e=>i.includes(e)))}},h=t=>{const n=d(t);e.emit(n.type,n)},l=()=>{this.removeListener(`${t}.${a}`,h),this.removeListener(`${i}.${a}`,h),this.removeListener(`${o}.${a}`,h),this.removeListener(`${s}.${a}`,h),this.removeListener(`${o}.${a}`,l),this.removeListener(`${s}.${a}`,l)};await Promise.all([this.on(`${t}.${a}`,h),this.on(`${i}.${a}`,h),this.once(`${o}.${a}`,h),this.once(`${s}.${a}`,h),this.once(`${o}.${a}`,l),this.once(`${s}.${a}`,l)])}return(await this.wire.sendAction(\"launch-manifest\",{manifestUrl:e,opts:r})).payload.data.manifest}async queryPermissionForCurrentContext(e){const t={uuid:this.wire.me.uuid,name:this.wire.me.name};return(await this.wire.sendAction(\"query-permission-for-current-context\",{apiName:e,identity:t})).payload.data}async enableNativeWindowIntegrationProvider(e){const{payload:t}=await this.wire.sendAction(\"enable-native-window-integration-provider\",{permissions:e});return t.data}async registerUsage({data:e,type:t}){await this.wire.sendAction(\"register-usage\",{data:e,type:t})}async getPrinters(){const{payload:e}=await this.wire.sendAction(\"system-get-printers\");return e.data}async updateProcessLoggingOptions(e){await this.wire.sendAction(\"system-update-process-logging-options\",{options:e})}async getDomainSettings(){const{payload:{data:e}}=await this.wire.sendAction(\"get-domain-settings\",this.identity);return e}async setDomainSettings(e){await this.wire.sendAction(\"set-domain-settings\",{domainSettings:e,...this.identity})}async refreshExtensions(){const{payload:e}=await this.wire.sendAction(\"refresh-extensions\");return e.data}async getInstalledExtensions(){const{payload:e}=await this.wire.sendAction(\"get-installed-extensions\");return e.data}}c.System=ce;var de={},he={};Object.defineProperty(he,\"__esModule\",{value:!0}),he.RefCounter=void 0;he.RefCounter=class{constructor(){this.topicRefMap=new Map}incRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t+1;n=i,this.topicRefMap.set(e,i)}else this.topicRefMap.set(e,1),n=1;return n}decRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t-1;this.topicRefMap.set(e,i),n=i}else n=-1;return n}actOnFirst(e,t,n){return 1===this.incRefCount(e)?t():n()}actOnLast(e,t,n){return 0===this.decRefCount(e)?t():n()}};var le={},ue={},pe={};Object.defineProperty(pe,\"__esModule\",{value:!0}),pe.ChannelBase=pe.ProtectedItems=void 0;const we=e=>async(t,n,i)=>{const r=await e(t,n,i);return void 0===r?n:r};pe.ProtectedItems=class{constructor(e,t){this.providerIdentity=e,this.close=t}};class ye{static defaultAction(e){throw new Error(`No action registered at target for ${e}`)}constructor(){this.subscriptions=new Map}async processAction(e,t,n){try{const i=this.subscriptions.has(e)?this.subscriptions.get(e):(t,n)=>(this.defaultAction??ye.defaultAction)(e,t,n),r=this.preAction?await this.preAction(e,t,n):t,o=await i(r,n);return this.postAction?await this.postAction(e,o,n):o}catch(t){if(this.errorMiddleware)return this.errorMiddleware(e,t,n);throw t}}beforeAction(e){if(this.preAction)throw new Error(\"Already registered beforeAction middleware\");this.preAction=we(e)}onError(e){if(this.errorMiddleware)throw new Error(\"Already registered error middleware\");this.errorMiddleware=e}afterAction(e){if(this.postAction)throw new Error(\"Already registered afterAction middleware\");this.postAction=we(e)}remove(e){this.subscriptions.delete(e)}setDefaultAction(e){if(this.defaultAction)throw new Error(\"default action can only be set once\");this.defaultAction=e}register(e,t){if(this.subscriptions.has(e))throw new Error(`Subscription already registered for action: ${e}. Unsubscribe before adding new subscription`);return this.subscriptions.set(e,t),!0}}pe.ChannelBase=ye;var fe,ge,me,ve=s&&s.__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)},Ce=s&&s.__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};Object.defineProperty(ue,\"__esModule\",{value:!0}),ue.ChannelClient=void 0;const be=pe,Ie=new Map;class Ee extends be.ChannelBase{static closeChannelByEndpointId(e){const t=Ie.get(e);t&&ve(t,me,\"f\").call(t)}static handleProviderDisconnect(e){for(const t of Ie.values())t.providerIdentity.channelId===e.channelId&&(t.disconnectListener(e),ve(t,me,\"f\").call(t))}constructor(e,t,n){super(),fe.set(this,void 0),ge.set(this,void 0),this.processAction=(e,t,n)=>super.processAction(e,t,n),me.set(this,(()=>{Ie.delete(this.endpointId),ve(this,ge,\"f\").close()})),Ce(this,fe,new be.ProtectedItems(e,t),\"f\"),this.disconnectListener=()=>{},this.endpointId=e.endpointId,Ce(this,ge,n,\"f\"),Ie.set(this.endpointId,this),n.receive(this.processAction)}get providerIdentity(){return ve(this,fe,\"f\").providerIdentity}async dispatch(e,t){if(ve(this,ge,\"f\").isEndpointConnected(this.providerIdentity.channelId))return ve(this,ge,\"f\").send(this.providerIdentity.channelId,e,t);throw new Error(\"The client you are trying to dispatch from is disconnected from the target provider.\")}onDisconnection(e){this.disconnectListener=t=>{try{e(t)}catch(e){throw new Error(`Error while calling the onDisconnection callback: ${e.message}`)}finally{this.disconnectListener=()=>{}}}}async disconnect(){await this.sendDisconnectAction(),ve(this,me,\"f\").call(this)}async sendDisconnectAction(){const e=ve(this,fe,\"f\");await e.close()}static async wireClose(e,t,n){const{channelName:i,uuid:r,name:o}=t;await e.sendAction(\"disconnect-from-channel\",{channelName:i,uuid:r,name:o,endpointId:n})}}ue.ChannelClient=Ee,fe=new WeakMap,ge=new WeakMap,me=new WeakMap;var xe={},Ae={};Object.defineProperty(Ae,\"__esModule\",{value:!0}),Ae.exhaustiveCheck=void 0,Ae.exhaustiveCheck=function(e,t){throw new Error(`Unsupported value: ${e}${t?`\\n Supported values are: ${t.join(\"\")}`:\"\"}`)};var Pe,Me,_e,Oe={},Se=s&&s.__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},Re=s&&s.__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)};Object.defineProperty(Oe,\"__esModule\",{value:!0}),Oe.ClassicInfo=Oe.ClassicStrategy=void 0;Oe.ClassicStrategy=class{constructor(e,t,n,i){this.messageReceiver=t,this.endpointId=n,this.providerIdentity=i,Pe.set(this,void 0),Me.set(this,new Map),_e.set(this,new Map),this.send=async(e,t,n)=>{const i=Re(this,Me,\"f\").get(e);if(!i)throw new Error(`Could not locate routing info for endpoint ${e}`);const r={...i};r.isLocalEndpointId&&delete r.endpointId,delete r.isLocalEndpointId;const o=Re(this,Pe,\"f\").sendAction(\"send-channel-message\",{...r,providerIdentity:this.providerIdentity,action:t,payload:n});Re(this,_e,\"f\").get(e)?.add(o);return(await o.catch((e=>{throw new Error(e.message)})).finally((()=>{Re(this,_e,\"f\").get(e)?.delete(o)}))).payload.data.result},this.close=async()=>{this.messageReceiver.removeEndpoint(this.providerIdentity.channelId,this.endpointId),[...Re(this,Me,\"f\").keys()].forEach((e=>this.closeEndpoint(e))),Se(this,Me,new Map,\"f\")},Se(this,Pe,e,\"f\")}onEndpointDisconnect(e,t){}receive(e){this.messageReceiver.addEndpoint(e,this.providerIdentity.channelId,this.endpointId)}async closeEndpoint(e){const t=Re(this,Me,\"f\").get(e);Re(this,Me,\"f\").delete(e);const n=Re(this,_e,\"f\").get(e);n?.forEach((n=>{const i=`Channel connection with identity uuid: ${t?.uuid} / name: ${t?.name} / endpointId: ${e} no longer connected.`;n.cancel(new Error(i))}))}isEndpointConnected(e){return Re(this,Me,\"f\").has(e)}addEndpoint(e,t){Re(this,Me,\"f\").set(e,t.endpointIdentity),Re(this,_e,\"f\").set(e,new Set)}isValidEndpointPayload(e){return\"string\"==typeof e?.endpointIdentity?.endpointId||\"string\"==typeof e?.endpointIdentity?.channelId}},Pe=new WeakMap,Me=new WeakMap,_e=new WeakMap,Oe.ClassicInfo={version:5,minimumVersion:0,type:\"classic\"};var Fe={},je={},ke={};Object.defineProperty(ke,\"__esModule\",{value:!0}),ke.errorToPOJO=void 0,ke.errorToPOJO=function(e){return{stack:e.stack,name:e.name,message:e.message,toString:()=>e.stack||e.toString()}};var Le,Te,$e=s&&s.__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)},Be=s&&s.__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};Object.defineProperty(je,\"__esModule\",{value:!0}),je.RTCEndpoint=void 0;const Ge=ke;je.RTCEndpoint=class{static isValidEndpointPayload(e){const t=e=>\"object\"==typeof e&&null!==e;return t(e)&&t(e.endpointIdentity)&&t(e.rtc)&&\"string\"==typeof e.endpointIdentity.endpointId}constructor({rtc:e,endpointIdentity:t}){this.responseMap=new Map,Le.set(this,null),Te.set(this,void 0),this.connectionStateChangeHandler=e=>{\"connected\"!==this.rtc.rtcClient.connectionState&&(this.rtc.rtcClient.removeEventListener(\"connectionstatechange\",this.connectionStateChangeHandler),this.close(),$e(this,Te,\"f\")&&$e(this,Te,\"f\").call(this))},this.send=async(e,t)=>{const n=`message-${Math.random()}`,i=new Promise(((e,t)=>{this.responseMap.set(n,{resolve:e,reject:t})}));return this.rtc.channels.request.send(JSON.stringify({action:e,payload:t,messageId:n})),i},this.close=()=>{this.responseMap.forEach((e=>e.reject(\"Connection has closed.\"))),this.responseMap=new Map,this.rtc.channels.request.close(),this.rtc.channels.response.close(),this.rtc.rtcClient.close()},this.rtc=e,this.endpointIdentity=t,this.rtc.channels.response.addEventListener(\"message\",(e=>{let{data:t}=e;e.data instanceof ArrayBuffer&&(t=(new TextDecoder).decode(e.data));const{messageId:n,payload:i,success:r,error:o}=JSON.parse(t),{resolve:s,reject:a}=this.responseMap.get(n)??{};s&&a?(this.responseMap.delete(n),r?s(i):a(o)):(console.log(\"Could not find id in responseMap.\"),console.log(e))})),this.rtc.channels.request.addEventListener(\"message\",(async e=>{let{data:n}=e;e.data instanceof ArrayBuffer&&(n=(new TextDecoder).decode(e.data));const{messageId:i,action:r,payload:o}=JSON.parse(n);if($e(this,Le,\"f\"))try{const e=await $e(this,Le,\"f\").call(this,r,o,t);this.rtc.channels.response.send(JSON.stringify({messageId:i,payload:e,success:!0}))}catch(e){\"open\"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,error:(0,Ge.errorToPOJO)(e),success:!1}))}else\"open\"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,success:!1,error:\"Connection not ready.\"}))})),this.rtc.rtcClient.addEventListener(\"connectionstatechange\",this.connectionStateChangeHandler),Object.values(this.rtc.channels).forEach((e=>{e.onclose=e=>{[...this.responseMap.values()].forEach((e=>e.reject(new Error(\"RTCDataChannel closed unexpectedly, this is most commonly caused by message size. Note: RTC Channels have a message size limit of ~255kB.\")))),this.close(),$e(this,Te,\"f\")&&$e(this,Te,\"f\").call(this)}}))}onDisconnect(e){if($e(this,Te,\"f\"))throw new Error(\"RTCEndpoint disconnectListener cannot be set twice.\");Be(this,Te,e,\"f\")}receive(e){if($e(this,Le,\"f\"))throw new Error(\"You have already set a listener for this RTC Endpoint.\");Be(this,Le,e,\"f\")}get connected(){return\"connected\"===this.rtc.rtcClient.connectionState}},Le=new WeakMap,Te=new WeakMap;var We,He,Ne,De={},Ue=s&&s.__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)},Ve=s&&s.__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};Object.defineProperty(De,\"__esModule\",{value:!0}),De.EndpointStrategy=void 0;De.EndpointStrategy=class{constructor(e,t,n){this.EndpointType=e,this.StrategyName=n,We.set(this,null),He.set(this,new Map),Ne.set(this,!0),this.send=async(e,t,n)=>this.getEndpointById(e).send(t,n),this.close=async()=>{Ue(this,Ne,\"f\")&&(Ue(this,He,\"f\").forEach((e=>e.close())),Ve(this,He,new Map,\"f\")),Ve(this,Ne,!1,\"f\")},this.isValidEndpointPayload=t}onEndpointDisconnect(e,t){this.getEndpointById(e).onDisconnect(t)}receive(e){if(Ue(this,We,\"f\"))throw new Error(`You have already set a listener for this ${this.StrategyName} Strategy`);Ve(this,We,e,\"f\"),Ue(this,He,\"f\").forEach((e=>e.receive(Ue(this,We,\"f\"))))}getEndpointById(e){const t=Ue(this,He,\"f\").get(e);if(!t)throw new Error(`Client with endpoint id ${e} is not connected`);return t}get connected(){return Ue(this,Ne,\"f\")}isEndpointConnected(e){return Ue(this,He,\"f\").has(e)}addEndpoint(e,t){if(!Ue(this,Ne,\"f\"))return void console.warn(`Adding endpoint to disconnected ${this.StrategyName} Strategy`);const n=new this.EndpointType(t);Ue(this,We,\"f\")&&n.receive(Ue(this,We,\"f\")),Ue(this,He,\"f\").set(e,n)}async closeEndpoint(e){Ue(this,He,\"f\").delete(e)}},We=new WeakMap,He=new WeakMap,Ne=new WeakMap,Object.defineProperty(Fe,\"__esModule\",{value:!0}),Fe.RTCInfo=Fe.RTCStrategy=void 0;const ze=je,Ke=De;class qe extends Ke.EndpointStrategy{constructor(){super(ze.RTCEndpoint,ze.RTCEndpoint.isValidEndpointPayload,\"RTC\")}}Fe.RTCStrategy=qe,Fe.RTCInfo={version:2,minimumVersion:0,type:\"rtc\"};var Je={};Object.defineProperty(Je,\"__esModule\",{value:!0}),Je.RTCICEManager=void 0;const Ye=d;class Ze extends Ye.EmitterBase{constructor(e){super(e,\"channel\"),this.ensureChannelOpened=e=>new Promise(((t,n)=>{if(\"open\"===e.readyState)t();else if(\"connecting\"===e.readyState){const n=()=>{e.removeEventListener(\"open\",n),t()};e.addEventListener(\"open\",n)}else n(new Error(\"This Channel has already closed\"))}))}static createDataChannelPromise(e,t){let n;const i=new Promise((e=>{n=e})),r=i=>{const o=()=>{i.channel.removeEventListener(\"open\",o),n(i.channel)};i.channel.label===e&&(i.channel.addEventListener(\"open\",o),t.removeEventListener(\"datachannel\",r))};return t.addEventListener(\"datachannel\",r),i}async listenForProviderIce(e,t){await this.on(this.createProviderEventName(e),t,{timestamp:Date.now()})}async raiseProviderIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createProviderEventName(e)),t)}async listenForClientIce(e,t){await this.on(this.createClientEventName(e),t,{timestamp:Date.now()})}async raiseClientIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createClientEventName(e)),t)}cleanupIceListeners(e){this.removeAllListeners(this.createClientEventName(e)),this.removeAllListeners(this.createProviderEventName(e))}createClientEventName(e){return`ice-client-${e}`}createProviderEventName(e){return`ice-provider-${e}`}createRouteString(e){return`channel/${e}`}createRtcPeer(){return this.wire.environment.getRtcPeer()}async startClientOffer(){const e=Math.random().toString(),t=this.createRtcPeer();t.addEventListener(\"icecandidate\",(async t=>{t.candidate&&await this.raiseClientIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForProviderIce(e,(async e=>{await t.addIceCandidate(e.candidate)}));const n={request:t.createDataChannel(\"request\"),response:t.createDataChannel(\"response\")},i=await t.createOffer();await t.setLocalDescription(i);const r=Promise.all([n.request,n.response].map(this.ensureChannelOpened)).then((()=>{}));return{rtcClient:t,channels:n,offer:i,rtcConnectionId:e,channelsOpened:r}}async finishClientOffer(e,t,n){return await e.setRemoteDescription(t),await n,!0}async createProviderAnswer(e,t){const n=this.createRtcPeer(),i=Ze.createDataChannelPromise(\"request\",n),r=Ze.createDataChannelPromise(\"response\",n);n.addEventListener(\"icecandidate\",(async t=>{t.candidate&&await this.raiseProviderIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForClientIce(e,(async e=>{await n.addIceCandidate(e.candidate)})),await n.setRemoteDescription(t);const o=await n.createAnswer();await n.setLocalDescription(o);const s=Promise.all([i,r]).then((([t,n])=>(this.cleanupIceListeners(e),{request:t,response:n})));return{rtcClient:n,answer:o,channels:s}}}Je.RTCICEManager=Ze;var Qe={},Xe={};function et(e){return[...e.split(\".\").reverse().entries()].reduce(((e,[t,n])=>e+ +n*1e4**t),0)}function tt(e,t){return et(e)>=et(t)}function nt(e){return e.split(\"/\")[0]}Object.defineProperty(Xe,\"__esModule\",{value:!0}),Xe.runtimeUuidMeetsMinimumRuntimeVersion=Xe.parseRuntimeUuid=Xe.meetsMinimumRuntimeVersion=void 0,Xe.meetsMinimumRuntimeVersion=tt,Xe.parseRuntimeUuid=nt,Xe.runtimeUuidMeetsMinimumRuntimeVersion=function(e,t){return tt(nt(e),t)};var it,rt,ot,st,at,ct=s&&s.__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)},dt=s&&s.__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};Object.defineProperty(Qe,\"__esModule\",{value:!0}),Qe.ChannelProvider=void 0;const ht=pe,lt=Xe;class ut extends ht.ChannelBase{get connections(){return[...ct(this,it,\"f\")]}static handleClientDisconnection(e,t){const n=e.connections.find((e=>e.endpointId===t.endpointId));if(n)ct(e,st,\"f\").call(e,n);else{e.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name)).forEach(ct(e,st,\"f\"))}e.disconnectListener(t)}static setProviderRemoval(e,t){ut.removalMap.set(e,t)}constructor(e,t,n){super(),it.set(this,void 0),rt.set(this,void 0),ot.set(this,void 0),st.set(this,(e=>{const t=this.connections.filter((t=>t.endpointId!==e.endpointId));ct(this,ot,\"f\").closeEndpoint(e.endpointId),dt(this,it,t,\"f\")})),this.processAction=async(e,t,n)=>(ut.clientIsMultiRuntime(n)&&!(0,lt.runtimeUuidMeetsMinimumRuntimeVersion)(n.runtimeUuid,\"18.87.56.0\")?this.handleMultiRuntimeLegacyClient(n):this.checkForClientConnection(n),super.processAction(e,t,n)),at.set(this,(()=>{ct(this,ot,\"f\").close();const e=ut.removalMap.get(this);e&&e()})),dt(this,rt,new ht.ProtectedItems(e,t),\"f\"),this.connectListener=()=>{},this.disconnectListener=()=>{},dt(this,it,[],\"f\"),dt(this,ot,n,\"f\"),n.receive(this.processAction)}dispatch(e,t,n){const i=e.endpointId??this.getEndpointIdForOpenFinId(e,t);return i&&ct(this,ot,\"f\").isEndpointConnected(i)?ct(this,ot,\"f\").send(i,t,n):Promise.reject(new Error(`Client connection with identity uuid: ${e.uuid} / name: ${e.name} / endpointId: ${i} no longer connected.`))}async processConnection(e,t){return ct(this,it,\"f\").push(e),this.connectListener(e,t)}publish(e,t){return this.connections.map((n=>ct(this,ot,\"f\").send(n.endpointId,e,t)))}onConnection(e){this.connectListener=e}onDisconnection(e){this.disconnectListener=e}async destroy(){const e=ct(this,rt,\"f\");e.providerIdentity,dt(this,it,[],\"f\"),await e.close(),ct(this,at,\"f\").call(this)}async getAllClientInfo(){return this.connections.map((e=>{const{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}=e;return{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}}))}checkForClientConnection(e){if(!this.isClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider.\\n Client Identity: {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}isClientConnected(e){return ut.clientIdentityIncludesEndpointId(e)?this.connections.some((t=>t.endpointId===e.endpointId&&t.uuid===e.uuid&&t.name===e.name)):this.isLegacyClientConnected(e)}isLegacyClientConnected(e){return this.connections.some((t=>t.uuid===e.uuid&&t.name===e.name))}handleMultiRuntimeLegacyClient(e){if(!this.isLegacyClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider. Client Identity:\\n {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}getEndpointIdForOpenFinId(e,t){const n=this.connections.filter((t=>t.name===e.name&&t.uuid===e.uuid));if(n.length>=2){const n=ct(this,rt,\"f\"),{uuid:i,name:r}=e,o=n?.providerIdentity.uuid,s=n?.providerIdentity.name;console.warn(`WARNING: Dispatch call may have unintended results. The \"to\" argument of your dispatch call is missing the\\n \"endpointId\" parameter. The identity you are dispatching to ({uuid: ${i}, name: ${r}})\\n has multiple channelClients for this channel. Your dispatched action: (${t}) from the provider:\\n ({uuid: ${o}, name: ${s}}) will only be processed by the most recently-created client.`)}return n.pop()?.endpointId}static clientIdentityIncludesEndpointId(e){return void 0!==e.endpointId}static clientIsMultiRuntime(e){return void 0!==e.runtimeUuid}static async wireClose(e,t){await e.sendAction(\"destroy-channel\",{channelName:t})}}Qe.ChannelProvider=ut,it=new WeakMap,rt=new WeakMap,ot=new WeakMap,st=new WeakMap,at=new WeakMap,ut.removalMap=new WeakMap;var pt={};Object.defineProperty(pt,\"__esModule\",{value:!0}),pt.MessageReceiver=void 0;const wt=ue,yt=d;class ft extends yt.Base{constructor(e){super(e),this.onmessage=e=>\"process-channel-message\"===e.action&&(this.processChannelMessage(e),!0),this.endpointMap=new Map,this.latestEndpointIdByChannelId=new Map,e.registerMessageHandler(this.onmessage.bind(this))}async processChannelMessage(e){const{senderIdentity:t,providerIdentity:n,action:i,ackToSender:r,payload:o,intendedTargetIdentity:s}=e.payload,a=s.channelId??s.endpointId??this.latestEndpointIdByChannelId.get(n.channelId),c=this.endpointMap.get(a);if(!c)return r.payload.success=!1,r.payload.reason=`Client connection with identity uuid: ${this.wire.me.uuid} / name: ${this.wire.me.name} / endpointId: ${a} no longer connected.`,this.wire.sendRaw(r);try{const e=await c(i,o,t);return r.payload.payload=r.payload.payload||{},r.payload.payload.result=e,this.wire.sendRaw(r)}catch(e){return r.payload.success=!1,r.payload.reason=e.message,this.wire.sendRaw(r)}}addEndpoint(e,t,n){this.endpointMap.set(n,e),t!==n&&this.latestEndpointIdByChannelId.set(t,n)}removeEndpoint(e,t){this.endpointMap.delete(t),this.latestEndpointIdByChannelId.get(e)===t&&this.latestEndpointIdByChannelId.delete(e)}checkForPreviousClientConnection(e){const t=this.latestEndpointIdByChannelId.get(e);t&&(wt.ChannelClient.closeChannelByEndpointId(t),console.warn(\"You have created a second connection to an older provider. First connection has been removed from the clientMap\"),console.warn(\"If the provider calls publish(), you may receive multiple messages.\"))}}pt.MessageReceiver=ft;var gt={};Object.defineProperty(gt,\"__esModule\",{value:!0}),gt.ProtocolManager=void 0;gt.ProtocolManager=class{constructor(e){this.ProtocolsInPreferenceOrder=e,this.DefaultClientProtocols=[\"classic\"],this.DefaultProviderProtocols=[\"classic\"],this.getClientProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultClientProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(\", \")}.`);return t},this.getProviderProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultProviderProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(\", \")}.`);return t},this.getCompatibleProtocols=(e,t)=>t.supportedProtocols.filter((t=>e.some((e=>e.type===t.type&&t.version>=e.minimumVersion&&e.version>=(t.minimumVersion??0))))).slice(0,t.maxProtocols)}};var mt={};Object.defineProperty(mt,\"__esModule\",{value:!0});class vt{static combine(e,t){return new vt(e,t)}constructor(e,t){this.primary=e,this.secondary=t}onEndpointDisconnect(e,t){this.primary.onEndpointDisconnect(e,(()=>{this.secondary.isEndpointConnected(e)||t()})),this.secondary.onEndpointDisconnect(e,(()=>{this.primary.isEndpointConnected(e)||t()}))}isValidEndpointPayload(e){return this.primary.isValidEndpointPayload(e)||this.secondary.isValidEndpointPayload(e)}async closeEndpoint(e){await this.primary.closeEndpoint(e),await this.secondary.closeEndpoint(e)}isEndpointConnected(e){return this.primary.isEndpointConnected(e)||this.secondary.isEndpointConnected(e)}async addEndpoint(e,t){this.primary.isValidEndpointPayload(t)&&await this.primary.addEndpoint(e,t),this.secondary.isValidEndpointPayload(t)&&await this.secondary.addEndpoint(e,t)}receive(e){this.primary.receive(e),this.secondary.receive(e)}send(e,t,n){return this.primary.isEndpointConnected(e)?this.primary.send(e,t,n):this.secondary.send(e,t,n)}async close(){await Promise.all([this.primary.close(),this.secondary.close()])}}mt.default=vt;var Ct,bt,It=s&&s.__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},Et=s&&s.__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)},xt=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(xe,\"__esModule\",{value:!0}),xe.ConnectionManager=void 0;const At=Ae,Pt=d,Mt=Oe,_t=Fe,Ot=Je,St=Qe,Rt=pt,Ft=gt,jt=xt(mt);class kt extends Pt.Base{static getProtocolOptionsFromStrings(e){return e.map((e=>{switch(e){case\"rtc\":return _t.RTCInfo;case\"classic\":return Mt.ClassicInfo;default:return(0,At.exhaustiveCheck)(e,[\"rtc\",\"classic\"])}}))}constructor(e){super(e),Ct.set(this,void 0),bt.set(this,void 0),this.removeChannelFromProviderMap=e=>{this.providerMap.delete(e)},this.onmessage=e=>\"process-channel-connection\"===e.action&&(this.processChannelConnection(e),!0),this.providerMap=new Map,this.protocolManager=new Ft.ProtocolManager(\"node\"===this.wire.environment.type?[\"classic\"]:[\"rtc\",\"classic\"]),It(this,Ct,new Rt.MessageReceiver(e),\"f\"),It(this,bt,new Ot.RTCICEManager(e),\"f\"),e.registerMessageHandler(this.onmessage.bind(this))}createProvider(e,t){const n=Object.assign(this.wire.environment.getDefaultChannelOptions().create,e||{}),i=this.protocolManager.getProviderProtocols(n?.protocols),r=i.map((e=>{switch(e){case\"rtc\":return new _t.RTCStrategy;case\"classic\":return new Mt.ClassicStrategy(this.wire,Et(this,Ct,\"f\"),t.channelId,t);default:return(0,At.exhaustiveCheck)(e,[\"rtc\",\"classic\"])}}));let o;if(2===r.length){const[e,t]=r;o=jt.default.combine(e,t)}else{if(1!==r.length)throw new Error(\"failed to combine strategies\");[o]=r}const s=new St.ChannelProvider(t,(()=>St.ChannelProvider.wireClose(this.wire,t.channelName)),o),a=t.channelId;return this.providerMap.set(a,{provider:s,strategy:o,supportedProtocols:kt.getProtocolOptionsFromStrings(i)}),St.ChannelProvider.setProviderRemoval(s,this.removeChannelFromProviderMap.bind(this)),s}async createClientOffer(e){const t=this.protocolManager.getClientProtocols(e?.protocols);let n;return{offer:{supportedProtocols:await Promise.all(t.map((async e=>{switch(e){case\"rtc\":{const{rtcClient:e,channels:t,offer:i,rtcConnectionId:r,channelsOpened:o}=await Et(this,bt,\"f\").startClientOffer();return n={rtcClient:e,channels:t,channelsOpened:o},{type:\"rtc\",version:_t.RTCInfo.version,payload:{offer:i,rtcConnectionId:r}}}case\"classic\":return{type:\"classic\",version:Mt.ClassicInfo.version};default:return(0,At.exhaustiveCheck)(e,[\"rtc\",\"classic\"])}}))),maxProtocols:2},rtc:n}}async createClientStrategy(e,t){t.endpointId||(t.endpointId=this.wire.environment.getNextMessageId(),Et(this,Ct,\"f\").checkForPreviousClientConnection(t.channelId));const n=t.answer??{supportedProtocols:[{type:\"classic\",version:1}]},i=(await Promise.all(n.supportedProtocols.map((async n=>\"rtc\"===n.type&&e?(await Et(this,bt,\"f\").finishClientOffer(e.rtcClient,n.payload.answer,e.channelsOpened),new _t.RTCStrategy):\"classic\"===n.type?new Mt.ClassicStrategy(this.wire,Et(this,Ct,\"f\"),t.endpointId,t):null)))).filter((e=>null!==e));let r;if(e&&!i.some((e=>e instanceof _t.RTCStrategy))&&e&&e.rtcClient.close(),i.length>=2)r=jt.default.combine(i[0],i[1]);else{if(!i.length)throw new Error(\"No compatible protocols\");[r]=i}const o={endpointIdentity:t,rtc:e};return r.addEndpoint(t.channelId,o),r}async processChannelConnection(e){const{clientIdentity:t,providerIdentity:n,ackToSender:i,payload:r,offer:o}=e.payload;t.endpointId?t.isLocalEndpointId=!1:(t.endpointId=this.wire.environment.getNextMessageId(),t.isLocalEndpointId=!0);const s=n.channelId,a=this.providerMap.get(s);if(!a)return i.payload.success=!1,i.payload.reason=`Channel \"${n.channelName}\" has been destroyed.`,this.wire.sendRaw(i);const{provider:c,strategy:d,supportedProtocols:h}=a;try{if(!(c instanceof St.ChannelProvider))throw Error(\"Cannot connect to a channel client\");const e=o??{supportedProtocols:[{type:\"classic\",version:1}],maxProtocols:1},n=this.protocolManager.getCompatibleProtocols(h,e);if(!n.length)throw new Error(\"This provider does not support any of the offered protocols.\");const s=await c.processConnection(t,r);i.payload.payload=i.payload.payload||{};let a={supportedProtocols:[],endpointPayloadPromise:Promise.resolve({endpointIdentity:t})};return a=await n.reduce((async(e,t)=>{const n=await e;if(\"rtc\"===t.type){const{answer:e,rtcClient:i,channels:r}=await Et(this,bt,\"f\").createProviderAnswer(t.payload.rtcConnectionId,t.payload.offer);n.supportedProtocols.push({type:\"rtc\",version:_t.RTCInfo.version,payload:{answer:e}}),n.endpointPayloadPromise=n.endpointPayloadPromise.then((e=>r.then((t=>({...e,rtc:{rtcClient:i,channels:t}})))))}else n.supportedProtocols.push({type:\"classic\",version:Mt.ClassicInfo.version});return n}),Promise.resolve(a)),a.endpointPayloadPromise.then((e=>d.addEndpoint(t.endpointId,e))),i.payload.payload.result=s,i.payload.payload.answer=a,this.wire.sendRaw(i)}catch(e){return i.payload.success=!1,i.payload.reason=e.message,this.wire.sendRaw(i)}}}xe.ConnectionManager=kt,Ct=new WeakMap,bt=new WeakMap;var Lt,Tt,$t,Bt=s&&s.__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},Gt=s&&s.__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)};Object.defineProperty(le,\"__esModule\",{value:!0}),le.Channel=void 0;const Wt=t,Ht=G,Nt=d,Dt=ue,Ut=xe,Vt=Qe;function zt(e){const t=Math.floor(e/10),n=Math.min(3e4,500*2**t);return new Promise((e=>{setTimeout((()=>{e(!1)}),n)}))}class Kt extends Nt.EmitterBase{constructor(e){super(e,\"channel\"),Lt.set(this,void 0),Tt.set(this,new Wt.EventEmitter),$t.set(this,new Ht.AsyncRetryableLazy((async()=>{await Promise.all([this.on(\"disconnected\",(e=>{Dt.ChannelClient.handleProviderDisconnect(e)})),this.on(\"connected\",((...e)=>{Gt(this,Tt,\"f\").emit(\"connected\",...e)}))]).catch((()=>new Error(\"error setting up channel connection listeners\")))}))),Bt(this,Lt,new Ut.ConnectionManager(e),\"f\")}async getAllChannels(){return this.wire.sendAction(\"get-all-channels\").then((({payload:e})=>e.data))}async onChannelConnect(e){await this.on(\"connected\",e)}async onChannelDisconnect(e){await this.on(\"disconnected\",e)}async safeConnect(e,t,n){const i={count:0};do{let r=()=>{};const o=new Promise((t=>{r=n=>{e===n.channelName&&t(!0)},Gt(this,Tt,\"f\").on(\"connected\",r)}));try{if(i.count>0){i.gotConnectedEvent=await Promise.race([zt(i.count),o]);const t=await this.wire.sendAction(\"connect-to-channel\",{...n,retryInfo:i});return console.log(`Successfully connected to channelName: ${e}`),t.payload.data}const t=this.wire.sendAction(\"connect-to-channel\",n);i.originalMessageId=t.messageId;return(await t).payload.data}catch(n){if(!n.message.includes(\"internal-nack\"))throw n;t&&0===i.count&&console.warn(`No channel found for channelName: ${e}. Waiting for connection...`)}finally{i.count+=1,Gt(this,Tt,\"f\").removeListener(\"connected\",r)}}while(t);throw new Error(`No channel found for channelName: ${e}.`)}async connect(e,t={}){if(await Gt(this,$t,\"f\").getValue(),!e||\"string\"!=typeof e)throw new Error(\"Please provide a channelName string to connect to a channel.\");const n={wait:!0,...this.wire.environment.getDefaultChannelOptions().connect,...t},{offer:i,rtc:r}=await Gt(this,Lt,\"f\").createClientOffer(n);let o;(this.fin.me.isFrame||this.fin.me.isView||this.fin.me.isWindow)&&(o=(await this.fin.me.getInfo()).url);const s={channelName:e,...n,offer:i,connectionUrl:o},a=await this.safeConnect(e,n.wait,s),c=await Gt(this,Lt,\"f\").createClientStrategy(r,a),d=new Dt.ChannelClient(a,(()=>Dt.ChannelClient.wireClose(this.wire,a,a.endpointId)),c);return c.onEndpointDisconnect(a.channelId,(async()=>{try{await d.sendDisconnectAction()}catch(e){console.warn(`Something went wrong during disconnect for client with uuid: ${a.uuid} / name: ${a.name} / endpointId: ${a.endpointId}.`)}finally{Dt.ChannelClient.handleProviderDisconnect(a)}})),d}async create(e,t){if(!e)throw new Error(\"Please provide a channelName to create a channel\");const{payload:{data:n}}=await this.wire.sendAction(\"create-channel\",{channelName:e}),i=Gt(this,Lt,\"f\").createProvider(t,n);return this.on(\"client-disconnected\",(t=>{t.channelName===e&&Vt.ChannelProvider.handleClientDisconnection(i,t)})),i}}le.Channel=Kt,Lt=new WeakMap,Tt=new WeakMap,$t=new WeakMap,Object.defineProperty(de,\"__esModule\",{value:!0}),de.InterAppPayload=de.InterApplicationBus=void 0;const qt=t,Jt=d,Yt=he,Zt=le,Qt=O;class Xt extends Jt.Base{constructor(e){super(e),this.events={subscriberAdded:\"subscriber-added\",subscriberRemoved:\"subscriber-removed\"},this.refCounter=new Yt.RefCounter,this.Channel=new Zt.Channel(e),this.emitter=new qt.EventEmitter,e.registerMessageHandler(this.onmessage.bind(this)),this.on=this.emitter.on.bind(this.emitter),this.removeAllListeners=this.emitter.removeAllListeners.bind(this.emitter)}async publish(e,t){await this.wire.sendAction(\"publish-message\",{topic:e,message:t,sourceWindowName:this.me.name})}async send(e,t,n){const i=(0,Qt.validateIdentity)(e);if(i)throw new Error(i);await this.wire.sendAction(\"send-message\",{destinationUuid:e.uuid,destinationWindowName:e.name,topic:t,message:n,sourceWindowName:this.me.name})}subscribe(e,t,n){const i=this.createSubscriptionKey(e.uuid,e.name||\"*\",t);return this.emitter.on(i,n),this.refCounter.actOnFirst(i,(async()=>{await this.wire.sendAction(\"subscribe\",{sourceUuid:e.uuid,sourceWindowName:e.name||\"*\",topic:t,destinationWindowName:this.me.name})}),(()=>Promise.resolve()))}unsubscribe(e,t,n){const i=e.name||\"*\",r=this.createSubscriptionKey(e.uuid,i,t);return this.emitter.removeListener(r,n),this.refCounter.actOnLast(r,(async()=>{await this.wire.sendAction(\"unsubscribe\",{sourceUuid:e.uuid,sourceWindowName:i,topic:t,destinationWindowName:this.me.name})}),(()=>new Promise((e=>e)).then((()=>{}))))}processMessage(e){const{payload:{message:t,sourceWindowName:n,sourceUuid:i,topic:r}}=e,o=[this.createSubscriptionKey(i,n,r),this.createSubscriptionKey(i,\"*\",r),this.createSubscriptionKey(\"*\",\"*\",r)],s={uuid:i,name:n};o.forEach((e=>{this.emitter.emit(e,t,s)}))}emitSubscriverEvent(e,t){const{payload:{targetName:n,uuid:i,topic:r}}=t,o={name:n,uuid:i,topic:r};this.emitter.emit(e,o)}createSubscriptionKey(e,t,n){const i=t||\"*\";if(!(e&&i&&n))throw new Error(\"Missing uuid, name, or topic string\");return function(...e){return e.map((e=>Buffer.from(`${e}`).toString(\"base64\"))).join(\"/\")}(e,i,n)}onmessage(e){const{action:t}=e;switch(t){case\"process-message\":this.processMessage(e);break;case this.events.subscriberAdded:this.emitSubscriverEvent(this.events.subscriberAdded,e);break;case this.events.subscriberRemoved:this.emitSubscriverEvent(this.events.subscriberRemoved,e)}return!0}}de.InterApplicationBus=Xt;de.InterAppPayload=class{};var en={};Object.defineProperty(en,\"__esModule\",{value:!0}),en.Clipboard=void 0;const tn=d;class nn extends tn.Base{async writeText(e){await this.wire.sendAction(\"clipboard-write-text\",e)}async readText(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-text\",{type:e});return t.data}async writeImage(e){await this.wire.sendAction(\"clipboard-write-image\",e)}async readImage(e={format:\"dataURL\"}){const{payload:t}=await this.wire.sendAction(\"clipboard-read-image\",e);return t.data}async writeHtml(e){await this.wire.sendAction(\"clipboard-write-html\",e)}async readHtml(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-html\",{type:e});return t.data}async writeRtf(e){await this.wire.sendAction(\"clipboard-write-rtf\",e)}async readRtf(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-rtf\",{type:e});return t.data}async write(e){await this.wire.sendAction(\"clipboard-write\",e)}async getAvailableFormats(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-formats\",{type:e});return t.data}}en.Clipboard=nn;var rn={},on={},sn={};Object.defineProperty(sn,\"__esModule\",{value:!0}),sn.ExternalApplication=void 0;const an=d;class cn extends an.EmitterBase{constructor(e,t){super(e,\"external-application\",t.uuid),this.identity=t}getInfo(){return this.wire.sendAction(\"get-external-application-info\",this.identity).then((({payload:e})=>e.data))}}sn.ExternalApplication=cn,Object.defineProperty(on,\"__esModule\",{value:!0}),on.ExternalApplicationModule=void 0;const dn=d,hn=sn;class ln extends dn.Base{wrap(e){return this.wire.sendAction(\"external-application-wrap\").catch((e=>{})),Promise.resolve(new hn.ExternalApplication(this.wire,{uuid:e}))}wrapSync(e){return this.wire.sendAction(\"external-application-wrap-sync\").catch((e=>{})),new hn.ExternalApplication(this.wire,{uuid:e})}}on.ExternalApplicationModule=ln,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(on,e),n(sn,e)}(rn);var un={},pn={},wn={};Object.defineProperty(wn,\"__esModule\",{value:!0}),wn._Frame=void 0;const yn=d;class fn extends yn.EmitterBase{constructor(e,t){super(e,\"frame\",t.uuid,t.name),this.identity=t}getInfo(){return this.wire.sendAction(\"get-frame-info\",this.identity).then((({payload:e})=>e.data))}getParentWindow(){return this.wire.sendAction(\"get-parent-window\",this.identity).then((({payload:e})=>e.data))}}wn._Frame=fn,Object.defineProperty(pn,\"__esModule\",{value:!0}),pn._FrameModule=void 0;const gn=d,mn=O,vn=wn;class Cn extends gn.Base{async wrap(e){this.wire.sendAction(\"frame-wrap\").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}wrapSync(e){this.wire.sendAction(\"frame-wrap-sync\").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}getCurrent(){return this.wire.sendAction(\"frame-get-current\").catch((e=>{})),Promise.resolve(new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity()))}getCurrentSync(){return this.wire.sendAction(\"frame-get-current-sync\").catch((e=>{})),new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity())}}pn._FrameModule=Cn,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(pn,e),n(wn,e)}(un);var bn={};Object.defineProperty(bn,\"__esModule\",{value:!0}),bn.GlobalHotkey=void 0;const In=d;class En extends In.EmitterBase{constructor(e){super(e,\"global-hotkey\")}async register(e,t){await this.on(e,t),await this.wire.sendAction(\"global-hotkey-register\",{hotkey:e})}async unregister(e){await this.removeAllListeners(e),await this.wire.sendAction(\"global-hotkey-unregister\",{hotkey:e})}async unregisterAll(){await Promise.all(this.eventNames().filter((e=>!(\"registered\"===e||\"unregistered\"===e))).map((e=>this.removeAllListeners(e)))),await this.wire.sendAction(\"global-hotkey-unregister-all\",{})}async isRegistered(e){const{payload:{data:t}}=await this.wire.sendAction(\"global-hotkey-is-registered\",{hotkey:e});return t}}bn.GlobalHotkey=En;var xn,An={},Pn={},Mn={},_n=s&&s.__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)};Object.defineProperty(Mn,\"__esModule\",{value:!0}),Mn.Platform=void 0;const On=d,Sn=O,Rn=new Map;class Fn extends On.EmitterBase{constructor(e,t){super(t.wire,\"application\",e.uuid),this.getClient=e=>{this.wire.sendAction(\"platform-get-client\",this.identity).catch((e=>{}));const t=e||this.identity,{uuid:n}=t;if(!Rn.has(n)){const e=_n(this,xn,\"f\").call(this,n);Rn.set(n,e)}return Rn.get(n)},xn.set(this,(async e=>{try{const t=`custom-frame-${e}`,n=await this._channel.connect(t,{wait:!1});return n.onDisconnection((()=>{Rn.delete(e)})),n}catch(t){throw Rn.delete(e),new Error(\"The targeted Platform is not currently running. Listen for application-started event for the given Uuid.\")}})),this.launchLegacyManifest=this.launchContentManifest;const n=(0,Sn.validateIdentity)(e);if(n)throw new Error(n);this._channel=t,this.identity={uuid:e.uuid},this.Layout=this.fin.Platform.Layout,this.Application=this.fin.Application.wrapSync(this.identity)}async createView(e,t,n){this.wire.sendAction(\"platform-create-view\",this.identity).catch((e=>{}));const i=await this.getClient(),r=await i.dispatch(\"create-view\",{target:t,opts:e,targetView:n});if(!r||(0,Sn.validateIdentity)(r.identity))throw new Error(`When overwriting the createView call, please return an object that has a valid 'identity' property: ${JSON.stringify(r)}`);return this.fin.View.wrapSync(r.identity)}async createWindow(e){this.wire.sendAction(\"platform-create-window\",this.identity).catch((e=>{}));const t=await this.getClient();e.reason||(e.reason=\"api-call\");const n=await t.dispatch(\"create-view-container\",e);if(!n||(0,Sn.validateIdentity)(n.identity))throw new Error(`When overwriting the createWindow call, please return an object that has a valid 'identity' property: ${JSON.stringify(n)}`);const{identity:i}=n,r=this.fin.Window.wrapSync(i);return r.name=i.name,r.uuid=i.uuid,r}async quit(){this.wire.sendAction(\"platform-quit\",this.identity).catch((e=>{}));return(await this.getClient()).dispatch(\"quit\")}async closeView(e){this.wire.sendAction(\"platform-close-view\",this.identity).catch((e=>{}));const t=await this.getClient();await t.dispatch(\"close-view\",{view:e})}async reparentView(e,t){console.warn(\"Platform.reparentView has been deprecated, please use Platform.createView\"),this.wire.sendAction(\"platform-reparent-view\",this.identity).catch((e=>{}));const n={...e,uuid:e.uuid??this.identity.uuid},i=await this.fin.View.wrap(n),r=await i.getOptions();return this.createView(r,t)}async getSnapshot(){this.wire.sendAction(\"platform-get-snapshot\",this.identity).catch((e=>{}));return(await this.getClient()).dispatch(\"get-snapshot\")}async getViewSnapshot(e){return(await this.getClient()).dispatch(\"get-view-snapshot\",{viewIdentity:e})}async applySnapshot(e,t){this.wire.sendAction(\"platform-apply-snapshot\",this.identity).catch((e=>{}));const n=\"Requested snapshot must be a valid Snapshot object, or a url or filepath to such an object.\";let i;if(\"string\"==typeof e)try{i=(await this._channel.wire.sendAction(\"get-application-manifest\",{manifestUrl:e})).payload.data}catch(e){throw new Error(`${n}: ${e}`)}else i=e;if(!i.windows)throw new Error(n);const r=await this.getClient();return await r.dispatch(\"apply-snapshot\",{snapshot:i,options:t}),this}async fetchManifest(e){return(await this.getClient()).dispatch(\"platform-fetch-manifest\",{manifestUrl:e})}async launchContentManifest(e){this.wire.sendAction(\"platform-launch-content-manifest\",this.identity).catch((()=>{}));const t=await this.getClient(),n=await this.fetchManifest(e);return t.dispatch(\"launch-into-platform\",{manifest:n,manifestUrl:e}),this}async setWindowContext(e={},t){if(this.wire.sendAction(\"platform-set-window-context\",this.identity).catch((e=>{})),!e)throw new Error(\"Please provide a serializable object or string to set the context.\");const n=await this.getClient(),{entityType:i}=t?await this.fin.System.getEntityInfo(t.uuid,t.name):this.fin.me;await n.dispatch(\"set-window-context\",{context:e,entityType:i,target:t||{uuid:this.fin.me.uuid,name:this.fin.me.name}})}async getWindowContext(e){this.wire.sendAction(\"platform-get-window-context\",this.identity).catch((e=>{}));const t=await this.getClient(),{entityType:n}=e?await this.fin.System.getEntityInfo(e.uuid,e.name):this.fin.me;return t.dispatch(\"get-window-context\",{target:e||{uuid:this.fin.me.uuid,name:this.fin.me.name},entityType:n})}async closeWindow(e,t={skipBeforeUnload:!1}){this.wire.sendAction(\"platform-close-window\",this.identity).catch((e=>{}));return(await this.getClient()).dispatch(\"close-window\",{windowId:e,options:t})}}Mn.Platform=Fn,xn=new WeakMap;var jn={},kn={},Ln={},Tn={};function $n(e){switch(e){case\"columns\":case\"grid\":case\"rows\":case\"tabs\":return!0;default:return!1}}Object.defineProperty(Tn,\"__esModule\",{value:!0}),Tn.overrideFromComposables=Tn.isValidPresetType=void 0,Tn.isValidPresetType=$n,Tn.overrideFromComposables=function(...e){return t=>e.reduceRight(((e,t)=>n=>t(e(n))),(e=>e))(t)},Tn.default={isValidPresetType:$n};var Bn={},Gn={},Wn={};Object.defineProperty(Wn,\"__esModule\",{value:!0}),Wn.ApiConsumer=void 0;Wn.ApiConsumer=class{constructor(e){this.strategy=e,this.consume=async e=>(await this.strategy.getExposedFunctions(e)).reduce(((t,n)=>({...t,[n.key]:this.strategy.createFunction(n,e)})),{})}};var Hn={},Nn={};Object.defineProperty(Nn,\"__esModule\",{value:!0}),Nn.expose=Nn.getExposedProperties=void 0;const Dn=Symbol(\"exposedProperties\");Nn.getExposedProperties=e=>e[Dn]||e.prototype[Dn]||[];Nn.expose=e=>(t,n,i)=>{t[Dn]=t[Dn]||[],t[Dn].push({key:n,descriptor:i,options:e})},Object.defineProperty(Hn,\"__esModule\",{value:!0}),Hn.ApiExposer=void 0;const Un=Nn;Hn.ApiExposer=class{constructor(e){this.strategy=e,this.exposeInstance=async(e,t)=>{const n=(0,Un.getExposedProperties)(e),i=await Promise.all(n.map((async({key:n,options:i})=>({key:n,options:await this.strategy.exposeFunction(e[n].bind(e),{key:n,options:i,meta:t})}))));await this.strategy.exposeMeta(t,i)}}};var Vn={},zn={},Kn={};Object.defineProperty(Kn,\"__esModule\",{value:!0}),Kn.ChannelsConsumer=void 0;Kn.ChannelsConsumer=class{constructor(e){this.channel=e,this.getExposedFunctions=async e=>{const{id:t}=e,{props:n}=await this.channel.dispatch(`api-meta:${t}`);return n},this.createFunction=e=>(...t)=>{const{action:n}=e.options;return this.channel.dispatch(n,{args:t})}}};var qn={};Object.defineProperty(qn,\"__esModule\",{value:!0}),qn.ChannelsExposer=void 0;qn.ChannelsExposer=class{constructor(e){this.channelProviderOrClient=e,this.exposeFunction=async(e,t)=>{const{key:n,options:i,meta:r}=t,{id:o}=r,s=`${o}.${i?.action||n}`;return await this.channelProviderOrClient.register(s,(async({args:t})=>e(...t))),{action:s}},this.exposeMeta=async({id:e},t)=>{const n=`api-meta:${e}`;await this.channelProviderOrClient.register(n,(()=>({props:t})))}}},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Kn,e),n(qn,e)}(zn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(zn,e)}(Vn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Wn,e),n(Hn,e),n(Vn,e),n(Nn,e)}(Gn);var Jn={};Object.defineProperty(Jn,\"__esModule\",{value:!0}),Jn.createRelayedDispatch=exports.relayChannelClientApi_1=Jn.relayChannelClientApi=void 0;const Yn=[\"no longer connected\",\"RTCDataChannel closed unexpectedly\",\"The client you are trying to dispatch from is disconnected from the target provider\"];exports.relayChannelClientApi_1=Jn.relayChannelClientApi=async(e,t)=>{e.register(`relay:${t}`,(({action:t,target:n,payload:i})=>e.dispatch(n,t,i))),await Promise.resolve()};Jn.createRelayedDispatch=(e,t,n,i)=>async(r,o)=>{try{return await e.dispatch(`relay:${n}`,{action:r,payload:o,target:t})}catch(e){if(s=e.message,Yn.some((e=>s.includes(e)))&&i)throw new Error(i);throw e}var s};var Zn,Qn,Xn,ei=s&&s.__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},ti=s&&s.__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)};Object.defineProperty(Bn,\"__esModule\",{value:!0}),Bn.ColumnOrRow=Bn.TabStack=Bn.LayoutNode=void 0;const ni=Gn,ii=Jn;class ri{constructor(e,t){Zn.set(this,void 0),this.isRoot=()=>ti(this,Zn,\"f\").isRoot(this.entityId),this.exists=()=>ti(this,Zn,\"f\").exists(this.entityId),this.getParent=async()=>{const e=await ti(this,Zn,\"f\").getParent(this.entityId);if(e)return ri.getEntity(e,ti(this,Zn,\"f\"))},this.createAdjacentStack=async(e,t)=>{const n=await ti(this,Zn,\"f\").createAdjacentStack(this.entityId,e,t);return ri.getEntity({entityId:n,type:\"stack\"},ti(this,Zn,\"f\"))},this.getAdjacentStacks=async e=>(await ti(this,Zn,\"f\").getAdjacentStacks({targetId:this.entityId,edge:e})).map((e=>ri.getEntity({type:\"stack\",entityId:e.entityId},ti(this,Zn,\"f\")))),ei(this,Zn,e,\"f\"),this.entityId=t}}Bn.LayoutNode=ri,Zn=new WeakMap,ri.newLayoutEntitiesClient=async(e,t,n)=>{const i=(0,ii.createRelayedDispatch)(e,n,\"layout-relay\",\"You are trying to interact with a layout component on a window that does not exist or has been destroyed.\");return new ni.ApiConsumer(new ni.ChannelsConsumer({dispatch:i})).consume({id:t})},ri.getEntity=(e,t)=>{const{entityId:n,type:i}=e;switch(i){case\"column\":case\"row\":return new si(t,n,i);case\"stack\":return new oi(t,n);default:throw new Error(`Unrecognised Layout Entity encountered ('${JSON.stringify(e)})`)}};class oi extends ri{constructor(e,t){super(e,t),Qn.set(this,void 0),this.type=\"stack\",this.getViews=()=>ti(this,Qn,\"f\").getStackViews(this.entityId),this.addView=async(e,t={index:0})=>ti(this,Qn,\"f\").addViewToStack(this.entityId,e,t),this.removeView=async e=>{await ti(this,Qn,\"f\").removeViewFromStack(this.entityId,e)},this.setActiveView=async e=>{await ti(this,Qn,\"f\").setStackActiveView(this.entityId,e)},ei(this,Qn,e,\"f\")}}Bn.TabStack=oi,Qn=new WeakMap;class si extends ri{constructor(e,t,n){super(e,t),Xn.set(this,void 0),this.getContent=async()=>(await ti(this,Xn,\"f\").getContent(this.entityId)).map((e=>ri.getEntity(e,ti(this,Xn,\"f\")))),ei(this,Xn,e,\"f\"),this.type=n}}Bn.ColumnOrRow=si,Xn=new WeakMap;var ai={};Object.defineProperty(ai,\"__esModule\",{value:!0}),ai.DEFAULT_LAYOUT_KEY=ai.LAYOUT_CONTROLLER_ID=void 0,ai.LAYOUT_CONTROLLER_ID=\"layout-entities\",ai.DEFAULT_LAYOUT_KEY=\"__default__\";var ci,di,hi,li=s&&s.__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)};Object.defineProperty(Ln,\"__esModule\",{value:!0}),Ln.Layout=void 0;const ui=G,pi=O,wi=d,yi=Tn,fi=Bn,gi=ai;class mi extends wi.Base{static getClient(e){return li(e,di,\"f\").getValue()}constructor(e,t){super(t),ci.add(this),di.set(this,new ui.Lazy((async()=>fi.LayoutNode.newLayoutEntitiesClient(await this.platform.getClient(),gi.LAYOUT_CONTROLLER_ID,this.identity)))),this.replace=async e=>{this.wire.sendAction(\"layout-replace\").catch((e=>{}));const t=await this.platform.getClient();await t.dispatch(\"replace-layout\",{target:this.identity,opts:{layout:e}})},this.replaceView=async(e,t)=>{this.wire.sendAction(\"layout-replace-view\").catch((e=>{}));const n=await this.platform.getClient();await n.dispatch(\"replace-view\",{target:this.identity,opts:{viewToReplace:e,newView:t}})},this.applyPreset=async e=>{this.wire.sendAction(\"layout-apply-preset\").catch((e=>{}));const t=await this.platform.getClient(),{presetType:n}=e;if(!n||!(0,yi.isValidPresetType)(n))throw new Error(\"Cannot apply preset layout, please include an applicable presetType property in the PresetLayoutOptions.\");await t.dispatch(\"apply-preset-layout\",{target:this.identity,opts:{presetType:n}})};const n=(0,pi.validateIdentity)(e);if(n)throw new Error(n);this.identity=e,this.platform=this.fin.Platform.wrapSync({uuid:e.uuid}),e.uuid===this.fin.me.uuid&&e.name===this.fin.me.name&&(this.init=this.fin.Platform.Layout.init)}async getConfig(){this.wire.sendAction(\"layout-get-config\").catch((e=>{}));return(await this.platform.getClient()).dispatch(\"get-frame-snapshot\",{target:this.identity})}async getCurrentViews(){this.wire.sendAction(\"layout-get-views\").catch((e=>{}));const e=await this.platform.getClient();return(await e.dispatch(\"get-layout-views\",{target:this.identity})).map((e=>this.fin.View.wrapSync(e)))}async getRootItem(){this.wire.sendAction(\"layout-get-root-item\").catch((()=>{}));const e=await li(this,di,\"f\").getValue(),t=await e.getRoot(\"layoutName\"in this.identity?this.identity:void 0);return fi.LayoutNode.getEntity(t,e)}async getStackByViewIdentity(e){this.wire.sendAction(\"layout-get-stack-by-view\").catch((()=>{}));const t=await li(this,di,\"f\").getValue(),n=await t.getStackByView(e);if(!n)throw new Error(`No stack found for view: ${e.uuid}/${e.name}`);return fi.LayoutNode.getEntity(n,t)}async addView(e,{location:t,targetView:n}={}){this.wire.sendAction(\"layout-add-view\").catch((e=>{}));const{identity:i}=await li(this,ci,\"m\",hi).call(this,\"layout-add-view\",{viewOptions:e,location:t,targetView:n});return{identity:i}}async closeView(e){this.wire.sendAction(\"layout-close-view\").catch((e=>{})),await li(this,ci,\"m\",hi).call(this,\"layout-close-view\",{viewIdentity:e})}}Ln.Layout=mi,di=new WeakMap,ci=new WeakSet,hi=async function(e,t){return(await this.platform.getClient()).dispatch(e,{target:this.identity,opts:t})};var vi,Ci,bi,Ii,Ei,xi=s&&s.__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)},Ai=s&&s.__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};Object.defineProperty(kn,\"__esModule\",{value:!0}),kn.LayoutModule=void 0;const Pi=d,Mi=Ln,_i=ai;class Oi extends Pi.Base{constructor(){super(...arguments),vi.add(this),Ci.set(this,!1),bi.set(this,null),this.init=async(e={})=>{if(this.wire.sendAction(\"layout-init\").catch((e=>{})),!this.wire.environment.layoutAllowedInContext(this.fin))throw new Error(\"Layout.init can only be called from a Window context.\");if(xi(this,Ci,\"f\"))throw new Error(\"Layout.init was already called, please use Layout.create to add additional layouts.\");\"openfin\"===this.wire.environment.type&&await this.fin.Platform.getCurrentSync().getClient(),Ai(this,Ci,!0,\"f\"),Ai(this,bi,await this.wire.environment.initLayoutManager(this.fin,this.wire,e),\"f\"),await this.wire.environment.applyLayoutSnapshot(this.fin,xi(this,bi,\"f\"),e);const t={name:this.fin.me.name,uuid:this.fin.me.uuid};if(!e.layoutManagerOverride){const e={layoutName:_i.DEFAULT_LAYOUT_KEY,...t};return xi(this,Ii,\"f\").call(this,e)}return this.wrapSync(t)},Ii.set(this,(e=>{const t=\"[Layout] You are using a deprecated property `layoutManager` - it will throw if you access it starting in v37.\",n=new Proxy({},{get(e,n){throw console.warn(`[Layout-mgr-proxy] accessing ${n.toString()}`),new Error(t)}}),i=Object.assign(this.wrapSync(e),{layoutManager:n});return new Proxy(i,{get(e,n){if(\"layoutManager\"===n)throw console.warn(`[Layout-proxy] accessing ${n.toString()}`),new Error(t);return e[n]}})})),this.getCurrentLayoutManagerSync=()=>xi(this,vi,\"m\",Ei).call(this,\"fin.Platform.Layout.getCurrentLayoutManagerSync()\"),this.create=async e=>this.wire.environment.createLayout(xi(this,vi,\"m\",Ei).call(this,\"fin.Platform.Layout.create()\"),e),this.destroy=async e=>this.wire.environment.destroyLayout(xi(this,vi,\"m\",Ei).call(this,\"fin.Platform.Layout.destroy()\"),e)}async wrap(e){return this.wire.sendAction(\"layout-wrap\").catch((e=>{})),new Mi.Layout(e,this.wire)}wrapSync(e){return this.wire.sendAction(\"layout-wrap-sync\").catch((e=>{})),new Mi.Layout(e,this.wire)}async getCurrent(){if(this.wire.sendAction(\"layout-get-current\").catch((e=>{})),\"openfin\"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error(\"You are not in a Window context. Only Windows can have a Layout.\");const{uuid:e,name:t}=this.fin.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction(\"layout-get-current-sync\").catch((e=>{})),\"openfin\"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error(\"You are not in a Window context. Only Windows can have a Layout.\");const{uuid:e,name:t}=this.fin.me;return this.wrapSync({uuid:e,name:t})}async getLayoutByViewIdentity(e){this.wire.sendAction(\"layout-get-by-view-identity\").catch((()=>{}));let t=await this.wire.environment.getViewWindowIdentity(this.fin,e);t.identity&&(t=t.identity);try{const n=this.wrapSync(t),i=await Mi.Layout.getClient(n),r=await i.getLayoutIdentityForViewOrThrow(e);return this.wrapSync(r)}catch(n){if(![\"No action registered at target for\",\"getLayoutIdentityForViewOrThrow is not a function\"].some((e=>n.message.includes(e))))throw n;if(t.uuid===t.name)throw new Error(`View identity ${JSON.stringify(e)} is not attached to any layout in provider window ${JSON.stringify(t)}.`);return this.wrapSync(t)}}}kn.LayoutModule=Oi,Ci=new WeakMap,bi=new WeakMap,Ii=new WeakMap,vi=new WeakSet,Ei=function(e){if(!xi(this,bi,\"f\"))throw new Error(`You must call init before using the API ${e}`);return xi(this,bi,\"f\")},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(kn,e),n(Ln,e)}(jn),Object.defineProperty(Pn,\"__esModule\",{value:!0}),Pn.PlatformModule=void 0;const Si=d,Ri=Mn,Fi=jn;class ji extends Si.Base{constructor(e,t){super(e),this._channel=t,this.Layout=new Fi.LayoutModule(this.wire)}async init(e){if(!fin.__internal_.isPlatform||fin.me.name!==fin.me.uuid)throw new Error(\"fin.Platform.init should only be called from a custom platform provider running in the main window of the application.\");return this.wire.environment.initPlatform(this.fin,e)}async wrap(e){return this.wire.sendAction(\"platform-wrap\").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}wrapSync(e){return this.wire.sendAction(\"platform-wrap-sync\").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}async getCurrent(){return this.wire.sendAction(\"platform-get-current\").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction(\"platform-get-current-sync\").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}start(e){return this.wire.sendAction(\"platform-start\").catch((e=>{})),new Promise((async(t,n)=>{try{const{uuid:n}=e,i=await this.fin.Application._create({...e,isPlatformController:!0});i.once(\"platform-api-ready\",(()=>t(this.wrapSync({uuid:n})))),i._run({uuid:n})}catch(e){n(e)}}))}startFromManifest(e,t){return this.wire.sendAction(\"platform-start-from-manifest\").catch((e=>{})),new Promise((async(n,i)=>{try{const i=await this.fin.Application._createFromManifest(e);i.once(\"platform-api-ready\",(()=>n(this.wrapSync({uuid:i.identity.uuid})))),i._run(t)}catch(e){i(e)}}))}}Pn.PlatformModule=ji,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Pn,e),n(Mn,e)}(An);var ki={};!function(e){Object.defineProperty(e,\"__esModule\",{value:!0}),e.getMe=e.getBaseMe=e.environmentUnsupportedMessage=void 0;const t=J(),n=un,i=ie(),r=rn;function o(e,t,n){return{...{isView:\"view\"===e,isWindow:\"window\"===e,isFrame:\"iframe\"===e,isExternal:\"external connection\"===e},uuid:t,name:n,entityType:e}}e.environmentUnsupportedMessage=\"You are not running in OpenFin.\",e.getBaseMe=o,e.getMe=function(s){const{uuid:a,name:c,entityType:d}=s.me,h={setContext(){throw new Error(e.environmentUnsupportedMessage)},addContextHandler(){throw new Error(e.environmentUnsupportedMessage)},getContextGroups(){throw new Error(e.environmentUnsupportedMessage)},joinContextGroup(){throw new Error(e.environmentUnsupportedMessage)},removeFromContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getAllClientsInContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getInfoForContextGroup(){throw new Error(e.environmentUnsupportedMessage)}},l=\"Interop API has not been instantiated. Either connection has failed or you have not declared interop in your config.\",u={setContext(){throw new Error(l)},addContextHandler(){throw new Error(l)},getContextGroups(){throw new Error(l)},joinContextGroup(){throw new Error(l)},removeFromContextGroup(){throw new Error(l)},getAllClientsInContextGroup(){throw new Error(l)},getInfoForContextGroup(){throw new Error(l)}},p={eventNames:()=>{throw new Error(e.environmentUnsupportedMessage)},emit:()=>{throw new Error(e.environmentUnsupportedMessage)},listeners:()=>{throw new Error(e.environmentUnsupportedMessage)},listenerCount:()=>{throw new Error(e.environmentUnsupportedMessage)},on:()=>{throw new Error(e.environmentUnsupportedMessage)},addListener:()=>{throw new Error(e.environmentUnsupportedMessage)},once:()=>{throw new Error(e.environmentUnsupportedMessage)},prependListener:()=>{throw new Error(e.environmentUnsupportedMessage)},prependOnceListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeAllListeners:()=>{throw new Error(e.environmentUnsupportedMessage)}};switch(d){case\"view\":return Object.assign(new t.View(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case\"window\":return Object.assign(new i._Window(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case\"iframe\":return Object.assign(new n._Frame(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case\"external connection\":return Object.assign(new r.ExternalApplication(s,{uuid:a}),o(d,a,c),{interop:u,isOpenFin:!1});default:return{...o(d,a,c),...p,interop:h,isOpenFin:!1}}}}(ki);var Li={},Ti={},$i={};Object.defineProperty($i,\"__esModule\",{value:!0}),$i.createWarningObject=$i.createUnusableObject=void 0,$i.createUnusableObject=function(e){const t=()=>{throw new Error(e)};return new Proxy({},{apply:t,construct:t,defineProperty:t,deleteProperty:t,get:t,getOwnPropertyDescriptor:t,getPrototypeOf:t,has:t,isExtensible:t,ownKeys:t,preventExtensions:t,set:t,setPrototypeOf:t})},$i.createWarningObject=function(e,t){return new Proxy(t,{get:(...t)=>(console.warn(e),Reflect.get(...t)),set:(...t)=>(console.warn(e),Reflect.set(...t)),getOwnPropertyDescriptor:(...t)=>(console.warn(e),Reflect.getOwnPropertyDescriptor(...t)),ownKeys:(...t)=>(console.warn(e),Reflect.ownKeys(...t))})};var Bi,Gi={},Wi={};var Hi={};!function(e){Object.defineProperty(e,\"__esModule\",{value:!0}),e.wrapIntentHandler=e.BROKER_ERRORS=e.generateOverrideWarning=e.generateOverrideError=e.wrapContextHandler=e.wrapInTryCatch=e.generateId=void 0;e.generateId=()=>`${Math.random()}${Date.now()}`;e.wrapInTryCatch=(e,t)=>(...n)=>{try{return e(...n)}catch(e){throw new Error((t||\"\")+e)}};e.wrapContextHandler=(e,t)=>async n=>{try{await e(n)}catch(e){throw console.error(`Error thrown by handler ${t} for context type ${n.type}: ${e}`),e}};e.generateOverrideError=(e,t)=>`You have tried to to use ${e} but ${t} has not been overridden in the Interop Broker. Please override this function. Refer to our documentation for more info.`;e.generateOverrideWarning=(e,t,n,i)=>{const{uuid:r,name:o}=n;return i?`Entity with identity: ${r}/${o} has called ${i} or ${e} but ${t} has not been overridden.`:`Entity with identity: ${r}/${o} has called ${e} but ${t} has not been overridden.`},e.BROKER_ERRORS={fireIntent:(0,e.generateOverrideError)(\"fireIntent\",\"handleFiredIntent\"),fireIntentForContext:(0,e.generateOverrideError)(\"fireIntentForContext\",\"handleFiredIntentForContext\"),getInfoForIntent:(0,e.generateOverrideError)(\"getInfoForIntent\",\"handleInfoForIntent\"),getInfoForIntentsByContext:(0,e.generateOverrideError)(\"getInfoForIntentsByContext\",\"handleInfoForIntentsByContext\"),joinSessionContextGroupWithJoinContextGroup:\"The Context Group you have tried to join is a Session Context Group. Custom Context Groups can only be defined by the Interop Broker through code or manifest configuration. Please use joinSessionContextGroup.\",fdc3Open:(0,e.generateOverrideError)(\"fdc3.open\",\"fdc3HandleOpen\"),fdc3FindInstances:(0,e.generateOverrideError)(\"fdc3.findInstances\",\"fdc3HandleFindInstances\"),fdc3GetAppMetadata:(0,e.generateOverrideError)(\"fdc3.getAppMetadata\",\"fdc3HandleGetAppMetadata\"),fdc3GetInfo:(0,e.generateOverrideError)(\"fdc3.getInfo\",\"fdc3HandleGetInfo\")};e.wrapIntentHandler=(e,t)=>async n=>{try{return e(n)}catch(e){throw console.error(`Error thrown by handler ${t}: ${e}`),e}}}(Hi);var Ni,Di,Ui={};function Vi(){if(Di)return Gi;Di=1;var e,t,n,r=s&&s.__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},o=s&&s.__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)},a=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Gi,\"__esModule\",{value:!0}),Gi.InteropBroker=void 0;const c=d,h=a(function(){if(Bi)return Wi;Bi=1,Object.defineProperty(Wi,\"__esModule\",{value:!0});const e=Cr();return Wi.default=class{constructor(e,t){this.provider=e,this.id=t,this.lastContext=void 0,this.contextGroupMap=new Map,this.clients=new Map,this.registerListeners()}registerListeners(){this.provider.register(`sessionContextGroup:getContext-${this.id}`,this.getCurrentContext.bind(this)),this.provider.register(`sessionContextGroup:setContext-${this.id}`,this.setContext.bind(this)),this.provider.register(`sessionContextGroup:handlerAdded-${this.id}`,this.handlerAdded.bind(this)),this.provider.register(`sessionContextGroup:handlerRemoved-${this.id}`,this.handlerRemoved.bind(this))}getCurrentContext(e){return e.type?this.contextGroupMap.get(e.type):this.lastContext}setContext(t,n){const{context:i}=t,r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name} not in Session Client State Map`);this.contextGroupMap.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{e.contextHandlers.get(i.type)?.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getClientState(e){return this.clients.get(e.endpointId)}async handlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(i){const e=r.contextHandlers.get(i)||[];r.contextHandlers.set(i,[...e,n]);const o=this.contextGroupMap.get(i);o&&await this.provider.dispatch(t,n,o)}else{r.globalHandler=n;const e=[...this.contextGroupMap.keys()].map((async e=>{const i=this.contextGroupMap.get(e);i&&await this.provider.dispatch(t,n,i)}));await Promise.all(e)}}handlerRemoved(e,t){const{handlerId:n}=e,i=this.clients.get(t.endpointId);i?(Array.from(i.contextHandlers).forEach((([,e])=>{const t=e.indexOf(n);t>-1&&e.splice(t,1)})),i.globalHandler===n&&(i.globalHandler=void 0)):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={contextHandlers:new Map,clientIdentity:e,globalHandler:void 0};this.clients.set(e.endpointId,t)}}onDisconnection(e){this.clients.delete(e.endpointId)}},Wi}()),l=Hi,u=a(i),p=function(){if(Ni)return Ui;Ni=1,Object.defineProperty(Ui,\"__esModule\",{value:!0}),Ui.PrivateChannelProvider=void 0;const e=Vi();return Ui.PrivateChannelProvider=class t{constructor(e,t){this.provider=e,this.id=t,this.clients=new Map,this.registerListeners(),this.contextByContextType=new Map,this.lastContext=void 0,this.provider.onConnection((e=>this.registerNewClient(e))),this.provider.onDisconnection((async e=>{const{endpointId:t}=e;this.clients.has(t)&&await this.handleClientDisconnecting(e),0===(await this.provider.getAllClientInfo()).length&&this.provider.destroy()}))}getClientState(e){return this.clients.get(e.endpointId)}registerListeners(){this.provider.register(\"broadcast\",this.broadcast.bind(this)),this.provider.register(\"getCurrentContext\",this.getCurrentContext.bind(this)),this.provider.register(\"contextHandlerAdded\",this.contextHandlerAdded.bind(this)),this.provider.register(\"contextHandlerRemoved\",this.contextHandlerRemoved.bind(this)),this.provider.register(\"nonStandardHandlerRemoved\",this.nonStandardHandlerRemoved.bind(this)),this.provider.register(\"onAddContextHandlerAdded\",this.onAddContextHandlerAdded.bind(this)),this.provider.register(\"onDisconnectHandlerAdded\",this.onDisconnectHandlerAdded.bind(this)),this.provider.register(\"onUnsubscribeHandlerAdded\",this.onUnsubscribeHandlerAdded.bind(this)),this.provider.register(\"clientDisconnecting\",((e,t)=>{this.handleClientDisconnecting(t)}))}broadcast(t,n){const{context:i}=t;if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name}, tried to call broadcast, is not connected to this Private Channel`);const r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to broadcast - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);this.contextByContextType.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{const t=e.handlerIdsByContextTypes.get(i.type);t&&t.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getCurrentContext(e,t){const{contextType:n}=e;if(!this.getClientState(t))throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call getCurrentContext, is not connected to this Private Channel`);if(void 0!==n){return this.contextByContextType.get(n)||null}return this.lastContext?this.lastContext:null}contextHandlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call addContextListener, is not connected to this Private Channel`);if(i){const e=r.handlerIdsByContextTypes.get(i)||[];r.handlerIdsByContextTypes.set(i,[...e,n])}else r.globalHandler=n;Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&e.onAddContextListenerHandlerId&&this.provider.dispatch(e.clientIdentity,e.onAddContextListenerHandlerId,i)}))}async contextHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);if(i){let e;if(i.globalHandler===n)i.globalHandler=void 0;else for(const[t,r]of i.handlerIdsByContextTypes){const i=r.indexOf(n);i>-1&&(r.splice(i,1),e=t)}const r=(await this.getConnectedClients()).map((async n=>{const{clientIdentity:i,clientIdentity:{endpointId:r},onUnsubscribeHandlerId:o}=n;r!==t.endpointId&&o&&await this.provider.dispatch(i,o,e)}));try{await Promise.all(r)}catch(e){throw console.error(`Problem when attempting to dispatch to onUnsubscribeHandlers. Error: ${e} Removing Client: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}`),new Error(e)}}else console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}.`)}nonStandardHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);i?i.onDisconnectHandlerId===n?i.onDisconnectHandlerId=void 0:i.onAddContextListenerHandlerId===n?i.onAddContextListenerHandlerId=void 0:i.onUnsubscribeHandlerId===n&&(i.onUnsubscribeHandlerId=void 0):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}onAddContextHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onAddContextListener, is not connected to this Private Channel`);n.onAddContextListenerHandlerId=i,Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&Array.from(e.handlerIdsByContextTypes.keys()).forEach((e=>{this.provider.dispatch(t,i,e)}))}))}onDisconnectHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onDisconnect, is not connected to this Private Channel`);n.onDisconnectHandlerId=i}onUnsubscribeHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onUnsubscribe, is not connected to this Private Channel`);n.onUnsubscribeHandlerId=i}removeClient(e){const t=this.getClientState(e);if(!t)throw new Error(`Client with Identity: ${e.uuid} ${e.name}, tried to call disconnect, is not connected to this Private Channel`);t.handlerIdsByContextTypes.clear(),this.clients.delete(e.endpointId)}async fireOnDisconnectForOtherClients(e){const{endpointId:t}=e,n=(await this.getConnectedClients()).map((async e=>{const{clientIdentity:{endpointId:n},onDisconnectHandlerId:i}=e;n!==t&&i&&await this.provider.dispatch(e.clientIdentity,i)}));try{await Promise.all(n)}catch(t){throw console.error(`Problem when attempting to dispatch to onDisconnectHandlers. Error: ${t} Disconnecting Client: uuid: ${e.uuid}. name: ${e.name}. endpointId: ${e.endpointId}`),new Error(t)}}async unsubscribeAll(e){const{endpointId:t}=e,n=this.clients.get(t);if(n){const t=Array.from(n.handlerIdsByContextTypes.values()).flat(),i=n.globalHandler;if(t.length>0){const n=t.map((async t=>this.contextHandlerRemoved({handlerId:t},e)));try{await Promise.all(n)}catch(e){console.error(e.message)}}if(i)try{await this.contextHandlerRemoved({handlerId:i},e)}catch(e){console.error(e.message)}}}async handleClientDisconnecting(e){await this.unsubscribeAll(e),this.removeClient(e),await this.fireOnDisconnectForOtherClients(e)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={clientIdentity:e,handlerIdsByContextTypes:new Map,globalHandler:void 0,onAddContextListenerHandlerId:void 0,onUnsubscribeHandlerId:void 0,onDisconnectHandlerId:void 0};this.clients.set(e.endpointId,t)}}async getConnectedClients(){const e=await this.provider.getAllClientInfo();return Array.from(this.clients.values()).filter((t=>{const{uuid:n,name:i}=t.clientIdentity;return e.some((e=>i===e.name&&n===e.uuid))}))}static init(e,n){return new t(e,n)}},Ui}(),w=G,y=[{id:\"green\",displayMetadata:{color:\"#00CC88\",name:\"green\"}},{id:\"purple\",displayMetadata:{color:\"#8C61FF\",name:\"purple\"}},{id:\"orange\",displayMetadata:{color:\"#FF8C4C\",name:\"orange\"}},{id:\"red\",displayMetadata:{color:\"#FF5E60\",name:\"red\"}},{id:\"pink\",displayMetadata:{color:\"#FF8FB8\",name:\"pink\"}},{id:\"yellow\",displayMetadata:{color:\"#E9FF8F\",name:\"yellow\"}}];let f=class i extends c.Base{constructor(i,s,a){super(i),e.set(this,void 0),t.set(this,void 0),n.set(this,void 0),this.getProvider=()=>o(this,n,\"f\").getValue(),this.interopClients=new Map,this.contextGroupsById=new Map,r(this,t,a.contextGroups??[...y],\"f\"),r(this,e,a.fdc3Info,\"f\"),a?.logging&&(this.logging=a.logging),this.intentClientMap=new Map,this.lastContextMap=new Map,this.sessionContextGroupMap=new Map,r(this,n,new w.Lazy(s),\"f\"),this.setContextGroupMap(),this.setupChannelProvider()}static createClosedConstructor(...e){return class extends i{constructor(...t){if(t.length){const[n,i,r]=t;if(r&&\"object\"==typeof r&&!(0,u.default)(r,e[2]))return console.warn(\"You have modified the parameters of the InteropOverride constructor. This behavior is deprecated and will be removed in a future version. You can modify these options in your manifest. Please consult our Interop docs for guidance on migrating to the new override scheme.\"),void super(e[0],e[1],r);console.warn(\"You are attempting to pass arguments to the InteropOverride constructor. This is not necessary, and these passed arguments will be ignored. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.\")}super(...e)}}}setContext({context:e},t){this.wire.sendAction(\"interop-broker-set-context\").catch((e=>{}));const n=this.getClientState(t);if(!n||!n.contextGroupId)throw n?new Error(\"You must join a context group before you can set context.\"):new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);{const{contextGroupId:t}=n;this.setContextForGroup({context:e},t)}}setContextForGroup({context:e},t){this.wire.sendAction(\"interop-broker-set-context-for-group\").catch((e=>{}));const n=this.contextGroupsById.get(t);if(!n)throw new Error(`Unable to set context for context group that isn't in the context group mapping: ${t}.`);const r=i.checkContextIntegrity(e);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(e)}`);const o=e.type;n.set(o,e),this.lastContextMap.set(t,o);Array.from(this.interopClients.values()).filter((e=>e.contextGroupId===t)).forEach((t=>{for(const[,n]of t.contextHandlers)i.isContextTypeCompatible(o,n.contextType)&&this.invokeContextHandler(t.clientIdentity,n.handlerId,e)}))}getCurrentContext(e,t){this.wire.sendAction(\"interop-broker-get-current-context\").catch((e=>{}));const n=this.getClientState(t);if(!n?.contextGroupId)throw new Error(\"You must be a member of a context group to call getCurrentContext\");const{contextGroupId:i}=n,r=this.contextGroupsById.get(i),o=this.lastContextMap.get(i),s=e?.contextType??o;return r&&s?r.get(s):void 0}async joinContextGroup({contextGroupId:e,target:t},n){if(this.wire.sendAction(\"interop-broker-join-context-group\").catch((e=>{})),this.sessionContextGroupMap.has(e))throw new Error(l.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup);if(t){i.hasEndpointId(t)&&await this.addClientToContextGroup({contextGroupId:e},t);try{const n=this.channel.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name));if(!n.length)throw new Error(`Given Identity ${t.uuid} ${t.name} is not connected to the Interop Broker.`);n.length>1&&console.warn(`More than one connection found for identity ${t.uuid} ${t.name}`);const i=[];for(const t of n)i.push(this.addClientToContextGroup({contextGroupId:e},t));await Promise.all(i)}catch(e){throw new Error(e)}}else await this.addClientToContextGroup({contextGroupId:e},n)}async addClientToContextGroup({contextGroupId:e},t){this.wire.sendAction(\"interop-broker-add-client-to-context-group\").catch((e=>{}));const n=this.getClientState(t);if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(!this.getContextGroups().find((t=>t.id===e)))throw new Error(`Attempting to join a context group that does not exist: ${e}. You may only join existing context groups.`);if(n.contextGroupId!==e){n.contextGroupId=e,await this.setCurrentContextGroupInClientOptions(t,e);const i=this.contextGroupsById.get(e);for(const[,e]of n.contextHandlers){const{contextType:n,handlerId:r}=e;if(void 0===n)i.forEach(((e,n)=>{this.invokeContextHandler(t,r,e)}));else if(i.has(n)){const e=i.get(n);e&&this.invokeContextHandler(t,r,e)}}}}async removeFromContextGroup({target:e},t){if(this.wire.sendAction(\"interop-broker-remove-from-context-group\").catch((e=>{})),e){i.hasEndpointId(e)&&await this.removeClientFromContextGroup(e);try{const t=this.channel.connections.filter((t=>t.uuid===e.uuid&&t.name===e.name));if(!t.length)throw new Error(`No connection found for given Identity ${e.uuid} ${e.name}`);t.length>1&&console.warn(`More than one connection found for identity ${e.uuid} ${e.name}`);const n=[];for(const e of t)n.push(this.removeClientFromContextGroup(e));await Promise.all(n)}catch(e){throw new Error(e)}}else await this.removeClientFromContextGroup(t)}async removeClientFromContextGroup(e){this.wire.sendAction(\"interop-broker-remove-client-from-context-group\").catch((e=>{}));const t=this.getClientState(e);t&&(t.contextGroupId=void 0),await this.setCurrentContextGroupInClientOptions(e,null)}getContextGroups(){return this.wire.sendAction(\"interop-broker-get-context-groups\").catch((e=>{})),o(this,t,\"f\").map((e=>({...e})))}getInfoForContextGroup({contextGroupId:e}){return this.wire.sendAction(\"interop-broker-get-info-for-context-group\").catch((e=>{})),this.getContextGroups().find((t=>t.id===e))}getAllClientsInContextGroup({contextGroupId:e}){this.wire.sendAction(\"interop-broker-get-all-clients-in-context-group\").catch((e=>{}));return Array.from(this.interopClients.values()).filter((t=>t.contextGroupId===e)).map((e=>e.clientIdentity))}async handleFiredIntent(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.raiseIntent\",\"InteropBroker.handleFiredIntent\",t,\"interopClient.fireIntent\");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntent)}async setIntentTarget(e,t){this.wire.sendAction(\"interop-broker-set-intent-target\").catch((e=>{}));const n=this.intentClientMap.get(t.name),i=`intent-handler-${e.name}`;if(n){const t=n.get(i);if(t){if(t.pendingIntents.push(e),t.clientIdentity&&t.isReady){const{clientIdentity:e,pendingIntents:n}=t;try{const r=n[n.length-1];await this.invokeIntentHandler(e,i,r),t.pendingIntents=[]}catch(n){console.error(`Error invoking intent handler for client ${e.uuid}/${e.name}/${e.endpointId}`),t.isReady=!1}}}else n.set(i,{isReady:!1,pendingIntents:[e]})}else{this.intentClientMap.set(t.name,new Map);const n=this.intentClientMap.get(t.name);n&&n.set(i,{isReady:!1,pendingIntents:[e]})}}async handleInfoForIntent(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.findIntent\",\"InteropBroker.handleInfoForIntent\",t,\"interopClient.getInfoForIntent\");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntent)}async handleInfoForIntentsByContext(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.findIntentsByContext\",\"InteropBroker.handleInfoForIntentsByContext\",t,\"interopClient.getInfoForIntentsByContext\");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntentsByContext)}async handleFiredIntentForContext(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.raiseIntentForContext\",\"InteropBroker.handleFiredIntentForContext\",t,\"interopClient.fireIntentForContext\");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntentForContext)}async clientDisconnected(e){}async fdc3HandleOpen({app:e,context:t},n){const i=(0,l.generateOverrideWarning)(\"fdc3.open\",\"InteropBroker.fdc3HandleOpen\",n);throw console.warn(i),new Error(l.BROKER_ERRORS.fdc3Open)}async fdc3HandleFindInstances(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.open\",\"InteropBroker.fdc3HandleFindInstances\",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3FindInstances)}async fdc3HandleGetAppMetadata(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.getAppMetadata\",\"InteropBroker.fdc3HandleGetAppMetadata\",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3GetAppMetadata)}async invokeContextHandler(e,t,n){const i=await this.getProvider();try{await i.dispatch(e,t,n)}catch(i){console.error(`Error invoking context handler ${t} for context type ${n.type} in client ${e.uuid}/${e.name}/${e.endpointId}`,i)}}async invokeIntentHandler(e,t,n){const i=await this.getProvider();await i.dispatch(e,t,n)}async fdc3HandleGetInfo(t,n){const{fdc3Version:i}=t;return{fdc3Version:i,...o(this,e,\"f\"),optionalFeatures:{OriginatingAppMetadata:!1,UserChannelMembershipAPIs:!0},appMetadata:{appId:\"\",instanceId:\"\"}}}async getAllClientInfo(){return(await this.getProvider()).getAllClientInfo()}decorateSnapshot(e){return{...e,interopSnapshotDetails:{contextGroupStates:this.getContextGroupStates()}}}applySnapshot(e,t){const n=e?.interopSnapshotDetails?.contextGroupStates;n&&(t?.closeExistingWindows||this.updateExistingClients(n),this.rehydrateContextGroupStates(n))}updateExistingClients(e){this.interopClients.forEach((t=>{const{clientIdentity:n,contextGroupId:r,contextHandlers:o}=t;if(r){const t=e[r];for(const[,e]of Object.entries(t))o.forEach((t=>{const{handlerId:r,contextType:o}=t;i.isContextTypeCompatible(e.type,o)&&this.invokeContextHandler(n,r,e)}))}}))}getContextGroupStates(){return i.toObject(this.contextGroupsById)}rehydrateContextGroupStates(e){const t=Object.entries(e);for(const[e,n]of t){const t=Object.entries(n);for(const[n,i]of t)if(this.contextGroupsById.has(e)){this.contextGroupsById.get(e).set(n,i)}else console.warn(`Attempting to set a context group that isn't in the context group mapping. Skipping context group rehydration for: ${e}`)}}contextHandlerRegistered({contextType:e,handlerId:t},n){const i={contextType:e,handlerId:t},r=this.getClientState(n);if(r?.contextHandlers.set(t,i),r&&r.contextGroupId){const{contextGroupId:i}=r,o=this.contextGroupsById.get(i);if(void 0===e)o.forEach(((e,i)=>{this.invokeContextHandler(n,t,e)}));else if(o.has(e)){const i=o.get(e);i&&this.invokeContextHandler(n,t,i)}}}async intentHandlerRegistered(e,t){const{handlerId:n}=e,i=this.intentClientMap.get(t.name),r=i?.get(n);if(i)if(r){const{pendingIntents:e}=r;r.clientIdentity=t,r.isReady=!0;try{if(e.length>0){const i=e[e.length-1];await this.invokeIntentHandler(t,n,i),r.pendingIntents=[]}}catch(e){console.error(`Error invoking intent handler: ${n} for client ${t.uuid}/${t.name}/${t.endpointId}`)}}else i.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t});else{this.intentClientMap.set(t.name,new Map);const e=this.intentClientMap.get(t.name);e&&e.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t})}}removeContextHandler({handlerId:e},t){const n=this.getClientState(t);n&&n.contextHandlers.delete(e)}handleJoinSessionContextGroup({sessionContextGroupId:e},t){try{if(!e)throw new Error(\"Failed to join session context group: must specify group id.\");const n=this.sessionContextGroupMap.get(e);if(n)n.registerNewClient(t);else{const n=new h.default(this.channel,e);n.registerNewClient(t),this.sessionContextGroupMap.set(e,n)}return{hasConflict:this.contextGroupsById.has(e)}}catch(e){throw new Error(e)}}getClientState(e){return this.interopClients.get(e.endpointId)}static toObject(e){const t=Object.fromEntries(e),n={};return Object.entries(t).forEach((([e,t])=>{const i=Object.fromEntries(t);n[e]=i})),n}static checkContextIntegrity(e){if(!e)return{isValid:!1,reason:\"No context supplied\"};if(\"object\"!=typeof e)return{isValid:!1,reason:\"Context must be an Object\"};if(!e.type)return{isValid:!1,reason:\"Context must have a type property\"};if(e.id&&\"object\"!=typeof e.id)return{isValid:!1,reason:\"Context id must be an Object populated with key-value identifiers (if set)\"};if(e.id){const{id:t}=e,n=Object.keys(t);let i=!1;if(!n.length)return{isValid:!1,reason:\"Context id must have at least one key-value identifier\"};if(n.forEach((e=>{\"string\"==typeof e&&\"string\"==typeof t[e]||(i=!0)})),i)return{isValid:!1,reason:\"Context id key-value identifiers must be of type string\"}}return e.name&&\"string\"!=typeof e.name?{isValid:!1,reason:\"Context name must be of string type (if set)\"}:{isValid:!0}}static hasEndpointId(e){return void 0!==e.endpointId}static isContextTypeCompatible(e,t){return void 0===t||e===t}setContextGroupMap(){for(const e of this.getContextGroups())this.contextGroupsById.set(e.id,new Map)}async setCurrentContextGroupInClientOptions(e,t){try{const n=await this.fin.System.getEntityInfo(e.uuid,e.name);let i;\"view\"===n.entityType?i=await this.fin.View.wrap(e):\"window\"===n.entityType&&(i=await this.fin.Window.wrap(e)),i&&await i.updateOptions({interop:{currentContextGroup:t}})}catch(e){}}async setupChannelProvider(){try{const e=await this.getProvider();this.channel=e,this.wireChannel(e)}catch(e){throw new Error(`Error setting up Interop Broker Channel Provider: ${e}`)}}wireChannel(e){e.onConnection((async(e,t)=>{if(!await this.isConnectionAuthorized(e,t))throw new Error(`Connection not authorized for ${e.uuid}, ${e.name}`);if(!e.endpointId)throw new Error(\"Version too old to be compatible with Interop. Please upgrade your runtime to a more recent version.\");const n={contextGroupId:void 0,contextHandlers:new Map,clientIdentity:e};t?.currentContextGroup&&this.contextGroupsById.has(t.currentContextGroup)&&(n.contextGroupId=t?.currentContextGroup),this.interopClients.set(e.endpointId,n)})),e.onDisconnection((e=>{this.interopClients.delete(e.endpointId);const t=this.intentClientMap.get(e.name);t&&e.uuid===this.fin.me.uuid&&t.forEach((e=>{e.isReady=!1})),this.sessionContextGroupMap.forEach((t=>{t.onDisconnection(e)})),this.clientDisconnected(e)})),e.beforeAction((async(e,t,n)=>{if(!await this.isActionAuthorized(e,t,n))throw new Error(`Action (${e}) not authorized for ${n.uuid}, ${n.name}`);this.logging?.beforeAction?.enabled&&console.log(e,t,n)})),e.afterAction(((e,t,n)=>{this.logging?.afterAction?.enabled&&console.log(e,t,n)})),e.register(\"setContext\",this.setContext.bind(this)),e.register(\"fireIntent\",this.handleFiredIntent.bind(this)),e.register(\"getCurrentContext\",this.getCurrentContext.bind(this)),e.register(\"getInfoForIntent\",this.handleInfoForIntent.bind(this)),e.register(\"getInfoForIntentsByContext\",this.handleInfoForIntentsByContext.bind(this)),e.register(\"fireIntentForContext\",this.handleFiredIntentForContext.bind(this)),e.register(\"getContextGroups\",this.getContextGroups.bind(this)),e.register(\"joinContextGroup\",this.joinContextGroup.bind(this)),e.register(\"removeFromContextGroup\",this.removeFromContextGroup.bind(this)),e.register(\"getAllClientsInContextGroup\",this.getAllClientsInContextGroup.bind(this)),e.register(\"getInfoForContextGroup\",this.getInfoForContextGroup.bind(this)),e.register(\"contextHandlerRegistered\",this.contextHandlerRegistered.bind(this)),e.register(\"intentHandlerRegistered\",this.intentHandlerRegistered.bind(this)),e.register(\"removeContextHandler\",this.removeContextHandler.bind(this)),e.register(\"sessionContextGroup:createIfNeeded\",this.handleJoinSessionContextGroup.bind(this)),e.register(\"fdc3Open\",this.fdc3HandleOpen.bind(this)),e.register(\"fdc3v2FindIntentsByContext\",this.handleInfoForIntentsByContext.bind(this)),e.register(\"fdc3FindInstances\",this.fdc3HandleFindInstances.bind(this)),e.register(\"fdc3GetAppMetadata\",this.fdc3HandleGetAppMetadata.bind(this)),e.register(\"fdc3v2GetInfo\",(async(e,t)=>this.fdc3HandleGetInfo.bind(this)(e,t))),e.register(\"createPrivateChannelProvider\",(async e=>{const{channelId:t}=e,n=await this.fin.InterApplicationBus.Channel.create(t);p.PrivateChannelProvider.init(n,t)}))}isConnectionAuthorized(e,t){return this.wire.sendAction(\"interop-broker-is-connection-authorized\").catch((e=>{})),Promise.resolve(!0)}isActionAuthorized(e,t,n){return this.wire.sendAction(\"interop-broker-is-action-authorized\").catch((e=>{})),Promise.resolve(!0)}};return Gi.InteropBroker=f,e=new WeakMap,t=new WeakMap,n=new WeakMap,Gi}var zi,Ki={},qi={},Ji=s&&s.__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},Yi=s&&s.__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)};Object.defineProperty(qi,\"__esModule\",{value:!0});const Zi=d,Qi=Hi;class Xi extends Zi.Base{constructor(e,t,n){super(e),zi.set(this,void 0),this.id=n,Ji(this,zi,t,\"f\")}async setContext(e){this.wire.sendAction(\"interop-session-context-group-set-context\").catch((e=>{}));return(await Yi(this,zi,\"f\")).dispatch(`sessionContextGroup:setContext-${this.id}`,{sessionContextGroupId:this.id,context:e})}async getCurrentContext(e){this.wire.sendAction(\"interop-session-context-group-get-context\").catch((e=>{}));return(await Yi(this,zi,\"f\")).dispatch(`sessionContextGroup:getContext-${this.id}`,{sessionContextGroupId:this.id,type:e})}async addContextHandler(e,t){if(this.wire.sendAction(\"interop-session-context-group-add-handler\").catch((e=>{})),\"function\"!=typeof e)throw new Error(\"Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.\");const n=await Yi(this,zi,\"f\");let i;return i=t?`sessionContextHandler:invoke-${this.id}-${t}-${(0,Qi.generateId)()}`:`sessionContextHandler:invoke-${this.id}`,n.register(i,(0,Qi.wrapContextHandler)(e,i)),await n.dispatch(`sessionContextGroup:handlerAdded-${this.id}`,{handlerId:i,contextType:t}),{unsubscribe:await this.createUnsubscribeCb(i)}}async createUnsubscribeCb(e){const t=await Yi(this,zi,\"f\");return async()=>{t.remove(e),await t.dispatch(`sessionContextGroup:handlerRemoved-${this.id}`,{handlerId:e})}}getUserInstance(){return{id:this.id,setContext:(0,Qi.wrapInTryCatch)(this.setContext.bind(this),\"Failed to set context: \"),getCurrentContext:(0,Qi.wrapInTryCatch)(this.getCurrentContext.bind(this),\"Failed to get context: \"),addContextHandler:(0,Qi.wrapInTryCatch)(this.addContextHandler.bind(this),\"Failed to add context handler: \")}}}qi.default=Xi,zi=new WeakMap;var er={},tr={},nr={},ir={},rr=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),or=s&&s.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,\"default\",{enumerable:!0,value:t})}:function(e,t){e.default=t}),sr=s&&s.__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)&&rr(t,e,n);return or(t,e),t};Object.defineProperty(ir,\"__esModule\",{value:!0}),ir.PrivateChannelClient=void 0;const ar=sr(Hi);var cr,dr;function hr(){if(cr)return tr;cr=1;var e,t=s&&s.__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)},n=s&&s.__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},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(tr,\"__esModule\",{value:!0}),tr.FDC3ModuleBase=void 0;const o=nr,a=Hi,c=wr(),d=r(i);return tr.FDC3ModuleBase=class{get client(){return t(this,e,\"f\").call(this)}get fin(){return this.wire.getFin()}constructor(t,i){this.wire=i,e.set(this,void 0),n(this,e,t,\"f\")}async broadcast(e){return this.wire.sendAction(\"fdc3-broadcast\").catch((e=>{})),this.client.setContext(e)}async _open(e,t){this.wire.sendAction(\"fdc3-open\").catch((e=>{}));try{return await c.InteropClient.ferryFdc3Call(this.client,\"fdc3Open\",{app:e,context:t})}catch(e){const t=e.message===a.BROKER_ERRORS.fdc3Open?\"ResolverUnavailable\":e.message;throw new Error(t)}}async _getChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:\"system\",...(0,o.getUnsupportedChannelApis)()})))}async getOrCreateChannel(e){this.wire.sendAction(\"fdc3-get-or-create-channel\").catch((e=>{}));const t=(await this._getChannels()).find((t=>t.id===e));if(t)return{...t,type:\"system\",...(0,o.getUnsupportedChannelApis)()};try{const t=await this.client.joinSessionContextGroup(e);return(0,o.buildAppChannelObject)(t)}catch(e){throw console.error(e.message),new Error(o.ChannelError.CreationFailed)}}async getSystemChannels(){return this.wire.sendAction(\"fdc3-get-system-channels\").catch((e=>{})),this._getChannels()}async joinChannel(e){this.wire.sendAction(\"fdc3-join-channel\").catch((e=>{}));try{return await this.client.joinContextGroup(e)}catch(e){if(e.message===a.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup?console.error(\"The Channel you have tried to join is an App Channel. Custom Channels can only be defined by the Interop Broker through code or manifest configuration. Please use getOrCreateChannel.\"):console.error(e.message),e.message.startsWith(\"Attempting to join a context group that does not exist\"))throw new Error(o.ChannelError.NoChannelFound);throw new Error(o.ChannelError.AccessDenied)}}async getCurrentChannel(){this.wire.sendAction(\"fdc3-get-current-channel\").catch((e=>{}));const e=await this.getCurrentContextGroupInfo();return e?this.buildChannelObject(e):null}async leaveCurrentChannel(){return this.wire.sendAction(\"fdc3-leave-current-channel\").catch((e=>{})),this.client.removeFromContextGroup()}async getCurrentContextGroupInfo(){const e=await this.client.getContextGroups(),t=e.map((async e=>this.client.getAllClientsInContextGroup(e.id))),n=(await Promise.all(t)).findIndex((e=>e.some((e=>{const{uuid:t,name:n}=e;return this.wire.me.uuid===t&&this.wire.me.name===n}))));return e[n]}async buildChannelObject(e){return{...e,type:\"system\",addContextListener:(...[e,t])=>{let n,i;\"function\"==typeof e?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),n=e):(n=t,\"string\"==typeof e&&(i=e));const r=(async()=>{let e=!0;const t=await this.client.getCurrentContext(i);return this.client.addContextHandler(((i,r)=>{if(!e||(e=!1,!(0,d.default)(t,i)))return n(i,r)}),i)})();return{...r,unsubscribe:()=>r.then((e=>e.unsubscribe()))}},broadcast:this.broadcast.bind(this),getCurrentContext:async e=>{const t=await this.client.getCurrentContext(e);return void 0===t?null:t}}}},e=new WeakMap,tr}ir.PrivateChannelClient=class{constructor(e,t){this.id=t,this.client=e,this.listeners=new Map}async broadcast(e){return this.client.dispatch(\"broadcast\",{context:e})}async getCurrentContext(e){return this.client.dispatch(\"getCurrentContext\",{contextType:e})}async addContextListener(e,t){if(\"function\"!=typeof t)throw new Error(\"Non-function argument passed to the second parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.\");let n;n=e?`contextHandler:invoke-${this.id}-${e}-${ar.generateId()}`:`contextHandler:invoke-${this.id}-${ar.generateId()}`,this.client.register(n,ar.wrapContextHandler(t,n));const i={unsubscribe:await this.createContextUnsubscribeCb(n)};return this.listeners.set(n,i),await this.client.dispatch(\"contextHandlerAdded\",{handlerId:n,contextType:e}),i}createNonStandardUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch(\"nonStandardHandlerRemoved\",{handlerId:e})}}createContextUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch(\"contextHandlerRemoved\",{handlerId:e})}}onAddContextListener(e){const t=`onContextHandlerAdded:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch(\"onAddContextHandlerAdded\",{handlerId:t}),n}onDisconnect(e){const t=`onDisconnect:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch(\"onDisconnectHandlerAdded\",{handlerId:t}),n}onUnsubscribe(e){const t=`onUnsubscribe:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch(\"onUnsubscribeHandlerAdded\",{handlerId:t}),n}async cleanUpAllSubs(){Array.from(this.listeners.keys()).forEach((e=>{this.client.remove(e),this.listeners.delete(e)}))}async disconnect(){try{await this.client.dispatch(\"clientDisconnecting\"),await this.cleanUpAllSubs(),await this.client.disconnect()}catch(e){throw new Error(e.message)}}},function(e){var t=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,\"__esModule\",{value:!0}),e.getIntentResolution=e.isChannel=e.isContext=e.connectPrivateChannel=e.buildAppChannelObject=e.buildPrivateChannelObject=e.ChannelError=e.ResultError=e.UnsupportedChannelApiError=e.getUnsupportedChannelApis=void 0;const n=Hi,r=ir,o=t(i);e.getUnsupportedChannelApis=e=>({addContextListener:()=>{throw new a(\"Channel.addContextListener\",e)},broadcast:()=>{throw new a(\"Channel.broadcast\",e)},getCurrentContext:()=>{throw new a(\"Channel.getCurrentContext\",e)}});class a extends Error{constructor(e,t=\"System\"){super(e),this.message=`Calling ${e} on an instance of a ${t} Channel returned by fdc3.get${t}Channels is not supported. If you would like to use a ${t} Channel, please use fdc3.joinChannel, fdc3.addContextListener, and fdc3.broadcast instead.`}}var c,d;e.UnsupportedChannelApiError=a,function(e){e.NoResultReturned=\"NoResultReturned\",e.IntentHandlerRejected=\"IntentHandlerRejected\"}(c=e.ResultError||(e.ResultError={})),(d=e.ChannelError||(e.ChannelError={})).NoChannelFound=\"NoChannelFound\",d.AccessDenied=\"AccessDenied\",d.CreationFailed=\"CreationFailed\";e.buildPrivateChannelObject=e=>{let t=!1;const n=()=>{if(t)throw new Error(\"Private Channel Client has been disconnected from the Private Channel\")};return{id:e.id,type:\"private\",broadcast:async t=>(n(),e.broadcast(t)),getCurrentContext:async t=>(n(),e.getCurrentContext(t)),addContextListener:async(t,i)=>{n();let r=i,o=t;\"function\"==typeof t&&(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),r=t,o=null);return e.addContextListener(o,r)},onAddContextListener:t=>(n(),e.onAddContextListener(t)),disconnect:async()=>(n(),t=!0,e.disconnect()),onDisconnect:t=>(n(),e.onDisconnect(t)),onUnsubscribe:t=>(n(),e.onUnsubscribe(t))}};e.buildAppChannelObject=e=>({id:e.id,type:\"app\",broadcast:e.setContext,getCurrentContext:async t=>{const n=await e.getCurrentContext(t);return void 0===n?null:n},addContextListener:(t,n)=>{let i,r;\"function\"==typeof t?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),i=t):(i=n,\"string\"==typeof t&&(r=t));const s=(async()=>{let t=!0;const n=await e.getCurrentContext(r);return e.addContextHandler(((e,r)=>{if(!t||(t=!1,!(0,o.default)(n,e)))return i(e,r)}),r)})();return{...s,unsubscribe:()=>s.then((e=>e.unsubscribe()))}}});e.connectPrivateChannel=async t=>{try{const n=await fin.InterApplicationBus.Channel.connect(t),i=new r.PrivateChannelClient(n,t);return(0,e.buildPrivateChannelObject)(i)}catch(e){throw new Error(`Private Channel with id: ${t} doesn't exist`)}};e.isContext=e=>{if(e&&\"object\"==typeof e&&\"type\"in e){const{type:t}=e;return\"string\"==typeof t}return!1};e.isChannel=e=>{if(e&&\"object\"==typeof e&&\"type\"in e&&\"id\"in e){const{type:t,id:n}=e;return\"string\"==typeof t&&\"string\"==typeof n&&(\"app\"===t||\"private\"===t)}return!1};e.getIntentResolution=async(t,i,r,o)=>{const s=(0,n.generateId)(),a=new Promise(((e,t)=>{fin.InterApplicationBus.subscribe({uuid:\"*\"},s,(t=>{e(t)})).catch((()=>t(new Error(\"getResult is not supported in this environment\"))))})),d=r?{target:r,intentResolutionResultId:s}:{intentResolutionResultId:s},h=o?{name:o,context:i,metadata:d}:{...i,metadata:d},l=async()=>{let n=await a;if(!n||\"object\"!=typeof n)throw new Error(c.NoResultReturned);const{error:i}=n;if(i)throw new Error(c.IntentHandlerRejected);if((0,e.isChannel)(n)){const{id:i,type:r}=n;switch(r){case\"private\":n=await(0,e.connectPrivateChannel)(i);break;case\"app\":{const r=await t.joinSessionContextGroup(i);n=(0,e.buildAppChannelObject)(r);break}}}else if(!(0,e.isContext)(n))throw new Error(c.NoResultReturned);return n},u=o?await t.fireIntent(h):await t.fireIntentForContext(h);return\"object\"!=typeof u?{source:{appId:\"\",instanceId:\"\"},intent:\"\",version:\"2.0\",getResult:l}:{...u,getResult:l}}}(nr);var lr,ur,pr={};function wr(){if(ur)return Ki;ur=1;var e,t,n=s&&s.__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},i=s&&s.__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)},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ki,\"__esModule\",{value:!0}),Ki.InteropClient=void 0;const o=d,a=r(qi),c=function(){if(dr)return er;dr=1,Object.defineProperty(er,\"__esModule\",{value:!0}),er.Fdc3Module=void 0;const e=Hi,t=hr();class n extends t.FDC3ModuleBase{async open(e,t){await super._open(e,t)}addContextListener(e,t){let n;return this.wire.sendAction(\"fdc3-add-context-listener\").catch((e=>{})),\"function\"==typeof e?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),n=this.client.addContextHandler(e)):n=this.client.addContextHandler(t,null===e?void 0:e),{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}addIntentListener(e,t){this.wire.sendAction(\"fdc3-add-intent-listener\").catch((e=>{}));const n=this.client.registerIntentHandler((e=>{const{context:n,metadata:i}=e,{metadata:r}=n,o=i?.intentResolutionResultId||r?.intentResolutionResultId;o&&this.fin.InterApplicationBus.publish(o,null).catch((()=>null)),t(e.context)}),e,{fdc3Version:\"1.2\"});return{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}async raiseIntent(t,n,i){this.wire.sendAction(\"fdc3-raise-intent\").catch((e=>{}));const r=i?{name:t,context:n,metadata:{target:i}}:{name:t,context:n};try{return await this.client.fireIntent(r)}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntent?\"ResolverUnavailable\":t.message;throw new Error(n)}}async findIntent(t,n){this.wire.sendAction(\"fdc3-find-intent\").catch((e=>{}));try{return await this.client.getInfoForIntent({name:t,context:n})}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntent?\"ResolverUnavailable\":t.message;throw new Error(n)}}async findIntentsByContext(t){this.wire.sendAction(\"fdc3-find-intents-by-context\").catch((e=>{}));try{return await this.client.getInfoForIntentsByContext(t)}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntentsByContext?\"ResolverUnavailable\":t.message;throw new Error(n)}}async raiseIntentForContext(t,n){this.wire.sendAction(\"fdc3-raise-intent-for-context\").catch((e=>{}));try{return await this.client.fireIntentForContext({...t,metadata:{target:n}})}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntentForContext?\"ResolverUnavailable\":t.message;throw new Error(n)}}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}getInfo(){return this.wire.sendAction(\"fdc3-get-info\").catch((e=>{})),{providerVersion:this.wire.environment.getAdapterVersionSync(),provider:`openfin-${this.wire.me.uuid}`,fdc3Version:\"1.2\"}}}return er.Fdc3Module=n,er}(),h=function(){if(lr)return pr;lr=1,Object.defineProperty(pr,\"__esModule\",{value:!0}),pr.Fdc3Module2=void 0;const e=hr(),t=Hi,n=wr(),i=nr,r=ir;class o extends e.FDC3ModuleBase{async open(e,t){return\"string\"==typeof e&&console.warn(\"Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).\"),super._open(e,t)}async findInstances(e){this.wire.sendAction(\"fdc3-find-instances\").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,\"fdc3FindInstances\",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3FindInstances?\"ResolverUnavailable\":e.message;throw new Error(n)}}async getAppMetadata(e){this.wire.sendAction(\"fdc3-get-app-metadata\").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,\"fdc3GetAppMetadata\",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3GetAppMetadata?\"ResolverUnavailable\":e.message;throw new Error(n)}}async addContextListener(e,t){this.wire.sendAction(\"fdc3-add-context-listener\").catch((e=>{}));const n=e=>t=>{const{contextMetadata:n,...i}=t,r=n?[{...i},n]:[t,null];e(...r)};let i=t,r=n(i);return\"function\"==typeof e?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),i=e,r=n(i),this.client.addContextHandler(r)):this.client.addContextHandler(r,null===e?void 0:e)}async findIntent(e,n,i){this.wire.sendAction(\"fdc3-find-intent\").catch((e=>{}));try{return await this.client.getInfoForIntent({name:e,context:n,metadata:{resultType:i}})}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntent?\"ResolverUnavailable\":e.message;throw new Error(n)}}async findIntentsByContext(e,i){this.wire.sendAction(\"fdc3-find-intents-by-context\").catch((e=>{}));const r=i?{context:e,metadata:{resultType:i}}:e;try{return await n.InteropClient.ferryFdc3Call(this.client,\"fdc3v2FindIntentsByContext\",r)}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntentsByContext?\"ResolverUnavailable\":e.message;throw new Error(n)}}async raiseIntent(e,n,r){this.wire.sendAction(\"fdc3-raise-intent\").catch((e=>{}));try{return\"string\"==typeof r&&console.warn(\"Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).\"),(0,i.getIntentResolution)(this.client,n,r,e)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?\"ResolverUnavailable\":e.message;throw new Error(n)}}async raiseIntentForContext(e,n){this.wire.sendAction(\"fdc3-raise-intent-for-context\").catch((e=>{}));try{return\"string\"==typeof n&&console.warn(\"Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).\"),(0,i.getIntentResolution)(this.client,e,n)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?\"ResolverUnavailable\":e.message;throw new Error(n)}}async addIntentListener(e,t){if(this.wire.sendAction(\"fdc3-add-intent-listener\").catch((e=>{})),\"string\"!=typeof e)throw new Error(\"First argument must be an Intent name\");return this.client.registerIntentHandler((async e=>{let n,i;const{context:r,metadata:o}=e,{contextMetadata:s,metadata:a,...c}=r,d=o?.intentResolutionResultId||a?.intentResolutionResultId;try{const e=a?{metadata:a,...c}:{...c};n=await t(e,s),i=n}catch(e){n=e,i={error:!0}}if(d&&this.fin.InterApplicationBus.publish(d,i).catch((()=>null)),n instanceof Error)throw new Error(n.message);return n}),e,{fdc3Version:\"2.0\"})}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}async createPrivateChannel(){const e=(0,t.generateId)();await n.InteropClient.ferryFdc3Call(this.client,\"createPrivateChannelProvider\",{channelId:e});const o=await this.fin.InterApplicationBus.Channel.connect(e),s=new r.PrivateChannelClient(o,e);return(0,i.buildPrivateChannelObject)(s)}async getUserChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:\"user\",...(0,i.getUnsupportedChannelApis)(\"User\")})))}async getSystemChannels(){return console.warn(\"This API has been deprecated. Please use fdc3.getUserChannels instead.\"),super.getSystemChannels()}async joinUserChannel(e){return super.joinChannel(e)}async joinChannel(e){return console.warn(\"This API has been deprecated. Please use fdc3.joinUserChannel instead.\"),super.joinChannel(e)}async getCurrentChannel(){const e=await super.getCurrentChannel();return e?{...e,type:\"user\",broadcast:this.broadcast.bind(this)}:null}async getInfo(){return n.InteropClient.ferryFdc3Call(this.client,\"fdc3v2GetInfo\",{fdc3Version:\"2.0\"})}}return pr.Fdc3Module2=o,pr}(),l=Hi;let u=class extends o.Base{constructor(i,r){super(i),e.set(this,void 0),t.set(this,void 0),n(this,t,new Map,\"f\"),n(this,e,r,\"f\")}async setContext(t){this.wire.sendAction(\"interop-client-set-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"setContext\",{context:t})}async addContextHandler(t,n){if(this.wire.sendAction(\"interop-client-add-context-handler\").catch((e=>{})),\"function\"!=typeof t)throw new Error(\"Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.\");const r=await i(this,e,\"f\");let o;o=n?`invokeContextHandler-${n}-${(0,l.generateId)()}`:\"invokeContextHandler\";const s=(0,l.wrapContextHandler)(t,o);return r.register(o,s),await r.dispatch(\"contextHandlerRegistered\",{handlerId:o,contextType:n}),{unsubscribe:async()=>{r.remove(o),await r.dispatch(\"removeContextHandler\",{handlerId:o})}}}async getContextGroups(){this.wire.sendAction(\"interop-client-get-context-groups\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getContextGroups\")}async joinContextGroup(t,n){this.wire.sendAction(\"interop-client-join-context-group\").catch((e=>{}));const r=await i(this,e,\"f\");if(!t)throw new Error(\"No contextGroupId specified for joinContextGroup.\");return r.dispatch(\"joinContextGroup\",{contextGroupId:t,target:n})}async removeFromContextGroup(t){this.wire.sendAction(\"interop-client-remove-from-context-group\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"removeFromContextGroup\",{target:t})}async getAllClientsInContextGroup(t){this.wire.sendAction(\"interop-client-get-all-clients-in-context-group\").catch((e=>{}));const n=await i(this,e,\"f\");if(!t)throw new Error(\"No contextGroupId specified for getAllClientsInContextGroup.\");return n.dispatch(\"getAllClientsInContextGroup\",{contextGroupId:t})}async getInfoForContextGroup(t){this.wire.sendAction(\"interop-client-get-info-for-context-group\").catch((e=>{}));const n=await i(this,e,\"f\");if(!t)throw new Error(\"No contextGroupId specified for getInfoForContextGroup.\");return n.dispatch(\"getInfoForContextGroup\",{contextGroupId:t})}async fireIntent(t){this.wire.sendAction(\"interop-client-fire-intent\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"fireIntent\",t)}async registerIntentHandler(t,n,r){this.wire.sendAction(\"interop-client-register-intent-handler\").catch((e=>{}));const o=await i(this,e,\"f\"),s=`intent-handler-${n}`,a=(0,l.wrapIntentHandler)(t,s);try{await o.register(s,a),await o.dispatch(\"intentHandlerRegistered\",{handlerId:s,...r})}catch(e){throw new Error(\"Unable to register intent handler\")}return{unsubscribe:async()=>{o.remove(s)}}}async getCurrentContext(t){this.wire.sendAction(\"interop-client-get-current-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getCurrentContext\",{contextType:t})}async getInfoForIntent(t){this.wire.sendAction(\"interop-client-get-info-for-intent\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getInfoForIntent\",t)}async getInfoForIntentsByContext(t){this.wire.sendAction(\"interop-client-get-info-for-intents-by-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getInfoForIntentsByContext\",t)}async fireIntentForContext(t){this.wire.sendAction(\"interop-client-fire-intent-for-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"fireIntentForContext\",t)}async joinSessionContextGroup(n){try{const r=i(this,t,\"f\").get(n);if(r)return r.getUserInstance();const o=await i(this,e,\"f\"),{hasConflict:s}=await o.dispatch(\"sessionContextGroup:createIfNeeded\",{sessionContextGroupId:n});s&&console.warn(`A (non-session) context group with the name \"${n}\" already exists. If you are trying to join a Context Group, call joinContextGroup instead.`);const c=new a.default(this.wire,i(this,e,\"f\"),n);return i(this,t,\"f\").set(n,c),c.getUserInstance()}catch(e){throw console.error(`Error thrown trying to create Session Context Group with id \"${n}\": ${e}`),e}}async onDisconnection(t){this.wire.sendAction(\"interop-client-add-ondisconnection-listener\").catch((e=>{}));return(await i(this,e,\"f\")).onDisconnection((e=>{const{uuid:n}=e;t({type:\"interop-broker\",topic:\"disconnected\",brokerName:n})}))}getFDC3Sync(e){switch(e){case\"1.2\":return new c.Fdc3Module((()=>this),this.wire);case\"2.0\":return new h.Fdc3Module2((()=>this),this.wire);default:throw new Error(`Invalid FDC3 version provided: ${e}. Must be '1.2' or '2.0'`)}}async getFDC3(e){return this.getFDC3Sync(e)}static async ferryFdc3Call(t,n,r){return(await i(t,e,\"f\")).dispatch(n,r||null)}};return Ki.InteropClient=u,e=new WeakMap,t=new WeakMap,Ki}var yr,fr,gr,mr={};function vr(){if(yr)return mr;yr=1,Object.defineProperty(mr,\"__esModule\",{value:!0}),mr.overrideCheck=mr.checkFDC32Overrides=mr.getDefaultViewFdc3VersionFromAppInfo=void 0;const e=Vi();function t(t){return[\"fdc3HandleFindInstances\",\"handleInfoForIntent\",\"handleInfoForIntentsByContext\",\"fdc3HandleGetAppMetadata\",\"fdc3HandleGetInfo\",\"fdc3HandleOpen\",\"handleFiredIntent\",\"handleFiredIntentForContext\"].filter((n=>t[n]===e.InteropBroker.prototype[n]))}return mr.getDefaultViewFdc3VersionFromAppInfo=function({manifest:e,initialOptions:t}){const n=e?.platform?.defaultViewOptions?.fdc3InteropApi??t.defaultViewOptions?.fdc3InteropApi;return[\"1.2\",\"2.0\"].includes(n??\"\")?n:void 0},mr.checkFDC32Overrides=t,mr.overrideCheck=function(e,n){if(n&&\"2.0\"===n){const n=t(e);n.length>0&&console.warn(`WARNING: FDC3 2.0 has been set as a default option for Views in this Platform, but the required InteropBroker APIs for FDC3 2.0 compliance have not all been overridden.\\nThe following APIs need to be overridden:\\n${n.join(\"\\n\")}`)}},mr}function Cr(){return gr||(gr=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),i=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),i(function(){if(fr)return Ti;fr=1;var e=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ti,\"__esModule\",{value:!0}),Ti.InteropModule=void 0;const t=e(n),i=$i,r=d,o=Vi(),a=wr(),c=vr(),h=Tn,l=e=>new e,u=\"You have attempted to use or modify InteropBroker parameters, which is not allowed. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.\";class p extends r.Base{async init(e,n=l){this.wire.sendAction(\"interop-init\").catch((()=>{}));const r=await this.wire.environment.getInteropInfo(this.wire.getFin()),s=(0,i.createUnusableObject)(u),a=(0,i.createWarningObject)(u,(0,t.default)(r)),d=async()=>{throw new Error(u)},p=o.InteropBroker.createClosedConstructor(this.wire,(()=>this.fin.InterApplicationBus.Channel.create(`interop-broker-${e}`)),r);let w;return w=Array.isArray(n)?new((0,h.overrideFromComposables)(...n)(p))(s,d,a):await n(p,s,d,a),(0,c.overrideCheck)(w,r.fdc3Version),w}connectSync(e,t){return this.wire.sendAction(\"interop-connect-sync\").catch((()=>{})),new a.InteropClient(this.wire,this.wire.environment.whenReady().then((()=>this.fin.InterApplicationBus.Channel.connect(`interop-broker-${e}`,{payload:t}))))}}return Ti.InteropModule=p,Ti}(),e),i(wr(),e),i(Vi(),e)}(Li)),Li}var br={},Ir={},Er={},xr={};Object.defineProperty(xr,\"__esModule\",{value:!0}),xr.getSnapshotSourceChannelName=void 0;xr.getSnapshotSourceChannelName=e=>`snapshot-source-provider-${e.uuid}`;var Ar,Pr,Mr,_r,Or,Sr=s&&s.__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},Rr=s&&s.__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)};Object.defineProperty(Er,\"__esModule\",{value:!0}),Er.SnapshotSource=void 0;const Fr=d,jr=xr,kr=new Map;class Lr extends Fr.Base{constructor(e,t){super(e),Ar.set(this,void 0),Pr.set(this,(()=>(kr.has(this.identity.uuid)||kr.set(this.identity.uuid,{eventFired:null,clientPromise:null}),kr.get(this.identity.uuid)))),Mr.set(this,(()=>(Rr(this,Pr,\"f\").call(this).clientPromise||(Rr(this,Pr,\"f\").call(this).clientPromise=Rr(this,_r,\"f\").call(this)),Rr(this,Pr,\"f\").call(this).clientPromise))),_r.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);try{Rr(this,Pr,\"f\").call(this).eventFired||await Rr(this,Or,\"f\").call(this);const t=await this.fin.InterApplicationBus.Channel.connect(e,{wait:!1});return t.onDisconnection((()=>{Rr(this,Pr,\"f\").call(this).clientPromise=null,Rr(this,Pr,\"f\").call(this).eventFired=null})),t}catch(e){throw Rr(this,Pr,\"f\").call(this).clientPromise=null,new Error(\"The targeted SnapshotSource is not currently initialized. Await this object's ready() method.\")}})),Or.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);let t,n;const i=new Promise(((e,i)=>{t=e,n=i}));Rr(this,Pr,\"f\").call(this).eventFired=i;const r=async i=>{try{i.channelName===e&&(t(),await this.fin.InterApplicationBus.Channel.removeListener(\"connected\",r))}catch(e){n(e)}};await this.fin.InterApplicationBus.Channel.on(\"connected\",r)})),Sr(this,Ar,t,\"f\")}get identity(){return Rr(this,Ar,\"f\")}async ready(){this.wire.sendAction(\"snapshot-source-ready\").catch((e=>{}));try{await Rr(this,Mr,\"f\").call(this)}catch(e){await Rr(this,Pr,\"f\").call(this).eventFired}}async getSnapshot(){this.wire.sendAction(\"snapshot-source-get-snapshot\").catch((e=>{}));const e=await Rr(this,Mr,\"f\").call(this),t=await e.dispatch(\"get-snapshot\");return(await t).snapshot}async applySnapshot(e){this.wire.sendAction(\"snapshot-source-apply-snapshot\").catch((e=>{}));return(await Rr(this,Mr,\"f\").call(this)).dispatch(\"apply-snapshot\",{snapshot:e})}}Er.SnapshotSource=Lr,Ar=new WeakMap,Pr=new WeakMap,Mr=new WeakMap,_r=new WeakMap,Or=new WeakMap,Object.defineProperty(Ir,\"__esModule\",{value:!0}),Ir.SnapshotSourceModule=void 0;const Tr=d,$r=Er,Br=xr;class Gr extends Tr.Base{async init(e){if(this.wire.sendAction(\"snapshot-source-init\").catch((e=>{})),\"object\"!=typeof e||\"function\"!=typeof e.getSnapshot||\"function\"!=typeof e.applySnapshot)throw new Error(\"you must pass in a valid SnapshotProvider\");const t=await this.fin.InterApplicationBus.Channel.create((0,Br.getSnapshotSourceChannelName)(this.fin.me));t.register(\"get-snapshot\",(async()=>({snapshot:await e.getSnapshot()}))),t.register(\"apply-snapshot\",(({snapshot:t})=>e.applySnapshot(t)))}wrapSync(e){return this.wire.sendAction(\"snapshot-source-wrap-sync\").catch((e=>{})),new $r.SnapshotSource(this.wire,e)}async wrap(e){return this.wire.sendAction(\"snapshot-source-wrap\").catch((e=>{})),this.wrapSync(e)}}Ir.SnapshotSourceModule=Gr,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Ir,e),n(Er,e)}(br),Object.defineProperty(a,\"__esModule\",{value:!0});var Wr=a.Fin=void 0;const Hr=t,Nr=c,Dr=ie(),Ur=Z(),Vr=de,zr=en,Kr=rn,qr=un,Jr=bn,Yr=J(),Zr=An,Qr=ki,Xr=Cr(),eo=br;class to extends Hr.EventEmitter{constructor(e){super(),this.wire=e,this.System=new Nr.System(e),this.Window=new Dr._WindowModule(e),this.Application=new Ur.ApplicationModule(e),this.InterApplicationBus=new Vr.InterApplicationBus(e),this.Clipboard=new zr.Clipboard(e),this.ExternalApplication=new Kr.ExternalApplicationModule(e),this.Frame=new qr._FrameModule(e),this.GlobalHotkey=new Jr.GlobalHotkey(e),this.Platform=new Zr.PlatformModule(e,this.InterApplicationBus.Channel),this.View=new Yr.ViewModule(e),this.Interop=new Xr.InteropModule(e),this.SnapshotSource=new eo.SnapshotSourceModule(e),e.registerFin(this),this.me=(0,Qr.getMe)(e),e.on(\"disconnected\",(()=>{this.emit(\"disconnected\")}))}}Wr=a.Fin=to;var no={},io={};function ro(e){return\"string\"==typeof e.manifestUrl}function oo(e){return ao(e)&&\"string\"==typeof e.address}function so(e){return oo(e)&&\"string\"==typeof e.token}function ao(e){return\"string\"==typeof e.uuid}function co(e){return e.runtime&&\"string\"==typeof e.runtime.version}function ho(e){return ao(e)&&co(e)}Object.defineProperty(io,\"__esModule\",{value:!0}),io.isInternalConnectConfig=io.isPortDiscoveryConfig=io.isNewConnectConfig=io.isConfigWithReceiver=io.isRemoteConfig=io.isExistingConnectConfig=io.isExternalConfig=void 0,io.isExternalConfig=ro,io.isExistingConnectConfig=oo,io.isRemoteConfig=so,io.isConfigWithReceiver=function(e){return\"object\"==typeof e.receiver&&so({...e,address:\"\"})},io.isNewConnectConfig=ho,io.isPortDiscoveryConfig=function(e){return ro(e)&&co(e)||ho(e)},io.isInternalConnectConfig=function(e){return oo(e)||ho(e)};var lo={},uo={};Object.defineProperty(uo,\"__esModule\",{value:!0}),uo.EmitterMap=void 0;const po=t;function wo(e){return Buffer.from(e).toString(\"base64\")}uo.EmitterMap=class{constructor(){this.storage=new Map}hashKeys(e){return e.map(wo).join(\"/\")}getOrCreate(e){const t=this.hashKeys(e);return this.storage.has(t)||this.storage.set(t,new po.EventEmitter),this.storage.get(t)}has(e){return this.storage.has(this.hashKeys(e))}delete(e){const t=this.hashKeys(e);return this.storage.delete(t)}},Object.defineProperty(lo,\"__esModule\",{value:!0});const yo=uo;class fo extends yo.EmitterMap{constructor(){super(...arguments),this.dispatchEvent=e=>{if(function(e){return\"process-desktop-event\"===e.action}(e)){const{payload:t}=e,n=function(e){const{topic:t}=e;if(\"frame\"===t||\"window\"===t||\"view\"===t){const{uuid:n,name:i}=e;return[t,n,i]}if(\"application\"===t){const{uuid:n}=e;return[t,n]}return[t]}(t);if(this.has(n))return this.getOrCreate(n).emit(t.type,t),!0}return!1}}}lo.default=fo;var go,mo,vo=s&&s.__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},Co=s&&s.__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)},bo=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(no,\"__esModule\",{value:!0});var Io=no.Transport=void 0;const Eo=t,xo=io,Ao=g,Po=bo(lo),Mo=ki,_o=ke;class Oo extends Eo.EventEmitter{constructor(e,t,n){super(),this.wireListeners=new Map,this.topicRefMap=new Map,this.eventAggregator=new Po.default,this.messageHandlers=[this.eventAggregator.dispatchEvent],go.set(this,void 0),mo.set(this,void 0),this.connectSync=()=>{Co(this,go,\"f\").connectSync()},this.getPort=()=>Co(this,go,\"f\").getPort(),vo(this,go,new e(this.onmessage.bind(this)),\"f\"),this.environment=t,this.sendRaw=Co(this,go,\"f\").send.bind(Co(this,go,\"f\")),this.registerMessageHandler(this.handleMessage.bind(this)),Co(this,go,\"f\").on(\"disconnected\",(()=>{for(const[,{handleNack:e}]of this.wireListeners)e({reason:\"Remote connection has closed\"});this.wireListeners.clear(),this.emit(\"disconnected\")}));const{uuid:i,name:r}=n,o=this.environment.getCurrentEntityType();this.me=(0,Mo.getBaseMe)(o,i,r)}getFin(){if(!Co(this,mo,\"f\"))throw new Error(\"No Fin object registered for this transport\");return Co(this,mo,\"f\")}registerFin(e){if(Co(this,mo,\"f\"))throw new Error(\"Fin object has already been registered for this transport\");vo(this,mo,e,\"f\")}shutdown(){return Co(this,go,\"f\").shutdown()}async connect(e){if((0,xo.isConfigWithReceiver)(e))return await Co(this,go,\"f\").connect(e.receiver),this.authorize(e);if((0,xo.isRemoteConfig)(e))return this.connectRemote(e);if((0,xo.isExistingConnectConfig)(e))return this.connectByPort(e);if((0,xo.isNewConnectConfig)(e)){const t=await this.environment.retrievePort(e);return this.connectByPort({...e,address:`ws://localhost:${t}`})}}async connectRemote(e){return await Co(this,go,\"f\").connect(new(this.environment.getWsConstructor())(e.address)),this.authorize(e)}async connectByPort(e){const{address:t,uuid:n}=e,i={...e,type:\"file-token\"},r=Co(this,go,\"f\");await r.connect(new(this.environment.getWsConstructor())(e.address));const o=await this.sendAction(\"request-external-authorization\",{uuid:n,type:\"file-token\"},!0);if(\"external-authorization-response\"!==o.action)throw new Ao.UnexpectedActionError(o.action);return await this.environment.writeToken(o.payload.file,o.payload.token),this.authorize(i)}async authorize(e){const t=await this.sendAction(\"request-authorization\",e,!0);if(\"authorization-response\"!==t.action)throw new Ao.UnexpectedActionError(t.action);if(!0!==t.payload.success)throw new Ao.RuntimeError(t.payload)}sendAction(e,t={},n=!1){let i=()=>{};const r=Ao.RuntimeError.getCallSite(1),o=this.environment.getNextMessageId(),s=new Promise(((s,a)=>{i=a;const c={action:e,payload:t,messageId:o},d=Co(this,go,\"f\");return this.addWireListener(o,s,(e=>this.nackHandler(e,a,r)),n),d.send(c).catch(a)}));return Object.assign(s,{cancel:i,messageId:o})}nackHandler(e,t,n){t(\"string\"==typeof e?e:new Ao.RuntimeError(e,n))}ferryAction(e){return new Promise(((t,n)=>{const i=this.environment.getNextMessageId();e.messageId=i;const r=e=>{t(e.payload)};return Co(this,go,\"f\").send(e).then((()=>this.addWireListener(i,r,(e=>this.nackHandler(e,n)),!1))).catch(n)}))}registerMessageHandler(e){this.messageHandlers.push(e)}addWireListener(e,t,n,i){i?this.uncorrelatedListener=t:this.wireListeners.has(e)?n({reason:\"Duplicate handler id\",error:(0,_o.errorToPOJO)(new Ao.DuplicateCorrelationError(String(e)))}):this.wireListeners.set(e,{resolve:t,handleNack:n})}onmessage(e){for(const t of this.messageHandlers)t.call(null,e)}handleMessage(e){const t=e.correlationId||NaN;if(\"correlationId\"in e){if(!this.wireListeners.has(t))return!1;{const{resolve:n,handleNack:i}=this.wireListeners.get(t);\"ack\"!==e.action?i({reason:\"Did not receive ack action\",error:(0,_o.errorToPOJO)(new Ao.NoAckError(e.action))}):\"payload\"in e?e.payload.success?n.call(null,e):i(e.payload):\"string\"==typeof e.reason?i(e):(console.warn(\"Received invalid response from core\",e),i({reason:\"invalid response shape\"})),this.wireListeners.delete(t)}}else this.uncorrelatedListener&&this.uncorrelatedListener.call(null,e),this.uncorrelatedListener=()=>{};return!0}}Io=no.Transport=Oo,go=new WeakMap,mo=new WeakMap;const So=(...e)=>({log:(...t)=>console.debug(`[${(new Date).toISOString()}]`,...(e=>e.map((e=>`[${e}]`)))(e),...t),getLogger:(...t)=>So(...e,...t)}),Ro=So(\"@openfin/core-web/client\");function Fo(e,t){if(!function(e){return\"string\"==typeof e}(e))throw new Error(`Property ${t} has invalid type. Expected string, got ${typeof e}.`)}const jo=\"web-broker-ports-ready\",ko=Ro.getLogger(\"get-web-interop-ports\");function Lo(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)}function To(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}\"function\"==typeof SuppressedError&&SuppressedError;const $o=e=>{var n,i,r;return r=class extends t.EventEmitter{constructor(t){super(),n.set(this,void 0),i.set(this,!1),this.connectSync=()=>{Lo(this,i,\"f\")||(e.addEventListener(\"message\",(e=>{e.data?.topic?.startsWith(\"wire-message\")&&e.data.message&&Lo(this,n,\"f\").call(this,{...JSON.parse(e.data.message),ports:e.ports})})),e.start())},this.connect=async()=>{this.connectSync()},this.send=t=>(e.postMessage({topic:\"wire-message\",message:JSON.stringify(t)}),Promise.resolve()),this.shutdown=async()=>{e.close()},To(this,n,t,\"f\")}getPort(){return e}},n=new WeakMap,i=new WeakMap,r};var Bo={},Go={};Object.defineProperty(Go,\"__esModule\",{value:!0}),Go.BaseEnvironment=void 0;const Wo=vr();Go.BaseEnvironment=class{async getViewWindowIdentity(e,t){const{identity:n}=await e.View.wrapSync(t).getCurrentWindow();return n}async getInteropInfo(e){const t=await e.Application.getCurrentSync().getInfo().catch((()=>null)),n=t?.initialOptions?.interopBrokerConfiguration??{};return{fdc3Version:t?(0,Wo.getDefaultViewFdc3VersionFromAppInfo)(t):void 0,...n,fdc3Info:{providerVersion:await e.System.getVersion(),provider:\"OpenFin\"}}}},Object.defineProperty(Bo,\"__esModule\",{value:!0});var Ho=Bo.BrowserEnvironment=void 0;const No=Go;class Do extends No.BaseEnvironment{constructor(){super(...arguments),this.type=\"other\",this.getRandomId=()=>{const e=new Uint32Array(1);return window.crypto.getRandomValues(e)[0].toString(32)}}getAdapterVersionSync(){return\"\"}observeBounds(e,t){throw new Error(\"Method not implemented.\")}layoutAllowedInContext(e){return!1}initLayoutManager(e,t,n){throw new Error(\"Method not implemented.\")}applyLayoutSnapshot(e,t,n){throw new Error(\"Method not implemented.\")}createLayout(e,t){throw new Error(\"Method not implemented.\")}destroyLayout(e,t){throw new Error(\"Method not implemented.\")}resolveLayout(e,t){throw new Error(\"Method not implemented.\")}initPlatform(...e){throw new Error(\"Method not implemented.\")}writeToken(e,t){return Promise.resolve(\"\")}retrievePort(e){throw new Error(\"Method not implemented.\")}getNextMessageId(){return this.getRandomId()}createChildContent(e){throw new Error(\"Method not implemented.\")}getWebWindow(e){throw new Error(\"Method not implemented.\")}getCurrentEntityIdentity(){throw new Error(\"Method not implemented.\")}getCurrentEntityType(){return\"external connection\"}raiseEvent(e,t){throw new Error(\"Method not implemented.\")}getUrl(){return location.href}getDefaultChannelOptions(){return{create:{},connect:{}}}getRtcPeer(){return new RTCPeerConnection}getWsConstructor(){return WebSocket}whenReady(){return Promise.resolve()}}Ho=Bo.BrowserEnvironment=Do;const Uo=e=>\"platform\"in e&&void 0!==e.platform;var Vo,zo;class Ko extends Ho{constructor(e){super(),this.connectConfig=e,Vo.set(this,void 0),zo.set(this,new W((async()=>Promise.resolve().then((function(){return require(\"./main-b14f67c9.js\")}))))),Uo(e)&&this.validatePlatformOptions(e)}getAdapterVersionSync(){return\"0.39.21\"}validatePlatformOptions({platform:e}){if(!(\"layoutSnapshot\"in e))throw new Error(\"Platform options are missing layoutSnapshot. Please provide a layoutSnapshot in the platform options.\");if(\"windows\"in e||\"windows\"in e.layoutSnapshot)throw new Error(\"It appears you tried to call connect() with a snapshot object from an OpenFin desktop environment. Note that connect() expects to be called with a platform property with this structure: { platform: { layoutSnapshot } }. To get a layoutSnapshot of the expected structure, use fin.Platform.Layout.getCurrentLayoutManagerSync().getLayoutSnapshot() in v34+ in your desktop environment.\");const{layouts:t}=e.layoutSnapshot;Object.entries(t).map((([e,t])=>{if(\"object\"!=typeof t||null===t)throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must be an object.`);if(!(\"content\"in t))throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must contain a 'content' property.`)}))}async getInteropInfo(e){return{...{contextGroups:void 0,logging:{beforeAction:{enabled:!1},afterAction:{enabled:!1}}},fdc3Version:void 0,fdc3Info:{providerVersion:\"0.39.21\",provider:\"OpenFin Web\"}}}layoutAllowedInContext(e){return!0}async initLayoutManager(e,t,n){if(Lo(this,Vo,\"f\"))throw new Error(\"Layout already initialized.\");if(!Uo(this.connectConfig))throw new Error(\"Platform options are missing from connection config.\");const{WebLayoutEntryPoint:i}=await Lo(this,zo,\"f\").getValue();return To(this,Vo,new i(this.connectConfig),\"f\"),await Lo(this,Vo,\"f\").initLayoutManager(e,t,n)}async applyLayoutSnapshot(e,t,n){Lo(this,Vo,\"f\")?.applyLayoutSnapshot(e,t,n)}async createLayout(e,t){return Lo(this,Vo,\"f\")?.createLayout(e,t)}async destroyLayout(e,t){return Lo(this,Vo,\"f\")?.destroyLayout(e,t)}async getViewWindowIdentity(e,t){return Promise.resolve({uuid:t.uuid,name:t.uuid})}}Vo=new WeakMap,zo=new WeakMap;const qo=()=>{const e=((e,t)=>{const n=new RegExp(`^${t}<(?.*)>$`).exec(e)?.groups?.meta;if(n)try{return JSON.parse(atob(n))}catch(e){throw new Error(`Failed to decode JSON from ${n}.`)}})(window.name,\"of-frame\");if(e)try{const{name:t,uuid:n,brokerUrl:i,providerId:r,contextGroup:o}=e;return Fo(i,\"brokerUrl\"),Fo(n,\"uuid\"),Fo(t,\"name\"),{identity:{name:t,uuid:n},brokerUrl:i,interopConfig:{providerId:r,currentContextGroup:o}}}catch(e){throw new Error(`Unexpected error occurred when inferring platform information: ${e.stack}`)}},Jo=()=>{const e=r.v4();return{uuid:e,name:e}},Yo=async e=>{if(\"enabled\"===e.connectionInheritance){const t=await(async e=>{const t=qo();if(t){const{validateOptions:n=(()=>!0)}=e,{identity:i,...r}=t;if(!await n(r))throw new Error(\"Parent options were rejected by validateOptions.\");return t}})(e);if(t)return t}if(!e.options){const t=\"enabled\"===e.connectionInheritance?\"Broker URL was not specified nor provided by a platform container.\":\"Connection inheritance is disabled but no options were provided.\";throw new Error(t)}return{...e.options,identity:Jo()}};exports.__classPrivateFieldGet=Lo,exports.__classPrivateFieldSet=To,exports.apiExposer=Gn,exports.commonjsGlobal=s,exports.connect=async t=>{try{Ro.log(\"Establishing connection\",t);const{brokerUrl:n,identity:i,timeout:r,interopConfig:s}=await Yo(t),{workerPort:a,iframeBrokerPort:c}=await(async(e,t,n)=>{const{origin:i}=new URL(e),r=document.createElement(\"IFRAME\");let s;r.style.display=\"none\";try{return await new Promise(((a,c)=>{const d=e=>{if(e.source===r.contentWindow&&e.data?.topic===`ack-${jo}`){if(e.origin!==i)c(new Error(`Broker redirected to unexpected origin ${e.origin}, expected ${i}.`));else if(e.data.success){const[t,n]=e.ports;a({iframeBrokerPort:t,workerPort:n})}else c(new m(e.data));window.removeEventListener(\"message\",d),clearTimeout(s)}};window.addEventListener(\"message\",d),ko.log(`Connecting to broker ${e}`),r.setAttribute(\"src\",e),r.setAttribute(\"name\",o(t,\"of-broker\")),document.body.appendChild(r),ko.log(\"Iframe loaded, awaiting init message from iframe\"),n&&(s=setTimeout((()=>{window.removeEventListener(\"message\",d),document.body.removeChild(r),c(new Error(\"Worker did not initialize in time\"))}),n))}))}catch(e){throw new Error(`Failed to initialise Fin Web Client. ${e.message}`,{cause:e})}})(n,i,r);Ro.log(\"Successfully established connection to shared worker\");const d={entityType:\"external connection\",...i};a.start(),c.start();const h=((t,n,i)=>{const r=$o(n),o=new Ko(t),s=new Io(r,o,i);return s.connectSync(),window.Buffer=e.Buffer,new Wr(s)})(t,a,d);return s?.providerId&&(h.me.interop=h.Interop.connectSync(s.providerId),s?.currentContextGroup&&h.me.interop.joinContextGroup(s.currentContextGroup).catch((e=>{console.warn(`Error joining specified context group: ${s?.currentContextGroup}, continuing`,e)}))),{...h,me:{...h.me,identity:{uuid:h.me.uuid,name:h.me.name}}}}catch(e){throw new Error(`An error occured during web-interop connection: ${e.message}`)}},exports.decorators=Nn,exports.encodeOptions=o,exports.layout_constants=ai,exports.lazy=G;\n","\"use strict\";var t=require(\"./main-8cad4070.js\"),e=require(\"uuid\");require(\"buffer/\"),require(\"events\"),require(\"lodash/cloneDeep\"),require(\"lodash/isEqual\");var i={},n={};Object.defineProperty(n,\"__esModule\",{value:!0}),n.mapValuesAsync=n.mapEntriesAsync=void 0;const o=(t,[e,i])=>({...t,[e]:i});async function s(t,e){return(await Promise.all(e.map((async([e,i])=>[e,await t(i,e)])))).reduce(o,{})}n.mapEntriesAsync=s,n.mapValuesAsync=async function(t,e){let i;return i=e instanceof Map?[...e.entries()]:Object.entries(e),s(t,i)};var r,a,l,h,d=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldSet||function(t,e,i,n,o){if(\"m\"===n)throw new TypeError(\"Private method is not writable\");if(\"a\"===n&&!o)throw new TypeError(\"Private accessor was defined without a setter\");if(\"function\"==typeof e?t!==e||!o:!e.has(t))throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");return\"a\"===n?o.call(t,i):o?o.value=i:e.set(t,i),i},c=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldGet||function(t,e,i,n){if(\"a\"===i&&!n)throw new TypeError(\"Private accessor was defined without a getter\");if(\"function\"==typeof e?t!==e||!n:!e.has(t))throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");return\"m\"===i?n:\"a\"===i?n.call(t):n?n.value:e.get(t)};Object.defineProperty(i,\"__esModule\",{value:!0});var m=i.DefaultLayoutManager=void 0;const u=n;class p{constructor(t){a.set(this,void 0),l.set(this,new Map),d(this,a,t,\"f\")}size(){return c(this,l,\"f\").size}async applyLayoutSnapshot({layouts:t}){if(Object.keys(t).length>1)throw new Error(\"[LayoutManager] Tried to call applyLayoutSnapshot with more than 1 layout. When implementing multiple layouts via overridden LayoutManager class, you must override and fully implement the applyLayoutSnapshot method without calling super.applyLayoutSnapshot().\");const[[e,i]]=Object.entries(t);await p.createLayout(this,{layoutName:e,layout:i})}async showLayout({layoutName:t}){}async getLayoutSnapshot(){return{layouts:await(0,u.mapValuesAsync)((t=>t.getFrameSnapshot()),c(this,l,\"f\"))}}async removeLayout({layoutName:t}){}getLayoutIdentityForView(t){const e=[...c(this,l,\"f\").values()].find((e=>e.getCurrentViews().some((e=>e.name===t.name&&e.uuid===t.uuid))));return e?.identity??void 0}isLayoutVisible({layoutName:t}){return c(p,r,\"m\",h).call(p,this,t).isVisible()}resolveLayoutIdentity(t){if(t&&\"layoutName\"in t)return t;const e=[...c(this,l,\"f\").values()];if(1===e.length)return e[0].identity;const i=e.find((t=>t.isVisible()));return i?.identity??void 0}static async resolveLayout(t,e){const i=t.resolveLayoutIdentity(e);if(void 0===i||!(\"layoutName\"in i))throw new Error(\"[layout-manager] resolveLayout: Could not resolve the layout identity. Make sure you include 'layoutName' in the identity object.\");return c(p,r,\"m\",h).call(p,t,i.layoutName)}static async handleSharedView(t,e,i){await(0,u.mapValuesAsync)((async t=>{if(t.identity.layoutName!==e.layoutName){const e=t.getCurrentViews().find((t=>t.name===i.name));e&&await t.onViewDetached({viewIdentity:e,target:null}).catch(console.error)}}),c(t,l,\"f\"))}static async handleLastViewRemoved(t,e){await t.removeLayout(e),await c(t,a,\"f\").handleLastViewRemoved(t)}static async destroyLayout(t,{layoutName:e}){await c(p,r,\"m\",h).call(p,t,e).destroy(),c(t,l,\"f\").delete(e)}static async createLayout(t,e){const{layoutName:i}=e;if(c(t,l,\"f\").has(i))throw new Error(`Layout name ${i} already exists`);await c(t,a,\"f\").createLayout(e,t)}static registerLayout(t,e,i){c(t,l,\"f\").set(e,i)}static getAllLayouts(t){return[...c(t,l,\"f\").values()]}static setInitialSnapshot(t,e){c(t,a,\"f\").setInitialSnapshot(e)}static createClosedConstructor(...t){return class extends p{constructor(){super(...t)}}}}m=i.DefaultLayoutManager=p,r=p,a=new WeakMap,l=new WeakMap,h=function(t,e){const i=c(t,l,\"f\").get(e);if(!i)throw new Error(`[layout-manager] getLayoutByName: Could not locate layout with name '${e}'`);return i};var g={},f={},v={};Object.defineProperty(v,\"__esModule\",{value:!0}),v.ReversibleMap=void 0;v.ReversibleMap=class{constructor(){this.valueToKey=new Map,this.keyToValue=new Map,this.setUnique=(t,e)=>{if(this.hasKey(t)||this.hasValue(e))throw new Error(\"Key or value already in the map.\");this.keyToValue.set(t,e),this.valueToKey.set(e,t)},this.getKey=t=>{const e=this.valueToKey.get(t);if(!e)throw new Error(\"Value not found in the map.\");return e},this.deleteKey=t=>{const e=this.getValue(t);return this.keyToValue.delete(t),this.valueToKey.delete(e),e},this.deleteValue=t=>{const e=this.getKey(t);return this.keyToValue.delete(e),this.valueToKey.delete(t),e},this.hasKey=t=>this.keyToValue.has(t),this.hasValue=t=>this.valueToKey.has(t)}getValue(t){const e=this.keyToValue.get(t);if(!e)throw new Error(\"Key not found in the map.\");return e}},Object.defineProperty(f,\"__esModule\",{value:!0});var _=f.LayoutContentCache=void 0;const y=t.lazy,C=v;class w{constructor(){this.contentItemCache=new C.ReversibleMap,this.contentItemCacheId=0,this.createCacheKey=()=>{const t=`entity-${this.contentItemCacheId.toString()}`;return this.contentItemCacheId+=1,t},this.hasKey=t=>this.contentItemCache.hasKey(t),this.getItemOrUndefined=t=>{try{return this.getContentItemOrThrow(t)}catch(t){return}},this.getContentItemOrThrow=(t,e)=>{if(!this.contentItemCache.hasKey(t))throw new Error(\"Layout component has been destroyed or detached from the current layout.\");const i=this.contentItemCache.getValue(t);if(e&&!e.includes(i.type))throw new Error(`Layout item is not the expected type. Expected ${e.join(\", \")}, got ${i.type}.`);return i},this.getOrCreateEntityId=t=>{if(this.contentItemCache.hasValue(t))return this.contentItemCache.getKey(t);t.onDestroyed((()=>{this.contentItemCache.deleteValue(t)}));const e=this.createCacheKey();return this.contentItemCache.setUnique(e,t),e}}static getSingleInstance(){return w.singleton.getValue()}}_=f.LayoutContentCache=w,w.singleton=new y.Lazy((()=>new w));var I={},b={};!function(t){Object.defineProperty(t,\"__esModule\",{value:!0}),t.getAdjacentStacks=t.doShareEdge=t.getAdjacentItem=void 0;t.getAdjacentItem=(e,i)=>{const{parent:n}=e;if(e.isRoot()||!n)return;const o=[\"top\",\"bottom\"].includes(i)?\"column\":\"row\",s=[\"top\",\"left\"].includes(i)?-1:1;if(n.type===o){const t=n.contentItems.indexOf(e)+s;if(t>=0&&t{const n=t.getBounds(),o=e.getBounds();if(!n||!o)return!1;if([\"top\",\"bottom\"].includes(i)){return!(n.righto.right)}return!(n.bottomo.bottom)};t.getAdjacentStacks=(e,i)=>{const n=[\"top\",\"bottom\"].includes(i)?\"row\":\"column\",o=s=>\"stack\"===s.type?(0,t.doShareEdge)(e,s,i)?[s]:[]:\"root\"===s.type||\"ground\"===s.type?[]:s.type===n?s.contentItems.map((t=>o(t))).flat():s.type!==n?[\"top\",\"right\"].includes(i)?o(s.contentItems[s.contentItems.length-1]):o(s.contentItems[0]):[],s=(0,t.getAdjacentItem)(e,i);return s?o(s):[]}}(b);var S=t.commonjsGlobal&&t.commonjsGlobal.__decorate||function(t,e,i,n){var o,s=arguments.length,r=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if(\"object\"==typeof Reflect&&\"function\"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(s<3?o(r):s>3?o(e,i,r):o(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};Object.defineProperty(I,\"__esModule\",{value:!0}),I.LayoutEntitiesController=void 0;const E=t.decorators,x=b,L=i;class z{constructor(t,e,i){this.wire=t,this.layoutManager=e,this.layoutContentCache=i,this.analytics=t=>{this.wire.sendAction(`layout-controller-${t}`).catch((()=>{}))},this.getLayoutIdentityForViewOrThrow=async t=>{const e=this.layoutManager.getLayoutIdentityForView(t);if(!e)throw new Error(`View identity ${t.name} is not attached to any layouts.`);return e},this.getRoot=async t=>{this.analytics(\"get-root\");const e=(await this.getLayout(t)).getRoot();return{type:e.type,entityId:this.layoutContentCache.getOrCreateEntityId(e)}},this.getStackByView=async t=>{this.analytics(\"get-stack-by-view\");const e=await this.getLayoutIdentityForViewOrThrow(t),i=(await this.getLayout(e)).getStackByView(t);if(\"stack\"===i?.type)return{entityId:this.layoutContentCache.getOrCreateEntityId(i),type:\"stack\"}},this.getStackViews=t=>{this.analytics(\"get-stack-views\");return this.layoutContentCache.getContentItemOrThrow(t,[\"stack\"]).contentItems.map((t=>({name:t.viewName,uuid:this.wire.me.uuid})))},this.isRoot=t=>{this.analytics(\"is-root\");return this.layoutContentCache.getContentItemOrThrow(t).isRoot()},this.exists=t=>(this.analytics(\"exists\"),this.layoutContentCache.hasKey(t)),this.addViewToStack=async(t,e,{index:i}={index:0})=>{this.analytics(\"add-view-to-stack\");const n=this.layoutContentCache.getContentItemOrThrow(t);if(i&&i>n.contentItems.length+1)throw new Error(`Index '${i}' out of range, please exclude the index or specify a number between 0 and ${n.contentItems.length}`);const o={id:t,index:i},{identity:s}=await n.layout.platformCreateView(e,{location:o});return s},this.findViewInStack=(t,e)=>t.contentItems.find((t=>t.viewName===e.name)),this.removeViewFromStack=async(t,e)=>{this.analytics(\"remove-view-from-stack\");const i=this.layoutContentCache.getContentItemOrThrow(t,[\"stack\"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to remove a view ('${e.name}') which does not belong to the stack.`);await n.layout.platformCloseView(e)},this.createAdjacentStack=async(t,e,{position:i=\"right\"}={})=>{if(this.analytics(\"create-adjacent-stack\"),!Array.isArray(e)||0===e.length)throw new Error('The parameter \"views\" must be an array with at least 1 element.');if(![\"top\",\"bottom\",\"left\",\"right\"].includes(i))throw new Error(`Invalid position '${i}' specified.`);const n=this.layoutContentCache.getContentItemOrThrow(t).createAdjacentStack({position:i}),o=this.layoutContentCache.getOrCreateEntityId(n);return await Promise.all(e.reverse().map((t=>this.addViewToStack(o,t)))),o},this.getAdjacentStacks=async({targetId:t,edge:e})=>{this.analytics(\"get-adjacent-stacks\");const i=this.layoutContentCache.getContentItemOrThrow(t);return(0,x.getAdjacentStacks)(i,e).map((t=>({entityId:this.layoutContentCache.getOrCreateEntityId(t)})))},this.setStackActiveView=async(t,e)=>{this.analytics(\"set-stack-active-view\");const i=this.layoutContentCache.getContentItemOrThrow(t,[\"stack\"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to set a view ('${e.name}') as active when it does not belong to the stack.`);i.setActiveContentItem(n,!0)}}async getLayout(t){const e=await L.DefaultLayoutManager.resolveLayout(this.layoutManager,t);if(!e)throw new Error(`Could not resolve target layout identity ${JSON.stringify(t)}`);return e}getContent(t){this.analytics(\"get-content\");return this.layoutContentCache.getContentItemOrThrow(t,[\"column\",\"row\"]).contentItems.map((t=>({type:t.type,entityId:this.layoutContentCache.getOrCreateEntityId(t)})))}getParent(t){this.analytics(\"get-parent\");const e=this.layoutContentCache.getContentItemOrThrow(t);if(!e.isRoot())return e.parent?.contentItems.includes(e)?{type:e.parent.type,entityId:this.layoutContentCache.getOrCreateEntityId(e.parent)}:void 0}}S([(0,E.expose)()],z.prototype,\"getLayoutIdentityForViewOrThrow\",void 0),S([(0,E.expose)()],z.prototype,\"getRoot\",void 0),S([(0,E.expose)()],z.prototype,\"getStackByView\",void 0),S([(0,E.expose)()],z.prototype,\"getStackViews\",void 0),S([(0,E.expose)()],z.prototype,\"getContent\",null),S([(0,E.expose)()],z.prototype,\"getParent\",null),S([(0,E.expose)()],z.prototype,\"isRoot\",void 0),S([(0,E.expose)()],z.prototype,\"exists\",void 0),S([(0,E.expose)()],z.prototype,\"addViewToStack\",void 0),S([(0,E.expose)()],z.prototype,\"removeViewFromStack\",void 0),S([(0,E.expose)()],z.prototype,\"createAdjacentStack\",void 0),S([(0,E.expose)()],z.prototype,\"getAdjacentStacks\",void 0),S([(0,E.expose)()],z.prototype,\"setStackActiveView\",void 0),I.LayoutEntitiesController=z,Object.defineProperty(g,\"__esModule\",{value:!0});var M=g.initLayoutEndpoints=void 0;const P=t.apiExposer,T=t.layout_constants,A=f,k=I,D=i;M=g.initLayoutEndpoints=async function(t,e){const i=t.getFin(),n=await i.Platform.getCurrentSync().getClient(),o=new P.ChannelsExposer(n);await new P.ApiExposer(o).exposeInstance(new k.LayoutEntitiesController(t,e,A.LayoutContentCache.getSingleInstance()),{id:T.LAYOUT_CONTROLLER_ID}),await async function(t,e){const i=t=>async i=>{const n=await D.DefaultLayoutManager.resolveLayout(e,i.target);if(!n)throw new Error(`Could not resolve the layout target from payload ${JSON.stringify(i)}`);return t(n,i)},n=(e,n)=>{t.register(e,i(n))},o=(t,e)=>{n(t,e)};n(\"replace-view\",((t,e)=>t.replaceView(e))),n(\"replace-layout\",((t,{layout:e})=>t.replaceLayout(e))),n(\"add-view\",((t,e)=>t.insertView(e))),o(\"layout-add-view\",((t,{viewOptions:e,location:i,targetView:n})=>t.platformCreateView(e,{location:i,targetView:n}))),n(\"close-view\",((t,e)=>t.cleanupView(e.viewIdentity))),o(\"layout-close-view\",((t,e)=>t.platformCloseView(e.viewIdentity))),n(\"apply-preset-layout\",((t,e)=>t.applyPreset(e))),n(\"get-layout-views\",(t=>t.getCurrentViews())),n(\"get-frame-snapshot\",(t=>t.getFrameSnapshot())),n(\"is-visible\",(t=>t.isVisible())),n(\"destroy\",(t=>t.destroy())),t.register(\"get-layout-snapshot\",(()=>e.getLayoutSnapshot()))}(n,e)};var R={};Object.defineProperty(R,\"__esModule\",{value:!0});var U=R.BaseLayout=void 0;U=R.BaseLayout=class{};var O={};Object.defineProperty(O,\"__esModule\",{value:!0});var V=O.DOMEmitter=void 0;V=O.DOMEmitter=class{constructor(t){this.container=t}dispatchLocalEvent(t,e){const i={...e,type:t,tabSelector:`tab-${e.name}`,containerSelector:`container-${e.name}`,topic:\"openfin-DOM-event\"};this.container.dispatchEvent(new CustomEvent(t,{detail:i}))}};var B={};Object.defineProperty(B,\"__esModule\",{value:!0});var H=B.mapLayoutContentItemsImmutableSync=B.mapLayoutContentItemsImmutable=W=B.isVisible=void 0;var W=B.isVisible=t=>(0!==t.offsetWidth||0!==t.offsetHeight)&&\"hidden\"!==window.getComputedStyle(t).visibility&&t.offsetTop>=0&&t.offsetLeft>=0&&t.offsetTop<=window.innerHeight&&t.offsetLeft<=window.innerWidth;const F=t=>\"type\"in t&&\"component\"===t.type;B.mapLayoutContentItemsImmutable=async function t(e,i){return F(i)?e(i):{...i,content:await Promise.all(i.content?.map((i=>t(e,i))))}},H=B.mapLayoutContentItemsImmutableSync=function t(e,i){return F(i)?e(i):{...i,content:i.content?.map((i=>t(e,i)))}};class N extends Error{constructor(t,e){super(e),this.type=t}}class G extends N{constructor(t,e){super(\"Configuration\",t),this.node=e}}class j extends N{constructor(t){super(\"PopoutBlocked\",t)}}class $ extends N{constructor(t){super(\"API\",t)}}class Z extends N{constructor(t){super(\"Bind\",t)}}class q extends Error{constructor(t,e,i){super(`${t}: ${e}${void 0===i?\"\":\": \"+i}`)}}class X extends q{constructor(t,e){super(\"Assert\",t,e)}}class Y extends q{constructor(t,e,i){super(\"UnreachableCase\",t,`${e}${void 0===i?\"\":\": \"+i}`)}}class K extends q{constructor(t,e){super(\"UnexpectedNull\",t,e)}}class J extends q{constructor(t,e){super(\"UnexpectedUndefined\",t,e)}}var Q;!function(t){let e=!1;const i={PopoutCannotBeCreatedWithGroundItemConfig:{id:0,default:\"Popout cannot be created with ground ItemConfig\"},PleaseRegisterAConstructorFunction:{id:1,default:\"Please register a constructor function\"},ComponentTypeNotRegisteredAndBindComponentEventHandlerNotAssigned:{id:2,default:\"Component type not registered and BindComponentEvent handler not assigned\"},ComponentIsAlreadyRegistered:{id:3,default:\"Component is already registered\"},ComponentIsNotVirtuable:{id:4,default:\"Component is not virtuable. Requires rootHtmlElement field/getter\"},VirtualComponentDoesNotHaveRootHtmlElement:{id:5,default:'Virtual component does not have getter \"rootHtmlElement\"'},ItemConfigIsNotTypeComponent:{id:6,default:\"ItemConfig is not of type component\"},InvalidNumberPartInSizeString:{id:7,default:\"Invalid number part in size string\"},UnknownUnitInSizeString:{id:8,default:\"Unknown unit in size string\"},UnsupportedUnitInSizeString:{id:9,default:\"Unsupported unit in size string\"}};t.idCount=Object.keys(i).length;const n=Object.values(i);t.checkInitialise=function(){if(!e)for(let e=0;e=\"0\"&&t<=\"9\"}function Tt(t,e){const i=zt(e);t.style.width=i}function At(t,e){const i=zt(e);t.style.height=i}function kt(t){return{width:t.offsetWidth,height:t.offsetHeight}}function Dt(t,e){t.style.display=e?\"\":\"none\"}function Rt(t,e){if(void 0!==e)for(const i in e)if(e.hasOwnProperty(i)){const n=e[i],o=t[i];t[i]=Ut(o,n)}return t}function Ut(t,e){if(\"object\"!=typeof e)return e;if(Array.isArray(e)){const t=e.length,i=new Array(t);for(let n=0;n36)throw new Error(\"Too many keys in config minifier map\")},t.translateObject=n}(dt||(dt={})),function(t){t.defaults={type:at.ground,content:[],size:1,sizeUnit:ht.Fractional,minSize:void 0,minSizeUnit:ht.Pixel,id:\"\",isClosable:!0},t.createCopy=function(t,e){switch(t.type){case at.ground:case at.row:case at.column:return gt.createCopy(t,e);case at.stack:return ut.createCopy(t,e);case at.component:return pt.createCopy(t);default:throw new Y(\"CICC91354\",t.type,\"Invalid Config Item type specified\")}},t.createDefault=function(t){switch(t){case at.ground:throw new X(\"CICCDR91562\");case at.row:case at.column:return gt.createDefault(t);case at.stack:return ut.createDefault();case at.component:return pt.createDefault();default:throw new Y(\"CICCDD91563\",t,\"Invalid Config Item type specified\")}},t.isComponentItem=function(t){return t.type===at.component},t.isStackItem=function(t){return t.type===at.stack},t.isGroundItem=function(t){return t.type===at.ground}}(ct||(ct={})),function(t){t.defaultMaximised=!1,function(t){t.createCopy=function(t,e){return void 0===t?void 0:{show:null!=e?e:t.show,popout:t.popout,close:t.close,maximise:t.maximise,minimise:t.minimise,tabDropdown:t.tabDropdown}}}(t.Header||(t.Header={}))}(mt||(mt={})),function(t){function e(t){const e=t.length,i=new Array(e);for(let n=0;n\"__glMaximised\"===t));t>0&&(o=!0,n=n.splice(t,1)),e=n.length>0?n[0]:ct.defaults.id}else e=n;return i=void 0!==t.maximised?t.maximised:o,{id:e,maximised:i}}}(wt||(wt={})),function(t){function e(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0;return{resolved:!0,root:Et.resolve(i),openPopouts:t.resolveOpenPopouts(e.openPopouts),dimensions:t.Dimensions.resolve(e.dimensions),settings:t.Settings.resolve(e.settings),header:t.Header.resolve(e.header,e.settings,e.labels)}}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:Lt.fromResolvedArray(e.openPopouts),settings:_t.Settings.createCopy(e.settings),dimensions:t.Dimensions.fromResolved(e.dimensions),header:_t.Header.createCopy(e.header)}},t.isResolved=function(t){const e=t;return void 0!==e.resolved&&!0===e.resolved},t.resolveOpenPopouts=function(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0,{root:Et.resolve(o),openPopouts:xt.resolveOpenPopouts(e.openPopouts),dimensions:xt.Dimensions.resolve(e.dimensions),settings:xt.Settings.resolve(e.settings),header:xt.Header.resolve(e.header,e.settings,e.labels),parentId:null!==(i=e.parentId)&&void 0!==i?i:null,indexInParent:null!==(n=e.indexInParent)&&void 0!==n?n:null,window:t.Window.resolve(e.window,e.dimensions),resolved:!0}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:i(e.openPopouts),dimensions:xt.Dimensions.fromResolved(e.dimensions),settings:_t.Settings.createCopy(e.settings),header:_t.Header.createCopy(e.header),parentId:e.parentId,indexInParent:e.indexInParent,window:t.Window.fromResolved(e.window)}},t.fromResolvedArray=i}(Lt||(Lt={}));class Wt{constructor(){this._allEventSubscriptions=[],this._subscriptionsMap=new Map,this.unbind=this.removeEventListener,this.trigger=this.emit}tryBubbleEvent(t,e){}emit(t,...e){let i=this._subscriptionsMap.get(t);if(void 0!==i){i=i.slice();for(let t=0;t0){const n=e.slice();n.unshift(t);const o=this._allEventSubscriptions.slice();for(let t=0;t0?n.contentItems[0]:n,e=0);const o=this._layoutManager.createAndInitContentItem(i,t);t.addChild(o,e),this._layoutManager.layoutConfig.settings.popInOnClose?this._onClose():this.close()}createWindow(){const t=this.createUrl(),e=Math.floor(1e6*Math.random()).toString(36),i=this.serializeWindowFeatures({width:this._initialWindowSize.width,height:this._initialWindowSize.height,innerWidth:this._initialWindowSize.width,innerHeight:this._initialWindowSize.height,menubar:\"no\",toolbar:\"no\",location:\"no\",personalbar:\"no\",resizable:\"yes\",scrollbars:\"no\",status:\"no\"});if(this._popoutWindow=globalThis.open(t,e,i),this._popoutWindow)this._popoutWindow.addEventListener(\"load\",(()=>this.positionWindow()),{passive:!0}),this._popoutWindow.addEventListener(\"beforeunload\",(()=>{this._layoutManager.layoutConfig.settings.popInOnClose?this.popIn():this._onClose()}),{passive:!0}),this._checkReadyInterval=setInterval((()=>this.checkReady()),10);else if(!0===this._layoutManager.layoutConfig.settings.blockedPopoutsThrowError){throw new j(\"Popout blocked\")}}checkReady(){if(null===this._popoutWindow)throw new K(\"BPCR01844\");this._popoutWindow.__glInstance&&this._popoutWindow.__glInstance.isInitialised&&(this.onInitialised(),void 0!==this._checkReadyInterval&&(clearInterval(this._checkReadyInterval),this._checkReadyInterval=void 0))}serializeWindowFeatures(t){const e=[];for(const i in t)e.push(i+\"=\"+t[i].toString());return e.join(\",\")}createUrl(){const t=\"gl-window-config-\"+Ot(),e=_t.minifyConfig(this._config);try{localStorage.setItem(t,JSON.stringify(e))}catch(t){throw new Error(\"Error while writing to localStorage \"+function(t){return t instanceof Error?t.message:\"string\"==typeof t?t:\"Unknown Error\"}(t))}const i=new URL(location.href);return i.searchParams.set(\"gl-window\",t),i.toString()}positionWindow(){if(null===this._popoutWindow)throw new Error(\"BrowserPopout.positionWindow: null popoutWindow\");this._popoutWindow.moveTo(this._initialWindowSize.left,this._initialWindowSize.top),this._popoutWindow.focus()}onInitialised(){this._isInitialised=!0,this.getGlInstance().on(\"popIn\",(()=>this.popIn())),this.emit(\"initialised\")}_onClose(){setTimeout((()=>this.emit(\"closed\")),50)}}class Gt extends Wt{constructor(t,e,i,n){super(),this.layoutManager=t,this._parent=i,this._element=n,this._popInParentIds=[],this._type=e.type,this._id=e.id,this._isInitialised=!1,this.isGround=!1,this.isRow=!1,this.isColumn=!1,this.isStack=!1,this.isComponent=!1,this.size=e.size,this.sizeUnit=e.sizeUnit,this.minSize=e.minSize,this.minSizeUnit=e.minSizeUnit,this._isClosable=e.isClosable,this._pendingEventPropagations={},this._throttledEvents=[\"stateChanged\"],this._contentItems=this.createContentItems(e.content)}get type(){return this._type}get id(){return this._id}set id(t){this._id=t}get popInParentIds(){return this._popInParentIds}get parent(){return this._parent}get contentItems(){return this._contentItems}get isClosable(){return this._isClosable}get element(){return this._element}get isInitialised(){return this._isInitialised}static isStack(t){return t.isStack}static isComponentItem(t){return t.isComponent}static isComponentParentableItem(t){return t.isStack||t.isGround}removeChild(t,e=!1){const i=this._contentItems.indexOf(t);if(-1===i)throw new Error(\"Can't remove child item. Unknown content item\");if(e||this._contentItems[i].destroy(),this._contentItems.splice(i,1),this._contentItems.length>0)this.updateSize(!1);else if(!this.isGround&&!0===this._isClosable){if(null===this._parent)throw new K(\"CIUC00874\");this._parent.removeChild(this)}}addChild(t,e,i){return null!=e||(e=this._contentItems.length),this._contentItems.splice(e,0,t),t.setParent(this),!0===this._isInitialised&&!1===t._isInitialised&&t.init(),e}replaceChild(t,e,i=!1){const n=this._contentItems.indexOf(t),o=t._element.parentNode;if(-1===n)throw new X(\"CIRCI23232\",\"Can't replace child. oldChild is not child of this\");if(null===o)throw new K(\"CIRCP23232\");if(o.replaceChild(e._element,t._element),!0===i&&(t._parent=null,t.destroy()),this._contentItems[n]=e,e.setParent(this),e.size=t.size,e.sizeUnit=t.sizeUnit,e.minSize=t.minSize,e.minSizeUnit=t.minSizeUnit,null===e._parent)throw new K(\"CIRCNC45699\");!0===e._parent._isInitialised&&!1===e._isInitialised&&e.init(),this.updateSize(!1)}remove(){if(null===this._parent)throw new K(\"CIR11110\");this._parent.removeChild(this)}popout(){const t=Ot(),e=this.layoutManager.createPopoutFromContentItem(this,void 0,t,void 0);return this.emitBaseBubblingEvent(\"stateChanged\"),e}calculateConfigContent(){const t=this._contentItems,e=t.length,i=new Array(e);for(let n=0;nthis.propagateEventToLayoutManager(t,e))))}propagateEventToLayoutManager(t,e){this._pendingEventPropagations[t]=!1,this.layoutManager.emitUnknown(t,e)}}class jt extends Gt{constructor(t,e,i){super(t,e,i,document.createElement(\"div\")),this._parentItem=i,this._focused=!1,this.isComponent=!0,this._reorderEnabled=e.reorderEnabled,this.applyUpdatableConfig(e),this._initialWantMaximise=e.maximised;const n=document.createElement(\"div\");n.classList.add(\"lm_content\"),this.element.appendChild(n),this._container=new Ft(e,this,t,n,(t=>this.handleUpdateItemConfigEvent(t)),(()=>this.show()),(()=>this.hide()),(t=>this.focus(t)),(t=>this.blur(t)))}get componentName(){return this._container.componentType}get componentType(){return this._container.componentType}get reorderEnabled(){return this._reorderEnabled}get initialWantMaximise(){return this._initialWantMaximise}get component(){return this._container.component}get container(){return this._container}get parentItem(){return this._parentItem}get headerConfig(){return this._headerConfig}get title(){return this._title}get tab(){return this._tab}get focused(){return this._focused}destroy(){this._container.destroy(),super.destroy()}applyUpdatableConfig(t){this.setTitle(t.title),this._headerConfig=t.header}toConfig(){const t=this._container.stateRequestEvent,e=void 0===t?this._container.state:t();return{type:at.component,content:[],size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,maximised:!1,isClosable:this.isClosable,reorderEnabled:this._reorderEnabled,title:this._title,header:mt.Header.createCopy(this._headerConfig),componentType:pt.copyComponentType(this.componentType),componentState:e}}close(){if(null===this.parent)throw new K(\"CIC68883\");this.parent.removeChild(this,!1)}enterDragMode(t,e){Tt(this.element,t),At(this.element,e),this._container.enterDragMode(t,e)}exitDragMode(){this._container.exitDragMode()}enterStackMaximised(){this._container.enterStackMaximised()}exitStackMaximised(){this._container.exitStackMaximised()}drag(){this._container.drag()}updateSize(t){this.updateNodeSize(t)}init(){this.updateNodeSize(!1),super.init(),this._container.emit(\"open\"),this.initContentItems()}setTitle(t){this._title=t,this.emit(\"titleChanged\",t),this.emit(\"stateChanged\")}setTab(t){this._tab=t,this.emit(\"tab\",t),this._container.setTab(t)}hide(){super.hide(),this._container.setVisibility(!1)}show(){super.show(),this._container.setVisibility(!0)}focus(t=!1){this.parentItem.setActiveComponentItem(this,!0,t)}setFocused(t){this._focused=!0,this.tab.setFocused(),t||this.emitBaseBubblingEvent(\"focus\")}blur(t=!1){this._focused&&this.layoutManager.setFocusedComponentItem(void 0,t)}setBlurred(t){this._focused=!1,this.tab.setBlurred(),t||this.emitBaseBubblingEvent(\"blur\")}setParent(t){this._parentItem=t,super.setParent(t)}handleUpdateItemConfigEvent(t){this.applyUpdatableConfig(t)}updateNodeSize(t){if(\"none\"!==this.element.style.display){const{width:e,height:i}=kt(this.element);this._container.setSizeToNodeSize(e,i,t)}}}class $t extends Gt{constructor(){super(...arguments),this._focused=!1}get focused(){return this._focused}setFocusedValue(t){this._focused=t}}class Zt extends Wt{constructor(t,e){super(),this._eElement=t,this._pointerTracking=!1,this._pointerDownEventListener=t=>this.onPointerDown(t),this._pointerMoveEventListener=t=>this.onPointerMove(t),this._pointerUpEventListener=t=>this.onPointerUp(t),this._timeout=void 0,this._allowableTargets=[t,...e],this._oDocument=document,this._eBody=document.body,this._nDelay=1800,this._nDistance=10,this._nX=0,this._nY=0,this._nOriginalX=0,this._nOriginalY=0,this._dragging=!1,this._eElement.addEventListener(\"pointerdown\",this._pointerDownEventListener,{passive:!0})}destroy(){this.checkRemovePointerTrackingEventListeners(),this._eElement.removeEventListener(\"pointerdown\",this._pointerDownEventListener)}cancelDrag(){this.processDragStop(void 0)}onPointerDown(t){if(this._allowableTargets.includes(t.target)&&t.isPrimary){const e=this.getPointerCoordinates(t);this.processPointerDown(e)}}processPointerDown(t){this._nOriginalX=t.x,this._nOriginalY=t.y,this._oDocument.addEventListener(\"pointermove\",this._pointerMoveEventListener),this._oDocument.addEventListener(\"pointerup\",this._pointerUpEventListener,{passive:!0}),this._pointerTracking=!0,this._timeout=setTimeout((()=>{try{this.startDrag()}catch(t){throw console.error(t),t}}),this._nDelay)}onPointerMove(t){this._pointerTracking&&(this.processDragMove(t),t.preventDefault())}processDragMove(t){this._nX=t.pageX-this._nOriginalX,this._nY=t.pageY-this._nOriginalY,!1===this._dragging&&(Math.abs(this._nX)>this._nDistance||Math.abs(this._nY)>this._nDistance)&&this.startDrag(),this._dragging&&this.emit(\"drag\",this._nX,this._nY,t)}onPointerUp(t){this.processDragStop(t)}processDragStop(t){var e;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this.checkRemovePointerTrackingEventListeners(),!0===this._dragging&&(this._eBody.classList.remove(\"lm_dragging\"),this._eElement.classList.remove(\"lm_dragging\"),null===(e=this._oDocument.querySelector(\"iframe\"))||void 0===e||e.style.setProperty(\"pointer-events\",\"\"),this._dragging=!1,this.emit(\"dragStop\",t))}checkRemovePointerTrackingEventListeners(){this._pointerTracking&&(this._oDocument.removeEventListener(\"pointermove\",this._pointerMoveEventListener),this._oDocument.removeEventListener(\"pointerup\",this._pointerUpEventListener),this._pointerTracking=!1)}startDrag(){var t;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this._dragging=!0,this._eBody.classList.add(\"lm_dragging\"),this._eElement.classList.add(\"lm_dragging\"),null===(t=this._oDocument.querySelector(\"iframe\"))||void 0===t||t.style.setProperty(\"pointer-events\",\"none\"),this.emit(\"dragStart\",this._nOriginalX,this._nOriginalY)}getPointerCoordinates(t){return{x:t.pageX,y:t.pageY}}}class qt{constructor(t,e,i){this._isVertical=t,this._size=e,this._grabSize=i0){const i=this.createSplitter(Math.max(0,e-1)).element;e>0?(this.contentItems[e-1].element.insertAdjacentElement(\"afterend\",i),i.insertAdjacentElement(\"afterend\",t.element)):(this.contentItems[0].element.insertAdjacentElement(\"beforebegin\",i),i.insertAdjacentElement(\"beforebegin\",t.element))}else this._childElementContainer.appendChild(t.element);super.addChild(t,e);const n=1/this.contentItems.length*100;if(!0===i)return this.emitBaseBubblingEvent(\"stateChanged\"),e;for(let e=0;e0&&(this.calculateRelativeSizes(),this.setAbsoluteSizes()),this.emitBaseBubblingEvent(\"stateChanged\"),this.emit(\"resize\")}setAbsoluteSizes(){const t=this.calculateAbsoluteSizes();for(let e=0;e0&&t.itemSizes[e]++,this._isColumn?(Tt(this.contentItems[e].element,t.crossAxisSize),At(this.contentItems[e].element,t.itemSizes[e])):(Tt(this.contentItems[e].element,t.itemSizes[e]),At(this.contentItems[e].element,t.crossAxisSize))}calculateAbsoluteSizes(){const t=(this.contentItems.length-1)*this._splitterSize,{width:e,height:i}=kt(this.element);let n,o;this._isColumn?(n=i-t,o=e):(n=e-t,o=i);let s=0;const r=[];for(let t=0;t0){const n=100-t;for(let t=0;t100&&e.length>0){for(let t=0;te)return;{const r=i/e;let a=i;for(let e=0;ethis.onSplitterDrag(e,t,i))),e.on(\"dragStop\",(()=>this.onSplitterDragStop(e))),e.on(\"dragStart\",(()=>this.onSplitterDragStart(e))),this._splitter.splice(t,0,e),e}getSplitItems(t){const e=this._splitter.indexOf(t);return{before:this.contentItems[e],after:this.contentItems[e+1]}}calculateContentItemMinSize(t){const e=t.minSize;if(void 0!==e){if(t.minSizeUnit===ht.Pixel)return e;throw new X(\"ROCGMD98831\",JSON.stringify(t))}{const t=this.layoutManager.layoutConfig.dimensions;return this._isColumn?t.defaultMinItemHeight:t.defaultMinItemWidth}}calculateContentItemsTotalMinSize(t){let e=0;for(const i of t)e+=this.calculateContentItemMinSize(i);return e}onSplitterDragStart(t){const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=this.calculateContentItemsTotalMinSize(e.before.contentItems),s=this.calculateContentItemsTotalMinSize(e.after.contentItems);this._splitterPosition=0,this._splitterMinPosition=-1*(i-o),this._splitterMaxPosition=n-s}onSplitterDrag(t,e,i){let n=this._isColumn?i:e;if(null===this._splitterMinPosition||null===this._splitterMaxPosition)throw new K(\"ROCOSD59226\");n=Math.max(n,this._splitterMinPosition),n=Math.min(n,this._splitterMaxPosition),this._splitterPosition=n;const o=zt(n);this._isColumn?t.element.style.top=o:t.element.style.left=o}onSplitterDragStop(t){if(null===this._splitterPosition)throw new K(\"ROCOSDS66932\");{const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=(this._splitterPosition+i)/(i+n),s=e.before.size+e.after.size;e.before.size=o*s,e.after.size=(1-o)*s,t.element.style.top=zt(0),t.element.style.left=zt(0),globalThis.requestAnimationFrame((()=>this.updateSize(!1)))}}}!function(t){t.getElementDimensionSize=function(t,e){return\"width\"===e?function(t){return t.offsetWidth}(t):function(t){return t.offsetHeight}(t)},t.setElementDimensionSize=function(t,e,i){return\"width\"===e?Tt(t,i):At(t,i)},t.createElement=function(t,e){const i=t.createElement(\"div\");return i.classList.add(\"lm_item\"),e?i.classList.add(\"lm_column\"):i.classList.add(\"lm_row\"),i}}(Xt||(Xt={}));class Yt extends $t{constructor(t,e,i){super(t,vt.create(e),null,Yt.createElement(document)),this.isGround=!0,this._childElementContainer=this.element,this._containerElement=i;let n=null;for(;;){const t=n?n.previousSibling:this._containerElement.lastChild;if(!(t instanceof Element&&t.classList.contains(\"lm_content\")))break;n=t}this._containerElement.insertBefore(this.element,n)}init(){if(!0!==this.isInitialised){this.updateNodeSize();for(let t=0;t0?this.contentItems[0]:this,n.isComponent)throw new Error(\"Cannot add item as child to ComponentItem\");{const t=this.layoutManager.createAndInitContentItem(i,n);return e=n.addChild(t,e),n===this?-1:e}}loadComponentAsRoot(t){this.clearRoot();const e=Ct.resolve(t,!1);if(e.maximised)throw new Error(\"Root Component cannot be maximised\");{const t=new jt(this.layoutManager,e,this);t.init(),this.addChild(t,0)}}addChild(t,e){if(this.contentItems.length>0)throw new Error(\"Ground node can only have a single child\");return this._childElementContainer.appendChild(t.element),e=super.addChild(t,e),this.updateSize(!1),this.emitBaseBubblingEvent(\"stateChanged\"),e}calculateConfigContent(){const t=this.contentItems,e=t.length,i=new Array(e);for(let n=0;n0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e)),this.updateContentItemsSize(!1))}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}createSideAreas(){const t=Yt.Area.oppositeSides,e=new Array(Object.keys(t).length);let i=0;for(const n in t){const o=n,s=this.getElementArea();if(null===s)throw new K(\"RCSA77553\");s.side=o,\"2\"===t[o][1]?s[o]=s[t[o]]-50:s[o]=s[t[o]]+50,s.surface=(s.x2-s.x1)*(s.y2-s.y1),e[i++]=s}return e}highlightDropZone(t,e,i){this.layoutManager.tabDropPlaceholder.remove(),super.highlightDropZone(t,e,i)}onDrop(t,e){if(t.isComponent){const e=ut.createDefault(),i=t;e.header=mt.Header.createCopy(i.headerConfig);const n=this.layoutManager.createAndInitContentItem(e,this);n.addChild(t),t=n}if(0===this.contentItems.length)this.addChild(t);else{if(t.type===at.row||t.type===at.column){const e=ut.createDefault(),i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}const i=\"x\"==e.side[0]?at.row:at.column,n=\"2\"==e.side[1],o=this.contentItems[0];if(o instanceof Xt&&o.type===i){const e=o.contentItems[n?0:o.contentItems.length-1];o.addChild(t,n?0:void 0,!0),e.size*=.5,t.size=e.size,t.sizeUnit=ht.Percent,o.updateSize(!1)}else{const e=ct.createDefault(i),s=this.layoutManager.createContentItem(e,this);this.replaceChild(o,s),s.addChild(t,n?0:void 0,!0),s.addChild(o,n?void 0:0,!0),o.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}}dock(){throw new X(\"GID87731\")}validateDocking(){throw new X(\"GIVD87732\")}getAllContentItems(){const t=[this];return this.deepGetAllContentItems(this.contentItems,t),t}getConfigMaximisedItems(){const t=[];return this.deepFilterContentItems(this.contentItems,t,(t=>!(!Gt.isStack(t)||!t.initialWantMaximise)||!(!Gt.isComponentItem(t)||!t.initialWantMaximise))),t}getItemsByPopInParentId(t){const e=[];return this.deepFilterContentItems(this.contentItems,e,(e=>e.popInParentIds.includes(t))),e}toConfig(){throw new Error(\"Cannot generate GroundItem config\")}setActiveComponentItem(t,e,i){}updateNodeSize(){const{width:t,height:e}=kt(this._containerElement);Tt(this.element,t),At(this.element,e),this.contentItems.length>0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e))}deepGetAllContentItems(t,e){for(let i=0;ithis.onClick(t),this._touchStartEventListener=t=>this.onTouchStart(t),this._element=document.createElement(\"div\"),this._element.classList.add(i),this._element.title=e,this._header.on(\"destroy\",(()=>this.destroy())),this._element.addEventListener(\"click\",this._clickEventListener,{passive:!0}),this._element.addEventListener(\"touchstart\",this._touchStartEventListener,{passive:!0}),this._header.controlsContainerElement.appendChild(this._element)}get element(){return this._element}destroy(){var t;this._element.removeEventListener(\"click\",this._clickEventListener),this._element.removeEventListener(\"touchstart\",this._touchStartEventListener),null===(t=this._element.parentNode)||void 0===t||t.removeChild(this._element)}onClick(t){this._pushEvent(t)}onTouchStart(t){this._pushEvent(t)}}class Jt{constructor(t,e,i,n,o){var s;this._layoutManager=t,this._componentItem=e,this._closeEvent=i,this._focusEvent=n,this._dragStartEvent=o,this._isActive=!1,this._tabClickListener=t=>this.onTabClickDown(t),this._tabTouchStartListener=t=>this.onTabTouchStart(t),this._closeClickListener=()=>this.onCloseClick(),this._closeTouchStartListener=()=>this.onCloseTouchStart(),this._dragStartListener=(t,e)=>this.onDragStart(t,e),this._contentItemDestroyListener=()=>this.onContentItemDestroy(),this._tabTitleChangedListener=t=>this.setTitle(t),this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_tab\"),this._titleElement=document.createElement(\"span\"),this._titleElement.classList.add(\"lm_title\"),this._closeElement=document.createElement(\"div\"),this._closeElement.classList.add(\"lm_close_tab\"),this._element.appendChild(this._titleElement),this._element.appendChild(this._closeElement),e.isClosable?this._closeElement.style.display=\"\":this._closeElement.style.display=\"none\",this.setTitle(e.title),this._componentItem.on(\"titleChanged\",this._tabTitleChangedListener);(null!==(s=e.reorderEnabled)&&void 0!==s?s:this._layoutManager.layoutConfig.settings.reorderEnabled)&&this.enableReorder(),this._element.addEventListener(\"click\",this._tabClickListener,{passive:!0}),this._element.addEventListener(\"touchstart\",this._tabTouchStartListener,{passive:!0}),this._componentItem.isClosable?(this._closeElement.addEventListener(\"click\",this._closeClickListener,{passive:!0}),this._closeElement.addEventListener(\"touchstart\",this._closeTouchStartListener,{passive:!0})):(this._closeElement.remove(),this._closeElement=void 0),this._componentItem.setTab(this),this._layoutManager.emit(\"tabCreated\",this)}get isActive(){return this._isActive}get componentItem(){return this._componentItem}get contentItem(){return this._componentItem}get element(){return this._element}get titleElement(){return this._titleElement}get closeElement(){return this._closeElement}get reorderEnabled(){return void 0!==this._dragListener}set reorderEnabled(t){t!==this.reorderEnabled&&(t?this.enableReorder():this.disableReorder())}setTitle(t){this._titleElement.innerText=t,this._element.title=t}setActive(t){t!==this._isActive&&(this._isActive=t,t?this._element.classList.add(\"lm_active\"):this._element.classList.remove(\"lm_active\"))}destroy(){var t,e;this._closeEvent=void 0,this._focusEvent=void 0,this._dragStartEvent=void 0,this._element.removeEventListener(\"click\",this._tabClickListener),this._element.removeEventListener(\"touchstart\",this._tabTouchStartListener),null===(t=this._closeElement)||void 0===t||t.removeEventListener(\"click\",this._closeClickListener),null===(e=this._closeElement)||void 0===e||e.removeEventListener(\"touchstart\",this._closeTouchStartListener),this._componentItem.off(\"titleChanged\",this._tabTitleChangedListener),this.reorderEnabled&&this.disableReorder(),this._element.remove()}setBlurred(){this._element.classList.remove(\"lm_focused\"),this._titleElement.classList.remove(\"lm_focused\")}setFocused(){this._element.classList.add(\"lm_focused\"),this._titleElement.classList.add(\"lm_focused\")}onDragStart(t,e){if(void 0===this._dragListener)throw new J(\"TODSDLU10093\");if(void 0===this._dragStartEvent)throw new J(\"TODS23309\");this._dragStartEvent(t,e,this._dragListener,this.componentItem)}onContentItemDestroy(){void 0!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=void 0)}onTabClickDown(t){const e=t.target;e!==this._element&&e!==this._titleElement||(0===t.button?this.notifyFocus():1===t.button&&this._componentItem.isClosable&&this.notifyClose())}onTabTouchStart(t){t.target===this._element&&this.notifyFocus()}onCloseClick(){this.notifyClose()}onCloseTouchStart(){this.notifyClose()}notifyClose(){if(void 0===this._closeEvent)throw new J(\"TNC15007\");this._closeEvent(this._componentItem)}notifyFocus(){if(void 0===this._focusEvent)throw new J(\"TNA15007\");this._focusEvent(this._componentItem)}enableReorder(){this._dragListener=new Zt(this._element,[this._titleElement]),this._dragListener.on(\"dragStart\",this._dragStartListener),this._componentItem.on(\"destroy\",this._contentItemDestroyListener)}disableReorder(){if(void 0===this._dragListener)throw new J(\"TDR87745\");this._componentItem.off(\"destroy\",this._contentItemDestroyListener),this._dragListener.off(\"dragStart\",this._dragStartListener),this._dragListener=void 0}}class Qt{constructor(t,e,i,n,o){this._layoutManager=t,this._componentRemoveEvent=e,this._componentFocusEvent=i,this._componentDragStartEvent=n,this._dropdownActiveChangedEvent=o,this._tabs=[],this._lastVisibleTabIndex=-1,this._dropdownActive=!1,this._element=document.createElement(\"section\"),this._element.classList.add(\"lm_tabs\"),this._dropdownElement=document.createElement(\"section\"),this._dropdownElement.classList.add(\"lm_tabdropdown_list\"),this._dropdownElement.style.display=\"none\"}get tabs(){return this._tabs}get tabCount(){return this._tabs.length}get lastVisibleTabIndex(){return this._lastVisibleTabIndex}get element(){return this._element}get dropdownElement(){return this._dropdownElement}get dropdownActive(){return this._dropdownActive}destroy(){for(let t=0;tthis.handleTabCloseEvent(t)),(t=>this.handleTabFocusEvent(t)),((t,e,i,n)=>this.handleTabDragStartEvent(t,e,i,n)));void 0===e&&(e=this._tabs.length),this._tabs.splice(e,0,i),ethis._lastVisibleTabIndex){const t=this._tabs[e];for(let t=e;t>0;t--)this._tabs[t]=this._tabs[t-1];this._tabs[0]=t}}updateTabSizes(t,e){let i=!1;this.tryUpdateTabSizes(i,t,e)||(i=!0,this.tryUpdateTabSizes(i,t,e)),i!==this._dropdownActive&&(this._dropdownActive=i,this._dropdownActiveChangedEvent())}tryUpdateTabSizes(t,e,i){if(this._tabs.length>0){if(void 0===i)throw new Error(\"non-empty tabs must have active component item\");let n=0,o=!1;const s=this._layoutManager.layoutConfig.settings.tabOverlapAllowance,r=this._tabs.indexOf(i.tab),a=this._tabs[r];this._lastVisibleTabIndex=-1;for(let i=0;ie){if(o)i===r&&(l.style.zIndex=\"auto\",l.style.marginLeft=\"\",l.parentElement!==this._element&&this._element.appendChild(l));else{let t;if(t=r>0&&r<=i?(d-e)/(i-1):(d-e)/i,tthis.onClick(t),this._touchStartListener=t=>this.onTouchStart(t),this._rowColumnClosable=!0,this._closeButton=null,this._popoutButton=null,this._tabsContainer=new Qt(this._layoutManager,(t=>this.handleTabInitiatedComponentRemoveEvent(t)),(t=>this.handleTabInitiatedComponentFocusEvent(t)),((t,e,i,n)=>this.handleTabInitiatedDragStartEvent(t,e,i,n)),(()=>this.processTabDropdownActiveChanged())),this._show=i.show,this._popoutEnabled=i.popoutEnabled,this._popoutLabel=i.popoutLabel,this._maximiseEnabled=i.maximiseEnabled,this._maximiseLabel=i.maximiseLabel,this._minimiseEnabled=i.minimiseEnabled,this._minimiseLabel=i.minimiseLabel,this._closeEnabled=i.closeEnabled,this._closeLabel=i.closeLabel,this._tabDropdownEnabled=i.tabDropdownEnabled,this._tabDropdownLabel=i.tabDropdownLabel,this.setSide(i.side),this._canRemoveComponent=this._configClosable,this._element=document.createElement(\"section\"),this._element.classList.add(\"lm_header\"),this._controlsContainerElement=document.createElement(\"section\"),this._controlsContainerElement.classList.add(\"lm_controls\"),this._element.appendChild(this._tabsContainer.element),this._element.appendChild(this._controlsContainerElement),this._element.appendChild(this._tabsContainer.dropdownElement),this._element.addEventListener(\"click\",this._clickListener,{passive:!0}),this._element.addEventListener(\"touchstart\",this._touchStartListener,{passive:!0}),this._documentMouseUpListener=()=>this._tabsContainer.hideAdditionalTabsDropdown(),globalThis.document.addEventListener(\"mouseup\",this._documentMouseUpListener,{passive:!0}),this._tabControlOffset=this._layoutManager.layoutConfig.settings.tabControlOffset,this._tabDropdownEnabled&&(this._tabDropdownButton=new Kt(this,this._tabDropdownLabel,\"lm_tabdropdown\",(()=>this._tabsContainer.showAdditionalTabsDropdown()))),this._popoutEnabled&&(this._popoutButton=new Kt(this,this._popoutLabel,\"lm_popout\",(()=>this.handleButtonPopoutEvent()))),this._maximiseEnabled&&(this._maximiseButton=new Kt(this,this._maximiseLabel,\"lm_maximise\",(t=>this.handleButtonMaximiseToggleEvent(t)))),this._configClosable&&(this._closeButton=new Kt(this,this._closeLabel,\"lm_close\",(()=>s()))),this.processTabDropdownActiveChanged()}get show(){return this._show}get side(){return this._side}get leftRightSided(){return this._leftRightSided}get layoutManager(){return this._layoutManager}get parent(){return this._parent}get tabs(){return this._tabsContainer.tabs}get lastVisibleTabIndex(){return this._tabsContainer.lastVisibleTabIndex}get element(){return this._element}get tabsContainerElement(){return this._tabsContainer.element}get controlsContainerElement(){return this._controlsContainerElement}destroy(){this.emit(\"destroy\"),this._popoutEvent=void 0,this._maximiseToggleEvent=void 0,this._clickEvent=void 0,this._touchStartEvent=void 0,this._componentRemoveEvent=void 0,this._componentFocusEvent=void 0,this._componentDragStartEvent=void 0,this._tabsContainer.destroy(),globalThis.document.removeEventListener(\"mouseup\",this._documentMouseUpListener),this._element.remove()}createTab(t,e){this._tabsContainer.createTab(t,e)}removeTab(t){this._tabsContainer.removeTab(t)}processActiveComponentChanged(t){this._tabsContainer.processActiveComponentChanged(t),this.updateTabSizes()}setSide(t){this._side=t,this._leftRightSided=[nt.right,nt.left].includes(this._side)}setRowColumnClosable(t){this._rowColumnClosable=t,this.updateClosability()}updateClosability(){let t;if(this._configClosable)if(this._rowColumnClosable){t=!0;const e=this.tabs.length;for(let i=0;i1}applyFocusedValue(t){t?this._element.classList.add(\"lm_focused\"):this._element.classList.remove(\"lm_focused\")}processMaximised(){if(void 0===this._maximiseButton)throw new J(\"HPMAX16997\");this._maximiseButton.element.setAttribute(\"title\",this._minimiseLabel)}processMinimised(){if(void 0===this._maximiseButton)throw new J(\"HPMIN16997\");this._maximiseButton.element.setAttribute(\"title\",this._maximiseLabel)}updateTabSizes(){if(this._tabsContainer.tabCount>0){const t=this._show?this._layoutManager.layoutConfig.dimensions.headerHeight:0;let e;this._leftRightSided?(this._element.style.height=\"\",this._element.style.width=zt(t)):(this._element.style.width=\"\",this._element.style.height=zt(t)),e=this._leftRightSided?this._element.offsetHeight-this._controlsContainerElement.offsetHeight-this._tabControlOffset:this._element.offsetWidth-this._controlsContainerElement.offsetWidth-this._tabControlOffset,this._tabsContainer.updateTabSizes(e,this._getActiveComponentItemEvent())}}handleTabInitiatedComponentRemoveEvent(t){if(this._canRemoveComponent){if(void 0===this._componentRemoveEvent)throw new J(\"HHTCE22294\");this._componentRemoveEvent(t)}}handleTabInitiatedComponentFocusEvent(t){if(void 0===this._componentFocusEvent)throw new J(\"HHTAE22294\");this._componentFocusEvent(t)}handleTabInitiatedDragStartEvent(t,e,i,n){if(this._canRemoveComponent){if(void 0===this._componentDragStartEvent)throw new J(\"HHTDSE22294\");this._componentDragStartEvent(t,e,i,n)}else i.cancelDrag()}processTabDropdownActiveChanged(){void 0!==this._tabDropdownButton&&Dt(this._tabDropdownButton.element,this._tabsContainer.dropdownActive)}handleButtonPopoutEvent(){if(this._layoutManager.layoutConfig.settings.popoutWholeStack){if(void 0===this._popoutEvent)throw new J(\"HHBPOE17834\");this._popoutEvent()}else{const t=this._getActiveComponentItemEvent();t&&t.popout()}}handleButtonMaximiseToggleEvent(t){if(void 0===this._maximiseToggleEvent)throw new J(\"HHBMTE16834\");this._maximiseToggleEvent()}onClick(t){t.target===this._element&&this.notifyClick(t)}onTouchStart(t){t.target===this._element&&this.notifyTouchStart(t)}notifyClick(t){if(void 0===this._clickEvent)throw new J(\"HNHC46834\");this._clickEvent(t)}notifyTouchStart(t){if(void 0===this._touchStartEvent)throw new J(\"HNHTS46834\");this._touchStartEvent(t)}}class ee extends $t{constructor(t,e,i){var n,o,s,r,a,l,h,d,c,m,u,p,g,f,v,_,y,C,w;super(t,e,i,ee.createElement(document)),this._headerSideChanged=!1,this._resizeListener=()=>this.handleResize(),this._maximisedListener=()=>this.handleMaximised(),this._minimisedListener=()=>this.handleMinimised(),this._headerConfig=e.header;const I=t.layoutConfig.header,b=e.content;let S;if(1!==b.length)S=void 0;else{S=b[0].header}this._initialWantMaximise=e.maximised,this._initialActiveItemIndex=null!==(n=e.activeItemIndex)&&void 0!==n?n:0;const E=null!==(r=null!==(s=null===(o=this._headerConfig)||void 0===o?void 0:o.show)&&void 0!==s?s:null==S?void 0:S.show)&&void 0!==r?r:I.show,x=null!==(h=null!==(l=null===(a=this._headerConfig)||void 0===a?void 0:a.popout)&&void 0!==l?l:null==S?void 0:S.popout)&&void 0!==h?h:I.popout,L=null!==(m=null!==(c=null===(d=this._headerConfig)||void 0===d?void 0:d.maximise)&&void 0!==c?c:null==S?void 0:S.maximise)&&void 0!==m?m:I.maximise,z=null!==(g=null!==(p=null===(u=this._headerConfig)||void 0===u?void 0:u.close)&&void 0!==p?p:null==S?void 0:S.close)&&void 0!==g?g:I.close,M=null!==(_=null!==(v=null===(f=this._headerConfig)||void 0===f?void 0:f.minimise)&&void 0!==v?v:null==S?void 0:S.minimise)&&void 0!==_?_:I.minimise,P=null!==(w=null!==(C=null===(y=this._headerConfig)||void 0===y?void 0:y.tabDropdown)&&void 0!==C?C:null==S?void 0:S.tabDropdown)&&void 0!==w?w:I.tabDropdown;this._maximisedEnabled=!1!==L;const T={show:!1!==E,side:!1===E?nt.top:E,popoutEnabled:!1!==x,popoutLabel:!1===x?\"\":x,maximiseEnabled:this._maximisedEnabled,maximiseLabel:!1===L?\"\":L,closeEnabled:!1!==z,closeLabel:!1===z?\"\":z,minimiseEnabled:!0,minimiseLabel:M,tabDropdownEnabled:!1!==P,tabDropdownLabel:!1===P?\"\":P};this._header=new te(t,this,T,e.isClosable&&!1!==z,(()=>this.getActiveComponentItem()),(()=>this.remove()),(()=>this.handlePopoutEvent()),(()=>this.toggleMaximise()),(t=>this.handleHeaderClickEvent(t)),(t=>this.handleHeaderTouchStartEvent(t)),(t=>this.handleHeaderComponentRemoveEvent(t)),(t=>this.handleHeaderComponentFocusEvent(t)),((t,e,i,n)=>this.handleHeaderComponentStartDragEvent(t,e,i,n))),this.isStack=!0,this._childElementContainer=document.createElement(\"section\"),this._childElementContainer.classList.add(\"lm_items\"),this.on(\"resize\",this._resizeListener),this._maximisedEnabled&&(this.on(\"maximised\",this._maximisedListener),this.on(\"minimised\",this._minimisedListener)),this.element.appendChild(this._header.element),this.element.appendChild(this._childElementContainer),this.setupHeaderPosition(),this._header.updateClosability()}get childElementContainer(){return this._childElementContainer}get header(){return this._header}get headerShow(){return this._header.show}get headerSide(){return this._header.side}get headerLeftRightSided(){return this._header.leftRightSided}get contentAreaDimensions(){return this._contentAreaDimensions}get initialWantMaximise(){return this._initialWantMaximise}get isMaximised(){return this===this.layoutManager.maximisedStack}get stackParent(){if(!this.parent)throw new Error(\"Stack should always have a parent\");return this.parent}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}init(){if(!0===this.isInitialised)return;this.updateNodeSize();for(let t=0;t0){if(this._initialActiveItemIndex<0||this._initialActiveItemIndex>=e)throw new Error(`ActiveItemIndex out of range: ${this._initialActiveItemIndex} id: ${this.id}`);for(let i=0;ithis.contentItems.length)throw e-=1,new X(\"SAC99728\");if(t instanceof jt)return e=super.addChild(t,e),this._childElementContainer.appendChild(t.element),this._header.createTab(t,e),this.setActiveComponentItem(t,i),this._header.updateTabSizes(),this.updateSize(!1),t.container.setBaseLogicalZIndex(),this._header.updateClosability(),this.emitStateChangedEvent(),e;throw new X(\"SACC88532\")}removeChild(t,e){const i=t,n=this.contentItems.indexOf(i),o=1===this.contentItems.length;if(this._activeComponentItem===i&&(i.focused&&i.blur(),!o)){const t=0===n?1:n-1;this.setActiveComponentItem(this.contentItems[t],!1)}this._header.removeTab(i),super.removeChild(i,e),o||this._header.updateClosability(),this.emitStateChangedEvent()}toggleMaximise(){this.isMaximised?this.minimise():this.maximise()}maximise(){if(!this.isMaximised){this.layoutManager.setMaximisedStack(this);const t=this.contentItems,e=t.length;for(let i=0;i0&&void 0===t)throw new Error(\"expected non-empty stack to have an active component item\");return{type:\"stack\",content:this.calculateConfigContent(),size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,isClosable:this.isClosable,maximised:this.isMaximised,header:this.createHeaderConfig(),activeItemIndex:t}}onDrop(t,e){if(\"header\"===this._dropSegment){if(this.resetHeaderDropZone(),void 0===this._dropIndex)throw new J(\"SODDI68990\");return void this.addChild(t,this._dropIndex)}if(\"body\"===this._dropSegment)return void this.addChild(t,0,!0);const i=\"top\"===this._dropSegment||\"bottom\"===this._dropSegment,n=\"left\"===this._dropSegment||\"right\"===this._dropSegment,o=\"top\"===this._dropSegment||\"left\"===this._dropSegment,s=i&&this.stackParent.isColumn||n&&this.stackParent.isRow;if(t.isComponent){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createAndInitContentItem(e,this);i.addChild(t),t=i}if(t.type===at.row||t.type===at.column){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}if(s){const e=this.stackParent.contentItems.indexOf(this);this.stackParent.addChild(t,o?e:e+1,!0),this.size*=.5,t.size=this.size,t.sizeUnit=this.sizeUnit,this.stackParent.updateSize(!1)}else{const e=i?at.column:at.row,n=ct.createDefault(e),s=this.layoutManager.createContentItem(n,this);this.stackParent.replaceChild(this,s),s.addChild(t,o?0:void 0,!0),s.addChild(this,o?void 0:0,!0),this.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}highlightDropZone(t,e){for(const i in this._contentAreaDimensions){const n=i,o=this._contentAreaDimensions[n].hoverArea;if(o.x1t&&o.y1e)return void(\"header\"===n?(this._dropSegment=\"header\",this.highlightHeaderDropZone(this._header.leftRightSided?e:t)):(this.resetHeaderDropZone(),this.highlightBodyDropZone(n)))}}getArea(){if(\"none\"===this.element.style.display)return null;const t=super.getElementArea(this._header.element),e=super.getElementArea(this._childElementContainer);if(null===t||null===e)throw new K(\"SGAHC13086\");const i=e.x2-e.x1,n=e.y2-e.y1;return this._contentAreaDimensions={header:{hoverArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2},highlightArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2}}},0===this.contentItems.length?(this._contentAreaDimensions.body={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2}},super.getElementArea(this.element)):(this._contentAreaDimensions.left={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x1+.25*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x1+.5*i,y2:e.y2}},this._contentAreaDimensions.top={hoverArea:{x1:e.x1+.25*i,y1:e.y1,x2:e.x1+.75*i,y2:e.y1+.5*n},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y1+.5*n}},this._contentAreaDimensions.right={hoverArea:{x1:e.x1+.75*i,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1+.5*i,y1:e.y1,x2:e.x2,y2:e.y2}},this._contentAreaDimensions.bottom={hoverArea:{x1:e.x1+.25*i,y1:e.y1+.5*n,x2:e.x1+.75*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1+.5*n,x2:e.x2,y2:e.y2}},super.getElementArea(this.element))}positionHeader(t){this._header.side!==t&&(this._header.setSide(t),this._headerSideChanged=!0,this.setupHeaderPosition())}updateNodeSize(){if(\"none\"!==this.element.style.display){const t=kt(this.element);if(this._header.show){t[this._header.leftRightSided?it.width:it.height]-=this.layoutManager.layoutConfig.dimensions.headerHeight}this._childElementContainer.style.width=zt(t.width),this._childElementContainer.style.height=zt(t.height);for(let e=0;e=o&&tthis.onDrag(t,e,i))),this._dragListener.on(\"dragStop\",(()=>this.onDrop())),this.createDragProxyElements(t,e),null===this._componentItem.parent)throw new K(\"DPC10097\");this._componentItemFocused=this._componentItem.focused,this._componentItemFocused&&this._componentItem.blur(),this._componentItem.parent.removeChild(this._componentItem,!0),this.setDimensions(),document.body.appendChild(this._element),this.determineMinMaxXY(),this._layoutManager.calculateItemAreas(),this.setDropPosition(t,e)}get element(){return this._element}createDragProxyElements(t,e){this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_dragProxy\");const i=document.createElement(\"div\");i.classList.add(\"lm_header\");const n=document.createElement(\"div\");n.classList.add(\"lm_tabs\");const o=document.createElement(\"div\");o.classList.add(\"lm_tab\");const s=document.createElement(\"span\");s.classList.add(\"lm_title\"),o.appendChild(s),n.appendChild(o),i.appendChild(n),this._proxyContainerElement=document.createElement(\"div\"),this._proxyContainerElement.classList.add(\"lm_content\"),this._element.appendChild(i),this._element.appendChild(this._proxyContainerElement),this._originalParent instanceof ee&&this._originalParent.headerShow&&(this._sided=this._originalParent.headerLeftRightSided,this._element.classList.add(\"lm_\"+this._originalParent.headerSide),[nt.right,nt.bottom].indexOf(this._originalParent.headerSide)>=0&&this._proxyContainerElement.insertAdjacentElement(\"afterend\",i)),this._element.style.left=zt(t),this._element.style.top=zt(e),o.setAttribute(\"title\",this._componentItem.title),s.insertAdjacentText(\"afterbegin\",this._componentItem.title),this._proxyContainerElement.appendChild(this._componentItem.element)}determineMinMaxXY(){const t=this._layoutManager.groundItem;if(void 0===t)throw new J(\"DPDMMXY73109\");{const e=t.element.getBoundingClientRect();this._minX=e.left+document.body.scrollLeft,this._minY=e.top+document.body.scrollTop,this._maxX=this._minX+e.width,this._maxY=this._minY+e.height}}onDrag(t,e,i){const n=i.pageX,o=i.pageY;this.setDropPosition(n,o),this._componentItem.drag()}setDropPosition(t,e){this._layoutManager.layoutConfig.settings.constrainDragToContainer&&(t<=this._minX?t=Math.ceil(this._minX):t>=this._maxX&&(t=Math.floor(this._maxX)),e<=this._minY?e=Math.ceil(this._minY):e>=this._maxY&&(e=Math.floor(this._maxY))),this._element.style.left=zt(t),this._element.style.top=zt(e),this._area=this._layoutManager.getArea(t,e),null!==this._area&&(this._lastValidArea=this._area,this._area.contentItem.highlightDropZone(t,e,this._area))}onDrop(){const t=this._layoutManager.dropTargetIndicator;if(null===t)throw new K(\"DPOD30011\");let e;if(t.hide(),this._componentItem.exitDragMode(),null!==this._area)e=this._componentItem,this._area.contentItem.onDrop(e,this._area);else if(null!==this._lastValidArea){e=this._componentItem;this._lastValidArea.contentItem.onDrop(e,this._lastValidArea)}else this._originalParent?(e=this._componentItem,this._originalParent.addChild(e)):this._componentItem.destroy();this._element.remove(),this._layoutManager.emit(\"itemDropped\",this._componentItem),this._componentItemFocused&&void 0!==e&&e.focus()}setDimensions(){const t=this._layoutManager.layoutConfig.dimensions;if(void 0===t)throw new Error(\"DragProxy.setDimensions: dimensions undefined\");let e=t.dragProxyWidth,i=t.dragProxyHeight;if(void 0===e||void 0===i)throw new Error(\"DragProxy.setDimensions: width and/or height undefined\");const n=!1===this._layoutManager.layoutConfig.header.show?0:t.headerHeight;this._element.style.width=zt(e),this._element.style.height=zt(i),e-=this._sided?n:0,i-=this._sided?0:n,this._proxyContainerElement.style.width=zt(e),this._proxyContainerElement.style.height=zt(i),this._componentItem.enterDragMode(e,i),this._componentItem.show()}}class ne{constructor(t,e,i,n,o,s,r){this._layoutManager=t,this._element=e,this._extraAllowableChildTargets=i,this._componentTypeOrFtn=n,this._componentState=o,this._title=s,this._id=r,this._dragListener=null,this._dummyGroundContainer=document.createElement(\"div\");const a=gt.createDefault(\"row\");this._dummyGroundContentItem=new Yt(this._layoutManager,a,this._dummyGroundContainer),this.createDragListener()}destroy(){this.removeDragListener()}createDragListener(){this.removeDragListener(),this._dragListener=new Zt(this._element,this._extraAllowableChildTargets),this._dragListener.on(\"dragStart\",((t,e)=>this.onDragStart(t,e))),this._dragListener.on(\"dragStop\",(()=>this.onDragStop()))}onDragStart(t,e){var i;const n=\"component\";let o;if(\"function\"==typeof this._componentTypeOrFtn){const t=this._componentTypeOrFtn();o=ne.isDragSourceComponentItemConfig(t)?{type:n,componentState:t.state,componentType:t.type,title:null!==(i=t.title)&&void 0!==i?i:this._title}:t}else o={type:n,componentState:this._componentState,componentType:this._componentTypeOrFtn,title:this._title,id:this._id};const s=bt.resolve(o,!1),r=new jt(this._layoutManager,s,this._dummyGroundContentItem);if(this._dummyGroundContentItem.contentItems.push(r),null===this._dragListener)throw new K(\"DSODSD66746\");{const i=new ie(t,e,this._dragListener,this._layoutManager,r,this._dummyGroundContentItem),n=this._layoutManager.transitionIndicator;if(null===n)throw new K(\"DSODST66746\");n.transitionElements(this._element,i.element)}}onDragStop(){this.createDragListener()}removeDragListener(){null!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=null)}}!function(t){t.isDragSourceComponentItemConfig=function(t){return!(\"componentType\"in t)}}(ne||(ne={}));class oe{constructor(){this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_dropTargetIndicator\");const t=document.createElement(\"div\");t.classList.add(\"lm_inner\"),this._element.appendChild(t),document.body.appendChild(this._element)}destroy(){this._element.remove()}highlightArea(t,e){this._element.style.left=zt(t.x1+e),this._element.style.top=zt(t.y1+e),this._element.style.width=zt(t.x2-t.x1-e),this._element.style.height=zt(t.y2-t.y1-e),this._element.style.display=\"block\"}hide(){Dt(this._element,!1)}}class se{constructor(){this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_transition_indicator\"),document.body.appendChild(this._element),this._toElement=null,this._fromDimensions=null,this._totalAnimationDuration=200,this._animationStartTime=null}destroy(){this._element.remove()}transitionElements(t,e){}nextAnimationFrame(){}measure(t){const e=t.getBoundingClientRect();return{left:e.left,top:e.top,width:t.offsetWidth,height:t.offsetHeight}}}class re extends Wt{constructor(t){super(),this._layoutManager=t,this._childEventListener=t=>this.onEventFromChild(t),globalThis.addEventListener(re.ChildEventName,this._childEventListener,{passive:!0})}emit(t,...e){\"userBroadcast\"===t?this.emitUserBroadcast(...e):super.emit(t,...e)}emitUserBroadcast(...t){this.handleUserBroadcastEvent(\"userBroadcast\",t)}destroy(){globalThis.removeEventListener(re.ChildEventName,this._childEventListener)}handleUserBroadcastEvent(t,e){this._layoutManager.isSubWindow?this.propagateToParent(t,e):this.propagateToThisAndSubtree(t,e)}onEventFromChild(t){const e=t.detail;this.handleUserBroadcastEvent(e.eventName,e.args)}propagateToParent(t,e){const i={bubbles:!0,cancelable:!0,detail:{layoutManager:this._layoutManager,eventName:t,args:e}},n=new CustomEvent(re.ChildEventName,i),o=globalThis.opener;if(null===o)throw new K(\"EHPTP15778\");o.dispatchEvent(n)}propagateToThisAndSubtree(t,e){this.emitUnknown(t,...e);for(let i=0;ithis.handleContainerResize())),this._windowBeforeUnloadListener=()=>this.onBeforeUnload(),this._windowBeforeUnloadListening=!1,this._maximisedStackBeforeDestroyedListener=t=>this.cleanupBeforeMaximisedStackDestroyed(t),this.isSubWindow=t.isSubWindow,this._constructorOrSubWindowLayoutConfig=t.constructorOrSubWindowLayoutConfig,Q.checkInitialise(),dt.checkInitialise(),void 0!==t.containerElement&&(this._containerElement=t.containerElement)}get container(){return this._containerElement}get isInitialised(){return this._isInitialised}get groundItem(){return this._groundItem}get root(){return this._groundItem}get openPopouts(){return this._openPopouts}get dropTargetIndicator(){return this._dropTargetIndicator}get transitionIndicator(){return this._transitionIndicator}get width(){return this._width}get height(){return this._height}get eventHub(){return this._eventHub}get rootItem(){if(void 0===this._groundItem)throw new Error(\"Cannot access rootItem before init\");return 0===this._groundItem.contentItems.length?void 0:this._groundItem.contentItems[0]}get focusedComponentItem(){return this._focusedComponentItem}get tabDropPlaceholder(){return this._tabDropPlaceholder}get maximisedStack(){return this._maximisedStack}get deprecatedConstructor(){return!this.isSubWindow&&void 0!==this._constructorOrSubWindowLayoutConfig}destroy(){if(this._isInitialised){this._windowBeforeUnloadListening&&(globalThis.removeEventListener(\"beforeunload\",this._windowBeforeUnloadListener),this._windowBeforeUnloadListening=!1),!0===this.layoutConfig.settings.closePopoutsOnUnload&&this.closeAllOpenPopouts(),this._resizeObserver.disconnect(),this.checkClearResizeTimeout(),void 0!==this._groundItem&&this._groundItem.destroy(),this._tabDropPlaceholder.remove(),null!==this._dropTargetIndicator&&this._dropTargetIndicator.destroy(),null!==this._transitionIndicator&&this._transitionIndicator.destroy(),this._eventHub.destroy();for(const t of this._dragSources)t.destroy();this._dragSources=[],this._isInitialised=!1}}minifyConfig(t){return _t.minifyConfig(t)}unminifyConfig(t){return _t.unminifyConfig(t)}init(){let t;if(this.setContainer(),this._dropTargetIndicator=new oe,this._transitionIndicator=new se,this.updateSizeFromContainer(),this.isSubWindow){if(void 0===this._constructorOrSubWindowLayoutConfig)throw new J(\"LMIU07155\");{const e=this._constructorOrSubWindowLayoutConfig.root;if(void 0===e)throw new X(\"LMIC07156\");if(!Ct.isComponent(e))throw new X(\"LMIC07157\");t=e;const i=xt.resolve(this._constructorOrSubWindowLayoutConfig);this.layoutConfig=Object.assign(Object.assign({},i),{root:void 0})}}else void 0===this._constructorOrSubWindowLayoutConfig?this.layoutConfig=_t.createDefault():this.layoutConfig=xt.resolve(this._constructorOrSubWindowLayoutConfig);const e=this.layoutConfig;this._groundItem=new Yt(this,e.root,this._containerElement),this._groundItem.init(),this.checkLoadedLayoutMaximiseItem(),this._resizeObserver.observe(this._containerElement),this._isInitialised=!0,this.adjustColumnsResponsive(),this.emit(\"initialised\"),void 0!==t&&this.loadComponentAsRoot(t)}loadLayout(t){if(!this.isInitialised)throw new Error(\"GoldenLayout: Need to call init() if LayoutConfig with defined root passed to constructor\");if(void 0===this._groundItem)throw new J(\"LMLL11119\");this.createSubWindows(),this.layoutConfig=xt.resolve(t),this._groundItem.loadRoot(this.layoutConfig.root),this.checkLoadedLayoutMaximiseItem(),this.adjustColumnsResponsive()}saveLayout(){if(!1===this._isInitialised)throw new Error(\"Can't create config, layout not yet initialised\");if(void 0===this._groundItem)throw new J(\"LMTC18244\");{const t=this._groundItem.calculateConfigContent();let e;e=1!==t.length?void 0:t[0],this.reconcilePopoutWindows();const i=[];for(let t=0;t=0?n=this._groundItem.contentItems[0]:e=0;break;case at.row:case at.column:e=n.addItem(t,i.index);break;case at.stack:if(Ct.isComponent(t)){e=n.addItem(t,i.index);break}throw Error(tt[6]);case at.component:throw new X(\"LMAIALC87444602\");default:throw new Y(\"LMAIALU98881733\",n.type)}if(Ct.isComponent(t)){const t=n.contentItems[e];Gt.isStack(t)&&(n=t,e=0)}return i.parentItem=n,i.index=e,i}}}loadComponentAsRoot(t){if(void 0===this._groundItem)throw new Error(\"Cannot add item before init\");this._groundItem.loadComponentAsRoot(t)}updateSize(t,e){this.setSize(t,e)}setSize(t,e){if(this._width=t,this._height=e,!0===this._isInitialised){if(void 0===this._groundItem)throw new J(\"LMUS18881\");if(this._groundItem.setSize(this._width,this._height),this._maximisedStack){const{width:t,height:e}=kt(this._containerElement);Tt(this._maximisedStack.element,t),At(this._maximisedStack.element,e),this._maximisedStack.updateSize(!1)}this.adjustColumnsResponsive()}}beginSizeInvalidation(){this._sizeInvalidationBeginCount++}endSizeInvalidation(){0==--this._sizeInvalidationBeginCount&&this.updateSizeFromContainer()}updateSizeFromContainer(){const{width:t,height:e}=kt(this._containerElement);this.setSize(t,e)}updateRootSize(t=!1){if(void 0===this._groundItem)throw new J(\"LMURS28881\");this._groundItem.updateSize(t)}createAndInitContentItem(t,e){const i=this.createContentItem(t,e);return i.init(),i}createContentItem(t,e){if(\"string\"!=typeof t.type)throw new G(\"Missing parameter 'type'\",JSON.stringify(t));if(ct.isComponentItem(t)&&!(e instanceof ee)&&e&&!(!0===this.isSubWindow&&e instanceof Yt)){t={type:at.stack,content:[t],size:t.size,sizeUnit:t.sizeUnit,minSize:t.minSize,minSizeUnit:t.minSizeUnit,id:t.id,maximised:t.maximised,isClosable:t.isClosable,activeItemIndex:0,header:void 0}}return this.createContentItemFromConfig(t,e)}findFirstComponentItemById(t){if(void 0===this._groundItem)throw new J(\"LMFFCIBI82446\");return this.findFirstContentItemTypeByIdRecursive(at.component,t,this._groundItem)}createPopout(t,e,i,n){return t instanceof Gt?this.createPopoutFromContentItem(t,e,i,n):this.createPopoutFromItemConfig(t,e,i,n)}createPopoutFromContentItem(t,e,i,n){let o=t.parent,s=t;for(;null!==o&&1===o.contentItems.length&&!o.isGround;)s=o,o=o.parent;if(null===o)throw new K(\"LMCPFCI00834\");{if(void 0===n&&(n=o.contentItems.indexOf(s)),null!==i&&o.addPopInParentId(i),void 0===e){const i=globalThis.screenX||globalThis.screenLeft,n=globalThis.screenY||globalThis.screenTop,o=t.element.offsetLeft,s=t.element.offsetTop,{width:r,height:a}=kt(t.element);e={left:i+o,top:n+s,width:r,height:a}}const r=t.toConfig();if(t.remove(),ft.isRootItemConfig(r))return this.createPopoutFromItemConfig(r,e,i,n);throw new Error(`${tt[0]}`)}}beginVirtualSizedContainerAdding(){0==++this._virtualSizedContainerAddingBeginCount&&(this._virtualSizedContainers.length=0)}addVirtualSizedContainer(t){this._virtualSizedContainers.push(t)}endVirtualSizedContainerAdding(){if(0==--this._virtualSizedContainerAddingBeginCount){const t=this._virtualSizedContainers.length;if(t>0){this.fireBeforeVirtualRectingEvent(t);for(let e=0;ethis.emit(\"windowOpened\",a))),a.on(\"closed\",(()=>this.reconcilePopoutWindows())),this._openPopouts.push(a),this.layoutConfig.settings.closePopoutsOnUnload&&!this._windowBeforeUnloadListening&&(globalThis.addEventListener(\"beforeunload\",this._windowBeforeUnloadListener,{passive:!0}),this._windowBeforeUnloadListening=!0),a}closeAllOpenPopouts(){for(let t=0;tglobalThis.close()),1)}getArea(t,e){let i=null,n=1/0;for(let o=0;o=s.x1&&t=s.y1&&es.surface&&(n=s.surface,i=s)}return i}calculateItemAreas(){const t=this.getAllContentItems(),e=this._groundItem;if(void 0===e)throw new J(\"LMCIAR44365\");if(1!==t.length){e.contentItems[0].isStack?this._itemAreas=[]:this._itemAreas=e.createSideAreas();for(let e=0;e0){let e=t[0];if(Gt.isComponentItem(e)){const t=e.parent;if(null===t)throw new K(\"LMXLLMI69999\");e=t}if(!Gt.isStack(e))throw new X(\"LMCLLMI19993\");e.maximise()}}}processMaximiseStack(t){if(this._maximisedStack=t,t.on(\"beforeItemDestroyed\",this._maximisedStackBeforeDestroyedListener),t.element.classList.add(\"lm_maximised\"),t.element.insertAdjacentElement(\"afterend\",this._maximisePlaceholder),void 0===this._groundItem)throw new J(\"LMMXI19993\");{this._groundItem.element.prepend(t.element);const{width:e,height:i}=kt(this._containerElement);Tt(t.element,e),At(t.element,i),t.updateSize(!0),t.focusActiveContentItem(),this._maximisedStack.emit(\"maximised\"),this.emit(\"stateChanged\")}}processMinimiseMaximisedStack(){if(void 0===this._maximisedStack)throw new X(\"LMMMS74422\");{const t=this._maximisedStack;if(null===t.parent)throw new K(\"LMMI13668\");t.element.classList.remove(\"lm_maximised\"),this._maximisePlaceholder.insertAdjacentElement(\"afterend\",t.element),this._maximisePlaceholder.remove(),this.updateRootSize(!0),this._maximisedStack=void 0,t.off(\"beforeItemDestroyed\",this._maximisedStackBeforeDestroyedListener),t.emit(\"minimised\"),this.emit(\"stateChanged\")}}reconcilePopoutWindows(){const t=[];for(let e=0;e{this._resizeTimeoutId=void 0,this.beginSizeInvalidation(),this.endSizeInvalidation()}),this.resizeDebounceInterval))}checkClearResizeTimeout(){void 0!==this._resizeTimeoutId&&(clearTimeout(this._resizeTimeoutId),this._resizeTimeoutId=void 0)}setContainer(){var t;const e=document.body,i=null!==(t=this._containerElement)&&void 0!==t?t:e;if(i===e){this.resizeWithContainerAutomatically=!0;const t=document.documentElement;t.style.height=\"100%\",t.style.margin=\"0\",t.style.padding=\"0\",t.style.overflow=\"clip\",e.style.height=\"100%\",e.style.margin=\"0\",e.style.padding=\"0\",e.style.overflow=\"clip\"}this._containerElement=i}onBeforeUnload(){this.destroy()}adjustColumnsResponsive(){if(void 0===this._groundItem)throw new J(\"LMACR20883\");if(this._firstLoad=!1,this.useResponsiveLayout()&&!this._updatingColumnsResponsive&&this._groundItem.contentItems.length>0&&this._groundItem.contentItems[0].isRow){if(void 0===this._groundItem||null===this._width)throw new J(\"LMACR77412\");{const t=this._groundItem.contentItems[0].contentItems.length;if(t<=1)return;{const e=this.layoutConfig.dimensions.defaultMinItemWidth;if(t*e<=this._width)return;{this._updatingColumnsResponsive=!0;const i=t-Math.max(Math.floor(this._width/e),1),n=this._groundItem.contentItems[0],o=this.getAllStacks();if(0===o.length)throw new X(\"LMACRS77413\");{const t=o[0];for(let e=0;en?void 0:{parentItem:t,index:o}}}case 1:if(void 0===this._focusedComponentItem)return;{const t=this._focusedComponentItem.parentItem;return this.tryCreateLocationFromParentItem(t,e)}case 2:{const t=this.findFirstContentItemType(at.stack);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 3:{let t=this.findFirstContentItemType(at.row);return void 0!==t?this.tryCreateLocationFromParentItem(t,e):(t=this.findFirstContentItemType(at.column),void 0!==t?this.tryCreateLocationFromParentItem(t,e):void 0)}case 4:{const t=this.findFirstContentItemType(at.row);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 5:{const t=this.findFirstContentItemType(at.column);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 6:if(void 0===this._groundItem)throw new J(\"LMFLRIF18244\");return void 0!==this.rootItem?void 0:void 0===e||0===e?{parentItem:this._groundItem,index:0}:void 0;case 7:if(void 0===this._groundItem)throw new J(\"LMFLF18244\");{const t=this._groundItem.contentItems;if(0===t.length)return void 0===e||0===e?{parentItem:this._groundItem,index:0}:void 0;{const i=t[0];return this.tryCreateLocationFromParentItem(i,e)}}}}tryCreateLocationFromParentItem(t,e){const i=t.contentItems.length;return void 0===e?{parentItem:t,index:i}:e<0||e>i?void 0:{parentItem:t,index:e}}}!function(t){t.createMaximisePlaceElement=function(t){const e=t.createElement(\"div\");return e.classList.add(\"lm_maximise_place\"),e},t.createTabDropPlaceholderElement=function(t){const e=t.createElement(\"div\");return e.classList.add(\"lm_drop_tab_placeholder\"),e},t.defaultLocationSelectors=[{typeId:1,index:void 0},{typeId:2,index:void 0},{typeId:3,index:void 0},{typeId:7,index:void 0}],t.afterFocusedItemIfPossibleLocationSelectors=[{typeId:0,index:1},{typeId:2,index:void 0},{typeId:3,index:void 0},{typeId:7,index:void 0}]}(ae||(ae={}));class le extends ae{constructor(t,e,i,n){if(super(le.createLayoutManagerConstructorParameters(t,e)),this._bindComponentEventHanlderPassedInConstructor=!1,this._creationTimeoutPassed=!1,void 0!==e&&\"function\"==typeof e&&(this.bindComponentEvent=e,this._bindComponentEventHanlderPassedInConstructor=!0,void 0!==i&&(this.unbindComponentEvent=i)),!this._bindComponentEventHanlderPassedInConstructor&&this.isSubWindow){if(void 0===this._constructorOrSubWindowLayoutConfig)throw new J(\"VLC98823\");{const t=xt.resolve(this._constructorOrSubWindowLayoutConfig);this.layoutConfig=Object.assign(Object.assign({},t),{root:void 0})}}!0!==n&&(this.deprecatedConstructor||this.init())}destroy(){this.bindComponentEvent=void 0,this.unbindComponentEvent=void 0,super.destroy()}init(){if(this._bindComponentEventHanlderPassedInConstructor||\"loading\"!==document.readyState&&null!==document.body){if(!this._bindComponentEventHanlderPassedInConstructor&&!0===this.isSubWindow&&!this._creationTimeoutPassed)return setTimeout((()=>this.init()),7),void(this._creationTimeoutPassed=!0);!0===this.isSubWindow&&(this._bindComponentEventHanlderPassedInConstructor||this.clearHtmlAndAdjustStylesForSubWindow(),window.__glInstance=this),super.init()}else document.addEventListener(\"DOMContentLoaded\",(()=>this.init()),{passive:!0})}clearHtmlAndAdjustStylesForSubWindow(){const t=document.head,e=new Array(4);e[0]=document.querySelectorAll(\"body link\"),e[1]=document.querySelectorAll(\"body style\"),e[2]=document.querySelectorAll(\"template\"),e[3]=document.querySelectorAll(\".gl_keep\");for(let i=0;ithis.emit(\"popIn\"))),document.body.appendChild(t),!0}}bindComponent(t,e){if(void 0!==this.bindComponentEvent){return this.bindComponentEvent(t,e)}if(void 0!==this.getComponentEvent)return{virtual:!1,component:this.getComponentEvent(t,e)};{const t=`${tt[2]}: ${JSON.stringify(e)}`;throw new Z(t)}}unbindComponent(t,e,i){if(void 0!==this.unbindComponentEvent)this.unbindComponentEvent(t);else if(!e&&void 0!==this.releaseComponentEvent){if(void 0===i)throw new J(\"VCUCRCU333998\");this.releaseComponentEvent(t,i)}}}!function(t){let e=!1;t.createLayoutManagerConstructorParameters=function(t,i){const n=e?null:new URL(document.location.href).searchParams.get(\"gl-window\");e=!0;const o=null!==n;let s,r;if(null!==n){const e=localStorage.getItem(n);if(null===e)throw new Error(\"Null gl-window Config\");localStorage.removeItem(n);const i=JSON.parse(e),o=_t.unminifyConfig(i);r=xt.fromResolved(o),t instanceof HTMLElement&&(s=t)}else void 0===t?r=void 0:t instanceof HTMLElement?(r=void 0,s=t):r=t,void 0===s&&i instanceof HTMLElement&&(s=i);return{constructorOrSubWindowLayoutConfig:r,isSubWindow:o,containerElement:s}}}(le||(le={}));class he extends le{constructor(t,e,i){super(t,e,i,!0),this._componentTypesMap=new Map,this._registeredComponentMap=new Map,this._virtuableComponentMap=new Map,this._containerVirtualRectingRequiredEventListener=(t,e,i)=>this.handleContainerVirtualRectingRequiredEvent(t,e,i),this._containerVirtualVisibilityChangeRequiredEventListener=(t,e)=>this.handleContainerVirtualVisibilityChangeRequiredEvent(t,e),this._containerVirtualZIndexChangeRequiredEventListener=(t,e,i)=>this.handleContainerVirtualZIndexChangeRequiredEvent(t,e,i),this.deprecatedConstructor||this.init()}registerComponent(t,e,i=!1){if(\"function\"!=typeof e)throw new $(\"registerComponent() componentConstructorOrFactoryFtn parameter is not a function\");if(e.hasOwnProperty(\"prototype\")){const n=e;this.registerComponentConstructor(t,n,i)}else{const n=e;this.registerComponentFactoryFunction(t,n,i)}}registerComponentConstructor(t,e,i=!1){if(\"function\"!=typeof e)throw new Error(tt[1]);if(void 0!==this._componentTypesMap.get(t))throw new Z(`${tt[3]}: ${t}`);this._componentTypesMap.set(t,{constructor:e,factoryFunction:void 0,virtual:i})}registerComponentFactoryFunction(t,e,i=!1){if(\"function\"!=typeof e)throw new Z(\"Please register a constructor function\");if(void 0!==this._componentTypesMap.get(t))throw new Z(`${tt[3]}: ${t}`);this._componentTypesMap.set(t,{constructor:void 0,factoryFunction:e,virtual:i})}registerComponentFunction(t){this.registerGetComponentConstructorCallback(t)}registerGetComponentConstructorCallback(t){if(\"function\"!=typeof t)throw new Error(\"Please register a callback function\");void 0!==this._getComponentConstructorFtn&&console.warn(\"Multiple component functions are being registered. Only the final registered function will be used.\"),this._getComponentConstructorFtn=t}getRegisteredComponentTypeNames(){const t=this._componentTypesMap.keys();return Array.from(t)}getComponentInstantiator(t){let e;const i=pt.resolveComponentTypeName(t);return void 0!==i&&(e=this._componentTypesMap.get(i)),void 0===e&&void 0!==this._getComponentConstructorFtn&&(e={constructor:this._getComponentConstructorFtn(t),factoryFunction:void 0,virtual:!1}),e}bindComponent(t,e){let i;const n=pt.resolveComponentTypeName(e);let o;if(void 0!==n&&(i=this._componentTypesMap.get(n)),void 0===i&&void 0!==this._getComponentConstructorFtn&&(i={constructor:this._getComponentConstructorFtn(e),factoryFunction:void 0,virtual:!1}),void 0!==i){const s=i.virtual;let r,a;r=void 0===e.componentState?void 0:Ut({},e.componentState);const l=i.constructor;if(void 0!==l)a=new l(t,r,s);else{const e=i.factoryFunction;if(void 0===e)throw new X(\"LMBCFFU10008\");a=e(t,r,s)}if(s){if(void 0===a)throw new J(\"GLBCVCU988774\");{const e=a,i=e.rootHtmlElement;if(void 0===i)throw new Z(`${tt[5]}: ${n}`);!function(t){const e=\"absolute\";t.style.position!==e&&(t.style.position=e)}(i),this.container.appendChild(i),this._virtuableComponentMap.set(t,e),t.virtualRectingRequiredEvent=this._containerVirtualRectingRequiredEventListener,t.virtualVisibilityChangeRequiredEvent=this._containerVirtualVisibilityChangeRequiredEventListener,t.virtualZIndexChangeRequiredEvent=this._containerVirtualZIndexChangeRequiredEventListener}}this._registeredComponentMap.set(t,a),o={virtual:i.virtual,component:a}}else o=super.bindComponent(t,e);return o}unbindComponent(t,e,i){if(void 0===this._registeredComponentMap.get(t))super.unbindComponent(t,e,i);else{const e=this._virtuableComponentMap.get(t);if(void 0!==e){const i=e.rootHtmlElement;if(void 0===i)throw new X(\"GLUC77743\",t.title);this.container.removeChild(i),this._virtuableComponentMap.delete(t)}}}fireBeforeVirtualRectingEvent(t){this._goldenLayoutBoundingClientRect=this.container.getBoundingClientRect(),super.fireBeforeVirtualRectingEvent(t)}handleContainerVirtualRectingRequiredEvent(t,e,i){const n=this._virtuableComponentMap.get(t);if(void 0===n)throw new J(\"GLHCSCE55933\");{const o=n.rootHtmlElement;if(void 0===o)throw new Z(tt[4]+\" \"+t.title);{const n=t.element.getBoundingClientRect(),s=n.left-this._goldenLayoutBoundingClientRect.left;o.style.left=zt(s);const r=n.top-this._goldenLayoutBoundingClientRect.top;o.style.top=zt(r),Tt(o,e),At(o,i)}}}handleContainerVirtualVisibilityChangeRequiredEvent(t,e){const i=this._virtuableComponentMap.get(t);if(void 0===i)throw new J(\"GLHCVVCRE55934\");{const n=i.rootHtmlElement;if(void 0===n)throw new Z(tt[4]+\" \"+t.title);Dt(n,e)}}handleContainerVirtualZIndexChangeRequiredEvent(t,e,i){const n=this._virtuableComponentMap.get(t);if(void 0===n)throw new J(\"GLHCVZICRE55935\");{const e=n.rootHtmlElement;if(void 0===e)throw new Z(tt[4]+\" \"+t.title);e.style.zIndex=i}}}const de=\"initial_\",ce={show:\"top\",popout:!1,maximise:!1,close:\"close-tab-unused\"},me={headerHeight:31},ue={hasHeaders:!0,reorderEnabled:!0},pe={popoutWholeStack:!1,constrainDragToContainer:!1,constrainDragToHeaders:!1,preventDragout:!1,showMaximiseIcon:!1,showPopoutIcon:!1,showCloseIcon:!1,blockedPopoutsThrowError:!0,closePopoutsOnUnload:!0,selectionEnabled:!1};var ge,fe;class ve{constructor(e){this.layout=e,ge.set(this,void 0),fe.set(this,void 0),this.handleResize=t=>{t.forEach((t=>this.resizeElement(t.target)))},this.handleMutation=()=>{this.layout.viewComponentsByContainerElement.forEach((t=>{this.resizeElement(t.container.element)}))},t.__classPrivateFieldSet(this,ge,new ResizeObserver(this.handleResize),\"f\"),t.__classPrivateFieldSet(this,fe,new MutationObserver(this.handleMutation),\"f\")}observeMutations(e){t.__classPrivateFieldGet(this,fe,\"f\")?.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[\"class\"]})}destroy(){t.__classPrivateFieldGet(this,ge,\"f\").disconnect(),t.__classPrivateFieldGet(this,fe,\"f\").disconnect()}observeContainer(e){t.__classPrivateFieldGet(this,ge,\"f\").observe(e)}unobserveContainer(e){t.__classPrivateFieldGet(this,ge,\"f\").unobserve(e)}resizeElement(t){const e=this.layout.viewComponentsByContainerElement.get(t);e&&e.resize()}}ge=new WeakMap,fe=new WeakMap;var _e={};Object.defineProperty(_e,\"__esModule\",{value:!0});var ye=_e.BaseItem=void 0;class Ce{constructor(t,e,i){this._item=t,this._layout=e,this._wrap=i}get raw(){return this._item}get layout(){return this._layout}get type(){return this._item.type}get contentItems(){return(this._item.contentItems??[]).map((t=>this._wrap(t)))}get parent(){const t=this._item.parent;return t?this._wrap(t):null}setActiveContentItem(t,e){if(\"stack\"!==this.type)throw new Error(`Cannot call setActiveContentItem from a non-stack item: ${this.type}`);this._item.setActiveContentItem(t.raw,e)}static wrapInternal(t,e,i){const n=Ce.wrapCache.get(e);if(n)return n;const o=new t(e,i,(e=>Ce.wrapInternal(t,e,i)));return Ce.wrapCache.set(e,o),o}}ye=_e.BaseItem=Ce,Ce.wrapCache=new WeakMap;const we=t=>!!t&&\"contentItems\"in t&&(t.isRow||t.isColumn);class Ie extends ye{isRoot(){return!!this._item.parent?.isGround}getBounds(){return this._item.element.getBoundingClientRect()}get viewName(){if(this._item.isComponent){const{component:t}=this._item;return t.identity.name}throw new Error(\"View name not found\")}onDestroyed(t){const e=({target:i})=>{i===this._item&&(t(),this._item.off(\"itemDestroyed\",e))};this._item.on(\"itemDestroyed\",e)}createAdjacentStack({position:t=\"right\"}={}){const e=this.raw;if(ee.isStack(e)&&e.parent){const i=[\"top\",\"bottom\"].includes(t)?\"column\":\"row\",n=[\"left\",\"top\"].includes(t)?1:0,o=we(e.parent)?e.parent:e.layoutManager,s=o,r=e.parent.contentItems.indexOf(e);e.parent.isGround&&e.parent.removeChild(e,!0);const a=o.newItem({type:i,content:[{type:\"stack\",content:[]}]},r);if(!a)throw new Error(\"createAdjacentStack: Failed to create new container\");const l=a.contentItems[0];return a.addChild(this.raw,n),we(s)&&s.removeChild(e,!0),this._wrap(l)}throw new Error(`Cannot creat adjacent stacks for type: ${e.type}, must be type 'stack'`)}setActiveContentItem(t,e=!0){if(!ee.isStack(this._item))throw new Error(`Cannot call setActiveContentItem from a non-stack item: ${this.type}`);this._item.setActiveComponentItem(t.raw,!e)}static wrap(t,e){return ye.wrapInternal(Ie,t,e)}}function be(t=[],e){for(const i of t)\"component\"===i.type?Object.keys(e).forEach((t=>{t in i&&(i.componentState={[`${de}${t}`]:i[t],...i.componentState}),i[t]=e[t]})):be(i.content,e)}function Se(t=[],e,i){for(const n of t)if(\"component\"===n.type)Object.keys(e).forEach((t=>{if(`${de}${t}`in n.componentState)return n[t]=n.componentState[`${de}${t}`],void delete n.componentState[`${de}${t}`];n[t]=e[t]}));else{if(n.size&&(\"row\"===i||\"column\"===i)){n[\"row\"===i?\"width\":\"height\"]=n.size?.includes(\".\")?parseFloat(n.size):parseInt(n.size)}Se(n.content,e,n.type)}}function Ee(t){if(t.root){t.root.content&&Se([t.root],{componentName:\"view\",isClosable:!0});const e=t.root;t.content=[e],delete t.root}return t}const xe=e=>class extends e{connectedCallback(){if(!this.name||!this.uuid)throw new Error(\" Name or uuid attribute missing\");if(!this.src)throw new Error(\" missing 'src' attribute.\");this.#t||(this.#t=document.createElement(\"iframe\"),this.#t.src=this.src,this.#t.style.height=\"100%\",this.#t.style.width=\"100%\",this.#t.style.border=\"none\",this.forceFrameName?this.#t.setAttribute(\"name\",this.forceFrameName):this.#t.setAttribute(\"name\",t.encodeOptions({brokerUrl:this.brokerUrl,name:this.name,uuid:this.uuid,providerId:this.providerId,contextGroup:this.contextGroup},\"of-frame\")),this.#t.setAttribute(\"id\",this.name),this.appendChild(this.#t))}#t;get brokerUrl(){return this.getAttribute(\"of-broker\")}set brokerUrl(t){t&&this.setAttribute(\"of-broker\",t)}get name(){return this.getAttribute(\"of-name\")}set name(t){t&&this.setAttribute(\"of-name\",t)}get forceFrameName(){return this.getAttribute(\"forceFrameName\")}set forceFrameName(t){t&&this.setAttribute(\"forceFrameName\",t)}get uuid(){return this.getAttribute(\"of-uuid\")}set uuid(t){t&&this.setAttribute(\"of-uuid\",t)}get src(){return this.getAttribute(\"src\")}set src(t){t&&this.setAttribute(\"src\",t)}get providerId(){return this.getAttribute(\"of-provider-id\")}set providerId(t){t&&this.setAttribute(\"of-provider-id\",t)}get contextGroup(){return this.getAttribute(\"of-context-group\")}set contextGroup(t){t&&this.setAttribute(\"of-context-group\",t)}static get observedAttributes(){return[\"name\"]}};class Le{static create(t){const e=document.createElement(\"of-view\");return Object.entries(t).forEach((([t,i])=>{e.setAttribute(t,i)})),e}}customElements.define(\"of-view\",xe(HTMLElement));class ze{constructor(t,i,n,{brokerUrl:o,interopConfig:s},r){this.container=t,this.config=i,this.ofView=null,this.isDragging=()=>this.container.tab.element?.className.includes(\"lm_dragging\")??!1;const{url:a,web:l,interop:h,name:d}=i||{},c=d??`internal-generated-view-${e.v4()}`;if(this.identity={uuid:n,name:c},this.container.element.setAttribute(\"of-name\",c),this.container.element.id=`container-${c}`,this.container.parent.id=c,void 0===a)return void this.handleUrlMissing();const m=this.updateTitleIfNotSet(a),u={\"of-broker\":o,\"of-uuid\":n,\"of-name\":c,src:a};l?.frameName&&(u.forceFrameName=l.frameName);const p=h?.currentContextGroup??s?.currentContextGroup;p&&(u[\"of-context-group\"]=p),s?.providerId&&(u[\"of-provider-id\"]=s?.providerId),this.ofView=Le.create(u),this.ofView.title=m??`Iframe: ${a}`,r.appendChild(this.ofView),this.ofView.style.position=\"absolute\"}updateTitleIfNotSet(t){return\"view\"===this.container.parent.title&&this.container.parent.setTitle(t),this.container.parent.title}handleUrlMissing(){const t=document.createElement(\"div\");t.setAttribute(\"style\",\"padding: 20px\");t.innerText=\"No URL provided\",this.container.element.appendChild(t)}destroy(){this.ofView?.remove(),this.ofView=null}closeView(){this.container.close()}resize(){if(this.ofView){if(this.isDragging())return void(this.ofView.style.display=\"none\");const t=this.container.element.getBoundingClientRect();this.ofView.style.position=\"absolute\",this.ofView.style.height=`${t.height}px`,this.ofView.style.width=`${t.width}px`,this.ofView.style.inset=`${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`,this.ofView.style.display=\"block\"}}}class Me extends U{static overrideConfig(t){const e={...ue,...t.settings,...pe};return e.reorderEnabled?be(t.content,{isClosable:!0}):be(t.content,{reorderEnabled:!1}),{dimensions:me,...t,settings:e,header:{...ce,show:!1!==t.settings?.hasHeaders&&ce.show}}}constructor(t,e,i,{options:n},o,s){super(),this.identity=t,this.container=e,this.initialConfig=i,this.layoutManager=o,this.platformProvider=s,this.viewComponentsByContainerElement=new Map,this.layoutContentCache=_.getSingleInstance(),this.reparentingViews=new Set,this.goldenLayoutDestroyed=!1,this.createViewComponent=(t,e)=>{m.handleSharedView(this.layoutManager,this.identity,e);const i=new ze(t,e,this.identity.uuid,this.options,this.iframeContainer);return e&&!1===e[`${de}isClosable`]&&this.stylesheet.insertRule(`#tab-${i.identity.name} .lm_close_tab { display: none; }`),this.viewComponentsByContainerElement.set(t.element,i),this.resizeController.observeContainer(t.element),i},this.iframeContainer=document.createElement(\"div\"),this.iframeContainer.id=`openfin-layout-iframe-container-${this.identity.layoutName}`,this.domEmitter=new V(e),this.setupStylesheets(),this.layout=new he(this.container),this.layout.resizeWithContainerAutomatically=!0,this.options=n,this.layout.registerComponent(\"view\",this.createViewComponent),this.setupListeners(),this.resizeController=new ve(this),this.layout.loadLayout(Me.overrideConfig(i));const r=document.createElement(\"div\");r.id=`openfin-layout-shadow-container-${this.identity.layoutName}`,r.attachShadow({mode:\"open\",delegatesFocus:!1}).appendChild(this.iframeContainer),this.container.appendChild(r),this.resizeController.observeMutations(this.container)}getStackByView({name:t}){const e=this.layout.findFirstComponentItemById(t);if(e?.parent&&e?.parent?.isStack)return Ie.wrap(e.parent,this)}getRoot(){return Ie.wrap(this.layout.rootItem,this)}async platformCloseView(t){const e=[...this.viewComponentsByContainerElement.values()].find((e=>e.identity.name===t.name));if(!e)throw new Error(`View with name: ${t.name} not found in layout.`);e.closeView()}async platformCreateView(t,{location:e,targetView:i}={}){if(i)throw new Error(\"TargetView not supported in web\");const n={options:this.platformProvider.normalizeOptions(t),target:this.identity,location:e};return this.insertView(n)}setupStylesheets(){if(this.container.setAttribute(\"data-openfin-layout-name\",this.identity.layoutName),this.stylesheet=new CSSStyleSheet,this.stylesheet.insertRule(\".lm_close { display: none; }\"),document.adoptedStyleSheets.push(this.stylesheet),this.initialConfig.settings?.preventSplitterResize){const t=`\\n [data-openfin-layout-name='${this.identity.layoutName}'] .lm_splitter {\\n pointer-events: none;\\n }`;this.stylesheet.insertRule(t)}}insertView({options:t,location:e,targetView:i}){const n=e?this.layoutContentCache.getItemOrUndefined(e.id):void 0,o=i?this.layoutContentCache.getItemOrUndefined(i.name):void 0,s=n??o??Ie.wrap(this.layout.rootItem,this);let r;if(ee.isStack(s.raw))r=s.raw;else{if(!we(s.raw))throw new Error(\"Cannot add a view at the requested location\");r=s.raw.newItem({type:\"stack\",content:[]})}const a=Math.min(r.contentItems.length,e?.index??r.contentItems.length);let l=this.layout.findFirstComponentItemById(t.name);l?(l.parent&&l.parent.removeChild(l,!0),r.addChild(l,a)):l=r.newComponent(\"view\",t,t.title??t.url??\"Default Title\",a);const h=l.component.identity;return Promise.resolve({identity:h})}replaceView({viewToReplace:t,newView:e}){throw new Error(\"Method not implemented.\")}replaceLayout(t){throw new Error(\"Method not implemented.\")}async cleanupView(t){}applyPreset(t){throw new Error(\"Method not implemented.\")}getCurrentViews(){return[...this.viewComponentsByContainerElement.values()].map((t=>t.identity))}async getFrameSnapshot(){return Ee(xt.fromResolved(this.layout.toConfig()))}isVisible(){return W(this.container)}async onViewDetached({viewIdentity:t}){this.reparentingViews.add(t.name),this.platformCloseView(t)}async destroy(){this.goldenLayoutDestroyed||(this.goldenLayoutDestroyed=!0,this.layout.destroy()),this.iframeContainer.remove(),this.resizeController.destroy(),document.adoptedStyleSheets=document.adoptedStyleSheets.filter((t=>t!==this.stylesheet)),this.viewComponentsByContainerElement.clear()}setupListeners(){this.container.addEventListener(\"pointerdown\",(t=>{if(t.target instanceof HTMLElement){const e=t.target.classList;[\"lm_tab\",\"lm_title\",\"lm_splitter\",\"lm_drag_handle\"].some((t=>e.contains(t)))&&(this.handleDragStart(),2===t.button&&t.stopPropagation())}}),!0),document.addEventListener(\"pointerup\",(()=>this.handleDragEnd()),!0),this.layout.on(\"tabCreated\",(t=>{const e=t.componentItem.component;t.element.id=`tab-${e.identity.name}`,this.domEmitter.dispatchLocalEvent(\"tab-created\",e.identity)})),this.layout.on(\"itemCreated\",(({target:t})=>{const e=t;if(Gt.isComponentItem(e)){const t=e.component;this.domEmitter.dispatchLocalEvent(\"container-created\",t.identity)}})),this.layout.on(\"itemDestroyed\",(t=>{const e=t.target;if(Gt.isComponentItem(e)){const t=e.component;this.removeViewComponent(t)}})),this.layout.on(\"itemDropped\",(()=>{this.handleDragEnd()}))}handleDragStart(){this.iframeContainer.style.pointerEvents=\"none\"}handleDragEnd(){this.iframeContainer.style.pointerEvents=\"\"}removeViewComponent(t){if(t.config&&!1===t.config[`${de}isClosable`]){const e=[...this.stylesheet.cssRules].findIndex((e=>e.cssText.includes(`#tab-${t.identity.name}`)));this.stylesheet.deleteRule(e)}t.destroy(),this.viewComponentsByContainerElement.delete(t.container.element),this.resizeController.unobserveContainer(t.container.element),this.reparentingViews.has(t.identity.name)?this.reparentingViews.delete(t.identity.name):this.platformProvider.closeView(t.identity.name);0===this.getCurrentViews().length&&(this.goldenLayoutDestroyed||(this.goldenLayoutDestroyed=!0,m.handleLastViewRemoved(this.layoutManager,this.identity)))}}class Pe{constructor(t,e,i,n){this.windowIdentity=t,this.connectConfig=e,this.provider=i,this.fallbackContainer=n}async createLayout(t,e){if(!(\"container\"in t)&&!this.fallbackContainer)throw new Error(\"Container property is not optional in web\");const{layoutName:i}=t,n=t,o=this.provider.initLayoutViews(n),s=n.container??this.fallbackContainer,r={...this.windowIdentity,layoutName:i},a=new Me(r,s,o,this.connectConfig,e,this.provider);m.registerLayout(e,i,a),this.fallbackContainer=null}async getLayoutSnapshot(t){return t.getLayoutSnapshot()}async handleLastViewRemoved(t){}}class Te{static async init(e){const i=e.getFin().InterApplicationBus.Channel,n=await i.create(`custom-frame-${e.me.uuid}`);return n.setDefaultAction((async(t,{target:e,opts:i},o)=>{const s=n.connections.find((t=>t.name===e.name));if(s)return n.dispatch(s,t,{...i,target:e});throw new Error(`Client with name ${e.name} not found`)})),await t.relayChannelClientApi_1(n,\"layout-relay\"),new Te(e)}constructor(t){this.wire=t,this.viewNames=new Set}normalizeOptions(t,i=\"default\"){const n=this.wire.me.uuid;let{name:o=`internal-generated-view-${e.v4()}`}=t;return o.match(/^internal-generated-view-/)&&this.viewNames.has(o)&&\"duplicate\"===i&&(o=`internal-generated-view-${e.v4()}`),this.viewNames.add(o),{...t,name:o,uuid:n}}closeView(t){this.viewNames.delete(t)}initLayoutViews({layout:t,multiInstanceViewBehavior:e}){return H((t=>{if(\"component\"===t.type&&t.componentState){const i=this.normalizeOptions(t.componentState,e);return{...t,componentState:i}}return t}),t)}}var Ae;const ke=t=>t;Ae=new WeakMap,exports.WebLayoutEntryPoint=class{constructor(e){Ae.set(this,void 0),this.initLayoutManager=async(e,i,{container:n,layoutManagerOverride:o})=>{const s=await Te.init(i),r=o??ke,a=new Pe(i.me,t.__classPrivateFieldGet(this,Ae,\"f\"),s,n),l=new(r(m.createClosedConstructor(a)));return await M(i,l),l},this.applyLayoutSnapshot=async(e,i,n)=>{await i.applyLayoutSnapshot(t.__classPrivateFieldGet(this,Ae,\"f\").platform.layoutSnapshot)},this.createLayout=async(t,e)=>m.createLayout(t,e),this.destroyLayout=async(t,e)=>m.destroyLayout(t,e),t.__classPrivateFieldSet(this,Ae,e,\"f\")}};\n","'use strict'\n\nexports.byteLength = byteLength\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\nfor (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i]\n revLookup[code.charCodeAt(i)] = i\n}\n\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction getLens (b64) {\n var len = b64.length\n\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // Trim off extra bytes after placeholder bytes are found\n // See: https://github.com/beatgammit/base64-js/issues/42\n var validLen = b64.indexOf('=')\n if (validLen === -1) validLen = len\n\n var placeHoldersLen = validLen === len\n ? 0\n : 4 - (validLen % 4)\n\n return [validLen, placeHoldersLen]\n}\n\n// base64 is 4/3 + up to two characters of the original data\nfunction byteLength (b64) {\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction _byteLength (b64, validLen, placeHoldersLen) {\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction toByteArray (b64) {\n var tmp\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n\n var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))\n\n var curByte = 0\n\n // if there are placeholders, only get up to the last complete 4 chars\n var len = placeHoldersLen > 0\n ? validLen - 4\n : validLen\n\n var i\n for (i = 0; i < len; i += 4) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 18) |\n (revLookup[b64.charCodeAt(i + 1)] << 12) |\n (revLookup[b64.charCodeAt(i + 2)] << 6) |\n revLookup[b64.charCodeAt(i + 3)]\n arr[curByte++] = (tmp >> 16) & 0xFF\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 2) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 2) |\n (revLookup[b64.charCodeAt(i + 1)] >> 4)\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 1) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 10) |\n (revLookup[b64.charCodeAt(i + 1)] << 4) |\n (revLookup[b64.charCodeAt(i + 2)] >> 2)\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] +\n lookup[num >> 12 & 0x3F] +\n lookup[num >> 6 & 0x3F] +\n lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n var tmp\n var output = []\n for (var i = start; i < end; i += 3) {\n tmp =\n ((uint8[i] << 16) & 0xFF0000) +\n ((uint8[i + 1] << 8) & 0xFF00) +\n (uint8[i + 2] & 0xFF)\n output.push(tripletToBase64(tmp))\n }\n return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n var tmp\n var len = uint8.length\n var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n var parts = []\n var maxChunkLength = 16383 // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1]\n parts.push(\n lookup[tmp >> 2] +\n lookup[(tmp << 4) & 0x3F] +\n '=='\n )\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + uint8[len - 1]\n parts.push(\n lookup[tmp >> 10] +\n lookup[(tmp >> 4) & 0x3F] +\n lookup[(tmp << 2) & 0x3F] +\n '='\n )\n }\n\n return parts.join('')\n}\n","/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n/* eslint-disable no-proto */\n\n'use strict'\n\nconst base64 = require('base64-js')\nconst ieee754 = require('ieee754')\nconst customInspectSymbol =\n (typeof Symbol === 'function' && typeof Symbol['for'] === 'function') // eslint-disable-line dot-notation\n ? Symbol['for']('nodejs.util.inspect.custom') // eslint-disable-line dot-notation\n : null\n\nexports.Buffer = Buffer\nexports.SlowBuffer = SlowBuffer\nexports.INSPECT_MAX_BYTES = 50\n\nconst K_MAX_LENGTH = 0x7fffffff\nexports.kMaxLength = K_MAX_LENGTH\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Print warning and recommend using `buffer` v4.x which has an Object\n * implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * We report that the browser does not support typed arrays if the are not subclassable\n * using __proto__. Firefox 4-29 lacks support for adding new properties to `Uint8Array`\n * (See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438). IE 10 lacks support\n * for __proto__ and has a buggy typed array implementation.\n */\nBuffer.TYPED_ARRAY_SUPPORT = typedArraySupport()\n\nif (!Buffer.TYPED_ARRAY_SUPPORT && typeof console !== 'undefined' &&\n typeof console.error === 'function') {\n console.error(\n 'This browser lacks typed array (Uint8Array) support which is required by ' +\n '`buffer` v5.x. Use `buffer` v4.x if you require old browser support.'\n )\n}\n\nfunction typedArraySupport () {\n // Can typed array instances can be augmented?\n try {\n const arr = new Uint8Array(1)\n const proto = { foo: function () { return 42 } }\n Object.setPrototypeOf(proto, Uint8Array.prototype)\n Object.setPrototypeOf(arr, proto)\n return arr.foo() === 42\n } catch (e) {\n return false\n }\n}\n\nObject.defineProperty(Buffer.prototype, 'parent', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.buffer\n }\n})\n\nObject.defineProperty(Buffer.prototype, 'offset', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.byteOffset\n }\n})\n\nfunction createBuffer (length) {\n if (length > K_MAX_LENGTH) {\n throw new RangeError('The value \"' + length + '\" is invalid for option \"size\"')\n }\n // Return an augmented `Uint8Array` instance\n const buf = new Uint8Array(length)\n Object.setPrototypeOf(buf, Buffer.prototype)\n return buf\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new TypeError(\n 'The \"string\" argument must be of type string. Received type number'\n )\n }\n return allocUnsafe(arg)\n }\n return from(arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\nfunction from (value, encodingOrOffset, length) {\n if (typeof value === 'string') {\n return fromString(value, encodingOrOffset)\n }\n\n if (ArrayBuffer.isView(value)) {\n return fromArrayView(value)\n }\n\n if (value == null) {\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n }\n\n if (isInstance(value, ArrayBuffer) ||\n (value && isInstance(value.buffer, ArrayBuffer))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof SharedArrayBuffer !== 'undefined' &&\n (isInstance(value, SharedArrayBuffer) ||\n (value && isInstance(value.buffer, SharedArrayBuffer)))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof value === 'number') {\n throw new TypeError(\n 'The \"value\" argument must not be of type number. Received type number'\n )\n }\n\n const valueOf = value.valueOf && value.valueOf()\n if (valueOf != null && valueOf !== value) {\n return Buffer.from(valueOf, encodingOrOffset, length)\n }\n\n const b = fromObject(value)\n if (b) return b\n\n if (typeof Symbol !== 'undefined' && Symbol.toPrimitive != null &&\n typeof value[Symbol.toPrimitive] === 'function') {\n return Buffer.from(value[Symbol.toPrimitive]('string'), encodingOrOffset, length)\n }\n\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n return from(value, encodingOrOffset, length)\n}\n\n// Note: Change prototype *after* Buffer.from is defined to workaround Chrome bug:\n// https://github.com/feross/buffer/pull/148\nObject.setPrototypeOf(Buffer.prototype, Uint8Array.prototype)\nObject.setPrototypeOf(Buffer, Uint8Array)\n\nfunction assertSize (size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be of type number')\n } else if (size < 0) {\n throw new RangeError('The value \"' + size + '\" is invalid for option \"size\"')\n }\n}\n\nfunction alloc (size, fill, encoding) {\n assertSize(size)\n if (size <= 0) {\n return createBuffer(size)\n }\n if (fill !== undefined) {\n // Only pay attention to encoding if it's a string. This\n // prevents accidentally sending in a number that would\n // be interpreted as a start offset.\n return typeof encoding === 'string'\n ? createBuffer(size).fill(fill, encoding)\n : createBuffer(size).fill(fill)\n }\n return createBuffer(size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n return alloc(size, fill, encoding)\n}\n\nfunction allocUnsafe (size) {\n assertSize(size)\n return createBuffer(size < 0 ? 0 : checked(size) | 0)\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n return allocUnsafe(size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n return allocUnsafe(size)\n}\n\nfunction fromString (string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8'\n }\n\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n\n const length = byteLength(string, encoding) | 0\n let buf = createBuffer(length)\n\n const actual = buf.write(string, encoding)\n\n if (actual !== length) {\n // Writing a hex string, for example, that contains invalid characters will\n // cause everything after the first invalid character to be ignored. (e.g.\n // 'abxxcd' will be treated as 'ab')\n buf = buf.slice(0, actual)\n }\n\n return buf\n}\n\nfunction fromArrayLike (array) {\n const length = array.length < 0 ? 0 : checked(array.length) | 0\n const buf = createBuffer(length)\n for (let i = 0; i < length; i += 1) {\n buf[i] = array[i] & 255\n }\n return buf\n}\n\nfunction fromArrayView (arrayView) {\n if (isInstance(arrayView, Uint8Array)) {\n const copy = new Uint8Array(arrayView)\n return fromArrayBuffer(copy.buffer, copy.byteOffset, copy.byteLength)\n }\n return fromArrayLike(arrayView)\n}\n\nfunction fromArrayBuffer (array, byteOffset, length) {\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\"offset\" is outside of buffer bounds')\n }\n\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\"length\" is outside of buffer bounds')\n }\n\n let buf\n if (byteOffset === undefined && length === undefined) {\n buf = new Uint8Array(array)\n } else if (length === undefined) {\n buf = new Uint8Array(array, byteOffset)\n } else {\n buf = new Uint8Array(array, byteOffset, length)\n }\n\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(buf, Buffer.prototype)\n\n return buf\n}\n\nfunction fromObject (obj) {\n if (Buffer.isBuffer(obj)) {\n const len = checked(obj.length) | 0\n const buf = createBuffer(len)\n\n if (buf.length === 0) {\n return buf\n }\n\n obj.copy(buf, 0, 0, len)\n return buf\n }\n\n if (obj.length !== undefined) {\n if (typeof obj.length !== 'number' || numberIsNaN(obj.length)) {\n return createBuffer(0)\n }\n return fromArrayLike(obj)\n }\n\n if (obj.type === 'Buffer' && Array.isArray(obj.data)) {\n return fromArrayLike(obj.data)\n }\n}\n\nfunction checked (length) {\n // Note: cannot use `length < K_MAX_LENGTH` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= K_MAX_LENGTH) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + K_MAX_LENGTH.toString(16) + ' bytes')\n }\n return length | 0\n}\n\nfunction SlowBuffer (length) {\n if (+length != length) { // eslint-disable-line eqeqeq\n length = 0\n }\n return Buffer.alloc(+length)\n}\n\nBuffer.isBuffer = function isBuffer (b) {\n return b != null && b._isBuffer === true &&\n b !== Buffer.prototype // so Buffer.isBuffer(Buffer.prototype) will be false\n}\n\nBuffer.compare = function compare (a, b) {\n if (isInstance(a, Uint8Array)) a = Buffer.from(a, a.offset, a.byteLength)\n if (isInstance(b, Uint8Array)) b = Buffer.from(b, b.offset, b.byteLength)\n if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n throw new TypeError(\n 'The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array'\n )\n }\n\n if (a === b) return 0\n\n let x = a.length\n let y = b.length\n\n for (let i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i]\n y = b[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n switch (String(encoding).toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'latin1':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return true\n default:\n return false\n }\n}\n\nBuffer.concat = function concat (list, length) {\n if (!Array.isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n\n if (list.length === 0) {\n return Buffer.alloc(0)\n }\n\n let i\n if (length === undefined) {\n length = 0\n for (i = 0; i < list.length; ++i) {\n length += list[i].length\n }\n }\n\n const buffer = Buffer.allocUnsafe(length)\n let pos = 0\n for (i = 0; i < list.length; ++i) {\n let buf = list[i]\n if (isInstance(buf, Uint8Array)) {\n if (pos + buf.length > buffer.length) {\n if (!Buffer.isBuffer(buf)) buf = Buffer.from(buf)\n buf.copy(buffer, pos)\n } else {\n Uint8Array.prototype.set.call(\n buffer,\n buf,\n pos\n )\n }\n } else if (!Buffer.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n } else {\n buf.copy(buffer, pos)\n }\n pos += buf.length\n }\n return buffer\n}\n\nfunction byteLength (string, encoding) {\n if (Buffer.isBuffer(string)) {\n return string.length\n }\n if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) {\n return string.byteLength\n }\n if (typeof string !== 'string') {\n throw new TypeError(\n 'The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. ' +\n 'Received type ' + typeof string\n )\n }\n\n const len = string.length\n const mustMatch = (arguments.length > 2 && arguments[2] === true)\n if (!mustMatch && len === 0) return 0\n\n // Use a for loop to avoid recursion\n let loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'ascii':\n case 'latin1':\n case 'binary':\n return len\n case 'utf8':\n case 'utf-8':\n return utf8ToBytes(string).length\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return len * 2\n case 'hex':\n return len >>> 1\n case 'base64':\n return base64ToBytes(string).length\n default:\n if (loweredCase) {\n return mustMatch ? -1 : utf8ToBytes(string).length // assume utf8\n }\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n let loweredCase = false\n\n // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n // property of a typed array.\n\n // This behaves neither like String nor Uint8Array in that we set start/end\n // to their upper/lower bounds if the value passed is out of range.\n // undefined is handled specially as per ECMA-262 6th Edition,\n // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n if (start === undefined || start < 0) {\n start = 0\n }\n // Return early if start > this.length. Done here to prevent potential uint32\n // coercion fail below.\n if (start > this.length) {\n return ''\n }\n\n if (end === undefined || end > this.length) {\n end = this.length\n }\n\n if (end <= 0) {\n return ''\n }\n\n // Force coercion to uint32. This will also coerce falsey/NaN values to 0.\n end >>>= 0\n start >>>= 0\n\n if (end <= start) {\n return ''\n }\n\n if (!encoding) encoding = 'utf8'\n\n while (true) {\n switch (encoding) {\n case 'hex':\n return hexSlice(this, start, end)\n\n case 'utf8':\n case 'utf-8':\n return utf8Slice(this, start, end)\n\n case 'ascii':\n return asciiSlice(this, start, end)\n\n case 'latin1':\n case 'binary':\n return latin1Slice(this, start, end)\n\n case 'base64':\n return base64Slice(this, start, end)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return utf16leSlice(this, start, end)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = (encoding + '').toLowerCase()\n loweredCase = true\n }\n }\n}\n\n// This property is used by `Buffer.isBuffer` (and the `is-buffer` npm package)\n// to detect a Buffer instance. It's not possible to use `instanceof Buffer`\n// reliably in a browserify context because there could be multiple different\n// copies of the 'buffer' package in use. This method works even for Buffer\n// instances that were created from another copy of the `buffer` package.\n// See: https://github.com/feross/buffer/issues/154\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n const i = b[n]\n b[n] = b[m]\n b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n const len = this.length\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits')\n }\n for (let i = 0; i < len; i += 2) {\n swap(this, i, i + 1)\n }\n return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n const len = this.length\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits')\n }\n for (let i = 0; i < len; i += 4) {\n swap(this, i, i + 3)\n swap(this, i + 1, i + 2)\n }\n return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n const len = this.length\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits')\n }\n for (let i = 0; i < len; i += 8) {\n swap(this, i, i + 7)\n swap(this, i + 1, i + 6)\n swap(this, i + 2, i + 5)\n swap(this, i + 3, i + 4)\n }\n return this\n}\n\nBuffer.prototype.toString = function toString () {\n const length = this.length\n if (length === 0) return ''\n if (arguments.length === 0) return utf8Slice(this, 0, length)\n return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.toLocaleString = Buffer.prototype.toString\n\nBuffer.prototype.equals = function equals (b) {\n if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n if (this === b) return true\n return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n let str = ''\n const max = exports.INSPECT_MAX_BYTES\n str = this.toString('hex', 0, max).replace(/(.{2})/g, '$1 ').trim()\n if (this.length > max) str += ' ... '\n return ''\n}\nif (customInspectSymbol) {\n Buffer.prototype[customInspectSymbol] = Buffer.prototype.inspect\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n if (isInstance(target, Uint8Array)) {\n target = Buffer.from(target, target.offset, target.byteLength)\n }\n if (!Buffer.isBuffer(target)) {\n throw new TypeError(\n 'The \"target\" argument must be one of type Buffer or Uint8Array. ' +\n 'Received type ' + (typeof target)\n )\n }\n\n if (start === undefined) {\n start = 0\n }\n if (end === undefined) {\n end = target ? target.length : 0\n }\n if (thisStart === undefined) {\n thisStart = 0\n }\n if (thisEnd === undefined) {\n thisEnd = this.length\n }\n\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError('out of range index')\n }\n\n if (thisStart >= thisEnd && start >= end) {\n return 0\n }\n if (thisStart >= thisEnd) {\n return -1\n }\n if (start >= end) {\n return 1\n }\n\n start >>>= 0\n end >>>= 0\n thisStart >>>= 0\n thisEnd >>>= 0\n\n if (this === target) return 0\n\n let x = thisEnd - thisStart\n let y = end - start\n const len = Math.min(x, y)\n\n const thisCopy = this.slice(thisStart, thisEnd)\n const targetCopy = target.slice(start, end)\n\n for (let i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i]\n y = targetCopy[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (numberIsNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [val], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n let indexSize = 1\n let arrLength = arr.length\n let valLength = val.length\n\n if (encoding !== undefined) {\n encoding = String(encoding).toLowerCase()\n if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n encoding === 'utf16le' || encoding === 'utf-16le') {\n if (arr.length < 2 || val.length < 2) {\n return -1\n }\n indexSize = 2\n arrLength /= 2\n valLength /= 2\n byteOffset /= 2\n }\n }\n\n function read (buf, i) {\n if (indexSize === 1) {\n return buf[i]\n } else {\n return buf.readUInt16BE(i * indexSize)\n }\n }\n\n let i\n if (dir) {\n let foundIndex = -1\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1) foundIndex = i\n if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n } else {\n if (foundIndex !== -1) i -= i - foundIndex\n foundIndex = -1\n }\n }\n } else {\n if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n for (i = byteOffset; i >= 0; i--) {\n let found = true\n for (let j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false\n break\n }\n }\n if (found) return i\n }\n }\n\n return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n offset = Number(offset) || 0\n const remaining = buf.length - offset\n if (!length) {\n length = remaining\n } else {\n length = Number(length)\n if (length > remaining) {\n length = remaining\n }\n }\n\n const strLen = string.length\n\n if (length > strLen / 2) {\n length = strLen / 2\n }\n let i\n for (i = 0; i < length; ++i) {\n const parsed = parseInt(string.substr(i * 2, 2), 16)\n if (numberIsNaN(parsed)) return i\n buf[offset + i] = parsed\n }\n return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n // Buffer#write(string)\n if (offset === undefined) {\n encoding = 'utf8'\n length = this.length\n offset = 0\n // Buffer#write(string, encoding)\n } else if (length === undefined && typeof offset === 'string') {\n encoding = offset\n length = this.length\n offset = 0\n // Buffer#write(string, offset[, length][, encoding])\n } else if (isFinite(offset)) {\n offset = offset >>> 0\n if (isFinite(length)) {\n length = length >>> 0\n if (encoding === undefined) encoding = 'utf8'\n } else {\n encoding = length\n length = undefined\n }\n } else {\n throw new Error(\n 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n )\n }\n\n const remaining = this.length - offset\n if (length === undefined || length > remaining) length = remaining\n\n if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n throw new RangeError('Attempt to write outside buffer bounds')\n }\n\n if (!encoding) encoding = 'utf8'\n\n let loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'hex':\n return hexWrite(this, string, offset, length)\n\n case 'utf8':\n case 'utf-8':\n return utf8Write(this, string, offset, length)\n\n case 'ascii':\n case 'latin1':\n case 'binary':\n return asciiWrite(this, string, offset, length)\n\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return base64Write(this, string, offset, length)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return ucs2Write(this, string, offset, length)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0)\n }\n}\n\nfunction base64Slice (buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf)\n } else {\n return base64.fromByteArray(buf.slice(start, end))\n }\n}\n\nfunction utf8Slice (buf, start, end) {\n end = Math.min(buf.length, end)\n const res = []\n\n let i = start\n while (i < end) {\n const firstByte = buf[i]\n let codePoint = null\n let bytesPerSequence = (firstByte > 0xEF)\n ? 4\n : (firstByte > 0xDF)\n ? 3\n : (firstByte > 0xBF)\n ? 2\n : 1\n\n if (i + bytesPerSequence <= end) {\n let secondByte, thirdByte, fourthByte, tempCodePoint\n\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 0x80) {\n codePoint = firstByte\n }\n break\n case 2:\n secondByte = buf[i + 1]\n if ((secondByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n if (tempCodePoint > 0x7F) {\n codePoint = tempCodePoint\n }\n }\n break\n case 3:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n codePoint = tempCodePoint\n }\n }\n break\n case 4:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n fourthByte = buf[i + 3]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n codePoint = tempCodePoint\n }\n }\n }\n }\n\n if (codePoint === null) {\n // we did not generate a valid codePoint so insert a\n // replacement char (U+FFFD) and advance only 1 byte\n codePoint = 0xFFFD\n bytesPerSequence = 1\n } else if (codePoint > 0xFFFF) {\n // encode to utf16 (surrogate pair dance)\n codePoint -= 0x10000\n res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n codePoint = 0xDC00 | codePoint & 0x3FF\n }\n\n res.push(codePoint)\n i += bytesPerSequence\n }\n\n return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nconst MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n const len = codePoints.length\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n }\n\n // Decode in chunks to avoid \"call stack size exceeded\".\n let res = ''\n let i = 0\n while (i < len) {\n res += String.fromCharCode.apply(\n String,\n codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n )\n }\n return res\n}\n\nfunction asciiSlice (buf, start, end) {\n let ret = ''\n end = Math.min(buf.length, end)\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F)\n }\n return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n let ret = ''\n end = Math.min(buf.length, end)\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i])\n }\n return ret\n}\n\nfunction hexSlice (buf, start, end) {\n const len = buf.length\n\n if (!start || start < 0) start = 0\n if (!end || end < 0 || end > len) end = len\n\n let out = ''\n for (let i = start; i < end; ++i) {\n out += hexSliceLookupTable[buf[i]]\n }\n return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n const bytes = buf.slice(start, end)\n let res = ''\n // If bytes.length is odd, the last 8 bits must be ignored (same as node.js)\n for (let i = 0; i < bytes.length - 1; i += 2) {\n res += String.fromCharCode(bytes[i] + (bytes[i + 1] * 256))\n }\n return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n const len = this.length\n start = ~~start\n end = end === undefined ? len : ~~end\n\n if (start < 0) {\n start += len\n if (start < 0) start = 0\n } else if (start > len) {\n start = len\n }\n\n if (end < 0) {\n end += len\n if (end < 0) end = 0\n } else if (end > len) {\n end = len\n }\n\n if (end < start) end = start\n\n const newBuf = this.subarray(start, end)\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(newBuf, Buffer.prototype)\n\n return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUintLE =\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let val = this[offset]\n let mul = 1\n let i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUintBE =\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n checkOffset(offset, byteLength, this.length)\n }\n\n let val = this[offset + --byteLength]\n let mul = 1\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUint8 =\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n return this[offset]\n}\n\nBuffer.prototype.readUint16LE =\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUint16BE =\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUint32LE =\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return ((this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16)) +\n (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUint32BE =\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] * 0x1000000) +\n ((this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n this[offset + 3])\n}\n\nBuffer.prototype.readBigUInt64LE = defineBigIntMethod(function readBigUInt64LE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const lo = first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24\n\n const hi = this[++offset] +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n last * 2 ** 24\n\n return BigInt(lo) + (BigInt(hi) << BigInt(32))\n})\n\nBuffer.prototype.readBigUInt64BE = defineBigIntMethod(function readBigUInt64BE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const hi = first * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset]\n\n const lo = this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last\n\n return (BigInt(hi) << BigInt(32)) + BigInt(lo)\n})\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let val = this[offset]\n let mul = 1\n let i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let i = byteLength\n let mul = 1\n let val = this[offset + --i]\n while (i > 0 && (mul *= 0x100)) {\n val += this[offset + --i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n if (!(this[offset] & 0x80)) return (this[offset])\n return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n const val = this[offset] | (this[offset + 1] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n const val = this[offset + 1] | (this[offset] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16) |\n (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] << 24) |\n (this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n (this[offset + 3])\n}\n\nBuffer.prototype.readBigInt64LE = defineBigIntMethod(function readBigInt64LE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const val = this[offset + 4] +\n this[offset + 5] * 2 ** 8 +\n this[offset + 6] * 2 ** 16 +\n (last << 24) // Overflow\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24)\n})\n\nBuffer.prototype.readBigInt64BE = defineBigIntMethod(function readBigInt64BE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const val = (first << 24) + // Overflow\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset]\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last)\n})\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUintLE =\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n let mul = 1\n let i = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUintBE =\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n let i = byteLength - 1\n let mul = 1\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUint8 =\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeUint16LE =\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeUint16BE =\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeUint32LE =\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset + 3] = (value >>> 24)\n this[offset + 2] = (value >>> 16)\n this[offset + 1] = (value >>> 8)\n this[offset] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeUint32BE =\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nfunction wrtBigUInt64LE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7)\n\n let lo = Number(value & BigInt(0xffffffff))\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n return offset\n}\n\nfunction wrtBigUInt64BE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7)\n\n let lo = Number(value & BigInt(0xffffffff))\n buf[offset + 7] = lo\n lo = lo >> 8\n buf[offset + 6] = lo\n lo = lo >> 8\n buf[offset + 5] = lo\n lo = lo >> 8\n buf[offset + 4] = lo\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n buf[offset + 3] = hi\n hi = hi >> 8\n buf[offset + 2] = hi\n hi = hi >> 8\n buf[offset + 1] = hi\n hi = hi >> 8\n buf[offset] = hi\n return offset + 8\n}\n\nBuffer.prototype.writeBigUInt64LE = defineBigIntMethod(function writeBigUInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeBigUInt64BE = defineBigIntMethod(function writeBigUInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n let i = 0\n let mul = 1\n let sub = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n let i = byteLength - 1\n let mul = 1\n let sub = 0\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n if (value < 0) value = 0xff + value + 1\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n this[offset + 2] = (value >>> 16)\n this[offset + 3] = (value >>> 24)\n return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (value < 0) value = 0xffffffff + value + 1\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeBigInt64LE = defineBigIntMethod(function writeBigInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nBuffer.prototype.writeBigInt64BE = defineBigIntMethod(function writeBigInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n }\n ieee754.write(buf, value, offset, littleEndian, 23, 4)\n return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n }\n ieee754.write(buf, value, offset, littleEndian, 52, 8)\n return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n if (!Buffer.isBuffer(target)) throw new TypeError('argument should be a Buffer')\n if (!start) start = 0\n if (!end && end !== 0) end = this.length\n if (targetStart >= target.length) targetStart = target.length\n if (!targetStart) targetStart = 0\n if (end > 0 && end < start) end = start\n\n // Copy 0 bytes; we're done\n if (end === start) return 0\n if (target.length === 0 || this.length === 0) return 0\n\n // Fatal error conditions\n if (targetStart < 0) {\n throw new RangeError('targetStart out of bounds')\n }\n if (start < 0 || start >= this.length) throw new RangeError('Index out of range')\n if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n // Are we oob?\n if (end > this.length) end = this.length\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start\n }\n\n const len = end - start\n\n if (this === target && typeof Uint8Array.prototype.copyWithin === 'function') {\n // Use built-in when available, missing from IE11\n this.copyWithin(targetStart, start, end)\n } else {\n Uint8Array.prototype.set.call(\n target,\n this.subarray(start, end),\n targetStart\n )\n }\n\n return len\n}\n\n// Usage:\n// buffer.fill(number[, offset[, end]])\n// buffer.fill(buffer[, offset[, end]])\n// buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n // Handle string cases:\n if (typeof val === 'string') {\n if (typeof start === 'string') {\n encoding = start\n start = 0\n end = this.length\n } else if (typeof end === 'string') {\n encoding = end\n end = this.length\n }\n if (encoding !== undefined && typeof encoding !== 'string') {\n throw new TypeError('encoding must be a string')\n }\n if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n if (val.length === 1) {\n const code = val.charCodeAt(0)\n if ((encoding === 'utf8' && code < 128) ||\n encoding === 'latin1') {\n // Fast path: If `val` fits into a single byte, use that numeric value.\n val = code\n }\n }\n } else if (typeof val === 'number') {\n val = val & 255\n } else if (typeof val === 'boolean') {\n val = Number(val)\n }\n\n // Invalid ranges are not set to a default, so can range check early.\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError('Out of range index')\n }\n\n if (end <= start) {\n return this\n }\n\n start = start >>> 0\n end = end === undefined ? this.length : end >>> 0\n\n if (!val) val = 0\n\n let i\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val\n }\n } else {\n const bytes = Buffer.isBuffer(val)\n ? val\n : Buffer.from(val, encoding)\n const len = bytes.length\n if (len === 0) {\n throw new TypeError('The value \"' + val +\n '\" is invalid for argument \"value\"')\n }\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len]\n }\n }\n\n return this\n}\n\n// CUSTOM ERRORS\n// =============\n\n// Simplified versions from Node, changed for Buffer-only usage\nconst errors = {}\nfunction E (sym, getMessage, Base) {\n errors[sym] = class NodeError extends Base {\n constructor () {\n super()\n\n Object.defineProperty(this, 'message', {\n value: getMessage.apply(this, arguments),\n writable: true,\n configurable: true\n })\n\n // Add the error code to the name to include it in the stack trace.\n this.name = `${this.name} [${sym}]`\n // Access the stack to generate the error message including the error code\n // from the name.\n this.stack // eslint-disable-line no-unused-expressions\n // Reset the name to the actual name.\n delete this.name\n }\n\n get code () {\n return sym\n }\n\n set code (value) {\n Object.defineProperty(this, 'code', {\n configurable: true,\n enumerable: true,\n value,\n writable: true\n })\n }\n\n toString () {\n return `${this.name} [${sym}]: ${this.message}`\n }\n }\n}\n\nE('ERR_BUFFER_OUT_OF_BOUNDS',\n function (name) {\n if (name) {\n return `${name} is outside of buffer bounds`\n }\n\n return 'Attempt to access memory outside buffer bounds'\n }, RangeError)\nE('ERR_INVALID_ARG_TYPE',\n function (name, actual) {\n return `The \"${name}\" argument must be of type number. Received type ${typeof actual}`\n }, TypeError)\nE('ERR_OUT_OF_RANGE',\n function (str, range, input) {\n let msg = `The value of \"${str}\" is out of range.`\n let received = input\n if (Number.isInteger(input) && Math.abs(input) > 2 ** 32) {\n received = addNumericalSeparator(String(input))\n } else if (typeof input === 'bigint') {\n received = String(input)\n if (input > BigInt(2) ** BigInt(32) || input < -(BigInt(2) ** BigInt(32))) {\n received = addNumericalSeparator(received)\n }\n received += 'n'\n }\n msg += ` It must be ${range}. Received ${received}`\n return msg\n }, RangeError)\n\nfunction addNumericalSeparator (val) {\n let res = ''\n let i = val.length\n const start = val[0] === '-' ? 1 : 0\n for (; i >= start + 4; i -= 3) {\n res = `_${val.slice(i - 3, i)}${res}`\n }\n return `${val.slice(0, i)}${res}`\n}\n\n// CHECK FUNCTIONS\n// ===============\n\nfunction checkBounds (buf, offset, byteLength) {\n validateNumber(offset, 'offset')\n if (buf[offset] === undefined || buf[offset + byteLength] === undefined) {\n boundsError(offset, buf.length - (byteLength + 1))\n }\n}\n\nfunction checkIntBI (value, min, max, buf, offset, byteLength) {\n if (value > max || value < min) {\n const n = typeof min === 'bigint' ? 'n' : ''\n let range\n if (byteLength > 3) {\n if (min === 0 || min === BigInt(0)) {\n range = `>= 0${n} and < 2${n} ** ${(byteLength + 1) * 8}${n}`\n } else {\n range = `>= -(2${n} ** ${(byteLength + 1) * 8 - 1}${n}) and < 2 ** ` +\n `${(byteLength + 1) * 8 - 1}${n}`\n }\n } else {\n range = `>= ${min}${n} and <= ${max}${n}`\n }\n throw new errors.ERR_OUT_OF_RANGE('value', range, value)\n }\n checkBounds(buf, offset, byteLength)\n}\n\nfunction validateNumber (value, name) {\n if (typeof value !== 'number') {\n throw new errors.ERR_INVALID_ARG_TYPE(name, 'number', value)\n }\n}\n\nfunction boundsError (value, length, type) {\n if (Math.floor(value) !== value) {\n validateNumber(value, type)\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset', 'an integer', value)\n }\n\n if (length < 0) {\n throw new errors.ERR_BUFFER_OUT_OF_BOUNDS()\n }\n\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset',\n `>= ${type ? 1 : 0} and <= ${length}`,\n value)\n}\n\n// HELPER FUNCTIONS\n// ================\n\nconst INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n // Node takes equal signs as end of the Base64 encoding\n str = str.split('=')[0]\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = str.trim().replace(INVALID_BASE64_RE, '')\n // Node converts strings with length < 2 to ''\n if (str.length < 2) return ''\n // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n while (str.length % 4 !== 0) {\n str = str + '='\n }\n return str\n}\n\nfunction utf8ToBytes (string, units) {\n units = units || Infinity\n let codePoint\n const length = string.length\n let leadSurrogate = null\n const bytes = []\n\n for (let i = 0; i < length; ++i) {\n codePoint = string.charCodeAt(i)\n\n // is surrogate component\n if (codePoint > 0xD7FF && codePoint < 0xE000) {\n // last char was a lead\n if (!leadSurrogate) {\n // no lead yet\n if (codePoint > 0xDBFF) {\n // unexpected trail\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n } else if (i + 1 === length) {\n // unpaired lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n }\n\n // valid lead\n leadSurrogate = codePoint\n\n continue\n }\n\n // 2 leads in a row\n if (codePoint < 0xDC00) {\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n leadSurrogate = codePoint\n continue\n }\n\n // valid surrogate pair\n codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n } else if (leadSurrogate) {\n // valid bmp char, but last char was a lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n }\n\n leadSurrogate = null\n\n // encode utf8\n if (codePoint < 0x80) {\n if ((units -= 1) < 0) break\n bytes.push(codePoint)\n } else if (codePoint < 0x800) {\n if ((units -= 2) < 0) break\n bytes.push(\n codePoint >> 0x6 | 0xC0,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x10000) {\n if ((units -= 3) < 0) break\n bytes.push(\n codePoint >> 0xC | 0xE0,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x110000) {\n if ((units -= 4) < 0) break\n bytes.push(\n codePoint >> 0x12 | 0xF0,\n codePoint >> 0xC & 0x3F | 0x80,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else {\n throw new Error('Invalid code point')\n }\n }\n\n return bytes\n}\n\nfunction asciiToBytes (str) {\n const byteArray = []\n for (let i = 0; i < str.length; ++i) {\n // Node's code seems to be doing this and not & 0x7F..\n byteArray.push(str.charCodeAt(i) & 0xFF)\n }\n return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n let c, hi, lo\n const byteArray = []\n for (let i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0) break\n\n c = str.charCodeAt(i)\n hi = c >> 8\n lo = c % 256\n byteArray.push(lo)\n byteArray.push(hi)\n }\n\n return byteArray\n}\n\nfunction base64ToBytes (str) {\n return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n let i\n for (i = 0; i < length; ++i) {\n if ((i + offset >= dst.length) || (i >= src.length)) break\n dst[i + offset] = src[i]\n }\n return i\n}\n\n// ArrayBuffer or Uint8Array objects from other contexts (i.e. iframes) do not pass\n// the `instanceof` check but they should be treated as of that type.\n// See: https://github.com/feross/buffer/issues/166\nfunction isInstance (obj, type) {\n return obj instanceof type ||\n (obj != null && obj.constructor != null && obj.constructor.name != null &&\n obj.constructor.name === type.name)\n}\nfunction numberIsNaN (obj) {\n // For IE11 support\n return obj !== obj // eslint-disable-line no-self-compare\n}\n\n// Create lookup table for `toString('hex')`\n// See: https://github.com/feross/buffer/issues/219\nconst hexSliceLookupTable = (function () {\n const alphabet = '0123456789abcdef'\n const table = new Array(256)\n for (let i = 0; i < 16; ++i) {\n const i16 = i * 16\n for (let j = 0; j < 16; ++j) {\n table[i16 + j] = alphabet[i] + alphabet[j]\n }\n }\n return table\n})()\n\n// Return not function with Error if BigInt not supported\nfunction defineBigIntMethod (fn) {\n return typeof BigInt === 'undefined' ? BufferBigIntNotDefined : fn\n}\n\nfunction BufferBigIntNotDefined () {\n throw new Error('BigInt not supported')\n}\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\nvar R = typeof Reflect === 'object' ? Reflect : null\nvar ReflectApply = R && typeof R.apply === 'function'\n ? R.apply\n : function ReflectApply(target, receiver, args) {\n return Function.prototype.apply.call(target, receiver, args);\n }\n\nvar ReflectOwnKeys\nif (R && typeof R.ownKeys === 'function') {\n ReflectOwnKeys = R.ownKeys\n} else if (Object.getOwnPropertySymbols) {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target)\n .concat(Object.getOwnPropertySymbols(target));\n };\n} else {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target);\n };\n}\n\nfunction ProcessEmitWarning(warning) {\n if (console && console.warn) console.warn(warning);\n}\n\nvar NumberIsNaN = Number.isNaN || function NumberIsNaN(value) {\n return value !== value;\n}\n\nfunction EventEmitter() {\n EventEmitter.init.call(this);\n}\nmodule.exports = EventEmitter;\nmodule.exports.once = once;\n\n// Backwards-compat with node 0.10.x\nEventEmitter.EventEmitter = EventEmitter;\n\nEventEmitter.prototype._events = undefined;\nEventEmitter.prototype._eventsCount = 0;\nEventEmitter.prototype._maxListeners = undefined;\n\n// By default EventEmitters will print a warning if more than 10 listeners are\n// added to it. This is a useful default which helps finding memory leaks.\nvar defaultMaxListeners = 10;\n\nfunction checkListener(listener) {\n if (typeof listener !== 'function') {\n throw new TypeError('The \"listener\" argument must be of type Function. Received type ' + typeof listener);\n }\n}\n\nObject.defineProperty(EventEmitter, 'defaultMaxListeners', {\n enumerable: true,\n get: function() {\n return defaultMaxListeners;\n },\n set: function(arg) {\n if (typeof arg !== 'number' || arg < 0 || NumberIsNaN(arg)) {\n throw new RangeError('The value of \"defaultMaxListeners\" is out of range. It must be a non-negative number. Received ' + arg + '.');\n }\n defaultMaxListeners = arg;\n }\n});\n\nEventEmitter.init = function() {\n\n if (this._events === undefined ||\n this._events === Object.getPrototypeOf(this)._events) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n }\n\n this._maxListeners = this._maxListeners || undefined;\n};\n\n// Obviously not all Emitters should be limited to 10. This function allows\n// that to be increased. Set to zero for unlimited.\nEventEmitter.prototype.setMaxListeners = function setMaxListeners(n) {\n if (typeof n !== 'number' || n < 0 || NumberIsNaN(n)) {\n throw new RangeError('The value of \"n\" is out of range. It must be a non-negative number. Received ' + n + '.');\n }\n this._maxListeners = n;\n return this;\n};\n\nfunction _getMaxListeners(that) {\n if (that._maxListeners === undefined)\n return EventEmitter.defaultMaxListeners;\n return that._maxListeners;\n}\n\nEventEmitter.prototype.getMaxListeners = function getMaxListeners() {\n return _getMaxListeners(this);\n};\n\nEventEmitter.prototype.emit = function emit(type) {\n var args = [];\n for (var i = 1; i < arguments.length; i++) args.push(arguments[i]);\n var doError = (type === 'error');\n\n var events = this._events;\n if (events !== undefined)\n doError = (doError && events.error === undefined);\n else if (!doError)\n return false;\n\n // If there is no 'error' event listener then throw.\n if (doError) {\n var er;\n if (args.length > 0)\n er = args[0];\n if (er instanceof Error) {\n // Note: The comments on the `throw` lines are intentional, they show\n // up in Node's output if this results in an unhandled exception.\n throw er; // Unhandled 'error' event\n }\n // At least give some kind of context to the user\n var err = new Error('Unhandled error.' + (er ? ' (' + er.message + ')' : ''));\n err.context = er;\n throw err; // Unhandled 'error' event\n }\n\n var handler = events[type];\n\n if (handler === undefined)\n return false;\n\n if (typeof handler === 'function') {\n ReflectApply(handler, this, args);\n } else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n ReflectApply(listeners[i], this, args);\n }\n\n return true;\n};\n\nfunction _addListener(target, type, listener, prepend) {\n var m;\n var events;\n var existing;\n\n checkListener(listener);\n\n events = target._events;\n if (events === undefined) {\n events = target._events = Object.create(null);\n target._eventsCount = 0;\n } else {\n // To avoid recursion in the case that type === \"newListener\"! Before\n // adding it to the listeners, first emit \"newListener\".\n if (events.newListener !== undefined) {\n target.emit('newListener', type,\n listener.listener ? listener.listener : listener);\n\n // Re-assign `events` because a newListener handler could have caused the\n // this._events to be assigned to a new object\n events = target._events;\n }\n existing = events[type];\n }\n\n if (existing === undefined) {\n // Optimize the case of one listener. Don't need the extra array object.\n existing = events[type] = listener;\n ++target._eventsCount;\n } else {\n if (typeof existing === 'function') {\n // Adding the second element, need to change to array.\n existing = events[type] =\n prepend ? [listener, existing] : [existing, listener];\n // If we've already got an array, just append.\n } else if (prepend) {\n existing.unshift(listener);\n } else {\n existing.push(listener);\n }\n\n // Check for listener leak\n m = _getMaxListeners(target);\n if (m > 0 && existing.length > m && !existing.warned) {\n existing.warned = true;\n // No error code for this since it is a Warning\n // eslint-disable-next-line no-restricted-syntax\n var w = new Error('Possible EventEmitter memory leak detected. ' +\n existing.length + ' ' + String(type) + ' listeners ' +\n 'added. Use emitter.setMaxListeners() to ' +\n 'increase limit');\n w.name = 'MaxListenersExceededWarning';\n w.emitter = target;\n w.type = type;\n w.count = existing.length;\n ProcessEmitWarning(w);\n }\n }\n\n return target;\n}\n\nEventEmitter.prototype.addListener = function addListener(type, listener) {\n return _addListener(this, type, listener, false);\n};\n\nEventEmitter.prototype.on = EventEmitter.prototype.addListener;\n\nEventEmitter.prototype.prependListener =\n function prependListener(type, listener) {\n return _addListener(this, type, listener, true);\n };\n\nfunction onceWrapper() {\n if (!this.fired) {\n this.target.removeListener(this.type, this.wrapFn);\n this.fired = true;\n if (arguments.length === 0)\n return this.listener.call(this.target);\n return this.listener.apply(this.target, arguments);\n }\n}\n\nfunction _onceWrap(target, type, listener) {\n var state = { fired: false, wrapFn: undefined, target: target, type: type, listener: listener };\n var wrapped = onceWrapper.bind(state);\n wrapped.listener = listener;\n state.wrapFn = wrapped;\n return wrapped;\n}\n\nEventEmitter.prototype.once = function once(type, listener) {\n checkListener(listener);\n this.on(type, _onceWrap(this, type, listener));\n return this;\n};\n\nEventEmitter.prototype.prependOnceListener =\n function prependOnceListener(type, listener) {\n checkListener(listener);\n this.prependListener(type, _onceWrap(this, type, listener));\n return this;\n };\n\n// Emits a 'removeListener' event if and only if the listener was removed.\nEventEmitter.prototype.removeListener =\n function removeListener(type, listener) {\n var list, events, position, i, originalListener;\n\n checkListener(listener);\n\n events = this._events;\n if (events === undefined)\n return this;\n\n list = events[type];\n if (list === undefined)\n return this;\n\n if (list === listener || list.listener === listener) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else {\n delete events[type];\n if (events.removeListener)\n this.emit('removeListener', type, list.listener || listener);\n }\n } else if (typeof list !== 'function') {\n position = -1;\n\n for (i = list.length - 1; i >= 0; i--) {\n if (list[i] === listener || list[i].listener === listener) {\n originalListener = list[i].listener;\n position = i;\n break;\n }\n }\n\n if (position < 0)\n return this;\n\n if (position === 0)\n list.shift();\n else {\n spliceOne(list, position);\n }\n\n if (list.length === 1)\n events[type] = list[0];\n\n if (events.removeListener !== undefined)\n this.emit('removeListener', type, originalListener || listener);\n }\n\n return this;\n };\n\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\n\nEventEmitter.prototype.removeAllListeners =\n function removeAllListeners(type) {\n var listeners, events, i;\n\n events = this._events;\n if (events === undefined)\n return this;\n\n // not listening for removeListener, no need to emit\n if (events.removeListener === undefined) {\n if (arguments.length === 0) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n } else if (events[type] !== undefined) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else\n delete events[type];\n }\n return this;\n }\n\n // emit removeListener for all listeners on all events\n if (arguments.length === 0) {\n var keys = Object.keys(events);\n var key;\n for (i = 0; i < keys.length; ++i) {\n key = keys[i];\n if (key === 'removeListener') continue;\n this.removeAllListeners(key);\n }\n this.removeAllListeners('removeListener');\n this._events = Object.create(null);\n this._eventsCount = 0;\n return this;\n }\n\n listeners = events[type];\n\n if (typeof listeners === 'function') {\n this.removeListener(type, listeners);\n } else if (listeners !== undefined) {\n // LIFO order\n for (i = listeners.length - 1; i >= 0; i--) {\n this.removeListener(type, listeners[i]);\n }\n }\n\n return this;\n };\n\nfunction _listeners(target, type, unwrap) {\n var events = target._events;\n\n if (events === undefined)\n return [];\n\n var evlistener = events[type];\n if (evlistener === undefined)\n return [];\n\n if (typeof evlistener === 'function')\n return unwrap ? [evlistener.listener || evlistener] : [evlistener];\n\n return unwrap ?\n unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length);\n}\n\nEventEmitter.prototype.listeners = function listeners(type) {\n return _listeners(this, type, true);\n};\n\nEventEmitter.prototype.rawListeners = function rawListeners(type) {\n return _listeners(this, type, false);\n};\n\nEventEmitter.listenerCount = function(emitter, type) {\n if (typeof emitter.listenerCount === 'function') {\n return emitter.listenerCount(type);\n } else {\n return listenerCount.call(emitter, type);\n }\n};\n\nEventEmitter.prototype.listenerCount = listenerCount;\nfunction listenerCount(type) {\n var events = this._events;\n\n if (events !== undefined) {\n var evlistener = events[type];\n\n if (typeof evlistener === 'function') {\n return 1;\n } else if (evlistener !== undefined) {\n return evlistener.length;\n }\n }\n\n return 0;\n}\n\nEventEmitter.prototype.eventNames = function eventNames() {\n return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : [];\n};\n\nfunction arrayClone(arr, n) {\n var copy = new Array(n);\n for (var i = 0; i < n; ++i)\n copy[i] = arr[i];\n return copy;\n}\n\nfunction spliceOne(list, index) {\n for (; index + 1 < list.length; index++)\n list[index] = list[index + 1];\n list.pop();\n}\n\nfunction unwrapListeners(arr) {\n var ret = new Array(arr.length);\n for (var i = 0; i < ret.length; ++i) {\n ret[i] = arr[i].listener || arr[i];\n }\n return ret;\n}\n\nfunction once(emitter, name) {\n return new Promise(function (resolve, reject) {\n function errorListener(err) {\n emitter.removeListener(name, resolver);\n reject(err);\n }\n\n function resolver() {\n if (typeof emitter.removeListener === 'function') {\n emitter.removeListener('error', errorListener);\n }\n resolve([].slice.call(arguments));\n };\n\n eventTargetAgnosticAddListener(emitter, name, resolver, { once: true });\n if (name !== 'error') {\n addErrorHandlerIfEventEmitter(emitter, errorListener, { once: true });\n }\n });\n}\n\nfunction addErrorHandlerIfEventEmitter(emitter, handler, flags) {\n if (typeof emitter.on === 'function') {\n eventTargetAgnosticAddListener(emitter, 'error', handler, flags);\n }\n}\n\nfunction eventTargetAgnosticAddListener(emitter, name, listener, flags) {\n if (typeof emitter.on === 'function') {\n if (flags.once) {\n emitter.once(name, listener);\n } else {\n emitter.on(name, listener);\n }\n } else if (typeof emitter.addEventListener === 'function') {\n // EventTarget does not have `error` event semantics like Node\n // EventEmitters, we do not listen for `error` events here.\n emitter.addEventListener(name, function wrapListener(arg) {\n // IE does not have builtin `{ once: true }` support so we\n // have to do it manually.\n if (flags.once) {\n emitter.removeEventListener(name, wrapListener);\n }\n listener(arg);\n });\n } else {\n throw new TypeError('The \"emitter\" argument must be of type EventEmitter. Received type ' + typeof emitter);\n }\n}\n","/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */\nexports.read = function (buffer, offset, isLE, mLen, nBytes) {\n var e, m\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var nBits = -7\n var i = isLE ? (nBytes - 1) : 0\n var d = isLE ? -1 : 1\n var s = buffer[offset + i]\n\n i += d\n\n e = s & ((1 << (-nBits)) - 1)\n s >>= (-nBits)\n nBits += eLen\n for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & ((1 << (-nBits)) - 1)\n e >>= (-nBits)\n nBits += mLen\n for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias\n } else if (e === eMax) {\n return m ? NaN : ((s ? -1 : 1) * Infinity)\n } else {\n m = m + Math.pow(2, mLen)\n e = e - eBias\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n var i = isLE ? 0 : (nBytes - 1)\n var d = isLE ? 1 : -1\n var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n value = Math.abs(value)\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0\n e = eMax\n } else {\n e = Math.floor(Math.log(value) / Math.LN2)\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--\n c *= 2\n }\n if (e + eBias >= 1) {\n value += rt / c\n } else {\n value += rt * Math.pow(2, 1 - eBias)\n }\n if (value * c >= 2) {\n e++\n c /= 2\n }\n\n if (e + eBias >= eMax) {\n m = 0\n e = eMax\n } else if (e + eBias >= 1) {\n m = ((value * c) - 1) * Math.pow(2, mLen)\n e = e + eBias\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n e = 0\n }\n }\n\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n e = (e << mLen) | m\n eLen += mLen\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128\n}\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView');\n\nmodule.exports = DataView;\n","var hashClear = require('./_hashClear'),\n hashDelete = require('./_hashDelete'),\n hashGet = require('./_hashGet'),\n hashHas = require('./_hashHas'),\n hashSet = require('./_hashSet');\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\nmodule.exports = Hash;\n","var listCacheClear = require('./_listCacheClear'),\n listCacheDelete = require('./_listCacheDelete'),\n listCacheGet = require('./_listCacheGet'),\n listCacheHas = require('./_listCacheHas'),\n listCacheSet = require('./_listCacheSet');\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\nmodule.exports = ListCache;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map');\n\nmodule.exports = Map;\n","var mapCacheClear = require('./_mapCacheClear'),\n mapCacheDelete = require('./_mapCacheDelete'),\n mapCacheGet = require('./_mapCacheGet'),\n mapCacheHas = require('./_mapCacheHas'),\n mapCacheSet = require('./_mapCacheSet');\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\nmodule.exports = MapCache;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Promise = getNative(root, 'Promise');\n\nmodule.exports = Promise;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Set = getNative(root, 'Set');\n\nmodule.exports = Set;\n","var MapCache = require('./_MapCache'),\n setCacheAdd = require('./_setCacheAdd'),\n setCacheHas = require('./_setCacheHas');\n\n/**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\nfunction SetCache(values) {\n var index = -1,\n length = values == null ? 0 : values.length;\n\n this.__data__ = new MapCache;\n while (++index < length) {\n this.add(values[index]);\n }\n}\n\n// Add methods to `SetCache`.\nSetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\nSetCache.prototype.has = setCacheHas;\n\nmodule.exports = SetCache;\n","var ListCache = require('./_ListCache'),\n stackClear = require('./_stackClear'),\n stackDelete = require('./_stackDelete'),\n stackGet = require('./_stackGet'),\n stackHas = require('./_stackHas'),\n stackSet = require('./_stackSet');\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\nmodule.exports = Stack;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Uint8Array = root.Uint8Array;\n\nmodule.exports = Uint8Array;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar WeakMap = getNative(root, 'WeakMap');\n\nmodule.exports = WeakMap;\n","/**\n * A specialized version of `_.forEach` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\nfunction arrayEach(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (iteratee(array[index], index, array) === false) {\n break;\n }\n }\n return array;\n}\n\nmodule.exports = arrayEach;\n","/**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\nfunction arrayFilter(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result[resIndex++] = value;\n }\n }\n return result;\n}\n\nmodule.exports = arrayFilter;\n","var baseTimes = require('./_baseTimes'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isIndex = require('./_isIndex'),\n isTypedArray = require('./isTypedArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = arrayLikeKeys;\n","/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n}\n\nmodule.exports = arrayPush;\n","/**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\nfunction arraySome(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (predicate(array[index], index, array)) {\n return true;\n }\n }\n return false;\n}\n\nmodule.exports = arraySome;\n","var baseAssignValue = require('./_baseAssignValue'),\n eq = require('./eq');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\nmodule.exports = assignValue;\n","var eq = require('./eq');\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\nmodule.exports = assocIndexOf;\n","var copyObject = require('./_copyObject'),\n keys = require('./keys');\n\n/**\n * The base implementation of `_.assign` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssign(object, source) {\n return object && copyObject(source, keys(source), object);\n}\n\nmodule.exports = baseAssign;\n","var copyObject = require('./_copyObject'),\n keysIn = require('./keysIn');\n\n/**\n * The base implementation of `_.assignIn` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssignIn(object, source) {\n return object && copyObject(source, keysIn(source), object);\n}\n\nmodule.exports = baseAssignIn;\n","var defineProperty = require('./_defineProperty');\n\n/**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction baseAssignValue(object, key, value) {\n if (key == '__proto__' && defineProperty) {\n defineProperty(object, key, {\n 'configurable': true,\n 'enumerable': true,\n 'value': value,\n 'writable': true\n });\n } else {\n object[key] = value;\n }\n}\n\nmodule.exports = baseAssignValue;\n","var Stack = require('./_Stack'),\n arrayEach = require('./_arrayEach'),\n assignValue = require('./_assignValue'),\n baseAssign = require('./_baseAssign'),\n baseAssignIn = require('./_baseAssignIn'),\n cloneBuffer = require('./_cloneBuffer'),\n copyArray = require('./_copyArray'),\n copySymbols = require('./_copySymbols'),\n copySymbolsIn = require('./_copySymbolsIn'),\n getAllKeys = require('./_getAllKeys'),\n getAllKeysIn = require('./_getAllKeysIn'),\n getTag = require('./_getTag'),\n initCloneArray = require('./_initCloneArray'),\n initCloneByTag = require('./_initCloneByTag'),\n initCloneObject = require('./_initCloneObject'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isMap = require('./isMap'),\n isObject = require('./isObject'),\n isSet = require('./isSet'),\n keys = require('./keys'),\n keysIn = require('./keysIn');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_FLAT_FLAG = 2,\n CLONE_SYMBOLS_FLAG = 4;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values supported by `_.clone`. */\nvar cloneableTags = {};\ncloneableTags[argsTag] = cloneableTags[arrayTag] =\ncloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =\ncloneableTags[boolTag] = cloneableTags[dateTag] =\ncloneableTags[float32Tag] = cloneableTags[float64Tag] =\ncloneableTags[int8Tag] = cloneableTags[int16Tag] =\ncloneableTags[int32Tag] = cloneableTags[mapTag] =\ncloneableTags[numberTag] = cloneableTags[objectTag] =\ncloneableTags[regexpTag] = cloneableTags[setTag] =\ncloneableTags[stringTag] = cloneableTags[symbolTag] =\ncloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =\ncloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;\ncloneableTags[errorTag] = cloneableTags[funcTag] =\ncloneableTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.clone` and `_.cloneDeep` which tracks\n * traversed objects.\n *\n * @private\n * @param {*} value The value to clone.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Deep clone\n * 2 - Flatten inherited properties\n * 4 - Clone symbols\n * @param {Function} [customizer] The function to customize cloning.\n * @param {string} [key] The key of `value`.\n * @param {Object} [object] The parent object of `value`.\n * @param {Object} [stack] Tracks traversed objects and their clone counterparts.\n * @returns {*} Returns the cloned value.\n */\nfunction baseClone(value, bitmask, customizer, key, object, stack) {\n var result,\n isDeep = bitmask & CLONE_DEEP_FLAG,\n isFlat = bitmask & CLONE_FLAT_FLAG,\n isFull = bitmask & CLONE_SYMBOLS_FLAG;\n\n if (customizer) {\n result = object ? customizer(value, key, object, stack) : customizer(value);\n }\n if (result !== undefined) {\n return result;\n }\n if (!isObject(value)) {\n return value;\n }\n var isArr = isArray(value);\n if (isArr) {\n result = initCloneArray(value);\n if (!isDeep) {\n return copyArray(value, result);\n }\n } else {\n var tag = getTag(value),\n isFunc = tag == funcTag || tag == genTag;\n\n if (isBuffer(value)) {\n return cloneBuffer(value, isDeep);\n }\n if (tag == objectTag || tag == argsTag || (isFunc && !object)) {\n result = (isFlat || isFunc) ? {} : initCloneObject(value);\n if (!isDeep) {\n return isFlat\n ? copySymbolsIn(value, baseAssignIn(result, value))\n : copySymbols(value, baseAssign(result, value));\n }\n } else {\n if (!cloneableTags[tag]) {\n return object ? value : {};\n }\n result = initCloneByTag(value, tag, isDeep);\n }\n }\n // Check for circular references and return its corresponding clone.\n stack || (stack = new Stack);\n var stacked = stack.get(value);\n if (stacked) {\n return stacked;\n }\n stack.set(value, result);\n\n if (isSet(value)) {\n value.forEach(function(subValue) {\n result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));\n });\n } else if (isMap(value)) {\n value.forEach(function(subValue, key) {\n result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n }\n\n var keysFunc = isFull\n ? (isFlat ? getAllKeysIn : getAllKeys)\n : (isFlat ? keysIn : keys);\n\n var props = isArr ? undefined : keysFunc(value);\n arrayEach(props || value, function(subValue, key) {\n if (props) {\n key = subValue;\n subValue = value[key];\n }\n // Recursively populate clone (susceptible to call stack limits).\n assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n return result;\n}\n\nmodule.exports = baseClone;\n","var isObject = require('./isObject');\n\n/** Built-in value references. */\nvar objectCreate = Object.create;\n\n/**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} proto The object to inherit from.\n * @returns {Object} Returns the new object.\n */\nvar baseCreate = (function() {\n function object() {}\n return function(proto) {\n if (!isObject(proto)) {\n return {};\n }\n if (objectCreate) {\n return objectCreate(proto);\n }\n object.prototype = proto;\n var result = new object;\n object.prototype = undefined;\n return result;\n };\n}());\n\nmodule.exports = baseCreate;\n","var arrayPush = require('./_arrayPush'),\n isArray = require('./isArray');\n\n/**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction baseGetAllKeys(object, keysFunc, symbolsFunc) {\n var result = keysFunc(object);\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n}\n\nmodule.exports = baseGetAllKeys;\n","var Symbol = require('./_Symbol'),\n getRawTag = require('./_getRawTag'),\n objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]';\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\nmodule.exports = baseIsArguments;\n","var baseIsEqualDeep = require('./_baseIsEqualDeep'),\n isObjectLike = require('./isObjectLike');\n\n/**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Unordered comparison\n * 2 - Partial comparison\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\nfunction baseIsEqual(value, other, bitmask, customizer, stack) {\n if (value === other) {\n return true;\n }\n if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\n return value !== value && other !== other;\n }\n return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n}\n\nmodule.exports = baseIsEqual;\n","var Stack = require('./_Stack'),\n equalArrays = require('./_equalArrays'),\n equalByTag = require('./_equalByTag'),\n equalObjects = require('./_equalObjects'),\n getTag = require('./_getTag'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isTypedArray = require('./isTypedArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n var objIsArr = isArray(object),\n othIsArr = isArray(other),\n objTag = objIsArr ? arrayTag : getTag(object),\n othTag = othIsArr ? arrayTag : getTag(other);\n\n objTag = objTag == argsTag ? objectTag : objTag;\n othTag = othTag == argsTag ? objectTag : othTag;\n\n var objIsObj = objTag == objectTag,\n othIsObj = othTag == objectTag,\n isSameTag = objTag == othTag;\n\n if (isSameTag && isBuffer(object)) {\n if (!isBuffer(other)) {\n return false;\n }\n objIsArr = true;\n objIsObj = false;\n }\n if (isSameTag && !objIsObj) {\n stack || (stack = new Stack);\n return (objIsArr || isTypedArray(object))\n ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n }\n if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n if (objIsWrapped || othIsWrapped) {\n var objUnwrapped = objIsWrapped ? object.value() : object,\n othUnwrapped = othIsWrapped ? other.value() : other;\n\n stack || (stack = new Stack);\n return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n }\n }\n if (!isSameTag) {\n return false;\n }\n stack || (stack = new Stack);\n return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n}\n\nmodule.exports = baseIsEqualDeep;\n","var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]';\n\n/**\n * The base implementation of `_.isMap` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n */\nfunction baseIsMap(value) {\n return isObjectLike(value) && getTag(value) == mapTag;\n}\n\nmodule.exports = baseIsMap;\n","var isFunction = require('./isFunction'),\n isMasked = require('./_isMasked'),\n isObject = require('./isObject'),\n toSource = require('./_toSource');\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\nmodule.exports = baseIsNative;\n","var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar setTag = '[object Set]';\n\n/**\n * The base implementation of `_.isSet` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n */\nfunction baseIsSet(value) {\n return isObjectLike(value) && getTag(value) == setTag;\n}\n\nmodule.exports = baseIsSet;\n","var baseGetTag = require('./_baseGetTag'),\n isLength = require('./isLength'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n\nmodule.exports = baseIsTypedArray;\n","var isPrototype = require('./_isPrototype'),\n nativeKeys = require('./_nativeKeys');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeys;\n","var isObject = require('./isObject'),\n isPrototype = require('./_isPrototype'),\n nativeKeysIn = require('./_nativeKeysIn');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeysIn(object) {\n if (!isObject(object)) {\n return nativeKeysIn(object);\n }\n var isProto = isPrototype(object),\n result = [];\n\n for (var key in object) {\n if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeysIn;\n","/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\nmodule.exports = baseTimes;\n","/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n return function(value) {\n return func(value);\n };\n}\n\nmodule.exports = baseUnary;\n","/**\n * Checks if a `cache` value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction cacheHas(cache, key) {\n return cache.has(key);\n}\n\nmodule.exports = cacheHas;\n","var Uint8Array = require('./_Uint8Array');\n\n/**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\nfunction cloneArrayBuffer(arrayBuffer) {\n var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n return result;\n}\n\nmodule.exports = cloneArrayBuffer;\n","var root = require('./_root');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined,\n allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;\n\n/**\n * Creates a clone of `buffer`.\n *\n * @private\n * @param {Buffer} buffer The buffer to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Buffer} Returns the cloned buffer.\n */\nfunction cloneBuffer(buffer, isDeep) {\n if (isDeep) {\n return buffer.slice();\n }\n var length = buffer.length,\n result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\n\n buffer.copy(result);\n return result;\n}\n\nmodule.exports = cloneBuffer;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer');\n\n/**\n * Creates a clone of `dataView`.\n *\n * @private\n * @param {Object} dataView The data view to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned data view.\n */\nfunction cloneDataView(dataView, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;\n return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);\n}\n\nmodule.exports = cloneDataView;\n","/** Used to match `RegExp` flags from their coerced string values. */\nvar reFlags = /\\w*$/;\n\n/**\n * Creates a clone of `regexp`.\n *\n * @private\n * @param {Object} regexp The regexp to clone.\n * @returns {Object} Returns the cloned regexp.\n */\nfunction cloneRegExp(regexp) {\n var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));\n result.lastIndex = regexp.lastIndex;\n return result;\n}\n\nmodule.exports = cloneRegExp;\n","var Symbol = require('./_Symbol');\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * Creates a clone of the `symbol` object.\n *\n * @private\n * @param {Object} symbol The symbol object to clone.\n * @returns {Object} Returns the cloned symbol object.\n */\nfunction cloneSymbol(symbol) {\n return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};\n}\n\nmodule.exports = cloneSymbol;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer');\n\n/**\n * Creates a clone of `typedArray`.\n *\n * @private\n * @param {Object} typedArray The typed array to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned typed array.\n */\nfunction cloneTypedArray(typedArray, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n}\n\nmodule.exports = cloneTypedArray;\n","/**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\nfunction copyArray(source, array) {\n var index = -1,\n length = source.length;\n\n array || (array = Array(length));\n while (++index < length) {\n array[index] = source[index];\n }\n return array;\n}\n\nmodule.exports = copyArray;\n","var assignValue = require('./_assignValue'),\n baseAssignValue = require('./_baseAssignValue');\n\n/**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\nfunction copyObject(source, props, object, customizer) {\n var isNew = !object;\n object || (object = {});\n\n var index = -1,\n length = props.length;\n\n while (++index < length) {\n var key = props[index];\n\n var newValue = customizer\n ? customizer(object[key], source[key], key, object, source)\n : undefined;\n\n if (newValue === undefined) {\n newValue = source[key];\n }\n if (isNew) {\n baseAssignValue(object, key, newValue);\n } else {\n assignValue(object, key, newValue);\n }\n }\n return object;\n}\n\nmodule.exports = copyObject;\n","var copyObject = require('./_copyObject'),\n getSymbols = require('./_getSymbols');\n\n/**\n * Copies own symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbols(source, object) {\n return copyObject(source, getSymbols(source), object);\n}\n\nmodule.exports = copySymbols;\n","var copyObject = require('./_copyObject'),\n getSymbolsIn = require('./_getSymbolsIn');\n\n/**\n * Copies own and inherited symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbolsIn(source, object) {\n return copyObject(source, getSymbolsIn(source), object);\n}\n\nmodule.exports = copySymbolsIn;\n","var root = require('./_root');\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\nmodule.exports = coreJsData;\n","var getNative = require('./_getNative');\n\nvar defineProperty = (function() {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n}());\n\nmodule.exports = defineProperty;\n","var SetCache = require('./_SetCache'),\n arraySome = require('./_arraySome'),\n cacheHas = require('./_cacheHas');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\nfunction equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n arrLength = array.length,\n othLength = other.length;\n\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n return false;\n }\n // Check that cyclic values are equal.\n var arrStacked = stack.get(array);\n var othStacked = stack.get(other);\n if (arrStacked && othStacked) {\n return arrStacked == other && othStacked == array;\n }\n var index = -1,\n result = true,\n seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n stack.set(array, other);\n stack.set(other, array);\n\n // Ignore non-index properties.\n while (++index < arrLength) {\n var arrValue = array[index],\n othValue = other[index];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, arrValue, index, other, array, stack)\n : customizer(arrValue, othValue, index, array, other, stack);\n }\n if (compared !== undefined) {\n if (compared) {\n continue;\n }\n result = false;\n break;\n }\n // Recursively compare arrays (susceptible to call stack limits).\n if (seen) {\n if (!arraySome(other, function(othValue, othIndex) {\n if (!cacheHas(seen, othIndex) &&\n (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n return seen.push(othIndex);\n }\n })) {\n result = false;\n break;\n }\n } else if (!(\n arrValue === othValue ||\n equalFunc(arrValue, othValue, bitmask, customizer, stack)\n )) {\n result = false;\n break;\n }\n }\n stack['delete'](array);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalArrays;\n","var Symbol = require('./_Symbol'),\n Uint8Array = require('./_Uint8Array'),\n eq = require('./eq'),\n equalArrays = require('./_equalArrays'),\n mapToArray = require('./_mapToArray'),\n setToArray = require('./_setToArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]';\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n switch (tag) {\n case dataViewTag:\n if ((object.byteLength != other.byteLength) ||\n (object.byteOffset != other.byteOffset)) {\n return false;\n }\n object = object.buffer;\n other = other.buffer;\n\n case arrayBufferTag:\n if ((object.byteLength != other.byteLength) ||\n !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n return false;\n }\n return true;\n\n case boolTag:\n case dateTag:\n case numberTag:\n // Coerce booleans to `1` or `0` and dates to milliseconds.\n // Invalid dates are coerced to `NaN`.\n return eq(+object, +other);\n\n case errorTag:\n return object.name == other.name && object.message == other.message;\n\n case regexpTag:\n case stringTag:\n // Coerce regexes to strings and treat strings, primitives and objects,\n // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n // for more details.\n return object == (other + '');\n\n case mapTag:\n var convert = mapToArray;\n\n case setTag:\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n convert || (convert = setToArray);\n\n if (object.size != other.size && !isPartial) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked) {\n return stacked == other;\n }\n bitmask |= COMPARE_UNORDERED_FLAG;\n\n // Recursively compare objects (susceptible to call stack limits).\n stack.set(object, other);\n var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n stack['delete'](object);\n return result;\n\n case symbolTag:\n if (symbolValueOf) {\n return symbolValueOf.call(object) == symbolValueOf.call(other);\n }\n }\n return false;\n}\n\nmodule.exports = equalByTag;\n","var getAllKeys = require('./_getAllKeys');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n objProps = getAllKeys(object),\n objLength = objProps.length,\n othProps = getAllKeys(other),\n othLength = othProps.length;\n\n if (objLength != othLength && !isPartial) {\n return false;\n }\n var index = objLength;\n while (index--) {\n var key = objProps[index];\n if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n return false;\n }\n }\n // Check that cyclic values are equal.\n var objStacked = stack.get(object);\n var othStacked = stack.get(other);\n if (objStacked && othStacked) {\n return objStacked == other && othStacked == object;\n }\n var result = true;\n stack.set(object, other);\n stack.set(other, object);\n\n var skipCtor = isPartial;\n while (++index < objLength) {\n key = objProps[index];\n var objValue = object[key],\n othValue = other[key];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, objValue, key, other, object, stack)\n : customizer(objValue, othValue, key, object, other, stack);\n }\n // Recursively compare objects (susceptible to call stack limits).\n if (!(compared === undefined\n ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n : compared\n )) {\n result = false;\n break;\n }\n skipCtor || (skipCtor = key == 'constructor');\n }\n if (result && !skipCtor) {\n var objCtor = object.constructor,\n othCtor = other.constructor;\n\n // Non `Object` object instances with different constructors are not equal.\n if (objCtor != othCtor &&\n ('constructor' in object && 'constructor' in other) &&\n !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n result = false;\n }\n }\n stack['delete'](object);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalObjects;\n","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n","var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbols = require('./_getSymbols'),\n keys = require('./keys');\n\n/**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeys(object) {\n return baseGetAllKeys(object, keys, getSymbols);\n}\n\nmodule.exports = getAllKeys;\n","var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbolsIn = require('./_getSymbolsIn'),\n keysIn = require('./keysIn');\n\n/**\n * Creates an array of own and inherited enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeysIn(object) {\n return baseGetAllKeys(object, keysIn, getSymbolsIn);\n}\n\nmodule.exports = getAllKeysIn;\n","var isKeyable = require('./_isKeyable');\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\nmodule.exports = getMapData;\n","var baseIsNative = require('./_baseIsNative'),\n getValue = require('./_getValue');\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\nmodule.exports = getNative;\n","var overArg = require('./_overArg');\n\n/** Built-in value references. */\nvar getPrototype = overArg(Object.getPrototypeOf, Object);\n\nmodule.exports = getPrototype;\n","var Symbol = require('./_Symbol');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nmodule.exports = getRawTag;\n","var arrayFilter = require('./_arrayFilter'),\n stubArray = require('./stubArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n if (object == null) {\n return [];\n }\n object = Object(object);\n return arrayFilter(nativeGetSymbols(object), function(symbol) {\n return propertyIsEnumerable.call(object, symbol);\n });\n};\n\nmodule.exports = getSymbols;\n","var arrayPush = require('./_arrayPush'),\n getPrototype = require('./_getPrototype'),\n getSymbols = require('./_getSymbols'),\n stubArray = require('./stubArray');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own and inherited enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {\n var result = [];\n while (object) {\n arrayPush(result, getSymbols(object));\n object = getPrototype(object);\n }\n return result;\n};\n\nmodule.exports = getSymbolsIn;\n","var DataView = require('./_DataView'),\n Map = require('./_Map'),\n Promise = require('./_Promise'),\n Set = require('./_Set'),\n WeakMap = require('./_WeakMap'),\n baseGetTag = require('./_baseGetTag'),\n toSource = require('./_toSource');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n setTag = '[object Set]',\n weakMapTag = '[object WeakMap]';\n\nvar dataViewTag = '[object DataView]';\n\n/** Used to detect maps, sets, and weakmaps. */\nvar dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nvar getTag = baseGetTag;\n\n// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\nif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = baseGetTag(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : '';\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n}\n\nmodule.exports = getTag;\n","/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\nmodule.exports = getValue;\n","var nativeCreate = require('./_nativeCreate');\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n}\n\nmodule.exports = hashClear;\n","/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = hashDelete;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\nmodule.exports = hashGet;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\nmodule.exports = hashHas;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\nmodule.exports = hashSet;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Initializes an array clone.\n *\n * @private\n * @param {Array} array The array to clone.\n * @returns {Array} Returns the initialized clone.\n */\nfunction initCloneArray(array) {\n var length = array.length,\n result = new array.constructor(length);\n\n // Add properties assigned by `RegExp#exec`.\n if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {\n result.index = array.index;\n result.input = array.input;\n }\n return result;\n}\n\nmodule.exports = initCloneArray;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer'),\n cloneDataView = require('./_cloneDataView'),\n cloneRegExp = require('./_cloneRegExp'),\n cloneSymbol = require('./_cloneSymbol'),\n cloneTypedArray = require('./_cloneTypedArray');\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/**\n * Initializes an object clone based on its `toStringTag`.\n *\n * **Note:** This function only supports cloning values with tags of\n * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.\n *\n * @private\n * @param {Object} object The object to clone.\n * @param {string} tag The `toStringTag` of the object to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneByTag(object, tag, isDeep) {\n var Ctor = object.constructor;\n switch (tag) {\n case arrayBufferTag:\n return cloneArrayBuffer(object);\n\n case boolTag:\n case dateTag:\n return new Ctor(+object);\n\n case dataViewTag:\n return cloneDataView(object, isDeep);\n\n case float32Tag: case float64Tag:\n case int8Tag: case int16Tag: case int32Tag:\n case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:\n return cloneTypedArray(object, isDeep);\n\n case mapTag:\n return new Ctor;\n\n case numberTag:\n case stringTag:\n return new Ctor(object);\n\n case regexpTag:\n return cloneRegExp(object);\n\n case setTag:\n return new Ctor;\n\n case symbolTag:\n return cloneSymbol(object);\n }\n}\n\nmodule.exports = initCloneByTag;\n","var baseCreate = require('./_baseCreate'),\n getPrototype = require('./_getPrototype'),\n isPrototype = require('./_isPrototype');\n\n/**\n * Initializes an object clone.\n *\n * @private\n * @param {Object} object The object to clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneObject(object) {\n return (typeof object.constructor == 'function' && !isPrototype(object))\n ? baseCreate(getPrototype(object))\n : {};\n}\n\nmodule.exports = initCloneObject;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n var type = typeof value;\n length = length == null ? MAX_SAFE_INTEGER : length;\n\n return !!length &&\n (type == 'number' ||\n (type != 'symbol' && reIsUint.test(value))) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\nmodule.exports = isIndex;\n","/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\nmodule.exports = isKeyable;\n","var coreJsData = require('./_coreJsData');\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\nmodule.exports = isMasked;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\nmodule.exports = isPrototype;\n","/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n}\n\nmodule.exports = listCacheClear;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype;\n\n/** Built-in value references. */\nvar splice = arrayProto.splice;\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n}\n\nmodule.exports = listCacheDelete;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\nmodule.exports = listCacheGet;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\nmodule.exports = listCacheHas;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\nmodule.exports = listCacheSet;\n","var Hash = require('./_Hash'),\n ListCache = require('./_ListCache'),\n Map = require('./_Map');\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\nmodule.exports = mapCacheClear;\n","var getMapData = require('./_getMapData');\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = mapCacheDelete;\n","var getMapData = require('./_getMapData');\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\nmodule.exports = mapCacheGet;\n","var getMapData = require('./_getMapData');\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\nmodule.exports = mapCacheHas;\n","var getMapData = require('./_getMapData');\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n}\n\nmodule.exports = mapCacheSet;\n","/**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\nfunction mapToArray(map) {\n var index = -1,\n result = Array(map.size);\n\n map.forEach(function(value, key) {\n result[++index] = [key, value];\n });\n return result;\n}\n\nmodule.exports = mapToArray;\n","var getNative = require('./_getNative');\n\n/* Built-in method references that are verified to be native. */\nvar nativeCreate = getNative(Object, 'create');\n\nmodule.exports = nativeCreate;\n","var overArg = require('./_overArg');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeKeys = overArg(Object.keys, Object);\n\nmodule.exports = nativeKeys;\n","/**\n * This function is like\n * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * except that it includes inherited enumerable properties.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction nativeKeysIn(object) {\n var result = [];\n if (object != null) {\n for (var key in Object(object)) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = nativeKeysIn;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n try {\n // Use `util.types` for Node.js 10+.\n var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n if (types) {\n return types;\n }\n\n // Legacy `process.binding('util')` for Node.js < 10.\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n}());\n\nmodule.exports = nodeUtil;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n","/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\nmodule.exports = overArg;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n","/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\nfunction setCacheAdd(value) {\n this.__data__.set(value, HASH_UNDEFINED);\n return this;\n}\n\nmodule.exports = setCacheAdd;\n","/**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\nfunction setCacheHas(value) {\n return this.__data__.has(value);\n}\n\nmodule.exports = setCacheHas;\n","/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\nfunction setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n}\n\nmodule.exports = setToArray;\n","var ListCache = require('./_ListCache');\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}\n\nmodule.exports = stackClear;\n","/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n var data = this.__data__,\n result = data['delete'](key);\n\n this.size = data.size;\n return result;\n}\n\nmodule.exports = stackDelete;\n","/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n return this.__data__.get(key);\n}\n\nmodule.exports = stackGet;\n","/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n return this.__data__.has(key);\n}\n\nmodule.exports = stackHas;\n","var ListCache = require('./_ListCache'),\n Map = require('./_Map'),\n MapCache = require('./_MapCache');\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n var data = this.__data__;\n if (data instanceof ListCache) {\n var pairs = data.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n this.size = ++data.size;\n return this;\n }\n data = this.__data__ = new MapCache(pairs);\n }\n data.set(key, value);\n this.size = data.size;\n return this;\n}\n\nmodule.exports = stackSet;\n","/** Used for built-in method references. */\nvar funcProto = Function.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\nmodule.exports = toSource;\n","var baseClone = require('./_baseClone');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_SYMBOLS_FLAG = 4;\n\n/**\n * This method is like `_.clone` except that it recursively clones `value`.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Lang\n * @param {*} value The value to recursively clone.\n * @returns {*} Returns the deep cloned value.\n * @see _.clone\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var deep = _.cloneDeep(objects);\n * console.log(deep[0] === objects[0]);\n * // => false\n */\nfunction cloneDeep(value) {\n return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);\n}\n\nmodule.exports = cloneDeep;\n","/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\nmodule.exports = eq;\n","var baseIsArguments = require('./_baseIsArguments'),\n isObjectLike = require('./isObjectLike');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n};\n\nmodule.exports = isArguments;\n","/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\nmodule.exports = isArray;\n","var isFunction = require('./isFunction'),\n isLength = require('./isLength');\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\nmodule.exports = isArrayLike;\n","var root = require('./_root'),\n stubFalse = require('./stubFalse');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\nmodule.exports = isBuffer;\n","var baseIsEqual = require('./_baseIsEqual');\n\n/**\n * Performs a deep comparison between two values to determine if they are\n * equivalent.\n *\n * **Note:** This method supports comparing arrays, array buffers, booleans,\n * date objects, error objects, maps, numbers, `Object` objects, regexes,\n * sets, strings, symbols, and typed arrays. `Object` objects are compared\n * by their own, not inherited, enumerable properties. Functions and DOM\n * nodes are compared by strict equality, i.e. `===`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.isEqual(object, other);\n * // => true\n *\n * object === other;\n * // => false\n */\nfunction isEqual(value, other) {\n return baseIsEqual(value, other);\n}\n\nmodule.exports = isEqual;\n","var baseGetTag = require('./_baseGetTag'),\n isObject = require('./isObject');\n\n/** `Object#toString` result references. */\nvar asyncTag = '[object AsyncFunction]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n proxyTag = '[object Proxy]';\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\nmodule.exports = isFunction;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\nmodule.exports = isLength;\n","var baseIsMap = require('./_baseIsMap'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsMap = nodeUtil && nodeUtil.isMap;\n\n/**\n * Checks if `value` is classified as a `Map` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n * @example\n *\n * _.isMap(new Map);\n * // => true\n *\n * _.isMap(new WeakMap);\n * // => false\n */\nvar isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;\n\nmodule.exports = isMap;\n","/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n","var baseIsSet = require('./_baseIsSet'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsSet = nodeUtil && nodeUtil.isSet;\n\n/**\n * Checks if `value` is classified as a `Set` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n * @example\n *\n * _.isSet(new Set);\n * // => true\n *\n * _.isSet(new WeakSet);\n * // => false\n */\nvar isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;\n\nmodule.exports = isSet;\n","var baseIsTypedArray = require('./_baseIsTypedArray'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\nmodule.exports = isTypedArray;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeys = require('./_baseKeys'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\nmodule.exports = keys;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeysIn = require('./_baseKeysIn'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\nfunction keysIn(object) {\n return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n}\n\nmodule.exports = keysIn;\n","/**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\nfunction stubArray() {\n return [];\n}\n\nmodule.exports = stubArray;\n","/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n return false;\n}\n\nmodule.exports = stubFalse;\n","import { connect, type BaseConnectionOptions } from \"@openfin/core-web\";\nimport { getSettings } from \"../platform/settings/settings\";\n\n/**\n * Initializes the OpenFin Web Broker connection.\n * @param inherit Should we inherit settings from the host (available in the OpenFin layout system) or use settings? Default is true.\n */\nexport async function init(inherit: boolean = true): Promise {\n\t// Set window.fin to the `fin` object.\n\tlet options: BaseConnectionOptions | undefined;\n\tif (window.fin === undefined) {\n\t\tif (!inherit) {\n\t\t\tconst settings = await getSettings();\n\t\t\tif (settings === undefined) {\n\t\t\t\tconsole.error(\n\t\t\t\t\t\"Unable to run the sample as we have been unable to load the web manifest and it's settings from the currently running html page. Please ensure that the web manifest is being served and that it contains the custom_settings section.\"\n\t\t\t\t);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\toptions = {\n\t\t\t\tbrokerUrl: settings.platform.interop.brokerUrl,\n\t\t\t\tinteropConfig: {\n\t\t\t\t\tproviderId: settings.platform.interop.providerId,\n\t\t\t\t\tcurrentContextGroup: settings.platform.interop.defaultContextGroup\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t\t// Specify an interopConfig with a specific provider ID and a context group to initialize the `fin.me.interop` client on connection.\n\t\tif (options) {\n\t\t\twindow.fin = await connect({\n\t\t\t\toptions\n\t\t\t});\n\t\t} else {\n\t\t\twindow.fin = await connect({\n\t\t\t\tconnectionInheritance: \"enabled\"\n\t\t\t});\n\t\t}\n\t\tconsole.log(\"Finished initializing the fin API.\");\n\t\t// Create and dispatch the finReady event\n\t\tconst event = new CustomEvent(\"finReady\");\n\t\twindow.dispatchEvent(event);\n\t}\n\n\tif (window.fdc3 === undefined && window?.fin?.me.interop?.getFDC3Sync !== undefined) {\n\t\twindow.fdc3 = fin.me.interop.getFDC3Sync(\"2.0\");\n\t\tconsole.log(\"Finished initializing the fdc3 API.\");\n\t\t// Create and dispatch the FDC3Ready event\n\t\tconst event = new CustomEvent(\"fdc3Ready\");\n\t\twindow.dispatchEvent(event);\n\t}\n}\n","import type { OpenFin } from \"@openfin/core\";\nimport type { ManifestSettings, Settings } from \"../../shapes/setting-shapes\";\n\n/**\n * Fetches the settings for the application.\n * @returns The settings for the application.\n */\nexport async function getSettings(): Promise {\n\tconst savedSettings = await getSavedSettings();\n\tif (savedSettings) {\n\t\treturn savedSettings;\n\t}\n\tconst settings = await getManifestSettings();\n\tif (!Array.isArray(settings?.endpointProvider?.endpoints)) {\n\t\tconsole.error(\n\t\t\t\"Unable to run the example as settings are required and we fetch them from the link web manifest from the html page that is being served. It should exist in the customSettings section of the web manifest.\"\n\t\t);\n\t\treturn;\n\t}\n\tconst settingsEndpoint = settings.endpointProvider.endpoints.find(\n\t\t(endpoint) => endpoint.id === \"platform-settings\"\n\t);\n\n\tif (\n\t\tsettingsEndpoint === undefined ||\n\t\tsettingsEndpoint.type !== \"fetch\" ||\n\t\tsettingsEndpoint.options.method !== \"GET\" ||\n\t\tsettingsEndpoint.options.url === undefined\n\t) {\n\t\tconsole.error(\n\t\t\t\"Unable to run the example as settings are required and we fetch them from the endpoint defined with the id: 'platform-settings' in the manifest. It needs to be of type fetch, performing a GET and it must have a url defined.\"\n\t\t);\n\t\treturn;\n\t}\n\tconst platformSettings = await fetch(settingsEndpoint?.options.url);\n\tconst settingsJson = (await platformSettings.json()) as Settings;\n\treturn settingsJson;\n}\n\n/**\n * Returns a default layout from the settings if provided.\n * @returns The default layout from the settings.\n */\nexport async function getDefaultLayout(): Promise {\n\tconst settings = await getSettings();\n\tif (settings?.platform?.layout?.defaultLayout === undefined) {\n\t\tconsole.error(\n\t\t\t\"Unable to run the example as without a layout being defined. Please ensure that settings have been provided in the web manifest.\"\n\t\t);\n\t\treturn;\n\t}\n\tif (typeof settings.platform.layout.defaultLayout === \"string\") {\n\t\tconst layoutResponse = await fetch(settings.platform.layout.defaultLayout);\n\t\tconst layoutJson = (await layoutResponse.json()) as OpenFin.LayoutSnapshot;\n\t\treturn layoutJson;\n\t}\n\treturn settings.platform.layout.defaultLayout;\n}\n\n/**\n * Returns the settings from the manifest file.\n * @returns customSettings for this example\n */\nasync function getManifestSettings(): Promise {\n\t// Get the manifest link\n\tconst link = document.querySelector('link[rel=\"manifest\"]');\n\tif (link !== null) {\n\t\tconst manifestResponse = await fetch(link.href);\n\t\tconst manifestJson = (await manifestResponse.json()) as { custom_settings: ManifestSettings };\n\t\treturn manifestJson.custom_settings;\n\t}\n}\n\n/**\n * Clears any saved settings.\n * @returns The saved settings.\n */\nexport async function clearSettings(): Promise {\n\tconst settingsId = getSavedSettingsId();\n\tlocalStorage.removeItem(settingsId);\n}\n\n/**\n * Saves the settings.\n * @param settings The settings to save.\n */\nexport async function saveSettings(settings: Settings): Promise {\n\tconst settingsId = getSavedSettingsId();\n\tlocalStorage.setItem(settingsId, JSON.stringify(settings));\n}\n\n/**\n * Retrieves saved settings from local storage.\n * @returns The saved settings.\n */\nasync function getSavedSettings(): Promise {\n\tconst settingsId = getSavedSettingsId();\n\tconst settings = localStorage.getItem(settingsId);\n\tif (settings !== null) {\n\t\treturn JSON.parse(settings);\n\t}\n}\n\n/**\n * Get the Id used for saving and fetching settings from storage.\n * @returns The settings id.\n */\nfunction getSavedSettingsId(): string {\n\tconst urlParams = new URLSearchParams(window.location.search);\n\tconst env = urlParams.get(\"env\");\n\n\tconst settingsKey = env ? `${env}-settings` : \"settings\";\n\treturn settingsKey;\n}\n","export { default as v1 } from './v1.js';\nexport { default as v3 } from './v3.js';\nexport { default as v4 } from './v4.js';\nexport { default as v5 } from './v5.js';\nexport { default as NIL } from './nil.js';\nexport { default as version } from './version.js';\nexport { default as validate } from './validate.js';\nexport { default as stringify } from './stringify.js';\nexport { default as parse } from './parse.js';","/*\n * Browser-compatible JavaScript MD5\n *\n * Modification of JavaScript MD5\n * https://github.com/blueimp/JavaScript-MD5\n *\n * Copyright 2011, Sebastian Tschan\n * https://blueimp.net\n *\n * Licensed under the MIT license:\n * https://opensource.org/licenses/MIT\n *\n * Based on\n * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message\n * Digest Algorithm, as defined in RFC 1321.\n * Version 2.2 Copyright (C) Paul Johnston 1999 - 2009\n * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet\n * Distributed under the BSD License\n * See http://pajhome.org.uk/crypt/md5 for more info.\n */\nfunction md5(bytes) {\n if (typeof bytes === 'string') {\n var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape\n\n bytes = new Uint8Array(msg.length);\n\n for (var i = 0; i < msg.length; ++i) {\n bytes[i] = msg.charCodeAt(i);\n }\n }\n\n return md5ToHexEncodedArray(wordsToMd5(bytesToWords(bytes), bytes.length * 8));\n}\n/*\n * Convert an array of little-endian words to an array of bytes\n */\n\n\nfunction md5ToHexEncodedArray(input) {\n var output = [];\n var length32 = input.length * 32;\n var hexTab = '0123456789abcdef';\n\n for (var i = 0; i < length32; i += 8) {\n var x = input[i >> 5] >>> i % 32 & 0xff;\n var hex = parseInt(hexTab.charAt(x >>> 4 & 0x0f) + hexTab.charAt(x & 0x0f), 16);\n output.push(hex);\n }\n\n return output;\n}\n/**\n * Calculate output length with padding and bit length\n */\n\n\nfunction getOutputLength(inputLength8) {\n return (inputLength8 + 64 >>> 9 << 4) + 14 + 1;\n}\n/*\n * Calculate the MD5 of an array of little-endian words, and a bit length.\n */\n\n\nfunction wordsToMd5(x, len) {\n /* append padding */\n x[len >> 5] |= 0x80 << len % 32;\n x[getOutputLength(len) - 1] = len;\n var a = 1732584193;\n var b = -271733879;\n var c = -1732584194;\n var d = 271733878;\n\n for (var i = 0; i < x.length; i += 16) {\n var olda = a;\n var oldb = b;\n var oldc = c;\n var oldd = d;\n a = md5ff(a, b, c, d, x[i], 7, -680876936);\n d = md5ff(d, a, b, c, x[i + 1], 12, -389564586);\n c = md5ff(c, d, a, b, x[i + 2], 17, 606105819);\n b = md5ff(b, c, d, a, x[i + 3], 22, -1044525330);\n a = md5ff(a, b, c, d, x[i + 4], 7, -176418897);\n d = md5ff(d, a, b, c, x[i + 5], 12, 1200080426);\n c = md5ff(c, d, a, b, x[i + 6], 17, -1473231341);\n b = md5ff(b, c, d, a, x[i + 7], 22, -45705983);\n a = md5ff(a, b, c, d, x[i + 8], 7, 1770035416);\n d = md5ff(d, a, b, c, x[i + 9], 12, -1958414417);\n c = md5ff(c, d, a, b, x[i + 10], 17, -42063);\n b = md5ff(b, c, d, a, x[i + 11], 22, -1990404162);\n a = md5ff(a, b, c, d, x[i + 12], 7, 1804603682);\n d = md5ff(d, a, b, c, x[i + 13], 12, -40341101);\n c = md5ff(c, d, a, b, x[i + 14], 17, -1502002290);\n b = md5ff(b, c, d, a, x[i + 15], 22, 1236535329);\n a = md5gg(a, b, c, d, x[i + 1], 5, -165796510);\n d = md5gg(d, a, b, c, x[i + 6], 9, -1069501632);\n c = md5gg(c, d, a, b, x[i + 11], 14, 643717713);\n b = md5gg(b, c, d, a, x[i], 20, -373897302);\n a = md5gg(a, b, c, d, x[i + 5], 5, -701558691);\n d = md5gg(d, a, b, c, x[i + 10], 9, 38016083);\n c = md5gg(c, d, a, b, x[i + 15], 14, -660478335);\n b = md5gg(b, c, d, a, x[i + 4], 20, -405537848);\n a = md5gg(a, b, c, d, x[i + 9], 5, 568446438);\n d = md5gg(d, a, b, c, x[i + 14], 9, -1019803690);\n c = md5gg(c, d, a, b, x[i + 3], 14, -187363961);\n b = md5gg(b, c, d, a, x[i + 8], 20, 1163531501);\n a = md5gg(a, b, c, d, x[i + 13], 5, -1444681467);\n d = md5gg(d, a, b, c, x[i + 2], 9, -51403784);\n c = md5gg(c, d, a, b, x[i + 7], 14, 1735328473);\n b = md5gg(b, c, d, a, x[i + 12], 20, -1926607734);\n a = md5hh(a, b, c, d, x[i + 5], 4, -378558);\n d = md5hh(d, a, b, c, x[i + 8], 11, -2022574463);\n c = md5hh(c, d, a, b, x[i + 11], 16, 1839030562);\n b = md5hh(b, c, d, a, x[i + 14], 23, -35309556);\n a = md5hh(a, b, c, d, x[i + 1], 4, -1530992060);\n d = md5hh(d, a, b, c, x[i + 4], 11, 1272893353);\n c = md5hh(c, d, a, b, x[i + 7], 16, -155497632);\n b = md5hh(b, c, d, a, x[i + 10], 23, -1094730640);\n a = md5hh(a, b, c, d, x[i + 13], 4, 681279174);\n d = md5hh(d, a, b, c, x[i], 11, -358537222);\n c = md5hh(c, d, a, b, x[i + 3], 16, -722521979);\n b = md5hh(b, c, d, a, x[i + 6], 23, 76029189);\n a = md5hh(a, b, c, d, x[i + 9], 4, -640364487);\n d = md5hh(d, a, b, c, x[i + 12], 11, -421815835);\n c = md5hh(c, d, a, b, x[i + 15], 16, 530742520);\n b = md5hh(b, c, d, a, x[i + 2], 23, -995338651);\n a = md5ii(a, b, c, d, x[i], 6, -198630844);\n d = md5ii(d, a, b, c, x[i + 7], 10, 1126891415);\n c = md5ii(c, d, a, b, x[i + 14], 15, -1416354905);\n b = md5ii(b, c, d, a, x[i + 5], 21, -57434055);\n a = md5ii(a, b, c, d, x[i + 12], 6, 1700485571);\n d = md5ii(d, a, b, c, x[i + 3], 10, -1894986606);\n c = md5ii(c, d, a, b, x[i + 10], 15, -1051523);\n b = md5ii(b, c, d, a, x[i + 1], 21, -2054922799);\n a = md5ii(a, b, c, d, x[i + 8], 6, 1873313359);\n d = md5ii(d, a, b, c, x[i + 15], 10, -30611744);\n c = md5ii(c, d, a, b, x[i + 6], 15, -1560198380);\n b = md5ii(b, c, d, a, x[i + 13], 21, 1309151649);\n a = md5ii(a, b, c, d, x[i + 4], 6, -145523070);\n d = md5ii(d, a, b, c, x[i + 11], 10, -1120210379);\n c = md5ii(c, d, a, b, x[i + 2], 15, 718787259);\n b = md5ii(b, c, d, a, x[i + 9], 21, -343485551);\n a = safeAdd(a, olda);\n b = safeAdd(b, oldb);\n c = safeAdd(c, oldc);\n d = safeAdd(d, oldd);\n }\n\n return [a, b, c, d];\n}\n/*\n * Convert an array bytes to an array of little-endian words\n * Characters >255 have their high-byte silently ignored.\n */\n\n\nfunction bytesToWords(input) {\n if (input.length === 0) {\n return [];\n }\n\n var length8 = input.length * 8;\n var output = new Uint32Array(getOutputLength(length8));\n\n for (var i = 0; i < length8; i += 8) {\n output[i >> 5] |= (input[i / 8] & 0xff) << i % 32;\n }\n\n return output;\n}\n/*\n * Add integers, wrapping at 2^32. This uses 16-bit operations internally\n * to work around bugs in some JS interpreters.\n */\n\n\nfunction safeAdd(x, y) {\n var lsw = (x & 0xffff) + (y & 0xffff);\n var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n return msw << 16 | lsw & 0xffff;\n}\n/*\n * Bitwise rotate a 32-bit number to the left.\n */\n\n\nfunction bitRotateLeft(num, cnt) {\n return num << cnt | num >>> 32 - cnt;\n}\n/*\n * These functions implement the four basic operations the algorithm uses.\n */\n\n\nfunction md5cmn(q, a, b, x, s, t) {\n return safeAdd(bitRotateLeft(safeAdd(safeAdd(a, q), safeAdd(x, t)), s), b);\n}\n\nfunction md5ff(a, b, c, d, x, s, t) {\n return md5cmn(b & c | ~b & d, a, b, x, s, t);\n}\n\nfunction md5gg(a, b, c, d, x, s, t) {\n return md5cmn(b & d | c & ~d, a, b, x, s, t);\n}\n\nfunction md5hh(a, b, c, d, x, s, t) {\n return md5cmn(b ^ c ^ d, a, b, x, s, t);\n}\n\nfunction md5ii(a, b, c, d, x, s, t) {\n return md5cmn(c ^ (b | ~d), a, b, x, s, t);\n}\n\nexport default md5;","export default '00000000-0000-0000-0000-000000000000';","import validate from './validate.js';\n\nfunction parse(uuid) {\n if (!validate(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n var v;\n var arr = new Uint8Array(16); // Parse ########-....-....-....-............\n\n arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24;\n arr[1] = v >>> 16 & 0xff;\n arr[2] = v >>> 8 & 0xff;\n arr[3] = v & 0xff; // Parse ........-####-....-....-............\n\n arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8;\n arr[5] = v & 0xff; // Parse ........-....-####-....-............\n\n arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8;\n arr[7] = v & 0xff; // Parse ........-....-....-####-............\n\n arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8;\n arr[9] = v & 0xff; // Parse ........-....-....-....-############\n // (Use \"/\" to avoid 32-bit truncation when bit-shifting high-order bytes)\n\n arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff;\n arr[11] = v / 0x100000000 & 0xff;\n arr[12] = v >>> 24 & 0xff;\n arr[13] = v >>> 16 & 0xff;\n arr[14] = v >>> 8 & 0xff;\n arr[15] = v & 0xff;\n return arr;\n}\n\nexport default parse;","export default /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;","// Unique ID creation requires a high quality random # generator. In the browser we therefore\n// require the crypto API and do not support built-in fallback to lower quality random number\n// generators (like Math.random()).\nvar getRandomValues;\nvar rnds8 = new Uint8Array(16);\nexport default function rng() {\n // lazy load so that environments that need to polyfill have a chance to do so\n if (!getRandomValues) {\n // getRandomValues needs to be invoked in a context where \"this\" is a Crypto implementation. Also,\n // find the complete implementation of crypto (msCrypto) on IE11.\n getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto !== 'undefined' && typeof msCrypto.getRandomValues === 'function' && msCrypto.getRandomValues.bind(msCrypto);\n\n if (!getRandomValues) {\n throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');\n }\n }\n\n return getRandomValues(rnds8);\n}","// Adapted from Chris Veness' SHA1 code at\n// http://www.movable-type.co.uk/scripts/sha1.html\nfunction f(s, x, y, z) {\n switch (s) {\n case 0:\n return x & y ^ ~x & z;\n\n case 1:\n return x ^ y ^ z;\n\n case 2:\n return x & y ^ x & z ^ y & z;\n\n case 3:\n return x ^ y ^ z;\n }\n}\n\nfunction ROTL(x, n) {\n return x << n | x >>> 32 - n;\n}\n\nfunction sha1(bytes) {\n var K = [0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xca62c1d6];\n var H = [0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0];\n\n if (typeof bytes === 'string') {\n var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape\n\n bytes = [];\n\n for (var i = 0; i < msg.length; ++i) {\n bytes.push(msg.charCodeAt(i));\n }\n } else if (!Array.isArray(bytes)) {\n // Convert Array-like to Array\n bytes = Array.prototype.slice.call(bytes);\n }\n\n bytes.push(0x80);\n var l = bytes.length / 4 + 2;\n var N = Math.ceil(l / 16);\n var M = new Array(N);\n\n for (var _i = 0; _i < N; ++_i) {\n var arr = new Uint32Array(16);\n\n for (var j = 0; j < 16; ++j) {\n arr[j] = bytes[_i * 64 + j * 4] << 24 | bytes[_i * 64 + j * 4 + 1] << 16 | bytes[_i * 64 + j * 4 + 2] << 8 | bytes[_i * 64 + j * 4 + 3];\n }\n\n M[_i] = arr;\n }\n\n M[N - 1][14] = (bytes.length - 1) * 8 / Math.pow(2, 32);\n M[N - 1][14] = Math.floor(M[N - 1][14]);\n M[N - 1][15] = (bytes.length - 1) * 8 & 0xffffffff;\n\n for (var _i2 = 0; _i2 < N; ++_i2) {\n var W = new Uint32Array(80);\n\n for (var t = 0; t < 16; ++t) {\n W[t] = M[_i2][t];\n }\n\n for (var _t = 16; _t < 80; ++_t) {\n W[_t] = ROTL(W[_t - 3] ^ W[_t - 8] ^ W[_t - 14] ^ W[_t - 16], 1);\n }\n\n var a = H[0];\n var b = H[1];\n var c = H[2];\n var d = H[3];\n var e = H[4];\n\n for (var _t2 = 0; _t2 < 80; ++_t2) {\n var s = Math.floor(_t2 / 20);\n var T = ROTL(a, 5) + f(s, b, c, d) + e + K[s] + W[_t2] >>> 0;\n e = d;\n d = c;\n c = ROTL(b, 30) >>> 0;\n b = a;\n a = T;\n }\n\n H[0] = H[0] + a >>> 0;\n H[1] = H[1] + b >>> 0;\n H[2] = H[2] + c >>> 0;\n H[3] = H[3] + d >>> 0;\n H[4] = H[4] + e >>> 0;\n }\n\n return [H[0] >> 24 & 0xff, H[0] >> 16 & 0xff, H[0] >> 8 & 0xff, H[0] & 0xff, H[1] >> 24 & 0xff, H[1] >> 16 & 0xff, H[1] >> 8 & 0xff, H[1] & 0xff, H[2] >> 24 & 0xff, H[2] >> 16 & 0xff, H[2] >> 8 & 0xff, H[2] & 0xff, H[3] >> 24 & 0xff, H[3] >> 16 & 0xff, H[3] >> 8 & 0xff, H[3] & 0xff, H[4] >> 24 & 0xff, H[4] >> 16 & 0xff, H[4] >> 8 & 0xff, H[4] & 0xff];\n}\n\nexport default sha1;","import validate from './validate.js';\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\n\nvar byteToHex = [];\n\nfor (var i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).substr(1));\n}\n\nfunction stringify(arr) {\n var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n var uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!validate(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n\n return uuid;\n}\n\nexport default stringify;","import rng from './rng.js';\nimport stringify from './stringify.js'; // **`v1()` - Generate time-based UUID**\n//\n// Inspired by https://github.com/LiosK/UUID.js\n// and http://docs.python.org/library/uuid.html\n\nvar _nodeId;\n\nvar _clockseq; // Previous uuid creation time\n\n\nvar _lastMSecs = 0;\nvar _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details\n\nfunction v1(options, buf, offset) {\n var i = buf && offset || 0;\n var b = buf || new Array(16);\n options = options || {};\n var node = options.node || _nodeId;\n var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not\n // specified. We do this lazily to minimize issues related to insufficient\n // system entropy. See #189\n\n if (node == null || clockseq == null) {\n var seedBytes = options.random || (options.rng || rng)();\n\n if (node == null) {\n // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)\n node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]];\n }\n\n if (clockseq == null) {\n // Per 4.2.2, randomize (14 bit) clockseq\n clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;\n }\n } // UUID timestamps are 100 nano-second units since the Gregorian epoch,\n // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so\n // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'\n // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.\n\n\n var msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock\n // cycle to simulate higher resolution clock\n\n var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs)\n\n var dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression\n\n if (dt < 0 && options.clockseq === undefined) {\n clockseq = clockseq + 1 & 0x3fff;\n } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new\n // time interval\n\n\n if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {\n nsecs = 0;\n } // Per 4.2.1.2 Throw error if too many uuids are requested\n\n\n if (nsecs >= 10000) {\n throw new Error(\"uuid.v1(): Can't create more than 10M uuids/sec\");\n }\n\n _lastMSecs = msecs;\n _lastNSecs = nsecs;\n _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch\n\n msecs += 12219292800000; // `time_low`\n\n var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;\n b[i++] = tl >>> 24 & 0xff;\n b[i++] = tl >>> 16 & 0xff;\n b[i++] = tl >>> 8 & 0xff;\n b[i++] = tl & 0xff; // `time_mid`\n\n var tmh = msecs / 0x100000000 * 10000 & 0xfffffff;\n b[i++] = tmh >>> 8 & 0xff;\n b[i++] = tmh & 0xff; // `time_high_and_version`\n\n b[i++] = tmh >>> 24 & 0xf | 0x10; // include version\n\n b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)\n\n b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low`\n\n b[i++] = clockseq & 0xff; // `node`\n\n for (var n = 0; n < 6; ++n) {\n b[i + n] = node[n];\n }\n\n return buf || stringify(b);\n}\n\nexport default v1;","import v35 from './v35.js';\nimport md5 from './md5.js';\nvar v3 = v35('v3', 0x30, md5);\nexport default v3;","import stringify from './stringify.js';\nimport parse from './parse.js';\n\nfunction stringToBytes(str) {\n str = unescape(encodeURIComponent(str)); // UTF8 escape\n\n var bytes = [];\n\n for (var i = 0; i < str.length; ++i) {\n bytes.push(str.charCodeAt(i));\n }\n\n return bytes;\n}\n\nexport var DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8';\nexport var URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8';\nexport default function (name, version, hashfunc) {\n function generateUUID(value, namespace, buf, offset) {\n if (typeof value === 'string') {\n value = stringToBytes(value);\n }\n\n if (typeof namespace === 'string') {\n namespace = parse(namespace);\n }\n\n if (namespace.length !== 16) {\n throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)');\n } // Compute hash of namespace and value, Per 4.3\n // Future: Use spread syntax when supported on all platforms, e.g. `bytes =\n // hashfunc([...namespace, ... value])`\n\n\n var bytes = new Uint8Array(16 + value.length);\n bytes.set(namespace);\n bytes.set(value, namespace.length);\n bytes = hashfunc(bytes);\n bytes[6] = bytes[6] & 0x0f | version;\n bytes[8] = bytes[8] & 0x3f | 0x80;\n\n if (buf) {\n offset = offset || 0;\n\n for (var i = 0; i < 16; ++i) {\n buf[offset + i] = bytes[i];\n }\n\n return buf;\n }\n\n return stringify(bytes);\n } // Function#name is not settable on some platforms (#270)\n\n\n try {\n generateUUID.name = name; // eslint-disable-next-line no-empty\n } catch (err) {} // For CommonJS default export support\n\n\n generateUUID.DNS = DNS;\n generateUUID.URL = URL;\n return generateUUID;\n}","import rng from './rng.js';\nimport stringify from './stringify.js';\n\nfunction v4(options, buf, offset) {\n options = options || {};\n var rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n offset = offset || 0;\n\n for (var i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n\n return buf;\n }\n\n return stringify(rnds);\n}\n\nexport default v4;","import v35 from './v35.js';\nimport sha1 from './sha1.js';\nvar v5 = v35('v5', 0x50, sha1);\nexport default v5;","import REGEX from './regex.js';\n\nfunction validate(uuid) {\n return typeof uuid === 'string' && REGEX.test(uuid);\n}\n\nexport default validate;","import validate from './validate.js';\n\nfunction version(uuid) {\n if (!validate(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n return parseInt(uuid.substr(14, 1), 16);\n}\n\nexport default version;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = (module) => {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","import type { Context } from \"@finos/fdc3\";\nimport { init } from \"./api\";\n\nwindow.addEventListener(\"DOMContentLoaded\", async () => {\n\tawait init(true);\n\tawait initializeDOM();\n});\n\n/**\n * Broadcasts a context using FDC3.\n */\nasync function setContext(): Promise {\n\tconst contextType = \"fdc3.instrument\";\n\tconst contextName = \"Tesla Inc.\";\n\tconst idData = {\n\t\tticker: \"TSLA\"\n\t};\n\tconst context = {\n\t\ttype: contextType,\n\t\tname: contextName,\n\t\tid: idData\n\t};\n\tif (window.fin) {\n\t\tawait window.fin.me.interop.setContext(context);\n\t\tconsole.log(`Set context: ${contextType} - ${contextName}`);\n\t} else {\n\t\twindow.addEventListener(\"finReady\", async () => {\n\t\t\tif (window.fin) {\n\t\t\t\tawait window.fin.me.interop.setContext(context);\n\t\t\t\tconsole.log(`Set context: ${contextType} - ${contextName}`);\n\t\t\t}\n\t\t});\n\t}\n}\n\n/**\n * Adds an interop context listener to the window.\n */\nasync function addContextListener(): Promise {\n\tif (window.fin) {\n\t\tawait window.fin.me.interop.addContextHandler((context: Context) => {\n\t\t\tupdateDOMElements(context);\n\t\t});\n\t} else {\n\t\twindow.addEventListener(\"finReady\", async () => {\n\t\t\tif (window.fin) {\n\t\t\t\tawait window.fin.me.interop.addContextHandler((context: Context) => {\n\t\t\t\t\tupdateDOMElements(context);\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t}\n}\n\n/**\n * Updates the DOM elements with the provided context.\n * @param context The context to update the DOM elements with.\n */\nfunction updateDOMElements(context: Context): void {\n\tconst contextTypeSpan = document.querySelector(\"#contextType\");\n\tconst contextNameSpan = document.querySelector(\"#contextName\");\n\tconst contextBodyPre = document.querySelector(\"#contextBody\");\n\n\tif (contextTypeSpan !== null && contextNameSpan !== null && contextBodyPre !== null) {\n\t\tcontextTypeSpan.textContent = context.type;\n\t\tcontextNameSpan.textContent = context.name ?? \"No name provided.\";\n\t\tcontextBodyPre.textContent = JSON.stringify(context, null, 2);\n\t}\n}\n\n/**\n * Initialize the DOM elements.\n */\nasync function initializeDOM(): Promise {\n\tconst setContextButton = document.querySelector(\"#setContext\");\n\n\tif (setContextButton !== null) {\n\t\tsetContextButton.addEventListener(\"click\", async () => {\n\t\t\tawait setContext();\n\t\t});\n\t}\n\n\tawait addContextListener();\n}\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/web/v19.2.0/web-interop-support-context-and-intents/js/provider.bundle.js b/web/v19.2.0/web-interop-support-context-and-intents/js/provider.bundle.js index 06b50c0..c119861 100644 --- a/web/v19.2.0/web-interop-support-context-and-intents/js/provider.bundle.js +++ b/web/v19.2.0/web-interop-support-context-and-intents/js/provider.bundle.js @@ -1,10 +1,10 @@ /******/ (() => { // webpackBootstrap /******/ var __webpack_modules__ = ({ -/***/ "./node_modules/@openfin/cloud-interop/out/index.js": -/*!**********************************************************!*\ - !*** ./node_modules/@openfin/cloud-interop/out/index.js ***! - \**********************************************************/ +/***/ "../../node_modules/@openfin/cloud-interop/out/index.js": +/*!**************************************************************!*\ + !*** ../../node_modules/@openfin/cloud-interop/out/index.js ***! + \**************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; @@ -3483,38 +3483,38 @@ async function cloudInteropOverride(config) { /***/ }), -/***/ "./node_modules/@openfin/core-web/out/api-client.js": -/*!**********************************************************!*\ - !*** ./node_modules/@openfin/core-web/out/api-client.js ***! - \**********************************************************/ +/***/ "../../node_modules/@openfin/core-web/out/api-client.js": +/*!**************************************************************!*\ + !*** ../../node_modules/@openfin/core-web/out/api-client.js ***! + \**************************************************************/ /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; -var e=__webpack_require__(/*! ./main-8cad4070.js */ "./node_modules/@openfin/core-web/out/main-8cad4070.js");__webpack_require__(/*! buffer/ */ "../../node_modules/buffer/index.js"),__webpack_require__(/*! uuid */ "../../node_modules/uuid/dist/esm-browser/index.js"),__webpack_require__(/*! events */ "../../node_modules/events/events.js"),__webpack_require__(/*! lodash/cloneDeep */ "../../node_modules/lodash/cloneDeep.js"),__webpack_require__(/*! lodash/isEqual */ "../../node_modules/lodash/isEqual.js"),exports.connect=e.connect; +var e=__webpack_require__(/*! ./main-8cad4070.js */ "../../node_modules/@openfin/core-web/out/main-8cad4070.js");__webpack_require__(/*! buffer/ */ "../../node_modules/buffer/index.js"),__webpack_require__(/*! uuid */ "../../node_modules/uuid/dist/esm-browser/index.js"),__webpack_require__(/*! events */ "../../node_modules/events/events.js"),__webpack_require__(/*! lodash/cloneDeep */ "../../node_modules/lodash/cloneDeep.js"),__webpack_require__(/*! lodash/isEqual */ "../../node_modules/lodash/isEqual.js"),exports.connect=e.connect; /***/ }), -/***/ "./node_modules/@openfin/core-web/out/main-8cad4070.js": -/*!*************************************************************!*\ - !*** ./node_modules/@openfin/core-web/out/main-8cad4070.js ***! - \*************************************************************/ +/***/ "../../node_modules/@openfin/core-web/out/main-8cad4070.js": +/*!*****************************************************************!*\ + !*** ../../node_modules/@openfin/core-web/out/main-8cad4070.js ***! + \*****************************************************************/ /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; -var e=__webpack_require__(/*! buffer/ */ "../../node_modules/buffer/index.js"),t=__webpack_require__(/*! events */ "../../node_modules/events/events.js"),n=__webpack_require__(/*! lodash/cloneDeep */ "../../node_modules/lodash/cloneDeep.js"),i=__webpack_require__(/*! lodash/isEqual */ "../../node_modules/lodash/isEqual.js"),r=__webpack_require__(/*! uuid */ "../../node_modules/uuid/dist/esm-browser/index.js");const o=(e,t)=>`${t}<${btoa(JSON.stringify(e))}>`;var s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof __webpack_require__.g?__webpack_require__.g:"undefined"!=typeof self?self:{},a={},c={},d={},h={};async function l(e){const t=[];for(const n of e){const e=await n();t.push(e)}return t}Object.defineProperty(h,"__esModule",{value:!0}),h.promiseMapSerial=h.serial=h.promiseMap=h.promisify=void 0,h.promisify=function(e){return(...t)=>new Promise(((n,i)=>{e(...t,((e,t)=>e?i(e):n(t)))}))},h.promiseMap=async function(e,t){return Promise.all(e.map(t))},h.serial=l,h.promiseMapSerial=async function(e,t){return l(e.map(((e,n,i)=>()=>t(e,n,i))))};var u,p=s&&s.__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},w=s&&s.__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)};Object.defineProperty(d,"__esModule",{value:!0}),d.Reply=d.EmitterBase=d.Base=void 0;const y=h;class f{constructor(e){this.isNodeEnvironment=()=>"node"===this.wire.environment.type,this.isOpenFinEnvironment=()=>"openfin"===this.wire.environment.type,this.isBrowserEnvironment=()=>"other"===this.wire.environment.type,this.wire=e}get fin(){return this.wire.getFin()}get me(){return this.wire.me}}d.Base=f;d.EmitterBase=class extends f{constructor(e,t,...n){super(e),this.topic=t,u.set(this,void 0),this.eventNames=()=>this.hasEmitter()?this.getOrCreateEmitter().eventNames():[],this.emit=(e,t,...n)=>!!this.hasEmitter()&&this.getOrCreateEmitter().emit(e,t,...n),this.hasEmitter=()=>this.wire.eventAggregator.has(w(this,u,"f")),this.getOrCreateEmitter=()=>this.wire.eventAggregator.getOrCreate(w(this,u,"f")),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[],this.listenerCount=e=>this.hasEmitter()?this.getOrCreateEmitter().listenerCount(e):0,this.registerEventListener=async(e,t={},n,i)=>{const r={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e},o=this.getOrCreateEmitter();n(o);try{await this.wire.sendAction("subscribe-to-desktop-event",r)}catch(e){throw i(o),this.deleteEmitterIfNothingRegistered(o),e}},this.deregisterEventListener=async(e,t={})=>{if(this.hasEmitter()){const n={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e};await this.wire.sendAction("unsubscribe-to-desktop-event",n).catch((()=>null));return this.getOrCreateEmitter()}return Promise.resolve()},p(this,u,[t,...n],"f"),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[]}async on(e,t,n){return await this.registerEventListener(e,n,(n=>{n.on(e,t)}),(n=>{n.removeListener(e,t)})),this}async addListener(e,t,n){return this.on(e,t,n)}async once(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.once(e,i),n.once(e,t)}),(n=>{n.removeListener(e,i),n.removeListener(e,t)})),this}async prependListener(e,t,n){return await this.registerEventListener(e,n,(n=>{n.prependListener(e,t)}),(n=>{n.removeListener(e,t)})),this}async prependOnceListener(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.prependOnceListener(e,t),n.once(e,i)}),(n=>{n.removeListener(e,t),n.removeListener(e,i)})),this}async removeListener(e,t,n){const i=await this.deregisterEventListener(e,n);return i&&(i.removeListener(e,t),this.deleteEmitterIfNothingRegistered(i)),this}async deregisterAllListeners(e){const t={...this.identity,type:e,topic:this.topic};if(this.hasEmitter()){const e=this.getOrCreateEmitter(),n=e.listenerCount(t.type),i=[];for(let e=0;enull)));return await Promise.all(i),e}}async removeAllListeners(e){const t=async e=>{const t=await this.deregisterAllListeners(e);t&&(t.removeAllListeners(e),this.deleteEmitterIfNothingRegistered(t))};if(e)await t(e);else if(this.hasEmitter()){const e=this.getOrCreateEmitter().eventNames();await(0,y.promiseMap)(e,t)}return this}deleteEmitterIfNothingRegistered(e){0===e.eventNames().length&&this.wire.eventAggregator.delete(w(this,u,"f"))}},u=new WeakMap;d.Reply=class{};var g={};Object.defineProperty(g,"__esModule",{value:!0});var m=g.RuntimeError=g.NotSupportedError=g.NotImplementedError=g.NoAckError=g.DuplicateCorrelationError=g.UnexpectedActionError=g.DisconnectedError=void 0;class v extends Error{constructor(e){super(`Expected websocket state OPEN but found ${e}`),this.readyState=e}}g.DisconnectedError=v;class C extends Error{}g.UnexpectedActionError=C;class b extends Error{}g.DuplicateCorrelationError=b;class I extends Error{}g.NoAckError=I;class E extends Error{}g.NotImplementedError=E;class x extends Error{}g.NotSupportedError=x;class A extends Error{constructor(e){const{message:t,name:n,stack:i,...r}=e;super(t),this.name=n||"Error",this.stack=i??this.toString(),Object.keys(r).forEach((e=>{this[e]=r[e]}))}}class P extends Error{static getCallSite(e=0){const t=Error.stackTraceLimit,n=e+1;Error.stackTraceLimit=t+n;const i=Error.prepareStackTrace;Error.prepareStackTrace=(e,t)=>t;const r=(new Error).stack?.slice(n)??[];return Error.prepareStackTrace=i,Error.stackTraceLimit=t,r}static prepareStackTrace(e,t){if("function"==typeof Error.prepareStackTrace)return Error.prepareStackTrace(e,t);let n="";n+=e.name||"Error",n+=`: ${e.message||""}`;for(const e of t)n+=`\n at ${e.toString()}`;return n}constructor(e,t){const{reason:n,error:i}=e;super(n),this.name="RuntimeError",i?.stack&&(this.cause=new A(i)),t&&(this.stack=P.prepareStackTrace(this,t))}}m=g.RuntimeError=P;var M={},_={},O={};Object.defineProperty(O,"__esModule",{value:!0}),O.validateIdentity=void 0,O.validateIdentity=function(e){let t;return"object"==typeof e&&"string"==typeof e.uuid||(t="Not a valid identity object"),t};var S={},R={},F={},j={},k={},L={},T={};Object.defineProperty(T,"__esModule",{value:!0}),T.handleDeprecatedWarnings=void 0;var $;T.handleDeprecatedWarnings=e=>{(e.contentNavigation?.whitelist||e.contentNavigation?.blacklist||e.contentRedirect?.whitelist||e.contentRedirect?.blacklist)&&console.warn("The properties 'whitelist' and 'blacklist' have been marked as deprecated and will be removed in a future version. Please use 'allowlist' and 'denylist'.")};var B={},G={};Object.defineProperty(G,"__esModule",{value:!0}),G.AsyncRetryableLazy=W=G.Lazy=void 0;var W=G.Lazy=class{constructor(e){this.producerFn=e}getValue(){return this.value||(this.value=this.producerFn()),this.value}};G.AsyncRetryableLazy=class{constructor(e){this.producerFn=e}async getValue(){return this.promise||(this.promise=this.producerFn().catch((e=>{throw delete this.promise,e}))),this.promise}};var H={};Object.defineProperty(H,"__esModule",{value:!0}),H.WebContents=void 0;const N=d;class D extends N.EmitterBase{constructor(e,t,n){super(e,n,t.uuid,t.name),this.identity=t,this.entityType=n}capturePage(e){return this.wire.sendAction("capture-page",{options:e,...this.identity}).then((({payload:e})=>e.data))}executeJavaScript(e){return this.wire.sendAction("execute-javascript-in-window",{...this.identity,code:e}).then((({payload:e})=>e.data))}getZoomLevel(){return this.wire.sendAction("get-zoom-level",this.identity).then((({payload:e})=>e.data))}setZoomLevel(e){return this.wire.sendAction("set-zoom-level",{...this.identity,level:e}).then((()=>{}))}navigate(e){return this.wire.sendAction("navigate-window",{...this.identity,url:e}).then((()=>{}))}navigateBack(){return this.wire.sendAction("navigate-window-back",{...this.identity}).then((()=>{}))}async navigateForward(){await this.wire.sendAction("navigate-window-forward",{...this.identity})}stopNavigation(){return this.wire.sendAction("stop-window-navigation",{...this.identity}).then((()=>{}))}reload(e=!1){return this.wire.sendAction("reload-window",{ignoreCache:e,...this.identity}).then((()=>{}))}print(e={}){return this.wire.sendAction("print",{...this.identity,options:e}).then((()=>{}))}findInPage(e,t){return this.wire.sendAction("find-in-page",{...this.identity,searchTerm:e,options:t}).then((({payload:e})=>e.data))}stopFindInPage(e){return this.wire.sendAction("stop-find-in-page",{...this.identity,action:e}).then((()=>{}))}getPrinters(){return this.wire.sendAction("get-printers",{...this.identity}).then((({payload:e})=>e.data))}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){await this.wire.sendAction("focus-window",{emitSynthFocused:e,...this.identity})}async showDeveloperTools(){await this.wire.sendAction("show-developer-tools",this.identity)}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction("get-process-info",this.identity);return e}async getSharedWorkers(){return this.wire.sendAction("get-shared-workers",this.identity).then((({payload:e})=>e.data))}async inspectSharedWorker(){await this.wire.sendAction("inspect-shared-worker",{...this.identity})}async inspectSharedWorkerById(e){await this.wire.sendAction("inspect-shared-worker-by-id",{...this.identity,workerId:e})}async inspectServiceWorker(){await this.wire.sendAction("inspect-service-worker",{...this.identity})}async showPopupWindow(e){if(this.wire.sendAction(`${this.entityType}-show-popup-window`,this.identity).catch((()=>{})),e?.onPopupReady){const t=async({popupName:t})=>{try{const n=this.fin.Window.wrapSync({uuid:this.fin.me.uuid,name:t});await e.onPopupReady(n)}catch(e){throw new Error(`Something went wrong during onPopupReady execution: ${e}`)}};await this.once("popup-ready",t)}const{payload:t}=await this.wire.sendAction("try-create-popup-window",{options:{...e,hasResultCallback:!!e?.onPopupResult,hasReadyCallback:!!e?.onPopupReady},...this.identity}),{data:{willOpen:n,options:i}}=t;n&&await this.fin.Window.create(i.initialOptions);if(e?.onPopupResult){const t=async t=>{await e.onPopupResult((e=>{const{name:t,uuid:n,result:i,data:r}=e,o={identity:{name:t,uuid:n},result:i};return r&&(o.data=r),o})(t))},n=async()=>{await this.removeListener("popup-result",t)};await this.on("popup-result",t),await this.once("popup-teardown",n)}const{payload:r}=await this.wire.sendAction("show-popup-window",{options:i,...this.identity});return r.data}}var U,V,z,K,q;function J(){return V||(V=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(function(){if($)return L;$=1,Object.defineProperty(L,"__esModule",{value:!0}),L.ViewModule=void 0;const e=d,t=O,n=J(),i=T;class r extends e.Base{async create(e){const{uuid:t}=this.wire.me;if(!e.name||"string"!=typeof e.name)throw new Error("Please provide a name property as a string in order to create a View.");return(0,i.handleDeprecatedWarnings)(e),this.wire.environment.childViews?await this.wire.environment.createChildContent({entityType:"view",options:{...e,uuid:t}}):await this.wire.sendAction("create-view",{...e,uuid:t}),this.wrapSync({uuid:t,name:e.name})}async wrap(e){this.wire.sendAction("view-wrap").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}wrapSync(e){this.wire.sendAction("view-wrap-sync").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}getCurrent(){if(this.wire.sendAction("view-get-current").catch((e=>{})),!this.wire.me.isView)throw new Error("You are not in a View context");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction("view-get-current-sync").catch((e=>{})),!this.wire.me.isView)throw new Error("You are not in a View context");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return L.ViewModule=r,L}(),e),n(function(){if(U)return B;var e;U=1,Object.defineProperty(B,"__esModule",{value:!0}),B.View=void 0;const t=g,n=G,i=H,r=ie();class o extends i.WebContents{constructor(i,o){super(i,o,"view"),this.identity=o,e.set(this,new n.Lazy((()=>this.fin.Platform.wrapSync(this.identity).getClient()))),this.attach=async e=>{await this.wire.sendAction("attach-view",{target:e,...this.identity})},this.destroy=async()=>{await this.wire.sendAction("destroy-view",{...this.identity})},this.show=async()=>{await this.wire.sendAction("show-view",{...this.identity})},this.showAt=async(e,t={})=>{await this.wire.sendAction("show-view-at",{bounds:e,...this.identity,options:t})},this.bringToFront=async()=>{await this.wire.sendAction("bring-view-to-front",{...this.identity})},this.hide=async()=>{await this.wire.sendAction("hide-view",{...this.identity})},this.setBounds=async e=>{await this.wire.sendAction("set-view-bounds",{bounds:e,...this.identity})},this.getBounds=async()=>(await this.wire.sendAction("get-view-bounds",{...this.identity})).payload.data,this.getInfo=async()=>(await this.wire.sendAction("get-view-info",{...this.identity})).payload.data,this.getParentLayout=async()=>(this.wire.sendAction("view-get-parent-layout",{...this.identity}).catch((()=>{})),this.fin.Platform.Layout.getLayoutByViewIdentity(this.identity)),this.getOptions=async()=>this.wire.sendAction("get-view-options",{...this.identity}).then((({payload:e})=>e.data)),this.updateOptions=async e=>this.wire.sendAction("update-view-options",{options:e,...this.identity}).then((()=>{})),this.getCurrentWindow=async()=>{const{payload:{data:e}}=await this.wire.sendAction("get-view-window",{...this.identity});return new r._Window(this.wire,e)},this.getCurrentStack=async()=>{this.wire.sendAction("view-get-current-stack").catch((()=>{}));try{return(await this.getParentLayout()).getStackByViewIdentity(this.identity)}catch(e){throw new t.RuntimeError({reason:"This view does not belong to a stack.",error:e})}},this.triggerBeforeUnload=async()=>(await this.wire.sendAction("trigger-before-unload",{...this.identity})).payload.data,this.bindToElement=async e=>{if(!e)throw new Error("Element not found.");return this.wire.environment.observeBounds(e,(async e=>this.setBounds(e)))}}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){const t=await this.getCurrentWindow();await t.focusedWebViewWasChanged(),await super.focus({emitSynthFocused:e})}}return B.View=o,e=new WeakMap,B}(),e)}(k)),k}function Y(){if(z)return j;z=1,Object.defineProperty(j,"__esModule",{value:!0}),j.Application=void 0;const e=d,t=ie(),n=J();class i extends e.EmitterBase{constructor(e,n){super(e,"application",n.uuid),this.identity=n,this.window=new t._Window(this.wire,{uuid:this.identity.uuid,name:this.identity.uuid})}windowListFromIdentityList(e){const n=[];return e.forEach((e=>{n.push(new t._Window(this.wire,{uuid:e.uuid,name:e.name}))})),n}isRunning(){return this.wire.sendAction("is-application-running",this.identity).then((({payload:e})=>e.data))}async quit(e=!1){try{await this._close(e),await this.wire.sendAction("destroy-application",{force:e,...this.identity})}catch(e){if(!["Remote connection has closed","Could not locate the requested application"].some((t=>e.message.includes(t))))throw e}}async _close(e=!1){try{await this.wire.sendAction("close-application",{force:e,...this.identity})}catch(e){if(!e.message.includes("Remote connection has closed"))throw e}}close(e=!1){return console.warn("Deprecation Warning: Application.close is deprecated Please use Application.quit"),this.wire.sendAction("application-close",this.identity).catch((e=>{})),this._close(e)}getChildWindows(){return this.wire.sendAction("get-child-windows",this.identity).then((({payload:e})=>{const t=[];return e.data.forEach((e=>{t.push({uuid:this.identity.uuid,name:e})})),this.windowListFromIdentityList(t)}))}getManifest(){return this.wire.sendAction("get-application-manifest",this.identity).then((({payload:e})=>e.data))}getParentUuid(){return this.wire.sendAction("get-parent-application",this.identity).then((({payload:e})=>e.data))}getShortcuts(){return this.wire.sendAction("get-shortcuts",this.identity).then((({payload:e})=>e.data))}async getViews(){const{payload:e}=await this.wire.sendAction("application-get-views",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}getZoomLevel(){return this.wire.sendAction("get-application-zoom-level",this.identity).then((({payload:e})=>e.data))}getWindow(){return this.wire.sendAction("application-get-window",this.identity).catch((e=>{})),Promise.resolve(this.window)}registerUser(e,t){return this.wire.sendAction("register-user",{userName:e,appName:t,...this.identity}).then((()=>{}))}removeTrayIcon(){return this.wire.sendAction("remove-tray-icon",this.identity).then((()=>{}))}restart(){return this.wire.sendAction("restart-application",this.identity).then((()=>{}))}run(){return console.warn("Deprecation Warning: Application.run is deprecated Please use fin.Application.start"),this.wire.sendAction("application-run",this.identity).catch((e=>{})),this._run()}_run(e={}){return this.wire.sendAction("run-application",{manifestUrl:this._manifestUrl,opts:e,...this.identity}).then((()=>{}))}scheduleRestart(){return this.wire.sendAction("relaunch-on-close",this.identity).then((()=>{}))}async sendApplicationLog(){const{payload:e}=await this.wire.sendAction("send-application-log",this.identity);return e.data}async setJumpList(e){await this.wire.sendAction("set-jump-list",{config:e,...this.identity})}setTrayIcon(e){return this.wire.sendAction("set-tray-icon",{enabledIcon:e,...this.identity}).then((()=>{}))}setShortcuts(e){return this.wire.sendAction("set-shortcuts",{data:e,...this.identity}).then((()=>{}))}async setShortcutQueryParams(e){await this.wire.sendAction("set-shortcut-query-args",{data:e,...this.identity})}setZoomLevel(e){return this.wire.sendAction("set-application-zoom-level",{level:e,...this.identity}).then((()=>{}))}async setAppLogUsername(e){await this.wire.sendAction("set-app-log-username",{data:e,...this.identity})}getTrayIconInfo(){return this.wire.sendAction("get-tray-icon-info",this.identity).then((({payload:e})=>e.data))}hasTrayIcon(){return this.wire.sendAction("has-tray-icon",this.identity).then((({payload:e})=>e.data))}terminate(){return this.wire.sendAction("terminate-application",this.identity).then((()=>{}))}wait(){return this.wire.sendAction("wait-for-hung-application",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction("get-info",this.identity).then((({payload:e})=>e.data))}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction("application-get-process-info",this.identity);return e}async setFileDownloadLocation(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t};await this.wire.sendAction("set-file-download-location",{...n,downloadLocation:e})}async getFileDownloadLocation(){const{payload:{data:e}}=await this.wire.sendAction("get-file-download-location",this.identity);return e}async showTrayIconPopupMenu(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t},{payload:i}=await this.wire.sendAction("show-tray-icon-popup-menu",{...n,options:e});return i.data}async closeTrayIconPopupMenu(){const{name:e}=this.wire.me,t={uuid:this.identity.uuid,name:e};await this.wire.sendAction("close-tray-icon-popup-menu",{...t})}}return j.Application=i,j}function Z(){return q||(q=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(function(){if(K)return F;K=1,Object.defineProperty(F,"__esModule",{value:!0}),F.ApplicationModule=void 0;const e=d,t=O,n=Y();class i extends e.Base{async wrap(e){this.wire.sendAction("wrap-application").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}wrapSync(e){this.wire.sendAction("wrap-application-sync").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}async _create(e){return void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&void 0===e.isPlatformController&&(e.autoShow=!0),await this.wire.sendAction("create-application",e),this.wrap({uuid:e.uuid})}create(e){return console.warn("Deprecation Warning: fin.Application.create is deprecated. Please use fin.Application.start"),this.wire.sendAction("application-create").catch((e=>{})),this._create(e)}async start(e){this.wire.sendAction("start-application").catch((e=>{}));const t=await this._create(e);return await this.wire.sendAction("run-application",{uuid:e.uuid}),t}async startManyManifests(e,t){return this.wire.sendAction("run-applications",{applications:e,opts:t}).then((()=>{}))}getCurrent(){return this.wire.sendAction("get-current-application").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction("get-current-application-sync").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}async startFromManifest(e,t){this.wire.sendAction("application-start-from-manifest").catch((e=>{}));const n=await this._createFromManifest(e);return await n._run(t),n}createFromManifest(e){return console.warn("Deprecation Warning: fin.Application.createFromManifest is deprecated. Please use fin.Application.startFromManifest"),this.wire.sendAction("application-create-from-manifest").catch((e=>{})),this._createFromManifest(e)}_createFromManifest(e){return this.wire.sendAction("get-application-manifest",{manifestUrl:e}).then((({payload:e})=>{const t=e.data.platform?e.data.platform.uuid:e.data.startup_app.uuid;return this.wrap({uuid:t})})).then((t=>(t._manifestUrl=e,t)))}}return F.ApplicationModule=i,F}(),e),n(Y(),e)}(R)),R}H.WebContents=D;var Q={};Object.defineProperty(Q,"__esModule",{value:!0}),Q.promisifySubscription=void 0;var X,ee,te;function ne(){if(X)return S;X=1,Object.defineProperty(S,"__esModule",{value:!0}),S._Window=void 0;const e=Z(),t=H,n=J(),i=T,r=Q;class o extends t.WebContents{constructor(e,t){super(e,t,"window")}async createWindow(e){this.wire.sendAction("window-create-window",this.identity).catch((e=>{}));const t=await(0,r.promisifySubscription)(this,"fire-constructor-callback");void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&(e.autoShow=!0),(0,i.handleDeprecatedWarnings)(e);const n=this.wire.environment.createChildContent({entityType:"window",options:e}),[o]=await Promise.all([t.getValue(),n]);let s;const{success:a}=o,c=o.data,{message:d}=c;s=a?{httpResponseCode:c.httpResponseCode,apiInjected:c.apiInjected}:{message:c.message,networkErrorCode:c.networkErrorCode,stack:c.stack};const h={message:d,cbPayload:s,success:a};try{this.getWebWindow().fin.__internal_.openerSuccessCBCalled()}catch(e){}return h.success?this:Promise.reject(h)}getAllFrames(){return this.wire.sendAction("get-all-frames",this.identity).then((({payload:e})=>e.data))}getBounds(){return this.wire.sendAction("get-window-bounds",this.identity).then((({payload:e})=>e.data))}center(){return this.wire.sendAction("center-window",this.identity).then((()=>{}))}blur(){return this.wire.sendAction("blur-window",this.identity).then((()=>{}))}bringToFront(){return this.wire.sendAction("bring-window-to-front",this.identity).then((()=>{}))}animate(e,t){return this.wire.sendAction("animate-window",{transitions:e,options:t,...this.identity}).then((()=>{}))}hide(){return this.wire.sendAction("hide-window",this.identity).then((()=>{}))}close(e=!1){return this.wire.sendAction("close-window",{force:e,...this.identity}).then((()=>{Object.setPrototypeOf(this,null)}))}focusedWebViewWasChanged(){return this.wire.sendAction("focused-webview-changed",this.identity).then((()=>{}))}getNativeId(){return this.wire.sendAction("get-window-native-id",this.identity).then((({payload:e})=>e.data))}async getCurrentViews(){const{payload:e}=await this.wire.sendAction("window-get-views",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}disableFrame(){return console.warn("Function is deprecated; use disableUserMovement instead."),this.wire.sendAction("disable-window-frame",this.identity).then((()=>{}))}disableUserMovement(){return this.wire.sendAction("disable-window-frame",this.identity).then((()=>{}))}enableFrame(){return console.warn("Function is deprecated; use enableUserMovement instead."),this.wire.sendAction("enable-window-frame",this.identity).then((()=>{}))}enableUserMovement(){return this.wire.sendAction("enable-window-frame",this.identity).then((()=>{}))}flash(){return this.wire.sendAction("flash-window",this.identity).then((()=>{}))}stopFlashing(){return this.wire.sendAction("stop-flash-window",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction("get-window-info",this.identity).then((({payload:e})=>e.data))}async getLayout(e){this.wire.sendAction("window-get-layout",this.identity).catch((e=>{}));const t=await this.getOptions();if(!t.layout&&!t.layoutSnapshot)throw new Error("Window does not have a Layout");return this.fin.Platform.Layout.wrap(e??this.identity)}getOptions(){return this.wire.sendAction("get-window-options",this.identity).then((({payload:e})=>e.data))}getParentApplication(){return this.wire.sendAction("window-get-parent-application",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity))}getParentWindow(){return this.wire.sendAction("window-get-parent-window",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity)).then((e=>e.getWindow()))}async getSnapshot(e){const t={area:e,...this.identity};console.warn("Window.getSnapshot has been deprecated, please use Window.capturePage");return(await this.wire.sendAction("get-window-snapshot",t)).payload.data}getState(){return this.wire.sendAction("get-window-state",this.identity).then((({payload:e})=>e.data))}getWebWindow(){return this.wire.sendAction("window-get-web-window",this.identity).catch((e=>{})),this.wire.environment.getWebWindow(this.identity)}isMainWindow(){return this.wire.sendAction("window-is-main-window",this.identity).catch((e=>{})),this.me.uuid===this.me.name}isShowing(){return this.wire.sendAction("is-window-showing",this.identity).then((({payload:e})=>e.data))}maximize(){return this.wire.sendAction("maximize-window",this.identity).then((()=>{}))}minimize(){return this.wire.sendAction("minimize-window",this.identity).then((()=>{}))}moveBy(e,t,n){return this.wire.sendAction("move-window-by",{deltaLeft:e,deltaTop:t,positioningOptions:n,...this.identity}).then((()=>{}))}moveTo(e,t,n){return this.wire.sendAction("move-window",{left:e,top:t,positioningOptions:n,...this.identity}).then((()=>{}))}resizeBy(e,t,n,i){return this.wire.sendAction("resize-window-by",{deltaWidth:Math.floor(e),deltaHeight:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}resizeTo(e,t,n,i){return this.wire.sendAction("resize-window",{width:Math.floor(e),height:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}restore(){return this.wire.sendAction("restore-window",this.identity).then((()=>{}))}setAsForeground(){return this.wire.sendAction("set-foreground-window",this.identity).then((()=>{}))}setBounds(e,t){return this.wire.sendAction("set-window-bounds",{...e,...this.identity,positioningOptions:t}).then((()=>{}))}show(e=!1){return this.wire.sendAction("show-window",{force:e,...this.identity}).then((()=>{}))}showAt(e,t,n=!1){return this.wire.sendAction("show-at-window",{force:n,left:Math.floor(e),top:Math.floor(t),...this.identity}).then((()=>{}))}updateOptions(e){return this.wire.sendAction("update-window-options",{options:e,...this.identity}).then((()=>{}))}authenticate(e,t){return this.wire.sendAction("window-authenticate",{userName:e,password:t,...this.identity}).then((()=>{}))}async showPopupMenu(e){const{payload:t}=await this.wire.sendAction("show-popup-menu",{options:e,...this.identity});return t.data}async closePopupMenu(){return this.wire.sendAction("close-popup-menu",{...this.identity}).then((()=>{}))}async dispatchPopupResult(e){this.wire.sendAction("window-dispatch-popup-result",this.identity).catch((e=>{})),await this.wire.sendAction("dispatch-popup-result",{data:e,...this.identity})}async print(e={content:"self"}){switch(e.content){case void 0:case"self":return super.print(e);case"screenshot":return this.wire.sendAction("print-screenshot",this.identity).then((()=>{}));case"views":return this.wire.sendAction("print-views",{...this.identity,options:e}).then((()=>{}));default:return}}}return S._Window=o,S}function ie(){return te||(te=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(function(){if(ee)return _;ee=1,Object.defineProperty(_,"__esModule",{value:!0}),_._WindowModule=void 0;const e=d,t=O,n=ne();class i extends e.Base{async wrap(e){this.wire.sendAction("window-wrap").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}wrapSync(e){this.wire.sendAction("window-wrap-sync").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}create(e){return this.wire.sendAction("create-window").catch((e=>{})),new n._Window(this.wire,{uuid:this.me.uuid,name:e.name}).createWindow(e)}getCurrent(){if(this.wire.sendAction("get-current-window").catch((e=>{})),!this.wire.me.isWindow)throw new Error("You are not in a Window context");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction("get-current-window-sync").catch((e=>{})),!this.wire.me.isWindow)throw new Error("You are not in a Window context");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return _._WindowModule=i,_}(),e),n(ne(),e)}(M)),M}Q.promisifySubscription=async(e,t,n=(()=>!0),i)=>{let r,o,s;const a=new Promise(((e,t)=>{r=e,o=t})),c=e=>{n(e)&&(clearTimeout(s),r(e))};return await e.on(t,c),i&&(s=setTimeout((()=>o(new Error("event timed out"))),i)),a.finally((()=>{e.removeListener(t,c).catch((()=>null))})),{getValue:()=>a}},Object.defineProperty(c,"__esModule",{value:!0}),c.System=void 0;const re=d,oe=g,se=ie(),ae=t;class ce extends re.EmitterBase{constructor(e){super(e,"system")}sendExternalProcessRequest(e,t){return new Promise(((n,i)=>{const r="external-process-exited";let o,s,a,c;"function"==typeof t.listener&&(a=e=>{const n=e||{};s={topic:"exited",uuid:n.processUuid||"",exitCode:n.exitCode||0},o===e.processUuid&&(t.listener(s),c.removeListener(r,a))},this.wire.me.name||(this.wire.me.name=this.wire.me.uuid),c=new se._Window(this.wire,this.wire.me),c.on(r,a)),this.wire.sendAction(e,t).then((({payload:e})=>{o=e.data.uuid,n(e.data),s&&o===s.uuid&&(t.listener(s),c.removeListener(r,a))})).catch((e=>{c&&c.removeListener(r,a),i(e)}))}))}getVersion(){return this.wire.sendAction("get-version").then((({payload:e})=>e.data))}clearCache(e){return this.wire.sendAction("clear-cache",e).then((()=>{}))}deleteCacheOnExit(){return this.wire.sendAction("delete-cache-request").then((()=>{}))}exit(){return this.wire.sendAction("exit-desktop").then((()=>{}))}async fetchManifest(e){const{payload:{data:t}}=await this.wire.sendAction("fetch-manifest",{manifestUrl:e});return t}flushCookieStore(){return this.wire.sendAction("flush-cookie-store").then((()=>{}))}getAllWindows(){return this.wire.sendAction("get-all-windows").then((({payload:e})=>e.data))}getAllApplications(){return this.wire.sendAction("get-all-applications").then((({payload:e})=>e.data))}getCommandLineArguments(){return this.wire.sendAction("get-command-line-arguments").then((({payload:e})=>e.data))}async getCrashReporterState(){const{payload:{data:{diagnosticMode:e,isRunning:t}}}=await this.wire.sendAction("get-crash-reporter-state");return console.warn("diagnosticMode property is deprecated. It will be removed in a future version"),{diagnosticMode:e,diagnosticsMode:e,isRunning:t}}async startCrashReporter(e){const t=e,n={...t,diagnosticMode:t.diagnosticsMode||t.diagnosticMode},{payload:{data:{diagnosticMode:i,isRunning:r}}}=await this.wire.sendAction("start-crash-reporter",n);return{diagnosticMode:i,diagnosticsMode:i,isRunning:r}}getUniqueUserId(){return this.wire.sendAction("get-unique-user-id").then((({payload:e})=>e.data))}getEntityInfo(e,t){return this.wire.sendAction("get-entity-info",{uuid:e,name:t}).then((({payload:e})=>e.data))}getEnvironmentVariable(e){return this.wire.sendAction("get-environment-variable",{environmentVariables:e}).then((({payload:e})=>e.data))}getFocusedWindow(){return this.wire.sendAction("get-focused-window").then((({payload:e})=>e.data))}async isAppCertified(e){const{payload:{data:{certifiedInfo:t}}}=await this.wire.sendAction("is-app-certified",{manifestUrl:e});return t}getInstalledRuntimes(){return this.wire.sendAction("get-installed-runtimes").then((({payload:e})=>e.data.runtimes))}async getInstalledApps(){const{payload:{data:{installedApps:e}}}=await this.wire.sendAction("get-installed-apps");return e}getLog(e){return this.wire.sendAction("view-log",e).then((({payload:e})=>e.data))}getMachineId(){return this.wire.sendAction("get-machine-id").then((({payload:e})=>e.data))}getMinLogLevel(){return this.wire.sendAction("get-min-log-level").then((({payload:e})=>e.data))}getLogList(){return this.wire.sendAction("list-logs").then((({payload:e})=>e.data))}getMonitorInfo(){return this.wire.sendAction("get-monitor-info").then((({payload:e})=>e.data))}getMousePosition(){return this.wire.sendAction("get-mouse-position").then((({payload:e})=>e.data))}getProcessList(){return console.warn("System.getProcessList has been deprecated. Please consider using our new process APIs: Window.getProcessInfo, View.getProcessInfo, Application.getProcessInfo, System.getAllProcessInfo"),this.wire.sendAction("process-snapshot").then((({payload:e})=>e.data))}async getAllProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction("get-all-process-info",this.identity);return e}getProxySettings(){return this.wire.sendAction("get-proxy-settings").then((({payload:e})=>e.data))}getRuntimeInfo(){return this.wire.sendAction("get-runtime-info").then((({payload:e})=>e.data))}getRvmInfo(){return this.wire.sendAction("get-rvm-info").then((({payload:e})=>e.data))}getHostSpecs(){return this.wire.sendAction("get-host-specs").then((({payload:e})=>e.data))}getOSInfo(){return this.wire.sendAction("get-os-info").then((({payload:e})=>e.data))}launchExternalProcess(e){return this.sendExternalProcessRequest("launch-external-process",e)}monitorExternalProcess(e){return this.sendExternalProcessRequest("monitor-external-process",e)}log(e,t){return this.wire.sendAction("write-to-log",{level:e,message:t}).then((()=>{}))}openUrlWithBrowser(e){return this.wire.sendAction("open-url-with-browser",{url:e}).then((()=>{}))}async registerCustomProtocol(e){if("object"!=typeof e)throw new Error("Must provide an object with a `protocolName` property having a string value.");await this.wire.sendAction("register-custom-protocol",e)}async unregisterCustomProtocol(e){await this.wire.sendAction("unregister-custom-protocol",{protocolName:e})}async getCustomProtocolState(e){return this.wire.sendAction("get-custom-protocol-state",{protocolName:e}).then((({payload:e})=>e.data))}releaseExternalProcess(e){return this.wire.sendAction("release-external-process",{uuid:e}).then((()=>{}))}showDeveloperTools(e){return this.wire.sendAction("show-developer-tools",e).then((()=>{}))}terminateExternalProcess(e){return this.wire.sendAction("terminate-external-process",e).then((()=>{}))}updateProxySettings(e){return this.wire.sendAction("update-proxy",e).then((()=>{}))}async downloadAsset(e,t){const n=()=>{};let i=n,r=n;const o=new Promise(((e,t)=>{i=e,r=t}));if("openfin"!==this.wire.environment.type)throw new oe.NotSupportedError("downloadAsset only supported in an OpenFin Render process");const s=oe.RuntimeError.getCallSite(),a=this.wire.environment.getNextMessageId().toString(),c=`asset-download-progress-${a}`,d=`asset-download-error-${a}`,h=`asset-download-complete-${a}`,l=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},u=()=>{this.removeListener(c,l)};await Promise.all([this.on(c,l),this.once(d,(e=>{u();const{reason:t,err:n}=e;r(new oe.RuntimeError({reason:t,error:n},s))})),this.once(h,(()=>{u(),i()}))]);const p=Object.assign(e,{downloadId:a});return await this.wire.sendAction("download-asset",p).catch((e=>{throw u(),e})),o}downloadRuntime(e,t){const n=oe.RuntimeError.getCallSite();return new Promise(((i,r)=>{if("openfin"!==this.wire.environment.type)return void r(new oe.NotSupportedError("downloadRuntime only supported in an OpenFin Render process"));const o=this.wire.environment.getNextMessageId().toString(),s=`runtime-download-progress-${o}`,a=`runtime-download-error-${o}`,c=`runtime-download-complete-${o}`,d=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},h=()=>{this.removeListener(s,d)};this.on(s,d),this.once(a,(e=>{h();const{reason:t,err:i}=e;r(new oe.RuntimeError({reason:t,error:i},n))})),this.once(c,(()=>{h(),i()}));const l=Object.assign(e,{downloadId:o});this.wire.sendAction("download-runtime",l).catch((e=>{h(),r(e)}))}))}downloadPreloadScripts(e){return this.wire.sendAction("download-preload-scripts",{scripts:e}).then((({payload:e})=>e.data))}getAllExternalApplications(){return this.wire.sendAction("get-all-external-applications").then((({payload:e})=>e.data))}getAppAssetInfo(e){return this.wire.sendAction("get-app-asset-info",e).then((({payload:e})=>e.data))}getCookies(e){const t=this.wire.environment.getUrl(),n=Object.assign(e,{url:t});return this.wire.sendAction("get-cookies",n).then((({payload:e})=>e.data))}setMinLogLevel(e){return this.wire.sendAction("set-min-log-level",{level:e}).then((()=>{}))}resolveUuid(e){return this.wire.sendAction("resolve-uuid",{entityKey:e}).then((({payload:e})=>e.data))}executeOnRemote(e,t){return t.requestingIdentity=e,this.wire.ferryAction(t)}readRegistryValue(e,t,n){return this.wire.sendAction("read-registry-value",{rootKey:e,subkey:t,value:n}).then((({payload:e})=>e.data))}registerExternalConnection(e){return this.wire.sendAction("register-external-connection",{uuid:e}).then((({payload:e})=>e.data))}async getServiceConfiguration(e){if("string"!=typeof e.name)throw new Error("Must provide an object with a `name` property having a string value");const{name:t}=e;return this.wire.sendAction("get-service-configuration",{name:t}).then((({payload:e})=>e.data))}async getSystemAppConfig(e){if("string"!=typeof e)throw new Error("Must provide a string value for name of system app");return this.wire.sendAction("get-system-app-configuration",{name:e}).then((({payload:e})=>e.data))}async registerShutdownHandler(e){this.wire.sendAction("system-register-shutdown-handler").catch((e=>{}));const{uuid:t,name:n}=this.wire.me;this.on("system-shutdown",(i=>{e({proceed:()=>{this.wire.environment.raiseEvent("application/system-shutdown-handled",{uuid:t,name:n,topic:"application"})}})}))}runRvmHealthCheck(){return this.wire.sendAction("run-rvm-health-check").then((({payload:e})=>e.data))}async launchManifest(e,t={}){const{subscribe:n,...i}=t,r=i;if(n){const e=new ae.EventEmitter;n(e);const t="app-version-progress",i="runtime-status",o="app-version-complete",s="app-version-error",a=this.wire.environment.getNextMessageId().toString();r.appVersionId=a;const c=[o,t,i,s],d=e=>{const{appVersionId:t,topic:n,type:i,...r}=e;return{...r,type:c.find((e=>i.includes(e)))}},h=t=>{const n=d(t);e.emit(n.type,n)},l=()=>{this.removeListener(`${t}.${a}`,h),this.removeListener(`${i}.${a}`,h),this.removeListener(`${o}.${a}`,h),this.removeListener(`${s}.${a}`,h),this.removeListener(`${o}.${a}`,l),this.removeListener(`${s}.${a}`,l)};await Promise.all([this.on(`${t}.${a}`,h),this.on(`${i}.${a}`,h),this.once(`${o}.${a}`,h),this.once(`${s}.${a}`,h),this.once(`${o}.${a}`,l),this.once(`${s}.${a}`,l)])}return(await this.wire.sendAction("launch-manifest",{manifestUrl:e,opts:r})).payload.data.manifest}async queryPermissionForCurrentContext(e){const t={uuid:this.wire.me.uuid,name:this.wire.me.name};return(await this.wire.sendAction("query-permission-for-current-context",{apiName:e,identity:t})).payload.data}async enableNativeWindowIntegrationProvider(e){const{payload:t}=await this.wire.sendAction("enable-native-window-integration-provider",{permissions:e});return t.data}async registerUsage({data:e,type:t}){await this.wire.sendAction("register-usage",{data:e,type:t})}async getPrinters(){const{payload:e}=await this.wire.sendAction("system-get-printers");return e.data}async updateProcessLoggingOptions(e){await this.wire.sendAction("system-update-process-logging-options",{options:e})}async getDomainSettings(){const{payload:{data:e}}=await this.wire.sendAction("get-domain-settings",this.identity);return e}async setDomainSettings(e){await this.wire.sendAction("set-domain-settings",{domainSettings:e,...this.identity})}async refreshExtensions(){const{payload:e}=await this.wire.sendAction("refresh-extensions");return e.data}async getInstalledExtensions(){const{payload:e}=await this.wire.sendAction("get-installed-extensions");return e.data}}c.System=ce;var de={},he={};Object.defineProperty(he,"__esModule",{value:!0}),he.RefCounter=void 0;he.RefCounter=class{constructor(){this.topicRefMap=new Map}incRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t+1;n=i,this.topicRefMap.set(e,i)}else this.topicRefMap.set(e,1),n=1;return n}decRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t-1;this.topicRefMap.set(e,i),n=i}else n=-1;return n}actOnFirst(e,t,n){return 1===this.incRefCount(e)?t():n()}actOnLast(e,t,n){return 0===this.decRefCount(e)?t():n()}};var le={},ue={},pe={};Object.defineProperty(pe,"__esModule",{value:!0}),pe.ChannelBase=pe.ProtectedItems=void 0;const we=e=>async(t,n,i)=>{const r=await e(t,n,i);return void 0===r?n:r};pe.ProtectedItems=class{constructor(e,t){this.providerIdentity=e,this.close=t}};class ye{static defaultAction(e){throw new Error(`No action registered at target for ${e}`)}constructor(){this.subscriptions=new Map}async processAction(e,t,n){try{const i=this.subscriptions.has(e)?this.subscriptions.get(e):(t,n)=>(this.defaultAction??ye.defaultAction)(e,t,n),r=this.preAction?await this.preAction(e,t,n):t,o=await i(r,n);return this.postAction?await this.postAction(e,o,n):o}catch(t){if(this.errorMiddleware)return this.errorMiddleware(e,t,n);throw t}}beforeAction(e){if(this.preAction)throw new Error("Already registered beforeAction middleware");this.preAction=we(e)}onError(e){if(this.errorMiddleware)throw new Error("Already registered error middleware");this.errorMiddleware=e}afterAction(e){if(this.postAction)throw new Error("Already registered afterAction middleware");this.postAction=we(e)}remove(e){this.subscriptions.delete(e)}setDefaultAction(e){if(this.defaultAction)throw new Error("default action can only be set once");this.defaultAction=e}register(e,t){if(this.subscriptions.has(e))throw new Error(`Subscription already registered for action: ${e}. Unsubscribe before adding new subscription`);return this.subscriptions.set(e,t),!0}}pe.ChannelBase=ye;var fe,ge,me,ve=s&&s.__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)},Ce=s&&s.__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};Object.defineProperty(ue,"__esModule",{value:!0}),ue.ChannelClient=void 0;const be=pe,Ie=new Map;class Ee extends be.ChannelBase{static closeChannelByEndpointId(e){const t=Ie.get(e);t&&ve(t,me,"f").call(t)}static handleProviderDisconnect(e){for(const t of Ie.values())t.providerIdentity.channelId===e.channelId&&(t.disconnectListener(e),ve(t,me,"f").call(t))}constructor(e,t,n){super(),fe.set(this,void 0),ge.set(this,void 0),this.processAction=(e,t,n)=>super.processAction(e,t,n),me.set(this,(()=>{Ie.delete(this.endpointId),ve(this,ge,"f").close()})),Ce(this,fe,new be.ProtectedItems(e,t),"f"),this.disconnectListener=()=>{},this.endpointId=e.endpointId,Ce(this,ge,n,"f"),Ie.set(this.endpointId,this),n.receive(this.processAction)}get providerIdentity(){return ve(this,fe,"f").providerIdentity}async dispatch(e,t){if(ve(this,ge,"f").isEndpointConnected(this.providerIdentity.channelId))return ve(this,ge,"f").send(this.providerIdentity.channelId,e,t);throw new Error("The client you are trying to dispatch from is disconnected from the target provider.")}onDisconnection(e){this.disconnectListener=t=>{try{e(t)}catch(e){throw new Error(`Error while calling the onDisconnection callback: ${e.message}`)}finally{this.disconnectListener=()=>{}}}}async disconnect(){await this.sendDisconnectAction(),ve(this,me,"f").call(this)}async sendDisconnectAction(){const e=ve(this,fe,"f");await e.close()}static async wireClose(e,t,n){const{channelName:i,uuid:r,name:o}=t;await e.sendAction("disconnect-from-channel",{channelName:i,uuid:r,name:o,endpointId:n})}}ue.ChannelClient=Ee,fe=new WeakMap,ge=new WeakMap,me=new WeakMap;var xe={},Ae={};Object.defineProperty(Ae,"__esModule",{value:!0}),Ae.exhaustiveCheck=void 0,Ae.exhaustiveCheck=function(e,t){throw new Error(`Unsupported value: ${e}${t?`\n Supported values are: ${t.join("")}`:""}`)};var Pe,Me,_e,Oe={},Se=s&&s.__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},Re=s&&s.__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)};Object.defineProperty(Oe,"__esModule",{value:!0}),Oe.ClassicInfo=Oe.ClassicStrategy=void 0;Oe.ClassicStrategy=class{constructor(e,t,n,i){this.messageReceiver=t,this.endpointId=n,this.providerIdentity=i,Pe.set(this,void 0),Me.set(this,new Map),_e.set(this,new Map),this.send=async(e,t,n)=>{const i=Re(this,Me,"f").get(e);if(!i)throw new Error(`Could not locate routing info for endpoint ${e}`);const r={...i};r.isLocalEndpointId&&delete r.endpointId,delete r.isLocalEndpointId;const o=Re(this,Pe,"f").sendAction("send-channel-message",{...r,providerIdentity:this.providerIdentity,action:t,payload:n});Re(this,_e,"f").get(e)?.add(o);return(await o.catch((e=>{throw new Error(e.message)})).finally((()=>{Re(this,_e,"f").get(e)?.delete(o)}))).payload.data.result},this.close=async()=>{this.messageReceiver.removeEndpoint(this.providerIdentity.channelId,this.endpointId),[...Re(this,Me,"f").keys()].forEach((e=>this.closeEndpoint(e))),Se(this,Me,new Map,"f")},Se(this,Pe,e,"f")}onEndpointDisconnect(e,t){}receive(e){this.messageReceiver.addEndpoint(e,this.providerIdentity.channelId,this.endpointId)}async closeEndpoint(e){const t=Re(this,Me,"f").get(e);Re(this,Me,"f").delete(e);const n=Re(this,_e,"f").get(e);n?.forEach((n=>{const i=`Channel connection with identity uuid: ${t?.uuid} / name: ${t?.name} / endpointId: ${e} no longer connected.`;n.cancel(new Error(i))}))}isEndpointConnected(e){return Re(this,Me,"f").has(e)}addEndpoint(e,t){Re(this,Me,"f").set(e,t.endpointIdentity),Re(this,_e,"f").set(e,new Set)}isValidEndpointPayload(e){return"string"==typeof e?.endpointIdentity?.endpointId||"string"==typeof e?.endpointIdentity?.channelId}},Pe=new WeakMap,Me=new WeakMap,_e=new WeakMap,Oe.ClassicInfo={version:5,minimumVersion:0,type:"classic"};var Fe={},je={},ke={};Object.defineProperty(ke,"__esModule",{value:!0}),ke.errorToPOJO=void 0,ke.errorToPOJO=function(e){return{stack:e.stack,name:e.name,message:e.message,toString:()=>e.stack||e.toString()}};var Le,Te,$e=s&&s.__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)},Be=s&&s.__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};Object.defineProperty(je,"__esModule",{value:!0}),je.RTCEndpoint=void 0;const Ge=ke;je.RTCEndpoint=class{static isValidEndpointPayload(e){const t=e=>"object"==typeof e&&null!==e;return t(e)&&t(e.endpointIdentity)&&t(e.rtc)&&"string"==typeof e.endpointIdentity.endpointId}constructor({rtc:e,endpointIdentity:t}){this.responseMap=new Map,Le.set(this,null),Te.set(this,void 0),this.connectionStateChangeHandler=e=>{"connected"!==this.rtc.rtcClient.connectionState&&(this.rtc.rtcClient.removeEventListener("connectionstatechange",this.connectionStateChangeHandler),this.close(),$e(this,Te,"f")&&$e(this,Te,"f").call(this))},this.send=async(e,t)=>{const n=`message-${Math.random()}`,i=new Promise(((e,t)=>{this.responseMap.set(n,{resolve:e,reject:t})}));return this.rtc.channels.request.send(JSON.stringify({action:e,payload:t,messageId:n})),i},this.close=()=>{this.responseMap.forEach((e=>e.reject("Connection has closed."))),this.responseMap=new Map,this.rtc.channels.request.close(),this.rtc.channels.response.close(),this.rtc.rtcClient.close()},this.rtc=e,this.endpointIdentity=t,this.rtc.channels.response.addEventListener("message",(e=>{let{data:t}=e;e.data instanceof ArrayBuffer&&(t=(new TextDecoder).decode(e.data));const{messageId:n,payload:i,success:r,error:o}=JSON.parse(t),{resolve:s,reject:a}=this.responseMap.get(n)??{};s&&a?(this.responseMap.delete(n),r?s(i):a(o)):(console.log("Could not find id in responseMap."),console.log(e))})),this.rtc.channels.request.addEventListener("message",(async e=>{let{data:n}=e;e.data instanceof ArrayBuffer&&(n=(new TextDecoder).decode(e.data));const{messageId:i,action:r,payload:o}=JSON.parse(n);if($e(this,Le,"f"))try{const e=await $e(this,Le,"f").call(this,r,o,t);this.rtc.channels.response.send(JSON.stringify({messageId:i,payload:e,success:!0}))}catch(e){"open"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,error:(0,Ge.errorToPOJO)(e),success:!1}))}else"open"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,success:!1,error:"Connection not ready."}))})),this.rtc.rtcClient.addEventListener("connectionstatechange",this.connectionStateChangeHandler),Object.values(this.rtc.channels).forEach((e=>{e.onclose=e=>{[...this.responseMap.values()].forEach((e=>e.reject(new Error("RTCDataChannel closed unexpectedly, this is most commonly caused by message size. Note: RTC Channels have a message size limit of ~255kB.")))),this.close(),$e(this,Te,"f")&&$e(this,Te,"f").call(this)}}))}onDisconnect(e){if($e(this,Te,"f"))throw new Error("RTCEndpoint disconnectListener cannot be set twice.");Be(this,Te,e,"f")}receive(e){if($e(this,Le,"f"))throw new Error("You have already set a listener for this RTC Endpoint.");Be(this,Le,e,"f")}get connected(){return"connected"===this.rtc.rtcClient.connectionState}},Le=new WeakMap,Te=new WeakMap;var We,He,Ne,De={},Ue=s&&s.__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)},Ve=s&&s.__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};Object.defineProperty(De,"__esModule",{value:!0}),De.EndpointStrategy=void 0;De.EndpointStrategy=class{constructor(e,t,n){this.EndpointType=e,this.StrategyName=n,We.set(this,null),He.set(this,new Map),Ne.set(this,!0),this.send=async(e,t,n)=>this.getEndpointById(e).send(t,n),this.close=async()=>{Ue(this,Ne,"f")&&(Ue(this,He,"f").forEach((e=>e.close())),Ve(this,He,new Map,"f")),Ve(this,Ne,!1,"f")},this.isValidEndpointPayload=t}onEndpointDisconnect(e,t){this.getEndpointById(e).onDisconnect(t)}receive(e){if(Ue(this,We,"f"))throw new Error(`You have already set a listener for this ${this.StrategyName} Strategy`);Ve(this,We,e,"f"),Ue(this,He,"f").forEach((e=>e.receive(Ue(this,We,"f"))))}getEndpointById(e){const t=Ue(this,He,"f").get(e);if(!t)throw new Error(`Client with endpoint id ${e} is not connected`);return t}get connected(){return Ue(this,Ne,"f")}isEndpointConnected(e){return Ue(this,He,"f").has(e)}addEndpoint(e,t){if(!Ue(this,Ne,"f"))return void console.warn(`Adding endpoint to disconnected ${this.StrategyName} Strategy`);const n=new this.EndpointType(t);Ue(this,We,"f")&&n.receive(Ue(this,We,"f")),Ue(this,He,"f").set(e,n)}async closeEndpoint(e){Ue(this,He,"f").delete(e)}},We=new WeakMap,He=new WeakMap,Ne=new WeakMap,Object.defineProperty(Fe,"__esModule",{value:!0}),Fe.RTCInfo=Fe.RTCStrategy=void 0;const ze=je,Ke=De;class qe extends Ke.EndpointStrategy{constructor(){super(ze.RTCEndpoint,ze.RTCEndpoint.isValidEndpointPayload,"RTC")}}Fe.RTCStrategy=qe,Fe.RTCInfo={version:2,minimumVersion:0,type:"rtc"};var Je={};Object.defineProperty(Je,"__esModule",{value:!0}),Je.RTCICEManager=void 0;const Ye=d;class Ze extends Ye.EmitterBase{constructor(e){super(e,"channel"),this.ensureChannelOpened=e=>new Promise(((t,n)=>{if("open"===e.readyState)t();else if("connecting"===e.readyState){const n=()=>{e.removeEventListener("open",n),t()};e.addEventListener("open",n)}else n(new Error("This Channel has already closed"))}))}static createDataChannelPromise(e,t){let n;const i=new Promise((e=>{n=e})),r=i=>{const o=()=>{i.channel.removeEventListener("open",o),n(i.channel)};i.channel.label===e&&(i.channel.addEventListener("open",o),t.removeEventListener("datachannel",r))};return t.addEventListener("datachannel",r),i}async listenForProviderIce(e,t){await this.on(this.createProviderEventName(e),t,{timestamp:Date.now()})}async raiseProviderIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createProviderEventName(e)),t)}async listenForClientIce(e,t){await this.on(this.createClientEventName(e),t,{timestamp:Date.now()})}async raiseClientIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createClientEventName(e)),t)}cleanupIceListeners(e){this.removeAllListeners(this.createClientEventName(e)),this.removeAllListeners(this.createProviderEventName(e))}createClientEventName(e){return`ice-client-${e}`}createProviderEventName(e){return`ice-provider-${e}`}createRouteString(e){return`channel/${e}`}createRtcPeer(){return this.wire.environment.getRtcPeer()}async startClientOffer(){const e=Math.random().toString(),t=this.createRtcPeer();t.addEventListener("icecandidate",(async t=>{t.candidate&&await this.raiseClientIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForProviderIce(e,(async e=>{await t.addIceCandidate(e.candidate)}));const n={request:t.createDataChannel("request"),response:t.createDataChannel("response")},i=await t.createOffer();await t.setLocalDescription(i);const r=Promise.all([n.request,n.response].map(this.ensureChannelOpened)).then((()=>{}));return{rtcClient:t,channels:n,offer:i,rtcConnectionId:e,channelsOpened:r}}async finishClientOffer(e,t,n){return await e.setRemoteDescription(t),await n,!0}async createProviderAnswer(e,t){const n=this.createRtcPeer(),i=Ze.createDataChannelPromise("request",n),r=Ze.createDataChannelPromise("response",n);n.addEventListener("icecandidate",(async t=>{t.candidate&&await this.raiseProviderIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForClientIce(e,(async e=>{await n.addIceCandidate(e.candidate)})),await n.setRemoteDescription(t);const o=await n.createAnswer();await n.setLocalDescription(o);const s=Promise.all([i,r]).then((([t,n])=>(this.cleanupIceListeners(e),{request:t,response:n})));return{rtcClient:n,answer:o,channels:s}}}Je.RTCICEManager=Ze;var Qe={},Xe={};function et(e){return[...e.split(".").reverse().entries()].reduce(((e,[t,n])=>e+ +n*1e4**t),0)}function tt(e,t){return et(e)>=et(t)}function nt(e){return e.split("/")[0]}Object.defineProperty(Xe,"__esModule",{value:!0}),Xe.runtimeUuidMeetsMinimumRuntimeVersion=Xe.parseRuntimeUuid=Xe.meetsMinimumRuntimeVersion=void 0,Xe.meetsMinimumRuntimeVersion=tt,Xe.parseRuntimeUuid=nt,Xe.runtimeUuidMeetsMinimumRuntimeVersion=function(e,t){return tt(nt(e),t)};var it,rt,ot,st,at,ct=s&&s.__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)},dt=s&&s.__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};Object.defineProperty(Qe,"__esModule",{value:!0}),Qe.ChannelProvider=void 0;const ht=pe,lt=Xe;class ut extends ht.ChannelBase{get connections(){return[...ct(this,it,"f")]}static handleClientDisconnection(e,t){const n=e.connections.find((e=>e.endpointId===t.endpointId));if(n)ct(e,st,"f").call(e,n);else{e.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name)).forEach(ct(e,st,"f"))}e.disconnectListener(t)}static setProviderRemoval(e,t){ut.removalMap.set(e,t)}constructor(e,t,n){super(),it.set(this,void 0),rt.set(this,void 0),ot.set(this,void 0),st.set(this,(e=>{const t=this.connections.filter((t=>t.endpointId!==e.endpointId));ct(this,ot,"f").closeEndpoint(e.endpointId),dt(this,it,t,"f")})),this.processAction=async(e,t,n)=>(ut.clientIsMultiRuntime(n)&&!(0,lt.runtimeUuidMeetsMinimumRuntimeVersion)(n.runtimeUuid,"18.87.56.0")?this.handleMultiRuntimeLegacyClient(n):this.checkForClientConnection(n),super.processAction(e,t,n)),at.set(this,(()=>{ct(this,ot,"f").close();const e=ut.removalMap.get(this);e&&e()})),dt(this,rt,new ht.ProtectedItems(e,t),"f"),this.connectListener=()=>{},this.disconnectListener=()=>{},dt(this,it,[],"f"),dt(this,ot,n,"f"),n.receive(this.processAction)}dispatch(e,t,n){const i=e.endpointId??this.getEndpointIdForOpenFinId(e,t);return i&&ct(this,ot,"f").isEndpointConnected(i)?ct(this,ot,"f").send(i,t,n):Promise.reject(new Error(`Client connection with identity uuid: ${e.uuid} / name: ${e.name} / endpointId: ${i} no longer connected.`))}async processConnection(e,t){return ct(this,it,"f").push(e),this.connectListener(e,t)}publish(e,t){return this.connections.map((n=>ct(this,ot,"f").send(n.endpointId,e,t)))}onConnection(e){this.connectListener=e}onDisconnection(e){this.disconnectListener=e}async destroy(){const e=ct(this,rt,"f");e.providerIdentity,dt(this,it,[],"f"),await e.close(),ct(this,at,"f").call(this)}async getAllClientInfo(){return this.connections.map((e=>{const{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}=e;return{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}}))}checkForClientConnection(e){if(!this.isClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider.\n Client Identity: {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}isClientConnected(e){return ut.clientIdentityIncludesEndpointId(e)?this.connections.some((t=>t.endpointId===e.endpointId&&t.uuid===e.uuid&&t.name===e.name)):this.isLegacyClientConnected(e)}isLegacyClientConnected(e){return this.connections.some((t=>t.uuid===e.uuid&&t.name===e.name))}handleMultiRuntimeLegacyClient(e){if(!this.isLegacyClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider. Client Identity:\n {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}getEndpointIdForOpenFinId(e,t){const n=this.connections.filter((t=>t.name===e.name&&t.uuid===e.uuid));if(n.length>=2){const n=ct(this,rt,"f"),{uuid:i,name:r}=e,o=n?.providerIdentity.uuid,s=n?.providerIdentity.name;console.warn(`WARNING: Dispatch call may have unintended results. The "to" argument of your dispatch call is missing the\n "endpointId" parameter. The identity you are dispatching to ({uuid: ${i}, name: ${r}})\n has multiple channelClients for this channel. Your dispatched action: (${t}) from the provider:\n ({uuid: ${o}, name: ${s}}) will only be processed by the most recently-created client.`)}return n.pop()?.endpointId}static clientIdentityIncludesEndpointId(e){return void 0!==e.endpointId}static clientIsMultiRuntime(e){return void 0!==e.runtimeUuid}static async wireClose(e,t){await e.sendAction("destroy-channel",{channelName:t})}}Qe.ChannelProvider=ut,it=new WeakMap,rt=new WeakMap,ot=new WeakMap,st=new WeakMap,at=new WeakMap,ut.removalMap=new WeakMap;var pt={};Object.defineProperty(pt,"__esModule",{value:!0}),pt.MessageReceiver=void 0;const wt=ue,yt=d;class ft extends yt.Base{constructor(e){super(e),this.onmessage=e=>"process-channel-message"===e.action&&(this.processChannelMessage(e),!0),this.endpointMap=new Map,this.latestEndpointIdByChannelId=new Map,e.registerMessageHandler(this.onmessage.bind(this))}async processChannelMessage(e){const{senderIdentity:t,providerIdentity:n,action:i,ackToSender:r,payload:o,intendedTargetIdentity:s}=e.payload,a=s.channelId??s.endpointId??this.latestEndpointIdByChannelId.get(n.channelId),c=this.endpointMap.get(a);if(!c)return r.payload.success=!1,r.payload.reason=`Client connection with identity uuid: ${this.wire.me.uuid} / name: ${this.wire.me.name} / endpointId: ${a} no longer connected.`,this.wire.sendRaw(r);try{const e=await c(i,o,t);return r.payload.payload=r.payload.payload||{},r.payload.payload.result=e,this.wire.sendRaw(r)}catch(e){return r.payload.success=!1,r.payload.reason=e.message,this.wire.sendRaw(r)}}addEndpoint(e,t,n){this.endpointMap.set(n,e),t!==n&&this.latestEndpointIdByChannelId.set(t,n)}removeEndpoint(e,t){this.endpointMap.delete(t),this.latestEndpointIdByChannelId.get(e)===t&&this.latestEndpointIdByChannelId.delete(e)}checkForPreviousClientConnection(e){const t=this.latestEndpointIdByChannelId.get(e);t&&(wt.ChannelClient.closeChannelByEndpointId(t),console.warn("You have created a second connection to an older provider. First connection has been removed from the clientMap"),console.warn("If the provider calls publish(), you may receive multiple messages."))}}pt.MessageReceiver=ft;var gt={};Object.defineProperty(gt,"__esModule",{value:!0}),gt.ProtocolManager=void 0;gt.ProtocolManager=class{constructor(e){this.ProtocolsInPreferenceOrder=e,this.DefaultClientProtocols=["classic"],this.DefaultProviderProtocols=["classic"],this.getClientProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultClientProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(", ")}.`);return t},this.getProviderProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultProviderProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(", ")}.`);return t},this.getCompatibleProtocols=(e,t)=>t.supportedProtocols.filter((t=>e.some((e=>e.type===t.type&&t.version>=e.minimumVersion&&e.version>=(t.minimumVersion??0))))).slice(0,t.maxProtocols)}};var mt={};Object.defineProperty(mt,"__esModule",{value:!0});class vt{static combine(e,t){return new vt(e,t)}constructor(e,t){this.primary=e,this.secondary=t}onEndpointDisconnect(e,t){this.primary.onEndpointDisconnect(e,(()=>{this.secondary.isEndpointConnected(e)||t()})),this.secondary.onEndpointDisconnect(e,(()=>{this.primary.isEndpointConnected(e)||t()}))}isValidEndpointPayload(e){return this.primary.isValidEndpointPayload(e)||this.secondary.isValidEndpointPayload(e)}async closeEndpoint(e){await this.primary.closeEndpoint(e),await this.secondary.closeEndpoint(e)}isEndpointConnected(e){return this.primary.isEndpointConnected(e)||this.secondary.isEndpointConnected(e)}async addEndpoint(e,t){this.primary.isValidEndpointPayload(t)&&await this.primary.addEndpoint(e,t),this.secondary.isValidEndpointPayload(t)&&await this.secondary.addEndpoint(e,t)}receive(e){this.primary.receive(e),this.secondary.receive(e)}send(e,t,n){return this.primary.isEndpointConnected(e)?this.primary.send(e,t,n):this.secondary.send(e,t,n)}async close(){await Promise.all([this.primary.close(),this.secondary.close()])}}mt.default=vt;var Ct,bt,It=s&&s.__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},Et=s&&s.__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)},xt=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(xe,"__esModule",{value:!0}),xe.ConnectionManager=void 0;const At=Ae,Pt=d,Mt=Oe,_t=Fe,Ot=Je,St=Qe,Rt=pt,Ft=gt,jt=xt(mt);class kt extends Pt.Base{static getProtocolOptionsFromStrings(e){return e.map((e=>{switch(e){case"rtc":return _t.RTCInfo;case"classic":return Mt.ClassicInfo;default:return(0,At.exhaustiveCheck)(e,["rtc","classic"])}}))}constructor(e){super(e),Ct.set(this,void 0),bt.set(this,void 0),this.removeChannelFromProviderMap=e=>{this.providerMap.delete(e)},this.onmessage=e=>"process-channel-connection"===e.action&&(this.processChannelConnection(e),!0),this.providerMap=new Map,this.protocolManager=new Ft.ProtocolManager("node"===this.wire.environment.type?["classic"]:["rtc","classic"]),It(this,Ct,new Rt.MessageReceiver(e),"f"),It(this,bt,new Ot.RTCICEManager(e),"f"),e.registerMessageHandler(this.onmessage.bind(this))}createProvider(e,t){const n=Object.assign(this.wire.environment.getDefaultChannelOptions().create,e||{}),i=this.protocolManager.getProviderProtocols(n?.protocols),r=i.map((e=>{switch(e){case"rtc":return new _t.RTCStrategy;case"classic":return new Mt.ClassicStrategy(this.wire,Et(this,Ct,"f"),t.channelId,t);default:return(0,At.exhaustiveCheck)(e,["rtc","classic"])}}));let o;if(2===r.length){const[e,t]=r;o=jt.default.combine(e,t)}else{if(1!==r.length)throw new Error("failed to combine strategies");[o]=r}const s=new St.ChannelProvider(t,(()=>St.ChannelProvider.wireClose(this.wire,t.channelName)),o),a=t.channelId;return this.providerMap.set(a,{provider:s,strategy:o,supportedProtocols:kt.getProtocolOptionsFromStrings(i)}),St.ChannelProvider.setProviderRemoval(s,this.removeChannelFromProviderMap.bind(this)),s}async createClientOffer(e){const t=this.protocolManager.getClientProtocols(e?.protocols);let n;return{offer:{supportedProtocols:await Promise.all(t.map((async e=>{switch(e){case"rtc":{const{rtcClient:e,channels:t,offer:i,rtcConnectionId:r,channelsOpened:o}=await Et(this,bt,"f").startClientOffer();return n={rtcClient:e,channels:t,channelsOpened:o},{type:"rtc",version:_t.RTCInfo.version,payload:{offer:i,rtcConnectionId:r}}}case"classic":return{type:"classic",version:Mt.ClassicInfo.version};default:return(0,At.exhaustiveCheck)(e,["rtc","classic"])}}))),maxProtocols:2},rtc:n}}async createClientStrategy(e,t){t.endpointId||(t.endpointId=this.wire.environment.getNextMessageId(),Et(this,Ct,"f").checkForPreviousClientConnection(t.channelId));const n=t.answer??{supportedProtocols:[{type:"classic",version:1}]},i=(await Promise.all(n.supportedProtocols.map((async n=>"rtc"===n.type&&e?(await Et(this,bt,"f").finishClientOffer(e.rtcClient,n.payload.answer,e.channelsOpened),new _t.RTCStrategy):"classic"===n.type?new Mt.ClassicStrategy(this.wire,Et(this,Ct,"f"),t.endpointId,t):null)))).filter((e=>null!==e));let r;if(e&&!i.some((e=>e instanceof _t.RTCStrategy))&&e&&e.rtcClient.close(),i.length>=2)r=jt.default.combine(i[0],i[1]);else{if(!i.length)throw new Error("No compatible protocols");[r]=i}const o={endpointIdentity:t,rtc:e};return r.addEndpoint(t.channelId,o),r}async processChannelConnection(e){const{clientIdentity:t,providerIdentity:n,ackToSender:i,payload:r,offer:o}=e.payload;t.endpointId?t.isLocalEndpointId=!1:(t.endpointId=this.wire.environment.getNextMessageId(),t.isLocalEndpointId=!0);const s=n.channelId,a=this.providerMap.get(s);if(!a)return i.payload.success=!1,i.payload.reason=`Channel "${n.channelName}" has been destroyed.`,this.wire.sendRaw(i);const{provider:c,strategy:d,supportedProtocols:h}=a;try{if(!(c instanceof St.ChannelProvider))throw Error("Cannot connect to a channel client");const e=o??{supportedProtocols:[{type:"classic",version:1}],maxProtocols:1},n=this.protocolManager.getCompatibleProtocols(h,e);if(!n.length)throw new Error("This provider does not support any of the offered protocols.");const s=await c.processConnection(t,r);i.payload.payload=i.payload.payload||{};let a={supportedProtocols:[],endpointPayloadPromise:Promise.resolve({endpointIdentity:t})};return a=await n.reduce((async(e,t)=>{const n=await e;if("rtc"===t.type){const{answer:e,rtcClient:i,channels:r}=await Et(this,bt,"f").createProviderAnswer(t.payload.rtcConnectionId,t.payload.offer);n.supportedProtocols.push({type:"rtc",version:_t.RTCInfo.version,payload:{answer:e}}),n.endpointPayloadPromise=n.endpointPayloadPromise.then((e=>r.then((t=>({...e,rtc:{rtcClient:i,channels:t}})))))}else n.supportedProtocols.push({type:"classic",version:Mt.ClassicInfo.version});return n}),Promise.resolve(a)),a.endpointPayloadPromise.then((e=>d.addEndpoint(t.endpointId,e))),i.payload.payload.result=s,i.payload.payload.answer=a,this.wire.sendRaw(i)}catch(e){return i.payload.success=!1,i.payload.reason=e.message,this.wire.sendRaw(i)}}}xe.ConnectionManager=kt,Ct=new WeakMap,bt=new WeakMap;var Lt,Tt,$t,Bt=s&&s.__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},Gt=s&&s.__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)};Object.defineProperty(le,"__esModule",{value:!0}),le.Channel=void 0;const Wt=t,Ht=G,Nt=d,Dt=ue,Ut=xe,Vt=Qe;function zt(e){const t=Math.floor(e/10),n=Math.min(3e4,500*2**t);return new Promise((e=>{setTimeout((()=>{e(!1)}),n)}))}class Kt extends Nt.EmitterBase{constructor(e){super(e,"channel"),Lt.set(this,void 0),Tt.set(this,new Wt.EventEmitter),$t.set(this,new Ht.AsyncRetryableLazy((async()=>{await Promise.all([this.on("disconnected",(e=>{Dt.ChannelClient.handleProviderDisconnect(e)})),this.on("connected",((...e)=>{Gt(this,Tt,"f").emit("connected",...e)}))]).catch((()=>new Error("error setting up channel connection listeners")))}))),Bt(this,Lt,new Ut.ConnectionManager(e),"f")}async getAllChannels(){return this.wire.sendAction("get-all-channels").then((({payload:e})=>e.data))}async onChannelConnect(e){await this.on("connected",e)}async onChannelDisconnect(e){await this.on("disconnected",e)}async safeConnect(e,t,n){const i={count:0};do{let r=()=>{};const o=new Promise((t=>{r=n=>{e===n.channelName&&t(!0)},Gt(this,Tt,"f").on("connected",r)}));try{if(i.count>0){i.gotConnectedEvent=await Promise.race([zt(i.count),o]);const t=await this.wire.sendAction("connect-to-channel",{...n,retryInfo:i});return console.log(`Successfully connected to channelName: ${e}`),t.payload.data}const t=this.wire.sendAction("connect-to-channel",n);i.originalMessageId=t.messageId;return(await t).payload.data}catch(n){if(!n.message.includes("internal-nack"))throw n;t&&0===i.count&&console.warn(`No channel found for channelName: ${e}. Waiting for connection...`)}finally{i.count+=1,Gt(this,Tt,"f").removeListener("connected",r)}}while(t);throw new Error(`No channel found for channelName: ${e}.`)}async connect(e,t={}){if(await Gt(this,$t,"f").getValue(),!e||"string"!=typeof e)throw new Error("Please provide a channelName string to connect to a channel.");const n={wait:!0,...this.wire.environment.getDefaultChannelOptions().connect,...t},{offer:i,rtc:r}=await Gt(this,Lt,"f").createClientOffer(n);let o;(this.fin.me.isFrame||this.fin.me.isView||this.fin.me.isWindow)&&(o=(await this.fin.me.getInfo()).url);const s={channelName:e,...n,offer:i,connectionUrl:o},a=await this.safeConnect(e,n.wait,s),c=await Gt(this,Lt,"f").createClientStrategy(r,a),d=new Dt.ChannelClient(a,(()=>Dt.ChannelClient.wireClose(this.wire,a,a.endpointId)),c);return c.onEndpointDisconnect(a.channelId,(async()=>{try{await d.sendDisconnectAction()}catch(e){console.warn(`Something went wrong during disconnect for client with uuid: ${a.uuid} / name: ${a.name} / endpointId: ${a.endpointId}.`)}finally{Dt.ChannelClient.handleProviderDisconnect(a)}})),d}async create(e,t){if(!e)throw new Error("Please provide a channelName to create a channel");const{payload:{data:n}}=await this.wire.sendAction("create-channel",{channelName:e}),i=Gt(this,Lt,"f").createProvider(t,n);return this.on("client-disconnected",(t=>{t.channelName===e&&Vt.ChannelProvider.handleClientDisconnection(i,t)})),i}}le.Channel=Kt,Lt=new WeakMap,Tt=new WeakMap,$t=new WeakMap,Object.defineProperty(de,"__esModule",{value:!0}),de.InterAppPayload=de.InterApplicationBus=void 0;const qt=t,Jt=d,Yt=he,Zt=le,Qt=O;class Xt extends Jt.Base{constructor(e){super(e),this.events={subscriberAdded:"subscriber-added",subscriberRemoved:"subscriber-removed"},this.refCounter=new Yt.RefCounter,this.Channel=new Zt.Channel(e),this.emitter=new qt.EventEmitter,e.registerMessageHandler(this.onmessage.bind(this)),this.on=this.emitter.on.bind(this.emitter),this.removeAllListeners=this.emitter.removeAllListeners.bind(this.emitter)}async publish(e,t){await this.wire.sendAction("publish-message",{topic:e,message:t,sourceWindowName:this.me.name})}async send(e,t,n){const i=(0,Qt.validateIdentity)(e);if(i)throw new Error(i);await this.wire.sendAction("send-message",{destinationUuid:e.uuid,destinationWindowName:e.name,topic:t,message:n,sourceWindowName:this.me.name})}subscribe(e,t,n){const i=this.createSubscriptionKey(e.uuid,e.name||"*",t);return this.emitter.on(i,n),this.refCounter.actOnFirst(i,(async()=>{await this.wire.sendAction("subscribe",{sourceUuid:e.uuid,sourceWindowName:e.name||"*",topic:t,destinationWindowName:this.me.name})}),(()=>Promise.resolve()))}unsubscribe(e,t,n){const i=e.name||"*",r=this.createSubscriptionKey(e.uuid,i,t);return this.emitter.removeListener(r,n),this.refCounter.actOnLast(r,(async()=>{await this.wire.sendAction("unsubscribe",{sourceUuid:e.uuid,sourceWindowName:i,topic:t,destinationWindowName:this.me.name})}),(()=>new Promise((e=>e)).then((()=>{}))))}processMessage(e){const{payload:{message:t,sourceWindowName:n,sourceUuid:i,topic:r}}=e,o=[this.createSubscriptionKey(i,n,r),this.createSubscriptionKey(i,"*",r),this.createSubscriptionKey("*","*",r)],s={uuid:i,name:n};o.forEach((e=>{this.emitter.emit(e,t,s)}))}emitSubscriverEvent(e,t){const{payload:{targetName:n,uuid:i,topic:r}}=t,o={name:n,uuid:i,topic:r};this.emitter.emit(e,o)}createSubscriptionKey(e,t,n){const i=t||"*";if(!(e&&i&&n))throw new Error("Missing uuid, name, or topic string");return function(...e){return e.map((e=>Buffer.from(`${e}`).toString("base64"))).join("/")}(e,i,n)}onmessage(e){const{action:t}=e;switch(t){case"process-message":this.processMessage(e);break;case this.events.subscriberAdded:this.emitSubscriverEvent(this.events.subscriberAdded,e);break;case this.events.subscriberRemoved:this.emitSubscriverEvent(this.events.subscriberRemoved,e)}return!0}}de.InterApplicationBus=Xt;de.InterAppPayload=class{};var en={};Object.defineProperty(en,"__esModule",{value:!0}),en.Clipboard=void 0;const tn=d;class nn extends tn.Base{async writeText(e){await this.wire.sendAction("clipboard-write-text",e)}async readText(e){const{payload:t}=await this.wire.sendAction("clipboard-read-text",{type:e});return t.data}async writeImage(e){await this.wire.sendAction("clipboard-write-image",e)}async readImage(e={format:"dataURL"}){const{payload:t}=await this.wire.sendAction("clipboard-read-image",e);return t.data}async writeHtml(e){await this.wire.sendAction("clipboard-write-html",e)}async readHtml(e){const{payload:t}=await this.wire.sendAction("clipboard-read-html",{type:e});return t.data}async writeRtf(e){await this.wire.sendAction("clipboard-write-rtf",e)}async readRtf(e){const{payload:t}=await this.wire.sendAction("clipboard-read-rtf",{type:e});return t.data}async write(e){await this.wire.sendAction("clipboard-write",e)}async getAvailableFormats(e){const{payload:t}=await this.wire.sendAction("clipboard-read-formats",{type:e});return t.data}}en.Clipboard=nn;var rn={},on={},sn={};Object.defineProperty(sn,"__esModule",{value:!0}),sn.ExternalApplication=void 0;const an=d;class cn extends an.EmitterBase{constructor(e,t){super(e,"external-application",t.uuid),this.identity=t}getInfo(){return this.wire.sendAction("get-external-application-info",this.identity).then((({payload:e})=>e.data))}}sn.ExternalApplication=cn,Object.defineProperty(on,"__esModule",{value:!0}),on.ExternalApplicationModule=void 0;const dn=d,hn=sn;class ln extends dn.Base{wrap(e){return this.wire.sendAction("external-application-wrap").catch((e=>{})),Promise.resolve(new hn.ExternalApplication(this.wire,{uuid:e}))}wrapSync(e){return this.wire.sendAction("external-application-wrap-sync").catch((e=>{})),new hn.ExternalApplication(this.wire,{uuid:e})}}on.ExternalApplicationModule=ln,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(on,e),n(sn,e)}(rn);var un={},pn={},wn={};Object.defineProperty(wn,"__esModule",{value:!0}),wn._Frame=void 0;const yn=d;class fn extends yn.EmitterBase{constructor(e,t){super(e,"frame",t.uuid,t.name),this.identity=t}getInfo(){return this.wire.sendAction("get-frame-info",this.identity).then((({payload:e})=>e.data))}getParentWindow(){return this.wire.sendAction("get-parent-window",this.identity).then((({payload:e})=>e.data))}}wn._Frame=fn,Object.defineProperty(pn,"__esModule",{value:!0}),pn._FrameModule=void 0;const gn=d,mn=O,vn=wn;class Cn extends gn.Base{async wrap(e){this.wire.sendAction("frame-wrap").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}wrapSync(e){this.wire.sendAction("frame-wrap-sync").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}getCurrent(){return this.wire.sendAction("frame-get-current").catch((e=>{})),Promise.resolve(new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity()))}getCurrentSync(){return this.wire.sendAction("frame-get-current-sync").catch((e=>{})),new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity())}}pn._FrameModule=Cn,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(pn,e),n(wn,e)}(un);var bn={};Object.defineProperty(bn,"__esModule",{value:!0}),bn.GlobalHotkey=void 0;const In=d;class En extends In.EmitterBase{constructor(e){super(e,"global-hotkey")}async register(e,t){await this.on(e,t),await this.wire.sendAction("global-hotkey-register",{hotkey:e})}async unregister(e){await this.removeAllListeners(e),await this.wire.sendAction("global-hotkey-unregister",{hotkey:e})}async unregisterAll(){await Promise.all(this.eventNames().filter((e=>!("registered"===e||"unregistered"===e))).map((e=>this.removeAllListeners(e)))),await this.wire.sendAction("global-hotkey-unregister-all",{})}async isRegistered(e){const{payload:{data:t}}=await this.wire.sendAction("global-hotkey-is-registered",{hotkey:e});return t}}bn.GlobalHotkey=En;var xn,An={},Pn={},Mn={},_n=s&&s.__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)};Object.defineProperty(Mn,"__esModule",{value:!0}),Mn.Platform=void 0;const On=d,Sn=O,Rn=new Map;class Fn extends On.EmitterBase{constructor(e,t){super(t.wire,"application",e.uuid),this.getClient=e=>{this.wire.sendAction("platform-get-client",this.identity).catch((e=>{}));const t=e||this.identity,{uuid:n}=t;if(!Rn.has(n)){const e=_n(this,xn,"f").call(this,n);Rn.set(n,e)}return Rn.get(n)},xn.set(this,(async e=>{try{const t=`custom-frame-${e}`,n=await this._channel.connect(t,{wait:!1});return n.onDisconnection((()=>{Rn.delete(e)})),n}catch(t){throw Rn.delete(e),new Error("The targeted Platform is not currently running. Listen for application-started event for the given Uuid.")}})),this.launchLegacyManifest=this.launchContentManifest;const n=(0,Sn.validateIdentity)(e);if(n)throw new Error(n);this._channel=t,this.identity={uuid:e.uuid},this.Layout=this.fin.Platform.Layout,this.Application=this.fin.Application.wrapSync(this.identity)}async createView(e,t,n){this.wire.sendAction("platform-create-view",this.identity).catch((e=>{}));const i=await this.getClient(),r=await i.dispatch("create-view",{target:t,opts:e,targetView:n});if(!r||(0,Sn.validateIdentity)(r.identity))throw new Error(`When overwriting the createView call, please return an object that has a valid 'identity' property: ${JSON.stringify(r)}`);return this.fin.View.wrapSync(r.identity)}async createWindow(e){this.wire.sendAction("platform-create-window",this.identity).catch((e=>{}));const t=await this.getClient();e.reason||(e.reason="api-call");const n=await t.dispatch("create-view-container",e);if(!n||(0,Sn.validateIdentity)(n.identity))throw new Error(`When overwriting the createWindow call, please return an object that has a valid 'identity' property: ${JSON.stringify(n)}`);const{identity:i}=n,r=this.fin.Window.wrapSync(i);return r.name=i.name,r.uuid=i.uuid,r}async quit(){this.wire.sendAction("platform-quit",this.identity).catch((e=>{}));return(await this.getClient()).dispatch("quit")}async closeView(e){this.wire.sendAction("platform-close-view",this.identity).catch((e=>{}));const t=await this.getClient();await t.dispatch("close-view",{view:e})}async reparentView(e,t){console.warn("Platform.reparentView has been deprecated, please use Platform.createView"),this.wire.sendAction("platform-reparent-view",this.identity).catch((e=>{}));const n={...e,uuid:e.uuid??this.identity.uuid},i=await this.fin.View.wrap(n),r=await i.getOptions();return this.createView(r,t)}async getSnapshot(){this.wire.sendAction("platform-get-snapshot",this.identity).catch((e=>{}));return(await this.getClient()).dispatch("get-snapshot")}async getViewSnapshot(e){return(await this.getClient()).dispatch("get-view-snapshot",{viewIdentity:e})}async applySnapshot(e,t){this.wire.sendAction("platform-apply-snapshot",this.identity).catch((e=>{}));const n="Requested snapshot must be a valid Snapshot object, or a url or filepath to such an object.";let i;if("string"==typeof e)try{i=(await this._channel.wire.sendAction("get-application-manifest",{manifestUrl:e})).payload.data}catch(e){throw new Error(`${n}: ${e}`)}else i=e;if(!i.windows)throw new Error(n);const r=await this.getClient();return await r.dispatch("apply-snapshot",{snapshot:i,options:t}),this}async fetchManifest(e){return(await this.getClient()).dispatch("platform-fetch-manifest",{manifestUrl:e})}async launchContentManifest(e){this.wire.sendAction("platform-launch-content-manifest",this.identity).catch((()=>{}));const t=await this.getClient(),n=await this.fetchManifest(e);return t.dispatch("launch-into-platform",{manifest:n,manifestUrl:e}),this}async setWindowContext(e={},t){if(this.wire.sendAction("platform-set-window-context",this.identity).catch((e=>{})),!e)throw new Error("Please provide a serializable object or string to set the context.");const n=await this.getClient(),{entityType:i}=t?await this.fin.System.getEntityInfo(t.uuid,t.name):this.fin.me;await n.dispatch("set-window-context",{context:e,entityType:i,target:t||{uuid:this.fin.me.uuid,name:this.fin.me.name}})}async getWindowContext(e){this.wire.sendAction("platform-get-window-context",this.identity).catch((e=>{}));const t=await this.getClient(),{entityType:n}=e?await this.fin.System.getEntityInfo(e.uuid,e.name):this.fin.me;return t.dispatch("get-window-context",{target:e||{uuid:this.fin.me.uuid,name:this.fin.me.name},entityType:n})}async closeWindow(e,t={skipBeforeUnload:!1}){this.wire.sendAction("platform-close-window",this.identity).catch((e=>{}));return(await this.getClient()).dispatch("close-window",{windowId:e,options:t})}}Mn.Platform=Fn,xn=new WeakMap;var jn={},kn={},Ln={},Tn={};function $n(e){switch(e){case"columns":case"grid":case"rows":case"tabs":return!0;default:return!1}}Object.defineProperty(Tn,"__esModule",{value:!0}),Tn.overrideFromComposables=Tn.isValidPresetType=void 0,Tn.isValidPresetType=$n,Tn.overrideFromComposables=function(...e){return t=>e.reduceRight(((e,t)=>n=>t(e(n))),(e=>e))(t)},Tn.default={isValidPresetType:$n};var Bn={},Gn={},Wn={};Object.defineProperty(Wn,"__esModule",{value:!0}),Wn.ApiConsumer=void 0;Wn.ApiConsumer=class{constructor(e){this.strategy=e,this.consume=async e=>(await this.strategy.getExposedFunctions(e)).reduce(((t,n)=>({...t,[n.key]:this.strategy.createFunction(n,e)})),{})}};var Hn={},Nn={};Object.defineProperty(Nn,"__esModule",{value:!0}),Nn.expose=Nn.getExposedProperties=void 0;const Dn=Symbol("exposedProperties");Nn.getExposedProperties=e=>e[Dn]||e.prototype[Dn]||[];Nn.expose=e=>(t,n,i)=>{t[Dn]=t[Dn]||[],t[Dn].push({key:n,descriptor:i,options:e})},Object.defineProperty(Hn,"__esModule",{value:!0}),Hn.ApiExposer=void 0;const Un=Nn;Hn.ApiExposer=class{constructor(e){this.strategy=e,this.exposeInstance=async(e,t)=>{const n=(0,Un.getExposedProperties)(e),i=await Promise.all(n.map((async({key:n,options:i})=>({key:n,options:await this.strategy.exposeFunction(e[n].bind(e),{key:n,options:i,meta:t})}))));await this.strategy.exposeMeta(t,i)}}};var Vn={},zn={},Kn={};Object.defineProperty(Kn,"__esModule",{value:!0}),Kn.ChannelsConsumer=void 0;Kn.ChannelsConsumer=class{constructor(e){this.channel=e,this.getExposedFunctions=async e=>{const{id:t}=e,{props:n}=await this.channel.dispatch(`api-meta:${t}`);return n},this.createFunction=e=>(...t)=>{const{action:n}=e.options;return this.channel.dispatch(n,{args:t})}}};var qn={};Object.defineProperty(qn,"__esModule",{value:!0}),qn.ChannelsExposer=void 0;qn.ChannelsExposer=class{constructor(e){this.channelProviderOrClient=e,this.exposeFunction=async(e,t)=>{const{key:n,options:i,meta:r}=t,{id:o}=r,s=`${o}.${i?.action||n}`;return await this.channelProviderOrClient.register(s,(async({args:t})=>e(...t))),{action:s}},this.exposeMeta=async({id:e},t)=>{const n=`api-meta:${e}`;await this.channelProviderOrClient.register(n,(()=>({props:t})))}}},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Kn,e),n(qn,e)}(zn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(zn,e)}(Vn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Wn,e),n(Hn,e),n(Vn,e),n(Nn,e)}(Gn);var Jn={};Object.defineProperty(Jn,"__esModule",{value:!0}),Jn.createRelayedDispatch=exports.relayChannelClientApi_1=Jn.relayChannelClientApi=void 0;const Yn=["no longer connected","RTCDataChannel closed unexpectedly","The client you are trying to dispatch from is disconnected from the target provider"];exports.relayChannelClientApi_1=Jn.relayChannelClientApi=async(e,t)=>{e.register(`relay:${t}`,(({action:t,target:n,payload:i})=>e.dispatch(n,t,i))),await Promise.resolve()};Jn.createRelayedDispatch=(e,t,n,i)=>async(r,o)=>{try{return await e.dispatch(`relay:${n}`,{action:r,payload:o,target:t})}catch(e){if(s=e.message,Yn.some((e=>s.includes(e)))&&i)throw new Error(i);throw e}var s};var Zn,Qn,Xn,ei=s&&s.__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},ti=s&&s.__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)};Object.defineProperty(Bn,"__esModule",{value:!0}),Bn.ColumnOrRow=Bn.TabStack=Bn.LayoutNode=void 0;const ni=Gn,ii=Jn;class ri{constructor(e,t){Zn.set(this,void 0),this.isRoot=()=>ti(this,Zn,"f").isRoot(this.entityId),this.exists=()=>ti(this,Zn,"f").exists(this.entityId),this.getParent=async()=>{const e=await ti(this,Zn,"f").getParent(this.entityId);if(e)return ri.getEntity(e,ti(this,Zn,"f"))},this.createAdjacentStack=async(e,t)=>{const n=await ti(this,Zn,"f").createAdjacentStack(this.entityId,e,t);return ri.getEntity({entityId:n,type:"stack"},ti(this,Zn,"f"))},this.getAdjacentStacks=async e=>(await ti(this,Zn,"f").getAdjacentStacks({targetId:this.entityId,edge:e})).map((e=>ri.getEntity({type:"stack",entityId:e.entityId},ti(this,Zn,"f")))),ei(this,Zn,e,"f"),this.entityId=t}}Bn.LayoutNode=ri,Zn=new WeakMap,ri.newLayoutEntitiesClient=async(e,t,n)=>{const i=(0,ii.createRelayedDispatch)(e,n,"layout-relay","You are trying to interact with a layout component on a window that does not exist or has been destroyed.");return new ni.ApiConsumer(new ni.ChannelsConsumer({dispatch:i})).consume({id:t})},ri.getEntity=(e,t)=>{const{entityId:n,type:i}=e;switch(i){case"column":case"row":return new si(t,n,i);case"stack":return new oi(t,n);default:throw new Error(`Unrecognised Layout Entity encountered ('${JSON.stringify(e)})`)}};class oi extends ri{constructor(e,t){super(e,t),Qn.set(this,void 0),this.type="stack",this.getViews=()=>ti(this,Qn,"f").getStackViews(this.entityId),this.addView=async(e,t={index:0})=>ti(this,Qn,"f").addViewToStack(this.entityId,e,t),this.removeView=async e=>{await ti(this,Qn,"f").removeViewFromStack(this.entityId,e)},this.setActiveView=async e=>{await ti(this,Qn,"f").setStackActiveView(this.entityId,e)},ei(this,Qn,e,"f")}}Bn.TabStack=oi,Qn=new WeakMap;class si extends ri{constructor(e,t,n){super(e,t),Xn.set(this,void 0),this.getContent=async()=>(await ti(this,Xn,"f").getContent(this.entityId)).map((e=>ri.getEntity(e,ti(this,Xn,"f")))),ei(this,Xn,e,"f"),this.type=n}}Bn.ColumnOrRow=si,Xn=new WeakMap;var ai={};Object.defineProperty(ai,"__esModule",{value:!0}),ai.DEFAULT_LAYOUT_KEY=ai.LAYOUT_CONTROLLER_ID=void 0,ai.LAYOUT_CONTROLLER_ID="layout-entities",ai.DEFAULT_LAYOUT_KEY="__default__";var ci,di,hi,li=s&&s.__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)};Object.defineProperty(Ln,"__esModule",{value:!0}),Ln.Layout=void 0;const ui=G,pi=O,wi=d,yi=Tn,fi=Bn,gi=ai;class mi extends wi.Base{static getClient(e){return li(e,di,"f").getValue()}constructor(e,t){super(t),ci.add(this),di.set(this,new ui.Lazy((async()=>fi.LayoutNode.newLayoutEntitiesClient(await this.platform.getClient(),gi.LAYOUT_CONTROLLER_ID,this.identity)))),this.replace=async e=>{this.wire.sendAction("layout-replace").catch((e=>{}));const t=await this.platform.getClient();await t.dispatch("replace-layout",{target:this.identity,opts:{layout:e}})},this.replaceView=async(e,t)=>{this.wire.sendAction("layout-replace-view").catch((e=>{}));const n=await this.platform.getClient();await n.dispatch("replace-view",{target:this.identity,opts:{viewToReplace:e,newView:t}})},this.applyPreset=async e=>{this.wire.sendAction("layout-apply-preset").catch((e=>{}));const t=await this.platform.getClient(),{presetType:n}=e;if(!n||!(0,yi.isValidPresetType)(n))throw new Error("Cannot apply preset layout, please include an applicable presetType property in the PresetLayoutOptions.");await t.dispatch("apply-preset-layout",{target:this.identity,opts:{presetType:n}})};const n=(0,pi.validateIdentity)(e);if(n)throw new Error(n);this.identity=e,this.platform=this.fin.Platform.wrapSync({uuid:e.uuid}),e.uuid===this.fin.me.uuid&&e.name===this.fin.me.name&&(this.init=this.fin.Platform.Layout.init)}async getConfig(){this.wire.sendAction("layout-get-config").catch((e=>{}));return(await this.platform.getClient()).dispatch("get-frame-snapshot",{target:this.identity})}async getCurrentViews(){this.wire.sendAction("layout-get-views").catch((e=>{}));const e=await this.platform.getClient();return(await e.dispatch("get-layout-views",{target:this.identity})).map((e=>this.fin.View.wrapSync(e)))}async getRootItem(){this.wire.sendAction("layout-get-root-item").catch((()=>{}));const e=await li(this,di,"f").getValue(),t=await e.getRoot("layoutName"in this.identity?this.identity:void 0);return fi.LayoutNode.getEntity(t,e)}async getStackByViewIdentity(e){this.wire.sendAction("layout-get-stack-by-view").catch((()=>{}));const t=await li(this,di,"f").getValue(),n=await t.getStackByView(e);if(!n)throw new Error(`No stack found for view: ${e.uuid}/${e.name}`);return fi.LayoutNode.getEntity(n,t)}async addView(e,{location:t,targetView:n}={}){this.wire.sendAction("layout-add-view").catch((e=>{}));const{identity:i}=await li(this,ci,"m",hi).call(this,"layout-add-view",{viewOptions:e,location:t,targetView:n});return{identity:i}}async closeView(e){this.wire.sendAction("layout-close-view").catch((e=>{})),await li(this,ci,"m",hi).call(this,"layout-close-view",{viewIdentity:e})}}Ln.Layout=mi,di=new WeakMap,ci=new WeakSet,hi=async function(e,t){return(await this.platform.getClient()).dispatch(e,{target:this.identity,opts:t})};var vi,Ci,bi,Ii,Ei,xi=s&&s.__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)},Ai=s&&s.__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};Object.defineProperty(kn,"__esModule",{value:!0}),kn.LayoutModule=void 0;const Pi=d,Mi=Ln,_i=ai;class Oi extends Pi.Base{constructor(){super(...arguments),vi.add(this),Ci.set(this,!1),bi.set(this,null),this.init=async(e={})=>{if(this.wire.sendAction("layout-init").catch((e=>{})),!this.wire.environment.layoutAllowedInContext(this.fin))throw new Error("Layout.init can only be called from a Window context.");if(xi(this,Ci,"f"))throw new Error("Layout.init was already called, please use Layout.create to add additional layouts.");"openfin"===this.wire.environment.type&&await this.fin.Platform.getCurrentSync().getClient(),Ai(this,Ci,!0,"f"),Ai(this,bi,await this.wire.environment.initLayoutManager(this.fin,this.wire,e),"f"),await this.wire.environment.applyLayoutSnapshot(this.fin,xi(this,bi,"f"),e);const t={name:this.fin.me.name,uuid:this.fin.me.uuid};if(!e.layoutManagerOverride){const e={layoutName:_i.DEFAULT_LAYOUT_KEY,...t};return xi(this,Ii,"f").call(this,e)}return this.wrapSync(t)},Ii.set(this,(e=>{const t="[Layout] You are using a deprecated property `layoutManager` - it will throw if you access it starting in v37.",n=new Proxy({},{get(e,n){throw console.warn(`[Layout-mgr-proxy] accessing ${n.toString()}`),new Error(t)}}),i=Object.assign(this.wrapSync(e),{layoutManager:n});return new Proxy(i,{get(e,n){if("layoutManager"===n)throw console.warn(`[Layout-proxy] accessing ${n.toString()}`),new Error(t);return e[n]}})})),this.getCurrentLayoutManagerSync=()=>xi(this,vi,"m",Ei).call(this,"fin.Platform.Layout.getCurrentLayoutManagerSync()"),this.create=async e=>this.wire.environment.createLayout(xi(this,vi,"m",Ei).call(this,"fin.Platform.Layout.create()"),e),this.destroy=async e=>this.wire.environment.destroyLayout(xi(this,vi,"m",Ei).call(this,"fin.Platform.Layout.destroy()"),e)}async wrap(e){return this.wire.sendAction("layout-wrap").catch((e=>{})),new Mi.Layout(e,this.wire)}wrapSync(e){return this.wire.sendAction("layout-wrap-sync").catch((e=>{})),new Mi.Layout(e,this.wire)}async getCurrent(){if(this.wire.sendAction("layout-get-current").catch((e=>{})),"openfin"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error("You are not in a Window context. Only Windows can have a Layout.");const{uuid:e,name:t}=this.fin.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction("layout-get-current-sync").catch((e=>{})),"openfin"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error("You are not in a Window context. Only Windows can have a Layout.");const{uuid:e,name:t}=this.fin.me;return this.wrapSync({uuid:e,name:t})}async getLayoutByViewIdentity(e){this.wire.sendAction("layout-get-by-view-identity").catch((()=>{}));let t=await this.wire.environment.getViewWindowIdentity(this.fin,e);t.identity&&(t=t.identity);try{const n=this.wrapSync(t),i=await Mi.Layout.getClient(n),r=await i.getLayoutIdentityForViewOrThrow(e);return this.wrapSync(r)}catch(n){if(!["No action registered at target for","getLayoutIdentityForViewOrThrow is not a function"].some((e=>n.message.includes(e))))throw n;if(t.uuid===t.name)throw new Error(`View identity ${JSON.stringify(e)} is not attached to any layout in provider window ${JSON.stringify(t)}.`);return this.wrapSync(t)}}}kn.LayoutModule=Oi,Ci=new WeakMap,bi=new WeakMap,Ii=new WeakMap,vi=new WeakSet,Ei=function(e){if(!xi(this,bi,"f"))throw new Error(`You must call init before using the API ${e}`);return xi(this,bi,"f")},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(kn,e),n(Ln,e)}(jn),Object.defineProperty(Pn,"__esModule",{value:!0}),Pn.PlatformModule=void 0;const Si=d,Ri=Mn,Fi=jn;class ji extends Si.Base{constructor(e,t){super(e),this._channel=t,this.Layout=new Fi.LayoutModule(this.wire)}async init(e){if(!fin.__internal_.isPlatform||fin.me.name!==fin.me.uuid)throw new Error("fin.Platform.init should only be called from a custom platform provider running in the main window of the application.");return this.wire.environment.initPlatform(this.fin,e)}async wrap(e){return this.wire.sendAction("platform-wrap").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}wrapSync(e){return this.wire.sendAction("platform-wrap-sync").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}async getCurrent(){return this.wire.sendAction("platform-get-current").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction("platform-get-current-sync").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}start(e){return this.wire.sendAction("platform-start").catch((e=>{})),new Promise((async(t,n)=>{try{const{uuid:n}=e,i=await this.fin.Application._create({...e,isPlatformController:!0});i.once("platform-api-ready",(()=>t(this.wrapSync({uuid:n})))),i._run({uuid:n})}catch(e){n(e)}}))}startFromManifest(e,t){return this.wire.sendAction("platform-start-from-manifest").catch((e=>{})),new Promise((async(n,i)=>{try{const i=await this.fin.Application._createFromManifest(e);i.once("platform-api-ready",(()=>n(this.wrapSync({uuid:i.identity.uuid})))),i._run(t)}catch(e){i(e)}}))}}Pn.PlatformModule=ji,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Pn,e),n(Mn,e)}(An);var ki={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getMe=e.getBaseMe=e.environmentUnsupportedMessage=void 0;const t=J(),n=un,i=ie(),r=rn;function o(e,t,n){return{...{isView:"view"===e,isWindow:"window"===e,isFrame:"iframe"===e,isExternal:"external connection"===e},uuid:t,name:n,entityType:e}}e.environmentUnsupportedMessage="You are not running in OpenFin.",e.getBaseMe=o,e.getMe=function(s){const{uuid:a,name:c,entityType:d}=s.me,h={setContext(){throw new Error(e.environmentUnsupportedMessage)},addContextHandler(){throw new Error(e.environmentUnsupportedMessage)},getContextGroups(){throw new Error(e.environmentUnsupportedMessage)},joinContextGroup(){throw new Error(e.environmentUnsupportedMessage)},removeFromContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getAllClientsInContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getInfoForContextGroup(){throw new Error(e.environmentUnsupportedMessage)}},l="Interop API has not been instantiated. Either connection has failed or you have not declared interop in your config.",u={setContext(){throw new Error(l)},addContextHandler(){throw new Error(l)},getContextGroups(){throw new Error(l)},joinContextGroup(){throw new Error(l)},removeFromContextGroup(){throw new Error(l)},getAllClientsInContextGroup(){throw new Error(l)},getInfoForContextGroup(){throw new Error(l)}},p={eventNames:()=>{throw new Error(e.environmentUnsupportedMessage)},emit:()=>{throw new Error(e.environmentUnsupportedMessage)},listeners:()=>{throw new Error(e.environmentUnsupportedMessage)},listenerCount:()=>{throw new Error(e.environmentUnsupportedMessage)},on:()=>{throw new Error(e.environmentUnsupportedMessage)},addListener:()=>{throw new Error(e.environmentUnsupportedMessage)},once:()=>{throw new Error(e.environmentUnsupportedMessage)},prependListener:()=>{throw new Error(e.environmentUnsupportedMessage)},prependOnceListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeAllListeners:()=>{throw new Error(e.environmentUnsupportedMessage)}};switch(d){case"view":return Object.assign(new t.View(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case"window":return Object.assign(new i._Window(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case"iframe":return Object.assign(new n._Frame(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case"external connection":return Object.assign(new r.ExternalApplication(s,{uuid:a}),o(d,a,c),{interop:u,isOpenFin:!1});default:return{...o(d,a,c),...p,interop:h,isOpenFin:!1}}}}(ki);var Li={},Ti={},$i={};Object.defineProperty($i,"__esModule",{value:!0}),$i.createWarningObject=$i.createUnusableObject=void 0,$i.createUnusableObject=function(e){const t=()=>{throw new Error(e)};return new Proxy({},{apply:t,construct:t,defineProperty:t,deleteProperty:t,get:t,getOwnPropertyDescriptor:t,getPrototypeOf:t,has:t,isExtensible:t,ownKeys:t,preventExtensions:t,set:t,setPrototypeOf:t})},$i.createWarningObject=function(e,t){return new Proxy(t,{get:(...t)=>(console.warn(e),Reflect.get(...t)),set:(...t)=>(console.warn(e),Reflect.set(...t)),getOwnPropertyDescriptor:(...t)=>(console.warn(e),Reflect.getOwnPropertyDescriptor(...t)),ownKeys:(...t)=>(console.warn(e),Reflect.ownKeys(...t))})};var Bi,Gi={},Wi={};var Hi={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.wrapIntentHandler=e.BROKER_ERRORS=e.generateOverrideWarning=e.generateOverrideError=e.wrapContextHandler=e.wrapInTryCatch=e.generateId=void 0;e.generateId=()=>`${Math.random()}${Date.now()}`;e.wrapInTryCatch=(e,t)=>(...n)=>{try{return e(...n)}catch(e){throw new Error((t||"")+e)}};e.wrapContextHandler=(e,t)=>async n=>{try{await e(n)}catch(e){throw console.error(`Error thrown by handler ${t} for context type ${n.type}: ${e}`),e}};e.generateOverrideError=(e,t)=>`You have tried to to use ${e} but ${t} has not been overridden in the Interop Broker. Please override this function. Refer to our documentation for more info.`;e.generateOverrideWarning=(e,t,n,i)=>{const{uuid:r,name:o}=n;return i?`Entity with identity: ${r}/${o} has called ${i} or ${e} but ${t} has not been overridden.`:`Entity with identity: ${r}/${o} has called ${e} but ${t} has not been overridden.`},e.BROKER_ERRORS={fireIntent:(0,e.generateOverrideError)("fireIntent","handleFiredIntent"),fireIntentForContext:(0,e.generateOverrideError)("fireIntentForContext","handleFiredIntentForContext"),getInfoForIntent:(0,e.generateOverrideError)("getInfoForIntent","handleInfoForIntent"),getInfoForIntentsByContext:(0,e.generateOverrideError)("getInfoForIntentsByContext","handleInfoForIntentsByContext"),joinSessionContextGroupWithJoinContextGroup:"The Context Group you have tried to join is a Session Context Group. Custom Context Groups can only be defined by the Interop Broker through code or manifest configuration. Please use joinSessionContextGroup.",fdc3Open:(0,e.generateOverrideError)("fdc3.open","fdc3HandleOpen"),fdc3FindInstances:(0,e.generateOverrideError)("fdc3.findInstances","fdc3HandleFindInstances"),fdc3GetAppMetadata:(0,e.generateOverrideError)("fdc3.getAppMetadata","fdc3HandleGetAppMetadata"),fdc3GetInfo:(0,e.generateOverrideError)("fdc3.getInfo","fdc3HandleGetInfo")};e.wrapIntentHandler=(e,t)=>async n=>{try{return e(n)}catch(e){throw console.error(`Error thrown by handler ${t}: ${e}`),e}}}(Hi);var Ni,Di,Ui={};function Vi(){if(Di)return Gi;Di=1;var e,t,n,r=s&&s.__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},o=s&&s.__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)},a=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Gi,"__esModule",{value:!0}),Gi.InteropBroker=void 0;const c=d,h=a(function(){if(Bi)return Wi;Bi=1,Object.defineProperty(Wi,"__esModule",{value:!0});const e=Cr();return Wi.default=class{constructor(e,t){this.provider=e,this.id=t,this.lastContext=void 0,this.contextGroupMap=new Map,this.clients=new Map,this.registerListeners()}registerListeners(){this.provider.register(`sessionContextGroup:getContext-${this.id}`,this.getCurrentContext.bind(this)),this.provider.register(`sessionContextGroup:setContext-${this.id}`,this.setContext.bind(this)),this.provider.register(`sessionContextGroup:handlerAdded-${this.id}`,this.handlerAdded.bind(this)),this.provider.register(`sessionContextGroup:handlerRemoved-${this.id}`,this.handlerRemoved.bind(this))}getCurrentContext(e){return e.type?this.contextGroupMap.get(e.type):this.lastContext}setContext(t,n){const{context:i}=t,r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name} not in Session Client State Map`);this.contextGroupMap.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{e.contextHandlers.get(i.type)?.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getClientState(e){return this.clients.get(e.endpointId)}async handlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(i){const e=r.contextHandlers.get(i)||[];r.contextHandlers.set(i,[...e,n]);const o=this.contextGroupMap.get(i);o&&await this.provider.dispatch(t,n,o)}else{r.globalHandler=n;const e=[...this.contextGroupMap.keys()].map((async e=>{const i=this.contextGroupMap.get(e);i&&await this.provider.dispatch(t,n,i)}));await Promise.all(e)}}handlerRemoved(e,t){const{handlerId:n}=e,i=this.clients.get(t.endpointId);i?(Array.from(i.contextHandlers).forEach((([,e])=>{const t=e.indexOf(n);t>-1&&e.splice(t,1)})),i.globalHandler===n&&(i.globalHandler=void 0)):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={contextHandlers:new Map,clientIdentity:e,globalHandler:void 0};this.clients.set(e.endpointId,t)}}onDisconnection(e){this.clients.delete(e.endpointId)}},Wi}()),l=Hi,u=a(i),p=function(){if(Ni)return Ui;Ni=1,Object.defineProperty(Ui,"__esModule",{value:!0}),Ui.PrivateChannelProvider=void 0;const e=Vi();return Ui.PrivateChannelProvider=class t{constructor(e,t){this.provider=e,this.id=t,this.clients=new Map,this.registerListeners(),this.contextByContextType=new Map,this.lastContext=void 0,this.provider.onConnection((e=>this.registerNewClient(e))),this.provider.onDisconnection((async e=>{const{endpointId:t}=e;this.clients.has(t)&&await this.handleClientDisconnecting(e),0===(await this.provider.getAllClientInfo()).length&&this.provider.destroy()}))}getClientState(e){return this.clients.get(e.endpointId)}registerListeners(){this.provider.register("broadcast",this.broadcast.bind(this)),this.provider.register("getCurrentContext",this.getCurrentContext.bind(this)),this.provider.register("contextHandlerAdded",this.contextHandlerAdded.bind(this)),this.provider.register("contextHandlerRemoved",this.contextHandlerRemoved.bind(this)),this.provider.register("nonStandardHandlerRemoved",this.nonStandardHandlerRemoved.bind(this)),this.provider.register("onAddContextHandlerAdded",this.onAddContextHandlerAdded.bind(this)),this.provider.register("onDisconnectHandlerAdded",this.onDisconnectHandlerAdded.bind(this)),this.provider.register("onUnsubscribeHandlerAdded",this.onUnsubscribeHandlerAdded.bind(this)),this.provider.register("clientDisconnecting",((e,t)=>{this.handleClientDisconnecting(t)}))}broadcast(t,n){const{context:i}=t;if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name}, tried to call broadcast, is not connected to this Private Channel`);const r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to broadcast - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);this.contextByContextType.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{const t=e.handlerIdsByContextTypes.get(i.type);t&&t.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getCurrentContext(e,t){const{contextType:n}=e;if(!this.getClientState(t))throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call getCurrentContext, is not connected to this Private Channel`);if(void 0!==n){return this.contextByContextType.get(n)||null}return this.lastContext?this.lastContext:null}contextHandlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call addContextListener, is not connected to this Private Channel`);if(i){const e=r.handlerIdsByContextTypes.get(i)||[];r.handlerIdsByContextTypes.set(i,[...e,n])}else r.globalHandler=n;Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&e.onAddContextListenerHandlerId&&this.provider.dispatch(e.clientIdentity,e.onAddContextListenerHandlerId,i)}))}async contextHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);if(i){let e;if(i.globalHandler===n)i.globalHandler=void 0;else for(const[t,r]of i.handlerIdsByContextTypes){const i=r.indexOf(n);i>-1&&(r.splice(i,1),e=t)}const r=(await this.getConnectedClients()).map((async n=>{const{clientIdentity:i,clientIdentity:{endpointId:r},onUnsubscribeHandlerId:o}=n;r!==t.endpointId&&o&&await this.provider.dispatch(i,o,e)}));try{await Promise.all(r)}catch(e){throw console.error(`Problem when attempting to dispatch to onUnsubscribeHandlers. Error: ${e} Removing Client: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}`),new Error(e)}}else console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}.`)}nonStandardHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);i?i.onDisconnectHandlerId===n?i.onDisconnectHandlerId=void 0:i.onAddContextListenerHandlerId===n?i.onAddContextListenerHandlerId=void 0:i.onUnsubscribeHandlerId===n&&(i.onUnsubscribeHandlerId=void 0):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}onAddContextHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onAddContextListener, is not connected to this Private Channel`);n.onAddContextListenerHandlerId=i,Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&Array.from(e.handlerIdsByContextTypes.keys()).forEach((e=>{this.provider.dispatch(t,i,e)}))}))}onDisconnectHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onDisconnect, is not connected to this Private Channel`);n.onDisconnectHandlerId=i}onUnsubscribeHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onUnsubscribe, is not connected to this Private Channel`);n.onUnsubscribeHandlerId=i}removeClient(e){const t=this.getClientState(e);if(!t)throw new Error(`Client with Identity: ${e.uuid} ${e.name}, tried to call disconnect, is not connected to this Private Channel`);t.handlerIdsByContextTypes.clear(),this.clients.delete(e.endpointId)}async fireOnDisconnectForOtherClients(e){const{endpointId:t}=e,n=(await this.getConnectedClients()).map((async e=>{const{clientIdentity:{endpointId:n},onDisconnectHandlerId:i}=e;n!==t&&i&&await this.provider.dispatch(e.clientIdentity,i)}));try{await Promise.all(n)}catch(t){throw console.error(`Problem when attempting to dispatch to onDisconnectHandlers. Error: ${t} Disconnecting Client: uuid: ${e.uuid}. name: ${e.name}. endpointId: ${e.endpointId}`),new Error(t)}}async unsubscribeAll(e){const{endpointId:t}=e,n=this.clients.get(t);if(n){const t=Array.from(n.handlerIdsByContextTypes.values()).flat(),i=n.globalHandler;if(t.length>0){const n=t.map((async t=>this.contextHandlerRemoved({handlerId:t},e)));try{await Promise.all(n)}catch(e){console.error(e.message)}}if(i)try{await this.contextHandlerRemoved({handlerId:i},e)}catch(e){console.error(e.message)}}}async handleClientDisconnecting(e){await this.unsubscribeAll(e),this.removeClient(e),await this.fireOnDisconnectForOtherClients(e)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={clientIdentity:e,handlerIdsByContextTypes:new Map,globalHandler:void 0,onAddContextListenerHandlerId:void 0,onUnsubscribeHandlerId:void 0,onDisconnectHandlerId:void 0};this.clients.set(e.endpointId,t)}}async getConnectedClients(){const e=await this.provider.getAllClientInfo();return Array.from(this.clients.values()).filter((t=>{const{uuid:n,name:i}=t.clientIdentity;return e.some((e=>i===e.name&&n===e.uuid))}))}static init(e,n){return new t(e,n)}},Ui}(),w=G,y=[{id:"green",displayMetadata:{color:"#00CC88",name:"green"}},{id:"purple",displayMetadata:{color:"#8C61FF",name:"purple"}},{id:"orange",displayMetadata:{color:"#FF8C4C",name:"orange"}},{id:"red",displayMetadata:{color:"#FF5E60",name:"red"}},{id:"pink",displayMetadata:{color:"#FF8FB8",name:"pink"}},{id:"yellow",displayMetadata:{color:"#E9FF8F",name:"yellow"}}];let f=class i extends c.Base{constructor(i,s,a){super(i),e.set(this,void 0),t.set(this,void 0),n.set(this,void 0),this.getProvider=()=>o(this,n,"f").getValue(),this.interopClients=new Map,this.contextGroupsById=new Map,r(this,t,a.contextGroups??[...y],"f"),r(this,e,a.fdc3Info,"f"),a?.logging&&(this.logging=a.logging),this.intentClientMap=new Map,this.lastContextMap=new Map,this.sessionContextGroupMap=new Map,r(this,n,new w.Lazy(s),"f"),this.setContextGroupMap(),this.setupChannelProvider()}static createClosedConstructor(...e){return class extends i{constructor(...t){if(t.length){const[n,i,r]=t;if(r&&"object"==typeof r&&!(0,u.default)(r,e[2]))return console.warn("You have modified the parameters of the InteropOverride constructor. This behavior is deprecated and will be removed in a future version. You can modify these options in your manifest. Please consult our Interop docs for guidance on migrating to the new override scheme."),void super(e[0],e[1],r);console.warn("You are attempting to pass arguments to the InteropOverride constructor. This is not necessary, and these passed arguments will be ignored. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.")}super(...e)}}}setContext({context:e},t){this.wire.sendAction("interop-broker-set-context").catch((e=>{}));const n=this.getClientState(t);if(!n||!n.contextGroupId)throw n?new Error("You must join a context group before you can set context."):new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);{const{contextGroupId:t}=n;this.setContextForGroup({context:e},t)}}setContextForGroup({context:e},t){this.wire.sendAction("interop-broker-set-context-for-group").catch((e=>{}));const n=this.contextGroupsById.get(t);if(!n)throw new Error(`Unable to set context for context group that isn't in the context group mapping: ${t}.`);const r=i.checkContextIntegrity(e);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(e)}`);const o=e.type;n.set(o,e),this.lastContextMap.set(t,o);Array.from(this.interopClients.values()).filter((e=>e.contextGroupId===t)).forEach((t=>{for(const[,n]of t.contextHandlers)i.isContextTypeCompatible(o,n.contextType)&&this.invokeContextHandler(t.clientIdentity,n.handlerId,e)}))}getCurrentContext(e,t){this.wire.sendAction("interop-broker-get-current-context").catch((e=>{}));const n=this.getClientState(t);if(!n?.contextGroupId)throw new Error("You must be a member of a context group to call getCurrentContext");const{contextGroupId:i}=n,r=this.contextGroupsById.get(i),o=this.lastContextMap.get(i),s=e?.contextType??o;return r&&s?r.get(s):void 0}async joinContextGroup({contextGroupId:e,target:t},n){if(this.wire.sendAction("interop-broker-join-context-group").catch((e=>{})),this.sessionContextGroupMap.has(e))throw new Error(l.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup);if(t){i.hasEndpointId(t)&&await this.addClientToContextGroup({contextGroupId:e},t);try{const n=this.channel.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name));if(!n.length)throw new Error(`Given Identity ${t.uuid} ${t.name} is not connected to the Interop Broker.`);n.length>1&&console.warn(`More than one connection found for identity ${t.uuid} ${t.name}`);const i=[];for(const t of n)i.push(this.addClientToContextGroup({contextGroupId:e},t));await Promise.all(i)}catch(e){throw new Error(e)}}else await this.addClientToContextGroup({contextGroupId:e},n)}async addClientToContextGroup({contextGroupId:e},t){this.wire.sendAction("interop-broker-add-client-to-context-group").catch((e=>{}));const n=this.getClientState(t);if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(!this.getContextGroups().find((t=>t.id===e)))throw new Error(`Attempting to join a context group that does not exist: ${e}. You may only join existing context groups.`);if(n.contextGroupId!==e){n.contextGroupId=e,await this.setCurrentContextGroupInClientOptions(t,e);const i=this.contextGroupsById.get(e);for(const[,e]of n.contextHandlers){const{contextType:n,handlerId:r}=e;if(void 0===n)i.forEach(((e,n)=>{this.invokeContextHandler(t,r,e)}));else if(i.has(n)){const e=i.get(n);e&&this.invokeContextHandler(t,r,e)}}}}async removeFromContextGroup({target:e},t){if(this.wire.sendAction("interop-broker-remove-from-context-group").catch((e=>{})),e){i.hasEndpointId(e)&&await this.removeClientFromContextGroup(e);try{const t=this.channel.connections.filter((t=>t.uuid===e.uuid&&t.name===e.name));if(!t.length)throw new Error(`No connection found for given Identity ${e.uuid} ${e.name}`);t.length>1&&console.warn(`More than one connection found for identity ${e.uuid} ${e.name}`);const n=[];for(const e of t)n.push(this.removeClientFromContextGroup(e));await Promise.all(n)}catch(e){throw new Error(e)}}else await this.removeClientFromContextGroup(t)}async removeClientFromContextGroup(e){this.wire.sendAction("interop-broker-remove-client-from-context-group").catch((e=>{}));const t=this.getClientState(e);t&&(t.contextGroupId=void 0),await this.setCurrentContextGroupInClientOptions(e,null)}getContextGroups(){return this.wire.sendAction("interop-broker-get-context-groups").catch((e=>{})),o(this,t,"f").map((e=>({...e})))}getInfoForContextGroup({contextGroupId:e}){return this.wire.sendAction("interop-broker-get-info-for-context-group").catch((e=>{})),this.getContextGroups().find((t=>t.id===e))}getAllClientsInContextGroup({contextGroupId:e}){this.wire.sendAction("interop-broker-get-all-clients-in-context-group").catch((e=>{}));return Array.from(this.interopClients.values()).filter((t=>t.contextGroupId===e)).map((e=>e.clientIdentity))}async handleFiredIntent(e,t){const n=(0,l.generateOverrideWarning)("fdc3.raiseIntent","InteropBroker.handleFiredIntent",t,"interopClient.fireIntent");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntent)}async setIntentTarget(e,t){this.wire.sendAction("interop-broker-set-intent-target").catch((e=>{}));const n=this.intentClientMap.get(t.name),i=`intent-handler-${e.name}`;if(n){const t=n.get(i);if(t){if(t.pendingIntents.push(e),t.clientIdentity&&t.isReady){const{clientIdentity:e,pendingIntents:n}=t;try{const r=n[n.length-1];await this.invokeIntentHandler(e,i,r),t.pendingIntents=[]}catch(n){console.error(`Error invoking intent handler for client ${e.uuid}/${e.name}/${e.endpointId}`),t.isReady=!1}}}else n.set(i,{isReady:!1,pendingIntents:[e]})}else{this.intentClientMap.set(t.name,new Map);const n=this.intentClientMap.get(t.name);n&&n.set(i,{isReady:!1,pendingIntents:[e]})}}async handleInfoForIntent(e,t){const n=(0,l.generateOverrideWarning)("fdc3.findIntent","InteropBroker.handleInfoForIntent",t,"interopClient.getInfoForIntent");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntent)}async handleInfoForIntentsByContext(e,t){const n=(0,l.generateOverrideWarning)("fdc3.findIntentsByContext","InteropBroker.handleInfoForIntentsByContext",t,"interopClient.getInfoForIntentsByContext");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntentsByContext)}async handleFiredIntentForContext(e,t){const n=(0,l.generateOverrideWarning)("fdc3.raiseIntentForContext","InteropBroker.handleFiredIntentForContext",t,"interopClient.fireIntentForContext");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntentForContext)}async clientDisconnected(e){}async fdc3HandleOpen({app:e,context:t},n){const i=(0,l.generateOverrideWarning)("fdc3.open","InteropBroker.fdc3HandleOpen",n);throw console.warn(i),new Error(l.BROKER_ERRORS.fdc3Open)}async fdc3HandleFindInstances(e,t){const n=(0,l.generateOverrideWarning)("fdc3.open","InteropBroker.fdc3HandleFindInstances",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3FindInstances)}async fdc3HandleGetAppMetadata(e,t){const n=(0,l.generateOverrideWarning)("fdc3.getAppMetadata","InteropBroker.fdc3HandleGetAppMetadata",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3GetAppMetadata)}async invokeContextHandler(e,t,n){const i=await this.getProvider();try{await i.dispatch(e,t,n)}catch(i){console.error(`Error invoking context handler ${t} for context type ${n.type} in client ${e.uuid}/${e.name}/${e.endpointId}`,i)}}async invokeIntentHandler(e,t,n){const i=await this.getProvider();await i.dispatch(e,t,n)}async fdc3HandleGetInfo(t,n){const{fdc3Version:i}=t;return{fdc3Version:i,...o(this,e,"f"),optionalFeatures:{OriginatingAppMetadata:!1,UserChannelMembershipAPIs:!0},appMetadata:{appId:"",instanceId:""}}}async getAllClientInfo(){return(await this.getProvider()).getAllClientInfo()}decorateSnapshot(e){return{...e,interopSnapshotDetails:{contextGroupStates:this.getContextGroupStates()}}}applySnapshot(e,t){const n=e?.interopSnapshotDetails?.contextGroupStates;n&&(t?.closeExistingWindows||this.updateExistingClients(n),this.rehydrateContextGroupStates(n))}updateExistingClients(e){this.interopClients.forEach((t=>{const{clientIdentity:n,contextGroupId:r,contextHandlers:o}=t;if(r){const t=e[r];for(const[,e]of Object.entries(t))o.forEach((t=>{const{handlerId:r,contextType:o}=t;i.isContextTypeCompatible(e.type,o)&&this.invokeContextHandler(n,r,e)}))}}))}getContextGroupStates(){return i.toObject(this.contextGroupsById)}rehydrateContextGroupStates(e){const t=Object.entries(e);for(const[e,n]of t){const t=Object.entries(n);for(const[n,i]of t)if(this.contextGroupsById.has(e)){this.contextGroupsById.get(e).set(n,i)}else console.warn(`Attempting to set a context group that isn't in the context group mapping. Skipping context group rehydration for: ${e}`)}}contextHandlerRegistered({contextType:e,handlerId:t},n){const i={contextType:e,handlerId:t},r=this.getClientState(n);if(r?.contextHandlers.set(t,i),r&&r.contextGroupId){const{contextGroupId:i}=r,o=this.contextGroupsById.get(i);if(void 0===e)o.forEach(((e,i)=>{this.invokeContextHandler(n,t,e)}));else if(o.has(e)){const i=o.get(e);i&&this.invokeContextHandler(n,t,i)}}}async intentHandlerRegistered(e,t){const{handlerId:n}=e,i=this.intentClientMap.get(t.name),r=i?.get(n);if(i)if(r){const{pendingIntents:e}=r;r.clientIdentity=t,r.isReady=!0;try{if(e.length>0){const i=e[e.length-1];await this.invokeIntentHandler(t,n,i),r.pendingIntents=[]}}catch(e){console.error(`Error invoking intent handler: ${n} for client ${t.uuid}/${t.name}/${t.endpointId}`)}}else i.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t});else{this.intentClientMap.set(t.name,new Map);const e=this.intentClientMap.get(t.name);e&&e.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t})}}removeContextHandler({handlerId:e},t){const n=this.getClientState(t);n&&n.contextHandlers.delete(e)}handleJoinSessionContextGroup({sessionContextGroupId:e},t){try{if(!e)throw new Error("Failed to join session context group: must specify group id.");const n=this.sessionContextGroupMap.get(e);if(n)n.registerNewClient(t);else{const n=new h.default(this.channel,e);n.registerNewClient(t),this.sessionContextGroupMap.set(e,n)}return{hasConflict:this.contextGroupsById.has(e)}}catch(e){throw new Error(e)}}getClientState(e){return this.interopClients.get(e.endpointId)}static toObject(e){const t=Object.fromEntries(e),n={};return Object.entries(t).forEach((([e,t])=>{const i=Object.fromEntries(t);n[e]=i})),n}static checkContextIntegrity(e){if(!e)return{isValid:!1,reason:"No context supplied"};if("object"!=typeof e)return{isValid:!1,reason:"Context must be an Object"};if(!e.type)return{isValid:!1,reason:"Context must have a type property"};if(e.id&&"object"!=typeof e.id)return{isValid:!1,reason:"Context id must be an Object populated with key-value identifiers (if set)"};if(e.id){const{id:t}=e,n=Object.keys(t);let i=!1;if(!n.length)return{isValid:!1,reason:"Context id must have at least one key-value identifier"};if(n.forEach((e=>{"string"==typeof e&&"string"==typeof t[e]||(i=!0)})),i)return{isValid:!1,reason:"Context id key-value identifiers must be of type string"}}return e.name&&"string"!=typeof e.name?{isValid:!1,reason:"Context name must be of string type (if set)"}:{isValid:!0}}static hasEndpointId(e){return void 0!==e.endpointId}static isContextTypeCompatible(e,t){return void 0===t||e===t}setContextGroupMap(){for(const e of this.getContextGroups())this.contextGroupsById.set(e.id,new Map)}async setCurrentContextGroupInClientOptions(e,t){try{const n=await this.fin.System.getEntityInfo(e.uuid,e.name);let i;"view"===n.entityType?i=await this.fin.View.wrap(e):"window"===n.entityType&&(i=await this.fin.Window.wrap(e)),i&&await i.updateOptions({interop:{currentContextGroup:t}})}catch(e){}}async setupChannelProvider(){try{const e=await this.getProvider();this.channel=e,this.wireChannel(e)}catch(e){throw new Error(`Error setting up Interop Broker Channel Provider: ${e}`)}}wireChannel(e){e.onConnection((async(e,t)=>{if(!await this.isConnectionAuthorized(e,t))throw new Error(`Connection not authorized for ${e.uuid}, ${e.name}`);if(!e.endpointId)throw new Error("Version too old to be compatible with Interop. Please upgrade your runtime to a more recent version.");const n={contextGroupId:void 0,contextHandlers:new Map,clientIdentity:e};t?.currentContextGroup&&this.contextGroupsById.has(t.currentContextGroup)&&(n.contextGroupId=t?.currentContextGroup),this.interopClients.set(e.endpointId,n)})),e.onDisconnection((e=>{this.interopClients.delete(e.endpointId);const t=this.intentClientMap.get(e.name);t&&e.uuid===this.fin.me.uuid&&t.forEach((e=>{e.isReady=!1})),this.sessionContextGroupMap.forEach((t=>{t.onDisconnection(e)})),this.clientDisconnected(e)})),e.beforeAction((async(e,t,n)=>{if(!await this.isActionAuthorized(e,t,n))throw new Error(`Action (${e}) not authorized for ${n.uuid}, ${n.name}`);this.logging?.beforeAction?.enabled&&console.log(e,t,n)})),e.afterAction(((e,t,n)=>{this.logging?.afterAction?.enabled&&console.log(e,t,n)})),e.register("setContext",this.setContext.bind(this)),e.register("fireIntent",this.handleFiredIntent.bind(this)),e.register("getCurrentContext",this.getCurrentContext.bind(this)),e.register("getInfoForIntent",this.handleInfoForIntent.bind(this)),e.register("getInfoForIntentsByContext",this.handleInfoForIntentsByContext.bind(this)),e.register("fireIntentForContext",this.handleFiredIntentForContext.bind(this)),e.register("getContextGroups",this.getContextGroups.bind(this)),e.register("joinContextGroup",this.joinContextGroup.bind(this)),e.register("removeFromContextGroup",this.removeFromContextGroup.bind(this)),e.register("getAllClientsInContextGroup",this.getAllClientsInContextGroup.bind(this)),e.register("getInfoForContextGroup",this.getInfoForContextGroup.bind(this)),e.register("contextHandlerRegistered",this.contextHandlerRegistered.bind(this)),e.register("intentHandlerRegistered",this.intentHandlerRegistered.bind(this)),e.register("removeContextHandler",this.removeContextHandler.bind(this)),e.register("sessionContextGroup:createIfNeeded",this.handleJoinSessionContextGroup.bind(this)),e.register("fdc3Open",this.fdc3HandleOpen.bind(this)),e.register("fdc3v2FindIntentsByContext",this.handleInfoForIntentsByContext.bind(this)),e.register("fdc3FindInstances",this.fdc3HandleFindInstances.bind(this)),e.register("fdc3GetAppMetadata",this.fdc3HandleGetAppMetadata.bind(this)),e.register("fdc3v2GetInfo",(async(e,t)=>this.fdc3HandleGetInfo.bind(this)(e,t))),e.register("createPrivateChannelProvider",(async e=>{const{channelId:t}=e,n=await this.fin.InterApplicationBus.Channel.create(t);p.PrivateChannelProvider.init(n,t)}))}isConnectionAuthorized(e,t){return this.wire.sendAction("interop-broker-is-connection-authorized").catch((e=>{})),Promise.resolve(!0)}isActionAuthorized(e,t,n){return this.wire.sendAction("interop-broker-is-action-authorized").catch((e=>{})),Promise.resolve(!0)}};return Gi.InteropBroker=f,e=new WeakMap,t=new WeakMap,n=new WeakMap,Gi}var zi,Ki={},qi={},Ji=s&&s.__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},Yi=s&&s.__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)};Object.defineProperty(qi,"__esModule",{value:!0});const Zi=d,Qi=Hi;class Xi extends Zi.Base{constructor(e,t,n){super(e),zi.set(this,void 0),this.id=n,Ji(this,zi,t,"f")}async setContext(e){this.wire.sendAction("interop-session-context-group-set-context").catch((e=>{}));return(await Yi(this,zi,"f")).dispatch(`sessionContextGroup:setContext-${this.id}`,{sessionContextGroupId:this.id,context:e})}async getCurrentContext(e){this.wire.sendAction("interop-session-context-group-get-context").catch((e=>{}));return(await Yi(this,zi,"f")).dispatch(`sessionContextGroup:getContext-${this.id}`,{sessionContextGroupId:this.id,type:e})}async addContextHandler(e,t){if(this.wire.sendAction("interop-session-context-group-add-handler").catch((e=>{})),"function"!=typeof e)throw new Error("Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");const n=await Yi(this,zi,"f");let i;return i=t?`sessionContextHandler:invoke-${this.id}-${t}-${(0,Qi.generateId)()}`:`sessionContextHandler:invoke-${this.id}`,n.register(i,(0,Qi.wrapContextHandler)(e,i)),await n.dispatch(`sessionContextGroup:handlerAdded-${this.id}`,{handlerId:i,contextType:t}),{unsubscribe:await this.createUnsubscribeCb(i)}}async createUnsubscribeCb(e){const t=await Yi(this,zi,"f");return async()=>{t.remove(e),await t.dispatch(`sessionContextGroup:handlerRemoved-${this.id}`,{handlerId:e})}}getUserInstance(){return{id:this.id,setContext:(0,Qi.wrapInTryCatch)(this.setContext.bind(this),"Failed to set context: "),getCurrentContext:(0,Qi.wrapInTryCatch)(this.getCurrentContext.bind(this),"Failed to get context: "),addContextHandler:(0,Qi.wrapInTryCatch)(this.addContextHandler.bind(this),"Failed to add context handler: ")}}}qi.default=Xi,zi=new WeakMap;var er={},tr={},nr={},ir={},rr=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),or=s&&s.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),sr=s&&s.__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)&&rr(t,e,n);return or(t,e),t};Object.defineProperty(ir,"__esModule",{value:!0}),ir.PrivateChannelClient=void 0;const ar=sr(Hi);var cr,dr;function hr(){if(cr)return tr;cr=1;var e,t=s&&s.__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)},n=s&&s.__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},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(tr,"__esModule",{value:!0}),tr.FDC3ModuleBase=void 0;const o=nr,a=Hi,c=wr(),d=r(i);return tr.FDC3ModuleBase=class{get client(){return t(this,e,"f").call(this)}get fin(){return this.wire.getFin()}constructor(t,i){this.wire=i,e.set(this,void 0),n(this,e,t,"f")}async broadcast(e){return this.wire.sendAction("fdc3-broadcast").catch((e=>{})),this.client.setContext(e)}async _open(e,t){this.wire.sendAction("fdc3-open").catch((e=>{}));try{return await c.InteropClient.ferryFdc3Call(this.client,"fdc3Open",{app:e,context:t})}catch(e){const t=e.message===a.BROKER_ERRORS.fdc3Open?"ResolverUnavailable":e.message;throw new Error(t)}}async _getChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:"system",...(0,o.getUnsupportedChannelApis)()})))}async getOrCreateChannel(e){this.wire.sendAction("fdc3-get-or-create-channel").catch((e=>{}));const t=(await this._getChannels()).find((t=>t.id===e));if(t)return{...t,type:"system",...(0,o.getUnsupportedChannelApis)()};try{const t=await this.client.joinSessionContextGroup(e);return(0,o.buildAppChannelObject)(t)}catch(e){throw console.error(e.message),new Error(o.ChannelError.CreationFailed)}}async getSystemChannels(){return this.wire.sendAction("fdc3-get-system-channels").catch((e=>{})),this._getChannels()}async joinChannel(e){this.wire.sendAction("fdc3-join-channel").catch((e=>{}));try{return await this.client.joinContextGroup(e)}catch(e){if(e.message===a.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup?console.error("The Channel you have tried to join is an App Channel. Custom Channels can only be defined by the Interop Broker through code or manifest configuration. Please use getOrCreateChannel."):console.error(e.message),e.message.startsWith("Attempting to join a context group that does not exist"))throw new Error(o.ChannelError.NoChannelFound);throw new Error(o.ChannelError.AccessDenied)}}async getCurrentChannel(){this.wire.sendAction("fdc3-get-current-channel").catch((e=>{}));const e=await this.getCurrentContextGroupInfo();return e?this.buildChannelObject(e):null}async leaveCurrentChannel(){return this.wire.sendAction("fdc3-leave-current-channel").catch((e=>{})),this.client.removeFromContextGroup()}async getCurrentContextGroupInfo(){const e=await this.client.getContextGroups(),t=e.map((async e=>this.client.getAllClientsInContextGroup(e.id))),n=(await Promise.all(t)).findIndex((e=>e.some((e=>{const{uuid:t,name:n}=e;return this.wire.me.uuid===t&&this.wire.me.name===n}))));return e[n]}async buildChannelObject(e){return{...e,type:"system",addContextListener:(...[e,t])=>{let n,i;"function"==typeof e?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),n=e):(n=t,"string"==typeof e&&(i=e));const r=(async()=>{let e=!0;const t=await this.client.getCurrentContext(i);return this.client.addContextHandler(((i,r)=>{if(!e||(e=!1,!(0,d.default)(t,i)))return n(i,r)}),i)})();return{...r,unsubscribe:()=>r.then((e=>e.unsubscribe()))}},broadcast:this.broadcast.bind(this),getCurrentContext:async e=>{const t=await this.client.getCurrentContext(e);return void 0===t?null:t}}}},e=new WeakMap,tr}ir.PrivateChannelClient=class{constructor(e,t){this.id=t,this.client=e,this.listeners=new Map}async broadcast(e){return this.client.dispatch("broadcast",{context:e})}async getCurrentContext(e){return this.client.dispatch("getCurrentContext",{contextType:e})}async addContextListener(e,t){if("function"!=typeof t)throw new Error("Non-function argument passed to the second parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");let n;n=e?`contextHandler:invoke-${this.id}-${e}-${ar.generateId()}`:`contextHandler:invoke-${this.id}-${ar.generateId()}`,this.client.register(n,ar.wrapContextHandler(t,n));const i={unsubscribe:await this.createContextUnsubscribeCb(n)};return this.listeners.set(n,i),await this.client.dispatch("contextHandlerAdded",{handlerId:n,contextType:e}),i}createNonStandardUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch("nonStandardHandlerRemoved",{handlerId:e})}}createContextUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch("contextHandlerRemoved",{handlerId:e})}}onAddContextListener(e){const t=`onContextHandlerAdded:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch("onAddContextHandlerAdded",{handlerId:t}),n}onDisconnect(e){const t=`onDisconnect:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch("onDisconnectHandlerAdded",{handlerId:t}),n}onUnsubscribe(e){const t=`onUnsubscribe:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch("onUnsubscribeHandlerAdded",{handlerId:t}),n}async cleanUpAllSubs(){Array.from(this.listeners.keys()).forEach((e=>{this.client.remove(e),this.listeners.delete(e)}))}async disconnect(){try{await this.client.dispatch("clientDisconnecting"),await this.cleanUpAllSubs(),await this.client.disconnect()}catch(e){throw new Error(e.message)}}},function(e){var t=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.getIntentResolution=e.isChannel=e.isContext=e.connectPrivateChannel=e.buildAppChannelObject=e.buildPrivateChannelObject=e.ChannelError=e.ResultError=e.UnsupportedChannelApiError=e.getUnsupportedChannelApis=void 0;const n=Hi,r=ir,o=t(i);e.getUnsupportedChannelApis=e=>({addContextListener:()=>{throw new a("Channel.addContextListener",e)},broadcast:()=>{throw new a("Channel.broadcast",e)},getCurrentContext:()=>{throw new a("Channel.getCurrentContext",e)}});class a extends Error{constructor(e,t="System"){super(e),this.message=`Calling ${e} on an instance of a ${t} Channel returned by fdc3.get${t}Channels is not supported. If you would like to use a ${t} Channel, please use fdc3.joinChannel, fdc3.addContextListener, and fdc3.broadcast instead.`}}var c,d;e.UnsupportedChannelApiError=a,function(e){e.NoResultReturned="NoResultReturned",e.IntentHandlerRejected="IntentHandlerRejected"}(c=e.ResultError||(e.ResultError={})),(d=e.ChannelError||(e.ChannelError={})).NoChannelFound="NoChannelFound",d.AccessDenied="AccessDenied",d.CreationFailed="CreationFailed";e.buildPrivateChannelObject=e=>{let t=!1;const n=()=>{if(t)throw new Error("Private Channel Client has been disconnected from the Private Channel")};return{id:e.id,type:"private",broadcast:async t=>(n(),e.broadcast(t)),getCurrentContext:async t=>(n(),e.getCurrentContext(t)),addContextListener:async(t,i)=>{n();let r=i,o=t;"function"==typeof t&&(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),r=t,o=null);return e.addContextListener(o,r)},onAddContextListener:t=>(n(),e.onAddContextListener(t)),disconnect:async()=>(n(),t=!0,e.disconnect()),onDisconnect:t=>(n(),e.onDisconnect(t)),onUnsubscribe:t=>(n(),e.onUnsubscribe(t))}};e.buildAppChannelObject=e=>({id:e.id,type:"app",broadcast:e.setContext,getCurrentContext:async t=>{const n=await e.getCurrentContext(t);return void 0===n?null:n},addContextListener:(t,n)=>{let i,r;"function"==typeof t?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),i=t):(i=n,"string"==typeof t&&(r=t));const s=(async()=>{let t=!0;const n=await e.getCurrentContext(r);return e.addContextHandler(((e,r)=>{if(!t||(t=!1,!(0,o.default)(n,e)))return i(e,r)}),r)})();return{...s,unsubscribe:()=>s.then((e=>e.unsubscribe()))}}});e.connectPrivateChannel=async t=>{try{const n=await fin.InterApplicationBus.Channel.connect(t),i=new r.PrivateChannelClient(n,t);return(0,e.buildPrivateChannelObject)(i)}catch(e){throw new Error(`Private Channel with id: ${t} doesn't exist`)}};e.isContext=e=>{if(e&&"object"==typeof e&&"type"in e){const{type:t}=e;return"string"==typeof t}return!1};e.isChannel=e=>{if(e&&"object"==typeof e&&"type"in e&&"id"in e){const{type:t,id:n}=e;return"string"==typeof t&&"string"==typeof n&&("app"===t||"private"===t)}return!1};e.getIntentResolution=async(t,i,r,o)=>{const s=(0,n.generateId)(),a=new Promise(((e,t)=>{fin.InterApplicationBus.subscribe({uuid:"*"},s,(t=>{e(t)})).catch((()=>t(new Error("getResult is not supported in this environment"))))})),d=r?{target:r,intentResolutionResultId:s}:{intentResolutionResultId:s},h=o?{name:o,context:i,metadata:d}:{...i,metadata:d},l=async()=>{let n=await a;if(!n||"object"!=typeof n)throw new Error(c.NoResultReturned);const{error:i}=n;if(i)throw new Error(c.IntentHandlerRejected);if((0,e.isChannel)(n)){const{id:i,type:r}=n;switch(r){case"private":n=await(0,e.connectPrivateChannel)(i);break;case"app":{const r=await t.joinSessionContextGroup(i);n=(0,e.buildAppChannelObject)(r);break}}}else if(!(0,e.isContext)(n))throw new Error(c.NoResultReturned);return n},u=o?await t.fireIntent(h):await t.fireIntentForContext(h);return"object"!=typeof u?{source:{appId:"",instanceId:""},intent:"",version:"2.0",getResult:l}:{...u,getResult:l}}}(nr);var lr,ur,pr={};function wr(){if(ur)return Ki;ur=1;var e,t,n=s&&s.__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},i=s&&s.__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)},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ki,"__esModule",{value:!0}),Ki.InteropClient=void 0;const o=d,a=r(qi),c=function(){if(dr)return er;dr=1,Object.defineProperty(er,"__esModule",{value:!0}),er.Fdc3Module=void 0;const e=Hi,t=hr();class n extends t.FDC3ModuleBase{async open(e,t){await super._open(e,t)}addContextListener(e,t){let n;return this.wire.sendAction("fdc3-add-context-listener").catch((e=>{})),"function"==typeof e?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),n=this.client.addContextHandler(e)):n=this.client.addContextHandler(t,null===e?void 0:e),{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}addIntentListener(e,t){this.wire.sendAction("fdc3-add-intent-listener").catch((e=>{}));const n=this.client.registerIntentHandler((e=>{const{context:n,metadata:i}=e,{metadata:r}=n,o=i?.intentResolutionResultId||r?.intentResolutionResultId;o&&this.fin.InterApplicationBus.publish(o,null).catch((()=>null)),t(e.context)}),e,{fdc3Version:"1.2"});return{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}async raiseIntent(t,n,i){this.wire.sendAction("fdc3-raise-intent").catch((e=>{}));const r=i?{name:t,context:n,metadata:{target:i}}:{name:t,context:n};try{return await this.client.fireIntent(r)}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntent?"ResolverUnavailable":t.message;throw new Error(n)}}async findIntent(t,n){this.wire.sendAction("fdc3-find-intent").catch((e=>{}));try{return await this.client.getInfoForIntent({name:t,context:n})}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntent?"ResolverUnavailable":t.message;throw new Error(n)}}async findIntentsByContext(t){this.wire.sendAction("fdc3-find-intents-by-context").catch((e=>{}));try{return await this.client.getInfoForIntentsByContext(t)}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntentsByContext?"ResolverUnavailable":t.message;throw new Error(n)}}async raiseIntentForContext(t,n){this.wire.sendAction("fdc3-raise-intent-for-context").catch((e=>{}));try{return await this.client.fireIntentForContext({...t,metadata:{target:n}})}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntentForContext?"ResolverUnavailable":t.message;throw new Error(n)}}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}getInfo(){return this.wire.sendAction("fdc3-get-info").catch((e=>{})),{providerVersion:this.wire.environment.getAdapterVersionSync(),provider:`openfin-${this.wire.me.uuid}`,fdc3Version:"1.2"}}}return er.Fdc3Module=n,er}(),h=function(){if(lr)return pr;lr=1,Object.defineProperty(pr,"__esModule",{value:!0}),pr.Fdc3Module2=void 0;const e=hr(),t=Hi,n=wr(),i=nr,r=ir;class o extends e.FDC3ModuleBase{async open(e,t){return"string"==typeof e&&console.warn("Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string })."),super._open(e,t)}async findInstances(e){this.wire.sendAction("fdc3-find-instances").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,"fdc3FindInstances",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3FindInstances?"ResolverUnavailable":e.message;throw new Error(n)}}async getAppMetadata(e){this.wire.sendAction("fdc3-get-app-metadata").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,"fdc3GetAppMetadata",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3GetAppMetadata?"ResolverUnavailable":e.message;throw new Error(n)}}async addContextListener(e,t){this.wire.sendAction("fdc3-add-context-listener").catch((e=>{}));const n=e=>t=>{const{contextMetadata:n,...i}=t,r=n?[{...i},n]:[t,null];e(...r)};let i=t,r=n(i);return"function"==typeof e?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),i=e,r=n(i),this.client.addContextHandler(r)):this.client.addContextHandler(r,null===e?void 0:e)}async findIntent(e,n,i){this.wire.sendAction("fdc3-find-intent").catch((e=>{}));try{return await this.client.getInfoForIntent({name:e,context:n,metadata:{resultType:i}})}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntent?"ResolverUnavailable":e.message;throw new Error(n)}}async findIntentsByContext(e,i){this.wire.sendAction("fdc3-find-intents-by-context").catch((e=>{}));const r=i?{context:e,metadata:{resultType:i}}:e;try{return await n.InteropClient.ferryFdc3Call(this.client,"fdc3v2FindIntentsByContext",r)}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntentsByContext?"ResolverUnavailable":e.message;throw new Error(n)}}async raiseIntent(e,n,r){this.wire.sendAction("fdc3-raise-intent").catch((e=>{}));try{return"string"==typeof r&&console.warn("Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string })."),(0,i.getIntentResolution)(this.client,n,r,e)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?"ResolverUnavailable":e.message;throw new Error(n)}}async raiseIntentForContext(e,n){this.wire.sendAction("fdc3-raise-intent-for-context").catch((e=>{}));try{return"string"==typeof n&&console.warn("Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string })."),(0,i.getIntentResolution)(this.client,e,n)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?"ResolverUnavailable":e.message;throw new Error(n)}}async addIntentListener(e,t){if(this.wire.sendAction("fdc3-add-intent-listener").catch((e=>{})),"string"!=typeof e)throw new Error("First argument must be an Intent name");return this.client.registerIntentHandler((async e=>{let n,i;const{context:r,metadata:o}=e,{contextMetadata:s,metadata:a,...c}=r,d=o?.intentResolutionResultId||a?.intentResolutionResultId;try{const e=a?{metadata:a,...c}:{...c};n=await t(e,s),i=n}catch(e){n=e,i={error:!0}}if(d&&this.fin.InterApplicationBus.publish(d,i).catch((()=>null)),n instanceof Error)throw new Error(n.message);return n}),e,{fdc3Version:"2.0"})}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}async createPrivateChannel(){const e=(0,t.generateId)();await n.InteropClient.ferryFdc3Call(this.client,"createPrivateChannelProvider",{channelId:e});const o=await this.fin.InterApplicationBus.Channel.connect(e),s=new r.PrivateChannelClient(o,e);return(0,i.buildPrivateChannelObject)(s)}async getUserChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:"user",...(0,i.getUnsupportedChannelApis)("User")})))}async getSystemChannels(){return console.warn("This API has been deprecated. Please use fdc3.getUserChannels instead."),super.getSystemChannels()}async joinUserChannel(e){return super.joinChannel(e)}async joinChannel(e){return console.warn("This API has been deprecated. Please use fdc3.joinUserChannel instead."),super.joinChannel(e)}async getCurrentChannel(){const e=await super.getCurrentChannel();return e?{...e,type:"user",broadcast:this.broadcast.bind(this)}:null}async getInfo(){return n.InteropClient.ferryFdc3Call(this.client,"fdc3v2GetInfo",{fdc3Version:"2.0"})}}return pr.Fdc3Module2=o,pr}(),l=Hi;let u=class extends o.Base{constructor(i,r){super(i),e.set(this,void 0),t.set(this,void 0),n(this,t,new Map,"f"),n(this,e,r,"f")}async setContext(t){this.wire.sendAction("interop-client-set-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("setContext",{context:t})}async addContextHandler(t,n){if(this.wire.sendAction("interop-client-add-context-handler").catch((e=>{})),"function"!=typeof t)throw new Error("Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");const r=await i(this,e,"f");let o;o=n?`invokeContextHandler-${n}-${(0,l.generateId)()}`:"invokeContextHandler";const s=(0,l.wrapContextHandler)(t,o);return r.register(o,s),await r.dispatch("contextHandlerRegistered",{handlerId:o,contextType:n}),{unsubscribe:async()=>{r.remove(o),await r.dispatch("removeContextHandler",{handlerId:o})}}}async getContextGroups(){this.wire.sendAction("interop-client-get-context-groups").catch((e=>{}));return(await i(this,e,"f")).dispatch("getContextGroups")}async joinContextGroup(t,n){this.wire.sendAction("interop-client-join-context-group").catch((e=>{}));const r=await i(this,e,"f");if(!t)throw new Error("No contextGroupId specified for joinContextGroup.");return r.dispatch("joinContextGroup",{contextGroupId:t,target:n})}async removeFromContextGroup(t){this.wire.sendAction("interop-client-remove-from-context-group").catch((e=>{}));return(await i(this,e,"f")).dispatch("removeFromContextGroup",{target:t})}async getAllClientsInContextGroup(t){this.wire.sendAction("interop-client-get-all-clients-in-context-group").catch((e=>{}));const n=await i(this,e,"f");if(!t)throw new Error("No contextGroupId specified for getAllClientsInContextGroup.");return n.dispatch("getAllClientsInContextGroup",{contextGroupId:t})}async getInfoForContextGroup(t){this.wire.sendAction("interop-client-get-info-for-context-group").catch((e=>{}));const n=await i(this,e,"f");if(!t)throw new Error("No contextGroupId specified for getInfoForContextGroup.");return n.dispatch("getInfoForContextGroup",{contextGroupId:t})}async fireIntent(t){this.wire.sendAction("interop-client-fire-intent").catch((e=>{}));return(await i(this,e,"f")).dispatch("fireIntent",t)}async registerIntentHandler(t,n,r){this.wire.sendAction("interop-client-register-intent-handler").catch((e=>{}));const o=await i(this,e,"f"),s=`intent-handler-${n}`,a=(0,l.wrapIntentHandler)(t,s);try{await o.register(s,a),await o.dispatch("intentHandlerRegistered",{handlerId:s,...r})}catch(e){throw new Error("Unable to register intent handler")}return{unsubscribe:async()=>{o.remove(s)}}}async getCurrentContext(t){this.wire.sendAction("interop-client-get-current-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("getCurrentContext",{contextType:t})}async getInfoForIntent(t){this.wire.sendAction("interop-client-get-info-for-intent").catch((e=>{}));return(await i(this,e,"f")).dispatch("getInfoForIntent",t)}async getInfoForIntentsByContext(t){this.wire.sendAction("interop-client-get-info-for-intents-by-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("getInfoForIntentsByContext",t)}async fireIntentForContext(t){this.wire.sendAction("interop-client-fire-intent-for-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("fireIntentForContext",t)}async joinSessionContextGroup(n){try{const r=i(this,t,"f").get(n);if(r)return r.getUserInstance();const o=await i(this,e,"f"),{hasConflict:s}=await o.dispatch("sessionContextGroup:createIfNeeded",{sessionContextGroupId:n});s&&console.warn(`A (non-session) context group with the name "${n}" already exists. If you are trying to join a Context Group, call joinContextGroup instead.`);const c=new a.default(this.wire,i(this,e,"f"),n);return i(this,t,"f").set(n,c),c.getUserInstance()}catch(e){throw console.error(`Error thrown trying to create Session Context Group with id "${n}": ${e}`),e}}async onDisconnection(t){this.wire.sendAction("interop-client-add-ondisconnection-listener").catch((e=>{}));return(await i(this,e,"f")).onDisconnection((e=>{const{uuid:n}=e;t({type:"interop-broker",topic:"disconnected",brokerName:n})}))}getFDC3Sync(e){switch(e){case"1.2":return new c.Fdc3Module((()=>this),this.wire);case"2.0":return new h.Fdc3Module2((()=>this),this.wire);default:throw new Error(`Invalid FDC3 version provided: ${e}. Must be '1.2' or '2.0'`)}}async getFDC3(e){return this.getFDC3Sync(e)}static async ferryFdc3Call(t,n,r){return(await i(t,e,"f")).dispatch(n,r||null)}};return Ki.InteropClient=u,e=new WeakMap,t=new WeakMap,Ki}var yr,fr,gr,mr={};function vr(){if(yr)return mr;yr=1,Object.defineProperty(mr,"__esModule",{value:!0}),mr.overrideCheck=mr.checkFDC32Overrides=mr.getDefaultViewFdc3VersionFromAppInfo=void 0;const e=Vi();function t(t){return["fdc3HandleFindInstances","handleInfoForIntent","handleInfoForIntentsByContext","fdc3HandleGetAppMetadata","fdc3HandleGetInfo","fdc3HandleOpen","handleFiredIntent","handleFiredIntentForContext"].filter((n=>t[n]===e.InteropBroker.prototype[n]))}return mr.getDefaultViewFdc3VersionFromAppInfo=function({manifest:e,initialOptions:t}){const n=e?.platform?.defaultViewOptions?.fdc3InteropApi??t.defaultViewOptions?.fdc3InteropApi;return["1.2","2.0"].includes(n??"")?n:void 0},mr.checkFDC32Overrides=t,mr.overrideCheck=function(e,n){if(n&&"2.0"===n){const n=t(e);n.length>0&&console.warn(`WARNING: FDC3 2.0 has been set as a default option for Views in this Platform, but the required InteropBroker APIs for FDC3 2.0 compliance have not all been overridden.\nThe following APIs need to be overridden:\n${n.join("\n")}`)}},mr}function Cr(){return gr||(gr=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),i=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),i(function(){if(fr)return Ti;fr=1;var e=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ti,"__esModule",{value:!0}),Ti.InteropModule=void 0;const t=e(n),i=$i,r=d,o=Vi(),a=wr(),c=vr(),h=Tn,l=e=>new e,u="You have attempted to use or modify InteropBroker parameters, which is not allowed. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.";class p extends r.Base{async init(e,n=l){this.wire.sendAction("interop-init").catch((()=>{}));const r=await this.wire.environment.getInteropInfo(this.wire.getFin()),s=(0,i.createUnusableObject)(u),a=(0,i.createWarningObject)(u,(0,t.default)(r)),d=async()=>{throw new Error(u)},p=o.InteropBroker.createClosedConstructor(this.wire,(()=>this.fin.InterApplicationBus.Channel.create(`interop-broker-${e}`)),r);let w;return w=Array.isArray(n)?new((0,h.overrideFromComposables)(...n)(p))(s,d,a):await n(p,s,d,a),(0,c.overrideCheck)(w,r.fdc3Version),w}connectSync(e,t){return this.wire.sendAction("interop-connect-sync").catch((()=>{})),new a.InteropClient(this.wire,this.wire.environment.whenReady().then((()=>this.fin.InterApplicationBus.Channel.connect(`interop-broker-${e}`,{payload:t}))))}}return Ti.InteropModule=p,Ti}(),e),i(wr(),e),i(Vi(),e)}(Li)),Li}var br={},Ir={},Er={},xr={};Object.defineProperty(xr,"__esModule",{value:!0}),xr.getSnapshotSourceChannelName=void 0;xr.getSnapshotSourceChannelName=e=>`snapshot-source-provider-${e.uuid}`;var Ar,Pr,Mr,_r,Or,Sr=s&&s.__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},Rr=s&&s.__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)};Object.defineProperty(Er,"__esModule",{value:!0}),Er.SnapshotSource=void 0;const Fr=d,jr=xr,kr=new Map;class Lr extends Fr.Base{constructor(e,t){super(e),Ar.set(this,void 0),Pr.set(this,(()=>(kr.has(this.identity.uuid)||kr.set(this.identity.uuid,{eventFired:null,clientPromise:null}),kr.get(this.identity.uuid)))),Mr.set(this,(()=>(Rr(this,Pr,"f").call(this).clientPromise||(Rr(this,Pr,"f").call(this).clientPromise=Rr(this,_r,"f").call(this)),Rr(this,Pr,"f").call(this).clientPromise))),_r.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);try{Rr(this,Pr,"f").call(this).eventFired||await Rr(this,Or,"f").call(this);const t=await this.fin.InterApplicationBus.Channel.connect(e,{wait:!1});return t.onDisconnection((()=>{Rr(this,Pr,"f").call(this).clientPromise=null,Rr(this,Pr,"f").call(this).eventFired=null})),t}catch(e){throw Rr(this,Pr,"f").call(this).clientPromise=null,new Error("The targeted SnapshotSource is not currently initialized. Await this object's ready() method.")}})),Or.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);let t,n;const i=new Promise(((e,i)=>{t=e,n=i}));Rr(this,Pr,"f").call(this).eventFired=i;const r=async i=>{try{i.channelName===e&&(t(),await this.fin.InterApplicationBus.Channel.removeListener("connected",r))}catch(e){n(e)}};await this.fin.InterApplicationBus.Channel.on("connected",r)})),Sr(this,Ar,t,"f")}get identity(){return Rr(this,Ar,"f")}async ready(){this.wire.sendAction("snapshot-source-ready").catch((e=>{}));try{await Rr(this,Mr,"f").call(this)}catch(e){await Rr(this,Pr,"f").call(this).eventFired}}async getSnapshot(){this.wire.sendAction("snapshot-source-get-snapshot").catch((e=>{}));const e=await Rr(this,Mr,"f").call(this),t=await e.dispatch("get-snapshot");return(await t).snapshot}async applySnapshot(e){this.wire.sendAction("snapshot-source-apply-snapshot").catch((e=>{}));return(await Rr(this,Mr,"f").call(this)).dispatch("apply-snapshot",{snapshot:e})}}Er.SnapshotSource=Lr,Ar=new WeakMap,Pr=new WeakMap,Mr=new WeakMap,_r=new WeakMap,Or=new WeakMap,Object.defineProperty(Ir,"__esModule",{value:!0}),Ir.SnapshotSourceModule=void 0;const Tr=d,$r=Er,Br=xr;class Gr extends Tr.Base{async init(e){if(this.wire.sendAction("snapshot-source-init").catch((e=>{})),"object"!=typeof e||"function"!=typeof e.getSnapshot||"function"!=typeof e.applySnapshot)throw new Error("you must pass in a valid SnapshotProvider");const t=await this.fin.InterApplicationBus.Channel.create((0,Br.getSnapshotSourceChannelName)(this.fin.me));t.register("get-snapshot",(async()=>({snapshot:await e.getSnapshot()}))),t.register("apply-snapshot",(({snapshot:t})=>e.applySnapshot(t)))}wrapSync(e){return this.wire.sendAction("snapshot-source-wrap-sync").catch((e=>{})),new $r.SnapshotSource(this.wire,e)}async wrap(e){return this.wire.sendAction("snapshot-source-wrap").catch((e=>{})),this.wrapSync(e)}}Ir.SnapshotSourceModule=Gr,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Ir,e),n(Er,e)}(br),Object.defineProperty(a,"__esModule",{value:!0});var Wr=a.Fin=void 0;const Hr=t,Nr=c,Dr=ie(),Ur=Z(),Vr=de,zr=en,Kr=rn,qr=un,Jr=bn,Yr=J(),Zr=An,Qr=ki,Xr=Cr(),eo=br;class to extends Hr.EventEmitter{constructor(e){super(),this.wire=e,this.System=new Nr.System(e),this.Window=new Dr._WindowModule(e),this.Application=new Ur.ApplicationModule(e),this.InterApplicationBus=new Vr.InterApplicationBus(e),this.Clipboard=new zr.Clipboard(e),this.ExternalApplication=new Kr.ExternalApplicationModule(e),this.Frame=new qr._FrameModule(e),this.GlobalHotkey=new Jr.GlobalHotkey(e),this.Platform=new Zr.PlatformModule(e,this.InterApplicationBus.Channel),this.View=new Yr.ViewModule(e),this.Interop=new Xr.InteropModule(e),this.SnapshotSource=new eo.SnapshotSourceModule(e),e.registerFin(this),this.me=(0,Qr.getMe)(e),e.on("disconnected",(()=>{this.emit("disconnected")}))}}Wr=a.Fin=to;var no={},io={};function ro(e){return"string"==typeof e.manifestUrl}function oo(e){return ao(e)&&"string"==typeof e.address}function so(e){return oo(e)&&"string"==typeof e.token}function ao(e){return"string"==typeof e.uuid}function co(e){return e.runtime&&"string"==typeof e.runtime.version}function ho(e){return ao(e)&&co(e)}Object.defineProperty(io,"__esModule",{value:!0}),io.isInternalConnectConfig=io.isPortDiscoveryConfig=io.isNewConnectConfig=io.isConfigWithReceiver=io.isRemoteConfig=io.isExistingConnectConfig=io.isExternalConfig=void 0,io.isExternalConfig=ro,io.isExistingConnectConfig=oo,io.isRemoteConfig=so,io.isConfigWithReceiver=function(e){return"object"==typeof e.receiver&&so({...e,address:""})},io.isNewConnectConfig=ho,io.isPortDiscoveryConfig=function(e){return ro(e)&&co(e)||ho(e)},io.isInternalConnectConfig=function(e){return oo(e)||ho(e)};var lo={},uo={};Object.defineProperty(uo,"__esModule",{value:!0}),uo.EmitterMap=void 0;const po=t;function wo(e){return Buffer.from(e).toString("base64")}uo.EmitterMap=class{constructor(){this.storage=new Map}hashKeys(e){return e.map(wo).join("/")}getOrCreate(e){const t=this.hashKeys(e);return this.storage.has(t)||this.storage.set(t,new po.EventEmitter),this.storage.get(t)}has(e){return this.storage.has(this.hashKeys(e))}delete(e){const t=this.hashKeys(e);return this.storage.delete(t)}},Object.defineProperty(lo,"__esModule",{value:!0});const yo=uo;class fo extends yo.EmitterMap{constructor(){super(...arguments),this.dispatchEvent=e=>{if(function(e){return"process-desktop-event"===e.action}(e)){const{payload:t}=e,n=function(e){const{topic:t}=e;if("frame"===t||"window"===t||"view"===t){const{uuid:n,name:i}=e;return[t,n,i]}if("application"===t){const{uuid:n}=e;return[t,n]}return[t]}(t);if(this.has(n))return this.getOrCreate(n).emit(t.type,t),!0}return!1}}}lo.default=fo;var go,mo,vo=s&&s.__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},Co=s&&s.__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)},bo=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(no,"__esModule",{value:!0});var Io=no.Transport=void 0;const Eo=t,xo=io,Ao=g,Po=bo(lo),Mo=ki,_o=ke;class Oo extends Eo.EventEmitter{constructor(e,t,n){super(),this.wireListeners=new Map,this.topicRefMap=new Map,this.eventAggregator=new Po.default,this.messageHandlers=[this.eventAggregator.dispatchEvent],go.set(this,void 0),mo.set(this,void 0),this.connectSync=()=>{Co(this,go,"f").connectSync()},this.getPort=()=>Co(this,go,"f").getPort(),vo(this,go,new e(this.onmessage.bind(this)),"f"),this.environment=t,this.sendRaw=Co(this,go,"f").send.bind(Co(this,go,"f")),this.registerMessageHandler(this.handleMessage.bind(this)),Co(this,go,"f").on("disconnected",(()=>{for(const[,{handleNack:e}]of this.wireListeners)e({reason:"Remote connection has closed"});this.wireListeners.clear(),this.emit("disconnected")}));const{uuid:i,name:r}=n,o=this.environment.getCurrentEntityType();this.me=(0,Mo.getBaseMe)(o,i,r)}getFin(){if(!Co(this,mo,"f"))throw new Error("No Fin object registered for this transport");return Co(this,mo,"f")}registerFin(e){if(Co(this,mo,"f"))throw new Error("Fin object has already been registered for this transport");vo(this,mo,e,"f")}shutdown(){return Co(this,go,"f").shutdown()}async connect(e){if((0,xo.isConfigWithReceiver)(e))return await Co(this,go,"f").connect(e.receiver),this.authorize(e);if((0,xo.isRemoteConfig)(e))return this.connectRemote(e);if((0,xo.isExistingConnectConfig)(e))return this.connectByPort(e);if((0,xo.isNewConnectConfig)(e)){const t=await this.environment.retrievePort(e);return this.connectByPort({...e,address:`ws://localhost:${t}`})}}async connectRemote(e){return await Co(this,go,"f").connect(new(this.environment.getWsConstructor())(e.address)),this.authorize(e)}async connectByPort(e){const{address:t,uuid:n}=e,i={...e,type:"file-token"},r=Co(this,go,"f");await r.connect(new(this.environment.getWsConstructor())(e.address));const o=await this.sendAction("request-external-authorization",{uuid:n,type:"file-token"},!0);if("external-authorization-response"!==o.action)throw new Ao.UnexpectedActionError(o.action);return await this.environment.writeToken(o.payload.file,o.payload.token),this.authorize(i)}async authorize(e){const t=await this.sendAction("request-authorization",e,!0);if("authorization-response"!==t.action)throw new Ao.UnexpectedActionError(t.action);if(!0!==t.payload.success)throw new Ao.RuntimeError(t.payload)}sendAction(e,t={},n=!1){let i=()=>{};const r=Ao.RuntimeError.getCallSite(1),o=this.environment.getNextMessageId(),s=new Promise(((s,a)=>{i=a;const c={action:e,payload:t,messageId:o},d=Co(this,go,"f");return this.addWireListener(o,s,(e=>this.nackHandler(e,a,r)),n),d.send(c).catch(a)}));return Object.assign(s,{cancel:i,messageId:o})}nackHandler(e,t,n){t("string"==typeof e?e:new Ao.RuntimeError(e,n))}ferryAction(e){return new Promise(((t,n)=>{const i=this.environment.getNextMessageId();e.messageId=i;const r=e=>{t(e.payload)};return Co(this,go,"f").send(e).then((()=>this.addWireListener(i,r,(e=>this.nackHandler(e,n)),!1))).catch(n)}))}registerMessageHandler(e){this.messageHandlers.push(e)}addWireListener(e,t,n,i){i?this.uncorrelatedListener=t:this.wireListeners.has(e)?n({reason:"Duplicate handler id",error:(0,_o.errorToPOJO)(new Ao.DuplicateCorrelationError(String(e)))}):this.wireListeners.set(e,{resolve:t,handleNack:n})}onmessage(e){for(const t of this.messageHandlers)t.call(null,e)}handleMessage(e){const t=e.correlationId||NaN;if("correlationId"in e){if(!this.wireListeners.has(t))return!1;{const{resolve:n,handleNack:i}=this.wireListeners.get(t);"ack"!==e.action?i({reason:"Did not receive ack action",error:(0,_o.errorToPOJO)(new Ao.NoAckError(e.action))}):"payload"in e?e.payload.success?n.call(null,e):i(e.payload):"string"==typeof e.reason?i(e):(console.warn("Received invalid response from core",e),i({reason:"invalid response shape"})),this.wireListeners.delete(t)}}else this.uncorrelatedListener&&this.uncorrelatedListener.call(null,e),this.uncorrelatedListener=()=>{};return!0}}Io=no.Transport=Oo,go=new WeakMap,mo=new WeakMap;const So=(...e)=>({log:(...t)=>console.debug(`[${(new Date).toISOString()}]`,...(e=>e.map((e=>`[${e}]`)))(e),...t),getLogger:(...t)=>So(...e,...t)}),Ro=So("@openfin/core-web/client");function Fo(e,t){if(!function(e){return"string"==typeof e}(e))throw new Error(`Property ${t} has invalid type. Expected string, got ${typeof e}.`)}const jo="web-broker-ports-ready",ko=Ro.getLogger("get-web-interop-ports");function Lo(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)}function To(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}"function"==typeof SuppressedError&&SuppressedError;const $o=e=>{var n,i,r;return r=class extends t.EventEmitter{constructor(t){super(),n.set(this,void 0),i.set(this,!1),this.connectSync=()=>{Lo(this,i,"f")||(e.addEventListener("message",(e=>{e.data?.topic?.startsWith("wire-message")&&e.data.message&&Lo(this,n,"f").call(this,{...JSON.parse(e.data.message),ports:e.ports})})),e.start())},this.connect=async()=>{this.connectSync()},this.send=t=>(e.postMessage({topic:"wire-message",message:JSON.stringify(t)}),Promise.resolve()),this.shutdown=async()=>{e.close()},To(this,n,t,"f")}getPort(){return e}},n=new WeakMap,i=new WeakMap,r};var Bo={},Go={};Object.defineProperty(Go,"__esModule",{value:!0}),Go.BaseEnvironment=void 0;const Wo=vr();Go.BaseEnvironment=class{async getViewWindowIdentity(e,t){const{identity:n}=await e.View.wrapSync(t).getCurrentWindow();return n}async getInteropInfo(e){const t=await e.Application.getCurrentSync().getInfo().catch((()=>null)),n=t?.initialOptions?.interopBrokerConfiguration??{};return{fdc3Version:t?(0,Wo.getDefaultViewFdc3VersionFromAppInfo)(t):void 0,...n,fdc3Info:{providerVersion:await e.System.getVersion(),provider:"OpenFin"}}}},Object.defineProperty(Bo,"__esModule",{value:!0});var Ho=Bo.BrowserEnvironment=void 0;const No=Go;class Do extends No.BaseEnvironment{constructor(){super(...arguments),this.type="other",this.getRandomId=()=>{const e=new Uint32Array(1);return window.crypto.getRandomValues(e)[0].toString(32)}}getAdapterVersionSync(){return""}observeBounds(e,t){throw new Error("Method not implemented.")}layoutAllowedInContext(e){return!1}initLayoutManager(e,t,n){throw new Error("Method not implemented.")}applyLayoutSnapshot(e,t,n){throw new Error("Method not implemented.")}createLayout(e,t){throw new Error("Method not implemented.")}destroyLayout(e,t){throw new Error("Method not implemented.")}resolveLayout(e,t){throw new Error("Method not implemented.")}initPlatform(...e){throw new Error("Method not implemented.")}writeToken(e,t){return Promise.resolve("")}retrievePort(e){throw new Error("Method not implemented.")}getNextMessageId(){return this.getRandomId()}createChildContent(e){throw new Error("Method not implemented.")}getWebWindow(e){throw new Error("Method not implemented.")}getCurrentEntityIdentity(){throw new Error("Method not implemented.")}getCurrentEntityType(){return"external connection"}raiseEvent(e,t){throw new Error("Method not implemented.")}getUrl(){return location.href}getDefaultChannelOptions(){return{create:{},connect:{}}}getRtcPeer(){return new RTCPeerConnection}getWsConstructor(){return WebSocket}whenReady(){return Promise.resolve()}}Ho=Bo.BrowserEnvironment=Do;const Uo=e=>"platform"in e&&void 0!==e.platform;var Vo,zo;class Ko extends Ho{constructor(e){super(),this.connectConfig=e,Vo.set(this,void 0),zo.set(this,new W((async()=>Promise.resolve().then((function(){return __webpack_require__(/*! ./main-b14f67c9.js */ "./node_modules/@openfin/core-web/out/main-b14f67c9.js")}))))),Uo(e)&&this.validatePlatformOptions(e)}getAdapterVersionSync(){return"0.39.21"}validatePlatformOptions({platform:e}){if(!("layoutSnapshot"in e))throw new Error("Platform options are missing layoutSnapshot. Please provide a layoutSnapshot in the platform options.");if("windows"in e||"windows"in e.layoutSnapshot)throw new Error("It appears you tried to call connect() with a snapshot object from an OpenFin desktop environment. Note that connect() expects to be called with a platform property with this structure: { platform: { layoutSnapshot } }. To get a layoutSnapshot of the expected structure, use fin.Platform.Layout.getCurrentLayoutManagerSync().getLayoutSnapshot() in v34+ in your desktop environment.");const{layouts:t}=e.layoutSnapshot;Object.entries(t).map((([e,t])=>{if("object"!=typeof t||null===t)throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must be an object.`);if(!("content"in t))throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must contain a 'content' property.`)}))}async getInteropInfo(e){return{...{contextGroups:void 0,logging:{beforeAction:{enabled:!1},afterAction:{enabled:!1}}},fdc3Version:void 0,fdc3Info:{providerVersion:"0.39.21",provider:"OpenFin Web"}}}layoutAllowedInContext(e){return!0}async initLayoutManager(e,t,n){if(Lo(this,Vo,"f"))throw new Error("Layout already initialized.");if(!Uo(this.connectConfig))throw new Error("Platform options are missing from connection config.");const{WebLayoutEntryPoint:i}=await Lo(this,zo,"f").getValue();return To(this,Vo,new i(this.connectConfig),"f"),await Lo(this,Vo,"f").initLayoutManager(e,t,n)}async applyLayoutSnapshot(e,t,n){Lo(this,Vo,"f")?.applyLayoutSnapshot(e,t,n)}async createLayout(e,t){return Lo(this,Vo,"f")?.createLayout(e,t)}async destroyLayout(e,t){return Lo(this,Vo,"f")?.destroyLayout(e,t)}async getViewWindowIdentity(e,t){return Promise.resolve({uuid:t.uuid,name:t.uuid})}}Vo=new WeakMap,zo=new WeakMap;const qo=()=>{const e=((e,t)=>{const n=new RegExp(`^${t}<(?.*)>$`).exec(e)?.groups?.meta;if(n)try{return JSON.parse(atob(n))}catch(e){throw new Error(`Failed to decode JSON from ${n}.`)}})(window.name,"of-frame");if(e)try{const{name:t,uuid:n,brokerUrl:i,providerId:r,contextGroup:o}=e;return Fo(i,"brokerUrl"),Fo(n,"uuid"),Fo(t,"name"),{identity:{name:t,uuid:n},brokerUrl:i,interopConfig:{providerId:r,currentContextGroup:o}}}catch(e){throw new Error(`Unexpected error occurred when inferring platform information: ${e.stack}`)}},Jo=()=>{const e=r.v4();return{uuid:e,name:e}},Yo=async e=>{if("enabled"===e.connectionInheritance){const t=await(async e=>{const t=qo();if(t){const{validateOptions:n=(()=>!0)}=e,{identity:i,...r}=t;if(!await n(r))throw new Error("Parent options were rejected by validateOptions.");return t}})(e);if(t)return t}if(!e.options){const t="enabled"===e.connectionInheritance?"Broker URL was not specified nor provided by a platform container.":"Connection inheritance is disabled but no options were provided.";throw new Error(t)}return{...e.options,identity:Jo()}};exports.__classPrivateFieldGet=Lo,exports.__classPrivateFieldSet=To,exports.apiExposer=Gn,exports.commonjsGlobal=s,exports.connect=async t=>{try{Ro.log("Establishing connection",t);const{brokerUrl:n,identity:i,timeout:r,interopConfig:s}=await Yo(t),{workerPort:a,iframeBrokerPort:c}=await(async(e,t,n)=>{const{origin:i}=new URL(e),r=document.createElement("IFRAME");let s;r.style.display="none";try{return await new Promise(((a,c)=>{const d=e=>{if(e.source===r.contentWindow&&e.data?.topic===`ack-${jo}`){if(e.origin!==i)c(new Error(`Broker redirected to unexpected origin ${e.origin}, expected ${i}.`));else if(e.data.success){const[t,n]=e.ports;a({iframeBrokerPort:t,workerPort:n})}else c(new m(e.data));window.removeEventListener("message",d),clearTimeout(s)}};window.addEventListener("message",d),ko.log(`Connecting to broker ${e}`),r.setAttribute("src",e),r.setAttribute("name",o(t,"of-broker")),document.body.appendChild(r),ko.log("Iframe loaded, awaiting init message from iframe"),n&&(s=setTimeout((()=>{window.removeEventListener("message",d),document.body.removeChild(r),c(new Error("Worker did not initialize in time"))}),n))}))}catch(e){throw new Error(`Failed to initialise Fin Web Client. ${e.message}`,{cause:e})}})(n,i,r);Ro.log("Successfully established connection to shared worker");const d={entityType:"external connection",...i};a.start(),c.start();const h=((t,n,i)=>{const r=$o(n),o=new Ko(t),s=new Io(r,o,i);return s.connectSync(),window.Buffer=e.Buffer,new Wr(s)})(t,a,d);return s?.providerId&&(h.me.interop=h.Interop.connectSync(s.providerId),s?.currentContextGroup&&h.me.interop.joinContextGroup(s.currentContextGroup).catch((e=>{console.warn(`Error joining specified context group: ${s?.currentContextGroup}, continuing`,e)}))),{...h,me:{...h.me,identity:{uuid:h.me.uuid,name:h.me.name}}}}catch(e){throw new Error(`An error occured during web-interop connection: ${e.message}`)}},exports.decorators=Nn,exports.encodeOptions=o,exports.layout_constants=ai,exports.lazy=G; +var e=__webpack_require__(/*! buffer/ */ "../../node_modules/buffer/index.js"),t=__webpack_require__(/*! events */ "../../node_modules/events/events.js"),n=__webpack_require__(/*! lodash/cloneDeep */ "../../node_modules/lodash/cloneDeep.js"),i=__webpack_require__(/*! lodash/isEqual */ "../../node_modules/lodash/isEqual.js"),r=__webpack_require__(/*! uuid */ "../../node_modules/uuid/dist/esm-browser/index.js");const o=(e,t)=>`${t}<${btoa(JSON.stringify(e))}>`;var s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof __webpack_require__.g?__webpack_require__.g:"undefined"!=typeof self?self:{},a={},c={},d={},h={};async function l(e){const t=[];for(const n of e){const e=await n();t.push(e)}return t}Object.defineProperty(h,"__esModule",{value:!0}),h.promiseMapSerial=h.serial=h.promiseMap=h.promisify=void 0,h.promisify=function(e){return(...t)=>new Promise(((n,i)=>{e(...t,((e,t)=>e?i(e):n(t)))}))},h.promiseMap=async function(e,t){return Promise.all(e.map(t))},h.serial=l,h.promiseMapSerial=async function(e,t){return l(e.map(((e,n,i)=>()=>t(e,n,i))))};var u,p=s&&s.__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},w=s&&s.__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)};Object.defineProperty(d,"__esModule",{value:!0}),d.Reply=d.EmitterBase=d.Base=void 0;const y=h;class f{constructor(e){this.isNodeEnvironment=()=>"node"===this.wire.environment.type,this.isOpenFinEnvironment=()=>"openfin"===this.wire.environment.type,this.isBrowserEnvironment=()=>"other"===this.wire.environment.type,this.wire=e}get fin(){return this.wire.getFin()}get me(){return this.wire.me}}d.Base=f;d.EmitterBase=class extends f{constructor(e,t,...n){super(e),this.topic=t,u.set(this,void 0),this.eventNames=()=>this.hasEmitter()?this.getOrCreateEmitter().eventNames():[],this.emit=(e,t,...n)=>!!this.hasEmitter()&&this.getOrCreateEmitter().emit(e,t,...n),this.hasEmitter=()=>this.wire.eventAggregator.has(w(this,u,"f")),this.getOrCreateEmitter=()=>this.wire.eventAggregator.getOrCreate(w(this,u,"f")),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[],this.listenerCount=e=>this.hasEmitter()?this.getOrCreateEmitter().listenerCount(e):0,this.registerEventListener=async(e,t={},n,i)=>{const r={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e},o=this.getOrCreateEmitter();n(o);try{await this.wire.sendAction("subscribe-to-desktop-event",r)}catch(e){throw i(o),this.deleteEmitterIfNothingRegistered(o),e}},this.deregisterEventListener=async(e,t={})=>{if(this.hasEmitter()){const n={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e};await this.wire.sendAction("unsubscribe-to-desktop-event",n).catch((()=>null));return this.getOrCreateEmitter()}return Promise.resolve()},p(this,u,[t,...n],"f"),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[]}async on(e,t,n){return await this.registerEventListener(e,n,(n=>{n.on(e,t)}),(n=>{n.removeListener(e,t)})),this}async addListener(e,t,n){return this.on(e,t,n)}async once(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.once(e,i),n.once(e,t)}),(n=>{n.removeListener(e,i),n.removeListener(e,t)})),this}async prependListener(e,t,n){return await this.registerEventListener(e,n,(n=>{n.prependListener(e,t)}),(n=>{n.removeListener(e,t)})),this}async prependOnceListener(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.prependOnceListener(e,t),n.once(e,i)}),(n=>{n.removeListener(e,t),n.removeListener(e,i)})),this}async removeListener(e,t,n){const i=await this.deregisterEventListener(e,n);return i&&(i.removeListener(e,t),this.deleteEmitterIfNothingRegistered(i)),this}async deregisterAllListeners(e){const t={...this.identity,type:e,topic:this.topic};if(this.hasEmitter()){const e=this.getOrCreateEmitter(),n=e.listenerCount(t.type),i=[];for(let e=0;enull)));return await Promise.all(i),e}}async removeAllListeners(e){const t=async e=>{const t=await this.deregisterAllListeners(e);t&&(t.removeAllListeners(e),this.deleteEmitterIfNothingRegistered(t))};if(e)await t(e);else if(this.hasEmitter()){const e=this.getOrCreateEmitter().eventNames();await(0,y.promiseMap)(e,t)}return this}deleteEmitterIfNothingRegistered(e){0===e.eventNames().length&&this.wire.eventAggregator.delete(w(this,u,"f"))}},u=new WeakMap;d.Reply=class{};var g={};Object.defineProperty(g,"__esModule",{value:!0});var m=g.RuntimeError=g.NotSupportedError=g.NotImplementedError=g.NoAckError=g.DuplicateCorrelationError=g.UnexpectedActionError=g.DisconnectedError=void 0;class v extends Error{constructor(e){super(`Expected websocket state OPEN but found ${e}`),this.readyState=e}}g.DisconnectedError=v;class C extends Error{}g.UnexpectedActionError=C;class b extends Error{}g.DuplicateCorrelationError=b;class I extends Error{}g.NoAckError=I;class E extends Error{}g.NotImplementedError=E;class x extends Error{}g.NotSupportedError=x;class A extends Error{constructor(e){const{message:t,name:n,stack:i,...r}=e;super(t),this.name=n||"Error",this.stack=i??this.toString(),Object.keys(r).forEach((e=>{this[e]=r[e]}))}}class P extends Error{static getCallSite(e=0){const t=Error.stackTraceLimit,n=e+1;Error.stackTraceLimit=t+n;const i=Error.prepareStackTrace;Error.prepareStackTrace=(e,t)=>t;const r=(new Error).stack?.slice(n)??[];return Error.prepareStackTrace=i,Error.stackTraceLimit=t,r}static prepareStackTrace(e,t){if("function"==typeof Error.prepareStackTrace)return Error.prepareStackTrace(e,t);let n="";n+=e.name||"Error",n+=`: ${e.message||""}`;for(const e of t)n+=`\n at ${e.toString()}`;return n}constructor(e,t){const{reason:n,error:i}=e;super(n),this.name="RuntimeError",i?.stack&&(this.cause=new A(i)),t&&(this.stack=P.prepareStackTrace(this,t))}}m=g.RuntimeError=P;var M={},_={},O={};Object.defineProperty(O,"__esModule",{value:!0}),O.validateIdentity=void 0,O.validateIdentity=function(e){let t;return"object"==typeof e&&"string"==typeof e.uuid||(t="Not a valid identity object"),t};var S={},R={},F={},j={},k={},L={},T={};Object.defineProperty(T,"__esModule",{value:!0}),T.handleDeprecatedWarnings=void 0;var $;T.handleDeprecatedWarnings=e=>{(e.contentNavigation?.whitelist||e.contentNavigation?.blacklist||e.contentRedirect?.whitelist||e.contentRedirect?.blacklist)&&console.warn("The properties 'whitelist' and 'blacklist' have been marked as deprecated and will be removed in a future version. Please use 'allowlist' and 'denylist'.")};var B={},G={};Object.defineProperty(G,"__esModule",{value:!0}),G.AsyncRetryableLazy=W=G.Lazy=void 0;var W=G.Lazy=class{constructor(e){this.producerFn=e}getValue(){return this.value||(this.value=this.producerFn()),this.value}};G.AsyncRetryableLazy=class{constructor(e){this.producerFn=e}async getValue(){return this.promise||(this.promise=this.producerFn().catch((e=>{throw delete this.promise,e}))),this.promise}};var H={};Object.defineProperty(H,"__esModule",{value:!0}),H.WebContents=void 0;const N=d;class D extends N.EmitterBase{constructor(e,t,n){super(e,n,t.uuid,t.name),this.identity=t,this.entityType=n}capturePage(e){return this.wire.sendAction("capture-page",{options:e,...this.identity}).then((({payload:e})=>e.data))}executeJavaScript(e){return this.wire.sendAction("execute-javascript-in-window",{...this.identity,code:e}).then((({payload:e})=>e.data))}getZoomLevel(){return this.wire.sendAction("get-zoom-level",this.identity).then((({payload:e})=>e.data))}setZoomLevel(e){return this.wire.sendAction("set-zoom-level",{...this.identity,level:e}).then((()=>{}))}navigate(e){return this.wire.sendAction("navigate-window",{...this.identity,url:e}).then((()=>{}))}navigateBack(){return this.wire.sendAction("navigate-window-back",{...this.identity}).then((()=>{}))}async navigateForward(){await this.wire.sendAction("navigate-window-forward",{...this.identity})}stopNavigation(){return this.wire.sendAction("stop-window-navigation",{...this.identity}).then((()=>{}))}reload(e=!1){return this.wire.sendAction("reload-window",{ignoreCache:e,...this.identity}).then((()=>{}))}print(e={}){return this.wire.sendAction("print",{...this.identity,options:e}).then((()=>{}))}findInPage(e,t){return this.wire.sendAction("find-in-page",{...this.identity,searchTerm:e,options:t}).then((({payload:e})=>e.data))}stopFindInPage(e){return this.wire.sendAction("stop-find-in-page",{...this.identity,action:e}).then((()=>{}))}getPrinters(){return this.wire.sendAction("get-printers",{...this.identity}).then((({payload:e})=>e.data))}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){await this.wire.sendAction("focus-window",{emitSynthFocused:e,...this.identity})}async showDeveloperTools(){await this.wire.sendAction("show-developer-tools",this.identity)}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction("get-process-info",this.identity);return e}async getSharedWorkers(){return this.wire.sendAction("get-shared-workers",this.identity).then((({payload:e})=>e.data))}async inspectSharedWorker(){await this.wire.sendAction("inspect-shared-worker",{...this.identity})}async inspectSharedWorkerById(e){await this.wire.sendAction("inspect-shared-worker-by-id",{...this.identity,workerId:e})}async inspectServiceWorker(){await this.wire.sendAction("inspect-service-worker",{...this.identity})}async showPopupWindow(e){if(this.wire.sendAction(`${this.entityType}-show-popup-window`,this.identity).catch((()=>{})),e?.onPopupReady){const t=async({popupName:t})=>{try{const n=this.fin.Window.wrapSync({uuid:this.fin.me.uuid,name:t});await e.onPopupReady(n)}catch(e){throw new Error(`Something went wrong during onPopupReady execution: ${e}`)}};await this.once("popup-ready",t)}const{payload:t}=await this.wire.sendAction("try-create-popup-window",{options:{...e,hasResultCallback:!!e?.onPopupResult,hasReadyCallback:!!e?.onPopupReady},...this.identity}),{data:{willOpen:n,options:i}}=t;n&&await this.fin.Window.create(i.initialOptions);if(e?.onPopupResult){const t=async t=>{await e.onPopupResult((e=>{const{name:t,uuid:n,result:i,data:r}=e,o={identity:{name:t,uuid:n},result:i};return r&&(o.data=r),o})(t))},n=async()=>{await this.removeListener("popup-result",t)};await this.on("popup-result",t),await this.once("popup-teardown",n)}const{payload:r}=await this.wire.sendAction("show-popup-window",{options:i,...this.identity});return r.data}}var U,V,z,K,q;function J(){return V||(V=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(function(){if($)return L;$=1,Object.defineProperty(L,"__esModule",{value:!0}),L.ViewModule=void 0;const e=d,t=O,n=J(),i=T;class r extends e.Base{async create(e){const{uuid:t}=this.wire.me;if(!e.name||"string"!=typeof e.name)throw new Error("Please provide a name property as a string in order to create a View.");return(0,i.handleDeprecatedWarnings)(e),this.wire.environment.childViews?await this.wire.environment.createChildContent({entityType:"view",options:{...e,uuid:t}}):await this.wire.sendAction("create-view",{...e,uuid:t}),this.wrapSync({uuid:t,name:e.name})}async wrap(e){this.wire.sendAction("view-wrap").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}wrapSync(e){this.wire.sendAction("view-wrap-sync").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}getCurrent(){if(this.wire.sendAction("view-get-current").catch((e=>{})),!this.wire.me.isView)throw new Error("You are not in a View context");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction("view-get-current-sync").catch((e=>{})),!this.wire.me.isView)throw new Error("You are not in a View context");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return L.ViewModule=r,L}(),e),n(function(){if(U)return B;var e;U=1,Object.defineProperty(B,"__esModule",{value:!0}),B.View=void 0;const t=g,n=G,i=H,r=ie();class o extends i.WebContents{constructor(i,o){super(i,o,"view"),this.identity=o,e.set(this,new n.Lazy((()=>this.fin.Platform.wrapSync(this.identity).getClient()))),this.attach=async e=>{await this.wire.sendAction("attach-view",{target:e,...this.identity})},this.destroy=async()=>{await this.wire.sendAction("destroy-view",{...this.identity})},this.show=async()=>{await this.wire.sendAction("show-view",{...this.identity})},this.showAt=async(e,t={})=>{await this.wire.sendAction("show-view-at",{bounds:e,...this.identity,options:t})},this.bringToFront=async()=>{await this.wire.sendAction("bring-view-to-front",{...this.identity})},this.hide=async()=>{await this.wire.sendAction("hide-view",{...this.identity})},this.setBounds=async e=>{await this.wire.sendAction("set-view-bounds",{bounds:e,...this.identity})},this.getBounds=async()=>(await this.wire.sendAction("get-view-bounds",{...this.identity})).payload.data,this.getInfo=async()=>(await this.wire.sendAction("get-view-info",{...this.identity})).payload.data,this.getParentLayout=async()=>(this.wire.sendAction("view-get-parent-layout",{...this.identity}).catch((()=>{})),this.fin.Platform.Layout.getLayoutByViewIdentity(this.identity)),this.getOptions=async()=>this.wire.sendAction("get-view-options",{...this.identity}).then((({payload:e})=>e.data)),this.updateOptions=async e=>this.wire.sendAction("update-view-options",{options:e,...this.identity}).then((()=>{})),this.getCurrentWindow=async()=>{const{payload:{data:e}}=await this.wire.sendAction("get-view-window",{...this.identity});return new r._Window(this.wire,e)},this.getCurrentStack=async()=>{this.wire.sendAction("view-get-current-stack").catch((()=>{}));try{return(await this.getParentLayout()).getStackByViewIdentity(this.identity)}catch(e){throw new t.RuntimeError({reason:"This view does not belong to a stack.",error:e})}},this.triggerBeforeUnload=async()=>(await this.wire.sendAction("trigger-before-unload",{...this.identity})).payload.data,this.bindToElement=async e=>{if(!e)throw new Error("Element not found.");return this.wire.environment.observeBounds(e,(async e=>this.setBounds(e)))}}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){const t=await this.getCurrentWindow();await t.focusedWebViewWasChanged(),await super.focus({emitSynthFocused:e})}}return B.View=o,e=new WeakMap,B}(),e)}(k)),k}function Y(){if(z)return j;z=1,Object.defineProperty(j,"__esModule",{value:!0}),j.Application=void 0;const e=d,t=ie(),n=J();class i extends e.EmitterBase{constructor(e,n){super(e,"application",n.uuid),this.identity=n,this.window=new t._Window(this.wire,{uuid:this.identity.uuid,name:this.identity.uuid})}windowListFromIdentityList(e){const n=[];return e.forEach((e=>{n.push(new t._Window(this.wire,{uuid:e.uuid,name:e.name}))})),n}isRunning(){return this.wire.sendAction("is-application-running",this.identity).then((({payload:e})=>e.data))}async quit(e=!1){try{await this._close(e),await this.wire.sendAction("destroy-application",{force:e,...this.identity})}catch(e){if(!["Remote connection has closed","Could not locate the requested application"].some((t=>e.message.includes(t))))throw e}}async _close(e=!1){try{await this.wire.sendAction("close-application",{force:e,...this.identity})}catch(e){if(!e.message.includes("Remote connection has closed"))throw e}}close(e=!1){return console.warn("Deprecation Warning: Application.close is deprecated Please use Application.quit"),this.wire.sendAction("application-close",this.identity).catch((e=>{})),this._close(e)}getChildWindows(){return this.wire.sendAction("get-child-windows",this.identity).then((({payload:e})=>{const t=[];return e.data.forEach((e=>{t.push({uuid:this.identity.uuid,name:e})})),this.windowListFromIdentityList(t)}))}getManifest(){return this.wire.sendAction("get-application-manifest",this.identity).then((({payload:e})=>e.data))}getParentUuid(){return this.wire.sendAction("get-parent-application",this.identity).then((({payload:e})=>e.data))}getShortcuts(){return this.wire.sendAction("get-shortcuts",this.identity).then((({payload:e})=>e.data))}async getViews(){const{payload:e}=await this.wire.sendAction("application-get-views",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}getZoomLevel(){return this.wire.sendAction("get-application-zoom-level",this.identity).then((({payload:e})=>e.data))}getWindow(){return this.wire.sendAction("application-get-window",this.identity).catch((e=>{})),Promise.resolve(this.window)}registerUser(e,t){return this.wire.sendAction("register-user",{userName:e,appName:t,...this.identity}).then((()=>{}))}removeTrayIcon(){return this.wire.sendAction("remove-tray-icon",this.identity).then((()=>{}))}restart(){return this.wire.sendAction("restart-application",this.identity).then((()=>{}))}run(){return console.warn("Deprecation Warning: Application.run is deprecated Please use fin.Application.start"),this.wire.sendAction("application-run",this.identity).catch((e=>{})),this._run()}_run(e={}){return this.wire.sendAction("run-application",{manifestUrl:this._manifestUrl,opts:e,...this.identity}).then((()=>{}))}scheduleRestart(){return this.wire.sendAction("relaunch-on-close",this.identity).then((()=>{}))}async sendApplicationLog(){const{payload:e}=await this.wire.sendAction("send-application-log",this.identity);return e.data}async setJumpList(e){await this.wire.sendAction("set-jump-list",{config:e,...this.identity})}setTrayIcon(e){return this.wire.sendAction("set-tray-icon",{enabledIcon:e,...this.identity}).then((()=>{}))}setShortcuts(e){return this.wire.sendAction("set-shortcuts",{data:e,...this.identity}).then((()=>{}))}async setShortcutQueryParams(e){await this.wire.sendAction("set-shortcut-query-args",{data:e,...this.identity})}setZoomLevel(e){return this.wire.sendAction("set-application-zoom-level",{level:e,...this.identity}).then((()=>{}))}async setAppLogUsername(e){await this.wire.sendAction("set-app-log-username",{data:e,...this.identity})}getTrayIconInfo(){return this.wire.sendAction("get-tray-icon-info",this.identity).then((({payload:e})=>e.data))}hasTrayIcon(){return this.wire.sendAction("has-tray-icon",this.identity).then((({payload:e})=>e.data))}terminate(){return this.wire.sendAction("terminate-application",this.identity).then((()=>{}))}wait(){return this.wire.sendAction("wait-for-hung-application",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction("get-info",this.identity).then((({payload:e})=>e.data))}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction("application-get-process-info",this.identity);return e}async setFileDownloadLocation(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t};await this.wire.sendAction("set-file-download-location",{...n,downloadLocation:e})}async getFileDownloadLocation(){const{payload:{data:e}}=await this.wire.sendAction("get-file-download-location",this.identity);return e}async showTrayIconPopupMenu(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t},{payload:i}=await this.wire.sendAction("show-tray-icon-popup-menu",{...n,options:e});return i.data}async closeTrayIconPopupMenu(){const{name:e}=this.wire.me,t={uuid:this.identity.uuid,name:e};await this.wire.sendAction("close-tray-icon-popup-menu",{...t})}}return j.Application=i,j}function Z(){return q||(q=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(function(){if(K)return F;K=1,Object.defineProperty(F,"__esModule",{value:!0}),F.ApplicationModule=void 0;const e=d,t=O,n=Y();class i extends e.Base{async wrap(e){this.wire.sendAction("wrap-application").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}wrapSync(e){this.wire.sendAction("wrap-application-sync").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}async _create(e){return void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&void 0===e.isPlatformController&&(e.autoShow=!0),await this.wire.sendAction("create-application",e),this.wrap({uuid:e.uuid})}create(e){return console.warn("Deprecation Warning: fin.Application.create is deprecated. Please use fin.Application.start"),this.wire.sendAction("application-create").catch((e=>{})),this._create(e)}async start(e){this.wire.sendAction("start-application").catch((e=>{}));const t=await this._create(e);return await this.wire.sendAction("run-application",{uuid:e.uuid}),t}async startManyManifests(e,t){return this.wire.sendAction("run-applications",{applications:e,opts:t}).then((()=>{}))}getCurrent(){return this.wire.sendAction("get-current-application").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction("get-current-application-sync").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}async startFromManifest(e,t){this.wire.sendAction("application-start-from-manifest").catch((e=>{}));const n=await this._createFromManifest(e);return await n._run(t),n}createFromManifest(e){return console.warn("Deprecation Warning: fin.Application.createFromManifest is deprecated. Please use fin.Application.startFromManifest"),this.wire.sendAction("application-create-from-manifest").catch((e=>{})),this._createFromManifest(e)}_createFromManifest(e){return this.wire.sendAction("get-application-manifest",{manifestUrl:e}).then((({payload:e})=>{const t=e.data.platform?e.data.platform.uuid:e.data.startup_app.uuid;return this.wrap({uuid:t})})).then((t=>(t._manifestUrl=e,t)))}}return F.ApplicationModule=i,F}(),e),n(Y(),e)}(R)),R}H.WebContents=D;var Q={};Object.defineProperty(Q,"__esModule",{value:!0}),Q.promisifySubscription=void 0;var X,ee,te;function ne(){if(X)return S;X=1,Object.defineProperty(S,"__esModule",{value:!0}),S._Window=void 0;const e=Z(),t=H,n=J(),i=T,r=Q;class o extends t.WebContents{constructor(e,t){super(e,t,"window")}async createWindow(e){this.wire.sendAction("window-create-window",this.identity).catch((e=>{}));const t=await(0,r.promisifySubscription)(this,"fire-constructor-callback");void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&(e.autoShow=!0),(0,i.handleDeprecatedWarnings)(e);const n=this.wire.environment.createChildContent({entityType:"window",options:e}),[o]=await Promise.all([t.getValue(),n]);let s;const{success:a}=o,c=o.data,{message:d}=c;s=a?{httpResponseCode:c.httpResponseCode,apiInjected:c.apiInjected}:{message:c.message,networkErrorCode:c.networkErrorCode,stack:c.stack};const h={message:d,cbPayload:s,success:a};try{this.getWebWindow().fin.__internal_.openerSuccessCBCalled()}catch(e){}return h.success?this:Promise.reject(h)}getAllFrames(){return this.wire.sendAction("get-all-frames",this.identity).then((({payload:e})=>e.data))}getBounds(){return this.wire.sendAction("get-window-bounds",this.identity).then((({payload:e})=>e.data))}center(){return this.wire.sendAction("center-window",this.identity).then((()=>{}))}blur(){return this.wire.sendAction("blur-window",this.identity).then((()=>{}))}bringToFront(){return this.wire.sendAction("bring-window-to-front",this.identity).then((()=>{}))}animate(e,t){return this.wire.sendAction("animate-window",{transitions:e,options:t,...this.identity}).then((()=>{}))}hide(){return this.wire.sendAction("hide-window",this.identity).then((()=>{}))}close(e=!1){return this.wire.sendAction("close-window",{force:e,...this.identity}).then((()=>{Object.setPrototypeOf(this,null)}))}focusedWebViewWasChanged(){return this.wire.sendAction("focused-webview-changed",this.identity).then((()=>{}))}getNativeId(){return this.wire.sendAction("get-window-native-id",this.identity).then((({payload:e})=>e.data))}async getCurrentViews(){const{payload:e}=await this.wire.sendAction("window-get-views",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}disableFrame(){return console.warn("Function is deprecated; use disableUserMovement instead."),this.wire.sendAction("disable-window-frame",this.identity).then((()=>{}))}disableUserMovement(){return this.wire.sendAction("disable-window-frame",this.identity).then((()=>{}))}enableFrame(){return console.warn("Function is deprecated; use enableUserMovement instead."),this.wire.sendAction("enable-window-frame",this.identity).then((()=>{}))}enableUserMovement(){return this.wire.sendAction("enable-window-frame",this.identity).then((()=>{}))}flash(){return this.wire.sendAction("flash-window",this.identity).then((()=>{}))}stopFlashing(){return this.wire.sendAction("stop-flash-window",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction("get-window-info",this.identity).then((({payload:e})=>e.data))}async getLayout(e){this.wire.sendAction("window-get-layout",this.identity).catch((e=>{}));const t=await this.getOptions();if(!t.layout&&!t.layoutSnapshot)throw new Error("Window does not have a Layout");return this.fin.Platform.Layout.wrap(e??this.identity)}getOptions(){return this.wire.sendAction("get-window-options",this.identity).then((({payload:e})=>e.data))}getParentApplication(){return this.wire.sendAction("window-get-parent-application",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity))}getParentWindow(){return this.wire.sendAction("window-get-parent-window",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity)).then((e=>e.getWindow()))}async getSnapshot(e){const t={area:e,...this.identity};console.warn("Window.getSnapshot has been deprecated, please use Window.capturePage");return(await this.wire.sendAction("get-window-snapshot",t)).payload.data}getState(){return this.wire.sendAction("get-window-state",this.identity).then((({payload:e})=>e.data))}getWebWindow(){return this.wire.sendAction("window-get-web-window",this.identity).catch((e=>{})),this.wire.environment.getWebWindow(this.identity)}isMainWindow(){return this.wire.sendAction("window-is-main-window",this.identity).catch((e=>{})),this.me.uuid===this.me.name}isShowing(){return this.wire.sendAction("is-window-showing",this.identity).then((({payload:e})=>e.data))}maximize(){return this.wire.sendAction("maximize-window",this.identity).then((()=>{}))}minimize(){return this.wire.sendAction("minimize-window",this.identity).then((()=>{}))}moveBy(e,t,n){return this.wire.sendAction("move-window-by",{deltaLeft:e,deltaTop:t,positioningOptions:n,...this.identity}).then((()=>{}))}moveTo(e,t,n){return this.wire.sendAction("move-window",{left:e,top:t,positioningOptions:n,...this.identity}).then((()=>{}))}resizeBy(e,t,n,i){return this.wire.sendAction("resize-window-by",{deltaWidth:Math.floor(e),deltaHeight:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}resizeTo(e,t,n,i){return this.wire.sendAction("resize-window",{width:Math.floor(e),height:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}restore(){return this.wire.sendAction("restore-window",this.identity).then((()=>{}))}setAsForeground(){return this.wire.sendAction("set-foreground-window",this.identity).then((()=>{}))}setBounds(e,t){return this.wire.sendAction("set-window-bounds",{...e,...this.identity,positioningOptions:t}).then((()=>{}))}show(e=!1){return this.wire.sendAction("show-window",{force:e,...this.identity}).then((()=>{}))}showAt(e,t,n=!1){return this.wire.sendAction("show-at-window",{force:n,left:Math.floor(e),top:Math.floor(t),...this.identity}).then((()=>{}))}updateOptions(e){return this.wire.sendAction("update-window-options",{options:e,...this.identity}).then((()=>{}))}authenticate(e,t){return this.wire.sendAction("window-authenticate",{userName:e,password:t,...this.identity}).then((()=>{}))}async showPopupMenu(e){const{payload:t}=await this.wire.sendAction("show-popup-menu",{options:e,...this.identity});return t.data}async closePopupMenu(){return this.wire.sendAction("close-popup-menu",{...this.identity}).then((()=>{}))}async dispatchPopupResult(e){this.wire.sendAction("window-dispatch-popup-result",this.identity).catch((e=>{})),await this.wire.sendAction("dispatch-popup-result",{data:e,...this.identity})}async print(e={content:"self"}){switch(e.content){case void 0:case"self":return super.print(e);case"screenshot":return this.wire.sendAction("print-screenshot",this.identity).then((()=>{}));case"views":return this.wire.sendAction("print-views",{...this.identity,options:e}).then((()=>{}));default:return}}}return S._Window=o,S}function ie(){return te||(te=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(function(){if(ee)return _;ee=1,Object.defineProperty(_,"__esModule",{value:!0}),_._WindowModule=void 0;const e=d,t=O,n=ne();class i extends e.Base{async wrap(e){this.wire.sendAction("window-wrap").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}wrapSync(e){this.wire.sendAction("window-wrap-sync").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}create(e){return this.wire.sendAction("create-window").catch((e=>{})),new n._Window(this.wire,{uuid:this.me.uuid,name:e.name}).createWindow(e)}getCurrent(){if(this.wire.sendAction("get-current-window").catch((e=>{})),!this.wire.me.isWindow)throw new Error("You are not in a Window context");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction("get-current-window-sync").catch((e=>{})),!this.wire.me.isWindow)throw new Error("You are not in a Window context");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return _._WindowModule=i,_}(),e),n(ne(),e)}(M)),M}Q.promisifySubscription=async(e,t,n=(()=>!0),i)=>{let r,o,s;const a=new Promise(((e,t)=>{r=e,o=t})),c=e=>{n(e)&&(clearTimeout(s),r(e))};return await e.on(t,c),i&&(s=setTimeout((()=>o(new Error("event timed out"))),i)),a.finally((()=>{e.removeListener(t,c).catch((()=>null))})),{getValue:()=>a}},Object.defineProperty(c,"__esModule",{value:!0}),c.System=void 0;const re=d,oe=g,se=ie(),ae=t;class ce extends re.EmitterBase{constructor(e){super(e,"system")}sendExternalProcessRequest(e,t){return new Promise(((n,i)=>{const r="external-process-exited";let o,s,a,c;"function"==typeof t.listener&&(a=e=>{const n=e||{};s={topic:"exited",uuid:n.processUuid||"",exitCode:n.exitCode||0},o===e.processUuid&&(t.listener(s),c.removeListener(r,a))},this.wire.me.name||(this.wire.me.name=this.wire.me.uuid),c=new se._Window(this.wire,this.wire.me),c.on(r,a)),this.wire.sendAction(e,t).then((({payload:e})=>{o=e.data.uuid,n(e.data),s&&o===s.uuid&&(t.listener(s),c.removeListener(r,a))})).catch((e=>{c&&c.removeListener(r,a),i(e)}))}))}getVersion(){return this.wire.sendAction("get-version").then((({payload:e})=>e.data))}clearCache(e){return this.wire.sendAction("clear-cache",e).then((()=>{}))}deleteCacheOnExit(){return this.wire.sendAction("delete-cache-request").then((()=>{}))}exit(){return this.wire.sendAction("exit-desktop").then((()=>{}))}async fetchManifest(e){const{payload:{data:t}}=await this.wire.sendAction("fetch-manifest",{manifestUrl:e});return t}flushCookieStore(){return this.wire.sendAction("flush-cookie-store").then((()=>{}))}getAllWindows(){return this.wire.sendAction("get-all-windows").then((({payload:e})=>e.data))}getAllApplications(){return this.wire.sendAction("get-all-applications").then((({payload:e})=>e.data))}getCommandLineArguments(){return this.wire.sendAction("get-command-line-arguments").then((({payload:e})=>e.data))}async getCrashReporterState(){const{payload:{data:{diagnosticMode:e,isRunning:t}}}=await this.wire.sendAction("get-crash-reporter-state");return console.warn("diagnosticMode property is deprecated. It will be removed in a future version"),{diagnosticMode:e,diagnosticsMode:e,isRunning:t}}async startCrashReporter(e){const t=e,n={...t,diagnosticMode:t.diagnosticsMode||t.diagnosticMode},{payload:{data:{diagnosticMode:i,isRunning:r}}}=await this.wire.sendAction("start-crash-reporter",n);return{diagnosticMode:i,diagnosticsMode:i,isRunning:r}}getUniqueUserId(){return this.wire.sendAction("get-unique-user-id").then((({payload:e})=>e.data))}getEntityInfo(e,t){return this.wire.sendAction("get-entity-info",{uuid:e,name:t}).then((({payload:e})=>e.data))}getEnvironmentVariable(e){return this.wire.sendAction("get-environment-variable",{environmentVariables:e}).then((({payload:e})=>e.data))}getFocusedWindow(){return this.wire.sendAction("get-focused-window").then((({payload:e})=>e.data))}async isAppCertified(e){const{payload:{data:{certifiedInfo:t}}}=await this.wire.sendAction("is-app-certified",{manifestUrl:e});return t}getInstalledRuntimes(){return this.wire.sendAction("get-installed-runtimes").then((({payload:e})=>e.data.runtimes))}async getInstalledApps(){const{payload:{data:{installedApps:e}}}=await this.wire.sendAction("get-installed-apps");return e}getLog(e){return this.wire.sendAction("view-log",e).then((({payload:e})=>e.data))}getMachineId(){return this.wire.sendAction("get-machine-id").then((({payload:e})=>e.data))}getMinLogLevel(){return this.wire.sendAction("get-min-log-level").then((({payload:e})=>e.data))}getLogList(){return this.wire.sendAction("list-logs").then((({payload:e})=>e.data))}getMonitorInfo(){return this.wire.sendAction("get-monitor-info").then((({payload:e})=>e.data))}getMousePosition(){return this.wire.sendAction("get-mouse-position").then((({payload:e})=>e.data))}getProcessList(){return console.warn("System.getProcessList has been deprecated. Please consider using our new process APIs: Window.getProcessInfo, View.getProcessInfo, Application.getProcessInfo, System.getAllProcessInfo"),this.wire.sendAction("process-snapshot").then((({payload:e})=>e.data))}async getAllProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction("get-all-process-info",this.identity);return e}getProxySettings(){return this.wire.sendAction("get-proxy-settings").then((({payload:e})=>e.data))}getRuntimeInfo(){return this.wire.sendAction("get-runtime-info").then((({payload:e})=>e.data))}getRvmInfo(){return this.wire.sendAction("get-rvm-info").then((({payload:e})=>e.data))}getHostSpecs(){return this.wire.sendAction("get-host-specs").then((({payload:e})=>e.data))}getOSInfo(){return this.wire.sendAction("get-os-info").then((({payload:e})=>e.data))}launchExternalProcess(e){return this.sendExternalProcessRequest("launch-external-process",e)}monitorExternalProcess(e){return this.sendExternalProcessRequest("monitor-external-process",e)}log(e,t){return this.wire.sendAction("write-to-log",{level:e,message:t}).then((()=>{}))}openUrlWithBrowser(e){return this.wire.sendAction("open-url-with-browser",{url:e}).then((()=>{}))}async registerCustomProtocol(e){if("object"!=typeof e)throw new Error("Must provide an object with a `protocolName` property having a string value.");await this.wire.sendAction("register-custom-protocol",e)}async unregisterCustomProtocol(e){await this.wire.sendAction("unregister-custom-protocol",{protocolName:e})}async getCustomProtocolState(e){return this.wire.sendAction("get-custom-protocol-state",{protocolName:e}).then((({payload:e})=>e.data))}releaseExternalProcess(e){return this.wire.sendAction("release-external-process",{uuid:e}).then((()=>{}))}showDeveloperTools(e){return this.wire.sendAction("show-developer-tools",e).then((()=>{}))}terminateExternalProcess(e){return this.wire.sendAction("terminate-external-process",e).then((()=>{}))}updateProxySettings(e){return this.wire.sendAction("update-proxy",e).then((()=>{}))}async downloadAsset(e,t){const n=()=>{};let i=n,r=n;const o=new Promise(((e,t)=>{i=e,r=t}));if("openfin"!==this.wire.environment.type)throw new oe.NotSupportedError("downloadAsset only supported in an OpenFin Render process");const s=oe.RuntimeError.getCallSite(),a=this.wire.environment.getNextMessageId().toString(),c=`asset-download-progress-${a}`,d=`asset-download-error-${a}`,h=`asset-download-complete-${a}`,l=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},u=()=>{this.removeListener(c,l)};await Promise.all([this.on(c,l),this.once(d,(e=>{u();const{reason:t,err:n}=e;r(new oe.RuntimeError({reason:t,error:n},s))})),this.once(h,(()=>{u(),i()}))]);const p=Object.assign(e,{downloadId:a});return await this.wire.sendAction("download-asset",p).catch((e=>{throw u(),e})),o}downloadRuntime(e,t){const n=oe.RuntimeError.getCallSite();return new Promise(((i,r)=>{if("openfin"!==this.wire.environment.type)return void r(new oe.NotSupportedError("downloadRuntime only supported in an OpenFin Render process"));const o=this.wire.environment.getNextMessageId().toString(),s=`runtime-download-progress-${o}`,a=`runtime-download-error-${o}`,c=`runtime-download-complete-${o}`,d=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},h=()=>{this.removeListener(s,d)};this.on(s,d),this.once(a,(e=>{h();const{reason:t,err:i}=e;r(new oe.RuntimeError({reason:t,error:i},n))})),this.once(c,(()=>{h(),i()}));const l=Object.assign(e,{downloadId:o});this.wire.sendAction("download-runtime",l).catch((e=>{h(),r(e)}))}))}downloadPreloadScripts(e){return this.wire.sendAction("download-preload-scripts",{scripts:e}).then((({payload:e})=>e.data))}getAllExternalApplications(){return this.wire.sendAction("get-all-external-applications").then((({payload:e})=>e.data))}getAppAssetInfo(e){return this.wire.sendAction("get-app-asset-info",e).then((({payload:e})=>e.data))}getCookies(e){const t=this.wire.environment.getUrl(),n=Object.assign(e,{url:t});return this.wire.sendAction("get-cookies",n).then((({payload:e})=>e.data))}setMinLogLevel(e){return this.wire.sendAction("set-min-log-level",{level:e}).then((()=>{}))}resolveUuid(e){return this.wire.sendAction("resolve-uuid",{entityKey:e}).then((({payload:e})=>e.data))}executeOnRemote(e,t){return t.requestingIdentity=e,this.wire.ferryAction(t)}readRegistryValue(e,t,n){return this.wire.sendAction("read-registry-value",{rootKey:e,subkey:t,value:n}).then((({payload:e})=>e.data))}registerExternalConnection(e){return this.wire.sendAction("register-external-connection",{uuid:e}).then((({payload:e})=>e.data))}async getServiceConfiguration(e){if("string"!=typeof e.name)throw new Error("Must provide an object with a `name` property having a string value");const{name:t}=e;return this.wire.sendAction("get-service-configuration",{name:t}).then((({payload:e})=>e.data))}async getSystemAppConfig(e){if("string"!=typeof e)throw new Error("Must provide a string value for name of system app");return this.wire.sendAction("get-system-app-configuration",{name:e}).then((({payload:e})=>e.data))}async registerShutdownHandler(e){this.wire.sendAction("system-register-shutdown-handler").catch((e=>{}));const{uuid:t,name:n}=this.wire.me;this.on("system-shutdown",(i=>{e({proceed:()=>{this.wire.environment.raiseEvent("application/system-shutdown-handled",{uuid:t,name:n,topic:"application"})}})}))}runRvmHealthCheck(){return this.wire.sendAction("run-rvm-health-check").then((({payload:e})=>e.data))}async launchManifest(e,t={}){const{subscribe:n,...i}=t,r=i;if(n){const e=new ae.EventEmitter;n(e);const t="app-version-progress",i="runtime-status",o="app-version-complete",s="app-version-error",a=this.wire.environment.getNextMessageId().toString();r.appVersionId=a;const c=[o,t,i,s],d=e=>{const{appVersionId:t,topic:n,type:i,...r}=e;return{...r,type:c.find((e=>i.includes(e)))}},h=t=>{const n=d(t);e.emit(n.type,n)},l=()=>{this.removeListener(`${t}.${a}`,h),this.removeListener(`${i}.${a}`,h),this.removeListener(`${o}.${a}`,h),this.removeListener(`${s}.${a}`,h),this.removeListener(`${o}.${a}`,l),this.removeListener(`${s}.${a}`,l)};await Promise.all([this.on(`${t}.${a}`,h),this.on(`${i}.${a}`,h),this.once(`${o}.${a}`,h),this.once(`${s}.${a}`,h),this.once(`${o}.${a}`,l),this.once(`${s}.${a}`,l)])}return(await this.wire.sendAction("launch-manifest",{manifestUrl:e,opts:r})).payload.data.manifest}async queryPermissionForCurrentContext(e){const t={uuid:this.wire.me.uuid,name:this.wire.me.name};return(await this.wire.sendAction("query-permission-for-current-context",{apiName:e,identity:t})).payload.data}async enableNativeWindowIntegrationProvider(e){const{payload:t}=await this.wire.sendAction("enable-native-window-integration-provider",{permissions:e});return t.data}async registerUsage({data:e,type:t}){await this.wire.sendAction("register-usage",{data:e,type:t})}async getPrinters(){const{payload:e}=await this.wire.sendAction("system-get-printers");return e.data}async updateProcessLoggingOptions(e){await this.wire.sendAction("system-update-process-logging-options",{options:e})}async getDomainSettings(){const{payload:{data:e}}=await this.wire.sendAction("get-domain-settings",this.identity);return e}async setDomainSettings(e){await this.wire.sendAction("set-domain-settings",{domainSettings:e,...this.identity})}async refreshExtensions(){const{payload:e}=await this.wire.sendAction("refresh-extensions");return e.data}async getInstalledExtensions(){const{payload:e}=await this.wire.sendAction("get-installed-extensions");return e.data}}c.System=ce;var de={},he={};Object.defineProperty(he,"__esModule",{value:!0}),he.RefCounter=void 0;he.RefCounter=class{constructor(){this.topicRefMap=new Map}incRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t+1;n=i,this.topicRefMap.set(e,i)}else this.topicRefMap.set(e,1),n=1;return n}decRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t-1;this.topicRefMap.set(e,i),n=i}else n=-1;return n}actOnFirst(e,t,n){return 1===this.incRefCount(e)?t():n()}actOnLast(e,t,n){return 0===this.decRefCount(e)?t():n()}};var le={},ue={},pe={};Object.defineProperty(pe,"__esModule",{value:!0}),pe.ChannelBase=pe.ProtectedItems=void 0;const we=e=>async(t,n,i)=>{const r=await e(t,n,i);return void 0===r?n:r};pe.ProtectedItems=class{constructor(e,t){this.providerIdentity=e,this.close=t}};class ye{static defaultAction(e){throw new Error(`No action registered at target for ${e}`)}constructor(){this.subscriptions=new Map}async processAction(e,t,n){try{const i=this.subscriptions.has(e)?this.subscriptions.get(e):(t,n)=>(this.defaultAction??ye.defaultAction)(e,t,n),r=this.preAction?await this.preAction(e,t,n):t,o=await i(r,n);return this.postAction?await this.postAction(e,o,n):o}catch(t){if(this.errorMiddleware)return this.errorMiddleware(e,t,n);throw t}}beforeAction(e){if(this.preAction)throw new Error("Already registered beforeAction middleware");this.preAction=we(e)}onError(e){if(this.errorMiddleware)throw new Error("Already registered error middleware");this.errorMiddleware=e}afterAction(e){if(this.postAction)throw new Error("Already registered afterAction middleware");this.postAction=we(e)}remove(e){this.subscriptions.delete(e)}setDefaultAction(e){if(this.defaultAction)throw new Error("default action can only be set once");this.defaultAction=e}register(e,t){if(this.subscriptions.has(e))throw new Error(`Subscription already registered for action: ${e}. Unsubscribe before adding new subscription`);return this.subscriptions.set(e,t),!0}}pe.ChannelBase=ye;var fe,ge,me,ve=s&&s.__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)},Ce=s&&s.__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};Object.defineProperty(ue,"__esModule",{value:!0}),ue.ChannelClient=void 0;const be=pe,Ie=new Map;class Ee extends be.ChannelBase{static closeChannelByEndpointId(e){const t=Ie.get(e);t&&ve(t,me,"f").call(t)}static handleProviderDisconnect(e){for(const t of Ie.values())t.providerIdentity.channelId===e.channelId&&(t.disconnectListener(e),ve(t,me,"f").call(t))}constructor(e,t,n){super(),fe.set(this,void 0),ge.set(this,void 0),this.processAction=(e,t,n)=>super.processAction(e,t,n),me.set(this,(()=>{Ie.delete(this.endpointId),ve(this,ge,"f").close()})),Ce(this,fe,new be.ProtectedItems(e,t),"f"),this.disconnectListener=()=>{},this.endpointId=e.endpointId,Ce(this,ge,n,"f"),Ie.set(this.endpointId,this),n.receive(this.processAction)}get providerIdentity(){return ve(this,fe,"f").providerIdentity}async dispatch(e,t){if(ve(this,ge,"f").isEndpointConnected(this.providerIdentity.channelId))return ve(this,ge,"f").send(this.providerIdentity.channelId,e,t);throw new Error("The client you are trying to dispatch from is disconnected from the target provider.")}onDisconnection(e){this.disconnectListener=t=>{try{e(t)}catch(e){throw new Error(`Error while calling the onDisconnection callback: ${e.message}`)}finally{this.disconnectListener=()=>{}}}}async disconnect(){await this.sendDisconnectAction(),ve(this,me,"f").call(this)}async sendDisconnectAction(){const e=ve(this,fe,"f");await e.close()}static async wireClose(e,t,n){const{channelName:i,uuid:r,name:o}=t;await e.sendAction("disconnect-from-channel",{channelName:i,uuid:r,name:o,endpointId:n})}}ue.ChannelClient=Ee,fe=new WeakMap,ge=new WeakMap,me=new WeakMap;var xe={},Ae={};Object.defineProperty(Ae,"__esModule",{value:!0}),Ae.exhaustiveCheck=void 0,Ae.exhaustiveCheck=function(e,t){throw new Error(`Unsupported value: ${e}${t?`\n Supported values are: ${t.join("")}`:""}`)};var Pe,Me,_e,Oe={},Se=s&&s.__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},Re=s&&s.__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)};Object.defineProperty(Oe,"__esModule",{value:!0}),Oe.ClassicInfo=Oe.ClassicStrategy=void 0;Oe.ClassicStrategy=class{constructor(e,t,n,i){this.messageReceiver=t,this.endpointId=n,this.providerIdentity=i,Pe.set(this,void 0),Me.set(this,new Map),_e.set(this,new Map),this.send=async(e,t,n)=>{const i=Re(this,Me,"f").get(e);if(!i)throw new Error(`Could not locate routing info for endpoint ${e}`);const r={...i};r.isLocalEndpointId&&delete r.endpointId,delete r.isLocalEndpointId;const o=Re(this,Pe,"f").sendAction("send-channel-message",{...r,providerIdentity:this.providerIdentity,action:t,payload:n});Re(this,_e,"f").get(e)?.add(o);return(await o.catch((e=>{throw new Error(e.message)})).finally((()=>{Re(this,_e,"f").get(e)?.delete(o)}))).payload.data.result},this.close=async()=>{this.messageReceiver.removeEndpoint(this.providerIdentity.channelId,this.endpointId),[...Re(this,Me,"f").keys()].forEach((e=>this.closeEndpoint(e))),Se(this,Me,new Map,"f")},Se(this,Pe,e,"f")}onEndpointDisconnect(e,t){}receive(e){this.messageReceiver.addEndpoint(e,this.providerIdentity.channelId,this.endpointId)}async closeEndpoint(e){const t=Re(this,Me,"f").get(e);Re(this,Me,"f").delete(e);const n=Re(this,_e,"f").get(e);n?.forEach((n=>{const i=`Channel connection with identity uuid: ${t?.uuid} / name: ${t?.name} / endpointId: ${e} no longer connected.`;n.cancel(new Error(i))}))}isEndpointConnected(e){return Re(this,Me,"f").has(e)}addEndpoint(e,t){Re(this,Me,"f").set(e,t.endpointIdentity),Re(this,_e,"f").set(e,new Set)}isValidEndpointPayload(e){return"string"==typeof e?.endpointIdentity?.endpointId||"string"==typeof e?.endpointIdentity?.channelId}},Pe=new WeakMap,Me=new WeakMap,_e=new WeakMap,Oe.ClassicInfo={version:5,minimumVersion:0,type:"classic"};var Fe={},je={},ke={};Object.defineProperty(ke,"__esModule",{value:!0}),ke.errorToPOJO=void 0,ke.errorToPOJO=function(e){return{stack:e.stack,name:e.name,message:e.message,toString:()=>e.stack||e.toString()}};var Le,Te,$e=s&&s.__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)},Be=s&&s.__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};Object.defineProperty(je,"__esModule",{value:!0}),je.RTCEndpoint=void 0;const Ge=ke;je.RTCEndpoint=class{static isValidEndpointPayload(e){const t=e=>"object"==typeof e&&null!==e;return t(e)&&t(e.endpointIdentity)&&t(e.rtc)&&"string"==typeof e.endpointIdentity.endpointId}constructor({rtc:e,endpointIdentity:t}){this.responseMap=new Map,Le.set(this,null),Te.set(this,void 0),this.connectionStateChangeHandler=e=>{"connected"!==this.rtc.rtcClient.connectionState&&(this.rtc.rtcClient.removeEventListener("connectionstatechange",this.connectionStateChangeHandler),this.close(),$e(this,Te,"f")&&$e(this,Te,"f").call(this))},this.send=async(e,t)=>{const n=`message-${Math.random()}`,i=new Promise(((e,t)=>{this.responseMap.set(n,{resolve:e,reject:t})}));return this.rtc.channels.request.send(JSON.stringify({action:e,payload:t,messageId:n})),i},this.close=()=>{this.responseMap.forEach((e=>e.reject("Connection has closed."))),this.responseMap=new Map,this.rtc.channels.request.close(),this.rtc.channels.response.close(),this.rtc.rtcClient.close()},this.rtc=e,this.endpointIdentity=t,this.rtc.channels.response.addEventListener("message",(e=>{let{data:t}=e;e.data instanceof ArrayBuffer&&(t=(new TextDecoder).decode(e.data));const{messageId:n,payload:i,success:r,error:o}=JSON.parse(t),{resolve:s,reject:a}=this.responseMap.get(n)??{};s&&a?(this.responseMap.delete(n),r?s(i):a(o)):(console.log("Could not find id in responseMap."),console.log(e))})),this.rtc.channels.request.addEventListener("message",(async e=>{let{data:n}=e;e.data instanceof ArrayBuffer&&(n=(new TextDecoder).decode(e.data));const{messageId:i,action:r,payload:o}=JSON.parse(n);if($e(this,Le,"f"))try{const e=await $e(this,Le,"f").call(this,r,o,t);this.rtc.channels.response.send(JSON.stringify({messageId:i,payload:e,success:!0}))}catch(e){"open"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,error:(0,Ge.errorToPOJO)(e),success:!1}))}else"open"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,success:!1,error:"Connection not ready."}))})),this.rtc.rtcClient.addEventListener("connectionstatechange",this.connectionStateChangeHandler),Object.values(this.rtc.channels).forEach((e=>{e.onclose=e=>{[...this.responseMap.values()].forEach((e=>e.reject(new Error("RTCDataChannel closed unexpectedly, this is most commonly caused by message size. Note: RTC Channels have a message size limit of ~255kB.")))),this.close(),$e(this,Te,"f")&&$e(this,Te,"f").call(this)}}))}onDisconnect(e){if($e(this,Te,"f"))throw new Error("RTCEndpoint disconnectListener cannot be set twice.");Be(this,Te,e,"f")}receive(e){if($e(this,Le,"f"))throw new Error("You have already set a listener for this RTC Endpoint.");Be(this,Le,e,"f")}get connected(){return"connected"===this.rtc.rtcClient.connectionState}},Le=new WeakMap,Te=new WeakMap;var We,He,Ne,De={},Ue=s&&s.__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)},Ve=s&&s.__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};Object.defineProperty(De,"__esModule",{value:!0}),De.EndpointStrategy=void 0;De.EndpointStrategy=class{constructor(e,t,n){this.EndpointType=e,this.StrategyName=n,We.set(this,null),He.set(this,new Map),Ne.set(this,!0),this.send=async(e,t,n)=>this.getEndpointById(e).send(t,n),this.close=async()=>{Ue(this,Ne,"f")&&(Ue(this,He,"f").forEach((e=>e.close())),Ve(this,He,new Map,"f")),Ve(this,Ne,!1,"f")},this.isValidEndpointPayload=t}onEndpointDisconnect(e,t){this.getEndpointById(e).onDisconnect(t)}receive(e){if(Ue(this,We,"f"))throw new Error(`You have already set a listener for this ${this.StrategyName} Strategy`);Ve(this,We,e,"f"),Ue(this,He,"f").forEach((e=>e.receive(Ue(this,We,"f"))))}getEndpointById(e){const t=Ue(this,He,"f").get(e);if(!t)throw new Error(`Client with endpoint id ${e} is not connected`);return t}get connected(){return Ue(this,Ne,"f")}isEndpointConnected(e){return Ue(this,He,"f").has(e)}addEndpoint(e,t){if(!Ue(this,Ne,"f"))return void console.warn(`Adding endpoint to disconnected ${this.StrategyName} Strategy`);const n=new this.EndpointType(t);Ue(this,We,"f")&&n.receive(Ue(this,We,"f")),Ue(this,He,"f").set(e,n)}async closeEndpoint(e){Ue(this,He,"f").delete(e)}},We=new WeakMap,He=new WeakMap,Ne=new WeakMap,Object.defineProperty(Fe,"__esModule",{value:!0}),Fe.RTCInfo=Fe.RTCStrategy=void 0;const ze=je,Ke=De;class qe extends Ke.EndpointStrategy{constructor(){super(ze.RTCEndpoint,ze.RTCEndpoint.isValidEndpointPayload,"RTC")}}Fe.RTCStrategy=qe,Fe.RTCInfo={version:2,minimumVersion:0,type:"rtc"};var Je={};Object.defineProperty(Je,"__esModule",{value:!0}),Je.RTCICEManager=void 0;const Ye=d;class Ze extends Ye.EmitterBase{constructor(e){super(e,"channel"),this.ensureChannelOpened=e=>new Promise(((t,n)=>{if("open"===e.readyState)t();else if("connecting"===e.readyState){const n=()=>{e.removeEventListener("open",n),t()};e.addEventListener("open",n)}else n(new Error("This Channel has already closed"))}))}static createDataChannelPromise(e,t){let n;const i=new Promise((e=>{n=e})),r=i=>{const o=()=>{i.channel.removeEventListener("open",o),n(i.channel)};i.channel.label===e&&(i.channel.addEventListener("open",o),t.removeEventListener("datachannel",r))};return t.addEventListener("datachannel",r),i}async listenForProviderIce(e,t){await this.on(this.createProviderEventName(e),t,{timestamp:Date.now()})}async raiseProviderIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createProviderEventName(e)),t)}async listenForClientIce(e,t){await this.on(this.createClientEventName(e),t,{timestamp:Date.now()})}async raiseClientIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createClientEventName(e)),t)}cleanupIceListeners(e){this.removeAllListeners(this.createClientEventName(e)),this.removeAllListeners(this.createProviderEventName(e))}createClientEventName(e){return`ice-client-${e}`}createProviderEventName(e){return`ice-provider-${e}`}createRouteString(e){return`channel/${e}`}createRtcPeer(){return this.wire.environment.getRtcPeer()}async startClientOffer(){const e=Math.random().toString(),t=this.createRtcPeer();t.addEventListener("icecandidate",(async t=>{t.candidate&&await this.raiseClientIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForProviderIce(e,(async e=>{await t.addIceCandidate(e.candidate)}));const n={request:t.createDataChannel("request"),response:t.createDataChannel("response")},i=await t.createOffer();await t.setLocalDescription(i);const r=Promise.all([n.request,n.response].map(this.ensureChannelOpened)).then((()=>{}));return{rtcClient:t,channels:n,offer:i,rtcConnectionId:e,channelsOpened:r}}async finishClientOffer(e,t,n){return await e.setRemoteDescription(t),await n,!0}async createProviderAnswer(e,t){const n=this.createRtcPeer(),i=Ze.createDataChannelPromise("request",n),r=Ze.createDataChannelPromise("response",n);n.addEventListener("icecandidate",(async t=>{t.candidate&&await this.raiseProviderIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForClientIce(e,(async e=>{await n.addIceCandidate(e.candidate)})),await n.setRemoteDescription(t);const o=await n.createAnswer();await n.setLocalDescription(o);const s=Promise.all([i,r]).then((([t,n])=>(this.cleanupIceListeners(e),{request:t,response:n})));return{rtcClient:n,answer:o,channels:s}}}Je.RTCICEManager=Ze;var Qe={},Xe={};function et(e){return[...e.split(".").reverse().entries()].reduce(((e,[t,n])=>e+ +n*1e4**t),0)}function tt(e,t){return et(e)>=et(t)}function nt(e){return e.split("/")[0]}Object.defineProperty(Xe,"__esModule",{value:!0}),Xe.runtimeUuidMeetsMinimumRuntimeVersion=Xe.parseRuntimeUuid=Xe.meetsMinimumRuntimeVersion=void 0,Xe.meetsMinimumRuntimeVersion=tt,Xe.parseRuntimeUuid=nt,Xe.runtimeUuidMeetsMinimumRuntimeVersion=function(e,t){return tt(nt(e),t)};var it,rt,ot,st,at,ct=s&&s.__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)},dt=s&&s.__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};Object.defineProperty(Qe,"__esModule",{value:!0}),Qe.ChannelProvider=void 0;const ht=pe,lt=Xe;class ut extends ht.ChannelBase{get connections(){return[...ct(this,it,"f")]}static handleClientDisconnection(e,t){const n=e.connections.find((e=>e.endpointId===t.endpointId));if(n)ct(e,st,"f").call(e,n);else{e.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name)).forEach(ct(e,st,"f"))}e.disconnectListener(t)}static setProviderRemoval(e,t){ut.removalMap.set(e,t)}constructor(e,t,n){super(),it.set(this,void 0),rt.set(this,void 0),ot.set(this,void 0),st.set(this,(e=>{const t=this.connections.filter((t=>t.endpointId!==e.endpointId));ct(this,ot,"f").closeEndpoint(e.endpointId),dt(this,it,t,"f")})),this.processAction=async(e,t,n)=>(ut.clientIsMultiRuntime(n)&&!(0,lt.runtimeUuidMeetsMinimumRuntimeVersion)(n.runtimeUuid,"18.87.56.0")?this.handleMultiRuntimeLegacyClient(n):this.checkForClientConnection(n),super.processAction(e,t,n)),at.set(this,(()=>{ct(this,ot,"f").close();const e=ut.removalMap.get(this);e&&e()})),dt(this,rt,new ht.ProtectedItems(e,t),"f"),this.connectListener=()=>{},this.disconnectListener=()=>{},dt(this,it,[],"f"),dt(this,ot,n,"f"),n.receive(this.processAction)}dispatch(e,t,n){const i=e.endpointId??this.getEndpointIdForOpenFinId(e,t);return i&&ct(this,ot,"f").isEndpointConnected(i)?ct(this,ot,"f").send(i,t,n):Promise.reject(new Error(`Client connection with identity uuid: ${e.uuid} / name: ${e.name} / endpointId: ${i} no longer connected.`))}async processConnection(e,t){return ct(this,it,"f").push(e),this.connectListener(e,t)}publish(e,t){return this.connections.map((n=>ct(this,ot,"f").send(n.endpointId,e,t)))}onConnection(e){this.connectListener=e}onDisconnection(e){this.disconnectListener=e}async destroy(){const e=ct(this,rt,"f");e.providerIdentity,dt(this,it,[],"f"),await e.close(),ct(this,at,"f").call(this)}async getAllClientInfo(){return this.connections.map((e=>{const{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}=e;return{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}}))}checkForClientConnection(e){if(!this.isClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider.\n Client Identity: {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}isClientConnected(e){return ut.clientIdentityIncludesEndpointId(e)?this.connections.some((t=>t.endpointId===e.endpointId&&t.uuid===e.uuid&&t.name===e.name)):this.isLegacyClientConnected(e)}isLegacyClientConnected(e){return this.connections.some((t=>t.uuid===e.uuid&&t.name===e.name))}handleMultiRuntimeLegacyClient(e){if(!this.isLegacyClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider. Client Identity:\n {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}getEndpointIdForOpenFinId(e,t){const n=this.connections.filter((t=>t.name===e.name&&t.uuid===e.uuid));if(n.length>=2){const n=ct(this,rt,"f"),{uuid:i,name:r}=e,o=n?.providerIdentity.uuid,s=n?.providerIdentity.name;console.warn(`WARNING: Dispatch call may have unintended results. The "to" argument of your dispatch call is missing the\n "endpointId" parameter. The identity you are dispatching to ({uuid: ${i}, name: ${r}})\n has multiple channelClients for this channel. Your dispatched action: (${t}) from the provider:\n ({uuid: ${o}, name: ${s}}) will only be processed by the most recently-created client.`)}return n.pop()?.endpointId}static clientIdentityIncludesEndpointId(e){return void 0!==e.endpointId}static clientIsMultiRuntime(e){return void 0!==e.runtimeUuid}static async wireClose(e,t){await e.sendAction("destroy-channel",{channelName:t})}}Qe.ChannelProvider=ut,it=new WeakMap,rt=new WeakMap,ot=new WeakMap,st=new WeakMap,at=new WeakMap,ut.removalMap=new WeakMap;var pt={};Object.defineProperty(pt,"__esModule",{value:!0}),pt.MessageReceiver=void 0;const wt=ue,yt=d;class ft extends yt.Base{constructor(e){super(e),this.onmessage=e=>"process-channel-message"===e.action&&(this.processChannelMessage(e),!0),this.endpointMap=new Map,this.latestEndpointIdByChannelId=new Map,e.registerMessageHandler(this.onmessage.bind(this))}async processChannelMessage(e){const{senderIdentity:t,providerIdentity:n,action:i,ackToSender:r,payload:o,intendedTargetIdentity:s}=e.payload,a=s.channelId??s.endpointId??this.latestEndpointIdByChannelId.get(n.channelId),c=this.endpointMap.get(a);if(!c)return r.payload.success=!1,r.payload.reason=`Client connection with identity uuid: ${this.wire.me.uuid} / name: ${this.wire.me.name} / endpointId: ${a} no longer connected.`,this.wire.sendRaw(r);try{const e=await c(i,o,t);return r.payload.payload=r.payload.payload||{},r.payload.payload.result=e,this.wire.sendRaw(r)}catch(e){return r.payload.success=!1,r.payload.reason=e.message,this.wire.sendRaw(r)}}addEndpoint(e,t,n){this.endpointMap.set(n,e),t!==n&&this.latestEndpointIdByChannelId.set(t,n)}removeEndpoint(e,t){this.endpointMap.delete(t),this.latestEndpointIdByChannelId.get(e)===t&&this.latestEndpointIdByChannelId.delete(e)}checkForPreviousClientConnection(e){const t=this.latestEndpointIdByChannelId.get(e);t&&(wt.ChannelClient.closeChannelByEndpointId(t),console.warn("You have created a second connection to an older provider. First connection has been removed from the clientMap"),console.warn("If the provider calls publish(), you may receive multiple messages."))}}pt.MessageReceiver=ft;var gt={};Object.defineProperty(gt,"__esModule",{value:!0}),gt.ProtocolManager=void 0;gt.ProtocolManager=class{constructor(e){this.ProtocolsInPreferenceOrder=e,this.DefaultClientProtocols=["classic"],this.DefaultProviderProtocols=["classic"],this.getClientProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultClientProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(", ")}.`);return t},this.getProviderProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultProviderProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(", ")}.`);return t},this.getCompatibleProtocols=(e,t)=>t.supportedProtocols.filter((t=>e.some((e=>e.type===t.type&&t.version>=e.minimumVersion&&e.version>=(t.minimumVersion??0))))).slice(0,t.maxProtocols)}};var mt={};Object.defineProperty(mt,"__esModule",{value:!0});class vt{static combine(e,t){return new vt(e,t)}constructor(e,t){this.primary=e,this.secondary=t}onEndpointDisconnect(e,t){this.primary.onEndpointDisconnect(e,(()=>{this.secondary.isEndpointConnected(e)||t()})),this.secondary.onEndpointDisconnect(e,(()=>{this.primary.isEndpointConnected(e)||t()}))}isValidEndpointPayload(e){return this.primary.isValidEndpointPayload(e)||this.secondary.isValidEndpointPayload(e)}async closeEndpoint(e){await this.primary.closeEndpoint(e),await this.secondary.closeEndpoint(e)}isEndpointConnected(e){return this.primary.isEndpointConnected(e)||this.secondary.isEndpointConnected(e)}async addEndpoint(e,t){this.primary.isValidEndpointPayload(t)&&await this.primary.addEndpoint(e,t),this.secondary.isValidEndpointPayload(t)&&await this.secondary.addEndpoint(e,t)}receive(e){this.primary.receive(e),this.secondary.receive(e)}send(e,t,n){return this.primary.isEndpointConnected(e)?this.primary.send(e,t,n):this.secondary.send(e,t,n)}async close(){await Promise.all([this.primary.close(),this.secondary.close()])}}mt.default=vt;var Ct,bt,It=s&&s.__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},Et=s&&s.__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)},xt=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(xe,"__esModule",{value:!0}),xe.ConnectionManager=void 0;const At=Ae,Pt=d,Mt=Oe,_t=Fe,Ot=Je,St=Qe,Rt=pt,Ft=gt,jt=xt(mt);class kt extends Pt.Base{static getProtocolOptionsFromStrings(e){return e.map((e=>{switch(e){case"rtc":return _t.RTCInfo;case"classic":return Mt.ClassicInfo;default:return(0,At.exhaustiveCheck)(e,["rtc","classic"])}}))}constructor(e){super(e),Ct.set(this,void 0),bt.set(this,void 0),this.removeChannelFromProviderMap=e=>{this.providerMap.delete(e)},this.onmessage=e=>"process-channel-connection"===e.action&&(this.processChannelConnection(e),!0),this.providerMap=new Map,this.protocolManager=new Ft.ProtocolManager("node"===this.wire.environment.type?["classic"]:["rtc","classic"]),It(this,Ct,new Rt.MessageReceiver(e),"f"),It(this,bt,new Ot.RTCICEManager(e),"f"),e.registerMessageHandler(this.onmessage.bind(this))}createProvider(e,t){const n=Object.assign(this.wire.environment.getDefaultChannelOptions().create,e||{}),i=this.protocolManager.getProviderProtocols(n?.protocols),r=i.map((e=>{switch(e){case"rtc":return new _t.RTCStrategy;case"classic":return new Mt.ClassicStrategy(this.wire,Et(this,Ct,"f"),t.channelId,t);default:return(0,At.exhaustiveCheck)(e,["rtc","classic"])}}));let o;if(2===r.length){const[e,t]=r;o=jt.default.combine(e,t)}else{if(1!==r.length)throw new Error("failed to combine strategies");[o]=r}const s=new St.ChannelProvider(t,(()=>St.ChannelProvider.wireClose(this.wire,t.channelName)),o),a=t.channelId;return this.providerMap.set(a,{provider:s,strategy:o,supportedProtocols:kt.getProtocolOptionsFromStrings(i)}),St.ChannelProvider.setProviderRemoval(s,this.removeChannelFromProviderMap.bind(this)),s}async createClientOffer(e){const t=this.protocolManager.getClientProtocols(e?.protocols);let n;return{offer:{supportedProtocols:await Promise.all(t.map((async e=>{switch(e){case"rtc":{const{rtcClient:e,channels:t,offer:i,rtcConnectionId:r,channelsOpened:o}=await Et(this,bt,"f").startClientOffer();return n={rtcClient:e,channels:t,channelsOpened:o},{type:"rtc",version:_t.RTCInfo.version,payload:{offer:i,rtcConnectionId:r}}}case"classic":return{type:"classic",version:Mt.ClassicInfo.version};default:return(0,At.exhaustiveCheck)(e,["rtc","classic"])}}))),maxProtocols:2},rtc:n}}async createClientStrategy(e,t){t.endpointId||(t.endpointId=this.wire.environment.getNextMessageId(),Et(this,Ct,"f").checkForPreviousClientConnection(t.channelId));const n=t.answer??{supportedProtocols:[{type:"classic",version:1}]},i=(await Promise.all(n.supportedProtocols.map((async n=>"rtc"===n.type&&e?(await Et(this,bt,"f").finishClientOffer(e.rtcClient,n.payload.answer,e.channelsOpened),new _t.RTCStrategy):"classic"===n.type?new Mt.ClassicStrategy(this.wire,Et(this,Ct,"f"),t.endpointId,t):null)))).filter((e=>null!==e));let r;if(e&&!i.some((e=>e instanceof _t.RTCStrategy))&&e&&e.rtcClient.close(),i.length>=2)r=jt.default.combine(i[0],i[1]);else{if(!i.length)throw new Error("No compatible protocols");[r]=i}const o={endpointIdentity:t,rtc:e};return r.addEndpoint(t.channelId,o),r}async processChannelConnection(e){const{clientIdentity:t,providerIdentity:n,ackToSender:i,payload:r,offer:o}=e.payload;t.endpointId?t.isLocalEndpointId=!1:(t.endpointId=this.wire.environment.getNextMessageId(),t.isLocalEndpointId=!0);const s=n.channelId,a=this.providerMap.get(s);if(!a)return i.payload.success=!1,i.payload.reason=`Channel "${n.channelName}" has been destroyed.`,this.wire.sendRaw(i);const{provider:c,strategy:d,supportedProtocols:h}=a;try{if(!(c instanceof St.ChannelProvider))throw Error("Cannot connect to a channel client");const e=o??{supportedProtocols:[{type:"classic",version:1}],maxProtocols:1},n=this.protocolManager.getCompatibleProtocols(h,e);if(!n.length)throw new Error("This provider does not support any of the offered protocols.");const s=await c.processConnection(t,r);i.payload.payload=i.payload.payload||{};let a={supportedProtocols:[],endpointPayloadPromise:Promise.resolve({endpointIdentity:t})};return a=await n.reduce((async(e,t)=>{const n=await e;if("rtc"===t.type){const{answer:e,rtcClient:i,channels:r}=await Et(this,bt,"f").createProviderAnswer(t.payload.rtcConnectionId,t.payload.offer);n.supportedProtocols.push({type:"rtc",version:_t.RTCInfo.version,payload:{answer:e}}),n.endpointPayloadPromise=n.endpointPayloadPromise.then((e=>r.then((t=>({...e,rtc:{rtcClient:i,channels:t}})))))}else n.supportedProtocols.push({type:"classic",version:Mt.ClassicInfo.version});return n}),Promise.resolve(a)),a.endpointPayloadPromise.then((e=>d.addEndpoint(t.endpointId,e))),i.payload.payload.result=s,i.payload.payload.answer=a,this.wire.sendRaw(i)}catch(e){return i.payload.success=!1,i.payload.reason=e.message,this.wire.sendRaw(i)}}}xe.ConnectionManager=kt,Ct=new WeakMap,bt=new WeakMap;var Lt,Tt,$t,Bt=s&&s.__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},Gt=s&&s.__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)};Object.defineProperty(le,"__esModule",{value:!0}),le.Channel=void 0;const Wt=t,Ht=G,Nt=d,Dt=ue,Ut=xe,Vt=Qe;function zt(e){const t=Math.floor(e/10),n=Math.min(3e4,500*2**t);return new Promise((e=>{setTimeout((()=>{e(!1)}),n)}))}class Kt extends Nt.EmitterBase{constructor(e){super(e,"channel"),Lt.set(this,void 0),Tt.set(this,new Wt.EventEmitter),$t.set(this,new Ht.AsyncRetryableLazy((async()=>{await Promise.all([this.on("disconnected",(e=>{Dt.ChannelClient.handleProviderDisconnect(e)})),this.on("connected",((...e)=>{Gt(this,Tt,"f").emit("connected",...e)}))]).catch((()=>new Error("error setting up channel connection listeners")))}))),Bt(this,Lt,new Ut.ConnectionManager(e),"f")}async getAllChannels(){return this.wire.sendAction("get-all-channels").then((({payload:e})=>e.data))}async onChannelConnect(e){await this.on("connected",e)}async onChannelDisconnect(e){await this.on("disconnected",e)}async safeConnect(e,t,n){const i={count:0};do{let r=()=>{};const o=new Promise((t=>{r=n=>{e===n.channelName&&t(!0)},Gt(this,Tt,"f").on("connected",r)}));try{if(i.count>0){i.gotConnectedEvent=await Promise.race([zt(i.count),o]);const t=await this.wire.sendAction("connect-to-channel",{...n,retryInfo:i});return console.log(`Successfully connected to channelName: ${e}`),t.payload.data}const t=this.wire.sendAction("connect-to-channel",n);i.originalMessageId=t.messageId;return(await t).payload.data}catch(n){if(!n.message.includes("internal-nack"))throw n;t&&0===i.count&&console.warn(`No channel found for channelName: ${e}. Waiting for connection...`)}finally{i.count+=1,Gt(this,Tt,"f").removeListener("connected",r)}}while(t);throw new Error(`No channel found for channelName: ${e}.`)}async connect(e,t={}){if(await Gt(this,$t,"f").getValue(),!e||"string"!=typeof e)throw new Error("Please provide a channelName string to connect to a channel.");const n={wait:!0,...this.wire.environment.getDefaultChannelOptions().connect,...t},{offer:i,rtc:r}=await Gt(this,Lt,"f").createClientOffer(n);let o;(this.fin.me.isFrame||this.fin.me.isView||this.fin.me.isWindow)&&(o=(await this.fin.me.getInfo()).url);const s={channelName:e,...n,offer:i,connectionUrl:o},a=await this.safeConnect(e,n.wait,s),c=await Gt(this,Lt,"f").createClientStrategy(r,a),d=new Dt.ChannelClient(a,(()=>Dt.ChannelClient.wireClose(this.wire,a,a.endpointId)),c);return c.onEndpointDisconnect(a.channelId,(async()=>{try{await d.sendDisconnectAction()}catch(e){console.warn(`Something went wrong during disconnect for client with uuid: ${a.uuid} / name: ${a.name} / endpointId: ${a.endpointId}.`)}finally{Dt.ChannelClient.handleProviderDisconnect(a)}})),d}async create(e,t){if(!e)throw new Error("Please provide a channelName to create a channel");const{payload:{data:n}}=await this.wire.sendAction("create-channel",{channelName:e}),i=Gt(this,Lt,"f").createProvider(t,n);return this.on("client-disconnected",(t=>{t.channelName===e&&Vt.ChannelProvider.handleClientDisconnection(i,t)})),i}}le.Channel=Kt,Lt=new WeakMap,Tt=new WeakMap,$t=new WeakMap,Object.defineProperty(de,"__esModule",{value:!0}),de.InterAppPayload=de.InterApplicationBus=void 0;const qt=t,Jt=d,Yt=he,Zt=le,Qt=O;class Xt extends Jt.Base{constructor(e){super(e),this.events={subscriberAdded:"subscriber-added",subscriberRemoved:"subscriber-removed"},this.refCounter=new Yt.RefCounter,this.Channel=new Zt.Channel(e),this.emitter=new qt.EventEmitter,e.registerMessageHandler(this.onmessage.bind(this)),this.on=this.emitter.on.bind(this.emitter),this.removeAllListeners=this.emitter.removeAllListeners.bind(this.emitter)}async publish(e,t){await this.wire.sendAction("publish-message",{topic:e,message:t,sourceWindowName:this.me.name})}async send(e,t,n){const i=(0,Qt.validateIdentity)(e);if(i)throw new Error(i);await this.wire.sendAction("send-message",{destinationUuid:e.uuid,destinationWindowName:e.name,topic:t,message:n,sourceWindowName:this.me.name})}subscribe(e,t,n){const i=this.createSubscriptionKey(e.uuid,e.name||"*",t);return this.emitter.on(i,n),this.refCounter.actOnFirst(i,(async()=>{await this.wire.sendAction("subscribe",{sourceUuid:e.uuid,sourceWindowName:e.name||"*",topic:t,destinationWindowName:this.me.name})}),(()=>Promise.resolve()))}unsubscribe(e,t,n){const i=e.name||"*",r=this.createSubscriptionKey(e.uuid,i,t);return this.emitter.removeListener(r,n),this.refCounter.actOnLast(r,(async()=>{await this.wire.sendAction("unsubscribe",{sourceUuid:e.uuid,sourceWindowName:i,topic:t,destinationWindowName:this.me.name})}),(()=>new Promise((e=>e)).then((()=>{}))))}processMessage(e){const{payload:{message:t,sourceWindowName:n,sourceUuid:i,topic:r}}=e,o=[this.createSubscriptionKey(i,n,r),this.createSubscriptionKey(i,"*",r),this.createSubscriptionKey("*","*",r)],s={uuid:i,name:n};o.forEach((e=>{this.emitter.emit(e,t,s)}))}emitSubscriverEvent(e,t){const{payload:{targetName:n,uuid:i,topic:r}}=t,o={name:n,uuid:i,topic:r};this.emitter.emit(e,o)}createSubscriptionKey(e,t,n){const i=t||"*";if(!(e&&i&&n))throw new Error("Missing uuid, name, or topic string");return function(...e){return e.map((e=>Buffer.from(`${e}`).toString("base64"))).join("/")}(e,i,n)}onmessage(e){const{action:t}=e;switch(t){case"process-message":this.processMessage(e);break;case this.events.subscriberAdded:this.emitSubscriverEvent(this.events.subscriberAdded,e);break;case this.events.subscriberRemoved:this.emitSubscriverEvent(this.events.subscriberRemoved,e)}return!0}}de.InterApplicationBus=Xt;de.InterAppPayload=class{};var en={};Object.defineProperty(en,"__esModule",{value:!0}),en.Clipboard=void 0;const tn=d;class nn extends tn.Base{async writeText(e){await this.wire.sendAction("clipboard-write-text",e)}async readText(e){const{payload:t}=await this.wire.sendAction("clipboard-read-text",{type:e});return t.data}async writeImage(e){await this.wire.sendAction("clipboard-write-image",e)}async readImage(e={format:"dataURL"}){const{payload:t}=await this.wire.sendAction("clipboard-read-image",e);return t.data}async writeHtml(e){await this.wire.sendAction("clipboard-write-html",e)}async readHtml(e){const{payload:t}=await this.wire.sendAction("clipboard-read-html",{type:e});return t.data}async writeRtf(e){await this.wire.sendAction("clipboard-write-rtf",e)}async readRtf(e){const{payload:t}=await this.wire.sendAction("clipboard-read-rtf",{type:e});return t.data}async write(e){await this.wire.sendAction("clipboard-write",e)}async getAvailableFormats(e){const{payload:t}=await this.wire.sendAction("clipboard-read-formats",{type:e});return t.data}}en.Clipboard=nn;var rn={},on={},sn={};Object.defineProperty(sn,"__esModule",{value:!0}),sn.ExternalApplication=void 0;const an=d;class cn extends an.EmitterBase{constructor(e,t){super(e,"external-application",t.uuid),this.identity=t}getInfo(){return this.wire.sendAction("get-external-application-info",this.identity).then((({payload:e})=>e.data))}}sn.ExternalApplication=cn,Object.defineProperty(on,"__esModule",{value:!0}),on.ExternalApplicationModule=void 0;const dn=d,hn=sn;class ln extends dn.Base{wrap(e){return this.wire.sendAction("external-application-wrap").catch((e=>{})),Promise.resolve(new hn.ExternalApplication(this.wire,{uuid:e}))}wrapSync(e){return this.wire.sendAction("external-application-wrap-sync").catch((e=>{})),new hn.ExternalApplication(this.wire,{uuid:e})}}on.ExternalApplicationModule=ln,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(on,e),n(sn,e)}(rn);var un={},pn={},wn={};Object.defineProperty(wn,"__esModule",{value:!0}),wn._Frame=void 0;const yn=d;class fn extends yn.EmitterBase{constructor(e,t){super(e,"frame",t.uuid,t.name),this.identity=t}getInfo(){return this.wire.sendAction("get-frame-info",this.identity).then((({payload:e})=>e.data))}getParentWindow(){return this.wire.sendAction("get-parent-window",this.identity).then((({payload:e})=>e.data))}}wn._Frame=fn,Object.defineProperty(pn,"__esModule",{value:!0}),pn._FrameModule=void 0;const gn=d,mn=O,vn=wn;class Cn extends gn.Base{async wrap(e){this.wire.sendAction("frame-wrap").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}wrapSync(e){this.wire.sendAction("frame-wrap-sync").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}getCurrent(){return this.wire.sendAction("frame-get-current").catch((e=>{})),Promise.resolve(new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity()))}getCurrentSync(){return this.wire.sendAction("frame-get-current-sync").catch((e=>{})),new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity())}}pn._FrameModule=Cn,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(pn,e),n(wn,e)}(un);var bn={};Object.defineProperty(bn,"__esModule",{value:!0}),bn.GlobalHotkey=void 0;const In=d;class En extends In.EmitterBase{constructor(e){super(e,"global-hotkey")}async register(e,t){await this.on(e,t),await this.wire.sendAction("global-hotkey-register",{hotkey:e})}async unregister(e){await this.removeAllListeners(e),await this.wire.sendAction("global-hotkey-unregister",{hotkey:e})}async unregisterAll(){await Promise.all(this.eventNames().filter((e=>!("registered"===e||"unregistered"===e))).map((e=>this.removeAllListeners(e)))),await this.wire.sendAction("global-hotkey-unregister-all",{})}async isRegistered(e){const{payload:{data:t}}=await this.wire.sendAction("global-hotkey-is-registered",{hotkey:e});return t}}bn.GlobalHotkey=En;var xn,An={},Pn={},Mn={},_n=s&&s.__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)};Object.defineProperty(Mn,"__esModule",{value:!0}),Mn.Platform=void 0;const On=d,Sn=O,Rn=new Map;class Fn extends On.EmitterBase{constructor(e,t){super(t.wire,"application",e.uuid),this.getClient=e=>{this.wire.sendAction("platform-get-client",this.identity).catch((e=>{}));const t=e||this.identity,{uuid:n}=t;if(!Rn.has(n)){const e=_n(this,xn,"f").call(this,n);Rn.set(n,e)}return Rn.get(n)},xn.set(this,(async e=>{try{const t=`custom-frame-${e}`,n=await this._channel.connect(t,{wait:!1});return n.onDisconnection((()=>{Rn.delete(e)})),n}catch(t){throw Rn.delete(e),new Error("The targeted Platform is not currently running. Listen for application-started event for the given Uuid.")}})),this.launchLegacyManifest=this.launchContentManifest;const n=(0,Sn.validateIdentity)(e);if(n)throw new Error(n);this._channel=t,this.identity={uuid:e.uuid},this.Layout=this.fin.Platform.Layout,this.Application=this.fin.Application.wrapSync(this.identity)}async createView(e,t,n){this.wire.sendAction("platform-create-view",this.identity).catch((e=>{}));const i=await this.getClient(),r=await i.dispatch("create-view",{target:t,opts:e,targetView:n});if(!r||(0,Sn.validateIdentity)(r.identity))throw new Error(`When overwriting the createView call, please return an object that has a valid 'identity' property: ${JSON.stringify(r)}`);return this.fin.View.wrapSync(r.identity)}async createWindow(e){this.wire.sendAction("platform-create-window",this.identity).catch((e=>{}));const t=await this.getClient();e.reason||(e.reason="api-call");const n=await t.dispatch("create-view-container",e);if(!n||(0,Sn.validateIdentity)(n.identity))throw new Error(`When overwriting the createWindow call, please return an object that has a valid 'identity' property: ${JSON.stringify(n)}`);const{identity:i}=n,r=this.fin.Window.wrapSync(i);return r.name=i.name,r.uuid=i.uuid,r}async quit(){this.wire.sendAction("platform-quit",this.identity).catch((e=>{}));return(await this.getClient()).dispatch("quit")}async closeView(e){this.wire.sendAction("platform-close-view",this.identity).catch((e=>{}));const t=await this.getClient();await t.dispatch("close-view",{view:e})}async reparentView(e,t){console.warn("Platform.reparentView has been deprecated, please use Platform.createView"),this.wire.sendAction("platform-reparent-view",this.identity).catch((e=>{}));const n={...e,uuid:e.uuid??this.identity.uuid},i=await this.fin.View.wrap(n),r=await i.getOptions();return this.createView(r,t)}async getSnapshot(){this.wire.sendAction("platform-get-snapshot",this.identity).catch((e=>{}));return(await this.getClient()).dispatch("get-snapshot")}async getViewSnapshot(e){return(await this.getClient()).dispatch("get-view-snapshot",{viewIdentity:e})}async applySnapshot(e,t){this.wire.sendAction("platform-apply-snapshot",this.identity).catch((e=>{}));const n="Requested snapshot must be a valid Snapshot object, or a url or filepath to such an object.";let i;if("string"==typeof e)try{i=(await this._channel.wire.sendAction("get-application-manifest",{manifestUrl:e})).payload.data}catch(e){throw new Error(`${n}: ${e}`)}else i=e;if(!i.windows)throw new Error(n);const r=await this.getClient();return await r.dispatch("apply-snapshot",{snapshot:i,options:t}),this}async fetchManifest(e){return(await this.getClient()).dispatch("platform-fetch-manifest",{manifestUrl:e})}async launchContentManifest(e){this.wire.sendAction("platform-launch-content-manifest",this.identity).catch((()=>{}));const t=await this.getClient(),n=await this.fetchManifest(e);return t.dispatch("launch-into-platform",{manifest:n,manifestUrl:e}),this}async setWindowContext(e={},t){if(this.wire.sendAction("platform-set-window-context",this.identity).catch((e=>{})),!e)throw new Error("Please provide a serializable object or string to set the context.");const n=await this.getClient(),{entityType:i}=t?await this.fin.System.getEntityInfo(t.uuid,t.name):this.fin.me;await n.dispatch("set-window-context",{context:e,entityType:i,target:t||{uuid:this.fin.me.uuid,name:this.fin.me.name}})}async getWindowContext(e){this.wire.sendAction("platform-get-window-context",this.identity).catch((e=>{}));const t=await this.getClient(),{entityType:n}=e?await this.fin.System.getEntityInfo(e.uuid,e.name):this.fin.me;return t.dispatch("get-window-context",{target:e||{uuid:this.fin.me.uuid,name:this.fin.me.name},entityType:n})}async closeWindow(e,t={skipBeforeUnload:!1}){this.wire.sendAction("platform-close-window",this.identity).catch((e=>{}));return(await this.getClient()).dispatch("close-window",{windowId:e,options:t})}}Mn.Platform=Fn,xn=new WeakMap;var jn={},kn={},Ln={},Tn={};function $n(e){switch(e){case"columns":case"grid":case"rows":case"tabs":return!0;default:return!1}}Object.defineProperty(Tn,"__esModule",{value:!0}),Tn.overrideFromComposables=Tn.isValidPresetType=void 0,Tn.isValidPresetType=$n,Tn.overrideFromComposables=function(...e){return t=>e.reduceRight(((e,t)=>n=>t(e(n))),(e=>e))(t)},Tn.default={isValidPresetType:$n};var Bn={},Gn={},Wn={};Object.defineProperty(Wn,"__esModule",{value:!0}),Wn.ApiConsumer=void 0;Wn.ApiConsumer=class{constructor(e){this.strategy=e,this.consume=async e=>(await this.strategy.getExposedFunctions(e)).reduce(((t,n)=>({...t,[n.key]:this.strategy.createFunction(n,e)})),{})}};var Hn={},Nn={};Object.defineProperty(Nn,"__esModule",{value:!0}),Nn.expose=Nn.getExposedProperties=void 0;const Dn=Symbol("exposedProperties");Nn.getExposedProperties=e=>e[Dn]||e.prototype[Dn]||[];Nn.expose=e=>(t,n,i)=>{t[Dn]=t[Dn]||[],t[Dn].push({key:n,descriptor:i,options:e})},Object.defineProperty(Hn,"__esModule",{value:!0}),Hn.ApiExposer=void 0;const Un=Nn;Hn.ApiExposer=class{constructor(e){this.strategy=e,this.exposeInstance=async(e,t)=>{const n=(0,Un.getExposedProperties)(e),i=await Promise.all(n.map((async({key:n,options:i})=>({key:n,options:await this.strategy.exposeFunction(e[n].bind(e),{key:n,options:i,meta:t})}))));await this.strategy.exposeMeta(t,i)}}};var Vn={},zn={},Kn={};Object.defineProperty(Kn,"__esModule",{value:!0}),Kn.ChannelsConsumer=void 0;Kn.ChannelsConsumer=class{constructor(e){this.channel=e,this.getExposedFunctions=async e=>{const{id:t}=e,{props:n}=await this.channel.dispatch(`api-meta:${t}`);return n},this.createFunction=e=>(...t)=>{const{action:n}=e.options;return this.channel.dispatch(n,{args:t})}}};var qn={};Object.defineProperty(qn,"__esModule",{value:!0}),qn.ChannelsExposer=void 0;qn.ChannelsExposer=class{constructor(e){this.channelProviderOrClient=e,this.exposeFunction=async(e,t)=>{const{key:n,options:i,meta:r}=t,{id:o}=r,s=`${o}.${i?.action||n}`;return await this.channelProviderOrClient.register(s,(async({args:t})=>e(...t))),{action:s}},this.exposeMeta=async({id:e},t)=>{const n=`api-meta:${e}`;await this.channelProviderOrClient.register(n,(()=>({props:t})))}}},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Kn,e),n(qn,e)}(zn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(zn,e)}(Vn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Wn,e),n(Hn,e),n(Vn,e),n(Nn,e)}(Gn);var Jn={};Object.defineProperty(Jn,"__esModule",{value:!0}),Jn.createRelayedDispatch=exports.relayChannelClientApi_1=Jn.relayChannelClientApi=void 0;const Yn=["no longer connected","RTCDataChannel closed unexpectedly","The client you are trying to dispatch from is disconnected from the target provider"];exports.relayChannelClientApi_1=Jn.relayChannelClientApi=async(e,t)=>{e.register(`relay:${t}`,(({action:t,target:n,payload:i})=>e.dispatch(n,t,i))),await Promise.resolve()};Jn.createRelayedDispatch=(e,t,n,i)=>async(r,o)=>{try{return await e.dispatch(`relay:${n}`,{action:r,payload:o,target:t})}catch(e){if(s=e.message,Yn.some((e=>s.includes(e)))&&i)throw new Error(i);throw e}var s};var Zn,Qn,Xn,ei=s&&s.__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},ti=s&&s.__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)};Object.defineProperty(Bn,"__esModule",{value:!0}),Bn.ColumnOrRow=Bn.TabStack=Bn.LayoutNode=void 0;const ni=Gn,ii=Jn;class ri{constructor(e,t){Zn.set(this,void 0),this.isRoot=()=>ti(this,Zn,"f").isRoot(this.entityId),this.exists=()=>ti(this,Zn,"f").exists(this.entityId),this.getParent=async()=>{const e=await ti(this,Zn,"f").getParent(this.entityId);if(e)return ri.getEntity(e,ti(this,Zn,"f"))},this.createAdjacentStack=async(e,t)=>{const n=await ti(this,Zn,"f").createAdjacentStack(this.entityId,e,t);return ri.getEntity({entityId:n,type:"stack"},ti(this,Zn,"f"))},this.getAdjacentStacks=async e=>(await ti(this,Zn,"f").getAdjacentStacks({targetId:this.entityId,edge:e})).map((e=>ri.getEntity({type:"stack",entityId:e.entityId},ti(this,Zn,"f")))),ei(this,Zn,e,"f"),this.entityId=t}}Bn.LayoutNode=ri,Zn=new WeakMap,ri.newLayoutEntitiesClient=async(e,t,n)=>{const i=(0,ii.createRelayedDispatch)(e,n,"layout-relay","You are trying to interact with a layout component on a window that does not exist or has been destroyed.");return new ni.ApiConsumer(new ni.ChannelsConsumer({dispatch:i})).consume({id:t})},ri.getEntity=(e,t)=>{const{entityId:n,type:i}=e;switch(i){case"column":case"row":return new si(t,n,i);case"stack":return new oi(t,n);default:throw new Error(`Unrecognised Layout Entity encountered ('${JSON.stringify(e)})`)}};class oi extends ri{constructor(e,t){super(e,t),Qn.set(this,void 0),this.type="stack",this.getViews=()=>ti(this,Qn,"f").getStackViews(this.entityId),this.addView=async(e,t={index:0})=>ti(this,Qn,"f").addViewToStack(this.entityId,e,t),this.removeView=async e=>{await ti(this,Qn,"f").removeViewFromStack(this.entityId,e)},this.setActiveView=async e=>{await ti(this,Qn,"f").setStackActiveView(this.entityId,e)},ei(this,Qn,e,"f")}}Bn.TabStack=oi,Qn=new WeakMap;class si extends ri{constructor(e,t,n){super(e,t),Xn.set(this,void 0),this.getContent=async()=>(await ti(this,Xn,"f").getContent(this.entityId)).map((e=>ri.getEntity(e,ti(this,Xn,"f")))),ei(this,Xn,e,"f"),this.type=n}}Bn.ColumnOrRow=si,Xn=new WeakMap;var ai={};Object.defineProperty(ai,"__esModule",{value:!0}),ai.DEFAULT_LAYOUT_KEY=ai.LAYOUT_CONTROLLER_ID=void 0,ai.LAYOUT_CONTROLLER_ID="layout-entities",ai.DEFAULT_LAYOUT_KEY="__default__";var ci,di,hi,li=s&&s.__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)};Object.defineProperty(Ln,"__esModule",{value:!0}),Ln.Layout=void 0;const ui=G,pi=O,wi=d,yi=Tn,fi=Bn,gi=ai;class mi extends wi.Base{static getClient(e){return li(e,di,"f").getValue()}constructor(e,t){super(t),ci.add(this),di.set(this,new ui.Lazy((async()=>fi.LayoutNode.newLayoutEntitiesClient(await this.platform.getClient(),gi.LAYOUT_CONTROLLER_ID,this.identity)))),this.replace=async e=>{this.wire.sendAction("layout-replace").catch((e=>{}));const t=await this.platform.getClient();await t.dispatch("replace-layout",{target:this.identity,opts:{layout:e}})},this.replaceView=async(e,t)=>{this.wire.sendAction("layout-replace-view").catch((e=>{}));const n=await this.platform.getClient();await n.dispatch("replace-view",{target:this.identity,opts:{viewToReplace:e,newView:t}})},this.applyPreset=async e=>{this.wire.sendAction("layout-apply-preset").catch((e=>{}));const t=await this.platform.getClient(),{presetType:n}=e;if(!n||!(0,yi.isValidPresetType)(n))throw new Error("Cannot apply preset layout, please include an applicable presetType property in the PresetLayoutOptions.");await t.dispatch("apply-preset-layout",{target:this.identity,opts:{presetType:n}})};const n=(0,pi.validateIdentity)(e);if(n)throw new Error(n);this.identity=e,this.platform=this.fin.Platform.wrapSync({uuid:e.uuid}),e.uuid===this.fin.me.uuid&&e.name===this.fin.me.name&&(this.init=this.fin.Platform.Layout.init)}async getConfig(){this.wire.sendAction("layout-get-config").catch((e=>{}));return(await this.platform.getClient()).dispatch("get-frame-snapshot",{target:this.identity})}async getCurrentViews(){this.wire.sendAction("layout-get-views").catch((e=>{}));const e=await this.platform.getClient();return(await e.dispatch("get-layout-views",{target:this.identity})).map((e=>this.fin.View.wrapSync(e)))}async getRootItem(){this.wire.sendAction("layout-get-root-item").catch((()=>{}));const e=await li(this,di,"f").getValue(),t=await e.getRoot("layoutName"in this.identity?this.identity:void 0);return fi.LayoutNode.getEntity(t,e)}async getStackByViewIdentity(e){this.wire.sendAction("layout-get-stack-by-view").catch((()=>{}));const t=await li(this,di,"f").getValue(),n=await t.getStackByView(e);if(!n)throw new Error(`No stack found for view: ${e.uuid}/${e.name}`);return fi.LayoutNode.getEntity(n,t)}async addView(e,{location:t,targetView:n}={}){this.wire.sendAction("layout-add-view").catch((e=>{}));const{identity:i}=await li(this,ci,"m",hi).call(this,"layout-add-view",{viewOptions:e,location:t,targetView:n});return{identity:i}}async closeView(e){this.wire.sendAction("layout-close-view").catch((e=>{})),await li(this,ci,"m",hi).call(this,"layout-close-view",{viewIdentity:e})}}Ln.Layout=mi,di=new WeakMap,ci=new WeakSet,hi=async function(e,t){return(await this.platform.getClient()).dispatch(e,{target:this.identity,opts:t})};var vi,Ci,bi,Ii,Ei,xi=s&&s.__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)},Ai=s&&s.__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};Object.defineProperty(kn,"__esModule",{value:!0}),kn.LayoutModule=void 0;const Pi=d,Mi=Ln,_i=ai;class Oi extends Pi.Base{constructor(){super(...arguments),vi.add(this),Ci.set(this,!1),bi.set(this,null),this.init=async(e={})=>{if(this.wire.sendAction("layout-init").catch((e=>{})),!this.wire.environment.layoutAllowedInContext(this.fin))throw new Error("Layout.init can only be called from a Window context.");if(xi(this,Ci,"f"))throw new Error("Layout.init was already called, please use Layout.create to add additional layouts.");"openfin"===this.wire.environment.type&&await this.fin.Platform.getCurrentSync().getClient(),Ai(this,Ci,!0,"f"),Ai(this,bi,await this.wire.environment.initLayoutManager(this.fin,this.wire,e),"f"),await this.wire.environment.applyLayoutSnapshot(this.fin,xi(this,bi,"f"),e);const t={name:this.fin.me.name,uuid:this.fin.me.uuid};if(!e.layoutManagerOverride){const e={layoutName:_i.DEFAULT_LAYOUT_KEY,...t};return xi(this,Ii,"f").call(this,e)}return this.wrapSync(t)},Ii.set(this,(e=>{const t="[Layout] You are using a deprecated property `layoutManager` - it will throw if you access it starting in v37.",n=new Proxy({},{get(e,n){throw console.warn(`[Layout-mgr-proxy] accessing ${n.toString()}`),new Error(t)}}),i=Object.assign(this.wrapSync(e),{layoutManager:n});return new Proxy(i,{get(e,n){if("layoutManager"===n)throw console.warn(`[Layout-proxy] accessing ${n.toString()}`),new Error(t);return e[n]}})})),this.getCurrentLayoutManagerSync=()=>xi(this,vi,"m",Ei).call(this,"fin.Platform.Layout.getCurrentLayoutManagerSync()"),this.create=async e=>this.wire.environment.createLayout(xi(this,vi,"m",Ei).call(this,"fin.Platform.Layout.create()"),e),this.destroy=async e=>this.wire.environment.destroyLayout(xi(this,vi,"m",Ei).call(this,"fin.Platform.Layout.destroy()"),e)}async wrap(e){return this.wire.sendAction("layout-wrap").catch((e=>{})),new Mi.Layout(e,this.wire)}wrapSync(e){return this.wire.sendAction("layout-wrap-sync").catch((e=>{})),new Mi.Layout(e,this.wire)}async getCurrent(){if(this.wire.sendAction("layout-get-current").catch((e=>{})),"openfin"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error("You are not in a Window context. Only Windows can have a Layout.");const{uuid:e,name:t}=this.fin.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction("layout-get-current-sync").catch((e=>{})),"openfin"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error("You are not in a Window context. Only Windows can have a Layout.");const{uuid:e,name:t}=this.fin.me;return this.wrapSync({uuid:e,name:t})}async getLayoutByViewIdentity(e){this.wire.sendAction("layout-get-by-view-identity").catch((()=>{}));let t=await this.wire.environment.getViewWindowIdentity(this.fin,e);t.identity&&(t=t.identity);try{const n=this.wrapSync(t),i=await Mi.Layout.getClient(n),r=await i.getLayoutIdentityForViewOrThrow(e);return this.wrapSync(r)}catch(n){if(!["No action registered at target for","getLayoutIdentityForViewOrThrow is not a function"].some((e=>n.message.includes(e))))throw n;if(t.uuid===t.name)throw new Error(`View identity ${JSON.stringify(e)} is not attached to any layout in provider window ${JSON.stringify(t)}.`);return this.wrapSync(t)}}}kn.LayoutModule=Oi,Ci=new WeakMap,bi=new WeakMap,Ii=new WeakMap,vi=new WeakSet,Ei=function(e){if(!xi(this,bi,"f"))throw new Error(`You must call init before using the API ${e}`);return xi(this,bi,"f")},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(kn,e),n(Ln,e)}(jn),Object.defineProperty(Pn,"__esModule",{value:!0}),Pn.PlatformModule=void 0;const Si=d,Ri=Mn,Fi=jn;class ji extends Si.Base{constructor(e,t){super(e),this._channel=t,this.Layout=new Fi.LayoutModule(this.wire)}async init(e){if(!fin.__internal_.isPlatform||fin.me.name!==fin.me.uuid)throw new Error("fin.Platform.init should only be called from a custom platform provider running in the main window of the application.");return this.wire.environment.initPlatform(this.fin,e)}async wrap(e){return this.wire.sendAction("platform-wrap").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}wrapSync(e){return this.wire.sendAction("platform-wrap-sync").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}async getCurrent(){return this.wire.sendAction("platform-get-current").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction("platform-get-current-sync").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}start(e){return this.wire.sendAction("platform-start").catch((e=>{})),new Promise((async(t,n)=>{try{const{uuid:n}=e,i=await this.fin.Application._create({...e,isPlatformController:!0});i.once("platform-api-ready",(()=>t(this.wrapSync({uuid:n})))),i._run({uuid:n})}catch(e){n(e)}}))}startFromManifest(e,t){return this.wire.sendAction("platform-start-from-manifest").catch((e=>{})),new Promise((async(n,i)=>{try{const i=await this.fin.Application._createFromManifest(e);i.once("platform-api-ready",(()=>n(this.wrapSync({uuid:i.identity.uuid})))),i._run(t)}catch(e){i(e)}}))}}Pn.PlatformModule=ji,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Pn,e),n(Mn,e)}(An);var ki={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getMe=e.getBaseMe=e.environmentUnsupportedMessage=void 0;const t=J(),n=un,i=ie(),r=rn;function o(e,t,n){return{...{isView:"view"===e,isWindow:"window"===e,isFrame:"iframe"===e,isExternal:"external connection"===e},uuid:t,name:n,entityType:e}}e.environmentUnsupportedMessage="You are not running in OpenFin.",e.getBaseMe=o,e.getMe=function(s){const{uuid:a,name:c,entityType:d}=s.me,h={setContext(){throw new Error(e.environmentUnsupportedMessage)},addContextHandler(){throw new Error(e.environmentUnsupportedMessage)},getContextGroups(){throw new Error(e.environmentUnsupportedMessage)},joinContextGroup(){throw new Error(e.environmentUnsupportedMessage)},removeFromContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getAllClientsInContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getInfoForContextGroup(){throw new Error(e.environmentUnsupportedMessage)}},l="Interop API has not been instantiated. Either connection has failed or you have not declared interop in your config.",u={setContext(){throw new Error(l)},addContextHandler(){throw new Error(l)},getContextGroups(){throw new Error(l)},joinContextGroup(){throw new Error(l)},removeFromContextGroup(){throw new Error(l)},getAllClientsInContextGroup(){throw new Error(l)},getInfoForContextGroup(){throw new Error(l)}},p={eventNames:()=>{throw new Error(e.environmentUnsupportedMessage)},emit:()=>{throw new Error(e.environmentUnsupportedMessage)},listeners:()=>{throw new Error(e.environmentUnsupportedMessage)},listenerCount:()=>{throw new Error(e.environmentUnsupportedMessage)},on:()=>{throw new Error(e.environmentUnsupportedMessage)},addListener:()=>{throw new Error(e.environmentUnsupportedMessage)},once:()=>{throw new Error(e.environmentUnsupportedMessage)},prependListener:()=>{throw new Error(e.environmentUnsupportedMessage)},prependOnceListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeAllListeners:()=>{throw new Error(e.environmentUnsupportedMessage)}};switch(d){case"view":return Object.assign(new t.View(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case"window":return Object.assign(new i._Window(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case"iframe":return Object.assign(new n._Frame(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case"external connection":return Object.assign(new r.ExternalApplication(s,{uuid:a}),o(d,a,c),{interop:u,isOpenFin:!1});default:return{...o(d,a,c),...p,interop:h,isOpenFin:!1}}}}(ki);var Li={},Ti={},$i={};Object.defineProperty($i,"__esModule",{value:!0}),$i.createWarningObject=$i.createUnusableObject=void 0,$i.createUnusableObject=function(e){const t=()=>{throw new Error(e)};return new Proxy({},{apply:t,construct:t,defineProperty:t,deleteProperty:t,get:t,getOwnPropertyDescriptor:t,getPrototypeOf:t,has:t,isExtensible:t,ownKeys:t,preventExtensions:t,set:t,setPrototypeOf:t})},$i.createWarningObject=function(e,t){return new Proxy(t,{get:(...t)=>(console.warn(e),Reflect.get(...t)),set:(...t)=>(console.warn(e),Reflect.set(...t)),getOwnPropertyDescriptor:(...t)=>(console.warn(e),Reflect.getOwnPropertyDescriptor(...t)),ownKeys:(...t)=>(console.warn(e),Reflect.ownKeys(...t))})};var Bi,Gi={},Wi={};var Hi={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.wrapIntentHandler=e.BROKER_ERRORS=e.generateOverrideWarning=e.generateOverrideError=e.wrapContextHandler=e.wrapInTryCatch=e.generateId=void 0;e.generateId=()=>`${Math.random()}${Date.now()}`;e.wrapInTryCatch=(e,t)=>(...n)=>{try{return e(...n)}catch(e){throw new Error((t||"")+e)}};e.wrapContextHandler=(e,t)=>async n=>{try{await e(n)}catch(e){throw console.error(`Error thrown by handler ${t} for context type ${n.type}: ${e}`),e}};e.generateOverrideError=(e,t)=>`You have tried to to use ${e} but ${t} has not been overridden in the Interop Broker. Please override this function. Refer to our documentation for more info.`;e.generateOverrideWarning=(e,t,n,i)=>{const{uuid:r,name:o}=n;return i?`Entity with identity: ${r}/${o} has called ${i} or ${e} but ${t} has not been overridden.`:`Entity with identity: ${r}/${o} has called ${e} but ${t} has not been overridden.`},e.BROKER_ERRORS={fireIntent:(0,e.generateOverrideError)("fireIntent","handleFiredIntent"),fireIntentForContext:(0,e.generateOverrideError)("fireIntentForContext","handleFiredIntentForContext"),getInfoForIntent:(0,e.generateOverrideError)("getInfoForIntent","handleInfoForIntent"),getInfoForIntentsByContext:(0,e.generateOverrideError)("getInfoForIntentsByContext","handleInfoForIntentsByContext"),joinSessionContextGroupWithJoinContextGroup:"The Context Group you have tried to join is a Session Context Group. Custom Context Groups can only be defined by the Interop Broker through code or manifest configuration. Please use joinSessionContextGroup.",fdc3Open:(0,e.generateOverrideError)("fdc3.open","fdc3HandleOpen"),fdc3FindInstances:(0,e.generateOverrideError)("fdc3.findInstances","fdc3HandleFindInstances"),fdc3GetAppMetadata:(0,e.generateOverrideError)("fdc3.getAppMetadata","fdc3HandleGetAppMetadata"),fdc3GetInfo:(0,e.generateOverrideError)("fdc3.getInfo","fdc3HandleGetInfo")};e.wrapIntentHandler=(e,t)=>async n=>{try{return e(n)}catch(e){throw console.error(`Error thrown by handler ${t}: ${e}`),e}}}(Hi);var Ni,Di,Ui={};function Vi(){if(Di)return Gi;Di=1;var e,t,n,r=s&&s.__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},o=s&&s.__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)},a=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Gi,"__esModule",{value:!0}),Gi.InteropBroker=void 0;const c=d,h=a(function(){if(Bi)return Wi;Bi=1,Object.defineProperty(Wi,"__esModule",{value:!0});const e=Cr();return Wi.default=class{constructor(e,t){this.provider=e,this.id=t,this.lastContext=void 0,this.contextGroupMap=new Map,this.clients=new Map,this.registerListeners()}registerListeners(){this.provider.register(`sessionContextGroup:getContext-${this.id}`,this.getCurrentContext.bind(this)),this.provider.register(`sessionContextGroup:setContext-${this.id}`,this.setContext.bind(this)),this.provider.register(`sessionContextGroup:handlerAdded-${this.id}`,this.handlerAdded.bind(this)),this.provider.register(`sessionContextGroup:handlerRemoved-${this.id}`,this.handlerRemoved.bind(this))}getCurrentContext(e){return e.type?this.contextGroupMap.get(e.type):this.lastContext}setContext(t,n){const{context:i}=t,r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name} not in Session Client State Map`);this.contextGroupMap.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{e.contextHandlers.get(i.type)?.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getClientState(e){return this.clients.get(e.endpointId)}async handlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(i){const e=r.contextHandlers.get(i)||[];r.contextHandlers.set(i,[...e,n]);const o=this.contextGroupMap.get(i);o&&await this.provider.dispatch(t,n,o)}else{r.globalHandler=n;const e=[...this.contextGroupMap.keys()].map((async e=>{const i=this.contextGroupMap.get(e);i&&await this.provider.dispatch(t,n,i)}));await Promise.all(e)}}handlerRemoved(e,t){const{handlerId:n}=e,i=this.clients.get(t.endpointId);i?(Array.from(i.contextHandlers).forEach((([,e])=>{const t=e.indexOf(n);t>-1&&e.splice(t,1)})),i.globalHandler===n&&(i.globalHandler=void 0)):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={contextHandlers:new Map,clientIdentity:e,globalHandler:void 0};this.clients.set(e.endpointId,t)}}onDisconnection(e){this.clients.delete(e.endpointId)}},Wi}()),l=Hi,u=a(i),p=function(){if(Ni)return Ui;Ni=1,Object.defineProperty(Ui,"__esModule",{value:!0}),Ui.PrivateChannelProvider=void 0;const e=Vi();return Ui.PrivateChannelProvider=class t{constructor(e,t){this.provider=e,this.id=t,this.clients=new Map,this.registerListeners(),this.contextByContextType=new Map,this.lastContext=void 0,this.provider.onConnection((e=>this.registerNewClient(e))),this.provider.onDisconnection((async e=>{const{endpointId:t}=e;this.clients.has(t)&&await this.handleClientDisconnecting(e),0===(await this.provider.getAllClientInfo()).length&&this.provider.destroy()}))}getClientState(e){return this.clients.get(e.endpointId)}registerListeners(){this.provider.register("broadcast",this.broadcast.bind(this)),this.provider.register("getCurrentContext",this.getCurrentContext.bind(this)),this.provider.register("contextHandlerAdded",this.contextHandlerAdded.bind(this)),this.provider.register("contextHandlerRemoved",this.contextHandlerRemoved.bind(this)),this.provider.register("nonStandardHandlerRemoved",this.nonStandardHandlerRemoved.bind(this)),this.provider.register("onAddContextHandlerAdded",this.onAddContextHandlerAdded.bind(this)),this.provider.register("onDisconnectHandlerAdded",this.onDisconnectHandlerAdded.bind(this)),this.provider.register("onUnsubscribeHandlerAdded",this.onUnsubscribeHandlerAdded.bind(this)),this.provider.register("clientDisconnecting",((e,t)=>{this.handleClientDisconnecting(t)}))}broadcast(t,n){const{context:i}=t;if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name}, tried to call broadcast, is not connected to this Private Channel`);const r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to broadcast - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);this.contextByContextType.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{const t=e.handlerIdsByContextTypes.get(i.type);t&&t.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getCurrentContext(e,t){const{contextType:n}=e;if(!this.getClientState(t))throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call getCurrentContext, is not connected to this Private Channel`);if(void 0!==n){return this.contextByContextType.get(n)||null}return this.lastContext?this.lastContext:null}contextHandlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call addContextListener, is not connected to this Private Channel`);if(i){const e=r.handlerIdsByContextTypes.get(i)||[];r.handlerIdsByContextTypes.set(i,[...e,n])}else r.globalHandler=n;Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&e.onAddContextListenerHandlerId&&this.provider.dispatch(e.clientIdentity,e.onAddContextListenerHandlerId,i)}))}async contextHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);if(i){let e;if(i.globalHandler===n)i.globalHandler=void 0;else for(const[t,r]of i.handlerIdsByContextTypes){const i=r.indexOf(n);i>-1&&(r.splice(i,1),e=t)}const r=(await this.getConnectedClients()).map((async n=>{const{clientIdentity:i,clientIdentity:{endpointId:r},onUnsubscribeHandlerId:o}=n;r!==t.endpointId&&o&&await this.provider.dispatch(i,o,e)}));try{await Promise.all(r)}catch(e){throw console.error(`Problem when attempting to dispatch to onUnsubscribeHandlers. Error: ${e} Removing Client: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}`),new Error(e)}}else console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}.`)}nonStandardHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);i?i.onDisconnectHandlerId===n?i.onDisconnectHandlerId=void 0:i.onAddContextListenerHandlerId===n?i.onAddContextListenerHandlerId=void 0:i.onUnsubscribeHandlerId===n&&(i.onUnsubscribeHandlerId=void 0):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}onAddContextHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onAddContextListener, is not connected to this Private Channel`);n.onAddContextListenerHandlerId=i,Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&Array.from(e.handlerIdsByContextTypes.keys()).forEach((e=>{this.provider.dispatch(t,i,e)}))}))}onDisconnectHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onDisconnect, is not connected to this Private Channel`);n.onDisconnectHandlerId=i}onUnsubscribeHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onUnsubscribe, is not connected to this Private Channel`);n.onUnsubscribeHandlerId=i}removeClient(e){const t=this.getClientState(e);if(!t)throw new Error(`Client with Identity: ${e.uuid} ${e.name}, tried to call disconnect, is not connected to this Private Channel`);t.handlerIdsByContextTypes.clear(),this.clients.delete(e.endpointId)}async fireOnDisconnectForOtherClients(e){const{endpointId:t}=e,n=(await this.getConnectedClients()).map((async e=>{const{clientIdentity:{endpointId:n},onDisconnectHandlerId:i}=e;n!==t&&i&&await this.provider.dispatch(e.clientIdentity,i)}));try{await Promise.all(n)}catch(t){throw console.error(`Problem when attempting to dispatch to onDisconnectHandlers. Error: ${t} Disconnecting Client: uuid: ${e.uuid}. name: ${e.name}. endpointId: ${e.endpointId}`),new Error(t)}}async unsubscribeAll(e){const{endpointId:t}=e,n=this.clients.get(t);if(n){const t=Array.from(n.handlerIdsByContextTypes.values()).flat(),i=n.globalHandler;if(t.length>0){const n=t.map((async t=>this.contextHandlerRemoved({handlerId:t},e)));try{await Promise.all(n)}catch(e){console.error(e.message)}}if(i)try{await this.contextHandlerRemoved({handlerId:i},e)}catch(e){console.error(e.message)}}}async handleClientDisconnecting(e){await this.unsubscribeAll(e),this.removeClient(e),await this.fireOnDisconnectForOtherClients(e)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={clientIdentity:e,handlerIdsByContextTypes:new Map,globalHandler:void 0,onAddContextListenerHandlerId:void 0,onUnsubscribeHandlerId:void 0,onDisconnectHandlerId:void 0};this.clients.set(e.endpointId,t)}}async getConnectedClients(){const e=await this.provider.getAllClientInfo();return Array.from(this.clients.values()).filter((t=>{const{uuid:n,name:i}=t.clientIdentity;return e.some((e=>i===e.name&&n===e.uuid))}))}static init(e,n){return new t(e,n)}},Ui}(),w=G,y=[{id:"green",displayMetadata:{color:"#00CC88",name:"green"}},{id:"purple",displayMetadata:{color:"#8C61FF",name:"purple"}},{id:"orange",displayMetadata:{color:"#FF8C4C",name:"orange"}},{id:"red",displayMetadata:{color:"#FF5E60",name:"red"}},{id:"pink",displayMetadata:{color:"#FF8FB8",name:"pink"}},{id:"yellow",displayMetadata:{color:"#E9FF8F",name:"yellow"}}];let f=class i extends c.Base{constructor(i,s,a){super(i),e.set(this,void 0),t.set(this,void 0),n.set(this,void 0),this.getProvider=()=>o(this,n,"f").getValue(),this.interopClients=new Map,this.contextGroupsById=new Map,r(this,t,a.contextGroups??[...y],"f"),r(this,e,a.fdc3Info,"f"),a?.logging&&(this.logging=a.logging),this.intentClientMap=new Map,this.lastContextMap=new Map,this.sessionContextGroupMap=new Map,r(this,n,new w.Lazy(s),"f"),this.setContextGroupMap(),this.setupChannelProvider()}static createClosedConstructor(...e){return class extends i{constructor(...t){if(t.length){const[n,i,r]=t;if(r&&"object"==typeof r&&!(0,u.default)(r,e[2]))return console.warn("You have modified the parameters of the InteropOverride constructor. This behavior is deprecated and will be removed in a future version. You can modify these options in your manifest. Please consult our Interop docs for guidance on migrating to the new override scheme."),void super(e[0],e[1],r);console.warn("You are attempting to pass arguments to the InteropOverride constructor. This is not necessary, and these passed arguments will be ignored. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.")}super(...e)}}}setContext({context:e},t){this.wire.sendAction("interop-broker-set-context").catch((e=>{}));const n=this.getClientState(t);if(!n||!n.contextGroupId)throw n?new Error("You must join a context group before you can set context."):new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);{const{contextGroupId:t}=n;this.setContextForGroup({context:e},t)}}setContextForGroup({context:e},t){this.wire.sendAction("interop-broker-set-context-for-group").catch((e=>{}));const n=this.contextGroupsById.get(t);if(!n)throw new Error(`Unable to set context for context group that isn't in the context group mapping: ${t}.`);const r=i.checkContextIntegrity(e);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(e)}`);const o=e.type;n.set(o,e),this.lastContextMap.set(t,o);Array.from(this.interopClients.values()).filter((e=>e.contextGroupId===t)).forEach((t=>{for(const[,n]of t.contextHandlers)i.isContextTypeCompatible(o,n.contextType)&&this.invokeContextHandler(t.clientIdentity,n.handlerId,e)}))}getCurrentContext(e,t){this.wire.sendAction("interop-broker-get-current-context").catch((e=>{}));const n=this.getClientState(t);if(!n?.contextGroupId)throw new Error("You must be a member of a context group to call getCurrentContext");const{contextGroupId:i}=n,r=this.contextGroupsById.get(i),o=this.lastContextMap.get(i),s=e?.contextType??o;return r&&s?r.get(s):void 0}async joinContextGroup({contextGroupId:e,target:t},n){if(this.wire.sendAction("interop-broker-join-context-group").catch((e=>{})),this.sessionContextGroupMap.has(e))throw new Error(l.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup);if(t){i.hasEndpointId(t)&&await this.addClientToContextGroup({contextGroupId:e},t);try{const n=this.channel.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name));if(!n.length)throw new Error(`Given Identity ${t.uuid} ${t.name} is not connected to the Interop Broker.`);n.length>1&&console.warn(`More than one connection found for identity ${t.uuid} ${t.name}`);const i=[];for(const t of n)i.push(this.addClientToContextGroup({contextGroupId:e},t));await Promise.all(i)}catch(e){throw new Error(e)}}else await this.addClientToContextGroup({contextGroupId:e},n)}async addClientToContextGroup({contextGroupId:e},t){this.wire.sendAction("interop-broker-add-client-to-context-group").catch((e=>{}));const n=this.getClientState(t);if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(!this.getContextGroups().find((t=>t.id===e)))throw new Error(`Attempting to join a context group that does not exist: ${e}. You may only join existing context groups.`);if(n.contextGroupId!==e){n.contextGroupId=e,await this.setCurrentContextGroupInClientOptions(t,e);const i=this.contextGroupsById.get(e);for(const[,e]of n.contextHandlers){const{contextType:n,handlerId:r}=e;if(void 0===n)i.forEach(((e,n)=>{this.invokeContextHandler(t,r,e)}));else if(i.has(n)){const e=i.get(n);e&&this.invokeContextHandler(t,r,e)}}}}async removeFromContextGroup({target:e},t){if(this.wire.sendAction("interop-broker-remove-from-context-group").catch((e=>{})),e){i.hasEndpointId(e)&&await this.removeClientFromContextGroup(e);try{const t=this.channel.connections.filter((t=>t.uuid===e.uuid&&t.name===e.name));if(!t.length)throw new Error(`No connection found for given Identity ${e.uuid} ${e.name}`);t.length>1&&console.warn(`More than one connection found for identity ${e.uuid} ${e.name}`);const n=[];for(const e of t)n.push(this.removeClientFromContextGroup(e));await Promise.all(n)}catch(e){throw new Error(e)}}else await this.removeClientFromContextGroup(t)}async removeClientFromContextGroup(e){this.wire.sendAction("interop-broker-remove-client-from-context-group").catch((e=>{}));const t=this.getClientState(e);t&&(t.contextGroupId=void 0),await this.setCurrentContextGroupInClientOptions(e,null)}getContextGroups(){return this.wire.sendAction("interop-broker-get-context-groups").catch((e=>{})),o(this,t,"f").map((e=>({...e})))}getInfoForContextGroup({contextGroupId:e}){return this.wire.sendAction("interop-broker-get-info-for-context-group").catch((e=>{})),this.getContextGroups().find((t=>t.id===e))}getAllClientsInContextGroup({contextGroupId:e}){this.wire.sendAction("interop-broker-get-all-clients-in-context-group").catch((e=>{}));return Array.from(this.interopClients.values()).filter((t=>t.contextGroupId===e)).map((e=>e.clientIdentity))}async handleFiredIntent(e,t){const n=(0,l.generateOverrideWarning)("fdc3.raiseIntent","InteropBroker.handleFiredIntent",t,"interopClient.fireIntent");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntent)}async setIntentTarget(e,t){this.wire.sendAction("interop-broker-set-intent-target").catch((e=>{}));const n=this.intentClientMap.get(t.name),i=`intent-handler-${e.name}`;if(n){const t=n.get(i);if(t){if(t.pendingIntents.push(e),t.clientIdentity&&t.isReady){const{clientIdentity:e,pendingIntents:n}=t;try{const r=n[n.length-1];await this.invokeIntentHandler(e,i,r),t.pendingIntents=[]}catch(n){console.error(`Error invoking intent handler for client ${e.uuid}/${e.name}/${e.endpointId}`),t.isReady=!1}}}else n.set(i,{isReady:!1,pendingIntents:[e]})}else{this.intentClientMap.set(t.name,new Map);const n=this.intentClientMap.get(t.name);n&&n.set(i,{isReady:!1,pendingIntents:[e]})}}async handleInfoForIntent(e,t){const n=(0,l.generateOverrideWarning)("fdc3.findIntent","InteropBroker.handleInfoForIntent",t,"interopClient.getInfoForIntent");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntent)}async handleInfoForIntentsByContext(e,t){const n=(0,l.generateOverrideWarning)("fdc3.findIntentsByContext","InteropBroker.handleInfoForIntentsByContext",t,"interopClient.getInfoForIntentsByContext");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntentsByContext)}async handleFiredIntentForContext(e,t){const n=(0,l.generateOverrideWarning)("fdc3.raiseIntentForContext","InteropBroker.handleFiredIntentForContext",t,"interopClient.fireIntentForContext");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntentForContext)}async clientDisconnected(e){}async fdc3HandleOpen({app:e,context:t},n){const i=(0,l.generateOverrideWarning)("fdc3.open","InteropBroker.fdc3HandleOpen",n);throw console.warn(i),new Error(l.BROKER_ERRORS.fdc3Open)}async fdc3HandleFindInstances(e,t){const n=(0,l.generateOverrideWarning)("fdc3.open","InteropBroker.fdc3HandleFindInstances",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3FindInstances)}async fdc3HandleGetAppMetadata(e,t){const n=(0,l.generateOverrideWarning)("fdc3.getAppMetadata","InteropBroker.fdc3HandleGetAppMetadata",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3GetAppMetadata)}async invokeContextHandler(e,t,n){const i=await this.getProvider();try{await i.dispatch(e,t,n)}catch(i){console.error(`Error invoking context handler ${t} for context type ${n.type} in client ${e.uuid}/${e.name}/${e.endpointId}`,i)}}async invokeIntentHandler(e,t,n){const i=await this.getProvider();await i.dispatch(e,t,n)}async fdc3HandleGetInfo(t,n){const{fdc3Version:i}=t;return{fdc3Version:i,...o(this,e,"f"),optionalFeatures:{OriginatingAppMetadata:!1,UserChannelMembershipAPIs:!0},appMetadata:{appId:"",instanceId:""}}}async getAllClientInfo(){return(await this.getProvider()).getAllClientInfo()}decorateSnapshot(e){return{...e,interopSnapshotDetails:{contextGroupStates:this.getContextGroupStates()}}}applySnapshot(e,t){const n=e?.interopSnapshotDetails?.contextGroupStates;n&&(t?.closeExistingWindows||this.updateExistingClients(n),this.rehydrateContextGroupStates(n))}updateExistingClients(e){this.interopClients.forEach((t=>{const{clientIdentity:n,contextGroupId:r,contextHandlers:o}=t;if(r){const t=e[r];for(const[,e]of Object.entries(t))o.forEach((t=>{const{handlerId:r,contextType:o}=t;i.isContextTypeCompatible(e.type,o)&&this.invokeContextHandler(n,r,e)}))}}))}getContextGroupStates(){return i.toObject(this.contextGroupsById)}rehydrateContextGroupStates(e){const t=Object.entries(e);for(const[e,n]of t){const t=Object.entries(n);for(const[n,i]of t)if(this.contextGroupsById.has(e)){this.contextGroupsById.get(e).set(n,i)}else console.warn(`Attempting to set a context group that isn't in the context group mapping. Skipping context group rehydration for: ${e}`)}}contextHandlerRegistered({contextType:e,handlerId:t},n){const i={contextType:e,handlerId:t},r=this.getClientState(n);if(r?.contextHandlers.set(t,i),r&&r.contextGroupId){const{contextGroupId:i}=r,o=this.contextGroupsById.get(i);if(void 0===e)o.forEach(((e,i)=>{this.invokeContextHandler(n,t,e)}));else if(o.has(e)){const i=o.get(e);i&&this.invokeContextHandler(n,t,i)}}}async intentHandlerRegistered(e,t){const{handlerId:n}=e,i=this.intentClientMap.get(t.name),r=i?.get(n);if(i)if(r){const{pendingIntents:e}=r;r.clientIdentity=t,r.isReady=!0;try{if(e.length>0){const i=e[e.length-1];await this.invokeIntentHandler(t,n,i),r.pendingIntents=[]}}catch(e){console.error(`Error invoking intent handler: ${n} for client ${t.uuid}/${t.name}/${t.endpointId}`)}}else i.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t});else{this.intentClientMap.set(t.name,new Map);const e=this.intentClientMap.get(t.name);e&&e.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t})}}removeContextHandler({handlerId:e},t){const n=this.getClientState(t);n&&n.contextHandlers.delete(e)}handleJoinSessionContextGroup({sessionContextGroupId:e},t){try{if(!e)throw new Error("Failed to join session context group: must specify group id.");const n=this.sessionContextGroupMap.get(e);if(n)n.registerNewClient(t);else{const n=new h.default(this.channel,e);n.registerNewClient(t),this.sessionContextGroupMap.set(e,n)}return{hasConflict:this.contextGroupsById.has(e)}}catch(e){throw new Error(e)}}getClientState(e){return this.interopClients.get(e.endpointId)}static toObject(e){const t=Object.fromEntries(e),n={};return Object.entries(t).forEach((([e,t])=>{const i=Object.fromEntries(t);n[e]=i})),n}static checkContextIntegrity(e){if(!e)return{isValid:!1,reason:"No context supplied"};if("object"!=typeof e)return{isValid:!1,reason:"Context must be an Object"};if(!e.type)return{isValid:!1,reason:"Context must have a type property"};if(e.id&&"object"!=typeof e.id)return{isValid:!1,reason:"Context id must be an Object populated with key-value identifiers (if set)"};if(e.id){const{id:t}=e,n=Object.keys(t);let i=!1;if(!n.length)return{isValid:!1,reason:"Context id must have at least one key-value identifier"};if(n.forEach((e=>{"string"==typeof e&&"string"==typeof t[e]||(i=!0)})),i)return{isValid:!1,reason:"Context id key-value identifiers must be of type string"}}return e.name&&"string"!=typeof e.name?{isValid:!1,reason:"Context name must be of string type (if set)"}:{isValid:!0}}static hasEndpointId(e){return void 0!==e.endpointId}static isContextTypeCompatible(e,t){return void 0===t||e===t}setContextGroupMap(){for(const e of this.getContextGroups())this.contextGroupsById.set(e.id,new Map)}async setCurrentContextGroupInClientOptions(e,t){try{const n=await this.fin.System.getEntityInfo(e.uuid,e.name);let i;"view"===n.entityType?i=await this.fin.View.wrap(e):"window"===n.entityType&&(i=await this.fin.Window.wrap(e)),i&&await i.updateOptions({interop:{currentContextGroup:t}})}catch(e){}}async setupChannelProvider(){try{const e=await this.getProvider();this.channel=e,this.wireChannel(e)}catch(e){throw new Error(`Error setting up Interop Broker Channel Provider: ${e}`)}}wireChannel(e){e.onConnection((async(e,t)=>{if(!await this.isConnectionAuthorized(e,t))throw new Error(`Connection not authorized for ${e.uuid}, ${e.name}`);if(!e.endpointId)throw new Error("Version too old to be compatible with Interop. Please upgrade your runtime to a more recent version.");const n={contextGroupId:void 0,contextHandlers:new Map,clientIdentity:e};t?.currentContextGroup&&this.contextGroupsById.has(t.currentContextGroup)&&(n.contextGroupId=t?.currentContextGroup),this.interopClients.set(e.endpointId,n)})),e.onDisconnection((e=>{this.interopClients.delete(e.endpointId);const t=this.intentClientMap.get(e.name);t&&e.uuid===this.fin.me.uuid&&t.forEach((e=>{e.isReady=!1})),this.sessionContextGroupMap.forEach((t=>{t.onDisconnection(e)})),this.clientDisconnected(e)})),e.beforeAction((async(e,t,n)=>{if(!await this.isActionAuthorized(e,t,n))throw new Error(`Action (${e}) not authorized for ${n.uuid}, ${n.name}`);this.logging?.beforeAction?.enabled&&console.log(e,t,n)})),e.afterAction(((e,t,n)=>{this.logging?.afterAction?.enabled&&console.log(e,t,n)})),e.register("setContext",this.setContext.bind(this)),e.register("fireIntent",this.handleFiredIntent.bind(this)),e.register("getCurrentContext",this.getCurrentContext.bind(this)),e.register("getInfoForIntent",this.handleInfoForIntent.bind(this)),e.register("getInfoForIntentsByContext",this.handleInfoForIntentsByContext.bind(this)),e.register("fireIntentForContext",this.handleFiredIntentForContext.bind(this)),e.register("getContextGroups",this.getContextGroups.bind(this)),e.register("joinContextGroup",this.joinContextGroup.bind(this)),e.register("removeFromContextGroup",this.removeFromContextGroup.bind(this)),e.register("getAllClientsInContextGroup",this.getAllClientsInContextGroup.bind(this)),e.register("getInfoForContextGroup",this.getInfoForContextGroup.bind(this)),e.register("contextHandlerRegistered",this.contextHandlerRegistered.bind(this)),e.register("intentHandlerRegistered",this.intentHandlerRegistered.bind(this)),e.register("removeContextHandler",this.removeContextHandler.bind(this)),e.register("sessionContextGroup:createIfNeeded",this.handleJoinSessionContextGroup.bind(this)),e.register("fdc3Open",this.fdc3HandleOpen.bind(this)),e.register("fdc3v2FindIntentsByContext",this.handleInfoForIntentsByContext.bind(this)),e.register("fdc3FindInstances",this.fdc3HandleFindInstances.bind(this)),e.register("fdc3GetAppMetadata",this.fdc3HandleGetAppMetadata.bind(this)),e.register("fdc3v2GetInfo",(async(e,t)=>this.fdc3HandleGetInfo.bind(this)(e,t))),e.register("createPrivateChannelProvider",(async e=>{const{channelId:t}=e,n=await this.fin.InterApplicationBus.Channel.create(t);p.PrivateChannelProvider.init(n,t)}))}isConnectionAuthorized(e,t){return this.wire.sendAction("interop-broker-is-connection-authorized").catch((e=>{})),Promise.resolve(!0)}isActionAuthorized(e,t,n){return this.wire.sendAction("interop-broker-is-action-authorized").catch((e=>{})),Promise.resolve(!0)}};return Gi.InteropBroker=f,e=new WeakMap,t=new WeakMap,n=new WeakMap,Gi}var zi,Ki={},qi={},Ji=s&&s.__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},Yi=s&&s.__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)};Object.defineProperty(qi,"__esModule",{value:!0});const Zi=d,Qi=Hi;class Xi extends Zi.Base{constructor(e,t,n){super(e),zi.set(this,void 0),this.id=n,Ji(this,zi,t,"f")}async setContext(e){this.wire.sendAction("interop-session-context-group-set-context").catch((e=>{}));return(await Yi(this,zi,"f")).dispatch(`sessionContextGroup:setContext-${this.id}`,{sessionContextGroupId:this.id,context:e})}async getCurrentContext(e){this.wire.sendAction("interop-session-context-group-get-context").catch((e=>{}));return(await Yi(this,zi,"f")).dispatch(`sessionContextGroup:getContext-${this.id}`,{sessionContextGroupId:this.id,type:e})}async addContextHandler(e,t){if(this.wire.sendAction("interop-session-context-group-add-handler").catch((e=>{})),"function"!=typeof e)throw new Error("Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");const n=await Yi(this,zi,"f");let i;return i=t?`sessionContextHandler:invoke-${this.id}-${t}-${(0,Qi.generateId)()}`:`sessionContextHandler:invoke-${this.id}`,n.register(i,(0,Qi.wrapContextHandler)(e,i)),await n.dispatch(`sessionContextGroup:handlerAdded-${this.id}`,{handlerId:i,contextType:t}),{unsubscribe:await this.createUnsubscribeCb(i)}}async createUnsubscribeCb(e){const t=await Yi(this,zi,"f");return async()=>{t.remove(e),await t.dispatch(`sessionContextGroup:handlerRemoved-${this.id}`,{handlerId:e})}}getUserInstance(){return{id:this.id,setContext:(0,Qi.wrapInTryCatch)(this.setContext.bind(this),"Failed to set context: "),getCurrentContext:(0,Qi.wrapInTryCatch)(this.getCurrentContext.bind(this),"Failed to get context: "),addContextHandler:(0,Qi.wrapInTryCatch)(this.addContextHandler.bind(this),"Failed to add context handler: ")}}}qi.default=Xi,zi=new WeakMap;var er={},tr={},nr={},ir={},rr=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),or=s&&s.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),sr=s&&s.__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)&&rr(t,e,n);return or(t,e),t};Object.defineProperty(ir,"__esModule",{value:!0}),ir.PrivateChannelClient=void 0;const ar=sr(Hi);var cr,dr;function hr(){if(cr)return tr;cr=1;var e,t=s&&s.__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)},n=s&&s.__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},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(tr,"__esModule",{value:!0}),tr.FDC3ModuleBase=void 0;const o=nr,a=Hi,c=wr(),d=r(i);return tr.FDC3ModuleBase=class{get client(){return t(this,e,"f").call(this)}get fin(){return this.wire.getFin()}constructor(t,i){this.wire=i,e.set(this,void 0),n(this,e,t,"f")}async broadcast(e){return this.wire.sendAction("fdc3-broadcast").catch((e=>{})),this.client.setContext(e)}async _open(e,t){this.wire.sendAction("fdc3-open").catch((e=>{}));try{return await c.InteropClient.ferryFdc3Call(this.client,"fdc3Open",{app:e,context:t})}catch(e){const t=e.message===a.BROKER_ERRORS.fdc3Open?"ResolverUnavailable":e.message;throw new Error(t)}}async _getChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:"system",...(0,o.getUnsupportedChannelApis)()})))}async getOrCreateChannel(e){this.wire.sendAction("fdc3-get-or-create-channel").catch((e=>{}));const t=(await this._getChannels()).find((t=>t.id===e));if(t)return{...t,type:"system",...(0,o.getUnsupportedChannelApis)()};try{const t=await this.client.joinSessionContextGroup(e);return(0,o.buildAppChannelObject)(t)}catch(e){throw console.error(e.message),new Error(o.ChannelError.CreationFailed)}}async getSystemChannels(){return this.wire.sendAction("fdc3-get-system-channels").catch((e=>{})),this._getChannels()}async joinChannel(e){this.wire.sendAction("fdc3-join-channel").catch((e=>{}));try{return await this.client.joinContextGroup(e)}catch(e){if(e.message===a.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup?console.error("The Channel you have tried to join is an App Channel. Custom Channels can only be defined by the Interop Broker through code or manifest configuration. Please use getOrCreateChannel."):console.error(e.message),e.message.startsWith("Attempting to join a context group that does not exist"))throw new Error(o.ChannelError.NoChannelFound);throw new Error(o.ChannelError.AccessDenied)}}async getCurrentChannel(){this.wire.sendAction("fdc3-get-current-channel").catch((e=>{}));const e=await this.getCurrentContextGroupInfo();return e?this.buildChannelObject(e):null}async leaveCurrentChannel(){return this.wire.sendAction("fdc3-leave-current-channel").catch((e=>{})),this.client.removeFromContextGroup()}async getCurrentContextGroupInfo(){const e=await this.client.getContextGroups(),t=e.map((async e=>this.client.getAllClientsInContextGroup(e.id))),n=(await Promise.all(t)).findIndex((e=>e.some((e=>{const{uuid:t,name:n}=e;return this.wire.me.uuid===t&&this.wire.me.name===n}))));return e[n]}async buildChannelObject(e){return{...e,type:"system",addContextListener:(...[e,t])=>{let n,i;"function"==typeof e?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),n=e):(n=t,"string"==typeof e&&(i=e));const r=(async()=>{let e=!0;const t=await this.client.getCurrentContext(i);return this.client.addContextHandler(((i,r)=>{if(!e||(e=!1,!(0,d.default)(t,i)))return n(i,r)}),i)})();return{...r,unsubscribe:()=>r.then((e=>e.unsubscribe()))}},broadcast:this.broadcast.bind(this),getCurrentContext:async e=>{const t=await this.client.getCurrentContext(e);return void 0===t?null:t}}}},e=new WeakMap,tr}ir.PrivateChannelClient=class{constructor(e,t){this.id=t,this.client=e,this.listeners=new Map}async broadcast(e){return this.client.dispatch("broadcast",{context:e})}async getCurrentContext(e){return this.client.dispatch("getCurrentContext",{contextType:e})}async addContextListener(e,t){if("function"!=typeof t)throw new Error("Non-function argument passed to the second parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");let n;n=e?`contextHandler:invoke-${this.id}-${e}-${ar.generateId()}`:`contextHandler:invoke-${this.id}-${ar.generateId()}`,this.client.register(n,ar.wrapContextHandler(t,n));const i={unsubscribe:await this.createContextUnsubscribeCb(n)};return this.listeners.set(n,i),await this.client.dispatch("contextHandlerAdded",{handlerId:n,contextType:e}),i}createNonStandardUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch("nonStandardHandlerRemoved",{handlerId:e})}}createContextUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch("contextHandlerRemoved",{handlerId:e})}}onAddContextListener(e){const t=`onContextHandlerAdded:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch("onAddContextHandlerAdded",{handlerId:t}),n}onDisconnect(e){const t=`onDisconnect:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch("onDisconnectHandlerAdded",{handlerId:t}),n}onUnsubscribe(e){const t=`onUnsubscribe:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch("onUnsubscribeHandlerAdded",{handlerId:t}),n}async cleanUpAllSubs(){Array.from(this.listeners.keys()).forEach((e=>{this.client.remove(e),this.listeners.delete(e)}))}async disconnect(){try{await this.client.dispatch("clientDisconnecting"),await this.cleanUpAllSubs(),await this.client.disconnect()}catch(e){throw new Error(e.message)}}},function(e){var t=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.getIntentResolution=e.isChannel=e.isContext=e.connectPrivateChannel=e.buildAppChannelObject=e.buildPrivateChannelObject=e.ChannelError=e.ResultError=e.UnsupportedChannelApiError=e.getUnsupportedChannelApis=void 0;const n=Hi,r=ir,o=t(i);e.getUnsupportedChannelApis=e=>({addContextListener:()=>{throw new a("Channel.addContextListener",e)},broadcast:()=>{throw new a("Channel.broadcast",e)},getCurrentContext:()=>{throw new a("Channel.getCurrentContext",e)}});class a extends Error{constructor(e,t="System"){super(e),this.message=`Calling ${e} on an instance of a ${t} Channel returned by fdc3.get${t}Channels is not supported. If you would like to use a ${t} Channel, please use fdc3.joinChannel, fdc3.addContextListener, and fdc3.broadcast instead.`}}var c,d;e.UnsupportedChannelApiError=a,function(e){e.NoResultReturned="NoResultReturned",e.IntentHandlerRejected="IntentHandlerRejected"}(c=e.ResultError||(e.ResultError={})),(d=e.ChannelError||(e.ChannelError={})).NoChannelFound="NoChannelFound",d.AccessDenied="AccessDenied",d.CreationFailed="CreationFailed";e.buildPrivateChannelObject=e=>{let t=!1;const n=()=>{if(t)throw new Error("Private Channel Client has been disconnected from the Private Channel")};return{id:e.id,type:"private",broadcast:async t=>(n(),e.broadcast(t)),getCurrentContext:async t=>(n(),e.getCurrentContext(t)),addContextListener:async(t,i)=>{n();let r=i,o=t;"function"==typeof t&&(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),r=t,o=null);return e.addContextListener(o,r)},onAddContextListener:t=>(n(),e.onAddContextListener(t)),disconnect:async()=>(n(),t=!0,e.disconnect()),onDisconnect:t=>(n(),e.onDisconnect(t)),onUnsubscribe:t=>(n(),e.onUnsubscribe(t))}};e.buildAppChannelObject=e=>({id:e.id,type:"app",broadcast:e.setContext,getCurrentContext:async t=>{const n=await e.getCurrentContext(t);return void 0===n?null:n},addContextListener:(t,n)=>{let i,r;"function"==typeof t?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),i=t):(i=n,"string"==typeof t&&(r=t));const s=(async()=>{let t=!0;const n=await e.getCurrentContext(r);return e.addContextHandler(((e,r)=>{if(!t||(t=!1,!(0,o.default)(n,e)))return i(e,r)}),r)})();return{...s,unsubscribe:()=>s.then((e=>e.unsubscribe()))}}});e.connectPrivateChannel=async t=>{try{const n=await fin.InterApplicationBus.Channel.connect(t),i=new r.PrivateChannelClient(n,t);return(0,e.buildPrivateChannelObject)(i)}catch(e){throw new Error(`Private Channel with id: ${t} doesn't exist`)}};e.isContext=e=>{if(e&&"object"==typeof e&&"type"in e){const{type:t}=e;return"string"==typeof t}return!1};e.isChannel=e=>{if(e&&"object"==typeof e&&"type"in e&&"id"in e){const{type:t,id:n}=e;return"string"==typeof t&&"string"==typeof n&&("app"===t||"private"===t)}return!1};e.getIntentResolution=async(t,i,r,o)=>{const s=(0,n.generateId)(),a=new Promise(((e,t)=>{fin.InterApplicationBus.subscribe({uuid:"*"},s,(t=>{e(t)})).catch((()=>t(new Error("getResult is not supported in this environment"))))})),d=r?{target:r,intentResolutionResultId:s}:{intentResolutionResultId:s},h=o?{name:o,context:i,metadata:d}:{...i,metadata:d},l=async()=>{let n=await a;if(!n||"object"!=typeof n)throw new Error(c.NoResultReturned);const{error:i}=n;if(i)throw new Error(c.IntentHandlerRejected);if((0,e.isChannel)(n)){const{id:i,type:r}=n;switch(r){case"private":n=await(0,e.connectPrivateChannel)(i);break;case"app":{const r=await t.joinSessionContextGroup(i);n=(0,e.buildAppChannelObject)(r);break}}}else if(!(0,e.isContext)(n))throw new Error(c.NoResultReturned);return n},u=o?await t.fireIntent(h):await t.fireIntentForContext(h);return"object"!=typeof u?{source:{appId:"",instanceId:""},intent:"",version:"2.0",getResult:l}:{...u,getResult:l}}}(nr);var lr,ur,pr={};function wr(){if(ur)return Ki;ur=1;var e,t,n=s&&s.__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},i=s&&s.__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)},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ki,"__esModule",{value:!0}),Ki.InteropClient=void 0;const o=d,a=r(qi),c=function(){if(dr)return er;dr=1,Object.defineProperty(er,"__esModule",{value:!0}),er.Fdc3Module=void 0;const e=Hi,t=hr();class n extends t.FDC3ModuleBase{async open(e,t){await super._open(e,t)}addContextListener(e,t){let n;return this.wire.sendAction("fdc3-add-context-listener").catch((e=>{})),"function"==typeof e?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),n=this.client.addContextHandler(e)):n=this.client.addContextHandler(t,null===e?void 0:e),{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}addIntentListener(e,t){this.wire.sendAction("fdc3-add-intent-listener").catch((e=>{}));const n=this.client.registerIntentHandler((e=>{const{context:n,metadata:i}=e,{metadata:r}=n,o=i?.intentResolutionResultId||r?.intentResolutionResultId;o&&this.fin.InterApplicationBus.publish(o,null).catch((()=>null)),t(e.context)}),e,{fdc3Version:"1.2"});return{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}async raiseIntent(t,n,i){this.wire.sendAction("fdc3-raise-intent").catch((e=>{}));const r=i?{name:t,context:n,metadata:{target:i}}:{name:t,context:n};try{return await this.client.fireIntent(r)}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntent?"ResolverUnavailable":t.message;throw new Error(n)}}async findIntent(t,n){this.wire.sendAction("fdc3-find-intent").catch((e=>{}));try{return await this.client.getInfoForIntent({name:t,context:n})}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntent?"ResolverUnavailable":t.message;throw new Error(n)}}async findIntentsByContext(t){this.wire.sendAction("fdc3-find-intents-by-context").catch((e=>{}));try{return await this.client.getInfoForIntentsByContext(t)}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntentsByContext?"ResolverUnavailable":t.message;throw new Error(n)}}async raiseIntentForContext(t,n){this.wire.sendAction("fdc3-raise-intent-for-context").catch((e=>{}));try{return await this.client.fireIntentForContext({...t,metadata:{target:n}})}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntentForContext?"ResolverUnavailable":t.message;throw new Error(n)}}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}getInfo(){return this.wire.sendAction("fdc3-get-info").catch((e=>{})),{providerVersion:this.wire.environment.getAdapterVersionSync(),provider:`openfin-${this.wire.me.uuid}`,fdc3Version:"1.2"}}}return er.Fdc3Module=n,er}(),h=function(){if(lr)return pr;lr=1,Object.defineProperty(pr,"__esModule",{value:!0}),pr.Fdc3Module2=void 0;const e=hr(),t=Hi,n=wr(),i=nr,r=ir;class o extends e.FDC3ModuleBase{async open(e,t){return"string"==typeof e&&console.warn("Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string })."),super._open(e,t)}async findInstances(e){this.wire.sendAction("fdc3-find-instances").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,"fdc3FindInstances",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3FindInstances?"ResolverUnavailable":e.message;throw new Error(n)}}async getAppMetadata(e){this.wire.sendAction("fdc3-get-app-metadata").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,"fdc3GetAppMetadata",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3GetAppMetadata?"ResolverUnavailable":e.message;throw new Error(n)}}async addContextListener(e,t){this.wire.sendAction("fdc3-add-context-listener").catch((e=>{}));const n=e=>t=>{const{contextMetadata:n,...i}=t,r=n?[{...i},n]:[t,null];e(...r)};let i=t,r=n(i);return"function"==typeof e?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),i=e,r=n(i),this.client.addContextHandler(r)):this.client.addContextHandler(r,null===e?void 0:e)}async findIntent(e,n,i){this.wire.sendAction("fdc3-find-intent").catch((e=>{}));try{return await this.client.getInfoForIntent({name:e,context:n,metadata:{resultType:i}})}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntent?"ResolverUnavailable":e.message;throw new Error(n)}}async findIntentsByContext(e,i){this.wire.sendAction("fdc3-find-intents-by-context").catch((e=>{}));const r=i?{context:e,metadata:{resultType:i}}:e;try{return await n.InteropClient.ferryFdc3Call(this.client,"fdc3v2FindIntentsByContext",r)}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntentsByContext?"ResolverUnavailable":e.message;throw new Error(n)}}async raiseIntent(e,n,r){this.wire.sendAction("fdc3-raise-intent").catch((e=>{}));try{return"string"==typeof r&&console.warn("Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string })."),(0,i.getIntentResolution)(this.client,n,r,e)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?"ResolverUnavailable":e.message;throw new Error(n)}}async raiseIntentForContext(e,n){this.wire.sendAction("fdc3-raise-intent-for-context").catch((e=>{}));try{return"string"==typeof n&&console.warn("Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string })."),(0,i.getIntentResolution)(this.client,e,n)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?"ResolverUnavailable":e.message;throw new Error(n)}}async addIntentListener(e,t){if(this.wire.sendAction("fdc3-add-intent-listener").catch((e=>{})),"string"!=typeof e)throw new Error("First argument must be an Intent name");return this.client.registerIntentHandler((async e=>{let n,i;const{context:r,metadata:o}=e,{contextMetadata:s,metadata:a,...c}=r,d=o?.intentResolutionResultId||a?.intentResolutionResultId;try{const e=a?{metadata:a,...c}:{...c};n=await t(e,s),i=n}catch(e){n=e,i={error:!0}}if(d&&this.fin.InterApplicationBus.publish(d,i).catch((()=>null)),n instanceof Error)throw new Error(n.message);return n}),e,{fdc3Version:"2.0"})}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}async createPrivateChannel(){const e=(0,t.generateId)();await n.InteropClient.ferryFdc3Call(this.client,"createPrivateChannelProvider",{channelId:e});const o=await this.fin.InterApplicationBus.Channel.connect(e),s=new r.PrivateChannelClient(o,e);return(0,i.buildPrivateChannelObject)(s)}async getUserChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:"user",...(0,i.getUnsupportedChannelApis)("User")})))}async getSystemChannels(){return console.warn("This API has been deprecated. Please use fdc3.getUserChannels instead."),super.getSystemChannels()}async joinUserChannel(e){return super.joinChannel(e)}async joinChannel(e){return console.warn("This API has been deprecated. Please use fdc3.joinUserChannel instead."),super.joinChannel(e)}async getCurrentChannel(){const e=await super.getCurrentChannel();return e?{...e,type:"user",broadcast:this.broadcast.bind(this)}:null}async getInfo(){return n.InteropClient.ferryFdc3Call(this.client,"fdc3v2GetInfo",{fdc3Version:"2.0"})}}return pr.Fdc3Module2=o,pr}(),l=Hi;let u=class extends o.Base{constructor(i,r){super(i),e.set(this,void 0),t.set(this,void 0),n(this,t,new Map,"f"),n(this,e,r,"f")}async setContext(t){this.wire.sendAction("interop-client-set-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("setContext",{context:t})}async addContextHandler(t,n){if(this.wire.sendAction("interop-client-add-context-handler").catch((e=>{})),"function"!=typeof t)throw new Error("Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");const r=await i(this,e,"f");let o;o=n?`invokeContextHandler-${n}-${(0,l.generateId)()}`:"invokeContextHandler";const s=(0,l.wrapContextHandler)(t,o);return r.register(o,s),await r.dispatch("contextHandlerRegistered",{handlerId:o,contextType:n}),{unsubscribe:async()=>{r.remove(o),await r.dispatch("removeContextHandler",{handlerId:o})}}}async getContextGroups(){this.wire.sendAction("interop-client-get-context-groups").catch((e=>{}));return(await i(this,e,"f")).dispatch("getContextGroups")}async joinContextGroup(t,n){this.wire.sendAction("interop-client-join-context-group").catch((e=>{}));const r=await i(this,e,"f");if(!t)throw new Error("No contextGroupId specified for joinContextGroup.");return r.dispatch("joinContextGroup",{contextGroupId:t,target:n})}async removeFromContextGroup(t){this.wire.sendAction("interop-client-remove-from-context-group").catch((e=>{}));return(await i(this,e,"f")).dispatch("removeFromContextGroup",{target:t})}async getAllClientsInContextGroup(t){this.wire.sendAction("interop-client-get-all-clients-in-context-group").catch((e=>{}));const n=await i(this,e,"f");if(!t)throw new Error("No contextGroupId specified for getAllClientsInContextGroup.");return n.dispatch("getAllClientsInContextGroup",{contextGroupId:t})}async getInfoForContextGroup(t){this.wire.sendAction("interop-client-get-info-for-context-group").catch((e=>{}));const n=await i(this,e,"f");if(!t)throw new Error("No contextGroupId specified for getInfoForContextGroup.");return n.dispatch("getInfoForContextGroup",{contextGroupId:t})}async fireIntent(t){this.wire.sendAction("interop-client-fire-intent").catch((e=>{}));return(await i(this,e,"f")).dispatch("fireIntent",t)}async registerIntentHandler(t,n,r){this.wire.sendAction("interop-client-register-intent-handler").catch((e=>{}));const o=await i(this,e,"f"),s=`intent-handler-${n}`,a=(0,l.wrapIntentHandler)(t,s);try{await o.register(s,a),await o.dispatch("intentHandlerRegistered",{handlerId:s,...r})}catch(e){throw new Error("Unable to register intent handler")}return{unsubscribe:async()=>{o.remove(s)}}}async getCurrentContext(t){this.wire.sendAction("interop-client-get-current-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("getCurrentContext",{contextType:t})}async getInfoForIntent(t){this.wire.sendAction("interop-client-get-info-for-intent").catch((e=>{}));return(await i(this,e,"f")).dispatch("getInfoForIntent",t)}async getInfoForIntentsByContext(t){this.wire.sendAction("interop-client-get-info-for-intents-by-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("getInfoForIntentsByContext",t)}async fireIntentForContext(t){this.wire.sendAction("interop-client-fire-intent-for-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("fireIntentForContext",t)}async joinSessionContextGroup(n){try{const r=i(this,t,"f").get(n);if(r)return r.getUserInstance();const o=await i(this,e,"f"),{hasConflict:s}=await o.dispatch("sessionContextGroup:createIfNeeded",{sessionContextGroupId:n});s&&console.warn(`A (non-session) context group with the name "${n}" already exists. If you are trying to join a Context Group, call joinContextGroup instead.`);const c=new a.default(this.wire,i(this,e,"f"),n);return i(this,t,"f").set(n,c),c.getUserInstance()}catch(e){throw console.error(`Error thrown trying to create Session Context Group with id "${n}": ${e}`),e}}async onDisconnection(t){this.wire.sendAction("interop-client-add-ondisconnection-listener").catch((e=>{}));return(await i(this,e,"f")).onDisconnection((e=>{const{uuid:n}=e;t({type:"interop-broker",topic:"disconnected",brokerName:n})}))}getFDC3Sync(e){switch(e){case"1.2":return new c.Fdc3Module((()=>this),this.wire);case"2.0":return new h.Fdc3Module2((()=>this),this.wire);default:throw new Error(`Invalid FDC3 version provided: ${e}. Must be '1.2' or '2.0'`)}}async getFDC3(e){return this.getFDC3Sync(e)}static async ferryFdc3Call(t,n,r){return(await i(t,e,"f")).dispatch(n,r||null)}};return Ki.InteropClient=u,e=new WeakMap,t=new WeakMap,Ki}var yr,fr,gr,mr={};function vr(){if(yr)return mr;yr=1,Object.defineProperty(mr,"__esModule",{value:!0}),mr.overrideCheck=mr.checkFDC32Overrides=mr.getDefaultViewFdc3VersionFromAppInfo=void 0;const e=Vi();function t(t){return["fdc3HandleFindInstances","handleInfoForIntent","handleInfoForIntentsByContext","fdc3HandleGetAppMetadata","fdc3HandleGetInfo","fdc3HandleOpen","handleFiredIntent","handleFiredIntentForContext"].filter((n=>t[n]===e.InteropBroker.prototype[n]))}return mr.getDefaultViewFdc3VersionFromAppInfo=function({manifest:e,initialOptions:t}){const n=e?.platform?.defaultViewOptions?.fdc3InteropApi??t.defaultViewOptions?.fdc3InteropApi;return["1.2","2.0"].includes(n??"")?n:void 0},mr.checkFDC32Overrides=t,mr.overrideCheck=function(e,n){if(n&&"2.0"===n){const n=t(e);n.length>0&&console.warn(`WARNING: FDC3 2.0 has been set as a default option for Views in this Platform, but the required InteropBroker APIs for FDC3 2.0 compliance have not all been overridden.\nThe following APIs need to be overridden:\n${n.join("\n")}`)}},mr}function Cr(){return gr||(gr=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),i=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),i(function(){if(fr)return Ti;fr=1;var e=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ti,"__esModule",{value:!0}),Ti.InteropModule=void 0;const t=e(n),i=$i,r=d,o=Vi(),a=wr(),c=vr(),h=Tn,l=e=>new e,u="You have attempted to use or modify InteropBroker parameters, which is not allowed. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.";class p extends r.Base{async init(e,n=l){this.wire.sendAction("interop-init").catch((()=>{}));const r=await this.wire.environment.getInteropInfo(this.wire.getFin()),s=(0,i.createUnusableObject)(u),a=(0,i.createWarningObject)(u,(0,t.default)(r)),d=async()=>{throw new Error(u)},p=o.InteropBroker.createClosedConstructor(this.wire,(()=>this.fin.InterApplicationBus.Channel.create(`interop-broker-${e}`)),r);let w;return w=Array.isArray(n)?new((0,h.overrideFromComposables)(...n)(p))(s,d,a):await n(p,s,d,a),(0,c.overrideCheck)(w,r.fdc3Version),w}connectSync(e,t){return this.wire.sendAction("interop-connect-sync").catch((()=>{})),new a.InteropClient(this.wire,this.wire.environment.whenReady().then((()=>this.fin.InterApplicationBus.Channel.connect(`interop-broker-${e}`,{payload:t}))))}}return Ti.InteropModule=p,Ti}(),e),i(wr(),e),i(Vi(),e)}(Li)),Li}var br={},Ir={},Er={},xr={};Object.defineProperty(xr,"__esModule",{value:!0}),xr.getSnapshotSourceChannelName=void 0;xr.getSnapshotSourceChannelName=e=>`snapshot-source-provider-${e.uuid}`;var Ar,Pr,Mr,_r,Or,Sr=s&&s.__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},Rr=s&&s.__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)};Object.defineProperty(Er,"__esModule",{value:!0}),Er.SnapshotSource=void 0;const Fr=d,jr=xr,kr=new Map;class Lr extends Fr.Base{constructor(e,t){super(e),Ar.set(this,void 0),Pr.set(this,(()=>(kr.has(this.identity.uuid)||kr.set(this.identity.uuid,{eventFired:null,clientPromise:null}),kr.get(this.identity.uuid)))),Mr.set(this,(()=>(Rr(this,Pr,"f").call(this).clientPromise||(Rr(this,Pr,"f").call(this).clientPromise=Rr(this,_r,"f").call(this)),Rr(this,Pr,"f").call(this).clientPromise))),_r.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);try{Rr(this,Pr,"f").call(this).eventFired||await Rr(this,Or,"f").call(this);const t=await this.fin.InterApplicationBus.Channel.connect(e,{wait:!1});return t.onDisconnection((()=>{Rr(this,Pr,"f").call(this).clientPromise=null,Rr(this,Pr,"f").call(this).eventFired=null})),t}catch(e){throw Rr(this,Pr,"f").call(this).clientPromise=null,new Error("The targeted SnapshotSource is not currently initialized. Await this object's ready() method.")}})),Or.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);let t,n;const i=new Promise(((e,i)=>{t=e,n=i}));Rr(this,Pr,"f").call(this).eventFired=i;const r=async i=>{try{i.channelName===e&&(t(),await this.fin.InterApplicationBus.Channel.removeListener("connected",r))}catch(e){n(e)}};await this.fin.InterApplicationBus.Channel.on("connected",r)})),Sr(this,Ar,t,"f")}get identity(){return Rr(this,Ar,"f")}async ready(){this.wire.sendAction("snapshot-source-ready").catch((e=>{}));try{await Rr(this,Mr,"f").call(this)}catch(e){await Rr(this,Pr,"f").call(this).eventFired}}async getSnapshot(){this.wire.sendAction("snapshot-source-get-snapshot").catch((e=>{}));const e=await Rr(this,Mr,"f").call(this),t=await e.dispatch("get-snapshot");return(await t).snapshot}async applySnapshot(e){this.wire.sendAction("snapshot-source-apply-snapshot").catch((e=>{}));return(await Rr(this,Mr,"f").call(this)).dispatch("apply-snapshot",{snapshot:e})}}Er.SnapshotSource=Lr,Ar=new WeakMap,Pr=new WeakMap,Mr=new WeakMap,_r=new WeakMap,Or=new WeakMap,Object.defineProperty(Ir,"__esModule",{value:!0}),Ir.SnapshotSourceModule=void 0;const Tr=d,$r=Er,Br=xr;class Gr extends Tr.Base{async init(e){if(this.wire.sendAction("snapshot-source-init").catch((e=>{})),"object"!=typeof e||"function"!=typeof e.getSnapshot||"function"!=typeof e.applySnapshot)throw new Error("you must pass in a valid SnapshotProvider");const t=await this.fin.InterApplicationBus.Channel.create((0,Br.getSnapshotSourceChannelName)(this.fin.me));t.register("get-snapshot",(async()=>({snapshot:await e.getSnapshot()}))),t.register("apply-snapshot",(({snapshot:t})=>e.applySnapshot(t)))}wrapSync(e){return this.wire.sendAction("snapshot-source-wrap-sync").catch((e=>{})),new $r.SnapshotSource(this.wire,e)}async wrap(e){return this.wire.sendAction("snapshot-source-wrap").catch((e=>{})),this.wrapSync(e)}}Ir.SnapshotSourceModule=Gr,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Ir,e),n(Er,e)}(br),Object.defineProperty(a,"__esModule",{value:!0});var Wr=a.Fin=void 0;const Hr=t,Nr=c,Dr=ie(),Ur=Z(),Vr=de,zr=en,Kr=rn,qr=un,Jr=bn,Yr=J(),Zr=An,Qr=ki,Xr=Cr(),eo=br;class to extends Hr.EventEmitter{constructor(e){super(),this.wire=e,this.System=new Nr.System(e),this.Window=new Dr._WindowModule(e),this.Application=new Ur.ApplicationModule(e),this.InterApplicationBus=new Vr.InterApplicationBus(e),this.Clipboard=new zr.Clipboard(e),this.ExternalApplication=new Kr.ExternalApplicationModule(e),this.Frame=new qr._FrameModule(e),this.GlobalHotkey=new Jr.GlobalHotkey(e),this.Platform=new Zr.PlatformModule(e,this.InterApplicationBus.Channel),this.View=new Yr.ViewModule(e),this.Interop=new Xr.InteropModule(e),this.SnapshotSource=new eo.SnapshotSourceModule(e),e.registerFin(this),this.me=(0,Qr.getMe)(e),e.on("disconnected",(()=>{this.emit("disconnected")}))}}Wr=a.Fin=to;var no={},io={};function ro(e){return"string"==typeof e.manifestUrl}function oo(e){return ao(e)&&"string"==typeof e.address}function so(e){return oo(e)&&"string"==typeof e.token}function ao(e){return"string"==typeof e.uuid}function co(e){return e.runtime&&"string"==typeof e.runtime.version}function ho(e){return ao(e)&&co(e)}Object.defineProperty(io,"__esModule",{value:!0}),io.isInternalConnectConfig=io.isPortDiscoveryConfig=io.isNewConnectConfig=io.isConfigWithReceiver=io.isRemoteConfig=io.isExistingConnectConfig=io.isExternalConfig=void 0,io.isExternalConfig=ro,io.isExistingConnectConfig=oo,io.isRemoteConfig=so,io.isConfigWithReceiver=function(e){return"object"==typeof e.receiver&&so({...e,address:""})},io.isNewConnectConfig=ho,io.isPortDiscoveryConfig=function(e){return ro(e)&&co(e)||ho(e)},io.isInternalConnectConfig=function(e){return oo(e)||ho(e)};var lo={},uo={};Object.defineProperty(uo,"__esModule",{value:!0}),uo.EmitterMap=void 0;const po=t;function wo(e){return Buffer.from(e).toString("base64")}uo.EmitterMap=class{constructor(){this.storage=new Map}hashKeys(e){return e.map(wo).join("/")}getOrCreate(e){const t=this.hashKeys(e);return this.storage.has(t)||this.storage.set(t,new po.EventEmitter),this.storage.get(t)}has(e){return this.storage.has(this.hashKeys(e))}delete(e){const t=this.hashKeys(e);return this.storage.delete(t)}},Object.defineProperty(lo,"__esModule",{value:!0});const yo=uo;class fo extends yo.EmitterMap{constructor(){super(...arguments),this.dispatchEvent=e=>{if(function(e){return"process-desktop-event"===e.action}(e)){const{payload:t}=e,n=function(e){const{topic:t}=e;if("frame"===t||"window"===t||"view"===t){const{uuid:n,name:i}=e;return[t,n,i]}if("application"===t){const{uuid:n}=e;return[t,n]}return[t]}(t);if(this.has(n))return this.getOrCreate(n).emit(t.type,t),!0}return!1}}}lo.default=fo;var go,mo,vo=s&&s.__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},Co=s&&s.__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)},bo=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(no,"__esModule",{value:!0});var Io=no.Transport=void 0;const Eo=t,xo=io,Ao=g,Po=bo(lo),Mo=ki,_o=ke;class Oo extends Eo.EventEmitter{constructor(e,t,n){super(),this.wireListeners=new Map,this.topicRefMap=new Map,this.eventAggregator=new Po.default,this.messageHandlers=[this.eventAggregator.dispatchEvent],go.set(this,void 0),mo.set(this,void 0),this.connectSync=()=>{Co(this,go,"f").connectSync()},this.getPort=()=>Co(this,go,"f").getPort(),vo(this,go,new e(this.onmessage.bind(this)),"f"),this.environment=t,this.sendRaw=Co(this,go,"f").send.bind(Co(this,go,"f")),this.registerMessageHandler(this.handleMessage.bind(this)),Co(this,go,"f").on("disconnected",(()=>{for(const[,{handleNack:e}]of this.wireListeners)e({reason:"Remote connection has closed"});this.wireListeners.clear(),this.emit("disconnected")}));const{uuid:i,name:r}=n,o=this.environment.getCurrentEntityType();this.me=(0,Mo.getBaseMe)(o,i,r)}getFin(){if(!Co(this,mo,"f"))throw new Error("No Fin object registered for this transport");return Co(this,mo,"f")}registerFin(e){if(Co(this,mo,"f"))throw new Error("Fin object has already been registered for this transport");vo(this,mo,e,"f")}shutdown(){return Co(this,go,"f").shutdown()}async connect(e){if((0,xo.isConfigWithReceiver)(e))return await Co(this,go,"f").connect(e.receiver),this.authorize(e);if((0,xo.isRemoteConfig)(e))return this.connectRemote(e);if((0,xo.isExistingConnectConfig)(e))return this.connectByPort(e);if((0,xo.isNewConnectConfig)(e)){const t=await this.environment.retrievePort(e);return this.connectByPort({...e,address:`ws://localhost:${t}`})}}async connectRemote(e){return await Co(this,go,"f").connect(new(this.environment.getWsConstructor())(e.address)),this.authorize(e)}async connectByPort(e){const{address:t,uuid:n}=e,i={...e,type:"file-token"},r=Co(this,go,"f");await r.connect(new(this.environment.getWsConstructor())(e.address));const o=await this.sendAction("request-external-authorization",{uuid:n,type:"file-token"},!0);if("external-authorization-response"!==o.action)throw new Ao.UnexpectedActionError(o.action);return await this.environment.writeToken(o.payload.file,o.payload.token),this.authorize(i)}async authorize(e){const t=await this.sendAction("request-authorization",e,!0);if("authorization-response"!==t.action)throw new Ao.UnexpectedActionError(t.action);if(!0!==t.payload.success)throw new Ao.RuntimeError(t.payload)}sendAction(e,t={},n=!1){let i=()=>{};const r=Ao.RuntimeError.getCallSite(1),o=this.environment.getNextMessageId(),s=new Promise(((s,a)=>{i=a;const c={action:e,payload:t,messageId:o},d=Co(this,go,"f");return this.addWireListener(o,s,(e=>this.nackHandler(e,a,r)),n),d.send(c).catch(a)}));return Object.assign(s,{cancel:i,messageId:o})}nackHandler(e,t,n){t("string"==typeof e?e:new Ao.RuntimeError(e,n))}ferryAction(e){return new Promise(((t,n)=>{const i=this.environment.getNextMessageId();e.messageId=i;const r=e=>{t(e.payload)};return Co(this,go,"f").send(e).then((()=>this.addWireListener(i,r,(e=>this.nackHandler(e,n)),!1))).catch(n)}))}registerMessageHandler(e){this.messageHandlers.push(e)}addWireListener(e,t,n,i){i?this.uncorrelatedListener=t:this.wireListeners.has(e)?n({reason:"Duplicate handler id",error:(0,_o.errorToPOJO)(new Ao.DuplicateCorrelationError(String(e)))}):this.wireListeners.set(e,{resolve:t,handleNack:n})}onmessage(e){for(const t of this.messageHandlers)t.call(null,e)}handleMessage(e){const t=e.correlationId||NaN;if("correlationId"in e){if(!this.wireListeners.has(t))return!1;{const{resolve:n,handleNack:i}=this.wireListeners.get(t);"ack"!==e.action?i({reason:"Did not receive ack action",error:(0,_o.errorToPOJO)(new Ao.NoAckError(e.action))}):"payload"in e?e.payload.success?n.call(null,e):i(e.payload):"string"==typeof e.reason?i(e):(console.warn("Received invalid response from core",e),i({reason:"invalid response shape"})),this.wireListeners.delete(t)}}else this.uncorrelatedListener&&this.uncorrelatedListener.call(null,e),this.uncorrelatedListener=()=>{};return!0}}Io=no.Transport=Oo,go=new WeakMap,mo=new WeakMap;const So=(...e)=>({log:(...t)=>console.debug(`[${(new Date).toISOString()}]`,...(e=>e.map((e=>`[${e}]`)))(e),...t),getLogger:(...t)=>So(...e,...t)}),Ro=So("@openfin/core-web/client");function Fo(e,t){if(!function(e){return"string"==typeof e}(e))throw new Error(`Property ${t} has invalid type. Expected string, got ${typeof e}.`)}const jo="web-broker-ports-ready",ko=Ro.getLogger("get-web-interop-ports");function Lo(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)}function To(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}"function"==typeof SuppressedError&&SuppressedError;const $o=e=>{var n,i,r;return r=class extends t.EventEmitter{constructor(t){super(),n.set(this,void 0),i.set(this,!1),this.connectSync=()=>{Lo(this,i,"f")||(e.addEventListener("message",(e=>{e.data?.topic?.startsWith("wire-message")&&e.data.message&&Lo(this,n,"f").call(this,{...JSON.parse(e.data.message),ports:e.ports})})),e.start())},this.connect=async()=>{this.connectSync()},this.send=t=>(e.postMessage({topic:"wire-message",message:JSON.stringify(t)}),Promise.resolve()),this.shutdown=async()=>{e.close()},To(this,n,t,"f")}getPort(){return e}},n=new WeakMap,i=new WeakMap,r};var Bo={},Go={};Object.defineProperty(Go,"__esModule",{value:!0}),Go.BaseEnvironment=void 0;const Wo=vr();Go.BaseEnvironment=class{async getViewWindowIdentity(e,t){const{identity:n}=await e.View.wrapSync(t).getCurrentWindow();return n}async getInteropInfo(e){const t=await e.Application.getCurrentSync().getInfo().catch((()=>null)),n=t?.initialOptions?.interopBrokerConfiguration??{};return{fdc3Version:t?(0,Wo.getDefaultViewFdc3VersionFromAppInfo)(t):void 0,...n,fdc3Info:{providerVersion:await e.System.getVersion(),provider:"OpenFin"}}}},Object.defineProperty(Bo,"__esModule",{value:!0});var Ho=Bo.BrowserEnvironment=void 0;const No=Go;class Do extends No.BaseEnvironment{constructor(){super(...arguments),this.type="other",this.getRandomId=()=>{const e=new Uint32Array(1);return window.crypto.getRandomValues(e)[0].toString(32)}}getAdapterVersionSync(){return""}observeBounds(e,t){throw new Error("Method not implemented.")}layoutAllowedInContext(e){return!1}initLayoutManager(e,t,n){throw new Error("Method not implemented.")}applyLayoutSnapshot(e,t,n){throw new Error("Method not implemented.")}createLayout(e,t){throw new Error("Method not implemented.")}destroyLayout(e,t){throw new Error("Method not implemented.")}resolveLayout(e,t){throw new Error("Method not implemented.")}initPlatform(...e){throw new Error("Method not implemented.")}writeToken(e,t){return Promise.resolve("")}retrievePort(e){throw new Error("Method not implemented.")}getNextMessageId(){return this.getRandomId()}createChildContent(e){throw new Error("Method not implemented.")}getWebWindow(e){throw new Error("Method not implemented.")}getCurrentEntityIdentity(){throw new Error("Method not implemented.")}getCurrentEntityType(){return"external connection"}raiseEvent(e,t){throw new Error("Method not implemented.")}getUrl(){return location.href}getDefaultChannelOptions(){return{create:{},connect:{}}}getRtcPeer(){return new RTCPeerConnection}getWsConstructor(){return WebSocket}whenReady(){return Promise.resolve()}}Ho=Bo.BrowserEnvironment=Do;const Uo=e=>"platform"in e&&void 0!==e.platform;var Vo,zo;class Ko extends Ho{constructor(e){super(),this.connectConfig=e,Vo.set(this,void 0),zo.set(this,new W((async()=>Promise.resolve().then((function(){return __webpack_require__(/*! ./main-b14f67c9.js */ "../../node_modules/@openfin/core-web/out/main-b14f67c9.js")}))))),Uo(e)&&this.validatePlatformOptions(e)}getAdapterVersionSync(){return"0.39.21"}validatePlatformOptions({platform:e}){if(!("layoutSnapshot"in e))throw new Error("Platform options are missing layoutSnapshot. Please provide a layoutSnapshot in the platform options.");if("windows"in e||"windows"in e.layoutSnapshot)throw new Error("It appears you tried to call connect() with a snapshot object from an OpenFin desktop environment. Note that connect() expects to be called with a platform property with this structure: { platform: { layoutSnapshot } }. To get a layoutSnapshot of the expected structure, use fin.Platform.Layout.getCurrentLayoutManagerSync().getLayoutSnapshot() in v34+ in your desktop environment.");const{layouts:t}=e.layoutSnapshot;Object.entries(t).map((([e,t])=>{if("object"!=typeof t||null===t)throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must be an object.`);if(!("content"in t))throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must contain a 'content' property.`)}))}async getInteropInfo(e){return{...{contextGroups:void 0,logging:{beforeAction:{enabled:!1},afterAction:{enabled:!1}}},fdc3Version:void 0,fdc3Info:{providerVersion:"0.39.21",provider:"OpenFin Web"}}}layoutAllowedInContext(e){return!0}async initLayoutManager(e,t,n){if(Lo(this,Vo,"f"))throw new Error("Layout already initialized.");if(!Uo(this.connectConfig))throw new Error("Platform options are missing from connection config.");const{WebLayoutEntryPoint:i}=await Lo(this,zo,"f").getValue();return To(this,Vo,new i(this.connectConfig),"f"),await Lo(this,Vo,"f").initLayoutManager(e,t,n)}async applyLayoutSnapshot(e,t,n){Lo(this,Vo,"f")?.applyLayoutSnapshot(e,t,n)}async createLayout(e,t){return Lo(this,Vo,"f")?.createLayout(e,t)}async destroyLayout(e,t){return Lo(this,Vo,"f")?.destroyLayout(e,t)}async getViewWindowIdentity(e,t){return Promise.resolve({uuid:t.uuid,name:t.uuid})}}Vo=new WeakMap,zo=new WeakMap;const qo=()=>{const e=((e,t)=>{const n=new RegExp(`^${t}<(?.*)>$`).exec(e)?.groups?.meta;if(n)try{return JSON.parse(atob(n))}catch(e){throw new Error(`Failed to decode JSON from ${n}.`)}})(window.name,"of-frame");if(e)try{const{name:t,uuid:n,brokerUrl:i,providerId:r,contextGroup:o}=e;return Fo(i,"brokerUrl"),Fo(n,"uuid"),Fo(t,"name"),{identity:{name:t,uuid:n},brokerUrl:i,interopConfig:{providerId:r,currentContextGroup:o}}}catch(e){throw new Error(`Unexpected error occurred when inferring platform information: ${e.stack}`)}},Jo=()=>{const e=r.v4();return{uuid:e,name:e}},Yo=async e=>{if("enabled"===e.connectionInheritance){const t=await(async e=>{const t=qo();if(t){const{validateOptions:n=(()=>!0)}=e,{identity:i,...r}=t;if(!await n(r))throw new Error("Parent options were rejected by validateOptions.");return t}})(e);if(t)return t}if(!e.options){const t="enabled"===e.connectionInheritance?"Broker URL was not specified nor provided by a platform container.":"Connection inheritance is disabled but no options were provided.";throw new Error(t)}return{...e.options,identity:Jo()}};exports.__classPrivateFieldGet=Lo,exports.__classPrivateFieldSet=To,exports.apiExposer=Gn,exports.commonjsGlobal=s,exports.connect=async t=>{try{Ro.log("Establishing connection",t);const{brokerUrl:n,identity:i,timeout:r,interopConfig:s}=await Yo(t),{workerPort:a,iframeBrokerPort:c}=await(async(e,t,n)=>{const{origin:i}=new URL(e),r=document.createElement("IFRAME");let s;r.style.display="none";try{return await new Promise(((a,c)=>{const d=e=>{if(e.source===r.contentWindow&&e.data?.topic===`ack-${jo}`){if(e.origin!==i)c(new Error(`Broker redirected to unexpected origin ${e.origin}, expected ${i}.`));else if(e.data.success){const[t,n]=e.ports;a({iframeBrokerPort:t,workerPort:n})}else c(new m(e.data));window.removeEventListener("message",d),clearTimeout(s)}};window.addEventListener("message",d),ko.log(`Connecting to broker ${e}`),r.setAttribute("src",e),r.setAttribute("name",o(t,"of-broker")),document.body.appendChild(r),ko.log("Iframe loaded, awaiting init message from iframe"),n&&(s=setTimeout((()=>{window.removeEventListener("message",d),document.body.removeChild(r),c(new Error("Worker did not initialize in time"))}),n))}))}catch(e){throw new Error(`Failed to initialise Fin Web Client. ${e.message}`,{cause:e})}})(n,i,r);Ro.log("Successfully established connection to shared worker");const d={entityType:"external connection",...i};a.start(),c.start();const h=((t,n,i)=>{const r=$o(n),o=new Ko(t),s=new Io(r,o,i);return s.connectSync(),window.Buffer=e.Buffer,new Wr(s)})(t,a,d);return s?.providerId&&(h.me.interop=h.Interop.connectSync(s.providerId),s?.currentContextGroup&&h.me.interop.joinContextGroup(s.currentContextGroup).catch((e=>{console.warn(`Error joining specified context group: ${s?.currentContextGroup}, continuing`,e)}))),{...h,me:{...h.me,identity:{uuid:h.me.uuid,name:h.me.name}}}}catch(e){throw new Error(`An error occured during web-interop connection: ${e.message}`)}},exports.decorators=Nn,exports.encodeOptions=o,exports.layout_constants=ai,exports.lazy=G; /***/ }), -/***/ "./node_modules/@openfin/core-web/out/main-b14f67c9.js": -/*!*************************************************************!*\ - !*** ./node_modules/@openfin/core-web/out/main-b14f67c9.js ***! - \*************************************************************/ +/***/ "../../node_modules/@openfin/core-web/out/main-b14f67c9.js": +/*!*****************************************************************!*\ + !*** ../../node_modules/@openfin/core-web/out/main-b14f67c9.js ***! + \*****************************************************************/ /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; -var t=__webpack_require__(/*! ./main-8cad4070.js */ "./node_modules/@openfin/core-web/out/main-8cad4070.js"),e=__webpack_require__(/*! uuid */ "../../node_modules/uuid/dist/esm-browser/index.js");__webpack_require__(/*! buffer/ */ "../../node_modules/buffer/index.js"),__webpack_require__(/*! events */ "../../node_modules/events/events.js"),__webpack_require__(/*! lodash/cloneDeep */ "../../node_modules/lodash/cloneDeep.js"),__webpack_require__(/*! lodash/isEqual */ "../../node_modules/lodash/isEqual.js");var i={},n={};Object.defineProperty(n,"__esModule",{value:!0}),n.mapValuesAsync=n.mapEntriesAsync=void 0;const o=(t,[e,i])=>({...t,[e]:i});async function s(t,e){return(await Promise.all(e.map((async([e,i])=>[e,await t(i,e)])))).reduce(o,{})}n.mapEntriesAsync=s,n.mapValuesAsync=async function(t,e){let i;return i=e instanceof Map?[...e.entries()]:Object.entries(e),s(t,i)};var r,a,l,h,d=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldSet||function(t,e,i,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(t,i):o?o.value=i:e.set(t,i),i},c=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldGet||function(t,e,i,n){if("a"===i&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?n:"a"===i?n.call(t):n?n.value:e.get(t)};Object.defineProperty(i,"__esModule",{value:!0});var m=i.DefaultLayoutManager=void 0;const u=n;class p{constructor(t){a.set(this,void 0),l.set(this,new Map),d(this,a,t,"f")}size(){return c(this,l,"f").size}async applyLayoutSnapshot({layouts:t}){if(Object.keys(t).length>1)throw new Error("[LayoutManager] Tried to call applyLayoutSnapshot with more than 1 layout. When implementing multiple layouts via overridden LayoutManager class, you must override and fully implement the applyLayoutSnapshot method without calling super.applyLayoutSnapshot().");const[[e,i]]=Object.entries(t);await p.createLayout(this,{layoutName:e,layout:i})}async showLayout({layoutName:t}){}async getLayoutSnapshot(){return{layouts:await(0,u.mapValuesAsync)((t=>t.getFrameSnapshot()),c(this,l,"f"))}}async removeLayout({layoutName:t}){}getLayoutIdentityForView(t){const e=[...c(this,l,"f").values()].find((e=>e.getCurrentViews().some((e=>e.name===t.name&&e.uuid===t.uuid))));return e?.identity??void 0}isLayoutVisible({layoutName:t}){return c(p,r,"m",h).call(p,this,t).isVisible()}resolveLayoutIdentity(t){if(t&&"layoutName"in t)return t;const e=[...c(this,l,"f").values()];if(1===e.length)return e[0].identity;const i=e.find((t=>t.isVisible()));return i?.identity??void 0}static async resolveLayout(t,e){const i=t.resolveLayoutIdentity(e);if(void 0===i||!("layoutName"in i))throw new Error("[layout-manager] resolveLayout: Could not resolve the layout identity. Make sure you include 'layoutName' in the identity object.");return c(p,r,"m",h).call(p,t,i.layoutName)}static async handleSharedView(t,e,i){await(0,u.mapValuesAsync)((async t=>{if(t.identity.layoutName!==e.layoutName){const e=t.getCurrentViews().find((t=>t.name===i.name));e&&await t.onViewDetached({viewIdentity:e,target:null}).catch(console.error)}}),c(t,l,"f"))}static async handleLastViewRemoved(t,e){await t.removeLayout(e),await c(t,a,"f").handleLastViewRemoved(t)}static async destroyLayout(t,{layoutName:e}){await c(p,r,"m",h).call(p,t,e).destroy(),c(t,l,"f").delete(e)}static async createLayout(t,e){const{layoutName:i}=e;if(c(t,l,"f").has(i))throw new Error(`Layout name ${i} already exists`);await c(t,a,"f").createLayout(e,t)}static registerLayout(t,e,i){c(t,l,"f").set(e,i)}static getAllLayouts(t){return[...c(t,l,"f").values()]}static setInitialSnapshot(t,e){c(t,a,"f").setInitialSnapshot(e)}static createClosedConstructor(...t){return class extends p{constructor(){super(...t)}}}}m=i.DefaultLayoutManager=p,r=p,a=new WeakMap,l=new WeakMap,h=function(t,e){const i=c(t,l,"f").get(e);if(!i)throw new Error(`[layout-manager] getLayoutByName: Could not locate layout with name '${e}'`);return i};var g={},f={},v={};Object.defineProperty(v,"__esModule",{value:!0}),v.ReversibleMap=void 0;v.ReversibleMap=class{constructor(){this.valueToKey=new Map,this.keyToValue=new Map,this.setUnique=(t,e)=>{if(this.hasKey(t)||this.hasValue(e))throw new Error("Key or value already in the map.");this.keyToValue.set(t,e),this.valueToKey.set(e,t)},this.getKey=t=>{const e=this.valueToKey.get(t);if(!e)throw new Error("Value not found in the map.");return e},this.deleteKey=t=>{const e=this.getValue(t);return this.keyToValue.delete(t),this.valueToKey.delete(e),e},this.deleteValue=t=>{const e=this.getKey(t);return this.keyToValue.delete(e),this.valueToKey.delete(t),e},this.hasKey=t=>this.keyToValue.has(t),this.hasValue=t=>this.valueToKey.has(t)}getValue(t){const e=this.keyToValue.get(t);if(!e)throw new Error("Key not found in the map.");return e}},Object.defineProperty(f,"__esModule",{value:!0});var _=f.LayoutContentCache=void 0;const y=t.lazy,C=v;class w{constructor(){this.contentItemCache=new C.ReversibleMap,this.contentItemCacheId=0,this.createCacheKey=()=>{const t=`entity-${this.contentItemCacheId.toString()}`;return this.contentItemCacheId+=1,t},this.hasKey=t=>this.contentItemCache.hasKey(t),this.getItemOrUndefined=t=>{try{return this.getContentItemOrThrow(t)}catch(t){return}},this.getContentItemOrThrow=(t,e)=>{if(!this.contentItemCache.hasKey(t))throw new Error("Layout component has been destroyed or detached from the current layout.");const i=this.contentItemCache.getValue(t);if(e&&!e.includes(i.type))throw new Error(`Layout item is not the expected type. Expected ${e.join(", ")}, got ${i.type}.`);return i},this.getOrCreateEntityId=t=>{if(this.contentItemCache.hasValue(t))return this.contentItemCache.getKey(t);t.onDestroyed((()=>{this.contentItemCache.deleteValue(t)}));const e=this.createCacheKey();return this.contentItemCache.setUnique(e,t),e}}static getSingleInstance(){return w.singleton.getValue()}}_=f.LayoutContentCache=w,w.singleton=new y.Lazy((()=>new w));var I={},b={};!function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.getAdjacentStacks=t.doShareEdge=t.getAdjacentItem=void 0;t.getAdjacentItem=(e,i)=>{const{parent:n}=e;if(e.isRoot()||!n)return;const o=["top","bottom"].includes(i)?"column":"row",s=["top","left"].includes(i)?-1:1;if(n.type===o){const t=n.contentItems.indexOf(e)+s;if(t>=0&&t{const n=t.getBounds(),o=e.getBounds();if(!n||!o)return!1;if(["top","bottom"].includes(i)){return!(n.righto.right)}return!(n.bottomo.bottom)};t.getAdjacentStacks=(e,i)=>{const n=["top","bottom"].includes(i)?"row":"column",o=s=>"stack"===s.type?(0,t.doShareEdge)(e,s,i)?[s]:[]:"root"===s.type||"ground"===s.type?[]:s.type===n?s.contentItems.map((t=>o(t))).flat():s.type!==n?["top","right"].includes(i)?o(s.contentItems[s.contentItems.length-1]):o(s.contentItems[0]):[],s=(0,t.getAdjacentItem)(e,i);return s?o(s):[]}}(b);var S=t.commonjsGlobal&&t.commonjsGlobal.__decorate||function(t,e,i,n){var o,s=arguments.length,r=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(s<3?o(r):s>3?o(e,i,r):o(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};Object.defineProperty(I,"__esModule",{value:!0}),I.LayoutEntitiesController=void 0;const E=t.decorators,x=b,L=i;class z{constructor(t,e,i){this.wire=t,this.layoutManager=e,this.layoutContentCache=i,this.analytics=t=>{this.wire.sendAction(`layout-controller-${t}`).catch((()=>{}))},this.getLayoutIdentityForViewOrThrow=async t=>{const e=this.layoutManager.getLayoutIdentityForView(t);if(!e)throw new Error(`View identity ${t.name} is not attached to any layouts.`);return e},this.getRoot=async t=>{this.analytics("get-root");const e=(await this.getLayout(t)).getRoot();return{type:e.type,entityId:this.layoutContentCache.getOrCreateEntityId(e)}},this.getStackByView=async t=>{this.analytics("get-stack-by-view");const e=await this.getLayoutIdentityForViewOrThrow(t),i=(await this.getLayout(e)).getStackByView(t);if("stack"===i?.type)return{entityId:this.layoutContentCache.getOrCreateEntityId(i),type:"stack"}},this.getStackViews=t=>{this.analytics("get-stack-views");return this.layoutContentCache.getContentItemOrThrow(t,["stack"]).contentItems.map((t=>({name:t.viewName,uuid:this.wire.me.uuid})))},this.isRoot=t=>{this.analytics("is-root");return this.layoutContentCache.getContentItemOrThrow(t).isRoot()},this.exists=t=>(this.analytics("exists"),this.layoutContentCache.hasKey(t)),this.addViewToStack=async(t,e,{index:i}={index:0})=>{this.analytics("add-view-to-stack");const n=this.layoutContentCache.getContentItemOrThrow(t);if(i&&i>n.contentItems.length+1)throw new Error(`Index '${i}' out of range, please exclude the index or specify a number between 0 and ${n.contentItems.length}`);const o={id:t,index:i},{identity:s}=await n.layout.platformCreateView(e,{location:o});return s},this.findViewInStack=(t,e)=>t.contentItems.find((t=>t.viewName===e.name)),this.removeViewFromStack=async(t,e)=>{this.analytics("remove-view-from-stack");const i=this.layoutContentCache.getContentItemOrThrow(t,["stack"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to remove a view ('${e.name}') which does not belong to the stack.`);await n.layout.platformCloseView(e)},this.createAdjacentStack=async(t,e,{position:i="right"}={})=>{if(this.analytics("create-adjacent-stack"),!Array.isArray(e)||0===e.length)throw new Error('The parameter "views" must be an array with at least 1 element.');if(!["top","bottom","left","right"].includes(i))throw new Error(`Invalid position '${i}' specified.`);const n=this.layoutContentCache.getContentItemOrThrow(t).createAdjacentStack({position:i}),o=this.layoutContentCache.getOrCreateEntityId(n);return await Promise.all(e.reverse().map((t=>this.addViewToStack(o,t)))),o},this.getAdjacentStacks=async({targetId:t,edge:e})=>{this.analytics("get-adjacent-stacks");const i=this.layoutContentCache.getContentItemOrThrow(t);return(0,x.getAdjacentStacks)(i,e).map((t=>({entityId:this.layoutContentCache.getOrCreateEntityId(t)})))},this.setStackActiveView=async(t,e)=>{this.analytics("set-stack-active-view");const i=this.layoutContentCache.getContentItemOrThrow(t,["stack"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to set a view ('${e.name}') as active when it does not belong to the stack.`);i.setActiveContentItem(n,!0)}}async getLayout(t){const e=await L.DefaultLayoutManager.resolveLayout(this.layoutManager,t);if(!e)throw new Error(`Could not resolve target layout identity ${JSON.stringify(t)}`);return e}getContent(t){this.analytics("get-content");return this.layoutContentCache.getContentItemOrThrow(t,["column","row"]).contentItems.map((t=>({type:t.type,entityId:this.layoutContentCache.getOrCreateEntityId(t)})))}getParent(t){this.analytics("get-parent");const e=this.layoutContentCache.getContentItemOrThrow(t);if(!e.isRoot())return e.parent?.contentItems.includes(e)?{type:e.parent.type,entityId:this.layoutContentCache.getOrCreateEntityId(e.parent)}:void 0}}S([(0,E.expose)()],z.prototype,"getLayoutIdentityForViewOrThrow",void 0),S([(0,E.expose)()],z.prototype,"getRoot",void 0),S([(0,E.expose)()],z.prototype,"getStackByView",void 0),S([(0,E.expose)()],z.prototype,"getStackViews",void 0),S([(0,E.expose)()],z.prototype,"getContent",null),S([(0,E.expose)()],z.prototype,"getParent",null),S([(0,E.expose)()],z.prototype,"isRoot",void 0),S([(0,E.expose)()],z.prototype,"exists",void 0),S([(0,E.expose)()],z.prototype,"addViewToStack",void 0),S([(0,E.expose)()],z.prototype,"removeViewFromStack",void 0),S([(0,E.expose)()],z.prototype,"createAdjacentStack",void 0),S([(0,E.expose)()],z.prototype,"getAdjacentStacks",void 0),S([(0,E.expose)()],z.prototype,"setStackActiveView",void 0),I.LayoutEntitiesController=z,Object.defineProperty(g,"__esModule",{value:!0});var M=g.initLayoutEndpoints=void 0;const P=t.apiExposer,T=t.layout_constants,A=f,k=I,D=i;M=g.initLayoutEndpoints=async function(t,e){const i=t.getFin(),n=await i.Platform.getCurrentSync().getClient(),o=new P.ChannelsExposer(n);await new P.ApiExposer(o).exposeInstance(new k.LayoutEntitiesController(t,e,A.LayoutContentCache.getSingleInstance()),{id:T.LAYOUT_CONTROLLER_ID}),await async function(t,e){const i=t=>async i=>{const n=await D.DefaultLayoutManager.resolveLayout(e,i.target);if(!n)throw new Error(`Could not resolve the layout target from payload ${JSON.stringify(i)}`);return t(n,i)},n=(e,n)=>{t.register(e,i(n))},o=(t,e)=>{n(t,e)};n("replace-view",((t,e)=>t.replaceView(e))),n("replace-layout",((t,{layout:e})=>t.replaceLayout(e))),n("add-view",((t,e)=>t.insertView(e))),o("layout-add-view",((t,{viewOptions:e,location:i,targetView:n})=>t.platformCreateView(e,{location:i,targetView:n}))),n("close-view",((t,e)=>t.cleanupView(e.viewIdentity))),o("layout-close-view",((t,e)=>t.platformCloseView(e.viewIdentity))),n("apply-preset-layout",((t,e)=>t.applyPreset(e))),n("get-layout-views",(t=>t.getCurrentViews())),n("get-frame-snapshot",(t=>t.getFrameSnapshot())),n("is-visible",(t=>t.isVisible())),n("destroy",(t=>t.destroy())),t.register("get-layout-snapshot",(()=>e.getLayoutSnapshot()))}(n,e)};var R={};Object.defineProperty(R,"__esModule",{value:!0});var U=R.BaseLayout=void 0;U=R.BaseLayout=class{};var O={};Object.defineProperty(O,"__esModule",{value:!0});var V=O.DOMEmitter=void 0;V=O.DOMEmitter=class{constructor(t){this.container=t}dispatchLocalEvent(t,e){const i={...e,type:t,tabSelector:`tab-${e.name}`,containerSelector:`container-${e.name}`,topic:"openfin-DOM-event"};this.container.dispatchEvent(new CustomEvent(t,{detail:i}))}};var B={};Object.defineProperty(B,"__esModule",{value:!0});var H=B.mapLayoutContentItemsImmutableSync=B.mapLayoutContentItemsImmutable=W=B.isVisible=void 0;var W=B.isVisible=t=>(0!==t.offsetWidth||0!==t.offsetHeight)&&"hidden"!==window.getComputedStyle(t).visibility&&t.offsetTop>=0&&t.offsetLeft>=0&&t.offsetTop<=window.innerHeight&&t.offsetLeft<=window.innerWidth;const F=t=>"type"in t&&"component"===t.type;B.mapLayoutContentItemsImmutable=async function t(e,i){return F(i)?e(i):{...i,content:await Promise.all(i.content?.map((i=>t(e,i))))}},H=B.mapLayoutContentItemsImmutableSync=function t(e,i){return F(i)?e(i):{...i,content:i.content?.map((i=>t(e,i)))}};class N extends Error{constructor(t,e){super(e),this.type=t}}class G extends N{constructor(t,e){super("Configuration",t),this.node=e}}class j extends N{constructor(t){super("PopoutBlocked",t)}}class $ extends N{constructor(t){super("API",t)}}class Z extends N{constructor(t){super("Bind",t)}}class q extends Error{constructor(t,e,i){super(`${t}: ${e}${void 0===i?"":": "+i}`)}}class X extends q{constructor(t,e){super("Assert",t,e)}}class Y extends q{constructor(t,e,i){super("UnreachableCase",t,`${e}${void 0===i?"":": "+i}`)}}class K extends q{constructor(t,e){super("UnexpectedNull",t,e)}}class J extends q{constructor(t,e){super("UnexpectedUndefined",t,e)}}var Q;!function(t){let e=!1;const i={PopoutCannotBeCreatedWithGroundItemConfig:{id:0,default:"Popout cannot be created with ground ItemConfig"},PleaseRegisterAConstructorFunction:{id:1,default:"Please register a constructor function"},ComponentTypeNotRegisteredAndBindComponentEventHandlerNotAssigned:{id:2,default:"Component type not registered and BindComponentEvent handler not assigned"},ComponentIsAlreadyRegistered:{id:3,default:"Component is already registered"},ComponentIsNotVirtuable:{id:4,default:"Component is not virtuable. Requires rootHtmlElement field/getter"},VirtualComponentDoesNotHaveRootHtmlElement:{id:5,default:'Virtual component does not have getter "rootHtmlElement"'},ItemConfigIsNotTypeComponent:{id:6,default:"ItemConfig is not of type component"},InvalidNumberPartInSizeString:{id:7,default:"Invalid number part in size string"},UnknownUnitInSizeString:{id:8,default:"Unknown unit in size string"},UnsupportedUnitInSizeString:{id:9,default:"Unsupported unit in size string"}};t.idCount=Object.keys(i).length;const n=Object.values(i);t.checkInitialise=function(){if(!e)for(let e=0;e="0"&&t<="9"}function Tt(t,e){const i=zt(e);t.style.width=i}function At(t,e){const i=zt(e);t.style.height=i}function kt(t){return{width:t.offsetWidth,height:t.offsetHeight}}function Dt(t,e){t.style.display=e?"":"none"}function Rt(t,e){if(void 0!==e)for(const i in e)if(e.hasOwnProperty(i)){const n=e[i],o=t[i];t[i]=Ut(o,n)}return t}function Ut(t,e){if("object"!=typeof e)return e;if(Array.isArray(e)){const t=e.length,i=new Array(t);for(let n=0;n36)throw new Error("Too many keys in config minifier map")},t.translateObject=n}(dt||(dt={})),function(t){t.defaults={type:at.ground,content:[],size:1,sizeUnit:ht.Fractional,minSize:void 0,minSizeUnit:ht.Pixel,id:"",isClosable:!0},t.createCopy=function(t,e){switch(t.type){case at.ground:case at.row:case at.column:return gt.createCopy(t,e);case at.stack:return ut.createCopy(t,e);case at.component:return pt.createCopy(t);default:throw new Y("CICC91354",t.type,"Invalid Config Item type specified")}},t.createDefault=function(t){switch(t){case at.ground:throw new X("CICCDR91562");case at.row:case at.column:return gt.createDefault(t);case at.stack:return ut.createDefault();case at.component:return pt.createDefault();default:throw new Y("CICCDD91563",t,"Invalid Config Item type specified")}},t.isComponentItem=function(t){return t.type===at.component},t.isStackItem=function(t){return t.type===at.stack},t.isGroundItem=function(t){return t.type===at.ground}}(ct||(ct={})),function(t){t.defaultMaximised=!1,function(t){t.createCopy=function(t,e){return void 0===t?void 0:{show:null!=e?e:t.show,popout:t.popout,close:t.close,maximise:t.maximise,minimise:t.minimise,tabDropdown:t.tabDropdown}}}(t.Header||(t.Header={}))}(mt||(mt={})),function(t){function e(t){const e=t.length,i=new Array(e);for(let n=0;n"__glMaximised"===t));t>0&&(o=!0,n=n.splice(t,1)),e=n.length>0?n[0]:ct.defaults.id}else e=n;return i=void 0!==t.maximised?t.maximised:o,{id:e,maximised:i}}}(wt||(wt={})),function(t){function e(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0;return{resolved:!0,root:Et.resolve(i),openPopouts:t.resolveOpenPopouts(e.openPopouts),dimensions:t.Dimensions.resolve(e.dimensions),settings:t.Settings.resolve(e.settings),header:t.Header.resolve(e.header,e.settings,e.labels)}}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:Lt.fromResolvedArray(e.openPopouts),settings:_t.Settings.createCopy(e.settings),dimensions:t.Dimensions.fromResolved(e.dimensions),header:_t.Header.createCopy(e.header)}},t.isResolved=function(t){const e=t;return void 0!==e.resolved&&!0===e.resolved},t.resolveOpenPopouts=function(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0,{root:Et.resolve(o),openPopouts:xt.resolveOpenPopouts(e.openPopouts),dimensions:xt.Dimensions.resolve(e.dimensions),settings:xt.Settings.resolve(e.settings),header:xt.Header.resolve(e.header,e.settings,e.labels),parentId:null!==(i=e.parentId)&&void 0!==i?i:null,indexInParent:null!==(n=e.indexInParent)&&void 0!==n?n:null,window:t.Window.resolve(e.window,e.dimensions),resolved:!0}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:i(e.openPopouts),dimensions:xt.Dimensions.fromResolved(e.dimensions),settings:_t.Settings.createCopy(e.settings),header:_t.Header.createCopy(e.header),parentId:e.parentId,indexInParent:e.indexInParent,window:t.Window.fromResolved(e.window)}},t.fromResolvedArray=i}(Lt||(Lt={}));class Wt{constructor(){this._allEventSubscriptions=[],this._subscriptionsMap=new Map,this.unbind=this.removeEventListener,this.trigger=this.emit}tryBubbleEvent(t,e){}emit(t,...e){let i=this._subscriptionsMap.get(t);if(void 0!==i){i=i.slice();for(let t=0;t0){const n=e.slice();n.unshift(t);const o=this._allEventSubscriptions.slice();for(let t=0;t0?n.contentItems[0]:n,e=0);const o=this._layoutManager.createAndInitContentItem(i,t);t.addChild(o,e),this._layoutManager.layoutConfig.settings.popInOnClose?this._onClose():this.close()}createWindow(){const t=this.createUrl(),e=Math.floor(1e6*Math.random()).toString(36),i=this.serializeWindowFeatures({width:this._initialWindowSize.width,height:this._initialWindowSize.height,innerWidth:this._initialWindowSize.width,innerHeight:this._initialWindowSize.height,menubar:"no",toolbar:"no",location:"no",personalbar:"no",resizable:"yes",scrollbars:"no",status:"no"});if(this._popoutWindow=globalThis.open(t,e,i),this._popoutWindow)this._popoutWindow.addEventListener("load",(()=>this.positionWindow()),{passive:!0}),this._popoutWindow.addEventListener("beforeunload",(()=>{this._layoutManager.layoutConfig.settings.popInOnClose?this.popIn():this._onClose()}),{passive:!0}),this._checkReadyInterval=setInterval((()=>this.checkReady()),10);else if(!0===this._layoutManager.layoutConfig.settings.blockedPopoutsThrowError){throw new j("Popout blocked")}}checkReady(){if(null===this._popoutWindow)throw new K("BPCR01844");this._popoutWindow.__glInstance&&this._popoutWindow.__glInstance.isInitialised&&(this.onInitialised(),void 0!==this._checkReadyInterval&&(clearInterval(this._checkReadyInterval),this._checkReadyInterval=void 0))}serializeWindowFeatures(t){const e=[];for(const i in t)e.push(i+"="+t[i].toString());return e.join(",")}createUrl(){const t="gl-window-config-"+Ot(),e=_t.minifyConfig(this._config);try{localStorage.setItem(t,JSON.stringify(e))}catch(t){throw new Error("Error while writing to localStorage "+function(t){return t instanceof Error?t.message:"string"==typeof t?t:"Unknown Error"}(t))}const i=new URL(location.href);return i.searchParams.set("gl-window",t),i.toString()}positionWindow(){if(null===this._popoutWindow)throw new Error("BrowserPopout.positionWindow: null popoutWindow");this._popoutWindow.moveTo(this._initialWindowSize.left,this._initialWindowSize.top),this._popoutWindow.focus()}onInitialised(){this._isInitialised=!0,this.getGlInstance().on("popIn",(()=>this.popIn())),this.emit("initialised")}_onClose(){setTimeout((()=>this.emit("closed")),50)}}class Gt extends Wt{constructor(t,e,i,n){super(),this.layoutManager=t,this._parent=i,this._element=n,this._popInParentIds=[],this._type=e.type,this._id=e.id,this._isInitialised=!1,this.isGround=!1,this.isRow=!1,this.isColumn=!1,this.isStack=!1,this.isComponent=!1,this.size=e.size,this.sizeUnit=e.sizeUnit,this.minSize=e.minSize,this.minSizeUnit=e.minSizeUnit,this._isClosable=e.isClosable,this._pendingEventPropagations={},this._throttledEvents=["stateChanged"],this._contentItems=this.createContentItems(e.content)}get type(){return this._type}get id(){return this._id}set id(t){this._id=t}get popInParentIds(){return this._popInParentIds}get parent(){return this._parent}get contentItems(){return this._contentItems}get isClosable(){return this._isClosable}get element(){return this._element}get isInitialised(){return this._isInitialised}static isStack(t){return t.isStack}static isComponentItem(t){return t.isComponent}static isComponentParentableItem(t){return t.isStack||t.isGround}removeChild(t,e=!1){const i=this._contentItems.indexOf(t);if(-1===i)throw new Error("Can't remove child item. Unknown content item");if(e||this._contentItems[i].destroy(),this._contentItems.splice(i,1),this._contentItems.length>0)this.updateSize(!1);else if(!this.isGround&&!0===this._isClosable){if(null===this._parent)throw new K("CIUC00874");this._parent.removeChild(this)}}addChild(t,e,i){return null!=e||(e=this._contentItems.length),this._contentItems.splice(e,0,t),t.setParent(this),!0===this._isInitialised&&!1===t._isInitialised&&t.init(),e}replaceChild(t,e,i=!1){const n=this._contentItems.indexOf(t),o=t._element.parentNode;if(-1===n)throw new X("CIRCI23232","Can't replace child. oldChild is not child of this");if(null===o)throw new K("CIRCP23232");if(o.replaceChild(e._element,t._element),!0===i&&(t._parent=null,t.destroy()),this._contentItems[n]=e,e.setParent(this),e.size=t.size,e.sizeUnit=t.sizeUnit,e.minSize=t.minSize,e.minSizeUnit=t.minSizeUnit,null===e._parent)throw new K("CIRCNC45699");!0===e._parent._isInitialised&&!1===e._isInitialised&&e.init(),this.updateSize(!1)}remove(){if(null===this._parent)throw new K("CIR11110");this._parent.removeChild(this)}popout(){const t=Ot(),e=this.layoutManager.createPopoutFromContentItem(this,void 0,t,void 0);return this.emitBaseBubblingEvent("stateChanged"),e}calculateConfigContent(){const t=this._contentItems,e=t.length,i=new Array(e);for(let n=0;nthis.propagateEventToLayoutManager(t,e))))}propagateEventToLayoutManager(t,e){this._pendingEventPropagations[t]=!1,this.layoutManager.emitUnknown(t,e)}}class jt extends Gt{constructor(t,e,i){super(t,e,i,document.createElement("div")),this._parentItem=i,this._focused=!1,this.isComponent=!0,this._reorderEnabled=e.reorderEnabled,this.applyUpdatableConfig(e),this._initialWantMaximise=e.maximised;const n=document.createElement("div");n.classList.add("lm_content"),this.element.appendChild(n),this._container=new Ft(e,this,t,n,(t=>this.handleUpdateItemConfigEvent(t)),(()=>this.show()),(()=>this.hide()),(t=>this.focus(t)),(t=>this.blur(t)))}get componentName(){return this._container.componentType}get componentType(){return this._container.componentType}get reorderEnabled(){return this._reorderEnabled}get initialWantMaximise(){return this._initialWantMaximise}get component(){return this._container.component}get container(){return this._container}get parentItem(){return this._parentItem}get headerConfig(){return this._headerConfig}get title(){return this._title}get tab(){return this._tab}get focused(){return this._focused}destroy(){this._container.destroy(),super.destroy()}applyUpdatableConfig(t){this.setTitle(t.title),this._headerConfig=t.header}toConfig(){const t=this._container.stateRequestEvent,e=void 0===t?this._container.state:t();return{type:at.component,content:[],size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,maximised:!1,isClosable:this.isClosable,reorderEnabled:this._reorderEnabled,title:this._title,header:mt.Header.createCopy(this._headerConfig),componentType:pt.copyComponentType(this.componentType),componentState:e}}close(){if(null===this.parent)throw new K("CIC68883");this.parent.removeChild(this,!1)}enterDragMode(t,e){Tt(this.element,t),At(this.element,e),this._container.enterDragMode(t,e)}exitDragMode(){this._container.exitDragMode()}enterStackMaximised(){this._container.enterStackMaximised()}exitStackMaximised(){this._container.exitStackMaximised()}drag(){this._container.drag()}updateSize(t){this.updateNodeSize(t)}init(){this.updateNodeSize(!1),super.init(),this._container.emit("open"),this.initContentItems()}setTitle(t){this._title=t,this.emit("titleChanged",t),this.emit("stateChanged")}setTab(t){this._tab=t,this.emit("tab",t),this._container.setTab(t)}hide(){super.hide(),this._container.setVisibility(!1)}show(){super.show(),this._container.setVisibility(!0)}focus(t=!1){this.parentItem.setActiveComponentItem(this,!0,t)}setFocused(t){this._focused=!0,this.tab.setFocused(),t||this.emitBaseBubblingEvent("focus")}blur(t=!1){this._focused&&this.layoutManager.setFocusedComponentItem(void 0,t)}setBlurred(t){this._focused=!1,this.tab.setBlurred(),t||this.emitBaseBubblingEvent("blur")}setParent(t){this._parentItem=t,super.setParent(t)}handleUpdateItemConfigEvent(t){this.applyUpdatableConfig(t)}updateNodeSize(t){if("none"!==this.element.style.display){const{width:e,height:i}=kt(this.element);this._container.setSizeToNodeSize(e,i,t)}}}class $t extends Gt{constructor(){super(...arguments),this._focused=!1}get focused(){return this._focused}setFocusedValue(t){this._focused=t}}class Zt extends Wt{constructor(t,e){super(),this._eElement=t,this._pointerTracking=!1,this._pointerDownEventListener=t=>this.onPointerDown(t),this._pointerMoveEventListener=t=>this.onPointerMove(t),this._pointerUpEventListener=t=>this.onPointerUp(t),this._timeout=void 0,this._allowableTargets=[t,...e],this._oDocument=document,this._eBody=document.body,this._nDelay=1800,this._nDistance=10,this._nX=0,this._nY=0,this._nOriginalX=0,this._nOriginalY=0,this._dragging=!1,this._eElement.addEventListener("pointerdown",this._pointerDownEventListener,{passive:!0})}destroy(){this.checkRemovePointerTrackingEventListeners(),this._eElement.removeEventListener("pointerdown",this._pointerDownEventListener)}cancelDrag(){this.processDragStop(void 0)}onPointerDown(t){if(this._allowableTargets.includes(t.target)&&t.isPrimary){const e=this.getPointerCoordinates(t);this.processPointerDown(e)}}processPointerDown(t){this._nOriginalX=t.x,this._nOriginalY=t.y,this._oDocument.addEventListener("pointermove",this._pointerMoveEventListener),this._oDocument.addEventListener("pointerup",this._pointerUpEventListener,{passive:!0}),this._pointerTracking=!0,this._timeout=setTimeout((()=>{try{this.startDrag()}catch(t){throw console.error(t),t}}),this._nDelay)}onPointerMove(t){this._pointerTracking&&(this.processDragMove(t),t.preventDefault())}processDragMove(t){this._nX=t.pageX-this._nOriginalX,this._nY=t.pageY-this._nOriginalY,!1===this._dragging&&(Math.abs(this._nX)>this._nDistance||Math.abs(this._nY)>this._nDistance)&&this.startDrag(),this._dragging&&this.emit("drag",this._nX,this._nY,t)}onPointerUp(t){this.processDragStop(t)}processDragStop(t){var e;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this.checkRemovePointerTrackingEventListeners(),!0===this._dragging&&(this._eBody.classList.remove("lm_dragging"),this._eElement.classList.remove("lm_dragging"),null===(e=this._oDocument.querySelector("iframe"))||void 0===e||e.style.setProperty("pointer-events",""),this._dragging=!1,this.emit("dragStop",t))}checkRemovePointerTrackingEventListeners(){this._pointerTracking&&(this._oDocument.removeEventListener("pointermove",this._pointerMoveEventListener),this._oDocument.removeEventListener("pointerup",this._pointerUpEventListener),this._pointerTracking=!1)}startDrag(){var t;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this._dragging=!0,this._eBody.classList.add("lm_dragging"),this._eElement.classList.add("lm_dragging"),null===(t=this._oDocument.querySelector("iframe"))||void 0===t||t.style.setProperty("pointer-events","none"),this.emit("dragStart",this._nOriginalX,this._nOriginalY)}getPointerCoordinates(t){return{x:t.pageX,y:t.pageY}}}class qt{constructor(t,e,i){this._isVertical=t,this._size=e,this._grabSize=i0){const i=this.createSplitter(Math.max(0,e-1)).element;e>0?(this.contentItems[e-1].element.insertAdjacentElement("afterend",i),i.insertAdjacentElement("afterend",t.element)):(this.contentItems[0].element.insertAdjacentElement("beforebegin",i),i.insertAdjacentElement("beforebegin",t.element))}else this._childElementContainer.appendChild(t.element);super.addChild(t,e);const n=1/this.contentItems.length*100;if(!0===i)return this.emitBaseBubblingEvent("stateChanged"),e;for(let e=0;e0&&(this.calculateRelativeSizes(),this.setAbsoluteSizes()),this.emitBaseBubblingEvent("stateChanged"),this.emit("resize")}setAbsoluteSizes(){const t=this.calculateAbsoluteSizes();for(let e=0;e0&&t.itemSizes[e]++,this._isColumn?(Tt(this.contentItems[e].element,t.crossAxisSize),At(this.contentItems[e].element,t.itemSizes[e])):(Tt(this.contentItems[e].element,t.itemSizes[e]),At(this.contentItems[e].element,t.crossAxisSize))}calculateAbsoluteSizes(){const t=(this.contentItems.length-1)*this._splitterSize,{width:e,height:i}=kt(this.element);let n,o;this._isColumn?(n=i-t,o=e):(n=e-t,o=i);let s=0;const r=[];for(let t=0;t0){const n=100-t;for(let t=0;t100&&e.length>0){for(let t=0;te)return;{const r=i/e;let a=i;for(let e=0;ethis.onSplitterDrag(e,t,i))),e.on("dragStop",(()=>this.onSplitterDragStop(e))),e.on("dragStart",(()=>this.onSplitterDragStart(e))),this._splitter.splice(t,0,e),e}getSplitItems(t){const e=this._splitter.indexOf(t);return{before:this.contentItems[e],after:this.contentItems[e+1]}}calculateContentItemMinSize(t){const e=t.minSize;if(void 0!==e){if(t.minSizeUnit===ht.Pixel)return e;throw new X("ROCGMD98831",JSON.stringify(t))}{const t=this.layoutManager.layoutConfig.dimensions;return this._isColumn?t.defaultMinItemHeight:t.defaultMinItemWidth}}calculateContentItemsTotalMinSize(t){let e=0;for(const i of t)e+=this.calculateContentItemMinSize(i);return e}onSplitterDragStart(t){const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=this.calculateContentItemsTotalMinSize(e.before.contentItems),s=this.calculateContentItemsTotalMinSize(e.after.contentItems);this._splitterPosition=0,this._splitterMinPosition=-1*(i-o),this._splitterMaxPosition=n-s}onSplitterDrag(t,e,i){let n=this._isColumn?i:e;if(null===this._splitterMinPosition||null===this._splitterMaxPosition)throw new K("ROCOSD59226");n=Math.max(n,this._splitterMinPosition),n=Math.min(n,this._splitterMaxPosition),this._splitterPosition=n;const o=zt(n);this._isColumn?t.element.style.top=o:t.element.style.left=o}onSplitterDragStop(t){if(null===this._splitterPosition)throw new K("ROCOSDS66932");{const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=(this._splitterPosition+i)/(i+n),s=e.before.size+e.after.size;e.before.size=o*s,e.after.size=(1-o)*s,t.element.style.top=zt(0),t.element.style.left=zt(0),globalThis.requestAnimationFrame((()=>this.updateSize(!1)))}}}!function(t){t.getElementDimensionSize=function(t,e){return"width"===e?function(t){return t.offsetWidth}(t):function(t){return t.offsetHeight}(t)},t.setElementDimensionSize=function(t,e,i){return"width"===e?Tt(t,i):At(t,i)},t.createElement=function(t,e){const i=t.createElement("div");return i.classList.add("lm_item"),e?i.classList.add("lm_column"):i.classList.add("lm_row"),i}}(Xt||(Xt={}));class Yt extends $t{constructor(t,e,i){super(t,vt.create(e),null,Yt.createElement(document)),this.isGround=!0,this._childElementContainer=this.element,this._containerElement=i;let n=null;for(;;){const t=n?n.previousSibling:this._containerElement.lastChild;if(!(t instanceof Element&&t.classList.contains("lm_content")))break;n=t}this._containerElement.insertBefore(this.element,n)}init(){if(!0!==this.isInitialised){this.updateNodeSize();for(let t=0;t0?this.contentItems[0]:this,n.isComponent)throw new Error("Cannot add item as child to ComponentItem");{const t=this.layoutManager.createAndInitContentItem(i,n);return e=n.addChild(t,e),n===this?-1:e}}loadComponentAsRoot(t){this.clearRoot();const e=Ct.resolve(t,!1);if(e.maximised)throw new Error("Root Component cannot be maximised");{const t=new jt(this.layoutManager,e,this);t.init(),this.addChild(t,0)}}addChild(t,e){if(this.contentItems.length>0)throw new Error("Ground node can only have a single child");return this._childElementContainer.appendChild(t.element),e=super.addChild(t,e),this.updateSize(!1),this.emitBaseBubblingEvent("stateChanged"),e}calculateConfigContent(){const t=this.contentItems,e=t.length,i=new Array(e);for(let n=0;n0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e)),this.updateContentItemsSize(!1))}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}createSideAreas(){const t=Yt.Area.oppositeSides,e=new Array(Object.keys(t).length);let i=0;for(const n in t){const o=n,s=this.getElementArea();if(null===s)throw new K("RCSA77553");s.side=o,"2"===t[o][1]?s[o]=s[t[o]]-50:s[o]=s[t[o]]+50,s.surface=(s.x2-s.x1)*(s.y2-s.y1),e[i++]=s}return e}highlightDropZone(t,e,i){this.layoutManager.tabDropPlaceholder.remove(),super.highlightDropZone(t,e,i)}onDrop(t,e){if(t.isComponent){const e=ut.createDefault(),i=t;e.header=mt.Header.createCopy(i.headerConfig);const n=this.layoutManager.createAndInitContentItem(e,this);n.addChild(t),t=n}if(0===this.contentItems.length)this.addChild(t);else{if(t.type===at.row||t.type===at.column){const e=ut.createDefault(),i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}const i="x"==e.side[0]?at.row:at.column,n="2"==e.side[1],o=this.contentItems[0];if(o instanceof Xt&&o.type===i){const e=o.contentItems[n?0:o.contentItems.length-1];o.addChild(t,n?0:void 0,!0),e.size*=.5,t.size=e.size,t.sizeUnit=ht.Percent,o.updateSize(!1)}else{const e=ct.createDefault(i),s=this.layoutManager.createContentItem(e,this);this.replaceChild(o,s),s.addChild(t,n?0:void 0,!0),s.addChild(o,n?void 0:0,!0),o.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}}dock(){throw new X("GID87731")}validateDocking(){throw new X("GIVD87732")}getAllContentItems(){const t=[this];return this.deepGetAllContentItems(this.contentItems,t),t}getConfigMaximisedItems(){const t=[];return this.deepFilterContentItems(this.contentItems,t,(t=>!(!Gt.isStack(t)||!t.initialWantMaximise)||!(!Gt.isComponentItem(t)||!t.initialWantMaximise))),t}getItemsByPopInParentId(t){const e=[];return this.deepFilterContentItems(this.contentItems,e,(e=>e.popInParentIds.includes(t))),e}toConfig(){throw new Error("Cannot generate GroundItem config")}setActiveComponentItem(t,e,i){}updateNodeSize(){const{width:t,height:e}=kt(this._containerElement);Tt(this.element,t),At(this.element,e),this.contentItems.length>0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e))}deepGetAllContentItems(t,e){for(let i=0;ithis.onClick(t),this._touchStartEventListener=t=>this.onTouchStart(t),this._element=document.createElement("div"),this._element.classList.add(i),this._element.title=e,this._header.on("destroy",(()=>this.destroy())),this._element.addEventListener("click",this._clickEventListener,{passive:!0}),this._element.addEventListener("touchstart",this._touchStartEventListener,{passive:!0}),this._header.controlsContainerElement.appendChild(this._element)}get element(){return this._element}destroy(){var t;this._element.removeEventListener("click",this._clickEventListener),this._element.removeEventListener("touchstart",this._touchStartEventListener),null===(t=this._element.parentNode)||void 0===t||t.removeChild(this._element)}onClick(t){this._pushEvent(t)}onTouchStart(t){this._pushEvent(t)}}class Jt{constructor(t,e,i,n,o){var s;this._layoutManager=t,this._componentItem=e,this._closeEvent=i,this._focusEvent=n,this._dragStartEvent=o,this._isActive=!1,this._tabClickListener=t=>this.onTabClickDown(t),this._tabTouchStartListener=t=>this.onTabTouchStart(t),this._closeClickListener=()=>this.onCloseClick(),this._closeTouchStartListener=()=>this.onCloseTouchStart(),this._dragStartListener=(t,e)=>this.onDragStart(t,e),this._contentItemDestroyListener=()=>this.onContentItemDestroy(),this._tabTitleChangedListener=t=>this.setTitle(t),this._element=document.createElement("div"),this._element.classList.add("lm_tab"),this._titleElement=document.createElement("span"),this._titleElement.classList.add("lm_title"),this._closeElement=document.createElement("div"),this._closeElement.classList.add("lm_close_tab"),this._element.appendChild(this._titleElement),this._element.appendChild(this._closeElement),e.isClosable?this._closeElement.style.display="":this._closeElement.style.display="none",this.setTitle(e.title),this._componentItem.on("titleChanged",this._tabTitleChangedListener);(null!==(s=e.reorderEnabled)&&void 0!==s?s:this._layoutManager.layoutConfig.settings.reorderEnabled)&&this.enableReorder(),this._element.addEventListener("click",this._tabClickListener,{passive:!0}),this._element.addEventListener("touchstart",this._tabTouchStartListener,{passive:!0}),this._componentItem.isClosable?(this._closeElement.addEventListener("click",this._closeClickListener,{passive:!0}),this._closeElement.addEventListener("touchstart",this._closeTouchStartListener,{passive:!0})):(this._closeElement.remove(),this._closeElement=void 0),this._componentItem.setTab(this),this._layoutManager.emit("tabCreated",this)}get isActive(){return this._isActive}get componentItem(){return this._componentItem}get contentItem(){return this._componentItem}get element(){return this._element}get titleElement(){return this._titleElement}get closeElement(){return this._closeElement}get reorderEnabled(){return void 0!==this._dragListener}set reorderEnabled(t){t!==this.reorderEnabled&&(t?this.enableReorder():this.disableReorder())}setTitle(t){this._titleElement.innerText=t,this._element.title=t}setActive(t){t!==this._isActive&&(this._isActive=t,t?this._element.classList.add("lm_active"):this._element.classList.remove("lm_active"))}destroy(){var t,e;this._closeEvent=void 0,this._focusEvent=void 0,this._dragStartEvent=void 0,this._element.removeEventListener("click",this._tabClickListener),this._element.removeEventListener("touchstart",this._tabTouchStartListener),null===(t=this._closeElement)||void 0===t||t.removeEventListener("click",this._closeClickListener),null===(e=this._closeElement)||void 0===e||e.removeEventListener("touchstart",this._closeTouchStartListener),this._componentItem.off("titleChanged",this._tabTitleChangedListener),this.reorderEnabled&&this.disableReorder(),this._element.remove()}setBlurred(){this._element.classList.remove("lm_focused"),this._titleElement.classList.remove("lm_focused")}setFocused(){this._element.classList.add("lm_focused"),this._titleElement.classList.add("lm_focused")}onDragStart(t,e){if(void 0===this._dragListener)throw new J("TODSDLU10093");if(void 0===this._dragStartEvent)throw new J("TODS23309");this._dragStartEvent(t,e,this._dragListener,this.componentItem)}onContentItemDestroy(){void 0!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=void 0)}onTabClickDown(t){const e=t.target;e!==this._element&&e!==this._titleElement||(0===t.button?this.notifyFocus():1===t.button&&this._componentItem.isClosable&&this.notifyClose())}onTabTouchStart(t){t.target===this._element&&this.notifyFocus()}onCloseClick(){this.notifyClose()}onCloseTouchStart(){this.notifyClose()}notifyClose(){if(void 0===this._closeEvent)throw new J("TNC15007");this._closeEvent(this._componentItem)}notifyFocus(){if(void 0===this._focusEvent)throw new J("TNA15007");this._focusEvent(this._componentItem)}enableReorder(){this._dragListener=new Zt(this._element,[this._titleElement]),this._dragListener.on("dragStart",this._dragStartListener),this._componentItem.on("destroy",this._contentItemDestroyListener)}disableReorder(){if(void 0===this._dragListener)throw new J("TDR87745");this._componentItem.off("destroy",this._contentItemDestroyListener),this._dragListener.off("dragStart",this._dragStartListener),this._dragListener=void 0}}class Qt{constructor(t,e,i,n,o){this._layoutManager=t,this._componentRemoveEvent=e,this._componentFocusEvent=i,this._componentDragStartEvent=n,this._dropdownActiveChangedEvent=o,this._tabs=[],this._lastVisibleTabIndex=-1,this._dropdownActive=!1,this._element=document.createElement("section"),this._element.classList.add("lm_tabs"),this._dropdownElement=document.createElement("section"),this._dropdownElement.classList.add("lm_tabdropdown_list"),this._dropdownElement.style.display="none"}get tabs(){return this._tabs}get tabCount(){return this._tabs.length}get lastVisibleTabIndex(){return this._lastVisibleTabIndex}get element(){return this._element}get dropdownElement(){return this._dropdownElement}get dropdownActive(){return this._dropdownActive}destroy(){for(let t=0;tthis.handleTabCloseEvent(t)),(t=>this.handleTabFocusEvent(t)),((t,e,i,n)=>this.handleTabDragStartEvent(t,e,i,n)));void 0===e&&(e=this._tabs.length),this._tabs.splice(e,0,i),ethis._lastVisibleTabIndex){const t=this._tabs[e];for(let t=e;t>0;t--)this._tabs[t]=this._tabs[t-1];this._tabs[0]=t}}updateTabSizes(t,e){let i=!1;this.tryUpdateTabSizes(i,t,e)||(i=!0,this.tryUpdateTabSizes(i,t,e)),i!==this._dropdownActive&&(this._dropdownActive=i,this._dropdownActiveChangedEvent())}tryUpdateTabSizes(t,e,i){if(this._tabs.length>0){if(void 0===i)throw new Error("non-empty tabs must have active component item");let n=0,o=!1;const s=this._layoutManager.layoutConfig.settings.tabOverlapAllowance,r=this._tabs.indexOf(i.tab),a=this._tabs[r];this._lastVisibleTabIndex=-1;for(let i=0;ie){if(o)i===r&&(l.style.zIndex="auto",l.style.marginLeft="",l.parentElement!==this._element&&this._element.appendChild(l));else{let t;if(t=r>0&&r<=i?(d-e)/(i-1):(d-e)/i,tthis.onClick(t),this._touchStartListener=t=>this.onTouchStart(t),this._rowColumnClosable=!0,this._closeButton=null,this._popoutButton=null,this._tabsContainer=new Qt(this._layoutManager,(t=>this.handleTabInitiatedComponentRemoveEvent(t)),(t=>this.handleTabInitiatedComponentFocusEvent(t)),((t,e,i,n)=>this.handleTabInitiatedDragStartEvent(t,e,i,n)),(()=>this.processTabDropdownActiveChanged())),this._show=i.show,this._popoutEnabled=i.popoutEnabled,this._popoutLabel=i.popoutLabel,this._maximiseEnabled=i.maximiseEnabled,this._maximiseLabel=i.maximiseLabel,this._minimiseEnabled=i.minimiseEnabled,this._minimiseLabel=i.minimiseLabel,this._closeEnabled=i.closeEnabled,this._closeLabel=i.closeLabel,this._tabDropdownEnabled=i.tabDropdownEnabled,this._tabDropdownLabel=i.tabDropdownLabel,this.setSide(i.side),this._canRemoveComponent=this._configClosable,this._element=document.createElement("section"),this._element.classList.add("lm_header"),this._controlsContainerElement=document.createElement("section"),this._controlsContainerElement.classList.add("lm_controls"),this._element.appendChild(this._tabsContainer.element),this._element.appendChild(this._controlsContainerElement),this._element.appendChild(this._tabsContainer.dropdownElement),this._element.addEventListener("click",this._clickListener,{passive:!0}),this._element.addEventListener("touchstart",this._touchStartListener,{passive:!0}),this._documentMouseUpListener=()=>this._tabsContainer.hideAdditionalTabsDropdown(),globalThis.document.addEventListener("mouseup",this._documentMouseUpListener,{passive:!0}),this._tabControlOffset=this._layoutManager.layoutConfig.settings.tabControlOffset,this._tabDropdownEnabled&&(this._tabDropdownButton=new Kt(this,this._tabDropdownLabel,"lm_tabdropdown",(()=>this._tabsContainer.showAdditionalTabsDropdown()))),this._popoutEnabled&&(this._popoutButton=new Kt(this,this._popoutLabel,"lm_popout",(()=>this.handleButtonPopoutEvent()))),this._maximiseEnabled&&(this._maximiseButton=new Kt(this,this._maximiseLabel,"lm_maximise",(t=>this.handleButtonMaximiseToggleEvent(t)))),this._configClosable&&(this._closeButton=new Kt(this,this._closeLabel,"lm_close",(()=>s()))),this.processTabDropdownActiveChanged()}get show(){return this._show}get side(){return this._side}get leftRightSided(){return this._leftRightSided}get layoutManager(){return this._layoutManager}get parent(){return this._parent}get tabs(){return this._tabsContainer.tabs}get lastVisibleTabIndex(){return this._tabsContainer.lastVisibleTabIndex}get element(){return this._element}get tabsContainerElement(){return this._tabsContainer.element}get controlsContainerElement(){return this._controlsContainerElement}destroy(){this.emit("destroy"),this._popoutEvent=void 0,this._maximiseToggleEvent=void 0,this._clickEvent=void 0,this._touchStartEvent=void 0,this._componentRemoveEvent=void 0,this._componentFocusEvent=void 0,this._componentDragStartEvent=void 0,this._tabsContainer.destroy(),globalThis.document.removeEventListener("mouseup",this._documentMouseUpListener),this._element.remove()}createTab(t,e){this._tabsContainer.createTab(t,e)}removeTab(t){this._tabsContainer.removeTab(t)}processActiveComponentChanged(t){this._tabsContainer.processActiveComponentChanged(t),this.updateTabSizes()}setSide(t){this._side=t,this._leftRightSided=[nt.right,nt.left].includes(this._side)}setRowColumnClosable(t){this._rowColumnClosable=t,this.updateClosability()}updateClosability(){let t;if(this._configClosable)if(this._rowColumnClosable){t=!0;const e=this.tabs.length;for(let i=0;i1}applyFocusedValue(t){t?this._element.classList.add("lm_focused"):this._element.classList.remove("lm_focused")}processMaximised(){if(void 0===this._maximiseButton)throw new J("HPMAX16997");this._maximiseButton.element.setAttribute("title",this._minimiseLabel)}processMinimised(){if(void 0===this._maximiseButton)throw new J("HPMIN16997");this._maximiseButton.element.setAttribute("title",this._maximiseLabel)}updateTabSizes(){if(this._tabsContainer.tabCount>0){const t=this._show?this._layoutManager.layoutConfig.dimensions.headerHeight:0;let e;this._leftRightSided?(this._element.style.height="",this._element.style.width=zt(t)):(this._element.style.width="",this._element.style.height=zt(t)),e=this._leftRightSided?this._element.offsetHeight-this._controlsContainerElement.offsetHeight-this._tabControlOffset:this._element.offsetWidth-this._controlsContainerElement.offsetWidth-this._tabControlOffset,this._tabsContainer.updateTabSizes(e,this._getActiveComponentItemEvent())}}handleTabInitiatedComponentRemoveEvent(t){if(this._canRemoveComponent){if(void 0===this._componentRemoveEvent)throw new J("HHTCE22294");this._componentRemoveEvent(t)}}handleTabInitiatedComponentFocusEvent(t){if(void 0===this._componentFocusEvent)throw new J("HHTAE22294");this._componentFocusEvent(t)}handleTabInitiatedDragStartEvent(t,e,i,n){if(this._canRemoveComponent){if(void 0===this._componentDragStartEvent)throw new J("HHTDSE22294");this._componentDragStartEvent(t,e,i,n)}else i.cancelDrag()}processTabDropdownActiveChanged(){void 0!==this._tabDropdownButton&&Dt(this._tabDropdownButton.element,this._tabsContainer.dropdownActive)}handleButtonPopoutEvent(){if(this._layoutManager.layoutConfig.settings.popoutWholeStack){if(void 0===this._popoutEvent)throw new J("HHBPOE17834");this._popoutEvent()}else{const t=this._getActiveComponentItemEvent();t&&t.popout()}}handleButtonMaximiseToggleEvent(t){if(void 0===this._maximiseToggleEvent)throw new J("HHBMTE16834");this._maximiseToggleEvent()}onClick(t){t.target===this._element&&this.notifyClick(t)}onTouchStart(t){t.target===this._element&&this.notifyTouchStart(t)}notifyClick(t){if(void 0===this._clickEvent)throw new J("HNHC46834");this._clickEvent(t)}notifyTouchStart(t){if(void 0===this._touchStartEvent)throw new J("HNHTS46834");this._touchStartEvent(t)}}class ee extends $t{constructor(t,e,i){var n,o,s,r,a,l,h,d,c,m,u,p,g,f,v,_,y,C,w;super(t,e,i,ee.createElement(document)),this._headerSideChanged=!1,this._resizeListener=()=>this.handleResize(),this._maximisedListener=()=>this.handleMaximised(),this._minimisedListener=()=>this.handleMinimised(),this._headerConfig=e.header;const I=t.layoutConfig.header,b=e.content;let S;if(1!==b.length)S=void 0;else{S=b[0].header}this._initialWantMaximise=e.maximised,this._initialActiveItemIndex=null!==(n=e.activeItemIndex)&&void 0!==n?n:0;const E=null!==(r=null!==(s=null===(o=this._headerConfig)||void 0===o?void 0:o.show)&&void 0!==s?s:null==S?void 0:S.show)&&void 0!==r?r:I.show,x=null!==(h=null!==(l=null===(a=this._headerConfig)||void 0===a?void 0:a.popout)&&void 0!==l?l:null==S?void 0:S.popout)&&void 0!==h?h:I.popout,L=null!==(m=null!==(c=null===(d=this._headerConfig)||void 0===d?void 0:d.maximise)&&void 0!==c?c:null==S?void 0:S.maximise)&&void 0!==m?m:I.maximise,z=null!==(g=null!==(p=null===(u=this._headerConfig)||void 0===u?void 0:u.close)&&void 0!==p?p:null==S?void 0:S.close)&&void 0!==g?g:I.close,M=null!==(_=null!==(v=null===(f=this._headerConfig)||void 0===f?void 0:f.minimise)&&void 0!==v?v:null==S?void 0:S.minimise)&&void 0!==_?_:I.minimise,P=null!==(w=null!==(C=null===(y=this._headerConfig)||void 0===y?void 0:y.tabDropdown)&&void 0!==C?C:null==S?void 0:S.tabDropdown)&&void 0!==w?w:I.tabDropdown;this._maximisedEnabled=!1!==L;const T={show:!1!==E,side:!1===E?nt.top:E,popoutEnabled:!1!==x,popoutLabel:!1===x?"":x,maximiseEnabled:this._maximisedEnabled,maximiseLabel:!1===L?"":L,closeEnabled:!1!==z,closeLabel:!1===z?"":z,minimiseEnabled:!0,minimiseLabel:M,tabDropdownEnabled:!1!==P,tabDropdownLabel:!1===P?"":P};this._header=new te(t,this,T,e.isClosable&&!1!==z,(()=>this.getActiveComponentItem()),(()=>this.remove()),(()=>this.handlePopoutEvent()),(()=>this.toggleMaximise()),(t=>this.handleHeaderClickEvent(t)),(t=>this.handleHeaderTouchStartEvent(t)),(t=>this.handleHeaderComponentRemoveEvent(t)),(t=>this.handleHeaderComponentFocusEvent(t)),((t,e,i,n)=>this.handleHeaderComponentStartDragEvent(t,e,i,n))),this.isStack=!0,this._childElementContainer=document.createElement("section"),this._childElementContainer.classList.add("lm_items"),this.on("resize",this._resizeListener),this._maximisedEnabled&&(this.on("maximised",this._maximisedListener),this.on("minimised",this._minimisedListener)),this.element.appendChild(this._header.element),this.element.appendChild(this._childElementContainer),this.setupHeaderPosition(),this._header.updateClosability()}get childElementContainer(){return this._childElementContainer}get header(){return this._header}get headerShow(){return this._header.show}get headerSide(){return this._header.side}get headerLeftRightSided(){return this._header.leftRightSided}get contentAreaDimensions(){return this._contentAreaDimensions}get initialWantMaximise(){return this._initialWantMaximise}get isMaximised(){return this===this.layoutManager.maximisedStack}get stackParent(){if(!this.parent)throw new Error("Stack should always have a parent");return this.parent}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}init(){if(!0===this.isInitialised)return;this.updateNodeSize();for(let t=0;t0){if(this._initialActiveItemIndex<0||this._initialActiveItemIndex>=e)throw new Error(`ActiveItemIndex out of range: ${this._initialActiveItemIndex} id: ${this.id}`);for(let i=0;ithis.contentItems.length)throw e-=1,new X("SAC99728");if(t instanceof jt)return e=super.addChild(t,e),this._childElementContainer.appendChild(t.element),this._header.createTab(t,e),this.setActiveComponentItem(t,i),this._header.updateTabSizes(),this.updateSize(!1),t.container.setBaseLogicalZIndex(),this._header.updateClosability(),this.emitStateChangedEvent(),e;throw new X("SACC88532")}removeChild(t,e){const i=t,n=this.contentItems.indexOf(i),o=1===this.contentItems.length;if(this._activeComponentItem===i&&(i.focused&&i.blur(),!o)){const t=0===n?1:n-1;this.setActiveComponentItem(this.contentItems[t],!1)}this._header.removeTab(i),super.removeChild(i,e),o||this._header.updateClosability(),this.emitStateChangedEvent()}toggleMaximise(){this.isMaximised?this.minimise():this.maximise()}maximise(){if(!this.isMaximised){this.layoutManager.setMaximisedStack(this);const t=this.contentItems,e=t.length;for(let i=0;i0&&void 0===t)throw new Error("expected non-empty stack to have an active component item");return{type:"stack",content:this.calculateConfigContent(),size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,isClosable:this.isClosable,maximised:this.isMaximised,header:this.createHeaderConfig(),activeItemIndex:t}}onDrop(t,e){if("header"===this._dropSegment){if(this.resetHeaderDropZone(),void 0===this._dropIndex)throw new J("SODDI68990");return void this.addChild(t,this._dropIndex)}if("body"===this._dropSegment)return void this.addChild(t,0,!0);const i="top"===this._dropSegment||"bottom"===this._dropSegment,n="left"===this._dropSegment||"right"===this._dropSegment,o="top"===this._dropSegment||"left"===this._dropSegment,s=i&&this.stackParent.isColumn||n&&this.stackParent.isRow;if(t.isComponent){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createAndInitContentItem(e,this);i.addChild(t),t=i}if(t.type===at.row||t.type===at.column){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}if(s){const e=this.stackParent.contentItems.indexOf(this);this.stackParent.addChild(t,o?e:e+1,!0),this.size*=.5,t.size=this.size,t.sizeUnit=this.sizeUnit,this.stackParent.updateSize(!1)}else{const e=i?at.column:at.row,n=ct.createDefault(e),s=this.layoutManager.createContentItem(n,this);this.stackParent.replaceChild(this,s),s.addChild(t,o?0:void 0,!0),s.addChild(this,o?void 0:0,!0),this.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}highlightDropZone(t,e){for(const i in this._contentAreaDimensions){const n=i,o=this._contentAreaDimensions[n].hoverArea;if(o.x1t&&o.y1e)return void("header"===n?(this._dropSegment="header",this.highlightHeaderDropZone(this._header.leftRightSided?e:t)):(this.resetHeaderDropZone(),this.highlightBodyDropZone(n)))}}getArea(){if("none"===this.element.style.display)return null;const t=super.getElementArea(this._header.element),e=super.getElementArea(this._childElementContainer);if(null===t||null===e)throw new K("SGAHC13086");const i=e.x2-e.x1,n=e.y2-e.y1;return this._contentAreaDimensions={header:{hoverArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2},highlightArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2}}},0===this.contentItems.length?(this._contentAreaDimensions.body={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2}},super.getElementArea(this.element)):(this._contentAreaDimensions.left={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x1+.25*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x1+.5*i,y2:e.y2}},this._contentAreaDimensions.top={hoverArea:{x1:e.x1+.25*i,y1:e.y1,x2:e.x1+.75*i,y2:e.y1+.5*n},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y1+.5*n}},this._contentAreaDimensions.right={hoverArea:{x1:e.x1+.75*i,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1+.5*i,y1:e.y1,x2:e.x2,y2:e.y2}},this._contentAreaDimensions.bottom={hoverArea:{x1:e.x1+.25*i,y1:e.y1+.5*n,x2:e.x1+.75*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1+.5*n,x2:e.x2,y2:e.y2}},super.getElementArea(this.element))}positionHeader(t){this._header.side!==t&&(this._header.setSide(t),this._headerSideChanged=!0,this.setupHeaderPosition())}updateNodeSize(){if("none"!==this.element.style.display){const t=kt(this.element);if(this._header.show){t[this._header.leftRightSided?it.width:it.height]-=this.layoutManager.layoutConfig.dimensions.headerHeight}this._childElementContainer.style.width=zt(t.width),this._childElementContainer.style.height=zt(t.height);for(let e=0;e=o&&t({...t,[e]:i});async function s(t,e){return(await Promise.all(e.map((async([e,i])=>[e,await t(i,e)])))).reduce(o,{})}n.mapEntriesAsync=s,n.mapValuesAsync=async function(t,e){let i;return i=e instanceof Map?[...e.entries()]:Object.entries(e),s(t,i)};var r,a,l,h,d=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldSet||function(t,e,i,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(t,i):o?o.value=i:e.set(t,i),i},c=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldGet||function(t,e,i,n){if("a"===i&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?n:"a"===i?n.call(t):n?n.value:e.get(t)};Object.defineProperty(i,"__esModule",{value:!0});var m=i.DefaultLayoutManager=void 0;const u=n;class p{constructor(t){a.set(this,void 0),l.set(this,new Map),d(this,a,t,"f")}size(){return c(this,l,"f").size}async applyLayoutSnapshot({layouts:t}){if(Object.keys(t).length>1)throw new Error("[LayoutManager] Tried to call applyLayoutSnapshot with more than 1 layout. When implementing multiple layouts via overridden LayoutManager class, you must override and fully implement the applyLayoutSnapshot method without calling super.applyLayoutSnapshot().");const[[e,i]]=Object.entries(t);await p.createLayout(this,{layoutName:e,layout:i})}async showLayout({layoutName:t}){}async getLayoutSnapshot(){return{layouts:await(0,u.mapValuesAsync)((t=>t.getFrameSnapshot()),c(this,l,"f"))}}async removeLayout({layoutName:t}){}getLayoutIdentityForView(t){const e=[...c(this,l,"f").values()].find((e=>e.getCurrentViews().some((e=>e.name===t.name&&e.uuid===t.uuid))));return e?.identity??void 0}isLayoutVisible({layoutName:t}){return c(p,r,"m",h).call(p,this,t).isVisible()}resolveLayoutIdentity(t){if(t&&"layoutName"in t)return t;const e=[...c(this,l,"f").values()];if(1===e.length)return e[0].identity;const i=e.find((t=>t.isVisible()));return i?.identity??void 0}static async resolveLayout(t,e){const i=t.resolveLayoutIdentity(e);if(void 0===i||!("layoutName"in i))throw new Error("[layout-manager] resolveLayout: Could not resolve the layout identity. Make sure you include 'layoutName' in the identity object.");return c(p,r,"m",h).call(p,t,i.layoutName)}static async handleSharedView(t,e,i){await(0,u.mapValuesAsync)((async t=>{if(t.identity.layoutName!==e.layoutName){const e=t.getCurrentViews().find((t=>t.name===i.name));e&&await t.onViewDetached({viewIdentity:e,target:null}).catch(console.error)}}),c(t,l,"f"))}static async handleLastViewRemoved(t,e){await t.removeLayout(e),await c(t,a,"f").handleLastViewRemoved(t)}static async destroyLayout(t,{layoutName:e}){await c(p,r,"m",h).call(p,t,e).destroy(),c(t,l,"f").delete(e)}static async createLayout(t,e){const{layoutName:i}=e;if(c(t,l,"f").has(i))throw new Error(`Layout name ${i} already exists`);await c(t,a,"f").createLayout(e,t)}static registerLayout(t,e,i){c(t,l,"f").set(e,i)}static getAllLayouts(t){return[...c(t,l,"f").values()]}static setInitialSnapshot(t,e){c(t,a,"f").setInitialSnapshot(e)}static createClosedConstructor(...t){return class extends p{constructor(){super(...t)}}}}m=i.DefaultLayoutManager=p,r=p,a=new WeakMap,l=new WeakMap,h=function(t,e){const i=c(t,l,"f").get(e);if(!i)throw new Error(`[layout-manager] getLayoutByName: Could not locate layout with name '${e}'`);return i};var g={},f={},v={};Object.defineProperty(v,"__esModule",{value:!0}),v.ReversibleMap=void 0;v.ReversibleMap=class{constructor(){this.valueToKey=new Map,this.keyToValue=new Map,this.setUnique=(t,e)=>{if(this.hasKey(t)||this.hasValue(e))throw new Error("Key or value already in the map.");this.keyToValue.set(t,e),this.valueToKey.set(e,t)},this.getKey=t=>{const e=this.valueToKey.get(t);if(!e)throw new Error("Value not found in the map.");return e},this.deleteKey=t=>{const e=this.getValue(t);return this.keyToValue.delete(t),this.valueToKey.delete(e),e},this.deleteValue=t=>{const e=this.getKey(t);return this.keyToValue.delete(e),this.valueToKey.delete(t),e},this.hasKey=t=>this.keyToValue.has(t),this.hasValue=t=>this.valueToKey.has(t)}getValue(t){const e=this.keyToValue.get(t);if(!e)throw new Error("Key not found in the map.");return e}},Object.defineProperty(f,"__esModule",{value:!0});var _=f.LayoutContentCache=void 0;const y=t.lazy,C=v;class w{constructor(){this.contentItemCache=new C.ReversibleMap,this.contentItemCacheId=0,this.createCacheKey=()=>{const t=`entity-${this.contentItemCacheId.toString()}`;return this.contentItemCacheId+=1,t},this.hasKey=t=>this.contentItemCache.hasKey(t),this.getItemOrUndefined=t=>{try{return this.getContentItemOrThrow(t)}catch(t){return}},this.getContentItemOrThrow=(t,e)=>{if(!this.contentItemCache.hasKey(t))throw new Error("Layout component has been destroyed or detached from the current layout.");const i=this.contentItemCache.getValue(t);if(e&&!e.includes(i.type))throw new Error(`Layout item is not the expected type. Expected ${e.join(", ")}, got ${i.type}.`);return i},this.getOrCreateEntityId=t=>{if(this.contentItemCache.hasValue(t))return this.contentItemCache.getKey(t);t.onDestroyed((()=>{this.contentItemCache.deleteValue(t)}));const e=this.createCacheKey();return this.contentItemCache.setUnique(e,t),e}}static getSingleInstance(){return w.singleton.getValue()}}_=f.LayoutContentCache=w,w.singleton=new y.Lazy((()=>new w));var I={},b={};!function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.getAdjacentStacks=t.doShareEdge=t.getAdjacentItem=void 0;t.getAdjacentItem=(e,i)=>{const{parent:n}=e;if(e.isRoot()||!n)return;const o=["top","bottom"].includes(i)?"column":"row",s=["top","left"].includes(i)?-1:1;if(n.type===o){const t=n.contentItems.indexOf(e)+s;if(t>=0&&t{const n=t.getBounds(),o=e.getBounds();if(!n||!o)return!1;if(["top","bottom"].includes(i)){return!(n.righto.right)}return!(n.bottomo.bottom)};t.getAdjacentStacks=(e,i)=>{const n=["top","bottom"].includes(i)?"row":"column",o=s=>"stack"===s.type?(0,t.doShareEdge)(e,s,i)?[s]:[]:"root"===s.type||"ground"===s.type?[]:s.type===n?s.contentItems.map((t=>o(t))).flat():s.type!==n?["top","right"].includes(i)?o(s.contentItems[s.contentItems.length-1]):o(s.contentItems[0]):[],s=(0,t.getAdjacentItem)(e,i);return s?o(s):[]}}(b);var S=t.commonjsGlobal&&t.commonjsGlobal.__decorate||function(t,e,i,n){var o,s=arguments.length,r=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(s<3?o(r):s>3?o(e,i,r):o(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};Object.defineProperty(I,"__esModule",{value:!0}),I.LayoutEntitiesController=void 0;const E=t.decorators,x=b,L=i;class z{constructor(t,e,i){this.wire=t,this.layoutManager=e,this.layoutContentCache=i,this.analytics=t=>{this.wire.sendAction(`layout-controller-${t}`).catch((()=>{}))},this.getLayoutIdentityForViewOrThrow=async t=>{const e=this.layoutManager.getLayoutIdentityForView(t);if(!e)throw new Error(`View identity ${t.name} is not attached to any layouts.`);return e},this.getRoot=async t=>{this.analytics("get-root");const e=(await this.getLayout(t)).getRoot();return{type:e.type,entityId:this.layoutContentCache.getOrCreateEntityId(e)}},this.getStackByView=async t=>{this.analytics("get-stack-by-view");const e=await this.getLayoutIdentityForViewOrThrow(t),i=(await this.getLayout(e)).getStackByView(t);if("stack"===i?.type)return{entityId:this.layoutContentCache.getOrCreateEntityId(i),type:"stack"}},this.getStackViews=t=>{this.analytics("get-stack-views");return this.layoutContentCache.getContentItemOrThrow(t,["stack"]).contentItems.map((t=>({name:t.viewName,uuid:this.wire.me.uuid})))},this.isRoot=t=>{this.analytics("is-root");return this.layoutContentCache.getContentItemOrThrow(t).isRoot()},this.exists=t=>(this.analytics("exists"),this.layoutContentCache.hasKey(t)),this.addViewToStack=async(t,e,{index:i}={index:0})=>{this.analytics("add-view-to-stack");const n=this.layoutContentCache.getContentItemOrThrow(t);if(i&&i>n.contentItems.length+1)throw new Error(`Index '${i}' out of range, please exclude the index or specify a number between 0 and ${n.contentItems.length}`);const o={id:t,index:i},{identity:s}=await n.layout.platformCreateView(e,{location:o});return s},this.findViewInStack=(t,e)=>t.contentItems.find((t=>t.viewName===e.name)),this.removeViewFromStack=async(t,e)=>{this.analytics("remove-view-from-stack");const i=this.layoutContentCache.getContentItemOrThrow(t,["stack"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to remove a view ('${e.name}') which does not belong to the stack.`);await n.layout.platformCloseView(e)},this.createAdjacentStack=async(t,e,{position:i="right"}={})=>{if(this.analytics("create-adjacent-stack"),!Array.isArray(e)||0===e.length)throw new Error('The parameter "views" must be an array with at least 1 element.');if(!["top","bottom","left","right"].includes(i))throw new Error(`Invalid position '${i}' specified.`);const n=this.layoutContentCache.getContentItemOrThrow(t).createAdjacentStack({position:i}),o=this.layoutContentCache.getOrCreateEntityId(n);return await Promise.all(e.reverse().map((t=>this.addViewToStack(o,t)))),o},this.getAdjacentStacks=async({targetId:t,edge:e})=>{this.analytics("get-adjacent-stacks");const i=this.layoutContentCache.getContentItemOrThrow(t);return(0,x.getAdjacentStacks)(i,e).map((t=>({entityId:this.layoutContentCache.getOrCreateEntityId(t)})))},this.setStackActiveView=async(t,e)=>{this.analytics("set-stack-active-view");const i=this.layoutContentCache.getContentItemOrThrow(t,["stack"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to set a view ('${e.name}') as active when it does not belong to the stack.`);i.setActiveContentItem(n,!0)}}async getLayout(t){const e=await L.DefaultLayoutManager.resolveLayout(this.layoutManager,t);if(!e)throw new Error(`Could not resolve target layout identity ${JSON.stringify(t)}`);return e}getContent(t){this.analytics("get-content");return this.layoutContentCache.getContentItemOrThrow(t,["column","row"]).contentItems.map((t=>({type:t.type,entityId:this.layoutContentCache.getOrCreateEntityId(t)})))}getParent(t){this.analytics("get-parent");const e=this.layoutContentCache.getContentItemOrThrow(t);if(!e.isRoot())return e.parent?.contentItems.includes(e)?{type:e.parent.type,entityId:this.layoutContentCache.getOrCreateEntityId(e.parent)}:void 0}}S([(0,E.expose)()],z.prototype,"getLayoutIdentityForViewOrThrow",void 0),S([(0,E.expose)()],z.prototype,"getRoot",void 0),S([(0,E.expose)()],z.prototype,"getStackByView",void 0),S([(0,E.expose)()],z.prototype,"getStackViews",void 0),S([(0,E.expose)()],z.prototype,"getContent",null),S([(0,E.expose)()],z.prototype,"getParent",null),S([(0,E.expose)()],z.prototype,"isRoot",void 0),S([(0,E.expose)()],z.prototype,"exists",void 0),S([(0,E.expose)()],z.prototype,"addViewToStack",void 0),S([(0,E.expose)()],z.prototype,"removeViewFromStack",void 0),S([(0,E.expose)()],z.prototype,"createAdjacentStack",void 0),S([(0,E.expose)()],z.prototype,"getAdjacentStacks",void 0),S([(0,E.expose)()],z.prototype,"setStackActiveView",void 0),I.LayoutEntitiesController=z,Object.defineProperty(g,"__esModule",{value:!0});var M=g.initLayoutEndpoints=void 0;const P=t.apiExposer,T=t.layout_constants,A=f,k=I,D=i;M=g.initLayoutEndpoints=async function(t,e){const i=t.getFin(),n=await i.Platform.getCurrentSync().getClient(),o=new P.ChannelsExposer(n);await new P.ApiExposer(o).exposeInstance(new k.LayoutEntitiesController(t,e,A.LayoutContentCache.getSingleInstance()),{id:T.LAYOUT_CONTROLLER_ID}),await async function(t,e){const i=t=>async i=>{const n=await D.DefaultLayoutManager.resolveLayout(e,i.target);if(!n)throw new Error(`Could not resolve the layout target from payload ${JSON.stringify(i)}`);return t(n,i)},n=(e,n)=>{t.register(e,i(n))},o=(t,e)=>{n(t,e)};n("replace-view",((t,e)=>t.replaceView(e))),n("replace-layout",((t,{layout:e})=>t.replaceLayout(e))),n("add-view",((t,e)=>t.insertView(e))),o("layout-add-view",((t,{viewOptions:e,location:i,targetView:n})=>t.platformCreateView(e,{location:i,targetView:n}))),n("close-view",((t,e)=>t.cleanupView(e.viewIdentity))),o("layout-close-view",((t,e)=>t.platformCloseView(e.viewIdentity))),n("apply-preset-layout",((t,e)=>t.applyPreset(e))),n("get-layout-views",(t=>t.getCurrentViews())),n("get-frame-snapshot",(t=>t.getFrameSnapshot())),n("is-visible",(t=>t.isVisible())),n("destroy",(t=>t.destroy())),t.register("get-layout-snapshot",(()=>e.getLayoutSnapshot()))}(n,e)};var R={};Object.defineProperty(R,"__esModule",{value:!0});var U=R.BaseLayout=void 0;U=R.BaseLayout=class{};var O={};Object.defineProperty(O,"__esModule",{value:!0});var V=O.DOMEmitter=void 0;V=O.DOMEmitter=class{constructor(t){this.container=t}dispatchLocalEvent(t,e){const i={...e,type:t,tabSelector:`tab-${e.name}`,containerSelector:`container-${e.name}`,topic:"openfin-DOM-event"};this.container.dispatchEvent(new CustomEvent(t,{detail:i}))}};var B={};Object.defineProperty(B,"__esModule",{value:!0});var H=B.mapLayoutContentItemsImmutableSync=B.mapLayoutContentItemsImmutable=W=B.isVisible=void 0;var W=B.isVisible=t=>(0!==t.offsetWidth||0!==t.offsetHeight)&&"hidden"!==window.getComputedStyle(t).visibility&&t.offsetTop>=0&&t.offsetLeft>=0&&t.offsetTop<=window.innerHeight&&t.offsetLeft<=window.innerWidth;const F=t=>"type"in t&&"component"===t.type;B.mapLayoutContentItemsImmutable=async function t(e,i){return F(i)?e(i):{...i,content:await Promise.all(i.content?.map((i=>t(e,i))))}},H=B.mapLayoutContentItemsImmutableSync=function t(e,i){return F(i)?e(i):{...i,content:i.content?.map((i=>t(e,i)))}};class N extends Error{constructor(t,e){super(e),this.type=t}}class G extends N{constructor(t,e){super("Configuration",t),this.node=e}}class j extends N{constructor(t){super("PopoutBlocked",t)}}class $ extends N{constructor(t){super("API",t)}}class Z extends N{constructor(t){super("Bind",t)}}class q extends Error{constructor(t,e,i){super(`${t}: ${e}${void 0===i?"":": "+i}`)}}class X extends q{constructor(t,e){super("Assert",t,e)}}class Y extends q{constructor(t,e,i){super("UnreachableCase",t,`${e}${void 0===i?"":": "+i}`)}}class K extends q{constructor(t,e){super("UnexpectedNull",t,e)}}class J extends q{constructor(t,e){super("UnexpectedUndefined",t,e)}}var Q;!function(t){let e=!1;const i={PopoutCannotBeCreatedWithGroundItemConfig:{id:0,default:"Popout cannot be created with ground ItemConfig"},PleaseRegisterAConstructorFunction:{id:1,default:"Please register a constructor function"},ComponentTypeNotRegisteredAndBindComponentEventHandlerNotAssigned:{id:2,default:"Component type not registered and BindComponentEvent handler not assigned"},ComponentIsAlreadyRegistered:{id:3,default:"Component is already registered"},ComponentIsNotVirtuable:{id:4,default:"Component is not virtuable. Requires rootHtmlElement field/getter"},VirtualComponentDoesNotHaveRootHtmlElement:{id:5,default:'Virtual component does not have getter "rootHtmlElement"'},ItemConfigIsNotTypeComponent:{id:6,default:"ItemConfig is not of type component"},InvalidNumberPartInSizeString:{id:7,default:"Invalid number part in size string"},UnknownUnitInSizeString:{id:8,default:"Unknown unit in size string"},UnsupportedUnitInSizeString:{id:9,default:"Unsupported unit in size string"}};t.idCount=Object.keys(i).length;const n=Object.values(i);t.checkInitialise=function(){if(!e)for(let e=0;e="0"&&t<="9"}function Tt(t,e){const i=zt(e);t.style.width=i}function At(t,e){const i=zt(e);t.style.height=i}function kt(t){return{width:t.offsetWidth,height:t.offsetHeight}}function Dt(t,e){t.style.display=e?"":"none"}function Rt(t,e){if(void 0!==e)for(const i in e)if(e.hasOwnProperty(i)){const n=e[i],o=t[i];t[i]=Ut(o,n)}return t}function Ut(t,e){if("object"!=typeof e)return e;if(Array.isArray(e)){const t=e.length,i=new Array(t);for(let n=0;n36)throw new Error("Too many keys in config minifier map")},t.translateObject=n}(dt||(dt={})),function(t){t.defaults={type:at.ground,content:[],size:1,sizeUnit:ht.Fractional,minSize:void 0,minSizeUnit:ht.Pixel,id:"",isClosable:!0},t.createCopy=function(t,e){switch(t.type){case at.ground:case at.row:case at.column:return gt.createCopy(t,e);case at.stack:return ut.createCopy(t,e);case at.component:return pt.createCopy(t);default:throw new Y("CICC91354",t.type,"Invalid Config Item type specified")}},t.createDefault=function(t){switch(t){case at.ground:throw new X("CICCDR91562");case at.row:case at.column:return gt.createDefault(t);case at.stack:return ut.createDefault();case at.component:return pt.createDefault();default:throw new Y("CICCDD91563",t,"Invalid Config Item type specified")}},t.isComponentItem=function(t){return t.type===at.component},t.isStackItem=function(t){return t.type===at.stack},t.isGroundItem=function(t){return t.type===at.ground}}(ct||(ct={})),function(t){t.defaultMaximised=!1,function(t){t.createCopy=function(t,e){return void 0===t?void 0:{show:null!=e?e:t.show,popout:t.popout,close:t.close,maximise:t.maximise,minimise:t.minimise,tabDropdown:t.tabDropdown}}}(t.Header||(t.Header={}))}(mt||(mt={})),function(t){function e(t){const e=t.length,i=new Array(e);for(let n=0;n"__glMaximised"===t));t>0&&(o=!0,n=n.splice(t,1)),e=n.length>0?n[0]:ct.defaults.id}else e=n;return i=void 0!==t.maximised?t.maximised:o,{id:e,maximised:i}}}(wt||(wt={})),function(t){function e(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0;return{resolved:!0,root:Et.resolve(i),openPopouts:t.resolveOpenPopouts(e.openPopouts),dimensions:t.Dimensions.resolve(e.dimensions),settings:t.Settings.resolve(e.settings),header:t.Header.resolve(e.header,e.settings,e.labels)}}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:Lt.fromResolvedArray(e.openPopouts),settings:_t.Settings.createCopy(e.settings),dimensions:t.Dimensions.fromResolved(e.dimensions),header:_t.Header.createCopy(e.header)}},t.isResolved=function(t){const e=t;return void 0!==e.resolved&&!0===e.resolved},t.resolveOpenPopouts=function(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0,{root:Et.resolve(o),openPopouts:xt.resolveOpenPopouts(e.openPopouts),dimensions:xt.Dimensions.resolve(e.dimensions),settings:xt.Settings.resolve(e.settings),header:xt.Header.resolve(e.header,e.settings,e.labels),parentId:null!==(i=e.parentId)&&void 0!==i?i:null,indexInParent:null!==(n=e.indexInParent)&&void 0!==n?n:null,window:t.Window.resolve(e.window,e.dimensions),resolved:!0}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:i(e.openPopouts),dimensions:xt.Dimensions.fromResolved(e.dimensions),settings:_t.Settings.createCopy(e.settings),header:_t.Header.createCopy(e.header),parentId:e.parentId,indexInParent:e.indexInParent,window:t.Window.fromResolved(e.window)}},t.fromResolvedArray=i}(Lt||(Lt={}));class Wt{constructor(){this._allEventSubscriptions=[],this._subscriptionsMap=new Map,this.unbind=this.removeEventListener,this.trigger=this.emit}tryBubbleEvent(t,e){}emit(t,...e){let i=this._subscriptionsMap.get(t);if(void 0!==i){i=i.slice();for(let t=0;t0){const n=e.slice();n.unshift(t);const o=this._allEventSubscriptions.slice();for(let t=0;t0?n.contentItems[0]:n,e=0);const o=this._layoutManager.createAndInitContentItem(i,t);t.addChild(o,e),this._layoutManager.layoutConfig.settings.popInOnClose?this._onClose():this.close()}createWindow(){const t=this.createUrl(),e=Math.floor(1e6*Math.random()).toString(36),i=this.serializeWindowFeatures({width:this._initialWindowSize.width,height:this._initialWindowSize.height,innerWidth:this._initialWindowSize.width,innerHeight:this._initialWindowSize.height,menubar:"no",toolbar:"no",location:"no",personalbar:"no",resizable:"yes",scrollbars:"no",status:"no"});if(this._popoutWindow=globalThis.open(t,e,i),this._popoutWindow)this._popoutWindow.addEventListener("load",(()=>this.positionWindow()),{passive:!0}),this._popoutWindow.addEventListener("beforeunload",(()=>{this._layoutManager.layoutConfig.settings.popInOnClose?this.popIn():this._onClose()}),{passive:!0}),this._checkReadyInterval=setInterval((()=>this.checkReady()),10);else if(!0===this._layoutManager.layoutConfig.settings.blockedPopoutsThrowError){throw new j("Popout blocked")}}checkReady(){if(null===this._popoutWindow)throw new K("BPCR01844");this._popoutWindow.__glInstance&&this._popoutWindow.__glInstance.isInitialised&&(this.onInitialised(),void 0!==this._checkReadyInterval&&(clearInterval(this._checkReadyInterval),this._checkReadyInterval=void 0))}serializeWindowFeatures(t){const e=[];for(const i in t)e.push(i+"="+t[i].toString());return e.join(",")}createUrl(){const t="gl-window-config-"+Ot(),e=_t.minifyConfig(this._config);try{localStorage.setItem(t,JSON.stringify(e))}catch(t){throw new Error("Error while writing to localStorage "+function(t){return t instanceof Error?t.message:"string"==typeof t?t:"Unknown Error"}(t))}const i=new URL(location.href);return i.searchParams.set("gl-window",t),i.toString()}positionWindow(){if(null===this._popoutWindow)throw new Error("BrowserPopout.positionWindow: null popoutWindow");this._popoutWindow.moveTo(this._initialWindowSize.left,this._initialWindowSize.top),this._popoutWindow.focus()}onInitialised(){this._isInitialised=!0,this.getGlInstance().on("popIn",(()=>this.popIn())),this.emit("initialised")}_onClose(){setTimeout((()=>this.emit("closed")),50)}}class Gt extends Wt{constructor(t,e,i,n){super(),this.layoutManager=t,this._parent=i,this._element=n,this._popInParentIds=[],this._type=e.type,this._id=e.id,this._isInitialised=!1,this.isGround=!1,this.isRow=!1,this.isColumn=!1,this.isStack=!1,this.isComponent=!1,this.size=e.size,this.sizeUnit=e.sizeUnit,this.minSize=e.minSize,this.minSizeUnit=e.minSizeUnit,this._isClosable=e.isClosable,this._pendingEventPropagations={},this._throttledEvents=["stateChanged"],this._contentItems=this.createContentItems(e.content)}get type(){return this._type}get id(){return this._id}set id(t){this._id=t}get popInParentIds(){return this._popInParentIds}get parent(){return this._parent}get contentItems(){return this._contentItems}get isClosable(){return this._isClosable}get element(){return this._element}get isInitialised(){return this._isInitialised}static isStack(t){return t.isStack}static isComponentItem(t){return t.isComponent}static isComponentParentableItem(t){return t.isStack||t.isGround}removeChild(t,e=!1){const i=this._contentItems.indexOf(t);if(-1===i)throw new Error("Can't remove child item. Unknown content item");if(e||this._contentItems[i].destroy(),this._contentItems.splice(i,1),this._contentItems.length>0)this.updateSize(!1);else if(!this.isGround&&!0===this._isClosable){if(null===this._parent)throw new K("CIUC00874");this._parent.removeChild(this)}}addChild(t,e,i){return null!=e||(e=this._contentItems.length),this._contentItems.splice(e,0,t),t.setParent(this),!0===this._isInitialised&&!1===t._isInitialised&&t.init(),e}replaceChild(t,e,i=!1){const n=this._contentItems.indexOf(t),o=t._element.parentNode;if(-1===n)throw new X("CIRCI23232","Can't replace child. oldChild is not child of this");if(null===o)throw new K("CIRCP23232");if(o.replaceChild(e._element,t._element),!0===i&&(t._parent=null,t.destroy()),this._contentItems[n]=e,e.setParent(this),e.size=t.size,e.sizeUnit=t.sizeUnit,e.minSize=t.minSize,e.minSizeUnit=t.minSizeUnit,null===e._parent)throw new K("CIRCNC45699");!0===e._parent._isInitialised&&!1===e._isInitialised&&e.init(),this.updateSize(!1)}remove(){if(null===this._parent)throw new K("CIR11110");this._parent.removeChild(this)}popout(){const t=Ot(),e=this.layoutManager.createPopoutFromContentItem(this,void 0,t,void 0);return this.emitBaseBubblingEvent("stateChanged"),e}calculateConfigContent(){const t=this._contentItems,e=t.length,i=new Array(e);for(let n=0;nthis.propagateEventToLayoutManager(t,e))))}propagateEventToLayoutManager(t,e){this._pendingEventPropagations[t]=!1,this.layoutManager.emitUnknown(t,e)}}class jt extends Gt{constructor(t,e,i){super(t,e,i,document.createElement("div")),this._parentItem=i,this._focused=!1,this.isComponent=!0,this._reorderEnabled=e.reorderEnabled,this.applyUpdatableConfig(e),this._initialWantMaximise=e.maximised;const n=document.createElement("div");n.classList.add("lm_content"),this.element.appendChild(n),this._container=new Ft(e,this,t,n,(t=>this.handleUpdateItemConfigEvent(t)),(()=>this.show()),(()=>this.hide()),(t=>this.focus(t)),(t=>this.blur(t)))}get componentName(){return this._container.componentType}get componentType(){return this._container.componentType}get reorderEnabled(){return this._reorderEnabled}get initialWantMaximise(){return this._initialWantMaximise}get component(){return this._container.component}get container(){return this._container}get parentItem(){return this._parentItem}get headerConfig(){return this._headerConfig}get title(){return this._title}get tab(){return this._tab}get focused(){return this._focused}destroy(){this._container.destroy(),super.destroy()}applyUpdatableConfig(t){this.setTitle(t.title),this._headerConfig=t.header}toConfig(){const t=this._container.stateRequestEvent,e=void 0===t?this._container.state:t();return{type:at.component,content:[],size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,maximised:!1,isClosable:this.isClosable,reorderEnabled:this._reorderEnabled,title:this._title,header:mt.Header.createCopy(this._headerConfig),componentType:pt.copyComponentType(this.componentType),componentState:e}}close(){if(null===this.parent)throw new K("CIC68883");this.parent.removeChild(this,!1)}enterDragMode(t,e){Tt(this.element,t),At(this.element,e),this._container.enterDragMode(t,e)}exitDragMode(){this._container.exitDragMode()}enterStackMaximised(){this._container.enterStackMaximised()}exitStackMaximised(){this._container.exitStackMaximised()}drag(){this._container.drag()}updateSize(t){this.updateNodeSize(t)}init(){this.updateNodeSize(!1),super.init(),this._container.emit("open"),this.initContentItems()}setTitle(t){this._title=t,this.emit("titleChanged",t),this.emit("stateChanged")}setTab(t){this._tab=t,this.emit("tab",t),this._container.setTab(t)}hide(){super.hide(),this._container.setVisibility(!1)}show(){super.show(),this._container.setVisibility(!0)}focus(t=!1){this.parentItem.setActiveComponentItem(this,!0,t)}setFocused(t){this._focused=!0,this.tab.setFocused(),t||this.emitBaseBubblingEvent("focus")}blur(t=!1){this._focused&&this.layoutManager.setFocusedComponentItem(void 0,t)}setBlurred(t){this._focused=!1,this.tab.setBlurred(),t||this.emitBaseBubblingEvent("blur")}setParent(t){this._parentItem=t,super.setParent(t)}handleUpdateItemConfigEvent(t){this.applyUpdatableConfig(t)}updateNodeSize(t){if("none"!==this.element.style.display){const{width:e,height:i}=kt(this.element);this._container.setSizeToNodeSize(e,i,t)}}}class $t extends Gt{constructor(){super(...arguments),this._focused=!1}get focused(){return this._focused}setFocusedValue(t){this._focused=t}}class Zt extends Wt{constructor(t,e){super(),this._eElement=t,this._pointerTracking=!1,this._pointerDownEventListener=t=>this.onPointerDown(t),this._pointerMoveEventListener=t=>this.onPointerMove(t),this._pointerUpEventListener=t=>this.onPointerUp(t),this._timeout=void 0,this._allowableTargets=[t,...e],this._oDocument=document,this._eBody=document.body,this._nDelay=1800,this._nDistance=10,this._nX=0,this._nY=0,this._nOriginalX=0,this._nOriginalY=0,this._dragging=!1,this._eElement.addEventListener("pointerdown",this._pointerDownEventListener,{passive:!0})}destroy(){this.checkRemovePointerTrackingEventListeners(),this._eElement.removeEventListener("pointerdown",this._pointerDownEventListener)}cancelDrag(){this.processDragStop(void 0)}onPointerDown(t){if(this._allowableTargets.includes(t.target)&&t.isPrimary){const e=this.getPointerCoordinates(t);this.processPointerDown(e)}}processPointerDown(t){this._nOriginalX=t.x,this._nOriginalY=t.y,this._oDocument.addEventListener("pointermove",this._pointerMoveEventListener),this._oDocument.addEventListener("pointerup",this._pointerUpEventListener,{passive:!0}),this._pointerTracking=!0,this._timeout=setTimeout((()=>{try{this.startDrag()}catch(t){throw console.error(t),t}}),this._nDelay)}onPointerMove(t){this._pointerTracking&&(this.processDragMove(t),t.preventDefault())}processDragMove(t){this._nX=t.pageX-this._nOriginalX,this._nY=t.pageY-this._nOriginalY,!1===this._dragging&&(Math.abs(this._nX)>this._nDistance||Math.abs(this._nY)>this._nDistance)&&this.startDrag(),this._dragging&&this.emit("drag",this._nX,this._nY,t)}onPointerUp(t){this.processDragStop(t)}processDragStop(t){var e;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this.checkRemovePointerTrackingEventListeners(),!0===this._dragging&&(this._eBody.classList.remove("lm_dragging"),this._eElement.classList.remove("lm_dragging"),null===(e=this._oDocument.querySelector("iframe"))||void 0===e||e.style.setProperty("pointer-events",""),this._dragging=!1,this.emit("dragStop",t))}checkRemovePointerTrackingEventListeners(){this._pointerTracking&&(this._oDocument.removeEventListener("pointermove",this._pointerMoveEventListener),this._oDocument.removeEventListener("pointerup",this._pointerUpEventListener),this._pointerTracking=!1)}startDrag(){var t;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this._dragging=!0,this._eBody.classList.add("lm_dragging"),this._eElement.classList.add("lm_dragging"),null===(t=this._oDocument.querySelector("iframe"))||void 0===t||t.style.setProperty("pointer-events","none"),this.emit("dragStart",this._nOriginalX,this._nOriginalY)}getPointerCoordinates(t){return{x:t.pageX,y:t.pageY}}}class qt{constructor(t,e,i){this._isVertical=t,this._size=e,this._grabSize=i0){const i=this.createSplitter(Math.max(0,e-1)).element;e>0?(this.contentItems[e-1].element.insertAdjacentElement("afterend",i),i.insertAdjacentElement("afterend",t.element)):(this.contentItems[0].element.insertAdjacentElement("beforebegin",i),i.insertAdjacentElement("beforebegin",t.element))}else this._childElementContainer.appendChild(t.element);super.addChild(t,e);const n=1/this.contentItems.length*100;if(!0===i)return this.emitBaseBubblingEvent("stateChanged"),e;for(let e=0;e0&&(this.calculateRelativeSizes(),this.setAbsoluteSizes()),this.emitBaseBubblingEvent("stateChanged"),this.emit("resize")}setAbsoluteSizes(){const t=this.calculateAbsoluteSizes();for(let e=0;e0&&t.itemSizes[e]++,this._isColumn?(Tt(this.contentItems[e].element,t.crossAxisSize),At(this.contentItems[e].element,t.itemSizes[e])):(Tt(this.contentItems[e].element,t.itemSizes[e]),At(this.contentItems[e].element,t.crossAxisSize))}calculateAbsoluteSizes(){const t=(this.contentItems.length-1)*this._splitterSize,{width:e,height:i}=kt(this.element);let n,o;this._isColumn?(n=i-t,o=e):(n=e-t,o=i);let s=0;const r=[];for(let t=0;t0){const n=100-t;for(let t=0;t100&&e.length>0){for(let t=0;te)return;{const r=i/e;let a=i;for(let e=0;ethis.onSplitterDrag(e,t,i))),e.on("dragStop",(()=>this.onSplitterDragStop(e))),e.on("dragStart",(()=>this.onSplitterDragStart(e))),this._splitter.splice(t,0,e),e}getSplitItems(t){const e=this._splitter.indexOf(t);return{before:this.contentItems[e],after:this.contentItems[e+1]}}calculateContentItemMinSize(t){const e=t.minSize;if(void 0!==e){if(t.minSizeUnit===ht.Pixel)return e;throw new X("ROCGMD98831",JSON.stringify(t))}{const t=this.layoutManager.layoutConfig.dimensions;return this._isColumn?t.defaultMinItemHeight:t.defaultMinItemWidth}}calculateContentItemsTotalMinSize(t){let e=0;for(const i of t)e+=this.calculateContentItemMinSize(i);return e}onSplitterDragStart(t){const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=this.calculateContentItemsTotalMinSize(e.before.contentItems),s=this.calculateContentItemsTotalMinSize(e.after.contentItems);this._splitterPosition=0,this._splitterMinPosition=-1*(i-o),this._splitterMaxPosition=n-s}onSplitterDrag(t,e,i){let n=this._isColumn?i:e;if(null===this._splitterMinPosition||null===this._splitterMaxPosition)throw new K("ROCOSD59226");n=Math.max(n,this._splitterMinPosition),n=Math.min(n,this._splitterMaxPosition),this._splitterPosition=n;const o=zt(n);this._isColumn?t.element.style.top=o:t.element.style.left=o}onSplitterDragStop(t){if(null===this._splitterPosition)throw new K("ROCOSDS66932");{const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=(this._splitterPosition+i)/(i+n),s=e.before.size+e.after.size;e.before.size=o*s,e.after.size=(1-o)*s,t.element.style.top=zt(0),t.element.style.left=zt(0),globalThis.requestAnimationFrame((()=>this.updateSize(!1)))}}}!function(t){t.getElementDimensionSize=function(t,e){return"width"===e?function(t){return t.offsetWidth}(t):function(t){return t.offsetHeight}(t)},t.setElementDimensionSize=function(t,e,i){return"width"===e?Tt(t,i):At(t,i)},t.createElement=function(t,e){const i=t.createElement("div");return i.classList.add("lm_item"),e?i.classList.add("lm_column"):i.classList.add("lm_row"),i}}(Xt||(Xt={}));class Yt extends $t{constructor(t,e,i){super(t,vt.create(e),null,Yt.createElement(document)),this.isGround=!0,this._childElementContainer=this.element,this._containerElement=i;let n=null;for(;;){const t=n?n.previousSibling:this._containerElement.lastChild;if(!(t instanceof Element&&t.classList.contains("lm_content")))break;n=t}this._containerElement.insertBefore(this.element,n)}init(){if(!0!==this.isInitialised){this.updateNodeSize();for(let t=0;t0?this.contentItems[0]:this,n.isComponent)throw new Error("Cannot add item as child to ComponentItem");{const t=this.layoutManager.createAndInitContentItem(i,n);return e=n.addChild(t,e),n===this?-1:e}}loadComponentAsRoot(t){this.clearRoot();const e=Ct.resolve(t,!1);if(e.maximised)throw new Error("Root Component cannot be maximised");{const t=new jt(this.layoutManager,e,this);t.init(),this.addChild(t,0)}}addChild(t,e){if(this.contentItems.length>0)throw new Error("Ground node can only have a single child");return this._childElementContainer.appendChild(t.element),e=super.addChild(t,e),this.updateSize(!1),this.emitBaseBubblingEvent("stateChanged"),e}calculateConfigContent(){const t=this.contentItems,e=t.length,i=new Array(e);for(let n=0;n0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e)),this.updateContentItemsSize(!1))}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}createSideAreas(){const t=Yt.Area.oppositeSides,e=new Array(Object.keys(t).length);let i=0;for(const n in t){const o=n,s=this.getElementArea();if(null===s)throw new K("RCSA77553");s.side=o,"2"===t[o][1]?s[o]=s[t[o]]-50:s[o]=s[t[o]]+50,s.surface=(s.x2-s.x1)*(s.y2-s.y1),e[i++]=s}return e}highlightDropZone(t,e,i){this.layoutManager.tabDropPlaceholder.remove(),super.highlightDropZone(t,e,i)}onDrop(t,e){if(t.isComponent){const e=ut.createDefault(),i=t;e.header=mt.Header.createCopy(i.headerConfig);const n=this.layoutManager.createAndInitContentItem(e,this);n.addChild(t),t=n}if(0===this.contentItems.length)this.addChild(t);else{if(t.type===at.row||t.type===at.column){const e=ut.createDefault(),i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}const i="x"==e.side[0]?at.row:at.column,n="2"==e.side[1],o=this.contentItems[0];if(o instanceof Xt&&o.type===i){const e=o.contentItems[n?0:o.contentItems.length-1];o.addChild(t,n?0:void 0,!0),e.size*=.5,t.size=e.size,t.sizeUnit=ht.Percent,o.updateSize(!1)}else{const e=ct.createDefault(i),s=this.layoutManager.createContentItem(e,this);this.replaceChild(o,s),s.addChild(t,n?0:void 0,!0),s.addChild(o,n?void 0:0,!0),o.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}}dock(){throw new X("GID87731")}validateDocking(){throw new X("GIVD87732")}getAllContentItems(){const t=[this];return this.deepGetAllContentItems(this.contentItems,t),t}getConfigMaximisedItems(){const t=[];return this.deepFilterContentItems(this.contentItems,t,(t=>!(!Gt.isStack(t)||!t.initialWantMaximise)||!(!Gt.isComponentItem(t)||!t.initialWantMaximise))),t}getItemsByPopInParentId(t){const e=[];return this.deepFilterContentItems(this.contentItems,e,(e=>e.popInParentIds.includes(t))),e}toConfig(){throw new Error("Cannot generate GroundItem config")}setActiveComponentItem(t,e,i){}updateNodeSize(){const{width:t,height:e}=kt(this._containerElement);Tt(this.element,t),At(this.element,e),this.contentItems.length>0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e))}deepGetAllContentItems(t,e){for(let i=0;ithis.onClick(t),this._touchStartEventListener=t=>this.onTouchStart(t),this._element=document.createElement("div"),this._element.classList.add(i),this._element.title=e,this._header.on("destroy",(()=>this.destroy())),this._element.addEventListener("click",this._clickEventListener,{passive:!0}),this._element.addEventListener("touchstart",this._touchStartEventListener,{passive:!0}),this._header.controlsContainerElement.appendChild(this._element)}get element(){return this._element}destroy(){var t;this._element.removeEventListener("click",this._clickEventListener),this._element.removeEventListener("touchstart",this._touchStartEventListener),null===(t=this._element.parentNode)||void 0===t||t.removeChild(this._element)}onClick(t){this._pushEvent(t)}onTouchStart(t){this._pushEvent(t)}}class Jt{constructor(t,e,i,n,o){var s;this._layoutManager=t,this._componentItem=e,this._closeEvent=i,this._focusEvent=n,this._dragStartEvent=o,this._isActive=!1,this._tabClickListener=t=>this.onTabClickDown(t),this._tabTouchStartListener=t=>this.onTabTouchStart(t),this._closeClickListener=()=>this.onCloseClick(),this._closeTouchStartListener=()=>this.onCloseTouchStart(),this._dragStartListener=(t,e)=>this.onDragStart(t,e),this._contentItemDestroyListener=()=>this.onContentItemDestroy(),this._tabTitleChangedListener=t=>this.setTitle(t),this._element=document.createElement("div"),this._element.classList.add("lm_tab"),this._titleElement=document.createElement("span"),this._titleElement.classList.add("lm_title"),this._closeElement=document.createElement("div"),this._closeElement.classList.add("lm_close_tab"),this._element.appendChild(this._titleElement),this._element.appendChild(this._closeElement),e.isClosable?this._closeElement.style.display="":this._closeElement.style.display="none",this.setTitle(e.title),this._componentItem.on("titleChanged",this._tabTitleChangedListener);(null!==(s=e.reorderEnabled)&&void 0!==s?s:this._layoutManager.layoutConfig.settings.reorderEnabled)&&this.enableReorder(),this._element.addEventListener("click",this._tabClickListener,{passive:!0}),this._element.addEventListener("touchstart",this._tabTouchStartListener,{passive:!0}),this._componentItem.isClosable?(this._closeElement.addEventListener("click",this._closeClickListener,{passive:!0}),this._closeElement.addEventListener("touchstart",this._closeTouchStartListener,{passive:!0})):(this._closeElement.remove(),this._closeElement=void 0),this._componentItem.setTab(this),this._layoutManager.emit("tabCreated",this)}get isActive(){return this._isActive}get componentItem(){return this._componentItem}get contentItem(){return this._componentItem}get element(){return this._element}get titleElement(){return this._titleElement}get closeElement(){return this._closeElement}get reorderEnabled(){return void 0!==this._dragListener}set reorderEnabled(t){t!==this.reorderEnabled&&(t?this.enableReorder():this.disableReorder())}setTitle(t){this._titleElement.innerText=t,this._element.title=t}setActive(t){t!==this._isActive&&(this._isActive=t,t?this._element.classList.add("lm_active"):this._element.classList.remove("lm_active"))}destroy(){var t,e;this._closeEvent=void 0,this._focusEvent=void 0,this._dragStartEvent=void 0,this._element.removeEventListener("click",this._tabClickListener),this._element.removeEventListener("touchstart",this._tabTouchStartListener),null===(t=this._closeElement)||void 0===t||t.removeEventListener("click",this._closeClickListener),null===(e=this._closeElement)||void 0===e||e.removeEventListener("touchstart",this._closeTouchStartListener),this._componentItem.off("titleChanged",this._tabTitleChangedListener),this.reorderEnabled&&this.disableReorder(),this._element.remove()}setBlurred(){this._element.classList.remove("lm_focused"),this._titleElement.classList.remove("lm_focused")}setFocused(){this._element.classList.add("lm_focused"),this._titleElement.classList.add("lm_focused")}onDragStart(t,e){if(void 0===this._dragListener)throw new J("TODSDLU10093");if(void 0===this._dragStartEvent)throw new J("TODS23309");this._dragStartEvent(t,e,this._dragListener,this.componentItem)}onContentItemDestroy(){void 0!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=void 0)}onTabClickDown(t){const e=t.target;e!==this._element&&e!==this._titleElement||(0===t.button?this.notifyFocus():1===t.button&&this._componentItem.isClosable&&this.notifyClose())}onTabTouchStart(t){t.target===this._element&&this.notifyFocus()}onCloseClick(){this.notifyClose()}onCloseTouchStart(){this.notifyClose()}notifyClose(){if(void 0===this._closeEvent)throw new J("TNC15007");this._closeEvent(this._componentItem)}notifyFocus(){if(void 0===this._focusEvent)throw new J("TNA15007");this._focusEvent(this._componentItem)}enableReorder(){this._dragListener=new Zt(this._element,[this._titleElement]),this._dragListener.on("dragStart",this._dragStartListener),this._componentItem.on("destroy",this._contentItemDestroyListener)}disableReorder(){if(void 0===this._dragListener)throw new J("TDR87745");this._componentItem.off("destroy",this._contentItemDestroyListener),this._dragListener.off("dragStart",this._dragStartListener),this._dragListener=void 0}}class Qt{constructor(t,e,i,n,o){this._layoutManager=t,this._componentRemoveEvent=e,this._componentFocusEvent=i,this._componentDragStartEvent=n,this._dropdownActiveChangedEvent=o,this._tabs=[],this._lastVisibleTabIndex=-1,this._dropdownActive=!1,this._element=document.createElement("section"),this._element.classList.add("lm_tabs"),this._dropdownElement=document.createElement("section"),this._dropdownElement.classList.add("lm_tabdropdown_list"),this._dropdownElement.style.display="none"}get tabs(){return this._tabs}get tabCount(){return this._tabs.length}get lastVisibleTabIndex(){return this._lastVisibleTabIndex}get element(){return this._element}get dropdownElement(){return this._dropdownElement}get dropdownActive(){return this._dropdownActive}destroy(){for(let t=0;tthis.handleTabCloseEvent(t)),(t=>this.handleTabFocusEvent(t)),((t,e,i,n)=>this.handleTabDragStartEvent(t,e,i,n)));void 0===e&&(e=this._tabs.length),this._tabs.splice(e,0,i),ethis._lastVisibleTabIndex){const t=this._tabs[e];for(let t=e;t>0;t--)this._tabs[t]=this._tabs[t-1];this._tabs[0]=t}}updateTabSizes(t,e){let i=!1;this.tryUpdateTabSizes(i,t,e)||(i=!0,this.tryUpdateTabSizes(i,t,e)),i!==this._dropdownActive&&(this._dropdownActive=i,this._dropdownActiveChangedEvent())}tryUpdateTabSizes(t,e,i){if(this._tabs.length>0){if(void 0===i)throw new Error("non-empty tabs must have active component item");let n=0,o=!1;const s=this._layoutManager.layoutConfig.settings.tabOverlapAllowance,r=this._tabs.indexOf(i.tab),a=this._tabs[r];this._lastVisibleTabIndex=-1;for(let i=0;ie){if(o)i===r&&(l.style.zIndex="auto",l.style.marginLeft="",l.parentElement!==this._element&&this._element.appendChild(l));else{let t;if(t=r>0&&r<=i?(d-e)/(i-1):(d-e)/i,tthis.onClick(t),this._touchStartListener=t=>this.onTouchStart(t),this._rowColumnClosable=!0,this._closeButton=null,this._popoutButton=null,this._tabsContainer=new Qt(this._layoutManager,(t=>this.handleTabInitiatedComponentRemoveEvent(t)),(t=>this.handleTabInitiatedComponentFocusEvent(t)),((t,e,i,n)=>this.handleTabInitiatedDragStartEvent(t,e,i,n)),(()=>this.processTabDropdownActiveChanged())),this._show=i.show,this._popoutEnabled=i.popoutEnabled,this._popoutLabel=i.popoutLabel,this._maximiseEnabled=i.maximiseEnabled,this._maximiseLabel=i.maximiseLabel,this._minimiseEnabled=i.minimiseEnabled,this._minimiseLabel=i.minimiseLabel,this._closeEnabled=i.closeEnabled,this._closeLabel=i.closeLabel,this._tabDropdownEnabled=i.tabDropdownEnabled,this._tabDropdownLabel=i.tabDropdownLabel,this.setSide(i.side),this._canRemoveComponent=this._configClosable,this._element=document.createElement("section"),this._element.classList.add("lm_header"),this._controlsContainerElement=document.createElement("section"),this._controlsContainerElement.classList.add("lm_controls"),this._element.appendChild(this._tabsContainer.element),this._element.appendChild(this._controlsContainerElement),this._element.appendChild(this._tabsContainer.dropdownElement),this._element.addEventListener("click",this._clickListener,{passive:!0}),this._element.addEventListener("touchstart",this._touchStartListener,{passive:!0}),this._documentMouseUpListener=()=>this._tabsContainer.hideAdditionalTabsDropdown(),globalThis.document.addEventListener("mouseup",this._documentMouseUpListener,{passive:!0}),this._tabControlOffset=this._layoutManager.layoutConfig.settings.tabControlOffset,this._tabDropdownEnabled&&(this._tabDropdownButton=new Kt(this,this._tabDropdownLabel,"lm_tabdropdown",(()=>this._tabsContainer.showAdditionalTabsDropdown()))),this._popoutEnabled&&(this._popoutButton=new Kt(this,this._popoutLabel,"lm_popout",(()=>this.handleButtonPopoutEvent()))),this._maximiseEnabled&&(this._maximiseButton=new Kt(this,this._maximiseLabel,"lm_maximise",(t=>this.handleButtonMaximiseToggleEvent(t)))),this._configClosable&&(this._closeButton=new Kt(this,this._closeLabel,"lm_close",(()=>s()))),this.processTabDropdownActiveChanged()}get show(){return this._show}get side(){return this._side}get leftRightSided(){return this._leftRightSided}get layoutManager(){return this._layoutManager}get parent(){return this._parent}get tabs(){return this._tabsContainer.tabs}get lastVisibleTabIndex(){return this._tabsContainer.lastVisibleTabIndex}get element(){return this._element}get tabsContainerElement(){return this._tabsContainer.element}get controlsContainerElement(){return this._controlsContainerElement}destroy(){this.emit("destroy"),this._popoutEvent=void 0,this._maximiseToggleEvent=void 0,this._clickEvent=void 0,this._touchStartEvent=void 0,this._componentRemoveEvent=void 0,this._componentFocusEvent=void 0,this._componentDragStartEvent=void 0,this._tabsContainer.destroy(),globalThis.document.removeEventListener("mouseup",this._documentMouseUpListener),this._element.remove()}createTab(t,e){this._tabsContainer.createTab(t,e)}removeTab(t){this._tabsContainer.removeTab(t)}processActiveComponentChanged(t){this._tabsContainer.processActiveComponentChanged(t),this.updateTabSizes()}setSide(t){this._side=t,this._leftRightSided=[nt.right,nt.left].includes(this._side)}setRowColumnClosable(t){this._rowColumnClosable=t,this.updateClosability()}updateClosability(){let t;if(this._configClosable)if(this._rowColumnClosable){t=!0;const e=this.tabs.length;for(let i=0;i1}applyFocusedValue(t){t?this._element.classList.add("lm_focused"):this._element.classList.remove("lm_focused")}processMaximised(){if(void 0===this._maximiseButton)throw new J("HPMAX16997");this._maximiseButton.element.setAttribute("title",this._minimiseLabel)}processMinimised(){if(void 0===this._maximiseButton)throw new J("HPMIN16997");this._maximiseButton.element.setAttribute("title",this._maximiseLabel)}updateTabSizes(){if(this._tabsContainer.tabCount>0){const t=this._show?this._layoutManager.layoutConfig.dimensions.headerHeight:0;let e;this._leftRightSided?(this._element.style.height="",this._element.style.width=zt(t)):(this._element.style.width="",this._element.style.height=zt(t)),e=this._leftRightSided?this._element.offsetHeight-this._controlsContainerElement.offsetHeight-this._tabControlOffset:this._element.offsetWidth-this._controlsContainerElement.offsetWidth-this._tabControlOffset,this._tabsContainer.updateTabSizes(e,this._getActiveComponentItemEvent())}}handleTabInitiatedComponentRemoveEvent(t){if(this._canRemoveComponent){if(void 0===this._componentRemoveEvent)throw new J("HHTCE22294");this._componentRemoveEvent(t)}}handleTabInitiatedComponentFocusEvent(t){if(void 0===this._componentFocusEvent)throw new J("HHTAE22294");this._componentFocusEvent(t)}handleTabInitiatedDragStartEvent(t,e,i,n){if(this._canRemoveComponent){if(void 0===this._componentDragStartEvent)throw new J("HHTDSE22294");this._componentDragStartEvent(t,e,i,n)}else i.cancelDrag()}processTabDropdownActiveChanged(){void 0!==this._tabDropdownButton&&Dt(this._tabDropdownButton.element,this._tabsContainer.dropdownActive)}handleButtonPopoutEvent(){if(this._layoutManager.layoutConfig.settings.popoutWholeStack){if(void 0===this._popoutEvent)throw new J("HHBPOE17834");this._popoutEvent()}else{const t=this._getActiveComponentItemEvent();t&&t.popout()}}handleButtonMaximiseToggleEvent(t){if(void 0===this._maximiseToggleEvent)throw new J("HHBMTE16834");this._maximiseToggleEvent()}onClick(t){t.target===this._element&&this.notifyClick(t)}onTouchStart(t){t.target===this._element&&this.notifyTouchStart(t)}notifyClick(t){if(void 0===this._clickEvent)throw new J("HNHC46834");this._clickEvent(t)}notifyTouchStart(t){if(void 0===this._touchStartEvent)throw new J("HNHTS46834");this._touchStartEvent(t)}}class ee extends $t{constructor(t,e,i){var n,o,s,r,a,l,h,d,c,m,u,p,g,f,v,_,y,C,w;super(t,e,i,ee.createElement(document)),this._headerSideChanged=!1,this._resizeListener=()=>this.handleResize(),this._maximisedListener=()=>this.handleMaximised(),this._minimisedListener=()=>this.handleMinimised(),this._headerConfig=e.header;const I=t.layoutConfig.header,b=e.content;let S;if(1!==b.length)S=void 0;else{S=b[0].header}this._initialWantMaximise=e.maximised,this._initialActiveItemIndex=null!==(n=e.activeItemIndex)&&void 0!==n?n:0;const E=null!==(r=null!==(s=null===(o=this._headerConfig)||void 0===o?void 0:o.show)&&void 0!==s?s:null==S?void 0:S.show)&&void 0!==r?r:I.show,x=null!==(h=null!==(l=null===(a=this._headerConfig)||void 0===a?void 0:a.popout)&&void 0!==l?l:null==S?void 0:S.popout)&&void 0!==h?h:I.popout,L=null!==(m=null!==(c=null===(d=this._headerConfig)||void 0===d?void 0:d.maximise)&&void 0!==c?c:null==S?void 0:S.maximise)&&void 0!==m?m:I.maximise,z=null!==(g=null!==(p=null===(u=this._headerConfig)||void 0===u?void 0:u.close)&&void 0!==p?p:null==S?void 0:S.close)&&void 0!==g?g:I.close,M=null!==(_=null!==(v=null===(f=this._headerConfig)||void 0===f?void 0:f.minimise)&&void 0!==v?v:null==S?void 0:S.minimise)&&void 0!==_?_:I.minimise,P=null!==(w=null!==(C=null===(y=this._headerConfig)||void 0===y?void 0:y.tabDropdown)&&void 0!==C?C:null==S?void 0:S.tabDropdown)&&void 0!==w?w:I.tabDropdown;this._maximisedEnabled=!1!==L;const T={show:!1!==E,side:!1===E?nt.top:E,popoutEnabled:!1!==x,popoutLabel:!1===x?"":x,maximiseEnabled:this._maximisedEnabled,maximiseLabel:!1===L?"":L,closeEnabled:!1!==z,closeLabel:!1===z?"":z,minimiseEnabled:!0,minimiseLabel:M,tabDropdownEnabled:!1!==P,tabDropdownLabel:!1===P?"":P};this._header=new te(t,this,T,e.isClosable&&!1!==z,(()=>this.getActiveComponentItem()),(()=>this.remove()),(()=>this.handlePopoutEvent()),(()=>this.toggleMaximise()),(t=>this.handleHeaderClickEvent(t)),(t=>this.handleHeaderTouchStartEvent(t)),(t=>this.handleHeaderComponentRemoveEvent(t)),(t=>this.handleHeaderComponentFocusEvent(t)),((t,e,i,n)=>this.handleHeaderComponentStartDragEvent(t,e,i,n))),this.isStack=!0,this._childElementContainer=document.createElement("section"),this._childElementContainer.classList.add("lm_items"),this.on("resize",this._resizeListener),this._maximisedEnabled&&(this.on("maximised",this._maximisedListener),this.on("minimised",this._minimisedListener)),this.element.appendChild(this._header.element),this.element.appendChild(this._childElementContainer),this.setupHeaderPosition(),this._header.updateClosability()}get childElementContainer(){return this._childElementContainer}get header(){return this._header}get headerShow(){return this._header.show}get headerSide(){return this._header.side}get headerLeftRightSided(){return this._header.leftRightSided}get contentAreaDimensions(){return this._contentAreaDimensions}get initialWantMaximise(){return this._initialWantMaximise}get isMaximised(){return this===this.layoutManager.maximisedStack}get stackParent(){if(!this.parent)throw new Error("Stack should always have a parent");return this.parent}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}init(){if(!0===this.isInitialised)return;this.updateNodeSize();for(let t=0;t0){if(this._initialActiveItemIndex<0||this._initialActiveItemIndex>=e)throw new Error(`ActiveItemIndex out of range: ${this._initialActiveItemIndex} id: ${this.id}`);for(let i=0;ithis.contentItems.length)throw e-=1,new X("SAC99728");if(t instanceof jt)return e=super.addChild(t,e),this._childElementContainer.appendChild(t.element),this._header.createTab(t,e),this.setActiveComponentItem(t,i),this._header.updateTabSizes(),this.updateSize(!1),t.container.setBaseLogicalZIndex(),this._header.updateClosability(),this.emitStateChangedEvent(),e;throw new X("SACC88532")}removeChild(t,e){const i=t,n=this.contentItems.indexOf(i),o=1===this.contentItems.length;if(this._activeComponentItem===i&&(i.focused&&i.blur(),!o)){const t=0===n?1:n-1;this.setActiveComponentItem(this.contentItems[t],!1)}this._header.removeTab(i),super.removeChild(i,e),o||this._header.updateClosability(),this.emitStateChangedEvent()}toggleMaximise(){this.isMaximised?this.minimise():this.maximise()}maximise(){if(!this.isMaximised){this.layoutManager.setMaximisedStack(this);const t=this.contentItems,e=t.length;for(let i=0;i0&&void 0===t)throw new Error("expected non-empty stack to have an active component item");return{type:"stack",content:this.calculateConfigContent(),size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,isClosable:this.isClosable,maximised:this.isMaximised,header:this.createHeaderConfig(),activeItemIndex:t}}onDrop(t,e){if("header"===this._dropSegment){if(this.resetHeaderDropZone(),void 0===this._dropIndex)throw new J("SODDI68990");return void this.addChild(t,this._dropIndex)}if("body"===this._dropSegment)return void this.addChild(t,0,!0);const i="top"===this._dropSegment||"bottom"===this._dropSegment,n="left"===this._dropSegment||"right"===this._dropSegment,o="top"===this._dropSegment||"left"===this._dropSegment,s=i&&this.stackParent.isColumn||n&&this.stackParent.isRow;if(t.isComponent){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createAndInitContentItem(e,this);i.addChild(t),t=i}if(t.type===at.row||t.type===at.column){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}if(s){const e=this.stackParent.contentItems.indexOf(this);this.stackParent.addChild(t,o?e:e+1,!0),this.size*=.5,t.size=this.size,t.sizeUnit=this.sizeUnit,this.stackParent.updateSize(!1)}else{const e=i?at.column:at.row,n=ct.createDefault(e),s=this.layoutManager.createContentItem(n,this);this.stackParent.replaceChild(this,s),s.addChild(t,o?0:void 0,!0),s.addChild(this,o?void 0:0,!0),this.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}highlightDropZone(t,e){for(const i in this._contentAreaDimensions){const n=i,o=this._contentAreaDimensions[n].hoverArea;if(o.x1t&&o.y1e)return void("header"===n?(this._dropSegment="header",this.highlightHeaderDropZone(this._header.leftRightSided?e:t)):(this.resetHeaderDropZone(),this.highlightBodyDropZone(n)))}}getArea(){if("none"===this.element.style.display)return null;const t=super.getElementArea(this._header.element),e=super.getElementArea(this._childElementContainer);if(null===t||null===e)throw new K("SGAHC13086");const i=e.x2-e.x1,n=e.y2-e.y1;return this._contentAreaDimensions={header:{hoverArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2},highlightArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2}}},0===this.contentItems.length?(this._contentAreaDimensions.body={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2}},super.getElementArea(this.element)):(this._contentAreaDimensions.left={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x1+.25*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x1+.5*i,y2:e.y2}},this._contentAreaDimensions.top={hoverArea:{x1:e.x1+.25*i,y1:e.y1,x2:e.x1+.75*i,y2:e.y1+.5*n},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y1+.5*n}},this._contentAreaDimensions.right={hoverArea:{x1:e.x1+.75*i,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1+.5*i,y1:e.y1,x2:e.x2,y2:e.y2}},this._contentAreaDimensions.bottom={hoverArea:{x1:e.x1+.25*i,y1:e.y1+.5*n,x2:e.x1+.75*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1+.5*n,x2:e.x2,y2:e.y2}},super.getElementArea(this.element))}positionHeader(t){this._header.side!==t&&(this._header.setSide(t),this._headerSideChanged=!0,this.setupHeaderPosition())}updateNodeSize(){if("none"!==this.element.style.display){const t=kt(this.element);if(this._header.show){t[this._header.leftRightSided?it.width:it.height]-=this.layoutManager.layoutConfig.dimensions.headerHeight}this._childElementContainer.style.width=zt(t.width),this._childElementContainer.style.height=zt(t.height);for(let e=0;e=o&&tthis.onDrag(t,e,i))),this._dragListener.on("dragStop",(()=>this.onDrop())),this.createDragProxyElements(t,e),null===this._componentItem.parent)throw new K("DPC10097");this._componentItemFocused=this._componentItem.focused,this._componentItemFocused&&this._componentItem.blur(),this._componentItem.parent.removeChild(this._componentItem,!0),this.setDimensions(),document.body.appendChild(this._element),this.determineMinMaxXY(),this._layoutManager.calculateItemAreas(),this.setDropPosition(t,e)}get element(){return this._element}createDragProxyElements(t,e){this._element=document.createElement("div"),this._element.classList.add("lm_dragProxy");const i=document.createElement("div");i.classList.add("lm_header");const n=document.createElement("div");n.classList.add("lm_tabs");const o=document.createElement("div");o.classList.add("lm_tab");const s=document.createElement("span");s.classList.add("lm_title"),o.appendChild(s),n.appendChild(o),i.appendChild(n),this._proxyContainerElement=document.createElement("div"),this._proxyContainerElement.classList.add("lm_content"),this._element.appendChild(i),this._element.appendChild(this._proxyContainerElement),this._originalParent instanceof ee&&this._originalParent.headerShow&&(this._sided=this._originalParent.headerLeftRightSided,this._element.classList.add("lm_"+this._originalParent.headerSide),[nt.right,nt.bottom].indexOf(this._originalParent.headerSide)>=0&&this._proxyContainerElement.insertAdjacentElement("afterend",i)),this._element.style.left=zt(t),this._element.style.top=zt(e),o.setAttribute("title",this._componentItem.title),s.insertAdjacentText("afterbegin",this._componentItem.title),this._proxyContainerElement.appendChild(this._componentItem.element)}determineMinMaxXY(){const t=this._layoutManager.groundItem;if(void 0===t)throw new J("DPDMMXY73109");{const e=t.element.getBoundingClientRect();this._minX=e.left+document.body.scrollLeft,this._minY=e.top+document.body.scrollTop,this._maxX=this._minX+e.width,this._maxY=this._minY+e.height}}onDrag(t,e,i){const n=i.pageX,o=i.pageY;this.setDropPosition(n,o),this._componentItem.drag()}setDropPosition(t,e){this._layoutManager.layoutConfig.settings.constrainDragToContainer&&(t<=this._minX?t=Math.ceil(this._minX):t>=this._maxX&&(t=Math.floor(this._maxX)),e<=this._minY?e=Math.ceil(this._minY):e>=this._maxY&&(e=Math.floor(this._maxY))),this._element.style.left=zt(t),this._element.style.top=zt(e),this._area=this._layoutManager.getArea(t,e),null!==this._area&&(this._lastValidArea=this._area,this._area.contentItem.highlightDropZone(t,e,this._area))}onDrop(){const t=this._layoutManager.dropTargetIndicator;if(null===t)throw new K("DPOD30011");let e;if(t.hide(),this._componentItem.exitDragMode(),null!==this._area)e=this._componentItem,this._area.contentItem.onDrop(e,this._area);else if(null!==this._lastValidArea){e=this._componentItem;this._lastValidArea.contentItem.onDrop(e,this._lastValidArea)}else this._originalParent?(e=this._componentItem,this._originalParent.addChild(e)):this._componentItem.destroy();this._element.remove(),this._layoutManager.emit("itemDropped",this._componentItem),this._componentItemFocused&&void 0!==e&&e.focus()}setDimensions(){const t=this._layoutManager.layoutConfig.dimensions;if(void 0===t)throw new Error("DragProxy.setDimensions: dimensions undefined");let e=t.dragProxyWidth,i=t.dragProxyHeight;if(void 0===e||void 0===i)throw new Error("DragProxy.setDimensions: width and/or height undefined");const n=!1===this._layoutManager.layoutConfig.header.show?0:t.headerHeight;this._element.style.width=zt(e),this._element.style.height=zt(i),e-=this._sided?n:0,i-=this._sided?0:n,this._proxyContainerElement.style.width=zt(e),this._proxyContainerElement.style.height=zt(i),this._componentItem.enterDragMode(e,i),this._componentItem.show()}}class ne{constructor(t,e,i,n,o,s,r){this._layoutManager=t,this._element=e,this._extraAllowableChildTargets=i,this._componentTypeOrFtn=n,this._componentState=o,this._title=s,this._id=r,this._dragListener=null,this._dummyGroundContainer=document.createElement("div");const a=gt.createDefault("row");this._dummyGroundContentItem=new Yt(this._layoutManager,a,this._dummyGroundContainer),this.createDragListener()}destroy(){this.removeDragListener()}createDragListener(){this.removeDragListener(),this._dragListener=new Zt(this._element,this._extraAllowableChildTargets),this._dragListener.on("dragStart",((t,e)=>this.onDragStart(t,e))),this._dragListener.on("dragStop",(()=>this.onDragStop()))}onDragStart(t,e){var i;const n="component";let o;if("function"==typeof this._componentTypeOrFtn){const t=this._componentTypeOrFtn();o=ne.isDragSourceComponentItemConfig(t)?{type:n,componentState:t.state,componentType:t.type,title:null!==(i=t.title)&&void 0!==i?i:this._title}:t}else o={type:n,componentState:this._componentState,componentType:this._componentTypeOrFtn,title:this._title,id:this._id};const s=bt.resolve(o,!1),r=new jt(this._layoutManager,s,this._dummyGroundContentItem);if(this._dummyGroundContentItem.contentItems.push(r),null===this._dragListener)throw new K("DSODSD66746");{const i=new ie(t,e,this._dragListener,this._layoutManager,r,this._dummyGroundContentItem),n=this._layoutManager.transitionIndicator;if(null===n)throw new K("DSODST66746");n.transitionElements(this._element,i.element)}}onDragStop(){this.createDragListener()}removeDragListener(){null!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=null)}}!function(t){t.isDragSourceComponentItemConfig=function(t){return!("componentType"in t)}}(ne||(ne={}));class oe{constructor(){this._element=document.createElement("div"),this._element.classList.add("lm_dropTargetIndicator");const t=document.createElement("div");t.classList.add("lm_inner"),this._element.appendChild(t),document.body.appendChild(this._element)}destroy(){this._element.remove()}highlightArea(t,e){this._element.style.left=zt(t.x1+e),this._element.style.top=zt(t.y1+e),this._element.style.width=zt(t.x2-t.x1-e),this._element.style.height=zt(t.y2-t.y1-e),this._element.style.display="block"}hide(){Dt(this._element,!1)}}class se{constructor(){this._element=document.createElement("div"),this._element.classList.add("lm_transition_indicator"),document.body.appendChild(this._element),this._toElement=null,this._fromDimensions=null,this._totalAnimationDuration=200,this._animationStartTime=null}destroy(){this._element.remove()}transitionElements(t,e){}nextAnimationFrame(){}measure(t){const e=t.getBoundingClientRect();return{left:e.left,top:e.top,width:t.offsetWidth,height:t.offsetHeight}}}class re extends Wt{constructor(t){super(),this._layoutManager=t,this._childEventListener=t=>this.onEventFromChild(t),globalThis.addEventListener(re.ChildEventName,this._childEventListener,{passive:!0})}emit(t,...e){"userBroadcast"===t?this.emitUserBroadcast(...e):super.emit(t,...e)}emitUserBroadcast(...t){this.handleUserBroadcastEvent("userBroadcast",t)}destroy(){globalThis.removeEventListener(re.ChildEventName,this._childEventListener)}handleUserBroadcastEvent(t,e){this._layoutManager.isSubWindow?this.propagateToParent(t,e):this.propagateToThisAndSubtree(t,e)}onEventFromChild(t){const e=t.detail;this.handleUserBroadcastEvent(e.eventName,e.args)}propagateToParent(t,e){const i={bubbles:!0,cancelable:!0,detail:{layoutManager:this._layoutManager,eventName:t,args:e}},n=new CustomEvent(re.ChildEventName,i),o=globalThis.opener;if(null===o)throw new K("EHPTP15778");o.dispatchEvent(n)}propagateToThisAndSubtree(t,e){this.emitUnknown(t,...e);for(let i=0;ithis.handleContainerResize())),this._windowBeforeUnloadListener=()=>this.onBeforeUnload(),this._windowBeforeUnloadListening=!1,this._maximisedStackBeforeDestroyedListener=t=>this.cleanupBeforeMaximisedStackDestroyed(t),this.isSubWindow=t.isSubWindow,this._constructorOrSubWindowLayoutConfig=t.constructorOrSubWindowLayoutConfig,Q.checkInitialise(),dt.checkInitialise(),void 0!==t.containerElement&&(this._containerElement=t.containerElement)}get container(){return this._containerElement}get isInitialised(){return this._isInitialised}get groundItem(){return this._groundItem}get root(){return this._groundItem}get openPopouts(){return this._openPopouts}get dropTargetIndicator(){return this._dropTargetIndicator}get transitionIndicator(){return this._transitionIndicator}get width(){return this._width}get height(){return this._height}get eventHub(){return this._eventHub}get rootItem(){if(void 0===this._groundItem)throw new Error("Cannot access rootItem before init");return 0===this._groundItem.contentItems.length?void 0:this._groundItem.contentItems[0]}get focusedComponentItem(){return this._focusedComponentItem}get tabDropPlaceholder(){return this._tabDropPlaceholder}get maximisedStack(){return this._maximisedStack}get deprecatedConstructor(){return!this.isSubWindow&&void 0!==this._constructorOrSubWindowLayoutConfig}destroy(){if(this._isInitialised){this._windowBeforeUnloadListening&&(globalThis.removeEventListener("beforeunload",this._windowBeforeUnloadListener),this._windowBeforeUnloadListening=!1),!0===this.layoutConfig.settings.closePopoutsOnUnload&&this.closeAllOpenPopouts(),this._resizeObserver.disconnect(),this.checkClearResizeTimeout(),void 0!==this._groundItem&&this._groundItem.destroy(),this._tabDropPlaceholder.remove(),null!==this._dropTargetIndicator&&this._dropTargetIndicator.destroy(),null!==this._transitionIndicator&&this._transitionIndicator.destroy(),this._eventHub.destroy();for(const t of this._dragSources)t.destroy();this._dragSources=[],this._isInitialised=!1}}minifyConfig(t){return _t.minifyConfig(t)}unminifyConfig(t){return _t.unminifyConfig(t)}init(){let t;if(this.setContainer(),this._dropTargetIndicator=new oe,this._transitionIndicator=new se,this.updateSizeFromContainer(),this.isSubWindow){if(void 0===this._constructorOrSubWindowLayoutConfig)throw new J("LMIU07155");{const e=this._constructorOrSubWindowLayoutConfig.root;if(void 0===e)throw new X("LMIC07156");if(!Ct.isComponent(e))throw new X("LMIC07157");t=e;const i=xt.resolve(this._constructorOrSubWindowLayoutConfig);this.layoutConfig=Object.assign(Object.assign({},i),{root:void 0})}}else void 0===this._constructorOrSubWindowLayoutConfig?this.layoutConfig=_t.createDefault():this.layoutConfig=xt.resolve(this._constructorOrSubWindowLayoutConfig);const e=this.layoutConfig;this._groundItem=new Yt(this,e.root,this._containerElement),this._groundItem.init(),this.checkLoadedLayoutMaximiseItem(),this._resizeObserver.observe(this._containerElement),this._isInitialised=!0,this.adjustColumnsResponsive(),this.emit("initialised"),void 0!==t&&this.loadComponentAsRoot(t)}loadLayout(t){if(!this.isInitialised)throw new Error("GoldenLayout: Need to call init() if LayoutConfig with defined root passed to constructor");if(void 0===this._groundItem)throw new J("LMLL11119");this.createSubWindows(),this.layoutConfig=xt.resolve(t),this._groundItem.loadRoot(this.layoutConfig.root),this.checkLoadedLayoutMaximiseItem(),this.adjustColumnsResponsive()}saveLayout(){if(!1===this._isInitialised)throw new Error("Can't create config, layout not yet initialised");if(void 0===this._groundItem)throw new J("LMTC18244");{const t=this._groundItem.calculateConfigContent();let e;e=1!==t.length?void 0:t[0],this.reconcilePopoutWindows();const i=[];for(let t=0;t=0?n=this._groundItem.contentItems[0]:e=0;break;case at.row:case at.column:e=n.addItem(t,i.index);break;case at.stack:if(Ct.isComponent(t)){e=n.addItem(t,i.index);break}throw Error(tt[6]);case at.component:throw new X("LMAIALC87444602");default:throw new Y("LMAIALU98881733",n.type)}if(Ct.isComponent(t)){const t=n.contentItems[e];Gt.isStack(t)&&(n=t,e=0)}return i.parentItem=n,i.index=e,i}}}loadComponentAsRoot(t){if(void 0===this._groundItem)throw new Error("Cannot add item before init");this._groundItem.loadComponentAsRoot(t)}updateSize(t,e){this.setSize(t,e)}setSize(t,e){if(this._width=t,this._height=e,!0===this._isInitialised){if(void 0===this._groundItem)throw new J("LMUS18881");if(this._groundItem.setSize(this._width,this._height),this._maximisedStack){const{width:t,height:e}=kt(this._containerElement);Tt(this._maximisedStack.element,t),At(this._maximisedStack.element,e),this._maximisedStack.updateSize(!1)}this.adjustColumnsResponsive()}}beginSizeInvalidation(){this._sizeInvalidationBeginCount++}endSizeInvalidation(){0==--this._sizeInvalidationBeginCount&&this.updateSizeFromContainer()}updateSizeFromContainer(){const{width:t,height:e}=kt(this._containerElement);this.setSize(t,e)}updateRootSize(t=!1){if(void 0===this._groundItem)throw new J("LMURS28881");this._groundItem.updateSize(t)}createAndInitContentItem(t,e){const i=this.createContentItem(t,e);return i.init(),i}createContentItem(t,e){if("string"!=typeof t.type)throw new G("Missing parameter 'type'",JSON.stringify(t));if(ct.isComponentItem(t)&&!(e instanceof ee)&&e&&!(!0===this.isSubWindow&&e instanceof Yt)){t={type:at.stack,content:[t],size:t.size,sizeUnit:t.sizeUnit,minSize:t.minSize,minSizeUnit:t.minSizeUnit,id:t.id,maximised:t.maximised,isClosable:t.isClosable,activeItemIndex:0,header:void 0}}return this.createContentItemFromConfig(t,e)}findFirstComponentItemById(t){if(void 0===this._groundItem)throw new J("LMFFCIBI82446");return this.findFirstContentItemTypeByIdRecursive(at.component,t,this._groundItem)}createPopout(t,e,i,n){return t instanceof Gt?this.createPopoutFromContentItem(t,e,i,n):this.createPopoutFromItemConfig(t,e,i,n)}createPopoutFromContentItem(t,e,i,n){let o=t.parent,s=t;for(;null!==o&&1===o.contentItems.length&&!o.isGround;)s=o,o=o.parent;if(null===o)throw new K("LMCPFCI00834");{if(void 0===n&&(n=o.contentItems.indexOf(s)),null!==i&&o.addPopInParentId(i),void 0===e){const i=globalThis.screenX||globalThis.screenLeft,n=globalThis.screenY||globalThis.screenTop,o=t.element.offsetLeft,s=t.element.offsetTop,{width:r,height:a}=kt(t.element);e={left:i+o,top:n+s,width:r,height:a}}const r=t.toConfig();if(t.remove(),ft.isRootItemConfig(r))return this.createPopoutFromItemConfig(r,e,i,n);throw new Error(`${tt[0]}`)}}beginVirtualSizedContainerAdding(){0==++this._virtualSizedContainerAddingBeginCount&&(this._virtualSizedContainers.length=0)}addVirtualSizedContainer(t){this._virtualSizedContainers.push(t)}endVirtualSizedContainerAdding(){if(0==--this._virtualSizedContainerAddingBeginCount){const t=this._virtualSizedContainers.length;if(t>0){this.fireBeforeVirtualRectingEvent(t);for(let e=0;ethis.emit("windowOpened",a))),a.on("closed",(()=>this.reconcilePopoutWindows())),this._openPopouts.push(a),this.layoutConfig.settings.closePopoutsOnUnload&&!this._windowBeforeUnloadListening&&(globalThis.addEventListener("beforeunload",this._windowBeforeUnloadListener,{passive:!0}),this._windowBeforeUnloadListening=!0),a}closeAllOpenPopouts(){for(let t=0;tglobalThis.close()),1)}getArea(t,e){let i=null,n=1/0;for(let o=0;o=s.x1&&t=s.y1&&es.surface&&(n=s.surface,i=s)}return i}calculateItemAreas(){const t=this.getAllContentItems(),e=this._groundItem;if(void 0===e)throw new J("LMCIAR44365");if(1!==t.length){e.contentItems[0].isStack?this._itemAreas=[]:this._itemAreas=e.createSideAreas();for(let e=0;e0){let e=t[0];if(Gt.isComponentItem(e)){const t=e.parent;if(null===t)throw new K("LMXLLMI69999");e=t}if(!Gt.isStack(e))throw new X("LMCLLMI19993");e.maximise()}}}processMaximiseStack(t){if(this._maximisedStack=t,t.on("beforeItemDestroyed",this._maximisedStackBeforeDestroyedListener),t.element.classList.add("lm_maximised"),t.element.insertAdjacentElement("afterend",this._maximisePlaceholder),void 0===this._groundItem)throw new J("LMMXI19993");{this._groundItem.element.prepend(t.element);const{width:e,height:i}=kt(this._containerElement);Tt(t.element,e),At(t.element,i),t.updateSize(!0),t.focusActiveContentItem(),this._maximisedStack.emit("maximised"),this.emit("stateChanged")}}processMinimiseMaximisedStack(){if(void 0===this._maximisedStack)throw new X("LMMMS74422");{const t=this._maximisedStack;if(null===t.parent)throw new K("LMMI13668");t.element.classList.remove("lm_maximised"),this._maximisePlaceholder.insertAdjacentElement("afterend",t.element),this._maximisePlaceholder.remove(),this.updateRootSize(!0),this._maximisedStack=void 0,t.off("beforeItemDestroyed",this._maximisedStackBeforeDestroyedListener),t.emit("minimised"),this.emit("stateChanged")}}reconcilePopoutWindows(){const t=[];for(let e=0;e{this._resizeTimeoutId=void 0,this.beginSizeInvalidation(),this.endSizeInvalidation()}),this.resizeDebounceInterval))}checkClearResizeTimeout(){void 0!==this._resizeTimeoutId&&(clearTimeout(this._resizeTimeoutId),this._resizeTimeoutId=void 0)}setContainer(){var t;const e=document.body,i=null!==(t=this._containerElement)&&void 0!==t?t:e;if(i===e){this.resizeWithContainerAutomatically=!0;const t=document.documentElement;t.style.height="100%",t.style.margin="0",t.style.padding="0",t.style.overflow="clip",e.style.height="100%",e.style.margin="0",e.style.padding="0",e.style.overflow="clip"}this._containerElement=i}onBeforeUnload(){this.destroy()}adjustColumnsResponsive(){if(void 0===this._groundItem)throw new J("LMACR20883");if(this._firstLoad=!1,this.useResponsiveLayout()&&!this._updatingColumnsResponsive&&this._groundItem.contentItems.length>0&&this._groundItem.contentItems[0].isRow){if(void 0===this._groundItem||null===this._width)throw new J("LMACR77412");{const t=this._groundItem.contentItems[0].contentItems.length;if(t<=1)return;{const e=this.layoutConfig.dimensions.defaultMinItemWidth;if(t*e<=this._width)return;{this._updatingColumnsResponsive=!0;const i=t-Math.max(Math.floor(this._width/e),1),n=this._groundItem.contentItems[0],o=this.getAllStacks();if(0===o.length)throw new X("LMACRS77413");{const t=o[0];for(let e=0;en?void 0:{parentItem:t,index:o}}}case 1:if(void 0===this._focusedComponentItem)return;{const t=this._focusedComponentItem.parentItem;return this.tryCreateLocationFromParentItem(t,e)}case 2:{const t=this.findFirstContentItemType(at.stack);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 3:{let t=this.findFirstContentItemType(at.row);return void 0!==t?this.tryCreateLocationFromParentItem(t,e):(t=this.findFirstContentItemType(at.column),void 0!==t?this.tryCreateLocationFromParentItem(t,e):void 0)}case 4:{const t=this.findFirstContentItemType(at.row);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 5:{const t=this.findFirstContentItemType(at.column);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 6:if(void 0===this._groundItem)throw new J("LMFLRIF18244");return void 0!==this.rootItem?void 0:void 0===e||0===e?{parentItem:this._groundItem,index:0}:void 0;case 7:if(void 0===this._groundItem)throw new J("LMFLF18244");{const t=this._groundItem.contentItems;if(0===t.length)return void 0===e||0===e?{parentItem:this._groundItem,index:0}:void 0;{const i=t[0];return this.tryCreateLocationFromParentItem(i,e)}}}}tryCreateLocationFromParentItem(t,e){const i=t.contentItems.length;return void 0===e?{parentItem:t,index:i}:e<0||e>i?void 0:{parentItem:t,index:e}}}!function(t){t.createMaximisePlaceElement=function(t){const e=t.createElement("div");return e.classList.add("lm_maximise_place"),e},t.createTabDropPlaceholderElement=function(t){const e=t.createElement("div");return e.classList.add("lm_drop_tab_placeholder"),e},t.defaultLocationSelectors=[{typeId:1,index:void 0},{typeId:2,index:void 0},{typeId:3,index:void 0},{typeId:7,index:void 0}],t.afterFocusedItemIfPossibleLocationSelectors=[{typeId:0,index:1},{typeId:2,index:void 0},{typeId:3,index:void 0},{typeId:7,index:void 0}]}(ae||(ae={}));class le extends ae{constructor(t,e,i,n){if(super(le.createLayoutManagerConstructorParameters(t,e)),this._bindComponentEventHanlderPassedInConstructor=!1,this._creationTimeoutPassed=!1,void 0!==e&&"function"==typeof e&&(this.bindComponentEvent=e,this._bindComponentEventHanlderPassedInConstructor=!0,void 0!==i&&(this.unbindComponentEvent=i)),!this._bindComponentEventHanlderPassedInConstructor&&this.isSubWindow){if(void 0===this._constructorOrSubWindowLayoutConfig)throw new J("VLC98823");{const t=xt.resolve(this._constructorOrSubWindowLayoutConfig);this.layoutConfig=Object.assign(Object.assign({},t),{root:void 0})}}!0!==n&&(this.deprecatedConstructor||this.init())}destroy(){this.bindComponentEvent=void 0,this.unbindComponentEvent=void 0,super.destroy()}init(){if(this._bindComponentEventHanlderPassedInConstructor||"loading"!==document.readyState&&null!==document.body){if(!this._bindComponentEventHanlderPassedInConstructor&&!0===this.isSubWindow&&!this._creationTimeoutPassed)return setTimeout((()=>this.init()),7),void(this._creationTimeoutPassed=!0);!0===this.isSubWindow&&(this._bindComponentEventHanlderPassedInConstructor||this.clearHtmlAndAdjustStylesForSubWindow(),window.__glInstance=this),super.init()}else document.addEventListener("DOMContentLoaded",(()=>this.init()),{passive:!0})}clearHtmlAndAdjustStylesForSubWindow(){const t=document.head,e=new Array(4);e[0]=document.querySelectorAll("body link"),e[1]=document.querySelectorAll("body style"),e[2]=document.querySelectorAll("template"),e[3]=document.querySelectorAll(".gl_keep");for(let i=0;ithis.emit("popIn"))),document.body.appendChild(t),!0}}bindComponent(t,e){if(void 0!==this.bindComponentEvent){return this.bindComponentEvent(t,e)}if(void 0!==this.getComponentEvent)return{virtual:!1,component:this.getComponentEvent(t,e)};{const t=`${tt[2]}: ${JSON.stringify(e)}`;throw new Z(t)}}unbindComponent(t,e,i){if(void 0!==this.unbindComponentEvent)this.unbindComponentEvent(t);else if(!e&&void 0!==this.releaseComponentEvent){if(void 0===i)throw new J("VCUCRCU333998");this.releaseComponentEvent(t,i)}}}!function(t){let e=!1;t.createLayoutManagerConstructorParameters=function(t,i){const n=e?null:new URL(document.location.href).searchParams.get("gl-window");e=!0;const o=null!==n;let s,r;if(null!==n){const e=localStorage.getItem(n);if(null===e)throw new Error("Null gl-window Config");localStorage.removeItem(n);const i=JSON.parse(e),o=_t.unminifyConfig(i);r=xt.fromResolved(o),t instanceof HTMLElement&&(s=t)}else void 0===t?r=void 0:t instanceof HTMLElement?(r=void 0,s=t):r=t,void 0===s&&i instanceof HTMLElement&&(s=i);return{constructorOrSubWindowLayoutConfig:r,isSubWindow:o,containerElement:s}}}(le||(le={}));class he extends le{constructor(t,e,i){super(t,e,i,!0),this._componentTypesMap=new Map,this._registeredComponentMap=new Map,this._virtuableComponentMap=new Map,this._containerVirtualRectingRequiredEventListener=(t,e,i)=>this.handleContainerVirtualRectingRequiredEvent(t,e,i),this._containerVirtualVisibilityChangeRequiredEventListener=(t,e)=>this.handleContainerVirtualVisibilityChangeRequiredEvent(t,e),this._containerVirtualZIndexChangeRequiredEventListener=(t,e,i)=>this.handleContainerVirtualZIndexChangeRequiredEvent(t,e,i),this.deprecatedConstructor||this.init()}registerComponent(t,e,i=!1){if("function"!=typeof e)throw new $("registerComponent() componentConstructorOrFactoryFtn parameter is not a function");if(e.hasOwnProperty("prototype")){const n=e;this.registerComponentConstructor(t,n,i)}else{const n=e;this.registerComponentFactoryFunction(t,n,i)}}registerComponentConstructor(t,e,i=!1){if("function"!=typeof e)throw new Error(tt[1]);if(void 0!==this._componentTypesMap.get(t))throw new Z(`${tt[3]}: ${t}`);this._componentTypesMap.set(t,{constructor:e,factoryFunction:void 0,virtual:i})}registerComponentFactoryFunction(t,e,i=!1){if("function"!=typeof e)throw new Z("Please register a constructor function");if(void 0!==this._componentTypesMap.get(t))throw new Z(`${tt[3]}: ${t}`);this._componentTypesMap.set(t,{constructor:void 0,factoryFunction:e,virtual:i})}registerComponentFunction(t){this.registerGetComponentConstructorCallback(t)}registerGetComponentConstructorCallback(t){if("function"!=typeof t)throw new Error("Please register a callback function");void 0!==this._getComponentConstructorFtn&&console.warn("Multiple component functions are being registered. Only the final registered function will be used."),this._getComponentConstructorFtn=t}getRegisteredComponentTypeNames(){const t=this._componentTypesMap.keys();return Array.from(t)}getComponentInstantiator(t){let e;const i=pt.resolveComponentTypeName(t);return void 0!==i&&(e=this._componentTypesMap.get(i)),void 0===e&&void 0!==this._getComponentConstructorFtn&&(e={constructor:this._getComponentConstructorFtn(t),factoryFunction:void 0,virtual:!1}),e}bindComponent(t,e){let i;const n=pt.resolveComponentTypeName(e);let o;if(void 0!==n&&(i=this._componentTypesMap.get(n)),void 0===i&&void 0!==this._getComponentConstructorFtn&&(i={constructor:this._getComponentConstructorFtn(e),factoryFunction:void 0,virtual:!1}),void 0!==i){const s=i.virtual;let r,a;r=void 0===e.componentState?void 0:Ut({},e.componentState);const l=i.constructor;if(void 0!==l)a=new l(t,r,s);else{const e=i.factoryFunction;if(void 0===e)throw new X("LMBCFFU10008");a=e(t,r,s)}if(s){if(void 0===a)throw new J("GLBCVCU988774");{const e=a,i=e.rootHtmlElement;if(void 0===i)throw new Z(`${tt[5]}: ${n}`);!function(t){const e="absolute";t.style.position!==e&&(t.style.position=e)}(i),this.container.appendChild(i),this._virtuableComponentMap.set(t,e),t.virtualRectingRequiredEvent=this._containerVirtualRectingRequiredEventListener,t.virtualVisibilityChangeRequiredEvent=this._containerVirtualVisibilityChangeRequiredEventListener,t.virtualZIndexChangeRequiredEvent=this._containerVirtualZIndexChangeRequiredEventListener}}this._registeredComponentMap.set(t,a),o={virtual:i.virtual,component:a}}else o=super.bindComponent(t,e);return o}unbindComponent(t,e,i){if(void 0===this._registeredComponentMap.get(t))super.unbindComponent(t,e,i);else{const e=this._virtuableComponentMap.get(t);if(void 0!==e){const i=e.rootHtmlElement;if(void 0===i)throw new X("GLUC77743",t.title);this.container.removeChild(i),this._virtuableComponentMap.delete(t)}}}fireBeforeVirtualRectingEvent(t){this._goldenLayoutBoundingClientRect=this.container.getBoundingClientRect(),super.fireBeforeVirtualRectingEvent(t)}handleContainerVirtualRectingRequiredEvent(t,e,i){const n=this._virtuableComponentMap.get(t);if(void 0===n)throw new J("GLHCSCE55933");{const o=n.rootHtmlElement;if(void 0===o)throw new Z(tt[4]+" "+t.title);{const n=t.element.getBoundingClientRect(),s=n.left-this._goldenLayoutBoundingClientRect.left;o.style.left=zt(s);const r=n.top-this._goldenLayoutBoundingClientRect.top;o.style.top=zt(r),Tt(o,e),At(o,i)}}}handleContainerVirtualVisibilityChangeRequiredEvent(t,e){const i=this._virtuableComponentMap.get(t);if(void 0===i)throw new J("GLHCVVCRE55934");{const n=i.rootHtmlElement;if(void 0===n)throw new Z(tt[4]+" "+t.title);Dt(n,e)}}handleContainerVirtualZIndexChangeRequiredEvent(t,e,i){const n=this._virtuableComponentMap.get(t);if(void 0===n)throw new J("GLHCVZICRE55935");{const e=n.rootHtmlElement;if(void 0===e)throw new Z(tt[4]+" "+t.title);e.style.zIndex=i}}}const de="initial_",ce={show:"top",popout:!1,maximise:!1,close:"close-tab-unused"},me={headerHeight:31},ue={hasHeaders:!0,reorderEnabled:!0},pe={popoutWholeStack:!1,constrainDragToContainer:!1,constrainDragToHeaders:!1,preventDragout:!1,showMaximiseIcon:!1,showPopoutIcon:!1,showCloseIcon:!1,blockedPopoutsThrowError:!0,closePopoutsOnUnload:!0,selectionEnabled:!1};var ge,fe;class ve{constructor(e){this.layout=e,ge.set(this,void 0),fe.set(this,void 0),this.handleResize=t=>{t.forEach((t=>this.resizeElement(t.target)))},this.handleMutation=()=>{this.layout.viewComponentsByContainerElement.forEach((t=>{this.resizeElement(t.container.element)}))},t.__classPrivateFieldSet(this,ge,new ResizeObserver(this.handleResize),"f"),t.__classPrivateFieldSet(this,fe,new MutationObserver(this.handleMutation),"f")}observeMutations(e){t.__classPrivateFieldGet(this,fe,"f")?.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["class"]})}destroy(){t.__classPrivateFieldGet(this,ge,"f").disconnect(),t.__classPrivateFieldGet(this,fe,"f").disconnect()}observeContainer(e){t.__classPrivateFieldGet(this,ge,"f").observe(e)}unobserveContainer(e){t.__classPrivateFieldGet(this,ge,"f").unobserve(e)}resizeElement(t){const e=this.layout.viewComponentsByContainerElement.get(t);e&&e.resize()}}ge=new WeakMap,fe=new WeakMap;var _e={};Object.defineProperty(_e,"__esModule",{value:!0});var ye=_e.BaseItem=void 0;class Ce{constructor(t,e,i){this._item=t,this._layout=e,this._wrap=i}get raw(){return this._item}get layout(){return this._layout}get type(){return this._item.type}get contentItems(){return(this._item.contentItems??[]).map((t=>this._wrap(t)))}get parent(){const t=this._item.parent;return t?this._wrap(t):null}setActiveContentItem(t,e){if("stack"!==this.type)throw new Error(`Cannot call setActiveContentItem from a non-stack item: ${this.type}`);this._item.setActiveContentItem(t.raw,e)}static wrapInternal(t,e,i){const n=Ce.wrapCache.get(e);if(n)return n;const o=new t(e,i,(e=>Ce.wrapInternal(t,e,i)));return Ce.wrapCache.set(e,o),o}}ye=_e.BaseItem=Ce,Ce.wrapCache=new WeakMap;const we=t=>!!t&&"contentItems"in t&&(t.isRow||t.isColumn);class Ie extends ye{isRoot(){return!!this._item.parent?.isGround}getBounds(){return this._item.element.getBoundingClientRect()}get viewName(){if(this._item.isComponent){const{component:t}=this._item;return t.identity.name}throw new Error("View name not found")}onDestroyed(t){const e=({target:i})=>{i===this._item&&(t(),this._item.off("itemDestroyed",e))};this._item.on("itemDestroyed",e)}createAdjacentStack({position:t="right"}={}){const e=this.raw;if(ee.isStack(e)&&e.parent){const i=["top","bottom"].includes(t)?"column":"row",n=["left","top"].includes(t)?1:0,o=we(e.parent)?e.parent:e.layoutManager,s=o,r=e.parent.contentItems.indexOf(e);e.parent.isGround&&e.parent.removeChild(e,!0);const a=o.newItem({type:i,content:[{type:"stack",content:[]}]},r);if(!a)throw new Error("createAdjacentStack: Failed to create new container");const l=a.contentItems[0];return a.addChild(this.raw,n),we(s)&&s.removeChild(e,!0),this._wrap(l)}throw new Error(`Cannot creat adjacent stacks for type: ${e.type}, must be type 'stack'`)}setActiveContentItem(t,e=!0){if(!ee.isStack(this._item))throw new Error(`Cannot call setActiveContentItem from a non-stack item: ${this.type}`);this._item.setActiveComponentItem(t.raw,!e)}static wrap(t,e){return ye.wrapInternal(Ie,t,e)}}function be(t=[],e){for(const i of t)"component"===i.type?Object.keys(e).forEach((t=>{t in i&&(i.componentState={[`${de}${t}`]:i[t],...i.componentState}),i[t]=e[t]})):be(i.content,e)}function Se(t=[],e,i){for(const n of t)if("component"===n.type)Object.keys(e).forEach((t=>{if(`${de}${t}`in n.componentState)return n[t]=n.componentState[`${de}${t}`],void delete n.componentState[`${de}${t}`];n[t]=e[t]}));else{if(n.size&&("row"===i||"column"===i)){n["row"===i?"width":"height"]=n.size?.includes(".")?parseFloat(n.size):parseInt(n.size)}Se(n.content,e,n.type)}}function Ee(t){if(t.root){t.root.content&&Se([t.root],{componentName:"view",isClosable:!0});const e=t.root;t.content=[e],delete t.root}return t}const xe=e=>class extends e{connectedCallback(){if(!this.name||!this.uuid)throw new Error(" Name or uuid attribute missing");if(!this.src)throw new Error(" missing 'src' attribute.");this.#t||(this.#t=document.createElement("iframe"),this.#t.src=this.src,this.#t.style.height="100%",this.#t.style.width="100%",this.#t.style.border="none",this.forceFrameName?this.#t.setAttribute("name",this.forceFrameName):this.#t.setAttribute("name",t.encodeOptions({brokerUrl:this.brokerUrl,name:this.name,uuid:this.uuid,providerId:this.providerId,contextGroup:this.contextGroup},"of-frame")),this.#t.setAttribute("id",this.name),this.appendChild(this.#t))}#t;get brokerUrl(){return this.getAttribute("of-broker")}set brokerUrl(t){t&&this.setAttribute("of-broker",t)}get name(){return this.getAttribute("of-name")}set name(t){t&&this.setAttribute("of-name",t)}get forceFrameName(){return this.getAttribute("forceFrameName")}set forceFrameName(t){t&&this.setAttribute("forceFrameName",t)}get uuid(){return this.getAttribute("of-uuid")}set uuid(t){t&&this.setAttribute("of-uuid",t)}get src(){return this.getAttribute("src")}set src(t){t&&this.setAttribute("src",t)}get providerId(){return this.getAttribute("of-provider-id")}set providerId(t){t&&this.setAttribute("of-provider-id",t)}get contextGroup(){return this.getAttribute("of-context-group")}set contextGroup(t){t&&this.setAttribute("of-context-group",t)}static get observedAttributes(){return["name"]}};class Le{static create(t){const e=document.createElement("of-view");return Object.entries(t).forEach((([t,i])=>{e.setAttribute(t,i)})),e}}customElements.define("of-view",xe(HTMLElement));class ze{constructor(t,i,n,{brokerUrl:o,interopConfig:s},r){this.container=t,this.config=i,this.ofView=null,this.isDragging=()=>this.container.tab.element?.className.includes("lm_dragging")??!1;const{url:a,web:l,interop:h,name:d}=i||{},c=d??`internal-generated-view-${e.v4()}`;if(this.identity={uuid:n,name:c},this.container.element.setAttribute("of-name",c),this.container.element.id=`container-${c}`,this.container.parent.id=c,void 0===a)return void this.handleUrlMissing();const m=this.updateTitleIfNotSet(a),u={"of-broker":o,"of-uuid":n,"of-name":c,src:a};l?.frameName&&(u.forceFrameName=l.frameName);const p=h?.currentContextGroup??s?.currentContextGroup;p&&(u["of-context-group"]=p),s?.providerId&&(u["of-provider-id"]=s?.providerId),this.ofView=Le.create(u),this.ofView.title=m??`Iframe: ${a}`,r.appendChild(this.ofView),this.ofView.style.position="absolute"}updateTitleIfNotSet(t){return"view"===this.container.parent.title&&this.container.parent.setTitle(t),this.container.parent.title}handleUrlMissing(){const t=document.createElement("div");t.setAttribute("style","padding: 20px");t.innerText="No URL provided",this.container.element.appendChild(t)}destroy(){this.ofView?.remove(),this.ofView=null}closeView(){this.container.close()}resize(){if(this.ofView){if(this.isDragging())return void(this.ofView.style.display="none");const t=this.container.element.getBoundingClientRect();this.ofView.style.position="absolute",this.ofView.style.height=`${t.height}px`,this.ofView.style.width=`${t.width}px`,this.ofView.style.inset=`${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`,this.ofView.style.display="block"}}}class Me extends U{static overrideConfig(t){const e={...ue,...t.settings,...pe};return e.reorderEnabled?be(t.content,{isClosable:!0}):be(t.content,{reorderEnabled:!1}),{dimensions:me,...t,settings:e,header:{...ce,show:!1!==t.settings?.hasHeaders&&ce.show}}}constructor(t,e,i,{options:n},o,s){super(),this.identity=t,this.container=e,this.initialConfig=i,this.layoutManager=o,this.platformProvider=s,this.viewComponentsByContainerElement=new Map,this.layoutContentCache=_.getSingleInstance(),this.reparentingViews=new Set,this.goldenLayoutDestroyed=!1,this.createViewComponent=(t,e)=>{m.handleSharedView(this.layoutManager,this.identity,e);const i=new ze(t,e,this.identity.uuid,this.options,this.iframeContainer);return e&&!1===e[`${de}isClosable`]&&this.stylesheet.insertRule(`#tab-${i.identity.name} .lm_close_tab { display: none; }`),this.viewComponentsByContainerElement.set(t.element,i),this.resizeController.observeContainer(t.element),i},this.iframeContainer=document.createElement("div"),this.iframeContainer.id=`openfin-layout-iframe-container-${this.identity.layoutName}`,this.domEmitter=new V(e),this.setupStylesheets(),this.layout=new he(this.container),this.layout.resizeWithContainerAutomatically=!0,this.options=n,this.layout.registerComponent("view",this.createViewComponent),this.setupListeners(),this.resizeController=new ve(this),this.layout.loadLayout(Me.overrideConfig(i));const r=document.createElement("div");r.id=`openfin-layout-shadow-container-${this.identity.layoutName}`,r.attachShadow({mode:"open",delegatesFocus:!1}).appendChild(this.iframeContainer),this.container.appendChild(r),this.resizeController.observeMutations(this.container)}getStackByView({name:t}){const e=this.layout.findFirstComponentItemById(t);if(e?.parent&&e?.parent?.isStack)return Ie.wrap(e.parent,this)}getRoot(){return Ie.wrap(this.layout.rootItem,this)}async platformCloseView(t){const e=[...this.viewComponentsByContainerElement.values()].find((e=>e.identity.name===t.name));if(!e)throw new Error(`View with name: ${t.name} not found in layout.`);e.closeView()}async platformCreateView(t,{location:e,targetView:i}={}){if(i)throw new Error("TargetView not supported in web");const n={options:this.platformProvider.normalizeOptions(t),target:this.identity,location:e};return this.insertView(n)}setupStylesheets(){if(this.container.setAttribute("data-openfin-layout-name",this.identity.layoutName),this.stylesheet=new CSSStyleSheet,this.stylesheet.insertRule(".lm_close { display: none; }"),document.adoptedStyleSheets.push(this.stylesheet),this.initialConfig.settings?.preventSplitterResize){const t=`\n [data-openfin-layout-name='${this.identity.layoutName}'] .lm_splitter {\n pointer-events: none;\n }`;this.stylesheet.insertRule(t)}}insertView({options:t,location:e,targetView:i}){const n=e?this.layoutContentCache.getItemOrUndefined(e.id):void 0,o=i?this.layoutContentCache.getItemOrUndefined(i.name):void 0,s=n??o??Ie.wrap(this.layout.rootItem,this);let r;if(ee.isStack(s.raw))r=s.raw;else{if(!we(s.raw))throw new Error("Cannot add a view at the requested location");r=s.raw.newItem({type:"stack",content:[]})}const a=Math.min(r.contentItems.length,e?.index??r.contentItems.length);let l=this.layout.findFirstComponentItemById(t.name);l?(l.parent&&l.parent.removeChild(l,!0),r.addChild(l,a)):l=r.newComponent("view",t,t.title??t.url??"Default Title",a);const h=l.component.identity;return Promise.resolve({identity:h})}replaceView({viewToReplace:t,newView:e}){throw new Error("Method not implemented.")}replaceLayout(t){throw new Error("Method not implemented.")}async cleanupView(t){}applyPreset(t){throw new Error("Method not implemented.")}getCurrentViews(){return[...this.viewComponentsByContainerElement.values()].map((t=>t.identity))}async getFrameSnapshot(){return Ee(xt.fromResolved(this.layout.toConfig()))}isVisible(){return W(this.container)}async onViewDetached({viewIdentity:t}){this.reparentingViews.add(t.name),this.platformCloseView(t)}async destroy(){this.goldenLayoutDestroyed||(this.goldenLayoutDestroyed=!0,this.layout.destroy()),this.iframeContainer.remove(),this.resizeController.destroy(),document.adoptedStyleSheets=document.adoptedStyleSheets.filter((t=>t!==this.stylesheet)),this.viewComponentsByContainerElement.clear()}setupListeners(){this.container.addEventListener("pointerdown",(t=>{if(t.target instanceof HTMLElement){const e=t.target.classList;["lm_tab","lm_title","lm_splitter","lm_drag_handle"].some((t=>e.contains(t)))&&(this.handleDragStart(),2===t.button&&t.stopPropagation())}}),!0),document.addEventListener("pointerup",(()=>this.handleDragEnd()),!0),this.layout.on("tabCreated",(t=>{const e=t.componentItem.component;t.element.id=`tab-${e.identity.name}`,this.domEmitter.dispatchLocalEvent("tab-created",e.identity)})),this.layout.on("itemCreated",(({target:t})=>{const e=t;if(Gt.isComponentItem(e)){const t=e.component;this.domEmitter.dispatchLocalEvent("container-created",t.identity)}})),this.layout.on("itemDestroyed",(t=>{const e=t.target;if(Gt.isComponentItem(e)){const t=e.component;this.removeViewComponent(t)}})),this.layout.on("itemDropped",(()=>{this.handleDragEnd()}))}handleDragStart(){this.iframeContainer.style.pointerEvents="none"}handleDragEnd(){this.iframeContainer.style.pointerEvents=""}removeViewComponent(t){if(t.config&&!1===t.config[`${de}isClosable`]){const e=[...this.stylesheet.cssRules].findIndex((e=>e.cssText.includes(`#tab-${t.identity.name}`)));this.stylesheet.deleteRule(e)}t.destroy(),this.viewComponentsByContainerElement.delete(t.container.element),this.resizeController.unobserveContainer(t.container.element),this.reparentingViews.has(t.identity.name)?this.reparentingViews.delete(t.identity.name):this.platformProvider.closeView(t.identity.name);0===this.getCurrentViews().length&&(this.goldenLayoutDestroyed||(this.goldenLayoutDestroyed=!0,m.handleLastViewRemoved(this.layoutManager,this.identity)))}}class Pe{constructor(t,e,i,n){this.windowIdentity=t,this.connectConfig=e,this.provider=i,this.fallbackContainer=n}async createLayout(t,e){if(!("container"in t)&&!this.fallbackContainer)throw new Error("Container property is not optional in web");const{layoutName:i}=t,n=t,o=this.provider.initLayoutViews(n),s=n.container??this.fallbackContainer,r={...this.windowIdentity,layoutName:i},a=new Me(r,s,o,this.connectConfig,e,this.provider);m.registerLayout(e,i,a),this.fallbackContainer=null}async getLayoutSnapshot(t){return t.getLayoutSnapshot()}async handleLastViewRemoved(t){}}class Te{static async init(e){const i=e.getFin().InterApplicationBus.Channel,n=await i.create(`custom-frame-${e.me.uuid}`);return n.setDefaultAction((async(t,{target:e,opts:i},o)=>{const s=n.connections.find((t=>t.name===e.name));if(s)return n.dispatch(s,t,{...i,target:e});throw new Error(`Client with name ${e.name} not found`)})),await t.relayChannelClientApi_1(n,"layout-relay"),new Te(e)}constructor(t){this.wire=t,this.viewNames=new Set}normalizeOptions(t,i="default"){const n=this.wire.me.uuid;let{name:o=`internal-generated-view-${e.v4()}`}=t;return o.match(/^internal-generated-view-/)&&this.viewNames.has(o)&&"duplicate"===i&&(o=`internal-generated-view-${e.v4()}`),this.viewNames.add(o),{...t,name:o,uuid:n}}closeView(t){this.viewNames.delete(t)}initLayoutViews({layout:t,multiInstanceViewBehavior:e}){return H((t=>{if("component"===t.type&&t.componentState){const i=this.normalizeOptions(t.componentState,e);return{...t,componentState:i}}return t}),t)}}var Ae;const ke=t=>t;Ae=new WeakMap,exports.WebLayoutEntryPoint=class{constructor(e){Ae.set(this,void 0),this.initLayoutManager=async(e,i,{container:n,layoutManagerOverride:o})=>{const s=await Te.init(i),r=o??ke,a=new Pe(i.me,t.__classPrivateFieldGet(this,Ae,"f"),s,n),l=new(r(m.createClosedConstructor(a)));return await M(i,l),l},this.applyLayoutSnapshot=async(e,i,n)=>{await i.applyLayoutSnapshot(t.__classPrivateFieldGet(this,Ae,"f").platform.layoutSnapshot)},this.createLayout=async(t,e)=>m.createLayout(t,e),this.destroyLayout=async(t,e)=>m.destroyLayout(t,e),t.__classPrivateFieldSet(this,Ae,e,"f")}}; @@ -14312,7 +14312,7 @@ function version(uuid) { /******/ /************************************************************************/ var __webpack_exports__ = {}; -// This entry need to be wrapped in an IIFE because it need to be in strict mode. +// This entry needs to be wrapped in an IIFE because it needs to be in strict mode. (() => { "use strict"; var exports = __webpack_exports__; @@ -14321,8 +14321,8 @@ var exports = __webpack_exports__; \********************************/ Object.defineProperty(exports, "__esModule", ({ value: true })); -const cloud_interop_1 = __webpack_require__(/*! @openfin/cloud-interop */ "./node_modules/@openfin/cloud-interop/out/index.js"); -const core_web_1 = __webpack_require__(/*! @openfin/core-web */ "./node_modules/@openfin/core-web/out/api-client.js"); +const cloud_interop_1 = __webpack_require__(/*! @openfin/cloud-interop */ "../../node_modules/@openfin/cloud-interop/out/index.js"); +const core_web_1 = __webpack_require__(/*! @openfin/core-web */ "../../node_modules/@openfin/core-web/out/api-client.js"); const app_resolver_helper_1 = __webpack_require__(/*! ./platform/apps/app-resolver-helper */ "./client/src/platform/apps/app-resolver-helper.ts"); const interop_override_1 = __webpack_require__(/*! ./platform/broker/interop-override */ "./client/src/platform/broker/interop-override.ts"); const layout_override_1 = __webpack_require__(/*! ./platform/layout/layout-override */ "./client/src/platform/layout/layout-override.ts"); diff --git a/web/v19.2.0/web-interop-support-context-and-intents/js/provider.bundle.js.map b/web/v19.2.0/web-interop-support-context-and-intents/js/provider.bundle.js.map index 8cdde3b..6795094 100644 --- a/web/v19.2.0/web-interop-support-context-and-intents/js/provider.bundle.js.map +++ b/web/v19.2.0/web-interop-support-context-and-intents/js/provider.bundle.js.map @@ -1 +1 @@ -{"version":3,"file":"provider.bundle.js","mappings":";;;;;;;;;;;;;;;AAAgC;;AAEhC;AACA;AACA;AACA;AACA;;AAEA;;AAEA,OAAO,UAAU;AACjB,OAAO,gBAAgB;;AAEvB;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,SAAS;AACtB;AACA,OAAO,SAAS;;AAEhB;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;;AAGA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,UAAU;AACrB;AACA,WAAW,SAAS;AACpB,aAAa;AACb;AACA,2BAA2B,oBAAoB,IAAI;AACnD;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,gCAAgC,OAAO;AACvC;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,wFAAwF,qBAAM;AAC9F,CAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,SAAS,GAAG,SAAS;AAC5C,4BAA4B;AAC5B;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA,SAAS,UAAU;AACnB;AACA;AACA;AACA;AACA;AACA,MAAM;AACN,kCAAkC;AAClC,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;;AAEA,wCAAwC,OAAO;AAC/C;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,WAAW,SAAS;AACpB,aAAa,QAAQ;AACrB;AACA,gCAAgC,WAAW,IAAI;AAC/C;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,GAAG,GAAG,WAAW;AACjB;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,kBAAkB;AAC7B,WAAW,UAAU;AACrB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B,WAAW,UAAU;AACrB;AACA,aAAa;AACb;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,0BAA0B,eAAe;;AAEzC;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;AACA;AACA,WAAW,QAAQ;AACnB;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,SAAS,QAAQ;AACjB;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,SAAS;AACpB;AACA,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,aAAa,OAAO;AACpB;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB,CAAC;;AAED;AACA,oDAAoD,YAAY;;AAEhE;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA,GAAG;;AAEH;;AAEA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA,WAAW,YAAY;AACvB;AACA,aAAa;AACb;AACA;AACA;AACA;;AAEA,mDAAmD;AACnD;AACA,CAAC;;AAED;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB,WAAW,SAAS;AACpB,WAAW,UAAU;AACrB,WAAW,SAAS;AACpB,WAAW,SAAS;AACpB,WAAW,UAAU;AACrB;AACA,aAAa;AACb;;AAEA;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B,WAAW,QAAQ;AACnB,WAAW,qBAAqB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,yEAAyE,0CAAM;AAC/E;;AAEA;AACA;;AAEA;AACA;AACA;AACA,aAAa,GAAG;AAChB,aAAa,eAAe;AAC5B,aAAa,sBAAsB;AACnC,YAAY;AACZ;AACA,eAAe,SAAS;AACxB;AACA;AACA;;AAEA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA,WAAW,qBAAqB;AAChC,WAAW,qBAAqB;AAChC;AACA,aAAa;AACb;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,UAAU;AACvB,aAAa,UAAU;AACvB;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,eAAe,SAAS;AACxB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,UAAU;AACvB;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA,WAAW,YAAY;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,4BAA4B;AACzC;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gEAAgE;AAChE;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,wBAAwB,iBAAiB;AACzC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,GAAG;;AAEH;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,MAAM;AACN;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,2BAA2B,mBAAmB;AAC9C;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,KAAK;AACL,GAAG;AACH;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,oDAAoD,MAAM;AAC1D,oDAAoD;AACpD;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;AAEA;;AAEA;AACA;AACA;AACA,WAAW,gBAAgB;AAC3B,WAAW,SAAS;AACpB;AACA,aAAa,GAAG;AAChB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;;AAEH;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,SAAS;AACpB,WAAW,SAAS;AACpB,WAAW,SAAS;AACpB;AACA,aAAa,eAAe;AAC5B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA,uCAAuC;AACvC,KAAK;;AAEL;AACA,0DAA0D,wBAAwB;AAClF;AACA,KAAK;;AAEL;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,cAAc;AACd;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc,QAAQ;AACtB,gBAAgB;AAChB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,cAAc,QAAQ;AACtB,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA,0BAA0B,KAAK;AAC/B;AACA;;AAEA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,SAAS,6BAA6B;AACtC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,8CAA8C;AAC9C,QAAQ;AACR;AACA,oEAAoE;AACpE,yFAAyF;AACzF;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;;AAEP;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;;AAGA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,yCAAyC,MAAM;AAC/C,MAAM;AACN;AACA;AACA,8CAA8C,MAAM;AACpD;AACA,CAAC;;AAED,sCAAsC,OAAO;;AAE7C;;AAEA;AACA;AACA;;AAEA,WAAW,QAAQ;AACnB;AACA;;AAEA;;AAEA,oBAAoB,YAAY;AAChC;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA,mDAAmD,GAAG;AACtD;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA,yCAAyC,IAAI;AAC7C;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,SAAS;AACtB;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAG;AACH;;AAEA,uEAAuE,WAAW;;AAElF;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,iCAAiC,SAAS;AAC1C,MAAM;AACN,6BAA6B;AAC7B,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,8CAA8C;AAC9C;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA,WAAW,mBAAmB;AAC9B,WAAW,SAAS;AACpB,WAAW,SAAS;AACpB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB;AACA,aAAa;AACb;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,eAAe;AAC5B,aAAa,SAAS;AACtB;AACA,eAAe,SAAS;AACxB;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA,oEAAoE;;AAEpE;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA;;AAEA,WAAW,yCAAyC;;AAEpD;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,gDAAgD;AAChD;AACA;AACA,yBAAyB;AACzB,KAAK;AACL;AACA,CAAC;;AAED;AACA;;AAEA;AACA;AACA,kDAAkD;AAClD;AACA;AACA;AACA,UAAU,IAAI;AACd;AACA;AACA,OAAO;AACP;AACA;;AAEA;;AAEA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA,WAAW,UAAU;AACrB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,KAAK;;AAEL;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA,WAAW,UAAU;AACrB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA,wDAAwD,iBAAiB;;AAEzE;AACA,2CAA2C,iBAAiB;;AAE5D;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA,6BAA6B,uCAAuC,kCAAkC,uCAAuC,oCAAoC,2BAA2B,WAAW,mCAAmC,uBAAuB,uBAAuB,GAAG,gBAAgB,gGAAgG,mDAAmD,EAAE,UAAU,iBAAiB,eAAe,SAAS,KAAK,gBAAgB,GAAG,wDAAwD,EAAE,SAAS,MAAM,ivCAAivC,EAAE,eAAe,0FAA0F,cAAc,oEAAoE,cAAc,QAAQ,uBAAuB,MAAM,oBAAoB,EAAE,EAAE,gBAAgB,OAAO,kBAAkB,mBAAmB,gCAA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AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,0CAAM;AACnC;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA,mEAAmE,uBAAuB;AAC1F;AACA,sDAAsD,MAAM;AAC5D,aAAa;AACb;AACA,iEAAiE,MAAM;AACvE,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA,0CAA0C,iBAAiB;AAC3D;AACA,0CAA0C,iBAAiB;AAC3D;AACA;AACA,kEAAkE,uBAAuB;AACzF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D,uBAAuB,YAAY,+BAA+B;AAC/H;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA;AACA;AACA,4BAA4B,uBAAuB,kBAAkB,+BAA+B,GAAG,aAAa;AACpH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,gCAAgC;AAChE;AACA;AACA;AACA;AACA,wBAAwB,sDAAsD;AAC9E;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,IAAI;AACpC;AACA;AACA,mDAAmD,kBAAkB;AACrE;AACA,iBAAiB;AACjB;AACA,uCAAuC,SAAS;AAChD;AACA,2CAA2C,SAAS;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEgC;;;;;;;;;;;;ACz4GnB,MAA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A;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;ACrJA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEY;;AAEZ,eAAe,mBAAO,CAAC,wDAAW;AAClC,gBAAgB,mBAAO,CAAC,oDAAS;AACjC;AACA;AACA;AACA;;AAEA,cAAc;AACd,kBAAkB;AAClB,yBAAyB;;AAEzB;AACA,kBAAkB;;AAElB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,kBAAkB,YAAY;AAC9B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA,wCAAwC,SAAS;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;;AAEA;AACA;AACA,cAAc,iBAAiB;AAC/B;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,iDAAiD,EAAE;AACnD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C;AAC1C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA,yBAAyB,eAAe;AACxC;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,yBAAyB,QAAQ;AACjC;AACA,sBAAsB,eAAe;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc,YAAY;AAC1B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB,sBAAsB;AACxC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,mBAAmB;AACnB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA,oBAAoB,SAAS;AAC7B;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA,qBAAqB,WAAW,GAAG,IAAI;AACvC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA,gBAAgB,WAAW,GAAG,IAAI,KAAK,aAAa;AACpD;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;;AAEA;AACA,GAAG;AACH;AACA;AACA,mBAAmB,KAAK,mDAAmD,cAAc;AACzF,GAAG;AACH;AACA;AACA,+BAA+B,IAAI;AACnC;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,MAAM,aAAa,SAAS;AACtD;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,SAAS,gBAAgB;AACzB,cAAc,oBAAoB,EAAE,IAAI;AACxC;AACA,YAAY,gBAAgB,EAAE,IAAI;AAClC;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,GAAG,SAAS,GAAG,KAAK,qBAAqB,EAAE,EAAE;AACpE,QAAQ;AACR,yBAAyB,GAAG,KAAK,yBAAyB,EAAE,EAAE;AAC9D,mBAAmB,yBAAyB,EAAE,EAAE;AAChD;AACA,MAAM;AACN,oBAAoB,IAAI,EAAE,GAAG,SAAS,IAAI,EAAE,EAAE;AAC9C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,0CAA0C,cAAc,SAAS,OAAO;AACxE;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,kBAAkB,YAAY;AAC9B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,kBAAkB,gBAAgB;AAClC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,kBAAkB,gBAAgB;AAClC;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,cAAc,YAAY;AAC1B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,QAAQ;AAC1B;AACA,oBAAoB,QAAQ;AAC5B;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;;;;;ACzjEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEa;;AAEb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB;;AAEnB;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,sBAAsB;AACxC;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA,eAAe;AACf;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA,oBAAoB,SAAS;AAC7B;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;;AAEA,kCAAkC,QAAQ;AAC1C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oBAAoB,iBAAiB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,QAAQ;AACR;AACA,uCAAuC,QAAQ;AAC/C;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,OAAO;AACzB;AACA;AACA;;AAEA;AACA,SAAS,yBAAyB;AAClC;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,gBAAgB;AAClC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,8DAA8D,YAAY;AAC1E;AACA,8DAA8D,YAAY;AAC1E;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,qCAAqC,YAAY;AACjD;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;AACA;;;;;;;;;;;AChfA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,SAAS,WAAW;;AAEpB;AACA;AACA;AACA,SAAS,WAAW;;AAEpB;AACA;A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ACtC,WAAW,mBAAO,CAAC,mDAAS;;AAE5B;AACA;;AAEA;;;;;;;;;;;ACNA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,UAAU;AACrB,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACrBA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,UAAU;AACrB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACxBA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,kBAAkB,mBAAO,CAAC,+DAAe;AACzC,cAAc,mBAAO,CAAC,uDAAW;AACjC,eAAe,mBAAO,CAAC,yDAAY;AACnC,cAAc,mBAAO,CAAC,yDAAY;AAClC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,SAAS;AACpB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AChDA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACnBA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,UAAU;AACrB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACtBA,sBAAsB,mBAAO,CAAC,yEAAoB;AAClD,SAAS,mBAAO,CAAC,6CAAM;;AAEvB;AACA;;AAEA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BAAO,CAAC,qEAAkB;AAC9C,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,mBAAmB,mBAAO,CAAC,mEAAiB;AAC5C,aAAa,mBAAO,CAAC,uDAAW;AAChC,qBAAqB,mBAAO,CAAC,uEAAmB;AAChD,qBAAqB,mBAAO,CAAC,uEAAmB;AAChD,sBAAsB,mBAAO,CAAC,yEAAoB;AAClD,cAAc,mBAAO,CAAC,uDAAW;AACjC,eAAe,mBAAO,CAAC,yDAAY;AACnC,YAAY,mBAAO,CAAC,mDAAS;AAC7B,eAAe,mBAAO,CAAC,yDAAY;AACnC,YAAY,mBAAO,CAAC,mDAAS;AAC7B,WAAW,mBAAO,CAAC,iDAAQ;AAC3B,aAAa,mBAAO,CAAC,qDAAU;;AAE/B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,SAAS;AACpB;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa,GAAG;AAChB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;AACA,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;A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A;;;;;;;;;;;AC9CA,aAAa,mBAAO,CAAC,uDAAW;AAChC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,eAAe,mBAAO,CAAC,yDAAY;AACnC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC3DA,kBAAkB,mBAAO,CAAC,iEAAgB;AAC1C,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC7BA,eAAe,mBAAO,CAAC,yDAAY;AACnC,kBAAkB,mBAAO,CAAC,iEAAgB;AAC1C,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AChCA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA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,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACnFA,aAAa,mBAAO,CAAC,uDAAW;AAChC,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,SAAS,mBAAO,CAAC,6CAAM;AACvB,kBAAkB,mBAAO,CAAC,iEAAgB;AAC1C,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;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yDAAY;AAClC,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACzDA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa,GAAG;AAChB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACZA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACdA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AChBA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,GAAG;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC7BA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACtBA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACtBA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACzBA,uBAAuB,mBAAO,CAAC,2EAAqB;AACpD,oBAAoB,mBAAO,CAAC,qEAAkB;AAC9C,kBAAkB,mBAAO,CAAC,iEAAgB;AAC1C,kBAAkB,mBAAO,CAAC,iEAAgB;AAC1C,sBAAsB,mBAAO,CAAC,yEAAoB;;AAElD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC5EA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,mBAAmB,mBAAO,CAAC,mEAAiB;AAC5C,kBAAkB,mBAAO,CAAC,iEAAgB;;AAE1C;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACxBA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;A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AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ,CAAC;;AAED;;;;;;;;;;;AC7BA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACrBA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,aAAa,UAAU;AACvB;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACdA,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;ACRA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACbA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;;;;;;;;;;ACjBA,gBAAgB,mBAAO,CAAC,6DAAc;;AAEtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACdA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,GAAG;AAChB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACbA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACbA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,UAAU,mBAAO,CAAC,iDAAQ;AAC1B,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjCA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;;;;;;;;;;;ACzBA,gBAAgB,mBAAO,CAAC,6DAAc;;AAEtC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,GAAG;AAChB;AACA;AACA;AACA,oBAAoB,QAAQ,IAAI,QAAQ;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,kBAAkB;AAClB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpCA,sBAAsB,mBAAO,CAAC,yEAAoB;AAClD,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA,8BAA8B,mBAAmB;AACjD;AACA;AACA;AACA;AACA;AACA,+CAA+C,mBAAmB;AAClE;AACA;AACA;;AAEA;;;;;;;;;;;ACnCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACzBA,iBAAiB,mBAAO,CAAC,6DAAc;AACvC,eAAe,mBAAO,CAAC,yDAAY;;AAEnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AChCA,WAAW,mBAAO,CAAC,mDAAS;AAC5B,gBAAgB,mBAAO,CAAC,2DAAa;;AAErC;AACA,kBAAkB,KAA0B;;AAE5C;AACA,gCAAgC,QAAa;;AAE7C;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACrCA,kBAAkB,mBAAO,CAAC,iEAAgB;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,kBAAkB;AAClB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClCA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,eAAe,mBAAO,CAAC,yDAAY;;AAEnC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpCA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClCA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC1BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC9BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC5BA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC1BA,uBAAuB,mBAAO,CAAC,2EAAqB;AACpD,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC1BA,oBAAoB,mBAAO,CAAC,qEAAkB;AAC9C,eAAe,mBAAO,CAAC,2DAAa;AACpC,kBAAkB,mBAAO,CAAC,+DAAe;;AAEzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpCA,oBAAoB,mBAAO,CAAC,qEAAkB;AAC9C,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,kBAAkB,mBAAO,CAAC,+DAAe;;AAEzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC/BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;;;;ACbA,uFAAyC;AAEzC;;GAEG;AACH,MAAa,iBAAiB;IAa7B;;;;OAIG;IACH,YAAY,kBAAsC,EAAE,MAAc;QATjD,mBAAc,GAA6B,IAAI,CAAC;QAEzD,kBAAa,GAAiC,IAAI,CAAC;QAQ1D,IAAI,CAAC,yBAAyB,GAAG,GAAG,CAAC;QACrC,IAAI,CAAC,wBAAwB,GAA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;;AAGA;AACA;AACA;AACA;;AAEA,kBAAkB,cAAc;AAChC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,kBAAkB,cAAc;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,kBAAkB,aAAa;AAC/B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,iEAAe,GAAG;;;;;;;;;;;;;;;ACtNlB,iEAAe,sCAAsC;;;;;;;;;;;;;;;;ACAhB;;AAErC;AACA,OAAO,wDAAQ;AACf;AACA;;AAEA;AACA,gCAAgC;;AAEhC;AACA;AACA;AACA,qBAAqB;;AAErB;AACA,qBAAqB;;AAErB;AACA,qBAAqB;;AAErB;AACA,qBAAqB;AACrB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,iEAAe,KAAK;;;;;;;;;;;;;;;AClCpB,iEAAe,cAAc,EAAE,UAAU,EAAE,eAAe,EAAE,gBAAgB,EAAE,UAAU,GAAG,yCA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M,cAAc,GAAG,IAAI,WAAW,CAAC,WAAW,CAAC,CAAC;YACpD,MAAM,CAAC,aAAa,CAAC,cAAc,CAAC,CAAC;QACtC,CAAC;QACD,2DAA2D;QAC3D,MAAM,eAAe,EAAE,CAAC;IACzB,CAAC;AACF,CAAC;AAED,IAAI,EAAE;KACJ,IAAI,CAAC,GAAG,EAAE;IACV,OAAO,CAAC,GAAG,CAAC,sCAAsC,CAAC,CAAC;IACpD,OAAO,IAAI,CAAC;AACb,CAAC,CAAC;KACD,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC","sources":["webpack://openfin-web--web-interop-support-context-and-intents/./node_modules/@openfin/cloud-interop/out/index.js","webpack://openfin-web--web-interop-support-context-and-intents/./node_modules/@openfin/core-web/out/api-client.js","webpack://openfin-web--web-interop-support-context-and-intents/./node_modules/@openfin/core-web/out/main-8cad4070.js","webpack://openfin-web--web-interop-support-context-and-intents/./node_modules/@openfin/core-web/out/main-b14f67c9.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/base64-js/index.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/buffer/index.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/events/events.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/ieee754/index.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_DataView.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_Hash.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_ListCache.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_Map.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_MapCache.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_Promise.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_Set.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_SetCache.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_Stack.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_Symbol.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_Uint8Array.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_WeakMap.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_arrayEach.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_arrayFilter.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_arrayLikeKeys.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_arrayPush.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_arraySome.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_assignValue.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_assocIndexOf.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseAssign.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseAssignIn.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseAssignValue.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseClone.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseCreate.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseGetAllKeys.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseGetTag.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseIsArguments.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseIsEqual.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseIsEqualDeep.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseIsMap.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseIsNative.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseIsSet.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseIsTypedArray.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseKeys.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseKeysIn.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseTimes.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseUnary.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_cacheHas.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_cloneArrayBuffer.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_cloneBuffer.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_cloneDataView.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_cloneRegExp.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_cloneSymbol.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_cloneTypedArray.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_copyArray.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_copyObject.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_copySymbols.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_copySymbolsIn.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_coreJsData.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_defineProperty.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_equalArrays.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_equalByTag.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_equalObjects.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_freeGlobal.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_getAllKeys.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_getAllKeysIn.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_getMapData.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_getNative.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_getPrototype.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_getRawTag.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_getSymbols.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_getSymbolsIn.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_getTag.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_getValue.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_hashClear.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_hashDelete.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_hashGet.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_hashHas.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_hashSet.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_initCloneArray.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_initCloneByTag.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_initCloneObject.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_isIndex.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_isKeyable.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_isMasked.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_isPrototype.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_listCacheClear.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_listCacheDelete.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_listCacheGet.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_listCacheHas.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_listCacheSet.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_mapCacheClear.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_mapCacheDelete.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_mapCacheGet.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_mapCacheHas.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_mapCacheSet.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_mapToArray.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_nativeCreate.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_nativeKeys.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_nativeKeysIn.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_nodeUtil.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_objectToString.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_overArg.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_root.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_setCacheAdd.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_setCacheHas.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_setToArray.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_stackClear.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_stackDelete.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_stackGet.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_stackHas.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_stackSet.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_toSource.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/cloneDeep.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/eq.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/isArguments.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/isArray.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/isArrayLike.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/isBuffer.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/isEqual.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/isFunction.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/isLength.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/isMap.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/isObject.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/isObjectLike.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/isSet.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/isTypedArray.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/keys.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/keysIn.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/stubArray.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/stubFalse.js","webpack://openfin-web--web-interop-support-context-and-intents/./client/src/platform/apps/app-resolver-helper.ts","webpack://openfin-web--web-interop-support-context-and-intents/./client/src/platform/apps/apps.ts","webpack://openfin-web--web-interop-support-context-and-intents/./client/src/platform/broker/app-id-helper.ts","webpack://openfin-web--web-interop-support-context-and-intents/./client/src/platform/broker/app-intent-helper.ts","webpack://openfin-web--web-interop-support-context-and-intents/./client/src/platform/broker/app-meta-data-helper.ts","webpack://openfin-web--web-interop-support-context-and-intents/./client/src/platform/broker/client-registration-helper.ts","webpack://openfin-web--web-interop-support-context-and-intents/./client/src/platform/broker/fdc3-errors.ts","webpack://openfin-web--web-interop-support-context-and-intents/./client/src/platform/broker/intent-resolver-helper.ts","webpack://openfin-web--web-interop-support-context-and-intents/./client/src/platform/broker/interop-override.ts","webpack://openfin-web--web-interop-support-context-and-intents/./client/src/platform/layout/layout-override.ts","webpack://openfin-web--web-interop-support-context-and-intents/./client/src/platform/settings/settings-resolver-helper.ts","webpack://openfin-web--web-interop-support-context-and-intents/./client/src/platform/settings/settings.ts","webpack://openfin-web--web-interop-support-context-and-intents/./client/src/utils.ts","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/index.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/md5.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/nil.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/parse.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/regex.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/rng.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/sha1.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/stringify.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/v1.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/v3.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/v35.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/v4.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/v5.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/validate.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/version.js","webpack://openfin-web--web-interop-support-context-and-intents/webpack/bootstrap","webpack://openfin-web--web-interop-support-context-and-intents/webpack/runtime/amd options","webpack://openfin-web--web-interop-support-context-and-intents/webpack/runtime/define property getters","webpack://openfin-web--web-interop-support-context-and-intents/webpack/runtime/global","webpack://openfin-web--web-interop-support-context-and-intents/webpack/runtime/hasOwnProperty shorthand","webpack://openfin-web--web-interop-support-context-and-intents/webpack/runtime/make namespace object","webpack://openfin-web--web-interop-support-context-and-intents/webpack/runtime/node module decorator","webpack://openfin-web--web-interop-support-context-and-intents/./client/src/provider.ts"],"sourcesContent":["import { Buffer } from 'buffer';\n\nfunction bind(fn, thisArg) {\n return function wrap() {\n return fn.apply(thisArg, arguments);\n };\n}\n\n// utils is a library of generic helper functions non-specific to axios\n\nconst {toString} = Object.prototype;\nconst {getPrototypeOf} = Object;\n\nconst kindOf = (cache => thing => {\n const str = toString.call(thing);\n return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());\n})(Object.create(null));\n\nconst kindOfTest = (type) => {\n type = type.toLowerCase();\n return (thing) => kindOf(thing) === type\n};\n\nconst typeOfTest = type => thing => typeof thing === type;\n\n/**\n * Determine if a value is an Array\n *\n * @param {Object} val The value to test\n *\n * @returns {boolean} True if value is an Array, otherwise false\n */\nconst {isArray} = Array;\n\n/**\n * Determine if a value is undefined\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if the value is undefined, otherwise false\n */\nconst isUndefined = typeOfTest('undefined');\n\n/**\n * Determine if a value is a Buffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Buffer, otherwise false\n */\nfunction isBuffer(val) {\n return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)\n && isFunction(val.constructor.isBuffer) && val.constructor.isBuffer(val);\n}\n\n/**\n * Determine if a value is an ArrayBuffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is an ArrayBuffer, otherwise false\n */\nconst isArrayBuffer = kindOfTest('ArrayBuffer');\n\n\n/**\n * Determine if a value is a view on an ArrayBuffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false\n */\nfunction isArrayBufferView(val) {\n let result;\n if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {\n result = ArrayBuffer.isView(val);\n } else {\n result = (val) && (val.buffer) && (isArrayBuffer(val.buffer));\n }\n return result;\n}\n\n/**\n * Determine if a value is a String\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a String, otherwise false\n */\nconst isString = typeOfTest('string');\n\n/**\n * Determine if a value is a Function\n *\n * @param {*} val The value to test\n * @returns {boolean} True if value is a Function, otherwise false\n */\nconst isFunction = typeOfTest('function');\n\n/**\n * Determine if a value is a Number\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Number, otherwise false\n */\nconst isNumber = typeOfTest('number');\n\n/**\n * Determine if a value is an Object\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value is an Object, otherwise false\n */\nconst isObject = (thing) => thing !== null && typeof thing === 'object';\n\n/**\n * Determine if a value is a Boolean\n *\n * @param {*} thing The value to test\n * @returns {boolean} True if value is a Boolean, otherwise false\n */\nconst isBoolean = thing => thing === true || thing === false;\n\n/**\n * Determine if a value is a plain Object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a plain Object, otherwise false\n */\nconst isPlainObject = (val) => {\n if (kindOf(val) !== 'object') {\n return false;\n }\n\n const prototype = getPrototypeOf(val);\n return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in val) && !(Symbol.iterator in val);\n};\n\n/**\n * Determine if a value is a Date\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Date, otherwise false\n */\nconst isDate = kindOfTest('Date');\n\n/**\n * Determine if a value is a File\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a File, otherwise false\n */\nconst isFile = kindOfTest('File');\n\n/**\n * Determine if a value is a Blob\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Blob, otherwise false\n */\nconst isBlob = kindOfTest('Blob');\n\n/**\n * Determine if a value is a FileList\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a File, otherwise false\n */\nconst isFileList = kindOfTest('FileList');\n\n/**\n * Determine if a value is a Stream\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Stream, otherwise false\n */\nconst isStream = (val) => isObject(val) && isFunction(val.pipe);\n\n/**\n * Determine if a value is a FormData\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value is an FormData, otherwise false\n */\nconst isFormData = (thing) => {\n let kind;\n return thing && (\n (typeof FormData === 'function' && thing instanceof FormData) || (\n isFunction(thing.append) && (\n (kind = kindOf(thing)) === 'formdata' ||\n // detect form-data instance\n (kind === 'object' && isFunction(thing.toString) && thing.toString() === '[object FormData]')\n )\n )\n )\n};\n\n/**\n * Determine if a value is a URLSearchParams object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a URLSearchParams object, otherwise false\n */\nconst isURLSearchParams = kindOfTest('URLSearchParams');\n\n/**\n * Trim excess whitespace off the beginning and end of a string\n *\n * @param {String} str The String to trim\n *\n * @returns {String} The String freed of excess whitespace\n */\nconst trim = (str) => str.trim ?\n str.trim() : str.replace(/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g, '');\n\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n *\n * @param {Boolean} [allOwnKeys = false]\n * @returns {any}\n */\nfunction forEach(obj, fn, {allOwnKeys = false} = {}) {\n // Don't bother if no value provided\n if (obj === null || typeof obj === 'undefined') {\n return;\n }\n\n let i;\n let l;\n\n // Force an array if not already something iterable\n if (typeof obj !== 'object') {\n /*eslint no-param-reassign:0*/\n obj = [obj];\n }\n\n if (isArray(obj)) {\n // Iterate over array values\n for (i = 0, l = obj.length; i < l; i++) {\n fn.call(null, obj[i], i, obj);\n }\n } else {\n // Iterate over object keys\n const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);\n const len = keys.length;\n let key;\n\n for (i = 0; i < len; i++) {\n key = keys[i];\n fn.call(null, obj[key], key, obj);\n }\n }\n}\n\nfunction findKey(obj, key) {\n key = key.toLowerCase();\n const keys = Object.keys(obj);\n let i = keys.length;\n let _key;\n while (i-- > 0) {\n _key = keys[i];\n if (key === _key.toLowerCase()) {\n return _key;\n }\n }\n return null;\n}\n\nconst _global = (() => {\n /*eslint no-undef:0*/\n if (typeof globalThis !== \"undefined\") return globalThis;\n return typeof self !== \"undefined\" ? self : (typeof window !== 'undefined' ? window : global)\n})();\n\nconst isContextDefined = (context) => !isUndefined(context) && context !== _global;\n\n/**\n * Accepts varargs expecting each argument to be an object, then\n * immutably merges the properties of each object and returns result.\n *\n * When multiple objects contain the same key the later object in\n * the arguments list will take precedence.\n *\n * Example:\n *\n * ```js\n * var result = merge({foo: 123}, {foo: 456});\n * console.log(result.foo); // outputs 456\n * ```\n *\n * @param {Object} obj1 Object to merge\n *\n * @returns {Object} Result of all merge properties\n */\nfunction merge(/* obj1, obj2, obj3, ... */) {\n const {caseless} = isContextDefined(this) && this || {};\n const result = {};\n const assignValue = (val, key) => {\n const targetKey = caseless && findKey(result, key) || key;\n if (isPlainObject(result[targetKey]) && isPlainObject(val)) {\n result[targetKey] = merge(result[targetKey], val);\n } else if (isPlainObject(val)) {\n result[targetKey] = merge({}, val);\n } else if (isArray(val)) {\n result[targetKey] = val.slice();\n } else {\n result[targetKey] = val;\n }\n };\n\n for (let i = 0, l = arguments.length; i < l; i++) {\n arguments[i] && forEach(arguments[i], assignValue);\n }\n return result;\n}\n\n/**\n * Extends object a by mutably adding to it the properties of object b.\n *\n * @param {Object} a The object to be extended\n * @param {Object} b The object to copy properties from\n * @param {Object} thisArg The object to bind function to\n *\n * @param {Boolean} [allOwnKeys]\n * @returns {Object} The resulting value of object a\n */\nconst extend = (a, b, thisArg, {allOwnKeys}= {}) => {\n forEach(b, (val, key) => {\n if (thisArg && isFunction(val)) {\n a[key] = bind(val, thisArg);\n } else {\n a[key] = val;\n }\n }, {allOwnKeys});\n return a;\n};\n\n/**\n * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)\n *\n * @param {string} content with BOM\n *\n * @returns {string} content value without BOM\n */\nconst stripBOM = (content) => {\n if (content.charCodeAt(0) === 0xFEFF) {\n content = content.slice(1);\n }\n return content;\n};\n\n/**\n * Inherit the prototype methods from one constructor into another\n * @param {function} constructor\n * @param {function} superConstructor\n * @param {object} [props]\n * @param {object} [descriptors]\n *\n * @returns {void}\n */\nconst inherits = (constructor, superConstructor, props, descriptors) => {\n constructor.prototype = Object.create(superConstructor.prototype, descriptors);\n constructor.prototype.constructor = constructor;\n Object.defineProperty(constructor, 'super', {\n value: superConstructor.prototype\n });\n props && Object.assign(constructor.prototype, props);\n};\n\n/**\n * Resolve object with deep prototype chain to a flat object\n * @param {Object} sourceObj source object\n * @param {Object} [destObj]\n * @param {Function|Boolean} [filter]\n * @param {Function} [propFilter]\n *\n * @returns {Object}\n */\nconst toFlatObject = (sourceObj, destObj, filter, propFilter) => {\n let props;\n let i;\n let prop;\n const merged = {};\n\n destObj = destObj || {};\n // eslint-disable-next-line no-eq-null,eqeqeq\n if (sourceObj == null) return destObj;\n\n do {\n props = Object.getOwnPropertyNames(sourceObj);\n i = props.length;\n while (i-- > 0) {\n prop = props[i];\n if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) {\n destObj[prop] = sourceObj[prop];\n merged[prop] = true;\n }\n }\n sourceObj = filter !== false && getPrototypeOf(sourceObj);\n } while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype);\n\n return destObj;\n};\n\n/**\n * Determines whether a string ends with the characters of a specified string\n *\n * @param {String} str\n * @param {String} searchString\n * @param {Number} [position= 0]\n *\n * @returns {boolean}\n */\nconst endsWith = (str, searchString, position) => {\n str = String(str);\n if (position === undefined || position > str.length) {\n position = str.length;\n }\n position -= searchString.length;\n const lastIndex = str.indexOf(searchString, position);\n return lastIndex !== -1 && lastIndex === position;\n};\n\n\n/**\n * Returns new array from array like object or null if failed\n *\n * @param {*} [thing]\n *\n * @returns {?Array}\n */\nconst toArray = (thing) => {\n if (!thing) return null;\n if (isArray(thing)) return thing;\n let i = thing.length;\n if (!isNumber(i)) return null;\n const arr = new Array(i);\n while (i-- > 0) {\n arr[i] = thing[i];\n }\n return arr;\n};\n\n/**\n * Checking if the Uint8Array exists and if it does, it returns a function that checks if the\n * thing passed in is an instance of Uint8Array\n *\n * @param {TypedArray}\n *\n * @returns {Array}\n */\n// eslint-disable-next-line func-names\nconst isTypedArray = (TypedArray => {\n // eslint-disable-next-line func-names\n return thing => {\n return TypedArray && thing instanceof TypedArray;\n };\n})(typeof Uint8Array !== 'undefined' && getPrototypeOf(Uint8Array));\n\n/**\n * For each entry in the object, call the function with the key and value.\n *\n * @param {Object} obj - The object to iterate over.\n * @param {Function} fn - The function to call for each entry.\n *\n * @returns {void}\n */\nconst forEachEntry = (obj, fn) => {\n const generator = obj && obj[Symbol.iterator];\n\n const iterator = generator.call(obj);\n\n let result;\n\n while ((result = iterator.next()) && !result.done) {\n const pair = result.value;\n fn.call(obj, pair[0], pair[1]);\n }\n};\n\n/**\n * It takes a regular expression and a string, and returns an array of all the matches\n *\n * @param {string} regExp - The regular expression to match against.\n * @param {string} str - The string to search.\n *\n * @returns {Array}\n */\nconst matchAll = (regExp, str) => {\n let matches;\n const arr = [];\n\n while ((matches = regExp.exec(str)) !== null) {\n arr.push(matches);\n }\n\n return arr;\n};\n\n/* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */\nconst isHTMLForm = kindOfTest('HTMLFormElement');\n\nconst toCamelCase = str => {\n return str.toLowerCase().replace(/[-_\\s]([a-z\\d])(\\w*)/g,\n function replacer(m, p1, p2) {\n return p1.toUpperCase() + p2;\n }\n );\n};\n\n/* Creating a function that will check if an object has a property. */\nconst hasOwnProperty = (({hasOwnProperty}) => (obj, prop) => hasOwnProperty.call(obj, prop))(Object.prototype);\n\n/**\n * Determine if a value is a RegExp object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a RegExp object, otherwise false\n */\nconst isRegExp = kindOfTest('RegExp');\n\nconst reduceDescriptors = (obj, reducer) => {\n const descriptors = Object.getOwnPropertyDescriptors(obj);\n const reducedDescriptors = {};\n\n forEach(descriptors, (descriptor, name) => {\n let ret;\n if ((ret = reducer(descriptor, name, obj)) !== false) {\n reducedDescriptors[name] = ret || descriptor;\n }\n });\n\n Object.defineProperties(obj, reducedDescriptors);\n};\n\n/**\n * Makes all methods read-only\n * @param {Object} obj\n */\n\nconst freezeMethods = (obj) => {\n reduceDescriptors(obj, (descriptor, name) => {\n // skip restricted props in strict mode\n if (isFunction(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) {\n return false;\n }\n\n const value = obj[name];\n\n if (!isFunction(value)) return;\n\n descriptor.enumerable = false;\n\n if ('writable' in descriptor) {\n descriptor.writable = false;\n return;\n }\n\n if (!descriptor.set) {\n descriptor.set = () => {\n throw Error('Can not rewrite read-only method \\'' + name + '\\'');\n };\n }\n });\n};\n\nconst toObjectSet = (arrayOrString, delimiter) => {\n const obj = {};\n\n const define = (arr) => {\n arr.forEach(value => {\n obj[value] = true;\n });\n };\n\n isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter));\n\n return obj;\n};\n\nconst noop = () => {};\n\nconst toFiniteNumber = (value, defaultValue) => {\n value = +value;\n return Number.isFinite(value) ? value : defaultValue;\n};\n\nconst ALPHA = 'abcdefghijklmnopqrstuvwxyz';\n\nconst DIGIT = '0123456789';\n\nconst ALPHABET = {\n DIGIT,\n ALPHA,\n ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT\n};\n\nconst generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {\n let str = '';\n const {length} = alphabet;\n while (size--) {\n str += alphabet[Math.random() * length|0];\n }\n\n return str;\n};\n\n/**\n * If the thing is a FormData object, return true, otherwise return false.\n *\n * @param {unknown} thing - The thing to check.\n *\n * @returns {boolean}\n */\nfunction isSpecCompliantForm(thing) {\n return !!(thing && isFunction(thing.append) && thing[Symbol.toStringTag] === 'FormData' && thing[Symbol.iterator]);\n}\n\nconst toJSONObject = (obj) => {\n const stack = new Array(10);\n\n const visit = (source, i) => {\n\n if (isObject(source)) {\n if (stack.indexOf(source) >= 0) {\n return;\n }\n\n if(!('toJSON' in source)) {\n stack[i] = source;\n const target = isArray(source) ? [] : {};\n\n forEach(source, (value, key) => {\n const reducedValue = visit(value, i + 1);\n !isUndefined(reducedValue) && (target[key] = reducedValue);\n });\n\n stack[i] = undefined;\n\n return target;\n }\n }\n\n return source;\n };\n\n return visit(obj, 0);\n};\n\nconst isAsyncFn = kindOfTest('AsyncFunction');\n\nconst isThenable = (thing) =>\n thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch);\n\nvar utils$1 = {\n isArray,\n isArrayBuffer,\n isBuffer,\n isFormData,\n isArrayBufferView,\n isString,\n isNumber,\n isBoolean,\n isObject,\n isPlainObject,\n isUndefined,\n isDate,\n isFile,\n isBlob,\n isRegExp,\n isFunction,\n isStream,\n isURLSearchParams,\n isTypedArray,\n isFileList,\n forEach,\n merge,\n extend,\n trim,\n stripBOM,\n inherits,\n toFlatObject,\n kindOf,\n kindOfTest,\n endsWith,\n toArray,\n forEachEntry,\n matchAll,\n isHTMLForm,\n hasOwnProperty,\n hasOwnProp: hasOwnProperty, // an alias to avoid ESLint no-prototype-builtins detection\n reduceDescriptors,\n freezeMethods,\n toObjectSet,\n toCamelCase,\n noop,\n toFiniteNumber,\n findKey,\n global: _global,\n isContextDefined,\n ALPHABET,\n generateString,\n isSpecCompliantForm,\n toJSONObject,\n isAsyncFn,\n isThenable\n};\n\n/**\n * Create an Error with the specified message, config, error code, request and response.\n *\n * @param {string} message The error message.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [config] The config.\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n *\n * @returns {Error} The created error.\n */\nfunction AxiosError(message, code, config, request, response) {\n Error.call(this);\n\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n } else {\n this.stack = (new Error()).stack;\n }\n\n this.message = message;\n this.name = 'AxiosError';\n code && (this.code = code);\n config && (this.config = config);\n request && (this.request = request);\n response && (this.response = response);\n}\n\nutils$1.inherits(AxiosError, Error, {\n toJSON: function toJSON() {\n return {\n // Standard\n message: this.message,\n name: this.name,\n // Microsoft\n description: this.description,\n number: this.number,\n // Mozilla\n fileName: this.fileName,\n lineNumber: this.lineNumber,\n columnNumber: this.columnNumber,\n stack: this.stack,\n // Axios\n config: utils$1.toJSONObject(this.config),\n code: this.code,\n status: this.response && this.response.status ? this.response.status : null\n };\n }\n});\n\nconst prototype$1 = AxiosError.prototype;\nconst descriptors = {};\n\n[\n 'ERR_BAD_OPTION_VALUE',\n 'ERR_BAD_OPTION',\n 'ECONNABORTED',\n 'ETIMEDOUT',\n 'ERR_NETWORK',\n 'ERR_FR_TOO_MANY_REDIRECTS',\n 'ERR_DEPRECATED',\n 'ERR_BAD_RESPONSE',\n 'ERR_BAD_REQUEST',\n 'ERR_CANCELED',\n 'ERR_NOT_SUPPORT',\n 'ERR_INVALID_URL'\n// eslint-disable-next-line func-names\n].forEach(code => {\n descriptors[code] = {value: code};\n});\n\nObject.defineProperties(AxiosError, descriptors);\nObject.defineProperty(prototype$1, 'isAxiosError', {value: true});\n\n// eslint-disable-next-line func-names\nAxiosError.from = (error, code, config, request, response, customProps) => {\n const axiosError = Object.create(prototype$1);\n\n utils$1.toFlatObject(error, axiosError, function filter(obj) {\n return obj !== Error.prototype;\n }, prop => {\n return prop !== 'isAxiosError';\n });\n\n AxiosError.call(axiosError, error.message, code, config, request, response);\n\n axiosError.cause = error;\n\n axiosError.name = error.name;\n\n customProps && Object.assign(axiosError, customProps);\n\n return axiosError;\n};\n\n// eslint-disable-next-line strict\nvar httpAdapter = null;\n\n/**\n * Determines if the given thing is a array or js object.\n *\n * @param {string} thing - The object or array to be visited.\n *\n * @returns {boolean}\n */\nfunction isVisitable(thing) {\n return utils$1.isPlainObject(thing) || utils$1.isArray(thing);\n}\n\n/**\n * It removes the brackets from the end of a string\n *\n * @param {string} key - The key of the parameter.\n *\n * @returns {string} the key without the brackets.\n */\nfunction removeBrackets(key) {\n return utils$1.endsWith(key, '[]') ? key.slice(0, -2) : key;\n}\n\n/**\n * It takes a path, a key, and a boolean, and returns a string\n *\n * @param {string} path - The path to the current key.\n * @param {string} key - The key of the current object being iterated over.\n * @param {string} dots - If true, the key will be rendered with dots instead of brackets.\n *\n * @returns {string} The path to the current key.\n */\nfunction renderKey(path, key, dots) {\n if (!path) return key;\n return path.concat(key).map(function each(token, i) {\n // eslint-disable-next-line no-param-reassign\n token = removeBrackets(token);\n return !dots && i ? '[' + token + ']' : token;\n }).join(dots ? '.' : '');\n}\n\n/**\n * If the array is an array and none of its elements are visitable, then it's a flat array.\n *\n * @param {Array} arr - The array to check\n *\n * @returns {boolean}\n */\nfunction isFlatArray(arr) {\n return utils$1.isArray(arr) && !arr.some(isVisitable);\n}\n\nconst predicates = utils$1.toFlatObject(utils$1, {}, null, function filter(prop) {\n return /^is[A-Z]/.test(prop);\n});\n\n/**\n * Convert a data object to FormData\n *\n * @param {Object} obj\n * @param {?Object} [formData]\n * @param {?Object} [options]\n * @param {Function} [options.visitor]\n * @param {Boolean} [options.metaTokens = true]\n * @param {Boolean} [options.dots = false]\n * @param {?Boolean} [options.indexes = false]\n *\n * @returns {Object}\n **/\n\n/**\n * It converts an object into a FormData object\n *\n * @param {Object} obj - The object to convert to form data.\n * @param {string} formData - The FormData object to append to.\n * @param {Object} options\n *\n * @returns\n */\nfunction toFormData(obj, formData, options) {\n if (!utils$1.isObject(obj)) {\n throw new TypeError('target must be an object');\n }\n\n // eslint-disable-next-line no-param-reassign\n formData = formData || new (FormData)();\n\n // eslint-disable-next-line no-param-reassign\n options = utils$1.toFlatObject(options, {\n metaTokens: true,\n dots: false,\n indexes: false\n }, false, function defined(option, source) {\n // eslint-disable-next-line no-eq-null,eqeqeq\n return !utils$1.isUndefined(source[option]);\n });\n\n const metaTokens = options.metaTokens;\n // eslint-disable-next-line no-use-before-define\n const visitor = options.visitor || defaultVisitor;\n const dots = options.dots;\n const indexes = options.indexes;\n const _Blob = options.Blob || typeof Blob !== 'undefined' && Blob;\n const useBlob = _Blob && utils$1.isSpecCompliantForm(formData);\n\n if (!utils$1.isFunction(visitor)) {\n throw new TypeError('visitor must be a function');\n }\n\n function convertValue(value) {\n if (value === null) return '';\n\n if (utils$1.isDate(value)) {\n return value.toISOString();\n }\n\n if (!useBlob && utils$1.isBlob(value)) {\n throw new AxiosError('Blob is not supported. Use a Buffer instead.');\n }\n\n if (utils$1.isArrayBuffer(value) || utils$1.isTypedArray(value)) {\n return useBlob && typeof Blob === 'function' ? new Blob([value]) : Buffer.from(value);\n }\n\n return value;\n }\n\n /**\n * Default visitor.\n *\n * @param {*} value\n * @param {String|Number} key\n * @param {Array} path\n * @this {FormData}\n *\n * @returns {boolean} return true to visit the each prop of the value recursively\n */\n function defaultVisitor(value, key, path) {\n let arr = value;\n\n if (value && !path && typeof value === 'object') {\n if (utils$1.endsWith(key, '{}')) {\n // eslint-disable-next-line no-param-reassign\n key = metaTokens ? key : key.slice(0, -2);\n // eslint-disable-next-line no-param-reassign\n value = JSON.stringify(value);\n } else if (\n (utils$1.isArray(value) && isFlatArray(value)) ||\n ((utils$1.isFileList(value) || utils$1.endsWith(key, '[]')) && (arr = utils$1.toArray(value))\n )) {\n // eslint-disable-next-line no-param-reassign\n key = removeBrackets(key);\n\n arr.forEach(function each(el, index) {\n !(utils$1.isUndefined(el) || el === null) && formData.append(\n // eslint-disable-next-line no-nested-ternary\n indexes === true ? renderKey([key], index, dots) : (indexes === null ? key : key + '[]'),\n convertValue(el)\n );\n });\n return false;\n }\n }\n\n if (isVisitable(value)) {\n return true;\n }\n\n formData.append(renderKey(path, key, dots), convertValue(value));\n\n return false;\n }\n\n const stack = [];\n\n const exposedHelpers = Object.assign(predicates, {\n defaultVisitor,\n convertValue,\n isVisitable\n });\n\n function build(value, path) {\n if (utils$1.isUndefined(value)) return;\n\n if (stack.indexOf(value) !== -1) {\n throw Error('Circular reference detected in ' + path.join('.'));\n }\n\n stack.push(value);\n\n utils$1.forEach(value, function each(el, key) {\n const result = !(utils$1.isUndefined(el) || el === null) && visitor.call(\n formData, el, utils$1.isString(key) ? key.trim() : key, path, exposedHelpers\n );\n\n if (result === true) {\n build(el, path ? path.concat(key) : [key]);\n }\n });\n\n stack.pop();\n }\n\n if (!utils$1.isObject(obj)) {\n throw new TypeError('data must be an object');\n }\n\n build(obj);\n\n return formData;\n}\n\n/**\n * It encodes a string by replacing all characters that are not in the unreserved set with\n * their percent-encoded equivalents\n *\n * @param {string} str - The string to encode.\n *\n * @returns {string} The encoded string.\n */\nfunction encode$1(str) {\n const charMap = {\n '!': '%21',\n \"'\": '%27',\n '(': '%28',\n ')': '%29',\n '~': '%7E',\n '%20': '+',\n '%00': '\\x00'\n };\n return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) {\n return charMap[match];\n });\n}\n\n/**\n * It takes a params object and converts it to a FormData object\n *\n * @param {Object} params - The parameters to be converted to a FormData object.\n * @param {Object} options - The options object passed to the Axios constructor.\n *\n * @returns {void}\n */\nfunction AxiosURLSearchParams(params, options) {\n this._pairs = [];\n\n params && toFormData(params, this, options);\n}\n\nconst prototype = AxiosURLSearchParams.prototype;\n\nprototype.append = function append(name, value) {\n this._pairs.push([name, value]);\n};\n\nprototype.toString = function toString(encoder) {\n const _encode = encoder ? function(value) {\n return encoder.call(this, value, encode$1);\n } : encode$1;\n\n return this._pairs.map(function each(pair) {\n return _encode(pair[0]) + '=' + _encode(pair[1]);\n }, '').join('&');\n};\n\n/**\n * It replaces all instances of the characters `:`, `$`, `,`, `+`, `[`, and `]` with their\n * URI encoded counterparts\n *\n * @param {string} val The value to be encoded.\n *\n * @returns {string} The encoded value.\n */\nfunction encode(val) {\n return encodeURIComponent(val).\n replace(/%3A/gi, ':').\n replace(/%24/g, '$').\n replace(/%2C/gi, ',').\n replace(/%20/g, '+').\n replace(/%5B/gi, '[').\n replace(/%5D/gi, ']');\n}\n\n/**\n * Build a URL by appending params to the end\n *\n * @param {string} url The base of the url (e.g., http://www.google.com)\n * @param {object} [params] The params to be appended\n * @param {?object} options\n *\n * @returns {string} The formatted url\n */\nfunction buildURL(url, params, options) {\n /*eslint no-param-reassign:0*/\n if (!params) {\n return url;\n }\n \n const _encode = options && options.encode || encode;\n\n const serializeFn = options && options.serialize;\n\n let serializedParams;\n\n if (serializeFn) {\n serializedParams = serializeFn(params, options);\n } else {\n serializedParams = utils$1.isURLSearchParams(params) ?\n params.toString() :\n new AxiosURLSearchParams(params, options).toString(_encode);\n }\n\n if (serializedParams) {\n const hashmarkIndex = url.indexOf(\"#\");\n\n if (hashmarkIndex !== -1) {\n url = url.slice(0, hashmarkIndex);\n }\n url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n }\n\n return url;\n}\n\nclass InterceptorManager {\n constructor() {\n this.handlers = [];\n }\n\n /**\n * Add a new interceptor to the stack\n *\n * @param {Function} fulfilled The function to handle `then` for a `Promise`\n * @param {Function} rejected The function to handle `reject` for a `Promise`\n *\n * @return {Number} An ID used to remove interceptor later\n */\n use(fulfilled, rejected, options) {\n this.handlers.push({\n fulfilled,\n rejected,\n synchronous: options ? options.synchronous : false,\n runWhen: options ? options.runWhen : null\n });\n return this.handlers.length - 1;\n }\n\n /**\n * Remove an interceptor from the stack\n *\n * @param {Number} id The ID that was returned by `use`\n *\n * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise\n */\n eject(id) {\n if (this.handlers[id]) {\n this.handlers[id] = null;\n }\n }\n\n /**\n * Clear all interceptors from the stack\n *\n * @returns {void}\n */\n clear() {\n if (this.handlers) {\n this.handlers = [];\n }\n }\n\n /**\n * Iterate over all the registered interceptors\n *\n * This method is particularly useful for skipping over any\n * interceptors that may have become `null` calling `eject`.\n *\n * @param {Function} fn The function to call for each interceptor\n *\n * @returns {void}\n */\n forEach(fn) {\n utils$1.forEach(this.handlers, function forEachHandler(h) {\n if (h !== null) {\n fn(h);\n }\n });\n }\n}\n\nvar transitionalDefaults = {\n silentJSONParsing: true,\n forcedJSONParsing: true,\n clarifyTimeoutError: false\n};\n\nvar URLSearchParams$1 = typeof URLSearchParams !== 'undefined' ? URLSearchParams : AxiosURLSearchParams;\n\nvar FormData$1 = typeof FormData !== 'undefined' ? FormData : null;\n\nvar Blob$1 = typeof Blob !== 'undefined' ? Blob : null;\n\nvar platform$1 = {\n isBrowser: true,\n classes: {\n URLSearchParams: URLSearchParams$1,\n FormData: FormData$1,\n Blob: Blob$1\n },\n protocols: ['http', 'https', 'file', 'blob', 'url', 'data']\n};\n\nconst hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined';\n\n/**\n * Determine if we're running in a standard browser environment\n *\n * This allows axios to run in a web worker, and react-native.\n * Both environments support XMLHttpRequest, but not fully standard globals.\n *\n * web workers:\n * typeof window -> undefined\n * typeof document -> undefined\n *\n * react-native:\n * navigator.product -> 'ReactNative'\n * nativescript\n * navigator.product -> 'NativeScript' or 'NS'\n *\n * @returns {boolean}\n */\nconst hasStandardBrowserEnv = (\n (product) => {\n return hasBrowserEnv && ['ReactNative', 'NativeScript', 'NS'].indexOf(product) < 0\n })(typeof navigator !== 'undefined' && navigator.product);\n\n/**\n * Determine if we're running in a standard browser webWorker environment\n *\n * Although the `isStandardBrowserEnv` method indicates that\n * `allows axios to run in a web worker`, the WebWorker will still be\n * filtered out due to its judgment standard\n * `typeof window !== 'undefined' && typeof document !== 'undefined'`.\n * This leads to a problem when axios post `FormData` in webWorker\n */\nconst hasStandardBrowserWebWorkerEnv = (() => {\n return (\n typeof WorkerGlobalScope !== 'undefined' &&\n // eslint-disable-next-line no-undef\n self instanceof WorkerGlobalScope &&\n typeof self.importScripts === 'function'\n );\n})();\n\nvar utils = /*#__PURE__*/Object.freeze({\n __proto__: null,\n hasBrowserEnv: hasBrowserEnv,\n hasStandardBrowserEnv: hasStandardBrowserEnv,\n hasStandardBrowserWebWorkerEnv: hasStandardBrowserWebWorkerEnv\n});\n\nvar platform = {\n ...utils,\n ...platform$1\n};\n\nfunction toURLEncodedForm(data, options) {\n return toFormData(data, new platform.classes.URLSearchParams(), Object.assign({\n visitor: function(value, key, path, helpers) {\n if (platform.isNode && utils$1.isBuffer(value)) {\n this.append(key, value.toString('base64'));\n return false;\n }\n\n return helpers.defaultVisitor.apply(this, arguments);\n }\n }, options));\n}\n\n/**\n * It takes a string like `foo[x][y][z]` and returns an array like `['foo', 'x', 'y', 'z']\n *\n * @param {string} name - The name of the property to get.\n *\n * @returns An array of strings.\n */\nfunction parsePropPath(name) {\n // foo[x][y][z]\n // foo.x.y.z\n // foo-x-y-z\n // foo x y z\n return utils$1.matchAll(/\\w+|\\[(\\w*)]/g, name).map(match => {\n return match[0] === '[]' ? '' : match[1] || match[0];\n });\n}\n\n/**\n * Convert an array to an object.\n *\n * @param {Array} arr - The array to convert to an object.\n *\n * @returns An object with the same keys and values as the array.\n */\nfunction arrayToObject(arr) {\n const obj = {};\n const keys = Object.keys(arr);\n let i;\n const len = keys.length;\n let key;\n for (i = 0; i < len; i++) {\n key = keys[i];\n obj[key] = arr[key];\n }\n return obj;\n}\n\n/**\n * It takes a FormData object and returns a JavaScript object\n *\n * @param {string} formData The FormData object to convert to JSON.\n *\n * @returns {Object | null} The converted object.\n */\nfunction formDataToJSON(formData) {\n function buildPath(path, value, target, index) {\n let name = path[index++];\n\n if (name === '__proto__') return true;\n\n const isNumericKey = Number.isFinite(+name);\n const isLast = index >= path.length;\n name = !name && utils$1.isArray(target) ? target.length : name;\n\n if (isLast) {\n if (utils$1.hasOwnProp(target, name)) {\n target[name] = [target[name], value];\n } else {\n target[name] = value;\n }\n\n return !isNumericKey;\n }\n\n if (!target[name] || !utils$1.isObject(target[name])) {\n target[name] = [];\n }\n\n const result = buildPath(path, value, target[name], index);\n\n if (result && utils$1.isArray(target[name])) {\n target[name] = arrayToObject(target[name]);\n }\n\n return !isNumericKey;\n }\n\n if (utils$1.isFormData(formData) && utils$1.isFunction(formData.entries)) {\n const obj = {};\n\n utils$1.forEachEntry(formData, (name, value) => {\n buildPath(parsePropPath(name), value, obj, 0);\n });\n\n return obj;\n }\n\n return null;\n}\n\n/**\n * It takes a string, tries to parse it, and if it fails, it returns the stringified version\n * of the input\n *\n * @param {any} rawValue - The value to be stringified.\n * @param {Function} parser - A function that parses a string into a JavaScript object.\n * @param {Function} encoder - A function that takes a value and returns a string.\n *\n * @returns {string} A stringified version of the rawValue.\n */\nfunction stringifySafely(rawValue, parser, encoder) {\n if (utils$1.isString(rawValue)) {\n try {\n (parser || JSON.parse)(rawValue);\n return utils$1.trim(rawValue);\n } catch (e) {\n if (e.name !== 'SyntaxError') {\n throw e;\n }\n }\n }\n\n return (encoder || JSON.stringify)(rawValue);\n}\n\nconst defaults = {\n\n transitional: transitionalDefaults,\n\n adapter: ['xhr', 'http'],\n\n transformRequest: [function transformRequest(data, headers) {\n const contentType = headers.getContentType() || '';\n const hasJSONContentType = contentType.indexOf('application/json') > -1;\n const isObjectPayload = utils$1.isObject(data);\n\n if (isObjectPayload && utils$1.isHTMLForm(data)) {\n data = new FormData(data);\n }\n\n const isFormData = utils$1.isFormData(data);\n\n if (isFormData) {\n return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;\n }\n\n if (utils$1.isArrayBuffer(data) ||\n utils$1.isBuffer(data) ||\n utils$1.isStream(data) ||\n utils$1.isFile(data) ||\n utils$1.isBlob(data)\n ) {\n return data;\n }\n if (utils$1.isArrayBufferView(data)) {\n return data.buffer;\n }\n if (utils$1.isURLSearchParams(data)) {\n headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false);\n return data.toString();\n }\n\n let isFileList;\n\n if (isObjectPayload) {\n if (contentType.indexOf('application/x-www-form-urlencoded') > -1) {\n return toURLEncodedForm(data, this.formSerializer).toString();\n }\n\n if ((isFileList = utils$1.isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) {\n const _FormData = this.env && this.env.FormData;\n\n return toFormData(\n isFileList ? {'files[]': data} : data,\n _FormData && new _FormData(),\n this.formSerializer\n );\n }\n }\n\n if (isObjectPayload || hasJSONContentType ) {\n headers.setContentType('application/json', false);\n return stringifySafely(data);\n }\n\n return data;\n }],\n\n transformResponse: [function transformResponse(data) {\n const transitional = this.transitional || defaults.transitional;\n const forcedJSONParsing = transitional && transitional.forcedJSONParsing;\n const JSONRequested = this.responseType === 'json';\n\n if (data && utils$1.isString(data) && ((forcedJSONParsing && !this.responseType) || JSONRequested)) {\n const silentJSONParsing = transitional && transitional.silentJSONParsing;\n const strictJSONParsing = !silentJSONParsing && JSONRequested;\n\n try {\n return JSON.parse(data);\n } catch (e) {\n if (strictJSONParsing) {\n if (e.name === 'SyntaxError') {\n throw AxiosError.from(e, AxiosError.ERR_BAD_RESPONSE, this, null, this.response);\n }\n throw e;\n }\n }\n }\n\n return data;\n }],\n\n /**\n * A timeout in milliseconds to abort a request. If set to 0 (default) a\n * timeout is not created.\n */\n timeout: 0,\n\n xsrfCookieName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN',\n\n maxContentLength: -1,\n maxBodyLength: -1,\n\n env: {\n FormData: platform.classes.FormData,\n Blob: platform.classes.Blob\n },\n\n validateStatus: function validateStatus(status) {\n return status >= 200 && status < 300;\n },\n\n headers: {\n common: {\n 'Accept': 'application/json, text/plain, */*',\n 'Content-Type': undefined\n }\n }\n};\n\nutils$1.forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => {\n defaults.headers[method] = {};\n});\n\nvar defaults$1 = defaults;\n\n// RawAxiosHeaders whose duplicates are ignored by node\n// c.f. https://nodejs.org/api/http.html#http_message_headers\nconst ignoreDuplicateOf = utils$1.toObjectSet([\n 'age', 'authorization', 'content-length', 'content-type', 'etag',\n 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',\n 'last-modified', 'location', 'max-forwards', 'proxy-authorization',\n 'referer', 'retry-after', 'user-agent'\n]);\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} rawHeaders Headers needing to be parsed\n *\n * @returns {Object} Headers parsed into an object\n */\nvar parseHeaders = rawHeaders => {\n const parsed = {};\n let key;\n let val;\n let i;\n\n rawHeaders && rawHeaders.split('\\n').forEach(function parser(line) {\n i = line.indexOf(':');\n key = line.substring(0, i).trim().toLowerCase();\n val = line.substring(i + 1).trim();\n\n if (!key || (parsed[key] && ignoreDuplicateOf[key])) {\n return;\n }\n\n if (key === 'set-cookie') {\n if (parsed[key]) {\n parsed[key].push(val);\n } else {\n parsed[key] = [val];\n }\n } else {\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n }\n });\n\n return parsed;\n};\n\nconst $internals = Symbol('internals');\n\nfunction normalizeHeader(header) {\n return header && String(header).trim().toLowerCase();\n}\n\nfunction normalizeValue(value) {\n if (value === false || value == null) {\n return value;\n }\n\n return utils$1.isArray(value) ? value.map(normalizeValue) : String(value);\n}\n\nfunction parseTokens(str) {\n const tokens = Object.create(null);\n const tokensRE = /([^\\s,;=]+)\\s*(?:=\\s*([^,;]+))?/g;\n let match;\n\n while ((match = tokensRE.exec(str))) {\n tokens[match[1]] = match[2];\n }\n\n return tokens;\n}\n\nconst isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());\n\nfunction matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {\n if (utils$1.isFunction(filter)) {\n return filter.call(this, value, header);\n }\n\n if (isHeaderNameFilter) {\n value = header;\n }\n\n if (!utils$1.isString(value)) return;\n\n if (utils$1.isString(filter)) {\n return value.indexOf(filter) !== -1;\n }\n\n if (utils$1.isRegExp(filter)) {\n return filter.test(value);\n }\n}\n\nfunction formatHeader(header) {\n return header.trim()\n .toLowerCase().replace(/([a-z\\d])(\\w*)/g, (w, char, str) => {\n return char.toUpperCase() + str;\n });\n}\n\nfunction buildAccessors(obj, header) {\n const accessorName = utils$1.toCamelCase(' ' + header);\n\n ['get', 'set', 'has'].forEach(methodName => {\n Object.defineProperty(obj, methodName + accessorName, {\n value: function(arg1, arg2, arg3) {\n return this[methodName].call(this, header, arg1, arg2, arg3);\n },\n configurable: true\n });\n });\n}\n\nclass AxiosHeaders {\n constructor(headers) {\n headers && this.set(headers);\n }\n\n set(header, valueOrRewrite, rewrite) {\n const self = this;\n\n function setHeader(_value, _header, _rewrite) {\n const lHeader = normalizeHeader(_header);\n\n if (!lHeader) {\n throw new Error('header name must be a non-empty string');\n }\n\n const key = utils$1.findKey(self, lHeader);\n\n if(!key || self[key] === undefined || _rewrite === true || (_rewrite === undefined && self[key] !== false)) {\n self[key || _header] = normalizeValue(_value);\n }\n }\n\n const setHeaders = (headers, _rewrite) =>\n utils$1.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));\n\n if (utils$1.isPlainObject(header) || header instanceof this.constructor) {\n setHeaders(header, valueOrRewrite);\n } else if(utils$1.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {\n setHeaders(parseHeaders(header), valueOrRewrite);\n } else {\n header != null && setHeader(valueOrRewrite, header, rewrite);\n }\n\n return this;\n }\n\n get(header, parser) {\n header = normalizeHeader(header);\n\n if (header) {\n const key = utils$1.findKey(this, header);\n\n if (key) {\n const value = this[key];\n\n if (!parser) {\n return value;\n }\n\n if (parser === true) {\n return parseTokens(value);\n }\n\n if (utils$1.isFunction(parser)) {\n return parser.call(this, value, key);\n }\n\n if (utils$1.isRegExp(parser)) {\n return parser.exec(value);\n }\n\n throw new TypeError('parser must be boolean|regexp|function');\n }\n }\n }\n\n has(header, matcher) {\n header = normalizeHeader(header);\n\n if (header) {\n const key = utils$1.findKey(this, header);\n\n return !!(key && this[key] !== undefined && (!matcher || matchHeaderValue(this, this[key], key, matcher)));\n }\n\n return false;\n }\n\n delete(header, matcher) {\n const self = this;\n let deleted = false;\n\n function deleteHeader(_header) {\n _header = normalizeHeader(_header);\n\n if (_header) {\n const key = utils$1.findKey(self, _header);\n\n if (key && (!matcher || matchHeaderValue(self, self[key], key, matcher))) {\n delete self[key];\n\n deleted = true;\n }\n }\n }\n\n if (utils$1.isArray(header)) {\n header.forEach(deleteHeader);\n } else {\n deleteHeader(header);\n }\n\n return deleted;\n }\n\n clear(matcher) {\n const keys = Object.keys(this);\n let i = keys.length;\n let deleted = false;\n\n while (i--) {\n const key = keys[i];\n if(!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {\n delete this[key];\n deleted = true;\n }\n }\n\n return deleted;\n }\n\n normalize(format) {\n const self = this;\n const headers = {};\n\n utils$1.forEach(this, (value, header) => {\n const key = utils$1.findKey(headers, header);\n\n if (key) {\n self[key] = normalizeValue(value);\n delete self[header];\n return;\n }\n\n const normalized = format ? formatHeader(header) : String(header).trim();\n\n if (normalized !== header) {\n delete self[header];\n }\n\n self[normalized] = normalizeValue(value);\n\n headers[normalized] = true;\n });\n\n return this;\n }\n\n concat(...targets) {\n return this.constructor.concat(this, ...targets);\n }\n\n toJSON(asStrings) {\n const obj = Object.create(null);\n\n utils$1.forEach(this, (value, header) => {\n value != null && value !== false && (obj[header] = asStrings && utils$1.isArray(value) ? value.join(', ') : value);\n });\n\n return obj;\n }\n\n [Symbol.iterator]() {\n return Object.entries(this.toJSON())[Symbol.iterator]();\n }\n\n toString() {\n return Object.entries(this.toJSON()).map(([header, value]) => header + ': ' + value).join('\\n');\n }\n\n get [Symbol.toStringTag]() {\n return 'AxiosHeaders';\n }\n\n static from(thing) {\n return thing instanceof this ? thing : new this(thing);\n }\n\n static concat(first, ...targets) {\n const computed = new this(first);\n\n targets.forEach((target) => computed.set(target));\n\n return computed;\n }\n\n static accessor(header) {\n const internals = this[$internals] = (this[$internals] = {\n accessors: {}\n });\n\n const accessors = internals.accessors;\n const prototype = this.prototype;\n\n function defineAccessor(_header) {\n const lHeader = normalizeHeader(_header);\n\n if (!accessors[lHeader]) {\n buildAccessors(prototype, _header);\n accessors[lHeader] = true;\n }\n }\n\n utils$1.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);\n\n return this;\n }\n}\n\nAxiosHeaders.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']);\n\n// reserved names hotfix\nutils$1.reduceDescriptors(AxiosHeaders.prototype, ({value}, key) => {\n let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set`\n return {\n get: () => value,\n set(headerValue) {\n this[mapped] = headerValue;\n }\n }\n});\n\nutils$1.freezeMethods(AxiosHeaders);\n\nvar AxiosHeaders$1 = AxiosHeaders;\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Array|Function} fns A single function or Array of functions\n * @param {?Object} response The response object\n *\n * @returns {*} The resulting transformed data\n */\nfunction transformData(fns, response) {\n const config = this || defaults$1;\n const context = response || config;\n const headers = AxiosHeaders$1.from(context.headers);\n let data = context.data;\n\n utils$1.forEach(fns, function transform(fn) {\n data = fn.call(config, data, headers.normalize(), response ? response.status : undefined);\n });\n\n headers.normalize();\n\n return data;\n}\n\nfunction isCancel(value) {\n return !!(value && value.__CANCEL__);\n}\n\n/**\n * A `CanceledError` is an object that is thrown when an operation is canceled.\n *\n * @param {string=} message The message.\n * @param {Object=} config The config.\n * @param {Object=} request The request.\n *\n * @returns {CanceledError} The created error.\n */\nfunction CanceledError(message, config, request) {\n // eslint-disable-next-line no-eq-null,eqeqeq\n AxiosError.call(this, message == null ? 'canceled' : message, AxiosError.ERR_CANCELED, config, request);\n this.name = 'CanceledError';\n}\n\nutils$1.inherits(CanceledError, AxiosError, {\n __CANCEL__: true\n});\n\n/**\n * Resolve or reject a Promise based on response status.\n *\n * @param {Function} resolve A function that resolves the promise.\n * @param {Function} reject A function that rejects the promise.\n * @param {object} response The response.\n *\n * @returns {object} The response.\n */\nfunction settle(resolve, reject, response) {\n const validateStatus = response.config.validateStatus;\n if (!response.status || !validateStatus || validateStatus(response.status)) {\n resolve(response);\n } else {\n reject(new AxiosError(\n 'Request failed with status code ' + response.status,\n [AxiosError.ERR_BAD_REQUEST, AxiosError.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],\n response.config,\n response.request,\n response\n ));\n }\n}\n\nvar cookies = platform.hasStandardBrowserEnv ?\n\n // Standard browser envs support document.cookie\n {\n write(name, value, expires, path, domain, secure) {\n const cookie = [name + '=' + encodeURIComponent(value)];\n\n utils$1.isNumber(expires) && cookie.push('expires=' + new Date(expires).toGMTString());\n\n utils$1.isString(path) && cookie.push('path=' + path);\n\n utils$1.isString(domain) && cookie.push('domain=' + domain);\n\n secure === true && cookie.push('secure');\n\n document.cookie = cookie.join('; ');\n },\n\n read(name) {\n const match = document.cookie.match(new RegExp('(^|;\\\\s*)(' + name + ')=([^;]*)'));\n return (match ? decodeURIComponent(match[3]) : null);\n },\n\n remove(name) {\n this.write(name, '', Date.now() - 86400000);\n }\n }\n\n :\n\n // Non-standard browser env (web workers, react-native) lack needed support.\n {\n write() {},\n read() {\n return null;\n },\n remove() {}\n };\n\n/**\n * Determines whether the specified URL is absolute\n *\n * @param {string} url The URL to test\n *\n * @returns {boolean} True if the specified URL is absolute, otherwise false\n */\nfunction isAbsoluteURL(url) {\n // A URL is considered absolute if it begins with \"://\" or \"//\" (protocol-relative URL).\n // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n // by any combination of letters, digits, plus, period, or hyphen.\n return /^([a-z][a-z\\d+\\-.]*:)?\\/\\//i.test(url);\n}\n\n/**\n * Creates a new URL by combining the specified URLs\n *\n * @param {string} baseURL The base URL\n * @param {string} relativeURL The relative URL\n *\n * @returns {string} The combined URL\n */\nfunction combineURLs(baseURL, relativeURL) {\n return relativeURL\n ? baseURL.replace(/\\/?\\/$/, '') + '/' + relativeURL.replace(/^\\/+/, '')\n : baseURL;\n}\n\n/**\n * Creates a new URL by combining the baseURL with the requestedURL,\n * only when the requestedURL is not already an absolute URL.\n * If the requestURL is absolute, this function returns the requestedURL untouched.\n *\n * @param {string} baseURL The base URL\n * @param {string} requestedURL Absolute or relative URL to combine\n *\n * @returns {string} The combined full path\n */\nfunction buildFullPath(baseURL, requestedURL) {\n if (baseURL && !isAbsoluteURL(requestedURL)) {\n return combineURLs(baseURL, requestedURL);\n }\n return requestedURL;\n}\n\nvar isURLSameOrigin = platform.hasStandardBrowserEnv ?\n\n// Standard browser envs have full support of the APIs needed to test\n// whether the request URL is of the same origin as current location.\n (function standardBrowserEnv() {\n const msie = /(msie|trident)/i.test(navigator.userAgent);\n const urlParsingNode = document.createElement('a');\n let originURL;\n\n /**\n * Parse a URL to discover its components\n *\n * @param {String} url The URL to be parsed\n * @returns {Object}\n */\n function resolveURL(url) {\n let href = url;\n\n if (msie) {\n // IE needs attribute set twice to normalize properties\n urlParsingNode.setAttribute('href', href);\n href = urlParsingNode.href;\n }\n\n urlParsingNode.setAttribute('href', href);\n\n // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils\n return {\n href: urlParsingNode.href,\n protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',\n host: urlParsingNode.host,\n search: urlParsingNode.search ? urlParsingNode.search.replace(/^\\?/, '') : '',\n hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',\n hostname: urlParsingNode.hostname,\n port: urlParsingNode.port,\n pathname: (urlParsingNode.pathname.charAt(0) === '/') ?\n urlParsingNode.pathname :\n '/' + urlParsingNode.pathname\n };\n }\n\n originURL = resolveURL(window.location.href);\n\n /**\n * Determine if a URL shares the same origin as the current location\n *\n * @param {String} requestURL The URL to test\n * @returns {boolean} True if URL shares the same origin, otherwise false\n */\n return function isURLSameOrigin(requestURL) {\n const parsed = (utils$1.isString(requestURL)) ? resolveURL(requestURL) : requestURL;\n return (parsed.protocol === originURL.protocol &&\n parsed.host === originURL.host);\n };\n })() :\n\n // Non standard browser envs (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return function isURLSameOrigin() {\n return true;\n };\n })();\n\nfunction parseProtocol(url) {\n const match = /^([-+\\w]{1,25})(:?\\/\\/|:)/.exec(url);\n return match && match[1] || '';\n}\n\n/**\n * Calculate data maxRate\n * @param {Number} [samplesCount= 10]\n * @param {Number} [min= 1000]\n * @returns {Function}\n */\nfunction speedometer(samplesCount, min) {\n samplesCount = samplesCount || 10;\n const bytes = new Array(samplesCount);\n const timestamps = new Array(samplesCount);\n let head = 0;\n let tail = 0;\n let firstSampleTS;\n\n min = min !== undefined ? min : 1000;\n\n return function push(chunkLength) {\n const now = Date.now();\n\n const startedAt = timestamps[tail];\n\n if (!firstSampleTS) {\n firstSampleTS = now;\n }\n\n bytes[head] = chunkLength;\n timestamps[head] = now;\n\n let i = tail;\n let bytesCount = 0;\n\n while (i !== head) {\n bytesCount += bytes[i++];\n i = i % samplesCount;\n }\n\n head = (head + 1) % samplesCount;\n\n if (head === tail) {\n tail = (tail + 1) % samplesCount;\n }\n\n if (now - firstSampleTS < min) {\n return;\n }\n\n const passed = startedAt && now - startedAt;\n\n return passed ? Math.round(bytesCount * 1000 / passed) : undefined;\n };\n}\n\nfunction progressEventReducer(listener, isDownloadStream) {\n let bytesNotified = 0;\n const _speedometer = speedometer(50, 250);\n\n return e => {\n const loaded = e.loaded;\n const total = e.lengthComputable ? e.total : undefined;\n const progressBytes = loaded - bytesNotified;\n const rate = _speedometer(progressBytes);\n const inRange = loaded <= total;\n\n bytesNotified = loaded;\n\n const data = {\n loaded,\n total,\n progress: total ? (loaded / total) : undefined,\n bytes: progressBytes,\n rate: rate ? rate : undefined,\n estimated: rate && total && inRange ? (total - loaded) / rate : undefined,\n event: e\n };\n\n data[isDownloadStream ? 'download' : 'upload'] = true;\n\n listener(data);\n };\n}\n\nconst isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';\n\nvar xhrAdapter = isXHRAdapterSupported && function (config) {\n return new Promise(function dispatchXhrRequest(resolve, reject) {\n let requestData = config.data;\n const requestHeaders = AxiosHeaders$1.from(config.headers).normalize();\n let {responseType, withXSRFToken} = config;\n let onCanceled;\n function done() {\n if (config.cancelToken) {\n config.cancelToken.unsubscribe(onCanceled);\n }\n\n if (config.signal) {\n config.signal.removeEventListener('abort', onCanceled);\n }\n }\n\n let contentType;\n\n if (utils$1.isFormData(requestData)) {\n if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {\n requestHeaders.setContentType(false); // Let the browser set it\n } else if ((contentType = requestHeaders.getContentType()) !== false) {\n // fix semicolon duplication issue for ReactNative FormData implementation\n const [type, ...tokens] = contentType ? contentType.split(';').map(token => token.trim()).filter(Boolean) : [];\n requestHeaders.setContentType([type || 'multipart/form-data', ...tokens].join('; '));\n }\n }\n\n let request = new XMLHttpRequest();\n\n // HTTP basic authentication\n if (config.auth) {\n const username = config.auth.username || '';\n const password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : '';\n requestHeaders.set('Authorization', 'Basic ' + btoa(username + ':' + password));\n }\n\n const fullPath = buildFullPath(config.baseURL, config.url);\n\n request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);\n\n // Set the request timeout in MS\n request.timeout = config.timeout;\n\n function onloadend() {\n if (!request) {\n return;\n }\n // Prepare the response\n const responseHeaders = AxiosHeaders$1.from(\n 'getAllResponseHeaders' in request && request.getAllResponseHeaders()\n );\n const responseData = !responseType || responseType === 'text' || responseType === 'json' ?\n request.responseText : request.response;\n const response = {\n data: responseData,\n status: request.status,\n statusText: request.statusText,\n headers: responseHeaders,\n config,\n request\n };\n\n settle(function _resolve(value) {\n resolve(value);\n done();\n }, function _reject(err) {\n reject(err);\n done();\n }, response);\n\n // Clean up request\n request = null;\n }\n\n if ('onloadend' in request) {\n // Use onloadend if available\n request.onloadend = onloadend;\n } else {\n // Listen for ready state to emulate onloadend\n request.onreadystatechange = function handleLoad() {\n if (!request || request.readyState !== 4) {\n return;\n }\n\n // The request errored out and we didn't get a response, this will be\n // handled by onerror instead\n // With one exception: request that using file: protocol, most browsers\n // will return status as 0 even though it's a successful request\n if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {\n return;\n }\n // readystate handler is calling before onerror or ontimeout handlers,\n // so we should call onloadend on the next 'tick'\n setTimeout(onloadend);\n };\n }\n\n // Handle browser request cancellation (as opposed to a manual cancellation)\n request.onabort = function handleAbort() {\n if (!request) {\n return;\n }\n\n reject(new AxiosError('Request aborted', AxiosError.ECONNABORTED, config, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle low level network errors\n request.onerror = function handleError() {\n // Real errors are hidden from us by the browser\n // onerror should only fire if it's a network error\n reject(new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle timeout\n request.ontimeout = function handleTimeout() {\n let timeoutErrorMessage = config.timeout ? 'timeout of ' + config.timeout + 'ms exceeded' : 'timeout exceeded';\n const transitional = config.transitional || transitionalDefaults;\n if (config.timeoutErrorMessage) {\n timeoutErrorMessage = config.timeoutErrorMessage;\n }\n reject(new AxiosError(\n timeoutErrorMessage,\n transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED,\n config,\n request));\n\n // Clean up request\n request = null;\n };\n\n // Add xsrf header\n // This is only done if running in a standard browser environment.\n // Specifically not if we're in a web worker, or react-native.\n if(platform.hasStandardBrowserEnv) {\n withXSRFToken && utils$1.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(config));\n\n if (withXSRFToken || (withXSRFToken !== false && isURLSameOrigin(fullPath))) {\n // Add xsrf header\n const xsrfValue = config.xsrfHeaderName && config.xsrfCookieName && cookies.read(config.xsrfCookieName);\n\n if (xsrfValue) {\n requestHeaders.set(config.xsrfHeaderName, xsrfValue);\n }\n }\n }\n\n // Remove Content-Type if data is undefined\n requestData === undefined && requestHeaders.setContentType(null);\n\n // Add headers to the request\n if ('setRequestHeader' in request) {\n utils$1.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {\n request.setRequestHeader(key, val);\n });\n }\n\n // Add withCredentials to request if needed\n if (!utils$1.isUndefined(config.withCredentials)) {\n request.withCredentials = !!config.withCredentials;\n }\n\n // Add responseType to request if needed\n if (responseType && responseType !== 'json') {\n request.responseType = config.responseType;\n }\n\n // Handle progress if needed\n if (typeof config.onDownloadProgress === 'function') {\n request.addEventListener('progress', progressEventReducer(config.onDownloadProgress, true));\n }\n\n // Not all browsers support upload events\n if (typeof config.onUploadProgress === 'function' && request.upload) {\n request.upload.addEventListener('progress', progressEventReducer(config.onUploadProgress));\n }\n\n if (config.cancelToken || config.signal) {\n // Handle cancellation\n // eslint-disable-next-line func-names\n onCanceled = cancel => {\n if (!request) {\n return;\n }\n reject(!cancel || cancel.type ? new CanceledError(null, config, request) : cancel);\n request.abort();\n request = null;\n };\n\n config.cancelToken && config.cancelToken.subscribe(onCanceled);\n if (config.signal) {\n config.signal.aborted ? onCanceled() : config.signal.addEventListener('abort', onCanceled);\n }\n }\n\n const protocol = parseProtocol(fullPath);\n\n if (protocol && platform.protocols.indexOf(protocol) === -1) {\n reject(new AxiosError('Unsupported protocol ' + protocol + ':', AxiosError.ERR_BAD_REQUEST, config));\n return;\n }\n\n\n // Send the request\n request.send(requestData || null);\n });\n};\n\nconst knownAdapters = {\n http: httpAdapter,\n xhr: xhrAdapter\n};\n\nutils$1.forEach(knownAdapters, (fn, value) => {\n if (fn) {\n try {\n Object.defineProperty(fn, 'name', {value});\n } catch (e) {\n // eslint-disable-next-line no-empty\n }\n Object.defineProperty(fn, 'adapterName', {value});\n }\n});\n\nconst renderReason = (reason) => `- ${reason}`;\n\nconst isResolvedHandle = (adapter) => utils$1.isFunction(adapter) || adapter === null || adapter === false;\n\nvar adapters = {\n getAdapter: (adapters) => {\n adapters = utils$1.isArray(adapters) ? adapters : [adapters];\n\n const {length} = adapters;\n let nameOrAdapter;\n let adapter;\n\n const rejectedReasons = {};\n\n for (let i = 0; i < length; i++) {\n nameOrAdapter = adapters[i];\n let id;\n\n adapter = nameOrAdapter;\n\n if (!isResolvedHandle(nameOrAdapter)) {\n adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];\n\n if (adapter === undefined) {\n throw new AxiosError(`Unknown adapter '${id}'`);\n }\n }\n\n if (adapter) {\n break;\n }\n\n rejectedReasons[id || '#' + i] = adapter;\n }\n\n if (!adapter) {\n\n const reasons = Object.entries(rejectedReasons)\n .map(([id, state]) => `adapter ${id} ` +\n (state === false ? 'is not supported by the environment' : 'is not available in the build')\n );\n\n let s = length ?\n (reasons.length > 1 ? 'since :\\n' + reasons.map(renderReason).join('\\n') : ' ' + renderReason(reasons[0])) :\n 'as no adapter specified';\n\n throw new AxiosError(\n `There is no suitable adapter to dispatch the request ` + s,\n 'ERR_NOT_SUPPORT'\n );\n }\n\n return adapter;\n },\n adapters: knownAdapters\n};\n\n/**\n * Throws a `CanceledError` if cancellation has been requested.\n *\n * @param {Object} config The config that is to be used for the request\n *\n * @returns {void}\n */\nfunction throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n\n if (config.signal && config.signal.aborted) {\n throw new CanceledError(null, config);\n }\n}\n\n/**\n * Dispatch a request to the server using the configured adapter.\n *\n * @param {object} config The config that is to be used for the request\n *\n * @returns {Promise} The Promise to be fulfilled\n */\nfunction dispatchRequest(config) {\n throwIfCancellationRequested(config);\n\n config.headers = AxiosHeaders$1.from(config.headers);\n\n // Transform request data\n config.data = transformData.call(\n config,\n config.transformRequest\n );\n\n if (['post', 'put', 'patch'].indexOf(config.method) !== -1) {\n config.headers.setContentType('application/x-www-form-urlencoded', false);\n }\n\n const adapter = adapters.getAdapter(config.adapter || defaults$1.adapter);\n\n return adapter(config).then(function onAdapterResolution(response) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n response.data = transformData.call(\n config,\n config.transformResponse,\n response\n );\n\n response.headers = AxiosHeaders$1.from(response.headers);\n\n return response;\n }, function onAdapterRejection(reason) {\n if (!isCancel(reason)) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n if (reason && reason.response) {\n reason.response.data = transformData.call(\n config,\n config.transformResponse,\n reason.response\n );\n reason.response.headers = AxiosHeaders$1.from(reason.response.headers);\n }\n }\n\n return Promise.reject(reason);\n });\n}\n\nconst headersToObject = (thing) => thing instanceof AxiosHeaders$1 ? { ...thing } : thing;\n\n/**\n * Config-specific merge-function which creates a new config-object\n * by merging two configuration objects together.\n *\n * @param {Object} config1\n * @param {Object} config2\n *\n * @returns {Object} New object resulting from merging config2 to config1\n */\nfunction mergeConfig(config1, config2) {\n // eslint-disable-next-line no-param-reassign\n config2 = config2 || {};\n const config = {};\n\n function getMergedValue(target, source, caseless) {\n if (utils$1.isPlainObject(target) && utils$1.isPlainObject(source)) {\n return utils$1.merge.call({caseless}, target, source);\n } else if (utils$1.isPlainObject(source)) {\n return utils$1.merge({}, source);\n } else if (utils$1.isArray(source)) {\n return source.slice();\n }\n return source;\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDeepProperties(a, b, caseless) {\n if (!utils$1.isUndefined(b)) {\n return getMergedValue(a, b, caseless);\n } else if (!utils$1.isUndefined(a)) {\n return getMergedValue(undefined, a, caseless);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function valueFromConfig2(a, b) {\n if (!utils$1.isUndefined(b)) {\n return getMergedValue(undefined, b);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function defaultToConfig2(a, b) {\n if (!utils$1.isUndefined(b)) {\n return getMergedValue(undefined, b);\n } else if (!utils$1.isUndefined(a)) {\n return getMergedValue(undefined, a);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDirectKeys(a, b, prop) {\n if (prop in config2) {\n return getMergedValue(a, b);\n } else if (prop in config1) {\n return getMergedValue(undefined, a);\n }\n }\n\n const mergeMap = {\n url: valueFromConfig2,\n method: valueFromConfig2,\n data: valueFromConfig2,\n baseURL: defaultToConfig2,\n transformRequest: defaultToConfig2,\n transformResponse: defaultToConfig2,\n paramsSerializer: defaultToConfig2,\n timeout: defaultToConfig2,\n timeoutMessage: defaultToConfig2,\n withCredentials: defaultToConfig2,\n withXSRFToken: defaultToConfig2,\n adapter: defaultToConfig2,\n responseType: defaultToConfig2,\n xsrfCookieName: defaultToConfig2,\n xsrfHeaderName: defaultToConfig2,\n onUploadProgress: defaultToConfig2,\n onDownloadProgress: defaultToConfig2,\n decompress: defaultToConfig2,\n maxContentLength: defaultToConfig2,\n maxBodyLength: defaultToConfig2,\n beforeRedirect: defaultToConfig2,\n transport: defaultToConfig2,\n httpAgent: defaultToConfig2,\n httpsAgent: defaultToConfig2,\n cancelToken: defaultToConfig2,\n socketPath: defaultToConfig2,\n responseEncoding: defaultToConfig2,\n validateStatus: mergeDirectKeys,\n headers: (a, b) => mergeDeepProperties(headersToObject(a), headersToObject(b), true)\n };\n\n utils$1.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {\n const merge = mergeMap[prop] || mergeDeepProperties;\n const configValue = merge(config1[prop], config2[prop], prop);\n (utils$1.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);\n });\n\n return config;\n}\n\nconst VERSION = \"1.6.8\";\n\nconst validators$1 = {};\n\n// eslint-disable-next-line func-names\n['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach((type, i) => {\n validators$1[type] = function validator(thing) {\n return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type;\n };\n});\n\nconst deprecatedWarnings = {};\n\n/**\n * Transitional option validator\n *\n * @param {function|boolean?} validator - set to false if the transitional option has been removed\n * @param {string?} version - deprecated version / removed since version\n * @param {string?} message - some message with additional info\n *\n * @returns {function}\n */\nvalidators$1.transitional = function transitional(validator, version, message) {\n function formatMessage(opt, desc) {\n return '[Axios v' + VERSION + '] Transitional option \\'' + opt + '\\'' + desc + (message ? '. ' + message : '');\n }\n\n // eslint-disable-next-line func-names\n return (value, opt, opts) => {\n if (validator === false) {\n throw new AxiosError(\n formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')),\n AxiosError.ERR_DEPRECATED\n );\n }\n\n if (version && !deprecatedWarnings[opt]) {\n deprecatedWarnings[opt] = true;\n // eslint-disable-next-line no-console\n console.warn(\n formatMessage(\n opt,\n ' has been deprecated since v' + version + ' and will be removed in the near future'\n )\n );\n }\n\n return validator ? validator(value, opt, opts) : true;\n };\n};\n\n/**\n * Assert object's properties type\n *\n * @param {object} options\n * @param {object} schema\n * @param {boolean?} allowUnknown\n *\n * @returns {object}\n */\n\nfunction assertOptions(options, schema, allowUnknown) {\n if (typeof options !== 'object') {\n throw new AxiosError('options must be an object', AxiosError.ERR_BAD_OPTION_VALUE);\n }\n const keys = Object.keys(options);\n let i = keys.length;\n while (i-- > 0) {\n const opt = keys[i];\n const validator = schema[opt];\n if (validator) {\n const value = options[opt];\n const result = value === undefined || validator(value, opt, options);\n if (result !== true) {\n throw new AxiosError('option ' + opt + ' must be ' + result, AxiosError.ERR_BAD_OPTION_VALUE);\n }\n continue;\n }\n if (allowUnknown !== true) {\n throw new AxiosError('Unknown option ' + opt, AxiosError.ERR_BAD_OPTION);\n }\n }\n}\n\nvar validator = {\n assertOptions,\n validators: validators$1\n};\n\nconst validators = validator.validators;\n\n/**\n * Create a new instance of Axios\n *\n * @param {Object} instanceConfig The default config for the instance\n *\n * @return {Axios} A new instance of Axios\n */\nclass Axios {\n constructor(instanceConfig) {\n this.defaults = instanceConfig;\n this.interceptors = {\n request: new InterceptorManager(),\n response: new InterceptorManager()\n };\n }\n\n /**\n * Dispatch a request\n *\n * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)\n * @param {?Object} config\n *\n * @returns {Promise} The Promise to be fulfilled\n */\n async request(configOrUrl, config) {\n try {\n return await this._request(configOrUrl, config);\n } catch (err) {\n if (err instanceof Error) {\n let dummy;\n\n Error.captureStackTrace ? Error.captureStackTrace(dummy = {}) : (dummy = new Error());\n\n // slice off the Error: ... line\n const stack = dummy.stack ? dummy.stack.replace(/^.+\\n/, '') : '';\n\n if (!err.stack) {\n err.stack = stack;\n // match without the 2 top stack lines\n } else if (stack && !String(err.stack).endsWith(stack.replace(/^.+\\n.+\\n/, ''))) {\n err.stack += '\\n' + stack;\n }\n }\n\n throw err;\n }\n }\n\n _request(configOrUrl, config) {\n /*eslint no-param-reassign:0*/\n // Allow for axios('example/url'[, config]) a la fetch API\n if (typeof configOrUrl === 'string') {\n config = config || {};\n config.url = configOrUrl;\n } else {\n config = configOrUrl || {};\n }\n\n config = mergeConfig(this.defaults, config);\n\n const {transitional, paramsSerializer, headers} = config;\n\n if (transitional !== undefined) {\n validator.assertOptions(transitional, {\n silentJSONParsing: validators.transitional(validators.boolean),\n forcedJSONParsing: validators.transitional(validators.boolean),\n clarifyTimeoutError: validators.transitional(validators.boolean)\n }, false);\n }\n\n if (paramsSerializer != null) {\n if (utils$1.isFunction(paramsSerializer)) {\n config.paramsSerializer = {\n serialize: paramsSerializer\n };\n } else {\n validator.assertOptions(paramsSerializer, {\n encode: validators.function,\n serialize: validators.function\n }, true);\n }\n }\n\n // Set config.method\n config.method = (config.method || this.defaults.method || 'get').toLowerCase();\n\n // Flatten headers\n let contextHeaders = headers && utils$1.merge(\n headers.common,\n headers[config.method]\n );\n\n headers && utils$1.forEach(\n ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],\n (method) => {\n delete headers[method];\n }\n );\n\n config.headers = AxiosHeaders$1.concat(contextHeaders, headers);\n\n // filter out skipped interceptors\n const requestInterceptorChain = [];\n let synchronousRequestInterceptors = true;\n this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) {\n return;\n }\n\n synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;\n\n requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);\n });\n\n const responseInterceptorChain = [];\n this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);\n });\n\n let promise;\n let i = 0;\n let len;\n\n if (!synchronousRequestInterceptors) {\n const chain = [dispatchRequest.bind(this), undefined];\n chain.unshift.apply(chain, requestInterceptorChain);\n chain.push.apply(chain, responseInterceptorChain);\n len = chain.length;\n\n promise = Promise.resolve(config);\n\n while (i < len) {\n promise = promise.then(chain[i++], chain[i++]);\n }\n\n return promise;\n }\n\n len = requestInterceptorChain.length;\n\n let newConfig = config;\n\n i = 0;\n\n while (i < len) {\n const onFulfilled = requestInterceptorChain[i++];\n const onRejected = requestInterceptorChain[i++];\n try {\n newConfig = onFulfilled(newConfig);\n } catch (error) {\n onRejected.call(this, error);\n break;\n }\n }\n\n try {\n promise = dispatchRequest.call(this, newConfig);\n } catch (error) {\n return Promise.reject(error);\n }\n\n i = 0;\n len = responseInterceptorChain.length;\n\n while (i < len) {\n promise = promise.then(responseInterceptorChain[i++], responseInterceptorChain[i++]);\n }\n\n return promise;\n }\n\n getUri(config) {\n config = mergeConfig(this.defaults, config);\n const fullPath = buildFullPath(config.baseURL, config.url);\n return buildURL(fullPath, config.params, config.paramsSerializer);\n }\n}\n\n// Provide aliases for supported request methods\nutils$1.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, config) {\n return this.request(mergeConfig(config || {}, {\n method,\n url,\n data: (config || {}).data\n }));\n };\n});\n\nutils$1.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n /*eslint func-names:0*/\n\n function generateHTTPMethod(isForm) {\n return function httpMethod(url, data, config) {\n return this.request(mergeConfig(config || {}, {\n method,\n headers: isForm ? {\n 'Content-Type': 'multipart/form-data'\n } : {},\n url,\n data\n }));\n };\n }\n\n Axios.prototype[method] = generateHTTPMethod();\n\n Axios.prototype[method + 'Form'] = generateHTTPMethod(true);\n});\n\nvar Axios$1 = Axios;\n\n/**\n * A `CancelToken` is an object that can be used to request cancellation of an operation.\n *\n * @param {Function} executor The executor function.\n *\n * @returns {CancelToken}\n */\nclass CancelToken {\n constructor(executor) {\n if (typeof executor !== 'function') {\n throw new TypeError('executor must be a function.');\n }\n\n let resolvePromise;\n\n this.promise = new Promise(function promiseExecutor(resolve) {\n resolvePromise = resolve;\n });\n\n const token = this;\n\n // eslint-disable-next-line func-names\n this.promise.then(cancel => {\n if (!token._listeners) return;\n\n let i = token._listeners.length;\n\n while (i-- > 0) {\n token._listeners[i](cancel);\n }\n token._listeners = null;\n });\n\n // eslint-disable-next-line func-names\n this.promise.then = onfulfilled => {\n let _resolve;\n // eslint-disable-next-line func-names\n const promise = new Promise(resolve => {\n token.subscribe(resolve);\n _resolve = resolve;\n }).then(onfulfilled);\n\n promise.cancel = function reject() {\n token.unsubscribe(_resolve);\n };\n\n return promise;\n };\n\n executor(function cancel(message, config, request) {\n if (token.reason) {\n // Cancellation has already been requested\n return;\n }\n\n token.reason = new CanceledError(message, config, request);\n resolvePromise(token.reason);\n });\n }\n\n /**\n * Throws a `CanceledError` if cancellation has been requested.\n */\n throwIfRequested() {\n if (this.reason) {\n throw this.reason;\n }\n }\n\n /**\n * Subscribe to the cancel signal\n */\n\n subscribe(listener) {\n if (this.reason) {\n listener(this.reason);\n return;\n }\n\n if (this._listeners) {\n this._listeners.push(listener);\n } else {\n this._listeners = [listener];\n }\n }\n\n /**\n * Unsubscribe from the cancel signal\n */\n\n unsubscribe(listener) {\n if (!this._listeners) {\n return;\n }\n const index = this._listeners.indexOf(listener);\n if (index !== -1) {\n this._listeners.splice(index, 1);\n }\n }\n\n /**\n * Returns an object that contains a new `CancelToken` and a function that, when called,\n * cancels the `CancelToken`.\n */\n static source() {\n let cancel;\n const token = new CancelToken(function executor(c) {\n cancel = c;\n });\n return {\n token,\n cancel\n };\n }\n}\n\nvar CancelToken$1 = CancelToken;\n\n/**\n * Syntactic sugar for invoking a function and expanding an array for arguments.\n *\n * Common use case would be to use `Function.prototype.apply`.\n *\n * ```js\n * function f(x, y, z) {}\n * var args = [1, 2, 3];\n * f.apply(null, args);\n * ```\n *\n * With `spread` this example can be re-written.\n *\n * ```js\n * spread(function(x, y, z) {})([1, 2, 3]);\n * ```\n *\n * @param {Function} callback\n *\n * @returns {Function}\n */\nfunction spread(callback) {\n return function wrap(arr) {\n return callback.apply(null, arr);\n };\n}\n\n/**\n * Determines whether the payload is an error thrown by Axios\n *\n * @param {*} payload The value to test\n *\n * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false\n */\nfunction isAxiosError(payload) {\n return utils$1.isObject(payload) && (payload.isAxiosError === true);\n}\n\nconst HttpStatusCode = {\n Continue: 100,\n SwitchingProtocols: 101,\n Processing: 102,\n EarlyHints: 103,\n Ok: 200,\n Created: 201,\n Accepted: 202,\n NonAuthoritativeInformation: 203,\n NoContent: 204,\n ResetContent: 205,\n PartialContent: 206,\n MultiStatus: 207,\n AlreadyReported: 208,\n ImUsed: 226,\n MultipleChoices: 300,\n MovedPermanently: 301,\n Found: 302,\n SeeOther: 303,\n NotModified: 304,\n UseProxy: 305,\n Unused: 306,\n TemporaryRedirect: 307,\n PermanentRedirect: 308,\n BadRequest: 400,\n Unauthorized: 401,\n PaymentRequired: 402,\n Forbidden: 403,\n NotFound: 404,\n MethodNotAllowed: 405,\n NotAcceptable: 406,\n ProxyAuthenticationRequired: 407,\n RequestTimeout: 408,\n Conflict: 409,\n Gone: 410,\n LengthRequired: 411,\n PreconditionFailed: 412,\n PayloadTooLarge: 413,\n UriTooLong: 414,\n UnsupportedMediaType: 415,\n RangeNotSatisfiable: 416,\n ExpectationFailed: 417,\n ImATeapot: 418,\n MisdirectedRequest: 421,\n UnprocessableEntity: 422,\n Locked: 423,\n FailedDependency: 424,\n TooEarly: 425,\n UpgradeRequired: 426,\n PreconditionRequired: 428,\n TooManyRequests: 429,\n RequestHeaderFieldsTooLarge: 431,\n UnavailableForLegalReasons: 451,\n InternalServerError: 500,\n NotImplemented: 501,\n BadGateway: 502,\n ServiceUnavailable: 503,\n GatewayTimeout: 504,\n HttpVersionNotSupported: 505,\n VariantAlsoNegotiates: 506,\n InsufficientStorage: 507,\n LoopDetected: 508,\n NotExtended: 510,\n NetworkAuthenticationRequired: 511,\n};\n\nObject.entries(HttpStatusCode).forEach(([key, value]) => {\n HttpStatusCode[value] = key;\n});\n\nvar HttpStatusCode$1 = HttpStatusCode;\n\n/**\n * Create an instance of Axios\n *\n * @param {Object} defaultConfig The default config for the instance\n *\n * @returns {Axios} A new instance of Axios\n */\nfunction createInstance(defaultConfig) {\n const context = new Axios$1(defaultConfig);\n const instance = bind(Axios$1.prototype.request, context);\n\n // Copy axios.prototype to instance\n utils$1.extend(instance, Axios$1.prototype, context, {allOwnKeys: true});\n\n // Copy context to instance\n utils$1.extend(instance, context, null, {allOwnKeys: true});\n\n // Factory for creating new instances\n instance.create = function create(instanceConfig) {\n return createInstance(mergeConfig(defaultConfig, instanceConfig));\n };\n\n return instance;\n}\n\n// Create the default instance to be exported\nconst axios = createInstance(defaults$1);\n\n// Expose Axios class to allow class inheritance\naxios.Axios = Axios$1;\n\n// Expose Cancel & CancelToken\naxios.CanceledError = CanceledError;\naxios.CancelToken = CancelToken$1;\naxios.isCancel = isCancel;\naxios.VERSION = VERSION;\naxios.toFormData = toFormData;\n\n// Expose AxiosError class\naxios.AxiosError = AxiosError;\n\n// alias for CanceledError for backward compatibility\naxios.Cancel = axios.CanceledError;\n\n// Expose all/spread\naxios.all = function all(promises) {\n return Promise.all(promises);\n};\n\naxios.spread = spread;\n\n// Expose isAxiosError\naxios.isAxiosError = isAxiosError;\n\n// Expose mergeConfig\naxios.mergeConfig = mergeConfig;\n\naxios.AxiosHeaders = AxiosHeaders$1;\n\naxios.formToJSON = thing => formDataToJSON(utils$1.isHTMLForm(thing) ? new FormData(thing) : thing);\n\naxios.getAdapter = adapters.getAdapter;\n\naxios.HttpStatusCode = HttpStatusCode$1;\n\naxios.default = axios;\n\nvar ds=Object.defineProperty;var zg=Object.getOwnPropertyDescriptor;var Kg=Object.getOwnPropertyNames;var Gg=Object.prototype.hasOwnProperty;var we=(t,e)=>()=>(t&&(e=t(t=0)),e);var M=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Qt=(t,e)=>{for(var r in e)ds(t,r,{get:e[r],enumerable:!0});},Qg=(t,e,r,i)=>{if(e&&typeof e==\"object\"||typeof e==\"function\")for(let n of Kg(e))!Gg.call(t,n)&&n!==r&&ds(t,n,{get:()=>e[n],enumerable:!(i=zg(e,n))||i.enumerable});return t};var X=t=>Qg(ds({},\"__esModule\",{value:!0}),t);var B,_=we(()=>{B={deviceMemory:8,hardwareConcurrency:8,language:\"en-US\"};});var P={};Qt(P,{_debugEnd:()=>yu,_debugProcess:()=>gu,_events:()=>ku,_eventsCount:()=>xu,_exiting:()=>Yl,_fatalExceptions:()=>cu,_getActiveHandles:()=>eu,_getActiveRequests:()=>Zl,_kill:()=>ru,_linkedBinding:()=>Gl,_maxListeners:()=>Ou,_preload_modules:()=>Cu,_rawDebug:()=>zl,_startProfilerIdleNotifier:()=>bu,_stopProfilerIdleNotifier:()=>wu,_tickCallback:()=>pu,abort:()=>Eu,addListener:()=>Mu,allowedNodeEnvironmentFlags:()=>lu,arch:()=>xl,argv:()=>Ul,argv0:()=>Ru,assert:()=>uu,binding:()=>Fl,chdir:()=>Hl,config:()=>Jl,cpuUsage:()=>Fi,cwd:()=>$l,debugPort:()=>Tu,default:()=>$u,dlopen:()=>Xl,domain:()=>Ql,emit:()=>Du,emitWarning:()=>jl,env:()=>Ll,execArgv:()=>Nl,execPath:()=>Iu,exit:()=>ou,features:()=>fu,hasUncaughtExceptionCaptureCallback:()=>du,hrtime:()=>ji,kill:()=>su,listeners:()=>Wu,memoryUsage:()=>nu,moduleLoadList:()=>Kl,nextTick:()=>Pl,off:()=>Uu,on:()=>bt,once:()=>Lu,openStdin:()=>au,pid:()=>Su,platform:()=>Ml,ppid:()=>Au,prependListener:()=>ju,prependOnceListener:()=>Fu,reallyExit:()=>tu,release:()=>Vl,removeAllListeners:()=>qu,removeListener:()=>Nu,resourceUsage:()=>iu,setSourceMapsEnabled:()=>Bu,setUncaughtExceptionCaptureCallback:()=>hu,stderr:()=>mu,stdin:()=>vu,stdout:()=>_u,title:()=>kl,umask:()=>Wl,uptime:()=>Pu,version:()=>ql,versions:()=>Dl});function ys(t){throw new Error(\"Node.js process \"+t+\" is not supported by JSPM core outside of Node.js\")}function Yg(){!xr||!Yt||(xr=!1,Yt.length?yt=Yt.concat(yt):Di=-1,yt.length&&Bl());}function Bl(){if(!xr){var t=setTimeout(Yg,0);xr=!0;for(var e=yt.length;e;){for(Yt=yt,yt=[];++Di1)for(var r=1;r{v();m();_();yt=[],xr=!1,Di=-1;Ol.prototype.run=function(){this.fun.apply(null,this.array);};kl=\"browser\",xl=\"x64\",Ml=\"browser\",Ll={PATH:\"/usr/bin\",LANG:B.language+\".UTF-8\",PWD:\"/\",HOME:\"/home\",TMP:\"/tmp\"},Ul=[\"/usr/bin/node\"],Nl=[],ql=\"v16.8.0\",Dl={},jl=function(t,e){console.warn((e?e+\": \":\"\")+t);},Fl=function(t){ys(\"binding\");},Wl=function(t){return 0},$l=function(){return \"/\"},Hl=function(t){},Vl={name:\"node\",sourceUrl:\"\",headersUrl:\"\",libUrl:\"\"};zl=ve,Kl=[];Ql={},Yl=!1,Jl={};tu=ve,ru=ve,Fi=function(){return {}},iu=Fi,nu=Fi,su=ve,ou=ve,au=ve,lu={};fu={inspector:!1,debug:!1,uv:!1,ipv6:!1,tls_alpn:!1,tls_sni:!1,tls_ocsp:!1,tls:!1,cached_builtins:!0},cu=ve,hu=ve;pu=ve,gu=ve,yu=ve,bu=ve,wu=ve,_u=void 0,mu=void 0,vu=void 0,Eu=ve,Su=2,Au=1,Iu=\"/bin/usr/node\",Tu=9229,Ru=\"node\",Cu=[],Bu=ve,Mt={now:typeof performance<\"u\"?performance.now.bind(performance):void 0,timing:typeof performance<\"u\"?performance.timing:void 0};Mt.now===void 0&&(ps=Date.now(),Mt.timing&&Mt.timing.navigationStart&&(ps=Mt.timing.navigationStart),Mt.now=()=>Date.now()-ps);gs=1e9;ji.bigint=function(t){var e=ji(t);return typeof BigInt>\"u\"?e[0]*gs+e[1]:BigInt(e[0]*gs)+BigInt(e[1])};Ou=10,ku={},xu=0;Mu=bt,Lu=bt,Uu=bt,Nu=bt,qu=bt,Du=ve,ju=bt,Fu=bt;$u={version:ql,versions:Dl,arch:xl,platform:Ml,release:Vl,_rawDebug:zl,moduleLoadList:Kl,binding:Fl,_linkedBinding:Gl,_events:ku,_eventsCount:xu,_maxListeners:Ou,on:bt,addListener:Mu,once:Lu,off:Uu,removeListener:Nu,removeAllListeners:qu,emit:Du,prependListener:ju,prependOnceListener:Fu,listeners:Wu,domain:Ql,_exiting:Yl,config:Jl,dlopen:Xl,uptime:Pu,_getActiveRequests:Zl,_getActiveHandles:eu,reallyExit:tu,_kill:ru,cpuUsage:Fi,resourceUsage:iu,memoryUsage:nu,kill:su,exit:ou,openStdin:au,allowedNodeEnvironmentFlags:lu,assert:uu,features:fu,_fatalExceptions:cu,setUncaughtExceptionCaptureCallback:hu,hasUncaughtExceptionCaptureCallback:du,emitWarning:jl,nextTick:Pl,_tickCallback:pu,_debugProcess:gu,_debugEnd:yu,_startProfilerIdleNotifier:bu,_stopProfilerIdleNotifier:wu,stdout:_u,stdin:vu,stderr:mu,abort:Eu,umask:Wl,chdir:Hl,cwd:$l,env:Ll,title:kl,argv:Ul,execArgv:Nl,pid:Su,ppid:Au,execPath:Iu,debugPort:Tu,hrtime:ji,argv0:Ru,_preload_modules:Cu,setSourceMapsEnabled:Bu};});var m=we(()=>{Hu();});var _e={};Qt(_e,{Buffer:()=>x,INSPECT_MAX_BYTES:()=>ey,default:()=>Lt,kMaxLength:()=>ty});function Jg(){if(Vu)return ui;Vu=!0,ui.byteLength=a,ui.toByteArray=c,ui.fromByteArray=g;for(var t=[],e=[],r=typeof Uint8Array<\"u\"?Uint8Array:Array,i=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\",n=0,o=i.length;n0)throw new Error(\"Invalid string. Length must be a multiple of 4\");var E=y.indexOf(\"=\");E===-1&&(E=w);var S=E===w?0:4-E%4;return [E,S]}function a(y){var w=s(y),E=w[0],S=w[1];return (E+S)*3/4-S}function u(y,w,E){return (w+E)*3/4-E}function c(y){var w,E=s(y),S=E[0],I=E[1],C=new r(u(y,S,I)),R=0,U=I>0?S-4:S,N;for(N=0;N>16&255,C[R++]=w>>8&255,C[R++]=w&255;return I===2&&(w=e[y.charCodeAt(N)]<<2|e[y.charCodeAt(N+1)]>>4,C[R++]=w&255),I===1&&(w=e[y.charCodeAt(N)]<<10|e[y.charCodeAt(N+1)]<<4|e[y.charCodeAt(N+2)]>>2,C[R++]=w>>8&255,C[R++]=w&255),C}function h(y){return t[y>>18&63]+t[y>>12&63]+t[y>>6&63]+t[y&63]}function d(y,w,E){for(var S,I=[],C=w;CU?U:R+C));return S===1?(w=y[E-1],I.push(t[w>>2]+t[w<<4&63]+\"==\")):S===2&&(w=(y[E-2]<<8)+y[E-1],I.push(t[w>>10]+t[w>>4&63]+t[w<<2&63]+\"=\")),I.join(\"\")}return ui}function Xg(){if(zu)return Wi;zu=!0;return Wi.read=function(t,e,r,i,n){var o,s,a=n*8-i-1,u=(1<>1,h=-7,d=r?n-1:0,g=r?-1:1,y=t[e+d];for(d+=g,o=y&(1<<-h)-1,y>>=-h,h+=a;h>0;o=o*256+t[e+d],d+=g,h-=8);for(s=o&(1<<-h)-1,o>>=-h,h+=i;h>0;s=s*256+t[e+d],d+=g,h-=8);if(o===0)o=1-c;else {if(o===u)return s?NaN:(y?-1:1)*(1/0);s=s+Math.pow(2,i),o=o-c;}return (y?-1:1)*s*Math.pow(2,o-i)},Wi.write=function(t,e,r,i,n,o){var s,a,u,c=o*8-n-1,h=(1<>1,g=n===23?Math.pow(2,-24)-Math.pow(2,-77):0,y=i?0:o-1,w=i?1:-1,E=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=h):(s=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-s))<1&&(s--,u*=2),s+d>=1?e+=g/u:e+=g*Math.pow(2,1-d),e*u>=2&&(s++,u/=2),s+d>=h?(a=0,s=h):s+d>=1?(a=(e*u-1)*Math.pow(2,n),s=s+d):(a=e*Math.pow(2,d-1)*Math.pow(2,n),s=0));n>=8;t[r+y]=a&255,y+=w,a/=256,n-=8);for(s=s<0;t[r+y]=s&255,y+=w,s/=256,c-=8);t[r+y-w]|=E*128;},Wi}function Zg(){if(Ku)return Jt;Ku=!0;let t=Jg(),e=Xg(),r=typeof Symbol==\"function\"&&typeof Symbol.for==\"function\"?Symbol.for(\"nodejs.util.inspect.custom\"):null;Jt.Buffer=s,Jt.SlowBuffer=I,Jt.INSPECT_MAX_BYTES=50;let i=2147483647;Jt.kMaxLength=i,s.TYPED_ARRAY_SUPPORT=n(),!s.TYPED_ARRAY_SUPPORT&&typeof console<\"u\"&&typeof console.error==\"function\"&&console.error(\"This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.\");function n(){try{let p=new Uint8Array(1),l={foo:function(){return 42}};return Object.setPrototypeOf(l,Uint8Array.prototype),Object.setPrototypeOf(p,l),p.foo()===42}catch{return !1}}Object.defineProperty(s.prototype,\"parent\",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),Object.defineProperty(s.prototype,\"offset\",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}});function o(p){if(p>i)throw new RangeError('The value \"'+p+'\" is invalid for option \"size\"');let l=new Uint8Array(p);return Object.setPrototypeOf(l,s.prototype),l}function s(p,l,f){if(typeof p==\"number\"){if(typeof l==\"string\")throw new TypeError('The \"string\" argument must be of type string. Received type number');return h(p)}return a(p,l,f)}s.poolSize=8192;function a(p,l,f){if(typeof p==\"string\")return d(p,l);if(ArrayBuffer.isView(p))return y(p);if(p==null)throw new TypeError(\"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type \"+typeof p);if(Ye(p,ArrayBuffer)||p&&Ye(p.buffer,ArrayBuffer)||typeof SharedArrayBuffer<\"u\"&&(Ye(p,SharedArrayBuffer)||p&&Ye(p.buffer,SharedArrayBuffer)))return w(p,l,f);if(typeof p==\"number\")throw new TypeError('The \"value\" argument must not be of type number. Received type number');let b=p.valueOf&&p.valueOf();if(b!=null&&b!==p)return s.from(b,l,f);let A=E(p);if(A)return A;if(typeof Symbol<\"u\"&&Symbol.toPrimitive!=null&&typeof p[Symbol.toPrimitive]==\"function\")return s.from(p[Symbol.toPrimitive](\"string\"),l,f);throw new TypeError(\"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type \"+typeof p)}s.from=function(p,l,f){return a(p,l,f)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array);function u(p){if(typeof p!=\"number\")throw new TypeError('\"size\" argument must be of type number');if(p<0)throw new RangeError('The value \"'+p+'\" is invalid for option \"size\"')}function c(p,l,f){return u(p),p<=0?o(p):l!==void 0?typeof f==\"string\"?o(p).fill(l,f):o(p).fill(l):o(p)}s.alloc=function(p,l,f){return c(p,l,f)};function h(p){return u(p),o(p<0?0:S(p)|0)}s.allocUnsafe=function(p){return h(p)},s.allocUnsafeSlow=function(p){return h(p)};function d(p,l){if((typeof l!=\"string\"||l===\"\")&&(l=\"utf8\"),!s.isEncoding(l))throw new TypeError(\"Unknown encoding: \"+l);let f=C(p,l)|0,b=o(f),A=b.write(p,l);return A!==f&&(b=b.slice(0,A)),b}function g(p){let l=p.length<0?0:S(p.length)|0,f=o(l);for(let b=0;b=i)throw new RangeError(\"Attempt to allocate Buffer larger than maximum size: 0x\"+i.toString(16)+\" bytes\");return p|0}function I(p){return +p!=p&&(p=0),s.alloc(+p)}s.isBuffer=function(l){return l!=null&&l._isBuffer===!0&&l!==s.prototype},s.compare=function(l,f){if(Ye(l,Uint8Array)&&(l=s.from(l,l.offset,l.byteLength)),Ye(f,Uint8Array)&&(f=s.from(f,f.offset,f.byteLength)),!s.isBuffer(l)||!s.isBuffer(f))throw new TypeError('The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array');if(l===f)return 0;let b=l.length,A=f.length;for(let T=0,O=Math.min(b,A);TA.length?(s.isBuffer(O)||(O=s.from(O)),O.copy(A,T)):Uint8Array.prototype.set.call(A,O,T);else if(s.isBuffer(O))O.copy(A,T);else throw new TypeError('\"list\" argument must be an Array of Buffers');T+=O.length;}return A};function C(p,l){if(s.isBuffer(p))return p.length;if(ArrayBuffer.isView(p)||Ye(p,ArrayBuffer))return p.byteLength;if(typeof p!=\"string\")throw new TypeError('The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof p);let f=p.length,b=arguments.length>2&&arguments[2]===!0;if(!b&&f===0)return 0;let A=!1;for(;;)switch(l){case\"ascii\":case\"latin1\":case\"binary\":return f;case\"utf8\":case\"utf-8\":return cs(p).length;case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return f*2;case\"hex\":return f>>>1;case\"base64\":return Cl(p).length;default:if(A)return b?-1:cs(p).length;l=(\"\"+l).toLowerCase(),A=!0;}}s.byteLength=C;function R(p,l,f){let b=!1;if((l===void 0||l<0)&&(l=0),l>this.length||((f===void 0||f>this.length)&&(f=this.length),f<=0)||(f>>>=0,l>>>=0,f<=l))return \"\";for(p||(p=\"utf8\");;)switch(p){case\"hex\":return Ng(this,l,f);case\"utf8\":case\"utf-8\":return Cr(this,l,f);case\"ascii\":return us(this,l,f);case\"latin1\":case\"binary\":return Ug(this,l,f);case\"base64\":return pe(this,l,f);case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return qg(this,l,f);default:if(b)throw new TypeError(\"Unknown encoding: \"+p);p=(p+\"\").toLowerCase(),b=!0;}}s.prototype._isBuffer=!0;function U(p,l,f){let b=p[l];p[l]=p[f],p[f]=b;}s.prototype.swap16=function(){let l=this.length;if(l%2!==0)throw new RangeError(\"Buffer size must be a multiple of 16-bits\");for(let f=0;ff&&(l+=\" ... \"),\"\"},r&&(s.prototype[r]=s.prototype.inspect),s.prototype.compare=function(l,f,b,A,T){if(Ye(l,Uint8Array)&&(l=s.from(l,l.offset,l.byteLength)),!s.isBuffer(l))throw new TypeError('The \"target\" argument must be one of type Buffer or Uint8Array. Received type '+typeof l);if(f===void 0&&(f=0),b===void 0&&(b=l?l.length:0),A===void 0&&(A=0),T===void 0&&(T=this.length),f<0||b>l.length||A<0||T>this.length)throw new RangeError(\"out of range index\");if(A>=T&&f>=b)return 0;if(A>=T)return -1;if(f>=b)return 1;if(f>>>=0,b>>>=0,A>>>=0,T>>>=0,this===l)return 0;let O=T-A,$=b-f,se=Math.min(O,$),te=this.slice(A,T),oe=l.slice(f,b);for(let J=0;J2147483647?f=2147483647:f<-2147483648&&(f=-2147483648),f=+f,hs(f)&&(f=A?0:p.length-1),f<0&&(f=p.length+f),f>=p.length){if(A)return -1;f=p.length-1;}else if(f<0)if(A)f=0;else return -1;if(typeof l==\"string\"&&(l=s.from(l,b)),s.isBuffer(l))return l.length===0?-1:W(p,l,f,b,A);if(typeof l==\"number\")return l=l&255,typeof Uint8Array.prototype.indexOf==\"function\"?A?Uint8Array.prototype.indexOf.call(p,l,f):Uint8Array.prototype.lastIndexOf.call(p,l,f):W(p,[l],f,b,A);throw new TypeError(\"val must be string, number or Buffer\")}function W(p,l,f,b,A){let T=1,O=p.length,$=l.length;if(b!==void 0&&(b=String(b).toLowerCase(),b===\"ucs2\"||b===\"ucs-2\"||b===\"utf16le\"||b===\"utf-16le\")){if(p.length<2||l.length<2)return -1;T=2,O/=2,$/=2,f/=2;}function se(oe,J){return T===1?oe[J]:oe.readUInt16BE(J*T)}let te;if(A){let oe=-1;for(te=f;teO&&(f=O-$),te=f;te>=0;te--){let oe=!0;for(let J=0;J<$;J++)if(se(p,te+J)!==se(l,J)){oe=!1;break}if(oe)return te}return -1}s.prototype.includes=function(l,f,b){return this.indexOf(l,f,b)!==-1},s.prototype.indexOf=function(l,f,b){return N(this,l,f,b,!0)},s.prototype.lastIndexOf=function(l,f,b){return N(this,l,f,b,!1)};function K(p,l,f,b){f=Number(f)||0;let A=p.length-f;b?(b=Number(b),b>A&&(b=A)):b=A;let T=l.length;b>T/2&&(b=T/2);let O;for(O=0;O>>0,isFinite(b)?(b=b>>>0,A===void 0&&(A=\"utf8\")):(A=b,b=void 0);else throw new Error(\"Buffer.write(string, encoding, offset[, length]) is no longer supported\");let T=this.length-f;if((b===void 0||b>T)&&(b=T),l.length>0&&(b<0||f<0)||f>this.length)throw new RangeError(\"Attempt to write outside buffer bounds\");A||(A=\"utf8\");let O=!1;for(;;)switch(A){case\"hex\":return K(this,l,f,b);case\"utf8\":case\"utf-8\":return z(this,l,f,b);case\"ascii\":case\"latin1\":case\"binary\":return Q(this,l,f,b);case\"base64\":return de(this,l,f,b);case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return Gt(this,l,f,b);default:if(O)throw new TypeError(\"Unknown encoding: \"+A);A=(\"\"+A).toLowerCase(),O=!0;}},s.prototype.toJSON=function(){return {type:\"Buffer\",data:Array.prototype.slice.call(this._arr||this,0)}};function pe(p,l,f){return l===0&&f===p.length?t.fromByteArray(p):t.fromByteArray(p.slice(l,f))}function Cr(p,l,f){f=Math.min(p.length,f);let b=[],A=l;for(;A239?4:T>223?3:T>191?2:1;if(A+$<=f){let se,te,oe,J;switch($){case 1:T<128&&(O=T);break;case 2:se=p[A+1],(se&192)===128&&(J=(T&31)<<6|se&63,J>127&&(O=J));break;case 3:se=p[A+1],te=p[A+2],(se&192)===128&&(te&192)===128&&(J=(T&15)<<12|(se&63)<<6|te&63,J>2047&&(J<55296||J>57343)&&(O=J));break;case 4:se=p[A+1],te=p[A+2],oe=p[A+3],(se&192)===128&&(te&192)===128&&(oe&192)===128&&(J=(T&15)<<18|(se&63)<<12|(te&63)<<6|oe&63,J>65535&&J<1114112&&(O=J));}}O===null?(O=65533,$=1):O>65535&&(O-=65536,b.push(O>>>10&1023|55296),O=56320|O&1023),b.push(O),A+=$;}return Pr(b)}let Br=4096;function Pr(p){let l=p.length;if(l<=Br)return String.fromCharCode.apply(String,p);let f=\"\",b=0;for(;bb)&&(f=b);let A=\"\";for(let T=l;Tb&&(l=b),f<0?(f+=b,f<0&&(f=0)):f>b&&(f=b),ff)throw new RangeError(\"Trying to access beyond buffer length\")}s.prototype.readUintLE=s.prototype.readUIntLE=function(l,f,b){l=l>>>0,f=f>>>0,b||ge(l,f,this.length);let A=this[l],T=1,O=0;for(;++O>>0,f=f>>>0,b||ge(l,f,this.length);let A=this[l+--f],T=1;for(;f>0&&(T*=256);)A+=this[l+--f]*T;return A},s.prototype.readUint8=s.prototype.readUInt8=function(l,f){return l=l>>>0,f||ge(l,1,this.length),this[l]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(l,f){return l=l>>>0,f||ge(l,2,this.length),this[l]|this[l+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(l,f){return l=l>>>0,f||ge(l,2,this.length),this[l]<<8|this[l+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(l,f){return l=l>>>0,f||ge(l,4,this.length),(this[l]|this[l+1]<<8|this[l+2]<<16)+this[l+3]*16777216},s.prototype.readUint32BE=s.prototype.readUInt32BE=function(l,f){return l=l>>>0,f||ge(l,4,this.length),this[l]*16777216+(this[l+1]<<16|this[l+2]<<8|this[l+3])},s.prototype.readBigUInt64LE=xt(function(l){l=l>>>0,kr(l,\"offset\");let f=this[l],b=this[l+7];(f===void 0||b===void 0)&&li(l,this.length-8);let A=f+this[++l]*2**8+this[++l]*2**16+this[++l]*2**24,T=this[++l]+this[++l]*2**8+this[++l]*2**16+b*2**24;return BigInt(A)+(BigInt(T)<>>0,kr(l,\"offset\");let f=this[l],b=this[l+7];(f===void 0||b===void 0)&&li(l,this.length-8);let A=f*2**24+this[++l]*2**16+this[++l]*2**8+this[++l],T=this[++l]*2**24+this[++l]*2**16+this[++l]*2**8+b;return (BigInt(A)<>>0,f=f>>>0,b||ge(l,f,this.length);let A=this[l],T=1,O=0;for(;++O=T&&(A-=Math.pow(2,8*f)),A},s.prototype.readIntBE=function(l,f,b){l=l>>>0,f=f>>>0,b||ge(l,f,this.length);let A=f,T=1,O=this[l+--A];for(;A>0&&(T*=256);)O+=this[l+--A]*T;return T*=128,O>=T&&(O-=Math.pow(2,8*f)),O},s.prototype.readInt8=function(l,f){return l=l>>>0,f||ge(l,1,this.length),this[l]&128?(255-this[l]+1)*-1:this[l]},s.prototype.readInt16LE=function(l,f){l=l>>>0,f||ge(l,2,this.length);let b=this[l]|this[l+1]<<8;return b&32768?b|4294901760:b},s.prototype.readInt16BE=function(l,f){l=l>>>0,f||ge(l,2,this.length);let b=this[l+1]|this[l]<<8;return b&32768?b|4294901760:b},s.prototype.readInt32LE=function(l,f){return l=l>>>0,f||ge(l,4,this.length),this[l]|this[l+1]<<8|this[l+2]<<16|this[l+3]<<24},s.prototype.readInt32BE=function(l,f){return l=l>>>0,f||ge(l,4,this.length),this[l]<<24|this[l+1]<<16|this[l+2]<<8|this[l+3]},s.prototype.readBigInt64LE=xt(function(l){l=l>>>0,kr(l,\"offset\");let f=this[l],b=this[l+7];(f===void 0||b===void 0)&&li(l,this.length-8);let A=this[l+4]+this[l+5]*2**8+this[l+6]*2**16+(b<<24);return (BigInt(A)<>>0,kr(l,\"offset\");let f=this[l],b=this[l+7];(f===void 0||b===void 0)&&li(l,this.length-8);let A=(f<<24)+this[++l]*2**16+this[++l]*2**8+this[++l];return (BigInt(A)<>>0,f||ge(l,4,this.length),e.read(this,l,!0,23,4)},s.prototype.readFloatBE=function(l,f){return l=l>>>0,f||ge(l,4,this.length),e.read(this,l,!1,23,4)},s.prototype.readDoubleLE=function(l,f){return l=l>>>0,f||ge(l,8,this.length),e.read(this,l,!0,52,8)},s.prototype.readDoubleBE=function(l,f){return l=l>>>0,f||ge(l,8,this.length),e.read(this,l,!1,52,8)};function Ce(p,l,f,b,A,T){if(!s.isBuffer(p))throw new TypeError('\"buffer\" argument must be a Buffer instance');if(l>A||lp.length)throw new RangeError(\"Index out of range\")}s.prototype.writeUintLE=s.prototype.writeUIntLE=function(l,f,b,A){if(l=+l,f=f>>>0,b=b>>>0,!A){let $=Math.pow(2,8*b)-1;Ce(this,l,f,b,$,0);}let T=1,O=0;for(this[f]=l&255;++O>>0,b=b>>>0,!A){let $=Math.pow(2,8*b)-1;Ce(this,l,f,b,$,0);}let T=b-1,O=1;for(this[f+T]=l&255;--T>=0&&(O*=256);)this[f+T]=l/O&255;return f+b},s.prototype.writeUint8=s.prototype.writeUInt8=function(l,f,b){return l=+l,f=f>>>0,b||Ce(this,l,f,1,255,0),this[f]=l&255,f+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(l,f,b){return l=+l,f=f>>>0,b||Ce(this,l,f,2,65535,0),this[f]=l&255,this[f+1]=l>>>8,f+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function(l,f,b){return l=+l,f=f>>>0,b||Ce(this,l,f,2,65535,0),this[f]=l>>>8,this[f+1]=l&255,f+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function(l,f,b){return l=+l,f=f>>>0,b||Ce(this,l,f,4,4294967295,0),this[f+3]=l>>>24,this[f+2]=l>>>16,this[f+1]=l>>>8,this[f]=l&255,f+4},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function(l,f,b){return l=+l,f=f>>>0,b||Ce(this,l,f,4,4294967295,0),this[f]=l>>>24,this[f+1]=l>>>16,this[f+2]=l>>>8,this[f+3]=l&255,f+4};function vl(p,l,f,b,A){Rl(l,b,A,p,f,7);let T=Number(l&BigInt(4294967295));p[f++]=T,T=T>>8,p[f++]=T,T=T>>8,p[f++]=T,T=T>>8,p[f++]=T;let O=Number(l>>BigInt(32)&BigInt(4294967295));return p[f++]=O,O=O>>8,p[f++]=O,O=O>>8,p[f++]=O,O=O>>8,p[f++]=O,f}function El(p,l,f,b,A){Rl(l,b,A,p,f,7);let T=Number(l&BigInt(4294967295));p[f+7]=T,T=T>>8,p[f+6]=T,T=T>>8,p[f+5]=T,T=T>>8,p[f+4]=T;let O=Number(l>>BigInt(32)&BigInt(4294967295));return p[f+3]=O,O=O>>8,p[f+2]=O,O=O>>8,p[f+1]=O,O=O>>8,p[f]=O,f+8}s.prototype.writeBigUInt64LE=xt(function(l,f=0){return vl(this,l,f,BigInt(0),BigInt(\"0xffffffffffffffff\"))}),s.prototype.writeBigUInt64BE=xt(function(l,f=0){return El(this,l,f,BigInt(0),BigInt(\"0xffffffffffffffff\"))}),s.prototype.writeIntLE=function(l,f,b,A){if(l=+l,f=f>>>0,!A){let se=Math.pow(2,8*b-1);Ce(this,l,f,b,se-1,-se);}let T=0,O=1,$=0;for(this[f]=l&255;++T>0)-$&255;return f+b},s.prototype.writeIntBE=function(l,f,b,A){if(l=+l,f=f>>>0,!A){let se=Math.pow(2,8*b-1);Ce(this,l,f,b,se-1,-se);}let T=b-1,O=1,$=0;for(this[f+T]=l&255;--T>=0&&(O*=256);)l<0&&$===0&&this[f+T+1]!==0&&($=1),this[f+T]=(l/O>>0)-$&255;return f+b},s.prototype.writeInt8=function(l,f,b){return l=+l,f=f>>>0,b||Ce(this,l,f,1,127,-128),l<0&&(l=255+l+1),this[f]=l&255,f+1},s.prototype.writeInt16LE=function(l,f,b){return l=+l,f=f>>>0,b||Ce(this,l,f,2,32767,-32768),this[f]=l&255,this[f+1]=l>>>8,f+2},s.prototype.writeInt16BE=function(l,f,b){return l=+l,f=f>>>0,b||Ce(this,l,f,2,32767,-32768),this[f]=l>>>8,this[f+1]=l&255,f+2},s.prototype.writeInt32LE=function(l,f,b){return l=+l,f=f>>>0,b||Ce(this,l,f,4,2147483647,-2147483648),this[f]=l&255,this[f+1]=l>>>8,this[f+2]=l>>>16,this[f+3]=l>>>24,f+4},s.prototype.writeInt32BE=function(l,f,b){return l=+l,f=f>>>0,b||Ce(this,l,f,4,2147483647,-2147483648),l<0&&(l=4294967295+l+1),this[f]=l>>>24,this[f+1]=l>>>16,this[f+2]=l>>>8,this[f+3]=l&255,f+4},s.prototype.writeBigInt64LE=xt(function(l,f=0){return vl(this,l,f,-BigInt(\"0x8000000000000000\"),BigInt(\"0x7fffffffffffffff\"))}),s.prototype.writeBigInt64BE=xt(function(l,f=0){return El(this,l,f,-BigInt(\"0x8000000000000000\"),BigInt(\"0x7fffffffffffffff\"))});function Sl(p,l,f,b,A,T){if(f+b>p.length)throw new RangeError(\"Index out of range\");if(f<0)throw new RangeError(\"Index out of range\")}function Al(p,l,f,b,A){return l=+l,f=f>>>0,A||Sl(p,l,f,4),e.write(p,l,f,b,23,4),f+4}s.prototype.writeFloatLE=function(l,f,b){return Al(this,l,f,!0,b)},s.prototype.writeFloatBE=function(l,f,b){return Al(this,l,f,!1,b)};function Il(p,l,f,b,A){return l=+l,f=f>>>0,A||Sl(p,l,f,8),e.write(p,l,f,b,52,8),f+8}s.prototype.writeDoubleLE=function(l,f,b){return Il(this,l,f,!0,b)},s.prototype.writeDoubleBE=function(l,f,b){return Il(this,l,f,!1,b)},s.prototype.copy=function(l,f,b,A){if(!s.isBuffer(l))throw new TypeError(\"argument should be a Buffer\");if(b||(b=0),!A&&A!==0&&(A=this.length),f>=l.length&&(f=l.length),f||(f=0),A>0&&A=this.length)throw new RangeError(\"Index out of range\");if(A<0)throw new RangeError(\"sourceEnd out of bounds\");A>this.length&&(A=this.length),l.length-f>>0,b=b===void 0?this.length:b>>>0,l||(l=0);let T;if(typeof l==\"number\")for(T=f;T2**32?A=Tl(String(f)):typeof f==\"bigint\"&&(A=String(f),(f>BigInt(2)**BigInt(32)||f<-(BigInt(2)**BigInt(32)))&&(A=Tl(A)),A+=\"n\"),b+=` It must be ${l}. Received ${A}`,b},RangeError);function Tl(p){let l=\"\",f=p.length,b=p[0]===\"-\"?1:0;for(;f>=b+4;f-=3)l=`_${p.slice(f-3,f)}${l}`;return `${p.slice(0,f)}${l}`}function Dg(p,l,f){kr(l,\"offset\"),(p[l]===void 0||p[l+f]===void 0)&&li(l,p.length-(f+1));}function Rl(p,l,f,b,A,T){if(p>f||p3?l===0||l===BigInt(0)?$=`>= 0${O} and < 2${O} ** ${(T+1)*8}${O}`:$=`>= -(2${O} ** ${(T+1)*8-1}${O}) and < 2 ** ${(T+1)*8-1}${O}`:$=`>= ${l}${O} and <= ${f}${O}`,new Or.ERR_OUT_OF_RANGE(\"value\",$,p)}Dg(b,A,T);}function kr(p,l){if(typeof p!=\"number\")throw new Or.ERR_INVALID_ARG_TYPE(l,\"number\",p)}function li(p,l,f){throw Math.floor(p)!==p?(kr(p,f),new Or.ERR_OUT_OF_RANGE(f||\"offset\",\"an integer\",p)):l<0?new Or.ERR_BUFFER_OUT_OF_BOUNDS:new Or.ERR_OUT_OF_RANGE(f||\"offset\",`>= ${f?1:0} and <= ${l}`,p)}let jg=/[^+/0-9A-Za-z-_]/g;function Fg(p){if(p=p.split(\"=\")[0],p=p.trim().replace(jg,\"\"),p.length<2)return \"\";for(;p.length%4!==0;)p=p+\"=\";return p}function cs(p,l){l=l||1/0;let f,b=p.length,A=null,T=[];for(let O=0;O55295&&f<57344){if(!A){if(f>56319){(l-=3)>-1&&T.push(239,191,189);continue}else if(O+1===b){(l-=3)>-1&&T.push(239,191,189);continue}A=f;continue}if(f<56320){(l-=3)>-1&&T.push(239,191,189),A=f;continue}f=(A-55296<<10|f-56320)+65536;}else A&&(l-=3)>-1&&T.push(239,191,189);if(A=null,f<128){if((l-=1)<0)break;T.push(f);}else if(f<2048){if((l-=2)<0)break;T.push(f>>6|192,f&63|128);}else if(f<65536){if((l-=3)<0)break;T.push(f>>12|224,f>>6&63|128,f&63|128);}else if(f<1114112){if((l-=4)<0)break;T.push(f>>18|240,f>>12&63|128,f>>6&63|128,f&63|128);}else throw new Error(\"Invalid code point\")}return T}function Wg(p){let l=[];for(let f=0;f>8,A=f%256,T.push(A),T.push(b);return T}function Cl(p){return t.toByteArray(Fg(p))}function qi(p,l,f,b){let A;for(A=0;A=l.length||A>=p.length);++A)l[A+f]=p[A];return A}function Ye(p,l){return p instanceof l||p!=null&&p.constructor!=null&&p.constructor.name!=null&&p.constructor.name===l.name}function hs(p){return p!==p}let Hg=function(){let p=\"0123456789abcdef\",l=new Array(256);for(let f=0;f<16;++f){let b=f*16;for(let A=0;A<16;++A)l[b+A]=p[f]+p[A];}return l}();function xt(p){return typeof BigInt>\"u\"?Vg:p}function Vg(){throw new Error(\"BigInt not supported\")}return Jt}var ui,Vu,Wi,zu,Jt,Ku,Lt,x,ey,ty,ye=we(()=>{v();m();_();ui={},Vu=!1;Wi={},zu=!1;Jt={},Ku=!1;Lt=Zg();Lt.Buffer;Lt.SlowBuffer;Lt.INSPECT_MAX_BYTES;Lt.kMaxLength;x=Lt.Buffer,ey=Lt.INSPECT_MAX_BYTES,ty=Lt.kMaxLength;});var v=we(()=>{ye();});var Gu=M(ws=>{v();m();_();Object.defineProperty(ws,\"__esModule\",{value:!0});var bs=class{constructor(e){this.aliasToTopic={},this.max=e;}put(e,r){return r===0||r>this.max?!1:(this.aliasToTopic[r]=e,this.length=Object.keys(this.aliasToTopic).length,!0)}getTopicByAlias(e){return this.aliasToTopic[e]}clear(){this.aliasToTopic={};}};ws.default=bs;});var ce=M((PA,Qu)=>{v();m();_();Qu.exports={ArrayIsArray(t){return Array.isArray(t)},ArrayPrototypeIncludes(t,e){return t.includes(e)},ArrayPrototypeIndexOf(t,e){return t.indexOf(e)},ArrayPrototypeJoin(t,e){return t.join(e)},ArrayPrototypeMap(t,e){return t.map(e)},ArrayPrototypePop(t,e){return t.pop(e)},ArrayPrototypePush(t,e){return t.push(e)},ArrayPrototypeSlice(t,e,r){return t.slice(e,r)},Error,FunctionPrototypeCall(t,e,...r){return t.call(e,...r)},FunctionPrototypeSymbolHasInstance(t,e){return Function.prototype[Symbol.hasInstance].call(t,e)},MathFloor:Math.floor,Number,NumberIsInteger:Number.isInteger,NumberIsNaN:Number.isNaN,NumberMAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER,NumberMIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER,NumberParseInt:Number.parseInt,ObjectDefineProperties(t,e){return Object.defineProperties(t,e)},ObjectDefineProperty(t,e,r){return Object.defineProperty(t,e,r)},ObjectGetOwnPropertyDescriptor(t,e){return Object.getOwnPropertyDescriptor(t,e)},ObjectKeys(t){return Object.keys(t)},ObjectSetPrototypeOf(t,e){return Object.setPrototypeOf(t,e)},Promise,PromisePrototypeCatch(t,e){return t.catch(e)},PromisePrototypeThen(t,e,r){return t.then(e,r)},PromiseReject(t){return Promise.reject(t)},ReflectApply:Reflect.apply,RegExpPrototypeTest(t,e){return t.test(e)},SafeSet:Set,String,StringPrototypeSlice(t,e,r){return t.slice(e,r)},StringPrototypeToLowerCase(t){return t.toLowerCase()},StringPrototypeToUpperCase(t){return t.toUpperCase()},StringPrototypeTrim(t){return t.trim()},Symbol,SymbolFor:Symbol.for,SymbolAsyncIterator:Symbol.asyncIterator,SymbolHasInstance:Symbol.hasInstance,SymbolIterator:Symbol.iterator,TypedArrayPrototypeSet(t,e,r){return t.set(e,r)},Uint8Array};});var Je=M((jA,ms)=>{v();m();_();var ry=(ye(),X(_e)),iy=Object.getPrototypeOf(async function(){}).constructor,Yu=globalThis.Blob||ry.Blob,ny=typeof Yu<\"u\"?function(e){return e instanceof Yu}:function(e){return !1},_s=class extends Error{constructor(e){if(!Array.isArray(e))throw new TypeError(`Expected input to be an Array, got ${typeof e}`);let r=\"\";for(let i=0;i{t=i,e=n;}),resolve:t,reject:e}},promisify(t){return new Promise((e,r)=>{t((i,...n)=>i?r(i):e(...n));})},debuglog(){return function(){}},format(t,...e){return t.replace(/%([sdifj])/g,function(...[r,i]){let n=e.shift();return i===\"f\"?n.toFixed(6):i===\"j\"?JSON.stringify(n):i===\"s\"&&typeof n==\"object\"?`${n.constructor!==Object?n.constructor.name:\"\"} {}`.trim():n.toString()})},inspect(t){switch(typeof t){case\"string\":if(t.includes(\"'\"))if(t.includes('\"')){if(!t.includes(\"`\")&&!t.includes(\"${\"))return `\\`${t}\\``}else return `\"${t}\"`;return `'${t}'`;case\"number\":return isNaN(t)?\"NaN\":Object.is(t,-0)?String(t):t;case\"bigint\":return `${String(t)}n`;case\"boolean\":case\"undefined\":return String(t);case\"object\":return \"{}\"}},types:{isAsyncFunction(t){return t instanceof iy},isArrayBufferView(t){return ArrayBuffer.isView(t)}},isBlob:ny};ms.exports.promisify.custom=Symbol.for(\"nodejs.util.promisify.custom\");});var Hi=M((YA,$i)=>{v();m();_();var{AbortController:Ju,AbortSignal:sy}=typeof self<\"u\"?self:typeof window<\"u\"?window:void 0;$i.exports=Ju;$i.exports.AbortSignal=sy;$i.exports.default=Ju;});var Se=M((oI,ef)=>{v();m();_();var{format:oy,inspect:Vi,AggregateError:ay}=Je(),ly=globalThis.AggregateError||ay,uy=Symbol(\"kIsNodeError\"),fy=[\"string\",\"function\",\"number\",\"object\",\"Function\",\"Object\",\"boolean\",\"bigint\",\"symbol\"],cy=/^([A-Z][a-z0-9]*)+$/,hy=\"__node_internal_\",zi={};function Xt(t,e){if(!t)throw new zi.ERR_INTERNAL_ASSERTION(e)}function Xu(t){let e=\"\",r=t.length,i=t[0]===\"-\"?1:0;for(;r>=i+4;r-=3)e=`_${t.slice(r-3,r)}${e}`;return `${t.slice(0,r)}${e}`}function dy(t,e,r){if(typeof e==\"function\")return Xt(e.length<=r.length,`Code: ${t}; The provided arguments length (${r.length}) does not match the required ones (${e.length}).`),e(...r);let i=(e.match(/%[dfijoOs]/g)||[]).length;return Xt(i===r.length,`Code: ${t}; The provided arguments length (${r.length}) does not match the required ones (${i}).`),r.length===0?e:oy(e,...r)}function me(t,e,r){r||(r=Error);class i extends r{constructor(...o){super(dy(t,e,o));}toString(){return `${this.name} [${t}]: ${this.message}`}}Object.defineProperties(i.prototype,{name:{value:r.name,writable:!0,enumerable:!1,configurable:!0},toString:{value(){return `${this.name} [${t}]: ${this.message}`},writable:!0,enumerable:!1,configurable:!0}}),i.prototype.code=t,i.prototype[uy]=!0,zi[t]=i;}function Zu(t){let e=hy+t.name;return Object.defineProperty(t,\"name\",{value:e}),t}function py(t,e){if(t&&e&&t!==e){if(Array.isArray(e.errors))return e.errors.push(t),e;let r=new ly([e,t],e.message);return r.code=e.code,r}return t||e}var vs=class extends Error{constructor(e=\"The operation was aborted\",r=void 0){if(r!==void 0&&typeof r!=\"object\")throw new zi.ERR_INVALID_ARG_TYPE(\"options\",\"Object\",r);super(e,r),this.code=\"ABORT_ERR\",this.name=\"AbortError\";}};me(\"ERR_ASSERTION\",\"%s\",Error);me(\"ERR_INVALID_ARG_TYPE\",(t,e,r)=>{Xt(typeof t==\"string\",\"'name' must be a string\"),Array.isArray(e)||(e=[e]);let i=\"The \";t.endsWith(\" argument\")?i+=`${t} `:i+=`\"${t}\" ${t.includes(\".\")?\"property\":\"argument\"} `,i+=\"must be \";let n=[],o=[],s=[];for(let u of e)Xt(typeof u==\"string\",\"All expected entries have to be of type string\"),fy.includes(u)?n.push(u.toLowerCase()):cy.test(u)?o.push(u):(Xt(u!==\"object\",'The value \"object\" should be written as \"Object\"'),s.push(u));if(o.length>0){let u=n.indexOf(\"object\");u!==-1&&(n.splice(n,u,1),o.push(\"Object\"));}if(n.length>0){switch(n.length){case 1:i+=`of type ${n[0]}`;break;case 2:i+=`one of type ${n[0]} or ${n[1]}`;break;default:{let u=n.pop();i+=`one of type ${n.join(\", \")}, or ${u}`;}}(o.length>0||s.length>0)&&(i+=\" or \");}if(o.length>0){switch(o.length){case 1:i+=`an instance of ${o[0]}`;break;case 2:i+=`an instance of ${o[0]} or ${o[1]}`;break;default:{let u=o.pop();i+=`an instance of ${o.join(\", \")}, or ${u}`;}}s.length>0&&(i+=\" or \");}switch(s.length){case 0:break;case 1:s[0].toLowerCase()!==s[0]&&(i+=\"an \"),i+=`${s[0]}`;break;case 2:i+=`one of ${s[0]} or ${s[1]}`;break;default:{let u=s.pop();i+=`one of ${s.join(\", \")}, or ${u}`;}}if(r==null)i+=`. Received ${r}`;else if(typeof r==\"function\"&&r.name)i+=`. Received function ${r.name}`;else if(typeof r==\"object\"){var a;if((a=r.constructor)!==null&&a!==void 0&&a.name)i+=`. Received an instance of ${r.constructor.name}`;else {let u=Vi(r,{depth:-1});i+=`. Received ${u}`;}}else {let u=Vi(r,{colors:!1});u.length>25&&(u=`${u.slice(0,25)}...`),i+=`. Received type ${typeof r} (${u})`;}return i},TypeError);me(\"ERR_INVALID_ARG_VALUE\",(t,e,r=\"is invalid\")=>{let i=Vi(e);return i.length>128&&(i=i.slice(0,128)+\"...\"),`The ${t.includes(\".\")?\"property\":\"argument\"} '${t}' ${r}. Received ${i}`},TypeError);me(\"ERR_INVALID_RETURN_VALUE\",(t,e,r)=>{var i;let n=r!=null&&(i=r.constructor)!==null&&i!==void 0&&i.name?`instance of ${r.constructor.name}`:`type ${typeof r}`;return `Expected ${t} to be returned from the \"${e}\" function but got ${n}.`},TypeError);me(\"ERR_MISSING_ARGS\",(...t)=>{Xt(t.length>0,\"At least one arg needs to be specified\");let e,r=t.length;switch(t=(Array.isArray(t)?t:[t]).map(i=>`\"${i}\"`).join(\" or \"),r){case 1:e+=`The ${t[0]} argument`;break;case 2:e+=`The ${t[0]} and ${t[1]} arguments`;break;default:{let i=t.pop();e+=`The ${t.join(\", \")}, and ${i} arguments`;}break}return `${e} must be specified`},TypeError);me(\"ERR_OUT_OF_RANGE\",(t,e,r)=>{Xt(e,'Missing \"range\" argument');let i;return Number.isInteger(r)&&Math.abs(r)>2**32?i=Xu(String(r)):typeof r==\"bigint\"?(i=String(r),(r>2n**32n||r<-(2n**32n))&&(i=Xu(i)),i+=\"n\"):i=Vi(r),`The value of \"${t}\" is out of range. It must be ${e}. Received ${i}`},RangeError);me(\"ERR_MULTIPLE_CALLBACK\",\"Callback called multiple times\",Error);me(\"ERR_METHOD_NOT_IMPLEMENTED\",\"The %s method is not implemented\",Error);me(\"ERR_STREAM_ALREADY_FINISHED\",\"Cannot call %s after a stream was finished\",Error);me(\"ERR_STREAM_CANNOT_PIPE\",\"Cannot pipe, not readable\",Error);me(\"ERR_STREAM_DESTROYED\",\"Cannot call %s after a stream was destroyed\",Error);me(\"ERR_STREAM_NULL_VALUES\",\"May not write null values to stream\",TypeError);me(\"ERR_STREAM_PREMATURE_CLOSE\",\"Premature close\",Error);me(\"ERR_STREAM_PUSH_AFTER_EOF\",\"stream.push() after EOF\",Error);me(\"ERR_STREAM_UNSHIFT_AFTER_END_EVENT\",\"stream.unshift() after end event\",Error);me(\"ERR_STREAM_WRITE_AFTER_END\",\"write after end\",Error);me(\"ERR_UNKNOWN_ENCODING\",\"Unknown encoding: %s\",TypeError);ef.exports={AbortError:vs,aggregateTwoErrors:Zu(py),hideStackFrames:Zu,codes:zi};});var fi=M((yI,ff)=>{v();m();_();var{ArrayIsArray:Ss,ArrayPrototypeIncludes:sf,ArrayPrototypeJoin:of,ArrayPrototypeMap:gy,NumberIsInteger:As,NumberIsNaN:yy,NumberMAX_SAFE_INTEGER:by,NumberMIN_SAFE_INTEGER:wy,NumberParseInt:_y,ObjectPrototypeHasOwnProperty:my,RegExpPrototypeExec:af,String:vy,StringPrototypeToUpperCase:Ey,StringPrototypeTrim:Sy}=ce(),{hideStackFrames:Ue,codes:{ERR_SOCKET_BAD_PORT:Ay,ERR_INVALID_ARG_TYPE:Ae,ERR_INVALID_ARG_VALUE:Mr,ERR_OUT_OF_RANGE:Zt,ERR_UNKNOWN_SIGNAL:tf}}=Se(),{normalizeEncoding:Iy}=Je(),{isAsyncFunction:Ty,isArrayBufferView:Ry}=Je().types,rf={};function Cy(t){return t===(t|0)}function By(t){return t===t>>>0}var Py=/^[0-7]+$/,Oy=\"must be a 32-bit unsigned integer or an octal string\";function ky(t,e,r){if(typeof t>\"u\"&&(t=r),typeof t==\"string\"){if(af(Py,t)===null)throw new Mr(e,t,Oy);t=_y(t,8);}return lf(t,e),t}var xy=Ue((t,e,r=wy,i=by)=>{if(typeof t!=\"number\")throw new Ae(e,\"number\",t);if(!As(t))throw new Zt(e,\"an integer\",t);if(ti)throw new Zt(e,`>= ${r} && <= ${i}`,t)}),My=Ue((t,e,r=-2147483648,i=2147483647)=>{if(typeof t!=\"number\")throw new Ae(e,\"number\",t);if(!As(t))throw new Zt(e,\"an integer\",t);if(ti)throw new Zt(e,`>= ${r} && <= ${i}`,t)}),lf=Ue((t,e,r=!1)=>{if(typeof t!=\"number\")throw new Ae(e,\"number\",t);if(!As(t))throw new Zt(e,\"an integer\",t);let i=r?1:0,n=4294967295;if(tn)throw new Zt(e,`>= ${i} && <= ${n}`,t)});function Is(t,e){if(typeof t!=\"string\")throw new Ae(e,\"string\",t)}function Ly(t,e,r=void 0,i){if(typeof t!=\"number\")throw new Ae(e,\"number\",t);if(r!=null&&ti||(r!=null||i!=null)&&yy(t))throw new Zt(e,`${r!=null?`>= ${r}`:\"\"}${r!=null&&i!=null?\" && \":\"\"}${i!=null?`<= ${i}`:\"\"}`,t)}var Uy=Ue((t,e,r)=>{if(!sf(r,t)){let n=\"must be one of: \"+of(gy(r,o=>typeof o==\"string\"?`'${o}'`:vy(o)),\", \");throw new Mr(e,t,n)}});function uf(t,e){if(typeof t!=\"boolean\")throw new Ae(e,\"boolean\",t)}function Es(t,e,r){return t==null||!my(t,e)?r:t[e]}var Ny=Ue((t,e,r=null)=>{let i=Es(r,\"allowArray\",!1),n=Es(r,\"allowFunction\",!1);if(!Es(r,\"nullable\",!1)&&t===null||!i&&Ss(t)||typeof t!=\"object\"&&(!n||typeof t!=\"function\"))throw new Ae(e,\"Object\",t)}),qy=Ue((t,e)=>{if(t!=null&&typeof t!=\"object\"&&typeof t!=\"function\")throw new Ae(e,\"a dictionary\",t)}),Ts=Ue((t,e,r=0)=>{if(!Ss(t))throw new Ae(e,\"Array\",t);if(t.length{if(!Ry(t))throw new Ae(e,[\"Buffer\",\"TypedArray\",\"DataView\"],t)});function $y(t,e){let r=Iy(e),i=t.length;if(r===\"hex\"&&i%2!==0)throw new Mr(\"encoding\",e,`is invalid for data of length ${i}`)}function Hy(t,e=\"Port\",r=!0){if(typeof t!=\"number\"&&typeof t!=\"string\"||typeof t==\"string\"&&Sy(t).length===0||+t!==+t>>>0||t>65535||t===0&&!r)throw new Ay(e,t,r);return t|0}var Vy=Ue((t,e)=>{if(t!==void 0&&(t===null||typeof t!=\"object\"||!(\"aborted\"in t)))throw new Ae(e,\"AbortSignal\",t)}),zy=Ue((t,e)=>{if(typeof t!=\"function\")throw new Ae(e,\"Function\",t)}),Ky=Ue((t,e)=>{if(typeof t!=\"function\"||Ty(t))throw new Ae(e,\"Function\",t)}),Gy=Ue((t,e)=>{if(t!==void 0)throw new Ae(e,\"undefined\",t)});function Qy(t,e,r){if(!sf(r,t))throw new Ae(e,`('${of(r,\"|\")}')`,t)}var Yy=/^(?:<[^>]*>)(?:\\s*;\\s*[^;\"\\s]+(?:=(\")?[^;\"\\s]*\\1)?)*$/;function nf(t,e){if(typeof t>\"u\"||!af(Yy,t))throw new Mr(e,t,'must be an array or string of format \"; rel=preload; as=style\"')}function Jy(t){if(typeof t==\"string\")return nf(t,\"hints\"),t;if(Ss(t)){let e=t.length,r=\"\";if(e===0)return r;for(let i=0;i; rel=preload; as=style\"')}ff.exports={isInt32:Cy,isUint32:By,parseFileMode:ky,validateArray:Ts,validateStringArray:Dy,validateBooleanArray:jy,validateBoolean:uf,validateBuffer:Wy,validateDictionary:qy,validateEncoding:$y,validateFunction:zy,validateInt32:My,validateInteger:xy,validateNumber:Ly,validateObject:Ny,validateOneOf:Uy,validatePlainFunction:Ky,validatePort:Hy,validateSignalName:Fy,validateString:Is,validateUint32:lf,validateUndefined:Gy,validateUnion:Qy,validateAbortSignal:Vy,validateLinkHeaderValue:Jy};});var Ut=M((TI,pf)=>{v();m();_();var ae=pf.exports={},Xe,Ze;function Rs(){throw new Error(\"setTimeout has not been defined\")}function Cs(){throw new Error(\"clearTimeout has not been defined\")}(function(){try{typeof setTimeout==\"function\"?Xe=setTimeout:Xe=Rs;}catch{Xe=Rs;}try{typeof clearTimeout==\"function\"?Ze=clearTimeout:Ze=Cs;}catch{Ze=Cs;}})();function cf(t){if(Xe===setTimeout)return setTimeout(t,0);if((Xe===Rs||!Xe)&&setTimeout)return Xe=setTimeout,setTimeout(t,0);try{return Xe(t,0)}catch{try{return Xe.call(null,t,0)}catch{return Xe.call(this,t,0)}}}function Xy(t){if(Ze===clearTimeout)return clearTimeout(t);if((Ze===Cs||!Ze)&&clearTimeout)return Ze=clearTimeout,clearTimeout(t);try{return Ze(t)}catch{try{return Ze.call(null,t)}catch{return Ze.call(this,t)}}}var wt=[],Lr=!1,er,Ki=-1;function Zy(){!Lr||!er||(Lr=!1,er.length?wt=er.concat(wt):Ki=-1,wt.length&&hf());}function hf(){if(!Lr){var t=cf(Zy);Lr=!0;for(var e=wt.length;e;){for(er=wt,wt=[];++Ki1)for(var r=1;r{v();m();_();var{Symbol:Gi,SymbolAsyncIterator:gf,SymbolIterator:yf,SymbolFor:bf}=ce(),wf=Gi(\"kDestroyed\"),_f=Gi(\"kIsErrored\"),Bs=Gi(\"kIsReadable\"),mf=Gi(\"kIsDisturbed\"),eb=bf(\"nodejs.webstream.isClosedPromise\"),tb=bf(\"nodejs.webstream.controllerErrorFunction\");function Qi(t,e=!1){var r;return !!(t&&typeof t.pipe==\"function\"&&typeof t.on==\"function\"&&(!e||typeof t.pause==\"function\"&&typeof t.resume==\"function\")&&(!t._writableState||((r=t._readableState)===null||r===void 0?void 0:r.readable)!==!1)&&(!t._writableState||t._readableState))}function Yi(t){var e;return !!(t&&typeof t.write==\"function\"&&typeof t.on==\"function\"&&(!t._readableState||((e=t._writableState)===null||e===void 0?void 0:e.writable)!==!1))}function rb(t){return !!(t&&typeof t.pipe==\"function\"&&t._readableState&&typeof t.on==\"function\"&&typeof t.write==\"function\")}function et(t){return t&&(t._readableState||t._writableState||typeof t.write==\"function\"&&typeof t.on==\"function\"||typeof t.pipe==\"function\"&&typeof t.on==\"function\")}function vf(t){return !!(t&&!et(t)&&typeof t.pipeThrough==\"function\"&&typeof t.getReader==\"function\"&&typeof t.cancel==\"function\")}function Ef(t){return !!(t&&!et(t)&&typeof t.getWriter==\"function\"&&typeof t.abort==\"function\")}function Sf(t){return !!(t&&!et(t)&&typeof t.readable==\"object\"&&typeof t.writable==\"object\")}function ib(t){return vf(t)||Ef(t)||Sf(t)}function nb(t,e){return t==null?!1:e===!0?typeof t[gf]==\"function\":e===!1?typeof t[yf]==\"function\":typeof t[gf]==\"function\"||typeof t[yf]==\"function\"}function Ji(t){if(!et(t))return null;let e=t._writableState,r=t._readableState,i=e||r;return !!(t.destroyed||t[wf]||i!=null&&i.destroyed)}function Af(t){if(!Yi(t))return null;if(t.writableEnded===!0)return !0;let e=t._writableState;return e!=null&&e.errored?!1:typeof e?.ended!=\"boolean\"?null:e.ended}function sb(t,e){if(!Yi(t))return null;if(t.writableFinished===!0)return !0;let r=t._writableState;return r!=null&&r.errored?!1:typeof r?.finished!=\"boolean\"?null:!!(r.finished||e===!1&&r.ended===!0&&r.length===0)}function ob(t){if(!Qi(t))return null;if(t.readableEnded===!0)return !0;let e=t._readableState;return !e||e.errored?!1:typeof e?.ended!=\"boolean\"?null:e.ended}function If(t,e){if(!Qi(t))return null;let r=t._readableState;return r!=null&&r.errored?!1:typeof r?.endEmitted!=\"boolean\"?null:!!(r.endEmitted||e===!1&&r.ended===!0&&r.length===0)}function Tf(t){return t&&t[Bs]!=null?t[Bs]:typeof t?.readable!=\"boolean\"?null:Ji(t)?!1:Qi(t)&&t.readable&&!If(t)}function Rf(t){return typeof t?.writable!=\"boolean\"?null:Ji(t)?!1:Yi(t)&&t.writable&&!Af(t)}function ab(t,e){return et(t)?Ji(t)?!0:!(e?.readable!==!1&&Tf(t)||e?.writable!==!1&&Rf(t)):null}function lb(t){var e,r;return et(t)?t.writableErrored?t.writableErrored:(e=(r=t._writableState)===null||r===void 0?void 0:r.errored)!==null&&e!==void 0?e:null:null}function ub(t){var e,r;return et(t)?t.readableErrored?t.readableErrored:(e=(r=t._readableState)===null||r===void 0?void 0:r.errored)!==null&&e!==void 0?e:null:null}function fb(t){if(!et(t))return null;if(typeof t.closed==\"boolean\")return t.closed;let e=t._writableState,r=t._readableState;return typeof e?.closed==\"boolean\"||typeof r?.closed==\"boolean\"?e?.closed||r?.closed:typeof t._closed==\"boolean\"&&Cf(t)?t._closed:null}function Cf(t){return typeof t._closed==\"boolean\"&&typeof t._defaultKeepAlive==\"boolean\"&&typeof t._removedConnection==\"boolean\"&&typeof t._removedContLen==\"boolean\"}function Bf(t){return typeof t._sent100==\"boolean\"&&Cf(t)}function cb(t){var e;return typeof t._consuming==\"boolean\"&&typeof t._dumped==\"boolean\"&&((e=t.req)===null||e===void 0?void 0:e.upgradeOrConnect)===void 0}function hb(t){if(!et(t))return null;let e=t._writableState,r=t._readableState,i=e||r;return !i&&Bf(t)||!!(i&&i.autoDestroy&&i.emitClose&&i.closed===!1)}function db(t){var e;return !!(t&&((e=t[mf])!==null&&e!==void 0?e:t.readableDidRead||t.readableAborted))}function pb(t){var e,r,i,n,o,s,a,u,c,h;return !!(t&&((e=(r=(i=(n=(o=(s=t[_f])!==null&&s!==void 0?s:t.readableErrored)!==null&&o!==void 0?o:t.writableErrored)!==null&&n!==void 0?n:(a=t._readableState)===null||a===void 0?void 0:a.errorEmitted)!==null&&i!==void 0?i:(u=t._writableState)===null||u===void 0?void 0:u.errorEmitted)!==null&&r!==void 0?r:(c=t._readableState)===null||c===void 0?void 0:c.errored)!==null&&e!==void 0?e:!((h=t._writableState)===null||h===void 0)&&h.errored))}Pf.exports={kDestroyed:wf,isDisturbed:db,kIsDisturbed:mf,isErrored:pb,kIsErrored:_f,isReadable:Tf,kIsReadable:Bs,kIsClosedPromise:eb,kControllerErrorFunction:tb,isClosed:fb,isDestroyed:Ji,isDuplexNodeStream:rb,isFinished:ab,isIterable:nb,isReadableNodeStream:Qi,isReadableStream:vf,isReadableEnded:ob,isReadableFinished:If,isReadableErrored:ub,isNodeStream:et,isWebStream:ib,isWritable:Rf,isWritableNodeStream:Yi,isWritableStream:Ef,isWritableEnded:Af,isWritableFinished:sb,isWritableErrored:lb,isServerRequest:cb,isServerResponse:Bf,willEmitClose:hb,isTransformStream:Sf};});var mt=M((zI,Ms)=>{v();m();_();var Nt=Ut(),{AbortError:Df,codes:gb}=Se(),{ERR_INVALID_ARG_TYPE:yb,ERR_STREAM_PREMATURE_CLOSE:Of}=gb,{kEmptyObject:Os,once:ks}=Je(),{validateAbortSignal:bb,validateFunction:wb,validateObject:_b,validateBoolean:mb}=fi(),{Promise:vb,PromisePrototypeThen:Eb}=ce(),{isClosed:Sb,isReadable:kf,isReadableNodeStream:Ps,isReadableStream:Ab,isReadableFinished:xf,isReadableErrored:Mf,isWritable:Lf,isWritableNodeStream:Uf,isWritableStream:Ib,isWritableFinished:Nf,isWritableErrored:qf,isNodeStream:Tb,willEmitClose:Rb,kIsClosedPromise:Cb}=tt();function Bb(t){return t.setHeader&&typeof t.abort==\"function\"}var xs=()=>{};function jf(t,e,r){var i,n;if(arguments.length===2?(r=e,e=Os):e==null?e=Os:_b(e,\"options\"),wb(r,\"callback\"),bb(e.signal,\"options.signal\"),r=ks(r),Ab(t)||Ib(t))return Pb(t,e,r);if(!Tb(t))throw new yb(\"stream\",[\"ReadableStream\",\"WritableStream\",\"Stream\"],t);let o=(i=e.readable)!==null&&i!==void 0?i:Ps(t),s=(n=e.writable)!==null&&n!==void 0?n:Uf(t),a=t._writableState,u=t._readableState,c=()=>{t.writable||g();},h=Rb(t)&&Ps(t)===o&&Uf(t)===s,d=Nf(t,!1),g=()=>{d=!0,t.destroyed&&(h=!1),!(h&&(!t.readable||o))&&(!o||y)&&r.call(t);},y=xf(t,!1),w=()=>{y=!0,t.destroyed&&(h=!1),!(h&&(!t.writable||s))&&(!s||d)&&r.call(t);},E=N=>{r.call(t,N);},S=Sb(t),I=()=>{S=!0;let N=qf(t)||Mf(t);if(N&&typeof N!=\"boolean\")return r.call(t,N);if(o&&!y&&Ps(t,!0)&&!xf(t,!1))return r.call(t,new Of);if(s&&!d&&!Nf(t,!1))return r.call(t,new Of);r.call(t);},C=()=>{S=!0;let N=qf(t)||Mf(t);if(N&&typeof N!=\"boolean\")return r.call(t,N);r.call(t);},R=()=>{t.req.on(\"finish\",g);};Bb(t)?(t.on(\"complete\",g),h||t.on(\"abort\",I),t.req?R():t.on(\"request\",R)):s&&!a&&(t.on(\"end\",c),t.on(\"close\",c)),!h&&typeof t.aborted==\"boolean\"&&t.on(\"aborted\",I),t.on(\"end\",w),t.on(\"finish\",g),e.error!==!1&&t.on(\"error\",E),t.on(\"close\",I),S?Nt.nextTick(I):a!=null&&a.errorEmitted||u!=null&&u.errorEmitted?h||Nt.nextTick(C):(!o&&(!h||kf(t))&&(d||Lf(t)===!1)||!s&&(!h||Lf(t))&&(y||kf(t)===!1)||u&&t.req&&t.aborted)&&Nt.nextTick(C);let U=()=>{r=xs,t.removeListener(\"aborted\",I),t.removeListener(\"complete\",g),t.removeListener(\"abort\",I),t.removeListener(\"request\",R),t.req&&t.req.removeListener(\"finish\",g),t.removeListener(\"end\",c),t.removeListener(\"close\",c),t.removeListener(\"finish\",g),t.removeListener(\"end\",w),t.removeListener(\"error\",E),t.removeListener(\"close\",I);};if(e.signal&&!S){let N=()=>{let W=r;U(),W.call(t,new Df(void 0,{cause:e.signal.reason}));};if(e.signal.aborted)Nt.nextTick(N);else {let W=r;r=ks((...K)=>{e.signal.removeEventListener(\"abort\",N),W.apply(t,K);}),e.signal.addEventListener(\"abort\",N);}}return U}function Pb(t,e,r){let i=!1,n=xs;if(e.signal)if(n=()=>{i=!0,r.call(t,new Df(void 0,{cause:e.signal.reason}));},e.signal.aborted)Nt.nextTick(n);else {let s=r;r=ks((...a)=>{e.signal.removeEventListener(\"abort\",n),s.apply(t,a);}),e.signal.addEventListener(\"abort\",n);}let o=(...s)=>{i||Nt.nextTick(()=>r.apply(t,s));};return Eb(t[Cb].promise,o,o),xs}function Ob(t,e){var r;let i=!1;return e===null&&(e=Os),(r=e)!==null&&r!==void 0&&r.cleanup&&(mb(e.cleanup,\"cleanup\"),i=e.cleanup),new vb((n,o)=>{let s=jf(t,e,a=>{i&&s(),a?o(a):n();});})}Ms.exports=jf;Ms.exports.finished=Ob;});var tr=M((rT,Gf)=>{v();m();_();var rt=Ut(),{aggregateTwoErrors:kb,codes:{ERR_MULTIPLE_CALLBACK:xb},AbortError:Mb}=Se(),{Symbol:$f}=ce(),{kDestroyed:Lb,isDestroyed:Ub,isFinished:Nb,isServerRequest:qb}=tt(),Hf=$f(\"kDestroy\"),Ls=$f(\"kConstruct\");function Vf(t,e,r){t&&(t.stack,e&&!e.errored&&(e.errored=t),r&&!r.errored&&(r.errored=t));}function Db(t,e){let r=this._readableState,i=this._writableState,n=i||r;return i!=null&&i.destroyed||r!=null&&r.destroyed?(typeof e==\"function\"&&e(),this):(Vf(t,i,r),i&&(i.destroyed=!0),r&&(r.destroyed=!0),n.constructed?Ff(this,t,e):this.once(Hf,function(o){Ff(this,kb(o,t),e);}),this)}function Ff(t,e,r){let i=!1;function n(o){if(i)return;i=!0;let s=t._readableState,a=t._writableState;Vf(o,a,s),a&&(a.closed=!0),s&&(s.closed=!0),typeof r==\"function\"&&r(o),o?rt.nextTick(jb,t,o):rt.nextTick(zf,t);}try{t._destroy(e||null,n);}catch(o){n(o);}}function jb(t,e){Us(t,e),zf(t);}function zf(t){let e=t._readableState,r=t._writableState;r&&(r.closeEmitted=!0),e&&(e.closeEmitted=!0),(r!=null&&r.emitClose||e!=null&&e.emitClose)&&t.emit(\"close\");}function Us(t,e){let r=t._readableState,i=t._writableState;i!=null&&i.errorEmitted||r!=null&&r.errorEmitted||(i&&(i.errorEmitted=!0),r&&(r.errorEmitted=!0),t.emit(\"error\",e));}function Fb(){let t=this._readableState,e=this._writableState;t&&(t.constructed=!0,t.closed=!1,t.closeEmitted=!1,t.destroyed=!1,t.errored=null,t.errorEmitted=!1,t.reading=!1,t.ended=t.readable===!1,t.endEmitted=t.readable===!1),e&&(e.constructed=!0,e.destroyed=!1,e.closed=!1,e.closeEmitted=!1,e.errored=null,e.errorEmitted=!1,e.finalCalled=!1,e.prefinished=!1,e.ended=e.writable===!1,e.ending=e.writable===!1,e.finished=e.writable===!1);}function Ns(t,e,r){let i=t._readableState,n=t._writableState;if(n!=null&&n.destroyed||i!=null&&i.destroyed)return this;i!=null&&i.autoDestroy||n!=null&&n.autoDestroy?t.destroy(e):e&&(e.stack,n&&!n.errored&&(n.errored=e),i&&!i.errored&&(i.errored=e),r?rt.nextTick(Us,t,e):Us(t,e));}function Wb(t,e){if(typeof t._construct!=\"function\")return;let r=t._readableState,i=t._writableState;r&&(r.constructed=!1),i&&(i.constructed=!1),t.once(Ls,e),!(t.listenerCount(Ls)>1)&&rt.nextTick($b,t);}function $b(t){let e=!1;function r(i){if(e){Ns(t,i??new xb);return}e=!0;let n=t._readableState,o=t._writableState,s=o||n;n&&(n.constructed=!0),o&&(o.constructed=!0),s.destroyed?t.emit(Hf,i):i?Ns(t,i,!0):rt.nextTick(Hb,t);}try{t._construct(i=>{rt.nextTick(r,i);});}catch(i){rt.nextTick(r,i);}}function Hb(t){t.emit(Ls);}function Wf(t){return t?.setHeader&&typeof t.abort==\"function\"}function Kf(t){t.emit(\"close\");}function Vb(t,e){t.emit(\"error\",e),rt.nextTick(Kf,t);}function zb(t,e){!t||Ub(t)||(!e&&!Nb(t)&&(e=new Mb),qb(t)?(t.socket=null,t.destroy(e)):Wf(t)?t.abort():Wf(t.req)?t.req.abort():typeof t.destroy==\"function\"?t.destroy(e):typeof t.close==\"function\"?t.close():e?rt.nextTick(Vb,t,e):rt.nextTick(Kf,t),t.destroyed||(t[Lb]=!0));}Gf.exports={construct:Wb,destroyer:zb,destroy:Db,undestroy:Fb,errorOrDestroy:Ns};});function Y(){Y.init.call(this);}function Xi(t){if(typeof t!=\"function\")throw new TypeError('The \"listener\" argument must be of type Function. Received type '+typeof t)}function nc(t){return t._maxListeners===void 0?Y.defaultMaxListeners:t._maxListeners}function Xf(t,e,r,i){var n,o,s,a;if(Xi(r),(o=t._events)===void 0?(o=t._events=Object.create(null),t._eventsCount=0):(o.newListener!==void 0&&(t.emit(\"newListener\",e,r.listener?r.listener:r),o=t._events),s=o[e]),s===void 0)s=o[e]=r,++t._eventsCount;else if(typeof s==\"function\"?s=o[e]=i?[r,s]:[s,r]:i?s.unshift(r):s.push(r),(n=nc(t))>0&&s.length>n&&!s.warned){s.warned=!0;var u=new Error(\"Possible EventEmitter memory leak detected. \"+s.length+\" \"+String(e)+\" listeners added. Use emitter.setMaxListeners() to increase limit\");u.name=\"MaxListenersExceededWarning\",u.emitter=t,u.type=e,u.count=s.length,a=u,console&&console.warn&&console.warn(a);}return t}function Kb(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function Zf(t,e,r){var i={fired:!1,wrapFn:void 0,target:t,type:e,listener:r},n=Kb.bind(i);return n.listener=r,i.wrapFn=n,n}function ec(t,e,r){var i=t._events;if(i===void 0)return [];var n=i[e];return n===void 0?[]:typeof n==\"function\"?r?[n.listener||n]:[n]:r?function(o){for(var s=new Array(o.length),a=0;a{v();m();_();Ur=typeof Reflect==\"object\"?Reflect:null,Qf=Ur&&typeof Ur.apply==\"function\"?Ur.apply:function(t,e,r){return Function.prototype.apply.call(t,e,r)};ic=Ur&&typeof Ur.ownKeys==\"function\"?Ur.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)};Yf=Number.isNaN||function(t){return t!=t};rc=Y,Y.EventEmitter=Y,Y.prototype._events=void 0,Y.prototype._eventsCount=0,Y.prototype._maxListeners=void 0;Jf=10;Object.defineProperty(Y,\"defaultMaxListeners\",{enumerable:!0,get:function(){return Jf},set:function(t){if(typeof t!=\"number\"||t<0||Yf(t))throw new RangeError('The value of \"defaultMaxListeners\" is out of range. It must be a non-negative number. Received '+t+\".\");Jf=t;}}),Y.init=function(){this._events!==void 0&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0;},Y.prototype.setMaxListeners=function(t){if(typeof t!=\"number\"||t<0||Yf(t))throw new RangeError('The value of \"n\" is out of range. It must be a non-negative number. Received '+t+\".\");return this._maxListeners=t,this},Y.prototype.getMaxListeners=function(){return nc(this)},Y.prototype.emit=function(t){for(var e=[],r=1;r0&&(o=e[0]),o instanceof Error)throw o;var s=new Error(\"Unhandled error.\"+(o?\" (\"+o.message+\")\":\"\"));throw s.context=o,s}var a=n[t];if(a===void 0)return !1;if(typeof a==\"function\")Qf(a,this,e);else {var u=a.length,c=sc(a,u);for(r=0;r=0;o--)if(r[o]===e||r[o].listener===e){s=r[o].listener,n=o;break}if(n<0)return this;n===0?r.shift():function(a,u){for(;u+1=0;i--)this.removeListener(t,e[i]);return this},Y.prototype.listeners=function(t){return ec(this,t,!0)},Y.prototype.rawListeners=function(t){return ec(this,t,!1)},Y.listenerCount=function(t,e){return typeof t.listenerCount==\"function\"?t.listenerCount(e):tc.call(t,e)},Y.prototype.listenerCount=tc,Y.prototype.eventNames=function(){return this._eventsCount>0?ic(this._events):[]};Be=rc;Be.EventEmitter;Be.defaultMaxListeners;Be.init;Be.listenerCount;Be.EventEmitter;Be.defaultMaxListeners;Be.init;Be.listenerCount;});var rr={};Qt(rr,{EventEmitter:()=>Gb,default:()=>Be,defaultMaxListeners:()=>Qb,init:()=>Yb,listenerCount:()=>Jb,on:()=>Xb,once:()=>Zb});var Gb,Qb,Yb,Jb,Xb,Zb,ir=we(()=>{v();m();_();qs();qs();Be.once=function(t,e){return new Promise((r,i)=>{function n(...s){o!==void 0&&t.removeListener(\"error\",o),r(s);}let o;e!==\"error\"&&(o=s=>{t.removeListener(name,n),i(s);},t.once(\"error\",o)),t.once(e,n);})};Be.on=function(t,e){let r=[],i=[],n=null,o=!1,s={async next(){let c=r.shift();if(c)return createIterResult(c,!1);if(n){let h=Promise.reject(n);return n=null,h}return o?createIterResult(void 0,!0):new Promise((h,d)=>i.push({resolve:h,reject:d}))},async return(){t.removeListener(e,a),t.removeListener(\"error\",u),o=!0;for(let c of i)c.resolve(createIterResult(void 0,!0));return createIterResult(void 0,!0)},throw(c){n=c,t.removeListener(e,a),t.removeListener(\"error\",u);},[Symbol.asyncIterator](){return this}};return t.on(e,a),t.on(\"error\",u),s;function a(...c){let h=i.shift();h?h.resolve(createIterResult(c,!1)):r.push(c);}function u(c){o=!0;let h=i.shift();h?h.reject(c):n=c,s.return();}};({EventEmitter:Gb,defaultMaxListeners:Qb,init:Yb,listenerCount:Jb,on:Xb,once:Zb}=Be);});var tn=M((xT,ac)=>{v();m();_();var{ArrayIsArray:ew,ObjectSetPrototypeOf:oc}=ce(),{EventEmitter:Zi}=(ir(),X(rr));function en(t){Zi.call(this,t);}oc(en.prototype,Zi.prototype);oc(en,Zi);en.prototype.pipe=function(t,e){let r=this;function i(h){t.writable&&t.write(h)===!1&&r.pause&&r.pause();}r.on(\"data\",i);function n(){r.readable&&r.resume&&r.resume();}t.on(\"drain\",n),!t._isStdio&&(!e||e.end!==!1)&&(r.on(\"end\",s),r.on(\"close\",a));let o=!1;function s(){o||(o=!0,t.end());}function a(){o||(o=!0,typeof t.destroy==\"function\"&&t.destroy());}function u(h){c(),Zi.listenerCount(this,\"error\")===0&&this.emit(\"error\",h);}Ds(r,\"error\",u),Ds(t,\"error\",u);function c(){r.removeListener(\"data\",i),t.removeListener(\"drain\",n),r.removeListener(\"end\",s),r.removeListener(\"close\",a),r.removeListener(\"error\",u),t.removeListener(\"error\",u),r.removeListener(\"end\",c),r.removeListener(\"close\",c),t.removeListener(\"close\",c);}return r.on(\"end\",c),r.on(\"close\",c),t.on(\"close\",c),t.emit(\"pipe\",r),t};function Ds(t,e,r){if(typeof t.prependListener==\"function\")return t.prependListener(e,r);!t._events||!t._events[e]?t.on(e,r):ew(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]];}ac.exports={Stream:en,prependListener:Ds};});var ci=M(($T,rn)=>{v();m();_();var{AbortError:lc,codes:tw}=Se(),{isNodeStream:uc,isWebStream:rw,kControllerErrorFunction:iw}=tt(),nw=mt(),{ERR_INVALID_ARG_TYPE:fc}=tw,sw=(t,e)=>{if(typeof t!=\"object\"||!(\"aborted\"in t))throw new fc(e,\"AbortSignal\",t)};rn.exports.addAbortSignal=function(e,r){if(sw(e,\"signal\"),!uc(r)&&!rw(r))throw new fc(\"stream\",[\"ReadableStream\",\"WritableStream\",\"Stream\"],r);return rn.exports.addAbortSignalNoValidate(e,r)};rn.exports.addAbortSignalNoValidate=function(t,e){if(typeof t!=\"object\"||!(\"aborted\"in t))return e;let r=uc(e)?()=>{e.destroy(new lc(void 0,{cause:t.reason}));}:()=>{e[iw](new lc(void 0,{cause:t.reason}));};return t.aborted?r():(t.addEventListener(\"abort\",r),nw(e,()=>t.removeEventListener(\"abort\",r))),e};});var dc=M((e2,hc)=>{v();m();_();var{StringPrototypeSlice:cc,SymbolIterator:ow,TypedArrayPrototypeSet:nn,Uint8Array:aw}=ce(),{Buffer:js}=(ye(),X(_e)),{inspect:lw}=Je();hc.exports=class{constructor(){this.head=null,this.tail=null,this.length=0;}push(e){let r={data:e,next:null};this.length>0?this.tail.next=r:this.head=r,this.tail=r,++this.length;}unshift(e){let r={data:e,next:this.head};this.length===0&&(this.tail=r),this.head=r,++this.length;}shift(){if(this.length===0)return;let e=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,e}clear(){this.head=this.tail=null,this.length=0;}join(e){if(this.length===0)return \"\";let r=this.head,i=\"\"+r.data;for(;(r=r.next)!==null;)i+=e+r.data;return i}concat(e){if(this.length===0)return js.alloc(0);let r=js.allocUnsafe(e>>>0),i=this.head,n=0;for(;i;)nn(r,i.data,n),n+=i.data.length,i=i.next;return r}consume(e,r){let i=this.head.data;if(eo.length)r+=o,e-=o.length;else {e===o.length?(r+=o,++n,i.next?this.head=i.next:this.head=this.tail=null):(r+=cc(o,0,e),this.head=i,i.data=cc(o,e));break}++n;}while((i=i.next)!==null);return this.length-=n,r}_getBuffer(e){let r=js.allocUnsafe(e),i=e,n=this.head,o=0;do{let s=n.data;if(e>s.length)nn(r,s,i-e),e-=s.length;else {e===s.length?(nn(r,s,i-e),++o,n.next?this.head=n.next:this.head=this.tail=null):(nn(r,new aw(s.buffer,s.byteOffset,e),i-e),this.head=n,n.data=s.slice(e));break}++o;}while((n=n.next)!==null);return this.length-=o,r}[Symbol.for(\"nodejs.util.inspect.custom\")](e,r){return lw(this,{...r,depth:0,customInspect:!1})}};});var sn=M((f2,gc)=>{v();m();_();var{MathFloor:uw,NumberIsInteger:fw}=ce(),{ERR_INVALID_ARG_VALUE:cw}=Se().codes;function hw(t,e,r){return t.highWaterMark!=null?t.highWaterMark:e?t[r]:null}function pc(t){return t?16:16*1024}function dw(t,e,r,i){let n=hw(e,i,r);if(n!=null){if(!fw(n)||n<0){let o=i?`options.${r}`:\"options.highWaterMark\";throw new cw(o,n)}return uw(n)}return pc(t.objectMode)}gc.exports={getHighWaterMark:dw,getDefaultHighWaterMark:pc};});function wc(t){var e=t.length;if(e%4>0)throw new Error(\"Invalid string. Length must be a multiple of 4\");var r=t.indexOf(\"=\");return r===-1&&(r=e),[r,r===e?0:4-r%4]}function pw(t,e,r){for(var i,n,o=[],s=e;s>18&63]+$e[n>>12&63]+$e[n>>6&63]+$e[63&n]);return o.join(\"\")}function vt(t){if(t>2147483647)throw new RangeError('The value \"'+t+'\" is invalid for option \"size\"');var e=new Uint8Array(t);return Object.setPrototypeOf(e,k.prototype),e}function k(t,e,r){if(typeof t==\"number\"){if(typeof e==\"string\")throw new TypeError('The \"string\" argument must be of type string. Received type number');return Hs(t)}return Cc(t,e,r)}function Cc(t,e,r){if(typeof t==\"string\")return function(o,s){if(typeof s==\"string\"&&s!==\"\"||(s=\"utf8\"),!k.isEncoding(s))throw new TypeError(\"Unknown encoding: \"+s);var a=0|Pc(o,s),u=vt(a),c=u.write(o,s);return c!==a&&(u=u.slice(0,c)),u}(t,e);if(ArrayBuffer.isView(t))return Fs(t);if(t==null)throw new TypeError(\"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type \"+typeof t);if(Et(t,ArrayBuffer)||t&&Et(t.buffer,ArrayBuffer)||typeof SharedArrayBuffer<\"u\"&&(Et(t,SharedArrayBuffer)||t&&Et(t.buffer,SharedArrayBuffer)))return mc(t,e,r);if(typeof t==\"number\")throw new TypeError('The \"value\" argument must not be of type number. Received type number');var i=t.valueOf&&t.valueOf();if(i!=null&&i!==t)return k.from(i,e,r);var n=function(o){if(k.isBuffer(o)){var s=0|Ks(o.length),a=vt(s);return a.length===0||o.copy(a,0,0,s),a}if(o.length!==void 0)return typeof o.length!=\"number\"||Gs(o.length)?vt(0):Fs(o);if(o.type===\"Buffer\"&&Array.isArray(o.data))return Fs(o.data)}(t);if(n)return n;if(typeof Symbol<\"u\"&&Symbol.toPrimitive!=null&&typeof t[Symbol.toPrimitive]==\"function\")return k.from(t[Symbol.toPrimitive](\"string\"),e,r);throw new TypeError(\"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type \"+typeof t)}function Bc(t){if(typeof t!=\"number\")throw new TypeError('\"size\" argument must be of type number');if(t<0)throw new RangeError('The value \"'+t+'\" is invalid for option \"size\"')}function Hs(t){return Bc(t),vt(t<0?0:0|Ks(t))}function Fs(t){for(var e=t.length<0?0:0|Ks(t.length),r=vt(e),i=0;i=2147483647)throw new RangeError(\"Attempt to allocate Buffer larger than maximum size: 0x\"+2147483647 .toString(16)+\" bytes\");return 0|t}function Pc(t,e){if(k.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||Et(t,ArrayBuffer))return t.byteLength;if(typeof t!=\"string\")throw new TypeError('The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);var r=t.length,i=arguments.length>2&&arguments[2]===!0;if(!i&&r===0)return 0;for(var n=!1;;)switch(e){case\"ascii\":case\"latin1\":case\"binary\":return r;case\"utf8\":case\"utf-8\":return Vs(t).length;case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return 2*r;case\"hex\":return r>>>1;case\"base64\":return Mc(t).length;default:if(n)return i?-1:Vs(t).length;e=(\"\"+e).toLowerCase(),n=!0;}}function yw(t,e,r){var i=!1;if((e===void 0||e<0)&&(e=0),e>this.length||((r===void 0||r>this.length)&&(r=this.length),r<=0)||(r>>>=0)<=(e>>>=0))return \"\";for(t||(t=\"utf8\");;)switch(t){case\"hex\":return Iw(this,e,r);case\"utf8\":case\"utf-8\":return kc(this,e,r);case\"ascii\":return Sw(this,e,r);case\"latin1\":case\"binary\":return Aw(this,e,r);case\"base64\":return Ew(this,e,r);case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return Tw(this,e,r);default:if(i)throw new TypeError(\"Unknown encoding: \"+t);t=(t+\"\").toLowerCase(),i=!0;}}function sr(t,e,r){var i=t[e];t[e]=t[r],t[r]=i;}function vc(t,e,r,i,n){if(t.length===0)return -1;if(typeof r==\"string\"?(i=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),Gs(r=+r)&&(r=n?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(n)return -1;r=t.length-1;}else if(r<0){if(!n)return -1;r=0;}if(typeof e==\"string\"&&(e=k.from(e,i)),k.isBuffer(e))return e.length===0?-1:Ec(t,e,r,i,n);if(typeof e==\"number\")return e&=255,typeof Uint8Array.prototype.indexOf==\"function\"?n?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):Ec(t,[e],r,i,n);throw new TypeError(\"val must be string, number or Buffer\")}function Ec(t,e,r,i,n){var o,s=1,a=t.length,u=e.length;if(i!==void 0&&((i=String(i).toLowerCase())===\"ucs2\"||i===\"ucs-2\"||i===\"utf16le\"||i===\"utf-16le\")){if(t.length<2||e.length<2)return -1;s=2,a/=2,u/=2,r/=2;}function c(y,w){return s===1?y[w]:y.readUInt16BE(w*s)}if(n){var h=-1;for(o=r;oa&&(r=a-u),o=r;o>=0;o--){for(var d=!0,g=0;gn&&(i=n):i=n;var o=e.length;i>o/2&&(i=o/2);for(var s=0;s>8,u=s%256,c.push(u),c.push(a);return c}(e,t.length-r),t,r,i)}function Ew(t,e,r){return e===0&&r===t.length?$s.fromByteArray(t):$s.fromByteArray(t.slice(e,r))}function kc(t,e,r){r=Math.min(t.length,r);for(var i=[],n=e;n239?4:c>223?3:c>191?2:1;if(n+d<=r)switch(d){case 1:c<128&&(h=c);break;case 2:(192&(o=t[n+1]))==128&&(u=(31&c)<<6|63&o)>127&&(h=u);break;case 3:o=t[n+1],s=t[n+2],(192&o)==128&&(192&s)==128&&(u=(15&c)<<12|(63&o)<<6|63&s)>2047&&(u<55296||u>57343)&&(h=u);break;case 4:o=t[n+1],s=t[n+2],a=t[n+3],(192&o)==128&&(192&s)==128&&(192&a)==128&&(u=(15&c)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&u<1114112&&(h=u);}h===null?(h=65533,d=1):h>65535&&(h-=65536,i.push(h>>>10&1023|55296),h=56320|1023&h),i.push(h),n+=d;}return function(g){var y=g.length;if(y<=4096)return String.fromCharCode.apply(String,g);for(var w=\"\",E=0;Ei)&&(r=i);for(var n=\"\",o=e;or)throw new RangeError(\"Trying to access beyond buffer length\")}function Pe(t,e,r,i,n,o){if(!k.isBuffer(t))throw new TypeError('\"buffer\" argument must be a Buffer instance');if(e>n||et.length)throw new RangeError(\"Index out of range\")}function xc(t,e,r,i,n,o){if(r+i>t.length)throw new RangeError(\"Index out of range\");if(r<0)throw new RangeError(\"Index out of range\")}function Sc(t,e,r,i,n){return e=+e,r>>>=0,n||xc(t,0,r,4),Nr.write(t,e,r,i,23,4),r+4}function Ac(t,e,r,i,n){return e=+e,r>>>=0,n||xc(t,0,r,8),Nr.write(t,e,r,i,52,8),r+8}function Vs(t,e){var r;e=e||1/0;for(var i=t.length,n=null,o=[],s=0;s55295&&r<57344){if(!n){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(s+1===i){(e-=3)>-1&&o.push(239,191,189);continue}n=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),n=r;continue}r=65536+(n-55296<<10|r-56320);}else n&&(e-=3)>-1&&o.push(239,191,189);if(n=null,r<128){if((e-=1)<0)break;o.push(r);}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128);}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128);}else {if(!(r<1114112))throw new Error(\"Invalid code point\");if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128);}}return o}function Mc(t){return $s.toByteArray(function(e){if((e=(e=e.split(\"=\")[0]).trim().replace(Rw,\"\")).length<2)return \"\";for(;e.length%4!=0;)e+=\"=\";return e}(t))}function un(t,e,r,i){for(var n=0;n=e.length||n>=t.length);++n)e[n+r]=t[n];return n}function Et(t,e){return t instanceof e||t!=null&&t.constructor!=null&&t.constructor.name!=null&&t.constructor.name===e.name}function Gs(t){return t!=t}function Ic(t,e){for(var r in t)e[r]=t[r];}function or(t,e,r){return it(t,e,r)}function hi(t){var e;switch(this.encoding=function(r){var i=function(n){if(!n)return \"utf8\";for(var o;;)switch(n){case\"utf8\":case\"utf-8\":return \"utf8\";case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return \"utf16le\";case\"latin1\":case\"binary\":return \"latin1\";case\"base64\":case\"ascii\":case\"hex\":return n;default:if(o)return;n=(\"\"+n).toLowerCase(),o=!0;}}(r);if(typeof i!=\"string\"&&(zs.isEncoding===Tc||!Tc(r)))throw new Error(\"Unknown encoding: \"+r);return i||r}(t),this.encoding){case\"utf16le\":this.text=Ow,this.end=kw,e=4;break;case\"utf8\":this.fillLast=Pw,e=4;break;case\"base64\":this.text=xw,this.end=Mw,e=3;break;default:return this.write=Lw,this.end=Uw,void 0}this.lastNeed=0,this.lastTotal=0,this.lastChar=zs.allocUnsafe(e);}function Ws(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function Pw(t){var e=this.lastTotal-this.lastNeed,r=function(i,n,o){if((192&n[0])!=128)return i.lastNeed=0,\"\\uFFFD\";if(i.lastNeed>1&&n.length>1){if((192&n[1])!=128)return i.lastNeed=1,\"\\uFFFD\";if(i.lastNeed>2&&n.length>2&&(192&n[2])!=128)return i.lastNeed=2,\"\\uFFFD\"}}(this,t);return r!==void 0?r:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),this.lastNeed-=t.length,void 0)}function Ow(t,e){if((t.length-e)%2==0){var r=t.toString(\"utf16le\",e);if(r){var i=r.charCodeAt(r.length-1);if(i>=55296&&i<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString(\"utf16le\",e,t.length-1)}function kw(t){var e=t&&t.length?this.write(t):\"\";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString(\"utf16le\",0,r)}return e}function xw(t,e){var r=(t.length-e)%3;return r===0?t.toString(\"base64\",e):(this.lastNeed=3-r,this.lastTotal=3,r===1?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString(\"base64\",e,t.length-r))}function Mw(t){var e=t&&t.length?this.write(t):\"\";return this.lastNeed?e+this.lastChar.toString(\"base64\",0,3-this.lastNeed):e}function Lw(t){return t.toString(this.encoding)}function Uw(t){return t&&t.length?this.write(t):\"\"}var Rc,$e,ke,yc,on,nr,bc,gw,St,$s,Nr,_c,Rw,Cw,an,ln,it,Bw,ar,zs,Tc,Qs=we(()=>{v();m();_();for(Rc={byteLength:function(t){var e=wc(t),r=e[0],i=e[1];return 3*(r+i)/4-i},toByteArray:function(t){var e,r,i=wc(t),n=i[0],o=i[1],s=new yc(function(c,h,d){return 3*(h+d)/4-d}(0,n,o)),a=0,u=o>0?n-4:n;for(r=0;r>16&255,s[a++]=e>>8&255,s[a++]=255&e;return o===2&&(e=ke[t.charCodeAt(r)]<<2|ke[t.charCodeAt(r+1)]>>4,s[a++]=255&e),o===1&&(e=ke[t.charCodeAt(r)]<<10|ke[t.charCodeAt(r+1)]<<4|ke[t.charCodeAt(r+2)]>>2,s[a++]=e>>8&255,s[a++]=255&e),s},fromByteArray:function(t){for(var e,r=t.length,i=r%3,n=[],o=0,s=r-i;os?s:o+16383));return i===1?(e=t[r-1],n.push($e[e>>2]+$e[e<<4&63]+\"==\")):i===2&&(e=(t[r-2]<<8)+t[r-1],n.push($e[e>>10]+$e[e>>4&63]+$e[e<<2&63]+\"=\")),n.join(\"\")}},$e=[],ke=[],yc=typeof Uint8Array<\"u\"?Uint8Array:Array,on=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\",nr=0,bc=on.length;nr>1,h=-7,d=r?n-1:0,g=r?-1:1,y=t[e+d];for(d+=g,o=y&(1<<-h)-1,y>>=-h,h+=a;h>0;o=256*o+t[e+d],d+=g,h-=8);for(s=o&(1<<-h)-1,o>>=-h,h+=i;h>0;s=256*s+t[e+d],d+=g,h-=8);if(o===0)o=1-c;else {if(o===u)return s?NaN:1/0*(y?-1:1);s+=Math.pow(2,i),o-=c;}return (y?-1:1)*s*Math.pow(2,o-i)},write:function(t,e,r,i,n,o){var s,a,u,c=8*o-n-1,h=(1<>1,g=n===23?Math.pow(2,-24)-Math.pow(2,-77):0,y=i?0:o-1,w=i?1:-1,E=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=h):(s=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-s))<1&&(s--,u*=2),(e+=s+d>=1?g/u:g*Math.pow(2,1-d))*u>=2&&(s++,u/=2),s+d>=h?(a=0,s=h):s+d>=1?(a=(e*u-1)*Math.pow(2,n),s+=d):(a=e*Math.pow(2,d-1)*Math.pow(2,n),s=0));n>=8;t[r+y]=255&a,y+=w,a/=256,n-=8);for(s=s<0;t[r+y]=255&s,y+=w,s/=256,c-=8);t[r+y-w]|=128*E;}},St={},$s=Rc,Nr=gw,_c=typeof Symbol==\"function\"&&typeof Symbol.for==\"function\"?Symbol.for(\"nodejs.util.inspect.custom\"):null;St.Buffer=k,St.SlowBuffer=function(t){return +t!=t&&(t=0),k.alloc(+t)},St.INSPECT_MAX_BYTES=50;St.kMaxLength=2147483647,k.TYPED_ARRAY_SUPPORT=function(){try{var t=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(t,e),t.foo()===42}catch{return !1}}(),k.TYPED_ARRAY_SUPPORT||typeof console>\"u\"||typeof console.error!=\"function\"||console.error(\"This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.\"),Object.defineProperty(k.prototype,\"parent\",{enumerable:!0,get:function(){if(k.isBuffer(this))return this.buffer}}),Object.defineProperty(k.prototype,\"offset\",{enumerable:!0,get:function(){if(k.isBuffer(this))return this.byteOffset}}),k.poolSize=8192,k.from=function(t,e,r){return Cc(t,e,r)},Object.setPrototypeOf(k.prototype,Uint8Array.prototype),Object.setPrototypeOf(k,Uint8Array),k.alloc=function(t,e,r){return function(i,n,o){return Bc(i),i<=0?vt(i):n!==void 0?typeof o==\"string\"?vt(i).fill(n,o):vt(i).fill(n):vt(i)}(t,e,r)},k.allocUnsafe=function(t){return Hs(t)},k.allocUnsafeSlow=function(t){return Hs(t)},k.isBuffer=function(t){return t!=null&&t._isBuffer===!0&&t!==k.prototype},k.compare=function(t,e){if(Et(t,Uint8Array)&&(t=k.from(t,t.offset,t.byteLength)),Et(e,Uint8Array)&&(e=k.from(e,e.offset,e.byteLength)),!k.isBuffer(t)||!k.isBuffer(e))throw new TypeError('The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;for(var r=t.length,i=e.length,n=0,o=Math.min(r,i);ne&&(t+=\" ... \"),\"\"},_c&&(k.prototype[_c]=k.prototype.inspect),k.prototype.compare=function(t,e,r,i,n){if(Et(t,Uint8Array)&&(t=k.from(t,t.offset,t.byteLength)),!k.isBuffer(t))throw new TypeError('The \"target\" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(e===void 0&&(e=0),r===void 0&&(r=t?t.length:0),i===void 0&&(i=0),n===void 0&&(n=this.length),e<0||r>t.length||i<0||n>this.length)throw new RangeError(\"out of range index\");if(i>=n&&e>=r)return 0;if(i>=n)return -1;if(e>=r)return 1;if(this===t)return 0;for(var o=(n>>>=0)-(i>>>=0),s=(r>>>=0)-(e>>>=0),a=Math.min(o,s),u=this.slice(i,n),c=t.slice(e,r),h=0;h>>=0,isFinite(r)?(r>>>=0,i===void 0&&(i=\"utf8\")):(i=r,r=void 0);}var n=this.length-e;if((r===void 0||r>n)&&(r=n),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError(\"Attempt to write outside buffer bounds\");i||(i=\"utf8\");for(var o=!1;;)switch(i){case\"hex\":return bw(this,t,e,r);case\"utf8\":case\"utf-8\":return ww(this,t,e,r);case\"ascii\":return Oc(this,t,e,r);case\"latin1\":case\"binary\":return _w(this,t,e,r);case\"base64\":return mw(this,t,e,r);case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return vw(this,t,e,r);default:if(o)throw new TypeError(\"Unknown encoding: \"+i);i=(\"\"+i).toLowerCase(),o=!0;}},k.prototype.toJSON=function(){return {type:\"Buffer\",data:Array.prototype.slice.call(this._arr||this,0)}};k.prototype.slice=function(t,e){var r=this.length;(t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=e===void 0?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e>>=0,e>>>=0,r||be(t,e,this.length);for(var i=this[t],n=1,o=0;++o>>=0,e>>>=0,r||be(t,e,this.length);for(var i=this[t+--e],n=1;e>0&&(n*=256);)i+=this[t+--e]*n;return i},k.prototype.readUInt8=function(t,e){return t>>>=0,e||be(t,1,this.length),this[t]},k.prototype.readUInt16LE=function(t,e){return t>>>=0,e||be(t,2,this.length),this[t]|this[t+1]<<8},k.prototype.readUInt16BE=function(t,e){return t>>>=0,e||be(t,2,this.length),this[t]<<8|this[t+1]},k.prototype.readUInt32LE=function(t,e){return t>>>=0,e||be(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},k.prototype.readUInt32BE=function(t,e){return t>>>=0,e||be(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},k.prototype.readIntLE=function(t,e,r){t>>>=0,e>>>=0,r||be(t,e,this.length);for(var i=this[t],n=1,o=0;++o=(n*=128)&&(i-=Math.pow(2,8*e)),i},k.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||be(t,e,this.length);for(var i=e,n=1,o=this[t+--i];i>0&&(n*=256);)o+=this[t+--i]*n;return o>=(n*=128)&&(o-=Math.pow(2,8*e)),o},k.prototype.readInt8=function(t,e){return t>>>=0,e||be(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},k.prototype.readInt16LE=function(t,e){t>>>=0,e||be(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},k.prototype.readInt16BE=function(t,e){t>>>=0,e||be(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},k.prototype.readInt32LE=function(t,e){return t>>>=0,e||be(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},k.prototype.readInt32BE=function(t,e){return t>>>=0,e||be(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},k.prototype.readFloatLE=function(t,e){return t>>>=0,e||be(t,4,this.length),Nr.read(this,t,!0,23,4)},k.prototype.readFloatBE=function(t,e){return t>>>=0,e||be(t,4,this.length),Nr.read(this,t,!1,23,4)},k.prototype.readDoubleLE=function(t,e){return t>>>=0,e||be(t,8,this.length),Nr.read(this,t,!0,52,8)},k.prototype.readDoubleBE=function(t,e){return t>>>=0,e||be(t,8,this.length),Nr.read(this,t,!1,52,8)},k.prototype.writeUIntLE=function(t,e,r,i){t=+t,e>>>=0,r>>>=0,i||Pe(this,t,e,r,Math.pow(2,8*r)-1,0);var n=1,o=0;for(this[e]=255&t;++o>>=0,r>>>=0,i||Pe(this,t,e,r,Math.pow(2,8*r)-1,0);var n=r-1,o=1;for(this[e+n]=255&t;--n>=0&&(o*=256);)this[e+n]=t/o&255;return e+r},k.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||Pe(this,t,e,1,255,0),this[e]=255&t,e+1},k.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||Pe(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},k.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||Pe(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},k.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||Pe(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},k.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||Pe(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},k.prototype.writeIntLE=function(t,e,r,i){if(t=+t,e>>>=0,!i){var n=Math.pow(2,8*r-1);Pe(this,t,e,r,n-1,-n);}var o=0,s=1,a=0;for(this[e]=255&t;++o>0)-a&255;return e+r},k.prototype.writeIntBE=function(t,e,r,i){if(t=+t,e>>>=0,!i){var n=Math.pow(2,8*r-1);Pe(this,t,e,r,n-1,-n);}var o=r-1,s=1,a=0;for(this[e+o]=255&t;--o>=0&&(s*=256);)t<0&&a===0&&this[e+o+1]!==0&&(a=1),this[e+o]=(t/s>>0)-a&255;return e+r},k.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||Pe(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},k.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||Pe(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},k.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||Pe(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},k.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||Pe(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},k.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||Pe(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},k.prototype.writeFloatLE=function(t,e,r){return Sc(this,t,e,!0,r)},k.prototype.writeFloatBE=function(t,e,r){return Sc(this,t,e,!1,r)},k.prototype.writeDoubleLE=function(t,e,r){return Ac(this,t,e,!0,r)},k.prototype.writeDoubleBE=function(t,e,r){return Ac(this,t,e,!1,r)},k.prototype.copy=function(t,e,r,i){if(!k.isBuffer(t))throw new TypeError(\"argument should be a Buffer\");if(r||(r=0),i||i===0||(i=this.length),e>=t.length&&(e=t.length),e||(e=0),i>0&&i=this.length)throw new RangeError(\"Index out of range\");if(i<0)throw new RangeError(\"sourceEnd out of bounds\");i>this.length&&(i=this.length),t.length-e=0;--o)t[o+e]=this[o+r];else Uint8Array.prototype.set.call(t,this.subarray(r,i),e);return n},k.prototype.fill=function(t,e,r,i){if(typeof t==\"string\"){if(typeof e==\"string\"?(i=e,e=0,r=this.length):typeof r==\"string\"&&(i=r,r=this.length),i!==void 0&&typeof i!=\"string\")throw new TypeError(\"encoding must be a string\");if(typeof i==\"string\"&&!k.isEncoding(i))throw new TypeError(\"Unknown encoding: \"+i);if(t.length===1){var n=t.charCodeAt(0);(i===\"utf8\"&&n<128||i===\"latin1\")&&(t=n);}}else typeof t==\"number\"?t&=255:typeof t==\"boolean\"&&(t=Number(t));if(e<0||this.length>>=0,r=r===void 0?this.length:r>>>0,t||(t=0),typeof t==\"number\")for(o=e;o=0?(u>0&&(n.lastNeed=u-1),u):--a=0?(u>0&&(n.lastNeed=u-2),u):--a=0?(u>0&&(u===2?u=0:n.lastNeed=u-3),u):0}(this,t,e);if(!this.lastNeed)return t.toString(\"utf8\",e);this.lastTotal=r;var i=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,i),t.toString(\"utf8\",e,i)},hi.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length;};ar.StringDecoder;ar.StringDecoder;});var Lc={};Qt(Lc,{StringDecoder:()=>Nw,default:()=>ar});var Nw,Uc=we(()=>{v();m();_();Qs();Qs();Nw=ar.StringDecoder;});var Ys=M((F2,jc)=>{v();m();_();var Nc=Ut(),{PromisePrototypeThen:qw,SymbolAsyncIterator:qc,SymbolIterator:Dc}=ce(),{Buffer:Dw}=(ye(),X(_e)),{ERR_INVALID_ARG_TYPE:jw,ERR_STREAM_NULL_VALUES:Fw}=Se().codes;function Ww(t,e,r){let i;if(typeof e==\"string\"||e instanceof Dw)return new t({objectMode:!0,...r,read(){this.push(e),this.push(null);}});let n;if(e&&e[qc])n=!0,i=e[qc]();else if(e&&e[Dc])n=!1,i=e[Dc]();else throw new jw(\"iterable\",[\"Iterable\"],e);let o=new t({objectMode:!0,highWaterMark:1,...r}),s=!1;o._read=function(){s||(s=!0,u());},o._destroy=function(c,h){qw(a(c),()=>Nc.nextTick(h,c),d=>Nc.nextTick(h,d||c));};async function a(c){let h=c!=null,d=typeof i.throw==\"function\";if(h&&d){let{value:g,done:y}=await i.throw(c);if(await g,y)return}if(typeof i.return==\"function\"){let{value:g}=await i.return();await g;}}async function u(){for(;;){try{let{value:c,done:h}=n?await i.next():i.next();if(h)o.push(null);else {let d=c&&typeof c.then==\"function\"?await c:c;if(d===null)throw s=!1,new Fw;if(o.push(d))continue;s=!1;}}catch(c){o.destroy(c);}break}}return o}jc.exports=Ww;});var di=M((J2,Zc)=>{v();m();_();var He=Ut(),{ArrayPrototypeIndexOf:$w,NumberIsInteger:Hw,NumberIsNaN:Vw,NumberParseInt:zw,ObjectDefineProperties:$c,ObjectKeys:Kw,ObjectSetPrototypeOf:Hc,Promise:Gw,SafeSet:Qw,SymbolAsyncIterator:Yw,Symbol:Jw}=ce();Zc.exports=F;F.ReadableState=ro;var{EventEmitter:Xw}=(ir(),X(rr)),{Stream:qt,prependListener:Zw}=tn(),{Buffer:Js}=(ye(),X(_e)),{addAbortSignal:e_}=ci(),t_=mt(),H=Je().debuglog(\"stream\",t=>{H=t;}),r_=dc(),Dr=tr(),{getHighWaterMark:i_,getDefaultHighWaterMark:n_}=sn(),{aggregateTwoErrors:Fc,codes:{ERR_INVALID_ARG_TYPE:s_,ERR_METHOD_NOT_IMPLEMENTED:o_,ERR_OUT_OF_RANGE:a_,ERR_STREAM_PUSH_AFTER_EOF:l_,ERR_STREAM_UNSHIFT_AFTER_END_EVENT:u_}}=Se(),{validateObject:f_}=fi(),lr=Jw(\"kPaused\"),{StringDecoder:Vc}=(Uc(),X(Lc)),c_=Ys();Hc(F.prototype,qt.prototype);Hc(F,qt);var Xs=()=>{},{errorOrDestroy:qr}=Dr;function ro(t,e,r){typeof r!=\"boolean\"&&(r=e instanceof nt()),this.objectMode=!!(t&&t.objectMode),r&&(this.objectMode=this.objectMode||!!(t&&t.readableObjectMode)),this.highWaterMark=t?i_(this,t,\"readableHighWaterMark\",r):n_(!1),this.buffer=new r_,this.length=0,this.pipes=[],this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.constructed=!0,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this[lr]=null,this.errorEmitted=!1,this.emitClose=!t||t.emitClose!==!1,this.autoDestroy=!t||t.autoDestroy!==!1,this.destroyed=!1,this.errored=null,this.closed=!1,this.closeEmitted=!1,this.defaultEncoding=t&&t.defaultEncoding||\"utf8\",this.awaitDrainWriters=null,this.multiAwaitDrain=!1,this.readingMore=!1,this.dataEmitted=!1,this.decoder=null,this.encoding=null,t&&t.encoding&&(this.decoder=new Vc(t.encoding),this.encoding=t.encoding);}function F(t){if(!(this instanceof F))return new F(t);let e=this instanceof nt();this._readableState=new ro(t,this,e),t&&(typeof t.read==\"function\"&&(this._read=t.read),typeof t.destroy==\"function\"&&(this._destroy=t.destroy),typeof t.construct==\"function\"&&(this._construct=t.construct),t.signal&&!e&&e_(t.signal,this)),qt.call(this,t),Dr.construct(this,()=>{this._readableState.needReadable&&fn(this,this._readableState);});}F.prototype.destroy=Dr.destroy;F.prototype._undestroy=Dr.undestroy;F.prototype._destroy=function(t,e){e(t);};F.prototype[Xw.captureRejectionSymbol]=function(t){this.destroy(t);};F.prototype.push=function(t,e){return zc(this,t,e,!1)};F.prototype.unshift=function(t,e){return zc(this,t,e,!0)};function zc(t,e,r,i){H(\"readableAddChunk\",e);let n=t._readableState,o;if(n.objectMode||(typeof e==\"string\"?(r=r||n.defaultEncoding,n.encoding!==r&&(i&&n.encoding?e=Js.from(e,r).toString(n.encoding):(e=Js.from(e,r),r=\"\"))):e instanceof Js?r=\"\":qt._isUint8Array(e)?(e=qt._uint8ArrayToBuffer(e),r=\"\"):e!=null&&(o=new s_(\"chunk\",[\"string\",\"Buffer\",\"Uint8Array\"],e))),o)qr(t,o);else if(e===null)n.reading=!1,p_(t,n);else if(n.objectMode||e&&e.length>0)if(i)if(n.endEmitted)qr(t,new u_);else {if(n.destroyed||n.errored)return !1;Zs(t,n,e,!0);}else if(n.ended)qr(t,new l_);else {if(n.destroyed||n.errored)return !1;n.reading=!1,n.decoder&&!r?(e=n.decoder.write(e),n.objectMode||e.length!==0?Zs(t,n,e,!1):fn(t,n)):Zs(t,n,e,!1);}else i||(n.reading=!1,fn(t,n));return !n.ended&&(n.length0?(e.multiAwaitDrain?e.awaitDrainWriters.clear():e.awaitDrainWriters=null,e.dataEmitted=!0,t.emit(\"data\",r)):(e.length+=e.objectMode?1:r.length,i?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&cn(t)),fn(t,e);}F.prototype.isPaused=function(){let t=this._readableState;return t[lr]===!0||t.flowing===!1};F.prototype.setEncoding=function(t){let e=new Vc(t);this._readableState.decoder=e,this._readableState.encoding=this._readableState.decoder.encoding;let r=this._readableState.buffer,i=\"\";for(let n of r)i+=e.write(n);return r.clear(),i!==\"\"&&r.push(i),this._readableState.length=i.length,this};var h_=1073741824;function d_(t){if(t>h_)throw new a_(\"size\",\"<= 1GiB\",t);return t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++,t}function Wc(t,e){return t<=0||e.length===0&&e.ended?0:e.objectMode?1:Vw(t)?e.flowing&&e.length?e.buffer.first().length:e.length:t<=e.length?t:e.ended?e.length:0}F.prototype.read=function(t){H(\"read\",t),t===void 0?t=NaN:Hw(t)||(t=zw(t,10));let e=this._readableState,r=t;if(t>e.highWaterMark&&(e.highWaterMark=d_(t)),t!==0&&(e.emittedReadable=!1),t===0&&e.needReadable&&((e.highWaterMark!==0?e.length>=e.highWaterMark:e.length>0)||e.ended))return H(\"read: emitReadable\",e.length,e.ended),e.length===0&&e.ended?eo(this):cn(this),null;if(t=Wc(t,e),t===0&&e.ended)return e.length===0&&eo(this),null;let i=e.needReadable;if(H(\"need readable\",i),(e.length===0||e.length-t0?n=Jc(t,e):n=null,n===null?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.multiAwaitDrain?e.awaitDrainWriters.clear():e.awaitDrainWriters=null),e.length===0&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&eo(this)),n!==null&&!e.errorEmitted&&!e.closeEmitted&&(e.dataEmitted=!0,this.emit(\"data\",n)),n};function p_(t,e){if(H(\"onEofChunk\"),!e.ended){if(e.decoder){let r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length);}e.ended=!0,e.sync?cn(t):(e.needReadable=!1,e.emittedReadable=!0,Kc(t));}}function cn(t){let e=t._readableState;H(\"emitReadable\",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(H(\"emitReadable\",e.flowing),e.emittedReadable=!0,He.nextTick(Kc,t));}function Kc(t){let e=t._readableState;H(\"emitReadable_\",e.destroyed,e.length,e.ended),!e.destroyed&&!e.errored&&(e.length||e.ended)&&(t.emit(\"readable\"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,Qc(t);}function fn(t,e){!e.readingMore&&e.constructed&&(e.readingMore=!0,He.nextTick(g_,t,e));}function g_(t,e){for(;!e.reading&&!e.ended&&(e.length1&&i.pipes.includes(t)&&(H(\"false write response, pause\",i.awaitDrainWriters.size),i.awaitDrainWriters.add(t)),r.pause()),u||(u=y_(r,t),t.on(\"drain\",u));}r.on(\"data\",g);function g(I){H(\"ondata\");let C=t.write(I);H(\"dest.write\",C),C===!1&&d();}function y(I){if(H(\"onerror\",I),S(),t.removeListener(\"error\",y),t.listenerCount(\"error\")===0){let C=t._writableState||t._readableState;C&&!C.errorEmitted?qr(t,I):t.emit(\"error\",I);}}Zw(t,\"error\",y);function w(){t.removeListener(\"finish\",E),S();}t.once(\"close\",w);function E(){H(\"onfinish\"),t.removeListener(\"close\",w),S();}t.once(\"finish\",E);function S(){H(\"unpipe\"),r.unpipe(t);}return t.emit(\"pipe\",r),t.writableNeedDrain===!0?i.flowing&&d():i.flowing||(H(\"pipe resume\"),r.resume()),t};function y_(t,e){return function(){let i=t._readableState;i.awaitDrainWriters===e?(H(\"pipeOnDrain\",1),i.awaitDrainWriters=null):i.multiAwaitDrain&&(H(\"pipeOnDrain\",i.awaitDrainWriters.size),i.awaitDrainWriters.delete(e)),(!i.awaitDrainWriters||i.awaitDrainWriters.size===0)&&t.listenerCount(\"data\")&&t.resume();}}F.prototype.unpipe=function(t){let e=this._readableState,r={hasUnpiped:!1};if(e.pipes.length===0)return this;if(!t){let n=e.pipes;e.pipes=[],this.pause();for(let o=0;o0,i.flowing!==!1&&this.resume()):t===\"readable\"&&!i.endEmitted&&!i.readableListening&&(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,H(\"on readable\",i.length,i.reading),i.length?cn(this):i.reading||He.nextTick(b_,this)),r};F.prototype.addListener=F.prototype.on;F.prototype.removeListener=function(t,e){let r=qt.prototype.removeListener.call(this,t,e);return t===\"readable\"&&He.nextTick(Gc,this),r};F.prototype.off=F.prototype.removeListener;F.prototype.removeAllListeners=function(t){let e=qt.prototype.removeAllListeners.apply(this,arguments);return (t===\"readable\"||t===void 0)&&He.nextTick(Gc,this),e};function Gc(t){let e=t._readableState;e.readableListening=t.listenerCount(\"readable\")>0,e.resumeScheduled&&e[lr]===!1?e.flowing=!0:t.listenerCount(\"data\")>0?t.resume():e.readableListening||(e.flowing=null);}function b_(t){H(\"readable nexttick read 0\"),t.read(0);}F.prototype.resume=function(){let t=this._readableState;return t.flowing||(H(\"resume\"),t.flowing=!t.readableListening,w_(this,t)),t[lr]=!1,this};function w_(t,e){e.resumeScheduled||(e.resumeScheduled=!0,He.nextTick(__,t,e));}function __(t,e){H(\"resume\",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit(\"resume\"),Qc(t),e.flowing&&!e.reading&&t.read(0);}F.prototype.pause=function(){return H(\"call pause flowing=%j\",this._readableState.flowing),this._readableState.flowing!==!1&&(H(\"pause\"),this._readableState.flowing=!1,this.emit(\"pause\")),this._readableState[lr]=!0,this};function Qc(t){let e=t._readableState;for(H(\"flow\",e.flowing);e.flowing&&t.read()!==null;);}F.prototype.wrap=function(t){let e=!1;t.on(\"data\",i=>{!this.push(i)&&t.pause&&(e=!0,t.pause());}),t.on(\"end\",()=>{this.push(null);}),t.on(\"error\",i=>{qr(this,i);}),t.on(\"close\",()=>{this.destroy();}),t.on(\"destroy\",()=>{this.destroy();}),this._read=()=>{e&&t.resume&&(e=!1,t.resume());};let r=Kw(t);for(let i=1;i{n=s?Fc(n,s):null,r(),r=Xs;});try{for(;;){let s=t.destroyed?null:t.read();if(s!==null)yield s;else {if(n)throw n;if(n===null)return;await new Gw(i);}}}catch(s){throw n=Fc(n,s),n}finally{(n||e?.destroyOnReturn!==!1)&&(n===void 0||t._readableState.autoDestroy)?Dr.destroyer(t,null):(t.off(\"readable\",i),o());}}$c(F.prototype,{readable:{__proto__:null,get(){let t=this._readableState;return !!t&&t.readable!==!1&&!t.destroyed&&!t.errorEmitted&&!t.endEmitted},set(t){this._readableState&&(this._readableState.readable=!!t);}},readableDidRead:{__proto__:null,enumerable:!1,get:function(){return this._readableState.dataEmitted}},readableAborted:{__proto__:null,enumerable:!1,get:function(){return !!(this._readableState.readable!==!1&&(this._readableState.destroyed||this._readableState.errored)&&!this._readableState.endEmitted)}},readableHighWaterMark:{__proto__:null,enumerable:!1,get:function(){return this._readableState.highWaterMark}},readableBuffer:{__proto__:null,enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}},readableFlowing:{__proto__:null,enumerable:!1,get:function(){return this._readableState.flowing},set:function(t){this._readableState&&(this._readableState.flowing=t);}},readableLength:{__proto__:null,enumerable:!1,get(){return this._readableState.length}},readableObjectMode:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.objectMode:!1}},readableEncoding:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.encoding:null}},errored:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.errored:null}},closed:{__proto__:null,get(){return this._readableState?this._readableState.closed:!1}},destroyed:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.destroyed:!1},set(t){this._readableState&&(this._readableState.destroyed=t);}},readableEnded:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.endEmitted:!1}}});$c(ro.prototype,{pipesCount:{__proto__:null,get(){return this.pipes.length}},paused:{__proto__:null,get(){return this[lr]!==!1},set(t){this[lr]=!!t;}}});F._fromList=Jc;function Jc(t,e){if(e.length===0)return null;let r;return e.objectMode?r=e.buffer.shift():!t||t>=e.length?(e.decoder?r=e.buffer.join(\"\"):e.buffer.length===1?r=e.buffer.first():r=e.buffer.concat(e.length),e.buffer.clear()):r=e.buffer.consume(t,e.decoder),r}function eo(t){let e=t._readableState;H(\"endReadable\",e.endEmitted),e.endEmitted||(e.ended=!0,He.nextTick(v_,e,t));}function v_(t,e){if(H(\"endReadableNT\",t.endEmitted,t.length),!t.errored&&!t.closeEmitted&&!t.endEmitted&&t.length===0){if(t.endEmitted=!0,e.emit(\"end\"),e.writable&&e.allowHalfOpen===!1)He.nextTick(E_,e);else if(t.autoDestroy){let r=e._writableState;(!r||r.autoDestroy&&(r.finished||r.writable===!1))&&e.destroy();}}}function E_(t){t.writable&&!t.writableEnded&&!t.destroyed&&t.end();}F.from=function(t,e){return c_(F,t,e)};var to;function Xc(){return to===void 0&&(to={}),to}F.fromWeb=function(t,e){return Xc().newStreamReadableFromReadableStream(t,e)};F.toWeb=function(t,e){return Xc().newReadableStreamFromStreamReadable(t,e)};F.wrap=function(t,e){var r,i;return new F({objectMode:(r=(i=t.readableObjectMode)!==null&&i!==void 0?i:t.objectMode)!==null&&r!==void 0?r:!0,...e,destroy(n,o){Dr.destroyer(t,n),o(n);}}).wrap(t)};});var uo=M((aR,ch)=>{v();m();_();var ur=Ut(),{ArrayPrototypeSlice:rh,Error:S_,FunctionPrototypeSymbolHasInstance:ih,ObjectDefineProperty:nh,ObjectDefineProperties:A_,ObjectSetPrototypeOf:sh,StringPrototypeToLowerCase:I_,Symbol:T_,SymbolHasInstance:R_}=ce();ch.exports=ie;ie.WritableState=yi;var{EventEmitter:C_}=(ir(),X(rr)),pi=tn().Stream,{Buffer:hn}=(ye(),X(_e)),gn=tr(),{addAbortSignal:B_}=ci(),{getHighWaterMark:P_,getDefaultHighWaterMark:O_}=sn(),{ERR_INVALID_ARG_TYPE:k_,ERR_METHOD_NOT_IMPLEMENTED:x_,ERR_MULTIPLE_CALLBACK:oh,ERR_STREAM_CANNOT_PIPE:M_,ERR_STREAM_DESTROYED:gi,ERR_STREAM_ALREADY_FINISHED:L_,ERR_STREAM_NULL_VALUES:U_,ERR_STREAM_WRITE_AFTER_END:N_,ERR_UNKNOWN_ENCODING:ah}=Se().codes,{errorOrDestroy:jr}=gn;sh(ie.prototype,pi.prototype);sh(ie,pi);function so(){}var Fr=T_(\"kOnFinished\");function yi(t,e,r){typeof r!=\"boolean\"&&(r=e instanceof nt()),this.objectMode=!!(t&&t.objectMode),r&&(this.objectMode=this.objectMode||!!(t&&t.writableObjectMode)),this.highWaterMark=t?P_(this,t,\"writableHighWaterMark\",r):O_(!1),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;let i=!!(t&&t.decodeStrings===!1);this.decodeStrings=!i,this.defaultEncoding=t&&t.defaultEncoding||\"utf8\",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=D_.bind(void 0,e),this.writecb=null,this.writelen=0,this.afterWriteTickInfo=null,pn(this),this.pendingcb=0,this.constructed=!0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!t||t.emitClose!==!1,this.autoDestroy=!t||t.autoDestroy!==!1,this.errored=null,this.closed=!1,this.closeEmitted=!1,this[Fr]=[];}function pn(t){t.buffered=[],t.bufferedIndex=0,t.allBuffers=!0,t.allNoop=!0;}yi.prototype.getBuffer=function(){return rh(this.buffered,this.bufferedIndex)};nh(yi.prototype,\"bufferedRequestCount\",{__proto__:null,get(){return this.buffered.length-this.bufferedIndex}});function ie(t){let e=this instanceof nt();if(!e&&!ih(ie,this))return new ie(t);this._writableState=new yi(t,this,e),t&&(typeof t.write==\"function\"&&(this._write=t.write),typeof t.writev==\"function\"&&(this._writev=t.writev),typeof t.destroy==\"function\"&&(this._destroy=t.destroy),typeof t.final==\"function\"&&(this._final=t.final),typeof t.construct==\"function\"&&(this._construct=t.construct),t.signal&&B_(t.signal,this)),pi.call(this,t),gn.construct(this,()=>{let r=this._writableState;r.writing||ao(this,r),lo(this,r);});}nh(ie,R_,{__proto__:null,value:function(t){return ih(this,t)?!0:this!==ie?!1:t&&t._writableState instanceof yi}});ie.prototype.pipe=function(){jr(this,new M_);};function lh(t,e,r,i){let n=t._writableState;if(typeof r==\"function\")i=r,r=n.defaultEncoding;else {if(!r)r=n.defaultEncoding;else if(r!==\"buffer\"&&!hn.isEncoding(r))throw new ah(r);typeof i!=\"function\"&&(i=so);}if(e===null)throw new U_;if(!n.objectMode)if(typeof e==\"string\")n.decodeStrings!==!1&&(e=hn.from(e,r),r=\"buffer\");else if(e instanceof hn)r=\"buffer\";else if(pi._isUint8Array(e))e=pi._uint8ArrayToBuffer(e),r=\"buffer\";else throw new k_(\"chunk\",[\"string\",\"Buffer\",\"Uint8Array\"],e);let o;return n.ending?o=new N_:n.destroyed&&(o=new gi(\"write\")),o?(ur.nextTick(i,o),jr(t,o,!0),o):(n.pendingcb++,q_(t,n,e,r,i))}ie.prototype.write=function(t,e,r){return lh(this,t,e,r)===!0};ie.prototype.cork=function(){this._writableState.corked++;};ie.prototype.uncork=function(){let t=this._writableState;t.corked&&(t.corked--,t.writing||ao(this,t));};ie.prototype.setDefaultEncoding=function(e){if(typeof e==\"string\"&&(e=I_(e)),!hn.isEncoding(e))throw new ah(e);return this._writableState.defaultEncoding=e,this};function q_(t,e,r,i,n){let o=e.objectMode?1:r.length;e.length+=o;let s=e.lengthr.bufferedIndex&&ao(t,r),i?r.afterWriteTickInfo!==null&&r.afterWriteTickInfo.cb===n?r.afterWriteTickInfo.count++:(r.afterWriteTickInfo={count:1,cb:n,stream:t,state:r},ur.nextTick(j_,r.afterWriteTickInfo)):uh(t,r,1,n));}function j_({stream:t,state:e,count:r,cb:i}){return e.afterWriteTickInfo=null,uh(t,e,r,i)}function uh(t,e,r,i){for(!e.ending&&!t.destroyed&&e.length===0&&e.needDrain&&(e.needDrain=!1,t.emit(\"drain\"));r-- >0;)e.pendingcb--,i();e.destroyed&&oo(e),lo(t,e);}function oo(t){if(t.writing)return;for(let n=t.bufferedIndex;n1&&t._writev){e.pendingcb-=o-1;let a=e.allNoop?so:c=>{for(let h=s;h256?(r.splice(0,s),e.bufferedIndex=0):e.bufferedIndex=s;}e.bufferProcessing=!1;}ie.prototype._write=function(t,e,r){if(this._writev)this._writev([{chunk:t,encoding:e}],r);else throw new x_(\"_write()\")};ie.prototype._writev=null;ie.prototype.end=function(t,e,r){let i=this._writableState;typeof t==\"function\"?(r=t,t=null,e=null):typeof e==\"function\"&&(r=e,e=null);let n;if(t!=null){let o=lh(this,t,e);o instanceof S_&&(n=o);}return i.corked&&(i.corked=1,this.uncork()),n||(!i.errored&&!i.ending?(i.ending=!0,lo(this,i,!0),i.ended=!0):i.finished?n=new L_(\"end\"):i.destroyed&&(n=new gi(\"end\"))),typeof r==\"function\"&&(n||i.finished?ur.nextTick(r,n):i[Fr].push(r)),this};function dn(t){return t.ending&&!t.destroyed&&t.constructed&&t.length===0&&!t.errored&&t.buffered.length===0&&!t.finished&&!t.writing&&!t.errorEmitted&&!t.closeEmitted}function F_(t,e){let r=!1;function i(n){if(r){jr(t,n??oh());return}if(r=!0,e.pendingcb--,n){let o=e[Fr].splice(0);for(let s=0;s{dn(n)?no(i,n):n.pendingcb--;},t,e)):dn(e)&&(e.pendingcb++,no(t,e))));}function no(t,e){e.pendingcb--,e.finished=!0;let r=e[Fr].splice(0);for(let i=0;i{v();m();_();var fo=Ut(),H_=(ye(),X(_e)),{isReadable:V_,isWritable:z_,isIterable:hh,isNodeStream:K_,isReadableNodeStream:dh,isWritableNodeStream:ph,isDuplexNodeStream:G_}=tt(),gh=mt(),{AbortError:vh,codes:{ERR_INVALID_ARG_TYPE:Q_,ERR_INVALID_RETURN_VALUE:yh}}=Se(),{destroyer:Wr}=tr(),Y_=nt(),J_=di(),{createDeferredPromise:bh}=Je(),wh=Ys(),_h=globalThis.Blob||H_.Blob,X_=typeof _h<\"u\"?function(e){return e instanceof _h}:function(e){return !1},Z_=globalThis.AbortController||Hi().AbortController,{FunctionPrototypeCall:mh}=ce(),fr=class extends Y_{constructor(e){super(e),e?.readable===!1&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),e?.writable===!1&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0);}};Eh.exports=function t(e,r){if(G_(e))return e;if(dh(e))return yn({readable:e});if(ph(e))return yn({writable:e});if(K_(e))return yn({writable:!1,readable:!1});if(typeof e==\"function\"){let{value:n,write:o,final:s,destroy:a}=e0(e);if(hh(n))return wh(fr,n,{objectMode:!0,write:o,final:s,destroy:a});let u=n?.then;if(typeof u==\"function\"){let c,h=mh(u,n,d=>{if(d!=null)throw new yh(\"nully\",\"body\",d)},d=>{Wr(c,d);});return c=new fr({objectMode:!0,readable:!1,write:o,final(d){s(async()=>{try{await h,fo.nextTick(d,null);}catch(g){fo.nextTick(d,g);}});},destroy:a})}throw new yh(\"Iterable, AsyncIterable or AsyncFunction\",r,n)}if(X_(e))return t(e.arrayBuffer());if(hh(e))return wh(fr,e,{objectMode:!0,writable:!1});if(typeof e?.writable==\"object\"||typeof e?.readable==\"object\"){let n=e!=null&&e.readable?dh(e?.readable)?e?.readable:t(e.readable):void 0,o=e!=null&&e.writable?ph(e?.writable)?e?.writable:t(e.writable):void 0;return yn({readable:n,writable:o})}let i=e?.then;if(typeof i==\"function\"){let n;return mh(i,e,o=>{o!=null&&n.push(o),n.push(null);},o=>{Wr(n,o);}),n=new fr({objectMode:!0,writable:!1,read(){}})}throw new Q_(r,[\"Blob\",\"ReadableStream\",\"WritableStream\",\"Stream\",\"Iterable\",\"AsyncIterable\",\"Function\",\"{ readable, writable } pair\",\"Promise\"],e)};function e0(t){let{promise:e,resolve:r}=bh(),i=new Z_,n=i.signal;return {value:t(async function*(){for(;;){let s=e;e=null;let{chunk:a,done:u,cb:c}=await s;if(fo.nextTick(c),u)return;if(n.aborted)throw new vh(void 0,{cause:n.reason});(({promise:e,resolve:r}=bh())),yield a;}}(),{signal:n}),write(s,a,u){let c=r;r=null,c({chunk:s,done:!1,cb:u});},final(s){let a=r;r=null,a({done:!0,cb:s});},destroy(s,a){i.abort(),a(s);}}}function yn(t){let e=t.readable&&typeof t.readable.read!=\"function\"?J_.wrap(t.readable):t.readable,r=t.writable,i=!!V_(e),n=!!z_(r),o,s,a,u,c;function h(d){let g=u;u=null,g?g(d):d&&c.destroy(d);}return c=new fr({readableObjectMode:!!(e!=null&&e.readableObjectMode),writableObjectMode:!!(r!=null&&r.writableObjectMode),readable:i,writable:n}),n&&(gh(r,d=>{n=!1,d&&Wr(e,d),h(d);}),c._write=function(d,g,y){r.write(d,g)?y():o=y;},c._final=function(d){r.end(),s=d;},r.on(\"drain\",function(){if(o){let d=o;o=null,d();}}),r.on(\"finish\",function(){if(s){let d=s;s=null,d();}})),i&&(gh(e,d=>{i=!1,d&&Wr(e,d),h(d);}),e.on(\"readable\",function(){if(a){let d=a;a=null,d();}}),e.on(\"end\",function(){c.push(null);}),c._read=function(){for(;;){let d=e.read();if(d===null){a=c._read;return}if(!c.push(d))return}}),c._destroy=function(d,g){!d&&u!==null&&(d=new vh),a=null,o=null,s=null,u===null?g(d):(u=g,Wr(r,d),Wr(e,d));},c}});var nt=M((RR,Th)=>{v();m();_();var{ObjectDefineProperties:t0,ObjectGetOwnPropertyDescriptor:At,ObjectKeys:r0,ObjectSetPrototypeOf:Ah}=ce();Th.exports=Ve;var po=di(),Ne=uo();Ah(Ve.prototype,po.prototype);Ah(Ve,po);{let t=r0(Ne.prototype);for(let e=0;e{v();m();_();var{ObjectSetPrototypeOf:Rh,Symbol:i0}=ce();Ch.exports=It;var{ERR_METHOD_NOT_IMPLEMENTED:n0}=Se().codes,yo=nt(),{getHighWaterMark:s0}=sn();Rh(It.prototype,yo.prototype);Rh(It,yo);var bi=i0(\"kCallback\");function It(t){if(!(this instanceof It))return new It(t);let e=t?s0(this,t,\"readableHighWaterMark\",!0):null;e===0&&(t={...t,highWaterMark:null,readableHighWaterMark:e,writableHighWaterMark:t.writableHighWaterMark||0}),yo.call(this,t),this._readableState.sync=!1,this[bi]=null,t&&(typeof t.transform==\"function\"&&(this._transform=t.transform),typeof t.flush==\"function\"&&(this._flush=t.flush)),this.on(\"prefinish\",o0);}function go(t){typeof this._flush==\"function\"&&!this.destroyed?this._flush((e,r)=>{if(e){t?t(e):this.destroy(e);return}r!=null&&this.push(r),this.push(null),t&&t();}):(this.push(null),t&&t());}function o0(){this._final!==go&&go.call(this);}It.prototype._final=go;It.prototype._transform=function(t,e,r){throw new n0(\"_transform()\")};It.prototype._write=function(t,e,r){let i=this._readableState,n=this._writableState,o=i.length;this._transform(t,e,(s,a)=>{if(s){r(s);return}a!=null&&this.push(a),n.ended||o===i.length||i.length{v();m();_();var{ObjectSetPrototypeOf:Bh}=ce();Ph.exports=$r;var wo=bo();Bh($r.prototype,wo.prototype);Bh($r,wo);function $r(t){if(!(this instanceof $r))return new $r(t);wo.call(this,t);}$r.prototype._transform=function(t,e,r){r(null,t);};});var mn=M((iC,Lh)=>{v();m();_();var wi=Ut(),{ArrayIsArray:a0,Promise:l0,SymbolAsyncIterator:u0}=ce(),_n=mt(),{once:f0}=Je(),c0=tr(),Oh=nt(),{aggregateTwoErrors:h0,codes:{ERR_INVALID_ARG_TYPE:Ro,ERR_INVALID_RETURN_VALUE:mo,ERR_MISSING_ARGS:d0,ERR_STREAM_DESTROYED:p0,ERR_STREAM_PREMATURE_CLOSE:g0},AbortError:y0}=Se(),{validateFunction:b0,validateAbortSignal:w0}=fi(),{isIterable:cr,isReadable:vo,isReadableNodeStream:wn,isNodeStream:kh,isTransformStream:Hr,isWebStream:_0,isReadableStream:Eo,isReadableEnded:m0}=tt(),v0=globalThis.AbortController||Hi().AbortController,So,Ao;function xh(t,e,r){let i=!1;t.on(\"close\",()=>{i=!0;});let n=_n(t,{readable:e,writable:r},o=>{i=!o;});return {destroy:o=>{i||(i=!0,c0.destroyer(t,o||new p0(\"pipe\")));},cleanup:n}}function E0(t){return b0(t[t.length-1],\"streams[stream.length - 1]\"),t.pop()}function Io(t){if(cr(t))return t;if(wn(t))return S0(t);throw new Ro(\"val\",[\"Readable\",\"Iterable\",\"AsyncIterable\"],t)}async function*S0(t){Ao||(Ao=di()),yield*Ao.prototype[u0].call(t);}async function bn(t,e,r,{end:i}){let n,o=null,s=c=>{if(c&&(n=c),o){let h=o;o=null,h();}},a=()=>new l0((c,h)=>{n?h(n):o=()=>{n?h(n):c();};});e.on(\"drain\",s);let u=_n(e,{readable:!1},s);try{e.writableNeedDrain&&await a();for await(let c of t)e.write(c)||await a();i&&e.end(),await a(),r();}catch(c){r(n!==c?h0(n,c):c);}finally{u(),e.off(\"drain\",s);}}async function To(t,e,r,{end:i}){Hr(e)&&(e=e.writable);let n=e.getWriter();try{for await(let o of t)await n.ready,n.write(o).catch(()=>{});await n.ready,i&&await n.close(),r();}catch(o){try{await n.abort(o),r(o);}catch(s){r(s);}}}function A0(...t){return Mh(t,f0(E0(t)))}function Mh(t,e,r){if(t.length===1&&a0(t[0])&&(t=t[0]),t.length<2)throw new d0(\"streams\");let i=new v0,n=i.signal,o=r?.signal,s=[];w0(o,\"options.signal\");function a(){y(new y0);}o?.addEventListener(\"abort\",a);let u,c,h=[],d=0;function g(C){y(C,--d===0);}function y(C,R){if(C&&(!u||u.code===\"ERR_STREAM_PREMATURE_CLOSE\")&&(u=C),!(!u&&!R)){for(;h.length;)h.shift()(u);o?.removeEventListener(\"abort\",a),i.abort(),R&&(u||s.forEach(U=>U()),wi.nextTick(e,u,c));}}let w;for(let C=0;C0,W=U||r?.end!==!1,K=C===t.length-1;if(kh(R)){let z=function(Q){Q&&Q.name!==\"AbortError\"&&Q.code!==\"ERR_STREAM_PREMATURE_CLOSE\"&&g(Q);};if(W){let{destroy:Q,cleanup:de}=xh(R,U,N);h.push(Q),vo(R)&&K&&s.push(de);}R.on(\"error\",z),vo(R)&&K&&s.push(()=>{R.removeListener(\"error\",z);});}if(C===0)if(typeof R==\"function\"){if(w=R({signal:n}),!cr(w))throw new mo(\"Iterable, AsyncIterable or Stream\",\"source\",w)}else cr(R)||wn(R)||Hr(R)?w=R:w=Oh.from(R);else if(typeof R==\"function\"){if(Hr(w)){var E;w=Io((E=w)===null||E===void 0?void 0:E.readable);}else w=Io(w);if(w=R(w,{signal:n}),U){if(!cr(w,!0))throw new mo(\"AsyncIterable\",`transform[${C-1}]`,w)}else {var S;So||(So=_o());let z=new So({objectMode:!0}),Q=(S=w)===null||S===void 0?void 0:S.then;if(typeof Q==\"function\")d++,Q.call(w,pe=>{c=pe,pe!=null&&z.write(pe),W&&z.end(),wi.nextTick(g);},pe=>{z.destroy(pe),wi.nextTick(g,pe);});else if(cr(w,!0))d++,bn(w,z,g,{end:W});else if(Eo(w)||Hr(w)){let pe=w.readable||w;d++,bn(pe,z,g,{end:W});}else throw new mo(\"AsyncIterable or Promise\",\"destination\",w);w=z;let{destroy:de,cleanup:Gt}=xh(w,!1,!0);h.push(de),K&&s.push(Gt);}}else if(kh(R)){if(wn(w)){d+=2;let z=I0(w,R,g,{end:W});vo(R)&&K&&s.push(z);}else if(Hr(w)||Eo(w)){let z=w.readable||w;d++,bn(z,R,g,{end:W});}else if(cr(w))d++,bn(w,R,g,{end:W});else throw new Ro(\"val\",[\"Readable\",\"Iterable\",\"AsyncIterable\",\"ReadableStream\",\"TransformStream\"],w);w=R;}else if(_0(R)){if(wn(w))d++,To(Io(w),R,g,{end:W});else if(Eo(w)||cr(w))d++,To(w,R,g,{end:W});else if(Hr(w))d++,To(w.readable,R,g,{end:W});else throw new Ro(\"val\",[\"Readable\",\"Iterable\",\"AsyncIterable\",\"ReadableStream\",\"TransformStream\"],w);w=R;}else w=Oh.from(R);}return (n!=null&&n.aborted||o!=null&&o.aborted)&&wi.nextTick(a),w}function I0(t,e,r,{end:i}){let n=!1;if(e.on(\"close\",()=>{n||r(new g0);}),t.pipe(e,{end:!1}),i){let s=function(){n=!0,e.end();};m0(t)?wi.nextTick(s):t.once(\"end\",s);}else r();return _n(t,{readable:!0,writable:!1},s=>{let a=t._readableState;s&&s.code===\"ERR_STREAM_PREMATURE_CLOSE\"&&a&&a.ended&&!a.errored&&!a.errorEmitted?t.once(\"end\",r).once(\"error\",r):r(s);}),_n(e,{readable:!1,writable:!0},r)}Lh.exports={pipelineImpl:Mh,pipeline:A0};});var Bo=M((dC,Fh)=>{v();m();_();var{pipeline:T0}=mn(),vn=nt(),{destroyer:R0}=tr(),{isNodeStream:En,isReadable:Uh,isWritable:Nh,isWebStream:Co,isTransformStream:hr,isWritableStream:qh,isReadableStream:Dh}=tt(),{AbortError:C0,codes:{ERR_INVALID_ARG_VALUE:jh,ERR_MISSING_ARGS:B0}}=Se(),P0=mt();Fh.exports=function(...e){if(e.length===0)throw new B0(\"streams\");if(e.length===1)return vn.from(e[0]);let r=[...e];if(typeof e[0]==\"function\"&&(e[0]=vn.from(e[0])),typeof e[e.length-1]==\"function\"){let y=e.length-1;e[y]=vn.from(e[y]);}for(let y=0;y0&&!(Nh(e[y])||qh(e[y])||hr(e[y])))throw new jh(`streams[${y}]`,r[y],\"must be writable\")}let i,n,o,s,a;function u(y){let w=s;s=null,w?w(y):y?a.destroy(y):!g&&!d&&a.destroy();}let c=e[0],h=T0(e,u),d=!!(Nh(c)||qh(c)||hr(c)),g=!!(Uh(h)||Dh(h)||hr(h));if(a=new vn({writableObjectMode:!!(c!=null&&c.writableObjectMode),readableObjectMode:!!(h!=null&&h.writableObjectMode),writable:d,readable:g}),d){if(En(c))a._write=function(w,E,S){c.write(w,E)?S():i=S;},a._final=function(w){c.end(),n=w;},c.on(\"drain\",function(){if(i){let w=i;i=null,w();}});else if(Co(c)){let E=(hr(c)?c.writable:c).getWriter();a._write=async function(S,I,C){try{await E.ready,E.write(S).catch(()=>{}),C();}catch(R){C(R);}},a._final=async function(S){try{await E.ready,E.close().catch(()=>{}),n=S;}catch(I){S(I);}};}let y=hr(h)?h.readable:h;P0(y,()=>{if(n){let w=n;n=null,w();}});}if(g){if(En(h))h.on(\"readable\",function(){if(o){let y=o;o=null,y();}}),h.on(\"end\",function(){a.push(null);}),a._read=function(){for(;;){let y=h.read();if(y===null){o=a._read;return}if(!a.push(y))return}};else if(Co(h)){let w=(hr(h)?h.readable:h).getReader();a._read=async function(){for(;;)try{let{value:E,done:S}=await w.read();if(!a.push(E))return;if(S){a.push(null);return}}catch{return}};}}return a._destroy=function(y,w){!y&&s!==null&&(y=new C0),o=null,i=null,n=null,s===null?w(y):(s=w,En(h)&&R0(h,y));},a};});var Qh=M((SC,ko)=>{v();m();_();var Vh=globalThis.AbortController||Hi().AbortController,{codes:{ERR_INVALID_ARG_VALUE:O0,ERR_INVALID_ARG_TYPE:_i,ERR_MISSING_ARGS:k0,ERR_OUT_OF_RANGE:x0},AbortError:st}=Se(),{validateAbortSignal:dr,validateInteger:M0,validateObject:pr}=fi(),L0=ce().Symbol(\"kWeak\"),{finished:U0}=mt(),N0=Bo(),{addAbortSignalNoValidate:q0}=ci(),{isWritable:D0,isNodeStream:j0}=tt(),{ArrayPrototypePush:F0,MathFloor:W0,Number:$0,NumberIsNaN:H0,Promise:Wh,PromiseReject:$h,PromisePrototypeThen:V0,Symbol:zh}=ce(),Sn=zh(\"kEmpty\"),Hh=zh(\"kEof\");function z0(t,e){if(e!=null&&pr(e,\"options\"),e?.signal!=null&&dr(e.signal,\"options.signal\"),j0(t)&&!D0(t))throw new O0(\"stream\",t,\"must be writable\");let r=N0(this,t);return e!=null&&e.signal&&q0(e.signal,r),r}function An(t,e){if(typeof t!=\"function\")throw new _i(\"fn\",[\"Function\",\"AsyncFunction\"],t);e!=null&&pr(e,\"options\"),e?.signal!=null&&dr(e.signal,\"options.signal\");let r=1;return e?.concurrency!=null&&(r=W0(e.concurrency)),M0(r,\"concurrency\",1),async function*(){var n,o;let s=new Vh,a=this,u=[],c=s.signal,h={signal:c},d=()=>s.abort();e!=null&&(n=e.signal)!==null&&n!==void 0&&n.aborted&&d(),e==null||(o=e.signal)===null||o===void 0||o.addEventListener(\"abort\",d);let g,y,w=!1;function E(){w=!0;}async function S(){try{for await(let R of a){var I;if(w)return;if(c.aborted)throw new st;try{R=t(R,h);}catch(U){R=$h(U);}R!==Sn&&(typeof((I=R)===null||I===void 0?void 0:I.catch)==\"function\"&&R.catch(E),u.push(R),g&&(g(),g=null),!w&&u.length&&u.length>=r&&await new Wh(U=>{y=U;}));}u.push(Hh);}catch(R){let U=$h(R);V0(U,void 0,E),u.push(U);}finally{var C;w=!0,g&&(g(),g=null),e==null||(C=e.signal)===null||C===void 0||C.removeEventListener(\"abort\",d);}}S();try{for(;;){for(;u.length>0;){let I=await u[0];if(I===Hh)return;if(c.aborted)throw new st;I!==Sn&&(yield I),u.shift(),y&&(y(),y=null);}await new Wh(I=>{g=I;});}}finally{s.abort(),w=!0,y&&(y(),y=null);}}.call(this)}function K0(t=void 0){return t!=null&&pr(t,\"options\"),t?.signal!=null&&dr(t.signal,\"options.signal\"),async function*(){let r=0;for await(let n of this){var i;if(t!=null&&(i=t.signal)!==null&&i!==void 0&&i.aborted)throw new st({cause:t.signal.reason});yield [r++,n];}}.call(this)}async function Kh(t,e=void 0){for await(let r of Oo.call(this,t,e))return !0;return !1}async function G0(t,e=void 0){if(typeof t!=\"function\")throw new _i(\"fn\",[\"Function\",\"AsyncFunction\"],t);return !await Kh.call(this,async(...r)=>!await t(...r),e)}async function Q0(t,e){for await(let r of Oo.call(this,t,e))return r}async function Y0(t,e){if(typeof t!=\"function\")throw new _i(\"fn\",[\"Function\",\"AsyncFunction\"],t);async function r(i,n){return await t(i,n),Sn}for await(let i of An.call(this,r,e));}function Oo(t,e){if(typeof t!=\"function\")throw new _i(\"fn\",[\"Function\",\"AsyncFunction\"],t);async function r(i,n){return await t(i,n)?i:Sn}return An.call(this,r,e)}var Po=class extends k0{constructor(){super(\"reduce\"),this.message=\"Reduce of an empty stream requires an initial value\";}};async function J0(t,e,r){var i;if(typeof t!=\"function\")throw new _i(\"reducer\",[\"Function\",\"AsyncFunction\"],t);r!=null&&pr(r,\"options\"),r?.signal!=null&&dr(r.signal,\"options.signal\");let n=arguments.length>1;if(r!=null&&(i=r.signal)!==null&&i!==void 0&&i.aborted){let c=new st(void 0,{cause:r.signal.reason});throw this.once(\"error\",()=>{}),await U0(this.destroy(c)),c}let o=new Vh,s=o.signal;if(r!=null&&r.signal){let c={once:!0,[L0]:this};r.signal.addEventListener(\"abort\",()=>o.abort(),c);}let a=!1;try{for await(let c of this){var u;if(a=!0,r!=null&&(u=r.signal)!==null&&u!==void 0&&u.aborted)throw new st;n?e=await t(e,c,{signal:s}):(e=c,n=!0);}if(!a&&!n)throw new Po}finally{o.abort();}return e}async function X0(t){t!=null&&pr(t,\"options\"),t?.signal!=null&&dr(t.signal,\"options.signal\");let e=[];for await(let i of this){var r;if(t!=null&&(r=t.signal)!==null&&r!==void 0&&r.aborted)throw new st(void 0,{cause:t.signal.reason});F0(e,i);}return e}function Z0(t,e){let r=An.call(this,t,e);return async function*(){for await(let n of r)yield*n;}.call(this)}function Gh(t){if(t=$0(t),H0(t))return 0;if(t<0)throw new x0(\"number\",\">= 0\",t);return t}function em(t,e=void 0){return e!=null&&pr(e,\"options\"),e?.signal!=null&&dr(e.signal,\"options.signal\"),t=Gh(t),async function*(){var i;if(e!=null&&(i=e.signal)!==null&&i!==void 0&&i.aborted)throw new st;for await(let o of this){var n;if(e!=null&&(n=e.signal)!==null&&n!==void 0&&n.aborted)throw new st;t--<=0&&(yield o);}}.call(this)}function tm(t,e=void 0){return e!=null&&pr(e,\"options\"),e?.signal!=null&&dr(e.signal,\"options.signal\"),t=Gh(t),async function*(){var i;if(e!=null&&(i=e.signal)!==null&&i!==void 0&&i.aborted)throw new st;for await(let o of this){var n;if(e!=null&&(n=e.signal)!==null&&n!==void 0&&n.aborted)throw new st;if(t-- >0)yield o;else return}}.call(this)}ko.exports.streamReturningOperators={asIndexedPairs:K0,drop:em,filter:Oo,flatMap:Z0,map:An,take:tm,compose:z0};ko.exports.promiseReturningOperators={every:G0,forEach:Y0,reduce:J0,toArray:X0,some:Kh,find:Q0};});var xo=M((xC,Yh)=>{v();m();_();var{ArrayPrototypePop:rm,Promise:im}=ce(),{isIterable:nm,isNodeStream:sm,isWebStream:om}=tt(),{pipelineImpl:am}=mn(),{finished:lm}=mt();Mo();function um(...t){return new im((e,r)=>{let i,n,o=t[t.length-1];if(o&&typeof o==\"object\"&&!sm(o)&&!nm(o)&&!om(o)){let s=rm(t);i=s.signal,n=s.end;}am(t,(s,a)=>{s?r(s):e(a);},{signal:i,end:n});})}Yh.exports={finished:lm,pipeline:um};});var Mo=M(($C,sd)=>{v();m();_();var{Buffer:fm}=(ye(),X(_e)),{ObjectDefineProperty:Tt,ObjectKeys:Zh,ReflectApply:ed}=ce(),{promisify:{custom:td}}=Je(),{streamReturningOperators:Jh,promiseReturningOperators:Xh}=Qh(),{codes:{ERR_ILLEGAL_CONSTRUCTOR:rd}}=Se(),cm=Bo(),{pipeline:id}=mn(),{destroyer:hm}=tr(),nd=mt(),Lo=xo(),Uo=tt(),le=sd.exports=tn().Stream;le.isDisturbed=Uo.isDisturbed;le.isErrored=Uo.isErrored;le.isReadable=Uo.isReadable;le.Readable=di();for(let t of Zh(Jh)){let r=function(...i){if(new.target)throw rd();return le.Readable.from(ed(e,this,i))};let e=Jh[t];Tt(r,\"name\",{__proto__:null,value:e.name}),Tt(r,\"length\",{__proto__:null,value:e.length}),Tt(le.Readable.prototype,t,{__proto__:null,value:r,enumerable:!1,configurable:!0,writable:!0});}for(let t of Zh(Xh)){let r=function(...n){if(new.target)throw rd();return ed(e,this,n)};let e=Xh[t];Tt(r,\"name\",{__proto__:null,value:e.name}),Tt(r,\"length\",{__proto__:null,value:e.length}),Tt(le.Readable.prototype,t,{__proto__:null,value:r,enumerable:!1,configurable:!0,writable:!0});}le.Writable=uo();le.Duplex=nt();le.Transform=bo();le.PassThrough=_o();le.pipeline=id;var{addAbortSignal:dm}=ci();le.addAbortSignal=dm;le.finished=nd;le.destroy=hm;le.compose=cm;Tt(le,\"promises\",{__proto__:null,configurable:!0,enumerable:!0,get(){return Lo}});Tt(id,td,{__proto__:null,enumerable:!0,get(){return Lo.pipeline}});Tt(nd,td,{__proto__:null,enumerable:!0,get(){return Lo.finished}});le.Stream=le;le._isUint8Array=function(e){return e instanceof Uint8Array};le._uint8ArrayToBuffer=function(e){return fm.from(e.buffer,e.byteOffset,e.byteLength)};});var Dt=M((ZC,ue)=>{v();m();_();var he=Mo(),pm=xo(),gm=he.Readable.destroy;ue.exports=he.Readable;ue.exports._uint8ArrayToBuffer=he._uint8ArrayToBuffer;ue.exports._isUint8Array=he._isUint8Array;ue.exports.isDisturbed=he.isDisturbed;ue.exports.isErrored=he.isErrored;ue.exports.isReadable=he.isReadable;ue.exports.Readable=he.Readable;ue.exports.Writable=he.Writable;ue.exports.Duplex=he.Duplex;ue.exports.Transform=he.Transform;ue.exports.PassThrough=he.PassThrough;ue.exports.addAbortSignal=he.addAbortSignal;ue.exports.finished=he.finished;ue.exports.destroy=he.destroy;ue.exports.destroy=gm;ue.exports.pipeline=he.pipeline;ue.exports.compose=he.compose;Object.defineProperty(he,\"promises\",{configurable:!0,enumerable:!0,get(){return pm}});ue.exports.Stream=he.Stream;ue.exports.default=ue.exports;});var od=M((uB,qo)=>{v();m();_();typeof Object.create==\"function\"?qo.exports=function(e,r){r&&(e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}));}:qo.exports=function(e,r){if(r){e.super_=r;var i=function(){};i.prototype=r.prototype,e.prototype=new i,e.prototype.constructor=e;}};});var ud=M((_B,ld)=>{v();m();_();var{Buffer:ze}=(ye(),X(_e)),ad=Symbol.for(\"BufferList\");function ee(t){if(!(this instanceof ee))return new ee(t);ee._init.call(this,t);}ee._init=function(e){Object.defineProperty(this,ad,{value:!0}),this._bufs=[],this.length=0,e&&this.append(e);};ee.prototype._new=function(e){return new ee(e)};ee.prototype._offset=function(e){if(e===0)return [0,0];let r=0;for(let i=0;ithis.length||e<0)return;let r=this._offset(e);return this._bufs[r[0]][r[1]]};ee.prototype.slice=function(e,r){return typeof e==\"number\"&&e<0&&(e+=this.length),typeof r==\"number\"&&r<0&&(r+=this.length),this.copy(null,0,e,r)};ee.prototype.copy=function(e,r,i,n){if((typeof i!=\"number\"||i<0)&&(i=0),(typeof n!=\"number\"||n>this.length)&&(n=this.length),i>=this.length||n<=0)return e||ze.alloc(0);let o=!!e,s=this._offset(i),a=n-i,u=a,c=o&&r||0,h=s[1];if(i===0&&n===this.length){if(!o)return this._bufs.length===1?this._bufs[0]:ze.concat(this._bufs,this.length);for(let d=0;dg)this._bufs[d].copy(e,c,h),c+=g;else {this._bufs[d].copy(e,c,h,h+u),c+=g;break}u-=g,h&&(h=0);}return e.length>c?e.slice(0,c):e};ee.prototype.shallowSlice=function(e,r){if(e=e||0,r=typeof r!=\"number\"?this.length:r,e<0&&(e+=this.length),r<0&&(r+=this.length),e===r)return this._new();let i=this._offset(e),n=this._offset(r),o=this._bufs.slice(i[0],n[0]+1);return n[1]===0?o.pop():o[o.length-1]=o[o.length-1].slice(0,n[1]),i[1]!==0&&(o[0]=o[0].slice(i[1])),this._new(o)};ee.prototype.toString=function(e,r,i){return this.slice(r,i).toString(e)};ee.prototype.consume=function(e){if(e=Math.trunc(e),Number.isNaN(e)||e<=0)return this;for(;this._bufs.length;)if(e>=this._bufs[0].length)e-=this._bufs[0].length,this.length-=this._bufs[0].length,this._bufs.shift();else {this._bufs[0]=this._bufs[0].slice(e),this.length-=e;break}return this};ee.prototype.duplicate=function(){let e=this._new();for(let r=0;rthis.length?this.length:e;let i=this._offset(e),n=i[0],o=i[1];for(;n=t.length){let u=s.indexOf(t,o);if(u!==-1)return this._reverseOffset([n,u]);o=s.length-t.length+1;}else {let u=this._reverseOffset([n,o]);if(this._match(u,t))return u;o++;}o=0;}return -1};ee.prototype._match=function(t,e){if(this.length-t{v();m();_();var Do=Dt().Duplex,ym=od(),mi=ud();function Ee(t){if(!(this instanceof Ee))return new Ee(t);if(typeof t==\"function\"){this._callback=t;let e=function(i){this._callback&&(this._callback(i),this._callback=null);}.bind(this);this.on(\"pipe\",function(i){i.on(\"error\",e);}),this.on(\"unpipe\",function(i){i.removeListener(\"error\",e);}),t=null;}mi._init.call(this,t),Do.call(this);}ym(Ee,Do);Object.assign(Ee.prototype,mi.prototype);Ee.prototype._new=function(e){return new Ee(e)};Ee.prototype._write=function(e,r,i){this._appendBuffer(e),typeof i==\"function\"&&i();};Ee.prototype._read=function(e){if(!this.length)return this.push(null);e=Math.min(e,this.length),this.push(this.slice(0,e)),this.consume(e);};Ee.prototype.end=function(e){Do.prototype.end.call(this,e),this._callback&&(this._callback(null,this.slice()),this._callback=null);};Ee.prototype._destroy=function(e,r){this._bufs.length=0,this.length=0,r(e);};Ee.prototype._isBufferList=function(e){return e instanceof Ee||e instanceof mi||Ee.isBufferList(e)};Ee.isBufferList=mi.isBufferList;In.exports=Ee;In.exports.BufferListStream=Ee;In.exports.BufferList=mi;});var hd=M((DB,cd)=>{v();m();_();var jo=class{constructor(){this.cmd=null,this.retain=!1,this.qos=0,this.dup=!1,this.length=-1,this.topic=null,this.payload=null;}};cd.exports=jo;});var Fo=M((QB,dd)=>{v();m();_();var L=dd.exports,{Buffer:Oe}=(ye(),X(_e));L.types={0:\"reserved\",1:\"connect\",2:\"connack\",3:\"publish\",4:\"puback\",5:\"pubrec\",6:\"pubrel\",7:\"pubcomp\",8:\"subscribe\",9:\"suback\",10:\"unsubscribe\",11:\"unsuback\",12:\"pingreq\",13:\"pingresp\",14:\"disconnect\",15:\"auth\"};L.requiredHeaderFlags={1:0,2:0,4:0,5:0,6:2,7:0,8:2,9:0,10:2,11:0,12:0,13:0,14:0,15:0};L.requiredHeaderFlagsErrors={};for(let t in L.requiredHeaderFlags){let e=L.requiredHeaderFlags[t];L.requiredHeaderFlagsErrors[t]=\"Invalid header flag bits, must be 0x\"+e.toString(16)+\" for \"+L.types[t]+\" packet\";}L.codes={};for(let t in L.types){let e=L.types[t];L.codes[e]=t;}L.CMD_SHIFT=4;L.CMD_MASK=240;L.DUP_MASK=8;L.QOS_MASK=3;L.QOS_SHIFT=1;L.RETAIN_MASK=1;L.VARBYTEINT_MASK=127;L.VARBYTEINT_FIN_MASK=128;L.VARBYTEINT_MAX=268435455;L.SESSIONPRESENT_MASK=1;L.SESSIONPRESENT_HEADER=Oe.from([L.SESSIONPRESENT_MASK]);L.CONNACK_HEADER=Oe.from([L.codes.connack<[0,1].map(r=>[0,1].map(i=>{let n=Oe.alloc(1);return n.writeUInt8(L.codes[t]<Oe.from([t]));L.EMPTY={pingreq:Oe.from([L.codes.pingreq<<4,0]),pingresp:Oe.from([L.codes.pingresp<<4,0]),disconnect:Oe.from([L.codes.disconnect<<4,0])};L.MQTT5_PUBACK_PUBREC_CODES={0:\"Success\",16:\"No matching subscribers\",128:\"Unspecified error\",131:\"Implementation specific error\",135:\"Not authorized\",144:\"Topic Name invalid\",145:\"Packet identifier in use\",151:\"Quota exceeded\",153:\"Payload format invalid\"};L.MQTT5_PUBREL_PUBCOMP_CODES={0:\"Success\",146:\"Packet Identifier not found\"};L.MQTT5_SUBACK_CODES={0:\"Granted QoS 0\",1:\"Granted QoS 1\",2:\"Granted QoS 2\",128:\"Unspecified error\",131:\"Implementation specific error\",135:\"Not authorized\",143:\"Topic Filter invalid\",145:\"Packet Identifier in use\",151:\"Quota exceeded\",158:\"Shared Subscriptions not supported\",161:\"Subscription Identifiers not supported\",162:\"Wildcard Subscriptions not supported\"};L.MQTT5_UNSUBACK_CODES={0:\"Success\",17:\"No subscription existed\",128:\"Unspecified error\",131:\"Implementation specific error\",135:\"Not authorized\",143:\"Topic Filter invalid\",145:\"Packet Identifier in use\"};L.MQTT5_DISCONNECT_CODES={0:\"Normal disconnection\",4:\"Disconnect with Will Message\",128:\"Unspecified error\",129:\"Malformed Packet\",130:\"Protocol Error\",131:\"Implementation specific error\",135:\"Not authorized\",137:\"Server busy\",139:\"Server shutting down\",141:\"Keep Alive timeout\",142:\"Session taken over\",143:\"Topic Filter invalid\",144:\"Topic Name invalid\",147:\"Receive Maximum exceeded\",148:\"Topic Alias invalid\",149:\"Packet too large\",150:\"Message rate too high\",151:\"Quota exceeded\",152:\"Administrative action\",153:\"Payload format invalid\",154:\"Retain not supported\",155:\"QoS not supported\",156:\"Use another server\",157:\"Server moved\",158:\"Shared Subscriptions not supported\",159:\"Connection rate exceeded\",160:\"Maximum connect time\",161:\"Subscription Identifiers not supported\",162:\"Wildcard Subscriptions not supported\"};L.MQTT5_AUTH_CODES={0:\"Success\",24:\"Continue authentication\",25:\"Re-authenticate\"};});var gd=M((sP,pd)=>{v();m();_();var Vr=1e3,zr=Vr*60,Kr=zr*60,gr=Kr*24,bm=gr*7,wm=gr*365.25;pd.exports=function(t,e){e=e||{};var r=typeof t;if(r===\"string\"&&t.length>0)return _m(t);if(r===\"number\"&&isFinite(t))return e.long?vm(t):mm(t);throw new Error(\"val is not a non-empty string or a valid number. val=\"+JSON.stringify(t))};function _m(t){if(t=String(t),!(t.length>100)){var e=/^(-?(?:\\d+)?\\.?\\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(e){var r=parseFloat(e[1]),i=(e[2]||\"ms\").toLowerCase();switch(i){case\"years\":case\"year\":case\"yrs\":case\"yr\":case\"y\":return r*wm;case\"weeks\":case\"week\":case\"w\":return r*bm;case\"days\":case\"day\":case\"d\":return r*gr;case\"hours\":case\"hour\":case\"hrs\":case\"hr\":case\"h\":return r*Kr;case\"minutes\":case\"minute\":case\"mins\":case\"min\":case\"m\":return r*zr;case\"seconds\":case\"second\":case\"secs\":case\"sec\":case\"s\":return r*Vr;case\"milliseconds\":case\"millisecond\":case\"msecs\":case\"msec\":case\"ms\":return r;default:return}}}}function mm(t){var e=Math.abs(t);return e>=gr?Math.round(t/gr)+\"d\":e>=Kr?Math.round(t/Kr)+\"h\":e>=zr?Math.round(t/zr)+\"m\":e>=Vr?Math.round(t/Vr)+\"s\":t+\"ms\"}function vm(t){var e=Math.abs(t);return e>=gr?Tn(t,e,gr,\"day\"):e>=Kr?Tn(t,e,Kr,\"hour\"):e>=zr?Tn(t,e,zr,\"minute\"):e>=Vr?Tn(t,e,Vr,\"second\"):t+\" ms\"}function Tn(t,e,r,i){var n=e>=r*1.5;return Math.round(t/r)+\" \"+i+(n?\"s\":\"\")}});var bd=M((gP,yd)=>{v();m();_();function Em(t){r.debug=r,r.default=r,r.coerce=u,r.disable=o,r.enable=n,r.enabled=s,r.humanize=gd(),r.destroy=c,Object.keys(t).forEach(h=>{r[h]=t[h];}),r.names=[],r.skips=[],r.formatters={};function e(h){let d=0;for(let g=0;g{if(W===\"%%\")return \"%\";U++;let z=r.formatters[K];if(typeof z==\"function\"){let Q=S[U];W=z.call(I,Q),S.splice(U,1),U--;}return W}),r.formatArgs.call(I,S),(I.log||r.log).apply(I,S);}return E.namespace=h,E.useColors=r.useColors(),E.color=r.selectColor(h),E.extend=i,E.destroy=r.destroy,Object.defineProperty(E,\"enabled\",{enumerable:!0,configurable:!1,get:()=>g!==null?g:(y!==r.namespaces&&(y=r.namespaces,w=r.enabled(h)),w),set:S=>{g=S;}}),typeof r.init==\"function\"&&r.init(E),E}function i(h,d){let g=r(this.namespace+(typeof d>\"u\"?\":\":d)+h);return g.log=this.log,g}function n(h){r.save(h),r.namespaces=h,r.names=[],r.skips=[];let d,g=(typeof h==\"string\"?h:\"\").split(/[\\s,]+/),y=g.length;for(d=0;d\"-\"+d)].join(\",\");return r.enable(\"\"),h}function s(h){if(h[h.length-1]===\"*\")return !0;let d,g;for(d=0,g=r.skips.length;d{v();m();_();xe.formatArgs=Am;xe.save=Im;xe.load=Tm;xe.useColors=Sm;xe.storage=Rm();xe.destroy=(()=>{let t=!1;return ()=>{t||(t=!0,console.warn(\"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.\"));}})();xe.colors=[\"#0000CC\",\"#0000FF\",\"#0033CC\",\"#0033FF\",\"#0066CC\",\"#0066FF\",\"#0099CC\",\"#0099FF\",\"#00CC00\",\"#00CC33\",\"#00CC66\",\"#00CC99\",\"#00CCCC\",\"#00CCFF\",\"#3300CC\",\"#3300FF\",\"#3333CC\",\"#3333FF\",\"#3366CC\",\"#3366FF\",\"#3399CC\",\"#3399FF\",\"#33CC00\",\"#33CC33\",\"#33CC66\",\"#33CC99\",\"#33CCCC\",\"#33CCFF\",\"#6600CC\",\"#6600FF\",\"#6633CC\",\"#6633FF\",\"#66CC00\",\"#66CC33\",\"#9900CC\",\"#9900FF\",\"#9933CC\",\"#9933FF\",\"#99CC00\",\"#99CC33\",\"#CC0000\",\"#CC0033\",\"#CC0066\",\"#CC0099\",\"#CC00CC\",\"#CC00FF\",\"#CC3300\",\"#CC3333\",\"#CC3366\",\"#CC3399\",\"#CC33CC\",\"#CC33FF\",\"#CC6600\",\"#CC6633\",\"#CC9900\",\"#CC9933\",\"#CCCC00\",\"#CCCC33\",\"#FF0000\",\"#FF0033\",\"#FF0066\",\"#FF0099\",\"#FF00CC\",\"#FF00FF\",\"#FF3300\",\"#FF3333\",\"#FF3366\",\"#FF3399\",\"#FF33CC\",\"#FF33FF\",\"#FF6600\",\"#FF6633\",\"#FF9900\",\"#FF9933\",\"#FFCC00\",\"#FFCC33\"];function Sm(){return typeof window<\"u\"&&window.process&&(window.process.type===\"renderer\"||window.process.__nwjs)?!0:typeof B<\"u\"&&B.userAgent&&B.userAgent.toLowerCase().match(/(edge|trident)\\/(\\d+)/)?!1:typeof document<\"u\"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<\"u\"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof B<\"u\"&&B.userAgent&&B.userAgent.toLowerCase().match(/firefox\\/(\\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof B<\"u\"&&B.userAgent&&B.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/)}function Am(t){if(t[0]=(this.useColors?\"%c\":\"\")+this.namespace+(this.useColors?\" %c\":\" \")+t[0]+(this.useColors?\"%c \":\" \")+\"+\"+Rn.exports.humanize(this.diff),!this.useColors)return;let e=\"color: \"+this.color;t.splice(1,0,e,\"color: inherit\");let r=0,i=0;t[0].replace(/%[a-zA-Z%]/g,n=>{n!==\"%%\"&&(r++,n===\"%c\"&&(i=r));}),t.splice(i,0,e);}xe.log=console.debug||console.log||(()=>{});function Im(t){try{t?xe.storage.setItem(\"debug\",t):xe.storage.removeItem(\"debug\");}catch{}}function Tm(){let t;try{t=xe.storage.getItem(\"debug\");}catch{}return !t&&typeof P<\"u\"&&\"env\"in P&&(t=P.env.DEBUG),t}function Rm(){try{return localStorage}catch{}}Rn.exports=bd()(xe);var{formatters:Cm}=Rn.exports;Cm.j=function(t){try{return JSON.stringify(t)}catch(e){return \"[UnexpectedJSONParseError]: \"+e.message}};});var md=M((MP,_d)=>{v();m();_();var Bm=fd(),{EventEmitter:Pm}=(ir(),X(rr)),wd=hd(),V=Fo(),D=ot()(\"mqtt-packet:parser\"),Wo=class t extends Pm{constructor(){super(),this.parser=this.constructor.parser;}static parser(e){return this instanceof t?(this.settings=e||{},this._states=[\"_parseHeader\",\"_parseLength\",\"_parsePayload\",\"_newPacket\"],this._resetState(),this):new t().parser(e)}_resetState(){D(\"_resetState: resetting packet, error, _list, and _stateCounter\"),this.packet=new wd,this.error=null,this._list=Bm(),this._stateCounter=0;}parse(e){for(this.error&&this._resetState(),this._list.append(e),D(\"parse: current state: %s\",this._states[this._stateCounter]);(this.packet.length!==-1||this._list.length>0)&&this[this._states[this._stateCounter]]()&&!this.error;)this._stateCounter++,D(\"parse: state complete. _stateCounter is now: %d\",this._stateCounter),D(\"parse: packet.length: %d, buffer list length: %d\",this.packet.length,this._list.length),this._stateCounter>=this._states.length&&(this._stateCounter=0);return D(\"parse: exited while loop. packet: %d, buffer list length: %d\",this.packet.length,this._list.length),this._list.length}_parseHeader(){let e=this._list.readUInt8(0),r=e>>V.CMD_SHIFT;this.packet.cmd=V.types[r];let i=e&15,n=V.requiredHeaderFlags[r];return n!=null&&i!==n?this._emitError(new Error(V.requiredHeaderFlagsErrors[r])):(this.packet.retain=(e&V.RETAIN_MASK)!==0,this.packet.qos=e>>V.QOS_SHIFT&V.QOS_MASK,this.packet.qos>2?this._emitError(new Error(\"Packet must not have both QoS bits set to 1\")):(this.packet.dup=(e&V.DUP_MASK)!==0,D(\"_parseHeader: packet: %o\",this.packet),this._list.consume(1),!0))}_parseLength(){let e=this._parseVarByteNum(!0);return e&&(this.packet.length=e.value,this._list.consume(e.bytes)),D(\"_parseLength %d\",e.value),!!e}_parsePayload(){D(\"_parsePayload: payload %O\",this._list);let e=!1;if(this.packet.length===0||this._list.length>=this.packet.length){switch(this._pos=0,this.packet.cmd){case\"connect\":this._parseConnect();break;case\"connack\":this._parseConnack();break;case\"publish\":this._parsePublish();break;case\"puback\":case\"pubrec\":case\"pubrel\":case\"pubcomp\":this._parseConfirmation();break;case\"subscribe\":this._parseSubscribe();break;case\"suback\":this._parseSuback();break;case\"unsubscribe\":this._parseUnsubscribe();break;case\"unsuback\":this._parseUnsuback();break;case\"pingreq\":case\"pingresp\":break;case\"disconnect\":this._parseDisconnect();break;case\"auth\":this._parseAuth();break;default:this._emitError(new Error(\"Not supported\"));}e=!0;}return D(\"_parsePayload complete result: %s\",e),e}_parseConnect(){D(\"_parseConnect\");let e,r,i,n,o={},s=this.packet,a=this._parseString();if(a===null)return this._emitError(new Error(\"Cannot parse protocolId\"));if(a!==\"MQTT\"&&a!==\"MQIsdp\")return this._emitError(new Error(\"Invalid protocolId\"));if(s.protocolId=a,this._pos>=this._list.length)return this._emitError(new Error(\"Packet too short\"));if(s.protocolVersion=this._list.readUInt8(this._pos),s.protocolVersion>=128&&(s.bridgeMode=!0,s.protocolVersion=s.protocolVersion-128),s.protocolVersion!==3&&s.protocolVersion!==4&&s.protocolVersion!==5)return this._emitError(new Error(\"Invalid protocol version\"));if(this._pos++,this._pos>=this._list.length)return this._emitError(new Error(\"Packet too short\"));if(this._list.readUInt8(this._pos)&1)return this._emitError(new Error(\"Connect flag bit 0 must be 0, but got 1\"));o.username=this._list.readUInt8(this._pos)&V.USERNAME_MASK,o.password=this._list.readUInt8(this._pos)&V.PASSWORD_MASK,o.will=this._list.readUInt8(this._pos)&V.WILL_FLAG_MASK;let u=!!(this._list.readUInt8(this._pos)&V.WILL_RETAIN_MASK),c=(this._list.readUInt8(this._pos)&V.WILL_QOS_MASK)>>V.WILL_QOS_SHIFT;if(o.will)s.will={},s.will.retain=u,s.will.qos=c;else {if(u)return this._emitError(new Error(\"Will Retain Flag must be set to zero when Will Flag is set to 0\"));if(c)return this._emitError(new Error(\"Will QoS must be set to zero when Will Flag is set to 0\"))}if(s.clean=(this._list.readUInt8(this._pos)&V.CLEAN_SESSION_MASK)!==0,this._pos++,s.keepalive=this._parseNum(),s.keepalive===-1)return this._emitError(new Error(\"Packet too short\"));if(s.protocolVersion===5){let d=this._parseProperties();Object.getOwnPropertyNames(d).length&&(s.properties=d);}let h=this._parseString();if(h===null)return this._emitError(new Error(\"Packet too short\"));if(s.clientId=h,D(\"_parseConnect: packet.clientId: %s\",s.clientId),o.will){if(s.protocolVersion===5){let d=this._parseProperties();Object.getOwnPropertyNames(d).length&&(s.will.properties=d);}if(e=this._parseString(),e===null)return this._emitError(new Error(\"Cannot parse will topic\"));if(s.will.topic=e,D(\"_parseConnect: packet.will.topic: %s\",s.will.topic),r=this._parseBuffer(),r===null)return this._emitError(new Error(\"Cannot parse will payload\"));s.will.payload=r,D(\"_parseConnect: packet.will.paylaod: %s\",s.will.payload);}if(o.username){if(n=this._parseString(),n===null)return this._emitError(new Error(\"Cannot parse username\"));s.username=n,D(\"_parseConnect: packet.username: %s\",s.username);}if(o.password){if(i=this._parseBuffer(),i===null)return this._emitError(new Error(\"Cannot parse password\"));s.password=i;}return this.settings=s,D(\"_parseConnect: complete\"),s}_parseConnack(){D(\"_parseConnack\");let e=this.packet;if(this._list.length<1)return null;let r=this._list.readUInt8(this._pos++);if(r>1)return this._emitError(new Error(\"Invalid connack flags, bits 7-1 must be set to 0\"));if(e.sessionPresent=!!(r&V.SESSIONPRESENT_MASK),this.settings.protocolVersion===5)this._list.length>=2?e.reasonCode=this._list.readUInt8(this._pos++):e.reasonCode=0;else {if(this._list.length<2)return null;e.returnCode=this._list.readUInt8(this._pos++);}if(e.returnCode===-1||e.reasonCode===-1)return this._emitError(new Error(\"Cannot parse return code\"));if(this.settings.protocolVersion===5){let i=this._parseProperties();Object.getOwnPropertyNames(i).length&&(e.properties=i);}D(\"_parseConnack: complete\");}_parsePublish(){D(\"_parsePublish\");let e=this.packet;if(e.topic=this._parseString(),e.topic===null)return this._emitError(new Error(\"Cannot parse topic\"));if(!(e.qos>0&&!this._parseMessageId())){if(this.settings.protocolVersion===5){let r=this._parseProperties();Object.getOwnPropertyNames(r).length&&(e.properties=r);}e.payload=this._list.slice(this._pos,e.length),D(\"_parsePublish: payload from buffer list: %o\",e.payload);}}_parseSubscribe(){D(\"_parseSubscribe\");let e=this.packet,r,i,n,o,s,a,u;if(e.subscriptions=[],!!this._parseMessageId()){if(this.settings.protocolVersion===5){let c=this._parseProperties();Object.getOwnPropertyNames(c).length&&(e.properties=c);}if(e.length<=0)return this._emitError(new Error(\"Malformed subscribe, no payload specified\"));for(;this._pos=e.length)return this._emitError(new Error(\"Malformed Subscribe Payload\"));if(i=this._parseByte(),this.settings.protocolVersion===5){if(i&192)return this._emitError(new Error(\"Invalid subscribe topic flag bits, bits 7-6 must be 0\"))}else if(i&252)return this._emitError(new Error(\"Invalid subscribe topic flag bits, bits 7-2 must be 0\"));if(n=i&V.SUBSCRIBE_OPTIONS_QOS_MASK,n>2)return this._emitError(new Error(\"Invalid subscribe QoS, must be <= 2\"));if(a=(i>>V.SUBSCRIBE_OPTIONS_NL_SHIFT&V.SUBSCRIBE_OPTIONS_NL_MASK)!==0,s=(i>>V.SUBSCRIBE_OPTIONS_RAP_SHIFT&V.SUBSCRIBE_OPTIONS_RAP_MASK)!==0,o=i>>V.SUBSCRIBE_OPTIONS_RH_SHIFT&V.SUBSCRIBE_OPTIONS_RH_MASK,o>2)return this._emitError(new Error(\"Invalid retain handling, must be <= 2\"));u={topic:r,qos:n},this.settings.protocolVersion===5?(u.nl=a,u.rap=s,u.rh=o):this.settings.bridgeMode&&(u.rh=0,u.rap=!0,u.nl=!0),D(\"_parseSubscribe: push subscription `%s` to subscription\",u),e.subscriptions.push(u);}}}_parseSuback(){D(\"_parseSuback\");let e=this.packet;if(this.packet.granted=[],!!this._parseMessageId()){if(this.settings.protocolVersion===5){let r=this._parseProperties();Object.getOwnPropertyNames(r).length&&(e.properties=r);}if(e.length<=0)return this._emitError(new Error(\"Malformed suback, no payload specified\"));for(;this._pos2&&r!==128)return this._emitError(new Error(\"Invalid suback QoS, must be 0, 1, 2 or 128\"));this.packet.granted.push(r);}}}_parseUnsubscribe(){D(\"_parseUnsubscribe\");let e=this.packet;if(e.unsubscriptions=[],!!this._parseMessageId()){if(this.settings.protocolVersion===5){let r=this._parseProperties();Object.getOwnPropertyNames(r).length&&(e.properties=r);}if(e.length<=0)return this._emitError(new Error(\"Malformed unsubscribe, no payload specified\"));for(;this._pos2){switch(e.reasonCode=this._parseByte(),this.packet.cmd){case\"puback\":case\"pubrec\":if(!V.MQTT5_PUBACK_PUBREC_CODES[e.reasonCode])return this._emitError(new Error(\"Invalid \"+this.packet.cmd+\" reason code\"));break;case\"pubrel\":case\"pubcomp\":if(!V.MQTT5_PUBREL_PUBCOMP_CODES[e.reasonCode])return this._emitError(new Error(\"Invalid \"+this.packet.cmd+\" reason code\"));break}D(\"_parseConfirmation: packet.reasonCode `%d`\",e.reasonCode);}else e.reasonCode=0;if(e.length>3){let r=this._parseProperties();Object.getOwnPropertyNames(r).length&&(e.properties=r);}}return !0}_parseDisconnect(){let e=this.packet;if(D(\"_parseDisconnect\"),this.settings.protocolVersion===5){this._list.length>0?(e.reasonCode=this._parseByte(),V.MQTT5_DISCONNECT_CODES[e.reasonCode]||this._emitError(new Error(\"Invalid disconnect reason code\"))):e.reasonCode=0;let r=this._parseProperties();Object.getOwnPropertyNames(r).length&&(e.properties=r);}return D(\"_parseDisconnect result: true\"),!0}_parseAuth(){D(\"_parseAuth\");let e=this.packet;if(this.settings.protocolVersion!==5)return this._emitError(new Error(\"Not supported auth packet for this version MQTT\"));if(e.reasonCode=this._parseByte(),!V.MQTT5_AUTH_CODES[e.reasonCode])return this._emitError(new Error(\"Invalid auth reason code\"));let r=this._parseProperties();return Object.getOwnPropertyNames(r).length&&(e.properties=r),D(\"_parseAuth: result: true\"),!0}_parseMessageId(){let e=this.packet;return e.messageId=this._parseNum(),e.messageId===null?(this._emitError(new Error(\"Cannot parse messageId\")),!1):(D(\"_parseMessageId: packet.messageId %d\",e.messageId),!0)}_parseString(e){let r=this._parseNum(),i=r+this._pos;if(r===-1||i>this._list.length||i>this.packet.length)return null;let n=this._list.toString(\"utf8\",this._pos,i);return this._pos+=r,D(\"_parseString: result: %s\",n),n}_parseStringPair(){return D(\"_parseStringPair\"),{name:this._parseString(),value:this._parseString()}}_parseBuffer(){let e=this._parseNum(),r=e+this._pos;if(e===-1||r>this._list.length||r>this.packet.length)return null;let i=this._list.slice(this._pos,r);return this._pos+=e,D(\"_parseBuffer: result: %o\",i),i}_parseNum(){if(this._list.length-this._pos<2)return -1;let e=this._list.readUInt16BE(this._pos);return this._pos+=2,D(\"_parseNum: result: %s\",e),e}_parse4ByteNum(){if(this._list.length-this._pos<4)return -1;let e=this._list.readUInt32BE(this._pos);return this._pos+=4,D(\"_parse4ByteNum: result: %s\",e),e}_parseVarByteNum(e){D(\"_parseVarByteNum\");let r=4,i=0,n=1,o=0,s=!1,a,u=this._pos?this._pos:0;for(;i=i&&this._emitError(new Error(\"Invalid variable byte integer\")),u&&(this._pos+=i),s?e?s={bytes:i,value:o}:s=o:s=!1,D(\"_parseVarByteNum: result: %o\",s),s}_parseByte(){let e;return this._pos{v();m();_();var{Buffer:vi}=(ye(),X(_e)),Om=65536,vd={},km=vi.isBuffer(vi.from([1,2]).subarray(0,1));function Ed(t){let e=vi.allocUnsafe(2);return e.writeUInt8(t>>8,0),e.writeUInt8(t&255,0+1),e}function xm(){for(let t=0;t0&&(r=r|128),n.writeUInt8(r,i++);while(t>0&&i<4);return t>0&&(i=0),km?n.subarray(0,i):n.slice(0,i)}function Lm(t){let e=vi.allocUnsafe(4);return e.writeUInt32BE(t,0),e}Sd.exports={cache:vd,generateCache:xm,generateNumber:Ed,genBufVariableByteInt:Mm,generate4ByteBuffer:Lm};});var Id=M((eO,$o)=>{v();m();_();typeof P>\"u\"||!P.version||P.version.indexOf(\"v0.\")===0||P.version.indexOf(\"v1.\")===0&&P.version.indexOf(\"v1.8.\")!==0?$o.exports={nextTick:Um}:$o.exports=P;function Um(t,e,r,i){if(typeof t!=\"function\")throw new TypeError('\"callback\" argument must be a function');var n=arguments.length,o,s;switch(n){case 0:case 1:return P.nextTick(t);case 2:return P.nextTick(function(){t.call(null,e);});case 3:return P.nextTick(function(){t.call(null,e,r);});case 4:return P.nextTick(function(){t.call(null,e,r,i);});default:for(o=new Array(n-1),s=0;s{v();m();_();var j=Fo(),{Buffer:q}=(ye(),X(_e)),Nm=q.allocUnsafe(0),qm=q.from([0]),Ei=Ad(),Dm=Id().nextTick,qe=ot()(\"mqtt-packet:writeToStream\"),Cn=Ei.cache,jm=Ei.generateNumber,Fm=Ei.generateCache,Ho=Ei.genBufVariableByteInt,Wm=Ei.generate4ByteBuffer,Ie=Vo,Bn=!0;function Od(t,e,r){switch(qe(\"generate called\"),e.cork&&(e.cork(),Dm($m,e)),Bn&&(Bn=!1,Fm()),qe(\"generate: packet.cmd: %s\",t.cmd),t.cmd){case\"connect\":return Hm(t,e);case\"connack\":return Vm(t,e,r);case\"publish\":return zm(t,e,r);case\"puback\":case\"pubrec\":case\"pubrel\":case\"pubcomp\":return Km(t,e,r);case\"subscribe\":return Gm(t,e,r);case\"suback\":return Qm(t,e,r);case\"unsubscribe\":return Ym(t,e,r);case\"unsuback\":return Jm(t,e,r);case\"pingreq\":case\"pingresp\":return Xm(t,e);case\"disconnect\":return Zm(t,e,r);case\"auth\":return e1(t,e,r);default:return e.destroy(new Error(\"Unknown command\")),!1}}Object.defineProperty(Od,\"cacheNumbers\",{get(){return Ie===Vo},set(t){t?((!Cn||Object.keys(Cn).length===0)&&(Bn=!0),Ie=Vo):(Bn=!1,Ie=t1);}});function $m(t){t.uncork();}function Hm(t,e,r){let i=t||{},n=i.protocolId||\"MQTT\",o=i.protocolVersion||4,s=i.will,a=i.clean,u=i.keepalive||0,c=i.clientId||\"\",h=i.username,d=i.password,g=i.properties;a===void 0&&(a=!0);let y=0;if(!n||typeof n!=\"string\"&&!q.isBuffer(n))return e.destroy(new Error(\"Invalid protocolId\")),!1;if(y+=n.length+2,o!==3&&o!==4&&o!==5)return e.destroy(new Error(\"Invalid protocol version\")),!1;if(y+=1,(typeof c==\"string\"||q.isBuffer(c))&&(c||o>=4)&&(c||a))y+=q.byteLength(c)+2;else {if(o<4)return e.destroy(new Error(\"clientId must be supplied before 3.1.1\")),!1;if(a*1===0)return e.destroy(new Error(\"clientId must be given if cleanSession set to 0\")),!1}if(typeof u!=\"number\"||u<0||u>65535||u%1!==0)return e.destroy(new Error(\"Invalid keepalive\")),!1;y+=2,y+=1;let w,E;if(o===5){if(w=Ft(e,g),!w)return !1;y+=w.length;}if(s){if(typeof s!=\"object\")return e.destroy(new Error(\"Invalid will\")),!1;if(!s.topic||typeof s.topic!=\"string\")return e.destroy(new Error(\"Invalid will topic\")),!1;if(y+=q.byteLength(s.topic)+2,y+=2,s.payload)if(s.payload.length>=0)typeof s.payload==\"string\"?y+=q.byteLength(s.payload):y+=s.payload.length;else return e.destroy(new Error(\"Invalid will payload\")),!1;if(E={},o===5){if(E=Ft(e,s.properties),!E)return !1;y+=E.length;}}let S=!1;if(h!=null)if(Pd(h))S=!0,y+=q.byteLength(h)+2;else return e.destroy(new Error(\"Invalid username\")),!1;if(d!=null){if(!S)return e.destroy(new Error(\"Username is required to use password\")),!1;if(Pd(d))y+=kd(d)+2;else return e.destroy(new Error(\"Invalid password\")),!1}e.write(j.CONNECT_HEADER),De(e,y),Gr(e,n),i.bridgeMode&&(o+=128),e.write(o===131?j.VERSION131:o===132?j.VERSION132:o===4?j.VERSION4:o===5?j.VERSION5:j.VERSION3);let I=0;return I|=h!=null?j.USERNAME_MASK:0,I|=d!=null?j.PASSWORD_MASK:0,I|=s&&s.retain?j.WILL_RETAIN_MASK:0,I|=s&&s.qos?s.qos<0&&Ie(e,c),g?.write(),qe(\"publish: payload: %o\",u),e.write(u)}function Km(t,e,r){let i=r?r.protocolVersion:4,n=t||{},o=n.cmd||\"puback\",s=n.messageId,a=n.dup&&o===\"pubrel\"?j.DUP_MASK:0,u=0,c=n.reasonCode,h=n.properties,d=i===5?3:2;if(o===\"pubrel\"&&(u=1),typeof s!=\"number\")return e.destroy(new Error(\"Invalid messageId\")),!1;let g=null;if(i===5&&typeof h==\"object\"){if(g=Si(e,h,r,d),!g)return !1;d+=g.length;}return e.write(j.ACKS[o][u][a][0]),d===3&&(d+=c!==0?1:-1),De(e,d),Ie(e,s),i===5&&d!==2&&e.write(q.from([c])),g!==null?g.write():d===4&&e.write(q.from([0])),!0}function Gm(t,e,r){qe(\"subscribe: packet: \");let i=r?r.protocolVersion:4,n=t||{},o=n.dup?j.DUP_MASK:0,s=n.messageId,a=n.subscriptions,u=n.properties,c=0;if(typeof s!=\"number\")return e.destroy(new Error(\"Invalid messageId\")),!1;c+=2;let h=null;if(i===5){if(h=Ft(e,u),!h)return !1;c+=h.length;}if(typeof a==\"object\"&&a.length)for(let g=0;g2)return e.destroy(new Error(\"Invalid subscriptions - invalid Retain Handling\")),!1}c+=q.byteLength(y)+2+1;}else return e.destroy(new Error(\"Invalid subscriptions\")),!1;qe(\"subscribe: writing to stream: %o\",j.SUBSCRIBE_HEADER),e.write(j.SUBSCRIBE_HEADER[1][o?1:0][0]),De(e,c),Ie(e,s),h!==null&&h.write();let d=!0;for(let g of a){let y=g.topic,w=g.qos,E=+g.nl,S=+g.rap,I=g.rh,C;yr(e,y),C=j.SUBSCRIBE_OPTIONS_QOS[w],i===5&&(C|=E?j.SUBSCRIBE_OPTIONS_NL:0,C|=S?j.SUBSCRIBE_OPTIONS_RAP:0,C|=I?j.SUBSCRIBE_OPTIONS_RH[I]:0),d=e.write(q.from([C]));}return d}function Qm(t,e,r){let i=r?r.protocolVersion:4,n=t||{},o=n.messageId,s=n.granted,a=n.properties,u=0;if(typeof o!=\"number\")return e.destroy(new Error(\"Invalid messageId\")),!1;if(u+=2,typeof s==\"object\"&&s.length)for(let h=0;hj.VARBYTEINT_MAX)return t.destroy(new Error(`Invalid variable byte integer: ${e}`)),!1;let r=Td[e];return r||(r=Ho(e),e<16384&&(Td[e]=r)),qe(\"writeVarByteInt: writing to stream: %o\",r),t.write(r)}function yr(t,e){let r=q.byteLength(e);return Ie(t,r),qe(\"writeString: %s\",e),t.write(e,\"utf8\")}function Rd(t,e,r){yr(t,e),yr(t,r);}function Vo(t,e){return qe(\"writeNumberCached: number: %d\",e),qe(\"writeNumberCached: %o\",Cn[e]),t.write(Cn[e])}function t1(t,e){let r=jm(e);return qe(\"writeNumberGenerated: %o\",r),t.write(r)}function r1(t,e){let r=Wm(e);return qe(\"write4ByteNumber: %o\",r),t.write(r)}function Gr(t,e){typeof e==\"string\"?yr(t,e):e?(Ie(t,e.length),t.write(e)):Ie(t,0);}function Ft(t,e){if(typeof e!=\"object\"||e.length!=null)return {length:1,write(){Bd(t,{},0);}};let r=0;function i(o,s){let a=j.propertiesTypes[o],u=0;switch(a){case\"byte\":{if(typeof s!=\"boolean\")return t.destroy(new Error(`Invalid ${o}: ${s}`)),!1;u+=1+1;break}case\"int8\":{if(typeof s!=\"number\"||s<0||s>255)return t.destroy(new Error(`Invalid ${o}: ${s}`)),!1;u+=1+1;break}case\"binary\":{if(s&&s===null)return t.destroy(new Error(`Invalid ${o}: ${s}`)),!1;u+=1+q.byteLength(s)+2;break}case\"int16\":{if(typeof s!=\"number\"||s<0||s>65535)return t.destroy(new Error(`Invalid ${o}: ${s}`)),!1;u+=1+2;break}case\"int32\":{if(typeof s!=\"number\"||s<0||s>4294967295)return t.destroy(new Error(`Invalid ${o}: ${s}`)),!1;u+=1+4;break}case\"var\":{if(typeof s!=\"number\"||s<0||s>268435455)return t.destroy(new Error(`Invalid ${o}: ${s}`)),!1;u+=1+q.byteLength(Ho(s));break}case\"string\":{if(typeof s!=\"string\")return t.destroy(new Error(`Invalid ${o}: ${s}`)),!1;u+=1+2+q.byteLength(s.toString());break}case\"pair\":{if(typeof s!=\"object\")return t.destroy(new Error(`Invalid ${o}: ${s}`)),!1;u+=Object.getOwnPropertyNames(s).reduce((c,h)=>{let d=s[h];return Array.isArray(d)?c+=d.reduce((g,y)=>(g+=1+2+q.byteLength(h.toString())+2+q.byteLength(y.toString()),g),0):c+=1+2+q.byteLength(h.toString())+2+q.byteLength(s[h].toString()),c},0);break}default:return t.destroy(new Error(`Invalid property ${o}: ${s}`)),!1}return u}if(e)for(let o in e){let s=0,a=0,u=e[o];if(Array.isArray(u))for(let c=0;co;){let a=n.shift();if(a&&e[a])delete e[a],s=Ft(t,e);else return !1}return s}function Cd(t,e,r){switch(j.propertiesTypes[e]){case\"byte\":{t.write(q.from([j.properties[e]])),t.write(q.from([+r]));break}case\"int8\":{t.write(q.from([j.properties[e]])),t.write(q.from([r]));break}case\"binary\":{t.write(q.from([j.properties[e]])),Gr(t,r);break}case\"int16\":{t.write(q.from([j.properties[e]])),Ie(t,r);break}case\"int32\":{t.write(q.from([j.properties[e]])),r1(t,r);break}case\"var\":{t.write(q.from([j.properties[e]])),De(t,r);break}case\"string\":{t.write(q.from([j.properties[e]])),yr(t,r);break}case\"pair\":{Object.getOwnPropertyNames(r).forEach(n=>{let o=r[n];Array.isArray(o)?o.forEach(s=>{t.write(q.from([j.properties[e]])),Rd(t,n.toString(),s.toString());}):(t.write(q.from([j.properties[e]])),Rd(t,n.toString(),o.toString()));});break}default:return t.destroy(new Error(`Invalid property ${e} value: ${r}`)),!1}}function Bd(t,e,r){De(t,r);for(let i in e)if(Object.prototype.hasOwnProperty.call(e,i)&&e[i]!==null){let n=e[i];if(Array.isArray(n))for(let o=0;o{v();m();_();var i1=zo(),{EventEmitter:n1}=(ir(),X(rr)),{Buffer:Md}=(ye(),X(_e));function s1(t,e){let r=new Ko;return i1(t,r,e),r.concat()}var Ko=class extends n1{constructor(){super(),this._array=new Array(20),this._i=0;}write(e){return this._array[this._i++]=e,!0}concat(){let e=0,r=new Array(this._array.length),i=this._array,n=0,o;for(o=0;o{v();m();_();Pn.parser=md().parser;Pn.generate=Ud();Pn.writeToStream=zo();});var Yo=M(Qo=>{v();m();_();Object.defineProperty(Qo,\"__esModule\",{value:!0});var Go=class{constructor(){this.nextId=Math.max(1,Math.floor(Math.random()*65535));}allocate(){let e=this.nextId++;return this.nextId===65536&&(this.nextId=1),e}getLastAllocated(){return this.nextId===1?65535:this.nextId-1}register(e){return !0}deallocate(e){}clear(){}};Qo.default=Go;});var Dd=M((YO,qd)=>{v();m();_();qd.exports=o1;function Qr(t){return t instanceof x?x.from(t):new t.constructor(t.buffer.slice(),t.byteOffset,t.length)}function o1(t){if(t=t||{},t.circles)return a1(t);return t.proto?i:r;function e(n,o){for(var s=Object.keys(n),a=new Array(s.length),u=0;u{v();m();_();jd.exports=Dd()();});var $d=M(Yr=>{v();m();_();Object.defineProperty(Yr,\"__esModule\",{value:!0});Yr.validateTopics=Yr.validateTopic=void 0;function Wd(t){let e=t.split(\"/\");for(let r=0;r{v();m();_();Object.defineProperty(Xo,\"__esModule\",{value:!0});var u1=Dt(),f1={objectMode:!0},c1={clean:!0},Jo=class{constructor(e){this.options=e||{},this.options=Object.assign(Object.assign({},c1),e),this._inflights=new Map;}put(e,r){return this._inflights.set(e.messageId,e),r&&r(),this}createStream(){let e=new u1.Readable(f1),r=[],i=!1,n=0;return this._inflights.forEach((o,s)=>{r.push(o);}),e._read=()=>{!i&&n{if(!i)return i=!0,setTimeout(()=>{e.emit(\"close\");},0),e},e}del(e,r){let i=this._inflights.get(e.messageId);return i?(this._inflights.delete(e.messageId),r(null,i)):r&&r(new Error(\"missing packet\")),this}get(e,r){let i=this._inflights.get(e.messageId);return i?r(null,i):r&&r(new Error(\"missing packet\")),this}close(e){this.options.clean&&(this._inflights=null),e&&e();}};Xo.default=Jo;});var Vd=M(ea=>{v();m();_();Object.defineProperty(ea,\"__esModule\",{value:!0});var Hd=[0,16,128,131,135,144,145,151,153],h1=(t,e,r)=>{t.log(\"handlePublish: packet %o\",e),r=typeof r<\"u\"?r:t.noop;let i=e.topic.toString(),n=e.payload,{qos:o}=e,{messageId:s}=e,{options:a}=t;if(t.options.protocolVersion===5){let u;if(e.properties&&(u=e.properties.topicAlias),typeof u<\"u\")if(i.length===0)if(u>0&&u<=65535){let c=t.topicAliasRecv.getTopicByAlias(u);if(c)i=c,t.log(\"handlePublish :: topic complemented by alias. topic: %s - alias: %d\",i,u);else {t.log(\"handlePublish :: unregistered topic alias. alias: %d\",u),t.emit(\"error\",new Error(\"Received unregistered Topic Alias\"));return}}else {t.log(\"handlePublish :: topic alias out of range. alias: %d\",u),t.emit(\"error\",new Error(\"Received Topic Alias is out of range\"));return}else if(t.topicAliasRecv.put(i,u))t.log(\"handlePublish :: registered topic: %s - alias: %d\",i,u);else {t.log(\"handlePublish :: topic alias out of range. alias: %d\",u),t.emit(\"error\",new Error(\"Received Topic Alias is out of range\"));return}}switch(t.log(\"handlePublish: qos %d\",o),o){case 2:{a.customHandleAcks(i,n,e,(u,c)=>{if(typeof u==\"number\"&&(c=u,u=null),u)return t.emit(\"error\",u);if(Hd.indexOf(c)===-1)return t.emit(\"error\",new Error(\"Wrong reason code for pubrec\"));c?t._sendPacket({cmd:\"pubrec\",messageId:s,reasonCode:c},r):t.incomingStore.put(e,()=>{t._sendPacket({cmd:\"pubrec\",messageId:s},r);});});break}case 1:{a.customHandleAcks(i,n,e,(u,c)=>{if(typeof u==\"number\"&&(c=u,u=null),u)return t.emit(\"error\",u);if(Hd.indexOf(c)===-1)return t.emit(\"error\",new Error(\"Wrong reason code for puback\"));c||t.emit(\"message\",i,n,e),t.handleMessage(e,h=>{if(h)return r&&r(h);t._sendPacket({cmd:\"puback\",messageId:s,reasonCode:c},r);});});break}case 0:t.emit(\"message\",i,n,e),t.handleMessage(e,r);break;default:t.log(\"handlePublish: unknown QoS. Doing nothing.\");break}};ea.default=h1;});var Jr=M(Wt=>{v();m();_();Object.defineProperty(Wt,\"__esModule\",{value:!0});Wt.nextTick=Wt.applyMixin=Wt.ErrorWithReasonCode=void 0;var ta=class t extends Error{constructor(e,r){super(e),this.code=r,Object.setPrototypeOf(this,t.prototype),Object.getPrototypeOf(this).name=\"ErrorWithReasonCode\";}};Wt.ErrorWithReasonCode=ta;function d1(t,e,r=!1){var i;let n=[e];for(;;){let o=n[0],s=Object.getPrototypeOf(o);if(s?.prototype)n.unshift(s);else break}for(let o of n)for(let s of Object.getOwnPropertyNames(o.prototype))(r||s!==\"constructor\")&&Object.defineProperty(t.prototype,s,(i=Object.getOwnPropertyDescriptor(o.prototype,s))!==null&&i!==void 0?i:Object.create(null));}Wt.applyMixin=d1;Wt.nextTick=typeof(P===null||P===void 0?void 0:P.nextTick)==\"function\"?P.nextTick:t=>{setTimeout(t,0);};});var Ai=M(br=>{v();m();_();Object.defineProperty(br,\"__esModule\",{value:!0});br.ReasonCodes=void 0;br.ReasonCodes={0:\"\",1:\"Unacceptable protocol version\",2:\"Identifier rejected\",3:\"Server unavailable\",4:\"Bad username or password\",5:\"Not authorized\",16:\"No matching subscribers\",17:\"No subscription existed\",128:\"Unspecified error\",129:\"Malformed Packet\",130:\"Protocol Error\",131:\"Implementation specific error\",132:\"Unsupported Protocol Version\",133:\"Client Identifier not valid\",134:\"Bad User Name or Password\",135:\"Not authorized\",136:\"Server unavailable\",137:\"Server busy\",138:\"Banned\",139:\"Server shutting down\",140:\"Bad authentication method\",141:\"Keep Alive timeout\",142:\"Session taken over\",143:\"Topic Filter invalid\",144:\"Topic Name invalid\",145:\"Packet identifier in use\",146:\"Packet Identifier not found\",147:\"Receive Maximum exceeded\",148:\"Topic Alias invalid\",149:\"Packet too large\",150:\"Message rate too high\",151:\"Quota exceeded\",152:\"Administrative action\",153:\"Payload format invalid\",154:\"Retain not supported\",155:\"QoS not supported\",156:\"Use another server\",157:\"Server moved\",158:\"Shared Subscriptions not supported\",159:\"Connection rate exceeded\",160:\"Maximum connect time\",161:\"Subscription Identifiers not supported\",162:\"Wildcard Subscriptions not supported\"};var p1=(t,e)=>{let{messageId:r}=e,i=e.cmd,n=null,o=t.outgoing[r]?t.outgoing[r].cb:null,s;if(!o){t.log(\"_handleAck :: Server sent an ack in error. Ignoring.\");return}switch(t.log(\"_handleAck :: packet type\",i),i){case\"pubcomp\":case\"puback\":{let a=e.reasonCode;a&&a>0&&a!==16?(s=new Error(`Publish error: ${br.ReasonCodes[a]}`),s.code=a,t._removeOutgoingAndStoreMessage(r,()=>{o(s,e);})):t._removeOutgoingAndStoreMessage(r,o);break}case\"pubrec\":{n={cmd:\"pubrel\",qos:2,messageId:r};let a=e.reasonCode;a&&a>0&&a!==16?(s=new Error(`Publish error: ${br.ReasonCodes[a]}`),s.code=a,t._removeOutgoingAndStoreMessage(r,()=>{o(s,e);})):t._sendPacket(n);break}case\"suback\":{delete t.outgoing[r],t.messageIdProvider.deallocate(r);let a=e.granted;for(let u=0;u{delete t._resubscribeTopics[h];});}delete t.messageIdToTopic[r],t._invokeStoreProcessingQueue(),o(null,e);break}case\"unsuback\":{delete t.outgoing[r],t.messageIdProvider.deallocate(r),t._invokeStoreProcessingQueue(),o(null);break}default:t.emit(\"error\",new Error(\"unrecognized packet type\"));}t.disconnecting&&Object.keys(t.outgoing).length===0&&t.emit(\"outgoingEmpty\");};br.default=p1;});var Kd=M(ra=>{v();m();_();Object.defineProperty(ra,\"__esModule\",{value:!0});var zd=Jr(),g1=Ai(),y1=(t,e)=>{let{options:r}=t,i=r.protocolVersion,n=i===5?e.reasonCode:e.returnCode;if(i!==5){let o=new zd.ErrorWithReasonCode(`Protocol error: Auth packets are only supported in MQTT 5. Your version:${i}`,n);t.emit(\"error\",o);return}t.handleAuth(e,(o,s)=>{if(o){t.emit(\"error\",o);return}if(n===24)t.reconnecting=!1,t._sendPacket(s);else {let a=new zd.ErrorWithReasonCode(`Connection refused: ${g1.ReasonCodes[n]}`,n);t.emit(\"error\",a);}});};ra.default=y1;});var Xd=M(kn=>{v();m();_();Object.defineProperty(kn,\"__esModule\",{value:!0});kn.LRUCache=void 0;var Ii=typeof performance==\"object\"&&performance&&typeof performance.now==\"function\"?performance:Date,Qd=new Set,ia=typeof P==\"object\"&&P?P:{},Yd=(t,e,r,i)=>{typeof ia.emitWarning==\"function\"?ia.emitWarning(t,e,r,i):console.error(`[${r}] ${e}: ${t}`);},On=globalThis.AbortController,Gd=globalThis.AbortSignal;if(typeof On>\"u\"){Gd=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(i,n){this._onabort.push(n);}},On=class{constructor(){e();}signal=new Gd;abort(i){if(!this.signal.aborted){this.signal.reason=i,this.signal.aborted=!0;for(let n of this.signal._onabort)n(i);this.signal.onabort?.(i);}}};let t=ia.env?.LRU_CACHE_IGNORE_AC_WARNING!==\"1\",e=()=>{t&&(t=!1,Yd(\"AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.\",\"NO_ABORT_CONTROLLER\",\"ENOTSUP\",e));};}var b1=t=>!Qd.has(t),$t=t=>t&&t===Math.floor(t)&&t>0&&isFinite(t),Jd=t=>$t(t)?t<=Math.pow(2,8)?Uint8Array:t<=Math.pow(2,16)?Uint16Array:t<=Math.pow(2,32)?Uint32Array:t<=Number.MAX_SAFE_INTEGER?Xr:null:null,Xr=class extends Array{constructor(e){super(e),this.fill(0);}},na=class t{heap;length;static#l=!1;static create(e){let r=Jd(e);if(!r)return [];t.#l=!0;let i=new t(e,r);return t.#l=!1,i}constructor(e,r){if(!t.#l)throw new TypeError(\"instantiate Stack using Stack.create(n)\");this.heap=new r(e),this.length=0;}push(e){this.heap[this.length++]=e;}pop(){return this.heap[--this.length]}},sa=class t{#l;#c;#p;#g;#B;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#i;#y;#n;#r;#e;#u;#h;#a;#s;#b;#o;#E;#S;#w;#_;#I;#f;static unsafeExposeInternals(e){return {starts:e.#S,ttls:e.#w,sizes:e.#E,keyMap:e.#n,keyList:e.#r,valList:e.#e,next:e.#u,prev:e.#h,get head(){return e.#a},get tail(){return e.#s},free:e.#b,isBackgroundFetch:r=>e.#t(r),backgroundFetch:(r,i,n,o)=>e.#k(r,i,n,o),moveToTail:r=>e.#C(r),indexes:r=>e.#m(r),rindexes:r=>e.#v(r),isStale:r=>e.#d(r)}}get max(){return this.#l}get maxSize(){return this.#c}get calculatedSize(){return this.#y}get size(){return this.#i}get fetchMethod(){return this.#B}get dispose(){return this.#p}get disposeAfter(){return this.#g}constructor(e){let{max:r=0,ttl:i,ttlResolution:n=1,ttlAutopurge:o,updateAgeOnGet:s,updateAgeOnHas:a,allowStale:u,dispose:c,disposeAfter:h,noDisposeOnSet:d,noUpdateTTL:g,maxSize:y=0,maxEntrySize:w=0,sizeCalculation:E,fetchMethod:S,noDeleteOnFetchRejection:I,noDeleteOnStaleGet:C,allowStaleOnFetchRejection:R,allowStaleOnFetchAbort:U,ignoreFetchAbort:N}=e;if(r!==0&&!$t(r))throw new TypeError(\"max option must be a nonnegative integer\");let W=r?Jd(r):Array;if(!W)throw new Error(\"invalid max value: \"+r);if(this.#l=r,this.#c=y,this.maxEntrySize=w||this.#c,this.sizeCalculation=E,this.sizeCalculation){if(!this.#c&&!this.maxEntrySize)throw new TypeError(\"cannot set sizeCalculation without setting maxSize or maxEntrySize\");if(typeof this.sizeCalculation!=\"function\")throw new TypeError(\"sizeCalculation set to non-function\")}if(S!==void 0&&typeof S!=\"function\")throw new TypeError(\"fetchMethod must be a function if specified\");if(this.#B=S,this.#I=!!S,this.#n=new Map,this.#r=new Array(r).fill(void 0),this.#e=new Array(r).fill(void 0),this.#u=new W(r),this.#h=new W(r),this.#a=0,this.#s=0,this.#b=na.create(r),this.#i=0,this.#y=0,typeof c==\"function\"&&(this.#p=c),typeof h==\"function\"?(this.#g=h,this.#o=[]):(this.#g=void 0,this.#o=void 0),this.#_=!!this.#p,this.#f=!!this.#g,this.noDisposeOnSet=!!d,this.noUpdateTTL=!!g,this.noDeleteOnFetchRejection=!!I,this.allowStaleOnFetchRejection=!!R,this.allowStaleOnFetchAbort=!!U,this.ignoreFetchAbort=!!N,this.maxEntrySize!==0){if(this.#c!==0&&!$t(this.#c))throw new TypeError(\"maxSize must be a positive integer if specified\");if(!$t(this.maxEntrySize))throw new TypeError(\"maxEntrySize must be a positive integer if specified\");this.#q();}if(this.allowStale=!!u,this.noDeleteOnStaleGet=!!C,this.updateAgeOnGet=!!s,this.updateAgeOnHas=!!a,this.ttlResolution=$t(n)||n===0?n:1,this.ttlAutopurge=!!o,this.ttl=i||0,this.ttl){if(!$t(this.ttl))throw new TypeError(\"ttl must be a positive integer if specified\");this.#x();}if(this.#l===0&&this.ttl===0&&this.#c===0)throw new TypeError(\"At least one of max, maxSize, or ttl is required\");if(!this.ttlAutopurge&&!this.#l&&!this.#c){let K=\"LRU_CACHE_UNBOUNDED\";b1(K)&&(Qd.add(K),Yd(\"TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.\",\"UnboundedCacheWarning\",K,t));}}getRemainingTTL(e){return this.#n.has(e)?1/0:0}#x(){let e=new Xr(this.#l),r=new Xr(this.#l);this.#w=e,this.#S=r,this.#M=(o,s,a=Ii.now())=>{if(r[o]=s!==0?a:0,e[o]=s,s!==0&&this.ttlAutopurge){let u=setTimeout(()=>{this.#d(o)&&this.delete(this.#r[o]);},s+1);u.unref&&u.unref();}},this.#T=o=>{r[o]=e[o]!==0?Ii.now():0;},this.#A=(o,s)=>{if(e[s]){let a=e[s],u=r[s];o.ttl=a,o.start=u,o.now=i||n();let c=o.now-u;o.remainingTTL=a-c;}};let i=0,n=()=>{let o=Ii.now();if(this.ttlResolution>0){i=o;let s=setTimeout(()=>i=0,this.ttlResolution);s.unref&&s.unref();}return o};this.getRemainingTTL=o=>{let s=this.#n.get(o);if(s===void 0)return 0;let a=e[s],u=r[s];if(a===0||u===0)return 1/0;let c=(i||n())-u;return a-c},this.#d=o=>e[o]!==0&&r[o]!==0&&(i||n())-r[o]>e[o];}#T=()=>{};#A=()=>{};#M=()=>{};#d=()=>!1;#q(){let e=new Xr(this.#l);this.#y=0,this.#E=e,this.#R=r=>{this.#y-=e[r],e[r]=0;},this.#L=(r,i,n,o)=>{if(this.#t(i))return 0;if(!$t(n))if(o){if(typeof o!=\"function\")throw new TypeError(\"sizeCalculation must be a function\");if(n=o(i,r),!$t(n))throw new TypeError(\"sizeCalculation return invalid (expect positive integer)\")}else throw new TypeError(\"invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.\");return n},this.#P=(r,i,n)=>{if(e[r]=i,this.#c){let o=this.#c-e[r];for(;this.#y>o;)this.#O(!0);}this.#y+=e[r],n&&(n.entrySize=i,n.totalCalculatedSize=this.#y);};}#R=e=>{};#P=(e,r,i)=>{};#L=(e,r,i,n)=>{if(i||n)throw new TypeError(\"cannot set size without setting maxSize or maxEntrySize on cache\");return 0};*#m({allowStale:e=this.allowStale}={}){if(this.#i)for(let r=this.#s;!(!this.#U(r)||((e||!this.#d(r))&&(yield r),r===this.#a));)r=this.#h[r];}*#v({allowStale:e=this.allowStale}={}){if(this.#i)for(let r=this.#a;!(!this.#U(r)||((e||!this.#d(r))&&(yield r),r===this.#s));)r=this.#u[r];}#U(e){return e!==void 0&&this.#n.get(this.#r[e])===e}*entries(){for(let e of this.#m())this.#e[e]!==void 0&&this.#r[e]!==void 0&&!this.#t(this.#e[e])&&(yield [this.#r[e],this.#e[e]]);}*rentries(){for(let e of this.#v())this.#e[e]!==void 0&&this.#r[e]!==void 0&&!this.#t(this.#e[e])&&(yield [this.#r[e],this.#e[e]]);}*keys(){for(let e of this.#m()){let r=this.#r[e];r!==void 0&&!this.#t(this.#e[e])&&(yield r);}}*rkeys(){for(let e of this.#v()){let r=this.#r[e];r!==void 0&&!this.#t(this.#e[e])&&(yield r);}}*values(){for(let e of this.#m())this.#e[e]!==void 0&&!this.#t(this.#e[e])&&(yield this.#e[e]);}*rvalues(){for(let e of this.#v())this.#e[e]!==void 0&&!this.#t(this.#e[e])&&(yield this.#e[e]);}[Symbol.iterator](){return this.entries()}find(e,r={}){for(let i of this.#m()){let n=this.#e[i],o=this.#t(n)?n.__staleWhileFetching:n;if(o!==void 0&&e(o,this.#r[i],this))return this.get(this.#r[i],r)}}forEach(e,r=this){for(let i of this.#m()){let n=this.#e[i],o=this.#t(n)?n.__staleWhileFetching:n;o!==void 0&&e.call(r,o,this.#r[i],this);}}rforEach(e,r=this){for(let i of this.#v()){let n=this.#e[i],o=this.#t(n)?n.__staleWhileFetching:n;o!==void 0&&e.call(r,o,this.#r[i],this);}}purgeStale(){let e=!1;for(let r of this.#v({allowStale:!0}))this.#d(r)&&(this.delete(this.#r[r]),e=!0);return e}dump(){let e=[];for(let r of this.#m({allowStale:!0})){let i=this.#r[r],n=this.#e[r],o=this.#t(n)?n.__staleWhileFetching:n;if(o===void 0||i===void 0)continue;let s={value:o};if(this.#w&&this.#S){s.ttl=this.#w[r];let a=Ii.now()-this.#S[r];s.start=Math.floor(Date.now()-a);}this.#E&&(s.size=this.#E[r]),e.unshift([i,s]);}return e}load(e){this.clear();for(let[r,i]of e){if(i.start){let n=Date.now()-i.start;i.start=Ii.now()-n;}this.set(r,i.value,i);}}set(e,r,i={}){if(r===void 0)return this.delete(e),this;let{ttl:n=this.ttl,start:o,noDisposeOnSet:s=this.noDisposeOnSet,sizeCalculation:a=this.sizeCalculation,status:u}=i,{noUpdateTTL:c=this.noUpdateTTL}=i,h=this.#L(e,r,i.size||0,a);if(this.maxEntrySize&&h>this.maxEntrySize)return u&&(u.set=\"miss\",u.maxEntrySizeExceeded=!0),this.delete(e),this;let d=this.#i===0?void 0:this.#n.get(e);if(d===void 0)d=this.#i===0?this.#s:this.#b.length!==0?this.#b.pop():this.#i===this.#l?this.#O(!1):this.#i,this.#r[d]=e,this.#e[d]=r,this.#n.set(e,d),this.#u[this.#s]=d,this.#h[d]=this.#s,this.#s=d,this.#i++,this.#P(d,h,u),u&&(u.set=\"add\"),c=!1;else {this.#C(d);let g=this.#e[d];if(r!==g){if(this.#I&&this.#t(g)){g.__abortController.abort(new Error(\"replaced\"));let{__staleWhileFetching:y}=g;y!==void 0&&!s&&(this.#_&&this.#p?.(y,e,\"set\"),this.#f&&this.#o?.push([y,e,\"set\"]));}else s||(this.#_&&this.#p?.(g,e,\"set\"),this.#f&&this.#o?.push([g,e,\"set\"]));if(this.#R(d),this.#P(d,h,u),this.#e[d]=r,u){u.set=\"replace\";let y=g&&this.#t(g)?g.__staleWhileFetching:g;y!==void 0&&(u.oldValue=y);}}else u&&(u.set=\"update\");}if(n!==0&&!this.#w&&this.#x(),this.#w&&(c||this.#M(d,n,o),u&&this.#A(u,d)),!s&&this.#f&&this.#o){let g=this.#o,y;for(;y=g?.shift();)this.#g?.(...y);}return this}pop(){try{for(;this.#i;){let e=this.#e[this.#a];if(this.#O(!0),this.#t(e)){if(e.__staleWhileFetching)return e.__staleWhileFetching}else if(e!==void 0)return e}}finally{if(this.#f&&this.#o){let e=this.#o,r;for(;r=e?.shift();)this.#g?.(...r);}}}#O(e){let r=this.#a,i=this.#r[r],n=this.#e[r];return this.#I&&this.#t(n)?n.__abortController.abort(new Error(\"evicted\")):(this.#_||this.#f)&&(this.#_&&this.#p?.(n,i,\"evict\"),this.#f&&this.#o?.push([n,i,\"evict\"])),this.#R(r),e&&(this.#r[r]=void 0,this.#e[r]=void 0,this.#b.push(r)),this.#i===1?(this.#a=this.#s=0,this.#b.length=0):this.#a=this.#u[r],this.#n.delete(i),this.#i--,r}has(e,r={}){let{updateAgeOnHas:i=this.updateAgeOnHas,status:n}=r,o=this.#n.get(e);if(o!==void 0){let s=this.#e[o];if(this.#t(s)&&s.__staleWhileFetching===void 0)return !1;if(this.#d(o))n&&(n.has=\"stale\",this.#A(n,o));else return i&&this.#T(o),n&&(n.has=\"hit\",this.#A(n,o)),!0}else n&&(n.has=\"miss\");return !1}peek(e,r={}){let{allowStale:i=this.allowStale}=r,n=this.#n.get(e);if(n!==void 0&&(i||!this.#d(n))){let o=this.#e[n];return this.#t(o)?o.__staleWhileFetching:o}}#k(e,r,i,n){let o=r===void 0?void 0:this.#e[r];if(this.#t(o))return o;let s=new On,{signal:a}=i;a?.addEventListener(\"abort\",()=>s.abort(a.reason),{signal:s.signal});let u={signal:s.signal,options:i,context:n},c=(E,S=!1)=>{let{aborted:I}=s.signal,C=i.ignoreFetchAbort&&E!==void 0;if(i.status&&(I&&!S?(i.status.fetchAborted=!0,i.status.fetchError=s.signal.reason,C&&(i.status.fetchAbortIgnored=!0)):i.status.fetchResolved=!0),I&&!C&&!S)return d(s.signal.reason);let R=y;return this.#e[r]===y&&(E===void 0?R.__staleWhileFetching?this.#e[r]=R.__staleWhileFetching:this.delete(e):(i.status&&(i.status.fetchUpdated=!0),this.set(e,E,u.options))),E},h=E=>(i.status&&(i.status.fetchRejected=!0,i.status.fetchError=E),d(E)),d=E=>{let{aborted:S}=s.signal,I=S&&i.allowStaleOnFetchAbort,C=I||i.allowStaleOnFetchRejection,R=C||i.noDeleteOnFetchRejection,U=y;if(this.#e[r]===y&&(!R||U.__staleWhileFetching===void 0?this.delete(e):I||(this.#e[r]=U.__staleWhileFetching)),C)return i.status&&U.__staleWhileFetching!==void 0&&(i.status.returnedStale=!0),U.__staleWhileFetching;if(U.__returned===U)throw E},g=(E,S)=>{let I=this.#B?.(e,o,u);I&&I instanceof Promise&&I.then(C=>E(C===void 0?void 0:C),S),s.signal.addEventListener(\"abort\",()=>{(!i.ignoreFetchAbort||i.allowStaleOnFetchAbort)&&(E(void 0),i.allowStaleOnFetchAbort&&(E=C=>c(C,!0)));});};i.status&&(i.status.fetchDispatched=!0);let y=new Promise(g).then(c,h),w=Object.assign(y,{__abortController:s,__staleWhileFetching:o,__returned:void 0});return r===void 0?(this.set(e,w,{...u.options,status:void 0}),r=this.#n.get(e)):this.#e[r]=w,w}#t(e){if(!this.#I)return !1;let r=e;return !!r&&r instanceof Promise&&r.hasOwnProperty(\"__staleWhileFetching\")&&r.__abortController instanceof On}async fetch(e,r={}){let{allowStale:i=this.allowStale,updateAgeOnGet:n=this.updateAgeOnGet,noDeleteOnStaleGet:o=this.noDeleteOnStaleGet,ttl:s=this.ttl,noDisposeOnSet:a=this.noDisposeOnSet,size:u=0,sizeCalculation:c=this.sizeCalculation,noUpdateTTL:h=this.noUpdateTTL,noDeleteOnFetchRejection:d=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:g=this.allowStaleOnFetchRejection,ignoreFetchAbort:y=this.ignoreFetchAbort,allowStaleOnFetchAbort:w=this.allowStaleOnFetchAbort,context:E,forceRefresh:S=!1,status:I,signal:C}=r;if(!this.#I)return I&&(I.fetch=\"get\"),this.get(e,{allowStale:i,updateAgeOnGet:n,noDeleteOnStaleGet:o,status:I});let R={allowStale:i,updateAgeOnGet:n,noDeleteOnStaleGet:o,ttl:s,noDisposeOnSet:a,size:u,sizeCalculation:c,noUpdateTTL:h,noDeleteOnFetchRejection:d,allowStaleOnFetchRejection:g,allowStaleOnFetchAbort:w,ignoreFetchAbort:y,status:I,signal:C},U=this.#n.get(e);if(U===void 0){I&&(I.fetch=\"miss\");let N=this.#k(e,U,R,E);return N.__returned=N}else {let N=this.#e[U];if(this.#t(N)){let de=i&&N.__staleWhileFetching!==void 0;return I&&(I.fetch=\"inflight\",de&&(I.returnedStale=!0)),de?N.__staleWhileFetching:N.__returned=N}let W=this.#d(U);if(!S&&!W)return I&&(I.fetch=\"hit\"),this.#C(U),n&&this.#T(U),I&&this.#A(I,U),N;let K=this.#k(e,U,R,E),Q=K.__staleWhileFetching!==void 0&&i;return I&&(I.fetch=W?\"stale\":\"refresh\",Q&&W&&(I.returnedStale=!0)),Q?K.__staleWhileFetching:K.__returned=K}}get(e,r={}){let{allowStale:i=this.allowStale,updateAgeOnGet:n=this.updateAgeOnGet,noDeleteOnStaleGet:o=this.noDeleteOnStaleGet,status:s}=r,a=this.#n.get(e);if(a!==void 0){let u=this.#e[a],c=this.#t(u);return s&&this.#A(s,a),this.#d(a)?(s&&(s.get=\"stale\"),c?(s&&i&&u.__staleWhileFetching!==void 0&&(s.returnedStale=!0),i?u.__staleWhileFetching:void 0):(o||this.delete(e),s&&i&&(s.returnedStale=!0),i?u:void 0)):(s&&(s.get=\"hit\"),c?u.__staleWhileFetching:(this.#C(a),n&&this.#T(a),u))}else s&&(s.get=\"miss\");}#N(e,r){this.#h[r]=e,this.#u[e]=r;}#C(e){e!==this.#s&&(e===this.#a?this.#a=this.#u[e]:this.#N(this.#h[e],this.#u[e]),this.#N(this.#s,e),this.#s=e);}delete(e){let r=!1;if(this.#i!==0){let i=this.#n.get(e);if(i!==void 0)if(r=!0,this.#i===1)this.clear();else {this.#R(i);let n=this.#e[i];this.#t(n)?n.__abortController.abort(new Error(\"deleted\")):(this.#_||this.#f)&&(this.#_&&this.#p?.(n,e,\"delete\"),this.#f&&this.#o?.push([n,e,\"delete\"])),this.#n.delete(e),this.#r[i]=void 0,this.#e[i]=void 0,i===this.#s?this.#s=this.#h[i]:i===this.#a?this.#a=this.#u[i]:(this.#u[this.#h[i]]=this.#u[i],this.#h[this.#u[i]]=this.#h[i]),this.#i--,this.#b.push(i);}}if(this.#f&&this.#o?.length){let i=this.#o,n;for(;n=i?.shift();)this.#g?.(...n);}return r}clear(){for(let e of this.#v({allowStale:!0})){let r=this.#e[e];if(this.#t(r))r.__abortController.abort(new Error(\"deleted\"));else {let i=this.#r[e];this.#_&&this.#p?.(r,i,\"delete\"),this.#f&&this.#o?.push([r,i,\"delete\"]);}}if(this.#n.clear(),this.#e.fill(void 0),this.#r.fill(void 0),this.#w&&this.#S&&(this.#w.fill(0),this.#S.fill(0)),this.#E&&this.#E.fill(0),this.#a=0,this.#s=0,this.#b.length=0,this.#y=0,this.#i=0,this.#f&&this.#o){let e=this.#o,r;for(;r=e?.shift();)this.#g?.(...r);}}};kn.LRUCache=sa;});var at=M(Ht=>{v();m();_();Object.defineProperty(Ht,\"t\",{value:!0});Ht.ContainerIterator=Ht.Container=Ht.Base=void 0;var oa=class{constructor(e=0){this.iteratorType=e;}equals(e){return this.o===e.o}};Ht.ContainerIterator=oa;var xn=class{constructor(){this.i=0;}get length(){return this.i}size(){return this.i}empty(){return this.i===0}};Ht.Base=xn;var aa=class extends xn{};Ht.Container=aa;});var Zd=M(Mn=>{v();m();_();Object.defineProperty(Mn,\"t\",{value:!0});Mn.default=void 0;var w1=at(),la=class extends w1.Base{constructor(e=[]){super(),this.S=[];let r=this;e.forEach(function(i){r.push(i);});}clear(){this.i=0,this.S=[];}push(e){return this.S.push(e),this.i+=1,this.i}pop(){if(this.i!==0)return this.i-=1,this.S.pop()}top(){return this.S[this.i-1]}},_1=la;Mn.default=_1;});var ep=M(Ln=>{v();m();_();Object.defineProperty(Ln,\"t\",{value:!0});Ln.default=void 0;var m1=at(),ua=class extends m1.Base{constructor(e=[]){super(),this.j=0,this.q=[];let r=this;e.forEach(function(i){r.push(i);});}clear(){this.q=[],this.i=this.j=0;}push(e){let r=this.q.length;if(this.j/r>.5&&this.j+this.i>=r&&r>4096){let i=this.i;for(let n=0;n{v();m();_();Object.defineProperty(Un,\"t\",{value:!0});Un.default=void 0;var E1=at(),fa=class extends E1.Base{constructor(e=[],r=function(n,o){return n>o?-1:n>1;for(let o=this.i-1>>1;o>=0;--o)this.k(o,n);}m(e){let r=this.C[e];for(;e>0;){let i=e-1>>1,n=this.C[i];if(this.v(n,r)<=0)break;this.C[e]=n,e=i;}this.C[e]=r;}k(e,r){let i=this.C[e];for(;e0&&(n=o,s=this.C[o]),this.v(s,i)>=0)break;this.C[e]=s,e=n;}this.C[e]=i;}clear(){this.i=0,this.C.length=0;}push(e){this.C.push(e),this.m(this.i),this.i+=1;}pop(){if(this.i===0)return;let e=this.C[0],r=this.C.pop();return this.i-=1,this.i&&(this.C[0]=r,this.k(0,this.i>>1)),e}top(){return this.C[0]}find(e){return this.C.indexOf(e)>=0}remove(e){let r=this.C.indexOf(e);return r<0?!1:(r===0?this.pop():r===this.i-1?(this.C.pop(),this.i-=1):(this.C.splice(r,1,this.C.pop()),this.i-=1,this.m(r),this.k(r,this.i>>1)),!0)}updateItem(e){let r=this.C.indexOf(e);return r<0?!1:(this.m(r),this.k(r,this.i>>1),!0)}toArray(){return [...this.C]}},S1=fa;Un.default=S1;});var qn=M(Nn=>{v();m();_();Object.defineProperty(Nn,\"t\",{value:!0});Nn.default=void 0;var A1=at(),ca=class extends A1.Container{},I1=ca;Nn.default=I1;});var lt=M(ha=>{v();m();_();Object.defineProperty(ha,\"t\",{value:!0});ha.throwIteratorAccessError=T1;function T1(){throw new RangeError(\"Iterator access denied!\")}});var pa=M(jn=>{v();m();_();Object.defineProperty(jn,\"t\",{value:!0});jn.RandomIterator=void 0;var R1=at(),Dn=lt(),da=class extends R1.ContainerIterator{constructor(e,r){super(r),this.o=e,this.iteratorType===0?(this.pre=function(){return this.o===0&&(0, Dn.throwIteratorAccessError)(),this.o-=1,this},this.next=function(){return this.o===this.container.size()&&(0, Dn.throwIteratorAccessError)(),this.o+=1,this}):(this.pre=function(){return this.o===this.container.size()-1&&(0, Dn.throwIteratorAccessError)(),this.o+=1,this},this.next=function(){return this.o===-1&&(0, Dn.throwIteratorAccessError)(),this.o-=1,this});}get pointer(){return this.container.getElementByPos(this.o)}set pointer(e){this.container.setElementByPos(this.o,e);}};jn.RandomIterator=da;});var rp=M(Fn=>{v();m();_();Object.defineProperty(Fn,\"t\",{value:!0});Fn.default=void 0;var C1=P1(qn()),B1=pa();function P1(t){return t&&t.t?t:{default:t}}var wr=class t extends B1.RandomIterator{constructor(e,r,i){super(e,i),this.container=r;}copy(){return new t(this.o,this.container,this.iteratorType)}},ga=class extends C1.default{constructor(e=[],r=!0){if(super(),Array.isArray(e))this.J=r?[...e]:e,this.i=e.length;else {this.J=[];let i=this;e.forEach(function(n){i.pushBack(n);});}}clear(){this.i=0,this.J.length=0;}begin(){return new wr(0,this)}end(){return new wr(this.i,this)}rBegin(){return new wr(this.i-1,this,1)}rEnd(){return new wr(-1,this,1)}front(){return this.J[0]}back(){return this.J[this.i-1]}getElementByPos(e){if(e<0||e>this.i-1)throw new RangeError;return this.J[e]}eraseElementByPos(e){if(e<0||e>this.i-1)throw new RangeError;return this.J.splice(e,1),this.i-=1,this.i}eraseElementByValue(e){let r=0;for(let i=0;ithis.i-1)throw new RangeError;this.J[e]=r;}insert(e,r,i=1){if(e<0||e>this.i)throw new RangeError;return this.J.splice(e,0,...new Array(i).fill(r)),this.i+=i,this.i}find(e){for(let r=0;r{v();m();_();Object.defineProperty(Wn,\"t\",{value:!0});Wn.default=void 0;var k1=M1(qn()),x1=at(),_r=lt();function M1(t){return t&&t.t?t:{default:t}}var mr=class t extends x1.ContainerIterator{constructor(e,r,i,n){super(n),this.o=e,this.h=r,this.container=i,this.iteratorType===0?(this.pre=function(){return this.o.L===this.h&&(0, _r.throwIteratorAccessError)(),this.o=this.o.L,this},this.next=function(){return this.o===this.h&&(0, _r.throwIteratorAccessError)(),this.o=this.o.B,this}):(this.pre=function(){return this.o.B===this.h&&(0, _r.throwIteratorAccessError)(),this.o=this.o.B,this},this.next=function(){return this.o===this.h&&(0, _r.throwIteratorAccessError)(),this.o=this.o.L,this});}get pointer(){return this.o===this.h&&(0, _r.throwIteratorAccessError)(),this.o.l}set pointer(e){this.o===this.h&&(0, _r.throwIteratorAccessError)(),this.o.l=e;}copy(){return new t(this.o,this.h,this.container,this.iteratorType)}},ya=class extends k1.default{constructor(e=[]){super(),this.h={},this.p=this._=this.h.L=this.h.B=this.h;let r=this;e.forEach(function(i){r.pushBack(i);});}V(e){let{L:r,B:i}=e;r.B=i,i.L=r,e===this.p&&(this.p=i),e===this._&&(this._=r),this.i-=1;}G(e,r){let i=r.B,n={l:e,L:r,B:i};r.B=n,i.L=n,r===this.h&&(this.p=n),i===this.h&&(this._=n),this.i+=1;}clear(){this.i=0,this.p=this._=this.h.L=this.h.B=this.h;}begin(){return new mr(this.p,this.h,this)}end(){return new mr(this.h,this.h,this)}rBegin(){return new mr(this._,this.h,this,1)}rEnd(){return new mr(this.h,this.h,this,1)}front(){return this.p.l}back(){return this._.l}getElementByPos(e){if(e<0||e>this.i-1)throw new RangeError;let r=this.p;for(;e--;)r=r.B;return r.l}eraseElementByPos(e){if(e<0||e>this.i-1)throw new RangeError;let r=this.p;for(;e--;)r=r.B;return this.V(r),this.i}eraseElementByValue(e){let r=this.p;for(;r!==this.h;)r.l===e&&this.V(r),r=r.B;return this.i}eraseElementByIterator(e){let r=e.o;return r===this.h&&(0, _r.throwIteratorAccessError)(),e=e.next(),this.V(r),e}pushBack(e){return this.G(e,this._),this.i}popBack(){if(this.i===0)return;let e=this._.l;return this.V(this._),e}pushFront(e){return this.G(e,this.h),this.i}popFront(){if(this.i===0)return;let e=this.p.l;return this.V(this.p),e}setElementByPos(e,r){if(e<0||e>this.i-1)throw new RangeError;let i=this.p;for(;e--;)i=i.B;i.l=r;}insert(e,r,i=1){if(e<0||e>this.i)throw new RangeError;if(i<=0)return this.i;if(e===0)for(;i--;)this.pushFront(r);else if(e===this.i)for(;i--;)this.pushBack(r);else {let n=this.p;for(let s=1;s{v();m();_();Object.defineProperty($n,\"t\",{value:!0});$n.default=void 0;var U1=q1(qn()),N1=pa();function q1(t){return t&&t.t?t:{default:t}}var vr=class t extends N1.RandomIterator{constructor(e,r,i){super(e,i),this.container=r;}copy(){return new t(this.o,this.container,this.iteratorType)}},ba=class extends U1.default{constructor(e=[],r=4096){super(),this.j=0,this.D=0,this.R=0,this.N=0,this.P=0,this.A=[];let i=(()=>{if(typeof e.length==\"number\")return e.length;if(typeof e.size==\"number\")return e.size;if(typeof e.size==\"function\")return e.size();throw new TypeError(\"Cannot get the length or size of the container\")})();this.F=r,this.P=Math.max(Math.ceil(i/this.F),1);for(let s=0;s>1)-(n>>1),this.D=this.N=this.F-i%this.F>>1;let o=this;e.forEach(function(s){o.pushBack(s);});}T(){let e=[],r=Math.max(this.P>>1,1);for(let i=0;i>1;}begin(){return new vr(0,this)}end(){return new vr(this.i,this)}rBegin(){return new vr(this.i-1,this,1)}rEnd(){return new vr(-1,this,1)}front(){if(this.i!==0)return this.A[this.j][this.D]}back(){if(this.i!==0)return this.A[this.R][this.N]}pushBack(e){return this.i&&(this.N0?this.N-=1:this.R>0?(this.R-=1,this.N=this.F-1):(this.R=this.P-1,this.N=this.F-1)),this.i-=1,e}pushFront(e){return this.i&&(this.D>0?this.D-=1:this.j>0?(this.j-=1,this.D=this.F-1):(this.j=this.P-1,this.D=this.F-1),this.j===this.R&&this.D===this.N&&this.T()),this.i+=1,this.A[this.j][this.D]=e,this.i}popFront(){if(this.i===0)return;let e=this.A[this.j][this.D];return this.i!==1&&(this.Dthis.i-1)throw new RangeError;let{curNodeBucketIndex:r,curNodePointerIndex:i}=this.O(e);return this.A[r][i]}setElementByPos(e,r){if(e<0||e>this.i-1)throw new RangeError;let{curNodeBucketIndex:i,curNodePointerIndex:n}=this.O(e);this.A[i][n]=r;}insert(e,r,i=1){if(e<0||e>this.i)throw new RangeError;if(e===0)for(;i--;)this.pushFront(r);else if(e===this.i)for(;i--;)this.pushBack(r);else {let n=[];for(let o=e;othis.i-1)throw new RangeError;if(e===0)this.popFront();else if(e===this.i-1)this.popBack();else {let r=[];for(let n=e+1;ne;)this.popBack();return this.i}sort(e){let r=[];for(let i=0;i{v();m();_();Object.defineProperty(Zr,\"t\",{value:!0});Zr.TreeNodeEnableIndex=Zr.TreeNode=void 0;var Hn=class{constructor(e,r){this.ee=1,this.u=void 0,this.l=void 0,this.U=void 0,this.W=void 0,this.tt=void 0,this.u=e,this.l=r;}L(){let e=this;if(e.ee===1&&e.tt.tt===e)e=e.W;else if(e.U)for(e=e.U;e.W;)e=e.W;else {let r=e.tt;for(;r.U===e;)e=r,r=e.tt;e=r;}return e}B(){let e=this;if(e.W){for(e=e.W;e.U;)e=e.U;return e}else {let r=e.tt;for(;r.W===e;)e=r,r=e.tt;return e.W!==r?r:e}}te(){let e=this.tt,r=this.W,i=r.U;return e.tt===this?e.tt=r:e.U===this?e.U=r:e.W=r,r.tt=e,r.U=this,this.tt=r,this.W=i,i&&(i.tt=this),r}se(){let e=this.tt,r=this.U,i=r.W;return e.tt===this?e.tt=r:e.U===this?e.U=r:e.W=r,r.tt=e,r.W=this,this.tt=r,this.U=i,i&&(i.tt=this),r}};Zr.TreeNode=Hn;var wa=class extends Hn{constructor(){super(...arguments),this.rt=1;}te(){let e=super.te();return this.ie(),e.ie(),e}se(){let e=super.se();return this.ie(),e.ie(),e}ie(){this.rt=1,this.U&&(this.rt+=this.U.rt),this.W&&(this.rt+=this.W.rt);}};Zr.TreeNodeEnableIndex=wa;});var ma=M(Vn=>{v();m();_();Object.defineProperty(Vn,\"t\",{value:!0});Vn.default=void 0;var op=sp(),j1=at(),ap=lt(),_a=class extends j1.Container{constructor(e=function(i,n){return in?1:0},r=!1){super(),this.Y=void 0,this.v=e,r?(this.re=op.TreeNodeEnableIndex,this.M=function(i,n,o){let s=this.ne(i,n,o);if(s){let a=s.tt;for(;a!==this.h;)a.rt+=1,a=a.tt;let u=this.he(s);if(u){let{parentNode:c,grandParent:h,curNode:d}=u;c.ie(),h.ie(),d.ie();}}return this.i},this.V=function(i){let n=this.fe(i);for(;n!==this.h;)n.rt-=1,n=n.tt;}):(this.re=op.TreeNode,this.M=function(i,n,o){let s=this.ne(i,n,o);return s&&this.he(s),this.i},this.V=this.fe),this.h=new this.re;}X(e,r){let i=this.h;for(;e;){let n=this.v(e.u,r);if(n<0)e=e.W;else if(n>0)i=e,e=e.U;else return e}return i}Z(e,r){let i=this.h;for(;e;)this.v(e.u,r)<=0?e=e.W:(i=e,e=e.U);return i}$(e,r){let i=this.h;for(;e;){let n=this.v(e.u,r);if(n<0)i=e,e=e.W;else if(n>0)e=e.U;else return e}return i}rr(e,r){let i=this.h;for(;e;)this.v(e.u,r)<0?(i=e,e=e.W):e=e.U;return i}ue(e){for(;;){let r=e.tt;if(r===this.h)return;if(e.ee===1){e.ee=0;return}if(e===r.U){let i=r.W;if(i.ee===1)i.ee=0,r.ee=1,r===this.Y?this.Y=r.te():r.te();else if(i.W&&i.W.ee===1){i.ee=r.ee,r.ee=0,i.W.ee=0,r===this.Y?this.Y=r.te():r.te();return}else i.U&&i.U.ee===1?(i.ee=1,i.U.ee=0,i.se()):(i.ee=1,e=r);}else {let i=r.U;if(i.ee===1)i.ee=0,r.ee=1,r===this.Y?this.Y=r.se():r.se();else if(i.U&&i.U.ee===1){i.ee=r.ee,r.ee=0,i.U.ee=0,r===this.Y?this.Y=r.se():r.se();return}else i.W&&i.W.ee===1?(i.ee=1,i.W.ee=0,i.te()):(i.ee=1,e=r);}}}fe(e){if(this.i===1)return this.clear(),this.h;let r=e;for(;r.U||r.W;){if(r.W)for(r=r.W;r.U;)r=r.U;else r=r.U;[e.u,r.u]=[r.u,e.u],[e.l,r.l]=[r.l,e.l],e=r;}this.h.U===r?this.h.U=r.tt:this.h.W===r&&(this.h.W=r.tt),this.ue(r);let i=r.tt;return r===i.U?i.U=void 0:i.W=void 0,this.i-=1,this.Y.ee=0,i}oe(e,r){return e===void 0?!1:this.oe(e.U,r)||r(e)?!0:this.oe(e.W,r)}he(e){for(;;){let r=e.tt;if(r.ee===0)return;let i=r.tt;if(r===i.U){let n=i.W;if(n&&n.ee===1){if(n.ee=r.ee=0,i===this.Y)return;i.ee=1,e=i;continue}else if(e===r.W){if(e.ee=0,e.U&&(e.U.tt=r),e.W&&(e.W.tt=i),r.W=e.U,i.U=e.W,e.U=r,e.W=i,i===this.Y)this.Y=e,this.h.tt=e;else {let o=i.tt;o.U===i?o.U=e:o.W=e;}return e.tt=i.tt,r.tt=e,i.tt=e,i.ee=1,{parentNode:r,grandParent:i,curNode:e}}else r.ee=0,i===this.Y?this.Y=i.se():i.se(),i.ee=1;}else {let n=i.U;if(n&&n.ee===1){if(n.ee=r.ee=0,i===this.Y)return;i.ee=1,e=i;continue}else if(e===r.U){if(e.ee=0,e.U&&(e.U.tt=i),e.W&&(e.W.tt=r),i.W=e.U,r.U=e.W,e.U=i,e.W=r,i===this.Y)this.Y=e,this.h.tt=e;else {let o=i.tt;o.U===i?o.U=e:o.W=e;}return e.tt=i.tt,r.tt=e,i.tt=e,i.ee=1,{parentNode:r,grandParent:i,curNode:e}}else r.ee=0,i===this.Y?this.Y=i.te():i.te(),i.ee=1;}return}}ne(e,r,i){if(this.Y===void 0){this.i+=1,this.Y=new this.re(e,r),this.Y.ee=0,this.Y.tt=this.h,this.h.tt=this.Y,this.h.U=this.Y,this.h.W=this.Y;return}let n,o=this.h.U,s=this.v(o.u,e);if(s===0){o.l=r;return}else if(s>0)o.U=new this.re(e,r),o.U.tt=o,n=o.U,this.h.U=n;else {let a=this.h.W,u=this.v(a.u,e);if(u===0){a.l=r;return}else if(u<0)a.W=new this.re(e,r),a.W.tt=a,n=a.W,this.h.W=n;else {if(i!==void 0){let c=i.o;if(c!==this.h){let h=this.v(c.u,e);if(h===0){c.l=r;return}else if(h>0){let d=c.L(),g=this.v(d.u,e);if(g===0){d.l=r;return}else g<0&&(n=new this.re(e,r),d.W===void 0?(d.W=n,n.tt=d):(c.U=n,n.tt=c));}}}if(n===void 0)for(n=this.Y;;){let c=this.v(n.u,e);if(c>0){if(n.U===void 0){n.U=new this.re(e,r),n.U.tt=n,n=n.U;break}n=n.U;}else if(c<0){if(n.W===void 0){n.W=new this.re(e,r),n.W.tt=n,n=n.W;break}n=n.W;}else {n.l=r;return}}}}return this.i+=1,n}I(e,r){for(;e;){let i=this.v(e.u,r);if(i<0)e=e.W;else if(i>0)e=e.U;else return e}return e||this.h}clear(){this.i=0,this.Y=void 0,this.h.tt=void 0,this.h.U=this.h.W=void 0;}updateKeyByIterator(e,r){let i=e.o;if(i===this.h&&(0, ap.throwIteratorAccessError)(),this.i===1)return i.u=r,!0;if(i===this.h.U)return this.v(i.B().u,r)>0?(i.u=r,!0):!1;if(i===this.h.W)return this.v(i.L().u,r)<0?(i.u=r,!0):!1;let n=i.L().u;if(this.v(n,r)>=0)return !1;let o=i.B().u;return this.v(o,r)<=0?!1:(i.u=r,!0)}eraseElementByPos(e){if(e<0||e>this.i-1)throw new RangeError;let r=0,i=this;return this.oe(this.Y,function(n){return e===r?(i.V(n),!0):(r+=1,!1)}),this.i}eraseElementByKey(e){if(this.i===0)return !1;let r=this.I(this.Y,e);return r===this.h?!1:(this.V(r),!0)}eraseElementByIterator(e){let r=e.o;r===this.h&&(0, ap.throwIteratorAccessError)();let i=r.W===void 0;return e.iteratorType===0?i&&e.next():(!i||r.U===void 0)&&e.next(),this.V(r),e}forEach(e){let r=0;for(let i of this)e(i,r++,this);}getElementByPos(e){if(e<0||e>this.i-1)throw new RangeError;let r,i=0;for(let n of this){if(i===e){r=n;break}i+=1;}return r}getHeight(){if(this.i===0)return 0;let e=function(r){return r?Math.max(e(r.U),e(r.W))+1:0};return e(this.Y)}},F1=_a;Vn.default=F1;});var Ea=M(Kn=>{v();m();_();Object.defineProperty(Kn,\"t\",{value:!0});Kn.default=void 0;var W1=at(),zn=lt(),va=class extends W1.ContainerIterator{constructor(e,r,i){super(i),this.o=e,this.h=r,this.iteratorType===0?(this.pre=function(){return this.o===this.h.U&&(0, zn.throwIteratorAccessError)(),this.o=this.o.L(),this},this.next=function(){return this.o===this.h&&(0, zn.throwIteratorAccessError)(),this.o=this.o.B(),this}):(this.pre=function(){return this.o===this.h.W&&(0, zn.throwIteratorAccessError)(),this.o=this.o.B(),this},this.next=function(){return this.o===this.h&&(0, zn.throwIteratorAccessError)(),this.o=this.o.L(),this});}get index(){let e=this.o,r=this.h.tt;if(e===this.h)return r?r.rt-1:0;let i=0;for(e.U&&(i+=e.U.rt);e!==r;){let n=e.tt;e===n.W&&(i+=1,n.U&&(i+=n.U.rt)),e=n;}return i}},$1=va;Kn.default=$1;});var up=M(Gn=>{v();m();_();Object.defineProperty(Gn,\"t\",{value:!0});Gn.default=void 0;var H1=lp(ma()),V1=lp(Ea()),z1=lt();function lp(t){return t&&t.t?t:{default:t}}var Ke=class t extends V1.default{constructor(e,r,i,n){super(e,r,n),this.container=i;}get pointer(){return this.o===this.h&&(0, z1.throwIteratorAccessError)(),this.o.u}copy(){return new t(this.o,this.h,this.container,this.iteratorType)}},Sa=class extends H1.default{constructor(e=[],r,i){super(r,i);let n=this;e.forEach(function(o){n.insert(o);});}*K(e){e!==void 0&&(yield*this.K(e.U),yield e.u,yield*this.K(e.W));}begin(){return new Ke(this.h.U||this.h,this.h,this)}end(){return new Ke(this.h,this.h,this)}rBegin(){return new Ke(this.h.W||this.h,this.h,this,1)}rEnd(){return new Ke(this.h,this.h,this,1)}front(){return this.h.U?this.h.U.u:void 0}back(){return this.h.W?this.h.W.u:void 0}insert(e,r){return this.M(e,void 0,r)}find(e){let r=this.I(this.Y,e);return new Ke(r,this.h,this)}lowerBound(e){let r=this.X(this.Y,e);return new Ke(r,this.h,this)}upperBound(e){let r=this.Z(this.Y,e);return new Ke(r,this.h,this)}reverseLowerBound(e){let r=this.$(this.Y,e);return new Ke(r,this.h,this)}reverseUpperBound(e){let r=this.rr(this.Y,e);return new Ke(r,this.h,this)}union(e){let r=this;return e.forEach(function(i){r.insert(i);}),this.i}[Symbol.iterator](){return this.K(this.Y)}},K1=Sa;Gn.default=K1;});var cp=M(Qn=>{v();m();_();Object.defineProperty(Qn,\"t\",{value:!0});Qn.default=void 0;var G1=fp(ma()),Q1=fp(Ea()),Y1=lt();function fp(t){return t&&t.t?t:{default:t}}var Ge=class t extends Q1.default{constructor(e,r,i,n){super(e,r,n),this.container=i;}get pointer(){this.o===this.h&&(0, Y1.throwIteratorAccessError)();let e=this;return new Proxy([],{get(r,i){if(i===\"0\")return e.o.u;if(i===\"1\")return e.o.l},set(r,i,n){if(i!==\"1\")throw new TypeError(\"props must be 1\");return e.o.l=n,!0}})}copy(){return new t(this.o,this.h,this.container,this.iteratorType)}},Aa=class extends G1.default{constructor(e=[],r,i){super(r,i);let n=this;e.forEach(function(o){n.setElement(o[0],o[1]);});}*K(e){e!==void 0&&(yield*this.K(e.U),yield [e.u,e.l],yield*this.K(e.W));}begin(){return new Ge(this.h.U||this.h,this.h,this)}end(){return new Ge(this.h,this.h,this)}rBegin(){return new Ge(this.h.W||this.h,this.h,this,1)}rEnd(){return new Ge(this.h,this.h,this,1)}front(){if(this.i===0)return;let e=this.h.U;return [e.u,e.l]}back(){if(this.i===0)return;let e=this.h.W;return [e.u,e.l]}lowerBound(e){let r=this.X(this.Y,e);return new Ge(r,this.h,this)}upperBound(e){let r=this.Z(this.Y,e);return new Ge(r,this.h,this)}reverseLowerBound(e){let r=this.$(this.Y,e);return new Ge(r,this.h,this)}reverseUpperBound(e){let r=this.rr(this.Y,e);return new Ge(r,this.h,this)}setElement(e,r,i){return this.M(e,r,i)}find(e){let r=this.I(this.Y,e);return new Ge(r,this.h,this)}getElementByKey(e){return this.I(this.Y,e).l}union(e){let r=this;return e.forEach(function(i){r.setElement(i[0],i[1]);}),this.i}[Symbol.iterator](){return this.K(this.Y)}},J1=Aa;Qn.default=J1;});var Ta=M(Ia=>{v();m();_();Object.defineProperty(Ia,\"t\",{value:!0});Ia.default=X1;function X1(t){let e=typeof t;return e===\"object\"&&t!==null||e===\"function\"}});var Pa=M(ei=>{v();m();_();Object.defineProperty(ei,\"t\",{value:!0});ei.HashContainerIterator=ei.HashContainer=void 0;var hp=at(),Ra=Z1(Ta()),Ti=lt();function Z1(t){return t&&t.t?t:{default:t}}var Ca=class extends hp.ContainerIterator{constructor(e,r,i){super(i),this.o=e,this.h=r,this.iteratorType===0?(this.pre=function(){return this.o.L===this.h&&(0, Ti.throwIteratorAccessError)(),this.o=this.o.L,this},this.next=function(){return this.o===this.h&&(0, Ti.throwIteratorAccessError)(),this.o=this.o.B,this}):(this.pre=function(){return this.o.B===this.h&&(0, Ti.throwIteratorAccessError)(),this.o=this.o.B,this},this.next=function(){return this.o===this.h&&(0, Ti.throwIteratorAccessError)(),this.o=this.o.L,this});}};ei.HashContainerIterator=Ca;var Ba=class extends hp.Container{constructor(){super(),this.H=[],this.g={},this.HASH_TAG=Symbol(\"@@HASH_TAG\"),Object.setPrototypeOf(this.g,null),this.h={},this.h.L=this.h.B=this.p=this._=this.h;}V(e){let{L:r,B:i}=e;r.B=i,i.L=r,e===this.p&&(this.p=i),e===this._&&(this._=r),this.i-=1;}M(e,r,i){i===void 0&&(i=(0, Ra.default)(e));let n;if(i){let o=e[this.HASH_TAG];if(o!==void 0)return this.H[o].l=r,this.i;Object.defineProperty(e,this.HASH_TAG,{value:this.H.length,configurable:!0}),n={u:e,l:r,L:this._,B:this.h},this.H.push(n);}else {let o=this.g[e];if(o)return o.l=r,this.i;n={u:e,l:r,L:this._,B:this.h},this.g[e]=n;}return this.i===0?(this.p=n,this.h.B=n):this._.B=n,this._=n,this.h.L=n,++this.i}I(e,r){if(r===void 0&&(r=(0, Ra.default)(e)),r){let i=e[this.HASH_TAG];return i===void 0?this.h:this.H[i]}else return this.g[e]||this.h}clear(){let e=this.HASH_TAG;this.H.forEach(function(r){delete r.u[e];}),this.H=[],this.g={},Object.setPrototypeOf(this.g,null),this.i=0,this.p=this._=this.h.L=this.h.B=this.h;}eraseElementByKey(e,r){let i;if(r===void 0&&(r=(0, Ra.default)(e)),r){let n=e[this.HASH_TAG];if(n===void 0)return !1;delete e[this.HASH_TAG],i=this.H[n],delete this.H[n];}else {if(i=this.g[e],i===void 0)return !1;delete this.g[e];}return this.V(i),!0}eraseElementByIterator(e){let r=e.o;return r===this.h&&(0, Ti.throwIteratorAccessError)(),this.V(r),e.next()}eraseElementByPos(e){if(e<0||e>this.i-1)throw new RangeError;let r=this.p;for(;e--;)r=r.B;return this.V(r),this.i}};ei.HashContainer=Ba;});var pp=M(Yn=>{v();m();_();Object.defineProperty(Yn,\"t\",{value:!0});Yn.default=void 0;var dp=Pa(),ev=lt(),Er=class t extends dp.HashContainerIterator{constructor(e,r,i,n){super(e,r,n),this.container=i;}get pointer(){return this.o===this.h&&(0, ev.throwIteratorAccessError)(),this.o.u}copy(){return new t(this.o,this.h,this.container,this.iteratorType)}},Oa=class extends dp.HashContainer{constructor(e=[]){super();let r=this;e.forEach(function(i){r.insert(i);});}begin(){return new Er(this.p,this.h,this)}end(){return new Er(this.h,this.h,this)}rBegin(){return new Er(this._,this.h,this,1)}rEnd(){return new Er(this.h,this.h,this,1)}front(){return this.p.u}back(){return this._.u}insert(e,r){return this.M(e,void 0,r)}getElementByPos(e){if(e<0||e>this.i-1)throw new RangeError;let r=this.p;for(;e--;)r=r.B;return r.u}find(e,r){let i=this.I(e,r);return new Er(i,this.h,this)}forEach(e){let r=0,i=this.p;for(;i!==this.h;)e(i.u,r++,this),i=i.B;}[Symbol.iterator](){return function*(){let e=this.p;for(;e!==this.h;)yield e.u,e=e.B;}.bind(this)()}},tv=Oa;Yn.default=tv;});var yp=M(Jn=>{v();m();_();Object.defineProperty(Jn,\"t\",{value:!0});Jn.default=void 0;var gp=Pa(),rv=nv(Ta()),iv=lt();function nv(t){return t&&t.t?t:{default:t}}var Sr=class t extends gp.HashContainerIterator{constructor(e,r,i,n){super(e,r,n),this.container=i;}get pointer(){this.o===this.h&&(0, iv.throwIteratorAccessError)();let e=this;return new Proxy([],{get(r,i){if(i===\"0\")return e.o.u;if(i===\"1\")return e.o.l},set(r,i,n){if(i!==\"1\")throw new TypeError(\"props must be 1\");return e.o.l=n,!0}})}copy(){return new t(this.o,this.h,this.container,this.iteratorType)}},ka=class extends gp.HashContainer{constructor(e=[]){super();let r=this;e.forEach(function(i){r.setElement(i[0],i[1]);});}begin(){return new Sr(this.p,this.h,this)}end(){return new Sr(this.h,this.h,this)}rBegin(){return new Sr(this._,this.h,this,1)}rEnd(){return new Sr(this.h,this.h,this,1)}front(){if(this.i!==0)return [this.p.u,this.p.l]}back(){if(this.i!==0)return [this._.u,this._.l]}setElement(e,r,i){return this.M(e,r,i)}getElementByKey(e,r){if(r===void 0&&(r=(0, rv.default)(e)),r){let n=e[this.HASH_TAG];return n!==void 0?this.H[n].l:void 0}let i=this.g[e];return i?i.l:void 0}getElementByPos(e){if(e<0||e>this.i-1)throw new RangeError;let r=this.p;for(;e--;)r=r.B;return [r.u,r.l]}find(e,r){let i=this.I(e,r);return new Sr(i,this.h,this)}forEach(e){let r=0,i=this.p;for(;i!==this.h;)e([i.u,i.l],r++,this),i=i.B;}[Symbol.iterator](){return function*(){let e=this.p;for(;e!==this.h;)yield [e.u,e.l],e=e.B;}.bind(this)()}},sv=ka;Jn.default=sv;});var bp=M(je=>{v();m();_();Object.defineProperty(je,\"t\",{value:!0});Object.defineProperty(je,\"Deque\",{enumerable:!0,get:function(){return cv.default}});Object.defineProperty(je,\"HashMap\",{enumerable:!0,get:function(){return gv.default}});Object.defineProperty(je,\"HashSet\",{enumerable:!0,get:function(){return pv.default}});Object.defineProperty(je,\"LinkList\",{enumerable:!0,get:function(){return fv.default}});Object.defineProperty(je,\"OrderedMap\",{enumerable:!0,get:function(){return dv.default}});Object.defineProperty(je,\"OrderedSet\",{enumerable:!0,get:function(){return hv.default}});Object.defineProperty(je,\"PriorityQueue\",{enumerable:!0,get:function(){return lv.default}});Object.defineProperty(je,\"Queue\",{enumerable:!0,get:function(){return av.default}});Object.defineProperty(je,\"Stack\",{enumerable:!0,get:function(){return ov.default}});Object.defineProperty(je,\"Vector\",{enumerable:!0,get:function(){return uv.default}});var ov=ut(Zd()),av=ut(ep()),lv=ut(tp()),uv=ut(rp()),fv=ut(ip()),cv=ut(np()),hv=ut(up()),dv=ut(cp()),pv=ut(pp()),gv=ut(yp());function ut(t){return t&&t.t?t:{default:t}}});var _p=M((mN,wp)=>{v();m();_();var yv=bp().OrderedSet,ft=ot()(\"number-allocator:trace\"),bv=ot()(\"number-allocator:error\");function Te(t,e){this.low=t,this.high=e;}Te.prototype.equals=function(t){return this.low===t.low&&this.high===t.high};Te.prototype.compare=function(t){return this.lowr.compare(i)),ft(\"Create\"),this.clear();}ct.prototype.firstVacant=function(){return this.ss.size()===0?null:this.ss.front().low};ct.prototype.alloc=function(){if(this.ss.size()===0)return ft(\"alloc():empty\"),null;let t=this.ss.begin(),e=t.pointer.low,r=t.pointer.high,i=e;return i+1<=r?this.ss.updateKeyByIterator(t,new Te(e+1,r)):this.ss.eraseElementByPos(0),ft(\"alloc():\"+i),i};ct.prototype.use=function(t){let e=new Te(t,t),r=this.ss.lowerBound(e);if(!r.equals(this.ss.end())){let i=r.pointer.low,n=r.pointer.high;return r.pointer.equals(e)?(this.ss.eraseElementByIterator(r),ft(\"use():\"+t),!0):i>t?!1:i===t?(this.ss.updateKeyByIterator(r,new Te(i+1,n)),ft(\"use():\"+t),!0):n===t?(this.ss.updateKeyByIterator(r,new Te(i,n-1)),ft(\"use():\"+t),!0):(this.ss.updateKeyByIterator(r,new Te(t+1,n)),this.ss.insert(new Te(i,t-1)),ft(\"use():\"+t),!0)}return ft(\"use():failed\"),!1};ct.prototype.free=function(t){if(tthis.max){bv(\"free():\"+t+\" is out of range\");return}let e=new Te(t,t),r=this.ss.upperBound(e);if(r.equals(this.ss.end())){if(r.equals(this.ss.begin())){this.ss.insert(e);return}r.pre();let i=r.pointer.high;r.pointer.high+1===t?this.ss.updateKeyByIterator(r,new Te(i,t)):this.ss.insert(e);}else if(r.equals(this.ss.begin()))if(t+1===r.pointer.low){let i=r.pointer.high;this.ss.updateKeyByIterator(r,new Te(t,i));}else this.ss.insert(e);else {let i=r.pointer.low,n=r.pointer.high;r.pre();let o=r.pointer.low;r.pointer.high+1===t?t+1===i?(this.ss.eraseElementByIterator(r),this.ss.updateKeyByIterator(r,new Te(o,n))):this.ss.updateKeyByIterator(r,new Te(o,t)):t+1===i?(this.ss.eraseElementByIterator(r.next()),this.ss.insert(new Te(t,n))):this.ss.insert(e);}ft(\"free():\"+t);};ct.prototype.clear=function(){ft(\"clear()\"),this.ss.clear(),this.ss.insert(new Te(this.min,this.max));};ct.prototype.intervalCount=function(){return this.ss.size()};ct.prototype.dump=function(){console.log(\"length:\"+this.ss.size());for(let t of this.ss)console.log(t);};wp.exports=ct;});var xa=M((PN,mp)=>{v();m();_();var wv=_p();mp.exports.NumberAllocator=wv;});var vp=M(La=>{v();m();_();Object.defineProperty(La,\"__esModule\",{value:!0});var _v=Xd(),mv=xa(),Ma=class{constructor(e){e>0&&(this.aliasToTopic=new _v.LRUCache({max:e}),this.topicToAlias={},this.numberAllocator=new mv.NumberAllocator(1,e),this.max=e,this.length=0);}put(e,r){if(r===0||r>this.max)return !1;let i=this.aliasToTopic.get(r);return i&&delete this.topicToAlias[i],this.aliasToTopic.set(r,e),this.topicToAlias[e]=r,this.numberAllocator.use(r),this.length=this.aliasToTopic.size,!0}getTopicByAlias(e){return this.aliasToTopic.get(e)}getAliasByTopic(e){let r=this.topicToAlias[e];return typeof r<\"u\"&&this.aliasToTopic.get(r),r}clear(){this.aliasToTopic.clear(),this.topicToAlias={},this.numberAllocator.clear(),this.length=0;}getLruAlias(){let e=this.numberAllocator.firstVacant();return e||[...this.aliasToTopic.keys()][this.aliasToTopic.size-1]}};La.default=Ma;});var Ep=M(Ri=>{v();m();_();var vv=Ri&&Ri.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Ri,\"__esModule\",{value:!0});var Ev=Ai(),Sv=vv(vp()),Av=Jr(),Iv=(t,e)=>{t.log(\"_handleConnack\");let{options:r}=t,n=r.protocolVersion===5?e.reasonCode:e.returnCode;if(clearTimeout(t.connackTimer),delete t.topicAliasSend,e.properties){if(e.properties.topicAliasMaximum){if(e.properties.topicAliasMaximum>65535){t.emit(\"error\",new Error(\"topicAliasMaximum from broker is out of range\"));return}e.properties.topicAliasMaximum>0&&(t.topicAliasSend=new Sv.default(e.properties.topicAliasMaximum));}e.properties.serverKeepAlive&&r.keepalive&&(r.keepalive=e.properties.serverKeepAlive,t._shiftPingInterval()),e.properties.maximumPacketSize&&(r.properties||(r.properties={}),r.properties.maximumPacketSize=e.properties.maximumPacketSize);}if(n===0)t.reconnecting=!1,t._onConnect(e);else if(n>0){let o=new Av.ErrorWithReasonCode(`Connection refused: ${Ev.ReasonCodes[n]}`,n);t.emit(\"error\",o);}};Ri.default=Iv;});var Sp=M(Ua=>{v();m();_();Object.defineProperty(Ua,\"__esModule\",{value:!0});var Tv=(t,e,r)=>{t.log(\"handling pubrel packet\");let i=typeof r<\"u\"?r:t.noop,{messageId:n}=e,o={cmd:\"pubcomp\",messageId:n};t.incomingStore.get(e,(s,a)=>{s?t._sendPacket(o,i):(t.emit(\"message\",a.topic,a.payload,a),t.handleMessage(a,u=>{if(u)return i(u);t.incomingStore.del(a,t.noop),t._sendPacket(o,i);}));});};Ua.default=Tv;});var Ap=M(Ci=>{v();m();_();var Bi=Ci&&Ci.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Ci,\"__esModule\",{value:!0});var Rv=Bi(Vd()),Cv=Bi(Kd()),Bv=Bi(Ep()),Pv=Bi(Ai()),Ov=Bi(Sp()),kv=(t,e,r)=>{let{options:i}=t;if(i.protocolVersion===5&&i.properties&&i.properties.maximumPacketSize&&i.properties.maximumPacketSize{v();m();_();var xv=ti&&ti.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(ti,\"__esModule\",{value:!0});ti.TypedEventEmitter=void 0;var Mv=xv((ir(),X(rr))),Lv=Jr(),Xn=class{};ti.TypedEventEmitter=Xn;(0, Lv.applyMixin)(Xn,Mv.default);});var Pi=M(Ar=>{v();m();_();Object.defineProperty(Ar,\"__esModule\",{value:!0});Ar.isReactNativeBrowser=Ar.isWebWorker=void 0;var Uv=()=>typeof window<\"u\"&&typeof window.document<\"u\",Tp=()=>{var t,e;return !!(typeof self==\"object\"&&(!((e=(t=self?.constructor)===null||t===void 0?void 0:t.name)===null||e===void 0)&&e.includes(\"WorkerGlobalScope\")))},Rp=()=>typeof B<\"u\"&&B.product===\"ReactNative\",Nv=Uv()||Tp()||Rp();Ar.isWebWorker=Tp();Ar.isReactNativeBrowser=Rp();Ar.default=Nv;});var Bp=M((Zn,Cp)=>{v();m();_();(function(t,e){typeof Zn==\"object\"&&typeof Cp<\"u\"?e(Zn):typeof define==\"function\"&&define.amd?define([\"exports\"],e):(t=typeof globalThis<\"u\"?globalThis:t||self,e(t.fastUniqueNumbers={}));})(Zn,function(t){var e=function(g){return function(y){var w=g(y);return y.add(w),w}},r=function(g){return function(y,w){return g.set(y,w),w}},i=Number.MAX_SAFE_INTEGER===void 0?9007199254740991:Number.MAX_SAFE_INTEGER,n=536870912,o=n*2,s=function(g,y){return function(w){var E=y.get(w),S=E===void 0?w.size:Ei)throw new Error(\"Congratulations, you created a collection of unique numbers which uses all available integers!\");for(;w.has(S);)S=Math.floor(Math.random()*i);return g(w,S)}},a=new WeakMap,u=r(a),c=s(u,a),h=e(c);t.addUniqueNumber=h,t.generateUniqueNumber=c;});});var Op=M((es,Pp)=>{v();m();_();(function(t,e){typeof es==\"object\"&&typeof Pp<\"u\"?e(es,Bp()):typeof define==\"function\"&&define.amd?define([\"exports\",\"fast-unique-numbers\"],e):(t=typeof globalThis<\"u\"?globalThis:t||self,e(t.workerTimersBroker={},t.fastUniqueNumbers));})(es,function(t,e){var r=function(s){return s.method!==void 0&&s.method===\"call\"},i=function(s){return s.error===null&&typeof s.id==\"number\"},n=function(s){var a=new Map([[0,function(){}]]),u=new Map([[0,function(){}]]),c=new Map,h=new Worker(s);h.addEventListener(\"message\",function(E){var S=E.data;if(r(S)){var I=S.params,C=I.timerId,R=I.timerType;if(R===\"interval\"){var U=a.get(C);if(typeof U==\"number\"){var N=c.get(U);if(N===void 0||N.timerId!==C||N.timerType!==R)throw new Error(\"The timer is in an undefined state.\")}else if(typeof U<\"u\")U();else throw new Error(\"The timer is in an undefined state.\")}else if(R===\"timeout\"){var W=u.get(C);if(typeof W==\"number\"){var K=c.get(W);if(K===void 0||K.timerId!==C||K.timerType!==R)throw new Error(\"The timer is in an undefined state.\")}else if(typeof W<\"u\")W(),u.delete(C);else throw new Error(\"The timer is in an undefined state.\")}}else if(i(S)){var z=S.id,Q=c.get(z);if(Q===void 0)throw new Error(\"The timer is in an undefined state.\");var de=Q.timerId,Gt=Q.timerType;c.delete(z),Gt===\"interval\"?a.delete(de):u.delete(de);}else {var pe=S.error.message;throw new Error(pe)}});var d=function(S){var I=e.generateUniqueNumber(c);c.set(I,{timerId:S,timerType:\"interval\"}),a.set(S,I),h.postMessage({id:I,method:\"clear\",params:{timerId:S,timerType:\"interval\"}});},g=function(S){var I=e.generateUniqueNumber(c);c.set(I,{timerId:S,timerType:\"timeout\"}),u.set(S,I),h.postMessage({id:I,method:\"clear\",params:{timerId:S,timerType:\"timeout\"}});},y=function(S){var I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,C=e.generateUniqueNumber(a);return a.set(C,function(){S(),typeof a.get(C)==\"function\"&&h.postMessage({id:null,method:\"set\",params:{delay:I,now:performance.now(),timerId:C,timerType:\"interval\"}});}),h.postMessage({id:null,method:\"set\",params:{delay:I,now:performance.now(),timerId:C,timerType:\"interval\"}}),C},w=function(S){var I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,C=e.generateUniqueNumber(u);return u.set(C,S),h.postMessage({id:null,method:\"set\",params:{delay:I,now:performance.now(),timerId:C,timerType:\"timeout\"}}),C};return {clearInterval:d,clearTimeout:g,setInterval:y,setTimeout:w}};t.load=n;});});var xp=M((ts,kp)=>{v();m();_();(function(t,e){typeof ts==\"object\"&&typeof kp<\"u\"?e(ts,Op()):typeof define==\"function\"&&define.amd?define([\"exports\",\"worker-timers-broker\"],e):(t=typeof globalThis<\"u\"?globalThis:t||self,e(t.workerTimers={},t.workerTimersBroker));})(ts,function(t,e){var r=function(h,d){var g=null;return function(){if(g!==null)return g;var y=new Blob([d],{type:\"application/javascript; charset=utf-8\"}),w=URL.createObjectURL(y);return g=h(w),setTimeout(function(){return URL.revokeObjectURL(w)}),g}},i=`(()=>{var e={472:(e,t,r)=>{var o,i;void 0===(i=\"function\"==typeof(o=function(){\"use strict\";var e=new Map,t=new Map,r=function(t){var r=e.get(t);if(void 0===r)throw new Error('There is no interval scheduled with the given id \"'.concat(t,'\".'));clearTimeout(r),e.delete(t)},o=function(e){var r=t.get(e);if(void 0===r)throw new Error('There is no timeout scheduled with the given id \"'.concat(e,'\".'));clearTimeout(r),t.delete(e)},i=function(e,t){var r,o=performance.now();return{expected:o+(r=e-Math.max(0,o-t)),remainingDelay:r}},n=function e(t,r,o,i){var n=performance.now();n>o?postMessage({id:null,method:\"call\",params:{timerId:r,timerType:i}}):t.set(r,setTimeout(e,o-n,t,r,o,i))},a=function(t,r,o){var a=i(t,o),s=a.expected,d=a.remainingDelay;e.set(r,setTimeout(n,d,e,r,s,\"interval\"))},s=function(e,r,o){var a=i(e,o),s=a.expected,d=a.remainingDelay;t.set(r,setTimeout(n,d,t,r,s,\"timeout\"))};addEventListener(\"message\",(function(e){var t=e.data;try{if(\"clear\"===t.method){var i=t.id,n=t.params,d=n.timerId,c=n.timerType;if(\"interval\"===c)r(d),postMessage({error:null,id:i});else{if(\"timeout\"!==c)throw new Error('The given type \"'.concat(c,'\" is not supported'));o(d),postMessage({error:null,id:i})}}else{if(\"set\"!==t.method)throw new Error('The given method \"'.concat(t.method,'\" is not supported'));var u=t.params,l=u.delay,p=u.now,m=u.timerId,v=u.timerType;if(\"interval\"===v)a(l,m,p);else{if(\"timeout\"!==v)throw new Error('The given type \"'.concat(v,'\" is not supported'));s(l,m,p)}}}catch(e){postMessage({error:{message:e.message},id:t.id,result:null})}}))})?o.call(t,r,t,e):o)||(e.exports=i)}},t={};function r(o){var i=t[o];if(void 0!==i)return i.exports;var n=t[o]={exports:{}};return e[o](n,n.exports,r),n.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var o in t)r.o(t,o)&&!r.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{\"use strict\";r(472)})()})();`,n=r(e.load,i),o=function(h){return n().clearInterval(h)},s=function(h){return n().clearTimeout(h)},a=function(){var h;return (h=n()).setInterval.apply(h,arguments)},u=function(){var h;return (h=n()).setTimeout.apply(h,arguments)};t.clearInterval=o,t.clearTimeout=s,t.setInterval=a,t.setTimeout=u;});});var Np=M(Rt=>{v();m();_();var qv=Rt&&Rt.__createBinding||(Object.create?function(t,e,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(e,r);(!n||(\"get\"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,i,n);}:function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r];}),Dv=Rt&&Rt.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,\"default\",{enumerable:!0,value:e});}:function(t,e){t.default=e;}),jv=Rt&&Rt.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!==\"default\"&&Object.prototype.hasOwnProperty.call(t,r)&&qv(e,t,r);return Dv(e,t),e};Object.defineProperty(Rt,\"__esModule\",{value:!0});var Na=jv(Pi()),Mp=xp(),Lp={set:Mp.setTimeout,clear:Mp.clearTimeout},Up={set:(t,e)=>setTimeout(t,e),clear:t=>clearTimeout(t)},Fv=t=>{switch(t){case\"native\":return Up;case\"worker\":return Lp;case\"auto\":default:return Na.default&&!Na.isWebWorker&&!Na.isReactNativeBrowser?Lp:Up}};Rt.default=Fv;});var Da=M(Oi=>{v();m();_();var Wv=Oi&&Oi.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Oi,\"__esModule\",{value:!0});var $v=Wv(Np()),qa=class{constructor(e,r,i){this.keepalive=e*1e3,this.checkPing=r,this.timer=(0, $v.default)(i),this.reschedule();}clear(){this.timerId&&(this.timer.clear(this.timerId),this.timerId=null);}reschedule(){this.clear(),this.timerId=this.timer.set(()=>{this.checkPing(),this.timerId&&this.reschedule();},this.keepalive);}};Oi.default=qa;});var ns=M(Qe=>{v();m();_();var Hv=Qe&&Qe.__createBinding||(Object.create?function(t,e,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(e,r);(!n||(\"get\"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,i,n);}:function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r];}),Vv=Qe&&Qe.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,\"default\",{enumerable:!0,value:e});}:function(t,e){t.default=e;}),Wp=Qe&&Qe.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!==\"default\"&&Object.prototype.hasOwnProperty.call(t,r)&&Hv(e,t,r);return Vv(e,t),e},Vt=Qe&&Qe.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Qe,\"__esModule\",{value:!0});var zv=Vt(Gu()),ja=Vt(Nd()),Kv=Vt(Yo()),Gv=Dt(),qp=Vt(Fd()),Dp=Wp($d()),Qv=Vt(ot()),rs=Vt(Zo()),Yv=Vt(Ap()),Wa=Jr(),Jv=Ip(),Xv=Vt(Da()),jp=Wp(Pi()),Fa=globalThis.setImmediate||((...t)=>{let e=t.shift();(0, Wa.nextTick)(()=>{e(...t);});}),Fp={keepalive:60,reschedulePings:!0,protocolId:\"MQTT\",protocolVersion:4,reconnectPeriod:1e3,connectTimeout:30*1e3,clean:!0,resubscribe:!0,writeCache:!0,timerVariant:\"auto\"},is=class t extends Jv.TypedEventEmitter{static defaultId(){return `mqttjs_${Math.random().toString(16).substr(2,8)}`}constructor(e,r){super(),this.options=r||{};for(let i in Fp)typeof this.options[i]>\"u\"?this.options[i]=Fp[i]:this.options[i]=r[i];this.log=this.options.log||(0, Qv.default)(\"mqttjs:client\"),this.noop=this._noop.bind(this),this.log(\"MqttClient :: version:\",t.VERSION),jp.isWebWorker?this.log(\"MqttClient :: environment\",\"webworker\"):this.log(\"MqttClient :: environment\",jp.default?\"browser\":\"node\"),this.log(\"MqttClient :: options.protocol\",r.protocol),this.log(\"MqttClient :: options.protocolVersion\",r.protocolVersion),this.log(\"MqttClient :: options.username\",r.username),this.log(\"MqttClient :: options.keepalive\",r.keepalive),this.log(\"MqttClient :: options.reconnectPeriod\",r.reconnectPeriod),this.log(\"MqttClient :: options.rejectUnauthorized\",r.rejectUnauthorized),this.log(\"MqttClient :: options.properties.topicAliasMaximum\",r.properties?r.properties.topicAliasMaximum:void 0),this.options.clientId=typeof r.clientId==\"string\"?r.clientId:t.defaultId(),this.log(\"MqttClient :: clientId\",this.options.clientId),this.options.customHandleAcks=r.protocolVersion===5&&r.customHandleAcks?r.customHandleAcks:(...i)=>{i[3](null,0);},this.options.writeCache||(ja.default.writeToStream.cacheNumbers=!1),this.streamBuilder=e,this.messageIdProvider=typeof this.options.messageIdProvider>\"u\"?new Kv.default:this.options.messageIdProvider,this.outgoingStore=r.outgoingStore||new rs.default,this.incomingStore=r.incomingStore||new rs.default,this.queueQoSZero=r.queueQoSZero===void 0?!0:r.queueQoSZero,this._resubscribeTopics={},this.messageIdToTopic={},this.pingTimer=null,this.connected=!1,this.disconnecting=!1,this.reconnecting=!1,this.queue=[],this.connackTimer=null,this.reconnectTimer=null,this._storeProcessing=!1,this._packetIdsDuringStoreProcessing={},this._storeProcessingQueue=[],this.outgoing={},this._firstConnection=!0,r.properties&&r.properties.topicAliasMaximum>0&&(r.properties.topicAliasMaximum>65535?this.log(\"MqttClient :: options.properties.topicAliasMaximum is out of range\"):this.topicAliasRecv=new zv.default(r.properties.topicAliasMaximum)),this.on(\"connect\",()=>{let{queue:i}=this,n=()=>{let o=i.shift();this.log(\"deliver :: entry %o\",o);let s=null;if(!o){this._resubscribe();return}s=o.packet,this.log(\"deliver :: call _sendPacket for %o\",s);let a=!0;s.messageId&&s.messageId!==0&&(this.messageIdProvider.register(s.messageId)||(a=!1)),a?this._sendPacket(s,u=>{o.cb&&o.cb(u),n();}):(this.log(\"messageId: %d has already used. The message is skipped and removed.\",s.messageId),n());};this.log(\"connect :: sending queued packets\"),n();}),this.on(\"close\",()=>{this.log(\"close :: connected set to `false`\"),this.connected=!1,this.log(\"close :: clearing connackTimer\"),clearTimeout(this.connackTimer),this.log(\"close :: clearing ping timer\"),this.pingTimer&&(this.pingTimer.clear(),this.pingTimer=null),this.topicAliasRecv&&this.topicAliasRecv.clear(),this.log(\"close :: calling _setupReconnect\"),this._setupReconnect();}),this.options.manualConnect||(this.log(\"MqttClient :: setting up stream\"),this.connect());}handleAuth(e,r){r();}handleMessage(e,r){r();}_nextId(){return this.messageIdProvider.allocate()}getLastMessageId(){return this.messageIdProvider.getLastAllocated()}connect(){var e;let r=new Gv.Writable,i=ja.default.parser(this.options),n=null,o=[];this.log(\"connect :: calling method to clear reconnect\"),this._clearReconnect(),this.log(\"connect :: using streamBuilder provided to client to create stream\"),this.stream=this.streamBuilder(this),i.on(\"packet\",h=>{this.log(\"parser :: on packet push to packets array.\"),o.push(h);});let s=()=>{this.log(\"work :: getting next packet in queue\");let h=o.shift();if(h)this.log(\"work :: packet pulled from queue\"),(0, Yv.default)(this,h,a);else {this.log(\"work :: no packets in queue\");let d=n;n=null,this.log(\"work :: done flag is %s\",!!d),d&&d();}},a=()=>{if(o.length)(0, Wa.nextTick)(s);else {let h=n;n=null,h();}};r._write=(h,d,g)=>{n=g,this.log(\"writable stream :: parsing buffer\"),i.parse(h),s();};let u=h=>{this.log(\"streamErrorHandler :: error\",h.message),h.code?(this.log(\"streamErrorHandler :: emitting error\"),this.emit(\"error\",h)):this.noop(h);};this.log(\"connect :: pipe stream to writable stream\"),this.stream.pipe(r),this.stream.on(\"error\",u),this.stream.on(\"close\",()=>{this.log(\"(%s)stream :: on close\",this.options.clientId),this._flushVolatile(),this.log(\"stream: emit close to MqttClient\"),this.emit(\"close\");}),this.log(\"connect: sending packet `connect`\");let c={cmd:\"connect\",protocolId:this.options.protocolId,protocolVersion:this.options.protocolVersion,clean:this.options.clean,clientId:this.options.clientId,keepalive:this.options.keepalive,username:this.options.username,password:this.options.password,properties:this.options.properties};if(this.options.will&&(c.will=Object.assign(Object.assign({},this.options.will),{payload:(e=this.options.will)===null||e===void 0?void 0:e.payload})),this.topicAliasRecv&&(c.properties||(c.properties={}),this.topicAliasRecv&&(c.properties.topicAliasMaximum=this.topicAliasRecv.max)),this._writePacket(c),i.on(\"error\",this.emit.bind(this,\"error\")),this.options.properties){if(!this.options.properties.authenticationMethod&&this.options.properties.authenticationData)return this.end(()=>this.emit(\"error\",new Error(\"Packet has no Authentication Method\"))),this;if(this.options.properties.authenticationMethod&&this.options.authPacket&&typeof this.options.authPacket==\"object\"){let h=Object.assign({cmd:\"auth\",reasonCode:0},this.options.authPacket);this._writePacket(h);}}return this.stream.setMaxListeners(1e3),clearTimeout(this.connackTimer),this.connackTimer=setTimeout(()=>{this.log(\"!!connectTimeout hit!! Calling _cleanUp with force `true`\"),this.emit(\"error\",new Error(\"connack timeout\")),this._cleanUp(!0);},this.options.connectTimeout),this}publish(e,r,i,n){this.log(\"publish :: message `%s` to topic `%s`\",r,e);let{options:o}=this;typeof i==\"function\"&&(n=i,i=null),i=i||{},i=Object.assign(Object.assign({},{qos:0,retain:!1,dup:!1}),i);let{qos:a,retain:u,dup:c,properties:h,cbStorePut:d}=i;if(this._checkDisconnecting(n))return this;let g=()=>{let y=0;if((a===1||a===2)&&(y=this._nextId(),y===null))return this.log(\"No messageId left\"),!1;let w={cmd:\"publish\",topic:e,payload:r,qos:a,retain:u,messageId:y,dup:c};switch(o.protocolVersion===5&&(w.properties=h),this.log(\"publish :: qos\",a),a){case 1:case 2:this.outgoing[w.messageId]={volatile:!1,cb:n||this.noop},this.log(\"MqttClient:publish: packet cmd: %s\",w.cmd),this._sendPacket(w,void 0,d);break;default:this.log(\"MqttClient:publish: packet cmd: %s\",w.cmd),this._sendPacket(w,n,d);break}return !0};return (this._storeProcessing||this._storeProcessingQueue.length>0||!g())&&this._storeProcessingQueue.push({invoke:g,cbStorePut:i.cbStorePut,callback:n}),this}publishAsync(e,r,i){return new Promise((n,o)=>{this.publish(e,r,i,(s,a)=>{s?o(s):n(a);});})}subscribe(e,r,i){let n=this.options.protocolVersion;typeof r==\"function\"&&(i=r),i=i||this.noop;let o=!1,s=[];typeof e==\"string\"?(e=[e],s=e):Array.isArray(e)?s=e:typeof e==\"object\"&&(o=e.resubscribe,delete e.resubscribe,s=Object.keys(e));let a=Dp.validateTopics(s);if(a!==null)return Fa(i,new Error(`Invalid topic ${a}`)),this;if(this._checkDisconnecting(i))return this.log(\"subscribe: discconecting true\"),this;let u={qos:0};n===5&&(u.nl=!1,u.rap=!1,u.rh=0),r=Object.assign(Object.assign({},u),r);let c=r.properties,h=[],d=(y,w)=>{if(w=w||r,!Object.prototype.hasOwnProperty.call(this._resubscribeTopics,y)||this._resubscribeTopics[y].qos{this.log(\"subscribe: array topic %s\",y),d(y);}):Object.keys(e).forEach(y=>{this.log(\"subscribe: object topic %s, %o\",y,e[y]),d(y,e[y]);}),!h.length)return i(null,[]),this;let g=()=>{let y=this._nextId();if(y===null)return this.log(\"No messageId left\"),!1;let w={cmd:\"subscribe\",subscriptions:h,messageId:y};if(c&&(w.properties=c),this.options.resubscribe){this.log(\"subscribe :: resubscribe true\");let E=[];h.forEach(S=>{if(this.options.reconnectPeriod>0){let I={qos:S.qos};n===5&&(I.nl=S.nl||!1,I.rap=S.rap||!1,I.rh=S.rh||0,I.properties=S.properties),this._resubscribeTopics[S.topic]=I,E.push(S.topic);}}),this.messageIdToTopic[w.messageId]=E;}return this.outgoing[w.messageId]={volatile:!0,cb(E,S){if(!E){let{granted:I}=S;for(let C=0;C0||!g())&&this._storeProcessingQueue.push({invoke:g,callback:i}),this}subscribeAsync(e,r){return new Promise((i,n)=>{this.subscribe(e,r,(o,s)=>{o?n(o):i(s);});})}unsubscribe(e,r,i){typeof e==\"string\"&&(e=[e]),typeof r==\"function\"&&(i=r),i=i||this.noop;let n=Dp.validateTopics(e);if(n!==null)return Fa(i,new Error(`Invalid topic ${n}`)),this;if(this._checkDisconnecting(i))return this;let o=()=>{let s=this._nextId();if(s===null)return this.log(\"No messageId left\"),!1;let a={cmd:\"unsubscribe\",messageId:s,unsubscriptions:[]};return typeof e==\"string\"?a.unsubscriptions=[e]:Array.isArray(e)&&(a.unsubscriptions=e),this.options.resubscribe&&a.unsubscriptions.forEach(u=>{delete this._resubscribeTopics[u];}),typeof r==\"object\"&&r.properties&&(a.properties=r.properties),this.outgoing[a.messageId]={volatile:!0,cb:i},this.log(\"unsubscribe: call _sendPacket\"),this._sendPacket(a),!0};return (this._storeProcessing||this._storeProcessingQueue.length>0||!o())&&this._storeProcessingQueue.push({invoke:o,callback:i}),this}unsubscribeAsync(e,r){return new Promise((i,n)=>{this.unsubscribe(e,r,(o,s)=>{o?n(o):i(s);});})}end(e,r,i){this.log(\"end :: (%s)\",this.options.clientId),(e==null||typeof e!=\"boolean\")&&(i=i||r,r=e,e=!1),typeof r!=\"object\"&&(i=i||r,r=null),this.log(\"end :: cb? %s\",!!i),(!i||typeof i!=\"function\")&&(i=this.noop);let n=()=>{this.log(\"end :: closeStores: closing incoming and outgoing stores\"),this.disconnected=!0,this.incomingStore.close(s=>{this.outgoingStore.close(a=>{if(this.log(\"end :: closeStores: emitting end\"),this.emit(\"end\"),i){let u=s||a;this.log(\"end :: closeStores: invoking callback with args\"),i(u);}});}),this._deferredReconnect&&this._deferredReconnect();},o=()=>{this.log(\"end :: (%s) :: finish :: calling _cleanUp with force %s\",this.options.clientId,e),this._cleanUp(e,()=>{this.log(\"end :: finish :: calling process.nextTick on closeStores\"),(0, Wa.nextTick)(n);},r);};return this.disconnecting?(i(),this):(this._clearReconnect(),this.disconnecting=!0,!e&&Object.keys(this.outgoing).length>0?(this.log(\"end :: (%s) :: calling finish in 10ms once outgoing is empty\",this.options.clientId),this.once(\"outgoingEmpty\",setTimeout.bind(null,o,10))):(this.log(\"end :: (%s) :: immediately calling finish\",this.options.clientId),o()),this)}endAsync(e,r){return new Promise((i,n)=>{this.end(e,r,o=>{o?n(o):i();});})}removeOutgoingMessage(e){if(this.outgoing[e]){let{cb:r}=this.outgoing[e];this._removeOutgoingAndStoreMessage(e,()=>{r(new Error(\"Message removed\"));});}return this}reconnect(e){this.log(\"client reconnect\");let r=()=>{e?(this.options.incomingStore=e.incomingStore,this.options.outgoingStore=e.outgoingStore):(this.options.incomingStore=null,this.options.outgoingStore=null),this.incomingStore=this.options.incomingStore||new rs.default,this.outgoingStore=this.options.outgoingStore||new rs.default,this.disconnecting=!1,this.disconnected=!1,this._deferredReconnect=null,this._reconnect();};return this.disconnecting&&!this.disconnected?this._deferredReconnect=r:r(),this}_flushVolatile(){this.outgoing&&(this.log(\"_flushVolatile :: deleting volatile messages from the queue and setting their callbacks as error function\"),Object.keys(this.outgoing).forEach(e=>{this.outgoing[e].volatile&&typeof this.outgoing[e].cb==\"function\"&&(this.outgoing[e].cb(new Error(\"Connection closed\")),delete this.outgoing[e]);}));}_flush(){this.outgoing&&(this.log(\"_flush: queue exists? %b\",!!this.outgoing),Object.keys(this.outgoing).forEach(e=>{typeof this.outgoing[e].cb==\"function\"&&(this.outgoing[e].cb(new Error(\"Connection closed\")),delete this.outgoing[e]);}));}_removeTopicAliasAndRecoverTopicName(e){let r;e.properties&&(r=e.properties.topicAlias);let i=e.topic.toString();if(this.log(\"_removeTopicAliasAndRecoverTopicName :: alias %d, topic %o\",r,i),i.length===0){if(typeof r>\"u\")return new Error(\"Unregistered Topic Alias\");if(i=this.topicAliasSend.getTopicByAlias(r),typeof i>\"u\")return new Error(\"Unregistered Topic Alias\");e.topic=i;}r&&delete e.properties.topicAlias;}_checkDisconnecting(e){return this.disconnecting&&(e&&e!==this.noop?e(new Error(\"client disconnecting\")):this.emit(\"error\",new Error(\"client disconnecting\"))),this.disconnecting}_reconnect(){this.log(\"_reconnect: emitting reconnect to client\"),this.emit(\"reconnect\"),this.connected?(this.end(()=>{this.connect();}),this.log(\"client already connected. disconnecting first.\")):(this.log(\"_reconnect: calling connect\"),this.connect());}_setupReconnect(){!this.disconnecting&&!this.reconnectTimer&&this.options.reconnectPeriod>0?(this.reconnecting||(this.log(\"_setupReconnect :: emit `offline` state\"),this.emit(\"offline\"),this.log(\"_setupReconnect :: set `reconnecting` to `true`\"),this.reconnecting=!0),this.log(\"_setupReconnect :: setting reconnectTimer for %d ms\",this.options.reconnectPeriod),this.reconnectTimer=setInterval(()=>{this.log(\"reconnectTimer :: reconnect triggered!\"),this._reconnect();},this.options.reconnectPeriod)):this.log(\"_setupReconnect :: doing nothing...\");}_clearReconnect(){this.log(\"_clearReconnect : clearing reconnect timer\"),this.reconnectTimer&&(clearInterval(this.reconnectTimer),this.reconnectTimer=null);}_cleanUp(e,r,i={}){if(r&&(this.log(\"_cleanUp :: done callback provided for on stream close\"),this.stream.on(\"close\",r)),this.log(\"_cleanUp :: forced? %s\",e),e)this.options.reconnectPeriod===0&&this.options.clean&&this._flush(),this.log(\"_cleanUp :: (%s) :: destroying stream\",this.options.clientId),this.stream.destroy();else {let n=Object.assign({cmd:\"disconnect\"},i);this.log(\"_cleanUp :: (%s) :: call _sendPacket with disconnect packet\",this.options.clientId),this._sendPacket(n,()=>{this.log(\"_cleanUp :: (%s) :: destroying stream\",this.options.clientId),Fa(()=>{this.stream.end(()=>{this.log(\"_cleanUp :: (%s) :: stream destroyed\",this.options.clientId);});});});}!this.disconnecting&&!this.reconnecting&&(this.log(\"_cleanUp :: client not disconnecting/reconnecting. Clearing and resetting reconnect.\"),this._clearReconnect(),this._setupReconnect()),this.pingTimer&&(this.log(\"_cleanUp :: clearing pingTimer\"),this.pingTimer.clear(),this.pingTimer=null),r&&!this.connected&&(this.log(\"_cleanUp :: (%s) :: removing stream `done` callback `close` listener\",this.options.clientId),this.stream.removeListener(\"close\",r),r());}_storeAndSend(e,r,i){this.log(\"storeAndSend :: store packet with cmd %s to outgoingStore\",e.cmd);let n=e,o;if(n.cmd===\"publish\"&&(n=(0, qp.default)(e),o=this._removeTopicAliasAndRecoverTopicName(n),o))return r&&r(o);this.outgoingStore.put(n,s=>{if(s)return r&&r(s);i(),this._writePacket(e,r);});}_applyTopicAlias(e){if(this.options.protocolVersion===5&&e.cmd===\"publish\"){let r;e.properties&&(r=e.properties.topicAlias);let i=e.topic.toString();if(this.topicAliasSend)if(r){if(i.length!==0&&(this.log(\"applyTopicAlias :: register topic: %s - alias: %d\",i,r),!this.topicAliasSend.put(i,r)))return this.log(\"applyTopicAlias :: error out of range. topic: %s - alias: %d\",i,r),new Error(\"Sending Topic Alias out of range\")}else i.length!==0&&(this.options.autoAssignTopicAlias?(r=this.topicAliasSend.getAliasByTopic(i),r?(e.topic=\"\",e.properties=Object.assign(Object.assign({},e.properties),{topicAlias:r}),this.log(\"applyTopicAlias :: auto assign(use) topic: %s - alias: %d\",i,r)):(r=this.topicAliasSend.getLruAlias(),this.topicAliasSend.put(i,r),e.properties=Object.assign(Object.assign({},e.properties),{topicAlias:r}),this.log(\"applyTopicAlias :: auto assign topic: %s - alias: %d\",i,r))):this.options.autoUseTopicAlias&&(r=this.topicAliasSend.getAliasByTopic(i),r&&(e.topic=\"\",e.properties=Object.assign(Object.assign({},e.properties),{topicAlias:r}),this.log(\"applyTopicAlias :: auto use topic: %s - alias: %d\",i,r))));else if(r)return this.log(\"applyTopicAlias :: error out of range. topic: %s - alias: %d\",i,r),new Error(\"Sending Topic Alias out of range\")}}_noop(e){this.log(\"noop ::\",e);}_writePacket(e,r){this.log(\"_writePacket :: packet: %O\",e),this.log(\"_writePacket :: emitting `packetsend`\"),this.emit(\"packetsend\",e),this._shiftPingInterval(),this.log(\"_writePacket :: writing to stream\");let i=ja.default.writeToStream(e,this.stream,this.options);this.log(\"_writePacket :: writeToStream result %s\",i),!i&&r&&r!==this.noop?(this.log(\"_writePacket :: handle events on `drain` once through callback.\"),this.stream.once(\"drain\",r)):r&&(this.log(\"_writePacket :: invoking cb\"),r());}_sendPacket(e,r,i,n){this.log(\"_sendPacket :: (%s) :: start\",this.options.clientId),i=i||this.noop,r=r||this.noop;let o=this._applyTopicAlias(e);if(o){r(o);return}if(!this.connected){if(e.cmd===\"auth\"){this._writePacket(e,r);return}this.log(\"_sendPacket :: client not connected. Storing packet offline.\"),this._storePacket(e,r,i);return}if(n){this._writePacket(e,r);return}switch(e.cmd){case\"publish\":break;case\"pubrel\":this._storeAndSend(e,r,i);return;default:this._writePacket(e,r);return}switch(e.qos){case 2:case 1:this._storeAndSend(e,r,i);break;case 0:default:this._writePacket(e,r);break}this.log(\"_sendPacket :: (%s) :: end\",this.options.clientId);}_storePacket(e,r,i){this.log(\"_storePacket :: packet: %o\",e),this.log(\"_storePacket :: cb? %s\",!!r),i=i||this.noop;let n=e;if(n.cmd===\"publish\"){n=(0, qp.default)(e);let s=this._removeTopicAliasAndRecoverTopicName(n);if(s)return r&&r(s)}let o=n.qos||0;o===0&&this.queueQoSZero||n.cmd!==\"publish\"?this.queue.push({packet:n,cb:r}):o>0?(r=this.outgoing[n.messageId]?this.outgoing[n.messageId].cb:null,this.outgoingStore.put(n,s=>{if(s)return r&&r(s);i();})):r&&r(new Error(\"No connection to broker\"));}_setupPingTimer(){this.log(\"_setupPingTimer :: keepalive %d (seconds)\",this.options.keepalive),!this.pingTimer&&this.options.keepalive&&(this.pingResp=!0,this.pingTimer=new Xv.default(this.options.keepalive,()=>{this._checkPing();},this.options.timerVariant));}_shiftPingInterval(){this.pingTimer&&this.options.keepalive&&this.options.reschedulePings&&this.pingTimer.reschedule();}_checkPing(){this.log(\"_checkPing :: checking ping...\"),this.pingResp?(this.log(\"_checkPing :: ping response received. Clearing flag and sending `pingreq`\"),this.pingResp=!1,this._sendPacket({cmd:\"pingreq\"})):(this.emit(\"error\",new Error(\"Keepalive timeout\")),this.log(\"_checkPing :: calling _cleanUp with force true\"),this._cleanUp(!0));}_resubscribe(){this.log(\"_resubscribe\");let e=Object.keys(this._resubscribeTopics);if(!this._firstConnection&&(this.options.clean||this.options.protocolVersion>=4&&!this.connackPacket.sessionPresent)&&e.length>0)if(this.options.resubscribe)if(this.options.protocolVersion===5){this.log(\"_resubscribe: protocolVersion 5\");for(let r=0;r{let i=this.outgoingStore.createStream(),n=()=>{i.destroy(),i=null,this._flushStoreProcessingQueue(),o();},o=()=>{this._storeProcessing=!1,this._packetIdsDuringStoreProcessing={};};this.once(\"close\",n),i.on(\"error\",a=>{o(),this._flushStoreProcessingQueue(),this.removeListener(\"close\",n),this.emit(\"error\",a);});let s=()=>{if(!i)return;let a=i.read(1),u;if(!a){i.once(\"readable\",s);return}if(this._storeProcessing=!0,this._packetIdsDuringStoreProcessing[a.messageId]){s();return}!this.disconnecting&&!this.reconnectTimer?(u=this.outgoing[a.messageId]?this.outgoing[a.messageId].cb:null,this.outgoing[a.messageId]={volatile:!1,cb(c,h){u&&u(c,h),s();}},this._packetIdsDuringStoreProcessing[a.messageId]=!0,this.messageIdProvider.register(a.messageId)?this._sendPacket(a,void 0,void 0,!0):this.log(\"messageId: %d has already used.\",a.messageId)):i.destroy&&i.destroy();};i.on(\"end\",()=>{let a=!0;for(let u in this._packetIdsDuringStoreProcessing)if(!this._packetIdsDuringStoreProcessing[u]){a=!1;break}this.removeListener(\"close\",n),a?(o(),this._invokeAllStoreProcessingQueue(),this.emit(\"connect\",e)):r();}),s();};r();}_invokeStoreProcessingQueue(){if(!this._storeProcessing&&this._storeProcessingQueue.length>0){let e=this._storeProcessingQueue[0];if(e&&e.invoke())return this._storeProcessingQueue.shift(),!0}return !1}_invokeAllStoreProcessingQueue(){for(;this._invokeStoreProcessingQueue(););}_flushStoreProcessingQueue(){for(let e of this._storeProcessingQueue)e.cbStorePut&&e.cbStorePut(new Error(\"Connection closed\")),e.callback&&e.callback(new Error(\"Connection closed\"));this._storeProcessingQueue.splice(0);}_removeOutgoingAndStoreMessage(e,r){delete this.outgoing[e],this.outgoingStore.del({messageId:e},(i,n)=>{r(i,n),this.messageIdProvider.deallocate(e),this._invokeStoreProcessingQueue();});}};is.VERSION=\"5.5.2\";Qe.default=is;});var $p=M(Ha=>{v();m();_();Object.defineProperty(Ha,\"__esModule\",{value:!0});var Zv=xa(),$a=class{constructor(){this.numberAllocator=new Zv.NumberAllocator(1,65535);}allocate(){return this.lastId=this.numberAllocator.alloc(),this.lastId}getLastAllocated(){return this.lastId}register(e){return this.numberAllocator.use(e)}deallocate(e){this.numberAllocator.free(e);}clear(){this.numberAllocator.clear();}};Ha.default=$a;});function Ir(t){throw new RangeError(iE[t])}function Hp(t,e){let r=t.split(\"@\"),i=\"\";r.length>1&&(i=r[0]+\"@\",t=r[1]);let n=function(o,s){let a=[],u=o.length;for(;u--;)a[u]=s(o[u]);return a}((t=t.replace(rE,\".\")).split(\".\"),e).join(\".\");return i+n}function Gp(t){let e=[],r=0,i=t.length;for(;r=55296&&n<=56319&&r{v();m();_();eE=/^xn--/,tE=/[^\\0-\\x7E]/,rE=/[\\x2E\\u3002\\uFF0E\\uFF61]/g,iE={overflow:\"Overflow: input needs wider integers to process\",\"not-basic\":\"Illegal input >= 0x80 (not a basic code point)\",\"invalid-input\":\"Invalid input\"},ht=Math.floor,Va=String.fromCharCode;Vp=function(t,e){return t+22+75*(t<26)-((e!=0)<<5)},Qp=function(t,e,r){let i=0;for(t=r?ht(t/700):t>>1,t+=ht(t/e);t>455;i+=36)t=ht(t/35);return ht(i+36*t/(t+38))},zp=function(t){let e=[],r=t.length,i=0,n=128,o=72,s=t.lastIndexOf(\"-\");s<0&&(s=0);for(let u=0;u=128&&Ir(\"not-basic\"),e.push(t.charCodeAt(u));for(let u=s>0?s+1:0;u=r&&Ir(\"invalid-input\");let y=(a=t.charCodeAt(u++))-48<10?a-22:a-65<26?a-65:a-97<26?a-97:36;(y>=36||y>ht((2147483647-i)/d))&&Ir(\"overflow\"),i+=y*d;let w=g<=o?1:g>=o+26?26:g-o;if(yht(2147483647/E)&&Ir(\"overflow\"),d*=E;}let h=e.length+1;o=Qp(i-c,h,c==0),ht(i/h)>2147483647-n&&Ir(\"overflow\"),n+=ht(i/h),i%=h,e.splice(i++,0,n);}var a;return String.fromCodePoint(...e)},Kp=function(t){let e=[],r=(t=Gp(t)).length,i=128,n=0,o=72;for(let u of t)u<128&&e.push(Va(u));let s=e.length,a=s;for(s&&e.push(\"-\");a=i&&hht((2147483647-n)/c)&&Ir(\"overflow\"),n+=(u-i)*c,i=u;for(let h of t)if(h2147483647&&Ir(\"overflow\"),h==i){let d=n;for(let g=36;;g+=36){let y=g<=o?1:g>=o+26?26:g-o;if(dString.fromCodePoint(...t)},decode:zp,encode:Kp,toASCII:function(t){return Hp(t,function(e){return tE.test(e)?\"xn--\"+Kp(e):e})},toUnicode:function(t){return Hp(t,function(e){return eE.test(e)?zp(e.slice(4).toLowerCase()):e})}};zt.decode;zt.encode;zt.toASCII;zt.toUnicode;zt.ucs2;zt.version;});function nE(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var sE,ki,oE,dt,Jp=we(()=>{v();m();_();sE=function(t,e,r,i){e=e||\"&\",r=r||\"=\";var n={};if(typeof t!=\"string\"||t.length===0)return n;var o=/\\+/g;t=t.split(e);var s=1e3;i&&typeof i.maxKeys==\"number\"&&(s=i.maxKeys);var a=t.length;s>0&&a>s&&(a=s);for(var u=0;u=0?(c=y.substr(0,w),h=y.substr(w+1)):(c=y,h=\"\"),d=decodeURIComponent(c),g=decodeURIComponent(h),nE(n,d)?Array.isArray(n[d])?n[d].push(g):n[d]=[n[d],g]:n[d]=g;}return n},ki=function(t){switch(typeof t){case\"string\":return t;case\"boolean\":return t?\"true\":\"false\";case\"number\":return isFinite(t)?t:\"\";default:return \"\"}},oE=function(t,e,r,i){return e=e||\"&\",r=r||\"=\",t===null&&(t=void 0),typeof t==\"object\"?Object.keys(t).map(function(n){var o=encodeURIComponent(ki(n))+r;return Array.isArray(t[n])?t[n].map(function(s){return o+encodeURIComponent(ki(s))}).join(e):o+encodeURIComponent(ki(t[n]))}).join(e):i?encodeURIComponent(ki(i))+r+encodeURIComponent(ki(t)):\"\"},dt={};dt.decode=dt.parse=sE,dt.encode=dt.stringify=oE;dt.decode;dt.encode;dt.parse;dt.stringify;});function za(){throw new Error(\"setTimeout has not been defined\")}function Ka(){throw new Error(\"clearTimeout has not been defined\")}function eg(t){if(Bt===setTimeout)return setTimeout(t,0);if((Bt===za||!Bt)&&setTimeout)return Bt=setTimeout,setTimeout(t,0);try{return Bt(t,0)}catch{try{return Bt.call(null,t,0)}catch{return Bt.call(this||ii,t,0)}}}function aE(){ri&&Tr&&(ri=!1,Tr.length?Ot=Tr.concat(Ot):ss=-1,Ot.length&&tg());}function tg(){if(!ri){var t=eg(aE);ri=!0;for(var e=Ot.length;e;){for(Tr=Ot,Ot=[];++ss{v();m();_();ii=typeof globalThis<\"u\"?globalThis:typeof self<\"u\"?self:global,fe=Zp={};(function(){try{Bt=typeof setTimeout==\"function\"?setTimeout:za;}catch{Bt=za;}try{Pt=typeof clearTimeout==\"function\"?clearTimeout:Ka;}catch{Pt=Ka;}})();Ot=[],ri=!1,ss=-1;fe.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r1)for(var I=1;I{v();m();_();Ga={},ig=!1,ni=typeof globalThis<\"u\"?globalThis:typeof self<\"u\"?self:global;re=lE();re.platform=\"browser\";re.addListener;re.argv;re.binding;re.browser;re.chdir;re.cwd;re.emit;re.env;re.listeners;re.nextTick;re.off;re.on;re.once;re.prependListener;re.prependOnceListener;re.removeAllListeners;re.removeListener;re.title;re.umask;re.version;re.versions;});function uE(){if(ng)return Ya;ng=!0;var t=re;function e(o){if(typeof o!=\"string\")throw new TypeError(\"Path must be a string. Received \"+JSON.stringify(o))}function r(o,s){for(var a=\"\",u=0,c=-1,h=0,d,g=0;g<=o.length;++g){if(g2){var y=a.lastIndexOf(\"/\");if(y!==a.length-1){y===-1?(a=\"\",u=0):(a=a.slice(0,y),u=a.length-1-a.lastIndexOf(\"/\")),c=g,h=0;continue}}else if(a.length===2||a.length===1){a=\"\",u=0,c=g,h=0;continue}}s&&(a.length>0?a+=\"/..\":a=\"..\",u=2);}else a.length>0?a+=\"/\"+o.slice(c+1,g):a=o.slice(c+1,g),u=g-c-1;c=g,h=0;}else d===46&&h!==-1?++h:h=-1;}return a}function i(o,s){var a=s.dir||s.root,u=s.base||(s.name||\"\")+(s.ext||\"\");return a?a===s.root?a+u:a+o+u:u}var n={resolve:function(){for(var s=\"\",a=!1,u,c=arguments.length-1;c>=-1&&!a;c--){var h;c>=0?h=arguments[c]:(u===void 0&&(u=t.cwd()),h=u),e(h),h.length!==0&&(s=h+\"/\"+s,a=h.charCodeAt(0)===47);}return s=r(s,!a),a?s.length>0?\"/\"+s:\"/\":s.length>0?s:\".\"},normalize:function(s){if(e(s),s.length===0)return \".\";var a=s.charCodeAt(0)===47,u=s.charCodeAt(s.length-1)===47;return s=r(s,!a),s.length===0&&!a&&(s=\".\"),s.length>0&&u&&(s+=\"/\"),a?\"/\"+s:s},isAbsolute:function(s){return e(s),s.length>0&&s.charCodeAt(0)===47},join:function(){if(arguments.length===0)return \".\";for(var s,a=0;a0&&(s===void 0?s=u:s+=\"/\"+u);}return s===void 0?\".\":n.normalize(s)},relative:function(s,a){if(e(s),e(a),s===a||(s=n.resolve(s),a=n.resolve(a),s===a))return \"\";for(var u=1;uw){if(a.charCodeAt(d+S)===47)return a.slice(d+S+1);if(S===0)return a.slice(d+S)}else h>w&&(s.charCodeAt(u+S)===47?E=S:S===0&&(E=0));break}var I=s.charCodeAt(u+S),C=a.charCodeAt(d+S);if(I!==C)break;I===47&&(E=S);}var R=\"\";for(S=u+E+1;S<=c;++S)(S===c||s.charCodeAt(S)===47)&&(R.length===0?R+=\"..\":R+=\"/..\");return R.length>0?R+a.slice(d+E):(d+=E,a.charCodeAt(d)===47&&++d,a.slice(d))},_makeLong:function(s){return s},dirname:function(s){if(e(s),s.length===0)return \".\";for(var a=s.charCodeAt(0),u=a===47,c=-1,h=!0,d=s.length-1;d>=1;--d)if(a=s.charCodeAt(d),a===47){if(!h){c=d;break}}else h=!1;return c===-1?u?\"/\":\".\":u&&c===1?\"//\":s.slice(0,c)},basename:function(s,a){if(a!==void 0&&typeof a!=\"string\")throw new TypeError('\"ext\" argument must be a string');e(s);var u=0,c=-1,h=!0,d;if(a!==void 0&&a.length>0&&a.length<=s.length){if(a.length===s.length&&a===s)return \"\";var g=a.length-1,y=-1;for(d=s.length-1;d>=0;--d){var w=s.charCodeAt(d);if(w===47){if(!h){u=d+1;break}}else y===-1&&(h=!1,y=d+1),g>=0&&(w===a.charCodeAt(g)?--g===-1&&(c=d):(g=-1,c=y));}return u===c?c=y:c===-1&&(c=s.length),s.slice(u,c)}else {for(d=s.length-1;d>=0;--d)if(s.charCodeAt(d)===47){if(!h){u=d+1;break}}else c===-1&&(h=!1,c=d+1);return c===-1?\"\":s.slice(u,c)}},extname:function(s){e(s);for(var a=-1,u=0,c=-1,h=!0,d=0,g=s.length-1;g>=0;--g){var y=s.charCodeAt(g);if(y===47){if(!h){u=g+1;break}continue}c===-1&&(h=!1,c=g+1),y===46?a===-1?a=g:d!==1&&(d=1):a!==-1&&(d=-1);}return a===-1||c===-1||d===0||d===1&&a===c-1&&a===u+1?\"\":s.slice(a,c)},format:function(s){if(s===null||typeof s!=\"object\")throw new TypeError('The \"pathObject\" argument must be of type Object. Received type '+typeof s);return i(\"/\",s)},parse:function(s){e(s);var a={root:\"\",dir:\"\",base:\"\",ext:\"\",name:\"\"};if(s.length===0)return a;var u=s.charCodeAt(0),c=u===47,h;c?(a.root=\"/\",h=1):h=0;for(var d=-1,g=0,y=-1,w=!0,E=s.length-1,S=0;E>=h;--E){if(u=s.charCodeAt(E),u===47){if(!w){g=E+1;break}continue}y===-1&&(w=!1,y=E+1),u===46?d===-1?d=E:S!==1&&(S=1):d!==-1&&(S=-1);}return d===-1||y===-1||S===0||S===1&&d===y-1&&d===g+1?y!==-1&&(g===0&&c?a.base=a.name=s.slice(1,y):a.base=a.name=s.slice(g,y)):(g===0&&c?(a.name=s.slice(1,d),a.base=s.slice(1,y)):(a.name=s.slice(g,d),a.base=s.slice(g,y)),a.ext=s.slice(d,y)),g>0?a.dir=s.slice(0,g-1):c&&(a.dir=\"/\"),a},sep:\"/\",delimiter:\":\",win32:null,posix:null};return n.posix=n,Ya=n,Ya}var Ya,ng,Ja,sg=we(()=>{v();m();_();Qa();Ya={},ng=!1;Ja=uE();});var dg={};Qt(dg,{URL:()=>DE,Url:()=>ME,default:()=>Z,fileURLToPath:()=>cg,format:()=>LE,parse:()=>qE,pathToFileURL:()=>hg,resolve:()=>UE,resolveObject:()=>NE});function Fe(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null;}function xi(t,e,r){if(t&&pt.isObject(t)&&t instanceof Fe)return t;var i=new Fe;return i.parse(t,e,r),i}function bE(){if(ug)return el;ug=!0;var t=ne;function e(o){if(typeof o!=\"string\")throw new TypeError(\"Path must be a string. Received \"+JSON.stringify(o))}function r(o,s){for(var a=\"\",u=0,c=-1,h=0,d,g=0;g<=o.length;++g){if(g2){var y=a.lastIndexOf(\"/\");if(y!==a.length-1){y===-1?(a=\"\",u=0):(a=a.slice(0,y),u=a.length-1-a.lastIndexOf(\"/\")),c=g,h=0;continue}}else if(a.length===2||a.length===1){a=\"\",u=0,c=g,h=0;continue}}s&&(a.length>0?a+=\"/..\":a=\"..\",u=2);}else a.length>0?a+=\"/\"+o.slice(c+1,g):a=o.slice(c+1,g),u=g-c-1;c=g,h=0;}else d===46&&h!==-1?++h:h=-1;}return a}function i(o,s){var a=s.dir||s.root,u=s.base||(s.name||\"\")+(s.ext||\"\");return a?a===s.root?a+u:a+o+u:u}var n={resolve:function(){for(var s=\"\",a=!1,u,c=arguments.length-1;c>=-1&&!a;c--){var h;c>=0?h=arguments[c]:(u===void 0&&(u=t.cwd()),h=u),e(h),h.length!==0&&(s=h+\"/\"+s,a=h.charCodeAt(0)===47);}return s=r(s,!a),a?s.length>0?\"/\"+s:\"/\":s.length>0?s:\".\"},normalize:function(s){if(e(s),s.length===0)return \".\";var a=s.charCodeAt(0)===47,u=s.charCodeAt(s.length-1)===47;return s=r(s,!a),s.length===0&&!a&&(s=\".\"),s.length>0&&u&&(s+=\"/\"),a?\"/\"+s:s},isAbsolute:function(s){return e(s),s.length>0&&s.charCodeAt(0)===47},join:function(){if(arguments.length===0)return \".\";for(var s,a=0;a0&&(s===void 0?s=u:s+=\"/\"+u);}return s===void 0?\".\":n.normalize(s)},relative:function(s,a){if(e(s),e(a),s===a||(s=n.resolve(s),a=n.resolve(a),s===a))return \"\";for(var u=1;uw){if(a.charCodeAt(d+S)===47)return a.slice(d+S+1);if(S===0)return a.slice(d+S)}else h>w&&(s.charCodeAt(u+S)===47?E=S:S===0&&(E=0));break}var I=s.charCodeAt(u+S),C=a.charCodeAt(d+S);if(I!==C)break;I===47&&(E=S);}var R=\"\";for(S=u+E+1;S<=c;++S)(S===c||s.charCodeAt(S)===47)&&(R.length===0?R+=\"..\":R+=\"/..\");return R.length>0?R+a.slice(d+E):(d+=E,a.charCodeAt(d)===47&&++d,a.slice(d))},_makeLong:function(s){return s},dirname:function(s){if(e(s),s.length===0)return \".\";for(var a=s.charCodeAt(0),u=a===47,c=-1,h=!0,d=s.length-1;d>=1;--d)if(a=s.charCodeAt(d),a===47){if(!h){c=d;break}}else h=!1;return c===-1?u?\"/\":\".\":u&&c===1?\"//\":s.slice(0,c)},basename:function(s,a){if(a!==void 0&&typeof a!=\"string\")throw new TypeError('\"ext\" argument must be a string');e(s);var u=0,c=-1,h=!0,d;if(a!==void 0&&a.length>0&&a.length<=s.length){if(a.length===s.length&&a===s)return \"\";var g=a.length-1,y=-1;for(d=s.length-1;d>=0;--d){var w=s.charCodeAt(d);if(w===47){if(!h){u=d+1;break}}else y===-1&&(h=!1,y=d+1),g>=0&&(w===a.charCodeAt(g)?--g===-1&&(c=d):(g=-1,c=y));}return u===c?c=y:c===-1&&(c=s.length),s.slice(u,c)}else {for(d=s.length-1;d>=0;--d)if(s.charCodeAt(d)===47){if(!h){u=d+1;break}}else c===-1&&(h=!1,c=d+1);return c===-1?\"\":s.slice(u,c)}},extname:function(s){e(s);for(var a=-1,u=0,c=-1,h=!0,d=0,g=s.length-1;g>=0;--g){var y=s.charCodeAt(g);if(y===47){if(!h){u=g+1;break}continue}c===-1&&(h=!1,c=g+1),y===46?a===-1?a=g:d!==1&&(d=1):a!==-1&&(d=-1);}return a===-1||c===-1||d===0||d===1&&a===c-1&&a===u+1?\"\":s.slice(a,c)},format:function(s){if(s===null||typeof s!=\"object\")throw new TypeError('The \"pathObject\" argument must be of type Object. Received type '+typeof s);return i(\"/\",s)},parse:function(s){e(s);var a={root:\"\",dir:\"\",base:\"\",ext:\"\",name:\"\"};if(s.length===0)return a;var u=s.charCodeAt(0),c=u===47,h;c?(a.root=\"/\",h=1):h=0;for(var d=-1,g=0,y=-1,w=!0,E=s.length-1,S=0;E>=h;--E){if(u=s.charCodeAt(E),u===47){if(!w){g=E+1;break}continue}y===-1&&(w=!1,y=E+1),u===46?d===-1?d=E:S!==1&&(S=1):d!==-1&&(S=-1);}return d===-1||y===-1||S===0||S===1&&d===y-1&&d===g+1?y!==-1&&(g===0&&c?a.base=a.name=s.slice(1,y):a.base=a.name=s.slice(g,y)):(g===0&&c?(a.name=s.slice(1,d),a.base=s.slice(1,y)):(a.name=s.slice(g,d),a.base=s.slice(g,y)),a.ext=s.slice(d,y)),g>0?a.dir=s.slice(0,g-1):c&&(a.dir=\"/\"),a},sep:\"/\",delimiter:\":\",win32:null,posix:null};return n.posix=n,el=n,el}function BE(t){if(typeof t==\"string\")t=new URL(t);else if(!(t instanceof URL))throw new Deno.errors.InvalidData(\"invalid argument path , must be a string or URL\");if(t.protocol!==\"file:\")throw new Deno.errors.InvalidData(\"invalid url scheme\");return rl?PE(t):OE(t)}function PE(t){let e=t.hostname,r=t.pathname;for(let i=0;iEE||n!==\":\")throw new Deno.errors.InvalidData(\"file url path must be absolute\");return r.slice(1)}}function OE(t){if(t.hostname!==\"\")throw new Deno.errors.InvalidData(\"invalid file url hostname\");let e=t.pathname;for(let r=0;r$E||n!==\":\")throw new Deno.errors.InvalidData(\"file url path must be absolute\");return r.slice(1)}}function JE(t){if(t.hostname!==\"\")throw new Deno.errors.InvalidData(\"invalid file url hostname\");let e=t.pathname;for(let r=0;r{v();m();_();Yp();Jp();rg();sg();Qa();Z={},fE=zt,pt={isString:function(t){return typeof t==\"string\"},isObject:function(t){return typeof t==\"object\"&&t!==null},isNull:function(t){return t===null},isNullOrUndefined:function(t){return t==null}};Z.parse=xi,Z.resolve=function(t,e){return xi(t,!1,!0).resolve(e)},Z.resolveObject=function(t,e){return t?xi(t,!1,!0).resolveObject(e):e},Z.format=function(t){return pt.isString(t)&&(t=xi(t)),t instanceof Fe?t.format():Fe.prototype.format.call(t)},Z.Url=Fe;cE=/^([a-z0-9.+-]+:)/i,hE=/:[0-9]*$/,dE=/^(\\/\\/?(?!\\/)[^\\?\\s]*)(\\?[^\\s]*)?$/,pE=[\"{\",\"}\",\"|\",\"\\\\\",\"^\",\"`\"].concat([\"<\",\">\",'\"',\"`\",\" \",\"\\r\",`\n`,\"\t\"]),tl=[\"'\"].concat(pE),og=[\"%\",\"/\",\"?\",\";\",\"#\"].concat(tl),ag=[\"/\",\"?\",\"#\"],lg=/^[+a-z0-9A-Z_-]{0,63}$/,gE=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,yE={javascript:!0,\"javascript:\":!0},Xa={javascript:!0,\"javascript:\":!0},si={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,\"http:\":!0,\"https:\":!0,\"ftp:\":!0,\"gopher:\":!0,\"file:\":!0},Za=dt;Fe.prototype.parse=function(t,e,r){if(!pt.isString(t))throw new TypeError(\"Parameter 'url' must be a string, not \"+typeof t);var i=t.indexOf(\"?\"),n=i!==-1&&i127?U+=\"x\":U+=R[N];if(!U.match(lg)){var K=I.slice(0,w),z=I.slice(w+1),Q=R.match(gE);Q&&(K.push(Q[1]),z.unshift(Q[2])),z.length&&(s=\"/\"+z.join(\".\")+s),this.hostname=K.join(\".\");break}}}this.hostname.length>255?this.hostname=\"\":this.hostname=this.hostname.toLowerCase(),S||(this.hostname=fE.toASCII(this.hostname));var de=this.port?\":\"+this.port:\"\",Gt=this.hostname||\"\";this.host=Gt+de,this.href+=this.host,S&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),s[0]!==\"/\"&&(s=\"/\"+s));}if(!yE[c])for(w=0,C=tl.length;w0)&&r.host.split(\"@\"))&&(r.auth=Q.shift(),r.host=r.hostname=Q.shift())),r.search=t.search,r.query=t.query,pt.isNull(r.pathname)&&pt.isNull(r.search)||(r.path=(r.pathname?r.pathname:\"\")+(r.search?r.search:\"\")),r.href=r.format(),r;if(!R.length)return r.pathname=null,r.search?r.path=\"/\"+r.search:r.path=null,r.href=r.format(),r;for(var N=R.slice(-1)[0],W=(r.host||t.host||R.length>1)&&(N===\".\"||N===\"..\")||N===\"\",K=0,z=R.length;z>=0;z--)(N=R[z])===\".\"?R.splice(z,1):N===\"..\"?(R.splice(z,1),K++):K&&(R.splice(z,1),K--);if(!I&&!C)for(;K--;K)R.unshift(\"..\");!I||R[0]===\"\"||R[0]&&R[0].charAt(0)===\"/\"||R.unshift(\"\"),W&&R.join(\"/\").substr(-1)!==\"/\"&&R.push(\"\");var Q,de=R[0]===\"\"||R[0]&&R[0].charAt(0)===\"/\";return U&&(r.hostname=r.host=de?\"\":R.length?R.shift():\"\",(Q=!!(r.host&&r.host.indexOf(\"@\")>0)&&r.host.split(\"@\"))&&(r.auth=Q.shift(),r.host=r.hostname=Q.shift())),(I=I||r.host&&R.length)&&!de&&R.unshift(\"\"),R.length?r.pathname=R.join(\"/\"):(r.pathname=null,r.path=null),pt.isNull(r.pathname)&&pt.isNull(r.search)||(r.path=(r.pathname?r.pathname:\"\")+(r.search?r.search:\"\")),r.auth=t.auth||r.auth,r.slashes=r.slashes||t.slashes,r.href=r.format(),r},Fe.prototype.parseHost=function(){var t=this.host,e=hE.exec(t);e&&((e=e[0])!==\":\"&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t);};Z.Url;Z.format;Z.resolve;Z.resolveObject;el={},ug=!1;fg=bE(),wE=typeof Deno<\"u\"?Deno.build.os===\"windows\"?\"win32\":Deno.build.os:void 0;Z.URL=typeof URL<\"u\"?URL:null;Z.pathToFileURL=kE;Z.fileURLToPath=BE;Z.Url;Z.format;Z.resolve;Z.resolveObject;Z.URL;_E=92,mE=47,vE=97,EE=122,rl=wE===\"win32\",SE=/\\//g,AE=/%/g,IE=/\\\\/g,TE=/\\n/g,RE=/\\r/g,CE=/\\t/g;xE=typeof Deno<\"u\"?Deno.build.os===\"windows\"?\"win32\":Deno.build.os:void 0;Z.URL=typeof URL<\"u\"?URL:null;Z.pathToFileURL=hg;Z.fileURLToPath=cg;ME=Z.Url,LE=Z.format,UE=Z.resolve,NE=Z.resolveObject,qE=Z.parse,DE=Z.URL,jE=92,FE=47,WE=97,$E=122,il=xE===\"win32\",HE=/\\//g,VE=/%/g,zE=/\\\\/g,KE=/\\n/g,GE=/\\r/g,QE=/\\t/g;});var nl={};Qt(nl,{Server:()=>Me,Socket:()=>Me,Stream:()=>Me,_createServerHandle:()=>Me,_normalizeArgs:()=>Me,_setSimultaneousAccepts:()=>Me,connect:()=>Me,createConnection:()=>Me,createServer:()=>Me,default:()=>XE,isIP:()=>Me,isIPv4:()=>Me,isIPv6:()=>Me});function Me(){throw new Error(\"Node.js net module is not supported by JSPM core outside of Node.js\")}var XE,sl=we(()=>{v();m();_();XE={_createServerHandle:Me,_normalizeArgs:Me,_setSimultaneousAccepts:Me,connect:Me,createConnection:Me,createServer:Me,isIP:Me,isIPv4:Me,isIPv6:Me,Server:Me,Socket:Me,Stream:Me};});var ol=M(Mi=>{v();m();_();var gg=Mi&&Mi.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Mi,\"__esModule\",{value:!0});var ZE=gg((sl(),X(nl))),eS=gg(ot()),tS=(0, eS.default)(\"mqttjs:tcp\"),rS=(t,e)=>{e.port=e.port||1883,e.hostname=e.hostname||e.host||\"localhost\";let{port:r}=e,i=e.hostname;return tS(\"port %d and host %s\",r,i),ZE.default.createConnection(r,i)};Mi.default=rS;});var yg={};Qt(yg,{default:()=>iS});var iS,bg=we(()=>{v();m();_();iS={};});var ll=M(Li=>{v();m();_();var al=Li&&Li.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Li,\"__esModule\",{value:!0});var nS=al((bg(),X(yg))),sS=al((sl(),X(nl))),oS=al(ot()),aS=(0, oS.default)(\"mqttjs:tls\"),lS=(t,e)=>{e.port=e.port||8883,e.host=e.hostname||e.host||\"localhost\",sS.default.isIP(e.host)===0&&(e.servername=e.host),e.rejectUnauthorized=e.rejectUnauthorized!==!1,delete e.path,aS(\"port %d host %s rejectUnauthorized %b\",e.port,e.host,e.rejectUnauthorized);let r=nS.default.connect(e);r.on(\"secureConnect\",()=>{e.rejectUnauthorized&&!r.authorized?r.emit(\"error\",new Error(\"TLS not authorized\")):r.removeListener(\"error\",i);});function i(n){e.rejectUnauthorized&&t.emit(\"error\",n),r.end();}return r.on(\"error\",i),r};Li.default=lS;});var os=M(oi=>{v();m();_();Object.defineProperty(oi,\"__esModule\",{value:!0});oi.BufferedDuplex=oi.writev=void 0;var uS=Dt(),wg=(ye(),X(_e));function _g(t,e){let r=new Array(t.length);for(let i=0;i{this.push(n);});}_read(e){this.proxy.read(e);}_write(e,r,i){this.isSocketOpen?this.writeToProxy(e,r,i):this.writeQueue.push({chunk:e,encoding:r,cb:i});}_final(e){this.writeQueue=[],this.proxy.end(e);}_destroy(e,r){this.writeQueue=[],this.proxy.destroy(),r(e);}socketReady(){this.emit(\"connect\"),this.isSocketOpen=!0,this.processWriteQueue();}writeToProxy(e,r,i){this.proxy.write(e,r)===!1?this.proxy.once(\"drain\",i):i();}processWriteQueue(){for(;this.writeQueue.length>0;){let{chunk:e,encoding:r,cb:i}=this.writeQueue.shift();this.writeToProxy(e,r,i);}}};oi.BufferedDuplex=ul;});var hl=M(cl=>{v();m();_();Object.defineProperty(cl,\"__esModule\",{value:!0});var mg=(ye(),X(_e)),fS=Dt(),cS=os(),gt,fl,Le;function hS(){let t=new fS.Transform;return t._write=(e,r,i)=>{gt.send({data:e.buffer,success(){i();},fail(n){i(new Error(n));}});},t._flush=e=>{gt.close({success(){e();}});},t}function dS(t){t.hostname||(t.hostname=\"localhost\"),t.path||(t.path=\"/\"),t.wsOptions||(t.wsOptions={});}function pS(t,e){let r=t.protocol===\"wxs\"?\"wss\":\"ws\",i=`${r}://${t.hostname}${t.path}`;return t.port&&t.port!==80&&t.port!==443&&(i=`${r}://${t.hostname}:${t.port}${t.path}`),typeof t.transformWsUrl==\"function\"&&(i=t.transformWsUrl(i,t,e)),i}function gS(){gt.onOpen(()=>{Le.socketReady();}),gt.onMessage(t=>{let{data:e}=t;e instanceof ArrayBuffer?e=mg.Buffer.from(e):e=mg.Buffer.from(e,\"utf8\"),fl.push(e);}),gt.onClose(()=>{Le.emit(\"close\"),Le.end(),Le.destroy();}),gt.onError(t=>{let e=new Error(t.errMsg);Le.destroy(e);});}var yS=(t,e)=>{if(e.hostname=e.hostname||e.host,!e.hostname)throw new Error(\"Could not determine host. Specify host manually.\");let r=e.protocolId===\"MQIsdp\"&&e.protocolVersion===3?\"mqttv3.1\":\"mqtt\";dS(e);let i=pS(e,t);gt=wx.connectSocket({url:i,protocols:[r]}),fl=hS(),Le=new cS.BufferedDuplex(e,fl,gt),Le._destroy=(o,s)=>{gt.close({success(){s&&s(o);}});};let n=Le.destroy;return Le.destroy=(o,s)=>(Le.destroy=n,setTimeout(()=>{gt.close({fail(){Le._destroy(o,s);}});},0),Le),gS(),Le};cl.default=yS;});var gl=M(pl=>{v();m();_();Object.defineProperty(pl,\"__esModule\",{value:!0});var dl=(ye(),X(_e)),bS=Dt(),wS=os(),kt,as,ai,vg=!1;function _S(){let t=new bS.Transform;return t._write=(e,r,i)=>{kt.sendSocketMessage({data:e.buffer,success(){i();},fail(){i(new Error);}});},t._flush=e=>{kt.closeSocket({success(){e();}});},t}function mS(t){t.hostname||(t.hostname=\"localhost\"),t.path||(t.path=\"/\"),t.wsOptions||(t.wsOptions={});}function vS(t,e){let r=t.protocol===\"alis\"?\"wss\":\"ws\",i=`${r}://${t.hostname}${t.path}`;return t.port&&t.port!==80&&t.port!==443&&(i=`${r}://${t.hostname}:${t.port}${t.path}`),typeof t.transformWsUrl==\"function\"&&(i=t.transformWsUrl(i,t,e)),i}function ES(){vg||(vg=!0,kt.onSocketOpen(()=>{ai.socketReady();}),kt.onSocketMessage(t=>{if(typeof t.data==\"string\"){let e=dl.Buffer.from(t.data,\"base64\");as.push(e);}else {let e=new FileReader;e.addEventListener(\"load\",()=>{let r=e.result;r instanceof ArrayBuffer?r=dl.Buffer.from(r):r=dl.Buffer.from(r,\"utf8\"),as.push(r);}),e.readAsArrayBuffer(t.data);}}),kt.onSocketClose(()=>{ai.end(),ai.destroy();}),kt.onSocketError(t=>{ai.destroy(t);}));}var SS=(t,e)=>{if(e.hostname=e.hostname||e.host,!e.hostname)throw new Error(\"Could not determine host. Specify host manually.\");let r=e.protocolId===\"MQIsdp\"&&e.protocolVersion===3?\"mqttv3.1\":\"mqtt\";mS(e);let i=vS(e,t);return kt=e.my,kt.connectSocket({url:i,protocols:r}),as=_S(),ai=new wS.BufferedDuplex(e,as,kt),ES(),ai};pl.default=SS;});var Sg=M((PD,Eg)=>{v();m();_();Eg.exports=function(){throw new Error(\"ws does not work in the browser. Browser clients must use the native WebSocket object\")};});var _l=M(Ui=>{v();m();_();var wl=Ui&&Ui.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Ui,\"__esModule\",{value:!0});var yl=(ye(),X(_e)),Ag=wl(Sg()),AS=wl(ot()),IS=Dt(),Ig=wl(Pi()),bl=os(),Kt=(0, AS.default)(\"mqttjs:ws\"),TS=[\"rejectUnauthorized\",\"ca\",\"cert\",\"key\",\"pfx\",\"passphrase\"];function Tg(t,e){let r=`${t.protocol}://${t.hostname}:${t.port}${t.path}`;return typeof t.transformWsUrl==\"function\"&&(r=t.transformWsUrl(r,t,e)),r}function Rg(t){let e=t;return t.hostname||(e.hostname=\"localhost\"),t.port||(t.protocol===\"wss\"?e.port=443:e.port=80),t.path||(e.path=\"/\"),t.wsOptions||(e.wsOptions={}),!Ig.default&&t.protocol===\"wss\"&&TS.forEach(r=>{Object.prototype.hasOwnProperty.call(t,r)&&!Object.prototype.hasOwnProperty.call(t.wsOptions,r)&&(e.wsOptions[r]=t[r]);}),e}function RS(t){let e=Rg(t);if(e.hostname||(e.hostname=e.host),!e.hostname){if(typeof document>\"u\")throw new Error(\"Could not determine host. Specify host manually.\");let r=new URL(document.URL);e.hostname=r.hostname,e.port||(e.port=Number(r.port));}return e.objectMode===void 0&&(e.objectMode=!(e.binary===!0||e.binary===void 0)),e}function CS(t,e,r){Kt(\"createWebSocket\"),Kt(`protocol: ${r.protocolId} ${r.protocolVersion}`);let i=r.protocolId===\"MQIsdp\"&&r.protocolVersion===3?\"mqttv3.1\":\"mqtt\";Kt(`creating new Websocket for url: ${e} and protocol: ${i}`);let n;return r.createWebsocket?n=r.createWebsocket(e,[i],r):n=new Ag.default(e,[i],r.wsOptions),n}function BS(t,e){let r=e.protocolId===\"MQIsdp\"&&e.protocolVersion===3?\"mqttv3.1\":\"mqtt\",i=Tg(e,t),n;return e.createWebsocket?n=e.createWebsocket(i,[r],e):n=new WebSocket(i,[r]),n.binaryType=\"arraybuffer\",n}var PS=(t,e)=>{Kt(\"streamBuilder\");let r=Rg(e),i=Tg(r,t),n=CS(t,i,r),o=Ag.default.createWebSocketStream(n,r.wsOptions);return o.url=i,n.on(\"close\",()=>{o.destroy();}),o},OS=(t,e)=>{Kt(\"browserStreamBuilder\");let r,n=RS(e).browserBufferSize||1024*512,o=e.browserBufferTimeout||1e3,s=!e.objectMode,a=BS(t,e),u=h(e,E,S);e.objectMode||(u._writev=bl.writev.bind(u)),u.on(\"close\",()=>{a.close();});let c=typeof a.addEventListener<\"u\";a.readyState===a.OPEN?(r=u,r.socket=a):(r=new bl.BufferedDuplex(e,u,a),c?a.addEventListener(\"open\",d):a.onopen=d),c?(a.addEventListener(\"close\",g),a.addEventListener(\"error\",y),a.addEventListener(\"message\",w)):(a.onclose=g,a.onerror=y,a.onmessage=w);function h(I,C,R){let U=new IS.Transform({objectMode:I.objectMode});return U._write=C,U._flush=R,U}function d(){Kt(\"WebSocket onOpen\"),r instanceof bl.BufferedDuplex&&r.socketReady();}function g(I){Kt(\"WebSocket onClose\",I),r.end(),r.destroy();}function y(I){Kt(\"WebSocket onError\",I);let C=new Error(\"WebSocket error\");C.event=I,r.destroy(C);}function w(I){let{data:C}=I;C instanceof ArrayBuffer?C=yl.Buffer.from(C):C=yl.Buffer.from(C,\"utf8\"),u.push(C);}function E(I,C,R){if(a.bufferedAmount>n){setTimeout(E,o,I,C,R);return}s&&typeof I==\"string\"&&(I=yl.Buffer.from(I,\"utf8\"));try{a.send(I);}catch(U){return R(U)}R();}function S(I){a.close(),I();}return r};Ui.default=Ig.default?OS:PS;});var Pg=M(Rr=>{v();m();_();var ls=Rr&&Rr.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Rr,\"__esModule\",{value:!0});Rr.connectAsync=void 0;var kS=ls(ot()),xS=ls((pg(),X(dg))),MS=ls(ns()),LS=ls(Pi()),Cg=(0, kS.default)(\"mqttjs\"),Re={};LS.default?(Re.wx=hl().default,Re.wxs=hl().default,Re.ali=gl().default,Re.alis=gl().default):(Re.mqtt=ol().default,Re.tcp=ol().default,Re.ssl=ll().default,Re.tls=Re.ssl,Re.mqtts=ll().default);Re.ws=_l().default;Re.wss=_l().default;function US(t){let e;t.auth&&(e=t.auth.match(/^(.+):(.+)$/),e?(t.username=e[1],t.password=e[2]):t.username=t.auth);}function Bg(t,e){if(Cg(\"connecting to an MQTT broker...\"),typeof t==\"object\"&&!e&&(e=t,t=\"\"),e=e||{},t&&typeof t==\"string\"){let n=xS.default.parse(t,!0);if(n.port!=null&&(n.port=Number(n.port)),e=Object.assign(Object.assign({},n),e),e.protocol===null)throw new Error(\"Missing protocol\");e.protocol=e.protocol.replace(/:$/,\"\");}if(US(e),e.query&&typeof e.query.clientId==\"string\"&&(e.clientId=e.query.clientId),e.cert&&e.key)if(e.protocol){if([\"mqtts\",\"wss\",\"wxs\",\"alis\"].indexOf(e.protocol)===-1)switch(e.protocol){case\"mqtt\":e.protocol=\"mqtts\";break;case\"ws\":e.protocol=\"wss\";break;case\"wx\":e.protocol=\"wxs\";break;case\"ali\":e.protocol=\"alis\";break;default:throw new Error(`Unknown protocol for secure connection: \"${e.protocol}\"!`)}}else throw new Error(\"Missing secure protocol key\");if(!Re[e.protocol]){let n=[\"mqtts\",\"wss\"].indexOf(e.protocol)!==-1;e.protocol=[\"mqtt\",\"mqtts\",\"ws\",\"wss\",\"wx\",\"wxs\",\"ali\",\"alis\"].filter((o,s)=>n&&s%2===0?!1:typeof Re[o]==\"function\")[0];}if(e.clean===!1&&!e.clientId)throw new Error(\"Missing clientId for unclean clients\");e.protocol&&(e.defaultProtocol=e.protocol);function r(n){return e.servers&&((!n._reconnectCount||n._reconnectCount===e.servers.length)&&(n._reconnectCount=0),e.host=e.servers[n._reconnectCount].host,e.port=e.servers[n._reconnectCount].port,e.protocol=e.servers[n._reconnectCount].protocol?e.servers[n._reconnectCount].protocol:e.defaultProtocol,e.hostname=e.host,n._reconnectCount++),Cg(\"calling streambuilder for\",e.protocol),Re[e.protocol](n,e)}let i=new MS.default(r,e);return i.on(\"error\",()=>{}),i}function NS(t,e,r=!0){return new Promise((i,n)=>{let o=Bg(t,e),s={connect:u=>{a(),i(o);},end:()=>{a(),i(o);},error:u=>{a(),o.end(),n(u);}};r===!1&&(s.close=()=>{s.error(new Error(\"Couldn't connect to server\"));});function a(){Object.keys(s).forEach(u=>{o.off(u,s[u]);});}Object.keys(s).forEach(u=>{o.on(u,s[u]);});})}Rr.connectAsync=NS;Rr.default=Bg;});var ml=M(G=>{v();m();_();var Og=G&&G.__createBinding||(Object.create?function(t,e,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(e,r);(!n||(\"get\"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,i,n);}:function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r];}),qS=G&&G.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,\"default\",{enumerable:!0,value:e});}:function(t,e){t.default=e;}),DS=G&&G.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!==\"default\"&&Object.prototype.hasOwnProperty.call(t,r)&&Og(e,t,r);return qS(e,t),e},kg=G&&G.__exportStar||function(t,e){for(var r in t)r!==\"default\"&&!Object.prototype.hasOwnProperty.call(e,r)&&Og(e,t,r);},Ni=G&&G.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(G,\"__esModule\",{value:!0});G.ReasonCodes=G.PingTimer=G.UniqueMessageIdProvider=G.DefaultMessageIdProvider=G.Store=G.MqttClient=G.connectAsync=G.connect=G.Client=void 0;var xg=Ni(ns());G.MqttClient=xg.default;var jS=Ni(Yo());G.DefaultMessageIdProvider=jS.default;var FS=Ni($p());G.UniqueMessageIdProvider=FS.default;var WS=Ni(Zo());G.Store=WS.default;var Mg=DS(Pg());G.connect=Mg.default;Object.defineProperty(G,\"connectAsync\",{enumerable:!0,get:function(){return Mg.connectAsync}});var $S=Ni(Da());G.PingTimer=$S.default;G.Client=xg.default;kg(ns(),G);kg(Jr(),G);var HS=Ai();Object.defineProperty(G,\"ReasonCodes\",{enumerable:!0,get:function(){return HS.ReasonCodes}});});var QS=M(We=>{v();m();_();var Lg=We&&We.__createBinding||(Object.create?function(t,e,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(e,r);(!n||(\"get\"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,i,n);}:function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r];}),VS=We&&We.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,\"default\",{enumerable:!0,value:e});}:function(t,e){t.default=e;}),zS=We&&We.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!==\"default\"&&Object.prototype.hasOwnProperty.call(t,r)&&Lg(e,t,r);return VS(e,t),e},KS=We&&We.__exportStar||function(t,e){for(var r in t)r!==\"default\"&&!Object.prototype.hasOwnProperty.call(e,r)&&Lg(e,t,r);};Object.defineProperty(We,\"__esModule\",{value:!0});var GS=zS(ml());We.default=GS;KS(ml(),We);});var mqtt = QS();\n/*! Bundled license information:\n\n@jspm/core/nodelibs/browser/buffer.js:\n (*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh *)\n*/\n\nclass CloudInteropAPI {\n connectParams;\n _sessionDetails;\n _mqttClient;\n reconnectRetryLimit = 30;\n reconnectRetries = 0;\n contextListener;\n constructor(connectParams) {\n this.connectParams = connectParams;\n }\n get sessionDetails() {\n return this._sessionDetails;\n }\n get mqttClient() {\n return this._mqttClient;\n }\n async connect(params) {\n const { userId, password, sourceId, platformId } = params;\n let connectResponse;\n try {\n connectResponse = await axios.post(`${this.connectParams.url}/sessions`, {\n userId,\n sourceId,\n platformId\n });\n if (connectResponse.status !== 200) {\n throw new Error(`Failed to connect to Cloud Interop url: ${this.connectParams.url}`);\n }\n const { sessionRootTopic } = connectResponse.data;\n const lastWillPayload = {\n userId,\n sourceId,\n platformId,\n sessionId: connectResponse.data.sessionId\n };\n const clientOptions = {\n clientId: connectResponse.data.sessionId,\n clean: true,\n protocolVersion: 5,\n will: {\n topic: 'interop/lastwill',\n payload: Buffer.from(JSON.stringify(lastWillPayload)),\n qos: 0,\n retain: false\n },\n username: userId,\n password\n };\n this._mqttClient = await mqtt.connectAsync(connectResponse.data.mqttUrl, clientOptions);\n this._sessionDetails = connectResponse.data;\n console.log(`Cloud Interop successfully connected to ${this.connectParams.url}`);\n this._mqttClient.on('error', (error) => {\n console.error(`Cloud Interop Error: ${error}`);\n });\n this._mqttClient.stream.on('error', (error) => {\n console.error(`Cloud Interop Connection Error: ${error}`);\n });\n this._mqttClient.on('reconnect', () => {\n console.warn(`Cloud Interop attempting reconnection...`);\n // Default reconnectPeriod = 30 seconds\n // Attempt reconnection 30 times before ending session\n this.reconnectRetries += 1;\n if (this.reconnectRetries === this.reconnectRetryLimit) {\n console.warn(`Cloud Interop reached max reconnection attempts...`);\n this.disconnect();\n }\n });\n // Does not fire on initial connection, only successful reconnection attempts\n this._mqttClient.on('connect', () => {\n console.log(`Cloud Interop successfully reconnected`);\n this.reconnectRetries = 0;\n });\n this._mqttClient.on('message', (topic, message) => {\n this.handleCommand(topic, message, this._sessionDetails);\n });\n // Subscribe to all context groups\n this._mqttClient.subscribe(`${sessionRootTopic}/context-groups/#`);\n // Listen out for global commands\n this._mqttClient.subscribe(`${sessionRootTopic}/commands`);\n }\n catch (error) {\n console.warn(`Failed to connect to Cloud Interop at ${this.connectParams.url}`, error);\n }\n }\n async disconnect() {\n if (!this._sessionDetails) {\n return;\n }\n try {\n const disconnectResponse = await axios.delete(`${this.connectParams.url}/sessions/${this._sessionDetails.sessionId}`);\n if (disconnectResponse.status !== 200) {\n console.warn(`Cloud Interop disconnection failed`, disconnectResponse);\n }\n }\n catch (error) {\n console.warn(`Cloud Interop error during disconnection`, error);\n }\n finally {\n this._mqttClient?.removeAllListeners();\n this._mqttClient?.end(true);\n this._sessionDetails = undefined;\n this._mqttClient = undefined;\n this.reconnectRetries = 0;\n }\n }\n async setContext(contextGroup, context) {\n if (!this._sessionDetails) {\n return;\n }\n const { userId, sourceId } = this.connectParams;\n const payload = {\n userId,\n sourceId,\n context\n };\n await axios.post(`${this.connectParams.url}/context-groups/${this._sessionDetails.sessionId}/${contextGroup}`, payload);\n }\n addContextListener(callback) {\n this.contextListener = callback;\n }\n startIntentDiscovery(intentName, context) {\n throw new Error('Method not implemented.');\n }\n endIntentDiscovery(discoveryId) {\n throw new Error('Method not implemented.');\n }\n sendIntentDetail(discoveryId, intentDetail) {\n throw new Error('Method not implemented.');\n }\n raiseIntent(targetSession, intentInstanceId, context) {\n throw new Error('Method not implemented.');\n }\n addIntentDetailListener(callback) {\n throw new Error('Method not implemented.');\n }\n handleCommand(topic, message, sessionDetails) {\n if (message.length === 0 || !sessionDetails) {\n // Ignore clean up messages\n return;\n }\n const messageEnvelope = JSON.parse(message.toString());\n if (topic.startsWith(`${sessionDetails.sessionRootTopic}/context-groups/`)) {\n if (messageEnvelope.source.sessionId === sessionDetails.sessionId) {\n return;\n }\n if (this.contextListener) {\n const { channelName: contextGroup, payload: context, source } = messageEnvelope;\n this.contextListener(contextGroup, context, source);\n }\n }\n }\n}\n\nasync function cloudInteropOverride(config) {\n const client = new CloudInteropAPI(config);\n try {\n await client.connect(config);\n }\n catch (err) {\n console.warn(err);\n return (Base) => {\n return class NoOpOverride extends Base {\n constructor() {\n super();\n }\n };\n };\n }\n return (Base) => {\n return class CloudInteropOverride extends Base {\n constructor() {\n super();\n client.addContextListener((contextGroup, context, source) => {\n if (this.getContextGroups()\n .map(({ id }) => id)\n .includes(contextGroup) &&\n client.sessionDetails?.sessionId !== source.sessionId) {\n super.setContextForGroup({ context: context }, contextGroup);\n }\n });\n }\n async setContextForGroup({ context }, contextGroupId) {\n client.setContext(contextGroupId, context);\n super.setContextForGroup({ context }, contextGroupId);\n }\n async cloudReconnect() {\n await client.connect(config);\n }\n get cloudConnectionState() {\n if (client.mqttClient?.connected) {\n return 'connected';\n }\n if (client.mqttClient?.reconnecting) {\n return 'reconnecting';\n }\n return 'disconnected';\n }\n };\n };\n}\n\nexport { cloudInteropOverride };\n","\"use strict\";var e=require(\"./main-8cad4070.js\");require(\"buffer/\"),require(\"uuid\"),require(\"events\"),require(\"lodash/cloneDeep\"),require(\"lodash/isEqual\"),exports.connect=e.connect;\n","\"use strict\";var e=require(\"buffer/\"),t=require(\"events\"),n=require(\"lodash/cloneDeep\"),i=require(\"lodash/isEqual\"),r=require(\"uuid\");const o=(e,t)=>`${t}<${btoa(JSON.stringify(e))}>`;var s=\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof window?window:\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:{},a={},c={},d={},h={};async function l(e){const t=[];for(const n of e){const e=await n();t.push(e)}return t}Object.defineProperty(h,\"__esModule\",{value:!0}),h.promiseMapSerial=h.serial=h.promiseMap=h.promisify=void 0,h.promisify=function(e){return(...t)=>new Promise(((n,i)=>{e(...t,((e,t)=>e?i(e):n(t)))}))},h.promiseMap=async function(e,t){return Promise.all(e.map(t))},h.serial=l,h.promiseMapSerial=async function(e,t){return l(e.map(((e,n,i)=>()=>t(e,n,i))))};var u,p=s&&s.__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},w=s&&s.__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)};Object.defineProperty(d,\"__esModule\",{value:!0}),d.Reply=d.EmitterBase=d.Base=void 0;const y=h;class f{constructor(e){this.isNodeEnvironment=()=>\"node\"===this.wire.environment.type,this.isOpenFinEnvironment=()=>\"openfin\"===this.wire.environment.type,this.isBrowserEnvironment=()=>\"other\"===this.wire.environment.type,this.wire=e}get fin(){return this.wire.getFin()}get me(){return this.wire.me}}d.Base=f;d.EmitterBase=class extends f{constructor(e,t,...n){super(e),this.topic=t,u.set(this,void 0),this.eventNames=()=>this.hasEmitter()?this.getOrCreateEmitter().eventNames():[],this.emit=(e,t,...n)=>!!this.hasEmitter()&&this.getOrCreateEmitter().emit(e,t,...n),this.hasEmitter=()=>this.wire.eventAggregator.has(w(this,u,\"f\")),this.getOrCreateEmitter=()=>this.wire.eventAggregator.getOrCreate(w(this,u,\"f\")),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[],this.listenerCount=e=>this.hasEmitter()?this.getOrCreateEmitter().listenerCount(e):0,this.registerEventListener=async(e,t={},n,i)=>{const r={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e},o=this.getOrCreateEmitter();n(o);try{await this.wire.sendAction(\"subscribe-to-desktop-event\",r)}catch(e){throw i(o),this.deleteEmitterIfNothingRegistered(o),e}},this.deregisterEventListener=async(e,t={})=>{if(this.hasEmitter()){const n={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e};await this.wire.sendAction(\"unsubscribe-to-desktop-event\",n).catch((()=>null));return this.getOrCreateEmitter()}return Promise.resolve()},p(this,u,[t,...n],\"f\"),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[]}async on(e,t,n){return await this.registerEventListener(e,n,(n=>{n.on(e,t)}),(n=>{n.removeListener(e,t)})),this}async addListener(e,t,n){return this.on(e,t,n)}async once(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.once(e,i),n.once(e,t)}),(n=>{n.removeListener(e,i),n.removeListener(e,t)})),this}async prependListener(e,t,n){return await this.registerEventListener(e,n,(n=>{n.prependListener(e,t)}),(n=>{n.removeListener(e,t)})),this}async prependOnceListener(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.prependOnceListener(e,t),n.once(e,i)}),(n=>{n.removeListener(e,t),n.removeListener(e,i)})),this}async removeListener(e,t,n){const i=await this.deregisterEventListener(e,n);return i&&(i.removeListener(e,t),this.deleteEmitterIfNothingRegistered(i)),this}async deregisterAllListeners(e){const t={...this.identity,type:e,topic:this.topic};if(this.hasEmitter()){const e=this.getOrCreateEmitter(),n=e.listenerCount(t.type),i=[];for(let e=0;enull)));return await Promise.all(i),e}}async removeAllListeners(e){const t=async e=>{const t=await this.deregisterAllListeners(e);t&&(t.removeAllListeners(e),this.deleteEmitterIfNothingRegistered(t))};if(e)await t(e);else if(this.hasEmitter()){const e=this.getOrCreateEmitter().eventNames();await(0,y.promiseMap)(e,t)}return this}deleteEmitterIfNothingRegistered(e){0===e.eventNames().length&&this.wire.eventAggregator.delete(w(this,u,\"f\"))}},u=new WeakMap;d.Reply=class{};var g={};Object.defineProperty(g,\"__esModule\",{value:!0});var m=g.RuntimeError=g.NotSupportedError=g.NotImplementedError=g.NoAckError=g.DuplicateCorrelationError=g.UnexpectedActionError=g.DisconnectedError=void 0;class v extends Error{constructor(e){super(`Expected websocket state OPEN but found ${e}`),this.readyState=e}}g.DisconnectedError=v;class C extends Error{}g.UnexpectedActionError=C;class b extends Error{}g.DuplicateCorrelationError=b;class I extends Error{}g.NoAckError=I;class E extends Error{}g.NotImplementedError=E;class x extends Error{}g.NotSupportedError=x;class A extends Error{constructor(e){const{message:t,name:n,stack:i,...r}=e;super(t),this.name=n||\"Error\",this.stack=i??this.toString(),Object.keys(r).forEach((e=>{this[e]=r[e]}))}}class P extends Error{static getCallSite(e=0){const t=Error.stackTraceLimit,n=e+1;Error.stackTraceLimit=t+n;const i=Error.prepareStackTrace;Error.prepareStackTrace=(e,t)=>t;const r=(new Error).stack?.slice(n)??[];return Error.prepareStackTrace=i,Error.stackTraceLimit=t,r}static prepareStackTrace(e,t){if(\"function\"==typeof Error.prepareStackTrace)return Error.prepareStackTrace(e,t);let n=\"\";n+=e.name||\"Error\",n+=`: ${e.message||\"\"}`;for(const e of t)n+=`\\n at ${e.toString()}`;return n}constructor(e,t){const{reason:n,error:i}=e;super(n),this.name=\"RuntimeError\",i?.stack&&(this.cause=new A(i)),t&&(this.stack=P.prepareStackTrace(this,t))}}m=g.RuntimeError=P;var M={},_={},O={};Object.defineProperty(O,\"__esModule\",{value:!0}),O.validateIdentity=void 0,O.validateIdentity=function(e){let t;return\"object\"==typeof e&&\"string\"==typeof e.uuid||(t=\"Not a valid identity object\"),t};var S={},R={},F={},j={},k={},L={},T={};Object.defineProperty(T,\"__esModule\",{value:!0}),T.handleDeprecatedWarnings=void 0;var $;T.handleDeprecatedWarnings=e=>{(e.contentNavigation?.whitelist||e.contentNavigation?.blacklist||e.contentRedirect?.whitelist||e.contentRedirect?.blacklist)&&console.warn(\"The properties 'whitelist' and 'blacklist' have been marked as deprecated and will be removed in a future version. Please use 'allowlist' and 'denylist'.\")};var B={},G={};Object.defineProperty(G,\"__esModule\",{value:!0}),G.AsyncRetryableLazy=W=G.Lazy=void 0;var W=G.Lazy=class{constructor(e){this.producerFn=e}getValue(){return this.value||(this.value=this.producerFn()),this.value}};G.AsyncRetryableLazy=class{constructor(e){this.producerFn=e}async getValue(){return this.promise||(this.promise=this.producerFn().catch((e=>{throw delete this.promise,e}))),this.promise}};var H={};Object.defineProperty(H,\"__esModule\",{value:!0}),H.WebContents=void 0;const N=d;class D extends N.EmitterBase{constructor(e,t,n){super(e,n,t.uuid,t.name),this.identity=t,this.entityType=n}capturePage(e){return this.wire.sendAction(\"capture-page\",{options:e,...this.identity}).then((({payload:e})=>e.data))}executeJavaScript(e){return this.wire.sendAction(\"execute-javascript-in-window\",{...this.identity,code:e}).then((({payload:e})=>e.data))}getZoomLevel(){return this.wire.sendAction(\"get-zoom-level\",this.identity).then((({payload:e})=>e.data))}setZoomLevel(e){return this.wire.sendAction(\"set-zoom-level\",{...this.identity,level:e}).then((()=>{}))}navigate(e){return this.wire.sendAction(\"navigate-window\",{...this.identity,url:e}).then((()=>{}))}navigateBack(){return this.wire.sendAction(\"navigate-window-back\",{...this.identity}).then((()=>{}))}async navigateForward(){await this.wire.sendAction(\"navigate-window-forward\",{...this.identity})}stopNavigation(){return this.wire.sendAction(\"stop-window-navigation\",{...this.identity}).then((()=>{}))}reload(e=!1){return this.wire.sendAction(\"reload-window\",{ignoreCache:e,...this.identity}).then((()=>{}))}print(e={}){return this.wire.sendAction(\"print\",{...this.identity,options:e}).then((()=>{}))}findInPage(e,t){return this.wire.sendAction(\"find-in-page\",{...this.identity,searchTerm:e,options:t}).then((({payload:e})=>e.data))}stopFindInPage(e){return this.wire.sendAction(\"stop-find-in-page\",{...this.identity,action:e}).then((()=>{}))}getPrinters(){return this.wire.sendAction(\"get-printers\",{...this.identity}).then((({payload:e})=>e.data))}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){await this.wire.sendAction(\"focus-window\",{emitSynthFocused:e,...this.identity})}async showDeveloperTools(){await this.wire.sendAction(\"show-developer-tools\",this.identity)}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction(\"get-process-info\",this.identity);return e}async getSharedWorkers(){return this.wire.sendAction(\"get-shared-workers\",this.identity).then((({payload:e})=>e.data))}async inspectSharedWorker(){await this.wire.sendAction(\"inspect-shared-worker\",{...this.identity})}async inspectSharedWorkerById(e){await this.wire.sendAction(\"inspect-shared-worker-by-id\",{...this.identity,workerId:e})}async inspectServiceWorker(){await this.wire.sendAction(\"inspect-service-worker\",{...this.identity})}async showPopupWindow(e){if(this.wire.sendAction(`${this.entityType}-show-popup-window`,this.identity).catch((()=>{})),e?.onPopupReady){const t=async({popupName:t})=>{try{const n=this.fin.Window.wrapSync({uuid:this.fin.me.uuid,name:t});await e.onPopupReady(n)}catch(e){throw new Error(`Something went wrong during onPopupReady execution: ${e}`)}};await this.once(\"popup-ready\",t)}const{payload:t}=await this.wire.sendAction(\"try-create-popup-window\",{options:{...e,hasResultCallback:!!e?.onPopupResult,hasReadyCallback:!!e?.onPopupReady},...this.identity}),{data:{willOpen:n,options:i}}=t;n&&await this.fin.Window.create(i.initialOptions);if(e?.onPopupResult){const t=async t=>{await e.onPopupResult((e=>{const{name:t,uuid:n,result:i,data:r}=e,o={identity:{name:t,uuid:n},result:i};return r&&(o.data=r),o})(t))},n=async()=>{await this.removeListener(\"popup-result\",t)};await this.on(\"popup-result\",t),await this.once(\"popup-teardown\",n)}const{payload:r}=await this.wire.sendAction(\"show-popup-window\",{options:i,...this.identity});return r.data}}var U,V,z,K,q;function J(){return V||(V=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(function(){if($)return L;$=1,Object.defineProperty(L,\"__esModule\",{value:!0}),L.ViewModule=void 0;const e=d,t=O,n=J(),i=T;class r extends e.Base{async create(e){const{uuid:t}=this.wire.me;if(!e.name||\"string\"!=typeof e.name)throw new Error(\"Please provide a name property as a string in order to create a View.\");return(0,i.handleDeprecatedWarnings)(e),this.wire.environment.childViews?await this.wire.environment.createChildContent({entityType:\"view\",options:{...e,uuid:t}}):await this.wire.sendAction(\"create-view\",{...e,uuid:t}),this.wrapSync({uuid:t,name:e.name})}async wrap(e){this.wire.sendAction(\"view-wrap\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}wrapSync(e){this.wire.sendAction(\"view-wrap-sync\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}getCurrent(){if(this.wire.sendAction(\"view-get-current\").catch((e=>{})),!this.wire.me.isView)throw new Error(\"You are not in a View context\");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction(\"view-get-current-sync\").catch((e=>{})),!this.wire.me.isView)throw new Error(\"You are not in a View context\");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return L.ViewModule=r,L}(),e),n(function(){if(U)return B;var e;U=1,Object.defineProperty(B,\"__esModule\",{value:!0}),B.View=void 0;const t=g,n=G,i=H,r=ie();class o extends i.WebContents{constructor(i,o){super(i,o,\"view\"),this.identity=o,e.set(this,new n.Lazy((()=>this.fin.Platform.wrapSync(this.identity).getClient()))),this.attach=async e=>{await this.wire.sendAction(\"attach-view\",{target:e,...this.identity})},this.destroy=async()=>{await this.wire.sendAction(\"destroy-view\",{...this.identity})},this.show=async()=>{await this.wire.sendAction(\"show-view\",{...this.identity})},this.showAt=async(e,t={})=>{await this.wire.sendAction(\"show-view-at\",{bounds:e,...this.identity,options:t})},this.bringToFront=async()=>{await this.wire.sendAction(\"bring-view-to-front\",{...this.identity})},this.hide=async()=>{await this.wire.sendAction(\"hide-view\",{...this.identity})},this.setBounds=async e=>{await this.wire.sendAction(\"set-view-bounds\",{bounds:e,...this.identity})},this.getBounds=async()=>(await this.wire.sendAction(\"get-view-bounds\",{...this.identity})).payload.data,this.getInfo=async()=>(await this.wire.sendAction(\"get-view-info\",{...this.identity})).payload.data,this.getParentLayout=async()=>(this.wire.sendAction(\"view-get-parent-layout\",{...this.identity}).catch((()=>{})),this.fin.Platform.Layout.getLayoutByViewIdentity(this.identity)),this.getOptions=async()=>this.wire.sendAction(\"get-view-options\",{...this.identity}).then((({payload:e})=>e.data)),this.updateOptions=async e=>this.wire.sendAction(\"update-view-options\",{options:e,...this.identity}).then((()=>{})),this.getCurrentWindow=async()=>{const{payload:{data:e}}=await this.wire.sendAction(\"get-view-window\",{...this.identity});return new r._Window(this.wire,e)},this.getCurrentStack=async()=>{this.wire.sendAction(\"view-get-current-stack\").catch((()=>{}));try{return(await this.getParentLayout()).getStackByViewIdentity(this.identity)}catch(e){throw new t.RuntimeError({reason:\"This view does not belong to a stack.\",error:e})}},this.triggerBeforeUnload=async()=>(await this.wire.sendAction(\"trigger-before-unload\",{...this.identity})).payload.data,this.bindToElement=async e=>{if(!e)throw new Error(\"Element not found.\");return this.wire.environment.observeBounds(e,(async e=>this.setBounds(e)))}}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){const t=await this.getCurrentWindow();await t.focusedWebViewWasChanged(),await super.focus({emitSynthFocused:e})}}return B.View=o,e=new WeakMap,B}(),e)}(k)),k}function Y(){if(z)return j;z=1,Object.defineProperty(j,\"__esModule\",{value:!0}),j.Application=void 0;const e=d,t=ie(),n=J();class i extends e.EmitterBase{constructor(e,n){super(e,\"application\",n.uuid),this.identity=n,this.window=new t._Window(this.wire,{uuid:this.identity.uuid,name:this.identity.uuid})}windowListFromIdentityList(e){const n=[];return e.forEach((e=>{n.push(new t._Window(this.wire,{uuid:e.uuid,name:e.name}))})),n}isRunning(){return this.wire.sendAction(\"is-application-running\",this.identity).then((({payload:e})=>e.data))}async quit(e=!1){try{await this._close(e),await this.wire.sendAction(\"destroy-application\",{force:e,...this.identity})}catch(e){if(![\"Remote connection has closed\",\"Could not locate the requested application\"].some((t=>e.message.includes(t))))throw e}}async _close(e=!1){try{await this.wire.sendAction(\"close-application\",{force:e,...this.identity})}catch(e){if(!e.message.includes(\"Remote connection has closed\"))throw e}}close(e=!1){return console.warn(\"Deprecation Warning: Application.close is deprecated Please use Application.quit\"),this.wire.sendAction(\"application-close\",this.identity).catch((e=>{})),this._close(e)}getChildWindows(){return this.wire.sendAction(\"get-child-windows\",this.identity).then((({payload:e})=>{const t=[];return e.data.forEach((e=>{t.push({uuid:this.identity.uuid,name:e})})),this.windowListFromIdentityList(t)}))}getManifest(){return this.wire.sendAction(\"get-application-manifest\",this.identity).then((({payload:e})=>e.data))}getParentUuid(){return this.wire.sendAction(\"get-parent-application\",this.identity).then((({payload:e})=>e.data))}getShortcuts(){return this.wire.sendAction(\"get-shortcuts\",this.identity).then((({payload:e})=>e.data))}async getViews(){const{payload:e}=await this.wire.sendAction(\"application-get-views\",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}getZoomLevel(){return this.wire.sendAction(\"get-application-zoom-level\",this.identity).then((({payload:e})=>e.data))}getWindow(){return this.wire.sendAction(\"application-get-window\",this.identity).catch((e=>{})),Promise.resolve(this.window)}registerUser(e,t){return this.wire.sendAction(\"register-user\",{userName:e,appName:t,...this.identity}).then((()=>{}))}removeTrayIcon(){return this.wire.sendAction(\"remove-tray-icon\",this.identity).then((()=>{}))}restart(){return this.wire.sendAction(\"restart-application\",this.identity).then((()=>{}))}run(){return console.warn(\"Deprecation Warning: Application.run is deprecated Please use fin.Application.start\"),this.wire.sendAction(\"application-run\",this.identity).catch((e=>{})),this._run()}_run(e={}){return this.wire.sendAction(\"run-application\",{manifestUrl:this._manifestUrl,opts:e,...this.identity}).then((()=>{}))}scheduleRestart(){return this.wire.sendAction(\"relaunch-on-close\",this.identity).then((()=>{}))}async sendApplicationLog(){const{payload:e}=await this.wire.sendAction(\"send-application-log\",this.identity);return e.data}async setJumpList(e){await this.wire.sendAction(\"set-jump-list\",{config:e,...this.identity})}setTrayIcon(e){return this.wire.sendAction(\"set-tray-icon\",{enabledIcon:e,...this.identity}).then((()=>{}))}setShortcuts(e){return this.wire.sendAction(\"set-shortcuts\",{data:e,...this.identity}).then((()=>{}))}async setShortcutQueryParams(e){await this.wire.sendAction(\"set-shortcut-query-args\",{data:e,...this.identity})}setZoomLevel(e){return this.wire.sendAction(\"set-application-zoom-level\",{level:e,...this.identity}).then((()=>{}))}async setAppLogUsername(e){await this.wire.sendAction(\"set-app-log-username\",{data:e,...this.identity})}getTrayIconInfo(){return this.wire.sendAction(\"get-tray-icon-info\",this.identity).then((({payload:e})=>e.data))}hasTrayIcon(){return this.wire.sendAction(\"has-tray-icon\",this.identity).then((({payload:e})=>e.data))}terminate(){return this.wire.sendAction(\"terminate-application\",this.identity).then((()=>{}))}wait(){return this.wire.sendAction(\"wait-for-hung-application\",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction(\"get-info\",this.identity).then((({payload:e})=>e.data))}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction(\"application-get-process-info\",this.identity);return e}async setFileDownloadLocation(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t};await this.wire.sendAction(\"set-file-download-location\",{...n,downloadLocation:e})}async getFileDownloadLocation(){const{payload:{data:e}}=await this.wire.sendAction(\"get-file-download-location\",this.identity);return e}async showTrayIconPopupMenu(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t},{payload:i}=await this.wire.sendAction(\"show-tray-icon-popup-menu\",{...n,options:e});return i.data}async closeTrayIconPopupMenu(){const{name:e}=this.wire.me,t={uuid:this.identity.uuid,name:e};await this.wire.sendAction(\"close-tray-icon-popup-menu\",{...t})}}return j.Application=i,j}function Z(){return q||(q=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(function(){if(K)return F;K=1,Object.defineProperty(F,\"__esModule\",{value:!0}),F.ApplicationModule=void 0;const e=d,t=O,n=Y();class i extends e.Base{async wrap(e){this.wire.sendAction(\"wrap-application\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}wrapSync(e){this.wire.sendAction(\"wrap-application-sync\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}async _create(e){return void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&void 0===e.isPlatformController&&(e.autoShow=!0),await this.wire.sendAction(\"create-application\",e),this.wrap({uuid:e.uuid})}create(e){return console.warn(\"Deprecation Warning: fin.Application.create is deprecated. Please use fin.Application.start\"),this.wire.sendAction(\"application-create\").catch((e=>{})),this._create(e)}async start(e){this.wire.sendAction(\"start-application\").catch((e=>{}));const t=await this._create(e);return await this.wire.sendAction(\"run-application\",{uuid:e.uuid}),t}async startManyManifests(e,t){return this.wire.sendAction(\"run-applications\",{applications:e,opts:t}).then((()=>{}))}getCurrent(){return this.wire.sendAction(\"get-current-application\").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction(\"get-current-application-sync\").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}async startFromManifest(e,t){this.wire.sendAction(\"application-start-from-manifest\").catch((e=>{}));const n=await this._createFromManifest(e);return await n._run(t),n}createFromManifest(e){return console.warn(\"Deprecation Warning: fin.Application.createFromManifest is deprecated. Please use fin.Application.startFromManifest\"),this.wire.sendAction(\"application-create-from-manifest\").catch((e=>{})),this._createFromManifest(e)}_createFromManifest(e){return this.wire.sendAction(\"get-application-manifest\",{manifestUrl:e}).then((({payload:e})=>{const t=e.data.platform?e.data.platform.uuid:e.data.startup_app.uuid;return this.wrap({uuid:t})})).then((t=>(t._manifestUrl=e,t)))}}return F.ApplicationModule=i,F}(),e),n(Y(),e)}(R)),R}H.WebContents=D;var Q={};Object.defineProperty(Q,\"__esModule\",{value:!0}),Q.promisifySubscription=void 0;var X,ee,te;function ne(){if(X)return S;X=1,Object.defineProperty(S,\"__esModule\",{value:!0}),S._Window=void 0;const e=Z(),t=H,n=J(),i=T,r=Q;class o extends t.WebContents{constructor(e,t){super(e,t,\"window\")}async createWindow(e){this.wire.sendAction(\"window-create-window\",this.identity).catch((e=>{}));const t=await(0,r.promisifySubscription)(this,\"fire-constructor-callback\");void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&(e.autoShow=!0),(0,i.handleDeprecatedWarnings)(e);const n=this.wire.environment.createChildContent({entityType:\"window\",options:e}),[o]=await Promise.all([t.getValue(),n]);let s;const{success:a}=o,c=o.data,{message:d}=c;s=a?{httpResponseCode:c.httpResponseCode,apiInjected:c.apiInjected}:{message:c.message,networkErrorCode:c.networkErrorCode,stack:c.stack};const h={message:d,cbPayload:s,success:a};try{this.getWebWindow().fin.__internal_.openerSuccessCBCalled()}catch(e){}return h.success?this:Promise.reject(h)}getAllFrames(){return this.wire.sendAction(\"get-all-frames\",this.identity).then((({payload:e})=>e.data))}getBounds(){return this.wire.sendAction(\"get-window-bounds\",this.identity).then((({payload:e})=>e.data))}center(){return this.wire.sendAction(\"center-window\",this.identity).then((()=>{}))}blur(){return this.wire.sendAction(\"blur-window\",this.identity).then((()=>{}))}bringToFront(){return this.wire.sendAction(\"bring-window-to-front\",this.identity).then((()=>{}))}animate(e,t){return this.wire.sendAction(\"animate-window\",{transitions:e,options:t,...this.identity}).then((()=>{}))}hide(){return this.wire.sendAction(\"hide-window\",this.identity).then((()=>{}))}close(e=!1){return this.wire.sendAction(\"close-window\",{force:e,...this.identity}).then((()=>{Object.setPrototypeOf(this,null)}))}focusedWebViewWasChanged(){return this.wire.sendAction(\"focused-webview-changed\",this.identity).then((()=>{}))}getNativeId(){return this.wire.sendAction(\"get-window-native-id\",this.identity).then((({payload:e})=>e.data))}async getCurrentViews(){const{payload:e}=await this.wire.sendAction(\"window-get-views\",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}disableFrame(){return console.warn(\"Function is deprecated; use disableUserMovement instead.\"),this.wire.sendAction(\"disable-window-frame\",this.identity).then((()=>{}))}disableUserMovement(){return this.wire.sendAction(\"disable-window-frame\",this.identity).then((()=>{}))}enableFrame(){return console.warn(\"Function is deprecated; use enableUserMovement instead.\"),this.wire.sendAction(\"enable-window-frame\",this.identity).then((()=>{}))}enableUserMovement(){return this.wire.sendAction(\"enable-window-frame\",this.identity).then((()=>{}))}flash(){return this.wire.sendAction(\"flash-window\",this.identity).then((()=>{}))}stopFlashing(){return this.wire.sendAction(\"stop-flash-window\",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction(\"get-window-info\",this.identity).then((({payload:e})=>e.data))}async getLayout(e){this.wire.sendAction(\"window-get-layout\",this.identity).catch((e=>{}));const t=await this.getOptions();if(!t.layout&&!t.layoutSnapshot)throw new Error(\"Window does not have a Layout\");return this.fin.Platform.Layout.wrap(e??this.identity)}getOptions(){return this.wire.sendAction(\"get-window-options\",this.identity).then((({payload:e})=>e.data))}getParentApplication(){return this.wire.sendAction(\"window-get-parent-application\",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity))}getParentWindow(){return this.wire.sendAction(\"window-get-parent-window\",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity)).then((e=>e.getWindow()))}async getSnapshot(e){const t={area:e,...this.identity};console.warn(\"Window.getSnapshot has been deprecated, please use Window.capturePage\");return(await this.wire.sendAction(\"get-window-snapshot\",t)).payload.data}getState(){return this.wire.sendAction(\"get-window-state\",this.identity).then((({payload:e})=>e.data))}getWebWindow(){return this.wire.sendAction(\"window-get-web-window\",this.identity).catch((e=>{})),this.wire.environment.getWebWindow(this.identity)}isMainWindow(){return this.wire.sendAction(\"window-is-main-window\",this.identity).catch((e=>{})),this.me.uuid===this.me.name}isShowing(){return this.wire.sendAction(\"is-window-showing\",this.identity).then((({payload:e})=>e.data))}maximize(){return this.wire.sendAction(\"maximize-window\",this.identity).then((()=>{}))}minimize(){return this.wire.sendAction(\"minimize-window\",this.identity).then((()=>{}))}moveBy(e,t,n){return this.wire.sendAction(\"move-window-by\",{deltaLeft:e,deltaTop:t,positioningOptions:n,...this.identity}).then((()=>{}))}moveTo(e,t,n){return this.wire.sendAction(\"move-window\",{left:e,top:t,positioningOptions:n,...this.identity}).then((()=>{}))}resizeBy(e,t,n,i){return this.wire.sendAction(\"resize-window-by\",{deltaWidth:Math.floor(e),deltaHeight:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}resizeTo(e,t,n,i){return this.wire.sendAction(\"resize-window\",{width:Math.floor(e),height:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}restore(){return this.wire.sendAction(\"restore-window\",this.identity).then((()=>{}))}setAsForeground(){return this.wire.sendAction(\"set-foreground-window\",this.identity).then((()=>{}))}setBounds(e,t){return this.wire.sendAction(\"set-window-bounds\",{...e,...this.identity,positioningOptions:t}).then((()=>{}))}show(e=!1){return this.wire.sendAction(\"show-window\",{force:e,...this.identity}).then((()=>{}))}showAt(e,t,n=!1){return this.wire.sendAction(\"show-at-window\",{force:n,left:Math.floor(e),top:Math.floor(t),...this.identity}).then((()=>{}))}updateOptions(e){return this.wire.sendAction(\"update-window-options\",{options:e,...this.identity}).then((()=>{}))}authenticate(e,t){return this.wire.sendAction(\"window-authenticate\",{userName:e,password:t,...this.identity}).then((()=>{}))}async showPopupMenu(e){const{payload:t}=await this.wire.sendAction(\"show-popup-menu\",{options:e,...this.identity});return t.data}async closePopupMenu(){return this.wire.sendAction(\"close-popup-menu\",{...this.identity}).then((()=>{}))}async dispatchPopupResult(e){this.wire.sendAction(\"window-dispatch-popup-result\",this.identity).catch((e=>{})),await this.wire.sendAction(\"dispatch-popup-result\",{data:e,...this.identity})}async print(e={content:\"self\"}){switch(e.content){case void 0:case\"self\":return super.print(e);case\"screenshot\":return this.wire.sendAction(\"print-screenshot\",this.identity).then((()=>{}));case\"views\":return this.wire.sendAction(\"print-views\",{...this.identity,options:e}).then((()=>{}));default:return}}}return S._Window=o,S}function ie(){return te||(te=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(function(){if(ee)return _;ee=1,Object.defineProperty(_,\"__esModule\",{value:!0}),_._WindowModule=void 0;const e=d,t=O,n=ne();class i extends e.Base{async wrap(e){this.wire.sendAction(\"window-wrap\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}wrapSync(e){this.wire.sendAction(\"window-wrap-sync\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}create(e){return this.wire.sendAction(\"create-window\").catch((e=>{})),new n._Window(this.wire,{uuid:this.me.uuid,name:e.name}).createWindow(e)}getCurrent(){if(this.wire.sendAction(\"get-current-window\").catch((e=>{})),!this.wire.me.isWindow)throw new Error(\"You are not in a Window context\");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction(\"get-current-window-sync\").catch((e=>{})),!this.wire.me.isWindow)throw new Error(\"You are not in a Window context\");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return _._WindowModule=i,_}(),e),n(ne(),e)}(M)),M}Q.promisifySubscription=async(e,t,n=(()=>!0),i)=>{let r,o,s;const a=new Promise(((e,t)=>{r=e,o=t})),c=e=>{n(e)&&(clearTimeout(s),r(e))};return await e.on(t,c),i&&(s=setTimeout((()=>o(new Error(\"event timed out\"))),i)),a.finally((()=>{e.removeListener(t,c).catch((()=>null))})),{getValue:()=>a}},Object.defineProperty(c,\"__esModule\",{value:!0}),c.System=void 0;const re=d,oe=g,se=ie(),ae=t;class ce extends re.EmitterBase{constructor(e){super(e,\"system\")}sendExternalProcessRequest(e,t){return new Promise(((n,i)=>{const r=\"external-process-exited\";let o,s,a,c;\"function\"==typeof t.listener&&(a=e=>{const n=e||{};s={topic:\"exited\",uuid:n.processUuid||\"\",exitCode:n.exitCode||0},o===e.processUuid&&(t.listener(s),c.removeListener(r,a))},this.wire.me.name||(this.wire.me.name=this.wire.me.uuid),c=new se._Window(this.wire,this.wire.me),c.on(r,a)),this.wire.sendAction(e,t).then((({payload:e})=>{o=e.data.uuid,n(e.data),s&&o===s.uuid&&(t.listener(s),c.removeListener(r,a))})).catch((e=>{c&&c.removeListener(r,a),i(e)}))}))}getVersion(){return this.wire.sendAction(\"get-version\").then((({payload:e})=>e.data))}clearCache(e){return this.wire.sendAction(\"clear-cache\",e).then((()=>{}))}deleteCacheOnExit(){return this.wire.sendAction(\"delete-cache-request\").then((()=>{}))}exit(){return this.wire.sendAction(\"exit-desktop\").then((()=>{}))}async fetchManifest(e){const{payload:{data:t}}=await this.wire.sendAction(\"fetch-manifest\",{manifestUrl:e});return t}flushCookieStore(){return this.wire.sendAction(\"flush-cookie-store\").then((()=>{}))}getAllWindows(){return this.wire.sendAction(\"get-all-windows\").then((({payload:e})=>e.data))}getAllApplications(){return this.wire.sendAction(\"get-all-applications\").then((({payload:e})=>e.data))}getCommandLineArguments(){return this.wire.sendAction(\"get-command-line-arguments\").then((({payload:e})=>e.data))}async getCrashReporterState(){const{payload:{data:{diagnosticMode:e,isRunning:t}}}=await this.wire.sendAction(\"get-crash-reporter-state\");return console.warn(\"diagnosticMode property is deprecated. It will be removed in a future version\"),{diagnosticMode:e,diagnosticsMode:e,isRunning:t}}async startCrashReporter(e){const t=e,n={...t,diagnosticMode:t.diagnosticsMode||t.diagnosticMode},{payload:{data:{diagnosticMode:i,isRunning:r}}}=await this.wire.sendAction(\"start-crash-reporter\",n);return{diagnosticMode:i,diagnosticsMode:i,isRunning:r}}getUniqueUserId(){return this.wire.sendAction(\"get-unique-user-id\").then((({payload:e})=>e.data))}getEntityInfo(e,t){return this.wire.sendAction(\"get-entity-info\",{uuid:e,name:t}).then((({payload:e})=>e.data))}getEnvironmentVariable(e){return this.wire.sendAction(\"get-environment-variable\",{environmentVariables:e}).then((({payload:e})=>e.data))}getFocusedWindow(){return this.wire.sendAction(\"get-focused-window\").then((({payload:e})=>e.data))}async isAppCertified(e){const{payload:{data:{certifiedInfo:t}}}=await this.wire.sendAction(\"is-app-certified\",{manifestUrl:e});return t}getInstalledRuntimes(){return this.wire.sendAction(\"get-installed-runtimes\").then((({payload:e})=>e.data.runtimes))}async getInstalledApps(){const{payload:{data:{installedApps:e}}}=await this.wire.sendAction(\"get-installed-apps\");return e}getLog(e){return this.wire.sendAction(\"view-log\",e).then((({payload:e})=>e.data))}getMachineId(){return this.wire.sendAction(\"get-machine-id\").then((({payload:e})=>e.data))}getMinLogLevel(){return this.wire.sendAction(\"get-min-log-level\").then((({payload:e})=>e.data))}getLogList(){return this.wire.sendAction(\"list-logs\").then((({payload:e})=>e.data))}getMonitorInfo(){return this.wire.sendAction(\"get-monitor-info\").then((({payload:e})=>e.data))}getMousePosition(){return this.wire.sendAction(\"get-mouse-position\").then((({payload:e})=>e.data))}getProcessList(){return console.warn(\"System.getProcessList has been deprecated. Please consider using our new process APIs: Window.getProcessInfo, View.getProcessInfo, Application.getProcessInfo, System.getAllProcessInfo\"),this.wire.sendAction(\"process-snapshot\").then((({payload:e})=>e.data))}async getAllProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction(\"get-all-process-info\",this.identity);return e}getProxySettings(){return this.wire.sendAction(\"get-proxy-settings\").then((({payload:e})=>e.data))}getRuntimeInfo(){return this.wire.sendAction(\"get-runtime-info\").then((({payload:e})=>e.data))}getRvmInfo(){return this.wire.sendAction(\"get-rvm-info\").then((({payload:e})=>e.data))}getHostSpecs(){return this.wire.sendAction(\"get-host-specs\").then((({payload:e})=>e.data))}getOSInfo(){return this.wire.sendAction(\"get-os-info\").then((({payload:e})=>e.data))}launchExternalProcess(e){return this.sendExternalProcessRequest(\"launch-external-process\",e)}monitorExternalProcess(e){return this.sendExternalProcessRequest(\"monitor-external-process\",e)}log(e,t){return this.wire.sendAction(\"write-to-log\",{level:e,message:t}).then((()=>{}))}openUrlWithBrowser(e){return this.wire.sendAction(\"open-url-with-browser\",{url:e}).then((()=>{}))}async registerCustomProtocol(e){if(\"object\"!=typeof e)throw new Error(\"Must provide an object with a `protocolName` property having a string value.\");await this.wire.sendAction(\"register-custom-protocol\",e)}async unregisterCustomProtocol(e){await this.wire.sendAction(\"unregister-custom-protocol\",{protocolName:e})}async getCustomProtocolState(e){return this.wire.sendAction(\"get-custom-protocol-state\",{protocolName:e}).then((({payload:e})=>e.data))}releaseExternalProcess(e){return this.wire.sendAction(\"release-external-process\",{uuid:e}).then((()=>{}))}showDeveloperTools(e){return this.wire.sendAction(\"show-developer-tools\",e).then((()=>{}))}terminateExternalProcess(e){return this.wire.sendAction(\"terminate-external-process\",e).then((()=>{}))}updateProxySettings(e){return this.wire.sendAction(\"update-proxy\",e).then((()=>{}))}async downloadAsset(e,t){const n=()=>{};let i=n,r=n;const o=new Promise(((e,t)=>{i=e,r=t}));if(\"openfin\"!==this.wire.environment.type)throw new oe.NotSupportedError(\"downloadAsset only supported in an OpenFin Render process\");const s=oe.RuntimeError.getCallSite(),a=this.wire.environment.getNextMessageId().toString(),c=`asset-download-progress-${a}`,d=`asset-download-error-${a}`,h=`asset-download-complete-${a}`,l=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},u=()=>{this.removeListener(c,l)};await Promise.all([this.on(c,l),this.once(d,(e=>{u();const{reason:t,err:n}=e;r(new oe.RuntimeError({reason:t,error:n},s))})),this.once(h,(()=>{u(),i()}))]);const p=Object.assign(e,{downloadId:a});return await this.wire.sendAction(\"download-asset\",p).catch((e=>{throw u(),e})),o}downloadRuntime(e,t){const n=oe.RuntimeError.getCallSite();return new Promise(((i,r)=>{if(\"openfin\"!==this.wire.environment.type)return void r(new oe.NotSupportedError(\"downloadRuntime only supported in an OpenFin Render process\"));const o=this.wire.environment.getNextMessageId().toString(),s=`runtime-download-progress-${o}`,a=`runtime-download-error-${o}`,c=`runtime-download-complete-${o}`,d=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},h=()=>{this.removeListener(s,d)};this.on(s,d),this.once(a,(e=>{h();const{reason:t,err:i}=e;r(new oe.RuntimeError({reason:t,error:i},n))})),this.once(c,(()=>{h(),i()}));const l=Object.assign(e,{downloadId:o});this.wire.sendAction(\"download-runtime\",l).catch((e=>{h(),r(e)}))}))}downloadPreloadScripts(e){return this.wire.sendAction(\"download-preload-scripts\",{scripts:e}).then((({payload:e})=>e.data))}getAllExternalApplications(){return this.wire.sendAction(\"get-all-external-applications\").then((({payload:e})=>e.data))}getAppAssetInfo(e){return this.wire.sendAction(\"get-app-asset-info\",e).then((({payload:e})=>e.data))}getCookies(e){const t=this.wire.environment.getUrl(),n=Object.assign(e,{url:t});return this.wire.sendAction(\"get-cookies\",n).then((({payload:e})=>e.data))}setMinLogLevel(e){return this.wire.sendAction(\"set-min-log-level\",{level:e}).then((()=>{}))}resolveUuid(e){return this.wire.sendAction(\"resolve-uuid\",{entityKey:e}).then((({payload:e})=>e.data))}executeOnRemote(e,t){return t.requestingIdentity=e,this.wire.ferryAction(t)}readRegistryValue(e,t,n){return this.wire.sendAction(\"read-registry-value\",{rootKey:e,subkey:t,value:n}).then((({payload:e})=>e.data))}registerExternalConnection(e){return this.wire.sendAction(\"register-external-connection\",{uuid:e}).then((({payload:e})=>e.data))}async getServiceConfiguration(e){if(\"string\"!=typeof e.name)throw new Error(\"Must provide an object with a `name` property having a string value\");const{name:t}=e;return this.wire.sendAction(\"get-service-configuration\",{name:t}).then((({payload:e})=>e.data))}async getSystemAppConfig(e){if(\"string\"!=typeof e)throw new Error(\"Must provide a string value for name of system app\");return this.wire.sendAction(\"get-system-app-configuration\",{name:e}).then((({payload:e})=>e.data))}async registerShutdownHandler(e){this.wire.sendAction(\"system-register-shutdown-handler\").catch((e=>{}));const{uuid:t,name:n}=this.wire.me;this.on(\"system-shutdown\",(i=>{e({proceed:()=>{this.wire.environment.raiseEvent(\"application/system-shutdown-handled\",{uuid:t,name:n,topic:\"application\"})}})}))}runRvmHealthCheck(){return this.wire.sendAction(\"run-rvm-health-check\").then((({payload:e})=>e.data))}async launchManifest(e,t={}){const{subscribe:n,...i}=t,r=i;if(n){const e=new ae.EventEmitter;n(e);const t=\"app-version-progress\",i=\"runtime-status\",o=\"app-version-complete\",s=\"app-version-error\",a=this.wire.environment.getNextMessageId().toString();r.appVersionId=a;const c=[o,t,i,s],d=e=>{const{appVersionId:t,topic:n,type:i,...r}=e;return{...r,type:c.find((e=>i.includes(e)))}},h=t=>{const n=d(t);e.emit(n.type,n)},l=()=>{this.removeListener(`${t}.${a}`,h),this.removeListener(`${i}.${a}`,h),this.removeListener(`${o}.${a}`,h),this.removeListener(`${s}.${a}`,h),this.removeListener(`${o}.${a}`,l),this.removeListener(`${s}.${a}`,l)};await Promise.all([this.on(`${t}.${a}`,h),this.on(`${i}.${a}`,h),this.once(`${o}.${a}`,h),this.once(`${s}.${a}`,h),this.once(`${o}.${a}`,l),this.once(`${s}.${a}`,l)])}return(await this.wire.sendAction(\"launch-manifest\",{manifestUrl:e,opts:r})).payload.data.manifest}async queryPermissionForCurrentContext(e){const t={uuid:this.wire.me.uuid,name:this.wire.me.name};return(await this.wire.sendAction(\"query-permission-for-current-context\",{apiName:e,identity:t})).payload.data}async enableNativeWindowIntegrationProvider(e){const{payload:t}=await this.wire.sendAction(\"enable-native-window-integration-provider\",{permissions:e});return t.data}async registerUsage({data:e,type:t}){await this.wire.sendAction(\"register-usage\",{data:e,type:t})}async getPrinters(){const{payload:e}=await this.wire.sendAction(\"system-get-printers\");return e.data}async updateProcessLoggingOptions(e){await this.wire.sendAction(\"system-update-process-logging-options\",{options:e})}async getDomainSettings(){const{payload:{data:e}}=await this.wire.sendAction(\"get-domain-settings\",this.identity);return e}async setDomainSettings(e){await this.wire.sendAction(\"set-domain-settings\",{domainSettings:e,...this.identity})}async refreshExtensions(){const{payload:e}=await this.wire.sendAction(\"refresh-extensions\");return e.data}async getInstalledExtensions(){const{payload:e}=await this.wire.sendAction(\"get-installed-extensions\");return e.data}}c.System=ce;var de={},he={};Object.defineProperty(he,\"__esModule\",{value:!0}),he.RefCounter=void 0;he.RefCounter=class{constructor(){this.topicRefMap=new Map}incRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t+1;n=i,this.topicRefMap.set(e,i)}else this.topicRefMap.set(e,1),n=1;return n}decRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t-1;this.topicRefMap.set(e,i),n=i}else n=-1;return n}actOnFirst(e,t,n){return 1===this.incRefCount(e)?t():n()}actOnLast(e,t,n){return 0===this.decRefCount(e)?t():n()}};var le={},ue={},pe={};Object.defineProperty(pe,\"__esModule\",{value:!0}),pe.ChannelBase=pe.ProtectedItems=void 0;const we=e=>async(t,n,i)=>{const r=await e(t,n,i);return void 0===r?n:r};pe.ProtectedItems=class{constructor(e,t){this.providerIdentity=e,this.close=t}};class ye{static defaultAction(e){throw new Error(`No action registered at target for ${e}`)}constructor(){this.subscriptions=new Map}async processAction(e,t,n){try{const i=this.subscriptions.has(e)?this.subscriptions.get(e):(t,n)=>(this.defaultAction??ye.defaultAction)(e,t,n),r=this.preAction?await this.preAction(e,t,n):t,o=await i(r,n);return this.postAction?await this.postAction(e,o,n):o}catch(t){if(this.errorMiddleware)return this.errorMiddleware(e,t,n);throw t}}beforeAction(e){if(this.preAction)throw new Error(\"Already registered beforeAction middleware\");this.preAction=we(e)}onError(e){if(this.errorMiddleware)throw new Error(\"Already registered error middleware\");this.errorMiddleware=e}afterAction(e){if(this.postAction)throw new Error(\"Already registered afterAction middleware\");this.postAction=we(e)}remove(e){this.subscriptions.delete(e)}setDefaultAction(e){if(this.defaultAction)throw new Error(\"default action can only be set once\");this.defaultAction=e}register(e,t){if(this.subscriptions.has(e))throw new Error(`Subscription already registered for action: ${e}. Unsubscribe before adding new subscription`);return this.subscriptions.set(e,t),!0}}pe.ChannelBase=ye;var fe,ge,me,ve=s&&s.__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)},Ce=s&&s.__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};Object.defineProperty(ue,\"__esModule\",{value:!0}),ue.ChannelClient=void 0;const be=pe,Ie=new Map;class Ee extends be.ChannelBase{static closeChannelByEndpointId(e){const t=Ie.get(e);t&&ve(t,me,\"f\").call(t)}static handleProviderDisconnect(e){for(const t of Ie.values())t.providerIdentity.channelId===e.channelId&&(t.disconnectListener(e),ve(t,me,\"f\").call(t))}constructor(e,t,n){super(),fe.set(this,void 0),ge.set(this,void 0),this.processAction=(e,t,n)=>super.processAction(e,t,n),me.set(this,(()=>{Ie.delete(this.endpointId),ve(this,ge,\"f\").close()})),Ce(this,fe,new be.ProtectedItems(e,t),\"f\"),this.disconnectListener=()=>{},this.endpointId=e.endpointId,Ce(this,ge,n,\"f\"),Ie.set(this.endpointId,this),n.receive(this.processAction)}get providerIdentity(){return ve(this,fe,\"f\").providerIdentity}async dispatch(e,t){if(ve(this,ge,\"f\").isEndpointConnected(this.providerIdentity.channelId))return ve(this,ge,\"f\").send(this.providerIdentity.channelId,e,t);throw new Error(\"The client you are trying to dispatch from is disconnected from the target provider.\")}onDisconnection(e){this.disconnectListener=t=>{try{e(t)}catch(e){throw new Error(`Error while calling the onDisconnection callback: ${e.message}`)}finally{this.disconnectListener=()=>{}}}}async disconnect(){await this.sendDisconnectAction(),ve(this,me,\"f\").call(this)}async sendDisconnectAction(){const e=ve(this,fe,\"f\");await e.close()}static async wireClose(e,t,n){const{channelName:i,uuid:r,name:o}=t;await e.sendAction(\"disconnect-from-channel\",{channelName:i,uuid:r,name:o,endpointId:n})}}ue.ChannelClient=Ee,fe=new WeakMap,ge=new WeakMap,me=new WeakMap;var xe={},Ae={};Object.defineProperty(Ae,\"__esModule\",{value:!0}),Ae.exhaustiveCheck=void 0,Ae.exhaustiveCheck=function(e,t){throw new Error(`Unsupported value: ${e}${t?`\\n Supported values are: ${t.join(\"\")}`:\"\"}`)};var Pe,Me,_e,Oe={},Se=s&&s.__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},Re=s&&s.__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)};Object.defineProperty(Oe,\"__esModule\",{value:!0}),Oe.ClassicInfo=Oe.ClassicStrategy=void 0;Oe.ClassicStrategy=class{constructor(e,t,n,i){this.messageReceiver=t,this.endpointId=n,this.providerIdentity=i,Pe.set(this,void 0),Me.set(this,new Map),_e.set(this,new Map),this.send=async(e,t,n)=>{const i=Re(this,Me,\"f\").get(e);if(!i)throw new Error(`Could not locate routing info for endpoint ${e}`);const r={...i};r.isLocalEndpointId&&delete r.endpointId,delete r.isLocalEndpointId;const o=Re(this,Pe,\"f\").sendAction(\"send-channel-message\",{...r,providerIdentity:this.providerIdentity,action:t,payload:n});Re(this,_e,\"f\").get(e)?.add(o);return(await o.catch((e=>{throw new Error(e.message)})).finally((()=>{Re(this,_e,\"f\").get(e)?.delete(o)}))).payload.data.result},this.close=async()=>{this.messageReceiver.removeEndpoint(this.providerIdentity.channelId,this.endpointId),[...Re(this,Me,\"f\").keys()].forEach((e=>this.closeEndpoint(e))),Se(this,Me,new Map,\"f\")},Se(this,Pe,e,\"f\")}onEndpointDisconnect(e,t){}receive(e){this.messageReceiver.addEndpoint(e,this.providerIdentity.channelId,this.endpointId)}async closeEndpoint(e){const t=Re(this,Me,\"f\").get(e);Re(this,Me,\"f\").delete(e);const n=Re(this,_e,\"f\").get(e);n?.forEach((n=>{const i=`Channel connection with identity uuid: ${t?.uuid} / name: ${t?.name} / endpointId: ${e} no longer connected.`;n.cancel(new Error(i))}))}isEndpointConnected(e){return Re(this,Me,\"f\").has(e)}addEndpoint(e,t){Re(this,Me,\"f\").set(e,t.endpointIdentity),Re(this,_e,\"f\").set(e,new Set)}isValidEndpointPayload(e){return\"string\"==typeof e?.endpointIdentity?.endpointId||\"string\"==typeof e?.endpointIdentity?.channelId}},Pe=new WeakMap,Me=new WeakMap,_e=new WeakMap,Oe.ClassicInfo={version:5,minimumVersion:0,type:\"classic\"};var Fe={},je={},ke={};Object.defineProperty(ke,\"__esModule\",{value:!0}),ke.errorToPOJO=void 0,ke.errorToPOJO=function(e){return{stack:e.stack,name:e.name,message:e.message,toString:()=>e.stack||e.toString()}};var Le,Te,$e=s&&s.__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)},Be=s&&s.__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};Object.defineProperty(je,\"__esModule\",{value:!0}),je.RTCEndpoint=void 0;const Ge=ke;je.RTCEndpoint=class{static isValidEndpointPayload(e){const t=e=>\"object\"==typeof e&&null!==e;return t(e)&&t(e.endpointIdentity)&&t(e.rtc)&&\"string\"==typeof e.endpointIdentity.endpointId}constructor({rtc:e,endpointIdentity:t}){this.responseMap=new Map,Le.set(this,null),Te.set(this,void 0),this.connectionStateChangeHandler=e=>{\"connected\"!==this.rtc.rtcClient.connectionState&&(this.rtc.rtcClient.removeEventListener(\"connectionstatechange\",this.connectionStateChangeHandler),this.close(),$e(this,Te,\"f\")&&$e(this,Te,\"f\").call(this))},this.send=async(e,t)=>{const n=`message-${Math.random()}`,i=new Promise(((e,t)=>{this.responseMap.set(n,{resolve:e,reject:t})}));return this.rtc.channels.request.send(JSON.stringify({action:e,payload:t,messageId:n})),i},this.close=()=>{this.responseMap.forEach((e=>e.reject(\"Connection has closed.\"))),this.responseMap=new Map,this.rtc.channels.request.close(),this.rtc.channels.response.close(),this.rtc.rtcClient.close()},this.rtc=e,this.endpointIdentity=t,this.rtc.channels.response.addEventListener(\"message\",(e=>{let{data:t}=e;e.data instanceof ArrayBuffer&&(t=(new TextDecoder).decode(e.data));const{messageId:n,payload:i,success:r,error:o}=JSON.parse(t),{resolve:s,reject:a}=this.responseMap.get(n)??{};s&&a?(this.responseMap.delete(n),r?s(i):a(o)):(console.log(\"Could not find id in responseMap.\"),console.log(e))})),this.rtc.channels.request.addEventListener(\"message\",(async e=>{let{data:n}=e;e.data instanceof ArrayBuffer&&(n=(new TextDecoder).decode(e.data));const{messageId:i,action:r,payload:o}=JSON.parse(n);if($e(this,Le,\"f\"))try{const e=await $e(this,Le,\"f\").call(this,r,o,t);this.rtc.channels.response.send(JSON.stringify({messageId:i,payload:e,success:!0}))}catch(e){\"open\"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,error:(0,Ge.errorToPOJO)(e),success:!1}))}else\"open\"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,success:!1,error:\"Connection not ready.\"}))})),this.rtc.rtcClient.addEventListener(\"connectionstatechange\",this.connectionStateChangeHandler),Object.values(this.rtc.channels).forEach((e=>{e.onclose=e=>{[...this.responseMap.values()].forEach((e=>e.reject(new Error(\"RTCDataChannel closed unexpectedly, this is most commonly caused by message size. Note: RTC Channels have a message size limit of ~255kB.\")))),this.close(),$e(this,Te,\"f\")&&$e(this,Te,\"f\").call(this)}}))}onDisconnect(e){if($e(this,Te,\"f\"))throw new Error(\"RTCEndpoint disconnectListener cannot be set twice.\");Be(this,Te,e,\"f\")}receive(e){if($e(this,Le,\"f\"))throw new Error(\"You have already set a listener for this RTC Endpoint.\");Be(this,Le,e,\"f\")}get connected(){return\"connected\"===this.rtc.rtcClient.connectionState}},Le=new WeakMap,Te=new WeakMap;var We,He,Ne,De={},Ue=s&&s.__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)},Ve=s&&s.__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};Object.defineProperty(De,\"__esModule\",{value:!0}),De.EndpointStrategy=void 0;De.EndpointStrategy=class{constructor(e,t,n){this.EndpointType=e,this.StrategyName=n,We.set(this,null),He.set(this,new Map),Ne.set(this,!0),this.send=async(e,t,n)=>this.getEndpointById(e).send(t,n),this.close=async()=>{Ue(this,Ne,\"f\")&&(Ue(this,He,\"f\").forEach((e=>e.close())),Ve(this,He,new Map,\"f\")),Ve(this,Ne,!1,\"f\")},this.isValidEndpointPayload=t}onEndpointDisconnect(e,t){this.getEndpointById(e).onDisconnect(t)}receive(e){if(Ue(this,We,\"f\"))throw new Error(`You have already set a listener for this ${this.StrategyName} Strategy`);Ve(this,We,e,\"f\"),Ue(this,He,\"f\").forEach((e=>e.receive(Ue(this,We,\"f\"))))}getEndpointById(e){const t=Ue(this,He,\"f\").get(e);if(!t)throw new Error(`Client with endpoint id ${e} is not connected`);return t}get connected(){return Ue(this,Ne,\"f\")}isEndpointConnected(e){return Ue(this,He,\"f\").has(e)}addEndpoint(e,t){if(!Ue(this,Ne,\"f\"))return void console.warn(`Adding endpoint to disconnected ${this.StrategyName} Strategy`);const n=new this.EndpointType(t);Ue(this,We,\"f\")&&n.receive(Ue(this,We,\"f\")),Ue(this,He,\"f\").set(e,n)}async closeEndpoint(e){Ue(this,He,\"f\").delete(e)}},We=new WeakMap,He=new WeakMap,Ne=new WeakMap,Object.defineProperty(Fe,\"__esModule\",{value:!0}),Fe.RTCInfo=Fe.RTCStrategy=void 0;const ze=je,Ke=De;class qe extends Ke.EndpointStrategy{constructor(){super(ze.RTCEndpoint,ze.RTCEndpoint.isValidEndpointPayload,\"RTC\")}}Fe.RTCStrategy=qe,Fe.RTCInfo={version:2,minimumVersion:0,type:\"rtc\"};var Je={};Object.defineProperty(Je,\"__esModule\",{value:!0}),Je.RTCICEManager=void 0;const Ye=d;class Ze extends Ye.EmitterBase{constructor(e){super(e,\"channel\"),this.ensureChannelOpened=e=>new Promise(((t,n)=>{if(\"open\"===e.readyState)t();else if(\"connecting\"===e.readyState){const n=()=>{e.removeEventListener(\"open\",n),t()};e.addEventListener(\"open\",n)}else n(new Error(\"This Channel has already closed\"))}))}static createDataChannelPromise(e,t){let n;const i=new Promise((e=>{n=e})),r=i=>{const o=()=>{i.channel.removeEventListener(\"open\",o),n(i.channel)};i.channel.label===e&&(i.channel.addEventListener(\"open\",o),t.removeEventListener(\"datachannel\",r))};return t.addEventListener(\"datachannel\",r),i}async listenForProviderIce(e,t){await this.on(this.createProviderEventName(e),t,{timestamp:Date.now()})}async raiseProviderIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createProviderEventName(e)),t)}async listenForClientIce(e,t){await this.on(this.createClientEventName(e),t,{timestamp:Date.now()})}async raiseClientIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createClientEventName(e)),t)}cleanupIceListeners(e){this.removeAllListeners(this.createClientEventName(e)),this.removeAllListeners(this.createProviderEventName(e))}createClientEventName(e){return`ice-client-${e}`}createProviderEventName(e){return`ice-provider-${e}`}createRouteString(e){return`channel/${e}`}createRtcPeer(){return this.wire.environment.getRtcPeer()}async startClientOffer(){const e=Math.random().toString(),t=this.createRtcPeer();t.addEventListener(\"icecandidate\",(async t=>{t.candidate&&await this.raiseClientIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForProviderIce(e,(async e=>{await t.addIceCandidate(e.candidate)}));const n={request:t.createDataChannel(\"request\"),response:t.createDataChannel(\"response\")},i=await t.createOffer();await t.setLocalDescription(i);const r=Promise.all([n.request,n.response].map(this.ensureChannelOpened)).then((()=>{}));return{rtcClient:t,channels:n,offer:i,rtcConnectionId:e,channelsOpened:r}}async finishClientOffer(e,t,n){return await e.setRemoteDescription(t),await n,!0}async createProviderAnswer(e,t){const n=this.createRtcPeer(),i=Ze.createDataChannelPromise(\"request\",n),r=Ze.createDataChannelPromise(\"response\",n);n.addEventListener(\"icecandidate\",(async t=>{t.candidate&&await this.raiseProviderIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForClientIce(e,(async e=>{await n.addIceCandidate(e.candidate)})),await n.setRemoteDescription(t);const o=await n.createAnswer();await n.setLocalDescription(o);const s=Promise.all([i,r]).then((([t,n])=>(this.cleanupIceListeners(e),{request:t,response:n})));return{rtcClient:n,answer:o,channels:s}}}Je.RTCICEManager=Ze;var Qe={},Xe={};function et(e){return[...e.split(\".\").reverse().entries()].reduce(((e,[t,n])=>e+ +n*1e4**t),0)}function tt(e,t){return et(e)>=et(t)}function nt(e){return e.split(\"/\")[0]}Object.defineProperty(Xe,\"__esModule\",{value:!0}),Xe.runtimeUuidMeetsMinimumRuntimeVersion=Xe.parseRuntimeUuid=Xe.meetsMinimumRuntimeVersion=void 0,Xe.meetsMinimumRuntimeVersion=tt,Xe.parseRuntimeUuid=nt,Xe.runtimeUuidMeetsMinimumRuntimeVersion=function(e,t){return tt(nt(e),t)};var it,rt,ot,st,at,ct=s&&s.__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)},dt=s&&s.__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};Object.defineProperty(Qe,\"__esModule\",{value:!0}),Qe.ChannelProvider=void 0;const ht=pe,lt=Xe;class ut extends ht.ChannelBase{get connections(){return[...ct(this,it,\"f\")]}static handleClientDisconnection(e,t){const n=e.connections.find((e=>e.endpointId===t.endpointId));if(n)ct(e,st,\"f\").call(e,n);else{e.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name)).forEach(ct(e,st,\"f\"))}e.disconnectListener(t)}static setProviderRemoval(e,t){ut.removalMap.set(e,t)}constructor(e,t,n){super(),it.set(this,void 0),rt.set(this,void 0),ot.set(this,void 0),st.set(this,(e=>{const t=this.connections.filter((t=>t.endpointId!==e.endpointId));ct(this,ot,\"f\").closeEndpoint(e.endpointId),dt(this,it,t,\"f\")})),this.processAction=async(e,t,n)=>(ut.clientIsMultiRuntime(n)&&!(0,lt.runtimeUuidMeetsMinimumRuntimeVersion)(n.runtimeUuid,\"18.87.56.0\")?this.handleMultiRuntimeLegacyClient(n):this.checkForClientConnection(n),super.processAction(e,t,n)),at.set(this,(()=>{ct(this,ot,\"f\").close();const e=ut.removalMap.get(this);e&&e()})),dt(this,rt,new ht.ProtectedItems(e,t),\"f\"),this.connectListener=()=>{},this.disconnectListener=()=>{},dt(this,it,[],\"f\"),dt(this,ot,n,\"f\"),n.receive(this.processAction)}dispatch(e,t,n){const i=e.endpointId??this.getEndpointIdForOpenFinId(e,t);return i&&ct(this,ot,\"f\").isEndpointConnected(i)?ct(this,ot,\"f\").send(i,t,n):Promise.reject(new Error(`Client connection with identity uuid: ${e.uuid} / name: ${e.name} / endpointId: ${i} no longer connected.`))}async processConnection(e,t){return ct(this,it,\"f\").push(e),this.connectListener(e,t)}publish(e,t){return this.connections.map((n=>ct(this,ot,\"f\").send(n.endpointId,e,t)))}onConnection(e){this.connectListener=e}onDisconnection(e){this.disconnectListener=e}async destroy(){const e=ct(this,rt,\"f\");e.providerIdentity,dt(this,it,[],\"f\"),await e.close(),ct(this,at,\"f\").call(this)}async getAllClientInfo(){return this.connections.map((e=>{const{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}=e;return{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}}))}checkForClientConnection(e){if(!this.isClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider.\\n Client Identity: {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}isClientConnected(e){return ut.clientIdentityIncludesEndpointId(e)?this.connections.some((t=>t.endpointId===e.endpointId&&t.uuid===e.uuid&&t.name===e.name)):this.isLegacyClientConnected(e)}isLegacyClientConnected(e){return this.connections.some((t=>t.uuid===e.uuid&&t.name===e.name))}handleMultiRuntimeLegacyClient(e){if(!this.isLegacyClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider. Client Identity:\\n {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}getEndpointIdForOpenFinId(e,t){const n=this.connections.filter((t=>t.name===e.name&&t.uuid===e.uuid));if(n.length>=2){const n=ct(this,rt,\"f\"),{uuid:i,name:r}=e,o=n?.providerIdentity.uuid,s=n?.providerIdentity.name;console.warn(`WARNING: Dispatch call may have unintended results. The \"to\" argument of your dispatch call is missing the\\n \"endpointId\" parameter. The identity you are dispatching to ({uuid: ${i}, name: ${r}})\\n has multiple channelClients for this channel. Your dispatched action: (${t}) from the provider:\\n ({uuid: ${o}, name: ${s}}) will only be processed by the most recently-created client.`)}return n.pop()?.endpointId}static clientIdentityIncludesEndpointId(e){return void 0!==e.endpointId}static clientIsMultiRuntime(e){return void 0!==e.runtimeUuid}static async wireClose(e,t){await e.sendAction(\"destroy-channel\",{channelName:t})}}Qe.ChannelProvider=ut,it=new WeakMap,rt=new WeakMap,ot=new WeakMap,st=new WeakMap,at=new WeakMap,ut.removalMap=new WeakMap;var pt={};Object.defineProperty(pt,\"__esModule\",{value:!0}),pt.MessageReceiver=void 0;const wt=ue,yt=d;class ft extends yt.Base{constructor(e){super(e),this.onmessage=e=>\"process-channel-message\"===e.action&&(this.processChannelMessage(e),!0),this.endpointMap=new Map,this.latestEndpointIdByChannelId=new Map,e.registerMessageHandler(this.onmessage.bind(this))}async processChannelMessage(e){const{senderIdentity:t,providerIdentity:n,action:i,ackToSender:r,payload:o,intendedTargetIdentity:s}=e.payload,a=s.channelId??s.endpointId??this.latestEndpointIdByChannelId.get(n.channelId),c=this.endpointMap.get(a);if(!c)return r.payload.success=!1,r.payload.reason=`Client connection with identity uuid: ${this.wire.me.uuid} / name: ${this.wire.me.name} / endpointId: ${a} no longer connected.`,this.wire.sendRaw(r);try{const e=await c(i,o,t);return r.payload.payload=r.payload.payload||{},r.payload.payload.result=e,this.wire.sendRaw(r)}catch(e){return r.payload.success=!1,r.payload.reason=e.message,this.wire.sendRaw(r)}}addEndpoint(e,t,n){this.endpointMap.set(n,e),t!==n&&this.latestEndpointIdByChannelId.set(t,n)}removeEndpoint(e,t){this.endpointMap.delete(t),this.latestEndpointIdByChannelId.get(e)===t&&this.latestEndpointIdByChannelId.delete(e)}checkForPreviousClientConnection(e){const t=this.latestEndpointIdByChannelId.get(e);t&&(wt.ChannelClient.closeChannelByEndpointId(t),console.warn(\"You have created a second connection to an older provider. First connection has been removed from the clientMap\"),console.warn(\"If the provider calls publish(), you may receive multiple messages.\"))}}pt.MessageReceiver=ft;var gt={};Object.defineProperty(gt,\"__esModule\",{value:!0}),gt.ProtocolManager=void 0;gt.ProtocolManager=class{constructor(e){this.ProtocolsInPreferenceOrder=e,this.DefaultClientProtocols=[\"classic\"],this.DefaultProviderProtocols=[\"classic\"],this.getClientProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultClientProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(\", \")}.`);return t},this.getProviderProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultProviderProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(\", \")}.`);return t},this.getCompatibleProtocols=(e,t)=>t.supportedProtocols.filter((t=>e.some((e=>e.type===t.type&&t.version>=e.minimumVersion&&e.version>=(t.minimumVersion??0))))).slice(0,t.maxProtocols)}};var mt={};Object.defineProperty(mt,\"__esModule\",{value:!0});class vt{static combine(e,t){return new vt(e,t)}constructor(e,t){this.primary=e,this.secondary=t}onEndpointDisconnect(e,t){this.primary.onEndpointDisconnect(e,(()=>{this.secondary.isEndpointConnected(e)||t()})),this.secondary.onEndpointDisconnect(e,(()=>{this.primary.isEndpointConnected(e)||t()}))}isValidEndpointPayload(e){return this.primary.isValidEndpointPayload(e)||this.secondary.isValidEndpointPayload(e)}async closeEndpoint(e){await this.primary.closeEndpoint(e),await this.secondary.closeEndpoint(e)}isEndpointConnected(e){return this.primary.isEndpointConnected(e)||this.secondary.isEndpointConnected(e)}async addEndpoint(e,t){this.primary.isValidEndpointPayload(t)&&await this.primary.addEndpoint(e,t),this.secondary.isValidEndpointPayload(t)&&await this.secondary.addEndpoint(e,t)}receive(e){this.primary.receive(e),this.secondary.receive(e)}send(e,t,n){return this.primary.isEndpointConnected(e)?this.primary.send(e,t,n):this.secondary.send(e,t,n)}async close(){await Promise.all([this.primary.close(),this.secondary.close()])}}mt.default=vt;var Ct,bt,It=s&&s.__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},Et=s&&s.__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)},xt=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(xe,\"__esModule\",{value:!0}),xe.ConnectionManager=void 0;const At=Ae,Pt=d,Mt=Oe,_t=Fe,Ot=Je,St=Qe,Rt=pt,Ft=gt,jt=xt(mt);class kt extends Pt.Base{static getProtocolOptionsFromStrings(e){return e.map((e=>{switch(e){case\"rtc\":return _t.RTCInfo;case\"classic\":return Mt.ClassicInfo;default:return(0,At.exhaustiveCheck)(e,[\"rtc\",\"classic\"])}}))}constructor(e){super(e),Ct.set(this,void 0),bt.set(this,void 0),this.removeChannelFromProviderMap=e=>{this.providerMap.delete(e)},this.onmessage=e=>\"process-channel-connection\"===e.action&&(this.processChannelConnection(e),!0),this.providerMap=new Map,this.protocolManager=new Ft.ProtocolManager(\"node\"===this.wire.environment.type?[\"classic\"]:[\"rtc\",\"classic\"]),It(this,Ct,new Rt.MessageReceiver(e),\"f\"),It(this,bt,new Ot.RTCICEManager(e),\"f\"),e.registerMessageHandler(this.onmessage.bind(this))}createProvider(e,t){const n=Object.assign(this.wire.environment.getDefaultChannelOptions().create,e||{}),i=this.protocolManager.getProviderProtocols(n?.protocols),r=i.map((e=>{switch(e){case\"rtc\":return new _t.RTCStrategy;case\"classic\":return new Mt.ClassicStrategy(this.wire,Et(this,Ct,\"f\"),t.channelId,t);default:return(0,At.exhaustiveCheck)(e,[\"rtc\",\"classic\"])}}));let o;if(2===r.length){const[e,t]=r;o=jt.default.combine(e,t)}else{if(1!==r.length)throw new Error(\"failed to combine strategies\");[o]=r}const s=new St.ChannelProvider(t,(()=>St.ChannelProvider.wireClose(this.wire,t.channelName)),o),a=t.channelId;return this.providerMap.set(a,{provider:s,strategy:o,supportedProtocols:kt.getProtocolOptionsFromStrings(i)}),St.ChannelProvider.setProviderRemoval(s,this.removeChannelFromProviderMap.bind(this)),s}async createClientOffer(e){const t=this.protocolManager.getClientProtocols(e?.protocols);let n;return{offer:{supportedProtocols:await Promise.all(t.map((async e=>{switch(e){case\"rtc\":{const{rtcClient:e,channels:t,offer:i,rtcConnectionId:r,channelsOpened:o}=await Et(this,bt,\"f\").startClientOffer();return n={rtcClient:e,channels:t,channelsOpened:o},{type:\"rtc\",version:_t.RTCInfo.version,payload:{offer:i,rtcConnectionId:r}}}case\"classic\":return{type:\"classic\",version:Mt.ClassicInfo.version};default:return(0,At.exhaustiveCheck)(e,[\"rtc\",\"classic\"])}}))),maxProtocols:2},rtc:n}}async createClientStrategy(e,t){t.endpointId||(t.endpointId=this.wire.environment.getNextMessageId(),Et(this,Ct,\"f\").checkForPreviousClientConnection(t.channelId));const n=t.answer??{supportedProtocols:[{type:\"classic\",version:1}]},i=(await Promise.all(n.supportedProtocols.map((async n=>\"rtc\"===n.type&&e?(await Et(this,bt,\"f\").finishClientOffer(e.rtcClient,n.payload.answer,e.channelsOpened),new _t.RTCStrategy):\"classic\"===n.type?new Mt.ClassicStrategy(this.wire,Et(this,Ct,\"f\"),t.endpointId,t):null)))).filter((e=>null!==e));let r;if(e&&!i.some((e=>e instanceof _t.RTCStrategy))&&e&&e.rtcClient.close(),i.length>=2)r=jt.default.combine(i[0],i[1]);else{if(!i.length)throw new Error(\"No compatible protocols\");[r]=i}const o={endpointIdentity:t,rtc:e};return r.addEndpoint(t.channelId,o),r}async processChannelConnection(e){const{clientIdentity:t,providerIdentity:n,ackToSender:i,payload:r,offer:o}=e.payload;t.endpointId?t.isLocalEndpointId=!1:(t.endpointId=this.wire.environment.getNextMessageId(),t.isLocalEndpointId=!0);const s=n.channelId,a=this.providerMap.get(s);if(!a)return i.payload.success=!1,i.payload.reason=`Channel \"${n.channelName}\" has been destroyed.`,this.wire.sendRaw(i);const{provider:c,strategy:d,supportedProtocols:h}=a;try{if(!(c instanceof St.ChannelProvider))throw Error(\"Cannot connect to a channel client\");const e=o??{supportedProtocols:[{type:\"classic\",version:1}],maxProtocols:1},n=this.protocolManager.getCompatibleProtocols(h,e);if(!n.length)throw new Error(\"This provider does not support any of the offered protocols.\");const s=await c.processConnection(t,r);i.payload.payload=i.payload.payload||{};let a={supportedProtocols:[],endpointPayloadPromise:Promise.resolve({endpointIdentity:t})};return a=await n.reduce((async(e,t)=>{const n=await e;if(\"rtc\"===t.type){const{answer:e,rtcClient:i,channels:r}=await Et(this,bt,\"f\").createProviderAnswer(t.payload.rtcConnectionId,t.payload.offer);n.supportedProtocols.push({type:\"rtc\",version:_t.RTCInfo.version,payload:{answer:e}}),n.endpointPayloadPromise=n.endpointPayloadPromise.then((e=>r.then((t=>({...e,rtc:{rtcClient:i,channels:t}})))))}else n.supportedProtocols.push({type:\"classic\",version:Mt.ClassicInfo.version});return n}),Promise.resolve(a)),a.endpointPayloadPromise.then((e=>d.addEndpoint(t.endpointId,e))),i.payload.payload.result=s,i.payload.payload.answer=a,this.wire.sendRaw(i)}catch(e){return i.payload.success=!1,i.payload.reason=e.message,this.wire.sendRaw(i)}}}xe.ConnectionManager=kt,Ct=new WeakMap,bt=new WeakMap;var Lt,Tt,$t,Bt=s&&s.__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},Gt=s&&s.__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)};Object.defineProperty(le,\"__esModule\",{value:!0}),le.Channel=void 0;const Wt=t,Ht=G,Nt=d,Dt=ue,Ut=xe,Vt=Qe;function zt(e){const t=Math.floor(e/10),n=Math.min(3e4,500*2**t);return new Promise((e=>{setTimeout((()=>{e(!1)}),n)}))}class Kt extends Nt.EmitterBase{constructor(e){super(e,\"channel\"),Lt.set(this,void 0),Tt.set(this,new Wt.EventEmitter),$t.set(this,new Ht.AsyncRetryableLazy((async()=>{await Promise.all([this.on(\"disconnected\",(e=>{Dt.ChannelClient.handleProviderDisconnect(e)})),this.on(\"connected\",((...e)=>{Gt(this,Tt,\"f\").emit(\"connected\",...e)}))]).catch((()=>new Error(\"error setting up channel connection listeners\")))}))),Bt(this,Lt,new Ut.ConnectionManager(e),\"f\")}async getAllChannels(){return this.wire.sendAction(\"get-all-channels\").then((({payload:e})=>e.data))}async onChannelConnect(e){await this.on(\"connected\",e)}async onChannelDisconnect(e){await this.on(\"disconnected\",e)}async safeConnect(e,t,n){const i={count:0};do{let r=()=>{};const o=new Promise((t=>{r=n=>{e===n.channelName&&t(!0)},Gt(this,Tt,\"f\").on(\"connected\",r)}));try{if(i.count>0){i.gotConnectedEvent=await Promise.race([zt(i.count),o]);const t=await this.wire.sendAction(\"connect-to-channel\",{...n,retryInfo:i});return console.log(`Successfully connected to channelName: ${e}`),t.payload.data}const t=this.wire.sendAction(\"connect-to-channel\",n);i.originalMessageId=t.messageId;return(await t).payload.data}catch(n){if(!n.message.includes(\"internal-nack\"))throw n;t&&0===i.count&&console.warn(`No channel found for channelName: ${e}. Waiting for connection...`)}finally{i.count+=1,Gt(this,Tt,\"f\").removeListener(\"connected\",r)}}while(t);throw new Error(`No channel found for channelName: ${e}.`)}async connect(e,t={}){if(await Gt(this,$t,\"f\").getValue(),!e||\"string\"!=typeof e)throw new Error(\"Please provide a channelName string to connect to a channel.\");const n={wait:!0,...this.wire.environment.getDefaultChannelOptions().connect,...t},{offer:i,rtc:r}=await Gt(this,Lt,\"f\").createClientOffer(n);let o;(this.fin.me.isFrame||this.fin.me.isView||this.fin.me.isWindow)&&(o=(await this.fin.me.getInfo()).url);const s={channelName:e,...n,offer:i,connectionUrl:o},a=await this.safeConnect(e,n.wait,s),c=await Gt(this,Lt,\"f\").createClientStrategy(r,a),d=new Dt.ChannelClient(a,(()=>Dt.ChannelClient.wireClose(this.wire,a,a.endpointId)),c);return c.onEndpointDisconnect(a.channelId,(async()=>{try{await d.sendDisconnectAction()}catch(e){console.warn(`Something went wrong during disconnect for client with uuid: ${a.uuid} / name: ${a.name} / endpointId: ${a.endpointId}.`)}finally{Dt.ChannelClient.handleProviderDisconnect(a)}})),d}async create(e,t){if(!e)throw new Error(\"Please provide a channelName to create a channel\");const{payload:{data:n}}=await this.wire.sendAction(\"create-channel\",{channelName:e}),i=Gt(this,Lt,\"f\").createProvider(t,n);return this.on(\"client-disconnected\",(t=>{t.channelName===e&&Vt.ChannelProvider.handleClientDisconnection(i,t)})),i}}le.Channel=Kt,Lt=new WeakMap,Tt=new WeakMap,$t=new WeakMap,Object.defineProperty(de,\"__esModule\",{value:!0}),de.InterAppPayload=de.InterApplicationBus=void 0;const qt=t,Jt=d,Yt=he,Zt=le,Qt=O;class Xt extends Jt.Base{constructor(e){super(e),this.events={subscriberAdded:\"subscriber-added\",subscriberRemoved:\"subscriber-removed\"},this.refCounter=new Yt.RefCounter,this.Channel=new Zt.Channel(e),this.emitter=new qt.EventEmitter,e.registerMessageHandler(this.onmessage.bind(this)),this.on=this.emitter.on.bind(this.emitter),this.removeAllListeners=this.emitter.removeAllListeners.bind(this.emitter)}async publish(e,t){await this.wire.sendAction(\"publish-message\",{topic:e,message:t,sourceWindowName:this.me.name})}async send(e,t,n){const i=(0,Qt.validateIdentity)(e);if(i)throw new Error(i);await this.wire.sendAction(\"send-message\",{destinationUuid:e.uuid,destinationWindowName:e.name,topic:t,message:n,sourceWindowName:this.me.name})}subscribe(e,t,n){const i=this.createSubscriptionKey(e.uuid,e.name||\"*\",t);return this.emitter.on(i,n),this.refCounter.actOnFirst(i,(async()=>{await this.wire.sendAction(\"subscribe\",{sourceUuid:e.uuid,sourceWindowName:e.name||\"*\",topic:t,destinationWindowName:this.me.name})}),(()=>Promise.resolve()))}unsubscribe(e,t,n){const i=e.name||\"*\",r=this.createSubscriptionKey(e.uuid,i,t);return this.emitter.removeListener(r,n),this.refCounter.actOnLast(r,(async()=>{await this.wire.sendAction(\"unsubscribe\",{sourceUuid:e.uuid,sourceWindowName:i,topic:t,destinationWindowName:this.me.name})}),(()=>new Promise((e=>e)).then((()=>{}))))}processMessage(e){const{payload:{message:t,sourceWindowName:n,sourceUuid:i,topic:r}}=e,o=[this.createSubscriptionKey(i,n,r),this.createSubscriptionKey(i,\"*\",r),this.createSubscriptionKey(\"*\",\"*\",r)],s={uuid:i,name:n};o.forEach((e=>{this.emitter.emit(e,t,s)}))}emitSubscriverEvent(e,t){const{payload:{targetName:n,uuid:i,topic:r}}=t,o={name:n,uuid:i,topic:r};this.emitter.emit(e,o)}createSubscriptionKey(e,t,n){const i=t||\"*\";if(!(e&&i&&n))throw new Error(\"Missing uuid, name, or topic string\");return function(...e){return e.map((e=>Buffer.from(`${e}`).toString(\"base64\"))).join(\"/\")}(e,i,n)}onmessage(e){const{action:t}=e;switch(t){case\"process-message\":this.processMessage(e);break;case this.events.subscriberAdded:this.emitSubscriverEvent(this.events.subscriberAdded,e);break;case this.events.subscriberRemoved:this.emitSubscriverEvent(this.events.subscriberRemoved,e)}return!0}}de.InterApplicationBus=Xt;de.InterAppPayload=class{};var en={};Object.defineProperty(en,\"__esModule\",{value:!0}),en.Clipboard=void 0;const tn=d;class nn extends tn.Base{async writeText(e){await this.wire.sendAction(\"clipboard-write-text\",e)}async readText(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-text\",{type:e});return t.data}async writeImage(e){await this.wire.sendAction(\"clipboard-write-image\",e)}async readImage(e={format:\"dataURL\"}){const{payload:t}=await this.wire.sendAction(\"clipboard-read-image\",e);return t.data}async writeHtml(e){await this.wire.sendAction(\"clipboard-write-html\",e)}async readHtml(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-html\",{type:e});return t.data}async writeRtf(e){await this.wire.sendAction(\"clipboard-write-rtf\",e)}async readRtf(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-rtf\",{type:e});return t.data}async write(e){await this.wire.sendAction(\"clipboard-write\",e)}async getAvailableFormats(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-formats\",{type:e});return t.data}}en.Clipboard=nn;var rn={},on={},sn={};Object.defineProperty(sn,\"__esModule\",{value:!0}),sn.ExternalApplication=void 0;const an=d;class cn extends an.EmitterBase{constructor(e,t){super(e,\"external-application\",t.uuid),this.identity=t}getInfo(){return this.wire.sendAction(\"get-external-application-info\",this.identity).then((({payload:e})=>e.data))}}sn.ExternalApplication=cn,Object.defineProperty(on,\"__esModule\",{value:!0}),on.ExternalApplicationModule=void 0;const dn=d,hn=sn;class ln extends dn.Base{wrap(e){return this.wire.sendAction(\"external-application-wrap\").catch((e=>{})),Promise.resolve(new hn.ExternalApplication(this.wire,{uuid:e}))}wrapSync(e){return this.wire.sendAction(\"external-application-wrap-sync\").catch((e=>{})),new hn.ExternalApplication(this.wire,{uuid:e})}}on.ExternalApplicationModule=ln,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(on,e),n(sn,e)}(rn);var un={},pn={},wn={};Object.defineProperty(wn,\"__esModule\",{value:!0}),wn._Frame=void 0;const yn=d;class fn extends yn.EmitterBase{constructor(e,t){super(e,\"frame\",t.uuid,t.name),this.identity=t}getInfo(){return this.wire.sendAction(\"get-frame-info\",this.identity).then((({payload:e})=>e.data))}getParentWindow(){return this.wire.sendAction(\"get-parent-window\",this.identity).then((({payload:e})=>e.data))}}wn._Frame=fn,Object.defineProperty(pn,\"__esModule\",{value:!0}),pn._FrameModule=void 0;const gn=d,mn=O,vn=wn;class Cn extends gn.Base{async wrap(e){this.wire.sendAction(\"frame-wrap\").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}wrapSync(e){this.wire.sendAction(\"frame-wrap-sync\").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}getCurrent(){return this.wire.sendAction(\"frame-get-current\").catch((e=>{})),Promise.resolve(new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity()))}getCurrentSync(){return this.wire.sendAction(\"frame-get-current-sync\").catch((e=>{})),new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity())}}pn._FrameModule=Cn,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(pn,e),n(wn,e)}(un);var bn={};Object.defineProperty(bn,\"__esModule\",{value:!0}),bn.GlobalHotkey=void 0;const In=d;class En extends In.EmitterBase{constructor(e){super(e,\"global-hotkey\")}async register(e,t){await this.on(e,t),await this.wire.sendAction(\"global-hotkey-register\",{hotkey:e})}async unregister(e){await this.removeAllListeners(e),await this.wire.sendAction(\"global-hotkey-unregister\",{hotkey:e})}async unregisterAll(){await Promise.all(this.eventNames().filter((e=>!(\"registered\"===e||\"unregistered\"===e))).map((e=>this.removeAllListeners(e)))),await this.wire.sendAction(\"global-hotkey-unregister-all\",{})}async isRegistered(e){const{payload:{data:t}}=await this.wire.sendAction(\"global-hotkey-is-registered\",{hotkey:e});return t}}bn.GlobalHotkey=En;var xn,An={},Pn={},Mn={},_n=s&&s.__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)};Object.defineProperty(Mn,\"__esModule\",{value:!0}),Mn.Platform=void 0;const On=d,Sn=O,Rn=new Map;class Fn extends On.EmitterBase{constructor(e,t){super(t.wire,\"application\",e.uuid),this.getClient=e=>{this.wire.sendAction(\"platform-get-client\",this.identity).catch((e=>{}));const t=e||this.identity,{uuid:n}=t;if(!Rn.has(n)){const e=_n(this,xn,\"f\").call(this,n);Rn.set(n,e)}return Rn.get(n)},xn.set(this,(async e=>{try{const t=`custom-frame-${e}`,n=await this._channel.connect(t,{wait:!1});return n.onDisconnection((()=>{Rn.delete(e)})),n}catch(t){throw Rn.delete(e),new Error(\"The targeted Platform is not currently running. Listen for application-started event for the given Uuid.\")}})),this.launchLegacyManifest=this.launchContentManifest;const n=(0,Sn.validateIdentity)(e);if(n)throw new Error(n);this._channel=t,this.identity={uuid:e.uuid},this.Layout=this.fin.Platform.Layout,this.Application=this.fin.Application.wrapSync(this.identity)}async createView(e,t,n){this.wire.sendAction(\"platform-create-view\",this.identity).catch((e=>{}));const i=await this.getClient(),r=await i.dispatch(\"create-view\",{target:t,opts:e,targetView:n});if(!r||(0,Sn.validateIdentity)(r.identity))throw new Error(`When overwriting the createView call, please return an object that has a valid 'identity' property: ${JSON.stringify(r)}`);return this.fin.View.wrapSync(r.identity)}async createWindow(e){this.wire.sendAction(\"platform-create-window\",this.identity).catch((e=>{}));const t=await this.getClient();e.reason||(e.reason=\"api-call\");const n=await t.dispatch(\"create-view-container\",e);if(!n||(0,Sn.validateIdentity)(n.identity))throw new Error(`When overwriting the createWindow call, please return an object that has a valid 'identity' property: ${JSON.stringify(n)}`);const{identity:i}=n,r=this.fin.Window.wrapSync(i);return r.name=i.name,r.uuid=i.uuid,r}async quit(){this.wire.sendAction(\"platform-quit\",this.identity).catch((e=>{}));return(await this.getClient()).dispatch(\"quit\")}async closeView(e){this.wire.sendAction(\"platform-close-view\",this.identity).catch((e=>{}));const t=await this.getClient();await t.dispatch(\"close-view\",{view:e})}async reparentView(e,t){console.warn(\"Platform.reparentView has been deprecated, please use Platform.createView\"),this.wire.sendAction(\"platform-reparent-view\",this.identity).catch((e=>{}));const n={...e,uuid:e.uuid??this.identity.uuid},i=await this.fin.View.wrap(n),r=await i.getOptions();return this.createView(r,t)}async getSnapshot(){this.wire.sendAction(\"platform-get-snapshot\",this.identity).catch((e=>{}));return(await this.getClient()).dispatch(\"get-snapshot\")}async getViewSnapshot(e){return(await this.getClient()).dispatch(\"get-view-snapshot\",{viewIdentity:e})}async applySnapshot(e,t){this.wire.sendAction(\"platform-apply-snapshot\",this.identity).catch((e=>{}));const n=\"Requested snapshot must be a valid Snapshot object, or a url or filepath to such an object.\";let i;if(\"string\"==typeof e)try{i=(await this._channel.wire.sendAction(\"get-application-manifest\",{manifestUrl:e})).payload.data}catch(e){throw new Error(`${n}: ${e}`)}else i=e;if(!i.windows)throw new Error(n);const r=await this.getClient();return await r.dispatch(\"apply-snapshot\",{snapshot:i,options:t}),this}async fetchManifest(e){return(await this.getClient()).dispatch(\"platform-fetch-manifest\",{manifestUrl:e})}async launchContentManifest(e){this.wire.sendAction(\"platform-launch-content-manifest\",this.identity).catch((()=>{}));const t=await this.getClient(),n=await this.fetchManifest(e);return t.dispatch(\"launch-into-platform\",{manifest:n,manifestUrl:e}),this}async setWindowContext(e={},t){if(this.wire.sendAction(\"platform-set-window-context\",this.identity).catch((e=>{})),!e)throw new Error(\"Please provide a serializable object or string to set the context.\");const n=await this.getClient(),{entityType:i}=t?await this.fin.System.getEntityInfo(t.uuid,t.name):this.fin.me;await n.dispatch(\"set-window-context\",{context:e,entityType:i,target:t||{uuid:this.fin.me.uuid,name:this.fin.me.name}})}async getWindowContext(e){this.wire.sendAction(\"platform-get-window-context\",this.identity).catch((e=>{}));const t=await this.getClient(),{entityType:n}=e?await this.fin.System.getEntityInfo(e.uuid,e.name):this.fin.me;return t.dispatch(\"get-window-context\",{target:e||{uuid:this.fin.me.uuid,name:this.fin.me.name},entityType:n})}async closeWindow(e,t={skipBeforeUnload:!1}){this.wire.sendAction(\"platform-close-window\",this.identity).catch((e=>{}));return(await this.getClient()).dispatch(\"close-window\",{windowId:e,options:t})}}Mn.Platform=Fn,xn=new WeakMap;var jn={},kn={},Ln={},Tn={};function $n(e){switch(e){case\"columns\":case\"grid\":case\"rows\":case\"tabs\":return!0;default:return!1}}Object.defineProperty(Tn,\"__esModule\",{value:!0}),Tn.overrideFromComposables=Tn.isValidPresetType=void 0,Tn.isValidPresetType=$n,Tn.overrideFromComposables=function(...e){return t=>e.reduceRight(((e,t)=>n=>t(e(n))),(e=>e))(t)},Tn.default={isValidPresetType:$n};var Bn={},Gn={},Wn={};Object.defineProperty(Wn,\"__esModule\",{value:!0}),Wn.ApiConsumer=void 0;Wn.ApiConsumer=class{constructor(e){this.strategy=e,this.consume=async e=>(await this.strategy.getExposedFunctions(e)).reduce(((t,n)=>({...t,[n.key]:this.strategy.createFunction(n,e)})),{})}};var Hn={},Nn={};Object.defineProperty(Nn,\"__esModule\",{value:!0}),Nn.expose=Nn.getExposedProperties=void 0;const Dn=Symbol(\"exposedProperties\");Nn.getExposedProperties=e=>e[Dn]||e.prototype[Dn]||[];Nn.expose=e=>(t,n,i)=>{t[Dn]=t[Dn]||[],t[Dn].push({key:n,descriptor:i,options:e})},Object.defineProperty(Hn,\"__esModule\",{value:!0}),Hn.ApiExposer=void 0;const Un=Nn;Hn.ApiExposer=class{constructor(e){this.strategy=e,this.exposeInstance=async(e,t)=>{const n=(0,Un.getExposedProperties)(e),i=await Promise.all(n.map((async({key:n,options:i})=>({key:n,options:await this.strategy.exposeFunction(e[n].bind(e),{key:n,options:i,meta:t})}))));await this.strategy.exposeMeta(t,i)}}};var Vn={},zn={},Kn={};Object.defineProperty(Kn,\"__esModule\",{value:!0}),Kn.ChannelsConsumer=void 0;Kn.ChannelsConsumer=class{constructor(e){this.channel=e,this.getExposedFunctions=async e=>{const{id:t}=e,{props:n}=await this.channel.dispatch(`api-meta:${t}`);return n},this.createFunction=e=>(...t)=>{const{action:n}=e.options;return this.channel.dispatch(n,{args:t})}}};var qn={};Object.defineProperty(qn,\"__esModule\",{value:!0}),qn.ChannelsExposer=void 0;qn.ChannelsExposer=class{constructor(e){this.channelProviderOrClient=e,this.exposeFunction=async(e,t)=>{const{key:n,options:i,meta:r}=t,{id:o}=r,s=`${o}.${i?.action||n}`;return await this.channelProviderOrClient.register(s,(async({args:t})=>e(...t))),{action:s}},this.exposeMeta=async({id:e},t)=>{const n=`api-meta:${e}`;await this.channelProviderOrClient.register(n,(()=>({props:t})))}}},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Kn,e),n(qn,e)}(zn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(zn,e)}(Vn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Wn,e),n(Hn,e),n(Vn,e),n(Nn,e)}(Gn);var Jn={};Object.defineProperty(Jn,\"__esModule\",{value:!0}),Jn.createRelayedDispatch=exports.relayChannelClientApi_1=Jn.relayChannelClientApi=void 0;const Yn=[\"no longer connected\",\"RTCDataChannel closed unexpectedly\",\"The client you are trying to dispatch from is disconnected from the target provider\"];exports.relayChannelClientApi_1=Jn.relayChannelClientApi=async(e,t)=>{e.register(`relay:${t}`,(({action:t,target:n,payload:i})=>e.dispatch(n,t,i))),await Promise.resolve()};Jn.createRelayedDispatch=(e,t,n,i)=>async(r,o)=>{try{return await e.dispatch(`relay:${n}`,{action:r,payload:o,target:t})}catch(e){if(s=e.message,Yn.some((e=>s.includes(e)))&&i)throw new Error(i);throw e}var s};var Zn,Qn,Xn,ei=s&&s.__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},ti=s&&s.__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)};Object.defineProperty(Bn,\"__esModule\",{value:!0}),Bn.ColumnOrRow=Bn.TabStack=Bn.LayoutNode=void 0;const ni=Gn,ii=Jn;class ri{constructor(e,t){Zn.set(this,void 0),this.isRoot=()=>ti(this,Zn,\"f\").isRoot(this.entityId),this.exists=()=>ti(this,Zn,\"f\").exists(this.entityId),this.getParent=async()=>{const e=await ti(this,Zn,\"f\").getParent(this.entityId);if(e)return ri.getEntity(e,ti(this,Zn,\"f\"))},this.createAdjacentStack=async(e,t)=>{const n=await ti(this,Zn,\"f\").createAdjacentStack(this.entityId,e,t);return ri.getEntity({entityId:n,type:\"stack\"},ti(this,Zn,\"f\"))},this.getAdjacentStacks=async e=>(await ti(this,Zn,\"f\").getAdjacentStacks({targetId:this.entityId,edge:e})).map((e=>ri.getEntity({type:\"stack\",entityId:e.entityId},ti(this,Zn,\"f\")))),ei(this,Zn,e,\"f\"),this.entityId=t}}Bn.LayoutNode=ri,Zn=new WeakMap,ri.newLayoutEntitiesClient=async(e,t,n)=>{const i=(0,ii.createRelayedDispatch)(e,n,\"layout-relay\",\"You are trying to interact with a layout component on a window that does not exist or has been destroyed.\");return new ni.ApiConsumer(new ni.ChannelsConsumer({dispatch:i})).consume({id:t})},ri.getEntity=(e,t)=>{const{entityId:n,type:i}=e;switch(i){case\"column\":case\"row\":return new si(t,n,i);case\"stack\":return new oi(t,n);default:throw new Error(`Unrecognised Layout Entity encountered ('${JSON.stringify(e)})`)}};class oi extends ri{constructor(e,t){super(e,t),Qn.set(this,void 0),this.type=\"stack\",this.getViews=()=>ti(this,Qn,\"f\").getStackViews(this.entityId),this.addView=async(e,t={index:0})=>ti(this,Qn,\"f\").addViewToStack(this.entityId,e,t),this.removeView=async e=>{await ti(this,Qn,\"f\").removeViewFromStack(this.entityId,e)},this.setActiveView=async e=>{await ti(this,Qn,\"f\").setStackActiveView(this.entityId,e)},ei(this,Qn,e,\"f\")}}Bn.TabStack=oi,Qn=new WeakMap;class si extends ri{constructor(e,t,n){super(e,t),Xn.set(this,void 0),this.getContent=async()=>(await ti(this,Xn,\"f\").getContent(this.entityId)).map((e=>ri.getEntity(e,ti(this,Xn,\"f\")))),ei(this,Xn,e,\"f\"),this.type=n}}Bn.ColumnOrRow=si,Xn=new WeakMap;var ai={};Object.defineProperty(ai,\"__esModule\",{value:!0}),ai.DEFAULT_LAYOUT_KEY=ai.LAYOUT_CONTROLLER_ID=void 0,ai.LAYOUT_CONTROLLER_ID=\"layout-entities\",ai.DEFAULT_LAYOUT_KEY=\"__default__\";var ci,di,hi,li=s&&s.__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)};Object.defineProperty(Ln,\"__esModule\",{value:!0}),Ln.Layout=void 0;const ui=G,pi=O,wi=d,yi=Tn,fi=Bn,gi=ai;class mi extends wi.Base{static getClient(e){return li(e,di,\"f\").getValue()}constructor(e,t){super(t),ci.add(this),di.set(this,new ui.Lazy((async()=>fi.LayoutNode.newLayoutEntitiesClient(await this.platform.getClient(),gi.LAYOUT_CONTROLLER_ID,this.identity)))),this.replace=async e=>{this.wire.sendAction(\"layout-replace\").catch((e=>{}));const t=await this.platform.getClient();await t.dispatch(\"replace-layout\",{target:this.identity,opts:{layout:e}})},this.replaceView=async(e,t)=>{this.wire.sendAction(\"layout-replace-view\").catch((e=>{}));const n=await this.platform.getClient();await n.dispatch(\"replace-view\",{target:this.identity,opts:{viewToReplace:e,newView:t}})},this.applyPreset=async e=>{this.wire.sendAction(\"layout-apply-preset\").catch((e=>{}));const t=await this.platform.getClient(),{presetType:n}=e;if(!n||!(0,yi.isValidPresetType)(n))throw new Error(\"Cannot apply preset layout, please include an applicable presetType property in the PresetLayoutOptions.\");await t.dispatch(\"apply-preset-layout\",{target:this.identity,opts:{presetType:n}})};const n=(0,pi.validateIdentity)(e);if(n)throw new Error(n);this.identity=e,this.platform=this.fin.Platform.wrapSync({uuid:e.uuid}),e.uuid===this.fin.me.uuid&&e.name===this.fin.me.name&&(this.init=this.fin.Platform.Layout.init)}async getConfig(){this.wire.sendAction(\"layout-get-config\").catch((e=>{}));return(await this.platform.getClient()).dispatch(\"get-frame-snapshot\",{target:this.identity})}async getCurrentViews(){this.wire.sendAction(\"layout-get-views\").catch((e=>{}));const e=await this.platform.getClient();return(await e.dispatch(\"get-layout-views\",{target:this.identity})).map((e=>this.fin.View.wrapSync(e)))}async getRootItem(){this.wire.sendAction(\"layout-get-root-item\").catch((()=>{}));const e=await li(this,di,\"f\").getValue(),t=await e.getRoot(\"layoutName\"in this.identity?this.identity:void 0);return fi.LayoutNode.getEntity(t,e)}async getStackByViewIdentity(e){this.wire.sendAction(\"layout-get-stack-by-view\").catch((()=>{}));const t=await li(this,di,\"f\").getValue(),n=await t.getStackByView(e);if(!n)throw new Error(`No stack found for view: ${e.uuid}/${e.name}`);return fi.LayoutNode.getEntity(n,t)}async addView(e,{location:t,targetView:n}={}){this.wire.sendAction(\"layout-add-view\").catch((e=>{}));const{identity:i}=await li(this,ci,\"m\",hi).call(this,\"layout-add-view\",{viewOptions:e,location:t,targetView:n});return{identity:i}}async closeView(e){this.wire.sendAction(\"layout-close-view\").catch((e=>{})),await li(this,ci,\"m\",hi).call(this,\"layout-close-view\",{viewIdentity:e})}}Ln.Layout=mi,di=new WeakMap,ci=new WeakSet,hi=async function(e,t){return(await this.platform.getClient()).dispatch(e,{target:this.identity,opts:t})};var vi,Ci,bi,Ii,Ei,xi=s&&s.__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)},Ai=s&&s.__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};Object.defineProperty(kn,\"__esModule\",{value:!0}),kn.LayoutModule=void 0;const Pi=d,Mi=Ln,_i=ai;class Oi extends Pi.Base{constructor(){super(...arguments),vi.add(this),Ci.set(this,!1),bi.set(this,null),this.init=async(e={})=>{if(this.wire.sendAction(\"layout-init\").catch((e=>{})),!this.wire.environment.layoutAllowedInContext(this.fin))throw new Error(\"Layout.init can only be called from a Window context.\");if(xi(this,Ci,\"f\"))throw new Error(\"Layout.init was already called, please use Layout.create to add additional layouts.\");\"openfin\"===this.wire.environment.type&&await this.fin.Platform.getCurrentSync().getClient(),Ai(this,Ci,!0,\"f\"),Ai(this,bi,await this.wire.environment.initLayoutManager(this.fin,this.wire,e),\"f\"),await this.wire.environment.applyLayoutSnapshot(this.fin,xi(this,bi,\"f\"),e);const t={name:this.fin.me.name,uuid:this.fin.me.uuid};if(!e.layoutManagerOverride){const e={layoutName:_i.DEFAULT_LAYOUT_KEY,...t};return xi(this,Ii,\"f\").call(this,e)}return this.wrapSync(t)},Ii.set(this,(e=>{const t=\"[Layout] You are using a deprecated property `layoutManager` - it will throw if you access it starting in v37.\",n=new Proxy({},{get(e,n){throw console.warn(`[Layout-mgr-proxy] accessing ${n.toString()}`),new Error(t)}}),i=Object.assign(this.wrapSync(e),{layoutManager:n});return new Proxy(i,{get(e,n){if(\"layoutManager\"===n)throw console.warn(`[Layout-proxy] accessing ${n.toString()}`),new Error(t);return e[n]}})})),this.getCurrentLayoutManagerSync=()=>xi(this,vi,\"m\",Ei).call(this,\"fin.Platform.Layout.getCurrentLayoutManagerSync()\"),this.create=async e=>this.wire.environment.createLayout(xi(this,vi,\"m\",Ei).call(this,\"fin.Platform.Layout.create()\"),e),this.destroy=async e=>this.wire.environment.destroyLayout(xi(this,vi,\"m\",Ei).call(this,\"fin.Platform.Layout.destroy()\"),e)}async wrap(e){return this.wire.sendAction(\"layout-wrap\").catch((e=>{})),new Mi.Layout(e,this.wire)}wrapSync(e){return this.wire.sendAction(\"layout-wrap-sync\").catch((e=>{})),new Mi.Layout(e,this.wire)}async getCurrent(){if(this.wire.sendAction(\"layout-get-current\").catch((e=>{})),\"openfin\"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error(\"You are not in a Window context. Only Windows can have a Layout.\");const{uuid:e,name:t}=this.fin.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction(\"layout-get-current-sync\").catch((e=>{})),\"openfin\"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error(\"You are not in a Window context. Only Windows can have a Layout.\");const{uuid:e,name:t}=this.fin.me;return this.wrapSync({uuid:e,name:t})}async getLayoutByViewIdentity(e){this.wire.sendAction(\"layout-get-by-view-identity\").catch((()=>{}));let t=await this.wire.environment.getViewWindowIdentity(this.fin,e);t.identity&&(t=t.identity);try{const n=this.wrapSync(t),i=await Mi.Layout.getClient(n),r=await i.getLayoutIdentityForViewOrThrow(e);return this.wrapSync(r)}catch(n){if(![\"No action registered at target for\",\"getLayoutIdentityForViewOrThrow is not a function\"].some((e=>n.message.includes(e))))throw n;if(t.uuid===t.name)throw new Error(`View identity ${JSON.stringify(e)} is not attached to any layout in provider window ${JSON.stringify(t)}.`);return this.wrapSync(t)}}}kn.LayoutModule=Oi,Ci=new WeakMap,bi=new WeakMap,Ii=new WeakMap,vi=new WeakSet,Ei=function(e){if(!xi(this,bi,\"f\"))throw new Error(`You must call init before using the API ${e}`);return xi(this,bi,\"f\")},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(kn,e),n(Ln,e)}(jn),Object.defineProperty(Pn,\"__esModule\",{value:!0}),Pn.PlatformModule=void 0;const Si=d,Ri=Mn,Fi=jn;class ji extends Si.Base{constructor(e,t){super(e),this._channel=t,this.Layout=new Fi.LayoutModule(this.wire)}async init(e){if(!fin.__internal_.isPlatform||fin.me.name!==fin.me.uuid)throw new Error(\"fin.Platform.init should only be called from a custom platform provider running in the main window of the application.\");return this.wire.environment.initPlatform(this.fin,e)}async wrap(e){return this.wire.sendAction(\"platform-wrap\").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}wrapSync(e){return this.wire.sendAction(\"platform-wrap-sync\").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}async getCurrent(){return this.wire.sendAction(\"platform-get-current\").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction(\"platform-get-current-sync\").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}start(e){return this.wire.sendAction(\"platform-start\").catch((e=>{})),new Promise((async(t,n)=>{try{const{uuid:n}=e,i=await this.fin.Application._create({...e,isPlatformController:!0});i.once(\"platform-api-ready\",(()=>t(this.wrapSync({uuid:n})))),i._run({uuid:n})}catch(e){n(e)}}))}startFromManifest(e,t){return this.wire.sendAction(\"platform-start-from-manifest\").catch((e=>{})),new Promise((async(n,i)=>{try{const i=await this.fin.Application._createFromManifest(e);i.once(\"platform-api-ready\",(()=>n(this.wrapSync({uuid:i.identity.uuid})))),i._run(t)}catch(e){i(e)}}))}}Pn.PlatformModule=ji,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Pn,e),n(Mn,e)}(An);var ki={};!function(e){Object.defineProperty(e,\"__esModule\",{value:!0}),e.getMe=e.getBaseMe=e.environmentUnsupportedMessage=void 0;const t=J(),n=un,i=ie(),r=rn;function o(e,t,n){return{...{isView:\"view\"===e,isWindow:\"window\"===e,isFrame:\"iframe\"===e,isExternal:\"external connection\"===e},uuid:t,name:n,entityType:e}}e.environmentUnsupportedMessage=\"You are not running in OpenFin.\",e.getBaseMe=o,e.getMe=function(s){const{uuid:a,name:c,entityType:d}=s.me,h={setContext(){throw new Error(e.environmentUnsupportedMessage)},addContextHandler(){throw new Error(e.environmentUnsupportedMessage)},getContextGroups(){throw new Error(e.environmentUnsupportedMessage)},joinContextGroup(){throw new Error(e.environmentUnsupportedMessage)},removeFromContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getAllClientsInContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getInfoForContextGroup(){throw new Error(e.environmentUnsupportedMessage)}},l=\"Interop API has not been instantiated. Either connection has failed or you have not declared interop in your config.\",u={setContext(){throw new Error(l)},addContextHandler(){throw new Error(l)},getContextGroups(){throw new Error(l)},joinContextGroup(){throw new Error(l)},removeFromContextGroup(){throw new Error(l)},getAllClientsInContextGroup(){throw new Error(l)},getInfoForContextGroup(){throw new Error(l)}},p={eventNames:()=>{throw new Error(e.environmentUnsupportedMessage)},emit:()=>{throw new Error(e.environmentUnsupportedMessage)},listeners:()=>{throw new Error(e.environmentUnsupportedMessage)},listenerCount:()=>{throw new Error(e.environmentUnsupportedMessage)},on:()=>{throw new Error(e.environmentUnsupportedMessage)},addListener:()=>{throw new Error(e.environmentUnsupportedMessage)},once:()=>{throw new Error(e.environmentUnsupportedMessage)},prependListener:()=>{throw new Error(e.environmentUnsupportedMessage)},prependOnceListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeAllListeners:()=>{throw new Error(e.environmentUnsupportedMessage)}};switch(d){case\"view\":return Object.assign(new t.View(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case\"window\":return Object.assign(new i._Window(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case\"iframe\":return Object.assign(new n._Frame(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case\"external connection\":return Object.assign(new r.ExternalApplication(s,{uuid:a}),o(d,a,c),{interop:u,isOpenFin:!1});default:return{...o(d,a,c),...p,interop:h,isOpenFin:!1}}}}(ki);var Li={},Ti={},$i={};Object.defineProperty($i,\"__esModule\",{value:!0}),$i.createWarningObject=$i.createUnusableObject=void 0,$i.createUnusableObject=function(e){const t=()=>{throw new Error(e)};return new Proxy({},{apply:t,construct:t,defineProperty:t,deleteProperty:t,get:t,getOwnPropertyDescriptor:t,getPrototypeOf:t,has:t,isExtensible:t,ownKeys:t,preventExtensions:t,set:t,setPrototypeOf:t})},$i.createWarningObject=function(e,t){return new Proxy(t,{get:(...t)=>(console.warn(e),Reflect.get(...t)),set:(...t)=>(console.warn(e),Reflect.set(...t)),getOwnPropertyDescriptor:(...t)=>(console.warn(e),Reflect.getOwnPropertyDescriptor(...t)),ownKeys:(...t)=>(console.warn(e),Reflect.ownKeys(...t))})};var Bi,Gi={},Wi={};var Hi={};!function(e){Object.defineProperty(e,\"__esModule\",{value:!0}),e.wrapIntentHandler=e.BROKER_ERRORS=e.generateOverrideWarning=e.generateOverrideError=e.wrapContextHandler=e.wrapInTryCatch=e.generateId=void 0;e.generateId=()=>`${Math.random()}${Date.now()}`;e.wrapInTryCatch=(e,t)=>(...n)=>{try{return e(...n)}catch(e){throw new Error((t||\"\")+e)}};e.wrapContextHandler=(e,t)=>async n=>{try{await e(n)}catch(e){throw console.error(`Error thrown by handler ${t} for context type ${n.type}: ${e}`),e}};e.generateOverrideError=(e,t)=>`You have tried to to use ${e} but ${t} has not been overridden in the Interop Broker. Please override this function. Refer to our documentation for more info.`;e.generateOverrideWarning=(e,t,n,i)=>{const{uuid:r,name:o}=n;return i?`Entity with identity: ${r}/${o} has called ${i} or ${e} but ${t} has not been overridden.`:`Entity with identity: ${r}/${o} has called ${e} but ${t} has not been overridden.`},e.BROKER_ERRORS={fireIntent:(0,e.generateOverrideError)(\"fireIntent\",\"handleFiredIntent\"),fireIntentForContext:(0,e.generateOverrideError)(\"fireIntentForContext\",\"handleFiredIntentForContext\"),getInfoForIntent:(0,e.generateOverrideError)(\"getInfoForIntent\",\"handleInfoForIntent\"),getInfoForIntentsByContext:(0,e.generateOverrideError)(\"getInfoForIntentsByContext\",\"handleInfoForIntentsByContext\"),joinSessionContextGroupWithJoinContextGroup:\"The Context Group you have tried to join is a Session Context Group. Custom Context Groups can only be defined by the Interop Broker through code or manifest configuration. Please use joinSessionContextGroup.\",fdc3Open:(0,e.generateOverrideError)(\"fdc3.open\",\"fdc3HandleOpen\"),fdc3FindInstances:(0,e.generateOverrideError)(\"fdc3.findInstances\",\"fdc3HandleFindInstances\"),fdc3GetAppMetadata:(0,e.generateOverrideError)(\"fdc3.getAppMetadata\",\"fdc3HandleGetAppMetadata\"),fdc3GetInfo:(0,e.generateOverrideError)(\"fdc3.getInfo\",\"fdc3HandleGetInfo\")};e.wrapIntentHandler=(e,t)=>async n=>{try{return e(n)}catch(e){throw console.error(`Error thrown by handler ${t}: ${e}`),e}}}(Hi);var Ni,Di,Ui={};function Vi(){if(Di)return Gi;Di=1;var e,t,n,r=s&&s.__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},o=s&&s.__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)},a=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Gi,\"__esModule\",{value:!0}),Gi.InteropBroker=void 0;const c=d,h=a(function(){if(Bi)return Wi;Bi=1,Object.defineProperty(Wi,\"__esModule\",{value:!0});const e=Cr();return Wi.default=class{constructor(e,t){this.provider=e,this.id=t,this.lastContext=void 0,this.contextGroupMap=new Map,this.clients=new Map,this.registerListeners()}registerListeners(){this.provider.register(`sessionContextGroup:getContext-${this.id}`,this.getCurrentContext.bind(this)),this.provider.register(`sessionContextGroup:setContext-${this.id}`,this.setContext.bind(this)),this.provider.register(`sessionContextGroup:handlerAdded-${this.id}`,this.handlerAdded.bind(this)),this.provider.register(`sessionContextGroup:handlerRemoved-${this.id}`,this.handlerRemoved.bind(this))}getCurrentContext(e){return e.type?this.contextGroupMap.get(e.type):this.lastContext}setContext(t,n){const{context:i}=t,r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name} not in Session Client State Map`);this.contextGroupMap.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{e.contextHandlers.get(i.type)?.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getClientState(e){return this.clients.get(e.endpointId)}async handlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(i){const e=r.contextHandlers.get(i)||[];r.contextHandlers.set(i,[...e,n]);const o=this.contextGroupMap.get(i);o&&await this.provider.dispatch(t,n,o)}else{r.globalHandler=n;const e=[...this.contextGroupMap.keys()].map((async e=>{const i=this.contextGroupMap.get(e);i&&await this.provider.dispatch(t,n,i)}));await Promise.all(e)}}handlerRemoved(e,t){const{handlerId:n}=e,i=this.clients.get(t.endpointId);i?(Array.from(i.contextHandlers).forEach((([,e])=>{const t=e.indexOf(n);t>-1&&e.splice(t,1)})),i.globalHandler===n&&(i.globalHandler=void 0)):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={contextHandlers:new Map,clientIdentity:e,globalHandler:void 0};this.clients.set(e.endpointId,t)}}onDisconnection(e){this.clients.delete(e.endpointId)}},Wi}()),l=Hi,u=a(i),p=function(){if(Ni)return Ui;Ni=1,Object.defineProperty(Ui,\"__esModule\",{value:!0}),Ui.PrivateChannelProvider=void 0;const e=Vi();return Ui.PrivateChannelProvider=class t{constructor(e,t){this.provider=e,this.id=t,this.clients=new Map,this.registerListeners(),this.contextByContextType=new Map,this.lastContext=void 0,this.provider.onConnection((e=>this.registerNewClient(e))),this.provider.onDisconnection((async e=>{const{endpointId:t}=e;this.clients.has(t)&&await this.handleClientDisconnecting(e),0===(await this.provider.getAllClientInfo()).length&&this.provider.destroy()}))}getClientState(e){return this.clients.get(e.endpointId)}registerListeners(){this.provider.register(\"broadcast\",this.broadcast.bind(this)),this.provider.register(\"getCurrentContext\",this.getCurrentContext.bind(this)),this.provider.register(\"contextHandlerAdded\",this.contextHandlerAdded.bind(this)),this.provider.register(\"contextHandlerRemoved\",this.contextHandlerRemoved.bind(this)),this.provider.register(\"nonStandardHandlerRemoved\",this.nonStandardHandlerRemoved.bind(this)),this.provider.register(\"onAddContextHandlerAdded\",this.onAddContextHandlerAdded.bind(this)),this.provider.register(\"onDisconnectHandlerAdded\",this.onDisconnectHandlerAdded.bind(this)),this.provider.register(\"onUnsubscribeHandlerAdded\",this.onUnsubscribeHandlerAdded.bind(this)),this.provider.register(\"clientDisconnecting\",((e,t)=>{this.handleClientDisconnecting(t)}))}broadcast(t,n){const{context:i}=t;if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name}, tried to call broadcast, is not connected to this Private Channel`);const r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to broadcast - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);this.contextByContextType.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{const t=e.handlerIdsByContextTypes.get(i.type);t&&t.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getCurrentContext(e,t){const{contextType:n}=e;if(!this.getClientState(t))throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call getCurrentContext, is not connected to this Private Channel`);if(void 0!==n){return this.contextByContextType.get(n)||null}return this.lastContext?this.lastContext:null}contextHandlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call addContextListener, is not connected to this Private Channel`);if(i){const e=r.handlerIdsByContextTypes.get(i)||[];r.handlerIdsByContextTypes.set(i,[...e,n])}else r.globalHandler=n;Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&e.onAddContextListenerHandlerId&&this.provider.dispatch(e.clientIdentity,e.onAddContextListenerHandlerId,i)}))}async contextHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);if(i){let e;if(i.globalHandler===n)i.globalHandler=void 0;else for(const[t,r]of i.handlerIdsByContextTypes){const i=r.indexOf(n);i>-1&&(r.splice(i,1),e=t)}const r=(await this.getConnectedClients()).map((async n=>{const{clientIdentity:i,clientIdentity:{endpointId:r},onUnsubscribeHandlerId:o}=n;r!==t.endpointId&&o&&await this.provider.dispatch(i,o,e)}));try{await Promise.all(r)}catch(e){throw console.error(`Problem when attempting to dispatch to onUnsubscribeHandlers. Error: ${e} Removing Client: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}`),new Error(e)}}else console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}.`)}nonStandardHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);i?i.onDisconnectHandlerId===n?i.onDisconnectHandlerId=void 0:i.onAddContextListenerHandlerId===n?i.onAddContextListenerHandlerId=void 0:i.onUnsubscribeHandlerId===n&&(i.onUnsubscribeHandlerId=void 0):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}onAddContextHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onAddContextListener, is not connected to this Private Channel`);n.onAddContextListenerHandlerId=i,Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&Array.from(e.handlerIdsByContextTypes.keys()).forEach((e=>{this.provider.dispatch(t,i,e)}))}))}onDisconnectHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onDisconnect, is not connected to this Private Channel`);n.onDisconnectHandlerId=i}onUnsubscribeHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onUnsubscribe, is not connected to this Private Channel`);n.onUnsubscribeHandlerId=i}removeClient(e){const t=this.getClientState(e);if(!t)throw new Error(`Client with Identity: ${e.uuid} ${e.name}, tried to call disconnect, is not connected to this Private Channel`);t.handlerIdsByContextTypes.clear(),this.clients.delete(e.endpointId)}async fireOnDisconnectForOtherClients(e){const{endpointId:t}=e,n=(await this.getConnectedClients()).map((async e=>{const{clientIdentity:{endpointId:n},onDisconnectHandlerId:i}=e;n!==t&&i&&await this.provider.dispatch(e.clientIdentity,i)}));try{await Promise.all(n)}catch(t){throw console.error(`Problem when attempting to dispatch to onDisconnectHandlers. Error: ${t} Disconnecting Client: uuid: ${e.uuid}. name: ${e.name}. endpointId: ${e.endpointId}`),new Error(t)}}async unsubscribeAll(e){const{endpointId:t}=e,n=this.clients.get(t);if(n){const t=Array.from(n.handlerIdsByContextTypes.values()).flat(),i=n.globalHandler;if(t.length>0){const n=t.map((async t=>this.contextHandlerRemoved({handlerId:t},e)));try{await Promise.all(n)}catch(e){console.error(e.message)}}if(i)try{await this.contextHandlerRemoved({handlerId:i},e)}catch(e){console.error(e.message)}}}async handleClientDisconnecting(e){await this.unsubscribeAll(e),this.removeClient(e),await this.fireOnDisconnectForOtherClients(e)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={clientIdentity:e,handlerIdsByContextTypes:new Map,globalHandler:void 0,onAddContextListenerHandlerId:void 0,onUnsubscribeHandlerId:void 0,onDisconnectHandlerId:void 0};this.clients.set(e.endpointId,t)}}async getConnectedClients(){const e=await this.provider.getAllClientInfo();return Array.from(this.clients.values()).filter((t=>{const{uuid:n,name:i}=t.clientIdentity;return e.some((e=>i===e.name&&n===e.uuid))}))}static init(e,n){return new t(e,n)}},Ui}(),w=G,y=[{id:\"green\",displayMetadata:{color:\"#00CC88\",name:\"green\"}},{id:\"purple\",displayMetadata:{color:\"#8C61FF\",name:\"purple\"}},{id:\"orange\",displayMetadata:{color:\"#FF8C4C\",name:\"orange\"}},{id:\"red\",displayMetadata:{color:\"#FF5E60\",name:\"red\"}},{id:\"pink\",displayMetadata:{color:\"#FF8FB8\",name:\"pink\"}},{id:\"yellow\",displayMetadata:{color:\"#E9FF8F\",name:\"yellow\"}}];let f=class i extends c.Base{constructor(i,s,a){super(i),e.set(this,void 0),t.set(this,void 0),n.set(this,void 0),this.getProvider=()=>o(this,n,\"f\").getValue(),this.interopClients=new Map,this.contextGroupsById=new Map,r(this,t,a.contextGroups??[...y],\"f\"),r(this,e,a.fdc3Info,\"f\"),a?.logging&&(this.logging=a.logging),this.intentClientMap=new Map,this.lastContextMap=new Map,this.sessionContextGroupMap=new Map,r(this,n,new w.Lazy(s),\"f\"),this.setContextGroupMap(),this.setupChannelProvider()}static createClosedConstructor(...e){return class extends i{constructor(...t){if(t.length){const[n,i,r]=t;if(r&&\"object\"==typeof r&&!(0,u.default)(r,e[2]))return console.warn(\"You have modified the parameters of the InteropOverride constructor. This behavior is deprecated and will be removed in a future version. You can modify these options in your manifest. Please consult our Interop docs for guidance on migrating to the new override scheme.\"),void super(e[0],e[1],r);console.warn(\"You are attempting to pass arguments to the InteropOverride constructor. This is not necessary, and these passed arguments will be ignored. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.\")}super(...e)}}}setContext({context:e},t){this.wire.sendAction(\"interop-broker-set-context\").catch((e=>{}));const n=this.getClientState(t);if(!n||!n.contextGroupId)throw n?new Error(\"You must join a context group before you can set context.\"):new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);{const{contextGroupId:t}=n;this.setContextForGroup({context:e},t)}}setContextForGroup({context:e},t){this.wire.sendAction(\"interop-broker-set-context-for-group\").catch((e=>{}));const n=this.contextGroupsById.get(t);if(!n)throw new Error(`Unable to set context for context group that isn't in the context group mapping: ${t}.`);const r=i.checkContextIntegrity(e);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(e)}`);const o=e.type;n.set(o,e),this.lastContextMap.set(t,o);Array.from(this.interopClients.values()).filter((e=>e.contextGroupId===t)).forEach((t=>{for(const[,n]of t.contextHandlers)i.isContextTypeCompatible(o,n.contextType)&&this.invokeContextHandler(t.clientIdentity,n.handlerId,e)}))}getCurrentContext(e,t){this.wire.sendAction(\"interop-broker-get-current-context\").catch((e=>{}));const n=this.getClientState(t);if(!n?.contextGroupId)throw new Error(\"You must be a member of a context group to call getCurrentContext\");const{contextGroupId:i}=n,r=this.contextGroupsById.get(i),o=this.lastContextMap.get(i),s=e?.contextType??o;return r&&s?r.get(s):void 0}async joinContextGroup({contextGroupId:e,target:t},n){if(this.wire.sendAction(\"interop-broker-join-context-group\").catch((e=>{})),this.sessionContextGroupMap.has(e))throw new Error(l.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup);if(t){i.hasEndpointId(t)&&await this.addClientToContextGroup({contextGroupId:e},t);try{const n=this.channel.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name));if(!n.length)throw new Error(`Given Identity ${t.uuid} ${t.name} is not connected to the Interop Broker.`);n.length>1&&console.warn(`More than one connection found for identity ${t.uuid} ${t.name}`);const i=[];for(const t of n)i.push(this.addClientToContextGroup({contextGroupId:e},t));await Promise.all(i)}catch(e){throw new Error(e)}}else await this.addClientToContextGroup({contextGroupId:e},n)}async addClientToContextGroup({contextGroupId:e},t){this.wire.sendAction(\"interop-broker-add-client-to-context-group\").catch((e=>{}));const n=this.getClientState(t);if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(!this.getContextGroups().find((t=>t.id===e)))throw new Error(`Attempting to join a context group that does not exist: ${e}. You may only join existing context groups.`);if(n.contextGroupId!==e){n.contextGroupId=e,await this.setCurrentContextGroupInClientOptions(t,e);const i=this.contextGroupsById.get(e);for(const[,e]of n.contextHandlers){const{contextType:n,handlerId:r}=e;if(void 0===n)i.forEach(((e,n)=>{this.invokeContextHandler(t,r,e)}));else if(i.has(n)){const e=i.get(n);e&&this.invokeContextHandler(t,r,e)}}}}async removeFromContextGroup({target:e},t){if(this.wire.sendAction(\"interop-broker-remove-from-context-group\").catch((e=>{})),e){i.hasEndpointId(e)&&await this.removeClientFromContextGroup(e);try{const t=this.channel.connections.filter((t=>t.uuid===e.uuid&&t.name===e.name));if(!t.length)throw new Error(`No connection found for given Identity ${e.uuid} ${e.name}`);t.length>1&&console.warn(`More than one connection found for identity ${e.uuid} ${e.name}`);const n=[];for(const e of t)n.push(this.removeClientFromContextGroup(e));await Promise.all(n)}catch(e){throw new Error(e)}}else await this.removeClientFromContextGroup(t)}async removeClientFromContextGroup(e){this.wire.sendAction(\"interop-broker-remove-client-from-context-group\").catch((e=>{}));const t=this.getClientState(e);t&&(t.contextGroupId=void 0),await this.setCurrentContextGroupInClientOptions(e,null)}getContextGroups(){return this.wire.sendAction(\"interop-broker-get-context-groups\").catch((e=>{})),o(this,t,\"f\").map((e=>({...e})))}getInfoForContextGroup({contextGroupId:e}){return this.wire.sendAction(\"interop-broker-get-info-for-context-group\").catch((e=>{})),this.getContextGroups().find((t=>t.id===e))}getAllClientsInContextGroup({contextGroupId:e}){this.wire.sendAction(\"interop-broker-get-all-clients-in-context-group\").catch((e=>{}));return Array.from(this.interopClients.values()).filter((t=>t.contextGroupId===e)).map((e=>e.clientIdentity))}async handleFiredIntent(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.raiseIntent\",\"InteropBroker.handleFiredIntent\",t,\"interopClient.fireIntent\");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntent)}async setIntentTarget(e,t){this.wire.sendAction(\"interop-broker-set-intent-target\").catch((e=>{}));const n=this.intentClientMap.get(t.name),i=`intent-handler-${e.name}`;if(n){const t=n.get(i);if(t){if(t.pendingIntents.push(e),t.clientIdentity&&t.isReady){const{clientIdentity:e,pendingIntents:n}=t;try{const r=n[n.length-1];await this.invokeIntentHandler(e,i,r),t.pendingIntents=[]}catch(n){console.error(`Error invoking intent handler for client ${e.uuid}/${e.name}/${e.endpointId}`),t.isReady=!1}}}else n.set(i,{isReady:!1,pendingIntents:[e]})}else{this.intentClientMap.set(t.name,new Map);const n=this.intentClientMap.get(t.name);n&&n.set(i,{isReady:!1,pendingIntents:[e]})}}async handleInfoForIntent(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.findIntent\",\"InteropBroker.handleInfoForIntent\",t,\"interopClient.getInfoForIntent\");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntent)}async handleInfoForIntentsByContext(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.findIntentsByContext\",\"InteropBroker.handleInfoForIntentsByContext\",t,\"interopClient.getInfoForIntentsByContext\");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntentsByContext)}async handleFiredIntentForContext(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.raiseIntentForContext\",\"InteropBroker.handleFiredIntentForContext\",t,\"interopClient.fireIntentForContext\");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntentForContext)}async clientDisconnected(e){}async fdc3HandleOpen({app:e,context:t},n){const i=(0,l.generateOverrideWarning)(\"fdc3.open\",\"InteropBroker.fdc3HandleOpen\",n);throw console.warn(i),new Error(l.BROKER_ERRORS.fdc3Open)}async fdc3HandleFindInstances(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.open\",\"InteropBroker.fdc3HandleFindInstances\",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3FindInstances)}async fdc3HandleGetAppMetadata(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.getAppMetadata\",\"InteropBroker.fdc3HandleGetAppMetadata\",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3GetAppMetadata)}async invokeContextHandler(e,t,n){const i=await this.getProvider();try{await i.dispatch(e,t,n)}catch(i){console.error(`Error invoking context handler ${t} for context type ${n.type} in client ${e.uuid}/${e.name}/${e.endpointId}`,i)}}async invokeIntentHandler(e,t,n){const i=await this.getProvider();await i.dispatch(e,t,n)}async fdc3HandleGetInfo(t,n){const{fdc3Version:i}=t;return{fdc3Version:i,...o(this,e,\"f\"),optionalFeatures:{OriginatingAppMetadata:!1,UserChannelMembershipAPIs:!0},appMetadata:{appId:\"\",instanceId:\"\"}}}async getAllClientInfo(){return(await this.getProvider()).getAllClientInfo()}decorateSnapshot(e){return{...e,interopSnapshotDetails:{contextGroupStates:this.getContextGroupStates()}}}applySnapshot(e,t){const n=e?.interopSnapshotDetails?.contextGroupStates;n&&(t?.closeExistingWindows||this.updateExistingClients(n),this.rehydrateContextGroupStates(n))}updateExistingClients(e){this.interopClients.forEach((t=>{const{clientIdentity:n,contextGroupId:r,contextHandlers:o}=t;if(r){const t=e[r];for(const[,e]of Object.entries(t))o.forEach((t=>{const{handlerId:r,contextType:o}=t;i.isContextTypeCompatible(e.type,o)&&this.invokeContextHandler(n,r,e)}))}}))}getContextGroupStates(){return i.toObject(this.contextGroupsById)}rehydrateContextGroupStates(e){const t=Object.entries(e);for(const[e,n]of t){const t=Object.entries(n);for(const[n,i]of t)if(this.contextGroupsById.has(e)){this.contextGroupsById.get(e).set(n,i)}else console.warn(`Attempting to set a context group that isn't in the context group mapping. Skipping context group rehydration for: ${e}`)}}contextHandlerRegistered({contextType:e,handlerId:t},n){const i={contextType:e,handlerId:t},r=this.getClientState(n);if(r?.contextHandlers.set(t,i),r&&r.contextGroupId){const{contextGroupId:i}=r,o=this.contextGroupsById.get(i);if(void 0===e)o.forEach(((e,i)=>{this.invokeContextHandler(n,t,e)}));else if(o.has(e)){const i=o.get(e);i&&this.invokeContextHandler(n,t,i)}}}async intentHandlerRegistered(e,t){const{handlerId:n}=e,i=this.intentClientMap.get(t.name),r=i?.get(n);if(i)if(r){const{pendingIntents:e}=r;r.clientIdentity=t,r.isReady=!0;try{if(e.length>0){const i=e[e.length-1];await this.invokeIntentHandler(t,n,i),r.pendingIntents=[]}}catch(e){console.error(`Error invoking intent handler: ${n} for client ${t.uuid}/${t.name}/${t.endpointId}`)}}else i.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t});else{this.intentClientMap.set(t.name,new Map);const e=this.intentClientMap.get(t.name);e&&e.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t})}}removeContextHandler({handlerId:e},t){const n=this.getClientState(t);n&&n.contextHandlers.delete(e)}handleJoinSessionContextGroup({sessionContextGroupId:e},t){try{if(!e)throw new Error(\"Failed to join session context group: must specify group id.\");const n=this.sessionContextGroupMap.get(e);if(n)n.registerNewClient(t);else{const n=new h.default(this.channel,e);n.registerNewClient(t),this.sessionContextGroupMap.set(e,n)}return{hasConflict:this.contextGroupsById.has(e)}}catch(e){throw new Error(e)}}getClientState(e){return this.interopClients.get(e.endpointId)}static toObject(e){const t=Object.fromEntries(e),n={};return Object.entries(t).forEach((([e,t])=>{const i=Object.fromEntries(t);n[e]=i})),n}static checkContextIntegrity(e){if(!e)return{isValid:!1,reason:\"No context supplied\"};if(\"object\"!=typeof e)return{isValid:!1,reason:\"Context must be an Object\"};if(!e.type)return{isValid:!1,reason:\"Context must have a type property\"};if(e.id&&\"object\"!=typeof e.id)return{isValid:!1,reason:\"Context id must be an Object populated with key-value identifiers (if set)\"};if(e.id){const{id:t}=e,n=Object.keys(t);let i=!1;if(!n.length)return{isValid:!1,reason:\"Context id must have at least one key-value identifier\"};if(n.forEach((e=>{\"string\"==typeof e&&\"string\"==typeof t[e]||(i=!0)})),i)return{isValid:!1,reason:\"Context id key-value identifiers must be of type string\"}}return e.name&&\"string\"!=typeof e.name?{isValid:!1,reason:\"Context name must be of string type (if set)\"}:{isValid:!0}}static hasEndpointId(e){return void 0!==e.endpointId}static isContextTypeCompatible(e,t){return void 0===t||e===t}setContextGroupMap(){for(const e of this.getContextGroups())this.contextGroupsById.set(e.id,new Map)}async setCurrentContextGroupInClientOptions(e,t){try{const n=await this.fin.System.getEntityInfo(e.uuid,e.name);let i;\"view\"===n.entityType?i=await this.fin.View.wrap(e):\"window\"===n.entityType&&(i=await this.fin.Window.wrap(e)),i&&await i.updateOptions({interop:{currentContextGroup:t}})}catch(e){}}async setupChannelProvider(){try{const e=await this.getProvider();this.channel=e,this.wireChannel(e)}catch(e){throw new Error(`Error setting up Interop Broker Channel Provider: ${e}`)}}wireChannel(e){e.onConnection((async(e,t)=>{if(!await this.isConnectionAuthorized(e,t))throw new Error(`Connection not authorized for ${e.uuid}, ${e.name}`);if(!e.endpointId)throw new Error(\"Version too old to be compatible with Interop. Please upgrade your runtime to a more recent version.\");const n={contextGroupId:void 0,contextHandlers:new Map,clientIdentity:e};t?.currentContextGroup&&this.contextGroupsById.has(t.currentContextGroup)&&(n.contextGroupId=t?.currentContextGroup),this.interopClients.set(e.endpointId,n)})),e.onDisconnection((e=>{this.interopClients.delete(e.endpointId);const t=this.intentClientMap.get(e.name);t&&e.uuid===this.fin.me.uuid&&t.forEach((e=>{e.isReady=!1})),this.sessionContextGroupMap.forEach((t=>{t.onDisconnection(e)})),this.clientDisconnected(e)})),e.beforeAction((async(e,t,n)=>{if(!await this.isActionAuthorized(e,t,n))throw new Error(`Action (${e}) not authorized for ${n.uuid}, ${n.name}`);this.logging?.beforeAction?.enabled&&console.log(e,t,n)})),e.afterAction(((e,t,n)=>{this.logging?.afterAction?.enabled&&console.log(e,t,n)})),e.register(\"setContext\",this.setContext.bind(this)),e.register(\"fireIntent\",this.handleFiredIntent.bind(this)),e.register(\"getCurrentContext\",this.getCurrentContext.bind(this)),e.register(\"getInfoForIntent\",this.handleInfoForIntent.bind(this)),e.register(\"getInfoForIntentsByContext\",this.handleInfoForIntentsByContext.bind(this)),e.register(\"fireIntentForContext\",this.handleFiredIntentForContext.bind(this)),e.register(\"getContextGroups\",this.getContextGroups.bind(this)),e.register(\"joinContextGroup\",this.joinContextGroup.bind(this)),e.register(\"removeFromContextGroup\",this.removeFromContextGroup.bind(this)),e.register(\"getAllClientsInContextGroup\",this.getAllClientsInContextGroup.bind(this)),e.register(\"getInfoForContextGroup\",this.getInfoForContextGroup.bind(this)),e.register(\"contextHandlerRegistered\",this.contextHandlerRegistered.bind(this)),e.register(\"intentHandlerRegistered\",this.intentHandlerRegistered.bind(this)),e.register(\"removeContextHandler\",this.removeContextHandler.bind(this)),e.register(\"sessionContextGroup:createIfNeeded\",this.handleJoinSessionContextGroup.bind(this)),e.register(\"fdc3Open\",this.fdc3HandleOpen.bind(this)),e.register(\"fdc3v2FindIntentsByContext\",this.handleInfoForIntentsByContext.bind(this)),e.register(\"fdc3FindInstances\",this.fdc3HandleFindInstances.bind(this)),e.register(\"fdc3GetAppMetadata\",this.fdc3HandleGetAppMetadata.bind(this)),e.register(\"fdc3v2GetInfo\",(async(e,t)=>this.fdc3HandleGetInfo.bind(this)(e,t))),e.register(\"createPrivateChannelProvider\",(async e=>{const{channelId:t}=e,n=await this.fin.InterApplicationBus.Channel.create(t);p.PrivateChannelProvider.init(n,t)}))}isConnectionAuthorized(e,t){return this.wire.sendAction(\"interop-broker-is-connection-authorized\").catch((e=>{})),Promise.resolve(!0)}isActionAuthorized(e,t,n){return this.wire.sendAction(\"interop-broker-is-action-authorized\").catch((e=>{})),Promise.resolve(!0)}};return Gi.InteropBroker=f,e=new WeakMap,t=new WeakMap,n=new WeakMap,Gi}var zi,Ki={},qi={},Ji=s&&s.__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},Yi=s&&s.__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)};Object.defineProperty(qi,\"__esModule\",{value:!0});const Zi=d,Qi=Hi;class Xi extends Zi.Base{constructor(e,t,n){super(e),zi.set(this,void 0),this.id=n,Ji(this,zi,t,\"f\")}async setContext(e){this.wire.sendAction(\"interop-session-context-group-set-context\").catch((e=>{}));return(await Yi(this,zi,\"f\")).dispatch(`sessionContextGroup:setContext-${this.id}`,{sessionContextGroupId:this.id,context:e})}async getCurrentContext(e){this.wire.sendAction(\"interop-session-context-group-get-context\").catch((e=>{}));return(await Yi(this,zi,\"f\")).dispatch(`sessionContextGroup:getContext-${this.id}`,{sessionContextGroupId:this.id,type:e})}async addContextHandler(e,t){if(this.wire.sendAction(\"interop-session-context-group-add-handler\").catch((e=>{})),\"function\"!=typeof e)throw new Error(\"Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.\");const n=await Yi(this,zi,\"f\");let i;return i=t?`sessionContextHandler:invoke-${this.id}-${t}-${(0,Qi.generateId)()}`:`sessionContextHandler:invoke-${this.id}`,n.register(i,(0,Qi.wrapContextHandler)(e,i)),await n.dispatch(`sessionContextGroup:handlerAdded-${this.id}`,{handlerId:i,contextType:t}),{unsubscribe:await this.createUnsubscribeCb(i)}}async createUnsubscribeCb(e){const t=await Yi(this,zi,\"f\");return async()=>{t.remove(e),await t.dispatch(`sessionContextGroup:handlerRemoved-${this.id}`,{handlerId:e})}}getUserInstance(){return{id:this.id,setContext:(0,Qi.wrapInTryCatch)(this.setContext.bind(this),\"Failed to set context: \"),getCurrentContext:(0,Qi.wrapInTryCatch)(this.getCurrentContext.bind(this),\"Failed to get context: \"),addContextHandler:(0,Qi.wrapInTryCatch)(this.addContextHandler.bind(this),\"Failed to add context handler: \")}}}qi.default=Xi,zi=new WeakMap;var er={},tr={},nr={},ir={},rr=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),or=s&&s.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,\"default\",{enumerable:!0,value:t})}:function(e,t){e.default=t}),sr=s&&s.__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)&&rr(t,e,n);return or(t,e),t};Object.defineProperty(ir,\"__esModule\",{value:!0}),ir.PrivateChannelClient=void 0;const ar=sr(Hi);var cr,dr;function hr(){if(cr)return tr;cr=1;var e,t=s&&s.__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)},n=s&&s.__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},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(tr,\"__esModule\",{value:!0}),tr.FDC3ModuleBase=void 0;const o=nr,a=Hi,c=wr(),d=r(i);return tr.FDC3ModuleBase=class{get client(){return t(this,e,\"f\").call(this)}get fin(){return this.wire.getFin()}constructor(t,i){this.wire=i,e.set(this,void 0),n(this,e,t,\"f\")}async broadcast(e){return this.wire.sendAction(\"fdc3-broadcast\").catch((e=>{})),this.client.setContext(e)}async _open(e,t){this.wire.sendAction(\"fdc3-open\").catch((e=>{}));try{return await c.InteropClient.ferryFdc3Call(this.client,\"fdc3Open\",{app:e,context:t})}catch(e){const t=e.message===a.BROKER_ERRORS.fdc3Open?\"ResolverUnavailable\":e.message;throw new Error(t)}}async _getChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:\"system\",...(0,o.getUnsupportedChannelApis)()})))}async getOrCreateChannel(e){this.wire.sendAction(\"fdc3-get-or-create-channel\").catch((e=>{}));const t=(await this._getChannels()).find((t=>t.id===e));if(t)return{...t,type:\"system\",...(0,o.getUnsupportedChannelApis)()};try{const t=await this.client.joinSessionContextGroup(e);return(0,o.buildAppChannelObject)(t)}catch(e){throw console.error(e.message),new Error(o.ChannelError.CreationFailed)}}async getSystemChannels(){return this.wire.sendAction(\"fdc3-get-system-channels\").catch((e=>{})),this._getChannels()}async joinChannel(e){this.wire.sendAction(\"fdc3-join-channel\").catch((e=>{}));try{return await this.client.joinContextGroup(e)}catch(e){if(e.message===a.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup?console.error(\"The Channel you have tried to join is an App Channel. Custom Channels can only be defined by the Interop Broker through code or manifest configuration. Please use getOrCreateChannel.\"):console.error(e.message),e.message.startsWith(\"Attempting to join a context group that does not exist\"))throw new Error(o.ChannelError.NoChannelFound);throw new Error(o.ChannelError.AccessDenied)}}async getCurrentChannel(){this.wire.sendAction(\"fdc3-get-current-channel\").catch((e=>{}));const e=await this.getCurrentContextGroupInfo();return e?this.buildChannelObject(e):null}async leaveCurrentChannel(){return this.wire.sendAction(\"fdc3-leave-current-channel\").catch((e=>{})),this.client.removeFromContextGroup()}async getCurrentContextGroupInfo(){const e=await this.client.getContextGroups(),t=e.map((async e=>this.client.getAllClientsInContextGroup(e.id))),n=(await Promise.all(t)).findIndex((e=>e.some((e=>{const{uuid:t,name:n}=e;return this.wire.me.uuid===t&&this.wire.me.name===n}))));return e[n]}async buildChannelObject(e){return{...e,type:\"system\",addContextListener:(...[e,t])=>{let n,i;\"function\"==typeof e?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),n=e):(n=t,\"string\"==typeof e&&(i=e));const r=(async()=>{let e=!0;const t=await this.client.getCurrentContext(i);return this.client.addContextHandler(((i,r)=>{if(!e||(e=!1,!(0,d.default)(t,i)))return n(i,r)}),i)})();return{...r,unsubscribe:()=>r.then((e=>e.unsubscribe()))}},broadcast:this.broadcast.bind(this),getCurrentContext:async e=>{const t=await this.client.getCurrentContext(e);return void 0===t?null:t}}}},e=new WeakMap,tr}ir.PrivateChannelClient=class{constructor(e,t){this.id=t,this.client=e,this.listeners=new Map}async broadcast(e){return this.client.dispatch(\"broadcast\",{context:e})}async getCurrentContext(e){return this.client.dispatch(\"getCurrentContext\",{contextType:e})}async addContextListener(e,t){if(\"function\"!=typeof t)throw new Error(\"Non-function argument passed to the second parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.\");let n;n=e?`contextHandler:invoke-${this.id}-${e}-${ar.generateId()}`:`contextHandler:invoke-${this.id}-${ar.generateId()}`,this.client.register(n,ar.wrapContextHandler(t,n));const i={unsubscribe:await this.createContextUnsubscribeCb(n)};return this.listeners.set(n,i),await this.client.dispatch(\"contextHandlerAdded\",{handlerId:n,contextType:e}),i}createNonStandardUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch(\"nonStandardHandlerRemoved\",{handlerId:e})}}createContextUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch(\"contextHandlerRemoved\",{handlerId:e})}}onAddContextListener(e){const t=`onContextHandlerAdded:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch(\"onAddContextHandlerAdded\",{handlerId:t}),n}onDisconnect(e){const t=`onDisconnect:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch(\"onDisconnectHandlerAdded\",{handlerId:t}),n}onUnsubscribe(e){const t=`onUnsubscribe:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch(\"onUnsubscribeHandlerAdded\",{handlerId:t}),n}async cleanUpAllSubs(){Array.from(this.listeners.keys()).forEach((e=>{this.client.remove(e),this.listeners.delete(e)}))}async disconnect(){try{await this.client.dispatch(\"clientDisconnecting\"),await this.cleanUpAllSubs(),await this.client.disconnect()}catch(e){throw new Error(e.message)}}},function(e){var t=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,\"__esModule\",{value:!0}),e.getIntentResolution=e.isChannel=e.isContext=e.connectPrivateChannel=e.buildAppChannelObject=e.buildPrivateChannelObject=e.ChannelError=e.ResultError=e.UnsupportedChannelApiError=e.getUnsupportedChannelApis=void 0;const n=Hi,r=ir,o=t(i);e.getUnsupportedChannelApis=e=>({addContextListener:()=>{throw new a(\"Channel.addContextListener\",e)},broadcast:()=>{throw new a(\"Channel.broadcast\",e)},getCurrentContext:()=>{throw new a(\"Channel.getCurrentContext\",e)}});class a extends Error{constructor(e,t=\"System\"){super(e),this.message=`Calling ${e} on an instance of a ${t} Channel returned by fdc3.get${t}Channels is not supported. If you would like to use a ${t} Channel, please use fdc3.joinChannel, fdc3.addContextListener, and fdc3.broadcast instead.`}}var c,d;e.UnsupportedChannelApiError=a,function(e){e.NoResultReturned=\"NoResultReturned\",e.IntentHandlerRejected=\"IntentHandlerRejected\"}(c=e.ResultError||(e.ResultError={})),(d=e.ChannelError||(e.ChannelError={})).NoChannelFound=\"NoChannelFound\",d.AccessDenied=\"AccessDenied\",d.CreationFailed=\"CreationFailed\";e.buildPrivateChannelObject=e=>{let t=!1;const n=()=>{if(t)throw new Error(\"Private Channel Client has been disconnected from the Private Channel\")};return{id:e.id,type:\"private\",broadcast:async t=>(n(),e.broadcast(t)),getCurrentContext:async t=>(n(),e.getCurrentContext(t)),addContextListener:async(t,i)=>{n();let r=i,o=t;\"function\"==typeof t&&(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),r=t,o=null);return e.addContextListener(o,r)},onAddContextListener:t=>(n(),e.onAddContextListener(t)),disconnect:async()=>(n(),t=!0,e.disconnect()),onDisconnect:t=>(n(),e.onDisconnect(t)),onUnsubscribe:t=>(n(),e.onUnsubscribe(t))}};e.buildAppChannelObject=e=>({id:e.id,type:\"app\",broadcast:e.setContext,getCurrentContext:async t=>{const n=await e.getCurrentContext(t);return void 0===n?null:n},addContextListener:(t,n)=>{let i,r;\"function\"==typeof t?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),i=t):(i=n,\"string\"==typeof t&&(r=t));const s=(async()=>{let t=!0;const n=await e.getCurrentContext(r);return e.addContextHandler(((e,r)=>{if(!t||(t=!1,!(0,o.default)(n,e)))return i(e,r)}),r)})();return{...s,unsubscribe:()=>s.then((e=>e.unsubscribe()))}}});e.connectPrivateChannel=async t=>{try{const n=await fin.InterApplicationBus.Channel.connect(t),i=new r.PrivateChannelClient(n,t);return(0,e.buildPrivateChannelObject)(i)}catch(e){throw new Error(`Private Channel with id: ${t} doesn't exist`)}};e.isContext=e=>{if(e&&\"object\"==typeof e&&\"type\"in e){const{type:t}=e;return\"string\"==typeof t}return!1};e.isChannel=e=>{if(e&&\"object\"==typeof e&&\"type\"in e&&\"id\"in e){const{type:t,id:n}=e;return\"string\"==typeof t&&\"string\"==typeof n&&(\"app\"===t||\"private\"===t)}return!1};e.getIntentResolution=async(t,i,r,o)=>{const s=(0,n.generateId)(),a=new Promise(((e,t)=>{fin.InterApplicationBus.subscribe({uuid:\"*\"},s,(t=>{e(t)})).catch((()=>t(new Error(\"getResult is not supported in this environment\"))))})),d=r?{target:r,intentResolutionResultId:s}:{intentResolutionResultId:s},h=o?{name:o,context:i,metadata:d}:{...i,metadata:d},l=async()=>{let n=await a;if(!n||\"object\"!=typeof n)throw new Error(c.NoResultReturned);const{error:i}=n;if(i)throw new Error(c.IntentHandlerRejected);if((0,e.isChannel)(n)){const{id:i,type:r}=n;switch(r){case\"private\":n=await(0,e.connectPrivateChannel)(i);break;case\"app\":{const r=await t.joinSessionContextGroup(i);n=(0,e.buildAppChannelObject)(r);break}}}else if(!(0,e.isContext)(n))throw new Error(c.NoResultReturned);return n},u=o?await t.fireIntent(h):await t.fireIntentForContext(h);return\"object\"!=typeof u?{source:{appId:\"\",instanceId:\"\"},intent:\"\",version:\"2.0\",getResult:l}:{...u,getResult:l}}}(nr);var lr,ur,pr={};function wr(){if(ur)return Ki;ur=1;var e,t,n=s&&s.__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},i=s&&s.__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)},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ki,\"__esModule\",{value:!0}),Ki.InteropClient=void 0;const o=d,a=r(qi),c=function(){if(dr)return er;dr=1,Object.defineProperty(er,\"__esModule\",{value:!0}),er.Fdc3Module=void 0;const e=Hi,t=hr();class n extends t.FDC3ModuleBase{async open(e,t){await super._open(e,t)}addContextListener(e,t){let n;return this.wire.sendAction(\"fdc3-add-context-listener\").catch((e=>{})),\"function\"==typeof e?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),n=this.client.addContextHandler(e)):n=this.client.addContextHandler(t,null===e?void 0:e),{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}addIntentListener(e,t){this.wire.sendAction(\"fdc3-add-intent-listener\").catch((e=>{}));const n=this.client.registerIntentHandler((e=>{const{context:n,metadata:i}=e,{metadata:r}=n,o=i?.intentResolutionResultId||r?.intentResolutionResultId;o&&this.fin.InterApplicationBus.publish(o,null).catch((()=>null)),t(e.context)}),e,{fdc3Version:\"1.2\"});return{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}async raiseIntent(t,n,i){this.wire.sendAction(\"fdc3-raise-intent\").catch((e=>{}));const r=i?{name:t,context:n,metadata:{target:i}}:{name:t,context:n};try{return await this.client.fireIntent(r)}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntent?\"ResolverUnavailable\":t.message;throw new Error(n)}}async findIntent(t,n){this.wire.sendAction(\"fdc3-find-intent\").catch((e=>{}));try{return await this.client.getInfoForIntent({name:t,context:n})}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntent?\"ResolverUnavailable\":t.message;throw new Error(n)}}async findIntentsByContext(t){this.wire.sendAction(\"fdc3-find-intents-by-context\").catch((e=>{}));try{return await this.client.getInfoForIntentsByContext(t)}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntentsByContext?\"ResolverUnavailable\":t.message;throw new Error(n)}}async raiseIntentForContext(t,n){this.wire.sendAction(\"fdc3-raise-intent-for-context\").catch((e=>{}));try{return await this.client.fireIntentForContext({...t,metadata:{target:n}})}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntentForContext?\"ResolverUnavailable\":t.message;throw new Error(n)}}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}getInfo(){return this.wire.sendAction(\"fdc3-get-info\").catch((e=>{})),{providerVersion:this.wire.environment.getAdapterVersionSync(),provider:`openfin-${this.wire.me.uuid}`,fdc3Version:\"1.2\"}}}return er.Fdc3Module=n,er}(),h=function(){if(lr)return pr;lr=1,Object.defineProperty(pr,\"__esModule\",{value:!0}),pr.Fdc3Module2=void 0;const e=hr(),t=Hi,n=wr(),i=nr,r=ir;class o extends e.FDC3ModuleBase{async open(e,t){return\"string\"==typeof e&&console.warn(\"Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).\"),super._open(e,t)}async findInstances(e){this.wire.sendAction(\"fdc3-find-instances\").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,\"fdc3FindInstances\",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3FindInstances?\"ResolverUnavailable\":e.message;throw new Error(n)}}async getAppMetadata(e){this.wire.sendAction(\"fdc3-get-app-metadata\").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,\"fdc3GetAppMetadata\",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3GetAppMetadata?\"ResolverUnavailable\":e.message;throw new Error(n)}}async addContextListener(e,t){this.wire.sendAction(\"fdc3-add-context-listener\").catch((e=>{}));const n=e=>t=>{const{contextMetadata:n,...i}=t,r=n?[{...i},n]:[t,null];e(...r)};let i=t,r=n(i);return\"function\"==typeof e?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),i=e,r=n(i),this.client.addContextHandler(r)):this.client.addContextHandler(r,null===e?void 0:e)}async findIntent(e,n,i){this.wire.sendAction(\"fdc3-find-intent\").catch((e=>{}));try{return await this.client.getInfoForIntent({name:e,context:n,metadata:{resultType:i}})}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntent?\"ResolverUnavailable\":e.message;throw new Error(n)}}async findIntentsByContext(e,i){this.wire.sendAction(\"fdc3-find-intents-by-context\").catch((e=>{}));const r=i?{context:e,metadata:{resultType:i}}:e;try{return await n.InteropClient.ferryFdc3Call(this.client,\"fdc3v2FindIntentsByContext\",r)}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntentsByContext?\"ResolverUnavailable\":e.message;throw new Error(n)}}async raiseIntent(e,n,r){this.wire.sendAction(\"fdc3-raise-intent\").catch((e=>{}));try{return\"string\"==typeof r&&console.warn(\"Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).\"),(0,i.getIntentResolution)(this.client,n,r,e)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?\"ResolverUnavailable\":e.message;throw new Error(n)}}async raiseIntentForContext(e,n){this.wire.sendAction(\"fdc3-raise-intent-for-context\").catch((e=>{}));try{return\"string\"==typeof n&&console.warn(\"Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).\"),(0,i.getIntentResolution)(this.client,e,n)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?\"ResolverUnavailable\":e.message;throw new Error(n)}}async addIntentListener(e,t){if(this.wire.sendAction(\"fdc3-add-intent-listener\").catch((e=>{})),\"string\"!=typeof e)throw new Error(\"First argument must be an Intent name\");return this.client.registerIntentHandler((async e=>{let n,i;const{context:r,metadata:o}=e,{contextMetadata:s,metadata:a,...c}=r,d=o?.intentResolutionResultId||a?.intentResolutionResultId;try{const e=a?{metadata:a,...c}:{...c};n=await t(e,s),i=n}catch(e){n=e,i={error:!0}}if(d&&this.fin.InterApplicationBus.publish(d,i).catch((()=>null)),n instanceof Error)throw new Error(n.message);return n}),e,{fdc3Version:\"2.0\"})}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}async createPrivateChannel(){const e=(0,t.generateId)();await n.InteropClient.ferryFdc3Call(this.client,\"createPrivateChannelProvider\",{channelId:e});const o=await this.fin.InterApplicationBus.Channel.connect(e),s=new r.PrivateChannelClient(o,e);return(0,i.buildPrivateChannelObject)(s)}async getUserChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:\"user\",...(0,i.getUnsupportedChannelApis)(\"User\")})))}async getSystemChannels(){return console.warn(\"This API has been deprecated. Please use fdc3.getUserChannels instead.\"),super.getSystemChannels()}async joinUserChannel(e){return super.joinChannel(e)}async joinChannel(e){return console.warn(\"This API has been deprecated. Please use fdc3.joinUserChannel instead.\"),super.joinChannel(e)}async getCurrentChannel(){const e=await super.getCurrentChannel();return e?{...e,type:\"user\",broadcast:this.broadcast.bind(this)}:null}async getInfo(){return n.InteropClient.ferryFdc3Call(this.client,\"fdc3v2GetInfo\",{fdc3Version:\"2.0\"})}}return pr.Fdc3Module2=o,pr}(),l=Hi;let u=class extends o.Base{constructor(i,r){super(i),e.set(this,void 0),t.set(this,void 0),n(this,t,new Map,\"f\"),n(this,e,r,\"f\")}async setContext(t){this.wire.sendAction(\"interop-client-set-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"setContext\",{context:t})}async addContextHandler(t,n){if(this.wire.sendAction(\"interop-client-add-context-handler\").catch((e=>{})),\"function\"!=typeof t)throw new Error(\"Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.\");const r=await i(this,e,\"f\");let o;o=n?`invokeContextHandler-${n}-${(0,l.generateId)()}`:\"invokeContextHandler\";const s=(0,l.wrapContextHandler)(t,o);return r.register(o,s),await r.dispatch(\"contextHandlerRegistered\",{handlerId:o,contextType:n}),{unsubscribe:async()=>{r.remove(o),await r.dispatch(\"removeContextHandler\",{handlerId:o})}}}async getContextGroups(){this.wire.sendAction(\"interop-client-get-context-groups\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getContextGroups\")}async joinContextGroup(t,n){this.wire.sendAction(\"interop-client-join-context-group\").catch((e=>{}));const r=await i(this,e,\"f\");if(!t)throw new Error(\"No contextGroupId specified for joinContextGroup.\");return r.dispatch(\"joinContextGroup\",{contextGroupId:t,target:n})}async removeFromContextGroup(t){this.wire.sendAction(\"interop-client-remove-from-context-group\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"removeFromContextGroup\",{target:t})}async getAllClientsInContextGroup(t){this.wire.sendAction(\"interop-client-get-all-clients-in-context-group\").catch((e=>{}));const n=await i(this,e,\"f\");if(!t)throw new Error(\"No contextGroupId specified for getAllClientsInContextGroup.\");return n.dispatch(\"getAllClientsInContextGroup\",{contextGroupId:t})}async getInfoForContextGroup(t){this.wire.sendAction(\"interop-client-get-info-for-context-group\").catch((e=>{}));const n=await i(this,e,\"f\");if(!t)throw new Error(\"No contextGroupId specified for getInfoForContextGroup.\");return n.dispatch(\"getInfoForContextGroup\",{contextGroupId:t})}async fireIntent(t){this.wire.sendAction(\"interop-client-fire-intent\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"fireIntent\",t)}async registerIntentHandler(t,n,r){this.wire.sendAction(\"interop-client-register-intent-handler\").catch((e=>{}));const o=await i(this,e,\"f\"),s=`intent-handler-${n}`,a=(0,l.wrapIntentHandler)(t,s);try{await o.register(s,a),await o.dispatch(\"intentHandlerRegistered\",{handlerId:s,...r})}catch(e){throw new Error(\"Unable to register intent handler\")}return{unsubscribe:async()=>{o.remove(s)}}}async getCurrentContext(t){this.wire.sendAction(\"interop-client-get-current-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getCurrentContext\",{contextType:t})}async getInfoForIntent(t){this.wire.sendAction(\"interop-client-get-info-for-intent\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getInfoForIntent\",t)}async getInfoForIntentsByContext(t){this.wire.sendAction(\"interop-client-get-info-for-intents-by-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getInfoForIntentsByContext\",t)}async fireIntentForContext(t){this.wire.sendAction(\"interop-client-fire-intent-for-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"fireIntentForContext\",t)}async joinSessionContextGroup(n){try{const r=i(this,t,\"f\").get(n);if(r)return r.getUserInstance();const o=await i(this,e,\"f\"),{hasConflict:s}=await o.dispatch(\"sessionContextGroup:createIfNeeded\",{sessionContextGroupId:n});s&&console.warn(`A (non-session) context group with the name \"${n}\" already exists. If you are trying to join a Context Group, call joinContextGroup instead.`);const c=new a.default(this.wire,i(this,e,\"f\"),n);return i(this,t,\"f\").set(n,c),c.getUserInstance()}catch(e){throw console.error(`Error thrown trying to create Session Context Group with id \"${n}\": ${e}`),e}}async onDisconnection(t){this.wire.sendAction(\"interop-client-add-ondisconnection-listener\").catch((e=>{}));return(await i(this,e,\"f\")).onDisconnection((e=>{const{uuid:n}=e;t({type:\"interop-broker\",topic:\"disconnected\",brokerName:n})}))}getFDC3Sync(e){switch(e){case\"1.2\":return new c.Fdc3Module((()=>this),this.wire);case\"2.0\":return new h.Fdc3Module2((()=>this),this.wire);default:throw new Error(`Invalid FDC3 version provided: ${e}. Must be '1.2' or '2.0'`)}}async getFDC3(e){return this.getFDC3Sync(e)}static async ferryFdc3Call(t,n,r){return(await i(t,e,\"f\")).dispatch(n,r||null)}};return Ki.InteropClient=u,e=new WeakMap,t=new WeakMap,Ki}var yr,fr,gr,mr={};function vr(){if(yr)return mr;yr=1,Object.defineProperty(mr,\"__esModule\",{value:!0}),mr.overrideCheck=mr.checkFDC32Overrides=mr.getDefaultViewFdc3VersionFromAppInfo=void 0;const e=Vi();function t(t){return[\"fdc3HandleFindInstances\",\"handleInfoForIntent\",\"handleInfoForIntentsByContext\",\"fdc3HandleGetAppMetadata\",\"fdc3HandleGetInfo\",\"fdc3HandleOpen\",\"handleFiredIntent\",\"handleFiredIntentForContext\"].filter((n=>t[n]===e.InteropBroker.prototype[n]))}return mr.getDefaultViewFdc3VersionFromAppInfo=function({manifest:e,initialOptions:t}){const n=e?.platform?.defaultViewOptions?.fdc3InteropApi??t.defaultViewOptions?.fdc3InteropApi;return[\"1.2\",\"2.0\"].includes(n??\"\")?n:void 0},mr.checkFDC32Overrides=t,mr.overrideCheck=function(e,n){if(n&&\"2.0\"===n){const n=t(e);n.length>0&&console.warn(`WARNING: FDC3 2.0 has been set as a default option for Views in this Platform, but the required InteropBroker APIs for FDC3 2.0 compliance have not all been overridden.\\nThe following APIs need to be overridden:\\n${n.join(\"\\n\")}`)}},mr}function Cr(){return gr||(gr=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),i=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),i(function(){if(fr)return Ti;fr=1;var e=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ti,\"__esModule\",{value:!0}),Ti.InteropModule=void 0;const t=e(n),i=$i,r=d,o=Vi(),a=wr(),c=vr(),h=Tn,l=e=>new e,u=\"You have attempted to use or modify InteropBroker parameters, which is not allowed. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.\";class p extends r.Base{async init(e,n=l){this.wire.sendAction(\"interop-init\").catch((()=>{}));const r=await this.wire.environment.getInteropInfo(this.wire.getFin()),s=(0,i.createUnusableObject)(u),a=(0,i.createWarningObject)(u,(0,t.default)(r)),d=async()=>{throw new Error(u)},p=o.InteropBroker.createClosedConstructor(this.wire,(()=>this.fin.InterApplicationBus.Channel.create(`interop-broker-${e}`)),r);let w;return w=Array.isArray(n)?new((0,h.overrideFromComposables)(...n)(p))(s,d,a):await n(p,s,d,a),(0,c.overrideCheck)(w,r.fdc3Version),w}connectSync(e,t){return this.wire.sendAction(\"interop-connect-sync\").catch((()=>{})),new a.InteropClient(this.wire,this.wire.environment.whenReady().then((()=>this.fin.InterApplicationBus.Channel.connect(`interop-broker-${e}`,{payload:t}))))}}return Ti.InteropModule=p,Ti}(),e),i(wr(),e),i(Vi(),e)}(Li)),Li}var br={},Ir={},Er={},xr={};Object.defineProperty(xr,\"__esModule\",{value:!0}),xr.getSnapshotSourceChannelName=void 0;xr.getSnapshotSourceChannelName=e=>`snapshot-source-provider-${e.uuid}`;var Ar,Pr,Mr,_r,Or,Sr=s&&s.__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},Rr=s&&s.__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)};Object.defineProperty(Er,\"__esModule\",{value:!0}),Er.SnapshotSource=void 0;const Fr=d,jr=xr,kr=new Map;class Lr extends Fr.Base{constructor(e,t){super(e),Ar.set(this,void 0),Pr.set(this,(()=>(kr.has(this.identity.uuid)||kr.set(this.identity.uuid,{eventFired:null,clientPromise:null}),kr.get(this.identity.uuid)))),Mr.set(this,(()=>(Rr(this,Pr,\"f\").call(this).clientPromise||(Rr(this,Pr,\"f\").call(this).clientPromise=Rr(this,_r,\"f\").call(this)),Rr(this,Pr,\"f\").call(this).clientPromise))),_r.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);try{Rr(this,Pr,\"f\").call(this).eventFired||await Rr(this,Or,\"f\").call(this);const t=await this.fin.InterApplicationBus.Channel.connect(e,{wait:!1});return t.onDisconnection((()=>{Rr(this,Pr,\"f\").call(this).clientPromise=null,Rr(this,Pr,\"f\").call(this).eventFired=null})),t}catch(e){throw Rr(this,Pr,\"f\").call(this).clientPromise=null,new Error(\"The targeted SnapshotSource is not currently initialized. Await this object's ready() method.\")}})),Or.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);let t,n;const i=new Promise(((e,i)=>{t=e,n=i}));Rr(this,Pr,\"f\").call(this).eventFired=i;const r=async i=>{try{i.channelName===e&&(t(),await this.fin.InterApplicationBus.Channel.removeListener(\"connected\",r))}catch(e){n(e)}};await this.fin.InterApplicationBus.Channel.on(\"connected\",r)})),Sr(this,Ar,t,\"f\")}get identity(){return Rr(this,Ar,\"f\")}async ready(){this.wire.sendAction(\"snapshot-source-ready\").catch((e=>{}));try{await Rr(this,Mr,\"f\").call(this)}catch(e){await Rr(this,Pr,\"f\").call(this).eventFired}}async getSnapshot(){this.wire.sendAction(\"snapshot-source-get-snapshot\").catch((e=>{}));const e=await Rr(this,Mr,\"f\").call(this),t=await e.dispatch(\"get-snapshot\");return(await t).snapshot}async applySnapshot(e){this.wire.sendAction(\"snapshot-source-apply-snapshot\").catch((e=>{}));return(await Rr(this,Mr,\"f\").call(this)).dispatch(\"apply-snapshot\",{snapshot:e})}}Er.SnapshotSource=Lr,Ar=new WeakMap,Pr=new WeakMap,Mr=new WeakMap,_r=new WeakMap,Or=new WeakMap,Object.defineProperty(Ir,\"__esModule\",{value:!0}),Ir.SnapshotSourceModule=void 0;const Tr=d,$r=Er,Br=xr;class Gr extends Tr.Base{async init(e){if(this.wire.sendAction(\"snapshot-source-init\").catch((e=>{})),\"object\"!=typeof e||\"function\"!=typeof e.getSnapshot||\"function\"!=typeof e.applySnapshot)throw new Error(\"you must pass in a valid SnapshotProvider\");const t=await this.fin.InterApplicationBus.Channel.create((0,Br.getSnapshotSourceChannelName)(this.fin.me));t.register(\"get-snapshot\",(async()=>({snapshot:await e.getSnapshot()}))),t.register(\"apply-snapshot\",(({snapshot:t})=>e.applySnapshot(t)))}wrapSync(e){return this.wire.sendAction(\"snapshot-source-wrap-sync\").catch((e=>{})),new $r.SnapshotSource(this.wire,e)}async wrap(e){return this.wire.sendAction(\"snapshot-source-wrap\").catch((e=>{})),this.wrapSync(e)}}Ir.SnapshotSourceModule=Gr,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Ir,e),n(Er,e)}(br),Object.defineProperty(a,\"__esModule\",{value:!0});var Wr=a.Fin=void 0;const Hr=t,Nr=c,Dr=ie(),Ur=Z(),Vr=de,zr=en,Kr=rn,qr=un,Jr=bn,Yr=J(),Zr=An,Qr=ki,Xr=Cr(),eo=br;class to extends Hr.EventEmitter{constructor(e){super(),this.wire=e,this.System=new Nr.System(e),this.Window=new Dr._WindowModule(e),this.Application=new Ur.ApplicationModule(e),this.InterApplicationBus=new Vr.InterApplicationBus(e),this.Clipboard=new zr.Clipboard(e),this.ExternalApplication=new Kr.ExternalApplicationModule(e),this.Frame=new qr._FrameModule(e),this.GlobalHotkey=new Jr.GlobalHotkey(e),this.Platform=new Zr.PlatformModule(e,this.InterApplicationBus.Channel),this.View=new Yr.ViewModule(e),this.Interop=new Xr.InteropModule(e),this.SnapshotSource=new eo.SnapshotSourceModule(e),e.registerFin(this),this.me=(0,Qr.getMe)(e),e.on(\"disconnected\",(()=>{this.emit(\"disconnected\")}))}}Wr=a.Fin=to;var no={},io={};function ro(e){return\"string\"==typeof e.manifestUrl}function oo(e){return ao(e)&&\"string\"==typeof e.address}function so(e){return oo(e)&&\"string\"==typeof e.token}function ao(e){return\"string\"==typeof e.uuid}function co(e){return e.runtime&&\"string\"==typeof e.runtime.version}function ho(e){return ao(e)&&co(e)}Object.defineProperty(io,\"__esModule\",{value:!0}),io.isInternalConnectConfig=io.isPortDiscoveryConfig=io.isNewConnectConfig=io.isConfigWithReceiver=io.isRemoteConfig=io.isExistingConnectConfig=io.isExternalConfig=void 0,io.isExternalConfig=ro,io.isExistingConnectConfig=oo,io.isRemoteConfig=so,io.isConfigWithReceiver=function(e){return\"object\"==typeof e.receiver&&so({...e,address:\"\"})},io.isNewConnectConfig=ho,io.isPortDiscoveryConfig=function(e){return ro(e)&&co(e)||ho(e)},io.isInternalConnectConfig=function(e){return oo(e)||ho(e)};var lo={},uo={};Object.defineProperty(uo,\"__esModule\",{value:!0}),uo.EmitterMap=void 0;const po=t;function wo(e){return Buffer.from(e).toString(\"base64\")}uo.EmitterMap=class{constructor(){this.storage=new Map}hashKeys(e){return e.map(wo).join(\"/\")}getOrCreate(e){const t=this.hashKeys(e);return this.storage.has(t)||this.storage.set(t,new po.EventEmitter),this.storage.get(t)}has(e){return this.storage.has(this.hashKeys(e))}delete(e){const t=this.hashKeys(e);return this.storage.delete(t)}},Object.defineProperty(lo,\"__esModule\",{value:!0});const yo=uo;class fo extends yo.EmitterMap{constructor(){super(...arguments),this.dispatchEvent=e=>{if(function(e){return\"process-desktop-event\"===e.action}(e)){const{payload:t}=e,n=function(e){const{topic:t}=e;if(\"frame\"===t||\"window\"===t||\"view\"===t){const{uuid:n,name:i}=e;return[t,n,i]}if(\"application\"===t){const{uuid:n}=e;return[t,n]}return[t]}(t);if(this.has(n))return this.getOrCreate(n).emit(t.type,t),!0}return!1}}}lo.default=fo;var go,mo,vo=s&&s.__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},Co=s&&s.__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)},bo=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(no,\"__esModule\",{value:!0});var Io=no.Transport=void 0;const Eo=t,xo=io,Ao=g,Po=bo(lo),Mo=ki,_o=ke;class Oo extends Eo.EventEmitter{constructor(e,t,n){super(),this.wireListeners=new Map,this.topicRefMap=new Map,this.eventAggregator=new Po.default,this.messageHandlers=[this.eventAggregator.dispatchEvent],go.set(this,void 0),mo.set(this,void 0),this.connectSync=()=>{Co(this,go,\"f\").connectSync()},this.getPort=()=>Co(this,go,\"f\").getPort(),vo(this,go,new e(this.onmessage.bind(this)),\"f\"),this.environment=t,this.sendRaw=Co(this,go,\"f\").send.bind(Co(this,go,\"f\")),this.registerMessageHandler(this.handleMessage.bind(this)),Co(this,go,\"f\").on(\"disconnected\",(()=>{for(const[,{handleNack:e}]of this.wireListeners)e({reason:\"Remote connection has closed\"});this.wireListeners.clear(),this.emit(\"disconnected\")}));const{uuid:i,name:r}=n,o=this.environment.getCurrentEntityType();this.me=(0,Mo.getBaseMe)(o,i,r)}getFin(){if(!Co(this,mo,\"f\"))throw new Error(\"No Fin object registered for this transport\");return Co(this,mo,\"f\")}registerFin(e){if(Co(this,mo,\"f\"))throw new Error(\"Fin object has already been registered for this transport\");vo(this,mo,e,\"f\")}shutdown(){return Co(this,go,\"f\").shutdown()}async connect(e){if((0,xo.isConfigWithReceiver)(e))return await Co(this,go,\"f\").connect(e.receiver),this.authorize(e);if((0,xo.isRemoteConfig)(e))return this.connectRemote(e);if((0,xo.isExistingConnectConfig)(e))return this.connectByPort(e);if((0,xo.isNewConnectConfig)(e)){const t=await this.environment.retrievePort(e);return this.connectByPort({...e,address:`ws://localhost:${t}`})}}async connectRemote(e){return await Co(this,go,\"f\").connect(new(this.environment.getWsConstructor())(e.address)),this.authorize(e)}async connectByPort(e){const{address:t,uuid:n}=e,i={...e,type:\"file-token\"},r=Co(this,go,\"f\");await r.connect(new(this.environment.getWsConstructor())(e.address));const o=await this.sendAction(\"request-external-authorization\",{uuid:n,type:\"file-token\"},!0);if(\"external-authorization-response\"!==o.action)throw new Ao.UnexpectedActionError(o.action);return await this.environment.writeToken(o.payload.file,o.payload.token),this.authorize(i)}async authorize(e){const t=await this.sendAction(\"request-authorization\",e,!0);if(\"authorization-response\"!==t.action)throw new Ao.UnexpectedActionError(t.action);if(!0!==t.payload.success)throw new Ao.RuntimeError(t.payload)}sendAction(e,t={},n=!1){let i=()=>{};const r=Ao.RuntimeError.getCallSite(1),o=this.environment.getNextMessageId(),s=new Promise(((s,a)=>{i=a;const c={action:e,payload:t,messageId:o},d=Co(this,go,\"f\");return this.addWireListener(o,s,(e=>this.nackHandler(e,a,r)),n),d.send(c).catch(a)}));return Object.assign(s,{cancel:i,messageId:o})}nackHandler(e,t,n){t(\"string\"==typeof e?e:new Ao.RuntimeError(e,n))}ferryAction(e){return new Promise(((t,n)=>{const i=this.environment.getNextMessageId();e.messageId=i;const r=e=>{t(e.payload)};return Co(this,go,\"f\").send(e).then((()=>this.addWireListener(i,r,(e=>this.nackHandler(e,n)),!1))).catch(n)}))}registerMessageHandler(e){this.messageHandlers.push(e)}addWireListener(e,t,n,i){i?this.uncorrelatedListener=t:this.wireListeners.has(e)?n({reason:\"Duplicate handler id\",error:(0,_o.errorToPOJO)(new Ao.DuplicateCorrelationError(String(e)))}):this.wireListeners.set(e,{resolve:t,handleNack:n})}onmessage(e){for(const t of this.messageHandlers)t.call(null,e)}handleMessage(e){const t=e.correlationId||NaN;if(\"correlationId\"in e){if(!this.wireListeners.has(t))return!1;{const{resolve:n,handleNack:i}=this.wireListeners.get(t);\"ack\"!==e.action?i({reason:\"Did not receive ack action\",error:(0,_o.errorToPOJO)(new Ao.NoAckError(e.action))}):\"payload\"in e?e.payload.success?n.call(null,e):i(e.payload):\"string\"==typeof e.reason?i(e):(console.warn(\"Received invalid response from core\",e),i({reason:\"invalid response shape\"})),this.wireListeners.delete(t)}}else this.uncorrelatedListener&&this.uncorrelatedListener.call(null,e),this.uncorrelatedListener=()=>{};return!0}}Io=no.Transport=Oo,go=new WeakMap,mo=new WeakMap;const So=(...e)=>({log:(...t)=>console.debug(`[${(new Date).toISOString()}]`,...(e=>e.map((e=>`[${e}]`)))(e),...t),getLogger:(...t)=>So(...e,...t)}),Ro=So(\"@openfin/core-web/client\");function Fo(e,t){if(!function(e){return\"string\"==typeof e}(e))throw new Error(`Property ${t} has invalid type. Expected string, got ${typeof e}.`)}const jo=\"web-broker-ports-ready\",ko=Ro.getLogger(\"get-web-interop-ports\");function Lo(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)}function To(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}\"function\"==typeof SuppressedError&&SuppressedError;const $o=e=>{var n,i,r;return r=class extends t.EventEmitter{constructor(t){super(),n.set(this,void 0),i.set(this,!1),this.connectSync=()=>{Lo(this,i,\"f\")||(e.addEventListener(\"message\",(e=>{e.data?.topic?.startsWith(\"wire-message\")&&e.data.message&&Lo(this,n,\"f\").call(this,{...JSON.parse(e.data.message),ports:e.ports})})),e.start())},this.connect=async()=>{this.connectSync()},this.send=t=>(e.postMessage({topic:\"wire-message\",message:JSON.stringify(t)}),Promise.resolve()),this.shutdown=async()=>{e.close()},To(this,n,t,\"f\")}getPort(){return e}},n=new WeakMap,i=new WeakMap,r};var Bo={},Go={};Object.defineProperty(Go,\"__esModule\",{value:!0}),Go.BaseEnvironment=void 0;const Wo=vr();Go.BaseEnvironment=class{async getViewWindowIdentity(e,t){const{identity:n}=await e.View.wrapSync(t).getCurrentWindow();return n}async getInteropInfo(e){const t=await e.Application.getCurrentSync().getInfo().catch((()=>null)),n=t?.initialOptions?.interopBrokerConfiguration??{};return{fdc3Version:t?(0,Wo.getDefaultViewFdc3VersionFromAppInfo)(t):void 0,...n,fdc3Info:{providerVersion:await e.System.getVersion(),provider:\"OpenFin\"}}}},Object.defineProperty(Bo,\"__esModule\",{value:!0});var Ho=Bo.BrowserEnvironment=void 0;const No=Go;class Do extends No.BaseEnvironment{constructor(){super(...arguments),this.type=\"other\",this.getRandomId=()=>{const e=new Uint32Array(1);return window.crypto.getRandomValues(e)[0].toString(32)}}getAdapterVersionSync(){return\"\"}observeBounds(e,t){throw new Error(\"Method not implemented.\")}layoutAllowedInContext(e){return!1}initLayoutManager(e,t,n){throw new Error(\"Method not implemented.\")}applyLayoutSnapshot(e,t,n){throw new Error(\"Method not implemented.\")}createLayout(e,t){throw new Error(\"Method not implemented.\")}destroyLayout(e,t){throw new Error(\"Method not implemented.\")}resolveLayout(e,t){throw new Error(\"Method not implemented.\")}initPlatform(...e){throw new Error(\"Method not implemented.\")}writeToken(e,t){return Promise.resolve(\"\")}retrievePort(e){throw new Error(\"Method not implemented.\")}getNextMessageId(){return this.getRandomId()}createChildContent(e){throw new Error(\"Method not implemented.\")}getWebWindow(e){throw new Error(\"Method not implemented.\")}getCurrentEntityIdentity(){throw new Error(\"Method not implemented.\")}getCurrentEntityType(){return\"external connection\"}raiseEvent(e,t){throw new Error(\"Method not implemented.\")}getUrl(){return location.href}getDefaultChannelOptions(){return{create:{},connect:{}}}getRtcPeer(){return new RTCPeerConnection}getWsConstructor(){return WebSocket}whenReady(){return Promise.resolve()}}Ho=Bo.BrowserEnvironment=Do;const Uo=e=>\"platform\"in e&&void 0!==e.platform;var Vo,zo;class Ko extends Ho{constructor(e){super(),this.connectConfig=e,Vo.set(this,void 0),zo.set(this,new W((async()=>Promise.resolve().then((function(){return require(\"./main-b14f67c9.js\")}))))),Uo(e)&&this.validatePlatformOptions(e)}getAdapterVersionSync(){return\"0.39.21\"}validatePlatformOptions({platform:e}){if(!(\"layoutSnapshot\"in e))throw new Error(\"Platform options are missing layoutSnapshot. Please provide a layoutSnapshot in the platform options.\");if(\"windows\"in e||\"windows\"in e.layoutSnapshot)throw new Error(\"It appears you tried to call connect() with a snapshot object from an OpenFin desktop environment. Note that connect() expects to be called with a platform property with this structure: { platform: { layoutSnapshot } }. To get a layoutSnapshot of the expected structure, use fin.Platform.Layout.getCurrentLayoutManagerSync().getLayoutSnapshot() in v34+ in your desktop environment.\");const{layouts:t}=e.layoutSnapshot;Object.entries(t).map((([e,t])=>{if(\"object\"!=typeof t||null===t)throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must be an object.`);if(!(\"content\"in t))throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must contain a 'content' property.`)}))}async getInteropInfo(e){return{...{contextGroups:void 0,logging:{beforeAction:{enabled:!1},afterAction:{enabled:!1}}},fdc3Version:void 0,fdc3Info:{providerVersion:\"0.39.21\",provider:\"OpenFin Web\"}}}layoutAllowedInContext(e){return!0}async initLayoutManager(e,t,n){if(Lo(this,Vo,\"f\"))throw new Error(\"Layout already initialized.\");if(!Uo(this.connectConfig))throw new Error(\"Platform options are missing from connection config.\");const{WebLayoutEntryPoint:i}=await Lo(this,zo,\"f\").getValue();return To(this,Vo,new i(this.connectConfig),\"f\"),await Lo(this,Vo,\"f\").initLayoutManager(e,t,n)}async applyLayoutSnapshot(e,t,n){Lo(this,Vo,\"f\")?.applyLayoutSnapshot(e,t,n)}async createLayout(e,t){return Lo(this,Vo,\"f\")?.createLayout(e,t)}async destroyLayout(e,t){return Lo(this,Vo,\"f\")?.destroyLayout(e,t)}async getViewWindowIdentity(e,t){return Promise.resolve({uuid:t.uuid,name:t.uuid})}}Vo=new WeakMap,zo=new WeakMap;const qo=()=>{const e=((e,t)=>{const n=new RegExp(`^${t}<(?.*)>$`).exec(e)?.groups?.meta;if(n)try{return JSON.parse(atob(n))}catch(e){throw new Error(`Failed to decode JSON from ${n}.`)}})(window.name,\"of-frame\");if(e)try{const{name:t,uuid:n,brokerUrl:i,providerId:r,contextGroup:o}=e;return Fo(i,\"brokerUrl\"),Fo(n,\"uuid\"),Fo(t,\"name\"),{identity:{name:t,uuid:n},brokerUrl:i,interopConfig:{providerId:r,currentContextGroup:o}}}catch(e){throw new Error(`Unexpected error occurred when inferring platform information: ${e.stack}`)}},Jo=()=>{const e=r.v4();return{uuid:e,name:e}},Yo=async e=>{if(\"enabled\"===e.connectionInheritance){const t=await(async e=>{const t=qo();if(t){const{validateOptions:n=(()=>!0)}=e,{identity:i,...r}=t;if(!await n(r))throw new Error(\"Parent options were rejected by validateOptions.\");return t}})(e);if(t)return t}if(!e.options){const t=\"enabled\"===e.connectionInheritance?\"Broker URL was not specified nor provided by a platform container.\":\"Connection inheritance is disabled but no options were provided.\";throw new Error(t)}return{...e.options,identity:Jo()}};exports.__classPrivateFieldGet=Lo,exports.__classPrivateFieldSet=To,exports.apiExposer=Gn,exports.commonjsGlobal=s,exports.connect=async t=>{try{Ro.log(\"Establishing connection\",t);const{brokerUrl:n,identity:i,timeout:r,interopConfig:s}=await Yo(t),{workerPort:a,iframeBrokerPort:c}=await(async(e,t,n)=>{const{origin:i}=new URL(e),r=document.createElement(\"IFRAME\");let s;r.style.display=\"none\";try{return await new Promise(((a,c)=>{const d=e=>{if(e.source===r.contentWindow&&e.data?.topic===`ack-${jo}`){if(e.origin!==i)c(new Error(`Broker redirected to unexpected origin ${e.origin}, expected ${i}.`));else if(e.data.success){const[t,n]=e.ports;a({iframeBrokerPort:t,workerPort:n})}else c(new m(e.data));window.removeEventListener(\"message\",d),clearTimeout(s)}};window.addEventListener(\"message\",d),ko.log(`Connecting to broker ${e}`),r.setAttribute(\"src\",e),r.setAttribute(\"name\",o(t,\"of-broker\")),document.body.appendChild(r),ko.log(\"Iframe loaded, awaiting init message from iframe\"),n&&(s=setTimeout((()=>{window.removeEventListener(\"message\",d),document.body.removeChild(r),c(new Error(\"Worker did not initialize in time\"))}),n))}))}catch(e){throw new Error(`Failed to initialise Fin Web Client. ${e.message}`,{cause:e})}})(n,i,r);Ro.log(\"Successfully established connection to shared worker\");const d={entityType:\"external connection\",...i};a.start(),c.start();const h=((t,n,i)=>{const r=$o(n),o=new Ko(t),s=new Io(r,o,i);return s.connectSync(),window.Buffer=e.Buffer,new Wr(s)})(t,a,d);return s?.providerId&&(h.me.interop=h.Interop.connectSync(s.providerId),s?.currentContextGroup&&h.me.interop.joinContextGroup(s.currentContextGroup).catch((e=>{console.warn(`Error joining specified context group: ${s?.currentContextGroup}, continuing`,e)}))),{...h,me:{...h.me,identity:{uuid:h.me.uuid,name:h.me.name}}}}catch(e){throw new Error(`An error occured during web-interop connection: ${e.message}`)}},exports.decorators=Nn,exports.encodeOptions=o,exports.layout_constants=ai,exports.lazy=G;\n","\"use strict\";var t=require(\"./main-8cad4070.js\"),e=require(\"uuid\");require(\"buffer/\"),require(\"events\"),require(\"lodash/cloneDeep\"),require(\"lodash/isEqual\");var i={},n={};Object.defineProperty(n,\"__esModule\",{value:!0}),n.mapValuesAsync=n.mapEntriesAsync=void 0;const o=(t,[e,i])=>({...t,[e]:i});async function s(t,e){return(await Promise.all(e.map((async([e,i])=>[e,await t(i,e)])))).reduce(o,{})}n.mapEntriesAsync=s,n.mapValuesAsync=async function(t,e){let i;return i=e instanceof Map?[...e.entries()]:Object.entries(e),s(t,i)};var r,a,l,h,d=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldSet||function(t,e,i,n,o){if(\"m\"===n)throw new TypeError(\"Private method is not writable\");if(\"a\"===n&&!o)throw new TypeError(\"Private accessor was defined without a setter\");if(\"function\"==typeof e?t!==e||!o:!e.has(t))throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");return\"a\"===n?o.call(t,i):o?o.value=i:e.set(t,i),i},c=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldGet||function(t,e,i,n){if(\"a\"===i&&!n)throw new TypeError(\"Private accessor was defined without a getter\");if(\"function\"==typeof e?t!==e||!n:!e.has(t))throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");return\"m\"===i?n:\"a\"===i?n.call(t):n?n.value:e.get(t)};Object.defineProperty(i,\"__esModule\",{value:!0});var m=i.DefaultLayoutManager=void 0;const u=n;class p{constructor(t){a.set(this,void 0),l.set(this,new Map),d(this,a,t,\"f\")}size(){return c(this,l,\"f\").size}async applyLayoutSnapshot({layouts:t}){if(Object.keys(t).length>1)throw new Error(\"[LayoutManager] Tried to call applyLayoutSnapshot with more than 1 layout. When implementing multiple layouts via overridden LayoutManager class, you must override and fully implement the applyLayoutSnapshot method without calling super.applyLayoutSnapshot().\");const[[e,i]]=Object.entries(t);await p.createLayout(this,{layoutName:e,layout:i})}async showLayout({layoutName:t}){}async getLayoutSnapshot(){return{layouts:await(0,u.mapValuesAsync)((t=>t.getFrameSnapshot()),c(this,l,\"f\"))}}async removeLayout({layoutName:t}){}getLayoutIdentityForView(t){const e=[...c(this,l,\"f\").values()].find((e=>e.getCurrentViews().some((e=>e.name===t.name&&e.uuid===t.uuid))));return e?.identity??void 0}isLayoutVisible({layoutName:t}){return c(p,r,\"m\",h).call(p,this,t).isVisible()}resolveLayoutIdentity(t){if(t&&\"layoutName\"in t)return t;const e=[...c(this,l,\"f\").values()];if(1===e.length)return e[0].identity;const i=e.find((t=>t.isVisible()));return i?.identity??void 0}static async resolveLayout(t,e){const i=t.resolveLayoutIdentity(e);if(void 0===i||!(\"layoutName\"in i))throw new Error(\"[layout-manager] resolveLayout: Could not resolve the layout identity. Make sure you include 'layoutName' in the identity object.\");return c(p,r,\"m\",h).call(p,t,i.layoutName)}static async handleSharedView(t,e,i){await(0,u.mapValuesAsync)((async t=>{if(t.identity.layoutName!==e.layoutName){const e=t.getCurrentViews().find((t=>t.name===i.name));e&&await t.onViewDetached({viewIdentity:e,target:null}).catch(console.error)}}),c(t,l,\"f\"))}static async handleLastViewRemoved(t,e){await t.removeLayout(e),await c(t,a,\"f\").handleLastViewRemoved(t)}static async destroyLayout(t,{layoutName:e}){await c(p,r,\"m\",h).call(p,t,e).destroy(),c(t,l,\"f\").delete(e)}static async createLayout(t,e){const{layoutName:i}=e;if(c(t,l,\"f\").has(i))throw new Error(`Layout name ${i} already exists`);await c(t,a,\"f\").createLayout(e,t)}static registerLayout(t,e,i){c(t,l,\"f\").set(e,i)}static getAllLayouts(t){return[...c(t,l,\"f\").values()]}static setInitialSnapshot(t,e){c(t,a,\"f\").setInitialSnapshot(e)}static createClosedConstructor(...t){return class extends p{constructor(){super(...t)}}}}m=i.DefaultLayoutManager=p,r=p,a=new WeakMap,l=new WeakMap,h=function(t,e){const i=c(t,l,\"f\").get(e);if(!i)throw new Error(`[layout-manager] getLayoutByName: Could not locate layout with name '${e}'`);return i};var g={},f={},v={};Object.defineProperty(v,\"__esModule\",{value:!0}),v.ReversibleMap=void 0;v.ReversibleMap=class{constructor(){this.valueToKey=new Map,this.keyToValue=new Map,this.setUnique=(t,e)=>{if(this.hasKey(t)||this.hasValue(e))throw new Error(\"Key or value already in the map.\");this.keyToValue.set(t,e),this.valueToKey.set(e,t)},this.getKey=t=>{const e=this.valueToKey.get(t);if(!e)throw new Error(\"Value not found in the map.\");return e},this.deleteKey=t=>{const e=this.getValue(t);return this.keyToValue.delete(t),this.valueToKey.delete(e),e},this.deleteValue=t=>{const e=this.getKey(t);return this.keyToValue.delete(e),this.valueToKey.delete(t),e},this.hasKey=t=>this.keyToValue.has(t),this.hasValue=t=>this.valueToKey.has(t)}getValue(t){const e=this.keyToValue.get(t);if(!e)throw new Error(\"Key not found in the map.\");return e}},Object.defineProperty(f,\"__esModule\",{value:!0});var _=f.LayoutContentCache=void 0;const y=t.lazy,C=v;class w{constructor(){this.contentItemCache=new C.ReversibleMap,this.contentItemCacheId=0,this.createCacheKey=()=>{const t=`entity-${this.contentItemCacheId.toString()}`;return this.contentItemCacheId+=1,t},this.hasKey=t=>this.contentItemCache.hasKey(t),this.getItemOrUndefined=t=>{try{return this.getContentItemOrThrow(t)}catch(t){return}},this.getContentItemOrThrow=(t,e)=>{if(!this.contentItemCache.hasKey(t))throw new Error(\"Layout component has been destroyed or detached from the current layout.\");const i=this.contentItemCache.getValue(t);if(e&&!e.includes(i.type))throw new Error(`Layout item is not the expected type. Expected ${e.join(\", \")}, got ${i.type}.`);return i},this.getOrCreateEntityId=t=>{if(this.contentItemCache.hasValue(t))return this.contentItemCache.getKey(t);t.onDestroyed((()=>{this.contentItemCache.deleteValue(t)}));const e=this.createCacheKey();return this.contentItemCache.setUnique(e,t),e}}static getSingleInstance(){return w.singleton.getValue()}}_=f.LayoutContentCache=w,w.singleton=new y.Lazy((()=>new w));var I={},b={};!function(t){Object.defineProperty(t,\"__esModule\",{value:!0}),t.getAdjacentStacks=t.doShareEdge=t.getAdjacentItem=void 0;t.getAdjacentItem=(e,i)=>{const{parent:n}=e;if(e.isRoot()||!n)return;const o=[\"top\",\"bottom\"].includes(i)?\"column\":\"row\",s=[\"top\",\"left\"].includes(i)?-1:1;if(n.type===o){const t=n.contentItems.indexOf(e)+s;if(t>=0&&t{const n=t.getBounds(),o=e.getBounds();if(!n||!o)return!1;if([\"top\",\"bottom\"].includes(i)){return!(n.righto.right)}return!(n.bottomo.bottom)};t.getAdjacentStacks=(e,i)=>{const n=[\"top\",\"bottom\"].includes(i)?\"row\":\"column\",o=s=>\"stack\"===s.type?(0,t.doShareEdge)(e,s,i)?[s]:[]:\"root\"===s.type||\"ground\"===s.type?[]:s.type===n?s.contentItems.map((t=>o(t))).flat():s.type!==n?[\"top\",\"right\"].includes(i)?o(s.contentItems[s.contentItems.length-1]):o(s.contentItems[0]):[],s=(0,t.getAdjacentItem)(e,i);return s?o(s):[]}}(b);var S=t.commonjsGlobal&&t.commonjsGlobal.__decorate||function(t,e,i,n){var o,s=arguments.length,r=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if(\"object\"==typeof Reflect&&\"function\"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(s<3?o(r):s>3?o(e,i,r):o(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};Object.defineProperty(I,\"__esModule\",{value:!0}),I.LayoutEntitiesController=void 0;const E=t.decorators,x=b,L=i;class z{constructor(t,e,i){this.wire=t,this.layoutManager=e,this.layoutContentCache=i,this.analytics=t=>{this.wire.sendAction(`layout-controller-${t}`).catch((()=>{}))},this.getLayoutIdentityForViewOrThrow=async t=>{const e=this.layoutManager.getLayoutIdentityForView(t);if(!e)throw new Error(`View identity ${t.name} is not attached to any layouts.`);return e},this.getRoot=async t=>{this.analytics(\"get-root\");const e=(await this.getLayout(t)).getRoot();return{type:e.type,entityId:this.layoutContentCache.getOrCreateEntityId(e)}},this.getStackByView=async t=>{this.analytics(\"get-stack-by-view\");const e=await this.getLayoutIdentityForViewOrThrow(t),i=(await this.getLayout(e)).getStackByView(t);if(\"stack\"===i?.type)return{entityId:this.layoutContentCache.getOrCreateEntityId(i),type:\"stack\"}},this.getStackViews=t=>{this.analytics(\"get-stack-views\");return this.layoutContentCache.getContentItemOrThrow(t,[\"stack\"]).contentItems.map((t=>({name:t.viewName,uuid:this.wire.me.uuid})))},this.isRoot=t=>{this.analytics(\"is-root\");return this.layoutContentCache.getContentItemOrThrow(t).isRoot()},this.exists=t=>(this.analytics(\"exists\"),this.layoutContentCache.hasKey(t)),this.addViewToStack=async(t,e,{index:i}={index:0})=>{this.analytics(\"add-view-to-stack\");const n=this.layoutContentCache.getContentItemOrThrow(t);if(i&&i>n.contentItems.length+1)throw new Error(`Index '${i}' out of range, please exclude the index or specify a number between 0 and ${n.contentItems.length}`);const o={id:t,index:i},{identity:s}=await n.layout.platformCreateView(e,{location:o});return s},this.findViewInStack=(t,e)=>t.contentItems.find((t=>t.viewName===e.name)),this.removeViewFromStack=async(t,e)=>{this.analytics(\"remove-view-from-stack\");const i=this.layoutContentCache.getContentItemOrThrow(t,[\"stack\"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to remove a view ('${e.name}') which does not belong to the stack.`);await n.layout.platformCloseView(e)},this.createAdjacentStack=async(t,e,{position:i=\"right\"}={})=>{if(this.analytics(\"create-adjacent-stack\"),!Array.isArray(e)||0===e.length)throw new Error('The parameter \"views\" must be an array with at least 1 element.');if(![\"top\",\"bottom\",\"left\",\"right\"].includes(i))throw new Error(`Invalid position '${i}' specified.`);const n=this.layoutContentCache.getContentItemOrThrow(t).createAdjacentStack({position:i}),o=this.layoutContentCache.getOrCreateEntityId(n);return await Promise.all(e.reverse().map((t=>this.addViewToStack(o,t)))),o},this.getAdjacentStacks=async({targetId:t,edge:e})=>{this.analytics(\"get-adjacent-stacks\");const i=this.layoutContentCache.getContentItemOrThrow(t);return(0,x.getAdjacentStacks)(i,e).map((t=>({entityId:this.layoutContentCache.getOrCreateEntityId(t)})))},this.setStackActiveView=async(t,e)=>{this.analytics(\"set-stack-active-view\");const i=this.layoutContentCache.getContentItemOrThrow(t,[\"stack\"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to set a view ('${e.name}') as active when it does not belong to the stack.`);i.setActiveContentItem(n,!0)}}async getLayout(t){const e=await L.DefaultLayoutManager.resolveLayout(this.layoutManager,t);if(!e)throw new Error(`Could not resolve target layout identity ${JSON.stringify(t)}`);return e}getContent(t){this.analytics(\"get-content\");return this.layoutContentCache.getContentItemOrThrow(t,[\"column\",\"row\"]).contentItems.map((t=>({type:t.type,entityId:this.layoutContentCache.getOrCreateEntityId(t)})))}getParent(t){this.analytics(\"get-parent\");const e=this.layoutContentCache.getContentItemOrThrow(t);if(!e.isRoot())return e.parent?.contentItems.includes(e)?{type:e.parent.type,entityId:this.layoutContentCache.getOrCreateEntityId(e.parent)}:void 0}}S([(0,E.expose)()],z.prototype,\"getLayoutIdentityForViewOrThrow\",void 0),S([(0,E.expose)()],z.prototype,\"getRoot\",void 0),S([(0,E.expose)()],z.prototype,\"getStackByView\",void 0),S([(0,E.expose)()],z.prototype,\"getStackViews\",void 0),S([(0,E.expose)()],z.prototype,\"getContent\",null),S([(0,E.expose)()],z.prototype,\"getParent\",null),S([(0,E.expose)()],z.prototype,\"isRoot\",void 0),S([(0,E.expose)()],z.prototype,\"exists\",void 0),S([(0,E.expose)()],z.prototype,\"addViewToStack\",void 0),S([(0,E.expose)()],z.prototype,\"removeViewFromStack\",void 0),S([(0,E.expose)()],z.prototype,\"createAdjacentStack\",void 0),S([(0,E.expose)()],z.prototype,\"getAdjacentStacks\",void 0),S([(0,E.expose)()],z.prototype,\"setStackActiveView\",void 0),I.LayoutEntitiesController=z,Object.defineProperty(g,\"__esModule\",{value:!0});var M=g.initLayoutEndpoints=void 0;const P=t.apiExposer,T=t.layout_constants,A=f,k=I,D=i;M=g.initLayoutEndpoints=async function(t,e){const i=t.getFin(),n=await i.Platform.getCurrentSync().getClient(),o=new P.ChannelsExposer(n);await new P.ApiExposer(o).exposeInstance(new k.LayoutEntitiesController(t,e,A.LayoutContentCache.getSingleInstance()),{id:T.LAYOUT_CONTROLLER_ID}),await async function(t,e){const i=t=>async i=>{const n=await D.DefaultLayoutManager.resolveLayout(e,i.target);if(!n)throw new Error(`Could not resolve the layout target from payload ${JSON.stringify(i)}`);return t(n,i)},n=(e,n)=>{t.register(e,i(n))},o=(t,e)=>{n(t,e)};n(\"replace-view\",((t,e)=>t.replaceView(e))),n(\"replace-layout\",((t,{layout:e})=>t.replaceLayout(e))),n(\"add-view\",((t,e)=>t.insertView(e))),o(\"layout-add-view\",((t,{viewOptions:e,location:i,targetView:n})=>t.platformCreateView(e,{location:i,targetView:n}))),n(\"close-view\",((t,e)=>t.cleanupView(e.viewIdentity))),o(\"layout-close-view\",((t,e)=>t.platformCloseView(e.viewIdentity))),n(\"apply-preset-layout\",((t,e)=>t.applyPreset(e))),n(\"get-layout-views\",(t=>t.getCurrentViews())),n(\"get-frame-snapshot\",(t=>t.getFrameSnapshot())),n(\"is-visible\",(t=>t.isVisible())),n(\"destroy\",(t=>t.destroy())),t.register(\"get-layout-snapshot\",(()=>e.getLayoutSnapshot()))}(n,e)};var R={};Object.defineProperty(R,\"__esModule\",{value:!0});var U=R.BaseLayout=void 0;U=R.BaseLayout=class{};var O={};Object.defineProperty(O,\"__esModule\",{value:!0});var V=O.DOMEmitter=void 0;V=O.DOMEmitter=class{constructor(t){this.container=t}dispatchLocalEvent(t,e){const i={...e,type:t,tabSelector:`tab-${e.name}`,containerSelector:`container-${e.name}`,topic:\"openfin-DOM-event\"};this.container.dispatchEvent(new CustomEvent(t,{detail:i}))}};var B={};Object.defineProperty(B,\"__esModule\",{value:!0});var H=B.mapLayoutContentItemsImmutableSync=B.mapLayoutContentItemsImmutable=W=B.isVisible=void 0;var W=B.isVisible=t=>(0!==t.offsetWidth||0!==t.offsetHeight)&&\"hidden\"!==window.getComputedStyle(t).visibility&&t.offsetTop>=0&&t.offsetLeft>=0&&t.offsetTop<=window.innerHeight&&t.offsetLeft<=window.innerWidth;const F=t=>\"type\"in t&&\"component\"===t.type;B.mapLayoutContentItemsImmutable=async function t(e,i){return F(i)?e(i):{...i,content:await Promise.all(i.content?.map((i=>t(e,i))))}},H=B.mapLayoutContentItemsImmutableSync=function t(e,i){return F(i)?e(i):{...i,content:i.content?.map((i=>t(e,i)))}};class N extends Error{constructor(t,e){super(e),this.type=t}}class G extends N{constructor(t,e){super(\"Configuration\",t),this.node=e}}class j extends N{constructor(t){super(\"PopoutBlocked\",t)}}class $ extends N{constructor(t){super(\"API\",t)}}class Z extends N{constructor(t){super(\"Bind\",t)}}class q extends Error{constructor(t,e,i){super(`${t}: ${e}${void 0===i?\"\":\": \"+i}`)}}class X extends q{constructor(t,e){super(\"Assert\",t,e)}}class Y extends q{constructor(t,e,i){super(\"UnreachableCase\",t,`${e}${void 0===i?\"\":\": \"+i}`)}}class K extends q{constructor(t,e){super(\"UnexpectedNull\",t,e)}}class J extends q{constructor(t,e){super(\"UnexpectedUndefined\",t,e)}}var Q;!function(t){let e=!1;const i={PopoutCannotBeCreatedWithGroundItemConfig:{id:0,default:\"Popout cannot be created with ground ItemConfig\"},PleaseRegisterAConstructorFunction:{id:1,default:\"Please register a constructor function\"},ComponentTypeNotRegisteredAndBindComponentEventHandlerNotAssigned:{id:2,default:\"Component type not registered and BindComponentEvent handler not assigned\"},ComponentIsAlreadyRegistered:{id:3,default:\"Component is already registered\"},ComponentIsNotVirtuable:{id:4,default:\"Component is not virtuable. Requires rootHtmlElement field/getter\"},VirtualComponentDoesNotHaveRootHtmlElement:{id:5,default:'Virtual component does not have getter \"rootHtmlElement\"'},ItemConfigIsNotTypeComponent:{id:6,default:\"ItemConfig is not of type component\"},InvalidNumberPartInSizeString:{id:7,default:\"Invalid number part in size string\"},UnknownUnitInSizeString:{id:8,default:\"Unknown unit in size string\"},UnsupportedUnitInSizeString:{id:9,default:\"Unsupported unit in size string\"}};t.idCount=Object.keys(i).length;const n=Object.values(i);t.checkInitialise=function(){if(!e)for(let e=0;e=\"0\"&&t<=\"9\"}function Tt(t,e){const i=zt(e);t.style.width=i}function At(t,e){const i=zt(e);t.style.height=i}function kt(t){return{width:t.offsetWidth,height:t.offsetHeight}}function Dt(t,e){t.style.display=e?\"\":\"none\"}function Rt(t,e){if(void 0!==e)for(const i in e)if(e.hasOwnProperty(i)){const n=e[i],o=t[i];t[i]=Ut(o,n)}return t}function Ut(t,e){if(\"object\"!=typeof e)return e;if(Array.isArray(e)){const t=e.length,i=new Array(t);for(let n=0;n36)throw new Error(\"Too many keys in config minifier map\")},t.translateObject=n}(dt||(dt={})),function(t){t.defaults={type:at.ground,content:[],size:1,sizeUnit:ht.Fractional,minSize:void 0,minSizeUnit:ht.Pixel,id:\"\",isClosable:!0},t.createCopy=function(t,e){switch(t.type){case at.ground:case at.row:case at.column:return gt.createCopy(t,e);case at.stack:return ut.createCopy(t,e);case at.component:return pt.createCopy(t);default:throw new Y(\"CICC91354\",t.type,\"Invalid Config Item type specified\")}},t.createDefault=function(t){switch(t){case at.ground:throw new X(\"CICCDR91562\");case at.row:case at.column:return gt.createDefault(t);case at.stack:return ut.createDefault();case at.component:return pt.createDefault();default:throw new Y(\"CICCDD91563\",t,\"Invalid Config Item type specified\")}},t.isComponentItem=function(t){return t.type===at.component},t.isStackItem=function(t){return t.type===at.stack},t.isGroundItem=function(t){return t.type===at.ground}}(ct||(ct={})),function(t){t.defaultMaximised=!1,function(t){t.createCopy=function(t,e){return void 0===t?void 0:{show:null!=e?e:t.show,popout:t.popout,close:t.close,maximise:t.maximise,minimise:t.minimise,tabDropdown:t.tabDropdown}}}(t.Header||(t.Header={}))}(mt||(mt={})),function(t){function e(t){const e=t.length,i=new Array(e);for(let n=0;n\"__glMaximised\"===t));t>0&&(o=!0,n=n.splice(t,1)),e=n.length>0?n[0]:ct.defaults.id}else e=n;return i=void 0!==t.maximised?t.maximised:o,{id:e,maximised:i}}}(wt||(wt={})),function(t){function e(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0;return{resolved:!0,root:Et.resolve(i),openPopouts:t.resolveOpenPopouts(e.openPopouts),dimensions:t.Dimensions.resolve(e.dimensions),settings:t.Settings.resolve(e.settings),header:t.Header.resolve(e.header,e.settings,e.labels)}}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:Lt.fromResolvedArray(e.openPopouts),settings:_t.Settings.createCopy(e.settings),dimensions:t.Dimensions.fromResolved(e.dimensions),header:_t.Header.createCopy(e.header)}},t.isResolved=function(t){const e=t;return void 0!==e.resolved&&!0===e.resolved},t.resolveOpenPopouts=function(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0,{root:Et.resolve(o),openPopouts:xt.resolveOpenPopouts(e.openPopouts),dimensions:xt.Dimensions.resolve(e.dimensions),settings:xt.Settings.resolve(e.settings),header:xt.Header.resolve(e.header,e.settings,e.labels),parentId:null!==(i=e.parentId)&&void 0!==i?i:null,indexInParent:null!==(n=e.indexInParent)&&void 0!==n?n:null,window:t.Window.resolve(e.window,e.dimensions),resolved:!0}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:i(e.openPopouts),dimensions:xt.Dimensions.fromResolved(e.dimensions),settings:_t.Settings.createCopy(e.settings),header:_t.Header.createCopy(e.header),parentId:e.parentId,indexInParent:e.indexInParent,window:t.Window.fromResolved(e.window)}},t.fromResolvedArray=i}(Lt||(Lt={}));class Wt{constructor(){this._allEventSubscriptions=[],this._subscriptionsMap=new Map,this.unbind=this.removeEventListener,this.trigger=this.emit}tryBubbleEvent(t,e){}emit(t,...e){let i=this._subscriptionsMap.get(t);if(void 0!==i){i=i.slice();for(let t=0;t0){const n=e.slice();n.unshift(t);const o=this._allEventSubscriptions.slice();for(let t=0;t0?n.contentItems[0]:n,e=0);const o=this._layoutManager.createAndInitContentItem(i,t);t.addChild(o,e),this._layoutManager.layoutConfig.settings.popInOnClose?this._onClose():this.close()}createWindow(){const t=this.createUrl(),e=Math.floor(1e6*Math.random()).toString(36),i=this.serializeWindowFeatures({width:this._initialWindowSize.width,height:this._initialWindowSize.height,innerWidth:this._initialWindowSize.width,innerHeight:this._initialWindowSize.height,menubar:\"no\",toolbar:\"no\",location:\"no\",personalbar:\"no\",resizable:\"yes\",scrollbars:\"no\",status:\"no\"});if(this._popoutWindow=globalThis.open(t,e,i),this._popoutWindow)this._popoutWindow.addEventListener(\"load\",(()=>this.positionWindow()),{passive:!0}),this._popoutWindow.addEventListener(\"beforeunload\",(()=>{this._layoutManager.layoutConfig.settings.popInOnClose?this.popIn():this._onClose()}),{passive:!0}),this._checkReadyInterval=setInterval((()=>this.checkReady()),10);else if(!0===this._layoutManager.layoutConfig.settings.blockedPopoutsThrowError){throw new j(\"Popout blocked\")}}checkReady(){if(null===this._popoutWindow)throw new K(\"BPCR01844\");this._popoutWindow.__glInstance&&this._popoutWindow.__glInstance.isInitialised&&(this.onInitialised(),void 0!==this._checkReadyInterval&&(clearInterval(this._checkReadyInterval),this._checkReadyInterval=void 0))}serializeWindowFeatures(t){const e=[];for(const i in t)e.push(i+\"=\"+t[i].toString());return e.join(\",\")}createUrl(){const t=\"gl-window-config-\"+Ot(),e=_t.minifyConfig(this._config);try{localStorage.setItem(t,JSON.stringify(e))}catch(t){throw new Error(\"Error while writing to localStorage \"+function(t){return t instanceof Error?t.message:\"string\"==typeof t?t:\"Unknown Error\"}(t))}const i=new URL(location.href);return i.searchParams.set(\"gl-window\",t),i.toString()}positionWindow(){if(null===this._popoutWindow)throw new Error(\"BrowserPopout.positionWindow: null popoutWindow\");this._popoutWindow.moveTo(this._initialWindowSize.left,this._initialWindowSize.top),this._popoutWindow.focus()}onInitialised(){this._isInitialised=!0,this.getGlInstance().on(\"popIn\",(()=>this.popIn())),this.emit(\"initialised\")}_onClose(){setTimeout((()=>this.emit(\"closed\")),50)}}class Gt extends Wt{constructor(t,e,i,n){super(),this.layoutManager=t,this._parent=i,this._element=n,this._popInParentIds=[],this._type=e.type,this._id=e.id,this._isInitialised=!1,this.isGround=!1,this.isRow=!1,this.isColumn=!1,this.isStack=!1,this.isComponent=!1,this.size=e.size,this.sizeUnit=e.sizeUnit,this.minSize=e.minSize,this.minSizeUnit=e.minSizeUnit,this._isClosable=e.isClosable,this._pendingEventPropagations={},this._throttledEvents=[\"stateChanged\"],this._contentItems=this.createContentItems(e.content)}get type(){return this._type}get id(){return this._id}set id(t){this._id=t}get popInParentIds(){return this._popInParentIds}get parent(){return this._parent}get contentItems(){return this._contentItems}get isClosable(){return this._isClosable}get element(){return this._element}get isInitialised(){return this._isInitialised}static isStack(t){return t.isStack}static isComponentItem(t){return t.isComponent}static isComponentParentableItem(t){return t.isStack||t.isGround}removeChild(t,e=!1){const i=this._contentItems.indexOf(t);if(-1===i)throw new Error(\"Can't remove child item. Unknown content item\");if(e||this._contentItems[i].destroy(),this._contentItems.splice(i,1),this._contentItems.length>0)this.updateSize(!1);else if(!this.isGround&&!0===this._isClosable){if(null===this._parent)throw new K(\"CIUC00874\");this._parent.removeChild(this)}}addChild(t,e,i){return null!=e||(e=this._contentItems.length),this._contentItems.splice(e,0,t),t.setParent(this),!0===this._isInitialised&&!1===t._isInitialised&&t.init(),e}replaceChild(t,e,i=!1){const n=this._contentItems.indexOf(t),o=t._element.parentNode;if(-1===n)throw new X(\"CIRCI23232\",\"Can't replace child. oldChild is not child of this\");if(null===o)throw new K(\"CIRCP23232\");if(o.replaceChild(e._element,t._element),!0===i&&(t._parent=null,t.destroy()),this._contentItems[n]=e,e.setParent(this),e.size=t.size,e.sizeUnit=t.sizeUnit,e.minSize=t.minSize,e.minSizeUnit=t.minSizeUnit,null===e._parent)throw new K(\"CIRCNC45699\");!0===e._parent._isInitialised&&!1===e._isInitialised&&e.init(),this.updateSize(!1)}remove(){if(null===this._parent)throw new K(\"CIR11110\");this._parent.removeChild(this)}popout(){const t=Ot(),e=this.layoutManager.createPopoutFromContentItem(this,void 0,t,void 0);return this.emitBaseBubblingEvent(\"stateChanged\"),e}calculateConfigContent(){const t=this._contentItems,e=t.length,i=new Array(e);for(let n=0;nthis.propagateEventToLayoutManager(t,e))))}propagateEventToLayoutManager(t,e){this._pendingEventPropagations[t]=!1,this.layoutManager.emitUnknown(t,e)}}class jt extends Gt{constructor(t,e,i){super(t,e,i,document.createElement(\"div\")),this._parentItem=i,this._focused=!1,this.isComponent=!0,this._reorderEnabled=e.reorderEnabled,this.applyUpdatableConfig(e),this._initialWantMaximise=e.maximised;const n=document.createElement(\"div\");n.classList.add(\"lm_content\"),this.element.appendChild(n),this._container=new Ft(e,this,t,n,(t=>this.handleUpdateItemConfigEvent(t)),(()=>this.show()),(()=>this.hide()),(t=>this.focus(t)),(t=>this.blur(t)))}get componentName(){return this._container.componentType}get componentType(){return this._container.componentType}get reorderEnabled(){return this._reorderEnabled}get initialWantMaximise(){return this._initialWantMaximise}get component(){return this._container.component}get container(){return this._container}get parentItem(){return this._parentItem}get headerConfig(){return this._headerConfig}get title(){return this._title}get tab(){return this._tab}get focused(){return this._focused}destroy(){this._container.destroy(),super.destroy()}applyUpdatableConfig(t){this.setTitle(t.title),this._headerConfig=t.header}toConfig(){const t=this._container.stateRequestEvent,e=void 0===t?this._container.state:t();return{type:at.component,content:[],size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,maximised:!1,isClosable:this.isClosable,reorderEnabled:this._reorderEnabled,title:this._title,header:mt.Header.createCopy(this._headerConfig),componentType:pt.copyComponentType(this.componentType),componentState:e}}close(){if(null===this.parent)throw new K(\"CIC68883\");this.parent.removeChild(this,!1)}enterDragMode(t,e){Tt(this.element,t),At(this.element,e),this._container.enterDragMode(t,e)}exitDragMode(){this._container.exitDragMode()}enterStackMaximised(){this._container.enterStackMaximised()}exitStackMaximised(){this._container.exitStackMaximised()}drag(){this._container.drag()}updateSize(t){this.updateNodeSize(t)}init(){this.updateNodeSize(!1),super.init(),this._container.emit(\"open\"),this.initContentItems()}setTitle(t){this._title=t,this.emit(\"titleChanged\",t),this.emit(\"stateChanged\")}setTab(t){this._tab=t,this.emit(\"tab\",t),this._container.setTab(t)}hide(){super.hide(),this._container.setVisibility(!1)}show(){super.show(),this._container.setVisibility(!0)}focus(t=!1){this.parentItem.setActiveComponentItem(this,!0,t)}setFocused(t){this._focused=!0,this.tab.setFocused(),t||this.emitBaseBubblingEvent(\"focus\")}blur(t=!1){this._focused&&this.layoutManager.setFocusedComponentItem(void 0,t)}setBlurred(t){this._focused=!1,this.tab.setBlurred(),t||this.emitBaseBubblingEvent(\"blur\")}setParent(t){this._parentItem=t,super.setParent(t)}handleUpdateItemConfigEvent(t){this.applyUpdatableConfig(t)}updateNodeSize(t){if(\"none\"!==this.element.style.display){const{width:e,height:i}=kt(this.element);this._container.setSizeToNodeSize(e,i,t)}}}class $t extends Gt{constructor(){super(...arguments),this._focused=!1}get focused(){return this._focused}setFocusedValue(t){this._focused=t}}class Zt extends Wt{constructor(t,e){super(),this._eElement=t,this._pointerTracking=!1,this._pointerDownEventListener=t=>this.onPointerDown(t),this._pointerMoveEventListener=t=>this.onPointerMove(t),this._pointerUpEventListener=t=>this.onPointerUp(t),this._timeout=void 0,this._allowableTargets=[t,...e],this._oDocument=document,this._eBody=document.body,this._nDelay=1800,this._nDistance=10,this._nX=0,this._nY=0,this._nOriginalX=0,this._nOriginalY=0,this._dragging=!1,this._eElement.addEventListener(\"pointerdown\",this._pointerDownEventListener,{passive:!0})}destroy(){this.checkRemovePointerTrackingEventListeners(),this._eElement.removeEventListener(\"pointerdown\",this._pointerDownEventListener)}cancelDrag(){this.processDragStop(void 0)}onPointerDown(t){if(this._allowableTargets.includes(t.target)&&t.isPrimary){const e=this.getPointerCoordinates(t);this.processPointerDown(e)}}processPointerDown(t){this._nOriginalX=t.x,this._nOriginalY=t.y,this._oDocument.addEventListener(\"pointermove\",this._pointerMoveEventListener),this._oDocument.addEventListener(\"pointerup\",this._pointerUpEventListener,{passive:!0}),this._pointerTracking=!0,this._timeout=setTimeout((()=>{try{this.startDrag()}catch(t){throw console.error(t),t}}),this._nDelay)}onPointerMove(t){this._pointerTracking&&(this.processDragMove(t),t.preventDefault())}processDragMove(t){this._nX=t.pageX-this._nOriginalX,this._nY=t.pageY-this._nOriginalY,!1===this._dragging&&(Math.abs(this._nX)>this._nDistance||Math.abs(this._nY)>this._nDistance)&&this.startDrag(),this._dragging&&this.emit(\"drag\",this._nX,this._nY,t)}onPointerUp(t){this.processDragStop(t)}processDragStop(t){var e;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this.checkRemovePointerTrackingEventListeners(),!0===this._dragging&&(this._eBody.classList.remove(\"lm_dragging\"),this._eElement.classList.remove(\"lm_dragging\"),null===(e=this._oDocument.querySelector(\"iframe\"))||void 0===e||e.style.setProperty(\"pointer-events\",\"\"),this._dragging=!1,this.emit(\"dragStop\",t))}checkRemovePointerTrackingEventListeners(){this._pointerTracking&&(this._oDocument.removeEventListener(\"pointermove\",this._pointerMoveEventListener),this._oDocument.removeEventListener(\"pointerup\",this._pointerUpEventListener),this._pointerTracking=!1)}startDrag(){var t;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this._dragging=!0,this._eBody.classList.add(\"lm_dragging\"),this._eElement.classList.add(\"lm_dragging\"),null===(t=this._oDocument.querySelector(\"iframe\"))||void 0===t||t.style.setProperty(\"pointer-events\",\"none\"),this.emit(\"dragStart\",this._nOriginalX,this._nOriginalY)}getPointerCoordinates(t){return{x:t.pageX,y:t.pageY}}}class qt{constructor(t,e,i){this._isVertical=t,this._size=e,this._grabSize=i0){const i=this.createSplitter(Math.max(0,e-1)).element;e>0?(this.contentItems[e-1].element.insertAdjacentElement(\"afterend\",i),i.insertAdjacentElement(\"afterend\",t.element)):(this.contentItems[0].element.insertAdjacentElement(\"beforebegin\",i),i.insertAdjacentElement(\"beforebegin\",t.element))}else this._childElementContainer.appendChild(t.element);super.addChild(t,e);const n=1/this.contentItems.length*100;if(!0===i)return this.emitBaseBubblingEvent(\"stateChanged\"),e;for(let e=0;e0&&(this.calculateRelativeSizes(),this.setAbsoluteSizes()),this.emitBaseBubblingEvent(\"stateChanged\"),this.emit(\"resize\")}setAbsoluteSizes(){const t=this.calculateAbsoluteSizes();for(let e=0;e0&&t.itemSizes[e]++,this._isColumn?(Tt(this.contentItems[e].element,t.crossAxisSize),At(this.contentItems[e].element,t.itemSizes[e])):(Tt(this.contentItems[e].element,t.itemSizes[e]),At(this.contentItems[e].element,t.crossAxisSize))}calculateAbsoluteSizes(){const t=(this.contentItems.length-1)*this._splitterSize,{width:e,height:i}=kt(this.element);let n,o;this._isColumn?(n=i-t,o=e):(n=e-t,o=i);let s=0;const r=[];for(let t=0;t0){const n=100-t;for(let t=0;t100&&e.length>0){for(let t=0;te)return;{const r=i/e;let a=i;for(let e=0;ethis.onSplitterDrag(e,t,i))),e.on(\"dragStop\",(()=>this.onSplitterDragStop(e))),e.on(\"dragStart\",(()=>this.onSplitterDragStart(e))),this._splitter.splice(t,0,e),e}getSplitItems(t){const e=this._splitter.indexOf(t);return{before:this.contentItems[e],after:this.contentItems[e+1]}}calculateContentItemMinSize(t){const e=t.minSize;if(void 0!==e){if(t.minSizeUnit===ht.Pixel)return e;throw new X(\"ROCGMD98831\",JSON.stringify(t))}{const t=this.layoutManager.layoutConfig.dimensions;return this._isColumn?t.defaultMinItemHeight:t.defaultMinItemWidth}}calculateContentItemsTotalMinSize(t){let e=0;for(const i of t)e+=this.calculateContentItemMinSize(i);return e}onSplitterDragStart(t){const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=this.calculateContentItemsTotalMinSize(e.before.contentItems),s=this.calculateContentItemsTotalMinSize(e.after.contentItems);this._splitterPosition=0,this._splitterMinPosition=-1*(i-o),this._splitterMaxPosition=n-s}onSplitterDrag(t,e,i){let n=this._isColumn?i:e;if(null===this._splitterMinPosition||null===this._splitterMaxPosition)throw new K(\"ROCOSD59226\");n=Math.max(n,this._splitterMinPosition),n=Math.min(n,this._splitterMaxPosition),this._splitterPosition=n;const o=zt(n);this._isColumn?t.element.style.top=o:t.element.style.left=o}onSplitterDragStop(t){if(null===this._splitterPosition)throw new K(\"ROCOSDS66932\");{const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=(this._splitterPosition+i)/(i+n),s=e.before.size+e.after.size;e.before.size=o*s,e.after.size=(1-o)*s,t.element.style.top=zt(0),t.element.style.left=zt(0),globalThis.requestAnimationFrame((()=>this.updateSize(!1)))}}}!function(t){t.getElementDimensionSize=function(t,e){return\"width\"===e?function(t){return t.offsetWidth}(t):function(t){return t.offsetHeight}(t)},t.setElementDimensionSize=function(t,e,i){return\"width\"===e?Tt(t,i):At(t,i)},t.createElement=function(t,e){const i=t.createElement(\"div\");return i.classList.add(\"lm_item\"),e?i.classList.add(\"lm_column\"):i.classList.add(\"lm_row\"),i}}(Xt||(Xt={}));class Yt extends $t{constructor(t,e,i){super(t,vt.create(e),null,Yt.createElement(document)),this.isGround=!0,this._childElementContainer=this.element,this._containerElement=i;let n=null;for(;;){const t=n?n.previousSibling:this._containerElement.lastChild;if(!(t instanceof Element&&t.classList.contains(\"lm_content\")))break;n=t}this._containerElement.insertBefore(this.element,n)}init(){if(!0!==this.isInitialised){this.updateNodeSize();for(let t=0;t0?this.contentItems[0]:this,n.isComponent)throw new Error(\"Cannot add item as child to ComponentItem\");{const t=this.layoutManager.createAndInitContentItem(i,n);return e=n.addChild(t,e),n===this?-1:e}}loadComponentAsRoot(t){this.clearRoot();const e=Ct.resolve(t,!1);if(e.maximised)throw new Error(\"Root Component cannot be maximised\");{const t=new jt(this.layoutManager,e,this);t.init(),this.addChild(t,0)}}addChild(t,e){if(this.contentItems.length>0)throw new Error(\"Ground node can only have a single child\");return this._childElementContainer.appendChild(t.element),e=super.addChild(t,e),this.updateSize(!1),this.emitBaseBubblingEvent(\"stateChanged\"),e}calculateConfigContent(){const t=this.contentItems,e=t.length,i=new Array(e);for(let n=0;n0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e)),this.updateContentItemsSize(!1))}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}createSideAreas(){const t=Yt.Area.oppositeSides,e=new Array(Object.keys(t).length);let i=0;for(const n in t){const o=n,s=this.getElementArea();if(null===s)throw new K(\"RCSA77553\");s.side=o,\"2\"===t[o][1]?s[o]=s[t[o]]-50:s[o]=s[t[o]]+50,s.surface=(s.x2-s.x1)*(s.y2-s.y1),e[i++]=s}return e}highlightDropZone(t,e,i){this.layoutManager.tabDropPlaceholder.remove(),super.highlightDropZone(t,e,i)}onDrop(t,e){if(t.isComponent){const e=ut.createDefault(),i=t;e.header=mt.Header.createCopy(i.headerConfig);const n=this.layoutManager.createAndInitContentItem(e,this);n.addChild(t),t=n}if(0===this.contentItems.length)this.addChild(t);else{if(t.type===at.row||t.type===at.column){const e=ut.createDefault(),i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}const i=\"x\"==e.side[0]?at.row:at.column,n=\"2\"==e.side[1],o=this.contentItems[0];if(o instanceof Xt&&o.type===i){const e=o.contentItems[n?0:o.contentItems.length-1];o.addChild(t,n?0:void 0,!0),e.size*=.5,t.size=e.size,t.sizeUnit=ht.Percent,o.updateSize(!1)}else{const e=ct.createDefault(i),s=this.layoutManager.createContentItem(e,this);this.replaceChild(o,s),s.addChild(t,n?0:void 0,!0),s.addChild(o,n?void 0:0,!0),o.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}}dock(){throw new X(\"GID87731\")}validateDocking(){throw new X(\"GIVD87732\")}getAllContentItems(){const t=[this];return this.deepGetAllContentItems(this.contentItems,t),t}getConfigMaximisedItems(){const t=[];return this.deepFilterContentItems(this.contentItems,t,(t=>!(!Gt.isStack(t)||!t.initialWantMaximise)||!(!Gt.isComponentItem(t)||!t.initialWantMaximise))),t}getItemsByPopInParentId(t){const e=[];return this.deepFilterContentItems(this.contentItems,e,(e=>e.popInParentIds.includes(t))),e}toConfig(){throw new Error(\"Cannot generate GroundItem config\")}setActiveComponentItem(t,e,i){}updateNodeSize(){const{width:t,height:e}=kt(this._containerElement);Tt(this.element,t),At(this.element,e),this.contentItems.length>0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e))}deepGetAllContentItems(t,e){for(let i=0;ithis.onClick(t),this._touchStartEventListener=t=>this.onTouchStart(t),this._element=document.createElement(\"div\"),this._element.classList.add(i),this._element.title=e,this._header.on(\"destroy\",(()=>this.destroy())),this._element.addEventListener(\"click\",this._clickEventListener,{passive:!0}),this._element.addEventListener(\"touchstart\",this._touchStartEventListener,{passive:!0}),this._header.controlsContainerElement.appendChild(this._element)}get element(){return this._element}destroy(){var t;this._element.removeEventListener(\"click\",this._clickEventListener),this._element.removeEventListener(\"touchstart\",this._touchStartEventListener),null===(t=this._element.parentNode)||void 0===t||t.removeChild(this._element)}onClick(t){this._pushEvent(t)}onTouchStart(t){this._pushEvent(t)}}class Jt{constructor(t,e,i,n,o){var s;this._layoutManager=t,this._componentItem=e,this._closeEvent=i,this._focusEvent=n,this._dragStartEvent=o,this._isActive=!1,this._tabClickListener=t=>this.onTabClickDown(t),this._tabTouchStartListener=t=>this.onTabTouchStart(t),this._closeClickListener=()=>this.onCloseClick(),this._closeTouchStartListener=()=>this.onCloseTouchStart(),this._dragStartListener=(t,e)=>this.onDragStart(t,e),this._contentItemDestroyListener=()=>this.onContentItemDestroy(),this._tabTitleChangedListener=t=>this.setTitle(t),this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_tab\"),this._titleElement=document.createElement(\"span\"),this._titleElement.classList.add(\"lm_title\"),this._closeElement=document.createElement(\"div\"),this._closeElement.classList.add(\"lm_close_tab\"),this._element.appendChild(this._titleElement),this._element.appendChild(this._closeElement),e.isClosable?this._closeElement.style.display=\"\":this._closeElement.style.display=\"none\",this.setTitle(e.title),this._componentItem.on(\"titleChanged\",this._tabTitleChangedListener);(null!==(s=e.reorderEnabled)&&void 0!==s?s:this._layoutManager.layoutConfig.settings.reorderEnabled)&&this.enableReorder(),this._element.addEventListener(\"click\",this._tabClickListener,{passive:!0}),this._element.addEventListener(\"touchstart\",this._tabTouchStartListener,{passive:!0}),this._componentItem.isClosable?(this._closeElement.addEventListener(\"click\",this._closeClickListener,{passive:!0}),this._closeElement.addEventListener(\"touchstart\",this._closeTouchStartListener,{passive:!0})):(this._closeElement.remove(),this._closeElement=void 0),this._componentItem.setTab(this),this._layoutManager.emit(\"tabCreated\",this)}get isActive(){return this._isActive}get componentItem(){return this._componentItem}get contentItem(){return this._componentItem}get element(){return this._element}get titleElement(){return this._titleElement}get closeElement(){return this._closeElement}get reorderEnabled(){return void 0!==this._dragListener}set reorderEnabled(t){t!==this.reorderEnabled&&(t?this.enableReorder():this.disableReorder())}setTitle(t){this._titleElement.innerText=t,this._element.title=t}setActive(t){t!==this._isActive&&(this._isActive=t,t?this._element.classList.add(\"lm_active\"):this._element.classList.remove(\"lm_active\"))}destroy(){var t,e;this._closeEvent=void 0,this._focusEvent=void 0,this._dragStartEvent=void 0,this._element.removeEventListener(\"click\",this._tabClickListener),this._element.removeEventListener(\"touchstart\",this._tabTouchStartListener),null===(t=this._closeElement)||void 0===t||t.removeEventListener(\"click\",this._closeClickListener),null===(e=this._closeElement)||void 0===e||e.removeEventListener(\"touchstart\",this._closeTouchStartListener),this._componentItem.off(\"titleChanged\",this._tabTitleChangedListener),this.reorderEnabled&&this.disableReorder(),this._element.remove()}setBlurred(){this._element.classList.remove(\"lm_focused\"),this._titleElement.classList.remove(\"lm_focused\")}setFocused(){this._element.classList.add(\"lm_focused\"),this._titleElement.classList.add(\"lm_focused\")}onDragStart(t,e){if(void 0===this._dragListener)throw new J(\"TODSDLU10093\");if(void 0===this._dragStartEvent)throw new J(\"TODS23309\");this._dragStartEvent(t,e,this._dragListener,this.componentItem)}onContentItemDestroy(){void 0!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=void 0)}onTabClickDown(t){const e=t.target;e!==this._element&&e!==this._titleElement||(0===t.button?this.notifyFocus():1===t.button&&this._componentItem.isClosable&&this.notifyClose())}onTabTouchStart(t){t.target===this._element&&this.notifyFocus()}onCloseClick(){this.notifyClose()}onCloseTouchStart(){this.notifyClose()}notifyClose(){if(void 0===this._closeEvent)throw new J(\"TNC15007\");this._closeEvent(this._componentItem)}notifyFocus(){if(void 0===this._focusEvent)throw new J(\"TNA15007\");this._focusEvent(this._componentItem)}enableReorder(){this._dragListener=new Zt(this._element,[this._titleElement]),this._dragListener.on(\"dragStart\",this._dragStartListener),this._componentItem.on(\"destroy\",this._contentItemDestroyListener)}disableReorder(){if(void 0===this._dragListener)throw new J(\"TDR87745\");this._componentItem.off(\"destroy\",this._contentItemDestroyListener),this._dragListener.off(\"dragStart\",this._dragStartListener),this._dragListener=void 0}}class Qt{constructor(t,e,i,n,o){this._layoutManager=t,this._componentRemoveEvent=e,this._componentFocusEvent=i,this._componentDragStartEvent=n,this._dropdownActiveChangedEvent=o,this._tabs=[],this._lastVisibleTabIndex=-1,this._dropdownActive=!1,this._element=document.createElement(\"section\"),this._element.classList.add(\"lm_tabs\"),this._dropdownElement=document.createElement(\"section\"),this._dropdownElement.classList.add(\"lm_tabdropdown_list\"),this._dropdownElement.style.display=\"none\"}get tabs(){return this._tabs}get tabCount(){return this._tabs.length}get lastVisibleTabIndex(){return this._lastVisibleTabIndex}get element(){return this._element}get dropdownElement(){return this._dropdownElement}get dropdownActive(){return this._dropdownActive}destroy(){for(let t=0;tthis.handleTabCloseEvent(t)),(t=>this.handleTabFocusEvent(t)),((t,e,i,n)=>this.handleTabDragStartEvent(t,e,i,n)));void 0===e&&(e=this._tabs.length),this._tabs.splice(e,0,i),ethis._lastVisibleTabIndex){const t=this._tabs[e];for(let t=e;t>0;t--)this._tabs[t]=this._tabs[t-1];this._tabs[0]=t}}updateTabSizes(t,e){let i=!1;this.tryUpdateTabSizes(i,t,e)||(i=!0,this.tryUpdateTabSizes(i,t,e)),i!==this._dropdownActive&&(this._dropdownActive=i,this._dropdownActiveChangedEvent())}tryUpdateTabSizes(t,e,i){if(this._tabs.length>0){if(void 0===i)throw new Error(\"non-empty tabs must have active component item\");let n=0,o=!1;const s=this._layoutManager.layoutConfig.settings.tabOverlapAllowance,r=this._tabs.indexOf(i.tab),a=this._tabs[r];this._lastVisibleTabIndex=-1;for(let i=0;ie){if(o)i===r&&(l.style.zIndex=\"auto\",l.style.marginLeft=\"\",l.parentElement!==this._element&&this._element.appendChild(l));else{let t;if(t=r>0&&r<=i?(d-e)/(i-1):(d-e)/i,tthis.onClick(t),this._touchStartListener=t=>this.onTouchStart(t),this._rowColumnClosable=!0,this._closeButton=null,this._popoutButton=null,this._tabsContainer=new Qt(this._layoutManager,(t=>this.handleTabInitiatedComponentRemoveEvent(t)),(t=>this.handleTabInitiatedComponentFocusEvent(t)),((t,e,i,n)=>this.handleTabInitiatedDragStartEvent(t,e,i,n)),(()=>this.processTabDropdownActiveChanged())),this._show=i.show,this._popoutEnabled=i.popoutEnabled,this._popoutLabel=i.popoutLabel,this._maximiseEnabled=i.maximiseEnabled,this._maximiseLabel=i.maximiseLabel,this._minimiseEnabled=i.minimiseEnabled,this._minimiseLabel=i.minimiseLabel,this._closeEnabled=i.closeEnabled,this._closeLabel=i.closeLabel,this._tabDropdownEnabled=i.tabDropdownEnabled,this._tabDropdownLabel=i.tabDropdownLabel,this.setSide(i.side),this._canRemoveComponent=this._configClosable,this._element=document.createElement(\"section\"),this._element.classList.add(\"lm_header\"),this._controlsContainerElement=document.createElement(\"section\"),this._controlsContainerElement.classList.add(\"lm_controls\"),this._element.appendChild(this._tabsContainer.element),this._element.appendChild(this._controlsContainerElement),this._element.appendChild(this._tabsContainer.dropdownElement),this._element.addEventListener(\"click\",this._clickListener,{passive:!0}),this._element.addEventListener(\"touchstart\",this._touchStartListener,{passive:!0}),this._documentMouseUpListener=()=>this._tabsContainer.hideAdditionalTabsDropdown(),globalThis.document.addEventListener(\"mouseup\",this._documentMouseUpListener,{passive:!0}),this._tabControlOffset=this._layoutManager.layoutConfig.settings.tabControlOffset,this._tabDropdownEnabled&&(this._tabDropdownButton=new Kt(this,this._tabDropdownLabel,\"lm_tabdropdown\",(()=>this._tabsContainer.showAdditionalTabsDropdown()))),this._popoutEnabled&&(this._popoutButton=new Kt(this,this._popoutLabel,\"lm_popout\",(()=>this.handleButtonPopoutEvent()))),this._maximiseEnabled&&(this._maximiseButton=new Kt(this,this._maximiseLabel,\"lm_maximise\",(t=>this.handleButtonMaximiseToggleEvent(t)))),this._configClosable&&(this._closeButton=new Kt(this,this._closeLabel,\"lm_close\",(()=>s()))),this.processTabDropdownActiveChanged()}get show(){return this._show}get side(){return this._side}get leftRightSided(){return this._leftRightSided}get layoutManager(){return this._layoutManager}get parent(){return this._parent}get tabs(){return this._tabsContainer.tabs}get lastVisibleTabIndex(){return this._tabsContainer.lastVisibleTabIndex}get element(){return this._element}get tabsContainerElement(){return this._tabsContainer.element}get controlsContainerElement(){return this._controlsContainerElement}destroy(){this.emit(\"destroy\"),this._popoutEvent=void 0,this._maximiseToggleEvent=void 0,this._clickEvent=void 0,this._touchStartEvent=void 0,this._componentRemoveEvent=void 0,this._componentFocusEvent=void 0,this._componentDragStartEvent=void 0,this._tabsContainer.destroy(),globalThis.document.removeEventListener(\"mouseup\",this._documentMouseUpListener),this._element.remove()}createTab(t,e){this._tabsContainer.createTab(t,e)}removeTab(t){this._tabsContainer.removeTab(t)}processActiveComponentChanged(t){this._tabsContainer.processActiveComponentChanged(t),this.updateTabSizes()}setSide(t){this._side=t,this._leftRightSided=[nt.right,nt.left].includes(this._side)}setRowColumnClosable(t){this._rowColumnClosable=t,this.updateClosability()}updateClosability(){let t;if(this._configClosable)if(this._rowColumnClosable){t=!0;const e=this.tabs.length;for(let i=0;i1}applyFocusedValue(t){t?this._element.classList.add(\"lm_focused\"):this._element.classList.remove(\"lm_focused\")}processMaximised(){if(void 0===this._maximiseButton)throw new J(\"HPMAX16997\");this._maximiseButton.element.setAttribute(\"title\",this._minimiseLabel)}processMinimised(){if(void 0===this._maximiseButton)throw new J(\"HPMIN16997\");this._maximiseButton.element.setAttribute(\"title\",this._maximiseLabel)}updateTabSizes(){if(this._tabsContainer.tabCount>0){const t=this._show?this._layoutManager.layoutConfig.dimensions.headerHeight:0;let e;this._leftRightSided?(this._element.style.height=\"\",this._element.style.width=zt(t)):(this._element.style.width=\"\",this._element.style.height=zt(t)),e=this._leftRightSided?this._element.offsetHeight-this._controlsContainerElement.offsetHeight-this._tabControlOffset:this._element.offsetWidth-this._controlsContainerElement.offsetWidth-this._tabControlOffset,this._tabsContainer.updateTabSizes(e,this._getActiveComponentItemEvent())}}handleTabInitiatedComponentRemoveEvent(t){if(this._canRemoveComponent){if(void 0===this._componentRemoveEvent)throw new J(\"HHTCE22294\");this._componentRemoveEvent(t)}}handleTabInitiatedComponentFocusEvent(t){if(void 0===this._componentFocusEvent)throw new J(\"HHTAE22294\");this._componentFocusEvent(t)}handleTabInitiatedDragStartEvent(t,e,i,n){if(this._canRemoveComponent){if(void 0===this._componentDragStartEvent)throw new J(\"HHTDSE22294\");this._componentDragStartEvent(t,e,i,n)}else i.cancelDrag()}processTabDropdownActiveChanged(){void 0!==this._tabDropdownButton&&Dt(this._tabDropdownButton.element,this._tabsContainer.dropdownActive)}handleButtonPopoutEvent(){if(this._layoutManager.layoutConfig.settings.popoutWholeStack){if(void 0===this._popoutEvent)throw new J(\"HHBPOE17834\");this._popoutEvent()}else{const t=this._getActiveComponentItemEvent();t&&t.popout()}}handleButtonMaximiseToggleEvent(t){if(void 0===this._maximiseToggleEvent)throw new J(\"HHBMTE16834\");this._maximiseToggleEvent()}onClick(t){t.target===this._element&&this.notifyClick(t)}onTouchStart(t){t.target===this._element&&this.notifyTouchStart(t)}notifyClick(t){if(void 0===this._clickEvent)throw new J(\"HNHC46834\");this._clickEvent(t)}notifyTouchStart(t){if(void 0===this._touchStartEvent)throw new J(\"HNHTS46834\");this._touchStartEvent(t)}}class ee extends $t{constructor(t,e,i){var n,o,s,r,a,l,h,d,c,m,u,p,g,f,v,_,y,C,w;super(t,e,i,ee.createElement(document)),this._headerSideChanged=!1,this._resizeListener=()=>this.handleResize(),this._maximisedListener=()=>this.handleMaximised(),this._minimisedListener=()=>this.handleMinimised(),this._headerConfig=e.header;const I=t.layoutConfig.header,b=e.content;let S;if(1!==b.length)S=void 0;else{S=b[0].header}this._initialWantMaximise=e.maximised,this._initialActiveItemIndex=null!==(n=e.activeItemIndex)&&void 0!==n?n:0;const E=null!==(r=null!==(s=null===(o=this._headerConfig)||void 0===o?void 0:o.show)&&void 0!==s?s:null==S?void 0:S.show)&&void 0!==r?r:I.show,x=null!==(h=null!==(l=null===(a=this._headerConfig)||void 0===a?void 0:a.popout)&&void 0!==l?l:null==S?void 0:S.popout)&&void 0!==h?h:I.popout,L=null!==(m=null!==(c=null===(d=this._headerConfig)||void 0===d?void 0:d.maximise)&&void 0!==c?c:null==S?void 0:S.maximise)&&void 0!==m?m:I.maximise,z=null!==(g=null!==(p=null===(u=this._headerConfig)||void 0===u?void 0:u.close)&&void 0!==p?p:null==S?void 0:S.close)&&void 0!==g?g:I.close,M=null!==(_=null!==(v=null===(f=this._headerConfig)||void 0===f?void 0:f.minimise)&&void 0!==v?v:null==S?void 0:S.minimise)&&void 0!==_?_:I.minimise,P=null!==(w=null!==(C=null===(y=this._headerConfig)||void 0===y?void 0:y.tabDropdown)&&void 0!==C?C:null==S?void 0:S.tabDropdown)&&void 0!==w?w:I.tabDropdown;this._maximisedEnabled=!1!==L;const T={show:!1!==E,side:!1===E?nt.top:E,popoutEnabled:!1!==x,popoutLabel:!1===x?\"\":x,maximiseEnabled:this._maximisedEnabled,maximiseLabel:!1===L?\"\":L,closeEnabled:!1!==z,closeLabel:!1===z?\"\":z,minimiseEnabled:!0,minimiseLabel:M,tabDropdownEnabled:!1!==P,tabDropdownLabel:!1===P?\"\":P};this._header=new te(t,this,T,e.isClosable&&!1!==z,(()=>this.getActiveComponentItem()),(()=>this.remove()),(()=>this.handlePopoutEvent()),(()=>this.toggleMaximise()),(t=>this.handleHeaderClickEvent(t)),(t=>this.handleHeaderTouchStartEvent(t)),(t=>this.handleHeaderComponentRemoveEvent(t)),(t=>this.handleHeaderComponentFocusEvent(t)),((t,e,i,n)=>this.handleHeaderComponentStartDragEvent(t,e,i,n))),this.isStack=!0,this._childElementContainer=document.createElement(\"section\"),this._childElementContainer.classList.add(\"lm_items\"),this.on(\"resize\",this._resizeListener),this._maximisedEnabled&&(this.on(\"maximised\",this._maximisedListener),this.on(\"minimised\",this._minimisedListener)),this.element.appendChild(this._header.element),this.element.appendChild(this._childElementContainer),this.setupHeaderPosition(),this._header.updateClosability()}get childElementContainer(){return this._childElementContainer}get header(){return this._header}get headerShow(){return this._header.show}get headerSide(){return this._header.side}get headerLeftRightSided(){return this._header.leftRightSided}get contentAreaDimensions(){return this._contentAreaDimensions}get initialWantMaximise(){return this._initialWantMaximise}get isMaximised(){return this===this.layoutManager.maximisedStack}get stackParent(){if(!this.parent)throw new Error(\"Stack should always have a parent\");return this.parent}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}init(){if(!0===this.isInitialised)return;this.updateNodeSize();for(let t=0;t0){if(this._initialActiveItemIndex<0||this._initialActiveItemIndex>=e)throw new Error(`ActiveItemIndex out of range: ${this._initialActiveItemIndex} id: ${this.id}`);for(let i=0;ithis.contentItems.length)throw e-=1,new X(\"SAC99728\");if(t instanceof jt)return e=super.addChild(t,e),this._childElementContainer.appendChild(t.element),this._header.createTab(t,e),this.setActiveComponentItem(t,i),this._header.updateTabSizes(),this.updateSize(!1),t.container.setBaseLogicalZIndex(),this._header.updateClosability(),this.emitStateChangedEvent(),e;throw new X(\"SACC88532\")}removeChild(t,e){const i=t,n=this.contentItems.indexOf(i),o=1===this.contentItems.length;if(this._activeComponentItem===i&&(i.focused&&i.blur(),!o)){const t=0===n?1:n-1;this.setActiveComponentItem(this.contentItems[t],!1)}this._header.removeTab(i),super.removeChild(i,e),o||this._header.updateClosability(),this.emitStateChangedEvent()}toggleMaximise(){this.isMaximised?this.minimise():this.maximise()}maximise(){if(!this.isMaximised){this.layoutManager.setMaximisedStack(this);const t=this.contentItems,e=t.length;for(let i=0;i0&&void 0===t)throw new Error(\"expected non-empty stack to have an active component item\");return{type:\"stack\",content:this.calculateConfigContent(),size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,isClosable:this.isClosable,maximised:this.isMaximised,header:this.createHeaderConfig(),activeItemIndex:t}}onDrop(t,e){if(\"header\"===this._dropSegment){if(this.resetHeaderDropZone(),void 0===this._dropIndex)throw new J(\"SODDI68990\");return void this.addChild(t,this._dropIndex)}if(\"body\"===this._dropSegment)return void this.addChild(t,0,!0);const i=\"top\"===this._dropSegment||\"bottom\"===this._dropSegment,n=\"left\"===this._dropSegment||\"right\"===this._dropSegment,o=\"top\"===this._dropSegment||\"left\"===this._dropSegment,s=i&&this.stackParent.isColumn||n&&this.stackParent.isRow;if(t.isComponent){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createAndInitContentItem(e,this);i.addChild(t),t=i}if(t.type===at.row||t.type===at.column){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}if(s){const e=this.stackParent.contentItems.indexOf(this);this.stackParent.addChild(t,o?e:e+1,!0),this.size*=.5,t.size=this.size,t.sizeUnit=this.sizeUnit,this.stackParent.updateSize(!1)}else{const e=i?at.column:at.row,n=ct.createDefault(e),s=this.layoutManager.createContentItem(n,this);this.stackParent.replaceChild(this,s),s.addChild(t,o?0:void 0,!0),s.addChild(this,o?void 0:0,!0),this.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}highlightDropZone(t,e){for(const i in this._contentAreaDimensions){const n=i,o=this._contentAreaDimensions[n].hoverArea;if(o.x1t&&o.y1e)return void(\"header\"===n?(this._dropSegment=\"header\",this.highlightHeaderDropZone(this._header.leftRightSided?e:t)):(this.resetHeaderDropZone(),this.highlightBodyDropZone(n)))}}getArea(){if(\"none\"===this.element.style.display)return null;const t=super.getElementArea(this._header.element),e=super.getElementArea(this._childElementContainer);if(null===t||null===e)throw new K(\"SGAHC13086\");const i=e.x2-e.x1,n=e.y2-e.y1;return this._contentAreaDimensions={header:{hoverArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2},highlightArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2}}},0===this.contentItems.length?(this._contentAreaDimensions.body={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2}},super.getElementArea(this.element)):(this._contentAreaDimensions.left={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x1+.25*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x1+.5*i,y2:e.y2}},this._contentAreaDimensions.top={hoverArea:{x1:e.x1+.25*i,y1:e.y1,x2:e.x1+.75*i,y2:e.y1+.5*n},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y1+.5*n}},this._contentAreaDimensions.right={hoverArea:{x1:e.x1+.75*i,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1+.5*i,y1:e.y1,x2:e.x2,y2:e.y2}},this._contentAreaDimensions.bottom={hoverArea:{x1:e.x1+.25*i,y1:e.y1+.5*n,x2:e.x1+.75*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1+.5*n,x2:e.x2,y2:e.y2}},super.getElementArea(this.element))}positionHeader(t){this._header.side!==t&&(this._header.setSide(t),this._headerSideChanged=!0,this.setupHeaderPosition())}updateNodeSize(){if(\"none\"!==this.element.style.display){const t=kt(this.element);if(this._header.show){t[this._header.leftRightSided?it.width:it.height]-=this.layoutManager.layoutConfig.dimensions.headerHeight}this._childElementContainer.style.width=zt(t.width),this._childElementContainer.style.height=zt(t.height);for(let e=0;e=o&&tthis.onDrag(t,e,i))),this._dragListener.on(\"dragStop\",(()=>this.onDrop())),this.createDragProxyElements(t,e),null===this._componentItem.parent)throw new K(\"DPC10097\");this._componentItemFocused=this._componentItem.focused,this._componentItemFocused&&this._componentItem.blur(),this._componentItem.parent.removeChild(this._componentItem,!0),this.setDimensions(),document.body.appendChild(this._element),this.determineMinMaxXY(),this._layoutManager.calculateItemAreas(),this.setDropPosition(t,e)}get element(){return this._element}createDragProxyElements(t,e){this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_dragProxy\");const i=document.createElement(\"div\");i.classList.add(\"lm_header\");const n=document.createElement(\"div\");n.classList.add(\"lm_tabs\");const o=document.createElement(\"div\");o.classList.add(\"lm_tab\");const s=document.createElement(\"span\");s.classList.add(\"lm_title\"),o.appendChild(s),n.appendChild(o),i.appendChild(n),this._proxyContainerElement=document.createElement(\"div\"),this._proxyContainerElement.classList.add(\"lm_content\"),this._element.appendChild(i),this._element.appendChild(this._proxyContainerElement),this._originalParent instanceof ee&&this._originalParent.headerShow&&(this._sided=this._originalParent.headerLeftRightSided,this._element.classList.add(\"lm_\"+this._originalParent.headerSide),[nt.right,nt.bottom].indexOf(this._originalParent.headerSide)>=0&&this._proxyContainerElement.insertAdjacentElement(\"afterend\",i)),this._element.style.left=zt(t),this._element.style.top=zt(e),o.setAttribute(\"title\",this._componentItem.title),s.insertAdjacentText(\"afterbegin\",this._componentItem.title),this._proxyContainerElement.appendChild(this._componentItem.element)}determineMinMaxXY(){const t=this._layoutManager.groundItem;if(void 0===t)throw new J(\"DPDMMXY73109\");{const e=t.element.getBoundingClientRect();this._minX=e.left+document.body.scrollLeft,this._minY=e.top+document.body.scrollTop,this._maxX=this._minX+e.width,this._maxY=this._minY+e.height}}onDrag(t,e,i){const n=i.pageX,o=i.pageY;this.setDropPosition(n,o),this._componentItem.drag()}setDropPosition(t,e){this._layoutManager.layoutConfig.settings.constrainDragToContainer&&(t<=this._minX?t=Math.ceil(this._minX):t>=this._maxX&&(t=Math.floor(this._maxX)),e<=this._minY?e=Math.ceil(this._minY):e>=this._maxY&&(e=Math.floor(this._maxY))),this._element.style.left=zt(t),this._element.style.top=zt(e),this._area=this._layoutManager.getArea(t,e),null!==this._area&&(this._lastValidArea=this._area,this._area.contentItem.highlightDropZone(t,e,this._area))}onDrop(){const t=this._layoutManager.dropTargetIndicator;if(null===t)throw new K(\"DPOD30011\");let e;if(t.hide(),this._componentItem.exitDragMode(),null!==this._area)e=this._componentItem,this._area.contentItem.onDrop(e,this._area);else if(null!==this._lastValidArea){e=this._componentItem;this._lastValidArea.contentItem.onDrop(e,this._lastValidArea)}else this._originalParent?(e=this._componentItem,this._originalParent.addChild(e)):this._componentItem.destroy();this._element.remove(),this._layoutManager.emit(\"itemDropped\",this._componentItem),this._componentItemFocused&&void 0!==e&&e.focus()}setDimensions(){const t=this._layoutManager.layoutConfig.dimensions;if(void 0===t)throw new Error(\"DragProxy.setDimensions: dimensions undefined\");let e=t.dragProxyWidth,i=t.dragProxyHeight;if(void 0===e||void 0===i)throw new Error(\"DragProxy.setDimensions: width and/or height undefined\");const n=!1===this._layoutManager.layoutConfig.header.show?0:t.headerHeight;this._element.style.width=zt(e),this._element.style.height=zt(i),e-=this._sided?n:0,i-=this._sided?0:n,this._proxyContainerElement.style.width=zt(e),this._proxyContainerElement.style.height=zt(i),this._componentItem.enterDragMode(e,i),this._componentItem.show()}}class ne{constructor(t,e,i,n,o,s,r){this._layoutManager=t,this._element=e,this._extraAllowableChildTargets=i,this._componentTypeOrFtn=n,this._componentState=o,this._title=s,this._id=r,this._dragListener=null,this._dummyGroundContainer=document.createElement(\"div\");const a=gt.createDefault(\"row\");this._dummyGroundContentItem=new Yt(this._layoutManager,a,this._dummyGroundContainer),this.createDragListener()}destroy(){this.removeDragListener()}createDragListener(){this.removeDragListener(),this._dragListener=new Zt(this._element,this._extraAllowableChildTargets),this._dragListener.on(\"dragStart\",((t,e)=>this.onDragStart(t,e))),this._dragListener.on(\"dragStop\",(()=>this.onDragStop()))}onDragStart(t,e){var i;const n=\"component\";let o;if(\"function\"==typeof this._componentTypeOrFtn){const t=this._componentTypeOrFtn();o=ne.isDragSourceComponentItemConfig(t)?{type:n,componentState:t.state,componentType:t.type,title:null!==(i=t.title)&&void 0!==i?i:this._title}:t}else o={type:n,componentState:this._componentState,componentType:this._componentTypeOrFtn,title:this._title,id:this._id};const s=bt.resolve(o,!1),r=new jt(this._layoutManager,s,this._dummyGroundContentItem);if(this._dummyGroundContentItem.contentItems.push(r),null===this._dragListener)throw new K(\"DSODSD66746\");{const i=new ie(t,e,this._dragListener,this._layoutManager,r,this._dummyGroundContentItem),n=this._layoutManager.transitionIndicator;if(null===n)throw new K(\"DSODST66746\");n.transitionElements(this._element,i.element)}}onDragStop(){this.createDragListener()}removeDragListener(){null!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=null)}}!function(t){t.isDragSourceComponentItemConfig=function(t){return!(\"componentType\"in t)}}(ne||(ne={}));class oe{constructor(){this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_dropTargetIndicator\");const t=document.createElement(\"div\");t.classList.add(\"lm_inner\"),this._element.appendChild(t),document.body.appendChild(this._element)}destroy(){this._element.remove()}highlightArea(t,e){this._element.style.left=zt(t.x1+e),this._element.style.top=zt(t.y1+e),this._element.style.width=zt(t.x2-t.x1-e),this._element.style.height=zt(t.y2-t.y1-e),this._element.style.display=\"block\"}hide(){Dt(this._element,!1)}}class se{constructor(){this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_transition_indicator\"),document.body.appendChild(this._element),this._toElement=null,this._fromDimensions=null,this._totalAnimationDuration=200,this._animationStartTime=null}destroy(){this._element.remove()}transitionElements(t,e){}nextAnimationFrame(){}measure(t){const e=t.getBoundingClientRect();return{left:e.left,top:e.top,width:t.offsetWidth,height:t.offsetHeight}}}class re extends Wt{constructor(t){super(),this._layoutManager=t,this._childEventListener=t=>this.onEventFromChild(t),globalThis.addEventListener(re.ChildEventName,this._childEventListener,{passive:!0})}emit(t,...e){\"userBroadcast\"===t?this.emitUserBroadcast(...e):super.emit(t,...e)}emitUserBroadcast(...t){this.handleUserBroadcastEvent(\"userBroadcast\",t)}destroy(){globalThis.removeEventListener(re.ChildEventName,this._childEventListener)}handleUserBroadcastEvent(t,e){this._layoutManager.isSubWindow?this.propagateToParent(t,e):this.propagateToThisAndSubtree(t,e)}onEventFromChild(t){const e=t.detail;this.handleUserBroadcastEvent(e.eventName,e.args)}propagateToParent(t,e){const i={bubbles:!0,cancelable:!0,detail:{layoutManager:this._layoutManager,eventName:t,args:e}},n=new CustomEvent(re.ChildEventName,i),o=globalThis.opener;if(null===o)throw new K(\"EHPTP15778\");o.dispatchEvent(n)}propagateToThisAndSubtree(t,e){this.emitUnknown(t,...e);for(let i=0;ithis.handleContainerResize())),this._windowBeforeUnloadListener=()=>this.onBeforeUnload(),this._windowBeforeUnloadListening=!1,this._maximisedStackBeforeDestroyedListener=t=>this.cleanupBeforeMaximisedStackDestroyed(t),this.isSubWindow=t.isSubWindow,this._constructorOrSubWindowLayoutConfig=t.constructorOrSubWindowLayoutConfig,Q.checkInitialise(),dt.checkInitialise(),void 0!==t.containerElement&&(this._containerElement=t.containerElement)}get container(){return this._containerElement}get isInitialised(){return this._isInitialised}get groundItem(){return this._groundItem}get root(){return this._groundItem}get openPopouts(){return this._openPopouts}get dropTargetIndicator(){return this._dropTargetIndicator}get transitionIndicator(){return this._transitionIndicator}get width(){return this._width}get height(){return this._height}get eventHub(){return this._eventHub}get rootItem(){if(void 0===this._groundItem)throw new Error(\"Cannot access rootItem before init\");return 0===this._groundItem.contentItems.length?void 0:this._groundItem.contentItems[0]}get focusedComponentItem(){return this._focusedComponentItem}get tabDropPlaceholder(){return this._tabDropPlaceholder}get maximisedStack(){return this._maximisedStack}get deprecatedConstructor(){return!this.isSubWindow&&void 0!==this._constructorOrSubWindowLayoutConfig}destroy(){if(this._isInitialised){this._windowBeforeUnloadListening&&(globalThis.removeEventListener(\"beforeunload\",this._windowBeforeUnloadListener),this._windowBeforeUnloadListening=!1),!0===this.layoutConfig.settings.closePopoutsOnUnload&&this.closeAllOpenPopouts(),this._resizeObserver.disconnect(),this.checkClearResizeTimeout(),void 0!==this._groundItem&&this._groundItem.destroy(),this._tabDropPlaceholder.remove(),null!==this._dropTargetIndicator&&this._dropTargetIndicator.destroy(),null!==this._transitionIndicator&&this._transitionIndicator.destroy(),this._eventHub.destroy();for(const t of this._dragSources)t.destroy();this._dragSources=[],this._isInitialised=!1}}minifyConfig(t){return _t.minifyConfig(t)}unminifyConfig(t){return _t.unminifyConfig(t)}init(){let t;if(this.setContainer(),this._dropTargetIndicator=new oe,this._transitionIndicator=new se,this.updateSizeFromContainer(),this.isSubWindow){if(void 0===this._constructorOrSubWindowLayoutConfig)throw new J(\"LMIU07155\");{const e=this._constructorOrSubWindowLayoutConfig.root;if(void 0===e)throw new X(\"LMIC07156\");if(!Ct.isComponent(e))throw new X(\"LMIC07157\");t=e;const i=xt.resolve(this._constructorOrSubWindowLayoutConfig);this.layoutConfig=Object.assign(Object.assign({},i),{root:void 0})}}else void 0===this._constructorOrSubWindowLayoutConfig?this.layoutConfig=_t.createDefault():this.layoutConfig=xt.resolve(this._constructorOrSubWindowLayoutConfig);const e=this.layoutConfig;this._groundItem=new Yt(this,e.root,this._containerElement),this._groundItem.init(),this.checkLoadedLayoutMaximiseItem(),this._resizeObserver.observe(this._containerElement),this._isInitialised=!0,this.adjustColumnsResponsive(),this.emit(\"initialised\"),void 0!==t&&this.loadComponentAsRoot(t)}loadLayout(t){if(!this.isInitialised)throw new Error(\"GoldenLayout: Need to call init() if LayoutConfig with defined root passed to constructor\");if(void 0===this._groundItem)throw new J(\"LMLL11119\");this.createSubWindows(),this.layoutConfig=xt.resolve(t),this._groundItem.loadRoot(this.layoutConfig.root),this.checkLoadedLayoutMaximiseItem(),this.adjustColumnsResponsive()}saveLayout(){if(!1===this._isInitialised)throw new Error(\"Can't create config, layout not yet initialised\");if(void 0===this._groundItem)throw new J(\"LMTC18244\");{const t=this._groundItem.calculateConfigContent();let e;e=1!==t.length?void 0:t[0],this.reconcilePopoutWindows();const i=[];for(let t=0;t=0?n=this._groundItem.contentItems[0]:e=0;break;case at.row:case at.column:e=n.addItem(t,i.index);break;case at.stack:if(Ct.isComponent(t)){e=n.addItem(t,i.index);break}throw Error(tt[6]);case at.component:throw new X(\"LMAIALC87444602\");default:throw new Y(\"LMAIALU98881733\",n.type)}if(Ct.isComponent(t)){const t=n.contentItems[e];Gt.isStack(t)&&(n=t,e=0)}return i.parentItem=n,i.index=e,i}}}loadComponentAsRoot(t){if(void 0===this._groundItem)throw new Error(\"Cannot add item before init\");this._groundItem.loadComponentAsRoot(t)}updateSize(t,e){this.setSize(t,e)}setSize(t,e){if(this._width=t,this._height=e,!0===this._isInitialised){if(void 0===this._groundItem)throw new J(\"LMUS18881\");if(this._groundItem.setSize(this._width,this._height),this._maximisedStack){const{width:t,height:e}=kt(this._containerElement);Tt(this._maximisedStack.element,t),At(this._maximisedStack.element,e),this._maximisedStack.updateSize(!1)}this.adjustColumnsResponsive()}}beginSizeInvalidation(){this._sizeInvalidationBeginCount++}endSizeInvalidation(){0==--this._sizeInvalidationBeginCount&&this.updateSizeFromContainer()}updateSizeFromContainer(){const{width:t,height:e}=kt(this._containerElement);this.setSize(t,e)}updateRootSize(t=!1){if(void 0===this._groundItem)throw new J(\"LMURS28881\");this._groundItem.updateSize(t)}createAndInitContentItem(t,e){const i=this.createContentItem(t,e);return i.init(),i}createContentItem(t,e){if(\"string\"!=typeof t.type)throw new G(\"Missing parameter 'type'\",JSON.stringify(t));if(ct.isComponentItem(t)&&!(e instanceof ee)&&e&&!(!0===this.isSubWindow&&e instanceof Yt)){t={type:at.stack,content:[t],size:t.size,sizeUnit:t.sizeUnit,minSize:t.minSize,minSizeUnit:t.minSizeUnit,id:t.id,maximised:t.maximised,isClosable:t.isClosable,activeItemIndex:0,header:void 0}}return this.createContentItemFromConfig(t,e)}findFirstComponentItemById(t){if(void 0===this._groundItem)throw new J(\"LMFFCIBI82446\");return this.findFirstContentItemTypeByIdRecursive(at.component,t,this._groundItem)}createPopout(t,e,i,n){return t instanceof Gt?this.createPopoutFromContentItem(t,e,i,n):this.createPopoutFromItemConfig(t,e,i,n)}createPopoutFromContentItem(t,e,i,n){let o=t.parent,s=t;for(;null!==o&&1===o.contentItems.length&&!o.isGround;)s=o,o=o.parent;if(null===o)throw new K(\"LMCPFCI00834\");{if(void 0===n&&(n=o.contentItems.indexOf(s)),null!==i&&o.addPopInParentId(i),void 0===e){const i=globalThis.screenX||globalThis.screenLeft,n=globalThis.screenY||globalThis.screenTop,o=t.element.offsetLeft,s=t.element.offsetTop,{width:r,height:a}=kt(t.element);e={left:i+o,top:n+s,width:r,height:a}}const r=t.toConfig();if(t.remove(),ft.isRootItemConfig(r))return this.createPopoutFromItemConfig(r,e,i,n);throw new Error(`${tt[0]}`)}}beginVirtualSizedContainerAdding(){0==++this._virtualSizedContainerAddingBeginCount&&(this._virtualSizedContainers.length=0)}addVirtualSizedContainer(t){this._virtualSizedContainers.push(t)}endVirtualSizedContainerAdding(){if(0==--this._virtualSizedContainerAddingBeginCount){const t=this._virtualSizedContainers.length;if(t>0){this.fireBeforeVirtualRectingEvent(t);for(let e=0;ethis.emit(\"windowOpened\",a))),a.on(\"closed\",(()=>this.reconcilePopoutWindows())),this._openPopouts.push(a),this.layoutConfig.settings.closePopoutsOnUnload&&!this._windowBeforeUnloadListening&&(globalThis.addEventListener(\"beforeunload\",this._windowBeforeUnloadListener,{passive:!0}),this._windowBeforeUnloadListening=!0),a}closeAllOpenPopouts(){for(let t=0;tglobalThis.close()),1)}getArea(t,e){let i=null,n=1/0;for(let o=0;o=s.x1&&t=s.y1&&es.surface&&(n=s.surface,i=s)}return i}calculateItemAreas(){const t=this.getAllContentItems(),e=this._groundItem;if(void 0===e)throw new J(\"LMCIAR44365\");if(1!==t.length){e.contentItems[0].isStack?this._itemAreas=[]:this._itemAreas=e.createSideAreas();for(let e=0;e0){let e=t[0];if(Gt.isComponentItem(e)){const t=e.parent;if(null===t)throw new K(\"LMXLLMI69999\");e=t}if(!Gt.isStack(e))throw new X(\"LMCLLMI19993\");e.maximise()}}}processMaximiseStack(t){if(this._maximisedStack=t,t.on(\"beforeItemDestroyed\",this._maximisedStackBeforeDestroyedListener),t.element.classList.add(\"lm_maximised\"),t.element.insertAdjacentElement(\"afterend\",this._maximisePlaceholder),void 0===this._groundItem)throw new J(\"LMMXI19993\");{this._groundItem.element.prepend(t.element);const{width:e,height:i}=kt(this._containerElement);Tt(t.element,e),At(t.element,i),t.updateSize(!0),t.focusActiveContentItem(),this._maximisedStack.emit(\"maximised\"),this.emit(\"stateChanged\")}}processMinimiseMaximisedStack(){if(void 0===this._maximisedStack)throw new X(\"LMMMS74422\");{const t=this._maximisedStack;if(null===t.parent)throw new K(\"LMMI13668\");t.element.classList.remove(\"lm_maximised\"),this._maximisePlaceholder.insertAdjacentElement(\"afterend\",t.element),this._maximisePlaceholder.remove(),this.updateRootSize(!0),this._maximisedStack=void 0,t.off(\"beforeItemDestroyed\",this._maximisedStackBeforeDestroyedListener),t.emit(\"minimised\"),this.emit(\"stateChanged\")}}reconcilePopoutWindows(){const t=[];for(let e=0;e{this._resizeTimeoutId=void 0,this.beginSizeInvalidation(),this.endSizeInvalidation()}),this.resizeDebounceInterval))}checkClearResizeTimeout(){void 0!==this._resizeTimeoutId&&(clearTimeout(this._resizeTimeoutId),this._resizeTimeoutId=void 0)}setContainer(){var t;const e=document.body,i=null!==(t=this._containerElement)&&void 0!==t?t:e;if(i===e){this.resizeWithContainerAutomatically=!0;const t=document.documentElement;t.style.height=\"100%\",t.style.margin=\"0\",t.style.padding=\"0\",t.style.overflow=\"clip\",e.style.height=\"100%\",e.style.margin=\"0\",e.style.padding=\"0\",e.style.overflow=\"clip\"}this._containerElement=i}onBeforeUnload(){this.destroy()}adjustColumnsResponsive(){if(void 0===this._groundItem)throw new J(\"LMACR20883\");if(this._firstLoad=!1,this.useResponsiveLayout()&&!this._updatingColumnsResponsive&&this._groundItem.contentItems.length>0&&this._groundItem.contentItems[0].isRow){if(void 0===this._groundItem||null===this._width)throw new J(\"LMACR77412\");{const t=this._groundItem.contentItems[0].contentItems.length;if(t<=1)return;{const e=this.layoutConfig.dimensions.defaultMinItemWidth;if(t*e<=this._width)return;{this._updatingColumnsResponsive=!0;const i=t-Math.max(Math.floor(this._width/e),1),n=this._groundItem.contentItems[0],o=this.getAllStacks();if(0===o.length)throw new X(\"LMACRS77413\");{const t=o[0];for(let e=0;en?void 0:{parentItem:t,index:o}}}case 1:if(void 0===this._focusedComponentItem)return;{const t=this._focusedComponentItem.parentItem;return this.tryCreateLocationFromParentItem(t,e)}case 2:{const t=this.findFirstContentItemType(at.stack);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 3:{let t=this.findFirstContentItemType(at.row);return void 0!==t?this.tryCreateLocationFromParentItem(t,e):(t=this.findFirstContentItemType(at.column),void 0!==t?this.tryCreateLocationFromParentItem(t,e):void 0)}case 4:{const t=this.findFirstContentItemType(at.row);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 5:{const t=this.findFirstContentItemType(at.column);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 6:if(void 0===this._groundItem)throw new J(\"LMFLRIF18244\");return void 0!==this.rootItem?void 0:void 0===e||0===e?{parentItem:this._groundItem,index:0}:void 0;case 7:if(void 0===this._groundItem)throw new J(\"LMFLF18244\");{const t=this._groundItem.contentItems;if(0===t.length)return void 0===e||0===e?{parentItem:this._groundItem,index:0}:void 0;{const i=t[0];return this.tryCreateLocationFromParentItem(i,e)}}}}tryCreateLocationFromParentItem(t,e){const i=t.contentItems.length;return void 0===e?{parentItem:t,index:i}:e<0||e>i?void 0:{parentItem:t,index:e}}}!function(t){t.createMaximisePlaceElement=function(t){const e=t.createElement(\"div\");return e.classList.add(\"lm_maximise_place\"),e},t.createTabDropPlaceholderElement=function(t){const e=t.createElement(\"div\");return e.classList.add(\"lm_drop_tab_placeholder\"),e},t.defaultLocationSelectors=[{typeId:1,index:void 0},{typeId:2,index:void 0},{typeId:3,index:void 0},{typeId:7,index:void 0}],t.afterFocusedItemIfPossibleLocationSelectors=[{typeId:0,index:1},{typeId:2,index:void 0},{typeId:3,index:void 0},{typeId:7,index:void 0}]}(ae||(ae={}));class le extends ae{constructor(t,e,i,n){if(super(le.createLayoutManagerConstructorParameters(t,e)),this._bindComponentEventHanlderPassedInConstructor=!1,this._creationTimeoutPassed=!1,void 0!==e&&\"function\"==typeof e&&(this.bindComponentEvent=e,this._bindComponentEventHanlderPassedInConstructor=!0,void 0!==i&&(this.unbindComponentEvent=i)),!this._bindComponentEventHanlderPassedInConstructor&&this.isSubWindow){if(void 0===this._constructorOrSubWindowLayoutConfig)throw new J(\"VLC98823\");{const t=xt.resolve(this._constructorOrSubWindowLayoutConfig);this.layoutConfig=Object.assign(Object.assign({},t),{root:void 0})}}!0!==n&&(this.deprecatedConstructor||this.init())}destroy(){this.bindComponentEvent=void 0,this.unbindComponentEvent=void 0,super.destroy()}init(){if(this._bindComponentEventHanlderPassedInConstructor||\"loading\"!==document.readyState&&null!==document.body){if(!this._bindComponentEventHanlderPassedInConstructor&&!0===this.isSubWindow&&!this._creationTimeoutPassed)return setTimeout((()=>this.init()),7),void(this._creationTimeoutPassed=!0);!0===this.isSubWindow&&(this._bindComponentEventHanlderPassedInConstructor||this.clearHtmlAndAdjustStylesForSubWindow(),window.__glInstance=this),super.init()}else document.addEventListener(\"DOMContentLoaded\",(()=>this.init()),{passive:!0})}clearHtmlAndAdjustStylesForSubWindow(){const t=document.head,e=new Array(4);e[0]=document.querySelectorAll(\"body link\"),e[1]=document.querySelectorAll(\"body style\"),e[2]=document.querySelectorAll(\"template\"),e[3]=document.querySelectorAll(\".gl_keep\");for(let i=0;ithis.emit(\"popIn\"))),document.body.appendChild(t),!0}}bindComponent(t,e){if(void 0!==this.bindComponentEvent){return this.bindComponentEvent(t,e)}if(void 0!==this.getComponentEvent)return{virtual:!1,component:this.getComponentEvent(t,e)};{const t=`${tt[2]}: ${JSON.stringify(e)}`;throw new Z(t)}}unbindComponent(t,e,i){if(void 0!==this.unbindComponentEvent)this.unbindComponentEvent(t);else if(!e&&void 0!==this.releaseComponentEvent){if(void 0===i)throw new J(\"VCUCRCU333998\");this.releaseComponentEvent(t,i)}}}!function(t){let e=!1;t.createLayoutManagerConstructorParameters=function(t,i){const n=e?null:new URL(document.location.href).searchParams.get(\"gl-window\");e=!0;const o=null!==n;let s,r;if(null!==n){const e=localStorage.getItem(n);if(null===e)throw new Error(\"Null gl-window Config\");localStorage.removeItem(n);const i=JSON.parse(e),o=_t.unminifyConfig(i);r=xt.fromResolved(o),t instanceof HTMLElement&&(s=t)}else void 0===t?r=void 0:t instanceof HTMLElement?(r=void 0,s=t):r=t,void 0===s&&i instanceof HTMLElement&&(s=i);return{constructorOrSubWindowLayoutConfig:r,isSubWindow:o,containerElement:s}}}(le||(le={}));class he extends le{constructor(t,e,i){super(t,e,i,!0),this._componentTypesMap=new Map,this._registeredComponentMap=new Map,this._virtuableComponentMap=new Map,this._containerVirtualRectingRequiredEventListener=(t,e,i)=>this.handleContainerVirtualRectingRequiredEvent(t,e,i),this._containerVirtualVisibilityChangeRequiredEventListener=(t,e)=>this.handleContainerVirtualVisibilityChangeRequiredEvent(t,e),this._containerVirtualZIndexChangeRequiredEventListener=(t,e,i)=>this.handleContainerVirtualZIndexChangeRequiredEvent(t,e,i),this.deprecatedConstructor||this.init()}registerComponent(t,e,i=!1){if(\"function\"!=typeof e)throw new $(\"registerComponent() componentConstructorOrFactoryFtn parameter is not a function\");if(e.hasOwnProperty(\"prototype\")){const n=e;this.registerComponentConstructor(t,n,i)}else{const n=e;this.registerComponentFactoryFunction(t,n,i)}}registerComponentConstructor(t,e,i=!1){if(\"function\"!=typeof e)throw new Error(tt[1]);if(void 0!==this._componentTypesMap.get(t))throw new Z(`${tt[3]}: ${t}`);this._componentTypesMap.set(t,{constructor:e,factoryFunction:void 0,virtual:i})}registerComponentFactoryFunction(t,e,i=!1){if(\"function\"!=typeof e)throw new Z(\"Please register a constructor function\");if(void 0!==this._componentTypesMap.get(t))throw new Z(`${tt[3]}: ${t}`);this._componentTypesMap.set(t,{constructor:void 0,factoryFunction:e,virtual:i})}registerComponentFunction(t){this.registerGetComponentConstructorCallback(t)}registerGetComponentConstructorCallback(t){if(\"function\"!=typeof t)throw new Error(\"Please register a callback function\");void 0!==this._getComponentConstructorFtn&&console.warn(\"Multiple component functions are being registered. Only the final registered function will be used.\"),this._getComponentConstructorFtn=t}getRegisteredComponentTypeNames(){const t=this._componentTypesMap.keys();return Array.from(t)}getComponentInstantiator(t){let e;const i=pt.resolveComponentTypeName(t);return void 0!==i&&(e=this._componentTypesMap.get(i)),void 0===e&&void 0!==this._getComponentConstructorFtn&&(e={constructor:this._getComponentConstructorFtn(t),factoryFunction:void 0,virtual:!1}),e}bindComponent(t,e){let i;const n=pt.resolveComponentTypeName(e);let o;if(void 0!==n&&(i=this._componentTypesMap.get(n)),void 0===i&&void 0!==this._getComponentConstructorFtn&&(i={constructor:this._getComponentConstructorFtn(e),factoryFunction:void 0,virtual:!1}),void 0!==i){const s=i.virtual;let r,a;r=void 0===e.componentState?void 0:Ut({},e.componentState);const l=i.constructor;if(void 0!==l)a=new l(t,r,s);else{const e=i.factoryFunction;if(void 0===e)throw new X(\"LMBCFFU10008\");a=e(t,r,s)}if(s){if(void 0===a)throw new J(\"GLBCVCU988774\");{const e=a,i=e.rootHtmlElement;if(void 0===i)throw new Z(`${tt[5]}: ${n}`);!function(t){const e=\"absolute\";t.style.position!==e&&(t.style.position=e)}(i),this.container.appendChild(i),this._virtuableComponentMap.set(t,e),t.virtualRectingRequiredEvent=this._containerVirtualRectingRequiredEventListener,t.virtualVisibilityChangeRequiredEvent=this._containerVirtualVisibilityChangeRequiredEventListener,t.virtualZIndexChangeRequiredEvent=this._containerVirtualZIndexChangeRequiredEventListener}}this._registeredComponentMap.set(t,a),o={virtual:i.virtual,component:a}}else o=super.bindComponent(t,e);return o}unbindComponent(t,e,i){if(void 0===this._registeredComponentMap.get(t))super.unbindComponent(t,e,i);else{const e=this._virtuableComponentMap.get(t);if(void 0!==e){const i=e.rootHtmlElement;if(void 0===i)throw new X(\"GLUC77743\",t.title);this.container.removeChild(i),this._virtuableComponentMap.delete(t)}}}fireBeforeVirtualRectingEvent(t){this._goldenLayoutBoundingClientRect=this.container.getBoundingClientRect(),super.fireBeforeVirtualRectingEvent(t)}handleContainerVirtualRectingRequiredEvent(t,e,i){const n=this._virtuableComponentMap.get(t);if(void 0===n)throw new J(\"GLHCSCE55933\");{const o=n.rootHtmlElement;if(void 0===o)throw new Z(tt[4]+\" \"+t.title);{const n=t.element.getBoundingClientRect(),s=n.left-this._goldenLayoutBoundingClientRect.left;o.style.left=zt(s);const r=n.top-this._goldenLayoutBoundingClientRect.top;o.style.top=zt(r),Tt(o,e),At(o,i)}}}handleContainerVirtualVisibilityChangeRequiredEvent(t,e){const i=this._virtuableComponentMap.get(t);if(void 0===i)throw new J(\"GLHCVVCRE55934\");{const n=i.rootHtmlElement;if(void 0===n)throw new Z(tt[4]+\" \"+t.title);Dt(n,e)}}handleContainerVirtualZIndexChangeRequiredEvent(t,e,i){const n=this._virtuableComponentMap.get(t);if(void 0===n)throw new J(\"GLHCVZICRE55935\");{const e=n.rootHtmlElement;if(void 0===e)throw new Z(tt[4]+\" \"+t.title);e.style.zIndex=i}}}const de=\"initial_\",ce={show:\"top\",popout:!1,maximise:!1,close:\"close-tab-unused\"},me={headerHeight:31},ue={hasHeaders:!0,reorderEnabled:!0},pe={popoutWholeStack:!1,constrainDragToContainer:!1,constrainDragToHeaders:!1,preventDragout:!1,showMaximiseIcon:!1,showPopoutIcon:!1,showCloseIcon:!1,blockedPopoutsThrowError:!0,closePopoutsOnUnload:!0,selectionEnabled:!1};var ge,fe;class ve{constructor(e){this.layout=e,ge.set(this,void 0),fe.set(this,void 0),this.handleResize=t=>{t.forEach((t=>this.resizeElement(t.target)))},this.handleMutation=()=>{this.layout.viewComponentsByContainerElement.forEach((t=>{this.resizeElement(t.container.element)}))},t.__classPrivateFieldSet(this,ge,new ResizeObserver(this.handleResize),\"f\"),t.__classPrivateFieldSet(this,fe,new MutationObserver(this.handleMutation),\"f\")}observeMutations(e){t.__classPrivateFieldGet(this,fe,\"f\")?.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[\"class\"]})}destroy(){t.__classPrivateFieldGet(this,ge,\"f\").disconnect(),t.__classPrivateFieldGet(this,fe,\"f\").disconnect()}observeContainer(e){t.__classPrivateFieldGet(this,ge,\"f\").observe(e)}unobserveContainer(e){t.__classPrivateFieldGet(this,ge,\"f\").unobserve(e)}resizeElement(t){const e=this.layout.viewComponentsByContainerElement.get(t);e&&e.resize()}}ge=new WeakMap,fe=new WeakMap;var _e={};Object.defineProperty(_e,\"__esModule\",{value:!0});var ye=_e.BaseItem=void 0;class Ce{constructor(t,e,i){this._item=t,this._layout=e,this._wrap=i}get raw(){return this._item}get layout(){return this._layout}get type(){return this._item.type}get contentItems(){return(this._item.contentItems??[]).map((t=>this._wrap(t)))}get parent(){const t=this._item.parent;return t?this._wrap(t):null}setActiveContentItem(t,e){if(\"stack\"!==this.type)throw new Error(`Cannot call setActiveContentItem from a non-stack item: ${this.type}`);this._item.setActiveContentItem(t.raw,e)}static wrapInternal(t,e,i){const n=Ce.wrapCache.get(e);if(n)return n;const o=new t(e,i,(e=>Ce.wrapInternal(t,e,i)));return Ce.wrapCache.set(e,o),o}}ye=_e.BaseItem=Ce,Ce.wrapCache=new WeakMap;const we=t=>!!t&&\"contentItems\"in t&&(t.isRow||t.isColumn);class Ie extends ye{isRoot(){return!!this._item.parent?.isGround}getBounds(){return this._item.element.getBoundingClientRect()}get viewName(){if(this._item.isComponent){const{component:t}=this._item;return t.identity.name}throw new Error(\"View name not found\")}onDestroyed(t){const e=({target:i})=>{i===this._item&&(t(),this._item.off(\"itemDestroyed\",e))};this._item.on(\"itemDestroyed\",e)}createAdjacentStack({position:t=\"right\"}={}){const e=this.raw;if(ee.isStack(e)&&e.parent){const i=[\"top\",\"bottom\"].includes(t)?\"column\":\"row\",n=[\"left\",\"top\"].includes(t)?1:0,o=we(e.parent)?e.parent:e.layoutManager,s=o,r=e.parent.contentItems.indexOf(e);e.parent.isGround&&e.parent.removeChild(e,!0);const a=o.newItem({type:i,content:[{type:\"stack\",content:[]}]},r);if(!a)throw new Error(\"createAdjacentStack: Failed to create new container\");const l=a.contentItems[0];return a.addChild(this.raw,n),we(s)&&s.removeChild(e,!0),this._wrap(l)}throw new Error(`Cannot creat adjacent stacks for type: ${e.type}, must be type 'stack'`)}setActiveContentItem(t,e=!0){if(!ee.isStack(this._item))throw new Error(`Cannot call setActiveContentItem from a non-stack item: ${this.type}`);this._item.setActiveComponentItem(t.raw,!e)}static wrap(t,e){return ye.wrapInternal(Ie,t,e)}}function be(t=[],e){for(const i of t)\"component\"===i.type?Object.keys(e).forEach((t=>{t in i&&(i.componentState={[`${de}${t}`]:i[t],...i.componentState}),i[t]=e[t]})):be(i.content,e)}function Se(t=[],e,i){for(const n of t)if(\"component\"===n.type)Object.keys(e).forEach((t=>{if(`${de}${t}`in n.componentState)return n[t]=n.componentState[`${de}${t}`],void delete n.componentState[`${de}${t}`];n[t]=e[t]}));else{if(n.size&&(\"row\"===i||\"column\"===i)){n[\"row\"===i?\"width\":\"height\"]=n.size?.includes(\".\")?parseFloat(n.size):parseInt(n.size)}Se(n.content,e,n.type)}}function Ee(t){if(t.root){t.root.content&&Se([t.root],{componentName:\"view\",isClosable:!0});const e=t.root;t.content=[e],delete t.root}return t}const xe=e=>class extends e{connectedCallback(){if(!this.name||!this.uuid)throw new Error(\" Name or uuid attribute missing\");if(!this.src)throw new Error(\" missing 'src' attribute.\");this.#t||(this.#t=document.createElement(\"iframe\"),this.#t.src=this.src,this.#t.style.height=\"100%\",this.#t.style.width=\"100%\",this.#t.style.border=\"none\",this.forceFrameName?this.#t.setAttribute(\"name\",this.forceFrameName):this.#t.setAttribute(\"name\",t.encodeOptions({brokerUrl:this.brokerUrl,name:this.name,uuid:this.uuid,providerId:this.providerId,contextGroup:this.contextGroup},\"of-frame\")),this.#t.setAttribute(\"id\",this.name),this.appendChild(this.#t))}#t;get brokerUrl(){return this.getAttribute(\"of-broker\")}set brokerUrl(t){t&&this.setAttribute(\"of-broker\",t)}get name(){return this.getAttribute(\"of-name\")}set name(t){t&&this.setAttribute(\"of-name\",t)}get forceFrameName(){return this.getAttribute(\"forceFrameName\")}set forceFrameName(t){t&&this.setAttribute(\"forceFrameName\",t)}get uuid(){return this.getAttribute(\"of-uuid\")}set uuid(t){t&&this.setAttribute(\"of-uuid\",t)}get src(){return this.getAttribute(\"src\")}set src(t){t&&this.setAttribute(\"src\",t)}get providerId(){return this.getAttribute(\"of-provider-id\")}set providerId(t){t&&this.setAttribute(\"of-provider-id\",t)}get contextGroup(){return this.getAttribute(\"of-context-group\")}set contextGroup(t){t&&this.setAttribute(\"of-context-group\",t)}static get observedAttributes(){return[\"name\"]}};class Le{static create(t){const e=document.createElement(\"of-view\");return Object.entries(t).forEach((([t,i])=>{e.setAttribute(t,i)})),e}}customElements.define(\"of-view\",xe(HTMLElement));class ze{constructor(t,i,n,{brokerUrl:o,interopConfig:s},r){this.container=t,this.config=i,this.ofView=null,this.isDragging=()=>this.container.tab.element?.className.includes(\"lm_dragging\")??!1;const{url:a,web:l,interop:h,name:d}=i||{},c=d??`internal-generated-view-${e.v4()}`;if(this.identity={uuid:n,name:c},this.container.element.setAttribute(\"of-name\",c),this.container.element.id=`container-${c}`,this.container.parent.id=c,void 0===a)return void this.handleUrlMissing();const m=this.updateTitleIfNotSet(a),u={\"of-broker\":o,\"of-uuid\":n,\"of-name\":c,src:a};l?.frameName&&(u.forceFrameName=l.frameName);const p=h?.currentContextGroup??s?.currentContextGroup;p&&(u[\"of-context-group\"]=p),s?.providerId&&(u[\"of-provider-id\"]=s?.providerId),this.ofView=Le.create(u),this.ofView.title=m??`Iframe: ${a}`,r.appendChild(this.ofView),this.ofView.style.position=\"absolute\"}updateTitleIfNotSet(t){return\"view\"===this.container.parent.title&&this.container.parent.setTitle(t),this.container.parent.title}handleUrlMissing(){const t=document.createElement(\"div\");t.setAttribute(\"style\",\"padding: 20px\");t.innerText=\"No URL provided\",this.container.element.appendChild(t)}destroy(){this.ofView?.remove(),this.ofView=null}closeView(){this.container.close()}resize(){if(this.ofView){if(this.isDragging())return void(this.ofView.style.display=\"none\");const t=this.container.element.getBoundingClientRect();this.ofView.style.position=\"absolute\",this.ofView.style.height=`${t.height}px`,this.ofView.style.width=`${t.width}px`,this.ofView.style.inset=`${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`,this.ofView.style.display=\"block\"}}}class Me extends U{static overrideConfig(t){const e={...ue,...t.settings,...pe};return e.reorderEnabled?be(t.content,{isClosable:!0}):be(t.content,{reorderEnabled:!1}),{dimensions:me,...t,settings:e,header:{...ce,show:!1!==t.settings?.hasHeaders&&ce.show}}}constructor(t,e,i,{options:n},o,s){super(),this.identity=t,this.container=e,this.initialConfig=i,this.layoutManager=o,this.platformProvider=s,this.viewComponentsByContainerElement=new Map,this.layoutContentCache=_.getSingleInstance(),this.reparentingViews=new Set,this.goldenLayoutDestroyed=!1,this.createViewComponent=(t,e)=>{m.handleSharedView(this.layoutManager,this.identity,e);const i=new ze(t,e,this.identity.uuid,this.options,this.iframeContainer);return e&&!1===e[`${de}isClosable`]&&this.stylesheet.insertRule(`#tab-${i.identity.name} .lm_close_tab { display: none; }`),this.viewComponentsByContainerElement.set(t.element,i),this.resizeController.observeContainer(t.element),i},this.iframeContainer=document.createElement(\"div\"),this.iframeContainer.id=`openfin-layout-iframe-container-${this.identity.layoutName}`,this.domEmitter=new V(e),this.setupStylesheets(),this.layout=new he(this.container),this.layout.resizeWithContainerAutomatically=!0,this.options=n,this.layout.registerComponent(\"view\",this.createViewComponent),this.setupListeners(),this.resizeController=new ve(this),this.layout.loadLayout(Me.overrideConfig(i));const r=document.createElement(\"div\");r.id=`openfin-layout-shadow-container-${this.identity.layoutName}`,r.attachShadow({mode:\"open\",delegatesFocus:!1}).appendChild(this.iframeContainer),this.container.appendChild(r),this.resizeController.observeMutations(this.container)}getStackByView({name:t}){const e=this.layout.findFirstComponentItemById(t);if(e?.parent&&e?.parent?.isStack)return Ie.wrap(e.parent,this)}getRoot(){return Ie.wrap(this.layout.rootItem,this)}async platformCloseView(t){const e=[...this.viewComponentsByContainerElement.values()].find((e=>e.identity.name===t.name));if(!e)throw new Error(`View with name: ${t.name} not found in layout.`);e.closeView()}async platformCreateView(t,{location:e,targetView:i}={}){if(i)throw new Error(\"TargetView not supported in web\");const n={options:this.platformProvider.normalizeOptions(t),target:this.identity,location:e};return this.insertView(n)}setupStylesheets(){if(this.container.setAttribute(\"data-openfin-layout-name\",this.identity.layoutName),this.stylesheet=new CSSStyleSheet,this.stylesheet.insertRule(\".lm_close { display: none; }\"),document.adoptedStyleSheets.push(this.stylesheet),this.initialConfig.settings?.preventSplitterResize){const t=`\\n [data-openfin-layout-name='${this.identity.layoutName}'] .lm_splitter {\\n pointer-events: none;\\n }`;this.stylesheet.insertRule(t)}}insertView({options:t,location:e,targetView:i}){const n=e?this.layoutContentCache.getItemOrUndefined(e.id):void 0,o=i?this.layoutContentCache.getItemOrUndefined(i.name):void 0,s=n??o??Ie.wrap(this.layout.rootItem,this);let r;if(ee.isStack(s.raw))r=s.raw;else{if(!we(s.raw))throw new Error(\"Cannot add a view at the requested location\");r=s.raw.newItem({type:\"stack\",content:[]})}const a=Math.min(r.contentItems.length,e?.index??r.contentItems.length);let l=this.layout.findFirstComponentItemById(t.name);l?(l.parent&&l.parent.removeChild(l,!0),r.addChild(l,a)):l=r.newComponent(\"view\",t,t.title??t.url??\"Default Title\",a);const h=l.component.identity;return Promise.resolve({identity:h})}replaceView({viewToReplace:t,newView:e}){throw new Error(\"Method not implemented.\")}replaceLayout(t){throw new Error(\"Method not implemented.\")}async cleanupView(t){}applyPreset(t){throw new Error(\"Method not implemented.\")}getCurrentViews(){return[...this.viewComponentsByContainerElement.values()].map((t=>t.identity))}async getFrameSnapshot(){return Ee(xt.fromResolved(this.layout.toConfig()))}isVisible(){return W(this.container)}async onViewDetached({viewIdentity:t}){this.reparentingViews.add(t.name),this.platformCloseView(t)}async destroy(){this.goldenLayoutDestroyed||(this.goldenLayoutDestroyed=!0,this.layout.destroy()),this.iframeContainer.remove(),this.resizeController.destroy(),document.adoptedStyleSheets=document.adoptedStyleSheets.filter((t=>t!==this.stylesheet)),this.viewComponentsByContainerElement.clear()}setupListeners(){this.container.addEventListener(\"pointerdown\",(t=>{if(t.target instanceof HTMLElement){const e=t.target.classList;[\"lm_tab\",\"lm_title\",\"lm_splitter\",\"lm_drag_handle\"].some((t=>e.contains(t)))&&(this.handleDragStart(),2===t.button&&t.stopPropagation())}}),!0),document.addEventListener(\"pointerup\",(()=>this.handleDragEnd()),!0),this.layout.on(\"tabCreated\",(t=>{const e=t.componentItem.component;t.element.id=`tab-${e.identity.name}`,this.domEmitter.dispatchLocalEvent(\"tab-created\",e.identity)})),this.layout.on(\"itemCreated\",(({target:t})=>{const e=t;if(Gt.isComponentItem(e)){const t=e.component;this.domEmitter.dispatchLocalEvent(\"container-created\",t.identity)}})),this.layout.on(\"itemDestroyed\",(t=>{const e=t.target;if(Gt.isComponentItem(e)){const t=e.component;this.removeViewComponent(t)}})),this.layout.on(\"itemDropped\",(()=>{this.handleDragEnd()}))}handleDragStart(){this.iframeContainer.style.pointerEvents=\"none\"}handleDragEnd(){this.iframeContainer.style.pointerEvents=\"\"}removeViewComponent(t){if(t.config&&!1===t.config[`${de}isClosable`]){const e=[...this.stylesheet.cssRules].findIndex((e=>e.cssText.includes(`#tab-${t.identity.name}`)));this.stylesheet.deleteRule(e)}t.destroy(),this.viewComponentsByContainerElement.delete(t.container.element),this.resizeController.unobserveContainer(t.container.element),this.reparentingViews.has(t.identity.name)?this.reparentingViews.delete(t.identity.name):this.platformProvider.closeView(t.identity.name);0===this.getCurrentViews().length&&(this.goldenLayoutDestroyed||(this.goldenLayoutDestroyed=!0,m.handleLastViewRemoved(this.layoutManager,this.identity)))}}class Pe{constructor(t,e,i,n){this.windowIdentity=t,this.connectConfig=e,this.provider=i,this.fallbackContainer=n}async createLayout(t,e){if(!(\"container\"in t)&&!this.fallbackContainer)throw new Error(\"Container property is not optional in web\");const{layoutName:i}=t,n=t,o=this.provider.initLayoutViews(n),s=n.container??this.fallbackContainer,r={...this.windowIdentity,layoutName:i},a=new Me(r,s,o,this.connectConfig,e,this.provider);m.registerLayout(e,i,a),this.fallbackContainer=null}async getLayoutSnapshot(t){return t.getLayoutSnapshot()}async handleLastViewRemoved(t){}}class Te{static async init(e){const i=e.getFin().InterApplicationBus.Channel,n=await i.create(`custom-frame-${e.me.uuid}`);return n.setDefaultAction((async(t,{target:e,opts:i},o)=>{const s=n.connections.find((t=>t.name===e.name));if(s)return n.dispatch(s,t,{...i,target:e});throw new Error(`Client with name ${e.name} not found`)})),await t.relayChannelClientApi_1(n,\"layout-relay\"),new Te(e)}constructor(t){this.wire=t,this.viewNames=new Set}normalizeOptions(t,i=\"default\"){const n=this.wire.me.uuid;let{name:o=`internal-generated-view-${e.v4()}`}=t;return o.match(/^internal-generated-view-/)&&this.viewNames.has(o)&&\"duplicate\"===i&&(o=`internal-generated-view-${e.v4()}`),this.viewNames.add(o),{...t,name:o,uuid:n}}closeView(t){this.viewNames.delete(t)}initLayoutViews({layout:t,multiInstanceViewBehavior:e}){return H((t=>{if(\"component\"===t.type&&t.componentState){const i=this.normalizeOptions(t.componentState,e);return{...t,componentState:i}}return t}),t)}}var Ae;const ke=t=>t;Ae=new WeakMap,exports.WebLayoutEntryPoint=class{constructor(e){Ae.set(this,void 0),this.initLayoutManager=async(e,i,{container:n,layoutManagerOverride:o})=>{const s=await Te.init(i),r=o??ke,a=new Pe(i.me,t.__classPrivateFieldGet(this,Ae,\"f\"),s,n),l=new(r(m.createClosedConstructor(a)));return await M(i,l),l},this.applyLayoutSnapshot=async(e,i,n)=>{await i.applyLayoutSnapshot(t.__classPrivateFieldGet(this,Ae,\"f\").platform.layoutSnapshot)},this.createLayout=async(t,e)=>m.createLayout(t,e),this.destroyLayout=async(t,e)=>m.destroyLayout(t,e),t.__classPrivateFieldSet(this,Ae,e,\"f\")}};\n","'use strict'\n\nexports.byteLength = byteLength\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\nfor (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i]\n revLookup[code.charCodeAt(i)] = i\n}\n\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction getLens (b64) {\n var len = b64.length\n\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // Trim off extra bytes after placeholder bytes are found\n // See: https://github.com/beatgammit/base64-js/issues/42\n var validLen = b64.indexOf('=')\n if (validLen === -1) validLen = len\n\n var placeHoldersLen = validLen === len\n ? 0\n : 4 - (validLen % 4)\n\n return [validLen, placeHoldersLen]\n}\n\n// base64 is 4/3 + up to two characters of the original data\nfunction byteLength (b64) {\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction _byteLength (b64, validLen, placeHoldersLen) {\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction toByteArray (b64) {\n var tmp\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n\n var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))\n\n var curByte = 0\n\n // if there are placeholders, only get up to the last complete 4 chars\n var len = placeHoldersLen > 0\n ? validLen - 4\n : validLen\n\n var i\n for (i = 0; i < len; i += 4) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 18) |\n (revLookup[b64.charCodeAt(i + 1)] << 12) |\n (revLookup[b64.charCodeAt(i + 2)] << 6) |\n revLookup[b64.charCodeAt(i + 3)]\n arr[curByte++] = (tmp >> 16) & 0xFF\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 2) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 2) |\n (revLookup[b64.charCodeAt(i + 1)] >> 4)\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 1) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 10) |\n (revLookup[b64.charCodeAt(i + 1)] << 4) |\n (revLookup[b64.charCodeAt(i + 2)] >> 2)\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] +\n lookup[num >> 12 & 0x3F] +\n lookup[num >> 6 & 0x3F] +\n lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n var tmp\n var output = []\n for (var i = start; i < end; i += 3) {\n tmp =\n ((uint8[i] << 16) & 0xFF0000) +\n ((uint8[i + 1] << 8) & 0xFF00) +\n (uint8[i + 2] & 0xFF)\n output.push(tripletToBase64(tmp))\n }\n return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n var tmp\n var len = uint8.length\n var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n var parts = []\n var maxChunkLength = 16383 // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1]\n parts.push(\n lookup[tmp >> 2] +\n lookup[(tmp << 4) & 0x3F] +\n '=='\n )\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + uint8[len - 1]\n parts.push(\n lookup[tmp >> 10] +\n lookup[(tmp >> 4) & 0x3F] +\n lookup[(tmp << 2) & 0x3F] +\n '='\n )\n }\n\n return parts.join('')\n}\n","/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n/* eslint-disable no-proto */\n\n'use strict'\n\nconst base64 = require('base64-js')\nconst ieee754 = require('ieee754')\nconst customInspectSymbol =\n (typeof Symbol === 'function' && typeof Symbol['for'] === 'function') // eslint-disable-line dot-notation\n ? Symbol['for']('nodejs.util.inspect.custom') // eslint-disable-line dot-notation\n : null\n\nexports.Buffer = Buffer\nexports.SlowBuffer = SlowBuffer\nexports.INSPECT_MAX_BYTES = 50\n\nconst K_MAX_LENGTH = 0x7fffffff\nexports.kMaxLength = K_MAX_LENGTH\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Print warning and recommend using `buffer` v4.x which has an Object\n * implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * We report that the browser does not support typed arrays if the are not subclassable\n * using __proto__. Firefox 4-29 lacks support for adding new properties to `Uint8Array`\n * (See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438). IE 10 lacks support\n * for __proto__ and has a buggy typed array implementation.\n */\nBuffer.TYPED_ARRAY_SUPPORT = typedArraySupport()\n\nif (!Buffer.TYPED_ARRAY_SUPPORT && typeof console !== 'undefined' &&\n typeof console.error === 'function') {\n console.error(\n 'This browser lacks typed array (Uint8Array) support which is required by ' +\n '`buffer` v5.x. Use `buffer` v4.x if you require old browser support.'\n )\n}\n\nfunction typedArraySupport () {\n // Can typed array instances can be augmented?\n try {\n const arr = new Uint8Array(1)\n const proto = { foo: function () { return 42 } }\n Object.setPrototypeOf(proto, Uint8Array.prototype)\n Object.setPrototypeOf(arr, proto)\n return arr.foo() === 42\n } catch (e) {\n return false\n }\n}\n\nObject.defineProperty(Buffer.prototype, 'parent', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.buffer\n }\n})\n\nObject.defineProperty(Buffer.prototype, 'offset', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.byteOffset\n }\n})\n\nfunction createBuffer (length) {\n if (length > K_MAX_LENGTH) {\n throw new RangeError('The value \"' + length + '\" is invalid for option \"size\"')\n }\n // Return an augmented `Uint8Array` instance\n const buf = new Uint8Array(length)\n Object.setPrototypeOf(buf, Buffer.prototype)\n return buf\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new TypeError(\n 'The \"string\" argument must be of type string. Received type number'\n )\n }\n return allocUnsafe(arg)\n }\n return from(arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\nfunction from (value, encodingOrOffset, length) {\n if (typeof value === 'string') {\n return fromString(value, encodingOrOffset)\n }\n\n if (ArrayBuffer.isView(value)) {\n return fromArrayView(value)\n }\n\n if (value == null) {\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n }\n\n if (isInstance(value, ArrayBuffer) ||\n (value && isInstance(value.buffer, ArrayBuffer))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof SharedArrayBuffer !== 'undefined' &&\n (isInstance(value, SharedArrayBuffer) ||\n (value && isInstance(value.buffer, SharedArrayBuffer)))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof value === 'number') {\n throw new TypeError(\n 'The \"value\" argument must not be of type number. Received type number'\n )\n }\n\n const valueOf = value.valueOf && value.valueOf()\n if (valueOf != null && valueOf !== value) {\n return Buffer.from(valueOf, encodingOrOffset, length)\n }\n\n const b = fromObject(value)\n if (b) return b\n\n if (typeof Symbol !== 'undefined' && Symbol.toPrimitive != null &&\n typeof value[Symbol.toPrimitive] === 'function') {\n return Buffer.from(value[Symbol.toPrimitive]('string'), encodingOrOffset, length)\n }\n\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n return from(value, encodingOrOffset, length)\n}\n\n// Note: Change prototype *after* Buffer.from is defined to workaround Chrome bug:\n// https://github.com/feross/buffer/pull/148\nObject.setPrototypeOf(Buffer.prototype, Uint8Array.prototype)\nObject.setPrototypeOf(Buffer, Uint8Array)\n\nfunction assertSize (size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be of type number')\n } else if (size < 0) {\n throw new RangeError('The value \"' + size + '\" is invalid for option \"size\"')\n }\n}\n\nfunction alloc (size, fill, encoding) {\n assertSize(size)\n if (size <= 0) {\n return createBuffer(size)\n }\n if (fill !== undefined) {\n // Only pay attention to encoding if it's a string. This\n // prevents accidentally sending in a number that would\n // be interpreted as a start offset.\n return typeof encoding === 'string'\n ? createBuffer(size).fill(fill, encoding)\n : createBuffer(size).fill(fill)\n }\n return createBuffer(size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n return alloc(size, fill, encoding)\n}\n\nfunction allocUnsafe (size) {\n assertSize(size)\n return createBuffer(size < 0 ? 0 : checked(size) | 0)\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n return allocUnsafe(size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n return allocUnsafe(size)\n}\n\nfunction fromString (string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8'\n }\n\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n\n const length = byteLength(string, encoding) | 0\n let buf = createBuffer(length)\n\n const actual = buf.write(string, encoding)\n\n if (actual !== length) {\n // Writing a hex string, for example, that contains invalid characters will\n // cause everything after the first invalid character to be ignored. (e.g.\n // 'abxxcd' will be treated as 'ab')\n buf = buf.slice(0, actual)\n }\n\n return buf\n}\n\nfunction fromArrayLike (array) {\n const length = array.length < 0 ? 0 : checked(array.length) | 0\n const buf = createBuffer(length)\n for (let i = 0; i < length; i += 1) {\n buf[i] = array[i] & 255\n }\n return buf\n}\n\nfunction fromArrayView (arrayView) {\n if (isInstance(arrayView, Uint8Array)) {\n const copy = new Uint8Array(arrayView)\n return fromArrayBuffer(copy.buffer, copy.byteOffset, copy.byteLength)\n }\n return fromArrayLike(arrayView)\n}\n\nfunction fromArrayBuffer (array, byteOffset, length) {\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\"offset\" is outside of buffer bounds')\n }\n\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\"length\" is outside of buffer bounds')\n }\n\n let buf\n if (byteOffset === undefined && length === undefined) {\n buf = new Uint8Array(array)\n } else if (length === undefined) {\n buf = new Uint8Array(array, byteOffset)\n } else {\n buf = new Uint8Array(array, byteOffset, length)\n }\n\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(buf, Buffer.prototype)\n\n return buf\n}\n\nfunction fromObject (obj) {\n if (Buffer.isBuffer(obj)) {\n const len = checked(obj.length) | 0\n const buf = createBuffer(len)\n\n if (buf.length === 0) {\n return buf\n }\n\n obj.copy(buf, 0, 0, len)\n return buf\n }\n\n if (obj.length !== undefined) {\n if (typeof obj.length !== 'number' || numberIsNaN(obj.length)) {\n return createBuffer(0)\n }\n return fromArrayLike(obj)\n }\n\n if (obj.type === 'Buffer' && Array.isArray(obj.data)) {\n return fromArrayLike(obj.data)\n }\n}\n\nfunction checked (length) {\n // Note: cannot use `length < K_MAX_LENGTH` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= K_MAX_LENGTH) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + K_MAX_LENGTH.toString(16) + ' bytes')\n }\n return length | 0\n}\n\nfunction SlowBuffer (length) {\n if (+length != length) { // eslint-disable-line eqeqeq\n length = 0\n }\n return Buffer.alloc(+length)\n}\n\nBuffer.isBuffer = function isBuffer (b) {\n return b != null && b._isBuffer === true &&\n b !== Buffer.prototype // so Buffer.isBuffer(Buffer.prototype) will be false\n}\n\nBuffer.compare = function compare (a, b) {\n if (isInstance(a, Uint8Array)) a = Buffer.from(a, a.offset, a.byteLength)\n if (isInstance(b, Uint8Array)) b = Buffer.from(b, b.offset, b.byteLength)\n if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n throw new TypeError(\n 'The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array'\n )\n }\n\n if (a === b) return 0\n\n let x = a.length\n let y = b.length\n\n for (let i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i]\n y = b[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n switch (String(encoding).toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'latin1':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return true\n default:\n return false\n }\n}\n\nBuffer.concat = function concat (list, length) {\n if (!Array.isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n\n if (list.length === 0) {\n return Buffer.alloc(0)\n }\n\n let i\n if (length === undefined) {\n length = 0\n for (i = 0; i < list.length; ++i) {\n length += list[i].length\n }\n }\n\n const buffer = Buffer.allocUnsafe(length)\n let pos = 0\n for (i = 0; i < list.length; ++i) {\n let buf = list[i]\n if (isInstance(buf, Uint8Array)) {\n if (pos + buf.length > buffer.length) {\n if (!Buffer.isBuffer(buf)) buf = Buffer.from(buf)\n buf.copy(buffer, pos)\n } else {\n Uint8Array.prototype.set.call(\n buffer,\n buf,\n pos\n )\n }\n } else if (!Buffer.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n } else {\n buf.copy(buffer, pos)\n }\n pos += buf.length\n }\n return buffer\n}\n\nfunction byteLength (string, encoding) {\n if (Buffer.isBuffer(string)) {\n return string.length\n }\n if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) {\n return string.byteLength\n }\n if (typeof string !== 'string') {\n throw new TypeError(\n 'The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. ' +\n 'Received type ' + typeof string\n )\n }\n\n const len = string.length\n const mustMatch = (arguments.length > 2 && arguments[2] === true)\n if (!mustMatch && len === 0) return 0\n\n // Use a for loop to avoid recursion\n let loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'ascii':\n case 'latin1':\n case 'binary':\n return len\n case 'utf8':\n case 'utf-8':\n return utf8ToBytes(string).length\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return len * 2\n case 'hex':\n return len >>> 1\n case 'base64':\n return base64ToBytes(string).length\n default:\n if (loweredCase) {\n return mustMatch ? -1 : utf8ToBytes(string).length // assume utf8\n }\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n let loweredCase = false\n\n // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n // property of a typed array.\n\n // This behaves neither like String nor Uint8Array in that we set start/end\n // to their upper/lower bounds if the value passed is out of range.\n // undefined is handled specially as per ECMA-262 6th Edition,\n // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n if (start === undefined || start < 0) {\n start = 0\n }\n // Return early if start > this.length. Done here to prevent potential uint32\n // coercion fail below.\n if (start > this.length) {\n return ''\n }\n\n if (end === undefined || end > this.length) {\n end = this.length\n }\n\n if (end <= 0) {\n return ''\n }\n\n // Force coercion to uint32. This will also coerce falsey/NaN values to 0.\n end >>>= 0\n start >>>= 0\n\n if (end <= start) {\n return ''\n }\n\n if (!encoding) encoding = 'utf8'\n\n while (true) {\n switch (encoding) {\n case 'hex':\n return hexSlice(this, start, end)\n\n case 'utf8':\n case 'utf-8':\n return utf8Slice(this, start, end)\n\n case 'ascii':\n return asciiSlice(this, start, end)\n\n case 'latin1':\n case 'binary':\n return latin1Slice(this, start, end)\n\n case 'base64':\n return base64Slice(this, start, end)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return utf16leSlice(this, start, end)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = (encoding + '').toLowerCase()\n loweredCase = true\n }\n }\n}\n\n// This property is used by `Buffer.isBuffer` (and the `is-buffer` npm package)\n// to detect a Buffer instance. It's not possible to use `instanceof Buffer`\n// reliably in a browserify context because there could be multiple different\n// copies of the 'buffer' package in use. This method works even for Buffer\n// instances that were created from another copy of the `buffer` package.\n// See: https://github.com/feross/buffer/issues/154\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n const i = b[n]\n b[n] = b[m]\n b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n const len = this.length\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits')\n }\n for (let i = 0; i < len; i += 2) {\n swap(this, i, i + 1)\n }\n return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n const len = this.length\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits')\n }\n for (let i = 0; i < len; i += 4) {\n swap(this, i, i + 3)\n swap(this, i + 1, i + 2)\n }\n return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n const len = this.length\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits')\n }\n for (let i = 0; i < len; i += 8) {\n swap(this, i, i + 7)\n swap(this, i + 1, i + 6)\n swap(this, i + 2, i + 5)\n swap(this, i + 3, i + 4)\n }\n return this\n}\n\nBuffer.prototype.toString = function toString () {\n const length = this.length\n if (length === 0) return ''\n if (arguments.length === 0) return utf8Slice(this, 0, length)\n return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.toLocaleString = Buffer.prototype.toString\n\nBuffer.prototype.equals = function equals (b) {\n if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n if (this === b) return true\n return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n let str = ''\n const max = exports.INSPECT_MAX_BYTES\n str = this.toString('hex', 0, max).replace(/(.{2})/g, '$1 ').trim()\n if (this.length > max) str += ' ... '\n return ''\n}\nif (customInspectSymbol) {\n Buffer.prototype[customInspectSymbol] = Buffer.prototype.inspect\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n if (isInstance(target, Uint8Array)) {\n target = Buffer.from(target, target.offset, target.byteLength)\n }\n if (!Buffer.isBuffer(target)) {\n throw new TypeError(\n 'The \"target\" argument must be one of type Buffer or Uint8Array. ' +\n 'Received type ' + (typeof target)\n )\n }\n\n if (start === undefined) {\n start = 0\n }\n if (end === undefined) {\n end = target ? target.length : 0\n }\n if (thisStart === undefined) {\n thisStart = 0\n }\n if (thisEnd === undefined) {\n thisEnd = this.length\n }\n\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError('out of range index')\n }\n\n if (thisStart >= thisEnd && start >= end) {\n return 0\n }\n if (thisStart >= thisEnd) {\n return -1\n }\n if (start >= end) {\n return 1\n }\n\n start >>>= 0\n end >>>= 0\n thisStart >>>= 0\n thisEnd >>>= 0\n\n if (this === target) return 0\n\n let x = thisEnd - thisStart\n let y = end - start\n const len = Math.min(x, y)\n\n const thisCopy = this.slice(thisStart, thisEnd)\n const targetCopy = target.slice(start, end)\n\n for (let i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i]\n y = targetCopy[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (numberIsNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [val], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n let indexSize = 1\n let arrLength = arr.length\n let valLength = val.length\n\n if (encoding !== undefined) {\n encoding = String(encoding).toLowerCase()\n if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n encoding === 'utf16le' || encoding === 'utf-16le') {\n if (arr.length < 2 || val.length < 2) {\n return -1\n }\n indexSize = 2\n arrLength /= 2\n valLength /= 2\n byteOffset /= 2\n }\n }\n\n function read (buf, i) {\n if (indexSize === 1) {\n return buf[i]\n } else {\n return buf.readUInt16BE(i * indexSize)\n }\n }\n\n let i\n if (dir) {\n let foundIndex = -1\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1) foundIndex = i\n if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n } else {\n if (foundIndex !== -1) i -= i - foundIndex\n foundIndex = -1\n }\n }\n } else {\n if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n for (i = byteOffset; i >= 0; i--) {\n let found = true\n for (let j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false\n break\n }\n }\n if (found) return i\n }\n }\n\n return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n offset = Number(offset) || 0\n const remaining = buf.length - offset\n if (!length) {\n length = remaining\n } else {\n length = Number(length)\n if (length > remaining) {\n length = remaining\n }\n }\n\n const strLen = string.length\n\n if (length > strLen / 2) {\n length = strLen / 2\n }\n let i\n for (i = 0; i < length; ++i) {\n const parsed = parseInt(string.substr(i * 2, 2), 16)\n if (numberIsNaN(parsed)) return i\n buf[offset + i] = parsed\n }\n return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n // Buffer#write(string)\n if (offset === undefined) {\n encoding = 'utf8'\n length = this.length\n offset = 0\n // Buffer#write(string, encoding)\n } else if (length === undefined && typeof offset === 'string') {\n encoding = offset\n length = this.length\n offset = 0\n // Buffer#write(string, offset[, length][, encoding])\n } else if (isFinite(offset)) {\n offset = offset >>> 0\n if (isFinite(length)) {\n length = length >>> 0\n if (encoding === undefined) encoding = 'utf8'\n } else {\n encoding = length\n length = undefined\n }\n } else {\n throw new Error(\n 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n )\n }\n\n const remaining = this.length - offset\n if (length === undefined || length > remaining) length = remaining\n\n if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n throw new RangeError('Attempt to write outside buffer bounds')\n }\n\n if (!encoding) encoding = 'utf8'\n\n let loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'hex':\n return hexWrite(this, string, offset, length)\n\n case 'utf8':\n case 'utf-8':\n return utf8Write(this, string, offset, length)\n\n case 'ascii':\n case 'latin1':\n case 'binary':\n return asciiWrite(this, string, offset, length)\n\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return base64Write(this, string, offset, length)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return ucs2Write(this, string, offset, length)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0)\n }\n}\n\nfunction base64Slice (buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf)\n } else {\n return base64.fromByteArray(buf.slice(start, end))\n }\n}\n\nfunction utf8Slice (buf, start, end) {\n end = Math.min(buf.length, end)\n const res = []\n\n let i = start\n while (i < end) {\n const firstByte = buf[i]\n let codePoint = null\n let bytesPerSequence = (firstByte > 0xEF)\n ? 4\n : (firstByte > 0xDF)\n ? 3\n : (firstByte > 0xBF)\n ? 2\n : 1\n\n if (i + bytesPerSequence <= end) {\n let secondByte, thirdByte, fourthByte, tempCodePoint\n\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 0x80) {\n codePoint = firstByte\n }\n break\n case 2:\n secondByte = buf[i + 1]\n if ((secondByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n if (tempCodePoint > 0x7F) {\n codePoint = tempCodePoint\n }\n }\n break\n case 3:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n codePoint = tempCodePoint\n }\n }\n break\n case 4:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n fourthByte = buf[i + 3]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n codePoint = tempCodePoint\n }\n }\n }\n }\n\n if (codePoint === null) {\n // we did not generate a valid codePoint so insert a\n // replacement char (U+FFFD) and advance only 1 byte\n codePoint = 0xFFFD\n bytesPerSequence = 1\n } else if (codePoint > 0xFFFF) {\n // encode to utf16 (surrogate pair dance)\n codePoint -= 0x10000\n res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n codePoint = 0xDC00 | codePoint & 0x3FF\n }\n\n res.push(codePoint)\n i += bytesPerSequence\n }\n\n return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nconst MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n const len = codePoints.length\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n }\n\n // Decode in chunks to avoid \"call stack size exceeded\".\n let res = ''\n let i = 0\n while (i < len) {\n res += String.fromCharCode.apply(\n String,\n codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n )\n }\n return res\n}\n\nfunction asciiSlice (buf, start, end) {\n let ret = ''\n end = Math.min(buf.length, end)\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F)\n }\n return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n let ret = ''\n end = Math.min(buf.length, end)\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i])\n }\n return ret\n}\n\nfunction hexSlice (buf, start, end) {\n const len = buf.length\n\n if (!start || start < 0) start = 0\n if (!end || end < 0 || end > len) end = len\n\n let out = ''\n for (let i = start; i < end; ++i) {\n out += hexSliceLookupTable[buf[i]]\n }\n return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n const bytes = buf.slice(start, end)\n let res = ''\n // If bytes.length is odd, the last 8 bits must be ignored (same as node.js)\n for (let i = 0; i < bytes.length - 1; i += 2) {\n res += String.fromCharCode(bytes[i] + (bytes[i + 1] * 256))\n }\n return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n const len = this.length\n start = ~~start\n end = end === undefined ? len : ~~end\n\n if (start < 0) {\n start += len\n if (start < 0) start = 0\n } else if (start > len) {\n start = len\n }\n\n if (end < 0) {\n end += len\n if (end < 0) end = 0\n } else if (end > len) {\n end = len\n }\n\n if (end < start) end = start\n\n const newBuf = this.subarray(start, end)\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(newBuf, Buffer.prototype)\n\n return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUintLE =\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let val = this[offset]\n let mul = 1\n let i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUintBE =\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n checkOffset(offset, byteLength, this.length)\n }\n\n let val = this[offset + --byteLength]\n let mul = 1\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUint8 =\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n return this[offset]\n}\n\nBuffer.prototype.readUint16LE =\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUint16BE =\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUint32LE =\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return ((this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16)) +\n (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUint32BE =\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] * 0x1000000) +\n ((this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n this[offset + 3])\n}\n\nBuffer.prototype.readBigUInt64LE = defineBigIntMethod(function readBigUInt64LE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const lo = first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24\n\n const hi = this[++offset] +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n last * 2 ** 24\n\n return BigInt(lo) + (BigInt(hi) << BigInt(32))\n})\n\nBuffer.prototype.readBigUInt64BE = defineBigIntMethod(function readBigUInt64BE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const hi = first * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset]\n\n const lo = this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last\n\n return (BigInt(hi) << BigInt(32)) + BigInt(lo)\n})\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let val = this[offset]\n let mul = 1\n let i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let i = byteLength\n let mul = 1\n let val = this[offset + --i]\n while (i > 0 && (mul *= 0x100)) {\n val += this[offset + --i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n if (!(this[offset] & 0x80)) return (this[offset])\n return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n const val = this[offset] | (this[offset + 1] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n const val = this[offset + 1] | (this[offset] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16) |\n (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] << 24) |\n (this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n (this[offset + 3])\n}\n\nBuffer.prototype.readBigInt64LE = defineBigIntMethod(function readBigInt64LE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const val = this[offset + 4] +\n this[offset + 5] * 2 ** 8 +\n this[offset + 6] * 2 ** 16 +\n (last << 24) // Overflow\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24)\n})\n\nBuffer.prototype.readBigInt64BE = defineBigIntMethod(function readBigInt64BE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const val = (first << 24) + // Overflow\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset]\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last)\n})\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUintLE =\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n let mul = 1\n let i = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUintBE =\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n let i = byteLength - 1\n let mul = 1\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUint8 =\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeUint16LE =\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeUint16BE =\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeUint32LE =\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset + 3] = (value >>> 24)\n this[offset + 2] = (value >>> 16)\n this[offset + 1] = (value >>> 8)\n this[offset] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeUint32BE =\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nfunction wrtBigUInt64LE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7)\n\n let lo = Number(value & BigInt(0xffffffff))\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n return offset\n}\n\nfunction wrtBigUInt64BE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7)\n\n let lo = Number(value & BigInt(0xffffffff))\n buf[offset + 7] = lo\n lo = lo >> 8\n buf[offset + 6] = lo\n lo = lo >> 8\n buf[offset + 5] = lo\n lo = lo >> 8\n buf[offset + 4] = lo\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n buf[offset + 3] = hi\n hi = hi >> 8\n buf[offset + 2] = hi\n hi = hi >> 8\n buf[offset + 1] = hi\n hi = hi >> 8\n buf[offset] = hi\n return offset + 8\n}\n\nBuffer.prototype.writeBigUInt64LE = defineBigIntMethod(function writeBigUInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeBigUInt64BE = defineBigIntMethod(function writeBigUInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n let i = 0\n let mul = 1\n let sub = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n let i = byteLength - 1\n let mul = 1\n let sub = 0\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n if (value < 0) value = 0xff + value + 1\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n this[offset + 2] = (value >>> 16)\n this[offset + 3] = (value >>> 24)\n return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (value < 0) value = 0xffffffff + value + 1\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeBigInt64LE = defineBigIntMethod(function writeBigInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nBuffer.prototype.writeBigInt64BE = defineBigIntMethod(function writeBigInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n }\n ieee754.write(buf, value, offset, littleEndian, 23, 4)\n return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n }\n ieee754.write(buf, value, offset, littleEndian, 52, 8)\n return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n if (!Buffer.isBuffer(target)) throw new TypeError('argument should be a Buffer')\n if (!start) start = 0\n if (!end && end !== 0) end = this.length\n if (targetStart >= target.length) targetStart = target.length\n if (!targetStart) targetStart = 0\n if (end > 0 && end < start) end = start\n\n // Copy 0 bytes; we're done\n if (end === start) return 0\n if (target.length === 0 || this.length === 0) return 0\n\n // Fatal error conditions\n if (targetStart < 0) {\n throw new RangeError('targetStart out of bounds')\n }\n if (start < 0 || start >= this.length) throw new RangeError('Index out of range')\n if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n // Are we oob?\n if (end > this.length) end = this.length\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start\n }\n\n const len = end - start\n\n if (this === target && typeof Uint8Array.prototype.copyWithin === 'function') {\n // Use built-in when available, missing from IE11\n this.copyWithin(targetStart, start, end)\n } else {\n Uint8Array.prototype.set.call(\n target,\n this.subarray(start, end),\n targetStart\n )\n }\n\n return len\n}\n\n// Usage:\n// buffer.fill(number[, offset[, end]])\n// buffer.fill(buffer[, offset[, end]])\n// buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n // Handle string cases:\n if (typeof val === 'string') {\n if (typeof start === 'string') {\n encoding = start\n start = 0\n end = this.length\n } else if (typeof end === 'string') {\n encoding = end\n end = this.length\n }\n if (encoding !== undefined && typeof encoding !== 'string') {\n throw new TypeError('encoding must be a string')\n }\n if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n if (val.length === 1) {\n const code = val.charCodeAt(0)\n if ((encoding === 'utf8' && code < 128) ||\n encoding === 'latin1') {\n // Fast path: If `val` fits into a single byte, use that numeric value.\n val = code\n }\n }\n } else if (typeof val === 'number') {\n val = val & 255\n } else if (typeof val === 'boolean') {\n val = Number(val)\n }\n\n // Invalid ranges are not set to a default, so can range check early.\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError('Out of range index')\n }\n\n if (end <= start) {\n return this\n }\n\n start = start >>> 0\n end = end === undefined ? this.length : end >>> 0\n\n if (!val) val = 0\n\n let i\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val\n }\n } else {\n const bytes = Buffer.isBuffer(val)\n ? val\n : Buffer.from(val, encoding)\n const len = bytes.length\n if (len === 0) {\n throw new TypeError('The value \"' + val +\n '\" is invalid for argument \"value\"')\n }\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len]\n }\n }\n\n return this\n}\n\n// CUSTOM ERRORS\n// =============\n\n// Simplified versions from Node, changed for Buffer-only usage\nconst errors = {}\nfunction E (sym, getMessage, Base) {\n errors[sym] = class NodeError extends Base {\n constructor () {\n super()\n\n Object.defineProperty(this, 'message', {\n value: getMessage.apply(this, arguments),\n writable: true,\n configurable: true\n })\n\n // Add the error code to the name to include it in the stack trace.\n this.name = `${this.name} [${sym}]`\n // Access the stack to generate the error message including the error code\n // from the name.\n this.stack // eslint-disable-line no-unused-expressions\n // Reset the name to the actual name.\n delete this.name\n }\n\n get code () {\n return sym\n }\n\n set code (value) {\n Object.defineProperty(this, 'code', {\n configurable: true,\n enumerable: true,\n value,\n writable: true\n })\n }\n\n toString () {\n return `${this.name} [${sym}]: ${this.message}`\n }\n }\n}\n\nE('ERR_BUFFER_OUT_OF_BOUNDS',\n function (name) {\n if (name) {\n return `${name} is outside of buffer bounds`\n }\n\n return 'Attempt to access memory outside buffer bounds'\n }, RangeError)\nE('ERR_INVALID_ARG_TYPE',\n function (name, actual) {\n return `The \"${name}\" argument must be of type number. Received type ${typeof actual}`\n }, TypeError)\nE('ERR_OUT_OF_RANGE',\n function (str, range, input) {\n let msg = `The value of \"${str}\" is out of range.`\n let received = input\n if (Number.isInteger(input) && Math.abs(input) > 2 ** 32) {\n received = addNumericalSeparator(String(input))\n } else if (typeof input === 'bigint') {\n received = String(input)\n if (input > BigInt(2) ** BigInt(32) || input < -(BigInt(2) ** BigInt(32))) {\n received = addNumericalSeparator(received)\n }\n received += 'n'\n }\n msg += ` It must be ${range}. Received ${received}`\n return msg\n }, RangeError)\n\nfunction addNumericalSeparator (val) {\n let res = ''\n let i = val.length\n const start = val[0] === '-' ? 1 : 0\n for (; i >= start + 4; i -= 3) {\n res = `_${val.slice(i - 3, i)}${res}`\n }\n return `${val.slice(0, i)}${res}`\n}\n\n// CHECK FUNCTIONS\n// ===============\n\nfunction checkBounds (buf, offset, byteLength) {\n validateNumber(offset, 'offset')\n if (buf[offset] === undefined || buf[offset + byteLength] === undefined) {\n boundsError(offset, buf.length - (byteLength + 1))\n }\n}\n\nfunction checkIntBI (value, min, max, buf, offset, byteLength) {\n if (value > max || value < min) {\n const n = typeof min === 'bigint' ? 'n' : ''\n let range\n if (byteLength > 3) {\n if (min === 0 || min === BigInt(0)) {\n range = `>= 0${n} and < 2${n} ** ${(byteLength + 1) * 8}${n}`\n } else {\n range = `>= -(2${n} ** ${(byteLength + 1) * 8 - 1}${n}) and < 2 ** ` +\n `${(byteLength + 1) * 8 - 1}${n}`\n }\n } else {\n range = `>= ${min}${n} and <= ${max}${n}`\n }\n throw new errors.ERR_OUT_OF_RANGE('value', range, value)\n }\n checkBounds(buf, offset, byteLength)\n}\n\nfunction validateNumber (value, name) {\n if (typeof value !== 'number') {\n throw new errors.ERR_INVALID_ARG_TYPE(name, 'number', value)\n }\n}\n\nfunction boundsError (value, length, type) {\n if (Math.floor(value) !== value) {\n validateNumber(value, type)\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset', 'an integer', value)\n }\n\n if (length < 0) {\n throw new errors.ERR_BUFFER_OUT_OF_BOUNDS()\n }\n\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset',\n `>= ${type ? 1 : 0} and <= ${length}`,\n value)\n}\n\n// HELPER FUNCTIONS\n// ================\n\nconst INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n // Node takes equal signs as end of the Base64 encoding\n str = str.split('=')[0]\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = str.trim().replace(INVALID_BASE64_RE, '')\n // Node converts strings with length < 2 to ''\n if (str.length < 2) return ''\n // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n while (str.length % 4 !== 0) {\n str = str + '='\n }\n return str\n}\n\nfunction utf8ToBytes (string, units) {\n units = units || Infinity\n let codePoint\n const length = string.length\n let leadSurrogate = null\n const bytes = []\n\n for (let i = 0; i < length; ++i) {\n codePoint = string.charCodeAt(i)\n\n // is surrogate component\n if (codePoint > 0xD7FF && codePoint < 0xE000) {\n // last char was a lead\n if (!leadSurrogate) {\n // no lead yet\n if (codePoint > 0xDBFF) {\n // unexpected trail\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n } else if (i + 1 === length) {\n // unpaired lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n }\n\n // valid lead\n leadSurrogate = codePoint\n\n continue\n }\n\n // 2 leads in a row\n if (codePoint < 0xDC00) {\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n leadSurrogate = codePoint\n continue\n }\n\n // valid surrogate pair\n codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n } else if (leadSurrogate) {\n // valid bmp char, but last char was a lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n }\n\n leadSurrogate = null\n\n // encode utf8\n if (codePoint < 0x80) {\n if ((units -= 1) < 0) break\n bytes.push(codePoint)\n } else if (codePoint < 0x800) {\n if ((units -= 2) < 0) break\n bytes.push(\n codePoint >> 0x6 | 0xC0,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x10000) {\n if ((units -= 3) < 0) break\n bytes.push(\n codePoint >> 0xC | 0xE0,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x110000) {\n if ((units -= 4) < 0) break\n bytes.push(\n codePoint >> 0x12 | 0xF0,\n codePoint >> 0xC & 0x3F | 0x80,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else {\n throw new Error('Invalid code point')\n }\n }\n\n return bytes\n}\n\nfunction asciiToBytes (str) {\n const byteArray = []\n for (let i = 0; i < str.length; ++i) {\n // Node's code seems to be doing this and not & 0x7F..\n byteArray.push(str.charCodeAt(i) & 0xFF)\n }\n return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n let c, hi, lo\n const byteArray = []\n for (let i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0) break\n\n c = str.charCodeAt(i)\n hi = c >> 8\n lo = c % 256\n byteArray.push(lo)\n byteArray.push(hi)\n }\n\n return byteArray\n}\n\nfunction base64ToBytes (str) {\n return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n let i\n for (i = 0; i < length; ++i) {\n if ((i + offset >= dst.length) || (i >= src.length)) break\n dst[i + offset] = src[i]\n }\n return i\n}\n\n// ArrayBuffer or Uint8Array objects from other contexts (i.e. iframes) do not pass\n// the `instanceof` check but they should be treated as of that type.\n// See: https://github.com/feross/buffer/issues/166\nfunction isInstance (obj, type) {\n return obj instanceof type ||\n (obj != null && obj.constructor != null && obj.constructor.name != null &&\n obj.constructor.name === type.name)\n}\nfunction numberIsNaN (obj) {\n // For IE11 support\n return obj !== obj // eslint-disable-line no-self-compare\n}\n\n// Create lookup table for `toString('hex')`\n// See: https://github.com/feross/buffer/issues/219\nconst hexSliceLookupTable = (function () {\n const alphabet = '0123456789abcdef'\n const table = new Array(256)\n for (let i = 0; i < 16; ++i) {\n const i16 = i * 16\n for (let j = 0; j < 16; ++j) {\n table[i16 + j] = alphabet[i] + alphabet[j]\n }\n }\n return table\n})()\n\n// Return not function with Error if BigInt not supported\nfunction defineBigIntMethod (fn) {\n return typeof BigInt === 'undefined' ? BufferBigIntNotDefined : fn\n}\n\nfunction BufferBigIntNotDefined () {\n throw new Error('BigInt not supported')\n}\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\nvar R = typeof Reflect === 'object' ? Reflect : null\nvar ReflectApply = R && typeof R.apply === 'function'\n ? R.apply\n : function ReflectApply(target, receiver, args) {\n return Function.prototype.apply.call(target, receiver, args);\n }\n\nvar ReflectOwnKeys\nif (R && typeof R.ownKeys === 'function') {\n ReflectOwnKeys = R.ownKeys\n} else if (Object.getOwnPropertySymbols) {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target)\n .concat(Object.getOwnPropertySymbols(target));\n };\n} else {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target);\n };\n}\n\nfunction ProcessEmitWarning(warning) {\n if (console && console.warn) console.warn(warning);\n}\n\nvar NumberIsNaN = Number.isNaN || function NumberIsNaN(value) {\n return value !== value;\n}\n\nfunction EventEmitter() {\n EventEmitter.init.call(this);\n}\nmodule.exports = EventEmitter;\nmodule.exports.once = once;\n\n// Backwards-compat with node 0.10.x\nEventEmitter.EventEmitter = EventEmitter;\n\nEventEmitter.prototype._events = undefined;\nEventEmitter.prototype._eventsCount = 0;\nEventEmitter.prototype._maxListeners = undefined;\n\n// By default EventEmitters will print a warning if more than 10 listeners are\n// added to it. This is a useful default which helps finding memory leaks.\nvar defaultMaxListeners = 10;\n\nfunction checkListener(listener) {\n if (typeof listener !== 'function') {\n throw new TypeError('The \"listener\" argument must be of type Function. Received type ' + typeof listener);\n }\n}\n\nObject.defineProperty(EventEmitter, 'defaultMaxListeners', {\n enumerable: true,\n get: function() {\n return defaultMaxListeners;\n },\n set: function(arg) {\n if (typeof arg !== 'number' || arg < 0 || NumberIsNaN(arg)) {\n throw new RangeError('The value of \"defaultMaxListeners\" is out of range. It must be a non-negative number. Received ' + arg + '.');\n }\n defaultMaxListeners = arg;\n }\n});\n\nEventEmitter.init = function() {\n\n if (this._events === undefined ||\n this._events === Object.getPrototypeOf(this)._events) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n }\n\n this._maxListeners = this._maxListeners || undefined;\n};\n\n// Obviously not all Emitters should be limited to 10. This function allows\n// that to be increased. Set to zero for unlimited.\nEventEmitter.prototype.setMaxListeners = function setMaxListeners(n) {\n if (typeof n !== 'number' || n < 0 || NumberIsNaN(n)) {\n throw new RangeError('The value of \"n\" is out of range. It must be a non-negative number. Received ' + n + '.');\n }\n this._maxListeners = n;\n return this;\n};\n\nfunction _getMaxListeners(that) {\n if (that._maxListeners === undefined)\n return EventEmitter.defaultMaxListeners;\n return that._maxListeners;\n}\n\nEventEmitter.prototype.getMaxListeners = function getMaxListeners() {\n return _getMaxListeners(this);\n};\n\nEventEmitter.prototype.emit = function emit(type) {\n var args = [];\n for (var i = 1; i < arguments.length; i++) args.push(arguments[i]);\n var doError = (type === 'error');\n\n var events = this._events;\n if (events !== undefined)\n doError = (doError && events.error === undefined);\n else if (!doError)\n return false;\n\n // If there is no 'error' event listener then throw.\n if (doError) {\n var er;\n if (args.length > 0)\n er = args[0];\n if (er instanceof Error) {\n // Note: The comments on the `throw` lines are intentional, they show\n // up in Node's output if this results in an unhandled exception.\n throw er; // Unhandled 'error' event\n }\n // At least give some kind of context to the user\n var err = new Error('Unhandled error.' + (er ? ' (' + er.message + ')' : ''));\n err.context = er;\n throw err; // Unhandled 'error' event\n }\n\n var handler = events[type];\n\n if (handler === undefined)\n return false;\n\n if (typeof handler === 'function') {\n ReflectApply(handler, this, args);\n } else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n ReflectApply(listeners[i], this, args);\n }\n\n return true;\n};\n\nfunction _addListener(target, type, listener, prepend) {\n var m;\n var events;\n var existing;\n\n checkListener(listener);\n\n events = target._events;\n if (events === undefined) {\n events = target._events = Object.create(null);\n target._eventsCount = 0;\n } else {\n // To avoid recursion in the case that type === \"newListener\"! Before\n // adding it to the listeners, first emit \"newListener\".\n if (events.newListener !== undefined) {\n target.emit('newListener', type,\n listener.listener ? listener.listener : listener);\n\n // Re-assign `events` because a newListener handler could have caused the\n // this._events to be assigned to a new object\n events = target._events;\n }\n existing = events[type];\n }\n\n if (existing === undefined) {\n // Optimize the case of one listener. Don't need the extra array object.\n existing = events[type] = listener;\n ++target._eventsCount;\n } else {\n if (typeof existing === 'function') {\n // Adding the second element, need to change to array.\n existing = events[type] =\n prepend ? [listener, existing] : [existing, listener];\n // If we've already got an array, just append.\n } else if (prepend) {\n existing.unshift(listener);\n } else {\n existing.push(listener);\n }\n\n // Check for listener leak\n m = _getMaxListeners(target);\n if (m > 0 && existing.length > m && !existing.warned) {\n existing.warned = true;\n // No error code for this since it is a Warning\n // eslint-disable-next-line no-restricted-syntax\n var w = new Error('Possible EventEmitter memory leak detected. ' +\n existing.length + ' ' + String(type) + ' listeners ' +\n 'added. Use emitter.setMaxListeners() to ' +\n 'increase limit');\n w.name = 'MaxListenersExceededWarning';\n w.emitter = target;\n w.type = type;\n w.count = existing.length;\n ProcessEmitWarning(w);\n }\n }\n\n return target;\n}\n\nEventEmitter.prototype.addListener = function addListener(type, listener) {\n return _addListener(this, type, listener, false);\n};\n\nEventEmitter.prototype.on = EventEmitter.prototype.addListener;\n\nEventEmitter.prototype.prependListener =\n function prependListener(type, listener) {\n return _addListener(this, type, listener, true);\n };\n\nfunction onceWrapper() {\n if (!this.fired) {\n this.target.removeListener(this.type, this.wrapFn);\n this.fired = true;\n if (arguments.length === 0)\n return this.listener.call(this.target);\n return this.listener.apply(this.target, arguments);\n }\n}\n\nfunction _onceWrap(target, type, listener) {\n var state = { fired: false, wrapFn: undefined, target: target, type: type, listener: listener };\n var wrapped = onceWrapper.bind(state);\n wrapped.listener = listener;\n state.wrapFn = wrapped;\n return wrapped;\n}\n\nEventEmitter.prototype.once = function once(type, listener) {\n checkListener(listener);\n this.on(type, _onceWrap(this, type, listener));\n return this;\n};\n\nEventEmitter.prototype.prependOnceListener =\n function prependOnceListener(type, listener) {\n checkListener(listener);\n this.prependListener(type, _onceWrap(this, type, listener));\n return this;\n };\n\n// Emits a 'removeListener' event if and only if the listener was removed.\nEventEmitter.prototype.removeListener =\n function removeListener(type, listener) {\n var list, events, position, i, originalListener;\n\n checkListener(listener);\n\n events = this._events;\n if (events === undefined)\n return this;\n\n list = events[type];\n if (list === undefined)\n return this;\n\n if (list === listener || list.listener === listener) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else {\n delete events[type];\n if (events.removeListener)\n this.emit('removeListener', type, list.listener || listener);\n }\n } else if (typeof list !== 'function') {\n position = -1;\n\n for (i = list.length - 1; i >= 0; i--) {\n if (list[i] === listener || list[i].listener === listener) {\n originalListener = list[i].listener;\n position = i;\n break;\n }\n }\n\n if (position < 0)\n return this;\n\n if (position === 0)\n list.shift();\n else {\n spliceOne(list, position);\n }\n\n if (list.length === 1)\n events[type] = list[0];\n\n if (events.removeListener !== undefined)\n this.emit('removeListener', type, originalListener || listener);\n }\n\n return this;\n };\n\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\n\nEventEmitter.prototype.removeAllListeners =\n function removeAllListeners(type) {\n var listeners, events, i;\n\n events = this._events;\n if (events === undefined)\n return this;\n\n // not listening for removeListener, no need to emit\n if (events.removeListener === undefined) {\n if (arguments.length === 0) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n } else if (events[type] !== undefined) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else\n delete events[type];\n }\n return this;\n }\n\n // emit removeListener for all listeners on all events\n if (arguments.length === 0) {\n var keys = Object.keys(events);\n var key;\n for (i = 0; i < keys.length; ++i) {\n key = keys[i];\n if (key === 'removeListener') continue;\n this.removeAllListeners(key);\n }\n this.removeAllListeners('removeListener');\n this._events = Object.create(null);\n this._eventsCount = 0;\n return this;\n }\n\n listeners = events[type];\n\n if (typeof listeners === 'function') {\n this.removeListener(type, listeners);\n } else if (listeners !== undefined) {\n // LIFO order\n for (i = listeners.length - 1; i >= 0; i--) {\n this.removeListener(type, listeners[i]);\n }\n }\n\n return this;\n };\n\nfunction _listeners(target, type, unwrap) {\n var events = target._events;\n\n if (events === undefined)\n return [];\n\n var evlistener = events[type];\n if (evlistener === undefined)\n return [];\n\n if (typeof evlistener === 'function')\n return unwrap ? [evlistener.listener || evlistener] : [evlistener];\n\n return unwrap ?\n unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length);\n}\n\nEventEmitter.prototype.listeners = function listeners(type) {\n return _listeners(this, type, true);\n};\n\nEventEmitter.prototype.rawListeners = function rawListeners(type) {\n return _listeners(this, type, false);\n};\n\nEventEmitter.listenerCount = function(emitter, type) {\n if (typeof emitter.listenerCount === 'function') {\n return emitter.listenerCount(type);\n } else {\n return listenerCount.call(emitter, type);\n }\n};\n\nEventEmitter.prototype.listenerCount = listenerCount;\nfunction listenerCount(type) {\n var events = this._events;\n\n if (events !== undefined) {\n var evlistener = events[type];\n\n if (typeof evlistener === 'function') {\n return 1;\n } else if (evlistener !== undefined) {\n return evlistener.length;\n }\n }\n\n return 0;\n}\n\nEventEmitter.prototype.eventNames = function eventNames() {\n return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : [];\n};\n\nfunction arrayClone(arr, n) {\n var copy = new Array(n);\n for (var i = 0; i < n; ++i)\n copy[i] = arr[i];\n return copy;\n}\n\nfunction spliceOne(list, index) {\n for (; index + 1 < list.length; index++)\n list[index] = list[index + 1];\n list.pop();\n}\n\nfunction unwrapListeners(arr) {\n var ret = new Array(arr.length);\n for (var i = 0; i < ret.length; ++i) {\n ret[i] = arr[i].listener || arr[i];\n }\n return ret;\n}\n\nfunction once(emitter, name) {\n return new Promise(function (resolve, reject) {\n function errorListener(err) {\n emitter.removeListener(name, resolver);\n reject(err);\n }\n\n function resolver() {\n if (typeof emitter.removeListener === 'function') {\n emitter.removeListener('error', errorListener);\n }\n resolve([].slice.call(arguments));\n };\n\n eventTargetAgnosticAddListener(emitter, name, resolver, { once: true });\n if (name !== 'error') {\n addErrorHandlerIfEventEmitter(emitter, errorListener, { once: true });\n }\n });\n}\n\nfunction addErrorHandlerIfEventEmitter(emitter, handler, flags) {\n if (typeof emitter.on === 'function') {\n eventTargetAgnosticAddListener(emitter, 'error', handler, flags);\n }\n}\n\nfunction eventTargetAgnosticAddListener(emitter, name, listener, flags) {\n if (typeof emitter.on === 'function') {\n if (flags.once) {\n emitter.once(name, listener);\n } else {\n emitter.on(name, listener);\n }\n } else if (typeof emitter.addEventListener === 'function') {\n // EventTarget does not have `error` event semantics like Node\n // EventEmitters, we do not listen for `error` events here.\n emitter.addEventListener(name, function wrapListener(arg) {\n // IE does not have builtin `{ once: true }` support so we\n // have to do it manually.\n if (flags.once) {\n emitter.removeEventListener(name, wrapListener);\n }\n listener(arg);\n });\n } else {\n throw new TypeError('The \"emitter\" argument must be of type EventEmitter. Received type ' + typeof emitter);\n }\n}\n","/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */\nexports.read = function (buffer, offset, isLE, mLen, nBytes) {\n var e, m\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var nBits = -7\n var i = isLE ? (nBytes - 1) : 0\n var d = isLE ? -1 : 1\n var s = buffer[offset + i]\n\n i += d\n\n e = s & ((1 << (-nBits)) - 1)\n s >>= (-nBits)\n nBits += eLen\n for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & ((1 << (-nBits)) - 1)\n e >>= (-nBits)\n nBits += mLen\n for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias\n } else if (e === eMax) {\n return m ? NaN : ((s ? -1 : 1) * Infinity)\n } else {\n m = m + Math.pow(2, mLen)\n e = e - eBias\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n var i = isLE ? 0 : (nBytes - 1)\n var d = isLE ? 1 : -1\n var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n value = Math.abs(value)\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0\n e = eMax\n } else {\n e = Math.floor(Math.log(value) / Math.LN2)\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--\n c *= 2\n }\n if (e + eBias >= 1) {\n value += rt / c\n } else {\n value += rt * Math.pow(2, 1 - eBias)\n }\n if (value * c >= 2) {\n e++\n c /= 2\n }\n\n if (e + eBias >= eMax) {\n m = 0\n e = eMax\n } else if (e + eBias >= 1) {\n m = ((value * c) - 1) * Math.pow(2, mLen)\n e = e + eBias\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n e = 0\n }\n }\n\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n e = (e << mLen) | m\n eLen += mLen\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128\n}\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView');\n\nmodule.exports = DataView;\n","var hashClear = require('./_hashClear'),\n hashDelete = require('./_hashDelete'),\n hashGet = require('./_hashGet'),\n hashHas = require('./_hashHas'),\n hashSet = require('./_hashSet');\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\nmodule.exports = Hash;\n","var listCacheClear = require('./_listCacheClear'),\n listCacheDelete = require('./_listCacheDelete'),\n listCacheGet = require('./_listCacheGet'),\n listCacheHas = require('./_listCacheHas'),\n listCacheSet = require('./_listCacheSet');\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\nmodule.exports = ListCache;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map');\n\nmodule.exports = Map;\n","var mapCacheClear = require('./_mapCacheClear'),\n mapCacheDelete = require('./_mapCacheDelete'),\n mapCacheGet = require('./_mapCacheGet'),\n mapCacheHas = require('./_mapCacheHas'),\n mapCacheSet = require('./_mapCacheSet');\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\nmodule.exports = MapCache;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Promise = getNative(root, 'Promise');\n\nmodule.exports = Promise;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Set = getNative(root, 'Set');\n\nmodule.exports = Set;\n","var MapCache = require('./_MapCache'),\n setCacheAdd = require('./_setCacheAdd'),\n setCacheHas = require('./_setCacheHas');\n\n/**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\nfunction SetCache(values) {\n var index = -1,\n length = values == null ? 0 : values.length;\n\n this.__data__ = new MapCache;\n while (++index < length) {\n this.add(values[index]);\n }\n}\n\n// Add methods to `SetCache`.\nSetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\nSetCache.prototype.has = setCacheHas;\n\nmodule.exports = SetCache;\n","var ListCache = require('./_ListCache'),\n stackClear = require('./_stackClear'),\n stackDelete = require('./_stackDelete'),\n stackGet = require('./_stackGet'),\n stackHas = require('./_stackHas'),\n stackSet = require('./_stackSet');\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\nmodule.exports = Stack;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Uint8Array = root.Uint8Array;\n\nmodule.exports = Uint8Array;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar WeakMap = getNative(root, 'WeakMap');\n\nmodule.exports = WeakMap;\n","/**\n * A specialized version of `_.forEach` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\nfunction arrayEach(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (iteratee(array[index], index, array) === false) {\n break;\n }\n }\n return array;\n}\n\nmodule.exports = arrayEach;\n","/**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\nfunction arrayFilter(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result[resIndex++] = value;\n }\n }\n return result;\n}\n\nmodule.exports = arrayFilter;\n","var baseTimes = require('./_baseTimes'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isIndex = require('./_isIndex'),\n isTypedArray = require('./isTypedArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = arrayLikeKeys;\n","/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n}\n\nmodule.exports = arrayPush;\n","/**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\nfunction arraySome(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (predicate(array[index], index, array)) {\n return true;\n }\n }\n return false;\n}\n\nmodule.exports = arraySome;\n","var baseAssignValue = require('./_baseAssignValue'),\n eq = require('./eq');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\nmodule.exports = assignValue;\n","var eq = require('./eq');\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\nmodule.exports = assocIndexOf;\n","var copyObject = require('./_copyObject'),\n keys = require('./keys');\n\n/**\n * The base implementation of `_.assign` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssign(object, source) {\n return object && copyObject(source, keys(source), object);\n}\n\nmodule.exports = baseAssign;\n","var copyObject = require('./_copyObject'),\n keysIn = require('./keysIn');\n\n/**\n * The base implementation of `_.assignIn` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssignIn(object, source) {\n return object && copyObject(source, keysIn(source), object);\n}\n\nmodule.exports = baseAssignIn;\n","var defineProperty = require('./_defineProperty');\n\n/**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction baseAssignValue(object, key, value) {\n if (key == '__proto__' && defineProperty) {\n defineProperty(object, key, {\n 'configurable': true,\n 'enumerable': true,\n 'value': value,\n 'writable': true\n });\n } else {\n object[key] = value;\n }\n}\n\nmodule.exports = baseAssignValue;\n","var Stack = require('./_Stack'),\n arrayEach = require('./_arrayEach'),\n assignValue = require('./_assignValue'),\n baseAssign = require('./_baseAssign'),\n baseAssignIn = require('./_baseAssignIn'),\n cloneBuffer = require('./_cloneBuffer'),\n copyArray = require('./_copyArray'),\n copySymbols = require('./_copySymbols'),\n copySymbolsIn = require('./_copySymbolsIn'),\n getAllKeys = require('./_getAllKeys'),\n getAllKeysIn = require('./_getAllKeysIn'),\n getTag = require('./_getTag'),\n initCloneArray = require('./_initCloneArray'),\n initCloneByTag = require('./_initCloneByTag'),\n initCloneObject = require('./_initCloneObject'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isMap = require('./isMap'),\n isObject = require('./isObject'),\n isSet = require('./isSet'),\n keys = require('./keys'),\n keysIn = require('./keysIn');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_FLAT_FLAG = 2,\n CLONE_SYMBOLS_FLAG = 4;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values supported by `_.clone`. */\nvar cloneableTags = {};\ncloneableTags[argsTag] = cloneableTags[arrayTag] =\ncloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =\ncloneableTags[boolTag] = cloneableTags[dateTag] =\ncloneableTags[float32Tag] = cloneableTags[float64Tag] =\ncloneableTags[int8Tag] = cloneableTags[int16Tag] =\ncloneableTags[int32Tag] = cloneableTags[mapTag] =\ncloneableTags[numberTag] = cloneableTags[objectTag] =\ncloneableTags[regexpTag] = cloneableTags[setTag] =\ncloneableTags[stringTag] = cloneableTags[symbolTag] =\ncloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =\ncloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;\ncloneableTags[errorTag] = cloneableTags[funcTag] =\ncloneableTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.clone` and `_.cloneDeep` which tracks\n * traversed objects.\n *\n * @private\n * @param {*} value The value to clone.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Deep clone\n * 2 - Flatten inherited properties\n * 4 - Clone symbols\n * @param {Function} [customizer] The function to customize cloning.\n * @param {string} [key] The key of `value`.\n * @param {Object} [object] The parent object of `value`.\n * @param {Object} [stack] Tracks traversed objects and their clone counterparts.\n * @returns {*} Returns the cloned value.\n */\nfunction baseClone(value, bitmask, customizer, key, object, stack) {\n var result,\n isDeep = bitmask & CLONE_DEEP_FLAG,\n isFlat = bitmask & CLONE_FLAT_FLAG,\n isFull = bitmask & CLONE_SYMBOLS_FLAG;\n\n if (customizer) {\n result = object ? customizer(value, key, object, stack) : customizer(value);\n }\n if (result !== undefined) {\n return result;\n }\n if (!isObject(value)) {\n return value;\n }\n var isArr = isArray(value);\n if (isArr) {\n result = initCloneArray(value);\n if (!isDeep) {\n return copyArray(value, result);\n }\n } else {\n var tag = getTag(value),\n isFunc = tag == funcTag || tag == genTag;\n\n if (isBuffer(value)) {\n return cloneBuffer(value, isDeep);\n }\n if (tag == objectTag || tag == argsTag || (isFunc && !object)) {\n result = (isFlat || isFunc) ? {} : initCloneObject(value);\n if (!isDeep) {\n return isFlat\n ? copySymbolsIn(value, baseAssignIn(result, value))\n : copySymbols(value, baseAssign(result, value));\n }\n } else {\n if (!cloneableTags[tag]) {\n return object ? value : {};\n }\n result = initCloneByTag(value, tag, isDeep);\n }\n }\n // Check for circular references and return its corresponding clone.\n stack || (stack = new Stack);\n var stacked = stack.get(value);\n if (stacked) {\n return stacked;\n }\n stack.set(value, result);\n\n if (isSet(value)) {\n value.forEach(function(subValue) {\n result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));\n });\n } else if (isMap(value)) {\n value.forEach(function(subValue, key) {\n result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n }\n\n var keysFunc = isFull\n ? (isFlat ? getAllKeysIn : getAllKeys)\n : (isFlat ? keysIn : keys);\n\n var props = isArr ? undefined : keysFunc(value);\n arrayEach(props || value, function(subValue, key) {\n if (props) {\n key = subValue;\n subValue = value[key];\n }\n // Recursively populate clone (susceptible to call stack limits).\n assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n return result;\n}\n\nmodule.exports = baseClone;\n","var isObject = require('./isObject');\n\n/** Built-in value references. */\nvar objectCreate = Object.create;\n\n/**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} proto The object to inherit from.\n * @returns {Object} Returns the new object.\n */\nvar baseCreate = (function() {\n function object() {}\n return function(proto) {\n if (!isObject(proto)) {\n return {};\n }\n if (objectCreate) {\n return objectCreate(proto);\n }\n object.prototype = proto;\n var result = new object;\n object.prototype = undefined;\n return result;\n };\n}());\n\nmodule.exports = baseCreate;\n","var arrayPush = require('./_arrayPush'),\n isArray = require('./isArray');\n\n/**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction baseGetAllKeys(object, keysFunc, symbolsFunc) {\n var result = keysFunc(object);\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n}\n\nmodule.exports = baseGetAllKeys;\n","var Symbol = require('./_Symbol'),\n getRawTag = require('./_getRawTag'),\n objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]';\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\nmodule.exports = baseIsArguments;\n","var baseIsEqualDeep = require('./_baseIsEqualDeep'),\n isObjectLike = require('./isObjectLike');\n\n/**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Unordered comparison\n * 2 - Partial comparison\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\nfunction baseIsEqual(value, other, bitmask, customizer, stack) {\n if (value === other) {\n return true;\n }\n if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\n return value !== value && other !== other;\n }\n return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n}\n\nmodule.exports = baseIsEqual;\n","var Stack = require('./_Stack'),\n equalArrays = require('./_equalArrays'),\n equalByTag = require('./_equalByTag'),\n equalObjects = require('./_equalObjects'),\n getTag = require('./_getTag'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isTypedArray = require('./isTypedArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n var objIsArr = isArray(object),\n othIsArr = isArray(other),\n objTag = objIsArr ? arrayTag : getTag(object),\n othTag = othIsArr ? arrayTag : getTag(other);\n\n objTag = objTag == argsTag ? objectTag : objTag;\n othTag = othTag == argsTag ? objectTag : othTag;\n\n var objIsObj = objTag == objectTag,\n othIsObj = othTag == objectTag,\n isSameTag = objTag == othTag;\n\n if (isSameTag && isBuffer(object)) {\n if (!isBuffer(other)) {\n return false;\n }\n objIsArr = true;\n objIsObj = false;\n }\n if (isSameTag && !objIsObj) {\n stack || (stack = new Stack);\n return (objIsArr || isTypedArray(object))\n ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n }\n if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n if (objIsWrapped || othIsWrapped) {\n var objUnwrapped = objIsWrapped ? object.value() : object,\n othUnwrapped = othIsWrapped ? other.value() : other;\n\n stack || (stack = new Stack);\n return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n }\n }\n if (!isSameTag) {\n return false;\n }\n stack || (stack = new Stack);\n return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n}\n\nmodule.exports = baseIsEqualDeep;\n","var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]';\n\n/**\n * The base implementation of `_.isMap` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n */\nfunction baseIsMap(value) {\n return isObjectLike(value) && getTag(value) == mapTag;\n}\n\nmodule.exports = baseIsMap;\n","var isFunction = require('./isFunction'),\n isMasked = require('./_isMasked'),\n isObject = require('./isObject'),\n toSource = require('./_toSource');\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\nmodule.exports = baseIsNative;\n","var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar setTag = '[object Set]';\n\n/**\n * The base implementation of `_.isSet` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n */\nfunction baseIsSet(value) {\n return isObjectLike(value) && getTag(value) == setTag;\n}\n\nmodule.exports = baseIsSet;\n","var baseGetTag = require('./_baseGetTag'),\n isLength = require('./isLength'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n\nmodule.exports = baseIsTypedArray;\n","var isPrototype = require('./_isPrototype'),\n nativeKeys = require('./_nativeKeys');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeys;\n","var isObject = require('./isObject'),\n isPrototype = require('./_isPrototype'),\n nativeKeysIn = require('./_nativeKeysIn');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeysIn(object) {\n if (!isObject(object)) {\n return nativeKeysIn(object);\n }\n var isProto = isPrototype(object),\n result = [];\n\n for (var key in object) {\n if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeysIn;\n","/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\nmodule.exports = baseTimes;\n","/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n return function(value) {\n return func(value);\n };\n}\n\nmodule.exports = baseUnary;\n","/**\n * Checks if a `cache` value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction cacheHas(cache, key) {\n return cache.has(key);\n}\n\nmodule.exports = cacheHas;\n","var Uint8Array = require('./_Uint8Array');\n\n/**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\nfunction cloneArrayBuffer(arrayBuffer) {\n var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n return result;\n}\n\nmodule.exports = cloneArrayBuffer;\n","var root = require('./_root');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined,\n allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;\n\n/**\n * Creates a clone of `buffer`.\n *\n * @private\n * @param {Buffer} buffer The buffer to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Buffer} Returns the cloned buffer.\n */\nfunction cloneBuffer(buffer, isDeep) {\n if (isDeep) {\n return buffer.slice();\n }\n var length = buffer.length,\n result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\n\n buffer.copy(result);\n return result;\n}\n\nmodule.exports = cloneBuffer;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer');\n\n/**\n * Creates a clone of `dataView`.\n *\n * @private\n * @param {Object} dataView The data view to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned data view.\n */\nfunction cloneDataView(dataView, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;\n return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);\n}\n\nmodule.exports = cloneDataView;\n","/** Used to match `RegExp` flags from their coerced string values. */\nvar reFlags = /\\w*$/;\n\n/**\n * Creates a clone of `regexp`.\n *\n * @private\n * @param {Object} regexp The regexp to clone.\n * @returns {Object} Returns the cloned regexp.\n */\nfunction cloneRegExp(regexp) {\n var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));\n result.lastIndex = regexp.lastIndex;\n return result;\n}\n\nmodule.exports = cloneRegExp;\n","var Symbol = require('./_Symbol');\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * Creates a clone of the `symbol` object.\n *\n * @private\n * @param {Object} symbol The symbol object to clone.\n * @returns {Object} Returns the cloned symbol object.\n */\nfunction cloneSymbol(symbol) {\n return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};\n}\n\nmodule.exports = cloneSymbol;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer');\n\n/**\n * Creates a clone of `typedArray`.\n *\n * @private\n * @param {Object} typedArray The typed array to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned typed array.\n */\nfunction cloneTypedArray(typedArray, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n}\n\nmodule.exports = cloneTypedArray;\n","/**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\nfunction copyArray(source, array) {\n var index = -1,\n length = source.length;\n\n array || (array = Array(length));\n while (++index < length) {\n array[index] = source[index];\n }\n return array;\n}\n\nmodule.exports = copyArray;\n","var assignValue = require('./_assignValue'),\n baseAssignValue = require('./_baseAssignValue');\n\n/**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\nfunction copyObject(source, props, object, customizer) {\n var isNew = !object;\n object || (object = {});\n\n var index = -1,\n length = props.length;\n\n while (++index < length) {\n var key = props[index];\n\n var newValue = customizer\n ? customizer(object[key], source[key], key, object, source)\n : undefined;\n\n if (newValue === undefined) {\n newValue = source[key];\n }\n if (isNew) {\n baseAssignValue(object, key, newValue);\n } else {\n assignValue(object, key, newValue);\n }\n }\n return object;\n}\n\nmodule.exports = copyObject;\n","var copyObject = require('./_copyObject'),\n getSymbols = require('./_getSymbols');\n\n/**\n * Copies own symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbols(source, object) {\n return copyObject(source, getSymbols(source), object);\n}\n\nmodule.exports = copySymbols;\n","var copyObject = require('./_copyObject'),\n getSymbolsIn = require('./_getSymbolsIn');\n\n/**\n * Copies own and inherited symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbolsIn(source, object) {\n return copyObject(source, getSymbolsIn(source), object);\n}\n\nmodule.exports = copySymbolsIn;\n","var root = require('./_root');\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\nmodule.exports = coreJsData;\n","var getNative = require('./_getNative');\n\nvar defineProperty = (function() {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n}());\n\nmodule.exports = defineProperty;\n","var SetCache = require('./_SetCache'),\n arraySome = require('./_arraySome'),\n cacheHas = require('./_cacheHas');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\nfunction equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n arrLength = array.length,\n othLength = other.length;\n\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n return false;\n }\n // Check that cyclic values are equal.\n var arrStacked = stack.get(array);\n var othStacked = stack.get(other);\n if (arrStacked && othStacked) {\n return arrStacked == other && othStacked == array;\n }\n var index = -1,\n result = true,\n seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n stack.set(array, other);\n stack.set(other, array);\n\n // Ignore non-index properties.\n while (++index < arrLength) {\n var arrValue = array[index],\n othValue = other[index];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, arrValue, index, other, array, stack)\n : customizer(arrValue, othValue, index, array, other, stack);\n }\n if (compared !== undefined) {\n if (compared) {\n continue;\n }\n result = false;\n break;\n }\n // Recursively compare arrays (susceptible to call stack limits).\n if (seen) {\n if (!arraySome(other, function(othValue, othIndex) {\n if (!cacheHas(seen, othIndex) &&\n (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n return seen.push(othIndex);\n }\n })) {\n result = false;\n break;\n }\n } else if (!(\n arrValue === othValue ||\n equalFunc(arrValue, othValue, bitmask, customizer, stack)\n )) {\n result = false;\n break;\n }\n }\n stack['delete'](array);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalArrays;\n","var Symbol = require('./_Symbol'),\n Uint8Array = require('./_Uint8Array'),\n eq = require('./eq'),\n equalArrays = require('./_equalArrays'),\n mapToArray = require('./_mapToArray'),\n setToArray = require('./_setToArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]';\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n switch (tag) {\n case dataViewTag:\n if ((object.byteLength != other.byteLength) ||\n (object.byteOffset != other.byteOffset)) {\n return false;\n }\n object = object.buffer;\n other = other.buffer;\n\n case arrayBufferTag:\n if ((object.byteLength != other.byteLength) ||\n !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n return false;\n }\n return true;\n\n case boolTag:\n case dateTag:\n case numberTag:\n // Coerce booleans to `1` or `0` and dates to milliseconds.\n // Invalid dates are coerced to `NaN`.\n return eq(+object, +other);\n\n case errorTag:\n return object.name == other.name && object.message == other.message;\n\n case regexpTag:\n case stringTag:\n // Coerce regexes to strings and treat strings, primitives and objects,\n // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n // for more details.\n return object == (other + '');\n\n case mapTag:\n var convert = mapToArray;\n\n case setTag:\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n convert || (convert = setToArray);\n\n if (object.size != other.size && !isPartial) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked) {\n return stacked == other;\n }\n bitmask |= COMPARE_UNORDERED_FLAG;\n\n // Recursively compare objects (susceptible to call stack limits).\n stack.set(object, other);\n var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n stack['delete'](object);\n return result;\n\n case symbolTag:\n if (symbolValueOf) {\n return symbolValueOf.call(object) == symbolValueOf.call(other);\n }\n }\n return false;\n}\n\nmodule.exports = equalByTag;\n","var getAllKeys = require('./_getAllKeys');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n objProps = getAllKeys(object),\n objLength = objProps.length,\n othProps = getAllKeys(other),\n othLength = othProps.length;\n\n if (objLength != othLength && !isPartial) {\n return false;\n }\n var index = objLength;\n while (index--) {\n var key = objProps[index];\n if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n return false;\n }\n }\n // Check that cyclic values are equal.\n var objStacked = stack.get(object);\n var othStacked = stack.get(other);\n if (objStacked && othStacked) {\n return objStacked == other && othStacked == object;\n }\n var result = true;\n stack.set(object, other);\n stack.set(other, object);\n\n var skipCtor = isPartial;\n while (++index < objLength) {\n key = objProps[index];\n var objValue = object[key],\n othValue = other[key];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, objValue, key, other, object, stack)\n : customizer(objValue, othValue, key, object, other, stack);\n }\n // Recursively compare objects (susceptible to call stack limits).\n if (!(compared === undefined\n ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n : compared\n )) {\n result = false;\n break;\n }\n skipCtor || (skipCtor = key == 'constructor');\n }\n if (result && !skipCtor) {\n var objCtor = object.constructor,\n othCtor = other.constructor;\n\n // Non `Object` object instances with different constructors are not equal.\n if (objCtor != othCtor &&\n ('constructor' in object && 'constructor' in other) &&\n !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n result = false;\n }\n }\n stack['delete'](object);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalObjects;\n","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n","var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbols = require('./_getSymbols'),\n keys = require('./keys');\n\n/**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeys(object) {\n return baseGetAllKeys(object, keys, getSymbols);\n}\n\nmodule.exports = getAllKeys;\n","var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbolsIn = require('./_getSymbolsIn'),\n keysIn = require('./keysIn');\n\n/**\n * Creates an array of own and inherited enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeysIn(object) {\n return baseGetAllKeys(object, keysIn, getSymbolsIn);\n}\n\nmodule.exports = getAllKeysIn;\n","var isKeyable = require('./_isKeyable');\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\nmodule.exports = getMapData;\n","var baseIsNative = require('./_baseIsNative'),\n getValue = require('./_getValue');\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\nmodule.exports = getNative;\n","var overArg = require('./_overArg');\n\n/** Built-in value references. */\nvar getPrototype = overArg(Object.getPrototypeOf, Object);\n\nmodule.exports = getPrototype;\n","var Symbol = require('./_Symbol');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nmodule.exports = getRawTag;\n","var arrayFilter = require('./_arrayFilter'),\n stubArray = require('./stubArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n if (object == null) {\n return [];\n }\n object = Object(object);\n return arrayFilter(nativeGetSymbols(object), function(symbol) {\n return propertyIsEnumerable.call(object, symbol);\n });\n};\n\nmodule.exports = getSymbols;\n","var arrayPush = require('./_arrayPush'),\n getPrototype = require('./_getPrototype'),\n getSymbols = require('./_getSymbols'),\n stubArray = require('./stubArray');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own and inherited enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {\n var result = [];\n while (object) {\n arrayPush(result, getSymbols(object));\n object = getPrototype(object);\n }\n return result;\n};\n\nmodule.exports = getSymbolsIn;\n","var DataView = require('./_DataView'),\n Map = require('./_Map'),\n Promise = require('./_Promise'),\n Set = require('./_Set'),\n WeakMap = require('./_WeakMap'),\n baseGetTag = require('./_baseGetTag'),\n toSource = require('./_toSource');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n setTag = '[object Set]',\n weakMapTag = '[object WeakMap]';\n\nvar dataViewTag = '[object DataView]';\n\n/** Used to detect maps, sets, and weakmaps. */\nvar dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nvar getTag = baseGetTag;\n\n// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\nif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = baseGetTag(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : '';\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n}\n\nmodule.exports = getTag;\n","/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\nmodule.exports = getValue;\n","var nativeCreate = require('./_nativeCreate');\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n}\n\nmodule.exports = hashClear;\n","/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = hashDelete;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\nmodule.exports = hashGet;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\nmodule.exports = hashHas;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\nmodule.exports = hashSet;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Initializes an array clone.\n *\n * @private\n * @param {Array} array The array to clone.\n * @returns {Array} Returns the initialized clone.\n */\nfunction initCloneArray(array) {\n var length = array.length,\n result = new array.constructor(length);\n\n // Add properties assigned by `RegExp#exec`.\n if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {\n result.index = array.index;\n result.input = array.input;\n }\n return result;\n}\n\nmodule.exports = initCloneArray;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer'),\n cloneDataView = require('./_cloneDataView'),\n cloneRegExp = require('./_cloneRegExp'),\n cloneSymbol = require('./_cloneSymbol'),\n cloneTypedArray = require('./_cloneTypedArray');\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/**\n * Initializes an object clone based on its `toStringTag`.\n *\n * **Note:** This function only supports cloning values with tags of\n * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.\n *\n * @private\n * @param {Object} object The object to clone.\n * @param {string} tag The `toStringTag` of the object to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneByTag(object, tag, isDeep) {\n var Ctor = object.constructor;\n switch (tag) {\n case arrayBufferTag:\n return cloneArrayBuffer(object);\n\n case boolTag:\n case dateTag:\n return new Ctor(+object);\n\n case dataViewTag:\n return cloneDataView(object, isDeep);\n\n case float32Tag: case float64Tag:\n case int8Tag: case int16Tag: case int32Tag:\n case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:\n return cloneTypedArray(object, isDeep);\n\n case mapTag:\n return new Ctor;\n\n case numberTag:\n case stringTag:\n return new Ctor(object);\n\n case regexpTag:\n return cloneRegExp(object);\n\n case setTag:\n return new Ctor;\n\n case symbolTag:\n return cloneSymbol(object);\n }\n}\n\nmodule.exports = initCloneByTag;\n","var baseCreate = require('./_baseCreate'),\n getPrototype = require('./_getPrototype'),\n isPrototype = require('./_isPrototype');\n\n/**\n * Initializes an object clone.\n *\n * @private\n * @param {Object} object The object to clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneObject(object) {\n return (typeof object.constructor == 'function' && !isPrototype(object))\n ? baseCreate(getPrototype(object))\n : {};\n}\n\nmodule.exports = initCloneObject;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n var type = typeof value;\n length = length == null ? MAX_SAFE_INTEGER : length;\n\n return !!length &&\n (type == 'number' ||\n (type != 'symbol' && reIsUint.test(value))) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\nmodule.exports = isIndex;\n","/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\nmodule.exports = isKeyable;\n","var coreJsData = require('./_coreJsData');\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\nmodule.exports = isMasked;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\nmodule.exports = isPrototype;\n","/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n}\n\nmodule.exports = listCacheClear;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype;\n\n/** Built-in value references. */\nvar splice = arrayProto.splice;\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n}\n\nmodule.exports = listCacheDelete;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\nmodule.exports = listCacheGet;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\nmodule.exports = listCacheHas;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\nmodule.exports = listCacheSet;\n","var Hash = require('./_Hash'),\n ListCache = require('./_ListCache'),\n Map = require('./_Map');\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\nmodule.exports = mapCacheClear;\n","var getMapData = require('./_getMapData');\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = mapCacheDelete;\n","var getMapData = require('./_getMapData');\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\nmodule.exports = mapCacheGet;\n","var getMapData = require('./_getMapData');\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\nmodule.exports = mapCacheHas;\n","var getMapData = require('./_getMapData');\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n}\n\nmodule.exports = mapCacheSet;\n","/**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\nfunction mapToArray(map) {\n var index = -1,\n result = Array(map.size);\n\n map.forEach(function(value, key) {\n result[++index] = [key, value];\n });\n return result;\n}\n\nmodule.exports = mapToArray;\n","var getNative = require('./_getNative');\n\n/* Built-in method references that are verified to be native. */\nvar nativeCreate = getNative(Object, 'create');\n\nmodule.exports = nativeCreate;\n","var overArg = require('./_overArg');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeKeys = overArg(Object.keys, Object);\n\nmodule.exports = nativeKeys;\n","/**\n * This function is like\n * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * except that it includes inherited enumerable properties.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction nativeKeysIn(object) {\n var result = [];\n if (object != null) {\n for (var key in Object(object)) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = nativeKeysIn;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n try {\n // Use `util.types` for Node.js 10+.\n var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n if (types) {\n return types;\n }\n\n // Legacy `process.binding('util')` for Node.js < 10.\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n}());\n\nmodule.exports = nodeUtil;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n","/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\nmodule.exports = overArg;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n","/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\nfunction setCacheAdd(value) {\n this.__data__.set(value, HASH_UNDEFINED);\n return this;\n}\n\nmodule.exports = setCacheAdd;\n","/**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\nfunction setCacheHas(value) {\n return this.__data__.has(value);\n}\n\nmodule.exports = setCacheHas;\n","/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\nfunction setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n}\n\nmodule.exports = setToArray;\n","var ListCache = require('./_ListCache');\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}\n\nmodule.exports = stackClear;\n","/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n var data = this.__data__,\n result = data['delete'](key);\n\n this.size = data.size;\n return result;\n}\n\nmodule.exports = stackDelete;\n","/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n return this.__data__.get(key);\n}\n\nmodule.exports = stackGet;\n","/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n return this.__data__.has(key);\n}\n\nmodule.exports = stackHas;\n","var ListCache = require('./_ListCache'),\n Map = require('./_Map'),\n MapCache = require('./_MapCache');\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n var data = this.__data__;\n if (data instanceof ListCache) {\n var pairs = data.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n this.size = ++data.size;\n return this;\n }\n data = this.__data__ = new MapCache(pairs);\n }\n data.set(key, value);\n this.size = data.size;\n return this;\n}\n\nmodule.exports = stackSet;\n","/** Used for built-in method references. */\nvar funcProto = Function.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\nmodule.exports = toSource;\n","var baseClone = require('./_baseClone');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_SYMBOLS_FLAG = 4;\n\n/**\n * This method is like `_.clone` except that it recursively clones `value`.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Lang\n * @param {*} value The value to recursively clone.\n * @returns {*} Returns the deep cloned value.\n * @see _.clone\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var deep = _.cloneDeep(objects);\n * console.log(deep[0] === objects[0]);\n * // => false\n */\nfunction cloneDeep(value) {\n return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);\n}\n\nmodule.exports = cloneDeep;\n","/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\nmodule.exports = eq;\n","var baseIsArguments = require('./_baseIsArguments'),\n isObjectLike = require('./isObjectLike');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n};\n\nmodule.exports = isArguments;\n","/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\nmodule.exports = isArray;\n","var isFunction = require('./isFunction'),\n isLength = require('./isLength');\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\nmodule.exports = isArrayLike;\n","var root = require('./_root'),\n stubFalse = require('./stubFalse');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\nmodule.exports = isBuffer;\n","var baseIsEqual = require('./_baseIsEqual');\n\n/**\n * Performs a deep comparison between two values to determine if they are\n * equivalent.\n *\n * **Note:** This method supports comparing arrays, array buffers, booleans,\n * date objects, error objects, maps, numbers, `Object` objects, regexes,\n * sets, strings, symbols, and typed arrays. `Object` objects are compared\n * by their own, not inherited, enumerable properties. Functions and DOM\n * nodes are compared by strict equality, i.e. `===`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.isEqual(object, other);\n * // => true\n *\n * object === other;\n * // => false\n */\nfunction isEqual(value, other) {\n return baseIsEqual(value, other);\n}\n\nmodule.exports = isEqual;\n","var baseGetTag = require('./_baseGetTag'),\n isObject = require('./isObject');\n\n/** `Object#toString` result references. */\nvar asyncTag = '[object AsyncFunction]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n proxyTag = '[object Proxy]';\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\nmodule.exports = isFunction;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\nmodule.exports = isLength;\n","var baseIsMap = require('./_baseIsMap'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsMap = nodeUtil && nodeUtil.isMap;\n\n/**\n * Checks if `value` is classified as a `Map` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n * @example\n *\n * _.isMap(new Map);\n * // => true\n *\n * _.isMap(new WeakMap);\n * // => false\n */\nvar isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;\n\nmodule.exports = isMap;\n","/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n","var baseIsSet = require('./_baseIsSet'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsSet = nodeUtil && nodeUtil.isSet;\n\n/**\n * Checks if `value` is classified as a `Set` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n * @example\n *\n * _.isSet(new Set);\n * // => true\n *\n * _.isSet(new WeakSet);\n * // => false\n */\nvar isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;\n\nmodule.exports = isSet;\n","var baseIsTypedArray = require('./_baseIsTypedArray'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\nmodule.exports = isTypedArray;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeys = require('./_baseKeys'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\nmodule.exports = keys;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeysIn = require('./_baseKeysIn'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\nfunction keysIn(object) {\n return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n}\n\nmodule.exports = keysIn;\n","/**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\nfunction stubArray() {\n return [];\n}\n\nmodule.exports = stubArray;\n","/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n return false;\n}\n\nmodule.exports = stubFalse;\n","import type { AppIdentifier } from \"@finos/fdc3\";\nimport type OpenFin from \"@openfin/core\";\nimport type { PlatformApp, AppResolverResponse, AppResolverOptions } from \"../../shapes/app-shapes\";\nimport type { Logger } from \"../../shapes/logger-shapes\";\nimport { getApps, launch } from \"./apps\";\n\n/**\n * An App Resolver Used for resolving app selection.\n */\nexport class AppResolverHelper {\n\tprivate readonly _logger: Logger;\n\n\tprivate readonly _appResolverOptions?: AppResolverOptions;\n\n\tprivate readonly _defaultAppResolverHeight: number;\n\n\tprivate readonly _defaultAppResolverWidth: number;\n\n\tprivate readonly _dialogElement: HTMLDialogElement | null = null;\n\n\tprivate _dialogClient: OpenFin.ChannelClient | null = null;\n\n\t/**\n\t * Create an instance of the Intent Resolver Helper.\n\t * @param appResolverOptions options for the helper\n\t * @param logger the logger to use.\n\t */\n\tconstructor(appResolverOptions: AppResolverOptions, logger: Logger) {\n\t\tthis._defaultAppResolverHeight = 715;\n\t\tthis._defaultAppResolverWidth = 665;\n\t\tthis._appResolverOptions = {\n\t\t\theight: this._defaultAppResolverHeight,\n\t\t\twidth: this._defaultAppResolverWidth,\n\t\t\t...appResolverOptions\n\t\t};\n\t\tthis._logger = logger;\n\t\tthis._dialogElement = document.createElement(\"dialog\");\n\t\tthis._dialogElement.id = \"app-resolver-dialog\";\n\t\tthis._dialogElement.style.height = `${this._appResolverOptions.height}px`;\n\t\tthis._dialogElement.style.width = `${this._appResolverOptions.width}px`;\n\t\tthis._dialogElement.style.padding = \"0px\";\n\t\tthis._dialogElement.style.backgroundColor = \"var(--brand-background)\";\n\t\t// Create a new iframe element\n\t\tconst appPicker = document.createElement(\"iframe\");\n\n\t\t// Set the source of the iframe\n\t\tappPicker.src = appResolverOptions.url;\n\t\tappPicker.style.height = \"99%\";\n\t\tappPicker.style.width = \"100%\";\n\n\t\t// Append the iframe to the dialog\n\t\tthis._dialogElement.append(appPicker);\n\n\t\t// Append the dialog to the body\n\t\tdocument.body.append(this._dialogElement);\n\t}\n\n\t/**\n\t * Launch the app resolver.\n\t * @returns Nothing as it handles the display and hiding of the resolver.\n\t */\n\tpublic async launchAppResolver(): Promise {\n\t\tif (this._dialogElement) {\n\t\t\tthis._dialogElement.showModal();\n\t\t}\n\t\tif (!this._dialogClient && this._dialogClient === null) {\n\t\t\tconst appResolverChannel = \"app-resolver\";\n\t\t\tconsole.log(\"Connecting to picker\", appResolverChannel);\n\t\t\tthis._dialogClient = await fin.InterApplicationBus.Channel.connect(appResolverChannel);\n\n\t\t\t// eslint-disable-next-line @typescript-eslint/await-thenable\n\t\t\tawait this._dialogClient.register(\"app-resolver-response\", async (payload, sender) => {\n\t\t\t\tconst response = payload as {\n\t\t\t\t\tappResolverResponse?: AppResolverResponse;\n\t\t\t\t\terrorMessage?: string;\n\t\t\t\t\ttarget?: {\n\t\t\t\t\t\tlayout: boolean;\n\t\t\t\t\t};\n\t\t\t\t};\n\t\t\t\tthis._logger.info(\"Received app resolver message\", payload);\n\t\t\t\tif (response.errorMessage) {\n\t\t\t\t\tthis._logger.error(\"There was an error with the loaded App Resolver\", response.errorMessage);\n\t\t\t\t} else if (response.appResolverResponse === undefined) {\n\t\t\t\t\tthis._logger.info(\"App Resolver response is undefined. No app was selected.\");\n\t\t\t\t} else {\n\t\t\t\t\tthis._logger.info(\"The following app was selected: \", response.appResolverResponse);\n\t\t\t\t\tif (window.fdc3 !== undefined && response.target === undefined) {\n\t\t\t\t\t\tawait window.fdc3.open(response.appResolverResponse as AppIdentifier);\n\t\t\t\t\t} else if (response.appResolverResponse?.appId) {\n\t\t\t\t\t\tawait launch(response.appResolverResponse.appId, response.target);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (this._dialogElement) {\n\t\t\t\t\tthis._dialogElement.close();\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\tif (this._dialogElement && this._dialogClient) {\n\t\t\tconst apps: PlatformApp[] = await getApps();\n\t\t\tawait this._dialogClient.dispatch(\"resolve-app-request\", {\n\t\t\t\tcustomData: {\n\t\t\t\t\ttitle: this._appResolverOptions?.title,\n\t\t\t\t\tapps\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n}\n","import type { PlatformApp, PlatformAppIdentifier } from \"../../shapes/app-shapes\";\nimport type { PlatformLayoutSnapshot } from \"../../shapes/layout-shapes\";\nimport { isEmpty, randomUUID } from \"../../utils\";\nimport { getSettings } from \"../settings/settings\";\n\nlet cachedApps: PlatformApp[] | undefined;\n\n/**\n * The the app by its id.\n * @param appId The id of the requested app.\n * @returns The app if it was found.\n */\nexport async function getApp(appId: string): Promise {\n\tconst apps = await getApps();\n\tconst foundApp = apps.find(\n\t\t(app) => app.appId === appId || (app.type === \"web\" && app.details.url === appId)\n\t);\n\treturn foundApp;\n}\n\n/**\n * Get the list of applications and filter if requested.\n * @returns The list of application.\n */\nexport async function getApps(): Promise {\n\tif (cachedApps) {\n\t\treturn cachedApps;\n\t}\n\tconst settings = await getSettings();\n\tif (Array.isArray(settings?.platform?.app?.directory)) {\n\t\t// Fetch data from all URLs concurrently\n\t\tconst responses = await Promise.all(settings.platform.app.directory.map(async (url) => fetch(url)));\n\t\t// Parse the JSON from all responses\n\t\tconst appDirectories = await Promise.all(responses.map(async (response) => response.json()));\n\t\t// Combine all applications into a single array\n\t\tcachedApps = appDirectories.flatMap((appDirectory) => appDirectory.applications);\n\t\treturn cachedApps;\n\t}\n\tcachedApps = [];\n\treturn cachedApps;\n}\n\n/**\n * Launch an application in the way specified by its manifest type.\n * @param platformApp The application to launch or it's id.\n * @param target The target layout to launch the app in.\n * @param target.layout target the current layout\n * @returns Identifiers specific to the type of application launched.\n */\nexport async function launch(\n\tplatformApp: PlatformApp | string,\n\ttarget?: { layout: boolean }\n): Promise {\n\ttry {\n\t\tlet appToLaunch: PlatformApp | undefined;\n\t\tif (typeof platformApp === \"string\") {\n\t\t\tappToLaunch = await getApp(platformApp);\n\t\t} else {\n\t\t\tappToLaunch = platformApp;\n\t\t}\n\t\tif (!appToLaunch) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst name = `${appToLaunch.appId}/${randomUUID()}`;\n\t\tconst uuid = fin.me.identity.uuid;\n\t\tconst appId = appToLaunch.appId;\n\n\t\tif (target?.layout) {\n\t\t\tawait window?.fin?.Platform.Layout.getCurrentSync().addView({\n\t\t\t\tname,\n\t\t\t\turl: appToLaunch.details.url,\n\t\t\t\t// @ts-expect-error title will be exposed in the next release\n\t\t\t\ttitle: appToLaunch.title\n\t\t\t});\n\t\t} else {\n\t\t\tconst currentLayout = window.fin?.Platform.Layout.getCurrentLayoutManagerSync();\n\t\t\tconst layoutId = `tab-${randomUUID()}`;\n\t\t\tconst appSnapshot = getAppLayout(appToLaunch, layoutId, name);\n\t\t\tawait currentLayout?.applyLayoutSnapshot(appSnapshot);\n\t\t}\n\t\treturn [{ name, uuid, appId }];\n\t} catch (error) {\n\t\tconsole.error(\"Error launching app\", error);\n\t\treturn undefined;\n\t}\n}\n\n/**\n * Brings the targeted app to front.\n * @param platformApp The app to bring to front.\n * @param targets The list of apps to bring to front.\n */\nexport async function bringAppToFront(\n\tplatformApp: PlatformApp,\n\ttargets: PlatformAppIdentifier[]\n): Promise {\n\tconst currentLayout = window.fin?.Platform.Layout.getCurrentLayoutManagerSync();\n\tif (!isEmpty(currentLayout)) {\n\t\tfor (const target of targets) {\n\t\t\tconst targetLayout = currentLayout.getLayoutIdentityForView(target);\n\t\t\tif (targetLayout === undefined) {\n\t\t\t\tconsole.error(\"Target layout for view not found\");\n\t\t\t} else {\n\t\t\t\tawait currentLayout.showLayout(targetLayout);\n\t\t\t}\n\t\t}\n\t}\n}\n\n/**\n * Get the layout for the application.\n * @param platformApp The application to get the layout for.\n * @param layoutId The id of the layout to create for the app.\n * @param viewName The name of the view to create.\n * @returns The layout options.\n */\nfunction getAppLayout(platformApp: PlatformApp, layoutId: string, viewName: string): PlatformLayoutSnapshot {\n\tconst appSnapshot: PlatformLayoutSnapshot = {\n\t\tlayouts: {},\n\t\tlayoutTitles: {}\n\t};\n\tappSnapshot.layouts[layoutId] = {\n\t\tcontent: [\n\t\t\t{\n\t\t\t\ttype: \"row\",\n\t\t\t\tcontent: [\n\t\t\t\t\t{\n\t\t\t\t\t\ttype: \"column\",\n\t\t\t\t\t\twidth: 100,\n\t\t\t\t\t\tcontent: [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\ttype: \"stack\",\n\t\t\t\t\t\t\t\twidth: 50,\n\t\t\t\t\t\t\t\theight: 50,\n\t\t\t\t\t\t\t\tcontent: [\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\ttype: \"component\",\n\t\t\t\t\t\t\t\t\t\tcomponentName: \"view\",\n\t\t\t\t\t\t\t\t\t\tcomponentState: {\n\t\t\t\t\t\t\t\t\t\t\turl: platformApp.details.url,\n\t\t\t\t\t\t\t\t\t\t\tname: viewName\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\ttitle: platformApp.title\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t]\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t]\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t}\n\t\t]\n\t};\n\tappSnapshot.layoutTitles[layoutId] = platformApp.title ?? \"App Layout\";\n\treturn appSnapshot;\n}\n","import type OpenFin from \"@openfin/core\";\nimport type { PlatformApp } from \"../../shapes/app-shapes\";\nimport type { Logger } from \"../../shapes/logger-shapes\";\nimport { isEmpty } from \"../../utils\";\n\n/**\n * The AppIdHelper class provides helpful functions related to app ids.\n */\nexport class AppIdHelper {\n\tprivate readonly _validatedAppIds: string[] = [];\n\n\tprivate readonly _invalidAppIds: string[] = [];\n\n\tprivate readonly _appMap = new Map();\n\n\tprivate readonly _logger: Logger;\n\n\tprivate readonly _getApp: (appId: string) => Promise;\n\n\t/**\n\t * Provides helpful functions related to app ids.\n\t * @param getApp The function to use to get an app for validation.\n\t * @param logger The logger to use\n\t */\n\tconstructor(getApp: (appId: string) => Promise, logger: Logger) {\n\t\tthis._logger = logger;\n\t\tthis._getApp = getApp;\n\t}\n\n\t/**\n\t * Lookup an application identity.\n\t * @param clientIdentity The client identity to use.\n\t * @returns The application identity.\n\t */\n\tpublic async lookupAppId(clientIdentity: OpenFin.ClientIdentity): Promise {\n\t\tconst name: string = clientIdentity.name;\n\t\tlet appId: string | undefined;\n\t\tif (name.startsWith(\"internal-generated-\")) {\n\t\t\treturn;\n\t\t}\n\t\tconst nameParts = name.split(\"/\");\n\t\tif (nameParts.length === 1 || nameParts.length === 2) {\n\t\t\tappId = nameParts[0];\n\t\t} else {\n\t\t\tappId = `${nameParts[0]}/${nameParts[1]}`;\n\t\t}\n\n\t\tif (!isEmpty(appId)) {\n\t\t\tappId = await this.validateApp(appId);\n\t\t}\n\t\treturn appId;\n\t}\n\n\t/**\n\t * Validates the app id or url.\n\t * @param appId The id of the app if it has been determined.\n\t * @returns The validated app id or undefined if there is no match.\n\t */\n\tprivate async validateApp(appId: string): Promise {\n\t\tif (this._validatedAppIds.includes(appId)) {\n\t\t\treturn this._appMap.get(appId);\n\t\t}\n\t\tif (this._invalidAppIds.includes(appId)) {\n\t\t\treturn;\n\t\t}\n\t\t// perform a lookup to validate the appId\n\t\tconst app = await this._getApp(appId);\n\n\t\tif (!isEmpty(app)) {\n\t\t\tthis._validatedAppIds.push(appId);\n\t\t\tthis._appMap.set(appId, app.appId);\n\t\t\treturn app.appId;\n\t\t}\n\t\tthis._invalidAppIds.push(appId);\n\t\tthis._logger.warn(\n\t\t\t`AppId ${appId} does not exist in the directory and we do not have an unregistered app fallback. No app id will be returned as it is unconfirmed.`\n\t\t);\n\t}\n}\n","import type { AppIntents, PlatformApp, AppsForIntent } from \"../../shapes/app-shapes\";\nimport type { Logger } from \"../../shapes/logger-shapes\";\nimport { isEmpty } from \"../../utils\";\n\n/**\n * The App Intent Helper inspects app catalogs to discover supported intents and contexts.\n */\nexport class AppIntentHelper {\n\tprivate readonly _getApps: () => Promise;\n\n\tprivate readonly _logger: Logger;\n\n\t/**\n\t * Create an instance of the App Intent Helper.\n\t * @param getApps returns an array of Apps\n\t * @param logger the logger to use.\n\t */\n\tconstructor(getApps: () => Promise, logger: Logger) {\n\t\tthis._getApps = getApps;\n\t\tthis._logger = logger;\n\t}\n\n\t/**\n\t * Get the application that support the requested intent.\n\t * @param intent The intent the application must support.\n\t * @returns The list of application that support the intent.\n\t */\n\tpublic async getAppsByIntent(intent: string): Promise {\n\t\tconst apps = await this._getApps();\n\t\treturn apps.filter((app) => {\n\t\t\tconst listensFor = app.interop?.intents?.listensFor;\n\n\t\t\tif (isEmpty(listensFor)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tconst intentNames = Object.keys(listensFor);\n\t\t\tfor (const intentName of intentNames) {\n\t\t\t\tif (intentName.toLowerCase() === intent.toLowerCase()) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t});\n\t}\n\n\t/**\n\t * Get an intent and the apps that support it.\n\t * @param intent The intent to look for.\n\t * @param contextType Optional context type to look for.\n\t * @param resultType Optional result type to look for.\n\t * @returns The intent and its supporting apps if found.\n\t */\n\tpublic async getIntent(\n\t\tintent: string,\n\t\tcontextType?: string,\n\t\tresultType?: string\n\t): Promise {\n\t\tconst apps = await this._getApps();\n\n\t\tif (apps.length === 0) {\n\t\t\tthis._logger.warn(\"There was no apps returned so we are unable to find apps that support an intent\");\n\t\t\treturn;\n\t\t}\n\n\t\tconst intentsMap: { [key: string]: AppsForIntent } = {};\n\n\t\tfor (const app of apps) {\n\t\t\tif (app.interop?.intents?.listensFor && !isEmpty(app.interop.intents.listensFor[intent])) {\n\t\t\t\tconst appIntent = app.interop.intents.listensFor[intent];\n\t\t\t\tconst include = this.appIntentContains(appIntent, contextType, resultType);\n\t\t\t\tif (include) {\n\t\t\t\t\t// re-use approach used by getting intents by context for the context map although this will only have one\n\t\t\t\t\tthis.updateAppIntentsMap(intentsMap, intent, appIntent.displayName, app);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tconst results = Object.values(intentsMap);\n\t\tif (results.length === 0) {\n\t\t\tthis._logger.info(\n\t\t\t\t`No results found for findIntent for intent ${intent} and context ${contextType} and resultType ${resultType}`\n\t\t\t);\n\t\t\treturn;\n\t\t} else if (results.length === 1) {\n\t\t\treturn results[0];\n\t\t}\n\n\t\tthis._logger.warn(\n\t\t\t`Received more than one result for findIntent for intent ${intent} and context ${contextType} and resultType ${resultType}. Returning the first entry.`\n\t\t);\n\t\treturn results[0];\n\t}\n\n\t/**\n\t * Get the apps that support intents by the context type.\n\t * @param contextType The context type the app must support.\n\t * @param resultType The optional result type to match as well.\n\t * @returns The apps for the specified intent.\n\t */\n\tpublic async getIntentsByContext(contextType: string, resultType?: string): Promise {\n\t\tconst apps = await this._getApps();\n\n\t\tif (apps.length === 0) {\n\t\t\tthis._logger.warn(\n\t\t\t\t\"Unable to get apps so we can not get apps and intents that support a particular context\"\n\t\t\t);\n\t\t\treturn [];\n\t\t}\n\n\t\tconst intents: { [key: string]: AppsForIntent } = {};\n\n\t\tfor (const app of apps) {\n\t\t\tconst listensFor = app.interop?.intents?.listensFor;\n\n\t\t\tif (!isEmpty(listensFor)) {\n\t\t\t\tconst supportedIntents = Object.keys(listensFor);\n\t\t\t\tfor (const supportedIntent of supportedIntents) {\n\t\t\t\t\tconst appIntent = listensFor[supportedIntent];\n\t\t\t\t\tconst include = this.appIntentContains(appIntent, contextType, resultType);\n\t\t\t\t\tif (include) {\n\t\t\t\t\t\tthis.updateAppIntentsMap(intents, supportedIntent, appIntent.displayName, app);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn Object.values(intents);\n\t}\n\n\t/**\n\t * Check to see if the supplied appIntent supports the context and result types.\n\t * @param appIntent The app intent to check.\n\t * @param contextType The optional context type to look for.\n\t * @param resultType The optional result type to look for.\n\t * @returns True if the app intent matches.\n\t */\n\tprivate appIntentContains(\n\t\tappIntent: AppIntents,\n\t\tcontextType: string | undefined,\n\t\tresultType: string | undefined\n\t): boolean {\n\t\tif (!isEmpty(contextType) && !isEmpty(resultType)) {\n\t\t\tif (!appIntent?.contexts?.includes(contextType) || !appIntent.resultType?.includes(resultType)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} else if (!isEmpty(contextType) && !appIntent?.contexts?.includes(contextType)) {\n\t\t\treturn false;\n\t\t} else if (!isEmpty(resultType) && !appIntent?.resultType?.includes(resultType)) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}\n\n\t/**\n\t * Update the map containing the intent to apps.\n\t * @param intentsMap The map to update.\n\t * @param name The name of the intent.\n\t * @param displayName The Options display name to update with.\n\t * @param app The application to update.\n\t */\n\tprivate updateAppIntentsMap(\n\t\tintentsMap: {\n\t\t\t[key: string]: AppsForIntent;\n\t\t},\n\t\tname: string,\n\t\tdisplayName: string | undefined,\n\t\tapp: PlatformApp\n\t): void {\n\t\tif (isEmpty(intentsMap[name])) {\n\t\t\t// in a production app you would either need to ensure that every app was populated with the same name & displayName for an intent from a golden source (e.g. intents table) so picking the first entry wouldn't make a difference.\n\t\t\t// or you could pull in a golden source of intents from a service and then do a lookup using the intent name to get an object with intent name and official display name.\n\t\t\tintentsMap[name] = {\n\t\t\t\tintent: {\n\t\t\t\t\tname,\n\t\t\t\t\tdisplayName\n\t\t\t\t},\n\t\t\t\tapps: []\n\t\t\t};\n\t\t}\n\t\tintentsMap[name].apps.push(app);\n\t}\n}\n","import type { AppIdentifier, AppMetadata } from \"@finos/fdc3\";\nimport type { PlatformApp } from \"../../shapes/app-shapes\";\n\n/**\n * Gets app meta data in the right format based on the version.\n * @param apps the apps to get the meta data for.\n * @param findInstances the function to find the instances of an app so you can add them to the meta data.\n * @returns the app meta data.\n */\nexport async function getAppsMetaData(\n\tapps: PlatformApp[],\n\tfindInstances: (appId: string) => Promise\n): Promise {\n\tconst appsMetaData: AppMetadata[] = [];\n\n\tfor (const app of apps) {\n\t\tconst appData = mapToAppMetaData(app);\n\t\tconst instances = await findInstances(app.appId);\n\t\tappsMetaData.push(appData);\n\t\tfor (const instance of instances) {\n\t\t\tconst instanceAppEntry = { ...appData, instanceId: instance.instanceId };\n\t\t\tappsMetaData.push(instanceAppEntry);\n\t\t}\n\t}\n\treturn appsMetaData;\n}\n\n/**\n * Map the platform app to app metadata.\n * @param app The application to map.\n * @param resultType The result type to include in the data.\n * @returns The app metadata.\n */\nexport function mapToAppMetaData(app: PlatformApp, resultType?: string): AppMetadata {\n\tconst appMetaData: AppMetadata = {\n\t\tappId: app.appId,\n\t\tdescription: app.description,\n\t\ticons: app.icons,\n\t\tname: app.name,\n\t\tscreenshots: app.screenshots,\n\t\ttitle: app.title,\n\t\ttooltip: app.tooltip,\n\t\tversion: app.version,\n\t\tresultType\n\t};\n\treturn appMetaData;\n}\n","import type { AppIdentifier } from \"@finos/fdc3\";\nimport type OpenFin from \"@openfin/core\";\nimport type {\n\tIntentRegistrationEntry,\n\tContextRegistrationEntry,\n\tBrokerClientConnection,\n\tIntentRegistrationPayload,\n\tCaptureApiPayload,\n\tApiMetadata\n} from \"../../shapes/interopbroker-shapes\";\nimport type { Logger } from \"../../shapes/logger-shapes\";\nimport { isEmpty, isStringValue } from \"../../utils\";\nimport { OPEN_ERROR as OpenError, RESOLVE_ERROR as ResolveError } from \"./fdc3-errors\";\n\n/**\n * Used to track client interactions with a broker.\n */\nexport class ClientRegistrationHelper {\n\tprivate readonly _logger: Logger;\n\n\tprivate readonly _lookupAppId: (clientIdentity: OpenFin.ClientIdentity) => Promise;\n\n\tprivate readonly _clientReadyRequests: { [key: string]: (instanceId: string) => void };\n\n\tprivate readonly _trackedClientConnections: { [key: string]: BrokerClientConnection };\n\n\tprivate readonly _trackedContextHandlers: { [key: string]: ContextRegistrationEntry[] };\n\n\tprivate readonly _trackedIntentHandlers: { [key: string]: IntentRegistrationEntry[] };\n\n\t/**\n\t * Create an instance of the Client Registration Helper.\n\t * @param lookupAppId determine appId based on clientIdentity\n\t * @param logger the logger to use.\n\t */\n\tconstructor(\n\t\tlookupAppId: (clientIdentity: OpenFin.ClientIdentity) => Promise,\n\t\tlogger: Logger\n\t) {\n\t\tthis._logger = logger;\n\t\tthis._lookupAppId = lookupAppId;\n\t\tthis._clientReadyRequests = {};\n\t\tthis._trackedClientConnections = {};\n\t\tthis._trackedContextHandlers = {};\n\t\tthis._trackedIntentHandlers = {};\n\t}\n\n\t/**\n\t * The client has disconnected form the broker.\n\t * @param clientIdentity The identity of the client that disconnected.\n\t */\n\tpublic async clientDisconnected(clientIdentity: OpenFin.ClientIdentity): Promise {\n\t\tthis._logger.info(\"Client Disconnected.\", clientIdentity);\n\n\t\tfor (const [key, value] of Object.entries(this._trackedIntentHandlers)) {\n\t\t\tthis._trackedIntentHandlers[key] = value.filter(\n\t\t\t\t(entry) => entry.clientIdentity.endpointId !== clientIdentity.endpointId\n\t\t\t);\n\t\t}\n\n\t\tfor (const [key, value] of Object.entries(this._trackedContextHandlers)) {\n\t\t\tthis._trackedContextHandlers[key] = value.filter(\n\t\t\t\t(entry) => entry.clientIdentity.endpointId !== clientIdentity.endpointId\n\t\t\t);\n\t\t}\n\t\tthis.removeTrackedClientConnection(clientIdentity);\n\t}\n\n\t/**\n\t * Handle an intent handler being registered.\n\t * @param payload The payload.\n\t * @param clientIdentity The client identity.\n\t * @returns Nothing.\n\t */\n\tpublic async intentHandlerRegistered(\n\t\tpayload: IntentRegistrationPayload,\n\t\tclientIdentity: OpenFin.ClientIdentity\n\t): Promise {\n\t\tthis._logger.info(\"intentHandlerRegistered:\", payload, clientIdentity);\n\t\tif (!isEmpty(payload)) {\n\t\t\tconst intentName: string = payload.handlerId.replace(\"intent-handler-\", \"\");\n\n\t\t\tlet trackedIntentHandler = this._trackedIntentHandlers[intentName];\n\n\t\t\tif (isEmpty(trackedIntentHandler)) {\n\t\t\t\ttrackedIntentHandler = [];\n\t\t\t\tthis._trackedIntentHandlers[intentName] = trackedIntentHandler;\n\t\t\t}\n\n\t\t\tconst trackedHandler = this._trackedIntentHandlers[intentName].find(\n\t\t\t\t(entry) => entry.clientIdentity.endpointId === clientIdentity.endpointId\n\t\t\t);\n\n\t\t\tif (isEmpty(trackedHandler)) {\n\t\t\t\tthis._logger.info(\n\t\t\t\t\t`intentHandler endpoint not registered. Registering ${clientIdentity.endpointId} against intent ${intentName} and looking up app name.`\n\t\t\t\t);\n\t\t\t\tconst appId = await this._lookupAppId(clientIdentity);\n\n\t\t\t\tif (isEmpty(appId)) {\n\t\t\t\t\tthis._logger.warn(\n\t\t\t\t\t\t\"Unable to determine app id based on name. This app will not be tracked via intent handler registration.\"\n\t\t\t\t\t);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tthis._trackedIntentHandlers[intentName].push({\n\t\t\t\t\tfdc3Version: payload.fdc3Version,\n\t\t\t\t\tclientIdentity,\n\t\t\t\t\tappId\n\t\t\t\t});\n\t\t\t\tthis._logger.info(\n\t\t\t\t\t`intentHandler endpoint: ${clientIdentity.endpointId} registered against intent: ${intentName} and app Id: ${appId}.`\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tconst clientReadyKey = this.getClientReadyKey(clientIdentity, \"intent\", intentName);\n\t\t\tif (!isEmpty(this._clientReadyRequests[clientReadyKey])) {\n\t\t\t\tthis._logger.info(\"Resolving client ready request.\");\n\t\t\t\tthis._clientReadyRequests[clientReadyKey](clientIdentity.endpointId);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * A context handler has been registered against the broker.\n\t * @param payload The payload from a context listener registration.\n\t * @param payload.contextType The context type that the client is listening for.\n\t * @param payload.handlerId The handler Id for this listener.\n\t * @param clientIdentity The identity of the application that is adding the context handler.\n\t */\n\tpublic async contextHandlerRegistered(\n\t\tpayload: { contextType: string | undefined; handlerId: string },\n\t\tclientIdentity: OpenFin.ClientIdentity\n\t): Promise {\n\t\tthis._logger.info(\"contextHandlerRegistered:\", payload, clientIdentity);\n\t\tif (!isEmpty(payload?.handlerId)) {\n\t\t\tconst contextTypeName: string = payload?.contextType ?? \"*\";\n\t\t\tconst handlerId = payload.handlerId;\n\t\t\tlet trackedContextHandler = this._trackedContextHandlers[contextTypeName];\n\n\t\t\tif (isEmpty(trackedContextHandler)) {\n\t\t\t\ttrackedContextHandler = [];\n\t\t\t\tthis._trackedContextHandlers[contextTypeName] = trackedContextHandler;\n\t\t\t}\n\n\t\t\tconst trackedHandler = this._trackedContextHandlers[contextTypeName].find(\n\t\t\t\t(entry) => entry.clientIdentity.endpointId === clientIdentity.endpointId\n\t\t\t);\n\n\t\t\tif (isEmpty(trackedHandler)) {\n\t\t\t\tthis._logger.info(\n\t\t\t\t\t`contextHandler endpoint not registered. Registering ${clientIdentity.endpointId} against context handler for context type ${contextTypeName} and looking up app name.`\n\t\t\t\t);\n\t\t\t\tconst appId = await this._lookupAppId(clientIdentity);\n\n\t\t\t\tif (isEmpty(appId)) {\n\t\t\t\t\tthis._logger.warn(\n\t\t\t\t\t\t\"Unable to determine app id based on name. This app will not be tracked via context handler registration.\"\n\t\t\t\t\t);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tthis._trackedContextHandlers[contextTypeName].push({\n\t\t\t\t\tclientIdentity,\n\t\t\t\t\tappId,\n\t\t\t\t\thandlerId\n\t\t\t\t});\n\t\t\t\tthis._logger.info(\n\t\t\t\t\t`contextHandler endpoint: ${clientIdentity.endpointId} registered against context type: ${contextTypeName} and app Id: ${appId}.`\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tconst clientReadyKey = this.getClientReadyKey(clientIdentity, \"context\", contextTypeName);\n\t\t\tif (!isEmpty(this._clientReadyRequests[clientReadyKey])) {\n\t\t\t\tthis._logger.info(\"Resolving client ready request.\");\n\t\t\t\tthis._clientReadyRequests[clientReadyKey](clientIdentity.endpointId);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Capture the connection and API version.\n\t * @param id The client identity to capture from.\n\t * @param payload The payload.\n\t */\n\tpublic async clientConnectionRegistered(\n\t\tid: OpenFin.ClientIdentity & { connectionUrl?: string; entityType?: string },\n\t\tpayload?: CaptureApiPayload\n\t): Promise {\n\t\tconst key = `${id.uuid}-${id.name}`;\n\t\tlet apiVersion: ApiMetadata = {\n\t\t\ttype: \"fdc3\",\n\t\t\tversion: \"2.0\"\n\t\t};\n\t\tif (isEmpty(this._trackedClientConnections[key])) {\n\t\t\tif (payload?.apiVersion) {\n\t\t\t\tconst payloadApiVersion = payload?.apiVersion;\n\t\t\t\tif (!isEmpty(payloadApiVersion) && !isEmpty(payloadApiVersion?.type)) {\n\t\t\t\t\tapiVersion = payloadApiVersion;\n\t\t\t\t} else if (isStringValue(id.connectionUrl)) {\n\t\t\t\t\t// if they haven't specified apiVersion meta data and it is external and has a url then we will assume fdc3 2.0\n\t\t\t\t\tapiVersion = { type: \"fdc3\", version: \"2.0\" };\n\t\t\t\t} else {\n\t\t\t\t\t// if a native app has specified a preference through apiVersion then we assume interop\n\t\t\t\t\tapiVersion = { type: \"interop\" };\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tconst entityType = id.entityType;\n\t\t\t\tif (!isEmpty(entityType)) {\n\t\t\t\t\tswitch (entityType) {\n\t\t\t\t\t\tdefault: {\n\t\t\t\t\t\t\tthis._logger.warn(\n\t\t\t\t\t\t\t\t`We currently do not check for entity types that are not views or windows. Entity type: ${entityType}`\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// console unable to find api version.\n\t\t\t\t\tapiVersion = {\n\t\t\t\t\t\ttype: \"fdc3\",\n\t\t\t\t\t\tversion: \"2.0\"\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t}\n\t\t\tconst brokerClientConnection: BrokerClientConnection = {\n\t\t\t\tclientIdentity: id,\n\t\t\t\tapiMetadata: apiVersion\n\t\t\t};\n\n\t\t\tthis._trackedClientConnections[key] = brokerClientConnection;\n\t\t\tconst clientReadyKey = this.getClientReadyKey(id, \"connection\");\n\t\t\tif (!isEmpty(this._clientReadyRequests[clientReadyKey])) {\n\t\t\t\tthis._logger.info(\"Resolving client ready request.\");\n\t\t\t\tthis._clientReadyRequests[clientReadyKey](id.endpointId);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Get a context handler that matches the context type name and instance id.\n\t * @param contextTypeName the name of the context the listener is registered for.\n\t * @param instanceId the instanceId you wish to check for.\n\t * @returns The ContextRegistrationEntry or undefined.\n\t */\n\tpublic getRegisteredContextHandler(\n\t\tcontextTypeName: string,\n\t\tinstanceId: string\n\t): ContextRegistrationEntry | undefined {\n\t\tconst trackedHandler = this._trackedContextHandlers[contextTypeName]?.find(\n\t\t\t(entry) => entry.clientIdentity.endpointId === instanceId\n\t\t);\n\t\treturn trackedHandler;\n\t}\n\n\t/**\n\t * Handle FDC3 find instances for app instances that have registered for an intent.\n\t * @param app The app identifier to find.\n\t * @param clientIdentity The client identity.\n\t * @param type the type of app instances you are after. CONNECTED = anything that has connected to the broker and INTENT means an APP that has registered an Intent Handler.\n\t * @returns The instance of the app.\n\t */\n\tpublic async findAppInstances(\n\t\tapp: AppIdentifier,\n\t\tclientIdentity: OpenFin.ClientIdentity,\n\t\ttype: \"connected\" | \"intent\" = \"connected\"\n\t): Promise {\n\t\tconst endpointApps: { [key: string]: AppIdentifier } = {};\n\n\t\tif (type === \"intent\") {\n\t\t\tfor (const [, value] of Object.entries(this._trackedIntentHandlers)) {\n\t\t\t\tconst entries = value.filter((entry) => entry.appId === app.appId);\n\t\t\t\tfor (const entry of entries) {\n\t\t\t\t\tendpointApps[entry.clientIdentity.endpointId] = {\n\t\t\t\t\t\tappId: entry.appId ?? \"\",\n\t\t\t\t\t\tinstanceId: entry.clientIdentity.endpointId\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn Object.values(endpointApps);\n\t\t}\n\n\t\tfor (const [, value] of Object.entries(this._trackedClientConnections)) {\n\t\t\tconst trackedAppId = await this._lookupAppId(value.clientIdentity);\n\t\t\tif (trackedAppId === app.appId && isEmpty(endpointApps[value.clientIdentity.endpointId])) {\n\t\t\t\tendpointApps[value.clientIdentity.endpointId] = {\n\t\t\t\t\tappId: app.appId ?? \"\",\n\t\t\t\t\tinstanceId: value.clientIdentity.endpointId\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\n\t\treturn Object.values(endpointApps);\n\t}\n\n\t/**\n\t * Get the api version for the identity.\n\t * @param id The identity to get the api version for.\n\t * @returns The api metadata.\n\t */\n\tpublic getApiVersion(id: OpenFin.Identity): ApiMetadata | undefined {\n\t\tconst key = `${id.uuid}-${id.name}`;\n\t\tconst apiVersion: ApiMetadata | undefined = this._trackedClientConnections[key]?.apiMetadata;\n\t\treturn apiVersion;\n\t}\n\n\t/**\n\t * Handle client ready event for opening and awaiting a connection to the broker.\n\t * @param identity The identity of the client.\n\t * @param timeout The timeout to wait for the client.\n\t * @returns The instance id.\n\t */\n\tpublic async onConnectionClientReady(identity: OpenFin.Identity, timeout: number = 15000): Promise {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tconst clientIdentity = this.getClientIdentity(identity);\n\t\t\tif (!isEmpty(clientIdentity)) {\n\t\t\t\tresolve(clientIdentity.endpointId);\n\t\t\t}\n\t\t\tconst key = this.getClientReadyKey(identity, \"connection\");\n\t\t\tconst timerId = setTimeout(() => {\n\t\t\t\tif (!isEmpty(this._clientReadyRequests[key])) {\n\t\t\t\t\tdelete this._clientReadyRequests[key];\n\t\t\t\t\treject(ResolveError.TargetInstanceUnavailable);\n\t\t\t\t}\n\t\t\t}, timeout);\n\t\t\tthis._clientReadyRequests[key] = (instanceId: string): void => {\n\t\t\t\tclearTimeout(timerId);\n\t\t\t\t// clear the callback asynchronously\n\t\t\t\tdelete this._clientReadyRequests[key];\n\t\t\t\tresolve(instanceId);\n\t\t\t};\n\t\t});\n\t}\n\n\t/**\n\t * Handle client ready event for intent handling.\n\t * @param identity The identity of the client.\n\t * @param intentName The intent name.\n\t * @param timeout The timeout to wait for the client.\n\t * @returns The instance id.\n\t */\n\tpublic async onIntentClientReady(\n\t\tidentity: OpenFin.Identity,\n\t\tintentName: string,\n\t\ttimeout: number = 15000\n\t): Promise {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tconst registeredHandlers = this._trackedIntentHandlers[intentName];\n\t\t\tlet existingInstanceId: string | undefined;\n\t\t\tif (!isEmpty(registeredHandlers)) {\n\t\t\t\tfor (const handler of registeredHandlers) {\n\t\t\t\t\tif (\n\t\t\t\t\t\thandler.clientIdentity.uuid === identity.uuid &&\n\t\t\t\t\t\thandler.clientIdentity.name === identity.name\n\t\t\t\t\t) {\n\t\t\t\t\t\texistingInstanceId = handler.clientIdentity.endpointId;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!isEmpty(existingInstanceId)) {\n\t\t\t\tresolve(existingInstanceId);\n\t\t\t}\n\t\t\tconst key = this.getClientReadyKey(identity, \"intent\", intentName);\n\t\t\tconst timerId = setTimeout(() => {\n\t\t\t\tif (!isEmpty(this._clientReadyRequests[key])) {\n\t\t\t\t\tdelete this._clientReadyRequests[key];\n\t\t\t\t\treject(ResolveError.IntentDeliveryFailed);\n\t\t\t\t}\n\t\t\t}, timeout);\n\t\t\tthis._clientReadyRequests[key] = (instanceId: string): void => {\n\t\t\t\tclearTimeout(timerId);\n\t\t\t\t// clear the callback asynchronously\n\t\t\t\tdelete this._clientReadyRequests[key];\n\t\t\t\tresolve(instanceId);\n\t\t\t};\n\t\t});\n\t}\n\n\t/**\n\t * Handle client ready event for context handling.\n\t * @param identity The identity of the client.\n\t * @param contextTypeName The contextType name.\n\t * @param timeout The timeout to wait for the client.\n\t * @returns The instance id.\n\t */\n\tpublic async onContextClientReady(\n\t\tidentity: OpenFin.Identity,\n\t\tcontextTypeName: string,\n\t\ttimeout: number = 15000\n\t): Promise {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tconst contextRegisteredHandlers = this._trackedContextHandlers[contextTypeName];\n\t\t\tconst globalRegisteredHandlers = this._trackedContextHandlers[\"*\"];\n\t\t\tlet existingContextHandlerInstanceId: string | undefined;\n\n\t\t\tif (!isEmpty(contextRegisteredHandlers)) {\n\t\t\t\tfor (const handler of contextRegisteredHandlers) {\n\t\t\t\t\tif (\n\t\t\t\t\t\thandler.clientIdentity.uuid === identity.uuid &&\n\t\t\t\t\t\thandler.clientIdentity.name === identity.name\n\t\t\t\t\t) {\n\t\t\t\t\t\texistingContextHandlerInstanceId = handler.clientIdentity.endpointId;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (!isEmpty(globalRegisteredHandlers) && !isEmpty(existingContextHandlerInstanceId)) {\n\t\t\t\tfor (const handler of globalRegisteredHandlers) {\n\t\t\t\t\tif (\n\t\t\t\t\t\thandler.clientIdentity.uuid === identity.uuid &&\n\t\t\t\t\t\thandler.clientIdentity.name === identity.name\n\t\t\t\t\t) {\n\t\t\t\t\t\texistingContextHandlerInstanceId = handler.clientIdentity.endpointId;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!isEmpty(existingContextHandlerInstanceId)) {\n\t\t\t\tresolve(existingContextHandlerInstanceId);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst contextKey = this.getClientReadyKey(identity, \"context\", contextTypeName);\n\t\t\tconst globalKey = this.getClientReadyKey(identity, \"context\", \"*\");\n\t\t\tconst timerId = setTimeout(() => {\n\t\t\t\tconst hasContextRequest = !isEmpty(this._clientReadyRequests[contextKey]);\n\t\t\t\tconst hasGlobalRequest = !isEmpty(this._clientReadyRequests[globalKey]);\n\n\t\t\t\tif (hasContextRequest || hasGlobalRequest) {\n\t\t\t\t\tdelete this._clientReadyRequests[contextKey];\n\t\t\t\t\tdelete this._clientReadyRequests[globalKey];\n\t\t\t\t\treject(OpenError.AppTimeout);\n\t\t\t\t}\n\t\t\t}, timeout);\n\t\t\tlet isResolved = false;\n\t\t\tthis._clientReadyRequests[contextKey] = (instanceId: string): void => {\n\t\t\t\tclearTimeout(timerId);\n\t\t\t\tif (!isResolved) {\n\t\t\t\t\tisResolved = true;\n\t\t\t\t\t// clear the callback asynchronously\n\t\t\t\t\tdelete this._clientReadyRequests[contextKey];\n\t\t\t\t\tdelete this._clientReadyRequests[globalKey];\n\t\t\t\t\tresolve(instanceId);\n\t\t\t\t}\n\t\t\t};\n\t\t\tthis._clientReadyRequests[globalKey] = (instanceId: string): void => {\n\t\t\t\tclearTimeout(timerId);\n\t\t\t\tif (!isResolved) {\n\t\t\t\t\tisResolved = true;\n\t\t\t\t\t// clear the callback asynchronously\n\t\t\t\t\tdelete this._clientReadyRequests[contextKey];\n\t\t\t\t\tdelete this._clientReadyRequests[globalKey];\n\t\t\t\t\tresolve(instanceId);\n\t\t\t\t}\n\t\t\t};\n\t\t});\n\t}\n\n\t/**\n\t * Get the client identity given a standard identity.\n\t * @param id The identity to get the client identity for.\n\t * @returns The client identity if available.\n\t */\n\tprivate getClientIdentity(id: OpenFin.Identity): OpenFin.ClientIdentity | undefined {\n\t\tconst key = `${id.uuid}-${id.name}`;\n\t\tconst clientIdentity: OpenFin.ClientIdentity | undefined =\n\t\t\tthis._trackedClientConnections[key]?.clientIdentity;\n\t\treturn clientIdentity;\n\t}\n\n\t/**\n\t * Remove the tracking for the identity.\n\t * @param id The identity to remove the connection information for.\n\t */\n\tprivate removeTrackedClientConnection(id: OpenFin.Identity): void {\n\t\tconst key = `${id.uuid}-${id.name}`;\n\t\tdelete this._trackedClientConnections[key];\n\t}\n\n\t/**\n\t * Get a key that can be used for an identity and client.\n\t * @param identity The identity to use in the key.\n\t * @param type The type of ready event you are looking for\n\t * @param name The name of the type if required to use in the key\n\t * @returns The key.\n\t */\n\tprivate getClientReadyKey(\n\t\tidentity: OpenFin.Identity,\n\t\ttype: \"connection\" | \"context\" | \"intent\",\n\t\tname?: string\n\t): string {\n\t\tif (isEmpty(name)) {\n\t\t\treturn `${identity.uuid}/${identity.name}/${type}`;\n\t\t}\n\t\treturn `${identity.uuid}/${identity.name}/${type}/${name}`;\n\t}\n}\n","/** Constants representing the errors that can be encountered when calling the `open` method on the DesktopAgent object (`fdc3`). */\nexport const OPEN_ERROR = {\n\t/** Returned if the specified application is not found.*/\n\tAppNotFound: \"AppNotFound\",\n\t/** Returned if the specified application fails to launch correctly.*/\n\tErrorOnLaunch: \"ErrorOnLaunch\",\n\t/** Returned if the specified application launches but fails to add a context listener in order to receive the context passed to the `fdc3.open` call.*/\n\tAppTimeout: \"AppTimeout\",\n\t/** Returned if the FDC3 desktop agent implementation is not currently able to handle the request.*/\n\tResolverUnavailable: \"ResolverUnavailable\",\n\t/** Returned if a call to the `open` function is made with an invalid context argument. Contexts should be Objects with at least a `type` field that has a `string` value.*/\n\tMalformedContext: \"MalformedContext\"\n};\n/** Constants representing the errors that can be encountered when calling the `findIntent`, `findIntentsByContext`, `raiseIntent` or `raiseIntentForContext` methods on the DesktopAgent (`fdc3`). */\nexport const RESOLVE_ERROR = {\n\t/** SHOULD be returned if no apps are available that can resolve the intent and context combination.*/\n\tNoAppsFound: \"NoAppsFound\",\n\t/** Returned if the FDC3 desktop agent implementation is not currently able to handle the request.*/\n\tResolverUnavailable: \"ResolverUnavailable\",\n\t/** Returned if the user cancelled the resolution request, for example by closing or cancelling a resolver UI.*/\n\tUserCancelled: \"UserCancelledResolution\",\n\t/** SHOULD be returned if a timeout cancels an intent resolution that required user interaction. Please use `ResolverUnavailable` instead for situations where a resolver UI or similar fails.*/\n\tResolverTimeout: \"ResolverTimeout\",\n\t/** Returned if a specified target application is not available or a new instance of it cannot be opened. */\n\tTargetAppUnavailable: \"TargetAppUnavailable\",\n\t/** Returned if a specified target application instance is not available, for example because it has been closed. */\n\tTargetInstanceUnavailable: \"TargetInstanceUnavailable\",\n\t/** Returned if the intent and context could not be delivered to the selected application or instance, for example because it has not added an intent handler within a timeout.*/\n\tIntentDeliveryFailed: \"IntentDeliveryFailed\",\n\t/** Returned if a call to one of the `raiseIntent` functions is made with an invalid context argument. Contexts should be Objects with at least a `type` field that has a `string` value.*/\n\tMalformedContext: \"MalformedContext\"\n};\n","import type OpenFin from \"@openfin/core\";\nimport type { PlatformApp } from \"../../shapes/app-shapes\";\nimport type {\n\tIntentResolverResponse,\n\tIntentResolverOptions,\n\tAppIntent\n} from \"../../shapes/interopbroker-shapes\";\nimport type { Logger } from \"../../shapes/logger-shapes\";\n// import { formatError } from \"../../utils\";\nimport { RESOLVE_ERROR as ResolveError } from \"./fdc3-errors\";\n\n/**\n * An Intent Resolver Used for resolving intent selection.\n */\nexport class IntentResolverHelper {\n\tprivate readonly _logger: Logger;\n\n\tprivate readonly _intentResolverOptions?: IntentResolverOptions;\n\n\tprivate readonly _defaultIntentResolverHeight: number;\n\n\tprivate readonly _defaultIntentResolverWidth: number;\n\n\tprivate readonly _dialogElement: HTMLDialogElement | null = null;\n\n\tprivate _dialogClient: OpenFin.ChannelClient | null = null;\n\n\tprivate _resolveAppSelection: ((value: IntentResolverResponse) => void) | undefined;\n\n\tprivate _rejectAppSelection: ((reason?: string) => void) | undefined;\n\n\t/**\n\t * Create an instance of the Intent Resolver Helper.\n\t * @param intentResolverOptions options for the helper\n\t * @param logger the logger to use.\n\t */\n\tconstructor(intentResolverOptions: IntentResolverOptions, logger: Logger) {\n\t\tthis._defaultIntentResolverHeight = 715;\n\t\tthis._defaultIntentResolverWidth = 665;\n\t\tthis._intentResolverOptions = {\n\t\t\theight: this._defaultIntentResolverHeight,\n\t\t\twidth: this._defaultIntentResolverWidth,\n\t\t\tfdc3InteropApi: \"2.0\",\n\t\t\ttitle: \"Intent Resolver\",\n\t\t\t...intentResolverOptions\n\t\t};\n\t\tthis._logger = logger;\n\t\tthis._dialogElement = document.createElement(\"dialog\");\n\t\tthis._dialogElement.id = \"intent-resolver-dialog\";\n\t\tthis._dialogElement.style.height = `${this._intentResolverOptions.height}px`;\n\t\tthis._dialogElement.style.width = `${this._intentResolverOptions.width}px`;\n\t\tthis._dialogElement.style.padding = \"0px\";\n\t\tthis._dialogElement.style.backgroundColor = \"var(--brand-background)\";\n\t\t// Create a new iframe element\n\t\tconst intentPicker = document.createElement(\"iframe\");\n\n\t\t// Set the source of the iframe\n\t\tintentPicker.src = intentResolverOptions.url;\n\t\tintentPicker.style.height = \"99%\";\n\t\tintentPicker.style.width = \"100%\";\n\n\t\t// Append the iframe to the dialog\n\t\tthis._dialogElement.append(intentPicker);\n\n\t\t// Append the dialog to the body\n\t\tdocument.body.append(this._dialogElement);\n\t}\n\n\t/**\n\t * Launch the intent resolver.\n\t * @param launchOptions The options for launching the resolver.\n\t * @param launchOptions.apps The apps to pick from.\n\t * @param launchOptions.intent The intent to pick.\n\t * @param launchOptions.intents The intents to pick from.\n\t * @param clientIdentity The client that triggered this request.\n\t * @returns The response from the intent resolver.\n\t */\n\tpublic async launchIntentResolver(\n\t\tlaunchOptions: {\n\t\t\tapps?: PlatformApp[];\n\t\t\tintent?: Partial;\n\t\t\tintents?: { intent: Partial; apps: PlatformApp[] }[];\n\t\t},\n\t\tclientIdentity: OpenFin.ClientIdentity\n\t): Promise {\n\t\tif (this._dialogElement) {\n\t\t\tthis._dialogElement.showModal();\n\t\t}\n\t\tif (!this._dialogClient && this._dialogClient === null) {\n\t\t\tconst intentResolverChannel = \"intent-resolver\";\n\t\t\tconsole.log(\"Connecting to picker\", intentResolverChannel);\n\t\t\tthis._dialogClient = await fin.InterApplicationBus.Channel.connect(intentResolverChannel);\n\n\t\t\t// eslint-disable-next-line @typescript-eslint/await-thenable\n\t\t\tawait this._dialogClient.register(\"intent-resolver-response\", async (payload, sender) => {\n\t\t\t\tconst response = payload as {\n\t\t\t\t\tintentResolverResponse?: IntentResolverResponse;\n\t\t\t\t\terrorMessage?: string;\n\t\t\t\t};\n\t\t\t\tthis._logger.info(\"Received intent resolver message\", payload);\n\t\t\t\tif (this._rejectAppSelection === undefined || this._resolveAppSelection === undefined) {\n\t\t\t\t\tthis._logger.error(\"No resolve or reject function set for intent resolver\");\n\t\t\t\t} else if (response.errorMessage) {\n\t\t\t\t\tthis._rejectAppSelection(response.errorMessage);\n\t\t\t\t} else if (response.intentResolverResponse === undefined) {\n\t\t\t\t\tthis._rejectAppSelection(ResolveError.ResolverUnavailable);\n\t\t\t\t} else {\n\t\t\t\t\tthis._resolveAppSelection(response.intentResolverResponse);\n\t\t\t\t}\n\t\t\t\tif (this._dialogElement) {\n\t\t\t\t\tthis._dialogElement.close();\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\tif (this._dialogElement && this._dialogClient) {\n\t\t\tawait this._dialogClient.dispatch(\"resolve-intent-request\", {\n\t\t\t\tcustomData: {\n\t\t\t\t\ttitle: this._intentResolverOptions?.title,\n\t\t\t\t\tapps: launchOptions.apps,\n\t\t\t\t\tintent: launchOptions.intent,\n\t\t\t\t\tintents: launchOptions.intents\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tthis._resolveAppSelection = resolve;\n\t\t\tthis._rejectAppSelection = reject;\n\t\t});\n\t}\n}\n","import type {\n\tAppIdentifier,\n\tAppMetadata,\n\tContextMetadata,\n\tImplementationMetadata,\n\tIntentResolution\n} from \"@finos/fdc3\";\nimport type { OpenFin } from \"@openfin/core\";\nimport type {\n\tAppsForIntent,\n\tPlatformApp,\n\tPlatformAppIdentifier,\n\tPlatformAppIntents\n} from \"../../shapes/app-shapes\";\nimport type {\n\tCaptureApiPayload,\n\tIntentRegistrationPayload,\n\tIntentResolverResponse,\n\tIntentTargetMetaData,\n\tOpenOptions,\n\tPlatformInteropBrokerOptions\n} from \"../../shapes/interopbroker-shapes\";\nimport { formatError, isEmpty, isString, isStringValue, randomUUID } from \"../../utils\";\nimport { bringAppToFront, getApp, getApps, launch } from \"../apps/apps\";\nimport { AppIdHelper } from \"./app-id-helper\";\nimport { AppIntentHelper } from \"./app-intent-helper\";\nimport { getAppsMetaData, mapToAppMetaData } from \"./app-meta-data-helper\";\nimport { ClientRegistrationHelper } from \"./client-registration-helper\";\nimport { RESOLVE_ERROR as ResolveError, OPEN_ERROR as OpenError } from \"./fdc3-errors\";\nimport { IntentResolverHelper } from \"./intent-resolver-helper\";\n\n/**\n * Get the override constructor for the interop broker (useful if you wish this implementation to be layered with other implementations and passed to the platform's initialization object as part of an array).\n * @param options The options for the platform interop broker.\n * @returns The override constructor to be used in an array.\n */\nasync function constructorOverride(\n\toptions: PlatformInteropBrokerOptions\n): Promise> {\n\tconst logger = console;\n\treturn (Base: OpenFin.Constructor) =>\n\t\t/**\n\t\t * Extend the InteropBroker to handle intents.\n\t\t */\n\t\tclass InteropOverride extends Base {\n\t\t\tprivate readonly _openOptions?: OpenOptions;\n\n\t\t\tprivate readonly _appIntentHelper: AppIntentHelper;\n\n\t\t\tprivate readonly _clientRegistrationHelper: ClientRegistrationHelper;\n\n\t\t\tprivate readonly _intentResolverHelper?: IntentResolverHelper;\n\n\t\t\tprivate readonly _metadataKey: Readonly;\n\n\t\t\tprivate readonly _appIdHelper: AppIdHelper;\n\n\t\t\t/**\n\t\t\t * Create a new instance of InteropBroker.\n\t\t\t */\n\t\t\tconstructor() {\n\t\t\t\tsuper();\n\t\t\t\tlogger.info(\"Interop Broker Constructor applying settings.\");\n\t\t\t\tthis._appIntentHelper = new AppIntentHelper(getApps, logger);\n\t\t\t\tthis._metadataKey = `_metadata_${randomUUID()}`;\n\t\t\t\tif (options.intentResolver) {\n\t\t\t\t\tthis._intentResolverHelper = new IntentResolverHelper(options.intentResolver, logger);\n\t\t\t\t}\n\n\t\t\t\tthis._openOptions = options?.openOptions;\n\t\t\t\tthis._appIdHelper = new AppIdHelper(getApp, logger);\n\t\t\t\tthis._clientRegistrationHelper = new ClientRegistrationHelper(\n\t\t\t\t\tasync (clientIdentity: OpenFin.ClientIdentity) => this._appIdHelper.lookupAppId(clientIdentity),\n\t\t\t\t\tlogger\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Is the connection authorized.\n\t\t\t * @param id The id of the client identity to check.\n\t\t\t * @param payload The payload to send with the authorization check.\n\t\t\t * @returns True if the connection is authorized.\n\t\t\t */\n\t\t\tpublic async isConnectionAuthorized(id: OpenFin.ClientIdentity, payload?: unknown): Promise {\n\t\t\t\tconsole.log(\n\t\t\t\t\t\"Interop connection being made by the following identity. About to verify connection\",\n\t\t\t\t\tid\n\t\t\t\t);\n\t\t\t\tawait this._clientRegistrationHelper.clientConnectionRegistered(id, payload as CaptureApiPayload);\n\t\t\t\treturn super.isConnectionAuthorized(id, payload);\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Sets a context for the context group of the incoming current entity.\n\t\t\t * @param sentContext New context to set.\n\t\t\t * @param sentContext.context The context to send.\n\t\t\t * @param clientIdentity Identity of the client sender.\n\t\t\t */\n\t\t\tpublic async setContext(\n\t\t\t\tsentContext: { context: OpenFin.Context },\n\t\t\t\tclientIdentity: OpenFin.ClientIdentity\n\t\t\t): Promise {\n\t\t\t\tconsole.log(\"InteropOverride:Context being set by the following identity\", clientIdentity);\n\t\t\t\tconst contextMetadata = await this.getContextMetadata(clientIdentity);\n\n\t\t\t\tsentContext.context = {\n\t\t\t\t\t...sentContext.context,\n\t\t\t\t\t[this._metadataKey]: contextMetadata\n\t\t\t\t} as unknown as OpenFin.Context;\n\t\t\t\tsuper.setContext(sentContext, clientIdentity);\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Invokes the context handler.\n\t\t\t * @param clientIdentity The client identity.\n\t\t\t * @param handlerId The handler ID.\n\t\t\t * @param context The context to invoke.\n\t\t\t * @returns A promise that resolves when the context handler is invoked.\n\t\t\t */\n\t\t\tpublic async invokeContextHandler(\n\t\t\t\tclientIdentity: OpenFin.ClientIdentity,\n\t\t\t\thandlerId: string,\n\t\t\t\tcontext: OpenFin.Context\n\t\t\t): Promise {\n\t\t\t\tconst passedContext: { [key: string]: unknown } = { ...context };\n\t\t\t\tconst contextMetadata = passedContext[this._metadataKey];\n\t\t\t\tif (!isEmpty(contextMetadata)) {\n\t\t\t\t\tdelete passedContext[this._metadataKey];\n\t\t\t\t}\n\t\t\t\treturn super.invokeContextHandler(clientIdentity, handlerId, {\n\t\t\t\t\t...passedContext,\n\t\t\t\t\tcontextMetadata\n\t\t\t\t} as unknown as OpenFin.Context);\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Handle the information for intents by context.\n\t\t\t * @param contextOptions The context options.\n\t\t\t * @param clientIdentity The client.\n\t\t\t * @returns The intents mapped to app metadata.\n\t\t\t */\n\t\t\tpublic async handleInfoForIntentsByContext(\n\t\t\t\tcontextOptions: OpenFin.Context | OpenFin.FindIntentsByContextOptions,\n\t\t\t\tclientIdentity: OpenFin.ClientIdentity\n\t\t\t): Promise<\n\t\t\t\t{\n\t\t\t\t\tintent: { name: string; displayName?: string };\n\t\t\t\t\tapps: AppMetadata[];\n\t\t\t\t}[]\n\t\t\t> {\n\t\t\t\tconsole.log(\"InteropOverride:Handle Info For Intents By Context\", contextOptions, clientIdentity);\n\t\t\t\tlet requestedContextType: string;\n\t\t\t\tlet requestedResultType: string | undefined;\n\t\t\t\tlet request: { context: { type: string }; metadata: { resultType: string } };\n\n\t\t\t\tif (\"type\" in contextOptions) {\n\t\t\t\t\trequestedContextType = contextOptions.type;\n\t\t\t\t} else {\n\t\t\t\t\trequest = contextOptions as { context: { type: string }; metadata: { resultType: string } };\n\t\t\t\t\trequestedContextType = request.context.type;\n\t\t\t\t\trequestedResultType = request.metadata.resultType;\n\t\t\t\t}\n\t\t\t\tconst intents = await this._appIntentHelper.getIntentsByContext(\n\t\t\t\t\trequestedContextType,\n\t\t\t\t\trequestedResultType\n\t\t\t\t);\n\n\t\t\t\tif (intents.length === 0) {\n\t\t\t\t\tthrow new Error(ResolveError.NoAppsFound);\n\t\t\t\t}\n\n\t\t\t\tconst mappedIntents: {\n\t\t\t\t\tintent: { name: string; displayName?: string };\n\t\t\t\t\tapps: AppMetadata[];\n\t\t\t\t}[] = [];\n\n\t\t\t\tfor (const entry of intents) {\n\t\t\t\t\tconst appMetaData = await getAppsMetaData(entry.apps, async (appId: string) =>\n\t\t\t\t\t\tthis._clientRegistrationHelper.findAppInstances({ appId }, clientIdentity, \"intent\")\n\t\t\t\t\t);\n\t\t\t\t\tmappedIntents.push({ intent: entry.intent, apps: appMetaData });\n\t\t\t\t}\n\n\t\t\t\treturn mappedIntents;\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Handle the information for and intent.\n\t\t\t * @param intentOptions The intent options.\n\t\t\t * @param clientIdentity The client.\n\t\t\t * @returns The intents mapped to app metadata.\n\t\t\t */\n\t\t\tpublic async handleInfoForIntent(\n\t\t\t\tintentOptions: OpenFin.InfoForIntentOptions,\n\t\t\t\tclientIdentity: OpenFin.ClientIdentity\n\t\t\t): Promise<{\n\t\t\t\tintent: { name: string; displayName?: string };\n\t\t\t\tapps: AppMetadata[];\n\t\t\t}> {\n\t\t\t\tconsole.log(\"InteropOverride:Handle Info For Intents\", intentOptions, clientIdentity);\n\t\t\t\tlet contextType: string | undefined;\n\n\t\t\t\tconst optContextType = intentOptions?.context?.type;\n\t\t\t\tif (!isEmpty(optContextType) && optContextType !== \"fdc3.nothing\") {\n\t\t\t\t\tcontextType = optContextType;\n\t\t\t\t}\n\n\t\t\t\tconst result = await this._appIntentHelper.getIntent(\n\t\t\t\t\tintentOptions.name,\n\t\t\t\t\tcontextType,\n\t\t\t\t\tintentOptions?.metadata?.resultType\n\t\t\t\t);\n\t\t\t\tif (isEmpty(result)) {\n\t\t\t\t\tthrow new Error(ResolveError.NoAppsFound);\n\t\t\t\t}\n\t\t\t\tconst response = {\n\t\t\t\t\tintent: result.intent,\n\t\t\t\t\tapps: await getAppsMetaData(result.apps, async (appId: string) =>\n\t\t\t\t\t\tthis._clientRegistrationHelper.findAppInstances({ appId }, clientIdentity, \"intent\")\n\t\t\t\t\t)\n\t\t\t\t};\n\n\t\t\t\treturn response;\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Handle the fired intent for context.\n\t\t\t * @param contextForIntent The context for the intent.\n\t\t\t * @param contextForIntent.type The type of the intent.\n\t\t\t * @param contextForIntent.metadata The metadata for the intent.\n\t\t\t * @param clientIdentity The client identity.\n\t\t\t * @returns The intent resolution.\n\t\t\t */\n\t\t\tpublic async handleFiredIntentForContext(\n\t\t\t\tcontextForIntent: { type: string; metadata?: OpenFin.IntentMetadata },\n\t\t\t\tclientIdentity: OpenFin.ClientIdentity\n\t\t\t): Promise | { source: string; version?: string }> {\n\t\t\t\tconsole.log(\"InteropOverride:handleFiredIntentForContext fired.\", contextForIntent, clientIdentity);\n\t\t\t\tconst targetAppIdentifier = this.getApplicationIdentity(contextForIntent.metadata);\n\t\t\t\tconst intent: Partial = {\n\t\t\t\t\tcontext: contextForIntent\n\t\t\t\t};\n\n\t\t\t\tconst intentsForSelection: AppsForIntent[] = await this._appIntentHelper.getIntentsByContext(\n\t\t\t\t\tcontextForIntent.type\n\t\t\t\t);\n\n\t\t\t\t// app specified flow\n\t\t\t\tif (!isEmpty(targetAppIdentifier)) {\n\t\t\t\t\tconst targetApp = await getApp(targetAppIdentifier.appId);\n\n\t\t\t\t\tif (isEmpty(targetApp)) {\n\t\t\t\t\t\tthrow new Error(ResolveError.TargetAppUnavailable);\n\t\t\t\t\t}\n\t\t\t\t\tif (\n\t\t\t\t\t\t!targetApp?.interop?.intents?.listensFor ||\n\t\t\t\t\t\t!Object.values(targetApp.interop.intents.listensFor).some((listenedForIntent) =>\n\t\t\t\t\t\t\tlistenedForIntent.contexts.includes(contextForIntent.type)\n\t\t\t\t\t\t)\n\t\t\t\t\t) {\n\t\t\t\t\t\tthrow new Error(ResolveError.NoAppsFound);\n\t\t\t\t\t}\n\t\t\t\t\tconst intentResolver = await this.handleTargetedIntent(\n\t\t\t\t\t\ttargetAppIdentifier,\n\t\t\t\t\t\tintent as OpenFin.Intent,\n\t\t\t\t\t\ttrue,\n\t\t\t\t\t\tclientIdentity\n\t\t\t\t\t);\n\t\t\t\t\treturn intentResolver;\n\t\t\t\t}\n\n\t\t\t\tlet userSelection: IntentResolverResponse | undefined;\n\n\t\t\t\tif (intentsForSelection.length === 1) {\n\t\t\t\t\tconst intentForSelection = intentsForSelection[0];\n\t\t\t\t\t// only one intent matches the passed context\n\t\t\t\t\tintent.name = intentForSelection.intent.name;\n\t\t\t\t\tintent.displayName = intentForSelection.intent.displayName;\n\n\t\t\t\t\tif (intentForSelection.apps.length === 1) {\n\t\t\t\t\t\tconst appInstances = await this._clientRegistrationHelper.findAppInstances(\n\t\t\t\t\t\t\tintentForSelection.apps[0],\n\t\t\t\t\t\t\tclientIdentity,\n\t\t\t\t\t\t\t\"intent\"\n\t\t\t\t\t\t);\n\t\t\t\t\t\t// if there are no instances launch a new one otherwise present the choice to the user\n\t\t\t\t\t\t// by falling through to the next code block\n\t\t\t\t\t\tif (appInstances.length === 0 || this.createNewInstance(intentForSelection.apps[0])) {\n\t\t\t\t\t\t\tconst intentResolver = await this.launchAppWithIntent(\n\t\t\t\t\t\t\t\tintentForSelection.apps[0],\n\t\t\t\t\t\t\t\tintent as OpenFin.Intent,\n\t\t\t\t\t\t\t\tundefined,\n\t\t\t\t\t\t\t\tclientIdentity\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tif (isEmpty(intentResolver)) {\n\t\t\t\t\t\t\t\tthrow new Error(ResolveError.NoAppsFound);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn intentResolver;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tuserSelection = await this._intentResolverHelper?.launchIntentResolver(\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tapps: intentsForSelection[0].apps,\n\t\t\t\t\t\t\tintent\n\t\t\t\t\t\t},\n\t\t\t\t\t\tclientIdentity\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\tuserSelection = await this._intentResolverHelper?.launchIntentResolver(\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tintent,\n\t\t\t\t\t\t\tintents: intentsForSelection\n\t\t\t\t\t\t},\n\t\t\t\t\t\tclientIdentity\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\t// update intent with user selection\n\t\t\t\tif (isEmpty(userSelection)) {\n\t\t\t\t\tthrow new Error(ResolveError.ResolverUnavailable);\n\t\t\t\t}\n\t\t\t\tintent.displayName = userSelection.intent.displayName;\n\t\t\t\tintent.name = userSelection.intent.name;\n\t\t\t\tconst intentResolver = await this.handleIntentPickerSelection(\n\t\t\t\t\tuserSelection,\n\t\t\t\t\tintent as OpenFin.Intent,\n\t\t\t\t\tclientIdentity\n\t\t\t\t);\n\t\t\t\treturn intentResolver;\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Handle a fired intent.\n\t\t\t * @param intent The intent to handle.\n\t\t\t * @param clientIdentity The client identity.\n\t\t\t * @returns The intent resolution.\n\t\t\t */\n\t\t\tpublic async handleFiredIntent(\n\t\t\t\tintent: OpenFin.Intent>,\n\t\t\t\tclientIdentity: OpenFin.ClientIdentity\n\t\t\t): Promise | { source: string; version?: string }> {\n\t\t\t\tconsole.log(\"InteropOverride:handleFiredIntent: Received request for a raised intent\", intent);\n\t\t\t\tlogger.info(\"Received request for a raised intent\", intent);\n\t\t\t\tconst targetAppIdentifier = this.getApplicationIdentity(intent.metadata);\n\n\t\t\t\tconst matchedIntents = await this._appIntentHelper.getIntent(intent.name, intent?.context?.type);\n\t\t\t\tconst intentApps: PlatformApp[] = [];\n\n\t\t\t\tif (!isEmpty(matchedIntents)) {\n\t\t\t\t\tintentApps.push(...matchedIntents.apps);\n\t\t\t\t}\n\t\t\t\tif (!isEmpty(targetAppIdentifier)) {\n\t\t\t\t\tconst targetApp = await getApp(targetAppIdentifier.appId);\n\t\t\t\t\tif (isEmpty(targetApp)) {\n\t\t\t\t\t\tthrow new Error(ResolveError.TargetAppUnavailable);\n\t\t\t\t\t}\n\t\t\t\t\t// ensure that the specified app is one of the intent apps\n\t\t\t\t\tif (!intentApps.some((app) => app.appId === targetAppIdentifier.appId)) {\n\t\t\t\t\t\tthrow new Error(ResolveError.NoAppsFound);\n\t\t\t\t\t}\n\t\t\t\t\tconst intentResolver = await this.handleTargetedIntent(\n\t\t\t\t\t\ttargetAppIdentifier,\n\t\t\t\t\t\tintent,\n\t\t\t\t\t\tfalse,\n\t\t\t\t\t\tclientIdentity\n\t\t\t\t\t);\n\t\t\t\t\treturn intentResolver;\n\t\t\t\t}\n\n\t\t\t\tif (intentApps.length === 0) {\n\t\t\t\t\tlogger.info(\"No apps support this intent\");\n\t\t\t\t\tthrow new Error(ResolveError.NoAppsFound);\n\t\t\t\t}\n\n\t\t\t\tif (intentApps.length === 1) {\n\t\t\t\t\t// handle single entry\n\t\t\t\t\tconst appInstances = await this._clientRegistrationHelper.findAppInstances(\n\t\t\t\t\t\tintentApps[0],\n\t\t\t\t\t\tclientIdentity,\n\t\t\t\t\t\t\"intent\"\n\t\t\t\t\t);\n\t\t\t\t\t// if there are no instances launch a new one otherwise present the choice to the user\n\t\t\t\t\t// by falling through to the next code block\n\t\t\t\t\tlet appInstanceId: string | undefined;\n\t\t\t\t\tif (appInstances.length === 1) {\n\t\t\t\t\t\tappInstanceId = appInstances[0].instanceId;\n\t\t\t\t\t}\n\t\t\t\t\tif (appInstances.length === 0 || this.createNewInstance(intentApps[0])) {\n\t\t\t\t\t\tconst intentResolver = await this.launchAppWithIntent(\n\t\t\t\t\t\t\tintentApps[0],\n\t\t\t\t\t\t\tintent,\n\t\t\t\t\t\t\tappInstanceId,\n\t\t\t\t\t\t\tclientIdentity\n\t\t\t\t\t\t);\n\t\t\t\t\t\tif (isEmpty(intentResolver)) {\n\t\t\t\t\t\t\tthrow new Error(ResolveError.NoAppsFound);\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn intentResolver;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tconst userSelection = await this._intentResolverHelper?.launchIntentResolver(\n\t\t\t\t\t{\n\t\t\t\t\t\tapps: intentApps,\n\t\t\t\t\t\tintent\n\t\t\t\t\t},\n\t\t\t\t\tclientIdentity\n\t\t\t\t);\n\n\t\t\t\tif (isEmpty(userSelection)) {\n\t\t\t\t\tthrow new Error(ResolveError.ResolverUnavailable);\n\t\t\t\t}\n\n\t\t\t\tconst intentResolver = await this.handleIntentPickerSelection(userSelection, intent, clientIdentity);\n\t\t\t\treturn intentResolver;\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Invoke the intent handler.\n\t\t\t * @param clientIdentity The client identity.\n\t\t\t * @param handlerId The handler ID.\n\t\t\t * @param intent The intent to invoke.\n\t\t\t * @returns A promise that resolves when the intent handler is invoked.\n\t\t\t */\n\t\t\tpublic async invokeIntentHandler(\n\t\t\t\tclientIdentity: OpenFin.ClientIdentity,\n\t\t\t\thandlerId: string,\n\t\t\t\tintent: OpenFin.Intent\n\t\t\t): Promise {\n\t\t\t\tconst { context } = intent;\n\t\t\t\tlet contextMetadata: ContextMetadata | undefined;\n\t\t\t\tlet passedContext: { [key: string]: unknown } | undefined;\n\t\t\t\tif (!isEmpty(context)) {\n\t\t\t\t\tpassedContext = { ...context };\n\t\t\t\t\tcontextMetadata = passedContext[this._metadataKey] as ContextMetadata;\n\t\t\t\t\tif (!isEmpty(contextMetadata)) {\n\t\t\t\t\t\tdelete passedContext[this._metadataKey];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn super.invokeIntentHandler(clientIdentity, handlerId, {\n\t\t\t\t\t...intent,\n\t\t\t\t\tcontext: {\n\t\t\t\t\t\t...passedContext,\n\t\t\t\t\t\tcontextMetadata\n\t\t\t\t\t} as unknown as OpenFin.Context\n\t\t\t\t});\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Handle the FDC3 open.\n\t\t\t * @param fdc3OpenOptions The options for the open.\n\t\t\t * @param fdc3OpenOptions.app The platform app or its id.\n\t\t\t * @param fdc3OpenOptions.context The context being opened.\n\t\t\t * @param clientIdentity The client identity.\n\t\t\t * @returns The application identifier.\n\t\t\t */\n\t\t\tpublic async fdc3HandleOpen(\n\t\t\t\tfdc3OpenOptions: { app: (PlatformApp & AppIdentifier) | string; context: OpenFin.Context },\n\t\t\t\tclientIdentity: OpenFin.ClientIdentity\n\t\t\t): Promise {\n\t\t\t\tif (isEmpty(fdc3OpenOptions?.app)) {\n\t\t\t\t\tlogger.error(\"A request to fdc3.open did not pass an fdc3OpenOptions object\");\n\t\t\t\t\tthrow new Error(ResolveError.NoAppsFound);\n\t\t\t\t}\n\n\t\t\t\tlogger.info(\n\t\t\t\t\t`A request to Open has been sent to the platform by uuid: ${clientIdentity?.uuid}, name: ${clientIdentity?.name}, endpointId: ${clientIdentity.endpointId} with passed context:`,\n\t\t\t\t\tfdc3OpenOptions.context\n\t\t\t\t);\n\t\t\t\ttry {\n\t\t\t\t\tlet requestedId: string;\n\t\t\t\t\tlet instanceId: string | undefined;\n\t\t\t\t\tlet platformIdentities: PlatformAppIdentifier[] | undefined;\n\t\t\t\t\tlet focusApp = false;\n\t\t\t\t\tlet appId: string | undefined;\n\n\t\t\t\t\tif (isString(fdc3OpenOptions.app)) {\n\t\t\t\t\t\trequestedId = fdc3OpenOptions.app;\n\t\t\t\t\t} else {\n\t\t\t\t\t\trequestedId = fdc3OpenOptions.app.appId ?? fdc3OpenOptions.app.name;\n\t\t\t\t\t\tinstanceId = fdc3OpenOptions.app.instanceId;\n\t\t\t\t\t}\n\n\t\t\t\t\tconst requestedApp = await getApp(requestedId);\n\t\t\t\t\tif (isEmpty(requestedApp)) {\n\t\t\t\t\t\tthrow new Error(OpenError.AppNotFound);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (!isEmpty(instanceId)) {\n\t\t\t\t\t\t// an instance of an application was selected now look up the uuid and name\n\t\t\t\t\t\tconst allConnectedClients = await this.getAllClientInfo();\n\t\t\t\t\t\tconst clientInfo = allConnectedClients.find(\n\t\t\t\t\t\t\t(connectedClient) => connectedClient.endpointId === instanceId\n\t\t\t\t\t\t);\n\t\t\t\t\t\tif (!isEmpty(clientInfo)) {\n\t\t\t\t\t\t\tlogger.info(`App Id: ${requestedId} and instance Id: ${instanceId} was provided and found.`);\n\t\t\t\t\t\t\t// the connected instance is available\n\t\t\t\t\t\t\tplatformIdentities = [\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tuuid: clientInfo.uuid,\n\t\t\t\t\t\t\t\t\tname: clientInfo.name,\n\t\t\t\t\t\t\t\t\tappId: requestedId,\n\t\t\t\t\t\t\t\t\tinstanceId\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t];\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthrow new Error(ResolveError.TargetInstanceUnavailable);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif (isEmpty(platformIdentities)) {\n\t\t\t\t\t\tplatformIdentities = await launch(requestedApp);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfocusApp = true;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (!isEmpty(platformIdentities) && platformIdentities?.length > 0) {\n\t\t\t\t\t\tappId = platformIdentities[0].appId;\n\t\t\t\t\t\tif (platformIdentities.length > 1) {\n\t\t\t\t\t\t\tlogger.warn(\n\t\t\t\t\t\t\t\t\"Open can only return one app and instance id and multiple instances were launched as a result. Returning the first instance. Returned instances: \",\n\t\t\t\t\t\t\t\tplatformIdentities\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (!isEmpty(fdc3OpenOptions?.context)) {\n\t\t\t\t\t\t\t// an app might be a standard url that doesn't use the OpenFin fin api and as we are running in a browser APIs are not\n\t\t\t\t\t\t\t// injected into the DOM. As a result it might not connect to the broker so we should only get the instance id if it is\n\t\t\t\t\t\t\t// linked to a context request.\n\t\t\t\t\t\t\tconst openTimeout: number | undefined = this._openOptions?.connectionTimeout ?? 15000;\n\t\t\t\t\t\t\t// if we have a snapshot and multiple identities we will not wait as not all of them might not support intents.\n\t\t\t\t\t\t\tinstanceId = await this._clientRegistrationHelper.onConnectionClientReady(\n\t\t\t\t\t\t\t\tplatformIdentities[0],\n\t\t\t\t\t\t\t\topenTimeout\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tconst contextTimeout: number | undefined = this._openOptions?.contextTimeout ?? 15000;\n\t\t\t\t\t\t\tconst contextTypeName = fdc3OpenOptions.context.type;\n\t\t\t\t\t\t\t// if we have a snapshot and multiple identities we will not wait as not all of them might not support intents.\n\t\t\t\t\t\t\tconst clientReadyInstanceId = await this._clientRegistrationHelper.onContextClientReady(\n\t\t\t\t\t\t\t\tplatformIdentities[0],\n\t\t\t\t\t\t\t\tcontextTypeName,\n\t\t\t\t\t\t\t\tcontextTimeout\n\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\tlet trackedHandler = this._clientRegistrationHelper.getRegisteredContextHandler(\n\t\t\t\t\t\t\t\tcontextTypeName,\n\t\t\t\t\t\t\t\tclientReadyInstanceId\n\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\tif (isEmpty(trackedHandler)) {\n\t\t\t\t\t\t\t\ttrackedHandler = this._clientRegistrationHelper.getRegisteredContextHandler(\n\t\t\t\t\t\t\t\t\t\"*\",\n\t\t\t\t\t\t\t\t\tclientReadyInstanceId\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (!isEmpty(trackedHandler)) {\n\t\t\t\t\t\t\t\tconst contextMetadata = await this.getContextMetadata(clientIdentity);\n\t\t\t\t\t\t\t\tconst updatedContext: OpenFin.Context = {\n\t\t\t\t\t\t\t\t\t...fdc3OpenOptions.context,\n\t\t\t\t\t\t\t\t\t[this._metadataKey]: contextMetadata\n\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t\tawait this.invokeContextHandler(\n\t\t\t\t\t\t\t\t\ttrackedHandler.clientIdentity,\n\t\t\t\t\t\t\t\t\ttrackedHandler.handlerId,\n\t\t\t\t\t\t\t\t\tupdatedContext\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tlogger.warn(\n\t\t\t\t\t\t\t\t\t`Unable to send context of type ${contextTypeName} opened app ${appId} with instanceId of ${clientReadyInstanceId} as we cannot find a tracked context handler.`\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif (!isEmpty(appId)) {\n\t\t\t\t\t\tif (focusApp && !isEmpty(platformIdentities)) {\n\t\t\t\t\t\t\tawait bringAppToFront(requestedApp, platformIdentities);\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn { appId, instanceId };\n\t\t\t\t\t}\n\n\t\t\t\t\t// if no id returned then the likelihood is that there was a problem launching the application as a result of the open request.\n\t\t\t\t\tthrow new Error(OpenError.ErrorOnLaunch);\n\t\t\t\t} catch (openError) {\n\t\t\t\t\tconst error = formatError(openError);\n\t\t\t\t\tif (\n\t\t\t\t\t\terror === ResolveError.TargetInstanceUnavailable ||\n\t\t\t\t\t\terror === ResolveError.IntentDeliveryFailed ||\n\t\t\t\t\t\terror === ResolveError.TargetInstanceUnavailable ||\n\t\t\t\t\t\terror === OpenError.AppTimeout\n\t\t\t\t\t) {\n\t\t\t\t\t\tthrow new Error(OpenError.AppTimeout);\n\t\t\t\t\t}\n\t\t\t\t\tthrow openError;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * The client has disconnected form the broker.\n\t\t\t * @param clientIdentity The identity of the client that disconnected.\n\t\t\t */\n\t\t\tpublic async clientDisconnected(clientIdentity: OpenFin.ClientIdentity): Promise {\n\t\t\t\tconsole.log(\"InteropOverride:Client disconnected.\", clientIdentity);\n\t\t\t\tawait this._clientRegistrationHelper.clientDisconnected(clientIdentity);\n\t\t\t\tawait super.clientDisconnected(clientIdentity);\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Handle FDC3 find instances.\n\t\t\t * @param app The app identifier to find.\n\t\t\t * @param clientIdentity The client identity.\n\t\t\t * @returns The instance of the app.\n\t\t\t */\n\t\t\tpublic async fdc3HandleFindInstances(\n\t\t\t\tapp: AppIdentifier,\n\t\t\t\tclientIdentity: OpenFin.ClientIdentity\n\t\t\t): Promise {\n\t\t\t\tconsole.log(\"InteropOverride:fdc3HandleFindInstances fired.\", app, clientIdentity);\n\t\t\t\treturn this._clientRegistrationHelper.findAppInstances(app, clientIdentity);\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Handle request to get FDC3 app metadata.\n\t\t\t * @param app The app to get the metadata for.\n\t\t\t * @param clientIdentity The client identity.\n\t\t\t * @returns The app metadata.\n\t\t\t */\n\t\t\tpublic async fdc3HandleGetAppMetadata(\n\t\t\t\tapp: AppIdentifier,\n\t\t\t\tclientIdentity: OpenFin.ClientIdentity\n\t\t\t): Promise {\n\t\t\t\tlogger.info(\"fdc3HandleGetAppMetadata call received.\", app, clientIdentity);\n\t\t\t\t// this will only be called by FDC3 2.0+\n\t\t\t\tconst platformApp = await getApp(app.appId);\n\t\t\t\tif (!isEmpty(platformApp)) {\n\t\t\t\t\tconst appMetaData: AppMetadata = mapToAppMetaData(platformApp);\n\t\t\t\t\treturn appMetaData;\n\t\t\t\t}\n\t\t\t\tthrow new Error(\"TargetAppUnavailable\");\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Handle the request to get FDC3 info.\n\t\t\t * @param payload The payload.\n\t\t\t * @param payload.fdc3Version The version info to get.\n\t\t\t * @param clientIdentity The client identity.\n\t\t\t * @returns The info.\n\t\t\t */\n\t\t\tpublic async fdc3HandleGetInfo(\n\t\t\t\tpayload: {\n\t\t\t\t\tfdc3Version: string;\n\t\t\t\t},\n\t\t\t\tclientIdentity: OpenFin.ClientIdentity\n\t\t\t): Promise {\n\t\t\t\tconsole.log(\"InteropOverride:fdc3HandleGetInfo\", payload, clientIdentity);\n\t\t\t\tlogger.info(\"fdc3HandleGetInfo\", payload, clientIdentity);\n\t\t\t\tif (payload?.fdc3Version === \"2.0\") {\n\t\t\t\t\tconst response: ImplementationMetadata = (await super.fdc3HandleGetInfo(\n\t\t\t\t\t\tpayload,\n\t\t\t\t\t\tclientIdentity\n\t\t\t\t\t)) as ImplementationMetadata;\n\t\t\t\t\tconst appId = await this._appIdHelper.lookupAppId(clientIdentity);\n\t\t\t\t\tif (!isEmpty(appId)) {\n\t\t\t\t\t\tconst updatedResponse = {\n\t\t\t\t\t\t\t...response,\n\t\t\t\t\t\t\tappMetadata: { appId, instanceId: clientIdentity.endpointId }\n\t\t\t\t\t\t};\n\t\t\t\t\t\treturn updatedResponse;\n\t\t\t\t\t}\n\t\t\t\t\treturn response;\n\t\t\t\t}\n\t\t\t\treturn super.fdc3HandleGetInfo(payload, clientIdentity);\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Handle an intent handler being registered.\n\t\t\t * @param payload The payload.\n\t\t\t * @param clientIdentity The client identity.\n\t\t\t * @returns Nothing.\n\t\t\t */\n\t\t\tpublic async intentHandlerRegistered(\n\t\t\t\tpayload: IntentRegistrationPayload,\n\t\t\t\tclientIdentity: OpenFin.ClientIdentity\n\t\t\t): Promise {\n\t\t\t\tconsole.log(\"InteropOverride:intentHandlerRegistered\", payload, clientIdentity);\n\t\t\t\tawait this._clientRegistrationHelper.intentHandlerRegistered(payload, clientIdentity);\n\t\t\t\tawait super.intentHandlerRegistered(payload, clientIdentity);\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * A context handler has been registered against the broker.\n\t\t\t * @param payload The payload from a context listener registration.\n\t\t\t * @param payload.contextType The context type that the client is listening for.\n\t\t\t * @param payload.handlerId The handler Id for this listener.\n\t\t\t * @param clientIdentity The identity of the application that is adding the context handler.\n\t\t\t */\n\t\t\tpublic async contextHandlerRegistered(\n\t\t\t\tpayload: { contextType: string | undefined; handlerId: string },\n\t\t\t\tclientIdentity: OpenFin.ClientIdentity\n\t\t\t): Promise {\n\t\t\t\tconsole.log(\"InteropOverride:contextHandlerRegistered\", payload, clientIdentity);\n\t\t\t\tawait this._clientRegistrationHelper.contextHandlerRegistered(payload, clientIdentity);\n\t\t\t\tsuper.contextHandlerRegistered(payload, clientIdentity);\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Get an application identity.\n\t\t\t * @param metadata The metadata for the app.\n\t\t\t * @returns The app identifier.\n\t\t\t */\n\t\t\tprivate getApplicationIdentity(\n\t\t\t\tmetadata: OpenFin.IntentMetadata | undefined\n\t\t\t): AppIdentifier | undefined {\n\t\t\t\tconst target = metadata?.target;\n\t\t\t\tif (isEmpty(target)) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif (isString(target)) {\n\t\t\t\t\tif (target.trim().length === 0) {\n\t\t\t\t\t\treturn undefined;\n\t\t\t\t\t}\n\t\t\t\t\treturn { appId: target };\n\t\t\t\t}\n\n\t\t\t\tif (isEmpty(target.appId)) {\n\t\t\t\t\treturn undefined;\n\t\t\t\t}\n\n\t\t\t\treturn { appId: target.appId, instanceId: target.instanceId };\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Does the app use application identity.\n\t\t\t * @param clientIdentity The client app to check.\n\t\t\t * @returns True if the app uses application identity.\n\t\t\t */\n\t\t\tprivate usesApplicationIdentity(clientIdentity: OpenFin.ClientIdentity): boolean {\n\t\t\t\tconst apiMetadata = this._clientRegistrationHelper.getApiVersion(clientIdentity);\n\t\t\t\tif (isEmpty(apiMetadata)) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\treturn apiMetadata.type === \"fdc3\" && apiMetadata.version === \"2.0\";\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Handle a targeted intent.\n\t\t\t * @param targetAppIdentifier The identifier for the target app.\n\t\t\t * @param intent The intent.\n\t\t\t * @param targetByContext Perform the target by context.\n\t\t\t * @param clientIdentity The client identity.\n\t\t\t * @returns The intent resolution.\n\t\t\t */\n\t\t\tprivate async handleTargetedIntent(\n\t\t\t\ttargetAppIdentifier: AppIdentifier,\n\t\t\t\tintent: OpenFin.Intent,\n\t\t\t\ttargetByContext: boolean,\n\t\t\t\tclientIdentity: OpenFin.ClientIdentity\n\t\t\t): Promise> {\n\t\t\t\t// app specified flow\n\t\t\t\tconst intentsForSelection: AppsForIntent[] = [];\n\t\t\t\tconst targetApp = await getApp(targetAppIdentifier.appId);\n\n\t\t\t\t// if the specified app isn't available then let the caller know\n\t\t\t\tif (isEmpty(targetApp)) {\n\t\t\t\t\tthrow new Error(ResolveError.TargetAppUnavailable);\n\t\t\t\t}\n\t\t\t\t// if an instanceId is specified then check to see if it is valid and if it isn't inform the caller\n\t\t\t\tif (!isEmpty(targetAppIdentifier.instanceId)) {\n\t\t\t\t\tconst availableAppInstances = await this._clientRegistrationHelper.findAppInstances(\n\t\t\t\t\t\ttargetAppIdentifier,\n\t\t\t\t\t\tclientIdentity,\n\t\t\t\t\t\t\"intent\"\n\t\t\t\t\t);\n\t\t\t\t\tif (\n\t\t\t\t\t\tavailableAppInstances.length === 0 ||\n\t\t\t\t\t\t!availableAppInstances.some(\n\t\t\t\t\t\t\t(entry) =>\n\t\t\t\t\t\t\t\t// eslint-disable-next-line max-len\n\t\t\t\t\t\t\t\tentry.appId === targetAppIdentifier.appId &&\n\t\t\t\t\t\t\t\tentry.instanceId === targetAppIdentifier.instanceId\n\t\t\t\t\t\t)\n\t\t\t\t\t) {\n\t\t\t\t\t\tthrow new Error(ResolveError.TargetInstanceUnavailable);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (\n\t\t\t\t\tisEmpty(targetApp.interop?.intents?.listensFor) ||\n\t\t\t\t\tObject.values(targetApp.interop.intents.listensFor).length === 0\n\t\t\t\t) {\n\t\t\t\t\t// an app was specified but it doesn't have any intents. Indicate that something is wrong\n\t\t\t\t\tthrow new Error(ResolveError.TargetAppUnavailable);\n\t\t\t\t}\n\n\t\t\t\tconst supportedIntents: PlatformAppIntents[] = [];\n\t\t\t\tconst intentNames = Object.keys(targetApp.interop.intents.listensFor);\n\t\t\t\tfor (const intentName of intentNames) {\n\t\t\t\t\tconst intentEntry = targetApp.interop.intents.listensFor[intentName];\n\t\t\t\t\tlet contextMatch: boolean = true;\n\t\t\t\t\tconst contextType = intent.context?.type;\n\t\t\t\t\tlet supportedIntent: PlatformAppIntents | undefined;\n\t\t\t\t\tif (!isEmpty(contextType)) {\n\t\t\t\t\t\tcontextMatch = intentEntry.contexts?.includes(contextType);\n\t\t\t\t\t\tif (targetByContext) {\n\t\t\t\t\t\t\tsupportedIntent = { ...intentEntry, name: intentName };\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (isEmpty(supportedIntent) && intentName === intent.name && contextMatch) {\n\t\t\t\t\t\tsupportedIntent = { ...intentEntry, name: intentName };\n\t\t\t\t\t}\n\t\t\t\t\tif (!isEmpty(supportedIntent)) {\n\t\t\t\t\t\tsupportedIntents.push(supportedIntent);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (supportedIntents.length === 0) {\n\t\t\t\t\t// the specified app does have intent support but just none that support this context type\n\t\t\t\t\tthrow new Error(ResolveError.TargetAppUnavailable);\n\t\t\t\t}\n\n\t\t\t\tif (supportedIntents.length === 1) {\n\t\t\t\t\t// a preferred name for an app was given with the context object\n\t\t\t\t\t// the app existed and it supported the context type and there was only one intent that supported\n\t\t\t\t\t// that context type. Launch the app with that intent otherwise present the user with a list of\n\t\t\t\t\t// everything that supports that context type\n\t\t\t\t\tintent.name = supportedIntents[0].name;\n\t\t\t\t\t// check for instances\n\t\t\t\t\tif (!isEmpty(targetAppIdentifier.instanceId)) {\n\t\t\t\t\t\tconst intentResolver = await this.launchAppWithIntent(\n\t\t\t\t\t\t\ttargetApp,\n\t\t\t\t\t\t\tintent,\n\t\t\t\t\t\t\ttargetAppIdentifier.instanceId,\n\t\t\t\t\t\t\tclientIdentity\n\t\t\t\t\t\t);\n\t\t\t\t\t\treturn intentResolver;\n\t\t\t\t\t}\n\t\t\t\t\tconst specifiedAppInstances = await this._clientRegistrationHelper.findAppInstances(\n\t\t\t\t\t\ttargetApp,\n\t\t\t\t\t\tclientIdentity,\n\t\t\t\t\t\t\"intent\"\n\t\t\t\t\t);\n\n\t\t\t\t\tif (specifiedAppInstances.length === 0 || this.createNewInstance(targetApp)) {\n\t\t\t\t\t\tconst intentResolver = await this.launchAppWithIntent(\n\t\t\t\t\t\t\ttargetApp,\n\t\t\t\t\t\t\tintent,\n\t\t\t\t\t\t\tundefined,\n\t\t\t\t\t\t\tclientIdentity\n\t\t\t\t\t\t);\n\t\t\t\t\t\tif (isEmpty(intentResolver)) {\n\t\t\t\t\t\t\tthrow new Error(ResolveError.IntentDeliveryFailed);\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn intentResolver;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tfor (const supportedIntent of supportedIntents) {\n\t\t\t\t\tconst appForIntent: AppsForIntent = {\n\t\t\t\t\t\tapps: [targetApp],\n\t\t\t\t\t\tintent: { name: supportedIntent.name, displayName: supportedIntent.displayName }\n\t\t\t\t\t};\n\t\t\t\t\tintentsForSelection.push(appForIntent);\n\t\t\t\t}\n\t\t\t\tlet userSelection: IntentResolverResponse | undefined;\n\t\t\t\tif (intentsForSelection.length === 1) {\n\t\t\t\t\tif (\n\t\t\t\t\t\t!isStringValue(intent.name) &&\n\t\t\t\t\t\t!isEmpty(intentsForSelection[0]?.intent?.name) &&\n\t\t\t\t\t\t!isEmpty(intent?.context) &&\n\t\t\t\t\t\t!isEmpty(intent?.context?.type)\n\t\t\t\t\t) {\n\t\t\t\t\t\tlogger.info(\n\t\t\t\t\t\t\t`A request to raise an intent was passed and the intent name was not passed but a context was ${intent?.context?.type} with 1 matching intent. Name: ${intentsForSelection[0]?.intent?.name}, Display Name: ${intentsForSelection[0]?.intent?.displayName}. Updating intent object.`\n\t\t\t\t\t\t);\n\t\t\t\t\t\tintent.name = intentsForSelection[0]?.intent?.name;\n\t\t\t\t\t}\n\t\t\t\t\tuserSelection = await this._intentResolverHelper?.launchIntentResolver(\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tapps: intentsForSelection[0].apps,\n\t\t\t\t\t\t\tintent\n\t\t\t\t\t\t},\n\t\t\t\t\t\tclientIdentity\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\tuserSelection = await this._intentResolverHelper?.launchIntentResolver(\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tintent,\n\t\t\t\t\t\t\tintents: intentsForSelection\n\t\t\t\t\t\t},\n\t\t\t\t\t\tclientIdentity\n\t\t\t\t\t);\n\t\t\t\t\tif (!isStringValue(intent.name) && !isEmpty(userSelection?.intent?.name)) {\n\t\t\t\t\t\tlogger.info(\n\t\t\t\t\t\t\t`A request to raise an intent was passed and the following intent was selected (from a selection of ${intentsForSelection.length}). Name: ${userSelection?.intent?.name}, Display Name: ${userSelection?.intent?.displayName}. Updating intent object.`\n\t\t\t\t\t\t);\n\t\t\t\t\t\tintent.name = userSelection?.intent?.name ?? intent.name;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (isEmpty(userSelection)) {\n\t\t\t\t\tthrow new Error(ResolveError.ResolverUnavailable);\n\t\t\t\t}\n\n\t\t\t\treturn this.handleIntentPickerSelection(userSelection, intent, clientIdentity);\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Launch an app with intent.\n\t\t\t * @param app The application to launch.\n\t\t\t * @param intent The intent to open it with.\n\t\t\t * @param instanceId The instance of the app.\n\t\t\t * @param clientIdentity The identity of the source of the request.\n\t\t\t * @returns The intent resolution.\n\t\t\t */\n\t\t\tprivate async launchAppWithIntent(\n\t\t\t\tapp: PlatformApp,\n\t\t\t\tintent: OpenFin.Intent,\n\t\t\t\tinstanceId?: string,\n\t\t\t\tclientIdentity?: OpenFin.ClientIdentity\n\t\t\t): Promise> {\n\t\t\t\tlogger.info(\"Launching app with intent\");\n\t\t\t\tlet platformIdentities: PlatformAppIdentifier[] | undefined = [];\n\t\t\t\tlet existingInstance = true;\n\n\t\t\t\tif (!isEmpty(instanceId)) {\n\t\t\t\t\t// an instance of an application was selected\n\t\t\t\t\tconst allConnectedClients = await this.getAllClientInfo();\n\t\t\t\t\tconst clientInfo = allConnectedClients.find(\n\t\t\t\t\t\t(connectedClient) => connectedClient.endpointId === instanceId\n\t\t\t\t\t);\n\t\t\t\t\tif (!isEmpty(clientInfo)) {\n\t\t\t\t\t\tlogger.info(`App Id: ${app.appId} and instance Id: ${instanceId} was provided and found.`);\n\t\t\t\t\t\t// the connected instance is available\n\t\t\t\t\t\tplatformIdentities.push({\n\t\t\t\t\t\t\tuuid: clientInfo.uuid,\n\t\t\t\t\t\t\tname: clientInfo.name,\n\t\t\t\t\t\t\tappId: app.appId,\n\t\t\t\t\t\t\tinstanceId: clientInfo.endpointId\n\t\t\t\t\t\t});\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthrow new Error(ResolveError.TargetInstanceUnavailable);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (platformIdentities.length === 0) {\n\t\t\t\t\tplatformIdentities = await launch(app);\n\t\t\t\t\texistingInstance = false;\n\t\t\t\t\tif (!platformIdentities?.length) {\n\t\t\t\t\t\tthrow new Error(ResolveError.IntentDeliveryFailed);\n\t\t\t\t\t}\n\t\t\t\t\tif (platformIdentities.length === 1) {\n\t\t\t\t\t\tconst intentTimeout: number | undefined = options?.intentOptions?.intentTimeout ?? 15000;\n\t\t\t\t\t\t// if we have a snapshot and multiple identities we will not wait as not all of them might not support intents.\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tinstanceId = await this._clientRegistrationHelper.onIntentClientReady(\n\t\t\t\t\t\t\t\tplatformIdentities[0],\n\t\t\t\t\t\t\t\tintent.name,\n\t\t\t\t\t\t\t\tintentTimeout\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t} catch (intentReadyError) {\n\t\t\t\t\t\t\tlogger.warn(\n\t\t\t\t\t\t\t\t\"An error occurred while getting a instance to target an intent at.\",\n\t\t\t\t\t\t\t\tintentReadyError\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tthrow new Error(ResolveError.IntentDeliveryFailed);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tfor (const target of platformIdentities) {\n\t\t\t\t\tawait super.setIntentTarget(intent, target);\n\t\t\t\t\tif (existingInstance) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tif (bringAppToFront) {\n\t\t\t\t\t\t\t\tawait bringAppToFront(app, [target]);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} catch (bringToFrontError) {\n\t\t\t\t\t\t\tlogger.warn(\n\t\t\t\t\t\t\t\t`There was an error bringing app: ${target.appId}, and instance ${target.instanceId} with name: ${target.name} to front.`,\n\t\t\t\t\t\t\t\tbringToFrontError\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn {\n\t\t\t\t\tsource: { appId: app.appId, instanceId },\n\t\t\t\t\tversion: app.version,\n\t\t\t\t\tintent: intent.name\n\t\t\t\t};\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Get the context metadata for a client identity.\n\t\t\t * @param clientIdentity The client identity.\n\t\t\t * @returns The context metadata.\n\t\t\t */\n\t\t\tprivate async getContextMetadata(clientIdentity: OpenFin.ClientIdentity): Promise {\n\t\t\t\tconst appId = (await this._appIdHelper.lookupAppId(clientIdentity)) ?? \"unknown\";\n\t\t\t\treturn {\n\t\t\t\t\tsource: {\n\t\t\t\t\t\tappId,\n\t\t\t\t\t\tinstanceId: clientIdentity.endpointId\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Should we always use a new instance of the app.\n\t\t\t * @param app The app to check.\n\t\t\t * @returns True if we should always use a new instance.\n\t\t\t */\n\t\t\tprivate createNewInstance(app: PlatformApp): boolean {\n\t\t\t\tconst instanceMode = app.hostManifests?.OpenFin?.config?.instanceMode ?? \"new\";\n\t\t\t\treturn instanceMode === \"new\";\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Handle the intent picker selection.\n\t\t\t * @param userSelection The user selection from the intent picker.\n\t\t\t * @param intent The intent.\n\t\t\t * @param clientIdentity The source of the request.\n\t\t\t * @returns The intent resolution.\n\t\t\t */\n\t\t\tprivate async handleIntentPickerSelection(\n\t\t\t\tuserSelection: IntentResolverResponse,\n\t\t\t\tintent: OpenFin.Intent>,\n\t\t\t\tclientIdentity?: OpenFin.ClientIdentity\n\t\t\t): Promise> {\n\t\t\t\tconst selectedApp = await getApp(userSelection.appId);\n\t\t\t\tif (isEmpty(selectedApp)) {\n\t\t\t\t\tthrow new Error(ResolveError.NoAppsFound);\n\t\t\t\t}\n\t\t\t\tconst instanceId: string | undefined = userSelection.instanceId;\n\t\t\t\tconst intentResolver = await this.launchAppWithIntent(\n\t\t\t\t\tselectedApp,\n\t\t\t\t\tintent,\n\t\t\t\t\tinstanceId,\n\t\t\t\t\tclientIdentity\n\t\t\t\t);\n\t\t\t\tif (isEmpty(intentResolver)) {\n\t\t\t\t\tthrow new Error(ResolveError.NoAppsFound);\n\t\t\t\t}\n\t\t\t\treturn intentResolver;\n\t\t\t}\n\t\t};\n}\n\n/**\n * Get the override constructor for the interop broker (useful if you wish this implementation to be layered with other implementations and passed to the platform's initialization object as part of an array).\n * @param options The options for the broker.\n * @returns The override constructor to be used in an array.\n */\nexport async function getConstructorOverride(\n\toptions: PlatformInteropBrokerOptions\n): Promise> {\n\treturn constructorOverride(options);\n}\n","import type { OpenFin } from \"@openfin/core\";\nimport type { WebLayoutSnapshot } from \"@openfin/core-web\";\nimport type {\n\tLayoutManager,\n\tLayoutManagerConstructor,\n\tLayoutManagerItem,\n\tPlatformLayoutSnapshot\n} from \"../../shapes/layout-shapes\";\n\n/**\n * MakeOverride assists in loading the Fin object before the applyLayoutSnapshot Manager call.\n * @param fin the fin object.\n * @param layoutContainerId the layout container id.\n * @param layoutSelectorId the layout selector id.\n * @returns a function call.\n */\nexport function makeOverride(\n\tfin: OpenFin.Fin,\n\tlayoutContainerId: string,\n\tlayoutSelectorId: string\n) {\n\treturn function layoutManagerOverride(Base: LayoutManagerConstructor): LayoutManagerConstructor {\n\t\t/**\n\t\t * @class LayoutManagerBasic\n\t\t * This implementation is the fundamental override for Multiple Layouts in Web.\n\t\t */\n\t\treturn class LayoutManagerBasic extends Base implements LayoutManager {\n\t\t\tprivate _layoutMapArray: LayoutManagerItem[];\n\n\t\t\tprivate readonly _layoutContainer: HTMLElement | null;\n\n\t\t\tprivate readonly _layoutSelector: HTMLSelectElement | null;\n\n\t\t\tprivate _selectedLayout: string | undefined;\n\n\t\t\t/**\n\t\t\t * Sets up the required variables for the layout manager.\n\t\t\t */\n\t\t\tconstructor() {\n\t\t\t\tsuper();\n\t\t\t\tthis._layoutMapArray = [];\n\t\t\t\tthis._layoutContainer = document.querySelector(`#${layoutContainerId}`);\n\t\t\t\tthis._layoutSelector = document.querySelector(`#${layoutSelectorId}`);\n\t\t\t\tif (this._layoutSelector !== null) {\n\t\t\t\t\tthis._layoutSelector.addEventListener(\"change\", async (event) => {\n\t\t\t\t\t\tconst selectElement = event.target as HTMLSelectElement;\n\t\t\t\t\t\tconst selectedValue = selectElement.value;\n\t\t\t\t\t\tawait this.showLayout({ layoutName: selectedValue, uuid: fin.me.uuid, name: fin.me.name });\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Our implementation of getLayoutSnapshot that contains titles.\n\t\t\t * @returns Promise\n\t\t\t */\n\t\t\tpublic async getLayoutSnapshot(): Promise {\n\t\t\t\tconst layoutSnapshot = await super.getLayoutSnapshot();\n\t\t\t\tconst platformLayoutSnapshot: PlatformLayoutSnapshot = {\n\t\t\t\t\tlayouts: layoutSnapshot.layouts,\n\t\t\t\t\tlayoutTitles: {},\n\t\t\t\t\tlayoutSelected: this._selectedLayout\n\t\t\t\t};\n\t\t\t\tfor (const layout of this._layoutMapArray) {\n\t\t\t\t\tif (layout.layoutTitle !== undefined) {\n\t\t\t\t\t\tplatformLayoutSnapshot.layoutTitles[layout.layoutName] = layout.layoutTitle;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn platformLayoutSnapshot;\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Override for applying multiple snapshots.\n\t\t\t * @param snapshot The layouts object containing the fixed set of available layouts.\n\t\t\t */\n\t\t\tpublic async applyLayoutSnapshot(snapshot: WebLayoutSnapshot): Promise {\n\t\t\t\tif (this._layoutContainer !== null && this._layoutContainer !== undefined) {\n\t\t\t\t\tconst platformLayoutSnapshot = snapshot as PlatformLayoutSnapshot;\n\t\t\t\t\tfor (const [key, value] of Object.entries(snapshot.layouts)) {\n\t\t\t\t\t\tconst layoutTitle =\n\t\t\t\t\t\t\tplatformLayoutSnapshot?.layoutTitles === undefined\n\t\t\t\t\t\t\t\t? undefined\n\t\t\t\t\t\t\t\t: platformLayoutSnapshot.layoutTitles[key];\n\t\t\t\t\t\tthis._layoutMapArray.push({\n\t\t\t\t\t\t\tlayoutName: key,\n\t\t\t\t\t\t\tlayoutTitle,\n\t\t\t\t\t\t\tlayout: value,\n\t\t\t\t\t\t\tcontainer: this._layoutContainer\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t\tsetTimeout(async () => {\n\t\t\t\t\t\tconst entries = Object.entries(platformLayoutSnapshot.layouts);\n\t\t\t\t\t\tlet entryInstance = 0;\n\t\t\t\t\t\tfor (const entry of entries) {\n\t\t\t\t\t\t\tentryInstance++;\n\t\t\t\t\t\t\tconst layoutName = entry[0];\n\t\t\t\t\t\t\tawait this.createLayout(\n\t\t\t\t\t\t\t\tlayoutName,\n\t\t\t\t\t\t\t\tentry[1],\n\t\t\t\t\t\t\t\tentryInstance,\n\t\t\t\t\t\t\t\tentries.length,\n\t\t\t\t\t\t\t\tplatformLayoutSnapshot.layoutSelected\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t}, 1000);\n\t\t\t\t\tconsole.log(\"[Apply Layout] Layouts loaded\");\n\t\t\t\t\tconsole.log(`[Apply Layout] Layouts are: ${JSON.stringify(this._layoutMapArray)}`);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Shows the layout specified by the layoutName.\n\t\t\t * @param layoutName The name of the layout to show.\n\t\t\t * @param layoutName.layoutName The name of the layout to show.\n\t\t\t * @returns Promise\n\t\t\t */\n\t\t\tpublic async showLayout({ layoutName }: OpenFin.LayoutIdentity): Promise {\n\t\t\t\tconst layoutContainers = document.querySelectorAll(\"div.layout-container\");\n\t\t\t\tfor (const layoutContainer of layoutContainers) {\n\t\t\t\t\tif (layoutContainer.id === layoutName) {\n\t\t\t\t\t\tlayoutContainer.classList.remove(\"hidden\");\n\t\t\t\t\t\tthis._selectedLayout = layoutName;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tlayoutContainer.classList.add(\"hidden\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Remove Layout - You guessed it, it removes a layout from the existing array of layouts.\n\t\t\t * @param id The name of the layout you want removed.\n\t\t\t */\n\t\t\tpublic async removeLayout(id: OpenFin.LayoutIdentity): Promise {\n\t\t\t\tconst index = this._layoutMapArray.findIndex((x) => x.layoutName === id.layoutName);\n\t\t\t\tconsole.log(`[Remove Layout] Removing Layout ${id.layoutName}`);\n\t\t\t\tconsole.log(`[Remove Layout] Found layout at index ${index}`);\n\t\t\t\tawait this.removeThisLayout(id.layoutName, index);\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Returns the layout identity for the specified view identity.\n\t\t\t * @param viewIdentity The view identity to get the layout identity for.\n\t\t\t * @returns The layout identity for the specified view identity.\n\t\t\t * @throws Error if the view is not found in any layout.\n\t\t\t */\n\t\t\tpublic getLayoutIdentityForView(viewIdentity: OpenFin.Identity): OpenFin.LayoutIdentity {\n\t\t\t\tconst viewElement = document.querySelector(`div[of-name=\"${viewIdentity.name}\"]`);\n\t\t\t\tif (viewElement !== null) {\n\t\t\t\t\tconst layoutElement = viewElement.closest(\"[data-openfin-layout-name]\");\n\t\t\t\t\tif (layoutElement !== null) {\n\t\t\t\t\t\treturn { layoutName: layoutElement.id, uuid: fin.me.uuid, name: fin.me.name };\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tthrow new Error(\"View not found in any layout\");\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Given a layout identity it determines if the layout is currently visible.\n\t\t\t * @param layoutName The layout identity.\n\t\t\t * @param layoutName.layoutName The name of the layout.\n\t\t\t * @returns Whether the layout is visible.\n\t\t\t */\n\t\t\tpublic isLayoutVisible({ layoutName }: OpenFin.LayoutIdentity): boolean {\n\t\t\t\treturn layoutName === this._selectedLayout;\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * This returns the number of layouts in the layout manager.\n\t\t\t * @returns The number of layouts in the layout manager.\n\t\t\t */\n\t\t\tpublic size(): number {\n\t\t\t\treturn this._layoutMapArray.length;\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Removes this layout from the state and the DOM.\n\t\t\t * @param layoutName The name of the layout to remove.\n\t\t\t * @param index The index of the layout that is being removed.\n\t\t\t */\n\t\t\tprivate async removeThisLayout(layoutName: string, index: number): Promise {\n\t\t\t\t// remove layout from state.\n\t\t\t\tconst layoutNameElement = document.querySelector(`#${layoutName}`);\n\t\t\t\tif (layoutNameElement) {\n\t\t\t\t\tlayoutNameElement.remove();\n\t\t\t\t\tawait fin.Platform.Layout.destroy({ layoutName, uuid: fin.me.uuid, name: fin.me.name });\n\t\t\t\t\tthis._layoutMapArray = this._layoutMapArray.filter((x) => x.layoutName !== layoutName);\n\t\t\t\t\tconst nextLayoutName =\n\t\t\t\t\t\tthis._layoutMapArray[index]?.layoutName ?? this._layoutMapArray[index - 1]?.layoutName;\n\t\t\t\t\tif (this._layoutSelector !== null) {\n\t\t\t\t\t\tfor (let i = 0; i < this._layoutSelector.options.length; i++) {\n\t\t\t\t\t\t\tif (this._layoutSelector.options[i].value === layoutName) {\n\t\t\t\t\t\t\t\tthis._layoutSelector.remove(i);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.bindLayoutSelector(nextLayoutName, false);\n\t\t\t\t\t\tawait this.showLayout({ layoutName: nextLayoutName, uuid: fin.me.uuid, name: fin.me.name });\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * A Create function for layouts.\n\t\t\t * @param layoutName A string for the layout name.\n\t\t\t * @param layout LayoutOptions.\n\t\t\t * @param entry the entry from the batch that is being created.\n\t\t\t * @param length the total number of layouts to create.\n\t\t\t * @param selectedLayout the layout that is selected.\n\t\t\t */\n\t\t\tprivate async createLayout(\n\t\t\t\tlayoutName: string,\n\t\t\t\tlayout: OpenFin.LayoutOptions,\n\t\t\t\tentry: number,\n\t\t\t\tlength: number,\n\t\t\t\tselectedLayout: string | undefined\n\t\t\t): Promise {\n\t\t\t\t// Create a new div container for the layout.\n\t\t\t\tconst container = document.createElement(\"div\");\n\t\t\t\tcontainer.id = layoutName;\n\t\t\t\tcontainer.className = \"col layout-container hidden\";\n\t\t\t\tthis._layoutContainer?.append(container);\n\t\t\t\tawait fin.Platform.Layout.create({ layoutName, layout, container });\n\t\t\t\tif (entry === length) {\n\t\t\t\t\tthis.bindLayoutSelector(selectedLayout ?? layoutName);\n\t\t\t\t\tawait this.showLayout({\n\t\t\t\t\t\tlayoutName: selectedLayout ?? layoutName,\n\t\t\t\t\t\tuuid: fin.me.uuid,\n\t\t\t\t\t\tname: fin.me.name\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Binds the layout selector to the latest collecting of layouts and selects the specified layout.\n\t\t\t * @param layoutName The name of the layout to bind to the layout selector.\n\t\t\t * @param rebind Whether to rebind the layout selector.\n\t\t\t */\n\t\t\tprivate bindLayoutSelector(layoutName: string, rebind: boolean = true): void {\n\t\t\t\tif (this._layoutSelector !== null) {\n\t\t\t\t\tif (rebind) {\n\t\t\t\t\t\tthis._layoutSelector.innerHTML = \"\";\n\t\t\t\t\t\tfor (const layout of this._layoutMapArray) {\n\t\t\t\t\t\t\tconst option = document.createElement(\"option\");\n\t\t\t\t\t\t\toption.value = layout.layoutName;\n\t\t\t\t\t\t\toption.text = layout.layoutTitle ?? layout.layoutName;\n\t\t\t\t\t\t\tthis._layoutSelector.add(option);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tthis._layoutSelector.value = layoutName;\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t};\n}\n","import type OpenFin from \"@openfin/core\";\nimport type { PlatformLayoutSnapshot } from \"../../shapes/layout-shapes\";\nimport type { Logger } from \"../../shapes/logger-shapes\";\nimport type {\n\tSettings,\n\tSettingsResolverOptions,\n\tSettingsResolverResponse\n} from \"../../shapes/setting-shapes\";\nimport { objectClone } from \"../../utils\";\nimport { clearSettings, getSettings, saveSettings } from \"./settings\";\n\n/**\n * An helper for updating and resolving settings.\n */\nexport class SettingsResolverHelper {\n\tprivate readonly _logger: Logger;\n\n\tprivate readonly _settingsResolverOptions?: SettingsResolverOptions;\n\n\tprivate readonly _defaultSettingsResolverHeight: number;\n\n\tprivate readonly _defaultSettingsResolverWidth: number;\n\n\tprivate readonly _dialogElement: HTMLDialogElement | null = null;\n\n\tprivate _dialogClient: OpenFin.ChannelClient | null = null;\n\n\t/**\n\t * Create an instance of the Settings Resolver Helper.\n\t * @param settingsResolverOptions options for the helper\n\t * @param logger the logger to use.\n\t */\n\tconstructor(settingsResolverOptions: SettingsResolverOptions, logger: Logger) {\n\t\tthis._defaultSettingsResolverHeight = 715;\n\t\tthis._defaultSettingsResolverWidth = 665;\n\t\tthis._settingsResolverOptions = {\n\t\t\theight: this._defaultSettingsResolverHeight,\n\t\t\twidth: this._defaultSettingsResolverWidth,\n\t\t\t...settingsResolverOptions\n\t\t};\n\t\tthis._logger = logger;\n\t\tthis._dialogElement = document.createElement(\"dialog\");\n\t\tthis._dialogElement.id = \"settings-resolver-dialog\";\n\t\tthis._dialogElement.style.height = `${this._settingsResolverOptions.height}px`;\n\t\tthis._dialogElement.style.width = `${this._settingsResolverOptions.width}px`;\n\t\tthis._dialogElement.style.padding = \"0px\";\n\t\tthis._dialogElement.style.backgroundColor = \"var(--brand-background)\";\n\t\t// Create a new iframe element\n\t\tconst settingsResolver = document.createElement(\"iframe\");\n\n\t\t// Set the source of the iframe\n\t\tsettingsResolver.src = settingsResolverOptions.url;\n\t\tsettingsResolver.style.height = \"99%\";\n\t\tsettingsResolver.style.width = \"100%\";\n\n\t\t// Append the iframe to the dialog\n\t\tthis._dialogElement.append(settingsResolver);\n\n\t\t// Append the dialog to the body\n\t\tdocument.body.append(this._dialogElement);\n\t}\n\n\t/**\n\t * Launch the settings resolver.\n\t * @returns nothing.\n\t */\n\tpublic async showSettings(): Promise {\n\t\tif (this._dialogElement) {\n\t\t\tthis._dialogElement.showModal();\n\t\t}\n\t\tif (!this._dialogClient && this._dialogClient === null) {\n\t\t\tconst settingsResolverChannel = \"settings-resolver\";\n\t\t\tconsole.log(\"Connecting to settings resolver\", settingsResolverChannel);\n\t\t\tthis._dialogClient = await fin.InterApplicationBus.Channel.connect(settingsResolverChannel);\n\n\t\t\t// eslint-disable-next-line @typescript-eslint/await-thenable\n\t\t\tawait this._dialogClient.register(\"settings-resolver-response\", async (payload, sender) => {\n\t\t\t\tconst response = payload as {\n\t\t\t\t\tsettingsResolverResponse?: SettingsResolverResponse;\n\t\t\t\t\terrorMessage?: string;\n\t\t\t\t};\n\t\t\t\tif (response.settingsResolverResponse) {\n\t\t\t\t\tif (\n\t\t\t\t\t\tresponse.settingsResolverResponse.action === \"save-reload\" &&\n\t\t\t\t\t\tresponse.settingsResolverResponse.settings\n\t\t\t\t\t) {\n\t\t\t\t\t\tconst settingsToSave = objectClone(response.settingsResolverResponse.settings);\n\t\t\t\t\t\tconst layoutManager = fin.Platform.Layout.getCurrentLayoutManagerSync();\n\t\t\t\t\t\tsettingsToSave.platform.layout.defaultLayout = await layoutManager.getLayoutSnapshot();\n\t\t\t\t\t\tawait saveSettings(settingsToSave);\n\t\t\t\t\t\tlocation.reload();\n\t\t\t\t\t} else if (response.settingsResolverResponse.action === \"reset-reload\") {\n\t\t\t\t\t\tawait clearSettings();\n\t\t\t\t\t\tlocation.reload();\n\t\t\t\t\t}\n\t\t\t\t} else if (response.errorMessage) {\n\t\t\t\t\tthis._logger.error(response.errorMessage);\n\t\t\t\t}\n\t\t\t\tif (this._dialogElement) {\n\t\t\t\t\tthis._dialogElement.close();\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\tif (this._dialogElement && this._dialogClient) {\n\t\t\tconst settings = await getSettings();\n\t\t\tawait this._dialogClient.dispatch(\"apply-settings\", {\n\t\t\t\tcustomData: {\n\t\t\t\t\tsettings\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n}\n","import type { OpenFin } from \"@openfin/core\";\nimport type { ManifestSettings, Settings } from \"../../shapes/setting-shapes\";\n\n/**\n * Fetches the settings for the application.\n * @returns The settings for the application.\n */\nexport async function getSettings(): Promise {\n\tconst savedSettings = await getSavedSettings();\n\tif (savedSettings) {\n\t\treturn savedSettings;\n\t}\n\tconst settings = await getManifestSettings();\n\tif (!Array.isArray(settings?.endpointProvider?.endpoints)) {\n\t\tconsole.error(\n\t\t\t\"Unable to run the example as settings are required and we fetch them from the link web manifest from the html page that is being served. It should exist in the customSettings section of the web manifest.\"\n\t\t);\n\t\treturn;\n\t}\n\tconst settingsEndpoint = settings.endpointProvider.endpoints.find(\n\t\t(endpoint) => endpoint.id === \"platform-settings\"\n\t);\n\n\tif (\n\t\tsettingsEndpoint === undefined ||\n\t\tsettingsEndpoint.type !== \"fetch\" ||\n\t\tsettingsEndpoint.options.method !== \"GET\" ||\n\t\tsettingsEndpoint.options.url === undefined\n\t) {\n\t\tconsole.error(\n\t\t\t\"Unable to run the example as settings are required and we fetch them from the endpoint defined with the id: 'platform-settings' in the manifest. It needs to be of type fetch, performing a GET and it must have a url defined.\"\n\t\t);\n\t\treturn;\n\t}\n\tconst platformSettings = await fetch(settingsEndpoint?.options.url);\n\tconst settingsJson = (await platformSettings.json()) as Settings;\n\treturn settingsJson;\n}\n\n/**\n * Returns a default layout from the settings if provided.\n * @returns The default layout from the settings.\n */\nexport async function getDefaultLayout(): Promise {\n\tconst settings = await getSettings();\n\tif (settings?.platform?.layout?.defaultLayout === undefined) {\n\t\tconsole.error(\n\t\t\t\"Unable to run the example as without a layout being defined. Please ensure that settings have been provided in the web manifest.\"\n\t\t);\n\t\treturn;\n\t}\n\tif (typeof settings.platform.layout.defaultLayout === \"string\") {\n\t\tconst layoutResponse = await fetch(settings.platform.layout.defaultLayout);\n\t\tconst layoutJson = (await layoutResponse.json()) as OpenFin.LayoutSnapshot;\n\t\treturn layoutJson;\n\t}\n\treturn settings.platform.layout.defaultLayout;\n}\n\n/**\n * Returns the settings from the manifest file.\n * @returns customSettings for this example\n */\nasync function getManifestSettings(): Promise {\n\t// Get the manifest link\n\tconst link = document.querySelector('link[rel=\"manifest\"]');\n\tif (link !== null) {\n\t\tconst manifestResponse = await fetch(link.href);\n\t\tconst manifestJson = (await manifestResponse.json()) as { custom_settings: ManifestSettings };\n\t\treturn manifestJson.custom_settings;\n\t}\n}\n\n/**\n * Clears any saved settings.\n * @returns The saved settings.\n */\nexport async function clearSettings(): Promise {\n\tconst settingsId = getSavedSettingsId();\n\tlocalStorage.removeItem(settingsId);\n}\n\n/**\n * Saves the settings.\n * @param settings The settings to save.\n */\nexport async function saveSettings(settings: Settings): Promise {\n\tconst settingsId = getSavedSettingsId();\n\tlocalStorage.setItem(settingsId, JSON.stringify(settings));\n}\n\n/**\n * Retrieves saved settings from local storage.\n * @returns The saved settings.\n */\nasync function getSavedSettings(): Promise {\n\tconst settingsId = getSavedSettingsId();\n\tconst settings = localStorage.getItem(settingsId);\n\tif (settings !== null) {\n\t\treturn JSON.parse(settings);\n\t}\n}\n\n/**\n * Get the Id used for saving and fetching settings from storage.\n * @returns The settings id.\n */\nfunction getSavedSettingsId(): string {\n\tconst urlParams = new URLSearchParams(window.location.search);\n\tconst env = urlParams.get(\"env\");\n\n\tconst settingsKey = env ? `${env}-settings` : \"settings\";\n\treturn settingsKey;\n}\n","/**\n * Test if a value is a undefined or null.\n * @param value The value to test.\n * @returns True if the value is null or undefined.\n */\nexport function isEmpty(value: unknown): value is null | undefined {\n\t// eslint-disable-next-line no-restricted-syntax\n\treturn value === undefined || value === null;\n}\n\n/**\n * Test if a value is an object.\n * @param value The value to test.\n * @returns True if the value is an object.\n */\nexport function isObject(value: unknown): value is object {\n\t// eslint-disable-next-line no-restricted-syntax\n\treturn value !== undefined && value !== null && typeof value === \"object\" && !Array.isArray(value);\n}\n\n/**\n * Test if a value is a string.\n * @param value The value to test.\n * @returns True if the value is a string.\n */\nexport function isString(value: unknown): value is string {\n\t// eslint-disable-next-line no-restricted-syntax\n\treturn value !== undefined && value !== null && typeof value === \"string\";\n}\n\n/**\n * Test if a value is a string that is not empty.\n * @param value The value to test.\n * @returns True if the value is a string that is not empty.\n */\nexport function isStringValue(value: unknown): value is string {\n\treturn isString(value) && value.trim().length > 0;\n}\n\n/**\n * Test if a value is a number.\n * @param value The value to test.\n * @returns True if the value is a number.\n */\nexport function isNumber(value: unknown): value is number {\n\t// eslint-disable-next-line no-restricted-syntax\n\treturn value !== undefined && value !== null && typeof value === \"number\";\n}\n\n/**\n * Test if a value is a number with a real value i.e. not NaN or Infinite.\n * @param value The value to test.\n * @returns True if the value is a number.\n */\nexport function isNumberValue(value: unknown): value is number {\n\treturn isNumber(value) && !Number.isNaN(value) && Number.isFinite(value);\n}\n\n/**\n * Test if a value is a boolean.\n * @param value The value to test.\n * @returns True if the value is a boolean.\n */\nexport function isBoolean(value: unknown): value is boolean {\n\t// eslint-disable-next-line no-restricted-syntax\n\treturn value !== undefined && value !== null && typeof value === \"boolean\";\n}\n\n/**\n * Test if a value is an integer.\n * @param value The value to test.\n * @returns True if the value is an integer.\n */\nexport function isInteger(value: unknown): value is number {\n\treturn isNumber(value) && Number.isInteger(value);\n}\n\n/**\n * Deep clone an object.\n * @param obj The object to clone.\n * @returns The clone of the object.\n */\nexport function objectClone(obj: T): T {\n\t// eslint-disable-next-line no-restricted-syntax\n\treturn obj === undefined ? undefined : JSON.parse(JSON.stringify(obj));\n}\n\n/**\n * Do a deep comparison of the objects.\n * @param obj1 The first object to compare.\n * @param obj2 The second object to compare.\n * @param matchPropertyOrder If true the properties must be in the same order.\n * @returns True if the objects are the same.\n */\nexport function deepEqual(obj1: unknown, obj2: unknown, matchPropertyOrder: boolean = true): boolean {\n\tif (isObject(obj1) && isObject(obj2)) {\n\t\tconst objKeys1 = Object.keys(obj1);\n\t\tconst objKeys2 = Object.keys(obj2);\n\n\t\tif (objKeys1.length !== objKeys2.length) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif (matchPropertyOrder && JSON.stringify(objKeys1) !== JSON.stringify(objKeys2)) {\n\t\t\treturn false;\n\t\t}\n\n\t\tfor (const key of objKeys1) {\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t\t\tconst value1 = (obj1 as any)[key];\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t\t\tconst value2 = (obj2 as any)[key];\n\n\t\t\tif (!deepEqual(value1, value2, matchPropertyOrder)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t} else if (Array.isArray(obj1) && Array.isArray(obj2)) {\n\t\tif (obj1.length !== obj2.length) {\n\t\t\treturn false;\n\t\t}\n\t\tfor (let i = 0; i < obj1.length; i++) {\n\t\t\tif (!deepEqual(obj1[i], obj2[i], matchPropertyOrder)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn JSON.stringify(obj1) === JSON.stringify(obj2);\n}\n\n/**\n * Deep merge two objects.\n * @param target The object to be merged into.\n * @param sources The objects to merge into the target.\n * @returns The merged object.\n */\nexport function deepMerge(target: T, ...sources: T[]): T {\n\tif (!Array.isArray(sources) || sources.length === 0) {\n\t\treturn target;\n\t}\n\n\tconst targetAsMap = target as { [id: string]: unknown };\n\tconst source = sources.shift();\n\n\tlet keys;\n\tif (isObject(targetAsMap) && isObject(source)) {\n\t\tkeys = Object.keys(source);\n\t} else if (Array.isArray(source)) {\n\t\tif (!Array.isArray(target)) {\n\t\t\treturn source;\n\t\t}\n\t\tkeys = Object.keys(source).map((k) => Number.parseInt(k, 10));\n\t}\n\n\tif (keys) {\n\t\tconst sourceAsMap = source as { [id: string]: unknown };\n\t\tfor (const key of keys) {\n\t\t\tconst value = sourceAsMap[key];\n\t\t\tif (isObject(value)) {\n\t\t\t\tif (isEmpty(targetAsMap[key])) {\n\t\t\t\t\ttargetAsMap[key] = {};\n\t\t\t\t}\n\t\t\t\tdeepMerge(targetAsMap[key], value);\n\t\t\t} else if (Array.isArray(value)) {\n\t\t\t\tif (isEmpty(targetAsMap[key])) {\n\t\t\t\t\ttargetAsMap[key] = [];\n\t\t\t\t}\n\t\t\t\tdeepMerge(targetAsMap[key], value);\n\t\t\t} else {\n\t\t\t\ttargetAsMap[key] = value;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn deepMerge(target, ...sources);\n}\n\n/**\n * Polyfills randomUUID if running in a non-secure context.\n * @returns The random UUID.\n */\nexport function randomUUID(): string {\n\tif (\"randomUUID\" in globalThis.crypto) {\n\t\t// eslint-disable-next-line no-restricted-syntax\n\t\treturn globalThis.crypto.randomUUID();\n\t}\n\t// Polyfill the window.crypto.randomUUID if we are running in a non secure context that doesn't have it\n\t// we are still using window.crypto.getRandomValues which is always available\n\t// https://stackoverflow.com/a/2117523/2800218\n\t/**\n\t * Get random hex value.\n\t * @param c The number to base the random value on.\n\t * @returns The random value.\n\t */\n\tfunction getRandomHex(c: string): string {\n\t\t// eslint-disable-next-line no-bitwise\n\t\tconst rnd = globalThis.crypto.getRandomValues(new Uint8Array(1))[0] & (15 >> (Number(c) / 4));\n\t\treturn (\n\t\t\t// eslint-disable-next-line no-bitwise\n\t\t\t(Number(c) ^ rnd).toString(16)\n\t\t);\n\t}\n\treturn \"10000000-1000-4000-8000-100000000000\".replace(/[018]/g, getRandomHex);\n}\n\n/**\n * Format an error to a readable string.\n * @param err The error to format.\n * @returns The formatted error.\n */\nexport function formatError(err: unknown): string {\n\tif (isEmpty(err)) {\n\t\treturn \"\";\n\t} else if (err instanceof Error) {\n\t\treturn err.message;\n\t} else if (isStringValue(err)) {\n\t\treturn err;\n\t} else if (isObject(err) && \"message\" in err && isString(err.message)) {\n\t\treturn err.message;\n\t}\n\treturn JSON.stringify(err);\n}\n\n/**\n * A basic string sanitize function that removes angle brackets <> from a string.\n * @param content the content to sanitize\n * @returns a string without angle brackets <>\n */\nexport function sanitizeString(content: unknown): string {\n\tif (isStringValue(content)) {\n\t\treturn content\n\t\t\t.replace(/<[^>]*>?/gm, \"\")\n\t\t\t.replace(/>/g, \">\")\n\t\t\t.replace(/</g, \"<\")\n\t\t\t.replace(/&/g, \"&\")\n\t\t\t.replace(/ /g, \" \")\n\t\t\t.replace(/\\n\\s*\\n/g, \"\\n\");\n\t}\n\treturn \"\";\n}\n\n/**\n * Get the command line arguments from a command line string.\n * Examples of command line strings: arg1 key1=value1 key2=\"value with spaces\" key3='value3' key4='value with more spaces'`.\n * @param commandLine The command line string.\n * @returns The command line arguments or an empty array if none\n */\nexport function getCommandLineArgs(commandLine: string): string[] {\n\tif (!isStringValue(commandLine)) {\n\t\treturn [];\n\t}\n\tconst matches = commandLine.match(/(\\w+=)?(\"[^\"]*\"|'[^']*'|[^ ]+)/g);\n\tif (isEmpty(matches)) {\n\t\treturn [];\n\t}\n\treturn matches;\n}\n","export { default as v1 } from './v1.js';\nexport { default as v3 } from './v3.js';\nexport { default as v4 } from './v4.js';\nexport { default as v5 } from './v5.js';\nexport { default as NIL } from './nil.js';\nexport { default as version } from './version.js';\nexport { default as validate } from './validate.js';\nexport { default as stringify } from './stringify.js';\nexport { default as parse } from './parse.js';","/*\n * Browser-compatible JavaScript MD5\n *\n * Modification of JavaScript MD5\n * https://github.com/blueimp/JavaScript-MD5\n *\n * Copyright 2011, Sebastian Tschan\n * https://blueimp.net\n *\n * Licensed under the MIT license:\n * https://opensource.org/licenses/MIT\n *\n * Based on\n * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message\n * Digest Algorithm, as defined in RFC 1321.\n * Version 2.2 Copyright (C) Paul Johnston 1999 - 2009\n * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet\n * Distributed under the BSD License\n * See http://pajhome.org.uk/crypt/md5 for more info.\n */\nfunction md5(bytes) {\n if (typeof bytes === 'string') {\n var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape\n\n bytes = new Uint8Array(msg.length);\n\n for (var i = 0; i < msg.length; ++i) {\n bytes[i] = msg.charCodeAt(i);\n }\n }\n\n return md5ToHexEncodedArray(wordsToMd5(bytesToWords(bytes), bytes.length * 8));\n}\n/*\n * Convert an array of little-endian words to an array of bytes\n */\n\n\nfunction md5ToHexEncodedArray(input) {\n var output = [];\n var length32 = input.length * 32;\n var hexTab = '0123456789abcdef';\n\n for (var i = 0; i < length32; i += 8) {\n var x = input[i >> 5] >>> i % 32 & 0xff;\n var hex = parseInt(hexTab.charAt(x >>> 4 & 0x0f) + hexTab.charAt(x & 0x0f), 16);\n output.push(hex);\n }\n\n return output;\n}\n/**\n * Calculate output length with padding and bit length\n */\n\n\nfunction getOutputLength(inputLength8) {\n return (inputLength8 + 64 >>> 9 << 4) + 14 + 1;\n}\n/*\n * Calculate the MD5 of an array of little-endian words, and a bit length.\n */\n\n\nfunction wordsToMd5(x, len) {\n /* append padding */\n x[len >> 5] |= 0x80 << len % 32;\n x[getOutputLength(len) - 1] = len;\n var a = 1732584193;\n var b = -271733879;\n var c = -1732584194;\n var d = 271733878;\n\n for (var i = 0; i < x.length; i += 16) {\n var olda = a;\n var oldb = b;\n var oldc = c;\n var oldd = d;\n a = md5ff(a, b, c, d, x[i], 7, -680876936);\n d = md5ff(d, a, b, c, x[i + 1], 12, -389564586);\n c = md5ff(c, d, a, b, x[i + 2], 17, 606105819);\n b = md5ff(b, c, d, a, x[i + 3], 22, -1044525330);\n a = md5ff(a, b, c, d, x[i + 4], 7, -176418897);\n d = md5ff(d, a, b, c, x[i + 5], 12, 1200080426);\n c = md5ff(c, d, a, b, x[i + 6], 17, -1473231341);\n b = md5ff(b, c, d, a, x[i + 7], 22, -45705983);\n a = md5ff(a, b, c, d, x[i + 8], 7, 1770035416);\n d = md5ff(d, a, b, c, x[i + 9], 12, -1958414417);\n c = md5ff(c, d, a, b, x[i + 10], 17, -42063);\n b = md5ff(b, c, d, a, x[i + 11], 22, -1990404162);\n a = md5ff(a, b, c, d, x[i + 12], 7, 1804603682);\n d = md5ff(d, a, b, c, x[i + 13], 12, -40341101);\n c = md5ff(c, d, a, b, x[i + 14], 17, -1502002290);\n b = md5ff(b, c, d, a, x[i + 15], 22, 1236535329);\n a = md5gg(a, b, c, d, x[i + 1], 5, -165796510);\n d = md5gg(d, a, b, c, x[i + 6], 9, -1069501632);\n c = md5gg(c, d, a, b, x[i + 11], 14, 643717713);\n b = md5gg(b, c, d, a, x[i], 20, -373897302);\n a = md5gg(a, b, c, d, x[i + 5], 5, -701558691);\n d = md5gg(d, a, b, c, x[i + 10], 9, 38016083);\n c = md5gg(c, d, a, b, x[i + 15], 14, -660478335);\n b = md5gg(b, c, d, a, x[i + 4], 20, -405537848);\n a = md5gg(a, b, c, d, x[i + 9], 5, 568446438);\n d = md5gg(d, a, b, c, x[i + 14], 9, -1019803690);\n c = md5gg(c, d, a, b, x[i + 3], 14, -187363961);\n b = md5gg(b, c, d, a, x[i + 8], 20, 1163531501);\n a = md5gg(a, b, c, d, x[i + 13], 5, -1444681467);\n d = md5gg(d, a, b, c, x[i + 2], 9, -51403784);\n c = md5gg(c, d, a, b, x[i + 7], 14, 1735328473);\n b = md5gg(b, c, d, a, x[i + 12], 20, -1926607734);\n a = md5hh(a, b, c, d, x[i + 5], 4, -378558);\n d = md5hh(d, a, b, c, x[i + 8], 11, -2022574463);\n c = md5hh(c, d, a, b, x[i + 11], 16, 1839030562);\n b = md5hh(b, c, d, a, x[i + 14], 23, -35309556);\n a = md5hh(a, b, c, d, x[i + 1], 4, -1530992060);\n d = md5hh(d, a, b, c, x[i + 4], 11, 1272893353);\n c = md5hh(c, d, a, b, x[i + 7], 16, -155497632);\n b = md5hh(b, c, d, a, x[i + 10], 23, -1094730640);\n a = md5hh(a, b, c, d, x[i + 13], 4, 681279174);\n d = md5hh(d, a, b, c, x[i], 11, -358537222);\n c = md5hh(c, d, a, b, x[i + 3], 16, -722521979);\n b = md5hh(b, c, d, a, x[i + 6], 23, 76029189);\n a = md5hh(a, b, c, d, x[i + 9], 4, -640364487);\n d = md5hh(d, a, b, c, x[i + 12], 11, -421815835);\n c = md5hh(c, d, a, b, x[i + 15], 16, 530742520);\n b = md5hh(b, c, d, a, x[i + 2], 23, -995338651);\n a = md5ii(a, b, c, d, x[i], 6, -198630844);\n d = md5ii(d, a, b, c, x[i + 7], 10, 1126891415);\n c = md5ii(c, d, a, b, x[i + 14], 15, -1416354905);\n b = md5ii(b, c, d, a, x[i + 5], 21, -57434055);\n a = md5ii(a, b, c, d, x[i + 12], 6, 1700485571);\n d = md5ii(d, a, b, c, x[i + 3], 10, -1894986606);\n c = md5ii(c, d, a, b, x[i + 10], 15, -1051523);\n b = md5ii(b, c, d, a, x[i + 1], 21, -2054922799);\n a = md5ii(a, b, c, d, x[i + 8], 6, 1873313359);\n d = md5ii(d, a, b, c, x[i + 15], 10, -30611744);\n c = md5ii(c, d, a, b, x[i + 6], 15, -1560198380);\n b = md5ii(b, c, d, a, x[i + 13], 21, 1309151649);\n a = md5ii(a, b, c, d, x[i + 4], 6, -145523070);\n d = md5ii(d, a, b, c, x[i + 11], 10, -1120210379);\n c = md5ii(c, d, a, b, x[i + 2], 15, 718787259);\n b = md5ii(b, c, d, a, x[i + 9], 21, -343485551);\n a = safeAdd(a, olda);\n b = safeAdd(b, oldb);\n c = safeAdd(c, oldc);\n d = safeAdd(d, oldd);\n }\n\n return [a, b, c, d];\n}\n/*\n * Convert an array bytes to an array of little-endian words\n * Characters >255 have their high-byte silently ignored.\n */\n\n\nfunction bytesToWords(input) {\n if (input.length === 0) {\n return [];\n }\n\n var length8 = input.length * 8;\n var output = new Uint32Array(getOutputLength(length8));\n\n for (var i = 0; i < length8; i += 8) {\n output[i >> 5] |= (input[i / 8] & 0xff) << i % 32;\n }\n\n return output;\n}\n/*\n * Add integers, wrapping at 2^32. This uses 16-bit operations internally\n * to work around bugs in some JS interpreters.\n */\n\n\nfunction safeAdd(x, y) {\n var lsw = (x & 0xffff) + (y & 0xffff);\n var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n return msw << 16 | lsw & 0xffff;\n}\n/*\n * Bitwise rotate a 32-bit number to the left.\n */\n\n\nfunction bitRotateLeft(num, cnt) {\n return num << cnt | num >>> 32 - cnt;\n}\n/*\n * These functions implement the four basic operations the algorithm uses.\n */\n\n\nfunction md5cmn(q, a, b, x, s, t) {\n return safeAdd(bitRotateLeft(safeAdd(safeAdd(a, q), safeAdd(x, t)), s), b);\n}\n\nfunction md5ff(a, b, c, d, x, s, t) {\n return md5cmn(b & c | ~b & d, a, b, x, s, t);\n}\n\nfunction md5gg(a, b, c, d, x, s, t) {\n return md5cmn(b & d | c & ~d, a, b, x, s, t);\n}\n\nfunction md5hh(a, b, c, d, x, s, t) {\n return md5cmn(b ^ c ^ d, a, b, x, s, t);\n}\n\nfunction md5ii(a, b, c, d, x, s, t) {\n return md5cmn(c ^ (b | ~d), a, b, x, s, t);\n}\n\nexport default md5;","export default '00000000-0000-0000-0000-000000000000';","import validate from './validate.js';\n\nfunction parse(uuid) {\n if (!validate(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n var v;\n var arr = new Uint8Array(16); // Parse ########-....-....-....-............\n\n arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24;\n arr[1] = v >>> 16 & 0xff;\n arr[2] = v >>> 8 & 0xff;\n arr[3] = v & 0xff; // Parse ........-####-....-....-............\n\n arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8;\n arr[5] = v & 0xff; // Parse ........-....-####-....-............\n\n arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8;\n arr[7] = v & 0xff; // Parse ........-....-....-####-............\n\n arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8;\n arr[9] = v & 0xff; // Parse ........-....-....-....-############\n // (Use \"/\" to avoid 32-bit truncation when bit-shifting high-order bytes)\n\n arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff;\n arr[11] = v / 0x100000000 & 0xff;\n arr[12] = v >>> 24 & 0xff;\n arr[13] = v >>> 16 & 0xff;\n arr[14] = v >>> 8 & 0xff;\n arr[15] = v & 0xff;\n return arr;\n}\n\nexport default parse;","export default /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;","// Unique ID creation requires a high quality random # generator. In the browser we therefore\n// require the crypto API and do not support built-in fallback to lower quality random number\n// generators (like Math.random()).\nvar getRandomValues;\nvar rnds8 = new Uint8Array(16);\nexport default function rng() {\n // lazy load so that environments that need to polyfill have a chance to do so\n if (!getRandomValues) {\n // getRandomValues needs to be invoked in a context where \"this\" is a Crypto implementation. Also,\n // find the complete implementation of crypto (msCrypto) on IE11.\n getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto !== 'undefined' && typeof msCrypto.getRandomValues === 'function' && msCrypto.getRandomValues.bind(msCrypto);\n\n if (!getRandomValues) {\n throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');\n }\n }\n\n return getRandomValues(rnds8);\n}","// Adapted from Chris Veness' SHA1 code at\n// http://www.movable-type.co.uk/scripts/sha1.html\nfunction f(s, x, y, z) {\n switch (s) {\n case 0:\n return x & y ^ ~x & z;\n\n case 1:\n return x ^ y ^ z;\n\n case 2:\n return x & y ^ x & z ^ y & z;\n\n case 3:\n return x ^ y ^ z;\n }\n}\n\nfunction ROTL(x, n) {\n return x << n | x >>> 32 - n;\n}\n\nfunction sha1(bytes) {\n var K = [0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xca62c1d6];\n var H = [0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0];\n\n if (typeof bytes === 'string') {\n var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape\n\n bytes = [];\n\n for (var i = 0; i < msg.length; ++i) {\n bytes.push(msg.charCodeAt(i));\n }\n } else if (!Array.isArray(bytes)) {\n // Convert Array-like to Array\n bytes = Array.prototype.slice.call(bytes);\n }\n\n bytes.push(0x80);\n var l = bytes.length / 4 + 2;\n var N = Math.ceil(l / 16);\n var M = new Array(N);\n\n for (var _i = 0; _i < N; ++_i) {\n var arr = new Uint32Array(16);\n\n for (var j = 0; j < 16; ++j) {\n arr[j] = bytes[_i * 64 + j * 4] << 24 | bytes[_i * 64 + j * 4 + 1] << 16 | bytes[_i * 64 + j * 4 + 2] << 8 | bytes[_i * 64 + j * 4 + 3];\n }\n\n M[_i] = arr;\n }\n\n M[N - 1][14] = (bytes.length - 1) * 8 / Math.pow(2, 32);\n M[N - 1][14] = Math.floor(M[N - 1][14]);\n M[N - 1][15] = (bytes.length - 1) * 8 & 0xffffffff;\n\n for (var _i2 = 0; _i2 < N; ++_i2) {\n var W = new Uint32Array(80);\n\n for (var t = 0; t < 16; ++t) {\n W[t] = M[_i2][t];\n }\n\n for (var _t = 16; _t < 80; ++_t) {\n W[_t] = ROTL(W[_t - 3] ^ W[_t - 8] ^ W[_t - 14] ^ W[_t - 16], 1);\n }\n\n var a = H[0];\n var b = H[1];\n var c = H[2];\n var d = H[3];\n var e = H[4];\n\n for (var _t2 = 0; _t2 < 80; ++_t2) {\n var s = Math.floor(_t2 / 20);\n var T = ROTL(a, 5) + f(s, b, c, d) + e + K[s] + W[_t2] >>> 0;\n e = d;\n d = c;\n c = ROTL(b, 30) >>> 0;\n b = a;\n a = T;\n }\n\n H[0] = H[0] + a >>> 0;\n H[1] = H[1] + b >>> 0;\n H[2] = H[2] + c >>> 0;\n H[3] = H[3] + d >>> 0;\n H[4] = H[4] + e >>> 0;\n }\n\n return [H[0] >> 24 & 0xff, H[0] >> 16 & 0xff, H[0] >> 8 & 0xff, H[0] & 0xff, H[1] >> 24 & 0xff, H[1] >> 16 & 0xff, H[1] >> 8 & 0xff, H[1] & 0xff, H[2] >> 24 & 0xff, H[2] >> 16 & 0xff, H[2] >> 8 & 0xff, H[2] & 0xff, H[3] >> 24 & 0xff, H[3] >> 16 & 0xff, H[3] >> 8 & 0xff, H[3] & 0xff, H[4] >> 24 & 0xff, H[4] >> 16 & 0xff, H[4] >> 8 & 0xff, H[4] & 0xff];\n}\n\nexport default sha1;","import validate from './validate.js';\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\n\nvar byteToHex = [];\n\nfor (var i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).substr(1));\n}\n\nfunction stringify(arr) {\n var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n var uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!validate(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n\n return uuid;\n}\n\nexport default stringify;","import rng from './rng.js';\nimport stringify from './stringify.js'; // **`v1()` - Generate time-based UUID**\n//\n// Inspired by https://github.com/LiosK/UUID.js\n// and http://docs.python.org/library/uuid.html\n\nvar _nodeId;\n\nvar _clockseq; // Previous uuid creation time\n\n\nvar _lastMSecs = 0;\nvar _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details\n\nfunction v1(options, buf, offset) {\n var i = buf && offset || 0;\n var b = buf || new Array(16);\n options = options || {};\n var node = options.node || _nodeId;\n var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not\n // specified. We do this lazily to minimize issues related to insufficient\n // system entropy. See #189\n\n if (node == null || clockseq == null) {\n var seedBytes = options.random || (options.rng || rng)();\n\n if (node == null) {\n // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)\n node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]];\n }\n\n if (clockseq == null) {\n // Per 4.2.2, randomize (14 bit) clockseq\n clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;\n }\n } // UUID timestamps are 100 nano-second units since the Gregorian epoch,\n // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so\n // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'\n // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.\n\n\n var msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock\n // cycle to simulate higher resolution clock\n\n var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs)\n\n var dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression\n\n if (dt < 0 && options.clockseq === undefined) {\n clockseq = clockseq + 1 & 0x3fff;\n } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new\n // time interval\n\n\n if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {\n nsecs = 0;\n } // Per 4.2.1.2 Throw error if too many uuids are requested\n\n\n if (nsecs >= 10000) {\n throw new Error(\"uuid.v1(): Can't create more than 10M uuids/sec\");\n }\n\n _lastMSecs = msecs;\n _lastNSecs = nsecs;\n _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch\n\n msecs += 12219292800000; // `time_low`\n\n var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;\n b[i++] = tl >>> 24 & 0xff;\n b[i++] = tl >>> 16 & 0xff;\n b[i++] = tl >>> 8 & 0xff;\n b[i++] = tl & 0xff; // `time_mid`\n\n var tmh = msecs / 0x100000000 * 10000 & 0xfffffff;\n b[i++] = tmh >>> 8 & 0xff;\n b[i++] = tmh & 0xff; // `time_high_and_version`\n\n b[i++] = tmh >>> 24 & 0xf | 0x10; // include version\n\n b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)\n\n b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low`\n\n b[i++] = clockseq & 0xff; // `node`\n\n for (var n = 0; n < 6; ++n) {\n b[i + n] = node[n];\n }\n\n return buf || stringify(b);\n}\n\nexport default v1;","import v35 from './v35.js';\nimport md5 from './md5.js';\nvar v3 = v35('v3', 0x30, md5);\nexport default v3;","import stringify from './stringify.js';\nimport parse from './parse.js';\n\nfunction stringToBytes(str) {\n str = unescape(encodeURIComponent(str)); // UTF8 escape\n\n var bytes = [];\n\n for (var i = 0; i < str.length; ++i) {\n bytes.push(str.charCodeAt(i));\n }\n\n return bytes;\n}\n\nexport var DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8';\nexport var URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8';\nexport default function (name, version, hashfunc) {\n function generateUUID(value, namespace, buf, offset) {\n if (typeof value === 'string') {\n value = stringToBytes(value);\n }\n\n if (typeof namespace === 'string') {\n namespace = parse(namespace);\n }\n\n if (namespace.length !== 16) {\n throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)');\n } // Compute hash of namespace and value, Per 4.3\n // Future: Use spread syntax when supported on all platforms, e.g. `bytes =\n // hashfunc([...namespace, ... value])`\n\n\n var bytes = new Uint8Array(16 + value.length);\n bytes.set(namespace);\n bytes.set(value, namespace.length);\n bytes = hashfunc(bytes);\n bytes[6] = bytes[6] & 0x0f | version;\n bytes[8] = bytes[8] & 0x3f | 0x80;\n\n if (buf) {\n offset = offset || 0;\n\n for (var i = 0; i < 16; ++i) {\n buf[offset + i] = bytes[i];\n }\n\n return buf;\n }\n\n return stringify(bytes);\n } // Function#name is not settable on some platforms (#270)\n\n\n try {\n generateUUID.name = name; // eslint-disable-next-line no-empty\n } catch (err) {} // For CommonJS default export support\n\n\n generateUUID.DNS = DNS;\n generateUUID.URL = URL;\n return generateUUID;\n}","import rng from './rng.js';\nimport stringify from './stringify.js';\n\nfunction v4(options, buf, offset) {\n options = options || {};\n var rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n offset = offset || 0;\n\n for (var i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n\n return buf;\n }\n\n return stringify(rnds);\n}\n\nexport default v4;","import v35 from './v35.js';\nimport sha1 from './sha1.js';\nvar v5 = v35('v5', 0x50, sha1);\nexport default v5;","import REGEX from './regex.js';\n\nfunction validate(uuid) {\n return typeof uuid === 'string' && REGEX.test(uuid);\n}\n\nexport default validate;","import validate from './validate.js';\n\nfunction version(uuid) {\n if (!validate(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n return parseInt(uuid.substr(14, 1), 16);\n}\n\nexport default version;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","__webpack_require__.amdO = {};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = (module) => {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","import { cloudInteropOverride } from \"@openfin/cloud-interop\";\nimport type { OpenFin } from \"@openfin/core\";\nimport { connect, type WebLayoutSnapshot } from \"@openfin/core-web\";\nimport { AppResolverHelper } from \"./platform/apps/app-resolver-helper\";\nimport { getConstructorOverride } from \"./platform/broker/interop-override\";\nimport { makeOverride } from \"./platform/layout/layout-override\";\nimport { getDefaultLayout, getSettings } from \"./platform/settings/settings\";\nimport { SettingsResolverHelper } from \"./platform/settings/settings-resolver-helper\";\nimport type { Settings } from \"./shapes/setting-shapes\";\nimport { sanitizeString } from \"./utils\";\n\n/**\n * Attach listeners to elements.\n */\nasync function attachListeners(): Promise {\n\t// Get the required settings\n\tconst settings = await getSettings();\n\tif (settings !== undefined) {\n\t\tconst layoutSelectorId = `#${settings.platform.layout.layoutSelectorId}`;\n\t\tconst deleteLayoutId = `#${settings.platform.layout.deleteLayoutId}`;\n\t\tconst addLayoutId = `#${settings.platform.layout.addLayoutId}`;\n\t\tconst addLayoutButton = document.querySelector(addLayoutId);\n\t\tconst deleteButton = document.querySelector(deleteLayoutId);\n\t\tconst settingsButton = document.querySelector(\"#settings\");\n\t\tconst layoutSelector = document.querySelector(layoutSelectorId);\n\t\tif (deleteButton !== null && layoutSelector !== null) {\n\t\t\tdeleteButton?.addEventListener(\"click\", async () => {\n\t\t\t\tawait deleteCurrentLayout();\n\t\t\t});\n\t\t\t// Create a MutationObserver to watch for changes in the child list of the select element\n\t\t\tconst observer = new MutationObserver(() => {\n\t\t\t\t// Update the enabled state of the trash button based on the number of options\n\t\t\t\tdeleteButton.disabled = !(layoutSelector.options.length > 1);\n\t\t\t\tconst refreshEvent = new CustomEvent(\"refresh-context-group\");\n\t\t\t\twindow.dispatchEvent(refreshEvent);\n\t\t\t});\n\n\t\t\t// Start observing the select element with the configured parameters\n\t\t\tobserver.observe(layoutSelector, { childList: true });\n\t\t}\n\t\tif (addLayoutButton !== null) {\n\t\t\tconst addResolverHelper = new AppResolverHelper(settings.platform.app.appResolver, console);\n\t\t\taddLayoutButton?.addEventListener(\"click\", async () => {\n\t\t\t\tawait addResolverHelper.launchAppResolver();\n\t\t\t});\n\t\t}\n\t\tif (settingsButton !== null) {\n\t\t\tconst settingsResolverHelper = new SettingsResolverHelper(\n\t\t\t\tsettings.platform.ui.settingsResolver,\n\t\t\t\tconsole\n\t\t\t);\n\t\t\tsettingsButton.addEventListener(\"click\", async () => {\n\t\t\t\tawait settingsResolverHelper.showSettings();\n\t\t\t});\n\t\t}\n\t}\n}\n\n/**\n * Update the DOM with the settings.\n * @param settings passing the settings for use.\n */\nfunction updateDOM(settings: Settings | undefined): void {\n\tconst title = document.querySelector(\"#title\");\n\tconst subTitle = document.querySelector(\"#subTitle\");\n\tconst logo = document.querySelector(\"#logo\");\n\tif (title === null || subTitle === null || logo === null || settings === undefined) {\n\t\tconsole.error(\n\t\t\t\"Unable to use settings as there are missing input fields/buttons or settings have not been provided.\"\n\t\t);\n\t\treturn;\n\t}\n\tconst documentTitle = sanitizeString(settings?.platform?.ui?.title ?? \"\");\n\ttitle.textContent = documentTitle;\n\tdocument.title = documentTitle;\n\tsubTitle.textContent = sanitizeString(settings?.platform?.ui?.subTitle ?? \"\");\n\tconst documentIcon = sanitizeString(settings?.platform?.ui?.logo ?? \"\");\n\tlogo.src = documentIcon;\n\tconst fav = document.querySelector(\"#favicon\");\n\tif (fav !== null && documentIcon !== \"\") {\n\t\tfav.href = documentIcon;\n\t}\n}\n\n/**\n * Listen for config requests.\n * @param settings passing the settings for use.\n */\nfunction listenForConfigRequests(settings: Settings): void {\n\t// This allows iframes that are not in the layout to request the connect details if they do not have them\n\t// available to them.\n\twindow.addEventListener(\n\t\t\"message\",\n\t\t(event) => {\n\t\t\t// Check the origin of the message\n\t\t\t// this is where you could check to see if the request is coming from domains registered in your app directory\n\t\t\t// alternatively this logic could be done in the interop broker when the connection is attempted. These are\n\t\t\t// just example origins we have put\n\t\t\tif (\n\t\t\t\tevent.origin !== \"https://built-on-openfin.github.io\" &&\n\t\t\t\t!event.origin.startsWith(\"http://localhost:\")\n\t\t\t) {\n\t\t\t\tconsole.warn(`Incoming request came from an untrusted domain: ${event.origin}`);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// The data sent with postMessage is stored in event.data\n\t\t\tconst request = event.data;\n\t\t\tconsole.log(\n\t\t\t\t`Incoming request coming from: ${event.origin}. Received request: ${JSON.stringify(request)}`\n\t\t\t);\n\n\t\t\t// this just our example namespace. You could create your own and decide what data to pass.\n\t\t\tconst connectConfigContextType = \"openfin.coreWeb.connectConfig\";\n\t\t\t// ensure it is requesting connect details for core web\n\t\t\tif (request.type === connectConfigContextType) {\n\t\t\t\t// send back the connect details required by the client\n\t\t\t\tevent.source?.postMessage(\n\t\t\t\t\t{\n\t\t\t\t\t\ttype: connectConfigContextType,\n\t\t\t\t\t\tconnectConfig: {\n\t\t\t\t\t\t\toptions: {\n\t\t\t\t\t\t\t\tbrokerUrl: settings.platform.interop.brokerUrl,\n\t\t\t\t\t\t\t\tinteropConfig: {\n\t\t\t\t\t\t\t\t\tproviderId: settings.platform.interop.providerId,\n\t\t\t\t\t\t\t\t\tcurrentContextGroup: settings.platform.interop.defaultContextGroup\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\t{ targetOrigin: event.origin }\n\t\t\t\t);\n\t\t\t}\n\t\t},\n\t\tfalse\n\t);\n}\n\n/**\n * Delete the current layout.\n */\nasync function deleteCurrentLayout(): Promise {\n\tconst currentLayout = window.fin?.Platform.Layout.getCurrentLayoutManagerSync();\n\tif (currentLayout) {\n\t\tconst selectedLayout = currentLayout.resolveLayoutIdentity();\n\t\tif (selectedLayout) {\n\t\t\tawait currentLayout.removeLayout(selectedLayout);\n\t\t}\n\t}\n}\n\n/**\n * Initializes the OpenFin Web Broker connection.\n */\nasync function init(): Promise {\n\t// Get the required settings\n\tconst settings = await getSettings();\n\n\t// apply any settings to the UI\n\tupdateDOM(settings);\n\n\t// Get the default layout\n\tconst layoutSnapshot = await getDefaultLayout();\n\n\tif (settings === undefined || layoutSnapshot === undefined) {\n\t\tconsole.error(\n\t\t\t\"Unable to run the sample as we have been unable to load the web manifest and it's settings from the currently running html page. Please ensure that the web manifest is being served and that it contains the custom_settings section.\"\n\t\t);\n\t\treturn;\n\t}\n\n\tlistenForConfigRequests(settings);\n\n\t// Connect to the OpenFin Web Broker and pass the default layout.\n\t// It is good practice to specify providerId even if content is explicitly specifying it for cases where\n\t// this provider uses our layout system and content uses inheritance. currentContextGroup\n\t// is useful for defaulting any client that uses inheritance through our layout system.\n\tconst fin = await connect({\n\t\toptions: {\n\t\t\tbrokerUrl: settings.platform.interop.brokerUrl,\n\t\t\tinteropConfig: {\n\t\t\t\tproviderId: settings.platform.interop.providerId,\n\t\t\t\tcurrentContextGroup: settings.platform.interop.defaultContextGroup\n\t\t\t}\n\t\t},\n\t\tconnectionInheritance: \"enabled\",\n\t\tplatform: { layoutSnapshot: layoutSnapshot as WebLayoutSnapshot }\n\t});\n\n\tif (fin) {\n\t\t// Store the fin object in the window object for easy access.\n\t\twindow.fin = fin;\n\t\tconst layoutManagerOverride = makeOverride(\n\t\t\tfin,\n\t\t\tsettings.platform.layout.layoutContainerId,\n\t\t\tsettings.platform.layout.layoutSelectorId\n\t\t);\n\n\t\tconst interopOverride = await getConstructorOverride(settings.platform.interop.overrideOptions);\n\t\tconst overrides = [interopOverride];\n\n\t\tif (settings?.platform?.cloudInterop?.connectParams?.url?.startsWith(\"http\")) {\n\t\t\tconst cloudOverride = (await cloudInteropOverride(\n\t\t\t\tsettings.platform.cloudInterop.connectParams\n\t\t\t)) as unknown as OpenFin.ConstructorOverride;\n\t\t\toverrides.push(cloudOverride);\n\t\t}\n\t\t// You may now use the `fin` object to initialize the broker and the layout.\n\t\tawait fin.Interop.init(settings.platform.interop.providerId, overrides);\n\t\t// Show the main container and hide the loading container\n\t\t// initialize the layout and pass it the dom element to bind to\n\t\tawait fin.Platform.Layout.init({\n\t\t\tlayoutManagerOverride,\n\t\t\tcontainerId: settings.platform.layout.layoutContainerId\n\t\t});\n\t\t// now that everything has been setup notify others of globals\n\t\tconst finReadyEvent = new CustomEvent(\"finReady\");\n\t\twindow.dispatchEvent(finReadyEvent);\n\t\tif (window.fdc3 === undefined && window?.fin?.me.interop?.getFDC3Sync !== undefined) {\n\t\t\twindow.fdc3 = fin.me.interop.getFDC3Sync(\"2.0\");\n\t\t\tconsole.log(\"Finished initializing the fdc3 API.\");\n\t\t\t// Create and dispatch the FDC3Ready event\n\t\t\tconst fdc3ReadyEvent = new CustomEvent(\"fdc3Ready\");\n\t\t\twindow.dispatchEvent(fdc3ReadyEvent);\n\t\t}\n\t\t// setup listeners now that everything has been initialized\n\t\tawait attachListeners();\n\t}\n}\n\ninit()\n\t.then(() => {\n\t\tconsole.log(\"Connected to the OpenFin Web Broker.\");\n\t\treturn true;\n\t})\n\t.catch((err) => console.error(err));\n"],"names":[],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"provider.bundle.js","mappings":";;;;;;;;;;;;;;;AAAgC;;AAEhC;AACA;AACA;AACA;AACA;;AAEA;;AAEA,OAAO,UAAU;AACjB,OAAO,gBAAgB;;AAEvB;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,SAAS;AACtB;AACA,OAAO,SAAS;;AAEhB;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;;AAGA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,UAAU;AACrB;AACA,WAAW,SAAS;AACpB,aAAa;AACb;AACA,2BAA2B,oBAAoB,IAAI;AACnD;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,gCAAgC,OAAO;AACvC;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,wFAAwF,qBAAM;AAC9F,CAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,SAAS,GAAG,SAAS;AAC5C,4BAA4B;AAC5B;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA,SAAS,UAAU;AACnB;AACA;AACA;AACA;AACA;AACA,MAAM;AACN,kCAAkC;AAClC,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;;AAEA,wCAAwC,OAAO;AAC/C;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,WAAW,SAAS;AACpB,aAAa,QAAQ;AACrB;AACA,gCAAgC,WAAW,IAAI;AAC/C;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,GAAG,GAAG,WAAW;AACjB;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,kBAAkB;AAC7B,WAAW,UAAU;AACrB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B,WAAW,UAAU;AACrB;AACA,aAAa;AACb;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,0BAA0B,eAAe;;AAEzC;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;AACA;AACA,WAAW,QAAQ;AACnB;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,SAAS,QAAQ;AACjB;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,SAAS;AACpB;AACA,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,aAAa,OAAO;AACpB;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB,CAAC;;AAED;AACA,oDAAoD,YAAY;;AAEhE;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA,GAAG;;AAEH;;AAEA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA,WAAW,YAAY;AACvB;AACA,aAAa;AACb;AACA;AACA;AACA;;AAEA,mDAAmD;AACnD;AACA,CAAC;;AAED;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB,WAAW,SAAS;AACpB,WAAW,UAAU;AACrB,WAAW,SAAS;AACpB,WAAW,SAAS;AACpB,WAAW,UAAU;AACrB;AACA,aAAa;AACb;;AAEA;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B,WAAW,QAAQ;AACnB,WAAW,qBAAqB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,yEAAyE,0CAAM;AAC/E;;AAEA;AACA;;AAEA;AACA;AACA;AACA,aAAa,GAAG;AAChB,aAAa,eAAe;AAC5B,aAAa,sBAAsB;AACnC,YAAY;AACZ;AACA,eAAe,SAAS;AACxB;AACA;AACA;;AAEA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA,WAAW,qBAAqB;AAChC,WAAW,qBAAqB;AAChC;AACA,aAAa;AACb;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,UAAU;AACvB,aAAa,UAAU;AACvB;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,eAAe,SAAS;AACxB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,UAAU;AACvB;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA,WAAW,YAAY;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,4BAA4B;AACzC;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gEAAgE;AAChE;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,wBAAwB,iBAAiB;AACzC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,GAAG;;AAEH;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,MAAM;AACN;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,2BAA2B,mBAAmB;AAC9C;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,KAAK;AACL,GAAG;AACH;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,oDAAoD,MAAM;AAC1D,oDAAoD;AACpD;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;AAEA;;AAEA;AACA;AACA;AACA,WAAW,gBAAgB;AAC3B,WAAW,SAAS;AACpB;AACA,aAAa,GAAG;AAChB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;;AAEH;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,SAAS;AACpB,WAAW,SAAS;AACpB,WAAW,SAAS;AACpB;AACA,aAAa,eAAe;AAC5B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA,uCAAuC;AACvC,KAAK;;AAEL;AACA,0DAA0D,wBAAwB;AAClF;AACA,KAAK;;AAEL;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,cAAc;AACd;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc,QAAQ;AACtB,gBAAgB;AAChB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,cAAc,QAAQ;AACtB,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA,0BAA0B,KAAK;AAC/B;AACA;;AAEA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,SAAS,6BAA6B;AACtC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,8CAA8C;AAC9C,QAAQ;AACR;AACA,oEAAoE;AACpE,yFAAyF;AACzF;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;;AAEP;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;;AAGA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,yCAAyC,MAAM;AAC/C,MAAM;AACN;AACA;AACA,8CAA8C,MAAM;AACpD;AACA,CAAC;;AAED,sCAAsC,OAAO;;AAE7C;;AAEA;AACA;AACA;;AAEA,WAAW,QAAQ;AACnB;AACA;;AAEA;;AAEA,oBAAoB,YAAY;AAChC;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA,mDAAmD,GAAG;AACtD;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA,yCAAyC,IAAI;AAC7C;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,SAAS;AACtB;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAG;AACH;;AAEA,uEAAuE,WAAW;;AAElF;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,iCAAiC,SAAS;AAC1C,MAAM;AACN,6BAA6B;AAC7B,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,8CAA8C;AAC9C;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA,WAAW,mBAAmB;AAC9B,WAAW,SAAS;AACpB,WAAW,SAAS;AACpB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB;AACA,aAAa;AACb;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,eAAe;AAC5B,aAAa,SAAS;AACtB;AACA,eAAe,SAAS;AACxB;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA,oEAAoE;;AAEpE;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA;;AAEA,WAAW,yCAAyC;;AAEpD;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,gDAAgD;AAChD;AACA;AACA,yBAAyB;AACzB,KAAK;AACL;AACA,CAAC;;AAED;AACA;;AAEA;AACA;AACA,kDAAkD;AAClD;AACA;AACA;AACA,UAAU,IAAI;AACd;AACA;AACA,OAAO;AACP;AACA;;AAEA;;AAEA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA,WAAW,UAAU;AACrB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,KAAK;;AAEL;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA,WAAW,UAAU;AACrB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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H;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA;AACA;AACA,4BAA4B,uBAAuB,kBAAkB,+BAA+B,GAAG,aAAa;AACpH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,gCAAgC;AAChE;AACA;AACA;AACA;AACA,wBAAwB,sDAAsD;AAC9E;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,IAAI;AACpC;AACA;AACA,mDAAmD,kBAAkB;AACrE;AACA,iBAAiB;AACjB;AACA,uCAAuC,SAAS;AAChD;AACA,2CAA2C,SAAS;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEgC;;;;;;;;;;;;ACz4GnB,MAAM,mBAAO,CAAC,qFAAoB,EAAE,mBAAO,CAAC,mDAAS,EAAE,mBAAO,CAAC,+DAAM,EAAE,mBAAO,CAAC,mDAAQ,EAAE,mBAAO,CAAC,gEAAkB,EAAE,mBAAO,CAAC,4DAAgB,EAAE,eAAe;;;;;;;;;;;;ACA9J,MAAM,mBAAO,CAAC,mDAAS,IAAI,mBAAO,CAAC,mDAAQ,IAAI,mBAAO,CAAC,gEAAkB,IAAI,mBAAO,CAAC,4DAAgB,IAAI,mBAAO,CAAC,+DAAM,EAAE,kBAAkB,EAAE,GAAG,wBAAwB,GAAG,sGAAsG,qBAAM,CAAC,qBAAM,iCAAiC,KAAK,KAAK,KAAK,MAAM,oBAAoB,WAAW,kBAAkB,kBAAkB,UAAU,SAAS,sCAAsC,SAAS,sFAAsF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;;;;;;;;ACFv6nD;;AAEZ,kBAAkB;AAClB,mBAAmB;AACnB,qBAAqB;;AAErB;AACA;AACA;;AAEA;AACA,mCAAmC,SAAS;AAC5C;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,cAAc,SAAS;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,2CAA2C,UAAU;AACrD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;ACrJA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEY;;AAEZ,eAAe,mBAAO,CAAC,wDAAW;AAClC,gBAAgB,mBAAO,CAAC,oDAAS;AACjC;AACA;AACA;AACA;;AAEA,cAAc;AACd,kBAAkB;AAClB,yBAAyB;;AAEzB;AACA,kBAAkB;;AAElB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,kBAAkB,YAAY;AAC9B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA,wCAAwC,SAAS;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;;AAEA;AACA;AACA,cAAc,iBAAiB;AAC/B;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,iDAAiD,EAAE;AACnD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C;AAC1C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA,yBAAyB,eAAe;AACxC;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,yBAAyB,QAAQ;AACjC;AACA,sBAAsB,eAAe;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc,YAAY;AAC1B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB,sBAAsB;AACxC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,mBAAmB;AACnB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA,oBAAoB,SAAS;AAC7B;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA,qBAAqB,WAAW,GAAG,IAAI;AACvC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA,gBAAgB,WAAW,GAAG,IAAI,KAAK,aAAa;AACpD;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;;AAEA;AACA,GAAG;AACH;AACA;AACA,mBAAmB,KAAK,mDAAmD,cAAc;AACzF,GAAG;AACH;AACA;AACA,+BAA+B,IAAI;AACnC;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,MAAM,aAAa,SAAS;AACtD;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,SAAS,gBAAgB;AACzB,cAAc,oBAAoB,EAAE,IAAI;AACxC;AACA,YAAY,gBAAgB,EAAE,IAAI;AAClC;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,GAAG,SAAS,GAAG,KAAK,qBAAqB,EAAE,EAAE;AACpE,QAAQ;AACR,yBAAyB,GAAG,KAAK,yBAAyB,EAAE,EAAE;AAC9D,mBAAmB,yBAAyB,EAAE,EAAE;AAChD;AACA,MAAM;AACN,oBAAoB,IAAI,EAAE,GAAG,SAAS,IAAI,EAAE,EAAE;AAC9C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,0CAA0C,cAAc,SAAS,OAAO;AACxE;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,kBAAkB,YAAY;AAC9B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,kBAAkB,gBAAgB;AAClC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,kBAAkB,gBAAgB;AAClC;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,cAAc,YAAY;AAC1B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,QAAQ;AAC1B;AACA,oBAAoB,QAAQ;AAC5B;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;;;;;ACzjEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEa;;AAEb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB;;AAEnB;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,sBAAsB;AACxC;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA,eAAe;AACf;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA,oBAAoB,SAAS;AAC7B;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;;AAEA,kCAAkC,QAAQ;AAC1C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oBAAoB,iBAAiB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,QAAQ;AACR;AACA,uCAAuC,QAAQ;AAC/C;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,OAAO;AACzB;AACA;AACA;;AAEA;AACA,SAAS,yBAAyB;AAClC;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,gBAAgB;AAClC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,8DAA8D,YAAY;AAC1E;AACA,8DAA8D,YAAY;AAC1E;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,qCAAqC,YAAY;AACjD;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;AACA;;;;;;;;;;;AChfA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,SAAS,WAAW;;AAEpB;AACA;AACA;AACA,SAAS,WAAW;;AAEpB;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA,SAAS,WAAW;;AAEpB;AACA;AACA,SAAS,UAAU;;AAEnB;AACA;;;;;;;;;;;ACpFA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,WAAW,mBAAO,CAAC,mDAAS;;AAE5B;AACA;;AAEA;;;;;;;;;;;ACNA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC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,eAAe,mBAAO,CAAC,yDAAY;AACnC,cAAc,mBAAO,CAAC,yDAAY;AAClC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,SAAS;AACpB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AChDA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACnBA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,UAAU;AACrB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACtBA,sBAAsB,mBAAO,CAAC,yEAAoB;AAClD,SAAS,mBAAO,CAAC,6CAAM;;AAEvB;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC3BA,SAAS,mBAAO,CAAC,6CAAM;;AAEvB;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpBA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,WAAW,mBAAO,CAAC,iDAAQ;;AAE3B;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa,QAAQ;AACrB;AACA;AAC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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,SAAS;AACpB;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa,GAAG;AAChB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;AACA,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;;;;;;;;;;ACrKA,eAAe,mBAAO,CAAC,yDAAY;;AAEnC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;;;;;;;;;;AC7BA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,cAAc,mBAAO,CAAC,uDAAW;;AAEjC;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACnBA,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AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClFA,aAAa,mBAAO,CAAC,uDAAW;AAChC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA,iBAAiB,mBAAO,CAAC,6DAAc;AACvC,eAAe,mBAAO,CAAC,2DAAa;AACpC,eAAe,mBAAO,CAAC,yDAAY;AACnC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;AACA;AACA;AACA,oCAAoC;;AAEpC;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC9CA,aAAa,mBAAO,CAAC,uDAAW;AAChC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,eAAe,mBAAO,CAAC,yDAAY;AACnC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC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AAO,CAAC,+DAAe;AACxC,SAAS,mBAAO,CAAC,6CAAM;AACvB,kBAAkB,mBAAO,CAAC,iEAAgB;AAC1C,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC/GA,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AA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;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACdA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AChBA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,GAAG;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC7BA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACtBA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACtBA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACzBA,uBAAuB,mBAAO,CAAC,2EAAqB;AACpD,oBAAoB,mBAAO,CAAC,qEAAkB;AAC9C,kBAAkB,mBAAO,CAAC,iEAAgB;AAC1C,kBAAkB,mBAAO,CAAC,iEAAgB;AAC1C,sBAAsB,mBAAO,CAAC,yEAAoB;;AAElD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC5EA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,mBAAmB,mBAAO,CAAC,mEAAiB;AAC5C,kBAAkB,mBAAO,CAAC,iEAAgB;;AAE1C;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACxBA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACdA,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACnBA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACZA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAA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AAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACbA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;;;;;;;;;;ACjBA,gBAAgB,mBAAO,CAAC,6DAAc;;AAEtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACdA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,GAAG;AAChB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACbA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACbA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,UAAU,mBAAO,CAAC,iDAAQ;AAC1B,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjCA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;;;;;;;;;;;ACzBA,gBAAgB,mBAAO,CAAC,6DAAc;;AAEtC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,GAAG;AAChB;AACA;AACA;AACA,oBAAoB,QAAQ,IAAI,QAAQ;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,kBAAkB;AAClB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpCA,sBAAsB,mBAAO,CAAC,yEAAoB;AAClD,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA,8BAA8B,mBAAmB;AACjD;AACA;AACA;AACA;AACA;AACA,+CAA+C,mBAAmB;AAClE;AACA;AACA;;AAEA;;;;;;;;;;;ACnCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACzBA,iBAAiB,mBAAO,CAAC,6DAAc;AACvC,eAAe,mBAAO,CAAC,yDAAY;;AAEnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AChCA,WAAW,mBAAO,CAAC,mDAAS;AAC5B,gBAAgB,mBAAO,CAAC,2DAAa;;AAErC;AACA,kBAAkB,KAA0B;;AAE5C;AACA,gCAAgC,QAAa;;AAE7C;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACrCA,kBAAkB,mBAAO,CAAC,iEAAgB;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,kBAAkB;AAClB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClCA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,eAAe,mBAAO,CAAC,yDAAY;;AAEnC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpCA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClCA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC1BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC9BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC5BA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC1BA,uBAAuB,mBAAO,CAAC,2EAAqB;AACpD,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC1BA,oBAAoB,mBAAO,CAAC,qEAAkB;AAC9C,eAAe,mBAAO,CAAC,2DAAa;AACpC,kBAAkB,mBAAO,CAAC,+DAAe;;AAEzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpCA,oBAAoB,mBAAO,CAAC,qEAAkB;AA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AAS,EAAE,GAAG,CAAC;aACvB,OAAO,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC;IAC7B,CAAC;IACD,OAAO,EAAE,CAAC;AACX,CAAC;AAED;;;;;GAKG;AACH,SAAgB,kBAAkB,CAAC,WAAmB;IACrD,IAAI,CAAC,aAAa,CAAC,WAAW,CAAC,EAAE,CAAC;QACjC,OAAO,EAAE,CAAC;IACX,CAAC;IACD,MAAM,OAAO,GAAG,WAAW,CAAC,KAAK,CAAC,iCAAiC,CAAC,CAAC;IACrE,IAAI,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC;QACtB,OAAO,EAAE,CAAC;IACX,CAAC;IACD,OAAO,OAAO,CAAC;AAChB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AClQuC;AACA;AACA;AACA;AACE;AACQ;AACE;AACE;;;;;;;;;;;;;;;;ACPtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD;;AAEnD;;AAEA,oBAAoB,gBAAgB;AACpC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA,kBAAkB,cAAc;AAChC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,kBAAkB,cAAc;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,kBAAkB,aAAa;AAC/B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,iEAAe,GAAG;;;;;;;;;;;;;;;ACtNlB,iEAAe,sCAAsC;;;;;;;;;;;;;;;;ACAhB;;AAErC;AACA,OAAO,wDAAQ;AACf;AACA;;AAEA;AACA,gCAAgC;;AAEhC;AACA;AACA;AACA,qBAAqB;;AAErB;AACA,qBAAqB;;AAErB;AACA,qBAAqB;;AAErB;AACA,qBAAqB;AACrB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,iEAAe,KAAK;;;;;;;;;;;;;;;AClCpB,iEAAe,cAAc,EAAE,UAAU,EAAE,eAAe,EAAE,gBAAgB,EAAE,UAAU,GAAG,yCAAyC;;;;;;;;;;;;;;;ACApI;AACA;AACA;AACA;AACA;AACe;AACf;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;AClBA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,mDAAmD;;AAEnD;;AAEA,oBAAoB,gBAAgB;AACpC;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,mBAAmB,QAAQ;AAC3B;;AAEA,oBAAoB,QAAQ;AAC5B;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,oBAAoB,SAAS;AAC7B;;AAEA,oBAAoB,QAAQ;AA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EAA4E;QAC5E,MAAM,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,UAAU,EAAE,SAAS,CAAC,CAAC;QACxE,yDAAyD;QACzD,+DAA+D;QAC/D,MAAM,GAAG,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC;YAC9B,qBAAqB;YACrB,WAAW,EAAE,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,iBAAiB;SACvD,CAAC,CAAC;QACH,8DAA8D;QAC9D,MAAM,aAAa,GAAG,IAAI,WAAW,CAAC,UAAU,CAAC,CAAC;QAClD,MAAM,CAAC,aAAa,CAAC,aAAa,CAAC,CAAC;QACpC,IAAI,MAAM,CAAC,IAAI,KAAK,SAAS,IAAI,MAAM,EAAE,GAAG,EAAE,EAAE,CAAC,OAAO,EAAE,WAAW,KAAK,SAAS,EAAE,CAAC;YACrF,MAAM,CAAC,IAAI,GAAG,GAAG,CAAC,EAAE,CAAC,OAAO,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;YAChD,OAAO,CAAC,GAAG,CAAC,qCAAqC,CAAC,CAAC;YACnD,0CAA0C;YAC1C,MAAM,cAAc,GAAG,IAAI,WAAW,CAAC,WAAW,CAAC,CAAC;YACpD,MAAM,CAAC,aAAa,CAAC,cAAc,CAAC,CAAC;QACtC,CAAC;QACD,2DAA2D;QAC3D,MAAM,eAAe,EAAE,CAAC;IACzB,CAAC;AACF,CAAC;AAED,IAAI,EAAE;KACJ,IAAI,CAAC,GAAG,EAAE;IACV,OAAO,CAAC,GAAG,CAAC,sCAAsC,CAAC,CAAC;IACpD,OAAO,IAAI,CAAC;AACb,CAAC,CAAC;KACD,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC","sources":["webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/@openfin/cloud-interop/out/index.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/@openfin/core-web/out/api-client.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/@openfin/core-web/out/main-8cad4070.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/@openfin/core-web/out/main-b14f67c9.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/base64-js/index.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/buffer/index.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/events/events.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/ieee754/index.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_DataView.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_Hash.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_ListCache.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_Map.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_MapCache.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_Promise.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_Set.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_SetCache.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_Stack.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_Symbol.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_Uint8Array.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_WeakMap.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_arrayEach.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_arrayFilter.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_arrayLikeKeys.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_arrayPush.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_arraySome.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_assignValue.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_assocIndexOf.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseAssign.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseAssignIn.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseAssignValue.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseClone.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseCreate.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseGetAllKeys.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseGetTag.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseIsArguments.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseIsEqual.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseIsEqualDeep.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseIsMap.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseIsNative.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseIsSet.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseIsTypedArray.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseKeys.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseKeysIn.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseTimes.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_baseUnary.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_cacheHas.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_cloneArrayBuffer.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_cloneBuffer.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_cloneDataView.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_cloneRegExp.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_cloneSymbol.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_cloneTypedArray.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_copyArray.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_copyObject.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_copySymbols.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_copySymbolsIn.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_coreJsData.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_defineProperty.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_equalArrays.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_equalByTag.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_equalObjects.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_freeGlobal.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_getAllKeys.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_getAllKeysIn.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_getMapData.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_getNative.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_getPrototype.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_getRawTag.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_getSymbols.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_getSymbolsIn.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_getTag.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_getValue.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_hashClear.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_hashDelete.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_hashGet.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_hashHas.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_hashSet.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_initCloneArray.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_initCloneByTag.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_initCloneObject.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_isIndex.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_isKeyable.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_isMasked.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_isPrototype.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_listCacheClear.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_listCacheDelete.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_listCacheGet.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_listCacheHas.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_listCacheSet.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_mapCacheClear.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_mapCacheDelete.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_mapCacheGet.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_mapCacheHas.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_mapCacheSet.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_mapToArray.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_nativeCreate.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_nativeKeys.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_nativeKeysIn.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_nodeUtil.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_objectToString.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_overArg.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_root.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_setCacheAdd.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_setCacheHas.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_setToArray.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_stackClear.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_stackDelete.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_stackGet.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_stackHas.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_stackSet.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/_toSource.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/cloneDeep.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/eq.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/isArguments.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/isArray.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/isArrayLike.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/isBuffer.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/isEqual.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/isFunction.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/isLength.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/isMap.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/isObject.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/isObjectLike.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/isSet.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/isTypedArray.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/keys.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/keysIn.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/stubArray.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/lodash/stubFalse.js","webpack://openfin-web--web-interop-support-context-and-intents/./client/src/platform/apps/app-resolver-helper.ts","webpack://openfin-web--web-interop-support-context-and-intents/./client/src/platform/apps/apps.ts","webpack://openfin-web--web-interop-support-context-and-intents/./client/src/platform/broker/app-id-helper.ts","webpack://openfin-web--web-interop-support-context-and-intents/./client/src/platform/broker/app-intent-helper.ts","webpack://openfin-web--web-interop-support-context-and-intents/./client/src/platform/broker/app-meta-data-helper.ts","webpack://openfin-web--web-interop-support-context-and-intents/./client/src/platform/broker/client-registration-helper.ts","webpack://openfin-web--web-interop-support-context-and-intents/./client/src/platform/broker/fdc3-errors.ts","webpack://openfin-web--web-interop-support-context-and-intents/./client/src/platform/broker/intent-resolver-helper.ts","webpack://openfin-web--web-interop-support-context-and-intents/./client/src/platform/broker/interop-override.ts","webpack://openfin-web--web-interop-support-context-and-intents/./client/src/platform/layout/layout-override.ts","webpack://openfin-web--web-interop-support-context-and-intents/./client/src/platform/settings/settings-resolver-helper.ts","webpack://openfin-web--web-interop-support-context-and-intents/./client/src/platform/settings/settings.ts","webpack://openfin-web--web-interop-support-context-and-intents/./client/src/utils.ts","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/index.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/md5.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/nil.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/parse.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/regex.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/rng.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/sha1.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/stringify.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/v1.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/v3.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/v35.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/v4.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/v5.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/validate.js","webpack://openfin-web--web-interop-support-context-and-intents/../../node_modules/uuid/dist/esm-browser/version.js","webpack://openfin-web--web-interop-support-context-and-intents/webpack/bootstrap","webpack://openfin-web--web-interop-support-context-and-intents/webpack/runtime/amd options","webpack://openfin-web--web-interop-support-context-and-intents/webpack/runtime/define property getters","webpack://openfin-web--web-interop-support-context-and-intents/webpack/runtime/global","webpack://openfin-web--web-interop-support-context-and-intents/webpack/runtime/hasOwnProperty shorthand","webpack://openfin-web--web-interop-support-context-and-intents/webpack/runtime/make namespace object","webpack://openfin-web--web-interop-support-context-and-intents/webpack/runtime/node module decorator","webpack://openfin-web--web-interop-support-context-and-intents/./client/src/provider.ts"],"sourcesContent":["import { Buffer } from 'buffer';\n\nfunction bind(fn, thisArg) {\n return function wrap() {\n return fn.apply(thisArg, arguments);\n };\n}\n\n// utils is a library of generic helper functions non-specific to axios\n\nconst {toString} = Object.prototype;\nconst {getPrototypeOf} = Object;\n\nconst kindOf = (cache => thing => {\n const str = toString.call(thing);\n return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());\n})(Object.create(null));\n\nconst kindOfTest = (type) => {\n type = type.toLowerCase();\n return (thing) => kindOf(thing) === type\n};\n\nconst typeOfTest = type => thing => typeof thing === type;\n\n/**\n * Determine if a value is an Array\n *\n * @param {Object} val The value to test\n *\n * @returns {boolean} True if value is an Array, otherwise false\n */\nconst {isArray} = Array;\n\n/**\n * Determine if a value is undefined\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if the value is undefined, otherwise false\n */\nconst isUndefined = typeOfTest('undefined');\n\n/**\n * Determine if a value is a Buffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Buffer, otherwise false\n */\nfunction isBuffer(val) {\n return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)\n && isFunction(val.constructor.isBuffer) && val.constructor.isBuffer(val);\n}\n\n/**\n * Determine if a value is an ArrayBuffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is an ArrayBuffer, otherwise false\n */\nconst isArrayBuffer = kindOfTest('ArrayBuffer');\n\n\n/**\n * Determine if a value is a view on an ArrayBuffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false\n */\nfunction isArrayBufferView(val) {\n let result;\n if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {\n result = ArrayBuffer.isView(val);\n } else {\n result = (val) && (val.buffer) && (isArrayBuffer(val.buffer));\n }\n return result;\n}\n\n/**\n * Determine if a value is a String\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a String, otherwise false\n */\nconst isString = typeOfTest('string');\n\n/**\n * Determine if a value is a Function\n *\n * @param {*} val The value to test\n * @returns {boolean} True if value is a Function, otherwise false\n */\nconst isFunction = typeOfTest('function');\n\n/**\n * Determine if a value is a Number\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Number, otherwise false\n */\nconst isNumber = typeOfTest('number');\n\n/**\n * Determine if a value is an Object\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value is an Object, otherwise false\n */\nconst isObject = (thing) => thing !== null && typeof thing === 'object';\n\n/**\n * Determine if a value is a Boolean\n *\n * @param {*} thing The value to test\n * @returns {boolean} True if value is a Boolean, otherwise false\n */\nconst isBoolean = thing => thing === true || thing === false;\n\n/**\n * Determine if a value is a plain Object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a plain Object, otherwise false\n */\nconst isPlainObject = (val) => {\n if (kindOf(val) !== 'object') {\n return false;\n }\n\n const prototype = getPrototypeOf(val);\n return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in val) && !(Symbol.iterator in val);\n};\n\n/**\n * Determine if a value is a Date\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Date, otherwise false\n */\nconst isDate = kindOfTest('Date');\n\n/**\n * Determine if a value is a File\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a File, otherwise false\n */\nconst isFile = kindOfTest('File');\n\n/**\n * Determine if a value is a Blob\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Blob, otherwise false\n */\nconst isBlob = kindOfTest('Blob');\n\n/**\n * Determine if a value is a FileList\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a File, otherwise false\n */\nconst isFileList = kindOfTest('FileList');\n\n/**\n * Determine if a value is a Stream\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Stream, otherwise false\n */\nconst isStream = (val) => isObject(val) && isFunction(val.pipe);\n\n/**\n * Determine if a value is a FormData\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value is an FormData, otherwise false\n */\nconst isFormData = (thing) => {\n let kind;\n return thing && (\n (typeof FormData === 'function' && thing instanceof FormData) || (\n isFunction(thing.append) && (\n (kind = kindOf(thing)) === 'formdata' ||\n // detect form-data instance\n (kind === 'object' && isFunction(thing.toString) && thing.toString() === '[object FormData]')\n )\n )\n )\n};\n\n/**\n * Determine if a value is a URLSearchParams object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a URLSearchParams object, otherwise false\n */\nconst isURLSearchParams = kindOfTest('URLSearchParams');\n\n/**\n * Trim excess whitespace off the beginning and end of a string\n *\n * @param {String} str The String to trim\n *\n * @returns {String} The String freed of excess whitespace\n */\nconst trim = (str) => str.trim ?\n str.trim() : str.replace(/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g, '');\n\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n *\n * @param {Boolean} [allOwnKeys = false]\n * @returns {any}\n */\nfunction forEach(obj, fn, {allOwnKeys = false} = {}) {\n // Don't bother if no value provided\n if (obj === null || typeof obj === 'undefined') {\n return;\n }\n\n let i;\n let l;\n\n // Force an array if not already something iterable\n if (typeof obj !== 'object') {\n /*eslint no-param-reassign:0*/\n obj = [obj];\n }\n\n if (isArray(obj)) {\n // Iterate over array values\n for (i = 0, l = obj.length; i < l; i++) {\n fn.call(null, obj[i], i, obj);\n }\n } else {\n // Iterate over object keys\n const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);\n const len = keys.length;\n let key;\n\n for (i = 0; i < len; i++) {\n key = keys[i];\n fn.call(null, obj[key], key, obj);\n }\n }\n}\n\nfunction findKey(obj, key) {\n key = key.toLowerCase();\n const keys = Object.keys(obj);\n let i = keys.length;\n let _key;\n while (i-- > 0) {\n _key = keys[i];\n if (key === _key.toLowerCase()) {\n return _key;\n }\n }\n return null;\n}\n\nconst _global = (() => {\n /*eslint no-undef:0*/\n if (typeof globalThis !== \"undefined\") return globalThis;\n return typeof self !== \"undefined\" ? self : (typeof window !== 'undefined' ? window : global)\n})();\n\nconst isContextDefined = (context) => !isUndefined(context) && context !== _global;\n\n/**\n * Accepts varargs expecting each argument to be an object, then\n * immutably merges the properties of each object and returns result.\n *\n * When multiple objects contain the same key the later object in\n * the arguments list will take precedence.\n *\n * Example:\n *\n * ```js\n * var result = merge({foo: 123}, {foo: 456});\n * console.log(result.foo); // outputs 456\n * ```\n *\n * @param {Object} obj1 Object to merge\n *\n * @returns {Object} Result of all merge properties\n */\nfunction merge(/* obj1, obj2, obj3, ... */) {\n const {caseless} = isContextDefined(this) && this || {};\n const result = {};\n const assignValue = (val, key) => {\n const targetKey = caseless && findKey(result, key) || key;\n if (isPlainObject(result[targetKey]) && isPlainObject(val)) {\n result[targetKey] = merge(result[targetKey], val);\n } else if (isPlainObject(val)) {\n result[targetKey] = merge({}, val);\n } else if (isArray(val)) {\n result[targetKey] = val.slice();\n } else {\n result[targetKey] = val;\n }\n };\n\n for (let i = 0, l = arguments.length; i < l; i++) {\n arguments[i] && forEach(arguments[i], assignValue);\n }\n return result;\n}\n\n/**\n * Extends object a by mutably adding to it the properties of object b.\n *\n * @param {Object} a The object to be extended\n * @param {Object} b The object to copy properties from\n * @param {Object} thisArg The object to bind function to\n *\n * @param {Boolean} [allOwnKeys]\n * @returns {Object} The resulting value of object a\n */\nconst extend = (a, b, thisArg, {allOwnKeys}= {}) => {\n forEach(b, (val, key) => {\n if (thisArg && isFunction(val)) {\n a[key] = bind(val, thisArg);\n } else {\n a[key] = val;\n }\n }, {allOwnKeys});\n return a;\n};\n\n/**\n * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)\n *\n * @param {string} content with BOM\n *\n * @returns {string} content value without BOM\n */\nconst stripBOM = (content) => {\n if (content.charCodeAt(0) === 0xFEFF) {\n content = content.slice(1);\n }\n return content;\n};\n\n/**\n * Inherit the prototype methods from one constructor into another\n * @param {function} constructor\n * @param {function} superConstructor\n * @param {object} [props]\n * @param {object} [descriptors]\n *\n * @returns {void}\n */\nconst inherits = (constructor, superConstructor, props, descriptors) => {\n constructor.prototype = Object.create(superConstructor.prototype, descriptors);\n constructor.prototype.constructor = constructor;\n Object.defineProperty(constructor, 'super', {\n value: superConstructor.prototype\n });\n props && Object.assign(constructor.prototype, props);\n};\n\n/**\n * Resolve object with deep prototype chain to a flat object\n * @param {Object} sourceObj source object\n * @param {Object} [destObj]\n * @param {Function|Boolean} [filter]\n * @param {Function} [propFilter]\n *\n * @returns {Object}\n */\nconst toFlatObject = (sourceObj, destObj, filter, propFilter) => {\n let props;\n let i;\n let prop;\n const merged = {};\n\n destObj = destObj || {};\n // eslint-disable-next-line no-eq-null,eqeqeq\n if (sourceObj == null) return destObj;\n\n do {\n props = Object.getOwnPropertyNames(sourceObj);\n i = props.length;\n while (i-- > 0) {\n prop = props[i];\n if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) {\n destObj[prop] = sourceObj[prop];\n merged[prop] = true;\n }\n }\n sourceObj = filter !== false && getPrototypeOf(sourceObj);\n } while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype);\n\n return destObj;\n};\n\n/**\n * Determines whether a string ends with the characters of a specified string\n *\n * @param {String} str\n * @param {String} searchString\n * @param {Number} [position= 0]\n *\n * @returns {boolean}\n */\nconst endsWith = (str, searchString, position) => {\n str = String(str);\n if (position === undefined || position > str.length) {\n position = str.length;\n }\n position -= searchString.length;\n const lastIndex = str.indexOf(searchString, position);\n return lastIndex !== -1 && lastIndex === position;\n};\n\n\n/**\n * Returns new array from array like object or null if failed\n *\n * @param {*} [thing]\n *\n * @returns {?Array}\n */\nconst toArray = (thing) => {\n if (!thing) return null;\n if (isArray(thing)) return thing;\n let i = thing.length;\n if (!isNumber(i)) return null;\n const arr = new Array(i);\n while (i-- > 0) {\n arr[i] = thing[i];\n }\n return arr;\n};\n\n/**\n * Checking if the Uint8Array exists and if it does, it returns a function that checks if the\n * thing passed in is an instance of Uint8Array\n *\n * @param {TypedArray}\n *\n * @returns {Array}\n */\n// eslint-disable-next-line func-names\nconst isTypedArray = (TypedArray => {\n // eslint-disable-next-line func-names\n return thing => {\n return TypedArray && thing instanceof TypedArray;\n };\n})(typeof Uint8Array !== 'undefined' && getPrototypeOf(Uint8Array));\n\n/**\n * For each entry in the object, call the function with the key and value.\n *\n * @param {Object} obj - The object to iterate over.\n * @param {Function} fn - The function to call for each entry.\n *\n * @returns {void}\n */\nconst forEachEntry = (obj, fn) => {\n const generator = obj && obj[Symbol.iterator];\n\n const iterator = generator.call(obj);\n\n let result;\n\n while ((result = iterator.next()) && !result.done) {\n const pair = result.value;\n fn.call(obj, pair[0], pair[1]);\n }\n};\n\n/**\n * It takes a regular expression and a string, and returns an array of all the matches\n *\n * @param {string} regExp - The regular expression to match against.\n * @param {string} str - The string to search.\n *\n * @returns {Array}\n */\nconst matchAll = (regExp, str) => {\n let matches;\n const arr = [];\n\n while ((matches = regExp.exec(str)) !== null) {\n arr.push(matches);\n }\n\n return arr;\n};\n\n/* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */\nconst isHTMLForm = kindOfTest('HTMLFormElement');\n\nconst toCamelCase = str => {\n return str.toLowerCase().replace(/[-_\\s]([a-z\\d])(\\w*)/g,\n function replacer(m, p1, p2) {\n return p1.toUpperCase() + p2;\n }\n );\n};\n\n/* Creating a function that will check if an object has a property. */\nconst hasOwnProperty = (({hasOwnProperty}) => (obj, prop) => hasOwnProperty.call(obj, prop))(Object.prototype);\n\n/**\n * Determine if a value is a RegExp object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a RegExp object, otherwise false\n */\nconst isRegExp = kindOfTest('RegExp');\n\nconst reduceDescriptors = (obj, reducer) => {\n const descriptors = Object.getOwnPropertyDescriptors(obj);\n const reducedDescriptors = {};\n\n forEach(descriptors, (descriptor, name) => {\n let ret;\n if ((ret = reducer(descriptor, name, obj)) !== false) {\n reducedDescriptors[name] = ret || descriptor;\n }\n });\n\n Object.defineProperties(obj, reducedDescriptors);\n};\n\n/**\n * Makes all methods read-only\n * @param {Object} obj\n */\n\nconst freezeMethods = (obj) => {\n reduceDescriptors(obj, (descriptor, name) => {\n // skip restricted props in strict mode\n if (isFunction(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) {\n return false;\n }\n\n const value = obj[name];\n\n if (!isFunction(value)) return;\n\n descriptor.enumerable = false;\n\n if ('writable' in descriptor) {\n descriptor.writable = false;\n return;\n }\n\n if (!descriptor.set) {\n descriptor.set = () => {\n throw Error('Can not rewrite read-only method \\'' + name + '\\'');\n };\n }\n });\n};\n\nconst toObjectSet = (arrayOrString, delimiter) => {\n const obj = {};\n\n const define = (arr) => {\n arr.forEach(value => {\n obj[value] = true;\n });\n };\n\n isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter));\n\n return obj;\n};\n\nconst noop = () => {};\n\nconst toFiniteNumber = (value, defaultValue) => {\n value = +value;\n return Number.isFinite(value) ? value : defaultValue;\n};\n\nconst ALPHA = 'abcdefghijklmnopqrstuvwxyz';\n\nconst DIGIT = '0123456789';\n\nconst ALPHABET = {\n DIGIT,\n ALPHA,\n ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT\n};\n\nconst generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {\n let str = '';\n const {length} = alphabet;\n while (size--) {\n str += alphabet[Math.random() * length|0];\n }\n\n return str;\n};\n\n/**\n * If the thing is a FormData object, return true, otherwise return false.\n *\n * @param {unknown} thing - The thing to check.\n *\n * @returns {boolean}\n */\nfunction isSpecCompliantForm(thing) {\n return !!(thing && isFunction(thing.append) && thing[Symbol.toStringTag] === 'FormData' && thing[Symbol.iterator]);\n}\n\nconst toJSONObject = (obj) => {\n const stack = new Array(10);\n\n const visit = (source, i) => {\n\n if (isObject(source)) {\n if (stack.indexOf(source) >= 0) {\n return;\n }\n\n if(!('toJSON' in source)) {\n stack[i] = source;\n const target = isArray(source) ? [] : {};\n\n forEach(source, (value, key) => {\n const reducedValue = visit(value, i + 1);\n !isUndefined(reducedValue) && (target[key] = reducedValue);\n });\n\n stack[i] = undefined;\n\n return target;\n }\n }\n\n return source;\n };\n\n return visit(obj, 0);\n};\n\nconst isAsyncFn = kindOfTest('AsyncFunction');\n\nconst isThenable = (thing) =>\n thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch);\n\nvar utils$1 = {\n isArray,\n isArrayBuffer,\n isBuffer,\n isFormData,\n isArrayBufferView,\n isString,\n isNumber,\n isBoolean,\n isObject,\n isPlainObject,\n isUndefined,\n isDate,\n isFile,\n isBlob,\n isRegExp,\n isFunction,\n isStream,\n isURLSearchParams,\n isTypedArray,\n isFileList,\n forEach,\n merge,\n extend,\n trim,\n stripBOM,\n inherits,\n toFlatObject,\n kindOf,\n kindOfTest,\n endsWith,\n toArray,\n forEachEntry,\n matchAll,\n isHTMLForm,\n hasOwnProperty,\n hasOwnProp: hasOwnProperty, // an alias to avoid ESLint no-prototype-builtins detection\n reduceDescriptors,\n freezeMethods,\n toObjectSet,\n toCamelCase,\n noop,\n toFiniteNumber,\n findKey,\n global: _global,\n isContextDefined,\n ALPHABET,\n generateString,\n isSpecCompliantForm,\n toJSONObject,\n isAsyncFn,\n isThenable\n};\n\n/**\n * Create an Error with the specified message, config, error code, request and response.\n *\n * @param {string} message The error message.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [config] The config.\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n *\n * @returns {Error} The created error.\n */\nfunction AxiosError(message, code, config, request, response) {\n Error.call(this);\n\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n } else {\n this.stack = (new Error()).stack;\n }\n\n this.message = message;\n this.name = 'AxiosError';\n code && (this.code = code);\n config && (this.config = config);\n request && (this.request = request);\n response && (this.response = response);\n}\n\nutils$1.inherits(AxiosError, Error, {\n toJSON: function toJSON() {\n return {\n // Standard\n message: this.message,\n name: this.name,\n // Microsoft\n description: this.description,\n number: this.number,\n // Mozilla\n fileName: this.fileName,\n lineNumber: this.lineNumber,\n columnNumber: this.columnNumber,\n stack: this.stack,\n // Axios\n config: utils$1.toJSONObject(this.config),\n code: this.code,\n status: this.response && this.response.status ? this.response.status : null\n };\n }\n});\n\nconst prototype$1 = AxiosError.prototype;\nconst descriptors = {};\n\n[\n 'ERR_BAD_OPTION_VALUE',\n 'ERR_BAD_OPTION',\n 'ECONNABORTED',\n 'ETIMEDOUT',\n 'ERR_NETWORK',\n 'ERR_FR_TOO_MANY_REDIRECTS',\n 'ERR_DEPRECATED',\n 'ERR_BAD_RESPONSE',\n 'ERR_BAD_REQUEST',\n 'ERR_CANCELED',\n 'ERR_NOT_SUPPORT',\n 'ERR_INVALID_URL'\n// eslint-disable-next-line func-names\n].forEach(code => {\n descriptors[code] = {value: code};\n});\n\nObject.defineProperties(AxiosError, descriptors);\nObject.defineProperty(prototype$1, 'isAxiosError', {value: true});\n\n// eslint-disable-next-line func-names\nAxiosError.from = (error, code, config, request, response, customProps) => {\n const axiosError = Object.create(prototype$1);\n\n utils$1.toFlatObject(error, axiosError, function filter(obj) {\n return obj !== Error.prototype;\n }, prop => {\n return prop !== 'isAxiosError';\n });\n\n AxiosError.call(axiosError, error.message, code, config, request, response);\n\n axiosError.cause = error;\n\n axiosError.name = error.name;\n\n customProps && Object.assign(axiosError, customProps);\n\n return axiosError;\n};\n\n// eslint-disable-next-line strict\nvar httpAdapter = null;\n\n/**\n * Determines if the given thing is a array or js object.\n *\n * @param {string} thing - The object or array to be visited.\n *\n * @returns {boolean}\n */\nfunction isVisitable(thing) {\n return utils$1.isPlainObject(thing) || utils$1.isArray(thing);\n}\n\n/**\n * It removes the brackets from the end of a string\n *\n * @param {string} key - The key of the parameter.\n *\n * @returns {string} the key without the brackets.\n */\nfunction removeBrackets(key) {\n return utils$1.endsWith(key, '[]') ? key.slice(0, -2) : key;\n}\n\n/**\n * It takes a path, a key, and a boolean, and returns a string\n *\n * @param {string} path - The path to the current key.\n * @param {string} key - The key of the current object being iterated over.\n * @param {string} dots - If true, the key will be rendered with dots instead of brackets.\n *\n * @returns {string} The path to the current key.\n */\nfunction renderKey(path, key, dots) {\n if (!path) return key;\n return path.concat(key).map(function each(token, i) {\n // eslint-disable-next-line no-param-reassign\n token = removeBrackets(token);\n return !dots && i ? '[' + token + ']' : token;\n }).join(dots ? '.' : '');\n}\n\n/**\n * If the array is an array and none of its elements are visitable, then it's a flat array.\n *\n * @param {Array} arr - The array to check\n *\n * @returns {boolean}\n */\nfunction isFlatArray(arr) {\n return utils$1.isArray(arr) && !arr.some(isVisitable);\n}\n\nconst predicates = utils$1.toFlatObject(utils$1, {}, null, function filter(prop) {\n return /^is[A-Z]/.test(prop);\n});\n\n/**\n * Convert a data object to FormData\n *\n * @param {Object} obj\n * @param {?Object} [formData]\n * @param {?Object} [options]\n * @param {Function} [options.visitor]\n * @param {Boolean} [options.metaTokens = true]\n * @param {Boolean} [options.dots = false]\n * @param {?Boolean} [options.indexes = false]\n *\n * @returns {Object}\n **/\n\n/**\n * It converts an object into a FormData object\n *\n * @param {Object} obj - The object to convert to form data.\n * @param {string} formData - The FormData object to append to.\n * @param {Object} options\n *\n * @returns\n */\nfunction toFormData(obj, formData, options) {\n if (!utils$1.isObject(obj)) {\n throw new TypeError('target must be an object');\n }\n\n // eslint-disable-next-line no-param-reassign\n formData = formData || new (FormData)();\n\n // eslint-disable-next-line no-param-reassign\n options = utils$1.toFlatObject(options, {\n metaTokens: true,\n dots: false,\n indexes: false\n }, false, function defined(option, source) {\n // eslint-disable-next-line no-eq-null,eqeqeq\n return !utils$1.isUndefined(source[option]);\n });\n\n const metaTokens = options.metaTokens;\n // eslint-disable-next-line no-use-before-define\n const visitor = options.visitor || defaultVisitor;\n const dots = options.dots;\n const indexes = options.indexes;\n const _Blob = options.Blob || typeof Blob !== 'undefined' && Blob;\n const useBlob = _Blob && utils$1.isSpecCompliantForm(formData);\n\n if (!utils$1.isFunction(visitor)) {\n throw new TypeError('visitor must be a function');\n }\n\n function convertValue(value) {\n if (value === null) return '';\n\n if (utils$1.isDate(value)) {\n return value.toISOString();\n }\n\n if (!useBlob && utils$1.isBlob(value)) {\n throw new AxiosError('Blob is not supported. Use a Buffer instead.');\n }\n\n if (utils$1.isArrayBuffer(value) || utils$1.isTypedArray(value)) {\n return useBlob && typeof Blob === 'function' ? new Blob([value]) : Buffer.from(value);\n }\n\n return value;\n }\n\n /**\n * Default visitor.\n *\n * @param {*} value\n * @param {String|Number} key\n * @param {Array} path\n * @this {FormData}\n *\n * @returns {boolean} return true to visit the each prop of the value recursively\n */\n function defaultVisitor(value, key, path) {\n let arr = value;\n\n if (value && !path && typeof value === 'object') {\n if (utils$1.endsWith(key, '{}')) {\n // eslint-disable-next-line no-param-reassign\n key = metaTokens ? key : key.slice(0, -2);\n // eslint-disable-next-line no-param-reassign\n value = JSON.stringify(value);\n } else if (\n (utils$1.isArray(value) && isFlatArray(value)) ||\n ((utils$1.isFileList(value) || utils$1.endsWith(key, '[]')) && (arr = utils$1.toArray(value))\n )) {\n // eslint-disable-next-line no-param-reassign\n key = removeBrackets(key);\n\n arr.forEach(function each(el, index) {\n !(utils$1.isUndefined(el) || el === null) && formData.append(\n // eslint-disable-next-line no-nested-ternary\n indexes === true ? renderKey([key], index, dots) : (indexes === null ? key : key + '[]'),\n convertValue(el)\n );\n });\n return false;\n }\n }\n\n if (isVisitable(value)) {\n return true;\n }\n\n formData.append(renderKey(path, key, dots), convertValue(value));\n\n return false;\n }\n\n const stack = [];\n\n const exposedHelpers = Object.assign(predicates, {\n defaultVisitor,\n convertValue,\n isVisitable\n });\n\n function build(value, path) {\n if (utils$1.isUndefined(value)) return;\n\n if (stack.indexOf(value) !== -1) {\n throw Error('Circular reference detected in ' + path.join('.'));\n }\n\n stack.push(value);\n\n utils$1.forEach(value, function each(el, key) {\n const result = !(utils$1.isUndefined(el) || el === null) && visitor.call(\n formData, el, utils$1.isString(key) ? key.trim() : key, path, exposedHelpers\n );\n\n if (result === true) {\n build(el, path ? path.concat(key) : [key]);\n }\n });\n\n stack.pop();\n }\n\n if (!utils$1.isObject(obj)) {\n throw new TypeError('data must be an object');\n }\n\n build(obj);\n\n return formData;\n}\n\n/**\n * It encodes a string by replacing all characters that are not in the unreserved set with\n * their percent-encoded equivalents\n *\n * @param {string} str - The string to encode.\n *\n * @returns {string} The encoded string.\n */\nfunction encode$1(str) {\n const charMap = {\n '!': '%21',\n \"'\": '%27',\n '(': '%28',\n ')': '%29',\n '~': '%7E',\n '%20': '+',\n '%00': '\\x00'\n };\n return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) {\n return charMap[match];\n });\n}\n\n/**\n * It takes a params object and converts it to a FormData object\n *\n * @param {Object} params - The parameters to be converted to a FormData object.\n * @param {Object} options - The options object passed to the Axios constructor.\n *\n * @returns {void}\n */\nfunction AxiosURLSearchParams(params, options) {\n this._pairs = [];\n\n params && toFormData(params, this, options);\n}\n\nconst prototype = AxiosURLSearchParams.prototype;\n\nprototype.append = function append(name, value) {\n this._pairs.push([name, value]);\n};\n\nprototype.toString = function toString(encoder) {\n const _encode = encoder ? function(value) {\n return encoder.call(this, value, encode$1);\n } : encode$1;\n\n return this._pairs.map(function each(pair) {\n return _encode(pair[0]) + '=' + _encode(pair[1]);\n }, '').join('&');\n};\n\n/**\n * It replaces all instances of the characters `:`, `$`, `,`, `+`, `[`, and `]` with their\n * URI encoded counterparts\n *\n * @param {string} val The value to be encoded.\n *\n * @returns {string} The encoded value.\n */\nfunction encode(val) {\n return encodeURIComponent(val).\n replace(/%3A/gi, ':').\n replace(/%24/g, '$').\n replace(/%2C/gi, ',').\n replace(/%20/g, '+').\n replace(/%5B/gi, '[').\n replace(/%5D/gi, ']');\n}\n\n/**\n * Build a URL by appending params to the end\n *\n * @param {string} url The base of the url (e.g., http://www.google.com)\n * @param {object} [params] The params to be appended\n * @param {?object} options\n *\n * @returns {string} The formatted url\n */\nfunction buildURL(url, params, options) {\n /*eslint no-param-reassign:0*/\n if (!params) {\n return url;\n }\n \n const _encode = options && options.encode || encode;\n\n const serializeFn = options && options.serialize;\n\n let serializedParams;\n\n if (serializeFn) {\n serializedParams = serializeFn(params, options);\n } else {\n serializedParams = utils$1.isURLSearchParams(params) ?\n params.toString() :\n new AxiosURLSearchParams(params, options).toString(_encode);\n }\n\n if (serializedParams) {\n const hashmarkIndex = url.indexOf(\"#\");\n\n if (hashmarkIndex !== -1) {\n url = url.slice(0, hashmarkIndex);\n }\n url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n }\n\n return url;\n}\n\nclass InterceptorManager {\n constructor() {\n this.handlers = [];\n }\n\n /**\n * Add a new interceptor to the stack\n *\n * @param {Function} fulfilled The function to handle `then` for a `Promise`\n * @param {Function} rejected The function to handle `reject` for a `Promise`\n *\n * @return {Number} An ID used to remove interceptor later\n */\n use(fulfilled, rejected, options) {\n this.handlers.push({\n fulfilled,\n rejected,\n synchronous: options ? options.synchronous : false,\n runWhen: options ? options.runWhen : null\n });\n return this.handlers.length - 1;\n }\n\n /**\n * Remove an interceptor from the stack\n *\n * @param {Number} id The ID that was returned by `use`\n *\n * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise\n */\n eject(id) {\n if (this.handlers[id]) {\n this.handlers[id] = null;\n }\n }\n\n /**\n * Clear all interceptors from the stack\n *\n * @returns {void}\n */\n clear() {\n if (this.handlers) {\n this.handlers = [];\n }\n }\n\n /**\n * Iterate over all the registered interceptors\n *\n * This method is particularly useful for skipping over any\n * interceptors that may have become `null` calling `eject`.\n *\n * @param {Function} fn The function to call for each interceptor\n *\n * @returns {void}\n */\n forEach(fn) {\n utils$1.forEach(this.handlers, function forEachHandler(h) {\n if (h !== null) {\n fn(h);\n }\n });\n }\n}\n\nvar transitionalDefaults = {\n silentJSONParsing: true,\n forcedJSONParsing: true,\n clarifyTimeoutError: false\n};\n\nvar URLSearchParams$1 = typeof URLSearchParams !== 'undefined' ? URLSearchParams : AxiosURLSearchParams;\n\nvar FormData$1 = typeof FormData !== 'undefined' ? FormData : null;\n\nvar Blob$1 = typeof Blob !== 'undefined' ? Blob : null;\n\nvar platform$1 = {\n isBrowser: true,\n classes: {\n URLSearchParams: URLSearchParams$1,\n FormData: FormData$1,\n Blob: Blob$1\n },\n protocols: ['http', 'https', 'file', 'blob', 'url', 'data']\n};\n\nconst hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined';\n\n/**\n * Determine if we're running in a standard browser environment\n *\n * This allows axios to run in a web worker, and react-native.\n * Both environments support XMLHttpRequest, but not fully standard globals.\n *\n * web workers:\n * typeof window -> undefined\n * typeof document -> undefined\n *\n * react-native:\n * navigator.product -> 'ReactNative'\n * nativescript\n * navigator.product -> 'NativeScript' or 'NS'\n *\n * @returns {boolean}\n */\nconst hasStandardBrowserEnv = (\n (product) => {\n return hasBrowserEnv && ['ReactNative', 'NativeScript', 'NS'].indexOf(product) < 0\n })(typeof navigator !== 'undefined' && navigator.product);\n\n/**\n * Determine if we're running in a standard browser webWorker environment\n *\n * Although the `isStandardBrowserEnv` method indicates that\n * `allows axios to run in a web worker`, the WebWorker will still be\n * filtered out due to its judgment standard\n * `typeof window !== 'undefined' && typeof document !== 'undefined'`.\n * This leads to a problem when axios post `FormData` in webWorker\n */\nconst hasStandardBrowserWebWorkerEnv = (() => {\n return (\n typeof WorkerGlobalScope !== 'undefined' &&\n // eslint-disable-next-line no-undef\n self instanceof WorkerGlobalScope &&\n typeof self.importScripts === 'function'\n );\n})();\n\nvar utils = /*#__PURE__*/Object.freeze({\n __proto__: null,\n hasBrowserEnv: hasBrowserEnv,\n hasStandardBrowserEnv: hasStandardBrowserEnv,\n hasStandardBrowserWebWorkerEnv: hasStandardBrowserWebWorkerEnv\n});\n\nvar platform = {\n ...utils,\n ...platform$1\n};\n\nfunction toURLEncodedForm(data, options) {\n return toFormData(data, new platform.classes.URLSearchParams(), Object.assign({\n visitor: function(value, key, path, helpers) {\n if (platform.isNode && utils$1.isBuffer(value)) {\n this.append(key, value.toString('base64'));\n return false;\n }\n\n return helpers.defaultVisitor.apply(this, arguments);\n }\n }, options));\n}\n\n/**\n * It takes a string like `foo[x][y][z]` and returns an array like `['foo', 'x', 'y', 'z']\n *\n * @param {string} name - The name of the property to get.\n *\n * @returns An array of strings.\n */\nfunction parsePropPath(name) {\n // foo[x][y][z]\n // foo.x.y.z\n // foo-x-y-z\n // foo x y z\n return utils$1.matchAll(/\\w+|\\[(\\w*)]/g, name).map(match => {\n return match[0] === '[]' ? '' : match[1] || match[0];\n });\n}\n\n/**\n * Convert an array to an object.\n *\n * @param {Array} arr - The array to convert to an object.\n *\n * @returns An object with the same keys and values as the array.\n */\nfunction arrayToObject(arr) {\n const obj = {};\n const keys = Object.keys(arr);\n let i;\n const len = keys.length;\n let key;\n for (i = 0; i < len; i++) {\n key = keys[i];\n obj[key] = arr[key];\n }\n return obj;\n}\n\n/**\n * It takes a FormData object and returns a JavaScript object\n *\n * @param {string} formData The FormData object to convert to JSON.\n *\n * @returns {Object | null} The converted object.\n */\nfunction formDataToJSON(formData) {\n function buildPath(path, value, target, index) {\n let name = path[index++];\n\n if (name === '__proto__') return true;\n\n const isNumericKey = Number.isFinite(+name);\n const isLast = index >= path.length;\n name = !name && utils$1.isArray(target) ? target.length : name;\n\n if (isLast) {\n if (utils$1.hasOwnProp(target, name)) {\n target[name] = [target[name], value];\n } else {\n target[name] = value;\n }\n\n return !isNumericKey;\n }\n\n if (!target[name] || !utils$1.isObject(target[name])) {\n target[name] = [];\n }\n\n const result = buildPath(path, value, target[name], index);\n\n if (result && utils$1.isArray(target[name])) {\n target[name] = arrayToObject(target[name]);\n }\n\n return !isNumericKey;\n }\n\n if (utils$1.isFormData(formData) && utils$1.isFunction(formData.entries)) {\n const obj = {};\n\n utils$1.forEachEntry(formData, (name, value) => {\n buildPath(parsePropPath(name), value, obj, 0);\n });\n\n return obj;\n }\n\n return null;\n}\n\n/**\n * It takes a string, tries to parse it, and if it fails, it returns the stringified version\n * of the input\n *\n * @param {any} rawValue - The value to be stringified.\n * @param {Function} parser - A function that parses a string into a JavaScript object.\n * @param {Function} encoder - A function that takes a value and returns a string.\n *\n * @returns {string} A stringified version of the rawValue.\n */\nfunction stringifySafely(rawValue, parser, encoder) {\n if (utils$1.isString(rawValue)) {\n try {\n (parser || JSON.parse)(rawValue);\n return utils$1.trim(rawValue);\n } catch (e) {\n if (e.name !== 'SyntaxError') {\n throw e;\n }\n }\n }\n\n return (encoder || JSON.stringify)(rawValue);\n}\n\nconst defaults = {\n\n transitional: transitionalDefaults,\n\n adapter: ['xhr', 'http'],\n\n transformRequest: [function transformRequest(data, headers) {\n const contentType = headers.getContentType() || '';\n const hasJSONContentType = contentType.indexOf('application/json') > -1;\n const isObjectPayload = utils$1.isObject(data);\n\n if (isObjectPayload && utils$1.isHTMLForm(data)) {\n data = new FormData(data);\n }\n\n const isFormData = utils$1.isFormData(data);\n\n if (isFormData) {\n return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;\n }\n\n if (utils$1.isArrayBuffer(data) ||\n utils$1.isBuffer(data) ||\n utils$1.isStream(data) ||\n utils$1.isFile(data) ||\n utils$1.isBlob(data)\n ) {\n return data;\n }\n if (utils$1.isArrayBufferView(data)) {\n return data.buffer;\n }\n if (utils$1.isURLSearchParams(data)) {\n headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false);\n return data.toString();\n }\n\n let isFileList;\n\n if (isObjectPayload) {\n if (contentType.indexOf('application/x-www-form-urlencoded') > -1) {\n return toURLEncodedForm(data, this.formSerializer).toString();\n }\n\n if ((isFileList = utils$1.isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) {\n const _FormData = this.env && this.env.FormData;\n\n return toFormData(\n isFileList ? {'files[]': data} : data,\n _FormData && new _FormData(),\n this.formSerializer\n );\n }\n }\n\n if (isObjectPayload || hasJSONContentType ) {\n headers.setContentType('application/json', false);\n return stringifySafely(data);\n }\n\n return data;\n }],\n\n transformResponse: [function transformResponse(data) {\n const transitional = this.transitional || defaults.transitional;\n const forcedJSONParsing = transitional && transitional.forcedJSONParsing;\n const JSONRequested = this.responseType === 'json';\n\n if (data && utils$1.isString(data) && ((forcedJSONParsing && !this.responseType) || JSONRequested)) {\n const silentJSONParsing = transitional && transitional.silentJSONParsing;\n const strictJSONParsing = !silentJSONParsing && JSONRequested;\n\n try {\n return JSON.parse(data);\n } catch (e) {\n if (strictJSONParsing) {\n if (e.name === 'SyntaxError') {\n throw AxiosError.from(e, AxiosError.ERR_BAD_RESPONSE, this, null, this.response);\n }\n throw e;\n }\n }\n }\n\n return data;\n }],\n\n /**\n * A timeout in milliseconds to abort a request. If set to 0 (default) a\n * timeout is not created.\n */\n timeout: 0,\n\n xsrfCookieName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN',\n\n maxContentLength: -1,\n maxBodyLength: -1,\n\n env: {\n FormData: platform.classes.FormData,\n Blob: platform.classes.Blob\n },\n\n validateStatus: function validateStatus(status) {\n return status >= 200 && status < 300;\n },\n\n headers: {\n common: {\n 'Accept': 'application/json, text/plain, */*',\n 'Content-Type': undefined\n }\n }\n};\n\nutils$1.forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => {\n defaults.headers[method] = {};\n});\n\nvar defaults$1 = defaults;\n\n// RawAxiosHeaders whose duplicates are ignored by node\n// c.f. https://nodejs.org/api/http.html#http_message_headers\nconst ignoreDuplicateOf = utils$1.toObjectSet([\n 'age', 'authorization', 'content-length', 'content-type', 'etag',\n 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',\n 'last-modified', 'location', 'max-forwards', 'proxy-authorization',\n 'referer', 'retry-after', 'user-agent'\n]);\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} rawHeaders Headers needing to be parsed\n *\n * @returns {Object} Headers parsed into an object\n */\nvar parseHeaders = rawHeaders => {\n const parsed = {};\n let key;\n let val;\n let i;\n\n rawHeaders && rawHeaders.split('\\n').forEach(function parser(line) {\n i = line.indexOf(':');\n key = line.substring(0, i).trim().toLowerCase();\n val = line.substring(i + 1).trim();\n\n if (!key || (parsed[key] && ignoreDuplicateOf[key])) {\n return;\n }\n\n if (key === 'set-cookie') {\n if (parsed[key]) {\n parsed[key].push(val);\n } else {\n parsed[key] = [val];\n }\n } else {\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n }\n });\n\n return parsed;\n};\n\nconst $internals = Symbol('internals');\n\nfunction normalizeHeader(header) {\n return header && String(header).trim().toLowerCase();\n}\n\nfunction normalizeValue(value) {\n if (value === false || value == null) {\n return value;\n }\n\n return utils$1.isArray(value) ? value.map(normalizeValue) : String(value);\n}\n\nfunction parseTokens(str) {\n const tokens = Object.create(null);\n const tokensRE = /([^\\s,;=]+)\\s*(?:=\\s*([^,;]+))?/g;\n let match;\n\n while ((match = tokensRE.exec(str))) {\n tokens[match[1]] = match[2];\n }\n\n return tokens;\n}\n\nconst isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());\n\nfunction matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {\n if (utils$1.isFunction(filter)) {\n return filter.call(this, value, header);\n }\n\n if (isHeaderNameFilter) {\n value = header;\n }\n\n if (!utils$1.isString(value)) return;\n\n if (utils$1.isString(filter)) {\n return value.indexOf(filter) !== -1;\n }\n\n if (utils$1.isRegExp(filter)) {\n return filter.test(value);\n }\n}\n\nfunction formatHeader(header) {\n return header.trim()\n .toLowerCase().replace(/([a-z\\d])(\\w*)/g, (w, char, str) => {\n return char.toUpperCase() + str;\n });\n}\n\nfunction buildAccessors(obj, header) {\n const accessorName = utils$1.toCamelCase(' ' + header);\n\n ['get', 'set', 'has'].forEach(methodName => {\n Object.defineProperty(obj, methodName + accessorName, {\n value: function(arg1, arg2, arg3) {\n return this[methodName].call(this, header, arg1, arg2, arg3);\n },\n configurable: true\n });\n });\n}\n\nclass AxiosHeaders {\n constructor(headers) {\n headers && this.set(headers);\n }\n\n set(header, valueOrRewrite, rewrite) {\n const self = this;\n\n function setHeader(_value, _header, _rewrite) {\n const lHeader = normalizeHeader(_header);\n\n if (!lHeader) {\n throw new Error('header name must be a non-empty string');\n }\n\n const key = utils$1.findKey(self, lHeader);\n\n if(!key || self[key] === undefined || _rewrite === true || (_rewrite === undefined && self[key] !== false)) {\n self[key || _header] = normalizeValue(_value);\n }\n }\n\n const setHeaders = (headers, _rewrite) =>\n utils$1.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));\n\n if (utils$1.isPlainObject(header) || header instanceof this.constructor) {\n setHeaders(header, valueOrRewrite);\n } else if(utils$1.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {\n setHeaders(parseHeaders(header), valueOrRewrite);\n } else {\n header != null && setHeader(valueOrRewrite, header, rewrite);\n }\n\n return this;\n }\n\n get(header, parser) {\n header = normalizeHeader(header);\n\n if (header) {\n const key = utils$1.findKey(this, header);\n\n if (key) {\n const value = this[key];\n\n if (!parser) {\n return value;\n }\n\n if (parser === true) {\n return parseTokens(value);\n }\n\n if (utils$1.isFunction(parser)) {\n return parser.call(this, value, key);\n }\n\n if (utils$1.isRegExp(parser)) {\n return parser.exec(value);\n }\n\n throw new TypeError('parser must be boolean|regexp|function');\n }\n }\n }\n\n has(header, matcher) {\n header = normalizeHeader(header);\n\n if (header) {\n const key = utils$1.findKey(this, header);\n\n return !!(key && this[key] !== undefined && (!matcher || matchHeaderValue(this, this[key], key, matcher)));\n }\n\n return false;\n }\n\n delete(header, matcher) {\n const self = this;\n let deleted = false;\n\n function deleteHeader(_header) {\n _header = normalizeHeader(_header);\n\n if (_header) {\n const key = utils$1.findKey(self, _header);\n\n if (key && (!matcher || matchHeaderValue(self, self[key], key, matcher))) {\n delete self[key];\n\n deleted = true;\n }\n }\n }\n\n if (utils$1.isArray(header)) {\n header.forEach(deleteHeader);\n } else {\n deleteHeader(header);\n }\n\n return deleted;\n }\n\n clear(matcher) {\n const keys = Object.keys(this);\n let i = keys.length;\n let deleted = false;\n\n while (i--) {\n const key = keys[i];\n if(!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {\n delete this[key];\n deleted = true;\n }\n }\n\n return deleted;\n }\n\n normalize(format) {\n const self = this;\n const headers = {};\n\n utils$1.forEach(this, (value, header) => {\n const key = utils$1.findKey(headers, header);\n\n if (key) {\n self[key] = normalizeValue(value);\n delete self[header];\n return;\n }\n\n const normalized = format ? formatHeader(header) : String(header).trim();\n\n if (normalized !== header) {\n delete self[header];\n }\n\n self[normalized] = normalizeValue(value);\n\n headers[normalized] = true;\n });\n\n return this;\n }\n\n concat(...targets) {\n return this.constructor.concat(this, ...targets);\n }\n\n toJSON(asStrings) {\n const obj = Object.create(null);\n\n utils$1.forEach(this, (value, header) => {\n value != null && value !== false && (obj[header] = asStrings && utils$1.isArray(value) ? value.join(', ') : value);\n });\n\n return obj;\n }\n\n [Symbol.iterator]() {\n return Object.entries(this.toJSON())[Symbol.iterator]();\n }\n\n toString() {\n return Object.entries(this.toJSON()).map(([header, value]) => header + ': ' + value).join('\\n');\n }\n\n get [Symbol.toStringTag]() {\n return 'AxiosHeaders';\n }\n\n static from(thing) {\n return thing instanceof this ? thing : new this(thing);\n }\n\n static concat(first, ...targets) {\n const computed = new this(first);\n\n targets.forEach((target) => computed.set(target));\n\n return computed;\n }\n\n static accessor(header) {\n const internals = this[$internals] = (this[$internals] = {\n accessors: {}\n });\n\n const accessors = internals.accessors;\n const prototype = this.prototype;\n\n function defineAccessor(_header) {\n const lHeader = normalizeHeader(_header);\n\n if (!accessors[lHeader]) {\n buildAccessors(prototype, _header);\n accessors[lHeader] = true;\n }\n }\n\n utils$1.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);\n\n return this;\n }\n}\n\nAxiosHeaders.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']);\n\n// reserved names hotfix\nutils$1.reduceDescriptors(AxiosHeaders.prototype, ({value}, key) => {\n let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set`\n return {\n get: () => value,\n set(headerValue) {\n this[mapped] = headerValue;\n }\n }\n});\n\nutils$1.freezeMethods(AxiosHeaders);\n\nvar AxiosHeaders$1 = AxiosHeaders;\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Array|Function} fns A single function or Array of functions\n * @param {?Object} response The response object\n *\n * @returns {*} The resulting transformed data\n */\nfunction transformData(fns, response) {\n const config = this || defaults$1;\n const context = response || config;\n const headers = AxiosHeaders$1.from(context.headers);\n let data = context.data;\n\n utils$1.forEach(fns, function transform(fn) {\n data = fn.call(config, data, headers.normalize(), response ? response.status : undefined);\n });\n\n headers.normalize();\n\n return data;\n}\n\nfunction isCancel(value) {\n return !!(value && value.__CANCEL__);\n}\n\n/**\n * A `CanceledError` is an object that is thrown when an operation is canceled.\n *\n * @param {string=} message The message.\n * @param {Object=} config The config.\n * @param {Object=} request The request.\n *\n * @returns {CanceledError} The created error.\n */\nfunction CanceledError(message, config, request) {\n // eslint-disable-next-line no-eq-null,eqeqeq\n AxiosError.call(this, message == null ? 'canceled' : message, AxiosError.ERR_CANCELED, config, request);\n this.name = 'CanceledError';\n}\n\nutils$1.inherits(CanceledError, AxiosError, {\n __CANCEL__: true\n});\n\n/**\n * Resolve or reject a Promise based on response status.\n *\n * @param {Function} resolve A function that resolves the promise.\n * @param {Function} reject A function that rejects the promise.\n * @param {object} response The response.\n *\n * @returns {object} The response.\n */\nfunction settle(resolve, reject, response) {\n const validateStatus = response.config.validateStatus;\n if (!response.status || !validateStatus || validateStatus(response.status)) {\n resolve(response);\n } else {\n reject(new AxiosError(\n 'Request failed with status code ' + response.status,\n [AxiosError.ERR_BAD_REQUEST, AxiosError.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],\n response.config,\n response.request,\n response\n ));\n }\n}\n\nvar cookies = platform.hasStandardBrowserEnv ?\n\n // Standard browser envs support document.cookie\n {\n write(name, value, expires, path, domain, secure) {\n const cookie = [name + '=' + encodeURIComponent(value)];\n\n utils$1.isNumber(expires) && cookie.push('expires=' + new Date(expires).toGMTString());\n\n utils$1.isString(path) && cookie.push('path=' + path);\n\n utils$1.isString(domain) && cookie.push('domain=' + domain);\n\n secure === true && cookie.push('secure');\n\n document.cookie = cookie.join('; ');\n },\n\n read(name) {\n const match = document.cookie.match(new RegExp('(^|;\\\\s*)(' + name + ')=([^;]*)'));\n return (match ? decodeURIComponent(match[3]) : null);\n },\n\n remove(name) {\n this.write(name, '', Date.now() - 86400000);\n }\n }\n\n :\n\n // Non-standard browser env (web workers, react-native) lack needed support.\n {\n write() {},\n read() {\n return null;\n },\n remove() {}\n };\n\n/**\n * Determines whether the specified URL is absolute\n *\n * @param {string} url The URL to test\n *\n * @returns {boolean} True if the specified URL is absolute, otherwise false\n */\nfunction isAbsoluteURL(url) {\n // A URL is considered absolute if it begins with \"://\" or \"//\" (protocol-relative URL).\n // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n // by any combination of letters, digits, plus, period, or hyphen.\n return /^([a-z][a-z\\d+\\-.]*:)?\\/\\//i.test(url);\n}\n\n/**\n * Creates a new URL by combining the specified URLs\n *\n * @param {string} baseURL The base URL\n * @param {string} relativeURL The relative URL\n *\n * @returns {string} The combined URL\n */\nfunction combineURLs(baseURL, relativeURL) {\n return relativeURL\n ? baseURL.replace(/\\/?\\/$/, '') + '/' + relativeURL.replace(/^\\/+/, '')\n : baseURL;\n}\n\n/**\n * Creates a new URL by combining the baseURL with the requestedURL,\n * only when the requestedURL is not already an absolute URL.\n * If the requestURL is absolute, this function returns the requestedURL untouched.\n *\n * @param {string} baseURL The base URL\n * @param {string} requestedURL Absolute or relative URL to combine\n *\n * @returns {string} The combined full path\n */\nfunction buildFullPath(baseURL, requestedURL) {\n if (baseURL && !isAbsoluteURL(requestedURL)) {\n return combineURLs(baseURL, requestedURL);\n }\n return requestedURL;\n}\n\nvar isURLSameOrigin = platform.hasStandardBrowserEnv ?\n\n// Standard browser envs have full support of the APIs needed to test\n// whether the request URL is of the same origin as current location.\n (function standardBrowserEnv() {\n const msie = /(msie|trident)/i.test(navigator.userAgent);\n const urlParsingNode = document.createElement('a');\n let originURL;\n\n /**\n * Parse a URL to discover its components\n *\n * @param {String} url The URL to be parsed\n * @returns {Object}\n */\n function resolveURL(url) {\n let href = url;\n\n if (msie) {\n // IE needs attribute set twice to normalize properties\n urlParsingNode.setAttribute('href', href);\n href = urlParsingNode.href;\n }\n\n urlParsingNode.setAttribute('href', href);\n\n // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils\n return {\n href: urlParsingNode.href,\n protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',\n host: urlParsingNode.host,\n search: urlParsingNode.search ? urlParsingNode.search.replace(/^\\?/, '') : '',\n hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',\n hostname: urlParsingNode.hostname,\n port: urlParsingNode.port,\n pathname: (urlParsingNode.pathname.charAt(0) === '/') ?\n urlParsingNode.pathname :\n '/' + urlParsingNode.pathname\n };\n }\n\n originURL = resolveURL(window.location.href);\n\n /**\n * Determine if a URL shares the same origin as the current location\n *\n * @param {String} requestURL The URL to test\n * @returns {boolean} True if URL shares the same origin, otherwise false\n */\n return function isURLSameOrigin(requestURL) {\n const parsed = (utils$1.isString(requestURL)) ? resolveURL(requestURL) : requestURL;\n return (parsed.protocol === originURL.protocol &&\n parsed.host === originURL.host);\n };\n })() :\n\n // Non standard browser envs (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return function isURLSameOrigin() {\n return true;\n };\n })();\n\nfunction parseProtocol(url) {\n const match = /^([-+\\w]{1,25})(:?\\/\\/|:)/.exec(url);\n return match && match[1] || '';\n}\n\n/**\n * Calculate data maxRate\n * @param {Number} [samplesCount= 10]\n * @param {Number} [min= 1000]\n * @returns {Function}\n */\nfunction speedometer(samplesCount, min) {\n samplesCount = samplesCount || 10;\n const bytes = new Array(samplesCount);\n const timestamps = new Array(samplesCount);\n let head = 0;\n let tail = 0;\n let firstSampleTS;\n\n min = min !== undefined ? min : 1000;\n\n return function push(chunkLength) {\n const now = Date.now();\n\n const startedAt = timestamps[tail];\n\n if (!firstSampleTS) {\n firstSampleTS = now;\n }\n\n bytes[head] = chunkLength;\n timestamps[head] = now;\n\n let i = tail;\n let bytesCount = 0;\n\n while (i !== head) {\n bytesCount += bytes[i++];\n i = i % samplesCount;\n }\n\n head = (head + 1) % samplesCount;\n\n if (head === tail) {\n tail = (tail + 1) % samplesCount;\n }\n\n if (now - firstSampleTS < min) {\n return;\n }\n\n const passed = startedAt && now - startedAt;\n\n return passed ? Math.round(bytesCount * 1000 / passed) : undefined;\n };\n}\n\nfunction progressEventReducer(listener, isDownloadStream) {\n let bytesNotified = 0;\n const _speedometer = speedometer(50, 250);\n\n return e => {\n const loaded = e.loaded;\n const total = e.lengthComputable ? e.total : undefined;\n const progressBytes = loaded - bytesNotified;\n const rate = _speedometer(progressBytes);\n const inRange = loaded <= total;\n\n bytesNotified = loaded;\n\n const data = {\n loaded,\n total,\n progress: total ? (loaded / total) : undefined,\n bytes: progressBytes,\n rate: rate ? rate : undefined,\n estimated: rate && total && inRange ? (total - loaded) / rate : undefined,\n event: e\n };\n\n data[isDownloadStream ? 'download' : 'upload'] = true;\n\n listener(data);\n };\n}\n\nconst isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';\n\nvar xhrAdapter = isXHRAdapterSupported && function (config) {\n return new Promise(function dispatchXhrRequest(resolve, reject) {\n let requestData = config.data;\n const requestHeaders = AxiosHeaders$1.from(config.headers).normalize();\n let {responseType, withXSRFToken} = config;\n let onCanceled;\n function done() {\n if (config.cancelToken) {\n config.cancelToken.unsubscribe(onCanceled);\n }\n\n if (config.signal) {\n config.signal.removeEventListener('abort', onCanceled);\n }\n }\n\n let contentType;\n\n if (utils$1.isFormData(requestData)) {\n if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {\n requestHeaders.setContentType(false); // Let the browser set it\n } else if ((contentType = requestHeaders.getContentType()) !== false) {\n // fix semicolon duplication issue for ReactNative FormData implementation\n const [type, ...tokens] = contentType ? contentType.split(';').map(token => token.trim()).filter(Boolean) : [];\n requestHeaders.setContentType([type || 'multipart/form-data', ...tokens].join('; '));\n }\n }\n\n let request = new XMLHttpRequest();\n\n // HTTP basic authentication\n if (config.auth) {\n const username = config.auth.username || '';\n const password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : '';\n requestHeaders.set('Authorization', 'Basic ' + btoa(username + ':' + password));\n }\n\n const fullPath = buildFullPath(config.baseURL, config.url);\n\n request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);\n\n // Set the request timeout in MS\n request.timeout = config.timeout;\n\n function onloadend() {\n if (!request) {\n return;\n }\n // Prepare the response\n const responseHeaders = AxiosHeaders$1.from(\n 'getAllResponseHeaders' in request && request.getAllResponseHeaders()\n );\n const responseData = !responseType || responseType === 'text' || responseType === 'json' ?\n request.responseText : request.response;\n const response = {\n data: responseData,\n status: request.status,\n statusText: request.statusText,\n headers: responseHeaders,\n config,\n request\n };\n\n settle(function _resolve(value) {\n resolve(value);\n done();\n }, function _reject(err) {\n reject(err);\n done();\n }, response);\n\n // Clean up request\n request = null;\n }\n\n if ('onloadend' in request) {\n // Use onloadend if available\n request.onloadend = onloadend;\n } else {\n // Listen for ready state to emulate onloadend\n request.onreadystatechange = function handleLoad() {\n if (!request || request.readyState !== 4) {\n return;\n }\n\n // The request errored out and we didn't get a response, this will be\n // handled by onerror instead\n // With one exception: request that using file: protocol, most browsers\n // will return status as 0 even though it's a successful request\n if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {\n return;\n }\n // readystate handler is calling before onerror or ontimeout handlers,\n // so we should call onloadend on the next 'tick'\n setTimeout(onloadend);\n };\n }\n\n // Handle browser request cancellation (as opposed to a manual cancellation)\n request.onabort = function handleAbort() {\n if (!request) {\n return;\n }\n\n reject(new AxiosError('Request aborted', AxiosError.ECONNABORTED, config, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle low level network errors\n request.onerror = function handleError() {\n // Real errors are hidden from us by the browser\n // onerror should only fire if it's a network error\n reject(new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle timeout\n request.ontimeout = function handleTimeout() {\n let timeoutErrorMessage = config.timeout ? 'timeout of ' + config.timeout + 'ms exceeded' : 'timeout exceeded';\n const transitional = config.transitional || transitionalDefaults;\n if (config.timeoutErrorMessage) {\n timeoutErrorMessage = config.timeoutErrorMessage;\n }\n reject(new AxiosError(\n timeoutErrorMessage,\n transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED,\n config,\n request));\n\n // Clean up request\n request = null;\n };\n\n // Add xsrf header\n // This is only done if running in a standard browser environment.\n // Specifically not if we're in a web worker, or react-native.\n if(platform.hasStandardBrowserEnv) {\n withXSRFToken && utils$1.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(config));\n\n if (withXSRFToken || (withXSRFToken !== false && isURLSameOrigin(fullPath))) {\n // Add xsrf header\n const xsrfValue = config.xsrfHeaderName && config.xsrfCookieName && cookies.read(config.xsrfCookieName);\n\n if (xsrfValue) {\n requestHeaders.set(config.xsrfHeaderName, xsrfValue);\n }\n }\n }\n\n // Remove Content-Type if data is undefined\n requestData === undefined && requestHeaders.setContentType(null);\n\n // Add headers to the request\n if ('setRequestHeader' in request) {\n utils$1.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {\n request.setRequestHeader(key, val);\n });\n }\n\n // Add withCredentials to request if needed\n if (!utils$1.isUndefined(config.withCredentials)) {\n request.withCredentials = !!config.withCredentials;\n }\n\n // Add responseType to request if needed\n if (responseType && responseType !== 'json') {\n request.responseType = config.responseType;\n }\n\n // Handle progress if needed\n if (typeof config.onDownloadProgress === 'function') {\n request.addEventListener('progress', progressEventReducer(config.onDownloadProgress, true));\n }\n\n // Not all browsers support upload events\n if (typeof config.onUploadProgress === 'function' && request.upload) {\n request.upload.addEventListener('progress', progressEventReducer(config.onUploadProgress));\n }\n\n if (config.cancelToken || config.signal) {\n // Handle cancellation\n // eslint-disable-next-line func-names\n onCanceled = cancel => {\n if (!request) {\n return;\n }\n reject(!cancel || cancel.type ? new CanceledError(null, config, request) : cancel);\n request.abort();\n request = null;\n };\n\n config.cancelToken && config.cancelToken.subscribe(onCanceled);\n if (config.signal) {\n config.signal.aborted ? onCanceled() : config.signal.addEventListener('abort', onCanceled);\n }\n }\n\n const protocol = parseProtocol(fullPath);\n\n if (protocol && platform.protocols.indexOf(protocol) === -1) {\n reject(new AxiosError('Unsupported protocol ' + protocol + ':', AxiosError.ERR_BAD_REQUEST, config));\n return;\n }\n\n\n // Send the request\n request.send(requestData || null);\n });\n};\n\nconst knownAdapters = {\n http: httpAdapter,\n xhr: xhrAdapter\n};\n\nutils$1.forEach(knownAdapters, (fn, value) => {\n if (fn) {\n try {\n Object.defineProperty(fn, 'name', {value});\n } catch (e) {\n // eslint-disable-next-line no-empty\n }\n Object.defineProperty(fn, 'adapterName', {value});\n }\n});\n\nconst renderReason = (reason) => `- ${reason}`;\n\nconst isResolvedHandle = (adapter) => utils$1.isFunction(adapter) || adapter === null || adapter === false;\n\nvar adapters = {\n getAdapter: (adapters) => {\n adapters = utils$1.isArray(adapters) ? adapters : [adapters];\n\n const {length} = adapters;\n let nameOrAdapter;\n let adapter;\n\n const rejectedReasons = {};\n\n for (let i = 0; i < length; i++) {\n nameOrAdapter = adapters[i];\n let id;\n\n adapter = nameOrAdapter;\n\n if (!isResolvedHandle(nameOrAdapter)) {\n adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];\n\n if (adapter === undefined) {\n throw new AxiosError(`Unknown adapter '${id}'`);\n }\n }\n\n if (adapter) {\n break;\n }\n\n rejectedReasons[id || '#' + i] = adapter;\n }\n\n if (!adapter) {\n\n const reasons = Object.entries(rejectedReasons)\n .map(([id, state]) => `adapter ${id} ` +\n (state === false ? 'is not supported by the environment' : 'is not available in the build')\n );\n\n let s = length ?\n (reasons.length > 1 ? 'since :\\n' + reasons.map(renderReason).join('\\n') : ' ' + renderReason(reasons[0])) :\n 'as no adapter specified';\n\n throw new AxiosError(\n `There is no suitable adapter to dispatch the request ` + s,\n 'ERR_NOT_SUPPORT'\n );\n }\n\n return adapter;\n },\n adapters: knownAdapters\n};\n\n/**\n * Throws a `CanceledError` if cancellation has been requested.\n *\n * @param {Object} config The config that is to be used for the request\n *\n * @returns {void}\n */\nfunction throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n\n if (config.signal && config.signal.aborted) {\n throw new CanceledError(null, config);\n }\n}\n\n/**\n * Dispatch a request to the server using the configured adapter.\n *\n * @param {object} config The config that is to be used for the request\n *\n * @returns {Promise} The Promise to be fulfilled\n */\nfunction dispatchRequest(config) {\n throwIfCancellationRequested(config);\n\n config.headers = AxiosHeaders$1.from(config.headers);\n\n // Transform request data\n config.data = transformData.call(\n config,\n config.transformRequest\n );\n\n if (['post', 'put', 'patch'].indexOf(config.method) !== -1) {\n config.headers.setContentType('application/x-www-form-urlencoded', false);\n }\n\n const adapter = adapters.getAdapter(config.adapter || defaults$1.adapter);\n\n return adapter(config).then(function onAdapterResolution(response) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n response.data = transformData.call(\n config,\n config.transformResponse,\n response\n );\n\n response.headers = AxiosHeaders$1.from(response.headers);\n\n return response;\n }, function onAdapterRejection(reason) {\n if (!isCancel(reason)) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n if (reason && reason.response) {\n reason.response.data = transformData.call(\n config,\n config.transformResponse,\n reason.response\n );\n reason.response.headers = AxiosHeaders$1.from(reason.response.headers);\n }\n }\n\n return Promise.reject(reason);\n });\n}\n\nconst headersToObject = (thing) => thing instanceof AxiosHeaders$1 ? { ...thing } : thing;\n\n/**\n * Config-specific merge-function which creates a new config-object\n * by merging two configuration objects together.\n *\n * @param {Object} config1\n * @param {Object} config2\n *\n * @returns {Object} New object resulting from merging config2 to config1\n */\nfunction mergeConfig(config1, config2) {\n // eslint-disable-next-line no-param-reassign\n config2 = config2 || {};\n const config = {};\n\n function getMergedValue(target, source, caseless) {\n if (utils$1.isPlainObject(target) && utils$1.isPlainObject(source)) {\n return utils$1.merge.call({caseless}, target, source);\n } else if (utils$1.isPlainObject(source)) {\n return utils$1.merge({}, source);\n } else if (utils$1.isArray(source)) {\n return source.slice();\n }\n return source;\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDeepProperties(a, b, caseless) {\n if (!utils$1.isUndefined(b)) {\n return getMergedValue(a, b, caseless);\n } else if (!utils$1.isUndefined(a)) {\n return getMergedValue(undefined, a, caseless);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function valueFromConfig2(a, b) {\n if (!utils$1.isUndefined(b)) {\n return getMergedValue(undefined, b);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function defaultToConfig2(a, b) {\n if (!utils$1.isUndefined(b)) {\n return getMergedValue(undefined, b);\n } else if (!utils$1.isUndefined(a)) {\n return getMergedValue(undefined, a);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDirectKeys(a, b, prop) {\n if (prop in config2) {\n return getMergedValue(a, b);\n } else if (prop in config1) {\n return getMergedValue(undefined, a);\n }\n }\n\n const mergeMap = {\n url: valueFromConfig2,\n method: valueFromConfig2,\n data: valueFromConfig2,\n baseURL: defaultToConfig2,\n transformRequest: defaultToConfig2,\n transformResponse: defaultToConfig2,\n paramsSerializer: defaultToConfig2,\n timeout: defaultToConfig2,\n timeoutMessage: defaultToConfig2,\n withCredentials: defaultToConfig2,\n withXSRFToken: defaultToConfig2,\n adapter: defaultToConfig2,\n responseType: defaultToConfig2,\n xsrfCookieName: defaultToConfig2,\n xsrfHeaderName: defaultToConfig2,\n onUploadProgress: defaultToConfig2,\n onDownloadProgress: defaultToConfig2,\n decompress: defaultToConfig2,\n maxContentLength: defaultToConfig2,\n maxBodyLength: defaultToConfig2,\n beforeRedirect: defaultToConfig2,\n transport: defaultToConfig2,\n httpAgent: defaultToConfig2,\n httpsAgent: defaultToConfig2,\n cancelToken: defaultToConfig2,\n socketPath: defaultToConfig2,\n responseEncoding: defaultToConfig2,\n validateStatus: mergeDirectKeys,\n headers: (a, b) => mergeDeepProperties(headersToObject(a), headersToObject(b), true)\n };\n\n utils$1.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {\n const merge = mergeMap[prop] || mergeDeepProperties;\n const configValue = merge(config1[prop], config2[prop], prop);\n (utils$1.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);\n });\n\n return config;\n}\n\nconst VERSION = \"1.6.8\";\n\nconst validators$1 = {};\n\n// eslint-disable-next-line func-names\n['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach((type, i) => {\n validators$1[type] = function validator(thing) {\n return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type;\n };\n});\n\nconst deprecatedWarnings = {};\n\n/**\n * Transitional option validator\n *\n * @param {function|boolean?} validator - set to false if the transitional option has been removed\n * @param {string?} version - deprecated version / removed since version\n * @param {string?} message - some message with additional info\n *\n * @returns {function}\n */\nvalidators$1.transitional = function transitional(validator, version, message) {\n function formatMessage(opt, desc) {\n return '[Axios v' + VERSION + '] Transitional option \\'' + opt + '\\'' + desc + (message ? '. ' + message : '');\n }\n\n // eslint-disable-next-line func-names\n return (value, opt, opts) => {\n if (validator === false) {\n throw new AxiosError(\n formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')),\n AxiosError.ERR_DEPRECATED\n );\n }\n\n if (version && !deprecatedWarnings[opt]) {\n deprecatedWarnings[opt] = true;\n // eslint-disable-next-line no-console\n console.warn(\n formatMessage(\n opt,\n ' has been deprecated since v' + version + ' and will be removed in the near future'\n )\n );\n }\n\n return validator ? validator(value, opt, opts) : true;\n };\n};\n\n/**\n * Assert object's properties type\n *\n * @param {object} options\n * @param {object} schema\n * @param {boolean?} allowUnknown\n *\n * @returns {object}\n */\n\nfunction assertOptions(options, schema, allowUnknown) {\n if (typeof options !== 'object') {\n throw new AxiosError('options must be an object', AxiosError.ERR_BAD_OPTION_VALUE);\n }\n const keys = Object.keys(options);\n let i = keys.length;\n while (i-- > 0) {\n const opt = keys[i];\n const validator = schema[opt];\n if (validator) {\n const value = options[opt];\n const result = value === undefined || validator(value, opt, options);\n if (result !== true) {\n throw new AxiosError('option ' + opt + ' must be ' + result, AxiosError.ERR_BAD_OPTION_VALUE);\n }\n continue;\n }\n if (allowUnknown !== true) {\n throw new AxiosError('Unknown option ' + opt, AxiosError.ERR_BAD_OPTION);\n }\n }\n}\n\nvar validator = {\n assertOptions,\n validators: validators$1\n};\n\nconst validators = validator.validators;\n\n/**\n * Create a new instance of Axios\n *\n * @param {Object} instanceConfig The default config for the instance\n *\n * @return {Axios} A new instance of Axios\n */\nclass Axios {\n constructor(instanceConfig) {\n this.defaults = instanceConfig;\n this.interceptors = {\n request: new InterceptorManager(),\n response: new InterceptorManager()\n };\n }\n\n /**\n * Dispatch a request\n *\n * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)\n * @param {?Object} config\n *\n * @returns {Promise} The Promise to be fulfilled\n */\n async request(configOrUrl, config) {\n try {\n return await this._request(configOrUrl, config);\n } catch (err) {\n if (err instanceof Error) {\n let dummy;\n\n Error.captureStackTrace ? Error.captureStackTrace(dummy = {}) : (dummy = new Error());\n\n // slice off the Error: ... line\n const stack = dummy.stack ? dummy.stack.replace(/^.+\\n/, '') : '';\n\n if (!err.stack) {\n err.stack = stack;\n // match without the 2 top stack lines\n } else if (stack && !String(err.stack).endsWith(stack.replace(/^.+\\n.+\\n/, ''))) {\n err.stack += '\\n' + stack;\n }\n }\n\n throw err;\n }\n }\n\n _request(configOrUrl, config) {\n /*eslint no-param-reassign:0*/\n // Allow for axios('example/url'[, config]) a la fetch API\n if (typeof configOrUrl === 'string') {\n config = config || {};\n config.url = configOrUrl;\n } else {\n config = configOrUrl || {};\n }\n\n config = mergeConfig(this.defaults, config);\n\n const {transitional, paramsSerializer, headers} = config;\n\n if (transitional !== undefined) {\n validator.assertOptions(transitional, {\n silentJSONParsing: validators.transitional(validators.boolean),\n forcedJSONParsing: validators.transitional(validators.boolean),\n clarifyTimeoutError: validators.transitional(validators.boolean)\n }, false);\n }\n\n if (paramsSerializer != null) {\n if (utils$1.isFunction(paramsSerializer)) {\n config.paramsSerializer = {\n serialize: paramsSerializer\n };\n } else {\n validator.assertOptions(paramsSerializer, {\n encode: validators.function,\n serialize: validators.function\n }, true);\n }\n }\n\n // Set config.method\n config.method = (config.method || this.defaults.method || 'get').toLowerCase();\n\n // Flatten headers\n let contextHeaders = headers && utils$1.merge(\n headers.common,\n headers[config.method]\n );\n\n headers && utils$1.forEach(\n ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],\n (method) => {\n delete headers[method];\n }\n );\n\n config.headers = AxiosHeaders$1.concat(contextHeaders, headers);\n\n // filter out skipped interceptors\n const requestInterceptorChain = [];\n let synchronousRequestInterceptors = true;\n this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) {\n return;\n }\n\n synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;\n\n requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);\n });\n\n const responseInterceptorChain = [];\n this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);\n });\n\n let promise;\n let i = 0;\n let len;\n\n if (!synchronousRequestInterceptors) {\n const chain = [dispatchRequest.bind(this), undefined];\n chain.unshift.apply(chain, requestInterceptorChain);\n chain.push.apply(chain, responseInterceptorChain);\n len = chain.length;\n\n promise = Promise.resolve(config);\n\n while (i < len) {\n promise = promise.then(chain[i++], chain[i++]);\n }\n\n return promise;\n }\n\n len = requestInterceptorChain.length;\n\n let newConfig = config;\n\n i = 0;\n\n while (i < len) {\n const onFulfilled = requestInterceptorChain[i++];\n const onRejected = requestInterceptorChain[i++];\n try {\n newConfig = onFulfilled(newConfig);\n } catch (error) {\n onRejected.call(this, error);\n break;\n }\n }\n\n try {\n promise = dispatchRequest.call(this, newConfig);\n } catch (error) {\n return Promise.reject(error);\n }\n\n i = 0;\n len = responseInterceptorChain.length;\n\n while (i < len) {\n promise = promise.then(responseInterceptorChain[i++], responseInterceptorChain[i++]);\n }\n\n return promise;\n }\n\n getUri(config) {\n config = mergeConfig(this.defaults, config);\n const fullPath = buildFullPath(config.baseURL, config.url);\n return buildURL(fullPath, config.params, config.paramsSerializer);\n }\n}\n\n// Provide aliases for supported request methods\nutils$1.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, config) {\n return this.request(mergeConfig(config || {}, {\n method,\n url,\n data: (config || {}).data\n }));\n };\n});\n\nutils$1.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n /*eslint func-names:0*/\n\n function generateHTTPMethod(isForm) {\n return function httpMethod(url, data, config) {\n return this.request(mergeConfig(config || {}, {\n method,\n headers: isForm ? {\n 'Content-Type': 'multipart/form-data'\n } : {},\n url,\n data\n }));\n };\n }\n\n Axios.prototype[method] = generateHTTPMethod();\n\n Axios.prototype[method + 'Form'] = generateHTTPMethod(true);\n});\n\nvar Axios$1 = Axios;\n\n/**\n * A `CancelToken` is an object that can be used to request cancellation of an operation.\n *\n * @param {Function} executor The executor function.\n *\n * @returns {CancelToken}\n */\nclass CancelToken {\n constructor(executor) {\n if (typeof executor !== 'function') {\n throw new TypeError('executor must be a function.');\n }\n\n let resolvePromise;\n\n this.promise = new Promise(function promiseExecutor(resolve) {\n resolvePromise = resolve;\n });\n\n const token = this;\n\n // eslint-disable-next-line func-names\n this.promise.then(cancel => {\n if (!token._listeners) return;\n\n let i = token._listeners.length;\n\n while (i-- > 0) {\n token._listeners[i](cancel);\n }\n token._listeners = null;\n });\n\n // eslint-disable-next-line func-names\n this.promise.then = onfulfilled => {\n let _resolve;\n // eslint-disable-next-line func-names\n const promise = new Promise(resolve => {\n token.subscribe(resolve);\n _resolve = resolve;\n }).then(onfulfilled);\n\n promise.cancel = function reject() {\n token.unsubscribe(_resolve);\n };\n\n return promise;\n };\n\n executor(function cancel(message, config, request) {\n if (token.reason) {\n // Cancellation has already been requested\n return;\n }\n\n token.reason = new CanceledError(message, config, request);\n resolvePromise(token.reason);\n });\n }\n\n /**\n * Throws a `CanceledError` if cancellation has been requested.\n */\n throwIfRequested() {\n if (this.reason) {\n throw this.reason;\n }\n }\n\n /**\n * Subscribe to the cancel signal\n */\n\n subscribe(listener) {\n if (this.reason) {\n listener(this.reason);\n return;\n }\n\n if (this._listeners) {\n this._listeners.push(listener);\n } else {\n this._listeners = [listener];\n }\n }\n\n /**\n * Unsubscribe from the cancel signal\n */\n\n unsubscribe(listener) {\n if (!this._listeners) {\n return;\n }\n const index = this._listeners.indexOf(listener);\n if (index !== -1) {\n this._listeners.splice(index, 1);\n }\n }\n\n /**\n * Returns an object that contains a new `CancelToken` and a function that, when called,\n * cancels the `CancelToken`.\n */\n static source() {\n let cancel;\n const token = new CancelToken(function executor(c) {\n cancel = c;\n });\n return {\n token,\n cancel\n };\n }\n}\n\nvar CancelToken$1 = CancelToken;\n\n/**\n * Syntactic sugar for invoking a function and expanding an array for arguments.\n *\n * Common use case would be to use `Function.prototype.apply`.\n *\n * ```js\n * function f(x, y, z) {}\n * var args = [1, 2, 3];\n * f.apply(null, args);\n * ```\n *\n * With `spread` this example can be re-written.\n *\n * ```js\n * spread(function(x, y, z) {})([1, 2, 3]);\n * ```\n *\n * @param {Function} callback\n *\n * @returns {Function}\n */\nfunction spread(callback) {\n return function wrap(arr) {\n return callback.apply(null, arr);\n };\n}\n\n/**\n * Determines whether the payload is an error thrown by Axios\n *\n * @param {*} payload The value to test\n *\n * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false\n */\nfunction isAxiosError(payload) {\n return utils$1.isObject(payload) && (payload.isAxiosError === true);\n}\n\nconst HttpStatusCode = {\n Continue: 100,\n SwitchingProtocols: 101,\n Processing: 102,\n EarlyHints: 103,\n Ok: 200,\n Created: 201,\n Accepted: 202,\n NonAuthoritativeInformation: 203,\n NoContent: 204,\n ResetContent: 205,\n PartialContent: 206,\n MultiStatus: 207,\n AlreadyReported: 208,\n ImUsed: 226,\n MultipleChoices: 300,\n MovedPermanently: 301,\n Found: 302,\n SeeOther: 303,\n NotModified: 304,\n UseProxy: 305,\n Unused: 306,\n TemporaryRedirect: 307,\n PermanentRedirect: 308,\n BadRequest: 400,\n Unauthorized: 401,\n PaymentRequired: 402,\n Forbidden: 403,\n NotFound: 404,\n MethodNotAllowed: 405,\n NotAcceptable: 406,\n ProxyAuthenticationRequired: 407,\n RequestTimeout: 408,\n Conflict: 409,\n Gone: 410,\n LengthRequired: 411,\n PreconditionFailed: 412,\n PayloadTooLarge: 413,\n UriTooLong: 414,\n UnsupportedMediaType: 415,\n RangeNotSatisfiable: 416,\n ExpectationFailed: 417,\n ImATeapot: 418,\n MisdirectedRequest: 421,\n UnprocessableEntity: 422,\n Locked: 423,\n FailedDependency: 424,\n TooEarly: 425,\n UpgradeRequired: 426,\n PreconditionRequired: 428,\n TooManyRequests: 429,\n RequestHeaderFieldsTooLarge: 431,\n UnavailableForLegalReasons: 451,\n InternalServerError: 500,\n NotImplemented: 501,\n BadGateway: 502,\n ServiceUnavailable: 503,\n GatewayTimeout: 504,\n HttpVersionNotSupported: 505,\n VariantAlsoNegotiates: 506,\n InsufficientStorage: 507,\n LoopDetected: 508,\n NotExtended: 510,\n NetworkAuthenticationRequired: 511,\n};\n\nObject.entries(HttpStatusCode).forEach(([key, value]) => {\n HttpStatusCode[value] = key;\n});\n\nvar HttpStatusCode$1 = HttpStatusCode;\n\n/**\n * Create an instance of Axios\n *\n * @param {Object} defaultConfig The default config for the instance\n *\n * @returns {Axios} A new instance of Axios\n */\nfunction createInstance(defaultConfig) {\n const context = new Axios$1(defaultConfig);\n const instance = bind(Axios$1.prototype.request, context);\n\n // Copy axios.prototype to instance\n utils$1.extend(instance, Axios$1.prototype, context, {allOwnKeys: true});\n\n // Copy context to instance\n utils$1.extend(instance, context, null, {allOwnKeys: true});\n\n // Factory for creating new instances\n instance.create = function create(instanceConfig) {\n return createInstance(mergeConfig(defaultConfig, instanceConfig));\n };\n\n return instance;\n}\n\n// Create the default instance to be exported\nconst axios = createInstance(defaults$1);\n\n// Expose Axios class to allow class inheritance\naxios.Axios = Axios$1;\n\n// Expose Cancel & CancelToken\naxios.CanceledError = CanceledError;\naxios.CancelToken = CancelToken$1;\naxios.isCancel = isCancel;\naxios.VERSION = VERSION;\naxios.toFormData = toFormData;\n\n// Expose AxiosError class\naxios.AxiosError = AxiosError;\n\n// alias for CanceledError for backward compatibility\naxios.Cancel = axios.CanceledError;\n\n// Expose all/spread\naxios.all = function all(promises) {\n return Promise.all(promises);\n};\n\naxios.spread = spread;\n\n// Expose isAxiosError\naxios.isAxiosError = isAxiosError;\n\n// Expose mergeConfig\naxios.mergeConfig = mergeConfig;\n\naxios.AxiosHeaders = AxiosHeaders$1;\n\naxios.formToJSON = thing => formDataToJSON(utils$1.isHTMLForm(thing) ? new FormData(thing) : thing);\n\naxios.getAdapter = adapters.getAdapter;\n\naxios.HttpStatusCode = HttpStatusCode$1;\n\naxios.default = axios;\n\nvar ds=Object.defineProperty;var zg=Object.getOwnPropertyDescriptor;var Kg=Object.getOwnPropertyNames;var Gg=Object.prototype.hasOwnProperty;var we=(t,e)=>()=>(t&&(e=t(t=0)),e);var M=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Qt=(t,e)=>{for(var r in e)ds(t,r,{get:e[r],enumerable:!0});},Qg=(t,e,r,i)=>{if(e&&typeof e==\"object\"||typeof e==\"function\")for(let n of Kg(e))!Gg.call(t,n)&&n!==r&&ds(t,n,{get:()=>e[n],enumerable:!(i=zg(e,n))||i.enumerable});return t};var X=t=>Qg(ds({},\"__esModule\",{value:!0}),t);var B,_=we(()=>{B={deviceMemory:8,hardwareConcurrency:8,language:\"en-US\"};});var P={};Qt(P,{_debugEnd:()=>yu,_debugProcess:()=>gu,_events:()=>ku,_eventsCount:()=>xu,_exiting:()=>Yl,_fatalExceptions:()=>cu,_getActiveHandles:()=>eu,_getActiveRequests:()=>Zl,_kill:()=>ru,_linkedBinding:()=>Gl,_maxListeners:()=>Ou,_preload_modules:()=>Cu,_rawDebug:()=>zl,_startProfilerIdleNotifier:()=>bu,_stopProfilerIdleNotifier:()=>wu,_tickCallback:()=>pu,abort:()=>Eu,addListener:()=>Mu,allowedNodeEnvironmentFlags:()=>lu,arch:()=>xl,argv:()=>Ul,argv0:()=>Ru,assert:()=>uu,binding:()=>Fl,chdir:()=>Hl,config:()=>Jl,cpuUsage:()=>Fi,cwd:()=>$l,debugPort:()=>Tu,default:()=>$u,dlopen:()=>Xl,domain:()=>Ql,emit:()=>Du,emitWarning:()=>jl,env:()=>Ll,execArgv:()=>Nl,execPath:()=>Iu,exit:()=>ou,features:()=>fu,hasUncaughtExceptionCaptureCallback:()=>du,hrtime:()=>ji,kill:()=>su,listeners:()=>Wu,memoryUsage:()=>nu,moduleLoadList:()=>Kl,nextTick:()=>Pl,off:()=>Uu,on:()=>bt,once:()=>Lu,openStdin:()=>au,pid:()=>Su,platform:()=>Ml,ppid:()=>Au,prependListener:()=>ju,prependOnceListener:()=>Fu,reallyExit:()=>tu,release:()=>Vl,removeAllListeners:()=>qu,removeListener:()=>Nu,resourceUsage:()=>iu,setSourceMapsEnabled:()=>Bu,setUncaughtExceptionCaptureCallback:()=>hu,stderr:()=>mu,stdin:()=>vu,stdout:()=>_u,title:()=>kl,umask:()=>Wl,uptime:()=>Pu,version:()=>ql,versions:()=>Dl});function ys(t){throw new Error(\"Node.js process \"+t+\" is not supported by JSPM core outside of Node.js\")}function Yg(){!xr||!Yt||(xr=!1,Yt.length?yt=Yt.concat(yt):Di=-1,yt.length&&Bl());}function Bl(){if(!xr){var t=setTimeout(Yg,0);xr=!0;for(var e=yt.length;e;){for(Yt=yt,yt=[];++Di1)for(var r=1;r{v();m();_();yt=[],xr=!1,Di=-1;Ol.prototype.run=function(){this.fun.apply(null,this.array);};kl=\"browser\",xl=\"x64\",Ml=\"browser\",Ll={PATH:\"/usr/bin\",LANG:B.language+\".UTF-8\",PWD:\"/\",HOME:\"/home\",TMP:\"/tmp\"},Ul=[\"/usr/bin/node\"],Nl=[],ql=\"v16.8.0\",Dl={},jl=function(t,e){console.warn((e?e+\": \":\"\")+t);},Fl=function(t){ys(\"binding\");},Wl=function(t){return 0},$l=function(){return \"/\"},Hl=function(t){},Vl={name:\"node\",sourceUrl:\"\",headersUrl:\"\",libUrl:\"\"};zl=ve,Kl=[];Ql={},Yl=!1,Jl={};tu=ve,ru=ve,Fi=function(){return {}},iu=Fi,nu=Fi,su=ve,ou=ve,au=ve,lu={};fu={inspector:!1,debug:!1,uv:!1,ipv6:!1,tls_alpn:!1,tls_sni:!1,tls_ocsp:!1,tls:!1,cached_builtins:!0},cu=ve,hu=ve;pu=ve,gu=ve,yu=ve,bu=ve,wu=ve,_u=void 0,mu=void 0,vu=void 0,Eu=ve,Su=2,Au=1,Iu=\"/bin/usr/node\",Tu=9229,Ru=\"node\",Cu=[],Bu=ve,Mt={now:typeof performance<\"u\"?performance.now.bind(performance):void 0,timing:typeof performance<\"u\"?performance.timing:void 0};Mt.now===void 0&&(ps=Date.now(),Mt.timing&&Mt.timing.navigationStart&&(ps=Mt.timing.navigationStart),Mt.now=()=>Date.now()-ps);gs=1e9;ji.bigint=function(t){var e=ji(t);return typeof BigInt>\"u\"?e[0]*gs+e[1]:BigInt(e[0]*gs)+BigInt(e[1])};Ou=10,ku={},xu=0;Mu=bt,Lu=bt,Uu=bt,Nu=bt,qu=bt,Du=ve,ju=bt,Fu=bt;$u={version:ql,versions:Dl,arch:xl,platform:Ml,release:Vl,_rawDebug:zl,moduleLoadList:Kl,binding:Fl,_linkedBinding:Gl,_events:ku,_eventsCount:xu,_maxListeners:Ou,on:bt,addListener:Mu,once:Lu,off:Uu,removeListener:Nu,removeAllListeners:qu,emit:Du,prependListener:ju,prependOnceListener:Fu,listeners:Wu,domain:Ql,_exiting:Yl,config:Jl,dlopen:Xl,uptime:Pu,_getActiveRequests:Zl,_getActiveHandles:eu,reallyExit:tu,_kill:ru,cpuUsage:Fi,resourceUsage:iu,memoryUsage:nu,kill:su,exit:ou,openStdin:au,allowedNodeEnvironmentFlags:lu,assert:uu,features:fu,_fatalExceptions:cu,setUncaughtExceptionCaptureCallback:hu,hasUncaughtExceptionCaptureCallback:du,emitWarning:jl,nextTick:Pl,_tickCallback:pu,_debugProcess:gu,_debugEnd:yu,_startProfilerIdleNotifier:bu,_stopProfilerIdleNotifier:wu,stdout:_u,stdin:vu,stderr:mu,abort:Eu,umask:Wl,chdir:Hl,cwd:$l,env:Ll,title:kl,argv:Ul,execArgv:Nl,pid:Su,ppid:Au,execPath:Iu,debugPort:Tu,hrtime:ji,argv0:Ru,_preload_modules:Cu,setSourceMapsEnabled:Bu};});var m=we(()=>{Hu();});var _e={};Qt(_e,{Buffer:()=>x,INSPECT_MAX_BYTES:()=>ey,default:()=>Lt,kMaxLength:()=>ty});function Jg(){if(Vu)return ui;Vu=!0,ui.byteLength=a,ui.toByteArray=c,ui.fromByteArray=g;for(var t=[],e=[],r=typeof Uint8Array<\"u\"?Uint8Array:Array,i=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\",n=0,o=i.length;n0)throw new Error(\"Invalid string. Length must be a multiple of 4\");var E=y.indexOf(\"=\");E===-1&&(E=w);var S=E===w?0:4-E%4;return [E,S]}function a(y){var w=s(y),E=w[0],S=w[1];return (E+S)*3/4-S}function u(y,w,E){return (w+E)*3/4-E}function c(y){var w,E=s(y),S=E[0],I=E[1],C=new r(u(y,S,I)),R=0,U=I>0?S-4:S,N;for(N=0;N>16&255,C[R++]=w>>8&255,C[R++]=w&255;return I===2&&(w=e[y.charCodeAt(N)]<<2|e[y.charCodeAt(N+1)]>>4,C[R++]=w&255),I===1&&(w=e[y.charCodeAt(N)]<<10|e[y.charCodeAt(N+1)]<<4|e[y.charCodeAt(N+2)]>>2,C[R++]=w>>8&255,C[R++]=w&255),C}function h(y){return t[y>>18&63]+t[y>>12&63]+t[y>>6&63]+t[y&63]}function d(y,w,E){for(var S,I=[],C=w;CU?U:R+C));return S===1?(w=y[E-1],I.push(t[w>>2]+t[w<<4&63]+\"==\")):S===2&&(w=(y[E-2]<<8)+y[E-1],I.push(t[w>>10]+t[w>>4&63]+t[w<<2&63]+\"=\")),I.join(\"\")}return ui}function Xg(){if(zu)return Wi;zu=!0;return Wi.read=function(t,e,r,i,n){var o,s,a=n*8-i-1,u=(1<>1,h=-7,d=r?n-1:0,g=r?-1:1,y=t[e+d];for(d+=g,o=y&(1<<-h)-1,y>>=-h,h+=a;h>0;o=o*256+t[e+d],d+=g,h-=8);for(s=o&(1<<-h)-1,o>>=-h,h+=i;h>0;s=s*256+t[e+d],d+=g,h-=8);if(o===0)o=1-c;else {if(o===u)return s?NaN:(y?-1:1)*(1/0);s=s+Math.pow(2,i),o=o-c;}return (y?-1:1)*s*Math.pow(2,o-i)},Wi.write=function(t,e,r,i,n,o){var s,a,u,c=o*8-n-1,h=(1<>1,g=n===23?Math.pow(2,-24)-Math.pow(2,-77):0,y=i?0:o-1,w=i?1:-1,E=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=h):(s=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-s))<1&&(s--,u*=2),s+d>=1?e+=g/u:e+=g*Math.pow(2,1-d),e*u>=2&&(s++,u/=2),s+d>=h?(a=0,s=h):s+d>=1?(a=(e*u-1)*Math.pow(2,n),s=s+d):(a=e*Math.pow(2,d-1)*Math.pow(2,n),s=0));n>=8;t[r+y]=a&255,y+=w,a/=256,n-=8);for(s=s<0;t[r+y]=s&255,y+=w,s/=256,c-=8);t[r+y-w]|=E*128;},Wi}function Zg(){if(Ku)return Jt;Ku=!0;let t=Jg(),e=Xg(),r=typeof Symbol==\"function\"&&typeof Symbol.for==\"function\"?Symbol.for(\"nodejs.util.inspect.custom\"):null;Jt.Buffer=s,Jt.SlowBuffer=I,Jt.INSPECT_MAX_BYTES=50;let i=2147483647;Jt.kMaxLength=i,s.TYPED_ARRAY_SUPPORT=n(),!s.TYPED_ARRAY_SUPPORT&&typeof console<\"u\"&&typeof console.error==\"function\"&&console.error(\"This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.\");function n(){try{let p=new Uint8Array(1),l={foo:function(){return 42}};return Object.setPrototypeOf(l,Uint8Array.prototype),Object.setPrototypeOf(p,l),p.foo()===42}catch{return !1}}Object.defineProperty(s.prototype,\"parent\",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),Object.defineProperty(s.prototype,\"offset\",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}});function o(p){if(p>i)throw new RangeError('The value \"'+p+'\" is invalid for option \"size\"');let l=new Uint8Array(p);return Object.setPrototypeOf(l,s.prototype),l}function s(p,l,f){if(typeof p==\"number\"){if(typeof l==\"string\")throw new TypeError('The \"string\" argument must be of type string. Received type number');return h(p)}return a(p,l,f)}s.poolSize=8192;function a(p,l,f){if(typeof p==\"string\")return d(p,l);if(ArrayBuffer.isView(p))return y(p);if(p==null)throw new TypeError(\"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type \"+typeof p);if(Ye(p,ArrayBuffer)||p&&Ye(p.buffer,ArrayBuffer)||typeof SharedArrayBuffer<\"u\"&&(Ye(p,SharedArrayBuffer)||p&&Ye(p.buffer,SharedArrayBuffer)))return w(p,l,f);if(typeof p==\"number\")throw new TypeError('The \"value\" argument must not be of type number. Received type number');let b=p.valueOf&&p.valueOf();if(b!=null&&b!==p)return s.from(b,l,f);let A=E(p);if(A)return A;if(typeof Symbol<\"u\"&&Symbol.toPrimitive!=null&&typeof p[Symbol.toPrimitive]==\"function\")return s.from(p[Symbol.toPrimitive](\"string\"),l,f);throw new TypeError(\"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type \"+typeof p)}s.from=function(p,l,f){return a(p,l,f)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array);function u(p){if(typeof p!=\"number\")throw new TypeError('\"size\" argument must be of type number');if(p<0)throw new RangeError('The value \"'+p+'\" is invalid for option \"size\"')}function c(p,l,f){return u(p),p<=0?o(p):l!==void 0?typeof f==\"string\"?o(p).fill(l,f):o(p).fill(l):o(p)}s.alloc=function(p,l,f){return c(p,l,f)};function h(p){return u(p),o(p<0?0:S(p)|0)}s.allocUnsafe=function(p){return h(p)},s.allocUnsafeSlow=function(p){return h(p)};function d(p,l){if((typeof l!=\"string\"||l===\"\")&&(l=\"utf8\"),!s.isEncoding(l))throw new TypeError(\"Unknown encoding: \"+l);let f=C(p,l)|0,b=o(f),A=b.write(p,l);return A!==f&&(b=b.slice(0,A)),b}function g(p){let l=p.length<0?0:S(p.length)|0,f=o(l);for(let b=0;b=i)throw new RangeError(\"Attempt to allocate Buffer larger than maximum size: 0x\"+i.toString(16)+\" bytes\");return p|0}function I(p){return +p!=p&&(p=0),s.alloc(+p)}s.isBuffer=function(l){return l!=null&&l._isBuffer===!0&&l!==s.prototype},s.compare=function(l,f){if(Ye(l,Uint8Array)&&(l=s.from(l,l.offset,l.byteLength)),Ye(f,Uint8Array)&&(f=s.from(f,f.offset,f.byteLength)),!s.isBuffer(l)||!s.isBuffer(f))throw new TypeError('The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array');if(l===f)return 0;let b=l.length,A=f.length;for(let T=0,O=Math.min(b,A);TA.length?(s.isBuffer(O)||(O=s.from(O)),O.copy(A,T)):Uint8Array.prototype.set.call(A,O,T);else if(s.isBuffer(O))O.copy(A,T);else throw new TypeError('\"list\" argument must be an Array of Buffers');T+=O.length;}return A};function C(p,l){if(s.isBuffer(p))return p.length;if(ArrayBuffer.isView(p)||Ye(p,ArrayBuffer))return p.byteLength;if(typeof p!=\"string\")throw new TypeError('The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof p);let f=p.length,b=arguments.length>2&&arguments[2]===!0;if(!b&&f===0)return 0;let A=!1;for(;;)switch(l){case\"ascii\":case\"latin1\":case\"binary\":return f;case\"utf8\":case\"utf-8\":return cs(p).length;case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return f*2;case\"hex\":return f>>>1;case\"base64\":return Cl(p).length;default:if(A)return b?-1:cs(p).length;l=(\"\"+l).toLowerCase(),A=!0;}}s.byteLength=C;function R(p,l,f){let b=!1;if((l===void 0||l<0)&&(l=0),l>this.length||((f===void 0||f>this.length)&&(f=this.length),f<=0)||(f>>>=0,l>>>=0,f<=l))return \"\";for(p||(p=\"utf8\");;)switch(p){case\"hex\":return Ng(this,l,f);case\"utf8\":case\"utf-8\":return Cr(this,l,f);case\"ascii\":return us(this,l,f);case\"latin1\":case\"binary\":return Ug(this,l,f);case\"base64\":return pe(this,l,f);case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return qg(this,l,f);default:if(b)throw new TypeError(\"Unknown encoding: \"+p);p=(p+\"\").toLowerCase(),b=!0;}}s.prototype._isBuffer=!0;function U(p,l,f){let b=p[l];p[l]=p[f],p[f]=b;}s.prototype.swap16=function(){let l=this.length;if(l%2!==0)throw new RangeError(\"Buffer size must be a multiple of 16-bits\");for(let f=0;ff&&(l+=\" ... \"),\"\"},r&&(s.prototype[r]=s.prototype.inspect),s.prototype.compare=function(l,f,b,A,T){if(Ye(l,Uint8Array)&&(l=s.from(l,l.offset,l.byteLength)),!s.isBuffer(l))throw new TypeError('The \"target\" argument must be one of type Buffer or Uint8Array. Received type '+typeof l);if(f===void 0&&(f=0),b===void 0&&(b=l?l.length:0),A===void 0&&(A=0),T===void 0&&(T=this.length),f<0||b>l.length||A<0||T>this.length)throw new RangeError(\"out of range index\");if(A>=T&&f>=b)return 0;if(A>=T)return -1;if(f>=b)return 1;if(f>>>=0,b>>>=0,A>>>=0,T>>>=0,this===l)return 0;let O=T-A,$=b-f,se=Math.min(O,$),te=this.slice(A,T),oe=l.slice(f,b);for(let J=0;J2147483647?f=2147483647:f<-2147483648&&(f=-2147483648),f=+f,hs(f)&&(f=A?0:p.length-1),f<0&&(f=p.length+f),f>=p.length){if(A)return -1;f=p.length-1;}else if(f<0)if(A)f=0;else return -1;if(typeof l==\"string\"&&(l=s.from(l,b)),s.isBuffer(l))return l.length===0?-1:W(p,l,f,b,A);if(typeof l==\"number\")return l=l&255,typeof Uint8Array.prototype.indexOf==\"function\"?A?Uint8Array.prototype.indexOf.call(p,l,f):Uint8Array.prototype.lastIndexOf.call(p,l,f):W(p,[l],f,b,A);throw new TypeError(\"val must be string, number or Buffer\")}function W(p,l,f,b,A){let T=1,O=p.length,$=l.length;if(b!==void 0&&(b=String(b).toLowerCase(),b===\"ucs2\"||b===\"ucs-2\"||b===\"utf16le\"||b===\"utf-16le\")){if(p.length<2||l.length<2)return -1;T=2,O/=2,$/=2,f/=2;}function se(oe,J){return T===1?oe[J]:oe.readUInt16BE(J*T)}let te;if(A){let oe=-1;for(te=f;teO&&(f=O-$),te=f;te>=0;te--){let oe=!0;for(let J=0;J<$;J++)if(se(p,te+J)!==se(l,J)){oe=!1;break}if(oe)return te}return -1}s.prototype.includes=function(l,f,b){return this.indexOf(l,f,b)!==-1},s.prototype.indexOf=function(l,f,b){return N(this,l,f,b,!0)},s.prototype.lastIndexOf=function(l,f,b){return N(this,l,f,b,!1)};function K(p,l,f,b){f=Number(f)||0;let A=p.length-f;b?(b=Number(b),b>A&&(b=A)):b=A;let T=l.length;b>T/2&&(b=T/2);let O;for(O=0;O>>0,isFinite(b)?(b=b>>>0,A===void 0&&(A=\"utf8\")):(A=b,b=void 0);else throw new Error(\"Buffer.write(string, encoding, offset[, length]) is no longer supported\");let T=this.length-f;if((b===void 0||b>T)&&(b=T),l.length>0&&(b<0||f<0)||f>this.length)throw new RangeError(\"Attempt to write outside buffer bounds\");A||(A=\"utf8\");let O=!1;for(;;)switch(A){case\"hex\":return K(this,l,f,b);case\"utf8\":case\"utf-8\":return z(this,l,f,b);case\"ascii\":case\"latin1\":case\"binary\":return Q(this,l,f,b);case\"base64\":return de(this,l,f,b);case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return Gt(this,l,f,b);default:if(O)throw new TypeError(\"Unknown encoding: \"+A);A=(\"\"+A).toLowerCase(),O=!0;}},s.prototype.toJSON=function(){return {type:\"Buffer\",data:Array.prototype.slice.call(this._arr||this,0)}};function pe(p,l,f){return l===0&&f===p.length?t.fromByteArray(p):t.fromByteArray(p.slice(l,f))}function Cr(p,l,f){f=Math.min(p.length,f);let b=[],A=l;for(;A239?4:T>223?3:T>191?2:1;if(A+$<=f){let se,te,oe,J;switch($){case 1:T<128&&(O=T);break;case 2:se=p[A+1],(se&192)===128&&(J=(T&31)<<6|se&63,J>127&&(O=J));break;case 3:se=p[A+1],te=p[A+2],(se&192)===128&&(te&192)===128&&(J=(T&15)<<12|(se&63)<<6|te&63,J>2047&&(J<55296||J>57343)&&(O=J));break;case 4:se=p[A+1],te=p[A+2],oe=p[A+3],(se&192)===128&&(te&192)===128&&(oe&192)===128&&(J=(T&15)<<18|(se&63)<<12|(te&63)<<6|oe&63,J>65535&&J<1114112&&(O=J));}}O===null?(O=65533,$=1):O>65535&&(O-=65536,b.push(O>>>10&1023|55296),O=56320|O&1023),b.push(O),A+=$;}return Pr(b)}let Br=4096;function Pr(p){let l=p.length;if(l<=Br)return String.fromCharCode.apply(String,p);let f=\"\",b=0;for(;bb)&&(f=b);let A=\"\";for(let T=l;Tb&&(l=b),f<0?(f+=b,f<0&&(f=0)):f>b&&(f=b),ff)throw new RangeError(\"Trying to access beyond buffer length\")}s.prototype.readUintLE=s.prototype.readUIntLE=function(l,f,b){l=l>>>0,f=f>>>0,b||ge(l,f,this.length);let A=this[l],T=1,O=0;for(;++O>>0,f=f>>>0,b||ge(l,f,this.length);let A=this[l+--f],T=1;for(;f>0&&(T*=256);)A+=this[l+--f]*T;return A},s.prototype.readUint8=s.prototype.readUInt8=function(l,f){return l=l>>>0,f||ge(l,1,this.length),this[l]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(l,f){return l=l>>>0,f||ge(l,2,this.length),this[l]|this[l+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(l,f){return l=l>>>0,f||ge(l,2,this.length),this[l]<<8|this[l+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(l,f){return l=l>>>0,f||ge(l,4,this.length),(this[l]|this[l+1]<<8|this[l+2]<<16)+this[l+3]*16777216},s.prototype.readUint32BE=s.prototype.readUInt32BE=function(l,f){return l=l>>>0,f||ge(l,4,this.length),this[l]*16777216+(this[l+1]<<16|this[l+2]<<8|this[l+3])},s.prototype.readBigUInt64LE=xt(function(l){l=l>>>0,kr(l,\"offset\");let f=this[l],b=this[l+7];(f===void 0||b===void 0)&&li(l,this.length-8);let A=f+this[++l]*2**8+this[++l]*2**16+this[++l]*2**24,T=this[++l]+this[++l]*2**8+this[++l]*2**16+b*2**24;return BigInt(A)+(BigInt(T)<>>0,kr(l,\"offset\");let f=this[l],b=this[l+7];(f===void 0||b===void 0)&&li(l,this.length-8);let A=f*2**24+this[++l]*2**16+this[++l]*2**8+this[++l],T=this[++l]*2**24+this[++l]*2**16+this[++l]*2**8+b;return (BigInt(A)<>>0,f=f>>>0,b||ge(l,f,this.length);let A=this[l],T=1,O=0;for(;++O=T&&(A-=Math.pow(2,8*f)),A},s.prototype.readIntBE=function(l,f,b){l=l>>>0,f=f>>>0,b||ge(l,f,this.length);let A=f,T=1,O=this[l+--A];for(;A>0&&(T*=256);)O+=this[l+--A]*T;return T*=128,O>=T&&(O-=Math.pow(2,8*f)),O},s.prototype.readInt8=function(l,f){return l=l>>>0,f||ge(l,1,this.length),this[l]&128?(255-this[l]+1)*-1:this[l]},s.prototype.readInt16LE=function(l,f){l=l>>>0,f||ge(l,2,this.length);let b=this[l]|this[l+1]<<8;return b&32768?b|4294901760:b},s.prototype.readInt16BE=function(l,f){l=l>>>0,f||ge(l,2,this.length);let b=this[l+1]|this[l]<<8;return b&32768?b|4294901760:b},s.prototype.readInt32LE=function(l,f){return l=l>>>0,f||ge(l,4,this.length),this[l]|this[l+1]<<8|this[l+2]<<16|this[l+3]<<24},s.prototype.readInt32BE=function(l,f){return l=l>>>0,f||ge(l,4,this.length),this[l]<<24|this[l+1]<<16|this[l+2]<<8|this[l+3]},s.prototype.readBigInt64LE=xt(function(l){l=l>>>0,kr(l,\"offset\");let f=this[l],b=this[l+7];(f===void 0||b===void 0)&&li(l,this.length-8);let A=this[l+4]+this[l+5]*2**8+this[l+6]*2**16+(b<<24);return (BigInt(A)<>>0,kr(l,\"offset\");let f=this[l],b=this[l+7];(f===void 0||b===void 0)&&li(l,this.length-8);let A=(f<<24)+this[++l]*2**16+this[++l]*2**8+this[++l];return (BigInt(A)<>>0,f||ge(l,4,this.length),e.read(this,l,!0,23,4)},s.prototype.readFloatBE=function(l,f){return l=l>>>0,f||ge(l,4,this.length),e.read(this,l,!1,23,4)},s.prototype.readDoubleLE=function(l,f){return l=l>>>0,f||ge(l,8,this.length),e.read(this,l,!0,52,8)},s.prototype.readDoubleBE=function(l,f){return l=l>>>0,f||ge(l,8,this.length),e.read(this,l,!1,52,8)};function Ce(p,l,f,b,A,T){if(!s.isBuffer(p))throw new TypeError('\"buffer\" argument must be a Buffer instance');if(l>A||lp.length)throw new RangeError(\"Index out of range\")}s.prototype.writeUintLE=s.prototype.writeUIntLE=function(l,f,b,A){if(l=+l,f=f>>>0,b=b>>>0,!A){let $=Math.pow(2,8*b)-1;Ce(this,l,f,b,$,0);}let T=1,O=0;for(this[f]=l&255;++O>>0,b=b>>>0,!A){let $=Math.pow(2,8*b)-1;Ce(this,l,f,b,$,0);}let T=b-1,O=1;for(this[f+T]=l&255;--T>=0&&(O*=256);)this[f+T]=l/O&255;return f+b},s.prototype.writeUint8=s.prototype.writeUInt8=function(l,f,b){return l=+l,f=f>>>0,b||Ce(this,l,f,1,255,0),this[f]=l&255,f+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(l,f,b){return l=+l,f=f>>>0,b||Ce(this,l,f,2,65535,0),this[f]=l&255,this[f+1]=l>>>8,f+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function(l,f,b){return l=+l,f=f>>>0,b||Ce(this,l,f,2,65535,0),this[f]=l>>>8,this[f+1]=l&255,f+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function(l,f,b){return l=+l,f=f>>>0,b||Ce(this,l,f,4,4294967295,0),this[f+3]=l>>>24,this[f+2]=l>>>16,this[f+1]=l>>>8,this[f]=l&255,f+4},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function(l,f,b){return l=+l,f=f>>>0,b||Ce(this,l,f,4,4294967295,0),this[f]=l>>>24,this[f+1]=l>>>16,this[f+2]=l>>>8,this[f+3]=l&255,f+4};function vl(p,l,f,b,A){Rl(l,b,A,p,f,7);let T=Number(l&BigInt(4294967295));p[f++]=T,T=T>>8,p[f++]=T,T=T>>8,p[f++]=T,T=T>>8,p[f++]=T;let O=Number(l>>BigInt(32)&BigInt(4294967295));return p[f++]=O,O=O>>8,p[f++]=O,O=O>>8,p[f++]=O,O=O>>8,p[f++]=O,f}function El(p,l,f,b,A){Rl(l,b,A,p,f,7);let T=Number(l&BigInt(4294967295));p[f+7]=T,T=T>>8,p[f+6]=T,T=T>>8,p[f+5]=T,T=T>>8,p[f+4]=T;let O=Number(l>>BigInt(32)&BigInt(4294967295));return p[f+3]=O,O=O>>8,p[f+2]=O,O=O>>8,p[f+1]=O,O=O>>8,p[f]=O,f+8}s.prototype.writeBigUInt64LE=xt(function(l,f=0){return vl(this,l,f,BigInt(0),BigInt(\"0xffffffffffffffff\"))}),s.prototype.writeBigUInt64BE=xt(function(l,f=0){return El(this,l,f,BigInt(0),BigInt(\"0xffffffffffffffff\"))}),s.prototype.writeIntLE=function(l,f,b,A){if(l=+l,f=f>>>0,!A){let se=Math.pow(2,8*b-1);Ce(this,l,f,b,se-1,-se);}let T=0,O=1,$=0;for(this[f]=l&255;++T>0)-$&255;return f+b},s.prototype.writeIntBE=function(l,f,b,A){if(l=+l,f=f>>>0,!A){let se=Math.pow(2,8*b-1);Ce(this,l,f,b,se-1,-se);}let T=b-1,O=1,$=0;for(this[f+T]=l&255;--T>=0&&(O*=256);)l<0&&$===0&&this[f+T+1]!==0&&($=1),this[f+T]=(l/O>>0)-$&255;return f+b},s.prototype.writeInt8=function(l,f,b){return l=+l,f=f>>>0,b||Ce(this,l,f,1,127,-128),l<0&&(l=255+l+1),this[f]=l&255,f+1},s.prototype.writeInt16LE=function(l,f,b){return l=+l,f=f>>>0,b||Ce(this,l,f,2,32767,-32768),this[f]=l&255,this[f+1]=l>>>8,f+2},s.prototype.writeInt16BE=function(l,f,b){return l=+l,f=f>>>0,b||Ce(this,l,f,2,32767,-32768),this[f]=l>>>8,this[f+1]=l&255,f+2},s.prototype.writeInt32LE=function(l,f,b){return l=+l,f=f>>>0,b||Ce(this,l,f,4,2147483647,-2147483648),this[f]=l&255,this[f+1]=l>>>8,this[f+2]=l>>>16,this[f+3]=l>>>24,f+4},s.prototype.writeInt32BE=function(l,f,b){return l=+l,f=f>>>0,b||Ce(this,l,f,4,2147483647,-2147483648),l<0&&(l=4294967295+l+1),this[f]=l>>>24,this[f+1]=l>>>16,this[f+2]=l>>>8,this[f+3]=l&255,f+4},s.prototype.writeBigInt64LE=xt(function(l,f=0){return vl(this,l,f,-BigInt(\"0x8000000000000000\"),BigInt(\"0x7fffffffffffffff\"))}),s.prototype.writeBigInt64BE=xt(function(l,f=0){return El(this,l,f,-BigInt(\"0x8000000000000000\"),BigInt(\"0x7fffffffffffffff\"))});function Sl(p,l,f,b,A,T){if(f+b>p.length)throw new RangeError(\"Index out of range\");if(f<0)throw new RangeError(\"Index out of range\")}function Al(p,l,f,b,A){return l=+l,f=f>>>0,A||Sl(p,l,f,4),e.write(p,l,f,b,23,4),f+4}s.prototype.writeFloatLE=function(l,f,b){return Al(this,l,f,!0,b)},s.prototype.writeFloatBE=function(l,f,b){return Al(this,l,f,!1,b)};function Il(p,l,f,b,A){return l=+l,f=f>>>0,A||Sl(p,l,f,8),e.write(p,l,f,b,52,8),f+8}s.prototype.writeDoubleLE=function(l,f,b){return Il(this,l,f,!0,b)},s.prototype.writeDoubleBE=function(l,f,b){return Il(this,l,f,!1,b)},s.prototype.copy=function(l,f,b,A){if(!s.isBuffer(l))throw new TypeError(\"argument should be a Buffer\");if(b||(b=0),!A&&A!==0&&(A=this.length),f>=l.length&&(f=l.length),f||(f=0),A>0&&A=this.length)throw new RangeError(\"Index out of range\");if(A<0)throw new RangeError(\"sourceEnd out of bounds\");A>this.length&&(A=this.length),l.length-f>>0,b=b===void 0?this.length:b>>>0,l||(l=0);let T;if(typeof l==\"number\")for(T=f;T2**32?A=Tl(String(f)):typeof f==\"bigint\"&&(A=String(f),(f>BigInt(2)**BigInt(32)||f<-(BigInt(2)**BigInt(32)))&&(A=Tl(A)),A+=\"n\"),b+=` It must be ${l}. Received ${A}`,b},RangeError);function Tl(p){let l=\"\",f=p.length,b=p[0]===\"-\"?1:0;for(;f>=b+4;f-=3)l=`_${p.slice(f-3,f)}${l}`;return `${p.slice(0,f)}${l}`}function Dg(p,l,f){kr(l,\"offset\"),(p[l]===void 0||p[l+f]===void 0)&&li(l,p.length-(f+1));}function Rl(p,l,f,b,A,T){if(p>f||p3?l===0||l===BigInt(0)?$=`>= 0${O} and < 2${O} ** ${(T+1)*8}${O}`:$=`>= -(2${O} ** ${(T+1)*8-1}${O}) and < 2 ** ${(T+1)*8-1}${O}`:$=`>= ${l}${O} and <= ${f}${O}`,new Or.ERR_OUT_OF_RANGE(\"value\",$,p)}Dg(b,A,T);}function kr(p,l){if(typeof p!=\"number\")throw new Or.ERR_INVALID_ARG_TYPE(l,\"number\",p)}function li(p,l,f){throw Math.floor(p)!==p?(kr(p,f),new Or.ERR_OUT_OF_RANGE(f||\"offset\",\"an integer\",p)):l<0?new Or.ERR_BUFFER_OUT_OF_BOUNDS:new Or.ERR_OUT_OF_RANGE(f||\"offset\",`>= ${f?1:0} and <= ${l}`,p)}let jg=/[^+/0-9A-Za-z-_]/g;function Fg(p){if(p=p.split(\"=\")[0],p=p.trim().replace(jg,\"\"),p.length<2)return \"\";for(;p.length%4!==0;)p=p+\"=\";return p}function cs(p,l){l=l||1/0;let f,b=p.length,A=null,T=[];for(let O=0;O55295&&f<57344){if(!A){if(f>56319){(l-=3)>-1&&T.push(239,191,189);continue}else if(O+1===b){(l-=3)>-1&&T.push(239,191,189);continue}A=f;continue}if(f<56320){(l-=3)>-1&&T.push(239,191,189),A=f;continue}f=(A-55296<<10|f-56320)+65536;}else A&&(l-=3)>-1&&T.push(239,191,189);if(A=null,f<128){if((l-=1)<0)break;T.push(f);}else if(f<2048){if((l-=2)<0)break;T.push(f>>6|192,f&63|128);}else if(f<65536){if((l-=3)<0)break;T.push(f>>12|224,f>>6&63|128,f&63|128);}else if(f<1114112){if((l-=4)<0)break;T.push(f>>18|240,f>>12&63|128,f>>6&63|128,f&63|128);}else throw new Error(\"Invalid code point\")}return T}function Wg(p){let l=[];for(let f=0;f>8,A=f%256,T.push(A),T.push(b);return T}function Cl(p){return t.toByteArray(Fg(p))}function qi(p,l,f,b){let A;for(A=0;A=l.length||A>=p.length);++A)l[A+f]=p[A];return A}function Ye(p,l){return p instanceof l||p!=null&&p.constructor!=null&&p.constructor.name!=null&&p.constructor.name===l.name}function hs(p){return p!==p}let Hg=function(){let p=\"0123456789abcdef\",l=new Array(256);for(let f=0;f<16;++f){let b=f*16;for(let A=0;A<16;++A)l[b+A]=p[f]+p[A];}return l}();function xt(p){return typeof BigInt>\"u\"?Vg:p}function Vg(){throw new Error(\"BigInt not supported\")}return Jt}var ui,Vu,Wi,zu,Jt,Ku,Lt,x,ey,ty,ye=we(()=>{v();m();_();ui={},Vu=!1;Wi={},zu=!1;Jt={},Ku=!1;Lt=Zg();Lt.Buffer;Lt.SlowBuffer;Lt.INSPECT_MAX_BYTES;Lt.kMaxLength;x=Lt.Buffer,ey=Lt.INSPECT_MAX_BYTES,ty=Lt.kMaxLength;});var v=we(()=>{ye();});var Gu=M(ws=>{v();m();_();Object.defineProperty(ws,\"__esModule\",{value:!0});var bs=class{constructor(e){this.aliasToTopic={},this.max=e;}put(e,r){return r===0||r>this.max?!1:(this.aliasToTopic[r]=e,this.length=Object.keys(this.aliasToTopic).length,!0)}getTopicByAlias(e){return this.aliasToTopic[e]}clear(){this.aliasToTopic={};}};ws.default=bs;});var ce=M((PA,Qu)=>{v();m();_();Qu.exports={ArrayIsArray(t){return Array.isArray(t)},ArrayPrototypeIncludes(t,e){return t.includes(e)},ArrayPrototypeIndexOf(t,e){return t.indexOf(e)},ArrayPrototypeJoin(t,e){return t.join(e)},ArrayPrototypeMap(t,e){return t.map(e)},ArrayPrototypePop(t,e){return t.pop(e)},ArrayPrototypePush(t,e){return t.push(e)},ArrayPrototypeSlice(t,e,r){return t.slice(e,r)},Error,FunctionPrototypeCall(t,e,...r){return t.call(e,...r)},FunctionPrototypeSymbolHasInstance(t,e){return Function.prototype[Symbol.hasInstance].call(t,e)},MathFloor:Math.floor,Number,NumberIsInteger:Number.isInteger,NumberIsNaN:Number.isNaN,NumberMAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER,NumberMIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER,NumberParseInt:Number.parseInt,ObjectDefineProperties(t,e){return Object.defineProperties(t,e)},ObjectDefineProperty(t,e,r){return Object.defineProperty(t,e,r)},ObjectGetOwnPropertyDescriptor(t,e){return Object.getOwnPropertyDescriptor(t,e)},ObjectKeys(t){return Object.keys(t)},ObjectSetPrototypeOf(t,e){return Object.setPrototypeOf(t,e)},Promise,PromisePrototypeCatch(t,e){return t.catch(e)},PromisePrototypeThen(t,e,r){return t.then(e,r)},PromiseReject(t){return Promise.reject(t)},ReflectApply:Reflect.apply,RegExpPrototypeTest(t,e){return t.test(e)},SafeSet:Set,String,StringPrototypeSlice(t,e,r){return t.slice(e,r)},StringPrototypeToLowerCase(t){return t.toLowerCase()},StringPrototypeToUpperCase(t){return t.toUpperCase()},StringPrototypeTrim(t){return t.trim()},Symbol,SymbolFor:Symbol.for,SymbolAsyncIterator:Symbol.asyncIterator,SymbolHasInstance:Symbol.hasInstance,SymbolIterator:Symbol.iterator,TypedArrayPrototypeSet(t,e,r){return t.set(e,r)},Uint8Array};});var Je=M((jA,ms)=>{v();m();_();var ry=(ye(),X(_e)),iy=Object.getPrototypeOf(async function(){}).constructor,Yu=globalThis.Blob||ry.Blob,ny=typeof Yu<\"u\"?function(e){return e instanceof Yu}:function(e){return !1},_s=class extends Error{constructor(e){if(!Array.isArray(e))throw new TypeError(`Expected input to be an Array, got ${typeof e}`);let r=\"\";for(let i=0;i{t=i,e=n;}),resolve:t,reject:e}},promisify(t){return new Promise((e,r)=>{t((i,...n)=>i?r(i):e(...n));})},debuglog(){return function(){}},format(t,...e){return t.replace(/%([sdifj])/g,function(...[r,i]){let n=e.shift();return i===\"f\"?n.toFixed(6):i===\"j\"?JSON.stringify(n):i===\"s\"&&typeof n==\"object\"?`${n.constructor!==Object?n.constructor.name:\"\"} {}`.trim():n.toString()})},inspect(t){switch(typeof t){case\"string\":if(t.includes(\"'\"))if(t.includes('\"')){if(!t.includes(\"`\")&&!t.includes(\"${\"))return `\\`${t}\\``}else return `\"${t}\"`;return `'${t}'`;case\"number\":return isNaN(t)?\"NaN\":Object.is(t,-0)?String(t):t;case\"bigint\":return `${String(t)}n`;case\"boolean\":case\"undefined\":return String(t);case\"object\":return \"{}\"}},types:{isAsyncFunction(t){return t instanceof iy},isArrayBufferView(t){return ArrayBuffer.isView(t)}},isBlob:ny};ms.exports.promisify.custom=Symbol.for(\"nodejs.util.promisify.custom\");});var Hi=M((YA,$i)=>{v();m();_();var{AbortController:Ju,AbortSignal:sy}=typeof self<\"u\"?self:typeof window<\"u\"?window:void 0;$i.exports=Ju;$i.exports.AbortSignal=sy;$i.exports.default=Ju;});var Se=M((oI,ef)=>{v();m();_();var{format:oy,inspect:Vi,AggregateError:ay}=Je(),ly=globalThis.AggregateError||ay,uy=Symbol(\"kIsNodeError\"),fy=[\"string\",\"function\",\"number\",\"object\",\"Function\",\"Object\",\"boolean\",\"bigint\",\"symbol\"],cy=/^([A-Z][a-z0-9]*)+$/,hy=\"__node_internal_\",zi={};function Xt(t,e){if(!t)throw new zi.ERR_INTERNAL_ASSERTION(e)}function Xu(t){let e=\"\",r=t.length,i=t[0]===\"-\"?1:0;for(;r>=i+4;r-=3)e=`_${t.slice(r-3,r)}${e}`;return `${t.slice(0,r)}${e}`}function dy(t,e,r){if(typeof e==\"function\")return Xt(e.length<=r.length,`Code: ${t}; The provided arguments length (${r.length}) does not match the required ones (${e.length}).`),e(...r);let i=(e.match(/%[dfijoOs]/g)||[]).length;return Xt(i===r.length,`Code: ${t}; The provided arguments length (${r.length}) does not match the required ones (${i}).`),r.length===0?e:oy(e,...r)}function me(t,e,r){r||(r=Error);class i extends r{constructor(...o){super(dy(t,e,o));}toString(){return `${this.name} [${t}]: ${this.message}`}}Object.defineProperties(i.prototype,{name:{value:r.name,writable:!0,enumerable:!1,configurable:!0},toString:{value(){return `${this.name} [${t}]: ${this.message}`},writable:!0,enumerable:!1,configurable:!0}}),i.prototype.code=t,i.prototype[uy]=!0,zi[t]=i;}function Zu(t){let e=hy+t.name;return Object.defineProperty(t,\"name\",{value:e}),t}function py(t,e){if(t&&e&&t!==e){if(Array.isArray(e.errors))return e.errors.push(t),e;let r=new ly([e,t],e.message);return r.code=e.code,r}return t||e}var vs=class extends Error{constructor(e=\"The operation was aborted\",r=void 0){if(r!==void 0&&typeof r!=\"object\")throw new zi.ERR_INVALID_ARG_TYPE(\"options\",\"Object\",r);super(e,r),this.code=\"ABORT_ERR\",this.name=\"AbortError\";}};me(\"ERR_ASSERTION\",\"%s\",Error);me(\"ERR_INVALID_ARG_TYPE\",(t,e,r)=>{Xt(typeof t==\"string\",\"'name' must be a string\"),Array.isArray(e)||(e=[e]);let i=\"The \";t.endsWith(\" argument\")?i+=`${t} `:i+=`\"${t}\" ${t.includes(\".\")?\"property\":\"argument\"} `,i+=\"must be \";let n=[],o=[],s=[];for(let u of e)Xt(typeof u==\"string\",\"All expected entries have to be of type string\"),fy.includes(u)?n.push(u.toLowerCase()):cy.test(u)?o.push(u):(Xt(u!==\"object\",'The value \"object\" should be written as \"Object\"'),s.push(u));if(o.length>0){let u=n.indexOf(\"object\");u!==-1&&(n.splice(n,u,1),o.push(\"Object\"));}if(n.length>0){switch(n.length){case 1:i+=`of type ${n[0]}`;break;case 2:i+=`one of type ${n[0]} or ${n[1]}`;break;default:{let u=n.pop();i+=`one of type ${n.join(\", \")}, or ${u}`;}}(o.length>0||s.length>0)&&(i+=\" or \");}if(o.length>0){switch(o.length){case 1:i+=`an instance of ${o[0]}`;break;case 2:i+=`an instance of ${o[0]} or ${o[1]}`;break;default:{let u=o.pop();i+=`an instance of ${o.join(\", \")}, or ${u}`;}}s.length>0&&(i+=\" or \");}switch(s.length){case 0:break;case 1:s[0].toLowerCase()!==s[0]&&(i+=\"an \"),i+=`${s[0]}`;break;case 2:i+=`one of ${s[0]} or ${s[1]}`;break;default:{let u=s.pop();i+=`one of ${s.join(\", \")}, or ${u}`;}}if(r==null)i+=`. Received ${r}`;else if(typeof r==\"function\"&&r.name)i+=`. Received function ${r.name}`;else if(typeof r==\"object\"){var a;if((a=r.constructor)!==null&&a!==void 0&&a.name)i+=`. Received an instance of ${r.constructor.name}`;else {let u=Vi(r,{depth:-1});i+=`. Received ${u}`;}}else {let u=Vi(r,{colors:!1});u.length>25&&(u=`${u.slice(0,25)}...`),i+=`. Received type ${typeof r} (${u})`;}return i},TypeError);me(\"ERR_INVALID_ARG_VALUE\",(t,e,r=\"is invalid\")=>{let i=Vi(e);return i.length>128&&(i=i.slice(0,128)+\"...\"),`The ${t.includes(\".\")?\"property\":\"argument\"} '${t}' ${r}. Received ${i}`},TypeError);me(\"ERR_INVALID_RETURN_VALUE\",(t,e,r)=>{var i;let n=r!=null&&(i=r.constructor)!==null&&i!==void 0&&i.name?`instance of ${r.constructor.name}`:`type ${typeof r}`;return `Expected ${t} to be returned from the \"${e}\" function but got ${n}.`},TypeError);me(\"ERR_MISSING_ARGS\",(...t)=>{Xt(t.length>0,\"At least one arg needs to be specified\");let e,r=t.length;switch(t=(Array.isArray(t)?t:[t]).map(i=>`\"${i}\"`).join(\" or \"),r){case 1:e+=`The ${t[0]} argument`;break;case 2:e+=`The ${t[0]} and ${t[1]} arguments`;break;default:{let i=t.pop();e+=`The ${t.join(\", \")}, and ${i} arguments`;}break}return `${e} must be specified`},TypeError);me(\"ERR_OUT_OF_RANGE\",(t,e,r)=>{Xt(e,'Missing \"range\" argument');let i;return Number.isInteger(r)&&Math.abs(r)>2**32?i=Xu(String(r)):typeof r==\"bigint\"?(i=String(r),(r>2n**32n||r<-(2n**32n))&&(i=Xu(i)),i+=\"n\"):i=Vi(r),`The value of \"${t}\" is out of range. It must be ${e}. Received ${i}`},RangeError);me(\"ERR_MULTIPLE_CALLBACK\",\"Callback called multiple times\",Error);me(\"ERR_METHOD_NOT_IMPLEMENTED\",\"The %s method is not implemented\",Error);me(\"ERR_STREAM_ALREADY_FINISHED\",\"Cannot call %s after a stream was finished\",Error);me(\"ERR_STREAM_CANNOT_PIPE\",\"Cannot pipe, not readable\",Error);me(\"ERR_STREAM_DESTROYED\",\"Cannot call %s after a stream was destroyed\",Error);me(\"ERR_STREAM_NULL_VALUES\",\"May not write null values to stream\",TypeError);me(\"ERR_STREAM_PREMATURE_CLOSE\",\"Premature close\",Error);me(\"ERR_STREAM_PUSH_AFTER_EOF\",\"stream.push() after EOF\",Error);me(\"ERR_STREAM_UNSHIFT_AFTER_END_EVENT\",\"stream.unshift() after end event\",Error);me(\"ERR_STREAM_WRITE_AFTER_END\",\"write after end\",Error);me(\"ERR_UNKNOWN_ENCODING\",\"Unknown encoding: %s\",TypeError);ef.exports={AbortError:vs,aggregateTwoErrors:Zu(py),hideStackFrames:Zu,codes:zi};});var fi=M((yI,ff)=>{v();m();_();var{ArrayIsArray:Ss,ArrayPrototypeIncludes:sf,ArrayPrototypeJoin:of,ArrayPrototypeMap:gy,NumberIsInteger:As,NumberIsNaN:yy,NumberMAX_SAFE_INTEGER:by,NumberMIN_SAFE_INTEGER:wy,NumberParseInt:_y,ObjectPrototypeHasOwnProperty:my,RegExpPrototypeExec:af,String:vy,StringPrototypeToUpperCase:Ey,StringPrototypeTrim:Sy}=ce(),{hideStackFrames:Ue,codes:{ERR_SOCKET_BAD_PORT:Ay,ERR_INVALID_ARG_TYPE:Ae,ERR_INVALID_ARG_VALUE:Mr,ERR_OUT_OF_RANGE:Zt,ERR_UNKNOWN_SIGNAL:tf}}=Se(),{normalizeEncoding:Iy}=Je(),{isAsyncFunction:Ty,isArrayBufferView:Ry}=Je().types,rf={};function Cy(t){return t===(t|0)}function By(t){return t===t>>>0}var Py=/^[0-7]+$/,Oy=\"must be a 32-bit unsigned integer or an octal string\";function ky(t,e,r){if(typeof t>\"u\"&&(t=r),typeof t==\"string\"){if(af(Py,t)===null)throw new Mr(e,t,Oy);t=_y(t,8);}return lf(t,e),t}var xy=Ue((t,e,r=wy,i=by)=>{if(typeof t!=\"number\")throw new Ae(e,\"number\",t);if(!As(t))throw new Zt(e,\"an integer\",t);if(ti)throw new Zt(e,`>= ${r} && <= ${i}`,t)}),My=Ue((t,e,r=-2147483648,i=2147483647)=>{if(typeof t!=\"number\")throw new Ae(e,\"number\",t);if(!As(t))throw new Zt(e,\"an integer\",t);if(ti)throw new Zt(e,`>= ${r} && <= ${i}`,t)}),lf=Ue((t,e,r=!1)=>{if(typeof t!=\"number\")throw new Ae(e,\"number\",t);if(!As(t))throw new Zt(e,\"an integer\",t);let i=r?1:0,n=4294967295;if(tn)throw new Zt(e,`>= ${i} && <= ${n}`,t)});function Is(t,e){if(typeof t!=\"string\")throw new Ae(e,\"string\",t)}function Ly(t,e,r=void 0,i){if(typeof t!=\"number\")throw new Ae(e,\"number\",t);if(r!=null&&ti||(r!=null||i!=null)&&yy(t))throw new Zt(e,`${r!=null?`>= ${r}`:\"\"}${r!=null&&i!=null?\" && \":\"\"}${i!=null?`<= ${i}`:\"\"}`,t)}var Uy=Ue((t,e,r)=>{if(!sf(r,t)){let n=\"must be one of: \"+of(gy(r,o=>typeof o==\"string\"?`'${o}'`:vy(o)),\", \");throw new Mr(e,t,n)}});function uf(t,e){if(typeof t!=\"boolean\")throw new Ae(e,\"boolean\",t)}function Es(t,e,r){return t==null||!my(t,e)?r:t[e]}var Ny=Ue((t,e,r=null)=>{let i=Es(r,\"allowArray\",!1),n=Es(r,\"allowFunction\",!1);if(!Es(r,\"nullable\",!1)&&t===null||!i&&Ss(t)||typeof t!=\"object\"&&(!n||typeof t!=\"function\"))throw new Ae(e,\"Object\",t)}),qy=Ue((t,e)=>{if(t!=null&&typeof t!=\"object\"&&typeof t!=\"function\")throw new Ae(e,\"a dictionary\",t)}),Ts=Ue((t,e,r=0)=>{if(!Ss(t))throw new Ae(e,\"Array\",t);if(t.length{if(!Ry(t))throw new Ae(e,[\"Buffer\",\"TypedArray\",\"DataView\"],t)});function $y(t,e){let r=Iy(e),i=t.length;if(r===\"hex\"&&i%2!==0)throw new Mr(\"encoding\",e,`is invalid for data of length ${i}`)}function Hy(t,e=\"Port\",r=!0){if(typeof t!=\"number\"&&typeof t!=\"string\"||typeof t==\"string\"&&Sy(t).length===0||+t!==+t>>>0||t>65535||t===0&&!r)throw new Ay(e,t,r);return t|0}var Vy=Ue((t,e)=>{if(t!==void 0&&(t===null||typeof t!=\"object\"||!(\"aborted\"in t)))throw new Ae(e,\"AbortSignal\",t)}),zy=Ue((t,e)=>{if(typeof t!=\"function\")throw new Ae(e,\"Function\",t)}),Ky=Ue((t,e)=>{if(typeof t!=\"function\"||Ty(t))throw new Ae(e,\"Function\",t)}),Gy=Ue((t,e)=>{if(t!==void 0)throw new Ae(e,\"undefined\",t)});function Qy(t,e,r){if(!sf(r,t))throw new Ae(e,`('${of(r,\"|\")}')`,t)}var Yy=/^(?:<[^>]*>)(?:\\s*;\\s*[^;\"\\s]+(?:=(\")?[^;\"\\s]*\\1)?)*$/;function nf(t,e){if(typeof t>\"u\"||!af(Yy,t))throw new Mr(e,t,'must be an array or string of format \"; rel=preload; as=style\"')}function Jy(t){if(typeof t==\"string\")return nf(t,\"hints\"),t;if(Ss(t)){let e=t.length,r=\"\";if(e===0)return r;for(let i=0;i; rel=preload; as=style\"')}ff.exports={isInt32:Cy,isUint32:By,parseFileMode:ky,validateArray:Ts,validateStringArray:Dy,validateBooleanArray:jy,validateBoolean:uf,validateBuffer:Wy,validateDictionary:qy,validateEncoding:$y,validateFunction:zy,validateInt32:My,validateInteger:xy,validateNumber:Ly,validateObject:Ny,validateOneOf:Uy,validatePlainFunction:Ky,validatePort:Hy,validateSignalName:Fy,validateString:Is,validateUint32:lf,validateUndefined:Gy,validateUnion:Qy,validateAbortSignal:Vy,validateLinkHeaderValue:Jy};});var Ut=M((TI,pf)=>{v();m();_();var ae=pf.exports={},Xe,Ze;function Rs(){throw new Error(\"setTimeout has not been defined\")}function Cs(){throw new Error(\"clearTimeout has not been defined\")}(function(){try{typeof setTimeout==\"function\"?Xe=setTimeout:Xe=Rs;}catch{Xe=Rs;}try{typeof clearTimeout==\"function\"?Ze=clearTimeout:Ze=Cs;}catch{Ze=Cs;}})();function cf(t){if(Xe===setTimeout)return setTimeout(t,0);if((Xe===Rs||!Xe)&&setTimeout)return Xe=setTimeout,setTimeout(t,0);try{return Xe(t,0)}catch{try{return Xe.call(null,t,0)}catch{return Xe.call(this,t,0)}}}function Xy(t){if(Ze===clearTimeout)return clearTimeout(t);if((Ze===Cs||!Ze)&&clearTimeout)return Ze=clearTimeout,clearTimeout(t);try{return Ze(t)}catch{try{return Ze.call(null,t)}catch{return Ze.call(this,t)}}}var wt=[],Lr=!1,er,Ki=-1;function Zy(){!Lr||!er||(Lr=!1,er.length?wt=er.concat(wt):Ki=-1,wt.length&&hf());}function hf(){if(!Lr){var t=cf(Zy);Lr=!0;for(var e=wt.length;e;){for(er=wt,wt=[];++Ki1)for(var r=1;r{v();m();_();var{Symbol:Gi,SymbolAsyncIterator:gf,SymbolIterator:yf,SymbolFor:bf}=ce(),wf=Gi(\"kDestroyed\"),_f=Gi(\"kIsErrored\"),Bs=Gi(\"kIsReadable\"),mf=Gi(\"kIsDisturbed\"),eb=bf(\"nodejs.webstream.isClosedPromise\"),tb=bf(\"nodejs.webstream.controllerErrorFunction\");function Qi(t,e=!1){var r;return !!(t&&typeof t.pipe==\"function\"&&typeof t.on==\"function\"&&(!e||typeof t.pause==\"function\"&&typeof t.resume==\"function\")&&(!t._writableState||((r=t._readableState)===null||r===void 0?void 0:r.readable)!==!1)&&(!t._writableState||t._readableState))}function Yi(t){var e;return !!(t&&typeof t.write==\"function\"&&typeof t.on==\"function\"&&(!t._readableState||((e=t._writableState)===null||e===void 0?void 0:e.writable)!==!1))}function rb(t){return !!(t&&typeof t.pipe==\"function\"&&t._readableState&&typeof t.on==\"function\"&&typeof t.write==\"function\")}function et(t){return t&&(t._readableState||t._writableState||typeof t.write==\"function\"&&typeof t.on==\"function\"||typeof t.pipe==\"function\"&&typeof t.on==\"function\")}function vf(t){return !!(t&&!et(t)&&typeof t.pipeThrough==\"function\"&&typeof t.getReader==\"function\"&&typeof t.cancel==\"function\")}function Ef(t){return !!(t&&!et(t)&&typeof t.getWriter==\"function\"&&typeof t.abort==\"function\")}function Sf(t){return !!(t&&!et(t)&&typeof t.readable==\"object\"&&typeof t.writable==\"object\")}function ib(t){return vf(t)||Ef(t)||Sf(t)}function nb(t,e){return t==null?!1:e===!0?typeof t[gf]==\"function\":e===!1?typeof t[yf]==\"function\":typeof t[gf]==\"function\"||typeof t[yf]==\"function\"}function Ji(t){if(!et(t))return null;let e=t._writableState,r=t._readableState,i=e||r;return !!(t.destroyed||t[wf]||i!=null&&i.destroyed)}function Af(t){if(!Yi(t))return null;if(t.writableEnded===!0)return !0;let e=t._writableState;return e!=null&&e.errored?!1:typeof e?.ended!=\"boolean\"?null:e.ended}function sb(t,e){if(!Yi(t))return null;if(t.writableFinished===!0)return !0;let r=t._writableState;return r!=null&&r.errored?!1:typeof r?.finished!=\"boolean\"?null:!!(r.finished||e===!1&&r.ended===!0&&r.length===0)}function ob(t){if(!Qi(t))return null;if(t.readableEnded===!0)return !0;let e=t._readableState;return !e||e.errored?!1:typeof e?.ended!=\"boolean\"?null:e.ended}function If(t,e){if(!Qi(t))return null;let r=t._readableState;return r!=null&&r.errored?!1:typeof r?.endEmitted!=\"boolean\"?null:!!(r.endEmitted||e===!1&&r.ended===!0&&r.length===0)}function Tf(t){return t&&t[Bs]!=null?t[Bs]:typeof t?.readable!=\"boolean\"?null:Ji(t)?!1:Qi(t)&&t.readable&&!If(t)}function Rf(t){return typeof t?.writable!=\"boolean\"?null:Ji(t)?!1:Yi(t)&&t.writable&&!Af(t)}function ab(t,e){return et(t)?Ji(t)?!0:!(e?.readable!==!1&&Tf(t)||e?.writable!==!1&&Rf(t)):null}function lb(t){var e,r;return et(t)?t.writableErrored?t.writableErrored:(e=(r=t._writableState)===null||r===void 0?void 0:r.errored)!==null&&e!==void 0?e:null:null}function ub(t){var e,r;return et(t)?t.readableErrored?t.readableErrored:(e=(r=t._readableState)===null||r===void 0?void 0:r.errored)!==null&&e!==void 0?e:null:null}function fb(t){if(!et(t))return null;if(typeof t.closed==\"boolean\")return t.closed;let e=t._writableState,r=t._readableState;return typeof e?.closed==\"boolean\"||typeof r?.closed==\"boolean\"?e?.closed||r?.closed:typeof t._closed==\"boolean\"&&Cf(t)?t._closed:null}function Cf(t){return typeof t._closed==\"boolean\"&&typeof t._defaultKeepAlive==\"boolean\"&&typeof t._removedConnection==\"boolean\"&&typeof t._removedContLen==\"boolean\"}function Bf(t){return typeof t._sent100==\"boolean\"&&Cf(t)}function cb(t){var e;return typeof t._consuming==\"boolean\"&&typeof t._dumped==\"boolean\"&&((e=t.req)===null||e===void 0?void 0:e.upgradeOrConnect)===void 0}function hb(t){if(!et(t))return null;let e=t._writableState,r=t._readableState,i=e||r;return !i&&Bf(t)||!!(i&&i.autoDestroy&&i.emitClose&&i.closed===!1)}function db(t){var e;return !!(t&&((e=t[mf])!==null&&e!==void 0?e:t.readableDidRead||t.readableAborted))}function pb(t){var e,r,i,n,o,s,a,u,c,h;return !!(t&&((e=(r=(i=(n=(o=(s=t[_f])!==null&&s!==void 0?s:t.readableErrored)!==null&&o!==void 0?o:t.writableErrored)!==null&&n!==void 0?n:(a=t._readableState)===null||a===void 0?void 0:a.errorEmitted)!==null&&i!==void 0?i:(u=t._writableState)===null||u===void 0?void 0:u.errorEmitted)!==null&&r!==void 0?r:(c=t._readableState)===null||c===void 0?void 0:c.errored)!==null&&e!==void 0?e:!((h=t._writableState)===null||h===void 0)&&h.errored))}Pf.exports={kDestroyed:wf,isDisturbed:db,kIsDisturbed:mf,isErrored:pb,kIsErrored:_f,isReadable:Tf,kIsReadable:Bs,kIsClosedPromise:eb,kControllerErrorFunction:tb,isClosed:fb,isDestroyed:Ji,isDuplexNodeStream:rb,isFinished:ab,isIterable:nb,isReadableNodeStream:Qi,isReadableStream:vf,isReadableEnded:ob,isReadableFinished:If,isReadableErrored:ub,isNodeStream:et,isWebStream:ib,isWritable:Rf,isWritableNodeStream:Yi,isWritableStream:Ef,isWritableEnded:Af,isWritableFinished:sb,isWritableErrored:lb,isServerRequest:cb,isServerResponse:Bf,willEmitClose:hb,isTransformStream:Sf};});var mt=M((zI,Ms)=>{v();m();_();var Nt=Ut(),{AbortError:Df,codes:gb}=Se(),{ERR_INVALID_ARG_TYPE:yb,ERR_STREAM_PREMATURE_CLOSE:Of}=gb,{kEmptyObject:Os,once:ks}=Je(),{validateAbortSignal:bb,validateFunction:wb,validateObject:_b,validateBoolean:mb}=fi(),{Promise:vb,PromisePrototypeThen:Eb}=ce(),{isClosed:Sb,isReadable:kf,isReadableNodeStream:Ps,isReadableStream:Ab,isReadableFinished:xf,isReadableErrored:Mf,isWritable:Lf,isWritableNodeStream:Uf,isWritableStream:Ib,isWritableFinished:Nf,isWritableErrored:qf,isNodeStream:Tb,willEmitClose:Rb,kIsClosedPromise:Cb}=tt();function Bb(t){return t.setHeader&&typeof t.abort==\"function\"}var xs=()=>{};function jf(t,e,r){var i,n;if(arguments.length===2?(r=e,e=Os):e==null?e=Os:_b(e,\"options\"),wb(r,\"callback\"),bb(e.signal,\"options.signal\"),r=ks(r),Ab(t)||Ib(t))return Pb(t,e,r);if(!Tb(t))throw new yb(\"stream\",[\"ReadableStream\",\"WritableStream\",\"Stream\"],t);let o=(i=e.readable)!==null&&i!==void 0?i:Ps(t),s=(n=e.writable)!==null&&n!==void 0?n:Uf(t),a=t._writableState,u=t._readableState,c=()=>{t.writable||g();},h=Rb(t)&&Ps(t)===o&&Uf(t)===s,d=Nf(t,!1),g=()=>{d=!0,t.destroyed&&(h=!1),!(h&&(!t.readable||o))&&(!o||y)&&r.call(t);},y=xf(t,!1),w=()=>{y=!0,t.destroyed&&(h=!1),!(h&&(!t.writable||s))&&(!s||d)&&r.call(t);},E=N=>{r.call(t,N);},S=Sb(t),I=()=>{S=!0;let N=qf(t)||Mf(t);if(N&&typeof N!=\"boolean\")return r.call(t,N);if(o&&!y&&Ps(t,!0)&&!xf(t,!1))return r.call(t,new Of);if(s&&!d&&!Nf(t,!1))return r.call(t,new Of);r.call(t);},C=()=>{S=!0;let N=qf(t)||Mf(t);if(N&&typeof N!=\"boolean\")return r.call(t,N);r.call(t);},R=()=>{t.req.on(\"finish\",g);};Bb(t)?(t.on(\"complete\",g),h||t.on(\"abort\",I),t.req?R():t.on(\"request\",R)):s&&!a&&(t.on(\"end\",c),t.on(\"close\",c)),!h&&typeof t.aborted==\"boolean\"&&t.on(\"aborted\",I),t.on(\"end\",w),t.on(\"finish\",g),e.error!==!1&&t.on(\"error\",E),t.on(\"close\",I),S?Nt.nextTick(I):a!=null&&a.errorEmitted||u!=null&&u.errorEmitted?h||Nt.nextTick(C):(!o&&(!h||kf(t))&&(d||Lf(t)===!1)||!s&&(!h||Lf(t))&&(y||kf(t)===!1)||u&&t.req&&t.aborted)&&Nt.nextTick(C);let U=()=>{r=xs,t.removeListener(\"aborted\",I),t.removeListener(\"complete\",g),t.removeListener(\"abort\",I),t.removeListener(\"request\",R),t.req&&t.req.removeListener(\"finish\",g),t.removeListener(\"end\",c),t.removeListener(\"close\",c),t.removeListener(\"finish\",g),t.removeListener(\"end\",w),t.removeListener(\"error\",E),t.removeListener(\"close\",I);};if(e.signal&&!S){let N=()=>{let W=r;U(),W.call(t,new Df(void 0,{cause:e.signal.reason}));};if(e.signal.aborted)Nt.nextTick(N);else {let W=r;r=ks((...K)=>{e.signal.removeEventListener(\"abort\",N),W.apply(t,K);}),e.signal.addEventListener(\"abort\",N);}}return U}function Pb(t,e,r){let i=!1,n=xs;if(e.signal)if(n=()=>{i=!0,r.call(t,new Df(void 0,{cause:e.signal.reason}));},e.signal.aborted)Nt.nextTick(n);else {let s=r;r=ks((...a)=>{e.signal.removeEventListener(\"abort\",n),s.apply(t,a);}),e.signal.addEventListener(\"abort\",n);}let o=(...s)=>{i||Nt.nextTick(()=>r.apply(t,s));};return Eb(t[Cb].promise,o,o),xs}function Ob(t,e){var r;let i=!1;return e===null&&(e=Os),(r=e)!==null&&r!==void 0&&r.cleanup&&(mb(e.cleanup,\"cleanup\"),i=e.cleanup),new vb((n,o)=>{let s=jf(t,e,a=>{i&&s(),a?o(a):n();});})}Ms.exports=jf;Ms.exports.finished=Ob;});var tr=M((rT,Gf)=>{v();m();_();var rt=Ut(),{aggregateTwoErrors:kb,codes:{ERR_MULTIPLE_CALLBACK:xb},AbortError:Mb}=Se(),{Symbol:$f}=ce(),{kDestroyed:Lb,isDestroyed:Ub,isFinished:Nb,isServerRequest:qb}=tt(),Hf=$f(\"kDestroy\"),Ls=$f(\"kConstruct\");function Vf(t,e,r){t&&(t.stack,e&&!e.errored&&(e.errored=t),r&&!r.errored&&(r.errored=t));}function Db(t,e){let r=this._readableState,i=this._writableState,n=i||r;return i!=null&&i.destroyed||r!=null&&r.destroyed?(typeof e==\"function\"&&e(),this):(Vf(t,i,r),i&&(i.destroyed=!0),r&&(r.destroyed=!0),n.constructed?Ff(this,t,e):this.once(Hf,function(o){Ff(this,kb(o,t),e);}),this)}function Ff(t,e,r){let i=!1;function n(o){if(i)return;i=!0;let s=t._readableState,a=t._writableState;Vf(o,a,s),a&&(a.closed=!0),s&&(s.closed=!0),typeof r==\"function\"&&r(o),o?rt.nextTick(jb,t,o):rt.nextTick(zf,t);}try{t._destroy(e||null,n);}catch(o){n(o);}}function jb(t,e){Us(t,e),zf(t);}function zf(t){let e=t._readableState,r=t._writableState;r&&(r.closeEmitted=!0),e&&(e.closeEmitted=!0),(r!=null&&r.emitClose||e!=null&&e.emitClose)&&t.emit(\"close\");}function Us(t,e){let r=t._readableState,i=t._writableState;i!=null&&i.errorEmitted||r!=null&&r.errorEmitted||(i&&(i.errorEmitted=!0),r&&(r.errorEmitted=!0),t.emit(\"error\",e));}function Fb(){let t=this._readableState,e=this._writableState;t&&(t.constructed=!0,t.closed=!1,t.closeEmitted=!1,t.destroyed=!1,t.errored=null,t.errorEmitted=!1,t.reading=!1,t.ended=t.readable===!1,t.endEmitted=t.readable===!1),e&&(e.constructed=!0,e.destroyed=!1,e.closed=!1,e.closeEmitted=!1,e.errored=null,e.errorEmitted=!1,e.finalCalled=!1,e.prefinished=!1,e.ended=e.writable===!1,e.ending=e.writable===!1,e.finished=e.writable===!1);}function Ns(t,e,r){let i=t._readableState,n=t._writableState;if(n!=null&&n.destroyed||i!=null&&i.destroyed)return this;i!=null&&i.autoDestroy||n!=null&&n.autoDestroy?t.destroy(e):e&&(e.stack,n&&!n.errored&&(n.errored=e),i&&!i.errored&&(i.errored=e),r?rt.nextTick(Us,t,e):Us(t,e));}function Wb(t,e){if(typeof t._construct!=\"function\")return;let r=t._readableState,i=t._writableState;r&&(r.constructed=!1),i&&(i.constructed=!1),t.once(Ls,e),!(t.listenerCount(Ls)>1)&&rt.nextTick($b,t);}function $b(t){let e=!1;function r(i){if(e){Ns(t,i??new xb);return}e=!0;let n=t._readableState,o=t._writableState,s=o||n;n&&(n.constructed=!0),o&&(o.constructed=!0),s.destroyed?t.emit(Hf,i):i?Ns(t,i,!0):rt.nextTick(Hb,t);}try{t._construct(i=>{rt.nextTick(r,i);});}catch(i){rt.nextTick(r,i);}}function Hb(t){t.emit(Ls);}function Wf(t){return t?.setHeader&&typeof t.abort==\"function\"}function Kf(t){t.emit(\"close\");}function Vb(t,e){t.emit(\"error\",e),rt.nextTick(Kf,t);}function zb(t,e){!t||Ub(t)||(!e&&!Nb(t)&&(e=new Mb),qb(t)?(t.socket=null,t.destroy(e)):Wf(t)?t.abort():Wf(t.req)?t.req.abort():typeof t.destroy==\"function\"?t.destroy(e):typeof t.close==\"function\"?t.close():e?rt.nextTick(Vb,t,e):rt.nextTick(Kf,t),t.destroyed||(t[Lb]=!0));}Gf.exports={construct:Wb,destroyer:zb,destroy:Db,undestroy:Fb,errorOrDestroy:Ns};});function Y(){Y.init.call(this);}function Xi(t){if(typeof t!=\"function\")throw new TypeError('The \"listener\" argument must be of type Function. Received type '+typeof t)}function nc(t){return t._maxListeners===void 0?Y.defaultMaxListeners:t._maxListeners}function Xf(t,e,r,i){var n,o,s,a;if(Xi(r),(o=t._events)===void 0?(o=t._events=Object.create(null),t._eventsCount=0):(o.newListener!==void 0&&(t.emit(\"newListener\",e,r.listener?r.listener:r),o=t._events),s=o[e]),s===void 0)s=o[e]=r,++t._eventsCount;else if(typeof s==\"function\"?s=o[e]=i?[r,s]:[s,r]:i?s.unshift(r):s.push(r),(n=nc(t))>0&&s.length>n&&!s.warned){s.warned=!0;var u=new Error(\"Possible EventEmitter memory leak detected. \"+s.length+\" \"+String(e)+\" listeners added. Use emitter.setMaxListeners() to increase limit\");u.name=\"MaxListenersExceededWarning\",u.emitter=t,u.type=e,u.count=s.length,a=u,console&&console.warn&&console.warn(a);}return t}function Kb(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function Zf(t,e,r){var i={fired:!1,wrapFn:void 0,target:t,type:e,listener:r},n=Kb.bind(i);return n.listener=r,i.wrapFn=n,n}function ec(t,e,r){var i=t._events;if(i===void 0)return [];var n=i[e];return n===void 0?[]:typeof n==\"function\"?r?[n.listener||n]:[n]:r?function(o){for(var s=new Array(o.length),a=0;a{v();m();_();Ur=typeof Reflect==\"object\"?Reflect:null,Qf=Ur&&typeof Ur.apply==\"function\"?Ur.apply:function(t,e,r){return Function.prototype.apply.call(t,e,r)};ic=Ur&&typeof Ur.ownKeys==\"function\"?Ur.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)};Yf=Number.isNaN||function(t){return t!=t};rc=Y,Y.EventEmitter=Y,Y.prototype._events=void 0,Y.prototype._eventsCount=0,Y.prototype._maxListeners=void 0;Jf=10;Object.defineProperty(Y,\"defaultMaxListeners\",{enumerable:!0,get:function(){return Jf},set:function(t){if(typeof t!=\"number\"||t<0||Yf(t))throw new RangeError('The value of \"defaultMaxListeners\" is out of range. It must be a non-negative number. Received '+t+\".\");Jf=t;}}),Y.init=function(){this._events!==void 0&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0;},Y.prototype.setMaxListeners=function(t){if(typeof t!=\"number\"||t<0||Yf(t))throw new RangeError('The value of \"n\" is out of range. It must be a non-negative number. Received '+t+\".\");return this._maxListeners=t,this},Y.prototype.getMaxListeners=function(){return nc(this)},Y.prototype.emit=function(t){for(var e=[],r=1;r0&&(o=e[0]),o instanceof Error)throw o;var s=new Error(\"Unhandled error.\"+(o?\" (\"+o.message+\")\":\"\"));throw s.context=o,s}var a=n[t];if(a===void 0)return !1;if(typeof a==\"function\")Qf(a,this,e);else {var u=a.length,c=sc(a,u);for(r=0;r=0;o--)if(r[o]===e||r[o].listener===e){s=r[o].listener,n=o;break}if(n<0)return this;n===0?r.shift():function(a,u){for(;u+1=0;i--)this.removeListener(t,e[i]);return this},Y.prototype.listeners=function(t){return ec(this,t,!0)},Y.prototype.rawListeners=function(t){return ec(this,t,!1)},Y.listenerCount=function(t,e){return typeof t.listenerCount==\"function\"?t.listenerCount(e):tc.call(t,e)},Y.prototype.listenerCount=tc,Y.prototype.eventNames=function(){return this._eventsCount>0?ic(this._events):[]};Be=rc;Be.EventEmitter;Be.defaultMaxListeners;Be.init;Be.listenerCount;Be.EventEmitter;Be.defaultMaxListeners;Be.init;Be.listenerCount;});var rr={};Qt(rr,{EventEmitter:()=>Gb,default:()=>Be,defaultMaxListeners:()=>Qb,init:()=>Yb,listenerCount:()=>Jb,on:()=>Xb,once:()=>Zb});var Gb,Qb,Yb,Jb,Xb,Zb,ir=we(()=>{v();m();_();qs();qs();Be.once=function(t,e){return new Promise((r,i)=>{function n(...s){o!==void 0&&t.removeListener(\"error\",o),r(s);}let o;e!==\"error\"&&(o=s=>{t.removeListener(name,n),i(s);},t.once(\"error\",o)),t.once(e,n);})};Be.on=function(t,e){let r=[],i=[],n=null,o=!1,s={async next(){let c=r.shift();if(c)return createIterResult(c,!1);if(n){let h=Promise.reject(n);return n=null,h}return o?createIterResult(void 0,!0):new Promise((h,d)=>i.push({resolve:h,reject:d}))},async return(){t.removeListener(e,a),t.removeListener(\"error\",u),o=!0;for(let c of i)c.resolve(createIterResult(void 0,!0));return createIterResult(void 0,!0)},throw(c){n=c,t.removeListener(e,a),t.removeListener(\"error\",u);},[Symbol.asyncIterator](){return this}};return t.on(e,a),t.on(\"error\",u),s;function a(...c){let h=i.shift();h?h.resolve(createIterResult(c,!1)):r.push(c);}function u(c){o=!0;let h=i.shift();h?h.reject(c):n=c,s.return();}};({EventEmitter:Gb,defaultMaxListeners:Qb,init:Yb,listenerCount:Jb,on:Xb,once:Zb}=Be);});var tn=M((xT,ac)=>{v();m();_();var{ArrayIsArray:ew,ObjectSetPrototypeOf:oc}=ce(),{EventEmitter:Zi}=(ir(),X(rr));function en(t){Zi.call(this,t);}oc(en.prototype,Zi.prototype);oc(en,Zi);en.prototype.pipe=function(t,e){let r=this;function i(h){t.writable&&t.write(h)===!1&&r.pause&&r.pause();}r.on(\"data\",i);function n(){r.readable&&r.resume&&r.resume();}t.on(\"drain\",n),!t._isStdio&&(!e||e.end!==!1)&&(r.on(\"end\",s),r.on(\"close\",a));let o=!1;function s(){o||(o=!0,t.end());}function a(){o||(o=!0,typeof t.destroy==\"function\"&&t.destroy());}function u(h){c(),Zi.listenerCount(this,\"error\")===0&&this.emit(\"error\",h);}Ds(r,\"error\",u),Ds(t,\"error\",u);function c(){r.removeListener(\"data\",i),t.removeListener(\"drain\",n),r.removeListener(\"end\",s),r.removeListener(\"close\",a),r.removeListener(\"error\",u),t.removeListener(\"error\",u),r.removeListener(\"end\",c),r.removeListener(\"close\",c),t.removeListener(\"close\",c);}return r.on(\"end\",c),r.on(\"close\",c),t.on(\"close\",c),t.emit(\"pipe\",r),t};function Ds(t,e,r){if(typeof t.prependListener==\"function\")return t.prependListener(e,r);!t._events||!t._events[e]?t.on(e,r):ew(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]];}ac.exports={Stream:en,prependListener:Ds};});var ci=M(($T,rn)=>{v();m();_();var{AbortError:lc,codes:tw}=Se(),{isNodeStream:uc,isWebStream:rw,kControllerErrorFunction:iw}=tt(),nw=mt(),{ERR_INVALID_ARG_TYPE:fc}=tw,sw=(t,e)=>{if(typeof t!=\"object\"||!(\"aborted\"in t))throw new fc(e,\"AbortSignal\",t)};rn.exports.addAbortSignal=function(e,r){if(sw(e,\"signal\"),!uc(r)&&!rw(r))throw new fc(\"stream\",[\"ReadableStream\",\"WritableStream\",\"Stream\"],r);return rn.exports.addAbortSignalNoValidate(e,r)};rn.exports.addAbortSignalNoValidate=function(t,e){if(typeof t!=\"object\"||!(\"aborted\"in t))return e;let r=uc(e)?()=>{e.destroy(new lc(void 0,{cause:t.reason}));}:()=>{e[iw](new lc(void 0,{cause:t.reason}));};return t.aborted?r():(t.addEventListener(\"abort\",r),nw(e,()=>t.removeEventListener(\"abort\",r))),e};});var dc=M((e2,hc)=>{v();m();_();var{StringPrototypeSlice:cc,SymbolIterator:ow,TypedArrayPrototypeSet:nn,Uint8Array:aw}=ce(),{Buffer:js}=(ye(),X(_e)),{inspect:lw}=Je();hc.exports=class{constructor(){this.head=null,this.tail=null,this.length=0;}push(e){let r={data:e,next:null};this.length>0?this.tail.next=r:this.head=r,this.tail=r,++this.length;}unshift(e){let r={data:e,next:this.head};this.length===0&&(this.tail=r),this.head=r,++this.length;}shift(){if(this.length===0)return;let e=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,e}clear(){this.head=this.tail=null,this.length=0;}join(e){if(this.length===0)return \"\";let r=this.head,i=\"\"+r.data;for(;(r=r.next)!==null;)i+=e+r.data;return i}concat(e){if(this.length===0)return js.alloc(0);let r=js.allocUnsafe(e>>>0),i=this.head,n=0;for(;i;)nn(r,i.data,n),n+=i.data.length,i=i.next;return r}consume(e,r){let i=this.head.data;if(eo.length)r+=o,e-=o.length;else {e===o.length?(r+=o,++n,i.next?this.head=i.next:this.head=this.tail=null):(r+=cc(o,0,e),this.head=i,i.data=cc(o,e));break}++n;}while((i=i.next)!==null);return this.length-=n,r}_getBuffer(e){let r=js.allocUnsafe(e),i=e,n=this.head,o=0;do{let s=n.data;if(e>s.length)nn(r,s,i-e),e-=s.length;else {e===s.length?(nn(r,s,i-e),++o,n.next?this.head=n.next:this.head=this.tail=null):(nn(r,new aw(s.buffer,s.byteOffset,e),i-e),this.head=n,n.data=s.slice(e));break}++o;}while((n=n.next)!==null);return this.length-=o,r}[Symbol.for(\"nodejs.util.inspect.custom\")](e,r){return lw(this,{...r,depth:0,customInspect:!1})}};});var sn=M((f2,gc)=>{v();m();_();var{MathFloor:uw,NumberIsInteger:fw}=ce(),{ERR_INVALID_ARG_VALUE:cw}=Se().codes;function hw(t,e,r){return t.highWaterMark!=null?t.highWaterMark:e?t[r]:null}function pc(t){return t?16:16*1024}function dw(t,e,r,i){let n=hw(e,i,r);if(n!=null){if(!fw(n)||n<0){let o=i?`options.${r}`:\"options.highWaterMark\";throw new cw(o,n)}return uw(n)}return pc(t.objectMode)}gc.exports={getHighWaterMark:dw,getDefaultHighWaterMark:pc};});function wc(t){var e=t.length;if(e%4>0)throw new Error(\"Invalid string. Length must be a multiple of 4\");var r=t.indexOf(\"=\");return r===-1&&(r=e),[r,r===e?0:4-r%4]}function pw(t,e,r){for(var i,n,o=[],s=e;s>18&63]+$e[n>>12&63]+$e[n>>6&63]+$e[63&n]);return o.join(\"\")}function vt(t){if(t>2147483647)throw new RangeError('The value \"'+t+'\" is invalid for option \"size\"');var e=new Uint8Array(t);return Object.setPrototypeOf(e,k.prototype),e}function k(t,e,r){if(typeof t==\"number\"){if(typeof e==\"string\")throw new TypeError('The \"string\" argument must be of type string. Received type number');return Hs(t)}return Cc(t,e,r)}function Cc(t,e,r){if(typeof t==\"string\")return function(o,s){if(typeof s==\"string\"&&s!==\"\"||(s=\"utf8\"),!k.isEncoding(s))throw new TypeError(\"Unknown encoding: \"+s);var a=0|Pc(o,s),u=vt(a),c=u.write(o,s);return c!==a&&(u=u.slice(0,c)),u}(t,e);if(ArrayBuffer.isView(t))return Fs(t);if(t==null)throw new TypeError(\"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type \"+typeof t);if(Et(t,ArrayBuffer)||t&&Et(t.buffer,ArrayBuffer)||typeof SharedArrayBuffer<\"u\"&&(Et(t,SharedArrayBuffer)||t&&Et(t.buffer,SharedArrayBuffer)))return mc(t,e,r);if(typeof t==\"number\")throw new TypeError('The \"value\" argument must not be of type number. Received type number');var i=t.valueOf&&t.valueOf();if(i!=null&&i!==t)return k.from(i,e,r);var n=function(o){if(k.isBuffer(o)){var s=0|Ks(o.length),a=vt(s);return a.length===0||o.copy(a,0,0,s),a}if(o.length!==void 0)return typeof o.length!=\"number\"||Gs(o.length)?vt(0):Fs(o);if(o.type===\"Buffer\"&&Array.isArray(o.data))return Fs(o.data)}(t);if(n)return n;if(typeof Symbol<\"u\"&&Symbol.toPrimitive!=null&&typeof t[Symbol.toPrimitive]==\"function\")return k.from(t[Symbol.toPrimitive](\"string\"),e,r);throw new TypeError(\"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type \"+typeof t)}function Bc(t){if(typeof t!=\"number\")throw new TypeError('\"size\" argument must be of type number');if(t<0)throw new RangeError('The value \"'+t+'\" is invalid for option \"size\"')}function Hs(t){return Bc(t),vt(t<0?0:0|Ks(t))}function Fs(t){for(var e=t.length<0?0:0|Ks(t.length),r=vt(e),i=0;i=2147483647)throw new RangeError(\"Attempt to allocate Buffer larger than maximum size: 0x\"+2147483647 .toString(16)+\" bytes\");return 0|t}function Pc(t,e){if(k.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||Et(t,ArrayBuffer))return t.byteLength;if(typeof t!=\"string\")throw new TypeError('The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);var r=t.length,i=arguments.length>2&&arguments[2]===!0;if(!i&&r===0)return 0;for(var n=!1;;)switch(e){case\"ascii\":case\"latin1\":case\"binary\":return r;case\"utf8\":case\"utf-8\":return Vs(t).length;case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return 2*r;case\"hex\":return r>>>1;case\"base64\":return Mc(t).length;default:if(n)return i?-1:Vs(t).length;e=(\"\"+e).toLowerCase(),n=!0;}}function yw(t,e,r){var i=!1;if((e===void 0||e<0)&&(e=0),e>this.length||((r===void 0||r>this.length)&&(r=this.length),r<=0)||(r>>>=0)<=(e>>>=0))return \"\";for(t||(t=\"utf8\");;)switch(t){case\"hex\":return Iw(this,e,r);case\"utf8\":case\"utf-8\":return kc(this,e,r);case\"ascii\":return Sw(this,e,r);case\"latin1\":case\"binary\":return Aw(this,e,r);case\"base64\":return Ew(this,e,r);case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return Tw(this,e,r);default:if(i)throw new TypeError(\"Unknown encoding: \"+t);t=(t+\"\").toLowerCase(),i=!0;}}function sr(t,e,r){var i=t[e];t[e]=t[r],t[r]=i;}function vc(t,e,r,i,n){if(t.length===0)return -1;if(typeof r==\"string\"?(i=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),Gs(r=+r)&&(r=n?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(n)return -1;r=t.length-1;}else if(r<0){if(!n)return -1;r=0;}if(typeof e==\"string\"&&(e=k.from(e,i)),k.isBuffer(e))return e.length===0?-1:Ec(t,e,r,i,n);if(typeof e==\"number\")return e&=255,typeof Uint8Array.prototype.indexOf==\"function\"?n?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):Ec(t,[e],r,i,n);throw new TypeError(\"val must be string, number or Buffer\")}function Ec(t,e,r,i,n){var o,s=1,a=t.length,u=e.length;if(i!==void 0&&((i=String(i).toLowerCase())===\"ucs2\"||i===\"ucs-2\"||i===\"utf16le\"||i===\"utf-16le\")){if(t.length<2||e.length<2)return -1;s=2,a/=2,u/=2,r/=2;}function c(y,w){return s===1?y[w]:y.readUInt16BE(w*s)}if(n){var h=-1;for(o=r;oa&&(r=a-u),o=r;o>=0;o--){for(var d=!0,g=0;gn&&(i=n):i=n;var o=e.length;i>o/2&&(i=o/2);for(var s=0;s>8,u=s%256,c.push(u),c.push(a);return c}(e,t.length-r),t,r,i)}function Ew(t,e,r){return e===0&&r===t.length?$s.fromByteArray(t):$s.fromByteArray(t.slice(e,r))}function kc(t,e,r){r=Math.min(t.length,r);for(var i=[],n=e;n239?4:c>223?3:c>191?2:1;if(n+d<=r)switch(d){case 1:c<128&&(h=c);break;case 2:(192&(o=t[n+1]))==128&&(u=(31&c)<<6|63&o)>127&&(h=u);break;case 3:o=t[n+1],s=t[n+2],(192&o)==128&&(192&s)==128&&(u=(15&c)<<12|(63&o)<<6|63&s)>2047&&(u<55296||u>57343)&&(h=u);break;case 4:o=t[n+1],s=t[n+2],a=t[n+3],(192&o)==128&&(192&s)==128&&(192&a)==128&&(u=(15&c)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&u<1114112&&(h=u);}h===null?(h=65533,d=1):h>65535&&(h-=65536,i.push(h>>>10&1023|55296),h=56320|1023&h),i.push(h),n+=d;}return function(g){var y=g.length;if(y<=4096)return String.fromCharCode.apply(String,g);for(var w=\"\",E=0;Ei)&&(r=i);for(var n=\"\",o=e;or)throw new RangeError(\"Trying to access beyond buffer length\")}function Pe(t,e,r,i,n,o){if(!k.isBuffer(t))throw new TypeError('\"buffer\" argument must be a Buffer instance');if(e>n||et.length)throw new RangeError(\"Index out of range\")}function xc(t,e,r,i,n,o){if(r+i>t.length)throw new RangeError(\"Index out of range\");if(r<0)throw new RangeError(\"Index out of range\")}function Sc(t,e,r,i,n){return e=+e,r>>>=0,n||xc(t,0,r,4),Nr.write(t,e,r,i,23,4),r+4}function Ac(t,e,r,i,n){return e=+e,r>>>=0,n||xc(t,0,r,8),Nr.write(t,e,r,i,52,8),r+8}function Vs(t,e){var r;e=e||1/0;for(var i=t.length,n=null,o=[],s=0;s55295&&r<57344){if(!n){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(s+1===i){(e-=3)>-1&&o.push(239,191,189);continue}n=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),n=r;continue}r=65536+(n-55296<<10|r-56320);}else n&&(e-=3)>-1&&o.push(239,191,189);if(n=null,r<128){if((e-=1)<0)break;o.push(r);}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128);}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128);}else {if(!(r<1114112))throw new Error(\"Invalid code point\");if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128);}}return o}function Mc(t){return $s.toByteArray(function(e){if((e=(e=e.split(\"=\")[0]).trim().replace(Rw,\"\")).length<2)return \"\";for(;e.length%4!=0;)e+=\"=\";return e}(t))}function un(t,e,r,i){for(var n=0;n=e.length||n>=t.length);++n)e[n+r]=t[n];return n}function Et(t,e){return t instanceof e||t!=null&&t.constructor!=null&&t.constructor.name!=null&&t.constructor.name===e.name}function Gs(t){return t!=t}function Ic(t,e){for(var r in t)e[r]=t[r];}function or(t,e,r){return it(t,e,r)}function hi(t){var e;switch(this.encoding=function(r){var i=function(n){if(!n)return \"utf8\";for(var o;;)switch(n){case\"utf8\":case\"utf-8\":return \"utf8\";case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return \"utf16le\";case\"latin1\":case\"binary\":return \"latin1\";case\"base64\":case\"ascii\":case\"hex\":return n;default:if(o)return;n=(\"\"+n).toLowerCase(),o=!0;}}(r);if(typeof i!=\"string\"&&(zs.isEncoding===Tc||!Tc(r)))throw new Error(\"Unknown encoding: \"+r);return i||r}(t),this.encoding){case\"utf16le\":this.text=Ow,this.end=kw,e=4;break;case\"utf8\":this.fillLast=Pw,e=4;break;case\"base64\":this.text=xw,this.end=Mw,e=3;break;default:return this.write=Lw,this.end=Uw,void 0}this.lastNeed=0,this.lastTotal=0,this.lastChar=zs.allocUnsafe(e);}function Ws(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function Pw(t){var e=this.lastTotal-this.lastNeed,r=function(i,n,o){if((192&n[0])!=128)return i.lastNeed=0,\"\\uFFFD\";if(i.lastNeed>1&&n.length>1){if((192&n[1])!=128)return i.lastNeed=1,\"\\uFFFD\";if(i.lastNeed>2&&n.length>2&&(192&n[2])!=128)return i.lastNeed=2,\"\\uFFFD\"}}(this,t);return r!==void 0?r:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),this.lastNeed-=t.length,void 0)}function Ow(t,e){if((t.length-e)%2==0){var r=t.toString(\"utf16le\",e);if(r){var i=r.charCodeAt(r.length-1);if(i>=55296&&i<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString(\"utf16le\",e,t.length-1)}function kw(t){var e=t&&t.length?this.write(t):\"\";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString(\"utf16le\",0,r)}return e}function xw(t,e){var r=(t.length-e)%3;return r===0?t.toString(\"base64\",e):(this.lastNeed=3-r,this.lastTotal=3,r===1?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString(\"base64\",e,t.length-r))}function Mw(t){var e=t&&t.length?this.write(t):\"\";return this.lastNeed?e+this.lastChar.toString(\"base64\",0,3-this.lastNeed):e}function Lw(t){return t.toString(this.encoding)}function Uw(t){return t&&t.length?this.write(t):\"\"}var Rc,$e,ke,yc,on,nr,bc,gw,St,$s,Nr,_c,Rw,Cw,an,ln,it,Bw,ar,zs,Tc,Qs=we(()=>{v();m();_();for(Rc={byteLength:function(t){var e=wc(t),r=e[0],i=e[1];return 3*(r+i)/4-i},toByteArray:function(t){var e,r,i=wc(t),n=i[0],o=i[1],s=new yc(function(c,h,d){return 3*(h+d)/4-d}(0,n,o)),a=0,u=o>0?n-4:n;for(r=0;r>16&255,s[a++]=e>>8&255,s[a++]=255&e;return o===2&&(e=ke[t.charCodeAt(r)]<<2|ke[t.charCodeAt(r+1)]>>4,s[a++]=255&e),o===1&&(e=ke[t.charCodeAt(r)]<<10|ke[t.charCodeAt(r+1)]<<4|ke[t.charCodeAt(r+2)]>>2,s[a++]=e>>8&255,s[a++]=255&e),s},fromByteArray:function(t){for(var e,r=t.length,i=r%3,n=[],o=0,s=r-i;os?s:o+16383));return i===1?(e=t[r-1],n.push($e[e>>2]+$e[e<<4&63]+\"==\")):i===2&&(e=(t[r-2]<<8)+t[r-1],n.push($e[e>>10]+$e[e>>4&63]+$e[e<<2&63]+\"=\")),n.join(\"\")}},$e=[],ke=[],yc=typeof Uint8Array<\"u\"?Uint8Array:Array,on=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\",nr=0,bc=on.length;nr>1,h=-7,d=r?n-1:0,g=r?-1:1,y=t[e+d];for(d+=g,o=y&(1<<-h)-1,y>>=-h,h+=a;h>0;o=256*o+t[e+d],d+=g,h-=8);for(s=o&(1<<-h)-1,o>>=-h,h+=i;h>0;s=256*s+t[e+d],d+=g,h-=8);if(o===0)o=1-c;else {if(o===u)return s?NaN:1/0*(y?-1:1);s+=Math.pow(2,i),o-=c;}return (y?-1:1)*s*Math.pow(2,o-i)},write:function(t,e,r,i,n,o){var s,a,u,c=8*o-n-1,h=(1<>1,g=n===23?Math.pow(2,-24)-Math.pow(2,-77):0,y=i?0:o-1,w=i?1:-1,E=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=h):(s=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-s))<1&&(s--,u*=2),(e+=s+d>=1?g/u:g*Math.pow(2,1-d))*u>=2&&(s++,u/=2),s+d>=h?(a=0,s=h):s+d>=1?(a=(e*u-1)*Math.pow(2,n),s+=d):(a=e*Math.pow(2,d-1)*Math.pow(2,n),s=0));n>=8;t[r+y]=255&a,y+=w,a/=256,n-=8);for(s=s<0;t[r+y]=255&s,y+=w,s/=256,c-=8);t[r+y-w]|=128*E;}},St={},$s=Rc,Nr=gw,_c=typeof Symbol==\"function\"&&typeof Symbol.for==\"function\"?Symbol.for(\"nodejs.util.inspect.custom\"):null;St.Buffer=k,St.SlowBuffer=function(t){return +t!=t&&(t=0),k.alloc(+t)},St.INSPECT_MAX_BYTES=50;St.kMaxLength=2147483647,k.TYPED_ARRAY_SUPPORT=function(){try{var t=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(t,e),t.foo()===42}catch{return !1}}(),k.TYPED_ARRAY_SUPPORT||typeof console>\"u\"||typeof console.error!=\"function\"||console.error(\"This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.\"),Object.defineProperty(k.prototype,\"parent\",{enumerable:!0,get:function(){if(k.isBuffer(this))return this.buffer}}),Object.defineProperty(k.prototype,\"offset\",{enumerable:!0,get:function(){if(k.isBuffer(this))return this.byteOffset}}),k.poolSize=8192,k.from=function(t,e,r){return Cc(t,e,r)},Object.setPrototypeOf(k.prototype,Uint8Array.prototype),Object.setPrototypeOf(k,Uint8Array),k.alloc=function(t,e,r){return function(i,n,o){return Bc(i),i<=0?vt(i):n!==void 0?typeof o==\"string\"?vt(i).fill(n,o):vt(i).fill(n):vt(i)}(t,e,r)},k.allocUnsafe=function(t){return Hs(t)},k.allocUnsafeSlow=function(t){return Hs(t)},k.isBuffer=function(t){return t!=null&&t._isBuffer===!0&&t!==k.prototype},k.compare=function(t,e){if(Et(t,Uint8Array)&&(t=k.from(t,t.offset,t.byteLength)),Et(e,Uint8Array)&&(e=k.from(e,e.offset,e.byteLength)),!k.isBuffer(t)||!k.isBuffer(e))throw new TypeError('The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;for(var r=t.length,i=e.length,n=0,o=Math.min(r,i);ne&&(t+=\" ... \"),\"\"},_c&&(k.prototype[_c]=k.prototype.inspect),k.prototype.compare=function(t,e,r,i,n){if(Et(t,Uint8Array)&&(t=k.from(t,t.offset,t.byteLength)),!k.isBuffer(t))throw new TypeError('The \"target\" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(e===void 0&&(e=0),r===void 0&&(r=t?t.length:0),i===void 0&&(i=0),n===void 0&&(n=this.length),e<0||r>t.length||i<0||n>this.length)throw new RangeError(\"out of range index\");if(i>=n&&e>=r)return 0;if(i>=n)return -1;if(e>=r)return 1;if(this===t)return 0;for(var o=(n>>>=0)-(i>>>=0),s=(r>>>=0)-(e>>>=0),a=Math.min(o,s),u=this.slice(i,n),c=t.slice(e,r),h=0;h>>=0,isFinite(r)?(r>>>=0,i===void 0&&(i=\"utf8\")):(i=r,r=void 0);}var n=this.length-e;if((r===void 0||r>n)&&(r=n),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError(\"Attempt to write outside buffer bounds\");i||(i=\"utf8\");for(var o=!1;;)switch(i){case\"hex\":return bw(this,t,e,r);case\"utf8\":case\"utf-8\":return ww(this,t,e,r);case\"ascii\":return Oc(this,t,e,r);case\"latin1\":case\"binary\":return _w(this,t,e,r);case\"base64\":return mw(this,t,e,r);case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return vw(this,t,e,r);default:if(o)throw new TypeError(\"Unknown encoding: \"+i);i=(\"\"+i).toLowerCase(),o=!0;}},k.prototype.toJSON=function(){return {type:\"Buffer\",data:Array.prototype.slice.call(this._arr||this,0)}};k.prototype.slice=function(t,e){var r=this.length;(t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=e===void 0?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e>>=0,e>>>=0,r||be(t,e,this.length);for(var i=this[t],n=1,o=0;++o>>=0,e>>>=0,r||be(t,e,this.length);for(var i=this[t+--e],n=1;e>0&&(n*=256);)i+=this[t+--e]*n;return i},k.prototype.readUInt8=function(t,e){return t>>>=0,e||be(t,1,this.length),this[t]},k.prototype.readUInt16LE=function(t,e){return t>>>=0,e||be(t,2,this.length),this[t]|this[t+1]<<8},k.prototype.readUInt16BE=function(t,e){return t>>>=0,e||be(t,2,this.length),this[t]<<8|this[t+1]},k.prototype.readUInt32LE=function(t,e){return t>>>=0,e||be(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},k.prototype.readUInt32BE=function(t,e){return t>>>=0,e||be(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},k.prototype.readIntLE=function(t,e,r){t>>>=0,e>>>=0,r||be(t,e,this.length);for(var i=this[t],n=1,o=0;++o=(n*=128)&&(i-=Math.pow(2,8*e)),i},k.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||be(t,e,this.length);for(var i=e,n=1,o=this[t+--i];i>0&&(n*=256);)o+=this[t+--i]*n;return o>=(n*=128)&&(o-=Math.pow(2,8*e)),o},k.prototype.readInt8=function(t,e){return t>>>=0,e||be(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},k.prototype.readInt16LE=function(t,e){t>>>=0,e||be(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},k.prototype.readInt16BE=function(t,e){t>>>=0,e||be(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},k.prototype.readInt32LE=function(t,e){return t>>>=0,e||be(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},k.prototype.readInt32BE=function(t,e){return t>>>=0,e||be(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},k.prototype.readFloatLE=function(t,e){return t>>>=0,e||be(t,4,this.length),Nr.read(this,t,!0,23,4)},k.prototype.readFloatBE=function(t,e){return t>>>=0,e||be(t,4,this.length),Nr.read(this,t,!1,23,4)},k.prototype.readDoubleLE=function(t,e){return t>>>=0,e||be(t,8,this.length),Nr.read(this,t,!0,52,8)},k.prototype.readDoubleBE=function(t,e){return t>>>=0,e||be(t,8,this.length),Nr.read(this,t,!1,52,8)},k.prototype.writeUIntLE=function(t,e,r,i){t=+t,e>>>=0,r>>>=0,i||Pe(this,t,e,r,Math.pow(2,8*r)-1,0);var n=1,o=0;for(this[e]=255&t;++o>>=0,r>>>=0,i||Pe(this,t,e,r,Math.pow(2,8*r)-1,0);var n=r-1,o=1;for(this[e+n]=255&t;--n>=0&&(o*=256);)this[e+n]=t/o&255;return e+r},k.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||Pe(this,t,e,1,255,0),this[e]=255&t,e+1},k.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||Pe(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},k.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||Pe(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},k.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||Pe(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},k.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||Pe(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},k.prototype.writeIntLE=function(t,e,r,i){if(t=+t,e>>>=0,!i){var n=Math.pow(2,8*r-1);Pe(this,t,e,r,n-1,-n);}var o=0,s=1,a=0;for(this[e]=255&t;++o>0)-a&255;return e+r},k.prototype.writeIntBE=function(t,e,r,i){if(t=+t,e>>>=0,!i){var n=Math.pow(2,8*r-1);Pe(this,t,e,r,n-1,-n);}var o=r-1,s=1,a=0;for(this[e+o]=255&t;--o>=0&&(s*=256);)t<0&&a===0&&this[e+o+1]!==0&&(a=1),this[e+o]=(t/s>>0)-a&255;return e+r},k.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||Pe(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},k.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||Pe(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},k.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||Pe(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},k.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||Pe(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},k.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||Pe(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},k.prototype.writeFloatLE=function(t,e,r){return Sc(this,t,e,!0,r)},k.prototype.writeFloatBE=function(t,e,r){return Sc(this,t,e,!1,r)},k.prototype.writeDoubleLE=function(t,e,r){return Ac(this,t,e,!0,r)},k.prototype.writeDoubleBE=function(t,e,r){return Ac(this,t,e,!1,r)},k.prototype.copy=function(t,e,r,i){if(!k.isBuffer(t))throw new TypeError(\"argument should be a Buffer\");if(r||(r=0),i||i===0||(i=this.length),e>=t.length&&(e=t.length),e||(e=0),i>0&&i=this.length)throw new RangeError(\"Index out of range\");if(i<0)throw new RangeError(\"sourceEnd out of bounds\");i>this.length&&(i=this.length),t.length-e=0;--o)t[o+e]=this[o+r];else Uint8Array.prototype.set.call(t,this.subarray(r,i),e);return n},k.prototype.fill=function(t,e,r,i){if(typeof t==\"string\"){if(typeof e==\"string\"?(i=e,e=0,r=this.length):typeof r==\"string\"&&(i=r,r=this.length),i!==void 0&&typeof i!=\"string\")throw new TypeError(\"encoding must be a string\");if(typeof i==\"string\"&&!k.isEncoding(i))throw new TypeError(\"Unknown encoding: \"+i);if(t.length===1){var n=t.charCodeAt(0);(i===\"utf8\"&&n<128||i===\"latin1\")&&(t=n);}}else typeof t==\"number\"?t&=255:typeof t==\"boolean\"&&(t=Number(t));if(e<0||this.length>>=0,r=r===void 0?this.length:r>>>0,t||(t=0),typeof t==\"number\")for(o=e;o=0?(u>0&&(n.lastNeed=u-1),u):--a=0?(u>0&&(n.lastNeed=u-2),u):--a=0?(u>0&&(u===2?u=0:n.lastNeed=u-3),u):0}(this,t,e);if(!this.lastNeed)return t.toString(\"utf8\",e);this.lastTotal=r;var i=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,i),t.toString(\"utf8\",e,i)},hi.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length;};ar.StringDecoder;ar.StringDecoder;});var Lc={};Qt(Lc,{StringDecoder:()=>Nw,default:()=>ar});var Nw,Uc=we(()=>{v();m();_();Qs();Qs();Nw=ar.StringDecoder;});var Ys=M((F2,jc)=>{v();m();_();var Nc=Ut(),{PromisePrototypeThen:qw,SymbolAsyncIterator:qc,SymbolIterator:Dc}=ce(),{Buffer:Dw}=(ye(),X(_e)),{ERR_INVALID_ARG_TYPE:jw,ERR_STREAM_NULL_VALUES:Fw}=Se().codes;function Ww(t,e,r){let i;if(typeof e==\"string\"||e instanceof Dw)return new t({objectMode:!0,...r,read(){this.push(e),this.push(null);}});let n;if(e&&e[qc])n=!0,i=e[qc]();else if(e&&e[Dc])n=!1,i=e[Dc]();else throw new jw(\"iterable\",[\"Iterable\"],e);let o=new t({objectMode:!0,highWaterMark:1,...r}),s=!1;o._read=function(){s||(s=!0,u());},o._destroy=function(c,h){qw(a(c),()=>Nc.nextTick(h,c),d=>Nc.nextTick(h,d||c));};async function a(c){let h=c!=null,d=typeof i.throw==\"function\";if(h&&d){let{value:g,done:y}=await i.throw(c);if(await g,y)return}if(typeof i.return==\"function\"){let{value:g}=await i.return();await g;}}async function u(){for(;;){try{let{value:c,done:h}=n?await i.next():i.next();if(h)o.push(null);else {let d=c&&typeof c.then==\"function\"?await c:c;if(d===null)throw s=!1,new Fw;if(o.push(d))continue;s=!1;}}catch(c){o.destroy(c);}break}}return o}jc.exports=Ww;});var di=M((J2,Zc)=>{v();m();_();var He=Ut(),{ArrayPrototypeIndexOf:$w,NumberIsInteger:Hw,NumberIsNaN:Vw,NumberParseInt:zw,ObjectDefineProperties:$c,ObjectKeys:Kw,ObjectSetPrototypeOf:Hc,Promise:Gw,SafeSet:Qw,SymbolAsyncIterator:Yw,Symbol:Jw}=ce();Zc.exports=F;F.ReadableState=ro;var{EventEmitter:Xw}=(ir(),X(rr)),{Stream:qt,prependListener:Zw}=tn(),{Buffer:Js}=(ye(),X(_e)),{addAbortSignal:e_}=ci(),t_=mt(),H=Je().debuglog(\"stream\",t=>{H=t;}),r_=dc(),Dr=tr(),{getHighWaterMark:i_,getDefaultHighWaterMark:n_}=sn(),{aggregateTwoErrors:Fc,codes:{ERR_INVALID_ARG_TYPE:s_,ERR_METHOD_NOT_IMPLEMENTED:o_,ERR_OUT_OF_RANGE:a_,ERR_STREAM_PUSH_AFTER_EOF:l_,ERR_STREAM_UNSHIFT_AFTER_END_EVENT:u_}}=Se(),{validateObject:f_}=fi(),lr=Jw(\"kPaused\"),{StringDecoder:Vc}=(Uc(),X(Lc)),c_=Ys();Hc(F.prototype,qt.prototype);Hc(F,qt);var Xs=()=>{},{errorOrDestroy:qr}=Dr;function ro(t,e,r){typeof r!=\"boolean\"&&(r=e instanceof nt()),this.objectMode=!!(t&&t.objectMode),r&&(this.objectMode=this.objectMode||!!(t&&t.readableObjectMode)),this.highWaterMark=t?i_(this,t,\"readableHighWaterMark\",r):n_(!1),this.buffer=new r_,this.length=0,this.pipes=[],this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.constructed=!0,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this[lr]=null,this.errorEmitted=!1,this.emitClose=!t||t.emitClose!==!1,this.autoDestroy=!t||t.autoDestroy!==!1,this.destroyed=!1,this.errored=null,this.closed=!1,this.closeEmitted=!1,this.defaultEncoding=t&&t.defaultEncoding||\"utf8\",this.awaitDrainWriters=null,this.multiAwaitDrain=!1,this.readingMore=!1,this.dataEmitted=!1,this.decoder=null,this.encoding=null,t&&t.encoding&&(this.decoder=new Vc(t.encoding),this.encoding=t.encoding);}function F(t){if(!(this instanceof F))return new F(t);let e=this instanceof nt();this._readableState=new ro(t,this,e),t&&(typeof t.read==\"function\"&&(this._read=t.read),typeof t.destroy==\"function\"&&(this._destroy=t.destroy),typeof t.construct==\"function\"&&(this._construct=t.construct),t.signal&&!e&&e_(t.signal,this)),qt.call(this,t),Dr.construct(this,()=>{this._readableState.needReadable&&fn(this,this._readableState);});}F.prototype.destroy=Dr.destroy;F.prototype._undestroy=Dr.undestroy;F.prototype._destroy=function(t,e){e(t);};F.prototype[Xw.captureRejectionSymbol]=function(t){this.destroy(t);};F.prototype.push=function(t,e){return zc(this,t,e,!1)};F.prototype.unshift=function(t,e){return zc(this,t,e,!0)};function zc(t,e,r,i){H(\"readableAddChunk\",e);let n=t._readableState,o;if(n.objectMode||(typeof e==\"string\"?(r=r||n.defaultEncoding,n.encoding!==r&&(i&&n.encoding?e=Js.from(e,r).toString(n.encoding):(e=Js.from(e,r),r=\"\"))):e instanceof Js?r=\"\":qt._isUint8Array(e)?(e=qt._uint8ArrayToBuffer(e),r=\"\"):e!=null&&(o=new s_(\"chunk\",[\"string\",\"Buffer\",\"Uint8Array\"],e))),o)qr(t,o);else if(e===null)n.reading=!1,p_(t,n);else if(n.objectMode||e&&e.length>0)if(i)if(n.endEmitted)qr(t,new u_);else {if(n.destroyed||n.errored)return !1;Zs(t,n,e,!0);}else if(n.ended)qr(t,new l_);else {if(n.destroyed||n.errored)return !1;n.reading=!1,n.decoder&&!r?(e=n.decoder.write(e),n.objectMode||e.length!==0?Zs(t,n,e,!1):fn(t,n)):Zs(t,n,e,!1);}else i||(n.reading=!1,fn(t,n));return !n.ended&&(n.length0?(e.multiAwaitDrain?e.awaitDrainWriters.clear():e.awaitDrainWriters=null,e.dataEmitted=!0,t.emit(\"data\",r)):(e.length+=e.objectMode?1:r.length,i?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&cn(t)),fn(t,e);}F.prototype.isPaused=function(){let t=this._readableState;return t[lr]===!0||t.flowing===!1};F.prototype.setEncoding=function(t){let e=new Vc(t);this._readableState.decoder=e,this._readableState.encoding=this._readableState.decoder.encoding;let r=this._readableState.buffer,i=\"\";for(let n of r)i+=e.write(n);return r.clear(),i!==\"\"&&r.push(i),this._readableState.length=i.length,this};var h_=1073741824;function d_(t){if(t>h_)throw new a_(\"size\",\"<= 1GiB\",t);return t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++,t}function Wc(t,e){return t<=0||e.length===0&&e.ended?0:e.objectMode?1:Vw(t)?e.flowing&&e.length?e.buffer.first().length:e.length:t<=e.length?t:e.ended?e.length:0}F.prototype.read=function(t){H(\"read\",t),t===void 0?t=NaN:Hw(t)||(t=zw(t,10));let e=this._readableState,r=t;if(t>e.highWaterMark&&(e.highWaterMark=d_(t)),t!==0&&(e.emittedReadable=!1),t===0&&e.needReadable&&((e.highWaterMark!==0?e.length>=e.highWaterMark:e.length>0)||e.ended))return H(\"read: emitReadable\",e.length,e.ended),e.length===0&&e.ended?eo(this):cn(this),null;if(t=Wc(t,e),t===0&&e.ended)return e.length===0&&eo(this),null;let i=e.needReadable;if(H(\"need readable\",i),(e.length===0||e.length-t0?n=Jc(t,e):n=null,n===null?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.multiAwaitDrain?e.awaitDrainWriters.clear():e.awaitDrainWriters=null),e.length===0&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&eo(this)),n!==null&&!e.errorEmitted&&!e.closeEmitted&&(e.dataEmitted=!0,this.emit(\"data\",n)),n};function p_(t,e){if(H(\"onEofChunk\"),!e.ended){if(e.decoder){let r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length);}e.ended=!0,e.sync?cn(t):(e.needReadable=!1,e.emittedReadable=!0,Kc(t));}}function cn(t){let e=t._readableState;H(\"emitReadable\",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(H(\"emitReadable\",e.flowing),e.emittedReadable=!0,He.nextTick(Kc,t));}function Kc(t){let e=t._readableState;H(\"emitReadable_\",e.destroyed,e.length,e.ended),!e.destroyed&&!e.errored&&(e.length||e.ended)&&(t.emit(\"readable\"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,Qc(t);}function fn(t,e){!e.readingMore&&e.constructed&&(e.readingMore=!0,He.nextTick(g_,t,e));}function g_(t,e){for(;!e.reading&&!e.ended&&(e.length1&&i.pipes.includes(t)&&(H(\"false write response, pause\",i.awaitDrainWriters.size),i.awaitDrainWriters.add(t)),r.pause()),u||(u=y_(r,t),t.on(\"drain\",u));}r.on(\"data\",g);function g(I){H(\"ondata\");let C=t.write(I);H(\"dest.write\",C),C===!1&&d();}function y(I){if(H(\"onerror\",I),S(),t.removeListener(\"error\",y),t.listenerCount(\"error\")===0){let C=t._writableState||t._readableState;C&&!C.errorEmitted?qr(t,I):t.emit(\"error\",I);}}Zw(t,\"error\",y);function w(){t.removeListener(\"finish\",E),S();}t.once(\"close\",w);function E(){H(\"onfinish\"),t.removeListener(\"close\",w),S();}t.once(\"finish\",E);function S(){H(\"unpipe\"),r.unpipe(t);}return t.emit(\"pipe\",r),t.writableNeedDrain===!0?i.flowing&&d():i.flowing||(H(\"pipe resume\"),r.resume()),t};function y_(t,e){return function(){let i=t._readableState;i.awaitDrainWriters===e?(H(\"pipeOnDrain\",1),i.awaitDrainWriters=null):i.multiAwaitDrain&&(H(\"pipeOnDrain\",i.awaitDrainWriters.size),i.awaitDrainWriters.delete(e)),(!i.awaitDrainWriters||i.awaitDrainWriters.size===0)&&t.listenerCount(\"data\")&&t.resume();}}F.prototype.unpipe=function(t){let e=this._readableState,r={hasUnpiped:!1};if(e.pipes.length===0)return this;if(!t){let n=e.pipes;e.pipes=[],this.pause();for(let o=0;o0,i.flowing!==!1&&this.resume()):t===\"readable\"&&!i.endEmitted&&!i.readableListening&&(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,H(\"on readable\",i.length,i.reading),i.length?cn(this):i.reading||He.nextTick(b_,this)),r};F.prototype.addListener=F.prototype.on;F.prototype.removeListener=function(t,e){let r=qt.prototype.removeListener.call(this,t,e);return t===\"readable\"&&He.nextTick(Gc,this),r};F.prototype.off=F.prototype.removeListener;F.prototype.removeAllListeners=function(t){let e=qt.prototype.removeAllListeners.apply(this,arguments);return (t===\"readable\"||t===void 0)&&He.nextTick(Gc,this),e};function Gc(t){let e=t._readableState;e.readableListening=t.listenerCount(\"readable\")>0,e.resumeScheduled&&e[lr]===!1?e.flowing=!0:t.listenerCount(\"data\")>0?t.resume():e.readableListening||(e.flowing=null);}function b_(t){H(\"readable nexttick read 0\"),t.read(0);}F.prototype.resume=function(){let t=this._readableState;return t.flowing||(H(\"resume\"),t.flowing=!t.readableListening,w_(this,t)),t[lr]=!1,this};function w_(t,e){e.resumeScheduled||(e.resumeScheduled=!0,He.nextTick(__,t,e));}function __(t,e){H(\"resume\",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit(\"resume\"),Qc(t),e.flowing&&!e.reading&&t.read(0);}F.prototype.pause=function(){return H(\"call pause flowing=%j\",this._readableState.flowing),this._readableState.flowing!==!1&&(H(\"pause\"),this._readableState.flowing=!1,this.emit(\"pause\")),this._readableState[lr]=!0,this};function Qc(t){let e=t._readableState;for(H(\"flow\",e.flowing);e.flowing&&t.read()!==null;);}F.prototype.wrap=function(t){let e=!1;t.on(\"data\",i=>{!this.push(i)&&t.pause&&(e=!0,t.pause());}),t.on(\"end\",()=>{this.push(null);}),t.on(\"error\",i=>{qr(this,i);}),t.on(\"close\",()=>{this.destroy();}),t.on(\"destroy\",()=>{this.destroy();}),this._read=()=>{e&&t.resume&&(e=!1,t.resume());};let r=Kw(t);for(let i=1;i{n=s?Fc(n,s):null,r(),r=Xs;});try{for(;;){let s=t.destroyed?null:t.read();if(s!==null)yield s;else {if(n)throw n;if(n===null)return;await new Gw(i);}}}catch(s){throw n=Fc(n,s),n}finally{(n||e?.destroyOnReturn!==!1)&&(n===void 0||t._readableState.autoDestroy)?Dr.destroyer(t,null):(t.off(\"readable\",i),o());}}$c(F.prototype,{readable:{__proto__:null,get(){let t=this._readableState;return !!t&&t.readable!==!1&&!t.destroyed&&!t.errorEmitted&&!t.endEmitted},set(t){this._readableState&&(this._readableState.readable=!!t);}},readableDidRead:{__proto__:null,enumerable:!1,get:function(){return this._readableState.dataEmitted}},readableAborted:{__proto__:null,enumerable:!1,get:function(){return !!(this._readableState.readable!==!1&&(this._readableState.destroyed||this._readableState.errored)&&!this._readableState.endEmitted)}},readableHighWaterMark:{__proto__:null,enumerable:!1,get:function(){return this._readableState.highWaterMark}},readableBuffer:{__proto__:null,enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}},readableFlowing:{__proto__:null,enumerable:!1,get:function(){return this._readableState.flowing},set:function(t){this._readableState&&(this._readableState.flowing=t);}},readableLength:{__proto__:null,enumerable:!1,get(){return this._readableState.length}},readableObjectMode:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.objectMode:!1}},readableEncoding:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.encoding:null}},errored:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.errored:null}},closed:{__proto__:null,get(){return this._readableState?this._readableState.closed:!1}},destroyed:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.destroyed:!1},set(t){this._readableState&&(this._readableState.destroyed=t);}},readableEnded:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.endEmitted:!1}}});$c(ro.prototype,{pipesCount:{__proto__:null,get(){return this.pipes.length}},paused:{__proto__:null,get(){return this[lr]!==!1},set(t){this[lr]=!!t;}}});F._fromList=Jc;function Jc(t,e){if(e.length===0)return null;let r;return e.objectMode?r=e.buffer.shift():!t||t>=e.length?(e.decoder?r=e.buffer.join(\"\"):e.buffer.length===1?r=e.buffer.first():r=e.buffer.concat(e.length),e.buffer.clear()):r=e.buffer.consume(t,e.decoder),r}function eo(t){let e=t._readableState;H(\"endReadable\",e.endEmitted),e.endEmitted||(e.ended=!0,He.nextTick(v_,e,t));}function v_(t,e){if(H(\"endReadableNT\",t.endEmitted,t.length),!t.errored&&!t.closeEmitted&&!t.endEmitted&&t.length===0){if(t.endEmitted=!0,e.emit(\"end\"),e.writable&&e.allowHalfOpen===!1)He.nextTick(E_,e);else if(t.autoDestroy){let r=e._writableState;(!r||r.autoDestroy&&(r.finished||r.writable===!1))&&e.destroy();}}}function E_(t){t.writable&&!t.writableEnded&&!t.destroyed&&t.end();}F.from=function(t,e){return c_(F,t,e)};var to;function Xc(){return to===void 0&&(to={}),to}F.fromWeb=function(t,e){return Xc().newStreamReadableFromReadableStream(t,e)};F.toWeb=function(t,e){return Xc().newReadableStreamFromStreamReadable(t,e)};F.wrap=function(t,e){var r,i;return new F({objectMode:(r=(i=t.readableObjectMode)!==null&&i!==void 0?i:t.objectMode)!==null&&r!==void 0?r:!0,...e,destroy(n,o){Dr.destroyer(t,n),o(n);}}).wrap(t)};});var uo=M((aR,ch)=>{v();m();_();var ur=Ut(),{ArrayPrototypeSlice:rh,Error:S_,FunctionPrototypeSymbolHasInstance:ih,ObjectDefineProperty:nh,ObjectDefineProperties:A_,ObjectSetPrototypeOf:sh,StringPrototypeToLowerCase:I_,Symbol:T_,SymbolHasInstance:R_}=ce();ch.exports=ie;ie.WritableState=yi;var{EventEmitter:C_}=(ir(),X(rr)),pi=tn().Stream,{Buffer:hn}=(ye(),X(_e)),gn=tr(),{addAbortSignal:B_}=ci(),{getHighWaterMark:P_,getDefaultHighWaterMark:O_}=sn(),{ERR_INVALID_ARG_TYPE:k_,ERR_METHOD_NOT_IMPLEMENTED:x_,ERR_MULTIPLE_CALLBACK:oh,ERR_STREAM_CANNOT_PIPE:M_,ERR_STREAM_DESTROYED:gi,ERR_STREAM_ALREADY_FINISHED:L_,ERR_STREAM_NULL_VALUES:U_,ERR_STREAM_WRITE_AFTER_END:N_,ERR_UNKNOWN_ENCODING:ah}=Se().codes,{errorOrDestroy:jr}=gn;sh(ie.prototype,pi.prototype);sh(ie,pi);function so(){}var Fr=T_(\"kOnFinished\");function yi(t,e,r){typeof r!=\"boolean\"&&(r=e instanceof nt()),this.objectMode=!!(t&&t.objectMode),r&&(this.objectMode=this.objectMode||!!(t&&t.writableObjectMode)),this.highWaterMark=t?P_(this,t,\"writableHighWaterMark\",r):O_(!1),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;let i=!!(t&&t.decodeStrings===!1);this.decodeStrings=!i,this.defaultEncoding=t&&t.defaultEncoding||\"utf8\",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=D_.bind(void 0,e),this.writecb=null,this.writelen=0,this.afterWriteTickInfo=null,pn(this),this.pendingcb=0,this.constructed=!0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!t||t.emitClose!==!1,this.autoDestroy=!t||t.autoDestroy!==!1,this.errored=null,this.closed=!1,this.closeEmitted=!1,this[Fr]=[];}function pn(t){t.buffered=[],t.bufferedIndex=0,t.allBuffers=!0,t.allNoop=!0;}yi.prototype.getBuffer=function(){return rh(this.buffered,this.bufferedIndex)};nh(yi.prototype,\"bufferedRequestCount\",{__proto__:null,get(){return this.buffered.length-this.bufferedIndex}});function ie(t){let e=this instanceof nt();if(!e&&!ih(ie,this))return new ie(t);this._writableState=new yi(t,this,e),t&&(typeof t.write==\"function\"&&(this._write=t.write),typeof t.writev==\"function\"&&(this._writev=t.writev),typeof t.destroy==\"function\"&&(this._destroy=t.destroy),typeof t.final==\"function\"&&(this._final=t.final),typeof t.construct==\"function\"&&(this._construct=t.construct),t.signal&&B_(t.signal,this)),pi.call(this,t),gn.construct(this,()=>{let r=this._writableState;r.writing||ao(this,r),lo(this,r);});}nh(ie,R_,{__proto__:null,value:function(t){return ih(this,t)?!0:this!==ie?!1:t&&t._writableState instanceof yi}});ie.prototype.pipe=function(){jr(this,new M_);};function lh(t,e,r,i){let n=t._writableState;if(typeof r==\"function\")i=r,r=n.defaultEncoding;else {if(!r)r=n.defaultEncoding;else if(r!==\"buffer\"&&!hn.isEncoding(r))throw new ah(r);typeof i!=\"function\"&&(i=so);}if(e===null)throw new U_;if(!n.objectMode)if(typeof e==\"string\")n.decodeStrings!==!1&&(e=hn.from(e,r),r=\"buffer\");else if(e instanceof hn)r=\"buffer\";else if(pi._isUint8Array(e))e=pi._uint8ArrayToBuffer(e),r=\"buffer\";else throw new k_(\"chunk\",[\"string\",\"Buffer\",\"Uint8Array\"],e);let o;return n.ending?o=new N_:n.destroyed&&(o=new gi(\"write\")),o?(ur.nextTick(i,o),jr(t,o,!0),o):(n.pendingcb++,q_(t,n,e,r,i))}ie.prototype.write=function(t,e,r){return lh(this,t,e,r)===!0};ie.prototype.cork=function(){this._writableState.corked++;};ie.prototype.uncork=function(){let t=this._writableState;t.corked&&(t.corked--,t.writing||ao(this,t));};ie.prototype.setDefaultEncoding=function(e){if(typeof e==\"string\"&&(e=I_(e)),!hn.isEncoding(e))throw new ah(e);return this._writableState.defaultEncoding=e,this};function q_(t,e,r,i,n){let o=e.objectMode?1:r.length;e.length+=o;let s=e.lengthr.bufferedIndex&&ao(t,r),i?r.afterWriteTickInfo!==null&&r.afterWriteTickInfo.cb===n?r.afterWriteTickInfo.count++:(r.afterWriteTickInfo={count:1,cb:n,stream:t,state:r},ur.nextTick(j_,r.afterWriteTickInfo)):uh(t,r,1,n));}function j_({stream:t,state:e,count:r,cb:i}){return e.afterWriteTickInfo=null,uh(t,e,r,i)}function uh(t,e,r,i){for(!e.ending&&!t.destroyed&&e.length===0&&e.needDrain&&(e.needDrain=!1,t.emit(\"drain\"));r-- >0;)e.pendingcb--,i();e.destroyed&&oo(e),lo(t,e);}function oo(t){if(t.writing)return;for(let n=t.bufferedIndex;n1&&t._writev){e.pendingcb-=o-1;let a=e.allNoop?so:c=>{for(let h=s;h256?(r.splice(0,s),e.bufferedIndex=0):e.bufferedIndex=s;}e.bufferProcessing=!1;}ie.prototype._write=function(t,e,r){if(this._writev)this._writev([{chunk:t,encoding:e}],r);else throw new x_(\"_write()\")};ie.prototype._writev=null;ie.prototype.end=function(t,e,r){let i=this._writableState;typeof t==\"function\"?(r=t,t=null,e=null):typeof e==\"function\"&&(r=e,e=null);let n;if(t!=null){let o=lh(this,t,e);o instanceof S_&&(n=o);}return i.corked&&(i.corked=1,this.uncork()),n||(!i.errored&&!i.ending?(i.ending=!0,lo(this,i,!0),i.ended=!0):i.finished?n=new L_(\"end\"):i.destroyed&&(n=new gi(\"end\"))),typeof r==\"function\"&&(n||i.finished?ur.nextTick(r,n):i[Fr].push(r)),this};function dn(t){return t.ending&&!t.destroyed&&t.constructed&&t.length===0&&!t.errored&&t.buffered.length===0&&!t.finished&&!t.writing&&!t.errorEmitted&&!t.closeEmitted}function F_(t,e){let r=!1;function i(n){if(r){jr(t,n??oh());return}if(r=!0,e.pendingcb--,n){let o=e[Fr].splice(0);for(let s=0;s{dn(n)?no(i,n):n.pendingcb--;},t,e)):dn(e)&&(e.pendingcb++,no(t,e))));}function no(t,e){e.pendingcb--,e.finished=!0;let r=e[Fr].splice(0);for(let i=0;i{v();m();_();var fo=Ut(),H_=(ye(),X(_e)),{isReadable:V_,isWritable:z_,isIterable:hh,isNodeStream:K_,isReadableNodeStream:dh,isWritableNodeStream:ph,isDuplexNodeStream:G_}=tt(),gh=mt(),{AbortError:vh,codes:{ERR_INVALID_ARG_TYPE:Q_,ERR_INVALID_RETURN_VALUE:yh}}=Se(),{destroyer:Wr}=tr(),Y_=nt(),J_=di(),{createDeferredPromise:bh}=Je(),wh=Ys(),_h=globalThis.Blob||H_.Blob,X_=typeof _h<\"u\"?function(e){return e instanceof _h}:function(e){return !1},Z_=globalThis.AbortController||Hi().AbortController,{FunctionPrototypeCall:mh}=ce(),fr=class extends Y_{constructor(e){super(e),e?.readable===!1&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),e?.writable===!1&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0);}};Eh.exports=function t(e,r){if(G_(e))return e;if(dh(e))return yn({readable:e});if(ph(e))return yn({writable:e});if(K_(e))return yn({writable:!1,readable:!1});if(typeof e==\"function\"){let{value:n,write:o,final:s,destroy:a}=e0(e);if(hh(n))return wh(fr,n,{objectMode:!0,write:o,final:s,destroy:a});let u=n?.then;if(typeof u==\"function\"){let c,h=mh(u,n,d=>{if(d!=null)throw new yh(\"nully\",\"body\",d)},d=>{Wr(c,d);});return c=new fr({objectMode:!0,readable:!1,write:o,final(d){s(async()=>{try{await h,fo.nextTick(d,null);}catch(g){fo.nextTick(d,g);}});},destroy:a})}throw new yh(\"Iterable, AsyncIterable or AsyncFunction\",r,n)}if(X_(e))return t(e.arrayBuffer());if(hh(e))return wh(fr,e,{objectMode:!0,writable:!1});if(typeof e?.writable==\"object\"||typeof e?.readable==\"object\"){let n=e!=null&&e.readable?dh(e?.readable)?e?.readable:t(e.readable):void 0,o=e!=null&&e.writable?ph(e?.writable)?e?.writable:t(e.writable):void 0;return yn({readable:n,writable:o})}let i=e?.then;if(typeof i==\"function\"){let n;return mh(i,e,o=>{o!=null&&n.push(o),n.push(null);},o=>{Wr(n,o);}),n=new fr({objectMode:!0,writable:!1,read(){}})}throw new Q_(r,[\"Blob\",\"ReadableStream\",\"WritableStream\",\"Stream\",\"Iterable\",\"AsyncIterable\",\"Function\",\"{ readable, writable } pair\",\"Promise\"],e)};function e0(t){let{promise:e,resolve:r}=bh(),i=new Z_,n=i.signal;return {value:t(async function*(){for(;;){let s=e;e=null;let{chunk:a,done:u,cb:c}=await s;if(fo.nextTick(c),u)return;if(n.aborted)throw new vh(void 0,{cause:n.reason});(({promise:e,resolve:r}=bh())),yield a;}}(),{signal:n}),write(s,a,u){let c=r;r=null,c({chunk:s,done:!1,cb:u});},final(s){let a=r;r=null,a({done:!0,cb:s});},destroy(s,a){i.abort(),a(s);}}}function yn(t){let e=t.readable&&typeof t.readable.read!=\"function\"?J_.wrap(t.readable):t.readable,r=t.writable,i=!!V_(e),n=!!z_(r),o,s,a,u,c;function h(d){let g=u;u=null,g?g(d):d&&c.destroy(d);}return c=new fr({readableObjectMode:!!(e!=null&&e.readableObjectMode),writableObjectMode:!!(r!=null&&r.writableObjectMode),readable:i,writable:n}),n&&(gh(r,d=>{n=!1,d&&Wr(e,d),h(d);}),c._write=function(d,g,y){r.write(d,g)?y():o=y;},c._final=function(d){r.end(),s=d;},r.on(\"drain\",function(){if(o){let d=o;o=null,d();}}),r.on(\"finish\",function(){if(s){let d=s;s=null,d();}})),i&&(gh(e,d=>{i=!1,d&&Wr(e,d),h(d);}),e.on(\"readable\",function(){if(a){let d=a;a=null,d();}}),e.on(\"end\",function(){c.push(null);}),c._read=function(){for(;;){let d=e.read();if(d===null){a=c._read;return}if(!c.push(d))return}}),c._destroy=function(d,g){!d&&u!==null&&(d=new vh),a=null,o=null,s=null,u===null?g(d):(u=g,Wr(r,d),Wr(e,d));},c}});var nt=M((RR,Th)=>{v();m();_();var{ObjectDefineProperties:t0,ObjectGetOwnPropertyDescriptor:At,ObjectKeys:r0,ObjectSetPrototypeOf:Ah}=ce();Th.exports=Ve;var po=di(),Ne=uo();Ah(Ve.prototype,po.prototype);Ah(Ve,po);{let t=r0(Ne.prototype);for(let e=0;e{v();m();_();var{ObjectSetPrototypeOf:Rh,Symbol:i0}=ce();Ch.exports=It;var{ERR_METHOD_NOT_IMPLEMENTED:n0}=Se().codes,yo=nt(),{getHighWaterMark:s0}=sn();Rh(It.prototype,yo.prototype);Rh(It,yo);var bi=i0(\"kCallback\");function It(t){if(!(this instanceof It))return new It(t);let e=t?s0(this,t,\"readableHighWaterMark\",!0):null;e===0&&(t={...t,highWaterMark:null,readableHighWaterMark:e,writableHighWaterMark:t.writableHighWaterMark||0}),yo.call(this,t),this._readableState.sync=!1,this[bi]=null,t&&(typeof t.transform==\"function\"&&(this._transform=t.transform),typeof t.flush==\"function\"&&(this._flush=t.flush)),this.on(\"prefinish\",o0);}function go(t){typeof this._flush==\"function\"&&!this.destroyed?this._flush((e,r)=>{if(e){t?t(e):this.destroy(e);return}r!=null&&this.push(r),this.push(null),t&&t();}):(this.push(null),t&&t());}function o0(){this._final!==go&&go.call(this);}It.prototype._final=go;It.prototype._transform=function(t,e,r){throw new n0(\"_transform()\")};It.prototype._write=function(t,e,r){let i=this._readableState,n=this._writableState,o=i.length;this._transform(t,e,(s,a)=>{if(s){r(s);return}a!=null&&this.push(a),n.ended||o===i.length||i.length{v();m();_();var{ObjectSetPrototypeOf:Bh}=ce();Ph.exports=$r;var wo=bo();Bh($r.prototype,wo.prototype);Bh($r,wo);function $r(t){if(!(this instanceof $r))return new $r(t);wo.call(this,t);}$r.prototype._transform=function(t,e,r){r(null,t);};});var mn=M((iC,Lh)=>{v();m();_();var wi=Ut(),{ArrayIsArray:a0,Promise:l0,SymbolAsyncIterator:u0}=ce(),_n=mt(),{once:f0}=Je(),c0=tr(),Oh=nt(),{aggregateTwoErrors:h0,codes:{ERR_INVALID_ARG_TYPE:Ro,ERR_INVALID_RETURN_VALUE:mo,ERR_MISSING_ARGS:d0,ERR_STREAM_DESTROYED:p0,ERR_STREAM_PREMATURE_CLOSE:g0},AbortError:y0}=Se(),{validateFunction:b0,validateAbortSignal:w0}=fi(),{isIterable:cr,isReadable:vo,isReadableNodeStream:wn,isNodeStream:kh,isTransformStream:Hr,isWebStream:_0,isReadableStream:Eo,isReadableEnded:m0}=tt(),v0=globalThis.AbortController||Hi().AbortController,So,Ao;function xh(t,e,r){let i=!1;t.on(\"close\",()=>{i=!0;});let n=_n(t,{readable:e,writable:r},o=>{i=!o;});return {destroy:o=>{i||(i=!0,c0.destroyer(t,o||new p0(\"pipe\")));},cleanup:n}}function E0(t){return b0(t[t.length-1],\"streams[stream.length - 1]\"),t.pop()}function Io(t){if(cr(t))return t;if(wn(t))return S0(t);throw new Ro(\"val\",[\"Readable\",\"Iterable\",\"AsyncIterable\"],t)}async function*S0(t){Ao||(Ao=di()),yield*Ao.prototype[u0].call(t);}async function bn(t,e,r,{end:i}){let n,o=null,s=c=>{if(c&&(n=c),o){let h=o;o=null,h();}},a=()=>new l0((c,h)=>{n?h(n):o=()=>{n?h(n):c();};});e.on(\"drain\",s);let u=_n(e,{readable:!1},s);try{e.writableNeedDrain&&await a();for await(let c of t)e.write(c)||await a();i&&e.end(),await a(),r();}catch(c){r(n!==c?h0(n,c):c);}finally{u(),e.off(\"drain\",s);}}async function To(t,e,r,{end:i}){Hr(e)&&(e=e.writable);let n=e.getWriter();try{for await(let o of t)await n.ready,n.write(o).catch(()=>{});await n.ready,i&&await n.close(),r();}catch(o){try{await n.abort(o),r(o);}catch(s){r(s);}}}function A0(...t){return Mh(t,f0(E0(t)))}function Mh(t,e,r){if(t.length===1&&a0(t[0])&&(t=t[0]),t.length<2)throw new d0(\"streams\");let i=new v0,n=i.signal,o=r?.signal,s=[];w0(o,\"options.signal\");function a(){y(new y0);}o?.addEventListener(\"abort\",a);let u,c,h=[],d=0;function g(C){y(C,--d===0);}function y(C,R){if(C&&(!u||u.code===\"ERR_STREAM_PREMATURE_CLOSE\")&&(u=C),!(!u&&!R)){for(;h.length;)h.shift()(u);o?.removeEventListener(\"abort\",a),i.abort(),R&&(u||s.forEach(U=>U()),wi.nextTick(e,u,c));}}let w;for(let C=0;C0,W=U||r?.end!==!1,K=C===t.length-1;if(kh(R)){let z=function(Q){Q&&Q.name!==\"AbortError\"&&Q.code!==\"ERR_STREAM_PREMATURE_CLOSE\"&&g(Q);};if(W){let{destroy:Q,cleanup:de}=xh(R,U,N);h.push(Q),vo(R)&&K&&s.push(de);}R.on(\"error\",z),vo(R)&&K&&s.push(()=>{R.removeListener(\"error\",z);});}if(C===0)if(typeof R==\"function\"){if(w=R({signal:n}),!cr(w))throw new mo(\"Iterable, AsyncIterable or Stream\",\"source\",w)}else cr(R)||wn(R)||Hr(R)?w=R:w=Oh.from(R);else if(typeof R==\"function\"){if(Hr(w)){var E;w=Io((E=w)===null||E===void 0?void 0:E.readable);}else w=Io(w);if(w=R(w,{signal:n}),U){if(!cr(w,!0))throw new mo(\"AsyncIterable\",`transform[${C-1}]`,w)}else {var S;So||(So=_o());let z=new So({objectMode:!0}),Q=(S=w)===null||S===void 0?void 0:S.then;if(typeof Q==\"function\")d++,Q.call(w,pe=>{c=pe,pe!=null&&z.write(pe),W&&z.end(),wi.nextTick(g);},pe=>{z.destroy(pe),wi.nextTick(g,pe);});else if(cr(w,!0))d++,bn(w,z,g,{end:W});else if(Eo(w)||Hr(w)){let pe=w.readable||w;d++,bn(pe,z,g,{end:W});}else throw new mo(\"AsyncIterable or Promise\",\"destination\",w);w=z;let{destroy:de,cleanup:Gt}=xh(w,!1,!0);h.push(de),K&&s.push(Gt);}}else if(kh(R)){if(wn(w)){d+=2;let z=I0(w,R,g,{end:W});vo(R)&&K&&s.push(z);}else if(Hr(w)||Eo(w)){let z=w.readable||w;d++,bn(z,R,g,{end:W});}else if(cr(w))d++,bn(w,R,g,{end:W});else throw new Ro(\"val\",[\"Readable\",\"Iterable\",\"AsyncIterable\",\"ReadableStream\",\"TransformStream\"],w);w=R;}else if(_0(R)){if(wn(w))d++,To(Io(w),R,g,{end:W});else if(Eo(w)||cr(w))d++,To(w,R,g,{end:W});else if(Hr(w))d++,To(w.readable,R,g,{end:W});else throw new Ro(\"val\",[\"Readable\",\"Iterable\",\"AsyncIterable\",\"ReadableStream\",\"TransformStream\"],w);w=R;}else w=Oh.from(R);}return (n!=null&&n.aborted||o!=null&&o.aborted)&&wi.nextTick(a),w}function I0(t,e,r,{end:i}){let n=!1;if(e.on(\"close\",()=>{n||r(new g0);}),t.pipe(e,{end:!1}),i){let s=function(){n=!0,e.end();};m0(t)?wi.nextTick(s):t.once(\"end\",s);}else r();return _n(t,{readable:!0,writable:!1},s=>{let a=t._readableState;s&&s.code===\"ERR_STREAM_PREMATURE_CLOSE\"&&a&&a.ended&&!a.errored&&!a.errorEmitted?t.once(\"end\",r).once(\"error\",r):r(s);}),_n(e,{readable:!1,writable:!0},r)}Lh.exports={pipelineImpl:Mh,pipeline:A0};});var Bo=M((dC,Fh)=>{v();m();_();var{pipeline:T0}=mn(),vn=nt(),{destroyer:R0}=tr(),{isNodeStream:En,isReadable:Uh,isWritable:Nh,isWebStream:Co,isTransformStream:hr,isWritableStream:qh,isReadableStream:Dh}=tt(),{AbortError:C0,codes:{ERR_INVALID_ARG_VALUE:jh,ERR_MISSING_ARGS:B0}}=Se(),P0=mt();Fh.exports=function(...e){if(e.length===0)throw new B0(\"streams\");if(e.length===1)return vn.from(e[0]);let r=[...e];if(typeof e[0]==\"function\"&&(e[0]=vn.from(e[0])),typeof e[e.length-1]==\"function\"){let y=e.length-1;e[y]=vn.from(e[y]);}for(let y=0;y0&&!(Nh(e[y])||qh(e[y])||hr(e[y])))throw new jh(`streams[${y}]`,r[y],\"must be writable\")}let i,n,o,s,a;function u(y){let w=s;s=null,w?w(y):y?a.destroy(y):!g&&!d&&a.destroy();}let c=e[0],h=T0(e,u),d=!!(Nh(c)||qh(c)||hr(c)),g=!!(Uh(h)||Dh(h)||hr(h));if(a=new vn({writableObjectMode:!!(c!=null&&c.writableObjectMode),readableObjectMode:!!(h!=null&&h.writableObjectMode),writable:d,readable:g}),d){if(En(c))a._write=function(w,E,S){c.write(w,E)?S():i=S;},a._final=function(w){c.end(),n=w;},c.on(\"drain\",function(){if(i){let w=i;i=null,w();}});else if(Co(c)){let E=(hr(c)?c.writable:c).getWriter();a._write=async function(S,I,C){try{await E.ready,E.write(S).catch(()=>{}),C();}catch(R){C(R);}},a._final=async function(S){try{await E.ready,E.close().catch(()=>{}),n=S;}catch(I){S(I);}};}let y=hr(h)?h.readable:h;P0(y,()=>{if(n){let w=n;n=null,w();}});}if(g){if(En(h))h.on(\"readable\",function(){if(o){let y=o;o=null,y();}}),h.on(\"end\",function(){a.push(null);}),a._read=function(){for(;;){let y=h.read();if(y===null){o=a._read;return}if(!a.push(y))return}};else if(Co(h)){let w=(hr(h)?h.readable:h).getReader();a._read=async function(){for(;;)try{let{value:E,done:S}=await w.read();if(!a.push(E))return;if(S){a.push(null);return}}catch{return}};}}return a._destroy=function(y,w){!y&&s!==null&&(y=new C0),o=null,i=null,n=null,s===null?w(y):(s=w,En(h)&&R0(h,y));},a};});var Qh=M((SC,ko)=>{v();m();_();var Vh=globalThis.AbortController||Hi().AbortController,{codes:{ERR_INVALID_ARG_VALUE:O0,ERR_INVALID_ARG_TYPE:_i,ERR_MISSING_ARGS:k0,ERR_OUT_OF_RANGE:x0},AbortError:st}=Se(),{validateAbortSignal:dr,validateInteger:M0,validateObject:pr}=fi(),L0=ce().Symbol(\"kWeak\"),{finished:U0}=mt(),N0=Bo(),{addAbortSignalNoValidate:q0}=ci(),{isWritable:D0,isNodeStream:j0}=tt(),{ArrayPrototypePush:F0,MathFloor:W0,Number:$0,NumberIsNaN:H0,Promise:Wh,PromiseReject:$h,PromisePrototypeThen:V0,Symbol:zh}=ce(),Sn=zh(\"kEmpty\"),Hh=zh(\"kEof\");function z0(t,e){if(e!=null&&pr(e,\"options\"),e?.signal!=null&&dr(e.signal,\"options.signal\"),j0(t)&&!D0(t))throw new O0(\"stream\",t,\"must be writable\");let r=N0(this,t);return e!=null&&e.signal&&q0(e.signal,r),r}function An(t,e){if(typeof t!=\"function\")throw new _i(\"fn\",[\"Function\",\"AsyncFunction\"],t);e!=null&&pr(e,\"options\"),e?.signal!=null&&dr(e.signal,\"options.signal\");let r=1;return e?.concurrency!=null&&(r=W0(e.concurrency)),M0(r,\"concurrency\",1),async function*(){var n,o;let s=new Vh,a=this,u=[],c=s.signal,h={signal:c},d=()=>s.abort();e!=null&&(n=e.signal)!==null&&n!==void 0&&n.aborted&&d(),e==null||(o=e.signal)===null||o===void 0||o.addEventListener(\"abort\",d);let g,y,w=!1;function E(){w=!0;}async function S(){try{for await(let R of a){var I;if(w)return;if(c.aborted)throw new st;try{R=t(R,h);}catch(U){R=$h(U);}R!==Sn&&(typeof((I=R)===null||I===void 0?void 0:I.catch)==\"function\"&&R.catch(E),u.push(R),g&&(g(),g=null),!w&&u.length&&u.length>=r&&await new Wh(U=>{y=U;}));}u.push(Hh);}catch(R){let U=$h(R);V0(U,void 0,E),u.push(U);}finally{var C;w=!0,g&&(g(),g=null),e==null||(C=e.signal)===null||C===void 0||C.removeEventListener(\"abort\",d);}}S();try{for(;;){for(;u.length>0;){let I=await u[0];if(I===Hh)return;if(c.aborted)throw new st;I!==Sn&&(yield I),u.shift(),y&&(y(),y=null);}await new Wh(I=>{g=I;});}}finally{s.abort(),w=!0,y&&(y(),y=null);}}.call(this)}function K0(t=void 0){return t!=null&&pr(t,\"options\"),t?.signal!=null&&dr(t.signal,\"options.signal\"),async function*(){let r=0;for await(let n of this){var i;if(t!=null&&(i=t.signal)!==null&&i!==void 0&&i.aborted)throw new st({cause:t.signal.reason});yield [r++,n];}}.call(this)}async function Kh(t,e=void 0){for await(let r of Oo.call(this,t,e))return !0;return !1}async function G0(t,e=void 0){if(typeof t!=\"function\")throw new _i(\"fn\",[\"Function\",\"AsyncFunction\"],t);return !await Kh.call(this,async(...r)=>!await t(...r),e)}async function Q0(t,e){for await(let r of Oo.call(this,t,e))return r}async function Y0(t,e){if(typeof t!=\"function\")throw new _i(\"fn\",[\"Function\",\"AsyncFunction\"],t);async function r(i,n){return await t(i,n),Sn}for await(let i of An.call(this,r,e));}function Oo(t,e){if(typeof t!=\"function\")throw new _i(\"fn\",[\"Function\",\"AsyncFunction\"],t);async function r(i,n){return await t(i,n)?i:Sn}return An.call(this,r,e)}var Po=class extends k0{constructor(){super(\"reduce\"),this.message=\"Reduce of an empty stream requires an initial value\";}};async function J0(t,e,r){var i;if(typeof t!=\"function\")throw new _i(\"reducer\",[\"Function\",\"AsyncFunction\"],t);r!=null&&pr(r,\"options\"),r?.signal!=null&&dr(r.signal,\"options.signal\");let n=arguments.length>1;if(r!=null&&(i=r.signal)!==null&&i!==void 0&&i.aborted){let c=new st(void 0,{cause:r.signal.reason});throw this.once(\"error\",()=>{}),await U0(this.destroy(c)),c}let o=new Vh,s=o.signal;if(r!=null&&r.signal){let c={once:!0,[L0]:this};r.signal.addEventListener(\"abort\",()=>o.abort(),c);}let a=!1;try{for await(let c of this){var u;if(a=!0,r!=null&&(u=r.signal)!==null&&u!==void 0&&u.aborted)throw new st;n?e=await t(e,c,{signal:s}):(e=c,n=!0);}if(!a&&!n)throw new Po}finally{o.abort();}return e}async function X0(t){t!=null&&pr(t,\"options\"),t?.signal!=null&&dr(t.signal,\"options.signal\");let e=[];for await(let i of this){var r;if(t!=null&&(r=t.signal)!==null&&r!==void 0&&r.aborted)throw new st(void 0,{cause:t.signal.reason});F0(e,i);}return e}function Z0(t,e){let r=An.call(this,t,e);return async function*(){for await(let n of r)yield*n;}.call(this)}function Gh(t){if(t=$0(t),H0(t))return 0;if(t<0)throw new x0(\"number\",\">= 0\",t);return t}function em(t,e=void 0){return e!=null&&pr(e,\"options\"),e?.signal!=null&&dr(e.signal,\"options.signal\"),t=Gh(t),async function*(){var i;if(e!=null&&(i=e.signal)!==null&&i!==void 0&&i.aborted)throw new st;for await(let o of this){var n;if(e!=null&&(n=e.signal)!==null&&n!==void 0&&n.aborted)throw new st;t--<=0&&(yield o);}}.call(this)}function tm(t,e=void 0){return e!=null&&pr(e,\"options\"),e?.signal!=null&&dr(e.signal,\"options.signal\"),t=Gh(t),async function*(){var i;if(e!=null&&(i=e.signal)!==null&&i!==void 0&&i.aborted)throw new st;for await(let o of this){var n;if(e!=null&&(n=e.signal)!==null&&n!==void 0&&n.aborted)throw new st;if(t-- >0)yield o;else return}}.call(this)}ko.exports.streamReturningOperators={asIndexedPairs:K0,drop:em,filter:Oo,flatMap:Z0,map:An,take:tm,compose:z0};ko.exports.promiseReturningOperators={every:G0,forEach:Y0,reduce:J0,toArray:X0,some:Kh,find:Q0};});var xo=M((xC,Yh)=>{v();m();_();var{ArrayPrototypePop:rm,Promise:im}=ce(),{isIterable:nm,isNodeStream:sm,isWebStream:om}=tt(),{pipelineImpl:am}=mn(),{finished:lm}=mt();Mo();function um(...t){return new im((e,r)=>{let i,n,o=t[t.length-1];if(o&&typeof o==\"object\"&&!sm(o)&&!nm(o)&&!om(o)){let s=rm(t);i=s.signal,n=s.end;}am(t,(s,a)=>{s?r(s):e(a);},{signal:i,end:n});})}Yh.exports={finished:lm,pipeline:um};});var Mo=M(($C,sd)=>{v();m();_();var{Buffer:fm}=(ye(),X(_e)),{ObjectDefineProperty:Tt,ObjectKeys:Zh,ReflectApply:ed}=ce(),{promisify:{custom:td}}=Je(),{streamReturningOperators:Jh,promiseReturningOperators:Xh}=Qh(),{codes:{ERR_ILLEGAL_CONSTRUCTOR:rd}}=Se(),cm=Bo(),{pipeline:id}=mn(),{destroyer:hm}=tr(),nd=mt(),Lo=xo(),Uo=tt(),le=sd.exports=tn().Stream;le.isDisturbed=Uo.isDisturbed;le.isErrored=Uo.isErrored;le.isReadable=Uo.isReadable;le.Readable=di();for(let t of Zh(Jh)){let r=function(...i){if(new.target)throw rd();return le.Readable.from(ed(e,this,i))};let e=Jh[t];Tt(r,\"name\",{__proto__:null,value:e.name}),Tt(r,\"length\",{__proto__:null,value:e.length}),Tt(le.Readable.prototype,t,{__proto__:null,value:r,enumerable:!1,configurable:!0,writable:!0});}for(let t of Zh(Xh)){let r=function(...n){if(new.target)throw rd();return ed(e,this,n)};let e=Xh[t];Tt(r,\"name\",{__proto__:null,value:e.name}),Tt(r,\"length\",{__proto__:null,value:e.length}),Tt(le.Readable.prototype,t,{__proto__:null,value:r,enumerable:!1,configurable:!0,writable:!0});}le.Writable=uo();le.Duplex=nt();le.Transform=bo();le.PassThrough=_o();le.pipeline=id;var{addAbortSignal:dm}=ci();le.addAbortSignal=dm;le.finished=nd;le.destroy=hm;le.compose=cm;Tt(le,\"promises\",{__proto__:null,configurable:!0,enumerable:!0,get(){return Lo}});Tt(id,td,{__proto__:null,enumerable:!0,get(){return Lo.pipeline}});Tt(nd,td,{__proto__:null,enumerable:!0,get(){return Lo.finished}});le.Stream=le;le._isUint8Array=function(e){return e instanceof Uint8Array};le._uint8ArrayToBuffer=function(e){return fm.from(e.buffer,e.byteOffset,e.byteLength)};});var Dt=M((ZC,ue)=>{v();m();_();var he=Mo(),pm=xo(),gm=he.Readable.destroy;ue.exports=he.Readable;ue.exports._uint8ArrayToBuffer=he._uint8ArrayToBuffer;ue.exports._isUint8Array=he._isUint8Array;ue.exports.isDisturbed=he.isDisturbed;ue.exports.isErrored=he.isErrored;ue.exports.isReadable=he.isReadable;ue.exports.Readable=he.Readable;ue.exports.Writable=he.Writable;ue.exports.Duplex=he.Duplex;ue.exports.Transform=he.Transform;ue.exports.PassThrough=he.PassThrough;ue.exports.addAbortSignal=he.addAbortSignal;ue.exports.finished=he.finished;ue.exports.destroy=he.destroy;ue.exports.destroy=gm;ue.exports.pipeline=he.pipeline;ue.exports.compose=he.compose;Object.defineProperty(he,\"promises\",{configurable:!0,enumerable:!0,get(){return pm}});ue.exports.Stream=he.Stream;ue.exports.default=ue.exports;});var od=M((uB,qo)=>{v();m();_();typeof Object.create==\"function\"?qo.exports=function(e,r){r&&(e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}));}:qo.exports=function(e,r){if(r){e.super_=r;var i=function(){};i.prototype=r.prototype,e.prototype=new i,e.prototype.constructor=e;}};});var ud=M((_B,ld)=>{v();m();_();var{Buffer:ze}=(ye(),X(_e)),ad=Symbol.for(\"BufferList\");function ee(t){if(!(this instanceof ee))return new ee(t);ee._init.call(this,t);}ee._init=function(e){Object.defineProperty(this,ad,{value:!0}),this._bufs=[],this.length=0,e&&this.append(e);};ee.prototype._new=function(e){return new ee(e)};ee.prototype._offset=function(e){if(e===0)return [0,0];let r=0;for(let i=0;ithis.length||e<0)return;let r=this._offset(e);return this._bufs[r[0]][r[1]]};ee.prototype.slice=function(e,r){return typeof e==\"number\"&&e<0&&(e+=this.length),typeof r==\"number\"&&r<0&&(r+=this.length),this.copy(null,0,e,r)};ee.prototype.copy=function(e,r,i,n){if((typeof i!=\"number\"||i<0)&&(i=0),(typeof n!=\"number\"||n>this.length)&&(n=this.length),i>=this.length||n<=0)return e||ze.alloc(0);let o=!!e,s=this._offset(i),a=n-i,u=a,c=o&&r||0,h=s[1];if(i===0&&n===this.length){if(!o)return this._bufs.length===1?this._bufs[0]:ze.concat(this._bufs,this.length);for(let d=0;dg)this._bufs[d].copy(e,c,h),c+=g;else {this._bufs[d].copy(e,c,h,h+u),c+=g;break}u-=g,h&&(h=0);}return e.length>c?e.slice(0,c):e};ee.prototype.shallowSlice=function(e,r){if(e=e||0,r=typeof r!=\"number\"?this.length:r,e<0&&(e+=this.length),r<0&&(r+=this.length),e===r)return this._new();let i=this._offset(e),n=this._offset(r),o=this._bufs.slice(i[0],n[0]+1);return n[1]===0?o.pop():o[o.length-1]=o[o.length-1].slice(0,n[1]),i[1]!==0&&(o[0]=o[0].slice(i[1])),this._new(o)};ee.prototype.toString=function(e,r,i){return this.slice(r,i).toString(e)};ee.prototype.consume=function(e){if(e=Math.trunc(e),Number.isNaN(e)||e<=0)return this;for(;this._bufs.length;)if(e>=this._bufs[0].length)e-=this._bufs[0].length,this.length-=this._bufs[0].length,this._bufs.shift();else {this._bufs[0]=this._bufs[0].slice(e),this.length-=e;break}return this};ee.prototype.duplicate=function(){let e=this._new();for(let r=0;rthis.length?this.length:e;let i=this._offset(e),n=i[0],o=i[1];for(;n=t.length){let u=s.indexOf(t,o);if(u!==-1)return this._reverseOffset([n,u]);o=s.length-t.length+1;}else {let u=this._reverseOffset([n,o]);if(this._match(u,t))return u;o++;}o=0;}return -1};ee.prototype._match=function(t,e){if(this.length-t{v();m();_();var Do=Dt().Duplex,ym=od(),mi=ud();function Ee(t){if(!(this instanceof Ee))return new Ee(t);if(typeof t==\"function\"){this._callback=t;let e=function(i){this._callback&&(this._callback(i),this._callback=null);}.bind(this);this.on(\"pipe\",function(i){i.on(\"error\",e);}),this.on(\"unpipe\",function(i){i.removeListener(\"error\",e);}),t=null;}mi._init.call(this,t),Do.call(this);}ym(Ee,Do);Object.assign(Ee.prototype,mi.prototype);Ee.prototype._new=function(e){return new Ee(e)};Ee.prototype._write=function(e,r,i){this._appendBuffer(e),typeof i==\"function\"&&i();};Ee.prototype._read=function(e){if(!this.length)return this.push(null);e=Math.min(e,this.length),this.push(this.slice(0,e)),this.consume(e);};Ee.prototype.end=function(e){Do.prototype.end.call(this,e),this._callback&&(this._callback(null,this.slice()),this._callback=null);};Ee.prototype._destroy=function(e,r){this._bufs.length=0,this.length=0,r(e);};Ee.prototype._isBufferList=function(e){return e instanceof Ee||e instanceof mi||Ee.isBufferList(e)};Ee.isBufferList=mi.isBufferList;In.exports=Ee;In.exports.BufferListStream=Ee;In.exports.BufferList=mi;});var hd=M((DB,cd)=>{v();m();_();var jo=class{constructor(){this.cmd=null,this.retain=!1,this.qos=0,this.dup=!1,this.length=-1,this.topic=null,this.payload=null;}};cd.exports=jo;});var Fo=M((QB,dd)=>{v();m();_();var L=dd.exports,{Buffer:Oe}=(ye(),X(_e));L.types={0:\"reserved\",1:\"connect\",2:\"connack\",3:\"publish\",4:\"puback\",5:\"pubrec\",6:\"pubrel\",7:\"pubcomp\",8:\"subscribe\",9:\"suback\",10:\"unsubscribe\",11:\"unsuback\",12:\"pingreq\",13:\"pingresp\",14:\"disconnect\",15:\"auth\"};L.requiredHeaderFlags={1:0,2:0,4:0,5:0,6:2,7:0,8:2,9:0,10:2,11:0,12:0,13:0,14:0,15:0};L.requiredHeaderFlagsErrors={};for(let t in L.requiredHeaderFlags){let e=L.requiredHeaderFlags[t];L.requiredHeaderFlagsErrors[t]=\"Invalid header flag bits, must be 0x\"+e.toString(16)+\" for \"+L.types[t]+\" packet\";}L.codes={};for(let t in L.types){let e=L.types[t];L.codes[e]=t;}L.CMD_SHIFT=4;L.CMD_MASK=240;L.DUP_MASK=8;L.QOS_MASK=3;L.QOS_SHIFT=1;L.RETAIN_MASK=1;L.VARBYTEINT_MASK=127;L.VARBYTEINT_FIN_MASK=128;L.VARBYTEINT_MAX=268435455;L.SESSIONPRESENT_MASK=1;L.SESSIONPRESENT_HEADER=Oe.from([L.SESSIONPRESENT_MASK]);L.CONNACK_HEADER=Oe.from([L.codes.connack<[0,1].map(r=>[0,1].map(i=>{let n=Oe.alloc(1);return n.writeUInt8(L.codes[t]<Oe.from([t]));L.EMPTY={pingreq:Oe.from([L.codes.pingreq<<4,0]),pingresp:Oe.from([L.codes.pingresp<<4,0]),disconnect:Oe.from([L.codes.disconnect<<4,0])};L.MQTT5_PUBACK_PUBREC_CODES={0:\"Success\",16:\"No matching subscribers\",128:\"Unspecified error\",131:\"Implementation specific error\",135:\"Not authorized\",144:\"Topic Name invalid\",145:\"Packet identifier in use\",151:\"Quota exceeded\",153:\"Payload format invalid\"};L.MQTT5_PUBREL_PUBCOMP_CODES={0:\"Success\",146:\"Packet Identifier not found\"};L.MQTT5_SUBACK_CODES={0:\"Granted QoS 0\",1:\"Granted QoS 1\",2:\"Granted QoS 2\",128:\"Unspecified error\",131:\"Implementation specific error\",135:\"Not authorized\",143:\"Topic Filter invalid\",145:\"Packet Identifier in use\",151:\"Quota exceeded\",158:\"Shared Subscriptions not supported\",161:\"Subscription Identifiers not supported\",162:\"Wildcard Subscriptions not supported\"};L.MQTT5_UNSUBACK_CODES={0:\"Success\",17:\"No subscription existed\",128:\"Unspecified error\",131:\"Implementation specific error\",135:\"Not authorized\",143:\"Topic Filter invalid\",145:\"Packet Identifier in use\"};L.MQTT5_DISCONNECT_CODES={0:\"Normal disconnection\",4:\"Disconnect with Will Message\",128:\"Unspecified error\",129:\"Malformed Packet\",130:\"Protocol Error\",131:\"Implementation specific error\",135:\"Not authorized\",137:\"Server busy\",139:\"Server shutting down\",141:\"Keep Alive timeout\",142:\"Session taken over\",143:\"Topic Filter invalid\",144:\"Topic Name invalid\",147:\"Receive Maximum exceeded\",148:\"Topic Alias invalid\",149:\"Packet too large\",150:\"Message rate too high\",151:\"Quota exceeded\",152:\"Administrative action\",153:\"Payload format invalid\",154:\"Retain not supported\",155:\"QoS not supported\",156:\"Use another server\",157:\"Server moved\",158:\"Shared Subscriptions not supported\",159:\"Connection rate exceeded\",160:\"Maximum connect time\",161:\"Subscription Identifiers not supported\",162:\"Wildcard Subscriptions not supported\"};L.MQTT5_AUTH_CODES={0:\"Success\",24:\"Continue authentication\",25:\"Re-authenticate\"};});var gd=M((sP,pd)=>{v();m();_();var Vr=1e3,zr=Vr*60,Kr=zr*60,gr=Kr*24,bm=gr*7,wm=gr*365.25;pd.exports=function(t,e){e=e||{};var r=typeof t;if(r===\"string\"&&t.length>0)return _m(t);if(r===\"number\"&&isFinite(t))return e.long?vm(t):mm(t);throw new Error(\"val is not a non-empty string or a valid number. val=\"+JSON.stringify(t))};function _m(t){if(t=String(t),!(t.length>100)){var e=/^(-?(?:\\d+)?\\.?\\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(e){var r=parseFloat(e[1]),i=(e[2]||\"ms\").toLowerCase();switch(i){case\"years\":case\"year\":case\"yrs\":case\"yr\":case\"y\":return r*wm;case\"weeks\":case\"week\":case\"w\":return r*bm;case\"days\":case\"day\":case\"d\":return r*gr;case\"hours\":case\"hour\":case\"hrs\":case\"hr\":case\"h\":return r*Kr;case\"minutes\":case\"minute\":case\"mins\":case\"min\":case\"m\":return r*zr;case\"seconds\":case\"second\":case\"secs\":case\"sec\":case\"s\":return r*Vr;case\"milliseconds\":case\"millisecond\":case\"msecs\":case\"msec\":case\"ms\":return r;default:return}}}}function mm(t){var e=Math.abs(t);return e>=gr?Math.round(t/gr)+\"d\":e>=Kr?Math.round(t/Kr)+\"h\":e>=zr?Math.round(t/zr)+\"m\":e>=Vr?Math.round(t/Vr)+\"s\":t+\"ms\"}function vm(t){var e=Math.abs(t);return e>=gr?Tn(t,e,gr,\"day\"):e>=Kr?Tn(t,e,Kr,\"hour\"):e>=zr?Tn(t,e,zr,\"minute\"):e>=Vr?Tn(t,e,Vr,\"second\"):t+\" ms\"}function Tn(t,e,r,i){var n=e>=r*1.5;return Math.round(t/r)+\" \"+i+(n?\"s\":\"\")}});var bd=M((gP,yd)=>{v();m();_();function Em(t){r.debug=r,r.default=r,r.coerce=u,r.disable=o,r.enable=n,r.enabled=s,r.humanize=gd(),r.destroy=c,Object.keys(t).forEach(h=>{r[h]=t[h];}),r.names=[],r.skips=[],r.formatters={};function e(h){let d=0;for(let g=0;g{if(W===\"%%\")return \"%\";U++;let z=r.formatters[K];if(typeof z==\"function\"){let Q=S[U];W=z.call(I,Q),S.splice(U,1),U--;}return W}),r.formatArgs.call(I,S),(I.log||r.log).apply(I,S);}return E.namespace=h,E.useColors=r.useColors(),E.color=r.selectColor(h),E.extend=i,E.destroy=r.destroy,Object.defineProperty(E,\"enabled\",{enumerable:!0,configurable:!1,get:()=>g!==null?g:(y!==r.namespaces&&(y=r.namespaces,w=r.enabled(h)),w),set:S=>{g=S;}}),typeof r.init==\"function\"&&r.init(E),E}function i(h,d){let g=r(this.namespace+(typeof d>\"u\"?\":\":d)+h);return g.log=this.log,g}function n(h){r.save(h),r.namespaces=h,r.names=[],r.skips=[];let d,g=(typeof h==\"string\"?h:\"\").split(/[\\s,]+/),y=g.length;for(d=0;d\"-\"+d)].join(\",\");return r.enable(\"\"),h}function s(h){if(h[h.length-1]===\"*\")return !0;let d,g;for(d=0,g=r.skips.length;d{v();m();_();xe.formatArgs=Am;xe.save=Im;xe.load=Tm;xe.useColors=Sm;xe.storage=Rm();xe.destroy=(()=>{let t=!1;return ()=>{t||(t=!0,console.warn(\"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.\"));}})();xe.colors=[\"#0000CC\",\"#0000FF\",\"#0033CC\",\"#0033FF\",\"#0066CC\",\"#0066FF\",\"#0099CC\",\"#0099FF\",\"#00CC00\",\"#00CC33\",\"#00CC66\",\"#00CC99\",\"#00CCCC\",\"#00CCFF\",\"#3300CC\",\"#3300FF\",\"#3333CC\",\"#3333FF\",\"#3366CC\",\"#3366FF\",\"#3399CC\",\"#3399FF\",\"#33CC00\",\"#33CC33\",\"#33CC66\",\"#33CC99\",\"#33CCCC\",\"#33CCFF\",\"#6600CC\",\"#6600FF\",\"#6633CC\",\"#6633FF\",\"#66CC00\",\"#66CC33\",\"#9900CC\",\"#9900FF\",\"#9933CC\",\"#9933FF\",\"#99CC00\",\"#99CC33\",\"#CC0000\",\"#CC0033\",\"#CC0066\",\"#CC0099\",\"#CC00CC\",\"#CC00FF\",\"#CC3300\",\"#CC3333\",\"#CC3366\",\"#CC3399\",\"#CC33CC\",\"#CC33FF\",\"#CC6600\",\"#CC6633\",\"#CC9900\",\"#CC9933\",\"#CCCC00\",\"#CCCC33\",\"#FF0000\",\"#FF0033\",\"#FF0066\",\"#FF0099\",\"#FF00CC\",\"#FF00FF\",\"#FF3300\",\"#FF3333\",\"#FF3366\",\"#FF3399\",\"#FF33CC\",\"#FF33FF\",\"#FF6600\",\"#FF6633\",\"#FF9900\",\"#FF9933\",\"#FFCC00\",\"#FFCC33\"];function Sm(){return typeof window<\"u\"&&window.process&&(window.process.type===\"renderer\"||window.process.__nwjs)?!0:typeof B<\"u\"&&B.userAgent&&B.userAgent.toLowerCase().match(/(edge|trident)\\/(\\d+)/)?!1:typeof document<\"u\"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<\"u\"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof B<\"u\"&&B.userAgent&&B.userAgent.toLowerCase().match(/firefox\\/(\\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof B<\"u\"&&B.userAgent&&B.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/)}function Am(t){if(t[0]=(this.useColors?\"%c\":\"\")+this.namespace+(this.useColors?\" %c\":\" \")+t[0]+(this.useColors?\"%c \":\" \")+\"+\"+Rn.exports.humanize(this.diff),!this.useColors)return;let e=\"color: \"+this.color;t.splice(1,0,e,\"color: inherit\");let r=0,i=0;t[0].replace(/%[a-zA-Z%]/g,n=>{n!==\"%%\"&&(r++,n===\"%c\"&&(i=r));}),t.splice(i,0,e);}xe.log=console.debug||console.log||(()=>{});function Im(t){try{t?xe.storage.setItem(\"debug\",t):xe.storage.removeItem(\"debug\");}catch{}}function Tm(){let t;try{t=xe.storage.getItem(\"debug\");}catch{}return !t&&typeof P<\"u\"&&\"env\"in P&&(t=P.env.DEBUG),t}function Rm(){try{return localStorage}catch{}}Rn.exports=bd()(xe);var{formatters:Cm}=Rn.exports;Cm.j=function(t){try{return JSON.stringify(t)}catch(e){return \"[UnexpectedJSONParseError]: \"+e.message}};});var md=M((MP,_d)=>{v();m();_();var Bm=fd(),{EventEmitter:Pm}=(ir(),X(rr)),wd=hd(),V=Fo(),D=ot()(\"mqtt-packet:parser\"),Wo=class t extends Pm{constructor(){super(),this.parser=this.constructor.parser;}static parser(e){return this instanceof t?(this.settings=e||{},this._states=[\"_parseHeader\",\"_parseLength\",\"_parsePayload\",\"_newPacket\"],this._resetState(),this):new t().parser(e)}_resetState(){D(\"_resetState: resetting packet, error, _list, and _stateCounter\"),this.packet=new wd,this.error=null,this._list=Bm(),this._stateCounter=0;}parse(e){for(this.error&&this._resetState(),this._list.append(e),D(\"parse: current state: %s\",this._states[this._stateCounter]);(this.packet.length!==-1||this._list.length>0)&&this[this._states[this._stateCounter]]()&&!this.error;)this._stateCounter++,D(\"parse: state complete. _stateCounter is now: %d\",this._stateCounter),D(\"parse: packet.length: %d, buffer list length: %d\",this.packet.length,this._list.length),this._stateCounter>=this._states.length&&(this._stateCounter=0);return D(\"parse: exited while loop. packet: %d, buffer list length: %d\",this.packet.length,this._list.length),this._list.length}_parseHeader(){let e=this._list.readUInt8(0),r=e>>V.CMD_SHIFT;this.packet.cmd=V.types[r];let i=e&15,n=V.requiredHeaderFlags[r];return n!=null&&i!==n?this._emitError(new Error(V.requiredHeaderFlagsErrors[r])):(this.packet.retain=(e&V.RETAIN_MASK)!==0,this.packet.qos=e>>V.QOS_SHIFT&V.QOS_MASK,this.packet.qos>2?this._emitError(new Error(\"Packet must not have both QoS bits set to 1\")):(this.packet.dup=(e&V.DUP_MASK)!==0,D(\"_parseHeader: packet: %o\",this.packet),this._list.consume(1),!0))}_parseLength(){let e=this._parseVarByteNum(!0);return e&&(this.packet.length=e.value,this._list.consume(e.bytes)),D(\"_parseLength %d\",e.value),!!e}_parsePayload(){D(\"_parsePayload: payload %O\",this._list);let e=!1;if(this.packet.length===0||this._list.length>=this.packet.length){switch(this._pos=0,this.packet.cmd){case\"connect\":this._parseConnect();break;case\"connack\":this._parseConnack();break;case\"publish\":this._parsePublish();break;case\"puback\":case\"pubrec\":case\"pubrel\":case\"pubcomp\":this._parseConfirmation();break;case\"subscribe\":this._parseSubscribe();break;case\"suback\":this._parseSuback();break;case\"unsubscribe\":this._parseUnsubscribe();break;case\"unsuback\":this._parseUnsuback();break;case\"pingreq\":case\"pingresp\":break;case\"disconnect\":this._parseDisconnect();break;case\"auth\":this._parseAuth();break;default:this._emitError(new Error(\"Not supported\"));}e=!0;}return D(\"_parsePayload complete result: %s\",e),e}_parseConnect(){D(\"_parseConnect\");let e,r,i,n,o={},s=this.packet,a=this._parseString();if(a===null)return this._emitError(new Error(\"Cannot parse protocolId\"));if(a!==\"MQTT\"&&a!==\"MQIsdp\")return this._emitError(new Error(\"Invalid protocolId\"));if(s.protocolId=a,this._pos>=this._list.length)return this._emitError(new Error(\"Packet too short\"));if(s.protocolVersion=this._list.readUInt8(this._pos),s.protocolVersion>=128&&(s.bridgeMode=!0,s.protocolVersion=s.protocolVersion-128),s.protocolVersion!==3&&s.protocolVersion!==4&&s.protocolVersion!==5)return this._emitError(new Error(\"Invalid protocol version\"));if(this._pos++,this._pos>=this._list.length)return this._emitError(new Error(\"Packet too short\"));if(this._list.readUInt8(this._pos)&1)return this._emitError(new Error(\"Connect flag bit 0 must be 0, but got 1\"));o.username=this._list.readUInt8(this._pos)&V.USERNAME_MASK,o.password=this._list.readUInt8(this._pos)&V.PASSWORD_MASK,o.will=this._list.readUInt8(this._pos)&V.WILL_FLAG_MASK;let u=!!(this._list.readUInt8(this._pos)&V.WILL_RETAIN_MASK),c=(this._list.readUInt8(this._pos)&V.WILL_QOS_MASK)>>V.WILL_QOS_SHIFT;if(o.will)s.will={},s.will.retain=u,s.will.qos=c;else {if(u)return this._emitError(new Error(\"Will Retain Flag must be set to zero when Will Flag is set to 0\"));if(c)return this._emitError(new Error(\"Will QoS must be set to zero when Will Flag is set to 0\"))}if(s.clean=(this._list.readUInt8(this._pos)&V.CLEAN_SESSION_MASK)!==0,this._pos++,s.keepalive=this._parseNum(),s.keepalive===-1)return this._emitError(new Error(\"Packet too short\"));if(s.protocolVersion===5){let d=this._parseProperties();Object.getOwnPropertyNames(d).length&&(s.properties=d);}let h=this._parseString();if(h===null)return this._emitError(new Error(\"Packet too short\"));if(s.clientId=h,D(\"_parseConnect: packet.clientId: %s\",s.clientId),o.will){if(s.protocolVersion===5){let d=this._parseProperties();Object.getOwnPropertyNames(d).length&&(s.will.properties=d);}if(e=this._parseString(),e===null)return this._emitError(new Error(\"Cannot parse will topic\"));if(s.will.topic=e,D(\"_parseConnect: packet.will.topic: %s\",s.will.topic),r=this._parseBuffer(),r===null)return this._emitError(new Error(\"Cannot parse will payload\"));s.will.payload=r,D(\"_parseConnect: packet.will.paylaod: %s\",s.will.payload);}if(o.username){if(n=this._parseString(),n===null)return this._emitError(new Error(\"Cannot parse username\"));s.username=n,D(\"_parseConnect: packet.username: %s\",s.username);}if(o.password){if(i=this._parseBuffer(),i===null)return this._emitError(new Error(\"Cannot parse password\"));s.password=i;}return this.settings=s,D(\"_parseConnect: complete\"),s}_parseConnack(){D(\"_parseConnack\");let e=this.packet;if(this._list.length<1)return null;let r=this._list.readUInt8(this._pos++);if(r>1)return this._emitError(new Error(\"Invalid connack flags, bits 7-1 must be set to 0\"));if(e.sessionPresent=!!(r&V.SESSIONPRESENT_MASK),this.settings.protocolVersion===5)this._list.length>=2?e.reasonCode=this._list.readUInt8(this._pos++):e.reasonCode=0;else {if(this._list.length<2)return null;e.returnCode=this._list.readUInt8(this._pos++);}if(e.returnCode===-1||e.reasonCode===-1)return this._emitError(new Error(\"Cannot parse return code\"));if(this.settings.protocolVersion===5){let i=this._parseProperties();Object.getOwnPropertyNames(i).length&&(e.properties=i);}D(\"_parseConnack: complete\");}_parsePublish(){D(\"_parsePublish\");let e=this.packet;if(e.topic=this._parseString(),e.topic===null)return this._emitError(new Error(\"Cannot parse topic\"));if(!(e.qos>0&&!this._parseMessageId())){if(this.settings.protocolVersion===5){let r=this._parseProperties();Object.getOwnPropertyNames(r).length&&(e.properties=r);}e.payload=this._list.slice(this._pos,e.length),D(\"_parsePublish: payload from buffer list: %o\",e.payload);}}_parseSubscribe(){D(\"_parseSubscribe\");let e=this.packet,r,i,n,o,s,a,u;if(e.subscriptions=[],!!this._parseMessageId()){if(this.settings.protocolVersion===5){let c=this._parseProperties();Object.getOwnPropertyNames(c).length&&(e.properties=c);}if(e.length<=0)return this._emitError(new Error(\"Malformed subscribe, no payload specified\"));for(;this._pos=e.length)return this._emitError(new Error(\"Malformed Subscribe Payload\"));if(i=this._parseByte(),this.settings.protocolVersion===5){if(i&192)return this._emitError(new Error(\"Invalid subscribe topic flag bits, bits 7-6 must be 0\"))}else if(i&252)return this._emitError(new Error(\"Invalid subscribe topic flag bits, bits 7-2 must be 0\"));if(n=i&V.SUBSCRIBE_OPTIONS_QOS_MASK,n>2)return this._emitError(new Error(\"Invalid subscribe QoS, must be <= 2\"));if(a=(i>>V.SUBSCRIBE_OPTIONS_NL_SHIFT&V.SUBSCRIBE_OPTIONS_NL_MASK)!==0,s=(i>>V.SUBSCRIBE_OPTIONS_RAP_SHIFT&V.SUBSCRIBE_OPTIONS_RAP_MASK)!==0,o=i>>V.SUBSCRIBE_OPTIONS_RH_SHIFT&V.SUBSCRIBE_OPTIONS_RH_MASK,o>2)return this._emitError(new Error(\"Invalid retain handling, must be <= 2\"));u={topic:r,qos:n},this.settings.protocolVersion===5?(u.nl=a,u.rap=s,u.rh=o):this.settings.bridgeMode&&(u.rh=0,u.rap=!0,u.nl=!0),D(\"_parseSubscribe: push subscription `%s` to subscription\",u),e.subscriptions.push(u);}}}_parseSuback(){D(\"_parseSuback\");let e=this.packet;if(this.packet.granted=[],!!this._parseMessageId()){if(this.settings.protocolVersion===5){let r=this._parseProperties();Object.getOwnPropertyNames(r).length&&(e.properties=r);}if(e.length<=0)return this._emitError(new Error(\"Malformed suback, no payload specified\"));for(;this._pos2&&r!==128)return this._emitError(new Error(\"Invalid suback QoS, must be 0, 1, 2 or 128\"));this.packet.granted.push(r);}}}_parseUnsubscribe(){D(\"_parseUnsubscribe\");let e=this.packet;if(e.unsubscriptions=[],!!this._parseMessageId()){if(this.settings.protocolVersion===5){let r=this._parseProperties();Object.getOwnPropertyNames(r).length&&(e.properties=r);}if(e.length<=0)return this._emitError(new Error(\"Malformed unsubscribe, no payload specified\"));for(;this._pos2){switch(e.reasonCode=this._parseByte(),this.packet.cmd){case\"puback\":case\"pubrec\":if(!V.MQTT5_PUBACK_PUBREC_CODES[e.reasonCode])return this._emitError(new Error(\"Invalid \"+this.packet.cmd+\" reason code\"));break;case\"pubrel\":case\"pubcomp\":if(!V.MQTT5_PUBREL_PUBCOMP_CODES[e.reasonCode])return this._emitError(new Error(\"Invalid \"+this.packet.cmd+\" reason code\"));break}D(\"_parseConfirmation: packet.reasonCode `%d`\",e.reasonCode);}else e.reasonCode=0;if(e.length>3){let r=this._parseProperties();Object.getOwnPropertyNames(r).length&&(e.properties=r);}}return !0}_parseDisconnect(){let e=this.packet;if(D(\"_parseDisconnect\"),this.settings.protocolVersion===5){this._list.length>0?(e.reasonCode=this._parseByte(),V.MQTT5_DISCONNECT_CODES[e.reasonCode]||this._emitError(new Error(\"Invalid disconnect reason code\"))):e.reasonCode=0;let r=this._parseProperties();Object.getOwnPropertyNames(r).length&&(e.properties=r);}return D(\"_parseDisconnect result: true\"),!0}_parseAuth(){D(\"_parseAuth\");let e=this.packet;if(this.settings.protocolVersion!==5)return this._emitError(new Error(\"Not supported auth packet for this version MQTT\"));if(e.reasonCode=this._parseByte(),!V.MQTT5_AUTH_CODES[e.reasonCode])return this._emitError(new Error(\"Invalid auth reason code\"));let r=this._parseProperties();return Object.getOwnPropertyNames(r).length&&(e.properties=r),D(\"_parseAuth: result: true\"),!0}_parseMessageId(){let e=this.packet;return e.messageId=this._parseNum(),e.messageId===null?(this._emitError(new Error(\"Cannot parse messageId\")),!1):(D(\"_parseMessageId: packet.messageId %d\",e.messageId),!0)}_parseString(e){let r=this._parseNum(),i=r+this._pos;if(r===-1||i>this._list.length||i>this.packet.length)return null;let n=this._list.toString(\"utf8\",this._pos,i);return this._pos+=r,D(\"_parseString: result: %s\",n),n}_parseStringPair(){return D(\"_parseStringPair\"),{name:this._parseString(),value:this._parseString()}}_parseBuffer(){let e=this._parseNum(),r=e+this._pos;if(e===-1||r>this._list.length||r>this.packet.length)return null;let i=this._list.slice(this._pos,r);return this._pos+=e,D(\"_parseBuffer: result: %o\",i),i}_parseNum(){if(this._list.length-this._pos<2)return -1;let e=this._list.readUInt16BE(this._pos);return this._pos+=2,D(\"_parseNum: result: %s\",e),e}_parse4ByteNum(){if(this._list.length-this._pos<4)return -1;let e=this._list.readUInt32BE(this._pos);return this._pos+=4,D(\"_parse4ByteNum: result: %s\",e),e}_parseVarByteNum(e){D(\"_parseVarByteNum\");let r=4,i=0,n=1,o=0,s=!1,a,u=this._pos?this._pos:0;for(;i=i&&this._emitError(new Error(\"Invalid variable byte integer\")),u&&(this._pos+=i),s?e?s={bytes:i,value:o}:s=o:s=!1,D(\"_parseVarByteNum: result: %o\",s),s}_parseByte(){let e;return this._pos{v();m();_();var{Buffer:vi}=(ye(),X(_e)),Om=65536,vd={},km=vi.isBuffer(vi.from([1,2]).subarray(0,1));function Ed(t){let e=vi.allocUnsafe(2);return e.writeUInt8(t>>8,0),e.writeUInt8(t&255,0+1),e}function xm(){for(let t=0;t0&&(r=r|128),n.writeUInt8(r,i++);while(t>0&&i<4);return t>0&&(i=0),km?n.subarray(0,i):n.slice(0,i)}function Lm(t){let e=vi.allocUnsafe(4);return e.writeUInt32BE(t,0),e}Sd.exports={cache:vd,generateCache:xm,generateNumber:Ed,genBufVariableByteInt:Mm,generate4ByteBuffer:Lm};});var Id=M((eO,$o)=>{v();m();_();typeof P>\"u\"||!P.version||P.version.indexOf(\"v0.\")===0||P.version.indexOf(\"v1.\")===0&&P.version.indexOf(\"v1.8.\")!==0?$o.exports={nextTick:Um}:$o.exports=P;function Um(t,e,r,i){if(typeof t!=\"function\")throw new TypeError('\"callback\" argument must be a function');var n=arguments.length,o,s;switch(n){case 0:case 1:return P.nextTick(t);case 2:return P.nextTick(function(){t.call(null,e);});case 3:return P.nextTick(function(){t.call(null,e,r);});case 4:return P.nextTick(function(){t.call(null,e,r,i);});default:for(o=new Array(n-1),s=0;s{v();m();_();var j=Fo(),{Buffer:q}=(ye(),X(_e)),Nm=q.allocUnsafe(0),qm=q.from([0]),Ei=Ad(),Dm=Id().nextTick,qe=ot()(\"mqtt-packet:writeToStream\"),Cn=Ei.cache,jm=Ei.generateNumber,Fm=Ei.generateCache,Ho=Ei.genBufVariableByteInt,Wm=Ei.generate4ByteBuffer,Ie=Vo,Bn=!0;function Od(t,e,r){switch(qe(\"generate called\"),e.cork&&(e.cork(),Dm($m,e)),Bn&&(Bn=!1,Fm()),qe(\"generate: packet.cmd: %s\",t.cmd),t.cmd){case\"connect\":return Hm(t,e);case\"connack\":return Vm(t,e,r);case\"publish\":return zm(t,e,r);case\"puback\":case\"pubrec\":case\"pubrel\":case\"pubcomp\":return Km(t,e,r);case\"subscribe\":return Gm(t,e,r);case\"suback\":return Qm(t,e,r);case\"unsubscribe\":return Ym(t,e,r);case\"unsuback\":return Jm(t,e,r);case\"pingreq\":case\"pingresp\":return Xm(t,e);case\"disconnect\":return Zm(t,e,r);case\"auth\":return e1(t,e,r);default:return e.destroy(new Error(\"Unknown command\")),!1}}Object.defineProperty(Od,\"cacheNumbers\",{get(){return Ie===Vo},set(t){t?((!Cn||Object.keys(Cn).length===0)&&(Bn=!0),Ie=Vo):(Bn=!1,Ie=t1);}});function $m(t){t.uncork();}function Hm(t,e,r){let i=t||{},n=i.protocolId||\"MQTT\",o=i.protocolVersion||4,s=i.will,a=i.clean,u=i.keepalive||0,c=i.clientId||\"\",h=i.username,d=i.password,g=i.properties;a===void 0&&(a=!0);let y=0;if(!n||typeof n!=\"string\"&&!q.isBuffer(n))return e.destroy(new Error(\"Invalid protocolId\")),!1;if(y+=n.length+2,o!==3&&o!==4&&o!==5)return e.destroy(new Error(\"Invalid protocol version\")),!1;if(y+=1,(typeof c==\"string\"||q.isBuffer(c))&&(c||o>=4)&&(c||a))y+=q.byteLength(c)+2;else {if(o<4)return e.destroy(new Error(\"clientId must be supplied before 3.1.1\")),!1;if(a*1===0)return e.destroy(new Error(\"clientId must be given if cleanSession set to 0\")),!1}if(typeof u!=\"number\"||u<0||u>65535||u%1!==0)return e.destroy(new Error(\"Invalid keepalive\")),!1;y+=2,y+=1;let w,E;if(o===5){if(w=Ft(e,g),!w)return !1;y+=w.length;}if(s){if(typeof s!=\"object\")return e.destroy(new Error(\"Invalid will\")),!1;if(!s.topic||typeof s.topic!=\"string\")return e.destroy(new Error(\"Invalid will topic\")),!1;if(y+=q.byteLength(s.topic)+2,y+=2,s.payload)if(s.payload.length>=0)typeof s.payload==\"string\"?y+=q.byteLength(s.payload):y+=s.payload.length;else return e.destroy(new Error(\"Invalid will payload\")),!1;if(E={},o===5){if(E=Ft(e,s.properties),!E)return !1;y+=E.length;}}let S=!1;if(h!=null)if(Pd(h))S=!0,y+=q.byteLength(h)+2;else return e.destroy(new Error(\"Invalid username\")),!1;if(d!=null){if(!S)return e.destroy(new Error(\"Username is required to use password\")),!1;if(Pd(d))y+=kd(d)+2;else return e.destroy(new Error(\"Invalid password\")),!1}e.write(j.CONNECT_HEADER),De(e,y),Gr(e,n),i.bridgeMode&&(o+=128),e.write(o===131?j.VERSION131:o===132?j.VERSION132:o===4?j.VERSION4:o===5?j.VERSION5:j.VERSION3);let I=0;return I|=h!=null?j.USERNAME_MASK:0,I|=d!=null?j.PASSWORD_MASK:0,I|=s&&s.retain?j.WILL_RETAIN_MASK:0,I|=s&&s.qos?s.qos<0&&Ie(e,c),g?.write(),qe(\"publish: payload: %o\",u),e.write(u)}function Km(t,e,r){let i=r?r.protocolVersion:4,n=t||{},o=n.cmd||\"puback\",s=n.messageId,a=n.dup&&o===\"pubrel\"?j.DUP_MASK:0,u=0,c=n.reasonCode,h=n.properties,d=i===5?3:2;if(o===\"pubrel\"&&(u=1),typeof s!=\"number\")return e.destroy(new Error(\"Invalid messageId\")),!1;let g=null;if(i===5&&typeof h==\"object\"){if(g=Si(e,h,r,d),!g)return !1;d+=g.length;}return e.write(j.ACKS[o][u][a][0]),d===3&&(d+=c!==0?1:-1),De(e,d),Ie(e,s),i===5&&d!==2&&e.write(q.from([c])),g!==null?g.write():d===4&&e.write(q.from([0])),!0}function Gm(t,e,r){qe(\"subscribe: packet: \");let i=r?r.protocolVersion:4,n=t||{},o=n.dup?j.DUP_MASK:0,s=n.messageId,a=n.subscriptions,u=n.properties,c=0;if(typeof s!=\"number\")return e.destroy(new Error(\"Invalid messageId\")),!1;c+=2;let h=null;if(i===5){if(h=Ft(e,u),!h)return !1;c+=h.length;}if(typeof a==\"object\"&&a.length)for(let g=0;g2)return e.destroy(new Error(\"Invalid subscriptions - invalid Retain Handling\")),!1}c+=q.byteLength(y)+2+1;}else return e.destroy(new Error(\"Invalid subscriptions\")),!1;qe(\"subscribe: writing to stream: %o\",j.SUBSCRIBE_HEADER),e.write(j.SUBSCRIBE_HEADER[1][o?1:0][0]),De(e,c),Ie(e,s),h!==null&&h.write();let d=!0;for(let g of a){let y=g.topic,w=g.qos,E=+g.nl,S=+g.rap,I=g.rh,C;yr(e,y),C=j.SUBSCRIBE_OPTIONS_QOS[w],i===5&&(C|=E?j.SUBSCRIBE_OPTIONS_NL:0,C|=S?j.SUBSCRIBE_OPTIONS_RAP:0,C|=I?j.SUBSCRIBE_OPTIONS_RH[I]:0),d=e.write(q.from([C]));}return d}function Qm(t,e,r){let i=r?r.protocolVersion:4,n=t||{},o=n.messageId,s=n.granted,a=n.properties,u=0;if(typeof o!=\"number\")return e.destroy(new Error(\"Invalid messageId\")),!1;if(u+=2,typeof s==\"object\"&&s.length)for(let h=0;hj.VARBYTEINT_MAX)return t.destroy(new Error(`Invalid variable byte integer: ${e}`)),!1;let r=Td[e];return r||(r=Ho(e),e<16384&&(Td[e]=r)),qe(\"writeVarByteInt: writing to stream: %o\",r),t.write(r)}function yr(t,e){let r=q.byteLength(e);return Ie(t,r),qe(\"writeString: %s\",e),t.write(e,\"utf8\")}function Rd(t,e,r){yr(t,e),yr(t,r);}function Vo(t,e){return qe(\"writeNumberCached: number: %d\",e),qe(\"writeNumberCached: %o\",Cn[e]),t.write(Cn[e])}function t1(t,e){let r=jm(e);return qe(\"writeNumberGenerated: %o\",r),t.write(r)}function r1(t,e){let r=Wm(e);return qe(\"write4ByteNumber: %o\",r),t.write(r)}function Gr(t,e){typeof e==\"string\"?yr(t,e):e?(Ie(t,e.length),t.write(e)):Ie(t,0);}function Ft(t,e){if(typeof e!=\"object\"||e.length!=null)return {length:1,write(){Bd(t,{},0);}};let r=0;function i(o,s){let a=j.propertiesTypes[o],u=0;switch(a){case\"byte\":{if(typeof s!=\"boolean\")return t.destroy(new Error(`Invalid ${o}: ${s}`)),!1;u+=1+1;break}case\"int8\":{if(typeof s!=\"number\"||s<0||s>255)return t.destroy(new Error(`Invalid ${o}: ${s}`)),!1;u+=1+1;break}case\"binary\":{if(s&&s===null)return t.destroy(new Error(`Invalid ${o}: ${s}`)),!1;u+=1+q.byteLength(s)+2;break}case\"int16\":{if(typeof s!=\"number\"||s<0||s>65535)return t.destroy(new Error(`Invalid ${o}: ${s}`)),!1;u+=1+2;break}case\"int32\":{if(typeof s!=\"number\"||s<0||s>4294967295)return t.destroy(new Error(`Invalid ${o}: ${s}`)),!1;u+=1+4;break}case\"var\":{if(typeof s!=\"number\"||s<0||s>268435455)return t.destroy(new Error(`Invalid ${o}: ${s}`)),!1;u+=1+q.byteLength(Ho(s));break}case\"string\":{if(typeof s!=\"string\")return t.destroy(new Error(`Invalid ${o}: ${s}`)),!1;u+=1+2+q.byteLength(s.toString());break}case\"pair\":{if(typeof s!=\"object\")return t.destroy(new Error(`Invalid ${o}: ${s}`)),!1;u+=Object.getOwnPropertyNames(s).reduce((c,h)=>{let d=s[h];return Array.isArray(d)?c+=d.reduce((g,y)=>(g+=1+2+q.byteLength(h.toString())+2+q.byteLength(y.toString()),g),0):c+=1+2+q.byteLength(h.toString())+2+q.byteLength(s[h].toString()),c},0);break}default:return t.destroy(new Error(`Invalid property ${o}: ${s}`)),!1}return u}if(e)for(let o in e){let s=0,a=0,u=e[o];if(Array.isArray(u))for(let c=0;co;){let a=n.shift();if(a&&e[a])delete e[a],s=Ft(t,e);else return !1}return s}function Cd(t,e,r){switch(j.propertiesTypes[e]){case\"byte\":{t.write(q.from([j.properties[e]])),t.write(q.from([+r]));break}case\"int8\":{t.write(q.from([j.properties[e]])),t.write(q.from([r]));break}case\"binary\":{t.write(q.from([j.properties[e]])),Gr(t,r);break}case\"int16\":{t.write(q.from([j.properties[e]])),Ie(t,r);break}case\"int32\":{t.write(q.from([j.properties[e]])),r1(t,r);break}case\"var\":{t.write(q.from([j.properties[e]])),De(t,r);break}case\"string\":{t.write(q.from([j.properties[e]])),yr(t,r);break}case\"pair\":{Object.getOwnPropertyNames(r).forEach(n=>{let o=r[n];Array.isArray(o)?o.forEach(s=>{t.write(q.from([j.properties[e]])),Rd(t,n.toString(),s.toString());}):(t.write(q.from([j.properties[e]])),Rd(t,n.toString(),o.toString()));});break}default:return t.destroy(new Error(`Invalid property ${e} value: ${r}`)),!1}}function Bd(t,e,r){De(t,r);for(let i in e)if(Object.prototype.hasOwnProperty.call(e,i)&&e[i]!==null){let n=e[i];if(Array.isArray(n))for(let o=0;o{v();m();_();var i1=zo(),{EventEmitter:n1}=(ir(),X(rr)),{Buffer:Md}=(ye(),X(_e));function s1(t,e){let r=new Ko;return i1(t,r,e),r.concat()}var Ko=class extends n1{constructor(){super(),this._array=new Array(20),this._i=0;}write(e){return this._array[this._i++]=e,!0}concat(){let e=0,r=new Array(this._array.length),i=this._array,n=0,o;for(o=0;o{v();m();_();Pn.parser=md().parser;Pn.generate=Ud();Pn.writeToStream=zo();});var Yo=M(Qo=>{v();m();_();Object.defineProperty(Qo,\"__esModule\",{value:!0});var Go=class{constructor(){this.nextId=Math.max(1,Math.floor(Math.random()*65535));}allocate(){let e=this.nextId++;return this.nextId===65536&&(this.nextId=1),e}getLastAllocated(){return this.nextId===1?65535:this.nextId-1}register(e){return !0}deallocate(e){}clear(){}};Qo.default=Go;});var Dd=M((YO,qd)=>{v();m();_();qd.exports=o1;function Qr(t){return t instanceof x?x.from(t):new t.constructor(t.buffer.slice(),t.byteOffset,t.length)}function o1(t){if(t=t||{},t.circles)return a1(t);return t.proto?i:r;function e(n,o){for(var s=Object.keys(n),a=new Array(s.length),u=0;u{v();m();_();jd.exports=Dd()();});var $d=M(Yr=>{v();m();_();Object.defineProperty(Yr,\"__esModule\",{value:!0});Yr.validateTopics=Yr.validateTopic=void 0;function Wd(t){let e=t.split(\"/\");for(let r=0;r{v();m();_();Object.defineProperty(Xo,\"__esModule\",{value:!0});var u1=Dt(),f1={objectMode:!0},c1={clean:!0},Jo=class{constructor(e){this.options=e||{},this.options=Object.assign(Object.assign({},c1),e),this._inflights=new Map;}put(e,r){return this._inflights.set(e.messageId,e),r&&r(),this}createStream(){let e=new u1.Readable(f1),r=[],i=!1,n=0;return this._inflights.forEach((o,s)=>{r.push(o);}),e._read=()=>{!i&&n{if(!i)return i=!0,setTimeout(()=>{e.emit(\"close\");},0),e},e}del(e,r){let i=this._inflights.get(e.messageId);return i?(this._inflights.delete(e.messageId),r(null,i)):r&&r(new Error(\"missing packet\")),this}get(e,r){let i=this._inflights.get(e.messageId);return i?r(null,i):r&&r(new Error(\"missing packet\")),this}close(e){this.options.clean&&(this._inflights=null),e&&e();}};Xo.default=Jo;});var Vd=M(ea=>{v();m();_();Object.defineProperty(ea,\"__esModule\",{value:!0});var Hd=[0,16,128,131,135,144,145,151,153],h1=(t,e,r)=>{t.log(\"handlePublish: packet %o\",e),r=typeof r<\"u\"?r:t.noop;let i=e.topic.toString(),n=e.payload,{qos:o}=e,{messageId:s}=e,{options:a}=t;if(t.options.protocolVersion===5){let u;if(e.properties&&(u=e.properties.topicAlias),typeof u<\"u\")if(i.length===0)if(u>0&&u<=65535){let c=t.topicAliasRecv.getTopicByAlias(u);if(c)i=c,t.log(\"handlePublish :: topic complemented by alias. topic: %s - alias: %d\",i,u);else {t.log(\"handlePublish :: unregistered topic alias. alias: %d\",u),t.emit(\"error\",new Error(\"Received unregistered Topic Alias\"));return}}else {t.log(\"handlePublish :: topic alias out of range. alias: %d\",u),t.emit(\"error\",new Error(\"Received Topic Alias is out of range\"));return}else if(t.topicAliasRecv.put(i,u))t.log(\"handlePublish :: registered topic: %s - alias: %d\",i,u);else {t.log(\"handlePublish :: topic alias out of range. alias: %d\",u),t.emit(\"error\",new Error(\"Received Topic Alias is out of range\"));return}}switch(t.log(\"handlePublish: qos %d\",o),o){case 2:{a.customHandleAcks(i,n,e,(u,c)=>{if(typeof u==\"number\"&&(c=u,u=null),u)return t.emit(\"error\",u);if(Hd.indexOf(c)===-1)return t.emit(\"error\",new Error(\"Wrong reason code for pubrec\"));c?t._sendPacket({cmd:\"pubrec\",messageId:s,reasonCode:c},r):t.incomingStore.put(e,()=>{t._sendPacket({cmd:\"pubrec\",messageId:s},r);});});break}case 1:{a.customHandleAcks(i,n,e,(u,c)=>{if(typeof u==\"number\"&&(c=u,u=null),u)return t.emit(\"error\",u);if(Hd.indexOf(c)===-1)return t.emit(\"error\",new Error(\"Wrong reason code for puback\"));c||t.emit(\"message\",i,n,e),t.handleMessage(e,h=>{if(h)return r&&r(h);t._sendPacket({cmd:\"puback\",messageId:s,reasonCode:c},r);});});break}case 0:t.emit(\"message\",i,n,e),t.handleMessage(e,r);break;default:t.log(\"handlePublish: unknown QoS. Doing nothing.\");break}};ea.default=h1;});var Jr=M(Wt=>{v();m();_();Object.defineProperty(Wt,\"__esModule\",{value:!0});Wt.nextTick=Wt.applyMixin=Wt.ErrorWithReasonCode=void 0;var ta=class t extends Error{constructor(e,r){super(e),this.code=r,Object.setPrototypeOf(this,t.prototype),Object.getPrototypeOf(this).name=\"ErrorWithReasonCode\";}};Wt.ErrorWithReasonCode=ta;function d1(t,e,r=!1){var i;let n=[e];for(;;){let o=n[0],s=Object.getPrototypeOf(o);if(s?.prototype)n.unshift(s);else break}for(let o of n)for(let s of Object.getOwnPropertyNames(o.prototype))(r||s!==\"constructor\")&&Object.defineProperty(t.prototype,s,(i=Object.getOwnPropertyDescriptor(o.prototype,s))!==null&&i!==void 0?i:Object.create(null));}Wt.applyMixin=d1;Wt.nextTick=typeof(P===null||P===void 0?void 0:P.nextTick)==\"function\"?P.nextTick:t=>{setTimeout(t,0);};});var Ai=M(br=>{v();m();_();Object.defineProperty(br,\"__esModule\",{value:!0});br.ReasonCodes=void 0;br.ReasonCodes={0:\"\",1:\"Unacceptable protocol version\",2:\"Identifier rejected\",3:\"Server unavailable\",4:\"Bad username or password\",5:\"Not authorized\",16:\"No matching subscribers\",17:\"No subscription existed\",128:\"Unspecified error\",129:\"Malformed Packet\",130:\"Protocol Error\",131:\"Implementation specific error\",132:\"Unsupported Protocol Version\",133:\"Client Identifier not valid\",134:\"Bad User Name or Password\",135:\"Not authorized\",136:\"Server unavailable\",137:\"Server busy\",138:\"Banned\",139:\"Server shutting down\",140:\"Bad authentication method\",141:\"Keep Alive timeout\",142:\"Session taken over\",143:\"Topic Filter invalid\",144:\"Topic Name invalid\",145:\"Packet identifier in use\",146:\"Packet Identifier not found\",147:\"Receive Maximum exceeded\",148:\"Topic Alias invalid\",149:\"Packet too large\",150:\"Message rate too high\",151:\"Quota exceeded\",152:\"Administrative action\",153:\"Payload format invalid\",154:\"Retain not supported\",155:\"QoS not supported\",156:\"Use another server\",157:\"Server moved\",158:\"Shared Subscriptions not supported\",159:\"Connection rate exceeded\",160:\"Maximum connect time\",161:\"Subscription Identifiers not supported\",162:\"Wildcard Subscriptions not supported\"};var p1=(t,e)=>{let{messageId:r}=e,i=e.cmd,n=null,o=t.outgoing[r]?t.outgoing[r].cb:null,s;if(!o){t.log(\"_handleAck :: Server sent an ack in error. Ignoring.\");return}switch(t.log(\"_handleAck :: packet type\",i),i){case\"pubcomp\":case\"puback\":{let a=e.reasonCode;a&&a>0&&a!==16?(s=new Error(`Publish error: ${br.ReasonCodes[a]}`),s.code=a,t._removeOutgoingAndStoreMessage(r,()=>{o(s,e);})):t._removeOutgoingAndStoreMessage(r,o);break}case\"pubrec\":{n={cmd:\"pubrel\",qos:2,messageId:r};let a=e.reasonCode;a&&a>0&&a!==16?(s=new Error(`Publish error: ${br.ReasonCodes[a]}`),s.code=a,t._removeOutgoingAndStoreMessage(r,()=>{o(s,e);})):t._sendPacket(n);break}case\"suback\":{delete t.outgoing[r],t.messageIdProvider.deallocate(r);let a=e.granted;for(let u=0;u{delete t._resubscribeTopics[h];});}delete t.messageIdToTopic[r],t._invokeStoreProcessingQueue(),o(null,e);break}case\"unsuback\":{delete t.outgoing[r],t.messageIdProvider.deallocate(r),t._invokeStoreProcessingQueue(),o(null);break}default:t.emit(\"error\",new Error(\"unrecognized packet type\"));}t.disconnecting&&Object.keys(t.outgoing).length===0&&t.emit(\"outgoingEmpty\");};br.default=p1;});var Kd=M(ra=>{v();m();_();Object.defineProperty(ra,\"__esModule\",{value:!0});var zd=Jr(),g1=Ai(),y1=(t,e)=>{let{options:r}=t,i=r.protocolVersion,n=i===5?e.reasonCode:e.returnCode;if(i!==5){let o=new zd.ErrorWithReasonCode(`Protocol error: Auth packets are only supported in MQTT 5. Your version:${i}`,n);t.emit(\"error\",o);return}t.handleAuth(e,(o,s)=>{if(o){t.emit(\"error\",o);return}if(n===24)t.reconnecting=!1,t._sendPacket(s);else {let a=new zd.ErrorWithReasonCode(`Connection refused: ${g1.ReasonCodes[n]}`,n);t.emit(\"error\",a);}});};ra.default=y1;});var Xd=M(kn=>{v();m();_();Object.defineProperty(kn,\"__esModule\",{value:!0});kn.LRUCache=void 0;var Ii=typeof performance==\"object\"&&performance&&typeof performance.now==\"function\"?performance:Date,Qd=new Set,ia=typeof P==\"object\"&&P?P:{},Yd=(t,e,r,i)=>{typeof ia.emitWarning==\"function\"?ia.emitWarning(t,e,r,i):console.error(`[${r}] ${e}: ${t}`);},On=globalThis.AbortController,Gd=globalThis.AbortSignal;if(typeof On>\"u\"){Gd=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(i,n){this._onabort.push(n);}},On=class{constructor(){e();}signal=new Gd;abort(i){if(!this.signal.aborted){this.signal.reason=i,this.signal.aborted=!0;for(let n of this.signal._onabort)n(i);this.signal.onabort?.(i);}}};let t=ia.env?.LRU_CACHE_IGNORE_AC_WARNING!==\"1\",e=()=>{t&&(t=!1,Yd(\"AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.\",\"NO_ABORT_CONTROLLER\",\"ENOTSUP\",e));};}var b1=t=>!Qd.has(t),$t=t=>t&&t===Math.floor(t)&&t>0&&isFinite(t),Jd=t=>$t(t)?t<=Math.pow(2,8)?Uint8Array:t<=Math.pow(2,16)?Uint16Array:t<=Math.pow(2,32)?Uint32Array:t<=Number.MAX_SAFE_INTEGER?Xr:null:null,Xr=class extends Array{constructor(e){super(e),this.fill(0);}},na=class t{heap;length;static#l=!1;static create(e){let r=Jd(e);if(!r)return [];t.#l=!0;let i=new t(e,r);return t.#l=!1,i}constructor(e,r){if(!t.#l)throw new TypeError(\"instantiate Stack using Stack.create(n)\");this.heap=new r(e),this.length=0;}push(e){this.heap[this.length++]=e;}pop(){return this.heap[--this.length]}},sa=class t{#l;#c;#p;#g;#B;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#i;#y;#n;#r;#e;#u;#h;#a;#s;#b;#o;#E;#S;#w;#_;#I;#f;static unsafeExposeInternals(e){return {starts:e.#S,ttls:e.#w,sizes:e.#E,keyMap:e.#n,keyList:e.#r,valList:e.#e,next:e.#u,prev:e.#h,get head(){return e.#a},get tail(){return e.#s},free:e.#b,isBackgroundFetch:r=>e.#t(r),backgroundFetch:(r,i,n,o)=>e.#k(r,i,n,o),moveToTail:r=>e.#C(r),indexes:r=>e.#m(r),rindexes:r=>e.#v(r),isStale:r=>e.#d(r)}}get max(){return this.#l}get maxSize(){return this.#c}get calculatedSize(){return this.#y}get size(){return this.#i}get fetchMethod(){return this.#B}get dispose(){return this.#p}get disposeAfter(){return this.#g}constructor(e){let{max:r=0,ttl:i,ttlResolution:n=1,ttlAutopurge:o,updateAgeOnGet:s,updateAgeOnHas:a,allowStale:u,dispose:c,disposeAfter:h,noDisposeOnSet:d,noUpdateTTL:g,maxSize:y=0,maxEntrySize:w=0,sizeCalculation:E,fetchMethod:S,noDeleteOnFetchRejection:I,noDeleteOnStaleGet:C,allowStaleOnFetchRejection:R,allowStaleOnFetchAbort:U,ignoreFetchAbort:N}=e;if(r!==0&&!$t(r))throw new TypeError(\"max option must be a nonnegative integer\");let W=r?Jd(r):Array;if(!W)throw new Error(\"invalid max value: \"+r);if(this.#l=r,this.#c=y,this.maxEntrySize=w||this.#c,this.sizeCalculation=E,this.sizeCalculation){if(!this.#c&&!this.maxEntrySize)throw new TypeError(\"cannot set sizeCalculation without setting maxSize or maxEntrySize\");if(typeof this.sizeCalculation!=\"function\")throw new TypeError(\"sizeCalculation set to non-function\")}if(S!==void 0&&typeof S!=\"function\")throw new TypeError(\"fetchMethod must be a function if specified\");if(this.#B=S,this.#I=!!S,this.#n=new Map,this.#r=new Array(r).fill(void 0),this.#e=new Array(r).fill(void 0),this.#u=new W(r),this.#h=new W(r),this.#a=0,this.#s=0,this.#b=na.create(r),this.#i=0,this.#y=0,typeof c==\"function\"&&(this.#p=c),typeof h==\"function\"?(this.#g=h,this.#o=[]):(this.#g=void 0,this.#o=void 0),this.#_=!!this.#p,this.#f=!!this.#g,this.noDisposeOnSet=!!d,this.noUpdateTTL=!!g,this.noDeleteOnFetchRejection=!!I,this.allowStaleOnFetchRejection=!!R,this.allowStaleOnFetchAbort=!!U,this.ignoreFetchAbort=!!N,this.maxEntrySize!==0){if(this.#c!==0&&!$t(this.#c))throw new TypeError(\"maxSize must be a positive integer if specified\");if(!$t(this.maxEntrySize))throw new TypeError(\"maxEntrySize must be a positive integer if specified\");this.#q();}if(this.allowStale=!!u,this.noDeleteOnStaleGet=!!C,this.updateAgeOnGet=!!s,this.updateAgeOnHas=!!a,this.ttlResolution=$t(n)||n===0?n:1,this.ttlAutopurge=!!o,this.ttl=i||0,this.ttl){if(!$t(this.ttl))throw new TypeError(\"ttl must be a positive integer if specified\");this.#x();}if(this.#l===0&&this.ttl===0&&this.#c===0)throw new TypeError(\"At least one of max, maxSize, or ttl is required\");if(!this.ttlAutopurge&&!this.#l&&!this.#c){let K=\"LRU_CACHE_UNBOUNDED\";b1(K)&&(Qd.add(K),Yd(\"TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.\",\"UnboundedCacheWarning\",K,t));}}getRemainingTTL(e){return this.#n.has(e)?1/0:0}#x(){let e=new Xr(this.#l),r=new Xr(this.#l);this.#w=e,this.#S=r,this.#M=(o,s,a=Ii.now())=>{if(r[o]=s!==0?a:0,e[o]=s,s!==0&&this.ttlAutopurge){let u=setTimeout(()=>{this.#d(o)&&this.delete(this.#r[o]);},s+1);u.unref&&u.unref();}},this.#T=o=>{r[o]=e[o]!==0?Ii.now():0;},this.#A=(o,s)=>{if(e[s]){let a=e[s],u=r[s];o.ttl=a,o.start=u,o.now=i||n();let c=o.now-u;o.remainingTTL=a-c;}};let i=0,n=()=>{let o=Ii.now();if(this.ttlResolution>0){i=o;let s=setTimeout(()=>i=0,this.ttlResolution);s.unref&&s.unref();}return o};this.getRemainingTTL=o=>{let s=this.#n.get(o);if(s===void 0)return 0;let a=e[s],u=r[s];if(a===0||u===0)return 1/0;let c=(i||n())-u;return a-c},this.#d=o=>e[o]!==0&&r[o]!==0&&(i||n())-r[o]>e[o];}#T=()=>{};#A=()=>{};#M=()=>{};#d=()=>!1;#q(){let e=new Xr(this.#l);this.#y=0,this.#E=e,this.#R=r=>{this.#y-=e[r],e[r]=0;},this.#L=(r,i,n,o)=>{if(this.#t(i))return 0;if(!$t(n))if(o){if(typeof o!=\"function\")throw new TypeError(\"sizeCalculation must be a function\");if(n=o(i,r),!$t(n))throw new TypeError(\"sizeCalculation return invalid (expect positive integer)\")}else throw new TypeError(\"invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.\");return n},this.#P=(r,i,n)=>{if(e[r]=i,this.#c){let o=this.#c-e[r];for(;this.#y>o;)this.#O(!0);}this.#y+=e[r],n&&(n.entrySize=i,n.totalCalculatedSize=this.#y);};}#R=e=>{};#P=(e,r,i)=>{};#L=(e,r,i,n)=>{if(i||n)throw new TypeError(\"cannot set size without setting maxSize or maxEntrySize on cache\");return 0};*#m({allowStale:e=this.allowStale}={}){if(this.#i)for(let r=this.#s;!(!this.#U(r)||((e||!this.#d(r))&&(yield r),r===this.#a));)r=this.#h[r];}*#v({allowStale:e=this.allowStale}={}){if(this.#i)for(let r=this.#a;!(!this.#U(r)||((e||!this.#d(r))&&(yield r),r===this.#s));)r=this.#u[r];}#U(e){return e!==void 0&&this.#n.get(this.#r[e])===e}*entries(){for(let e of this.#m())this.#e[e]!==void 0&&this.#r[e]!==void 0&&!this.#t(this.#e[e])&&(yield [this.#r[e],this.#e[e]]);}*rentries(){for(let e of this.#v())this.#e[e]!==void 0&&this.#r[e]!==void 0&&!this.#t(this.#e[e])&&(yield [this.#r[e],this.#e[e]]);}*keys(){for(let e of this.#m()){let r=this.#r[e];r!==void 0&&!this.#t(this.#e[e])&&(yield r);}}*rkeys(){for(let e of this.#v()){let r=this.#r[e];r!==void 0&&!this.#t(this.#e[e])&&(yield r);}}*values(){for(let e of this.#m())this.#e[e]!==void 0&&!this.#t(this.#e[e])&&(yield this.#e[e]);}*rvalues(){for(let e of this.#v())this.#e[e]!==void 0&&!this.#t(this.#e[e])&&(yield this.#e[e]);}[Symbol.iterator](){return this.entries()}find(e,r={}){for(let i of this.#m()){let n=this.#e[i],o=this.#t(n)?n.__staleWhileFetching:n;if(o!==void 0&&e(o,this.#r[i],this))return this.get(this.#r[i],r)}}forEach(e,r=this){for(let i of this.#m()){let n=this.#e[i],o=this.#t(n)?n.__staleWhileFetching:n;o!==void 0&&e.call(r,o,this.#r[i],this);}}rforEach(e,r=this){for(let i of this.#v()){let n=this.#e[i],o=this.#t(n)?n.__staleWhileFetching:n;o!==void 0&&e.call(r,o,this.#r[i],this);}}purgeStale(){let e=!1;for(let r of this.#v({allowStale:!0}))this.#d(r)&&(this.delete(this.#r[r]),e=!0);return e}dump(){let e=[];for(let r of this.#m({allowStale:!0})){let i=this.#r[r],n=this.#e[r],o=this.#t(n)?n.__staleWhileFetching:n;if(o===void 0||i===void 0)continue;let s={value:o};if(this.#w&&this.#S){s.ttl=this.#w[r];let a=Ii.now()-this.#S[r];s.start=Math.floor(Date.now()-a);}this.#E&&(s.size=this.#E[r]),e.unshift([i,s]);}return e}load(e){this.clear();for(let[r,i]of e){if(i.start){let n=Date.now()-i.start;i.start=Ii.now()-n;}this.set(r,i.value,i);}}set(e,r,i={}){if(r===void 0)return this.delete(e),this;let{ttl:n=this.ttl,start:o,noDisposeOnSet:s=this.noDisposeOnSet,sizeCalculation:a=this.sizeCalculation,status:u}=i,{noUpdateTTL:c=this.noUpdateTTL}=i,h=this.#L(e,r,i.size||0,a);if(this.maxEntrySize&&h>this.maxEntrySize)return u&&(u.set=\"miss\",u.maxEntrySizeExceeded=!0),this.delete(e),this;let d=this.#i===0?void 0:this.#n.get(e);if(d===void 0)d=this.#i===0?this.#s:this.#b.length!==0?this.#b.pop():this.#i===this.#l?this.#O(!1):this.#i,this.#r[d]=e,this.#e[d]=r,this.#n.set(e,d),this.#u[this.#s]=d,this.#h[d]=this.#s,this.#s=d,this.#i++,this.#P(d,h,u),u&&(u.set=\"add\"),c=!1;else {this.#C(d);let g=this.#e[d];if(r!==g){if(this.#I&&this.#t(g)){g.__abortController.abort(new Error(\"replaced\"));let{__staleWhileFetching:y}=g;y!==void 0&&!s&&(this.#_&&this.#p?.(y,e,\"set\"),this.#f&&this.#o?.push([y,e,\"set\"]));}else s||(this.#_&&this.#p?.(g,e,\"set\"),this.#f&&this.#o?.push([g,e,\"set\"]));if(this.#R(d),this.#P(d,h,u),this.#e[d]=r,u){u.set=\"replace\";let y=g&&this.#t(g)?g.__staleWhileFetching:g;y!==void 0&&(u.oldValue=y);}}else u&&(u.set=\"update\");}if(n!==0&&!this.#w&&this.#x(),this.#w&&(c||this.#M(d,n,o),u&&this.#A(u,d)),!s&&this.#f&&this.#o){let g=this.#o,y;for(;y=g?.shift();)this.#g?.(...y);}return this}pop(){try{for(;this.#i;){let e=this.#e[this.#a];if(this.#O(!0),this.#t(e)){if(e.__staleWhileFetching)return e.__staleWhileFetching}else if(e!==void 0)return e}}finally{if(this.#f&&this.#o){let e=this.#o,r;for(;r=e?.shift();)this.#g?.(...r);}}}#O(e){let r=this.#a,i=this.#r[r],n=this.#e[r];return this.#I&&this.#t(n)?n.__abortController.abort(new Error(\"evicted\")):(this.#_||this.#f)&&(this.#_&&this.#p?.(n,i,\"evict\"),this.#f&&this.#o?.push([n,i,\"evict\"])),this.#R(r),e&&(this.#r[r]=void 0,this.#e[r]=void 0,this.#b.push(r)),this.#i===1?(this.#a=this.#s=0,this.#b.length=0):this.#a=this.#u[r],this.#n.delete(i),this.#i--,r}has(e,r={}){let{updateAgeOnHas:i=this.updateAgeOnHas,status:n}=r,o=this.#n.get(e);if(o!==void 0){let s=this.#e[o];if(this.#t(s)&&s.__staleWhileFetching===void 0)return !1;if(this.#d(o))n&&(n.has=\"stale\",this.#A(n,o));else return i&&this.#T(o),n&&(n.has=\"hit\",this.#A(n,o)),!0}else n&&(n.has=\"miss\");return !1}peek(e,r={}){let{allowStale:i=this.allowStale}=r,n=this.#n.get(e);if(n!==void 0&&(i||!this.#d(n))){let o=this.#e[n];return this.#t(o)?o.__staleWhileFetching:o}}#k(e,r,i,n){let o=r===void 0?void 0:this.#e[r];if(this.#t(o))return o;let s=new On,{signal:a}=i;a?.addEventListener(\"abort\",()=>s.abort(a.reason),{signal:s.signal});let u={signal:s.signal,options:i,context:n},c=(E,S=!1)=>{let{aborted:I}=s.signal,C=i.ignoreFetchAbort&&E!==void 0;if(i.status&&(I&&!S?(i.status.fetchAborted=!0,i.status.fetchError=s.signal.reason,C&&(i.status.fetchAbortIgnored=!0)):i.status.fetchResolved=!0),I&&!C&&!S)return d(s.signal.reason);let R=y;return this.#e[r]===y&&(E===void 0?R.__staleWhileFetching?this.#e[r]=R.__staleWhileFetching:this.delete(e):(i.status&&(i.status.fetchUpdated=!0),this.set(e,E,u.options))),E},h=E=>(i.status&&(i.status.fetchRejected=!0,i.status.fetchError=E),d(E)),d=E=>{let{aborted:S}=s.signal,I=S&&i.allowStaleOnFetchAbort,C=I||i.allowStaleOnFetchRejection,R=C||i.noDeleteOnFetchRejection,U=y;if(this.#e[r]===y&&(!R||U.__staleWhileFetching===void 0?this.delete(e):I||(this.#e[r]=U.__staleWhileFetching)),C)return i.status&&U.__staleWhileFetching!==void 0&&(i.status.returnedStale=!0),U.__staleWhileFetching;if(U.__returned===U)throw E},g=(E,S)=>{let I=this.#B?.(e,o,u);I&&I instanceof Promise&&I.then(C=>E(C===void 0?void 0:C),S),s.signal.addEventListener(\"abort\",()=>{(!i.ignoreFetchAbort||i.allowStaleOnFetchAbort)&&(E(void 0),i.allowStaleOnFetchAbort&&(E=C=>c(C,!0)));});};i.status&&(i.status.fetchDispatched=!0);let y=new Promise(g).then(c,h),w=Object.assign(y,{__abortController:s,__staleWhileFetching:o,__returned:void 0});return r===void 0?(this.set(e,w,{...u.options,status:void 0}),r=this.#n.get(e)):this.#e[r]=w,w}#t(e){if(!this.#I)return !1;let r=e;return !!r&&r instanceof Promise&&r.hasOwnProperty(\"__staleWhileFetching\")&&r.__abortController instanceof On}async fetch(e,r={}){let{allowStale:i=this.allowStale,updateAgeOnGet:n=this.updateAgeOnGet,noDeleteOnStaleGet:o=this.noDeleteOnStaleGet,ttl:s=this.ttl,noDisposeOnSet:a=this.noDisposeOnSet,size:u=0,sizeCalculation:c=this.sizeCalculation,noUpdateTTL:h=this.noUpdateTTL,noDeleteOnFetchRejection:d=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:g=this.allowStaleOnFetchRejection,ignoreFetchAbort:y=this.ignoreFetchAbort,allowStaleOnFetchAbort:w=this.allowStaleOnFetchAbort,context:E,forceRefresh:S=!1,status:I,signal:C}=r;if(!this.#I)return I&&(I.fetch=\"get\"),this.get(e,{allowStale:i,updateAgeOnGet:n,noDeleteOnStaleGet:o,status:I});let R={allowStale:i,updateAgeOnGet:n,noDeleteOnStaleGet:o,ttl:s,noDisposeOnSet:a,size:u,sizeCalculation:c,noUpdateTTL:h,noDeleteOnFetchRejection:d,allowStaleOnFetchRejection:g,allowStaleOnFetchAbort:w,ignoreFetchAbort:y,status:I,signal:C},U=this.#n.get(e);if(U===void 0){I&&(I.fetch=\"miss\");let N=this.#k(e,U,R,E);return N.__returned=N}else {let N=this.#e[U];if(this.#t(N)){let de=i&&N.__staleWhileFetching!==void 0;return I&&(I.fetch=\"inflight\",de&&(I.returnedStale=!0)),de?N.__staleWhileFetching:N.__returned=N}let W=this.#d(U);if(!S&&!W)return I&&(I.fetch=\"hit\"),this.#C(U),n&&this.#T(U),I&&this.#A(I,U),N;let K=this.#k(e,U,R,E),Q=K.__staleWhileFetching!==void 0&&i;return I&&(I.fetch=W?\"stale\":\"refresh\",Q&&W&&(I.returnedStale=!0)),Q?K.__staleWhileFetching:K.__returned=K}}get(e,r={}){let{allowStale:i=this.allowStale,updateAgeOnGet:n=this.updateAgeOnGet,noDeleteOnStaleGet:o=this.noDeleteOnStaleGet,status:s}=r,a=this.#n.get(e);if(a!==void 0){let u=this.#e[a],c=this.#t(u);return s&&this.#A(s,a),this.#d(a)?(s&&(s.get=\"stale\"),c?(s&&i&&u.__staleWhileFetching!==void 0&&(s.returnedStale=!0),i?u.__staleWhileFetching:void 0):(o||this.delete(e),s&&i&&(s.returnedStale=!0),i?u:void 0)):(s&&(s.get=\"hit\"),c?u.__staleWhileFetching:(this.#C(a),n&&this.#T(a),u))}else s&&(s.get=\"miss\");}#N(e,r){this.#h[r]=e,this.#u[e]=r;}#C(e){e!==this.#s&&(e===this.#a?this.#a=this.#u[e]:this.#N(this.#h[e],this.#u[e]),this.#N(this.#s,e),this.#s=e);}delete(e){let r=!1;if(this.#i!==0){let i=this.#n.get(e);if(i!==void 0)if(r=!0,this.#i===1)this.clear();else {this.#R(i);let n=this.#e[i];this.#t(n)?n.__abortController.abort(new Error(\"deleted\")):(this.#_||this.#f)&&(this.#_&&this.#p?.(n,e,\"delete\"),this.#f&&this.#o?.push([n,e,\"delete\"])),this.#n.delete(e),this.#r[i]=void 0,this.#e[i]=void 0,i===this.#s?this.#s=this.#h[i]:i===this.#a?this.#a=this.#u[i]:(this.#u[this.#h[i]]=this.#u[i],this.#h[this.#u[i]]=this.#h[i]),this.#i--,this.#b.push(i);}}if(this.#f&&this.#o?.length){let i=this.#o,n;for(;n=i?.shift();)this.#g?.(...n);}return r}clear(){for(let e of this.#v({allowStale:!0})){let r=this.#e[e];if(this.#t(r))r.__abortController.abort(new Error(\"deleted\"));else {let i=this.#r[e];this.#_&&this.#p?.(r,i,\"delete\"),this.#f&&this.#o?.push([r,i,\"delete\"]);}}if(this.#n.clear(),this.#e.fill(void 0),this.#r.fill(void 0),this.#w&&this.#S&&(this.#w.fill(0),this.#S.fill(0)),this.#E&&this.#E.fill(0),this.#a=0,this.#s=0,this.#b.length=0,this.#y=0,this.#i=0,this.#f&&this.#o){let e=this.#o,r;for(;r=e?.shift();)this.#g?.(...r);}}};kn.LRUCache=sa;});var at=M(Ht=>{v();m();_();Object.defineProperty(Ht,\"t\",{value:!0});Ht.ContainerIterator=Ht.Container=Ht.Base=void 0;var oa=class{constructor(e=0){this.iteratorType=e;}equals(e){return this.o===e.o}};Ht.ContainerIterator=oa;var xn=class{constructor(){this.i=0;}get length(){return this.i}size(){return this.i}empty(){return this.i===0}};Ht.Base=xn;var aa=class extends xn{};Ht.Container=aa;});var Zd=M(Mn=>{v();m();_();Object.defineProperty(Mn,\"t\",{value:!0});Mn.default=void 0;var w1=at(),la=class extends w1.Base{constructor(e=[]){super(),this.S=[];let r=this;e.forEach(function(i){r.push(i);});}clear(){this.i=0,this.S=[];}push(e){return this.S.push(e),this.i+=1,this.i}pop(){if(this.i!==0)return this.i-=1,this.S.pop()}top(){return this.S[this.i-1]}},_1=la;Mn.default=_1;});var ep=M(Ln=>{v();m();_();Object.defineProperty(Ln,\"t\",{value:!0});Ln.default=void 0;var m1=at(),ua=class extends m1.Base{constructor(e=[]){super(),this.j=0,this.q=[];let r=this;e.forEach(function(i){r.push(i);});}clear(){this.q=[],this.i=this.j=0;}push(e){let r=this.q.length;if(this.j/r>.5&&this.j+this.i>=r&&r>4096){let i=this.i;for(let n=0;n{v();m();_();Object.defineProperty(Un,\"t\",{value:!0});Un.default=void 0;var E1=at(),fa=class extends E1.Base{constructor(e=[],r=function(n,o){return n>o?-1:n>1;for(let o=this.i-1>>1;o>=0;--o)this.k(o,n);}m(e){let r=this.C[e];for(;e>0;){let i=e-1>>1,n=this.C[i];if(this.v(n,r)<=0)break;this.C[e]=n,e=i;}this.C[e]=r;}k(e,r){let i=this.C[e];for(;e0&&(n=o,s=this.C[o]),this.v(s,i)>=0)break;this.C[e]=s,e=n;}this.C[e]=i;}clear(){this.i=0,this.C.length=0;}push(e){this.C.push(e),this.m(this.i),this.i+=1;}pop(){if(this.i===0)return;let e=this.C[0],r=this.C.pop();return this.i-=1,this.i&&(this.C[0]=r,this.k(0,this.i>>1)),e}top(){return this.C[0]}find(e){return this.C.indexOf(e)>=0}remove(e){let r=this.C.indexOf(e);return r<0?!1:(r===0?this.pop():r===this.i-1?(this.C.pop(),this.i-=1):(this.C.splice(r,1,this.C.pop()),this.i-=1,this.m(r),this.k(r,this.i>>1)),!0)}updateItem(e){let r=this.C.indexOf(e);return r<0?!1:(this.m(r),this.k(r,this.i>>1),!0)}toArray(){return [...this.C]}},S1=fa;Un.default=S1;});var qn=M(Nn=>{v();m();_();Object.defineProperty(Nn,\"t\",{value:!0});Nn.default=void 0;var A1=at(),ca=class extends A1.Container{},I1=ca;Nn.default=I1;});var lt=M(ha=>{v();m();_();Object.defineProperty(ha,\"t\",{value:!0});ha.throwIteratorAccessError=T1;function T1(){throw new RangeError(\"Iterator access denied!\")}});var pa=M(jn=>{v();m();_();Object.defineProperty(jn,\"t\",{value:!0});jn.RandomIterator=void 0;var R1=at(),Dn=lt(),da=class extends R1.ContainerIterator{constructor(e,r){super(r),this.o=e,this.iteratorType===0?(this.pre=function(){return this.o===0&&(0, Dn.throwIteratorAccessError)(),this.o-=1,this},this.next=function(){return this.o===this.container.size()&&(0, Dn.throwIteratorAccessError)(),this.o+=1,this}):(this.pre=function(){return this.o===this.container.size()-1&&(0, Dn.throwIteratorAccessError)(),this.o+=1,this},this.next=function(){return this.o===-1&&(0, Dn.throwIteratorAccessError)(),this.o-=1,this});}get pointer(){return this.container.getElementByPos(this.o)}set pointer(e){this.container.setElementByPos(this.o,e);}};jn.RandomIterator=da;});var rp=M(Fn=>{v();m();_();Object.defineProperty(Fn,\"t\",{value:!0});Fn.default=void 0;var C1=P1(qn()),B1=pa();function P1(t){return t&&t.t?t:{default:t}}var wr=class t extends B1.RandomIterator{constructor(e,r,i){super(e,i),this.container=r;}copy(){return new t(this.o,this.container,this.iteratorType)}},ga=class extends C1.default{constructor(e=[],r=!0){if(super(),Array.isArray(e))this.J=r?[...e]:e,this.i=e.length;else {this.J=[];let i=this;e.forEach(function(n){i.pushBack(n);});}}clear(){this.i=0,this.J.length=0;}begin(){return new wr(0,this)}end(){return new wr(this.i,this)}rBegin(){return new wr(this.i-1,this,1)}rEnd(){return new wr(-1,this,1)}front(){return this.J[0]}back(){return this.J[this.i-1]}getElementByPos(e){if(e<0||e>this.i-1)throw new RangeError;return this.J[e]}eraseElementByPos(e){if(e<0||e>this.i-1)throw new RangeError;return this.J.splice(e,1),this.i-=1,this.i}eraseElementByValue(e){let r=0;for(let i=0;ithis.i-1)throw new RangeError;this.J[e]=r;}insert(e,r,i=1){if(e<0||e>this.i)throw new RangeError;return this.J.splice(e,0,...new Array(i).fill(r)),this.i+=i,this.i}find(e){for(let r=0;r{v();m();_();Object.defineProperty(Wn,\"t\",{value:!0});Wn.default=void 0;var k1=M1(qn()),x1=at(),_r=lt();function M1(t){return t&&t.t?t:{default:t}}var mr=class t extends x1.ContainerIterator{constructor(e,r,i,n){super(n),this.o=e,this.h=r,this.container=i,this.iteratorType===0?(this.pre=function(){return this.o.L===this.h&&(0, _r.throwIteratorAccessError)(),this.o=this.o.L,this},this.next=function(){return this.o===this.h&&(0, _r.throwIteratorAccessError)(),this.o=this.o.B,this}):(this.pre=function(){return this.o.B===this.h&&(0, _r.throwIteratorAccessError)(),this.o=this.o.B,this},this.next=function(){return this.o===this.h&&(0, _r.throwIteratorAccessError)(),this.o=this.o.L,this});}get pointer(){return this.o===this.h&&(0, _r.throwIteratorAccessError)(),this.o.l}set pointer(e){this.o===this.h&&(0, _r.throwIteratorAccessError)(),this.o.l=e;}copy(){return new t(this.o,this.h,this.container,this.iteratorType)}},ya=class extends k1.default{constructor(e=[]){super(),this.h={},this.p=this._=this.h.L=this.h.B=this.h;let r=this;e.forEach(function(i){r.pushBack(i);});}V(e){let{L:r,B:i}=e;r.B=i,i.L=r,e===this.p&&(this.p=i),e===this._&&(this._=r),this.i-=1;}G(e,r){let i=r.B,n={l:e,L:r,B:i};r.B=n,i.L=n,r===this.h&&(this.p=n),i===this.h&&(this._=n),this.i+=1;}clear(){this.i=0,this.p=this._=this.h.L=this.h.B=this.h;}begin(){return new mr(this.p,this.h,this)}end(){return new mr(this.h,this.h,this)}rBegin(){return new mr(this._,this.h,this,1)}rEnd(){return new mr(this.h,this.h,this,1)}front(){return this.p.l}back(){return this._.l}getElementByPos(e){if(e<0||e>this.i-1)throw new RangeError;let r=this.p;for(;e--;)r=r.B;return r.l}eraseElementByPos(e){if(e<0||e>this.i-1)throw new RangeError;let r=this.p;for(;e--;)r=r.B;return this.V(r),this.i}eraseElementByValue(e){let r=this.p;for(;r!==this.h;)r.l===e&&this.V(r),r=r.B;return this.i}eraseElementByIterator(e){let r=e.o;return r===this.h&&(0, _r.throwIteratorAccessError)(),e=e.next(),this.V(r),e}pushBack(e){return this.G(e,this._),this.i}popBack(){if(this.i===0)return;let e=this._.l;return this.V(this._),e}pushFront(e){return this.G(e,this.h),this.i}popFront(){if(this.i===0)return;let e=this.p.l;return this.V(this.p),e}setElementByPos(e,r){if(e<0||e>this.i-1)throw new RangeError;let i=this.p;for(;e--;)i=i.B;i.l=r;}insert(e,r,i=1){if(e<0||e>this.i)throw new RangeError;if(i<=0)return this.i;if(e===0)for(;i--;)this.pushFront(r);else if(e===this.i)for(;i--;)this.pushBack(r);else {let n=this.p;for(let s=1;s{v();m();_();Object.defineProperty($n,\"t\",{value:!0});$n.default=void 0;var U1=q1(qn()),N1=pa();function q1(t){return t&&t.t?t:{default:t}}var vr=class t extends N1.RandomIterator{constructor(e,r,i){super(e,i),this.container=r;}copy(){return new t(this.o,this.container,this.iteratorType)}},ba=class extends U1.default{constructor(e=[],r=4096){super(),this.j=0,this.D=0,this.R=0,this.N=0,this.P=0,this.A=[];let i=(()=>{if(typeof e.length==\"number\")return e.length;if(typeof e.size==\"number\")return e.size;if(typeof e.size==\"function\")return e.size();throw new TypeError(\"Cannot get the length or size of the container\")})();this.F=r,this.P=Math.max(Math.ceil(i/this.F),1);for(let s=0;s>1)-(n>>1),this.D=this.N=this.F-i%this.F>>1;let o=this;e.forEach(function(s){o.pushBack(s);});}T(){let e=[],r=Math.max(this.P>>1,1);for(let i=0;i>1;}begin(){return new vr(0,this)}end(){return new vr(this.i,this)}rBegin(){return new vr(this.i-1,this,1)}rEnd(){return new vr(-1,this,1)}front(){if(this.i!==0)return this.A[this.j][this.D]}back(){if(this.i!==0)return this.A[this.R][this.N]}pushBack(e){return this.i&&(this.N0?this.N-=1:this.R>0?(this.R-=1,this.N=this.F-1):(this.R=this.P-1,this.N=this.F-1)),this.i-=1,e}pushFront(e){return this.i&&(this.D>0?this.D-=1:this.j>0?(this.j-=1,this.D=this.F-1):(this.j=this.P-1,this.D=this.F-1),this.j===this.R&&this.D===this.N&&this.T()),this.i+=1,this.A[this.j][this.D]=e,this.i}popFront(){if(this.i===0)return;let e=this.A[this.j][this.D];return this.i!==1&&(this.Dthis.i-1)throw new RangeError;let{curNodeBucketIndex:r,curNodePointerIndex:i}=this.O(e);return this.A[r][i]}setElementByPos(e,r){if(e<0||e>this.i-1)throw new RangeError;let{curNodeBucketIndex:i,curNodePointerIndex:n}=this.O(e);this.A[i][n]=r;}insert(e,r,i=1){if(e<0||e>this.i)throw new RangeError;if(e===0)for(;i--;)this.pushFront(r);else if(e===this.i)for(;i--;)this.pushBack(r);else {let n=[];for(let o=e;othis.i-1)throw new RangeError;if(e===0)this.popFront();else if(e===this.i-1)this.popBack();else {let r=[];for(let n=e+1;ne;)this.popBack();return this.i}sort(e){let r=[];for(let i=0;i{v();m();_();Object.defineProperty(Zr,\"t\",{value:!0});Zr.TreeNodeEnableIndex=Zr.TreeNode=void 0;var Hn=class{constructor(e,r){this.ee=1,this.u=void 0,this.l=void 0,this.U=void 0,this.W=void 0,this.tt=void 0,this.u=e,this.l=r;}L(){let e=this;if(e.ee===1&&e.tt.tt===e)e=e.W;else if(e.U)for(e=e.U;e.W;)e=e.W;else {let r=e.tt;for(;r.U===e;)e=r,r=e.tt;e=r;}return e}B(){let e=this;if(e.W){for(e=e.W;e.U;)e=e.U;return e}else {let r=e.tt;for(;r.W===e;)e=r,r=e.tt;return e.W!==r?r:e}}te(){let e=this.tt,r=this.W,i=r.U;return e.tt===this?e.tt=r:e.U===this?e.U=r:e.W=r,r.tt=e,r.U=this,this.tt=r,this.W=i,i&&(i.tt=this),r}se(){let e=this.tt,r=this.U,i=r.W;return e.tt===this?e.tt=r:e.U===this?e.U=r:e.W=r,r.tt=e,r.W=this,this.tt=r,this.U=i,i&&(i.tt=this),r}};Zr.TreeNode=Hn;var wa=class extends Hn{constructor(){super(...arguments),this.rt=1;}te(){let e=super.te();return this.ie(),e.ie(),e}se(){let e=super.se();return this.ie(),e.ie(),e}ie(){this.rt=1,this.U&&(this.rt+=this.U.rt),this.W&&(this.rt+=this.W.rt);}};Zr.TreeNodeEnableIndex=wa;});var ma=M(Vn=>{v();m();_();Object.defineProperty(Vn,\"t\",{value:!0});Vn.default=void 0;var op=sp(),j1=at(),ap=lt(),_a=class extends j1.Container{constructor(e=function(i,n){return in?1:0},r=!1){super(),this.Y=void 0,this.v=e,r?(this.re=op.TreeNodeEnableIndex,this.M=function(i,n,o){let s=this.ne(i,n,o);if(s){let a=s.tt;for(;a!==this.h;)a.rt+=1,a=a.tt;let u=this.he(s);if(u){let{parentNode:c,grandParent:h,curNode:d}=u;c.ie(),h.ie(),d.ie();}}return this.i},this.V=function(i){let n=this.fe(i);for(;n!==this.h;)n.rt-=1,n=n.tt;}):(this.re=op.TreeNode,this.M=function(i,n,o){let s=this.ne(i,n,o);return s&&this.he(s),this.i},this.V=this.fe),this.h=new this.re;}X(e,r){let i=this.h;for(;e;){let n=this.v(e.u,r);if(n<0)e=e.W;else if(n>0)i=e,e=e.U;else return e}return i}Z(e,r){let i=this.h;for(;e;)this.v(e.u,r)<=0?e=e.W:(i=e,e=e.U);return i}$(e,r){let i=this.h;for(;e;){let n=this.v(e.u,r);if(n<0)i=e,e=e.W;else if(n>0)e=e.U;else return e}return i}rr(e,r){let i=this.h;for(;e;)this.v(e.u,r)<0?(i=e,e=e.W):e=e.U;return i}ue(e){for(;;){let r=e.tt;if(r===this.h)return;if(e.ee===1){e.ee=0;return}if(e===r.U){let i=r.W;if(i.ee===1)i.ee=0,r.ee=1,r===this.Y?this.Y=r.te():r.te();else if(i.W&&i.W.ee===1){i.ee=r.ee,r.ee=0,i.W.ee=0,r===this.Y?this.Y=r.te():r.te();return}else i.U&&i.U.ee===1?(i.ee=1,i.U.ee=0,i.se()):(i.ee=1,e=r);}else {let i=r.U;if(i.ee===1)i.ee=0,r.ee=1,r===this.Y?this.Y=r.se():r.se();else if(i.U&&i.U.ee===1){i.ee=r.ee,r.ee=0,i.U.ee=0,r===this.Y?this.Y=r.se():r.se();return}else i.W&&i.W.ee===1?(i.ee=1,i.W.ee=0,i.te()):(i.ee=1,e=r);}}}fe(e){if(this.i===1)return this.clear(),this.h;let r=e;for(;r.U||r.W;){if(r.W)for(r=r.W;r.U;)r=r.U;else r=r.U;[e.u,r.u]=[r.u,e.u],[e.l,r.l]=[r.l,e.l],e=r;}this.h.U===r?this.h.U=r.tt:this.h.W===r&&(this.h.W=r.tt),this.ue(r);let i=r.tt;return r===i.U?i.U=void 0:i.W=void 0,this.i-=1,this.Y.ee=0,i}oe(e,r){return e===void 0?!1:this.oe(e.U,r)||r(e)?!0:this.oe(e.W,r)}he(e){for(;;){let r=e.tt;if(r.ee===0)return;let i=r.tt;if(r===i.U){let n=i.W;if(n&&n.ee===1){if(n.ee=r.ee=0,i===this.Y)return;i.ee=1,e=i;continue}else if(e===r.W){if(e.ee=0,e.U&&(e.U.tt=r),e.W&&(e.W.tt=i),r.W=e.U,i.U=e.W,e.U=r,e.W=i,i===this.Y)this.Y=e,this.h.tt=e;else {let o=i.tt;o.U===i?o.U=e:o.W=e;}return e.tt=i.tt,r.tt=e,i.tt=e,i.ee=1,{parentNode:r,grandParent:i,curNode:e}}else r.ee=0,i===this.Y?this.Y=i.se():i.se(),i.ee=1;}else {let n=i.U;if(n&&n.ee===1){if(n.ee=r.ee=0,i===this.Y)return;i.ee=1,e=i;continue}else if(e===r.U){if(e.ee=0,e.U&&(e.U.tt=i),e.W&&(e.W.tt=r),i.W=e.U,r.U=e.W,e.U=i,e.W=r,i===this.Y)this.Y=e,this.h.tt=e;else {let o=i.tt;o.U===i?o.U=e:o.W=e;}return e.tt=i.tt,r.tt=e,i.tt=e,i.ee=1,{parentNode:r,grandParent:i,curNode:e}}else r.ee=0,i===this.Y?this.Y=i.te():i.te(),i.ee=1;}return}}ne(e,r,i){if(this.Y===void 0){this.i+=1,this.Y=new this.re(e,r),this.Y.ee=0,this.Y.tt=this.h,this.h.tt=this.Y,this.h.U=this.Y,this.h.W=this.Y;return}let n,o=this.h.U,s=this.v(o.u,e);if(s===0){o.l=r;return}else if(s>0)o.U=new this.re(e,r),o.U.tt=o,n=o.U,this.h.U=n;else {let a=this.h.W,u=this.v(a.u,e);if(u===0){a.l=r;return}else if(u<0)a.W=new this.re(e,r),a.W.tt=a,n=a.W,this.h.W=n;else {if(i!==void 0){let c=i.o;if(c!==this.h){let h=this.v(c.u,e);if(h===0){c.l=r;return}else if(h>0){let d=c.L(),g=this.v(d.u,e);if(g===0){d.l=r;return}else g<0&&(n=new this.re(e,r),d.W===void 0?(d.W=n,n.tt=d):(c.U=n,n.tt=c));}}}if(n===void 0)for(n=this.Y;;){let c=this.v(n.u,e);if(c>0){if(n.U===void 0){n.U=new this.re(e,r),n.U.tt=n,n=n.U;break}n=n.U;}else if(c<0){if(n.W===void 0){n.W=new this.re(e,r),n.W.tt=n,n=n.W;break}n=n.W;}else {n.l=r;return}}}}return this.i+=1,n}I(e,r){for(;e;){let i=this.v(e.u,r);if(i<0)e=e.W;else if(i>0)e=e.U;else return e}return e||this.h}clear(){this.i=0,this.Y=void 0,this.h.tt=void 0,this.h.U=this.h.W=void 0;}updateKeyByIterator(e,r){let i=e.o;if(i===this.h&&(0, ap.throwIteratorAccessError)(),this.i===1)return i.u=r,!0;if(i===this.h.U)return this.v(i.B().u,r)>0?(i.u=r,!0):!1;if(i===this.h.W)return this.v(i.L().u,r)<0?(i.u=r,!0):!1;let n=i.L().u;if(this.v(n,r)>=0)return !1;let o=i.B().u;return this.v(o,r)<=0?!1:(i.u=r,!0)}eraseElementByPos(e){if(e<0||e>this.i-1)throw new RangeError;let r=0,i=this;return this.oe(this.Y,function(n){return e===r?(i.V(n),!0):(r+=1,!1)}),this.i}eraseElementByKey(e){if(this.i===0)return !1;let r=this.I(this.Y,e);return r===this.h?!1:(this.V(r),!0)}eraseElementByIterator(e){let r=e.o;r===this.h&&(0, ap.throwIteratorAccessError)();let i=r.W===void 0;return e.iteratorType===0?i&&e.next():(!i||r.U===void 0)&&e.next(),this.V(r),e}forEach(e){let r=0;for(let i of this)e(i,r++,this);}getElementByPos(e){if(e<0||e>this.i-1)throw new RangeError;let r,i=0;for(let n of this){if(i===e){r=n;break}i+=1;}return r}getHeight(){if(this.i===0)return 0;let e=function(r){return r?Math.max(e(r.U),e(r.W))+1:0};return e(this.Y)}},F1=_a;Vn.default=F1;});var Ea=M(Kn=>{v();m();_();Object.defineProperty(Kn,\"t\",{value:!0});Kn.default=void 0;var W1=at(),zn=lt(),va=class extends W1.ContainerIterator{constructor(e,r,i){super(i),this.o=e,this.h=r,this.iteratorType===0?(this.pre=function(){return this.o===this.h.U&&(0, zn.throwIteratorAccessError)(),this.o=this.o.L(),this},this.next=function(){return this.o===this.h&&(0, zn.throwIteratorAccessError)(),this.o=this.o.B(),this}):(this.pre=function(){return this.o===this.h.W&&(0, zn.throwIteratorAccessError)(),this.o=this.o.B(),this},this.next=function(){return this.o===this.h&&(0, zn.throwIteratorAccessError)(),this.o=this.o.L(),this});}get index(){let e=this.o,r=this.h.tt;if(e===this.h)return r?r.rt-1:0;let i=0;for(e.U&&(i+=e.U.rt);e!==r;){let n=e.tt;e===n.W&&(i+=1,n.U&&(i+=n.U.rt)),e=n;}return i}},$1=va;Kn.default=$1;});var up=M(Gn=>{v();m();_();Object.defineProperty(Gn,\"t\",{value:!0});Gn.default=void 0;var H1=lp(ma()),V1=lp(Ea()),z1=lt();function lp(t){return t&&t.t?t:{default:t}}var Ke=class t extends V1.default{constructor(e,r,i,n){super(e,r,n),this.container=i;}get pointer(){return this.o===this.h&&(0, z1.throwIteratorAccessError)(),this.o.u}copy(){return new t(this.o,this.h,this.container,this.iteratorType)}},Sa=class extends H1.default{constructor(e=[],r,i){super(r,i);let n=this;e.forEach(function(o){n.insert(o);});}*K(e){e!==void 0&&(yield*this.K(e.U),yield e.u,yield*this.K(e.W));}begin(){return new Ke(this.h.U||this.h,this.h,this)}end(){return new Ke(this.h,this.h,this)}rBegin(){return new Ke(this.h.W||this.h,this.h,this,1)}rEnd(){return new Ke(this.h,this.h,this,1)}front(){return this.h.U?this.h.U.u:void 0}back(){return this.h.W?this.h.W.u:void 0}insert(e,r){return this.M(e,void 0,r)}find(e){let r=this.I(this.Y,e);return new Ke(r,this.h,this)}lowerBound(e){let r=this.X(this.Y,e);return new Ke(r,this.h,this)}upperBound(e){let r=this.Z(this.Y,e);return new Ke(r,this.h,this)}reverseLowerBound(e){let r=this.$(this.Y,e);return new Ke(r,this.h,this)}reverseUpperBound(e){let r=this.rr(this.Y,e);return new Ke(r,this.h,this)}union(e){let r=this;return e.forEach(function(i){r.insert(i);}),this.i}[Symbol.iterator](){return this.K(this.Y)}},K1=Sa;Gn.default=K1;});var cp=M(Qn=>{v();m();_();Object.defineProperty(Qn,\"t\",{value:!0});Qn.default=void 0;var G1=fp(ma()),Q1=fp(Ea()),Y1=lt();function fp(t){return t&&t.t?t:{default:t}}var Ge=class t extends Q1.default{constructor(e,r,i,n){super(e,r,n),this.container=i;}get pointer(){this.o===this.h&&(0, Y1.throwIteratorAccessError)();let e=this;return new Proxy([],{get(r,i){if(i===\"0\")return e.o.u;if(i===\"1\")return e.o.l},set(r,i,n){if(i!==\"1\")throw new TypeError(\"props must be 1\");return e.o.l=n,!0}})}copy(){return new t(this.o,this.h,this.container,this.iteratorType)}},Aa=class extends G1.default{constructor(e=[],r,i){super(r,i);let n=this;e.forEach(function(o){n.setElement(o[0],o[1]);});}*K(e){e!==void 0&&(yield*this.K(e.U),yield [e.u,e.l],yield*this.K(e.W));}begin(){return new Ge(this.h.U||this.h,this.h,this)}end(){return new Ge(this.h,this.h,this)}rBegin(){return new Ge(this.h.W||this.h,this.h,this,1)}rEnd(){return new Ge(this.h,this.h,this,1)}front(){if(this.i===0)return;let e=this.h.U;return [e.u,e.l]}back(){if(this.i===0)return;let e=this.h.W;return [e.u,e.l]}lowerBound(e){let r=this.X(this.Y,e);return new Ge(r,this.h,this)}upperBound(e){let r=this.Z(this.Y,e);return new Ge(r,this.h,this)}reverseLowerBound(e){let r=this.$(this.Y,e);return new Ge(r,this.h,this)}reverseUpperBound(e){let r=this.rr(this.Y,e);return new Ge(r,this.h,this)}setElement(e,r,i){return this.M(e,r,i)}find(e){let r=this.I(this.Y,e);return new Ge(r,this.h,this)}getElementByKey(e){return this.I(this.Y,e).l}union(e){let r=this;return e.forEach(function(i){r.setElement(i[0],i[1]);}),this.i}[Symbol.iterator](){return this.K(this.Y)}},J1=Aa;Qn.default=J1;});var Ta=M(Ia=>{v();m();_();Object.defineProperty(Ia,\"t\",{value:!0});Ia.default=X1;function X1(t){let e=typeof t;return e===\"object\"&&t!==null||e===\"function\"}});var Pa=M(ei=>{v();m();_();Object.defineProperty(ei,\"t\",{value:!0});ei.HashContainerIterator=ei.HashContainer=void 0;var hp=at(),Ra=Z1(Ta()),Ti=lt();function Z1(t){return t&&t.t?t:{default:t}}var Ca=class extends hp.ContainerIterator{constructor(e,r,i){super(i),this.o=e,this.h=r,this.iteratorType===0?(this.pre=function(){return this.o.L===this.h&&(0, Ti.throwIteratorAccessError)(),this.o=this.o.L,this},this.next=function(){return this.o===this.h&&(0, Ti.throwIteratorAccessError)(),this.o=this.o.B,this}):(this.pre=function(){return this.o.B===this.h&&(0, Ti.throwIteratorAccessError)(),this.o=this.o.B,this},this.next=function(){return this.o===this.h&&(0, Ti.throwIteratorAccessError)(),this.o=this.o.L,this});}};ei.HashContainerIterator=Ca;var Ba=class extends hp.Container{constructor(){super(),this.H=[],this.g={},this.HASH_TAG=Symbol(\"@@HASH_TAG\"),Object.setPrototypeOf(this.g,null),this.h={},this.h.L=this.h.B=this.p=this._=this.h;}V(e){let{L:r,B:i}=e;r.B=i,i.L=r,e===this.p&&(this.p=i),e===this._&&(this._=r),this.i-=1;}M(e,r,i){i===void 0&&(i=(0, Ra.default)(e));let n;if(i){let o=e[this.HASH_TAG];if(o!==void 0)return this.H[o].l=r,this.i;Object.defineProperty(e,this.HASH_TAG,{value:this.H.length,configurable:!0}),n={u:e,l:r,L:this._,B:this.h},this.H.push(n);}else {let o=this.g[e];if(o)return o.l=r,this.i;n={u:e,l:r,L:this._,B:this.h},this.g[e]=n;}return this.i===0?(this.p=n,this.h.B=n):this._.B=n,this._=n,this.h.L=n,++this.i}I(e,r){if(r===void 0&&(r=(0, Ra.default)(e)),r){let i=e[this.HASH_TAG];return i===void 0?this.h:this.H[i]}else return this.g[e]||this.h}clear(){let e=this.HASH_TAG;this.H.forEach(function(r){delete r.u[e];}),this.H=[],this.g={},Object.setPrototypeOf(this.g,null),this.i=0,this.p=this._=this.h.L=this.h.B=this.h;}eraseElementByKey(e,r){let i;if(r===void 0&&(r=(0, Ra.default)(e)),r){let n=e[this.HASH_TAG];if(n===void 0)return !1;delete e[this.HASH_TAG],i=this.H[n],delete this.H[n];}else {if(i=this.g[e],i===void 0)return !1;delete this.g[e];}return this.V(i),!0}eraseElementByIterator(e){let r=e.o;return r===this.h&&(0, Ti.throwIteratorAccessError)(),this.V(r),e.next()}eraseElementByPos(e){if(e<0||e>this.i-1)throw new RangeError;let r=this.p;for(;e--;)r=r.B;return this.V(r),this.i}};ei.HashContainer=Ba;});var pp=M(Yn=>{v();m();_();Object.defineProperty(Yn,\"t\",{value:!0});Yn.default=void 0;var dp=Pa(),ev=lt(),Er=class t extends dp.HashContainerIterator{constructor(e,r,i,n){super(e,r,n),this.container=i;}get pointer(){return this.o===this.h&&(0, ev.throwIteratorAccessError)(),this.o.u}copy(){return new t(this.o,this.h,this.container,this.iteratorType)}},Oa=class extends dp.HashContainer{constructor(e=[]){super();let r=this;e.forEach(function(i){r.insert(i);});}begin(){return new Er(this.p,this.h,this)}end(){return new Er(this.h,this.h,this)}rBegin(){return new Er(this._,this.h,this,1)}rEnd(){return new Er(this.h,this.h,this,1)}front(){return this.p.u}back(){return this._.u}insert(e,r){return this.M(e,void 0,r)}getElementByPos(e){if(e<0||e>this.i-1)throw new RangeError;let r=this.p;for(;e--;)r=r.B;return r.u}find(e,r){let i=this.I(e,r);return new Er(i,this.h,this)}forEach(e){let r=0,i=this.p;for(;i!==this.h;)e(i.u,r++,this),i=i.B;}[Symbol.iterator](){return function*(){let e=this.p;for(;e!==this.h;)yield e.u,e=e.B;}.bind(this)()}},tv=Oa;Yn.default=tv;});var yp=M(Jn=>{v();m();_();Object.defineProperty(Jn,\"t\",{value:!0});Jn.default=void 0;var gp=Pa(),rv=nv(Ta()),iv=lt();function nv(t){return t&&t.t?t:{default:t}}var Sr=class t extends gp.HashContainerIterator{constructor(e,r,i,n){super(e,r,n),this.container=i;}get pointer(){this.o===this.h&&(0, iv.throwIteratorAccessError)();let e=this;return new Proxy([],{get(r,i){if(i===\"0\")return e.o.u;if(i===\"1\")return e.o.l},set(r,i,n){if(i!==\"1\")throw new TypeError(\"props must be 1\");return e.o.l=n,!0}})}copy(){return new t(this.o,this.h,this.container,this.iteratorType)}},ka=class extends gp.HashContainer{constructor(e=[]){super();let r=this;e.forEach(function(i){r.setElement(i[0],i[1]);});}begin(){return new Sr(this.p,this.h,this)}end(){return new Sr(this.h,this.h,this)}rBegin(){return new Sr(this._,this.h,this,1)}rEnd(){return new Sr(this.h,this.h,this,1)}front(){if(this.i!==0)return [this.p.u,this.p.l]}back(){if(this.i!==0)return [this._.u,this._.l]}setElement(e,r,i){return this.M(e,r,i)}getElementByKey(e,r){if(r===void 0&&(r=(0, rv.default)(e)),r){let n=e[this.HASH_TAG];return n!==void 0?this.H[n].l:void 0}let i=this.g[e];return i?i.l:void 0}getElementByPos(e){if(e<0||e>this.i-1)throw new RangeError;let r=this.p;for(;e--;)r=r.B;return [r.u,r.l]}find(e,r){let i=this.I(e,r);return new Sr(i,this.h,this)}forEach(e){let r=0,i=this.p;for(;i!==this.h;)e([i.u,i.l],r++,this),i=i.B;}[Symbol.iterator](){return function*(){let e=this.p;for(;e!==this.h;)yield [e.u,e.l],e=e.B;}.bind(this)()}},sv=ka;Jn.default=sv;});var bp=M(je=>{v();m();_();Object.defineProperty(je,\"t\",{value:!0});Object.defineProperty(je,\"Deque\",{enumerable:!0,get:function(){return cv.default}});Object.defineProperty(je,\"HashMap\",{enumerable:!0,get:function(){return gv.default}});Object.defineProperty(je,\"HashSet\",{enumerable:!0,get:function(){return pv.default}});Object.defineProperty(je,\"LinkList\",{enumerable:!0,get:function(){return fv.default}});Object.defineProperty(je,\"OrderedMap\",{enumerable:!0,get:function(){return dv.default}});Object.defineProperty(je,\"OrderedSet\",{enumerable:!0,get:function(){return hv.default}});Object.defineProperty(je,\"PriorityQueue\",{enumerable:!0,get:function(){return lv.default}});Object.defineProperty(je,\"Queue\",{enumerable:!0,get:function(){return av.default}});Object.defineProperty(je,\"Stack\",{enumerable:!0,get:function(){return ov.default}});Object.defineProperty(je,\"Vector\",{enumerable:!0,get:function(){return uv.default}});var ov=ut(Zd()),av=ut(ep()),lv=ut(tp()),uv=ut(rp()),fv=ut(ip()),cv=ut(np()),hv=ut(up()),dv=ut(cp()),pv=ut(pp()),gv=ut(yp());function ut(t){return t&&t.t?t:{default:t}}});var _p=M((mN,wp)=>{v();m();_();var yv=bp().OrderedSet,ft=ot()(\"number-allocator:trace\"),bv=ot()(\"number-allocator:error\");function Te(t,e){this.low=t,this.high=e;}Te.prototype.equals=function(t){return this.low===t.low&&this.high===t.high};Te.prototype.compare=function(t){return this.lowr.compare(i)),ft(\"Create\"),this.clear();}ct.prototype.firstVacant=function(){return this.ss.size()===0?null:this.ss.front().low};ct.prototype.alloc=function(){if(this.ss.size()===0)return ft(\"alloc():empty\"),null;let t=this.ss.begin(),e=t.pointer.low,r=t.pointer.high,i=e;return i+1<=r?this.ss.updateKeyByIterator(t,new Te(e+1,r)):this.ss.eraseElementByPos(0),ft(\"alloc():\"+i),i};ct.prototype.use=function(t){let e=new Te(t,t),r=this.ss.lowerBound(e);if(!r.equals(this.ss.end())){let i=r.pointer.low,n=r.pointer.high;return r.pointer.equals(e)?(this.ss.eraseElementByIterator(r),ft(\"use():\"+t),!0):i>t?!1:i===t?(this.ss.updateKeyByIterator(r,new Te(i+1,n)),ft(\"use():\"+t),!0):n===t?(this.ss.updateKeyByIterator(r,new Te(i,n-1)),ft(\"use():\"+t),!0):(this.ss.updateKeyByIterator(r,new Te(t+1,n)),this.ss.insert(new Te(i,t-1)),ft(\"use():\"+t),!0)}return ft(\"use():failed\"),!1};ct.prototype.free=function(t){if(tthis.max){bv(\"free():\"+t+\" is out of range\");return}let e=new Te(t,t),r=this.ss.upperBound(e);if(r.equals(this.ss.end())){if(r.equals(this.ss.begin())){this.ss.insert(e);return}r.pre();let i=r.pointer.high;r.pointer.high+1===t?this.ss.updateKeyByIterator(r,new Te(i,t)):this.ss.insert(e);}else if(r.equals(this.ss.begin()))if(t+1===r.pointer.low){let i=r.pointer.high;this.ss.updateKeyByIterator(r,new Te(t,i));}else this.ss.insert(e);else {let i=r.pointer.low,n=r.pointer.high;r.pre();let o=r.pointer.low;r.pointer.high+1===t?t+1===i?(this.ss.eraseElementByIterator(r),this.ss.updateKeyByIterator(r,new Te(o,n))):this.ss.updateKeyByIterator(r,new Te(o,t)):t+1===i?(this.ss.eraseElementByIterator(r.next()),this.ss.insert(new Te(t,n))):this.ss.insert(e);}ft(\"free():\"+t);};ct.prototype.clear=function(){ft(\"clear()\"),this.ss.clear(),this.ss.insert(new Te(this.min,this.max));};ct.prototype.intervalCount=function(){return this.ss.size()};ct.prototype.dump=function(){console.log(\"length:\"+this.ss.size());for(let t of this.ss)console.log(t);};wp.exports=ct;});var xa=M((PN,mp)=>{v();m();_();var wv=_p();mp.exports.NumberAllocator=wv;});var vp=M(La=>{v();m();_();Object.defineProperty(La,\"__esModule\",{value:!0});var _v=Xd(),mv=xa(),Ma=class{constructor(e){e>0&&(this.aliasToTopic=new _v.LRUCache({max:e}),this.topicToAlias={},this.numberAllocator=new mv.NumberAllocator(1,e),this.max=e,this.length=0);}put(e,r){if(r===0||r>this.max)return !1;let i=this.aliasToTopic.get(r);return i&&delete this.topicToAlias[i],this.aliasToTopic.set(r,e),this.topicToAlias[e]=r,this.numberAllocator.use(r),this.length=this.aliasToTopic.size,!0}getTopicByAlias(e){return this.aliasToTopic.get(e)}getAliasByTopic(e){let r=this.topicToAlias[e];return typeof r<\"u\"&&this.aliasToTopic.get(r),r}clear(){this.aliasToTopic.clear(),this.topicToAlias={},this.numberAllocator.clear(),this.length=0;}getLruAlias(){let e=this.numberAllocator.firstVacant();return e||[...this.aliasToTopic.keys()][this.aliasToTopic.size-1]}};La.default=Ma;});var Ep=M(Ri=>{v();m();_();var vv=Ri&&Ri.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Ri,\"__esModule\",{value:!0});var Ev=Ai(),Sv=vv(vp()),Av=Jr(),Iv=(t,e)=>{t.log(\"_handleConnack\");let{options:r}=t,n=r.protocolVersion===5?e.reasonCode:e.returnCode;if(clearTimeout(t.connackTimer),delete t.topicAliasSend,e.properties){if(e.properties.topicAliasMaximum){if(e.properties.topicAliasMaximum>65535){t.emit(\"error\",new Error(\"topicAliasMaximum from broker is out of range\"));return}e.properties.topicAliasMaximum>0&&(t.topicAliasSend=new Sv.default(e.properties.topicAliasMaximum));}e.properties.serverKeepAlive&&r.keepalive&&(r.keepalive=e.properties.serverKeepAlive,t._shiftPingInterval()),e.properties.maximumPacketSize&&(r.properties||(r.properties={}),r.properties.maximumPacketSize=e.properties.maximumPacketSize);}if(n===0)t.reconnecting=!1,t._onConnect(e);else if(n>0){let o=new Av.ErrorWithReasonCode(`Connection refused: ${Ev.ReasonCodes[n]}`,n);t.emit(\"error\",o);}};Ri.default=Iv;});var Sp=M(Ua=>{v();m();_();Object.defineProperty(Ua,\"__esModule\",{value:!0});var Tv=(t,e,r)=>{t.log(\"handling pubrel packet\");let i=typeof r<\"u\"?r:t.noop,{messageId:n}=e,o={cmd:\"pubcomp\",messageId:n};t.incomingStore.get(e,(s,a)=>{s?t._sendPacket(o,i):(t.emit(\"message\",a.topic,a.payload,a),t.handleMessage(a,u=>{if(u)return i(u);t.incomingStore.del(a,t.noop),t._sendPacket(o,i);}));});};Ua.default=Tv;});var Ap=M(Ci=>{v();m();_();var Bi=Ci&&Ci.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Ci,\"__esModule\",{value:!0});var Rv=Bi(Vd()),Cv=Bi(Kd()),Bv=Bi(Ep()),Pv=Bi(Ai()),Ov=Bi(Sp()),kv=(t,e,r)=>{let{options:i}=t;if(i.protocolVersion===5&&i.properties&&i.properties.maximumPacketSize&&i.properties.maximumPacketSize{v();m();_();var xv=ti&&ti.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(ti,\"__esModule\",{value:!0});ti.TypedEventEmitter=void 0;var Mv=xv((ir(),X(rr))),Lv=Jr(),Xn=class{};ti.TypedEventEmitter=Xn;(0, Lv.applyMixin)(Xn,Mv.default);});var Pi=M(Ar=>{v();m();_();Object.defineProperty(Ar,\"__esModule\",{value:!0});Ar.isReactNativeBrowser=Ar.isWebWorker=void 0;var Uv=()=>typeof window<\"u\"&&typeof window.document<\"u\",Tp=()=>{var t,e;return !!(typeof self==\"object\"&&(!((e=(t=self?.constructor)===null||t===void 0?void 0:t.name)===null||e===void 0)&&e.includes(\"WorkerGlobalScope\")))},Rp=()=>typeof B<\"u\"&&B.product===\"ReactNative\",Nv=Uv()||Tp()||Rp();Ar.isWebWorker=Tp();Ar.isReactNativeBrowser=Rp();Ar.default=Nv;});var Bp=M((Zn,Cp)=>{v();m();_();(function(t,e){typeof Zn==\"object\"&&typeof Cp<\"u\"?e(Zn):typeof define==\"function\"&&define.amd?define([\"exports\"],e):(t=typeof globalThis<\"u\"?globalThis:t||self,e(t.fastUniqueNumbers={}));})(Zn,function(t){var e=function(g){return function(y){var w=g(y);return y.add(w),w}},r=function(g){return function(y,w){return g.set(y,w),w}},i=Number.MAX_SAFE_INTEGER===void 0?9007199254740991:Number.MAX_SAFE_INTEGER,n=536870912,o=n*2,s=function(g,y){return function(w){var E=y.get(w),S=E===void 0?w.size:Ei)throw new Error(\"Congratulations, you created a collection of unique numbers which uses all available integers!\");for(;w.has(S);)S=Math.floor(Math.random()*i);return g(w,S)}},a=new WeakMap,u=r(a),c=s(u,a),h=e(c);t.addUniqueNumber=h,t.generateUniqueNumber=c;});});var Op=M((es,Pp)=>{v();m();_();(function(t,e){typeof es==\"object\"&&typeof Pp<\"u\"?e(es,Bp()):typeof define==\"function\"&&define.amd?define([\"exports\",\"fast-unique-numbers\"],e):(t=typeof globalThis<\"u\"?globalThis:t||self,e(t.workerTimersBroker={},t.fastUniqueNumbers));})(es,function(t,e){var r=function(s){return s.method!==void 0&&s.method===\"call\"},i=function(s){return s.error===null&&typeof s.id==\"number\"},n=function(s){var a=new Map([[0,function(){}]]),u=new Map([[0,function(){}]]),c=new Map,h=new Worker(s);h.addEventListener(\"message\",function(E){var S=E.data;if(r(S)){var I=S.params,C=I.timerId,R=I.timerType;if(R===\"interval\"){var U=a.get(C);if(typeof U==\"number\"){var N=c.get(U);if(N===void 0||N.timerId!==C||N.timerType!==R)throw new Error(\"The timer is in an undefined state.\")}else if(typeof U<\"u\")U();else throw new Error(\"The timer is in an undefined state.\")}else if(R===\"timeout\"){var W=u.get(C);if(typeof W==\"number\"){var K=c.get(W);if(K===void 0||K.timerId!==C||K.timerType!==R)throw new Error(\"The timer is in an undefined state.\")}else if(typeof W<\"u\")W(),u.delete(C);else throw new Error(\"The timer is in an undefined state.\")}}else if(i(S)){var z=S.id,Q=c.get(z);if(Q===void 0)throw new Error(\"The timer is in an undefined state.\");var de=Q.timerId,Gt=Q.timerType;c.delete(z),Gt===\"interval\"?a.delete(de):u.delete(de);}else {var pe=S.error.message;throw new Error(pe)}});var d=function(S){var I=e.generateUniqueNumber(c);c.set(I,{timerId:S,timerType:\"interval\"}),a.set(S,I),h.postMessage({id:I,method:\"clear\",params:{timerId:S,timerType:\"interval\"}});},g=function(S){var I=e.generateUniqueNumber(c);c.set(I,{timerId:S,timerType:\"timeout\"}),u.set(S,I),h.postMessage({id:I,method:\"clear\",params:{timerId:S,timerType:\"timeout\"}});},y=function(S){var I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,C=e.generateUniqueNumber(a);return a.set(C,function(){S(),typeof a.get(C)==\"function\"&&h.postMessage({id:null,method:\"set\",params:{delay:I,now:performance.now(),timerId:C,timerType:\"interval\"}});}),h.postMessage({id:null,method:\"set\",params:{delay:I,now:performance.now(),timerId:C,timerType:\"interval\"}}),C},w=function(S){var I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,C=e.generateUniqueNumber(u);return u.set(C,S),h.postMessage({id:null,method:\"set\",params:{delay:I,now:performance.now(),timerId:C,timerType:\"timeout\"}}),C};return {clearInterval:d,clearTimeout:g,setInterval:y,setTimeout:w}};t.load=n;});});var xp=M((ts,kp)=>{v();m();_();(function(t,e){typeof ts==\"object\"&&typeof kp<\"u\"?e(ts,Op()):typeof define==\"function\"&&define.amd?define([\"exports\",\"worker-timers-broker\"],e):(t=typeof globalThis<\"u\"?globalThis:t||self,e(t.workerTimers={},t.workerTimersBroker));})(ts,function(t,e){var r=function(h,d){var g=null;return function(){if(g!==null)return g;var y=new Blob([d],{type:\"application/javascript; charset=utf-8\"}),w=URL.createObjectURL(y);return g=h(w),setTimeout(function(){return URL.revokeObjectURL(w)}),g}},i=`(()=>{var e={472:(e,t,r)=>{var o,i;void 0===(i=\"function\"==typeof(o=function(){\"use strict\";var e=new Map,t=new Map,r=function(t){var r=e.get(t);if(void 0===r)throw new Error('There is no interval scheduled with the given id \"'.concat(t,'\".'));clearTimeout(r),e.delete(t)},o=function(e){var r=t.get(e);if(void 0===r)throw new Error('There is no timeout scheduled with the given id \"'.concat(e,'\".'));clearTimeout(r),t.delete(e)},i=function(e,t){var r,o=performance.now();return{expected:o+(r=e-Math.max(0,o-t)),remainingDelay:r}},n=function e(t,r,o,i){var n=performance.now();n>o?postMessage({id:null,method:\"call\",params:{timerId:r,timerType:i}}):t.set(r,setTimeout(e,o-n,t,r,o,i))},a=function(t,r,o){var a=i(t,o),s=a.expected,d=a.remainingDelay;e.set(r,setTimeout(n,d,e,r,s,\"interval\"))},s=function(e,r,o){var a=i(e,o),s=a.expected,d=a.remainingDelay;t.set(r,setTimeout(n,d,t,r,s,\"timeout\"))};addEventListener(\"message\",(function(e){var t=e.data;try{if(\"clear\"===t.method){var i=t.id,n=t.params,d=n.timerId,c=n.timerType;if(\"interval\"===c)r(d),postMessage({error:null,id:i});else{if(\"timeout\"!==c)throw new Error('The given type \"'.concat(c,'\" is not supported'));o(d),postMessage({error:null,id:i})}}else{if(\"set\"!==t.method)throw new Error('The given method \"'.concat(t.method,'\" is not supported'));var u=t.params,l=u.delay,p=u.now,m=u.timerId,v=u.timerType;if(\"interval\"===v)a(l,m,p);else{if(\"timeout\"!==v)throw new Error('The given type \"'.concat(v,'\" is not supported'));s(l,m,p)}}}catch(e){postMessage({error:{message:e.message},id:t.id,result:null})}}))})?o.call(t,r,t,e):o)||(e.exports=i)}},t={};function r(o){var i=t[o];if(void 0!==i)return i.exports;var n=t[o]={exports:{}};return e[o](n,n.exports,r),n.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var o in t)r.o(t,o)&&!r.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{\"use strict\";r(472)})()})();`,n=r(e.load,i),o=function(h){return n().clearInterval(h)},s=function(h){return n().clearTimeout(h)},a=function(){var h;return (h=n()).setInterval.apply(h,arguments)},u=function(){var h;return (h=n()).setTimeout.apply(h,arguments)};t.clearInterval=o,t.clearTimeout=s,t.setInterval=a,t.setTimeout=u;});});var Np=M(Rt=>{v();m();_();var qv=Rt&&Rt.__createBinding||(Object.create?function(t,e,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(e,r);(!n||(\"get\"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,i,n);}:function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r];}),Dv=Rt&&Rt.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,\"default\",{enumerable:!0,value:e});}:function(t,e){t.default=e;}),jv=Rt&&Rt.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!==\"default\"&&Object.prototype.hasOwnProperty.call(t,r)&&qv(e,t,r);return Dv(e,t),e};Object.defineProperty(Rt,\"__esModule\",{value:!0});var Na=jv(Pi()),Mp=xp(),Lp={set:Mp.setTimeout,clear:Mp.clearTimeout},Up={set:(t,e)=>setTimeout(t,e),clear:t=>clearTimeout(t)},Fv=t=>{switch(t){case\"native\":return Up;case\"worker\":return Lp;case\"auto\":default:return Na.default&&!Na.isWebWorker&&!Na.isReactNativeBrowser?Lp:Up}};Rt.default=Fv;});var Da=M(Oi=>{v();m();_();var Wv=Oi&&Oi.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Oi,\"__esModule\",{value:!0});var $v=Wv(Np()),qa=class{constructor(e,r,i){this.keepalive=e*1e3,this.checkPing=r,this.timer=(0, $v.default)(i),this.reschedule();}clear(){this.timerId&&(this.timer.clear(this.timerId),this.timerId=null);}reschedule(){this.clear(),this.timerId=this.timer.set(()=>{this.checkPing(),this.timerId&&this.reschedule();},this.keepalive);}};Oi.default=qa;});var ns=M(Qe=>{v();m();_();var Hv=Qe&&Qe.__createBinding||(Object.create?function(t,e,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(e,r);(!n||(\"get\"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,i,n);}:function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r];}),Vv=Qe&&Qe.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,\"default\",{enumerable:!0,value:e});}:function(t,e){t.default=e;}),Wp=Qe&&Qe.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!==\"default\"&&Object.prototype.hasOwnProperty.call(t,r)&&Hv(e,t,r);return Vv(e,t),e},Vt=Qe&&Qe.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Qe,\"__esModule\",{value:!0});var zv=Vt(Gu()),ja=Vt(Nd()),Kv=Vt(Yo()),Gv=Dt(),qp=Vt(Fd()),Dp=Wp($d()),Qv=Vt(ot()),rs=Vt(Zo()),Yv=Vt(Ap()),Wa=Jr(),Jv=Ip(),Xv=Vt(Da()),jp=Wp(Pi()),Fa=globalThis.setImmediate||((...t)=>{let e=t.shift();(0, Wa.nextTick)(()=>{e(...t);});}),Fp={keepalive:60,reschedulePings:!0,protocolId:\"MQTT\",protocolVersion:4,reconnectPeriod:1e3,connectTimeout:30*1e3,clean:!0,resubscribe:!0,writeCache:!0,timerVariant:\"auto\"},is=class t extends Jv.TypedEventEmitter{static defaultId(){return `mqttjs_${Math.random().toString(16).substr(2,8)}`}constructor(e,r){super(),this.options=r||{};for(let i in Fp)typeof this.options[i]>\"u\"?this.options[i]=Fp[i]:this.options[i]=r[i];this.log=this.options.log||(0, Qv.default)(\"mqttjs:client\"),this.noop=this._noop.bind(this),this.log(\"MqttClient :: version:\",t.VERSION),jp.isWebWorker?this.log(\"MqttClient :: environment\",\"webworker\"):this.log(\"MqttClient :: environment\",jp.default?\"browser\":\"node\"),this.log(\"MqttClient :: options.protocol\",r.protocol),this.log(\"MqttClient :: options.protocolVersion\",r.protocolVersion),this.log(\"MqttClient :: options.username\",r.username),this.log(\"MqttClient :: options.keepalive\",r.keepalive),this.log(\"MqttClient :: options.reconnectPeriod\",r.reconnectPeriod),this.log(\"MqttClient :: options.rejectUnauthorized\",r.rejectUnauthorized),this.log(\"MqttClient :: options.properties.topicAliasMaximum\",r.properties?r.properties.topicAliasMaximum:void 0),this.options.clientId=typeof r.clientId==\"string\"?r.clientId:t.defaultId(),this.log(\"MqttClient :: clientId\",this.options.clientId),this.options.customHandleAcks=r.protocolVersion===5&&r.customHandleAcks?r.customHandleAcks:(...i)=>{i[3](null,0);},this.options.writeCache||(ja.default.writeToStream.cacheNumbers=!1),this.streamBuilder=e,this.messageIdProvider=typeof this.options.messageIdProvider>\"u\"?new Kv.default:this.options.messageIdProvider,this.outgoingStore=r.outgoingStore||new rs.default,this.incomingStore=r.incomingStore||new rs.default,this.queueQoSZero=r.queueQoSZero===void 0?!0:r.queueQoSZero,this._resubscribeTopics={},this.messageIdToTopic={},this.pingTimer=null,this.connected=!1,this.disconnecting=!1,this.reconnecting=!1,this.queue=[],this.connackTimer=null,this.reconnectTimer=null,this._storeProcessing=!1,this._packetIdsDuringStoreProcessing={},this._storeProcessingQueue=[],this.outgoing={},this._firstConnection=!0,r.properties&&r.properties.topicAliasMaximum>0&&(r.properties.topicAliasMaximum>65535?this.log(\"MqttClient :: options.properties.topicAliasMaximum is out of range\"):this.topicAliasRecv=new zv.default(r.properties.topicAliasMaximum)),this.on(\"connect\",()=>{let{queue:i}=this,n=()=>{let o=i.shift();this.log(\"deliver :: entry %o\",o);let s=null;if(!o){this._resubscribe();return}s=o.packet,this.log(\"deliver :: call _sendPacket for %o\",s);let a=!0;s.messageId&&s.messageId!==0&&(this.messageIdProvider.register(s.messageId)||(a=!1)),a?this._sendPacket(s,u=>{o.cb&&o.cb(u),n();}):(this.log(\"messageId: %d has already used. The message is skipped and removed.\",s.messageId),n());};this.log(\"connect :: sending queued packets\"),n();}),this.on(\"close\",()=>{this.log(\"close :: connected set to `false`\"),this.connected=!1,this.log(\"close :: clearing connackTimer\"),clearTimeout(this.connackTimer),this.log(\"close :: clearing ping timer\"),this.pingTimer&&(this.pingTimer.clear(),this.pingTimer=null),this.topicAliasRecv&&this.topicAliasRecv.clear(),this.log(\"close :: calling _setupReconnect\"),this._setupReconnect();}),this.options.manualConnect||(this.log(\"MqttClient :: setting up stream\"),this.connect());}handleAuth(e,r){r();}handleMessage(e,r){r();}_nextId(){return this.messageIdProvider.allocate()}getLastMessageId(){return this.messageIdProvider.getLastAllocated()}connect(){var e;let r=new Gv.Writable,i=ja.default.parser(this.options),n=null,o=[];this.log(\"connect :: calling method to clear reconnect\"),this._clearReconnect(),this.log(\"connect :: using streamBuilder provided to client to create stream\"),this.stream=this.streamBuilder(this),i.on(\"packet\",h=>{this.log(\"parser :: on packet push to packets array.\"),o.push(h);});let s=()=>{this.log(\"work :: getting next packet in queue\");let h=o.shift();if(h)this.log(\"work :: packet pulled from queue\"),(0, Yv.default)(this,h,a);else {this.log(\"work :: no packets in queue\");let d=n;n=null,this.log(\"work :: done flag is %s\",!!d),d&&d();}},a=()=>{if(o.length)(0, Wa.nextTick)(s);else {let h=n;n=null,h();}};r._write=(h,d,g)=>{n=g,this.log(\"writable stream :: parsing buffer\"),i.parse(h),s();};let u=h=>{this.log(\"streamErrorHandler :: error\",h.message),h.code?(this.log(\"streamErrorHandler :: emitting error\"),this.emit(\"error\",h)):this.noop(h);};this.log(\"connect :: pipe stream to writable stream\"),this.stream.pipe(r),this.stream.on(\"error\",u),this.stream.on(\"close\",()=>{this.log(\"(%s)stream :: on close\",this.options.clientId),this._flushVolatile(),this.log(\"stream: emit close to MqttClient\"),this.emit(\"close\");}),this.log(\"connect: sending packet `connect`\");let c={cmd:\"connect\",protocolId:this.options.protocolId,protocolVersion:this.options.protocolVersion,clean:this.options.clean,clientId:this.options.clientId,keepalive:this.options.keepalive,username:this.options.username,password:this.options.password,properties:this.options.properties};if(this.options.will&&(c.will=Object.assign(Object.assign({},this.options.will),{payload:(e=this.options.will)===null||e===void 0?void 0:e.payload})),this.topicAliasRecv&&(c.properties||(c.properties={}),this.topicAliasRecv&&(c.properties.topicAliasMaximum=this.topicAliasRecv.max)),this._writePacket(c),i.on(\"error\",this.emit.bind(this,\"error\")),this.options.properties){if(!this.options.properties.authenticationMethod&&this.options.properties.authenticationData)return this.end(()=>this.emit(\"error\",new Error(\"Packet has no Authentication Method\"))),this;if(this.options.properties.authenticationMethod&&this.options.authPacket&&typeof this.options.authPacket==\"object\"){let h=Object.assign({cmd:\"auth\",reasonCode:0},this.options.authPacket);this._writePacket(h);}}return this.stream.setMaxListeners(1e3),clearTimeout(this.connackTimer),this.connackTimer=setTimeout(()=>{this.log(\"!!connectTimeout hit!! Calling _cleanUp with force `true`\"),this.emit(\"error\",new Error(\"connack timeout\")),this._cleanUp(!0);},this.options.connectTimeout),this}publish(e,r,i,n){this.log(\"publish :: message `%s` to topic `%s`\",r,e);let{options:o}=this;typeof i==\"function\"&&(n=i,i=null),i=i||{},i=Object.assign(Object.assign({},{qos:0,retain:!1,dup:!1}),i);let{qos:a,retain:u,dup:c,properties:h,cbStorePut:d}=i;if(this._checkDisconnecting(n))return this;let g=()=>{let y=0;if((a===1||a===2)&&(y=this._nextId(),y===null))return this.log(\"No messageId left\"),!1;let w={cmd:\"publish\",topic:e,payload:r,qos:a,retain:u,messageId:y,dup:c};switch(o.protocolVersion===5&&(w.properties=h),this.log(\"publish :: qos\",a),a){case 1:case 2:this.outgoing[w.messageId]={volatile:!1,cb:n||this.noop},this.log(\"MqttClient:publish: packet cmd: %s\",w.cmd),this._sendPacket(w,void 0,d);break;default:this.log(\"MqttClient:publish: packet cmd: %s\",w.cmd),this._sendPacket(w,n,d);break}return !0};return (this._storeProcessing||this._storeProcessingQueue.length>0||!g())&&this._storeProcessingQueue.push({invoke:g,cbStorePut:i.cbStorePut,callback:n}),this}publishAsync(e,r,i){return new Promise((n,o)=>{this.publish(e,r,i,(s,a)=>{s?o(s):n(a);});})}subscribe(e,r,i){let n=this.options.protocolVersion;typeof r==\"function\"&&(i=r),i=i||this.noop;let o=!1,s=[];typeof e==\"string\"?(e=[e],s=e):Array.isArray(e)?s=e:typeof e==\"object\"&&(o=e.resubscribe,delete e.resubscribe,s=Object.keys(e));let a=Dp.validateTopics(s);if(a!==null)return Fa(i,new Error(`Invalid topic ${a}`)),this;if(this._checkDisconnecting(i))return this.log(\"subscribe: discconecting true\"),this;let u={qos:0};n===5&&(u.nl=!1,u.rap=!1,u.rh=0),r=Object.assign(Object.assign({},u),r);let c=r.properties,h=[],d=(y,w)=>{if(w=w||r,!Object.prototype.hasOwnProperty.call(this._resubscribeTopics,y)||this._resubscribeTopics[y].qos{this.log(\"subscribe: array topic %s\",y),d(y);}):Object.keys(e).forEach(y=>{this.log(\"subscribe: object topic %s, %o\",y,e[y]),d(y,e[y]);}),!h.length)return i(null,[]),this;let g=()=>{let y=this._nextId();if(y===null)return this.log(\"No messageId left\"),!1;let w={cmd:\"subscribe\",subscriptions:h,messageId:y};if(c&&(w.properties=c),this.options.resubscribe){this.log(\"subscribe :: resubscribe true\");let E=[];h.forEach(S=>{if(this.options.reconnectPeriod>0){let I={qos:S.qos};n===5&&(I.nl=S.nl||!1,I.rap=S.rap||!1,I.rh=S.rh||0,I.properties=S.properties),this._resubscribeTopics[S.topic]=I,E.push(S.topic);}}),this.messageIdToTopic[w.messageId]=E;}return this.outgoing[w.messageId]={volatile:!0,cb(E,S){if(!E){let{granted:I}=S;for(let C=0;C0||!g())&&this._storeProcessingQueue.push({invoke:g,callback:i}),this}subscribeAsync(e,r){return new Promise((i,n)=>{this.subscribe(e,r,(o,s)=>{o?n(o):i(s);});})}unsubscribe(e,r,i){typeof e==\"string\"&&(e=[e]),typeof r==\"function\"&&(i=r),i=i||this.noop;let n=Dp.validateTopics(e);if(n!==null)return Fa(i,new Error(`Invalid topic ${n}`)),this;if(this._checkDisconnecting(i))return this;let o=()=>{let s=this._nextId();if(s===null)return this.log(\"No messageId left\"),!1;let a={cmd:\"unsubscribe\",messageId:s,unsubscriptions:[]};return typeof e==\"string\"?a.unsubscriptions=[e]:Array.isArray(e)&&(a.unsubscriptions=e),this.options.resubscribe&&a.unsubscriptions.forEach(u=>{delete this._resubscribeTopics[u];}),typeof r==\"object\"&&r.properties&&(a.properties=r.properties),this.outgoing[a.messageId]={volatile:!0,cb:i},this.log(\"unsubscribe: call _sendPacket\"),this._sendPacket(a),!0};return (this._storeProcessing||this._storeProcessingQueue.length>0||!o())&&this._storeProcessingQueue.push({invoke:o,callback:i}),this}unsubscribeAsync(e,r){return new Promise((i,n)=>{this.unsubscribe(e,r,(o,s)=>{o?n(o):i(s);});})}end(e,r,i){this.log(\"end :: (%s)\",this.options.clientId),(e==null||typeof e!=\"boolean\")&&(i=i||r,r=e,e=!1),typeof r!=\"object\"&&(i=i||r,r=null),this.log(\"end :: cb? %s\",!!i),(!i||typeof i!=\"function\")&&(i=this.noop);let n=()=>{this.log(\"end :: closeStores: closing incoming and outgoing stores\"),this.disconnected=!0,this.incomingStore.close(s=>{this.outgoingStore.close(a=>{if(this.log(\"end :: closeStores: emitting end\"),this.emit(\"end\"),i){let u=s||a;this.log(\"end :: closeStores: invoking callback with args\"),i(u);}});}),this._deferredReconnect&&this._deferredReconnect();},o=()=>{this.log(\"end :: (%s) :: finish :: calling _cleanUp with force %s\",this.options.clientId,e),this._cleanUp(e,()=>{this.log(\"end :: finish :: calling process.nextTick on closeStores\"),(0, Wa.nextTick)(n);},r);};return this.disconnecting?(i(),this):(this._clearReconnect(),this.disconnecting=!0,!e&&Object.keys(this.outgoing).length>0?(this.log(\"end :: (%s) :: calling finish in 10ms once outgoing is empty\",this.options.clientId),this.once(\"outgoingEmpty\",setTimeout.bind(null,o,10))):(this.log(\"end :: (%s) :: immediately calling finish\",this.options.clientId),o()),this)}endAsync(e,r){return new Promise((i,n)=>{this.end(e,r,o=>{o?n(o):i();});})}removeOutgoingMessage(e){if(this.outgoing[e]){let{cb:r}=this.outgoing[e];this._removeOutgoingAndStoreMessage(e,()=>{r(new Error(\"Message removed\"));});}return this}reconnect(e){this.log(\"client reconnect\");let r=()=>{e?(this.options.incomingStore=e.incomingStore,this.options.outgoingStore=e.outgoingStore):(this.options.incomingStore=null,this.options.outgoingStore=null),this.incomingStore=this.options.incomingStore||new rs.default,this.outgoingStore=this.options.outgoingStore||new rs.default,this.disconnecting=!1,this.disconnected=!1,this._deferredReconnect=null,this._reconnect();};return this.disconnecting&&!this.disconnected?this._deferredReconnect=r:r(),this}_flushVolatile(){this.outgoing&&(this.log(\"_flushVolatile :: deleting volatile messages from the queue and setting their callbacks as error function\"),Object.keys(this.outgoing).forEach(e=>{this.outgoing[e].volatile&&typeof this.outgoing[e].cb==\"function\"&&(this.outgoing[e].cb(new Error(\"Connection closed\")),delete this.outgoing[e]);}));}_flush(){this.outgoing&&(this.log(\"_flush: queue exists? %b\",!!this.outgoing),Object.keys(this.outgoing).forEach(e=>{typeof this.outgoing[e].cb==\"function\"&&(this.outgoing[e].cb(new Error(\"Connection closed\")),delete this.outgoing[e]);}));}_removeTopicAliasAndRecoverTopicName(e){let r;e.properties&&(r=e.properties.topicAlias);let i=e.topic.toString();if(this.log(\"_removeTopicAliasAndRecoverTopicName :: alias %d, topic %o\",r,i),i.length===0){if(typeof r>\"u\")return new Error(\"Unregistered Topic Alias\");if(i=this.topicAliasSend.getTopicByAlias(r),typeof i>\"u\")return new Error(\"Unregistered Topic Alias\");e.topic=i;}r&&delete e.properties.topicAlias;}_checkDisconnecting(e){return this.disconnecting&&(e&&e!==this.noop?e(new Error(\"client disconnecting\")):this.emit(\"error\",new Error(\"client disconnecting\"))),this.disconnecting}_reconnect(){this.log(\"_reconnect: emitting reconnect to client\"),this.emit(\"reconnect\"),this.connected?(this.end(()=>{this.connect();}),this.log(\"client already connected. disconnecting first.\")):(this.log(\"_reconnect: calling connect\"),this.connect());}_setupReconnect(){!this.disconnecting&&!this.reconnectTimer&&this.options.reconnectPeriod>0?(this.reconnecting||(this.log(\"_setupReconnect :: emit `offline` state\"),this.emit(\"offline\"),this.log(\"_setupReconnect :: set `reconnecting` to `true`\"),this.reconnecting=!0),this.log(\"_setupReconnect :: setting reconnectTimer for %d ms\",this.options.reconnectPeriod),this.reconnectTimer=setInterval(()=>{this.log(\"reconnectTimer :: reconnect triggered!\"),this._reconnect();},this.options.reconnectPeriod)):this.log(\"_setupReconnect :: doing nothing...\");}_clearReconnect(){this.log(\"_clearReconnect : clearing reconnect timer\"),this.reconnectTimer&&(clearInterval(this.reconnectTimer),this.reconnectTimer=null);}_cleanUp(e,r,i={}){if(r&&(this.log(\"_cleanUp :: done callback provided for on stream close\"),this.stream.on(\"close\",r)),this.log(\"_cleanUp :: forced? %s\",e),e)this.options.reconnectPeriod===0&&this.options.clean&&this._flush(),this.log(\"_cleanUp :: (%s) :: destroying stream\",this.options.clientId),this.stream.destroy();else {let n=Object.assign({cmd:\"disconnect\"},i);this.log(\"_cleanUp :: (%s) :: call _sendPacket with disconnect packet\",this.options.clientId),this._sendPacket(n,()=>{this.log(\"_cleanUp :: (%s) :: destroying stream\",this.options.clientId),Fa(()=>{this.stream.end(()=>{this.log(\"_cleanUp :: (%s) :: stream destroyed\",this.options.clientId);});});});}!this.disconnecting&&!this.reconnecting&&(this.log(\"_cleanUp :: client not disconnecting/reconnecting. Clearing and resetting reconnect.\"),this._clearReconnect(),this._setupReconnect()),this.pingTimer&&(this.log(\"_cleanUp :: clearing pingTimer\"),this.pingTimer.clear(),this.pingTimer=null),r&&!this.connected&&(this.log(\"_cleanUp :: (%s) :: removing stream `done` callback `close` listener\",this.options.clientId),this.stream.removeListener(\"close\",r),r());}_storeAndSend(e,r,i){this.log(\"storeAndSend :: store packet with cmd %s to outgoingStore\",e.cmd);let n=e,o;if(n.cmd===\"publish\"&&(n=(0, qp.default)(e),o=this._removeTopicAliasAndRecoverTopicName(n),o))return r&&r(o);this.outgoingStore.put(n,s=>{if(s)return r&&r(s);i(),this._writePacket(e,r);});}_applyTopicAlias(e){if(this.options.protocolVersion===5&&e.cmd===\"publish\"){let r;e.properties&&(r=e.properties.topicAlias);let i=e.topic.toString();if(this.topicAliasSend)if(r){if(i.length!==0&&(this.log(\"applyTopicAlias :: register topic: %s - alias: %d\",i,r),!this.topicAliasSend.put(i,r)))return this.log(\"applyTopicAlias :: error out of range. topic: %s - alias: %d\",i,r),new Error(\"Sending Topic Alias out of range\")}else i.length!==0&&(this.options.autoAssignTopicAlias?(r=this.topicAliasSend.getAliasByTopic(i),r?(e.topic=\"\",e.properties=Object.assign(Object.assign({},e.properties),{topicAlias:r}),this.log(\"applyTopicAlias :: auto assign(use) topic: %s - alias: %d\",i,r)):(r=this.topicAliasSend.getLruAlias(),this.topicAliasSend.put(i,r),e.properties=Object.assign(Object.assign({},e.properties),{topicAlias:r}),this.log(\"applyTopicAlias :: auto assign topic: %s - alias: %d\",i,r))):this.options.autoUseTopicAlias&&(r=this.topicAliasSend.getAliasByTopic(i),r&&(e.topic=\"\",e.properties=Object.assign(Object.assign({},e.properties),{topicAlias:r}),this.log(\"applyTopicAlias :: auto use topic: %s - alias: %d\",i,r))));else if(r)return this.log(\"applyTopicAlias :: error out of range. topic: %s - alias: %d\",i,r),new Error(\"Sending Topic Alias out of range\")}}_noop(e){this.log(\"noop ::\",e);}_writePacket(e,r){this.log(\"_writePacket :: packet: %O\",e),this.log(\"_writePacket :: emitting `packetsend`\"),this.emit(\"packetsend\",e),this._shiftPingInterval(),this.log(\"_writePacket :: writing to stream\");let i=ja.default.writeToStream(e,this.stream,this.options);this.log(\"_writePacket :: writeToStream result %s\",i),!i&&r&&r!==this.noop?(this.log(\"_writePacket :: handle events on `drain` once through callback.\"),this.stream.once(\"drain\",r)):r&&(this.log(\"_writePacket :: invoking cb\"),r());}_sendPacket(e,r,i,n){this.log(\"_sendPacket :: (%s) :: start\",this.options.clientId),i=i||this.noop,r=r||this.noop;let o=this._applyTopicAlias(e);if(o){r(o);return}if(!this.connected){if(e.cmd===\"auth\"){this._writePacket(e,r);return}this.log(\"_sendPacket :: client not connected. Storing packet offline.\"),this._storePacket(e,r,i);return}if(n){this._writePacket(e,r);return}switch(e.cmd){case\"publish\":break;case\"pubrel\":this._storeAndSend(e,r,i);return;default:this._writePacket(e,r);return}switch(e.qos){case 2:case 1:this._storeAndSend(e,r,i);break;case 0:default:this._writePacket(e,r);break}this.log(\"_sendPacket :: (%s) :: end\",this.options.clientId);}_storePacket(e,r,i){this.log(\"_storePacket :: packet: %o\",e),this.log(\"_storePacket :: cb? %s\",!!r),i=i||this.noop;let n=e;if(n.cmd===\"publish\"){n=(0, qp.default)(e);let s=this._removeTopicAliasAndRecoverTopicName(n);if(s)return r&&r(s)}let o=n.qos||0;o===0&&this.queueQoSZero||n.cmd!==\"publish\"?this.queue.push({packet:n,cb:r}):o>0?(r=this.outgoing[n.messageId]?this.outgoing[n.messageId].cb:null,this.outgoingStore.put(n,s=>{if(s)return r&&r(s);i();})):r&&r(new Error(\"No connection to broker\"));}_setupPingTimer(){this.log(\"_setupPingTimer :: keepalive %d (seconds)\",this.options.keepalive),!this.pingTimer&&this.options.keepalive&&(this.pingResp=!0,this.pingTimer=new Xv.default(this.options.keepalive,()=>{this._checkPing();},this.options.timerVariant));}_shiftPingInterval(){this.pingTimer&&this.options.keepalive&&this.options.reschedulePings&&this.pingTimer.reschedule();}_checkPing(){this.log(\"_checkPing :: checking ping...\"),this.pingResp?(this.log(\"_checkPing :: ping response received. Clearing flag and sending `pingreq`\"),this.pingResp=!1,this._sendPacket({cmd:\"pingreq\"})):(this.emit(\"error\",new Error(\"Keepalive timeout\")),this.log(\"_checkPing :: calling _cleanUp with force true\"),this._cleanUp(!0));}_resubscribe(){this.log(\"_resubscribe\");let e=Object.keys(this._resubscribeTopics);if(!this._firstConnection&&(this.options.clean||this.options.protocolVersion>=4&&!this.connackPacket.sessionPresent)&&e.length>0)if(this.options.resubscribe)if(this.options.protocolVersion===5){this.log(\"_resubscribe: protocolVersion 5\");for(let r=0;r{let i=this.outgoingStore.createStream(),n=()=>{i.destroy(),i=null,this._flushStoreProcessingQueue(),o();},o=()=>{this._storeProcessing=!1,this._packetIdsDuringStoreProcessing={};};this.once(\"close\",n),i.on(\"error\",a=>{o(),this._flushStoreProcessingQueue(),this.removeListener(\"close\",n),this.emit(\"error\",a);});let s=()=>{if(!i)return;let a=i.read(1),u;if(!a){i.once(\"readable\",s);return}if(this._storeProcessing=!0,this._packetIdsDuringStoreProcessing[a.messageId]){s();return}!this.disconnecting&&!this.reconnectTimer?(u=this.outgoing[a.messageId]?this.outgoing[a.messageId].cb:null,this.outgoing[a.messageId]={volatile:!1,cb(c,h){u&&u(c,h),s();}},this._packetIdsDuringStoreProcessing[a.messageId]=!0,this.messageIdProvider.register(a.messageId)?this._sendPacket(a,void 0,void 0,!0):this.log(\"messageId: %d has already used.\",a.messageId)):i.destroy&&i.destroy();};i.on(\"end\",()=>{let a=!0;for(let u in this._packetIdsDuringStoreProcessing)if(!this._packetIdsDuringStoreProcessing[u]){a=!1;break}this.removeListener(\"close\",n),a?(o(),this._invokeAllStoreProcessingQueue(),this.emit(\"connect\",e)):r();}),s();};r();}_invokeStoreProcessingQueue(){if(!this._storeProcessing&&this._storeProcessingQueue.length>0){let e=this._storeProcessingQueue[0];if(e&&e.invoke())return this._storeProcessingQueue.shift(),!0}return !1}_invokeAllStoreProcessingQueue(){for(;this._invokeStoreProcessingQueue(););}_flushStoreProcessingQueue(){for(let e of this._storeProcessingQueue)e.cbStorePut&&e.cbStorePut(new Error(\"Connection closed\")),e.callback&&e.callback(new Error(\"Connection closed\"));this._storeProcessingQueue.splice(0);}_removeOutgoingAndStoreMessage(e,r){delete this.outgoing[e],this.outgoingStore.del({messageId:e},(i,n)=>{r(i,n),this.messageIdProvider.deallocate(e),this._invokeStoreProcessingQueue();});}};is.VERSION=\"5.5.2\";Qe.default=is;});var $p=M(Ha=>{v();m();_();Object.defineProperty(Ha,\"__esModule\",{value:!0});var Zv=xa(),$a=class{constructor(){this.numberAllocator=new Zv.NumberAllocator(1,65535);}allocate(){return this.lastId=this.numberAllocator.alloc(),this.lastId}getLastAllocated(){return this.lastId}register(e){return this.numberAllocator.use(e)}deallocate(e){this.numberAllocator.free(e);}clear(){this.numberAllocator.clear();}};Ha.default=$a;});function Ir(t){throw new RangeError(iE[t])}function Hp(t,e){let r=t.split(\"@\"),i=\"\";r.length>1&&(i=r[0]+\"@\",t=r[1]);let n=function(o,s){let a=[],u=o.length;for(;u--;)a[u]=s(o[u]);return a}((t=t.replace(rE,\".\")).split(\".\"),e).join(\".\");return i+n}function Gp(t){let e=[],r=0,i=t.length;for(;r=55296&&n<=56319&&r{v();m();_();eE=/^xn--/,tE=/[^\\0-\\x7E]/,rE=/[\\x2E\\u3002\\uFF0E\\uFF61]/g,iE={overflow:\"Overflow: input needs wider integers to process\",\"not-basic\":\"Illegal input >= 0x80 (not a basic code point)\",\"invalid-input\":\"Invalid input\"},ht=Math.floor,Va=String.fromCharCode;Vp=function(t,e){return t+22+75*(t<26)-((e!=0)<<5)},Qp=function(t,e,r){let i=0;for(t=r?ht(t/700):t>>1,t+=ht(t/e);t>455;i+=36)t=ht(t/35);return ht(i+36*t/(t+38))},zp=function(t){let e=[],r=t.length,i=0,n=128,o=72,s=t.lastIndexOf(\"-\");s<0&&(s=0);for(let u=0;u=128&&Ir(\"not-basic\"),e.push(t.charCodeAt(u));for(let u=s>0?s+1:0;u=r&&Ir(\"invalid-input\");let y=(a=t.charCodeAt(u++))-48<10?a-22:a-65<26?a-65:a-97<26?a-97:36;(y>=36||y>ht((2147483647-i)/d))&&Ir(\"overflow\"),i+=y*d;let w=g<=o?1:g>=o+26?26:g-o;if(yht(2147483647/E)&&Ir(\"overflow\"),d*=E;}let h=e.length+1;o=Qp(i-c,h,c==0),ht(i/h)>2147483647-n&&Ir(\"overflow\"),n+=ht(i/h),i%=h,e.splice(i++,0,n);}var a;return String.fromCodePoint(...e)},Kp=function(t){let e=[],r=(t=Gp(t)).length,i=128,n=0,o=72;for(let u of t)u<128&&e.push(Va(u));let s=e.length,a=s;for(s&&e.push(\"-\");a=i&&hht((2147483647-n)/c)&&Ir(\"overflow\"),n+=(u-i)*c,i=u;for(let h of t)if(h2147483647&&Ir(\"overflow\"),h==i){let d=n;for(let g=36;;g+=36){let y=g<=o?1:g>=o+26?26:g-o;if(dString.fromCodePoint(...t)},decode:zp,encode:Kp,toASCII:function(t){return Hp(t,function(e){return tE.test(e)?\"xn--\"+Kp(e):e})},toUnicode:function(t){return Hp(t,function(e){return eE.test(e)?zp(e.slice(4).toLowerCase()):e})}};zt.decode;zt.encode;zt.toASCII;zt.toUnicode;zt.ucs2;zt.version;});function nE(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var sE,ki,oE,dt,Jp=we(()=>{v();m();_();sE=function(t,e,r,i){e=e||\"&\",r=r||\"=\";var n={};if(typeof t!=\"string\"||t.length===0)return n;var o=/\\+/g;t=t.split(e);var s=1e3;i&&typeof i.maxKeys==\"number\"&&(s=i.maxKeys);var a=t.length;s>0&&a>s&&(a=s);for(var u=0;u=0?(c=y.substr(0,w),h=y.substr(w+1)):(c=y,h=\"\"),d=decodeURIComponent(c),g=decodeURIComponent(h),nE(n,d)?Array.isArray(n[d])?n[d].push(g):n[d]=[n[d],g]:n[d]=g;}return n},ki=function(t){switch(typeof t){case\"string\":return t;case\"boolean\":return t?\"true\":\"false\";case\"number\":return isFinite(t)?t:\"\";default:return \"\"}},oE=function(t,e,r,i){return e=e||\"&\",r=r||\"=\",t===null&&(t=void 0),typeof t==\"object\"?Object.keys(t).map(function(n){var o=encodeURIComponent(ki(n))+r;return Array.isArray(t[n])?t[n].map(function(s){return o+encodeURIComponent(ki(s))}).join(e):o+encodeURIComponent(ki(t[n]))}).join(e):i?encodeURIComponent(ki(i))+r+encodeURIComponent(ki(t)):\"\"},dt={};dt.decode=dt.parse=sE,dt.encode=dt.stringify=oE;dt.decode;dt.encode;dt.parse;dt.stringify;});function za(){throw new Error(\"setTimeout has not been defined\")}function Ka(){throw new Error(\"clearTimeout has not been defined\")}function eg(t){if(Bt===setTimeout)return setTimeout(t,0);if((Bt===za||!Bt)&&setTimeout)return Bt=setTimeout,setTimeout(t,0);try{return Bt(t,0)}catch{try{return Bt.call(null,t,0)}catch{return Bt.call(this||ii,t,0)}}}function aE(){ri&&Tr&&(ri=!1,Tr.length?Ot=Tr.concat(Ot):ss=-1,Ot.length&&tg());}function tg(){if(!ri){var t=eg(aE);ri=!0;for(var e=Ot.length;e;){for(Tr=Ot,Ot=[];++ss{v();m();_();ii=typeof globalThis<\"u\"?globalThis:typeof self<\"u\"?self:global,fe=Zp={};(function(){try{Bt=typeof setTimeout==\"function\"?setTimeout:za;}catch{Bt=za;}try{Pt=typeof clearTimeout==\"function\"?clearTimeout:Ka;}catch{Pt=Ka;}})();Ot=[],ri=!1,ss=-1;fe.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r1)for(var I=1;I{v();m();_();Ga={},ig=!1,ni=typeof globalThis<\"u\"?globalThis:typeof self<\"u\"?self:global;re=lE();re.platform=\"browser\";re.addListener;re.argv;re.binding;re.browser;re.chdir;re.cwd;re.emit;re.env;re.listeners;re.nextTick;re.off;re.on;re.once;re.prependListener;re.prependOnceListener;re.removeAllListeners;re.removeListener;re.title;re.umask;re.version;re.versions;});function uE(){if(ng)return Ya;ng=!0;var t=re;function e(o){if(typeof o!=\"string\")throw new TypeError(\"Path must be a string. Received \"+JSON.stringify(o))}function r(o,s){for(var a=\"\",u=0,c=-1,h=0,d,g=0;g<=o.length;++g){if(g2){var y=a.lastIndexOf(\"/\");if(y!==a.length-1){y===-1?(a=\"\",u=0):(a=a.slice(0,y),u=a.length-1-a.lastIndexOf(\"/\")),c=g,h=0;continue}}else if(a.length===2||a.length===1){a=\"\",u=0,c=g,h=0;continue}}s&&(a.length>0?a+=\"/..\":a=\"..\",u=2);}else a.length>0?a+=\"/\"+o.slice(c+1,g):a=o.slice(c+1,g),u=g-c-1;c=g,h=0;}else d===46&&h!==-1?++h:h=-1;}return a}function i(o,s){var a=s.dir||s.root,u=s.base||(s.name||\"\")+(s.ext||\"\");return a?a===s.root?a+u:a+o+u:u}var n={resolve:function(){for(var s=\"\",a=!1,u,c=arguments.length-1;c>=-1&&!a;c--){var h;c>=0?h=arguments[c]:(u===void 0&&(u=t.cwd()),h=u),e(h),h.length!==0&&(s=h+\"/\"+s,a=h.charCodeAt(0)===47);}return s=r(s,!a),a?s.length>0?\"/\"+s:\"/\":s.length>0?s:\".\"},normalize:function(s){if(e(s),s.length===0)return \".\";var a=s.charCodeAt(0)===47,u=s.charCodeAt(s.length-1)===47;return s=r(s,!a),s.length===0&&!a&&(s=\".\"),s.length>0&&u&&(s+=\"/\"),a?\"/\"+s:s},isAbsolute:function(s){return e(s),s.length>0&&s.charCodeAt(0)===47},join:function(){if(arguments.length===0)return \".\";for(var s,a=0;a0&&(s===void 0?s=u:s+=\"/\"+u);}return s===void 0?\".\":n.normalize(s)},relative:function(s,a){if(e(s),e(a),s===a||(s=n.resolve(s),a=n.resolve(a),s===a))return \"\";for(var u=1;uw){if(a.charCodeAt(d+S)===47)return a.slice(d+S+1);if(S===0)return a.slice(d+S)}else h>w&&(s.charCodeAt(u+S)===47?E=S:S===0&&(E=0));break}var I=s.charCodeAt(u+S),C=a.charCodeAt(d+S);if(I!==C)break;I===47&&(E=S);}var R=\"\";for(S=u+E+1;S<=c;++S)(S===c||s.charCodeAt(S)===47)&&(R.length===0?R+=\"..\":R+=\"/..\");return R.length>0?R+a.slice(d+E):(d+=E,a.charCodeAt(d)===47&&++d,a.slice(d))},_makeLong:function(s){return s},dirname:function(s){if(e(s),s.length===0)return \".\";for(var a=s.charCodeAt(0),u=a===47,c=-1,h=!0,d=s.length-1;d>=1;--d)if(a=s.charCodeAt(d),a===47){if(!h){c=d;break}}else h=!1;return c===-1?u?\"/\":\".\":u&&c===1?\"//\":s.slice(0,c)},basename:function(s,a){if(a!==void 0&&typeof a!=\"string\")throw new TypeError('\"ext\" argument must be a string');e(s);var u=0,c=-1,h=!0,d;if(a!==void 0&&a.length>0&&a.length<=s.length){if(a.length===s.length&&a===s)return \"\";var g=a.length-1,y=-1;for(d=s.length-1;d>=0;--d){var w=s.charCodeAt(d);if(w===47){if(!h){u=d+1;break}}else y===-1&&(h=!1,y=d+1),g>=0&&(w===a.charCodeAt(g)?--g===-1&&(c=d):(g=-1,c=y));}return u===c?c=y:c===-1&&(c=s.length),s.slice(u,c)}else {for(d=s.length-1;d>=0;--d)if(s.charCodeAt(d)===47){if(!h){u=d+1;break}}else c===-1&&(h=!1,c=d+1);return c===-1?\"\":s.slice(u,c)}},extname:function(s){e(s);for(var a=-1,u=0,c=-1,h=!0,d=0,g=s.length-1;g>=0;--g){var y=s.charCodeAt(g);if(y===47){if(!h){u=g+1;break}continue}c===-1&&(h=!1,c=g+1),y===46?a===-1?a=g:d!==1&&(d=1):a!==-1&&(d=-1);}return a===-1||c===-1||d===0||d===1&&a===c-1&&a===u+1?\"\":s.slice(a,c)},format:function(s){if(s===null||typeof s!=\"object\")throw new TypeError('The \"pathObject\" argument must be of type Object. Received type '+typeof s);return i(\"/\",s)},parse:function(s){e(s);var a={root:\"\",dir:\"\",base:\"\",ext:\"\",name:\"\"};if(s.length===0)return a;var u=s.charCodeAt(0),c=u===47,h;c?(a.root=\"/\",h=1):h=0;for(var d=-1,g=0,y=-1,w=!0,E=s.length-1,S=0;E>=h;--E){if(u=s.charCodeAt(E),u===47){if(!w){g=E+1;break}continue}y===-1&&(w=!1,y=E+1),u===46?d===-1?d=E:S!==1&&(S=1):d!==-1&&(S=-1);}return d===-1||y===-1||S===0||S===1&&d===y-1&&d===g+1?y!==-1&&(g===0&&c?a.base=a.name=s.slice(1,y):a.base=a.name=s.slice(g,y)):(g===0&&c?(a.name=s.slice(1,d),a.base=s.slice(1,y)):(a.name=s.slice(g,d),a.base=s.slice(g,y)),a.ext=s.slice(d,y)),g>0?a.dir=s.slice(0,g-1):c&&(a.dir=\"/\"),a},sep:\"/\",delimiter:\":\",win32:null,posix:null};return n.posix=n,Ya=n,Ya}var Ya,ng,Ja,sg=we(()=>{v();m();_();Qa();Ya={},ng=!1;Ja=uE();});var dg={};Qt(dg,{URL:()=>DE,Url:()=>ME,default:()=>Z,fileURLToPath:()=>cg,format:()=>LE,parse:()=>qE,pathToFileURL:()=>hg,resolve:()=>UE,resolveObject:()=>NE});function Fe(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null;}function xi(t,e,r){if(t&&pt.isObject(t)&&t instanceof Fe)return t;var i=new Fe;return i.parse(t,e,r),i}function bE(){if(ug)return el;ug=!0;var t=ne;function e(o){if(typeof o!=\"string\")throw new TypeError(\"Path must be a string. Received \"+JSON.stringify(o))}function r(o,s){for(var a=\"\",u=0,c=-1,h=0,d,g=0;g<=o.length;++g){if(g2){var y=a.lastIndexOf(\"/\");if(y!==a.length-1){y===-1?(a=\"\",u=0):(a=a.slice(0,y),u=a.length-1-a.lastIndexOf(\"/\")),c=g,h=0;continue}}else if(a.length===2||a.length===1){a=\"\",u=0,c=g,h=0;continue}}s&&(a.length>0?a+=\"/..\":a=\"..\",u=2);}else a.length>0?a+=\"/\"+o.slice(c+1,g):a=o.slice(c+1,g),u=g-c-1;c=g,h=0;}else d===46&&h!==-1?++h:h=-1;}return a}function i(o,s){var a=s.dir||s.root,u=s.base||(s.name||\"\")+(s.ext||\"\");return a?a===s.root?a+u:a+o+u:u}var n={resolve:function(){for(var s=\"\",a=!1,u,c=arguments.length-1;c>=-1&&!a;c--){var h;c>=0?h=arguments[c]:(u===void 0&&(u=t.cwd()),h=u),e(h),h.length!==0&&(s=h+\"/\"+s,a=h.charCodeAt(0)===47);}return s=r(s,!a),a?s.length>0?\"/\"+s:\"/\":s.length>0?s:\".\"},normalize:function(s){if(e(s),s.length===0)return \".\";var a=s.charCodeAt(0)===47,u=s.charCodeAt(s.length-1)===47;return s=r(s,!a),s.length===0&&!a&&(s=\".\"),s.length>0&&u&&(s+=\"/\"),a?\"/\"+s:s},isAbsolute:function(s){return e(s),s.length>0&&s.charCodeAt(0)===47},join:function(){if(arguments.length===0)return \".\";for(var s,a=0;a0&&(s===void 0?s=u:s+=\"/\"+u);}return s===void 0?\".\":n.normalize(s)},relative:function(s,a){if(e(s),e(a),s===a||(s=n.resolve(s),a=n.resolve(a),s===a))return \"\";for(var u=1;uw){if(a.charCodeAt(d+S)===47)return a.slice(d+S+1);if(S===0)return a.slice(d+S)}else h>w&&(s.charCodeAt(u+S)===47?E=S:S===0&&(E=0));break}var I=s.charCodeAt(u+S),C=a.charCodeAt(d+S);if(I!==C)break;I===47&&(E=S);}var R=\"\";for(S=u+E+1;S<=c;++S)(S===c||s.charCodeAt(S)===47)&&(R.length===0?R+=\"..\":R+=\"/..\");return R.length>0?R+a.slice(d+E):(d+=E,a.charCodeAt(d)===47&&++d,a.slice(d))},_makeLong:function(s){return s},dirname:function(s){if(e(s),s.length===0)return \".\";for(var a=s.charCodeAt(0),u=a===47,c=-1,h=!0,d=s.length-1;d>=1;--d)if(a=s.charCodeAt(d),a===47){if(!h){c=d;break}}else h=!1;return c===-1?u?\"/\":\".\":u&&c===1?\"//\":s.slice(0,c)},basename:function(s,a){if(a!==void 0&&typeof a!=\"string\")throw new TypeError('\"ext\" argument must be a string');e(s);var u=0,c=-1,h=!0,d;if(a!==void 0&&a.length>0&&a.length<=s.length){if(a.length===s.length&&a===s)return \"\";var g=a.length-1,y=-1;for(d=s.length-1;d>=0;--d){var w=s.charCodeAt(d);if(w===47){if(!h){u=d+1;break}}else y===-1&&(h=!1,y=d+1),g>=0&&(w===a.charCodeAt(g)?--g===-1&&(c=d):(g=-1,c=y));}return u===c?c=y:c===-1&&(c=s.length),s.slice(u,c)}else {for(d=s.length-1;d>=0;--d)if(s.charCodeAt(d)===47){if(!h){u=d+1;break}}else c===-1&&(h=!1,c=d+1);return c===-1?\"\":s.slice(u,c)}},extname:function(s){e(s);for(var a=-1,u=0,c=-1,h=!0,d=0,g=s.length-1;g>=0;--g){var y=s.charCodeAt(g);if(y===47){if(!h){u=g+1;break}continue}c===-1&&(h=!1,c=g+1),y===46?a===-1?a=g:d!==1&&(d=1):a!==-1&&(d=-1);}return a===-1||c===-1||d===0||d===1&&a===c-1&&a===u+1?\"\":s.slice(a,c)},format:function(s){if(s===null||typeof s!=\"object\")throw new TypeError('The \"pathObject\" argument must be of type Object. Received type '+typeof s);return i(\"/\",s)},parse:function(s){e(s);var a={root:\"\",dir:\"\",base:\"\",ext:\"\",name:\"\"};if(s.length===0)return a;var u=s.charCodeAt(0),c=u===47,h;c?(a.root=\"/\",h=1):h=0;for(var d=-1,g=0,y=-1,w=!0,E=s.length-1,S=0;E>=h;--E){if(u=s.charCodeAt(E),u===47){if(!w){g=E+1;break}continue}y===-1&&(w=!1,y=E+1),u===46?d===-1?d=E:S!==1&&(S=1):d!==-1&&(S=-1);}return d===-1||y===-1||S===0||S===1&&d===y-1&&d===g+1?y!==-1&&(g===0&&c?a.base=a.name=s.slice(1,y):a.base=a.name=s.slice(g,y)):(g===0&&c?(a.name=s.slice(1,d),a.base=s.slice(1,y)):(a.name=s.slice(g,d),a.base=s.slice(g,y)),a.ext=s.slice(d,y)),g>0?a.dir=s.slice(0,g-1):c&&(a.dir=\"/\"),a},sep:\"/\",delimiter:\":\",win32:null,posix:null};return n.posix=n,el=n,el}function BE(t){if(typeof t==\"string\")t=new URL(t);else if(!(t instanceof URL))throw new Deno.errors.InvalidData(\"invalid argument path , must be a string or URL\");if(t.protocol!==\"file:\")throw new Deno.errors.InvalidData(\"invalid url scheme\");return rl?PE(t):OE(t)}function PE(t){let e=t.hostname,r=t.pathname;for(let i=0;iEE||n!==\":\")throw new Deno.errors.InvalidData(\"file url path must be absolute\");return r.slice(1)}}function OE(t){if(t.hostname!==\"\")throw new Deno.errors.InvalidData(\"invalid file url hostname\");let e=t.pathname;for(let r=0;r$E||n!==\":\")throw new Deno.errors.InvalidData(\"file url path must be absolute\");return r.slice(1)}}function JE(t){if(t.hostname!==\"\")throw new Deno.errors.InvalidData(\"invalid file url hostname\");let e=t.pathname;for(let r=0;r{v();m();_();Yp();Jp();rg();sg();Qa();Z={},fE=zt,pt={isString:function(t){return typeof t==\"string\"},isObject:function(t){return typeof t==\"object\"&&t!==null},isNull:function(t){return t===null},isNullOrUndefined:function(t){return t==null}};Z.parse=xi,Z.resolve=function(t,e){return xi(t,!1,!0).resolve(e)},Z.resolveObject=function(t,e){return t?xi(t,!1,!0).resolveObject(e):e},Z.format=function(t){return pt.isString(t)&&(t=xi(t)),t instanceof Fe?t.format():Fe.prototype.format.call(t)},Z.Url=Fe;cE=/^([a-z0-9.+-]+:)/i,hE=/:[0-9]*$/,dE=/^(\\/\\/?(?!\\/)[^\\?\\s]*)(\\?[^\\s]*)?$/,pE=[\"{\",\"}\",\"|\",\"\\\\\",\"^\",\"`\"].concat([\"<\",\">\",'\"',\"`\",\" \",\"\\r\",`\n`,\"\t\"]),tl=[\"'\"].concat(pE),og=[\"%\",\"/\",\"?\",\";\",\"#\"].concat(tl),ag=[\"/\",\"?\",\"#\"],lg=/^[+a-z0-9A-Z_-]{0,63}$/,gE=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,yE={javascript:!0,\"javascript:\":!0},Xa={javascript:!0,\"javascript:\":!0},si={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,\"http:\":!0,\"https:\":!0,\"ftp:\":!0,\"gopher:\":!0,\"file:\":!0},Za=dt;Fe.prototype.parse=function(t,e,r){if(!pt.isString(t))throw new TypeError(\"Parameter 'url' must be a string, not \"+typeof t);var i=t.indexOf(\"?\"),n=i!==-1&&i127?U+=\"x\":U+=R[N];if(!U.match(lg)){var K=I.slice(0,w),z=I.slice(w+1),Q=R.match(gE);Q&&(K.push(Q[1]),z.unshift(Q[2])),z.length&&(s=\"/\"+z.join(\".\")+s),this.hostname=K.join(\".\");break}}}this.hostname.length>255?this.hostname=\"\":this.hostname=this.hostname.toLowerCase(),S||(this.hostname=fE.toASCII(this.hostname));var de=this.port?\":\"+this.port:\"\",Gt=this.hostname||\"\";this.host=Gt+de,this.href+=this.host,S&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),s[0]!==\"/\"&&(s=\"/\"+s));}if(!yE[c])for(w=0,C=tl.length;w0)&&r.host.split(\"@\"))&&(r.auth=Q.shift(),r.host=r.hostname=Q.shift())),r.search=t.search,r.query=t.query,pt.isNull(r.pathname)&&pt.isNull(r.search)||(r.path=(r.pathname?r.pathname:\"\")+(r.search?r.search:\"\")),r.href=r.format(),r;if(!R.length)return r.pathname=null,r.search?r.path=\"/\"+r.search:r.path=null,r.href=r.format(),r;for(var N=R.slice(-1)[0],W=(r.host||t.host||R.length>1)&&(N===\".\"||N===\"..\")||N===\"\",K=0,z=R.length;z>=0;z--)(N=R[z])===\".\"?R.splice(z,1):N===\"..\"?(R.splice(z,1),K++):K&&(R.splice(z,1),K--);if(!I&&!C)for(;K--;K)R.unshift(\"..\");!I||R[0]===\"\"||R[0]&&R[0].charAt(0)===\"/\"||R.unshift(\"\"),W&&R.join(\"/\").substr(-1)!==\"/\"&&R.push(\"\");var Q,de=R[0]===\"\"||R[0]&&R[0].charAt(0)===\"/\";return U&&(r.hostname=r.host=de?\"\":R.length?R.shift():\"\",(Q=!!(r.host&&r.host.indexOf(\"@\")>0)&&r.host.split(\"@\"))&&(r.auth=Q.shift(),r.host=r.hostname=Q.shift())),(I=I||r.host&&R.length)&&!de&&R.unshift(\"\"),R.length?r.pathname=R.join(\"/\"):(r.pathname=null,r.path=null),pt.isNull(r.pathname)&&pt.isNull(r.search)||(r.path=(r.pathname?r.pathname:\"\")+(r.search?r.search:\"\")),r.auth=t.auth||r.auth,r.slashes=r.slashes||t.slashes,r.href=r.format(),r},Fe.prototype.parseHost=function(){var t=this.host,e=hE.exec(t);e&&((e=e[0])!==\":\"&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t);};Z.Url;Z.format;Z.resolve;Z.resolveObject;el={},ug=!1;fg=bE(),wE=typeof Deno<\"u\"?Deno.build.os===\"windows\"?\"win32\":Deno.build.os:void 0;Z.URL=typeof URL<\"u\"?URL:null;Z.pathToFileURL=kE;Z.fileURLToPath=BE;Z.Url;Z.format;Z.resolve;Z.resolveObject;Z.URL;_E=92,mE=47,vE=97,EE=122,rl=wE===\"win32\",SE=/\\//g,AE=/%/g,IE=/\\\\/g,TE=/\\n/g,RE=/\\r/g,CE=/\\t/g;xE=typeof Deno<\"u\"?Deno.build.os===\"windows\"?\"win32\":Deno.build.os:void 0;Z.URL=typeof URL<\"u\"?URL:null;Z.pathToFileURL=hg;Z.fileURLToPath=cg;ME=Z.Url,LE=Z.format,UE=Z.resolve,NE=Z.resolveObject,qE=Z.parse,DE=Z.URL,jE=92,FE=47,WE=97,$E=122,il=xE===\"win32\",HE=/\\//g,VE=/%/g,zE=/\\\\/g,KE=/\\n/g,GE=/\\r/g,QE=/\\t/g;});var nl={};Qt(nl,{Server:()=>Me,Socket:()=>Me,Stream:()=>Me,_createServerHandle:()=>Me,_normalizeArgs:()=>Me,_setSimultaneousAccepts:()=>Me,connect:()=>Me,createConnection:()=>Me,createServer:()=>Me,default:()=>XE,isIP:()=>Me,isIPv4:()=>Me,isIPv6:()=>Me});function Me(){throw new Error(\"Node.js net module is not supported by JSPM core outside of Node.js\")}var XE,sl=we(()=>{v();m();_();XE={_createServerHandle:Me,_normalizeArgs:Me,_setSimultaneousAccepts:Me,connect:Me,createConnection:Me,createServer:Me,isIP:Me,isIPv4:Me,isIPv6:Me,Server:Me,Socket:Me,Stream:Me};});var ol=M(Mi=>{v();m();_();var gg=Mi&&Mi.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Mi,\"__esModule\",{value:!0});var ZE=gg((sl(),X(nl))),eS=gg(ot()),tS=(0, eS.default)(\"mqttjs:tcp\"),rS=(t,e)=>{e.port=e.port||1883,e.hostname=e.hostname||e.host||\"localhost\";let{port:r}=e,i=e.hostname;return tS(\"port %d and host %s\",r,i),ZE.default.createConnection(r,i)};Mi.default=rS;});var yg={};Qt(yg,{default:()=>iS});var iS,bg=we(()=>{v();m();_();iS={};});var ll=M(Li=>{v();m();_();var al=Li&&Li.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Li,\"__esModule\",{value:!0});var nS=al((bg(),X(yg))),sS=al((sl(),X(nl))),oS=al(ot()),aS=(0, oS.default)(\"mqttjs:tls\"),lS=(t,e)=>{e.port=e.port||8883,e.host=e.hostname||e.host||\"localhost\",sS.default.isIP(e.host)===0&&(e.servername=e.host),e.rejectUnauthorized=e.rejectUnauthorized!==!1,delete e.path,aS(\"port %d host %s rejectUnauthorized %b\",e.port,e.host,e.rejectUnauthorized);let r=nS.default.connect(e);r.on(\"secureConnect\",()=>{e.rejectUnauthorized&&!r.authorized?r.emit(\"error\",new Error(\"TLS not authorized\")):r.removeListener(\"error\",i);});function i(n){e.rejectUnauthorized&&t.emit(\"error\",n),r.end();}return r.on(\"error\",i),r};Li.default=lS;});var os=M(oi=>{v();m();_();Object.defineProperty(oi,\"__esModule\",{value:!0});oi.BufferedDuplex=oi.writev=void 0;var uS=Dt(),wg=(ye(),X(_e));function _g(t,e){let r=new Array(t.length);for(let i=0;i{this.push(n);});}_read(e){this.proxy.read(e);}_write(e,r,i){this.isSocketOpen?this.writeToProxy(e,r,i):this.writeQueue.push({chunk:e,encoding:r,cb:i});}_final(e){this.writeQueue=[],this.proxy.end(e);}_destroy(e,r){this.writeQueue=[],this.proxy.destroy(),r(e);}socketReady(){this.emit(\"connect\"),this.isSocketOpen=!0,this.processWriteQueue();}writeToProxy(e,r,i){this.proxy.write(e,r)===!1?this.proxy.once(\"drain\",i):i();}processWriteQueue(){for(;this.writeQueue.length>0;){let{chunk:e,encoding:r,cb:i}=this.writeQueue.shift();this.writeToProxy(e,r,i);}}};oi.BufferedDuplex=ul;});var hl=M(cl=>{v();m();_();Object.defineProperty(cl,\"__esModule\",{value:!0});var mg=(ye(),X(_e)),fS=Dt(),cS=os(),gt,fl,Le;function hS(){let t=new fS.Transform;return t._write=(e,r,i)=>{gt.send({data:e.buffer,success(){i();},fail(n){i(new Error(n));}});},t._flush=e=>{gt.close({success(){e();}});},t}function dS(t){t.hostname||(t.hostname=\"localhost\"),t.path||(t.path=\"/\"),t.wsOptions||(t.wsOptions={});}function pS(t,e){let r=t.protocol===\"wxs\"?\"wss\":\"ws\",i=`${r}://${t.hostname}${t.path}`;return t.port&&t.port!==80&&t.port!==443&&(i=`${r}://${t.hostname}:${t.port}${t.path}`),typeof t.transformWsUrl==\"function\"&&(i=t.transformWsUrl(i,t,e)),i}function gS(){gt.onOpen(()=>{Le.socketReady();}),gt.onMessage(t=>{let{data:e}=t;e instanceof ArrayBuffer?e=mg.Buffer.from(e):e=mg.Buffer.from(e,\"utf8\"),fl.push(e);}),gt.onClose(()=>{Le.emit(\"close\"),Le.end(),Le.destroy();}),gt.onError(t=>{let e=new Error(t.errMsg);Le.destroy(e);});}var yS=(t,e)=>{if(e.hostname=e.hostname||e.host,!e.hostname)throw new Error(\"Could not determine host. Specify host manually.\");let r=e.protocolId===\"MQIsdp\"&&e.protocolVersion===3?\"mqttv3.1\":\"mqtt\";dS(e);let i=pS(e,t);gt=wx.connectSocket({url:i,protocols:[r]}),fl=hS(),Le=new cS.BufferedDuplex(e,fl,gt),Le._destroy=(o,s)=>{gt.close({success(){s&&s(o);}});};let n=Le.destroy;return Le.destroy=(o,s)=>(Le.destroy=n,setTimeout(()=>{gt.close({fail(){Le._destroy(o,s);}});},0),Le),gS(),Le};cl.default=yS;});var gl=M(pl=>{v();m();_();Object.defineProperty(pl,\"__esModule\",{value:!0});var dl=(ye(),X(_e)),bS=Dt(),wS=os(),kt,as,ai,vg=!1;function _S(){let t=new bS.Transform;return t._write=(e,r,i)=>{kt.sendSocketMessage({data:e.buffer,success(){i();},fail(){i(new Error);}});},t._flush=e=>{kt.closeSocket({success(){e();}});},t}function mS(t){t.hostname||(t.hostname=\"localhost\"),t.path||(t.path=\"/\"),t.wsOptions||(t.wsOptions={});}function vS(t,e){let r=t.protocol===\"alis\"?\"wss\":\"ws\",i=`${r}://${t.hostname}${t.path}`;return t.port&&t.port!==80&&t.port!==443&&(i=`${r}://${t.hostname}:${t.port}${t.path}`),typeof t.transformWsUrl==\"function\"&&(i=t.transformWsUrl(i,t,e)),i}function ES(){vg||(vg=!0,kt.onSocketOpen(()=>{ai.socketReady();}),kt.onSocketMessage(t=>{if(typeof t.data==\"string\"){let e=dl.Buffer.from(t.data,\"base64\");as.push(e);}else {let e=new FileReader;e.addEventListener(\"load\",()=>{let r=e.result;r instanceof ArrayBuffer?r=dl.Buffer.from(r):r=dl.Buffer.from(r,\"utf8\"),as.push(r);}),e.readAsArrayBuffer(t.data);}}),kt.onSocketClose(()=>{ai.end(),ai.destroy();}),kt.onSocketError(t=>{ai.destroy(t);}));}var SS=(t,e)=>{if(e.hostname=e.hostname||e.host,!e.hostname)throw new Error(\"Could not determine host. Specify host manually.\");let r=e.protocolId===\"MQIsdp\"&&e.protocolVersion===3?\"mqttv3.1\":\"mqtt\";mS(e);let i=vS(e,t);return kt=e.my,kt.connectSocket({url:i,protocols:r}),as=_S(),ai=new wS.BufferedDuplex(e,as,kt),ES(),ai};pl.default=SS;});var Sg=M((PD,Eg)=>{v();m();_();Eg.exports=function(){throw new Error(\"ws does not work in the browser. Browser clients must use the native WebSocket object\")};});var _l=M(Ui=>{v();m();_();var wl=Ui&&Ui.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Ui,\"__esModule\",{value:!0});var yl=(ye(),X(_e)),Ag=wl(Sg()),AS=wl(ot()),IS=Dt(),Ig=wl(Pi()),bl=os(),Kt=(0, AS.default)(\"mqttjs:ws\"),TS=[\"rejectUnauthorized\",\"ca\",\"cert\",\"key\",\"pfx\",\"passphrase\"];function Tg(t,e){let r=`${t.protocol}://${t.hostname}:${t.port}${t.path}`;return typeof t.transformWsUrl==\"function\"&&(r=t.transformWsUrl(r,t,e)),r}function Rg(t){let e=t;return t.hostname||(e.hostname=\"localhost\"),t.port||(t.protocol===\"wss\"?e.port=443:e.port=80),t.path||(e.path=\"/\"),t.wsOptions||(e.wsOptions={}),!Ig.default&&t.protocol===\"wss\"&&TS.forEach(r=>{Object.prototype.hasOwnProperty.call(t,r)&&!Object.prototype.hasOwnProperty.call(t.wsOptions,r)&&(e.wsOptions[r]=t[r]);}),e}function RS(t){let e=Rg(t);if(e.hostname||(e.hostname=e.host),!e.hostname){if(typeof document>\"u\")throw new Error(\"Could not determine host. Specify host manually.\");let r=new URL(document.URL);e.hostname=r.hostname,e.port||(e.port=Number(r.port));}return e.objectMode===void 0&&(e.objectMode=!(e.binary===!0||e.binary===void 0)),e}function CS(t,e,r){Kt(\"createWebSocket\"),Kt(`protocol: ${r.protocolId} ${r.protocolVersion}`);let i=r.protocolId===\"MQIsdp\"&&r.protocolVersion===3?\"mqttv3.1\":\"mqtt\";Kt(`creating new Websocket for url: ${e} and protocol: ${i}`);let n;return r.createWebsocket?n=r.createWebsocket(e,[i],r):n=new Ag.default(e,[i],r.wsOptions),n}function BS(t,e){let r=e.protocolId===\"MQIsdp\"&&e.protocolVersion===3?\"mqttv3.1\":\"mqtt\",i=Tg(e,t),n;return e.createWebsocket?n=e.createWebsocket(i,[r],e):n=new WebSocket(i,[r]),n.binaryType=\"arraybuffer\",n}var PS=(t,e)=>{Kt(\"streamBuilder\");let r=Rg(e),i=Tg(r,t),n=CS(t,i,r),o=Ag.default.createWebSocketStream(n,r.wsOptions);return o.url=i,n.on(\"close\",()=>{o.destroy();}),o},OS=(t,e)=>{Kt(\"browserStreamBuilder\");let r,n=RS(e).browserBufferSize||1024*512,o=e.browserBufferTimeout||1e3,s=!e.objectMode,a=BS(t,e),u=h(e,E,S);e.objectMode||(u._writev=bl.writev.bind(u)),u.on(\"close\",()=>{a.close();});let c=typeof a.addEventListener<\"u\";a.readyState===a.OPEN?(r=u,r.socket=a):(r=new bl.BufferedDuplex(e,u,a),c?a.addEventListener(\"open\",d):a.onopen=d),c?(a.addEventListener(\"close\",g),a.addEventListener(\"error\",y),a.addEventListener(\"message\",w)):(a.onclose=g,a.onerror=y,a.onmessage=w);function h(I,C,R){let U=new IS.Transform({objectMode:I.objectMode});return U._write=C,U._flush=R,U}function d(){Kt(\"WebSocket onOpen\"),r instanceof bl.BufferedDuplex&&r.socketReady();}function g(I){Kt(\"WebSocket onClose\",I),r.end(),r.destroy();}function y(I){Kt(\"WebSocket onError\",I);let C=new Error(\"WebSocket error\");C.event=I,r.destroy(C);}function w(I){let{data:C}=I;C instanceof ArrayBuffer?C=yl.Buffer.from(C):C=yl.Buffer.from(C,\"utf8\"),u.push(C);}function E(I,C,R){if(a.bufferedAmount>n){setTimeout(E,o,I,C,R);return}s&&typeof I==\"string\"&&(I=yl.Buffer.from(I,\"utf8\"));try{a.send(I);}catch(U){return R(U)}R();}function S(I){a.close(),I();}return r};Ui.default=Ig.default?OS:PS;});var Pg=M(Rr=>{v();m();_();var ls=Rr&&Rr.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Rr,\"__esModule\",{value:!0});Rr.connectAsync=void 0;var kS=ls(ot()),xS=ls((pg(),X(dg))),MS=ls(ns()),LS=ls(Pi()),Cg=(0, kS.default)(\"mqttjs\"),Re={};LS.default?(Re.wx=hl().default,Re.wxs=hl().default,Re.ali=gl().default,Re.alis=gl().default):(Re.mqtt=ol().default,Re.tcp=ol().default,Re.ssl=ll().default,Re.tls=Re.ssl,Re.mqtts=ll().default);Re.ws=_l().default;Re.wss=_l().default;function US(t){let e;t.auth&&(e=t.auth.match(/^(.+):(.+)$/),e?(t.username=e[1],t.password=e[2]):t.username=t.auth);}function Bg(t,e){if(Cg(\"connecting to an MQTT broker...\"),typeof t==\"object\"&&!e&&(e=t,t=\"\"),e=e||{},t&&typeof t==\"string\"){let n=xS.default.parse(t,!0);if(n.port!=null&&(n.port=Number(n.port)),e=Object.assign(Object.assign({},n),e),e.protocol===null)throw new Error(\"Missing protocol\");e.protocol=e.protocol.replace(/:$/,\"\");}if(US(e),e.query&&typeof e.query.clientId==\"string\"&&(e.clientId=e.query.clientId),e.cert&&e.key)if(e.protocol){if([\"mqtts\",\"wss\",\"wxs\",\"alis\"].indexOf(e.protocol)===-1)switch(e.protocol){case\"mqtt\":e.protocol=\"mqtts\";break;case\"ws\":e.protocol=\"wss\";break;case\"wx\":e.protocol=\"wxs\";break;case\"ali\":e.protocol=\"alis\";break;default:throw new Error(`Unknown protocol for secure connection: \"${e.protocol}\"!`)}}else throw new Error(\"Missing secure protocol key\");if(!Re[e.protocol]){let n=[\"mqtts\",\"wss\"].indexOf(e.protocol)!==-1;e.protocol=[\"mqtt\",\"mqtts\",\"ws\",\"wss\",\"wx\",\"wxs\",\"ali\",\"alis\"].filter((o,s)=>n&&s%2===0?!1:typeof Re[o]==\"function\")[0];}if(e.clean===!1&&!e.clientId)throw new Error(\"Missing clientId for unclean clients\");e.protocol&&(e.defaultProtocol=e.protocol);function r(n){return e.servers&&((!n._reconnectCount||n._reconnectCount===e.servers.length)&&(n._reconnectCount=0),e.host=e.servers[n._reconnectCount].host,e.port=e.servers[n._reconnectCount].port,e.protocol=e.servers[n._reconnectCount].protocol?e.servers[n._reconnectCount].protocol:e.defaultProtocol,e.hostname=e.host,n._reconnectCount++),Cg(\"calling streambuilder for\",e.protocol),Re[e.protocol](n,e)}let i=new MS.default(r,e);return i.on(\"error\",()=>{}),i}function NS(t,e,r=!0){return new Promise((i,n)=>{let o=Bg(t,e),s={connect:u=>{a(),i(o);},end:()=>{a(),i(o);},error:u=>{a(),o.end(),n(u);}};r===!1&&(s.close=()=>{s.error(new Error(\"Couldn't connect to server\"));});function a(){Object.keys(s).forEach(u=>{o.off(u,s[u]);});}Object.keys(s).forEach(u=>{o.on(u,s[u]);});})}Rr.connectAsync=NS;Rr.default=Bg;});var ml=M(G=>{v();m();_();var Og=G&&G.__createBinding||(Object.create?function(t,e,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(e,r);(!n||(\"get\"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,i,n);}:function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r];}),qS=G&&G.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,\"default\",{enumerable:!0,value:e});}:function(t,e){t.default=e;}),DS=G&&G.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!==\"default\"&&Object.prototype.hasOwnProperty.call(t,r)&&Og(e,t,r);return qS(e,t),e},kg=G&&G.__exportStar||function(t,e){for(var r in t)r!==\"default\"&&!Object.prototype.hasOwnProperty.call(e,r)&&Og(e,t,r);},Ni=G&&G.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(G,\"__esModule\",{value:!0});G.ReasonCodes=G.PingTimer=G.UniqueMessageIdProvider=G.DefaultMessageIdProvider=G.Store=G.MqttClient=G.connectAsync=G.connect=G.Client=void 0;var xg=Ni(ns());G.MqttClient=xg.default;var jS=Ni(Yo());G.DefaultMessageIdProvider=jS.default;var FS=Ni($p());G.UniqueMessageIdProvider=FS.default;var WS=Ni(Zo());G.Store=WS.default;var Mg=DS(Pg());G.connect=Mg.default;Object.defineProperty(G,\"connectAsync\",{enumerable:!0,get:function(){return Mg.connectAsync}});var $S=Ni(Da());G.PingTimer=$S.default;G.Client=xg.default;kg(ns(),G);kg(Jr(),G);var HS=Ai();Object.defineProperty(G,\"ReasonCodes\",{enumerable:!0,get:function(){return HS.ReasonCodes}});});var QS=M(We=>{v();m();_();var Lg=We&&We.__createBinding||(Object.create?function(t,e,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(e,r);(!n||(\"get\"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,i,n);}:function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r];}),VS=We&&We.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,\"default\",{enumerable:!0,value:e});}:function(t,e){t.default=e;}),zS=We&&We.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!==\"default\"&&Object.prototype.hasOwnProperty.call(t,r)&&Lg(e,t,r);return VS(e,t),e},KS=We&&We.__exportStar||function(t,e){for(var r in t)r!==\"default\"&&!Object.prototype.hasOwnProperty.call(e,r)&&Lg(e,t,r);};Object.defineProperty(We,\"__esModule\",{value:!0});var GS=zS(ml());We.default=GS;KS(ml(),We);});var mqtt = QS();\n/*! Bundled license information:\n\n@jspm/core/nodelibs/browser/buffer.js:\n (*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh *)\n*/\n\nclass CloudInteropAPI {\n connectParams;\n _sessionDetails;\n _mqttClient;\n reconnectRetryLimit = 30;\n reconnectRetries = 0;\n contextListener;\n constructor(connectParams) {\n this.connectParams = connectParams;\n }\n get sessionDetails() {\n return this._sessionDetails;\n }\n get mqttClient() {\n return this._mqttClient;\n }\n async connect(params) {\n const { userId, password, sourceId, platformId } = params;\n let connectResponse;\n try {\n connectResponse = await axios.post(`${this.connectParams.url}/sessions`, {\n userId,\n sourceId,\n platformId\n });\n if (connectResponse.status !== 200) {\n throw new Error(`Failed to connect to Cloud Interop url: ${this.connectParams.url}`);\n }\n const { sessionRootTopic } = connectResponse.data;\n const lastWillPayload = {\n userId,\n sourceId,\n platformId,\n sessionId: connectResponse.data.sessionId\n };\n const clientOptions = {\n clientId: connectResponse.data.sessionId,\n clean: true,\n protocolVersion: 5,\n will: {\n topic: 'interop/lastwill',\n payload: Buffer.from(JSON.stringify(lastWillPayload)),\n qos: 0,\n retain: false\n },\n username: userId,\n password\n };\n this._mqttClient = await mqtt.connectAsync(connectResponse.data.mqttUrl, clientOptions);\n this._sessionDetails = connectResponse.data;\n console.log(`Cloud Interop successfully connected to ${this.connectParams.url}`);\n this._mqttClient.on('error', (error) => {\n console.error(`Cloud Interop Error: ${error}`);\n });\n this._mqttClient.stream.on('error', (error) => {\n console.error(`Cloud Interop Connection Error: ${error}`);\n });\n this._mqttClient.on('reconnect', () => {\n console.warn(`Cloud Interop attempting reconnection...`);\n // Default reconnectPeriod = 30 seconds\n // Attempt reconnection 30 times before ending session\n this.reconnectRetries += 1;\n if (this.reconnectRetries === this.reconnectRetryLimit) {\n console.warn(`Cloud Interop reached max reconnection attempts...`);\n this.disconnect();\n }\n });\n // Does not fire on initial connection, only successful reconnection attempts\n this._mqttClient.on('connect', () => {\n console.log(`Cloud Interop successfully reconnected`);\n this.reconnectRetries = 0;\n });\n this._mqttClient.on('message', (topic, message) => {\n this.handleCommand(topic, message, this._sessionDetails);\n });\n // Subscribe to all context groups\n this._mqttClient.subscribe(`${sessionRootTopic}/context-groups/#`);\n // Listen out for global commands\n this._mqttClient.subscribe(`${sessionRootTopic}/commands`);\n }\n catch (error) {\n console.warn(`Failed to connect to Cloud Interop at ${this.connectParams.url}`, error);\n }\n }\n async disconnect() {\n if (!this._sessionDetails) {\n return;\n }\n try {\n const disconnectResponse = await axios.delete(`${this.connectParams.url}/sessions/${this._sessionDetails.sessionId}`);\n if (disconnectResponse.status !== 200) {\n console.warn(`Cloud Interop disconnection failed`, disconnectResponse);\n }\n }\n catch (error) {\n console.warn(`Cloud Interop error during disconnection`, error);\n }\n finally {\n this._mqttClient?.removeAllListeners();\n this._mqttClient?.end(true);\n this._sessionDetails = undefined;\n this._mqttClient = undefined;\n this.reconnectRetries = 0;\n }\n }\n async setContext(contextGroup, context) {\n if (!this._sessionDetails) {\n return;\n }\n const { userId, sourceId } = this.connectParams;\n const payload = {\n userId,\n sourceId,\n context\n };\n await axios.post(`${this.connectParams.url}/context-groups/${this._sessionDetails.sessionId}/${contextGroup}`, payload);\n }\n addContextListener(callback) {\n this.contextListener = callback;\n }\n startIntentDiscovery(intentName, context) {\n throw new Error('Method not implemented.');\n }\n endIntentDiscovery(discoveryId) {\n throw new Error('Method not implemented.');\n }\n sendIntentDetail(discoveryId, intentDetail) {\n throw new Error('Method not implemented.');\n }\n raiseIntent(targetSession, intentInstanceId, context) {\n throw new Error('Method not implemented.');\n }\n addIntentDetailListener(callback) {\n throw new Error('Method not implemented.');\n }\n handleCommand(topic, message, sessionDetails) {\n if (message.length === 0 || !sessionDetails) {\n // Ignore clean up messages\n return;\n }\n const messageEnvelope = JSON.parse(message.toString());\n if (topic.startsWith(`${sessionDetails.sessionRootTopic}/context-groups/`)) {\n if (messageEnvelope.source.sessionId === sessionDetails.sessionId) {\n return;\n }\n if (this.contextListener) {\n const { channelName: contextGroup, payload: context, source } = messageEnvelope;\n this.contextListener(contextGroup, context, source);\n }\n }\n }\n}\n\nasync function cloudInteropOverride(config) {\n const client = new CloudInteropAPI(config);\n try {\n await client.connect(config);\n }\n catch (err) {\n console.warn(err);\n return (Base) => {\n return class NoOpOverride extends Base {\n constructor() {\n super();\n }\n };\n };\n }\n return (Base) => {\n return class CloudInteropOverride extends Base {\n constructor() {\n super();\n client.addContextListener((contextGroup, context, source) => {\n if (this.getContextGroups()\n .map(({ id }) => id)\n .includes(contextGroup) &&\n client.sessionDetails?.sessionId !== source.sessionId) {\n super.setContextForGroup({ context: context }, contextGroup);\n }\n });\n }\n async setContextForGroup({ context }, contextGroupId) {\n client.setContext(contextGroupId, context);\n super.setContextForGroup({ context }, contextGroupId);\n }\n async cloudReconnect() {\n await client.connect(config);\n }\n get cloudConnectionState() {\n if (client.mqttClient?.connected) {\n return 'connected';\n }\n if (client.mqttClient?.reconnecting) {\n return 'reconnecting';\n }\n return 'disconnected';\n }\n };\n };\n}\n\nexport { cloudInteropOverride };\n","\"use strict\";var e=require(\"./main-8cad4070.js\");require(\"buffer/\"),require(\"uuid\"),require(\"events\"),require(\"lodash/cloneDeep\"),require(\"lodash/isEqual\"),exports.connect=e.connect;\n","\"use strict\";var e=require(\"buffer/\"),t=require(\"events\"),n=require(\"lodash/cloneDeep\"),i=require(\"lodash/isEqual\"),r=require(\"uuid\");const o=(e,t)=>`${t}<${btoa(JSON.stringify(e))}>`;var s=\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof window?window:\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:{},a={},c={},d={},h={};async function l(e){const t=[];for(const n of e){const e=await n();t.push(e)}return t}Object.defineProperty(h,\"__esModule\",{value:!0}),h.promiseMapSerial=h.serial=h.promiseMap=h.promisify=void 0,h.promisify=function(e){return(...t)=>new Promise(((n,i)=>{e(...t,((e,t)=>e?i(e):n(t)))}))},h.promiseMap=async function(e,t){return Promise.all(e.map(t))},h.serial=l,h.promiseMapSerial=async function(e,t){return l(e.map(((e,n,i)=>()=>t(e,n,i))))};var u,p=s&&s.__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},w=s&&s.__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)};Object.defineProperty(d,\"__esModule\",{value:!0}),d.Reply=d.EmitterBase=d.Base=void 0;const y=h;class f{constructor(e){this.isNodeEnvironment=()=>\"node\"===this.wire.environment.type,this.isOpenFinEnvironment=()=>\"openfin\"===this.wire.environment.type,this.isBrowserEnvironment=()=>\"other\"===this.wire.environment.type,this.wire=e}get fin(){return this.wire.getFin()}get me(){return this.wire.me}}d.Base=f;d.EmitterBase=class extends f{constructor(e,t,...n){super(e),this.topic=t,u.set(this,void 0),this.eventNames=()=>this.hasEmitter()?this.getOrCreateEmitter().eventNames():[],this.emit=(e,t,...n)=>!!this.hasEmitter()&&this.getOrCreateEmitter().emit(e,t,...n),this.hasEmitter=()=>this.wire.eventAggregator.has(w(this,u,\"f\")),this.getOrCreateEmitter=()=>this.wire.eventAggregator.getOrCreate(w(this,u,\"f\")),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[],this.listenerCount=e=>this.hasEmitter()?this.getOrCreateEmitter().listenerCount(e):0,this.registerEventListener=async(e,t={},n,i)=>{const r={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e},o=this.getOrCreateEmitter();n(o);try{await this.wire.sendAction(\"subscribe-to-desktop-event\",r)}catch(e){throw i(o),this.deleteEmitterIfNothingRegistered(o),e}},this.deregisterEventListener=async(e,t={})=>{if(this.hasEmitter()){const n={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e};await this.wire.sendAction(\"unsubscribe-to-desktop-event\",n).catch((()=>null));return this.getOrCreateEmitter()}return Promise.resolve()},p(this,u,[t,...n],\"f\"),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[]}async on(e,t,n){return await this.registerEventListener(e,n,(n=>{n.on(e,t)}),(n=>{n.removeListener(e,t)})),this}async addListener(e,t,n){return this.on(e,t,n)}async once(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.once(e,i),n.once(e,t)}),(n=>{n.removeListener(e,i),n.removeListener(e,t)})),this}async prependListener(e,t,n){return await this.registerEventListener(e,n,(n=>{n.prependListener(e,t)}),(n=>{n.removeListener(e,t)})),this}async prependOnceListener(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.prependOnceListener(e,t),n.once(e,i)}),(n=>{n.removeListener(e,t),n.removeListener(e,i)})),this}async removeListener(e,t,n){const i=await this.deregisterEventListener(e,n);return i&&(i.removeListener(e,t),this.deleteEmitterIfNothingRegistered(i)),this}async deregisterAllListeners(e){const t={...this.identity,type:e,topic:this.topic};if(this.hasEmitter()){const e=this.getOrCreateEmitter(),n=e.listenerCount(t.type),i=[];for(let e=0;enull)));return await Promise.all(i),e}}async removeAllListeners(e){const t=async e=>{const t=await this.deregisterAllListeners(e);t&&(t.removeAllListeners(e),this.deleteEmitterIfNothingRegistered(t))};if(e)await t(e);else if(this.hasEmitter()){const e=this.getOrCreateEmitter().eventNames();await(0,y.promiseMap)(e,t)}return this}deleteEmitterIfNothingRegistered(e){0===e.eventNames().length&&this.wire.eventAggregator.delete(w(this,u,\"f\"))}},u=new WeakMap;d.Reply=class{};var g={};Object.defineProperty(g,\"__esModule\",{value:!0});var m=g.RuntimeError=g.NotSupportedError=g.NotImplementedError=g.NoAckError=g.DuplicateCorrelationError=g.UnexpectedActionError=g.DisconnectedError=void 0;class v extends Error{constructor(e){super(`Expected websocket state OPEN but found ${e}`),this.readyState=e}}g.DisconnectedError=v;class C extends Error{}g.UnexpectedActionError=C;class b extends Error{}g.DuplicateCorrelationError=b;class I extends Error{}g.NoAckError=I;class E extends Error{}g.NotImplementedError=E;class x extends Error{}g.NotSupportedError=x;class A extends Error{constructor(e){const{message:t,name:n,stack:i,...r}=e;super(t),this.name=n||\"Error\",this.stack=i??this.toString(),Object.keys(r).forEach((e=>{this[e]=r[e]}))}}class P extends Error{static getCallSite(e=0){const t=Error.stackTraceLimit,n=e+1;Error.stackTraceLimit=t+n;const i=Error.prepareStackTrace;Error.prepareStackTrace=(e,t)=>t;const r=(new Error).stack?.slice(n)??[];return Error.prepareStackTrace=i,Error.stackTraceLimit=t,r}static prepareStackTrace(e,t){if(\"function\"==typeof Error.prepareStackTrace)return Error.prepareStackTrace(e,t);let n=\"\";n+=e.name||\"Error\",n+=`: ${e.message||\"\"}`;for(const e of t)n+=`\\n at ${e.toString()}`;return n}constructor(e,t){const{reason:n,error:i}=e;super(n),this.name=\"RuntimeError\",i?.stack&&(this.cause=new A(i)),t&&(this.stack=P.prepareStackTrace(this,t))}}m=g.RuntimeError=P;var M={},_={},O={};Object.defineProperty(O,\"__esModule\",{value:!0}),O.validateIdentity=void 0,O.validateIdentity=function(e){let t;return\"object\"==typeof e&&\"string\"==typeof e.uuid||(t=\"Not a valid identity object\"),t};var S={},R={},F={},j={},k={},L={},T={};Object.defineProperty(T,\"__esModule\",{value:!0}),T.handleDeprecatedWarnings=void 0;var $;T.handleDeprecatedWarnings=e=>{(e.contentNavigation?.whitelist||e.contentNavigation?.blacklist||e.contentRedirect?.whitelist||e.contentRedirect?.blacklist)&&console.warn(\"The properties 'whitelist' and 'blacklist' have been marked as deprecated and will be removed in a future version. Please use 'allowlist' and 'denylist'.\")};var B={},G={};Object.defineProperty(G,\"__esModule\",{value:!0}),G.AsyncRetryableLazy=W=G.Lazy=void 0;var W=G.Lazy=class{constructor(e){this.producerFn=e}getValue(){return this.value||(this.value=this.producerFn()),this.value}};G.AsyncRetryableLazy=class{constructor(e){this.producerFn=e}async getValue(){return this.promise||(this.promise=this.producerFn().catch((e=>{throw delete this.promise,e}))),this.promise}};var H={};Object.defineProperty(H,\"__esModule\",{value:!0}),H.WebContents=void 0;const N=d;class D extends N.EmitterBase{constructor(e,t,n){super(e,n,t.uuid,t.name),this.identity=t,this.entityType=n}capturePage(e){return this.wire.sendAction(\"capture-page\",{options:e,...this.identity}).then((({payload:e})=>e.data))}executeJavaScript(e){return this.wire.sendAction(\"execute-javascript-in-window\",{...this.identity,code:e}).then((({payload:e})=>e.data))}getZoomLevel(){return this.wire.sendAction(\"get-zoom-level\",this.identity).then((({payload:e})=>e.data))}setZoomLevel(e){return this.wire.sendAction(\"set-zoom-level\",{...this.identity,level:e}).then((()=>{}))}navigate(e){return this.wire.sendAction(\"navigate-window\",{...this.identity,url:e}).then((()=>{}))}navigateBack(){return this.wire.sendAction(\"navigate-window-back\",{...this.identity}).then((()=>{}))}async navigateForward(){await this.wire.sendAction(\"navigate-window-forward\",{...this.identity})}stopNavigation(){return this.wire.sendAction(\"stop-window-navigation\",{...this.identity}).then((()=>{}))}reload(e=!1){return this.wire.sendAction(\"reload-window\",{ignoreCache:e,...this.identity}).then((()=>{}))}print(e={}){return this.wire.sendAction(\"print\",{...this.identity,options:e}).then((()=>{}))}findInPage(e,t){return this.wire.sendAction(\"find-in-page\",{...this.identity,searchTerm:e,options:t}).then((({payload:e})=>e.data))}stopFindInPage(e){return this.wire.sendAction(\"stop-find-in-page\",{...this.identity,action:e}).then((()=>{}))}getPrinters(){return this.wire.sendAction(\"get-printers\",{...this.identity}).then((({payload:e})=>e.data))}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){await this.wire.sendAction(\"focus-window\",{emitSynthFocused:e,...this.identity})}async showDeveloperTools(){await this.wire.sendAction(\"show-developer-tools\",this.identity)}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction(\"get-process-info\",this.identity);return e}async getSharedWorkers(){return this.wire.sendAction(\"get-shared-workers\",this.identity).then((({payload:e})=>e.data))}async inspectSharedWorker(){await this.wire.sendAction(\"inspect-shared-worker\",{...this.identity})}async inspectSharedWorkerById(e){await this.wire.sendAction(\"inspect-shared-worker-by-id\",{...this.identity,workerId:e})}async inspectServiceWorker(){await this.wire.sendAction(\"inspect-service-worker\",{...this.identity})}async showPopupWindow(e){if(this.wire.sendAction(`${this.entityType}-show-popup-window`,this.identity).catch((()=>{})),e?.onPopupReady){const t=async({popupName:t})=>{try{const n=this.fin.Window.wrapSync({uuid:this.fin.me.uuid,name:t});await e.onPopupReady(n)}catch(e){throw new Error(`Something went wrong during onPopupReady execution: ${e}`)}};await this.once(\"popup-ready\",t)}const{payload:t}=await this.wire.sendAction(\"try-create-popup-window\",{options:{...e,hasResultCallback:!!e?.onPopupResult,hasReadyCallback:!!e?.onPopupReady},...this.identity}),{data:{willOpen:n,options:i}}=t;n&&await this.fin.Window.create(i.initialOptions);if(e?.onPopupResult){const t=async t=>{await e.onPopupResult((e=>{const{name:t,uuid:n,result:i,data:r}=e,o={identity:{name:t,uuid:n},result:i};return r&&(o.data=r),o})(t))},n=async()=>{await this.removeListener(\"popup-result\",t)};await this.on(\"popup-result\",t),await this.once(\"popup-teardown\",n)}const{payload:r}=await this.wire.sendAction(\"show-popup-window\",{options:i,...this.identity});return r.data}}var U,V,z,K,q;function J(){return V||(V=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(function(){if($)return L;$=1,Object.defineProperty(L,\"__esModule\",{value:!0}),L.ViewModule=void 0;const e=d,t=O,n=J(),i=T;class r extends e.Base{async create(e){const{uuid:t}=this.wire.me;if(!e.name||\"string\"!=typeof e.name)throw new Error(\"Please provide a name property as a string in order to create a View.\");return(0,i.handleDeprecatedWarnings)(e),this.wire.environment.childViews?await this.wire.environment.createChildContent({entityType:\"view\",options:{...e,uuid:t}}):await this.wire.sendAction(\"create-view\",{...e,uuid:t}),this.wrapSync({uuid:t,name:e.name})}async wrap(e){this.wire.sendAction(\"view-wrap\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}wrapSync(e){this.wire.sendAction(\"view-wrap-sync\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}getCurrent(){if(this.wire.sendAction(\"view-get-current\").catch((e=>{})),!this.wire.me.isView)throw new Error(\"You are not in a View context\");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction(\"view-get-current-sync\").catch((e=>{})),!this.wire.me.isView)throw new Error(\"You are not in a View context\");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return L.ViewModule=r,L}(),e),n(function(){if(U)return B;var e;U=1,Object.defineProperty(B,\"__esModule\",{value:!0}),B.View=void 0;const t=g,n=G,i=H,r=ie();class o extends i.WebContents{constructor(i,o){super(i,o,\"view\"),this.identity=o,e.set(this,new n.Lazy((()=>this.fin.Platform.wrapSync(this.identity).getClient()))),this.attach=async e=>{await this.wire.sendAction(\"attach-view\",{target:e,...this.identity})},this.destroy=async()=>{await this.wire.sendAction(\"destroy-view\",{...this.identity})},this.show=async()=>{await this.wire.sendAction(\"show-view\",{...this.identity})},this.showAt=async(e,t={})=>{await this.wire.sendAction(\"show-view-at\",{bounds:e,...this.identity,options:t})},this.bringToFront=async()=>{await this.wire.sendAction(\"bring-view-to-front\",{...this.identity})},this.hide=async()=>{await this.wire.sendAction(\"hide-view\",{...this.identity})},this.setBounds=async e=>{await this.wire.sendAction(\"set-view-bounds\",{bounds:e,...this.identity})},this.getBounds=async()=>(await this.wire.sendAction(\"get-view-bounds\",{...this.identity})).payload.data,this.getInfo=async()=>(await this.wire.sendAction(\"get-view-info\",{...this.identity})).payload.data,this.getParentLayout=async()=>(this.wire.sendAction(\"view-get-parent-layout\",{...this.identity}).catch((()=>{})),this.fin.Platform.Layout.getLayoutByViewIdentity(this.identity)),this.getOptions=async()=>this.wire.sendAction(\"get-view-options\",{...this.identity}).then((({payload:e})=>e.data)),this.updateOptions=async e=>this.wire.sendAction(\"update-view-options\",{options:e,...this.identity}).then((()=>{})),this.getCurrentWindow=async()=>{const{payload:{data:e}}=await this.wire.sendAction(\"get-view-window\",{...this.identity});return new r._Window(this.wire,e)},this.getCurrentStack=async()=>{this.wire.sendAction(\"view-get-current-stack\").catch((()=>{}));try{return(await this.getParentLayout()).getStackByViewIdentity(this.identity)}catch(e){throw new t.RuntimeError({reason:\"This view does not belong to a stack.\",error:e})}},this.triggerBeforeUnload=async()=>(await this.wire.sendAction(\"trigger-before-unload\",{...this.identity})).payload.data,this.bindToElement=async e=>{if(!e)throw new Error(\"Element not found.\");return this.wire.environment.observeBounds(e,(async e=>this.setBounds(e)))}}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){const t=await this.getCurrentWindow();await t.focusedWebViewWasChanged(),await super.focus({emitSynthFocused:e})}}return B.View=o,e=new WeakMap,B}(),e)}(k)),k}function Y(){if(z)return j;z=1,Object.defineProperty(j,\"__esModule\",{value:!0}),j.Application=void 0;const e=d,t=ie(),n=J();class i extends e.EmitterBase{constructor(e,n){super(e,\"application\",n.uuid),this.identity=n,this.window=new t._Window(this.wire,{uuid:this.identity.uuid,name:this.identity.uuid})}windowListFromIdentityList(e){const n=[];return e.forEach((e=>{n.push(new t._Window(this.wire,{uuid:e.uuid,name:e.name}))})),n}isRunning(){return this.wire.sendAction(\"is-application-running\",this.identity).then((({payload:e})=>e.data))}async quit(e=!1){try{await this._close(e),await this.wire.sendAction(\"destroy-application\",{force:e,...this.identity})}catch(e){if(![\"Remote connection has closed\",\"Could not locate the requested application\"].some((t=>e.message.includes(t))))throw e}}async _close(e=!1){try{await this.wire.sendAction(\"close-application\",{force:e,...this.identity})}catch(e){if(!e.message.includes(\"Remote connection has closed\"))throw e}}close(e=!1){return console.warn(\"Deprecation Warning: Application.close is deprecated Please use Application.quit\"),this.wire.sendAction(\"application-close\",this.identity).catch((e=>{})),this._close(e)}getChildWindows(){return this.wire.sendAction(\"get-child-windows\",this.identity).then((({payload:e})=>{const t=[];return e.data.forEach((e=>{t.push({uuid:this.identity.uuid,name:e})})),this.windowListFromIdentityList(t)}))}getManifest(){return this.wire.sendAction(\"get-application-manifest\",this.identity).then((({payload:e})=>e.data))}getParentUuid(){return this.wire.sendAction(\"get-parent-application\",this.identity).then((({payload:e})=>e.data))}getShortcuts(){return this.wire.sendAction(\"get-shortcuts\",this.identity).then((({payload:e})=>e.data))}async getViews(){const{payload:e}=await this.wire.sendAction(\"application-get-views\",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}getZoomLevel(){return this.wire.sendAction(\"get-application-zoom-level\",this.identity).then((({payload:e})=>e.data))}getWindow(){return this.wire.sendAction(\"application-get-window\",this.identity).catch((e=>{})),Promise.resolve(this.window)}registerUser(e,t){return this.wire.sendAction(\"register-user\",{userName:e,appName:t,...this.identity}).then((()=>{}))}removeTrayIcon(){return this.wire.sendAction(\"remove-tray-icon\",this.identity).then((()=>{}))}restart(){return this.wire.sendAction(\"restart-application\",this.identity).then((()=>{}))}run(){return console.warn(\"Deprecation Warning: Application.run is deprecated Please use fin.Application.start\"),this.wire.sendAction(\"application-run\",this.identity).catch((e=>{})),this._run()}_run(e={}){return this.wire.sendAction(\"run-application\",{manifestUrl:this._manifestUrl,opts:e,...this.identity}).then((()=>{}))}scheduleRestart(){return this.wire.sendAction(\"relaunch-on-close\",this.identity).then((()=>{}))}async sendApplicationLog(){const{payload:e}=await this.wire.sendAction(\"send-application-log\",this.identity);return e.data}async setJumpList(e){await this.wire.sendAction(\"set-jump-list\",{config:e,...this.identity})}setTrayIcon(e){return this.wire.sendAction(\"set-tray-icon\",{enabledIcon:e,...this.identity}).then((()=>{}))}setShortcuts(e){return this.wire.sendAction(\"set-shortcuts\",{data:e,...this.identity}).then((()=>{}))}async setShortcutQueryParams(e){await this.wire.sendAction(\"set-shortcut-query-args\",{data:e,...this.identity})}setZoomLevel(e){return this.wire.sendAction(\"set-application-zoom-level\",{level:e,...this.identity}).then((()=>{}))}async setAppLogUsername(e){await this.wire.sendAction(\"set-app-log-username\",{data:e,...this.identity})}getTrayIconInfo(){return this.wire.sendAction(\"get-tray-icon-info\",this.identity).then((({payload:e})=>e.data))}hasTrayIcon(){return this.wire.sendAction(\"has-tray-icon\",this.identity).then((({payload:e})=>e.data))}terminate(){return this.wire.sendAction(\"terminate-application\",this.identity).then((()=>{}))}wait(){return this.wire.sendAction(\"wait-for-hung-application\",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction(\"get-info\",this.identity).then((({payload:e})=>e.data))}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction(\"application-get-process-info\",this.identity);return e}async setFileDownloadLocation(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t};await this.wire.sendAction(\"set-file-download-location\",{...n,downloadLocation:e})}async getFileDownloadLocation(){const{payload:{data:e}}=await this.wire.sendAction(\"get-file-download-location\",this.identity);return e}async showTrayIconPopupMenu(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t},{payload:i}=await this.wire.sendAction(\"show-tray-icon-popup-menu\",{...n,options:e});return i.data}async closeTrayIconPopupMenu(){const{name:e}=this.wire.me,t={uuid:this.identity.uuid,name:e};await this.wire.sendAction(\"close-tray-icon-popup-menu\",{...t})}}return j.Application=i,j}function Z(){return q||(q=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(function(){if(K)return F;K=1,Object.defineProperty(F,\"__esModule\",{value:!0}),F.ApplicationModule=void 0;const e=d,t=O,n=Y();class i extends e.Base{async wrap(e){this.wire.sendAction(\"wrap-application\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}wrapSync(e){this.wire.sendAction(\"wrap-application-sync\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}async _create(e){return void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&void 0===e.isPlatformController&&(e.autoShow=!0),await this.wire.sendAction(\"create-application\",e),this.wrap({uuid:e.uuid})}create(e){return console.warn(\"Deprecation Warning: fin.Application.create is deprecated. Please use fin.Application.start\"),this.wire.sendAction(\"application-create\").catch((e=>{})),this._create(e)}async start(e){this.wire.sendAction(\"start-application\").catch((e=>{}));const t=await this._create(e);return await this.wire.sendAction(\"run-application\",{uuid:e.uuid}),t}async startManyManifests(e,t){return this.wire.sendAction(\"run-applications\",{applications:e,opts:t}).then((()=>{}))}getCurrent(){return this.wire.sendAction(\"get-current-application\").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction(\"get-current-application-sync\").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}async startFromManifest(e,t){this.wire.sendAction(\"application-start-from-manifest\").catch((e=>{}));const n=await this._createFromManifest(e);return await n._run(t),n}createFromManifest(e){return console.warn(\"Deprecation Warning: fin.Application.createFromManifest is deprecated. Please use fin.Application.startFromManifest\"),this.wire.sendAction(\"application-create-from-manifest\").catch((e=>{})),this._createFromManifest(e)}_createFromManifest(e){return this.wire.sendAction(\"get-application-manifest\",{manifestUrl:e}).then((({payload:e})=>{const t=e.data.platform?e.data.platform.uuid:e.data.startup_app.uuid;return this.wrap({uuid:t})})).then((t=>(t._manifestUrl=e,t)))}}return F.ApplicationModule=i,F}(),e),n(Y(),e)}(R)),R}H.WebContents=D;var Q={};Object.defineProperty(Q,\"__esModule\",{value:!0}),Q.promisifySubscription=void 0;var X,ee,te;function ne(){if(X)return S;X=1,Object.defineProperty(S,\"__esModule\",{value:!0}),S._Window=void 0;const e=Z(),t=H,n=J(),i=T,r=Q;class o extends t.WebContents{constructor(e,t){super(e,t,\"window\")}async createWindow(e){this.wire.sendAction(\"window-create-window\",this.identity).catch((e=>{}));const t=await(0,r.promisifySubscription)(this,\"fire-constructor-callback\");void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&(e.autoShow=!0),(0,i.handleDeprecatedWarnings)(e);const n=this.wire.environment.createChildContent({entityType:\"window\",options:e}),[o]=await Promise.all([t.getValue(),n]);let s;const{success:a}=o,c=o.data,{message:d}=c;s=a?{httpResponseCode:c.httpResponseCode,apiInjected:c.apiInjected}:{message:c.message,networkErrorCode:c.networkErrorCode,stack:c.stack};const h={message:d,cbPayload:s,success:a};try{this.getWebWindow().fin.__internal_.openerSuccessCBCalled()}catch(e){}return h.success?this:Promise.reject(h)}getAllFrames(){return this.wire.sendAction(\"get-all-frames\",this.identity).then((({payload:e})=>e.data))}getBounds(){return this.wire.sendAction(\"get-window-bounds\",this.identity).then((({payload:e})=>e.data))}center(){return this.wire.sendAction(\"center-window\",this.identity).then((()=>{}))}blur(){return this.wire.sendAction(\"blur-window\",this.identity).then((()=>{}))}bringToFront(){return this.wire.sendAction(\"bring-window-to-front\",this.identity).then((()=>{}))}animate(e,t){return this.wire.sendAction(\"animate-window\",{transitions:e,options:t,...this.identity}).then((()=>{}))}hide(){return this.wire.sendAction(\"hide-window\",this.identity).then((()=>{}))}close(e=!1){return this.wire.sendAction(\"close-window\",{force:e,...this.identity}).then((()=>{Object.setPrototypeOf(this,null)}))}focusedWebViewWasChanged(){return this.wire.sendAction(\"focused-webview-changed\",this.identity).then((()=>{}))}getNativeId(){return this.wire.sendAction(\"get-window-native-id\",this.identity).then((({payload:e})=>e.data))}async getCurrentViews(){const{payload:e}=await this.wire.sendAction(\"window-get-views\",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}disableFrame(){return console.warn(\"Function is deprecated; use disableUserMovement instead.\"),this.wire.sendAction(\"disable-window-frame\",this.identity).then((()=>{}))}disableUserMovement(){return this.wire.sendAction(\"disable-window-frame\",this.identity).then((()=>{}))}enableFrame(){return console.warn(\"Function is deprecated; use enableUserMovement instead.\"),this.wire.sendAction(\"enable-window-frame\",this.identity).then((()=>{}))}enableUserMovement(){return this.wire.sendAction(\"enable-window-frame\",this.identity).then((()=>{}))}flash(){return this.wire.sendAction(\"flash-window\",this.identity).then((()=>{}))}stopFlashing(){return this.wire.sendAction(\"stop-flash-window\",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction(\"get-window-info\",this.identity).then((({payload:e})=>e.data))}async getLayout(e){this.wire.sendAction(\"window-get-layout\",this.identity).catch((e=>{}));const t=await this.getOptions();if(!t.layout&&!t.layoutSnapshot)throw new Error(\"Window does not have a Layout\");return this.fin.Platform.Layout.wrap(e??this.identity)}getOptions(){return this.wire.sendAction(\"get-window-options\",this.identity).then((({payload:e})=>e.data))}getParentApplication(){return this.wire.sendAction(\"window-get-parent-application\",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity))}getParentWindow(){return this.wire.sendAction(\"window-get-parent-window\",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity)).then((e=>e.getWindow()))}async getSnapshot(e){const t={area:e,...this.identity};console.warn(\"Window.getSnapshot has been deprecated, please use Window.capturePage\");return(await this.wire.sendAction(\"get-window-snapshot\",t)).payload.data}getState(){return this.wire.sendAction(\"get-window-state\",this.identity).then((({payload:e})=>e.data))}getWebWindow(){return this.wire.sendAction(\"window-get-web-window\",this.identity).catch((e=>{})),this.wire.environment.getWebWindow(this.identity)}isMainWindow(){return this.wire.sendAction(\"window-is-main-window\",this.identity).catch((e=>{})),this.me.uuid===this.me.name}isShowing(){return this.wire.sendAction(\"is-window-showing\",this.identity).then((({payload:e})=>e.data))}maximize(){return this.wire.sendAction(\"maximize-window\",this.identity).then((()=>{}))}minimize(){return this.wire.sendAction(\"minimize-window\",this.identity).then((()=>{}))}moveBy(e,t,n){return this.wire.sendAction(\"move-window-by\",{deltaLeft:e,deltaTop:t,positioningOptions:n,...this.identity}).then((()=>{}))}moveTo(e,t,n){return this.wire.sendAction(\"move-window\",{left:e,top:t,positioningOptions:n,...this.identity}).then((()=>{}))}resizeBy(e,t,n,i){return this.wire.sendAction(\"resize-window-by\",{deltaWidth:Math.floor(e),deltaHeight:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}resizeTo(e,t,n,i){return this.wire.sendAction(\"resize-window\",{width:Math.floor(e),height:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}restore(){return this.wire.sendAction(\"restore-window\",this.identity).then((()=>{}))}setAsForeground(){return this.wire.sendAction(\"set-foreground-window\",this.identity).then((()=>{}))}setBounds(e,t){return this.wire.sendAction(\"set-window-bounds\",{...e,...this.identity,positioningOptions:t}).then((()=>{}))}show(e=!1){return this.wire.sendAction(\"show-window\",{force:e,...this.identity}).then((()=>{}))}showAt(e,t,n=!1){return this.wire.sendAction(\"show-at-window\",{force:n,left:Math.floor(e),top:Math.floor(t),...this.identity}).then((()=>{}))}updateOptions(e){return this.wire.sendAction(\"update-window-options\",{options:e,...this.identity}).then((()=>{}))}authenticate(e,t){return this.wire.sendAction(\"window-authenticate\",{userName:e,password:t,...this.identity}).then((()=>{}))}async showPopupMenu(e){const{payload:t}=await this.wire.sendAction(\"show-popup-menu\",{options:e,...this.identity});return t.data}async closePopupMenu(){return this.wire.sendAction(\"close-popup-menu\",{...this.identity}).then((()=>{}))}async dispatchPopupResult(e){this.wire.sendAction(\"window-dispatch-popup-result\",this.identity).catch((e=>{})),await this.wire.sendAction(\"dispatch-popup-result\",{data:e,...this.identity})}async print(e={content:\"self\"}){switch(e.content){case void 0:case\"self\":return super.print(e);case\"screenshot\":return this.wire.sendAction(\"print-screenshot\",this.identity).then((()=>{}));case\"views\":return this.wire.sendAction(\"print-views\",{...this.identity,options:e}).then((()=>{}));default:return}}}return S._Window=o,S}function ie(){return te||(te=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(function(){if(ee)return _;ee=1,Object.defineProperty(_,\"__esModule\",{value:!0}),_._WindowModule=void 0;const e=d,t=O,n=ne();class i extends e.Base{async wrap(e){this.wire.sendAction(\"window-wrap\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}wrapSync(e){this.wire.sendAction(\"window-wrap-sync\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}create(e){return this.wire.sendAction(\"create-window\").catch((e=>{})),new n._Window(this.wire,{uuid:this.me.uuid,name:e.name}).createWindow(e)}getCurrent(){if(this.wire.sendAction(\"get-current-window\").catch((e=>{})),!this.wire.me.isWindow)throw new Error(\"You are not in a Window context\");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction(\"get-current-window-sync\").catch((e=>{})),!this.wire.me.isWindow)throw new Error(\"You are not in a Window context\");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return _._WindowModule=i,_}(),e),n(ne(),e)}(M)),M}Q.promisifySubscription=async(e,t,n=(()=>!0),i)=>{let r,o,s;const a=new Promise(((e,t)=>{r=e,o=t})),c=e=>{n(e)&&(clearTimeout(s),r(e))};return await e.on(t,c),i&&(s=setTimeout((()=>o(new Error(\"event timed out\"))),i)),a.finally((()=>{e.removeListener(t,c).catch((()=>null))})),{getValue:()=>a}},Object.defineProperty(c,\"__esModule\",{value:!0}),c.System=void 0;const re=d,oe=g,se=ie(),ae=t;class ce extends re.EmitterBase{constructor(e){super(e,\"system\")}sendExternalProcessRequest(e,t){return new Promise(((n,i)=>{const r=\"external-process-exited\";let o,s,a,c;\"function\"==typeof t.listener&&(a=e=>{const n=e||{};s={topic:\"exited\",uuid:n.processUuid||\"\",exitCode:n.exitCode||0},o===e.processUuid&&(t.listener(s),c.removeListener(r,a))},this.wire.me.name||(this.wire.me.name=this.wire.me.uuid),c=new se._Window(this.wire,this.wire.me),c.on(r,a)),this.wire.sendAction(e,t).then((({payload:e})=>{o=e.data.uuid,n(e.data),s&&o===s.uuid&&(t.listener(s),c.removeListener(r,a))})).catch((e=>{c&&c.removeListener(r,a),i(e)}))}))}getVersion(){return this.wire.sendAction(\"get-version\").then((({payload:e})=>e.data))}clearCache(e){return this.wire.sendAction(\"clear-cache\",e).then((()=>{}))}deleteCacheOnExit(){return this.wire.sendAction(\"delete-cache-request\").then((()=>{}))}exit(){return this.wire.sendAction(\"exit-desktop\").then((()=>{}))}async fetchManifest(e){const{payload:{data:t}}=await this.wire.sendAction(\"fetch-manifest\",{manifestUrl:e});return t}flushCookieStore(){return this.wire.sendAction(\"flush-cookie-store\").then((()=>{}))}getAllWindows(){return this.wire.sendAction(\"get-all-windows\").then((({payload:e})=>e.data))}getAllApplications(){return this.wire.sendAction(\"get-all-applications\").then((({payload:e})=>e.data))}getCommandLineArguments(){return this.wire.sendAction(\"get-command-line-arguments\").then((({payload:e})=>e.data))}async getCrashReporterState(){const{payload:{data:{diagnosticMode:e,isRunning:t}}}=await this.wire.sendAction(\"get-crash-reporter-state\");return console.warn(\"diagnosticMode property is deprecated. It will be removed in a future version\"),{diagnosticMode:e,diagnosticsMode:e,isRunning:t}}async startCrashReporter(e){const t=e,n={...t,diagnosticMode:t.diagnosticsMode||t.diagnosticMode},{payload:{data:{diagnosticMode:i,isRunning:r}}}=await this.wire.sendAction(\"start-crash-reporter\",n);return{diagnosticMode:i,diagnosticsMode:i,isRunning:r}}getUniqueUserId(){return this.wire.sendAction(\"get-unique-user-id\").then((({payload:e})=>e.data))}getEntityInfo(e,t){return this.wire.sendAction(\"get-entity-info\",{uuid:e,name:t}).then((({payload:e})=>e.data))}getEnvironmentVariable(e){return this.wire.sendAction(\"get-environment-variable\",{environmentVariables:e}).then((({payload:e})=>e.data))}getFocusedWindow(){return this.wire.sendAction(\"get-focused-window\").then((({payload:e})=>e.data))}async isAppCertified(e){const{payload:{data:{certifiedInfo:t}}}=await this.wire.sendAction(\"is-app-certified\",{manifestUrl:e});return t}getInstalledRuntimes(){return this.wire.sendAction(\"get-installed-runtimes\").then((({payload:e})=>e.data.runtimes))}async getInstalledApps(){const{payload:{data:{installedApps:e}}}=await this.wire.sendAction(\"get-installed-apps\");return e}getLog(e){return this.wire.sendAction(\"view-log\",e).then((({payload:e})=>e.data))}getMachineId(){return this.wire.sendAction(\"get-machine-id\").then((({payload:e})=>e.data))}getMinLogLevel(){return this.wire.sendAction(\"get-min-log-level\").then((({payload:e})=>e.data))}getLogList(){return this.wire.sendAction(\"list-logs\").then((({payload:e})=>e.data))}getMonitorInfo(){return this.wire.sendAction(\"get-monitor-info\").then((({payload:e})=>e.data))}getMousePosition(){return this.wire.sendAction(\"get-mouse-position\").then((({payload:e})=>e.data))}getProcessList(){return console.warn(\"System.getProcessList has been deprecated. Please consider using our new process APIs: Window.getProcessInfo, View.getProcessInfo, Application.getProcessInfo, System.getAllProcessInfo\"),this.wire.sendAction(\"process-snapshot\").then((({payload:e})=>e.data))}async getAllProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction(\"get-all-process-info\",this.identity);return e}getProxySettings(){return this.wire.sendAction(\"get-proxy-settings\").then((({payload:e})=>e.data))}getRuntimeInfo(){return this.wire.sendAction(\"get-runtime-info\").then((({payload:e})=>e.data))}getRvmInfo(){return this.wire.sendAction(\"get-rvm-info\").then((({payload:e})=>e.data))}getHostSpecs(){return this.wire.sendAction(\"get-host-specs\").then((({payload:e})=>e.data))}getOSInfo(){return this.wire.sendAction(\"get-os-info\").then((({payload:e})=>e.data))}launchExternalProcess(e){return this.sendExternalProcessRequest(\"launch-external-process\",e)}monitorExternalProcess(e){return this.sendExternalProcessRequest(\"monitor-external-process\",e)}log(e,t){return this.wire.sendAction(\"write-to-log\",{level:e,message:t}).then((()=>{}))}openUrlWithBrowser(e){return this.wire.sendAction(\"open-url-with-browser\",{url:e}).then((()=>{}))}async registerCustomProtocol(e){if(\"object\"!=typeof e)throw new Error(\"Must provide an object with a `protocolName` property having a string value.\");await this.wire.sendAction(\"register-custom-protocol\",e)}async unregisterCustomProtocol(e){await this.wire.sendAction(\"unregister-custom-protocol\",{protocolName:e})}async getCustomProtocolState(e){return this.wire.sendAction(\"get-custom-protocol-state\",{protocolName:e}).then((({payload:e})=>e.data))}releaseExternalProcess(e){return this.wire.sendAction(\"release-external-process\",{uuid:e}).then((()=>{}))}showDeveloperTools(e){return this.wire.sendAction(\"show-developer-tools\",e).then((()=>{}))}terminateExternalProcess(e){return this.wire.sendAction(\"terminate-external-process\",e).then((()=>{}))}updateProxySettings(e){return this.wire.sendAction(\"update-proxy\",e).then((()=>{}))}async downloadAsset(e,t){const n=()=>{};let i=n,r=n;const o=new Promise(((e,t)=>{i=e,r=t}));if(\"openfin\"!==this.wire.environment.type)throw new oe.NotSupportedError(\"downloadAsset only supported in an OpenFin Render process\");const s=oe.RuntimeError.getCallSite(),a=this.wire.environment.getNextMessageId().toString(),c=`asset-download-progress-${a}`,d=`asset-download-error-${a}`,h=`asset-download-complete-${a}`,l=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},u=()=>{this.removeListener(c,l)};await Promise.all([this.on(c,l),this.once(d,(e=>{u();const{reason:t,err:n}=e;r(new oe.RuntimeError({reason:t,error:n},s))})),this.once(h,(()=>{u(),i()}))]);const p=Object.assign(e,{downloadId:a});return await this.wire.sendAction(\"download-asset\",p).catch((e=>{throw u(),e})),o}downloadRuntime(e,t){const n=oe.RuntimeError.getCallSite();return new Promise(((i,r)=>{if(\"openfin\"!==this.wire.environment.type)return void r(new oe.NotSupportedError(\"downloadRuntime only supported in an OpenFin Render process\"));const o=this.wire.environment.getNextMessageId().toString(),s=`runtime-download-progress-${o}`,a=`runtime-download-error-${o}`,c=`runtime-download-complete-${o}`,d=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},h=()=>{this.removeListener(s,d)};this.on(s,d),this.once(a,(e=>{h();const{reason:t,err:i}=e;r(new oe.RuntimeError({reason:t,error:i},n))})),this.once(c,(()=>{h(),i()}));const l=Object.assign(e,{downloadId:o});this.wire.sendAction(\"download-runtime\",l).catch((e=>{h(),r(e)}))}))}downloadPreloadScripts(e){return this.wire.sendAction(\"download-preload-scripts\",{scripts:e}).then((({payload:e})=>e.data))}getAllExternalApplications(){return this.wire.sendAction(\"get-all-external-applications\").then((({payload:e})=>e.data))}getAppAssetInfo(e){return this.wire.sendAction(\"get-app-asset-info\",e).then((({payload:e})=>e.data))}getCookies(e){const t=this.wire.environment.getUrl(),n=Object.assign(e,{url:t});return this.wire.sendAction(\"get-cookies\",n).then((({payload:e})=>e.data))}setMinLogLevel(e){return this.wire.sendAction(\"set-min-log-level\",{level:e}).then((()=>{}))}resolveUuid(e){return this.wire.sendAction(\"resolve-uuid\",{entityKey:e}).then((({payload:e})=>e.data))}executeOnRemote(e,t){return t.requestingIdentity=e,this.wire.ferryAction(t)}readRegistryValue(e,t,n){return this.wire.sendAction(\"read-registry-value\",{rootKey:e,subkey:t,value:n}).then((({payload:e})=>e.data))}registerExternalConnection(e){return this.wire.sendAction(\"register-external-connection\",{uuid:e}).then((({payload:e})=>e.data))}async getServiceConfiguration(e){if(\"string\"!=typeof e.name)throw new Error(\"Must provide an object with a `name` property having a string value\");const{name:t}=e;return this.wire.sendAction(\"get-service-configuration\",{name:t}).then((({payload:e})=>e.data))}async getSystemAppConfig(e){if(\"string\"!=typeof e)throw new Error(\"Must provide a string value for name of system app\");return this.wire.sendAction(\"get-system-app-configuration\",{name:e}).then((({payload:e})=>e.data))}async registerShutdownHandler(e){this.wire.sendAction(\"system-register-shutdown-handler\").catch((e=>{}));const{uuid:t,name:n}=this.wire.me;this.on(\"system-shutdown\",(i=>{e({proceed:()=>{this.wire.environment.raiseEvent(\"application/system-shutdown-handled\",{uuid:t,name:n,topic:\"application\"})}})}))}runRvmHealthCheck(){return this.wire.sendAction(\"run-rvm-health-check\").then((({payload:e})=>e.data))}async launchManifest(e,t={}){const{subscribe:n,...i}=t,r=i;if(n){const e=new ae.EventEmitter;n(e);const t=\"app-version-progress\",i=\"runtime-status\",o=\"app-version-complete\",s=\"app-version-error\",a=this.wire.environment.getNextMessageId().toString();r.appVersionId=a;const c=[o,t,i,s],d=e=>{const{appVersionId:t,topic:n,type:i,...r}=e;return{...r,type:c.find((e=>i.includes(e)))}},h=t=>{const n=d(t);e.emit(n.type,n)},l=()=>{this.removeListener(`${t}.${a}`,h),this.removeListener(`${i}.${a}`,h),this.removeListener(`${o}.${a}`,h),this.removeListener(`${s}.${a}`,h),this.removeListener(`${o}.${a}`,l),this.removeListener(`${s}.${a}`,l)};await Promise.all([this.on(`${t}.${a}`,h),this.on(`${i}.${a}`,h),this.once(`${o}.${a}`,h),this.once(`${s}.${a}`,h),this.once(`${o}.${a}`,l),this.once(`${s}.${a}`,l)])}return(await this.wire.sendAction(\"launch-manifest\",{manifestUrl:e,opts:r})).payload.data.manifest}async queryPermissionForCurrentContext(e){const t={uuid:this.wire.me.uuid,name:this.wire.me.name};return(await this.wire.sendAction(\"query-permission-for-current-context\",{apiName:e,identity:t})).payload.data}async enableNativeWindowIntegrationProvider(e){const{payload:t}=await this.wire.sendAction(\"enable-native-window-integration-provider\",{permissions:e});return t.data}async registerUsage({data:e,type:t}){await this.wire.sendAction(\"register-usage\",{data:e,type:t})}async getPrinters(){const{payload:e}=await this.wire.sendAction(\"system-get-printers\");return e.data}async updateProcessLoggingOptions(e){await this.wire.sendAction(\"system-update-process-logging-options\",{options:e})}async getDomainSettings(){const{payload:{data:e}}=await this.wire.sendAction(\"get-domain-settings\",this.identity);return e}async setDomainSettings(e){await this.wire.sendAction(\"set-domain-settings\",{domainSettings:e,...this.identity})}async refreshExtensions(){const{payload:e}=await this.wire.sendAction(\"refresh-extensions\");return e.data}async getInstalledExtensions(){const{payload:e}=await this.wire.sendAction(\"get-installed-extensions\");return e.data}}c.System=ce;var de={},he={};Object.defineProperty(he,\"__esModule\",{value:!0}),he.RefCounter=void 0;he.RefCounter=class{constructor(){this.topicRefMap=new Map}incRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t+1;n=i,this.topicRefMap.set(e,i)}else this.topicRefMap.set(e,1),n=1;return n}decRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t-1;this.topicRefMap.set(e,i),n=i}else n=-1;return n}actOnFirst(e,t,n){return 1===this.incRefCount(e)?t():n()}actOnLast(e,t,n){return 0===this.decRefCount(e)?t():n()}};var le={},ue={},pe={};Object.defineProperty(pe,\"__esModule\",{value:!0}),pe.ChannelBase=pe.ProtectedItems=void 0;const we=e=>async(t,n,i)=>{const r=await e(t,n,i);return void 0===r?n:r};pe.ProtectedItems=class{constructor(e,t){this.providerIdentity=e,this.close=t}};class ye{static defaultAction(e){throw new Error(`No action registered at target for ${e}`)}constructor(){this.subscriptions=new Map}async processAction(e,t,n){try{const i=this.subscriptions.has(e)?this.subscriptions.get(e):(t,n)=>(this.defaultAction??ye.defaultAction)(e,t,n),r=this.preAction?await this.preAction(e,t,n):t,o=await i(r,n);return this.postAction?await this.postAction(e,o,n):o}catch(t){if(this.errorMiddleware)return this.errorMiddleware(e,t,n);throw t}}beforeAction(e){if(this.preAction)throw new Error(\"Already registered beforeAction middleware\");this.preAction=we(e)}onError(e){if(this.errorMiddleware)throw new Error(\"Already registered error middleware\");this.errorMiddleware=e}afterAction(e){if(this.postAction)throw new Error(\"Already registered afterAction middleware\");this.postAction=we(e)}remove(e){this.subscriptions.delete(e)}setDefaultAction(e){if(this.defaultAction)throw new Error(\"default action can only be set once\");this.defaultAction=e}register(e,t){if(this.subscriptions.has(e))throw new Error(`Subscription already registered for action: ${e}. Unsubscribe before adding new subscription`);return this.subscriptions.set(e,t),!0}}pe.ChannelBase=ye;var fe,ge,me,ve=s&&s.__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)},Ce=s&&s.__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};Object.defineProperty(ue,\"__esModule\",{value:!0}),ue.ChannelClient=void 0;const be=pe,Ie=new Map;class Ee extends be.ChannelBase{static closeChannelByEndpointId(e){const t=Ie.get(e);t&&ve(t,me,\"f\").call(t)}static handleProviderDisconnect(e){for(const t of Ie.values())t.providerIdentity.channelId===e.channelId&&(t.disconnectListener(e),ve(t,me,\"f\").call(t))}constructor(e,t,n){super(),fe.set(this,void 0),ge.set(this,void 0),this.processAction=(e,t,n)=>super.processAction(e,t,n),me.set(this,(()=>{Ie.delete(this.endpointId),ve(this,ge,\"f\").close()})),Ce(this,fe,new be.ProtectedItems(e,t),\"f\"),this.disconnectListener=()=>{},this.endpointId=e.endpointId,Ce(this,ge,n,\"f\"),Ie.set(this.endpointId,this),n.receive(this.processAction)}get providerIdentity(){return ve(this,fe,\"f\").providerIdentity}async dispatch(e,t){if(ve(this,ge,\"f\").isEndpointConnected(this.providerIdentity.channelId))return ve(this,ge,\"f\").send(this.providerIdentity.channelId,e,t);throw new Error(\"The client you are trying to dispatch from is disconnected from the target provider.\")}onDisconnection(e){this.disconnectListener=t=>{try{e(t)}catch(e){throw new Error(`Error while calling the onDisconnection callback: ${e.message}`)}finally{this.disconnectListener=()=>{}}}}async disconnect(){await this.sendDisconnectAction(),ve(this,me,\"f\").call(this)}async sendDisconnectAction(){const e=ve(this,fe,\"f\");await e.close()}static async wireClose(e,t,n){const{channelName:i,uuid:r,name:o}=t;await e.sendAction(\"disconnect-from-channel\",{channelName:i,uuid:r,name:o,endpointId:n})}}ue.ChannelClient=Ee,fe=new WeakMap,ge=new WeakMap,me=new WeakMap;var xe={},Ae={};Object.defineProperty(Ae,\"__esModule\",{value:!0}),Ae.exhaustiveCheck=void 0,Ae.exhaustiveCheck=function(e,t){throw new Error(`Unsupported value: ${e}${t?`\\n Supported values are: ${t.join(\"\")}`:\"\"}`)};var Pe,Me,_e,Oe={},Se=s&&s.__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},Re=s&&s.__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)};Object.defineProperty(Oe,\"__esModule\",{value:!0}),Oe.ClassicInfo=Oe.ClassicStrategy=void 0;Oe.ClassicStrategy=class{constructor(e,t,n,i){this.messageReceiver=t,this.endpointId=n,this.providerIdentity=i,Pe.set(this,void 0),Me.set(this,new Map),_e.set(this,new Map),this.send=async(e,t,n)=>{const i=Re(this,Me,\"f\").get(e);if(!i)throw new Error(`Could not locate routing info for endpoint ${e}`);const r={...i};r.isLocalEndpointId&&delete r.endpointId,delete r.isLocalEndpointId;const o=Re(this,Pe,\"f\").sendAction(\"send-channel-message\",{...r,providerIdentity:this.providerIdentity,action:t,payload:n});Re(this,_e,\"f\").get(e)?.add(o);return(await o.catch((e=>{throw new Error(e.message)})).finally((()=>{Re(this,_e,\"f\").get(e)?.delete(o)}))).payload.data.result},this.close=async()=>{this.messageReceiver.removeEndpoint(this.providerIdentity.channelId,this.endpointId),[...Re(this,Me,\"f\").keys()].forEach((e=>this.closeEndpoint(e))),Se(this,Me,new Map,\"f\")},Se(this,Pe,e,\"f\")}onEndpointDisconnect(e,t){}receive(e){this.messageReceiver.addEndpoint(e,this.providerIdentity.channelId,this.endpointId)}async closeEndpoint(e){const t=Re(this,Me,\"f\").get(e);Re(this,Me,\"f\").delete(e);const n=Re(this,_e,\"f\").get(e);n?.forEach((n=>{const i=`Channel connection with identity uuid: ${t?.uuid} / name: ${t?.name} / endpointId: ${e} no longer connected.`;n.cancel(new Error(i))}))}isEndpointConnected(e){return Re(this,Me,\"f\").has(e)}addEndpoint(e,t){Re(this,Me,\"f\").set(e,t.endpointIdentity),Re(this,_e,\"f\").set(e,new Set)}isValidEndpointPayload(e){return\"string\"==typeof e?.endpointIdentity?.endpointId||\"string\"==typeof e?.endpointIdentity?.channelId}},Pe=new WeakMap,Me=new WeakMap,_e=new WeakMap,Oe.ClassicInfo={version:5,minimumVersion:0,type:\"classic\"};var Fe={},je={},ke={};Object.defineProperty(ke,\"__esModule\",{value:!0}),ke.errorToPOJO=void 0,ke.errorToPOJO=function(e){return{stack:e.stack,name:e.name,message:e.message,toString:()=>e.stack||e.toString()}};var Le,Te,$e=s&&s.__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)},Be=s&&s.__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};Object.defineProperty(je,\"__esModule\",{value:!0}),je.RTCEndpoint=void 0;const Ge=ke;je.RTCEndpoint=class{static isValidEndpointPayload(e){const t=e=>\"object\"==typeof e&&null!==e;return t(e)&&t(e.endpointIdentity)&&t(e.rtc)&&\"string\"==typeof e.endpointIdentity.endpointId}constructor({rtc:e,endpointIdentity:t}){this.responseMap=new Map,Le.set(this,null),Te.set(this,void 0),this.connectionStateChangeHandler=e=>{\"connected\"!==this.rtc.rtcClient.connectionState&&(this.rtc.rtcClient.removeEventListener(\"connectionstatechange\",this.connectionStateChangeHandler),this.close(),$e(this,Te,\"f\")&&$e(this,Te,\"f\").call(this))},this.send=async(e,t)=>{const n=`message-${Math.random()}`,i=new Promise(((e,t)=>{this.responseMap.set(n,{resolve:e,reject:t})}));return this.rtc.channels.request.send(JSON.stringify({action:e,payload:t,messageId:n})),i},this.close=()=>{this.responseMap.forEach((e=>e.reject(\"Connection has closed.\"))),this.responseMap=new Map,this.rtc.channels.request.close(),this.rtc.channels.response.close(),this.rtc.rtcClient.close()},this.rtc=e,this.endpointIdentity=t,this.rtc.channels.response.addEventListener(\"message\",(e=>{let{data:t}=e;e.data instanceof ArrayBuffer&&(t=(new TextDecoder).decode(e.data));const{messageId:n,payload:i,success:r,error:o}=JSON.parse(t),{resolve:s,reject:a}=this.responseMap.get(n)??{};s&&a?(this.responseMap.delete(n),r?s(i):a(o)):(console.log(\"Could not find id in responseMap.\"),console.log(e))})),this.rtc.channels.request.addEventListener(\"message\",(async e=>{let{data:n}=e;e.data instanceof ArrayBuffer&&(n=(new TextDecoder).decode(e.data));const{messageId:i,action:r,payload:o}=JSON.parse(n);if($e(this,Le,\"f\"))try{const e=await $e(this,Le,\"f\").call(this,r,o,t);this.rtc.channels.response.send(JSON.stringify({messageId:i,payload:e,success:!0}))}catch(e){\"open\"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,error:(0,Ge.errorToPOJO)(e),success:!1}))}else\"open\"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,success:!1,error:\"Connection not ready.\"}))})),this.rtc.rtcClient.addEventListener(\"connectionstatechange\",this.connectionStateChangeHandler),Object.values(this.rtc.channels).forEach((e=>{e.onclose=e=>{[...this.responseMap.values()].forEach((e=>e.reject(new Error(\"RTCDataChannel closed unexpectedly, this is most commonly caused by message size. Note: RTC Channels have a message size limit of ~255kB.\")))),this.close(),$e(this,Te,\"f\")&&$e(this,Te,\"f\").call(this)}}))}onDisconnect(e){if($e(this,Te,\"f\"))throw new Error(\"RTCEndpoint disconnectListener cannot be set twice.\");Be(this,Te,e,\"f\")}receive(e){if($e(this,Le,\"f\"))throw new Error(\"You have already set a listener for this RTC Endpoint.\");Be(this,Le,e,\"f\")}get connected(){return\"connected\"===this.rtc.rtcClient.connectionState}},Le=new WeakMap,Te=new WeakMap;var We,He,Ne,De={},Ue=s&&s.__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)},Ve=s&&s.__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};Object.defineProperty(De,\"__esModule\",{value:!0}),De.EndpointStrategy=void 0;De.EndpointStrategy=class{constructor(e,t,n){this.EndpointType=e,this.StrategyName=n,We.set(this,null),He.set(this,new Map),Ne.set(this,!0),this.send=async(e,t,n)=>this.getEndpointById(e).send(t,n),this.close=async()=>{Ue(this,Ne,\"f\")&&(Ue(this,He,\"f\").forEach((e=>e.close())),Ve(this,He,new Map,\"f\")),Ve(this,Ne,!1,\"f\")},this.isValidEndpointPayload=t}onEndpointDisconnect(e,t){this.getEndpointById(e).onDisconnect(t)}receive(e){if(Ue(this,We,\"f\"))throw new Error(`You have already set a listener for this ${this.StrategyName} Strategy`);Ve(this,We,e,\"f\"),Ue(this,He,\"f\").forEach((e=>e.receive(Ue(this,We,\"f\"))))}getEndpointById(e){const t=Ue(this,He,\"f\").get(e);if(!t)throw new Error(`Client with endpoint id ${e} is not connected`);return t}get connected(){return Ue(this,Ne,\"f\")}isEndpointConnected(e){return Ue(this,He,\"f\").has(e)}addEndpoint(e,t){if(!Ue(this,Ne,\"f\"))return void console.warn(`Adding endpoint to disconnected ${this.StrategyName} Strategy`);const n=new this.EndpointType(t);Ue(this,We,\"f\")&&n.receive(Ue(this,We,\"f\")),Ue(this,He,\"f\").set(e,n)}async closeEndpoint(e){Ue(this,He,\"f\").delete(e)}},We=new WeakMap,He=new WeakMap,Ne=new WeakMap,Object.defineProperty(Fe,\"__esModule\",{value:!0}),Fe.RTCInfo=Fe.RTCStrategy=void 0;const ze=je,Ke=De;class qe extends Ke.EndpointStrategy{constructor(){super(ze.RTCEndpoint,ze.RTCEndpoint.isValidEndpointPayload,\"RTC\")}}Fe.RTCStrategy=qe,Fe.RTCInfo={version:2,minimumVersion:0,type:\"rtc\"};var Je={};Object.defineProperty(Je,\"__esModule\",{value:!0}),Je.RTCICEManager=void 0;const Ye=d;class Ze extends Ye.EmitterBase{constructor(e){super(e,\"channel\"),this.ensureChannelOpened=e=>new Promise(((t,n)=>{if(\"open\"===e.readyState)t();else if(\"connecting\"===e.readyState){const n=()=>{e.removeEventListener(\"open\",n),t()};e.addEventListener(\"open\",n)}else n(new Error(\"This Channel has already closed\"))}))}static createDataChannelPromise(e,t){let n;const i=new Promise((e=>{n=e})),r=i=>{const o=()=>{i.channel.removeEventListener(\"open\",o),n(i.channel)};i.channel.label===e&&(i.channel.addEventListener(\"open\",o),t.removeEventListener(\"datachannel\",r))};return t.addEventListener(\"datachannel\",r),i}async listenForProviderIce(e,t){await this.on(this.createProviderEventName(e),t,{timestamp:Date.now()})}async raiseProviderIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createProviderEventName(e)),t)}async listenForClientIce(e,t){await this.on(this.createClientEventName(e),t,{timestamp:Date.now()})}async raiseClientIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createClientEventName(e)),t)}cleanupIceListeners(e){this.removeAllListeners(this.createClientEventName(e)),this.removeAllListeners(this.createProviderEventName(e))}createClientEventName(e){return`ice-client-${e}`}createProviderEventName(e){return`ice-provider-${e}`}createRouteString(e){return`channel/${e}`}createRtcPeer(){return this.wire.environment.getRtcPeer()}async startClientOffer(){const e=Math.random().toString(),t=this.createRtcPeer();t.addEventListener(\"icecandidate\",(async t=>{t.candidate&&await this.raiseClientIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForProviderIce(e,(async e=>{await t.addIceCandidate(e.candidate)}));const n={request:t.createDataChannel(\"request\"),response:t.createDataChannel(\"response\")},i=await t.createOffer();await t.setLocalDescription(i);const r=Promise.all([n.request,n.response].map(this.ensureChannelOpened)).then((()=>{}));return{rtcClient:t,channels:n,offer:i,rtcConnectionId:e,channelsOpened:r}}async finishClientOffer(e,t,n){return await e.setRemoteDescription(t),await n,!0}async createProviderAnswer(e,t){const n=this.createRtcPeer(),i=Ze.createDataChannelPromise(\"request\",n),r=Ze.createDataChannelPromise(\"response\",n);n.addEventListener(\"icecandidate\",(async t=>{t.candidate&&await this.raiseProviderIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForClientIce(e,(async e=>{await n.addIceCandidate(e.candidate)})),await n.setRemoteDescription(t);const o=await n.createAnswer();await n.setLocalDescription(o);const s=Promise.all([i,r]).then((([t,n])=>(this.cleanupIceListeners(e),{request:t,response:n})));return{rtcClient:n,answer:o,channels:s}}}Je.RTCICEManager=Ze;var Qe={},Xe={};function et(e){return[...e.split(\".\").reverse().entries()].reduce(((e,[t,n])=>e+ +n*1e4**t),0)}function tt(e,t){return et(e)>=et(t)}function nt(e){return e.split(\"/\")[0]}Object.defineProperty(Xe,\"__esModule\",{value:!0}),Xe.runtimeUuidMeetsMinimumRuntimeVersion=Xe.parseRuntimeUuid=Xe.meetsMinimumRuntimeVersion=void 0,Xe.meetsMinimumRuntimeVersion=tt,Xe.parseRuntimeUuid=nt,Xe.runtimeUuidMeetsMinimumRuntimeVersion=function(e,t){return tt(nt(e),t)};var it,rt,ot,st,at,ct=s&&s.__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)},dt=s&&s.__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};Object.defineProperty(Qe,\"__esModule\",{value:!0}),Qe.ChannelProvider=void 0;const ht=pe,lt=Xe;class ut extends ht.ChannelBase{get connections(){return[...ct(this,it,\"f\")]}static handleClientDisconnection(e,t){const n=e.connections.find((e=>e.endpointId===t.endpointId));if(n)ct(e,st,\"f\").call(e,n);else{e.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name)).forEach(ct(e,st,\"f\"))}e.disconnectListener(t)}static setProviderRemoval(e,t){ut.removalMap.set(e,t)}constructor(e,t,n){super(),it.set(this,void 0),rt.set(this,void 0),ot.set(this,void 0),st.set(this,(e=>{const t=this.connections.filter((t=>t.endpointId!==e.endpointId));ct(this,ot,\"f\").closeEndpoint(e.endpointId),dt(this,it,t,\"f\")})),this.processAction=async(e,t,n)=>(ut.clientIsMultiRuntime(n)&&!(0,lt.runtimeUuidMeetsMinimumRuntimeVersion)(n.runtimeUuid,\"18.87.56.0\")?this.handleMultiRuntimeLegacyClient(n):this.checkForClientConnection(n),super.processAction(e,t,n)),at.set(this,(()=>{ct(this,ot,\"f\").close();const e=ut.removalMap.get(this);e&&e()})),dt(this,rt,new ht.ProtectedItems(e,t),\"f\"),this.connectListener=()=>{},this.disconnectListener=()=>{},dt(this,it,[],\"f\"),dt(this,ot,n,\"f\"),n.receive(this.processAction)}dispatch(e,t,n){const i=e.endpointId??this.getEndpointIdForOpenFinId(e,t);return i&&ct(this,ot,\"f\").isEndpointConnected(i)?ct(this,ot,\"f\").send(i,t,n):Promise.reject(new Error(`Client connection with identity uuid: ${e.uuid} / name: ${e.name} / endpointId: ${i} no longer connected.`))}async processConnection(e,t){return ct(this,it,\"f\").push(e),this.connectListener(e,t)}publish(e,t){return this.connections.map((n=>ct(this,ot,\"f\").send(n.endpointId,e,t)))}onConnection(e){this.connectListener=e}onDisconnection(e){this.disconnectListener=e}async destroy(){const e=ct(this,rt,\"f\");e.providerIdentity,dt(this,it,[],\"f\"),await e.close(),ct(this,at,\"f\").call(this)}async getAllClientInfo(){return this.connections.map((e=>{const{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}=e;return{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}}))}checkForClientConnection(e){if(!this.isClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider.\\n Client Identity: {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}isClientConnected(e){return ut.clientIdentityIncludesEndpointId(e)?this.connections.some((t=>t.endpointId===e.endpointId&&t.uuid===e.uuid&&t.name===e.name)):this.isLegacyClientConnected(e)}isLegacyClientConnected(e){return this.connections.some((t=>t.uuid===e.uuid&&t.name===e.name))}handleMultiRuntimeLegacyClient(e){if(!this.isLegacyClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider. Client Identity:\\n {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}getEndpointIdForOpenFinId(e,t){const n=this.connections.filter((t=>t.name===e.name&&t.uuid===e.uuid));if(n.length>=2){const n=ct(this,rt,\"f\"),{uuid:i,name:r}=e,o=n?.providerIdentity.uuid,s=n?.providerIdentity.name;console.warn(`WARNING: Dispatch call may have unintended results. The \"to\" argument of your dispatch call is missing the\\n \"endpointId\" parameter. The identity you are dispatching to ({uuid: ${i}, name: ${r}})\\n has multiple channelClients for this channel. Your dispatched action: (${t}) from the provider:\\n ({uuid: ${o}, name: ${s}}) will only be processed by the most recently-created client.`)}return n.pop()?.endpointId}static clientIdentityIncludesEndpointId(e){return void 0!==e.endpointId}static clientIsMultiRuntime(e){return void 0!==e.runtimeUuid}static async wireClose(e,t){await e.sendAction(\"destroy-channel\",{channelName:t})}}Qe.ChannelProvider=ut,it=new WeakMap,rt=new WeakMap,ot=new WeakMap,st=new WeakMap,at=new WeakMap,ut.removalMap=new WeakMap;var pt={};Object.defineProperty(pt,\"__esModule\",{value:!0}),pt.MessageReceiver=void 0;const wt=ue,yt=d;class ft extends yt.Base{constructor(e){super(e),this.onmessage=e=>\"process-channel-message\"===e.action&&(this.processChannelMessage(e),!0),this.endpointMap=new Map,this.latestEndpointIdByChannelId=new Map,e.registerMessageHandler(this.onmessage.bind(this))}async processChannelMessage(e){const{senderIdentity:t,providerIdentity:n,action:i,ackToSender:r,payload:o,intendedTargetIdentity:s}=e.payload,a=s.channelId??s.endpointId??this.latestEndpointIdByChannelId.get(n.channelId),c=this.endpointMap.get(a);if(!c)return r.payload.success=!1,r.payload.reason=`Client connection with identity uuid: ${this.wire.me.uuid} / name: ${this.wire.me.name} / endpointId: ${a} no longer connected.`,this.wire.sendRaw(r);try{const e=await c(i,o,t);return r.payload.payload=r.payload.payload||{},r.payload.payload.result=e,this.wire.sendRaw(r)}catch(e){return r.payload.success=!1,r.payload.reason=e.message,this.wire.sendRaw(r)}}addEndpoint(e,t,n){this.endpointMap.set(n,e),t!==n&&this.latestEndpointIdByChannelId.set(t,n)}removeEndpoint(e,t){this.endpointMap.delete(t),this.latestEndpointIdByChannelId.get(e)===t&&this.latestEndpointIdByChannelId.delete(e)}checkForPreviousClientConnection(e){const t=this.latestEndpointIdByChannelId.get(e);t&&(wt.ChannelClient.closeChannelByEndpointId(t),console.warn(\"You have created a second connection to an older provider. First connection has been removed from the clientMap\"),console.warn(\"If the provider calls publish(), you may receive multiple messages.\"))}}pt.MessageReceiver=ft;var gt={};Object.defineProperty(gt,\"__esModule\",{value:!0}),gt.ProtocolManager=void 0;gt.ProtocolManager=class{constructor(e){this.ProtocolsInPreferenceOrder=e,this.DefaultClientProtocols=[\"classic\"],this.DefaultProviderProtocols=[\"classic\"],this.getClientProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultClientProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(\", \")}.`);return t},this.getProviderProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultProviderProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(\", \")}.`);return t},this.getCompatibleProtocols=(e,t)=>t.supportedProtocols.filter((t=>e.some((e=>e.type===t.type&&t.version>=e.minimumVersion&&e.version>=(t.minimumVersion??0))))).slice(0,t.maxProtocols)}};var mt={};Object.defineProperty(mt,\"__esModule\",{value:!0});class vt{static combine(e,t){return new vt(e,t)}constructor(e,t){this.primary=e,this.secondary=t}onEndpointDisconnect(e,t){this.primary.onEndpointDisconnect(e,(()=>{this.secondary.isEndpointConnected(e)||t()})),this.secondary.onEndpointDisconnect(e,(()=>{this.primary.isEndpointConnected(e)||t()}))}isValidEndpointPayload(e){return this.primary.isValidEndpointPayload(e)||this.secondary.isValidEndpointPayload(e)}async closeEndpoint(e){await this.primary.closeEndpoint(e),await this.secondary.closeEndpoint(e)}isEndpointConnected(e){return this.primary.isEndpointConnected(e)||this.secondary.isEndpointConnected(e)}async addEndpoint(e,t){this.primary.isValidEndpointPayload(t)&&await this.primary.addEndpoint(e,t),this.secondary.isValidEndpointPayload(t)&&await this.secondary.addEndpoint(e,t)}receive(e){this.primary.receive(e),this.secondary.receive(e)}send(e,t,n){return this.primary.isEndpointConnected(e)?this.primary.send(e,t,n):this.secondary.send(e,t,n)}async close(){await Promise.all([this.primary.close(),this.secondary.close()])}}mt.default=vt;var Ct,bt,It=s&&s.__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},Et=s&&s.__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)},xt=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(xe,\"__esModule\",{value:!0}),xe.ConnectionManager=void 0;const At=Ae,Pt=d,Mt=Oe,_t=Fe,Ot=Je,St=Qe,Rt=pt,Ft=gt,jt=xt(mt);class kt extends Pt.Base{static getProtocolOptionsFromStrings(e){return e.map((e=>{switch(e){case\"rtc\":return _t.RTCInfo;case\"classic\":return Mt.ClassicInfo;default:return(0,At.exhaustiveCheck)(e,[\"rtc\",\"classic\"])}}))}constructor(e){super(e),Ct.set(this,void 0),bt.set(this,void 0),this.removeChannelFromProviderMap=e=>{this.providerMap.delete(e)},this.onmessage=e=>\"process-channel-connection\"===e.action&&(this.processChannelConnection(e),!0),this.providerMap=new Map,this.protocolManager=new Ft.ProtocolManager(\"node\"===this.wire.environment.type?[\"classic\"]:[\"rtc\",\"classic\"]),It(this,Ct,new Rt.MessageReceiver(e),\"f\"),It(this,bt,new Ot.RTCICEManager(e),\"f\"),e.registerMessageHandler(this.onmessage.bind(this))}createProvider(e,t){const n=Object.assign(this.wire.environment.getDefaultChannelOptions().create,e||{}),i=this.protocolManager.getProviderProtocols(n?.protocols),r=i.map((e=>{switch(e){case\"rtc\":return new _t.RTCStrategy;case\"classic\":return new Mt.ClassicStrategy(this.wire,Et(this,Ct,\"f\"),t.channelId,t);default:return(0,At.exhaustiveCheck)(e,[\"rtc\",\"classic\"])}}));let o;if(2===r.length){const[e,t]=r;o=jt.default.combine(e,t)}else{if(1!==r.length)throw new Error(\"failed to combine strategies\");[o]=r}const s=new St.ChannelProvider(t,(()=>St.ChannelProvider.wireClose(this.wire,t.channelName)),o),a=t.channelId;return this.providerMap.set(a,{provider:s,strategy:o,supportedProtocols:kt.getProtocolOptionsFromStrings(i)}),St.ChannelProvider.setProviderRemoval(s,this.removeChannelFromProviderMap.bind(this)),s}async createClientOffer(e){const t=this.protocolManager.getClientProtocols(e?.protocols);let n;return{offer:{supportedProtocols:await Promise.all(t.map((async e=>{switch(e){case\"rtc\":{const{rtcClient:e,channels:t,offer:i,rtcConnectionId:r,channelsOpened:o}=await Et(this,bt,\"f\").startClientOffer();return n={rtcClient:e,channels:t,channelsOpened:o},{type:\"rtc\",version:_t.RTCInfo.version,payload:{offer:i,rtcConnectionId:r}}}case\"classic\":return{type:\"classic\",version:Mt.ClassicInfo.version};default:return(0,At.exhaustiveCheck)(e,[\"rtc\",\"classic\"])}}))),maxProtocols:2},rtc:n}}async createClientStrategy(e,t){t.endpointId||(t.endpointId=this.wire.environment.getNextMessageId(),Et(this,Ct,\"f\").checkForPreviousClientConnection(t.channelId));const n=t.answer??{supportedProtocols:[{type:\"classic\",version:1}]},i=(await Promise.all(n.supportedProtocols.map((async n=>\"rtc\"===n.type&&e?(await Et(this,bt,\"f\").finishClientOffer(e.rtcClient,n.payload.answer,e.channelsOpened),new _t.RTCStrategy):\"classic\"===n.type?new Mt.ClassicStrategy(this.wire,Et(this,Ct,\"f\"),t.endpointId,t):null)))).filter((e=>null!==e));let r;if(e&&!i.some((e=>e instanceof _t.RTCStrategy))&&e&&e.rtcClient.close(),i.length>=2)r=jt.default.combine(i[0],i[1]);else{if(!i.length)throw new Error(\"No compatible protocols\");[r]=i}const o={endpointIdentity:t,rtc:e};return r.addEndpoint(t.channelId,o),r}async processChannelConnection(e){const{clientIdentity:t,providerIdentity:n,ackToSender:i,payload:r,offer:o}=e.payload;t.endpointId?t.isLocalEndpointId=!1:(t.endpointId=this.wire.environment.getNextMessageId(),t.isLocalEndpointId=!0);const s=n.channelId,a=this.providerMap.get(s);if(!a)return i.payload.success=!1,i.payload.reason=`Channel \"${n.channelName}\" has been destroyed.`,this.wire.sendRaw(i);const{provider:c,strategy:d,supportedProtocols:h}=a;try{if(!(c instanceof St.ChannelProvider))throw Error(\"Cannot connect to a channel client\");const e=o??{supportedProtocols:[{type:\"classic\",version:1}],maxProtocols:1},n=this.protocolManager.getCompatibleProtocols(h,e);if(!n.length)throw new Error(\"This provider does not support any of the offered protocols.\");const s=await c.processConnection(t,r);i.payload.payload=i.payload.payload||{};let a={supportedProtocols:[],endpointPayloadPromise:Promise.resolve({endpointIdentity:t})};return a=await n.reduce((async(e,t)=>{const n=await e;if(\"rtc\"===t.type){const{answer:e,rtcClient:i,channels:r}=await Et(this,bt,\"f\").createProviderAnswer(t.payload.rtcConnectionId,t.payload.offer);n.supportedProtocols.push({type:\"rtc\",version:_t.RTCInfo.version,payload:{answer:e}}),n.endpointPayloadPromise=n.endpointPayloadPromise.then((e=>r.then((t=>({...e,rtc:{rtcClient:i,channels:t}})))))}else n.supportedProtocols.push({type:\"classic\",version:Mt.ClassicInfo.version});return n}),Promise.resolve(a)),a.endpointPayloadPromise.then((e=>d.addEndpoint(t.endpointId,e))),i.payload.payload.result=s,i.payload.payload.answer=a,this.wire.sendRaw(i)}catch(e){return i.payload.success=!1,i.payload.reason=e.message,this.wire.sendRaw(i)}}}xe.ConnectionManager=kt,Ct=new WeakMap,bt=new WeakMap;var Lt,Tt,$t,Bt=s&&s.__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},Gt=s&&s.__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)};Object.defineProperty(le,\"__esModule\",{value:!0}),le.Channel=void 0;const Wt=t,Ht=G,Nt=d,Dt=ue,Ut=xe,Vt=Qe;function zt(e){const t=Math.floor(e/10),n=Math.min(3e4,500*2**t);return new Promise((e=>{setTimeout((()=>{e(!1)}),n)}))}class Kt extends Nt.EmitterBase{constructor(e){super(e,\"channel\"),Lt.set(this,void 0),Tt.set(this,new Wt.EventEmitter),$t.set(this,new Ht.AsyncRetryableLazy((async()=>{await Promise.all([this.on(\"disconnected\",(e=>{Dt.ChannelClient.handleProviderDisconnect(e)})),this.on(\"connected\",((...e)=>{Gt(this,Tt,\"f\").emit(\"connected\",...e)}))]).catch((()=>new Error(\"error setting up channel connection listeners\")))}))),Bt(this,Lt,new Ut.ConnectionManager(e),\"f\")}async getAllChannels(){return this.wire.sendAction(\"get-all-channels\").then((({payload:e})=>e.data))}async onChannelConnect(e){await this.on(\"connected\",e)}async onChannelDisconnect(e){await this.on(\"disconnected\",e)}async safeConnect(e,t,n){const i={count:0};do{let r=()=>{};const o=new Promise((t=>{r=n=>{e===n.channelName&&t(!0)},Gt(this,Tt,\"f\").on(\"connected\",r)}));try{if(i.count>0){i.gotConnectedEvent=await Promise.race([zt(i.count),o]);const t=await this.wire.sendAction(\"connect-to-channel\",{...n,retryInfo:i});return console.log(`Successfully connected to channelName: ${e}`),t.payload.data}const t=this.wire.sendAction(\"connect-to-channel\",n);i.originalMessageId=t.messageId;return(await t).payload.data}catch(n){if(!n.message.includes(\"internal-nack\"))throw n;t&&0===i.count&&console.warn(`No channel found for channelName: ${e}. Waiting for connection...`)}finally{i.count+=1,Gt(this,Tt,\"f\").removeListener(\"connected\",r)}}while(t);throw new Error(`No channel found for channelName: ${e}.`)}async connect(e,t={}){if(await Gt(this,$t,\"f\").getValue(),!e||\"string\"!=typeof e)throw new Error(\"Please provide a channelName string to connect to a channel.\");const n={wait:!0,...this.wire.environment.getDefaultChannelOptions().connect,...t},{offer:i,rtc:r}=await Gt(this,Lt,\"f\").createClientOffer(n);let o;(this.fin.me.isFrame||this.fin.me.isView||this.fin.me.isWindow)&&(o=(await this.fin.me.getInfo()).url);const s={channelName:e,...n,offer:i,connectionUrl:o},a=await this.safeConnect(e,n.wait,s),c=await Gt(this,Lt,\"f\").createClientStrategy(r,a),d=new Dt.ChannelClient(a,(()=>Dt.ChannelClient.wireClose(this.wire,a,a.endpointId)),c);return c.onEndpointDisconnect(a.channelId,(async()=>{try{await d.sendDisconnectAction()}catch(e){console.warn(`Something went wrong during disconnect for client with uuid: ${a.uuid} / name: ${a.name} / endpointId: ${a.endpointId}.`)}finally{Dt.ChannelClient.handleProviderDisconnect(a)}})),d}async create(e,t){if(!e)throw new Error(\"Please provide a channelName to create a channel\");const{payload:{data:n}}=await this.wire.sendAction(\"create-channel\",{channelName:e}),i=Gt(this,Lt,\"f\").createProvider(t,n);return this.on(\"client-disconnected\",(t=>{t.channelName===e&&Vt.ChannelProvider.handleClientDisconnection(i,t)})),i}}le.Channel=Kt,Lt=new WeakMap,Tt=new WeakMap,$t=new WeakMap,Object.defineProperty(de,\"__esModule\",{value:!0}),de.InterAppPayload=de.InterApplicationBus=void 0;const qt=t,Jt=d,Yt=he,Zt=le,Qt=O;class Xt extends Jt.Base{constructor(e){super(e),this.events={subscriberAdded:\"subscriber-added\",subscriberRemoved:\"subscriber-removed\"},this.refCounter=new Yt.RefCounter,this.Channel=new Zt.Channel(e),this.emitter=new qt.EventEmitter,e.registerMessageHandler(this.onmessage.bind(this)),this.on=this.emitter.on.bind(this.emitter),this.removeAllListeners=this.emitter.removeAllListeners.bind(this.emitter)}async publish(e,t){await this.wire.sendAction(\"publish-message\",{topic:e,message:t,sourceWindowName:this.me.name})}async send(e,t,n){const i=(0,Qt.validateIdentity)(e);if(i)throw new Error(i);await this.wire.sendAction(\"send-message\",{destinationUuid:e.uuid,destinationWindowName:e.name,topic:t,message:n,sourceWindowName:this.me.name})}subscribe(e,t,n){const i=this.createSubscriptionKey(e.uuid,e.name||\"*\",t);return this.emitter.on(i,n),this.refCounter.actOnFirst(i,(async()=>{await this.wire.sendAction(\"subscribe\",{sourceUuid:e.uuid,sourceWindowName:e.name||\"*\",topic:t,destinationWindowName:this.me.name})}),(()=>Promise.resolve()))}unsubscribe(e,t,n){const i=e.name||\"*\",r=this.createSubscriptionKey(e.uuid,i,t);return this.emitter.removeListener(r,n),this.refCounter.actOnLast(r,(async()=>{await this.wire.sendAction(\"unsubscribe\",{sourceUuid:e.uuid,sourceWindowName:i,topic:t,destinationWindowName:this.me.name})}),(()=>new Promise((e=>e)).then((()=>{}))))}processMessage(e){const{payload:{message:t,sourceWindowName:n,sourceUuid:i,topic:r}}=e,o=[this.createSubscriptionKey(i,n,r),this.createSubscriptionKey(i,\"*\",r),this.createSubscriptionKey(\"*\",\"*\",r)],s={uuid:i,name:n};o.forEach((e=>{this.emitter.emit(e,t,s)}))}emitSubscriverEvent(e,t){const{payload:{targetName:n,uuid:i,topic:r}}=t,o={name:n,uuid:i,topic:r};this.emitter.emit(e,o)}createSubscriptionKey(e,t,n){const i=t||\"*\";if(!(e&&i&&n))throw new Error(\"Missing uuid, name, or topic string\");return function(...e){return e.map((e=>Buffer.from(`${e}`).toString(\"base64\"))).join(\"/\")}(e,i,n)}onmessage(e){const{action:t}=e;switch(t){case\"process-message\":this.processMessage(e);break;case this.events.subscriberAdded:this.emitSubscriverEvent(this.events.subscriberAdded,e);break;case this.events.subscriberRemoved:this.emitSubscriverEvent(this.events.subscriberRemoved,e)}return!0}}de.InterApplicationBus=Xt;de.InterAppPayload=class{};var en={};Object.defineProperty(en,\"__esModule\",{value:!0}),en.Clipboard=void 0;const tn=d;class nn extends tn.Base{async writeText(e){await this.wire.sendAction(\"clipboard-write-text\",e)}async readText(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-text\",{type:e});return t.data}async writeImage(e){await this.wire.sendAction(\"clipboard-write-image\",e)}async readImage(e={format:\"dataURL\"}){const{payload:t}=await this.wire.sendAction(\"clipboard-read-image\",e);return t.data}async writeHtml(e){await this.wire.sendAction(\"clipboard-write-html\",e)}async readHtml(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-html\",{type:e});return t.data}async writeRtf(e){await this.wire.sendAction(\"clipboard-write-rtf\",e)}async readRtf(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-rtf\",{type:e});return t.data}async write(e){await this.wire.sendAction(\"clipboard-write\",e)}async getAvailableFormats(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-formats\",{type:e});return t.data}}en.Clipboard=nn;var rn={},on={},sn={};Object.defineProperty(sn,\"__esModule\",{value:!0}),sn.ExternalApplication=void 0;const an=d;class cn extends an.EmitterBase{constructor(e,t){super(e,\"external-application\",t.uuid),this.identity=t}getInfo(){return this.wire.sendAction(\"get-external-application-info\",this.identity).then((({payload:e})=>e.data))}}sn.ExternalApplication=cn,Object.defineProperty(on,\"__esModule\",{value:!0}),on.ExternalApplicationModule=void 0;const dn=d,hn=sn;class ln extends dn.Base{wrap(e){return this.wire.sendAction(\"external-application-wrap\").catch((e=>{})),Promise.resolve(new hn.ExternalApplication(this.wire,{uuid:e}))}wrapSync(e){return this.wire.sendAction(\"external-application-wrap-sync\").catch((e=>{})),new hn.ExternalApplication(this.wire,{uuid:e})}}on.ExternalApplicationModule=ln,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(on,e),n(sn,e)}(rn);var un={},pn={},wn={};Object.defineProperty(wn,\"__esModule\",{value:!0}),wn._Frame=void 0;const yn=d;class fn extends yn.EmitterBase{constructor(e,t){super(e,\"frame\",t.uuid,t.name),this.identity=t}getInfo(){return this.wire.sendAction(\"get-frame-info\",this.identity).then((({payload:e})=>e.data))}getParentWindow(){return this.wire.sendAction(\"get-parent-window\",this.identity).then((({payload:e})=>e.data))}}wn._Frame=fn,Object.defineProperty(pn,\"__esModule\",{value:!0}),pn._FrameModule=void 0;const gn=d,mn=O,vn=wn;class Cn extends gn.Base{async wrap(e){this.wire.sendAction(\"frame-wrap\").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}wrapSync(e){this.wire.sendAction(\"frame-wrap-sync\").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}getCurrent(){return this.wire.sendAction(\"frame-get-current\").catch((e=>{})),Promise.resolve(new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity()))}getCurrentSync(){return this.wire.sendAction(\"frame-get-current-sync\").catch((e=>{})),new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity())}}pn._FrameModule=Cn,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(pn,e),n(wn,e)}(un);var bn={};Object.defineProperty(bn,\"__esModule\",{value:!0}),bn.GlobalHotkey=void 0;const In=d;class En extends In.EmitterBase{constructor(e){super(e,\"global-hotkey\")}async register(e,t){await this.on(e,t),await this.wire.sendAction(\"global-hotkey-register\",{hotkey:e})}async unregister(e){await this.removeAllListeners(e),await this.wire.sendAction(\"global-hotkey-unregister\",{hotkey:e})}async unregisterAll(){await Promise.all(this.eventNames().filter((e=>!(\"registered\"===e||\"unregistered\"===e))).map((e=>this.removeAllListeners(e)))),await this.wire.sendAction(\"global-hotkey-unregister-all\",{})}async isRegistered(e){const{payload:{data:t}}=await this.wire.sendAction(\"global-hotkey-is-registered\",{hotkey:e});return t}}bn.GlobalHotkey=En;var xn,An={},Pn={},Mn={},_n=s&&s.__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)};Object.defineProperty(Mn,\"__esModule\",{value:!0}),Mn.Platform=void 0;const On=d,Sn=O,Rn=new Map;class Fn extends On.EmitterBase{constructor(e,t){super(t.wire,\"application\",e.uuid),this.getClient=e=>{this.wire.sendAction(\"platform-get-client\",this.identity).catch((e=>{}));const t=e||this.identity,{uuid:n}=t;if(!Rn.has(n)){const e=_n(this,xn,\"f\").call(this,n);Rn.set(n,e)}return Rn.get(n)},xn.set(this,(async e=>{try{const t=`custom-frame-${e}`,n=await this._channel.connect(t,{wait:!1});return n.onDisconnection((()=>{Rn.delete(e)})),n}catch(t){throw Rn.delete(e),new Error(\"The targeted Platform is not currently running. Listen for application-started event for the given Uuid.\")}})),this.launchLegacyManifest=this.launchContentManifest;const n=(0,Sn.validateIdentity)(e);if(n)throw new Error(n);this._channel=t,this.identity={uuid:e.uuid},this.Layout=this.fin.Platform.Layout,this.Application=this.fin.Application.wrapSync(this.identity)}async createView(e,t,n){this.wire.sendAction(\"platform-create-view\",this.identity).catch((e=>{}));const i=await this.getClient(),r=await i.dispatch(\"create-view\",{target:t,opts:e,targetView:n});if(!r||(0,Sn.validateIdentity)(r.identity))throw new Error(`When overwriting the createView call, please return an object that has a valid 'identity' property: ${JSON.stringify(r)}`);return this.fin.View.wrapSync(r.identity)}async createWindow(e){this.wire.sendAction(\"platform-create-window\",this.identity).catch((e=>{}));const t=await this.getClient();e.reason||(e.reason=\"api-call\");const n=await t.dispatch(\"create-view-container\",e);if(!n||(0,Sn.validateIdentity)(n.identity))throw new Error(`When overwriting the createWindow call, please return an object that has a valid 'identity' property: ${JSON.stringify(n)}`);const{identity:i}=n,r=this.fin.Window.wrapSync(i);return r.name=i.name,r.uuid=i.uuid,r}async quit(){this.wire.sendAction(\"platform-quit\",this.identity).catch((e=>{}));return(await this.getClient()).dispatch(\"quit\")}async closeView(e){this.wire.sendAction(\"platform-close-view\",this.identity).catch((e=>{}));const t=await this.getClient();await t.dispatch(\"close-view\",{view:e})}async reparentView(e,t){console.warn(\"Platform.reparentView has been deprecated, please use Platform.createView\"),this.wire.sendAction(\"platform-reparent-view\",this.identity).catch((e=>{}));const n={...e,uuid:e.uuid??this.identity.uuid},i=await this.fin.View.wrap(n),r=await i.getOptions();return this.createView(r,t)}async getSnapshot(){this.wire.sendAction(\"platform-get-snapshot\",this.identity).catch((e=>{}));return(await this.getClient()).dispatch(\"get-snapshot\")}async getViewSnapshot(e){return(await this.getClient()).dispatch(\"get-view-snapshot\",{viewIdentity:e})}async applySnapshot(e,t){this.wire.sendAction(\"platform-apply-snapshot\",this.identity).catch((e=>{}));const n=\"Requested snapshot must be a valid Snapshot object, or a url or filepath to such an object.\";let i;if(\"string\"==typeof e)try{i=(await this._channel.wire.sendAction(\"get-application-manifest\",{manifestUrl:e})).payload.data}catch(e){throw new Error(`${n}: ${e}`)}else i=e;if(!i.windows)throw new Error(n);const r=await this.getClient();return await r.dispatch(\"apply-snapshot\",{snapshot:i,options:t}),this}async fetchManifest(e){return(await this.getClient()).dispatch(\"platform-fetch-manifest\",{manifestUrl:e})}async launchContentManifest(e){this.wire.sendAction(\"platform-launch-content-manifest\",this.identity).catch((()=>{}));const t=await this.getClient(),n=await this.fetchManifest(e);return t.dispatch(\"launch-into-platform\",{manifest:n,manifestUrl:e}),this}async setWindowContext(e={},t){if(this.wire.sendAction(\"platform-set-window-context\",this.identity).catch((e=>{})),!e)throw new Error(\"Please provide a serializable object or string to set the context.\");const n=await this.getClient(),{entityType:i}=t?await this.fin.System.getEntityInfo(t.uuid,t.name):this.fin.me;await n.dispatch(\"set-window-context\",{context:e,entityType:i,target:t||{uuid:this.fin.me.uuid,name:this.fin.me.name}})}async getWindowContext(e){this.wire.sendAction(\"platform-get-window-context\",this.identity).catch((e=>{}));const t=await this.getClient(),{entityType:n}=e?await this.fin.System.getEntityInfo(e.uuid,e.name):this.fin.me;return t.dispatch(\"get-window-context\",{target:e||{uuid:this.fin.me.uuid,name:this.fin.me.name},entityType:n})}async closeWindow(e,t={skipBeforeUnload:!1}){this.wire.sendAction(\"platform-close-window\",this.identity).catch((e=>{}));return(await this.getClient()).dispatch(\"close-window\",{windowId:e,options:t})}}Mn.Platform=Fn,xn=new WeakMap;var jn={},kn={},Ln={},Tn={};function $n(e){switch(e){case\"columns\":case\"grid\":case\"rows\":case\"tabs\":return!0;default:return!1}}Object.defineProperty(Tn,\"__esModule\",{value:!0}),Tn.overrideFromComposables=Tn.isValidPresetType=void 0,Tn.isValidPresetType=$n,Tn.overrideFromComposables=function(...e){return t=>e.reduceRight(((e,t)=>n=>t(e(n))),(e=>e))(t)},Tn.default={isValidPresetType:$n};var Bn={},Gn={},Wn={};Object.defineProperty(Wn,\"__esModule\",{value:!0}),Wn.ApiConsumer=void 0;Wn.ApiConsumer=class{constructor(e){this.strategy=e,this.consume=async e=>(await this.strategy.getExposedFunctions(e)).reduce(((t,n)=>({...t,[n.key]:this.strategy.createFunction(n,e)})),{})}};var Hn={},Nn={};Object.defineProperty(Nn,\"__esModule\",{value:!0}),Nn.expose=Nn.getExposedProperties=void 0;const Dn=Symbol(\"exposedProperties\");Nn.getExposedProperties=e=>e[Dn]||e.prototype[Dn]||[];Nn.expose=e=>(t,n,i)=>{t[Dn]=t[Dn]||[],t[Dn].push({key:n,descriptor:i,options:e})},Object.defineProperty(Hn,\"__esModule\",{value:!0}),Hn.ApiExposer=void 0;const Un=Nn;Hn.ApiExposer=class{constructor(e){this.strategy=e,this.exposeInstance=async(e,t)=>{const n=(0,Un.getExposedProperties)(e),i=await Promise.all(n.map((async({key:n,options:i})=>({key:n,options:await this.strategy.exposeFunction(e[n].bind(e),{key:n,options:i,meta:t})}))));await this.strategy.exposeMeta(t,i)}}};var Vn={},zn={},Kn={};Object.defineProperty(Kn,\"__esModule\",{value:!0}),Kn.ChannelsConsumer=void 0;Kn.ChannelsConsumer=class{constructor(e){this.channel=e,this.getExposedFunctions=async e=>{const{id:t}=e,{props:n}=await this.channel.dispatch(`api-meta:${t}`);return n},this.createFunction=e=>(...t)=>{const{action:n}=e.options;return this.channel.dispatch(n,{args:t})}}};var qn={};Object.defineProperty(qn,\"__esModule\",{value:!0}),qn.ChannelsExposer=void 0;qn.ChannelsExposer=class{constructor(e){this.channelProviderOrClient=e,this.exposeFunction=async(e,t)=>{const{key:n,options:i,meta:r}=t,{id:o}=r,s=`${o}.${i?.action||n}`;return await this.channelProviderOrClient.register(s,(async({args:t})=>e(...t))),{action:s}},this.exposeMeta=async({id:e},t)=>{const n=`api-meta:${e}`;await this.channelProviderOrClient.register(n,(()=>({props:t})))}}},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Kn,e),n(qn,e)}(zn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(zn,e)}(Vn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Wn,e),n(Hn,e),n(Vn,e),n(Nn,e)}(Gn);var Jn={};Object.defineProperty(Jn,\"__esModule\",{value:!0}),Jn.createRelayedDispatch=exports.relayChannelClientApi_1=Jn.relayChannelClientApi=void 0;const Yn=[\"no longer connected\",\"RTCDataChannel closed unexpectedly\",\"The client you are trying to dispatch from is disconnected from the target provider\"];exports.relayChannelClientApi_1=Jn.relayChannelClientApi=async(e,t)=>{e.register(`relay:${t}`,(({action:t,target:n,payload:i})=>e.dispatch(n,t,i))),await Promise.resolve()};Jn.createRelayedDispatch=(e,t,n,i)=>async(r,o)=>{try{return await e.dispatch(`relay:${n}`,{action:r,payload:o,target:t})}catch(e){if(s=e.message,Yn.some((e=>s.includes(e)))&&i)throw new Error(i);throw e}var s};var Zn,Qn,Xn,ei=s&&s.__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},ti=s&&s.__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)};Object.defineProperty(Bn,\"__esModule\",{value:!0}),Bn.ColumnOrRow=Bn.TabStack=Bn.LayoutNode=void 0;const ni=Gn,ii=Jn;class ri{constructor(e,t){Zn.set(this,void 0),this.isRoot=()=>ti(this,Zn,\"f\").isRoot(this.entityId),this.exists=()=>ti(this,Zn,\"f\").exists(this.entityId),this.getParent=async()=>{const e=await ti(this,Zn,\"f\").getParent(this.entityId);if(e)return ri.getEntity(e,ti(this,Zn,\"f\"))},this.createAdjacentStack=async(e,t)=>{const n=await ti(this,Zn,\"f\").createAdjacentStack(this.entityId,e,t);return ri.getEntity({entityId:n,type:\"stack\"},ti(this,Zn,\"f\"))},this.getAdjacentStacks=async e=>(await ti(this,Zn,\"f\").getAdjacentStacks({targetId:this.entityId,edge:e})).map((e=>ri.getEntity({type:\"stack\",entityId:e.entityId},ti(this,Zn,\"f\")))),ei(this,Zn,e,\"f\"),this.entityId=t}}Bn.LayoutNode=ri,Zn=new WeakMap,ri.newLayoutEntitiesClient=async(e,t,n)=>{const i=(0,ii.createRelayedDispatch)(e,n,\"layout-relay\",\"You are trying to interact with a layout component on a window that does not exist or has been destroyed.\");return new ni.ApiConsumer(new ni.ChannelsConsumer({dispatch:i})).consume({id:t})},ri.getEntity=(e,t)=>{const{entityId:n,type:i}=e;switch(i){case\"column\":case\"row\":return new si(t,n,i);case\"stack\":return new oi(t,n);default:throw new Error(`Unrecognised Layout Entity encountered ('${JSON.stringify(e)})`)}};class oi extends ri{constructor(e,t){super(e,t),Qn.set(this,void 0),this.type=\"stack\",this.getViews=()=>ti(this,Qn,\"f\").getStackViews(this.entityId),this.addView=async(e,t={index:0})=>ti(this,Qn,\"f\").addViewToStack(this.entityId,e,t),this.removeView=async e=>{await ti(this,Qn,\"f\").removeViewFromStack(this.entityId,e)},this.setActiveView=async e=>{await ti(this,Qn,\"f\").setStackActiveView(this.entityId,e)},ei(this,Qn,e,\"f\")}}Bn.TabStack=oi,Qn=new WeakMap;class si extends ri{constructor(e,t,n){super(e,t),Xn.set(this,void 0),this.getContent=async()=>(await ti(this,Xn,\"f\").getContent(this.entityId)).map((e=>ri.getEntity(e,ti(this,Xn,\"f\")))),ei(this,Xn,e,\"f\"),this.type=n}}Bn.ColumnOrRow=si,Xn=new WeakMap;var ai={};Object.defineProperty(ai,\"__esModule\",{value:!0}),ai.DEFAULT_LAYOUT_KEY=ai.LAYOUT_CONTROLLER_ID=void 0,ai.LAYOUT_CONTROLLER_ID=\"layout-entities\",ai.DEFAULT_LAYOUT_KEY=\"__default__\";var ci,di,hi,li=s&&s.__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)};Object.defineProperty(Ln,\"__esModule\",{value:!0}),Ln.Layout=void 0;const ui=G,pi=O,wi=d,yi=Tn,fi=Bn,gi=ai;class mi extends wi.Base{static getClient(e){return li(e,di,\"f\").getValue()}constructor(e,t){super(t),ci.add(this),di.set(this,new ui.Lazy((async()=>fi.LayoutNode.newLayoutEntitiesClient(await this.platform.getClient(),gi.LAYOUT_CONTROLLER_ID,this.identity)))),this.replace=async e=>{this.wire.sendAction(\"layout-replace\").catch((e=>{}));const t=await this.platform.getClient();await t.dispatch(\"replace-layout\",{target:this.identity,opts:{layout:e}})},this.replaceView=async(e,t)=>{this.wire.sendAction(\"layout-replace-view\").catch((e=>{}));const n=await this.platform.getClient();await n.dispatch(\"replace-view\",{target:this.identity,opts:{viewToReplace:e,newView:t}})},this.applyPreset=async e=>{this.wire.sendAction(\"layout-apply-preset\").catch((e=>{}));const t=await this.platform.getClient(),{presetType:n}=e;if(!n||!(0,yi.isValidPresetType)(n))throw new Error(\"Cannot apply preset layout, please include an applicable presetType property in the PresetLayoutOptions.\");await t.dispatch(\"apply-preset-layout\",{target:this.identity,opts:{presetType:n}})};const n=(0,pi.validateIdentity)(e);if(n)throw new Error(n);this.identity=e,this.platform=this.fin.Platform.wrapSync({uuid:e.uuid}),e.uuid===this.fin.me.uuid&&e.name===this.fin.me.name&&(this.init=this.fin.Platform.Layout.init)}async getConfig(){this.wire.sendAction(\"layout-get-config\").catch((e=>{}));return(await this.platform.getClient()).dispatch(\"get-frame-snapshot\",{target:this.identity})}async getCurrentViews(){this.wire.sendAction(\"layout-get-views\").catch((e=>{}));const e=await this.platform.getClient();return(await e.dispatch(\"get-layout-views\",{target:this.identity})).map((e=>this.fin.View.wrapSync(e)))}async getRootItem(){this.wire.sendAction(\"layout-get-root-item\").catch((()=>{}));const e=await li(this,di,\"f\").getValue(),t=await e.getRoot(\"layoutName\"in this.identity?this.identity:void 0);return fi.LayoutNode.getEntity(t,e)}async getStackByViewIdentity(e){this.wire.sendAction(\"layout-get-stack-by-view\").catch((()=>{}));const t=await li(this,di,\"f\").getValue(),n=await t.getStackByView(e);if(!n)throw new Error(`No stack found for view: ${e.uuid}/${e.name}`);return fi.LayoutNode.getEntity(n,t)}async addView(e,{location:t,targetView:n}={}){this.wire.sendAction(\"layout-add-view\").catch((e=>{}));const{identity:i}=await li(this,ci,\"m\",hi).call(this,\"layout-add-view\",{viewOptions:e,location:t,targetView:n});return{identity:i}}async closeView(e){this.wire.sendAction(\"layout-close-view\").catch((e=>{})),await li(this,ci,\"m\",hi).call(this,\"layout-close-view\",{viewIdentity:e})}}Ln.Layout=mi,di=new WeakMap,ci=new WeakSet,hi=async function(e,t){return(await this.platform.getClient()).dispatch(e,{target:this.identity,opts:t})};var vi,Ci,bi,Ii,Ei,xi=s&&s.__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)},Ai=s&&s.__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};Object.defineProperty(kn,\"__esModule\",{value:!0}),kn.LayoutModule=void 0;const Pi=d,Mi=Ln,_i=ai;class Oi extends Pi.Base{constructor(){super(...arguments),vi.add(this),Ci.set(this,!1),bi.set(this,null),this.init=async(e={})=>{if(this.wire.sendAction(\"layout-init\").catch((e=>{})),!this.wire.environment.layoutAllowedInContext(this.fin))throw new Error(\"Layout.init can only be called from a Window context.\");if(xi(this,Ci,\"f\"))throw new Error(\"Layout.init was already called, please use Layout.create to add additional layouts.\");\"openfin\"===this.wire.environment.type&&await this.fin.Platform.getCurrentSync().getClient(),Ai(this,Ci,!0,\"f\"),Ai(this,bi,await this.wire.environment.initLayoutManager(this.fin,this.wire,e),\"f\"),await this.wire.environment.applyLayoutSnapshot(this.fin,xi(this,bi,\"f\"),e);const t={name:this.fin.me.name,uuid:this.fin.me.uuid};if(!e.layoutManagerOverride){const e={layoutName:_i.DEFAULT_LAYOUT_KEY,...t};return xi(this,Ii,\"f\").call(this,e)}return this.wrapSync(t)},Ii.set(this,(e=>{const t=\"[Layout] You are using a deprecated property `layoutManager` - it will throw if you access it starting in v37.\",n=new Proxy({},{get(e,n){throw console.warn(`[Layout-mgr-proxy] accessing ${n.toString()}`),new Error(t)}}),i=Object.assign(this.wrapSync(e),{layoutManager:n});return new Proxy(i,{get(e,n){if(\"layoutManager\"===n)throw console.warn(`[Layout-proxy] accessing ${n.toString()}`),new Error(t);return e[n]}})})),this.getCurrentLayoutManagerSync=()=>xi(this,vi,\"m\",Ei).call(this,\"fin.Platform.Layout.getCurrentLayoutManagerSync()\"),this.create=async e=>this.wire.environment.createLayout(xi(this,vi,\"m\",Ei).call(this,\"fin.Platform.Layout.create()\"),e),this.destroy=async e=>this.wire.environment.destroyLayout(xi(this,vi,\"m\",Ei).call(this,\"fin.Platform.Layout.destroy()\"),e)}async wrap(e){return this.wire.sendAction(\"layout-wrap\").catch((e=>{})),new Mi.Layout(e,this.wire)}wrapSync(e){return this.wire.sendAction(\"layout-wrap-sync\").catch((e=>{})),new Mi.Layout(e,this.wire)}async getCurrent(){if(this.wire.sendAction(\"layout-get-current\").catch((e=>{})),\"openfin\"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error(\"You are not in a Window context. Only Windows can have a Layout.\");const{uuid:e,name:t}=this.fin.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction(\"layout-get-current-sync\").catch((e=>{})),\"openfin\"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error(\"You are not in a Window context. Only Windows can have a Layout.\");const{uuid:e,name:t}=this.fin.me;return this.wrapSync({uuid:e,name:t})}async getLayoutByViewIdentity(e){this.wire.sendAction(\"layout-get-by-view-identity\").catch((()=>{}));let t=await this.wire.environment.getViewWindowIdentity(this.fin,e);t.identity&&(t=t.identity);try{const n=this.wrapSync(t),i=await Mi.Layout.getClient(n),r=await i.getLayoutIdentityForViewOrThrow(e);return this.wrapSync(r)}catch(n){if(![\"No action registered at target for\",\"getLayoutIdentityForViewOrThrow is not a function\"].some((e=>n.message.includes(e))))throw n;if(t.uuid===t.name)throw new Error(`View identity ${JSON.stringify(e)} is not attached to any layout in provider window ${JSON.stringify(t)}.`);return this.wrapSync(t)}}}kn.LayoutModule=Oi,Ci=new WeakMap,bi=new WeakMap,Ii=new WeakMap,vi=new WeakSet,Ei=function(e){if(!xi(this,bi,\"f\"))throw new Error(`You must call init before using the API ${e}`);return xi(this,bi,\"f\")},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(kn,e),n(Ln,e)}(jn),Object.defineProperty(Pn,\"__esModule\",{value:!0}),Pn.PlatformModule=void 0;const Si=d,Ri=Mn,Fi=jn;class ji extends Si.Base{constructor(e,t){super(e),this._channel=t,this.Layout=new Fi.LayoutModule(this.wire)}async init(e){if(!fin.__internal_.isPlatform||fin.me.name!==fin.me.uuid)throw new Error(\"fin.Platform.init should only be called from a custom platform provider running in the main window of the application.\");return this.wire.environment.initPlatform(this.fin,e)}async wrap(e){return this.wire.sendAction(\"platform-wrap\").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}wrapSync(e){return this.wire.sendAction(\"platform-wrap-sync\").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}async getCurrent(){return this.wire.sendAction(\"platform-get-current\").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction(\"platform-get-current-sync\").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}start(e){return this.wire.sendAction(\"platform-start\").catch((e=>{})),new Promise((async(t,n)=>{try{const{uuid:n}=e,i=await this.fin.Application._create({...e,isPlatformController:!0});i.once(\"platform-api-ready\",(()=>t(this.wrapSync({uuid:n})))),i._run({uuid:n})}catch(e){n(e)}}))}startFromManifest(e,t){return this.wire.sendAction(\"platform-start-from-manifest\").catch((e=>{})),new Promise((async(n,i)=>{try{const i=await this.fin.Application._createFromManifest(e);i.once(\"platform-api-ready\",(()=>n(this.wrapSync({uuid:i.identity.uuid})))),i._run(t)}catch(e){i(e)}}))}}Pn.PlatformModule=ji,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Pn,e),n(Mn,e)}(An);var ki={};!function(e){Object.defineProperty(e,\"__esModule\",{value:!0}),e.getMe=e.getBaseMe=e.environmentUnsupportedMessage=void 0;const t=J(),n=un,i=ie(),r=rn;function o(e,t,n){return{...{isView:\"view\"===e,isWindow:\"window\"===e,isFrame:\"iframe\"===e,isExternal:\"external connection\"===e},uuid:t,name:n,entityType:e}}e.environmentUnsupportedMessage=\"You are not running in OpenFin.\",e.getBaseMe=o,e.getMe=function(s){const{uuid:a,name:c,entityType:d}=s.me,h={setContext(){throw new Error(e.environmentUnsupportedMessage)},addContextHandler(){throw new Error(e.environmentUnsupportedMessage)},getContextGroups(){throw new Error(e.environmentUnsupportedMessage)},joinContextGroup(){throw new Error(e.environmentUnsupportedMessage)},removeFromContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getAllClientsInContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getInfoForContextGroup(){throw new Error(e.environmentUnsupportedMessage)}},l=\"Interop API has not been instantiated. Either connection has failed or you have not declared interop in your config.\",u={setContext(){throw new Error(l)},addContextHandler(){throw new Error(l)},getContextGroups(){throw new Error(l)},joinContextGroup(){throw new Error(l)},removeFromContextGroup(){throw new Error(l)},getAllClientsInContextGroup(){throw new Error(l)},getInfoForContextGroup(){throw new Error(l)}},p={eventNames:()=>{throw new Error(e.environmentUnsupportedMessage)},emit:()=>{throw new Error(e.environmentUnsupportedMessage)},listeners:()=>{throw new Error(e.environmentUnsupportedMessage)},listenerCount:()=>{throw new Error(e.environmentUnsupportedMessage)},on:()=>{throw new Error(e.environmentUnsupportedMessage)},addListener:()=>{throw new Error(e.environmentUnsupportedMessage)},once:()=>{throw new Error(e.environmentUnsupportedMessage)},prependListener:()=>{throw new Error(e.environmentUnsupportedMessage)},prependOnceListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeAllListeners:()=>{throw new Error(e.environmentUnsupportedMessage)}};switch(d){case\"view\":return Object.assign(new t.View(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case\"window\":return Object.assign(new i._Window(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case\"iframe\":return Object.assign(new n._Frame(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case\"external connection\":return Object.assign(new r.ExternalApplication(s,{uuid:a}),o(d,a,c),{interop:u,isOpenFin:!1});default:return{...o(d,a,c),...p,interop:h,isOpenFin:!1}}}}(ki);var Li={},Ti={},$i={};Object.defineProperty($i,\"__esModule\",{value:!0}),$i.createWarningObject=$i.createUnusableObject=void 0,$i.createUnusableObject=function(e){const t=()=>{throw new Error(e)};return new Proxy({},{apply:t,construct:t,defineProperty:t,deleteProperty:t,get:t,getOwnPropertyDescriptor:t,getPrototypeOf:t,has:t,isExtensible:t,ownKeys:t,preventExtensions:t,set:t,setPrototypeOf:t})},$i.createWarningObject=function(e,t){return new Proxy(t,{get:(...t)=>(console.warn(e),Reflect.get(...t)),set:(...t)=>(console.warn(e),Reflect.set(...t)),getOwnPropertyDescriptor:(...t)=>(console.warn(e),Reflect.getOwnPropertyDescriptor(...t)),ownKeys:(...t)=>(console.warn(e),Reflect.ownKeys(...t))})};var Bi,Gi={},Wi={};var Hi={};!function(e){Object.defineProperty(e,\"__esModule\",{value:!0}),e.wrapIntentHandler=e.BROKER_ERRORS=e.generateOverrideWarning=e.generateOverrideError=e.wrapContextHandler=e.wrapInTryCatch=e.generateId=void 0;e.generateId=()=>`${Math.random()}${Date.now()}`;e.wrapInTryCatch=(e,t)=>(...n)=>{try{return e(...n)}catch(e){throw new Error((t||\"\")+e)}};e.wrapContextHandler=(e,t)=>async n=>{try{await e(n)}catch(e){throw console.error(`Error thrown by handler ${t} for context type ${n.type}: ${e}`),e}};e.generateOverrideError=(e,t)=>`You have tried to to use ${e} but ${t} has not been overridden in the Interop Broker. Please override this function. Refer to our documentation for more info.`;e.generateOverrideWarning=(e,t,n,i)=>{const{uuid:r,name:o}=n;return i?`Entity with identity: ${r}/${o} has called ${i} or ${e} but ${t} has not been overridden.`:`Entity with identity: ${r}/${o} has called ${e} but ${t} has not been overridden.`},e.BROKER_ERRORS={fireIntent:(0,e.generateOverrideError)(\"fireIntent\",\"handleFiredIntent\"),fireIntentForContext:(0,e.generateOverrideError)(\"fireIntentForContext\",\"handleFiredIntentForContext\"),getInfoForIntent:(0,e.generateOverrideError)(\"getInfoForIntent\",\"handleInfoForIntent\"),getInfoForIntentsByContext:(0,e.generateOverrideError)(\"getInfoForIntentsByContext\",\"handleInfoForIntentsByContext\"),joinSessionContextGroupWithJoinContextGroup:\"The Context Group you have tried to join is a Session Context Group. Custom Context Groups can only be defined by the Interop Broker through code or manifest configuration. Please use joinSessionContextGroup.\",fdc3Open:(0,e.generateOverrideError)(\"fdc3.open\",\"fdc3HandleOpen\"),fdc3FindInstances:(0,e.generateOverrideError)(\"fdc3.findInstances\",\"fdc3HandleFindInstances\"),fdc3GetAppMetadata:(0,e.generateOverrideError)(\"fdc3.getAppMetadata\",\"fdc3HandleGetAppMetadata\"),fdc3GetInfo:(0,e.generateOverrideError)(\"fdc3.getInfo\",\"fdc3HandleGetInfo\")};e.wrapIntentHandler=(e,t)=>async n=>{try{return e(n)}catch(e){throw console.error(`Error thrown by handler ${t}: ${e}`),e}}}(Hi);var Ni,Di,Ui={};function Vi(){if(Di)return Gi;Di=1;var e,t,n,r=s&&s.__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},o=s&&s.__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)},a=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Gi,\"__esModule\",{value:!0}),Gi.InteropBroker=void 0;const c=d,h=a(function(){if(Bi)return Wi;Bi=1,Object.defineProperty(Wi,\"__esModule\",{value:!0});const e=Cr();return Wi.default=class{constructor(e,t){this.provider=e,this.id=t,this.lastContext=void 0,this.contextGroupMap=new Map,this.clients=new Map,this.registerListeners()}registerListeners(){this.provider.register(`sessionContextGroup:getContext-${this.id}`,this.getCurrentContext.bind(this)),this.provider.register(`sessionContextGroup:setContext-${this.id}`,this.setContext.bind(this)),this.provider.register(`sessionContextGroup:handlerAdded-${this.id}`,this.handlerAdded.bind(this)),this.provider.register(`sessionContextGroup:handlerRemoved-${this.id}`,this.handlerRemoved.bind(this))}getCurrentContext(e){return e.type?this.contextGroupMap.get(e.type):this.lastContext}setContext(t,n){const{context:i}=t,r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name} not in Session Client State Map`);this.contextGroupMap.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{e.contextHandlers.get(i.type)?.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getClientState(e){return this.clients.get(e.endpointId)}async handlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(i){const e=r.contextHandlers.get(i)||[];r.contextHandlers.set(i,[...e,n]);const o=this.contextGroupMap.get(i);o&&await this.provider.dispatch(t,n,o)}else{r.globalHandler=n;const e=[...this.contextGroupMap.keys()].map((async e=>{const i=this.contextGroupMap.get(e);i&&await this.provider.dispatch(t,n,i)}));await Promise.all(e)}}handlerRemoved(e,t){const{handlerId:n}=e,i=this.clients.get(t.endpointId);i?(Array.from(i.contextHandlers).forEach((([,e])=>{const t=e.indexOf(n);t>-1&&e.splice(t,1)})),i.globalHandler===n&&(i.globalHandler=void 0)):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={contextHandlers:new Map,clientIdentity:e,globalHandler:void 0};this.clients.set(e.endpointId,t)}}onDisconnection(e){this.clients.delete(e.endpointId)}},Wi}()),l=Hi,u=a(i),p=function(){if(Ni)return Ui;Ni=1,Object.defineProperty(Ui,\"__esModule\",{value:!0}),Ui.PrivateChannelProvider=void 0;const e=Vi();return Ui.PrivateChannelProvider=class t{constructor(e,t){this.provider=e,this.id=t,this.clients=new Map,this.registerListeners(),this.contextByContextType=new Map,this.lastContext=void 0,this.provider.onConnection((e=>this.registerNewClient(e))),this.provider.onDisconnection((async e=>{const{endpointId:t}=e;this.clients.has(t)&&await this.handleClientDisconnecting(e),0===(await this.provider.getAllClientInfo()).length&&this.provider.destroy()}))}getClientState(e){return this.clients.get(e.endpointId)}registerListeners(){this.provider.register(\"broadcast\",this.broadcast.bind(this)),this.provider.register(\"getCurrentContext\",this.getCurrentContext.bind(this)),this.provider.register(\"contextHandlerAdded\",this.contextHandlerAdded.bind(this)),this.provider.register(\"contextHandlerRemoved\",this.contextHandlerRemoved.bind(this)),this.provider.register(\"nonStandardHandlerRemoved\",this.nonStandardHandlerRemoved.bind(this)),this.provider.register(\"onAddContextHandlerAdded\",this.onAddContextHandlerAdded.bind(this)),this.provider.register(\"onDisconnectHandlerAdded\",this.onDisconnectHandlerAdded.bind(this)),this.provider.register(\"onUnsubscribeHandlerAdded\",this.onUnsubscribeHandlerAdded.bind(this)),this.provider.register(\"clientDisconnecting\",((e,t)=>{this.handleClientDisconnecting(t)}))}broadcast(t,n){const{context:i}=t;if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name}, tried to call broadcast, is not connected to this Private Channel`);const r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to broadcast - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);this.contextByContextType.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{const t=e.handlerIdsByContextTypes.get(i.type);t&&t.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getCurrentContext(e,t){const{contextType:n}=e;if(!this.getClientState(t))throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call getCurrentContext, is not connected to this Private Channel`);if(void 0!==n){return this.contextByContextType.get(n)||null}return this.lastContext?this.lastContext:null}contextHandlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call addContextListener, is not connected to this Private Channel`);if(i){const e=r.handlerIdsByContextTypes.get(i)||[];r.handlerIdsByContextTypes.set(i,[...e,n])}else r.globalHandler=n;Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&e.onAddContextListenerHandlerId&&this.provider.dispatch(e.clientIdentity,e.onAddContextListenerHandlerId,i)}))}async contextHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);if(i){let e;if(i.globalHandler===n)i.globalHandler=void 0;else for(const[t,r]of i.handlerIdsByContextTypes){const i=r.indexOf(n);i>-1&&(r.splice(i,1),e=t)}const r=(await this.getConnectedClients()).map((async n=>{const{clientIdentity:i,clientIdentity:{endpointId:r},onUnsubscribeHandlerId:o}=n;r!==t.endpointId&&o&&await this.provider.dispatch(i,o,e)}));try{await Promise.all(r)}catch(e){throw console.error(`Problem when attempting to dispatch to onUnsubscribeHandlers. Error: ${e} Removing Client: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}`),new Error(e)}}else console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}.`)}nonStandardHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);i?i.onDisconnectHandlerId===n?i.onDisconnectHandlerId=void 0:i.onAddContextListenerHandlerId===n?i.onAddContextListenerHandlerId=void 0:i.onUnsubscribeHandlerId===n&&(i.onUnsubscribeHandlerId=void 0):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}onAddContextHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onAddContextListener, is not connected to this Private Channel`);n.onAddContextListenerHandlerId=i,Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&Array.from(e.handlerIdsByContextTypes.keys()).forEach((e=>{this.provider.dispatch(t,i,e)}))}))}onDisconnectHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onDisconnect, is not connected to this Private Channel`);n.onDisconnectHandlerId=i}onUnsubscribeHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onUnsubscribe, is not connected to this Private Channel`);n.onUnsubscribeHandlerId=i}removeClient(e){const t=this.getClientState(e);if(!t)throw new Error(`Client with Identity: ${e.uuid} ${e.name}, tried to call disconnect, is not connected to this Private Channel`);t.handlerIdsByContextTypes.clear(),this.clients.delete(e.endpointId)}async fireOnDisconnectForOtherClients(e){const{endpointId:t}=e,n=(await this.getConnectedClients()).map((async e=>{const{clientIdentity:{endpointId:n},onDisconnectHandlerId:i}=e;n!==t&&i&&await this.provider.dispatch(e.clientIdentity,i)}));try{await Promise.all(n)}catch(t){throw console.error(`Problem when attempting to dispatch to onDisconnectHandlers. Error: ${t} Disconnecting Client: uuid: ${e.uuid}. name: ${e.name}. endpointId: ${e.endpointId}`),new Error(t)}}async unsubscribeAll(e){const{endpointId:t}=e,n=this.clients.get(t);if(n){const t=Array.from(n.handlerIdsByContextTypes.values()).flat(),i=n.globalHandler;if(t.length>0){const n=t.map((async t=>this.contextHandlerRemoved({handlerId:t},e)));try{await Promise.all(n)}catch(e){console.error(e.message)}}if(i)try{await this.contextHandlerRemoved({handlerId:i},e)}catch(e){console.error(e.message)}}}async handleClientDisconnecting(e){await this.unsubscribeAll(e),this.removeClient(e),await this.fireOnDisconnectForOtherClients(e)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={clientIdentity:e,handlerIdsByContextTypes:new Map,globalHandler:void 0,onAddContextListenerHandlerId:void 0,onUnsubscribeHandlerId:void 0,onDisconnectHandlerId:void 0};this.clients.set(e.endpointId,t)}}async getConnectedClients(){const e=await this.provider.getAllClientInfo();return Array.from(this.clients.values()).filter((t=>{const{uuid:n,name:i}=t.clientIdentity;return e.some((e=>i===e.name&&n===e.uuid))}))}static init(e,n){return new t(e,n)}},Ui}(),w=G,y=[{id:\"green\",displayMetadata:{color:\"#00CC88\",name:\"green\"}},{id:\"purple\",displayMetadata:{color:\"#8C61FF\",name:\"purple\"}},{id:\"orange\",displayMetadata:{color:\"#FF8C4C\",name:\"orange\"}},{id:\"red\",displayMetadata:{color:\"#FF5E60\",name:\"red\"}},{id:\"pink\",displayMetadata:{color:\"#FF8FB8\",name:\"pink\"}},{id:\"yellow\",displayMetadata:{color:\"#E9FF8F\",name:\"yellow\"}}];let f=class i extends c.Base{constructor(i,s,a){super(i),e.set(this,void 0),t.set(this,void 0),n.set(this,void 0),this.getProvider=()=>o(this,n,\"f\").getValue(),this.interopClients=new Map,this.contextGroupsById=new Map,r(this,t,a.contextGroups??[...y],\"f\"),r(this,e,a.fdc3Info,\"f\"),a?.logging&&(this.logging=a.logging),this.intentClientMap=new Map,this.lastContextMap=new Map,this.sessionContextGroupMap=new Map,r(this,n,new w.Lazy(s),\"f\"),this.setContextGroupMap(),this.setupChannelProvider()}static createClosedConstructor(...e){return class extends i{constructor(...t){if(t.length){const[n,i,r]=t;if(r&&\"object\"==typeof r&&!(0,u.default)(r,e[2]))return console.warn(\"You have modified the parameters of the InteropOverride constructor. This behavior is deprecated and will be removed in a future version. You can modify these options in your manifest. Please consult our Interop docs for guidance on migrating to the new override scheme.\"),void super(e[0],e[1],r);console.warn(\"You are attempting to pass arguments to the InteropOverride constructor. This is not necessary, and these passed arguments will be ignored. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.\")}super(...e)}}}setContext({context:e},t){this.wire.sendAction(\"interop-broker-set-context\").catch((e=>{}));const n=this.getClientState(t);if(!n||!n.contextGroupId)throw n?new Error(\"You must join a context group before you can set context.\"):new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);{const{contextGroupId:t}=n;this.setContextForGroup({context:e},t)}}setContextForGroup({context:e},t){this.wire.sendAction(\"interop-broker-set-context-for-group\").catch((e=>{}));const n=this.contextGroupsById.get(t);if(!n)throw new Error(`Unable to set context for context group that isn't in the context group mapping: ${t}.`);const r=i.checkContextIntegrity(e);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(e)}`);const o=e.type;n.set(o,e),this.lastContextMap.set(t,o);Array.from(this.interopClients.values()).filter((e=>e.contextGroupId===t)).forEach((t=>{for(const[,n]of t.contextHandlers)i.isContextTypeCompatible(o,n.contextType)&&this.invokeContextHandler(t.clientIdentity,n.handlerId,e)}))}getCurrentContext(e,t){this.wire.sendAction(\"interop-broker-get-current-context\").catch((e=>{}));const n=this.getClientState(t);if(!n?.contextGroupId)throw new Error(\"You must be a member of a context group to call getCurrentContext\");const{contextGroupId:i}=n,r=this.contextGroupsById.get(i),o=this.lastContextMap.get(i),s=e?.contextType??o;return r&&s?r.get(s):void 0}async joinContextGroup({contextGroupId:e,target:t},n){if(this.wire.sendAction(\"interop-broker-join-context-group\").catch((e=>{})),this.sessionContextGroupMap.has(e))throw new Error(l.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup);if(t){i.hasEndpointId(t)&&await this.addClientToContextGroup({contextGroupId:e},t);try{const n=this.channel.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name));if(!n.length)throw new Error(`Given Identity ${t.uuid} ${t.name} is not connected to the Interop Broker.`);n.length>1&&console.warn(`More than one connection found for identity ${t.uuid} ${t.name}`);const i=[];for(const t of n)i.push(this.addClientToContextGroup({contextGroupId:e},t));await Promise.all(i)}catch(e){throw new Error(e)}}else await this.addClientToContextGroup({contextGroupId:e},n)}async addClientToContextGroup({contextGroupId:e},t){this.wire.sendAction(\"interop-broker-add-client-to-context-group\").catch((e=>{}));const n=this.getClientState(t);if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(!this.getContextGroups().find((t=>t.id===e)))throw new Error(`Attempting to join a context group that does not exist: ${e}. You may only join existing context groups.`);if(n.contextGroupId!==e){n.contextGroupId=e,await this.setCurrentContextGroupInClientOptions(t,e);const i=this.contextGroupsById.get(e);for(const[,e]of n.contextHandlers){const{contextType:n,handlerId:r}=e;if(void 0===n)i.forEach(((e,n)=>{this.invokeContextHandler(t,r,e)}));else if(i.has(n)){const e=i.get(n);e&&this.invokeContextHandler(t,r,e)}}}}async removeFromContextGroup({target:e},t){if(this.wire.sendAction(\"interop-broker-remove-from-context-group\").catch((e=>{})),e){i.hasEndpointId(e)&&await this.removeClientFromContextGroup(e);try{const t=this.channel.connections.filter((t=>t.uuid===e.uuid&&t.name===e.name));if(!t.length)throw new Error(`No connection found for given Identity ${e.uuid} ${e.name}`);t.length>1&&console.warn(`More than one connection found for identity ${e.uuid} ${e.name}`);const n=[];for(const e of t)n.push(this.removeClientFromContextGroup(e));await Promise.all(n)}catch(e){throw new Error(e)}}else await this.removeClientFromContextGroup(t)}async removeClientFromContextGroup(e){this.wire.sendAction(\"interop-broker-remove-client-from-context-group\").catch((e=>{}));const t=this.getClientState(e);t&&(t.contextGroupId=void 0),await this.setCurrentContextGroupInClientOptions(e,null)}getContextGroups(){return this.wire.sendAction(\"interop-broker-get-context-groups\").catch((e=>{})),o(this,t,\"f\").map((e=>({...e})))}getInfoForContextGroup({contextGroupId:e}){return this.wire.sendAction(\"interop-broker-get-info-for-context-group\").catch((e=>{})),this.getContextGroups().find((t=>t.id===e))}getAllClientsInContextGroup({contextGroupId:e}){this.wire.sendAction(\"interop-broker-get-all-clients-in-context-group\").catch((e=>{}));return Array.from(this.interopClients.values()).filter((t=>t.contextGroupId===e)).map((e=>e.clientIdentity))}async handleFiredIntent(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.raiseIntent\",\"InteropBroker.handleFiredIntent\",t,\"interopClient.fireIntent\");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntent)}async setIntentTarget(e,t){this.wire.sendAction(\"interop-broker-set-intent-target\").catch((e=>{}));const n=this.intentClientMap.get(t.name),i=`intent-handler-${e.name}`;if(n){const t=n.get(i);if(t){if(t.pendingIntents.push(e),t.clientIdentity&&t.isReady){const{clientIdentity:e,pendingIntents:n}=t;try{const r=n[n.length-1];await this.invokeIntentHandler(e,i,r),t.pendingIntents=[]}catch(n){console.error(`Error invoking intent handler for client ${e.uuid}/${e.name}/${e.endpointId}`),t.isReady=!1}}}else n.set(i,{isReady:!1,pendingIntents:[e]})}else{this.intentClientMap.set(t.name,new Map);const n=this.intentClientMap.get(t.name);n&&n.set(i,{isReady:!1,pendingIntents:[e]})}}async handleInfoForIntent(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.findIntent\",\"InteropBroker.handleInfoForIntent\",t,\"interopClient.getInfoForIntent\");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntent)}async handleInfoForIntentsByContext(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.findIntentsByContext\",\"InteropBroker.handleInfoForIntentsByContext\",t,\"interopClient.getInfoForIntentsByContext\");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntentsByContext)}async handleFiredIntentForContext(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.raiseIntentForContext\",\"InteropBroker.handleFiredIntentForContext\",t,\"interopClient.fireIntentForContext\");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntentForContext)}async clientDisconnected(e){}async fdc3HandleOpen({app:e,context:t},n){const i=(0,l.generateOverrideWarning)(\"fdc3.open\",\"InteropBroker.fdc3HandleOpen\",n);throw console.warn(i),new Error(l.BROKER_ERRORS.fdc3Open)}async fdc3HandleFindInstances(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.open\",\"InteropBroker.fdc3HandleFindInstances\",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3FindInstances)}async fdc3HandleGetAppMetadata(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.getAppMetadata\",\"InteropBroker.fdc3HandleGetAppMetadata\",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3GetAppMetadata)}async invokeContextHandler(e,t,n){const i=await this.getProvider();try{await i.dispatch(e,t,n)}catch(i){console.error(`Error invoking context handler ${t} for context type ${n.type} in client ${e.uuid}/${e.name}/${e.endpointId}`,i)}}async invokeIntentHandler(e,t,n){const i=await this.getProvider();await i.dispatch(e,t,n)}async fdc3HandleGetInfo(t,n){const{fdc3Version:i}=t;return{fdc3Version:i,...o(this,e,\"f\"),optionalFeatures:{OriginatingAppMetadata:!1,UserChannelMembershipAPIs:!0},appMetadata:{appId:\"\",instanceId:\"\"}}}async getAllClientInfo(){return(await this.getProvider()).getAllClientInfo()}decorateSnapshot(e){return{...e,interopSnapshotDetails:{contextGroupStates:this.getContextGroupStates()}}}applySnapshot(e,t){const n=e?.interopSnapshotDetails?.contextGroupStates;n&&(t?.closeExistingWindows||this.updateExistingClients(n),this.rehydrateContextGroupStates(n))}updateExistingClients(e){this.interopClients.forEach((t=>{const{clientIdentity:n,contextGroupId:r,contextHandlers:o}=t;if(r){const t=e[r];for(const[,e]of Object.entries(t))o.forEach((t=>{const{handlerId:r,contextType:o}=t;i.isContextTypeCompatible(e.type,o)&&this.invokeContextHandler(n,r,e)}))}}))}getContextGroupStates(){return i.toObject(this.contextGroupsById)}rehydrateContextGroupStates(e){const t=Object.entries(e);for(const[e,n]of t){const t=Object.entries(n);for(const[n,i]of t)if(this.contextGroupsById.has(e)){this.contextGroupsById.get(e).set(n,i)}else console.warn(`Attempting to set a context group that isn't in the context group mapping. Skipping context group rehydration for: ${e}`)}}contextHandlerRegistered({contextType:e,handlerId:t},n){const i={contextType:e,handlerId:t},r=this.getClientState(n);if(r?.contextHandlers.set(t,i),r&&r.contextGroupId){const{contextGroupId:i}=r,o=this.contextGroupsById.get(i);if(void 0===e)o.forEach(((e,i)=>{this.invokeContextHandler(n,t,e)}));else if(o.has(e)){const i=o.get(e);i&&this.invokeContextHandler(n,t,i)}}}async intentHandlerRegistered(e,t){const{handlerId:n}=e,i=this.intentClientMap.get(t.name),r=i?.get(n);if(i)if(r){const{pendingIntents:e}=r;r.clientIdentity=t,r.isReady=!0;try{if(e.length>0){const i=e[e.length-1];await this.invokeIntentHandler(t,n,i),r.pendingIntents=[]}}catch(e){console.error(`Error invoking intent handler: ${n} for client ${t.uuid}/${t.name}/${t.endpointId}`)}}else i.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t});else{this.intentClientMap.set(t.name,new Map);const e=this.intentClientMap.get(t.name);e&&e.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t})}}removeContextHandler({handlerId:e},t){const n=this.getClientState(t);n&&n.contextHandlers.delete(e)}handleJoinSessionContextGroup({sessionContextGroupId:e},t){try{if(!e)throw new Error(\"Failed to join session context group: must specify group id.\");const n=this.sessionContextGroupMap.get(e);if(n)n.registerNewClient(t);else{const n=new h.default(this.channel,e);n.registerNewClient(t),this.sessionContextGroupMap.set(e,n)}return{hasConflict:this.contextGroupsById.has(e)}}catch(e){throw new Error(e)}}getClientState(e){return this.interopClients.get(e.endpointId)}static toObject(e){const t=Object.fromEntries(e),n={};return Object.entries(t).forEach((([e,t])=>{const i=Object.fromEntries(t);n[e]=i})),n}static checkContextIntegrity(e){if(!e)return{isValid:!1,reason:\"No context supplied\"};if(\"object\"!=typeof e)return{isValid:!1,reason:\"Context must be an Object\"};if(!e.type)return{isValid:!1,reason:\"Context must have a type property\"};if(e.id&&\"object\"!=typeof e.id)return{isValid:!1,reason:\"Context id must be an Object populated with key-value identifiers (if set)\"};if(e.id){const{id:t}=e,n=Object.keys(t);let i=!1;if(!n.length)return{isValid:!1,reason:\"Context id must have at least one key-value identifier\"};if(n.forEach((e=>{\"string\"==typeof e&&\"string\"==typeof t[e]||(i=!0)})),i)return{isValid:!1,reason:\"Context id key-value identifiers must be of type string\"}}return e.name&&\"string\"!=typeof e.name?{isValid:!1,reason:\"Context name must be of string type (if set)\"}:{isValid:!0}}static hasEndpointId(e){return void 0!==e.endpointId}static isContextTypeCompatible(e,t){return void 0===t||e===t}setContextGroupMap(){for(const e of this.getContextGroups())this.contextGroupsById.set(e.id,new Map)}async setCurrentContextGroupInClientOptions(e,t){try{const n=await this.fin.System.getEntityInfo(e.uuid,e.name);let i;\"view\"===n.entityType?i=await this.fin.View.wrap(e):\"window\"===n.entityType&&(i=await this.fin.Window.wrap(e)),i&&await i.updateOptions({interop:{currentContextGroup:t}})}catch(e){}}async setupChannelProvider(){try{const e=await this.getProvider();this.channel=e,this.wireChannel(e)}catch(e){throw new Error(`Error setting up Interop Broker Channel Provider: ${e}`)}}wireChannel(e){e.onConnection((async(e,t)=>{if(!await this.isConnectionAuthorized(e,t))throw new Error(`Connection not authorized for ${e.uuid}, ${e.name}`);if(!e.endpointId)throw new Error(\"Version too old to be compatible with Interop. Please upgrade your runtime to a more recent version.\");const n={contextGroupId:void 0,contextHandlers:new Map,clientIdentity:e};t?.currentContextGroup&&this.contextGroupsById.has(t.currentContextGroup)&&(n.contextGroupId=t?.currentContextGroup),this.interopClients.set(e.endpointId,n)})),e.onDisconnection((e=>{this.interopClients.delete(e.endpointId);const t=this.intentClientMap.get(e.name);t&&e.uuid===this.fin.me.uuid&&t.forEach((e=>{e.isReady=!1})),this.sessionContextGroupMap.forEach((t=>{t.onDisconnection(e)})),this.clientDisconnected(e)})),e.beforeAction((async(e,t,n)=>{if(!await this.isActionAuthorized(e,t,n))throw new Error(`Action (${e}) not authorized for ${n.uuid}, ${n.name}`);this.logging?.beforeAction?.enabled&&console.log(e,t,n)})),e.afterAction(((e,t,n)=>{this.logging?.afterAction?.enabled&&console.log(e,t,n)})),e.register(\"setContext\",this.setContext.bind(this)),e.register(\"fireIntent\",this.handleFiredIntent.bind(this)),e.register(\"getCurrentContext\",this.getCurrentContext.bind(this)),e.register(\"getInfoForIntent\",this.handleInfoForIntent.bind(this)),e.register(\"getInfoForIntentsByContext\",this.handleInfoForIntentsByContext.bind(this)),e.register(\"fireIntentForContext\",this.handleFiredIntentForContext.bind(this)),e.register(\"getContextGroups\",this.getContextGroups.bind(this)),e.register(\"joinContextGroup\",this.joinContextGroup.bind(this)),e.register(\"removeFromContextGroup\",this.removeFromContextGroup.bind(this)),e.register(\"getAllClientsInContextGroup\",this.getAllClientsInContextGroup.bind(this)),e.register(\"getInfoForContextGroup\",this.getInfoForContextGroup.bind(this)),e.register(\"contextHandlerRegistered\",this.contextHandlerRegistered.bind(this)),e.register(\"intentHandlerRegistered\",this.intentHandlerRegistered.bind(this)),e.register(\"removeContextHandler\",this.removeContextHandler.bind(this)),e.register(\"sessionContextGroup:createIfNeeded\",this.handleJoinSessionContextGroup.bind(this)),e.register(\"fdc3Open\",this.fdc3HandleOpen.bind(this)),e.register(\"fdc3v2FindIntentsByContext\",this.handleInfoForIntentsByContext.bind(this)),e.register(\"fdc3FindInstances\",this.fdc3HandleFindInstances.bind(this)),e.register(\"fdc3GetAppMetadata\",this.fdc3HandleGetAppMetadata.bind(this)),e.register(\"fdc3v2GetInfo\",(async(e,t)=>this.fdc3HandleGetInfo.bind(this)(e,t))),e.register(\"createPrivateChannelProvider\",(async e=>{const{channelId:t}=e,n=await this.fin.InterApplicationBus.Channel.create(t);p.PrivateChannelProvider.init(n,t)}))}isConnectionAuthorized(e,t){return this.wire.sendAction(\"interop-broker-is-connection-authorized\").catch((e=>{})),Promise.resolve(!0)}isActionAuthorized(e,t,n){return this.wire.sendAction(\"interop-broker-is-action-authorized\").catch((e=>{})),Promise.resolve(!0)}};return Gi.InteropBroker=f,e=new WeakMap,t=new WeakMap,n=new WeakMap,Gi}var zi,Ki={},qi={},Ji=s&&s.__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},Yi=s&&s.__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)};Object.defineProperty(qi,\"__esModule\",{value:!0});const Zi=d,Qi=Hi;class Xi extends Zi.Base{constructor(e,t,n){super(e),zi.set(this,void 0),this.id=n,Ji(this,zi,t,\"f\")}async setContext(e){this.wire.sendAction(\"interop-session-context-group-set-context\").catch((e=>{}));return(await Yi(this,zi,\"f\")).dispatch(`sessionContextGroup:setContext-${this.id}`,{sessionContextGroupId:this.id,context:e})}async getCurrentContext(e){this.wire.sendAction(\"interop-session-context-group-get-context\").catch((e=>{}));return(await Yi(this,zi,\"f\")).dispatch(`sessionContextGroup:getContext-${this.id}`,{sessionContextGroupId:this.id,type:e})}async addContextHandler(e,t){if(this.wire.sendAction(\"interop-session-context-group-add-handler\").catch((e=>{})),\"function\"!=typeof e)throw new Error(\"Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.\");const n=await Yi(this,zi,\"f\");let i;return i=t?`sessionContextHandler:invoke-${this.id}-${t}-${(0,Qi.generateId)()}`:`sessionContextHandler:invoke-${this.id}`,n.register(i,(0,Qi.wrapContextHandler)(e,i)),await n.dispatch(`sessionContextGroup:handlerAdded-${this.id}`,{handlerId:i,contextType:t}),{unsubscribe:await this.createUnsubscribeCb(i)}}async createUnsubscribeCb(e){const t=await Yi(this,zi,\"f\");return async()=>{t.remove(e),await t.dispatch(`sessionContextGroup:handlerRemoved-${this.id}`,{handlerId:e})}}getUserInstance(){return{id:this.id,setContext:(0,Qi.wrapInTryCatch)(this.setContext.bind(this),\"Failed to set context: \"),getCurrentContext:(0,Qi.wrapInTryCatch)(this.getCurrentContext.bind(this),\"Failed to get context: \"),addContextHandler:(0,Qi.wrapInTryCatch)(this.addContextHandler.bind(this),\"Failed to add context handler: \")}}}qi.default=Xi,zi=new WeakMap;var er={},tr={},nr={},ir={},rr=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),or=s&&s.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,\"default\",{enumerable:!0,value:t})}:function(e,t){e.default=t}),sr=s&&s.__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)&&rr(t,e,n);return or(t,e),t};Object.defineProperty(ir,\"__esModule\",{value:!0}),ir.PrivateChannelClient=void 0;const ar=sr(Hi);var cr,dr;function hr(){if(cr)return tr;cr=1;var e,t=s&&s.__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)},n=s&&s.__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},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(tr,\"__esModule\",{value:!0}),tr.FDC3ModuleBase=void 0;const o=nr,a=Hi,c=wr(),d=r(i);return tr.FDC3ModuleBase=class{get client(){return t(this,e,\"f\").call(this)}get fin(){return this.wire.getFin()}constructor(t,i){this.wire=i,e.set(this,void 0),n(this,e,t,\"f\")}async broadcast(e){return this.wire.sendAction(\"fdc3-broadcast\").catch((e=>{})),this.client.setContext(e)}async _open(e,t){this.wire.sendAction(\"fdc3-open\").catch((e=>{}));try{return await c.InteropClient.ferryFdc3Call(this.client,\"fdc3Open\",{app:e,context:t})}catch(e){const t=e.message===a.BROKER_ERRORS.fdc3Open?\"ResolverUnavailable\":e.message;throw new Error(t)}}async _getChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:\"system\",...(0,o.getUnsupportedChannelApis)()})))}async getOrCreateChannel(e){this.wire.sendAction(\"fdc3-get-or-create-channel\").catch((e=>{}));const t=(await this._getChannels()).find((t=>t.id===e));if(t)return{...t,type:\"system\",...(0,o.getUnsupportedChannelApis)()};try{const t=await this.client.joinSessionContextGroup(e);return(0,o.buildAppChannelObject)(t)}catch(e){throw console.error(e.message),new Error(o.ChannelError.CreationFailed)}}async getSystemChannels(){return this.wire.sendAction(\"fdc3-get-system-channels\").catch((e=>{})),this._getChannels()}async joinChannel(e){this.wire.sendAction(\"fdc3-join-channel\").catch((e=>{}));try{return await this.client.joinContextGroup(e)}catch(e){if(e.message===a.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup?console.error(\"The Channel you have tried to join is an App Channel. Custom Channels can only be defined by the Interop Broker through code or manifest configuration. Please use getOrCreateChannel.\"):console.error(e.message),e.message.startsWith(\"Attempting to join a context group that does not exist\"))throw new Error(o.ChannelError.NoChannelFound);throw new Error(o.ChannelError.AccessDenied)}}async getCurrentChannel(){this.wire.sendAction(\"fdc3-get-current-channel\").catch((e=>{}));const e=await this.getCurrentContextGroupInfo();return e?this.buildChannelObject(e):null}async leaveCurrentChannel(){return this.wire.sendAction(\"fdc3-leave-current-channel\").catch((e=>{})),this.client.removeFromContextGroup()}async getCurrentContextGroupInfo(){const e=await this.client.getContextGroups(),t=e.map((async e=>this.client.getAllClientsInContextGroup(e.id))),n=(await Promise.all(t)).findIndex((e=>e.some((e=>{const{uuid:t,name:n}=e;return this.wire.me.uuid===t&&this.wire.me.name===n}))));return e[n]}async buildChannelObject(e){return{...e,type:\"system\",addContextListener:(...[e,t])=>{let n,i;\"function\"==typeof e?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),n=e):(n=t,\"string\"==typeof e&&(i=e));const r=(async()=>{let e=!0;const t=await this.client.getCurrentContext(i);return this.client.addContextHandler(((i,r)=>{if(!e||(e=!1,!(0,d.default)(t,i)))return n(i,r)}),i)})();return{...r,unsubscribe:()=>r.then((e=>e.unsubscribe()))}},broadcast:this.broadcast.bind(this),getCurrentContext:async e=>{const t=await this.client.getCurrentContext(e);return void 0===t?null:t}}}},e=new WeakMap,tr}ir.PrivateChannelClient=class{constructor(e,t){this.id=t,this.client=e,this.listeners=new Map}async broadcast(e){return this.client.dispatch(\"broadcast\",{context:e})}async getCurrentContext(e){return this.client.dispatch(\"getCurrentContext\",{contextType:e})}async addContextListener(e,t){if(\"function\"!=typeof t)throw new Error(\"Non-function argument passed to the second parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.\");let n;n=e?`contextHandler:invoke-${this.id}-${e}-${ar.generateId()}`:`contextHandler:invoke-${this.id}-${ar.generateId()}`,this.client.register(n,ar.wrapContextHandler(t,n));const i={unsubscribe:await this.createContextUnsubscribeCb(n)};return this.listeners.set(n,i),await this.client.dispatch(\"contextHandlerAdded\",{handlerId:n,contextType:e}),i}createNonStandardUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch(\"nonStandardHandlerRemoved\",{handlerId:e})}}createContextUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch(\"contextHandlerRemoved\",{handlerId:e})}}onAddContextListener(e){const t=`onContextHandlerAdded:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch(\"onAddContextHandlerAdded\",{handlerId:t}),n}onDisconnect(e){const t=`onDisconnect:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch(\"onDisconnectHandlerAdded\",{handlerId:t}),n}onUnsubscribe(e){const t=`onUnsubscribe:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch(\"onUnsubscribeHandlerAdded\",{handlerId:t}),n}async cleanUpAllSubs(){Array.from(this.listeners.keys()).forEach((e=>{this.client.remove(e),this.listeners.delete(e)}))}async disconnect(){try{await this.client.dispatch(\"clientDisconnecting\"),await this.cleanUpAllSubs(),await this.client.disconnect()}catch(e){throw new Error(e.message)}}},function(e){var t=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,\"__esModule\",{value:!0}),e.getIntentResolution=e.isChannel=e.isContext=e.connectPrivateChannel=e.buildAppChannelObject=e.buildPrivateChannelObject=e.ChannelError=e.ResultError=e.UnsupportedChannelApiError=e.getUnsupportedChannelApis=void 0;const n=Hi,r=ir,o=t(i);e.getUnsupportedChannelApis=e=>({addContextListener:()=>{throw new a(\"Channel.addContextListener\",e)},broadcast:()=>{throw new a(\"Channel.broadcast\",e)},getCurrentContext:()=>{throw new a(\"Channel.getCurrentContext\",e)}});class a extends Error{constructor(e,t=\"System\"){super(e),this.message=`Calling ${e} on an instance of a ${t} Channel returned by fdc3.get${t}Channels is not supported. If you would like to use a ${t} Channel, please use fdc3.joinChannel, fdc3.addContextListener, and fdc3.broadcast instead.`}}var c,d;e.UnsupportedChannelApiError=a,function(e){e.NoResultReturned=\"NoResultReturned\",e.IntentHandlerRejected=\"IntentHandlerRejected\"}(c=e.ResultError||(e.ResultError={})),(d=e.ChannelError||(e.ChannelError={})).NoChannelFound=\"NoChannelFound\",d.AccessDenied=\"AccessDenied\",d.CreationFailed=\"CreationFailed\";e.buildPrivateChannelObject=e=>{let t=!1;const n=()=>{if(t)throw new Error(\"Private Channel Client has been disconnected from the Private Channel\")};return{id:e.id,type:\"private\",broadcast:async t=>(n(),e.broadcast(t)),getCurrentContext:async t=>(n(),e.getCurrentContext(t)),addContextListener:async(t,i)=>{n();let r=i,o=t;\"function\"==typeof t&&(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),r=t,o=null);return e.addContextListener(o,r)},onAddContextListener:t=>(n(),e.onAddContextListener(t)),disconnect:async()=>(n(),t=!0,e.disconnect()),onDisconnect:t=>(n(),e.onDisconnect(t)),onUnsubscribe:t=>(n(),e.onUnsubscribe(t))}};e.buildAppChannelObject=e=>({id:e.id,type:\"app\",broadcast:e.setContext,getCurrentContext:async t=>{const n=await e.getCurrentContext(t);return void 0===n?null:n},addContextListener:(t,n)=>{let i,r;\"function\"==typeof t?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),i=t):(i=n,\"string\"==typeof t&&(r=t));const s=(async()=>{let t=!0;const n=await e.getCurrentContext(r);return e.addContextHandler(((e,r)=>{if(!t||(t=!1,!(0,o.default)(n,e)))return i(e,r)}),r)})();return{...s,unsubscribe:()=>s.then((e=>e.unsubscribe()))}}});e.connectPrivateChannel=async t=>{try{const n=await fin.InterApplicationBus.Channel.connect(t),i=new r.PrivateChannelClient(n,t);return(0,e.buildPrivateChannelObject)(i)}catch(e){throw new Error(`Private Channel with id: ${t} doesn't exist`)}};e.isContext=e=>{if(e&&\"object\"==typeof e&&\"type\"in e){const{type:t}=e;return\"string\"==typeof t}return!1};e.isChannel=e=>{if(e&&\"object\"==typeof e&&\"type\"in e&&\"id\"in e){const{type:t,id:n}=e;return\"string\"==typeof t&&\"string\"==typeof n&&(\"app\"===t||\"private\"===t)}return!1};e.getIntentResolution=async(t,i,r,o)=>{const s=(0,n.generateId)(),a=new Promise(((e,t)=>{fin.InterApplicationBus.subscribe({uuid:\"*\"},s,(t=>{e(t)})).catch((()=>t(new Error(\"getResult is not supported in this environment\"))))})),d=r?{target:r,intentResolutionResultId:s}:{intentResolutionResultId:s},h=o?{name:o,context:i,metadata:d}:{...i,metadata:d},l=async()=>{let n=await a;if(!n||\"object\"!=typeof n)throw new Error(c.NoResultReturned);const{error:i}=n;if(i)throw new Error(c.IntentHandlerRejected);if((0,e.isChannel)(n)){const{id:i,type:r}=n;switch(r){case\"private\":n=await(0,e.connectPrivateChannel)(i);break;case\"app\":{const r=await t.joinSessionContextGroup(i);n=(0,e.buildAppChannelObject)(r);break}}}else if(!(0,e.isContext)(n))throw new Error(c.NoResultReturned);return n},u=o?await t.fireIntent(h):await t.fireIntentForContext(h);return\"object\"!=typeof u?{source:{appId:\"\",instanceId:\"\"},intent:\"\",version:\"2.0\",getResult:l}:{...u,getResult:l}}}(nr);var lr,ur,pr={};function wr(){if(ur)return Ki;ur=1;var e,t,n=s&&s.__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},i=s&&s.__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)},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ki,\"__esModule\",{value:!0}),Ki.InteropClient=void 0;const o=d,a=r(qi),c=function(){if(dr)return er;dr=1,Object.defineProperty(er,\"__esModule\",{value:!0}),er.Fdc3Module=void 0;const e=Hi,t=hr();class n extends t.FDC3ModuleBase{async open(e,t){await super._open(e,t)}addContextListener(e,t){let n;return this.wire.sendAction(\"fdc3-add-context-listener\").catch((e=>{})),\"function\"==typeof e?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),n=this.client.addContextHandler(e)):n=this.client.addContextHandler(t,null===e?void 0:e),{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}addIntentListener(e,t){this.wire.sendAction(\"fdc3-add-intent-listener\").catch((e=>{}));const n=this.client.registerIntentHandler((e=>{const{context:n,metadata:i}=e,{metadata:r}=n,o=i?.intentResolutionResultId||r?.intentResolutionResultId;o&&this.fin.InterApplicationBus.publish(o,null).catch((()=>null)),t(e.context)}),e,{fdc3Version:\"1.2\"});return{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}async raiseIntent(t,n,i){this.wire.sendAction(\"fdc3-raise-intent\").catch((e=>{}));const r=i?{name:t,context:n,metadata:{target:i}}:{name:t,context:n};try{return await this.client.fireIntent(r)}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntent?\"ResolverUnavailable\":t.message;throw new Error(n)}}async findIntent(t,n){this.wire.sendAction(\"fdc3-find-intent\").catch((e=>{}));try{return await this.client.getInfoForIntent({name:t,context:n})}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntent?\"ResolverUnavailable\":t.message;throw new Error(n)}}async findIntentsByContext(t){this.wire.sendAction(\"fdc3-find-intents-by-context\").catch((e=>{}));try{return await this.client.getInfoForIntentsByContext(t)}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntentsByContext?\"ResolverUnavailable\":t.message;throw new Error(n)}}async raiseIntentForContext(t,n){this.wire.sendAction(\"fdc3-raise-intent-for-context\").catch((e=>{}));try{return await this.client.fireIntentForContext({...t,metadata:{target:n}})}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntentForContext?\"ResolverUnavailable\":t.message;throw new Error(n)}}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}getInfo(){return this.wire.sendAction(\"fdc3-get-info\").catch((e=>{})),{providerVersion:this.wire.environment.getAdapterVersionSync(),provider:`openfin-${this.wire.me.uuid}`,fdc3Version:\"1.2\"}}}return er.Fdc3Module=n,er}(),h=function(){if(lr)return pr;lr=1,Object.defineProperty(pr,\"__esModule\",{value:!0}),pr.Fdc3Module2=void 0;const e=hr(),t=Hi,n=wr(),i=nr,r=ir;class o extends e.FDC3ModuleBase{async open(e,t){return\"string\"==typeof e&&console.warn(\"Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).\"),super._open(e,t)}async findInstances(e){this.wire.sendAction(\"fdc3-find-instances\").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,\"fdc3FindInstances\",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3FindInstances?\"ResolverUnavailable\":e.message;throw new Error(n)}}async getAppMetadata(e){this.wire.sendAction(\"fdc3-get-app-metadata\").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,\"fdc3GetAppMetadata\",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3GetAppMetadata?\"ResolverUnavailable\":e.message;throw new Error(n)}}async addContextListener(e,t){this.wire.sendAction(\"fdc3-add-context-listener\").catch((e=>{}));const n=e=>t=>{const{contextMetadata:n,...i}=t,r=n?[{...i},n]:[t,null];e(...r)};let i=t,r=n(i);return\"function\"==typeof e?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),i=e,r=n(i),this.client.addContextHandler(r)):this.client.addContextHandler(r,null===e?void 0:e)}async findIntent(e,n,i){this.wire.sendAction(\"fdc3-find-intent\").catch((e=>{}));try{return await this.client.getInfoForIntent({name:e,context:n,metadata:{resultType:i}})}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntent?\"ResolverUnavailable\":e.message;throw new Error(n)}}async findIntentsByContext(e,i){this.wire.sendAction(\"fdc3-find-intents-by-context\").catch((e=>{}));const r=i?{context:e,metadata:{resultType:i}}:e;try{return await n.InteropClient.ferryFdc3Call(this.client,\"fdc3v2FindIntentsByContext\",r)}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntentsByContext?\"ResolverUnavailable\":e.message;throw new Error(n)}}async raiseIntent(e,n,r){this.wire.sendAction(\"fdc3-raise-intent\").catch((e=>{}));try{return\"string\"==typeof r&&console.warn(\"Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).\"),(0,i.getIntentResolution)(this.client,n,r,e)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?\"ResolverUnavailable\":e.message;throw new Error(n)}}async raiseIntentForContext(e,n){this.wire.sendAction(\"fdc3-raise-intent-for-context\").catch((e=>{}));try{return\"string\"==typeof n&&console.warn(\"Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).\"),(0,i.getIntentResolution)(this.client,e,n)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?\"ResolverUnavailable\":e.message;throw new Error(n)}}async addIntentListener(e,t){if(this.wire.sendAction(\"fdc3-add-intent-listener\").catch((e=>{})),\"string\"!=typeof e)throw new Error(\"First argument must be an Intent name\");return this.client.registerIntentHandler((async e=>{let n,i;const{context:r,metadata:o}=e,{contextMetadata:s,metadata:a,...c}=r,d=o?.intentResolutionResultId||a?.intentResolutionResultId;try{const e=a?{metadata:a,...c}:{...c};n=await t(e,s),i=n}catch(e){n=e,i={error:!0}}if(d&&this.fin.InterApplicationBus.publish(d,i).catch((()=>null)),n instanceof Error)throw new Error(n.message);return n}),e,{fdc3Version:\"2.0\"})}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}async createPrivateChannel(){const e=(0,t.generateId)();await n.InteropClient.ferryFdc3Call(this.client,\"createPrivateChannelProvider\",{channelId:e});const o=await this.fin.InterApplicationBus.Channel.connect(e),s=new r.PrivateChannelClient(o,e);return(0,i.buildPrivateChannelObject)(s)}async getUserChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:\"user\",...(0,i.getUnsupportedChannelApis)(\"User\")})))}async getSystemChannels(){return console.warn(\"This API has been deprecated. Please use fdc3.getUserChannels instead.\"),super.getSystemChannels()}async joinUserChannel(e){return super.joinChannel(e)}async joinChannel(e){return console.warn(\"This API has been deprecated. Please use fdc3.joinUserChannel instead.\"),super.joinChannel(e)}async getCurrentChannel(){const e=await super.getCurrentChannel();return e?{...e,type:\"user\",broadcast:this.broadcast.bind(this)}:null}async getInfo(){return n.InteropClient.ferryFdc3Call(this.client,\"fdc3v2GetInfo\",{fdc3Version:\"2.0\"})}}return pr.Fdc3Module2=o,pr}(),l=Hi;let u=class extends o.Base{constructor(i,r){super(i),e.set(this,void 0),t.set(this,void 0),n(this,t,new Map,\"f\"),n(this,e,r,\"f\")}async setContext(t){this.wire.sendAction(\"interop-client-set-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"setContext\",{context:t})}async addContextHandler(t,n){if(this.wire.sendAction(\"interop-client-add-context-handler\").catch((e=>{})),\"function\"!=typeof t)throw new Error(\"Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.\");const r=await i(this,e,\"f\");let o;o=n?`invokeContextHandler-${n}-${(0,l.generateId)()}`:\"invokeContextHandler\";const s=(0,l.wrapContextHandler)(t,o);return r.register(o,s),await r.dispatch(\"contextHandlerRegistered\",{handlerId:o,contextType:n}),{unsubscribe:async()=>{r.remove(o),await r.dispatch(\"removeContextHandler\",{handlerId:o})}}}async getContextGroups(){this.wire.sendAction(\"interop-client-get-context-groups\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getContextGroups\")}async joinContextGroup(t,n){this.wire.sendAction(\"interop-client-join-context-group\").catch((e=>{}));const r=await i(this,e,\"f\");if(!t)throw new Error(\"No contextGroupId specified for joinContextGroup.\");return r.dispatch(\"joinContextGroup\",{contextGroupId:t,target:n})}async removeFromContextGroup(t){this.wire.sendAction(\"interop-client-remove-from-context-group\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"removeFromContextGroup\",{target:t})}async getAllClientsInContextGroup(t){this.wire.sendAction(\"interop-client-get-all-clients-in-context-group\").catch((e=>{}));const n=await i(this,e,\"f\");if(!t)throw new Error(\"No contextGroupId specified for getAllClientsInContextGroup.\");return n.dispatch(\"getAllClientsInContextGroup\",{contextGroupId:t})}async getInfoForContextGroup(t){this.wire.sendAction(\"interop-client-get-info-for-context-group\").catch((e=>{}));const n=await i(this,e,\"f\");if(!t)throw new Error(\"No contextGroupId specified for getInfoForContextGroup.\");return n.dispatch(\"getInfoForContextGroup\",{contextGroupId:t})}async fireIntent(t){this.wire.sendAction(\"interop-client-fire-intent\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"fireIntent\",t)}async registerIntentHandler(t,n,r){this.wire.sendAction(\"interop-client-register-intent-handler\").catch((e=>{}));const o=await i(this,e,\"f\"),s=`intent-handler-${n}`,a=(0,l.wrapIntentHandler)(t,s);try{await o.register(s,a),await o.dispatch(\"intentHandlerRegistered\",{handlerId:s,...r})}catch(e){throw new Error(\"Unable to register intent handler\")}return{unsubscribe:async()=>{o.remove(s)}}}async getCurrentContext(t){this.wire.sendAction(\"interop-client-get-current-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getCurrentContext\",{contextType:t})}async getInfoForIntent(t){this.wire.sendAction(\"interop-client-get-info-for-intent\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getInfoForIntent\",t)}async getInfoForIntentsByContext(t){this.wire.sendAction(\"interop-client-get-info-for-intents-by-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getInfoForIntentsByContext\",t)}async fireIntentForContext(t){this.wire.sendAction(\"interop-client-fire-intent-for-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"fireIntentForContext\",t)}async joinSessionContextGroup(n){try{const r=i(this,t,\"f\").get(n);if(r)return r.getUserInstance();const o=await i(this,e,\"f\"),{hasConflict:s}=await o.dispatch(\"sessionContextGroup:createIfNeeded\",{sessionContextGroupId:n});s&&console.warn(`A (non-session) context group with the name \"${n}\" already exists. If you are trying to join a Context Group, call joinContextGroup instead.`);const c=new a.default(this.wire,i(this,e,\"f\"),n);return i(this,t,\"f\").set(n,c),c.getUserInstance()}catch(e){throw console.error(`Error thrown trying to create Session Context Group with id \"${n}\": ${e}`),e}}async onDisconnection(t){this.wire.sendAction(\"interop-client-add-ondisconnection-listener\").catch((e=>{}));return(await i(this,e,\"f\")).onDisconnection((e=>{const{uuid:n}=e;t({type:\"interop-broker\",topic:\"disconnected\",brokerName:n})}))}getFDC3Sync(e){switch(e){case\"1.2\":return new c.Fdc3Module((()=>this),this.wire);case\"2.0\":return new h.Fdc3Module2((()=>this),this.wire);default:throw new Error(`Invalid FDC3 version provided: ${e}. Must be '1.2' or '2.0'`)}}async getFDC3(e){return this.getFDC3Sync(e)}static async ferryFdc3Call(t,n,r){return(await i(t,e,\"f\")).dispatch(n,r||null)}};return Ki.InteropClient=u,e=new WeakMap,t=new WeakMap,Ki}var yr,fr,gr,mr={};function vr(){if(yr)return mr;yr=1,Object.defineProperty(mr,\"__esModule\",{value:!0}),mr.overrideCheck=mr.checkFDC32Overrides=mr.getDefaultViewFdc3VersionFromAppInfo=void 0;const e=Vi();function t(t){return[\"fdc3HandleFindInstances\",\"handleInfoForIntent\",\"handleInfoForIntentsByContext\",\"fdc3HandleGetAppMetadata\",\"fdc3HandleGetInfo\",\"fdc3HandleOpen\",\"handleFiredIntent\",\"handleFiredIntentForContext\"].filter((n=>t[n]===e.InteropBroker.prototype[n]))}return mr.getDefaultViewFdc3VersionFromAppInfo=function({manifest:e,initialOptions:t}){const n=e?.platform?.defaultViewOptions?.fdc3InteropApi??t.defaultViewOptions?.fdc3InteropApi;return[\"1.2\",\"2.0\"].includes(n??\"\")?n:void 0},mr.checkFDC32Overrides=t,mr.overrideCheck=function(e,n){if(n&&\"2.0\"===n){const n=t(e);n.length>0&&console.warn(`WARNING: FDC3 2.0 has been set as a default option for Views in this Platform, but the required InteropBroker APIs for FDC3 2.0 compliance have not all been overridden.\\nThe following APIs need to be overridden:\\n${n.join(\"\\n\")}`)}},mr}function Cr(){return gr||(gr=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),i=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),i(function(){if(fr)return Ti;fr=1;var e=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ti,\"__esModule\",{value:!0}),Ti.InteropModule=void 0;const t=e(n),i=$i,r=d,o=Vi(),a=wr(),c=vr(),h=Tn,l=e=>new e,u=\"You have attempted to use or modify InteropBroker parameters, which is not allowed. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.\";class p extends r.Base{async init(e,n=l){this.wire.sendAction(\"interop-init\").catch((()=>{}));const r=await this.wire.environment.getInteropInfo(this.wire.getFin()),s=(0,i.createUnusableObject)(u),a=(0,i.createWarningObject)(u,(0,t.default)(r)),d=async()=>{throw new Error(u)},p=o.InteropBroker.createClosedConstructor(this.wire,(()=>this.fin.InterApplicationBus.Channel.create(`interop-broker-${e}`)),r);let w;return w=Array.isArray(n)?new((0,h.overrideFromComposables)(...n)(p))(s,d,a):await n(p,s,d,a),(0,c.overrideCheck)(w,r.fdc3Version),w}connectSync(e,t){return this.wire.sendAction(\"interop-connect-sync\").catch((()=>{})),new a.InteropClient(this.wire,this.wire.environment.whenReady().then((()=>this.fin.InterApplicationBus.Channel.connect(`interop-broker-${e}`,{payload:t}))))}}return Ti.InteropModule=p,Ti}(),e),i(wr(),e),i(Vi(),e)}(Li)),Li}var br={},Ir={},Er={},xr={};Object.defineProperty(xr,\"__esModule\",{value:!0}),xr.getSnapshotSourceChannelName=void 0;xr.getSnapshotSourceChannelName=e=>`snapshot-source-provider-${e.uuid}`;var Ar,Pr,Mr,_r,Or,Sr=s&&s.__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},Rr=s&&s.__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)};Object.defineProperty(Er,\"__esModule\",{value:!0}),Er.SnapshotSource=void 0;const Fr=d,jr=xr,kr=new Map;class Lr extends Fr.Base{constructor(e,t){super(e),Ar.set(this,void 0),Pr.set(this,(()=>(kr.has(this.identity.uuid)||kr.set(this.identity.uuid,{eventFired:null,clientPromise:null}),kr.get(this.identity.uuid)))),Mr.set(this,(()=>(Rr(this,Pr,\"f\").call(this).clientPromise||(Rr(this,Pr,\"f\").call(this).clientPromise=Rr(this,_r,\"f\").call(this)),Rr(this,Pr,\"f\").call(this).clientPromise))),_r.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);try{Rr(this,Pr,\"f\").call(this).eventFired||await Rr(this,Or,\"f\").call(this);const t=await this.fin.InterApplicationBus.Channel.connect(e,{wait:!1});return t.onDisconnection((()=>{Rr(this,Pr,\"f\").call(this).clientPromise=null,Rr(this,Pr,\"f\").call(this).eventFired=null})),t}catch(e){throw Rr(this,Pr,\"f\").call(this).clientPromise=null,new Error(\"The targeted SnapshotSource is not currently initialized. Await this object's ready() method.\")}})),Or.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);let t,n;const i=new Promise(((e,i)=>{t=e,n=i}));Rr(this,Pr,\"f\").call(this).eventFired=i;const r=async i=>{try{i.channelName===e&&(t(),await this.fin.InterApplicationBus.Channel.removeListener(\"connected\",r))}catch(e){n(e)}};await this.fin.InterApplicationBus.Channel.on(\"connected\",r)})),Sr(this,Ar,t,\"f\")}get identity(){return Rr(this,Ar,\"f\")}async ready(){this.wire.sendAction(\"snapshot-source-ready\").catch((e=>{}));try{await Rr(this,Mr,\"f\").call(this)}catch(e){await Rr(this,Pr,\"f\").call(this).eventFired}}async getSnapshot(){this.wire.sendAction(\"snapshot-source-get-snapshot\").catch((e=>{}));const e=await Rr(this,Mr,\"f\").call(this),t=await e.dispatch(\"get-snapshot\");return(await t).snapshot}async applySnapshot(e){this.wire.sendAction(\"snapshot-source-apply-snapshot\").catch((e=>{}));return(await Rr(this,Mr,\"f\").call(this)).dispatch(\"apply-snapshot\",{snapshot:e})}}Er.SnapshotSource=Lr,Ar=new WeakMap,Pr=new WeakMap,Mr=new WeakMap,_r=new WeakMap,Or=new WeakMap,Object.defineProperty(Ir,\"__esModule\",{value:!0}),Ir.SnapshotSourceModule=void 0;const Tr=d,$r=Er,Br=xr;class Gr extends Tr.Base{async init(e){if(this.wire.sendAction(\"snapshot-source-init\").catch((e=>{})),\"object\"!=typeof e||\"function\"!=typeof e.getSnapshot||\"function\"!=typeof e.applySnapshot)throw new Error(\"you must pass in a valid SnapshotProvider\");const t=await this.fin.InterApplicationBus.Channel.create((0,Br.getSnapshotSourceChannelName)(this.fin.me));t.register(\"get-snapshot\",(async()=>({snapshot:await e.getSnapshot()}))),t.register(\"apply-snapshot\",(({snapshot:t})=>e.applySnapshot(t)))}wrapSync(e){return this.wire.sendAction(\"snapshot-source-wrap-sync\").catch((e=>{})),new $r.SnapshotSource(this.wire,e)}async wrap(e){return this.wire.sendAction(\"snapshot-source-wrap\").catch((e=>{})),this.wrapSync(e)}}Ir.SnapshotSourceModule=Gr,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Ir,e),n(Er,e)}(br),Object.defineProperty(a,\"__esModule\",{value:!0});var Wr=a.Fin=void 0;const Hr=t,Nr=c,Dr=ie(),Ur=Z(),Vr=de,zr=en,Kr=rn,qr=un,Jr=bn,Yr=J(),Zr=An,Qr=ki,Xr=Cr(),eo=br;class to extends Hr.EventEmitter{constructor(e){super(),this.wire=e,this.System=new Nr.System(e),this.Window=new Dr._WindowModule(e),this.Application=new Ur.ApplicationModule(e),this.InterApplicationBus=new Vr.InterApplicationBus(e),this.Clipboard=new zr.Clipboard(e),this.ExternalApplication=new Kr.ExternalApplicationModule(e),this.Frame=new qr._FrameModule(e),this.GlobalHotkey=new Jr.GlobalHotkey(e),this.Platform=new Zr.PlatformModule(e,this.InterApplicationBus.Channel),this.View=new Yr.ViewModule(e),this.Interop=new Xr.InteropModule(e),this.SnapshotSource=new eo.SnapshotSourceModule(e),e.registerFin(this),this.me=(0,Qr.getMe)(e),e.on(\"disconnected\",(()=>{this.emit(\"disconnected\")}))}}Wr=a.Fin=to;var no={},io={};function ro(e){return\"string\"==typeof e.manifestUrl}function oo(e){return ao(e)&&\"string\"==typeof e.address}function so(e){return oo(e)&&\"string\"==typeof e.token}function ao(e){return\"string\"==typeof e.uuid}function co(e){return e.runtime&&\"string\"==typeof e.runtime.version}function ho(e){return ao(e)&&co(e)}Object.defineProperty(io,\"__esModule\",{value:!0}),io.isInternalConnectConfig=io.isPortDiscoveryConfig=io.isNewConnectConfig=io.isConfigWithReceiver=io.isRemoteConfig=io.isExistingConnectConfig=io.isExternalConfig=void 0,io.isExternalConfig=ro,io.isExistingConnectConfig=oo,io.isRemoteConfig=so,io.isConfigWithReceiver=function(e){return\"object\"==typeof e.receiver&&so({...e,address:\"\"})},io.isNewConnectConfig=ho,io.isPortDiscoveryConfig=function(e){return ro(e)&&co(e)||ho(e)},io.isInternalConnectConfig=function(e){return oo(e)||ho(e)};var lo={},uo={};Object.defineProperty(uo,\"__esModule\",{value:!0}),uo.EmitterMap=void 0;const po=t;function wo(e){return Buffer.from(e).toString(\"base64\")}uo.EmitterMap=class{constructor(){this.storage=new Map}hashKeys(e){return e.map(wo).join(\"/\")}getOrCreate(e){const t=this.hashKeys(e);return this.storage.has(t)||this.storage.set(t,new po.EventEmitter),this.storage.get(t)}has(e){return this.storage.has(this.hashKeys(e))}delete(e){const t=this.hashKeys(e);return this.storage.delete(t)}},Object.defineProperty(lo,\"__esModule\",{value:!0});const yo=uo;class fo extends yo.EmitterMap{constructor(){super(...arguments),this.dispatchEvent=e=>{if(function(e){return\"process-desktop-event\"===e.action}(e)){const{payload:t}=e,n=function(e){const{topic:t}=e;if(\"frame\"===t||\"window\"===t||\"view\"===t){const{uuid:n,name:i}=e;return[t,n,i]}if(\"application\"===t){const{uuid:n}=e;return[t,n]}return[t]}(t);if(this.has(n))return this.getOrCreate(n).emit(t.type,t),!0}return!1}}}lo.default=fo;var go,mo,vo=s&&s.__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},Co=s&&s.__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)},bo=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(no,\"__esModule\",{value:!0});var Io=no.Transport=void 0;const Eo=t,xo=io,Ao=g,Po=bo(lo),Mo=ki,_o=ke;class Oo extends Eo.EventEmitter{constructor(e,t,n){super(),this.wireListeners=new Map,this.topicRefMap=new Map,this.eventAggregator=new Po.default,this.messageHandlers=[this.eventAggregator.dispatchEvent],go.set(this,void 0),mo.set(this,void 0),this.connectSync=()=>{Co(this,go,\"f\").connectSync()},this.getPort=()=>Co(this,go,\"f\").getPort(),vo(this,go,new e(this.onmessage.bind(this)),\"f\"),this.environment=t,this.sendRaw=Co(this,go,\"f\").send.bind(Co(this,go,\"f\")),this.registerMessageHandler(this.handleMessage.bind(this)),Co(this,go,\"f\").on(\"disconnected\",(()=>{for(const[,{handleNack:e}]of this.wireListeners)e({reason:\"Remote connection has closed\"});this.wireListeners.clear(),this.emit(\"disconnected\")}));const{uuid:i,name:r}=n,o=this.environment.getCurrentEntityType();this.me=(0,Mo.getBaseMe)(o,i,r)}getFin(){if(!Co(this,mo,\"f\"))throw new Error(\"No Fin object registered for this transport\");return Co(this,mo,\"f\")}registerFin(e){if(Co(this,mo,\"f\"))throw new Error(\"Fin object has already been registered for this transport\");vo(this,mo,e,\"f\")}shutdown(){return Co(this,go,\"f\").shutdown()}async connect(e){if((0,xo.isConfigWithReceiver)(e))return await Co(this,go,\"f\").connect(e.receiver),this.authorize(e);if((0,xo.isRemoteConfig)(e))return this.connectRemote(e);if((0,xo.isExistingConnectConfig)(e))return this.connectByPort(e);if((0,xo.isNewConnectConfig)(e)){const t=await this.environment.retrievePort(e);return this.connectByPort({...e,address:`ws://localhost:${t}`})}}async connectRemote(e){return await Co(this,go,\"f\").connect(new(this.environment.getWsConstructor())(e.address)),this.authorize(e)}async connectByPort(e){const{address:t,uuid:n}=e,i={...e,type:\"file-token\"},r=Co(this,go,\"f\");await r.connect(new(this.environment.getWsConstructor())(e.address));const o=await this.sendAction(\"request-external-authorization\",{uuid:n,type:\"file-token\"},!0);if(\"external-authorization-response\"!==o.action)throw new Ao.UnexpectedActionError(o.action);return await this.environment.writeToken(o.payload.file,o.payload.token),this.authorize(i)}async authorize(e){const t=await this.sendAction(\"request-authorization\",e,!0);if(\"authorization-response\"!==t.action)throw new Ao.UnexpectedActionError(t.action);if(!0!==t.payload.success)throw new Ao.RuntimeError(t.payload)}sendAction(e,t={},n=!1){let i=()=>{};const r=Ao.RuntimeError.getCallSite(1),o=this.environment.getNextMessageId(),s=new Promise(((s,a)=>{i=a;const c={action:e,payload:t,messageId:o},d=Co(this,go,\"f\");return this.addWireListener(o,s,(e=>this.nackHandler(e,a,r)),n),d.send(c).catch(a)}));return Object.assign(s,{cancel:i,messageId:o})}nackHandler(e,t,n){t(\"string\"==typeof e?e:new Ao.RuntimeError(e,n))}ferryAction(e){return new Promise(((t,n)=>{const i=this.environment.getNextMessageId();e.messageId=i;const r=e=>{t(e.payload)};return Co(this,go,\"f\").send(e).then((()=>this.addWireListener(i,r,(e=>this.nackHandler(e,n)),!1))).catch(n)}))}registerMessageHandler(e){this.messageHandlers.push(e)}addWireListener(e,t,n,i){i?this.uncorrelatedListener=t:this.wireListeners.has(e)?n({reason:\"Duplicate handler id\",error:(0,_o.errorToPOJO)(new Ao.DuplicateCorrelationError(String(e)))}):this.wireListeners.set(e,{resolve:t,handleNack:n})}onmessage(e){for(const t of this.messageHandlers)t.call(null,e)}handleMessage(e){const t=e.correlationId||NaN;if(\"correlationId\"in e){if(!this.wireListeners.has(t))return!1;{const{resolve:n,handleNack:i}=this.wireListeners.get(t);\"ack\"!==e.action?i({reason:\"Did not receive ack action\",error:(0,_o.errorToPOJO)(new Ao.NoAckError(e.action))}):\"payload\"in e?e.payload.success?n.call(null,e):i(e.payload):\"string\"==typeof e.reason?i(e):(console.warn(\"Received invalid response from core\",e),i({reason:\"invalid response shape\"})),this.wireListeners.delete(t)}}else this.uncorrelatedListener&&this.uncorrelatedListener.call(null,e),this.uncorrelatedListener=()=>{};return!0}}Io=no.Transport=Oo,go=new WeakMap,mo=new WeakMap;const So=(...e)=>({log:(...t)=>console.debug(`[${(new Date).toISOString()}]`,...(e=>e.map((e=>`[${e}]`)))(e),...t),getLogger:(...t)=>So(...e,...t)}),Ro=So(\"@openfin/core-web/client\");function Fo(e,t){if(!function(e){return\"string\"==typeof e}(e))throw new Error(`Property ${t} has invalid type. Expected string, got ${typeof e}.`)}const jo=\"web-broker-ports-ready\",ko=Ro.getLogger(\"get-web-interop-ports\");function Lo(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)}function To(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}\"function\"==typeof SuppressedError&&SuppressedError;const $o=e=>{var n,i,r;return r=class extends t.EventEmitter{constructor(t){super(),n.set(this,void 0),i.set(this,!1),this.connectSync=()=>{Lo(this,i,\"f\")||(e.addEventListener(\"message\",(e=>{e.data?.topic?.startsWith(\"wire-message\")&&e.data.message&&Lo(this,n,\"f\").call(this,{...JSON.parse(e.data.message),ports:e.ports})})),e.start())},this.connect=async()=>{this.connectSync()},this.send=t=>(e.postMessage({topic:\"wire-message\",message:JSON.stringify(t)}),Promise.resolve()),this.shutdown=async()=>{e.close()},To(this,n,t,\"f\")}getPort(){return e}},n=new WeakMap,i=new WeakMap,r};var Bo={},Go={};Object.defineProperty(Go,\"__esModule\",{value:!0}),Go.BaseEnvironment=void 0;const Wo=vr();Go.BaseEnvironment=class{async getViewWindowIdentity(e,t){const{identity:n}=await e.View.wrapSync(t).getCurrentWindow();return n}async getInteropInfo(e){const t=await e.Application.getCurrentSync().getInfo().catch((()=>null)),n=t?.initialOptions?.interopBrokerConfiguration??{};return{fdc3Version:t?(0,Wo.getDefaultViewFdc3VersionFromAppInfo)(t):void 0,...n,fdc3Info:{providerVersion:await e.System.getVersion(),provider:\"OpenFin\"}}}},Object.defineProperty(Bo,\"__esModule\",{value:!0});var Ho=Bo.BrowserEnvironment=void 0;const No=Go;class Do extends No.BaseEnvironment{constructor(){super(...arguments),this.type=\"other\",this.getRandomId=()=>{const e=new Uint32Array(1);return window.crypto.getRandomValues(e)[0].toString(32)}}getAdapterVersionSync(){return\"\"}observeBounds(e,t){throw new Error(\"Method not implemented.\")}layoutAllowedInContext(e){return!1}initLayoutManager(e,t,n){throw new Error(\"Method not implemented.\")}applyLayoutSnapshot(e,t,n){throw new Error(\"Method not implemented.\")}createLayout(e,t){throw new Error(\"Method not implemented.\")}destroyLayout(e,t){throw new Error(\"Method not implemented.\")}resolveLayout(e,t){throw new Error(\"Method not implemented.\")}initPlatform(...e){throw new Error(\"Method not implemented.\")}writeToken(e,t){return Promise.resolve(\"\")}retrievePort(e){throw new Error(\"Method not implemented.\")}getNextMessageId(){return this.getRandomId()}createChildContent(e){throw new Error(\"Method not implemented.\")}getWebWindow(e){throw new Error(\"Method not implemented.\")}getCurrentEntityIdentity(){throw new Error(\"Method not implemented.\")}getCurrentEntityType(){return\"external connection\"}raiseEvent(e,t){throw new Error(\"Method not implemented.\")}getUrl(){return location.href}getDefaultChannelOptions(){return{create:{},connect:{}}}getRtcPeer(){return new RTCPeerConnection}getWsConstructor(){return WebSocket}whenReady(){return Promise.resolve()}}Ho=Bo.BrowserEnvironment=Do;const Uo=e=>\"platform\"in e&&void 0!==e.platform;var Vo,zo;class Ko extends Ho{constructor(e){super(),this.connectConfig=e,Vo.set(this,void 0),zo.set(this,new W((async()=>Promise.resolve().then((function(){return require(\"./main-b14f67c9.js\")}))))),Uo(e)&&this.validatePlatformOptions(e)}getAdapterVersionSync(){return\"0.39.21\"}validatePlatformOptions({platform:e}){if(!(\"layoutSnapshot\"in e))throw new Error(\"Platform options are missing layoutSnapshot. Please provide a layoutSnapshot in the platform options.\");if(\"windows\"in e||\"windows\"in e.layoutSnapshot)throw new Error(\"It appears you tried to call connect() with a snapshot object from an OpenFin desktop environment. Note that connect() expects to be called with a platform property with this structure: { platform: { layoutSnapshot } }. To get a layoutSnapshot of the expected structure, use fin.Platform.Layout.getCurrentLayoutManagerSync().getLayoutSnapshot() in v34+ in your desktop environment.\");const{layouts:t}=e.layoutSnapshot;Object.entries(t).map((([e,t])=>{if(\"object\"!=typeof t||null===t)throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must be an object.`);if(!(\"content\"in t))throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must contain a 'content' property.`)}))}async getInteropInfo(e){return{...{contextGroups:void 0,logging:{beforeAction:{enabled:!1},afterAction:{enabled:!1}}},fdc3Version:void 0,fdc3Info:{providerVersion:\"0.39.21\",provider:\"OpenFin Web\"}}}layoutAllowedInContext(e){return!0}async initLayoutManager(e,t,n){if(Lo(this,Vo,\"f\"))throw new Error(\"Layout already initialized.\");if(!Uo(this.connectConfig))throw new Error(\"Platform options are missing from connection config.\");const{WebLayoutEntryPoint:i}=await Lo(this,zo,\"f\").getValue();return To(this,Vo,new i(this.connectConfig),\"f\"),await Lo(this,Vo,\"f\").initLayoutManager(e,t,n)}async applyLayoutSnapshot(e,t,n){Lo(this,Vo,\"f\")?.applyLayoutSnapshot(e,t,n)}async createLayout(e,t){return Lo(this,Vo,\"f\")?.createLayout(e,t)}async destroyLayout(e,t){return Lo(this,Vo,\"f\")?.destroyLayout(e,t)}async getViewWindowIdentity(e,t){return Promise.resolve({uuid:t.uuid,name:t.uuid})}}Vo=new WeakMap,zo=new WeakMap;const qo=()=>{const e=((e,t)=>{const n=new RegExp(`^${t}<(?.*)>$`).exec(e)?.groups?.meta;if(n)try{return JSON.parse(atob(n))}catch(e){throw new Error(`Failed to decode JSON from ${n}.`)}})(window.name,\"of-frame\");if(e)try{const{name:t,uuid:n,brokerUrl:i,providerId:r,contextGroup:o}=e;return Fo(i,\"brokerUrl\"),Fo(n,\"uuid\"),Fo(t,\"name\"),{identity:{name:t,uuid:n},brokerUrl:i,interopConfig:{providerId:r,currentContextGroup:o}}}catch(e){throw new Error(`Unexpected error occurred when inferring platform information: ${e.stack}`)}},Jo=()=>{const e=r.v4();return{uuid:e,name:e}},Yo=async e=>{if(\"enabled\"===e.connectionInheritance){const t=await(async e=>{const t=qo();if(t){const{validateOptions:n=(()=>!0)}=e,{identity:i,...r}=t;if(!await n(r))throw new Error(\"Parent options were rejected by validateOptions.\");return t}})(e);if(t)return t}if(!e.options){const t=\"enabled\"===e.connectionInheritance?\"Broker URL was not specified nor provided by a platform container.\":\"Connection inheritance is disabled but no options were provided.\";throw new Error(t)}return{...e.options,identity:Jo()}};exports.__classPrivateFieldGet=Lo,exports.__classPrivateFieldSet=To,exports.apiExposer=Gn,exports.commonjsGlobal=s,exports.connect=async t=>{try{Ro.log(\"Establishing connection\",t);const{brokerUrl:n,identity:i,timeout:r,interopConfig:s}=await Yo(t),{workerPort:a,iframeBrokerPort:c}=await(async(e,t,n)=>{const{origin:i}=new URL(e),r=document.createElement(\"IFRAME\");let s;r.style.display=\"none\";try{return await new Promise(((a,c)=>{const d=e=>{if(e.source===r.contentWindow&&e.data?.topic===`ack-${jo}`){if(e.origin!==i)c(new Error(`Broker redirected to unexpected origin ${e.origin}, expected ${i}.`));else if(e.data.success){const[t,n]=e.ports;a({iframeBrokerPort:t,workerPort:n})}else c(new m(e.data));window.removeEventListener(\"message\",d),clearTimeout(s)}};window.addEventListener(\"message\",d),ko.log(`Connecting to broker ${e}`),r.setAttribute(\"src\",e),r.setAttribute(\"name\",o(t,\"of-broker\")),document.body.appendChild(r),ko.log(\"Iframe loaded, awaiting init message from iframe\"),n&&(s=setTimeout((()=>{window.removeEventListener(\"message\",d),document.body.removeChild(r),c(new Error(\"Worker did not initialize in time\"))}),n))}))}catch(e){throw new Error(`Failed to initialise Fin Web Client. ${e.message}`,{cause:e})}})(n,i,r);Ro.log(\"Successfully established connection to shared worker\");const d={entityType:\"external connection\",...i};a.start(),c.start();const h=((t,n,i)=>{const r=$o(n),o=new Ko(t),s=new Io(r,o,i);return s.connectSync(),window.Buffer=e.Buffer,new Wr(s)})(t,a,d);return s?.providerId&&(h.me.interop=h.Interop.connectSync(s.providerId),s?.currentContextGroup&&h.me.interop.joinContextGroup(s.currentContextGroup).catch((e=>{console.warn(`Error joining specified context group: ${s?.currentContextGroup}, continuing`,e)}))),{...h,me:{...h.me,identity:{uuid:h.me.uuid,name:h.me.name}}}}catch(e){throw new Error(`An error occured during web-interop connection: ${e.message}`)}},exports.decorators=Nn,exports.encodeOptions=o,exports.layout_constants=ai,exports.lazy=G;\n","\"use strict\";var t=require(\"./main-8cad4070.js\"),e=require(\"uuid\");require(\"buffer/\"),require(\"events\"),require(\"lodash/cloneDeep\"),require(\"lodash/isEqual\");var i={},n={};Object.defineProperty(n,\"__esModule\",{value:!0}),n.mapValuesAsync=n.mapEntriesAsync=void 0;const o=(t,[e,i])=>({...t,[e]:i});async function s(t,e){return(await Promise.all(e.map((async([e,i])=>[e,await t(i,e)])))).reduce(o,{})}n.mapEntriesAsync=s,n.mapValuesAsync=async function(t,e){let i;return i=e instanceof Map?[...e.entries()]:Object.entries(e),s(t,i)};var r,a,l,h,d=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldSet||function(t,e,i,n,o){if(\"m\"===n)throw new TypeError(\"Private method is not writable\");if(\"a\"===n&&!o)throw new TypeError(\"Private accessor was defined without a setter\");if(\"function\"==typeof e?t!==e||!o:!e.has(t))throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");return\"a\"===n?o.call(t,i):o?o.value=i:e.set(t,i),i},c=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldGet||function(t,e,i,n){if(\"a\"===i&&!n)throw new TypeError(\"Private accessor was defined without a getter\");if(\"function\"==typeof e?t!==e||!n:!e.has(t))throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");return\"m\"===i?n:\"a\"===i?n.call(t):n?n.value:e.get(t)};Object.defineProperty(i,\"__esModule\",{value:!0});var m=i.DefaultLayoutManager=void 0;const u=n;class p{constructor(t){a.set(this,void 0),l.set(this,new Map),d(this,a,t,\"f\")}size(){return c(this,l,\"f\").size}async applyLayoutSnapshot({layouts:t}){if(Object.keys(t).length>1)throw new Error(\"[LayoutManager] Tried to call applyLayoutSnapshot with more than 1 layout. When implementing multiple layouts via overridden LayoutManager class, you must override and fully implement the applyLayoutSnapshot method without calling super.applyLayoutSnapshot().\");const[[e,i]]=Object.entries(t);await p.createLayout(this,{layoutName:e,layout:i})}async showLayout({layoutName:t}){}async getLayoutSnapshot(){return{layouts:await(0,u.mapValuesAsync)((t=>t.getFrameSnapshot()),c(this,l,\"f\"))}}async removeLayout({layoutName:t}){}getLayoutIdentityForView(t){const e=[...c(this,l,\"f\").values()].find((e=>e.getCurrentViews().some((e=>e.name===t.name&&e.uuid===t.uuid))));return e?.identity??void 0}isLayoutVisible({layoutName:t}){return c(p,r,\"m\",h).call(p,this,t).isVisible()}resolveLayoutIdentity(t){if(t&&\"layoutName\"in t)return t;const e=[...c(this,l,\"f\").values()];if(1===e.length)return e[0].identity;const i=e.find((t=>t.isVisible()));return i?.identity??void 0}static async resolveLayout(t,e){const i=t.resolveLayoutIdentity(e);if(void 0===i||!(\"layoutName\"in i))throw new Error(\"[layout-manager] resolveLayout: Could not resolve the layout identity. Make sure you include 'layoutName' in the identity object.\");return c(p,r,\"m\",h).call(p,t,i.layoutName)}static async handleSharedView(t,e,i){await(0,u.mapValuesAsync)((async t=>{if(t.identity.layoutName!==e.layoutName){const e=t.getCurrentViews().find((t=>t.name===i.name));e&&await t.onViewDetached({viewIdentity:e,target:null}).catch(console.error)}}),c(t,l,\"f\"))}static async handleLastViewRemoved(t,e){await t.removeLayout(e),await c(t,a,\"f\").handleLastViewRemoved(t)}static async destroyLayout(t,{layoutName:e}){await c(p,r,\"m\",h).call(p,t,e).destroy(),c(t,l,\"f\").delete(e)}static async createLayout(t,e){const{layoutName:i}=e;if(c(t,l,\"f\").has(i))throw new Error(`Layout name ${i} already exists`);await c(t,a,\"f\").createLayout(e,t)}static registerLayout(t,e,i){c(t,l,\"f\").set(e,i)}static getAllLayouts(t){return[...c(t,l,\"f\").values()]}static setInitialSnapshot(t,e){c(t,a,\"f\").setInitialSnapshot(e)}static createClosedConstructor(...t){return class extends p{constructor(){super(...t)}}}}m=i.DefaultLayoutManager=p,r=p,a=new WeakMap,l=new WeakMap,h=function(t,e){const i=c(t,l,\"f\").get(e);if(!i)throw new Error(`[layout-manager] getLayoutByName: Could not locate layout with name '${e}'`);return i};var g={},f={},v={};Object.defineProperty(v,\"__esModule\",{value:!0}),v.ReversibleMap=void 0;v.ReversibleMap=class{constructor(){this.valueToKey=new Map,this.keyToValue=new Map,this.setUnique=(t,e)=>{if(this.hasKey(t)||this.hasValue(e))throw new Error(\"Key or value already in the map.\");this.keyToValue.set(t,e),this.valueToKey.set(e,t)},this.getKey=t=>{const e=this.valueToKey.get(t);if(!e)throw new Error(\"Value not found in the map.\");return e},this.deleteKey=t=>{const e=this.getValue(t);return this.keyToValue.delete(t),this.valueToKey.delete(e),e},this.deleteValue=t=>{const e=this.getKey(t);return this.keyToValue.delete(e),this.valueToKey.delete(t),e},this.hasKey=t=>this.keyToValue.has(t),this.hasValue=t=>this.valueToKey.has(t)}getValue(t){const e=this.keyToValue.get(t);if(!e)throw new Error(\"Key not found in the map.\");return e}},Object.defineProperty(f,\"__esModule\",{value:!0});var _=f.LayoutContentCache=void 0;const y=t.lazy,C=v;class w{constructor(){this.contentItemCache=new C.ReversibleMap,this.contentItemCacheId=0,this.createCacheKey=()=>{const t=`entity-${this.contentItemCacheId.toString()}`;return this.contentItemCacheId+=1,t},this.hasKey=t=>this.contentItemCache.hasKey(t),this.getItemOrUndefined=t=>{try{return this.getContentItemOrThrow(t)}catch(t){return}},this.getContentItemOrThrow=(t,e)=>{if(!this.contentItemCache.hasKey(t))throw new Error(\"Layout component has been destroyed or detached from the current layout.\");const i=this.contentItemCache.getValue(t);if(e&&!e.includes(i.type))throw new Error(`Layout item is not the expected type. Expected ${e.join(\", \")}, got ${i.type}.`);return i},this.getOrCreateEntityId=t=>{if(this.contentItemCache.hasValue(t))return this.contentItemCache.getKey(t);t.onDestroyed((()=>{this.contentItemCache.deleteValue(t)}));const e=this.createCacheKey();return this.contentItemCache.setUnique(e,t),e}}static getSingleInstance(){return w.singleton.getValue()}}_=f.LayoutContentCache=w,w.singleton=new y.Lazy((()=>new w));var I={},b={};!function(t){Object.defineProperty(t,\"__esModule\",{value:!0}),t.getAdjacentStacks=t.doShareEdge=t.getAdjacentItem=void 0;t.getAdjacentItem=(e,i)=>{const{parent:n}=e;if(e.isRoot()||!n)return;const o=[\"top\",\"bottom\"].includes(i)?\"column\":\"row\",s=[\"top\",\"left\"].includes(i)?-1:1;if(n.type===o){const t=n.contentItems.indexOf(e)+s;if(t>=0&&t{const n=t.getBounds(),o=e.getBounds();if(!n||!o)return!1;if([\"top\",\"bottom\"].includes(i)){return!(n.righto.right)}return!(n.bottomo.bottom)};t.getAdjacentStacks=(e,i)=>{const n=[\"top\",\"bottom\"].includes(i)?\"row\":\"column\",o=s=>\"stack\"===s.type?(0,t.doShareEdge)(e,s,i)?[s]:[]:\"root\"===s.type||\"ground\"===s.type?[]:s.type===n?s.contentItems.map((t=>o(t))).flat():s.type!==n?[\"top\",\"right\"].includes(i)?o(s.contentItems[s.contentItems.length-1]):o(s.contentItems[0]):[],s=(0,t.getAdjacentItem)(e,i);return s?o(s):[]}}(b);var S=t.commonjsGlobal&&t.commonjsGlobal.__decorate||function(t,e,i,n){var o,s=arguments.length,r=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if(\"object\"==typeof Reflect&&\"function\"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(s<3?o(r):s>3?o(e,i,r):o(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};Object.defineProperty(I,\"__esModule\",{value:!0}),I.LayoutEntitiesController=void 0;const E=t.decorators,x=b,L=i;class z{constructor(t,e,i){this.wire=t,this.layoutManager=e,this.layoutContentCache=i,this.analytics=t=>{this.wire.sendAction(`layout-controller-${t}`).catch((()=>{}))},this.getLayoutIdentityForViewOrThrow=async t=>{const e=this.layoutManager.getLayoutIdentityForView(t);if(!e)throw new Error(`View identity ${t.name} is not attached to any layouts.`);return e},this.getRoot=async t=>{this.analytics(\"get-root\");const e=(await this.getLayout(t)).getRoot();return{type:e.type,entityId:this.layoutContentCache.getOrCreateEntityId(e)}},this.getStackByView=async t=>{this.analytics(\"get-stack-by-view\");const e=await this.getLayoutIdentityForViewOrThrow(t),i=(await this.getLayout(e)).getStackByView(t);if(\"stack\"===i?.type)return{entityId:this.layoutContentCache.getOrCreateEntityId(i),type:\"stack\"}},this.getStackViews=t=>{this.analytics(\"get-stack-views\");return this.layoutContentCache.getContentItemOrThrow(t,[\"stack\"]).contentItems.map((t=>({name:t.viewName,uuid:this.wire.me.uuid})))},this.isRoot=t=>{this.analytics(\"is-root\");return this.layoutContentCache.getContentItemOrThrow(t).isRoot()},this.exists=t=>(this.analytics(\"exists\"),this.layoutContentCache.hasKey(t)),this.addViewToStack=async(t,e,{index:i}={index:0})=>{this.analytics(\"add-view-to-stack\");const n=this.layoutContentCache.getContentItemOrThrow(t);if(i&&i>n.contentItems.length+1)throw new Error(`Index '${i}' out of range, please exclude the index or specify a number between 0 and ${n.contentItems.length}`);const o={id:t,index:i},{identity:s}=await n.layout.platformCreateView(e,{location:o});return s},this.findViewInStack=(t,e)=>t.contentItems.find((t=>t.viewName===e.name)),this.removeViewFromStack=async(t,e)=>{this.analytics(\"remove-view-from-stack\");const i=this.layoutContentCache.getContentItemOrThrow(t,[\"stack\"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to remove a view ('${e.name}') which does not belong to the stack.`);await n.layout.platformCloseView(e)},this.createAdjacentStack=async(t,e,{position:i=\"right\"}={})=>{if(this.analytics(\"create-adjacent-stack\"),!Array.isArray(e)||0===e.length)throw new Error('The parameter \"views\" must be an array with at least 1 element.');if(![\"top\",\"bottom\",\"left\",\"right\"].includes(i))throw new Error(`Invalid position '${i}' specified.`);const n=this.layoutContentCache.getContentItemOrThrow(t).createAdjacentStack({position:i}),o=this.layoutContentCache.getOrCreateEntityId(n);return await Promise.all(e.reverse().map((t=>this.addViewToStack(o,t)))),o},this.getAdjacentStacks=async({targetId:t,edge:e})=>{this.analytics(\"get-adjacent-stacks\");const i=this.layoutContentCache.getContentItemOrThrow(t);return(0,x.getAdjacentStacks)(i,e).map((t=>({entityId:this.layoutContentCache.getOrCreateEntityId(t)})))},this.setStackActiveView=async(t,e)=>{this.analytics(\"set-stack-active-view\");const i=this.layoutContentCache.getContentItemOrThrow(t,[\"stack\"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to set a view ('${e.name}') as active when it does not belong to the stack.`);i.setActiveContentItem(n,!0)}}async getLayout(t){const e=await L.DefaultLayoutManager.resolveLayout(this.layoutManager,t);if(!e)throw new Error(`Could not resolve target layout identity ${JSON.stringify(t)}`);return e}getContent(t){this.analytics(\"get-content\");return this.layoutContentCache.getContentItemOrThrow(t,[\"column\",\"row\"]).contentItems.map((t=>({type:t.type,entityId:this.layoutContentCache.getOrCreateEntityId(t)})))}getParent(t){this.analytics(\"get-parent\");const e=this.layoutContentCache.getContentItemOrThrow(t);if(!e.isRoot())return e.parent?.contentItems.includes(e)?{type:e.parent.type,entityId:this.layoutContentCache.getOrCreateEntityId(e.parent)}:void 0}}S([(0,E.expose)()],z.prototype,\"getLayoutIdentityForViewOrThrow\",void 0),S([(0,E.expose)()],z.prototype,\"getRoot\",void 0),S([(0,E.expose)()],z.prototype,\"getStackByView\",void 0),S([(0,E.expose)()],z.prototype,\"getStackViews\",void 0),S([(0,E.expose)()],z.prototype,\"getContent\",null),S([(0,E.expose)()],z.prototype,\"getParent\",null),S([(0,E.expose)()],z.prototype,\"isRoot\",void 0),S([(0,E.expose)()],z.prototype,\"exists\",void 0),S([(0,E.expose)()],z.prototype,\"addViewToStack\",void 0),S([(0,E.expose)()],z.prototype,\"removeViewFromStack\",void 0),S([(0,E.expose)()],z.prototype,\"createAdjacentStack\",void 0),S([(0,E.expose)()],z.prototype,\"getAdjacentStacks\",void 0),S([(0,E.expose)()],z.prototype,\"setStackActiveView\",void 0),I.LayoutEntitiesController=z,Object.defineProperty(g,\"__esModule\",{value:!0});var M=g.initLayoutEndpoints=void 0;const P=t.apiExposer,T=t.layout_constants,A=f,k=I,D=i;M=g.initLayoutEndpoints=async function(t,e){const i=t.getFin(),n=await i.Platform.getCurrentSync().getClient(),o=new P.ChannelsExposer(n);await new P.ApiExposer(o).exposeInstance(new k.LayoutEntitiesController(t,e,A.LayoutContentCache.getSingleInstance()),{id:T.LAYOUT_CONTROLLER_ID}),await async function(t,e){const i=t=>async i=>{const n=await D.DefaultLayoutManager.resolveLayout(e,i.target);if(!n)throw new Error(`Could not resolve the layout target from payload ${JSON.stringify(i)}`);return t(n,i)},n=(e,n)=>{t.register(e,i(n))},o=(t,e)=>{n(t,e)};n(\"replace-view\",((t,e)=>t.replaceView(e))),n(\"replace-layout\",((t,{layout:e})=>t.replaceLayout(e))),n(\"add-view\",((t,e)=>t.insertView(e))),o(\"layout-add-view\",((t,{viewOptions:e,location:i,targetView:n})=>t.platformCreateView(e,{location:i,targetView:n}))),n(\"close-view\",((t,e)=>t.cleanupView(e.viewIdentity))),o(\"layout-close-view\",((t,e)=>t.platformCloseView(e.viewIdentity))),n(\"apply-preset-layout\",((t,e)=>t.applyPreset(e))),n(\"get-layout-views\",(t=>t.getCurrentViews())),n(\"get-frame-snapshot\",(t=>t.getFrameSnapshot())),n(\"is-visible\",(t=>t.isVisible())),n(\"destroy\",(t=>t.destroy())),t.register(\"get-layout-snapshot\",(()=>e.getLayoutSnapshot()))}(n,e)};var R={};Object.defineProperty(R,\"__esModule\",{value:!0});var U=R.BaseLayout=void 0;U=R.BaseLayout=class{};var O={};Object.defineProperty(O,\"__esModule\",{value:!0});var V=O.DOMEmitter=void 0;V=O.DOMEmitter=class{constructor(t){this.container=t}dispatchLocalEvent(t,e){const i={...e,type:t,tabSelector:`tab-${e.name}`,containerSelector:`container-${e.name}`,topic:\"openfin-DOM-event\"};this.container.dispatchEvent(new CustomEvent(t,{detail:i}))}};var B={};Object.defineProperty(B,\"__esModule\",{value:!0});var H=B.mapLayoutContentItemsImmutableSync=B.mapLayoutContentItemsImmutable=W=B.isVisible=void 0;var W=B.isVisible=t=>(0!==t.offsetWidth||0!==t.offsetHeight)&&\"hidden\"!==window.getComputedStyle(t).visibility&&t.offsetTop>=0&&t.offsetLeft>=0&&t.offsetTop<=window.innerHeight&&t.offsetLeft<=window.innerWidth;const F=t=>\"type\"in t&&\"component\"===t.type;B.mapLayoutContentItemsImmutable=async function t(e,i){return F(i)?e(i):{...i,content:await Promise.all(i.content?.map((i=>t(e,i))))}},H=B.mapLayoutContentItemsImmutableSync=function t(e,i){return F(i)?e(i):{...i,content:i.content?.map((i=>t(e,i)))}};class N extends Error{constructor(t,e){super(e),this.type=t}}class G extends N{constructor(t,e){super(\"Configuration\",t),this.node=e}}class j extends N{constructor(t){super(\"PopoutBlocked\",t)}}class $ extends N{constructor(t){super(\"API\",t)}}class Z extends N{constructor(t){super(\"Bind\",t)}}class q extends Error{constructor(t,e,i){super(`${t}: ${e}${void 0===i?\"\":\": \"+i}`)}}class X extends q{constructor(t,e){super(\"Assert\",t,e)}}class Y extends q{constructor(t,e,i){super(\"UnreachableCase\",t,`${e}${void 0===i?\"\":\": \"+i}`)}}class K extends q{constructor(t,e){super(\"UnexpectedNull\",t,e)}}class J extends q{constructor(t,e){super(\"UnexpectedUndefined\",t,e)}}var Q;!function(t){let e=!1;const i={PopoutCannotBeCreatedWithGroundItemConfig:{id:0,default:\"Popout cannot be created with ground ItemConfig\"},PleaseRegisterAConstructorFunction:{id:1,default:\"Please register a constructor function\"},ComponentTypeNotRegisteredAndBindComponentEventHandlerNotAssigned:{id:2,default:\"Component type not registered and BindComponentEvent handler not assigned\"},ComponentIsAlreadyRegistered:{id:3,default:\"Component is already registered\"},ComponentIsNotVirtuable:{id:4,default:\"Component is not virtuable. Requires rootHtmlElement field/getter\"},VirtualComponentDoesNotHaveRootHtmlElement:{id:5,default:'Virtual component does not have getter \"rootHtmlElement\"'},ItemConfigIsNotTypeComponent:{id:6,default:\"ItemConfig is not of type component\"},InvalidNumberPartInSizeString:{id:7,default:\"Invalid number part in size string\"},UnknownUnitInSizeString:{id:8,default:\"Unknown unit in size string\"},UnsupportedUnitInSizeString:{id:9,default:\"Unsupported unit in size string\"}};t.idCount=Object.keys(i).length;const n=Object.values(i);t.checkInitialise=function(){if(!e)for(let e=0;e=\"0\"&&t<=\"9\"}function Tt(t,e){const i=zt(e);t.style.width=i}function At(t,e){const i=zt(e);t.style.height=i}function kt(t){return{width:t.offsetWidth,height:t.offsetHeight}}function Dt(t,e){t.style.display=e?\"\":\"none\"}function Rt(t,e){if(void 0!==e)for(const i in e)if(e.hasOwnProperty(i)){const n=e[i],o=t[i];t[i]=Ut(o,n)}return t}function Ut(t,e){if(\"object\"!=typeof e)return e;if(Array.isArray(e)){const t=e.length,i=new Array(t);for(let n=0;n36)throw new Error(\"Too many keys in config minifier map\")},t.translateObject=n}(dt||(dt={})),function(t){t.defaults={type:at.ground,content:[],size:1,sizeUnit:ht.Fractional,minSize:void 0,minSizeUnit:ht.Pixel,id:\"\",isClosable:!0},t.createCopy=function(t,e){switch(t.type){case at.ground:case at.row:case at.column:return gt.createCopy(t,e);case at.stack:return ut.createCopy(t,e);case at.component:return pt.createCopy(t);default:throw new Y(\"CICC91354\",t.type,\"Invalid Config Item type specified\")}},t.createDefault=function(t){switch(t){case at.ground:throw new X(\"CICCDR91562\");case at.row:case at.column:return gt.createDefault(t);case at.stack:return ut.createDefault();case at.component:return pt.createDefault();default:throw new Y(\"CICCDD91563\",t,\"Invalid Config Item type specified\")}},t.isComponentItem=function(t){return t.type===at.component},t.isStackItem=function(t){return t.type===at.stack},t.isGroundItem=function(t){return t.type===at.ground}}(ct||(ct={})),function(t){t.defaultMaximised=!1,function(t){t.createCopy=function(t,e){return void 0===t?void 0:{show:null!=e?e:t.show,popout:t.popout,close:t.close,maximise:t.maximise,minimise:t.minimise,tabDropdown:t.tabDropdown}}}(t.Header||(t.Header={}))}(mt||(mt={})),function(t){function e(t){const e=t.length,i=new Array(e);for(let n=0;n\"__glMaximised\"===t));t>0&&(o=!0,n=n.splice(t,1)),e=n.length>0?n[0]:ct.defaults.id}else e=n;return i=void 0!==t.maximised?t.maximised:o,{id:e,maximised:i}}}(wt||(wt={})),function(t){function e(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0;return{resolved:!0,root:Et.resolve(i),openPopouts:t.resolveOpenPopouts(e.openPopouts),dimensions:t.Dimensions.resolve(e.dimensions),settings:t.Settings.resolve(e.settings),header:t.Header.resolve(e.header,e.settings,e.labels)}}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:Lt.fromResolvedArray(e.openPopouts),settings:_t.Settings.createCopy(e.settings),dimensions:t.Dimensions.fromResolved(e.dimensions),header:_t.Header.createCopy(e.header)}},t.isResolved=function(t){const e=t;return void 0!==e.resolved&&!0===e.resolved},t.resolveOpenPopouts=function(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0,{root:Et.resolve(o),openPopouts:xt.resolveOpenPopouts(e.openPopouts),dimensions:xt.Dimensions.resolve(e.dimensions),settings:xt.Settings.resolve(e.settings),header:xt.Header.resolve(e.header,e.settings,e.labels),parentId:null!==(i=e.parentId)&&void 0!==i?i:null,indexInParent:null!==(n=e.indexInParent)&&void 0!==n?n:null,window:t.Window.resolve(e.window,e.dimensions),resolved:!0}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:i(e.openPopouts),dimensions:xt.Dimensions.fromResolved(e.dimensions),settings:_t.Settings.createCopy(e.settings),header:_t.Header.createCopy(e.header),parentId:e.parentId,indexInParent:e.indexInParent,window:t.Window.fromResolved(e.window)}},t.fromResolvedArray=i}(Lt||(Lt={}));class Wt{constructor(){this._allEventSubscriptions=[],this._subscriptionsMap=new Map,this.unbind=this.removeEventListener,this.trigger=this.emit}tryBubbleEvent(t,e){}emit(t,...e){let i=this._subscriptionsMap.get(t);if(void 0!==i){i=i.slice();for(let t=0;t0){const n=e.slice();n.unshift(t);const o=this._allEventSubscriptions.slice();for(let t=0;t0?n.contentItems[0]:n,e=0);const o=this._layoutManager.createAndInitContentItem(i,t);t.addChild(o,e),this._layoutManager.layoutConfig.settings.popInOnClose?this._onClose():this.close()}createWindow(){const t=this.createUrl(),e=Math.floor(1e6*Math.random()).toString(36),i=this.serializeWindowFeatures({width:this._initialWindowSize.width,height:this._initialWindowSize.height,innerWidth:this._initialWindowSize.width,innerHeight:this._initialWindowSize.height,menubar:\"no\",toolbar:\"no\",location:\"no\",personalbar:\"no\",resizable:\"yes\",scrollbars:\"no\",status:\"no\"});if(this._popoutWindow=globalThis.open(t,e,i),this._popoutWindow)this._popoutWindow.addEventListener(\"load\",(()=>this.positionWindow()),{passive:!0}),this._popoutWindow.addEventListener(\"beforeunload\",(()=>{this._layoutManager.layoutConfig.settings.popInOnClose?this.popIn():this._onClose()}),{passive:!0}),this._checkReadyInterval=setInterval((()=>this.checkReady()),10);else if(!0===this._layoutManager.layoutConfig.settings.blockedPopoutsThrowError){throw new j(\"Popout blocked\")}}checkReady(){if(null===this._popoutWindow)throw new K(\"BPCR01844\");this._popoutWindow.__glInstance&&this._popoutWindow.__glInstance.isInitialised&&(this.onInitialised(),void 0!==this._checkReadyInterval&&(clearInterval(this._checkReadyInterval),this._checkReadyInterval=void 0))}serializeWindowFeatures(t){const e=[];for(const i in t)e.push(i+\"=\"+t[i].toString());return e.join(\",\")}createUrl(){const t=\"gl-window-config-\"+Ot(),e=_t.minifyConfig(this._config);try{localStorage.setItem(t,JSON.stringify(e))}catch(t){throw new Error(\"Error while writing to localStorage \"+function(t){return t instanceof Error?t.message:\"string\"==typeof t?t:\"Unknown Error\"}(t))}const i=new URL(location.href);return i.searchParams.set(\"gl-window\",t),i.toString()}positionWindow(){if(null===this._popoutWindow)throw new Error(\"BrowserPopout.positionWindow: null popoutWindow\");this._popoutWindow.moveTo(this._initialWindowSize.left,this._initialWindowSize.top),this._popoutWindow.focus()}onInitialised(){this._isInitialised=!0,this.getGlInstance().on(\"popIn\",(()=>this.popIn())),this.emit(\"initialised\")}_onClose(){setTimeout((()=>this.emit(\"closed\")),50)}}class Gt extends Wt{constructor(t,e,i,n){super(),this.layoutManager=t,this._parent=i,this._element=n,this._popInParentIds=[],this._type=e.type,this._id=e.id,this._isInitialised=!1,this.isGround=!1,this.isRow=!1,this.isColumn=!1,this.isStack=!1,this.isComponent=!1,this.size=e.size,this.sizeUnit=e.sizeUnit,this.minSize=e.minSize,this.minSizeUnit=e.minSizeUnit,this._isClosable=e.isClosable,this._pendingEventPropagations={},this._throttledEvents=[\"stateChanged\"],this._contentItems=this.createContentItems(e.content)}get type(){return this._type}get id(){return this._id}set id(t){this._id=t}get popInParentIds(){return this._popInParentIds}get parent(){return this._parent}get contentItems(){return this._contentItems}get isClosable(){return this._isClosable}get element(){return this._element}get isInitialised(){return this._isInitialised}static isStack(t){return t.isStack}static isComponentItem(t){return t.isComponent}static isComponentParentableItem(t){return t.isStack||t.isGround}removeChild(t,e=!1){const i=this._contentItems.indexOf(t);if(-1===i)throw new Error(\"Can't remove child item. Unknown content item\");if(e||this._contentItems[i].destroy(),this._contentItems.splice(i,1),this._contentItems.length>0)this.updateSize(!1);else if(!this.isGround&&!0===this._isClosable){if(null===this._parent)throw new K(\"CIUC00874\");this._parent.removeChild(this)}}addChild(t,e,i){return null!=e||(e=this._contentItems.length),this._contentItems.splice(e,0,t),t.setParent(this),!0===this._isInitialised&&!1===t._isInitialised&&t.init(),e}replaceChild(t,e,i=!1){const n=this._contentItems.indexOf(t),o=t._element.parentNode;if(-1===n)throw new X(\"CIRCI23232\",\"Can't replace child. oldChild is not child of this\");if(null===o)throw new K(\"CIRCP23232\");if(o.replaceChild(e._element,t._element),!0===i&&(t._parent=null,t.destroy()),this._contentItems[n]=e,e.setParent(this),e.size=t.size,e.sizeUnit=t.sizeUnit,e.minSize=t.minSize,e.minSizeUnit=t.minSizeUnit,null===e._parent)throw new K(\"CIRCNC45699\");!0===e._parent._isInitialised&&!1===e._isInitialised&&e.init(),this.updateSize(!1)}remove(){if(null===this._parent)throw new K(\"CIR11110\");this._parent.removeChild(this)}popout(){const t=Ot(),e=this.layoutManager.createPopoutFromContentItem(this,void 0,t,void 0);return this.emitBaseBubblingEvent(\"stateChanged\"),e}calculateConfigContent(){const t=this._contentItems,e=t.length,i=new Array(e);for(let n=0;nthis.propagateEventToLayoutManager(t,e))))}propagateEventToLayoutManager(t,e){this._pendingEventPropagations[t]=!1,this.layoutManager.emitUnknown(t,e)}}class jt extends Gt{constructor(t,e,i){super(t,e,i,document.createElement(\"div\")),this._parentItem=i,this._focused=!1,this.isComponent=!0,this._reorderEnabled=e.reorderEnabled,this.applyUpdatableConfig(e),this._initialWantMaximise=e.maximised;const n=document.createElement(\"div\");n.classList.add(\"lm_content\"),this.element.appendChild(n),this._container=new Ft(e,this,t,n,(t=>this.handleUpdateItemConfigEvent(t)),(()=>this.show()),(()=>this.hide()),(t=>this.focus(t)),(t=>this.blur(t)))}get componentName(){return this._container.componentType}get componentType(){return this._container.componentType}get reorderEnabled(){return this._reorderEnabled}get initialWantMaximise(){return this._initialWantMaximise}get component(){return this._container.component}get container(){return this._container}get parentItem(){return this._parentItem}get headerConfig(){return this._headerConfig}get title(){return this._title}get tab(){return this._tab}get focused(){return this._focused}destroy(){this._container.destroy(),super.destroy()}applyUpdatableConfig(t){this.setTitle(t.title),this._headerConfig=t.header}toConfig(){const t=this._container.stateRequestEvent,e=void 0===t?this._container.state:t();return{type:at.component,content:[],size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,maximised:!1,isClosable:this.isClosable,reorderEnabled:this._reorderEnabled,title:this._title,header:mt.Header.createCopy(this._headerConfig),componentType:pt.copyComponentType(this.componentType),componentState:e}}close(){if(null===this.parent)throw new K(\"CIC68883\");this.parent.removeChild(this,!1)}enterDragMode(t,e){Tt(this.element,t),At(this.element,e),this._container.enterDragMode(t,e)}exitDragMode(){this._container.exitDragMode()}enterStackMaximised(){this._container.enterStackMaximised()}exitStackMaximised(){this._container.exitStackMaximised()}drag(){this._container.drag()}updateSize(t){this.updateNodeSize(t)}init(){this.updateNodeSize(!1),super.init(),this._container.emit(\"open\"),this.initContentItems()}setTitle(t){this._title=t,this.emit(\"titleChanged\",t),this.emit(\"stateChanged\")}setTab(t){this._tab=t,this.emit(\"tab\",t),this._container.setTab(t)}hide(){super.hide(),this._container.setVisibility(!1)}show(){super.show(),this._container.setVisibility(!0)}focus(t=!1){this.parentItem.setActiveComponentItem(this,!0,t)}setFocused(t){this._focused=!0,this.tab.setFocused(),t||this.emitBaseBubblingEvent(\"focus\")}blur(t=!1){this._focused&&this.layoutManager.setFocusedComponentItem(void 0,t)}setBlurred(t){this._focused=!1,this.tab.setBlurred(),t||this.emitBaseBubblingEvent(\"blur\")}setParent(t){this._parentItem=t,super.setParent(t)}handleUpdateItemConfigEvent(t){this.applyUpdatableConfig(t)}updateNodeSize(t){if(\"none\"!==this.element.style.display){const{width:e,height:i}=kt(this.element);this._container.setSizeToNodeSize(e,i,t)}}}class $t extends Gt{constructor(){super(...arguments),this._focused=!1}get focused(){return this._focused}setFocusedValue(t){this._focused=t}}class Zt extends Wt{constructor(t,e){super(),this._eElement=t,this._pointerTracking=!1,this._pointerDownEventListener=t=>this.onPointerDown(t),this._pointerMoveEventListener=t=>this.onPointerMove(t),this._pointerUpEventListener=t=>this.onPointerUp(t),this._timeout=void 0,this._allowableTargets=[t,...e],this._oDocument=document,this._eBody=document.body,this._nDelay=1800,this._nDistance=10,this._nX=0,this._nY=0,this._nOriginalX=0,this._nOriginalY=0,this._dragging=!1,this._eElement.addEventListener(\"pointerdown\",this._pointerDownEventListener,{passive:!0})}destroy(){this.checkRemovePointerTrackingEventListeners(),this._eElement.removeEventListener(\"pointerdown\",this._pointerDownEventListener)}cancelDrag(){this.processDragStop(void 0)}onPointerDown(t){if(this._allowableTargets.includes(t.target)&&t.isPrimary){const e=this.getPointerCoordinates(t);this.processPointerDown(e)}}processPointerDown(t){this._nOriginalX=t.x,this._nOriginalY=t.y,this._oDocument.addEventListener(\"pointermove\",this._pointerMoveEventListener),this._oDocument.addEventListener(\"pointerup\",this._pointerUpEventListener,{passive:!0}),this._pointerTracking=!0,this._timeout=setTimeout((()=>{try{this.startDrag()}catch(t){throw console.error(t),t}}),this._nDelay)}onPointerMove(t){this._pointerTracking&&(this.processDragMove(t),t.preventDefault())}processDragMove(t){this._nX=t.pageX-this._nOriginalX,this._nY=t.pageY-this._nOriginalY,!1===this._dragging&&(Math.abs(this._nX)>this._nDistance||Math.abs(this._nY)>this._nDistance)&&this.startDrag(),this._dragging&&this.emit(\"drag\",this._nX,this._nY,t)}onPointerUp(t){this.processDragStop(t)}processDragStop(t){var e;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this.checkRemovePointerTrackingEventListeners(),!0===this._dragging&&(this._eBody.classList.remove(\"lm_dragging\"),this._eElement.classList.remove(\"lm_dragging\"),null===(e=this._oDocument.querySelector(\"iframe\"))||void 0===e||e.style.setProperty(\"pointer-events\",\"\"),this._dragging=!1,this.emit(\"dragStop\",t))}checkRemovePointerTrackingEventListeners(){this._pointerTracking&&(this._oDocument.removeEventListener(\"pointermove\",this._pointerMoveEventListener),this._oDocument.removeEventListener(\"pointerup\",this._pointerUpEventListener),this._pointerTracking=!1)}startDrag(){var t;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this._dragging=!0,this._eBody.classList.add(\"lm_dragging\"),this._eElement.classList.add(\"lm_dragging\"),null===(t=this._oDocument.querySelector(\"iframe\"))||void 0===t||t.style.setProperty(\"pointer-events\",\"none\"),this.emit(\"dragStart\",this._nOriginalX,this._nOriginalY)}getPointerCoordinates(t){return{x:t.pageX,y:t.pageY}}}class qt{constructor(t,e,i){this._isVertical=t,this._size=e,this._grabSize=i0){const i=this.createSplitter(Math.max(0,e-1)).element;e>0?(this.contentItems[e-1].element.insertAdjacentElement(\"afterend\",i),i.insertAdjacentElement(\"afterend\",t.element)):(this.contentItems[0].element.insertAdjacentElement(\"beforebegin\",i),i.insertAdjacentElement(\"beforebegin\",t.element))}else this._childElementContainer.appendChild(t.element);super.addChild(t,e);const n=1/this.contentItems.length*100;if(!0===i)return this.emitBaseBubblingEvent(\"stateChanged\"),e;for(let e=0;e0&&(this.calculateRelativeSizes(),this.setAbsoluteSizes()),this.emitBaseBubblingEvent(\"stateChanged\"),this.emit(\"resize\")}setAbsoluteSizes(){const t=this.calculateAbsoluteSizes();for(let e=0;e0&&t.itemSizes[e]++,this._isColumn?(Tt(this.contentItems[e].element,t.crossAxisSize),At(this.contentItems[e].element,t.itemSizes[e])):(Tt(this.contentItems[e].element,t.itemSizes[e]),At(this.contentItems[e].element,t.crossAxisSize))}calculateAbsoluteSizes(){const t=(this.contentItems.length-1)*this._splitterSize,{width:e,height:i}=kt(this.element);let n,o;this._isColumn?(n=i-t,o=e):(n=e-t,o=i);let s=0;const r=[];for(let t=0;t0){const n=100-t;for(let t=0;t100&&e.length>0){for(let t=0;te)return;{const r=i/e;let a=i;for(let e=0;ethis.onSplitterDrag(e,t,i))),e.on(\"dragStop\",(()=>this.onSplitterDragStop(e))),e.on(\"dragStart\",(()=>this.onSplitterDragStart(e))),this._splitter.splice(t,0,e),e}getSplitItems(t){const e=this._splitter.indexOf(t);return{before:this.contentItems[e],after:this.contentItems[e+1]}}calculateContentItemMinSize(t){const e=t.minSize;if(void 0!==e){if(t.minSizeUnit===ht.Pixel)return e;throw new X(\"ROCGMD98831\",JSON.stringify(t))}{const t=this.layoutManager.layoutConfig.dimensions;return this._isColumn?t.defaultMinItemHeight:t.defaultMinItemWidth}}calculateContentItemsTotalMinSize(t){let e=0;for(const i of t)e+=this.calculateContentItemMinSize(i);return e}onSplitterDragStart(t){const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=this.calculateContentItemsTotalMinSize(e.before.contentItems),s=this.calculateContentItemsTotalMinSize(e.after.contentItems);this._splitterPosition=0,this._splitterMinPosition=-1*(i-o),this._splitterMaxPosition=n-s}onSplitterDrag(t,e,i){let n=this._isColumn?i:e;if(null===this._splitterMinPosition||null===this._splitterMaxPosition)throw new K(\"ROCOSD59226\");n=Math.max(n,this._splitterMinPosition),n=Math.min(n,this._splitterMaxPosition),this._splitterPosition=n;const o=zt(n);this._isColumn?t.element.style.top=o:t.element.style.left=o}onSplitterDragStop(t){if(null===this._splitterPosition)throw new K(\"ROCOSDS66932\");{const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=(this._splitterPosition+i)/(i+n),s=e.before.size+e.after.size;e.before.size=o*s,e.after.size=(1-o)*s,t.element.style.top=zt(0),t.element.style.left=zt(0),globalThis.requestAnimationFrame((()=>this.updateSize(!1)))}}}!function(t){t.getElementDimensionSize=function(t,e){return\"width\"===e?function(t){return t.offsetWidth}(t):function(t){return t.offsetHeight}(t)},t.setElementDimensionSize=function(t,e,i){return\"width\"===e?Tt(t,i):At(t,i)},t.createElement=function(t,e){const i=t.createElement(\"div\");return i.classList.add(\"lm_item\"),e?i.classList.add(\"lm_column\"):i.classList.add(\"lm_row\"),i}}(Xt||(Xt={}));class Yt extends $t{constructor(t,e,i){super(t,vt.create(e),null,Yt.createElement(document)),this.isGround=!0,this._childElementContainer=this.element,this._containerElement=i;let n=null;for(;;){const t=n?n.previousSibling:this._containerElement.lastChild;if(!(t instanceof Element&&t.classList.contains(\"lm_content\")))break;n=t}this._containerElement.insertBefore(this.element,n)}init(){if(!0!==this.isInitialised){this.updateNodeSize();for(let t=0;t0?this.contentItems[0]:this,n.isComponent)throw new Error(\"Cannot add item as child to ComponentItem\");{const t=this.layoutManager.createAndInitContentItem(i,n);return e=n.addChild(t,e),n===this?-1:e}}loadComponentAsRoot(t){this.clearRoot();const e=Ct.resolve(t,!1);if(e.maximised)throw new Error(\"Root Component cannot be maximised\");{const t=new jt(this.layoutManager,e,this);t.init(),this.addChild(t,0)}}addChild(t,e){if(this.contentItems.length>0)throw new Error(\"Ground node can only have a single child\");return this._childElementContainer.appendChild(t.element),e=super.addChild(t,e),this.updateSize(!1),this.emitBaseBubblingEvent(\"stateChanged\"),e}calculateConfigContent(){const t=this.contentItems,e=t.length,i=new Array(e);for(let n=0;n0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e)),this.updateContentItemsSize(!1))}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}createSideAreas(){const t=Yt.Area.oppositeSides,e=new Array(Object.keys(t).length);let i=0;for(const n in t){const o=n,s=this.getElementArea();if(null===s)throw new K(\"RCSA77553\");s.side=o,\"2\"===t[o][1]?s[o]=s[t[o]]-50:s[o]=s[t[o]]+50,s.surface=(s.x2-s.x1)*(s.y2-s.y1),e[i++]=s}return e}highlightDropZone(t,e,i){this.layoutManager.tabDropPlaceholder.remove(),super.highlightDropZone(t,e,i)}onDrop(t,e){if(t.isComponent){const e=ut.createDefault(),i=t;e.header=mt.Header.createCopy(i.headerConfig);const n=this.layoutManager.createAndInitContentItem(e,this);n.addChild(t),t=n}if(0===this.contentItems.length)this.addChild(t);else{if(t.type===at.row||t.type===at.column){const e=ut.createDefault(),i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}const i=\"x\"==e.side[0]?at.row:at.column,n=\"2\"==e.side[1],o=this.contentItems[0];if(o instanceof Xt&&o.type===i){const e=o.contentItems[n?0:o.contentItems.length-1];o.addChild(t,n?0:void 0,!0),e.size*=.5,t.size=e.size,t.sizeUnit=ht.Percent,o.updateSize(!1)}else{const e=ct.createDefault(i),s=this.layoutManager.createContentItem(e,this);this.replaceChild(o,s),s.addChild(t,n?0:void 0,!0),s.addChild(o,n?void 0:0,!0),o.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}}dock(){throw new X(\"GID87731\")}validateDocking(){throw new X(\"GIVD87732\")}getAllContentItems(){const t=[this];return this.deepGetAllContentItems(this.contentItems,t),t}getConfigMaximisedItems(){const t=[];return this.deepFilterContentItems(this.contentItems,t,(t=>!(!Gt.isStack(t)||!t.initialWantMaximise)||!(!Gt.isComponentItem(t)||!t.initialWantMaximise))),t}getItemsByPopInParentId(t){const e=[];return this.deepFilterContentItems(this.contentItems,e,(e=>e.popInParentIds.includes(t))),e}toConfig(){throw new Error(\"Cannot generate GroundItem config\")}setActiveComponentItem(t,e,i){}updateNodeSize(){const{width:t,height:e}=kt(this._containerElement);Tt(this.element,t),At(this.element,e),this.contentItems.length>0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e))}deepGetAllContentItems(t,e){for(let i=0;ithis.onClick(t),this._touchStartEventListener=t=>this.onTouchStart(t),this._element=document.createElement(\"div\"),this._element.classList.add(i),this._element.title=e,this._header.on(\"destroy\",(()=>this.destroy())),this._element.addEventListener(\"click\",this._clickEventListener,{passive:!0}),this._element.addEventListener(\"touchstart\",this._touchStartEventListener,{passive:!0}),this._header.controlsContainerElement.appendChild(this._element)}get element(){return this._element}destroy(){var t;this._element.removeEventListener(\"click\",this._clickEventListener),this._element.removeEventListener(\"touchstart\",this._touchStartEventListener),null===(t=this._element.parentNode)||void 0===t||t.removeChild(this._element)}onClick(t){this._pushEvent(t)}onTouchStart(t){this._pushEvent(t)}}class Jt{constructor(t,e,i,n,o){var s;this._layoutManager=t,this._componentItem=e,this._closeEvent=i,this._focusEvent=n,this._dragStartEvent=o,this._isActive=!1,this._tabClickListener=t=>this.onTabClickDown(t),this._tabTouchStartListener=t=>this.onTabTouchStart(t),this._closeClickListener=()=>this.onCloseClick(),this._closeTouchStartListener=()=>this.onCloseTouchStart(),this._dragStartListener=(t,e)=>this.onDragStart(t,e),this._contentItemDestroyListener=()=>this.onContentItemDestroy(),this._tabTitleChangedListener=t=>this.setTitle(t),this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_tab\"),this._titleElement=document.createElement(\"span\"),this._titleElement.classList.add(\"lm_title\"),this._closeElement=document.createElement(\"div\"),this._closeElement.classList.add(\"lm_close_tab\"),this._element.appendChild(this._titleElement),this._element.appendChild(this._closeElement),e.isClosable?this._closeElement.style.display=\"\":this._closeElement.style.display=\"none\",this.setTitle(e.title),this._componentItem.on(\"titleChanged\",this._tabTitleChangedListener);(null!==(s=e.reorderEnabled)&&void 0!==s?s:this._layoutManager.layoutConfig.settings.reorderEnabled)&&this.enableReorder(),this._element.addEventListener(\"click\",this._tabClickListener,{passive:!0}),this._element.addEventListener(\"touchstart\",this._tabTouchStartListener,{passive:!0}),this._componentItem.isClosable?(this._closeElement.addEventListener(\"click\",this._closeClickListener,{passive:!0}),this._closeElement.addEventListener(\"touchstart\",this._closeTouchStartListener,{passive:!0})):(this._closeElement.remove(),this._closeElement=void 0),this._componentItem.setTab(this),this._layoutManager.emit(\"tabCreated\",this)}get isActive(){return this._isActive}get componentItem(){return this._componentItem}get contentItem(){return this._componentItem}get element(){return this._element}get titleElement(){return this._titleElement}get closeElement(){return this._closeElement}get reorderEnabled(){return void 0!==this._dragListener}set reorderEnabled(t){t!==this.reorderEnabled&&(t?this.enableReorder():this.disableReorder())}setTitle(t){this._titleElement.innerText=t,this._element.title=t}setActive(t){t!==this._isActive&&(this._isActive=t,t?this._element.classList.add(\"lm_active\"):this._element.classList.remove(\"lm_active\"))}destroy(){var t,e;this._closeEvent=void 0,this._focusEvent=void 0,this._dragStartEvent=void 0,this._element.removeEventListener(\"click\",this._tabClickListener),this._element.removeEventListener(\"touchstart\",this._tabTouchStartListener),null===(t=this._closeElement)||void 0===t||t.removeEventListener(\"click\",this._closeClickListener),null===(e=this._closeElement)||void 0===e||e.removeEventListener(\"touchstart\",this._closeTouchStartListener),this._componentItem.off(\"titleChanged\",this._tabTitleChangedListener),this.reorderEnabled&&this.disableReorder(),this._element.remove()}setBlurred(){this._element.classList.remove(\"lm_focused\"),this._titleElement.classList.remove(\"lm_focused\")}setFocused(){this._element.classList.add(\"lm_focused\"),this._titleElement.classList.add(\"lm_focused\")}onDragStart(t,e){if(void 0===this._dragListener)throw new J(\"TODSDLU10093\");if(void 0===this._dragStartEvent)throw new J(\"TODS23309\");this._dragStartEvent(t,e,this._dragListener,this.componentItem)}onContentItemDestroy(){void 0!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=void 0)}onTabClickDown(t){const e=t.target;e!==this._element&&e!==this._titleElement||(0===t.button?this.notifyFocus():1===t.button&&this._componentItem.isClosable&&this.notifyClose())}onTabTouchStart(t){t.target===this._element&&this.notifyFocus()}onCloseClick(){this.notifyClose()}onCloseTouchStart(){this.notifyClose()}notifyClose(){if(void 0===this._closeEvent)throw new J(\"TNC15007\");this._closeEvent(this._componentItem)}notifyFocus(){if(void 0===this._focusEvent)throw new J(\"TNA15007\");this._focusEvent(this._componentItem)}enableReorder(){this._dragListener=new Zt(this._element,[this._titleElement]),this._dragListener.on(\"dragStart\",this._dragStartListener),this._componentItem.on(\"destroy\",this._contentItemDestroyListener)}disableReorder(){if(void 0===this._dragListener)throw new J(\"TDR87745\");this._componentItem.off(\"destroy\",this._contentItemDestroyListener),this._dragListener.off(\"dragStart\",this._dragStartListener),this._dragListener=void 0}}class Qt{constructor(t,e,i,n,o){this._layoutManager=t,this._componentRemoveEvent=e,this._componentFocusEvent=i,this._componentDragStartEvent=n,this._dropdownActiveChangedEvent=o,this._tabs=[],this._lastVisibleTabIndex=-1,this._dropdownActive=!1,this._element=document.createElement(\"section\"),this._element.classList.add(\"lm_tabs\"),this._dropdownElement=document.createElement(\"section\"),this._dropdownElement.classList.add(\"lm_tabdropdown_list\"),this._dropdownElement.style.display=\"none\"}get tabs(){return this._tabs}get tabCount(){return this._tabs.length}get lastVisibleTabIndex(){return this._lastVisibleTabIndex}get element(){return this._element}get dropdownElement(){return this._dropdownElement}get dropdownActive(){return this._dropdownActive}destroy(){for(let t=0;tthis.handleTabCloseEvent(t)),(t=>this.handleTabFocusEvent(t)),((t,e,i,n)=>this.handleTabDragStartEvent(t,e,i,n)));void 0===e&&(e=this._tabs.length),this._tabs.splice(e,0,i),ethis._lastVisibleTabIndex){const t=this._tabs[e];for(let t=e;t>0;t--)this._tabs[t]=this._tabs[t-1];this._tabs[0]=t}}updateTabSizes(t,e){let i=!1;this.tryUpdateTabSizes(i,t,e)||(i=!0,this.tryUpdateTabSizes(i,t,e)),i!==this._dropdownActive&&(this._dropdownActive=i,this._dropdownActiveChangedEvent())}tryUpdateTabSizes(t,e,i){if(this._tabs.length>0){if(void 0===i)throw new Error(\"non-empty tabs must have active component item\");let n=0,o=!1;const s=this._layoutManager.layoutConfig.settings.tabOverlapAllowance,r=this._tabs.indexOf(i.tab),a=this._tabs[r];this._lastVisibleTabIndex=-1;for(let i=0;ie){if(o)i===r&&(l.style.zIndex=\"auto\",l.style.marginLeft=\"\",l.parentElement!==this._element&&this._element.appendChild(l));else{let t;if(t=r>0&&r<=i?(d-e)/(i-1):(d-e)/i,tthis.onClick(t),this._touchStartListener=t=>this.onTouchStart(t),this._rowColumnClosable=!0,this._closeButton=null,this._popoutButton=null,this._tabsContainer=new Qt(this._layoutManager,(t=>this.handleTabInitiatedComponentRemoveEvent(t)),(t=>this.handleTabInitiatedComponentFocusEvent(t)),((t,e,i,n)=>this.handleTabInitiatedDragStartEvent(t,e,i,n)),(()=>this.processTabDropdownActiveChanged())),this._show=i.show,this._popoutEnabled=i.popoutEnabled,this._popoutLabel=i.popoutLabel,this._maximiseEnabled=i.maximiseEnabled,this._maximiseLabel=i.maximiseLabel,this._minimiseEnabled=i.minimiseEnabled,this._minimiseLabel=i.minimiseLabel,this._closeEnabled=i.closeEnabled,this._closeLabel=i.closeLabel,this._tabDropdownEnabled=i.tabDropdownEnabled,this._tabDropdownLabel=i.tabDropdownLabel,this.setSide(i.side),this._canRemoveComponent=this._configClosable,this._element=document.createElement(\"section\"),this._element.classList.add(\"lm_header\"),this._controlsContainerElement=document.createElement(\"section\"),this._controlsContainerElement.classList.add(\"lm_controls\"),this._element.appendChild(this._tabsContainer.element),this._element.appendChild(this._controlsContainerElement),this._element.appendChild(this._tabsContainer.dropdownElement),this._element.addEventListener(\"click\",this._clickListener,{passive:!0}),this._element.addEventListener(\"touchstart\",this._touchStartListener,{passive:!0}),this._documentMouseUpListener=()=>this._tabsContainer.hideAdditionalTabsDropdown(),globalThis.document.addEventListener(\"mouseup\",this._documentMouseUpListener,{passive:!0}),this._tabControlOffset=this._layoutManager.layoutConfig.settings.tabControlOffset,this._tabDropdownEnabled&&(this._tabDropdownButton=new Kt(this,this._tabDropdownLabel,\"lm_tabdropdown\",(()=>this._tabsContainer.showAdditionalTabsDropdown()))),this._popoutEnabled&&(this._popoutButton=new Kt(this,this._popoutLabel,\"lm_popout\",(()=>this.handleButtonPopoutEvent()))),this._maximiseEnabled&&(this._maximiseButton=new Kt(this,this._maximiseLabel,\"lm_maximise\",(t=>this.handleButtonMaximiseToggleEvent(t)))),this._configClosable&&(this._closeButton=new Kt(this,this._closeLabel,\"lm_close\",(()=>s()))),this.processTabDropdownActiveChanged()}get show(){return this._show}get side(){return this._side}get leftRightSided(){return this._leftRightSided}get layoutManager(){return this._layoutManager}get parent(){return this._parent}get tabs(){return this._tabsContainer.tabs}get lastVisibleTabIndex(){return this._tabsContainer.lastVisibleTabIndex}get element(){return this._element}get tabsContainerElement(){return this._tabsContainer.element}get controlsContainerElement(){return this._controlsContainerElement}destroy(){this.emit(\"destroy\"),this._popoutEvent=void 0,this._maximiseToggleEvent=void 0,this._clickEvent=void 0,this._touchStartEvent=void 0,this._componentRemoveEvent=void 0,this._componentFocusEvent=void 0,this._componentDragStartEvent=void 0,this._tabsContainer.destroy(),globalThis.document.removeEventListener(\"mouseup\",this._documentMouseUpListener),this._element.remove()}createTab(t,e){this._tabsContainer.createTab(t,e)}removeTab(t){this._tabsContainer.removeTab(t)}processActiveComponentChanged(t){this._tabsContainer.processActiveComponentChanged(t),this.updateTabSizes()}setSide(t){this._side=t,this._leftRightSided=[nt.right,nt.left].includes(this._side)}setRowColumnClosable(t){this._rowColumnClosable=t,this.updateClosability()}updateClosability(){let t;if(this._configClosable)if(this._rowColumnClosable){t=!0;const e=this.tabs.length;for(let i=0;i1}applyFocusedValue(t){t?this._element.classList.add(\"lm_focused\"):this._element.classList.remove(\"lm_focused\")}processMaximised(){if(void 0===this._maximiseButton)throw new J(\"HPMAX16997\");this._maximiseButton.element.setAttribute(\"title\",this._minimiseLabel)}processMinimised(){if(void 0===this._maximiseButton)throw new J(\"HPMIN16997\");this._maximiseButton.element.setAttribute(\"title\",this._maximiseLabel)}updateTabSizes(){if(this._tabsContainer.tabCount>0){const t=this._show?this._layoutManager.layoutConfig.dimensions.headerHeight:0;let e;this._leftRightSided?(this._element.style.height=\"\",this._element.style.width=zt(t)):(this._element.style.width=\"\",this._element.style.height=zt(t)),e=this._leftRightSided?this._element.offsetHeight-this._controlsContainerElement.offsetHeight-this._tabControlOffset:this._element.offsetWidth-this._controlsContainerElement.offsetWidth-this._tabControlOffset,this._tabsContainer.updateTabSizes(e,this._getActiveComponentItemEvent())}}handleTabInitiatedComponentRemoveEvent(t){if(this._canRemoveComponent){if(void 0===this._componentRemoveEvent)throw new J(\"HHTCE22294\");this._componentRemoveEvent(t)}}handleTabInitiatedComponentFocusEvent(t){if(void 0===this._componentFocusEvent)throw new J(\"HHTAE22294\");this._componentFocusEvent(t)}handleTabInitiatedDragStartEvent(t,e,i,n){if(this._canRemoveComponent){if(void 0===this._componentDragStartEvent)throw new J(\"HHTDSE22294\");this._componentDragStartEvent(t,e,i,n)}else i.cancelDrag()}processTabDropdownActiveChanged(){void 0!==this._tabDropdownButton&&Dt(this._tabDropdownButton.element,this._tabsContainer.dropdownActive)}handleButtonPopoutEvent(){if(this._layoutManager.layoutConfig.settings.popoutWholeStack){if(void 0===this._popoutEvent)throw new J(\"HHBPOE17834\");this._popoutEvent()}else{const t=this._getActiveComponentItemEvent();t&&t.popout()}}handleButtonMaximiseToggleEvent(t){if(void 0===this._maximiseToggleEvent)throw new J(\"HHBMTE16834\");this._maximiseToggleEvent()}onClick(t){t.target===this._element&&this.notifyClick(t)}onTouchStart(t){t.target===this._element&&this.notifyTouchStart(t)}notifyClick(t){if(void 0===this._clickEvent)throw new J(\"HNHC46834\");this._clickEvent(t)}notifyTouchStart(t){if(void 0===this._touchStartEvent)throw new J(\"HNHTS46834\");this._touchStartEvent(t)}}class ee extends $t{constructor(t,e,i){var n,o,s,r,a,l,h,d,c,m,u,p,g,f,v,_,y,C,w;super(t,e,i,ee.createElement(document)),this._headerSideChanged=!1,this._resizeListener=()=>this.handleResize(),this._maximisedListener=()=>this.handleMaximised(),this._minimisedListener=()=>this.handleMinimised(),this._headerConfig=e.header;const I=t.layoutConfig.header,b=e.content;let S;if(1!==b.length)S=void 0;else{S=b[0].header}this._initialWantMaximise=e.maximised,this._initialActiveItemIndex=null!==(n=e.activeItemIndex)&&void 0!==n?n:0;const E=null!==(r=null!==(s=null===(o=this._headerConfig)||void 0===o?void 0:o.show)&&void 0!==s?s:null==S?void 0:S.show)&&void 0!==r?r:I.show,x=null!==(h=null!==(l=null===(a=this._headerConfig)||void 0===a?void 0:a.popout)&&void 0!==l?l:null==S?void 0:S.popout)&&void 0!==h?h:I.popout,L=null!==(m=null!==(c=null===(d=this._headerConfig)||void 0===d?void 0:d.maximise)&&void 0!==c?c:null==S?void 0:S.maximise)&&void 0!==m?m:I.maximise,z=null!==(g=null!==(p=null===(u=this._headerConfig)||void 0===u?void 0:u.close)&&void 0!==p?p:null==S?void 0:S.close)&&void 0!==g?g:I.close,M=null!==(_=null!==(v=null===(f=this._headerConfig)||void 0===f?void 0:f.minimise)&&void 0!==v?v:null==S?void 0:S.minimise)&&void 0!==_?_:I.minimise,P=null!==(w=null!==(C=null===(y=this._headerConfig)||void 0===y?void 0:y.tabDropdown)&&void 0!==C?C:null==S?void 0:S.tabDropdown)&&void 0!==w?w:I.tabDropdown;this._maximisedEnabled=!1!==L;const T={show:!1!==E,side:!1===E?nt.top:E,popoutEnabled:!1!==x,popoutLabel:!1===x?\"\":x,maximiseEnabled:this._maximisedEnabled,maximiseLabel:!1===L?\"\":L,closeEnabled:!1!==z,closeLabel:!1===z?\"\":z,minimiseEnabled:!0,minimiseLabel:M,tabDropdownEnabled:!1!==P,tabDropdownLabel:!1===P?\"\":P};this._header=new te(t,this,T,e.isClosable&&!1!==z,(()=>this.getActiveComponentItem()),(()=>this.remove()),(()=>this.handlePopoutEvent()),(()=>this.toggleMaximise()),(t=>this.handleHeaderClickEvent(t)),(t=>this.handleHeaderTouchStartEvent(t)),(t=>this.handleHeaderComponentRemoveEvent(t)),(t=>this.handleHeaderComponentFocusEvent(t)),((t,e,i,n)=>this.handleHeaderComponentStartDragEvent(t,e,i,n))),this.isStack=!0,this._childElementContainer=document.createElement(\"section\"),this._childElementContainer.classList.add(\"lm_items\"),this.on(\"resize\",this._resizeListener),this._maximisedEnabled&&(this.on(\"maximised\",this._maximisedListener),this.on(\"minimised\",this._minimisedListener)),this.element.appendChild(this._header.element),this.element.appendChild(this._childElementContainer),this.setupHeaderPosition(),this._header.updateClosability()}get childElementContainer(){return this._childElementContainer}get header(){return this._header}get headerShow(){return this._header.show}get headerSide(){return this._header.side}get headerLeftRightSided(){return this._header.leftRightSided}get contentAreaDimensions(){return this._contentAreaDimensions}get initialWantMaximise(){return this._initialWantMaximise}get isMaximised(){return this===this.layoutManager.maximisedStack}get stackParent(){if(!this.parent)throw new Error(\"Stack should always have a parent\");return this.parent}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}init(){if(!0===this.isInitialised)return;this.updateNodeSize();for(let t=0;t0){if(this._initialActiveItemIndex<0||this._initialActiveItemIndex>=e)throw new Error(`ActiveItemIndex out of range: ${this._initialActiveItemIndex} id: ${this.id}`);for(let i=0;ithis.contentItems.length)throw e-=1,new X(\"SAC99728\");if(t instanceof jt)return e=super.addChild(t,e),this._childElementContainer.appendChild(t.element),this._header.createTab(t,e),this.setActiveComponentItem(t,i),this._header.updateTabSizes(),this.updateSize(!1),t.container.setBaseLogicalZIndex(),this._header.updateClosability(),this.emitStateChangedEvent(),e;throw new X(\"SACC88532\")}removeChild(t,e){const i=t,n=this.contentItems.indexOf(i),o=1===this.contentItems.length;if(this._activeComponentItem===i&&(i.focused&&i.blur(),!o)){const t=0===n?1:n-1;this.setActiveComponentItem(this.contentItems[t],!1)}this._header.removeTab(i),super.removeChild(i,e),o||this._header.updateClosability(),this.emitStateChangedEvent()}toggleMaximise(){this.isMaximised?this.minimise():this.maximise()}maximise(){if(!this.isMaximised){this.layoutManager.setMaximisedStack(this);const t=this.contentItems,e=t.length;for(let i=0;i0&&void 0===t)throw new Error(\"expected non-empty stack to have an active component item\");return{type:\"stack\",content:this.calculateConfigContent(),size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,isClosable:this.isClosable,maximised:this.isMaximised,header:this.createHeaderConfig(),activeItemIndex:t}}onDrop(t,e){if(\"header\"===this._dropSegment){if(this.resetHeaderDropZone(),void 0===this._dropIndex)throw new J(\"SODDI68990\");return void this.addChild(t,this._dropIndex)}if(\"body\"===this._dropSegment)return void this.addChild(t,0,!0);const i=\"top\"===this._dropSegment||\"bottom\"===this._dropSegment,n=\"left\"===this._dropSegment||\"right\"===this._dropSegment,o=\"top\"===this._dropSegment||\"left\"===this._dropSegment,s=i&&this.stackParent.isColumn||n&&this.stackParent.isRow;if(t.isComponent){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createAndInitContentItem(e,this);i.addChild(t),t=i}if(t.type===at.row||t.type===at.column){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}if(s){const e=this.stackParent.contentItems.indexOf(this);this.stackParent.addChild(t,o?e:e+1,!0),this.size*=.5,t.size=this.size,t.sizeUnit=this.sizeUnit,this.stackParent.updateSize(!1)}else{const e=i?at.column:at.row,n=ct.createDefault(e),s=this.layoutManager.createContentItem(n,this);this.stackParent.replaceChild(this,s),s.addChild(t,o?0:void 0,!0),s.addChild(this,o?void 0:0,!0),this.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}highlightDropZone(t,e){for(const i in this._contentAreaDimensions){const n=i,o=this._contentAreaDimensions[n].hoverArea;if(o.x1t&&o.y1e)return void(\"header\"===n?(this._dropSegment=\"header\",this.highlightHeaderDropZone(this._header.leftRightSided?e:t)):(this.resetHeaderDropZone(),this.highlightBodyDropZone(n)))}}getArea(){if(\"none\"===this.element.style.display)return null;const t=super.getElementArea(this._header.element),e=super.getElementArea(this._childElementContainer);if(null===t||null===e)throw new K(\"SGAHC13086\");const i=e.x2-e.x1,n=e.y2-e.y1;return this._contentAreaDimensions={header:{hoverArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2},highlightArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2}}},0===this.contentItems.length?(this._contentAreaDimensions.body={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2}},super.getElementArea(this.element)):(this._contentAreaDimensions.left={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x1+.25*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x1+.5*i,y2:e.y2}},this._contentAreaDimensions.top={hoverArea:{x1:e.x1+.25*i,y1:e.y1,x2:e.x1+.75*i,y2:e.y1+.5*n},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y1+.5*n}},this._contentAreaDimensions.right={hoverArea:{x1:e.x1+.75*i,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1+.5*i,y1:e.y1,x2:e.x2,y2:e.y2}},this._contentAreaDimensions.bottom={hoverArea:{x1:e.x1+.25*i,y1:e.y1+.5*n,x2:e.x1+.75*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1+.5*n,x2:e.x2,y2:e.y2}},super.getElementArea(this.element))}positionHeader(t){this._header.side!==t&&(this._header.setSide(t),this._headerSideChanged=!0,this.setupHeaderPosition())}updateNodeSize(){if(\"none\"!==this.element.style.display){const t=kt(this.element);if(this._header.show){t[this._header.leftRightSided?it.width:it.height]-=this.layoutManager.layoutConfig.dimensions.headerHeight}this._childElementContainer.style.width=zt(t.width),this._childElementContainer.style.height=zt(t.height);for(let e=0;e=o&&tthis.onDrag(t,e,i))),this._dragListener.on(\"dragStop\",(()=>this.onDrop())),this.createDragProxyElements(t,e),null===this._componentItem.parent)throw new K(\"DPC10097\");this._componentItemFocused=this._componentItem.focused,this._componentItemFocused&&this._componentItem.blur(),this._componentItem.parent.removeChild(this._componentItem,!0),this.setDimensions(),document.body.appendChild(this._element),this.determineMinMaxXY(),this._layoutManager.calculateItemAreas(),this.setDropPosition(t,e)}get element(){return this._element}createDragProxyElements(t,e){this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_dragProxy\");const i=document.createElement(\"div\");i.classList.add(\"lm_header\");const n=document.createElement(\"div\");n.classList.add(\"lm_tabs\");const o=document.createElement(\"div\");o.classList.add(\"lm_tab\");const s=document.createElement(\"span\");s.classList.add(\"lm_title\"),o.appendChild(s),n.appendChild(o),i.appendChild(n),this._proxyContainerElement=document.createElement(\"div\"),this._proxyContainerElement.classList.add(\"lm_content\"),this._element.appendChild(i),this._element.appendChild(this._proxyContainerElement),this._originalParent instanceof ee&&this._originalParent.headerShow&&(this._sided=this._originalParent.headerLeftRightSided,this._element.classList.add(\"lm_\"+this._originalParent.headerSide),[nt.right,nt.bottom].indexOf(this._originalParent.headerSide)>=0&&this._proxyContainerElement.insertAdjacentElement(\"afterend\",i)),this._element.style.left=zt(t),this._element.style.top=zt(e),o.setAttribute(\"title\",this._componentItem.title),s.insertAdjacentText(\"afterbegin\",this._componentItem.title),this._proxyContainerElement.appendChild(this._componentItem.element)}determineMinMaxXY(){const t=this._layoutManager.groundItem;if(void 0===t)throw new J(\"DPDMMXY73109\");{const e=t.element.getBoundingClientRect();this._minX=e.left+document.body.scrollLeft,this._minY=e.top+document.body.scrollTop,this._maxX=this._minX+e.width,this._maxY=this._minY+e.height}}onDrag(t,e,i){const n=i.pageX,o=i.pageY;this.setDropPosition(n,o),this._componentItem.drag()}setDropPosition(t,e){this._layoutManager.layoutConfig.settings.constrainDragToContainer&&(t<=this._minX?t=Math.ceil(this._minX):t>=this._maxX&&(t=Math.floor(this._maxX)),e<=this._minY?e=Math.ceil(this._minY):e>=this._maxY&&(e=Math.floor(this._maxY))),this._element.style.left=zt(t),this._element.style.top=zt(e),this._area=this._layoutManager.getArea(t,e),null!==this._area&&(this._lastValidArea=this._area,this._area.contentItem.highlightDropZone(t,e,this._area))}onDrop(){const t=this._layoutManager.dropTargetIndicator;if(null===t)throw new K(\"DPOD30011\");let e;if(t.hide(),this._componentItem.exitDragMode(),null!==this._area)e=this._componentItem,this._area.contentItem.onDrop(e,this._area);else if(null!==this._lastValidArea){e=this._componentItem;this._lastValidArea.contentItem.onDrop(e,this._lastValidArea)}else this._originalParent?(e=this._componentItem,this._originalParent.addChild(e)):this._componentItem.destroy();this._element.remove(),this._layoutManager.emit(\"itemDropped\",this._componentItem),this._componentItemFocused&&void 0!==e&&e.focus()}setDimensions(){const t=this._layoutManager.layoutConfig.dimensions;if(void 0===t)throw new Error(\"DragProxy.setDimensions: dimensions undefined\");let e=t.dragProxyWidth,i=t.dragProxyHeight;if(void 0===e||void 0===i)throw new Error(\"DragProxy.setDimensions: width and/or height undefined\");const n=!1===this._layoutManager.layoutConfig.header.show?0:t.headerHeight;this._element.style.width=zt(e),this._element.style.height=zt(i),e-=this._sided?n:0,i-=this._sided?0:n,this._proxyContainerElement.style.width=zt(e),this._proxyContainerElement.style.height=zt(i),this._componentItem.enterDragMode(e,i),this._componentItem.show()}}class ne{constructor(t,e,i,n,o,s,r){this._layoutManager=t,this._element=e,this._extraAllowableChildTargets=i,this._componentTypeOrFtn=n,this._componentState=o,this._title=s,this._id=r,this._dragListener=null,this._dummyGroundContainer=document.createElement(\"div\");const a=gt.createDefault(\"row\");this._dummyGroundContentItem=new Yt(this._layoutManager,a,this._dummyGroundContainer),this.createDragListener()}destroy(){this.removeDragListener()}createDragListener(){this.removeDragListener(),this._dragListener=new Zt(this._element,this._extraAllowableChildTargets),this._dragListener.on(\"dragStart\",((t,e)=>this.onDragStart(t,e))),this._dragListener.on(\"dragStop\",(()=>this.onDragStop()))}onDragStart(t,e){var i;const n=\"component\";let o;if(\"function\"==typeof this._componentTypeOrFtn){const t=this._componentTypeOrFtn();o=ne.isDragSourceComponentItemConfig(t)?{type:n,componentState:t.state,componentType:t.type,title:null!==(i=t.title)&&void 0!==i?i:this._title}:t}else o={type:n,componentState:this._componentState,componentType:this._componentTypeOrFtn,title:this._title,id:this._id};const s=bt.resolve(o,!1),r=new jt(this._layoutManager,s,this._dummyGroundContentItem);if(this._dummyGroundContentItem.contentItems.push(r),null===this._dragListener)throw new K(\"DSODSD66746\");{const i=new ie(t,e,this._dragListener,this._layoutManager,r,this._dummyGroundContentItem),n=this._layoutManager.transitionIndicator;if(null===n)throw new K(\"DSODST66746\");n.transitionElements(this._element,i.element)}}onDragStop(){this.createDragListener()}removeDragListener(){null!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=null)}}!function(t){t.isDragSourceComponentItemConfig=function(t){return!(\"componentType\"in t)}}(ne||(ne={}));class oe{constructor(){this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_dropTargetIndicator\");const t=document.createElement(\"div\");t.classList.add(\"lm_inner\"),this._element.appendChild(t),document.body.appendChild(this._element)}destroy(){this._element.remove()}highlightArea(t,e){this._element.style.left=zt(t.x1+e),this._element.style.top=zt(t.y1+e),this._element.style.width=zt(t.x2-t.x1-e),this._element.style.height=zt(t.y2-t.y1-e),this._element.style.display=\"block\"}hide(){Dt(this._element,!1)}}class se{constructor(){this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_transition_indicator\"),document.body.appendChild(this._element),this._toElement=null,this._fromDimensions=null,this._totalAnimationDuration=200,this._animationStartTime=null}destroy(){this._element.remove()}transitionElements(t,e){}nextAnimationFrame(){}measure(t){const e=t.getBoundingClientRect();return{left:e.left,top:e.top,width:t.offsetWidth,height:t.offsetHeight}}}class re extends Wt{constructor(t){super(),this._layoutManager=t,this._childEventListener=t=>this.onEventFromChild(t),globalThis.addEventListener(re.ChildEventName,this._childEventListener,{passive:!0})}emit(t,...e){\"userBroadcast\"===t?this.emitUserBroadcast(...e):super.emit(t,...e)}emitUserBroadcast(...t){this.handleUserBroadcastEvent(\"userBroadcast\",t)}destroy(){globalThis.removeEventListener(re.ChildEventName,this._childEventListener)}handleUserBroadcastEvent(t,e){this._layoutManager.isSubWindow?this.propagateToParent(t,e):this.propagateToThisAndSubtree(t,e)}onEventFromChild(t){const e=t.detail;this.handleUserBroadcastEvent(e.eventName,e.args)}propagateToParent(t,e){const i={bubbles:!0,cancelable:!0,detail:{layoutManager:this._layoutManager,eventName:t,args:e}},n=new CustomEvent(re.ChildEventName,i),o=globalThis.opener;if(null===o)throw new K(\"EHPTP15778\");o.dispatchEvent(n)}propagateToThisAndSubtree(t,e){this.emitUnknown(t,...e);for(let i=0;ithis.handleContainerResize())),this._windowBeforeUnloadListener=()=>this.onBeforeUnload(),this._windowBeforeUnloadListening=!1,this._maximisedStackBeforeDestroyedListener=t=>this.cleanupBeforeMaximisedStackDestroyed(t),this.isSubWindow=t.isSubWindow,this._constructorOrSubWindowLayoutConfig=t.constructorOrSubWindowLayoutConfig,Q.checkInitialise(),dt.checkInitialise(),void 0!==t.containerElement&&(this._containerElement=t.containerElement)}get container(){return this._containerElement}get isInitialised(){return this._isInitialised}get groundItem(){return this._groundItem}get root(){return this._groundItem}get openPopouts(){return this._openPopouts}get dropTargetIndicator(){return this._dropTargetIndicator}get transitionIndicator(){return this._transitionIndicator}get width(){return this._width}get height(){return this._height}get eventHub(){return this._eventHub}get rootItem(){if(void 0===this._groundItem)throw new Error(\"Cannot access rootItem before init\");return 0===this._groundItem.contentItems.length?void 0:this._groundItem.contentItems[0]}get focusedComponentItem(){return this._focusedComponentItem}get tabDropPlaceholder(){return this._tabDropPlaceholder}get maximisedStack(){return this._maximisedStack}get deprecatedConstructor(){return!this.isSubWindow&&void 0!==this._constructorOrSubWindowLayoutConfig}destroy(){if(this._isInitialised){this._windowBeforeUnloadListening&&(globalThis.removeEventListener(\"beforeunload\",this._windowBeforeUnloadListener),this._windowBeforeUnloadListening=!1),!0===this.layoutConfig.settings.closePopoutsOnUnload&&this.closeAllOpenPopouts(),this._resizeObserver.disconnect(),this.checkClearResizeTimeout(),void 0!==this._groundItem&&this._groundItem.destroy(),this._tabDropPlaceholder.remove(),null!==this._dropTargetIndicator&&this._dropTargetIndicator.destroy(),null!==this._transitionIndicator&&this._transitionIndicator.destroy(),this._eventHub.destroy();for(const t of this._dragSources)t.destroy();this._dragSources=[],this._isInitialised=!1}}minifyConfig(t){return _t.minifyConfig(t)}unminifyConfig(t){return _t.unminifyConfig(t)}init(){let t;if(this.setContainer(),this._dropTargetIndicator=new oe,this._transitionIndicator=new se,this.updateSizeFromContainer(),this.isSubWindow){if(void 0===this._constructorOrSubWindowLayoutConfig)throw new J(\"LMIU07155\");{const e=this._constructorOrSubWindowLayoutConfig.root;if(void 0===e)throw new X(\"LMIC07156\");if(!Ct.isComponent(e))throw new X(\"LMIC07157\");t=e;const i=xt.resolve(this._constructorOrSubWindowLayoutConfig);this.layoutConfig=Object.assign(Object.assign({},i),{root:void 0})}}else void 0===this._constructorOrSubWindowLayoutConfig?this.layoutConfig=_t.createDefault():this.layoutConfig=xt.resolve(this._constructorOrSubWindowLayoutConfig);const e=this.layoutConfig;this._groundItem=new Yt(this,e.root,this._containerElement),this._groundItem.init(),this.checkLoadedLayoutMaximiseItem(),this._resizeObserver.observe(this._containerElement),this._isInitialised=!0,this.adjustColumnsResponsive(),this.emit(\"initialised\"),void 0!==t&&this.loadComponentAsRoot(t)}loadLayout(t){if(!this.isInitialised)throw new Error(\"GoldenLayout: Need to call init() if LayoutConfig with defined root passed to constructor\");if(void 0===this._groundItem)throw new J(\"LMLL11119\");this.createSubWindows(),this.layoutConfig=xt.resolve(t),this._groundItem.loadRoot(this.layoutConfig.root),this.checkLoadedLayoutMaximiseItem(),this.adjustColumnsResponsive()}saveLayout(){if(!1===this._isInitialised)throw new Error(\"Can't create config, layout not yet initialised\");if(void 0===this._groundItem)throw new J(\"LMTC18244\");{const t=this._groundItem.calculateConfigContent();let e;e=1!==t.length?void 0:t[0],this.reconcilePopoutWindows();const i=[];for(let t=0;t=0?n=this._groundItem.contentItems[0]:e=0;break;case at.row:case at.column:e=n.addItem(t,i.index);break;case at.stack:if(Ct.isComponent(t)){e=n.addItem(t,i.index);break}throw Error(tt[6]);case at.component:throw new X(\"LMAIALC87444602\");default:throw new Y(\"LMAIALU98881733\",n.type)}if(Ct.isComponent(t)){const t=n.contentItems[e];Gt.isStack(t)&&(n=t,e=0)}return i.parentItem=n,i.index=e,i}}}loadComponentAsRoot(t){if(void 0===this._groundItem)throw new Error(\"Cannot add item before init\");this._groundItem.loadComponentAsRoot(t)}updateSize(t,e){this.setSize(t,e)}setSize(t,e){if(this._width=t,this._height=e,!0===this._isInitialised){if(void 0===this._groundItem)throw new J(\"LMUS18881\");if(this._groundItem.setSize(this._width,this._height),this._maximisedStack){const{width:t,height:e}=kt(this._containerElement);Tt(this._maximisedStack.element,t),At(this._maximisedStack.element,e),this._maximisedStack.updateSize(!1)}this.adjustColumnsResponsive()}}beginSizeInvalidation(){this._sizeInvalidationBeginCount++}endSizeInvalidation(){0==--this._sizeInvalidationBeginCount&&this.updateSizeFromContainer()}updateSizeFromContainer(){const{width:t,height:e}=kt(this._containerElement);this.setSize(t,e)}updateRootSize(t=!1){if(void 0===this._groundItem)throw new J(\"LMURS28881\");this._groundItem.updateSize(t)}createAndInitContentItem(t,e){const i=this.createContentItem(t,e);return i.init(),i}createContentItem(t,e){if(\"string\"!=typeof t.type)throw new G(\"Missing parameter 'type'\",JSON.stringify(t));if(ct.isComponentItem(t)&&!(e instanceof ee)&&e&&!(!0===this.isSubWindow&&e instanceof Yt)){t={type:at.stack,content:[t],size:t.size,sizeUnit:t.sizeUnit,minSize:t.minSize,minSizeUnit:t.minSizeUnit,id:t.id,maximised:t.maximised,isClosable:t.isClosable,activeItemIndex:0,header:void 0}}return this.createContentItemFromConfig(t,e)}findFirstComponentItemById(t){if(void 0===this._groundItem)throw new J(\"LMFFCIBI82446\");return this.findFirstContentItemTypeByIdRecursive(at.component,t,this._groundItem)}createPopout(t,e,i,n){return t instanceof Gt?this.createPopoutFromContentItem(t,e,i,n):this.createPopoutFromItemConfig(t,e,i,n)}createPopoutFromContentItem(t,e,i,n){let o=t.parent,s=t;for(;null!==o&&1===o.contentItems.length&&!o.isGround;)s=o,o=o.parent;if(null===o)throw new K(\"LMCPFCI00834\");{if(void 0===n&&(n=o.contentItems.indexOf(s)),null!==i&&o.addPopInParentId(i),void 0===e){const i=globalThis.screenX||globalThis.screenLeft,n=globalThis.screenY||globalThis.screenTop,o=t.element.offsetLeft,s=t.element.offsetTop,{width:r,height:a}=kt(t.element);e={left:i+o,top:n+s,width:r,height:a}}const r=t.toConfig();if(t.remove(),ft.isRootItemConfig(r))return this.createPopoutFromItemConfig(r,e,i,n);throw new Error(`${tt[0]}`)}}beginVirtualSizedContainerAdding(){0==++this._virtualSizedContainerAddingBeginCount&&(this._virtualSizedContainers.length=0)}addVirtualSizedContainer(t){this._virtualSizedContainers.push(t)}endVirtualSizedContainerAdding(){if(0==--this._virtualSizedContainerAddingBeginCount){const t=this._virtualSizedContainers.length;if(t>0){this.fireBeforeVirtualRectingEvent(t);for(let e=0;ethis.emit(\"windowOpened\",a))),a.on(\"closed\",(()=>this.reconcilePopoutWindows())),this._openPopouts.push(a),this.layoutConfig.settings.closePopoutsOnUnload&&!this._windowBeforeUnloadListening&&(globalThis.addEventListener(\"beforeunload\",this._windowBeforeUnloadListener,{passive:!0}),this._windowBeforeUnloadListening=!0),a}closeAllOpenPopouts(){for(let t=0;tglobalThis.close()),1)}getArea(t,e){let i=null,n=1/0;for(let o=0;o=s.x1&&t=s.y1&&es.surface&&(n=s.surface,i=s)}return i}calculateItemAreas(){const t=this.getAllContentItems(),e=this._groundItem;if(void 0===e)throw new J(\"LMCIAR44365\");if(1!==t.length){e.contentItems[0].isStack?this._itemAreas=[]:this._itemAreas=e.createSideAreas();for(let e=0;e0){let e=t[0];if(Gt.isComponentItem(e)){const t=e.parent;if(null===t)throw new K(\"LMXLLMI69999\");e=t}if(!Gt.isStack(e))throw new X(\"LMCLLMI19993\");e.maximise()}}}processMaximiseStack(t){if(this._maximisedStack=t,t.on(\"beforeItemDestroyed\",this._maximisedStackBeforeDestroyedListener),t.element.classList.add(\"lm_maximised\"),t.element.insertAdjacentElement(\"afterend\",this._maximisePlaceholder),void 0===this._groundItem)throw new J(\"LMMXI19993\");{this._groundItem.element.prepend(t.element);const{width:e,height:i}=kt(this._containerElement);Tt(t.element,e),At(t.element,i),t.updateSize(!0),t.focusActiveContentItem(),this._maximisedStack.emit(\"maximised\"),this.emit(\"stateChanged\")}}processMinimiseMaximisedStack(){if(void 0===this._maximisedStack)throw new X(\"LMMMS74422\");{const t=this._maximisedStack;if(null===t.parent)throw new K(\"LMMI13668\");t.element.classList.remove(\"lm_maximised\"),this._maximisePlaceholder.insertAdjacentElement(\"afterend\",t.element),this._maximisePlaceholder.remove(),this.updateRootSize(!0),this._maximisedStack=void 0,t.off(\"beforeItemDestroyed\",this._maximisedStackBeforeDestroyedListener),t.emit(\"minimised\"),this.emit(\"stateChanged\")}}reconcilePopoutWindows(){const t=[];for(let e=0;e{this._resizeTimeoutId=void 0,this.beginSizeInvalidation(),this.endSizeInvalidation()}),this.resizeDebounceInterval))}checkClearResizeTimeout(){void 0!==this._resizeTimeoutId&&(clearTimeout(this._resizeTimeoutId),this._resizeTimeoutId=void 0)}setContainer(){var t;const e=document.body,i=null!==(t=this._containerElement)&&void 0!==t?t:e;if(i===e){this.resizeWithContainerAutomatically=!0;const t=document.documentElement;t.style.height=\"100%\",t.style.margin=\"0\",t.style.padding=\"0\",t.style.overflow=\"clip\",e.style.height=\"100%\",e.style.margin=\"0\",e.style.padding=\"0\",e.style.overflow=\"clip\"}this._containerElement=i}onBeforeUnload(){this.destroy()}adjustColumnsResponsive(){if(void 0===this._groundItem)throw new J(\"LMACR20883\");if(this._firstLoad=!1,this.useResponsiveLayout()&&!this._updatingColumnsResponsive&&this._groundItem.contentItems.length>0&&this._groundItem.contentItems[0].isRow){if(void 0===this._groundItem||null===this._width)throw new J(\"LMACR77412\");{const t=this._groundItem.contentItems[0].contentItems.length;if(t<=1)return;{const e=this.layoutConfig.dimensions.defaultMinItemWidth;if(t*e<=this._width)return;{this._updatingColumnsResponsive=!0;const i=t-Math.max(Math.floor(this._width/e),1),n=this._groundItem.contentItems[0],o=this.getAllStacks();if(0===o.length)throw new X(\"LMACRS77413\");{const t=o[0];for(let e=0;en?void 0:{parentItem:t,index:o}}}case 1:if(void 0===this._focusedComponentItem)return;{const t=this._focusedComponentItem.parentItem;return this.tryCreateLocationFromParentItem(t,e)}case 2:{const t=this.findFirstContentItemType(at.stack);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 3:{let t=this.findFirstContentItemType(at.row);return void 0!==t?this.tryCreateLocationFromParentItem(t,e):(t=this.findFirstContentItemType(at.column),void 0!==t?this.tryCreateLocationFromParentItem(t,e):void 0)}case 4:{const t=this.findFirstContentItemType(at.row);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 5:{const t=this.findFirstContentItemType(at.column);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 6:if(void 0===this._groundItem)throw new J(\"LMFLRIF18244\");return void 0!==this.rootItem?void 0:void 0===e||0===e?{parentItem:this._groundItem,index:0}:void 0;case 7:if(void 0===this._groundItem)throw new J(\"LMFLF18244\");{const t=this._groundItem.contentItems;if(0===t.length)return void 0===e||0===e?{parentItem:this._groundItem,index:0}:void 0;{const i=t[0];return this.tryCreateLocationFromParentItem(i,e)}}}}tryCreateLocationFromParentItem(t,e){const i=t.contentItems.length;return void 0===e?{parentItem:t,index:i}:e<0||e>i?void 0:{parentItem:t,index:e}}}!function(t){t.createMaximisePlaceElement=function(t){const e=t.createElement(\"div\");return e.classList.add(\"lm_maximise_place\"),e},t.createTabDropPlaceholderElement=function(t){const e=t.createElement(\"div\");return e.classList.add(\"lm_drop_tab_placeholder\"),e},t.defaultLocationSelectors=[{typeId:1,index:void 0},{typeId:2,index:void 0},{typeId:3,index:void 0},{typeId:7,index:void 0}],t.afterFocusedItemIfPossibleLocationSelectors=[{typeId:0,index:1},{typeId:2,index:void 0},{typeId:3,index:void 0},{typeId:7,index:void 0}]}(ae||(ae={}));class le extends ae{constructor(t,e,i,n){if(super(le.createLayoutManagerConstructorParameters(t,e)),this._bindComponentEventHanlderPassedInConstructor=!1,this._creationTimeoutPassed=!1,void 0!==e&&\"function\"==typeof e&&(this.bindComponentEvent=e,this._bindComponentEventHanlderPassedInConstructor=!0,void 0!==i&&(this.unbindComponentEvent=i)),!this._bindComponentEventHanlderPassedInConstructor&&this.isSubWindow){if(void 0===this._constructorOrSubWindowLayoutConfig)throw new J(\"VLC98823\");{const t=xt.resolve(this._constructorOrSubWindowLayoutConfig);this.layoutConfig=Object.assign(Object.assign({},t),{root:void 0})}}!0!==n&&(this.deprecatedConstructor||this.init())}destroy(){this.bindComponentEvent=void 0,this.unbindComponentEvent=void 0,super.destroy()}init(){if(this._bindComponentEventHanlderPassedInConstructor||\"loading\"!==document.readyState&&null!==document.body){if(!this._bindComponentEventHanlderPassedInConstructor&&!0===this.isSubWindow&&!this._creationTimeoutPassed)return setTimeout((()=>this.init()),7),void(this._creationTimeoutPassed=!0);!0===this.isSubWindow&&(this._bindComponentEventHanlderPassedInConstructor||this.clearHtmlAndAdjustStylesForSubWindow(),window.__glInstance=this),super.init()}else document.addEventListener(\"DOMContentLoaded\",(()=>this.init()),{passive:!0})}clearHtmlAndAdjustStylesForSubWindow(){const t=document.head,e=new Array(4);e[0]=document.querySelectorAll(\"body link\"),e[1]=document.querySelectorAll(\"body style\"),e[2]=document.querySelectorAll(\"template\"),e[3]=document.querySelectorAll(\".gl_keep\");for(let i=0;ithis.emit(\"popIn\"))),document.body.appendChild(t),!0}}bindComponent(t,e){if(void 0!==this.bindComponentEvent){return this.bindComponentEvent(t,e)}if(void 0!==this.getComponentEvent)return{virtual:!1,component:this.getComponentEvent(t,e)};{const t=`${tt[2]}: ${JSON.stringify(e)}`;throw new Z(t)}}unbindComponent(t,e,i){if(void 0!==this.unbindComponentEvent)this.unbindComponentEvent(t);else if(!e&&void 0!==this.releaseComponentEvent){if(void 0===i)throw new J(\"VCUCRCU333998\");this.releaseComponentEvent(t,i)}}}!function(t){let e=!1;t.createLayoutManagerConstructorParameters=function(t,i){const n=e?null:new URL(document.location.href).searchParams.get(\"gl-window\");e=!0;const o=null!==n;let s,r;if(null!==n){const e=localStorage.getItem(n);if(null===e)throw new Error(\"Null gl-window Config\");localStorage.removeItem(n);const i=JSON.parse(e),o=_t.unminifyConfig(i);r=xt.fromResolved(o),t instanceof HTMLElement&&(s=t)}else void 0===t?r=void 0:t instanceof HTMLElement?(r=void 0,s=t):r=t,void 0===s&&i instanceof HTMLElement&&(s=i);return{constructorOrSubWindowLayoutConfig:r,isSubWindow:o,containerElement:s}}}(le||(le={}));class he extends le{constructor(t,e,i){super(t,e,i,!0),this._componentTypesMap=new Map,this._registeredComponentMap=new Map,this._virtuableComponentMap=new Map,this._containerVirtualRectingRequiredEventListener=(t,e,i)=>this.handleContainerVirtualRectingRequiredEvent(t,e,i),this._containerVirtualVisibilityChangeRequiredEventListener=(t,e)=>this.handleContainerVirtualVisibilityChangeRequiredEvent(t,e),this._containerVirtualZIndexChangeRequiredEventListener=(t,e,i)=>this.handleContainerVirtualZIndexChangeRequiredEvent(t,e,i),this.deprecatedConstructor||this.init()}registerComponent(t,e,i=!1){if(\"function\"!=typeof e)throw new $(\"registerComponent() componentConstructorOrFactoryFtn parameter is not a function\");if(e.hasOwnProperty(\"prototype\")){const n=e;this.registerComponentConstructor(t,n,i)}else{const n=e;this.registerComponentFactoryFunction(t,n,i)}}registerComponentConstructor(t,e,i=!1){if(\"function\"!=typeof e)throw new Error(tt[1]);if(void 0!==this._componentTypesMap.get(t))throw new Z(`${tt[3]}: ${t}`);this._componentTypesMap.set(t,{constructor:e,factoryFunction:void 0,virtual:i})}registerComponentFactoryFunction(t,e,i=!1){if(\"function\"!=typeof e)throw new Z(\"Please register a constructor function\");if(void 0!==this._componentTypesMap.get(t))throw new Z(`${tt[3]}: ${t}`);this._componentTypesMap.set(t,{constructor:void 0,factoryFunction:e,virtual:i})}registerComponentFunction(t){this.registerGetComponentConstructorCallback(t)}registerGetComponentConstructorCallback(t){if(\"function\"!=typeof t)throw new Error(\"Please register a callback function\");void 0!==this._getComponentConstructorFtn&&console.warn(\"Multiple component functions are being registered. Only the final registered function will be used.\"),this._getComponentConstructorFtn=t}getRegisteredComponentTypeNames(){const t=this._componentTypesMap.keys();return Array.from(t)}getComponentInstantiator(t){let e;const i=pt.resolveComponentTypeName(t);return void 0!==i&&(e=this._componentTypesMap.get(i)),void 0===e&&void 0!==this._getComponentConstructorFtn&&(e={constructor:this._getComponentConstructorFtn(t),factoryFunction:void 0,virtual:!1}),e}bindComponent(t,e){let i;const n=pt.resolveComponentTypeName(e);let o;if(void 0!==n&&(i=this._componentTypesMap.get(n)),void 0===i&&void 0!==this._getComponentConstructorFtn&&(i={constructor:this._getComponentConstructorFtn(e),factoryFunction:void 0,virtual:!1}),void 0!==i){const s=i.virtual;let r,a;r=void 0===e.componentState?void 0:Ut({},e.componentState);const l=i.constructor;if(void 0!==l)a=new l(t,r,s);else{const e=i.factoryFunction;if(void 0===e)throw new X(\"LMBCFFU10008\");a=e(t,r,s)}if(s){if(void 0===a)throw new J(\"GLBCVCU988774\");{const e=a,i=e.rootHtmlElement;if(void 0===i)throw new Z(`${tt[5]}: ${n}`);!function(t){const e=\"absolute\";t.style.position!==e&&(t.style.position=e)}(i),this.container.appendChild(i),this._virtuableComponentMap.set(t,e),t.virtualRectingRequiredEvent=this._containerVirtualRectingRequiredEventListener,t.virtualVisibilityChangeRequiredEvent=this._containerVirtualVisibilityChangeRequiredEventListener,t.virtualZIndexChangeRequiredEvent=this._containerVirtualZIndexChangeRequiredEventListener}}this._registeredComponentMap.set(t,a),o={virtual:i.virtual,component:a}}else o=super.bindComponent(t,e);return o}unbindComponent(t,e,i){if(void 0===this._registeredComponentMap.get(t))super.unbindComponent(t,e,i);else{const e=this._virtuableComponentMap.get(t);if(void 0!==e){const i=e.rootHtmlElement;if(void 0===i)throw new X(\"GLUC77743\",t.title);this.container.removeChild(i),this._virtuableComponentMap.delete(t)}}}fireBeforeVirtualRectingEvent(t){this._goldenLayoutBoundingClientRect=this.container.getBoundingClientRect(),super.fireBeforeVirtualRectingEvent(t)}handleContainerVirtualRectingRequiredEvent(t,e,i){const n=this._virtuableComponentMap.get(t);if(void 0===n)throw new J(\"GLHCSCE55933\");{const o=n.rootHtmlElement;if(void 0===o)throw new Z(tt[4]+\" \"+t.title);{const n=t.element.getBoundingClientRect(),s=n.left-this._goldenLayoutBoundingClientRect.left;o.style.left=zt(s);const r=n.top-this._goldenLayoutBoundingClientRect.top;o.style.top=zt(r),Tt(o,e),At(o,i)}}}handleContainerVirtualVisibilityChangeRequiredEvent(t,e){const i=this._virtuableComponentMap.get(t);if(void 0===i)throw new J(\"GLHCVVCRE55934\");{const n=i.rootHtmlElement;if(void 0===n)throw new Z(tt[4]+\" \"+t.title);Dt(n,e)}}handleContainerVirtualZIndexChangeRequiredEvent(t,e,i){const n=this._virtuableComponentMap.get(t);if(void 0===n)throw new J(\"GLHCVZICRE55935\");{const e=n.rootHtmlElement;if(void 0===e)throw new Z(tt[4]+\" \"+t.title);e.style.zIndex=i}}}const de=\"initial_\",ce={show:\"top\",popout:!1,maximise:!1,close:\"close-tab-unused\"},me={headerHeight:31},ue={hasHeaders:!0,reorderEnabled:!0},pe={popoutWholeStack:!1,constrainDragToContainer:!1,constrainDragToHeaders:!1,preventDragout:!1,showMaximiseIcon:!1,showPopoutIcon:!1,showCloseIcon:!1,blockedPopoutsThrowError:!0,closePopoutsOnUnload:!0,selectionEnabled:!1};var ge,fe;class ve{constructor(e){this.layout=e,ge.set(this,void 0),fe.set(this,void 0),this.handleResize=t=>{t.forEach((t=>this.resizeElement(t.target)))},this.handleMutation=()=>{this.layout.viewComponentsByContainerElement.forEach((t=>{this.resizeElement(t.container.element)}))},t.__classPrivateFieldSet(this,ge,new ResizeObserver(this.handleResize),\"f\"),t.__classPrivateFieldSet(this,fe,new MutationObserver(this.handleMutation),\"f\")}observeMutations(e){t.__classPrivateFieldGet(this,fe,\"f\")?.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[\"class\"]})}destroy(){t.__classPrivateFieldGet(this,ge,\"f\").disconnect(),t.__classPrivateFieldGet(this,fe,\"f\").disconnect()}observeContainer(e){t.__classPrivateFieldGet(this,ge,\"f\").observe(e)}unobserveContainer(e){t.__classPrivateFieldGet(this,ge,\"f\").unobserve(e)}resizeElement(t){const e=this.layout.viewComponentsByContainerElement.get(t);e&&e.resize()}}ge=new WeakMap,fe=new WeakMap;var _e={};Object.defineProperty(_e,\"__esModule\",{value:!0});var ye=_e.BaseItem=void 0;class Ce{constructor(t,e,i){this._item=t,this._layout=e,this._wrap=i}get raw(){return this._item}get layout(){return this._layout}get type(){return this._item.type}get contentItems(){return(this._item.contentItems??[]).map((t=>this._wrap(t)))}get parent(){const t=this._item.parent;return t?this._wrap(t):null}setActiveContentItem(t,e){if(\"stack\"!==this.type)throw new Error(`Cannot call setActiveContentItem from a non-stack item: ${this.type}`);this._item.setActiveContentItem(t.raw,e)}static wrapInternal(t,e,i){const n=Ce.wrapCache.get(e);if(n)return n;const o=new t(e,i,(e=>Ce.wrapInternal(t,e,i)));return Ce.wrapCache.set(e,o),o}}ye=_e.BaseItem=Ce,Ce.wrapCache=new WeakMap;const we=t=>!!t&&\"contentItems\"in t&&(t.isRow||t.isColumn);class Ie extends ye{isRoot(){return!!this._item.parent?.isGround}getBounds(){return this._item.element.getBoundingClientRect()}get viewName(){if(this._item.isComponent){const{component:t}=this._item;return t.identity.name}throw new Error(\"View name not found\")}onDestroyed(t){const e=({target:i})=>{i===this._item&&(t(),this._item.off(\"itemDestroyed\",e))};this._item.on(\"itemDestroyed\",e)}createAdjacentStack({position:t=\"right\"}={}){const e=this.raw;if(ee.isStack(e)&&e.parent){const i=[\"top\",\"bottom\"].includes(t)?\"column\":\"row\",n=[\"left\",\"top\"].includes(t)?1:0,o=we(e.parent)?e.parent:e.layoutManager,s=o,r=e.parent.contentItems.indexOf(e);e.parent.isGround&&e.parent.removeChild(e,!0);const a=o.newItem({type:i,content:[{type:\"stack\",content:[]}]},r);if(!a)throw new Error(\"createAdjacentStack: Failed to create new container\");const l=a.contentItems[0];return a.addChild(this.raw,n),we(s)&&s.removeChild(e,!0),this._wrap(l)}throw new Error(`Cannot creat adjacent stacks for type: ${e.type}, must be type 'stack'`)}setActiveContentItem(t,e=!0){if(!ee.isStack(this._item))throw new Error(`Cannot call setActiveContentItem from a non-stack item: ${this.type}`);this._item.setActiveComponentItem(t.raw,!e)}static wrap(t,e){return ye.wrapInternal(Ie,t,e)}}function be(t=[],e){for(const i of t)\"component\"===i.type?Object.keys(e).forEach((t=>{t in i&&(i.componentState={[`${de}${t}`]:i[t],...i.componentState}),i[t]=e[t]})):be(i.content,e)}function Se(t=[],e,i){for(const n of t)if(\"component\"===n.type)Object.keys(e).forEach((t=>{if(`${de}${t}`in n.componentState)return n[t]=n.componentState[`${de}${t}`],void delete n.componentState[`${de}${t}`];n[t]=e[t]}));else{if(n.size&&(\"row\"===i||\"column\"===i)){n[\"row\"===i?\"width\":\"height\"]=n.size?.includes(\".\")?parseFloat(n.size):parseInt(n.size)}Se(n.content,e,n.type)}}function Ee(t){if(t.root){t.root.content&&Se([t.root],{componentName:\"view\",isClosable:!0});const e=t.root;t.content=[e],delete t.root}return t}const xe=e=>class extends e{connectedCallback(){if(!this.name||!this.uuid)throw new Error(\" Name or uuid attribute missing\");if(!this.src)throw new Error(\" missing 'src' attribute.\");this.#t||(this.#t=document.createElement(\"iframe\"),this.#t.src=this.src,this.#t.style.height=\"100%\",this.#t.style.width=\"100%\",this.#t.style.border=\"none\",this.forceFrameName?this.#t.setAttribute(\"name\",this.forceFrameName):this.#t.setAttribute(\"name\",t.encodeOptions({brokerUrl:this.brokerUrl,name:this.name,uuid:this.uuid,providerId:this.providerId,contextGroup:this.contextGroup},\"of-frame\")),this.#t.setAttribute(\"id\",this.name),this.appendChild(this.#t))}#t;get brokerUrl(){return this.getAttribute(\"of-broker\")}set brokerUrl(t){t&&this.setAttribute(\"of-broker\",t)}get name(){return this.getAttribute(\"of-name\")}set name(t){t&&this.setAttribute(\"of-name\",t)}get forceFrameName(){return this.getAttribute(\"forceFrameName\")}set forceFrameName(t){t&&this.setAttribute(\"forceFrameName\",t)}get uuid(){return this.getAttribute(\"of-uuid\")}set uuid(t){t&&this.setAttribute(\"of-uuid\",t)}get src(){return this.getAttribute(\"src\")}set src(t){t&&this.setAttribute(\"src\",t)}get providerId(){return this.getAttribute(\"of-provider-id\")}set providerId(t){t&&this.setAttribute(\"of-provider-id\",t)}get contextGroup(){return this.getAttribute(\"of-context-group\")}set contextGroup(t){t&&this.setAttribute(\"of-context-group\",t)}static get observedAttributes(){return[\"name\"]}};class Le{static create(t){const e=document.createElement(\"of-view\");return Object.entries(t).forEach((([t,i])=>{e.setAttribute(t,i)})),e}}customElements.define(\"of-view\",xe(HTMLElement));class ze{constructor(t,i,n,{brokerUrl:o,interopConfig:s},r){this.container=t,this.config=i,this.ofView=null,this.isDragging=()=>this.container.tab.element?.className.includes(\"lm_dragging\")??!1;const{url:a,web:l,interop:h,name:d}=i||{},c=d??`internal-generated-view-${e.v4()}`;if(this.identity={uuid:n,name:c},this.container.element.setAttribute(\"of-name\",c),this.container.element.id=`container-${c}`,this.container.parent.id=c,void 0===a)return void this.handleUrlMissing();const m=this.updateTitleIfNotSet(a),u={\"of-broker\":o,\"of-uuid\":n,\"of-name\":c,src:a};l?.frameName&&(u.forceFrameName=l.frameName);const p=h?.currentContextGroup??s?.currentContextGroup;p&&(u[\"of-context-group\"]=p),s?.providerId&&(u[\"of-provider-id\"]=s?.providerId),this.ofView=Le.create(u),this.ofView.title=m??`Iframe: ${a}`,r.appendChild(this.ofView),this.ofView.style.position=\"absolute\"}updateTitleIfNotSet(t){return\"view\"===this.container.parent.title&&this.container.parent.setTitle(t),this.container.parent.title}handleUrlMissing(){const t=document.createElement(\"div\");t.setAttribute(\"style\",\"padding: 20px\");t.innerText=\"No URL provided\",this.container.element.appendChild(t)}destroy(){this.ofView?.remove(),this.ofView=null}closeView(){this.container.close()}resize(){if(this.ofView){if(this.isDragging())return void(this.ofView.style.display=\"none\");const t=this.container.element.getBoundingClientRect();this.ofView.style.position=\"absolute\",this.ofView.style.height=`${t.height}px`,this.ofView.style.width=`${t.width}px`,this.ofView.style.inset=`${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`,this.ofView.style.display=\"block\"}}}class Me extends U{static overrideConfig(t){const e={...ue,...t.settings,...pe};return e.reorderEnabled?be(t.content,{isClosable:!0}):be(t.content,{reorderEnabled:!1}),{dimensions:me,...t,settings:e,header:{...ce,show:!1!==t.settings?.hasHeaders&&ce.show}}}constructor(t,e,i,{options:n},o,s){super(),this.identity=t,this.container=e,this.initialConfig=i,this.layoutManager=o,this.platformProvider=s,this.viewComponentsByContainerElement=new Map,this.layoutContentCache=_.getSingleInstance(),this.reparentingViews=new Set,this.goldenLayoutDestroyed=!1,this.createViewComponent=(t,e)=>{m.handleSharedView(this.layoutManager,this.identity,e);const i=new ze(t,e,this.identity.uuid,this.options,this.iframeContainer);return e&&!1===e[`${de}isClosable`]&&this.stylesheet.insertRule(`#tab-${i.identity.name} .lm_close_tab { display: none; }`),this.viewComponentsByContainerElement.set(t.element,i),this.resizeController.observeContainer(t.element),i},this.iframeContainer=document.createElement(\"div\"),this.iframeContainer.id=`openfin-layout-iframe-container-${this.identity.layoutName}`,this.domEmitter=new V(e),this.setupStylesheets(),this.layout=new he(this.container),this.layout.resizeWithContainerAutomatically=!0,this.options=n,this.layout.registerComponent(\"view\",this.createViewComponent),this.setupListeners(),this.resizeController=new ve(this),this.layout.loadLayout(Me.overrideConfig(i));const r=document.createElement(\"div\");r.id=`openfin-layout-shadow-container-${this.identity.layoutName}`,r.attachShadow({mode:\"open\",delegatesFocus:!1}).appendChild(this.iframeContainer),this.container.appendChild(r),this.resizeController.observeMutations(this.container)}getStackByView({name:t}){const e=this.layout.findFirstComponentItemById(t);if(e?.parent&&e?.parent?.isStack)return Ie.wrap(e.parent,this)}getRoot(){return Ie.wrap(this.layout.rootItem,this)}async platformCloseView(t){const e=[...this.viewComponentsByContainerElement.values()].find((e=>e.identity.name===t.name));if(!e)throw new Error(`View with name: ${t.name} not found in layout.`);e.closeView()}async platformCreateView(t,{location:e,targetView:i}={}){if(i)throw new Error(\"TargetView not supported in web\");const n={options:this.platformProvider.normalizeOptions(t),target:this.identity,location:e};return this.insertView(n)}setupStylesheets(){if(this.container.setAttribute(\"data-openfin-layout-name\",this.identity.layoutName),this.stylesheet=new CSSStyleSheet,this.stylesheet.insertRule(\".lm_close { display: none; }\"),document.adoptedStyleSheets.push(this.stylesheet),this.initialConfig.settings?.preventSplitterResize){const t=`\\n [data-openfin-layout-name='${this.identity.layoutName}'] .lm_splitter {\\n pointer-events: none;\\n }`;this.stylesheet.insertRule(t)}}insertView({options:t,location:e,targetView:i}){const n=e?this.layoutContentCache.getItemOrUndefined(e.id):void 0,o=i?this.layoutContentCache.getItemOrUndefined(i.name):void 0,s=n??o??Ie.wrap(this.layout.rootItem,this);let r;if(ee.isStack(s.raw))r=s.raw;else{if(!we(s.raw))throw new Error(\"Cannot add a view at the requested location\");r=s.raw.newItem({type:\"stack\",content:[]})}const a=Math.min(r.contentItems.length,e?.index??r.contentItems.length);let l=this.layout.findFirstComponentItemById(t.name);l?(l.parent&&l.parent.removeChild(l,!0),r.addChild(l,a)):l=r.newComponent(\"view\",t,t.title??t.url??\"Default Title\",a);const h=l.component.identity;return Promise.resolve({identity:h})}replaceView({viewToReplace:t,newView:e}){throw new Error(\"Method not implemented.\")}replaceLayout(t){throw new Error(\"Method not implemented.\")}async cleanupView(t){}applyPreset(t){throw new Error(\"Method not implemented.\")}getCurrentViews(){return[...this.viewComponentsByContainerElement.values()].map((t=>t.identity))}async getFrameSnapshot(){return Ee(xt.fromResolved(this.layout.toConfig()))}isVisible(){return W(this.container)}async onViewDetached({viewIdentity:t}){this.reparentingViews.add(t.name),this.platformCloseView(t)}async destroy(){this.goldenLayoutDestroyed||(this.goldenLayoutDestroyed=!0,this.layout.destroy()),this.iframeContainer.remove(),this.resizeController.destroy(),document.adoptedStyleSheets=document.adoptedStyleSheets.filter((t=>t!==this.stylesheet)),this.viewComponentsByContainerElement.clear()}setupListeners(){this.container.addEventListener(\"pointerdown\",(t=>{if(t.target instanceof HTMLElement){const e=t.target.classList;[\"lm_tab\",\"lm_title\",\"lm_splitter\",\"lm_drag_handle\"].some((t=>e.contains(t)))&&(this.handleDragStart(),2===t.button&&t.stopPropagation())}}),!0),document.addEventListener(\"pointerup\",(()=>this.handleDragEnd()),!0),this.layout.on(\"tabCreated\",(t=>{const e=t.componentItem.component;t.element.id=`tab-${e.identity.name}`,this.domEmitter.dispatchLocalEvent(\"tab-created\",e.identity)})),this.layout.on(\"itemCreated\",(({target:t})=>{const e=t;if(Gt.isComponentItem(e)){const t=e.component;this.domEmitter.dispatchLocalEvent(\"container-created\",t.identity)}})),this.layout.on(\"itemDestroyed\",(t=>{const e=t.target;if(Gt.isComponentItem(e)){const t=e.component;this.removeViewComponent(t)}})),this.layout.on(\"itemDropped\",(()=>{this.handleDragEnd()}))}handleDragStart(){this.iframeContainer.style.pointerEvents=\"none\"}handleDragEnd(){this.iframeContainer.style.pointerEvents=\"\"}removeViewComponent(t){if(t.config&&!1===t.config[`${de}isClosable`]){const e=[...this.stylesheet.cssRules].findIndex((e=>e.cssText.includes(`#tab-${t.identity.name}`)));this.stylesheet.deleteRule(e)}t.destroy(),this.viewComponentsByContainerElement.delete(t.container.element),this.resizeController.unobserveContainer(t.container.element),this.reparentingViews.has(t.identity.name)?this.reparentingViews.delete(t.identity.name):this.platformProvider.closeView(t.identity.name);0===this.getCurrentViews().length&&(this.goldenLayoutDestroyed||(this.goldenLayoutDestroyed=!0,m.handleLastViewRemoved(this.layoutManager,this.identity)))}}class Pe{constructor(t,e,i,n){this.windowIdentity=t,this.connectConfig=e,this.provider=i,this.fallbackContainer=n}async createLayout(t,e){if(!(\"container\"in t)&&!this.fallbackContainer)throw new Error(\"Container property is not optional in web\");const{layoutName:i}=t,n=t,o=this.provider.initLayoutViews(n),s=n.container??this.fallbackContainer,r={...this.windowIdentity,layoutName:i},a=new Me(r,s,o,this.connectConfig,e,this.provider);m.registerLayout(e,i,a),this.fallbackContainer=null}async getLayoutSnapshot(t){return t.getLayoutSnapshot()}async handleLastViewRemoved(t){}}class Te{static async init(e){const i=e.getFin().InterApplicationBus.Channel,n=await i.create(`custom-frame-${e.me.uuid}`);return n.setDefaultAction((async(t,{target:e,opts:i},o)=>{const s=n.connections.find((t=>t.name===e.name));if(s)return n.dispatch(s,t,{...i,target:e});throw new Error(`Client with name ${e.name} not found`)})),await t.relayChannelClientApi_1(n,\"layout-relay\"),new Te(e)}constructor(t){this.wire=t,this.viewNames=new Set}normalizeOptions(t,i=\"default\"){const n=this.wire.me.uuid;let{name:o=`internal-generated-view-${e.v4()}`}=t;return o.match(/^internal-generated-view-/)&&this.viewNames.has(o)&&\"duplicate\"===i&&(o=`internal-generated-view-${e.v4()}`),this.viewNames.add(o),{...t,name:o,uuid:n}}closeView(t){this.viewNames.delete(t)}initLayoutViews({layout:t,multiInstanceViewBehavior:e}){return H((t=>{if(\"component\"===t.type&&t.componentState){const i=this.normalizeOptions(t.componentState,e);return{...t,componentState:i}}return t}),t)}}var Ae;const ke=t=>t;Ae=new WeakMap,exports.WebLayoutEntryPoint=class{constructor(e){Ae.set(this,void 0),this.initLayoutManager=async(e,i,{container:n,layoutManagerOverride:o})=>{const s=await Te.init(i),r=o??ke,a=new Pe(i.me,t.__classPrivateFieldGet(this,Ae,\"f\"),s,n),l=new(r(m.createClosedConstructor(a)));return await M(i,l),l},this.applyLayoutSnapshot=async(e,i,n)=>{await i.applyLayoutSnapshot(t.__classPrivateFieldGet(this,Ae,\"f\").platform.layoutSnapshot)},this.createLayout=async(t,e)=>m.createLayout(t,e),this.destroyLayout=async(t,e)=>m.destroyLayout(t,e),t.__classPrivateFieldSet(this,Ae,e,\"f\")}};\n","'use strict'\n\nexports.byteLength = byteLength\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\nfor (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i]\n revLookup[code.charCodeAt(i)] = i\n}\n\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction getLens (b64) {\n var len = b64.length\n\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // Trim off extra bytes after placeholder bytes are found\n // See: https://github.com/beatgammit/base64-js/issues/42\n var validLen = b64.indexOf('=')\n if (validLen === -1) validLen = len\n\n var placeHoldersLen = validLen === len\n ? 0\n : 4 - (validLen % 4)\n\n return [validLen, placeHoldersLen]\n}\n\n// base64 is 4/3 + up to two characters of the original data\nfunction byteLength (b64) {\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction _byteLength (b64, validLen, placeHoldersLen) {\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction toByteArray (b64) {\n var tmp\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n\n var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))\n\n var curByte = 0\n\n // if there are placeholders, only get up to the last complete 4 chars\n var len = placeHoldersLen > 0\n ? validLen - 4\n : validLen\n\n var i\n for (i = 0; i < len; i += 4) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 18) |\n (revLookup[b64.charCodeAt(i + 1)] << 12) |\n (revLookup[b64.charCodeAt(i + 2)] << 6) |\n revLookup[b64.charCodeAt(i + 3)]\n arr[curByte++] = (tmp >> 16) & 0xFF\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 2) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 2) |\n (revLookup[b64.charCodeAt(i + 1)] >> 4)\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 1) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 10) |\n (revLookup[b64.charCodeAt(i + 1)] << 4) |\n (revLookup[b64.charCodeAt(i + 2)] >> 2)\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] +\n lookup[num >> 12 & 0x3F] +\n lookup[num >> 6 & 0x3F] +\n lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n var tmp\n var output = []\n for (var i = start; i < end; i += 3) {\n tmp =\n ((uint8[i] << 16) & 0xFF0000) +\n ((uint8[i + 1] << 8) & 0xFF00) +\n (uint8[i + 2] & 0xFF)\n output.push(tripletToBase64(tmp))\n }\n return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n var tmp\n var len = uint8.length\n var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n var parts = []\n var maxChunkLength = 16383 // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1]\n parts.push(\n lookup[tmp >> 2] +\n lookup[(tmp << 4) & 0x3F] +\n '=='\n )\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + uint8[len - 1]\n parts.push(\n lookup[tmp >> 10] +\n lookup[(tmp >> 4) & 0x3F] +\n lookup[(tmp << 2) & 0x3F] +\n '='\n )\n }\n\n return parts.join('')\n}\n","/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n/* eslint-disable no-proto */\n\n'use strict'\n\nconst base64 = require('base64-js')\nconst ieee754 = require('ieee754')\nconst customInspectSymbol =\n (typeof Symbol === 'function' && typeof Symbol['for'] === 'function') // eslint-disable-line dot-notation\n ? Symbol['for']('nodejs.util.inspect.custom') // eslint-disable-line dot-notation\n : null\n\nexports.Buffer = Buffer\nexports.SlowBuffer = SlowBuffer\nexports.INSPECT_MAX_BYTES = 50\n\nconst K_MAX_LENGTH = 0x7fffffff\nexports.kMaxLength = K_MAX_LENGTH\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Print warning and recommend using `buffer` v4.x which has an Object\n * implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * We report that the browser does not support typed arrays if the are not subclassable\n * using __proto__. Firefox 4-29 lacks support for adding new properties to `Uint8Array`\n * (See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438). IE 10 lacks support\n * for __proto__ and has a buggy typed array implementation.\n */\nBuffer.TYPED_ARRAY_SUPPORT = typedArraySupport()\n\nif (!Buffer.TYPED_ARRAY_SUPPORT && typeof console !== 'undefined' &&\n typeof console.error === 'function') {\n console.error(\n 'This browser lacks typed array (Uint8Array) support which is required by ' +\n '`buffer` v5.x. Use `buffer` v4.x if you require old browser support.'\n )\n}\n\nfunction typedArraySupport () {\n // Can typed array instances can be augmented?\n try {\n const arr = new Uint8Array(1)\n const proto = { foo: function () { return 42 } }\n Object.setPrototypeOf(proto, Uint8Array.prototype)\n Object.setPrototypeOf(arr, proto)\n return arr.foo() === 42\n } catch (e) {\n return false\n }\n}\n\nObject.defineProperty(Buffer.prototype, 'parent', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.buffer\n }\n})\n\nObject.defineProperty(Buffer.prototype, 'offset', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.byteOffset\n }\n})\n\nfunction createBuffer (length) {\n if (length > K_MAX_LENGTH) {\n throw new RangeError('The value \"' + length + '\" is invalid for option \"size\"')\n }\n // Return an augmented `Uint8Array` instance\n const buf = new Uint8Array(length)\n Object.setPrototypeOf(buf, Buffer.prototype)\n return buf\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new TypeError(\n 'The \"string\" argument must be of type string. Received type number'\n )\n }\n return allocUnsafe(arg)\n }\n return from(arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\nfunction from (value, encodingOrOffset, length) {\n if (typeof value === 'string') {\n return fromString(value, encodingOrOffset)\n }\n\n if (ArrayBuffer.isView(value)) {\n return fromArrayView(value)\n }\n\n if (value == null) {\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n }\n\n if (isInstance(value, ArrayBuffer) ||\n (value && isInstance(value.buffer, ArrayBuffer))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof SharedArrayBuffer !== 'undefined' &&\n (isInstance(value, SharedArrayBuffer) ||\n (value && isInstance(value.buffer, SharedArrayBuffer)))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof value === 'number') {\n throw new TypeError(\n 'The \"value\" argument must not be of type number. Received type number'\n )\n }\n\n const valueOf = value.valueOf && value.valueOf()\n if (valueOf != null && valueOf !== value) {\n return Buffer.from(valueOf, encodingOrOffset, length)\n }\n\n const b = fromObject(value)\n if (b) return b\n\n if (typeof Symbol !== 'undefined' && Symbol.toPrimitive != null &&\n typeof value[Symbol.toPrimitive] === 'function') {\n return Buffer.from(value[Symbol.toPrimitive]('string'), encodingOrOffset, length)\n }\n\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n return from(value, encodingOrOffset, length)\n}\n\n// Note: Change prototype *after* Buffer.from is defined to workaround Chrome bug:\n// https://github.com/feross/buffer/pull/148\nObject.setPrototypeOf(Buffer.prototype, Uint8Array.prototype)\nObject.setPrototypeOf(Buffer, Uint8Array)\n\nfunction assertSize (size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be of type number')\n } else if (size < 0) {\n throw new RangeError('The value \"' + size + '\" is invalid for option \"size\"')\n }\n}\n\nfunction alloc (size, fill, encoding) {\n assertSize(size)\n if (size <= 0) {\n return createBuffer(size)\n }\n if (fill !== undefined) {\n // Only pay attention to encoding if it's a string. This\n // prevents accidentally sending in a number that would\n // be interpreted as a start offset.\n return typeof encoding === 'string'\n ? createBuffer(size).fill(fill, encoding)\n : createBuffer(size).fill(fill)\n }\n return createBuffer(size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n return alloc(size, fill, encoding)\n}\n\nfunction allocUnsafe (size) {\n assertSize(size)\n return createBuffer(size < 0 ? 0 : checked(size) | 0)\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n return allocUnsafe(size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n return allocUnsafe(size)\n}\n\nfunction fromString (string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8'\n }\n\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n\n const length = byteLength(string, encoding) | 0\n let buf = createBuffer(length)\n\n const actual = buf.write(string, encoding)\n\n if (actual !== length) {\n // Writing a hex string, for example, that contains invalid characters will\n // cause everything after the first invalid character to be ignored. (e.g.\n // 'abxxcd' will be treated as 'ab')\n buf = buf.slice(0, actual)\n }\n\n return buf\n}\n\nfunction fromArrayLike (array) {\n const length = array.length < 0 ? 0 : checked(array.length) | 0\n const buf = createBuffer(length)\n for (let i = 0; i < length; i += 1) {\n buf[i] = array[i] & 255\n }\n return buf\n}\n\nfunction fromArrayView (arrayView) {\n if (isInstance(arrayView, Uint8Array)) {\n const copy = new Uint8Array(arrayView)\n return fromArrayBuffer(copy.buffer, copy.byteOffset, copy.byteLength)\n }\n return fromArrayLike(arrayView)\n}\n\nfunction fromArrayBuffer (array, byteOffset, length) {\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\"offset\" is outside of buffer bounds')\n }\n\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\"length\" is outside of buffer bounds')\n }\n\n let buf\n if (byteOffset === undefined && length === undefined) {\n buf = new Uint8Array(array)\n } else if (length === undefined) {\n buf = new Uint8Array(array, byteOffset)\n } else {\n buf = new Uint8Array(array, byteOffset, length)\n }\n\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(buf, Buffer.prototype)\n\n return buf\n}\n\nfunction fromObject (obj) {\n if (Buffer.isBuffer(obj)) {\n const len = checked(obj.length) | 0\n const buf = createBuffer(len)\n\n if (buf.length === 0) {\n return buf\n }\n\n obj.copy(buf, 0, 0, len)\n return buf\n }\n\n if (obj.length !== undefined) {\n if (typeof obj.length !== 'number' || numberIsNaN(obj.length)) {\n return createBuffer(0)\n }\n return fromArrayLike(obj)\n }\n\n if (obj.type === 'Buffer' && Array.isArray(obj.data)) {\n return fromArrayLike(obj.data)\n }\n}\n\nfunction checked (length) {\n // Note: cannot use `length < K_MAX_LENGTH` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= K_MAX_LENGTH) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + K_MAX_LENGTH.toString(16) + ' bytes')\n }\n return length | 0\n}\n\nfunction SlowBuffer (length) {\n if (+length != length) { // eslint-disable-line eqeqeq\n length = 0\n }\n return Buffer.alloc(+length)\n}\n\nBuffer.isBuffer = function isBuffer (b) {\n return b != null && b._isBuffer === true &&\n b !== Buffer.prototype // so Buffer.isBuffer(Buffer.prototype) will be false\n}\n\nBuffer.compare = function compare (a, b) {\n if (isInstance(a, Uint8Array)) a = Buffer.from(a, a.offset, a.byteLength)\n if (isInstance(b, Uint8Array)) b = Buffer.from(b, b.offset, b.byteLength)\n if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n throw new TypeError(\n 'The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array'\n )\n }\n\n if (a === b) return 0\n\n let x = a.length\n let y = b.length\n\n for (let i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i]\n y = b[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n switch (String(encoding).toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'latin1':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return true\n default:\n return false\n }\n}\n\nBuffer.concat = function concat (list, length) {\n if (!Array.isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n\n if (list.length === 0) {\n return Buffer.alloc(0)\n }\n\n let i\n if (length === undefined) {\n length = 0\n for (i = 0; i < list.length; ++i) {\n length += list[i].length\n }\n }\n\n const buffer = Buffer.allocUnsafe(length)\n let pos = 0\n for (i = 0; i < list.length; ++i) {\n let buf = list[i]\n if (isInstance(buf, Uint8Array)) {\n if (pos + buf.length > buffer.length) {\n if (!Buffer.isBuffer(buf)) buf = Buffer.from(buf)\n buf.copy(buffer, pos)\n } else {\n Uint8Array.prototype.set.call(\n buffer,\n buf,\n pos\n )\n }\n } else if (!Buffer.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n } else {\n buf.copy(buffer, pos)\n }\n pos += buf.length\n }\n return buffer\n}\n\nfunction byteLength (string, encoding) {\n if (Buffer.isBuffer(string)) {\n return string.length\n }\n if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) {\n return string.byteLength\n }\n if (typeof string !== 'string') {\n throw new TypeError(\n 'The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. ' +\n 'Received type ' + typeof string\n )\n }\n\n const len = string.length\n const mustMatch = (arguments.length > 2 && arguments[2] === true)\n if (!mustMatch && len === 0) return 0\n\n // Use a for loop to avoid recursion\n let loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'ascii':\n case 'latin1':\n case 'binary':\n return len\n case 'utf8':\n case 'utf-8':\n return utf8ToBytes(string).length\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return len * 2\n case 'hex':\n return len >>> 1\n case 'base64':\n return base64ToBytes(string).length\n default:\n if (loweredCase) {\n return mustMatch ? -1 : utf8ToBytes(string).length // assume utf8\n }\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n let loweredCase = false\n\n // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n // property of a typed array.\n\n // This behaves neither like String nor Uint8Array in that we set start/end\n // to their upper/lower bounds if the value passed is out of range.\n // undefined is handled specially as per ECMA-262 6th Edition,\n // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n if (start === undefined || start < 0) {\n start = 0\n }\n // Return early if start > this.length. Done here to prevent potential uint32\n // coercion fail below.\n if (start > this.length) {\n return ''\n }\n\n if (end === undefined || end > this.length) {\n end = this.length\n }\n\n if (end <= 0) {\n return ''\n }\n\n // Force coercion to uint32. This will also coerce falsey/NaN values to 0.\n end >>>= 0\n start >>>= 0\n\n if (end <= start) {\n return ''\n }\n\n if (!encoding) encoding = 'utf8'\n\n while (true) {\n switch (encoding) {\n case 'hex':\n return hexSlice(this, start, end)\n\n case 'utf8':\n case 'utf-8':\n return utf8Slice(this, start, end)\n\n case 'ascii':\n return asciiSlice(this, start, end)\n\n case 'latin1':\n case 'binary':\n return latin1Slice(this, start, end)\n\n case 'base64':\n return base64Slice(this, start, end)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return utf16leSlice(this, start, end)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = (encoding + '').toLowerCase()\n loweredCase = true\n }\n }\n}\n\n// This property is used by `Buffer.isBuffer` (and the `is-buffer` npm package)\n// to detect a Buffer instance. It's not possible to use `instanceof Buffer`\n// reliably in a browserify context because there could be multiple different\n// copies of the 'buffer' package in use. This method works even for Buffer\n// instances that were created from another copy of the `buffer` package.\n// See: https://github.com/feross/buffer/issues/154\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n const i = b[n]\n b[n] = b[m]\n b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n const len = this.length\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits')\n }\n for (let i = 0; i < len; i += 2) {\n swap(this, i, i + 1)\n }\n return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n const len = this.length\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits')\n }\n for (let i = 0; i < len; i += 4) {\n swap(this, i, i + 3)\n swap(this, i + 1, i + 2)\n }\n return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n const len = this.length\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits')\n }\n for (let i = 0; i < len; i += 8) {\n swap(this, i, i + 7)\n swap(this, i + 1, i + 6)\n swap(this, i + 2, i + 5)\n swap(this, i + 3, i + 4)\n }\n return this\n}\n\nBuffer.prototype.toString = function toString () {\n const length = this.length\n if (length === 0) return ''\n if (arguments.length === 0) return utf8Slice(this, 0, length)\n return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.toLocaleString = Buffer.prototype.toString\n\nBuffer.prototype.equals = function equals (b) {\n if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n if (this === b) return true\n return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n let str = ''\n const max = exports.INSPECT_MAX_BYTES\n str = this.toString('hex', 0, max).replace(/(.{2})/g, '$1 ').trim()\n if (this.length > max) str += ' ... '\n return ''\n}\nif (customInspectSymbol) {\n Buffer.prototype[customInspectSymbol] = Buffer.prototype.inspect\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n if (isInstance(target, Uint8Array)) {\n target = Buffer.from(target, target.offset, target.byteLength)\n }\n if (!Buffer.isBuffer(target)) {\n throw new TypeError(\n 'The \"target\" argument must be one of type Buffer or Uint8Array. ' +\n 'Received type ' + (typeof target)\n )\n }\n\n if (start === undefined) {\n start = 0\n }\n if (end === undefined) {\n end = target ? target.length : 0\n }\n if (thisStart === undefined) {\n thisStart = 0\n }\n if (thisEnd === undefined) {\n thisEnd = this.length\n }\n\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError('out of range index')\n }\n\n if (thisStart >= thisEnd && start >= end) {\n return 0\n }\n if (thisStart >= thisEnd) {\n return -1\n }\n if (start >= end) {\n return 1\n }\n\n start >>>= 0\n end >>>= 0\n thisStart >>>= 0\n thisEnd >>>= 0\n\n if (this === target) return 0\n\n let x = thisEnd - thisStart\n let y = end - start\n const len = Math.min(x, y)\n\n const thisCopy = this.slice(thisStart, thisEnd)\n const targetCopy = target.slice(start, end)\n\n for (let i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i]\n y = targetCopy[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (numberIsNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [val], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n let indexSize = 1\n let arrLength = arr.length\n let valLength = val.length\n\n if (encoding !== undefined) {\n encoding = String(encoding).toLowerCase()\n if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n encoding === 'utf16le' || encoding === 'utf-16le') {\n if (arr.length < 2 || val.length < 2) {\n return -1\n }\n indexSize = 2\n arrLength /= 2\n valLength /= 2\n byteOffset /= 2\n }\n }\n\n function read (buf, i) {\n if (indexSize === 1) {\n return buf[i]\n } else {\n return buf.readUInt16BE(i * indexSize)\n }\n }\n\n let i\n if (dir) {\n let foundIndex = -1\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1) foundIndex = i\n if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n } else {\n if (foundIndex !== -1) i -= i - foundIndex\n foundIndex = -1\n }\n }\n } else {\n if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n for (i = byteOffset; i >= 0; i--) {\n let found = true\n for (let j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false\n break\n }\n }\n if (found) return i\n }\n }\n\n return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n offset = Number(offset) || 0\n const remaining = buf.length - offset\n if (!length) {\n length = remaining\n } else {\n length = Number(length)\n if (length > remaining) {\n length = remaining\n }\n }\n\n const strLen = string.length\n\n if (length > strLen / 2) {\n length = strLen / 2\n }\n let i\n for (i = 0; i < length; ++i) {\n const parsed = parseInt(string.substr(i * 2, 2), 16)\n if (numberIsNaN(parsed)) return i\n buf[offset + i] = parsed\n }\n return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n // Buffer#write(string)\n if (offset === undefined) {\n encoding = 'utf8'\n length = this.length\n offset = 0\n // Buffer#write(string, encoding)\n } else if (length === undefined && typeof offset === 'string') {\n encoding = offset\n length = this.length\n offset = 0\n // Buffer#write(string, offset[, length][, encoding])\n } else if (isFinite(offset)) {\n offset = offset >>> 0\n if (isFinite(length)) {\n length = length >>> 0\n if (encoding === undefined) encoding = 'utf8'\n } else {\n encoding = length\n length = undefined\n }\n } else {\n throw new Error(\n 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n )\n }\n\n const remaining = this.length - offset\n if (length === undefined || length > remaining) length = remaining\n\n if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n throw new RangeError('Attempt to write outside buffer bounds')\n }\n\n if (!encoding) encoding = 'utf8'\n\n let loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'hex':\n return hexWrite(this, string, offset, length)\n\n case 'utf8':\n case 'utf-8':\n return utf8Write(this, string, offset, length)\n\n case 'ascii':\n case 'latin1':\n case 'binary':\n return asciiWrite(this, string, offset, length)\n\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return base64Write(this, string, offset, length)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return ucs2Write(this, string, offset, length)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0)\n }\n}\n\nfunction base64Slice (buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf)\n } else {\n return base64.fromByteArray(buf.slice(start, end))\n }\n}\n\nfunction utf8Slice (buf, start, end) {\n end = Math.min(buf.length, end)\n const res = []\n\n let i = start\n while (i < end) {\n const firstByte = buf[i]\n let codePoint = null\n let bytesPerSequence = (firstByte > 0xEF)\n ? 4\n : (firstByte > 0xDF)\n ? 3\n : (firstByte > 0xBF)\n ? 2\n : 1\n\n if (i + bytesPerSequence <= end) {\n let secondByte, thirdByte, fourthByte, tempCodePoint\n\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 0x80) {\n codePoint = firstByte\n }\n break\n case 2:\n secondByte = buf[i + 1]\n if ((secondByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n if (tempCodePoint > 0x7F) {\n codePoint = tempCodePoint\n }\n }\n break\n case 3:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n codePoint = tempCodePoint\n }\n }\n break\n case 4:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n fourthByte = buf[i + 3]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n codePoint = tempCodePoint\n }\n }\n }\n }\n\n if (codePoint === null) {\n // we did not generate a valid codePoint so insert a\n // replacement char (U+FFFD) and advance only 1 byte\n codePoint = 0xFFFD\n bytesPerSequence = 1\n } else if (codePoint > 0xFFFF) {\n // encode to utf16 (surrogate pair dance)\n codePoint -= 0x10000\n res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n codePoint = 0xDC00 | codePoint & 0x3FF\n }\n\n res.push(codePoint)\n i += bytesPerSequence\n }\n\n return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nconst MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n const len = codePoints.length\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n }\n\n // Decode in chunks to avoid \"call stack size exceeded\".\n let res = ''\n let i = 0\n while (i < len) {\n res += String.fromCharCode.apply(\n String,\n codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n )\n }\n return res\n}\n\nfunction asciiSlice (buf, start, end) {\n let ret = ''\n end = Math.min(buf.length, end)\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F)\n }\n return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n let ret = ''\n end = Math.min(buf.length, end)\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i])\n }\n return ret\n}\n\nfunction hexSlice (buf, start, end) {\n const len = buf.length\n\n if (!start || start < 0) start = 0\n if (!end || end < 0 || end > len) end = len\n\n let out = ''\n for (let i = start; i < end; ++i) {\n out += hexSliceLookupTable[buf[i]]\n }\n return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n const bytes = buf.slice(start, end)\n let res = ''\n // If bytes.length is odd, the last 8 bits must be ignored (same as node.js)\n for (let i = 0; i < bytes.length - 1; i += 2) {\n res += String.fromCharCode(bytes[i] + (bytes[i + 1] * 256))\n }\n return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n const len = this.length\n start = ~~start\n end = end === undefined ? len : ~~end\n\n if (start < 0) {\n start += len\n if (start < 0) start = 0\n } else if (start > len) {\n start = len\n }\n\n if (end < 0) {\n end += len\n if (end < 0) end = 0\n } else if (end > len) {\n end = len\n }\n\n if (end < start) end = start\n\n const newBuf = this.subarray(start, end)\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(newBuf, Buffer.prototype)\n\n return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUintLE =\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let val = this[offset]\n let mul = 1\n let i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUintBE =\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n checkOffset(offset, byteLength, this.length)\n }\n\n let val = this[offset + --byteLength]\n let mul = 1\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUint8 =\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n return this[offset]\n}\n\nBuffer.prototype.readUint16LE =\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUint16BE =\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUint32LE =\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return ((this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16)) +\n (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUint32BE =\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] * 0x1000000) +\n ((this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n this[offset + 3])\n}\n\nBuffer.prototype.readBigUInt64LE = defineBigIntMethod(function readBigUInt64LE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const lo = first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24\n\n const hi = this[++offset] +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n last * 2 ** 24\n\n return BigInt(lo) + (BigInt(hi) << BigInt(32))\n})\n\nBuffer.prototype.readBigUInt64BE = defineBigIntMethod(function readBigUInt64BE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const hi = first * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset]\n\n const lo = this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last\n\n return (BigInt(hi) << BigInt(32)) + BigInt(lo)\n})\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let val = this[offset]\n let mul = 1\n let i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let i = byteLength\n let mul = 1\n let val = this[offset + --i]\n while (i > 0 && (mul *= 0x100)) {\n val += this[offset + --i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n if (!(this[offset] & 0x80)) return (this[offset])\n return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n const val = this[offset] | (this[offset + 1] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n const val = this[offset + 1] | (this[offset] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16) |\n (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] << 24) |\n (this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n (this[offset + 3])\n}\n\nBuffer.prototype.readBigInt64LE = defineBigIntMethod(function readBigInt64LE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const val = this[offset + 4] +\n this[offset + 5] * 2 ** 8 +\n this[offset + 6] * 2 ** 16 +\n (last << 24) // Overflow\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24)\n})\n\nBuffer.prototype.readBigInt64BE = defineBigIntMethod(function readBigInt64BE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const val = (first << 24) + // Overflow\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset]\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last)\n})\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUintLE =\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n let mul = 1\n let i = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUintBE =\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n let i = byteLength - 1\n let mul = 1\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUint8 =\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeUint16LE =\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeUint16BE =\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeUint32LE =\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset + 3] = (value >>> 24)\n this[offset + 2] = (value >>> 16)\n this[offset + 1] = (value >>> 8)\n this[offset] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeUint32BE =\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nfunction wrtBigUInt64LE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7)\n\n let lo = Number(value & BigInt(0xffffffff))\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n return offset\n}\n\nfunction wrtBigUInt64BE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7)\n\n let lo = Number(value & BigInt(0xffffffff))\n buf[offset + 7] = lo\n lo = lo >> 8\n buf[offset + 6] = lo\n lo = lo >> 8\n buf[offset + 5] = lo\n lo = lo >> 8\n buf[offset + 4] = lo\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n buf[offset + 3] = hi\n hi = hi >> 8\n buf[offset + 2] = hi\n hi = hi >> 8\n buf[offset + 1] = hi\n hi = hi >> 8\n buf[offset] = hi\n return offset + 8\n}\n\nBuffer.prototype.writeBigUInt64LE = defineBigIntMethod(function writeBigUInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeBigUInt64BE = defineBigIntMethod(function writeBigUInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n let i = 0\n let mul = 1\n let sub = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n let i = byteLength - 1\n let mul = 1\n let sub = 0\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n if (value < 0) value = 0xff + value + 1\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n this[offset + 2] = (value >>> 16)\n this[offset + 3] = (value >>> 24)\n return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (value < 0) value = 0xffffffff + value + 1\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeBigInt64LE = defineBigIntMethod(function writeBigInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nBuffer.prototype.writeBigInt64BE = defineBigIntMethod(function writeBigInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n }\n ieee754.write(buf, value, offset, littleEndian, 23, 4)\n return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n }\n ieee754.write(buf, value, offset, littleEndian, 52, 8)\n return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n if (!Buffer.isBuffer(target)) throw new TypeError('argument should be a Buffer')\n if (!start) start = 0\n if (!end && end !== 0) end = this.length\n if (targetStart >= target.length) targetStart = target.length\n if (!targetStart) targetStart = 0\n if (end > 0 && end < start) end = start\n\n // Copy 0 bytes; we're done\n if (end === start) return 0\n if (target.length === 0 || this.length === 0) return 0\n\n // Fatal error conditions\n if (targetStart < 0) {\n throw new RangeError('targetStart out of bounds')\n }\n if (start < 0 || start >= this.length) throw new RangeError('Index out of range')\n if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n // Are we oob?\n if (end > this.length) end = this.length\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start\n }\n\n const len = end - start\n\n if (this === target && typeof Uint8Array.prototype.copyWithin === 'function') {\n // Use built-in when available, missing from IE11\n this.copyWithin(targetStart, start, end)\n } else {\n Uint8Array.prototype.set.call(\n target,\n this.subarray(start, end),\n targetStart\n )\n }\n\n return len\n}\n\n// Usage:\n// buffer.fill(number[, offset[, end]])\n// buffer.fill(buffer[, offset[, end]])\n// buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n // Handle string cases:\n if (typeof val === 'string') {\n if (typeof start === 'string') {\n encoding = start\n start = 0\n end = this.length\n } else if (typeof end === 'string') {\n encoding = end\n end = this.length\n }\n if (encoding !== undefined && typeof encoding !== 'string') {\n throw new TypeError('encoding must be a string')\n }\n if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n if (val.length === 1) {\n const code = val.charCodeAt(0)\n if ((encoding === 'utf8' && code < 128) ||\n encoding === 'latin1') {\n // Fast path: If `val` fits into a single byte, use that numeric value.\n val = code\n }\n }\n } else if (typeof val === 'number') {\n val = val & 255\n } else if (typeof val === 'boolean') {\n val = Number(val)\n }\n\n // Invalid ranges are not set to a default, so can range check early.\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError('Out of range index')\n }\n\n if (end <= start) {\n return this\n }\n\n start = start >>> 0\n end = end === undefined ? this.length : end >>> 0\n\n if (!val) val = 0\n\n let i\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val\n }\n } else {\n const bytes = Buffer.isBuffer(val)\n ? val\n : Buffer.from(val, encoding)\n const len = bytes.length\n if (len === 0) {\n throw new TypeError('The value \"' + val +\n '\" is invalid for argument \"value\"')\n }\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len]\n }\n }\n\n return this\n}\n\n// CUSTOM ERRORS\n// =============\n\n// Simplified versions from Node, changed for Buffer-only usage\nconst errors = {}\nfunction E (sym, getMessage, Base) {\n errors[sym] = class NodeError extends Base {\n constructor () {\n super()\n\n Object.defineProperty(this, 'message', {\n value: getMessage.apply(this, arguments),\n writable: true,\n configurable: true\n })\n\n // Add the error code to the name to include it in the stack trace.\n this.name = `${this.name} [${sym}]`\n // Access the stack to generate the error message including the error code\n // from the name.\n this.stack // eslint-disable-line no-unused-expressions\n // Reset the name to the actual name.\n delete this.name\n }\n\n get code () {\n return sym\n }\n\n set code (value) {\n Object.defineProperty(this, 'code', {\n configurable: true,\n enumerable: true,\n value,\n writable: true\n })\n }\n\n toString () {\n return `${this.name} [${sym}]: ${this.message}`\n }\n }\n}\n\nE('ERR_BUFFER_OUT_OF_BOUNDS',\n function (name) {\n if (name) {\n return `${name} is outside of buffer bounds`\n }\n\n return 'Attempt to access memory outside buffer bounds'\n }, RangeError)\nE('ERR_INVALID_ARG_TYPE',\n function (name, actual) {\n return `The \"${name}\" argument must be of type number. Received type ${typeof actual}`\n }, TypeError)\nE('ERR_OUT_OF_RANGE',\n function (str, range, input) {\n let msg = `The value of \"${str}\" is out of range.`\n let received = input\n if (Number.isInteger(input) && Math.abs(input) > 2 ** 32) {\n received = addNumericalSeparator(String(input))\n } else if (typeof input === 'bigint') {\n received = String(input)\n if (input > BigInt(2) ** BigInt(32) || input < -(BigInt(2) ** BigInt(32))) {\n received = addNumericalSeparator(received)\n }\n received += 'n'\n }\n msg += ` It must be ${range}. Received ${received}`\n return msg\n }, RangeError)\n\nfunction addNumericalSeparator (val) {\n let res = ''\n let i = val.length\n const start = val[0] === '-' ? 1 : 0\n for (; i >= start + 4; i -= 3) {\n res = `_${val.slice(i - 3, i)}${res}`\n }\n return `${val.slice(0, i)}${res}`\n}\n\n// CHECK FUNCTIONS\n// ===============\n\nfunction checkBounds (buf, offset, byteLength) {\n validateNumber(offset, 'offset')\n if (buf[offset] === undefined || buf[offset + byteLength] === undefined) {\n boundsError(offset, buf.length - (byteLength + 1))\n }\n}\n\nfunction checkIntBI (value, min, max, buf, offset, byteLength) {\n if (value > max || value < min) {\n const n = typeof min === 'bigint' ? 'n' : ''\n let range\n if (byteLength > 3) {\n if (min === 0 || min === BigInt(0)) {\n range = `>= 0${n} and < 2${n} ** ${(byteLength + 1) * 8}${n}`\n } else {\n range = `>= -(2${n} ** ${(byteLength + 1) * 8 - 1}${n}) and < 2 ** ` +\n `${(byteLength + 1) * 8 - 1}${n}`\n }\n } else {\n range = `>= ${min}${n} and <= ${max}${n}`\n }\n throw new errors.ERR_OUT_OF_RANGE('value', range, value)\n }\n checkBounds(buf, offset, byteLength)\n}\n\nfunction validateNumber (value, name) {\n if (typeof value !== 'number') {\n throw new errors.ERR_INVALID_ARG_TYPE(name, 'number', value)\n }\n}\n\nfunction boundsError (value, length, type) {\n if (Math.floor(value) !== value) {\n validateNumber(value, type)\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset', 'an integer', value)\n }\n\n if (length < 0) {\n throw new errors.ERR_BUFFER_OUT_OF_BOUNDS()\n }\n\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset',\n `>= ${type ? 1 : 0} and <= ${length}`,\n value)\n}\n\n// HELPER FUNCTIONS\n// ================\n\nconst INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n // Node takes equal signs as end of the Base64 encoding\n str = str.split('=')[0]\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = str.trim().replace(INVALID_BASE64_RE, '')\n // Node converts strings with length < 2 to ''\n if (str.length < 2) return ''\n // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n while (str.length % 4 !== 0) {\n str = str + '='\n }\n return str\n}\n\nfunction utf8ToBytes (string, units) {\n units = units || Infinity\n let codePoint\n const length = string.length\n let leadSurrogate = null\n const bytes = []\n\n for (let i = 0; i < length; ++i) {\n codePoint = string.charCodeAt(i)\n\n // is surrogate component\n if (codePoint > 0xD7FF && codePoint < 0xE000) {\n // last char was a lead\n if (!leadSurrogate) {\n // no lead yet\n if (codePoint > 0xDBFF) {\n // unexpected trail\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n } else if (i + 1 === length) {\n // unpaired lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n }\n\n // valid lead\n leadSurrogate = codePoint\n\n continue\n }\n\n // 2 leads in a row\n if (codePoint < 0xDC00) {\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n leadSurrogate = codePoint\n continue\n }\n\n // valid surrogate pair\n codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n } else if (leadSurrogate) {\n // valid bmp char, but last char was a lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n }\n\n leadSurrogate = null\n\n // encode utf8\n if (codePoint < 0x80) {\n if ((units -= 1) < 0) break\n bytes.push(codePoint)\n } else if (codePoint < 0x800) {\n if ((units -= 2) < 0) break\n bytes.push(\n codePoint >> 0x6 | 0xC0,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x10000) {\n if ((units -= 3) < 0) break\n bytes.push(\n codePoint >> 0xC | 0xE0,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x110000) {\n if ((units -= 4) < 0) break\n bytes.push(\n codePoint >> 0x12 | 0xF0,\n codePoint >> 0xC & 0x3F | 0x80,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else {\n throw new Error('Invalid code point')\n }\n }\n\n return bytes\n}\n\nfunction asciiToBytes (str) {\n const byteArray = []\n for (let i = 0; i < str.length; ++i) {\n // Node's code seems to be doing this and not & 0x7F..\n byteArray.push(str.charCodeAt(i) & 0xFF)\n }\n return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n let c, hi, lo\n const byteArray = []\n for (let i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0) break\n\n c = str.charCodeAt(i)\n hi = c >> 8\n lo = c % 256\n byteArray.push(lo)\n byteArray.push(hi)\n }\n\n return byteArray\n}\n\nfunction base64ToBytes (str) {\n return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n let i\n for (i = 0; i < length; ++i) {\n if ((i + offset >= dst.length) || (i >= src.length)) break\n dst[i + offset] = src[i]\n }\n return i\n}\n\n// ArrayBuffer or Uint8Array objects from other contexts (i.e. iframes) do not pass\n// the `instanceof` check but they should be treated as of that type.\n// See: https://github.com/feross/buffer/issues/166\nfunction isInstance (obj, type) {\n return obj instanceof type ||\n (obj != null && obj.constructor != null && obj.constructor.name != null &&\n obj.constructor.name === type.name)\n}\nfunction numberIsNaN (obj) {\n // For IE11 support\n return obj !== obj // eslint-disable-line no-self-compare\n}\n\n// Create lookup table for `toString('hex')`\n// See: https://github.com/feross/buffer/issues/219\nconst hexSliceLookupTable = (function () {\n const alphabet = '0123456789abcdef'\n const table = new Array(256)\n for (let i = 0; i < 16; ++i) {\n const i16 = i * 16\n for (let j = 0; j < 16; ++j) {\n table[i16 + j] = alphabet[i] + alphabet[j]\n }\n }\n return table\n})()\n\n// Return not function with Error if BigInt not supported\nfunction defineBigIntMethod (fn) {\n return typeof BigInt === 'undefined' ? BufferBigIntNotDefined : fn\n}\n\nfunction BufferBigIntNotDefined () {\n throw new Error('BigInt not supported')\n}\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\nvar R = typeof Reflect === 'object' ? Reflect : null\nvar ReflectApply = R && typeof R.apply === 'function'\n ? R.apply\n : function ReflectApply(target, receiver, args) {\n return Function.prototype.apply.call(target, receiver, args);\n }\n\nvar ReflectOwnKeys\nif (R && typeof R.ownKeys === 'function') {\n ReflectOwnKeys = R.ownKeys\n} else if (Object.getOwnPropertySymbols) {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target)\n .concat(Object.getOwnPropertySymbols(target));\n };\n} else {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target);\n };\n}\n\nfunction ProcessEmitWarning(warning) {\n if (console && console.warn) console.warn(warning);\n}\n\nvar NumberIsNaN = Number.isNaN || function NumberIsNaN(value) {\n return value !== value;\n}\n\nfunction EventEmitter() {\n EventEmitter.init.call(this);\n}\nmodule.exports = EventEmitter;\nmodule.exports.once = once;\n\n// Backwards-compat with node 0.10.x\nEventEmitter.EventEmitter = EventEmitter;\n\nEventEmitter.prototype._events = undefined;\nEventEmitter.prototype._eventsCount = 0;\nEventEmitter.prototype._maxListeners = undefined;\n\n// By default EventEmitters will print a warning if more than 10 listeners are\n// added to it. This is a useful default which helps finding memory leaks.\nvar defaultMaxListeners = 10;\n\nfunction checkListener(listener) {\n if (typeof listener !== 'function') {\n throw new TypeError('The \"listener\" argument must be of type Function. Received type ' + typeof listener);\n }\n}\n\nObject.defineProperty(EventEmitter, 'defaultMaxListeners', {\n enumerable: true,\n get: function() {\n return defaultMaxListeners;\n },\n set: function(arg) {\n if (typeof arg !== 'number' || arg < 0 || NumberIsNaN(arg)) {\n throw new RangeError('The value of \"defaultMaxListeners\" is out of range. It must be a non-negative number. Received ' + arg + '.');\n }\n defaultMaxListeners = arg;\n }\n});\n\nEventEmitter.init = function() {\n\n if (this._events === undefined ||\n this._events === Object.getPrototypeOf(this)._events) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n }\n\n this._maxListeners = this._maxListeners || undefined;\n};\n\n// Obviously not all Emitters should be limited to 10. This function allows\n// that to be increased. Set to zero for unlimited.\nEventEmitter.prototype.setMaxListeners = function setMaxListeners(n) {\n if (typeof n !== 'number' || n < 0 || NumberIsNaN(n)) {\n throw new RangeError('The value of \"n\" is out of range. It must be a non-negative number. Received ' + n + '.');\n }\n this._maxListeners = n;\n return this;\n};\n\nfunction _getMaxListeners(that) {\n if (that._maxListeners === undefined)\n return EventEmitter.defaultMaxListeners;\n return that._maxListeners;\n}\n\nEventEmitter.prototype.getMaxListeners = function getMaxListeners() {\n return _getMaxListeners(this);\n};\n\nEventEmitter.prototype.emit = function emit(type) {\n var args = [];\n for (var i = 1; i < arguments.length; i++) args.push(arguments[i]);\n var doError = (type === 'error');\n\n var events = this._events;\n if (events !== undefined)\n doError = (doError && events.error === undefined);\n else if (!doError)\n return false;\n\n // If there is no 'error' event listener then throw.\n if (doError) {\n var er;\n if (args.length > 0)\n er = args[0];\n if (er instanceof Error) {\n // Note: The comments on the `throw` lines are intentional, they show\n // up in Node's output if this results in an unhandled exception.\n throw er; // Unhandled 'error' event\n }\n // At least give some kind of context to the user\n var err = new Error('Unhandled error.' + (er ? ' (' + er.message + ')' : ''));\n err.context = er;\n throw err; // Unhandled 'error' event\n }\n\n var handler = events[type];\n\n if (handler === undefined)\n return false;\n\n if (typeof handler === 'function') {\n ReflectApply(handler, this, args);\n } else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n ReflectApply(listeners[i], this, args);\n }\n\n return true;\n};\n\nfunction _addListener(target, type, listener, prepend) {\n var m;\n var events;\n var existing;\n\n checkListener(listener);\n\n events = target._events;\n if (events === undefined) {\n events = target._events = Object.create(null);\n target._eventsCount = 0;\n } else {\n // To avoid recursion in the case that type === \"newListener\"! Before\n // adding it to the listeners, first emit \"newListener\".\n if (events.newListener !== undefined) {\n target.emit('newListener', type,\n listener.listener ? listener.listener : listener);\n\n // Re-assign `events` because a newListener handler could have caused the\n // this._events to be assigned to a new object\n events = target._events;\n }\n existing = events[type];\n }\n\n if (existing === undefined) {\n // Optimize the case of one listener. Don't need the extra array object.\n existing = events[type] = listener;\n ++target._eventsCount;\n } else {\n if (typeof existing === 'function') {\n // Adding the second element, need to change to array.\n existing = events[type] =\n prepend ? [listener, existing] : [existing, listener];\n // If we've already got an array, just append.\n } else if (prepend) {\n existing.unshift(listener);\n } else {\n existing.push(listener);\n }\n\n // Check for listener leak\n m = _getMaxListeners(target);\n if (m > 0 && existing.length > m && !existing.warned) {\n existing.warned = true;\n // No error code for this since it is a Warning\n // eslint-disable-next-line no-restricted-syntax\n var w = new Error('Possible EventEmitter memory leak detected. ' +\n existing.length + ' ' + String(type) + ' listeners ' +\n 'added. Use emitter.setMaxListeners() to ' +\n 'increase limit');\n w.name = 'MaxListenersExceededWarning';\n w.emitter = target;\n w.type = type;\n w.count = existing.length;\n ProcessEmitWarning(w);\n }\n }\n\n return target;\n}\n\nEventEmitter.prototype.addListener = function addListener(type, listener) {\n return _addListener(this, type, listener, false);\n};\n\nEventEmitter.prototype.on = EventEmitter.prototype.addListener;\n\nEventEmitter.prototype.prependListener =\n function prependListener(type, listener) {\n return _addListener(this, type, listener, true);\n };\n\nfunction onceWrapper() {\n if (!this.fired) {\n this.target.removeListener(this.type, this.wrapFn);\n this.fired = true;\n if (arguments.length === 0)\n return this.listener.call(this.target);\n return this.listener.apply(this.target, arguments);\n }\n}\n\nfunction _onceWrap(target, type, listener) {\n var state = { fired: false, wrapFn: undefined, target: target, type: type, listener: listener };\n var wrapped = onceWrapper.bind(state);\n wrapped.listener = listener;\n state.wrapFn = wrapped;\n return wrapped;\n}\n\nEventEmitter.prototype.once = function once(type, listener) {\n checkListener(listener);\n this.on(type, _onceWrap(this, type, listener));\n return this;\n};\n\nEventEmitter.prototype.prependOnceListener =\n function prependOnceListener(type, listener) {\n checkListener(listener);\n this.prependListener(type, _onceWrap(this, type, listener));\n return this;\n };\n\n// Emits a 'removeListener' event if and only if the listener was removed.\nEventEmitter.prototype.removeListener =\n function removeListener(type, listener) {\n var list, events, position, i, originalListener;\n\n checkListener(listener);\n\n events = this._events;\n if (events === undefined)\n return this;\n\n list = events[type];\n if (list === undefined)\n return this;\n\n if (list === listener || list.listener === listener) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else {\n delete events[type];\n if (events.removeListener)\n this.emit('removeListener', type, list.listener || listener);\n }\n } else if (typeof list !== 'function') {\n position = -1;\n\n for (i = list.length - 1; i >= 0; i--) {\n if (list[i] === listener || list[i].listener === listener) {\n originalListener = list[i].listener;\n position = i;\n break;\n }\n }\n\n if (position < 0)\n return this;\n\n if (position === 0)\n list.shift();\n else {\n spliceOne(list, position);\n }\n\n if (list.length === 1)\n events[type] = list[0];\n\n if (events.removeListener !== undefined)\n this.emit('removeListener', type, originalListener || listener);\n }\n\n return this;\n };\n\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\n\nEventEmitter.prototype.removeAllListeners =\n function removeAllListeners(type) {\n var listeners, events, i;\n\n events = this._events;\n if (events === undefined)\n return this;\n\n // not listening for removeListener, no need to emit\n if (events.removeListener === undefined) {\n if (arguments.length === 0) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n } else if (events[type] !== undefined) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else\n delete events[type];\n }\n return this;\n }\n\n // emit removeListener for all listeners on all events\n if (arguments.length === 0) {\n var keys = Object.keys(events);\n var key;\n for (i = 0; i < keys.length; ++i) {\n key = keys[i];\n if (key === 'removeListener') continue;\n this.removeAllListeners(key);\n }\n this.removeAllListeners('removeListener');\n this._events = Object.create(null);\n this._eventsCount = 0;\n return this;\n }\n\n listeners = events[type];\n\n if (typeof listeners === 'function') {\n this.removeListener(type, listeners);\n } else if (listeners !== undefined) {\n // LIFO order\n for (i = listeners.length - 1; i >= 0; i--) {\n this.removeListener(type, listeners[i]);\n }\n }\n\n return this;\n };\n\nfunction _listeners(target, type, unwrap) {\n var events = target._events;\n\n if (events === undefined)\n return [];\n\n var evlistener = events[type];\n if (evlistener === undefined)\n return [];\n\n if (typeof evlistener === 'function')\n return unwrap ? [evlistener.listener || evlistener] : [evlistener];\n\n return unwrap ?\n unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length);\n}\n\nEventEmitter.prototype.listeners = function listeners(type) {\n return _listeners(this, type, true);\n};\n\nEventEmitter.prototype.rawListeners = function rawListeners(type) {\n return _listeners(this, type, false);\n};\n\nEventEmitter.listenerCount = function(emitter, type) {\n if (typeof emitter.listenerCount === 'function') {\n return emitter.listenerCount(type);\n } else {\n return listenerCount.call(emitter, type);\n }\n};\n\nEventEmitter.prototype.listenerCount = listenerCount;\nfunction listenerCount(type) {\n var events = this._events;\n\n if (events !== undefined) {\n var evlistener = events[type];\n\n if (typeof evlistener === 'function') {\n return 1;\n } else if (evlistener !== undefined) {\n return evlistener.length;\n }\n }\n\n return 0;\n}\n\nEventEmitter.prototype.eventNames = function eventNames() {\n return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : [];\n};\n\nfunction arrayClone(arr, n) {\n var copy = new Array(n);\n for (var i = 0; i < n; ++i)\n copy[i] = arr[i];\n return copy;\n}\n\nfunction spliceOne(list, index) {\n for (; index + 1 < list.length; index++)\n list[index] = list[index + 1];\n list.pop();\n}\n\nfunction unwrapListeners(arr) {\n var ret = new Array(arr.length);\n for (var i = 0; i < ret.length; ++i) {\n ret[i] = arr[i].listener || arr[i];\n }\n return ret;\n}\n\nfunction once(emitter, name) {\n return new Promise(function (resolve, reject) {\n function errorListener(err) {\n emitter.removeListener(name, resolver);\n reject(err);\n }\n\n function resolver() {\n if (typeof emitter.removeListener === 'function') {\n emitter.removeListener('error', errorListener);\n }\n resolve([].slice.call(arguments));\n };\n\n eventTargetAgnosticAddListener(emitter, name, resolver, { once: true });\n if (name !== 'error') {\n addErrorHandlerIfEventEmitter(emitter, errorListener, { once: true });\n }\n });\n}\n\nfunction addErrorHandlerIfEventEmitter(emitter, handler, flags) {\n if (typeof emitter.on === 'function') {\n eventTargetAgnosticAddListener(emitter, 'error', handler, flags);\n }\n}\n\nfunction eventTargetAgnosticAddListener(emitter, name, listener, flags) {\n if (typeof emitter.on === 'function') {\n if (flags.once) {\n emitter.once(name, listener);\n } else {\n emitter.on(name, listener);\n }\n } else if (typeof emitter.addEventListener === 'function') {\n // EventTarget does not have `error` event semantics like Node\n // EventEmitters, we do not listen for `error` events here.\n emitter.addEventListener(name, function wrapListener(arg) {\n // IE does not have builtin `{ once: true }` support so we\n // have to do it manually.\n if (flags.once) {\n emitter.removeEventListener(name, wrapListener);\n }\n listener(arg);\n });\n } else {\n throw new TypeError('The \"emitter\" argument must be of type EventEmitter. Received type ' + typeof emitter);\n }\n}\n","/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */\nexports.read = function (buffer, offset, isLE, mLen, nBytes) {\n var e, m\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var nBits = -7\n var i = isLE ? (nBytes - 1) : 0\n var d = isLE ? -1 : 1\n var s = buffer[offset + i]\n\n i += d\n\n e = s & ((1 << (-nBits)) - 1)\n s >>= (-nBits)\n nBits += eLen\n for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & ((1 << (-nBits)) - 1)\n e >>= (-nBits)\n nBits += mLen\n for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias\n } else if (e === eMax) {\n return m ? NaN : ((s ? -1 : 1) * Infinity)\n } else {\n m = m + Math.pow(2, mLen)\n e = e - eBias\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n var i = isLE ? 0 : (nBytes - 1)\n var d = isLE ? 1 : -1\n var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n value = Math.abs(value)\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0\n e = eMax\n } else {\n e = Math.floor(Math.log(value) / Math.LN2)\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--\n c *= 2\n }\n if (e + eBias >= 1) {\n value += rt / c\n } else {\n value += rt * Math.pow(2, 1 - eBias)\n }\n if (value * c >= 2) {\n e++\n c /= 2\n }\n\n if (e + eBias >= eMax) {\n m = 0\n e = eMax\n } else if (e + eBias >= 1) {\n m = ((value * c) - 1) * Math.pow(2, mLen)\n e = e + eBias\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n e = 0\n }\n }\n\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n e = (e << mLen) | m\n eLen += mLen\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128\n}\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView');\n\nmodule.exports = DataView;\n","var hashClear = require('./_hashClear'),\n hashDelete = require('./_hashDelete'),\n hashGet = require('./_hashGet'),\n hashHas = require('./_hashHas'),\n hashSet = require('./_hashSet');\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\nmodule.exports = Hash;\n","var listCacheClear = require('./_listCacheClear'),\n listCacheDelete = require('./_listCacheDelete'),\n listCacheGet = require('./_listCacheGet'),\n listCacheHas = require('./_listCacheHas'),\n listCacheSet = require('./_listCacheSet');\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\nmodule.exports = ListCache;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map');\n\nmodule.exports = Map;\n","var mapCacheClear = require('./_mapCacheClear'),\n mapCacheDelete = require('./_mapCacheDelete'),\n mapCacheGet = require('./_mapCacheGet'),\n mapCacheHas = require('./_mapCacheHas'),\n mapCacheSet = require('./_mapCacheSet');\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\nmodule.exports = MapCache;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Promise = getNative(root, 'Promise');\n\nmodule.exports = Promise;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Set = getNative(root, 'Set');\n\nmodule.exports = Set;\n","var MapCache = require('./_MapCache'),\n setCacheAdd = require('./_setCacheAdd'),\n setCacheHas = require('./_setCacheHas');\n\n/**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\nfunction SetCache(values) {\n var index = -1,\n length = values == null ? 0 : values.length;\n\n this.__data__ = new MapCache;\n while (++index < length) {\n this.add(values[index]);\n }\n}\n\n// Add methods to `SetCache`.\nSetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\nSetCache.prototype.has = setCacheHas;\n\nmodule.exports = SetCache;\n","var ListCache = require('./_ListCache'),\n stackClear = require('./_stackClear'),\n stackDelete = require('./_stackDelete'),\n stackGet = require('./_stackGet'),\n stackHas = require('./_stackHas'),\n stackSet = require('./_stackSet');\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\nmodule.exports = Stack;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Uint8Array = root.Uint8Array;\n\nmodule.exports = Uint8Array;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar WeakMap = getNative(root, 'WeakMap');\n\nmodule.exports = WeakMap;\n","/**\n * A specialized version of `_.forEach` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\nfunction arrayEach(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (iteratee(array[index], index, array) === false) {\n break;\n }\n }\n return array;\n}\n\nmodule.exports = arrayEach;\n","/**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\nfunction arrayFilter(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result[resIndex++] = value;\n }\n }\n return result;\n}\n\nmodule.exports = arrayFilter;\n","var baseTimes = require('./_baseTimes'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isIndex = require('./_isIndex'),\n isTypedArray = require('./isTypedArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = arrayLikeKeys;\n","/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n}\n\nmodule.exports = arrayPush;\n","/**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\nfunction arraySome(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (predicate(array[index], index, array)) {\n return true;\n }\n }\n return false;\n}\n\nmodule.exports = arraySome;\n","var baseAssignValue = require('./_baseAssignValue'),\n eq = require('./eq');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\nmodule.exports = assignValue;\n","var eq = require('./eq');\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\nmodule.exports = assocIndexOf;\n","var copyObject = require('./_copyObject'),\n keys = require('./keys');\n\n/**\n * The base implementation of `_.assign` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssign(object, source) {\n return object && copyObject(source, keys(source), object);\n}\n\nmodule.exports = baseAssign;\n","var copyObject = require('./_copyObject'),\n keysIn = require('./keysIn');\n\n/**\n * The base implementation of `_.assignIn` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssignIn(object, source) {\n return object && copyObject(source, keysIn(source), object);\n}\n\nmodule.exports = baseAssignIn;\n","var defineProperty = require('./_defineProperty');\n\n/**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction baseAssignValue(object, key, value) {\n if (key == '__proto__' && defineProperty) {\n defineProperty(object, key, {\n 'configurable': true,\n 'enumerable': true,\n 'value': value,\n 'writable': true\n });\n } else {\n object[key] = value;\n }\n}\n\nmodule.exports = baseAssignValue;\n","var Stack = require('./_Stack'),\n arrayEach = require('./_arrayEach'),\n assignValue = require('./_assignValue'),\n baseAssign = require('./_baseAssign'),\n baseAssignIn = require('./_baseAssignIn'),\n cloneBuffer = require('./_cloneBuffer'),\n copyArray = require('./_copyArray'),\n copySymbols = require('./_copySymbols'),\n copySymbolsIn = require('./_copySymbolsIn'),\n getAllKeys = require('./_getAllKeys'),\n getAllKeysIn = require('./_getAllKeysIn'),\n getTag = require('./_getTag'),\n initCloneArray = require('./_initCloneArray'),\n initCloneByTag = require('./_initCloneByTag'),\n initCloneObject = require('./_initCloneObject'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isMap = require('./isMap'),\n isObject = require('./isObject'),\n isSet = require('./isSet'),\n keys = require('./keys'),\n keysIn = require('./keysIn');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_FLAT_FLAG = 2,\n CLONE_SYMBOLS_FLAG = 4;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values supported by `_.clone`. */\nvar cloneableTags = {};\ncloneableTags[argsTag] = cloneableTags[arrayTag] =\ncloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =\ncloneableTags[boolTag] = cloneableTags[dateTag] =\ncloneableTags[float32Tag] = cloneableTags[float64Tag] =\ncloneableTags[int8Tag] = cloneableTags[int16Tag] =\ncloneableTags[int32Tag] = cloneableTags[mapTag] =\ncloneableTags[numberTag] = cloneableTags[objectTag] =\ncloneableTags[regexpTag] = cloneableTags[setTag] =\ncloneableTags[stringTag] = cloneableTags[symbolTag] =\ncloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =\ncloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;\ncloneableTags[errorTag] = cloneableTags[funcTag] =\ncloneableTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.clone` and `_.cloneDeep` which tracks\n * traversed objects.\n *\n * @private\n * @param {*} value The value to clone.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Deep clone\n * 2 - Flatten inherited properties\n * 4 - Clone symbols\n * @param {Function} [customizer] The function to customize cloning.\n * @param {string} [key] The key of `value`.\n * @param {Object} [object] The parent object of `value`.\n * @param {Object} [stack] Tracks traversed objects and their clone counterparts.\n * @returns {*} Returns the cloned value.\n */\nfunction baseClone(value, bitmask, customizer, key, object, stack) {\n var result,\n isDeep = bitmask & CLONE_DEEP_FLAG,\n isFlat = bitmask & CLONE_FLAT_FLAG,\n isFull = bitmask & CLONE_SYMBOLS_FLAG;\n\n if (customizer) {\n result = object ? customizer(value, key, object, stack) : customizer(value);\n }\n if (result !== undefined) {\n return result;\n }\n if (!isObject(value)) {\n return value;\n }\n var isArr = isArray(value);\n if (isArr) {\n result = initCloneArray(value);\n if (!isDeep) {\n return copyArray(value, result);\n }\n } else {\n var tag = getTag(value),\n isFunc = tag == funcTag || tag == genTag;\n\n if (isBuffer(value)) {\n return cloneBuffer(value, isDeep);\n }\n if (tag == objectTag || tag == argsTag || (isFunc && !object)) {\n result = (isFlat || isFunc) ? {} : initCloneObject(value);\n if (!isDeep) {\n return isFlat\n ? copySymbolsIn(value, baseAssignIn(result, value))\n : copySymbols(value, baseAssign(result, value));\n }\n } else {\n if (!cloneableTags[tag]) {\n return object ? value : {};\n }\n result = initCloneByTag(value, tag, isDeep);\n }\n }\n // Check for circular references and return its corresponding clone.\n stack || (stack = new Stack);\n var stacked = stack.get(value);\n if (stacked) {\n return stacked;\n }\n stack.set(value, result);\n\n if (isSet(value)) {\n value.forEach(function(subValue) {\n result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));\n });\n } else if (isMap(value)) {\n value.forEach(function(subValue, key) {\n result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n }\n\n var keysFunc = isFull\n ? (isFlat ? getAllKeysIn : getAllKeys)\n : (isFlat ? keysIn : keys);\n\n var props = isArr ? undefined : keysFunc(value);\n arrayEach(props || value, function(subValue, key) {\n if (props) {\n key = subValue;\n subValue = value[key];\n }\n // Recursively populate clone (susceptible to call stack limits).\n assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n return result;\n}\n\nmodule.exports = baseClone;\n","var isObject = require('./isObject');\n\n/** Built-in value references. */\nvar objectCreate = Object.create;\n\n/**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} proto The object to inherit from.\n * @returns {Object} Returns the new object.\n */\nvar baseCreate = (function() {\n function object() {}\n return function(proto) {\n if (!isObject(proto)) {\n return {};\n }\n if (objectCreate) {\n return objectCreate(proto);\n }\n object.prototype = proto;\n var result = new object;\n object.prototype = undefined;\n return result;\n };\n}());\n\nmodule.exports = baseCreate;\n","var arrayPush = require('./_arrayPush'),\n isArray = require('./isArray');\n\n/**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction baseGetAllKeys(object, keysFunc, symbolsFunc) {\n var result = keysFunc(object);\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n}\n\nmodule.exports = baseGetAllKeys;\n","var Symbol = require('./_Symbol'),\n getRawTag = require('./_getRawTag'),\n objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]';\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\nmodule.exports = baseIsArguments;\n","var baseIsEqualDeep = require('./_baseIsEqualDeep'),\n isObjectLike = require('./isObjectLike');\n\n/**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Unordered comparison\n * 2 - Partial comparison\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\nfunction baseIsEqual(value, other, bitmask, customizer, stack) {\n if (value === other) {\n return true;\n }\n if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\n return value !== value && other !== other;\n }\n return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n}\n\nmodule.exports = baseIsEqual;\n","var Stack = require('./_Stack'),\n equalArrays = require('./_equalArrays'),\n equalByTag = require('./_equalByTag'),\n equalObjects = require('./_equalObjects'),\n getTag = require('./_getTag'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isTypedArray = require('./isTypedArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n var objIsArr = isArray(object),\n othIsArr = isArray(other),\n objTag = objIsArr ? arrayTag : getTag(object),\n othTag = othIsArr ? arrayTag : getTag(other);\n\n objTag = objTag == argsTag ? objectTag : objTag;\n othTag = othTag == argsTag ? objectTag : othTag;\n\n var objIsObj = objTag == objectTag,\n othIsObj = othTag == objectTag,\n isSameTag = objTag == othTag;\n\n if (isSameTag && isBuffer(object)) {\n if (!isBuffer(other)) {\n return false;\n }\n objIsArr = true;\n objIsObj = false;\n }\n if (isSameTag && !objIsObj) {\n stack || (stack = new Stack);\n return (objIsArr || isTypedArray(object))\n ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n }\n if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n if (objIsWrapped || othIsWrapped) {\n var objUnwrapped = objIsWrapped ? object.value() : object,\n othUnwrapped = othIsWrapped ? other.value() : other;\n\n stack || (stack = new Stack);\n return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n }\n }\n if (!isSameTag) {\n return false;\n }\n stack || (stack = new Stack);\n return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n}\n\nmodule.exports = baseIsEqualDeep;\n","var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]';\n\n/**\n * The base implementation of `_.isMap` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n */\nfunction baseIsMap(value) {\n return isObjectLike(value) && getTag(value) == mapTag;\n}\n\nmodule.exports = baseIsMap;\n","var isFunction = require('./isFunction'),\n isMasked = require('./_isMasked'),\n isObject = require('./isObject'),\n toSource = require('./_toSource');\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\nmodule.exports = baseIsNative;\n","var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar setTag = '[object Set]';\n\n/**\n * The base implementation of `_.isSet` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n */\nfunction baseIsSet(value) {\n return isObjectLike(value) && getTag(value) == setTag;\n}\n\nmodule.exports = baseIsSet;\n","var baseGetTag = require('./_baseGetTag'),\n isLength = require('./isLength'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n\nmodule.exports = baseIsTypedArray;\n","var isPrototype = require('./_isPrototype'),\n nativeKeys = require('./_nativeKeys');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeys;\n","var isObject = require('./isObject'),\n isPrototype = require('./_isPrototype'),\n nativeKeysIn = require('./_nativeKeysIn');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeysIn(object) {\n if (!isObject(object)) {\n return nativeKeysIn(object);\n }\n var isProto = isPrototype(object),\n result = [];\n\n for (var key in object) {\n if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeysIn;\n","/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\nmodule.exports = baseTimes;\n","/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n return function(value) {\n return func(value);\n };\n}\n\nmodule.exports = baseUnary;\n","/**\n * Checks if a `cache` value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction cacheHas(cache, key) {\n return cache.has(key);\n}\n\nmodule.exports = cacheHas;\n","var Uint8Array = require('./_Uint8Array');\n\n/**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\nfunction cloneArrayBuffer(arrayBuffer) {\n var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n return result;\n}\n\nmodule.exports = cloneArrayBuffer;\n","var root = require('./_root');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined,\n allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;\n\n/**\n * Creates a clone of `buffer`.\n *\n * @private\n * @param {Buffer} buffer The buffer to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Buffer} Returns the cloned buffer.\n */\nfunction cloneBuffer(buffer, isDeep) {\n if (isDeep) {\n return buffer.slice();\n }\n var length = buffer.length,\n result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\n\n buffer.copy(result);\n return result;\n}\n\nmodule.exports = cloneBuffer;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer');\n\n/**\n * Creates a clone of `dataView`.\n *\n * @private\n * @param {Object} dataView The data view to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned data view.\n */\nfunction cloneDataView(dataView, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;\n return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);\n}\n\nmodule.exports = cloneDataView;\n","/** Used to match `RegExp` flags from their coerced string values. */\nvar reFlags = /\\w*$/;\n\n/**\n * Creates a clone of `regexp`.\n *\n * @private\n * @param {Object} regexp The regexp to clone.\n * @returns {Object} Returns the cloned regexp.\n */\nfunction cloneRegExp(regexp) {\n var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));\n result.lastIndex = regexp.lastIndex;\n return result;\n}\n\nmodule.exports = cloneRegExp;\n","var Symbol = require('./_Symbol');\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * Creates a clone of the `symbol` object.\n *\n * @private\n * @param {Object} symbol The symbol object to clone.\n * @returns {Object} Returns the cloned symbol object.\n */\nfunction cloneSymbol(symbol) {\n return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};\n}\n\nmodule.exports = cloneSymbol;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer');\n\n/**\n * Creates a clone of `typedArray`.\n *\n * @private\n * @param {Object} typedArray The typed array to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned typed array.\n */\nfunction cloneTypedArray(typedArray, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n}\n\nmodule.exports = cloneTypedArray;\n","/**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\nfunction copyArray(source, array) {\n var index = -1,\n length = source.length;\n\n array || (array = Array(length));\n while (++index < length) {\n array[index] = source[index];\n }\n return array;\n}\n\nmodule.exports = copyArray;\n","var assignValue = require('./_assignValue'),\n baseAssignValue = require('./_baseAssignValue');\n\n/**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\nfunction copyObject(source, props, object, customizer) {\n var isNew = !object;\n object || (object = {});\n\n var index = -1,\n length = props.length;\n\n while (++index < length) {\n var key = props[index];\n\n var newValue = customizer\n ? customizer(object[key], source[key], key, object, source)\n : undefined;\n\n if (newValue === undefined) {\n newValue = source[key];\n }\n if (isNew) {\n baseAssignValue(object, key, newValue);\n } else {\n assignValue(object, key, newValue);\n }\n }\n return object;\n}\n\nmodule.exports = copyObject;\n","var copyObject = require('./_copyObject'),\n getSymbols = require('./_getSymbols');\n\n/**\n * Copies own symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbols(source, object) {\n return copyObject(source, getSymbols(source), object);\n}\n\nmodule.exports = copySymbols;\n","var copyObject = require('./_copyObject'),\n getSymbolsIn = require('./_getSymbolsIn');\n\n/**\n * Copies own and inherited symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbolsIn(source, object) {\n return copyObject(source, getSymbolsIn(source), object);\n}\n\nmodule.exports = copySymbolsIn;\n","var root = require('./_root');\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\nmodule.exports = coreJsData;\n","var getNative = require('./_getNative');\n\nvar defineProperty = (function() {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n}());\n\nmodule.exports = defineProperty;\n","var SetCache = require('./_SetCache'),\n arraySome = require('./_arraySome'),\n cacheHas = require('./_cacheHas');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\nfunction equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n arrLength = array.length,\n othLength = other.length;\n\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n return false;\n }\n // Check that cyclic values are equal.\n var arrStacked = stack.get(array);\n var othStacked = stack.get(other);\n if (arrStacked && othStacked) {\n return arrStacked == other && othStacked == array;\n }\n var index = -1,\n result = true,\n seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n stack.set(array, other);\n stack.set(other, array);\n\n // Ignore non-index properties.\n while (++index < arrLength) {\n var arrValue = array[index],\n othValue = other[index];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, arrValue, index, other, array, stack)\n : customizer(arrValue, othValue, index, array, other, stack);\n }\n if (compared !== undefined) {\n if (compared) {\n continue;\n }\n result = false;\n break;\n }\n // Recursively compare arrays (susceptible to call stack limits).\n if (seen) {\n if (!arraySome(other, function(othValue, othIndex) {\n if (!cacheHas(seen, othIndex) &&\n (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n return seen.push(othIndex);\n }\n })) {\n result = false;\n break;\n }\n } else if (!(\n arrValue === othValue ||\n equalFunc(arrValue, othValue, bitmask, customizer, stack)\n )) {\n result = false;\n break;\n }\n }\n stack['delete'](array);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalArrays;\n","var Symbol = require('./_Symbol'),\n Uint8Array = require('./_Uint8Array'),\n eq = require('./eq'),\n equalArrays = require('./_equalArrays'),\n mapToArray = require('./_mapToArray'),\n setToArray = require('./_setToArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]';\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n switch (tag) {\n case dataViewTag:\n if ((object.byteLength != other.byteLength) ||\n (object.byteOffset != other.byteOffset)) {\n return false;\n }\n object = object.buffer;\n other = other.buffer;\n\n case arrayBufferTag:\n if ((object.byteLength != other.byteLength) ||\n !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n return false;\n }\n return true;\n\n case boolTag:\n case dateTag:\n case numberTag:\n // Coerce booleans to `1` or `0` and dates to milliseconds.\n // Invalid dates are coerced to `NaN`.\n return eq(+object, +other);\n\n case errorTag:\n return object.name == other.name && object.message == other.message;\n\n case regexpTag:\n case stringTag:\n // Coerce regexes to strings and treat strings, primitives and objects,\n // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n // for more details.\n return object == (other + '');\n\n case mapTag:\n var convert = mapToArray;\n\n case setTag:\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n convert || (convert = setToArray);\n\n if (object.size != other.size && !isPartial) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked) {\n return stacked == other;\n }\n bitmask |= COMPARE_UNORDERED_FLAG;\n\n // Recursively compare objects (susceptible to call stack limits).\n stack.set(object, other);\n var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n stack['delete'](object);\n return result;\n\n case symbolTag:\n if (symbolValueOf) {\n return symbolValueOf.call(object) == symbolValueOf.call(other);\n }\n }\n return false;\n}\n\nmodule.exports = equalByTag;\n","var getAllKeys = require('./_getAllKeys');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n objProps = getAllKeys(object),\n objLength = objProps.length,\n othProps = getAllKeys(other),\n othLength = othProps.length;\n\n if (objLength != othLength && !isPartial) {\n return false;\n }\n var index = objLength;\n while (index--) {\n var key = objProps[index];\n if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n return false;\n }\n }\n // Check that cyclic values are equal.\n var objStacked = stack.get(object);\n var othStacked = stack.get(other);\n if (objStacked && othStacked) {\n return objStacked == other && othStacked == object;\n }\n var result = true;\n stack.set(object, other);\n stack.set(other, object);\n\n var skipCtor = isPartial;\n while (++index < objLength) {\n key = objProps[index];\n var objValue = object[key],\n othValue = other[key];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, objValue, key, other, object, stack)\n : customizer(objValue, othValue, key, object, other, stack);\n }\n // Recursively compare objects (susceptible to call stack limits).\n if (!(compared === undefined\n ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n : compared\n )) {\n result = false;\n break;\n }\n skipCtor || (skipCtor = key == 'constructor');\n }\n if (result && !skipCtor) {\n var objCtor = object.constructor,\n othCtor = other.constructor;\n\n // Non `Object` object instances with different constructors are not equal.\n if (objCtor != othCtor &&\n ('constructor' in object && 'constructor' in other) &&\n !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n result = false;\n }\n }\n stack['delete'](object);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalObjects;\n","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n","var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbols = require('./_getSymbols'),\n keys = require('./keys');\n\n/**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeys(object) {\n return baseGetAllKeys(object, keys, getSymbols);\n}\n\nmodule.exports = getAllKeys;\n","var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbolsIn = require('./_getSymbolsIn'),\n keysIn = require('./keysIn');\n\n/**\n * Creates an array of own and inherited enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeysIn(object) {\n return baseGetAllKeys(object, keysIn, getSymbolsIn);\n}\n\nmodule.exports = getAllKeysIn;\n","var isKeyable = require('./_isKeyable');\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\nmodule.exports = getMapData;\n","var baseIsNative = require('./_baseIsNative'),\n getValue = require('./_getValue');\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\nmodule.exports = getNative;\n","var overArg = require('./_overArg');\n\n/** Built-in value references. */\nvar getPrototype = overArg(Object.getPrototypeOf, Object);\n\nmodule.exports = getPrototype;\n","var Symbol = require('./_Symbol');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nmodule.exports = getRawTag;\n","var arrayFilter = require('./_arrayFilter'),\n stubArray = require('./stubArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n if (object == null) {\n return [];\n }\n object = Object(object);\n return arrayFilter(nativeGetSymbols(object), function(symbol) {\n return propertyIsEnumerable.call(object, symbol);\n });\n};\n\nmodule.exports = getSymbols;\n","var arrayPush = require('./_arrayPush'),\n getPrototype = require('./_getPrototype'),\n getSymbols = require('./_getSymbols'),\n stubArray = require('./stubArray');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own and inherited enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {\n var result = [];\n while (object) {\n arrayPush(result, getSymbols(object));\n object = getPrototype(object);\n }\n return result;\n};\n\nmodule.exports = getSymbolsIn;\n","var DataView = require('./_DataView'),\n Map = require('./_Map'),\n Promise = require('./_Promise'),\n Set = require('./_Set'),\n WeakMap = require('./_WeakMap'),\n baseGetTag = require('./_baseGetTag'),\n toSource = require('./_toSource');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n setTag = '[object Set]',\n weakMapTag = '[object WeakMap]';\n\nvar dataViewTag = '[object DataView]';\n\n/** Used to detect maps, sets, and weakmaps. */\nvar dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nvar getTag = baseGetTag;\n\n// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\nif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = baseGetTag(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : '';\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n}\n\nmodule.exports = getTag;\n","/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\nmodule.exports = getValue;\n","var nativeCreate = require('./_nativeCreate');\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n}\n\nmodule.exports = hashClear;\n","/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = hashDelete;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\nmodule.exports = hashGet;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\nmodule.exports = hashHas;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\nmodule.exports = hashSet;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Initializes an array clone.\n *\n * @private\n * @param {Array} array The array to clone.\n * @returns {Array} Returns the initialized clone.\n */\nfunction initCloneArray(array) {\n var length = array.length,\n result = new array.constructor(length);\n\n // Add properties assigned by `RegExp#exec`.\n if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {\n result.index = array.index;\n result.input = array.input;\n }\n return result;\n}\n\nmodule.exports = initCloneArray;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer'),\n cloneDataView = require('./_cloneDataView'),\n cloneRegExp = require('./_cloneRegExp'),\n cloneSymbol = require('./_cloneSymbol'),\n cloneTypedArray = require('./_cloneTypedArray');\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/**\n * Initializes an object clone based on its `toStringTag`.\n *\n * **Note:** This function only supports cloning values with tags of\n * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.\n *\n * @private\n * @param {Object} object The object to clone.\n * @param {string} tag The `toStringTag` of the object to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneByTag(object, tag, isDeep) {\n var Ctor = object.constructor;\n switch (tag) {\n case arrayBufferTag:\n return cloneArrayBuffer(object);\n\n case boolTag:\n case dateTag:\n return new Ctor(+object);\n\n case dataViewTag:\n return cloneDataView(object, isDeep);\n\n case float32Tag: case float64Tag:\n case int8Tag: case int16Tag: case int32Tag:\n case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:\n return cloneTypedArray(object, isDeep);\n\n case mapTag:\n return new Ctor;\n\n case numberTag:\n case stringTag:\n return new Ctor(object);\n\n case regexpTag:\n return cloneRegExp(object);\n\n case setTag:\n return new Ctor;\n\n case symbolTag:\n return cloneSymbol(object);\n }\n}\n\nmodule.exports = initCloneByTag;\n","var baseCreate = require('./_baseCreate'),\n getPrototype = require('./_getPrototype'),\n isPrototype = require('./_isPrototype');\n\n/**\n * Initializes an object clone.\n *\n * @private\n * @param {Object} object The object to clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneObject(object) {\n return (typeof object.constructor == 'function' && !isPrototype(object))\n ? baseCreate(getPrototype(object))\n : {};\n}\n\nmodule.exports = initCloneObject;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n var type = typeof value;\n length = length == null ? MAX_SAFE_INTEGER : length;\n\n return !!length &&\n (type == 'number' ||\n (type != 'symbol' && reIsUint.test(value))) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\nmodule.exports = isIndex;\n","/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\nmodule.exports = isKeyable;\n","var coreJsData = require('./_coreJsData');\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\nmodule.exports = isMasked;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\nmodule.exports = isPrototype;\n","/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n}\n\nmodule.exports = listCacheClear;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype;\n\n/** Built-in value references. */\nvar splice = arrayProto.splice;\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n}\n\nmodule.exports = listCacheDelete;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\nmodule.exports = listCacheGet;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\nmodule.exports = listCacheHas;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\nmodule.exports = listCacheSet;\n","var Hash = require('./_Hash'),\n ListCache = require('./_ListCache'),\n Map = require('./_Map');\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\nmodule.exports = mapCacheClear;\n","var getMapData = require('./_getMapData');\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = mapCacheDelete;\n","var getMapData = require('./_getMapData');\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\nmodule.exports = mapCacheGet;\n","var getMapData = require('./_getMapData');\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\nmodule.exports = mapCacheHas;\n","var getMapData = require('./_getMapData');\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n}\n\nmodule.exports = mapCacheSet;\n","/**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\nfunction mapToArray(map) {\n var index = -1,\n result = Array(map.size);\n\n map.forEach(function(value, key) {\n result[++index] = [key, value];\n });\n return result;\n}\n\nmodule.exports = mapToArray;\n","var getNative = require('./_getNative');\n\n/* Built-in method references that are verified to be native. */\nvar nativeCreate = getNative(Object, 'create');\n\nmodule.exports = nativeCreate;\n","var overArg = require('./_overArg');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeKeys = overArg(Object.keys, Object);\n\nmodule.exports = nativeKeys;\n","/**\n * This function is like\n * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * except that it includes inherited enumerable properties.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction nativeKeysIn(object) {\n var result = [];\n if (object != null) {\n for (var key in Object(object)) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = nativeKeysIn;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n try {\n // Use `util.types` for Node.js 10+.\n var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n if (types) {\n return types;\n }\n\n // Legacy `process.binding('util')` for Node.js < 10.\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n}());\n\nmodule.exports = nodeUtil;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n","/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\nmodule.exports = overArg;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n","/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\nfunction setCacheAdd(value) {\n this.__data__.set(value, HASH_UNDEFINED);\n return this;\n}\n\nmodule.exports = setCacheAdd;\n","/**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\nfunction setCacheHas(value) {\n return this.__data__.has(value);\n}\n\nmodule.exports = setCacheHas;\n","/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\nfunction setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n}\n\nmodule.exports = setToArray;\n","var ListCache = require('./_ListCache');\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}\n\nmodule.exports = stackClear;\n","/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n var data = this.__data__,\n result = data['delete'](key);\n\n this.size = data.size;\n return result;\n}\n\nmodule.exports = stackDelete;\n","/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n return this.__data__.get(key);\n}\n\nmodule.exports = stackGet;\n","/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n return this.__data__.has(key);\n}\n\nmodule.exports = stackHas;\n","var ListCache = require('./_ListCache'),\n Map = require('./_Map'),\n MapCache = require('./_MapCache');\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n var data = this.__data__;\n if (data instanceof ListCache) {\n var pairs = data.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n this.size = ++data.size;\n return this;\n }\n data = this.__data__ = new MapCache(pairs);\n }\n data.set(key, value);\n this.size = data.size;\n return this;\n}\n\nmodule.exports = stackSet;\n","/** Used for built-in method references. */\nvar funcProto = Function.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\nmodule.exports = toSource;\n","var baseClone = require('./_baseClone');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_SYMBOLS_FLAG = 4;\n\n/**\n * This method is like `_.clone` except that it recursively clones `value`.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Lang\n * @param {*} value The value to recursively clone.\n * @returns {*} Returns the deep cloned value.\n * @see _.clone\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var deep = _.cloneDeep(objects);\n * console.log(deep[0] === objects[0]);\n * // => false\n */\nfunction cloneDeep(value) {\n return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);\n}\n\nmodule.exports = cloneDeep;\n","/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\nmodule.exports = eq;\n","var baseIsArguments = require('./_baseIsArguments'),\n isObjectLike = require('./isObjectLike');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n};\n\nmodule.exports = isArguments;\n","/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\nmodule.exports = isArray;\n","var isFunction = require('./isFunction'),\n isLength = require('./isLength');\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\nmodule.exports = isArrayLike;\n","var root = require('./_root'),\n stubFalse = require('./stubFalse');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\nmodule.exports = isBuffer;\n","var baseIsEqual = require('./_baseIsEqual');\n\n/**\n * Performs a deep comparison between two values to determine if they are\n * equivalent.\n *\n * **Note:** This method supports comparing arrays, array buffers, booleans,\n * date objects, error objects, maps, numbers, `Object` objects, regexes,\n * sets, strings, symbols, and typed arrays. `Object` objects are compared\n * by their own, not inherited, enumerable properties. Functions and DOM\n * nodes are compared by strict equality, i.e. `===`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.isEqual(object, other);\n * // => true\n *\n * object === other;\n * // => false\n */\nfunction isEqual(value, other) {\n return baseIsEqual(value, other);\n}\n\nmodule.exports = isEqual;\n","var baseGetTag = require('./_baseGetTag'),\n isObject = require('./isObject');\n\n/** `Object#toString` result references. */\nvar asyncTag = '[object AsyncFunction]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n proxyTag = '[object Proxy]';\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\nmodule.exports = isFunction;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\nmodule.exports = isLength;\n","var baseIsMap = require('./_baseIsMap'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsMap = nodeUtil && nodeUtil.isMap;\n\n/**\n * Checks if `value` is classified as a `Map` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n * @example\n *\n * _.isMap(new Map);\n * // => true\n *\n * _.isMap(new WeakMap);\n * // => false\n */\nvar isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;\n\nmodule.exports = isMap;\n","/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n","var baseIsSet = require('./_baseIsSet'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsSet = nodeUtil && nodeUtil.isSet;\n\n/**\n * Checks if `value` is classified as a `Set` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n * @example\n *\n * _.isSet(new Set);\n * // => true\n *\n * _.isSet(new WeakSet);\n * // => false\n */\nvar isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;\n\nmodule.exports = isSet;\n","var baseIsTypedArray = require('./_baseIsTypedArray'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\nmodule.exports = isTypedArray;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeys = require('./_baseKeys'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\nmodule.exports = keys;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeysIn = require('./_baseKeysIn'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\nfunction keysIn(object) {\n return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n}\n\nmodule.exports = keysIn;\n","/**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\nfunction stubArray() {\n return [];\n}\n\nmodule.exports = stubArray;\n","/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n return false;\n}\n\nmodule.exports = stubFalse;\n","import type { AppIdentifier } from \"@finos/fdc3\";\nimport type OpenFin from \"@openfin/core\";\nimport type { PlatformApp, AppResolverResponse, AppResolverOptions } from \"../../shapes/app-shapes\";\nimport type { Logger } from \"../../shapes/logger-shapes\";\nimport { getApps, launch } from \"./apps\";\n\n/**\n * An App Resolver Used for resolving app selection.\n */\nexport class AppResolverHelper {\n\tprivate readonly _logger: Logger;\n\n\tprivate readonly _appResolverOptions?: AppResolverOptions;\n\n\tprivate readonly _defaultAppResolverHeight: number;\n\n\tprivate readonly _defaultAppResolverWidth: number;\n\n\tprivate readonly _dialogElement: HTMLDialogElement | null = null;\n\n\tprivate _dialogClient: OpenFin.ChannelClient | null = null;\n\n\t/**\n\t * Create an instance of the Intent Resolver Helper.\n\t * @param appResolverOptions options for the helper\n\t * @param logger the logger to use.\n\t */\n\tconstructor(appResolverOptions: AppResolverOptions, logger: Logger) {\n\t\tthis._defaultAppResolverHeight = 715;\n\t\tthis._defaultAppResolverWidth = 665;\n\t\tthis._appResolverOptions = {\n\t\t\theight: this._defaultAppResolverHeight,\n\t\t\twidth: this._defaultAppResolverWidth,\n\t\t\t...appResolverOptions\n\t\t};\n\t\tthis._logger = logger;\n\t\tthis._dialogElement = document.createElement(\"dialog\");\n\t\tthis._dialogElement.id = \"app-resolver-dialog\";\n\t\tthis._dialogElement.style.height = `${this._appResolverOptions.height}px`;\n\t\tthis._dialogElement.style.width = `${this._appResolverOptions.width}px`;\n\t\tthis._dialogElement.style.padding = \"0px\";\n\t\tthis._dialogElement.style.backgroundColor = \"var(--brand-background)\";\n\t\t// Create a new iframe element\n\t\tconst appPicker = document.createElement(\"iframe\");\n\n\t\t// Set the source of the iframe\n\t\tappPicker.src = appResolverOptions.url;\n\t\tappPicker.style.height = \"99%\";\n\t\tappPicker.style.width = \"100%\";\n\n\t\t// Append the iframe to the dialog\n\t\tthis._dialogElement.append(appPicker);\n\n\t\t// Append the dialog to the body\n\t\tdocument.body.append(this._dialogElement);\n\t}\n\n\t/**\n\t * Launch the app resolver.\n\t * @returns Nothing as it handles the display and hiding of the resolver.\n\t */\n\tpublic async launchAppResolver(): Promise {\n\t\tif (this._dialogElement) {\n\t\t\tthis._dialogElement.showModal();\n\t\t}\n\t\tif (!this._dialogClient && this._dialogClient === null) {\n\t\t\tconst appResolverChannel = \"app-resolver\";\n\t\t\tconsole.log(\"Connecting to picker\", appResolverChannel);\n\t\t\tthis._dialogClient = await fin.InterApplicationBus.Channel.connect(appResolverChannel);\n\n\t\t\t// eslint-disable-next-line @typescript-eslint/await-thenable\n\t\t\tawait this._dialogClient.register(\"app-resolver-response\", async (payload, sender) => {\n\t\t\t\tconst response = payload as {\n\t\t\t\t\tappResolverResponse?: AppResolverResponse;\n\t\t\t\t\terrorMessage?: string;\n\t\t\t\t\ttarget?: {\n\t\t\t\t\t\tlayout: boolean;\n\t\t\t\t\t};\n\t\t\t\t};\n\t\t\t\tthis._logger.info(\"Received app resolver message\", payload);\n\t\t\t\tif (response.errorMessage) {\n\t\t\t\t\tthis._logger.error(\"There was an error with the loaded App Resolver\", response.errorMessage);\n\t\t\t\t} else if (response.appResolverResponse === undefined) {\n\t\t\t\t\tthis._logger.info(\"App Resolver response is undefined. No app was selected.\");\n\t\t\t\t} else {\n\t\t\t\t\tthis._logger.info(\"The following app was selected: \", response.appResolverResponse);\n\t\t\t\t\tif (window.fdc3 !== undefined && response.target === undefined) {\n\t\t\t\t\t\tawait window.fdc3.open(response.appResolverResponse as AppIdentifier);\n\t\t\t\t\t} else if (response.appResolverResponse?.appId) {\n\t\t\t\t\t\tawait launch(response.appResolverResponse.appId, response.target);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (this._dialogElement) {\n\t\t\t\t\tthis._dialogElement.close();\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\tif (this._dialogElement && this._dialogClient) {\n\t\t\tconst apps: PlatformApp[] = await getApps();\n\t\t\tawait this._dialogClient.dispatch(\"resolve-app-request\", {\n\t\t\t\tcustomData: {\n\t\t\t\t\ttitle: this._appResolverOptions?.title,\n\t\t\t\t\tapps\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n}\n","import type { PlatformApp, PlatformAppIdentifier } from \"../../shapes/app-shapes\";\nimport type { PlatformLayoutSnapshot } from \"../../shapes/layout-shapes\";\nimport { isEmpty, randomUUID } from \"../../utils\";\nimport { getSettings } from \"../settings/settings\";\n\nlet cachedApps: PlatformApp[] | undefined;\n\n/**\n * The the app by its id.\n * @param appId The id of the requested app.\n * @returns The app if it was found.\n */\nexport async function getApp(appId: string): Promise {\n\tconst apps = await getApps();\n\tconst foundApp = apps.find(\n\t\t(app) => app.appId === appId || (app.type === \"web\" && app.details.url === appId)\n\t);\n\treturn foundApp;\n}\n\n/**\n * Get the list of applications and filter if requested.\n * @returns The list of application.\n */\nexport async function getApps(): Promise {\n\tif (cachedApps) {\n\t\treturn cachedApps;\n\t}\n\tconst settings = await getSettings();\n\tif (Array.isArray(settings?.platform?.app?.directory)) {\n\t\t// Fetch data from all URLs concurrently\n\t\tconst responses = await Promise.all(settings.platform.app.directory.map(async (url) => fetch(url)));\n\t\t// Parse the JSON from all responses\n\t\tconst appDirectories = await Promise.all(responses.map(async (response) => response.json()));\n\t\t// Combine all applications into a single array\n\t\tcachedApps = appDirectories.flatMap((appDirectory) => appDirectory.applications);\n\t\treturn cachedApps;\n\t}\n\tcachedApps = [];\n\treturn cachedApps;\n}\n\n/**\n * Launch an application in the way specified by its manifest type.\n * @param platformApp The application to launch or it's id.\n * @param target The target layout to launch the app in.\n * @param target.layout target the current layout\n * @returns Identifiers specific to the type of application launched.\n */\nexport async function launch(\n\tplatformApp: PlatformApp | string,\n\ttarget?: { layout: boolean }\n): Promise {\n\ttry {\n\t\tlet appToLaunch: PlatformApp | undefined;\n\t\tif (typeof platformApp === \"string\") {\n\t\t\tappToLaunch = await getApp(platformApp);\n\t\t} else {\n\t\t\tappToLaunch = platformApp;\n\t\t}\n\t\tif (!appToLaunch) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst name = `${appToLaunch.appId}/${randomUUID()}`;\n\t\tconst uuid = fin.me.identity.uuid;\n\t\tconst appId = appToLaunch.appId;\n\n\t\tif (target?.layout) {\n\t\t\tawait window?.fin?.Platform.Layout.getCurrentSync().addView({\n\t\t\t\tname,\n\t\t\t\turl: appToLaunch.details.url,\n\t\t\t\t// @ts-expect-error title will be exposed in the next release\n\t\t\t\ttitle: appToLaunch.title\n\t\t\t});\n\t\t} else {\n\t\t\tconst currentLayout = window.fin?.Platform.Layout.getCurrentLayoutManagerSync();\n\t\t\tconst layoutId = `tab-${randomUUID()}`;\n\t\t\tconst appSnapshot = getAppLayout(appToLaunch, layoutId, name);\n\t\t\tawait currentLayout?.applyLayoutSnapshot(appSnapshot);\n\t\t}\n\t\treturn [{ name, uuid, appId }];\n\t} catch (error) {\n\t\tconsole.error(\"Error launching app\", error);\n\t\treturn undefined;\n\t}\n}\n\n/**\n * Brings the targeted app to front.\n * @param platformApp The app to bring to front.\n * @param targets The list of apps to bring to front.\n */\nexport async function bringAppToFront(\n\tplatformApp: PlatformApp,\n\ttargets: PlatformAppIdentifier[]\n): Promise {\n\tconst currentLayout = window.fin?.Platform.Layout.getCurrentLayoutManagerSync();\n\tif (!isEmpty(currentLayout)) {\n\t\tfor (const target of targets) {\n\t\t\tconst targetLayout = currentLayout.getLayoutIdentityForView(target);\n\t\t\tif (targetLayout === undefined) {\n\t\t\t\tconsole.error(\"Target layout for view not found\");\n\t\t\t} else {\n\t\t\t\tawait currentLayout.showLayout(targetLayout);\n\t\t\t}\n\t\t}\n\t}\n}\n\n/**\n * Get the layout for the application.\n * @param platformApp The application to get the layout for.\n * @param layoutId The id of the layout to create for the app.\n * @param viewName The name of the view to create.\n * @returns The layout options.\n */\nfunction getAppLayout(platformApp: PlatformApp, layoutId: string, viewName: string): PlatformLayoutSnapshot {\n\tconst appSnapshot: PlatformLayoutSnapshot = {\n\t\tlayouts: {},\n\t\tlayoutTitles: {}\n\t};\n\tappSnapshot.layouts[layoutId] = {\n\t\tcontent: [\n\t\t\t{\n\t\t\t\ttype: \"row\",\n\t\t\t\tcontent: [\n\t\t\t\t\t{\n\t\t\t\t\t\ttype: \"column\",\n\t\t\t\t\t\twidth: 100,\n\t\t\t\t\t\tcontent: [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\ttype: \"stack\",\n\t\t\t\t\t\t\t\twidth: 50,\n\t\t\t\t\t\t\t\theight: 50,\n\t\t\t\t\t\t\t\tcontent: [\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\ttype: \"component\",\n\t\t\t\t\t\t\t\t\t\tcomponentName: \"view\",\n\t\t\t\t\t\t\t\t\t\tcomponentState: {\n\t\t\t\t\t\t\t\t\t\t\turl: platformApp.details.url,\n\t\t\t\t\t\t\t\t\t\t\tname: viewName\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\ttitle: platformApp.title\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t]\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t]\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t}\n\t\t]\n\t};\n\tappSnapshot.layoutTitles[layoutId] = platformApp.title ?? \"App Layout\";\n\treturn appSnapshot;\n}\n","import type OpenFin from \"@openfin/core\";\nimport type { PlatformApp } from \"../../shapes/app-shapes\";\nimport type { Logger } from \"../../shapes/logger-shapes\";\nimport { isEmpty } from \"../../utils\";\n\n/**\n * The AppIdHelper class provides helpful functions related to app ids.\n */\nexport class AppIdHelper {\n\tprivate readonly _validatedAppIds: string[] = [];\n\n\tprivate readonly _invalidAppIds: string[] = [];\n\n\tprivate readonly _appMap = new Map();\n\n\tprivate readonly _logger: Logger;\n\n\tprivate readonly _getApp: (appId: string) => Promise;\n\n\t/**\n\t * Provides helpful functions related to app ids.\n\t * @param getApp The function to use to get an app for validation.\n\t * @param logger The logger to use\n\t */\n\tconstructor(getApp: (appId: string) => Promise, logger: Logger) {\n\t\tthis._logger = logger;\n\t\tthis._getApp = getApp;\n\t}\n\n\t/**\n\t * Lookup an application identity.\n\t * @param clientIdentity The client identity to use.\n\t * @returns The application identity.\n\t */\n\tpublic async lookupAppId(clientIdentity: OpenFin.ClientIdentity): Promise {\n\t\tconst name: string = clientIdentity.name;\n\t\tlet appId: string | undefined;\n\t\tif (name.startsWith(\"internal-generated-\")) {\n\t\t\treturn;\n\t\t}\n\t\tconst nameParts = name.split(\"/\");\n\t\tif (nameParts.length === 1 || nameParts.length === 2) {\n\t\t\tappId = nameParts[0];\n\t\t} else {\n\t\t\tappId = `${nameParts[0]}/${nameParts[1]}`;\n\t\t}\n\n\t\tif (!isEmpty(appId)) {\n\t\t\tappId = await this.validateApp(appId);\n\t\t}\n\t\treturn appId;\n\t}\n\n\t/**\n\t * Validates the app id or url.\n\t * @param appId The id of the app if it has been determined.\n\t * @returns The validated app id or undefined if there is no match.\n\t */\n\tprivate async validateApp(appId: string): Promise {\n\t\tif (this._validatedAppIds.includes(appId)) {\n\t\t\treturn this._appMap.get(appId);\n\t\t}\n\t\tif (this._invalidAppIds.includes(appId)) {\n\t\t\treturn;\n\t\t}\n\t\t// perform a lookup to validate the appId\n\t\tconst app = await this._getApp(appId);\n\n\t\tif (!isEmpty(app)) {\n\t\t\tthis._validatedAppIds.push(appId);\n\t\t\tthis._appMap.set(appId, app.appId);\n\t\t\treturn app.appId;\n\t\t}\n\t\tthis._invalidAppIds.push(appId);\n\t\tthis._logger.warn(\n\t\t\t`AppId ${appId} does not exist in the directory and we do not have an unregistered app fallback. No app id will be returned as it is unconfirmed.`\n\t\t);\n\t}\n}\n","import type { AppIntents, PlatformApp, AppsForIntent } from \"../../shapes/app-shapes\";\nimport type { Logger } from \"../../shapes/logger-shapes\";\nimport { isEmpty } from \"../../utils\";\n\n/**\n * The App Intent Helper inspects app catalogs to discover supported intents and contexts.\n */\nexport class AppIntentHelper {\n\tprivate readonly _getApps: () => Promise;\n\n\tprivate readonly _logger: Logger;\n\n\t/**\n\t * Create an instance of the App Intent Helper.\n\t * @param getApps returns an array of Apps\n\t * @param logger the logger to use.\n\t */\n\tconstructor(getApps: () => Promise, logger: Logger) {\n\t\tthis._getApps = getApps;\n\t\tthis._logger = logger;\n\t}\n\n\t/**\n\t * Get the application that support the requested intent.\n\t * @param intent The intent the application must support.\n\t * @returns The list of application that support the intent.\n\t */\n\tpublic async getAppsByIntent(intent: string): Promise {\n\t\tconst apps = await this._getApps();\n\t\treturn apps.filter((app) => {\n\t\t\tconst listensFor = app.interop?.intents?.listensFor;\n\n\t\t\tif (isEmpty(listensFor)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tconst intentNames = Object.keys(listensFor);\n\t\t\tfor (const intentName of intentNames) {\n\t\t\t\tif (intentName.toLowerCase() === intent.toLowerCase()) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t});\n\t}\n\n\t/**\n\t * Get an intent and the apps that support it.\n\t * @param intent The intent to look for.\n\t * @param contextType Optional context type to look for.\n\t * @param resultType Optional result type to look for.\n\t * @returns The intent and its supporting apps if found.\n\t */\n\tpublic async getIntent(\n\t\tintent: string,\n\t\tcontextType?: string,\n\t\tresultType?: string\n\t): Promise {\n\t\tconst apps = await this._getApps();\n\n\t\tif (apps.length === 0) {\n\t\t\tthis._logger.warn(\"There was no apps returned so we are unable to find apps that support an intent\");\n\t\t\treturn;\n\t\t}\n\n\t\tconst intentsMap: { [key: string]: AppsForIntent } = {};\n\n\t\tfor (const app of apps) {\n\t\t\tif (app.interop?.intents?.listensFor && !isEmpty(app.interop.intents.listensFor[intent])) {\n\t\t\t\tconst appIntent = app.interop.intents.listensFor[intent];\n\t\t\t\tconst include = this.appIntentContains(appIntent, contextType, resultType);\n\t\t\t\tif (include) {\n\t\t\t\t\t// re-use approach used by getting intents by context for the context map although this will only have one\n\t\t\t\t\tthis.updateAppIntentsMap(intentsMap, intent, appIntent.displayName, app);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tconst results = Object.values(intentsMap);\n\t\tif (results.length === 0) {\n\t\t\tthis._logger.info(\n\t\t\t\t`No results found for findIntent for intent ${intent} and context ${contextType} and resultType ${resultType}`\n\t\t\t);\n\t\t\treturn;\n\t\t} else if (results.length === 1) {\n\t\t\treturn results[0];\n\t\t}\n\n\t\tthis._logger.warn(\n\t\t\t`Received more than one result for findIntent for intent ${intent} and context ${contextType} and resultType ${resultType}. Returning the first entry.`\n\t\t);\n\t\treturn results[0];\n\t}\n\n\t/**\n\t * Get the apps that support intents by the context type.\n\t * @param contextType The context type the app must support.\n\t * @param resultType The optional result type to match as well.\n\t * @returns The apps for the specified intent.\n\t */\n\tpublic async getIntentsByContext(contextType: string, resultType?: string): Promise {\n\t\tconst apps = await this._getApps();\n\n\t\tif (apps.length === 0) {\n\t\t\tthis._logger.warn(\n\t\t\t\t\"Unable to get apps so we can not get apps and intents that support a particular context\"\n\t\t\t);\n\t\t\treturn [];\n\t\t}\n\n\t\tconst intents: { [key: string]: AppsForIntent } = {};\n\n\t\tfor (const app of apps) {\n\t\t\tconst listensFor = app.interop?.intents?.listensFor;\n\n\t\t\tif (!isEmpty(listensFor)) {\n\t\t\t\tconst supportedIntents = Object.keys(listensFor);\n\t\t\t\tfor (const supportedIntent of supportedIntents) {\n\t\t\t\t\tconst appIntent = listensFor[supportedIntent];\n\t\t\t\t\tconst include = this.appIntentContains(appIntent, contextType, resultType);\n\t\t\t\t\tif (include) {\n\t\t\t\t\t\tthis.updateAppIntentsMap(intents, supportedIntent, appIntent.displayName, app);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn Object.values(intents);\n\t}\n\n\t/**\n\t * Check to see if the supplied appIntent supports the context and result types.\n\t * @param appIntent The app intent to check.\n\t * @param contextType The optional context type to look for.\n\t * @param resultType The optional result type to look for.\n\t * @returns True if the app intent matches.\n\t */\n\tprivate appIntentContains(\n\t\tappIntent: AppIntents,\n\t\tcontextType: string | undefined,\n\t\tresultType: string | undefined\n\t): boolean {\n\t\tif (!isEmpty(contextType) && !isEmpty(resultType)) {\n\t\t\tif (!appIntent?.contexts?.includes(contextType) || !appIntent.resultType?.includes(resultType)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} else if (!isEmpty(contextType) && !appIntent?.contexts?.includes(contextType)) {\n\t\t\treturn false;\n\t\t} else if (!isEmpty(resultType) && !appIntent?.resultType?.includes(resultType)) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}\n\n\t/**\n\t * Update the map containing the intent to apps.\n\t * @param intentsMap The map to update.\n\t * @param name The name of the intent.\n\t * @param displayName The Options display name to update with.\n\t * @param app The application to update.\n\t */\n\tprivate updateAppIntentsMap(\n\t\tintentsMap: {\n\t\t\t[key: string]: AppsForIntent;\n\t\t},\n\t\tname: string,\n\t\tdisplayName: string | undefined,\n\t\tapp: PlatformApp\n\t): void {\n\t\tif (isEmpty(intentsMap[name])) {\n\t\t\t// in a production app you would either need to ensure that every app was populated with the same name & displayName for an intent from a golden source (e.g. intents table) so picking the first entry wouldn't make a difference.\n\t\t\t// or you could pull in a golden source of intents from a service and then do a lookup using the intent name to get an object with intent name and official display name.\n\t\t\tintentsMap[name] = {\n\t\t\t\tintent: {\n\t\t\t\t\tname,\n\t\t\t\t\tdisplayName\n\t\t\t\t},\n\t\t\t\tapps: []\n\t\t\t};\n\t\t}\n\t\tintentsMap[name].apps.push(app);\n\t}\n}\n","import type { AppIdentifier, AppMetadata } from \"@finos/fdc3\";\nimport type { PlatformApp } from \"../../shapes/app-shapes\";\n\n/**\n * Gets app meta data in the right format based on the version.\n * @param apps the apps to get the meta data for.\n * @param findInstances the function to find the instances of an app so you can add them to the meta data.\n * @returns the app meta data.\n */\nexport async function getAppsMetaData(\n\tapps: PlatformApp[],\n\tfindInstances: (appId: string) => Promise\n): Promise {\n\tconst appsMetaData: AppMetadata[] = [];\n\n\tfor (const app of apps) {\n\t\tconst appData = mapToAppMetaData(app);\n\t\tconst instances = await findInstances(app.appId);\n\t\tappsMetaData.push(appData);\n\t\tfor (const instance of instances) {\n\t\t\tconst instanceAppEntry = { ...appData, instanceId: instance.instanceId };\n\t\t\tappsMetaData.push(instanceAppEntry);\n\t\t}\n\t}\n\treturn appsMetaData;\n}\n\n/**\n * Map the platform app to app metadata.\n * @param app The application to map.\n * @param resultType The result type to include in the data.\n * @returns The app metadata.\n */\nexport function mapToAppMetaData(app: PlatformApp, resultType?: string): AppMetadata {\n\tconst appMetaData: AppMetadata = {\n\t\tappId: app.appId,\n\t\tdescription: app.description,\n\t\ticons: app.icons,\n\t\tname: app.name,\n\t\tscreenshots: app.screenshots,\n\t\ttitle: app.title,\n\t\ttooltip: app.tooltip,\n\t\tversion: app.version,\n\t\tresultType\n\t};\n\treturn appMetaData;\n}\n","import type { AppIdentifier } from \"@finos/fdc3\";\nimport type OpenFin from \"@openfin/core\";\nimport type {\n\tIntentRegistrationEntry,\n\tContextRegistrationEntry,\n\tBrokerClientConnection,\n\tIntentRegistrationPayload,\n\tCaptureApiPayload,\n\tApiMetadata\n} from \"../../shapes/interopbroker-shapes\";\nimport type { Logger } from \"../../shapes/logger-shapes\";\nimport { isEmpty, isStringValue } from \"../../utils\";\nimport { OPEN_ERROR as OpenError, RESOLVE_ERROR as ResolveError } from \"./fdc3-errors\";\n\n/**\n * Used to track client interactions with a broker.\n */\nexport class ClientRegistrationHelper {\n\tprivate readonly _logger: Logger;\n\n\tprivate readonly _lookupAppId: (clientIdentity: OpenFin.ClientIdentity) => Promise;\n\n\tprivate readonly _clientReadyRequests: { [key: string]: (instanceId: string) => void };\n\n\tprivate readonly _trackedClientConnections: { [key: string]: BrokerClientConnection };\n\n\tprivate readonly _trackedContextHandlers: { [key: string]: ContextRegistrationEntry[] };\n\n\tprivate readonly _trackedIntentHandlers: { [key: string]: IntentRegistrationEntry[] };\n\n\t/**\n\t * Create an instance of the Client Registration Helper.\n\t * @param lookupAppId determine appId based on clientIdentity\n\t * @param logger the logger to use.\n\t */\n\tconstructor(\n\t\tlookupAppId: (clientIdentity: OpenFin.ClientIdentity) => Promise,\n\t\tlogger: Logger\n\t) {\n\t\tthis._logger = logger;\n\t\tthis._lookupAppId = lookupAppId;\n\t\tthis._clientReadyRequests = {};\n\t\tthis._trackedClientConnections = {};\n\t\tthis._trackedContextHandlers = {};\n\t\tthis._trackedIntentHandlers = {};\n\t}\n\n\t/**\n\t * The client has disconnected form the broker.\n\t * @param clientIdentity The identity of the client that disconnected.\n\t */\n\tpublic async clientDisconnected(clientIdentity: OpenFin.ClientIdentity): Promise {\n\t\tthis._logger.info(\"Client Disconnected.\", clientIdentity);\n\n\t\tfor (const [key, value] of Object.entries(this._trackedIntentHandlers)) {\n\t\t\tthis._trackedIntentHandlers[key] = value.filter(\n\t\t\t\t(entry) => entry.clientIdentity.endpointId !== clientIdentity.endpointId\n\t\t\t);\n\t\t}\n\n\t\tfor (const [key, value] of Object.entries(this._trackedContextHandlers)) {\n\t\t\tthis._trackedContextHandlers[key] = value.filter(\n\t\t\t\t(entry) => entry.clientIdentity.endpointId !== clientIdentity.endpointId\n\t\t\t);\n\t\t}\n\t\tthis.removeTrackedClientConnection(clientIdentity);\n\t}\n\n\t/**\n\t * Handle an intent handler being registered.\n\t * @param payload The payload.\n\t * @param clientIdentity The client identity.\n\t * @returns Nothing.\n\t */\n\tpublic async intentHandlerRegistered(\n\t\tpayload: IntentRegistrationPayload,\n\t\tclientIdentity: OpenFin.ClientIdentity\n\t): Promise {\n\t\tthis._logger.info(\"intentHandlerRegistered:\", payload, clientIdentity);\n\t\tif (!isEmpty(payload)) {\n\t\t\tconst intentName: string = payload.handlerId.replace(\"intent-handler-\", \"\");\n\n\t\t\tlet trackedIntentHandler = this._trackedIntentHandlers[intentName];\n\n\t\t\tif (isEmpty(trackedIntentHandler)) {\n\t\t\t\ttrackedIntentHandler = [];\n\t\t\t\tthis._trackedIntentHandlers[intentName] = trackedIntentHandler;\n\t\t\t}\n\n\t\t\tconst trackedHandler = this._trackedIntentHandlers[intentName].find(\n\t\t\t\t(entry) => entry.clientIdentity.endpointId === clientIdentity.endpointId\n\t\t\t);\n\n\t\t\tif (isEmpty(trackedHandler)) {\n\t\t\t\tthis._logger.info(\n\t\t\t\t\t`intentHandler endpoint not registered. Registering ${clientIdentity.endpointId} against intent ${intentName} and looking up app name.`\n\t\t\t\t);\n\t\t\t\tconst appId = await this._lookupAppId(clientIdentity);\n\n\t\t\t\tif (isEmpty(appId)) {\n\t\t\t\t\tthis._logger.warn(\n\t\t\t\t\t\t\"Unable to determine app id based on name. This app will not be tracked via intent handler registration.\"\n\t\t\t\t\t);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tthis._trackedIntentHandlers[intentName].push({\n\t\t\t\t\tfdc3Version: payload.fdc3Version,\n\t\t\t\t\tclientIdentity,\n\t\t\t\t\tappId\n\t\t\t\t});\n\t\t\t\tthis._logger.info(\n\t\t\t\t\t`intentHandler endpoint: ${clientIdentity.endpointId} registered against intent: ${intentName} and app Id: ${appId}.`\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tconst clientReadyKey = this.getClientReadyKey(clientIdentity, \"intent\", intentName);\n\t\t\tif (!isEmpty(this._clientReadyRequests[clientReadyKey])) {\n\t\t\t\tthis._logger.info(\"Resolving client ready request.\");\n\t\t\t\tthis._clientReadyRequests[clientReadyKey](clientIdentity.endpointId);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * A context handler has been registered against the broker.\n\t * @param payload The payload from a context listener registration.\n\t * @param payload.contextType The context type that the client is listening for.\n\t * @param payload.handlerId The handler Id for this listener.\n\t * @param clientIdentity The identity of the application that is adding the context handler.\n\t */\n\tpublic async contextHandlerRegistered(\n\t\tpayload: { contextType: string | undefined; handlerId: string },\n\t\tclientIdentity: OpenFin.ClientIdentity\n\t): Promise {\n\t\tthis._logger.info(\"contextHandlerRegistered:\", payload, clientIdentity);\n\t\tif (!isEmpty(payload?.handlerId)) {\n\t\t\tconst contextTypeName: string = payload?.contextType ?? \"*\";\n\t\t\tconst handlerId = payload.handlerId;\n\t\t\tlet trackedContextHandler = this._trackedContextHandlers[contextTypeName];\n\n\t\t\tif (isEmpty(trackedContextHandler)) {\n\t\t\t\ttrackedContextHandler = [];\n\t\t\t\tthis._trackedContextHandlers[contextTypeName] = trackedContextHandler;\n\t\t\t}\n\n\t\t\tconst trackedHandler = this._trackedContextHandlers[contextTypeName].find(\n\t\t\t\t(entry) => entry.clientIdentity.endpointId === clientIdentity.endpointId\n\t\t\t);\n\n\t\t\tif (isEmpty(trackedHandler)) {\n\t\t\t\tthis._logger.info(\n\t\t\t\t\t`contextHandler endpoint not registered. Registering ${clientIdentity.endpointId} against context handler for context type ${contextTypeName} and looking up app name.`\n\t\t\t\t);\n\t\t\t\tconst appId = await this._lookupAppId(clientIdentity);\n\n\t\t\t\tif (isEmpty(appId)) {\n\t\t\t\t\tthis._logger.warn(\n\t\t\t\t\t\t\"Unable to determine app id based on name. This app will not be tracked via context handler registration.\"\n\t\t\t\t\t);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tthis._trackedContextHandlers[contextTypeName].push({\n\t\t\t\t\tclientIdentity,\n\t\t\t\t\tappId,\n\t\t\t\t\thandlerId\n\t\t\t\t});\n\t\t\t\tthis._logger.info(\n\t\t\t\t\t`contextHandler endpoint: ${clientIdentity.endpointId} registered against context type: ${contextTypeName} and app Id: ${appId}.`\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tconst clientReadyKey = this.getClientReadyKey(clientIdentity, \"context\", contextTypeName);\n\t\t\tif (!isEmpty(this._clientReadyRequests[clientReadyKey])) {\n\t\t\t\tthis._logger.info(\"Resolving client ready request.\");\n\t\t\t\tthis._clientReadyRequests[clientReadyKey](clientIdentity.endpointId);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Capture the connection and API version.\n\t * @param id The client identity to capture from.\n\t * @param payload The payload.\n\t */\n\tpublic async clientConnectionRegistered(\n\t\tid: OpenFin.ClientIdentity & { connectionUrl?: string; entityType?: string },\n\t\tpayload?: CaptureApiPayload\n\t): Promise {\n\t\tconst key = `${id.uuid}-${id.name}`;\n\t\tlet apiVersion: ApiMetadata = {\n\t\t\ttype: \"fdc3\",\n\t\t\tversion: \"2.0\"\n\t\t};\n\t\tif (isEmpty(this._trackedClientConnections[key])) {\n\t\t\tif (payload?.apiVersion) {\n\t\t\t\tconst payloadApiVersion = payload?.apiVersion;\n\t\t\t\tif (!isEmpty(payloadApiVersion) && !isEmpty(payloadApiVersion?.type)) {\n\t\t\t\t\tapiVersion = payloadApiVersion;\n\t\t\t\t} else if (isStringValue(id.connectionUrl)) {\n\t\t\t\t\t// if they haven't specified apiVersion meta data and it is external and has a url then we will assume fdc3 2.0\n\t\t\t\t\tapiVersion = { type: \"fdc3\", version: \"2.0\" };\n\t\t\t\t} else {\n\t\t\t\t\t// if a native app has specified a preference through apiVersion then we assume interop\n\t\t\t\t\tapiVersion = { type: \"interop\" };\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tconst entityType = id.entityType;\n\t\t\t\tif (!isEmpty(entityType)) {\n\t\t\t\t\tswitch (entityType) {\n\t\t\t\t\t\tdefault: {\n\t\t\t\t\t\t\tthis._logger.warn(\n\t\t\t\t\t\t\t\t`We currently do not check for entity types that are not views or windows. Entity type: ${entityType}`\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// console unable to find api version.\n\t\t\t\t\tapiVersion = {\n\t\t\t\t\t\ttype: \"fdc3\",\n\t\t\t\t\t\tversion: \"2.0\"\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t}\n\t\t\tconst brokerClientConnection: BrokerClientConnection = {\n\t\t\t\tclientIdentity: id,\n\t\t\t\tapiMetadata: apiVersion\n\t\t\t};\n\n\t\t\tthis._trackedClientConnections[key] = brokerClientConnection;\n\t\t\tconst clientReadyKey = this.getClientReadyKey(id, \"connection\");\n\t\t\tif (!isEmpty(this._clientReadyRequests[clientReadyKey])) {\n\t\t\t\tthis._logger.info(\"Resolving client ready request.\");\n\t\t\t\tthis._clientReadyRequests[clientReadyKey](id.endpointId);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Get a context handler that matches the context type name and instance id.\n\t * @param contextTypeName the name of the context the listener is registered for.\n\t * @param instanceId the instanceId you wish to check for.\n\t * @returns The ContextRegistrationEntry or undefined.\n\t */\n\tpublic getRegisteredContextHandler(\n\t\tcontextTypeName: string,\n\t\tinstanceId: string\n\t): ContextRegistrationEntry | undefined {\n\t\tconst trackedHandler = this._trackedContextHandlers[contextTypeName]?.find(\n\t\t\t(entry) => entry.clientIdentity.endpointId === instanceId\n\t\t);\n\t\treturn trackedHandler;\n\t}\n\n\t/**\n\t * Handle FDC3 find instances for app instances that have registered for an intent.\n\t * @param app The app identifier to find.\n\t * @param clientIdentity The client identity.\n\t * @param type the type of app instances you are after. CONNECTED = anything that has connected to the broker and INTENT means an APP that has registered an Intent Handler.\n\t * @returns The instance of the app.\n\t */\n\tpublic async findAppInstances(\n\t\tapp: AppIdentifier,\n\t\tclientIdentity: OpenFin.ClientIdentity,\n\t\ttype: \"connected\" | \"intent\" = \"connected\"\n\t): Promise {\n\t\tconst endpointApps: { [key: string]: AppIdentifier } = {};\n\n\t\tif (type === \"intent\") {\n\t\t\tfor (const [, value] of Object.entries(this._trackedIntentHandlers)) {\n\t\t\t\tconst entries = value.filter((entry) => entry.appId === app.appId);\n\t\t\t\tfor (const entry of entries) {\n\t\t\t\t\tendpointApps[entry.clientIdentity.endpointId] = {\n\t\t\t\t\t\tappId: entry.appId ?? \"\",\n\t\t\t\t\t\tinstanceId: entry.clientIdentity.endpointId\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn Object.values(endpointApps);\n\t\t}\n\n\t\tfor (const [, value] of Object.entries(this._trackedClientConnections)) {\n\t\t\tconst trackedAppId = await this._lookupAppId(value.clientIdentity);\n\t\t\tif (trackedAppId === app.appId && isEmpty(endpointApps[value.clientIdentity.endpointId])) {\n\t\t\t\tendpointApps[value.clientIdentity.endpointId] = {\n\t\t\t\t\tappId: app.appId ?? \"\",\n\t\t\t\t\tinstanceId: value.clientIdentity.endpointId\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\n\t\treturn Object.values(endpointApps);\n\t}\n\n\t/**\n\t * Get the api version for the identity.\n\t * @param id The identity to get the api version for.\n\t * @returns The api metadata.\n\t */\n\tpublic getApiVersion(id: OpenFin.Identity): ApiMetadata | undefined {\n\t\tconst key = `${id.uuid}-${id.name}`;\n\t\tconst apiVersion: ApiMetadata | undefined = this._trackedClientConnections[key]?.apiMetadata;\n\t\treturn apiVersion;\n\t}\n\n\t/**\n\t * Handle client ready event for opening and awaiting a connection to the broker.\n\t * @param identity The identity of the client.\n\t * @param timeout The timeout to wait for the client.\n\t * @returns The instance id.\n\t */\n\tpublic async onConnectionClientReady(identity: OpenFin.Identity, timeout: number = 15000): Promise {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tconst clientIdentity = this.getClientIdentity(identity);\n\t\t\tif (!isEmpty(clientIdentity)) {\n\t\t\t\tresolve(clientIdentity.endpointId);\n\t\t\t}\n\t\t\tconst key = this.getClientReadyKey(identity, \"connection\");\n\t\t\tconst timerId = setTimeout(() => {\n\t\t\t\tif (!isEmpty(this._clientReadyRequests[key])) {\n\t\t\t\t\tdelete this._clientReadyRequests[key];\n\t\t\t\t\treject(ResolveError.TargetInstanceUnavailable);\n\t\t\t\t}\n\t\t\t}, timeout);\n\t\t\tthis._clientReadyRequests[key] = (instanceId: string): void => {\n\t\t\t\tclearTimeout(timerId);\n\t\t\t\t// clear the callback asynchronously\n\t\t\t\tdelete this._clientReadyRequests[key];\n\t\t\t\tresolve(instanceId);\n\t\t\t};\n\t\t});\n\t}\n\n\t/**\n\t * Handle client ready event for intent handling.\n\t * @param identity The identity of the client.\n\t * @param intentName The intent name.\n\t * @param timeout The timeout to wait for the client.\n\t * @returns The instance id.\n\t */\n\tpublic async onIntentClientReady(\n\t\tidentity: OpenFin.Identity,\n\t\tintentName: string,\n\t\ttimeout: number = 15000\n\t): Promise {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tconst registeredHandlers = this._trackedIntentHandlers[intentName];\n\t\t\tlet existingInstanceId: string | undefined;\n\t\t\tif (!isEmpty(registeredHandlers)) {\n\t\t\t\tfor (const handler of registeredHandlers) {\n\t\t\t\t\tif (\n\t\t\t\t\t\thandler.clientIdentity.uuid === identity.uuid &&\n\t\t\t\t\t\thandler.clientIdentity.name === identity.name\n\t\t\t\t\t) {\n\t\t\t\t\t\texistingInstanceId = handler.clientIdentity.endpointId;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!isEmpty(existingInstanceId)) {\n\t\t\t\tresolve(existingInstanceId);\n\t\t\t}\n\t\t\tconst key = this.getClientReadyKey(identity, \"intent\", intentName);\n\t\t\tconst timerId = setTimeout(() => {\n\t\t\t\tif (!isEmpty(this._clientReadyRequests[key])) {\n\t\t\t\t\tdelete this._clientReadyRequests[key];\n\t\t\t\t\treject(ResolveError.IntentDeliveryFailed);\n\t\t\t\t}\n\t\t\t}, timeout);\n\t\t\tthis._clientReadyRequests[key] = (instanceId: string): void => {\n\t\t\t\tclearTimeout(timerId);\n\t\t\t\t// clear the callback asynchronously\n\t\t\t\tdelete this._clientReadyRequests[key];\n\t\t\t\tresolve(instanceId);\n\t\t\t};\n\t\t});\n\t}\n\n\t/**\n\t * Handle client ready event for context handling.\n\t * @param identity The identity of the client.\n\t * @param contextTypeName The contextType name.\n\t * @param timeout The timeout to wait for the client.\n\t * @returns The instance id.\n\t */\n\tpublic async onContextClientReady(\n\t\tidentity: OpenFin.Identity,\n\t\tcontextTypeName: string,\n\t\ttimeout: number = 15000\n\t): Promise {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tconst contextRegisteredHandlers = this._trackedContextHandlers[contextTypeName];\n\t\t\tconst globalRegisteredHandlers = this._trackedContextHandlers[\"*\"];\n\t\t\tlet existingContextHandlerInstanceId: string | undefined;\n\n\t\t\tif (!isEmpty(contextRegisteredHandlers)) {\n\t\t\t\tfor (const handler of contextRegisteredHandlers) {\n\t\t\t\t\tif (\n\t\t\t\t\t\thandler.clientIdentity.uuid === identity.uuid &&\n\t\t\t\t\t\thandler.clientIdentity.name === identity.name\n\t\t\t\t\t) {\n\t\t\t\t\t\texistingContextHandlerInstanceId = handler.clientIdentity.endpointId;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (!isEmpty(globalRegisteredHandlers) && !isEmpty(existingContextHandlerInstanceId)) {\n\t\t\t\tfor (const handler of globalRegisteredHandlers) {\n\t\t\t\t\tif (\n\t\t\t\t\t\thandler.clientIdentity.uuid === identity.uuid &&\n\t\t\t\t\t\thandler.clientIdentity.name === identity.name\n\t\t\t\t\t) {\n\t\t\t\t\t\texistingContextHandlerInstanceId = handler.clientIdentity.endpointId;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!isEmpty(existingContextHandlerInstanceId)) {\n\t\t\t\tresolve(existingContextHandlerInstanceId);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst contextKey = this.getClientReadyKey(identity, \"context\", contextTypeName);\n\t\t\tconst globalKey = this.getClientReadyKey(identity, \"context\", \"*\");\n\t\t\tconst timerId = setTimeout(() => {\n\t\t\t\tconst hasContextRequest = !isEmpty(this._clientReadyRequests[contextKey]);\n\t\t\t\tconst hasGlobalRequest = !isEmpty(this._clientReadyRequests[globalKey]);\n\n\t\t\t\tif (hasContextRequest || hasGlobalRequest) {\n\t\t\t\t\tdelete this._clientReadyRequests[contextKey];\n\t\t\t\t\tdelete this._clientReadyRequests[globalKey];\n\t\t\t\t\treject(OpenError.AppTimeout);\n\t\t\t\t}\n\t\t\t}, timeout);\n\t\t\tlet isResolved = false;\n\t\t\tthis._clientReadyRequests[contextKey] = (instanceId: string): void => {\n\t\t\t\tclearTimeout(timerId);\n\t\t\t\tif (!isResolved) {\n\t\t\t\t\tisResolved = true;\n\t\t\t\t\t// clear the callback asynchronously\n\t\t\t\t\tdelete this._clientReadyRequests[contextKey];\n\t\t\t\t\tdelete this._clientReadyRequests[globalKey];\n\t\t\t\t\tresolve(instanceId);\n\t\t\t\t}\n\t\t\t};\n\t\t\tthis._clientReadyRequests[globalKey] = (instanceId: string): void => {\n\t\t\t\tclearTimeout(timerId);\n\t\t\t\tif (!isResolved) {\n\t\t\t\t\tisResolved = true;\n\t\t\t\t\t// clear the callback asynchronously\n\t\t\t\t\tdelete this._clientReadyRequests[contextKey];\n\t\t\t\t\tdelete this._clientReadyRequests[globalKey];\n\t\t\t\t\tresolve(instanceId);\n\t\t\t\t}\n\t\t\t};\n\t\t});\n\t}\n\n\t/**\n\t * Get the client identity given a standard identity.\n\t * @param id The identity to get the client identity for.\n\t * @returns The client identity if available.\n\t */\n\tprivate getClientIdentity(id: OpenFin.Identity): OpenFin.ClientIdentity | undefined {\n\t\tconst key = `${id.uuid}-${id.name}`;\n\t\tconst clientIdentity: OpenFin.ClientIdentity | undefined =\n\t\t\tthis._trackedClientConnections[key]?.clientIdentity;\n\t\treturn clientIdentity;\n\t}\n\n\t/**\n\t * Remove the tracking for the identity.\n\t * @param id The identity to remove the connection information for.\n\t */\n\tprivate removeTrackedClientConnection(id: OpenFin.Identity): void {\n\t\tconst key = `${id.uuid}-${id.name}`;\n\t\tdelete this._trackedClientConnections[key];\n\t}\n\n\t/**\n\t * Get a key that can be used for an identity and client.\n\t * @param identity The identity to use in the key.\n\t * @param type The type of ready event you are looking for\n\t * @param name The name of the type if required to use in the key\n\t * @returns The key.\n\t */\n\tprivate getClientReadyKey(\n\t\tidentity: OpenFin.Identity,\n\t\ttype: \"connection\" | \"context\" | \"intent\",\n\t\tname?: string\n\t): string {\n\t\tif (isEmpty(name)) {\n\t\t\treturn `${identity.uuid}/${identity.name}/${type}`;\n\t\t}\n\t\treturn `${identity.uuid}/${identity.name}/${type}/${name}`;\n\t}\n}\n","/** Constants representing the errors that can be encountered when calling the `open` method on the DesktopAgent object (`fdc3`). */\nexport const OPEN_ERROR = {\n\t/** Returned if the specified application is not found.*/\n\tAppNotFound: \"AppNotFound\",\n\t/** Returned if the specified application fails to launch correctly.*/\n\tErrorOnLaunch: \"ErrorOnLaunch\",\n\t/** Returned if the specified application launches but fails to add a context listener in order to receive the context passed to the `fdc3.open` call.*/\n\tAppTimeout: \"AppTimeout\",\n\t/** Returned if the FDC3 desktop agent implementation is not currently able to handle the request.*/\n\tResolverUnavailable: \"ResolverUnavailable\",\n\t/** Returned if a call to the `open` function is made with an invalid context argument. Contexts should be Objects with at least a `type` field that has a `string` value.*/\n\tMalformedContext: \"MalformedContext\"\n};\n/** Constants representing the errors that can be encountered when calling the `findIntent`, `findIntentsByContext`, `raiseIntent` or `raiseIntentForContext` methods on the DesktopAgent (`fdc3`). */\nexport const RESOLVE_ERROR = {\n\t/** SHOULD be returned if no apps are available that can resolve the intent and context combination.*/\n\tNoAppsFound: \"NoAppsFound\",\n\t/** Returned if the FDC3 desktop agent implementation is not currently able to handle the request.*/\n\tResolverUnavailable: \"ResolverUnavailable\",\n\t/** Returned if the user cancelled the resolution request, for example by closing or cancelling a resolver UI.*/\n\tUserCancelled: \"UserCancelledResolution\",\n\t/** SHOULD be returned if a timeout cancels an intent resolution that required user interaction. Please use `ResolverUnavailable` instead for situations where a resolver UI or similar fails.*/\n\tResolverTimeout: \"ResolverTimeout\",\n\t/** Returned if a specified target application is not available or a new instance of it cannot be opened. */\n\tTargetAppUnavailable: \"TargetAppUnavailable\",\n\t/** Returned if a specified target application instance is not available, for example because it has been closed. */\n\tTargetInstanceUnavailable: \"TargetInstanceUnavailable\",\n\t/** Returned if the intent and context could not be delivered to the selected application or instance, for example because it has not added an intent handler within a timeout.*/\n\tIntentDeliveryFailed: \"IntentDeliveryFailed\",\n\t/** Returned if a call to one of the `raiseIntent` functions is made with an invalid context argument. Contexts should be Objects with at least a `type` field that has a `string` value.*/\n\tMalformedContext: \"MalformedContext\"\n};\n","import type OpenFin from \"@openfin/core\";\nimport type { PlatformApp } from \"../../shapes/app-shapes\";\nimport type {\n\tIntentResolverResponse,\n\tIntentResolverOptions,\n\tAppIntent\n} from \"../../shapes/interopbroker-shapes\";\nimport type { Logger } from \"../../shapes/logger-shapes\";\n// import { formatError } from \"../../utils\";\nimport { RESOLVE_ERROR as ResolveError } from \"./fdc3-errors\";\n\n/**\n * An Intent Resolver Used for resolving intent selection.\n */\nexport class IntentResolverHelper {\n\tprivate readonly _logger: Logger;\n\n\tprivate readonly _intentResolverOptions?: IntentResolverOptions;\n\n\tprivate readonly _defaultIntentResolverHeight: number;\n\n\tprivate readonly _defaultIntentResolverWidth: number;\n\n\tprivate readonly _dialogElement: HTMLDialogElement | null = null;\n\n\tprivate _dialogClient: OpenFin.ChannelClient | null = null;\n\n\tprivate _resolveAppSelection: ((value: IntentResolverResponse) => void) | undefined;\n\n\tprivate _rejectAppSelection: ((reason?: string) => void) | undefined;\n\n\t/**\n\t * Create an instance of the Intent Resolver Helper.\n\t * @param intentResolverOptions options for the helper\n\t * @param logger the logger to use.\n\t */\n\tconstructor(intentResolverOptions: IntentResolverOptions, logger: Logger) {\n\t\tthis._defaultIntentResolverHeight = 715;\n\t\tthis._defaultIntentResolverWidth = 665;\n\t\tthis._intentResolverOptions = {\n\t\t\theight: this._defaultIntentResolverHeight,\n\t\t\twidth: this._defaultIntentResolverWidth,\n\t\t\tfdc3InteropApi: \"2.0\",\n\t\t\ttitle: \"Intent Resolver\",\n\t\t\t...intentResolverOptions\n\t\t};\n\t\tthis._logger = logger;\n\t\tthis._dialogElement = document.createElement(\"dialog\");\n\t\tthis._dialogElement.id = \"intent-resolver-dialog\";\n\t\tthis._dialogElement.style.height = `${this._intentResolverOptions.height}px`;\n\t\tthis._dialogElement.style.width = `${this._intentResolverOptions.width}px`;\n\t\tthis._dialogElement.style.padding = \"0px\";\n\t\tthis._dialogElement.style.backgroundColor = \"var(--brand-background)\";\n\t\t// Create a new iframe element\n\t\tconst intentPicker = document.createElement(\"iframe\");\n\n\t\t// Set the source of the iframe\n\t\tintentPicker.src = intentResolverOptions.url;\n\t\tintentPicker.style.height = \"99%\";\n\t\tintentPicker.style.width = \"100%\";\n\n\t\t// Append the iframe to the dialog\n\t\tthis._dialogElement.append(intentPicker);\n\n\t\t// Append the dialog to the body\n\t\tdocument.body.append(this._dialogElement);\n\t}\n\n\t/**\n\t * Launch the intent resolver.\n\t * @param launchOptions The options for launching the resolver.\n\t * @param launchOptions.apps The apps to pick from.\n\t * @param launchOptions.intent The intent to pick.\n\t * @param launchOptions.intents The intents to pick from.\n\t * @param clientIdentity The client that triggered this request.\n\t * @returns The response from the intent resolver.\n\t */\n\tpublic async launchIntentResolver(\n\t\tlaunchOptions: {\n\t\t\tapps?: PlatformApp[];\n\t\t\tintent?: Partial;\n\t\t\tintents?: { intent: Partial; apps: PlatformApp[] }[];\n\t\t},\n\t\tclientIdentity: OpenFin.ClientIdentity\n\t): Promise {\n\t\tif (this._dialogElement) {\n\t\t\tthis._dialogElement.showModal();\n\t\t}\n\t\tif (!this._dialogClient && this._dialogClient === null) {\n\t\t\tconst intentResolverChannel = \"intent-resolver\";\n\t\t\tconsole.log(\"Connecting to picker\", intentResolverChannel);\n\t\t\tthis._dialogClient = await fin.InterApplicationBus.Channel.connect(intentResolverChannel);\n\n\t\t\t// eslint-disable-next-line @typescript-eslint/await-thenable\n\t\t\tawait this._dialogClient.register(\"intent-resolver-response\", async (payload, sender) => {\n\t\t\t\tconst response = payload as {\n\t\t\t\t\tintentResolverResponse?: IntentResolverResponse;\n\t\t\t\t\terrorMessage?: string;\n\t\t\t\t};\n\t\t\t\tthis._logger.info(\"Received intent resolver message\", payload);\n\t\t\t\tif (this._rejectAppSelection === undefined || this._resolveAppSelection === undefined) {\n\t\t\t\t\tthis._logger.error(\"No resolve or reject function set for intent resolver\");\n\t\t\t\t} else if (response.errorMessage) {\n\t\t\t\t\tthis._rejectAppSelection(response.errorMessage);\n\t\t\t\t} else if (response.intentResolverResponse === undefined) {\n\t\t\t\t\tthis._rejectAppSelection(ResolveError.ResolverUnavailable);\n\t\t\t\t} else {\n\t\t\t\t\tthis._resolveAppSelection(response.intentResolverResponse);\n\t\t\t\t}\n\t\t\t\tif (this._dialogElement) {\n\t\t\t\t\tthis._dialogElement.close();\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\tif (this._dialogElement && this._dialogClient) {\n\t\t\tawait this._dialogClient.dispatch(\"resolve-intent-request\", {\n\t\t\t\tcustomData: {\n\t\t\t\t\ttitle: this._intentResolverOptions?.title,\n\t\t\t\t\tapps: launchOptions.apps,\n\t\t\t\t\tintent: launchOptions.intent,\n\t\t\t\t\tintents: launchOptions.intents\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tthis._resolveAppSelection = resolve;\n\t\t\tthis._rejectAppSelection = reject;\n\t\t});\n\t}\n}\n","import type {\n\tAppIdentifier,\n\tAppMetadata,\n\tContextMetadata,\n\tImplementationMetadata,\n\tIntentResolution\n} from \"@finos/fdc3\";\nimport type { OpenFin } from \"@openfin/core\";\nimport type {\n\tAppsForIntent,\n\tPlatformApp,\n\tPlatformAppIdentifier,\n\tPlatformAppIntents\n} from \"../../shapes/app-shapes\";\nimport type {\n\tCaptureApiPayload,\n\tIntentRegistrationPayload,\n\tIntentResolverResponse,\n\tIntentTargetMetaData,\n\tOpenOptions,\n\tPlatformInteropBrokerOptions\n} from \"../../shapes/interopbroker-shapes\";\nimport { formatError, isEmpty, isString, isStringValue, randomUUID } from \"../../utils\";\nimport { bringAppToFront, getApp, getApps, launch } from \"../apps/apps\";\nimport { AppIdHelper } from \"./app-id-helper\";\nimport { AppIntentHelper } from \"./app-intent-helper\";\nimport { getAppsMetaData, mapToAppMetaData } from \"./app-meta-data-helper\";\nimport { ClientRegistrationHelper } from \"./client-registration-helper\";\nimport { RESOLVE_ERROR as ResolveError, OPEN_ERROR as OpenError } from \"./fdc3-errors\";\nimport { IntentResolverHelper } from \"./intent-resolver-helper\";\n\n/**\n * Get the override constructor for the interop broker (useful if you wish this implementation to be layered with other implementations and passed to the platform's initialization object as part of an array).\n * @param options The options for the platform interop broker.\n * @returns The override constructor to be used in an array.\n */\nasync function constructorOverride(\n\toptions: PlatformInteropBrokerOptions\n): Promise> {\n\tconst logger = console;\n\treturn (Base: OpenFin.Constructor) =>\n\t\t/**\n\t\t * Extend the InteropBroker to handle intents.\n\t\t */\n\t\tclass InteropOverride extends Base {\n\t\t\tprivate readonly _openOptions?: OpenOptions;\n\n\t\t\tprivate readonly _appIntentHelper: AppIntentHelper;\n\n\t\t\tprivate readonly _clientRegistrationHelper: ClientRegistrationHelper;\n\n\t\t\tprivate readonly _intentResolverHelper?: IntentResolverHelper;\n\n\t\t\tprivate readonly _metadataKey: Readonly;\n\n\t\t\tprivate readonly _appIdHelper: AppIdHelper;\n\n\t\t\t/**\n\t\t\t * Create a new instance of InteropBroker.\n\t\t\t */\n\t\t\tconstructor() {\n\t\t\t\tsuper();\n\t\t\t\tlogger.info(\"Interop Broker Constructor applying settings.\");\n\t\t\t\tthis._appIntentHelper = new AppIntentHelper(getApps, logger);\n\t\t\t\tthis._metadataKey = `_metadata_${randomUUID()}`;\n\t\t\t\tif (options.intentResolver) {\n\t\t\t\t\tthis._intentResolverHelper = new IntentResolverHelper(options.intentResolver, logger);\n\t\t\t\t}\n\n\t\t\t\tthis._openOptions = options?.openOptions;\n\t\t\t\tthis._appIdHelper = new AppIdHelper(getApp, logger);\n\t\t\t\tthis._clientRegistrationHelper = new ClientRegistrationHelper(\n\t\t\t\t\tasync (clientIdentity: OpenFin.ClientIdentity) => this._appIdHelper.lookupAppId(clientIdentity),\n\t\t\t\t\tlogger\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Is the connection authorized.\n\t\t\t * @param id The id of the client identity to check.\n\t\t\t * @param payload The payload to send with the authorization check.\n\t\t\t * @returns True if the connection is authorized.\n\t\t\t */\n\t\t\tpublic async isConnectionAuthorized(id: OpenFin.ClientIdentity, payload?: unknown): Promise {\n\t\t\t\tconsole.log(\n\t\t\t\t\t\"Interop connection being made by the following identity. About to verify connection\",\n\t\t\t\t\tid\n\t\t\t\t);\n\t\t\t\tawait this._clientRegistrationHelper.clientConnectionRegistered(id, payload as CaptureApiPayload);\n\t\t\t\treturn super.isConnectionAuthorized(id, payload);\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Sets a context for the context group of the incoming current entity.\n\t\t\t * @param sentContext New context to set.\n\t\t\t * @param sentContext.context The context to send.\n\t\t\t * @param clientIdentity Identity of the client sender.\n\t\t\t */\n\t\t\tpublic async setContext(\n\t\t\t\tsentContext: { context: OpenFin.Context },\n\t\t\t\tclientIdentity: OpenFin.ClientIdentity\n\t\t\t): Promise {\n\t\t\t\tconsole.log(\"InteropOverride:Context being set by the following identity\", clientIdentity);\n\t\t\t\tconst contextMetadata = await this.getContextMetadata(clientIdentity);\n\n\t\t\t\tsentContext.context = {\n\t\t\t\t\t...sentContext.context,\n\t\t\t\t\t[this._metadataKey]: contextMetadata\n\t\t\t\t} as unknown as OpenFin.Context;\n\t\t\t\tsuper.setContext(sentContext, clientIdentity);\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Invokes the context handler.\n\t\t\t * @param clientIdentity The client identity.\n\t\t\t * @param handlerId The handler ID.\n\t\t\t * @param context The context to invoke.\n\t\t\t * @returns A promise that resolves when the context handler is invoked.\n\t\t\t */\n\t\t\tpublic async invokeContextHandler(\n\t\t\t\tclientIdentity: OpenFin.ClientIdentity,\n\t\t\t\thandlerId: string,\n\t\t\t\tcontext: OpenFin.Context\n\t\t\t): Promise {\n\t\t\t\tconst passedContext: { [key: string]: unknown } = { ...context };\n\t\t\t\tconst contextMetadata = passedContext[this._metadataKey];\n\t\t\t\tif (!isEmpty(contextMetadata)) {\n\t\t\t\t\tdelete passedContext[this._metadataKey];\n\t\t\t\t}\n\t\t\t\treturn super.invokeContextHandler(clientIdentity, handlerId, {\n\t\t\t\t\t...passedContext,\n\t\t\t\t\tcontextMetadata\n\t\t\t\t} as unknown as OpenFin.Context);\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Handle the information for intents by context.\n\t\t\t * @param contextOptions The context options.\n\t\t\t * @param clientIdentity The client.\n\t\t\t * @returns The intents mapped to app metadata.\n\t\t\t */\n\t\t\tpublic async handleInfoForIntentsByContext(\n\t\t\t\tcontextOptions: OpenFin.Context | OpenFin.FindIntentsByContextOptions,\n\t\t\t\tclientIdentity: OpenFin.ClientIdentity\n\t\t\t): Promise<\n\t\t\t\t{\n\t\t\t\t\tintent: { name: string; displayName?: string };\n\t\t\t\t\tapps: AppMetadata[];\n\t\t\t\t}[]\n\t\t\t> {\n\t\t\t\tconsole.log(\"InteropOverride:Handle Info For Intents By Context\", contextOptions, clientIdentity);\n\t\t\t\tlet requestedContextType: string;\n\t\t\t\tlet requestedResultType: string | undefined;\n\t\t\t\tlet request: { context: { type: string }; metadata: { resultType: string } };\n\n\t\t\t\tif (\"type\" in contextOptions) {\n\t\t\t\t\trequestedContextType = contextOptions.type;\n\t\t\t\t} else {\n\t\t\t\t\trequest = contextOptions as { context: { type: string }; metadata: { resultType: string } };\n\t\t\t\t\trequestedContextType = request.context.type;\n\t\t\t\t\trequestedResultType = request.metadata.resultType;\n\t\t\t\t}\n\t\t\t\tconst intents = await this._appIntentHelper.getIntentsByContext(\n\t\t\t\t\trequestedContextType,\n\t\t\t\t\trequestedResultType\n\t\t\t\t);\n\n\t\t\t\tif (intents.length === 0) {\n\t\t\t\t\tthrow new Error(ResolveError.NoAppsFound);\n\t\t\t\t}\n\n\t\t\t\tconst mappedIntents: {\n\t\t\t\t\tintent: { name: string; displayName?: string };\n\t\t\t\t\tapps: AppMetadata[];\n\t\t\t\t}[] = [];\n\n\t\t\t\tfor (const entry of intents) {\n\t\t\t\t\tconst appMetaData = await getAppsMetaData(entry.apps, async (appId: string) =>\n\t\t\t\t\t\tthis._clientRegistrationHelper.findAppInstances({ appId }, clientIdentity, \"intent\")\n\t\t\t\t\t);\n\t\t\t\t\tmappedIntents.push({ intent: entry.intent, apps: appMetaData });\n\t\t\t\t}\n\n\t\t\t\treturn mappedIntents;\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Handle the information for and intent.\n\t\t\t * @param intentOptions The intent options.\n\t\t\t * @param clientIdentity The client.\n\t\t\t * @returns The intents mapped to app metadata.\n\t\t\t */\n\t\t\tpublic async handleInfoForIntent(\n\t\t\t\tintentOptions: OpenFin.InfoForIntentOptions,\n\t\t\t\tclientIdentity: OpenFin.ClientIdentity\n\t\t\t): Promise<{\n\t\t\t\tintent: { name: string; displayName?: string };\n\t\t\t\tapps: AppMetadata[];\n\t\t\t}> {\n\t\t\t\tconsole.log(\"InteropOverride:Handle Info For Intents\", intentOptions, clientIdentity);\n\t\t\t\tlet contextType: string | undefined;\n\n\t\t\t\tconst optContextType = intentOptions?.context?.type;\n\t\t\t\tif (!isEmpty(optContextType) && optContextType !== \"fdc3.nothing\") {\n\t\t\t\t\tcontextType = optContextType;\n\t\t\t\t}\n\n\t\t\t\tconst result = await this._appIntentHelper.getIntent(\n\t\t\t\t\tintentOptions.name,\n\t\t\t\t\tcontextType,\n\t\t\t\t\tintentOptions?.metadata?.resultType\n\t\t\t\t);\n\t\t\t\tif (isEmpty(result)) {\n\t\t\t\t\tthrow new Error(ResolveError.NoAppsFound);\n\t\t\t\t}\n\t\t\t\tconst response = {\n\t\t\t\t\tintent: result.intent,\n\t\t\t\t\tapps: await getAppsMetaData(result.apps, async (appId: string) =>\n\t\t\t\t\t\tthis._clientRegistrationHelper.findAppInstances({ appId }, clientIdentity, \"intent\")\n\t\t\t\t\t)\n\t\t\t\t};\n\n\t\t\t\treturn response;\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Handle the fired intent for context.\n\t\t\t * @param contextForIntent The context for the intent.\n\t\t\t * @param contextForIntent.type The type of the intent.\n\t\t\t * @param contextForIntent.metadata The metadata for the intent.\n\t\t\t * @param clientIdentity The client identity.\n\t\t\t * @returns The intent resolution.\n\t\t\t */\n\t\t\tpublic async handleFiredIntentForContext(\n\t\t\t\tcontextForIntent: { type: string; metadata?: OpenFin.IntentMetadata },\n\t\t\t\tclientIdentity: OpenFin.ClientIdentity\n\t\t\t): Promise | { source: string; version?: string }> {\n\t\t\t\tconsole.log(\"InteropOverride:handleFiredIntentForContext fired.\", contextForIntent, clientIdentity);\n\t\t\t\tconst targetAppIdentifier = this.getApplicationIdentity(contextForIntent.metadata);\n\t\t\t\tconst intent: Partial = {\n\t\t\t\t\tcontext: contextForIntent\n\t\t\t\t};\n\n\t\t\t\tconst intentsForSelection: AppsForIntent[] = await this._appIntentHelper.getIntentsByContext(\n\t\t\t\t\tcontextForIntent.type\n\t\t\t\t);\n\n\t\t\t\t// app specified flow\n\t\t\t\tif (!isEmpty(targetAppIdentifier)) {\n\t\t\t\t\tconst targetApp = await getApp(targetAppIdentifier.appId);\n\n\t\t\t\t\tif (isEmpty(targetApp)) {\n\t\t\t\t\t\tthrow new Error(ResolveError.TargetAppUnavailable);\n\t\t\t\t\t}\n\t\t\t\t\tif (\n\t\t\t\t\t\t!targetApp?.interop?.intents?.listensFor ||\n\t\t\t\t\t\t!Object.values(targetApp.interop.intents.listensFor).some((listenedForIntent) =>\n\t\t\t\t\t\t\tlistenedForIntent.contexts.includes(contextForIntent.type)\n\t\t\t\t\t\t)\n\t\t\t\t\t) {\n\t\t\t\t\t\tthrow new Error(ResolveError.NoAppsFound);\n\t\t\t\t\t}\n\t\t\t\t\tconst intentResolver = await this.handleTargetedIntent(\n\t\t\t\t\t\ttargetAppIdentifier,\n\t\t\t\t\t\tintent as OpenFin.Intent,\n\t\t\t\t\t\ttrue,\n\t\t\t\t\t\tclientIdentity\n\t\t\t\t\t);\n\t\t\t\t\treturn intentResolver;\n\t\t\t\t}\n\n\t\t\t\tlet userSelection: IntentResolverResponse | undefined;\n\n\t\t\t\tif (intentsForSelection.length === 1) {\n\t\t\t\t\tconst intentForSelection = intentsForSelection[0];\n\t\t\t\t\t// only one intent matches the passed context\n\t\t\t\t\tintent.name = intentForSelection.intent.name;\n\t\t\t\t\tintent.displayName = intentForSelection.intent.displayName;\n\n\t\t\t\t\tif (intentForSelection.apps.length === 1) {\n\t\t\t\t\t\tconst appInstances = await this._clientRegistrationHelper.findAppInstances(\n\t\t\t\t\t\t\tintentForSelection.apps[0],\n\t\t\t\t\t\t\tclientIdentity,\n\t\t\t\t\t\t\t\"intent\"\n\t\t\t\t\t\t);\n\t\t\t\t\t\t// if there are no instances launch a new one otherwise present the choice to the user\n\t\t\t\t\t\t// by falling through to the next code block\n\t\t\t\t\t\tif (appInstances.length === 0 || this.createNewInstance(intentForSelection.apps[0])) {\n\t\t\t\t\t\t\tconst intentResolver = await this.launchAppWithIntent(\n\t\t\t\t\t\t\t\tintentForSelection.apps[0],\n\t\t\t\t\t\t\t\tintent as OpenFin.Intent,\n\t\t\t\t\t\t\t\tundefined,\n\t\t\t\t\t\t\t\tclientIdentity\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tif (isEmpty(intentResolver)) {\n\t\t\t\t\t\t\t\tthrow new Error(ResolveError.NoAppsFound);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn intentResolver;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tuserSelection = await this._intentResolverHelper?.launchIntentResolver(\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tapps: intentsForSelection[0].apps,\n\t\t\t\t\t\t\tintent\n\t\t\t\t\t\t},\n\t\t\t\t\t\tclientIdentity\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\tuserSelection = await this._intentResolverHelper?.launchIntentResolver(\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tintent,\n\t\t\t\t\t\t\tintents: intentsForSelection\n\t\t\t\t\t\t},\n\t\t\t\t\t\tclientIdentity\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\t// update intent with user selection\n\t\t\t\tif (isEmpty(userSelection)) {\n\t\t\t\t\tthrow new Error(ResolveError.ResolverUnavailable);\n\t\t\t\t}\n\t\t\t\tintent.displayName = userSelection.intent.displayName;\n\t\t\t\tintent.name = userSelection.intent.name;\n\t\t\t\tconst intentResolver = await this.handleIntentPickerSelection(\n\t\t\t\t\tuserSelection,\n\t\t\t\t\tintent as OpenFin.Intent,\n\t\t\t\t\tclientIdentity\n\t\t\t\t);\n\t\t\t\treturn intentResolver;\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Handle a fired intent.\n\t\t\t * @param intent The intent to handle.\n\t\t\t * @param clientIdentity The client identity.\n\t\t\t * @returns The intent resolution.\n\t\t\t */\n\t\t\tpublic async handleFiredIntent(\n\t\t\t\tintent: OpenFin.Intent>,\n\t\t\t\tclientIdentity: OpenFin.ClientIdentity\n\t\t\t): Promise | { source: string; version?: string }> {\n\t\t\t\tconsole.log(\"InteropOverride:handleFiredIntent: Received request for a raised intent\", intent);\n\t\t\t\tlogger.info(\"Received request for a raised intent\", intent);\n\t\t\t\tconst targetAppIdentifier = this.getApplicationIdentity(intent.metadata);\n\n\t\t\t\tconst matchedIntents = await this._appIntentHelper.getIntent(intent.name, intent?.context?.type);\n\t\t\t\tconst intentApps: PlatformApp[] = [];\n\n\t\t\t\tif (!isEmpty(matchedIntents)) {\n\t\t\t\t\tintentApps.push(...matchedIntents.apps);\n\t\t\t\t}\n\t\t\t\tif (!isEmpty(targetAppIdentifier)) {\n\t\t\t\t\tconst targetApp = await getApp(targetAppIdentifier.appId);\n\t\t\t\t\tif (isEmpty(targetApp)) {\n\t\t\t\t\t\tthrow new Error(ResolveError.TargetAppUnavailable);\n\t\t\t\t\t}\n\t\t\t\t\t// ensure that the specified app is one of the intent apps\n\t\t\t\t\tif (!intentApps.some((app) => app.appId === targetAppIdentifier.appId)) {\n\t\t\t\t\t\tthrow new Error(ResolveError.NoAppsFound);\n\t\t\t\t\t}\n\t\t\t\t\tconst intentResolver = await this.handleTargetedIntent(\n\t\t\t\t\t\ttargetAppIdentifier,\n\t\t\t\t\t\tintent,\n\t\t\t\t\t\tfalse,\n\t\t\t\t\t\tclientIdentity\n\t\t\t\t\t);\n\t\t\t\t\treturn intentResolver;\n\t\t\t\t}\n\n\t\t\t\tif (intentApps.length === 0) {\n\t\t\t\t\tlogger.info(\"No apps support this intent\");\n\t\t\t\t\tthrow new Error(ResolveError.NoAppsFound);\n\t\t\t\t}\n\n\t\t\t\tif (intentApps.length === 1) {\n\t\t\t\t\t// handle single entry\n\t\t\t\t\tconst appInstances = await this._clientRegistrationHelper.findAppInstances(\n\t\t\t\t\t\tintentApps[0],\n\t\t\t\t\t\tclientIdentity,\n\t\t\t\t\t\t\"intent\"\n\t\t\t\t\t);\n\t\t\t\t\t// if there are no instances launch a new one otherwise present the choice to the user\n\t\t\t\t\t// by falling through to the next code block\n\t\t\t\t\tlet appInstanceId: string | undefined;\n\t\t\t\t\tif (appInstances.length === 1) {\n\t\t\t\t\t\tappInstanceId = appInstances[0].instanceId;\n\t\t\t\t\t}\n\t\t\t\t\tif (appInstances.length === 0 || this.createNewInstance(intentApps[0])) {\n\t\t\t\t\t\tconst intentResolver = await this.launchAppWithIntent(\n\t\t\t\t\t\t\tintentApps[0],\n\t\t\t\t\t\t\tintent,\n\t\t\t\t\t\t\tappInstanceId,\n\t\t\t\t\t\t\tclientIdentity\n\t\t\t\t\t\t);\n\t\t\t\t\t\tif (isEmpty(intentResolver)) {\n\t\t\t\t\t\t\tthrow new Error(ResolveError.NoAppsFound);\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn intentResolver;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tconst userSelection = await this._intentResolverHelper?.launchIntentResolver(\n\t\t\t\t\t{\n\t\t\t\t\t\tapps: intentApps,\n\t\t\t\t\t\tintent\n\t\t\t\t\t},\n\t\t\t\t\tclientIdentity\n\t\t\t\t);\n\n\t\t\t\tif (isEmpty(userSelection)) {\n\t\t\t\t\tthrow new Error(ResolveError.ResolverUnavailable);\n\t\t\t\t}\n\n\t\t\t\tconst intentResolver = await this.handleIntentPickerSelection(userSelection, intent, clientIdentity);\n\t\t\t\treturn intentResolver;\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Invoke the intent handler.\n\t\t\t * @param clientIdentity The client identity.\n\t\t\t * @param handlerId The handler ID.\n\t\t\t * @param intent The intent to invoke.\n\t\t\t * @returns A promise that resolves when the intent handler is invoked.\n\t\t\t */\n\t\t\tpublic async invokeIntentHandler(\n\t\t\t\tclientIdentity: OpenFin.ClientIdentity,\n\t\t\t\thandlerId: string,\n\t\t\t\tintent: OpenFin.Intent\n\t\t\t): Promise {\n\t\t\t\tconst { context } = intent;\n\t\t\t\tlet contextMetadata: ContextMetadata | undefined;\n\t\t\t\tlet passedContext: { [key: string]: unknown } | undefined;\n\t\t\t\tif (!isEmpty(context)) {\n\t\t\t\t\tpassedContext = { ...context };\n\t\t\t\t\tcontextMetadata = passedContext[this._metadataKey] as ContextMetadata;\n\t\t\t\t\tif (!isEmpty(contextMetadata)) {\n\t\t\t\t\t\tdelete passedContext[this._metadataKey];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn super.invokeIntentHandler(clientIdentity, handlerId, {\n\t\t\t\t\t...intent,\n\t\t\t\t\tcontext: {\n\t\t\t\t\t\t...passedContext,\n\t\t\t\t\t\tcontextMetadata\n\t\t\t\t\t} as unknown as OpenFin.Context\n\t\t\t\t});\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Handle the FDC3 open.\n\t\t\t * @param fdc3OpenOptions The options for the open.\n\t\t\t * @param fdc3OpenOptions.app The platform app or its id.\n\t\t\t * @param fdc3OpenOptions.context The context being opened.\n\t\t\t * @param clientIdentity The client identity.\n\t\t\t * @returns The application identifier.\n\t\t\t */\n\t\t\tpublic async fdc3HandleOpen(\n\t\t\t\tfdc3OpenOptions: { app: (PlatformApp & AppIdentifier) | string; context: OpenFin.Context },\n\t\t\t\tclientIdentity: OpenFin.ClientIdentity\n\t\t\t): Promise {\n\t\t\t\tif (isEmpty(fdc3OpenOptions?.app)) {\n\t\t\t\t\tlogger.error(\"A request to fdc3.open did not pass an fdc3OpenOptions object\");\n\t\t\t\t\tthrow new Error(ResolveError.NoAppsFound);\n\t\t\t\t}\n\n\t\t\t\tlogger.info(\n\t\t\t\t\t`A request to Open has been sent to the platform by uuid: ${clientIdentity?.uuid}, name: ${clientIdentity?.name}, endpointId: ${clientIdentity.endpointId} with passed context:`,\n\t\t\t\t\tfdc3OpenOptions.context\n\t\t\t\t);\n\t\t\t\ttry {\n\t\t\t\t\tlet requestedId: string;\n\t\t\t\t\tlet instanceId: string | undefined;\n\t\t\t\t\tlet platformIdentities: PlatformAppIdentifier[] | undefined;\n\t\t\t\t\tlet focusApp = false;\n\t\t\t\t\tlet appId: string | undefined;\n\n\t\t\t\t\tif (isString(fdc3OpenOptions.app)) {\n\t\t\t\t\t\trequestedId = fdc3OpenOptions.app;\n\t\t\t\t\t} else {\n\t\t\t\t\t\trequestedId = fdc3OpenOptions.app.appId ?? fdc3OpenOptions.app.name;\n\t\t\t\t\t\tinstanceId = fdc3OpenOptions.app.instanceId;\n\t\t\t\t\t}\n\n\t\t\t\t\tconst requestedApp = await getApp(requestedId);\n\t\t\t\t\tif (isEmpty(requestedApp)) {\n\t\t\t\t\t\tthrow new Error(OpenError.AppNotFound);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (!isEmpty(instanceId)) {\n\t\t\t\t\t\t// an instance of an application was selected now look up the uuid and name\n\t\t\t\t\t\tconst allConnectedClients = await this.getAllClientInfo();\n\t\t\t\t\t\tconst clientInfo = allConnectedClients.find(\n\t\t\t\t\t\t\t(connectedClient) => connectedClient.endpointId === instanceId\n\t\t\t\t\t\t);\n\t\t\t\t\t\tif (!isEmpty(clientInfo)) {\n\t\t\t\t\t\t\tlogger.info(`App Id: ${requestedId} and instance Id: ${instanceId} was provided and found.`);\n\t\t\t\t\t\t\t// the connected instance is available\n\t\t\t\t\t\t\tplatformIdentities = [\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tuuid: clientInfo.uuid,\n\t\t\t\t\t\t\t\t\tname: clientInfo.name,\n\t\t\t\t\t\t\t\t\tappId: requestedId,\n\t\t\t\t\t\t\t\t\tinstanceId\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t];\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthrow new Error(ResolveError.TargetInstanceUnavailable);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif (isEmpty(platformIdentities)) {\n\t\t\t\t\t\tplatformIdentities = await launch(requestedApp);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfocusApp = true;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (!isEmpty(platformIdentities) && platformIdentities?.length > 0) {\n\t\t\t\t\t\tappId = platformIdentities[0].appId;\n\t\t\t\t\t\tif (platformIdentities.length > 1) {\n\t\t\t\t\t\t\tlogger.warn(\n\t\t\t\t\t\t\t\t\"Open can only return one app and instance id and multiple instances were launched as a result. Returning the first instance. Returned instances: \",\n\t\t\t\t\t\t\t\tplatformIdentities\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (!isEmpty(fdc3OpenOptions?.context)) {\n\t\t\t\t\t\t\t// an app might be a standard url that doesn't use the OpenFin fin api and as we are running in a browser APIs are not\n\t\t\t\t\t\t\t// injected into the DOM. As a result it might not connect to the broker so we should only get the instance id if it is\n\t\t\t\t\t\t\t// linked to a context request.\n\t\t\t\t\t\t\tconst openTimeout: number | undefined = this._openOptions?.connectionTimeout ?? 15000;\n\t\t\t\t\t\t\t// if we have a snapshot and multiple identities we will not wait as not all of them might not support intents.\n\t\t\t\t\t\t\tinstanceId = await this._clientRegistrationHelper.onConnectionClientReady(\n\t\t\t\t\t\t\t\tplatformIdentities[0],\n\t\t\t\t\t\t\t\topenTimeout\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tconst contextTimeout: number | undefined = this._openOptions?.contextTimeout ?? 15000;\n\t\t\t\t\t\t\tconst contextTypeName = fdc3OpenOptions.context.type;\n\t\t\t\t\t\t\t// if we have a snapshot and multiple identities we will not wait as not all of them might not support intents.\n\t\t\t\t\t\t\tconst clientReadyInstanceId = await this._clientRegistrationHelper.onContextClientReady(\n\t\t\t\t\t\t\t\tplatformIdentities[0],\n\t\t\t\t\t\t\t\tcontextTypeName,\n\t\t\t\t\t\t\t\tcontextTimeout\n\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\tlet trackedHandler = this._clientRegistrationHelper.getRegisteredContextHandler(\n\t\t\t\t\t\t\t\tcontextTypeName,\n\t\t\t\t\t\t\t\tclientReadyInstanceId\n\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\tif (isEmpty(trackedHandler)) {\n\t\t\t\t\t\t\t\ttrackedHandler = this._clientRegistrationHelper.getRegisteredContextHandler(\n\t\t\t\t\t\t\t\t\t\"*\",\n\t\t\t\t\t\t\t\t\tclientReadyInstanceId\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (!isEmpty(trackedHandler)) {\n\t\t\t\t\t\t\t\tconst contextMetadata = await this.getContextMetadata(clientIdentity);\n\t\t\t\t\t\t\t\tconst updatedContext: OpenFin.Context = {\n\t\t\t\t\t\t\t\t\t...fdc3OpenOptions.context,\n\t\t\t\t\t\t\t\t\t[this._metadataKey]: contextMetadata\n\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t\tawait this.invokeContextHandler(\n\t\t\t\t\t\t\t\t\ttrackedHandler.clientIdentity,\n\t\t\t\t\t\t\t\t\ttrackedHandler.handlerId,\n\t\t\t\t\t\t\t\t\tupdatedContext\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tlogger.warn(\n\t\t\t\t\t\t\t\t\t`Unable to send context of type ${contextTypeName} opened app ${appId} with instanceId of ${clientReadyInstanceId} as we cannot find a tracked context handler.`\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif (!isEmpty(appId)) {\n\t\t\t\t\t\tif (focusApp && !isEmpty(platformIdentities)) {\n\t\t\t\t\t\t\tawait bringAppToFront(requestedApp, platformIdentities);\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn { appId, instanceId };\n\t\t\t\t\t}\n\n\t\t\t\t\t// if no id returned then the likelihood is that there was a problem launching the application as a result of the open request.\n\t\t\t\t\tthrow new Error(OpenError.ErrorOnLaunch);\n\t\t\t\t} catch (openError) {\n\t\t\t\t\tconst error = formatError(openError);\n\t\t\t\t\tif (\n\t\t\t\t\t\terror === ResolveError.TargetInstanceUnavailable ||\n\t\t\t\t\t\terror === ResolveError.IntentDeliveryFailed ||\n\t\t\t\t\t\terror === ResolveError.TargetInstanceUnavailable ||\n\t\t\t\t\t\terror === OpenError.AppTimeout\n\t\t\t\t\t) {\n\t\t\t\t\t\tthrow new Error(OpenError.AppTimeout);\n\t\t\t\t\t}\n\t\t\t\t\tthrow openError;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * The client has disconnected form the broker.\n\t\t\t * @param clientIdentity The identity of the client that disconnected.\n\t\t\t */\n\t\t\tpublic async clientDisconnected(clientIdentity: OpenFin.ClientIdentity): Promise {\n\t\t\t\tconsole.log(\"InteropOverride:Client disconnected.\", clientIdentity);\n\t\t\t\tawait this._clientRegistrationHelper.clientDisconnected(clientIdentity);\n\t\t\t\tawait super.clientDisconnected(clientIdentity);\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Handle FDC3 find instances.\n\t\t\t * @param app The app identifier to find.\n\t\t\t * @param clientIdentity The client identity.\n\t\t\t * @returns The instance of the app.\n\t\t\t */\n\t\t\tpublic async fdc3HandleFindInstances(\n\t\t\t\tapp: AppIdentifier,\n\t\t\t\tclientIdentity: OpenFin.ClientIdentity\n\t\t\t): Promise {\n\t\t\t\tconsole.log(\"InteropOverride:fdc3HandleFindInstances fired.\", app, clientIdentity);\n\t\t\t\treturn this._clientRegistrationHelper.findAppInstances(app, clientIdentity);\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Handle request to get FDC3 app metadata.\n\t\t\t * @param app The app to get the metadata for.\n\t\t\t * @param clientIdentity The client identity.\n\t\t\t * @returns The app metadata.\n\t\t\t */\n\t\t\tpublic async fdc3HandleGetAppMetadata(\n\t\t\t\tapp: AppIdentifier,\n\t\t\t\tclientIdentity: OpenFin.ClientIdentity\n\t\t\t): Promise {\n\t\t\t\tlogger.info(\"fdc3HandleGetAppMetadata call received.\", app, clientIdentity);\n\t\t\t\t// this will only be called by FDC3 2.0+\n\t\t\t\tconst platformApp = await getApp(app.appId);\n\t\t\t\tif (!isEmpty(platformApp)) {\n\t\t\t\t\tconst appMetaData: AppMetadata = mapToAppMetaData(platformApp);\n\t\t\t\t\treturn appMetaData;\n\t\t\t\t}\n\t\t\t\tthrow new Error(\"TargetAppUnavailable\");\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Handle the request to get FDC3 info.\n\t\t\t * @param payload The payload.\n\t\t\t * @param payload.fdc3Version The version info to get.\n\t\t\t * @param clientIdentity The client identity.\n\t\t\t * @returns The info.\n\t\t\t */\n\t\t\tpublic async fdc3HandleGetInfo(\n\t\t\t\tpayload: {\n\t\t\t\t\tfdc3Version: string;\n\t\t\t\t},\n\t\t\t\tclientIdentity: OpenFin.ClientIdentity\n\t\t\t): Promise {\n\t\t\t\tconsole.log(\"InteropOverride:fdc3HandleGetInfo\", payload, clientIdentity);\n\t\t\t\tlogger.info(\"fdc3HandleGetInfo\", payload, clientIdentity);\n\t\t\t\tif (payload?.fdc3Version === \"2.0\") {\n\t\t\t\t\tconst response: ImplementationMetadata = (await super.fdc3HandleGetInfo(\n\t\t\t\t\t\tpayload,\n\t\t\t\t\t\tclientIdentity\n\t\t\t\t\t)) as ImplementationMetadata;\n\t\t\t\t\tconst appId = await this._appIdHelper.lookupAppId(clientIdentity);\n\t\t\t\t\tif (!isEmpty(appId)) {\n\t\t\t\t\t\tconst updatedResponse = {\n\t\t\t\t\t\t\t...response,\n\t\t\t\t\t\t\tappMetadata: { appId, instanceId: clientIdentity.endpointId }\n\t\t\t\t\t\t};\n\t\t\t\t\t\treturn updatedResponse;\n\t\t\t\t\t}\n\t\t\t\t\treturn response;\n\t\t\t\t}\n\t\t\t\treturn super.fdc3HandleGetInfo(payload, clientIdentity);\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Handle an intent handler being registered.\n\t\t\t * @param payload The payload.\n\t\t\t * @param clientIdentity The client identity.\n\t\t\t * @returns Nothing.\n\t\t\t */\n\t\t\tpublic async intentHandlerRegistered(\n\t\t\t\tpayload: IntentRegistrationPayload,\n\t\t\t\tclientIdentity: OpenFin.ClientIdentity\n\t\t\t): Promise {\n\t\t\t\tconsole.log(\"InteropOverride:intentHandlerRegistered\", payload, clientIdentity);\n\t\t\t\tawait this._clientRegistrationHelper.intentHandlerRegistered(payload, clientIdentity);\n\t\t\t\tawait super.intentHandlerRegistered(payload, clientIdentity);\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * A context handler has been registered against the broker.\n\t\t\t * @param payload The payload from a context listener registration.\n\t\t\t * @param payload.contextType The context type that the client is listening for.\n\t\t\t * @param payload.handlerId The handler Id for this listener.\n\t\t\t * @param clientIdentity The identity of the application that is adding the context handler.\n\t\t\t */\n\t\t\tpublic async contextHandlerRegistered(\n\t\t\t\tpayload: { contextType: string | undefined; handlerId: string },\n\t\t\t\tclientIdentity: OpenFin.ClientIdentity\n\t\t\t): Promise {\n\t\t\t\tconsole.log(\"InteropOverride:contextHandlerRegistered\", payload, clientIdentity);\n\t\t\t\tawait this._clientRegistrationHelper.contextHandlerRegistered(payload, clientIdentity);\n\t\t\t\tsuper.contextHandlerRegistered(payload, clientIdentity);\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Get an application identity.\n\t\t\t * @param metadata The metadata for the app.\n\t\t\t * @returns The app identifier.\n\t\t\t */\n\t\t\tprivate getApplicationIdentity(\n\t\t\t\tmetadata: OpenFin.IntentMetadata | undefined\n\t\t\t): AppIdentifier | undefined {\n\t\t\t\tconst target = metadata?.target;\n\t\t\t\tif (isEmpty(target)) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif (isString(target)) {\n\t\t\t\t\tif (target.trim().length === 0) {\n\t\t\t\t\t\treturn undefined;\n\t\t\t\t\t}\n\t\t\t\t\treturn { appId: target };\n\t\t\t\t}\n\n\t\t\t\tif (isEmpty(target.appId)) {\n\t\t\t\t\treturn undefined;\n\t\t\t\t}\n\n\t\t\t\treturn { appId: target.appId, instanceId: target.instanceId };\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Does the app use application identity.\n\t\t\t * @param clientIdentity The client app to check.\n\t\t\t * @returns True if the app uses application identity.\n\t\t\t */\n\t\t\tprivate usesApplicationIdentity(clientIdentity: OpenFin.ClientIdentity): boolean {\n\t\t\t\tconst apiMetadata = this._clientRegistrationHelper.getApiVersion(clientIdentity);\n\t\t\t\tif (isEmpty(apiMetadata)) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\treturn apiMetadata.type === \"fdc3\" && apiMetadata.version === \"2.0\";\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Handle a targeted intent.\n\t\t\t * @param targetAppIdentifier The identifier for the target app.\n\t\t\t * @param intent The intent.\n\t\t\t * @param targetByContext Perform the target by context.\n\t\t\t * @param clientIdentity The client identity.\n\t\t\t * @returns The intent resolution.\n\t\t\t */\n\t\t\tprivate async handleTargetedIntent(\n\t\t\t\ttargetAppIdentifier: AppIdentifier,\n\t\t\t\tintent: OpenFin.Intent,\n\t\t\t\ttargetByContext: boolean,\n\t\t\t\tclientIdentity: OpenFin.ClientIdentity\n\t\t\t): Promise> {\n\t\t\t\t// app specified flow\n\t\t\t\tconst intentsForSelection: AppsForIntent[] = [];\n\t\t\t\tconst targetApp = await getApp(targetAppIdentifier.appId);\n\n\t\t\t\t// if the specified app isn't available then let the caller know\n\t\t\t\tif (isEmpty(targetApp)) {\n\t\t\t\t\tthrow new Error(ResolveError.TargetAppUnavailable);\n\t\t\t\t}\n\t\t\t\t// if an instanceId is specified then check to see if it is valid and if it isn't inform the caller\n\t\t\t\tif (!isEmpty(targetAppIdentifier.instanceId)) {\n\t\t\t\t\tconst availableAppInstances = await this._clientRegistrationHelper.findAppInstances(\n\t\t\t\t\t\ttargetAppIdentifier,\n\t\t\t\t\t\tclientIdentity,\n\t\t\t\t\t\t\"intent\"\n\t\t\t\t\t);\n\t\t\t\t\tif (\n\t\t\t\t\t\tavailableAppInstances.length === 0 ||\n\t\t\t\t\t\t!availableAppInstances.some(\n\t\t\t\t\t\t\t(entry) =>\n\t\t\t\t\t\t\t\t// eslint-disable-next-line max-len\n\t\t\t\t\t\t\t\tentry.appId === targetAppIdentifier.appId &&\n\t\t\t\t\t\t\t\tentry.instanceId === targetAppIdentifier.instanceId\n\t\t\t\t\t\t)\n\t\t\t\t\t) {\n\t\t\t\t\t\tthrow new Error(ResolveError.TargetInstanceUnavailable);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (\n\t\t\t\t\tisEmpty(targetApp.interop?.intents?.listensFor) ||\n\t\t\t\t\tObject.values(targetApp.interop.intents.listensFor).length === 0\n\t\t\t\t) {\n\t\t\t\t\t// an app was specified but it doesn't have any intents. Indicate that something is wrong\n\t\t\t\t\tthrow new Error(ResolveError.TargetAppUnavailable);\n\t\t\t\t}\n\n\t\t\t\tconst supportedIntents: PlatformAppIntents[] = [];\n\t\t\t\tconst intentNames = Object.keys(targetApp.interop.intents.listensFor);\n\t\t\t\tfor (const intentName of intentNames) {\n\t\t\t\t\tconst intentEntry = targetApp.interop.intents.listensFor[intentName];\n\t\t\t\t\tlet contextMatch: boolean = true;\n\t\t\t\t\tconst contextType = intent.context?.type;\n\t\t\t\t\tlet supportedIntent: PlatformAppIntents | undefined;\n\t\t\t\t\tif (!isEmpty(contextType)) {\n\t\t\t\t\t\tcontextMatch = intentEntry.contexts?.includes(contextType);\n\t\t\t\t\t\tif (targetByContext) {\n\t\t\t\t\t\t\tsupportedIntent = { ...intentEntry, name: intentName };\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (isEmpty(supportedIntent) && intentName === intent.name && contextMatch) {\n\t\t\t\t\t\tsupportedIntent = { ...intentEntry, name: intentName };\n\t\t\t\t\t}\n\t\t\t\t\tif (!isEmpty(supportedIntent)) {\n\t\t\t\t\t\tsupportedIntents.push(supportedIntent);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (supportedIntents.length === 0) {\n\t\t\t\t\t// the specified app does have intent support but just none that support this context type\n\t\t\t\t\tthrow new Error(ResolveError.TargetAppUnavailable);\n\t\t\t\t}\n\n\t\t\t\tif (supportedIntents.length === 1) {\n\t\t\t\t\t// a preferred name for an app was given with the context object\n\t\t\t\t\t// the app existed and it supported the context type and there was only one intent that supported\n\t\t\t\t\t// that context type. Launch the app with that intent otherwise present the user with a list of\n\t\t\t\t\t// everything that supports that context type\n\t\t\t\t\tintent.name = supportedIntents[0].name;\n\t\t\t\t\t// check for instances\n\t\t\t\t\tif (!isEmpty(targetAppIdentifier.instanceId)) {\n\t\t\t\t\t\tconst intentResolver = await this.launchAppWithIntent(\n\t\t\t\t\t\t\ttargetApp,\n\t\t\t\t\t\t\tintent,\n\t\t\t\t\t\t\ttargetAppIdentifier.instanceId,\n\t\t\t\t\t\t\tclientIdentity\n\t\t\t\t\t\t);\n\t\t\t\t\t\treturn intentResolver;\n\t\t\t\t\t}\n\t\t\t\t\tconst specifiedAppInstances = await this._clientRegistrationHelper.findAppInstances(\n\t\t\t\t\t\ttargetApp,\n\t\t\t\t\t\tclientIdentity,\n\t\t\t\t\t\t\"intent\"\n\t\t\t\t\t);\n\n\t\t\t\t\tif (specifiedAppInstances.length === 0 || this.createNewInstance(targetApp)) {\n\t\t\t\t\t\tconst intentResolver = await this.launchAppWithIntent(\n\t\t\t\t\t\t\ttargetApp,\n\t\t\t\t\t\t\tintent,\n\t\t\t\t\t\t\tundefined,\n\t\t\t\t\t\t\tclientIdentity\n\t\t\t\t\t\t);\n\t\t\t\t\t\tif (isEmpty(intentResolver)) {\n\t\t\t\t\t\t\tthrow new Error(ResolveError.IntentDeliveryFailed);\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn intentResolver;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tfor (const supportedIntent of supportedIntents) {\n\t\t\t\t\tconst appForIntent: AppsForIntent = {\n\t\t\t\t\t\tapps: [targetApp],\n\t\t\t\t\t\tintent: { name: supportedIntent.name, displayName: supportedIntent.displayName }\n\t\t\t\t\t};\n\t\t\t\t\tintentsForSelection.push(appForIntent);\n\t\t\t\t}\n\t\t\t\tlet userSelection: IntentResolverResponse | undefined;\n\t\t\t\tif (intentsForSelection.length === 1) {\n\t\t\t\t\tif (\n\t\t\t\t\t\t!isStringValue(intent.name) &&\n\t\t\t\t\t\t!isEmpty(intentsForSelection[0]?.intent?.name) &&\n\t\t\t\t\t\t!isEmpty(intent?.context) &&\n\t\t\t\t\t\t!isEmpty(intent?.context?.type)\n\t\t\t\t\t) {\n\t\t\t\t\t\tlogger.info(\n\t\t\t\t\t\t\t`A request to raise an intent was passed and the intent name was not passed but a context was ${intent?.context?.type} with 1 matching intent. Name: ${intentsForSelection[0]?.intent?.name}, Display Name: ${intentsForSelection[0]?.intent?.displayName}. Updating intent object.`\n\t\t\t\t\t\t);\n\t\t\t\t\t\tintent.name = intentsForSelection[0]?.intent?.name;\n\t\t\t\t\t}\n\t\t\t\t\tuserSelection = await this._intentResolverHelper?.launchIntentResolver(\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tapps: intentsForSelection[0].apps,\n\t\t\t\t\t\t\tintent\n\t\t\t\t\t\t},\n\t\t\t\t\t\tclientIdentity\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\tuserSelection = await this._intentResolverHelper?.launchIntentResolver(\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tintent,\n\t\t\t\t\t\t\tintents: intentsForSelection\n\t\t\t\t\t\t},\n\t\t\t\t\t\tclientIdentity\n\t\t\t\t\t);\n\t\t\t\t\tif (!isStringValue(intent.name) && !isEmpty(userSelection?.intent?.name)) {\n\t\t\t\t\t\tlogger.info(\n\t\t\t\t\t\t\t`A request to raise an intent was passed and the following intent was selected (from a selection of ${intentsForSelection.length}). Name: ${userSelection?.intent?.name}, Display Name: ${userSelection?.intent?.displayName}. Updating intent object.`\n\t\t\t\t\t\t);\n\t\t\t\t\t\tintent.name = userSelection?.intent?.name ?? intent.name;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (isEmpty(userSelection)) {\n\t\t\t\t\tthrow new Error(ResolveError.ResolverUnavailable);\n\t\t\t\t}\n\n\t\t\t\treturn this.handleIntentPickerSelection(userSelection, intent, clientIdentity);\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Launch an app with intent.\n\t\t\t * @param app The application to launch.\n\t\t\t * @param intent The intent to open it with.\n\t\t\t * @param instanceId The instance of the app.\n\t\t\t * @param clientIdentity The identity of the source of the request.\n\t\t\t * @returns The intent resolution.\n\t\t\t */\n\t\t\tprivate async launchAppWithIntent(\n\t\t\t\tapp: PlatformApp,\n\t\t\t\tintent: OpenFin.Intent,\n\t\t\t\tinstanceId?: string,\n\t\t\t\tclientIdentity?: OpenFin.ClientIdentity\n\t\t\t): Promise> {\n\t\t\t\tlogger.info(\"Launching app with intent\");\n\t\t\t\tlet platformIdentities: PlatformAppIdentifier[] | undefined = [];\n\t\t\t\tlet existingInstance = true;\n\n\t\t\t\tif (!isEmpty(instanceId)) {\n\t\t\t\t\t// an instance of an application was selected\n\t\t\t\t\tconst allConnectedClients = await this.getAllClientInfo();\n\t\t\t\t\tconst clientInfo = allConnectedClients.find(\n\t\t\t\t\t\t(connectedClient) => connectedClient.endpointId === instanceId\n\t\t\t\t\t);\n\t\t\t\t\tif (!isEmpty(clientInfo)) {\n\t\t\t\t\t\tlogger.info(`App Id: ${app.appId} and instance Id: ${instanceId} was provided and found.`);\n\t\t\t\t\t\t// the connected instance is available\n\t\t\t\t\t\tplatformIdentities.push({\n\t\t\t\t\t\t\tuuid: clientInfo.uuid,\n\t\t\t\t\t\t\tname: clientInfo.name,\n\t\t\t\t\t\t\tappId: app.appId,\n\t\t\t\t\t\t\tinstanceId: clientInfo.endpointId\n\t\t\t\t\t\t});\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthrow new Error(ResolveError.TargetInstanceUnavailable);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (platformIdentities.length === 0) {\n\t\t\t\t\tplatformIdentities = await launch(app);\n\t\t\t\t\texistingInstance = false;\n\t\t\t\t\tif (!platformIdentities?.length) {\n\t\t\t\t\t\tthrow new Error(ResolveError.IntentDeliveryFailed);\n\t\t\t\t\t}\n\t\t\t\t\tif (platformIdentities.length === 1) {\n\t\t\t\t\t\tconst intentTimeout: number | undefined = options?.intentOptions?.intentTimeout ?? 15000;\n\t\t\t\t\t\t// if we have a snapshot and multiple identities we will not wait as not all of them might not support intents.\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tinstanceId = await this._clientRegistrationHelper.onIntentClientReady(\n\t\t\t\t\t\t\t\tplatformIdentities[0],\n\t\t\t\t\t\t\t\tintent.name,\n\t\t\t\t\t\t\t\tintentTimeout\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t} catch (intentReadyError) {\n\t\t\t\t\t\t\tlogger.warn(\n\t\t\t\t\t\t\t\t\"An error occurred while getting a instance to target an intent at.\",\n\t\t\t\t\t\t\t\tintentReadyError\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tthrow new Error(ResolveError.IntentDeliveryFailed);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tfor (const target of platformIdentities) {\n\t\t\t\t\tawait super.setIntentTarget(intent, target);\n\t\t\t\t\tif (existingInstance) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tif (bringAppToFront) {\n\t\t\t\t\t\t\t\tawait bringAppToFront(app, [target]);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} catch (bringToFrontError) {\n\t\t\t\t\t\t\tlogger.warn(\n\t\t\t\t\t\t\t\t`There was an error bringing app: ${target.appId}, and instance ${target.instanceId} with name: ${target.name} to front.`,\n\t\t\t\t\t\t\t\tbringToFrontError\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn {\n\t\t\t\t\tsource: { appId: app.appId, instanceId },\n\t\t\t\t\tversion: app.version,\n\t\t\t\t\tintent: intent.name\n\t\t\t\t};\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Get the context metadata for a client identity.\n\t\t\t * @param clientIdentity The client identity.\n\t\t\t * @returns The context metadata.\n\t\t\t */\n\t\t\tprivate async getContextMetadata(clientIdentity: OpenFin.ClientIdentity): Promise {\n\t\t\t\tconst appId = (await this._appIdHelper.lookupAppId(clientIdentity)) ?? \"unknown\";\n\t\t\t\treturn {\n\t\t\t\t\tsource: {\n\t\t\t\t\t\tappId,\n\t\t\t\t\t\tinstanceId: clientIdentity.endpointId\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Should we always use a new instance of the app.\n\t\t\t * @param app The app to check.\n\t\t\t * @returns True if we should always use a new instance.\n\t\t\t */\n\t\t\tprivate createNewInstance(app: PlatformApp): boolean {\n\t\t\t\tconst instanceMode = app.hostManifests?.OpenFin?.config?.instanceMode ?? \"new\";\n\t\t\t\treturn instanceMode === \"new\";\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Handle the intent picker selection.\n\t\t\t * @param userSelection The user selection from the intent picker.\n\t\t\t * @param intent The intent.\n\t\t\t * @param clientIdentity The source of the request.\n\t\t\t * @returns The intent resolution.\n\t\t\t */\n\t\t\tprivate async handleIntentPickerSelection(\n\t\t\t\tuserSelection: IntentResolverResponse,\n\t\t\t\tintent: OpenFin.Intent>,\n\t\t\t\tclientIdentity?: OpenFin.ClientIdentity\n\t\t\t): Promise> {\n\t\t\t\tconst selectedApp = await getApp(userSelection.appId);\n\t\t\t\tif (isEmpty(selectedApp)) {\n\t\t\t\t\tthrow new Error(ResolveError.NoAppsFound);\n\t\t\t\t}\n\t\t\t\tconst instanceId: string | undefined = userSelection.instanceId;\n\t\t\t\tconst intentResolver = await this.launchAppWithIntent(\n\t\t\t\t\tselectedApp,\n\t\t\t\t\tintent,\n\t\t\t\t\tinstanceId,\n\t\t\t\t\tclientIdentity\n\t\t\t\t);\n\t\t\t\tif (isEmpty(intentResolver)) {\n\t\t\t\t\tthrow new Error(ResolveError.NoAppsFound);\n\t\t\t\t}\n\t\t\t\treturn intentResolver;\n\t\t\t}\n\t\t};\n}\n\n/**\n * Get the override constructor for the interop broker (useful if you wish this implementation to be layered with other implementations and passed to the platform's initialization object as part of an array).\n * @param options The options for the broker.\n * @returns The override constructor to be used in an array.\n */\nexport async function getConstructorOverride(\n\toptions: PlatformInteropBrokerOptions\n): Promise> {\n\treturn constructorOverride(options);\n}\n","import type { OpenFin } from \"@openfin/core\";\nimport type { WebLayoutSnapshot } from \"@openfin/core-web\";\nimport type {\n\tLayoutManager,\n\tLayoutManagerConstructor,\n\tLayoutManagerItem,\n\tPlatformLayoutSnapshot\n} from \"../../shapes/layout-shapes\";\n\n/**\n * MakeOverride assists in loading the Fin object before the applyLayoutSnapshot Manager call.\n * @param fin the fin object.\n * @param layoutContainerId the layout container id.\n * @param layoutSelectorId the layout selector id.\n * @returns a function call.\n */\nexport function makeOverride(\n\tfin: OpenFin.Fin,\n\tlayoutContainerId: string,\n\tlayoutSelectorId: string\n) {\n\treturn function layoutManagerOverride(Base: LayoutManagerConstructor): LayoutManagerConstructor {\n\t\t/**\n\t\t * @class LayoutManagerBasic\n\t\t * This implementation is the fundamental override for Multiple Layouts in Web.\n\t\t */\n\t\treturn class LayoutManagerBasic extends Base implements LayoutManager {\n\t\t\tprivate _layoutMapArray: LayoutManagerItem[];\n\n\t\t\tprivate readonly _layoutContainer: HTMLElement | null;\n\n\t\t\tprivate readonly _layoutSelector: HTMLSelectElement | null;\n\n\t\t\tprivate _selectedLayout: string | undefined;\n\n\t\t\t/**\n\t\t\t * Sets up the required variables for the layout manager.\n\t\t\t */\n\t\t\tconstructor() {\n\t\t\t\tsuper();\n\t\t\t\tthis._layoutMapArray = [];\n\t\t\t\tthis._layoutContainer = document.querySelector(`#${layoutContainerId}`);\n\t\t\t\tthis._layoutSelector = document.querySelector(`#${layoutSelectorId}`);\n\t\t\t\tif (this._layoutSelector !== null) {\n\t\t\t\t\tthis._layoutSelector.addEventListener(\"change\", async (event) => {\n\t\t\t\t\t\tconst selectElement = event.target as HTMLSelectElement;\n\t\t\t\t\t\tconst selectedValue = selectElement.value;\n\t\t\t\t\t\tawait this.showLayout({ layoutName: selectedValue, uuid: fin.me.uuid, name: fin.me.name });\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Our implementation of getLayoutSnapshot that contains titles.\n\t\t\t * @returns Promise\n\t\t\t */\n\t\t\tpublic async getLayoutSnapshot(): Promise {\n\t\t\t\tconst layoutSnapshot = await super.getLayoutSnapshot();\n\t\t\t\tconst platformLayoutSnapshot: PlatformLayoutSnapshot = {\n\t\t\t\t\tlayouts: layoutSnapshot.layouts,\n\t\t\t\t\tlayoutTitles: {},\n\t\t\t\t\tlayoutSelected: this._selectedLayout\n\t\t\t\t};\n\t\t\t\tfor (const layout of this._layoutMapArray) {\n\t\t\t\t\tif (layout.layoutTitle !== undefined) {\n\t\t\t\t\t\tplatformLayoutSnapshot.layoutTitles[layout.layoutName] = layout.layoutTitle;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn platformLayoutSnapshot;\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Override for applying multiple snapshots.\n\t\t\t * @param snapshot The layouts object containing the fixed set of available layouts.\n\t\t\t */\n\t\t\tpublic async applyLayoutSnapshot(snapshot: WebLayoutSnapshot): Promise {\n\t\t\t\tif (this._layoutContainer !== null && this._layoutContainer !== undefined) {\n\t\t\t\t\tconst platformLayoutSnapshot = snapshot as PlatformLayoutSnapshot;\n\t\t\t\t\tfor (const [key, value] of Object.entries(snapshot.layouts)) {\n\t\t\t\t\t\tconst layoutTitle =\n\t\t\t\t\t\t\tplatformLayoutSnapshot?.layoutTitles === undefined\n\t\t\t\t\t\t\t\t? undefined\n\t\t\t\t\t\t\t\t: platformLayoutSnapshot.layoutTitles[key];\n\t\t\t\t\t\tthis._layoutMapArray.push({\n\t\t\t\t\t\t\tlayoutName: key,\n\t\t\t\t\t\t\tlayoutTitle,\n\t\t\t\t\t\t\tlayout: value,\n\t\t\t\t\t\t\tcontainer: this._layoutContainer\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t\tsetTimeout(async () => {\n\t\t\t\t\t\tconst entries = Object.entries(platformLayoutSnapshot.layouts);\n\t\t\t\t\t\tlet entryInstance = 0;\n\t\t\t\t\t\tfor (const entry of entries) {\n\t\t\t\t\t\t\tentryInstance++;\n\t\t\t\t\t\t\tconst layoutName = entry[0];\n\t\t\t\t\t\t\tawait this.createLayout(\n\t\t\t\t\t\t\t\tlayoutName,\n\t\t\t\t\t\t\t\tentry[1],\n\t\t\t\t\t\t\t\tentryInstance,\n\t\t\t\t\t\t\t\tentries.length,\n\t\t\t\t\t\t\t\tplatformLayoutSnapshot.layoutSelected\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t}, 1000);\n\t\t\t\t\tconsole.log(\"[Apply Layout] Layouts loaded\");\n\t\t\t\t\tconsole.log(`[Apply Layout] Layouts are: ${JSON.stringify(this._layoutMapArray)}`);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Shows the layout specified by the layoutName.\n\t\t\t * @param layoutName The name of the layout to show.\n\t\t\t * @param layoutName.layoutName The name of the layout to show.\n\t\t\t * @returns Promise\n\t\t\t */\n\t\t\tpublic async showLayout({ layoutName }: OpenFin.LayoutIdentity): Promise {\n\t\t\t\tconst layoutContainers = document.querySelectorAll(\"div.layout-container\");\n\t\t\t\tfor (const layoutContainer of layoutContainers) {\n\t\t\t\t\tif (layoutContainer.id === layoutName) {\n\t\t\t\t\t\tlayoutContainer.classList.remove(\"hidden\");\n\t\t\t\t\t\tthis._selectedLayout = layoutName;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tlayoutContainer.classList.add(\"hidden\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Remove Layout - You guessed it, it removes a layout from the existing array of layouts.\n\t\t\t * @param id The name of the layout you want removed.\n\t\t\t */\n\t\t\tpublic async removeLayout(id: OpenFin.LayoutIdentity): Promise {\n\t\t\t\tconst index = this._layoutMapArray.findIndex((x) => x.layoutName === id.layoutName);\n\t\t\t\tconsole.log(`[Remove Layout] Removing Layout ${id.layoutName}`);\n\t\t\t\tconsole.log(`[Remove Layout] Found layout at index ${index}`);\n\t\t\t\tawait this.removeThisLayout(id.layoutName, index);\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Returns the layout identity for the specified view identity.\n\t\t\t * @param viewIdentity The view identity to get the layout identity for.\n\t\t\t * @returns The layout identity for the specified view identity.\n\t\t\t * @throws Error if the view is not found in any layout.\n\t\t\t */\n\t\t\tpublic getLayoutIdentityForView(viewIdentity: OpenFin.Identity): OpenFin.LayoutIdentity {\n\t\t\t\tconst viewElement = document.querySelector(`div[of-name=\"${viewIdentity.name}\"]`);\n\t\t\t\tif (viewElement !== null) {\n\t\t\t\t\tconst layoutElement = viewElement.closest(\"[data-openfin-layout-name]\");\n\t\t\t\t\tif (layoutElement !== null) {\n\t\t\t\t\t\treturn { layoutName: layoutElement.id, uuid: fin.me.uuid, name: fin.me.name };\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tthrow new Error(\"View not found in any layout\");\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Given a layout identity it determines if the layout is currently visible.\n\t\t\t * @param layoutName The layout identity.\n\t\t\t * @param layoutName.layoutName The name of the layout.\n\t\t\t * @returns Whether the layout is visible.\n\t\t\t */\n\t\t\tpublic isLayoutVisible({ layoutName }: OpenFin.LayoutIdentity): boolean {\n\t\t\t\treturn layoutName === this._selectedLayout;\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * This returns the number of layouts in the layout manager.\n\t\t\t * @returns The number of layouts in the layout manager.\n\t\t\t */\n\t\t\tpublic size(): number {\n\t\t\t\treturn this._layoutMapArray.length;\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Removes this layout from the state and the DOM.\n\t\t\t * @param layoutName The name of the layout to remove.\n\t\t\t * @param index The index of the layout that is being removed.\n\t\t\t */\n\t\t\tprivate async removeThisLayout(layoutName: string, index: number): Promise {\n\t\t\t\t// remove layout from state.\n\t\t\t\tconst layoutNameElement = document.querySelector(`#${layoutName}`);\n\t\t\t\tif (layoutNameElement) {\n\t\t\t\t\tlayoutNameElement.remove();\n\t\t\t\t\tawait fin.Platform.Layout.destroy({ layoutName, uuid: fin.me.uuid, name: fin.me.name });\n\t\t\t\t\tthis._layoutMapArray = this._layoutMapArray.filter((x) => x.layoutName !== layoutName);\n\t\t\t\t\tconst nextLayoutName =\n\t\t\t\t\t\tthis._layoutMapArray[index]?.layoutName ?? this._layoutMapArray[index - 1]?.layoutName;\n\t\t\t\t\tif (this._layoutSelector !== null) {\n\t\t\t\t\t\tfor (let i = 0; i < this._layoutSelector.options.length; i++) {\n\t\t\t\t\t\t\tif (this._layoutSelector.options[i].value === layoutName) {\n\t\t\t\t\t\t\t\tthis._layoutSelector.remove(i);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.bindLayoutSelector(nextLayoutName, false);\n\t\t\t\t\t\tawait this.showLayout({ layoutName: nextLayoutName, uuid: fin.me.uuid, name: fin.me.name });\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * A Create function for layouts.\n\t\t\t * @param layoutName A string for the layout name.\n\t\t\t * @param layout LayoutOptions.\n\t\t\t * @param entry the entry from the batch that is being created.\n\t\t\t * @param length the total number of layouts to create.\n\t\t\t * @param selectedLayout the layout that is selected.\n\t\t\t */\n\t\t\tprivate async createLayout(\n\t\t\t\tlayoutName: string,\n\t\t\t\tlayout: OpenFin.LayoutOptions,\n\t\t\t\tentry: number,\n\t\t\t\tlength: number,\n\t\t\t\tselectedLayout: string | undefined\n\t\t\t): Promise {\n\t\t\t\t// Create a new div container for the layout.\n\t\t\t\tconst container = document.createElement(\"div\");\n\t\t\t\tcontainer.id = layoutName;\n\t\t\t\tcontainer.className = \"col layout-container hidden\";\n\t\t\t\tthis._layoutContainer?.append(container);\n\t\t\t\tawait fin.Platform.Layout.create({ layoutName, layout, container });\n\t\t\t\tif (entry === length) {\n\t\t\t\t\tthis.bindLayoutSelector(selectedLayout ?? layoutName);\n\t\t\t\t\tawait this.showLayout({\n\t\t\t\t\t\tlayoutName: selectedLayout ?? layoutName,\n\t\t\t\t\t\tuuid: fin.me.uuid,\n\t\t\t\t\t\tname: fin.me.name\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Binds the layout selector to the latest collecting of layouts and selects the specified layout.\n\t\t\t * @param layoutName The name of the layout to bind to the layout selector.\n\t\t\t * @param rebind Whether to rebind the layout selector.\n\t\t\t */\n\t\t\tprivate bindLayoutSelector(layoutName: string, rebind: boolean = true): void {\n\t\t\t\tif (this._layoutSelector !== null) {\n\t\t\t\t\tif (rebind) {\n\t\t\t\t\t\tthis._layoutSelector.innerHTML = \"\";\n\t\t\t\t\t\tfor (const layout of this._layoutMapArray) {\n\t\t\t\t\t\t\tconst option = document.createElement(\"option\");\n\t\t\t\t\t\t\toption.value = layout.layoutName;\n\t\t\t\t\t\t\toption.text = layout.layoutTitle ?? layout.layoutName;\n\t\t\t\t\t\t\tthis._layoutSelector.add(option);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tthis._layoutSelector.value = layoutName;\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t};\n}\n","import type OpenFin from \"@openfin/core\";\nimport type { PlatformLayoutSnapshot } from \"../../shapes/layout-shapes\";\nimport type { Logger } from \"../../shapes/logger-shapes\";\nimport type {\n\tSettings,\n\tSettingsResolverOptions,\n\tSettingsResolverResponse\n} from \"../../shapes/setting-shapes\";\nimport { objectClone } from \"../../utils\";\nimport { clearSettings, getSettings, saveSettings } from \"./settings\";\n\n/**\n * An helper for updating and resolving settings.\n */\nexport class SettingsResolverHelper {\n\tprivate readonly _logger: Logger;\n\n\tprivate readonly _settingsResolverOptions?: SettingsResolverOptions;\n\n\tprivate readonly _defaultSettingsResolverHeight: number;\n\n\tprivate readonly _defaultSettingsResolverWidth: number;\n\n\tprivate readonly _dialogElement: HTMLDialogElement | null = null;\n\n\tprivate _dialogClient: OpenFin.ChannelClient | null = null;\n\n\t/**\n\t * Create an instance of the Settings Resolver Helper.\n\t * @param settingsResolverOptions options for the helper\n\t * @param logger the logger to use.\n\t */\n\tconstructor(settingsResolverOptions: SettingsResolverOptions, logger: Logger) {\n\t\tthis._defaultSettingsResolverHeight = 715;\n\t\tthis._defaultSettingsResolverWidth = 665;\n\t\tthis._settingsResolverOptions = {\n\t\t\theight: this._defaultSettingsResolverHeight,\n\t\t\twidth: this._defaultSettingsResolverWidth,\n\t\t\t...settingsResolverOptions\n\t\t};\n\t\tthis._logger = logger;\n\t\tthis._dialogElement = document.createElement(\"dialog\");\n\t\tthis._dialogElement.id = \"settings-resolver-dialog\";\n\t\tthis._dialogElement.style.height = `${this._settingsResolverOptions.height}px`;\n\t\tthis._dialogElement.style.width = `${this._settingsResolverOptions.width}px`;\n\t\tthis._dialogElement.style.padding = \"0px\";\n\t\tthis._dialogElement.style.backgroundColor = \"var(--brand-background)\";\n\t\t// Create a new iframe element\n\t\tconst settingsResolver = document.createElement(\"iframe\");\n\n\t\t// Set the source of the iframe\n\t\tsettingsResolver.src = settingsResolverOptions.url;\n\t\tsettingsResolver.style.height = \"99%\";\n\t\tsettingsResolver.style.width = \"100%\";\n\n\t\t// Append the iframe to the dialog\n\t\tthis._dialogElement.append(settingsResolver);\n\n\t\t// Append the dialog to the body\n\t\tdocument.body.append(this._dialogElement);\n\t}\n\n\t/**\n\t * Launch the settings resolver.\n\t * @returns nothing.\n\t */\n\tpublic async showSettings(): Promise {\n\t\tif (this._dialogElement) {\n\t\t\tthis._dialogElement.showModal();\n\t\t}\n\t\tif (!this._dialogClient && this._dialogClient === null) {\n\t\t\tconst settingsResolverChannel = \"settings-resolver\";\n\t\t\tconsole.log(\"Connecting to settings resolver\", settingsResolverChannel);\n\t\t\tthis._dialogClient = await fin.InterApplicationBus.Channel.connect(settingsResolverChannel);\n\n\t\t\t// eslint-disable-next-line @typescript-eslint/await-thenable\n\t\t\tawait this._dialogClient.register(\"settings-resolver-response\", async (payload, sender) => {\n\t\t\t\tconst response = payload as {\n\t\t\t\t\tsettingsResolverResponse?: SettingsResolverResponse;\n\t\t\t\t\terrorMessage?: string;\n\t\t\t\t};\n\t\t\t\tif (response.settingsResolverResponse) {\n\t\t\t\t\tif (\n\t\t\t\t\t\tresponse.settingsResolverResponse.action === \"save-reload\" &&\n\t\t\t\t\t\tresponse.settingsResolverResponse.settings\n\t\t\t\t\t) {\n\t\t\t\t\t\tconst settingsToSave = objectClone(response.settingsResolverResponse.settings);\n\t\t\t\t\t\tconst layoutManager = fin.Platform.Layout.getCurrentLayoutManagerSync();\n\t\t\t\t\t\tsettingsToSave.platform.layout.defaultLayout = await layoutManager.getLayoutSnapshot();\n\t\t\t\t\t\tawait saveSettings(settingsToSave);\n\t\t\t\t\t\tlocation.reload();\n\t\t\t\t\t} else if (response.settingsResolverResponse.action === \"reset-reload\") {\n\t\t\t\t\t\tawait clearSettings();\n\t\t\t\t\t\tlocation.reload();\n\t\t\t\t\t}\n\t\t\t\t} else if (response.errorMessage) {\n\t\t\t\t\tthis._logger.error(response.errorMessage);\n\t\t\t\t}\n\t\t\t\tif (this._dialogElement) {\n\t\t\t\t\tthis._dialogElement.close();\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\tif (this._dialogElement && this._dialogClient) {\n\t\t\tconst settings = await getSettings();\n\t\t\tawait this._dialogClient.dispatch(\"apply-settings\", {\n\t\t\t\tcustomData: {\n\t\t\t\t\tsettings\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n}\n","import type { OpenFin } from \"@openfin/core\";\nimport type { ManifestSettings, Settings } from \"../../shapes/setting-shapes\";\n\n/**\n * Fetches the settings for the application.\n * @returns The settings for the application.\n */\nexport async function getSettings(): Promise {\n\tconst savedSettings = await getSavedSettings();\n\tif (savedSettings) {\n\t\treturn savedSettings;\n\t}\n\tconst settings = await getManifestSettings();\n\tif (!Array.isArray(settings?.endpointProvider?.endpoints)) {\n\t\tconsole.error(\n\t\t\t\"Unable to run the example as settings are required and we fetch them from the link web manifest from the html page that is being served. It should exist in the customSettings section of the web manifest.\"\n\t\t);\n\t\treturn;\n\t}\n\tconst settingsEndpoint = settings.endpointProvider.endpoints.find(\n\t\t(endpoint) => endpoint.id === \"platform-settings\"\n\t);\n\n\tif (\n\t\tsettingsEndpoint === undefined ||\n\t\tsettingsEndpoint.type !== \"fetch\" ||\n\t\tsettingsEndpoint.options.method !== \"GET\" ||\n\t\tsettingsEndpoint.options.url === undefined\n\t) {\n\t\tconsole.error(\n\t\t\t\"Unable to run the example as settings are required and we fetch them from the endpoint defined with the id: 'platform-settings' in the manifest. It needs to be of type fetch, performing a GET and it must have a url defined.\"\n\t\t);\n\t\treturn;\n\t}\n\tconst platformSettings = await fetch(settingsEndpoint?.options.url);\n\tconst settingsJson = (await platformSettings.json()) as Settings;\n\treturn settingsJson;\n}\n\n/**\n * Returns a default layout from the settings if provided.\n * @returns The default layout from the settings.\n */\nexport async function getDefaultLayout(): Promise {\n\tconst settings = await getSettings();\n\tif (settings?.platform?.layout?.defaultLayout === undefined) {\n\t\tconsole.error(\n\t\t\t\"Unable to run the example as without a layout being defined. Please ensure that settings have been provided in the web manifest.\"\n\t\t);\n\t\treturn;\n\t}\n\tif (typeof settings.platform.layout.defaultLayout === \"string\") {\n\t\tconst layoutResponse = await fetch(settings.platform.layout.defaultLayout);\n\t\tconst layoutJson = (await layoutResponse.json()) as OpenFin.LayoutSnapshot;\n\t\treturn layoutJson;\n\t}\n\treturn settings.platform.layout.defaultLayout;\n}\n\n/**\n * Returns the settings from the manifest file.\n * @returns customSettings for this example\n */\nasync function getManifestSettings(): Promise {\n\t// Get the manifest link\n\tconst link = document.querySelector('link[rel=\"manifest\"]');\n\tif (link !== null) {\n\t\tconst manifestResponse = await fetch(link.href);\n\t\tconst manifestJson = (await manifestResponse.json()) as { custom_settings: ManifestSettings };\n\t\treturn manifestJson.custom_settings;\n\t}\n}\n\n/**\n * Clears any saved settings.\n * @returns The saved settings.\n */\nexport async function clearSettings(): Promise {\n\tconst settingsId = getSavedSettingsId();\n\tlocalStorage.removeItem(settingsId);\n}\n\n/**\n * Saves the settings.\n * @param settings The settings to save.\n */\nexport async function saveSettings(settings: Settings): Promise {\n\tconst settingsId = getSavedSettingsId();\n\tlocalStorage.setItem(settingsId, JSON.stringify(settings));\n}\n\n/**\n * Retrieves saved settings from local storage.\n * @returns The saved settings.\n */\nasync function getSavedSettings(): Promise {\n\tconst settingsId = getSavedSettingsId();\n\tconst settings = localStorage.getItem(settingsId);\n\tif (settings !== null) {\n\t\treturn JSON.parse(settings);\n\t}\n}\n\n/**\n * Get the Id used for saving and fetching settings from storage.\n * @returns The settings id.\n */\nfunction getSavedSettingsId(): string {\n\tconst urlParams = new URLSearchParams(window.location.search);\n\tconst env = urlParams.get(\"env\");\n\n\tconst settingsKey = env ? `${env}-settings` : \"settings\";\n\treturn settingsKey;\n}\n","/**\n * Test if a value is a undefined or null.\n * @param value The value to test.\n * @returns True if the value is null or undefined.\n */\nexport function isEmpty(value: unknown): value is null | undefined {\n\t// eslint-disable-next-line no-restricted-syntax\n\treturn value === undefined || value === null;\n}\n\n/**\n * Test if a value is an object.\n * @param value The value to test.\n * @returns True if the value is an object.\n */\nexport function isObject(value: unknown): value is object {\n\t// eslint-disable-next-line no-restricted-syntax\n\treturn value !== undefined && value !== null && typeof value === \"object\" && !Array.isArray(value);\n}\n\n/**\n * Test if a value is a string.\n * @param value The value to test.\n * @returns True if the value is a string.\n */\nexport function isString(value: unknown): value is string {\n\t// eslint-disable-next-line no-restricted-syntax\n\treturn value !== undefined && value !== null && typeof value === \"string\";\n}\n\n/**\n * Test if a value is a string that is not empty.\n * @param value The value to test.\n * @returns True if the value is a string that is not empty.\n */\nexport function isStringValue(value: unknown): value is string {\n\treturn isString(value) && value.trim().length > 0;\n}\n\n/**\n * Test if a value is a number.\n * @param value The value to test.\n * @returns True if the value is a number.\n */\nexport function isNumber(value: unknown): value is number {\n\t// eslint-disable-next-line no-restricted-syntax\n\treturn value !== undefined && value !== null && typeof value === \"number\";\n}\n\n/**\n * Test if a value is a number with a real value i.e. not NaN or Infinite.\n * @param value The value to test.\n * @returns True if the value is a number.\n */\nexport function isNumberValue(value: unknown): value is number {\n\treturn isNumber(value) && !Number.isNaN(value) && Number.isFinite(value);\n}\n\n/**\n * Test if a value is a boolean.\n * @param value The value to test.\n * @returns True if the value is a boolean.\n */\nexport function isBoolean(value: unknown): value is boolean {\n\t// eslint-disable-next-line no-restricted-syntax\n\treturn value !== undefined && value !== null && typeof value === \"boolean\";\n}\n\n/**\n * Test if a value is an integer.\n * @param value The value to test.\n * @returns True if the value is an integer.\n */\nexport function isInteger(value: unknown): value is number {\n\treturn isNumber(value) && Number.isInteger(value);\n}\n\n/**\n * Deep clone an object.\n * @param obj The object to clone.\n * @returns The clone of the object.\n */\nexport function objectClone(obj: T): T {\n\t// eslint-disable-next-line no-restricted-syntax\n\treturn obj === undefined ? undefined : JSON.parse(JSON.stringify(obj));\n}\n\n/**\n * Do a deep comparison of the objects.\n * @param obj1 The first object to compare.\n * @param obj2 The second object to compare.\n * @param matchPropertyOrder If true the properties must be in the same order.\n * @returns True if the objects are the same.\n */\nexport function deepEqual(obj1: unknown, obj2: unknown, matchPropertyOrder: boolean = true): boolean {\n\tif (isObject(obj1) && isObject(obj2)) {\n\t\tconst objKeys1 = Object.keys(obj1);\n\t\tconst objKeys2 = Object.keys(obj2);\n\n\t\tif (objKeys1.length !== objKeys2.length) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif (matchPropertyOrder && JSON.stringify(objKeys1) !== JSON.stringify(objKeys2)) {\n\t\t\treturn false;\n\t\t}\n\n\t\tfor (const key of objKeys1) {\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t\t\tconst value1 = (obj1 as any)[key];\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t\t\tconst value2 = (obj2 as any)[key];\n\n\t\t\tif (!deepEqual(value1, value2, matchPropertyOrder)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t} else if (Array.isArray(obj1) && Array.isArray(obj2)) {\n\t\tif (obj1.length !== obj2.length) {\n\t\t\treturn false;\n\t\t}\n\t\tfor (let i = 0; i < obj1.length; i++) {\n\t\t\tif (!deepEqual(obj1[i], obj2[i], matchPropertyOrder)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn JSON.stringify(obj1) === JSON.stringify(obj2);\n}\n\n/**\n * Deep merge two objects.\n * @param target The object to be merged into.\n * @param sources The objects to merge into the target.\n * @returns The merged object.\n */\nexport function deepMerge(target: T, ...sources: T[]): T {\n\tif (!Array.isArray(sources) || sources.length === 0) {\n\t\treturn target;\n\t}\n\n\tconst targetAsMap = target as { [id: string]: unknown };\n\tconst source = sources.shift();\n\n\tlet keys;\n\tif (isObject(targetAsMap) && isObject(source)) {\n\t\tkeys = Object.keys(source);\n\t} else if (Array.isArray(source)) {\n\t\tif (!Array.isArray(target)) {\n\t\t\treturn source;\n\t\t}\n\t\tkeys = Object.keys(source).map((k) => Number.parseInt(k, 10));\n\t}\n\n\tif (keys) {\n\t\tconst sourceAsMap = source as { [id: string]: unknown };\n\t\tfor (const key of keys) {\n\t\t\tconst value = sourceAsMap[key];\n\t\t\tif (isObject(value)) {\n\t\t\t\tif (isEmpty(targetAsMap[key])) {\n\t\t\t\t\ttargetAsMap[key] = {};\n\t\t\t\t}\n\t\t\t\tdeepMerge(targetAsMap[key], value);\n\t\t\t} else if (Array.isArray(value)) {\n\t\t\t\tif (isEmpty(targetAsMap[key])) {\n\t\t\t\t\ttargetAsMap[key] = [];\n\t\t\t\t}\n\t\t\t\tdeepMerge(targetAsMap[key], value);\n\t\t\t} else {\n\t\t\t\ttargetAsMap[key] = value;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn deepMerge(target, ...sources);\n}\n\n/**\n * Polyfills randomUUID if running in a non-secure context.\n * @returns The random UUID.\n */\nexport function randomUUID(): string {\n\tif (\"randomUUID\" in globalThis.crypto) {\n\t\t// eslint-disable-next-line no-restricted-syntax\n\t\treturn globalThis.crypto.randomUUID();\n\t}\n\t// Polyfill the window.crypto.randomUUID if we are running in a non secure context that doesn't have it\n\t// we are still using window.crypto.getRandomValues which is always available\n\t// https://stackoverflow.com/a/2117523/2800218\n\t/**\n\t * Get random hex value.\n\t * @param c The number to base the random value on.\n\t * @returns The random value.\n\t */\n\tfunction getRandomHex(c: string): string {\n\t\t// eslint-disable-next-line no-bitwise\n\t\tconst rnd = globalThis.crypto.getRandomValues(new Uint8Array(1))[0] & (15 >> (Number(c) / 4));\n\t\treturn (\n\t\t\t// eslint-disable-next-line no-bitwise\n\t\t\t(Number(c) ^ rnd).toString(16)\n\t\t);\n\t}\n\treturn \"10000000-1000-4000-8000-100000000000\".replace(/[018]/g, getRandomHex);\n}\n\n/**\n * Format an error to a readable string.\n * @param err The error to format.\n * @returns The formatted error.\n */\nexport function formatError(err: unknown): string {\n\tif (isEmpty(err)) {\n\t\treturn \"\";\n\t} else if (err instanceof Error) {\n\t\treturn err.message;\n\t} else if (isStringValue(err)) {\n\t\treturn err;\n\t} else if (isObject(err) && \"message\" in err && isString(err.message)) {\n\t\treturn err.message;\n\t}\n\treturn JSON.stringify(err);\n}\n\n/**\n * A basic string sanitize function that removes angle brackets <> from a string.\n * @param content the content to sanitize\n * @returns a string without angle brackets <>\n */\nexport function sanitizeString(content: unknown): string {\n\tif (isStringValue(content)) {\n\t\treturn content\n\t\t\t.replace(/<[^>]*>?/gm, \"\")\n\t\t\t.replace(/>/g, \">\")\n\t\t\t.replace(/</g, \"<\")\n\t\t\t.replace(/&/g, \"&\")\n\t\t\t.replace(/ /g, \" \")\n\t\t\t.replace(/\\n\\s*\\n/g, \"\\n\");\n\t}\n\treturn \"\";\n}\n\n/**\n * Get the command line arguments from a command line string.\n * Examples of command line strings: arg1 key1=value1 key2=\"value with spaces\" key3='value3' key4='value with more spaces'`.\n * @param commandLine The command line string.\n * @returns The command line arguments or an empty array if none\n */\nexport function getCommandLineArgs(commandLine: string): string[] {\n\tif (!isStringValue(commandLine)) {\n\t\treturn [];\n\t}\n\tconst matches = commandLine.match(/(\\w+=)?(\"[^\"]*\"|'[^']*'|[^ ]+)/g);\n\tif (isEmpty(matches)) {\n\t\treturn [];\n\t}\n\treturn matches;\n}\n","export { default as v1 } from './v1.js';\nexport { default as v3 } from './v3.js';\nexport { default as v4 } from './v4.js';\nexport { default as v5 } from './v5.js';\nexport { default as NIL } from './nil.js';\nexport { default as version } from './version.js';\nexport { default as validate } from './validate.js';\nexport { default as stringify } from './stringify.js';\nexport { default as parse } from './parse.js';","/*\n * Browser-compatible JavaScript MD5\n *\n * Modification of JavaScript MD5\n * https://github.com/blueimp/JavaScript-MD5\n *\n * Copyright 2011, Sebastian Tschan\n * https://blueimp.net\n *\n * Licensed under the MIT license:\n * https://opensource.org/licenses/MIT\n *\n * Based on\n * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message\n * Digest Algorithm, as defined in RFC 1321.\n * Version 2.2 Copyright (C) Paul Johnston 1999 - 2009\n * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet\n * Distributed under the BSD License\n * See http://pajhome.org.uk/crypt/md5 for more info.\n */\nfunction md5(bytes) {\n if (typeof bytes === 'string') {\n var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape\n\n bytes = new Uint8Array(msg.length);\n\n for (var i = 0; i < msg.length; ++i) {\n bytes[i] = msg.charCodeAt(i);\n }\n }\n\n return md5ToHexEncodedArray(wordsToMd5(bytesToWords(bytes), bytes.length * 8));\n}\n/*\n * Convert an array of little-endian words to an array of bytes\n */\n\n\nfunction md5ToHexEncodedArray(input) {\n var output = [];\n var length32 = input.length * 32;\n var hexTab = '0123456789abcdef';\n\n for (var i = 0; i < length32; i += 8) {\n var x = input[i >> 5] >>> i % 32 & 0xff;\n var hex = parseInt(hexTab.charAt(x >>> 4 & 0x0f) + hexTab.charAt(x & 0x0f), 16);\n output.push(hex);\n }\n\n return output;\n}\n/**\n * Calculate output length with padding and bit length\n */\n\n\nfunction getOutputLength(inputLength8) {\n return (inputLength8 + 64 >>> 9 << 4) + 14 + 1;\n}\n/*\n * Calculate the MD5 of an array of little-endian words, and a bit length.\n */\n\n\nfunction wordsToMd5(x, len) {\n /* append padding */\n x[len >> 5] |= 0x80 << len % 32;\n x[getOutputLength(len) - 1] = len;\n var a = 1732584193;\n var b = -271733879;\n var c = -1732584194;\n var d = 271733878;\n\n for (var i = 0; i < x.length; i += 16) {\n var olda = a;\n var oldb = b;\n var oldc = c;\n var oldd = d;\n a = md5ff(a, b, c, d, x[i], 7, -680876936);\n d = md5ff(d, a, b, c, x[i + 1], 12, -389564586);\n c = md5ff(c, d, a, b, x[i + 2], 17, 606105819);\n b = md5ff(b, c, d, a, x[i + 3], 22, -1044525330);\n a = md5ff(a, b, c, d, x[i + 4], 7, -176418897);\n d = md5ff(d, a, b, c, x[i + 5], 12, 1200080426);\n c = md5ff(c, d, a, b, x[i + 6], 17, -1473231341);\n b = md5ff(b, c, d, a, x[i + 7], 22, -45705983);\n a = md5ff(a, b, c, d, x[i + 8], 7, 1770035416);\n d = md5ff(d, a, b, c, x[i + 9], 12, -1958414417);\n c = md5ff(c, d, a, b, x[i + 10], 17, -42063);\n b = md5ff(b, c, d, a, x[i + 11], 22, -1990404162);\n a = md5ff(a, b, c, d, x[i + 12], 7, 1804603682);\n d = md5ff(d, a, b, c, x[i + 13], 12, -40341101);\n c = md5ff(c, d, a, b, x[i + 14], 17, -1502002290);\n b = md5ff(b, c, d, a, x[i + 15], 22, 1236535329);\n a = md5gg(a, b, c, d, x[i + 1], 5, -165796510);\n d = md5gg(d, a, b, c, x[i + 6], 9, -1069501632);\n c = md5gg(c, d, a, b, x[i + 11], 14, 643717713);\n b = md5gg(b, c, d, a, x[i], 20, -373897302);\n a = md5gg(a, b, c, d, x[i + 5], 5, -701558691);\n d = md5gg(d, a, b, c, x[i + 10], 9, 38016083);\n c = md5gg(c, d, a, b, x[i + 15], 14, -660478335);\n b = md5gg(b, c, d, a, x[i + 4], 20, -405537848);\n a = md5gg(a, b, c, d, x[i + 9], 5, 568446438);\n d = md5gg(d, a, b, c, x[i + 14], 9, -1019803690);\n c = md5gg(c, d, a, b, x[i + 3], 14, -187363961);\n b = md5gg(b, c, d, a, x[i + 8], 20, 1163531501);\n a = md5gg(a, b, c, d, x[i + 13], 5, -1444681467);\n d = md5gg(d, a, b, c, x[i + 2], 9, -51403784);\n c = md5gg(c, d, a, b, x[i + 7], 14, 1735328473);\n b = md5gg(b, c, d, a, x[i + 12], 20, -1926607734);\n a = md5hh(a, b, c, d, x[i + 5], 4, -378558);\n d = md5hh(d, a, b, c, x[i + 8], 11, -2022574463);\n c = md5hh(c, d, a, b, x[i + 11], 16, 1839030562);\n b = md5hh(b, c, d, a, x[i + 14], 23, -35309556);\n a = md5hh(a, b, c, d, x[i + 1], 4, -1530992060);\n d = md5hh(d, a, b, c, x[i + 4], 11, 1272893353);\n c = md5hh(c, d, a, b, x[i + 7], 16, -155497632);\n b = md5hh(b, c, d, a, x[i + 10], 23, -1094730640);\n a = md5hh(a, b, c, d, x[i + 13], 4, 681279174);\n d = md5hh(d, a, b, c, x[i], 11, -358537222);\n c = md5hh(c, d, a, b, x[i + 3], 16, -722521979);\n b = md5hh(b, c, d, a, x[i + 6], 23, 76029189);\n a = md5hh(a, b, c, d, x[i + 9], 4, -640364487);\n d = md5hh(d, a, b, c, x[i + 12], 11, -421815835);\n c = md5hh(c, d, a, b, x[i + 15], 16, 530742520);\n b = md5hh(b, c, d, a, x[i + 2], 23, -995338651);\n a = md5ii(a, b, c, d, x[i], 6, -198630844);\n d = md5ii(d, a, b, c, x[i + 7], 10, 1126891415);\n c = md5ii(c, d, a, b, x[i + 14], 15, -1416354905);\n b = md5ii(b, c, d, a, x[i + 5], 21, -57434055);\n a = md5ii(a, b, c, d, x[i + 12], 6, 1700485571);\n d = md5ii(d, a, b, c, x[i + 3], 10, -1894986606);\n c = md5ii(c, d, a, b, x[i + 10], 15, -1051523);\n b = md5ii(b, c, d, a, x[i + 1], 21, -2054922799);\n a = md5ii(a, b, c, d, x[i + 8], 6, 1873313359);\n d = md5ii(d, a, b, c, x[i + 15], 10, -30611744);\n c = md5ii(c, d, a, b, x[i + 6], 15, -1560198380);\n b = md5ii(b, c, d, a, x[i + 13], 21, 1309151649);\n a = md5ii(a, b, c, d, x[i + 4], 6, -145523070);\n d = md5ii(d, a, b, c, x[i + 11], 10, -1120210379);\n c = md5ii(c, d, a, b, x[i + 2], 15, 718787259);\n b = md5ii(b, c, d, a, x[i + 9], 21, -343485551);\n a = safeAdd(a, olda);\n b = safeAdd(b, oldb);\n c = safeAdd(c, oldc);\n d = safeAdd(d, oldd);\n }\n\n return [a, b, c, d];\n}\n/*\n * Convert an array bytes to an array of little-endian words\n * Characters >255 have their high-byte silently ignored.\n */\n\n\nfunction bytesToWords(input) {\n if (input.length === 0) {\n return [];\n }\n\n var length8 = input.length * 8;\n var output = new Uint32Array(getOutputLength(length8));\n\n for (var i = 0; i < length8; i += 8) {\n output[i >> 5] |= (input[i / 8] & 0xff) << i % 32;\n }\n\n return output;\n}\n/*\n * Add integers, wrapping at 2^32. This uses 16-bit operations internally\n * to work around bugs in some JS interpreters.\n */\n\n\nfunction safeAdd(x, y) {\n var lsw = (x & 0xffff) + (y & 0xffff);\n var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n return msw << 16 | lsw & 0xffff;\n}\n/*\n * Bitwise rotate a 32-bit number to the left.\n */\n\n\nfunction bitRotateLeft(num, cnt) {\n return num << cnt | num >>> 32 - cnt;\n}\n/*\n * These functions implement the four basic operations the algorithm uses.\n */\n\n\nfunction md5cmn(q, a, b, x, s, t) {\n return safeAdd(bitRotateLeft(safeAdd(safeAdd(a, q), safeAdd(x, t)), s), b);\n}\n\nfunction md5ff(a, b, c, d, x, s, t) {\n return md5cmn(b & c | ~b & d, a, b, x, s, t);\n}\n\nfunction md5gg(a, b, c, d, x, s, t) {\n return md5cmn(b & d | c & ~d, a, b, x, s, t);\n}\n\nfunction md5hh(a, b, c, d, x, s, t) {\n return md5cmn(b ^ c ^ d, a, b, x, s, t);\n}\n\nfunction md5ii(a, b, c, d, x, s, t) {\n return md5cmn(c ^ (b | ~d), a, b, x, s, t);\n}\n\nexport default md5;","export default '00000000-0000-0000-0000-000000000000';","import validate from './validate.js';\n\nfunction parse(uuid) {\n if (!validate(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n var v;\n var arr = new Uint8Array(16); // Parse ########-....-....-....-............\n\n arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24;\n arr[1] = v >>> 16 & 0xff;\n arr[2] = v >>> 8 & 0xff;\n arr[3] = v & 0xff; // Parse ........-####-....-....-............\n\n arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8;\n arr[5] = v & 0xff; // Parse ........-....-####-....-............\n\n arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8;\n arr[7] = v & 0xff; // Parse ........-....-....-####-............\n\n arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8;\n arr[9] = v & 0xff; // Parse ........-....-....-....-############\n // (Use \"/\" to avoid 32-bit truncation when bit-shifting high-order bytes)\n\n arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff;\n arr[11] = v / 0x100000000 & 0xff;\n arr[12] = v >>> 24 & 0xff;\n arr[13] = v >>> 16 & 0xff;\n arr[14] = v >>> 8 & 0xff;\n arr[15] = v & 0xff;\n return arr;\n}\n\nexport default parse;","export default /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;","// Unique ID creation requires a high quality random # generator. In the browser we therefore\n// require the crypto API and do not support built-in fallback to lower quality random number\n// generators (like Math.random()).\nvar getRandomValues;\nvar rnds8 = new Uint8Array(16);\nexport default function rng() {\n // lazy load so that environments that need to polyfill have a chance to do so\n if (!getRandomValues) {\n // getRandomValues needs to be invoked in a context where \"this\" is a Crypto implementation. Also,\n // find the complete implementation of crypto (msCrypto) on IE11.\n getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto !== 'undefined' && typeof msCrypto.getRandomValues === 'function' && msCrypto.getRandomValues.bind(msCrypto);\n\n if (!getRandomValues) {\n throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');\n }\n }\n\n return getRandomValues(rnds8);\n}","// Adapted from Chris Veness' SHA1 code at\n// http://www.movable-type.co.uk/scripts/sha1.html\nfunction f(s, x, y, z) {\n switch (s) {\n case 0:\n return x & y ^ ~x & z;\n\n case 1:\n return x ^ y ^ z;\n\n case 2:\n return x & y ^ x & z ^ y & z;\n\n case 3:\n return x ^ y ^ z;\n }\n}\n\nfunction ROTL(x, n) {\n return x << n | x >>> 32 - n;\n}\n\nfunction sha1(bytes) {\n var K = [0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xca62c1d6];\n var H = [0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0];\n\n if (typeof bytes === 'string') {\n var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape\n\n bytes = [];\n\n for (var i = 0; i < msg.length; ++i) {\n bytes.push(msg.charCodeAt(i));\n }\n } else if (!Array.isArray(bytes)) {\n // Convert Array-like to Array\n bytes = Array.prototype.slice.call(bytes);\n }\n\n bytes.push(0x80);\n var l = bytes.length / 4 + 2;\n var N = Math.ceil(l / 16);\n var M = new Array(N);\n\n for (var _i = 0; _i < N; ++_i) {\n var arr = new Uint32Array(16);\n\n for (var j = 0; j < 16; ++j) {\n arr[j] = bytes[_i * 64 + j * 4] << 24 | bytes[_i * 64 + j * 4 + 1] << 16 | bytes[_i * 64 + j * 4 + 2] << 8 | bytes[_i * 64 + j * 4 + 3];\n }\n\n M[_i] = arr;\n }\n\n M[N - 1][14] = (bytes.length - 1) * 8 / Math.pow(2, 32);\n M[N - 1][14] = Math.floor(M[N - 1][14]);\n M[N - 1][15] = (bytes.length - 1) * 8 & 0xffffffff;\n\n for (var _i2 = 0; _i2 < N; ++_i2) {\n var W = new Uint32Array(80);\n\n for (var t = 0; t < 16; ++t) {\n W[t] = M[_i2][t];\n }\n\n for (var _t = 16; _t < 80; ++_t) {\n W[_t] = ROTL(W[_t - 3] ^ W[_t - 8] ^ W[_t - 14] ^ W[_t - 16], 1);\n }\n\n var a = H[0];\n var b = H[1];\n var c = H[2];\n var d = H[3];\n var e = H[4];\n\n for (var _t2 = 0; _t2 < 80; ++_t2) {\n var s = Math.floor(_t2 / 20);\n var T = ROTL(a, 5) + f(s, b, c, d) + e + K[s] + W[_t2] >>> 0;\n e = d;\n d = c;\n c = ROTL(b, 30) >>> 0;\n b = a;\n a = T;\n }\n\n H[0] = H[0] + a >>> 0;\n H[1] = H[1] + b >>> 0;\n H[2] = H[2] + c >>> 0;\n H[3] = H[3] + d >>> 0;\n H[4] = H[4] + e >>> 0;\n }\n\n return [H[0] >> 24 & 0xff, H[0] >> 16 & 0xff, H[0] >> 8 & 0xff, H[0] & 0xff, H[1] >> 24 & 0xff, H[1] >> 16 & 0xff, H[1] >> 8 & 0xff, H[1] & 0xff, H[2] >> 24 & 0xff, H[2] >> 16 & 0xff, H[2] >> 8 & 0xff, H[2] & 0xff, H[3] >> 24 & 0xff, H[3] >> 16 & 0xff, H[3] >> 8 & 0xff, H[3] & 0xff, H[4] >> 24 & 0xff, H[4] >> 16 & 0xff, H[4] >> 8 & 0xff, H[4] & 0xff];\n}\n\nexport default sha1;","import validate from './validate.js';\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\n\nvar byteToHex = [];\n\nfor (var i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).substr(1));\n}\n\nfunction stringify(arr) {\n var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n var uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!validate(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n\n return uuid;\n}\n\nexport default stringify;","import rng from './rng.js';\nimport stringify from './stringify.js'; // **`v1()` - Generate time-based UUID**\n//\n// Inspired by https://github.com/LiosK/UUID.js\n// and http://docs.python.org/library/uuid.html\n\nvar _nodeId;\n\nvar _clockseq; // Previous uuid creation time\n\n\nvar _lastMSecs = 0;\nvar _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details\n\nfunction v1(options, buf, offset) {\n var i = buf && offset || 0;\n var b = buf || new Array(16);\n options = options || {};\n var node = options.node || _nodeId;\n var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not\n // specified. We do this lazily to minimize issues related to insufficient\n // system entropy. See #189\n\n if (node == null || clockseq == null) {\n var seedBytes = options.random || (options.rng || rng)();\n\n if (node == null) {\n // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)\n node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]];\n }\n\n if (clockseq == null) {\n // Per 4.2.2, randomize (14 bit) clockseq\n clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;\n }\n } // UUID timestamps are 100 nano-second units since the Gregorian epoch,\n // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so\n // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'\n // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.\n\n\n var msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock\n // cycle to simulate higher resolution clock\n\n var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs)\n\n var dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression\n\n if (dt < 0 && options.clockseq === undefined) {\n clockseq = clockseq + 1 & 0x3fff;\n } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new\n // time interval\n\n\n if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {\n nsecs = 0;\n } // Per 4.2.1.2 Throw error if too many uuids are requested\n\n\n if (nsecs >= 10000) {\n throw new Error(\"uuid.v1(): Can't create more than 10M uuids/sec\");\n }\n\n _lastMSecs = msecs;\n _lastNSecs = nsecs;\n _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch\n\n msecs += 12219292800000; // `time_low`\n\n var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;\n b[i++] = tl >>> 24 & 0xff;\n b[i++] = tl >>> 16 & 0xff;\n b[i++] = tl >>> 8 & 0xff;\n b[i++] = tl & 0xff; // `time_mid`\n\n var tmh = msecs / 0x100000000 * 10000 & 0xfffffff;\n b[i++] = tmh >>> 8 & 0xff;\n b[i++] = tmh & 0xff; // `time_high_and_version`\n\n b[i++] = tmh >>> 24 & 0xf | 0x10; // include version\n\n b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)\n\n b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low`\n\n b[i++] = clockseq & 0xff; // `node`\n\n for (var n = 0; n < 6; ++n) {\n b[i + n] = node[n];\n }\n\n return buf || stringify(b);\n}\n\nexport default v1;","import v35 from './v35.js';\nimport md5 from './md5.js';\nvar v3 = v35('v3', 0x30, md5);\nexport default v3;","import stringify from './stringify.js';\nimport parse from './parse.js';\n\nfunction stringToBytes(str) {\n str = unescape(encodeURIComponent(str)); // UTF8 escape\n\n var bytes = [];\n\n for (var i = 0; i < str.length; ++i) {\n bytes.push(str.charCodeAt(i));\n }\n\n return bytes;\n}\n\nexport var DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8';\nexport var URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8';\nexport default function (name, version, hashfunc) {\n function generateUUID(value, namespace, buf, offset) {\n if (typeof value === 'string') {\n value = stringToBytes(value);\n }\n\n if (typeof namespace === 'string') {\n namespace = parse(namespace);\n }\n\n if (namespace.length !== 16) {\n throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)');\n } // Compute hash of namespace and value, Per 4.3\n // Future: Use spread syntax when supported on all platforms, e.g. `bytes =\n // hashfunc([...namespace, ... value])`\n\n\n var bytes = new Uint8Array(16 + value.length);\n bytes.set(namespace);\n bytes.set(value, namespace.length);\n bytes = hashfunc(bytes);\n bytes[6] = bytes[6] & 0x0f | version;\n bytes[8] = bytes[8] & 0x3f | 0x80;\n\n if (buf) {\n offset = offset || 0;\n\n for (var i = 0; i < 16; ++i) {\n buf[offset + i] = bytes[i];\n }\n\n return buf;\n }\n\n return stringify(bytes);\n } // Function#name is not settable on some platforms (#270)\n\n\n try {\n generateUUID.name = name; // eslint-disable-next-line no-empty\n } catch (err) {} // For CommonJS default export support\n\n\n generateUUID.DNS = DNS;\n generateUUID.URL = URL;\n return generateUUID;\n}","import rng from './rng.js';\nimport stringify from './stringify.js';\n\nfunction v4(options, buf, offset) {\n options = options || {};\n var rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n offset = offset || 0;\n\n for (var i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n\n return buf;\n }\n\n return stringify(rnds);\n}\n\nexport default v4;","import v35 from './v35.js';\nimport sha1 from './sha1.js';\nvar v5 = v35('v5', 0x50, sha1);\nexport default v5;","import REGEX from './regex.js';\n\nfunction validate(uuid) {\n return typeof uuid === 'string' && REGEX.test(uuid);\n}\n\nexport default validate;","import validate from './validate.js';\n\nfunction version(uuid) {\n if (!validate(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n return parseInt(uuid.substr(14, 1), 16);\n}\n\nexport default version;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","__webpack_require__.amdO = {};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = (module) => {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","import { cloudInteropOverride } from \"@openfin/cloud-interop\";\nimport type { OpenFin } from \"@openfin/core\";\nimport { connect, type WebLayoutSnapshot } from \"@openfin/core-web\";\nimport { AppResolverHelper } from \"./platform/apps/app-resolver-helper\";\nimport { getConstructorOverride } from \"./platform/broker/interop-override\";\nimport { makeOverride } from \"./platform/layout/layout-override\";\nimport { getDefaultLayout, getSettings } from \"./platform/settings/settings\";\nimport { SettingsResolverHelper } from \"./platform/settings/settings-resolver-helper\";\nimport type { Settings } from \"./shapes/setting-shapes\";\nimport { sanitizeString } from \"./utils\";\n\n/**\n * Attach listeners to elements.\n */\nasync function attachListeners(): Promise {\n\t// Get the required settings\n\tconst settings = await getSettings();\n\tif (settings !== undefined) {\n\t\tconst layoutSelectorId = `#${settings.platform.layout.layoutSelectorId}`;\n\t\tconst deleteLayoutId = `#${settings.platform.layout.deleteLayoutId}`;\n\t\tconst addLayoutId = `#${settings.platform.layout.addLayoutId}`;\n\t\tconst addLayoutButton = document.querySelector(addLayoutId);\n\t\tconst deleteButton = document.querySelector(deleteLayoutId);\n\t\tconst settingsButton = document.querySelector(\"#settings\");\n\t\tconst layoutSelector = document.querySelector(layoutSelectorId);\n\t\tif (deleteButton !== null && layoutSelector !== null) {\n\t\t\tdeleteButton?.addEventListener(\"click\", async () => {\n\t\t\t\tawait deleteCurrentLayout();\n\t\t\t});\n\t\t\t// Create a MutationObserver to watch for changes in the child list of the select element\n\t\t\tconst observer = new MutationObserver(() => {\n\t\t\t\t// Update the enabled state of the trash button based on the number of options\n\t\t\t\tdeleteButton.disabled = !(layoutSelector.options.length > 1);\n\t\t\t\tconst refreshEvent = new CustomEvent(\"refresh-context-group\");\n\t\t\t\twindow.dispatchEvent(refreshEvent);\n\t\t\t});\n\n\t\t\t// Start observing the select element with the configured parameters\n\t\t\tobserver.observe(layoutSelector, { childList: true });\n\t\t}\n\t\tif (addLayoutButton !== null) {\n\t\t\tconst addResolverHelper = new AppResolverHelper(settings.platform.app.appResolver, console);\n\t\t\taddLayoutButton?.addEventListener(\"click\", async () => {\n\t\t\t\tawait addResolverHelper.launchAppResolver();\n\t\t\t});\n\t\t}\n\t\tif (settingsButton !== null) {\n\t\t\tconst settingsResolverHelper = new SettingsResolverHelper(\n\t\t\t\tsettings.platform.ui.settingsResolver,\n\t\t\t\tconsole\n\t\t\t);\n\t\t\tsettingsButton.addEventListener(\"click\", async () => {\n\t\t\t\tawait settingsResolverHelper.showSettings();\n\t\t\t});\n\t\t}\n\t}\n}\n\n/**\n * Update the DOM with the settings.\n * @param settings passing the settings for use.\n */\nfunction updateDOM(settings: Settings | undefined): void {\n\tconst title = document.querySelector(\"#title\");\n\tconst subTitle = document.querySelector(\"#subTitle\");\n\tconst logo = document.querySelector(\"#logo\");\n\tif (title === null || subTitle === null || logo === null || settings === undefined) {\n\t\tconsole.error(\n\t\t\t\"Unable to use settings as there are missing input fields/buttons or settings have not been provided.\"\n\t\t);\n\t\treturn;\n\t}\n\tconst documentTitle = sanitizeString(settings?.platform?.ui?.title ?? \"\");\n\ttitle.textContent = documentTitle;\n\tdocument.title = documentTitle;\n\tsubTitle.textContent = sanitizeString(settings?.platform?.ui?.subTitle ?? \"\");\n\tconst documentIcon = sanitizeString(settings?.platform?.ui?.logo ?? \"\");\n\tlogo.src = documentIcon;\n\tconst fav = document.querySelector(\"#favicon\");\n\tif (fav !== null && documentIcon !== \"\") {\n\t\tfav.href = documentIcon;\n\t}\n}\n\n/**\n * Listen for config requests.\n * @param settings passing the settings for use.\n */\nfunction listenForConfigRequests(settings: Settings): void {\n\t// This allows iframes that are not in the layout to request the connect details if they do not have them\n\t// available to them.\n\twindow.addEventListener(\n\t\t\"message\",\n\t\t(event) => {\n\t\t\t// Check the origin of the message\n\t\t\t// this is where you could check to see if the request is coming from domains registered in your app directory\n\t\t\t// alternatively this logic could be done in the interop broker when the connection is attempted. These are\n\t\t\t// just example origins we have put\n\t\t\tif (\n\t\t\t\tevent.origin !== \"https://built-on-openfin.github.io\" &&\n\t\t\t\t!event.origin.startsWith(\"http://localhost:\")\n\t\t\t) {\n\t\t\t\tconsole.warn(`Incoming request came from an untrusted domain: ${event.origin}`);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// The data sent with postMessage is stored in event.data\n\t\t\tconst request = event.data;\n\t\t\tconsole.log(\n\t\t\t\t`Incoming request coming from: ${event.origin}. Received request: ${JSON.stringify(request)}`\n\t\t\t);\n\n\t\t\t// this just our example namespace. You could create your own and decide what data to pass.\n\t\t\tconst connectConfigContextType = \"openfin.coreWeb.connectConfig\";\n\t\t\t// ensure it is requesting connect details for core web\n\t\t\tif (request.type === connectConfigContextType) {\n\t\t\t\t// send back the connect details required by the client\n\t\t\t\tevent.source?.postMessage(\n\t\t\t\t\t{\n\t\t\t\t\t\ttype: connectConfigContextType,\n\t\t\t\t\t\tconnectConfig: {\n\t\t\t\t\t\t\toptions: {\n\t\t\t\t\t\t\t\tbrokerUrl: settings.platform.interop.brokerUrl,\n\t\t\t\t\t\t\t\tinteropConfig: {\n\t\t\t\t\t\t\t\t\tproviderId: settings.platform.interop.providerId,\n\t\t\t\t\t\t\t\t\tcurrentContextGroup: settings.platform.interop.defaultContextGroup\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\t{ targetOrigin: event.origin }\n\t\t\t\t);\n\t\t\t}\n\t\t},\n\t\tfalse\n\t);\n}\n\n/**\n * Delete the current layout.\n */\nasync function deleteCurrentLayout(): Promise {\n\tconst currentLayout = window.fin?.Platform.Layout.getCurrentLayoutManagerSync();\n\tif (currentLayout) {\n\t\tconst selectedLayout = currentLayout.resolveLayoutIdentity();\n\t\tif (selectedLayout) {\n\t\t\tawait currentLayout.removeLayout(selectedLayout);\n\t\t}\n\t}\n}\n\n/**\n * Initializes the OpenFin Web Broker connection.\n */\nasync function init(): Promise {\n\t// Get the required settings\n\tconst settings = await getSettings();\n\n\t// apply any settings to the UI\n\tupdateDOM(settings);\n\n\t// Get the default layout\n\tconst layoutSnapshot = await getDefaultLayout();\n\n\tif (settings === undefined || layoutSnapshot === undefined) {\n\t\tconsole.error(\n\t\t\t\"Unable to run the sample as we have been unable to load the web manifest and it's settings from the currently running html page. Please ensure that the web manifest is being served and that it contains the custom_settings section.\"\n\t\t);\n\t\treturn;\n\t}\n\n\tlistenForConfigRequests(settings);\n\n\t// Connect to the OpenFin Web Broker and pass the default layout.\n\t// It is good practice to specify providerId even if content is explicitly specifying it for cases where\n\t// this provider uses our layout system and content uses inheritance. currentContextGroup\n\t// is useful for defaulting any client that uses inheritance through our layout system.\n\tconst fin = await connect({\n\t\toptions: {\n\t\t\tbrokerUrl: settings.platform.interop.brokerUrl,\n\t\t\tinteropConfig: {\n\t\t\t\tproviderId: settings.platform.interop.providerId,\n\t\t\t\tcurrentContextGroup: settings.platform.interop.defaultContextGroup\n\t\t\t}\n\t\t},\n\t\tconnectionInheritance: \"enabled\",\n\t\tplatform: { layoutSnapshot: layoutSnapshot as WebLayoutSnapshot }\n\t});\n\n\tif (fin) {\n\t\t// Store the fin object in the window object for easy access.\n\t\twindow.fin = fin;\n\t\tconst layoutManagerOverride = makeOverride(\n\t\t\tfin,\n\t\t\tsettings.platform.layout.layoutContainerId,\n\t\t\tsettings.platform.layout.layoutSelectorId\n\t\t);\n\n\t\tconst interopOverride = await getConstructorOverride(settings.platform.interop.overrideOptions);\n\t\tconst overrides = [interopOverride];\n\n\t\tif (settings?.platform?.cloudInterop?.connectParams?.url?.startsWith(\"http\")) {\n\t\t\tconst cloudOverride = (await cloudInteropOverride(\n\t\t\t\tsettings.platform.cloudInterop.connectParams\n\t\t\t)) as unknown as OpenFin.ConstructorOverride;\n\t\t\toverrides.push(cloudOverride);\n\t\t}\n\t\t// You may now use the `fin` object to initialize the broker and the layout.\n\t\tawait fin.Interop.init(settings.platform.interop.providerId, overrides);\n\t\t// Show the main container and hide the loading container\n\t\t// initialize the layout and pass it the dom element to bind to\n\t\tawait fin.Platform.Layout.init({\n\t\t\tlayoutManagerOverride,\n\t\t\tcontainerId: settings.platform.layout.layoutContainerId\n\t\t});\n\t\t// now that everything has been setup notify others of globals\n\t\tconst finReadyEvent = new CustomEvent(\"finReady\");\n\t\twindow.dispatchEvent(finReadyEvent);\n\t\tif (window.fdc3 === undefined && window?.fin?.me.interop?.getFDC3Sync !== undefined) {\n\t\t\twindow.fdc3 = fin.me.interop.getFDC3Sync(\"2.0\");\n\t\t\tconsole.log(\"Finished initializing the fdc3 API.\");\n\t\t\t// Create and dispatch the FDC3Ready event\n\t\t\tconst fdc3ReadyEvent = new CustomEvent(\"fdc3Ready\");\n\t\t\twindow.dispatchEvent(fdc3ReadyEvent);\n\t\t}\n\t\t// setup listeners now that everything has been initialized\n\t\tawait attachListeners();\n\t}\n}\n\ninit()\n\t.then(() => {\n\t\tconsole.log(\"Connected to the OpenFin Web Broker.\");\n\t\treturn true;\n\t})\n\t.catch((err) => console.error(err));\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/web/v19.2.0/web-interop-support-context-and-intents/js/settings-dialog.bundle.js b/web/v19.2.0/web-interop-support-context-and-intents/js/settings-dialog.bundle.js index 0bef5c3..8b731dd 100644 --- a/web/v19.2.0/web-interop-support-context-and-intents/js/settings-dialog.bundle.js +++ b/web/v19.2.0/web-interop-support-context-and-intents/js/settings-dialog.bundle.js @@ -1,7 +1,7 @@ /******/ (() => { // webpackBootstrap /******/ "use strict"; var __webpack_exports__ = {}; -// This entry need to be wrapped in an IIFE because it uses a non-standard name for the exports (exports). +// This entry needs to be wrapped in an IIFE because it uses a non-standard name for the exports (exports). (() => { var exports = __webpack_exports__; /*!***********************************************!*\ diff --git a/web/v19.2.0/web-interop-support-context-and-intents/layouts/default.layout.fin.json b/web/v19.2.0/web-interop-support-context-and-intents/layouts/default.layout.fin.json index ed0a16c..18a9652 100644 --- a/web/v19.2.0/web-interop-support-context-and-intents/layouts/default.layout.fin.json +++ b/web/v19.2.0/web-interop-support-context-and-intents/layouts/default.layout.fin.json @@ -18,7 +18,7 @@ "type": "component", "componentName": "view", "componentState": { - "url": "https://built-on-openfin.github.io/dev-extensions/extensions/v19.1.0/interop/fdc3/context/2-0/fdc3-broadcast-view.html", + "url": "https://built-on-openfin.github.io/dev-extensions/extensions/v19.2.0/interop/fdc3/context/2-0/fdc3-broadcast-view.html", "name": "fdc3-context-view-2-0/e7fe7df3-6f64-4235-899f-4e91af2cb32d" }, @@ -38,7 +38,7 @@ "type": "component", "componentName": "view", "componentState": { - "url": "https://built-on-openfin.github.io/dev-extensions/extensions/v19.1.0/interop/fdc3/intent/2-0/fdc3-intent-view.html", + "url": "https://built-on-openfin.github.io/dev-extensions/extensions/v19.2.0/interop/fdc3/intent/2-0/fdc3-intent-view.html", "name": "fdc3-intent-view-2-0/54a8ef85-a885-4234-be46-9d52e88fcb74" }, @@ -71,7 +71,7 @@ "type": "component", "componentName": "view", "componentState": { - "url": "https://built-on-openfin.github.io/dev-extensions/extensions/v19.1.0/interop/interop-api/context/interop-broadcast-view.html", + "url": "https://built-on-openfin.github.io/dev-extensions/extensions/v19.2.0/interop/interop-api/context/interop-broadcast-view.html", "name": "interop-broadcast-view/64a8efd7-3d92-42ae-8fae-dffcc0fdac97" }, @@ -91,7 +91,7 @@ "type": "component", "componentName": "view", "componentState": { - "url": "https://built-on-openfin.github.io/dev-extensions/extensions/v19.1.0/interop/interop-api/intent/interop-intent-view.html", + "url": "https://built-on-openfin.github.io/dev-extensions/extensions/v19.2.0/interop/interop-api/intent/interop-intent-view.html", "name": "interop-intent-view-2-0/2d9a3624-fd0e-4e0a-b681-a79a9616b871" }, @@ -129,7 +129,7 @@ "componentName": "view", "componentState": { "name": "my-team/b9880bc2-2983-4b3c-a496-77d94783cb7e", - "url": "https://built-on-openfin.github.io/workspace-starter/workspace/v19.1.0/workspace-platform-starter/common/views/manager-portal/my-team/index.html", + "url": "https://built-on-openfin.github.io/workspace-starter/workspace/v19.2.0/workspace-platform-starter/common/views/manager-portal/my-team/index.html", "componentName": "view" }, "title": "My Team" @@ -151,7 +151,7 @@ "componentName": "view", "componentState": { "name": "internal-generated-view-0dd98149-16fb-4cf0-9b2a-d5bff2519d9b", - "url": "https://built-on-openfin.github.io/workspace-starter/workspace/v19.1.0/workspace-platform-starter/common/views/manager-portal/keeping-track/index.html", + "url": "https://built-on-openfin.github.io/workspace-starter/workspace/v19.2.0/workspace-platform-starter/common/views/manager-portal/keeping-track/index.html", "componentName": "view" }, "title": "Keeping Track" @@ -161,7 +161,7 @@ "componentName": "view", "componentState": { "name": "annual-leave/ef70ccee-2613-4f99-8a01-8cfba31064ba", - "url": "https://built-on-openfin.github.io/workspace-starter/workspace/v19.1.0/workspace-platform-starter/common/views/manager-portal/annual-leave/index.html", + "url": "https://built-on-openfin.github.io/workspace-starter/workspace/v19.2.0/workspace-platform-starter/common/views/manager-portal/annual-leave/index.html", "componentName": "view" }, "title": "Annual Leave" @@ -171,7 +171,7 @@ "componentName": "view", "componentState": { "name": "internal-generated-view-f898522a-5d85-4e9e-93eb-378179f0f909", - "url": "https://built-on-openfin.github.io/workspace-starter/workspace/v19.1.0/workspace-platform-starter/common/views/manager-portal/360-feedback/index.html", + "url": "https://built-on-openfin.github.io/workspace-starter/workspace/v19.2.0/workspace-platform-starter/common/views/manager-portal/360-feedback/index.html", "componentName": "view" }, "title": "360 Feedback" @@ -195,7 +195,7 @@ "componentName": "view", "componentState": { "name": "manager-paths/b38f525a-77a9-48d9-bd02-b895cfbbf074", - "url": "https://built-on-openfin.github.io/workspace-starter/workspace/v19.1.0/workspace-platform-starter/common/views/manager-portal/manager-paths/index.html", + "url": "https://built-on-openfin.github.io/workspace-starter/workspace/v19.2.0/workspace-platform-starter/common/views/manager-portal/manager-paths/index.html", "componentName": "view" }, "title": "Manager Paths" @@ -211,7 +211,7 @@ "componentName": "view", "componentState": { "name": "company-comms/5292442d-4d19-4d71-bcf1-ca9081ec50b0", - "url": "https://built-on-openfin.github.io/workspace-starter/workspace/v19.1.0/workspace-platform-starter/common/views/manager-portal/company-comms/index.html", + "url": "https://built-on-openfin.github.io/workspace-starter/workspace/v19.2.0/workspace-platform-starter/common/views/manager-portal/company-comms/index.html", "componentName": "view" }, "title": "Company News" @@ -221,7 +221,7 @@ "componentName": "view", "componentState": { "name": "company-cal/5292442d-4d19-4d71-bcf1-ca9081ec50b1", - "url": "https://built-on-openfin.github.io/workspace-starter/workspace/v19.1.0/workspace-platform-starter/common/views/manager-portal/company-cal/index.html", + "url": "https://built-on-openfin.github.io/workspace-starter/workspace/v19.2.0/workspace-platform-starter/common/views/manager-portal/company-cal/index.html", "componentName": "view" }, "title": "Company Calendar" @@ -231,7 +231,7 @@ "componentName": "view", "componentState": { "name": "internal-generated-view-935bb258-ded4-4a85-ad92-0f2a742d4d42", - "url": "https://built-on-openfin.github.io/workspace-starter/workspace/v19.1.0/workspace-platform-starter/common/views/manager-portal/franchise-comms/index.html", + "url": "https://built-on-openfin.github.io/workspace-starter/workspace/v19.2.0/workspace-platform-starter/common/views/manager-portal/franchise-comms/index.html", "componentName": "view" }, "title": "Franchise Comms" @@ -281,7 +281,7 @@ "type": "component", "componentName": "view", "componentState": { - "url": "https://built-on-openfin.github.io/workspace-starter/workspace/v19.1.0/workspace-platform-starter/common/views/contact/participant-summary/index.html", + "url": "https://built-on-openfin.github.io/workspace-starter/workspace/v19.2.0/workspace-platform-starter/common/views/contact/participant-summary/index.html", "componentName": "view", "name": "participant-summary-view/f65f3aa0-7499-4d8a-b477-8e04ab7db493" }, @@ -304,7 +304,7 @@ "type": "component", "componentName": "view", "componentState": { - "url": "https://built-on-openfin.github.io/workspace-starter/workspace/v19.1.0/workspace-platform-starter/common/views/contact/investments-and-models/index.html", + "url": "https://built-on-openfin.github.io/workspace-starter/workspace/v19.2.0/workspace-platform-starter/common/views/contact/investments-and-models/index.html", "componentName": "view", "name": "investments-and-models/5ad7e692-dd6a-48b8-bbc6-4f284f1bcc3d" }, @@ -327,7 +327,7 @@ "type": "component", "componentName": "view", "componentState": { - "url": "https://built-on-openfin.github.io/workspace-starter/workspace/v19.1.0/workspace-platform-starter/common/views/contact/call-app/index.html", + "url": "https://built-on-openfin.github.io/workspace-starter/workspace/v19.2.0/workspace-platform-starter/common/views/contact/call-app/index.html", "name": "call-app/1f458d7d-22a1-40fa-b793-c7eb2d4d84a6" }, "isClosable": true, @@ -365,7 +365,7 @@ "type": "component", "componentName": "view", "componentState": { - "url": "https://built-on-openfin.github.io/workspace-starter/workspace/v19.1.0/workspace-platform-starter/common/views/contact/participant-history/index.html", + "url": "https://built-on-openfin.github.io/workspace-starter/workspace/v19.2.0/workspace-platform-starter/common/views/contact/participant-history/index.html", "name": "participant-history/9b0bdbff-3de4-4b86-8abb-be1df6876a66" }, "isClosable": true, @@ -375,7 +375,7 @@ "type": "component", "componentName": "view", "componentState": { - "url": "https://built-on-openfin.github.io/workspace-starter/workspace/v19.1.0/workspace-platform-starter/common/views/contact/participant-selection/index.html", + "url": "https://built-on-openfin.github.io/workspace-starter/workspace/v19.2.0/workspace-platform-starter/common/views/contact/participant-selection/index.html", "name": "participant-selection/9b0bdbff-3de4-4b86-8abb-be1df6876a36" }, "isClosable": true, diff --git a/web/v19.2.0/web-interop-support-context-and-intents/platform/apps/app-picker.html b/web/v19.2.0/web-interop-support-context-and-intents/platform/apps/app-picker.html index 08214f2..0aba622 100644 --- a/web/v19.2.0/web-interop-support-context-and-intents/platform/apps/app-picker.html +++ b/web/v19.2.0/web-interop-support-context-and-intents/platform/apps/app-picker.html @@ -7,7 +7,7 @@ - + diff --git a/web/v19.2.0/web-interop-support-context-and-intents/platform/intents/instance-picker.html b/web/v19.2.0/web-interop-support-context-and-intents/platform/intents/instance-picker.html index 27d25ee..bd23275 100644 --- a/web/v19.2.0/web-interop-support-context-and-intents/platform/intents/instance-picker.html +++ b/web/v19.2.0/web-interop-support-context-and-intents/platform/intents/instance-picker.html @@ -7,7 +7,7 @@ - + diff --git a/web/v19.2.0/web-interop-support-context-and-intents/platform/settings/settings-dialog.html b/web/v19.2.0/web-interop-support-context-and-intents/platform/settings/settings-dialog.html index 1d2d100..305e0c2 100644 --- a/web/v19.2.0/web-interop-support-context-and-intents/platform/settings/settings-dialog.html +++ b/web/v19.2.0/web-interop-support-context-and-intents/platform/settings/settings-dialog.html @@ -7,7 +7,7 @@ - + diff --git a/web/v19.2.0/web-interop/js/fdc3-panel.bundle.js b/web/v19.2.0/web-interop/js/fdc3-panel.bundle.js index 2d02da7..a75ad42 100644 --- a/web/v19.2.0/web-interop/js/fdc3-panel.bundle.js +++ b/web/v19.2.0/web-interop/js/fdc3-panel.bundle.js @@ -1,38 +1,38 @@ /******/ (() => { // webpackBootstrap /******/ var __webpack_modules__ = ({ -/***/ "./node_modules/@openfin/core-web/out/api-client.js": -/*!**********************************************************!*\ - !*** ./node_modules/@openfin/core-web/out/api-client.js ***! - \**********************************************************/ +/***/ "../../node_modules/@openfin/core-web/out/api-client.js": +/*!**************************************************************!*\ + !*** ../../node_modules/@openfin/core-web/out/api-client.js ***! + \**************************************************************/ /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; -var e=__webpack_require__(/*! ./main-8cad4070.js */ "./node_modules/@openfin/core-web/out/main-8cad4070.js");__webpack_require__(/*! buffer/ */ "../../node_modules/buffer/index.js"),__webpack_require__(/*! uuid */ "../../node_modules/uuid/dist/esm-browser/index.js"),__webpack_require__(/*! events */ "../../node_modules/events/events.js"),__webpack_require__(/*! lodash/cloneDeep */ "../../node_modules/lodash/cloneDeep.js"),__webpack_require__(/*! lodash/isEqual */ "../../node_modules/lodash/isEqual.js"),exports.connect=e.connect; +var e=__webpack_require__(/*! ./main-8cad4070.js */ "../../node_modules/@openfin/core-web/out/main-8cad4070.js");__webpack_require__(/*! buffer/ */ "../../node_modules/buffer/index.js"),__webpack_require__(/*! uuid */ "../../node_modules/uuid/dist/esm-browser/index.js"),__webpack_require__(/*! events */ "../../node_modules/events/events.js"),__webpack_require__(/*! lodash/cloneDeep */ "../../node_modules/lodash/cloneDeep.js"),__webpack_require__(/*! lodash/isEqual */ "../../node_modules/lodash/isEqual.js"),exports.connect=e.connect; /***/ }), -/***/ "./node_modules/@openfin/core-web/out/main-8cad4070.js": -/*!*************************************************************!*\ - !*** ./node_modules/@openfin/core-web/out/main-8cad4070.js ***! - \*************************************************************/ +/***/ "../../node_modules/@openfin/core-web/out/main-8cad4070.js": +/*!*****************************************************************!*\ + !*** ../../node_modules/@openfin/core-web/out/main-8cad4070.js ***! + \*****************************************************************/ /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; -var e=__webpack_require__(/*! buffer/ */ "../../node_modules/buffer/index.js"),t=__webpack_require__(/*! events */ "../../node_modules/events/events.js"),n=__webpack_require__(/*! lodash/cloneDeep */ "../../node_modules/lodash/cloneDeep.js"),i=__webpack_require__(/*! lodash/isEqual */ "../../node_modules/lodash/isEqual.js"),r=__webpack_require__(/*! uuid */ "../../node_modules/uuid/dist/esm-browser/index.js");const o=(e,t)=>`${t}<${btoa(JSON.stringify(e))}>`;var s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof __webpack_require__.g?__webpack_require__.g:"undefined"!=typeof self?self:{},a={},c={},d={},h={};async function l(e){const t=[];for(const n of e){const e=await n();t.push(e)}return t}Object.defineProperty(h,"__esModule",{value:!0}),h.promiseMapSerial=h.serial=h.promiseMap=h.promisify=void 0,h.promisify=function(e){return(...t)=>new Promise(((n,i)=>{e(...t,((e,t)=>e?i(e):n(t)))}))},h.promiseMap=async function(e,t){return Promise.all(e.map(t))},h.serial=l,h.promiseMapSerial=async function(e,t){return l(e.map(((e,n,i)=>()=>t(e,n,i))))};var u,p=s&&s.__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},w=s&&s.__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)};Object.defineProperty(d,"__esModule",{value:!0}),d.Reply=d.EmitterBase=d.Base=void 0;const y=h;class f{constructor(e){this.isNodeEnvironment=()=>"node"===this.wire.environment.type,this.isOpenFinEnvironment=()=>"openfin"===this.wire.environment.type,this.isBrowserEnvironment=()=>"other"===this.wire.environment.type,this.wire=e}get fin(){return this.wire.getFin()}get me(){return this.wire.me}}d.Base=f;d.EmitterBase=class extends f{constructor(e,t,...n){super(e),this.topic=t,u.set(this,void 0),this.eventNames=()=>this.hasEmitter()?this.getOrCreateEmitter().eventNames():[],this.emit=(e,t,...n)=>!!this.hasEmitter()&&this.getOrCreateEmitter().emit(e,t,...n),this.hasEmitter=()=>this.wire.eventAggregator.has(w(this,u,"f")),this.getOrCreateEmitter=()=>this.wire.eventAggregator.getOrCreate(w(this,u,"f")),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[],this.listenerCount=e=>this.hasEmitter()?this.getOrCreateEmitter().listenerCount(e):0,this.registerEventListener=async(e,t={},n,i)=>{const r={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e},o=this.getOrCreateEmitter();n(o);try{await this.wire.sendAction("subscribe-to-desktop-event",r)}catch(e){throw i(o),this.deleteEmitterIfNothingRegistered(o),e}},this.deregisterEventListener=async(e,t={})=>{if(this.hasEmitter()){const n={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e};await this.wire.sendAction("unsubscribe-to-desktop-event",n).catch((()=>null));return this.getOrCreateEmitter()}return Promise.resolve()},p(this,u,[t,...n],"f"),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[]}async on(e,t,n){return await this.registerEventListener(e,n,(n=>{n.on(e,t)}),(n=>{n.removeListener(e,t)})),this}async addListener(e,t,n){return this.on(e,t,n)}async once(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.once(e,i),n.once(e,t)}),(n=>{n.removeListener(e,i),n.removeListener(e,t)})),this}async prependListener(e,t,n){return await this.registerEventListener(e,n,(n=>{n.prependListener(e,t)}),(n=>{n.removeListener(e,t)})),this}async prependOnceListener(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.prependOnceListener(e,t),n.once(e,i)}),(n=>{n.removeListener(e,t),n.removeListener(e,i)})),this}async removeListener(e,t,n){const i=await this.deregisterEventListener(e,n);return i&&(i.removeListener(e,t),this.deleteEmitterIfNothingRegistered(i)),this}async deregisterAllListeners(e){const t={...this.identity,type:e,topic:this.topic};if(this.hasEmitter()){const e=this.getOrCreateEmitter(),n=e.listenerCount(t.type),i=[];for(let e=0;enull)));return await Promise.all(i),e}}async removeAllListeners(e){const t=async e=>{const t=await this.deregisterAllListeners(e);t&&(t.removeAllListeners(e),this.deleteEmitterIfNothingRegistered(t))};if(e)await t(e);else if(this.hasEmitter()){const e=this.getOrCreateEmitter().eventNames();await(0,y.promiseMap)(e,t)}return this}deleteEmitterIfNothingRegistered(e){0===e.eventNames().length&&this.wire.eventAggregator.delete(w(this,u,"f"))}},u=new WeakMap;d.Reply=class{};var g={};Object.defineProperty(g,"__esModule",{value:!0});var m=g.RuntimeError=g.NotSupportedError=g.NotImplementedError=g.NoAckError=g.DuplicateCorrelationError=g.UnexpectedActionError=g.DisconnectedError=void 0;class v extends Error{constructor(e){super(`Expected websocket state OPEN but found ${e}`),this.readyState=e}}g.DisconnectedError=v;class C extends Error{}g.UnexpectedActionError=C;class b extends Error{}g.DuplicateCorrelationError=b;class I extends Error{}g.NoAckError=I;class E extends Error{}g.NotImplementedError=E;class x extends Error{}g.NotSupportedError=x;class A extends Error{constructor(e){const{message:t,name:n,stack:i,...r}=e;super(t),this.name=n||"Error",this.stack=i??this.toString(),Object.keys(r).forEach((e=>{this[e]=r[e]}))}}class P extends Error{static getCallSite(e=0){const t=Error.stackTraceLimit,n=e+1;Error.stackTraceLimit=t+n;const i=Error.prepareStackTrace;Error.prepareStackTrace=(e,t)=>t;const r=(new Error).stack?.slice(n)??[];return Error.prepareStackTrace=i,Error.stackTraceLimit=t,r}static prepareStackTrace(e,t){if("function"==typeof Error.prepareStackTrace)return Error.prepareStackTrace(e,t);let n="";n+=e.name||"Error",n+=`: ${e.message||""}`;for(const e of t)n+=`\n at ${e.toString()}`;return n}constructor(e,t){const{reason:n,error:i}=e;super(n),this.name="RuntimeError",i?.stack&&(this.cause=new A(i)),t&&(this.stack=P.prepareStackTrace(this,t))}}m=g.RuntimeError=P;var M={},_={},O={};Object.defineProperty(O,"__esModule",{value:!0}),O.validateIdentity=void 0,O.validateIdentity=function(e){let t;return"object"==typeof e&&"string"==typeof e.uuid||(t="Not a valid identity object"),t};var S={},R={},F={},j={},k={},L={},T={};Object.defineProperty(T,"__esModule",{value:!0}),T.handleDeprecatedWarnings=void 0;var $;T.handleDeprecatedWarnings=e=>{(e.contentNavigation?.whitelist||e.contentNavigation?.blacklist||e.contentRedirect?.whitelist||e.contentRedirect?.blacklist)&&console.warn("The properties 'whitelist' and 'blacklist' have been marked as deprecated and will be removed in a future version. Please use 'allowlist' and 'denylist'.")};var B={},G={};Object.defineProperty(G,"__esModule",{value:!0}),G.AsyncRetryableLazy=W=G.Lazy=void 0;var W=G.Lazy=class{constructor(e){this.producerFn=e}getValue(){return this.value||(this.value=this.producerFn()),this.value}};G.AsyncRetryableLazy=class{constructor(e){this.producerFn=e}async getValue(){return this.promise||(this.promise=this.producerFn().catch((e=>{throw delete this.promise,e}))),this.promise}};var H={};Object.defineProperty(H,"__esModule",{value:!0}),H.WebContents=void 0;const N=d;class D extends N.EmitterBase{constructor(e,t,n){super(e,n,t.uuid,t.name),this.identity=t,this.entityType=n}capturePage(e){return this.wire.sendAction("capture-page",{options:e,...this.identity}).then((({payload:e})=>e.data))}executeJavaScript(e){return this.wire.sendAction("execute-javascript-in-window",{...this.identity,code:e}).then((({payload:e})=>e.data))}getZoomLevel(){return this.wire.sendAction("get-zoom-level",this.identity).then((({payload:e})=>e.data))}setZoomLevel(e){return this.wire.sendAction("set-zoom-level",{...this.identity,level:e}).then((()=>{}))}navigate(e){return this.wire.sendAction("navigate-window",{...this.identity,url:e}).then((()=>{}))}navigateBack(){return this.wire.sendAction("navigate-window-back",{...this.identity}).then((()=>{}))}async navigateForward(){await this.wire.sendAction("navigate-window-forward",{...this.identity})}stopNavigation(){return this.wire.sendAction("stop-window-navigation",{...this.identity}).then((()=>{}))}reload(e=!1){return this.wire.sendAction("reload-window",{ignoreCache:e,...this.identity}).then((()=>{}))}print(e={}){return this.wire.sendAction("print",{...this.identity,options:e}).then((()=>{}))}findInPage(e,t){return this.wire.sendAction("find-in-page",{...this.identity,searchTerm:e,options:t}).then((({payload:e})=>e.data))}stopFindInPage(e){return this.wire.sendAction("stop-find-in-page",{...this.identity,action:e}).then((()=>{}))}getPrinters(){return this.wire.sendAction("get-printers",{...this.identity}).then((({payload:e})=>e.data))}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){await this.wire.sendAction("focus-window",{emitSynthFocused:e,...this.identity})}async showDeveloperTools(){await this.wire.sendAction("show-developer-tools",this.identity)}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction("get-process-info",this.identity);return e}async getSharedWorkers(){return this.wire.sendAction("get-shared-workers",this.identity).then((({payload:e})=>e.data))}async inspectSharedWorker(){await this.wire.sendAction("inspect-shared-worker",{...this.identity})}async inspectSharedWorkerById(e){await this.wire.sendAction("inspect-shared-worker-by-id",{...this.identity,workerId:e})}async inspectServiceWorker(){await this.wire.sendAction("inspect-service-worker",{...this.identity})}async showPopupWindow(e){if(this.wire.sendAction(`${this.entityType}-show-popup-window`,this.identity).catch((()=>{})),e?.onPopupReady){const t=async({popupName:t})=>{try{const n=this.fin.Window.wrapSync({uuid:this.fin.me.uuid,name:t});await e.onPopupReady(n)}catch(e){throw new Error(`Something went wrong during onPopupReady execution: ${e}`)}};await this.once("popup-ready",t)}const{payload:t}=await this.wire.sendAction("try-create-popup-window",{options:{...e,hasResultCallback:!!e?.onPopupResult,hasReadyCallback:!!e?.onPopupReady},...this.identity}),{data:{willOpen:n,options:i}}=t;n&&await this.fin.Window.create(i.initialOptions);if(e?.onPopupResult){const t=async t=>{await e.onPopupResult((e=>{const{name:t,uuid:n,result:i,data:r}=e,o={identity:{name:t,uuid:n},result:i};return r&&(o.data=r),o})(t))},n=async()=>{await this.removeListener("popup-result",t)};await this.on("popup-result",t),await this.once("popup-teardown",n)}const{payload:r}=await this.wire.sendAction("show-popup-window",{options:i,...this.identity});return r.data}}var U,V,z,K,q;function J(){return V||(V=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(function(){if($)return L;$=1,Object.defineProperty(L,"__esModule",{value:!0}),L.ViewModule=void 0;const e=d,t=O,n=J(),i=T;class r extends e.Base{async create(e){const{uuid:t}=this.wire.me;if(!e.name||"string"!=typeof e.name)throw new Error("Please provide a name property as a string in order to create a View.");return(0,i.handleDeprecatedWarnings)(e),this.wire.environment.childViews?await this.wire.environment.createChildContent({entityType:"view",options:{...e,uuid:t}}):await this.wire.sendAction("create-view",{...e,uuid:t}),this.wrapSync({uuid:t,name:e.name})}async wrap(e){this.wire.sendAction("view-wrap").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}wrapSync(e){this.wire.sendAction("view-wrap-sync").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}getCurrent(){if(this.wire.sendAction("view-get-current").catch((e=>{})),!this.wire.me.isView)throw new Error("You are not in a View context");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction("view-get-current-sync").catch((e=>{})),!this.wire.me.isView)throw new Error("You are not in a View context");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return L.ViewModule=r,L}(),e),n(function(){if(U)return B;var e;U=1,Object.defineProperty(B,"__esModule",{value:!0}),B.View=void 0;const t=g,n=G,i=H,r=ie();class o extends i.WebContents{constructor(i,o){super(i,o,"view"),this.identity=o,e.set(this,new n.Lazy((()=>this.fin.Platform.wrapSync(this.identity).getClient()))),this.attach=async e=>{await this.wire.sendAction("attach-view",{target:e,...this.identity})},this.destroy=async()=>{await this.wire.sendAction("destroy-view",{...this.identity})},this.show=async()=>{await this.wire.sendAction("show-view",{...this.identity})},this.showAt=async(e,t={})=>{await this.wire.sendAction("show-view-at",{bounds:e,...this.identity,options:t})},this.bringToFront=async()=>{await this.wire.sendAction("bring-view-to-front",{...this.identity})},this.hide=async()=>{await this.wire.sendAction("hide-view",{...this.identity})},this.setBounds=async e=>{await this.wire.sendAction("set-view-bounds",{bounds:e,...this.identity})},this.getBounds=async()=>(await this.wire.sendAction("get-view-bounds",{...this.identity})).payload.data,this.getInfo=async()=>(await this.wire.sendAction("get-view-info",{...this.identity})).payload.data,this.getParentLayout=async()=>(this.wire.sendAction("view-get-parent-layout",{...this.identity}).catch((()=>{})),this.fin.Platform.Layout.getLayoutByViewIdentity(this.identity)),this.getOptions=async()=>this.wire.sendAction("get-view-options",{...this.identity}).then((({payload:e})=>e.data)),this.updateOptions=async e=>this.wire.sendAction("update-view-options",{options:e,...this.identity}).then((()=>{})),this.getCurrentWindow=async()=>{const{payload:{data:e}}=await this.wire.sendAction("get-view-window",{...this.identity});return new r._Window(this.wire,e)},this.getCurrentStack=async()=>{this.wire.sendAction("view-get-current-stack").catch((()=>{}));try{return(await this.getParentLayout()).getStackByViewIdentity(this.identity)}catch(e){throw new t.RuntimeError({reason:"This view does not belong to a stack.",error:e})}},this.triggerBeforeUnload=async()=>(await this.wire.sendAction("trigger-before-unload",{...this.identity})).payload.data,this.bindToElement=async e=>{if(!e)throw new Error("Element not found.");return this.wire.environment.observeBounds(e,(async e=>this.setBounds(e)))}}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){const t=await this.getCurrentWindow();await t.focusedWebViewWasChanged(),await super.focus({emitSynthFocused:e})}}return B.View=o,e=new WeakMap,B}(),e)}(k)),k}function Y(){if(z)return j;z=1,Object.defineProperty(j,"__esModule",{value:!0}),j.Application=void 0;const e=d,t=ie(),n=J();class i extends e.EmitterBase{constructor(e,n){super(e,"application",n.uuid),this.identity=n,this.window=new t._Window(this.wire,{uuid:this.identity.uuid,name:this.identity.uuid})}windowListFromIdentityList(e){const n=[];return e.forEach((e=>{n.push(new t._Window(this.wire,{uuid:e.uuid,name:e.name}))})),n}isRunning(){return this.wire.sendAction("is-application-running",this.identity).then((({payload:e})=>e.data))}async quit(e=!1){try{await this._close(e),await this.wire.sendAction("destroy-application",{force:e,...this.identity})}catch(e){if(!["Remote connection has closed","Could not locate the requested application"].some((t=>e.message.includes(t))))throw e}}async _close(e=!1){try{await this.wire.sendAction("close-application",{force:e,...this.identity})}catch(e){if(!e.message.includes("Remote connection has closed"))throw e}}close(e=!1){return console.warn("Deprecation Warning: Application.close is deprecated Please use Application.quit"),this.wire.sendAction("application-close",this.identity).catch((e=>{})),this._close(e)}getChildWindows(){return this.wire.sendAction("get-child-windows",this.identity).then((({payload:e})=>{const t=[];return e.data.forEach((e=>{t.push({uuid:this.identity.uuid,name:e})})),this.windowListFromIdentityList(t)}))}getManifest(){return this.wire.sendAction("get-application-manifest",this.identity).then((({payload:e})=>e.data))}getParentUuid(){return this.wire.sendAction("get-parent-application",this.identity).then((({payload:e})=>e.data))}getShortcuts(){return this.wire.sendAction("get-shortcuts",this.identity).then((({payload:e})=>e.data))}async getViews(){const{payload:e}=await this.wire.sendAction("application-get-views",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}getZoomLevel(){return this.wire.sendAction("get-application-zoom-level",this.identity).then((({payload:e})=>e.data))}getWindow(){return this.wire.sendAction("application-get-window",this.identity).catch((e=>{})),Promise.resolve(this.window)}registerUser(e,t){return this.wire.sendAction("register-user",{userName:e,appName:t,...this.identity}).then((()=>{}))}removeTrayIcon(){return this.wire.sendAction("remove-tray-icon",this.identity).then((()=>{}))}restart(){return this.wire.sendAction("restart-application",this.identity).then((()=>{}))}run(){return console.warn("Deprecation Warning: Application.run is deprecated Please use fin.Application.start"),this.wire.sendAction("application-run",this.identity).catch((e=>{})),this._run()}_run(e={}){return this.wire.sendAction("run-application",{manifestUrl:this._manifestUrl,opts:e,...this.identity}).then((()=>{}))}scheduleRestart(){return this.wire.sendAction("relaunch-on-close",this.identity).then((()=>{}))}async sendApplicationLog(){const{payload:e}=await this.wire.sendAction("send-application-log",this.identity);return e.data}async setJumpList(e){await this.wire.sendAction("set-jump-list",{config:e,...this.identity})}setTrayIcon(e){return this.wire.sendAction("set-tray-icon",{enabledIcon:e,...this.identity}).then((()=>{}))}setShortcuts(e){return this.wire.sendAction("set-shortcuts",{data:e,...this.identity}).then((()=>{}))}async setShortcutQueryParams(e){await this.wire.sendAction("set-shortcut-query-args",{data:e,...this.identity})}setZoomLevel(e){return this.wire.sendAction("set-application-zoom-level",{level:e,...this.identity}).then((()=>{}))}async setAppLogUsername(e){await this.wire.sendAction("set-app-log-username",{data:e,...this.identity})}getTrayIconInfo(){return this.wire.sendAction("get-tray-icon-info",this.identity).then((({payload:e})=>e.data))}hasTrayIcon(){return this.wire.sendAction("has-tray-icon",this.identity).then((({payload:e})=>e.data))}terminate(){return this.wire.sendAction("terminate-application",this.identity).then((()=>{}))}wait(){return this.wire.sendAction("wait-for-hung-application",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction("get-info",this.identity).then((({payload:e})=>e.data))}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction("application-get-process-info",this.identity);return e}async setFileDownloadLocation(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t};await this.wire.sendAction("set-file-download-location",{...n,downloadLocation:e})}async getFileDownloadLocation(){const{payload:{data:e}}=await this.wire.sendAction("get-file-download-location",this.identity);return e}async showTrayIconPopupMenu(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t},{payload:i}=await this.wire.sendAction("show-tray-icon-popup-menu",{...n,options:e});return i.data}async closeTrayIconPopupMenu(){const{name:e}=this.wire.me,t={uuid:this.identity.uuid,name:e};await this.wire.sendAction("close-tray-icon-popup-menu",{...t})}}return j.Application=i,j}function Z(){return q||(q=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(function(){if(K)return F;K=1,Object.defineProperty(F,"__esModule",{value:!0}),F.ApplicationModule=void 0;const e=d,t=O,n=Y();class i extends e.Base{async wrap(e){this.wire.sendAction("wrap-application").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}wrapSync(e){this.wire.sendAction("wrap-application-sync").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}async _create(e){return void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&void 0===e.isPlatformController&&(e.autoShow=!0),await this.wire.sendAction("create-application",e),this.wrap({uuid:e.uuid})}create(e){return console.warn("Deprecation Warning: fin.Application.create is deprecated. Please use fin.Application.start"),this.wire.sendAction("application-create").catch((e=>{})),this._create(e)}async start(e){this.wire.sendAction("start-application").catch((e=>{}));const t=await this._create(e);return await this.wire.sendAction("run-application",{uuid:e.uuid}),t}async startManyManifests(e,t){return this.wire.sendAction("run-applications",{applications:e,opts:t}).then((()=>{}))}getCurrent(){return this.wire.sendAction("get-current-application").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction("get-current-application-sync").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}async startFromManifest(e,t){this.wire.sendAction("application-start-from-manifest").catch((e=>{}));const n=await this._createFromManifest(e);return await n._run(t),n}createFromManifest(e){return console.warn("Deprecation Warning: fin.Application.createFromManifest is deprecated. Please use fin.Application.startFromManifest"),this.wire.sendAction("application-create-from-manifest").catch((e=>{})),this._createFromManifest(e)}_createFromManifest(e){return this.wire.sendAction("get-application-manifest",{manifestUrl:e}).then((({payload:e})=>{const t=e.data.platform?e.data.platform.uuid:e.data.startup_app.uuid;return this.wrap({uuid:t})})).then((t=>(t._manifestUrl=e,t)))}}return F.ApplicationModule=i,F}(),e),n(Y(),e)}(R)),R}H.WebContents=D;var Q={};Object.defineProperty(Q,"__esModule",{value:!0}),Q.promisifySubscription=void 0;var X,ee,te;function ne(){if(X)return S;X=1,Object.defineProperty(S,"__esModule",{value:!0}),S._Window=void 0;const e=Z(),t=H,n=J(),i=T,r=Q;class o extends t.WebContents{constructor(e,t){super(e,t,"window")}async createWindow(e){this.wire.sendAction("window-create-window",this.identity).catch((e=>{}));const t=await(0,r.promisifySubscription)(this,"fire-constructor-callback");void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&(e.autoShow=!0),(0,i.handleDeprecatedWarnings)(e);const n=this.wire.environment.createChildContent({entityType:"window",options:e}),[o]=await Promise.all([t.getValue(),n]);let s;const{success:a}=o,c=o.data,{message:d}=c;s=a?{httpResponseCode:c.httpResponseCode,apiInjected:c.apiInjected}:{message:c.message,networkErrorCode:c.networkErrorCode,stack:c.stack};const h={message:d,cbPayload:s,success:a};try{this.getWebWindow().fin.__internal_.openerSuccessCBCalled()}catch(e){}return h.success?this:Promise.reject(h)}getAllFrames(){return this.wire.sendAction("get-all-frames",this.identity).then((({payload:e})=>e.data))}getBounds(){return this.wire.sendAction("get-window-bounds",this.identity).then((({payload:e})=>e.data))}center(){return this.wire.sendAction("center-window",this.identity).then((()=>{}))}blur(){return this.wire.sendAction("blur-window",this.identity).then((()=>{}))}bringToFront(){return this.wire.sendAction("bring-window-to-front",this.identity).then((()=>{}))}animate(e,t){return this.wire.sendAction("animate-window",{transitions:e,options:t,...this.identity}).then((()=>{}))}hide(){return this.wire.sendAction("hide-window",this.identity).then((()=>{}))}close(e=!1){return this.wire.sendAction("close-window",{force:e,...this.identity}).then((()=>{Object.setPrototypeOf(this,null)}))}focusedWebViewWasChanged(){return this.wire.sendAction("focused-webview-changed",this.identity).then((()=>{}))}getNativeId(){return this.wire.sendAction("get-window-native-id",this.identity).then((({payload:e})=>e.data))}async getCurrentViews(){const{payload:e}=await this.wire.sendAction("window-get-views",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}disableFrame(){return console.warn("Function is deprecated; use disableUserMovement instead."),this.wire.sendAction("disable-window-frame",this.identity).then((()=>{}))}disableUserMovement(){return this.wire.sendAction("disable-window-frame",this.identity).then((()=>{}))}enableFrame(){return console.warn("Function is deprecated; use enableUserMovement instead."),this.wire.sendAction("enable-window-frame",this.identity).then((()=>{}))}enableUserMovement(){return this.wire.sendAction("enable-window-frame",this.identity).then((()=>{}))}flash(){return this.wire.sendAction("flash-window",this.identity).then((()=>{}))}stopFlashing(){return this.wire.sendAction("stop-flash-window",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction("get-window-info",this.identity).then((({payload:e})=>e.data))}async getLayout(e){this.wire.sendAction("window-get-layout",this.identity).catch((e=>{}));const t=await this.getOptions();if(!t.layout&&!t.layoutSnapshot)throw new Error("Window does not have a Layout");return this.fin.Platform.Layout.wrap(e??this.identity)}getOptions(){return this.wire.sendAction("get-window-options",this.identity).then((({payload:e})=>e.data))}getParentApplication(){return this.wire.sendAction("window-get-parent-application",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity))}getParentWindow(){return this.wire.sendAction("window-get-parent-window",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity)).then((e=>e.getWindow()))}async getSnapshot(e){const t={area:e,...this.identity};console.warn("Window.getSnapshot has been deprecated, please use Window.capturePage");return(await this.wire.sendAction("get-window-snapshot",t)).payload.data}getState(){return this.wire.sendAction("get-window-state",this.identity).then((({payload:e})=>e.data))}getWebWindow(){return this.wire.sendAction("window-get-web-window",this.identity).catch((e=>{})),this.wire.environment.getWebWindow(this.identity)}isMainWindow(){return this.wire.sendAction("window-is-main-window",this.identity).catch((e=>{})),this.me.uuid===this.me.name}isShowing(){return this.wire.sendAction("is-window-showing",this.identity).then((({payload:e})=>e.data))}maximize(){return this.wire.sendAction("maximize-window",this.identity).then((()=>{}))}minimize(){return this.wire.sendAction("minimize-window",this.identity).then((()=>{}))}moveBy(e,t,n){return this.wire.sendAction("move-window-by",{deltaLeft:e,deltaTop:t,positioningOptions:n,...this.identity}).then((()=>{}))}moveTo(e,t,n){return this.wire.sendAction("move-window",{left:e,top:t,positioningOptions:n,...this.identity}).then((()=>{}))}resizeBy(e,t,n,i){return this.wire.sendAction("resize-window-by",{deltaWidth:Math.floor(e),deltaHeight:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}resizeTo(e,t,n,i){return this.wire.sendAction("resize-window",{width:Math.floor(e),height:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}restore(){return this.wire.sendAction("restore-window",this.identity).then((()=>{}))}setAsForeground(){return this.wire.sendAction("set-foreground-window",this.identity).then((()=>{}))}setBounds(e,t){return this.wire.sendAction("set-window-bounds",{...e,...this.identity,positioningOptions:t}).then((()=>{}))}show(e=!1){return this.wire.sendAction("show-window",{force:e,...this.identity}).then((()=>{}))}showAt(e,t,n=!1){return this.wire.sendAction("show-at-window",{force:n,left:Math.floor(e),top:Math.floor(t),...this.identity}).then((()=>{}))}updateOptions(e){return this.wire.sendAction("update-window-options",{options:e,...this.identity}).then((()=>{}))}authenticate(e,t){return this.wire.sendAction("window-authenticate",{userName:e,password:t,...this.identity}).then((()=>{}))}async showPopupMenu(e){const{payload:t}=await this.wire.sendAction("show-popup-menu",{options:e,...this.identity});return t.data}async closePopupMenu(){return this.wire.sendAction("close-popup-menu",{...this.identity}).then((()=>{}))}async dispatchPopupResult(e){this.wire.sendAction("window-dispatch-popup-result",this.identity).catch((e=>{})),await this.wire.sendAction("dispatch-popup-result",{data:e,...this.identity})}async print(e={content:"self"}){switch(e.content){case void 0:case"self":return super.print(e);case"screenshot":return this.wire.sendAction("print-screenshot",this.identity).then((()=>{}));case"views":return this.wire.sendAction("print-views",{...this.identity,options:e}).then((()=>{}));default:return}}}return S._Window=o,S}function ie(){return te||(te=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(function(){if(ee)return _;ee=1,Object.defineProperty(_,"__esModule",{value:!0}),_._WindowModule=void 0;const e=d,t=O,n=ne();class i extends e.Base{async wrap(e){this.wire.sendAction("window-wrap").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}wrapSync(e){this.wire.sendAction("window-wrap-sync").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}create(e){return this.wire.sendAction("create-window").catch((e=>{})),new n._Window(this.wire,{uuid:this.me.uuid,name:e.name}).createWindow(e)}getCurrent(){if(this.wire.sendAction("get-current-window").catch((e=>{})),!this.wire.me.isWindow)throw new Error("You are not in a Window context");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction("get-current-window-sync").catch((e=>{})),!this.wire.me.isWindow)throw new Error("You are not in a Window context");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return _._WindowModule=i,_}(),e),n(ne(),e)}(M)),M}Q.promisifySubscription=async(e,t,n=(()=>!0),i)=>{let r,o,s;const a=new Promise(((e,t)=>{r=e,o=t})),c=e=>{n(e)&&(clearTimeout(s),r(e))};return await e.on(t,c),i&&(s=setTimeout((()=>o(new Error("event timed out"))),i)),a.finally((()=>{e.removeListener(t,c).catch((()=>null))})),{getValue:()=>a}},Object.defineProperty(c,"__esModule",{value:!0}),c.System=void 0;const re=d,oe=g,se=ie(),ae=t;class ce extends re.EmitterBase{constructor(e){super(e,"system")}sendExternalProcessRequest(e,t){return new Promise(((n,i)=>{const r="external-process-exited";let o,s,a,c;"function"==typeof t.listener&&(a=e=>{const n=e||{};s={topic:"exited",uuid:n.processUuid||"",exitCode:n.exitCode||0},o===e.processUuid&&(t.listener(s),c.removeListener(r,a))},this.wire.me.name||(this.wire.me.name=this.wire.me.uuid),c=new se._Window(this.wire,this.wire.me),c.on(r,a)),this.wire.sendAction(e,t).then((({payload:e})=>{o=e.data.uuid,n(e.data),s&&o===s.uuid&&(t.listener(s),c.removeListener(r,a))})).catch((e=>{c&&c.removeListener(r,a),i(e)}))}))}getVersion(){return this.wire.sendAction("get-version").then((({payload:e})=>e.data))}clearCache(e){return this.wire.sendAction("clear-cache",e).then((()=>{}))}deleteCacheOnExit(){return this.wire.sendAction("delete-cache-request").then((()=>{}))}exit(){return this.wire.sendAction("exit-desktop").then((()=>{}))}async fetchManifest(e){const{payload:{data:t}}=await this.wire.sendAction("fetch-manifest",{manifestUrl:e});return t}flushCookieStore(){return this.wire.sendAction("flush-cookie-store").then((()=>{}))}getAllWindows(){return this.wire.sendAction("get-all-windows").then((({payload:e})=>e.data))}getAllApplications(){return this.wire.sendAction("get-all-applications").then((({payload:e})=>e.data))}getCommandLineArguments(){return this.wire.sendAction("get-command-line-arguments").then((({payload:e})=>e.data))}async getCrashReporterState(){const{payload:{data:{diagnosticMode:e,isRunning:t}}}=await this.wire.sendAction("get-crash-reporter-state");return console.warn("diagnosticMode property is deprecated. It will be removed in a future version"),{diagnosticMode:e,diagnosticsMode:e,isRunning:t}}async startCrashReporter(e){const t=e,n={...t,diagnosticMode:t.diagnosticsMode||t.diagnosticMode},{payload:{data:{diagnosticMode:i,isRunning:r}}}=await this.wire.sendAction("start-crash-reporter",n);return{diagnosticMode:i,diagnosticsMode:i,isRunning:r}}getUniqueUserId(){return this.wire.sendAction("get-unique-user-id").then((({payload:e})=>e.data))}getEntityInfo(e,t){return this.wire.sendAction("get-entity-info",{uuid:e,name:t}).then((({payload:e})=>e.data))}getEnvironmentVariable(e){return this.wire.sendAction("get-environment-variable",{environmentVariables:e}).then((({payload:e})=>e.data))}getFocusedWindow(){return this.wire.sendAction("get-focused-window").then((({payload:e})=>e.data))}async isAppCertified(e){const{payload:{data:{certifiedInfo:t}}}=await this.wire.sendAction("is-app-certified",{manifestUrl:e});return t}getInstalledRuntimes(){return this.wire.sendAction("get-installed-runtimes").then((({payload:e})=>e.data.runtimes))}async getInstalledApps(){const{payload:{data:{installedApps:e}}}=await this.wire.sendAction("get-installed-apps");return e}getLog(e){return this.wire.sendAction("view-log",e).then((({payload:e})=>e.data))}getMachineId(){return this.wire.sendAction("get-machine-id").then((({payload:e})=>e.data))}getMinLogLevel(){return this.wire.sendAction("get-min-log-level").then((({payload:e})=>e.data))}getLogList(){return this.wire.sendAction("list-logs").then((({payload:e})=>e.data))}getMonitorInfo(){return this.wire.sendAction("get-monitor-info").then((({payload:e})=>e.data))}getMousePosition(){return this.wire.sendAction("get-mouse-position").then((({payload:e})=>e.data))}getProcessList(){return console.warn("System.getProcessList has been deprecated. Please consider using our new process APIs: Window.getProcessInfo, View.getProcessInfo, Application.getProcessInfo, System.getAllProcessInfo"),this.wire.sendAction("process-snapshot").then((({payload:e})=>e.data))}async getAllProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction("get-all-process-info",this.identity);return e}getProxySettings(){return this.wire.sendAction("get-proxy-settings").then((({payload:e})=>e.data))}getRuntimeInfo(){return this.wire.sendAction("get-runtime-info").then((({payload:e})=>e.data))}getRvmInfo(){return this.wire.sendAction("get-rvm-info").then((({payload:e})=>e.data))}getHostSpecs(){return this.wire.sendAction("get-host-specs").then((({payload:e})=>e.data))}getOSInfo(){return this.wire.sendAction("get-os-info").then((({payload:e})=>e.data))}launchExternalProcess(e){return this.sendExternalProcessRequest("launch-external-process",e)}monitorExternalProcess(e){return this.sendExternalProcessRequest("monitor-external-process",e)}log(e,t){return this.wire.sendAction("write-to-log",{level:e,message:t}).then((()=>{}))}openUrlWithBrowser(e){return this.wire.sendAction("open-url-with-browser",{url:e}).then((()=>{}))}async registerCustomProtocol(e){if("object"!=typeof e)throw new Error("Must provide an object with a `protocolName` property having a string value.");await this.wire.sendAction("register-custom-protocol",e)}async unregisterCustomProtocol(e){await this.wire.sendAction("unregister-custom-protocol",{protocolName:e})}async getCustomProtocolState(e){return this.wire.sendAction("get-custom-protocol-state",{protocolName:e}).then((({payload:e})=>e.data))}releaseExternalProcess(e){return this.wire.sendAction("release-external-process",{uuid:e}).then((()=>{}))}showDeveloperTools(e){return this.wire.sendAction("show-developer-tools",e).then((()=>{}))}terminateExternalProcess(e){return this.wire.sendAction("terminate-external-process",e).then((()=>{}))}updateProxySettings(e){return this.wire.sendAction("update-proxy",e).then((()=>{}))}async downloadAsset(e,t){const n=()=>{};let i=n,r=n;const o=new Promise(((e,t)=>{i=e,r=t}));if("openfin"!==this.wire.environment.type)throw new oe.NotSupportedError("downloadAsset only supported in an OpenFin Render process");const s=oe.RuntimeError.getCallSite(),a=this.wire.environment.getNextMessageId().toString(),c=`asset-download-progress-${a}`,d=`asset-download-error-${a}`,h=`asset-download-complete-${a}`,l=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},u=()=>{this.removeListener(c,l)};await Promise.all([this.on(c,l),this.once(d,(e=>{u();const{reason:t,err:n}=e;r(new oe.RuntimeError({reason:t,error:n},s))})),this.once(h,(()=>{u(),i()}))]);const p=Object.assign(e,{downloadId:a});return await this.wire.sendAction("download-asset",p).catch((e=>{throw u(),e})),o}downloadRuntime(e,t){const n=oe.RuntimeError.getCallSite();return new Promise(((i,r)=>{if("openfin"!==this.wire.environment.type)return void r(new oe.NotSupportedError("downloadRuntime only supported in an OpenFin Render process"));const o=this.wire.environment.getNextMessageId().toString(),s=`runtime-download-progress-${o}`,a=`runtime-download-error-${o}`,c=`runtime-download-complete-${o}`,d=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},h=()=>{this.removeListener(s,d)};this.on(s,d),this.once(a,(e=>{h();const{reason:t,err:i}=e;r(new oe.RuntimeError({reason:t,error:i},n))})),this.once(c,(()=>{h(),i()}));const l=Object.assign(e,{downloadId:o});this.wire.sendAction("download-runtime",l).catch((e=>{h(),r(e)}))}))}downloadPreloadScripts(e){return this.wire.sendAction("download-preload-scripts",{scripts:e}).then((({payload:e})=>e.data))}getAllExternalApplications(){return this.wire.sendAction("get-all-external-applications").then((({payload:e})=>e.data))}getAppAssetInfo(e){return this.wire.sendAction("get-app-asset-info",e).then((({payload:e})=>e.data))}getCookies(e){const t=this.wire.environment.getUrl(),n=Object.assign(e,{url:t});return this.wire.sendAction("get-cookies",n).then((({payload:e})=>e.data))}setMinLogLevel(e){return this.wire.sendAction("set-min-log-level",{level:e}).then((()=>{}))}resolveUuid(e){return this.wire.sendAction("resolve-uuid",{entityKey:e}).then((({payload:e})=>e.data))}executeOnRemote(e,t){return t.requestingIdentity=e,this.wire.ferryAction(t)}readRegistryValue(e,t,n){return this.wire.sendAction("read-registry-value",{rootKey:e,subkey:t,value:n}).then((({payload:e})=>e.data))}registerExternalConnection(e){return this.wire.sendAction("register-external-connection",{uuid:e}).then((({payload:e})=>e.data))}async getServiceConfiguration(e){if("string"!=typeof e.name)throw new Error("Must provide an object with a `name` property having a string value");const{name:t}=e;return this.wire.sendAction("get-service-configuration",{name:t}).then((({payload:e})=>e.data))}async getSystemAppConfig(e){if("string"!=typeof e)throw new Error("Must provide a string value for name of system app");return this.wire.sendAction("get-system-app-configuration",{name:e}).then((({payload:e})=>e.data))}async registerShutdownHandler(e){this.wire.sendAction("system-register-shutdown-handler").catch((e=>{}));const{uuid:t,name:n}=this.wire.me;this.on("system-shutdown",(i=>{e({proceed:()=>{this.wire.environment.raiseEvent("application/system-shutdown-handled",{uuid:t,name:n,topic:"application"})}})}))}runRvmHealthCheck(){return this.wire.sendAction("run-rvm-health-check").then((({payload:e})=>e.data))}async launchManifest(e,t={}){const{subscribe:n,...i}=t,r=i;if(n){const e=new ae.EventEmitter;n(e);const t="app-version-progress",i="runtime-status",o="app-version-complete",s="app-version-error",a=this.wire.environment.getNextMessageId().toString();r.appVersionId=a;const c=[o,t,i,s],d=e=>{const{appVersionId:t,topic:n,type:i,...r}=e;return{...r,type:c.find((e=>i.includes(e)))}},h=t=>{const n=d(t);e.emit(n.type,n)},l=()=>{this.removeListener(`${t}.${a}`,h),this.removeListener(`${i}.${a}`,h),this.removeListener(`${o}.${a}`,h),this.removeListener(`${s}.${a}`,h),this.removeListener(`${o}.${a}`,l),this.removeListener(`${s}.${a}`,l)};await Promise.all([this.on(`${t}.${a}`,h),this.on(`${i}.${a}`,h),this.once(`${o}.${a}`,h),this.once(`${s}.${a}`,h),this.once(`${o}.${a}`,l),this.once(`${s}.${a}`,l)])}return(await this.wire.sendAction("launch-manifest",{manifestUrl:e,opts:r})).payload.data.manifest}async queryPermissionForCurrentContext(e){const t={uuid:this.wire.me.uuid,name:this.wire.me.name};return(await this.wire.sendAction("query-permission-for-current-context",{apiName:e,identity:t})).payload.data}async enableNativeWindowIntegrationProvider(e){const{payload:t}=await this.wire.sendAction("enable-native-window-integration-provider",{permissions:e});return t.data}async registerUsage({data:e,type:t}){await this.wire.sendAction("register-usage",{data:e,type:t})}async getPrinters(){const{payload:e}=await this.wire.sendAction("system-get-printers");return e.data}async updateProcessLoggingOptions(e){await this.wire.sendAction("system-update-process-logging-options",{options:e})}async getDomainSettings(){const{payload:{data:e}}=await this.wire.sendAction("get-domain-settings",this.identity);return e}async setDomainSettings(e){await this.wire.sendAction("set-domain-settings",{domainSettings:e,...this.identity})}async refreshExtensions(){const{payload:e}=await this.wire.sendAction("refresh-extensions");return e.data}async getInstalledExtensions(){const{payload:e}=await this.wire.sendAction("get-installed-extensions");return e.data}}c.System=ce;var de={},he={};Object.defineProperty(he,"__esModule",{value:!0}),he.RefCounter=void 0;he.RefCounter=class{constructor(){this.topicRefMap=new Map}incRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t+1;n=i,this.topicRefMap.set(e,i)}else this.topicRefMap.set(e,1),n=1;return n}decRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t-1;this.topicRefMap.set(e,i),n=i}else n=-1;return n}actOnFirst(e,t,n){return 1===this.incRefCount(e)?t():n()}actOnLast(e,t,n){return 0===this.decRefCount(e)?t():n()}};var le={},ue={},pe={};Object.defineProperty(pe,"__esModule",{value:!0}),pe.ChannelBase=pe.ProtectedItems=void 0;const we=e=>async(t,n,i)=>{const r=await e(t,n,i);return void 0===r?n:r};pe.ProtectedItems=class{constructor(e,t){this.providerIdentity=e,this.close=t}};class ye{static defaultAction(e){throw new Error(`No action registered at target for ${e}`)}constructor(){this.subscriptions=new Map}async processAction(e,t,n){try{const i=this.subscriptions.has(e)?this.subscriptions.get(e):(t,n)=>(this.defaultAction??ye.defaultAction)(e,t,n),r=this.preAction?await this.preAction(e,t,n):t,o=await i(r,n);return this.postAction?await this.postAction(e,o,n):o}catch(t){if(this.errorMiddleware)return this.errorMiddleware(e,t,n);throw t}}beforeAction(e){if(this.preAction)throw new Error("Already registered beforeAction middleware");this.preAction=we(e)}onError(e){if(this.errorMiddleware)throw new Error("Already registered error middleware");this.errorMiddleware=e}afterAction(e){if(this.postAction)throw new Error("Already registered afterAction middleware");this.postAction=we(e)}remove(e){this.subscriptions.delete(e)}setDefaultAction(e){if(this.defaultAction)throw new Error("default action can only be set once");this.defaultAction=e}register(e,t){if(this.subscriptions.has(e))throw new Error(`Subscription already registered for action: ${e}. Unsubscribe before adding new subscription`);return this.subscriptions.set(e,t),!0}}pe.ChannelBase=ye;var fe,ge,me,ve=s&&s.__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)},Ce=s&&s.__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};Object.defineProperty(ue,"__esModule",{value:!0}),ue.ChannelClient=void 0;const be=pe,Ie=new Map;class Ee extends be.ChannelBase{static closeChannelByEndpointId(e){const t=Ie.get(e);t&&ve(t,me,"f").call(t)}static handleProviderDisconnect(e){for(const t of Ie.values())t.providerIdentity.channelId===e.channelId&&(t.disconnectListener(e),ve(t,me,"f").call(t))}constructor(e,t,n){super(),fe.set(this,void 0),ge.set(this,void 0),this.processAction=(e,t,n)=>super.processAction(e,t,n),me.set(this,(()=>{Ie.delete(this.endpointId),ve(this,ge,"f").close()})),Ce(this,fe,new be.ProtectedItems(e,t),"f"),this.disconnectListener=()=>{},this.endpointId=e.endpointId,Ce(this,ge,n,"f"),Ie.set(this.endpointId,this),n.receive(this.processAction)}get providerIdentity(){return ve(this,fe,"f").providerIdentity}async dispatch(e,t){if(ve(this,ge,"f").isEndpointConnected(this.providerIdentity.channelId))return ve(this,ge,"f").send(this.providerIdentity.channelId,e,t);throw new Error("The client you are trying to dispatch from is disconnected from the target provider.")}onDisconnection(e){this.disconnectListener=t=>{try{e(t)}catch(e){throw new Error(`Error while calling the onDisconnection callback: ${e.message}`)}finally{this.disconnectListener=()=>{}}}}async disconnect(){await this.sendDisconnectAction(),ve(this,me,"f").call(this)}async sendDisconnectAction(){const e=ve(this,fe,"f");await e.close()}static async wireClose(e,t,n){const{channelName:i,uuid:r,name:o}=t;await e.sendAction("disconnect-from-channel",{channelName:i,uuid:r,name:o,endpointId:n})}}ue.ChannelClient=Ee,fe=new WeakMap,ge=new WeakMap,me=new WeakMap;var xe={},Ae={};Object.defineProperty(Ae,"__esModule",{value:!0}),Ae.exhaustiveCheck=void 0,Ae.exhaustiveCheck=function(e,t){throw new Error(`Unsupported value: ${e}${t?`\n Supported values are: ${t.join("")}`:""}`)};var Pe,Me,_e,Oe={},Se=s&&s.__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},Re=s&&s.__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)};Object.defineProperty(Oe,"__esModule",{value:!0}),Oe.ClassicInfo=Oe.ClassicStrategy=void 0;Oe.ClassicStrategy=class{constructor(e,t,n,i){this.messageReceiver=t,this.endpointId=n,this.providerIdentity=i,Pe.set(this,void 0),Me.set(this,new Map),_e.set(this,new Map),this.send=async(e,t,n)=>{const i=Re(this,Me,"f").get(e);if(!i)throw new Error(`Could not locate routing info for endpoint ${e}`);const r={...i};r.isLocalEndpointId&&delete r.endpointId,delete r.isLocalEndpointId;const o=Re(this,Pe,"f").sendAction("send-channel-message",{...r,providerIdentity:this.providerIdentity,action:t,payload:n});Re(this,_e,"f").get(e)?.add(o);return(await o.catch((e=>{throw new Error(e.message)})).finally((()=>{Re(this,_e,"f").get(e)?.delete(o)}))).payload.data.result},this.close=async()=>{this.messageReceiver.removeEndpoint(this.providerIdentity.channelId,this.endpointId),[...Re(this,Me,"f").keys()].forEach((e=>this.closeEndpoint(e))),Se(this,Me,new Map,"f")},Se(this,Pe,e,"f")}onEndpointDisconnect(e,t){}receive(e){this.messageReceiver.addEndpoint(e,this.providerIdentity.channelId,this.endpointId)}async closeEndpoint(e){const t=Re(this,Me,"f").get(e);Re(this,Me,"f").delete(e);const n=Re(this,_e,"f").get(e);n?.forEach((n=>{const i=`Channel connection with identity uuid: ${t?.uuid} / name: ${t?.name} / endpointId: ${e} no longer connected.`;n.cancel(new Error(i))}))}isEndpointConnected(e){return Re(this,Me,"f").has(e)}addEndpoint(e,t){Re(this,Me,"f").set(e,t.endpointIdentity),Re(this,_e,"f").set(e,new Set)}isValidEndpointPayload(e){return"string"==typeof e?.endpointIdentity?.endpointId||"string"==typeof e?.endpointIdentity?.channelId}},Pe=new WeakMap,Me=new WeakMap,_e=new WeakMap,Oe.ClassicInfo={version:5,minimumVersion:0,type:"classic"};var Fe={},je={},ke={};Object.defineProperty(ke,"__esModule",{value:!0}),ke.errorToPOJO=void 0,ke.errorToPOJO=function(e){return{stack:e.stack,name:e.name,message:e.message,toString:()=>e.stack||e.toString()}};var Le,Te,$e=s&&s.__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)},Be=s&&s.__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};Object.defineProperty(je,"__esModule",{value:!0}),je.RTCEndpoint=void 0;const Ge=ke;je.RTCEndpoint=class{static isValidEndpointPayload(e){const t=e=>"object"==typeof e&&null!==e;return t(e)&&t(e.endpointIdentity)&&t(e.rtc)&&"string"==typeof e.endpointIdentity.endpointId}constructor({rtc:e,endpointIdentity:t}){this.responseMap=new Map,Le.set(this,null),Te.set(this,void 0),this.connectionStateChangeHandler=e=>{"connected"!==this.rtc.rtcClient.connectionState&&(this.rtc.rtcClient.removeEventListener("connectionstatechange",this.connectionStateChangeHandler),this.close(),$e(this,Te,"f")&&$e(this,Te,"f").call(this))},this.send=async(e,t)=>{const n=`message-${Math.random()}`,i=new Promise(((e,t)=>{this.responseMap.set(n,{resolve:e,reject:t})}));return this.rtc.channels.request.send(JSON.stringify({action:e,payload:t,messageId:n})),i},this.close=()=>{this.responseMap.forEach((e=>e.reject("Connection has closed."))),this.responseMap=new Map,this.rtc.channels.request.close(),this.rtc.channels.response.close(),this.rtc.rtcClient.close()},this.rtc=e,this.endpointIdentity=t,this.rtc.channels.response.addEventListener("message",(e=>{let{data:t}=e;e.data instanceof ArrayBuffer&&(t=(new TextDecoder).decode(e.data));const{messageId:n,payload:i,success:r,error:o}=JSON.parse(t),{resolve:s,reject:a}=this.responseMap.get(n)??{};s&&a?(this.responseMap.delete(n),r?s(i):a(o)):(console.log("Could not find id in responseMap."),console.log(e))})),this.rtc.channels.request.addEventListener("message",(async e=>{let{data:n}=e;e.data instanceof ArrayBuffer&&(n=(new TextDecoder).decode(e.data));const{messageId:i,action:r,payload:o}=JSON.parse(n);if($e(this,Le,"f"))try{const e=await $e(this,Le,"f").call(this,r,o,t);this.rtc.channels.response.send(JSON.stringify({messageId:i,payload:e,success:!0}))}catch(e){"open"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,error:(0,Ge.errorToPOJO)(e),success:!1}))}else"open"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,success:!1,error:"Connection not ready."}))})),this.rtc.rtcClient.addEventListener("connectionstatechange",this.connectionStateChangeHandler),Object.values(this.rtc.channels).forEach((e=>{e.onclose=e=>{[...this.responseMap.values()].forEach((e=>e.reject(new Error("RTCDataChannel closed unexpectedly, this is most commonly caused by message size. Note: RTC Channels have a message size limit of ~255kB.")))),this.close(),$e(this,Te,"f")&&$e(this,Te,"f").call(this)}}))}onDisconnect(e){if($e(this,Te,"f"))throw new Error("RTCEndpoint disconnectListener cannot be set twice.");Be(this,Te,e,"f")}receive(e){if($e(this,Le,"f"))throw new Error("You have already set a listener for this RTC Endpoint.");Be(this,Le,e,"f")}get connected(){return"connected"===this.rtc.rtcClient.connectionState}},Le=new WeakMap,Te=new WeakMap;var We,He,Ne,De={},Ue=s&&s.__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)},Ve=s&&s.__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};Object.defineProperty(De,"__esModule",{value:!0}),De.EndpointStrategy=void 0;De.EndpointStrategy=class{constructor(e,t,n){this.EndpointType=e,this.StrategyName=n,We.set(this,null),He.set(this,new Map),Ne.set(this,!0),this.send=async(e,t,n)=>this.getEndpointById(e).send(t,n),this.close=async()=>{Ue(this,Ne,"f")&&(Ue(this,He,"f").forEach((e=>e.close())),Ve(this,He,new Map,"f")),Ve(this,Ne,!1,"f")},this.isValidEndpointPayload=t}onEndpointDisconnect(e,t){this.getEndpointById(e).onDisconnect(t)}receive(e){if(Ue(this,We,"f"))throw new Error(`You have already set a listener for this ${this.StrategyName} Strategy`);Ve(this,We,e,"f"),Ue(this,He,"f").forEach((e=>e.receive(Ue(this,We,"f"))))}getEndpointById(e){const t=Ue(this,He,"f").get(e);if(!t)throw new Error(`Client with endpoint id ${e} is not connected`);return t}get connected(){return Ue(this,Ne,"f")}isEndpointConnected(e){return Ue(this,He,"f").has(e)}addEndpoint(e,t){if(!Ue(this,Ne,"f"))return void console.warn(`Adding endpoint to disconnected ${this.StrategyName} Strategy`);const n=new this.EndpointType(t);Ue(this,We,"f")&&n.receive(Ue(this,We,"f")),Ue(this,He,"f").set(e,n)}async closeEndpoint(e){Ue(this,He,"f").delete(e)}},We=new WeakMap,He=new WeakMap,Ne=new WeakMap,Object.defineProperty(Fe,"__esModule",{value:!0}),Fe.RTCInfo=Fe.RTCStrategy=void 0;const ze=je,Ke=De;class qe extends Ke.EndpointStrategy{constructor(){super(ze.RTCEndpoint,ze.RTCEndpoint.isValidEndpointPayload,"RTC")}}Fe.RTCStrategy=qe,Fe.RTCInfo={version:2,minimumVersion:0,type:"rtc"};var Je={};Object.defineProperty(Je,"__esModule",{value:!0}),Je.RTCICEManager=void 0;const Ye=d;class Ze extends Ye.EmitterBase{constructor(e){super(e,"channel"),this.ensureChannelOpened=e=>new Promise(((t,n)=>{if("open"===e.readyState)t();else if("connecting"===e.readyState){const n=()=>{e.removeEventListener("open",n),t()};e.addEventListener("open",n)}else n(new Error("This Channel has already closed"))}))}static createDataChannelPromise(e,t){let n;const i=new Promise((e=>{n=e})),r=i=>{const o=()=>{i.channel.removeEventListener("open",o),n(i.channel)};i.channel.label===e&&(i.channel.addEventListener("open",o),t.removeEventListener("datachannel",r))};return t.addEventListener("datachannel",r),i}async listenForProviderIce(e,t){await this.on(this.createProviderEventName(e),t,{timestamp:Date.now()})}async raiseProviderIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createProviderEventName(e)),t)}async listenForClientIce(e,t){await this.on(this.createClientEventName(e),t,{timestamp:Date.now()})}async raiseClientIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createClientEventName(e)),t)}cleanupIceListeners(e){this.removeAllListeners(this.createClientEventName(e)),this.removeAllListeners(this.createProviderEventName(e))}createClientEventName(e){return`ice-client-${e}`}createProviderEventName(e){return`ice-provider-${e}`}createRouteString(e){return`channel/${e}`}createRtcPeer(){return this.wire.environment.getRtcPeer()}async startClientOffer(){const e=Math.random().toString(),t=this.createRtcPeer();t.addEventListener("icecandidate",(async t=>{t.candidate&&await this.raiseClientIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForProviderIce(e,(async e=>{await t.addIceCandidate(e.candidate)}));const n={request:t.createDataChannel("request"),response:t.createDataChannel("response")},i=await t.createOffer();await t.setLocalDescription(i);const r=Promise.all([n.request,n.response].map(this.ensureChannelOpened)).then((()=>{}));return{rtcClient:t,channels:n,offer:i,rtcConnectionId:e,channelsOpened:r}}async finishClientOffer(e,t,n){return await e.setRemoteDescription(t),await n,!0}async createProviderAnswer(e,t){const n=this.createRtcPeer(),i=Ze.createDataChannelPromise("request",n),r=Ze.createDataChannelPromise("response",n);n.addEventListener("icecandidate",(async t=>{t.candidate&&await this.raiseProviderIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForClientIce(e,(async e=>{await n.addIceCandidate(e.candidate)})),await n.setRemoteDescription(t);const o=await n.createAnswer();await n.setLocalDescription(o);const s=Promise.all([i,r]).then((([t,n])=>(this.cleanupIceListeners(e),{request:t,response:n})));return{rtcClient:n,answer:o,channels:s}}}Je.RTCICEManager=Ze;var Qe={},Xe={};function et(e){return[...e.split(".").reverse().entries()].reduce(((e,[t,n])=>e+ +n*1e4**t),0)}function tt(e,t){return et(e)>=et(t)}function nt(e){return e.split("/")[0]}Object.defineProperty(Xe,"__esModule",{value:!0}),Xe.runtimeUuidMeetsMinimumRuntimeVersion=Xe.parseRuntimeUuid=Xe.meetsMinimumRuntimeVersion=void 0,Xe.meetsMinimumRuntimeVersion=tt,Xe.parseRuntimeUuid=nt,Xe.runtimeUuidMeetsMinimumRuntimeVersion=function(e,t){return tt(nt(e),t)};var it,rt,ot,st,at,ct=s&&s.__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)},dt=s&&s.__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};Object.defineProperty(Qe,"__esModule",{value:!0}),Qe.ChannelProvider=void 0;const ht=pe,lt=Xe;class ut extends ht.ChannelBase{get connections(){return[...ct(this,it,"f")]}static handleClientDisconnection(e,t){const n=e.connections.find((e=>e.endpointId===t.endpointId));if(n)ct(e,st,"f").call(e,n);else{e.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name)).forEach(ct(e,st,"f"))}e.disconnectListener(t)}static setProviderRemoval(e,t){ut.removalMap.set(e,t)}constructor(e,t,n){super(),it.set(this,void 0),rt.set(this,void 0),ot.set(this,void 0),st.set(this,(e=>{const t=this.connections.filter((t=>t.endpointId!==e.endpointId));ct(this,ot,"f").closeEndpoint(e.endpointId),dt(this,it,t,"f")})),this.processAction=async(e,t,n)=>(ut.clientIsMultiRuntime(n)&&!(0,lt.runtimeUuidMeetsMinimumRuntimeVersion)(n.runtimeUuid,"18.87.56.0")?this.handleMultiRuntimeLegacyClient(n):this.checkForClientConnection(n),super.processAction(e,t,n)),at.set(this,(()=>{ct(this,ot,"f").close();const e=ut.removalMap.get(this);e&&e()})),dt(this,rt,new ht.ProtectedItems(e,t),"f"),this.connectListener=()=>{},this.disconnectListener=()=>{},dt(this,it,[],"f"),dt(this,ot,n,"f"),n.receive(this.processAction)}dispatch(e,t,n){const i=e.endpointId??this.getEndpointIdForOpenFinId(e,t);return i&&ct(this,ot,"f").isEndpointConnected(i)?ct(this,ot,"f").send(i,t,n):Promise.reject(new Error(`Client connection with identity uuid: ${e.uuid} / name: ${e.name} / endpointId: ${i} no longer connected.`))}async processConnection(e,t){return ct(this,it,"f").push(e),this.connectListener(e,t)}publish(e,t){return this.connections.map((n=>ct(this,ot,"f").send(n.endpointId,e,t)))}onConnection(e){this.connectListener=e}onDisconnection(e){this.disconnectListener=e}async destroy(){const e=ct(this,rt,"f");e.providerIdentity,dt(this,it,[],"f"),await e.close(),ct(this,at,"f").call(this)}async getAllClientInfo(){return this.connections.map((e=>{const{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}=e;return{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}}))}checkForClientConnection(e){if(!this.isClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider.\n Client Identity: {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}isClientConnected(e){return ut.clientIdentityIncludesEndpointId(e)?this.connections.some((t=>t.endpointId===e.endpointId&&t.uuid===e.uuid&&t.name===e.name)):this.isLegacyClientConnected(e)}isLegacyClientConnected(e){return this.connections.some((t=>t.uuid===e.uuid&&t.name===e.name))}handleMultiRuntimeLegacyClient(e){if(!this.isLegacyClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider. Client Identity:\n {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}getEndpointIdForOpenFinId(e,t){const n=this.connections.filter((t=>t.name===e.name&&t.uuid===e.uuid));if(n.length>=2){const n=ct(this,rt,"f"),{uuid:i,name:r}=e,o=n?.providerIdentity.uuid,s=n?.providerIdentity.name;console.warn(`WARNING: Dispatch call may have unintended results. The "to" argument of your dispatch call is missing the\n "endpointId" parameter. The identity you are dispatching to ({uuid: ${i}, name: ${r}})\n has multiple channelClients for this channel. Your dispatched action: (${t}) from the provider:\n ({uuid: ${o}, name: ${s}}) will only be processed by the most recently-created client.`)}return n.pop()?.endpointId}static clientIdentityIncludesEndpointId(e){return void 0!==e.endpointId}static clientIsMultiRuntime(e){return void 0!==e.runtimeUuid}static async wireClose(e,t){await e.sendAction("destroy-channel",{channelName:t})}}Qe.ChannelProvider=ut,it=new WeakMap,rt=new WeakMap,ot=new WeakMap,st=new WeakMap,at=new WeakMap,ut.removalMap=new WeakMap;var pt={};Object.defineProperty(pt,"__esModule",{value:!0}),pt.MessageReceiver=void 0;const wt=ue,yt=d;class ft extends yt.Base{constructor(e){super(e),this.onmessage=e=>"process-channel-message"===e.action&&(this.processChannelMessage(e),!0),this.endpointMap=new Map,this.latestEndpointIdByChannelId=new Map,e.registerMessageHandler(this.onmessage.bind(this))}async processChannelMessage(e){const{senderIdentity:t,providerIdentity:n,action:i,ackToSender:r,payload:o,intendedTargetIdentity:s}=e.payload,a=s.channelId??s.endpointId??this.latestEndpointIdByChannelId.get(n.channelId),c=this.endpointMap.get(a);if(!c)return r.payload.success=!1,r.payload.reason=`Client connection with identity uuid: ${this.wire.me.uuid} / name: ${this.wire.me.name} / endpointId: ${a} no longer connected.`,this.wire.sendRaw(r);try{const e=await c(i,o,t);return r.payload.payload=r.payload.payload||{},r.payload.payload.result=e,this.wire.sendRaw(r)}catch(e){return r.payload.success=!1,r.payload.reason=e.message,this.wire.sendRaw(r)}}addEndpoint(e,t,n){this.endpointMap.set(n,e),t!==n&&this.latestEndpointIdByChannelId.set(t,n)}removeEndpoint(e,t){this.endpointMap.delete(t),this.latestEndpointIdByChannelId.get(e)===t&&this.latestEndpointIdByChannelId.delete(e)}checkForPreviousClientConnection(e){const t=this.latestEndpointIdByChannelId.get(e);t&&(wt.ChannelClient.closeChannelByEndpointId(t),console.warn("You have created a second connection to an older provider. First connection has been removed from the clientMap"),console.warn("If the provider calls publish(), you may receive multiple messages."))}}pt.MessageReceiver=ft;var gt={};Object.defineProperty(gt,"__esModule",{value:!0}),gt.ProtocolManager=void 0;gt.ProtocolManager=class{constructor(e){this.ProtocolsInPreferenceOrder=e,this.DefaultClientProtocols=["classic"],this.DefaultProviderProtocols=["classic"],this.getClientProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultClientProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(", ")}.`);return t},this.getProviderProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultProviderProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(", ")}.`);return t},this.getCompatibleProtocols=(e,t)=>t.supportedProtocols.filter((t=>e.some((e=>e.type===t.type&&t.version>=e.minimumVersion&&e.version>=(t.minimumVersion??0))))).slice(0,t.maxProtocols)}};var mt={};Object.defineProperty(mt,"__esModule",{value:!0});class vt{static combine(e,t){return new vt(e,t)}constructor(e,t){this.primary=e,this.secondary=t}onEndpointDisconnect(e,t){this.primary.onEndpointDisconnect(e,(()=>{this.secondary.isEndpointConnected(e)||t()})),this.secondary.onEndpointDisconnect(e,(()=>{this.primary.isEndpointConnected(e)||t()}))}isValidEndpointPayload(e){return this.primary.isValidEndpointPayload(e)||this.secondary.isValidEndpointPayload(e)}async closeEndpoint(e){await this.primary.closeEndpoint(e),await this.secondary.closeEndpoint(e)}isEndpointConnected(e){return this.primary.isEndpointConnected(e)||this.secondary.isEndpointConnected(e)}async addEndpoint(e,t){this.primary.isValidEndpointPayload(t)&&await this.primary.addEndpoint(e,t),this.secondary.isValidEndpointPayload(t)&&await this.secondary.addEndpoint(e,t)}receive(e){this.primary.receive(e),this.secondary.receive(e)}send(e,t,n){return this.primary.isEndpointConnected(e)?this.primary.send(e,t,n):this.secondary.send(e,t,n)}async close(){await Promise.all([this.primary.close(),this.secondary.close()])}}mt.default=vt;var Ct,bt,It=s&&s.__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},Et=s&&s.__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)},xt=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(xe,"__esModule",{value:!0}),xe.ConnectionManager=void 0;const At=Ae,Pt=d,Mt=Oe,_t=Fe,Ot=Je,St=Qe,Rt=pt,Ft=gt,jt=xt(mt);class kt extends Pt.Base{static getProtocolOptionsFromStrings(e){return e.map((e=>{switch(e){case"rtc":return _t.RTCInfo;case"classic":return Mt.ClassicInfo;default:return(0,At.exhaustiveCheck)(e,["rtc","classic"])}}))}constructor(e){super(e),Ct.set(this,void 0),bt.set(this,void 0),this.removeChannelFromProviderMap=e=>{this.providerMap.delete(e)},this.onmessage=e=>"process-channel-connection"===e.action&&(this.processChannelConnection(e),!0),this.providerMap=new Map,this.protocolManager=new Ft.ProtocolManager("node"===this.wire.environment.type?["classic"]:["rtc","classic"]),It(this,Ct,new Rt.MessageReceiver(e),"f"),It(this,bt,new Ot.RTCICEManager(e),"f"),e.registerMessageHandler(this.onmessage.bind(this))}createProvider(e,t){const n=Object.assign(this.wire.environment.getDefaultChannelOptions().create,e||{}),i=this.protocolManager.getProviderProtocols(n?.protocols),r=i.map((e=>{switch(e){case"rtc":return new _t.RTCStrategy;case"classic":return new Mt.ClassicStrategy(this.wire,Et(this,Ct,"f"),t.channelId,t);default:return(0,At.exhaustiveCheck)(e,["rtc","classic"])}}));let o;if(2===r.length){const[e,t]=r;o=jt.default.combine(e,t)}else{if(1!==r.length)throw new Error("failed to combine strategies");[o]=r}const s=new St.ChannelProvider(t,(()=>St.ChannelProvider.wireClose(this.wire,t.channelName)),o),a=t.channelId;return this.providerMap.set(a,{provider:s,strategy:o,supportedProtocols:kt.getProtocolOptionsFromStrings(i)}),St.ChannelProvider.setProviderRemoval(s,this.removeChannelFromProviderMap.bind(this)),s}async createClientOffer(e){const t=this.protocolManager.getClientProtocols(e?.protocols);let n;return{offer:{supportedProtocols:await Promise.all(t.map((async e=>{switch(e){case"rtc":{const{rtcClient:e,channels:t,offer:i,rtcConnectionId:r,channelsOpened:o}=await Et(this,bt,"f").startClientOffer();return n={rtcClient:e,channels:t,channelsOpened:o},{type:"rtc",version:_t.RTCInfo.version,payload:{offer:i,rtcConnectionId:r}}}case"classic":return{type:"classic",version:Mt.ClassicInfo.version};default:return(0,At.exhaustiveCheck)(e,["rtc","classic"])}}))),maxProtocols:2},rtc:n}}async createClientStrategy(e,t){t.endpointId||(t.endpointId=this.wire.environment.getNextMessageId(),Et(this,Ct,"f").checkForPreviousClientConnection(t.channelId));const n=t.answer??{supportedProtocols:[{type:"classic",version:1}]},i=(await Promise.all(n.supportedProtocols.map((async n=>"rtc"===n.type&&e?(await Et(this,bt,"f").finishClientOffer(e.rtcClient,n.payload.answer,e.channelsOpened),new _t.RTCStrategy):"classic"===n.type?new Mt.ClassicStrategy(this.wire,Et(this,Ct,"f"),t.endpointId,t):null)))).filter((e=>null!==e));let r;if(e&&!i.some((e=>e instanceof _t.RTCStrategy))&&e&&e.rtcClient.close(),i.length>=2)r=jt.default.combine(i[0],i[1]);else{if(!i.length)throw new Error("No compatible protocols");[r]=i}const o={endpointIdentity:t,rtc:e};return r.addEndpoint(t.channelId,o),r}async processChannelConnection(e){const{clientIdentity:t,providerIdentity:n,ackToSender:i,payload:r,offer:o}=e.payload;t.endpointId?t.isLocalEndpointId=!1:(t.endpointId=this.wire.environment.getNextMessageId(),t.isLocalEndpointId=!0);const s=n.channelId,a=this.providerMap.get(s);if(!a)return i.payload.success=!1,i.payload.reason=`Channel "${n.channelName}" has been destroyed.`,this.wire.sendRaw(i);const{provider:c,strategy:d,supportedProtocols:h}=a;try{if(!(c instanceof St.ChannelProvider))throw Error("Cannot connect to a channel client");const e=o??{supportedProtocols:[{type:"classic",version:1}],maxProtocols:1},n=this.protocolManager.getCompatibleProtocols(h,e);if(!n.length)throw new Error("This provider does not support any of the offered protocols.");const s=await c.processConnection(t,r);i.payload.payload=i.payload.payload||{};let a={supportedProtocols:[],endpointPayloadPromise:Promise.resolve({endpointIdentity:t})};return a=await n.reduce((async(e,t)=>{const n=await e;if("rtc"===t.type){const{answer:e,rtcClient:i,channels:r}=await Et(this,bt,"f").createProviderAnswer(t.payload.rtcConnectionId,t.payload.offer);n.supportedProtocols.push({type:"rtc",version:_t.RTCInfo.version,payload:{answer:e}}),n.endpointPayloadPromise=n.endpointPayloadPromise.then((e=>r.then((t=>({...e,rtc:{rtcClient:i,channels:t}})))))}else n.supportedProtocols.push({type:"classic",version:Mt.ClassicInfo.version});return n}),Promise.resolve(a)),a.endpointPayloadPromise.then((e=>d.addEndpoint(t.endpointId,e))),i.payload.payload.result=s,i.payload.payload.answer=a,this.wire.sendRaw(i)}catch(e){return i.payload.success=!1,i.payload.reason=e.message,this.wire.sendRaw(i)}}}xe.ConnectionManager=kt,Ct=new WeakMap,bt=new WeakMap;var Lt,Tt,$t,Bt=s&&s.__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},Gt=s&&s.__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)};Object.defineProperty(le,"__esModule",{value:!0}),le.Channel=void 0;const Wt=t,Ht=G,Nt=d,Dt=ue,Ut=xe,Vt=Qe;function zt(e){const t=Math.floor(e/10),n=Math.min(3e4,500*2**t);return new Promise((e=>{setTimeout((()=>{e(!1)}),n)}))}class Kt extends Nt.EmitterBase{constructor(e){super(e,"channel"),Lt.set(this,void 0),Tt.set(this,new Wt.EventEmitter),$t.set(this,new Ht.AsyncRetryableLazy((async()=>{await Promise.all([this.on("disconnected",(e=>{Dt.ChannelClient.handleProviderDisconnect(e)})),this.on("connected",((...e)=>{Gt(this,Tt,"f").emit("connected",...e)}))]).catch((()=>new Error("error setting up channel connection listeners")))}))),Bt(this,Lt,new Ut.ConnectionManager(e),"f")}async getAllChannels(){return this.wire.sendAction("get-all-channels").then((({payload:e})=>e.data))}async onChannelConnect(e){await this.on("connected",e)}async onChannelDisconnect(e){await this.on("disconnected",e)}async safeConnect(e,t,n){const i={count:0};do{let r=()=>{};const o=new Promise((t=>{r=n=>{e===n.channelName&&t(!0)},Gt(this,Tt,"f").on("connected",r)}));try{if(i.count>0){i.gotConnectedEvent=await Promise.race([zt(i.count),o]);const t=await this.wire.sendAction("connect-to-channel",{...n,retryInfo:i});return console.log(`Successfully connected to channelName: ${e}`),t.payload.data}const t=this.wire.sendAction("connect-to-channel",n);i.originalMessageId=t.messageId;return(await t).payload.data}catch(n){if(!n.message.includes("internal-nack"))throw n;t&&0===i.count&&console.warn(`No channel found for channelName: ${e}. Waiting for connection...`)}finally{i.count+=1,Gt(this,Tt,"f").removeListener("connected",r)}}while(t);throw new Error(`No channel found for channelName: ${e}.`)}async connect(e,t={}){if(await Gt(this,$t,"f").getValue(),!e||"string"!=typeof e)throw new Error("Please provide a channelName string to connect to a channel.");const n={wait:!0,...this.wire.environment.getDefaultChannelOptions().connect,...t},{offer:i,rtc:r}=await Gt(this,Lt,"f").createClientOffer(n);let o;(this.fin.me.isFrame||this.fin.me.isView||this.fin.me.isWindow)&&(o=(await this.fin.me.getInfo()).url);const s={channelName:e,...n,offer:i,connectionUrl:o},a=await this.safeConnect(e,n.wait,s),c=await Gt(this,Lt,"f").createClientStrategy(r,a),d=new Dt.ChannelClient(a,(()=>Dt.ChannelClient.wireClose(this.wire,a,a.endpointId)),c);return c.onEndpointDisconnect(a.channelId,(async()=>{try{await d.sendDisconnectAction()}catch(e){console.warn(`Something went wrong during disconnect for client with uuid: ${a.uuid} / name: ${a.name} / endpointId: ${a.endpointId}.`)}finally{Dt.ChannelClient.handleProviderDisconnect(a)}})),d}async create(e,t){if(!e)throw new Error("Please provide a channelName to create a channel");const{payload:{data:n}}=await this.wire.sendAction("create-channel",{channelName:e}),i=Gt(this,Lt,"f").createProvider(t,n);return this.on("client-disconnected",(t=>{t.channelName===e&&Vt.ChannelProvider.handleClientDisconnection(i,t)})),i}}le.Channel=Kt,Lt=new WeakMap,Tt=new WeakMap,$t=new WeakMap,Object.defineProperty(de,"__esModule",{value:!0}),de.InterAppPayload=de.InterApplicationBus=void 0;const qt=t,Jt=d,Yt=he,Zt=le,Qt=O;class Xt extends Jt.Base{constructor(e){super(e),this.events={subscriberAdded:"subscriber-added",subscriberRemoved:"subscriber-removed"},this.refCounter=new Yt.RefCounter,this.Channel=new Zt.Channel(e),this.emitter=new qt.EventEmitter,e.registerMessageHandler(this.onmessage.bind(this)),this.on=this.emitter.on.bind(this.emitter),this.removeAllListeners=this.emitter.removeAllListeners.bind(this.emitter)}async publish(e,t){await this.wire.sendAction("publish-message",{topic:e,message:t,sourceWindowName:this.me.name})}async send(e,t,n){const i=(0,Qt.validateIdentity)(e);if(i)throw new Error(i);await this.wire.sendAction("send-message",{destinationUuid:e.uuid,destinationWindowName:e.name,topic:t,message:n,sourceWindowName:this.me.name})}subscribe(e,t,n){const i=this.createSubscriptionKey(e.uuid,e.name||"*",t);return this.emitter.on(i,n),this.refCounter.actOnFirst(i,(async()=>{await this.wire.sendAction("subscribe",{sourceUuid:e.uuid,sourceWindowName:e.name||"*",topic:t,destinationWindowName:this.me.name})}),(()=>Promise.resolve()))}unsubscribe(e,t,n){const i=e.name||"*",r=this.createSubscriptionKey(e.uuid,i,t);return this.emitter.removeListener(r,n),this.refCounter.actOnLast(r,(async()=>{await this.wire.sendAction("unsubscribe",{sourceUuid:e.uuid,sourceWindowName:i,topic:t,destinationWindowName:this.me.name})}),(()=>new Promise((e=>e)).then((()=>{}))))}processMessage(e){const{payload:{message:t,sourceWindowName:n,sourceUuid:i,topic:r}}=e,o=[this.createSubscriptionKey(i,n,r),this.createSubscriptionKey(i,"*",r),this.createSubscriptionKey("*","*",r)],s={uuid:i,name:n};o.forEach((e=>{this.emitter.emit(e,t,s)}))}emitSubscriverEvent(e,t){const{payload:{targetName:n,uuid:i,topic:r}}=t,o={name:n,uuid:i,topic:r};this.emitter.emit(e,o)}createSubscriptionKey(e,t,n){const i=t||"*";if(!(e&&i&&n))throw new Error("Missing uuid, name, or topic string");return function(...e){return e.map((e=>Buffer.from(`${e}`).toString("base64"))).join("/")}(e,i,n)}onmessage(e){const{action:t}=e;switch(t){case"process-message":this.processMessage(e);break;case this.events.subscriberAdded:this.emitSubscriverEvent(this.events.subscriberAdded,e);break;case this.events.subscriberRemoved:this.emitSubscriverEvent(this.events.subscriberRemoved,e)}return!0}}de.InterApplicationBus=Xt;de.InterAppPayload=class{};var en={};Object.defineProperty(en,"__esModule",{value:!0}),en.Clipboard=void 0;const tn=d;class nn extends tn.Base{async writeText(e){await this.wire.sendAction("clipboard-write-text",e)}async readText(e){const{payload:t}=await this.wire.sendAction("clipboard-read-text",{type:e});return t.data}async writeImage(e){await this.wire.sendAction("clipboard-write-image",e)}async readImage(e={format:"dataURL"}){const{payload:t}=await this.wire.sendAction("clipboard-read-image",e);return t.data}async writeHtml(e){await this.wire.sendAction("clipboard-write-html",e)}async readHtml(e){const{payload:t}=await this.wire.sendAction("clipboard-read-html",{type:e});return t.data}async writeRtf(e){await this.wire.sendAction("clipboard-write-rtf",e)}async readRtf(e){const{payload:t}=await this.wire.sendAction("clipboard-read-rtf",{type:e});return t.data}async write(e){await this.wire.sendAction("clipboard-write",e)}async getAvailableFormats(e){const{payload:t}=await this.wire.sendAction("clipboard-read-formats",{type:e});return t.data}}en.Clipboard=nn;var rn={},on={},sn={};Object.defineProperty(sn,"__esModule",{value:!0}),sn.ExternalApplication=void 0;const an=d;class cn extends an.EmitterBase{constructor(e,t){super(e,"external-application",t.uuid),this.identity=t}getInfo(){return this.wire.sendAction("get-external-application-info",this.identity).then((({payload:e})=>e.data))}}sn.ExternalApplication=cn,Object.defineProperty(on,"__esModule",{value:!0}),on.ExternalApplicationModule=void 0;const dn=d,hn=sn;class ln extends dn.Base{wrap(e){return this.wire.sendAction("external-application-wrap").catch((e=>{})),Promise.resolve(new hn.ExternalApplication(this.wire,{uuid:e}))}wrapSync(e){return this.wire.sendAction("external-application-wrap-sync").catch((e=>{})),new hn.ExternalApplication(this.wire,{uuid:e})}}on.ExternalApplicationModule=ln,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(on,e),n(sn,e)}(rn);var un={},pn={},wn={};Object.defineProperty(wn,"__esModule",{value:!0}),wn._Frame=void 0;const yn=d;class fn extends yn.EmitterBase{constructor(e,t){super(e,"frame",t.uuid,t.name),this.identity=t}getInfo(){return this.wire.sendAction("get-frame-info",this.identity).then((({payload:e})=>e.data))}getParentWindow(){return this.wire.sendAction("get-parent-window",this.identity).then((({payload:e})=>e.data))}}wn._Frame=fn,Object.defineProperty(pn,"__esModule",{value:!0}),pn._FrameModule=void 0;const gn=d,mn=O,vn=wn;class Cn extends gn.Base{async wrap(e){this.wire.sendAction("frame-wrap").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}wrapSync(e){this.wire.sendAction("frame-wrap-sync").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}getCurrent(){return this.wire.sendAction("frame-get-current").catch((e=>{})),Promise.resolve(new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity()))}getCurrentSync(){return this.wire.sendAction("frame-get-current-sync").catch((e=>{})),new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity())}}pn._FrameModule=Cn,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(pn,e),n(wn,e)}(un);var bn={};Object.defineProperty(bn,"__esModule",{value:!0}),bn.GlobalHotkey=void 0;const In=d;class En extends In.EmitterBase{constructor(e){super(e,"global-hotkey")}async register(e,t){await this.on(e,t),await this.wire.sendAction("global-hotkey-register",{hotkey:e})}async unregister(e){await this.removeAllListeners(e),await this.wire.sendAction("global-hotkey-unregister",{hotkey:e})}async unregisterAll(){await Promise.all(this.eventNames().filter((e=>!("registered"===e||"unregistered"===e))).map((e=>this.removeAllListeners(e)))),await this.wire.sendAction("global-hotkey-unregister-all",{})}async isRegistered(e){const{payload:{data:t}}=await this.wire.sendAction("global-hotkey-is-registered",{hotkey:e});return t}}bn.GlobalHotkey=En;var xn,An={},Pn={},Mn={},_n=s&&s.__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)};Object.defineProperty(Mn,"__esModule",{value:!0}),Mn.Platform=void 0;const On=d,Sn=O,Rn=new Map;class Fn extends On.EmitterBase{constructor(e,t){super(t.wire,"application",e.uuid),this.getClient=e=>{this.wire.sendAction("platform-get-client",this.identity).catch((e=>{}));const t=e||this.identity,{uuid:n}=t;if(!Rn.has(n)){const e=_n(this,xn,"f").call(this,n);Rn.set(n,e)}return Rn.get(n)},xn.set(this,(async e=>{try{const t=`custom-frame-${e}`,n=await this._channel.connect(t,{wait:!1});return n.onDisconnection((()=>{Rn.delete(e)})),n}catch(t){throw Rn.delete(e),new Error("The targeted Platform is not currently running. Listen for application-started event for the given Uuid.")}})),this.launchLegacyManifest=this.launchContentManifest;const n=(0,Sn.validateIdentity)(e);if(n)throw new Error(n);this._channel=t,this.identity={uuid:e.uuid},this.Layout=this.fin.Platform.Layout,this.Application=this.fin.Application.wrapSync(this.identity)}async createView(e,t,n){this.wire.sendAction("platform-create-view",this.identity).catch((e=>{}));const i=await this.getClient(),r=await i.dispatch("create-view",{target:t,opts:e,targetView:n});if(!r||(0,Sn.validateIdentity)(r.identity))throw new Error(`When overwriting the createView call, please return an object that has a valid 'identity' property: ${JSON.stringify(r)}`);return this.fin.View.wrapSync(r.identity)}async createWindow(e){this.wire.sendAction("platform-create-window",this.identity).catch((e=>{}));const t=await this.getClient();e.reason||(e.reason="api-call");const n=await t.dispatch("create-view-container",e);if(!n||(0,Sn.validateIdentity)(n.identity))throw new Error(`When overwriting the createWindow call, please return an object that has a valid 'identity' property: ${JSON.stringify(n)}`);const{identity:i}=n,r=this.fin.Window.wrapSync(i);return r.name=i.name,r.uuid=i.uuid,r}async quit(){this.wire.sendAction("platform-quit",this.identity).catch((e=>{}));return(await this.getClient()).dispatch("quit")}async closeView(e){this.wire.sendAction("platform-close-view",this.identity).catch((e=>{}));const t=await this.getClient();await t.dispatch("close-view",{view:e})}async reparentView(e,t){console.warn("Platform.reparentView has been deprecated, please use Platform.createView"),this.wire.sendAction("platform-reparent-view",this.identity).catch((e=>{}));const n={...e,uuid:e.uuid??this.identity.uuid},i=await this.fin.View.wrap(n),r=await i.getOptions();return this.createView(r,t)}async getSnapshot(){this.wire.sendAction("platform-get-snapshot",this.identity).catch((e=>{}));return(await this.getClient()).dispatch("get-snapshot")}async getViewSnapshot(e){return(await this.getClient()).dispatch("get-view-snapshot",{viewIdentity:e})}async applySnapshot(e,t){this.wire.sendAction("platform-apply-snapshot",this.identity).catch((e=>{}));const n="Requested snapshot must be a valid Snapshot object, or a url or filepath to such an object.";let i;if("string"==typeof e)try{i=(await this._channel.wire.sendAction("get-application-manifest",{manifestUrl:e})).payload.data}catch(e){throw new Error(`${n}: ${e}`)}else i=e;if(!i.windows)throw new Error(n);const r=await this.getClient();return await r.dispatch("apply-snapshot",{snapshot:i,options:t}),this}async fetchManifest(e){return(await this.getClient()).dispatch("platform-fetch-manifest",{manifestUrl:e})}async launchContentManifest(e){this.wire.sendAction("platform-launch-content-manifest",this.identity).catch((()=>{}));const t=await this.getClient(),n=await this.fetchManifest(e);return t.dispatch("launch-into-platform",{manifest:n,manifestUrl:e}),this}async setWindowContext(e={},t){if(this.wire.sendAction("platform-set-window-context",this.identity).catch((e=>{})),!e)throw new Error("Please provide a serializable object or string to set the context.");const n=await this.getClient(),{entityType:i}=t?await this.fin.System.getEntityInfo(t.uuid,t.name):this.fin.me;await n.dispatch("set-window-context",{context:e,entityType:i,target:t||{uuid:this.fin.me.uuid,name:this.fin.me.name}})}async getWindowContext(e){this.wire.sendAction("platform-get-window-context",this.identity).catch((e=>{}));const t=await this.getClient(),{entityType:n}=e?await this.fin.System.getEntityInfo(e.uuid,e.name):this.fin.me;return t.dispatch("get-window-context",{target:e||{uuid:this.fin.me.uuid,name:this.fin.me.name},entityType:n})}async closeWindow(e,t={skipBeforeUnload:!1}){this.wire.sendAction("platform-close-window",this.identity).catch((e=>{}));return(await this.getClient()).dispatch("close-window",{windowId:e,options:t})}}Mn.Platform=Fn,xn=new WeakMap;var jn={},kn={},Ln={},Tn={};function $n(e){switch(e){case"columns":case"grid":case"rows":case"tabs":return!0;default:return!1}}Object.defineProperty(Tn,"__esModule",{value:!0}),Tn.overrideFromComposables=Tn.isValidPresetType=void 0,Tn.isValidPresetType=$n,Tn.overrideFromComposables=function(...e){return t=>e.reduceRight(((e,t)=>n=>t(e(n))),(e=>e))(t)},Tn.default={isValidPresetType:$n};var Bn={},Gn={},Wn={};Object.defineProperty(Wn,"__esModule",{value:!0}),Wn.ApiConsumer=void 0;Wn.ApiConsumer=class{constructor(e){this.strategy=e,this.consume=async e=>(await this.strategy.getExposedFunctions(e)).reduce(((t,n)=>({...t,[n.key]:this.strategy.createFunction(n,e)})),{})}};var Hn={},Nn={};Object.defineProperty(Nn,"__esModule",{value:!0}),Nn.expose=Nn.getExposedProperties=void 0;const Dn=Symbol("exposedProperties");Nn.getExposedProperties=e=>e[Dn]||e.prototype[Dn]||[];Nn.expose=e=>(t,n,i)=>{t[Dn]=t[Dn]||[],t[Dn].push({key:n,descriptor:i,options:e})},Object.defineProperty(Hn,"__esModule",{value:!0}),Hn.ApiExposer=void 0;const Un=Nn;Hn.ApiExposer=class{constructor(e){this.strategy=e,this.exposeInstance=async(e,t)=>{const n=(0,Un.getExposedProperties)(e),i=await Promise.all(n.map((async({key:n,options:i})=>({key:n,options:await this.strategy.exposeFunction(e[n].bind(e),{key:n,options:i,meta:t})}))));await this.strategy.exposeMeta(t,i)}}};var Vn={},zn={},Kn={};Object.defineProperty(Kn,"__esModule",{value:!0}),Kn.ChannelsConsumer=void 0;Kn.ChannelsConsumer=class{constructor(e){this.channel=e,this.getExposedFunctions=async e=>{const{id:t}=e,{props:n}=await this.channel.dispatch(`api-meta:${t}`);return n},this.createFunction=e=>(...t)=>{const{action:n}=e.options;return this.channel.dispatch(n,{args:t})}}};var qn={};Object.defineProperty(qn,"__esModule",{value:!0}),qn.ChannelsExposer=void 0;qn.ChannelsExposer=class{constructor(e){this.channelProviderOrClient=e,this.exposeFunction=async(e,t)=>{const{key:n,options:i,meta:r}=t,{id:o}=r,s=`${o}.${i?.action||n}`;return await this.channelProviderOrClient.register(s,(async({args:t})=>e(...t))),{action:s}},this.exposeMeta=async({id:e},t)=>{const n=`api-meta:${e}`;await this.channelProviderOrClient.register(n,(()=>({props:t})))}}},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Kn,e),n(qn,e)}(zn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(zn,e)}(Vn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Wn,e),n(Hn,e),n(Vn,e),n(Nn,e)}(Gn);var Jn={};Object.defineProperty(Jn,"__esModule",{value:!0}),Jn.createRelayedDispatch=exports.relayChannelClientApi_1=Jn.relayChannelClientApi=void 0;const Yn=["no longer connected","RTCDataChannel closed unexpectedly","The client you are trying to dispatch from is disconnected from the target provider"];exports.relayChannelClientApi_1=Jn.relayChannelClientApi=async(e,t)=>{e.register(`relay:${t}`,(({action:t,target:n,payload:i})=>e.dispatch(n,t,i))),await Promise.resolve()};Jn.createRelayedDispatch=(e,t,n,i)=>async(r,o)=>{try{return await e.dispatch(`relay:${n}`,{action:r,payload:o,target:t})}catch(e){if(s=e.message,Yn.some((e=>s.includes(e)))&&i)throw new Error(i);throw e}var s};var Zn,Qn,Xn,ei=s&&s.__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},ti=s&&s.__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)};Object.defineProperty(Bn,"__esModule",{value:!0}),Bn.ColumnOrRow=Bn.TabStack=Bn.LayoutNode=void 0;const ni=Gn,ii=Jn;class ri{constructor(e,t){Zn.set(this,void 0),this.isRoot=()=>ti(this,Zn,"f").isRoot(this.entityId),this.exists=()=>ti(this,Zn,"f").exists(this.entityId),this.getParent=async()=>{const e=await ti(this,Zn,"f").getParent(this.entityId);if(e)return ri.getEntity(e,ti(this,Zn,"f"))},this.createAdjacentStack=async(e,t)=>{const n=await ti(this,Zn,"f").createAdjacentStack(this.entityId,e,t);return ri.getEntity({entityId:n,type:"stack"},ti(this,Zn,"f"))},this.getAdjacentStacks=async e=>(await ti(this,Zn,"f").getAdjacentStacks({targetId:this.entityId,edge:e})).map((e=>ri.getEntity({type:"stack",entityId:e.entityId},ti(this,Zn,"f")))),ei(this,Zn,e,"f"),this.entityId=t}}Bn.LayoutNode=ri,Zn=new WeakMap,ri.newLayoutEntitiesClient=async(e,t,n)=>{const i=(0,ii.createRelayedDispatch)(e,n,"layout-relay","You are trying to interact with a layout component on a window that does not exist or has been destroyed.");return new ni.ApiConsumer(new ni.ChannelsConsumer({dispatch:i})).consume({id:t})},ri.getEntity=(e,t)=>{const{entityId:n,type:i}=e;switch(i){case"column":case"row":return new si(t,n,i);case"stack":return new oi(t,n);default:throw new Error(`Unrecognised Layout Entity encountered ('${JSON.stringify(e)})`)}};class oi extends ri{constructor(e,t){super(e,t),Qn.set(this,void 0),this.type="stack",this.getViews=()=>ti(this,Qn,"f").getStackViews(this.entityId),this.addView=async(e,t={index:0})=>ti(this,Qn,"f").addViewToStack(this.entityId,e,t),this.removeView=async e=>{await ti(this,Qn,"f").removeViewFromStack(this.entityId,e)},this.setActiveView=async e=>{await ti(this,Qn,"f").setStackActiveView(this.entityId,e)},ei(this,Qn,e,"f")}}Bn.TabStack=oi,Qn=new WeakMap;class si extends ri{constructor(e,t,n){super(e,t),Xn.set(this,void 0),this.getContent=async()=>(await ti(this,Xn,"f").getContent(this.entityId)).map((e=>ri.getEntity(e,ti(this,Xn,"f")))),ei(this,Xn,e,"f"),this.type=n}}Bn.ColumnOrRow=si,Xn=new WeakMap;var ai={};Object.defineProperty(ai,"__esModule",{value:!0}),ai.DEFAULT_LAYOUT_KEY=ai.LAYOUT_CONTROLLER_ID=void 0,ai.LAYOUT_CONTROLLER_ID="layout-entities",ai.DEFAULT_LAYOUT_KEY="__default__";var ci,di,hi,li=s&&s.__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)};Object.defineProperty(Ln,"__esModule",{value:!0}),Ln.Layout=void 0;const ui=G,pi=O,wi=d,yi=Tn,fi=Bn,gi=ai;class mi extends wi.Base{static getClient(e){return li(e,di,"f").getValue()}constructor(e,t){super(t),ci.add(this),di.set(this,new ui.Lazy((async()=>fi.LayoutNode.newLayoutEntitiesClient(await this.platform.getClient(),gi.LAYOUT_CONTROLLER_ID,this.identity)))),this.replace=async e=>{this.wire.sendAction("layout-replace").catch((e=>{}));const t=await this.platform.getClient();await t.dispatch("replace-layout",{target:this.identity,opts:{layout:e}})},this.replaceView=async(e,t)=>{this.wire.sendAction("layout-replace-view").catch((e=>{}));const n=await this.platform.getClient();await n.dispatch("replace-view",{target:this.identity,opts:{viewToReplace:e,newView:t}})},this.applyPreset=async e=>{this.wire.sendAction("layout-apply-preset").catch((e=>{}));const t=await this.platform.getClient(),{presetType:n}=e;if(!n||!(0,yi.isValidPresetType)(n))throw new Error("Cannot apply preset layout, please include an applicable presetType property in the PresetLayoutOptions.");await t.dispatch("apply-preset-layout",{target:this.identity,opts:{presetType:n}})};const n=(0,pi.validateIdentity)(e);if(n)throw new Error(n);this.identity=e,this.platform=this.fin.Platform.wrapSync({uuid:e.uuid}),e.uuid===this.fin.me.uuid&&e.name===this.fin.me.name&&(this.init=this.fin.Platform.Layout.init)}async getConfig(){this.wire.sendAction("layout-get-config").catch((e=>{}));return(await this.platform.getClient()).dispatch("get-frame-snapshot",{target:this.identity})}async getCurrentViews(){this.wire.sendAction("layout-get-views").catch((e=>{}));const e=await this.platform.getClient();return(await e.dispatch("get-layout-views",{target:this.identity})).map((e=>this.fin.View.wrapSync(e)))}async getRootItem(){this.wire.sendAction("layout-get-root-item").catch((()=>{}));const e=await li(this,di,"f").getValue(),t=await e.getRoot("layoutName"in this.identity?this.identity:void 0);return fi.LayoutNode.getEntity(t,e)}async getStackByViewIdentity(e){this.wire.sendAction("layout-get-stack-by-view").catch((()=>{}));const t=await li(this,di,"f").getValue(),n=await t.getStackByView(e);if(!n)throw new Error(`No stack found for view: ${e.uuid}/${e.name}`);return fi.LayoutNode.getEntity(n,t)}async addView(e,{location:t,targetView:n}={}){this.wire.sendAction("layout-add-view").catch((e=>{}));const{identity:i}=await li(this,ci,"m",hi).call(this,"layout-add-view",{viewOptions:e,location:t,targetView:n});return{identity:i}}async closeView(e){this.wire.sendAction("layout-close-view").catch((e=>{})),await li(this,ci,"m",hi).call(this,"layout-close-view",{viewIdentity:e})}}Ln.Layout=mi,di=new WeakMap,ci=new WeakSet,hi=async function(e,t){return(await this.platform.getClient()).dispatch(e,{target:this.identity,opts:t})};var vi,Ci,bi,Ii,Ei,xi=s&&s.__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)},Ai=s&&s.__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};Object.defineProperty(kn,"__esModule",{value:!0}),kn.LayoutModule=void 0;const Pi=d,Mi=Ln,_i=ai;class Oi extends Pi.Base{constructor(){super(...arguments),vi.add(this),Ci.set(this,!1),bi.set(this,null),this.init=async(e={})=>{if(this.wire.sendAction("layout-init").catch((e=>{})),!this.wire.environment.layoutAllowedInContext(this.fin))throw new Error("Layout.init can only be called from a Window context.");if(xi(this,Ci,"f"))throw new Error("Layout.init was already called, please use Layout.create to add additional layouts.");"openfin"===this.wire.environment.type&&await this.fin.Platform.getCurrentSync().getClient(),Ai(this,Ci,!0,"f"),Ai(this,bi,await this.wire.environment.initLayoutManager(this.fin,this.wire,e),"f"),await this.wire.environment.applyLayoutSnapshot(this.fin,xi(this,bi,"f"),e);const t={name:this.fin.me.name,uuid:this.fin.me.uuid};if(!e.layoutManagerOverride){const e={layoutName:_i.DEFAULT_LAYOUT_KEY,...t};return xi(this,Ii,"f").call(this,e)}return this.wrapSync(t)},Ii.set(this,(e=>{const t="[Layout] You are using a deprecated property `layoutManager` - it will throw if you access it starting in v37.",n=new Proxy({},{get(e,n){throw console.warn(`[Layout-mgr-proxy] accessing ${n.toString()}`),new Error(t)}}),i=Object.assign(this.wrapSync(e),{layoutManager:n});return new Proxy(i,{get(e,n){if("layoutManager"===n)throw console.warn(`[Layout-proxy] accessing ${n.toString()}`),new Error(t);return e[n]}})})),this.getCurrentLayoutManagerSync=()=>xi(this,vi,"m",Ei).call(this,"fin.Platform.Layout.getCurrentLayoutManagerSync()"),this.create=async e=>this.wire.environment.createLayout(xi(this,vi,"m",Ei).call(this,"fin.Platform.Layout.create()"),e),this.destroy=async e=>this.wire.environment.destroyLayout(xi(this,vi,"m",Ei).call(this,"fin.Platform.Layout.destroy()"),e)}async wrap(e){return this.wire.sendAction("layout-wrap").catch((e=>{})),new Mi.Layout(e,this.wire)}wrapSync(e){return this.wire.sendAction("layout-wrap-sync").catch((e=>{})),new Mi.Layout(e,this.wire)}async getCurrent(){if(this.wire.sendAction("layout-get-current").catch((e=>{})),"openfin"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error("You are not in a Window context. Only Windows can have a Layout.");const{uuid:e,name:t}=this.fin.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction("layout-get-current-sync").catch((e=>{})),"openfin"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error("You are not in a Window context. Only Windows can have a Layout.");const{uuid:e,name:t}=this.fin.me;return this.wrapSync({uuid:e,name:t})}async getLayoutByViewIdentity(e){this.wire.sendAction("layout-get-by-view-identity").catch((()=>{}));let t=await this.wire.environment.getViewWindowIdentity(this.fin,e);t.identity&&(t=t.identity);try{const n=this.wrapSync(t),i=await Mi.Layout.getClient(n),r=await i.getLayoutIdentityForViewOrThrow(e);return this.wrapSync(r)}catch(n){if(!["No action registered at target for","getLayoutIdentityForViewOrThrow is not a function"].some((e=>n.message.includes(e))))throw n;if(t.uuid===t.name)throw new Error(`View identity ${JSON.stringify(e)} is not attached to any layout in provider window ${JSON.stringify(t)}.`);return this.wrapSync(t)}}}kn.LayoutModule=Oi,Ci=new WeakMap,bi=new WeakMap,Ii=new WeakMap,vi=new WeakSet,Ei=function(e){if(!xi(this,bi,"f"))throw new Error(`You must call init before using the API ${e}`);return xi(this,bi,"f")},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(kn,e),n(Ln,e)}(jn),Object.defineProperty(Pn,"__esModule",{value:!0}),Pn.PlatformModule=void 0;const Si=d,Ri=Mn,Fi=jn;class ji extends Si.Base{constructor(e,t){super(e),this._channel=t,this.Layout=new Fi.LayoutModule(this.wire)}async init(e){if(!fin.__internal_.isPlatform||fin.me.name!==fin.me.uuid)throw new Error("fin.Platform.init should only be called from a custom platform provider running in the main window of the application.");return this.wire.environment.initPlatform(this.fin,e)}async wrap(e){return this.wire.sendAction("platform-wrap").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}wrapSync(e){return this.wire.sendAction("platform-wrap-sync").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}async getCurrent(){return this.wire.sendAction("platform-get-current").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction("platform-get-current-sync").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}start(e){return this.wire.sendAction("platform-start").catch((e=>{})),new Promise((async(t,n)=>{try{const{uuid:n}=e,i=await this.fin.Application._create({...e,isPlatformController:!0});i.once("platform-api-ready",(()=>t(this.wrapSync({uuid:n})))),i._run({uuid:n})}catch(e){n(e)}}))}startFromManifest(e,t){return this.wire.sendAction("platform-start-from-manifest").catch((e=>{})),new Promise((async(n,i)=>{try{const i=await this.fin.Application._createFromManifest(e);i.once("platform-api-ready",(()=>n(this.wrapSync({uuid:i.identity.uuid})))),i._run(t)}catch(e){i(e)}}))}}Pn.PlatformModule=ji,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Pn,e),n(Mn,e)}(An);var ki={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getMe=e.getBaseMe=e.environmentUnsupportedMessage=void 0;const t=J(),n=un,i=ie(),r=rn;function o(e,t,n){return{...{isView:"view"===e,isWindow:"window"===e,isFrame:"iframe"===e,isExternal:"external connection"===e},uuid:t,name:n,entityType:e}}e.environmentUnsupportedMessage="You are not running in OpenFin.",e.getBaseMe=o,e.getMe=function(s){const{uuid:a,name:c,entityType:d}=s.me,h={setContext(){throw new Error(e.environmentUnsupportedMessage)},addContextHandler(){throw new Error(e.environmentUnsupportedMessage)},getContextGroups(){throw new Error(e.environmentUnsupportedMessage)},joinContextGroup(){throw new Error(e.environmentUnsupportedMessage)},removeFromContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getAllClientsInContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getInfoForContextGroup(){throw new Error(e.environmentUnsupportedMessage)}},l="Interop API has not been instantiated. Either connection has failed or you have not declared interop in your config.",u={setContext(){throw new Error(l)},addContextHandler(){throw new Error(l)},getContextGroups(){throw new Error(l)},joinContextGroup(){throw new Error(l)},removeFromContextGroup(){throw new Error(l)},getAllClientsInContextGroup(){throw new Error(l)},getInfoForContextGroup(){throw new Error(l)}},p={eventNames:()=>{throw new Error(e.environmentUnsupportedMessage)},emit:()=>{throw new Error(e.environmentUnsupportedMessage)},listeners:()=>{throw new Error(e.environmentUnsupportedMessage)},listenerCount:()=>{throw new Error(e.environmentUnsupportedMessage)},on:()=>{throw new Error(e.environmentUnsupportedMessage)},addListener:()=>{throw new Error(e.environmentUnsupportedMessage)},once:()=>{throw new Error(e.environmentUnsupportedMessage)},prependListener:()=>{throw new Error(e.environmentUnsupportedMessage)},prependOnceListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeAllListeners:()=>{throw new Error(e.environmentUnsupportedMessage)}};switch(d){case"view":return Object.assign(new t.View(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case"window":return Object.assign(new i._Window(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case"iframe":return Object.assign(new n._Frame(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case"external connection":return Object.assign(new r.ExternalApplication(s,{uuid:a}),o(d,a,c),{interop:u,isOpenFin:!1});default:return{...o(d,a,c),...p,interop:h,isOpenFin:!1}}}}(ki);var Li={},Ti={},$i={};Object.defineProperty($i,"__esModule",{value:!0}),$i.createWarningObject=$i.createUnusableObject=void 0,$i.createUnusableObject=function(e){const t=()=>{throw new Error(e)};return new Proxy({},{apply:t,construct:t,defineProperty:t,deleteProperty:t,get:t,getOwnPropertyDescriptor:t,getPrototypeOf:t,has:t,isExtensible:t,ownKeys:t,preventExtensions:t,set:t,setPrototypeOf:t})},$i.createWarningObject=function(e,t){return new Proxy(t,{get:(...t)=>(console.warn(e),Reflect.get(...t)),set:(...t)=>(console.warn(e),Reflect.set(...t)),getOwnPropertyDescriptor:(...t)=>(console.warn(e),Reflect.getOwnPropertyDescriptor(...t)),ownKeys:(...t)=>(console.warn(e),Reflect.ownKeys(...t))})};var Bi,Gi={},Wi={};var Hi={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.wrapIntentHandler=e.BROKER_ERRORS=e.generateOverrideWarning=e.generateOverrideError=e.wrapContextHandler=e.wrapInTryCatch=e.generateId=void 0;e.generateId=()=>`${Math.random()}${Date.now()}`;e.wrapInTryCatch=(e,t)=>(...n)=>{try{return e(...n)}catch(e){throw new Error((t||"")+e)}};e.wrapContextHandler=(e,t)=>async n=>{try{await e(n)}catch(e){throw console.error(`Error thrown by handler ${t} for context type ${n.type}: ${e}`),e}};e.generateOverrideError=(e,t)=>`You have tried to to use ${e} but ${t} has not been overridden in the Interop Broker. Please override this function. Refer to our documentation for more info.`;e.generateOverrideWarning=(e,t,n,i)=>{const{uuid:r,name:o}=n;return i?`Entity with identity: ${r}/${o} has called ${i} or ${e} but ${t} has not been overridden.`:`Entity with identity: ${r}/${o} has called ${e} but ${t} has not been overridden.`},e.BROKER_ERRORS={fireIntent:(0,e.generateOverrideError)("fireIntent","handleFiredIntent"),fireIntentForContext:(0,e.generateOverrideError)("fireIntentForContext","handleFiredIntentForContext"),getInfoForIntent:(0,e.generateOverrideError)("getInfoForIntent","handleInfoForIntent"),getInfoForIntentsByContext:(0,e.generateOverrideError)("getInfoForIntentsByContext","handleInfoForIntentsByContext"),joinSessionContextGroupWithJoinContextGroup:"The Context Group you have tried to join is a Session Context Group. Custom Context Groups can only be defined by the Interop Broker through code or manifest configuration. Please use joinSessionContextGroup.",fdc3Open:(0,e.generateOverrideError)("fdc3.open","fdc3HandleOpen"),fdc3FindInstances:(0,e.generateOverrideError)("fdc3.findInstances","fdc3HandleFindInstances"),fdc3GetAppMetadata:(0,e.generateOverrideError)("fdc3.getAppMetadata","fdc3HandleGetAppMetadata"),fdc3GetInfo:(0,e.generateOverrideError)("fdc3.getInfo","fdc3HandleGetInfo")};e.wrapIntentHandler=(e,t)=>async n=>{try{return e(n)}catch(e){throw console.error(`Error thrown by handler ${t}: ${e}`),e}}}(Hi);var Ni,Di,Ui={};function Vi(){if(Di)return Gi;Di=1;var e,t,n,r=s&&s.__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},o=s&&s.__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)},a=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Gi,"__esModule",{value:!0}),Gi.InteropBroker=void 0;const c=d,h=a(function(){if(Bi)return Wi;Bi=1,Object.defineProperty(Wi,"__esModule",{value:!0});const e=Cr();return Wi.default=class{constructor(e,t){this.provider=e,this.id=t,this.lastContext=void 0,this.contextGroupMap=new Map,this.clients=new Map,this.registerListeners()}registerListeners(){this.provider.register(`sessionContextGroup:getContext-${this.id}`,this.getCurrentContext.bind(this)),this.provider.register(`sessionContextGroup:setContext-${this.id}`,this.setContext.bind(this)),this.provider.register(`sessionContextGroup:handlerAdded-${this.id}`,this.handlerAdded.bind(this)),this.provider.register(`sessionContextGroup:handlerRemoved-${this.id}`,this.handlerRemoved.bind(this))}getCurrentContext(e){return e.type?this.contextGroupMap.get(e.type):this.lastContext}setContext(t,n){const{context:i}=t,r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name} not in Session Client State Map`);this.contextGroupMap.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{e.contextHandlers.get(i.type)?.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getClientState(e){return this.clients.get(e.endpointId)}async handlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(i){const e=r.contextHandlers.get(i)||[];r.contextHandlers.set(i,[...e,n]);const o=this.contextGroupMap.get(i);o&&await this.provider.dispatch(t,n,o)}else{r.globalHandler=n;const e=[...this.contextGroupMap.keys()].map((async e=>{const i=this.contextGroupMap.get(e);i&&await this.provider.dispatch(t,n,i)}));await Promise.all(e)}}handlerRemoved(e,t){const{handlerId:n}=e,i=this.clients.get(t.endpointId);i?(Array.from(i.contextHandlers).forEach((([,e])=>{const t=e.indexOf(n);t>-1&&e.splice(t,1)})),i.globalHandler===n&&(i.globalHandler=void 0)):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={contextHandlers:new Map,clientIdentity:e,globalHandler:void 0};this.clients.set(e.endpointId,t)}}onDisconnection(e){this.clients.delete(e.endpointId)}},Wi}()),l=Hi,u=a(i),p=function(){if(Ni)return Ui;Ni=1,Object.defineProperty(Ui,"__esModule",{value:!0}),Ui.PrivateChannelProvider=void 0;const e=Vi();return Ui.PrivateChannelProvider=class t{constructor(e,t){this.provider=e,this.id=t,this.clients=new Map,this.registerListeners(),this.contextByContextType=new Map,this.lastContext=void 0,this.provider.onConnection((e=>this.registerNewClient(e))),this.provider.onDisconnection((async e=>{const{endpointId:t}=e;this.clients.has(t)&&await this.handleClientDisconnecting(e),0===(await this.provider.getAllClientInfo()).length&&this.provider.destroy()}))}getClientState(e){return this.clients.get(e.endpointId)}registerListeners(){this.provider.register("broadcast",this.broadcast.bind(this)),this.provider.register("getCurrentContext",this.getCurrentContext.bind(this)),this.provider.register("contextHandlerAdded",this.contextHandlerAdded.bind(this)),this.provider.register("contextHandlerRemoved",this.contextHandlerRemoved.bind(this)),this.provider.register("nonStandardHandlerRemoved",this.nonStandardHandlerRemoved.bind(this)),this.provider.register("onAddContextHandlerAdded",this.onAddContextHandlerAdded.bind(this)),this.provider.register("onDisconnectHandlerAdded",this.onDisconnectHandlerAdded.bind(this)),this.provider.register("onUnsubscribeHandlerAdded",this.onUnsubscribeHandlerAdded.bind(this)),this.provider.register("clientDisconnecting",((e,t)=>{this.handleClientDisconnecting(t)}))}broadcast(t,n){const{context:i}=t;if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name}, tried to call broadcast, is not connected to this Private Channel`);const r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to broadcast - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);this.contextByContextType.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{const t=e.handlerIdsByContextTypes.get(i.type);t&&t.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getCurrentContext(e,t){const{contextType:n}=e;if(!this.getClientState(t))throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call getCurrentContext, is not connected to this Private Channel`);if(void 0!==n){return this.contextByContextType.get(n)||null}return this.lastContext?this.lastContext:null}contextHandlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call addContextListener, is not connected to this Private Channel`);if(i){const e=r.handlerIdsByContextTypes.get(i)||[];r.handlerIdsByContextTypes.set(i,[...e,n])}else r.globalHandler=n;Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&e.onAddContextListenerHandlerId&&this.provider.dispatch(e.clientIdentity,e.onAddContextListenerHandlerId,i)}))}async contextHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);if(i){let e;if(i.globalHandler===n)i.globalHandler=void 0;else for(const[t,r]of i.handlerIdsByContextTypes){const i=r.indexOf(n);i>-1&&(r.splice(i,1),e=t)}const r=(await this.getConnectedClients()).map((async n=>{const{clientIdentity:i,clientIdentity:{endpointId:r},onUnsubscribeHandlerId:o}=n;r!==t.endpointId&&o&&await this.provider.dispatch(i,o,e)}));try{await Promise.all(r)}catch(e){throw console.error(`Problem when attempting to dispatch to onUnsubscribeHandlers. Error: ${e} Removing Client: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}`),new Error(e)}}else console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}.`)}nonStandardHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);i?i.onDisconnectHandlerId===n?i.onDisconnectHandlerId=void 0:i.onAddContextListenerHandlerId===n?i.onAddContextListenerHandlerId=void 0:i.onUnsubscribeHandlerId===n&&(i.onUnsubscribeHandlerId=void 0):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}onAddContextHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onAddContextListener, is not connected to this Private Channel`);n.onAddContextListenerHandlerId=i,Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&Array.from(e.handlerIdsByContextTypes.keys()).forEach((e=>{this.provider.dispatch(t,i,e)}))}))}onDisconnectHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onDisconnect, is not connected to this Private Channel`);n.onDisconnectHandlerId=i}onUnsubscribeHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onUnsubscribe, is not connected to this Private Channel`);n.onUnsubscribeHandlerId=i}removeClient(e){const t=this.getClientState(e);if(!t)throw new Error(`Client with Identity: ${e.uuid} ${e.name}, tried to call disconnect, is not connected to this Private Channel`);t.handlerIdsByContextTypes.clear(),this.clients.delete(e.endpointId)}async fireOnDisconnectForOtherClients(e){const{endpointId:t}=e,n=(await this.getConnectedClients()).map((async e=>{const{clientIdentity:{endpointId:n},onDisconnectHandlerId:i}=e;n!==t&&i&&await this.provider.dispatch(e.clientIdentity,i)}));try{await Promise.all(n)}catch(t){throw console.error(`Problem when attempting to dispatch to onDisconnectHandlers. Error: ${t} Disconnecting Client: uuid: ${e.uuid}. name: ${e.name}. endpointId: ${e.endpointId}`),new Error(t)}}async unsubscribeAll(e){const{endpointId:t}=e,n=this.clients.get(t);if(n){const t=Array.from(n.handlerIdsByContextTypes.values()).flat(),i=n.globalHandler;if(t.length>0){const n=t.map((async t=>this.contextHandlerRemoved({handlerId:t},e)));try{await Promise.all(n)}catch(e){console.error(e.message)}}if(i)try{await this.contextHandlerRemoved({handlerId:i},e)}catch(e){console.error(e.message)}}}async handleClientDisconnecting(e){await this.unsubscribeAll(e),this.removeClient(e),await this.fireOnDisconnectForOtherClients(e)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={clientIdentity:e,handlerIdsByContextTypes:new Map,globalHandler:void 0,onAddContextListenerHandlerId:void 0,onUnsubscribeHandlerId:void 0,onDisconnectHandlerId:void 0};this.clients.set(e.endpointId,t)}}async getConnectedClients(){const e=await this.provider.getAllClientInfo();return Array.from(this.clients.values()).filter((t=>{const{uuid:n,name:i}=t.clientIdentity;return e.some((e=>i===e.name&&n===e.uuid))}))}static init(e,n){return new t(e,n)}},Ui}(),w=G,y=[{id:"green",displayMetadata:{color:"#00CC88",name:"green"}},{id:"purple",displayMetadata:{color:"#8C61FF",name:"purple"}},{id:"orange",displayMetadata:{color:"#FF8C4C",name:"orange"}},{id:"red",displayMetadata:{color:"#FF5E60",name:"red"}},{id:"pink",displayMetadata:{color:"#FF8FB8",name:"pink"}},{id:"yellow",displayMetadata:{color:"#E9FF8F",name:"yellow"}}];let f=class i extends c.Base{constructor(i,s,a){super(i),e.set(this,void 0),t.set(this,void 0),n.set(this,void 0),this.getProvider=()=>o(this,n,"f").getValue(),this.interopClients=new Map,this.contextGroupsById=new Map,r(this,t,a.contextGroups??[...y],"f"),r(this,e,a.fdc3Info,"f"),a?.logging&&(this.logging=a.logging),this.intentClientMap=new Map,this.lastContextMap=new Map,this.sessionContextGroupMap=new Map,r(this,n,new w.Lazy(s),"f"),this.setContextGroupMap(),this.setupChannelProvider()}static createClosedConstructor(...e){return class extends i{constructor(...t){if(t.length){const[n,i,r]=t;if(r&&"object"==typeof r&&!(0,u.default)(r,e[2]))return console.warn("You have modified the parameters of the InteropOverride constructor. This behavior is deprecated and will be removed in a future version. You can modify these options in your manifest. Please consult our Interop docs for guidance on migrating to the new override scheme."),void super(e[0],e[1],r);console.warn("You are attempting to pass arguments to the InteropOverride constructor. This is not necessary, and these passed arguments will be ignored. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.")}super(...e)}}}setContext({context:e},t){this.wire.sendAction("interop-broker-set-context").catch((e=>{}));const n=this.getClientState(t);if(!n||!n.contextGroupId)throw n?new Error("You must join a context group before you can set context."):new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);{const{contextGroupId:t}=n;this.setContextForGroup({context:e},t)}}setContextForGroup({context:e},t){this.wire.sendAction("interop-broker-set-context-for-group").catch((e=>{}));const n=this.contextGroupsById.get(t);if(!n)throw new Error(`Unable to set context for context group that isn't in the context group mapping: ${t}.`);const r=i.checkContextIntegrity(e);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(e)}`);const o=e.type;n.set(o,e),this.lastContextMap.set(t,o);Array.from(this.interopClients.values()).filter((e=>e.contextGroupId===t)).forEach((t=>{for(const[,n]of t.contextHandlers)i.isContextTypeCompatible(o,n.contextType)&&this.invokeContextHandler(t.clientIdentity,n.handlerId,e)}))}getCurrentContext(e,t){this.wire.sendAction("interop-broker-get-current-context").catch((e=>{}));const n=this.getClientState(t);if(!n?.contextGroupId)throw new Error("You must be a member of a context group to call getCurrentContext");const{contextGroupId:i}=n,r=this.contextGroupsById.get(i),o=this.lastContextMap.get(i),s=e?.contextType??o;return r&&s?r.get(s):void 0}async joinContextGroup({contextGroupId:e,target:t},n){if(this.wire.sendAction("interop-broker-join-context-group").catch((e=>{})),this.sessionContextGroupMap.has(e))throw new Error(l.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup);if(t){i.hasEndpointId(t)&&await this.addClientToContextGroup({contextGroupId:e},t);try{const n=this.channel.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name));if(!n.length)throw new Error(`Given Identity ${t.uuid} ${t.name} is not connected to the Interop Broker.`);n.length>1&&console.warn(`More than one connection found for identity ${t.uuid} ${t.name}`);const i=[];for(const t of n)i.push(this.addClientToContextGroup({contextGroupId:e},t));await Promise.all(i)}catch(e){throw new Error(e)}}else await this.addClientToContextGroup({contextGroupId:e},n)}async addClientToContextGroup({contextGroupId:e},t){this.wire.sendAction("interop-broker-add-client-to-context-group").catch((e=>{}));const n=this.getClientState(t);if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(!this.getContextGroups().find((t=>t.id===e)))throw new Error(`Attempting to join a context group that does not exist: ${e}. You may only join existing context groups.`);if(n.contextGroupId!==e){n.contextGroupId=e,await this.setCurrentContextGroupInClientOptions(t,e);const i=this.contextGroupsById.get(e);for(const[,e]of n.contextHandlers){const{contextType:n,handlerId:r}=e;if(void 0===n)i.forEach(((e,n)=>{this.invokeContextHandler(t,r,e)}));else if(i.has(n)){const e=i.get(n);e&&this.invokeContextHandler(t,r,e)}}}}async removeFromContextGroup({target:e},t){if(this.wire.sendAction("interop-broker-remove-from-context-group").catch((e=>{})),e){i.hasEndpointId(e)&&await this.removeClientFromContextGroup(e);try{const t=this.channel.connections.filter((t=>t.uuid===e.uuid&&t.name===e.name));if(!t.length)throw new Error(`No connection found for given Identity ${e.uuid} ${e.name}`);t.length>1&&console.warn(`More than one connection found for identity ${e.uuid} ${e.name}`);const n=[];for(const e of t)n.push(this.removeClientFromContextGroup(e));await Promise.all(n)}catch(e){throw new Error(e)}}else await this.removeClientFromContextGroup(t)}async removeClientFromContextGroup(e){this.wire.sendAction("interop-broker-remove-client-from-context-group").catch((e=>{}));const t=this.getClientState(e);t&&(t.contextGroupId=void 0),await this.setCurrentContextGroupInClientOptions(e,null)}getContextGroups(){return this.wire.sendAction("interop-broker-get-context-groups").catch((e=>{})),o(this,t,"f").map((e=>({...e})))}getInfoForContextGroup({contextGroupId:e}){return this.wire.sendAction("interop-broker-get-info-for-context-group").catch((e=>{})),this.getContextGroups().find((t=>t.id===e))}getAllClientsInContextGroup({contextGroupId:e}){this.wire.sendAction("interop-broker-get-all-clients-in-context-group").catch((e=>{}));return Array.from(this.interopClients.values()).filter((t=>t.contextGroupId===e)).map((e=>e.clientIdentity))}async handleFiredIntent(e,t){const n=(0,l.generateOverrideWarning)("fdc3.raiseIntent","InteropBroker.handleFiredIntent",t,"interopClient.fireIntent");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntent)}async setIntentTarget(e,t){this.wire.sendAction("interop-broker-set-intent-target").catch((e=>{}));const n=this.intentClientMap.get(t.name),i=`intent-handler-${e.name}`;if(n){const t=n.get(i);if(t){if(t.pendingIntents.push(e),t.clientIdentity&&t.isReady){const{clientIdentity:e,pendingIntents:n}=t;try{const r=n[n.length-1];await this.invokeIntentHandler(e,i,r),t.pendingIntents=[]}catch(n){console.error(`Error invoking intent handler for client ${e.uuid}/${e.name}/${e.endpointId}`),t.isReady=!1}}}else n.set(i,{isReady:!1,pendingIntents:[e]})}else{this.intentClientMap.set(t.name,new Map);const n=this.intentClientMap.get(t.name);n&&n.set(i,{isReady:!1,pendingIntents:[e]})}}async handleInfoForIntent(e,t){const n=(0,l.generateOverrideWarning)("fdc3.findIntent","InteropBroker.handleInfoForIntent",t,"interopClient.getInfoForIntent");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntent)}async handleInfoForIntentsByContext(e,t){const n=(0,l.generateOverrideWarning)("fdc3.findIntentsByContext","InteropBroker.handleInfoForIntentsByContext",t,"interopClient.getInfoForIntentsByContext");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntentsByContext)}async handleFiredIntentForContext(e,t){const n=(0,l.generateOverrideWarning)("fdc3.raiseIntentForContext","InteropBroker.handleFiredIntentForContext",t,"interopClient.fireIntentForContext");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntentForContext)}async clientDisconnected(e){}async fdc3HandleOpen({app:e,context:t},n){const i=(0,l.generateOverrideWarning)("fdc3.open","InteropBroker.fdc3HandleOpen",n);throw console.warn(i),new Error(l.BROKER_ERRORS.fdc3Open)}async fdc3HandleFindInstances(e,t){const n=(0,l.generateOverrideWarning)("fdc3.open","InteropBroker.fdc3HandleFindInstances",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3FindInstances)}async fdc3HandleGetAppMetadata(e,t){const n=(0,l.generateOverrideWarning)("fdc3.getAppMetadata","InteropBroker.fdc3HandleGetAppMetadata",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3GetAppMetadata)}async invokeContextHandler(e,t,n){const i=await this.getProvider();try{await i.dispatch(e,t,n)}catch(i){console.error(`Error invoking context handler ${t} for context type ${n.type} in client ${e.uuid}/${e.name}/${e.endpointId}`,i)}}async invokeIntentHandler(e,t,n){const i=await this.getProvider();await i.dispatch(e,t,n)}async fdc3HandleGetInfo(t,n){const{fdc3Version:i}=t;return{fdc3Version:i,...o(this,e,"f"),optionalFeatures:{OriginatingAppMetadata:!1,UserChannelMembershipAPIs:!0},appMetadata:{appId:"",instanceId:""}}}async getAllClientInfo(){return(await this.getProvider()).getAllClientInfo()}decorateSnapshot(e){return{...e,interopSnapshotDetails:{contextGroupStates:this.getContextGroupStates()}}}applySnapshot(e,t){const n=e?.interopSnapshotDetails?.contextGroupStates;n&&(t?.closeExistingWindows||this.updateExistingClients(n),this.rehydrateContextGroupStates(n))}updateExistingClients(e){this.interopClients.forEach((t=>{const{clientIdentity:n,contextGroupId:r,contextHandlers:o}=t;if(r){const t=e[r];for(const[,e]of Object.entries(t))o.forEach((t=>{const{handlerId:r,contextType:o}=t;i.isContextTypeCompatible(e.type,o)&&this.invokeContextHandler(n,r,e)}))}}))}getContextGroupStates(){return i.toObject(this.contextGroupsById)}rehydrateContextGroupStates(e){const t=Object.entries(e);for(const[e,n]of t){const t=Object.entries(n);for(const[n,i]of t)if(this.contextGroupsById.has(e)){this.contextGroupsById.get(e).set(n,i)}else console.warn(`Attempting to set a context group that isn't in the context group mapping. Skipping context group rehydration for: ${e}`)}}contextHandlerRegistered({contextType:e,handlerId:t},n){const i={contextType:e,handlerId:t},r=this.getClientState(n);if(r?.contextHandlers.set(t,i),r&&r.contextGroupId){const{contextGroupId:i}=r,o=this.contextGroupsById.get(i);if(void 0===e)o.forEach(((e,i)=>{this.invokeContextHandler(n,t,e)}));else if(o.has(e)){const i=o.get(e);i&&this.invokeContextHandler(n,t,i)}}}async intentHandlerRegistered(e,t){const{handlerId:n}=e,i=this.intentClientMap.get(t.name),r=i?.get(n);if(i)if(r){const{pendingIntents:e}=r;r.clientIdentity=t,r.isReady=!0;try{if(e.length>0){const i=e[e.length-1];await this.invokeIntentHandler(t,n,i),r.pendingIntents=[]}}catch(e){console.error(`Error invoking intent handler: ${n} for client ${t.uuid}/${t.name}/${t.endpointId}`)}}else i.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t});else{this.intentClientMap.set(t.name,new Map);const e=this.intentClientMap.get(t.name);e&&e.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t})}}removeContextHandler({handlerId:e},t){const n=this.getClientState(t);n&&n.contextHandlers.delete(e)}handleJoinSessionContextGroup({sessionContextGroupId:e},t){try{if(!e)throw new Error("Failed to join session context group: must specify group id.");const n=this.sessionContextGroupMap.get(e);if(n)n.registerNewClient(t);else{const n=new h.default(this.channel,e);n.registerNewClient(t),this.sessionContextGroupMap.set(e,n)}return{hasConflict:this.contextGroupsById.has(e)}}catch(e){throw new Error(e)}}getClientState(e){return this.interopClients.get(e.endpointId)}static toObject(e){const t=Object.fromEntries(e),n={};return Object.entries(t).forEach((([e,t])=>{const i=Object.fromEntries(t);n[e]=i})),n}static checkContextIntegrity(e){if(!e)return{isValid:!1,reason:"No context supplied"};if("object"!=typeof e)return{isValid:!1,reason:"Context must be an Object"};if(!e.type)return{isValid:!1,reason:"Context must have a type property"};if(e.id&&"object"!=typeof e.id)return{isValid:!1,reason:"Context id must be an Object populated with key-value identifiers (if set)"};if(e.id){const{id:t}=e,n=Object.keys(t);let i=!1;if(!n.length)return{isValid:!1,reason:"Context id must have at least one key-value identifier"};if(n.forEach((e=>{"string"==typeof e&&"string"==typeof t[e]||(i=!0)})),i)return{isValid:!1,reason:"Context id key-value identifiers must be of type string"}}return e.name&&"string"!=typeof e.name?{isValid:!1,reason:"Context name must be of string type (if set)"}:{isValid:!0}}static hasEndpointId(e){return void 0!==e.endpointId}static isContextTypeCompatible(e,t){return void 0===t||e===t}setContextGroupMap(){for(const e of this.getContextGroups())this.contextGroupsById.set(e.id,new Map)}async setCurrentContextGroupInClientOptions(e,t){try{const n=await this.fin.System.getEntityInfo(e.uuid,e.name);let i;"view"===n.entityType?i=await this.fin.View.wrap(e):"window"===n.entityType&&(i=await this.fin.Window.wrap(e)),i&&await i.updateOptions({interop:{currentContextGroup:t}})}catch(e){}}async setupChannelProvider(){try{const e=await this.getProvider();this.channel=e,this.wireChannel(e)}catch(e){throw new Error(`Error setting up Interop Broker Channel Provider: ${e}`)}}wireChannel(e){e.onConnection((async(e,t)=>{if(!await this.isConnectionAuthorized(e,t))throw new Error(`Connection not authorized for ${e.uuid}, ${e.name}`);if(!e.endpointId)throw new Error("Version too old to be compatible with Interop. Please upgrade your runtime to a more recent version.");const n={contextGroupId:void 0,contextHandlers:new Map,clientIdentity:e};t?.currentContextGroup&&this.contextGroupsById.has(t.currentContextGroup)&&(n.contextGroupId=t?.currentContextGroup),this.interopClients.set(e.endpointId,n)})),e.onDisconnection((e=>{this.interopClients.delete(e.endpointId);const t=this.intentClientMap.get(e.name);t&&e.uuid===this.fin.me.uuid&&t.forEach((e=>{e.isReady=!1})),this.sessionContextGroupMap.forEach((t=>{t.onDisconnection(e)})),this.clientDisconnected(e)})),e.beforeAction((async(e,t,n)=>{if(!await this.isActionAuthorized(e,t,n))throw new Error(`Action (${e}) not authorized for ${n.uuid}, ${n.name}`);this.logging?.beforeAction?.enabled&&console.log(e,t,n)})),e.afterAction(((e,t,n)=>{this.logging?.afterAction?.enabled&&console.log(e,t,n)})),e.register("setContext",this.setContext.bind(this)),e.register("fireIntent",this.handleFiredIntent.bind(this)),e.register("getCurrentContext",this.getCurrentContext.bind(this)),e.register("getInfoForIntent",this.handleInfoForIntent.bind(this)),e.register("getInfoForIntentsByContext",this.handleInfoForIntentsByContext.bind(this)),e.register("fireIntentForContext",this.handleFiredIntentForContext.bind(this)),e.register("getContextGroups",this.getContextGroups.bind(this)),e.register("joinContextGroup",this.joinContextGroup.bind(this)),e.register("removeFromContextGroup",this.removeFromContextGroup.bind(this)),e.register("getAllClientsInContextGroup",this.getAllClientsInContextGroup.bind(this)),e.register("getInfoForContextGroup",this.getInfoForContextGroup.bind(this)),e.register("contextHandlerRegistered",this.contextHandlerRegistered.bind(this)),e.register("intentHandlerRegistered",this.intentHandlerRegistered.bind(this)),e.register("removeContextHandler",this.removeContextHandler.bind(this)),e.register("sessionContextGroup:createIfNeeded",this.handleJoinSessionContextGroup.bind(this)),e.register("fdc3Open",this.fdc3HandleOpen.bind(this)),e.register("fdc3v2FindIntentsByContext",this.handleInfoForIntentsByContext.bind(this)),e.register("fdc3FindInstances",this.fdc3HandleFindInstances.bind(this)),e.register("fdc3GetAppMetadata",this.fdc3HandleGetAppMetadata.bind(this)),e.register("fdc3v2GetInfo",(async(e,t)=>this.fdc3HandleGetInfo.bind(this)(e,t))),e.register("createPrivateChannelProvider",(async e=>{const{channelId:t}=e,n=await this.fin.InterApplicationBus.Channel.create(t);p.PrivateChannelProvider.init(n,t)}))}isConnectionAuthorized(e,t){return this.wire.sendAction("interop-broker-is-connection-authorized").catch((e=>{})),Promise.resolve(!0)}isActionAuthorized(e,t,n){return this.wire.sendAction("interop-broker-is-action-authorized").catch((e=>{})),Promise.resolve(!0)}};return Gi.InteropBroker=f,e=new WeakMap,t=new WeakMap,n=new WeakMap,Gi}var zi,Ki={},qi={},Ji=s&&s.__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},Yi=s&&s.__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)};Object.defineProperty(qi,"__esModule",{value:!0});const Zi=d,Qi=Hi;class Xi extends Zi.Base{constructor(e,t,n){super(e),zi.set(this,void 0),this.id=n,Ji(this,zi,t,"f")}async setContext(e){this.wire.sendAction("interop-session-context-group-set-context").catch((e=>{}));return(await Yi(this,zi,"f")).dispatch(`sessionContextGroup:setContext-${this.id}`,{sessionContextGroupId:this.id,context:e})}async getCurrentContext(e){this.wire.sendAction("interop-session-context-group-get-context").catch((e=>{}));return(await Yi(this,zi,"f")).dispatch(`sessionContextGroup:getContext-${this.id}`,{sessionContextGroupId:this.id,type:e})}async addContextHandler(e,t){if(this.wire.sendAction("interop-session-context-group-add-handler").catch((e=>{})),"function"!=typeof e)throw new Error("Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");const n=await Yi(this,zi,"f");let i;return i=t?`sessionContextHandler:invoke-${this.id}-${t}-${(0,Qi.generateId)()}`:`sessionContextHandler:invoke-${this.id}`,n.register(i,(0,Qi.wrapContextHandler)(e,i)),await n.dispatch(`sessionContextGroup:handlerAdded-${this.id}`,{handlerId:i,contextType:t}),{unsubscribe:await this.createUnsubscribeCb(i)}}async createUnsubscribeCb(e){const t=await Yi(this,zi,"f");return async()=>{t.remove(e),await t.dispatch(`sessionContextGroup:handlerRemoved-${this.id}`,{handlerId:e})}}getUserInstance(){return{id:this.id,setContext:(0,Qi.wrapInTryCatch)(this.setContext.bind(this),"Failed to set context: "),getCurrentContext:(0,Qi.wrapInTryCatch)(this.getCurrentContext.bind(this),"Failed to get context: "),addContextHandler:(0,Qi.wrapInTryCatch)(this.addContextHandler.bind(this),"Failed to add context handler: ")}}}qi.default=Xi,zi=new WeakMap;var er={},tr={},nr={},ir={},rr=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),or=s&&s.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),sr=s&&s.__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)&&rr(t,e,n);return or(t,e),t};Object.defineProperty(ir,"__esModule",{value:!0}),ir.PrivateChannelClient=void 0;const ar=sr(Hi);var cr,dr;function hr(){if(cr)return tr;cr=1;var e,t=s&&s.__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)},n=s&&s.__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},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(tr,"__esModule",{value:!0}),tr.FDC3ModuleBase=void 0;const o=nr,a=Hi,c=wr(),d=r(i);return tr.FDC3ModuleBase=class{get client(){return t(this,e,"f").call(this)}get fin(){return this.wire.getFin()}constructor(t,i){this.wire=i,e.set(this,void 0),n(this,e,t,"f")}async broadcast(e){return this.wire.sendAction("fdc3-broadcast").catch((e=>{})),this.client.setContext(e)}async _open(e,t){this.wire.sendAction("fdc3-open").catch((e=>{}));try{return await c.InteropClient.ferryFdc3Call(this.client,"fdc3Open",{app:e,context:t})}catch(e){const t=e.message===a.BROKER_ERRORS.fdc3Open?"ResolverUnavailable":e.message;throw new Error(t)}}async _getChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:"system",...(0,o.getUnsupportedChannelApis)()})))}async getOrCreateChannel(e){this.wire.sendAction("fdc3-get-or-create-channel").catch((e=>{}));const t=(await this._getChannels()).find((t=>t.id===e));if(t)return{...t,type:"system",...(0,o.getUnsupportedChannelApis)()};try{const t=await this.client.joinSessionContextGroup(e);return(0,o.buildAppChannelObject)(t)}catch(e){throw console.error(e.message),new Error(o.ChannelError.CreationFailed)}}async getSystemChannels(){return this.wire.sendAction("fdc3-get-system-channels").catch((e=>{})),this._getChannels()}async joinChannel(e){this.wire.sendAction("fdc3-join-channel").catch((e=>{}));try{return await this.client.joinContextGroup(e)}catch(e){if(e.message===a.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup?console.error("The Channel you have tried to join is an App Channel. Custom Channels can only be defined by the Interop Broker through code or manifest configuration. Please use getOrCreateChannel."):console.error(e.message),e.message.startsWith("Attempting to join a context group that does not exist"))throw new Error(o.ChannelError.NoChannelFound);throw new Error(o.ChannelError.AccessDenied)}}async getCurrentChannel(){this.wire.sendAction("fdc3-get-current-channel").catch((e=>{}));const e=await this.getCurrentContextGroupInfo();return e?this.buildChannelObject(e):null}async leaveCurrentChannel(){return this.wire.sendAction("fdc3-leave-current-channel").catch((e=>{})),this.client.removeFromContextGroup()}async getCurrentContextGroupInfo(){const e=await this.client.getContextGroups(),t=e.map((async e=>this.client.getAllClientsInContextGroup(e.id))),n=(await Promise.all(t)).findIndex((e=>e.some((e=>{const{uuid:t,name:n}=e;return this.wire.me.uuid===t&&this.wire.me.name===n}))));return e[n]}async buildChannelObject(e){return{...e,type:"system",addContextListener:(...[e,t])=>{let n,i;"function"==typeof e?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),n=e):(n=t,"string"==typeof e&&(i=e));const r=(async()=>{let e=!0;const t=await this.client.getCurrentContext(i);return this.client.addContextHandler(((i,r)=>{if(!e||(e=!1,!(0,d.default)(t,i)))return n(i,r)}),i)})();return{...r,unsubscribe:()=>r.then((e=>e.unsubscribe()))}},broadcast:this.broadcast.bind(this),getCurrentContext:async e=>{const t=await this.client.getCurrentContext(e);return void 0===t?null:t}}}},e=new WeakMap,tr}ir.PrivateChannelClient=class{constructor(e,t){this.id=t,this.client=e,this.listeners=new Map}async broadcast(e){return this.client.dispatch("broadcast",{context:e})}async getCurrentContext(e){return this.client.dispatch("getCurrentContext",{contextType:e})}async addContextListener(e,t){if("function"!=typeof t)throw new Error("Non-function argument passed to the second parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");let n;n=e?`contextHandler:invoke-${this.id}-${e}-${ar.generateId()}`:`contextHandler:invoke-${this.id}-${ar.generateId()}`,this.client.register(n,ar.wrapContextHandler(t,n));const i={unsubscribe:await this.createContextUnsubscribeCb(n)};return this.listeners.set(n,i),await this.client.dispatch("contextHandlerAdded",{handlerId:n,contextType:e}),i}createNonStandardUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch("nonStandardHandlerRemoved",{handlerId:e})}}createContextUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch("contextHandlerRemoved",{handlerId:e})}}onAddContextListener(e){const t=`onContextHandlerAdded:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch("onAddContextHandlerAdded",{handlerId:t}),n}onDisconnect(e){const t=`onDisconnect:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch("onDisconnectHandlerAdded",{handlerId:t}),n}onUnsubscribe(e){const t=`onUnsubscribe:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch("onUnsubscribeHandlerAdded",{handlerId:t}),n}async cleanUpAllSubs(){Array.from(this.listeners.keys()).forEach((e=>{this.client.remove(e),this.listeners.delete(e)}))}async disconnect(){try{await this.client.dispatch("clientDisconnecting"),await this.cleanUpAllSubs(),await this.client.disconnect()}catch(e){throw new Error(e.message)}}},function(e){var t=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.getIntentResolution=e.isChannel=e.isContext=e.connectPrivateChannel=e.buildAppChannelObject=e.buildPrivateChannelObject=e.ChannelError=e.ResultError=e.UnsupportedChannelApiError=e.getUnsupportedChannelApis=void 0;const n=Hi,r=ir,o=t(i);e.getUnsupportedChannelApis=e=>({addContextListener:()=>{throw new a("Channel.addContextListener",e)},broadcast:()=>{throw new a("Channel.broadcast",e)},getCurrentContext:()=>{throw new a("Channel.getCurrentContext",e)}});class a extends Error{constructor(e,t="System"){super(e),this.message=`Calling ${e} on an instance of a ${t} Channel returned by fdc3.get${t}Channels is not supported. If you would like to use a ${t} Channel, please use fdc3.joinChannel, fdc3.addContextListener, and fdc3.broadcast instead.`}}var c,d;e.UnsupportedChannelApiError=a,function(e){e.NoResultReturned="NoResultReturned",e.IntentHandlerRejected="IntentHandlerRejected"}(c=e.ResultError||(e.ResultError={})),(d=e.ChannelError||(e.ChannelError={})).NoChannelFound="NoChannelFound",d.AccessDenied="AccessDenied",d.CreationFailed="CreationFailed";e.buildPrivateChannelObject=e=>{let t=!1;const n=()=>{if(t)throw new Error("Private Channel Client has been disconnected from the Private Channel")};return{id:e.id,type:"private",broadcast:async t=>(n(),e.broadcast(t)),getCurrentContext:async t=>(n(),e.getCurrentContext(t)),addContextListener:async(t,i)=>{n();let r=i,o=t;"function"==typeof t&&(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),r=t,o=null);return e.addContextListener(o,r)},onAddContextListener:t=>(n(),e.onAddContextListener(t)),disconnect:async()=>(n(),t=!0,e.disconnect()),onDisconnect:t=>(n(),e.onDisconnect(t)),onUnsubscribe:t=>(n(),e.onUnsubscribe(t))}};e.buildAppChannelObject=e=>({id:e.id,type:"app",broadcast:e.setContext,getCurrentContext:async t=>{const n=await e.getCurrentContext(t);return void 0===n?null:n},addContextListener:(t,n)=>{let i,r;"function"==typeof t?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),i=t):(i=n,"string"==typeof t&&(r=t));const s=(async()=>{let t=!0;const n=await e.getCurrentContext(r);return e.addContextHandler(((e,r)=>{if(!t||(t=!1,!(0,o.default)(n,e)))return i(e,r)}),r)})();return{...s,unsubscribe:()=>s.then((e=>e.unsubscribe()))}}});e.connectPrivateChannel=async t=>{try{const n=await fin.InterApplicationBus.Channel.connect(t),i=new r.PrivateChannelClient(n,t);return(0,e.buildPrivateChannelObject)(i)}catch(e){throw new Error(`Private Channel with id: ${t} doesn't exist`)}};e.isContext=e=>{if(e&&"object"==typeof e&&"type"in e){const{type:t}=e;return"string"==typeof t}return!1};e.isChannel=e=>{if(e&&"object"==typeof e&&"type"in e&&"id"in e){const{type:t,id:n}=e;return"string"==typeof t&&"string"==typeof n&&("app"===t||"private"===t)}return!1};e.getIntentResolution=async(t,i,r,o)=>{const s=(0,n.generateId)(),a=new Promise(((e,t)=>{fin.InterApplicationBus.subscribe({uuid:"*"},s,(t=>{e(t)})).catch((()=>t(new Error("getResult is not supported in this environment"))))})),d=r?{target:r,intentResolutionResultId:s}:{intentResolutionResultId:s},h=o?{name:o,context:i,metadata:d}:{...i,metadata:d},l=async()=>{let n=await a;if(!n||"object"!=typeof n)throw new Error(c.NoResultReturned);const{error:i}=n;if(i)throw new Error(c.IntentHandlerRejected);if((0,e.isChannel)(n)){const{id:i,type:r}=n;switch(r){case"private":n=await(0,e.connectPrivateChannel)(i);break;case"app":{const r=await t.joinSessionContextGroup(i);n=(0,e.buildAppChannelObject)(r);break}}}else if(!(0,e.isContext)(n))throw new Error(c.NoResultReturned);return n},u=o?await t.fireIntent(h):await t.fireIntentForContext(h);return"object"!=typeof u?{source:{appId:"",instanceId:""},intent:"",version:"2.0",getResult:l}:{...u,getResult:l}}}(nr);var lr,ur,pr={};function wr(){if(ur)return Ki;ur=1;var e,t,n=s&&s.__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},i=s&&s.__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)},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ki,"__esModule",{value:!0}),Ki.InteropClient=void 0;const o=d,a=r(qi),c=function(){if(dr)return er;dr=1,Object.defineProperty(er,"__esModule",{value:!0}),er.Fdc3Module=void 0;const e=Hi,t=hr();class n extends t.FDC3ModuleBase{async open(e,t){await super._open(e,t)}addContextListener(e,t){let n;return this.wire.sendAction("fdc3-add-context-listener").catch((e=>{})),"function"==typeof e?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),n=this.client.addContextHandler(e)):n=this.client.addContextHandler(t,null===e?void 0:e),{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}addIntentListener(e,t){this.wire.sendAction("fdc3-add-intent-listener").catch((e=>{}));const n=this.client.registerIntentHandler((e=>{const{context:n,metadata:i}=e,{metadata:r}=n,o=i?.intentResolutionResultId||r?.intentResolutionResultId;o&&this.fin.InterApplicationBus.publish(o,null).catch((()=>null)),t(e.context)}),e,{fdc3Version:"1.2"});return{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}async raiseIntent(t,n,i){this.wire.sendAction("fdc3-raise-intent").catch((e=>{}));const r=i?{name:t,context:n,metadata:{target:i}}:{name:t,context:n};try{return await this.client.fireIntent(r)}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntent?"ResolverUnavailable":t.message;throw new Error(n)}}async findIntent(t,n){this.wire.sendAction("fdc3-find-intent").catch((e=>{}));try{return await this.client.getInfoForIntent({name:t,context:n})}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntent?"ResolverUnavailable":t.message;throw new Error(n)}}async findIntentsByContext(t){this.wire.sendAction("fdc3-find-intents-by-context").catch((e=>{}));try{return await this.client.getInfoForIntentsByContext(t)}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntentsByContext?"ResolverUnavailable":t.message;throw new Error(n)}}async raiseIntentForContext(t,n){this.wire.sendAction("fdc3-raise-intent-for-context").catch((e=>{}));try{return await this.client.fireIntentForContext({...t,metadata:{target:n}})}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntentForContext?"ResolverUnavailable":t.message;throw new Error(n)}}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}getInfo(){return this.wire.sendAction("fdc3-get-info").catch((e=>{})),{providerVersion:this.wire.environment.getAdapterVersionSync(),provider:`openfin-${this.wire.me.uuid}`,fdc3Version:"1.2"}}}return er.Fdc3Module=n,er}(),h=function(){if(lr)return pr;lr=1,Object.defineProperty(pr,"__esModule",{value:!0}),pr.Fdc3Module2=void 0;const e=hr(),t=Hi,n=wr(),i=nr,r=ir;class o extends e.FDC3ModuleBase{async open(e,t){return"string"==typeof e&&console.warn("Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string })."),super._open(e,t)}async findInstances(e){this.wire.sendAction("fdc3-find-instances").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,"fdc3FindInstances",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3FindInstances?"ResolverUnavailable":e.message;throw new Error(n)}}async getAppMetadata(e){this.wire.sendAction("fdc3-get-app-metadata").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,"fdc3GetAppMetadata",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3GetAppMetadata?"ResolverUnavailable":e.message;throw new Error(n)}}async addContextListener(e,t){this.wire.sendAction("fdc3-add-context-listener").catch((e=>{}));const n=e=>t=>{const{contextMetadata:n,...i}=t,r=n?[{...i},n]:[t,null];e(...r)};let i=t,r=n(i);return"function"==typeof e?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),i=e,r=n(i),this.client.addContextHandler(r)):this.client.addContextHandler(r,null===e?void 0:e)}async findIntent(e,n,i){this.wire.sendAction("fdc3-find-intent").catch((e=>{}));try{return await this.client.getInfoForIntent({name:e,context:n,metadata:{resultType:i}})}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntent?"ResolverUnavailable":e.message;throw new Error(n)}}async findIntentsByContext(e,i){this.wire.sendAction("fdc3-find-intents-by-context").catch((e=>{}));const r=i?{context:e,metadata:{resultType:i}}:e;try{return await n.InteropClient.ferryFdc3Call(this.client,"fdc3v2FindIntentsByContext",r)}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntentsByContext?"ResolverUnavailable":e.message;throw new Error(n)}}async raiseIntent(e,n,r){this.wire.sendAction("fdc3-raise-intent").catch((e=>{}));try{return"string"==typeof r&&console.warn("Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string })."),(0,i.getIntentResolution)(this.client,n,r,e)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?"ResolverUnavailable":e.message;throw new Error(n)}}async raiseIntentForContext(e,n){this.wire.sendAction("fdc3-raise-intent-for-context").catch((e=>{}));try{return"string"==typeof n&&console.warn("Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string })."),(0,i.getIntentResolution)(this.client,e,n)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?"ResolverUnavailable":e.message;throw new Error(n)}}async addIntentListener(e,t){if(this.wire.sendAction("fdc3-add-intent-listener").catch((e=>{})),"string"!=typeof e)throw new Error("First argument must be an Intent name");return this.client.registerIntentHandler((async e=>{let n,i;const{context:r,metadata:o}=e,{contextMetadata:s,metadata:a,...c}=r,d=o?.intentResolutionResultId||a?.intentResolutionResultId;try{const e=a?{metadata:a,...c}:{...c};n=await t(e,s),i=n}catch(e){n=e,i={error:!0}}if(d&&this.fin.InterApplicationBus.publish(d,i).catch((()=>null)),n instanceof Error)throw new Error(n.message);return n}),e,{fdc3Version:"2.0"})}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}async createPrivateChannel(){const e=(0,t.generateId)();await n.InteropClient.ferryFdc3Call(this.client,"createPrivateChannelProvider",{channelId:e});const o=await this.fin.InterApplicationBus.Channel.connect(e),s=new r.PrivateChannelClient(o,e);return(0,i.buildPrivateChannelObject)(s)}async getUserChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:"user",...(0,i.getUnsupportedChannelApis)("User")})))}async getSystemChannels(){return console.warn("This API has been deprecated. Please use fdc3.getUserChannels instead."),super.getSystemChannels()}async joinUserChannel(e){return super.joinChannel(e)}async joinChannel(e){return console.warn("This API has been deprecated. Please use fdc3.joinUserChannel instead."),super.joinChannel(e)}async getCurrentChannel(){const e=await super.getCurrentChannel();return e?{...e,type:"user",broadcast:this.broadcast.bind(this)}:null}async getInfo(){return n.InteropClient.ferryFdc3Call(this.client,"fdc3v2GetInfo",{fdc3Version:"2.0"})}}return pr.Fdc3Module2=o,pr}(),l=Hi;let u=class extends o.Base{constructor(i,r){super(i),e.set(this,void 0),t.set(this,void 0),n(this,t,new Map,"f"),n(this,e,r,"f")}async setContext(t){this.wire.sendAction("interop-client-set-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("setContext",{context:t})}async addContextHandler(t,n){if(this.wire.sendAction("interop-client-add-context-handler").catch((e=>{})),"function"!=typeof t)throw new Error("Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");const r=await i(this,e,"f");let o;o=n?`invokeContextHandler-${n}-${(0,l.generateId)()}`:"invokeContextHandler";const s=(0,l.wrapContextHandler)(t,o);return r.register(o,s),await r.dispatch("contextHandlerRegistered",{handlerId:o,contextType:n}),{unsubscribe:async()=>{r.remove(o),await r.dispatch("removeContextHandler",{handlerId:o})}}}async getContextGroups(){this.wire.sendAction("interop-client-get-context-groups").catch((e=>{}));return(await i(this,e,"f")).dispatch("getContextGroups")}async joinContextGroup(t,n){this.wire.sendAction("interop-client-join-context-group").catch((e=>{}));const r=await i(this,e,"f");if(!t)throw new Error("No contextGroupId specified for joinContextGroup.");return r.dispatch("joinContextGroup",{contextGroupId:t,target:n})}async removeFromContextGroup(t){this.wire.sendAction("interop-client-remove-from-context-group").catch((e=>{}));return(await i(this,e,"f")).dispatch("removeFromContextGroup",{target:t})}async getAllClientsInContextGroup(t){this.wire.sendAction("interop-client-get-all-clients-in-context-group").catch((e=>{}));const n=await i(this,e,"f");if(!t)throw new Error("No contextGroupId specified for getAllClientsInContextGroup.");return n.dispatch("getAllClientsInContextGroup",{contextGroupId:t})}async getInfoForContextGroup(t){this.wire.sendAction("interop-client-get-info-for-context-group").catch((e=>{}));const n=await i(this,e,"f");if(!t)throw new Error("No contextGroupId specified for getInfoForContextGroup.");return n.dispatch("getInfoForContextGroup",{contextGroupId:t})}async fireIntent(t){this.wire.sendAction("interop-client-fire-intent").catch((e=>{}));return(await i(this,e,"f")).dispatch("fireIntent",t)}async registerIntentHandler(t,n,r){this.wire.sendAction("interop-client-register-intent-handler").catch((e=>{}));const o=await i(this,e,"f"),s=`intent-handler-${n}`,a=(0,l.wrapIntentHandler)(t,s);try{await o.register(s,a),await o.dispatch("intentHandlerRegistered",{handlerId:s,...r})}catch(e){throw new Error("Unable to register intent handler")}return{unsubscribe:async()=>{o.remove(s)}}}async getCurrentContext(t){this.wire.sendAction("interop-client-get-current-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("getCurrentContext",{contextType:t})}async getInfoForIntent(t){this.wire.sendAction("interop-client-get-info-for-intent").catch((e=>{}));return(await i(this,e,"f")).dispatch("getInfoForIntent",t)}async getInfoForIntentsByContext(t){this.wire.sendAction("interop-client-get-info-for-intents-by-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("getInfoForIntentsByContext",t)}async fireIntentForContext(t){this.wire.sendAction("interop-client-fire-intent-for-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("fireIntentForContext",t)}async joinSessionContextGroup(n){try{const r=i(this,t,"f").get(n);if(r)return r.getUserInstance();const o=await i(this,e,"f"),{hasConflict:s}=await o.dispatch("sessionContextGroup:createIfNeeded",{sessionContextGroupId:n});s&&console.warn(`A (non-session) context group with the name "${n}" already exists. If you are trying to join a Context Group, call joinContextGroup instead.`);const c=new a.default(this.wire,i(this,e,"f"),n);return i(this,t,"f").set(n,c),c.getUserInstance()}catch(e){throw console.error(`Error thrown trying to create Session Context Group with id "${n}": ${e}`),e}}async onDisconnection(t){this.wire.sendAction("interop-client-add-ondisconnection-listener").catch((e=>{}));return(await i(this,e,"f")).onDisconnection((e=>{const{uuid:n}=e;t({type:"interop-broker",topic:"disconnected",brokerName:n})}))}getFDC3Sync(e){switch(e){case"1.2":return new c.Fdc3Module((()=>this),this.wire);case"2.0":return new h.Fdc3Module2((()=>this),this.wire);default:throw new Error(`Invalid FDC3 version provided: ${e}. Must be '1.2' or '2.0'`)}}async getFDC3(e){return this.getFDC3Sync(e)}static async ferryFdc3Call(t,n,r){return(await i(t,e,"f")).dispatch(n,r||null)}};return Ki.InteropClient=u,e=new WeakMap,t=new WeakMap,Ki}var yr,fr,gr,mr={};function vr(){if(yr)return mr;yr=1,Object.defineProperty(mr,"__esModule",{value:!0}),mr.overrideCheck=mr.checkFDC32Overrides=mr.getDefaultViewFdc3VersionFromAppInfo=void 0;const e=Vi();function t(t){return["fdc3HandleFindInstances","handleInfoForIntent","handleInfoForIntentsByContext","fdc3HandleGetAppMetadata","fdc3HandleGetInfo","fdc3HandleOpen","handleFiredIntent","handleFiredIntentForContext"].filter((n=>t[n]===e.InteropBroker.prototype[n]))}return mr.getDefaultViewFdc3VersionFromAppInfo=function({manifest:e,initialOptions:t}){const n=e?.platform?.defaultViewOptions?.fdc3InteropApi??t.defaultViewOptions?.fdc3InteropApi;return["1.2","2.0"].includes(n??"")?n:void 0},mr.checkFDC32Overrides=t,mr.overrideCheck=function(e,n){if(n&&"2.0"===n){const n=t(e);n.length>0&&console.warn(`WARNING: FDC3 2.0 has been set as a default option for Views in this Platform, but the required InteropBroker APIs for FDC3 2.0 compliance have not all been overridden.\nThe following APIs need to be overridden:\n${n.join("\n")}`)}},mr}function Cr(){return gr||(gr=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),i=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),i(function(){if(fr)return Ti;fr=1;var e=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ti,"__esModule",{value:!0}),Ti.InteropModule=void 0;const t=e(n),i=$i,r=d,o=Vi(),a=wr(),c=vr(),h=Tn,l=e=>new e,u="You have attempted to use or modify InteropBroker parameters, which is not allowed. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.";class p extends r.Base{async init(e,n=l){this.wire.sendAction("interop-init").catch((()=>{}));const r=await this.wire.environment.getInteropInfo(this.wire.getFin()),s=(0,i.createUnusableObject)(u),a=(0,i.createWarningObject)(u,(0,t.default)(r)),d=async()=>{throw new Error(u)},p=o.InteropBroker.createClosedConstructor(this.wire,(()=>this.fin.InterApplicationBus.Channel.create(`interop-broker-${e}`)),r);let w;return w=Array.isArray(n)?new((0,h.overrideFromComposables)(...n)(p))(s,d,a):await n(p,s,d,a),(0,c.overrideCheck)(w,r.fdc3Version),w}connectSync(e,t){return this.wire.sendAction("interop-connect-sync").catch((()=>{})),new a.InteropClient(this.wire,this.wire.environment.whenReady().then((()=>this.fin.InterApplicationBus.Channel.connect(`interop-broker-${e}`,{payload:t}))))}}return Ti.InteropModule=p,Ti}(),e),i(wr(),e),i(Vi(),e)}(Li)),Li}var br={},Ir={},Er={},xr={};Object.defineProperty(xr,"__esModule",{value:!0}),xr.getSnapshotSourceChannelName=void 0;xr.getSnapshotSourceChannelName=e=>`snapshot-source-provider-${e.uuid}`;var Ar,Pr,Mr,_r,Or,Sr=s&&s.__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},Rr=s&&s.__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)};Object.defineProperty(Er,"__esModule",{value:!0}),Er.SnapshotSource=void 0;const Fr=d,jr=xr,kr=new Map;class Lr extends Fr.Base{constructor(e,t){super(e),Ar.set(this,void 0),Pr.set(this,(()=>(kr.has(this.identity.uuid)||kr.set(this.identity.uuid,{eventFired:null,clientPromise:null}),kr.get(this.identity.uuid)))),Mr.set(this,(()=>(Rr(this,Pr,"f").call(this).clientPromise||(Rr(this,Pr,"f").call(this).clientPromise=Rr(this,_r,"f").call(this)),Rr(this,Pr,"f").call(this).clientPromise))),_r.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);try{Rr(this,Pr,"f").call(this).eventFired||await Rr(this,Or,"f").call(this);const t=await this.fin.InterApplicationBus.Channel.connect(e,{wait:!1});return t.onDisconnection((()=>{Rr(this,Pr,"f").call(this).clientPromise=null,Rr(this,Pr,"f").call(this).eventFired=null})),t}catch(e){throw Rr(this,Pr,"f").call(this).clientPromise=null,new Error("The targeted SnapshotSource is not currently initialized. Await this object's ready() method.")}})),Or.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);let t,n;const i=new Promise(((e,i)=>{t=e,n=i}));Rr(this,Pr,"f").call(this).eventFired=i;const r=async i=>{try{i.channelName===e&&(t(),await this.fin.InterApplicationBus.Channel.removeListener("connected",r))}catch(e){n(e)}};await this.fin.InterApplicationBus.Channel.on("connected",r)})),Sr(this,Ar,t,"f")}get identity(){return Rr(this,Ar,"f")}async ready(){this.wire.sendAction("snapshot-source-ready").catch((e=>{}));try{await Rr(this,Mr,"f").call(this)}catch(e){await Rr(this,Pr,"f").call(this).eventFired}}async getSnapshot(){this.wire.sendAction("snapshot-source-get-snapshot").catch((e=>{}));const e=await Rr(this,Mr,"f").call(this),t=await e.dispatch("get-snapshot");return(await t).snapshot}async applySnapshot(e){this.wire.sendAction("snapshot-source-apply-snapshot").catch((e=>{}));return(await Rr(this,Mr,"f").call(this)).dispatch("apply-snapshot",{snapshot:e})}}Er.SnapshotSource=Lr,Ar=new WeakMap,Pr=new WeakMap,Mr=new WeakMap,_r=new WeakMap,Or=new WeakMap,Object.defineProperty(Ir,"__esModule",{value:!0}),Ir.SnapshotSourceModule=void 0;const Tr=d,$r=Er,Br=xr;class Gr extends Tr.Base{async init(e){if(this.wire.sendAction("snapshot-source-init").catch((e=>{})),"object"!=typeof e||"function"!=typeof e.getSnapshot||"function"!=typeof e.applySnapshot)throw new Error("you must pass in a valid SnapshotProvider");const t=await this.fin.InterApplicationBus.Channel.create((0,Br.getSnapshotSourceChannelName)(this.fin.me));t.register("get-snapshot",(async()=>({snapshot:await e.getSnapshot()}))),t.register("apply-snapshot",(({snapshot:t})=>e.applySnapshot(t)))}wrapSync(e){return this.wire.sendAction("snapshot-source-wrap-sync").catch((e=>{})),new $r.SnapshotSource(this.wire,e)}async wrap(e){return this.wire.sendAction("snapshot-source-wrap").catch((e=>{})),this.wrapSync(e)}}Ir.SnapshotSourceModule=Gr,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Ir,e),n(Er,e)}(br),Object.defineProperty(a,"__esModule",{value:!0});var Wr=a.Fin=void 0;const Hr=t,Nr=c,Dr=ie(),Ur=Z(),Vr=de,zr=en,Kr=rn,qr=un,Jr=bn,Yr=J(),Zr=An,Qr=ki,Xr=Cr(),eo=br;class to extends Hr.EventEmitter{constructor(e){super(),this.wire=e,this.System=new Nr.System(e),this.Window=new Dr._WindowModule(e),this.Application=new Ur.ApplicationModule(e),this.InterApplicationBus=new Vr.InterApplicationBus(e),this.Clipboard=new zr.Clipboard(e),this.ExternalApplication=new Kr.ExternalApplicationModule(e),this.Frame=new qr._FrameModule(e),this.GlobalHotkey=new Jr.GlobalHotkey(e),this.Platform=new Zr.PlatformModule(e,this.InterApplicationBus.Channel),this.View=new Yr.ViewModule(e),this.Interop=new Xr.InteropModule(e),this.SnapshotSource=new eo.SnapshotSourceModule(e),e.registerFin(this),this.me=(0,Qr.getMe)(e),e.on("disconnected",(()=>{this.emit("disconnected")}))}}Wr=a.Fin=to;var no={},io={};function ro(e){return"string"==typeof e.manifestUrl}function oo(e){return ao(e)&&"string"==typeof e.address}function so(e){return oo(e)&&"string"==typeof e.token}function ao(e){return"string"==typeof e.uuid}function co(e){return e.runtime&&"string"==typeof e.runtime.version}function ho(e){return ao(e)&&co(e)}Object.defineProperty(io,"__esModule",{value:!0}),io.isInternalConnectConfig=io.isPortDiscoveryConfig=io.isNewConnectConfig=io.isConfigWithReceiver=io.isRemoteConfig=io.isExistingConnectConfig=io.isExternalConfig=void 0,io.isExternalConfig=ro,io.isExistingConnectConfig=oo,io.isRemoteConfig=so,io.isConfigWithReceiver=function(e){return"object"==typeof e.receiver&&so({...e,address:""})},io.isNewConnectConfig=ho,io.isPortDiscoveryConfig=function(e){return ro(e)&&co(e)||ho(e)},io.isInternalConnectConfig=function(e){return oo(e)||ho(e)};var lo={},uo={};Object.defineProperty(uo,"__esModule",{value:!0}),uo.EmitterMap=void 0;const po=t;function wo(e){return Buffer.from(e).toString("base64")}uo.EmitterMap=class{constructor(){this.storage=new Map}hashKeys(e){return e.map(wo).join("/")}getOrCreate(e){const t=this.hashKeys(e);return this.storage.has(t)||this.storage.set(t,new po.EventEmitter),this.storage.get(t)}has(e){return this.storage.has(this.hashKeys(e))}delete(e){const t=this.hashKeys(e);return this.storage.delete(t)}},Object.defineProperty(lo,"__esModule",{value:!0});const yo=uo;class fo extends yo.EmitterMap{constructor(){super(...arguments),this.dispatchEvent=e=>{if(function(e){return"process-desktop-event"===e.action}(e)){const{payload:t}=e,n=function(e){const{topic:t}=e;if("frame"===t||"window"===t||"view"===t){const{uuid:n,name:i}=e;return[t,n,i]}if("application"===t){const{uuid:n}=e;return[t,n]}return[t]}(t);if(this.has(n))return this.getOrCreate(n).emit(t.type,t),!0}return!1}}}lo.default=fo;var go,mo,vo=s&&s.__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},Co=s&&s.__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)},bo=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(no,"__esModule",{value:!0});var Io=no.Transport=void 0;const Eo=t,xo=io,Ao=g,Po=bo(lo),Mo=ki,_o=ke;class Oo extends Eo.EventEmitter{constructor(e,t,n){super(),this.wireListeners=new Map,this.topicRefMap=new Map,this.eventAggregator=new Po.default,this.messageHandlers=[this.eventAggregator.dispatchEvent],go.set(this,void 0),mo.set(this,void 0),this.connectSync=()=>{Co(this,go,"f").connectSync()},this.getPort=()=>Co(this,go,"f").getPort(),vo(this,go,new e(this.onmessage.bind(this)),"f"),this.environment=t,this.sendRaw=Co(this,go,"f").send.bind(Co(this,go,"f")),this.registerMessageHandler(this.handleMessage.bind(this)),Co(this,go,"f").on("disconnected",(()=>{for(const[,{handleNack:e}]of this.wireListeners)e({reason:"Remote connection has closed"});this.wireListeners.clear(),this.emit("disconnected")}));const{uuid:i,name:r}=n,o=this.environment.getCurrentEntityType();this.me=(0,Mo.getBaseMe)(o,i,r)}getFin(){if(!Co(this,mo,"f"))throw new Error("No Fin object registered for this transport");return Co(this,mo,"f")}registerFin(e){if(Co(this,mo,"f"))throw new Error("Fin object has already been registered for this transport");vo(this,mo,e,"f")}shutdown(){return Co(this,go,"f").shutdown()}async connect(e){if((0,xo.isConfigWithReceiver)(e))return await Co(this,go,"f").connect(e.receiver),this.authorize(e);if((0,xo.isRemoteConfig)(e))return this.connectRemote(e);if((0,xo.isExistingConnectConfig)(e))return this.connectByPort(e);if((0,xo.isNewConnectConfig)(e)){const t=await this.environment.retrievePort(e);return this.connectByPort({...e,address:`ws://localhost:${t}`})}}async connectRemote(e){return await Co(this,go,"f").connect(new(this.environment.getWsConstructor())(e.address)),this.authorize(e)}async connectByPort(e){const{address:t,uuid:n}=e,i={...e,type:"file-token"},r=Co(this,go,"f");await r.connect(new(this.environment.getWsConstructor())(e.address));const o=await this.sendAction("request-external-authorization",{uuid:n,type:"file-token"},!0);if("external-authorization-response"!==o.action)throw new Ao.UnexpectedActionError(o.action);return await this.environment.writeToken(o.payload.file,o.payload.token),this.authorize(i)}async authorize(e){const t=await this.sendAction("request-authorization",e,!0);if("authorization-response"!==t.action)throw new Ao.UnexpectedActionError(t.action);if(!0!==t.payload.success)throw new Ao.RuntimeError(t.payload)}sendAction(e,t={},n=!1){let i=()=>{};const r=Ao.RuntimeError.getCallSite(1),o=this.environment.getNextMessageId(),s=new Promise(((s,a)=>{i=a;const c={action:e,payload:t,messageId:o},d=Co(this,go,"f");return this.addWireListener(o,s,(e=>this.nackHandler(e,a,r)),n),d.send(c).catch(a)}));return Object.assign(s,{cancel:i,messageId:o})}nackHandler(e,t,n){t("string"==typeof e?e:new Ao.RuntimeError(e,n))}ferryAction(e){return new Promise(((t,n)=>{const i=this.environment.getNextMessageId();e.messageId=i;const r=e=>{t(e.payload)};return Co(this,go,"f").send(e).then((()=>this.addWireListener(i,r,(e=>this.nackHandler(e,n)),!1))).catch(n)}))}registerMessageHandler(e){this.messageHandlers.push(e)}addWireListener(e,t,n,i){i?this.uncorrelatedListener=t:this.wireListeners.has(e)?n({reason:"Duplicate handler id",error:(0,_o.errorToPOJO)(new Ao.DuplicateCorrelationError(String(e)))}):this.wireListeners.set(e,{resolve:t,handleNack:n})}onmessage(e){for(const t of this.messageHandlers)t.call(null,e)}handleMessage(e){const t=e.correlationId||NaN;if("correlationId"in e){if(!this.wireListeners.has(t))return!1;{const{resolve:n,handleNack:i}=this.wireListeners.get(t);"ack"!==e.action?i({reason:"Did not receive ack action",error:(0,_o.errorToPOJO)(new Ao.NoAckError(e.action))}):"payload"in e?e.payload.success?n.call(null,e):i(e.payload):"string"==typeof e.reason?i(e):(console.warn("Received invalid response from core",e),i({reason:"invalid response shape"})),this.wireListeners.delete(t)}}else this.uncorrelatedListener&&this.uncorrelatedListener.call(null,e),this.uncorrelatedListener=()=>{};return!0}}Io=no.Transport=Oo,go=new WeakMap,mo=new WeakMap;const So=(...e)=>({log:(...t)=>console.debug(`[${(new Date).toISOString()}]`,...(e=>e.map((e=>`[${e}]`)))(e),...t),getLogger:(...t)=>So(...e,...t)}),Ro=So("@openfin/core-web/client");function Fo(e,t){if(!function(e){return"string"==typeof e}(e))throw new Error(`Property ${t} has invalid type. Expected string, got ${typeof e}.`)}const jo="web-broker-ports-ready",ko=Ro.getLogger("get-web-interop-ports");function Lo(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)}function To(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}"function"==typeof SuppressedError&&SuppressedError;const $o=e=>{var n,i,r;return r=class extends t.EventEmitter{constructor(t){super(),n.set(this,void 0),i.set(this,!1),this.connectSync=()=>{Lo(this,i,"f")||(e.addEventListener("message",(e=>{e.data?.topic?.startsWith("wire-message")&&e.data.message&&Lo(this,n,"f").call(this,{...JSON.parse(e.data.message),ports:e.ports})})),e.start())},this.connect=async()=>{this.connectSync()},this.send=t=>(e.postMessage({topic:"wire-message",message:JSON.stringify(t)}),Promise.resolve()),this.shutdown=async()=>{e.close()},To(this,n,t,"f")}getPort(){return e}},n=new WeakMap,i=new WeakMap,r};var Bo={},Go={};Object.defineProperty(Go,"__esModule",{value:!0}),Go.BaseEnvironment=void 0;const Wo=vr();Go.BaseEnvironment=class{async getViewWindowIdentity(e,t){const{identity:n}=await e.View.wrapSync(t).getCurrentWindow();return n}async getInteropInfo(e){const t=await e.Application.getCurrentSync().getInfo().catch((()=>null)),n=t?.initialOptions?.interopBrokerConfiguration??{};return{fdc3Version:t?(0,Wo.getDefaultViewFdc3VersionFromAppInfo)(t):void 0,...n,fdc3Info:{providerVersion:await e.System.getVersion(),provider:"OpenFin"}}}},Object.defineProperty(Bo,"__esModule",{value:!0});var Ho=Bo.BrowserEnvironment=void 0;const No=Go;class Do extends No.BaseEnvironment{constructor(){super(...arguments),this.type="other",this.getRandomId=()=>{const e=new Uint32Array(1);return window.crypto.getRandomValues(e)[0].toString(32)}}getAdapterVersionSync(){return""}observeBounds(e,t){throw new Error("Method not implemented.")}layoutAllowedInContext(e){return!1}initLayoutManager(e,t,n){throw new Error("Method not implemented.")}applyLayoutSnapshot(e,t,n){throw new Error("Method not implemented.")}createLayout(e,t){throw new Error("Method not implemented.")}destroyLayout(e,t){throw new Error("Method not implemented.")}resolveLayout(e,t){throw new Error("Method not implemented.")}initPlatform(...e){throw new Error("Method not implemented.")}writeToken(e,t){return Promise.resolve("")}retrievePort(e){throw new Error("Method not implemented.")}getNextMessageId(){return this.getRandomId()}createChildContent(e){throw new Error("Method not implemented.")}getWebWindow(e){throw new Error("Method not implemented.")}getCurrentEntityIdentity(){throw new Error("Method not implemented.")}getCurrentEntityType(){return"external connection"}raiseEvent(e,t){throw new Error("Method not implemented.")}getUrl(){return location.href}getDefaultChannelOptions(){return{create:{},connect:{}}}getRtcPeer(){return new RTCPeerConnection}getWsConstructor(){return WebSocket}whenReady(){return Promise.resolve()}}Ho=Bo.BrowserEnvironment=Do;const Uo=e=>"platform"in e&&void 0!==e.platform;var Vo,zo;class Ko extends Ho{constructor(e){super(),this.connectConfig=e,Vo.set(this,void 0),zo.set(this,new W((async()=>Promise.resolve().then((function(){return __webpack_require__(/*! ./main-b14f67c9.js */ "./node_modules/@openfin/core-web/out/main-b14f67c9.js")}))))),Uo(e)&&this.validatePlatformOptions(e)}getAdapterVersionSync(){return"0.39.21"}validatePlatformOptions({platform:e}){if(!("layoutSnapshot"in e))throw new Error("Platform options are missing layoutSnapshot. Please provide a layoutSnapshot in the platform options.");if("windows"in e||"windows"in e.layoutSnapshot)throw new Error("It appears you tried to call connect() with a snapshot object from an OpenFin desktop environment. Note that connect() expects to be called with a platform property with this structure: { platform: { layoutSnapshot } }. To get a layoutSnapshot of the expected structure, use fin.Platform.Layout.getCurrentLayoutManagerSync().getLayoutSnapshot() in v34+ in your desktop environment.");const{layouts:t}=e.layoutSnapshot;Object.entries(t).map((([e,t])=>{if("object"!=typeof t||null===t)throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must be an object.`);if(!("content"in t))throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must contain a 'content' property.`)}))}async getInteropInfo(e){return{...{contextGroups:void 0,logging:{beforeAction:{enabled:!1},afterAction:{enabled:!1}}},fdc3Version:void 0,fdc3Info:{providerVersion:"0.39.21",provider:"OpenFin Web"}}}layoutAllowedInContext(e){return!0}async initLayoutManager(e,t,n){if(Lo(this,Vo,"f"))throw new Error("Layout already initialized.");if(!Uo(this.connectConfig))throw new Error("Platform options are missing from connection config.");const{WebLayoutEntryPoint:i}=await Lo(this,zo,"f").getValue();return To(this,Vo,new i(this.connectConfig),"f"),await Lo(this,Vo,"f").initLayoutManager(e,t,n)}async applyLayoutSnapshot(e,t,n){Lo(this,Vo,"f")?.applyLayoutSnapshot(e,t,n)}async createLayout(e,t){return Lo(this,Vo,"f")?.createLayout(e,t)}async destroyLayout(e,t){return Lo(this,Vo,"f")?.destroyLayout(e,t)}async getViewWindowIdentity(e,t){return Promise.resolve({uuid:t.uuid,name:t.uuid})}}Vo=new WeakMap,zo=new WeakMap;const qo=()=>{const e=((e,t)=>{const n=new RegExp(`^${t}<(?.*)>$`).exec(e)?.groups?.meta;if(n)try{return JSON.parse(atob(n))}catch(e){throw new Error(`Failed to decode JSON from ${n}.`)}})(window.name,"of-frame");if(e)try{const{name:t,uuid:n,brokerUrl:i,providerId:r,contextGroup:o}=e;return Fo(i,"brokerUrl"),Fo(n,"uuid"),Fo(t,"name"),{identity:{name:t,uuid:n},brokerUrl:i,interopConfig:{providerId:r,currentContextGroup:o}}}catch(e){throw new Error(`Unexpected error occurred when inferring platform information: ${e.stack}`)}},Jo=()=>{const e=r.v4();return{uuid:e,name:e}},Yo=async e=>{if("enabled"===e.connectionInheritance){const t=await(async e=>{const t=qo();if(t){const{validateOptions:n=(()=>!0)}=e,{identity:i,...r}=t;if(!await n(r))throw new Error("Parent options were rejected by validateOptions.");return t}})(e);if(t)return t}if(!e.options){const t="enabled"===e.connectionInheritance?"Broker URL was not specified nor provided by a platform container.":"Connection inheritance is disabled but no options were provided.";throw new Error(t)}return{...e.options,identity:Jo()}};exports.__classPrivateFieldGet=Lo,exports.__classPrivateFieldSet=To,exports.apiExposer=Gn,exports.commonjsGlobal=s,exports.connect=async t=>{try{Ro.log("Establishing connection",t);const{brokerUrl:n,identity:i,timeout:r,interopConfig:s}=await Yo(t),{workerPort:a,iframeBrokerPort:c}=await(async(e,t,n)=>{const{origin:i}=new URL(e),r=document.createElement("IFRAME");let s;r.style.display="none";try{return await new Promise(((a,c)=>{const d=e=>{if(e.source===r.contentWindow&&e.data?.topic===`ack-${jo}`){if(e.origin!==i)c(new Error(`Broker redirected to unexpected origin ${e.origin}, expected ${i}.`));else if(e.data.success){const[t,n]=e.ports;a({iframeBrokerPort:t,workerPort:n})}else c(new m(e.data));window.removeEventListener("message",d),clearTimeout(s)}};window.addEventListener("message",d),ko.log(`Connecting to broker ${e}`),r.setAttribute("src",e),r.setAttribute("name",o(t,"of-broker")),document.body.appendChild(r),ko.log("Iframe loaded, awaiting init message from iframe"),n&&(s=setTimeout((()=>{window.removeEventListener("message",d),document.body.removeChild(r),c(new Error("Worker did not initialize in time"))}),n))}))}catch(e){throw new Error(`Failed to initialise Fin Web Client. ${e.message}`,{cause:e})}})(n,i,r);Ro.log("Successfully established connection to shared worker");const d={entityType:"external connection",...i};a.start(),c.start();const h=((t,n,i)=>{const r=$o(n),o=new Ko(t),s=new Io(r,o,i);return s.connectSync(),window.Buffer=e.Buffer,new Wr(s)})(t,a,d);return s?.providerId&&(h.me.interop=h.Interop.connectSync(s.providerId),s?.currentContextGroup&&h.me.interop.joinContextGroup(s.currentContextGroup).catch((e=>{console.warn(`Error joining specified context group: ${s?.currentContextGroup}, continuing`,e)}))),{...h,me:{...h.me,identity:{uuid:h.me.uuid,name:h.me.name}}}}catch(e){throw new Error(`An error occured during web-interop connection: ${e.message}`)}},exports.decorators=Nn,exports.encodeOptions=o,exports.layout_constants=ai,exports.lazy=G; +var e=__webpack_require__(/*! buffer/ */ "../../node_modules/buffer/index.js"),t=__webpack_require__(/*! events */ "../../node_modules/events/events.js"),n=__webpack_require__(/*! lodash/cloneDeep */ "../../node_modules/lodash/cloneDeep.js"),i=__webpack_require__(/*! lodash/isEqual */ "../../node_modules/lodash/isEqual.js"),r=__webpack_require__(/*! uuid */ "../../node_modules/uuid/dist/esm-browser/index.js");const o=(e,t)=>`${t}<${btoa(JSON.stringify(e))}>`;var s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof __webpack_require__.g?__webpack_require__.g:"undefined"!=typeof self?self:{},a={},c={},d={},h={};async function l(e){const t=[];for(const n of e){const e=await n();t.push(e)}return t}Object.defineProperty(h,"__esModule",{value:!0}),h.promiseMapSerial=h.serial=h.promiseMap=h.promisify=void 0,h.promisify=function(e){return(...t)=>new Promise(((n,i)=>{e(...t,((e,t)=>e?i(e):n(t)))}))},h.promiseMap=async function(e,t){return Promise.all(e.map(t))},h.serial=l,h.promiseMapSerial=async function(e,t){return l(e.map(((e,n,i)=>()=>t(e,n,i))))};var u,p=s&&s.__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},w=s&&s.__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)};Object.defineProperty(d,"__esModule",{value:!0}),d.Reply=d.EmitterBase=d.Base=void 0;const y=h;class f{constructor(e){this.isNodeEnvironment=()=>"node"===this.wire.environment.type,this.isOpenFinEnvironment=()=>"openfin"===this.wire.environment.type,this.isBrowserEnvironment=()=>"other"===this.wire.environment.type,this.wire=e}get fin(){return this.wire.getFin()}get me(){return this.wire.me}}d.Base=f;d.EmitterBase=class extends f{constructor(e,t,...n){super(e),this.topic=t,u.set(this,void 0),this.eventNames=()=>this.hasEmitter()?this.getOrCreateEmitter().eventNames():[],this.emit=(e,t,...n)=>!!this.hasEmitter()&&this.getOrCreateEmitter().emit(e,t,...n),this.hasEmitter=()=>this.wire.eventAggregator.has(w(this,u,"f")),this.getOrCreateEmitter=()=>this.wire.eventAggregator.getOrCreate(w(this,u,"f")),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[],this.listenerCount=e=>this.hasEmitter()?this.getOrCreateEmitter().listenerCount(e):0,this.registerEventListener=async(e,t={},n,i)=>{const r={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e},o=this.getOrCreateEmitter();n(o);try{await this.wire.sendAction("subscribe-to-desktop-event",r)}catch(e){throw i(o),this.deleteEmitterIfNothingRegistered(o),e}},this.deregisterEventListener=async(e,t={})=>{if(this.hasEmitter()){const n={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e};await this.wire.sendAction("unsubscribe-to-desktop-event",n).catch((()=>null));return this.getOrCreateEmitter()}return Promise.resolve()},p(this,u,[t,...n],"f"),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[]}async on(e,t,n){return await this.registerEventListener(e,n,(n=>{n.on(e,t)}),(n=>{n.removeListener(e,t)})),this}async addListener(e,t,n){return this.on(e,t,n)}async once(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.once(e,i),n.once(e,t)}),(n=>{n.removeListener(e,i),n.removeListener(e,t)})),this}async prependListener(e,t,n){return await this.registerEventListener(e,n,(n=>{n.prependListener(e,t)}),(n=>{n.removeListener(e,t)})),this}async prependOnceListener(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.prependOnceListener(e,t),n.once(e,i)}),(n=>{n.removeListener(e,t),n.removeListener(e,i)})),this}async removeListener(e,t,n){const i=await this.deregisterEventListener(e,n);return i&&(i.removeListener(e,t),this.deleteEmitterIfNothingRegistered(i)),this}async deregisterAllListeners(e){const t={...this.identity,type:e,topic:this.topic};if(this.hasEmitter()){const e=this.getOrCreateEmitter(),n=e.listenerCount(t.type),i=[];for(let e=0;enull)));return await Promise.all(i),e}}async removeAllListeners(e){const t=async e=>{const t=await this.deregisterAllListeners(e);t&&(t.removeAllListeners(e),this.deleteEmitterIfNothingRegistered(t))};if(e)await t(e);else if(this.hasEmitter()){const e=this.getOrCreateEmitter().eventNames();await(0,y.promiseMap)(e,t)}return this}deleteEmitterIfNothingRegistered(e){0===e.eventNames().length&&this.wire.eventAggregator.delete(w(this,u,"f"))}},u=new WeakMap;d.Reply=class{};var g={};Object.defineProperty(g,"__esModule",{value:!0});var m=g.RuntimeError=g.NotSupportedError=g.NotImplementedError=g.NoAckError=g.DuplicateCorrelationError=g.UnexpectedActionError=g.DisconnectedError=void 0;class v extends Error{constructor(e){super(`Expected websocket state OPEN but found ${e}`),this.readyState=e}}g.DisconnectedError=v;class C extends Error{}g.UnexpectedActionError=C;class b extends Error{}g.DuplicateCorrelationError=b;class I extends Error{}g.NoAckError=I;class E extends Error{}g.NotImplementedError=E;class x extends Error{}g.NotSupportedError=x;class A extends Error{constructor(e){const{message:t,name:n,stack:i,...r}=e;super(t),this.name=n||"Error",this.stack=i??this.toString(),Object.keys(r).forEach((e=>{this[e]=r[e]}))}}class P extends Error{static getCallSite(e=0){const t=Error.stackTraceLimit,n=e+1;Error.stackTraceLimit=t+n;const i=Error.prepareStackTrace;Error.prepareStackTrace=(e,t)=>t;const r=(new Error).stack?.slice(n)??[];return Error.prepareStackTrace=i,Error.stackTraceLimit=t,r}static prepareStackTrace(e,t){if("function"==typeof Error.prepareStackTrace)return Error.prepareStackTrace(e,t);let n="";n+=e.name||"Error",n+=`: ${e.message||""}`;for(const e of t)n+=`\n at ${e.toString()}`;return n}constructor(e,t){const{reason:n,error:i}=e;super(n),this.name="RuntimeError",i?.stack&&(this.cause=new A(i)),t&&(this.stack=P.prepareStackTrace(this,t))}}m=g.RuntimeError=P;var M={},_={},O={};Object.defineProperty(O,"__esModule",{value:!0}),O.validateIdentity=void 0,O.validateIdentity=function(e){let t;return"object"==typeof e&&"string"==typeof e.uuid||(t="Not a valid identity object"),t};var S={},R={},F={},j={},k={},L={},T={};Object.defineProperty(T,"__esModule",{value:!0}),T.handleDeprecatedWarnings=void 0;var $;T.handleDeprecatedWarnings=e=>{(e.contentNavigation?.whitelist||e.contentNavigation?.blacklist||e.contentRedirect?.whitelist||e.contentRedirect?.blacklist)&&console.warn("The properties 'whitelist' and 'blacklist' have been marked as deprecated and will be removed in a future version. Please use 'allowlist' and 'denylist'.")};var B={},G={};Object.defineProperty(G,"__esModule",{value:!0}),G.AsyncRetryableLazy=W=G.Lazy=void 0;var W=G.Lazy=class{constructor(e){this.producerFn=e}getValue(){return this.value||(this.value=this.producerFn()),this.value}};G.AsyncRetryableLazy=class{constructor(e){this.producerFn=e}async getValue(){return this.promise||(this.promise=this.producerFn().catch((e=>{throw delete this.promise,e}))),this.promise}};var H={};Object.defineProperty(H,"__esModule",{value:!0}),H.WebContents=void 0;const N=d;class D extends N.EmitterBase{constructor(e,t,n){super(e,n,t.uuid,t.name),this.identity=t,this.entityType=n}capturePage(e){return this.wire.sendAction("capture-page",{options:e,...this.identity}).then((({payload:e})=>e.data))}executeJavaScript(e){return this.wire.sendAction("execute-javascript-in-window",{...this.identity,code:e}).then((({payload:e})=>e.data))}getZoomLevel(){return this.wire.sendAction("get-zoom-level",this.identity).then((({payload:e})=>e.data))}setZoomLevel(e){return this.wire.sendAction("set-zoom-level",{...this.identity,level:e}).then((()=>{}))}navigate(e){return this.wire.sendAction("navigate-window",{...this.identity,url:e}).then((()=>{}))}navigateBack(){return this.wire.sendAction("navigate-window-back",{...this.identity}).then((()=>{}))}async navigateForward(){await this.wire.sendAction("navigate-window-forward",{...this.identity})}stopNavigation(){return this.wire.sendAction("stop-window-navigation",{...this.identity}).then((()=>{}))}reload(e=!1){return this.wire.sendAction("reload-window",{ignoreCache:e,...this.identity}).then((()=>{}))}print(e={}){return this.wire.sendAction("print",{...this.identity,options:e}).then((()=>{}))}findInPage(e,t){return this.wire.sendAction("find-in-page",{...this.identity,searchTerm:e,options:t}).then((({payload:e})=>e.data))}stopFindInPage(e){return this.wire.sendAction("stop-find-in-page",{...this.identity,action:e}).then((()=>{}))}getPrinters(){return this.wire.sendAction("get-printers",{...this.identity}).then((({payload:e})=>e.data))}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){await this.wire.sendAction("focus-window",{emitSynthFocused:e,...this.identity})}async showDeveloperTools(){await this.wire.sendAction("show-developer-tools",this.identity)}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction("get-process-info",this.identity);return e}async getSharedWorkers(){return this.wire.sendAction("get-shared-workers",this.identity).then((({payload:e})=>e.data))}async inspectSharedWorker(){await this.wire.sendAction("inspect-shared-worker",{...this.identity})}async inspectSharedWorkerById(e){await this.wire.sendAction("inspect-shared-worker-by-id",{...this.identity,workerId:e})}async inspectServiceWorker(){await this.wire.sendAction("inspect-service-worker",{...this.identity})}async showPopupWindow(e){if(this.wire.sendAction(`${this.entityType}-show-popup-window`,this.identity).catch((()=>{})),e?.onPopupReady){const t=async({popupName:t})=>{try{const n=this.fin.Window.wrapSync({uuid:this.fin.me.uuid,name:t});await e.onPopupReady(n)}catch(e){throw new Error(`Something went wrong during onPopupReady execution: ${e}`)}};await this.once("popup-ready",t)}const{payload:t}=await this.wire.sendAction("try-create-popup-window",{options:{...e,hasResultCallback:!!e?.onPopupResult,hasReadyCallback:!!e?.onPopupReady},...this.identity}),{data:{willOpen:n,options:i}}=t;n&&await this.fin.Window.create(i.initialOptions);if(e?.onPopupResult){const t=async t=>{await e.onPopupResult((e=>{const{name:t,uuid:n,result:i,data:r}=e,o={identity:{name:t,uuid:n},result:i};return r&&(o.data=r),o})(t))},n=async()=>{await this.removeListener("popup-result",t)};await this.on("popup-result",t),await this.once("popup-teardown",n)}const{payload:r}=await this.wire.sendAction("show-popup-window",{options:i,...this.identity});return r.data}}var U,V,z,K,q;function J(){return V||(V=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(function(){if($)return L;$=1,Object.defineProperty(L,"__esModule",{value:!0}),L.ViewModule=void 0;const e=d,t=O,n=J(),i=T;class r extends e.Base{async create(e){const{uuid:t}=this.wire.me;if(!e.name||"string"!=typeof e.name)throw new Error("Please provide a name property as a string in order to create a View.");return(0,i.handleDeprecatedWarnings)(e),this.wire.environment.childViews?await this.wire.environment.createChildContent({entityType:"view",options:{...e,uuid:t}}):await this.wire.sendAction("create-view",{...e,uuid:t}),this.wrapSync({uuid:t,name:e.name})}async wrap(e){this.wire.sendAction("view-wrap").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}wrapSync(e){this.wire.sendAction("view-wrap-sync").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}getCurrent(){if(this.wire.sendAction("view-get-current").catch((e=>{})),!this.wire.me.isView)throw new Error("You are not in a View context");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction("view-get-current-sync").catch((e=>{})),!this.wire.me.isView)throw new Error("You are not in a View context");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return L.ViewModule=r,L}(),e),n(function(){if(U)return B;var e;U=1,Object.defineProperty(B,"__esModule",{value:!0}),B.View=void 0;const t=g,n=G,i=H,r=ie();class o extends i.WebContents{constructor(i,o){super(i,o,"view"),this.identity=o,e.set(this,new n.Lazy((()=>this.fin.Platform.wrapSync(this.identity).getClient()))),this.attach=async e=>{await this.wire.sendAction("attach-view",{target:e,...this.identity})},this.destroy=async()=>{await this.wire.sendAction("destroy-view",{...this.identity})},this.show=async()=>{await this.wire.sendAction("show-view",{...this.identity})},this.showAt=async(e,t={})=>{await this.wire.sendAction("show-view-at",{bounds:e,...this.identity,options:t})},this.bringToFront=async()=>{await this.wire.sendAction("bring-view-to-front",{...this.identity})},this.hide=async()=>{await this.wire.sendAction("hide-view",{...this.identity})},this.setBounds=async e=>{await this.wire.sendAction("set-view-bounds",{bounds:e,...this.identity})},this.getBounds=async()=>(await this.wire.sendAction("get-view-bounds",{...this.identity})).payload.data,this.getInfo=async()=>(await this.wire.sendAction("get-view-info",{...this.identity})).payload.data,this.getParentLayout=async()=>(this.wire.sendAction("view-get-parent-layout",{...this.identity}).catch((()=>{})),this.fin.Platform.Layout.getLayoutByViewIdentity(this.identity)),this.getOptions=async()=>this.wire.sendAction("get-view-options",{...this.identity}).then((({payload:e})=>e.data)),this.updateOptions=async e=>this.wire.sendAction("update-view-options",{options:e,...this.identity}).then((()=>{})),this.getCurrentWindow=async()=>{const{payload:{data:e}}=await this.wire.sendAction("get-view-window",{...this.identity});return new r._Window(this.wire,e)},this.getCurrentStack=async()=>{this.wire.sendAction("view-get-current-stack").catch((()=>{}));try{return(await this.getParentLayout()).getStackByViewIdentity(this.identity)}catch(e){throw new t.RuntimeError({reason:"This view does not belong to a stack.",error:e})}},this.triggerBeforeUnload=async()=>(await this.wire.sendAction("trigger-before-unload",{...this.identity})).payload.data,this.bindToElement=async e=>{if(!e)throw new Error("Element not found.");return this.wire.environment.observeBounds(e,(async e=>this.setBounds(e)))}}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){const t=await this.getCurrentWindow();await t.focusedWebViewWasChanged(),await super.focus({emitSynthFocused:e})}}return B.View=o,e=new WeakMap,B}(),e)}(k)),k}function Y(){if(z)return j;z=1,Object.defineProperty(j,"__esModule",{value:!0}),j.Application=void 0;const e=d,t=ie(),n=J();class i extends e.EmitterBase{constructor(e,n){super(e,"application",n.uuid),this.identity=n,this.window=new t._Window(this.wire,{uuid:this.identity.uuid,name:this.identity.uuid})}windowListFromIdentityList(e){const n=[];return e.forEach((e=>{n.push(new t._Window(this.wire,{uuid:e.uuid,name:e.name}))})),n}isRunning(){return this.wire.sendAction("is-application-running",this.identity).then((({payload:e})=>e.data))}async quit(e=!1){try{await this._close(e),await this.wire.sendAction("destroy-application",{force:e,...this.identity})}catch(e){if(!["Remote connection has closed","Could not locate the requested application"].some((t=>e.message.includes(t))))throw e}}async _close(e=!1){try{await this.wire.sendAction("close-application",{force:e,...this.identity})}catch(e){if(!e.message.includes("Remote connection has closed"))throw e}}close(e=!1){return console.warn("Deprecation Warning: Application.close is deprecated Please use Application.quit"),this.wire.sendAction("application-close",this.identity).catch((e=>{})),this._close(e)}getChildWindows(){return this.wire.sendAction("get-child-windows",this.identity).then((({payload:e})=>{const t=[];return e.data.forEach((e=>{t.push({uuid:this.identity.uuid,name:e})})),this.windowListFromIdentityList(t)}))}getManifest(){return this.wire.sendAction("get-application-manifest",this.identity).then((({payload:e})=>e.data))}getParentUuid(){return this.wire.sendAction("get-parent-application",this.identity).then((({payload:e})=>e.data))}getShortcuts(){return this.wire.sendAction("get-shortcuts",this.identity).then((({payload:e})=>e.data))}async getViews(){const{payload:e}=await this.wire.sendAction("application-get-views",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}getZoomLevel(){return this.wire.sendAction("get-application-zoom-level",this.identity).then((({payload:e})=>e.data))}getWindow(){return this.wire.sendAction("application-get-window",this.identity).catch((e=>{})),Promise.resolve(this.window)}registerUser(e,t){return this.wire.sendAction("register-user",{userName:e,appName:t,...this.identity}).then((()=>{}))}removeTrayIcon(){return this.wire.sendAction("remove-tray-icon",this.identity).then((()=>{}))}restart(){return this.wire.sendAction("restart-application",this.identity).then((()=>{}))}run(){return console.warn("Deprecation Warning: Application.run is deprecated Please use fin.Application.start"),this.wire.sendAction("application-run",this.identity).catch((e=>{})),this._run()}_run(e={}){return this.wire.sendAction("run-application",{manifestUrl:this._manifestUrl,opts:e,...this.identity}).then((()=>{}))}scheduleRestart(){return this.wire.sendAction("relaunch-on-close",this.identity).then((()=>{}))}async sendApplicationLog(){const{payload:e}=await this.wire.sendAction("send-application-log",this.identity);return e.data}async setJumpList(e){await this.wire.sendAction("set-jump-list",{config:e,...this.identity})}setTrayIcon(e){return this.wire.sendAction("set-tray-icon",{enabledIcon:e,...this.identity}).then((()=>{}))}setShortcuts(e){return this.wire.sendAction("set-shortcuts",{data:e,...this.identity}).then((()=>{}))}async setShortcutQueryParams(e){await this.wire.sendAction("set-shortcut-query-args",{data:e,...this.identity})}setZoomLevel(e){return this.wire.sendAction("set-application-zoom-level",{level:e,...this.identity}).then((()=>{}))}async setAppLogUsername(e){await this.wire.sendAction("set-app-log-username",{data:e,...this.identity})}getTrayIconInfo(){return this.wire.sendAction("get-tray-icon-info",this.identity).then((({payload:e})=>e.data))}hasTrayIcon(){return this.wire.sendAction("has-tray-icon",this.identity).then((({payload:e})=>e.data))}terminate(){return this.wire.sendAction("terminate-application",this.identity).then((()=>{}))}wait(){return this.wire.sendAction("wait-for-hung-application",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction("get-info",this.identity).then((({payload:e})=>e.data))}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction("application-get-process-info",this.identity);return e}async setFileDownloadLocation(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t};await this.wire.sendAction("set-file-download-location",{...n,downloadLocation:e})}async getFileDownloadLocation(){const{payload:{data:e}}=await this.wire.sendAction("get-file-download-location",this.identity);return e}async showTrayIconPopupMenu(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t},{payload:i}=await this.wire.sendAction("show-tray-icon-popup-menu",{...n,options:e});return i.data}async closeTrayIconPopupMenu(){const{name:e}=this.wire.me,t={uuid:this.identity.uuid,name:e};await this.wire.sendAction("close-tray-icon-popup-menu",{...t})}}return j.Application=i,j}function Z(){return q||(q=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(function(){if(K)return F;K=1,Object.defineProperty(F,"__esModule",{value:!0}),F.ApplicationModule=void 0;const e=d,t=O,n=Y();class i extends e.Base{async wrap(e){this.wire.sendAction("wrap-application").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}wrapSync(e){this.wire.sendAction("wrap-application-sync").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}async _create(e){return void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&void 0===e.isPlatformController&&(e.autoShow=!0),await this.wire.sendAction("create-application",e),this.wrap({uuid:e.uuid})}create(e){return console.warn("Deprecation Warning: fin.Application.create is deprecated. Please use fin.Application.start"),this.wire.sendAction("application-create").catch((e=>{})),this._create(e)}async start(e){this.wire.sendAction("start-application").catch((e=>{}));const t=await this._create(e);return await this.wire.sendAction("run-application",{uuid:e.uuid}),t}async startManyManifests(e,t){return this.wire.sendAction("run-applications",{applications:e,opts:t}).then((()=>{}))}getCurrent(){return this.wire.sendAction("get-current-application").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction("get-current-application-sync").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}async startFromManifest(e,t){this.wire.sendAction("application-start-from-manifest").catch((e=>{}));const n=await this._createFromManifest(e);return await n._run(t),n}createFromManifest(e){return console.warn("Deprecation Warning: fin.Application.createFromManifest is deprecated. Please use fin.Application.startFromManifest"),this.wire.sendAction("application-create-from-manifest").catch((e=>{})),this._createFromManifest(e)}_createFromManifest(e){return this.wire.sendAction("get-application-manifest",{manifestUrl:e}).then((({payload:e})=>{const t=e.data.platform?e.data.platform.uuid:e.data.startup_app.uuid;return this.wrap({uuid:t})})).then((t=>(t._manifestUrl=e,t)))}}return F.ApplicationModule=i,F}(),e),n(Y(),e)}(R)),R}H.WebContents=D;var Q={};Object.defineProperty(Q,"__esModule",{value:!0}),Q.promisifySubscription=void 0;var X,ee,te;function ne(){if(X)return S;X=1,Object.defineProperty(S,"__esModule",{value:!0}),S._Window=void 0;const e=Z(),t=H,n=J(),i=T,r=Q;class o extends t.WebContents{constructor(e,t){super(e,t,"window")}async createWindow(e){this.wire.sendAction("window-create-window",this.identity).catch((e=>{}));const t=await(0,r.promisifySubscription)(this,"fire-constructor-callback");void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&(e.autoShow=!0),(0,i.handleDeprecatedWarnings)(e);const n=this.wire.environment.createChildContent({entityType:"window",options:e}),[o]=await Promise.all([t.getValue(),n]);let s;const{success:a}=o,c=o.data,{message:d}=c;s=a?{httpResponseCode:c.httpResponseCode,apiInjected:c.apiInjected}:{message:c.message,networkErrorCode:c.networkErrorCode,stack:c.stack};const h={message:d,cbPayload:s,success:a};try{this.getWebWindow().fin.__internal_.openerSuccessCBCalled()}catch(e){}return h.success?this:Promise.reject(h)}getAllFrames(){return this.wire.sendAction("get-all-frames",this.identity).then((({payload:e})=>e.data))}getBounds(){return this.wire.sendAction("get-window-bounds",this.identity).then((({payload:e})=>e.data))}center(){return this.wire.sendAction("center-window",this.identity).then((()=>{}))}blur(){return this.wire.sendAction("blur-window",this.identity).then((()=>{}))}bringToFront(){return this.wire.sendAction("bring-window-to-front",this.identity).then((()=>{}))}animate(e,t){return this.wire.sendAction("animate-window",{transitions:e,options:t,...this.identity}).then((()=>{}))}hide(){return this.wire.sendAction("hide-window",this.identity).then((()=>{}))}close(e=!1){return this.wire.sendAction("close-window",{force:e,...this.identity}).then((()=>{Object.setPrototypeOf(this,null)}))}focusedWebViewWasChanged(){return this.wire.sendAction("focused-webview-changed",this.identity).then((()=>{}))}getNativeId(){return this.wire.sendAction("get-window-native-id",this.identity).then((({payload:e})=>e.data))}async getCurrentViews(){const{payload:e}=await this.wire.sendAction("window-get-views",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}disableFrame(){return console.warn("Function is deprecated; use disableUserMovement instead."),this.wire.sendAction("disable-window-frame",this.identity).then((()=>{}))}disableUserMovement(){return this.wire.sendAction("disable-window-frame",this.identity).then((()=>{}))}enableFrame(){return console.warn("Function is deprecated; use enableUserMovement instead."),this.wire.sendAction("enable-window-frame",this.identity).then((()=>{}))}enableUserMovement(){return this.wire.sendAction("enable-window-frame",this.identity).then((()=>{}))}flash(){return this.wire.sendAction("flash-window",this.identity).then((()=>{}))}stopFlashing(){return this.wire.sendAction("stop-flash-window",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction("get-window-info",this.identity).then((({payload:e})=>e.data))}async getLayout(e){this.wire.sendAction("window-get-layout",this.identity).catch((e=>{}));const t=await this.getOptions();if(!t.layout&&!t.layoutSnapshot)throw new Error("Window does not have a Layout");return this.fin.Platform.Layout.wrap(e??this.identity)}getOptions(){return this.wire.sendAction("get-window-options",this.identity).then((({payload:e})=>e.data))}getParentApplication(){return this.wire.sendAction("window-get-parent-application",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity))}getParentWindow(){return this.wire.sendAction("window-get-parent-window",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity)).then((e=>e.getWindow()))}async getSnapshot(e){const t={area:e,...this.identity};console.warn("Window.getSnapshot has been deprecated, please use Window.capturePage");return(await this.wire.sendAction("get-window-snapshot",t)).payload.data}getState(){return this.wire.sendAction("get-window-state",this.identity).then((({payload:e})=>e.data))}getWebWindow(){return this.wire.sendAction("window-get-web-window",this.identity).catch((e=>{})),this.wire.environment.getWebWindow(this.identity)}isMainWindow(){return this.wire.sendAction("window-is-main-window",this.identity).catch((e=>{})),this.me.uuid===this.me.name}isShowing(){return this.wire.sendAction("is-window-showing",this.identity).then((({payload:e})=>e.data))}maximize(){return this.wire.sendAction("maximize-window",this.identity).then((()=>{}))}minimize(){return this.wire.sendAction("minimize-window",this.identity).then((()=>{}))}moveBy(e,t,n){return this.wire.sendAction("move-window-by",{deltaLeft:e,deltaTop:t,positioningOptions:n,...this.identity}).then((()=>{}))}moveTo(e,t,n){return this.wire.sendAction("move-window",{left:e,top:t,positioningOptions:n,...this.identity}).then((()=>{}))}resizeBy(e,t,n,i){return this.wire.sendAction("resize-window-by",{deltaWidth:Math.floor(e),deltaHeight:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}resizeTo(e,t,n,i){return this.wire.sendAction("resize-window",{width:Math.floor(e),height:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}restore(){return this.wire.sendAction("restore-window",this.identity).then((()=>{}))}setAsForeground(){return this.wire.sendAction("set-foreground-window",this.identity).then((()=>{}))}setBounds(e,t){return this.wire.sendAction("set-window-bounds",{...e,...this.identity,positioningOptions:t}).then((()=>{}))}show(e=!1){return this.wire.sendAction("show-window",{force:e,...this.identity}).then((()=>{}))}showAt(e,t,n=!1){return this.wire.sendAction("show-at-window",{force:n,left:Math.floor(e),top:Math.floor(t),...this.identity}).then((()=>{}))}updateOptions(e){return this.wire.sendAction("update-window-options",{options:e,...this.identity}).then((()=>{}))}authenticate(e,t){return this.wire.sendAction("window-authenticate",{userName:e,password:t,...this.identity}).then((()=>{}))}async showPopupMenu(e){const{payload:t}=await this.wire.sendAction("show-popup-menu",{options:e,...this.identity});return t.data}async closePopupMenu(){return this.wire.sendAction("close-popup-menu",{...this.identity}).then((()=>{}))}async dispatchPopupResult(e){this.wire.sendAction("window-dispatch-popup-result",this.identity).catch((e=>{})),await this.wire.sendAction("dispatch-popup-result",{data:e,...this.identity})}async print(e={content:"self"}){switch(e.content){case void 0:case"self":return super.print(e);case"screenshot":return this.wire.sendAction("print-screenshot",this.identity).then((()=>{}));case"views":return this.wire.sendAction("print-views",{...this.identity,options:e}).then((()=>{}));default:return}}}return S._Window=o,S}function ie(){return te||(te=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(function(){if(ee)return _;ee=1,Object.defineProperty(_,"__esModule",{value:!0}),_._WindowModule=void 0;const e=d,t=O,n=ne();class i extends e.Base{async wrap(e){this.wire.sendAction("window-wrap").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}wrapSync(e){this.wire.sendAction("window-wrap-sync").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}create(e){return this.wire.sendAction("create-window").catch((e=>{})),new n._Window(this.wire,{uuid:this.me.uuid,name:e.name}).createWindow(e)}getCurrent(){if(this.wire.sendAction("get-current-window").catch((e=>{})),!this.wire.me.isWindow)throw new Error("You are not in a Window context");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction("get-current-window-sync").catch((e=>{})),!this.wire.me.isWindow)throw new Error("You are not in a Window context");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return _._WindowModule=i,_}(),e),n(ne(),e)}(M)),M}Q.promisifySubscription=async(e,t,n=(()=>!0),i)=>{let r,o,s;const a=new Promise(((e,t)=>{r=e,o=t})),c=e=>{n(e)&&(clearTimeout(s),r(e))};return await e.on(t,c),i&&(s=setTimeout((()=>o(new Error("event timed out"))),i)),a.finally((()=>{e.removeListener(t,c).catch((()=>null))})),{getValue:()=>a}},Object.defineProperty(c,"__esModule",{value:!0}),c.System=void 0;const re=d,oe=g,se=ie(),ae=t;class ce extends re.EmitterBase{constructor(e){super(e,"system")}sendExternalProcessRequest(e,t){return new Promise(((n,i)=>{const r="external-process-exited";let o,s,a,c;"function"==typeof t.listener&&(a=e=>{const n=e||{};s={topic:"exited",uuid:n.processUuid||"",exitCode:n.exitCode||0},o===e.processUuid&&(t.listener(s),c.removeListener(r,a))},this.wire.me.name||(this.wire.me.name=this.wire.me.uuid),c=new se._Window(this.wire,this.wire.me),c.on(r,a)),this.wire.sendAction(e,t).then((({payload:e})=>{o=e.data.uuid,n(e.data),s&&o===s.uuid&&(t.listener(s),c.removeListener(r,a))})).catch((e=>{c&&c.removeListener(r,a),i(e)}))}))}getVersion(){return this.wire.sendAction("get-version").then((({payload:e})=>e.data))}clearCache(e){return this.wire.sendAction("clear-cache",e).then((()=>{}))}deleteCacheOnExit(){return this.wire.sendAction("delete-cache-request").then((()=>{}))}exit(){return this.wire.sendAction("exit-desktop").then((()=>{}))}async fetchManifest(e){const{payload:{data:t}}=await this.wire.sendAction("fetch-manifest",{manifestUrl:e});return t}flushCookieStore(){return this.wire.sendAction("flush-cookie-store").then((()=>{}))}getAllWindows(){return this.wire.sendAction("get-all-windows").then((({payload:e})=>e.data))}getAllApplications(){return this.wire.sendAction("get-all-applications").then((({payload:e})=>e.data))}getCommandLineArguments(){return this.wire.sendAction("get-command-line-arguments").then((({payload:e})=>e.data))}async getCrashReporterState(){const{payload:{data:{diagnosticMode:e,isRunning:t}}}=await this.wire.sendAction("get-crash-reporter-state");return console.warn("diagnosticMode property is deprecated. It will be removed in a future version"),{diagnosticMode:e,diagnosticsMode:e,isRunning:t}}async startCrashReporter(e){const t=e,n={...t,diagnosticMode:t.diagnosticsMode||t.diagnosticMode},{payload:{data:{diagnosticMode:i,isRunning:r}}}=await this.wire.sendAction("start-crash-reporter",n);return{diagnosticMode:i,diagnosticsMode:i,isRunning:r}}getUniqueUserId(){return this.wire.sendAction("get-unique-user-id").then((({payload:e})=>e.data))}getEntityInfo(e,t){return this.wire.sendAction("get-entity-info",{uuid:e,name:t}).then((({payload:e})=>e.data))}getEnvironmentVariable(e){return this.wire.sendAction("get-environment-variable",{environmentVariables:e}).then((({payload:e})=>e.data))}getFocusedWindow(){return this.wire.sendAction("get-focused-window").then((({payload:e})=>e.data))}async isAppCertified(e){const{payload:{data:{certifiedInfo:t}}}=await this.wire.sendAction("is-app-certified",{manifestUrl:e});return t}getInstalledRuntimes(){return this.wire.sendAction("get-installed-runtimes").then((({payload:e})=>e.data.runtimes))}async getInstalledApps(){const{payload:{data:{installedApps:e}}}=await this.wire.sendAction("get-installed-apps");return e}getLog(e){return this.wire.sendAction("view-log",e).then((({payload:e})=>e.data))}getMachineId(){return this.wire.sendAction("get-machine-id").then((({payload:e})=>e.data))}getMinLogLevel(){return this.wire.sendAction("get-min-log-level").then((({payload:e})=>e.data))}getLogList(){return this.wire.sendAction("list-logs").then((({payload:e})=>e.data))}getMonitorInfo(){return this.wire.sendAction("get-monitor-info").then((({payload:e})=>e.data))}getMousePosition(){return this.wire.sendAction("get-mouse-position").then((({payload:e})=>e.data))}getProcessList(){return console.warn("System.getProcessList has been deprecated. Please consider using our new process APIs: Window.getProcessInfo, View.getProcessInfo, Application.getProcessInfo, System.getAllProcessInfo"),this.wire.sendAction("process-snapshot").then((({payload:e})=>e.data))}async getAllProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction("get-all-process-info",this.identity);return e}getProxySettings(){return this.wire.sendAction("get-proxy-settings").then((({payload:e})=>e.data))}getRuntimeInfo(){return this.wire.sendAction("get-runtime-info").then((({payload:e})=>e.data))}getRvmInfo(){return this.wire.sendAction("get-rvm-info").then((({payload:e})=>e.data))}getHostSpecs(){return this.wire.sendAction("get-host-specs").then((({payload:e})=>e.data))}getOSInfo(){return this.wire.sendAction("get-os-info").then((({payload:e})=>e.data))}launchExternalProcess(e){return this.sendExternalProcessRequest("launch-external-process",e)}monitorExternalProcess(e){return this.sendExternalProcessRequest("monitor-external-process",e)}log(e,t){return this.wire.sendAction("write-to-log",{level:e,message:t}).then((()=>{}))}openUrlWithBrowser(e){return this.wire.sendAction("open-url-with-browser",{url:e}).then((()=>{}))}async registerCustomProtocol(e){if("object"!=typeof e)throw new Error("Must provide an object with a `protocolName` property having a string value.");await this.wire.sendAction("register-custom-protocol",e)}async unregisterCustomProtocol(e){await this.wire.sendAction("unregister-custom-protocol",{protocolName:e})}async getCustomProtocolState(e){return this.wire.sendAction("get-custom-protocol-state",{protocolName:e}).then((({payload:e})=>e.data))}releaseExternalProcess(e){return this.wire.sendAction("release-external-process",{uuid:e}).then((()=>{}))}showDeveloperTools(e){return this.wire.sendAction("show-developer-tools",e).then((()=>{}))}terminateExternalProcess(e){return this.wire.sendAction("terminate-external-process",e).then((()=>{}))}updateProxySettings(e){return this.wire.sendAction("update-proxy",e).then((()=>{}))}async downloadAsset(e,t){const n=()=>{};let i=n,r=n;const o=new Promise(((e,t)=>{i=e,r=t}));if("openfin"!==this.wire.environment.type)throw new oe.NotSupportedError("downloadAsset only supported in an OpenFin Render process");const s=oe.RuntimeError.getCallSite(),a=this.wire.environment.getNextMessageId().toString(),c=`asset-download-progress-${a}`,d=`asset-download-error-${a}`,h=`asset-download-complete-${a}`,l=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},u=()=>{this.removeListener(c,l)};await Promise.all([this.on(c,l),this.once(d,(e=>{u();const{reason:t,err:n}=e;r(new oe.RuntimeError({reason:t,error:n},s))})),this.once(h,(()=>{u(),i()}))]);const p=Object.assign(e,{downloadId:a});return await this.wire.sendAction("download-asset",p).catch((e=>{throw u(),e})),o}downloadRuntime(e,t){const n=oe.RuntimeError.getCallSite();return new Promise(((i,r)=>{if("openfin"!==this.wire.environment.type)return void r(new oe.NotSupportedError("downloadRuntime only supported in an OpenFin Render process"));const o=this.wire.environment.getNextMessageId().toString(),s=`runtime-download-progress-${o}`,a=`runtime-download-error-${o}`,c=`runtime-download-complete-${o}`,d=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},h=()=>{this.removeListener(s,d)};this.on(s,d),this.once(a,(e=>{h();const{reason:t,err:i}=e;r(new oe.RuntimeError({reason:t,error:i},n))})),this.once(c,(()=>{h(),i()}));const l=Object.assign(e,{downloadId:o});this.wire.sendAction("download-runtime",l).catch((e=>{h(),r(e)}))}))}downloadPreloadScripts(e){return this.wire.sendAction("download-preload-scripts",{scripts:e}).then((({payload:e})=>e.data))}getAllExternalApplications(){return this.wire.sendAction("get-all-external-applications").then((({payload:e})=>e.data))}getAppAssetInfo(e){return this.wire.sendAction("get-app-asset-info",e).then((({payload:e})=>e.data))}getCookies(e){const t=this.wire.environment.getUrl(),n=Object.assign(e,{url:t});return this.wire.sendAction("get-cookies",n).then((({payload:e})=>e.data))}setMinLogLevel(e){return this.wire.sendAction("set-min-log-level",{level:e}).then((()=>{}))}resolveUuid(e){return this.wire.sendAction("resolve-uuid",{entityKey:e}).then((({payload:e})=>e.data))}executeOnRemote(e,t){return t.requestingIdentity=e,this.wire.ferryAction(t)}readRegistryValue(e,t,n){return this.wire.sendAction("read-registry-value",{rootKey:e,subkey:t,value:n}).then((({payload:e})=>e.data))}registerExternalConnection(e){return this.wire.sendAction("register-external-connection",{uuid:e}).then((({payload:e})=>e.data))}async getServiceConfiguration(e){if("string"!=typeof e.name)throw new Error("Must provide an object with a `name` property having a string value");const{name:t}=e;return this.wire.sendAction("get-service-configuration",{name:t}).then((({payload:e})=>e.data))}async getSystemAppConfig(e){if("string"!=typeof e)throw new Error("Must provide a string value for name of system app");return this.wire.sendAction("get-system-app-configuration",{name:e}).then((({payload:e})=>e.data))}async registerShutdownHandler(e){this.wire.sendAction("system-register-shutdown-handler").catch((e=>{}));const{uuid:t,name:n}=this.wire.me;this.on("system-shutdown",(i=>{e({proceed:()=>{this.wire.environment.raiseEvent("application/system-shutdown-handled",{uuid:t,name:n,topic:"application"})}})}))}runRvmHealthCheck(){return this.wire.sendAction("run-rvm-health-check").then((({payload:e})=>e.data))}async launchManifest(e,t={}){const{subscribe:n,...i}=t,r=i;if(n){const e=new ae.EventEmitter;n(e);const t="app-version-progress",i="runtime-status",o="app-version-complete",s="app-version-error",a=this.wire.environment.getNextMessageId().toString();r.appVersionId=a;const c=[o,t,i,s],d=e=>{const{appVersionId:t,topic:n,type:i,...r}=e;return{...r,type:c.find((e=>i.includes(e)))}},h=t=>{const n=d(t);e.emit(n.type,n)},l=()=>{this.removeListener(`${t}.${a}`,h),this.removeListener(`${i}.${a}`,h),this.removeListener(`${o}.${a}`,h),this.removeListener(`${s}.${a}`,h),this.removeListener(`${o}.${a}`,l),this.removeListener(`${s}.${a}`,l)};await Promise.all([this.on(`${t}.${a}`,h),this.on(`${i}.${a}`,h),this.once(`${o}.${a}`,h),this.once(`${s}.${a}`,h),this.once(`${o}.${a}`,l),this.once(`${s}.${a}`,l)])}return(await this.wire.sendAction("launch-manifest",{manifestUrl:e,opts:r})).payload.data.manifest}async queryPermissionForCurrentContext(e){const t={uuid:this.wire.me.uuid,name:this.wire.me.name};return(await this.wire.sendAction("query-permission-for-current-context",{apiName:e,identity:t})).payload.data}async enableNativeWindowIntegrationProvider(e){const{payload:t}=await this.wire.sendAction("enable-native-window-integration-provider",{permissions:e});return t.data}async registerUsage({data:e,type:t}){await this.wire.sendAction("register-usage",{data:e,type:t})}async getPrinters(){const{payload:e}=await this.wire.sendAction("system-get-printers");return e.data}async updateProcessLoggingOptions(e){await this.wire.sendAction("system-update-process-logging-options",{options:e})}async getDomainSettings(){const{payload:{data:e}}=await this.wire.sendAction("get-domain-settings",this.identity);return e}async setDomainSettings(e){await this.wire.sendAction("set-domain-settings",{domainSettings:e,...this.identity})}async refreshExtensions(){const{payload:e}=await this.wire.sendAction("refresh-extensions");return e.data}async getInstalledExtensions(){const{payload:e}=await this.wire.sendAction("get-installed-extensions");return e.data}}c.System=ce;var de={},he={};Object.defineProperty(he,"__esModule",{value:!0}),he.RefCounter=void 0;he.RefCounter=class{constructor(){this.topicRefMap=new Map}incRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t+1;n=i,this.topicRefMap.set(e,i)}else this.topicRefMap.set(e,1),n=1;return n}decRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t-1;this.topicRefMap.set(e,i),n=i}else n=-1;return n}actOnFirst(e,t,n){return 1===this.incRefCount(e)?t():n()}actOnLast(e,t,n){return 0===this.decRefCount(e)?t():n()}};var le={},ue={},pe={};Object.defineProperty(pe,"__esModule",{value:!0}),pe.ChannelBase=pe.ProtectedItems=void 0;const we=e=>async(t,n,i)=>{const r=await e(t,n,i);return void 0===r?n:r};pe.ProtectedItems=class{constructor(e,t){this.providerIdentity=e,this.close=t}};class ye{static defaultAction(e){throw new Error(`No action registered at target for ${e}`)}constructor(){this.subscriptions=new Map}async processAction(e,t,n){try{const i=this.subscriptions.has(e)?this.subscriptions.get(e):(t,n)=>(this.defaultAction??ye.defaultAction)(e,t,n),r=this.preAction?await this.preAction(e,t,n):t,o=await i(r,n);return this.postAction?await this.postAction(e,o,n):o}catch(t){if(this.errorMiddleware)return this.errorMiddleware(e,t,n);throw t}}beforeAction(e){if(this.preAction)throw new Error("Already registered beforeAction middleware");this.preAction=we(e)}onError(e){if(this.errorMiddleware)throw new Error("Already registered error middleware");this.errorMiddleware=e}afterAction(e){if(this.postAction)throw new Error("Already registered afterAction middleware");this.postAction=we(e)}remove(e){this.subscriptions.delete(e)}setDefaultAction(e){if(this.defaultAction)throw new Error("default action can only be set once");this.defaultAction=e}register(e,t){if(this.subscriptions.has(e))throw new Error(`Subscription already registered for action: ${e}. Unsubscribe before adding new subscription`);return this.subscriptions.set(e,t),!0}}pe.ChannelBase=ye;var fe,ge,me,ve=s&&s.__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)},Ce=s&&s.__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};Object.defineProperty(ue,"__esModule",{value:!0}),ue.ChannelClient=void 0;const be=pe,Ie=new Map;class Ee extends be.ChannelBase{static closeChannelByEndpointId(e){const t=Ie.get(e);t&&ve(t,me,"f").call(t)}static handleProviderDisconnect(e){for(const t of Ie.values())t.providerIdentity.channelId===e.channelId&&(t.disconnectListener(e),ve(t,me,"f").call(t))}constructor(e,t,n){super(),fe.set(this,void 0),ge.set(this,void 0),this.processAction=(e,t,n)=>super.processAction(e,t,n),me.set(this,(()=>{Ie.delete(this.endpointId),ve(this,ge,"f").close()})),Ce(this,fe,new be.ProtectedItems(e,t),"f"),this.disconnectListener=()=>{},this.endpointId=e.endpointId,Ce(this,ge,n,"f"),Ie.set(this.endpointId,this),n.receive(this.processAction)}get providerIdentity(){return ve(this,fe,"f").providerIdentity}async dispatch(e,t){if(ve(this,ge,"f").isEndpointConnected(this.providerIdentity.channelId))return ve(this,ge,"f").send(this.providerIdentity.channelId,e,t);throw new Error("The client you are trying to dispatch from is disconnected from the target provider.")}onDisconnection(e){this.disconnectListener=t=>{try{e(t)}catch(e){throw new Error(`Error while calling the onDisconnection callback: ${e.message}`)}finally{this.disconnectListener=()=>{}}}}async disconnect(){await this.sendDisconnectAction(),ve(this,me,"f").call(this)}async sendDisconnectAction(){const e=ve(this,fe,"f");await e.close()}static async wireClose(e,t,n){const{channelName:i,uuid:r,name:o}=t;await e.sendAction("disconnect-from-channel",{channelName:i,uuid:r,name:o,endpointId:n})}}ue.ChannelClient=Ee,fe=new WeakMap,ge=new WeakMap,me=new WeakMap;var xe={},Ae={};Object.defineProperty(Ae,"__esModule",{value:!0}),Ae.exhaustiveCheck=void 0,Ae.exhaustiveCheck=function(e,t){throw new Error(`Unsupported value: ${e}${t?`\n Supported values are: ${t.join("")}`:""}`)};var Pe,Me,_e,Oe={},Se=s&&s.__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},Re=s&&s.__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)};Object.defineProperty(Oe,"__esModule",{value:!0}),Oe.ClassicInfo=Oe.ClassicStrategy=void 0;Oe.ClassicStrategy=class{constructor(e,t,n,i){this.messageReceiver=t,this.endpointId=n,this.providerIdentity=i,Pe.set(this,void 0),Me.set(this,new Map),_e.set(this,new Map),this.send=async(e,t,n)=>{const i=Re(this,Me,"f").get(e);if(!i)throw new Error(`Could not locate routing info for endpoint ${e}`);const r={...i};r.isLocalEndpointId&&delete r.endpointId,delete r.isLocalEndpointId;const o=Re(this,Pe,"f").sendAction("send-channel-message",{...r,providerIdentity:this.providerIdentity,action:t,payload:n});Re(this,_e,"f").get(e)?.add(o);return(await o.catch((e=>{throw new Error(e.message)})).finally((()=>{Re(this,_e,"f").get(e)?.delete(o)}))).payload.data.result},this.close=async()=>{this.messageReceiver.removeEndpoint(this.providerIdentity.channelId,this.endpointId),[...Re(this,Me,"f").keys()].forEach((e=>this.closeEndpoint(e))),Se(this,Me,new Map,"f")},Se(this,Pe,e,"f")}onEndpointDisconnect(e,t){}receive(e){this.messageReceiver.addEndpoint(e,this.providerIdentity.channelId,this.endpointId)}async closeEndpoint(e){const t=Re(this,Me,"f").get(e);Re(this,Me,"f").delete(e);const n=Re(this,_e,"f").get(e);n?.forEach((n=>{const i=`Channel connection with identity uuid: ${t?.uuid} / name: ${t?.name} / endpointId: ${e} no longer connected.`;n.cancel(new Error(i))}))}isEndpointConnected(e){return Re(this,Me,"f").has(e)}addEndpoint(e,t){Re(this,Me,"f").set(e,t.endpointIdentity),Re(this,_e,"f").set(e,new Set)}isValidEndpointPayload(e){return"string"==typeof e?.endpointIdentity?.endpointId||"string"==typeof e?.endpointIdentity?.channelId}},Pe=new WeakMap,Me=new WeakMap,_e=new WeakMap,Oe.ClassicInfo={version:5,minimumVersion:0,type:"classic"};var Fe={},je={},ke={};Object.defineProperty(ke,"__esModule",{value:!0}),ke.errorToPOJO=void 0,ke.errorToPOJO=function(e){return{stack:e.stack,name:e.name,message:e.message,toString:()=>e.stack||e.toString()}};var Le,Te,$e=s&&s.__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)},Be=s&&s.__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};Object.defineProperty(je,"__esModule",{value:!0}),je.RTCEndpoint=void 0;const Ge=ke;je.RTCEndpoint=class{static isValidEndpointPayload(e){const t=e=>"object"==typeof e&&null!==e;return t(e)&&t(e.endpointIdentity)&&t(e.rtc)&&"string"==typeof e.endpointIdentity.endpointId}constructor({rtc:e,endpointIdentity:t}){this.responseMap=new Map,Le.set(this,null),Te.set(this,void 0),this.connectionStateChangeHandler=e=>{"connected"!==this.rtc.rtcClient.connectionState&&(this.rtc.rtcClient.removeEventListener("connectionstatechange",this.connectionStateChangeHandler),this.close(),$e(this,Te,"f")&&$e(this,Te,"f").call(this))},this.send=async(e,t)=>{const n=`message-${Math.random()}`,i=new Promise(((e,t)=>{this.responseMap.set(n,{resolve:e,reject:t})}));return this.rtc.channels.request.send(JSON.stringify({action:e,payload:t,messageId:n})),i},this.close=()=>{this.responseMap.forEach((e=>e.reject("Connection has closed."))),this.responseMap=new Map,this.rtc.channels.request.close(),this.rtc.channels.response.close(),this.rtc.rtcClient.close()},this.rtc=e,this.endpointIdentity=t,this.rtc.channels.response.addEventListener("message",(e=>{let{data:t}=e;e.data instanceof ArrayBuffer&&(t=(new TextDecoder).decode(e.data));const{messageId:n,payload:i,success:r,error:o}=JSON.parse(t),{resolve:s,reject:a}=this.responseMap.get(n)??{};s&&a?(this.responseMap.delete(n),r?s(i):a(o)):(console.log("Could not find id in responseMap."),console.log(e))})),this.rtc.channels.request.addEventListener("message",(async e=>{let{data:n}=e;e.data instanceof ArrayBuffer&&(n=(new TextDecoder).decode(e.data));const{messageId:i,action:r,payload:o}=JSON.parse(n);if($e(this,Le,"f"))try{const e=await $e(this,Le,"f").call(this,r,o,t);this.rtc.channels.response.send(JSON.stringify({messageId:i,payload:e,success:!0}))}catch(e){"open"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,error:(0,Ge.errorToPOJO)(e),success:!1}))}else"open"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,success:!1,error:"Connection not ready."}))})),this.rtc.rtcClient.addEventListener("connectionstatechange",this.connectionStateChangeHandler),Object.values(this.rtc.channels).forEach((e=>{e.onclose=e=>{[...this.responseMap.values()].forEach((e=>e.reject(new Error("RTCDataChannel closed unexpectedly, this is most commonly caused by message size. Note: RTC Channels have a message size limit of ~255kB.")))),this.close(),$e(this,Te,"f")&&$e(this,Te,"f").call(this)}}))}onDisconnect(e){if($e(this,Te,"f"))throw new Error("RTCEndpoint disconnectListener cannot be set twice.");Be(this,Te,e,"f")}receive(e){if($e(this,Le,"f"))throw new Error("You have already set a listener for this RTC Endpoint.");Be(this,Le,e,"f")}get connected(){return"connected"===this.rtc.rtcClient.connectionState}},Le=new WeakMap,Te=new WeakMap;var We,He,Ne,De={},Ue=s&&s.__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)},Ve=s&&s.__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};Object.defineProperty(De,"__esModule",{value:!0}),De.EndpointStrategy=void 0;De.EndpointStrategy=class{constructor(e,t,n){this.EndpointType=e,this.StrategyName=n,We.set(this,null),He.set(this,new Map),Ne.set(this,!0),this.send=async(e,t,n)=>this.getEndpointById(e).send(t,n),this.close=async()=>{Ue(this,Ne,"f")&&(Ue(this,He,"f").forEach((e=>e.close())),Ve(this,He,new Map,"f")),Ve(this,Ne,!1,"f")},this.isValidEndpointPayload=t}onEndpointDisconnect(e,t){this.getEndpointById(e).onDisconnect(t)}receive(e){if(Ue(this,We,"f"))throw new Error(`You have already set a listener for this ${this.StrategyName} Strategy`);Ve(this,We,e,"f"),Ue(this,He,"f").forEach((e=>e.receive(Ue(this,We,"f"))))}getEndpointById(e){const t=Ue(this,He,"f").get(e);if(!t)throw new Error(`Client with endpoint id ${e} is not connected`);return t}get connected(){return Ue(this,Ne,"f")}isEndpointConnected(e){return Ue(this,He,"f").has(e)}addEndpoint(e,t){if(!Ue(this,Ne,"f"))return void console.warn(`Adding endpoint to disconnected ${this.StrategyName} Strategy`);const n=new this.EndpointType(t);Ue(this,We,"f")&&n.receive(Ue(this,We,"f")),Ue(this,He,"f").set(e,n)}async closeEndpoint(e){Ue(this,He,"f").delete(e)}},We=new WeakMap,He=new WeakMap,Ne=new WeakMap,Object.defineProperty(Fe,"__esModule",{value:!0}),Fe.RTCInfo=Fe.RTCStrategy=void 0;const ze=je,Ke=De;class qe extends Ke.EndpointStrategy{constructor(){super(ze.RTCEndpoint,ze.RTCEndpoint.isValidEndpointPayload,"RTC")}}Fe.RTCStrategy=qe,Fe.RTCInfo={version:2,minimumVersion:0,type:"rtc"};var Je={};Object.defineProperty(Je,"__esModule",{value:!0}),Je.RTCICEManager=void 0;const Ye=d;class Ze extends Ye.EmitterBase{constructor(e){super(e,"channel"),this.ensureChannelOpened=e=>new Promise(((t,n)=>{if("open"===e.readyState)t();else if("connecting"===e.readyState){const n=()=>{e.removeEventListener("open",n),t()};e.addEventListener("open",n)}else n(new Error("This Channel has already closed"))}))}static createDataChannelPromise(e,t){let n;const i=new Promise((e=>{n=e})),r=i=>{const o=()=>{i.channel.removeEventListener("open",o),n(i.channel)};i.channel.label===e&&(i.channel.addEventListener("open",o),t.removeEventListener("datachannel",r))};return t.addEventListener("datachannel",r),i}async listenForProviderIce(e,t){await this.on(this.createProviderEventName(e),t,{timestamp:Date.now()})}async raiseProviderIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createProviderEventName(e)),t)}async listenForClientIce(e,t){await this.on(this.createClientEventName(e),t,{timestamp:Date.now()})}async raiseClientIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createClientEventName(e)),t)}cleanupIceListeners(e){this.removeAllListeners(this.createClientEventName(e)),this.removeAllListeners(this.createProviderEventName(e))}createClientEventName(e){return`ice-client-${e}`}createProviderEventName(e){return`ice-provider-${e}`}createRouteString(e){return`channel/${e}`}createRtcPeer(){return this.wire.environment.getRtcPeer()}async startClientOffer(){const e=Math.random().toString(),t=this.createRtcPeer();t.addEventListener("icecandidate",(async t=>{t.candidate&&await this.raiseClientIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForProviderIce(e,(async e=>{await t.addIceCandidate(e.candidate)}));const n={request:t.createDataChannel("request"),response:t.createDataChannel("response")},i=await t.createOffer();await t.setLocalDescription(i);const r=Promise.all([n.request,n.response].map(this.ensureChannelOpened)).then((()=>{}));return{rtcClient:t,channels:n,offer:i,rtcConnectionId:e,channelsOpened:r}}async finishClientOffer(e,t,n){return await e.setRemoteDescription(t),await n,!0}async createProviderAnswer(e,t){const n=this.createRtcPeer(),i=Ze.createDataChannelPromise("request",n),r=Ze.createDataChannelPromise("response",n);n.addEventListener("icecandidate",(async t=>{t.candidate&&await this.raiseProviderIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForClientIce(e,(async e=>{await n.addIceCandidate(e.candidate)})),await n.setRemoteDescription(t);const o=await n.createAnswer();await n.setLocalDescription(o);const s=Promise.all([i,r]).then((([t,n])=>(this.cleanupIceListeners(e),{request:t,response:n})));return{rtcClient:n,answer:o,channels:s}}}Je.RTCICEManager=Ze;var Qe={},Xe={};function et(e){return[...e.split(".").reverse().entries()].reduce(((e,[t,n])=>e+ +n*1e4**t),0)}function tt(e,t){return et(e)>=et(t)}function nt(e){return e.split("/")[0]}Object.defineProperty(Xe,"__esModule",{value:!0}),Xe.runtimeUuidMeetsMinimumRuntimeVersion=Xe.parseRuntimeUuid=Xe.meetsMinimumRuntimeVersion=void 0,Xe.meetsMinimumRuntimeVersion=tt,Xe.parseRuntimeUuid=nt,Xe.runtimeUuidMeetsMinimumRuntimeVersion=function(e,t){return tt(nt(e),t)};var it,rt,ot,st,at,ct=s&&s.__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)},dt=s&&s.__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};Object.defineProperty(Qe,"__esModule",{value:!0}),Qe.ChannelProvider=void 0;const ht=pe,lt=Xe;class ut extends ht.ChannelBase{get connections(){return[...ct(this,it,"f")]}static handleClientDisconnection(e,t){const n=e.connections.find((e=>e.endpointId===t.endpointId));if(n)ct(e,st,"f").call(e,n);else{e.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name)).forEach(ct(e,st,"f"))}e.disconnectListener(t)}static setProviderRemoval(e,t){ut.removalMap.set(e,t)}constructor(e,t,n){super(),it.set(this,void 0),rt.set(this,void 0),ot.set(this,void 0),st.set(this,(e=>{const t=this.connections.filter((t=>t.endpointId!==e.endpointId));ct(this,ot,"f").closeEndpoint(e.endpointId),dt(this,it,t,"f")})),this.processAction=async(e,t,n)=>(ut.clientIsMultiRuntime(n)&&!(0,lt.runtimeUuidMeetsMinimumRuntimeVersion)(n.runtimeUuid,"18.87.56.0")?this.handleMultiRuntimeLegacyClient(n):this.checkForClientConnection(n),super.processAction(e,t,n)),at.set(this,(()=>{ct(this,ot,"f").close();const e=ut.removalMap.get(this);e&&e()})),dt(this,rt,new ht.ProtectedItems(e,t),"f"),this.connectListener=()=>{},this.disconnectListener=()=>{},dt(this,it,[],"f"),dt(this,ot,n,"f"),n.receive(this.processAction)}dispatch(e,t,n){const i=e.endpointId??this.getEndpointIdForOpenFinId(e,t);return i&&ct(this,ot,"f").isEndpointConnected(i)?ct(this,ot,"f").send(i,t,n):Promise.reject(new Error(`Client connection with identity uuid: ${e.uuid} / name: ${e.name} / endpointId: ${i} no longer connected.`))}async processConnection(e,t){return ct(this,it,"f").push(e),this.connectListener(e,t)}publish(e,t){return this.connections.map((n=>ct(this,ot,"f").send(n.endpointId,e,t)))}onConnection(e){this.connectListener=e}onDisconnection(e){this.disconnectListener=e}async destroy(){const e=ct(this,rt,"f");e.providerIdentity,dt(this,it,[],"f"),await e.close(),ct(this,at,"f").call(this)}async getAllClientInfo(){return this.connections.map((e=>{const{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}=e;return{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}}))}checkForClientConnection(e){if(!this.isClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider.\n Client Identity: {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}isClientConnected(e){return ut.clientIdentityIncludesEndpointId(e)?this.connections.some((t=>t.endpointId===e.endpointId&&t.uuid===e.uuid&&t.name===e.name)):this.isLegacyClientConnected(e)}isLegacyClientConnected(e){return this.connections.some((t=>t.uuid===e.uuid&&t.name===e.name))}handleMultiRuntimeLegacyClient(e){if(!this.isLegacyClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider. Client Identity:\n {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}getEndpointIdForOpenFinId(e,t){const n=this.connections.filter((t=>t.name===e.name&&t.uuid===e.uuid));if(n.length>=2){const n=ct(this,rt,"f"),{uuid:i,name:r}=e,o=n?.providerIdentity.uuid,s=n?.providerIdentity.name;console.warn(`WARNING: Dispatch call may have unintended results. The "to" argument of your dispatch call is missing the\n "endpointId" parameter. The identity you are dispatching to ({uuid: ${i}, name: ${r}})\n has multiple channelClients for this channel. Your dispatched action: (${t}) from the provider:\n ({uuid: ${o}, name: ${s}}) will only be processed by the most recently-created client.`)}return n.pop()?.endpointId}static clientIdentityIncludesEndpointId(e){return void 0!==e.endpointId}static clientIsMultiRuntime(e){return void 0!==e.runtimeUuid}static async wireClose(e,t){await e.sendAction("destroy-channel",{channelName:t})}}Qe.ChannelProvider=ut,it=new WeakMap,rt=new WeakMap,ot=new WeakMap,st=new WeakMap,at=new WeakMap,ut.removalMap=new WeakMap;var pt={};Object.defineProperty(pt,"__esModule",{value:!0}),pt.MessageReceiver=void 0;const wt=ue,yt=d;class ft extends yt.Base{constructor(e){super(e),this.onmessage=e=>"process-channel-message"===e.action&&(this.processChannelMessage(e),!0),this.endpointMap=new Map,this.latestEndpointIdByChannelId=new Map,e.registerMessageHandler(this.onmessage.bind(this))}async processChannelMessage(e){const{senderIdentity:t,providerIdentity:n,action:i,ackToSender:r,payload:o,intendedTargetIdentity:s}=e.payload,a=s.channelId??s.endpointId??this.latestEndpointIdByChannelId.get(n.channelId),c=this.endpointMap.get(a);if(!c)return r.payload.success=!1,r.payload.reason=`Client connection with identity uuid: ${this.wire.me.uuid} / name: ${this.wire.me.name} / endpointId: ${a} no longer connected.`,this.wire.sendRaw(r);try{const e=await c(i,o,t);return r.payload.payload=r.payload.payload||{},r.payload.payload.result=e,this.wire.sendRaw(r)}catch(e){return r.payload.success=!1,r.payload.reason=e.message,this.wire.sendRaw(r)}}addEndpoint(e,t,n){this.endpointMap.set(n,e),t!==n&&this.latestEndpointIdByChannelId.set(t,n)}removeEndpoint(e,t){this.endpointMap.delete(t),this.latestEndpointIdByChannelId.get(e)===t&&this.latestEndpointIdByChannelId.delete(e)}checkForPreviousClientConnection(e){const t=this.latestEndpointIdByChannelId.get(e);t&&(wt.ChannelClient.closeChannelByEndpointId(t),console.warn("You have created a second connection to an older provider. First connection has been removed from the clientMap"),console.warn("If the provider calls publish(), you may receive multiple messages."))}}pt.MessageReceiver=ft;var gt={};Object.defineProperty(gt,"__esModule",{value:!0}),gt.ProtocolManager=void 0;gt.ProtocolManager=class{constructor(e){this.ProtocolsInPreferenceOrder=e,this.DefaultClientProtocols=["classic"],this.DefaultProviderProtocols=["classic"],this.getClientProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultClientProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(", ")}.`);return t},this.getProviderProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultProviderProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(", ")}.`);return t},this.getCompatibleProtocols=(e,t)=>t.supportedProtocols.filter((t=>e.some((e=>e.type===t.type&&t.version>=e.minimumVersion&&e.version>=(t.minimumVersion??0))))).slice(0,t.maxProtocols)}};var mt={};Object.defineProperty(mt,"__esModule",{value:!0});class vt{static combine(e,t){return new vt(e,t)}constructor(e,t){this.primary=e,this.secondary=t}onEndpointDisconnect(e,t){this.primary.onEndpointDisconnect(e,(()=>{this.secondary.isEndpointConnected(e)||t()})),this.secondary.onEndpointDisconnect(e,(()=>{this.primary.isEndpointConnected(e)||t()}))}isValidEndpointPayload(e){return this.primary.isValidEndpointPayload(e)||this.secondary.isValidEndpointPayload(e)}async closeEndpoint(e){await this.primary.closeEndpoint(e),await this.secondary.closeEndpoint(e)}isEndpointConnected(e){return this.primary.isEndpointConnected(e)||this.secondary.isEndpointConnected(e)}async addEndpoint(e,t){this.primary.isValidEndpointPayload(t)&&await this.primary.addEndpoint(e,t),this.secondary.isValidEndpointPayload(t)&&await this.secondary.addEndpoint(e,t)}receive(e){this.primary.receive(e),this.secondary.receive(e)}send(e,t,n){return this.primary.isEndpointConnected(e)?this.primary.send(e,t,n):this.secondary.send(e,t,n)}async close(){await Promise.all([this.primary.close(),this.secondary.close()])}}mt.default=vt;var Ct,bt,It=s&&s.__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},Et=s&&s.__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)},xt=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(xe,"__esModule",{value:!0}),xe.ConnectionManager=void 0;const At=Ae,Pt=d,Mt=Oe,_t=Fe,Ot=Je,St=Qe,Rt=pt,Ft=gt,jt=xt(mt);class kt extends Pt.Base{static getProtocolOptionsFromStrings(e){return e.map((e=>{switch(e){case"rtc":return _t.RTCInfo;case"classic":return Mt.ClassicInfo;default:return(0,At.exhaustiveCheck)(e,["rtc","classic"])}}))}constructor(e){super(e),Ct.set(this,void 0),bt.set(this,void 0),this.removeChannelFromProviderMap=e=>{this.providerMap.delete(e)},this.onmessage=e=>"process-channel-connection"===e.action&&(this.processChannelConnection(e),!0),this.providerMap=new Map,this.protocolManager=new Ft.ProtocolManager("node"===this.wire.environment.type?["classic"]:["rtc","classic"]),It(this,Ct,new Rt.MessageReceiver(e),"f"),It(this,bt,new Ot.RTCICEManager(e),"f"),e.registerMessageHandler(this.onmessage.bind(this))}createProvider(e,t){const n=Object.assign(this.wire.environment.getDefaultChannelOptions().create,e||{}),i=this.protocolManager.getProviderProtocols(n?.protocols),r=i.map((e=>{switch(e){case"rtc":return new _t.RTCStrategy;case"classic":return new Mt.ClassicStrategy(this.wire,Et(this,Ct,"f"),t.channelId,t);default:return(0,At.exhaustiveCheck)(e,["rtc","classic"])}}));let o;if(2===r.length){const[e,t]=r;o=jt.default.combine(e,t)}else{if(1!==r.length)throw new Error("failed to combine strategies");[o]=r}const s=new St.ChannelProvider(t,(()=>St.ChannelProvider.wireClose(this.wire,t.channelName)),o),a=t.channelId;return this.providerMap.set(a,{provider:s,strategy:o,supportedProtocols:kt.getProtocolOptionsFromStrings(i)}),St.ChannelProvider.setProviderRemoval(s,this.removeChannelFromProviderMap.bind(this)),s}async createClientOffer(e){const t=this.protocolManager.getClientProtocols(e?.protocols);let n;return{offer:{supportedProtocols:await Promise.all(t.map((async e=>{switch(e){case"rtc":{const{rtcClient:e,channels:t,offer:i,rtcConnectionId:r,channelsOpened:o}=await Et(this,bt,"f").startClientOffer();return n={rtcClient:e,channels:t,channelsOpened:o},{type:"rtc",version:_t.RTCInfo.version,payload:{offer:i,rtcConnectionId:r}}}case"classic":return{type:"classic",version:Mt.ClassicInfo.version};default:return(0,At.exhaustiveCheck)(e,["rtc","classic"])}}))),maxProtocols:2},rtc:n}}async createClientStrategy(e,t){t.endpointId||(t.endpointId=this.wire.environment.getNextMessageId(),Et(this,Ct,"f").checkForPreviousClientConnection(t.channelId));const n=t.answer??{supportedProtocols:[{type:"classic",version:1}]},i=(await Promise.all(n.supportedProtocols.map((async n=>"rtc"===n.type&&e?(await Et(this,bt,"f").finishClientOffer(e.rtcClient,n.payload.answer,e.channelsOpened),new _t.RTCStrategy):"classic"===n.type?new Mt.ClassicStrategy(this.wire,Et(this,Ct,"f"),t.endpointId,t):null)))).filter((e=>null!==e));let r;if(e&&!i.some((e=>e instanceof _t.RTCStrategy))&&e&&e.rtcClient.close(),i.length>=2)r=jt.default.combine(i[0],i[1]);else{if(!i.length)throw new Error("No compatible protocols");[r]=i}const o={endpointIdentity:t,rtc:e};return r.addEndpoint(t.channelId,o),r}async processChannelConnection(e){const{clientIdentity:t,providerIdentity:n,ackToSender:i,payload:r,offer:o}=e.payload;t.endpointId?t.isLocalEndpointId=!1:(t.endpointId=this.wire.environment.getNextMessageId(),t.isLocalEndpointId=!0);const s=n.channelId,a=this.providerMap.get(s);if(!a)return i.payload.success=!1,i.payload.reason=`Channel "${n.channelName}" has been destroyed.`,this.wire.sendRaw(i);const{provider:c,strategy:d,supportedProtocols:h}=a;try{if(!(c instanceof St.ChannelProvider))throw Error("Cannot connect to a channel client");const e=o??{supportedProtocols:[{type:"classic",version:1}],maxProtocols:1},n=this.protocolManager.getCompatibleProtocols(h,e);if(!n.length)throw new Error("This provider does not support any of the offered protocols.");const s=await c.processConnection(t,r);i.payload.payload=i.payload.payload||{};let a={supportedProtocols:[],endpointPayloadPromise:Promise.resolve({endpointIdentity:t})};return a=await n.reduce((async(e,t)=>{const n=await e;if("rtc"===t.type){const{answer:e,rtcClient:i,channels:r}=await Et(this,bt,"f").createProviderAnswer(t.payload.rtcConnectionId,t.payload.offer);n.supportedProtocols.push({type:"rtc",version:_t.RTCInfo.version,payload:{answer:e}}),n.endpointPayloadPromise=n.endpointPayloadPromise.then((e=>r.then((t=>({...e,rtc:{rtcClient:i,channels:t}})))))}else n.supportedProtocols.push({type:"classic",version:Mt.ClassicInfo.version});return n}),Promise.resolve(a)),a.endpointPayloadPromise.then((e=>d.addEndpoint(t.endpointId,e))),i.payload.payload.result=s,i.payload.payload.answer=a,this.wire.sendRaw(i)}catch(e){return i.payload.success=!1,i.payload.reason=e.message,this.wire.sendRaw(i)}}}xe.ConnectionManager=kt,Ct=new WeakMap,bt=new WeakMap;var Lt,Tt,$t,Bt=s&&s.__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},Gt=s&&s.__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)};Object.defineProperty(le,"__esModule",{value:!0}),le.Channel=void 0;const Wt=t,Ht=G,Nt=d,Dt=ue,Ut=xe,Vt=Qe;function zt(e){const t=Math.floor(e/10),n=Math.min(3e4,500*2**t);return new Promise((e=>{setTimeout((()=>{e(!1)}),n)}))}class Kt extends Nt.EmitterBase{constructor(e){super(e,"channel"),Lt.set(this,void 0),Tt.set(this,new Wt.EventEmitter),$t.set(this,new Ht.AsyncRetryableLazy((async()=>{await Promise.all([this.on("disconnected",(e=>{Dt.ChannelClient.handleProviderDisconnect(e)})),this.on("connected",((...e)=>{Gt(this,Tt,"f").emit("connected",...e)}))]).catch((()=>new Error("error setting up channel connection listeners")))}))),Bt(this,Lt,new Ut.ConnectionManager(e),"f")}async getAllChannels(){return this.wire.sendAction("get-all-channels").then((({payload:e})=>e.data))}async onChannelConnect(e){await this.on("connected",e)}async onChannelDisconnect(e){await this.on("disconnected",e)}async safeConnect(e,t,n){const i={count:0};do{let r=()=>{};const o=new Promise((t=>{r=n=>{e===n.channelName&&t(!0)},Gt(this,Tt,"f").on("connected",r)}));try{if(i.count>0){i.gotConnectedEvent=await Promise.race([zt(i.count),o]);const t=await this.wire.sendAction("connect-to-channel",{...n,retryInfo:i});return console.log(`Successfully connected to channelName: ${e}`),t.payload.data}const t=this.wire.sendAction("connect-to-channel",n);i.originalMessageId=t.messageId;return(await t).payload.data}catch(n){if(!n.message.includes("internal-nack"))throw n;t&&0===i.count&&console.warn(`No channel found for channelName: ${e}. Waiting for connection...`)}finally{i.count+=1,Gt(this,Tt,"f").removeListener("connected",r)}}while(t);throw new Error(`No channel found for channelName: ${e}.`)}async connect(e,t={}){if(await Gt(this,$t,"f").getValue(),!e||"string"!=typeof e)throw new Error("Please provide a channelName string to connect to a channel.");const n={wait:!0,...this.wire.environment.getDefaultChannelOptions().connect,...t},{offer:i,rtc:r}=await Gt(this,Lt,"f").createClientOffer(n);let o;(this.fin.me.isFrame||this.fin.me.isView||this.fin.me.isWindow)&&(o=(await this.fin.me.getInfo()).url);const s={channelName:e,...n,offer:i,connectionUrl:o},a=await this.safeConnect(e,n.wait,s),c=await Gt(this,Lt,"f").createClientStrategy(r,a),d=new Dt.ChannelClient(a,(()=>Dt.ChannelClient.wireClose(this.wire,a,a.endpointId)),c);return c.onEndpointDisconnect(a.channelId,(async()=>{try{await d.sendDisconnectAction()}catch(e){console.warn(`Something went wrong during disconnect for client with uuid: ${a.uuid} / name: ${a.name} / endpointId: ${a.endpointId}.`)}finally{Dt.ChannelClient.handleProviderDisconnect(a)}})),d}async create(e,t){if(!e)throw new Error("Please provide a channelName to create a channel");const{payload:{data:n}}=await this.wire.sendAction("create-channel",{channelName:e}),i=Gt(this,Lt,"f").createProvider(t,n);return this.on("client-disconnected",(t=>{t.channelName===e&&Vt.ChannelProvider.handleClientDisconnection(i,t)})),i}}le.Channel=Kt,Lt=new WeakMap,Tt=new WeakMap,$t=new WeakMap,Object.defineProperty(de,"__esModule",{value:!0}),de.InterAppPayload=de.InterApplicationBus=void 0;const qt=t,Jt=d,Yt=he,Zt=le,Qt=O;class Xt extends Jt.Base{constructor(e){super(e),this.events={subscriberAdded:"subscriber-added",subscriberRemoved:"subscriber-removed"},this.refCounter=new Yt.RefCounter,this.Channel=new Zt.Channel(e),this.emitter=new qt.EventEmitter,e.registerMessageHandler(this.onmessage.bind(this)),this.on=this.emitter.on.bind(this.emitter),this.removeAllListeners=this.emitter.removeAllListeners.bind(this.emitter)}async publish(e,t){await this.wire.sendAction("publish-message",{topic:e,message:t,sourceWindowName:this.me.name})}async send(e,t,n){const i=(0,Qt.validateIdentity)(e);if(i)throw new Error(i);await this.wire.sendAction("send-message",{destinationUuid:e.uuid,destinationWindowName:e.name,topic:t,message:n,sourceWindowName:this.me.name})}subscribe(e,t,n){const i=this.createSubscriptionKey(e.uuid,e.name||"*",t);return this.emitter.on(i,n),this.refCounter.actOnFirst(i,(async()=>{await this.wire.sendAction("subscribe",{sourceUuid:e.uuid,sourceWindowName:e.name||"*",topic:t,destinationWindowName:this.me.name})}),(()=>Promise.resolve()))}unsubscribe(e,t,n){const i=e.name||"*",r=this.createSubscriptionKey(e.uuid,i,t);return this.emitter.removeListener(r,n),this.refCounter.actOnLast(r,(async()=>{await this.wire.sendAction("unsubscribe",{sourceUuid:e.uuid,sourceWindowName:i,topic:t,destinationWindowName:this.me.name})}),(()=>new Promise((e=>e)).then((()=>{}))))}processMessage(e){const{payload:{message:t,sourceWindowName:n,sourceUuid:i,topic:r}}=e,o=[this.createSubscriptionKey(i,n,r),this.createSubscriptionKey(i,"*",r),this.createSubscriptionKey("*","*",r)],s={uuid:i,name:n};o.forEach((e=>{this.emitter.emit(e,t,s)}))}emitSubscriverEvent(e,t){const{payload:{targetName:n,uuid:i,topic:r}}=t,o={name:n,uuid:i,topic:r};this.emitter.emit(e,o)}createSubscriptionKey(e,t,n){const i=t||"*";if(!(e&&i&&n))throw new Error("Missing uuid, name, or topic string");return function(...e){return e.map((e=>Buffer.from(`${e}`).toString("base64"))).join("/")}(e,i,n)}onmessage(e){const{action:t}=e;switch(t){case"process-message":this.processMessage(e);break;case this.events.subscriberAdded:this.emitSubscriverEvent(this.events.subscriberAdded,e);break;case this.events.subscriberRemoved:this.emitSubscriverEvent(this.events.subscriberRemoved,e)}return!0}}de.InterApplicationBus=Xt;de.InterAppPayload=class{};var en={};Object.defineProperty(en,"__esModule",{value:!0}),en.Clipboard=void 0;const tn=d;class nn extends tn.Base{async writeText(e){await this.wire.sendAction("clipboard-write-text",e)}async readText(e){const{payload:t}=await this.wire.sendAction("clipboard-read-text",{type:e});return t.data}async writeImage(e){await this.wire.sendAction("clipboard-write-image",e)}async readImage(e={format:"dataURL"}){const{payload:t}=await this.wire.sendAction("clipboard-read-image",e);return t.data}async writeHtml(e){await this.wire.sendAction("clipboard-write-html",e)}async readHtml(e){const{payload:t}=await this.wire.sendAction("clipboard-read-html",{type:e});return t.data}async writeRtf(e){await this.wire.sendAction("clipboard-write-rtf",e)}async readRtf(e){const{payload:t}=await this.wire.sendAction("clipboard-read-rtf",{type:e});return t.data}async write(e){await this.wire.sendAction("clipboard-write",e)}async getAvailableFormats(e){const{payload:t}=await this.wire.sendAction("clipboard-read-formats",{type:e});return t.data}}en.Clipboard=nn;var rn={},on={},sn={};Object.defineProperty(sn,"__esModule",{value:!0}),sn.ExternalApplication=void 0;const an=d;class cn extends an.EmitterBase{constructor(e,t){super(e,"external-application",t.uuid),this.identity=t}getInfo(){return this.wire.sendAction("get-external-application-info",this.identity).then((({payload:e})=>e.data))}}sn.ExternalApplication=cn,Object.defineProperty(on,"__esModule",{value:!0}),on.ExternalApplicationModule=void 0;const dn=d,hn=sn;class ln extends dn.Base{wrap(e){return this.wire.sendAction("external-application-wrap").catch((e=>{})),Promise.resolve(new hn.ExternalApplication(this.wire,{uuid:e}))}wrapSync(e){return this.wire.sendAction("external-application-wrap-sync").catch((e=>{})),new hn.ExternalApplication(this.wire,{uuid:e})}}on.ExternalApplicationModule=ln,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(on,e),n(sn,e)}(rn);var un={},pn={},wn={};Object.defineProperty(wn,"__esModule",{value:!0}),wn._Frame=void 0;const yn=d;class fn extends yn.EmitterBase{constructor(e,t){super(e,"frame",t.uuid,t.name),this.identity=t}getInfo(){return this.wire.sendAction("get-frame-info",this.identity).then((({payload:e})=>e.data))}getParentWindow(){return this.wire.sendAction("get-parent-window",this.identity).then((({payload:e})=>e.data))}}wn._Frame=fn,Object.defineProperty(pn,"__esModule",{value:!0}),pn._FrameModule=void 0;const gn=d,mn=O,vn=wn;class Cn extends gn.Base{async wrap(e){this.wire.sendAction("frame-wrap").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}wrapSync(e){this.wire.sendAction("frame-wrap-sync").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}getCurrent(){return this.wire.sendAction("frame-get-current").catch((e=>{})),Promise.resolve(new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity()))}getCurrentSync(){return this.wire.sendAction("frame-get-current-sync").catch((e=>{})),new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity())}}pn._FrameModule=Cn,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(pn,e),n(wn,e)}(un);var bn={};Object.defineProperty(bn,"__esModule",{value:!0}),bn.GlobalHotkey=void 0;const In=d;class En extends In.EmitterBase{constructor(e){super(e,"global-hotkey")}async register(e,t){await this.on(e,t),await this.wire.sendAction("global-hotkey-register",{hotkey:e})}async unregister(e){await this.removeAllListeners(e),await this.wire.sendAction("global-hotkey-unregister",{hotkey:e})}async unregisterAll(){await Promise.all(this.eventNames().filter((e=>!("registered"===e||"unregistered"===e))).map((e=>this.removeAllListeners(e)))),await this.wire.sendAction("global-hotkey-unregister-all",{})}async isRegistered(e){const{payload:{data:t}}=await this.wire.sendAction("global-hotkey-is-registered",{hotkey:e});return t}}bn.GlobalHotkey=En;var xn,An={},Pn={},Mn={},_n=s&&s.__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)};Object.defineProperty(Mn,"__esModule",{value:!0}),Mn.Platform=void 0;const On=d,Sn=O,Rn=new Map;class Fn extends On.EmitterBase{constructor(e,t){super(t.wire,"application",e.uuid),this.getClient=e=>{this.wire.sendAction("platform-get-client",this.identity).catch((e=>{}));const t=e||this.identity,{uuid:n}=t;if(!Rn.has(n)){const e=_n(this,xn,"f").call(this,n);Rn.set(n,e)}return Rn.get(n)},xn.set(this,(async e=>{try{const t=`custom-frame-${e}`,n=await this._channel.connect(t,{wait:!1});return n.onDisconnection((()=>{Rn.delete(e)})),n}catch(t){throw Rn.delete(e),new Error("The targeted Platform is not currently running. Listen for application-started event for the given Uuid.")}})),this.launchLegacyManifest=this.launchContentManifest;const n=(0,Sn.validateIdentity)(e);if(n)throw new Error(n);this._channel=t,this.identity={uuid:e.uuid},this.Layout=this.fin.Platform.Layout,this.Application=this.fin.Application.wrapSync(this.identity)}async createView(e,t,n){this.wire.sendAction("platform-create-view",this.identity).catch((e=>{}));const i=await this.getClient(),r=await i.dispatch("create-view",{target:t,opts:e,targetView:n});if(!r||(0,Sn.validateIdentity)(r.identity))throw new Error(`When overwriting the createView call, please return an object that has a valid 'identity' property: ${JSON.stringify(r)}`);return this.fin.View.wrapSync(r.identity)}async createWindow(e){this.wire.sendAction("platform-create-window",this.identity).catch((e=>{}));const t=await this.getClient();e.reason||(e.reason="api-call");const n=await t.dispatch("create-view-container",e);if(!n||(0,Sn.validateIdentity)(n.identity))throw new Error(`When overwriting the createWindow call, please return an object that has a valid 'identity' property: ${JSON.stringify(n)}`);const{identity:i}=n,r=this.fin.Window.wrapSync(i);return r.name=i.name,r.uuid=i.uuid,r}async quit(){this.wire.sendAction("platform-quit",this.identity).catch((e=>{}));return(await this.getClient()).dispatch("quit")}async closeView(e){this.wire.sendAction("platform-close-view",this.identity).catch((e=>{}));const t=await this.getClient();await t.dispatch("close-view",{view:e})}async reparentView(e,t){console.warn("Platform.reparentView has been deprecated, please use Platform.createView"),this.wire.sendAction("platform-reparent-view",this.identity).catch((e=>{}));const n={...e,uuid:e.uuid??this.identity.uuid},i=await this.fin.View.wrap(n),r=await i.getOptions();return this.createView(r,t)}async getSnapshot(){this.wire.sendAction("platform-get-snapshot",this.identity).catch((e=>{}));return(await this.getClient()).dispatch("get-snapshot")}async getViewSnapshot(e){return(await this.getClient()).dispatch("get-view-snapshot",{viewIdentity:e})}async applySnapshot(e,t){this.wire.sendAction("platform-apply-snapshot",this.identity).catch((e=>{}));const n="Requested snapshot must be a valid Snapshot object, or a url or filepath to such an object.";let i;if("string"==typeof e)try{i=(await this._channel.wire.sendAction("get-application-manifest",{manifestUrl:e})).payload.data}catch(e){throw new Error(`${n}: ${e}`)}else i=e;if(!i.windows)throw new Error(n);const r=await this.getClient();return await r.dispatch("apply-snapshot",{snapshot:i,options:t}),this}async fetchManifest(e){return(await this.getClient()).dispatch("platform-fetch-manifest",{manifestUrl:e})}async launchContentManifest(e){this.wire.sendAction("platform-launch-content-manifest",this.identity).catch((()=>{}));const t=await this.getClient(),n=await this.fetchManifest(e);return t.dispatch("launch-into-platform",{manifest:n,manifestUrl:e}),this}async setWindowContext(e={},t){if(this.wire.sendAction("platform-set-window-context",this.identity).catch((e=>{})),!e)throw new Error("Please provide a serializable object or string to set the context.");const n=await this.getClient(),{entityType:i}=t?await this.fin.System.getEntityInfo(t.uuid,t.name):this.fin.me;await n.dispatch("set-window-context",{context:e,entityType:i,target:t||{uuid:this.fin.me.uuid,name:this.fin.me.name}})}async getWindowContext(e){this.wire.sendAction("platform-get-window-context",this.identity).catch((e=>{}));const t=await this.getClient(),{entityType:n}=e?await this.fin.System.getEntityInfo(e.uuid,e.name):this.fin.me;return t.dispatch("get-window-context",{target:e||{uuid:this.fin.me.uuid,name:this.fin.me.name},entityType:n})}async closeWindow(e,t={skipBeforeUnload:!1}){this.wire.sendAction("platform-close-window",this.identity).catch((e=>{}));return(await this.getClient()).dispatch("close-window",{windowId:e,options:t})}}Mn.Platform=Fn,xn=new WeakMap;var jn={},kn={},Ln={},Tn={};function $n(e){switch(e){case"columns":case"grid":case"rows":case"tabs":return!0;default:return!1}}Object.defineProperty(Tn,"__esModule",{value:!0}),Tn.overrideFromComposables=Tn.isValidPresetType=void 0,Tn.isValidPresetType=$n,Tn.overrideFromComposables=function(...e){return t=>e.reduceRight(((e,t)=>n=>t(e(n))),(e=>e))(t)},Tn.default={isValidPresetType:$n};var Bn={},Gn={},Wn={};Object.defineProperty(Wn,"__esModule",{value:!0}),Wn.ApiConsumer=void 0;Wn.ApiConsumer=class{constructor(e){this.strategy=e,this.consume=async e=>(await this.strategy.getExposedFunctions(e)).reduce(((t,n)=>({...t,[n.key]:this.strategy.createFunction(n,e)})),{})}};var Hn={},Nn={};Object.defineProperty(Nn,"__esModule",{value:!0}),Nn.expose=Nn.getExposedProperties=void 0;const Dn=Symbol("exposedProperties");Nn.getExposedProperties=e=>e[Dn]||e.prototype[Dn]||[];Nn.expose=e=>(t,n,i)=>{t[Dn]=t[Dn]||[],t[Dn].push({key:n,descriptor:i,options:e})},Object.defineProperty(Hn,"__esModule",{value:!0}),Hn.ApiExposer=void 0;const Un=Nn;Hn.ApiExposer=class{constructor(e){this.strategy=e,this.exposeInstance=async(e,t)=>{const n=(0,Un.getExposedProperties)(e),i=await Promise.all(n.map((async({key:n,options:i})=>({key:n,options:await this.strategy.exposeFunction(e[n].bind(e),{key:n,options:i,meta:t})}))));await this.strategy.exposeMeta(t,i)}}};var Vn={},zn={},Kn={};Object.defineProperty(Kn,"__esModule",{value:!0}),Kn.ChannelsConsumer=void 0;Kn.ChannelsConsumer=class{constructor(e){this.channel=e,this.getExposedFunctions=async e=>{const{id:t}=e,{props:n}=await this.channel.dispatch(`api-meta:${t}`);return n},this.createFunction=e=>(...t)=>{const{action:n}=e.options;return this.channel.dispatch(n,{args:t})}}};var qn={};Object.defineProperty(qn,"__esModule",{value:!0}),qn.ChannelsExposer=void 0;qn.ChannelsExposer=class{constructor(e){this.channelProviderOrClient=e,this.exposeFunction=async(e,t)=>{const{key:n,options:i,meta:r}=t,{id:o}=r,s=`${o}.${i?.action||n}`;return await this.channelProviderOrClient.register(s,(async({args:t})=>e(...t))),{action:s}},this.exposeMeta=async({id:e},t)=>{const n=`api-meta:${e}`;await this.channelProviderOrClient.register(n,(()=>({props:t})))}}},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Kn,e),n(qn,e)}(zn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(zn,e)}(Vn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Wn,e),n(Hn,e),n(Vn,e),n(Nn,e)}(Gn);var Jn={};Object.defineProperty(Jn,"__esModule",{value:!0}),Jn.createRelayedDispatch=exports.relayChannelClientApi_1=Jn.relayChannelClientApi=void 0;const Yn=["no longer connected","RTCDataChannel closed unexpectedly","The client you are trying to dispatch from is disconnected from the target provider"];exports.relayChannelClientApi_1=Jn.relayChannelClientApi=async(e,t)=>{e.register(`relay:${t}`,(({action:t,target:n,payload:i})=>e.dispatch(n,t,i))),await Promise.resolve()};Jn.createRelayedDispatch=(e,t,n,i)=>async(r,o)=>{try{return await e.dispatch(`relay:${n}`,{action:r,payload:o,target:t})}catch(e){if(s=e.message,Yn.some((e=>s.includes(e)))&&i)throw new Error(i);throw e}var s};var Zn,Qn,Xn,ei=s&&s.__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},ti=s&&s.__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)};Object.defineProperty(Bn,"__esModule",{value:!0}),Bn.ColumnOrRow=Bn.TabStack=Bn.LayoutNode=void 0;const ni=Gn,ii=Jn;class ri{constructor(e,t){Zn.set(this,void 0),this.isRoot=()=>ti(this,Zn,"f").isRoot(this.entityId),this.exists=()=>ti(this,Zn,"f").exists(this.entityId),this.getParent=async()=>{const e=await ti(this,Zn,"f").getParent(this.entityId);if(e)return ri.getEntity(e,ti(this,Zn,"f"))},this.createAdjacentStack=async(e,t)=>{const n=await ti(this,Zn,"f").createAdjacentStack(this.entityId,e,t);return ri.getEntity({entityId:n,type:"stack"},ti(this,Zn,"f"))},this.getAdjacentStacks=async e=>(await ti(this,Zn,"f").getAdjacentStacks({targetId:this.entityId,edge:e})).map((e=>ri.getEntity({type:"stack",entityId:e.entityId},ti(this,Zn,"f")))),ei(this,Zn,e,"f"),this.entityId=t}}Bn.LayoutNode=ri,Zn=new WeakMap,ri.newLayoutEntitiesClient=async(e,t,n)=>{const i=(0,ii.createRelayedDispatch)(e,n,"layout-relay","You are trying to interact with a layout component on a window that does not exist or has been destroyed.");return new ni.ApiConsumer(new ni.ChannelsConsumer({dispatch:i})).consume({id:t})},ri.getEntity=(e,t)=>{const{entityId:n,type:i}=e;switch(i){case"column":case"row":return new si(t,n,i);case"stack":return new oi(t,n);default:throw new Error(`Unrecognised Layout Entity encountered ('${JSON.stringify(e)})`)}};class oi extends ri{constructor(e,t){super(e,t),Qn.set(this,void 0),this.type="stack",this.getViews=()=>ti(this,Qn,"f").getStackViews(this.entityId),this.addView=async(e,t={index:0})=>ti(this,Qn,"f").addViewToStack(this.entityId,e,t),this.removeView=async e=>{await ti(this,Qn,"f").removeViewFromStack(this.entityId,e)},this.setActiveView=async e=>{await ti(this,Qn,"f").setStackActiveView(this.entityId,e)},ei(this,Qn,e,"f")}}Bn.TabStack=oi,Qn=new WeakMap;class si extends ri{constructor(e,t,n){super(e,t),Xn.set(this,void 0),this.getContent=async()=>(await ti(this,Xn,"f").getContent(this.entityId)).map((e=>ri.getEntity(e,ti(this,Xn,"f")))),ei(this,Xn,e,"f"),this.type=n}}Bn.ColumnOrRow=si,Xn=new WeakMap;var ai={};Object.defineProperty(ai,"__esModule",{value:!0}),ai.DEFAULT_LAYOUT_KEY=ai.LAYOUT_CONTROLLER_ID=void 0,ai.LAYOUT_CONTROLLER_ID="layout-entities",ai.DEFAULT_LAYOUT_KEY="__default__";var ci,di,hi,li=s&&s.__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)};Object.defineProperty(Ln,"__esModule",{value:!0}),Ln.Layout=void 0;const ui=G,pi=O,wi=d,yi=Tn,fi=Bn,gi=ai;class mi extends wi.Base{static getClient(e){return li(e,di,"f").getValue()}constructor(e,t){super(t),ci.add(this),di.set(this,new ui.Lazy((async()=>fi.LayoutNode.newLayoutEntitiesClient(await this.platform.getClient(),gi.LAYOUT_CONTROLLER_ID,this.identity)))),this.replace=async e=>{this.wire.sendAction("layout-replace").catch((e=>{}));const t=await this.platform.getClient();await t.dispatch("replace-layout",{target:this.identity,opts:{layout:e}})},this.replaceView=async(e,t)=>{this.wire.sendAction("layout-replace-view").catch((e=>{}));const n=await this.platform.getClient();await n.dispatch("replace-view",{target:this.identity,opts:{viewToReplace:e,newView:t}})},this.applyPreset=async e=>{this.wire.sendAction("layout-apply-preset").catch((e=>{}));const t=await this.platform.getClient(),{presetType:n}=e;if(!n||!(0,yi.isValidPresetType)(n))throw new Error("Cannot apply preset layout, please include an applicable presetType property in the PresetLayoutOptions.");await t.dispatch("apply-preset-layout",{target:this.identity,opts:{presetType:n}})};const n=(0,pi.validateIdentity)(e);if(n)throw new Error(n);this.identity=e,this.platform=this.fin.Platform.wrapSync({uuid:e.uuid}),e.uuid===this.fin.me.uuid&&e.name===this.fin.me.name&&(this.init=this.fin.Platform.Layout.init)}async getConfig(){this.wire.sendAction("layout-get-config").catch((e=>{}));return(await this.platform.getClient()).dispatch("get-frame-snapshot",{target:this.identity})}async getCurrentViews(){this.wire.sendAction("layout-get-views").catch((e=>{}));const e=await this.platform.getClient();return(await e.dispatch("get-layout-views",{target:this.identity})).map((e=>this.fin.View.wrapSync(e)))}async getRootItem(){this.wire.sendAction("layout-get-root-item").catch((()=>{}));const e=await li(this,di,"f").getValue(),t=await e.getRoot("layoutName"in this.identity?this.identity:void 0);return fi.LayoutNode.getEntity(t,e)}async getStackByViewIdentity(e){this.wire.sendAction("layout-get-stack-by-view").catch((()=>{}));const t=await li(this,di,"f").getValue(),n=await t.getStackByView(e);if(!n)throw new Error(`No stack found for view: ${e.uuid}/${e.name}`);return fi.LayoutNode.getEntity(n,t)}async addView(e,{location:t,targetView:n}={}){this.wire.sendAction("layout-add-view").catch((e=>{}));const{identity:i}=await li(this,ci,"m",hi).call(this,"layout-add-view",{viewOptions:e,location:t,targetView:n});return{identity:i}}async closeView(e){this.wire.sendAction("layout-close-view").catch((e=>{})),await li(this,ci,"m",hi).call(this,"layout-close-view",{viewIdentity:e})}}Ln.Layout=mi,di=new WeakMap,ci=new WeakSet,hi=async function(e,t){return(await this.platform.getClient()).dispatch(e,{target:this.identity,opts:t})};var vi,Ci,bi,Ii,Ei,xi=s&&s.__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)},Ai=s&&s.__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};Object.defineProperty(kn,"__esModule",{value:!0}),kn.LayoutModule=void 0;const Pi=d,Mi=Ln,_i=ai;class Oi extends Pi.Base{constructor(){super(...arguments),vi.add(this),Ci.set(this,!1),bi.set(this,null),this.init=async(e={})=>{if(this.wire.sendAction("layout-init").catch((e=>{})),!this.wire.environment.layoutAllowedInContext(this.fin))throw new Error("Layout.init can only be called from a Window context.");if(xi(this,Ci,"f"))throw new Error("Layout.init was already called, please use Layout.create to add additional layouts.");"openfin"===this.wire.environment.type&&await this.fin.Platform.getCurrentSync().getClient(),Ai(this,Ci,!0,"f"),Ai(this,bi,await this.wire.environment.initLayoutManager(this.fin,this.wire,e),"f"),await this.wire.environment.applyLayoutSnapshot(this.fin,xi(this,bi,"f"),e);const t={name:this.fin.me.name,uuid:this.fin.me.uuid};if(!e.layoutManagerOverride){const e={layoutName:_i.DEFAULT_LAYOUT_KEY,...t};return xi(this,Ii,"f").call(this,e)}return this.wrapSync(t)},Ii.set(this,(e=>{const t="[Layout] You are using a deprecated property `layoutManager` - it will throw if you access it starting in v37.",n=new Proxy({},{get(e,n){throw console.warn(`[Layout-mgr-proxy] accessing ${n.toString()}`),new Error(t)}}),i=Object.assign(this.wrapSync(e),{layoutManager:n});return new Proxy(i,{get(e,n){if("layoutManager"===n)throw console.warn(`[Layout-proxy] accessing ${n.toString()}`),new Error(t);return e[n]}})})),this.getCurrentLayoutManagerSync=()=>xi(this,vi,"m",Ei).call(this,"fin.Platform.Layout.getCurrentLayoutManagerSync()"),this.create=async e=>this.wire.environment.createLayout(xi(this,vi,"m",Ei).call(this,"fin.Platform.Layout.create()"),e),this.destroy=async e=>this.wire.environment.destroyLayout(xi(this,vi,"m",Ei).call(this,"fin.Platform.Layout.destroy()"),e)}async wrap(e){return this.wire.sendAction("layout-wrap").catch((e=>{})),new Mi.Layout(e,this.wire)}wrapSync(e){return this.wire.sendAction("layout-wrap-sync").catch((e=>{})),new Mi.Layout(e,this.wire)}async getCurrent(){if(this.wire.sendAction("layout-get-current").catch((e=>{})),"openfin"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error("You are not in a Window context. Only Windows can have a Layout.");const{uuid:e,name:t}=this.fin.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction("layout-get-current-sync").catch((e=>{})),"openfin"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error("You are not in a Window context. Only Windows can have a Layout.");const{uuid:e,name:t}=this.fin.me;return this.wrapSync({uuid:e,name:t})}async getLayoutByViewIdentity(e){this.wire.sendAction("layout-get-by-view-identity").catch((()=>{}));let t=await this.wire.environment.getViewWindowIdentity(this.fin,e);t.identity&&(t=t.identity);try{const n=this.wrapSync(t),i=await Mi.Layout.getClient(n),r=await i.getLayoutIdentityForViewOrThrow(e);return this.wrapSync(r)}catch(n){if(!["No action registered at target for","getLayoutIdentityForViewOrThrow is not a function"].some((e=>n.message.includes(e))))throw n;if(t.uuid===t.name)throw new Error(`View identity ${JSON.stringify(e)} is not attached to any layout in provider window ${JSON.stringify(t)}.`);return this.wrapSync(t)}}}kn.LayoutModule=Oi,Ci=new WeakMap,bi=new WeakMap,Ii=new WeakMap,vi=new WeakSet,Ei=function(e){if(!xi(this,bi,"f"))throw new Error(`You must call init before using the API ${e}`);return xi(this,bi,"f")},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(kn,e),n(Ln,e)}(jn),Object.defineProperty(Pn,"__esModule",{value:!0}),Pn.PlatformModule=void 0;const Si=d,Ri=Mn,Fi=jn;class ji extends Si.Base{constructor(e,t){super(e),this._channel=t,this.Layout=new Fi.LayoutModule(this.wire)}async init(e){if(!fin.__internal_.isPlatform||fin.me.name!==fin.me.uuid)throw new Error("fin.Platform.init should only be called from a custom platform provider running in the main window of the application.");return this.wire.environment.initPlatform(this.fin,e)}async wrap(e){return this.wire.sendAction("platform-wrap").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}wrapSync(e){return this.wire.sendAction("platform-wrap-sync").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}async getCurrent(){return this.wire.sendAction("platform-get-current").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction("platform-get-current-sync").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}start(e){return this.wire.sendAction("platform-start").catch((e=>{})),new Promise((async(t,n)=>{try{const{uuid:n}=e,i=await this.fin.Application._create({...e,isPlatformController:!0});i.once("platform-api-ready",(()=>t(this.wrapSync({uuid:n})))),i._run({uuid:n})}catch(e){n(e)}}))}startFromManifest(e,t){return this.wire.sendAction("platform-start-from-manifest").catch((e=>{})),new Promise((async(n,i)=>{try{const i=await this.fin.Application._createFromManifest(e);i.once("platform-api-ready",(()=>n(this.wrapSync({uuid:i.identity.uuid})))),i._run(t)}catch(e){i(e)}}))}}Pn.PlatformModule=ji,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Pn,e),n(Mn,e)}(An);var ki={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getMe=e.getBaseMe=e.environmentUnsupportedMessage=void 0;const t=J(),n=un,i=ie(),r=rn;function o(e,t,n){return{...{isView:"view"===e,isWindow:"window"===e,isFrame:"iframe"===e,isExternal:"external connection"===e},uuid:t,name:n,entityType:e}}e.environmentUnsupportedMessage="You are not running in OpenFin.",e.getBaseMe=o,e.getMe=function(s){const{uuid:a,name:c,entityType:d}=s.me,h={setContext(){throw new Error(e.environmentUnsupportedMessage)},addContextHandler(){throw new Error(e.environmentUnsupportedMessage)},getContextGroups(){throw new Error(e.environmentUnsupportedMessage)},joinContextGroup(){throw new Error(e.environmentUnsupportedMessage)},removeFromContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getAllClientsInContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getInfoForContextGroup(){throw new Error(e.environmentUnsupportedMessage)}},l="Interop API has not been instantiated. Either connection has failed or you have not declared interop in your config.",u={setContext(){throw new Error(l)},addContextHandler(){throw new Error(l)},getContextGroups(){throw new Error(l)},joinContextGroup(){throw new Error(l)},removeFromContextGroup(){throw new Error(l)},getAllClientsInContextGroup(){throw new Error(l)},getInfoForContextGroup(){throw new Error(l)}},p={eventNames:()=>{throw new Error(e.environmentUnsupportedMessage)},emit:()=>{throw new Error(e.environmentUnsupportedMessage)},listeners:()=>{throw new Error(e.environmentUnsupportedMessage)},listenerCount:()=>{throw new Error(e.environmentUnsupportedMessage)},on:()=>{throw new Error(e.environmentUnsupportedMessage)},addListener:()=>{throw new Error(e.environmentUnsupportedMessage)},once:()=>{throw new Error(e.environmentUnsupportedMessage)},prependListener:()=>{throw new Error(e.environmentUnsupportedMessage)},prependOnceListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeAllListeners:()=>{throw new Error(e.environmentUnsupportedMessage)}};switch(d){case"view":return Object.assign(new t.View(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case"window":return Object.assign(new i._Window(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case"iframe":return Object.assign(new n._Frame(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case"external connection":return Object.assign(new r.ExternalApplication(s,{uuid:a}),o(d,a,c),{interop:u,isOpenFin:!1});default:return{...o(d,a,c),...p,interop:h,isOpenFin:!1}}}}(ki);var Li={},Ti={},$i={};Object.defineProperty($i,"__esModule",{value:!0}),$i.createWarningObject=$i.createUnusableObject=void 0,$i.createUnusableObject=function(e){const t=()=>{throw new Error(e)};return new Proxy({},{apply:t,construct:t,defineProperty:t,deleteProperty:t,get:t,getOwnPropertyDescriptor:t,getPrototypeOf:t,has:t,isExtensible:t,ownKeys:t,preventExtensions:t,set:t,setPrototypeOf:t})},$i.createWarningObject=function(e,t){return new Proxy(t,{get:(...t)=>(console.warn(e),Reflect.get(...t)),set:(...t)=>(console.warn(e),Reflect.set(...t)),getOwnPropertyDescriptor:(...t)=>(console.warn(e),Reflect.getOwnPropertyDescriptor(...t)),ownKeys:(...t)=>(console.warn(e),Reflect.ownKeys(...t))})};var Bi,Gi={},Wi={};var Hi={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.wrapIntentHandler=e.BROKER_ERRORS=e.generateOverrideWarning=e.generateOverrideError=e.wrapContextHandler=e.wrapInTryCatch=e.generateId=void 0;e.generateId=()=>`${Math.random()}${Date.now()}`;e.wrapInTryCatch=(e,t)=>(...n)=>{try{return e(...n)}catch(e){throw new Error((t||"")+e)}};e.wrapContextHandler=(e,t)=>async n=>{try{await e(n)}catch(e){throw console.error(`Error thrown by handler ${t} for context type ${n.type}: ${e}`),e}};e.generateOverrideError=(e,t)=>`You have tried to to use ${e} but ${t} has not been overridden in the Interop Broker. Please override this function. Refer to our documentation for more info.`;e.generateOverrideWarning=(e,t,n,i)=>{const{uuid:r,name:o}=n;return i?`Entity with identity: ${r}/${o} has called ${i} or ${e} but ${t} has not been overridden.`:`Entity with identity: ${r}/${o} has called ${e} but ${t} has not been overridden.`},e.BROKER_ERRORS={fireIntent:(0,e.generateOverrideError)("fireIntent","handleFiredIntent"),fireIntentForContext:(0,e.generateOverrideError)("fireIntentForContext","handleFiredIntentForContext"),getInfoForIntent:(0,e.generateOverrideError)("getInfoForIntent","handleInfoForIntent"),getInfoForIntentsByContext:(0,e.generateOverrideError)("getInfoForIntentsByContext","handleInfoForIntentsByContext"),joinSessionContextGroupWithJoinContextGroup:"The Context Group you have tried to join is a Session Context Group. Custom Context Groups can only be defined by the Interop Broker through code or manifest configuration. Please use joinSessionContextGroup.",fdc3Open:(0,e.generateOverrideError)("fdc3.open","fdc3HandleOpen"),fdc3FindInstances:(0,e.generateOverrideError)("fdc3.findInstances","fdc3HandleFindInstances"),fdc3GetAppMetadata:(0,e.generateOverrideError)("fdc3.getAppMetadata","fdc3HandleGetAppMetadata"),fdc3GetInfo:(0,e.generateOverrideError)("fdc3.getInfo","fdc3HandleGetInfo")};e.wrapIntentHandler=(e,t)=>async n=>{try{return e(n)}catch(e){throw console.error(`Error thrown by handler ${t}: ${e}`),e}}}(Hi);var Ni,Di,Ui={};function Vi(){if(Di)return Gi;Di=1;var e,t,n,r=s&&s.__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},o=s&&s.__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)},a=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Gi,"__esModule",{value:!0}),Gi.InteropBroker=void 0;const c=d,h=a(function(){if(Bi)return Wi;Bi=1,Object.defineProperty(Wi,"__esModule",{value:!0});const e=Cr();return Wi.default=class{constructor(e,t){this.provider=e,this.id=t,this.lastContext=void 0,this.contextGroupMap=new Map,this.clients=new Map,this.registerListeners()}registerListeners(){this.provider.register(`sessionContextGroup:getContext-${this.id}`,this.getCurrentContext.bind(this)),this.provider.register(`sessionContextGroup:setContext-${this.id}`,this.setContext.bind(this)),this.provider.register(`sessionContextGroup:handlerAdded-${this.id}`,this.handlerAdded.bind(this)),this.provider.register(`sessionContextGroup:handlerRemoved-${this.id}`,this.handlerRemoved.bind(this))}getCurrentContext(e){return e.type?this.contextGroupMap.get(e.type):this.lastContext}setContext(t,n){const{context:i}=t,r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name} not in Session Client State Map`);this.contextGroupMap.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{e.contextHandlers.get(i.type)?.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getClientState(e){return this.clients.get(e.endpointId)}async handlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(i){const e=r.contextHandlers.get(i)||[];r.contextHandlers.set(i,[...e,n]);const o=this.contextGroupMap.get(i);o&&await this.provider.dispatch(t,n,o)}else{r.globalHandler=n;const e=[...this.contextGroupMap.keys()].map((async e=>{const i=this.contextGroupMap.get(e);i&&await this.provider.dispatch(t,n,i)}));await Promise.all(e)}}handlerRemoved(e,t){const{handlerId:n}=e,i=this.clients.get(t.endpointId);i?(Array.from(i.contextHandlers).forEach((([,e])=>{const t=e.indexOf(n);t>-1&&e.splice(t,1)})),i.globalHandler===n&&(i.globalHandler=void 0)):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={contextHandlers:new Map,clientIdentity:e,globalHandler:void 0};this.clients.set(e.endpointId,t)}}onDisconnection(e){this.clients.delete(e.endpointId)}},Wi}()),l=Hi,u=a(i),p=function(){if(Ni)return Ui;Ni=1,Object.defineProperty(Ui,"__esModule",{value:!0}),Ui.PrivateChannelProvider=void 0;const e=Vi();return Ui.PrivateChannelProvider=class t{constructor(e,t){this.provider=e,this.id=t,this.clients=new Map,this.registerListeners(),this.contextByContextType=new Map,this.lastContext=void 0,this.provider.onConnection((e=>this.registerNewClient(e))),this.provider.onDisconnection((async e=>{const{endpointId:t}=e;this.clients.has(t)&&await this.handleClientDisconnecting(e),0===(await this.provider.getAllClientInfo()).length&&this.provider.destroy()}))}getClientState(e){return this.clients.get(e.endpointId)}registerListeners(){this.provider.register("broadcast",this.broadcast.bind(this)),this.provider.register("getCurrentContext",this.getCurrentContext.bind(this)),this.provider.register("contextHandlerAdded",this.contextHandlerAdded.bind(this)),this.provider.register("contextHandlerRemoved",this.contextHandlerRemoved.bind(this)),this.provider.register("nonStandardHandlerRemoved",this.nonStandardHandlerRemoved.bind(this)),this.provider.register("onAddContextHandlerAdded",this.onAddContextHandlerAdded.bind(this)),this.provider.register("onDisconnectHandlerAdded",this.onDisconnectHandlerAdded.bind(this)),this.provider.register("onUnsubscribeHandlerAdded",this.onUnsubscribeHandlerAdded.bind(this)),this.provider.register("clientDisconnecting",((e,t)=>{this.handleClientDisconnecting(t)}))}broadcast(t,n){const{context:i}=t;if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name}, tried to call broadcast, is not connected to this Private Channel`);const r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to broadcast - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);this.contextByContextType.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{const t=e.handlerIdsByContextTypes.get(i.type);t&&t.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getCurrentContext(e,t){const{contextType:n}=e;if(!this.getClientState(t))throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call getCurrentContext, is not connected to this Private Channel`);if(void 0!==n){return this.contextByContextType.get(n)||null}return this.lastContext?this.lastContext:null}contextHandlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call addContextListener, is not connected to this Private Channel`);if(i){const e=r.handlerIdsByContextTypes.get(i)||[];r.handlerIdsByContextTypes.set(i,[...e,n])}else r.globalHandler=n;Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&e.onAddContextListenerHandlerId&&this.provider.dispatch(e.clientIdentity,e.onAddContextListenerHandlerId,i)}))}async contextHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);if(i){let e;if(i.globalHandler===n)i.globalHandler=void 0;else for(const[t,r]of i.handlerIdsByContextTypes){const i=r.indexOf(n);i>-1&&(r.splice(i,1),e=t)}const r=(await this.getConnectedClients()).map((async n=>{const{clientIdentity:i,clientIdentity:{endpointId:r},onUnsubscribeHandlerId:o}=n;r!==t.endpointId&&o&&await this.provider.dispatch(i,o,e)}));try{await Promise.all(r)}catch(e){throw console.error(`Problem when attempting to dispatch to onUnsubscribeHandlers. Error: ${e} Removing Client: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}`),new Error(e)}}else console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}.`)}nonStandardHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);i?i.onDisconnectHandlerId===n?i.onDisconnectHandlerId=void 0:i.onAddContextListenerHandlerId===n?i.onAddContextListenerHandlerId=void 0:i.onUnsubscribeHandlerId===n&&(i.onUnsubscribeHandlerId=void 0):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}onAddContextHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onAddContextListener, is not connected to this Private Channel`);n.onAddContextListenerHandlerId=i,Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&Array.from(e.handlerIdsByContextTypes.keys()).forEach((e=>{this.provider.dispatch(t,i,e)}))}))}onDisconnectHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onDisconnect, is not connected to this Private Channel`);n.onDisconnectHandlerId=i}onUnsubscribeHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onUnsubscribe, is not connected to this Private Channel`);n.onUnsubscribeHandlerId=i}removeClient(e){const t=this.getClientState(e);if(!t)throw new Error(`Client with Identity: ${e.uuid} ${e.name}, tried to call disconnect, is not connected to this Private Channel`);t.handlerIdsByContextTypes.clear(),this.clients.delete(e.endpointId)}async fireOnDisconnectForOtherClients(e){const{endpointId:t}=e,n=(await this.getConnectedClients()).map((async e=>{const{clientIdentity:{endpointId:n},onDisconnectHandlerId:i}=e;n!==t&&i&&await this.provider.dispatch(e.clientIdentity,i)}));try{await Promise.all(n)}catch(t){throw console.error(`Problem when attempting to dispatch to onDisconnectHandlers. Error: ${t} Disconnecting Client: uuid: ${e.uuid}. name: ${e.name}. endpointId: ${e.endpointId}`),new Error(t)}}async unsubscribeAll(e){const{endpointId:t}=e,n=this.clients.get(t);if(n){const t=Array.from(n.handlerIdsByContextTypes.values()).flat(),i=n.globalHandler;if(t.length>0){const n=t.map((async t=>this.contextHandlerRemoved({handlerId:t},e)));try{await Promise.all(n)}catch(e){console.error(e.message)}}if(i)try{await this.contextHandlerRemoved({handlerId:i},e)}catch(e){console.error(e.message)}}}async handleClientDisconnecting(e){await this.unsubscribeAll(e),this.removeClient(e),await this.fireOnDisconnectForOtherClients(e)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={clientIdentity:e,handlerIdsByContextTypes:new Map,globalHandler:void 0,onAddContextListenerHandlerId:void 0,onUnsubscribeHandlerId:void 0,onDisconnectHandlerId:void 0};this.clients.set(e.endpointId,t)}}async getConnectedClients(){const e=await this.provider.getAllClientInfo();return Array.from(this.clients.values()).filter((t=>{const{uuid:n,name:i}=t.clientIdentity;return e.some((e=>i===e.name&&n===e.uuid))}))}static init(e,n){return new t(e,n)}},Ui}(),w=G,y=[{id:"green",displayMetadata:{color:"#00CC88",name:"green"}},{id:"purple",displayMetadata:{color:"#8C61FF",name:"purple"}},{id:"orange",displayMetadata:{color:"#FF8C4C",name:"orange"}},{id:"red",displayMetadata:{color:"#FF5E60",name:"red"}},{id:"pink",displayMetadata:{color:"#FF8FB8",name:"pink"}},{id:"yellow",displayMetadata:{color:"#E9FF8F",name:"yellow"}}];let f=class i extends c.Base{constructor(i,s,a){super(i),e.set(this,void 0),t.set(this,void 0),n.set(this,void 0),this.getProvider=()=>o(this,n,"f").getValue(),this.interopClients=new Map,this.contextGroupsById=new Map,r(this,t,a.contextGroups??[...y],"f"),r(this,e,a.fdc3Info,"f"),a?.logging&&(this.logging=a.logging),this.intentClientMap=new Map,this.lastContextMap=new Map,this.sessionContextGroupMap=new Map,r(this,n,new w.Lazy(s),"f"),this.setContextGroupMap(),this.setupChannelProvider()}static createClosedConstructor(...e){return class extends i{constructor(...t){if(t.length){const[n,i,r]=t;if(r&&"object"==typeof r&&!(0,u.default)(r,e[2]))return console.warn("You have modified the parameters of the InteropOverride constructor. This behavior is deprecated and will be removed in a future version. You can modify these options in your manifest. Please consult our Interop docs for guidance on migrating to the new override scheme."),void super(e[0],e[1],r);console.warn("You are attempting to pass arguments to the InteropOverride constructor. This is not necessary, and these passed arguments will be ignored. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.")}super(...e)}}}setContext({context:e},t){this.wire.sendAction("interop-broker-set-context").catch((e=>{}));const n=this.getClientState(t);if(!n||!n.contextGroupId)throw n?new Error("You must join a context group before you can set context."):new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);{const{contextGroupId:t}=n;this.setContextForGroup({context:e},t)}}setContextForGroup({context:e},t){this.wire.sendAction("interop-broker-set-context-for-group").catch((e=>{}));const n=this.contextGroupsById.get(t);if(!n)throw new Error(`Unable to set context for context group that isn't in the context group mapping: ${t}.`);const r=i.checkContextIntegrity(e);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(e)}`);const o=e.type;n.set(o,e),this.lastContextMap.set(t,o);Array.from(this.interopClients.values()).filter((e=>e.contextGroupId===t)).forEach((t=>{for(const[,n]of t.contextHandlers)i.isContextTypeCompatible(o,n.contextType)&&this.invokeContextHandler(t.clientIdentity,n.handlerId,e)}))}getCurrentContext(e,t){this.wire.sendAction("interop-broker-get-current-context").catch((e=>{}));const n=this.getClientState(t);if(!n?.contextGroupId)throw new Error("You must be a member of a context group to call getCurrentContext");const{contextGroupId:i}=n,r=this.contextGroupsById.get(i),o=this.lastContextMap.get(i),s=e?.contextType??o;return r&&s?r.get(s):void 0}async joinContextGroup({contextGroupId:e,target:t},n){if(this.wire.sendAction("interop-broker-join-context-group").catch((e=>{})),this.sessionContextGroupMap.has(e))throw new Error(l.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup);if(t){i.hasEndpointId(t)&&await this.addClientToContextGroup({contextGroupId:e},t);try{const n=this.channel.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name));if(!n.length)throw new Error(`Given Identity ${t.uuid} ${t.name} is not connected to the Interop Broker.`);n.length>1&&console.warn(`More than one connection found for identity ${t.uuid} ${t.name}`);const i=[];for(const t of n)i.push(this.addClientToContextGroup({contextGroupId:e},t));await Promise.all(i)}catch(e){throw new Error(e)}}else await this.addClientToContextGroup({contextGroupId:e},n)}async addClientToContextGroup({contextGroupId:e},t){this.wire.sendAction("interop-broker-add-client-to-context-group").catch((e=>{}));const n=this.getClientState(t);if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(!this.getContextGroups().find((t=>t.id===e)))throw new Error(`Attempting to join a context group that does not exist: ${e}. You may only join existing context groups.`);if(n.contextGroupId!==e){n.contextGroupId=e,await this.setCurrentContextGroupInClientOptions(t,e);const i=this.contextGroupsById.get(e);for(const[,e]of n.contextHandlers){const{contextType:n,handlerId:r}=e;if(void 0===n)i.forEach(((e,n)=>{this.invokeContextHandler(t,r,e)}));else if(i.has(n)){const e=i.get(n);e&&this.invokeContextHandler(t,r,e)}}}}async removeFromContextGroup({target:e},t){if(this.wire.sendAction("interop-broker-remove-from-context-group").catch((e=>{})),e){i.hasEndpointId(e)&&await this.removeClientFromContextGroup(e);try{const t=this.channel.connections.filter((t=>t.uuid===e.uuid&&t.name===e.name));if(!t.length)throw new Error(`No connection found for given Identity ${e.uuid} ${e.name}`);t.length>1&&console.warn(`More than one connection found for identity ${e.uuid} ${e.name}`);const n=[];for(const e of t)n.push(this.removeClientFromContextGroup(e));await Promise.all(n)}catch(e){throw new Error(e)}}else await this.removeClientFromContextGroup(t)}async removeClientFromContextGroup(e){this.wire.sendAction("interop-broker-remove-client-from-context-group").catch((e=>{}));const t=this.getClientState(e);t&&(t.contextGroupId=void 0),await this.setCurrentContextGroupInClientOptions(e,null)}getContextGroups(){return this.wire.sendAction("interop-broker-get-context-groups").catch((e=>{})),o(this,t,"f").map((e=>({...e})))}getInfoForContextGroup({contextGroupId:e}){return this.wire.sendAction("interop-broker-get-info-for-context-group").catch((e=>{})),this.getContextGroups().find((t=>t.id===e))}getAllClientsInContextGroup({contextGroupId:e}){this.wire.sendAction("interop-broker-get-all-clients-in-context-group").catch((e=>{}));return Array.from(this.interopClients.values()).filter((t=>t.contextGroupId===e)).map((e=>e.clientIdentity))}async handleFiredIntent(e,t){const n=(0,l.generateOverrideWarning)("fdc3.raiseIntent","InteropBroker.handleFiredIntent",t,"interopClient.fireIntent");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntent)}async setIntentTarget(e,t){this.wire.sendAction("interop-broker-set-intent-target").catch((e=>{}));const n=this.intentClientMap.get(t.name),i=`intent-handler-${e.name}`;if(n){const t=n.get(i);if(t){if(t.pendingIntents.push(e),t.clientIdentity&&t.isReady){const{clientIdentity:e,pendingIntents:n}=t;try{const r=n[n.length-1];await this.invokeIntentHandler(e,i,r),t.pendingIntents=[]}catch(n){console.error(`Error invoking intent handler for client ${e.uuid}/${e.name}/${e.endpointId}`),t.isReady=!1}}}else n.set(i,{isReady:!1,pendingIntents:[e]})}else{this.intentClientMap.set(t.name,new Map);const n=this.intentClientMap.get(t.name);n&&n.set(i,{isReady:!1,pendingIntents:[e]})}}async handleInfoForIntent(e,t){const n=(0,l.generateOverrideWarning)("fdc3.findIntent","InteropBroker.handleInfoForIntent",t,"interopClient.getInfoForIntent");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntent)}async handleInfoForIntentsByContext(e,t){const n=(0,l.generateOverrideWarning)("fdc3.findIntentsByContext","InteropBroker.handleInfoForIntentsByContext",t,"interopClient.getInfoForIntentsByContext");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntentsByContext)}async handleFiredIntentForContext(e,t){const n=(0,l.generateOverrideWarning)("fdc3.raiseIntentForContext","InteropBroker.handleFiredIntentForContext",t,"interopClient.fireIntentForContext");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntentForContext)}async clientDisconnected(e){}async fdc3HandleOpen({app:e,context:t},n){const i=(0,l.generateOverrideWarning)("fdc3.open","InteropBroker.fdc3HandleOpen",n);throw console.warn(i),new Error(l.BROKER_ERRORS.fdc3Open)}async fdc3HandleFindInstances(e,t){const n=(0,l.generateOverrideWarning)("fdc3.open","InteropBroker.fdc3HandleFindInstances",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3FindInstances)}async fdc3HandleGetAppMetadata(e,t){const n=(0,l.generateOverrideWarning)("fdc3.getAppMetadata","InteropBroker.fdc3HandleGetAppMetadata",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3GetAppMetadata)}async invokeContextHandler(e,t,n){const i=await this.getProvider();try{await i.dispatch(e,t,n)}catch(i){console.error(`Error invoking context handler ${t} for context type ${n.type} in client ${e.uuid}/${e.name}/${e.endpointId}`,i)}}async invokeIntentHandler(e,t,n){const i=await this.getProvider();await i.dispatch(e,t,n)}async fdc3HandleGetInfo(t,n){const{fdc3Version:i}=t;return{fdc3Version:i,...o(this,e,"f"),optionalFeatures:{OriginatingAppMetadata:!1,UserChannelMembershipAPIs:!0},appMetadata:{appId:"",instanceId:""}}}async getAllClientInfo(){return(await this.getProvider()).getAllClientInfo()}decorateSnapshot(e){return{...e,interopSnapshotDetails:{contextGroupStates:this.getContextGroupStates()}}}applySnapshot(e,t){const n=e?.interopSnapshotDetails?.contextGroupStates;n&&(t?.closeExistingWindows||this.updateExistingClients(n),this.rehydrateContextGroupStates(n))}updateExistingClients(e){this.interopClients.forEach((t=>{const{clientIdentity:n,contextGroupId:r,contextHandlers:o}=t;if(r){const t=e[r];for(const[,e]of Object.entries(t))o.forEach((t=>{const{handlerId:r,contextType:o}=t;i.isContextTypeCompatible(e.type,o)&&this.invokeContextHandler(n,r,e)}))}}))}getContextGroupStates(){return i.toObject(this.contextGroupsById)}rehydrateContextGroupStates(e){const t=Object.entries(e);for(const[e,n]of t){const t=Object.entries(n);for(const[n,i]of t)if(this.contextGroupsById.has(e)){this.contextGroupsById.get(e).set(n,i)}else console.warn(`Attempting to set a context group that isn't in the context group mapping. Skipping context group rehydration for: ${e}`)}}contextHandlerRegistered({contextType:e,handlerId:t},n){const i={contextType:e,handlerId:t},r=this.getClientState(n);if(r?.contextHandlers.set(t,i),r&&r.contextGroupId){const{contextGroupId:i}=r,o=this.contextGroupsById.get(i);if(void 0===e)o.forEach(((e,i)=>{this.invokeContextHandler(n,t,e)}));else if(o.has(e)){const i=o.get(e);i&&this.invokeContextHandler(n,t,i)}}}async intentHandlerRegistered(e,t){const{handlerId:n}=e,i=this.intentClientMap.get(t.name),r=i?.get(n);if(i)if(r){const{pendingIntents:e}=r;r.clientIdentity=t,r.isReady=!0;try{if(e.length>0){const i=e[e.length-1];await this.invokeIntentHandler(t,n,i),r.pendingIntents=[]}}catch(e){console.error(`Error invoking intent handler: ${n} for client ${t.uuid}/${t.name}/${t.endpointId}`)}}else i.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t});else{this.intentClientMap.set(t.name,new Map);const e=this.intentClientMap.get(t.name);e&&e.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t})}}removeContextHandler({handlerId:e},t){const n=this.getClientState(t);n&&n.contextHandlers.delete(e)}handleJoinSessionContextGroup({sessionContextGroupId:e},t){try{if(!e)throw new Error("Failed to join session context group: must specify group id.");const n=this.sessionContextGroupMap.get(e);if(n)n.registerNewClient(t);else{const n=new h.default(this.channel,e);n.registerNewClient(t),this.sessionContextGroupMap.set(e,n)}return{hasConflict:this.contextGroupsById.has(e)}}catch(e){throw new Error(e)}}getClientState(e){return this.interopClients.get(e.endpointId)}static toObject(e){const t=Object.fromEntries(e),n={};return Object.entries(t).forEach((([e,t])=>{const i=Object.fromEntries(t);n[e]=i})),n}static checkContextIntegrity(e){if(!e)return{isValid:!1,reason:"No context supplied"};if("object"!=typeof e)return{isValid:!1,reason:"Context must be an Object"};if(!e.type)return{isValid:!1,reason:"Context must have a type property"};if(e.id&&"object"!=typeof e.id)return{isValid:!1,reason:"Context id must be an Object populated with key-value identifiers (if set)"};if(e.id){const{id:t}=e,n=Object.keys(t);let i=!1;if(!n.length)return{isValid:!1,reason:"Context id must have at least one key-value identifier"};if(n.forEach((e=>{"string"==typeof e&&"string"==typeof t[e]||(i=!0)})),i)return{isValid:!1,reason:"Context id key-value identifiers must be of type string"}}return e.name&&"string"!=typeof e.name?{isValid:!1,reason:"Context name must be of string type (if set)"}:{isValid:!0}}static hasEndpointId(e){return void 0!==e.endpointId}static isContextTypeCompatible(e,t){return void 0===t||e===t}setContextGroupMap(){for(const e of this.getContextGroups())this.contextGroupsById.set(e.id,new Map)}async setCurrentContextGroupInClientOptions(e,t){try{const n=await this.fin.System.getEntityInfo(e.uuid,e.name);let i;"view"===n.entityType?i=await this.fin.View.wrap(e):"window"===n.entityType&&(i=await this.fin.Window.wrap(e)),i&&await i.updateOptions({interop:{currentContextGroup:t}})}catch(e){}}async setupChannelProvider(){try{const e=await this.getProvider();this.channel=e,this.wireChannel(e)}catch(e){throw new Error(`Error setting up Interop Broker Channel Provider: ${e}`)}}wireChannel(e){e.onConnection((async(e,t)=>{if(!await this.isConnectionAuthorized(e,t))throw new Error(`Connection not authorized for ${e.uuid}, ${e.name}`);if(!e.endpointId)throw new Error("Version too old to be compatible with Interop. Please upgrade your runtime to a more recent version.");const n={contextGroupId:void 0,contextHandlers:new Map,clientIdentity:e};t?.currentContextGroup&&this.contextGroupsById.has(t.currentContextGroup)&&(n.contextGroupId=t?.currentContextGroup),this.interopClients.set(e.endpointId,n)})),e.onDisconnection((e=>{this.interopClients.delete(e.endpointId);const t=this.intentClientMap.get(e.name);t&&e.uuid===this.fin.me.uuid&&t.forEach((e=>{e.isReady=!1})),this.sessionContextGroupMap.forEach((t=>{t.onDisconnection(e)})),this.clientDisconnected(e)})),e.beforeAction((async(e,t,n)=>{if(!await this.isActionAuthorized(e,t,n))throw new Error(`Action (${e}) not authorized for ${n.uuid}, ${n.name}`);this.logging?.beforeAction?.enabled&&console.log(e,t,n)})),e.afterAction(((e,t,n)=>{this.logging?.afterAction?.enabled&&console.log(e,t,n)})),e.register("setContext",this.setContext.bind(this)),e.register("fireIntent",this.handleFiredIntent.bind(this)),e.register("getCurrentContext",this.getCurrentContext.bind(this)),e.register("getInfoForIntent",this.handleInfoForIntent.bind(this)),e.register("getInfoForIntentsByContext",this.handleInfoForIntentsByContext.bind(this)),e.register("fireIntentForContext",this.handleFiredIntentForContext.bind(this)),e.register("getContextGroups",this.getContextGroups.bind(this)),e.register("joinContextGroup",this.joinContextGroup.bind(this)),e.register("removeFromContextGroup",this.removeFromContextGroup.bind(this)),e.register("getAllClientsInContextGroup",this.getAllClientsInContextGroup.bind(this)),e.register("getInfoForContextGroup",this.getInfoForContextGroup.bind(this)),e.register("contextHandlerRegistered",this.contextHandlerRegistered.bind(this)),e.register("intentHandlerRegistered",this.intentHandlerRegistered.bind(this)),e.register("removeContextHandler",this.removeContextHandler.bind(this)),e.register("sessionContextGroup:createIfNeeded",this.handleJoinSessionContextGroup.bind(this)),e.register("fdc3Open",this.fdc3HandleOpen.bind(this)),e.register("fdc3v2FindIntentsByContext",this.handleInfoForIntentsByContext.bind(this)),e.register("fdc3FindInstances",this.fdc3HandleFindInstances.bind(this)),e.register("fdc3GetAppMetadata",this.fdc3HandleGetAppMetadata.bind(this)),e.register("fdc3v2GetInfo",(async(e,t)=>this.fdc3HandleGetInfo.bind(this)(e,t))),e.register("createPrivateChannelProvider",(async e=>{const{channelId:t}=e,n=await this.fin.InterApplicationBus.Channel.create(t);p.PrivateChannelProvider.init(n,t)}))}isConnectionAuthorized(e,t){return this.wire.sendAction("interop-broker-is-connection-authorized").catch((e=>{})),Promise.resolve(!0)}isActionAuthorized(e,t,n){return this.wire.sendAction("interop-broker-is-action-authorized").catch((e=>{})),Promise.resolve(!0)}};return Gi.InteropBroker=f,e=new WeakMap,t=new WeakMap,n=new WeakMap,Gi}var zi,Ki={},qi={},Ji=s&&s.__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},Yi=s&&s.__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)};Object.defineProperty(qi,"__esModule",{value:!0});const Zi=d,Qi=Hi;class Xi extends Zi.Base{constructor(e,t,n){super(e),zi.set(this,void 0),this.id=n,Ji(this,zi,t,"f")}async setContext(e){this.wire.sendAction("interop-session-context-group-set-context").catch((e=>{}));return(await Yi(this,zi,"f")).dispatch(`sessionContextGroup:setContext-${this.id}`,{sessionContextGroupId:this.id,context:e})}async getCurrentContext(e){this.wire.sendAction("interop-session-context-group-get-context").catch((e=>{}));return(await Yi(this,zi,"f")).dispatch(`sessionContextGroup:getContext-${this.id}`,{sessionContextGroupId:this.id,type:e})}async addContextHandler(e,t){if(this.wire.sendAction("interop-session-context-group-add-handler").catch((e=>{})),"function"!=typeof e)throw new Error("Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");const n=await Yi(this,zi,"f");let i;return i=t?`sessionContextHandler:invoke-${this.id}-${t}-${(0,Qi.generateId)()}`:`sessionContextHandler:invoke-${this.id}`,n.register(i,(0,Qi.wrapContextHandler)(e,i)),await n.dispatch(`sessionContextGroup:handlerAdded-${this.id}`,{handlerId:i,contextType:t}),{unsubscribe:await this.createUnsubscribeCb(i)}}async createUnsubscribeCb(e){const t=await Yi(this,zi,"f");return async()=>{t.remove(e),await t.dispatch(`sessionContextGroup:handlerRemoved-${this.id}`,{handlerId:e})}}getUserInstance(){return{id:this.id,setContext:(0,Qi.wrapInTryCatch)(this.setContext.bind(this),"Failed to set context: "),getCurrentContext:(0,Qi.wrapInTryCatch)(this.getCurrentContext.bind(this),"Failed to get context: "),addContextHandler:(0,Qi.wrapInTryCatch)(this.addContextHandler.bind(this),"Failed to add context handler: ")}}}qi.default=Xi,zi=new WeakMap;var er={},tr={},nr={},ir={},rr=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),or=s&&s.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),sr=s&&s.__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)&&rr(t,e,n);return or(t,e),t};Object.defineProperty(ir,"__esModule",{value:!0}),ir.PrivateChannelClient=void 0;const ar=sr(Hi);var cr,dr;function hr(){if(cr)return tr;cr=1;var e,t=s&&s.__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)},n=s&&s.__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},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(tr,"__esModule",{value:!0}),tr.FDC3ModuleBase=void 0;const o=nr,a=Hi,c=wr(),d=r(i);return tr.FDC3ModuleBase=class{get client(){return t(this,e,"f").call(this)}get fin(){return this.wire.getFin()}constructor(t,i){this.wire=i,e.set(this,void 0),n(this,e,t,"f")}async broadcast(e){return this.wire.sendAction("fdc3-broadcast").catch((e=>{})),this.client.setContext(e)}async _open(e,t){this.wire.sendAction("fdc3-open").catch((e=>{}));try{return await c.InteropClient.ferryFdc3Call(this.client,"fdc3Open",{app:e,context:t})}catch(e){const t=e.message===a.BROKER_ERRORS.fdc3Open?"ResolverUnavailable":e.message;throw new Error(t)}}async _getChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:"system",...(0,o.getUnsupportedChannelApis)()})))}async getOrCreateChannel(e){this.wire.sendAction("fdc3-get-or-create-channel").catch((e=>{}));const t=(await this._getChannels()).find((t=>t.id===e));if(t)return{...t,type:"system",...(0,o.getUnsupportedChannelApis)()};try{const t=await this.client.joinSessionContextGroup(e);return(0,o.buildAppChannelObject)(t)}catch(e){throw console.error(e.message),new Error(o.ChannelError.CreationFailed)}}async getSystemChannels(){return this.wire.sendAction("fdc3-get-system-channels").catch((e=>{})),this._getChannels()}async joinChannel(e){this.wire.sendAction("fdc3-join-channel").catch((e=>{}));try{return await this.client.joinContextGroup(e)}catch(e){if(e.message===a.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup?console.error("The Channel you have tried to join is an App Channel. Custom Channels can only be defined by the Interop Broker through code or manifest configuration. Please use getOrCreateChannel."):console.error(e.message),e.message.startsWith("Attempting to join a context group that does not exist"))throw new Error(o.ChannelError.NoChannelFound);throw new Error(o.ChannelError.AccessDenied)}}async getCurrentChannel(){this.wire.sendAction("fdc3-get-current-channel").catch((e=>{}));const e=await this.getCurrentContextGroupInfo();return e?this.buildChannelObject(e):null}async leaveCurrentChannel(){return this.wire.sendAction("fdc3-leave-current-channel").catch((e=>{})),this.client.removeFromContextGroup()}async getCurrentContextGroupInfo(){const e=await this.client.getContextGroups(),t=e.map((async e=>this.client.getAllClientsInContextGroup(e.id))),n=(await Promise.all(t)).findIndex((e=>e.some((e=>{const{uuid:t,name:n}=e;return this.wire.me.uuid===t&&this.wire.me.name===n}))));return e[n]}async buildChannelObject(e){return{...e,type:"system",addContextListener:(...[e,t])=>{let n,i;"function"==typeof e?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),n=e):(n=t,"string"==typeof e&&(i=e));const r=(async()=>{let e=!0;const t=await this.client.getCurrentContext(i);return this.client.addContextHandler(((i,r)=>{if(!e||(e=!1,!(0,d.default)(t,i)))return n(i,r)}),i)})();return{...r,unsubscribe:()=>r.then((e=>e.unsubscribe()))}},broadcast:this.broadcast.bind(this),getCurrentContext:async e=>{const t=await this.client.getCurrentContext(e);return void 0===t?null:t}}}},e=new WeakMap,tr}ir.PrivateChannelClient=class{constructor(e,t){this.id=t,this.client=e,this.listeners=new Map}async broadcast(e){return this.client.dispatch("broadcast",{context:e})}async getCurrentContext(e){return this.client.dispatch("getCurrentContext",{contextType:e})}async addContextListener(e,t){if("function"!=typeof t)throw new Error("Non-function argument passed to the second parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");let n;n=e?`contextHandler:invoke-${this.id}-${e}-${ar.generateId()}`:`contextHandler:invoke-${this.id}-${ar.generateId()}`,this.client.register(n,ar.wrapContextHandler(t,n));const i={unsubscribe:await this.createContextUnsubscribeCb(n)};return this.listeners.set(n,i),await this.client.dispatch("contextHandlerAdded",{handlerId:n,contextType:e}),i}createNonStandardUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch("nonStandardHandlerRemoved",{handlerId:e})}}createContextUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch("contextHandlerRemoved",{handlerId:e})}}onAddContextListener(e){const t=`onContextHandlerAdded:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch("onAddContextHandlerAdded",{handlerId:t}),n}onDisconnect(e){const t=`onDisconnect:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch("onDisconnectHandlerAdded",{handlerId:t}),n}onUnsubscribe(e){const t=`onUnsubscribe:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch("onUnsubscribeHandlerAdded",{handlerId:t}),n}async cleanUpAllSubs(){Array.from(this.listeners.keys()).forEach((e=>{this.client.remove(e),this.listeners.delete(e)}))}async disconnect(){try{await this.client.dispatch("clientDisconnecting"),await this.cleanUpAllSubs(),await this.client.disconnect()}catch(e){throw new Error(e.message)}}},function(e){var t=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.getIntentResolution=e.isChannel=e.isContext=e.connectPrivateChannel=e.buildAppChannelObject=e.buildPrivateChannelObject=e.ChannelError=e.ResultError=e.UnsupportedChannelApiError=e.getUnsupportedChannelApis=void 0;const n=Hi,r=ir,o=t(i);e.getUnsupportedChannelApis=e=>({addContextListener:()=>{throw new a("Channel.addContextListener",e)},broadcast:()=>{throw new a("Channel.broadcast",e)},getCurrentContext:()=>{throw new a("Channel.getCurrentContext",e)}});class a extends Error{constructor(e,t="System"){super(e),this.message=`Calling ${e} on an instance of a ${t} Channel returned by fdc3.get${t}Channels is not supported. If you would like to use a ${t} Channel, please use fdc3.joinChannel, fdc3.addContextListener, and fdc3.broadcast instead.`}}var c,d;e.UnsupportedChannelApiError=a,function(e){e.NoResultReturned="NoResultReturned",e.IntentHandlerRejected="IntentHandlerRejected"}(c=e.ResultError||(e.ResultError={})),(d=e.ChannelError||(e.ChannelError={})).NoChannelFound="NoChannelFound",d.AccessDenied="AccessDenied",d.CreationFailed="CreationFailed";e.buildPrivateChannelObject=e=>{let t=!1;const n=()=>{if(t)throw new Error("Private Channel Client has been disconnected from the Private Channel")};return{id:e.id,type:"private",broadcast:async t=>(n(),e.broadcast(t)),getCurrentContext:async t=>(n(),e.getCurrentContext(t)),addContextListener:async(t,i)=>{n();let r=i,o=t;"function"==typeof t&&(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),r=t,o=null);return e.addContextListener(o,r)},onAddContextListener:t=>(n(),e.onAddContextListener(t)),disconnect:async()=>(n(),t=!0,e.disconnect()),onDisconnect:t=>(n(),e.onDisconnect(t)),onUnsubscribe:t=>(n(),e.onUnsubscribe(t))}};e.buildAppChannelObject=e=>({id:e.id,type:"app",broadcast:e.setContext,getCurrentContext:async t=>{const n=await e.getCurrentContext(t);return void 0===n?null:n},addContextListener:(t,n)=>{let i,r;"function"==typeof t?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),i=t):(i=n,"string"==typeof t&&(r=t));const s=(async()=>{let t=!0;const n=await e.getCurrentContext(r);return e.addContextHandler(((e,r)=>{if(!t||(t=!1,!(0,o.default)(n,e)))return i(e,r)}),r)})();return{...s,unsubscribe:()=>s.then((e=>e.unsubscribe()))}}});e.connectPrivateChannel=async t=>{try{const n=await fin.InterApplicationBus.Channel.connect(t),i=new r.PrivateChannelClient(n,t);return(0,e.buildPrivateChannelObject)(i)}catch(e){throw new Error(`Private Channel with id: ${t} doesn't exist`)}};e.isContext=e=>{if(e&&"object"==typeof e&&"type"in e){const{type:t}=e;return"string"==typeof t}return!1};e.isChannel=e=>{if(e&&"object"==typeof e&&"type"in e&&"id"in e){const{type:t,id:n}=e;return"string"==typeof t&&"string"==typeof n&&("app"===t||"private"===t)}return!1};e.getIntentResolution=async(t,i,r,o)=>{const s=(0,n.generateId)(),a=new Promise(((e,t)=>{fin.InterApplicationBus.subscribe({uuid:"*"},s,(t=>{e(t)})).catch((()=>t(new Error("getResult is not supported in this environment"))))})),d=r?{target:r,intentResolutionResultId:s}:{intentResolutionResultId:s},h=o?{name:o,context:i,metadata:d}:{...i,metadata:d},l=async()=>{let n=await a;if(!n||"object"!=typeof n)throw new Error(c.NoResultReturned);const{error:i}=n;if(i)throw new Error(c.IntentHandlerRejected);if((0,e.isChannel)(n)){const{id:i,type:r}=n;switch(r){case"private":n=await(0,e.connectPrivateChannel)(i);break;case"app":{const r=await t.joinSessionContextGroup(i);n=(0,e.buildAppChannelObject)(r);break}}}else if(!(0,e.isContext)(n))throw new Error(c.NoResultReturned);return n},u=o?await t.fireIntent(h):await t.fireIntentForContext(h);return"object"!=typeof u?{source:{appId:"",instanceId:""},intent:"",version:"2.0",getResult:l}:{...u,getResult:l}}}(nr);var lr,ur,pr={};function wr(){if(ur)return Ki;ur=1;var e,t,n=s&&s.__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},i=s&&s.__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)},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ki,"__esModule",{value:!0}),Ki.InteropClient=void 0;const o=d,a=r(qi),c=function(){if(dr)return er;dr=1,Object.defineProperty(er,"__esModule",{value:!0}),er.Fdc3Module=void 0;const e=Hi,t=hr();class n extends t.FDC3ModuleBase{async open(e,t){await super._open(e,t)}addContextListener(e,t){let n;return this.wire.sendAction("fdc3-add-context-listener").catch((e=>{})),"function"==typeof e?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),n=this.client.addContextHandler(e)):n=this.client.addContextHandler(t,null===e?void 0:e),{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}addIntentListener(e,t){this.wire.sendAction("fdc3-add-intent-listener").catch((e=>{}));const n=this.client.registerIntentHandler((e=>{const{context:n,metadata:i}=e,{metadata:r}=n,o=i?.intentResolutionResultId||r?.intentResolutionResultId;o&&this.fin.InterApplicationBus.publish(o,null).catch((()=>null)),t(e.context)}),e,{fdc3Version:"1.2"});return{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}async raiseIntent(t,n,i){this.wire.sendAction("fdc3-raise-intent").catch((e=>{}));const r=i?{name:t,context:n,metadata:{target:i}}:{name:t,context:n};try{return await this.client.fireIntent(r)}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntent?"ResolverUnavailable":t.message;throw new Error(n)}}async findIntent(t,n){this.wire.sendAction("fdc3-find-intent").catch((e=>{}));try{return await this.client.getInfoForIntent({name:t,context:n})}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntent?"ResolverUnavailable":t.message;throw new Error(n)}}async findIntentsByContext(t){this.wire.sendAction("fdc3-find-intents-by-context").catch((e=>{}));try{return await this.client.getInfoForIntentsByContext(t)}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntentsByContext?"ResolverUnavailable":t.message;throw new Error(n)}}async raiseIntentForContext(t,n){this.wire.sendAction("fdc3-raise-intent-for-context").catch((e=>{}));try{return await this.client.fireIntentForContext({...t,metadata:{target:n}})}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntentForContext?"ResolverUnavailable":t.message;throw new Error(n)}}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}getInfo(){return this.wire.sendAction("fdc3-get-info").catch((e=>{})),{providerVersion:this.wire.environment.getAdapterVersionSync(),provider:`openfin-${this.wire.me.uuid}`,fdc3Version:"1.2"}}}return er.Fdc3Module=n,er}(),h=function(){if(lr)return pr;lr=1,Object.defineProperty(pr,"__esModule",{value:!0}),pr.Fdc3Module2=void 0;const e=hr(),t=Hi,n=wr(),i=nr,r=ir;class o extends e.FDC3ModuleBase{async open(e,t){return"string"==typeof e&&console.warn("Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string })."),super._open(e,t)}async findInstances(e){this.wire.sendAction("fdc3-find-instances").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,"fdc3FindInstances",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3FindInstances?"ResolverUnavailable":e.message;throw new Error(n)}}async getAppMetadata(e){this.wire.sendAction("fdc3-get-app-metadata").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,"fdc3GetAppMetadata",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3GetAppMetadata?"ResolverUnavailable":e.message;throw new Error(n)}}async addContextListener(e,t){this.wire.sendAction("fdc3-add-context-listener").catch((e=>{}));const n=e=>t=>{const{contextMetadata:n,...i}=t,r=n?[{...i},n]:[t,null];e(...r)};let i=t,r=n(i);return"function"==typeof e?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),i=e,r=n(i),this.client.addContextHandler(r)):this.client.addContextHandler(r,null===e?void 0:e)}async findIntent(e,n,i){this.wire.sendAction("fdc3-find-intent").catch((e=>{}));try{return await this.client.getInfoForIntent({name:e,context:n,metadata:{resultType:i}})}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntent?"ResolverUnavailable":e.message;throw new Error(n)}}async findIntentsByContext(e,i){this.wire.sendAction("fdc3-find-intents-by-context").catch((e=>{}));const r=i?{context:e,metadata:{resultType:i}}:e;try{return await n.InteropClient.ferryFdc3Call(this.client,"fdc3v2FindIntentsByContext",r)}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntentsByContext?"ResolverUnavailable":e.message;throw new Error(n)}}async raiseIntent(e,n,r){this.wire.sendAction("fdc3-raise-intent").catch((e=>{}));try{return"string"==typeof r&&console.warn("Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string })."),(0,i.getIntentResolution)(this.client,n,r,e)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?"ResolverUnavailable":e.message;throw new Error(n)}}async raiseIntentForContext(e,n){this.wire.sendAction("fdc3-raise-intent-for-context").catch((e=>{}));try{return"string"==typeof n&&console.warn("Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string })."),(0,i.getIntentResolution)(this.client,e,n)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?"ResolverUnavailable":e.message;throw new Error(n)}}async addIntentListener(e,t){if(this.wire.sendAction("fdc3-add-intent-listener").catch((e=>{})),"string"!=typeof e)throw new Error("First argument must be an Intent name");return this.client.registerIntentHandler((async e=>{let n,i;const{context:r,metadata:o}=e,{contextMetadata:s,metadata:a,...c}=r,d=o?.intentResolutionResultId||a?.intentResolutionResultId;try{const e=a?{metadata:a,...c}:{...c};n=await t(e,s),i=n}catch(e){n=e,i={error:!0}}if(d&&this.fin.InterApplicationBus.publish(d,i).catch((()=>null)),n instanceof Error)throw new Error(n.message);return n}),e,{fdc3Version:"2.0"})}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}async createPrivateChannel(){const e=(0,t.generateId)();await n.InteropClient.ferryFdc3Call(this.client,"createPrivateChannelProvider",{channelId:e});const o=await this.fin.InterApplicationBus.Channel.connect(e),s=new r.PrivateChannelClient(o,e);return(0,i.buildPrivateChannelObject)(s)}async getUserChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:"user",...(0,i.getUnsupportedChannelApis)("User")})))}async getSystemChannels(){return console.warn("This API has been deprecated. Please use fdc3.getUserChannels instead."),super.getSystemChannels()}async joinUserChannel(e){return super.joinChannel(e)}async joinChannel(e){return console.warn("This API has been deprecated. Please use fdc3.joinUserChannel instead."),super.joinChannel(e)}async getCurrentChannel(){const e=await super.getCurrentChannel();return e?{...e,type:"user",broadcast:this.broadcast.bind(this)}:null}async getInfo(){return n.InteropClient.ferryFdc3Call(this.client,"fdc3v2GetInfo",{fdc3Version:"2.0"})}}return pr.Fdc3Module2=o,pr}(),l=Hi;let u=class extends o.Base{constructor(i,r){super(i),e.set(this,void 0),t.set(this,void 0),n(this,t,new Map,"f"),n(this,e,r,"f")}async setContext(t){this.wire.sendAction("interop-client-set-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("setContext",{context:t})}async addContextHandler(t,n){if(this.wire.sendAction("interop-client-add-context-handler").catch((e=>{})),"function"!=typeof t)throw new Error("Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");const r=await i(this,e,"f");let o;o=n?`invokeContextHandler-${n}-${(0,l.generateId)()}`:"invokeContextHandler";const s=(0,l.wrapContextHandler)(t,o);return r.register(o,s),await r.dispatch("contextHandlerRegistered",{handlerId:o,contextType:n}),{unsubscribe:async()=>{r.remove(o),await r.dispatch("removeContextHandler",{handlerId:o})}}}async getContextGroups(){this.wire.sendAction("interop-client-get-context-groups").catch((e=>{}));return(await i(this,e,"f")).dispatch("getContextGroups")}async joinContextGroup(t,n){this.wire.sendAction("interop-client-join-context-group").catch((e=>{}));const r=await i(this,e,"f");if(!t)throw new Error("No contextGroupId specified for joinContextGroup.");return r.dispatch("joinContextGroup",{contextGroupId:t,target:n})}async removeFromContextGroup(t){this.wire.sendAction("interop-client-remove-from-context-group").catch((e=>{}));return(await i(this,e,"f")).dispatch("removeFromContextGroup",{target:t})}async getAllClientsInContextGroup(t){this.wire.sendAction("interop-client-get-all-clients-in-context-group").catch((e=>{}));const n=await i(this,e,"f");if(!t)throw new Error("No contextGroupId specified for getAllClientsInContextGroup.");return n.dispatch("getAllClientsInContextGroup",{contextGroupId:t})}async getInfoForContextGroup(t){this.wire.sendAction("interop-client-get-info-for-context-group").catch((e=>{}));const n=await i(this,e,"f");if(!t)throw new Error("No contextGroupId specified for getInfoForContextGroup.");return n.dispatch("getInfoForContextGroup",{contextGroupId:t})}async fireIntent(t){this.wire.sendAction("interop-client-fire-intent").catch((e=>{}));return(await i(this,e,"f")).dispatch("fireIntent",t)}async registerIntentHandler(t,n,r){this.wire.sendAction("interop-client-register-intent-handler").catch((e=>{}));const o=await i(this,e,"f"),s=`intent-handler-${n}`,a=(0,l.wrapIntentHandler)(t,s);try{await o.register(s,a),await o.dispatch("intentHandlerRegistered",{handlerId:s,...r})}catch(e){throw new Error("Unable to register intent handler")}return{unsubscribe:async()=>{o.remove(s)}}}async getCurrentContext(t){this.wire.sendAction("interop-client-get-current-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("getCurrentContext",{contextType:t})}async getInfoForIntent(t){this.wire.sendAction("interop-client-get-info-for-intent").catch((e=>{}));return(await i(this,e,"f")).dispatch("getInfoForIntent",t)}async getInfoForIntentsByContext(t){this.wire.sendAction("interop-client-get-info-for-intents-by-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("getInfoForIntentsByContext",t)}async fireIntentForContext(t){this.wire.sendAction("interop-client-fire-intent-for-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("fireIntentForContext",t)}async joinSessionContextGroup(n){try{const r=i(this,t,"f").get(n);if(r)return r.getUserInstance();const o=await i(this,e,"f"),{hasConflict:s}=await o.dispatch("sessionContextGroup:createIfNeeded",{sessionContextGroupId:n});s&&console.warn(`A (non-session) context group with the name "${n}" already exists. If you are trying to join a Context Group, call joinContextGroup instead.`);const c=new a.default(this.wire,i(this,e,"f"),n);return i(this,t,"f").set(n,c),c.getUserInstance()}catch(e){throw console.error(`Error thrown trying to create Session Context Group with id "${n}": ${e}`),e}}async onDisconnection(t){this.wire.sendAction("interop-client-add-ondisconnection-listener").catch((e=>{}));return(await i(this,e,"f")).onDisconnection((e=>{const{uuid:n}=e;t({type:"interop-broker",topic:"disconnected",brokerName:n})}))}getFDC3Sync(e){switch(e){case"1.2":return new c.Fdc3Module((()=>this),this.wire);case"2.0":return new h.Fdc3Module2((()=>this),this.wire);default:throw new Error(`Invalid FDC3 version provided: ${e}. Must be '1.2' or '2.0'`)}}async getFDC3(e){return this.getFDC3Sync(e)}static async ferryFdc3Call(t,n,r){return(await i(t,e,"f")).dispatch(n,r||null)}};return Ki.InteropClient=u,e=new WeakMap,t=new WeakMap,Ki}var yr,fr,gr,mr={};function vr(){if(yr)return mr;yr=1,Object.defineProperty(mr,"__esModule",{value:!0}),mr.overrideCheck=mr.checkFDC32Overrides=mr.getDefaultViewFdc3VersionFromAppInfo=void 0;const e=Vi();function t(t){return["fdc3HandleFindInstances","handleInfoForIntent","handleInfoForIntentsByContext","fdc3HandleGetAppMetadata","fdc3HandleGetInfo","fdc3HandleOpen","handleFiredIntent","handleFiredIntentForContext"].filter((n=>t[n]===e.InteropBroker.prototype[n]))}return mr.getDefaultViewFdc3VersionFromAppInfo=function({manifest:e,initialOptions:t}){const n=e?.platform?.defaultViewOptions?.fdc3InteropApi??t.defaultViewOptions?.fdc3InteropApi;return["1.2","2.0"].includes(n??"")?n:void 0},mr.checkFDC32Overrides=t,mr.overrideCheck=function(e,n){if(n&&"2.0"===n){const n=t(e);n.length>0&&console.warn(`WARNING: FDC3 2.0 has been set as a default option for Views in this Platform, but the required InteropBroker APIs for FDC3 2.0 compliance have not all been overridden.\nThe following APIs need to be overridden:\n${n.join("\n")}`)}},mr}function Cr(){return gr||(gr=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),i=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),i(function(){if(fr)return Ti;fr=1;var e=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ti,"__esModule",{value:!0}),Ti.InteropModule=void 0;const t=e(n),i=$i,r=d,o=Vi(),a=wr(),c=vr(),h=Tn,l=e=>new e,u="You have attempted to use or modify InteropBroker parameters, which is not allowed. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.";class p extends r.Base{async init(e,n=l){this.wire.sendAction("interop-init").catch((()=>{}));const r=await this.wire.environment.getInteropInfo(this.wire.getFin()),s=(0,i.createUnusableObject)(u),a=(0,i.createWarningObject)(u,(0,t.default)(r)),d=async()=>{throw new Error(u)},p=o.InteropBroker.createClosedConstructor(this.wire,(()=>this.fin.InterApplicationBus.Channel.create(`interop-broker-${e}`)),r);let w;return w=Array.isArray(n)?new((0,h.overrideFromComposables)(...n)(p))(s,d,a):await n(p,s,d,a),(0,c.overrideCheck)(w,r.fdc3Version),w}connectSync(e,t){return this.wire.sendAction("interop-connect-sync").catch((()=>{})),new a.InteropClient(this.wire,this.wire.environment.whenReady().then((()=>this.fin.InterApplicationBus.Channel.connect(`interop-broker-${e}`,{payload:t}))))}}return Ti.InteropModule=p,Ti}(),e),i(wr(),e),i(Vi(),e)}(Li)),Li}var br={},Ir={},Er={},xr={};Object.defineProperty(xr,"__esModule",{value:!0}),xr.getSnapshotSourceChannelName=void 0;xr.getSnapshotSourceChannelName=e=>`snapshot-source-provider-${e.uuid}`;var Ar,Pr,Mr,_r,Or,Sr=s&&s.__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},Rr=s&&s.__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)};Object.defineProperty(Er,"__esModule",{value:!0}),Er.SnapshotSource=void 0;const Fr=d,jr=xr,kr=new Map;class Lr extends Fr.Base{constructor(e,t){super(e),Ar.set(this,void 0),Pr.set(this,(()=>(kr.has(this.identity.uuid)||kr.set(this.identity.uuid,{eventFired:null,clientPromise:null}),kr.get(this.identity.uuid)))),Mr.set(this,(()=>(Rr(this,Pr,"f").call(this).clientPromise||(Rr(this,Pr,"f").call(this).clientPromise=Rr(this,_r,"f").call(this)),Rr(this,Pr,"f").call(this).clientPromise))),_r.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);try{Rr(this,Pr,"f").call(this).eventFired||await Rr(this,Or,"f").call(this);const t=await this.fin.InterApplicationBus.Channel.connect(e,{wait:!1});return t.onDisconnection((()=>{Rr(this,Pr,"f").call(this).clientPromise=null,Rr(this,Pr,"f").call(this).eventFired=null})),t}catch(e){throw Rr(this,Pr,"f").call(this).clientPromise=null,new Error("The targeted SnapshotSource is not currently initialized. Await this object's ready() method.")}})),Or.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);let t,n;const i=new Promise(((e,i)=>{t=e,n=i}));Rr(this,Pr,"f").call(this).eventFired=i;const r=async i=>{try{i.channelName===e&&(t(),await this.fin.InterApplicationBus.Channel.removeListener("connected",r))}catch(e){n(e)}};await this.fin.InterApplicationBus.Channel.on("connected",r)})),Sr(this,Ar,t,"f")}get identity(){return Rr(this,Ar,"f")}async ready(){this.wire.sendAction("snapshot-source-ready").catch((e=>{}));try{await Rr(this,Mr,"f").call(this)}catch(e){await Rr(this,Pr,"f").call(this).eventFired}}async getSnapshot(){this.wire.sendAction("snapshot-source-get-snapshot").catch((e=>{}));const e=await Rr(this,Mr,"f").call(this),t=await e.dispatch("get-snapshot");return(await t).snapshot}async applySnapshot(e){this.wire.sendAction("snapshot-source-apply-snapshot").catch((e=>{}));return(await Rr(this,Mr,"f").call(this)).dispatch("apply-snapshot",{snapshot:e})}}Er.SnapshotSource=Lr,Ar=new WeakMap,Pr=new WeakMap,Mr=new WeakMap,_r=new WeakMap,Or=new WeakMap,Object.defineProperty(Ir,"__esModule",{value:!0}),Ir.SnapshotSourceModule=void 0;const Tr=d,$r=Er,Br=xr;class Gr extends Tr.Base{async init(e){if(this.wire.sendAction("snapshot-source-init").catch((e=>{})),"object"!=typeof e||"function"!=typeof e.getSnapshot||"function"!=typeof e.applySnapshot)throw new Error("you must pass in a valid SnapshotProvider");const t=await this.fin.InterApplicationBus.Channel.create((0,Br.getSnapshotSourceChannelName)(this.fin.me));t.register("get-snapshot",(async()=>({snapshot:await e.getSnapshot()}))),t.register("apply-snapshot",(({snapshot:t})=>e.applySnapshot(t)))}wrapSync(e){return this.wire.sendAction("snapshot-source-wrap-sync").catch((e=>{})),new $r.SnapshotSource(this.wire,e)}async wrap(e){return this.wire.sendAction("snapshot-source-wrap").catch((e=>{})),this.wrapSync(e)}}Ir.SnapshotSourceModule=Gr,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Ir,e),n(Er,e)}(br),Object.defineProperty(a,"__esModule",{value:!0});var Wr=a.Fin=void 0;const Hr=t,Nr=c,Dr=ie(),Ur=Z(),Vr=de,zr=en,Kr=rn,qr=un,Jr=bn,Yr=J(),Zr=An,Qr=ki,Xr=Cr(),eo=br;class to extends Hr.EventEmitter{constructor(e){super(),this.wire=e,this.System=new Nr.System(e),this.Window=new Dr._WindowModule(e),this.Application=new Ur.ApplicationModule(e),this.InterApplicationBus=new Vr.InterApplicationBus(e),this.Clipboard=new zr.Clipboard(e),this.ExternalApplication=new Kr.ExternalApplicationModule(e),this.Frame=new qr._FrameModule(e),this.GlobalHotkey=new Jr.GlobalHotkey(e),this.Platform=new Zr.PlatformModule(e,this.InterApplicationBus.Channel),this.View=new Yr.ViewModule(e),this.Interop=new Xr.InteropModule(e),this.SnapshotSource=new eo.SnapshotSourceModule(e),e.registerFin(this),this.me=(0,Qr.getMe)(e),e.on("disconnected",(()=>{this.emit("disconnected")}))}}Wr=a.Fin=to;var no={},io={};function ro(e){return"string"==typeof e.manifestUrl}function oo(e){return ao(e)&&"string"==typeof e.address}function so(e){return oo(e)&&"string"==typeof e.token}function ao(e){return"string"==typeof e.uuid}function co(e){return e.runtime&&"string"==typeof e.runtime.version}function ho(e){return ao(e)&&co(e)}Object.defineProperty(io,"__esModule",{value:!0}),io.isInternalConnectConfig=io.isPortDiscoveryConfig=io.isNewConnectConfig=io.isConfigWithReceiver=io.isRemoteConfig=io.isExistingConnectConfig=io.isExternalConfig=void 0,io.isExternalConfig=ro,io.isExistingConnectConfig=oo,io.isRemoteConfig=so,io.isConfigWithReceiver=function(e){return"object"==typeof e.receiver&&so({...e,address:""})},io.isNewConnectConfig=ho,io.isPortDiscoveryConfig=function(e){return ro(e)&&co(e)||ho(e)},io.isInternalConnectConfig=function(e){return oo(e)||ho(e)};var lo={},uo={};Object.defineProperty(uo,"__esModule",{value:!0}),uo.EmitterMap=void 0;const po=t;function wo(e){return Buffer.from(e).toString("base64")}uo.EmitterMap=class{constructor(){this.storage=new Map}hashKeys(e){return e.map(wo).join("/")}getOrCreate(e){const t=this.hashKeys(e);return this.storage.has(t)||this.storage.set(t,new po.EventEmitter),this.storage.get(t)}has(e){return this.storage.has(this.hashKeys(e))}delete(e){const t=this.hashKeys(e);return this.storage.delete(t)}},Object.defineProperty(lo,"__esModule",{value:!0});const yo=uo;class fo extends yo.EmitterMap{constructor(){super(...arguments),this.dispatchEvent=e=>{if(function(e){return"process-desktop-event"===e.action}(e)){const{payload:t}=e,n=function(e){const{topic:t}=e;if("frame"===t||"window"===t||"view"===t){const{uuid:n,name:i}=e;return[t,n,i]}if("application"===t){const{uuid:n}=e;return[t,n]}return[t]}(t);if(this.has(n))return this.getOrCreate(n).emit(t.type,t),!0}return!1}}}lo.default=fo;var go,mo,vo=s&&s.__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},Co=s&&s.__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)},bo=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(no,"__esModule",{value:!0});var Io=no.Transport=void 0;const Eo=t,xo=io,Ao=g,Po=bo(lo),Mo=ki,_o=ke;class Oo extends Eo.EventEmitter{constructor(e,t,n){super(),this.wireListeners=new Map,this.topicRefMap=new Map,this.eventAggregator=new Po.default,this.messageHandlers=[this.eventAggregator.dispatchEvent],go.set(this,void 0),mo.set(this,void 0),this.connectSync=()=>{Co(this,go,"f").connectSync()},this.getPort=()=>Co(this,go,"f").getPort(),vo(this,go,new e(this.onmessage.bind(this)),"f"),this.environment=t,this.sendRaw=Co(this,go,"f").send.bind(Co(this,go,"f")),this.registerMessageHandler(this.handleMessage.bind(this)),Co(this,go,"f").on("disconnected",(()=>{for(const[,{handleNack:e}]of this.wireListeners)e({reason:"Remote connection has closed"});this.wireListeners.clear(),this.emit("disconnected")}));const{uuid:i,name:r}=n,o=this.environment.getCurrentEntityType();this.me=(0,Mo.getBaseMe)(o,i,r)}getFin(){if(!Co(this,mo,"f"))throw new Error("No Fin object registered for this transport");return Co(this,mo,"f")}registerFin(e){if(Co(this,mo,"f"))throw new Error("Fin object has already been registered for this transport");vo(this,mo,e,"f")}shutdown(){return Co(this,go,"f").shutdown()}async connect(e){if((0,xo.isConfigWithReceiver)(e))return await Co(this,go,"f").connect(e.receiver),this.authorize(e);if((0,xo.isRemoteConfig)(e))return this.connectRemote(e);if((0,xo.isExistingConnectConfig)(e))return this.connectByPort(e);if((0,xo.isNewConnectConfig)(e)){const t=await this.environment.retrievePort(e);return this.connectByPort({...e,address:`ws://localhost:${t}`})}}async connectRemote(e){return await Co(this,go,"f").connect(new(this.environment.getWsConstructor())(e.address)),this.authorize(e)}async connectByPort(e){const{address:t,uuid:n}=e,i={...e,type:"file-token"},r=Co(this,go,"f");await r.connect(new(this.environment.getWsConstructor())(e.address));const o=await this.sendAction("request-external-authorization",{uuid:n,type:"file-token"},!0);if("external-authorization-response"!==o.action)throw new Ao.UnexpectedActionError(o.action);return await this.environment.writeToken(o.payload.file,o.payload.token),this.authorize(i)}async authorize(e){const t=await this.sendAction("request-authorization",e,!0);if("authorization-response"!==t.action)throw new Ao.UnexpectedActionError(t.action);if(!0!==t.payload.success)throw new Ao.RuntimeError(t.payload)}sendAction(e,t={},n=!1){let i=()=>{};const r=Ao.RuntimeError.getCallSite(1),o=this.environment.getNextMessageId(),s=new Promise(((s,a)=>{i=a;const c={action:e,payload:t,messageId:o},d=Co(this,go,"f");return this.addWireListener(o,s,(e=>this.nackHandler(e,a,r)),n),d.send(c).catch(a)}));return Object.assign(s,{cancel:i,messageId:o})}nackHandler(e,t,n){t("string"==typeof e?e:new Ao.RuntimeError(e,n))}ferryAction(e){return new Promise(((t,n)=>{const i=this.environment.getNextMessageId();e.messageId=i;const r=e=>{t(e.payload)};return Co(this,go,"f").send(e).then((()=>this.addWireListener(i,r,(e=>this.nackHandler(e,n)),!1))).catch(n)}))}registerMessageHandler(e){this.messageHandlers.push(e)}addWireListener(e,t,n,i){i?this.uncorrelatedListener=t:this.wireListeners.has(e)?n({reason:"Duplicate handler id",error:(0,_o.errorToPOJO)(new Ao.DuplicateCorrelationError(String(e)))}):this.wireListeners.set(e,{resolve:t,handleNack:n})}onmessage(e){for(const t of this.messageHandlers)t.call(null,e)}handleMessage(e){const t=e.correlationId||NaN;if("correlationId"in e){if(!this.wireListeners.has(t))return!1;{const{resolve:n,handleNack:i}=this.wireListeners.get(t);"ack"!==e.action?i({reason:"Did not receive ack action",error:(0,_o.errorToPOJO)(new Ao.NoAckError(e.action))}):"payload"in e?e.payload.success?n.call(null,e):i(e.payload):"string"==typeof e.reason?i(e):(console.warn("Received invalid response from core",e),i({reason:"invalid response shape"})),this.wireListeners.delete(t)}}else this.uncorrelatedListener&&this.uncorrelatedListener.call(null,e),this.uncorrelatedListener=()=>{};return!0}}Io=no.Transport=Oo,go=new WeakMap,mo=new WeakMap;const So=(...e)=>({log:(...t)=>console.debug(`[${(new Date).toISOString()}]`,...(e=>e.map((e=>`[${e}]`)))(e),...t),getLogger:(...t)=>So(...e,...t)}),Ro=So("@openfin/core-web/client");function Fo(e,t){if(!function(e){return"string"==typeof e}(e))throw new Error(`Property ${t} has invalid type. Expected string, got ${typeof e}.`)}const jo="web-broker-ports-ready",ko=Ro.getLogger("get-web-interop-ports");function Lo(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)}function To(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}"function"==typeof SuppressedError&&SuppressedError;const $o=e=>{var n,i,r;return r=class extends t.EventEmitter{constructor(t){super(),n.set(this,void 0),i.set(this,!1),this.connectSync=()=>{Lo(this,i,"f")||(e.addEventListener("message",(e=>{e.data?.topic?.startsWith("wire-message")&&e.data.message&&Lo(this,n,"f").call(this,{...JSON.parse(e.data.message),ports:e.ports})})),e.start())},this.connect=async()=>{this.connectSync()},this.send=t=>(e.postMessage({topic:"wire-message",message:JSON.stringify(t)}),Promise.resolve()),this.shutdown=async()=>{e.close()},To(this,n,t,"f")}getPort(){return e}},n=new WeakMap,i=new WeakMap,r};var Bo={},Go={};Object.defineProperty(Go,"__esModule",{value:!0}),Go.BaseEnvironment=void 0;const Wo=vr();Go.BaseEnvironment=class{async getViewWindowIdentity(e,t){const{identity:n}=await e.View.wrapSync(t).getCurrentWindow();return n}async getInteropInfo(e){const t=await e.Application.getCurrentSync().getInfo().catch((()=>null)),n=t?.initialOptions?.interopBrokerConfiguration??{};return{fdc3Version:t?(0,Wo.getDefaultViewFdc3VersionFromAppInfo)(t):void 0,...n,fdc3Info:{providerVersion:await e.System.getVersion(),provider:"OpenFin"}}}},Object.defineProperty(Bo,"__esModule",{value:!0});var Ho=Bo.BrowserEnvironment=void 0;const No=Go;class Do extends No.BaseEnvironment{constructor(){super(...arguments),this.type="other",this.getRandomId=()=>{const e=new Uint32Array(1);return window.crypto.getRandomValues(e)[0].toString(32)}}getAdapterVersionSync(){return""}observeBounds(e,t){throw new Error("Method not implemented.")}layoutAllowedInContext(e){return!1}initLayoutManager(e,t,n){throw new Error("Method not implemented.")}applyLayoutSnapshot(e,t,n){throw new Error("Method not implemented.")}createLayout(e,t){throw new Error("Method not implemented.")}destroyLayout(e,t){throw new Error("Method not implemented.")}resolveLayout(e,t){throw new Error("Method not implemented.")}initPlatform(...e){throw new Error("Method not implemented.")}writeToken(e,t){return Promise.resolve("")}retrievePort(e){throw new Error("Method not implemented.")}getNextMessageId(){return this.getRandomId()}createChildContent(e){throw new Error("Method not implemented.")}getWebWindow(e){throw new Error("Method not implemented.")}getCurrentEntityIdentity(){throw new Error("Method not implemented.")}getCurrentEntityType(){return"external connection"}raiseEvent(e,t){throw new Error("Method not implemented.")}getUrl(){return location.href}getDefaultChannelOptions(){return{create:{},connect:{}}}getRtcPeer(){return new RTCPeerConnection}getWsConstructor(){return WebSocket}whenReady(){return Promise.resolve()}}Ho=Bo.BrowserEnvironment=Do;const Uo=e=>"platform"in e&&void 0!==e.platform;var Vo,zo;class Ko extends Ho{constructor(e){super(),this.connectConfig=e,Vo.set(this,void 0),zo.set(this,new W((async()=>Promise.resolve().then((function(){return __webpack_require__(/*! ./main-b14f67c9.js */ "../../node_modules/@openfin/core-web/out/main-b14f67c9.js")}))))),Uo(e)&&this.validatePlatformOptions(e)}getAdapterVersionSync(){return"0.39.21"}validatePlatformOptions({platform:e}){if(!("layoutSnapshot"in e))throw new Error("Platform options are missing layoutSnapshot. Please provide a layoutSnapshot in the platform options.");if("windows"in e||"windows"in e.layoutSnapshot)throw new Error("It appears you tried to call connect() with a snapshot object from an OpenFin desktop environment. Note that connect() expects to be called with a platform property with this structure: { platform: { layoutSnapshot } }. To get a layoutSnapshot of the expected structure, use fin.Platform.Layout.getCurrentLayoutManagerSync().getLayoutSnapshot() in v34+ in your desktop environment.");const{layouts:t}=e.layoutSnapshot;Object.entries(t).map((([e,t])=>{if("object"!=typeof t||null===t)throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must be an object.`);if(!("content"in t))throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must contain a 'content' property.`)}))}async getInteropInfo(e){return{...{contextGroups:void 0,logging:{beforeAction:{enabled:!1},afterAction:{enabled:!1}}},fdc3Version:void 0,fdc3Info:{providerVersion:"0.39.21",provider:"OpenFin Web"}}}layoutAllowedInContext(e){return!0}async initLayoutManager(e,t,n){if(Lo(this,Vo,"f"))throw new Error("Layout already initialized.");if(!Uo(this.connectConfig))throw new Error("Platform options are missing from connection config.");const{WebLayoutEntryPoint:i}=await Lo(this,zo,"f").getValue();return To(this,Vo,new i(this.connectConfig),"f"),await Lo(this,Vo,"f").initLayoutManager(e,t,n)}async applyLayoutSnapshot(e,t,n){Lo(this,Vo,"f")?.applyLayoutSnapshot(e,t,n)}async createLayout(e,t){return Lo(this,Vo,"f")?.createLayout(e,t)}async destroyLayout(e,t){return Lo(this,Vo,"f")?.destroyLayout(e,t)}async getViewWindowIdentity(e,t){return Promise.resolve({uuid:t.uuid,name:t.uuid})}}Vo=new WeakMap,zo=new WeakMap;const qo=()=>{const e=((e,t)=>{const n=new RegExp(`^${t}<(?.*)>$`).exec(e)?.groups?.meta;if(n)try{return JSON.parse(atob(n))}catch(e){throw new Error(`Failed to decode JSON from ${n}.`)}})(window.name,"of-frame");if(e)try{const{name:t,uuid:n,brokerUrl:i,providerId:r,contextGroup:o}=e;return Fo(i,"brokerUrl"),Fo(n,"uuid"),Fo(t,"name"),{identity:{name:t,uuid:n},brokerUrl:i,interopConfig:{providerId:r,currentContextGroup:o}}}catch(e){throw new Error(`Unexpected error occurred when inferring platform information: ${e.stack}`)}},Jo=()=>{const e=r.v4();return{uuid:e,name:e}},Yo=async e=>{if("enabled"===e.connectionInheritance){const t=await(async e=>{const t=qo();if(t){const{validateOptions:n=(()=>!0)}=e,{identity:i,...r}=t;if(!await n(r))throw new Error("Parent options were rejected by validateOptions.");return t}})(e);if(t)return t}if(!e.options){const t="enabled"===e.connectionInheritance?"Broker URL was not specified nor provided by a platform container.":"Connection inheritance is disabled but no options were provided.";throw new Error(t)}return{...e.options,identity:Jo()}};exports.__classPrivateFieldGet=Lo,exports.__classPrivateFieldSet=To,exports.apiExposer=Gn,exports.commonjsGlobal=s,exports.connect=async t=>{try{Ro.log("Establishing connection",t);const{brokerUrl:n,identity:i,timeout:r,interopConfig:s}=await Yo(t),{workerPort:a,iframeBrokerPort:c}=await(async(e,t,n)=>{const{origin:i}=new URL(e),r=document.createElement("IFRAME");let s;r.style.display="none";try{return await new Promise(((a,c)=>{const d=e=>{if(e.source===r.contentWindow&&e.data?.topic===`ack-${jo}`){if(e.origin!==i)c(new Error(`Broker redirected to unexpected origin ${e.origin}, expected ${i}.`));else if(e.data.success){const[t,n]=e.ports;a({iframeBrokerPort:t,workerPort:n})}else c(new m(e.data));window.removeEventListener("message",d),clearTimeout(s)}};window.addEventListener("message",d),ko.log(`Connecting to broker ${e}`),r.setAttribute("src",e),r.setAttribute("name",o(t,"of-broker")),document.body.appendChild(r),ko.log("Iframe loaded, awaiting init message from iframe"),n&&(s=setTimeout((()=>{window.removeEventListener("message",d),document.body.removeChild(r),c(new Error("Worker did not initialize in time"))}),n))}))}catch(e){throw new Error(`Failed to initialise Fin Web Client. ${e.message}`,{cause:e})}})(n,i,r);Ro.log("Successfully established connection to shared worker");const d={entityType:"external connection",...i};a.start(),c.start();const h=((t,n,i)=>{const r=$o(n),o=new Ko(t),s=new Io(r,o,i);return s.connectSync(),window.Buffer=e.Buffer,new Wr(s)})(t,a,d);return s?.providerId&&(h.me.interop=h.Interop.connectSync(s.providerId),s?.currentContextGroup&&h.me.interop.joinContextGroup(s.currentContextGroup).catch((e=>{console.warn(`Error joining specified context group: ${s?.currentContextGroup}, continuing`,e)}))),{...h,me:{...h.me,identity:{uuid:h.me.uuid,name:h.me.name}}}}catch(e){throw new Error(`An error occured during web-interop connection: ${e.message}`)}},exports.decorators=Nn,exports.encodeOptions=o,exports.layout_constants=ai,exports.lazy=G; /***/ }), -/***/ "./node_modules/@openfin/core-web/out/main-b14f67c9.js": -/*!*************************************************************!*\ - !*** ./node_modules/@openfin/core-web/out/main-b14f67c9.js ***! - \*************************************************************/ +/***/ "../../node_modules/@openfin/core-web/out/main-b14f67c9.js": +/*!*****************************************************************!*\ + !*** ../../node_modules/@openfin/core-web/out/main-b14f67c9.js ***! + \*****************************************************************/ /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; -var t=__webpack_require__(/*! ./main-8cad4070.js */ "./node_modules/@openfin/core-web/out/main-8cad4070.js"),e=__webpack_require__(/*! uuid */ "../../node_modules/uuid/dist/esm-browser/index.js");__webpack_require__(/*! buffer/ */ "../../node_modules/buffer/index.js"),__webpack_require__(/*! events */ "../../node_modules/events/events.js"),__webpack_require__(/*! lodash/cloneDeep */ "../../node_modules/lodash/cloneDeep.js"),__webpack_require__(/*! lodash/isEqual */ "../../node_modules/lodash/isEqual.js");var i={},n={};Object.defineProperty(n,"__esModule",{value:!0}),n.mapValuesAsync=n.mapEntriesAsync=void 0;const o=(t,[e,i])=>({...t,[e]:i});async function s(t,e){return(await Promise.all(e.map((async([e,i])=>[e,await t(i,e)])))).reduce(o,{})}n.mapEntriesAsync=s,n.mapValuesAsync=async function(t,e){let i;return i=e instanceof Map?[...e.entries()]:Object.entries(e),s(t,i)};var r,a,l,h,d=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldSet||function(t,e,i,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(t,i):o?o.value=i:e.set(t,i),i},c=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldGet||function(t,e,i,n){if("a"===i&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?n:"a"===i?n.call(t):n?n.value:e.get(t)};Object.defineProperty(i,"__esModule",{value:!0});var m=i.DefaultLayoutManager=void 0;const u=n;class p{constructor(t){a.set(this,void 0),l.set(this,new Map),d(this,a,t,"f")}size(){return c(this,l,"f").size}async applyLayoutSnapshot({layouts:t}){if(Object.keys(t).length>1)throw new Error("[LayoutManager] Tried to call applyLayoutSnapshot with more than 1 layout. When implementing multiple layouts via overridden LayoutManager class, you must override and fully implement the applyLayoutSnapshot method without calling super.applyLayoutSnapshot().");const[[e,i]]=Object.entries(t);await p.createLayout(this,{layoutName:e,layout:i})}async showLayout({layoutName:t}){}async getLayoutSnapshot(){return{layouts:await(0,u.mapValuesAsync)((t=>t.getFrameSnapshot()),c(this,l,"f"))}}async removeLayout({layoutName:t}){}getLayoutIdentityForView(t){const e=[...c(this,l,"f").values()].find((e=>e.getCurrentViews().some((e=>e.name===t.name&&e.uuid===t.uuid))));return e?.identity??void 0}isLayoutVisible({layoutName:t}){return c(p,r,"m",h).call(p,this,t).isVisible()}resolveLayoutIdentity(t){if(t&&"layoutName"in t)return t;const e=[...c(this,l,"f").values()];if(1===e.length)return e[0].identity;const i=e.find((t=>t.isVisible()));return i?.identity??void 0}static async resolveLayout(t,e){const i=t.resolveLayoutIdentity(e);if(void 0===i||!("layoutName"in i))throw new Error("[layout-manager] resolveLayout: Could not resolve the layout identity. Make sure you include 'layoutName' in the identity object.");return c(p,r,"m",h).call(p,t,i.layoutName)}static async handleSharedView(t,e,i){await(0,u.mapValuesAsync)((async t=>{if(t.identity.layoutName!==e.layoutName){const e=t.getCurrentViews().find((t=>t.name===i.name));e&&await t.onViewDetached({viewIdentity:e,target:null}).catch(console.error)}}),c(t,l,"f"))}static async handleLastViewRemoved(t,e){await t.removeLayout(e),await c(t,a,"f").handleLastViewRemoved(t)}static async destroyLayout(t,{layoutName:e}){await c(p,r,"m",h).call(p,t,e).destroy(),c(t,l,"f").delete(e)}static async createLayout(t,e){const{layoutName:i}=e;if(c(t,l,"f").has(i))throw new Error(`Layout name ${i} already exists`);await c(t,a,"f").createLayout(e,t)}static registerLayout(t,e,i){c(t,l,"f").set(e,i)}static getAllLayouts(t){return[...c(t,l,"f").values()]}static setInitialSnapshot(t,e){c(t,a,"f").setInitialSnapshot(e)}static createClosedConstructor(...t){return class extends p{constructor(){super(...t)}}}}m=i.DefaultLayoutManager=p,r=p,a=new WeakMap,l=new WeakMap,h=function(t,e){const i=c(t,l,"f").get(e);if(!i)throw new Error(`[layout-manager] getLayoutByName: Could not locate layout with name '${e}'`);return i};var g={},f={},v={};Object.defineProperty(v,"__esModule",{value:!0}),v.ReversibleMap=void 0;v.ReversibleMap=class{constructor(){this.valueToKey=new Map,this.keyToValue=new Map,this.setUnique=(t,e)=>{if(this.hasKey(t)||this.hasValue(e))throw new Error("Key or value already in the map.");this.keyToValue.set(t,e),this.valueToKey.set(e,t)},this.getKey=t=>{const e=this.valueToKey.get(t);if(!e)throw new Error("Value not found in the map.");return e},this.deleteKey=t=>{const e=this.getValue(t);return this.keyToValue.delete(t),this.valueToKey.delete(e),e},this.deleteValue=t=>{const e=this.getKey(t);return this.keyToValue.delete(e),this.valueToKey.delete(t),e},this.hasKey=t=>this.keyToValue.has(t),this.hasValue=t=>this.valueToKey.has(t)}getValue(t){const e=this.keyToValue.get(t);if(!e)throw new Error("Key not found in the map.");return e}},Object.defineProperty(f,"__esModule",{value:!0});var _=f.LayoutContentCache=void 0;const y=t.lazy,C=v;class w{constructor(){this.contentItemCache=new C.ReversibleMap,this.contentItemCacheId=0,this.createCacheKey=()=>{const t=`entity-${this.contentItemCacheId.toString()}`;return this.contentItemCacheId+=1,t},this.hasKey=t=>this.contentItemCache.hasKey(t),this.getItemOrUndefined=t=>{try{return this.getContentItemOrThrow(t)}catch(t){return}},this.getContentItemOrThrow=(t,e)=>{if(!this.contentItemCache.hasKey(t))throw new Error("Layout component has been destroyed or detached from the current layout.");const i=this.contentItemCache.getValue(t);if(e&&!e.includes(i.type))throw new Error(`Layout item is not the expected type. Expected ${e.join(", ")}, got ${i.type}.`);return i},this.getOrCreateEntityId=t=>{if(this.contentItemCache.hasValue(t))return this.contentItemCache.getKey(t);t.onDestroyed((()=>{this.contentItemCache.deleteValue(t)}));const e=this.createCacheKey();return this.contentItemCache.setUnique(e,t),e}}static getSingleInstance(){return w.singleton.getValue()}}_=f.LayoutContentCache=w,w.singleton=new y.Lazy((()=>new w));var I={},b={};!function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.getAdjacentStacks=t.doShareEdge=t.getAdjacentItem=void 0;t.getAdjacentItem=(e,i)=>{const{parent:n}=e;if(e.isRoot()||!n)return;const o=["top","bottom"].includes(i)?"column":"row",s=["top","left"].includes(i)?-1:1;if(n.type===o){const t=n.contentItems.indexOf(e)+s;if(t>=0&&t{const n=t.getBounds(),o=e.getBounds();if(!n||!o)return!1;if(["top","bottom"].includes(i)){return!(n.righto.right)}return!(n.bottomo.bottom)};t.getAdjacentStacks=(e,i)=>{const n=["top","bottom"].includes(i)?"row":"column",o=s=>"stack"===s.type?(0,t.doShareEdge)(e,s,i)?[s]:[]:"root"===s.type||"ground"===s.type?[]:s.type===n?s.contentItems.map((t=>o(t))).flat():s.type!==n?["top","right"].includes(i)?o(s.contentItems[s.contentItems.length-1]):o(s.contentItems[0]):[],s=(0,t.getAdjacentItem)(e,i);return s?o(s):[]}}(b);var S=t.commonjsGlobal&&t.commonjsGlobal.__decorate||function(t,e,i,n){var o,s=arguments.length,r=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(s<3?o(r):s>3?o(e,i,r):o(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};Object.defineProperty(I,"__esModule",{value:!0}),I.LayoutEntitiesController=void 0;const E=t.decorators,x=b,L=i;class z{constructor(t,e,i){this.wire=t,this.layoutManager=e,this.layoutContentCache=i,this.analytics=t=>{this.wire.sendAction(`layout-controller-${t}`).catch((()=>{}))},this.getLayoutIdentityForViewOrThrow=async t=>{const e=this.layoutManager.getLayoutIdentityForView(t);if(!e)throw new Error(`View identity ${t.name} is not attached to any layouts.`);return e},this.getRoot=async t=>{this.analytics("get-root");const e=(await this.getLayout(t)).getRoot();return{type:e.type,entityId:this.layoutContentCache.getOrCreateEntityId(e)}},this.getStackByView=async t=>{this.analytics("get-stack-by-view");const e=await this.getLayoutIdentityForViewOrThrow(t),i=(await this.getLayout(e)).getStackByView(t);if("stack"===i?.type)return{entityId:this.layoutContentCache.getOrCreateEntityId(i),type:"stack"}},this.getStackViews=t=>{this.analytics("get-stack-views");return this.layoutContentCache.getContentItemOrThrow(t,["stack"]).contentItems.map((t=>({name:t.viewName,uuid:this.wire.me.uuid})))},this.isRoot=t=>{this.analytics("is-root");return this.layoutContentCache.getContentItemOrThrow(t).isRoot()},this.exists=t=>(this.analytics("exists"),this.layoutContentCache.hasKey(t)),this.addViewToStack=async(t,e,{index:i}={index:0})=>{this.analytics("add-view-to-stack");const n=this.layoutContentCache.getContentItemOrThrow(t);if(i&&i>n.contentItems.length+1)throw new Error(`Index '${i}' out of range, please exclude the index or specify a number between 0 and ${n.contentItems.length}`);const o={id:t,index:i},{identity:s}=await n.layout.platformCreateView(e,{location:o});return s},this.findViewInStack=(t,e)=>t.contentItems.find((t=>t.viewName===e.name)),this.removeViewFromStack=async(t,e)=>{this.analytics("remove-view-from-stack");const i=this.layoutContentCache.getContentItemOrThrow(t,["stack"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to remove a view ('${e.name}') which does not belong to the stack.`);await n.layout.platformCloseView(e)},this.createAdjacentStack=async(t,e,{position:i="right"}={})=>{if(this.analytics("create-adjacent-stack"),!Array.isArray(e)||0===e.length)throw new Error('The parameter "views" must be an array with at least 1 element.');if(!["top","bottom","left","right"].includes(i))throw new Error(`Invalid position '${i}' specified.`);const n=this.layoutContentCache.getContentItemOrThrow(t).createAdjacentStack({position:i}),o=this.layoutContentCache.getOrCreateEntityId(n);return await Promise.all(e.reverse().map((t=>this.addViewToStack(o,t)))),o},this.getAdjacentStacks=async({targetId:t,edge:e})=>{this.analytics("get-adjacent-stacks");const i=this.layoutContentCache.getContentItemOrThrow(t);return(0,x.getAdjacentStacks)(i,e).map((t=>({entityId:this.layoutContentCache.getOrCreateEntityId(t)})))},this.setStackActiveView=async(t,e)=>{this.analytics("set-stack-active-view");const i=this.layoutContentCache.getContentItemOrThrow(t,["stack"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to set a view ('${e.name}') as active when it does not belong to the stack.`);i.setActiveContentItem(n,!0)}}async getLayout(t){const e=await L.DefaultLayoutManager.resolveLayout(this.layoutManager,t);if(!e)throw new Error(`Could not resolve target layout identity ${JSON.stringify(t)}`);return e}getContent(t){this.analytics("get-content");return this.layoutContentCache.getContentItemOrThrow(t,["column","row"]).contentItems.map((t=>({type:t.type,entityId:this.layoutContentCache.getOrCreateEntityId(t)})))}getParent(t){this.analytics("get-parent");const e=this.layoutContentCache.getContentItemOrThrow(t);if(!e.isRoot())return e.parent?.contentItems.includes(e)?{type:e.parent.type,entityId:this.layoutContentCache.getOrCreateEntityId(e.parent)}:void 0}}S([(0,E.expose)()],z.prototype,"getLayoutIdentityForViewOrThrow",void 0),S([(0,E.expose)()],z.prototype,"getRoot",void 0),S([(0,E.expose)()],z.prototype,"getStackByView",void 0),S([(0,E.expose)()],z.prototype,"getStackViews",void 0),S([(0,E.expose)()],z.prototype,"getContent",null),S([(0,E.expose)()],z.prototype,"getParent",null),S([(0,E.expose)()],z.prototype,"isRoot",void 0),S([(0,E.expose)()],z.prototype,"exists",void 0),S([(0,E.expose)()],z.prototype,"addViewToStack",void 0),S([(0,E.expose)()],z.prototype,"removeViewFromStack",void 0),S([(0,E.expose)()],z.prototype,"createAdjacentStack",void 0),S([(0,E.expose)()],z.prototype,"getAdjacentStacks",void 0),S([(0,E.expose)()],z.prototype,"setStackActiveView",void 0),I.LayoutEntitiesController=z,Object.defineProperty(g,"__esModule",{value:!0});var M=g.initLayoutEndpoints=void 0;const P=t.apiExposer,T=t.layout_constants,A=f,k=I,D=i;M=g.initLayoutEndpoints=async function(t,e){const i=t.getFin(),n=await i.Platform.getCurrentSync().getClient(),o=new P.ChannelsExposer(n);await new P.ApiExposer(o).exposeInstance(new k.LayoutEntitiesController(t,e,A.LayoutContentCache.getSingleInstance()),{id:T.LAYOUT_CONTROLLER_ID}),await async function(t,e){const i=t=>async i=>{const n=await D.DefaultLayoutManager.resolveLayout(e,i.target);if(!n)throw new Error(`Could not resolve the layout target from payload ${JSON.stringify(i)}`);return t(n,i)},n=(e,n)=>{t.register(e,i(n))},o=(t,e)=>{n(t,e)};n("replace-view",((t,e)=>t.replaceView(e))),n("replace-layout",((t,{layout:e})=>t.replaceLayout(e))),n("add-view",((t,e)=>t.insertView(e))),o("layout-add-view",((t,{viewOptions:e,location:i,targetView:n})=>t.platformCreateView(e,{location:i,targetView:n}))),n("close-view",((t,e)=>t.cleanupView(e.viewIdentity))),o("layout-close-view",((t,e)=>t.platformCloseView(e.viewIdentity))),n("apply-preset-layout",((t,e)=>t.applyPreset(e))),n("get-layout-views",(t=>t.getCurrentViews())),n("get-frame-snapshot",(t=>t.getFrameSnapshot())),n("is-visible",(t=>t.isVisible())),n("destroy",(t=>t.destroy())),t.register("get-layout-snapshot",(()=>e.getLayoutSnapshot()))}(n,e)};var R={};Object.defineProperty(R,"__esModule",{value:!0});var U=R.BaseLayout=void 0;U=R.BaseLayout=class{};var O={};Object.defineProperty(O,"__esModule",{value:!0});var V=O.DOMEmitter=void 0;V=O.DOMEmitter=class{constructor(t){this.container=t}dispatchLocalEvent(t,e){const i={...e,type:t,tabSelector:`tab-${e.name}`,containerSelector:`container-${e.name}`,topic:"openfin-DOM-event"};this.container.dispatchEvent(new CustomEvent(t,{detail:i}))}};var B={};Object.defineProperty(B,"__esModule",{value:!0});var H=B.mapLayoutContentItemsImmutableSync=B.mapLayoutContentItemsImmutable=W=B.isVisible=void 0;var W=B.isVisible=t=>(0!==t.offsetWidth||0!==t.offsetHeight)&&"hidden"!==window.getComputedStyle(t).visibility&&t.offsetTop>=0&&t.offsetLeft>=0&&t.offsetTop<=window.innerHeight&&t.offsetLeft<=window.innerWidth;const F=t=>"type"in t&&"component"===t.type;B.mapLayoutContentItemsImmutable=async function t(e,i){return F(i)?e(i):{...i,content:await Promise.all(i.content?.map((i=>t(e,i))))}},H=B.mapLayoutContentItemsImmutableSync=function t(e,i){return F(i)?e(i):{...i,content:i.content?.map((i=>t(e,i)))}};class N extends Error{constructor(t,e){super(e),this.type=t}}class G extends N{constructor(t,e){super("Configuration",t),this.node=e}}class j extends N{constructor(t){super("PopoutBlocked",t)}}class $ extends N{constructor(t){super("API",t)}}class Z extends N{constructor(t){super("Bind",t)}}class q extends Error{constructor(t,e,i){super(`${t}: ${e}${void 0===i?"":": "+i}`)}}class X extends q{constructor(t,e){super("Assert",t,e)}}class Y extends q{constructor(t,e,i){super("UnreachableCase",t,`${e}${void 0===i?"":": "+i}`)}}class K extends q{constructor(t,e){super("UnexpectedNull",t,e)}}class J extends q{constructor(t,e){super("UnexpectedUndefined",t,e)}}var Q;!function(t){let e=!1;const i={PopoutCannotBeCreatedWithGroundItemConfig:{id:0,default:"Popout cannot be created with ground ItemConfig"},PleaseRegisterAConstructorFunction:{id:1,default:"Please register a constructor function"},ComponentTypeNotRegisteredAndBindComponentEventHandlerNotAssigned:{id:2,default:"Component type not registered and BindComponentEvent handler not assigned"},ComponentIsAlreadyRegistered:{id:3,default:"Component is already registered"},ComponentIsNotVirtuable:{id:4,default:"Component is not virtuable. Requires rootHtmlElement field/getter"},VirtualComponentDoesNotHaveRootHtmlElement:{id:5,default:'Virtual component does not have getter "rootHtmlElement"'},ItemConfigIsNotTypeComponent:{id:6,default:"ItemConfig is not of type component"},InvalidNumberPartInSizeString:{id:7,default:"Invalid number part in size string"},UnknownUnitInSizeString:{id:8,default:"Unknown unit in size string"},UnsupportedUnitInSizeString:{id:9,default:"Unsupported unit in size string"}};t.idCount=Object.keys(i).length;const n=Object.values(i);t.checkInitialise=function(){if(!e)for(let e=0;e="0"&&t<="9"}function Tt(t,e){const i=zt(e);t.style.width=i}function At(t,e){const i=zt(e);t.style.height=i}function kt(t){return{width:t.offsetWidth,height:t.offsetHeight}}function Dt(t,e){t.style.display=e?"":"none"}function Rt(t,e){if(void 0!==e)for(const i in e)if(e.hasOwnProperty(i)){const n=e[i],o=t[i];t[i]=Ut(o,n)}return t}function Ut(t,e){if("object"!=typeof e)return e;if(Array.isArray(e)){const t=e.length,i=new Array(t);for(let n=0;n36)throw new Error("Too many keys in config minifier map")},t.translateObject=n}(dt||(dt={})),function(t){t.defaults={type:at.ground,content:[],size:1,sizeUnit:ht.Fractional,minSize:void 0,minSizeUnit:ht.Pixel,id:"",isClosable:!0},t.createCopy=function(t,e){switch(t.type){case at.ground:case at.row:case at.column:return gt.createCopy(t,e);case at.stack:return ut.createCopy(t,e);case at.component:return pt.createCopy(t);default:throw new Y("CICC91354",t.type,"Invalid Config Item type specified")}},t.createDefault=function(t){switch(t){case at.ground:throw new X("CICCDR91562");case at.row:case at.column:return gt.createDefault(t);case at.stack:return ut.createDefault();case at.component:return pt.createDefault();default:throw new Y("CICCDD91563",t,"Invalid Config Item type specified")}},t.isComponentItem=function(t){return t.type===at.component},t.isStackItem=function(t){return t.type===at.stack},t.isGroundItem=function(t){return t.type===at.ground}}(ct||(ct={})),function(t){t.defaultMaximised=!1,function(t){t.createCopy=function(t,e){return void 0===t?void 0:{show:null!=e?e:t.show,popout:t.popout,close:t.close,maximise:t.maximise,minimise:t.minimise,tabDropdown:t.tabDropdown}}}(t.Header||(t.Header={}))}(mt||(mt={})),function(t){function e(t){const e=t.length,i=new Array(e);for(let n=0;n"__glMaximised"===t));t>0&&(o=!0,n=n.splice(t,1)),e=n.length>0?n[0]:ct.defaults.id}else e=n;return i=void 0!==t.maximised?t.maximised:o,{id:e,maximised:i}}}(wt||(wt={})),function(t){function e(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0;return{resolved:!0,root:Et.resolve(i),openPopouts:t.resolveOpenPopouts(e.openPopouts),dimensions:t.Dimensions.resolve(e.dimensions),settings:t.Settings.resolve(e.settings),header:t.Header.resolve(e.header,e.settings,e.labels)}}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:Lt.fromResolvedArray(e.openPopouts),settings:_t.Settings.createCopy(e.settings),dimensions:t.Dimensions.fromResolved(e.dimensions),header:_t.Header.createCopy(e.header)}},t.isResolved=function(t){const e=t;return void 0!==e.resolved&&!0===e.resolved},t.resolveOpenPopouts=function(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0,{root:Et.resolve(o),openPopouts:xt.resolveOpenPopouts(e.openPopouts),dimensions:xt.Dimensions.resolve(e.dimensions),settings:xt.Settings.resolve(e.settings),header:xt.Header.resolve(e.header,e.settings,e.labels),parentId:null!==(i=e.parentId)&&void 0!==i?i:null,indexInParent:null!==(n=e.indexInParent)&&void 0!==n?n:null,window:t.Window.resolve(e.window,e.dimensions),resolved:!0}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:i(e.openPopouts),dimensions:xt.Dimensions.fromResolved(e.dimensions),settings:_t.Settings.createCopy(e.settings),header:_t.Header.createCopy(e.header),parentId:e.parentId,indexInParent:e.indexInParent,window:t.Window.fromResolved(e.window)}},t.fromResolvedArray=i}(Lt||(Lt={}));class Wt{constructor(){this._allEventSubscriptions=[],this._subscriptionsMap=new Map,this.unbind=this.removeEventListener,this.trigger=this.emit}tryBubbleEvent(t,e){}emit(t,...e){let i=this._subscriptionsMap.get(t);if(void 0!==i){i=i.slice();for(let t=0;t0){const n=e.slice();n.unshift(t);const o=this._allEventSubscriptions.slice();for(let t=0;t0?n.contentItems[0]:n,e=0);const o=this._layoutManager.createAndInitContentItem(i,t);t.addChild(o,e),this._layoutManager.layoutConfig.settings.popInOnClose?this._onClose():this.close()}createWindow(){const t=this.createUrl(),e=Math.floor(1e6*Math.random()).toString(36),i=this.serializeWindowFeatures({width:this._initialWindowSize.width,height:this._initialWindowSize.height,innerWidth:this._initialWindowSize.width,innerHeight:this._initialWindowSize.height,menubar:"no",toolbar:"no",location:"no",personalbar:"no",resizable:"yes",scrollbars:"no",status:"no"});if(this._popoutWindow=globalThis.open(t,e,i),this._popoutWindow)this._popoutWindow.addEventListener("load",(()=>this.positionWindow()),{passive:!0}),this._popoutWindow.addEventListener("beforeunload",(()=>{this._layoutManager.layoutConfig.settings.popInOnClose?this.popIn():this._onClose()}),{passive:!0}),this._checkReadyInterval=setInterval((()=>this.checkReady()),10);else if(!0===this._layoutManager.layoutConfig.settings.blockedPopoutsThrowError){throw new j("Popout blocked")}}checkReady(){if(null===this._popoutWindow)throw new K("BPCR01844");this._popoutWindow.__glInstance&&this._popoutWindow.__glInstance.isInitialised&&(this.onInitialised(),void 0!==this._checkReadyInterval&&(clearInterval(this._checkReadyInterval),this._checkReadyInterval=void 0))}serializeWindowFeatures(t){const e=[];for(const i in t)e.push(i+"="+t[i].toString());return e.join(",")}createUrl(){const t="gl-window-config-"+Ot(),e=_t.minifyConfig(this._config);try{localStorage.setItem(t,JSON.stringify(e))}catch(t){throw new Error("Error while writing to localStorage "+function(t){return t instanceof Error?t.message:"string"==typeof t?t:"Unknown Error"}(t))}const i=new URL(location.href);return i.searchParams.set("gl-window",t),i.toString()}positionWindow(){if(null===this._popoutWindow)throw new Error("BrowserPopout.positionWindow: null popoutWindow");this._popoutWindow.moveTo(this._initialWindowSize.left,this._initialWindowSize.top),this._popoutWindow.focus()}onInitialised(){this._isInitialised=!0,this.getGlInstance().on("popIn",(()=>this.popIn())),this.emit("initialised")}_onClose(){setTimeout((()=>this.emit("closed")),50)}}class Gt extends Wt{constructor(t,e,i,n){super(),this.layoutManager=t,this._parent=i,this._element=n,this._popInParentIds=[],this._type=e.type,this._id=e.id,this._isInitialised=!1,this.isGround=!1,this.isRow=!1,this.isColumn=!1,this.isStack=!1,this.isComponent=!1,this.size=e.size,this.sizeUnit=e.sizeUnit,this.minSize=e.minSize,this.minSizeUnit=e.minSizeUnit,this._isClosable=e.isClosable,this._pendingEventPropagations={},this._throttledEvents=["stateChanged"],this._contentItems=this.createContentItems(e.content)}get type(){return this._type}get id(){return this._id}set id(t){this._id=t}get popInParentIds(){return this._popInParentIds}get parent(){return this._parent}get contentItems(){return this._contentItems}get isClosable(){return this._isClosable}get element(){return this._element}get isInitialised(){return this._isInitialised}static isStack(t){return t.isStack}static isComponentItem(t){return t.isComponent}static isComponentParentableItem(t){return t.isStack||t.isGround}removeChild(t,e=!1){const i=this._contentItems.indexOf(t);if(-1===i)throw new Error("Can't remove child item. Unknown content item");if(e||this._contentItems[i].destroy(),this._contentItems.splice(i,1),this._contentItems.length>0)this.updateSize(!1);else if(!this.isGround&&!0===this._isClosable){if(null===this._parent)throw new K("CIUC00874");this._parent.removeChild(this)}}addChild(t,e,i){return null!=e||(e=this._contentItems.length),this._contentItems.splice(e,0,t),t.setParent(this),!0===this._isInitialised&&!1===t._isInitialised&&t.init(),e}replaceChild(t,e,i=!1){const n=this._contentItems.indexOf(t),o=t._element.parentNode;if(-1===n)throw new X("CIRCI23232","Can't replace child. oldChild is not child of this");if(null===o)throw new K("CIRCP23232");if(o.replaceChild(e._element,t._element),!0===i&&(t._parent=null,t.destroy()),this._contentItems[n]=e,e.setParent(this),e.size=t.size,e.sizeUnit=t.sizeUnit,e.minSize=t.minSize,e.minSizeUnit=t.minSizeUnit,null===e._parent)throw new K("CIRCNC45699");!0===e._parent._isInitialised&&!1===e._isInitialised&&e.init(),this.updateSize(!1)}remove(){if(null===this._parent)throw new K("CIR11110");this._parent.removeChild(this)}popout(){const t=Ot(),e=this.layoutManager.createPopoutFromContentItem(this,void 0,t,void 0);return this.emitBaseBubblingEvent("stateChanged"),e}calculateConfigContent(){const t=this._contentItems,e=t.length,i=new Array(e);for(let n=0;nthis.propagateEventToLayoutManager(t,e))))}propagateEventToLayoutManager(t,e){this._pendingEventPropagations[t]=!1,this.layoutManager.emitUnknown(t,e)}}class jt extends Gt{constructor(t,e,i){super(t,e,i,document.createElement("div")),this._parentItem=i,this._focused=!1,this.isComponent=!0,this._reorderEnabled=e.reorderEnabled,this.applyUpdatableConfig(e),this._initialWantMaximise=e.maximised;const n=document.createElement("div");n.classList.add("lm_content"),this.element.appendChild(n),this._container=new Ft(e,this,t,n,(t=>this.handleUpdateItemConfigEvent(t)),(()=>this.show()),(()=>this.hide()),(t=>this.focus(t)),(t=>this.blur(t)))}get componentName(){return this._container.componentType}get componentType(){return this._container.componentType}get reorderEnabled(){return this._reorderEnabled}get initialWantMaximise(){return this._initialWantMaximise}get component(){return this._container.component}get container(){return this._container}get parentItem(){return this._parentItem}get headerConfig(){return this._headerConfig}get title(){return this._title}get tab(){return this._tab}get focused(){return this._focused}destroy(){this._container.destroy(),super.destroy()}applyUpdatableConfig(t){this.setTitle(t.title),this._headerConfig=t.header}toConfig(){const t=this._container.stateRequestEvent,e=void 0===t?this._container.state:t();return{type:at.component,content:[],size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,maximised:!1,isClosable:this.isClosable,reorderEnabled:this._reorderEnabled,title:this._title,header:mt.Header.createCopy(this._headerConfig),componentType:pt.copyComponentType(this.componentType),componentState:e}}close(){if(null===this.parent)throw new K("CIC68883");this.parent.removeChild(this,!1)}enterDragMode(t,e){Tt(this.element,t),At(this.element,e),this._container.enterDragMode(t,e)}exitDragMode(){this._container.exitDragMode()}enterStackMaximised(){this._container.enterStackMaximised()}exitStackMaximised(){this._container.exitStackMaximised()}drag(){this._container.drag()}updateSize(t){this.updateNodeSize(t)}init(){this.updateNodeSize(!1),super.init(),this._container.emit("open"),this.initContentItems()}setTitle(t){this._title=t,this.emit("titleChanged",t),this.emit("stateChanged")}setTab(t){this._tab=t,this.emit("tab",t),this._container.setTab(t)}hide(){super.hide(),this._container.setVisibility(!1)}show(){super.show(),this._container.setVisibility(!0)}focus(t=!1){this.parentItem.setActiveComponentItem(this,!0,t)}setFocused(t){this._focused=!0,this.tab.setFocused(),t||this.emitBaseBubblingEvent("focus")}blur(t=!1){this._focused&&this.layoutManager.setFocusedComponentItem(void 0,t)}setBlurred(t){this._focused=!1,this.tab.setBlurred(),t||this.emitBaseBubblingEvent("blur")}setParent(t){this._parentItem=t,super.setParent(t)}handleUpdateItemConfigEvent(t){this.applyUpdatableConfig(t)}updateNodeSize(t){if("none"!==this.element.style.display){const{width:e,height:i}=kt(this.element);this._container.setSizeToNodeSize(e,i,t)}}}class $t extends Gt{constructor(){super(...arguments),this._focused=!1}get focused(){return this._focused}setFocusedValue(t){this._focused=t}}class Zt extends Wt{constructor(t,e){super(),this._eElement=t,this._pointerTracking=!1,this._pointerDownEventListener=t=>this.onPointerDown(t),this._pointerMoveEventListener=t=>this.onPointerMove(t),this._pointerUpEventListener=t=>this.onPointerUp(t),this._timeout=void 0,this._allowableTargets=[t,...e],this._oDocument=document,this._eBody=document.body,this._nDelay=1800,this._nDistance=10,this._nX=0,this._nY=0,this._nOriginalX=0,this._nOriginalY=0,this._dragging=!1,this._eElement.addEventListener("pointerdown",this._pointerDownEventListener,{passive:!0})}destroy(){this.checkRemovePointerTrackingEventListeners(),this._eElement.removeEventListener("pointerdown",this._pointerDownEventListener)}cancelDrag(){this.processDragStop(void 0)}onPointerDown(t){if(this._allowableTargets.includes(t.target)&&t.isPrimary){const e=this.getPointerCoordinates(t);this.processPointerDown(e)}}processPointerDown(t){this._nOriginalX=t.x,this._nOriginalY=t.y,this._oDocument.addEventListener("pointermove",this._pointerMoveEventListener),this._oDocument.addEventListener("pointerup",this._pointerUpEventListener,{passive:!0}),this._pointerTracking=!0,this._timeout=setTimeout((()=>{try{this.startDrag()}catch(t){throw console.error(t),t}}),this._nDelay)}onPointerMove(t){this._pointerTracking&&(this.processDragMove(t),t.preventDefault())}processDragMove(t){this._nX=t.pageX-this._nOriginalX,this._nY=t.pageY-this._nOriginalY,!1===this._dragging&&(Math.abs(this._nX)>this._nDistance||Math.abs(this._nY)>this._nDistance)&&this.startDrag(),this._dragging&&this.emit("drag",this._nX,this._nY,t)}onPointerUp(t){this.processDragStop(t)}processDragStop(t){var e;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this.checkRemovePointerTrackingEventListeners(),!0===this._dragging&&(this._eBody.classList.remove("lm_dragging"),this._eElement.classList.remove("lm_dragging"),null===(e=this._oDocument.querySelector("iframe"))||void 0===e||e.style.setProperty("pointer-events",""),this._dragging=!1,this.emit("dragStop",t))}checkRemovePointerTrackingEventListeners(){this._pointerTracking&&(this._oDocument.removeEventListener("pointermove",this._pointerMoveEventListener),this._oDocument.removeEventListener("pointerup",this._pointerUpEventListener),this._pointerTracking=!1)}startDrag(){var t;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this._dragging=!0,this._eBody.classList.add("lm_dragging"),this._eElement.classList.add("lm_dragging"),null===(t=this._oDocument.querySelector("iframe"))||void 0===t||t.style.setProperty("pointer-events","none"),this.emit("dragStart",this._nOriginalX,this._nOriginalY)}getPointerCoordinates(t){return{x:t.pageX,y:t.pageY}}}class qt{constructor(t,e,i){this._isVertical=t,this._size=e,this._grabSize=i0){const i=this.createSplitter(Math.max(0,e-1)).element;e>0?(this.contentItems[e-1].element.insertAdjacentElement("afterend",i),i.insertAdjacentElement("afterend",t.element)):(this.contentItems[0].element.insertAdjacentElement("beforebegin",i),i.insertAdjacentElement("beforebegin",t.element))}else this._childElementContainer.appendChild(t.element);super.addChild(t,e);const n=1/this.contentItems.length*100;if(!0===i)return this.emitBaseBubblingEvent("stateChanged"),e;for(let e=0;e0&&(this.calculateRelativeSizes(),this.setAbsoluteSizes()),this.emitBaseBubblingEvent("stateChanged"),this.emit("resize")}setAbsoluteSizes(){const t=this.calculateAbsoluteSizes();for(let e=0;e0&&t.itemSizes[e]++,this._isColumn?(Tt(this.contentItems[e].element,t.crossAxisSize),At(this.contentItems[e].element,t.itemSizes[e])):(Tt(this.contentItems[e].element,t.itemSizes[e]),At(this.contentItems[e].element,t.crossAxisSize))}calculateAbsoluteSizes(){const t=(this.contentItems.length-1)*this._splitterSize,{width:e,height:i}=kt(this.element);let n,o;this._isColumn?(n=i-t,o=e):(n=e-t,o=i);let s=0;const r=[];for(let t=0;t0){const n=100-t;for(let t=0;t100&&e.length>0){for(let t=0;te)return;{const r=i/e;let a=i;for(let e=0;ethis.onSplitterDrag(e,t,i))),e.on("dragStop",(()=>this.onSplitterDragStop(e))),e.on("dragStart",(()=>this.onSplitterDragStart(e))),this._splitter.splice(t,0,e),e}getSplitItems(t){const e=this._splitter.indexOf(t);return{before:this.contentItems[e],after:this.contentItems[e+1]}}calculateContentItemMinSize(t){const e=t.minSize;if(void 0!==e){if(t.minSizeUnit===ht.Pixel)return e;throw new X("ROCGMD98831",JSON.stringify(t))}{const t=this.layoutManager.layoutConfig.dimensions;return this._isColumn?t.defaultMinItemHeight:t.defaultMinItemWidth}}calculateContentItemsTotalMinSize(t){let e=0;for(const i of t)e+=this.calculateContentItemMinSize(i);return e}onSplitterDragStart(t){const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=this.calculateContentItemsTotalMinSize(e.before.contentItems),s=this.calculateContentItemsTotalMinSize(e.after.contentItems);this._splitterPosition=0,this._splitterMinPosition=-1*(i-o),this._splitterMaxPosition=n-s}onSplitterDrag(t,e,i){let n=this._isColumn?i:e;if(null===this._splitterMinPosition||null===this._splitterMaxPosition)throw new K("ROCOSD59226");n=Math.max(n,this._splitterMinPosition),n=Math.min(n,this._splitterMaxPosition),this._splitterPosition=n;const o=zt(n);this._isColumn?t.element.style.top=o:t.element.style.left=o}onSplitterDragStop(t){if(null===this._splitterPosition)throw new K("ROCOSDS66932");{const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=(this._splitterPosition+i)/(i+n),s=e.before.size+e.after.size;e.before.size=o*s,e.after.size=(1-o)*s,t.element.style.top=zt(0),t.element.style.left=zt(0),globalThis.requestAnimationFrame((()=>this.updateSize(!1)))}}}!function(t){t.getElementDimensionSize=function(t,e){return"width"===e?function(t){return t.offsetWidth}(t):function(t){return t.offsetHeight}(t)},t.setElementDimensionSize=function(t,e,i){return"width"===e?Tt(t,i):At(t,i)},t.createElement=function(t,e){const i=t.createElement("div");return i.classList.add("lm_item"),e?i.classList.add("lm_column"):i.classList.add("lm_row"),i}}(Xt||(Xt={}));class Yt extends $t{constructor(t,e,i){super(t,vt.create(e),null,Yt.createElement(document)),this.isGround=!0,this._childElementContainer=this.element,this._containerElement=i;let n=null;for(;;){const t=n?n.previousSibling:this._containerElement.lastChild;if(!(t instanceof Element&&t.classList.contains("lm_content")))break;n=t}this._containerElement.insertBefore(this.element,n)}init(){if(!0!==this.isInitialised){this.updateNodeSize();for(let t=0;t0?this.contentItems[0]:this,n.isComponent)throw new Error("Cannot add item as child to ComponentItem");{const t=this.layoutManager.createAndInitContentItem(i,n);return e=n.addChild(t,e),n===this?-1:e}}loadComponentAsRoot(t){this.clearRoot();const e=Ct.resolve(t,!1);if(e.maximised)throw new Error("Root Component cannot be maximised");{const t=new jt(this.layoutManager,e,this);t.init(),this.addChild(t,0)}}addChild(t,e){if(this.contentItems.length>0)throw new Error("Ground node can only have a single child");return this._childElementContainer.appendChild(t.element),e=super.addChild(t,e),this.updateSize(!1),this.emitBaseBubblingEvent("stateChanged"),e}calculateConfigContent(){const t=this.contentItems,e=t.length,i=new Array(e);for(let n=0;n0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e)),this.updateContentItemsSize(!1))}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}createSideAreas(){const t=Yt.Area.oppositeSides,e=new Array(Object.keys(t).length);let i=0;for(const n in t){const o=n,s=this.getElementArea();if(null===s)throw new K("RCSA77553");s.side=o,"2"===t[o][1]?s[o]=s[t[o]]-50:s[o]=s[t[o]]+50,s.surface=(s.x2-s.x1)*(s.y2-s.y1),e[i++]=s}return e}highlightDropZone(t,e,i){this.layoutManager.tabDropPlaceholder.remove(),super.highlightDropZone(t,e,i)}onDrop(t,e){if(t.isComponent){const e=ut.createDefault(),i=t;e.header=mt.Header.createCopy(i.headerConfig);const n=this.layoutManager.createAndInitContentItem(e,this);n.addChild(t),t=n}if(0===this.contentItems.length)this.addChild(t);else{if(t.type===at.row||t.type===at.column){const e=ut.createDefault(),i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}const i="x"==e.side[0]?at.row:at.column,n="2"==e.side[1],o=this.contentItems[0];if(o instanceof Xt&&o.type===i){const e=o.contentItems[n?0:o.contentItems.length-1];o.addChild(t,n?0:void 0,!0),e.size*=.5,t.size=e.size,t.sizeUnit=ht.Percent,o.updateSize(!1)}else{const e=ct.createDefault(i),s=this.layoutManager.createContentItem(e,this);this.replaceChild(o,s),s.addChild(t,n?0:void 0,!0),s.addChild(o,n?void 0:0,!0),o.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}}dock(){throw new X("GID87731")}validateDocking(){throw new X("GIVD87732")}getAllContentItems(){const t=[this];return this.deepGetAllContentItems(this.contentItems,t),t}getConfigMaximisedItems(){const t=[];return this.deepFilterContentItems(this.contentItems,t,(t=>!(!Gt.isStack(t)||!t.initialWantMaximise)||!(!Gt.isComponentItem(t)||!t.initialWantMaximise))),t}getItemsByPopInParentId(t){const e=[];return this.deepFilterContentItems(this.contentItems,e,(e=>e.popInParentIds.includes(t))),e}toConfig(){throw new Error("Cannot generate GroundItem config")}setActiveComponentItem(t,e,i){}updateNodeSize(){const{width:t,height:e}=kt(this._containerElement);Tt(this.element,t),At(this.element,e),this.contentItems.length>0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e))}deepGetAllContentItems(t,e){for(let i=0;ithis.onClick(t),this._touchStartEventListener=t=>this.onTouchStart(t),this._element=document.createElement("div"),this._element.classList.add(i),this._element.title=e,this._header.on("destroy",(()=>this.destroy())),this._element.addEventListener("click",this._clickEventListener,{passive:!0}),this._element.addEventListener("touchstart",this._touchStartEventListener,{passive:!0}),this._header.controlsContainerElement.appendChild(this._element)}get element(){return this._element}destroy(){var t;this._element.removeEventListener("click",this._clickEventListener),this._element.removeEventListener("touchstart",this._touchStartEventListener),null===(t=this._element.parentNode)||void 0===t||t.removeChild(this._element)}onClick(t){this._pushEvent(t)}onTouchStart(t){this._pushEvent(t)}}class Jt{constructor(t,e,i,n,o){var s;this._layoutManager=t,this._componentItem=e,this._closeEvent=i,this._focusEvent=n,this._dragStartEvent=o,this._isActive=!1,this._tabClickListener=t=>this.onTabClickDown(t),this._tabTouchStartListener=t=>this.onTabTouchStart(t),this._closeClickListener=()=>this.onCloseClick(),this._closeTouchStartListener=()=>this.onCloseTouchStart(),this._dragStartListener=(t,e)=>this.onDragStart(t,e),this._contentItemDestroyListener=()=>this.onContentItemDestroy(),this._tabTitleChangedListener=t=>this.setTitle(t),this._element=document.createElement("div"),this._element.classList.add("lm_tab"),this._titleElement=document.createElement("span"),this._titleElement.classList.add("lm_title"),this._closeElement=document.createElement("div"),this._closeElement.classList.add("lm_close_tab"),this._element.appendChild(this._titleElement),this._element.appendChild(this._closeElement),e.isClosable?this._closeElement.style.display="":this._closeElement.style.display="none",this.setTitle(e.title),this._componentItem.on("titleChanged",this._tabTitleChangedListener);(null!==(s=e.reorderEnabled)&&void 0!==s?s:this._layoutManager.layoutConfig.settings.reorderEnabled)&&this.enableReorder(),this._element.addEventListener("click",this._tabClickListener,{passive:!0}),this._element.addEventListener("touchstart",this._tabTouchStartListener,{passive:!0}),this._componentItem.isClosable?(this._closeElement.addEventListener("click",this._closeClickListener,{passive:!0}),this._closeElement.addEventListener("touchstart",this._closeTouchStartListener,{passive:!0})):(this._closeElement.remove(),this._closeElement=void 0),this._componentItem.setTab(this),this._layoutManager.emit("tabCreated",this)}get isActive(){return this._isActive}get componentItem(){return this._componentItem}get contentItem(){return this._componentItem}get element(){return this._element}get titleElement(){return this._titleElement}get closeElement(){return this._closeElement}get reorderEnabled(){return void 0!==this._dragListener}set reorderEnabled(t){t!==this.reorderEnabled&&(t?this.enableReorder():this.disableReorder())}setTitle(t){this._titleElement.innerText=t,this._element.title=t}setActive(t){t!==this._isActive&&(this._isActive=t,t?this._element.classList.add("lm_active"):this._element.classList.remove("lm_active"))}destroy(){var t,e;this._closeEvent=void 0,this._focusEvent=void 0,this._dragStartEvent=void 0,this._element.removeEventListener("click",this._tabClickListener),this._element.removeEventListener("touchstart",this._tabTouchStartListener),null===(t=this._closeElement)||void 0===t||t.removeEventListener("click",this._closeClickListener),null===(e=this._closeElement)||void 0===e||e.removeEventListener("touchstart",this._closeTouchStartListener),this._componentItem.off("titleChanged",this._tabTitleChangedListener),this.reorderEnabled&&this.disableReorder(),this._element.remove()}setBlurred(){this._element.classList.remove("lm_focused"),this._titleElement.classList.remove("lm_focused")}setFocused(){this._element.classList.add("lm_focused"),this._titleElement.classList.add("lm_focused")}onDragStart(t,e){if(void 0===this._dragListener)throw new J("TODSDLU10093");if(void 0===this._dragStartEvent)throw new J("TODS23309");this._dragStartEvent(t,e,this._dragListener,this.componentItem)}onContentItemDestroy(){void 0!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=void 0)}onTabClickDown(t){const e=t.target;e!==this._element&&e!==this._titleElement||(0===t.button?this.notifyFocus():1===t.button&&this._componentItem.isClosable&&this.notifyClose())}onTabTouchStart(t){t.target===this._element&&this.notifyFocus()}onCloseClick(){this.notifyClose()}onCloseTouchStart(){this.notifyClose()}notifyClose(){if(void 0===this._closeEvent)throw new J("TNC15007");this._closeEvent(this._componentItem)}notifyFocus(){if(void 0===this._focusEvent)throw new J("TNA15007");this._focusEvent(this._componentItem)}enableReorder(){this._dragListener=new Zt(this._element,[this._titleElement]),this._dragListener.on("dragStart",this._dragStartListener),this._componentItem.on("destroy",this._contentItemDestroyListener)}disableReorder(){if(void 0===this._dragListener)throw new J("TDR87745");this._componentItem.off("destroy",this._contentItemDestroyListener),this._dragListener.off("dragStart",this._dragStartListener),this._dragListener=void 0}}class Qt{constructor(t,e,i,n,o){this._layoutManager=t,this._componentRemoveEvent=e,this._componentFocusEvent=i,this._componentDragStartEvent=n,this._dropdownActiveChangedEvent=o,this._tabs=[],this._lastVisibleTabIndex=-1,this._dropdownActive=!1,this._element=document.createElement("section"),this._element.classList.add("lm_tabs"),this._dropdownElement=document.createElement("section"),this._dropdownElement.classList.add("lm_tabdropdown_list"),this._dropdownElement.style.display="none"}get tabs(){return this._tabs}get tabCount(){return this._tabs.length}get lastVisibleTabIndex(){return this._lastVisibleTabIndex}get element(){return this._element}get dropdownElement(){return this._dropdownElement}get dropdownActive(){return this._dropdownActive}destroy(){for(let t=0;tthis.handleTabCloseEvent(t)),(t=>this.handleTabFocusEvent(t)),((t,e,i,n)=>this.handleTabDragStartEvent(t,e,i,n)));void 0===e&&(e=this._tabs.length),this._tabs.splice(e,0,i),ethis._lastVisibleTabIndex){const t=this._tabs[e];for(let t=e;t>0;t--)this._tabs[t]=this._tabs[t-1];this._tabs[0]=t}}updateTabSizes(t,e){let i=!1;this.tryUpdateTabSizes(i,t,e)||(i=!0,this.tryUpdateTabSizes(i,t,e)),i!==this._dropdownActive&&(this._dropdownActive=i,this._dropdownActiveChangedEvent())}tryUpdateTabSizes(t,e,i){if(this._tabs.length>0){if(void 0===i)throw new Error("non-empty tabs must have active component item");let n=0,o=!1;const s=this._layoutManager.layoutConfig.settings.tabOverlapAllowance,r=this._tabs.indexOf(i.tab),a=this._tabs[r];this._lastVisibleTabIndex=-1;for(let i=0;ie){if(o)i===r&&(l.style.zIndex="auto",l.style.marginLeft="",l.parentElement!==this._element&&this._element.appendChild(l));else{let t;if(t=r>0&&r<=i?(d-e)/(i-1):(d-e)/i,tthis.onClick(t),this._touchStartListener=t=>this.onTouchStart(t),this._rowColumnClosable=!0,this._closeButton=null,this._popoutButton=null,this._tabsContainer=new Qt(this._layoutManager,(t=>this.handleTabInitiatedComponentRemoveEvent(t)),(t=>this.handleTabInitiatedComponentFocusEvent(t)),((t,e,i,n)=>this.handleTabInitiatedDragStartEvent(t,e,i,n)),(()=>this.processTabDropdownActiveChanged())),this._show=i.show,this._popoutEnabled=i.popoutEnabled,this._popoutLabel=i.popoutLabel,this._maximiseEnabled=i.maximiseEnabled,this._maximiseLabel=i.maximiseLabel,this._minimiseEnabled=i.minimiseEnabled,this._minimiseLabel=i.minimiseLabel,this._closeEnabled=i.closeEnabled,this._closeLabel=i.closeLabel,this._tabDropdownEnabled=i.tabDropdownEnabled,this._tabDropdownLabel=i.tabDropdownLabel,this.setSide(i.side),this._canRemoveComponent=this._configClosable,this._element=document.createElement("section"),this._element.classList.add("lm_header"),this._controlsContainerElement=document.createElement("section"),this._controlsContainerElement.classList.add("lm_controls"),this._element.appendChild(this._tabsContainer.element),this._element.appendChild(this._controlsContainerElement),this._element.appendChild(this._tabsContainer.dropdownElement),this._element.addEventListener("click",this._clickListener,{passive:!0}),this._element.addEventListener("touchstart",this._touchStartListener,{passive:!0}),this._documentMouseUpListener=()=>this._tabsContainer.hideAdditionalTabsDropdown(),globalThis.document.addEventListener("mouseup",this._documentMouseUpListener,{passive:!0}),this._tabControlOffset=this._layoutManager.layoutConfig.settings.tabControlOffset,this._tabDropdownEnabled&&(this._tabDropdownButton=new Kt(this,this._tabDropdownLabel,"lm_tabdropdown",(()=>this._tabsContainer.showAdditionalTabsDropdown()))),this._popoutEnabled&&(this._popoutButton=new Kt(this,this._popoutLabel,"lm_popout",(()=>this.handleButtonPopoutEvent()))),this._maximiseEnabled&&(this._maximiseButton=new Kt(this,this._maximiseLabel,"lm_maximise",(t=>this.handleButtonMaximiseToggleEvent(t)))),this._configClosable&&(this._closeButton=new Kt(this,this._closeLabel,"lm_close",(()=>s()))),this.processTabDropdownActiveChanged()}get show(){return this._show}get side(){return this._side}get leftRightSided(){return this._leftRightSided}get layoutManager(){return this._layoutManager}get parent(){return this._parent}get tabs(){return this._tabsContainer.tabs}get lastVisibleTabIndex(){return this._tabsContainer.lastVisibleTabIndex}get element(){return this._element}get tabsContainerElement(){return this._tabsContainer.element}get controlsContainerElement(){return this._controlsContainerElement}destroy(){this.emit("destroy"),this._popoutEvent=void 0,this._maximiseToggleEvent=void 0,this._clickEvent=void 0,this._touchStartEvent=void 0,this._componentRemoveEvent=void 0,this._componentFocusEvent=void 0,this._componentDragStartEvent=void 0,this._tabsContainer.destroy(),globalThis.document.removeEventListener("mouseup",this._documentMouseUpListener),this._element.remove()}createTab(t,e){this._tabsContainer.createTab(t,e)}removeTab(t){this._tabsContainer.removeTab(t)}processActiveComponentChanged(t){this._tabsContainer.processActiveComponentChanged(t),this.updateTabSizes()}setSide(t){this._side=t,this._leftRightSided=[nt.right,nt.left].includes(this._side)}setRowColumnClosable(t){this._rowColumnClosable=t,this.updateClosability()}updateClosability(){let t;if(this._configClosable)if(this._rowColumnClosable){t=!0;const e=this.tabs.length;for(let i=0;i1}applyFocusedValue(t){t?this._element.classList.add("lm_focused"):this._element.classList.remove("lm_focused")}processMaximised(){if(void 0===this._maximiseButton)throw new J("HPMAX16997");this._maximiseButton.element.setAttribute("title",this._minimiseLabel)}processMinimised(){if(void 0===this._maximiseButton)throw new J("HPMIN16997");this._maximiseButton.element.setAttribute("title",this._maximiseLabel)}updateTabSizes(){if(this._tabsContainer.tabCount>0){const t=this._show?this._layoutManager.layoutConfig.dimensions.headerHeight:0;let e;this._leftRightSided?(this._element.style.height="",this._element.style.width=zt(t)):(this._element.style.width="",this._element.style.height=zt(t)),e=this._leftRightSided?this._element.offsetHeight-this._controlsContainerElement.offsetHeight-this._tabControlOffset:this._element.offsetWidth-this._controlsContainerElement.offsetWidth-this._tabControlOffset,this._tabsContainer.updateTabSizes(e,this._getActiveComponentItemEvent())}}handleTabInitiatedComponentRemoveEvent(t){if(this._canRemoveComponent){if(void 0===this._componentRemoveEvent)throw new J("HHTCE22294");this._componentRemoveEvent(t)}}handleTabInitiatedComponentFocusEvent(t){if(void 0===this._componentFocusEvent)throw new J("HHTAE22294");this._componentFocusEvent(t)}handleTabInitiatedDragStartEvent(t,e,i,n){if(this._canRemoveComponent){if(void 0===this._componentDragStartEvent)throw new J("HHTDSE22294");this._componentDragStartEvent(t,e,i,n)}else i.cancelDrag()}processTabDropdownActiveChanged(){void 0!==this._tabDropdownButton&&Dt(this._tabDropdownButton.element,this._tabsContainer.dropdownActive)}handleButtonPopoutEvent(){if(this._layoutManager.layoutConfig.settings.popoutWholeStack){if(void 0===this._popoutEvent)throw new J("HHBPOE17834");this._popoutEvent()}else{const t=this._getActiveComponentItemEvent();t&&t.popout()}}handleButtonMaximiseToggleEvent(t){if(void 0===this._maximiseToggleEvent)throw new J("HHBMTE16834");this._maximiseToggleEvent()}onClick(t){t.target===this._element&&this.notifyClick(t)}onTouchStart(t){t.target===this._element&&this.notifyTouchStart(t)}notifyClick(t){if(void 0===this._clickEvent)throw new J("HNHC46834");this._clickEvent(t)}notifyTouchStart(t){if(void 0===this._touchStartEvent)throw new J("HNHTS46834");this._touchStartEvent(t)}}class ee extends $t{constructor(t,e,i){var n,o,s,r,a,l,h,d,c,m,u,p,g,f,v,_,y,C,w;super(t,e,i,ee.createElement(document)),this._headerSideChanged=!1,this._resizeListener=()=>this.handleResize(),this._maximisedListener=()=>this.handleMaximised(),this._minimisedListener=()=>this.handleMinimised(),this._headerConfig=e.header;const I=t.layoutConfig.header,b=e.content;let S;if(1!==b.length)S=void 0;else{S=b[0].header}this._initialWantMaximise=e.maximised,this._initialActiveItemIndex=null!==(n=e.activeItemIndex)&&void 0!==n?n:0;const E=null!==(r=null!==(s=null===(o=this._headerConfig)||void 0===o?void 0:o.show)&&void 0!==s?s:null==S?void 0:S.show)&&void 0!==r?r:I.show,x=null!==(h=null!==(l=null===(a=this._headerConfig)||void 0===a?void 0:a.popout)&&void 0!==l?l:null==S?void 0:S.popout)&&void 0!==h?h:I.popout,L=null!==(m=null!==(c=null===(d=this._headerConfig)||void 0===d?void 0:d.maximise)&&void 0!==c?c:null==S?void 0:S.maximise)&&void 0!==m?m:I.maximise,z=null!==(g=null!==(p=null===(u=this._headerConfig)||void 0===u?void 0:u.close)&&void 0!==p?p:null==S?void 0:S.close)&&void 0!==g?g:I.close,M=null!==(_=null!==(v=null===(f=this._headerConfig)||void 0===f?void 0:f.minimise)&&void 0!==v?v:null==S?void 0:S.minimise)&&void 0!==_?_:I.minimise,P=null!==(w=null!==(C=null===(y=this._headerConfig)||void 0===y?void 0:y.tabDropdown)&&void 0!==C?C:null==S?void 0:S.tabDropdown)&&void 0!==w?w:I.tabDropdown;this._maximisedEnabled=!1!==L;const T={show:!1!==E,side:!1===E?nt.top:E,popoutEnabled:!1!==x,popoutLabel:!1===x?"":x,maximiseEnabled:this._maximisedEnabled,maximiseLabel:!1===L?"":L,closeEnabled:!1!==z,closeLabel:!1===z?"":z,minimiseEnabled:!0,minimiseLabel:M,tabDropdownEnabled:!1!==P,tabDropdownLabel:!1===P?"":P};this._header=new te(t,this,T,e.isClosable&&!1!==z,(()=>this.getActiveComponentItem()),(()=>this.remove()),(()=>this.handlePopoutEvent()),(()=>this.toggleMaximise()),(t=>this.handleHeaderClickEvent(t)),(t=>this.handleHeaderTouchStartEvent(t)),(t=>this.handleHeaderComponentRemoveEvent(t)),(t=>this.handleHeaderComponentFocusEvent(t)),((t,e,i,n)=>this.handleHeaderComponentStartDragEvent(t,e,i,n))),this.isStack=!0,this._childElementContainer=document.createElement("section"),this._childElementContainer.classList.add("lm_items"),this.on("resize",this._resizeListener),this._maximisedEnabled&&(this.on("maximised",this._maximisedListener),this.on("minimised",this._minimisedListener)),this.element.appendChild(this._header.element),this.element.appendChild(this._childElementContainer),this.setupHeaderPosition(),this._header.updateClosability()}get childElementContainer(){return this._childElementContainer}get header(){return this._header}get headerShow(){return this._header.show}get headerSide(){return this._header.side}get headerLeftRightSided(){return this._header.leftRightSided}get contentAreaDimensions(){return this._contentAreaDimensions}get initialWantMaximise(){return this._initialWantMaximise}get isMaximised(){return this===this.layoutManager.maximisedStack}get stackParent(){if(!this.parent)throw new Error("Stack should always have a parent");return this.parent}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}init(){if(!0===this.isInitialised)return;this.updateNodeSize();for(let t=0;t0){if(this._initialActiveItemIndex<0||this._initialActiveItemIndex>=e)throw new Error(`ActiveItemIndex out of range: ${this._initialActiveItemIndex} id: ${this.id}`);for(let i=0;ithis.contentItems.length)throw e-=1,new X("SAC99728");if(t instanceof jt)return e=super.addChild(t,e),this._childElementContainer.appendChild(t.element),this._header.createTab(t,e),this.setActiveComponentItem(t,i),this._header.updateTabSizes(),this.updateSize(!1),t.container.setBaseLogicalZIndex(),this._header.updateClosability(),this.emitStateChangedEvent(),e;throw new X("SACC88532")}removeChild(t,e){const i=t,n=this.contentItems.indexOf(i),o=1===this.contentItems.length;if(this._activeComponentItem===i&&(i.focused&&i.blur(),!o)){const t=0===n?1:n-1;this.setActiveComponentItem(this.contentItems[t],!1)}this._header.removeTab(i),super.removeChild(i,e),o||this._header.updateClosability(),this.emitStateChangedEvent()}toggleMaximise(){this.isMaximised?this.minimise():this.maximise()}maximise(){if(!this.isMaximised){this.layoutManager.setMaximisedStack(this);const t=this.contentItems,e=t.length;for(let i=0;i0&&void 0===t)throw new Error("expected non-empty stack to have an active component item");return{type:"stack",content:this.calculateConfigContent(),size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,isClosable:this.isClosable,maximised:this.isMaximised,header:this.createHeaderConfig(),activeItemIndex:t}}onDrop(t,e){if("header"===this._dropSegment){if(this.resetHeaderDropZone(),void 0===this._dropIndex)throw new J("SODDI68990");return void this.addChild(t,this._dropIndex)}if("body"===this._dropSegment)return void this.addChild(t,0,!0);const i="top"===this._dropSegment||"bottom"===this._dropSegment,n="left"===this._dropSegment||"right"===this._dropSegment,o="top"===this._dropSegment||"left"===this._dropSegment,s=i&&this.stackParent.isColumn||n&&this.stackParent.isRow;if(t.isComponent){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createAndInitContentItem(e,this);i.addChild(t),t=i}if(t.type===at.row||t.type===at.column){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}if(s){const e=this.stackParent.contentItems.indexOf(this);this.stackParent.addChild(t,o?e:e+1,!0),this.size*=.5,t.size=this.size,t.sizeUnit=this.sizeUnit,this.stackParent.updateSize(!1)}else{const e=i?at.column:at.row,n=ct.createDefault(e),s=this.layoutManager.createContentItem(n,this);this.stackParent.replaceChild(this,s),s.addChild(t,o?0:void 0,!0),s.addChild(this,o?void 0:0,!0),this.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}highlightDropZone(t,e){for(const i in this._contentAreaDimensions){const n=i,o=this._contentAreaDimensions[n].hoverArea;if(o.x1t&&o.y1e)return void("header"===n?(this._dropSegment="header",this.highlightHeaderDropZone(this._header.leftRightSided?e:t)):(this.resetHeaderDropZone(),this.highlightBodyDropZone(n)))}}getArea(){if("none"===this.element.style.display)return null;const t=super.getElementArea(this._header.element),e=super.getElementArea(this._childElementContainer);if(null===t||null===e)throw new K("SGAHC13086");const i=e.x2-e.x1,n=e.y2-e.y1;return this._contentAreaDimensions={header:{hoverArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2},highlightArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2}}},0===this.contentItems.length?(this._contentAreaDimensions.body={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2}},super.getElementArea(this.element)):(this._contentAreaDimensions.left={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x1+.25*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x1+.5*i,y2:e.y2}},this._contentAreaDimensions.top={hoverArea:{x1:e.x1+.25*i,y1:e.y1,x2:e.x1+.75*i,y2:e.y1+.5*n},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y1+.5*n}},this._contentAreaDimensions.right={hoverArea:{x1:e.x1+.75*i,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1+.5*i,y1:e.y1,x2:e.x2,y2:e.y2}},this._contentAreaDimensions.bottom={hoverArea:{x1:e.x1+.25*i,y1:e.y1+.5*n,x2:e.x1+.75*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1+.5*n,x2:e.x2,y2:e.y2}},super.getElementArea(this.element))}positionHeader(t){this._header.side!==t&&(this._header.setSide(t),this._headerSideChanged=!0,this.setupHeaderPosition())}updateNodeSize(){if("none"!==this.element.style.display){const t=kt(this.element);if(this._header.show){t[this._header.leftRightSided?it.width:it.height]-=this.layoutManager.layoutConfig.dimensions.headerHeight}this._childElementContainer.style.width=zt(t.width),this._childElementContainer.style.height=zt(t.height);for(let e=0;e=o&&t({...t,[e]:i});async function s(t,e){return(await Promise.all(e.map((async([e,i])=>[e,await t(i,e)])))).reduce(o,{})}n.mapEntriesAsync=s,n.mapValuesAsync=async function(t,e){let i;return i=e instanceof Map?[...e.entries()]:Object.entries(e),s(t,i)};var r,a,l,h,d=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldSet||function(t,e,i,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(t,i):o?o.value=i:e.set(t,i),i},c=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldGet||function(t,e,i,n){if("a"===i&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?n:"a"===i?n.call(t):n?n.value:e.get(t)};Object.defineProperty(i,"__esModule",{value:!0});var m=i.DefaultLayoutManager=void 0;const u=n;class p{constructor(t){a.set(this,void 0),l.set(this,new Map),d(this,a,t,"f")}size(){return c(this,l,"f").size}async applyLayoutSnapshot({layouts:t}){if(Object.keys(t).length>1)throw new Error("[LayoutManager] Tried to call applyLayoutSnapshot with more than 1 layout. When implementing multiple layouts via overridden LayoutManager class, you must override and fully implement the applyLayoutSnapshot method without calling super.applyLayoutSnapshot().");const[[e,i]]=Object.entries(t);await p.createLayout(this,{layoutName:e,layout:i})}async showLayout({layoutName:t}){}async getLayoutSnapshot(){return{layouts:await(0,u.mapValuesAsync)((t=>t.getFrameSnapshot()),c(this,l,"f"))}}async removeLayout({layoutName:t}){}getLayoutIdentityForView(t){const e=[...c(this,l,"f").values()].find((e=>e.getCurrentViews().some((e=>e.name===t.name&&e.uuid===t.uuid))));return e?.identity??void 0}isLayoutVisible({layoutName:t}){return c(p,r,"m",h).call(p,this,t).isVisible()}resolveLayoutIdentity(t){if(t&&"layoutName"in t)return t;const e=[...c(this,l,"f").values()];if(1===e.length)return e[0].identity;const i=e.find((t=>t.isVisible()));return i?.identity??void 0}static async resolveLayout(t,e){const i=t.resolveLayoutIdentity(e);if(void 0===i||!("layoutName"in i))throw new Error("[layout-manager] resolveLayout: Could not resolve the layout identity. Make sure you include 'layoutName' in the identity object.");return c(p,r,"m",h).call(p,t,i.layoutName)}static async handleSharedView(t,e,i){await(0,u.mapValuesAsync)((async t=>{if(t.identity.layoutName!==e.layoutName){const e=t.getCurrentViews().find((t=>t.name===i.name));e&&await t.onViewDetached({viewIdentity:e,target:null}).catch(console.error)}}),c(t,l,"f"))}static async handleLastViewRemoved(t,e){await t.removeLayout(e),await c(t,a,"f").handleLastViewRemoved(t)}static async destroyLayout(t,{layoutName:e}){await c(p,r,"m",h).call(p,t,e).destroy(),c(t,l,"f").delete(e)}static async createLayout(t,e){const{layoutName:i}=e;if(c(t,l,"f").has(i))throw new Error(`Layout name ${i} already exists`);await c(t,a,"f").createLayout(e,t)}static registerLayout(t,e,i){c(t,l,"f").set(e,i)}static getAllLayouts(t){return[...c(t,l,"f").values()]}static setInitialSnapshot(t,e){c(t,a,"f").setInitialSnapshot(e)}static createClosedConstructor(...t){return class extends p{constructor(){super(...t)}}}}m=i.DefaultLayoutManager=p,r=p,a=new WeakMap,l=new WeakMap,h=function(t,e){const i=c(t,l,"f").get(e);if(!i)throw new Error(`[layout-manager] getLayoutByName: Could not locate layout with name '${e}'`);return i};var g={},f={},v={};Object.defineProperty(v,"__esModule",{value:!0}),v.ReversibleMap=void 0;v.ReversibleMap=class{constructor(){this.valueToKey=new Map,this.keyToValue=new Map,this.setUnique=(t,e)=>{if(this.hasKey(t)||this.hasValue(e))throw new Error("Key or value already in the map.");this.keyToValue.set(t,e),this.valueToKey.set(e,t)},this.getKey=t=>{const e=this.valueToKey.get(t);if(!e)throw new Error("Value not found in the map.");return e},this.deleteKey=t=>{const e=this.getValue(t);return this.keyToValue.delete(t),this.valueToKey.delete(e),e},this.deleteValue=t=>{const e=this.getKey(t);return this.keyToValue.delete(e),this.valueToKey.delete(t),e},this.hasKey=t=>this.keyToValue.has(t),this.hasValue=t=>this.valueToKey.has(t)}getValue(t){const e=this.keyToValue.get(t);if(!e)throw new Error("Key not found in the map.");return e}},Object.defineProperty(f,"__esModule",{value:!0});var _=f.LayoutContentCache=void 0;const y=t.lazy,C=v;class w{constructor(){this.contentItemCache=new C.ReversibleMap,this.contentItemCacheId=0,this.createCacheKey=()=>{const t=`entity-${this.contentItemCacheId.toString()}`;return this.contentItemCacheId+=1,t},this.hasKey=t=>this.contentItemCache.hasKey(t),this.getItemOrUndefined=t=>{try{return this.getContentItemOrThrow(t)}catch(t){return}},this.getContentItemOrThrow=(t,e)=>{if(!this.contentItemCache.hasKey(t))throw new Error("Layout component has been destroyed or detached from the current layout.");const i=this.contentItemCache.getValue(t);if(e&&!e.includes(i.type))throw new Error(`Layout item is not the expected type. Expected ${e.join(", ")}, got ${i.type}.`);return i},this.getOrCreateEntityId=t=>{if(this.contentItemCache.hasValue(t))return this.contentItemCache.getKey(t);t.onDestroyed((()=>{this.contentItemCache.deleteValue(t)}));const e=this.createCacheKey();return this.contentItemCache.setUnique(e,t),e}}static getSingleInstance(){return w.singleton.getValue()}}_=f.LayoutContentCache=w,w.singleton=new y.Lazy((()=>new w));var I={},b={};!function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.getAdjacentStacks=t.doShareEdge=t.getAdjacentItem=void 0;t.getAdjacentItem=(e,i)=>{const{parent:n}=e;if(e.isRoot()||!n)return;const o=["top","bottom"].includes(i)?"column":"row",s=["top","left"].includes(i)?-1:1;if(n.type===o){const t=n.contentItems.indexOf(e)+s;if(t>=0&&t{const n=t.getBounds(),o=e.getBounds();if(!n||!o)return!1;if(["top","bottom"].includes(i)){return!(n.righto.right)}return!(n.bottomo.bottom)};t.getAdjacentStacks=(e,i)=>{const n=["top","bottom"].includes(i)?"row":"column",o=s=>"stack"===s.type?(0,t.doShareEdge)(e,s,i)?[s]:[]:"root"===s.type||"ground"===s.type?[]:s.type===n?s.contentItems.map((t=>o(t))).flat():s.type!==n?["top","right"].includes(i)?o(s.contentItems[s.contentItems.length-1]):o(s.contentItems[0]):[],s=(0,t.getAdjacentItem)(e,i);return s?o(s):[]}}(b);var S=t.commonjsGlobal&&t.commonjsGlobal.__decorate||function(t,e,i,n){var o,s=arguments.length,r=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(s<3?o(r):s>3?o(e,i,r):o(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};Object.defineProperty(I,"__esModule",{value:!0}),I.LayoutEntitiesController=void 0;const E=t.decorators,x=b,L=i;class z{constructor(t,e,i){this.wire=t,this.layoutManager=e,this.layoutContentCache=i,this.analytics=t=>{this.wire.sendAction(`layout-controller-${t}`).catch((()=>{}))},this.getLayoutIdentityForViewOrThrow=async t=>{const e=this.layoutManager.getLayoutIdentityForView(t);if(!e)throw new Error(`View identity ${t.name} is not attached to any layouts.`);return e},this.getRoot=async t=>{this.analytics("get-root");const e=(await this.getLayout(t)).getRoot();return{type:e.type,entityId:this.layoutContentCache.getOrCreateEntityId(e)}},this.getStackByView=async t=>{this.analytics("get-stack-by-view");const e=await this.getLayoutIdentityForViewOrThrow(t),i=(await this.getLayout(e)).getStackByView(t);if("stack"===i?.type)return{entityId:this.layoutContentCache.getOrCreateEntityId(i),type:"stack"}},this.getStackViews=t=>{this.analytics("get-stack-views");return this.layoutContentCache.getContentItemOrThrow(t,["stack"]).contentItems.map((t=>({name:t.viewName,uuid:this.wire.me.uuid})))},this.isRoot=t=>{this.analytics("is-root");return this.layoutContentCache.getContentItemOrThrow(t).isRoot()},this.exists=t=>(this.analytics("exists"),this.layoutContentCache.hasKey(t)),this.addViewToStack=async(t,e,{index:i}={index:0})=>{this.analytics("add-view-to-stack");const n=this.layoutContentCache.getContentItemOrThrow(t);if(i&&i>n.contentItems.length+1)throw new Error(`Index '${i}' out of range, please exclude the index or specify a number between 0 and ${n.contentItems.length}`);const o={id:t,index:i},{identity:s}=await n.layout.platformCreateView(e,{location:o});return s},this.findViewInStack=(t,e)=>t.contentItems.find((t=>t.viewName===e.name)),this.removeViewFromStack=async(t,e)=>{this.analytics("remove-view-from-stack");const i=this.layoutContentCache.getContentItemOrThrow(t,["stack"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to remove a view ('${e.name}') which does not belong to the stack.`);await n.layout.platformCloseView(e)},this.createAdjacentStack=async(t,e,{position:i="right"}={})=>{if(this.analytics("create-adjacent-stack"),!Array.isArray(e)||0===e.length)throw new Error('The parameter "views" must be an array with at least 1 element.');if(!["top","bottom","left","right"].includes(i))throw new Error(`Invalid position '${i}' specified.`);const n=this.layoutContentCache.getContentItemOrThrow(t).createAdjacentStack({position:i}),o=this.layoutContentCache.getOrCreateEntityId(n);return await Promise.all(e.reverse().map((t=>this.addViewToStack(o,t)))),o},this.getAdjacentStacks=async({targetId:t,edge:e})=>{this.analytics("get-adjacent-stacks");const i=this.layoutContentCache.getContentItemOrThrow(t);return(0,x.getAdjacentStacks)(i,e).map((t=>({entityId:this.layoutContentCache.getOrCreateEntityId(t)})))},this.setStackActiveView=async(t,e)=>{this.analytics("set-stack-active-view");const i=this.layoutContentCache.getContentItemOrThrow(t,["stack"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to set a view ('${e.name}') as active when it does not belong to the stack.`);i.setActiveContentItem(n,!0)}}async getLayout(t){const e=await L.DefaultLayoutManager.resolveLayout(this.layoutManager,t);if(!e)throw new Error(`Could not resolve target layout identity ${JSON.stringify(t)}`);return e}getContent(t){this.analytics("get-content");return this.layoutContentCache.getContentItemOrThrow(t,["column","row"]).contentItems.map((t=>({type:t.type,entityId:this.layoutContentCache.getOrCreateEntityId(t)})))}getParent(t){this.analytics("get-parent");const e=this.layoutContentCache.getContentItemOrThrow(t);if(!e.isRoot())return e.parent?.contentItems.includes(e)?{type:e.parent.type,entityId:this.layoutContentCache.getOrCreateEntityId(e.parent)}:void 0}}S([(0,E.expose)()],z.prototype,"getLayoutIdentityForViewOrThrow",void 0),S([(0,E.expose)()],z.prototype,"getRoot",void 0),S([(0,E.expose)()],z.prototype,"getStackByView",void 0),S([(0,E.expose)()],z.prototype,"getStackViews",void 0),S([(0,E.expose)()],z.prototype,"getContent",null),S([(0,E.expose)()],z.prototype,"getParent",null),S([(0,E.expose)()],z.prototype,"isRoot",void 0),S([(0,E.expose)()],z.prototype,"exists",void 0),S([(0,E.expose)()],z.prototype,"addViewToStack",void 0),S([(0,E.expose)()],z.prototype,"removeViewFromStack",void 0),S([(0,E.expose)()],z.prototype,"createAdjacentStack",void 0),S([(0,E.expose)()],z.prototype,"getAdjacentStacks",void 0),S([(0,E.expose)()],z.prototype,"setStackActiveView",void 0),I.LayoutEntitiesController=z,Object.defineProperty(g,"__esModule",{value:!0});var M=g.initLayoutEndpoints=void 0;const P=t.apiExposer,T=t.layout_constants,A=f,k=I,D=i;M=g.initLayoutEndpoints=async function(t,e){const i=t.getFin(),n=await i.Platform.getCurrentSync().getClient(),o=new P.ChannelsExposer(n);await new P.ApiExposer(o).exposeInstance(new k.LayoutEntitiesController(t,e,A.LayoutContentCache.getSingleInstance()),{id:T.LAYOUT_CONTROLLER_ID}),await async function(t,e){const i=t=>async i=>{const n=await D.DefaultLayoutManager.resolveLayout(e,i.target);if(!n)throw new Error(`Could not resolve the layout target from payload ${JSON.stringify(i)}`);return t(n,i)},n=(e,n)=>{t.register(e,i(n))},o=(t,e)=>{n(t,e)};n("replace-view",((t,e)=>t.replaceView(e))),n("replace-layout",((t,{layout:e})=>t.replaceLayout(e))),n("add-view",((t,e)=>t.insertView(e))),o("layout-add-view",((t,{viewOptions:e,location:i,targetView:n})=>t.platformCreateView(e,{location:i,targetView:n}))),n("close-view",((t,e)=>t.cleanupView(e.viewIdentity))),o("layout-close-view",((t,e)=>t.platformCloseView(e.viewIdentity))),n("apply-preset-layout",((t,e)=>t.applyPreset(e))),n("get-layout-views",(t=>t.getCurrentViews())),n("get-frame-snapshot",(t=>t.getFrameSnapshot())),n("is-visible",(t=>t.isVisible())),n("destroy",(t=>t.destroy())),t.register("get-layout-snapshot",(()=>e.getLayoutSnapshot()))}(n,e)};var R={};Object.defineProperty(R,"__esModule",{value:!0});var U=R.BaseLayout=void 0;U=R.BaseLayout=class{};var O={};Object.defineProperty(O,"__esModule",{value:!0});var V=O.DOMEmitter=void 0;V=O.DOMEmitter=class{constructor(t){this.container=t}dispatchLocalEvent(t,e){const i={...e,type:t,tabSelector:`tab-${e.name}`,containerSelector:`container-${e.name}`,topic:"openfin-DOM-event"};this.container.dispatchEvent(new CustomEvent(t,{detail:i}))}};var B={};Object.defineProperty(B,"__esModule",{value:!0});var H=B.mapLayoutContentItemsImmutableSync=B.mapLayoutContentItemsImmutable=W=B.isVisible=void 0;var W=B.isVisible=t=>(0!==t.offsetWidth||0!==t.offsetHeight)&&"hidden"!==window.getComputedStyle(t).visibility&&t.offsetTop>=0&&t.offsetLeft>=0&&t.offsetTop<=window.innerHeight&&t.offsetLeft<=window.innerWidth;const F=t=>"type"in t&&"component"===t.type;B.mapLayoutContentItemsImmutable=async function t(e,i){return F(i)?e(i):{...i,content:await Promise.all(i.content?.map((i=>t(e,i))))}},H=B.mapLayoutContentItemsImmutableSync=function t(e,i){return F(i)?e(i):{...i,content:i.content?.map((i=>t(e,i)))}};class N extends Error{constructor(t,e){super(e),this.type=t}}class G extends N{constructor(t,e){super("Configuration",t),this.node=e}}class j extends N{constructor(t){super("PopoutBlocked",t)}}class $ extends N{constructor(t){super("API",t)}}class Z extends N{constructor(t){super("Bind",t)}}class q extends Error{constructor(t,e,i){super(`${t}: ${e}${void 0===i?"":": "+i}`)}}class X extends q{constructor(t,e){super("Assert",t,e)}}class Y extends q{constructor(t,e,i){super("UnreachableCase",t,`${e}${void 0===i?"":": "+i}`)}}class K extends q{constructor(t,e){super("UnexpectedNull",t,e)}}class J extends q{constructor(t,e){super("UnexpectedUndefined",t,e)}}var Q;!function(t){let e=!1;const i={PopoutCannotBeCreatedWithGroundItemConfig:{id:0,default:"Popout cannot be created with ground ItemConfig"},PleaseRegisterAConstructorFunction:{id:1,default:"Please register a constructor function"},ComponentTypeNotRegisteredAndBindComponentEventHandlerNotAssigned:{id:2,default:"Component type not registered and BindComponentEvent handler not assigned"},ComponentIsAlreadyRegistered:{id:3,default:"Component is already registered"},ComponentIsNotVirtuable:{id:4,default:"Component is not virtuable. Requires rootHtmlElement field/getter"},VirtualComponentDoesNotHaveRootHtmlElement:{id:5,default:'Virtual component does not have getter "rootHtmlElement"'},ItemConfigIsNotTypeComponent:{id:6,default:"ItemConfig is not of type component"},InvalidNumberPartInSizeString:{id:7,default:"Invalid number part in size string"},UnknownUnitInSizeString:{id:8,default:"Unknown unit in size string"},UnsupportedUnitInSizeString:{id:9,default:"Unsupported unit in size string"}};t.idCount=Object.keys(i).length;const n=Object.values(i);t.checkInitialise=function(){if(!e)for(let e=0;e="0"&&t<="9"}function Tt(t,e){const i=zt(e);t.style.width=i}function At(t,e){const i=zt(e);t.style.height=i}function kt(t){return{width:t.offsetWidth,height:t.offsetHeight}}function Dt(t,e){t.style.display=e?"":"none"}function Rt(t,e){if(void 0!==e)for(const i in e)if(e.hasOwnProperty(i)){const n=e[i],o=t[i];t[i]=Ut(o,n)}return t}function Ut(t,e){if("object"!=typeof e)return e;if(Array.isArray(e)){const t=e.length,i=new Array(t);for(let n=0;n36)throw new Error("Too many keys in config minifier map")},t.translateObject=n}(dt||(dt={})),function(t){t.defaults={type:at.ground,content:[],size:1,sizeUnit:ht.Fractional,minSize:void 0,minSizeUnit:ht.Pixel,id:"",isClosable:!0},t.createCopy=function(t,e){switch(t.type){case at.ground:case at.row:case at.column:return gt.createCopy(t,e);case at.stack:return ut.createCopy(t,e);case at.component:return pt.createCopy(t);default:throw new Y("CICC91354",t.type,"Invalid Config Item type specified")}},t.createDefault=function(t){switch(t){case at.ground:throw new X("CICCDR91562");case at.row:case at.column:return gt.createDefault(t);case at.stack:return ut.createDefault();case at.component:return pt.createDefault();default:throw new Y("CICCDD91563",t,"Invalid Config Item type specified")}},t.isComponentItem=function(t){return t.type===at.component},t.isStackItem=function(t){return t.type===at.stack},t.isGroundItem=function(t){return t.type===at.ground}}(ct||(ct={})),function(t){t.defaultMaximised=!1,function(t){t.createCopy=function(t,e){return void 0===t?void 0:{show:null!=e?e:t.show,popout:t.popout,close:t.close,maximise:t.maximise,minimise:t.minimise,tabDropdown:t.tabDropdown}}}(t.Header||(t.Header={}))}(mt||(mt={})),function(t){function e(t){const e=t.length,i=new Array(e);for(let n=0;n"__glMaximised"===t));t>0&&(o=!0,n=n.splice(t,1)),e=n.length>0?n[0]:ct.defaults.id}else e=n;return i=void 0!==t.maximised?t.maximised:o,{id:e,maximised:i}}}(wt||(wt={})),function(t){function e(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0;return{resolved:!0,root:Et.resolve(i),openPopouts:t.resolveOpenPopouts(e.openPopouts),dimensions:t.Dimensions.resolve(e.dimensions),settings:t.Settings.resolve(e.settings),header:t.Header.resolve(e.header,e.settings,e.labels)}}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:Lt.fromResolvedArray(e.openPopouts),settings:_t.Settings.createCopy(e.settings),dimensions:t.Dimensions.fromResolved(e.dimensions),header:_t.Header.createCopy(e.header)}},t.isResolved=function(t){const e=t;return void 0!==e.resolved&&!0===e.resolved},t.resolveOpenPopouts=function(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0,{root:Et.resolve(o),openPopouts:xt.resolveOpenPopouts(e.openPopouts),dimensions:xt.Dimensions.resolve(e.dimensions),settings:xt.Settings.resolve(e.settings),header:xt.Header.resolve(e.header,e.settings,e.labels),parentId:null!==(i=e.parentId)&&void 0!==i?i:null,indexInParent:null!==(n=e.indexInParent)&&void 0!==n?n:null,window:t.Window.resolve(e.window,e.dimensions),resolved:!0}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:i(e.openPopouts),dimensions:xt.Dimensions.fromResolved(e.dimensions),settings:_t.Settings.createCopy(e.settings),header:_t.Header.createCopy(e.header),parentId:e.parentId,indexInParent:e.indexInParent,window:t.Window.fromResolved(e.window)}},t.fromResolvedArray=i}(Lt||(Lt={}));class Wt{constructor(){this._allEventSubscriptions=[],this._subscriptionsMap=new Map,this.unbind=this.removeEventListener,this.trigger=this.emit}tryBubbleEvent(t,e){}emit(t,...e){let i=this._subscriptionsMap.get(t);if(void 0!==i){i=i.slice();for(let t=0;t0){const n=e.slice();n.unshift(t);const o=this._allEventSubscriptions.slice();for(let t=0;t0?n.contentItems[0]:n,e=0);const o=this._layoutManager.createAndInitContentItem(i,t);t.addChild(o,e),this._layoutManager.layoutConfig.settings.popInOnClose?this._onClose():this.close()}createWindow(){const t=this.createUrl(),e=Math.floor(1e6*Math.random()).toString(36),i=this.serializeWindowFeatures({width:this._initialWindowSize.width,height:this._initialWindowSize.height,innerWidth:this._initialWindowSize.width,innerHeight:this._initialWindowSize.height,menubar:"no",toolbar:"no",location:"no",personalbar:"no",resizable:"yes",scrollbars:"no",status:"no"});if(this._popoutWindow=globalThis.open(t,e,i),this._popoutWindow)this._popoutWindow.addEventListener("load",(()=>this.positionWindow()),{passive:!0}),this._popoutWindow.addEventListener("beforeunload",(()=>{this._layoutManager.layoutConfig.settings.popInOnClose?this.popIn():this._onClose()}),{passive:!0}),this._checkReadyInterval=setInterval((()=>this.checkReady()),10);else if(!0===this._layoutManager.layoutConfig.settings.blockedPopoutsThrowError){throw new j("Popout blocked")}}checkReady(){if(null===this._popoutWindow)throw new K("BPCR01844");this._popoutWindow.__glInstance&&this._popoutWindow.__glInstance.isInitialised&&(this.onInitialised(),void 0!==this._checkReadyInterval&&(clearInterval(this._checkReadyInterval),this._checkReadyInterval=void 0))}serializeWindowFeatures(t){const e=[];for(const i in t)e.push(i+"="+t[i].toString());return e.join(",")}createUrl(){const t="gl-window-config-"+Ot(),e=_t.minifyConfig(this._config);try{localStorage.setItem(t,JSON.stringify(e))}catch(t){throw new Error("Error while writing to localStorage "+function(t){return t instanceof Error?t.message:"string"==typeof t?t:"Unknown Error"}(t))}const i=new URL(location.href);return i.searchParams.set("gl-window",t),i.toString()}positionWindow(){if(null===this._popoutWindow)throw new Error("BrowserPopout.positionWindow: null popoutWindow");this._popoutWindow.moveTo(this._initialWindowSize.left,this._initialWindowSize.top),this._popoutWindow.focus()}onInitialised(){this._isInitialised=!0,this.getGlInstance().on("popIn",(()=>this.popIn())),this.emit("initialised")}_onClose(){setTimeout((()=>this.emit("closed")),50)}}class Gt extends Wt{constructor(t,e,i,n){super(),this.layoutManager=t,this._parent=i,this._element=n,this._popInParentIds=[],this._type=e.type,this._id=e.id,this._isInitialised=!1,this.isGround=!1,this.isRow=!1,this.isColumn=!1,this.isStack=!1,this.isComponent=!1,this.size=e.size,this.sizeUnit=e.sizeUnit,this.minSize=e.minSize,this.minSizeUnit=e.minSizeUnit,this._isClosable=e.isClosable,this._pendingEventPropagations={},this._throttledEvents=["stateChanged"],this._contentItems=this.createContentItems(e.content)}get type(){return this._type}get id(){return this._id}set id(t){this._id=t}get popInParentIds(){return this._popInParentIds}get parent(){return this._parent}get contentItems(){return this._contentItems}get isClosable(){return this._isClosable}get element(){return this._element}get isInitialised(){return this._isInitialised}static isStack(t){return t.isStack}static isComponentItem(t){return t.isComponent}static isComponentParentableItem(t){return t.isStack||t.isGround}removeChild(t,e=!1){const i=this._contentItems.indexOf(t);if(-1===i)throw new Error("Can't remove child item. Unknown content item");if(e||this._contentItems[i].destroy(),this._contentItems.splice(i,1),this._contentItems.length>0)this.updateSize(!1);else if(!this.isGround&&!0===this._isClosable){if(null===this._parent)throw new K("CIUC00874");this._parent.removeChild(this)}}addChild(t,e,i){return null!=e||(e=this._contentItems.length),this._contentItems.splice(e,0,t),t.setParent(this),!0===this._isInitialised&&!1===t._isInitialised&&t.init(),e}replaceChild(t,e,i=!1){const n=this._contentItems.indexOf(t),o=t._element.parentNode;if(-1===n)throw new X("CIRCI23232","Can't replace child. oldChild is not child of this");if(null===o)throw new K("CIRCP23232");if(o.replaceChild(e._element,t._element),!0===i&&(t._parent=null,t.destroy()),this._contentItems[n]=e,e.setParent(this),e.size=t.size,e.sizeUnit=t.sizeUnit,e.minSize=t.minSize,e.minSizeUnit=t.minSizeUnit,null===e._parent)throw new K("CIRCNC45699");!0===e._parent._isInitialised&&!1===e._isInitialised&&e.init(),this.updateSize(!1)}remove(){if(null===this._parent)throw new K("CIR11110");this._parent.removeChild(this)}popout(){const t=Ot(),e=this.layoutManager.createPopoutFromContentItem(this,void 0,t,void 0);return this.emitBaseBubblingEvent("stateChanged"),e}calculateConfigContent(){const t=this._contentItems,e=t.length,i=new Array(e);for(let n=0;nthis.propagateEventToLayoutManager(t,e))))}propagateEventToLayoutManager(t,e){this._pendingEventPropagations[t]=!1,this.layoutManager.emitUnknown(t,e)}}class jt extends Gt{constructor(t,e,i){super(t,e,i,document.createElement("div")),this._parentItem=i,this._focused=!1,this.isComponent=!0,this._reorderEnabled=e.reorderEnabled,this.applyUpdatableConfig(e),this._initialWantMaximise=e.maximised;const n=document.createElement("div");n.classList.add("lm_content"),this.element.appendChild(n),this._container=new Ft(e,this,t,n,(t=>this.handleUpdateItemConfigEvent(t)),(()=>this.show()),(()=>this.hide()),(t=>this.focus(t)),(t=>this.blur(t)))}get componentName(){return this._container.componentType}get componentType(){return this._container.componentType}get reorderEnabled(){return this._reorderEnabled}get initialWantMaximise(){return this._initialWantMaximise}get component(){return this._container.component}get container(){return this._container}get parentItem(){return this._parentItem}get headerConfig(){return this._headerConfig}get title(){return this._title}get tab(){return this._tab}get focused(){return this._focused}destroy(){this._container.destroy(),super.destroy()}applyUpdatableConfig(t){this.setTitle(t.title),this._headerConfig=t.header}toConfig(){const t=this._container.stateRequestEvent,e=void 0===t?this._container.state:t();return{type:at.component,content:[],size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,maximised:!1,isClosable:this.isClosable,reorderEnabled:this._reorderEnabled,title:this._title,header:mt.Header.createCopy(this._headerConfig),componentType:pt.copyComponentType(this.componentType),componentState:e}}close(){if(null===this.parent)throw new K("CIC68883");this.parent.removeChild(this,!1)}enterDragMode(t,e){Tt(this.element,t),At(this.element,e),this._container.enterDragMode(t,e)}exitDragMode(){this._container.exitDragMode()}enterStackMaximised(){this._container.enterStackMaximised()}exitStackMaximised(){this._container.exitStackMaximised()}drag(){this._container.drag()}updateSize(t){this.updateNodeSize(t)}init(){this.updateNodeSize(!1),super.init(),this._container.emit("open"),this.initContentItems()}setTitle(t){this._title=t,this.emit("titleChanged",t),this.emit("stateChanged")}setTab(t){this._tab=t,this.emit("tab",t),this._container.setTab(t)}hide(){super.hide(),this._container.setVisibility(!1)}show(){super.show(),this._container.setVisibility(!0)}focus(t=!1){this.parentItem.setActiveComponentItem(this,!0,t)}setFocused(t){this._focused=!0,this.tab.setFocused(),t||this.emitBaseBubblingEvent("focus")}blur(t=!1){this._focused&&this.layoutManager.setFocusedComponentItem(void 0,t)}setBlurred(t){this._focused=!1,this.tab.setBlurred(),t||this.emitBaseBubblingEvent("blur")}setParent(t){this._parentItem=t,super.setParent(t)}handleUpdateItemConfigEvent(t){this.applyUpdatableConfig(t)}updateNodeSize(t){if("none"!==this.element.style.display){const{width:e,height:i}=kt(this.element);this._container.setSizeToNodeSize(e,i,t)}}}class $t extends Gt{constructor(){super(...arguments),this._focused=!1}get focused(){return this._focused}setFocusedValue(t){this._focused=t}}class Zt extends Wt{constructor(t,e){super(),this._eElement=t,this._pointerTracking=!1,this._pointerDownEventListener=t=>this.onPointerDown(t),this._pointerMoveEventListener=t=>this.onPointerMove(t),this._pointerUpEventListener=t=>this.onPointerUp(t),this._timeout=void 0,this._allowableTargets=[t,...e],this._oDocument=document,this._eBody=document.body,this._nDelay=1800,this._nDistance=10,this._nX=0,this._nY=0,this._nOriginalX=0,this._nOriginalY=0,this._dragging=!1,this._eElement.addEventListener("pointerdown",this._pointerDownEventListener,{passive:!0})}destroy(){this.checkRemovePointerTrackingEventListeners(),this._eElement.removeEventListener("pointerdown",this._pointerDownEventListener)}cancelDrag(){this.processDragStop(void 0)}onPointerDown(t){if(this._allowableTargets.includes(t.target)&&t.isPrimary){const e=this.getPointerCoordinates(t);this.processPointerDown(e)}}processPointerDown(t){this._nOriginalX=t.x,this._nOriginalY=t.y,this._oDocument.addEventListener("pointermove",this._pointerMoveEventListener),this._oDocument.addEventListener("pointerup",this._pointerUpEventListener,{passive:!0}),this._pointerTracking=!0,this._timeout=setTimeout((()=>{try{this.startDrag()}catch(t){throw console.error(t),t}}),this._nDelay)}onPointerMove(t){this._pointerTracking&&(this.processDragMove(t),t.preventDefault())}processDragMove(t){this._nX=t.pageX-this._nOriginalX,this._nY=t.pageY-this._nOriginalY,!1===this._dragging&&(Math.abs(this._nX)>this._nDistance||Math.abs(this._nY)>this._nDistance)&&this.startDrag(),this._dragging&&this.emit("drag",this._nX,this._nY,t)}onPointerUp(t){this.processDragStop(t)}processDragStop(t){var e;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this.checkRemovePointerTrackingEventListeners(),!0===this._dragging&&(this._eBody.classList.remove("lm_dragging"),this._eElement.classList.remove("lm_dragging"),null===(e=this._oDocument.querySelector("iframe"))||void 0===e||e.style.setProperty("pointer-events",""),this._dragging=!1,this.emit("dragStop",t))}checkRemovePointerTrackingEventListeners(){this._pointerTracking&&(this._oDocument.removeEventListener("pointermove",this._pointerMoveEventListener),this._oDocument.removeEventListener("pointerup",this._pointerUpEventListener),this._pointerTracking=!1)}startDrag(){var t;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this._dragging=!0,this._eBody.classList.add("lm_dragging"),this._eElement.classList.add("lm_dragging"),null===(t=this._oDocument.querySelector("iframe"))||void 0===t||t.style.setProperty("pointer-events","none"),this.emit("dragStart",this._nOriginalX,this._nOriginalY)}getPointerCoordinates(t){return{x:t.pageX,y:t.pageY}}}class qt{constructor(t,e,i){this._isVertical=t,this._size=e,this._grabSize=i0){const i=this.createSplitter(Math.max(0,e-1)).element;e>0?(this.contentItems[e-1].element.insertAdjacentElement("afterend",i),i.insertAdjacentElement("afterend",t.element)):(this.contentItems[0].element.insertAdjacentElement("beforebegin",i),i.insertAdjacentElement("beforebegin",t.element))}else this._childElementContainer.appendChild(t.element);super.addChild(t,e);const n=1/this.contentItems.length*100;if(!0===i)return this.emitBaseBubblingEvent("stateChanged"),e;for(let e=0;e0&&(this.calculateRelativeSizes(),this.setAbsoluteSizes()),this.emitBaseBubblingEvent("stateChanged"),this.emit("resize")}setAbsoluteSizes(){const t=this.calculateAbsoluteSizes();for(let e=0;e0&&t.itemSizes[e]++,this._isColumn?(Tt(this.contentItems[e].element,t.crossAxisSize),At(this.contentItems[e].element,t.itemSizes[e])):(Tt(this.contentItems[e].element,t.itemSizes[e]),At(this.contentItems[e].element,t.crossAxisSize))}calculateAbsoluteSizes(){const t=(this.contentItems.length-1)*this._splitterSize,{width:e,height:i}=kt(this.element);let n,o;this._isColumn?(n=i-t,o=e):(n=e-t,o=i);let s=0;const r=[];for(let t=0;t0){const n=100-t;for(let t=0;t100&&e.length>0){for(let t=0;te)return;{const r=i/e;let a=i;for(let e=0;ethis.onSplitterDrag(e,t,i))),e.on("dragStop",(()=>this.onSplitterDragStop(e))),e.on("dragStart",(()=>this.onSplitterDragStart(e))),this._splitter.splice(t,0,e),e}getSplitItems(t){const e=this._splitter.indexOf(t);return{before:this.contentItems[e],after:this.contentItems[e+1]}}calculateContentItemMinSize(t){const e=t.minSize;if(void 0!==e){if(t.minSizeUnit===ht.Pixel)return e;throw new X("ROCGMD98831",JSON.stringify(t))}{const t=this.layoutManager.layoutConfig.dimensions;return this._isColumn?t.defaultMinItemHeight:t.defaultMinItemWidth}}calculateContentItemsTotalMinSize(t){let e=0;for(const i of t)e+=this.calculateContentItemMinSize(i);return e}onSplitterDragStart(t){const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=this.calculateContentItemsTotalMinSize(e.before.contentItems),s=this.calculateContentItemsTotalMinSize(e.after.contentItems);this._splitterPosition=0,this._splitterMinPosition=-1*(i-o),this._splitterMaxPosition=n-s}onSplitterDrag(t,e,i){let n=this._isColumn?i:e;if(null===this._splitterMinPosition||null===this._splitterMaxPosition)throw new K("ROCOSD59226");n=Math.max(n,this._splitterMinPosition),n=Math.min(n,this._splitterMaxPosition),this._splitterPosition=n;const o=zt(n);this._isColumn?t.element.style.top=o:t.element.style.left=o}onSplitterDragStop(t){if(null===this._splitterPosition)throw new K("ROCOSDS66932");{const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=(this._splitterPosition+i)/(i+n),s=e.before.size+e.after.size;e.before.size=o*s,e.after.size=(1-o)*s,t.element.style.top=zt(0),t.element.style.left=zt(0),globalThis.requestAnimationFrame((()=>this.updateSize(!1)))}}}!function(t){t.getElementDimensionSize=function(t,e){return"width"===e?function(t){return t.offsetWidth}(t):function(t){return t.offsetHeight}(t)},t.setElementDimensionSize=function(t,e,i){return"width"===e?Tt(t,i):At(t,i)},t.createElement=function(t,e){const i=t.createElement("div");return i.classList.add("lm_item"),e?i.classList.add("lm_column"):i.classList.add("lm_row"),i}}(Xt||(Xt={}));class Yt extends $t{constructor(t,e,i){super(t,vt.create(e),null,Yt.createElement(document)),this.isGround=!0,this._childElementContainer=this.element,this._containerElement=i;let n=null;for(;;){const t=n?n.previousSibling:this._containerElement.lastChild;if(!(t instanceof Element&&t.classList.contains("lm_content")))break;n=t}this._containerElement.insertBefore(this.element,n)}init(){if(!0!==this.isInitialised){this.updateNodeSize();for(let t=0;t0?this.contentItems[0]:this,n.isComponent)throw new Error("Cannot add item as child to ComponentItem");{const t=this.layoutManager.createAndInitContentItem(i,n);return e=n.addChild(t,e),n===this?-1:e}}loadComponentAsRoot(t){this.clearRoot();const e=Ct.resolve(t,!1);if(e.maximised)throw new Error("Root Component cannot be maximised");{const t=new jt(this.layoutManager,e,this);t.init(),this.addChild(t,0)}}addChild(t,e){if(this.contentItems.length>0)throw new Error("Ground node can only have a single child");return this._childElementContainer.appendChild(t.element),e=super.addChild(t,e),this.updateSize(!1),this.emitBaseBubblingEvent("stateChanged"),e}calculateConfigContent(){const t=this.contentItems,e=t.length,i=new Array(e);for(let n=0;n0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e)),this.updateContentItemsSize(!1))}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}createSideAreas(){const t=Yt.Area.oppositeSides,e=new Array(Object.keys(t).length);let i=0;for(const n in t){const o=n,s=this.getElementArea();if(null===s)throw new K("RCSA77553");s.side=o,"2"===t[o][1]?s[o]=s[t[o]]-50:s[o]=s[t[o]]+50,s.surface=(s.x2-s.x1)*(s.y2-s.y1),e[i++]=s}return e}highlightDropZone(t,e,i){this.layoutManager.tabDropPlaceholder.remove(),super.highlightDropZone(t,e,i)}onDrop(t,e){if(t.isComponent){const e=ut.createDefault(),i=t;e.header=mt.Header.createCopy(i.headerConfig);const n=this.layoutManager.createAndInitContentItem(e,this);n.addChild(t),t=n}if(0===this.contentItems.length)this.addChild(t);else{if(t.type===at.row||t.type===at.column){const e=ut.createDefault(),i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}const i="x"==e.side[0]?at.row:at.column,n="2"==e.side[1],o=this.contentItems[0];if(o instanceof Xt&&o.type===i){const e=o.contentItems[n?0:o.contentItems.length-1];o.addChild(t,n?0:void 0,!0),e.size*=.5,t.size=e.size,t.sizeUnit=ht.Percent,o.updateSize(!1)}else{const e=ct.createDefault(i),s=this.layoutManager.createContentItem(e,this);this.replaceChild(o,s),s.addChild(t,n?0:void 0,!0),s.addChild(o,n?void 0:0,!0),o.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}}dock(){throw new X("GID87731")}validateDocking(){throw new X("GIVD87732")}getAllContentItems(){const t=[this];return this.deepGetAllContentItems(this.contentItems,t),t}getConfigMaximisedItems(){const t=[];return this.deepFilterContentItems(this.contentItems,t,(t=>!(!Gt.isStack(t)||!t.initialWantMaximise)||!(!Gt.isComponentItem(t)||!t.initialWantMaximise))),t}getItemsByPopInParentId(t){const e=[];return this.deepFilterContentItems(this.contentItems,e,(e=>e.popInParentIds.includes(t))),e}toConfig(){throw new Error("Cannot generate GroundItem config")}setActiveComponentItem(t,e,i){}updateNodeSize(){const{width:t,height:e}=kt(this._containerElement);Tt(this.element,t),At(this.element,e),this.contentItems.length>0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e))}deepGetAllContentItems(t,e){for(let i=0;ithis.onClick(t),this._touchStartEventListener=t=>this.onTouchStart(t),this._element=document.createElement("div"),this._element.classList.add(i),this._element.title=e,this._header.on("destroy",(()=>this.destroy())),this._element.addEventListener("click",this._clickEventListener,{passive:!0}),this._element.addEventListener("touchstart",this._touchStartEventListener,{passive:!0}),this._header.controlsContainerElement.appendChild(this._element)}get element(){return this._element}destroy(){var t;this._element.removeEventListener("click",this._clickEventListener),this._element.removeEventListener("touchstart",this._touchStartEventListener),null===(t=this._element.parentNode)||void 0===t||t.removeChild(this._element)}onClick(t){this._pushEvent(t)}onTouchStart(t){this._pushEvent(t)}}class Jt{constructor(t,e,i,n,o){var s;this._layoutManager=t,this._componentItem=e,this._closeEvent=i,this._focusEvent=n,this._dragStartEvent=o,this._isActive=!1,this._tabClickListener=t=>this.onTabClickDown(t),this._tabTouchStartListener=t=>this.onTabTouchStart(t),this._closeClickListener=()=>this.onCloseClick(),this._closeTouchStartListener=()=>this.onCloseTouchStart(),this._dragStartListener=(t,e)=>this.onDragStart(t,e),this._contentItemDestroyListener=()=>this.onContentItemDestroy(),this._tabTitleChangedListener=t=>this.setTitle(t),this._element=document.createElement("div"),this._element.classList.add("lm_tab"),this._titleElement=document.createElement("span"),this._titleElement.classList.add("lm_title"),this._closeElement=document.createElement("div"),this._closeElement.classList.add("lm_close_tab"),this._element.appendChild(this._titleElement),this._element.appendChild(this._closeElement),e.isClosable?this._closeElement.style.display="":this._closeElement.style.display="none",this.setTitle(e.title),this._componentItem.on("titleChanged",this._tabTitleChangedListener);(null!==(s=e.reorderEnabled)&&void 0!==s?s:this._layoutManager.layoutConfig.settings.reorderEnabled)&&this.enableReorder(),this._element.addEventListener("click",this._tabClickListener,{passive:!0}),this._element.addEventListener("touchstart",this._tabTouchStartListener,{passive:!0}),this._componentItem.isClosable?(this._closeElement.addEventListener("click",this._closeClickListener,{passive:!0}),this._closeElement.addEventListener("touchstart",this._closeTouchStartListener,{passive:!0})):(this._closeElement.remove(),this._closeElement=void 0),this._componentItem.setTab(this),this._layoutManager.emit("tabCreated",this)}get isActive(){return this._isActive}get componentItem(){return this._componentItem}get contentItem(){return this._componentItem}get element(){return this._element}get titleElement(){return this._titleElement}get closeElement(){return this._closeElement}get reorderEnabled(){return void 0!==this._dragListener}set reorderEnabled(t){t!==this.reorderEnabled&&(t?this.enableReorder():this.disableReorder())}setTitle(t){this._titleElement.innerText=t,this._element.title=t}setActive(t){t!==this._isActive&&(this._isActive=t,t?this._element.classList.add("lm_active"):this._element.classList.remove("lm_active"))}destroy(){var t,e;this._closeEvent=void 0,this._focusEvent=void 0,this._dragStartEvent=void 0,this._element.removeEventListener("click",this._tabClickListener),this._element.removeEventListener("touchstart",this._tabTouchStartListener),null===(t=this._closeElement)||void 0===t||t.removeEventListener("click",this._closeClickListener),null===(e=this._closeElement)||void 0===e||e.removeEventListener("touchstart",this._closeTouchStartListener),this._componentItem.off("titleChanged",this._tabTitleChangedListener),this.reorderEnabled&&this.disableReorder(),this._element.remove()}setBlurred(){this._element.classList.remove("lm_focused"),this._titleElement.classList.remove("lm_focused")}setFocused(){this._element.classList.add("lm_focused"),this._titleElement.classList.add("lm_focused")}onDragStart(t,e){if(void 0===this._dragListener)throw new J("TODSDLU10093");if(void 0===this._dragStartEvent)throw new J("TODS23309");this._dragStartEvent(t,e,this._dragListener,this.componentItem)}onContentItemDestroy(){void 0!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=void 0)}onTabClickDown(t){const e=t.target;e!==this._element&&e!==this._titleElement||(0===t.button?this.notifyFocus():1===t.button&&this._componentItem.isClosable&&this.notifyClose())}onTabTouchStart(t){t.target===this._element&&this.notifyFocus()}onCloseClick(){this.notifyClose()}onCloseTouchStart(){this.notifyClose()}notifyClose(){if(void 0===this._closeEvent)throw new J("TNC15007");this._closeEvent(this._componentItem)}notifyFocus(){if(void 0===this._focusEvent)throw new J("TNA15007");this._focusEvent(this._componentItem)}enableReorder(){this._dragListener=new Zt(this._element,[this._titleElement]),this._dragListener.on("dragStart",this._dragStartListener),this._componentItem.on("destroy",this._contentItemDestroyListener)}disableReorder(){if(void 0===this._dragListener)throw new J("TDR87745");this._componentItem.off("destroy",this._contentItemDestroyListener),this._dragListener.off("dragStart",this._dragStartListener),this._dragListener=void 0}}class Qt{constructor(t,e,i,n,o){this._layoutManager=t,this._componentRemoveEvent=e,this._componentFocusEvent=i,this._componentDragStartEvent=n,this._dropdownActiveChangedEvent=o,this._tabs=[],this._lastVisibleTabIndex=-1,this._dropdownActive=!1,this._element=document.createElement("section"),this._element.classList.add("lm_tabs"),this._dropdownElement=document.createElement("section"),this._dropdownElement.classList.add("lm_tabdropdown_list"),this._dropdownElement.style.display="none"}get tabs(){return this._tabs}get tabCount(){return this._tabs.length}get lastVisibleTabIndex(){return this._lastVisibleTabIndex}get element(){return this._element}get dropdownElement(){return this._dropdownElement}get dropdownActive(){return this._dropdownActive}destroy(){for(let t=0;tthis.handleTabCloseEvent(t)),(t=>this.handleTabFocusEvent(t)),((t,e,i,n)=>this.handleTabDragStartEvent(t,e,i,n)));void 0===e&&(e=this._tabs.length),this._tabs.splice(e,0,i),ethis._lastVisibleTabIndex){const t=this._tabs[e];for(let t=e;t>0;t--)this._tabs[t]=this._tabs[t-1];this._tabs[0]=t}}updateTabSizes(t,e){let i=!1;this.tryUpdateTabSizes(i,t,e)||(i=!0,this.tryUpdateTabSizes(i,t,e)),i!==this._dropdownActive&&(this._dropdownActive=i,this._dropdownActiveChangedEvent())}tryUpdateTabSizes(t,e,i){if(this._tabs.length>0){if(void 0===i)throw new Error("non-empty tabs must have active component item");let n=0,o=!1;const s=this._layoutManager.layoutConfig.settings.tabOverlapAllowance,r=this._tabs.indexOf(i.tab),a=this._tabs[r];this._lastVisibleTabIndex=-1;for(let i=0;ie){if(o)i===r&&(l.style.zIndex="auto",l.style.marginLeft="",l.parentElement!==this._element&&this._element.appendChild(l));else{let t;if(t=r>0&&r<=i?(d-e)/(i-1):(d-e)/i,tthis.onClick(t),this._touchStartListener=t=>this.onTouchStart(t),this._rowColumnClosable=!0,this._closeButton=null,this._popoutButton=null,this._tabsContainer=new Qt(this._layoutManager,(t=>this.handleTabInitiatedComponentRemoveEvent(t)),(t=>this.handleTabInitiatedComponentFocusEvent(t)),((t,e,i,n)=>this.handleTabInitiatedDragStartEvent(t,e,i,n)),(()=>this.processTabDropdownActiveChanged())),this._show=i.show,this._popoutEnabled=i.popoutEnabled,this._popoutLabel=i.popoutLabel,this._maximiseEnabled=i.maximiseEnabled,this._maximiseLabel=i.maximiseLabel,this._minimiseEnabled=i.minimiseEnabled,this._minimiseLabel=i.minimiseLabel,this._closeEnabled=i.closeEnabled,this._closeLabel=i.closeLabel,this._tabDropdownEnabled=i.tabDropdownEnabled,this._tabDropdownLabel=i.tabDropdownLabel,this.setSide(i.side),this._canRemoveComponent=this._configClosable,this._element=document.createElement("section"),this._element.classList.add("lm_header"),this._controlsContainerElement=document.createElement("section"),this._controlsContainerElement.classList.add("lm_controls"),this._element.appendChild(this._tabsContainer.element),this._element.appendChild(this._controlsContainerElement),this._element.appendChild(this._tabsContainer.dropdownElement),this._element.addEventListener("click",this._clickListener,{passive:!0}),this._element.addEventListener("touchstart",this._touchStartListener,{passive:!0}),this._documentMouseUpListener=()=>this._tabsContainer.hideAdditionalTabsDropdown(),globalThis.document.addEventListener("mouseup",this._documentMouseUpListener,{passive:!0}),this._tabControlOffset=this._layoutManager.layoutConfig.settings.tabControlOffset,this._tabDropdownEnabled&&(this._tabDropdownButton=new Kt(this,this._tabDropdownLabel,"lm_tabdropdown",(()=>this._tabsContainer.showAdditionalTabsDropdown()))),this._popoutEnabled&&(this._popoutButton=new Kt(this,this._popoutLabel,"lm_popout",(()=>this.handleButtonPopoutEvent()))),this._maximiseEnabled&&(this._maximiseButton=new Kt(this,this._maximiseLabel,"lm_maximise",(t=>this.handleButtonMaximiseToggleEvent(t)))),this._configClosable&&(this._closeButton=new Kt(this,this._closeLabel,"lm_close",(()=>s()))),this.processTabDropdownActiveChanged()}get show(){return this._show}get side(){return this._side}get leftRightSided(){return this._leftRightSided}get layoutManager(){return this._layoutManager}get parent(){return this._parent}get tabs(){return this._tabsContainer.tabs}get lastVisibleTabIndex(){return this._tabsContainer.lastVisibleTabIndex}get element(){return this._element}get tabsContainerElement(){return this._tabsContainer.element}get controlsContainerElement(){return this._controlsContainerElement}destroy(){this.emit("destroy"),this._popoutEvent=void 0,this._maximiseToggleEvent=void 0,this._clickEvent=void 0,this._touchStartEvent=void 0,this._componentRemoveEvent=void 0,this._componentFocusEvent=void 0,this._componentDragStartEvent=void 0,this._tabsContainer.destroy(),globalThis.document.removeEventListener("mouseup",this._documentMouseUpListener),this._element.remove()}createTab(t,e){this._tabsContainer.createTab(t,e)}removeTab(t){this._tabsContainer.removeTab(t)}processActiveComponentChanged(t){this._tabsContainer.processActiveComponentChanged(t),this.updateTabSizes()}setSide(t){this._side=t,this._leftRightSided=[nt.right,nt.left].includes(this._side)}setRowColumnClosable(t){this._rowColumnClosable=t,this.updateClosability()}updateClosability(){let t;if(this._configClosable)if(this._rowColumnClosable){t=!0;const e=this.tabs.length;for(let i=0;i1}applyFocusedValue(t){t?this._element.classList.add("lm_focused"):this._element.classList.remove("lm_focused")}processMaximised(){if(void 0===this._maximiseButton)throw new J("HPMAX16997");this._maximiseButton.element.setAttribute("title",this._minimiseLabel)}processMinimised(){if(void 0===this._maximiseButton)throw new J("HPMIN16997");this._maximiseButton.element.setAttribute("title",this._maximiseLabel)}updateTabSizes(){if(this._tabsContainer.tabCount>0){const t=this._show?this._layoutManager.layoutConfig.dimensions.headerHeight:0;let e;this._leftRightSided?(this._element.style.height="",this._element.style.width=zt(t)):(this._element.style.width="",this._element.style.height=zt(t)),e=this._leftRightSided?this._element.offsetHeight-this._controlsContainerElement.offsetHeight-this._tabControlOffset:this._element.offsetWidth-this._controlsContainerElement.offsetWidth-this._tabControlOffset,this._tabsContainer.updateTabSizes(e,this._getActiveComponentItemEvent())}}handleTabInitiatedComponentRemoveEvent(t){if(this._canRemoveComponent){if(void 0===this._componentRemoveEvent)throw new J("HHTCE22294");this._componentRemoveEvent(t)}}handleTabInitiatedComponentFocusEvent(t){if(void 0===this._componentFocusEvent)throw new J("HHTAE22294");this._componentFocusEvent(t)}handleTabInitiatedDragStartEvent(t,e,i,n){if(this._canRemoveComponent){if(void 0===this._componentDragStartEvent)throw new J("HHTDSE22294");this._componentDragStartEvent(t,e,i,n)}else i.cancelDrag()}processTabDropdownActiveChanged(){void 0!==this._tabDropdownButton&&Dt(this._tabDropdownButton.element,this._tabsContainer.dropdownActive)}handleButtonPopoutEvent(){if(this._layoutManager.layoutConfig.settings.popoutWholeStack){if(void 0===this._popoutEvent)throw new J("HHBPOE17834");this._popoutEvent()}else{const t=this._getActiveComponentItemEvent();t&&t.popout()}}handleButtonMaximiseToggleEvent(t){if(void 0===this._maximiseToggleEvent)throw new J("HHBMTE16834");this._maximiseToggleEvent()}onClick(t){t.target===this._element&&this.notifyClick(t)}onTouchStart(t){t.target===this._element&&this.notifyTouchStart(t)}notifyClick(t){if(void 0===this._clickEvent)throw new J("HNHC46834");this._clickEvent(t)}notifyTouchStart(t){if(void 0===this._touchStartEvent)throw new J("HNHTS46834");this._touchStartEvent(t)}}class ee extends $t{constructor(t,e,i){var n,o,s,r,a,l,h,d,c,m,u,p,g,f,v,_,y,C,w;super(t,e,i,ee.createElement(document)),this._headerSideChanged=!1,this._resizeListener=()=>this.handleResize(),this._maximisedListener=()=>this.handleMaximised(),this._minimisedListener=()=>this.handleMinimised(),this._headerConfig=e.header;const I=t.layoutConfig.header,b=e.content;let S;if(1!==b.length)S=void 0;else{S=b[0].header}this._initialWantMaximise=e.maximised,this._initialActiveItemIndex=null!==(n=e.activeItemIndex)&&void 0!==n?n:0;const E=null!==(r=null!==(s=null===(o=this._headerConfig)||void 0===o?void 0:o.show)&&void 0!==s?s:null==S?void 0:S.show)&&void 0!==r?r:I.show,x=null!==(h=null!==(l=null===(a=this._headerConfig)||void 0===a?void 0:a.popout)&&void 0!==l?l:null==S?void 0:S.popout)&&void 0!==h?h:I.popout,L=null!==(m=null!==(c=null===(d=this._headerConfig)||void 0===d?void 0:d.maximise)&&void 0!==c?c:null==S?void 0:S.maximise)&&void 0!==m?m:I.maximise,z=null!==(g=null!==(p=null===(u=this._headerConfig)||void 0===u?void 0:u.close)&&void 0!==p?p:null==S?void 0:S.close)&&void 0!==g?g:I.close,M=null!==(_=null!==(v=null===(f=this._headerConfig)||void 0===f?void 0:f.minimise)&&void 0!==v?v:null==S?void 0:S.minimise)&&void 0!==_?_:I.minimise,P=null!==(w=null!==(C=null===(y=this._headerConfig)||void 0===y?void 0:y.tabDropdown)&&void 0!==C?C:null==S?void 0:S.tabDropdown)&&void 0!==w?w:I.tabDropdown;this._maximisedEnabled=!1!==L;const T={show:!1!==E,side:!1===E?nt.top:E,popoutEnabled:!1!==x,popoutLabel:!1===x?"":x,maximiseEnabled:this._maximisedEnabled,maximiseLabel:!1===L?"":L,closeEnabled:!1!==z,closeLabel:!1===z?"":z,minimiseEnabled:!0,minimiseLabel:M,tabDropdownEnabled:!1!==P,tabDropdownLabel:!1===P?"":P};this._header=new te(t,this,T,e.isClosable&&!1!==z,(()=>this.getActiveComponentItem()),(()=>this.remove()),(()=>this.handlePopoutEvent()),(()=>this.toggleMaximise()),(t=>this.handleHeaderClickEvent(t)),(t=>this.handleHeaderTouchStartEvent(t)),(t=>this.handleHeaderComponentRemoveEvent(t)),(t=>this.handleHeaderComponentFocusEvent(t)),((t,e,i,n)=>this.handleHeaderComponentStartDragEvent(t,e,i,n))),this.isStack=!0,this._childElementContainer=document.createElement("section"),this._childElementContainer.classList.add("lm_items"),this.on("resize",this._resizeListener),this._maximisedEnabled&&(this.on("maximised",this._maximisedListener),this.on("minimised",this._minimisedListener)),this.element.appendChild(this._header.element),this.element.appendChild(this._childElementContainer),this.setupHeaderPosition(),this._header.updateClosability()}get childElementContainer(){return this._childElementContainer}get header(){return this._header}get headerShow(){return this._header.show}get headerSide(){return this._header.side}get headerLeftRightSided(){return this._header.leftRightSided}get contentAreaDimensions(){return this._contentAreaDimensions}get initialWantMaximise(){return this._initialWantMaximise}get isMaximised(){return this===this.layoutManager.maximisedStack}get stackParent(){if(!this.parent)throw new Error("Stack should always have a parent");return this.parent}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}init(){if(!0===this.isInitialised)return;this.updateNodeSize();for(let t=0;t0){if(this._initialActiveItemIndex<0||this._initialActiveItemIndex>=e)throw new Error(`ActiveItemIndex out of range: ${this._initialActiveItemIndex} id: ${this.id}`);for(let i=0;ithis.contentItems.length)throw e-=1,new X("SAC99728");if(t instanceof jt)return e=super.addChild(t,e),this._childElementContainer.appendChild(t.element),this._header.createTab(t,e),this.setActiveComponentItem(t,i),this._header.updateTabSizes(),this.updateSize(!1),t.container.setBaseLogicalZIndex(),this._header.updateClosability(),this.emitStateChangedEvent(),e;throw new X("SACC88532")}removeChild(t,e){const i=t,n=this.contentItems.indexOf(i),o=1===this.contentItems.length;if(this._activeComponentItem===i&&(i.focused&&i.blur(),!o)){const t=0===n?1:n-1;this.setActiveComponentItem(this.contentItems[t],!1)}this._header.removeTab(i),super.removeChild(i,e),o||this._header.updateClosability(),this.emitStateChangedEvent()}toggleMaximise(){this.isMaximised?this.minimise():this.maximise()}maximise(){if(!this.isMaximised){this.layoutManager.setMaximisedStack(this);const t=this.contentItems,e=t.length;for(let i=0;i0&&void 0===t)throw new Error("expected non-empty stack to have an active component item");return{type:"stack",content:this.calculateConfigContent(),size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,isClosable:this.isClosable,maximised:this.isMaximised,header:this.createHeaderConfig(),activeItemIndex:t}}onDrop(t,e){if("header"===this._dropSegment){if(this.resetHeaderDropZone(),void 0===this._dropIndex)throw new J("SODDI68990");return void this.addChild(t,this._dropIndex)}if("body"===this._dropSegment)return void this.addChild(t,0,!0);const i="top"===this._dropSegment||"bottom"===this._dropSegment,n="left"===this._dropSegment||"right"===this._dropSegment,o="top"===this._dropSegment||"left"===this._dropSegment,s=i&&this.stackParent.isColumn||n&&this.stackParent.isRow;if(t.isComponent){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createAndInitContentItem(e,this);i.addChild(t),t=i}if(t.type===at.row||t.type===at.column){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}if(s){const e=this.stackParent.contentItems.indexOf(this);this.stackParent.addChild(t,o?e:e+1,!0),this.size*=.5,t.size=this.size,t.sizeUnit=this.sizeUnit,this.stackParent.updateSize(!1)}else{const e=i?at.column:at.row,n=ct.createDefault(e),s=this.layoutManager.createContentItem(n,this);this.stackParent.replaceChild(this,s),s.addChild(t,o?0:void 0,!0),s.addChild(this,o?void 0:0,!0),this.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}highlightDropZone(t,e){for(const i in this._contentAreaDimensions){const n=i,o=this._contentAreaDimensions[n].hoverArea;if(o.x1t&&o.y1e)return void("header"===n?(this._dropSegment="header",this.highlightHeaderDropZone(this._header.leftRightSided?e:t)):(this.resetHeaderDropZone(),this.highlightBodyDropZone(n)))}}getArea(){if("none"===this.element.style.display)return null;const t=super.getElementArea(this._header.element),e=super.getElementArea(this._childElementContainer);if(null===t||null===e)throw new K("SGAHC13086");const i=e.x2-e.x1,n=e.y2-e.y1;return this._contentAreaDimensions={header:{hoverArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2},highlightArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2}}},0===this.contentItems.length?(this._contentAreaDimensions.body={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2}},super.getElementArea(this.element)):(this._contentAreaDimensions.left={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x1+.25*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x1+.5*i,y2:e.y2}},this._contentAreaDimensions.top={hoverArea:{x1:e.x1+.25*i,y1:e.y1,x2:e.x1+.75*i,y2:e.y1+.5*n},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y1+.5*n}},this._contentAreaDimensions.right={hoverArea:{x1:e.x1+.75*i,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1+.5*i,y1:e.y1,x2:e.x2,y2:e.y2}},this._contentAreaDimensions.bottom={hoverArea:{x1:e.x1+.25*i,y1:e.y1+.5*n,x2:e.x1+.75*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1+.5*n,x2:e.x2,y2:e.y2}},super.getElementArea(this.element))}positionHeader(t){this._header.side!==t&&(this._header.setSide(t),this._headerSideChanged=!0,this.setupHeaderPosition())}updateNodeSize(){if("none"!==this.element.style.display){const t=kt(this.element);if(this._header.show){t[this._header.leftRightSided?it.width:it.height]-=this.layoutManager.layoutConfig.dimensions.headerHeight}this._childElementContainer.style.width=zt(t.width),this._childElementContainer.style.height=zt(t.height);for(let e=0;e=o&&tthis.onDrag(t,e,i))),this._dragListener.on("dragStop",(()=>this.onDrop())),this.createDragProxyElements(t,e),null===this._componentItem.parent)throw new K("DPC10097");this._componentItemFocused=this._componentItem.focused,this._componentItemFocused&&this._componentItem.blur(),this._componentItem.parent.removeChild(this._componentItem,!0),this.setDimensions(),document.body.appendChild(this._element),this.determineMinMaxXY(),this._layoutManager.calculateItemAreas(),this.setDropPosition(t,e)}get element(){return this._element}createDragProxyElements(t,e){this._element=document.createElement("div"),this._element.classList.add("lm_dragProxy");const i=document.createElement("div");i.classList.add("lm_header");const n=document.createElement("div");n.classList.add("lm_tabs");const o=document.createElement("div");o.classList.add("lm_tab");const s=document.createElement("span");s.classList.add("lm_title"),o.appendChild(s),n.appendChild(o),i.appendChild(n),this._proxyContainerElement=document.createElement("div"),this._proxyContainerElement.classList.add("lm_content"),this._element.appendChild(i),this._element.appendChild(this._proxyContainerElement),this._originalParent instanceof ee&&this._originalParent.headerShow&&(this._sided=this._originalParent.headerLeftRightSided,this._element.classList.add("lm_"+this._originalParent.headerSide),[nt.right,nt.bottom].indexOf(this._originalParent.headerSide)>=0&&this._proxyContainerElement.insertAdjacentElement("afterend",i)),this._element.style.left=zt(t),this._element.style.top=zt(e),o.setAttribute("title",this._componentItem.title),s.insertAdjacentText("afterbegin",this._componentItem.title),this._proxyContainerElement.appendChild(this._componentItem.element)}determineMinMaxXY(){const t=this._layoutManager.groundItem;if(void 0===t)throw new J("DPDMMXY73109");{const e=t.element.getBoundingClientRect();this._minX=e.left+document.body.scrollLeft,this._minY=e.top+document.body.scrollTop,this._maxX=this._minX+e.width,this._maxY=this._minY+e.height}}onDrag(t,e,i){const n=i.pageX,o=i.pageY;this.setDropPosition(n,o),this._componentItem.drag()}setDropPosition(t,e){this._layoutManager.layoutConfig.settings.constrainDragToContainer&&(t<=this._minX?t=Math.ceil(this._minX):t>=this._maxX&&(t=Math.floor(this._maxX)),e<=this._minY?e=Math.ceil(this._minY):e>=this._maxY&&(e=Math.floor(this._maxY))),this._element.style.left=zt(t),this._element.style.top=zt(e),this._area=this._layoutManager.getArea(t,e),null!==this._area&&(this._lastValidArea=this._area,this._area.contentItem.highlightDropZone(t,e,this._area))}onDrop(){const t=this._layoutManager.dropTargetIndicator;if(null===t)throw new K("DPOD30011");let e;if(t.hide(),this._componentItem.exitDragMode(),null!==this._area)e=this._componentItem,this._area.contentItem.onDrop(e,this._area);else if(null!==this._lastValidArea){e=this._componentItem;this._lastValidArea.contentItem.onDrop(e,this._lastValidArea)}else this._originalParent?(e=this._componentItem,this._originalParent.addChild(e)):this._componentItem.destroy();this._element.remove(),this._layoutManager.emit("itemDropped",this._componentItem),this._componentItemFocused&&void 0!==e&&e.focus()}setDimensions(){const t=this._layoutManager.layoutConfig.dimensions;if(void 0===t)throw new Error("DragProxy.setDimensions: dimensions undefined");let e=t.dragProxyWidth,i=t.dragProxyHeight;if(void 0===e||void 0===i)throw new Error("DragProxy.setDimensions: width and/or height undefined");const n=!1===this._layoutManager.layoutConfig.header.show?0:t.headerHeight;this._element.style.width=zt(e),this._element.style.height=zt(i),e-=this._sided?n:0,i-=this._sided?0:n,this._proxyContainerElement.style.width=zt(e),this._proxyContainerElement.style.height=zt(i),this._componentItem.enterDragMode(e,i),this._componentItem.show()}}class ne{constructor(t,e,i,n,o,s,r){this._layoutManager=t,this._element=e,this._extraAllowableChildTargets=i,this._componentTypeOrFtn=n,this._componentState=o,this._title=s,this._id=r,this._dragListener=null,this._dummyGroundContainer=document.createElement("div");const a=gt.createDefault("row");this._dummyGroundContentItem=new Yt(this._layoutManager,a,this._dummyGroundContainer),this.createDragListener()}destroy(){this.removeDragListener()}createDragListener(){this.removeDragListener(),this._dragListener=new Zt(this._element,this._extraAllowableChildTargets),this._dragListener.on("dragStart",((t,e)=>this.onDragStart(t,e))),this._dragListener.on("dragStop",(()=>this.onDragStop()))}onDragStart(t,e){var i;const n="component";let o;if("function"==typeof this._componentTypeOrFtn){const t=this._componentTypeOrFtn();o=ne.isDragSourceComponentItemConfig(t)?{type:n,componentState:t.state,componentType:t.type,title:null!==(i=t.title)&&void 0!==i?i:this._title}:t}else o={type:n,componentState:this._componentState,componentType:this._componentTypeOrFtn,title:this._title,id:this._id};const s=bt.resolve(o,!1),r=new jt(this._layoutManager,s,this._dummyGroundContentItem);if(this._dummyGroundContentItem.contentItems.push(r),null===this._dragListener)throw new K("DSODSD66746");{const i=new ie(t,e,this._dragListener,this._layoutManager,r,this._dummyGroundContentItem),n=this._layoutManager.transitionIndicator;if(null===n)throw new K("DSODST66746");n.transitionElements(this._element,i.element)}}onDragStop(){this.createDragListener()}removeDragListener(){null!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=null)}}!function(t){t.isDragSourceComponentItemConfig=function(t){return!("componentType"in t)}}(ne||(ne={}));class oe{constructor(){this._element=document.createElement("div"),this._element.classList.add("lm_dropTargetIndicator");const t=document.createElement("div");t.classList.add("lm_inner"),this._element.appendChild(t),document.body.appendChild(this._element)}destroy(){this._element.remove()}highlightArea(t,e){this._element.style.left=zt(t.x1+e),this._element.style.top=zt(t.y1+e),this._element.style.width=zt(t.x2-t.x1-e),this._element.style.height=zt(t.y2-t.y1-e),this._element.style.display="block"}hide(){Dt(this._element,!1)}}class se{constructor(){this._element=document.createElement("div"),this._element.classList.add("lm_transition_indicator"),document.body.appendChild(this._element),this._toElement=null,this._fromDimensions=null,this._totalAnimationDuration=200,this._animationStartTime=null}destroy(){this._element.remove()}transitionElements(t,e){}nextAnimationFrame(){}measure(t){const e=t.getBoundingClientRect();return{left:e.left,top:e.top,width:t.offsetWidth,height:t.offsetHeight}}}class re extends Wt{constructor(t){super(),this._layoutManager=t,this._childEventListener=t=>this.onEventFromChild(t),globalThis.addEventListener(re.ChildEventName,this._childEventListener,{passive:!0})}emit(t,...e){"userBroadcast"===t?this.emitUserBroadcast(...e):super.emit(t,...e)}emitUserBroadcast(...t){this.handleUserBroadcastEvent("userBroadcast",t)}destroy(){globalThis.removeEventListener(re.ChildEventName,this._childEventListener)}handleUserBroadcastEvent(t,e){this._layoutManager.isSubWindow?this.propagateToParent(t,e):this.propagateToThisAndSubtree(t,e)}onEventFromChild(t){const e=t.detail;this.handleUserBroadcastEvent(e.eventName,e.args)}propagateToParent(t,e){const i={bubbles:!0,cancelable:!0,detail:{layoutManager:this._layoutManager,eventName:t,args:e}},n=new CustomEvent(re.ChildEventName,i),o=globalThis.opener;if(null===o)throw new K("EHPTP15778");o.dispatchEvent(n)}propagateToThisAndSubtree(t,e){this.emitUnknown(t,...e);for(let i=0;ithis.handleContainerResize())),this._windowBeforeUnloadListener=()=>this.onBeforeUnload(),this._windowBeforeUnloadListening=!1,this._maximisedStackBeforeDestroyedListener=t=>this.cleanupBeforeMaximisedStackDestroyed(t),this.isSubWindow=t.isSubWindow,this._constructorOrSubWindowLayoutConfig=t.constructorOrSubWindowLayoutConfig,Q.checkInitialise(),dt.checkInitialise(),void 0!==t.containerElement&&(this._containerElement=t.containerElement)}get container(){return this._containerElement}get isInitialised(){return this._isInitialised}get groundItem(){return this._groundItem}get root(){return this._groundItem}get openPopouts(){return this._openPopouts}get dropTargetIndicator(){return this._dropTargetIndicator}get transitionIndicator(){return this._transitionIndicator}get width(){return this._width}get height(){return this._height}get eventHub(){return this._eventHub}get rootItem(){if(void 0===this._groundItem)throw new Error("Cannot access rootItem before init");return 0===this._groundItem.contentItems.length?void 0:this._groundItem.contentItems[0]}get focusedComponentItem(){return this._focusedComponentItem}get tabDropPlaceholder(){return this._tabDropPlaceholder}get maximisedStack(){return this._maximisedStack}get deprecatedConstructor(){return!this.isSubWindow&&void 0!==this._constructorOrSubWindowLayoutConfig}destroy(){if(this._isInitialised){this._windowBeforeUnloadListening&&(globalThis.removeEventListener("beforeunload",this._windowBeforeUnloadListener),this._windowBeforeUnloadListening=!1),!0===this.layoutConfig.settings.closePopoutsOnUnload&&this.closeAllOpenPopouts(),this._resizeObserver.disconnect(),this.checkClearResizeTimeout(),void 0!==this._groundItem&&this._groundItem.destroy(),this._tabDropPlaceholder.remove(),null!==this._dropTargetIndicator&&this._dropTargetIndicator.destroy(),null!==this._transitionIndicator&&this._transitionIndicator.destroy(),this._eventHub.destroy();for(const t of this._dragSources)t.destroy();this._dragSources=[],this._isInitialised=!1}}minifyConfig(t){return _t.minifyConfig(t)}unminifyConfig(t){return _t.unminifyConfig(t)}init(){let t;if(this.setContainer(),this._dropTargetIndicator=new oe,this._transitionIndicator=new se,this.updateSizeFromContainer(),this.isSubWindow){if(void 0===this._constructorOrSubWindowLayoutConfig)throw new J("LMIU07155");{const e=this._constructorOrSubWindowLayoutConfig.root;if(void 0===e)throw new X("LMIC07156");if(!Ct.isComponent(e))throw new X("LMIC07157");t=e;const i=xt.resolve(this._constructorOrSubWindowLayoutConfig);this.layoutConfig=Object.assign(Object.assign({},i),{root:void 0})}}else void 0===this._constructorOrSubWindowLayoutConfig?this.layoutConfig=_t.createDefault():this.layoutConfig=xt.resolve(this._constructorOrSubWindowLayoutConfig);const e=this.layoutConfig;this._groundItem=new Yt(this,e.root,this._containerElement),this._groundItem.init(),this.checkLoadedLayoutMaximiseItem(),this._resizeObserver.observe(this._containerElement),this._isInitialised=!0,this.adjustColumnsResponsive(),this.emit("initialised"),void 0!==t&&this.loadComponentAsRoot(t)}loadLayout(t){if(!this.isInitialised)throw new Error("GoldenLayout: Need to call init() if LayoutConfig with defined root passed to constructor");if(void 0===this._groundItem)throw new J("LMLL11119");this.createSubWindows(),this.layoutConfig=xt.resolve(t),this._groundItem.loadRoot(this.layoutConfig.root),this.checkLoadedLayoutMaximiseItem(),this.adjustColumnsResponsive()}saveLayout(){if(!1===this._isInitialised)throw new Error("Can't create config, layout not yet initialised");if(void 0===this._groundItem)throw new J("LMTC18244");{const t=this._groundItem.calculateConfigContent();let e;e=1!==t.length?void 0:t[0],this.reconcilePopoutWindows();const i=[];for(let t=0;t=0?n=this._groundItem.contentItems[0]:e=0;break;case at.row:case at.column:e=n.addItem(t,i.index);break;case at.stack:if(Ct.isComponent(t)){e=n.addItem(t,i.index);break}throw Error(tt[6]);case at.component:throw new X("LMAIALC87444602");default:throw new Y("LMAIALU98881733",n.type)}if(Ct.isComponent(t)){const t=n.contentItems[e];Gt.isStack(t)&&(n=t,e=0)}return i.parentItem=n,i.index=e,i}}}loadComponentAsRoot(t){if(void 0===this._groundItem)throw new Error("Cannot add item before init");this._groundItem.loadComponentAsRoot(t)}updateSize(t,e){this.setSize(t,e)}setSize(t,e){if(this._width=t,this._height=e,!0===this._isInitialised){if(void 0===this._groundItem)throw new J("LMUS18881");if(this._groundItem.setSize(this._width,this._height),this._maximisedStack){const{width:t,height:e}=kt(this._containerElement);Tt(this._maximisedStack.element,t),At(this._maximisedStack.element,e),this._maximisedStack.updateSize(!1)}this.adjustColumnsResponsive()}}beginSizeInvalidation(){this._sizeInvalidationBeginCount++}endSizeInvalidation(){0==--this._sizeInvalidationBeginCount&&this.updateSizeFromContainer()}updateSizeFromContainer(){const{width:t,height:e}=kt(this._containerElement);this.setSize(t,e)}updateRootSize(t=!1){if(void 0===this._groundItem)throw new J("LMURS28881");this._groundItem.updateSize(t)}createAndInitContentItem(t,e){const i=this.createContentItem(t,e);return i.init(),i}createContentItem(t,e){if("string"!=typeof t.type)throw new G("Missing parameter 'type'",JSON.stringify(t));if(ct.isComponentItem(t)&&!(e instanceof ee)&&e&&!(!0===this.isSubWindow&&e instanceof Yt)){t={type:at.stack,content:[t],size:t.size,sizeUnit:t.sizeUnit,minSize:t.minSize,minSizeUnit:t.minSizeUnit,id:t.id,maximised:t.maximised,isClosable:t.isClosable,activeItemIndex:0,header:void 0}}return this.createContentItemFromConfig(t,e)}findFirstComponentItemById(t){if(void 0===this._groundItem)throw new J("LMFFCIBI82446");return this.findFirstContentItemTypeByIdRecursive(at.component,t,this._groundItem)}createPopout(t,e,i,n){return t instanceof Gt?this.createPopoutFromContentItem(t,e,i,n):this.createPopoutFromItemConfig(t,e,i,n)}createPopoutFromContentItem(t,e,i,n){let o=t.parent,s=t;for(;null!==o&&1===o.contentItems.length&&!o.isGround;)s=o,o=o.parent;if(null===o)throw new K("LMCPFCI00834");{if(void 0===n&&(n=o.contentItems.indexOf(s)),null!==i&&o.addPopInParentId(i),void 0===e){const i=globalThis.screenX||globalThis.screenLeft,n=globalThis.screenY||globalThis.screenTop,o=t.element.offsetLeft,s=t.element.offsetTop,{width:r,height:a}=kt(t.element);e={left:i+o,top:n+s,width:r,height:a}}const r=t.toConfig();if(t.remove(),ft.isRootItemConfig(r))return this.createPopoutFromItemConfig(r,e,i,n);throw new Error(`${tt[0]}`)}}beginVirtualSizedContainerAdding(){0==++this._virtualSizedContainerAddingBeginCount&&(this._virtualSizedContainers.length=0)}addVirtualSizedContainer(t){this._virtualSizedContainers.push(t)}endVirtualSizedContainerAdding(){if(0==--this._virtualSizedContainerAddingBeginCount){const t=this._virtualSizedContainers.length;if(t>0){this.fireBeforeVirtualRectingEvent(t);for(let e=0;ethis.emit("windowOpened",a))),a.on("closed",(()=>this.reconcilePopoutWindows())),this._openPopouts.push(a),this.layoutConfig.settings.closePopoutsOnUnload&&!this._windowBeforeUnloadListening&&(globalThis.addEventListener("beforeunload",this._windowBeforeUnloadListener,{passive:!0}),this._windowBeforeUnloadListening=!0),a}closeAllOpenPopouts(){for(let t=0;tglobalThis.close()),1)}getArea(t,e){let i=null,n=1/0;for(let o=0;o=s.x1&&t=s.y1&&es.surface&&(n=s.surface,i=s)}return i}calculateItemAreas(){const t=this.getAllContentItems(),e=this._groundItem;if(void 0===e)throw new J("LMCIAR44365");if(1!==t.length){e.contentItems[0].isStack?this._itemAreas=[]:this._itemAreas=e.createSideAreas();for(let e=0;e0){let e=t[0];if(Gt.isComponentItem(e)){const t=e.parent;if(null===t)throw new K("LMXLLMI69999");e=t}if(!Gt.isStack(e))throw new X("LMCLLMI19993");e.maximise()}}}processMaximiseStack(t){if(this._maximisedStack=t,t.on("beforeItemDestroyed",this._maximisedStackBeforeDestroyedListener),t.element.classList.add("lm_maximised"),t.element.insertAdjacentElement("afterend",this._maximisePlaceholder),void 0===this._groundItem)throw new J("LMMXI19993");{this._groundItem.element.prepend(t.element);const{width:e,height:i}=kt(this._containerElement);Tt(t.element,e),At(t.element,i),t.updateSize(!0),t.focusActiveContentItem(),this._maximisedStack.emit("maximised"),this.emit("stateChanged")}}processMinimiseMaximisedStack(){if(void 0===this._maximisedStack)throw new X("LMMMS74422");{const t=this._maximisedStack;if(null===t.parent)throw new K("LMMI13668");t.element.classList.remove("lm_maximised"),this._maximisePlaceholder.insertAdjacentElement("afterend",t.element),this._maximisePlaceholder.remove(),this.updateRootSize(!0),this._maximisedStack=void 0,t.off("beforeItemDestroyed",this._maximisedStackBeforeDestroyedListener),t.emit("minimised"),this.emit("stateChanged")}}reconcilePopoutWindows(){const t=[];for(let e=0;e{this._resizeTimeoutId=void 0,this.beginSizeInvalidation(),this.endSizeInvalidation()}),this.resizeDebounceInterval))}checkClearResizeTimeout(){void 0!==this._resizeTimeoutId&&(clearTimeout(this._resizeTimeoutId),this._resizeTimeoutId=void 0)}setContainer(){var t;const e=document.body,i=null!==(t=this._containerElement)&&void 0!==t?t:e;if(i===e){this.resizeWithContainerAutomatically=!0;const t=document.documentElement;t.style.height="100%",t.style.margin="0",t.style.padding="0",t.style.overflow="clip",e.style.height="100%",e.style.margin="0",e.style.padding="0",e.style.overflow="clip"}this._containerElement=i}onBeforeUnload(){this.destroy()}adjustColumnsResponsive(){if(void 0===this._groundItem)throw new J("LMACR20883");if(this._firstLoad=!1,this.useResponsiveLayout()&&!this._updatingColumnsResponsive&&this._groundItem.contentItems.length>0&&this._groundItem.contentItems[0].isRow){if(void 0===this._groundItem||null===this._width)throw new J("LMACR77412");{const t=this._groundItem.contentItems[0].contentItems.length;if(t<=1)return;{const e=this.layoutConfig.dimensions.defaultMinItemWidth;if(t*e<=this._width)return;{this._updatingColumnsResponsive=!0;const i=t-Math.max(Math.floor(this._width/e),1),n=this._groundItem.contentItems[0],o=this.getAllStacks();if(0===o.length)throw new X("LMACRS77413");{const t=o[0];for(let e=0;en?void 0:{parentItem:t,index:o}}}case 1:if(void 0===this._focusedComponentItem)return;{const t=this._focusedComponentItem.parentItem;return this.tryCreateLocationFromParentItem(t,e)}case 2:{const t=this.findFirstContentItemType(at.stack);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 3:{let t=this.findFirstContentItemType(at.row);return void 0!==t?this.tryCreateLocationFromParentItem(t,e):(t=this.findFirstContentItemType(at.column),void 0!==t?this.tryCreateLocationFromParentItem(t,e):void 0)}case 4:{const t=this.findFirstContentItemType(at.row);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 5:{const t=this.findFirstContentItemType(at.column);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 6:if(void 0===this._groundItem)throw new J("LMFLRIF18244");return void 0!==this.rootItem?void 0:void 0===e||0===e?{parentItem:this._groundItem,index:0}:void 0;case 7:if(void 0===this._groundItem)throw new J("LMFLF18244");{const t=this._groundItem.contentItems;if(0===t.length)return void 0===e||0===e?{parentItem:this._groundItem,index:0}:void 0;{const i=t[0];return this.tryCreateLocationFromParentItem(i,e)}}}}tryCreateLocationFromParentItem(t,e){const i=t.contentItems.length;return void 0===e?{parentItem:t,index:i}:e<0||e>i?void 0:{parentItem:t,index:e}}}!function(t){t.createMaximisePlaceElement=function(t){const e=t.createElement("div");return e.classList.add("lm_maximise_place"),e},t.createTabDropPlaceholderElement=function(t){const e=t.createElement("div");return e.classList.add("lm_drop_tab_placeholder"),e},t.defaultLocationSelectors=[{typeId:1,index:void 0},{typeId:2,index:void 0},{typeId:3,index:void 0},{typeId:7,index:void 0}],t.afterFocusedItemIfPossibleLocationSelectors=[{typeId:0,index:1},{typeId:2,index:void 0},{typeId:3,index:void 0},{typeId:7,index:void 0}]}(ae||(ae={}));class le extends ae{constructor(t,e,i,n){if(super(le.createLayoutManagerConstructorParameters(t,e)),this._bindComponentEventHanlderPassedInConstructor=!1,this._creationTimeoutPassed=!1,void 0!==e&&"function"==typeof e&&(this.bindComponentEvent=e,this._bindComponentEventHanlderPassedInConstructor=!0,void 0!==i&&(this.unbindComponentEvent=i)),!this._bindComponentEventHanlderPassedInConstructor&&this.isSubWindow){if(void 0===this._constructorOrSubWindowLayoutConfig)throw new J("VLC98823");{const t=xt.resolve(this._constructorOrSubWindowLayoutConfig);this.layoutConfig=Object.assign(Object.assign({},t),{root:void 0})}}!0!==n&&(this.deprecatedConstructor||this.init())}destroy(){this.bindComponentEvent=void 0,this.unbindComponentEvent=void 0,super.destroy()}init(){if(this._bindComponentEventHanlderPassedInConstructor||"loading"!==document.readyState&&null!==document.body){if(!this._bindComponentEventHanlderPassedInConstructor&&!0===this.isSubWindow&&!this._creationTimeoutPassed)return setTimeout((()=>this.init()),7),void(this._creationTimeoutPassed=!0);!0===this.isSubWindow&&(this._bindComponentEventHanlderPassedInConstructor||this.clearHtmlAndAdjustStylesForSubWindow(),window.__glInstance=this),super.init()}else document.addEventListener("DOMContentLoaded",(()=>this.init()),{passive:!0})}clearHtmlAndAdjustStylesForSubWindow(){const t=document.head,e=new Array(4);e[0]=document.querySelectorAll("body link"),e[1]=document.querySelectorAll("body style"),e[2]=document.querySelectorAll("template"),e[3]=document.querySelectorAll(".gl_keep");for(let i=0;ithis.emit("popIn"))),document.body.appendChild(t),!0}}bindComponent(t,e){if(void 0!==this.bindComponentEvent){return this.bindComponentEvent(t,e)}if(void 0!==this.getComponentEvent)return{virtual:!1,component:this.getComponentEvent(t,e)};{const t=`${tt[2]}: ${JSON.stringify(e)}`;throw new Z(t)}}unbindComponent(t,e,i){if(void 0!==this.unbindComponentEvent)this.unbindComponentEvent(t);else if(!e&&void 0!==this.releaseComponentEvent){if(void 0===i)throw new J("VCUCRCU333998");this.releaseComponentEvent(t,i)}}}!function(t){let e=!1;t.createLayoutManagerConstructorParameters=function(t,i){const n=e?null:new URL(document.location.href).searchParams.get("gl-window");e=!0;const o=null!==n;let s,r;if(null!==n){const e=localStorage.getItem(n);if(null===e)throw new Error("Null gl-window Config");localStorage.removeItem(n);const i=JSON.parse(e),o=_t.unminifyConfig(i);r=xt.fromResolved(o),t instanceof HTMLElement&&(s=t)}else void 0===t?r=void 0:t instanceof HTMLElement?(r=void 0,s=t):r=t,void 0===s&&i instanceof HTMLElement&&(s=i);return{constructorOrSubWindowLayoutConfig:r,isSubWindow:o,containerElement:s}}}(le||(le={}));class he extends le{constructor(t,e,i){super(t,e,i,!0),this._componentTypesMap=new Map,this._registeredComponentMap=new Map,this._virtuableComponentMap=new Map,this._containerVirtualRectingRequiredEventListener=(t,e,i)=>this.handleContainerVirtualRectingRequiredEvent(t,e,i),this._containerVirtualVisibilityChangeRequiredEventListener=(t,e)=>this.handleContainerVirtualVisibilityChangeRequiredEvent(t,e),this._containerVirtualZIndexChangeRequiredEventListener=(t,e,i)=>this.handleContainerVirtualZIndexChangeRequiredEvent(t,e,i),this.deprecatedConstructor||this.init()}registerComponent(t,e,i=!1){if("function"!=typeof e)throw new $("registerComponent() componentConstructorOrFactoryFtn parameter is not a function");if(e.hasOwnProperty("prototype")){const n=e;this.registerComponentConstructor(t,n,i)}else{const n=e;this.registerComponentFactoryFunction(t,n,i)}}registerComponentConstructor(t,e,i=!1){if("function"!=typeof e)throw new Error(tt[1]);if(void 0!==this._componentTypesMap.get(t))throw new Z(`${tt[3]}: ${t}`);this._componentTypesMap.set(t,{constructor:e,factoryFunction:void 0,virtual:i})}registerComponentFactoryFunction(t,e,i=!1){if("function"!=typeof e)throw new Z("Please register a constructor function");if(void 0!==this._componentTypesMap.get(t))throw new Z(`${tt[3]}: ${t}`);this._componentTypesMap.set(t,{constructor:void 0,factoryFunction:e,virtual:i})}registerComponentFunction(t){this.registerGetComponentConstructorCallback(t)}registerGetComponentConstructorCallback(t){if("function"!=typeof t)throw new Error("Please register a callback function");void 0!==this._getComponentConstructorFtn&&console.warn("Multiple component functions are being registered. Only the final registered function will be used."),this._getComponentConstructorFtn=t}getRegisteredComponentTypeNames(){const t=this._componentTypesMap.keys();return Array.from(t)}getComponentInstantiator(t){let e;const i=pt.resolveComponentTypeName(t);return void 0!==i&&(e=this._componentTypesMap.get(i)),void 0===e&&void 0!==this._getComponentConstructorFtn&&(e={constructor:this._getComponentConstructorFtn(t),factoryFunction:void 0,virtual:!1}),e}bindComponent(t,e){let i;const n=pt.resolveComponentTypeName(e);let o;if(void 0!==n&&(i=this._componentTypesMap.get(n)),void 0===i&&void 0!==this._getComponentConstructorFtn&&(i={constructor:this._getComponentConstructorFtn(e),factoryFunction:void 0,virtual:!1}),void 0!==i){const s=i.virtual;let r,a;r=void 0===e.componentState?void 0:Ut({},e.componentState);const l=i.constructor;if(void 0!==l)a=new l(t,r,s);else{const e=i.factoryFunction;if(void 0===e)throw new X("LMBCFFU10008");a=e(t,r,s)}if(s){if(void 0===a)throw new J("GLBCVCU988774");{const e=a,i=e.rootHtmlElement;if(void 0===i)throw new Z(`${tt[5]}: ${n}`);!function(t){const e="absolute";t.style.position!==e&&(t.style.position=e)}(i),this.container.appendChild(i),this._virtuableComponentMap.set(t,e),t.virtualRectingRequiredEvent=this._containerVirtualRectingRequiredEventListener,t.virtualVisibilityChangeRequiredEvent=this._containerVirtualVisibilityChangeRequiredEventListener,t.virtualZIndexChangeRequiredEvent=this._containerVirtualZIndexChangeRequiredEventListener}}this._registeredComponentMap.set(t,a),o={virtual:i.virtual,component:a}}else o=super.bindComponent(t,e);return o}unbindComponent(t,e,i){if(void 0===this._registeredComponentMap.get(t))super.unbindComponent(t,e,i);else{const e=this._virtuableComponentMap.get(t);if(void 0!==e){const i=e.rootHtmlElement;if(void 0===i)throw new X("GLUC77743",t.title);this.container.removeChild(i),this._virtuableComponentMap.delete(t)}}}fireBeforeVirtualRectingEvent(t){this._goldenLayoutBoundingClientRect=this.container.getBoundingClientRect(),super.fireBeforeVirtualRectingEvent(t)}handleContainerVirtualRectingRequiredEvent(t,e,i){const n=this._virtuableComponentMap.get(t);if(void 0===n)throw new J("GLHCSCE55933");{const o=n.rootHtmlElement;if(void 0===o)throw new Z(tt[4]+" "+t.title);{const n=t.element.getBoundingClientRect(),s=n.left-this._goldenLayoutBoundingClientRect.left;o.style.left=zt(s);const r=n.top-this._goldenLayoutBoundingClientRect.top;o.style.top=zt(r),Tt(o,e),At(o,i)}}}handleContainerVirtualVisibilityChangeRequiredEvent(t,e){const i=this._virtuableComponentMap.get(t);if(void 0===i)throw new J("GLHCVVCRE55934");{const n=i.rootHtmlElement;if(void 0===n)throw new Z(tt[4]+" "+t.title);Dt(n,e)}}handleContainerVirtualZIndexChangeRequiredEvent(t,e,i){const n=this._virtuableComponentMap.get(t);if(void 0===n)throw new J("GLHCVZICRE55935");{const e=n.rootHtmlElement;if(void 0===e)throw new Z(tt[4]+" "+t.title);e.style.zIndex=i}}}const de="initial_",ce={show:"top",popout:!1,maximise:!1,close:"close-tab-unused"},me={headerHeight:31},ue={hasHeaders:!0,reorderEnabled:!0},pe={popoutWholeStack:!1,constrainDragToContainer:!1,constrainDragToHeaders:!1,preventDragout:!1,showMaximiseIcon:!1,showPopoutIcon:!1,showCloseIcon:!1,blockedPopoutsThrowError:!0,closePopoutsOnUnload:!0,selectionEnabled:!1};var ge,fe;class ve{constructor(e){this.layout=e,ge.set(this,void 0),fe.set(this,void 0),this.handleResize=t=>{t.forEach((t=>this.resizeElement(t.target)))},this.handleMutation=()=>{this.layout.viewComponentsByContainerElement.forEach((t=>{this.resizeElement(t.container.element)}))},t.__classPrivateFieldSet(this,ge,new ResizeObserver(this.handleResize),"f"),t.__classPrivateFieldSet(this,fe,new MutationObserver(this.handleMutation),"f")}observeMutations(e){t.__classPrivateFieldGet(this,fe,"f")?.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["class"]})}destroy(){t.__classPrivateFieldGet(this,ge,"f").disconnect(),t.__classPrivateFieldGet(this,fe,"f").disconnect()}observeContainer(e){t.__classPrivateFieldGet(this,ge,"f").observe(e)}unobserveContainer(e){t.__classPrivateFieldGet(this,ge,"f").unobserve(e)}resizeElement(t){const e=this.layout.viewComponentsByContainerElement.get(t);e&&e.resize()}}ge=new WeakMap,fe=new WeakMap;var _e={};Object.defineProperty(_e,"__esModule",{value:!0});var ye=_e.BaseItem=void 0;class Ce{constructor(t,e,i){this._item=t,this._layout=e,this._wrap=i}get raw(){return this._item}get layout(){return this._layout}get type(){return this._item.type}get contentItems(){return(this._item.contentItems??[]).map((t=>this._wrap(t)))}get parent(){const t=this._item.parent;return t?this._wrap(t):null}setActiveContentItem(t,e){if("stack"!==this.type)throw new Error(`Cannot call setActiveContentItem from a non-stack item: ${this.type}`);this._item.setActiveContentItem(t.raw,e)}static wrapInternal(t,e,i){const n=Ce.wrapCache.get(e);if(n)return n;const o=new t(e,i,(e=>Ce.wrapInternal(t,e,i)));return Ce.wrapCache.set(e,o),o}}ye=_e.BaseItem=Ce,Ce.wrapCache=new WeakMap;const we=t=>!!t&&"contentItems"in t&&(t.isRow||t.isColumn);class Ie extends ye{isRoot(){return!!this._item.parent?.isGround}getBounds(){return this._item.element.getBoundingClientRect()}get viewName(){if(this._item.isComponent){const{component:t}=this._item;return t.identity.name}throw new Error("View name not found")}onDestroyed(t){const e=({target:i})=>{i===this._item&&(t(),this._item.off("itemDestroyed",e))};this._item.on("itemDestroyed",e)}createAdjacentStack({position:t="right"}={}){const e=this.raw;if(ee.isStack(e)&&e.parent){const i=["top","bottom"].includes(t)?"column":"row",n=["left","top"].includes(t)?1:0,o=we(e.parent)?e.parent:e.layoutManager,s=o,r=e.parent.contentItems.indexOf(e);e.parent.isGround&&e.parent.removeChild(e,!0);const a=o.newItem({type:i,content:[{type:"stack",content:[]}]},r);if(!a)throw new Error("createAdjacentStack: Failed to create new container");const l=a.contentItems[0];return a.addChild(this.raw,n),we(s)&&s.removeChild(e,!0),this._wrap(l)}throw new Error(`Cannot creat adjacent stacks for type: ${e.type}, must be type 'stack'`)}setActiveContentItem(t,e=!0){if(!ee.isStack(this._item))throw new Error(`Cannot call setActiveContentItem from a non-stack item: ${this.type}`);this._item.setActiveComponentItem(t.raw,!e)}static wrap(t,e){return ye.wrapInternal(Ie,t,e)}}function be(t=[],e){for(const i of t)"component"===i.type?Object.keys(e).forEach((t=>{t in i&&(i.componentState={[`${de}${t}`]:i[t],...i.componentState}),i[t]=e[t]})):be(i.content,e)}function Se(t=[],e,i){for(const n of t)if("component"===n.type)Object.keys(e).forEach((t=>{if(`${de}${t}`in n.componentState)return n[t]=n.componentState[`${de}${t}`],void delete n.componentState[`${de}${t}`];n[t]=e[t]}));else{if(n.size&&("row"===i||"column"===i)){n["row"===i?"width":"height"]=n.size?.includes(".")?parseFloat(n.size):parseInt(n.size)}Se(n.content,e,n.type)}}function Ee(t){if(t.root){t.root.content&&Se([t.root],{componentName:"view",isClosable:!0});const e=t.root;t.content=[e],delete t.root}return t}const xe=e=>class extends e{connectedCallback(){if(!this.name||!this.uuid)throw new Error(" Name or uuid attribute missing");if(!this.src)throw new Error(" missing 'src' attribute.");this.#t||(this.#t=document.createElement("iframe"),this.#t.src=this.src,this.#t.style.height="100%",this.#t.style.width="100%",this.#t.style.border="none",this.forceFrameName?this.#t.setAttribute("name",this.forceFrameName):this.#t.setAttribute("name",t.encodeOptions({brokerUrl:this.brokerUrl,name:this.name,uuid:this.uuid,providerId:this.providerId,contextGroup:this.contextGroup},"of-frame")),this.#t.setAttribute("id",this.name),this.appendChild(this.#t))}#t;get brokerUrl(){return this.getAttribute("of-broker")}set brokerUrl(t){t&&this.setAttribute("of-broker",t)}get name(){return this.getAttribute("of-name")}set name(t){t&&this.setAttribute("of-name",t)}get forceFrameName(){return this.getAttribute("forceFrameName")}set forceFrameName(t){t&&this.setAttribute("forceFrameName",t)}get uuid(){return this.getAttribute("of-uuid")}set uuid(t){t&&this.setAttribute("of-uuid",t)}get src(){return this.getAttribute("src")}set src(t){t&&this.setAttribute("src",t)}get providerId(){return this.getAttribute("of-provider-id")}set providerId(t){t&&this.setAttribute("of-provider-id",t)}get contextGroup(){return this.getAttribute("of-context-group")}set contextGroup(t){t&&this.setAttribute("of-context-group",t)}static get observedAttributes(){return["name"]}};class Le{static create(t){const e=document.createElement("of-view");return Object.entries(t).forEach((([t,i])=>{e.setAttribute(t,i)})),e}}customElements.define("of-view",xe(HTMLElement));class ze{constructor(t,i,n,{brokerUrl:o,interopConfig:s},r){this.container=t,this.config=i,this.ofView=null,this.isDragging=()=>this.container.tab.element?.className.includes("lm_dragging")??!1;const{url:a,web:l,interop:h,name:d}=i||{},c=d??`internal-generated-view-${e.v4()}`;if(this.identity={uuid:n,name:c},this.container.element.setAttribute("of-name",c),this.container.element.id=`container-${c}`,this.container.parent.id=c,void 0===a)return void this.handleUrlMissing();const m=this.updateTitleIfNotSet(a),u={"of-broker":o,"of-uuid":n,"of-name":c,src:a};l?.frameName&&(u.forceFrameName=l.frameName);const p=h?.currentContextGroup??s?.currentContextGroup;p&&(u["of-context-group"]=p),s?.providerId&&(u["of-provider-id"]=s?.providerId),this.ofView=Le.create(u),this.ofView.title=m??`Iframe: ${a}`,r.appendChild(this.ofView),this.ofView.style.position="absolute"}updateTitleIfNotSet(t){return"view"===this.container.parent.title&&this.container.parent.setTitle(t),this.container.parent.title}handleUrlMissing(){const t=document.createElement("div");t.setAttribute("style","padding: 20px");t.innerText="No URL provided",this.container.element.appendChild(t)}destroy(){this.ofView?.remove(),this.ofView=null}closeView(){this.container.close()}resize(){if(this.ofView){if(this.isDragging())return void(this.ofView.style.display="none");const t=this.container.element.getBoundingClientRect();this.ofView.style.position="absolute",this.ofView.style.height=`${t.height}px`,this.ofView.style.width=`${t.width}px`,this.ofView.style.inset=`${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`,this.ofView.style.display="block"}}}class Me extends U{static overrideConfig(t){const e={...ue,...t.settings,...pe};return e.reorderEnabled?be(t.content,{isClosable:!0}):be(t.content,{reorderEnabled:!1}),{dimensions:me,...t,settings:e,header:{...ce,show:!1!==t.settings?.hasHeaders&&ce.show}}}constructor(t,e,i,{options:n},o,s){super(),this.identity=t,this.container=e,this.initialConfig=i,this.layoutManager=o,this.platformProvider=s,this.viewComponentsByContainerElement=new Map,this.layoutContentCache=_.getSingleInstance(),this.reparentingViews=new Set,this.goldenLayoutDestroyed=!1,this.createViewComponent=(t,e)=>{m.handleSharedView(this.layoutManager,this.identity,e);const i=new ze(t,e,this.identity.uuid,this.options,this.iframeContainer);return e&&!1===e[`${de}isClosable`]&&this.stylesheet.insertRule(`#tab-${i.identity.name} .lm_close_tab { display: none; }`),this.viewComponentsByContainerElement.set(t.element,i),this.resizeController.observeContainer(t.element),i},this.iframeContainer=document.createElement("div"),this.iframeContainer.id=`openfin-layout-iframe-container-${this.identity.layoutName}`,this.domEmitter=new V(e),this.setupStylesheets(),this.layout=new he(this.container),this.layout.resizeWithContainerAutomatically=!0,this.options=n,this.layout.registerComponent("view",this.createViewComponent),this.setupListeners(),this.resizeController=new ve(this),this.layout.loadLayout(Me.overrideConfig(i));const r=document.createElement("div");r.id=`openfin-layout-shadow-container-${this.identity.layoutName}`,r.attachShadow({mode:"open",delegatesFocus:!1}).appendChild(this.iframeContainer),this.container.appendChild(r),this.resizeController.observeMutations(this.container)}getStackByView({name:t}){const e=this.layout.findFirstComponentItemById(t);if(e?.parent&&e?.parent?.isStack)return Ie.wrap(e.parent,this)}getRoot(){return Ie.wrap(this.layout.rootItem,this)}async platformCloseView(t){const e=[...this.viewComponentsByContainerElement.values()].find((e=>e.identity.name===t.name));if(!e)throw new Error(`View with name: ${t.name} not found in layout.`);e.closeView()}async platformCreateView(t,{location:e,targetView:i}={}){if(i)throw new Error("TargetView not supported in web");const n={options:this.platformProvider.normalizeOptions(t),target:this.identity,location:e};return this.insertView(n)}setupStylesheets(){if(this.container.setAttribute("data-openfin-layout-name",this.identity.layoutName),this.stylesheet=new CSSStyleSheet,this.stylesheet.insertRule(".lm_close { display: none; }"),document.adoptedStyleSheets.push(this.stylesheet),this.initialConfig.settings?.preventSplitterResize){const t=`\n [data-openfin-layout-name='${this.identity.layoutName}'] .lm_splitter {\n pointer-events: none;\n }`;this.stylesheet.insertRule(t)}}insertView({options:t,location:e,targetView:i}){const n=e?this.layoutContentCache.getItemOrUndefined(e.id):void 0,o=i?this.layoutContentCache.getItemOrUndefined(i.name):void 0,s=n??o??Ie.wrap(this.layout.rootItem,this);let r;if(ee.isStack(s.raw))r=s.raw;else{if(!we(s.raw))throw new Error("Cannot add a view at the requested location");r=s.raw.newItem({type:"stack",content:[]})}const a=Math.min(r.contentItems.length,e?.index??r.contentItems.length);let l=this.layout.findFirstComponentItemById(t.name);l?(l.parent&&l.parent.removeChild(l,!0),r.addChild(l,a)):l=r.newComponent("view",t,t.title??t.url??"Default Title",a);const h=l.component.identity;return Promise.resolve({identity:h})}replaceView({viewToReplace:t,newView:e}){throw new Error("Method not implemented.")}replaceLayout(t){throw new Error("Method not implemented.")}async cleanupView(t){}applyPreset(t){throw new Error("Method not implemented.")}getCurrentViews(){return[...this.viewComponentsByContainerElement.values()].map((t=>t.identity))}async getFrameSnapshot(){return Ee(xt.fromResolved(this.layout.toConfig()))}isVisible(){return W(this.container)}async onViewDetached({viewIdentity:t}){this.reparentingViews.add(t.name),this.platformCloseView(t)}async destroy(){this.goldenLayoutDestroyed||(this.goldenLayoutDestroyed=!0,this.layout.destroy()),this.iframeContainer.remove(),this.resizeController.destroy(),document.adoptedStyleSheets=document.adoptedStyleSheets.filter((t=>t!==this.stylesheet)),this.viewComponentsByContainerElement.clear()}setupListeners(){this.container.addEventListener("pointerdown",(t=>{if(t.target instanceof HTMLElement){const e=t.target.classList;["lm_tab","lm_title","lm_splitter","lm_drag_handle"].some((t=>e.contains(t)))&&(this.handleDragStart(),2===t.button&&t.stopPropagation())}}),!0),document.addEventListener("pointerup",(()=>this.handleDragEnd()),!0),this.layout.on("tabCreated",(t=>{const e=t.componentItem.component;t.element.id=`tab-${e.identity.name}`,this.domEmitter.dispatchLocalEvent("tab-created",e.identity)})),this.layout.on("itemCreated",(({target:t})=>{const e=t;if(Gt.isComponentItem(e)){const t=e.component;this.domEmitter.dispatchLocalEvent("container-created",t.identity)}})),this.layout.on("itemDestroyed",(t=>{const e=t.target;if(Gt.isComponentItem(e)){const t=e.component;this.removeViewComponent(t)}})),this.layout.on("itemDropped",(()=>{this.handleDragEnd()}))}handleDragStart(){this.iframeContainer.style.pointerEvents="none"}handleDragEnd(){this.iframeContainer.style.pointerEvents=""}removeViewComponent(t){if(t.config&&!1===t.config[`${de}isClosable`]){const e=[...this.stylesheet.cssRules].findIndex((e=>e.cssText.includes(`#tab-${t.identity.name}`)));this.stylesheet.deleteRule(e)}t.destroy(),this.viewComponentsByContainerElement.delete(t.container.element),this.resizeController.unobserveContainer(t.container.element),this.reparentingViews.has(t.identity.name)?this.reparentingViews.delete(t.identity.name):this.platformProvider.closeView(t.identity.name);0===this.getCurrentViews().length&&(this.goldenLayoutDestroyed||(this.goldenLayoutDestroyed=!0,m.handleLastViewRemoved(this.layoutManager,this.identity)))}}class Pe{constructor(t,e,i,n){this.windowIdentity=t,this.connectConfig=e,this.provider=i,this.fallbackContainer=n}async createLayout(t,e){if(!("container"in t)&&!this.fallbackContainer)throw new Error("Container property is not optional in web");const{layoutName:i}=t,n=t,o=this.provider.initLayoutViews(n),s=n.container??this.fallbackContainer,r={...this.windowIdentity,layoutName:i},a=new Me(r,s,o,this.connectConfig,e,this.provider);m.registerLayout(e,i,a),this.fallbackContainer=null}async getLayoutSnapshot(t){return t.getLayoutSnapshot()}async handleLastViewRemoved(t){}}class Te{static async init(e){const i=e.getFin().InterApplicationBus.Channel,n=await i.create(`custom-frame-${e.me.uuid}`);return n.setDefaultAction((async(t,{target:e,opts:i},o)=>{const s=n.connections.find((t=>t.name===e.name));if(s)return n.dispatch(s,t,{...i,target:e});throw new Error(`Client with name ${e.name} not found`)})),await t.relayChannelClientApi_1(n,"layout-relay"),new Te(e)}constructor(t){this.wire=t,this.viewNames=new Set}normalizeOptions(t,i="default"){const n=this.wire.me.uuid;let{name:o=`internal-generated-view-${e.v4()}`}=t;return o.match(/^internal-generated-view-/)&&this.viewNames.has(o)&&"duplicate"===i&&(o=`internal-generated-view-${e.v4()}`),this.viewNames.add(o),{...t,name:o,uuid:n}}closeView(t){this.viewNames.delete(t)}initLayoutViews({layout:t,multiInstanceViewBehavior:e}){return H((t=>{if("component"===t.type&&t.componentState){const i=this.normalizeOptions(t.componentState,e);return{...t,componentState:i}}return t}),t)}}var Ae;const ke=t=>t;Ae=new WeakMap,exports.WebLayoutEntryPoint=class{constructor(e){Ae.set(this,void 0),this.initLayoutManager=async(e,i,{container:n,layoutManagerOverride:o})=>{const s=await Te.init(i),r=o??ke,a=new Pe(i.me,t.__classPrivateFieldGet(this,Ae,"f"),s,n),l=new(r(m.createClosedConstructor(a)));return await M(i,l),l},this.applyLayoutSnapshot=async(e,i,n)=>{await i.applyLayoutSnapshot(t.__classPrivateFieldGet(this,Ae,"f").platform.layoutSnapshot)},this.createLayout=async(t,e)=>m.createLayout(t,e),this.destroyLayout=async(t,e)=>m.destroyLayout(t,e),t.__classPrivateFieldSet(this,Ae,e,"f")}}; @@ -7340,7 +7340,7 @@ module.exports = stubFalse; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.init = init; -const core_web_1 = __webpack_require__(/*! @openfin/core-web */ "./node_modules/@openfin/core-web/out/api-client.js"); +const core_web_1 = __webpack_require__(/*! @openfin/core-web */ "../../node_modules/@openfin/core-web/out/api-client.js"); const settings_1 = __webpack_require__(/*! ./settings */ "./client/src/platform/settings.ts"); /** * Initializes the OpenFin Web Broker connection. @@ -8387,7 +8387,7 @@ function version(uuid) { /******/ /************************************************************************/ var __webpack_exports__ = {}; -// This entry need to be wrapped in an IIFE because it need to be in strict mode. +// This entry needs to be wrapped in an IIFE because it needs to be in strict mode. (() => { "use strict"; var exports = __webpack_exports__; diff --git a/web/v19.2.0/web-interop/js/fdc3-panel.bundle.js.map b/web/v19.2.0/web-interop/js/fdc3-panel.bundle.js.map index f4ed727..5aba28a 100644 --- a/web/v19.2.0/web-interop/js/fdc3-panel.bundle.js.map +++ b/web/v19.2.0/web-interop/js/fdc3-panel.bundle.js.map @@ -1 +1 @@ -{"version":3,"file":"fdc3-panel.bundle.js","mappings":";;;;;;;;;;AAAa,MAAM,mBAAO,CAAC,iFAAoB,EAAE,mBAAO,CAAC,mDAAS,EAAE,mBAAO,CAAC,+DAAM,EAAE,mBAAO,CAAC,mDAAQ,EAAE,mBAAO,CAAC,gEAAkB,EAAE,mBAAO,CAAC,4DAAgB,EAAE,eAAe;;;;;;;;;;;;ACA9J,MAAM,mBAAO,CAAC,mDAAS,IAAI,mBAAO,CAAC,mDAAQ,IAAI,mBAAO,CAAC,gEAAkB,IAAI,mBAAO,CAAC,4DAAgB,IAAI,mBAAO,CAAC,+DAAM,EAAE,kBAAkB,EAAE,GAAG,wBAAwB,GAAG,sGAAsG,qBAAM,CAAC,qBAAM,iCAAiC,KAAK,KAAK,KAAK,MAAM,oBAAoB,WAAW,kBAAkB,kBAAkB,UAAU,SAAS,sCAAsC,SAAS,sFAAsF,mCAAmC,6BAA6B,GAAG,kCAAkC,6BAA6B,mDAAmD,0CAA0C,yDAAyD,iEAAiE,oFAAoF,2IAA2I,mDAAmD,kDAAkD,oFAAoF,4IAA4I,sDAAsD,sCAAsC,SAAS,sCAAsC,UAAU,QAAQ,eAAe,mNAAmN,UAAU,0BAA0B,SAAS,qBAAqB,SAAS,8BAA8B,sBAAsB,yiBAAyiB,QAAQ,SAAS,2EAA2E,6BAA6B,KAAK,IAAI,2DAA2D,SAAS,uDAAuD,0CAA0C,IAAI,sBAAsB,SAAS,4EAA4E,+EAA+E,i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,SAAS;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,2CAA2C,UAAU;AACrD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;ACrJA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEY;;AAEZ,eAAe,mBAAO,CAAC,wDAAW;AAClC,gBAAgB,mBAAO,CAAC,oDAAS;AACjC;AACA;AACA;AACA;;AAEA,cAAc;AACd,kBAAkB;AAClB,yBAAyB;;AAEzB;AACA,kBAAkB;;AAElB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,kBAAkB,YAAY;AAC9B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA,wCAAwC,SAAS;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;;AAEA;AACA;AACA,cAAc,iBAAiB;AAC/B;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,iDAAiD,EAAE;AACnD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C;AAC1C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA,yBAAyB,eAAe;AACxC;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,yBAAyB,QAAQ;AACjC;AACA,sBAAsB,eAAe;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc,YAAY;AAC1B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB,sBAAsB;AACxC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,mBAAmB;AACnB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA,oBAAoB,SAAS;AAC7B;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA,qBAAqB,WAAW,GAAG,IAAI;AACvC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA,gBAAgB,WAAW,GAAG,IAAI,KAAK,aAAa;AACpD;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;;AAEA;AACA,GAAG;AACH;AACA;AACA,mBAAmB,KAAK,mDAAmD,cAAc;AACzF,GAAG;AACH;AACA;AACA,+BAA+B,IAAI;AACnC;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,MAAM,aAAa,SAAS;AACtD;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,SAAS,gBAAgB;AACzB,cAAc,oBAAoB,EAAE,IAAI;AACxC;AACA,YAAY,gBAAgB,EAAE,IAAI;AAClC;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,GAAG,SAAS,GAAG,KAAK,qBAAqB,EAAE,EAAE;AACpE,QAAQ;AACR,yBAAyB,GAAG,KAAK,yBAAyB,EAAE,EAAE;AAC9D,mBAAmB,yBAAyB,EAAE,EAAE;AAChD;AACA,MAAM;AACN,oBAAoB,IAAI,EAAE,GAAG,SAAS,IAAI,EAAE,EAAE;AAC9C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,0CAA0C,cAAc,SAAS,OAAO;AACxE;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,kBAAkB,YAAY;AAC9B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,kBAAkB,gBAAgB;AAClC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,kBAAkB,gBAAgB;AAClC;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,cAAc,YAAY;AAC1B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,QAAQ;AAC1B;AACA,oBAAoB,QAAQ;AAC5B;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;;;;;ACzjEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEa;;AAEb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB;;AAEnB;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,sBAAsB;AACxC;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA,eAAe;AACf;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA,oBAAoB,SAAS;AAC7B;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;;AAEA,kCAAkC,QAAQ;AAC1C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oBAAoB,iBAAiB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,QAAQ;AACR;AACA,uCAAuC,QAAQ;AAC/C;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,OAAO;AACzB;AACA;AACA;;AAEA;AACA,SAAS,yBAAyB;AAClC;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,gBAAgB;AAClC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,8DAA8D,YAAY;AAC1E;AACA,8DAA8D,YAAY;AAC1E;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,qCAAqC,YAAY;AACjD;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;AACA;;;;;;;;;;;AChfA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,SAAS,WAAW;;AAEpB;AACA;AACA;AACA,SAAS,WAAW;;AAEpB;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA,SAAS,WAAW;;AAEpB;AACA;AACA,SAAS,UAAU;;AAEnB;AACA;;;;;;;;;;;ACpFA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,WAAW,mBAAO,CAAC,mDAAS;;AAE5B;AACA;;AAEA;;;;;;;;;;;ACNA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,cAAc,mBAAO,CAAC,yDAAY;AAClC,cAAc,mBAAO,CAAC,yDAAY;AAClC,cAAc,mBAAO,CAAC,yDAAY;;AAElC;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC/BA,qBAAqB,mBAAO,CAAC,uEAAmB;AAChD,sBAAsB,mBAAO,CAAC,yEAAoB;AAClD,mBAAm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,aAAa,GAAG;AAChB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;AACA,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;;;;;;;;;;ACrKA,eAAe,mBAAO,CAAC,yDAAY;;AAEnC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;;;;;;;;;;AC7BA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,cAAc,mBAAO,CAAC,uDAAW;;AAEjC;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACnBA,aAAa,mBAAO,CAAC,uDAAW;AAChC,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,qBAAqB,mBAAO,CAAC,uEAAmB;;AAEhD;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC3BA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;AACA;AACA;AACA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ACA;;AAEA;;;;;;;;;;;ACjBA,iBAAiB,mBAAO,CAAC,6DAAc;AACvC,eAAe,mBAAO,CAAC,2DAAa;AACpC,eAAe,mBAAO,CAAC,yDAAY;AACnC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;AACA;AACA;AACA,oCAAoC;;AAEpC;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC9CA,aAAa,mBAAO,CAAC,uDAAW;AAChC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,eAAe,mBAAO,CAAC,yDAAY;AACnC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC3DA,kBAAkB,mBAAO,CAAC,iEAAgB;AAC1C,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC7BA,eAAe,mBAA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QAAQ;AACrB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACfA,WAAW,mBAAO,CAAC,mDAAS;;AAE5B;AACA;;AAEA;;;;;;;;;;;ACLA,gBAAgB,mBAAO,CAAC,6DAAc;;AAEtC;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,IAAI;AACJ,CAAC;;AAED;;;;;;;;;;;ACVA,eAAe,mBAAO,CAAC,2DAAa;AACpC,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACnFA,aAAa,mBAAO,CAAC,uDAAW;AAChC,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,SAAS,mBAAO,CAAC,6CAAM;AACvB,kBAAkB,mBAAO,CAAC,iEAAgB;AAC1C,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC/GA,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACzFA;AACA,wBAAwB,qBAAM,gBAAgB,qBAAM,IAAI,qBAAM,sBAAsB,qBAAM;;AAE1F;;;;;;;;;;;ACHA,qBAAqB,mBAAO,CAAC,uEAAmB;AAChD,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,WAAW,mBAAO,CAAC,iDAAQ;;AAE3B;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA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AkB,mBAAO,CAAC,iEAAgB;;AAE1C;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACxBA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACdA,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACnBA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACZA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClCA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,GAAG;AAChB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;AClBA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA,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A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACdA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,GAAG;AAChB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACbA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACbA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,UAAU,mBAAO,CAAC,iDAAQ;AAC1B,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjCA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;;;;;;;;;;;ACzBA,gBAAgB,mBAAO,CAAC,6DAAc;;AAEtC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,GAAG;AAChB;AACA;AACA;AACA,oBAAoB,QAAQ,IAAI,QAAQ;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,kBAAkB;AAClB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpCA,sBAAsB,mBAAO,CAAC,yEAAoB;AAClD,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA,8BAA8B,mBAAmB;AACjD;AACA;AACA;AACA;AACA;AACA,+CAA+C,mBAAmB;AAClE;AACA;AACA;;AAEA;;;;;;;;;;;ACnCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACzBA,iBAAiB,mBAAO,CAAC,6DAAc;AACvC,eAAe,mBAAO,CAAC,yDAAY;;AAEnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AChCA,WAAW,mBAAO,CAAC,mDAAS;AAC5B,gBAAgB,mBAAO,CAAC,2DAAa;;AAErC;AACA,kBAAkB,KAA0B;;AAE5C;AACA,gCAAgC,QAAa;;AAE7C;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACrCA,kBAAkB,mBAAO,CAAC,iEAAgB;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,kBAAkB;AAClB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClCA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,eAAe,mBAAO,CAAC,yDAAY;;AAEnC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpCA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClCA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC1BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC9BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC5BA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC1BA,uBAAuB,mBAAO,CAAC,2EAAqB;AACpD,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC1BA,oBAAoB,mBAAO,CAAC,qEAAkB;AAC9C,eAAe,mBAAO,CAAC,2DAAa;AACpC,kBAAkB,mBAAO,CAAC,+DAAe;;AAEzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpCA,oBAAoB,mBAAO,CAAC,qEAAkB;AAC9C,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,kBAAkB,mBAAO,CAAC,+DAAe;;AAEzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC/BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC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;IACnB,CAAC;IACD,OAAO,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,aAAa,CAAC;AAC/C,CAAC;AAED;;;GAGG;AACH,KAAK,UAAU,mBAAmB;IACjC,wBAAwB;IACxB,MAAM,IAAI,GAAG,QAAQ,CAAC,aAAa,CAAkB,sBAAsB,CAAC,CAAC;IAC7E,IAAI,IAAI,KAAK,IAAI,EAAE,CAAC;QACnB,MAAM,gBAAgB,GAAG,MAAM,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAChD,MAAM,YAAY,GAAG,CAAC,MAAM,gBAAgB,CAAC,IAAI,EAAE,CAAkC,CAAC;QACtF,OAAO,YAAY,CAAC,eAAe,CAAC;IACrC,CAAC;AACF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACjDuC;AACA;AACA;AACA;AACE;AACQ;AACE;AACE;;;;;;;;;;;;;;;;ACPtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD;;AAEnD;;AAEA,oBAAoB,gBAAgB;AACpC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA,kBAAkB,cAAc;AAChC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,kBAAkB,cAAc;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,kBAAkB,aAAa;AAC/B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,iEAAe,GAAG;;;;;;;;;;;;;;;ACtNlB,iEAAe,sCAAsC;;;;;;;;;;;;;;;;ACAhB;;AAErC;AACA,OAAO,wDAAQ;AACf;AACA;;AAEA;AACA,gCAAgC;;AAEhC;AACA;AACA;AACA,qBAAqB;;AAErB;AACA,qBAAqB;;AAErB;AACA,qBAAqB;;AAErB;AACA,qBAAqB;AACrB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,iEAAe,KAAK;;;;;;;;;;;;;;;AClCpB,iEAAe,cAAc,EAAE,UAAU,EAAE,eAAe,EAAE,gBAAgB,EAAE,UAAU,GAAG,yCAAyC;;;;;;;;;;;;;;;ACApI;AACA;AACA;AACA;AACA;AACe;AACf;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;AClBA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,mDAAmD;;AAEnD;;AAEA,oBAAoB,gBAAgB;AACpC;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,mBAAmB,QAAQ;AAC3B;;AAEA,oBAAoB,QAAQ;AAC5B;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,oBAAoB,SAAS;AAC7B;;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AK,UAAU,aAAa;IAC3B,MAAM,eAAe,EAAE,CAAC;AACzB,CAAC","sources":["webpack://openfin-web--web-interop/./node_modules/@openfin/core-web/out/api-client.js","webpack://openfin-web--web-interop/./node_modules/@openfin/core-web/out/main-8cad4070.js","webpack://openfin-web--web-interop/./node_modules/@openfin/core-web/out/main-b14f67c9.js","webpack://openfin-web--web-interop/../../node_modules/base64-js/index.js","webpack://openfin-web--web-interop/../../node_modules/buffer/index.js","webpack://openfin-web--web-interop/../../node_modules/events/events.js","webpack://openfin-web--web-interop/../../node_modules/ieee754/index.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_DataView.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_Hash.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_ListCache.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_Map.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_MapCache.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_Promise.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_Set.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_SetCache.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_Stack.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_Symbol.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_Uint8Array.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_WeakMap.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_arrayEach.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_arrayFilter.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_arrayLikeKeys.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_arrayPush.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_arraySome.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_assignValue.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_assocIndexOf.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseAssign.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseAssignIn.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseAssignValue.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseClone.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseCreate.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseGetAllKeys.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseGetTag.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseIsArguments.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseIsEqual.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseIsEqualDeep.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseIsMap.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseIsNative.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseIsSet.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseIsTypedArray.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseKeys.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseKeysIn.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseTimes.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseUnary.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_cacheHas.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_cloneArrayBuffer.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_cloneBuffer.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_cloneDataView.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_cloneRegExp.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_cloneSymbol.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_cloneTypedArray.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_copyArray.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_copyObject.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_copySymbols.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_copySymbolsIn.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_coreJsData.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_defineProperty.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_equalArrays.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_equalByTag.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_equalObjects.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_freeGlobal.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_getAllKeys.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_getAllKeysIn.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_getMapData.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_getNative.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_getPrototype.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_getRawTag.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_getSymbols.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_getSymbolsIn.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_getTag.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_getValue.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_hashClear.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_hashDelete.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_hashGet.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_hashHas.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_hashSet.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_initCloneArray.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_initCloneByTag.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_initCloneObject.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_isIndex.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_isKeyable.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_isMasked.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_isPrototype.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_listCacheClear.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_listCacheDelete.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_listCacheGet.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_listCacheHas.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_listCacheSet.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_mapCacheClear.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_mapCacheDelete.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_mapCacheGet.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_mapCacheHas.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_mapCacheSet.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_mapToArray.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_nativeCreate.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_nativeKeys.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_nativeKeysIn.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_nodeUtil.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_objectToString.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_overArg.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_root.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_setCacheAdd.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_setCacheHas.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_setToArray.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_stackClear.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_stackDelete.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_stackGet.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_stackHas.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_stackSet.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_toSource.js","webpack://openfin-web--web-interop/../../node_modules/lodash/cloneDeep.js","webpack://openfin-web--web-interop/../../node_modules/lodash/eq.js","webpack://openfin-web--web-interop/../../node_modules/lodash/isArguments.js","webpack://openfin-web--web-interop/../../node_modules/lodash/isArray.js","webpack://openfin-web--web-interop/../../node_modules/lodash/isArrayLike.js","webpack://openfin-web--web-interop/../../node_modules/lodash/isBuffer.js","webpack://openfin-web--web-interop/../../node_modules/lodash/isEqual.js","webpack://openfin-web--web-interop/../../node_modules/lodash/isFunction.js","webpack://openfin-web--web-interop/../../node_modules/lodash/isLength.js","webpack://openfin-web--web-interop/../../node_modules/lodash/isMap.js","webpack://openfin-web--web-interop/../../node_modules/lodash/isObject.js","webpack://openfin-web--web-interop/../../node_modules/lodash/isObjectLike.js","webpack://openfin-web--web-interop/../../node_modules/lodash/isSet.js","webpack://openfin-web--web-interop/../../node_modules/lodash/isTypedArray.js","webpack://openfin-web--web-interop/../../node_modules/lodash/keys.js","webpack://openfin-web--web-interop/../../node_modules/lodash/keysIn.js","webpack://openfin-web--web-interop/../../node_modules/lodash/stubArray.js","webpack://openfin-web--web-interop/../../node_modules/lodash/stubFalse.js","webpack://openfin-web--web-interop/./client/src/platform/api.ts","webpack://openfin-web--web-interop/./client/src/platform/settings.ts","webpack://openfin-web--web-interop/../../node_modules/uuid/dist/esm-browser/index.js","webpack://openfin-web--web-interop/../../node_modules/uuid/dist/esm-browser/md5.js","webpack://openfin-web--web-interop/../../node_modules/uuid/dist/esm-browser/nil.js","webpack://openfin-web--web-interop/../../node_modules/uuid/dist/esm-browser/parse.js","webpack://openfin-web--web-interop/../../node_modules/uuid/dist/esm-browser/regex.js","webpack://openfin-web--web-interop/../../node_modules/uuid/dist/esm-browser/rng.js","webpack://openfin-web--web-interop/../../node_modules/uuid/dist/esm-browser/sha1.js","webpack://openfin-web--web-interop/../../node_modules/uuid/dist/esm-browser/stringify.js","webpack://openfin-web--web-interop/../../node_modules/uuid/dist/esm-browser/v1.js","webpack://openfin-web--web-interop/../../node_modules/uuid/dist/esm-browser/v3.js","webpack://openfin-web--web-interop/../../node_modules/uuid/dist/esm-browser/v35.js","webpack://openfin-web--web-interop/../../node_modules/uuid/dist/esm-browser/v4.js","webpack://openfin-web--web-interop/../../node_modules/uuid/dist/esm-browser/v5.js","webpack://openfin-web--web-interop/../../node_modules/uuid/dist/esm-browser/validate.js","webpack://openfin-web--web-interop/../../node_modules/uuid/dist/esm-browser/version.js","webpack://openfin-web--web-interop/webpack/bootstrap","webpack://openfin-web--web-interop/webpack/runtime/define property getters","webpack://openfin-web--web-interop/webpack/runtime/global","webpack://openfin-web--web-interop/webpack/runtime/hasOwnProperty shorthand","webpack://openfin-web--web-interop/webpack/runtime/make namespace object","webpack://openfin-web--web-interop/webpack/runtime/node module decorator","webpack://openfin-web--web-interop/./client/src/content/fdc3-panel.ts"],"sourcesContent":["\"use strict\";var e=require(\"./main-8cad4070.js\");require(\"buffer/\"),require(\"uuid\"),require(\"events\"),require(\"lodash/cloneDeep\"),require(\"lodash/isEqual\"),exports.connect=e.connect;\n","\"use strict\";var e=require(\"buffer/\"),t=require(\"events\"),n=require(\"lodash/cloneDeep\"),i=require(\"lodash/isEqual\"),r=require(\"uuid\");const o=(e,t)=>`${t}<${btoa(JSON.stringify(e))}>`;var s=\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof window?window:\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:{},a={},c={},d={},h={};async function l(e){const t=[];for(const n of e){const e=await n();t.push(e)}return t}Object.defineProperty(h,\"__esModule\",{value:!0}),h.promiseMapSerial=h.serial=h.promiseMap=h.promisify=void 0,h.promisify=function(e){return(...t)=>new Promise(((n,i)=>{e(...t,((e,t)=>e?i(e):n(t)))}))},h.promiseMap=async function(e,t){return Promise.all(e.map(t))},h.serial=l,h.promiseMapSerial=async function(e,t){return l(e.map(((e,n,i)=>()=>t(e,n,i))))};var u,p=s&&s.__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},w=s&&s.__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)};Object.defineProperty(d,\"__esModule\",{value:!0}),d.Reply=d.EmitterBase=d.Base=void 0;const y=h;class f{constructor(e){this.isNodeEnvironment=()=>\"node\"===this.wire.environment.type,this.isOpenFinEnvironment=()=>\"openfin\"===this.wire.environment.type,this.isBrowserEnvironment=()=>\"other\"===this.wire.environment.type,this.wire=e}get fin(){return this.wire.getFin()}get me(){return this.wire.me}}d.Base=f;d.EmitterBase=class extends f{constructor(e,t,...n){super(e),this.topic=t,u.set(this,void 0),this.eventNames=()=>this.hasEmitter()?this.getOrCreateEmitter().eventNames():[],this.emit=(e,t,...n)=>!!this.hasEmitter()&&this.getOrCreateEmitter().emit(e,t,...n),this.hasEmitter=()=>this.wire.eventAggregator.has(w(this,u,\"f\")),this.getOrCreateEmitter=()=>this.wire.eventAggregator.getOrCreate(w(this,u,\"f\")),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[],this.listenerCount=e=>this.hasEmitter()?this.getOrCreateEmitter().listenerCount(e):0,this.registerEventListener=async(e,t={},n,i)=>{const r={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e},o=this.getOrCreateEmitter();n(o);try{await this.wire.sendAction(\"subscribe-to-desktop-event\",r)}catch(e){throw i(o),this.deleteEmitterIfNothingRegistered(o),e}},this.deregisterEventListener=async(e,t={})=>{if(this.hasEmitter()){const n={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e};await this.wire.sendAction(\"unsubscribe-to-desktop-event\",n).catch((()=>null));return this.getOrCreateEmitter()}return Promise.resolve()},p(this,u,[t,...n],\"f\"),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[]}async on(e,t,n){return await this.registerEventListener(e,n,(n=>{n.on(e,t)}),(n=>{n.removeListener(e,t)})),this}async addListener(e,t,n){return this.on(e,t,n)}async once(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.once(e,i),n.once(e,t)}),(n=>{n.removeListener(e,i),n.removeListener(e,t)})),this}async prependListener(e,t,n){return await this.registerEventListener(e,n,(n=>{n.prependListener(e,t)}),(n=>{n.removeListener(e,t)})),this}async prependOnceListener(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.prependOnceListener(e,t),n.once(e,i)}),(n=>{n.removeListener(e,t),n.removeListener(e,i)})),this}async removeListener(e,t,n){const i=await this.deregisterEventListener(e,n);return i&&(i.removeListener(e,t),this.deleteEmitterIfNothingRegistered(i)),this}async deregisterAllListeners(e){const t={...this.identity,type:e,topic:this.topic};if(this.hasEmitter()){const e=this.getOrCreateEmitter(),n=e.listenerCount(t.type),i=[];for(let e=0;enull)));return await Promise.all(i),e}}async removeAllListeners(e){const t=async e=>{const t=await this.deregisterAllListeners(e);t&&(t.removeAllListeners(e),this.deleteEmitterIfNothingRegistered(t))};if(e)await t(e);else if(this.hasEmitter()){const e=this.getOrCreateEmitter().eventNames();await(0,y.promiseMap)(e,t)}return this}deleteEmitterIfNothingRegistered(e){0===e.eventNames().length&&this.wire.eventAggregator.delete(w(this,u,\"f\"))}},u=new WeakMap;d.Reply=class{};var g={};Object.defineProperty(g,\"__esModule\",{value:!0});var m=g.RuntimeError=g.NotSupportedError=g.NotImplementedError=g.NoAckError=g.DuplicateCorrelationError=g.UnexpectedActionError=g.DisconnectedError=void 0;class v extends Error{constructor(e){super(`Expected websocket state OPEN but found ${e}`),this.readyState=e}}g.DisconnectedError=v;class C extends Error{}g.UnexpectedActionError=C;class b extends Error{}g.DuplicateCorrelationError=b;class I extends Error{}g.NoAckError=I;class E extends Error{}g.NotImplementedError=E;class x extends Error{}g.NotSupportedError=x;class A extends Error{constructor(e){const{message:t,name:n,stack:i,...r}=e;super(t),this.name=n||\"Error\",this.stack=i??this.toString(),Object.keys(r).forEach((e=>{this[e]=r[e]}))}}class P extends Error{static getCallSite(e=0){const t=Error.stackTraceLimit,n=e+1;Error.stackTraceLimit=t+n;const i=Error.prepareStackTrace;Error.prepareStackTrace=(e,t)=>t;const r=(new Error).stack?.slice(n)??[];return Error.prepareStackTrace=i,Error.stackTraceLimit=t,r}static prepareStackTrace(e,t){if(\"function\"==typeof Error.prepareStackTrace)return Error.prepareStackTrace(e,t);let n=\"\";n+=e.name||\"Error\",n+=`: ${e.message||\"\"}`;for(const e of t)n+=`\\n at ${e.toString()}`;return n}constructor(e,t){const{reason:n,error:i}=e;super(n),this.name=\"RuntimeError\",i?.stack&&(this.cause=new A(i)),t&&(this.stack=P.prepareStackTrace(this,t))}}m=g.RuntimeError=P;var M={},_={},O={};Object.defineProperty(O,\"__esModule\",{value:!0}),O.validateIdentity=void 0,O.validateIdentity=function(e){let t;return\"object\"==typeof e&&\"string\"==typeof e.uuid||(t=\"Not a valid identity object\"),t};var S={},R={},F={},j={},k={},L={},T={};Object.defineProperty(T,\"__esModule\",{value:!0}),T.handleDeprecatedWarnings=void 0;var $;T.handleDeprecatedWarnings=e=>{(e.contentNavigation?.whitelist||e.contentNavigation?.blacklist||e.contentRedirect?.whitelist||e.contentRedirect?.blacklist)&&console.warn(\"The properties 'whitelist' and 'blacklist' have been marked as deprecated and will be removed in a future version. Please use 'allowlist' and 'denylist'.\")};var B={},G={};Object.defineProperty(G,\"__esModule\",{value:!0}),G.AsyncRetryableLazy=W=G.Lazy=void 0;var W=G.Lazy=class{constructor(e){this.producerFn=e}getValue(){return this.value||(this.value=this.producerFn()),this.value}};G.AsyncRetryableLazy=class{constructor(e){this.producerFn=e}async getValue(){return this.promise||(this.promise=this.producerFn().catch((e=>{throw delete this.promise,e}))),this.promise}};var H={};Object.defineProperty(H,\"__esModule\",{value:!0}),H.WebContents=void 0;const N=d;class D extends N.EmitterBase{constructor(e,t,n){super(e,n,t.uuid,t.name),this.identity=t,this.entityType=n}capturePage(e){return this.wire.sendAction(\"capture-page\",{options:e,...this.identity}).then((({payload:e})=>e.data))}executeJavaScript(e){return this.wire.sendAction(\"execute-javascript-in-window\",{...this.identity,code:e}).then((({payload:e})=>e.data))}getZoomLevel(){return this.wire.sendAction(\"get-zoom-level\",this.identity).then((({payload:e})=>e.data))}setZoomLevel(e){return this.wire.sendAction(\"set-zoom-level\",{...this.identity,level:e}).then((()=>{}))}navigate(e){return this.wire.sendAction(\"navigate-window\",{...this.identity,url:e}).then((()=>{}))}navigateBack(){return this.wire.sendAction(\"navigate-window-back\",{...this.identity}).then((()=>{}))}async navigateForward(){await this.wire.sendAction(\"navigate-window-forward\",{...this.identity})}stopNavigation(){return this.wire.sendAction(\"stop-window-navigation\",{...this.identity}).then((()=>{}))}reload(e=!1){return this.wire.sendAction(\"reload-window\",{ignoreCache:e,...this.identity}).then((()=>{}))}print(e={}){return this.wire.sendAction(\"print\",{...this.identity,options:e}).then((()=>{}))}findInPage(e,t){return this.wire.sendAction(\"find-in-page\",{...this.identity,searchTerm:e,options:t}).then((({payload:e})=>e.data))}stopFindInPage(e){return this.wire.sendAction(\"stop-find-in-page\",{...this.identity,action:e}).then((()=>{}))}getPrinters(){return this.wire.sendAction(\"get-printers\",{...this.identity}).then((({payload:e})=>e.data))}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){await this.wire.sendAction(\"focus-window\",{emitSynthFocused:e,...this.identity})}async showDeveloperTools(){await this.wire.sendAction(\"show-developer-tools\",this.identity)}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction(\"get-process-info\",this.identity);return e}async getSharedWorkers(){return this.wire.sendAction(\"get-shared-workers\",this.identity).then((({payload:e})=>e.data))}async inspectSharedWorker(){await this.wire.sendAction(\"inspect-shared-worker\",{...this.identity})}async inspectSharedWorkerById(e){await this.wire.sendAction(\"inspect-shared-worker-by-id\",{...this.identity,workerId:e})}async inspectServiceWorker(){await this.wire.sendAction(\"inspect-service-worker\",{...this.identity})}async showPopupWindow(e){if(this.wire.sendAction(`${this.entityType}-show-popup-window`,this.identity).catch((()=>{})),e?.onPopupReady){const t=async({popupName:t})=>{try{const n=this.fin.Window.wrapSync({uuid:this.fin.me.uuid,name:t});await e.onPopupReady(n)}catch(e){throw new Error(`Something went wrong during onPopupReady execution: ${e}`)}};await this.once(\"popup-ready\",t)}const{payload:t}=await this.wire.sendAction(\"try-create-popup-window\",{options:{...e,hasResultCallback:!!e?.onPopupResult,hasReadyCallback:!!e?.onPopupReady},...this.identity}),{data:{willOpen:n,options:i}}=t;n&&await this.fin.Window.create(i.initialOptions);if(e?.onPopupResult){const t=async t=>{await e.onPopupResult((e=>{const{name:t,uuid:n,result:i,data:r}=e,o={identity:{name:t,uuid:n},result:i};return r&&(o.data=r),o})(t))},n=async()=>{await this.removeListener(\"popup-result\",t)};await this.on(\"popup-result\",t),await this.once(\"popup-teardown\",n)}const{payload:r}=await this.wire.sendAction(\"show-popup-window\",{options:i,...this.identity});return r.data}}var U,V,z,K,q;function J(){return V||(V=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(function(){if($)return L;$=1,Object.defineProperty(L,\"__esModule\",{value:!0}),L.ViewModule=void 0;const e=d,t=O,n=J(),i=T;class r extends e.Base{async create(e){const{uuid:t}=this.wire.me;if(!e.name||\"string\"!=typeof e.name)throw new Error(\"Please provide a name property as a string in order to create a View.\");return(0,i.handleDeprecatedWarnings)(e),this.wire.environment.childViews?await this.wire.environment.createChildContent({entityType:\"view\",options:{...e,uuid:t}}):await this.wire.sendAction(\"create-view\",{...e,uuid:t}),this.wrapSync({uuid:t,name:e.name})}async wrap(e){this.wire.sendAction(\"view-wrap\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}wrapSync(e){this.wire.sendAction(\"view-wrap-sync\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}getCurrent(){if(this.wire.sendAction(\"view-get-current\").catch((e=>{})),!this.wire.me.isView)throw new Error(\"You are not in a View context\");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction(\"view-get-current-sync\").catch((e=>{})),!this.wire.me.isView)throw new Error(\"You are not in a View context\");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return L.ViewModule=r,L}(),e),n(function(){if(U)return B;var e;U=1,Object.defineProperty(B,\"__esModule\",{value:!0}),B.View=void 0;const t=g,n=G,i=H,r=ie();class o extends i.WebContents{constructor(i,o){super(i,o,\"view\"),this.identity=o,e.set(this,new n.Lazy((()=>this.fin.Platform.wrapSync(this.identity).getClient()))),this.attach=async e=>{await this.wire.sendAction(\"attach-view\",{target:e,...this.identity})},this.destroy=async()=>{await this.wire.sendAction(\"destroy-view\",{...this.identity})},this.show=async()=>{await this.wire.sendAction(\"show-view\",{...this.identity})},this.showAt=async(e,t={})=>{await this.wire.sendAction(\"show-view-at\",{bounds:e,...this.identity,options:t})},this.bringToFront=async()=>{await this.wire.sendAction(\"bring-view-to-front\",{...this.identity})},this.hide=async()=>{await this.wire.sendAction(\"hide-view\",{...this.identity})},this.setBounds=async e=>{await this.wire.sendAction(\"set-view-bounds\",{bounds:e,...this.identity})},this.getBounds=async()=>(await this.wire.sendAction(\"get-view-bounds\",{...this.identity})).payload.data,this.getInfo=async()=>(await this.wire.sendAction(\"get-view-info\",{...this.identity})).payload.data,this.getParentLayout=async()=>(this.wire.sendAction(\"view-get-parent-layout\",{...this.identity}).catch((()=>{})),this.fin.Platform.Layout.getLayoutByViewIdentity(this.identity)),this.getOptions=async()=>this.wire.sendAction(\"get-view-options\",{...this.identity}).then((({payload:e})=>e.data)),this.updateOptions=async e=>this.wire.sendAction(\"update-view-options\",{options:e,...this.identity}).then((()=>{})),this.getCurrentWindow=async()=>{const{payload:{data:e}}=await this.wire.sendAction(\"get-view-window\",{...this.identity});return new r._Window(this.wire,e)},this.getCurrentStack=async()=>{this.wire.sendAction(\"view-get-current-stack\").catch((()=>{}));try{return(await this.getParentLayout()).getStackByViewIdentity(this.identity)}catch(e){throw new t.RuntimeError({reason:\"This view does not belong to a stack.\",error:e})}},this.triggerBeforeUnload=async()=>(await this.wire.sendAction(\"trigger-before-unload\",{...this.identity})).payload.data,this.bindToElement=async e=>{if(!e)throw new Error(\"Element not found.\");return this.wire.environment.observeBounds(e,(async e=>this.setBounds(e)))}}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){const t=await this.getCurrentWindow();await t.focusedWebViewWasChanged(),await super.focus({emitSynthFocused:e})}}return B.View=o,e=new WeakMap,B}(),e)}(k)),k}function Y(){if(z)return j;z=1,Object.defineProperty(j,\"__esModule\",{value:!0}),j.Application=void 0;const e=d,t=ie(),n=J();class i extends e.EmitterBase{constructor(e,n){super(e,\"application\",n.uuid),this.identity=n,this.window=new t._Window(this.wire,{uuid:this.identity.uuid,name:this.identity.uuid})}windowListFromIdentityList(e){const n=[];return e.forEach((e=>{n.push(new t._Window(this.wire,{uuid:e.uuid,name:e.name}))})),n}isRunning(){return this.wire.sendAction(\"is-application-running\",this.identity).then((({payload:e})=>e.data))}async quit(e=!1){try{await this._close(e),await this.wire.sendAction(\"destroy-application\",{force:e,...this.identity})}catch(e){if(![\"Remote connection has closed\",\"Could not locate the requested application\"].some((t=>e.message.includes(t))))throw e}}async _close(e=!1){try{await this.wire.sendAction(\"close-application\",{force:e,...this.identity})}catch(e){if(!e.message.includes(\"Remote connection has closed\"))throw e}}close(e=!1){return console.warn(\"Deprecation Warning: Application.close is deprecated Please use Application.quit\"),this.wire.sendAction(\"application-close\",this.identity).catch((e=>{})),this._close(e)}getChildWindows(){return this.wire.sendAction(\"get-child-windows\",this.identity).then((({payload:e})=>{const t=[];return e.data.forEach((e=>{t.push({uuid:this.identity.uuid,name:e})})),this.windowListFromIdentityList(t)}))}getManifest(){return this.wire.sendAction(\"get-application-manifest\",this.identity).then((({payload:e})=>e.data))}getParentUuid(){return this.wire.sendAction(\"get-parent-application\",this.identity).then((({payload:e})=>e.data))}getShortcuts(){return this.wire.sendAction(\"get-shortcuts\",this.identity).then((({payload:e})=>e.data))}async getViews(){const{payload:e}=await this.wire.sendAction(\"application-get-views\",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}getZoomLevel(){return this.wire.sendAction(\"get-application-zoom-level\",this.identity).then((({payload:e})=>e.data))}getWindow(){return this.wire.sendAction(\"application-get-window\",this.identity).catch((e=>{})),Promise.resolve(this.window)}registerUser(e,t){return this.wire.sendAction(\"register-user\",{userName:e,appName:t,...this.identity}).then((()=>{}))}removeTrayIcon(){return this.wire.sendAction(\"remove-tray-icon\",this.identity).then((()=>{}))}restart(){return this.wire.sendAction(\"restart-application\",this.identity).then((()=>{}))}run(){return console.warn(\"Deprecation Warning: Application.run is deprecated Please use fin.Application.start\"),this.wire.sendAction(\"application-run\",this.identity).catch((e=>{})),this._run()}_run(e={}){return this.wire.sendAction(\"run-application\",{manifestUrl:this._manifestUrl,opts:e,...this.identity}).then((()=>{}))}scheduleRestart(){return this.wire.sendAction(\"relaunch-on-close\",this.identity).then((()=>{}))}async sendApplicationLog(){const{payload:e}=await this.wire.sendAction(\"send-application-log\",this.identity);return e.data}async setJumpList(e){await this.wire.sendAction(\"set-jump-list\",{config:e,...this.identity})}setTrayIcon(e){return this.wire.sendAction(\"set-tray-icon\",{enabledIcon:e,...this.identity}).then((()=>{}))}setShortcuts(e){return this.wire.sendAction(\"set-shortcuts\",{data:e,...this.identity}).then((()=>{}))}async setShortcutQueryParams(e){await this.wire.sendAction(\"set-shortcut-query-args\",{data:e,...this.identity})}setZoomLevel(e){return this.wire.sendAction(\"set-application-zoom-level\",{level:e,...this.identity}).then((()=>{}))}async setAppLogUsername(e){await this.wire.sendAction(\"set-app-log-username\",{data:e,...this.identity})}getTrayIconInfo(){return this.wire.sendAction(\"get-tray-icon-info\",this.identity).then((({payload:e})=>e.data))}hasTrayIcon(){return this.wire.sendAction(\"has-tray-icon\",this.identity).then((({payload:e})=>e.data))}terminate(){return this.wire.sendAction(\"terminate-application\",this.identity).then((()=>{}))}wait(){return this.wire.sendAction(\"wait-for-hung-application\",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction(\"get-info\",this.identity).then((({payload:e})=>e.data))}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction(\"application-get-process-info\",this.identity);return e}async setFileDownloadLocation(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t};await this.wire.sendAction(\"set-file-download-location\",{...n,downloadLocation:e})}async getFileDownloadLocation(){const{payload:{data:e}}=await this.wire.sendAction(\"get-file-download-location\",this.identity);return e}async showTrayIconPopupMenu(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t},{payload:i}=await this.wire.sendAction(\"show-tray-icon-popup-menu\",{...n,options:e});return i.data}async closeTrayIconPopupMenu(){const{name:e}=this.wire.me,t={uuid:this.identity.uuid,name:e};await this.wire.sendAction(\"close-tray-icon-popup-menu\",{...t})}}return j.Application=i,j}function Z(){return q||(q=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(function(){if(K)return F;K=1,Object.defineProperty(F,\"__esModule\",{value:!0}),F.ApplicationModule=void 0;const e=d,t=O,n=Y();class i extends e.Base{async wrap(e){this.wire.sendAction(\"wrap-application\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}wrapSync(e){this.wire.sendAction(\"wrap-application-sync\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}async _create(e){return void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&void 0===e.isPlatformController&&(e.autoShow=!0),await this.wire.sendAction(\"create-application\",e),this.wrap({uuid:e.uuid})}create(e){return console.warn(\"Deprecation Warning: fin.Application.create is deprecated. Please use fin.Application.start\"),this.wire.sendAction(\"application-create\").catch((e=>{})),this._create(e)}async start(e){this.wire.sendAction(\"start-application\").catch((e=>{}));const t=await this._create(e);return await this.wire.sendAction(\"run-application\",{uuid:e.uuid}),t}async startManyManifests(e,t){return this.wire.sendAction(\"run-applications\",{applications:e,opts:t}).then((()=>{}))}getCurrent(){return this.wire.sendAction(\"get-current-application\").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction(\"get-current-application-sync\").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}async startFromManifest(e,t){this.wire.sendAction(\"application-start-from-manifest\").catch((e=>{}));const n=await this._createFromManifest(e);return await n._run(t),n}createFromManifest(e){return console.warn(\"Deprecation Warning: fin.Application.createFromManifest is deprecated. Please use fin.Application.startFromManifest\"),this.wire.sendAction(\"application-create-from-manifest\").catch((e=>{})),this._createFromManifest(e)}_createFromManifest(e){return this.wire.sendAction(\"get-application-manifest\",{manifestUrl:e}).then((({payload:e})=>{const t=e.data.platform?e.data.platform.uuid:e.data.startup_app.uuid;return this.wrap({uuid:t})})).then((t=>(t._manifestUrl=e,t)))}}return F.ApplicationModule=i,F}(),e),n(Y(),e)}(R)),R}H.WebContents=D;var Q={};Object.defineProperty(Q,\"__esModule\",{value:!0}),Q.promisifySubscription=void 0;var X,ee,te;function ne(){if(X)return S;X=1,Object.defineProperty(S,\"__esModule\",{value:!0}),S._Window=void 0;const e=Z(),t=H,n=J(),i=T,r=Q;class o extends t.WebContents{constructor(e,t){super(e,t,\"window\")}async createWindow(e){this.wire.sendAction(\"window-create-window\",this.identity).catch((e=>{}));const t=await(0,r.promisifySubscription)(this,\"fire-constructor-callback\");void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&(e.autoShow=!0),(0,i.handleDeprecatedWarnings)(e);const n=this.wire.environment.createChildContent({entityType:\"window\",options:e}),[o]=await Promise.all([t.getValue(),n]);let s;const{success:a}=o,c=o.data,{message:d}=c;s=a?{httpResponseCode:c.httpResponseCode,apiInjected:c.apiInjected}:{message:c.message,networkErrorCode:c.networkErrorCode,stack:c.stack};const h={message:d,cbPayload:s,success:a};try{this.getWebWindow().fin.__internal_.openerSuccessCBCalled()}catch(e){}return h.success?this:Promise.reject(h)}getAllFrames(){return this.wire.sendAction(\"get-all-frames\",this.identity).then((({payload:e})=>e.data))}getBounds(){return this.wire.sendAction(\"get-window-bounds\",this.identity).then((({payload:e})=>e.data))}center(){return this.wire.sendAction(\"center-window\",this.identity).then((()=>{}))}blur(){return this.wire.sendAction(\"blur-window\",this.identity).then((()=>{}))}bringToFront(){return this.wire.sendAction(\"bring-window-to-front\",this.identity).then((()=>{}))}animate(e,t){return this.wire.sendAction(\"animate-window\",{transitions:e,options:t,...this.identity}).then((()=>{}))}hide(){return this.wire.sendAction(\"hide-window\",this.identity).then((()=>{}))}close(e=!1){return this.wire.sendAction(\"close-window\",{force:e,...this.identity}).then((()=>{Object.setPrototypeOf(this,null)}))}focusedWebViewWasChanged(){return this.wire.sendAction(\"focused-webview-changed\",this.identity).then((()=>{}))}getNativeId(){return this.wire.sendAction(\"get-window-native-id\",this.identity).then((({payload:e})=>e.data))}async getCurrentViews(){const{payload:e}=await this.wire.sendAction(\"window-get-views\",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}disableFrame(){return console.warn(\"Function is deprecated; use disableUserMovement instead.\"),this.wire.sendAction(\"disable-window-frame\",this.identity).then((()=>{}))}disableUserMovement(){return this.wire.sendAction(\"disable-window-frame\",this.identity).then((()=>{}))}enableFrame(){return console.warn(\"Function is deprecated; use enableUserMovement instead.\"),this.wire.sendAction(\"enable-window-frame\",this.identity).then((()=>{}))}enableUserMovement(){return this.wire.sendAction(\"enable-window-frame\",this.identity).then((()=>{}))}flash(){return this.wire.sendAction(\"flash-window\",this.identity).then((()=>{}))}stopFlashing(){return this.wire.sendAction(\"stop-flash-window\",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction(\"get-window-info\",this.identity).then((({payload:e})=>e.data))}async getLayout(e){this.wire.sendAction(\"window-get-layout\",this.identity).catch((e=>{}));const t=await this.getOptions();if(!t.layout&&!t.layoutSnapshot)throw new Error(\"Window does not have a Layout\");return this.fin.Platform.Layout.wrap(e??this.identity)}getOptions(){return this.wire.sendAction(\"get-window-options\",this.identity).then((({payload:e})=>e.data))}getParentApplication(){return this.wire.sendAction(\"window-get-parent-application\",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity))}getParentWindow(){return this.wire.sendAction(\"window-get-parent-window\",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity)).then((e=>e.getWindow()))}async getSnapshot(e){const t={area:e,...this.identity};console.warn(\"Window.getSnapshot has been deprecated, please use Window.capturePage\");return(await this.wire.sendAction(\"get-window-snapshot\",t)).payload.data}getState(){return this.wire.sendAction(\"get-window-state\",this.identity).then((({payload:e})=>e.data))}getWebWindow(){return this.wire.sendAction(\"window-get-web-window\",this.identity).catch((e=>{})),this.wire.environment.getWebWindow(this.identity)}isMainWindow(){return this.wire.sendAction(\"window-is-main-window\",this.identity).catch((e=>{})),this.me.uuid===this.me.name}isShowing(){return this.wire.sendAction(\"is-window-showing\",this.identity).then((({payload:e})=>e.data))}maximize(){return this.wire.sendAction(\"maximize-window\",this.identity).then((()=>{}))}minimize(){return this.wire.sendAction(\"minimize-window\",this.identity).then((()=>{}))}moveBy(e,t,n){return this.wire.sendAction(\"move-window-by\",{deltaLeft:e,deltaTop:t,positioningOptions:n,...this.identity}).then((()=>{}))}moveTo(e,t,n){return this.wire.sendAction(\"move-window\",{left:e,top:t,positioningOptions:n,...this.identity}).then((()=>{}))}resizeBy(e,t,n,i){return this.wire.sendAction(\"resize-window-by\",{deltaWidth:Math.floor(e),deltaHeight:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}resizeTo(e,t,n,i){return this.wire.sendAction(\"resize-window\",{width:Math.floor(e),height:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}restore(){return this.wire.sendAction(\"restore-window\",this.identity).then((()=>{}))}setAsForeground(){return this.wire.sendAction(\"set-foreground-window\",this.identity).then((()=>{}))}setBounds(e,t){return this.wire.sendAction(\"set-window-bounds\",{...e,...this.identity,positioningOptions:t}).then((()=>{}))}show(e=!1){return this.wire.sendAction(\"show-window\",{force:e,...this.identity}).then((()=>{}))}showAt(e,t,n=!1){return this.wire.sendAction(\"show-at-window\",{force:n,left:Math.floor(e),top:Math.floor(t),...this.identity}).then((()=>{}))}updateOptions(e){return this.wire.sendAction(\"update-window-options\",{options:e,...this.identity}).then((()=>{}))}authenticate(e,t){return this.wire.sendAction(\"window-authenticate\",{userName:e,password:t,...this.identity}).then((()=>{}))}async showPopupMenu(e){const{payload:t}=await this.wire.sendAction(\"show-popup-menu\",{options:e,...this.identity});return t.data}async closePopupMenu(){return this.wire.sendAction(\"close-popup-menu\",{...this.identity}).then((()=>{}))}async dispatchPopupResult(e){this.wire.sendAction(\"window-dispatch-popup-result\",this.identity).catch((e=>{})),await this.wire.sendAction(\"dispatch-popup-result\",{data:e,...this.identity})}async print(e={content:\"self\"}){switch(e.content){case void 0:case\"self\":return super.print(e);case\"screenshot\":return this.wire.sendAction(\"print-screenshot\",this.identity).then((()=>{}));case\"views\":return this.wire.sendAction(\"print-views\",{...this.identity,options:e}).then((()=>{}));default:return}}}return S._Window=o,S}function ie(){return te||(te=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(function(){if(ee)return _;ee=1,Object.defineProperty(_,\"__esModule\",{value:!0}),_._WindowModule=void 0;const e=d,t=O,n=ne();class i extends e.Base{async wrap(e){this.wire.sendAction(\"window-wrap\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}wrapSync(e){this.wire.sendAction(\"window-wrap-sync\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}create(e){return this.wire.sendAction(\"create-window\").catch((e=>{})),new n._Window(this.wire,{uuid:this.me.uuid,name:e.name}).createWindow(e)}getCurrent(){if(this.wire.sendAction(\"get-current-window\").catch((e=>{})),!this.wire.me.isWindow)throw new Error(\"You are not in a Window context\");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction(\"get-current-window-sync\").catch((e=>{})),!this.wire.me.isWindow)throw new Error(\"You are not in a Window context\");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return _._WindowModule=i,_}(),e),n(ne(),e)}(M)),M}Q.promisifySubscription=async(e,t,n=(()=>!0),i)=>{let r,o,s;const a=new Promise(((e,t)=>{r=e,o=t})),c=e=>{n(e)&&(clearTimeout(s),r(e))};return await e.on(t,c),i&&(s=setTimeout((()=>o(new Error(\"event timed out\"))),i)),a.finally((()=>{e.removeListener(t,c).catch((()=>null))})),{getValue:()=>a}},Object.defineProperty(c,\"__esModule\",{value:!0}),c.System=void 0;const re=d,oe=g,se=ie(),ae=t;class ce extends re.EmitterBase{constructor(e){super(e,\"system\")}sendExternalProcessRequest(e,t){return new Promise(((n,i)=>{const r=\"external-process-exited\";let o,s,a,c;\"function\"==typeof t.listener&&(a=e=>{const n=e||{};s={topic:\"exited\",uuid:n.processUuid||\"\",exitCode:n.exitCode||0},o===e.processUuid&&(t.listener(s),c.removeListener(r,a))},this.wire.me.name||(this.wire.me.name=this.wire.me.uuid),c=new se._Window(this.wire,this.wire.me),c.on(r,a)),this.wire.sendAction(e,t).then((({payload:e})=>{o=e.data.uuid,n(e.data),s&&o===s.uuid&&(t.listener(s),c.removeListener(r,a))})).catch((e=>{c&&c.removeListener(r,a),i(e)}))}))}getVersion(){return this.wire.sendAction(\"get-version\").then((({payload:e})=>e.data))}clearCache(e){return this.wire.sendAction(\"clear-cache\",e).then((()=>{}))}deleteCacheOnExit(){return this.wire.sendAction(\"delete-cache-request\").then((()=>{}))}exit(){return this.wire.sendAction(\"exit-desktop\").then((()=>{}))}async fetchManifest(e){const{payload:{data:t}}=await this.wire.sendAction(\"fetch-manifest\",{manifestUrl:e});return t}flushCookieStore(){return this.wire.sendAction(\"flush-cookie-store\").then((()=>{}))}getAllWindows(){return this.wire.sendAction(\"get-all-windows\").then((({payload:e})=>e.data))}getAllApplications(){return this.wire.sendAction(\"get-all-applications\").then((({payload:e})=>e.data))}getCommandLineArguments(){return this.wire.sendAction(\"get-command-line-arguments\").then((({payload:e})=>e.data))}async getCrashReporterState(){const{payload:{data:{diagnosticMode:e,isRunning:t}}}=await this.wire.sendAction(\"get-crash-reporter-state\");return console.warn(\"diagnosticMode property is deprecated. It will be removed in a future version\"),{diagnosticMode:e,diagnosticsMode:e,isRunning:t}}async startCrashReporter(e){const t=e,n={...t,diagnosticMode:t.diagnosticsMode||t.diagnosticMode},{payload:{data:{diagnosticMode:i,isRunning:r}}}=await this.wire.sendAction(\"start-crash-reporter\",n);return{diagnosticMode:i,diagnosticsMode:i,isRunning:r}}getUniqueUserId(){return this.wire.sendAction(\"get-unique-user-id\").then((({payload:e})=>e.data))}getEntityInfo(e,t){return this.wire.sendAction(\"get-entity-info\",{uuid:e,name:t}).then((({payload:e})=>e.data))}getEnvironmentVariable(e){return this.wire.sendAction(\"get-environment-variable\",{environmentVariables:e}).then((({payload:e})=>e.data))}getFocusedWindow(){return this.wire.sendAction(\"get-focused-window\").then((({payload:e})=>e.data))}async isAppCertified(e){const{payload:{data:{certifiedInfo:t}}}=await this.wire.sendAction(\"is-app-certified\",{manifestUrl:e});return t}getInstalledRuntimes(){return this.wire.sendAction(\"get-installed-runtimes\").then((({payload:e})=>e.data.runtimes))}async getInstalledApps(){const{payload:{data:{installedApps:e}}}=await this.wire.sendAction(\"get-installed-apps\");return e}getLog(e){return this.wire.sendAction(\"view-log\",e).then((({payload:e})=>e.data))}getMachineId(){return this.wire.sendAction(\"get-machine-id\").then((({payload:e})=>e.data))}getMinLogLevel(){return this.wire.sendAction(\"get-min-log-level\").then((({payload:e})=>e.data))}getLogList(){return this.wire.sendAction(\"list-logs\").then((({payload:e})=>e.data))}getMonitorInfo(){return this.wire.sendAction(\"get-monitor-info\").then((({payload:e})=>e.data))}getMousePosition(){return this.wire.sendAction(\"get-mouse-position\").then((({payload:e})=>e.data))}getProcessList(){return console.warn(\"System.getProcessList has been deprecated. Please consider using our new process APIs: Window.getProcessInfo, View.getProcessInfo, Application.getProcessInfo, System.getAllProcessInfo\"),this.wire.sendAction(\"process-snapshot\").then((({payload:e})=>e.data))}async getAllProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction(\"get-all-process-info\",this.identity);return e}getProxySettings(){return this.wire.sendAction(\"get-proxy-settings\").then((({payload:e})=>e.data))}getRuntimeInfo(){return this.wire.sendAction(\"get-runtime-info\").then((({payload:e})=>e.data))}getRvmInfo(){return this.wire.sendAction(\"get-rvm-info\").then((({payload:e})=>e.data))}getHostSpecs(){return this.wire.sendAction(\"get-host-specs\").then((({payload:e})=>e.data))}getOSInfo(){return this.wire.sendAction(\"get-os-info\").then((({payload:e})=>e.data))}launchExternalProcess(e){return this.sendExternalProcessRequest(\"launch-external-process\",e)}monitorExternalProcess(e){return this.sendExternalProcessRequest(\"monitor-external-process\",e)}log(e,t){return this.wire.sendAction(\"write-to-log\",{level:e,message:t}).then((()=>{}))}openUrlWithBrowser(e){return this.wire.sendAction(\"open-url-with-browser\",{url:e}).then((()=>{}))}async registerCustomProtocol(e){if(\"object\"!=typeof e)throw new Error(\"Must provide an object with a `protocolName` property having a string value.\");await this.wire.sendAction(\"register-custom-protocol\",e)}async unregisterCustomProtocol(e){await this.wire.sendAction(\"unregister-custom-protocol\",{protocolName:e})}async getCustomProtocolState(e){return this.wire.sendAction(\"get-custom-protocol-state\",{protocolName:e}).then((({payload:e})=>e.data))}releaseExternalProcess(e){return this.wire.sendAction(\"release-external-process\",{uuid:e}).then((()=>{}))}showDeveloperTools(e){return this.wire.sendAction(\"show-developer-tools\",e).then((()=>{}))}terminateExternalProcess(e){return this.wire.sendAction(\"terminate-external-process\",e).then((()=>{}))}updateProxySettings(e){return this.wire.sendAction(\"update-proxy\",e).then((()=>{}))}async downloadAsset(e,t){const n=()=>{};let i=n,r=n;const o=new Promise(((e,t)=>{i=e,r=t}));if(\"openfin\"!==this.wire.environment.type)throw new oe.NotSupportedError(\"downloadAsset only supported in an OpenFin Render process\");const s=oe.RuntimeError.getCallSite(),a=this.wire.environment.getNextMessageId().toString(),c=`asset-download-progress-${a}`,d=`asset-download-error-${a}`,h=`asset-download-complete-${a}`,l=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},u=()=>{this.removeListener(c,l)};await Promise.all([this.on(c,l),this.once(d,(e=>{u();const{reason:t,err:n}=e;r(new oe.RuntimeError({reason:t,error:n},s))})),this.once(h,(()=>{u(),i()}))]);const p=Object.assign(e,{downloadId:a});return await this.wire.sendAction(\"download-asset\",p).catch((e=>{throw u(),e})),o}downloadRuntime(e,t){const n=oe.RuntimeError.getCallSite();return new Promise(((i,r)=>{if(\"openfin\"!==this.wire.environment.type)return void r(new oe.NotSupportedError(\"downloadRuntime only supported in an OpenFin Render process\"));const o=this.wire.environment.getNextMessageId().toString(),s=`runtime-download-progress-${o}`,a=`runtime-download-error-${o}`,c=`runtime-download-complete-${o}`,d=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},h=()=>{this.removeListener(s,d)};this.on(s,d),this.once(a,(e=>{h();const{reason:t,err:i}=e;r(new oe.RuntimeError({reason:t,error:i},n))})),this.once(c,(()=>{h(),i()}));const l=Object.assign(e,{downloadId:o});this.wire.sendAction(\"download-runtime\",l).catch((e=>{h(),r(e)}))}))}downloadPreloadScripts(e){return this.wire.sendAction(\"download-preload-scripts\",{scripts:e}).then((({payload:e})=>e.data))}getAllExternalApplications(){return this.wire.sendAction(\"get-all-external-applications\").then((({payload:e})=>e.data))}getAppAssetInfo(e){return this.wire.sendAction(\"get-app-asset-info\",e).then((({payload:e})=>e.data))}getCookies(e){const t=this.wire.environment.getUrl(),n=Object.assign(e,{url:t});return this.wire.sendAction(\"get-cookies\",n).then((({payload:e})=>e.data))}setMinLogLevel(e){return this.wire.sendAction(\"set-min-log-level\",{level:e}).then((()=>{}))}resolveUuid(e){return this.wire.sendAction(\"resolve-uuid\",{entityKey:e}).then((({payload:e})=>e.data))}executeOnRemote(e,t){return t.requestingIdentity=e,this.wire.ferryAction(t)}readRegistryValue(e,t,n){return this.wire.sendAction(\"read-registry-value\",{rootKey:e,subkey:t,value:n}).then((({payload:e})=>e.data))}registerExternalConnection(e){return this.wire.sendAction(\"register-external-connection\",{uuid:e}).then((({payload:e})=>e.data))}async getServiceConfiguration(e){if(\"string\"!=typeof e.name)throw new Error(\"Must provide an object with a `name` property having a string value\");const{name:t}=e;return this.wire.sendAction(\"get-service-configuration\",{name:t}).then((({payload:e})=>e.data))}async getSystemAppConfig(e){if(\"string\"!=typeof e)throw new Error(\"Must provide a string value for name of system app\");return this.wire.sendAction(\"get-system-app-configuration\",{name:e}).then((({payload:e})=>e.data))}async registerShutdownHandler(e){this.wire.sendAction(\"system-register-shutdown-handler\").catch((e=>{}));const{uuid:t,name:n}=this.wire.me;this.on(\"system-shutdown\",(i=>{e({proceed:()=>{this.wire.environment.raiseEvent(\"application/system-shutdown-handled\",{uuid:t,name:n,topic:\"application\"})}})}))}runRvmHealthCheck(){return this.wire.sendAction(\"run-rvm-health-check\").then((({payload:e})=>e.data))}async launchManifest(e,t={}){const{subscribe:n,...i}=t,r=i;if(n){const e=new ae.EventEmitter;n(e);const t=\"app-version-progress\",i=\"runtime-status\",o=\"app-version-complete\",s=\"app-version-error\",a=this.wire.environment.getNextMessageId().toString();r.appVersionId=a;const c=[o,t,i,s],d=e=>{const{appVersionId:t,topic:n,type:i,...r}=e;return{...r,type:c.find((e=>i.includes(e)))}},h=t=>{const n=d(t);e.emit(n.type,n)},l=()=>{this.removeListener(`${t}.${a}`,h),this.removeListener(`${i}.${a}`,h),this.removeListener(`${o}.${a}`,h),this.removeListener(`${s}.${a}`,h),this.removeListener(`${o}.${a}`,l),this.removeListener(`${s}.${a}`,l)};await Promise.all([this.on(`${t}.${a}`,h),this.on(`${i}.${a}`,h),this.once(`${o}.${a}`,h),this.once(`${s}.${a}`,h),this.once(`${o}.${a}`,l),this.once(`${s}.${a}`,l)])}return(await this.wire.sendAction(\"launch-manifest\",{manifestUrl:e,opts:r})).payload.data.manifest}async queryPermissionForCurrentContext(e){const t={uuid:this.wire.me.uuid,name:this.wire.me.name};return(await this.wire.sendAction(\"query-permission-for-current-context\",{apiName:e,identity:t})).payload.data}async enableNativeWindowIntegrationProvider(e){const{payload:t}=await this.wire.sendAction(\"enable-native-window-integration-provider\",{permissions:e});return t.data}async registerUsage({data:e,type:t}){await this.wire.sendAction(\"register-usage\",{data:e,type:t})}async getPrinters(){const{payload:e}=await this.wire.sendAction(\"system-get-printers\");return e.data}async updateProcessLoggingOptions(e){await this.wire.sendAction(\"system-update-process-logging-options\",{options:e})}async getDomainSettings(){const{payload:{data:e}}=await this.wire.sendAction(\"get-domain-settings\",this.identity);return e}async setDomainSettings(e){await this.wire.sendAction(\"set-domain-settings\",{domainSettings:e,...this.identity})}async refreshExtensions(){const{payload:e}=await this.wire.sendAction(\"refresh-extensions\");return e.data}async getInstalledExtensions(){const{payload:e}=await this.wire.sendAction(\"get-installed-extensions\");return e.data}}c.System=ce;var de={},he={};Object.defineProperty(he,\"__esModule\",{value:!0}),he.RefCounter=void 0;he.RefCounter=class{constructor(){this.topicRefMap=new Map}incRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t+1;n=i,this.topicRefMap.set(e,i)}else this.topicRefMap.set(e,1),n=1;return n}decRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t-1;this.topicRefMap.set(e,i),n=i}else n=-1;return n}actOnFirst(e,t,n){return 1===this.incRefCount(e)?t():n()}actOnLast(e,t,n){return 0===this.decRefCount(e)?t():n()}};var le={},ue={},pe={};Object.defineProperty(pe,\"__esModule\",{value:!0}),pe.ChannelBase=pe.ProtectedItems=void 0;const we=e=>async(t,n,i)=>{const r=await e(t,n,i);return void 0===r?n:r};pe.ProtectedItems=class{constructor(e,t){this.providerIdentity=e,this.close=t}};class ye{static defaultAction(e){throw new Error(`No action registered at target for ${e}`)}constructor(){this.subscriptions=new Map}async processAction(e,t,n){try{const i=this.subscriptions.has(e)?this.subscriptions.get(e):(t,n)=>(this.defaultAction??ye.defaultAction)(e,t,n),r=this.preAction?await this.preAction(e,t,n):t,o=await i(r,n);return this.postAction?await this.postAction(e,o,n):o}catch(t){if(this.errorMiddleware)return this.errorMiddleware(e,t,n);throw t}}beforeAction(e){if(this.preAction)throw new Error(\"Already registered beforeAction middleware\");this.preAction=we(e)}onError(e){if(this.errorMiddleware)throw new Error(\"Already registered error middleware\");this.errorMiddleware=e}afterAction(e){if(this.postAction)throw new Error(\"Already registered afterAction middleware\");this.postAction=we(e)}remove(e){this.subscriptions.delete(e)}setDefaultAction(e){if(this.defaultAction)throw new Error(\"default action can only be set once\");this.defaultAction=e}register(e,t){if(this.subscriptions.has(e))throw new Error(`Subscription already registered for action: ${e}. Unsubscribe before adding new subscription`);return this.subscriptions.set(e,t),!0}}pe.ChannelBase=ye;var fe,ge,me,ve=s&&s.__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)},Ce=s&&s.__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};Object.defineProperty(ue,\"__esModule\",{value:!0}),ue.ChannelClient=void 0;const be=pe,Ie=new Map;class Ee extends be.ChannelBase{static closeChannelByEndpointId(e){const t=Ie.get(e);t&&ve(t,me,\"f\").call(t)}static handleProviderDisconnect(e){for(const t of Ie.values())t.providerIdentity.channelId===e.channelId&&(t.disconnectListener(e),ve(t,me,\"f\").call(t))}constructor(e,t,n){super(),fe.set(this,void 0),ge.set(this,void 0),this.processAction=(e,t,n)=>super.processAction(e,t,n),me.set(this,(()=>{Ie.delete(this.endpointId),ve(this,ge,\"f\").close()})),Ce(this,fe,new be.ProtectedItems(e,t),\"f\"),this.disconnectListener=()=>{},this.endpointId=e.endpointId,Ce(this,ge,n,\"f\"),Ie.set(this.endpointId,this),n.receive(this.processAction)}get providerIdentity(){return ve(this,fe,\"f\").providerIdentity}async dispatch(e,t){if(ve(this,ge,\"f\").isEndpointConnected(this.providerIdentity.channelId))return ve(this,ge,\"f\").send(this.providerIdentity.channelId,e,t);throw new Error(\"The client you are trying to dispatch from is disconnected from the target provider.\")}onDisconnection(e){this.disconnectListener=t=>{try{e(t)}catch(e){throw new Error(`Error while calling the onDisconnection callback: ${e.message}`)}finally{this.disconnectListener=()=>{}}}}async disconnect(){await this.sendDisconnectAction(),ve(this,me,\"f\").call(this)}async sendDisconnectAction(){const e=ve(this,fe,\"f\");await e.close()}static async wireClose(e,t,n){const{channelName:i,uuid:r,name:o}=t;await e.sendAction(\"disconnect-from-channel\",{channelName:i,uuid:r,name:o,endpointId:n})}}ue.ChannelClient=Ee,fe=new WeakMap,ge=new WeakMap,me=new WeakMap;var xe={},Ae={};Object.defineProperty(Ae,\"__esModule\",{value:!0}),Ae.exhaustiveCheck=void 0,Ae.exhaustiveCheck=function(e,t){throw new Error(`Unsupported value: ${e}${t?`\\n Supported values are: ${t.join(\"\")}`:\"\"}`)};var Pe,Me,_e,Oe={},Se=s&&s.__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},Re=s&&s.__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)};Object.defineProperty(Oe,\"__esModule\",{value:!0}),Oe.ClassicInfo=Oe.ClassicStrategy=void 0;Oe.ClassicStrategy=class{constructor(e,t,n,i){this.messageReceiver=t,this.endpointId=n,this.providerIdentity=i,Pe.set(this,void 0),Me.set(this,new Map),_e.set(this,new Map),this.send=async(e,t,n)=>{const i=Re(this,Me,\"f\").get(e);if(!i)throw new Error(`Could not locate routing info for endpoint ${e}`);const r={...i};r.isLocalEndpointId&&delete r.endpointId,delete r.isLocalEndpointId;const o=Re(this,Pe,\"f\").sendAction(\"send-channel-message\",{...r,providerIdentity:this.providerIdentity,action:t,payload:n});Re(this,_e,\"f\").get(e)?.add(o);return(await o.catch((e=>{throw new Error(e.message)})).finally((()=>{Re(this,_e,\"f\").get(e)?.delete(o)}))).payload.data.result},this.close=async()=>{this.messageReceiver.removeEndpoint(this.providerIdentity.channelId,this.endpointId),[...Re(this,Me,\"f\").keys()].forEach((e=>this.closeEndpoint(e))),Se(this,Me,new Map,\"f\")},Se(this,Pe,e,\"f\")}onEndpointDisconnect(e,t){}receive(e){this.messageReceiver.addEndpoint(e,this.providerIdentity.channelId,this.endpointId)}async closeEndpoint(e){const t=Re(this,Me,\"f\").get(e);Re(this,Me,\"f\").delete(e);const n=Re(this,_e,\"f\").get(e);n?.forEach((n=>{const i=`Channel connection with identity uuid: ${t?.uuid} / name: ${t?.name} / endpointId: ${e} no longer connected.`;n.cancel(new Error(i))}))}isEndpointConnected(e){return Re(this,Me,\"f\").has(e)}addEndpoint(e,t){Re(this,Me,\"f\").set(e,t.endpointIdentity),Re(this,_e,\"f\").set(e,new Set)}isValidEndpointPayload(e){return\"string\"==typeof e?.endpointIdentity?.endpointId||\"string\"==typeof e?.endpointIdentity?.channelId}},Pe=new WeakMap,Me=new WeakMap,_e=new WeakMap,Oe.ClassicInfo={version:5,minimumVersion:0,type:\"classic\"};var Fe={},je={},ke={};Object.defineProperty(ke,\"__esModule\",{value:!0}),ke.errorToPOJO=void 0,ke.errorToPOJO=function(e){return{stack:e.stack,name:e.name,message:e.message,toString:()=>e.stack||e.toString()}};var Le,Te,$e=s&&s.__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)},Be=s&&s.__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};Object.defineProperty(je,\"__esModule\",{value:!0}),je.RTCEndpoint=void 0;const Ge=ke;je.RTCEndpoint=class{static isValidEndpointPayload(e){const t=e=>\"object\"==typeof e&&null!==e;return t(e)&&t(e.endpointIdentity)&&t(e.rtc)&&\"string\"==typeof e.endpointIdentity.endpointId}constructor({rtc:e,endpointIdentity:t}){this.responseMap=new Map,Le.set(this,null),Te.set(this,void 0),this.connectionStateChangeHandler=e=>{\"connected\"!==this.rtc.rtcClient.connectionState&&(this.rtc.rtcClient.removeEventListener(\"connectionstatechange\",this.connectionStateChangeHandler),this.close(),$e(this,Te,\"f\")&&$e(this,Te,\"f\").call(this))},this.send=async(e,t)=>{const n=`message-${Math.random()}`,i=new Promise(((e,t)=>{this.responseMap.set(n,{resolve:e,reject:t})}));return this.rtc.channels.request.send(JSON.stringify({action:e,payload:t,messageId:n})),i},this.close=()=>{this.responseMap.forEach((e=>e.reject(\"Connection has closed.\"))),this.responseMap=new Map,this.rtc.channels.request.close(),this.rtc.channels.response.close(),this.rtc.rtcClient.close()},this.rtc=e,this.endpointIdentity=t,this.rtc.channels.response.addEventListener(\"message\",(e=>{let{data:t}=e;e.data instanceof ArrayBuffer&&(t=(new TextDecoder).decode(e.data));const{messageId:n,payload:i,success:r,error:o}=JSON.parse(t),{resolve:s,reject:a}=this.responseMap.get(n)??{};s&&a?(this.responseMap.delete(n),r?s(i):a(o)):(console.log(\"Could not find id in responseMap.\"),console.log(e))})),this.rtc.channels.request.addEventListener(\"message\",(async e=>{let{data:n}=e;e.data instanceof ArrayBuffer&&(n=(new TextDecoder).decode(e.data));const{messageId:i,action:r,payload:o}=JSON.parse(n);if($e(this,Le,\"f\"))try{const e=await $e(this,Le,\"f\").call(this,r,o,t);this.rtc.channels.response.send(JSON.stringify({messageId:i,payload:e,success:!0}))}catch(e){\"open\"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,error:(0,Ge.errorToPOJO)(e),success:!1}))}else\"open\"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,success:!1,error:\"Connection not ready.\"}))})),this.rtc.rtcClient.addEventListener(\"connectionstatechange\",this.connectionStateChangeHandler),Object.values(this.rtc.channels).forEach((e=>{e.onclose=e=>{[...this.responseMap.values()].forEach((e=>e.reject(new Error(\"RTCDataChannel closed unexpectedly, this is most commonly caused by message size. Note: RTC Channels have a message size limit of ~255kB.\")))),this.close(),$e(this,Te,\"f\")&&$e(this,Te,\"f\").call(this)}}))}onDisconnect(e){if($e(this,Te,\"f\"))throw new Error(\"RTCEndpoint disconnectListener cannot be set twice.\");Be(this,Te,e,\"f\")}receive(e){if($e(this,Le,\"f\"))throw new Error(\"You have already set a listener for this RTC Endpoint.\");Be(this,Le,e,\"f\")}get connected(){return\"connected\"===this.rtc.rtcClient.connectionState}},Le=new WeakMap,Te=new WeakMap;var We,He,Ne,De={},Ue=s&&s.__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)},Ve=s&&s.__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};Object.defineProperty(De,\"__esModule\",{value:!0}),De.EndpointStrategy=void 0;De.EndpointStrategy=class{constructor(e,t,n){this.EndpointType=e,this.StrategyName=n,We.set(this,null),He.set(this,new Map),Ne.set(this,!0),this.send=async(e,t,n)=>this.getEndpointById(e).send(t,n),this.close=async()=>{Ue(this,Ne,\"f\")&&(Ue(this,He,\"f\").forEach((e=>e.close())),Ve(this,He,new Map,\"f\")),Ve(this,Ne,!1,\"f\")},this.isValidEndpointPayload=t}onEndpointDisconnect(e,t){this.getEndpointById(e).onDisconnect(t)}receive(e){if(Ue(this,We,\"f\"))throw new Error(`You have already set a listener for this ${this.StrategyName} Strategy`);Ve(this,We,e,\"f\"),Ue(this,He,\"f\").forEach((e=>e.receive(Ue(this,We,\"f\"))))}getEndpointById(e){const t=Ue(this,He,\"f\").get(e);if(!t)throw new Error(`Client with endpoint id ${e} is not connected`);return t}get connected(){return Ue(this,Ne,\"f\")}isEndpointConnected(e){return Ue(this,He,\"f\").has(e)}addEndpoint(e,t){if(!Ue(this,Ne,\"f\"))return void console.warn(`Adding endpoint to disconnected ${this.StrategyName} Strategy`);const n=new this.EndpointType(t);Ue(this,We,\"f\")&&n.receive(Ue(this,We,\"f\")),Ue(this,He,\"f\").set(e,n)}async closeEndpoint(e){Ue(this,He,\"f\").delete(e)}},We=new WeakMap,He=new WeakMap,Ne=new WeakMap,Object.defineProperty(Fe,\"__esModule\",{value:!0}),Fe.RTCInfo=Fe.RTCStrategy=void 0;const ze=je,Ke=De;class qe extends Ke.EndpointStrategy{constructor(){super(ze.RTCEndpoint,ze.RTCEndpoint.isValidEndpointPayload,\"RTC\")}}Fe.RTCStrategy=qe,Fe.RTCInfo={version:2,minimumVersion:0,type:\"rtc\"};var Je={};Object.defineProperty(Je,\"__esModule\",{value:!0}),Je.RTCICEManager=void 0;const Ye=d;class Ze extends Ye.EmitterBase{constructor(e){super(e,\"channel\"),this.ensureChannelOpened=e=>new Promise(((t,n)=>{if(\"open\"===e.readyState)t();else if(\"connecting\"===e.readyState){const n=()=>{e.removeEventListener(\"open\",n),t()};e.addEventListener(\"open\",n)}else n(new Error(\"This Channel has already closed\"))}))}static createDataChannelPromise(e,t){let n;const i=new Promise((e=>{n=e})),r=i=>{const o=()=>{i.channel.removeEventListener(\"open\",o),n(i.channel)};i.channel.label===e&&(i.channel.addEventListener(\"open\",o),t.removeEventListener(\"datachannel\",r))};return t.addEventListener(\"datachannel\",r),i}async listenForProviderIce(e,t){await this.on(this.createProviderEventName(e),t,{timestamp:Date.now()})}async raiseProviderIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createProviderEventName(e)),t)}async listenForClientIce(e,t){await this.on(this.createClientEventName(e),t,{timestamp:Date.now()})}async raiseClientIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createClientEventName(e)),t)}cleanupIceListeners(e){this.removeAllListeners(this.createClientEventName(e)),this.removeAllListeners(this.createProviderEventName(e))}createClientEventName(e){return`ice-client-${e}`}createProviderEventName(e){return`ice-provider-${e}`}createRouteString(e){return`channel/${e}`}createRtcPeer(){return this.wire.environment.getRtcPeer()}async startClientOffer(){const e=Math.random().toString(),t=this.createRtcPeer();t.addEventListener(\"icecandidate\",(async t=>{t.candidate&&await this.raiseClientIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForProviderIce(e,(async e=>{await t.addIceCandidate(e.candidate)}));const n={request:t.createDataChannel(\"request\"),response:t.createDataChannel(\"response\")},i=await t.createOffer();await t.setLocalDescription(i);const r=Promise.all([n.request,n.response].map(this.ensureChannelOpened)).then((()=>{}));return{rtcClient:t,channels:n,offer:i,rtcConnectionId:e,channelsOpened:r}}async finishClientOffer(e,t,n){return await e.setRemoteDescription(t),await n,!0}async createProviderAnswer(e,t){const n=this.createRtcPeer(),i=Ze.createDataChannelPromise(\"request\",n),r=Ze.createDataChannelPromise(\"response\",n);n.addEventListener(\"icecandidate\",(async t=>{t.candidate&&await this.raiseProviderIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForClientIce(e,(async e=>{await n.addIceCandidate(e.candidate)})),await n.setRemoteDescription(t);const o=await n.createAnswer();await n.setLocalDescription(o);const s=Promise.all([i,r]).then((([t,n])=>(this.cleanupIceListeners(e),{request:t,response:n})));return{rtcClient:n,answer:o,channels:s}}}Je.RTCICEManager=Ze;var Qe={},Xe={};function et(e){return[...e.split(\".\").reverse().entries()].reduce(((e,[t,n])=>e+ +n*1e4**t),0)}function tt(e,t){return et(e)>=et(t)}function nt(e){return e.split(\"/\")[0]}Object.defineProperty(Xe,\"__esModule\",{value:!0}),Xe.runtimeUuidMeetsMinimumRuntimeVersion=Xe.parseRuntimeUuid=Xe.meetsMinimumRuntimeVersion=void 0,Xe.meetsMinimumRuntimeVersion=tt,Xe.parseRuntimeUuid=nt,Xe.runtimeUuidMeetsMinimumRuntimeVersion=function(e,t){return tt(nt(e),t)};var it,rt,ot,st,at,ct=s&&s.__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)},dt=s&&s.__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};Object.defineProperty(Qe,\"__esModule\",{value:!0}),Qe.ChannelProvider=void 0;const ht=pe,lt=Xe;class ut extends ht.ChannelBase{get connections(){return[...ct(this,it,\"f\")]}static handleClientDisconnection(e,t){const n=e.connections.find((e=>e.endpointId===t.endpointId));if(n)ct(e,st,\"f\").call(e,n);else{e.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name)).forEach(ct(e,st,\"f\"))}e.disconnectListener(t)}static setProviderRemoval(e,t){ut.removalMap.set(e,t)}constructor(e,t,n){super(),it.set(this,void 0),rt.set(this,void 0),ot.set(this,void 0),st.set(this,(e=>{const t=this.connections.filter((t=>t.endpointId!==e.endpointId));ct(this,ot,\"f\").closeEndpoint(e.endpointId),dt(this,it,t,\"f\")})),this.processAction=async(e,t,n)=>(ut.clientIsMultiRuntime(n)&&!(0,lt.runtimeUuidMeetsMinimumRuntimeVersion)(n.runtimeUuid,\"18.87.56.0\")?this.handleMultiRuntimeLegacyClient(n):this.checkForClientConnection(n),super.processAction(e,t,n)),at.set(this,(()=>{ct(this,ot,\"f\").close();const e=ut.removalMap.get(this);e&&e()})),dt(this,rt,new ht.ProtectedItems(e,t),\"f\"),this.connectListener=()=>{},this.disconnectListener=()=>{},dt(this,it,[],\"f\"),dt(this,ot,n,\"f\"),n.receive(this.processAction)}dispatch(e,t,n){const i=e.endpointId??this.getEndpointIdForOpenFinId(e,t);return i&&ct(this,ot,\"f\").isEndpointConnected(i)?ct(this,ot,\"f\").send(i,t,n):Promise.reject(new Error(`Client connection with identity uuid: ${e.uuid} / name: ${e.name} / endpointId: ${i} no longer connected.`))}async processConnection(e,t){return ct(this,it,\"f\").push(e),this.connectListener(e,t)}publish(e,t){return this.connections.map((n=>ct(this,ot,\"f\").send(n.endpointId,e,t)))}onConnection(e){this.connectListener=e}onDisconnection(e){this.disconnectListener=e}async destroy(){const e=ct(this,rt,\"f\");e.providerIdentity,dt(this,it,[],\"f\"),await e.close(),ct(this,at,\"f\").call(this)}async getAllClientInfo(){return this.connections.map((e=>{const{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}=e;return{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}}))}checkForClientConnection(e){if(!this.isClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider.\\n Client Identity: {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}isClientConnected(e){return ut.clientIdentityIncludesEndpointId(e)?this.connections.some((t=>t.endpointId===e.endpointId&&t.uuid===e.uuid&&t.name===e.name)):this.isLegacyClientConnected(e)}isLegacyClientConnected(e){return this.connections.some((t=>t.uuid===e.uuid&&t.name===e.name))}handleMultiRuntimeLegacyClient(e){if(!this.isLegacyClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider. Client Identity:\\n {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}getEndpointIdForOpenFinId(e,t){const n=this.connections.filter((t=>t.name===e.name&&t.uuid===e.uuid));if(n.length>=2){const n=ct(this,rt,\"f\"),{uuid:i,name:r}=e,o=n?.providerIdentity.uuid,s=n?.providerIdentity.name;console.warn(`WARNING: Dispatch call may have unintended results. The \"to\" argument of your dispatch call is missing the\\n \"endpointId\" parameter. The identity you are dispatching to ({uuid: ${i}, name: ${r}})\\n has multiple channelClients for this channel. Your dispatched action: (${t}) from the provider:\\n ({uuid: ${o}, name: ${s}}) will only be processed by the most recently-created client.`)}return n.pop()?.endpointId}static clientIdentityIncludesEndpointId(e){return void 0!==e.endpointId}static clientIsMultiRuntime(e){return void 0!==e.runtimeUuid}static async wireClose(e,t){await e.sendAction(\"destroy-channel\",{channelName:t})}}Qe.ChannelProvider=ut,it=new WeakMap,rt=new WeakMap,ot=new WeakMap,st=new WeakMap,at=new WeakMap,ut.removalMap=new WeakMap;var pt={};Object.defineProperty(pt,\"__esModule\",{value:!0}),pt.MessageReceiver=void 0;const wt=ue,yt=d;class ft extends yt.Base{constructor(e){super(e),this.onmessage=e=>\"process-channel-message\"===e.action&&(this.processChannelMessage(e),!0),this.endpointMap=new Map,this.latestEndpointIdByChannelId=new Map,e.registerMessageHandler(this.onmessage.bind(this))}async processChannelMessage(e){const{senderIdentity:t,providerIdentity:n,action:i,ackToSender:r,payload:o,intendedTargetIdentity:s}=e.payload,a=s.channelId??s.endpointId??this.latestEndpointIdByChannelId.get(n.channelId),c=this.endpointMap.get(a);if(!c)return r.payload.success=!1,r.payload.reason=`Client connection with identity uuid: ${this.wire.me.uuid} / name: ${this.wire.me.name} / endpointId: ${a} no longer connected.`,this.wire.sendRaw(r);try{const e=await c(i,o,t);return r.payload.payload=r.payload.payload||{},r.payload.payload.result=e,this.wire.sendRaw(r)}catch(e){return r.payload.success=!1,r.payload.reason=e.message,this.wire.sendRaw(r)}}addEndpoint(e,t,n){this.endpointMap.set(n,e),t!==n&&this.latestEndpointIdByChannelId.set(t,n)}removeEndpoint(e,t){this.endpointMap.delete(t),this.latestEndpointIdByChannelId.get(e)===t&&this.latestEndpointIdByChannelId.delete(e)}checkForPreviousClientConnection(e){const t=this.latestEndpointIdByChannelId.get(e);t&&(wt.ChannelClient.closeChannelByEndpointId(t),console.warn(\"You have created a second connection to an older provider. First connection has been removed from the clientMap\"),console.warn(\"If the provider calls publish(), you may receive multiple messages.\"))}}pt.MessageReceiver=ft;var gt={};Object.defineProperty(gt,\"__esModule\",{value:!0}),gt.ProtocolManager=void 0;gt.ProtocolManager=class{constructor(e){this.ProtocolsInPreferenceOrder=e,this.DefaultClientProtocols=[\"classic\"],this.DefaultProviderProtocols=[\"classic\"],this.getClientProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultClientProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(\", \")}.`);return t},this.getProviderProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultProviderProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(\", \")}.`);return t},this.getCompatibleProtocols=(e,t)=>t.supportedProtocols.filter((t=>e.some((e=>e.type===t.type&&t.version>=e.minimumVersion&&e.version>=(t.minimumVersion??0))))).slice(0,t.maxProtocols)}};var mt={};Object.defineProperty(mt,\"__esModule\",{value:!0});class vt{static combine(e,t){return new vt(e,t)}constructor(e,t){this.primary=e,this.secondary=t}onEndpointDisconnect(e,t){this.primary.onEndpointDisconnect(e,(()=>{this.secondary.isEndpointConnected(e)||t()})),this.secondary.onEndpointDisconnect(e,(()=>{this.primary.isEndpointConnected(e)||t()}))}isValidEndpointPayload(e){return this.primary.isValidEndpointPayload(e)||this.secondary.isValidEndpointPayload(e)}async closeEndpoint(e){await this.primary.closeEndpoint(e),await this.secondary.closeEndpoint(e)}isEndpointConnected(e){return this.primary.isEndpointConnected(e)||this.secondary.isEndpointConnected(e)}async addEndpoint(e,t){this.primary.isValidEndpointPayload(t)&&await this.primary.addEndpoint(e,t),this.secondary.isValidEndpointPayload(t)&&await this.secondary.addEndpoint(e,t)}receive(e){this.primary.receive(e),this.secondary.receive(e)}send(e,t,n){return this.primary.isEndpointConnected(e)?this.primary.send(e,t,n):this.secondary.send(e,t,n)}async close(){await Promise.all([this.primary.close(),this.secondary.close()])}}mt.default=vt;var Ct,bt,It=s&&s.__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},Et=s&&s.__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)},xt=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(xe,\"__esModule\",{value:!0}),xe.ConnectionManager=void 0;const At=Ae,Pt=d,Mt=Oe,_t=Fe,Ot=Je,St=Qe,Rt=pt,Ft=gt,jt=xt(mt);class kt extends Pt.Base{static getProtocolOptionsFromStrings(e){return e.map((e=>{switch(e){case\"rtc\":return _t.RTCInfo;case\"classic\":return Mt.ClassicInfo;default:return(0,At.exhaustiveCheck)(e,[\"rtc\",\"classic\"])}}))}constructor(e){super(e),Ct.set(this,void 0),bt.set(this,void 0),this.removeChannelFromProviderMap=e=>{this.providerMap.delete(e)},this.onmessage=e=>\"process-channel-connection\"===e.action&&(this.processChannelConnection(e),!0),this.providerMap=new Map,this.protocolManager=new Ft.ProtocolManager(\"node\"===this.wire.environment.type?[\"classic\"]:[\"rtc\",\"classic\"]),It(this,Ct,new Rt.MessageReceiver(e),\"f\"),It(this,bt,new Ot.RTCICEManager(e),\"f\"),e.registerMessageHandler(this.onmessage.bind(this))}createProvider(e,t){const n=Object.assign(this.wire.environment.getDefaultChannelOptions().create,e||{}),i=this.protocolManager.getProviderProtocols(n?.protocols),r=i.map((e=>{switch(e){case\"rtc\":return new _t.RTCStrategy;case\"classic\":return new Mt.ClassicStrategy(this.wire,Et(this,Ct,\"f\"),t.channelId,t);default:return(0,At.exhaustiveCheck)(e,[\"rtc\",\"classic\"])}}));let o;if(2===r.length){const[e,t]=r;o=jt.default.combine(e,t)}else{if(1!==r.length)throw new Error(\"failed to combine strategies\");[o]=r}const s=new St.ChannelProvider(t,(()=>St.ChannelProvider.wireClose(this.wire,t.channelName)),o),a=t.channelId;return this.providerMap.set(a,{provider:s,strategy:o,supportedProtocols:kt.getProtocolOptionsFromStrings(i)}),St.ChannelProvider.setProviderRemoval(s,this.removeChannelFromProviderMap.bind(this)),s}async createClientOffer(e){const t=this.protocolManager.getClientProtocols(e?.protocols);let n;return{offer:{supportedProtocols:await Promise.all(t.map((async e=>{switch(e){case\"rtc\":{const{rtcClient:e,channels:t,offer:i,rtcConnectionId:r,channelsOpened:o}=await Et(this,bt,\"f\").startClientOffer();return n={rtcClient:e,channels:t,channelsOpened:o},{type:\"rtc\",version:_t.RTCInfo.version,payload:{offer:i,rtcConnectionId:r}}}case\"classic\":return{type:\"classic\",version:Mt.ClassicInfo.version};default:return(0,At.exhaustiveCheck)(e,[\"rtc\",\"classic\"])}}))),maxProtocols:2},rtc:n}}async createClientStrategy(e,t){t.endpointId||(t.endpointId=this.wire.environment.getNextMessageId(),Et(this,Ct,\"f\").checkForPreviousClientConnection(t.channelId));const n=t.answer??{supportedProtocols:[{type:\"classic\",version:1}]},i=(await Promise.all(n.supportedProtocols.map((async n=>\"rtc\"===n.type&&e?(await Et(this,bt,\"f\").finishClientOffer(e.rtcClient,n.payload.answer,e.channelsOpened),new _t.RTCStrategy):\"classic\"===n.type?new Mt.ClassicStrategy(this.wire,Et(this,Ct,\"f\"),t.endpointId,t):null)))).filter((e=>null!==e));let r;if(e&&!i.some((e=>e instanceof _t.RTCStrategy))&&e&&e.rtcClient.close(),i.length>=2)r=jt.default.combine(i[0],i[1]);else{if(!i.length)throw new Error(\"No compatible protocols\");[r]=i}const o={endpointIdentity:t,rtc:e};return r.addEndpoint(t.channelId,o),r}async processChannelConnection(e){const{clientIdentity:t,providerIdentity:n,ackToSender:i,payload:r,offer:o}=e.payload;t.endpointId?t.isLocalEndpointId=!1:(t.endpointId=this.wire.environment.getNextMessageId(),t.isLocalEndpointId=!0);const s=n.channelId,a=this.providerMap.get(s);if(!a)return i.payload.success=!1,i.payload.reason=`Channel \"${n.channelName}\" has been destroyed.`,this.wire.sendRaw(i);const{provider:c,strategy:d,supportedProtocols:h}=a;try{if(!(c instanceof St.ChannelProvider))throw Error(\"Cannot connect to a channel client\");const e=o??{supportedProtocols:[{type:\"classic\",version:1}],maxProtocols:1},n=this.protocolManager.getCompatibleProtocols(h,e);if(!n.length)throw new Error(\"This provider does not support any of the offered protocols.\");const s=await c.processConnection(t,r);i.payload.payload=i.payload.payload||{};let a={supportedProtocols:[],endpointPayloadPromise:Promise.resolve({endpointIdentity:t})};return a=await n.reduce((async(e,t)=>{const n=await e;if(\"rtc\"===t.type){const{answer:e,rtcClient:i,channels:r}=await Et(this,bt,\"f\").createProviderAnswer(t.payload.rtcConnectionId,t.payload.offer);n.supportedProtocols.push({type:\"rtc\",version:_t.RTCInfo.version,payload:{answer:e}}),n.endpointPayloadPromise=n.endpointPayloadPromise.then((e=>r.then((t=>({...e,rtc:{rtcClient:i,channels:t}})))))}else n.supportedProtocols.push({type:\"classic\",version:Mt.ClassicInfo.version});return n}),Promise.resolve(a)),a.endpointPayloadPromise.then((e=>d.addEndpoint(t.endpointId,e))),i.payload.payload.result=s,i.payload.payload.answer=a,this.wire.sendRaw(i)}catch(e){return i.payload.success=!1,i.payload.reason=e.message,this.wire.sendRaw(i)}}}xe.ConnectionManager=kt,Ct=new WeakMap,bt=new WeakMap;var Lt,Tt,$t,Bt=s&&s.__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},Gt=s&&s.__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)};Object.defineProperty(le,\"__esModule\",{value:!0}),le.Channel=void 0;const Wt=t,Ht=G,Nt=d,Dt=ue,Ut=xe,Vt=Qe;function zt(e){const t=Math.floor(e/10),n=Math.min(3e4,500*2**t);return new Promise((e=>{setTimeout((()=>{e(!1)}),n)}))}class Kt extends Nt.EmitterBase{constructor(e){super(e,\"channel\"),Lt.set(this,void 0),Tt.set(this,new Wt.EventEmitter),$t.set(this,new Ht.AsyncRetryableLazy((async()=>{await Promise.all([this.on(\"disconnected\",(e=>{Dt.ChannelClient.handleProviderDisconnect(e)})),this.on(\"connected\",((...e)=>{Gt(this,Tt,\"f\").emit(\"connected\",...e)}))]).catch((()=>new Error(\"error setting up channel connection listeners\")))}))),Bt(this,Lt,new Ut.ConnectionManager(e),\"f\")}async getAllChannels(){return this.wire.sendAction(\"get-all-channels\").then((({payload:e})=>e.data))}async onChannelConnect(e){await this.on(\"connected\",e)}async onChannelDisconnect(e){await this.on(\"disconnected\",e)}async safeConnect(e,t,n){const i={count:0};do{let r=()=>{};const o=new Promise((t=>{r=n=>{e===n.channelName&&t(!0)},Gt(this,Tt,\"f\").on(\"connected\",r)}));try{if(i.count>0){i.gotConnectedEvent=await Promise.race([zt(i.count),o]);const t=await this.wire.sendAction(\"connect-to-channel\",{...n,retryInfo:i});return console.log(`Successfully connected to channelName: ${e}`),t.payload.data}const t=this.wire.sendAction(\"connect-to-channel\",n);i.originalMessageId=t.messageId;return(await t).payload.data}catch(n){if(!n.message.includes(\"internal-nack\"))throw n;t&&0===i.count&&console.warn(`No channel found for channelName: ${e}. Waiting for connection...`)}finally{i.count+=1,Gt(this,Tt,\"f\").removeListener(\"connected\",r)}}while(t);throw new Error(`No channel found for channelName: ${e}.`)}async connect(e,t={}){if(await Gt(this,$t,\"f\").getValue(),!e||\"string\"!=typeof e)throw new Error(\"Please provide a channelName string to connect to a channel.\");const n={wait:!0,...this.wire.environment.getDefaultChannelOptions().connect,...t},{offer:i,rtc:r}=await Gt(this,Lt,\"f\").createClientOffer(n);let o;(this.fin.me.isFrame||this.fin.me.isView||this.fin.me.isWindow)&&(o=(await this.fin.me.getInfo()).url);const s={channelName:e,...n,offer:i,connectionUrl:o},a=await this.safeConnect(e,n.wait,s),c=await Gt(this,Lt,\"f\").createClientStrategy(r,a),d=new Dt.ChannelClient(a,(()=>Dt.ChannelClient.wireClose(this.wire,a,a.endpointId)),c);return c.onEndpointDisconnect(a.channelId,(async()=>{try{await d.sendDisconnectAction()}catch(e){console.warn(`Something went wrong during disconnect for client with uuid: ${a.uuid} / name: ${a.name} / endpointId: ${a.endpointId}.`)}finally{Dt.ChannelClient.handleProviderDisconnect(a)}})),d}async create(e,t){if(!e)throw new Error(\"Please provide a channelName to create a channel\");const{payload:{data:n}}=await this.wire.sendAction(\"create-channel\",{channelName:e}),i=Gt(this,Lt,\"f\").createProvider(t,n);return this.on(\"client-disconnected\",(t=>{t.channelName===e&&Vt.ChannelProvider.handleClientDisconnection(i,t)})),i}}le.Channel=Kt,Lt=new WeakMap,Tt=new WeakMap,$t=new WeakMap,Object.defineProperty(de,\"__esModule\",{value:!0}),de.InterAppPayload=de.InterApplicationBus=void 0;const qt=t,Jt=d,Yt=he,Zt=le,Qt=O;class Xt extends Jt.Base{constructor(e){super(e),this.events={subscriberAdded:\"subscriber-added\",subscriberRemoved:\"subscriber-removed\"},this.refCounter=new Yt.RefCounter,this.Channel=new Zt.Channel(e),this.emitter=new qt.EventEmitter,e.registerMessageHandler(this.onmessage.bind(this)),this.on=this.emitter.on.bind(this.emitter),this.removeAllListeners=this.emitter.removeAllListeners.bind(this.emitter)}async publish(e,t){await this.wire.sendAction(\"publish-message\",{topic:e,message:t,sourceWindowName:this.me.name})}async send(e,t,n){const i=(0,Qt.validateIdentity)(e);if(i)throw new Error(i);await this.wire.sendAction(\"send-message\",{destinationUuid:e.uuid,destinationWindowName:e.name,topic:t,message:n,sourceWindowName:this.me.name})}subscribe(e,t,n){const i=this.createSubscriptionKey(e.uuid,e.name||\"*\",t);return this.emitter.on(i,n),this.refCounter.actOnFirst(i,(async()=>{await this.wire.sendAction(\"subscribe\",{sourceUuid:e.uuid,sourceWindowName:e.name||\"*\",topic:t,destinationWindowName:this.me.name})}),(()=>Promise.resolve()))}unsubscribe(e,t,n){const i=e.name||\"*\",r=this.createSubscriptionKey(e.uuid,i,t);return this.emitter.removeListener(r,n),this.refCounter.actOnLast(r,(async()=>{await this.wire.sendAction(\"unsubscribe\",{sourceUuid:e.uuid,sourceWindowName:i,topic:t,destinationWindowName:this.me.name})}),(()=>new Promise((e=>e)).then((()=>{}))))}processMessage(e){const{payload:{message:t,sourceWindowName:n,sourceUuid:i,topic:r}}=e,o=[this.createSubscriptionKey(i,n,r),this.createSubscriptionKey(i,\"*\",r),this.createSubscriptionKey(\"*\",\"*\",r)],s={uuid:i,name:n};o.forEach((e=>{this.emitter.emit(e,t,s)}))}emitSubscriverEvent(e,t){const{payload:{targetName:n,uuid:i,topic:r}}=t,o={name:n,uuid:i,topic:r};this.emitter.emit(e,o)}createSubscriptionKey(e,t,n){const i=t||\"*\";if(!(e&&i&&n))throw new Error(\"Missing uuid, name, or topic string\");return function(...e){return e.map((e=>Buffer.from(`${e}`).toString(\"base64\"))).join(\"/\")}(e,i,n)}onmessage(e){const{action:t}=e;switch(t){case\"process-message\":this.processMessage(e);break;case this.events.subscriberAdded:this.emitSubscriverEvent(this.events.subscriberAdded,e);break;case this.events.subscriberRemoved:this.emitSubscriverEvent(this.events.subscriberRemoved,e)}return!0}}de.InterApplicationBus=Xt;de.InterAppPayload=class{};var en={};Object.defineProperty(en,\"__esModule\",{value:!0}),en.Clipboard=void 0;const tn=d;class nn extends tn.Base{async writeText(e){await this.wire.sendAction(\"clipboard-write-text\",e)}async readText(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-text\",{type:e});return t.data}async writeImage(e){await this.wire.sendAction(\"clipboard-write-image\",e)}async readImage(e={format:\"dataURL\"}){const{payload:t}=await this.wire.sendAction(\"clipboard-read-image\",e);return t.data}async writeHtml(e){await this.wire.sendAction(\"clipboard-write-html\",e)}async readHtml(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-html\",{type:e});return t.data}async writeRtf(e){await this.wire.sendAction(\"clipboard-write-rtf\",e)}async readRtf(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-rtf\",{type:e});return t.data}async write(e){await this.wire.sendAction(\"clipboard-write\",e)}async getAvailableFormats(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-formats\",{type:e});return t.data}}en.Clipboard=nn;var rn={},on={},sn={};Object.defineProperty(sn,\"__esModule\",{value:!0}),sn.ExternalApplication=void 0;const an=d;class cn extends an.EmitterBase{constructor(e,t){super(e,\"external-application\",t.uuid),this.identity=t}getInfo(){return this.wire.sendAction(\"get-external-application-info\",this.identity).then((({payload:e})=>e.data))}}sn.ExternalApplication=cn,Object.defineProperty(on,\"__esModule\",{value:!0}),on.ExternalApplicationModule=void 0;const dn=d,hn=sn;class ln extends dn.Base{wrap(e){return this.wire.sendAction(\"external-application-wrap\").catch((e=>{})),Promise.resolve(new hn.ExternalApplication(this.wire,{uuid:e}))}wrapSync(e){return this.wire.sendAction(\"external-application-wrap-sync\").catch((e=>{})),new hn.ExternalApplication(this.wire,{uuid:e})}}on.ExternalApplicationModule=ln,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(on,e),n(sn,e)}(rn);var un={},pn={},wn={};Object.defineProperty(wn,\"__esModule\",{value:!0}),wn._Frame=void 0;const yn=d;class fn extends yn.EmitterBase{constructor(e,t){super(e,\"frame\",t.uuid,t.name),this.identity=t}getInfo(){return this.wire.sendAction(\"get-frame-info\",this.identity).then((({payload:e})=>e.data))}getParentWindow(){return this.wire.sendAction(\"get-parent-window\",this.identity).then((({payload:e})=>e.data))}}wn._Frame=fn,Object.defineProperty(pn,\"__esModule\",{value:!0}),pn._FrameModule=void 0;const gn=d,mn=O,vn=wn;class Cn extends gn.Base{async wrap(e){this.wire.sendAction(\"frame-wrap\").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}wrapSync(e){this.wire.sendAction(\"frame-wrap-sync\").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}getCurrent(){return this.wire.sendAction(\"frame-get-current\").catch((e=>{})),Promise.resolve(new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity()))}getCurrentSync(){return this.wire.sendAction(\"frame-get-current-sync\").catch((e=>{})),new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity())}}pn._FrameModule=Cn,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(pn,e),n(wn,e)}(un);var bn={};Object.defineProperty(bn,\"__esModule\",{value:!0}),bn.GlobalHotkey=void 0;const In=d;class En extends In.EmitterBase{constructor(e){super(e,\"global-hotkey\")}async register(e,t){await this.on(e,t),await this.wire.sendAction(\"global-hotkey-register\",{hotkey:e})}async unregister(e){await this.removeAllListeners(e),await this.wire.sendAction(\"global-hotkey-unregister\",{hotkey:e})}async unregisterAll(){await Promise.all(this.eventNames().filter((e=>!(\"registered\"===e||\"unregistered\"===e))).map((e=>this.removeAllListeners(e)))),await this.wire.sendAction(\"global-hotkey-unregister-all\",{})}async isRegistered(e){const{payload:{data:t}}=await this.wire.sendAction(\"global-hotkey-is-registered\",{hotkey:e});return t}}bn.GlobalHotkey=En;var xn,An={},Pn={},Mn={},_n=s&&s.__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)};Object.defineProperty(Mn,\"__esModule\",{value:!0}),Mn.Platform=void 0;const On=d,Sn=O,Rn=new Map;class Fn extends On.EmitterBase{constructor(e,t){super(t.wire,\"application\",e.uuid),this.getClient=e=>{this.wire.sendAction(\"platform-get-client\",this.identity).catch((e=>{}));const t=e||this.identity,{uuid:n}=t;if(!Rn.has(n)){const e=_n(this,xn,\"f\").call(this,n);Rn.set(n,e)}return Rn.get(n)},xn.set(this,(async e=>{try{const t=`custom-frame-${e}`,n=await this._channel.connect(t,{wait:!1});return n.onDisconnection((()=>{Rn.delete(e)})),n}catch(t){throw Rn.delete(e),new Error(\"The targeted Platform is not currently running. Listen for application-started event for the given Uuid.\")}})),this.launchLegacyManifest=this.launchContentManifest;const n=(0,Sn.validateIdentity)(e);if(n)throw new Error(n);this._channel=t,this.identity={uuid:e.uuid},this.Layout=this.fin.Platform.Layout,this.Application=this.fin.Application.wrapSync(this.identity)}async createView(e,t,n){this.wire.sendAction(\"platform-create-view\",this.identity).catch((e=>{}));const i=await this.getClient(),r=await i.dispatch(\"create-view\",{target:t,opts:e,targetView:n});if(!r||(0,Sn.validateIdentity)(r.identity))throw new Error(`When overwriting the createView call, please return an object that has a valid 'identity' property: ${JSON.stringify(r)}`);return this.fin.View.wrapSync(r.identity)}async createWindow(e){this.wire.sendAction(\"platform-create-window\",this.identity).catch((e=>{}));const t=await this.getClient();e.reason||(e.reason=\"api-call\");const n=await t.dispatch(\"create-view-container\",e);if(!n||(0,Sn.validateIdentity)(n.identity))throw new Error(`When overwriting the createWindow call, please return an object that has a valid 'identity' property: ${JSON.stringify(n)}`);const{identity:i}=n,r=this.fin.Window.wrapSync(i);return r.name=i.name,r.uuid=i.uuid,r}async quit(){this.wire.sendAction(\"platform-quit\",this.identity).catch((e=>{}));return(await this.getClient()).dispatch(\"quit\")}async closeView(e){this.wire.sendAction(\"platform-close-view\",this.identity).catch((e=>{}));const t=await this.getClient();await t.dispatch(\"close-view\",{view:e})}async reparentView(e,t){console.warn(\"Platform.reparentView has been deprecated, please use Platform.createView\"),this.wire.sendAction(\"platform-reparent-view\",this.identity).catch((e=>{}));const n={...e,uuid:e.uuid??this.identity.uuid},i=await this.fin.View.wrap(n),r=await i.getOptions();return this.createView(r,t)}async getSnapshot(){this.wire.sendAction(\"platform-get-snapshot\",this.identity).catch((e=>{}));return(await this.getClient()).dispatch(\"get-snapshot\")}async getViewSnapshot(e){return(await this.getClient()).dispatch(\"get-view-snapshot\",{viewIdentity:e})}async applySnapshot(e,t){this.wire.sendAction(\"platform-apply-snapshot\",this.identity).catch((e=>{}));const n=\"Requested snapshot must be a valid Snapshot object, or a url or filepath to such an object.\";let i;if(\"string\"==typeof e)try{i=(await this._channel.wire.sendAction(\"get-application-manifest\",{manifestUrl:e})).payload.data}catch(e){throw new Error(`${n}: ${e}`)}else i=e;if(!i.windows)throw new Error(n);const r=await this.getClient();return await r.dispatch(\"apply-snapshot\",{snapshot:i,options:t}),this}async fetchManifest(e){return(await this.getClient()).dispatch(\"platform-fetch-manifest\",{manifestUrl:e})}async launchContentManifest(e){this.wire.sendAction(\"platform-launch-content-manifest\",this.identity).catch((()=>{}));const t=await this.getClient(),n=await this.fetchManifest(e);return t.dispatch(\"launch-into-platform\",{manifest:n,manifestUrl:e}),this}async setWindowContext(e={},t){if(this.wire.sendAction(\"platform-set-window-context\",this.identity).catch((e=>{})),!e)throw new Error(\"Please provide a serializable object or string to set the context.\");const n=await this.getClient(),{entityType:i}=t?await this.fin.System.getEntityInfo(t.uuid,t.name):this.fin.me;await n.dispatch(\"set-window-context\",{context:e,entityType:i,target:t||{uuid:this.fin.me.uuid,name:this.fin.me.name}})}async getWindowContext(e){this.wire.sendAction(\"platform-get-window-context\",this.identity).catch((e=>{}));const t=await this.getClient(),{entityType:n}=e?await this.fin.System.getEntityInfo(e.uuid,e.name):this.fin.me;return t.dispatch(\"get-window-context\",{target:e||{uuid:this.fin.me.uuid,name:this.fin.me.name},entityType:n})}async closeWindow(e,t={skipBeforeUnload:!1}){this.wire.sendAction(\"platform-close-window\",this.identity).catch((e=>{}));return(await this.getClient()).dispatch(\"close-window\",{windowId:e,options:t})}}Mn.Platform=Fn,xn=new WeakMap;var jn={},kn={},Ln={},Tn={};function $n(e){switch(e){case\"columns\":case\"grid\":case\"rows\":case\"tabs\":return!0;default:return!1}}Object.defineProperty(Tn,\"__esModule\",{value:!0}),Tn.overrideFromComposables=Tn.isValidPresetType=void 0,Tn.isValidPresetType=$n,Tn.overrideFromComposables=function(...e){return t=>e.reduceRight(((e,t)=>n=>t(e(n))),(e=>e))(t)},Tn.default={isValidPresetType:$n};var Bn={},Gn={},Wn={};Object.defineProperty(Wn,\"__esModule\",{value:!0}),Wn.ApiConsumer=void 0;Wn.ApiConsumer=class{constructor(e){this.strategy=e,this.consume=async e=>(await this.strategy.getExposedFunctions(e)).reduce(((t,n)=>({...t,[n.key]:this.strategy.createFunction(n,e)})),{})}};var Hn={},Nn={};Object.defineProperty(Nn,\"__esModule\",{value:!0}),Nn.expose=Nn.getExposedProperties=void 0;const Dn=Symbol(\"exposedProperties\");Nn.getExposedProperties=e=>e[Dn]||e.prototype[Dn]||[];Nn.expose=e=>(t,n,i)=>{t[Dn]=t[Dn]||[],t[Dn].push({key:n,descriptor:i,options:e})},Object.defineProperty(Hn,\"__esModule\",{value:!0}),Hn.ApiExposer=void 0;const Un=Nn;Hn.ApiExposer=class{constructor(e){this.strategy=e,this.exposeInstance=async(e,t)=>{const n=(0,Un.getExposedProperties)(e),i=await Promise.all(n.map((async({key:n,options:i})=>({key:n,options:await this.strategy.exposeFunction(e[n].bind(e),{key:n,options:i,meta:t})}))));await this.strategy.exposeMeta(t,i)}}};var Vn={},zn={},Kn={};Object.defineProperty(Kn,\"__esModule\",{value:!0}),Kn.ChannelsConsumer=void 0;Kn.ChannelsConsumer=class{constructor(e){this.channel=e,this.getExposedFunctions=async e=>{const{id:t}=e,{props:n}=await this.channel.dispatch(`api-meta:${t}`);return n},this.createFunction=e=>(...t)=>{const{action:n}=e.options;return this.channel.dispatch(n,{args:t})}}};var qn={};Object.defineProperty(qn,\"__esModule\",{value:!0}),qn.ChannelsExposer=void 0;qn.ChannelsExposer=class{constructor(e){this.channelProviderOrClient=e,this.exposeFunction=async(e,t)=>{const{key:n,options:i,meta:r}=t,{id:o}=r,s=`${o}.${i?.action||n}`;return await this.channelProviderOrClient.register(s,(async({args:t})=>e(...t))),{action:s}},this.exposeMeta=async({id:e},t)=>{const n=`api-meta:${e}`;await this.channelProviderOrClient.register(n,(()=>({props:t})))}}},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Kn,e),n(qn,e)}(zn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(zn,e)}(Vn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Wn,e),n(Hn,e),n(Vn,e),n(Nn,e)}(Gn);var Jn={};Object.defineProperty(Jn,\"__esModule\",{value:!0}),Jn.createRelayedDispatch=exports.relayChannelClientApi_1=Jn.relayChannelClientApi=void 0;const Yn=[\"no longer connected\",\"RTCDataChannel closed unexpectedly\",\"The client you are trying to dispatch from is disconnected from the target provider\"];exports.relayChannelClientApi_1=Jn.relayChannelClientApi=async(e,t)=>{e.register(`relay:${t}`,(({action:t,target:n,payload:i})=>e.dispatch(n,t,i))),await Promise.resolve()};Jn.createRelayedDispatch=(e,t,n,i)=>async(r,o)=>{try{return await e.dispatch(`relay:${n}`,{action:r,payload:o,target:t})}catch(e){if(s=e.message,Yn.some((e=>s.includes(e)))&&i)throw new Error(i);throw e}var s};var Zn,Qn,Xn,ei=s&&s.__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},ti=s&&s.__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)};Object.defineProperty(Bn,\"__esModule\",{value:!0}),Bn.ColumnOrRow=Bn.TabStack=Bn.LayoutNode=void 0;const ni=Gn,ii=Jn;class ri{constructor(e,t){Zn.set(this,void 0),this.isRoot=()=>ti(this,Zn,\"f\").isRoot(this.entityId),this.exists=()=>ti(this,Zn,\"f\").exists(this.entityId),this.getParent=async()=>{const e=await ti(this,Zn,\"f\").getParent(this.entityId);if(e)return ri.getEntity(e,ti(this,Zn,\"f\"))},this.createAdjacentStack=async(e,t)=>{const n=await ti(this,Zn,\"f\").createAdjacentStack(this.entityId,e,t);return ri.getEntity({entityId:n,type:\"stack\"},ti(this,Zn,\"f\"))},this.getAdjacentStacks=async e=>(await ti(this,Zn,\"f\").getAdjacentStacks({targetId:this.entityId,edge:e})).map((e=>ri.getEntity({type:\"stack\",entityId:e.entityId},ti(this,Zn,\"f\")))),ei(this,Zn,e,\"f\"),this.entityId=t}}Bn.LayoutNode=ri,Zn=new WeakMap,ri.newLayoutEntitiesClient=async(e,t,n)=>{const i=(0,ii.createRelayedDispatch)(e,n,\"layout-relay\",\"You are trying to interact with a layout component on a window that does not exist or has been destroyed.\");return new ni.ApiConsumer(new ni.ChannelsConsumer({dispatch:i})).consume({id:t})},ri.getEntity=(e,t)=>{const{entityId:n,type:i}=e;switch(i){case\"column\":case\"row\":return new si(t,n,i);case\"stack\":return new oi(t,n);default:throw new Error(`Unrecognised Layout Entity encountered ('${JSON.stringify(e)})`)}};class oi extends ri{constructor(e,t){super(e,t),Qn.set(this,void 0),this.type=\"stack\",this.getViews=()=>ti(this,Qn,\"f\").getStackViews(this.entityId),this.addView=async(e,t={index:0})=>ti(this,Qn,\"f\").addViewToStack(this.entityId,e,t),this.removeView=async e=>{await ti(this,Qn,\"f\").removeViewFromStack(this.entityId,e)},this.setActiveView=async e=>{await ti(this,Qn,\"f\").setStackActiveView(this.entityId,e)},ei(this,Qn,e,\"f\")}}Bn.TabStack=oi,Qn=new WeakMap;class si extends ri{constructor(e,t,n){super(e,t),Xn.set(this,void 0),this.getContent=async()=>(await ti(this,Xn,\"f\").getContent(this.entityId)).map((e=>ri.getEntity(e,ti(this,Xn,\"f\")))),ei(this,Xn,e,\"f\"),this.type=n}}Bn.ColumnOrRow=si,Xn=new WeakMap;var ai={};Object.defineProperty(ai,\"__esModule\",{value:!0}),ai.DEFAULT_LAYOUT_KEY=ai.LAYOUT_CONTROLLER_ID=void 0,ai.LAYOUT_CONTROLLER_ID=\"layout-entities\",ai.DEFAULT_LAYOUT_KEY=\"__default__\";var ci,di,hi,li=s&&s.__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)};Object.defineProperty(Ln,\"__esModule\",{value:!0}),Ln.Layout=void 0;const ui=G,pi=O,wi=d,yi=Tn,fi=Bn,gi=ai;class mi extends wi.Base{static getClient(e){return li(e,di,\"f\").getValue()}constructor(e,t){super(t),ci.add(this),di.set(this,new ui.Lazy((async()=>fi.LayoutNode.newLayoutEntitiesClient(await this.platform.getClient(),gi.LAYOUT_CONTROLLER_ID,this.identity)))),this.replace=async e=>{this.wire.sendAction(\"layout-replace\").catch((e=>{}));const t=await this.platform.getClient();await t.dispatch(\"replace-layout\",{target:this.identity,opts:{layout:e}})},this.replaceView=async(e,t)=>{this.wire.sendAction(\"layout-replace-view\").catch((e=>{}));const n=await this.platform.getClient();await n.dispatch(\"replace-view\",{target:this.identity,opts:{viewToReplace:e,newView:t}})},this.applyPreset=async e=>{this.wire.sendAction(\"layout-apply-preset\").catch((e=>{}));const t=await this.platform.getClient(),{presetType:n}=e;if(!n||!(0,yi.isValidPresetType)(n))throw new Error(\"Cannot apply preset layout, please include an applicable presetType property in the PresetLayoutOptions.\");await t.dispatch(\"apply-preset-layout\",{target:this.identity,opts:{presetType:n}})};const n=(0,pi.validateIdentity)(e);if(n)throw new Error(n);this.identity=e,this.platform=this.fin.Platform.wrapSync({uuid:e.uuid}),e.uuid===this.fin.me.uuid&&e.name===this.fin.me.name&&(this.init=this.fin.Platform.Layout.init)}async getConfig(){this.wire.sendAction(\"layout-get-config\").catch((e=>{}));return(await this.platform.getClient()).dispatch(\"get-frame-snapshot\",{target:this.identity})}async getCurrentViews(){this.wire.sendAction(\"layout-get-views\").catch((e=>{}));const e=await this.platform.getClient();return(await e.dispatch(\"get-layout-views\",{target:this.identity})).map((e=>this.fin.View.wrapSync(e)))}async getRootItem(){this.wire.sendAction(\"layout-get-root-item\").catch((()=>{}));const e=await li(this,di,\"f\").getValue(),t=await e.getRoot(\"layoutName\"in this.identity?this.identity:void 0);return fi.LayoutNode.getEntity(t,e)}async getStackByViewIdentity(e){this.wire.sendAction(\"layout-get-stack-by-view\").catch((()=>{}));const t=await li(this,di,\"f\").getValue(),n=await t.getStackByView(e);if(!n)throw new Error(`No stack found for view: ${e.uuid}/${e.name}`);return fi.LayoutNode.getEntity(n,t)}async addView(e,{location:t,targetView:n}={}){this.wire.sendAction(\"layout-add-view\").catch((e=>{}));const{identity:i}=await li(this,ci,\"m\",hi).call(this,\"layout-add-view\",{viewOptions:e,location:t,targetView:n});return{identity:i}}async closeView(e){this.wire.sendAction(\"layout-close-view\").catch((e=>{})),await li(this,ci,\"m\",hi).call(this,\"layout-close-view\",{viewIdentity:e})}}Ln.Layout=mi,di=new WeakMap,ci=new WeakSet,hi=async function(e,t){return(await this.platform.getClient()).dispatch(e,{target:this.identity,opts:t})};var vi,Ci,bi,Ii,Ei,xi=s&&s.__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)},Ai=s&&s.__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};Object.defineProperty(kn,\"__esModule\",{value:!0}),kn.LayoutModule=void 0;const Pi=d,Mi=Ln,_i=ai;class Oi extends Pi.Base{constructor(){super(...arguments),vi.add(this),Ci.set(this,!1),bi.set(this,null),this.init=async(e={})=>{if(this.wire.sendAction(\"layout-init\").catch((e=>{})),!this.wire.environment.layoutAllowedInContext(this.fin))throw new Error(\"Layout.init can only be called from a Window context.\");if(xi(this,Ci,\"f\"))throw new Error(\"Layout.init was already called, please use Layout.create to add additional layouts.\");\"openfin\"===this.wire.environment.type&&await this.fin.Platform.getCurrentSync().getClient(),Ai(this,Ci,!0,\"f\"),Ai(this,bi,await this.wire.environment.initLayoutManager(this.fin,this.wire,e),\"f\"),await this.wire.environment.applyLayoutSnapshot(this.fin,xi(this,bi,\"f\"),e);const t={name:this.fin.me.name,uuid:this.fin.me.uuid};if(!e.layoutManagerOverride){const e={layoutName:_i.DEFAULT_LAYOUT_KEY,...t};return xi(this,Ii,\"f\").call(this,e)}return this.wrapSync(t)},Ii.set(this,(e=>{const t=\"[Layout] You are using a deprecated property `layoutManager` - it will throw if you access it starting in v37.\",n=new Proxy({},{get(e,n){throw console.warn(`[Layout-mgr-proxy] accessing ${n.toString()}`),new Error(t)}}),i=Object.assign(this.wrapSync(e),{layoutManager:n});return new Proxy(i,{get(e,n){if(\"layoutManager\"===n)throw console.warn(`[Layout-proxy] accessing ${n.toString()}`),new Error(t);return e[n]}})})),this.getCurrentLayoutManagerSync=()=>xi(this,vi,\"m\",Ei).call(this,\"fin.Platform.Layout.getCurrentLayoutManagerSync()\"),this.create=async e=>this.wire.environment.createLayout(xi(this,vi,\"m\",Ei).call(this,\"fin.Platform.Layout.create()\"),e),this.destroy=async e=>this.wire.environment.destroyLayout(xi(this,vi,\"m\",Ei).call(this,\"fin.Platform.Layout.destroy()\"),e)}async wrap(e){return this.wire.sendAction(\"layout-wrap\").catch((e=>{})),new Mi.Layout(e,this.wire)}wrapSync(e){return this.wire.sendAction(\"layout-wrap-sync\").catch((e=>{})),new Mi.Layout(e,this.wire)}async getCurrent(){if(this.wire.sendAction(\"layout-get-current\").catch((e=>{})),\"openfin\"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error(\"You are not in a Window context. Only Windows can have a Layout.\");const{uuid:e,name:t}=this.fin.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction(\"layout-get-current-sync\").catch((e=>{})),\"openfin\"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error(\"You are not in a Window context. Only Windows can have a Layout.\");const{uuid:e,name:t}=this.fin.me;return this.wrapSync({uuid:e,name:t})}async getLayoutByViewIdentity(e){this.wire.sendAction(\"layout-get-by-view-identity\").catch((()=>{}));let t=await this.wire.environment.getViewWindowIdentity(this.fin,e);t.identity&&(t=t.identity);try{const n=this.wrapSync(t),i=await Mi.Layout.getClient(n),r=await i.getLayoutIdentityForViewOrThrow(e);return this.wrapSync(r)}catch(n){if(![\"No action registered at target for\",\"getLayoutIdentityForViewOrThrow is not a function\"].some((e=>n.message.includes(e))))throw n;if(t.uuid===t.name)throw new Error(`View identity ${JSON.stringify(e)} is not attached to any layout in provider window ${JSON.stringify(t)}.`);return this.wrapSync(t)}}}kn.LayoutModule=Oi,Ci=new WeakMap,bi=new WeakMap,Ii=new WeakMap,vi=new WeakSet,Ei=function(e){if(!xi(this,bi,\"f\"))throw new Error(`You must call init before using the API ${e}`);return xi(this,bi,\"f\")},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(kn,e),n(Ln,e)}(jn),Object.defineProperty(Pn,\"__esModule\",{value:!0}),Pn.PlatformModule=void 0;const Si=d,Ri=Mn,Fi=jn;class ji extends Si.Base{constructor(e,t){super(e),this._channel=t,this.Layout=new Fi.LayoutModule(this.wire)}async init(e){if(!fin.__internal_.isPlatform||fin.me.name!==fin.me.uuid)throw new Error(\"fin.Platform.init should only be called from a custom platform provider running in the main window of the application.\");return this.wire.environment.initPlatform(this.fin,e)}async wrap(e){return this.wire.sendAction(\"platform-wrap\").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}wrapSync(e){return this.wire.sendAction(\"platform-wrap-sync\").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}async getCurrent(){return this.wire.sendAction(\"platform-get-current\").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction(\"platform-get-current-sync\").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}start(e){return this.wire.sendAction(\"platform-start\").catch((e=>{})),new Promise((async(t,n)=>{try{const{uuid:n}=e,i=await this.fin.Application._create({...e,isPlatformController:!0});i.once(\"platform-api-ready\",(()=>t(this.wrapSync({uuid:n})))),i._run({uuid:n})}catch(e){n(e)}}))}startFromManifest(e,t){return this.wire.sendAction(\"platform-start-from-manifest\").catch((e=>{})),new Promise((async(n,i)=>{try{const i=await this.fin.Application._createFromManifest(e);i.once(\"platform-api-ready\",(()=>n(this.wrapSync({uuid:i.identity.uuid})))),i._run(t)}catch(e){i(e)}}))}}Pn.PlatformModule=ji,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Pn,e),n(Mn,e)}(An);var ki={};!function(e){Object.defineProperty(e,\"__esModule\",{value:!0}),e.getMe=e.getBaseMe=e.environmentUnsupportedMessage=void 0;const t=J(),n=un,i=ie(),r=rn;function o(e,t,n){return{...{isView:\"view\"===e,isWindow:\"window\"===e,isFrame:\"iframe\"===e,isExternal:\"external connection\"===e},uuid:t,name:n,entityType:e}}e.environmentUnsupportedMessage=\"You are not running in OpenFin.\",e.getBaseMe=o,e.getMe=function(s){const{uuid:a,name:c,entityType:d}=s.me,h={setContext(){throw new Error(e.environmentUnsupportedMessage)},addContextHandler(){throw new Error(e.environmentUnsupportedMessage)},getContextGroups(){throw new Error(e.environmentUnsupportedMessage)},joinContextGroup(){throw new Error(e.environmentUnsupportedMessage)},removeFromContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getAllClientsInContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getInfoForContextGroup(){throw new Error(e.environmentUnsupportedMessage)}},l=\"Interop API has not been instantiated. Either connection has failed or you have not declared interop in your config.\",u={setContext(){throw new Error(l)},addContextHandler(){throw new Error(l)},getContextGroups(){throw new Error(l)},joinContextGroup(){throw new Error(l)},removeFromContextGroup(){throw new Error(l)},getAllClientsInContextGroup(){throw new Error(l)},getInfoForContextGroup(){throw new Error(l)}},p={eventNames:()=>{throw new Error(e.environmentUnsupportedMessage)},emit:()=>{throw new Error(e.environmentUnsupportedMessage)},listeners:()=>{throw new Error(e.environmentUnsupportedMessage)},listenerCount:()=>{throw new Error(e.environmentUnsupportedMessage)},on:()=>{throw new Error(e.environmentUnsupportedMessage)},addListener:()=>{throw new Error(e.environmentUnsupportedMessage)},once:()=>{throw new Error(e.environmentUnsupportedMessage)},prependListener:()=>{throw new Error(e.environmentUnsupportedMessage)},prependOnceListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeAllListeners:()=>{throw new Error(e.environmentUnsupportedMessage)}};switch(d){case\"view\":return Object.assign(new t.View(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case\"window\":return Object.assign(new i._Window(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case\"iframe\":return Object.assign(new n._Frame(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case\"external connection\":return Object.assign(new r.ExternalApplication(s,{uuid:a}),o(d,a,c),{interop:u,isOpenFin:!1});default:return{...o(d,a,c),...p,interop:h,isOpenFin:!1}}}}(ki);var Li={},Ti={},$i={};Object.defineProperty($i,\"__esModule\",{value:!0}),$i.createWarningObject=$i.createUnusableObject=void 0,$i.createUnusableObject=function(e){const t=()=>{throw new Error(e)};return new Proxy({},{apply:t,construct:t,defineProperty:t,deleteProperty:t,get:t,getOwnPropertyDescriptor:t,getPrototypeOf:t,has:t,isExtensible:t,ownKeys:t,preventExtensions:t,set:t,setPrototypeOf:t})},$i.createWarningObject=function(e,t){return new Proxy(t,{get:(...t)=>(console.warn(e),Reflect.get(...t)),set:(...t)=>(console.warn(e),Reflect.set(...t)),getOwnPropertyDescriptor:(...t)=>(console.warn(e),Reflect.getOwnPropertyDescriptor(...t)),ownKeys:(...t)=>(console.warn(e),Reflect.ownKeys(...t))})};var Bi,Gi={},Wi={};var Hi={};!function(e){Object.defineProperty(e,\"__esModule\",{value:!0}),e.wrapIntentHandler=e.BROKER_ERRORS=e.generateOverrideWarning=e.generateOverrideError=e.wrapContextHandler=e.wrapInTryCatch=e.generateId=void 0;e.generateId=()=>`${Math.random()}${Date.now()}`;e.wrapInTryCatch=(e,t)=>(...n)=>{try{return e(...n)}catch(e){throw new Error((t||\"\")+e)}};e.wrapContextHandler=(e,t)=>async n=>{try{await e(n)}catch(e){throw console.error(`Error thrown by handler ${t} for context type ${n.type}: ${e}`),e}};e.generateOverrideError=(e,t)=>`You have tried to to use ${e} but ${t} has not been overridden in the Interop Broker. Please override this function. Refer to our documentation for more info.`;e.generateOverrideWarning=(e,t,n,i)=>{const{uuid:r,name:o}=n;return i?`Entity with identity: ${r}/${o} has called ${i} or ${e} but ${t} has not been overridden.`:`Entity with identity: ${r}/${o} has called ${e} but ${t} has not been overridden.`},e.BROKER_ERRORS={fireIntent:(0,e.generateOverrideError)(\"fireIntent\",\"handleFiredIntent\"),fireIntentForContext:(0,e.generateOverrideError)(\"fireIntentForContext\",\"handleFiredIntentForContext\"),getInfoForIntent:(0,e.generateOverrideError)(\"getInfoForIntent\",\"handleInfoForIntent\"),getInfoForIntentsByContext:(0,e.generateOverrideError)(\"getInfoForIntentsByContext\",\"handleInfoForIntentsByContext\"),joinSessionContextGroupWithJoinContextGroup:\"The Context Group you have tried to join is a Session Context Group. Custom Context Groups can only be defined by the Interop Broker through code or manifest configuration. Please use joinSessionContextGroup.\",fdc3Open:(0,e.generateOverrideError)(\"fdc3.open\",\"fdc3HandleOpen\"),fdc3FindInstances:(0,e.generateOverrideError)(\"fdc3.findInstances\",\"fdc3HandleFindInstances\"),fdc3GetAppMetadata:(0,e.generateOverrideError)(\"fdc3.getAppMetadata\",\"fdc3HandleGetAppMetadata\"),fdc3GetInfo:(0,e.generateOverrideError)(\"fdc3.getInfo\",\"fdc3HandleGetInfo\")};e.wrapIntentHandler=(e,t)=>async n=>{try{return e(n)}catch(e){throw console.error(`Error thrown by handler ${t}: ${e}`),e}}}(Hi);var Ni,Di,Ui={};function Vi(){if(Di)return Gi;Di=1;var e,t,n,r=s&&s.__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},o=s&&s.__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)},a=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Gi,\"__esModule\",{value:!0}),Gi.InteropBroker=void 0;const c=d,h=a(function(){if(Bi)return Wi;Bi=1,Object.defineProperty(Wi,\"__esModule\",{value:!0});const e=Cr();return Wi.default=class{constructor(e,t){this.provider=e,this.id=t,this.lastContext=void 0,this.contextGroupMap=new Map,this.clients=new Map,this.registerListeners()}registerListeners(){this.provider.register(`sessionContextGroup:getContext-${this.id}`,this.getCurrentContext.bind(this)),this.provider.register(`sessionContextGroup:setContext-${this.id}`,this.setContext.bind(this)),this.provider.register(`sessionContextGroup:handlerAdded-${this.id}`,this.handlerAdded.bind(this)),this.provider.register(`sessionContextGroup:handlerRemoved-${this.id}`,this.handlerRemoved.bind(this))}getCurrentContext(e){return e.type?this.contextGroupMap.get(e.type):this.lastContext}setContext(t,n){const{context:i}=t,r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name} not in Session Client State Map`);this.contextGroupMap.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{e.contextHandlers.get(i.type)?.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getClientState(e){return this.clients.get(e.endpointId)}async handlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(i){const e=r.contextHandlers.get(i)||[];r.contextHandlers.set(i,[...e,n]);const o=this.contextGroupMap.get(i);o&&await this.provider.dispatch(t,n,o)}else{r.globalHandler=n;const e=[...this.contextGroupMap.keys()].map((async e=>{const i=this.contextGroupMap.get(e);i&&await this.provider.dispatch(t,n,i)}));await Promise.all(e)}}handlerRemoved(e,t){const{handlerId:n}=e,i=this.clients.get(t.endpointId);i?(Array.from(i.contextHandlers).forEach((([,e])=>{const t=e.indexOf(n);t>-1&&e.splice(t,1)})),i.globalHandler===n&&(i.globalHandler=void 0)):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={contextHandlers:new Map,clientIdentity:e,globalHandler:void 0};this.clients.set(e.endpointId,t)}}onDisconnection(e){this.clients.delete(e.endpointId)}},Wi}()),l=Hi,u=a(i),p=function(){if(Ni)return Ui;Ni=1,Object.defineProperty(Ui,\"__esModule\",{value:!0}),Ui.PrivateChannelProvider=void 0;const e=Vi();return Ui.PrivateChannelProvider=class t{constructor(e,t){this.provider=e,this.id=t,this.clients=new Map,this.registerListeners(),this.contextByContextType=new Map,this.lastContext=void 0,this.provider.onConnection((e=>this.registerNewClient(e))),this.provider.onDisconnection((async e=>{const{endpointId:t}=e;this.clients.has(t)&&await this.handleClientDisconnecting(e),0===(await this.provider.getAllClientInfo()).length&&this.provider.destroy()}))}getClientState(e){return this.clients.get(e.endpointId)}registerListeners(){this.provider.register(\"broadcast\",this.broadcast.bind(this)),this.provider.register(\"getCurrentContext\",this.getCurrentContext.bind(this)),this.provider.register(\"contextHandlerAdded\",this.contextHandlerAdded.bind(this)),this.provider.register(\"contextHandlerRemoved\",this.contextHandlerRemoved.bind(this)),this.provider.register(\"nonStandardHandlerRemoved\",this.nonStandardHandlerRemoved.bind(this)),this.provider.register(\"onAddContextHandlerAdded\",this.onAddContextHandlerAdded.bind(this)),this.provider.register(\"onDisconnectHandlerAdded\",this.onDisconnectHandlerAdded.bind(this)),this.provider.register(\"onUnsubscribeHandlerAdded\",this.onUnsubscribeHandlerAdded.bind(this)),this.provider.register(\"clientDisconnecting\",((e,t)=>{this.handleClientDisconnecting(t)}))}broadcast(t,n){const{context:i}=t;if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name}, tried to call broadcast, is not connected to this Private Channel`);const r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to broadcast - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);this.contextByContextType.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{const t=e.handlerIdsByContextTypes.get(i.type);t&&t.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getCurrentContext(e,t){const{contextType:n}=e;if(!this.getClientState(t))throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call getCurrentContext, is not connected to this Private Channel`);if(void 0!==n){return this.contextByContextType.get(n)||null}return this.lastContext?this.lastContext:null}contextHandlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call addContextListener, is not connected to this Private Channel`);if(i){const e=r.handlerIdsByContextTypes.get(i)||[];r.handlerIdsByContextTypes.set(i,[...e,n])}else r.globalHandler=n;Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&e.onAddContextListenerHandlerId&&this.provider.dispatch(e.clientIdentity,e.onAddContextListenerHandlerId,i)}))}async contextHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);if(i){let e;if(i.globalHandler===n)i.globalHandler=void 0;else for(const[t,r]of i.handlerIdsByContextTypes){const i=r.indexOf(n);i>-1&&(r.splice(i,1),e=t)}const r=(await this.getConnectedClients()).map((async n=>{const{clientIdentity:i,clientIdentity:{endpointId:r},onUnsubscribeHandlerId:o}=n;r!==t.endpointId&&o&&await this.provider.dispatch(i,o,e)}));try{await Promise.all(r)}catch(e){throw console.error(`Problem when attempting to dispatch to onUnsubscribeHandlers. Error: ${e} Removing Client: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}`),new Error(e)}}else console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}.`)}nonStandardHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);i?i.onDisconnectHandlerId===n?i.onDisconnectHandlerId=void 0:i.onAddContextListenerHandlerId===n?i.onAddContextListenerHandlerId=void 0:i.onUnsubscribeHandlerId===n&&(i.onUnsubscribeHandlerId=void 0):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}onAddContextHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onAddContextListener, is not connected to this Private Channel`);n.onAddContextListenerHandlerId=i,Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&Array.from(e.handlerIdsByContextTypes.keys()).forEach((e=>{this.provider.dispatch(t,i,e)}))}))}onDisconnectHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onDisconnect, is not connected to this Private Channel`);n.onDisconnectHandlerId=i}onUnsubscribeHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onUnsubscribe, is not connected to this Private Channel`);n.onUnsubscribeHandlerId=i}removeClient(e){const t=this.getClientState(e);if(!t)throw new Error(`Client with Identity: ${e.uuid} ${e.name}, tried to call disconnect, is not connected to this Private Channel`);t.handlerIdsByContextTypes.clear(),this.clients.delete(e.endpointId)}async fireOnDisconnectForOtherClients(e){const{endpointId:t}=e,n=(await this.getConnectedClients()).map((async e=>{const{clientIdentity:{endpointId:n},onDisconnectHandlerId:i}=e;n!==t&&i&&await this.provider.dispatch(e.clientIdentity,i)}));try{await Promise.all(n)}catch(t){throw console.error(`Problem when attempting to dispatch to onDisconnectHandlers. Error: ${t} Disconnecting Client: uuid: ${e.uuid}. name: ${e.name}. endpointId: ${e.endpointId}`),new Error(t)}}async unsubscribeAll(e){const{endpointId:t}=e,n=this.clients.get(t);if(n){const t=Array.from(n.handlerIdsByContextTypes.values()).flat(),i=n.globalHandler;if(t.length>0){const n=t.map((async t=>this.contextHandlerRemoved({handlerId:t},e)));try{await Promise.all(n)}catch(e){console.error(e.message)}}if(i)try{await this.contextHandlerRemoved({handlerId:i},e)}catch(e){console.error(e.message)}}}async handleClientDisconnecting(e){await this.unsubscribeAll(e),this.removeClient(e),await this.fireOnDisconnectForOtherClients(e)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={clientIdentity:e,handlerIdsByContextTypes:new Map,globalHandler:void 0,onAddContextListenerHandlerId:void 0,onUnsubscribeHandlerId:void 0,onDisconnectHandlerId:void 0};this.clients.set(e.endpointId,t)}}async getConnectedClients(){const e=await this.provider.getAllClientInfo();return Array.from(this.clients.values()).filter((t=>{const{uuid:n,name:i}=t.clientIdentity;return e.some((e=>i===e.name&&n===e.uuid))}))}static init(e,n){return new t(e,n)}},Ui}(),w=G,y=[{id:\"green\",displayMetadata:{color:\"#00CC88\",name:\"green\"}},{id:\"purple\",displayMetadata:{color:\"#8C61FF\",name:\"purple\"}},{id:\"orange\",displayMetadata:{color:\"#FF8C4C\",name:\"orange\"}},{id:\"red\",displayMetadata:{color:\"#FF5E60\",name:\"red\"}},{id:\"pink\",displayMetadata:{color:\"#FF8FB8\",name:\"pink\"}},{id:\"yellow\",displayMetadata:{color:\"#E9FF8F\",name:\"yellow\"}}];let f=class i extends c.Base{constructor(i,s,a){super(i),e.set(this,void 0),t.set(this,void 0),n.set(this,void 0),this.getProvider=()=>o(this,n,\"f\").getValue(),this.interopClients=new Map,this.contextGroupsById=new Map,r(this,t,a.contextGroups??[...y],\"f\"),r(this,e,a.fdc3Info,\"f\"),a?.logging&&(this.logging=a.logging),this.intentClientMap=new Map,this.lastContextMap=new Map,this.sessionContextGroupMap=new Map,r(this,n,new w.Lazy(s),\"f\"),this.setContextGroupMap(),this.setupChannelProvider()}static createClosedConstructor(...e){return class extends i{constructor(...t){if(t.length){const[n,i,r]=t;if(r&&\"object\"==typeof r&&!(0,u.default)(r,e[2]))return console.warn(\"You have modified the parameters of the InteropOverride constructor. This behavior is deprecated and will be removed in a future version. You can modify these options in your manifest. Please consult our Interop docs for guidance on migrating to the new override scheme.\"),void super(e[0],e[1],r);console.warn(\"You are attempting to pass arguments to the InteropOverride constructor. This is not necessary, and these passed arguments will be ignored. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.\")}super(...e)}}}setContext({context:e},t){this.wire.sendAction(\"interop-broker-set-context\").catch((e=>{}));const n=this.getClientState(t);if(!n||!n.contextGroupId)throw n?new Error(\"You must join a context group before you can set context.\"):new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);{const{contextGroupId:t}=n;this.setContextForGroup({context:e},t)}}setContextForGroup({context:e},t){this.wire.sendAction(\"interop-broker-set-context-for-group\").catch((e=>{}));const n=this.contextGroupsById.get(t);if(!n)throw new Error(`Unable to set context for context group that isn't in the context group mapping: ${t}.`);const r=i.checkContextIntegrity(e);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(e)}`);const o=e.type;n.set(o,e),this.lastContextMap.set(t,o);Array.from(this.interopClients.values()).filter((e=>e.contextGroupId===t)).forEach((t=>{for(const[,n]of t.contextHandlers)i.isContextTypeCompatible(o,n.contextType)&&this.invokeContextHandler(t.clientIdentity,n.handlerId,e)}))}getCurrentContext(e,t){this.wire.sendAction(\"interop-broker-get-current-context\").catch((e=>{}));const n=this.getClientState(t);if(!n?.contextGroupId)throw new Error(\"You must be a member of a context group to call getCurrentContext\");const{contextGroupId:i}=n,r=this.contextGroupsById.get(i),o=this.lastContextMap.get(i),s=e?.contextType??o;return r&&s?r.get(s):void 0}async joinContextGroup({contextGroupId:e,target:t},n){if(this.wire.sendAction(\"interop-broker-join-context-group\").catch((e=>{})),this.sessionContextGroupMap.has(e))throw new Error(l.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup);if(t){i.hasEndpointId(t)&&await this.addClientToContextGroup({contextGroupId:e},t);try{const n=this.channel.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name));if(!n.length)throw new Error(`Given Identity ${t.uuid} ${t.name} is not connected to the Interop Broker.`);n.length>1&&console.warn(`More than one connection found for identity ${t.uuid} ${t.name}`);const i=[];for(const t of n)i.push(this.addClientToContextGroup({contextGroupId:e},t));await Promise.all(i)}catch(e){throw new Error(e)}}else await this.addClientToContextGroup({contextGroupId:e},n)}async addClientToContextGroup({contextGroupId:e},t){this.wire.sendAction(\"interop-broker-add-client-to-context-group\").catch((e=>{}));const n=this.getClientState(t);if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(!this.getContextGroups().find((t=>t.id===e)))throw new Error(`Attempting to join a context group that does not exist: ${e}. You may only join existing context groups.`);if(n.contextGroupId!==e){n.contextGroupId=e,await this.setCurrentContextGroupInClientOptions(t,e);const i=this.contextGroupsById.get(e);for(const[,e]of n.contextHandlers){const{contextType:n,handlerId:r}=e;if(void 0===n)i.forEach(((e,n)=>{this.invokeContextHandler(t,r,e)}));else if(i.has(n)){const e=i.get(n);e&&this.invokeContextHandler(t,r,e)}}}}async removeFromContextGroup({target:e},t){if(this.wire.sendAction(\"interop-broker-remove-from-context-group\").catch((e=>{})),e){i.hasEndpointId(e)&&await this.removeClientFromContextGroup(e);try{const t=this.channel.connections.filter((t=>t.uuid===e.uuid&&t.name===e.name));if(!t.length)throw new Error(`No connection found for given Identity ${e.uuid} ${e.name}`);t.length>1&&console.warn(`More than one connection found for identity ${e.uuid} ${e.name}`);const n=[];for(const e of t)n.push(this.removeClientFromContextGroup(e));await Promise.all(n)}catch(e){throw new Error(e)}}else await this.removeClientFromContextGroup(t)}async removeClientFromContextGroup(e){this.wire.sendAction(\"interop-broker-remove-client-from-context-group\").catch((e=>{}));const t=this.getClientState(e);t&&(t.contextGroupId=void 0),await this.setCurrentContextGroupInClientOptions(e,null)}getContextGroups(){return this.wire.sendAction(\"interop-broker-get-context-groups\").catch((e=>{})),o(this,t,\"f\").map((e=>({...e})))}getInfoForContextGroup({contextGroupId:e}){return this.wire.sendAction(\"interop-broker-get-info-for-context-group\").catch((e=>{})),this.getContextGroups().find((t=>t.id===e))}getAllClientsInContextGroup({contextGroupId:e}){this.wire.sendAction(\"interop-broker-get-all-clients-in-context-group\").catch((e=>{}));return Array.from(this.interopClients.values()).filter((t=>t.contextGroupId===e)).map((e=>e.clientIdentity))}async handleFiredIntent(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.raiseIntent\",\"InteropBroker.handleFiredIntent\",t,\"interopClient.fireIntent\");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntent)}async setIntentTarget(e,t){this.wire.sendAction(\"interop-broker-set-intent-target\").catch((e=>{}));const n=this.intentClientMap.get(t.name),i=`intent-handler-${e.name}`;if(n){const t=n.get(i);if(t){if(t.pendingIntents.push(e),t.clientIdentity&&t.isReady){const{clientIdentity:e,pendingIntents:n}=t;try{const r=n[n.length-1];await this.invokeIntentHandler(e,i,r),t.pendingIntents=[]}catch(n){console.error(`Error invoking intent handler for client ${e.uuid}/${e.name}/${e.endpointId}`),t.isReady=!1}}}else n.set(i,{isReady:!1,pendingIntents:[e]})}else{this.intentClientMap.set(t.name,new Map);const n=this.intentClientMap.get(t.name);n&&n.set(i,{isReady:!1,pendingIntents:[e]})}}async handleInfoForIntent(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.findIntent\",\"InteropBroker.handleInfoForIntent\",t,\"interopClient.getInfoForIntent\");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntent)}async handleInfoForIntentsByContext(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.findIntentsByContext\",\"InteropBroker.handleInfoForIntentsByContext\",t,\"interopClient.getInfoForIntentsByContext\");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntentsByContext)}async handleFiredIntentForContext(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.raiseIntentForContext\",\"InteropBroker.handleFiredIntentForContext\",t,\"interopClient.fireIntentForContext\");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntentForContext)}async clientDisconnected(e){}async fdc3HandleOpen({app:e,context:t},n){const i=(0,l.generateOverrideWarning)(\"fdc3.open\",\"InteropBroker.fdc3HandleOpen\",n);throw console.warn(i),new Error(l.BROKER_ERRORS.fdc3Open)}async fdc3HandleFindInstances(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.open\",\"InteropBroker.fdc3HandleFindInstances\",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3FindInstances)}async fdc3HandleGetAppMetadata(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.getAppMetadata\",\"InteropBroker.fdc3HandleGetAppMetadata\",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3GetAppMetadata)}async invokeContextHandler(e,t,n){const i=await this.getProvider();try{await i.dispatch(e,t,n)}catch(i){console.error(`Error invoking context handler ${t} for context type ${n.type} in client ${e.uuid}/${e.name}/${e.endpointId}`,i)}}async invokeIntentHandler(e,t,n){const i=await this.getProvider();await i.dispatch(e,t,n)}async fdc3HandleGetInfo(t,n){const{fdc3Version:i}=t;return{fdc3Version:i,...o(this,e,\"f\"),optionalFeatures:{OriginatingAppMetadata:!1,UserChannelMembershipAPIs:!0},appMetadata:{appId:\"\",instanceId:\"\"}}}async getAllClientInfo(){return(await this.getProvider()).getAllClientInfo()}decorateSnapshot(e){return{...e,interopSnapshotDetails:{contextGroupStates:this.getContextGroupStates()}}}applySnapshot(e,t){const n=e?.interopSnapshotDetails?.contextGroupStates;n&&(t?.closeExistingWindows||this.updateExistingClients(n),this.rehydrateContextGroupStates(n))}updateExistingClients(e){this.interopClients.forEach((t=>{const{clientIdentity:n,contextGroupId:r,contextHandlers:o}=t;if(r){const t=e[r];for(const[,e]of Object.entries(t))o.forEach((t=>{const{handlerId:r,contextType:o}=t;i.isContextTypeCompatible(e.type,o)&&this.invokeContextHandler(n,r,e)}))}}))}getContextGroupStates(){return i.toObject(this.contextGroupsById)}rehydrateContextGroupStates(e){const t=Object.entries(e);for(const[e,n]of t){const t=Object.entries(n);for(const[n,i]of t)if(this.contextGroupsById.has(e)){this.contextGroupsById.get(e).set(n,i)}else console.warn(`Attempting to set a context group that isn't in the context group mapping. Skipping context group rehydration for: ${e}`)}}contextHandlerRegistered({contextType:e,handlerId:t},n){const i={contextType:e,handlerId:t},r=this.getClientState(n);if(r?.contextHandlers.set(t,i),r&&r.contextGroupId){const{contextGroupId:i}=r,o=this.contextGroupsById.get(i);if(void 0===e)o.forEach(((e,i)=>{this.invokeContextHandler(n,t,e)}));else if(o.has(e)){const i=o.get(e);i&&this.invokeContextHandler(n,t,i)}}}async intentHandlerRegistered(e,t){const{handlerId:n}=e,i=this.intentClientMap.get(t.name),r=i?.get(n);if(i)if(r){const{pendingIntents:e}=r;r.clientIdentity=t,r.isReady=!0;try{if(e.length>0){const i=e[e.length-1];await this.invokeIntentHandler(t,n,i),r.pendingIntents=[]}}catch(e){console.error(`Error invoking intent handler: ${n} for client ${t.uuid}/${t.name}/${t.endpointId}`)}}else i.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t});else{this.intentClientMap.set(t.name,new Map);const e=this.intentClientMap.get(t.name);e&&e.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t})}}removeContextHandler({handlerId:e},t){const n=this.getClientState(t);n&&n.contextHandlers.delete(e)}handleJoinSessionContextGroup({sessionContextGroupId:e},t){try{if(!e)throw new Error(\"Failed to join session context group: must specify group id.\");const n=this.sessionContextGroupMap.get(e);if(n)n.registerNewClient(t);else{const n=new h.default(this.channel,e);n.registerNewClient(t),this.sessionContextGroupMap.set(e,n)}return{hasConflict:this.contextGroupsById.has(e)}}catch(e){throw new Error(e)}}getClientState(e){return this.interopClients.get(e.endpointId)}static toObject(e){const t=Object.fromEntries(e),n={};return Object.entries(t).forEach((([e,t])=>{const i=Object.fromEntries(t);n[e]=i})),n}static checkContextIntegrity(e){if(!e)return{isValid:!1,reason:\"No context supplied\"};if(\"object\"!=typeof e)return{isValid:!1,reason:\"Context must be an Object\"};if(!e.type)return{isValid:!1,reason:\"Context must have a type property\"};if(e.id&&\"object\"!=typeof e.id)return{isValid:!1,reason:\"Context id must be an Object populated with key-value identifiers (if set)\"};if(e.id){const{id:t}=e,n=Object.keys(t);let i=!1;if(!n.length)return{isValid:!1,reason:\"Context id must have at least one key-value identifier\"};if(n.forEach((e=>{\"string\"==typeof e&&\"string\"==typeof t[e]||(i=!0)})),i)return{isValid:!1,reason:\"Context id key-value identifiers must be of type string\"}}return e.name&&\"string\"!=typeof e.name?{isValid:!1,reason:\"Context name must be of string type (if set)\"}:{isValid:!0}}static hasEndpointId(e){return void 0!==e.endpointId}static isContextTypeCompatible(e,t){return void 0===t||e===t}setContextGroupMap(){for(const e of this.getContextGroups())this.contextGroupsById.set(e.id,new Map)}async setCurrentContextGroupInClientOptions(e,t){try{const n=await this.fin.System.getEntityInfo(e.uuid,e.name);let i;\"view\"===n.entityType?i=await this.fin.View.wrap(e):\"window\"===n.entityType&&(i=await this.fin.Window.wrap(e)),i&&await i.updateOptions({interop:{currentContextGroup:t}})}catch(e){}}async setupChannelProvider(){try{const e=await this.getProvider();this.channel=e,this.wireChannel(e)}catch(e){throw new Error(`Error setting up Interop Broker Channel Provider: ${e}`)}}wireChannel(e){e.onConnection((async(e,t)=>{if(!await this.isConnectionAuthorized(e,t))throw new Error(`Connection not authorized for ${e.uuid}, ${e.name}`);if(!e.endpointId)throw new Error(\"Version too old to be compatible with Interop. Please upgrade your runtime to a more recent version.\");const n={contextGroupId:void 0,contextHandlers:new Map,clientIdentity:e};t?.currentContextGroup&&this.contextGroupsById.has(t.currentContextGroup)&&(n.contextGroupId=t?.currentContextGroup),this.interopClients.set(e.endpointId,n)})),e.onDisconnection((e=>{this.interopClients.delete(e.endpointId);const t=this.intentClientMap.get(e.name);t&&e.uuid===this.fin.me.uuid&&t.forEach((e=>{e.isReady=!1})),this.sessionContextGroupMap.forEach((t=>{t.onDisconnection(e)})),this.clientDisconnected(e)})),e.beforeAction((async(e,t,n)=>{if(!await this.isActionAuthorized(e,t,n))throw new Error(`Action (${e}) not authorized for ${n.uuid}, ${n.name}`);this.logging?.beforeAction?.enabled&&console.log(e,t,n)})),e.afterAction(((e,t,n)=>{this.logging?.afterAction?.enabled&&console.log(e,t,n)})),e.register(\"setContext\",this.setContext.bind(this)),e.register(\"fireIntent\",this.handleFiredIntent.bind(this)),e.register(\"getCurrentContext\",this.getCurrentContext.bind(this)),e.register(\"getInfoForIntent\",this.handleInfoForIntent.bind(this)),e.register(\"getInfoForIntentsByContext\",this.handleInfoForIntentsByContext.bind(this)),e.register(\"fireIntentForContext\",this.handleFiredIntentForContext.bind(this)),e.register(\"getContextGroups\",this.getContextGroups.bind(this)),e.register(\"joinContextGroup\",this.joinContextGroup.bind(this)),e.register(\"removeFromContextGroup\",this.removeFromContextGroup.bind(this)),e.register(\"getAllClientsInContextGroup\",this.getAllClientsInContextGroup.bind(this)),e.register(\"getInfoForContextGroup\",this.getInfoForContextGroup.bind(this)),e.register(\"contextHandlerRegistered\",this.contextHandlerRegistered.bind(this)),e.register(\"intentHandlerRegistered\",this.intentHandlerRegistered.bind(this)),e.register(\"removeContextHandler\",this.removeContextHandler.bind(this)),e.register(\"sessionContextGroup:createIfNeeded\",this.handleJoinSessionContextGroup.bind(this)),e.register(\"fdc3Open\",this.fdc3HandleOpen.bind(this)),e.register(\"fdc3v2FindIntentsByContext\",this.handleInfoForIntentsByContext.bind(this)),e.register(\"fdc3FindInstances\",this.fdc3HandleFindInstances.bind(this)),e.register(\"fdc3GetAppMetadata\",this.fdc3HandleGetAppMetadata.bind(this)),e.register(\"fdc3v2GetInfo\",(async(e,t)=>this.fdc3HandleGetInfo.bind(this)(e,t))),e.register(\"createPrivateChannelProvider\",(async e=>{const{channelId:t}=e,n=await this.fin.InterApplicationBus.Channel.create(t);p.PrivateChannelProvider.init(n,t)}))}isConnectionAuthorized(e,t){return this.wire.sendAction(\"interop-broker-is-connection-authorized\").catch((e=>{})),Promise.resolve(!0)}isActionAuthorized(e,t,n){return this.wire.sendAction(\"interop-broker-is-action-authorized\").catch((e=>{})),Promise.resolve(!0)}};return Gi.InteropBroker=f,e=new WeakMap,t=new WeakMap,n=new WeakMap,Gi}var zi,Ki={},qi={},Ji=s&&s.__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},Yi=s&&s.__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)};Object.defineProperty(qi,\"__esModule\",{value:!0});const Zi=d,Qi=Hi;class Xi extends Zi.Base{constructor(e,t,n){super(e),zi.set(this,void 0),this.id=n,Ji(this,zi,t,\"f\")}async setContext(e){this.wire.sendAction(\"interop-session-context-group-set-context\").catch((e=>{}));return(await Yi(this,zi,\"f\")).dispatch(`sessionContextGroup:setContext-${this.id}`,{sessionContextGroupId:this.id,context:e})}async getCurrentContext(e){this.wire.sendAction(\"interop-session-context-group-get-context\").catch((e=>{}));return(await Yi(this,zi,\"f\")).dispatch(`sessionContextGroup:getContext-${this.id}`,{sessionContextGroupId:this.id,type:e})}async addContextHandler(e,t){if(this.wire.sendAction(\"interop-session-context-group-add-handler\").catch((e=>{})),\"function\"!=typeof e)throw new Error(\"Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.\");const n=await Yi(this,zi,\"f\");let i;return i=t?`sessionContextHandler:invoke-${this.id}-${t}-${(0,Qi.generateId)()}`:`sessionContextHandler:invoke-${this.id}`,n.register(i,(0,Qi.wrapContextHandler)(e,i)),await n.dispatch(`sessionContextGroup:handlerAdded-${this.id}`,{handlerId:i,contextType:t}),{unsubscribe:await this.createUnsubscribeCb(i)}}async createUnsubscribeCb(e){const t=await Yi(this,zi,\"f\");return async()=>{t.remove(e),await t.dispatch(`sessionContextGroup:handlerRemoved-${this.id}`,{handlerId:e})}}getUserInstance(){return{id:this.id,setContext:(0,Qi.wrapInTryCatch)(this.setContext.bind(this),\"Failed to set context: \"),getCurrentContext:(0,Qi.wrapInTryCatch)(this.getCurrentContext.bind(this),\"Failed to get context: \"),addContextHandler:(0,Qi.wrapInTryCatch)(this.addContextHandler.bind(this),\"Failed to add context handler: \")}}}qi.default=Xi,zi=new WeakMap;var er={},tr={},nr={},ir={},rr=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),or=s&&s.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,\"default\",{enumerable:!0,value:t})}:function(e,t){e.default=t}),sr=s&&s.__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)&&rr(t,e,n);return or(t,e),t};Object.defineProperty(ir,\"__esModule\",{value:!0}),ir.PrivateChannelClient=void 0;const ar=sr(Hi);var cr,dr;function hr(){if(cr)return tr;cr=1;var e,t=s&&s.__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)},n=s&&s.__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},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(tr,\"__esModule\",{value:!0}),tr.FDC3ModuleBase=void 0;const o=nr,a=Hi,c=wr(),d=r(i);return tr.FDC3ModuleBase=class{get client(){return t(this,e,\"f\").call(this)}get fin(){return this.wire.getFin()}constructor(t,i){this.wire=i,e.set(this,void 0),n(this,e,t,\"f\")}async broadcast(e){return this.wire.sendAction(\"fdc3-broadcast\").catch((e=>{})),this.client.setContext(e)}async _open(e,t){this.wire.sendAction(\"fdc3-open\").catch((e=>{}));try{return await c.InteropClient.ferryFdc3Call(this.client,\"fdc3Open\",{app:e,context:t})}catch(e){const t=e.message===a.BROKER_ERRORS.fdc3Open?\"ResolverUnavailable\":e.message;throw new Error(t)}}async _getChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:\"system\",...(0,o.getUnsupportedChannelApis)()})))}async getOrCreateChannel(e){this.wire.sendAction(\"fdc3-get-or-create-channel\").catch((e=>{}));const t=(await this._getChannels()).find((t=>t.id===e));if(t)return{...t,type:\"system\",...(0,o.getUnsupportedChannelApis)()};try{const t=await this.client.joinSessionContextGroup(e);return(0,o.buildAppChannelObject)(t)}catch(e){throw console.error(e.message),new Error(o.ChannelError.CreationFailed)}}async getSystemChannels(){return this.wire.sendAction(\"fdc3-get-system-channels\").catch((e=>{})),this._getChannels()}async joinChannel(e){this.wire.sendAction(\"fdc3-join-channel\").catch((e=>{}));try{return await this.client.joinContextGroup(e)}catch(e){if(e.message===a.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup?console.error(\"The Channel you have tried to join is an App Channel. Custom Channels can only be defined by the Interop Broker through code or manifest configuration. Please use getOrCreateChannel.\"):console.error(e.message),e.message.startsWith(\"Attempting to join a context group that does not exist\"))throw new Error(o.ChannelError.NoChannelFound);throw new Error(o.ChannelError.AccessDenied)}}async getCurrentChannel(){this.wire.sendAction(\"fdc3-get-current-channel\").catch((e=>{}));const e=await this.getCurrentContextGroupInfo();return e?this.buildChannelObject(e):null}async leaveCurrentChannel(){return this.wire.sendAction(\"fdc3-leave-current-channel\").catch((e=>{})),this.client.removeFromContextGroup()}async getCurrentContextGroupInfo(){const e=await this.client.getContextGroups(),t=e.map((async e=>this.client.getAllClientsInContextGroup(e.id))),n=(await Promise.all(t)).findIndex((e=>e.some((e=>{const{uuid:t,name:n}=e;return this.wire.me.uuid===t&&this.wire.me.name===n}))));return e[n]}async buildChannelObject(e){return{...e,type:\"system\",addContextListener:(...[e,t])=>{let n,i;\"function\"==typeof e?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),n=e):(n=t,\"string\"==typeof e&&(i=e));const r=(async()=>{let e=!0;const t=await this.client.getCurrentContext(i);return this.client.addContextHandler(((i,r)=>{if(!e||(e=!1,!(0,d.default)(t,i)))return n(i,r)}),i)})();return{...r,unsubscribe:()=>r.then((e=>e.unsubscribe()))}},broadcast:this.broadcast.bind(this),getCurrentContext:async e=>{const t=await this.client.getCurrentContext(e);return void 0===t?null:t}}}},e=new WeakMap,tr}ir.PrivateChannelClient=class{constructor(e,t){this.id=t,this.client=e,this.listeners=new Map}async broadcast(e){return this.client.dispatch(\"broadcast\",{context:e})}async getCurrentContext(e){return this.client.dispatch(\"getCurrentContext\",{contextType:e})}async addContextListener(e,t){if(\"function\"!=typeof t)throw new Error(\"Non-function argument passed to the second parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.\");let n;n=e?`contextHandler:invoke-${this.id}-${e}-${ar.generateId()}`:`contextHandler:invoke-${this.id}-${ar.generateId()}`,this.client.register(n,ar.wrapContextHandler(t,n));const i={unsubscribe:await this.createContextUnsubscribeCb(n)};return this.listeners.set(n,i),await this.client.dispatch(\"contextHandlerAdded\",{handlerId:n,contextType:e}),i}createNonStandardUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch(\"nonStandardHandlerRemoved\",{handlerId:e})}}createContextUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch(\"contextHandlerRemoved\",{handlerId:e})}}onAddContextListener(e){const t=`onContextHandlerAdded:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch(\"onAddContextHandlerAdded\",{handlerId:t}),n}onDisconnect(e){const t=`onDisconnect:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch(\"onDisconnectHandlerAdded\",{handlerId:t}),n}onUnsubscribe(e){const t=`onUnsubscribe:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch(\"onUnsubscribeHandlerAdded\",{handlerId:t}),n}async cleanUpAllSubs(){Array.from(this.listeners.keys()).forEach((e=>{this.client.remove(e),this.listeners.delete(e)}))}async disconnect(){try{await this.client.dispatch(\"clientDisconnecting\"),await this.cleanUpAllSubs(),await this.client.disconnect()}catch(e){throw new Error(e.message)}}},function(e){var t=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,\"__esModule\",{value:!0}),e.getIntentResolution=e.isChannel=e.isContext=e.connectPrivateChannel=e.buildAppChannelObject=e.buildPrivateChannelObject=e.ChannelError=e.ResultError=e.UnsupportedChannelApiError=e.getUnsupportedChannelApis=void 0;const n=Hi,r=ir,o=t(i);e.getUnsupportedChannelApis=e=>({addContextListener:()=>{throw new a(\"Channel.addContextListener\",e)},broadcast:()=>{throw new a(\"Channel.broadcast\",e)},getCurrentContext:()=>{throw new a(\"Channel.getCurrentContext\",e)}});class a extends Error{constructor(e,t=\"System\"){super(e),this.message=`Calling ${e} on an instance of a ${t} Channel returned by fdc3.get${t}Channels is not supported. If you would like to use a ${t} Channel, please use fdc3.joinChannel, fdc3.addContextListener, and fdc3.broadcast instead.`}}var c,d;e.UnsupportedChannelApiError=a,function(e){e.NoResultReturned=\"NoResultReturned\",e.IntentHandlerRejected=\"IntentHandlerRejected\"}(c=e.ResultError||(e.ResultError={})),(d=e.ChannelError||(e.ChannelError={})).NoChannelFound=\"NoChannelFound\",d.AccessDenied=\"AccessDenied\",d.CreationFailed=\"CreationFailed\";e.buildPrivateChannelObject=e=>{let t=!1;const n=()=>{if(t)throw new Error(\"Private Channel Client has been disconnected from the Private Channel\")};return{id:e.id,type:\"private\",broadcast:async t=>(n(),e.broadcast(t)),getCurrentContext:async t=>(n(),e.getCurrentContext(t)),addContextListener:async(t,i)=>{n();let r=i,o=t;\"function\"==typeof t&&(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),r=t,o=null);return e.addContextListener(o,r)},onAddContextListener:t=>(n(),e.onAddContextListener(t)),disconnect:async()=>(n(),t=!0,e.disconnect()),onDisconnect:t=>(n(),e.onDisconnect(t)),onUnsubscribe:t=>(n(),e.onUnsubscribe(t))}};e.buildAppChannelObject=e=>({id:e.id,type:\"app\",broadcast:e.setContext,getCurrentContext:async t=>{const n=await e.getCurrentContext(t);return void 0===n?null:n},addContextListener:(t,n)=>{let i,r;\"function\"==typeof t?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),i=t):(i=n,\"string\"==typeof t&&(r=t));const s=(async()=>{let t=!0;const n=await e.getCurrentContext(r);return e.addContextHandler(((e,r)=>{if(!t||(t=!1,!(0,o.default)(n,e)))return i(e,r)}),r)})();return{...s,unsubscribe:()=>s.then((e=>e.unsubscribe()))}}});e.connectPrivateChannel=async t=>{try{const n=await fin.InterApplicationBus.Channel.connect(t),i=new r.PrivateChannelClient(n,t);return(0,e.buildPrivateChannelObject)(i)}catch(e){throw new Error(`Private Channel with id: ${t} doesn't exist`)}};e.isContext=e=>{if(e&&\"object\"==typeof e&&\"type\"in e){const{type:t}=e;return\"string\"==typeof t}return!1};e.isChannel=e=>{if(e&&\"object\"==typeof e&&\"type\"in e&&\"id\"in e){const{type:t,id:n}=e;return\"string\"==typeof t&&\"string\"==typeof n&&(\"app\"===t||\"private\"===t)}return!1};e.getIntentResolution=async(t,i,r,o)=>{const s=(0,n.generateId)(),a=new Promise(((e,t)=>{fin.InterApplicationBus.subscribe({uuid:\"*\"},s,(t=>{e(t)})).catch((()=>t(new Error(\"getResult is not supported in this environment\"))))})),d=r?{target:r,intentResolutionResultId:s}:{intentResolutionResultId:s},h=o?{name:o,context:i,metadata:d}:{...i,metadata:d},l=async()=>{let n=await a;if(!n||\"object\"!=typeof n)throw new Error(c.NoResultReturned);const{error:i}=n;if(i)throw new Error(c.IntentHandlerRejected);if((0,e.isChannel)(n)){const{id:i,type:r}=n;switch(r){case\"private\":n=await(0,e.connectPrivateChannel)(i);break;case\"app\":{const r=await t.joinSessionContextGroup(i);n=(0,e.buildAppChannelObject)(r);break}}}else if(!(0,e.isContext)(n))throw new Error(c.NoResultReturned);return n},u=o?await t.fireIntent(h):await t.fireIntentForContext(h);return\"object\"!=typeof u?{source:{appId:\"\",instanceId:\"\"},intent:\"\",version:\"2.0\",getResult:l}:{...u,getResult:l}}}(nr);var lr,ur,pr={};function wr(){if(ur)return Ki;ur=1;var e,t,n=s&&s.__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},i=s&&s.__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)},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ki,\"__esModule\",{value:!0}),Ki.InteropClient=void 0;const o=d,a=r(qi),c=function(){if(dr)return er;dr=1,Object.defineProperty(er,\"__esModule\",{value:!0}),er.Fdc3Module=void 0;const e=Hi,t=hr();class n extends t.FDC3ModuleBase{async open(e,t){await super._open(e,t)}addContextListener(e,t){let n;return this.wire.sendAction(\"fdc3-add-context-listener\").catch((e=>{})),\"function\"==typeof e?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),n=this.client.addContextHandler(e)):n=this.client.addContextHandler(t,null===e?void 0:e),{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}addIntentListener(e,t){this.wire.sendAction(\"fdc3-add-intent-listener\").catch((e=>{}));const n=this.client.registerIntentHandler((e=>{const{context:n,metadata:i}=e,{metadata:r}=n,o=i?.intentResolutionResultId||r?.intentResolutionResultId;o&&this.fin.InterApplicationBus.publish(o,null).catch((()=>null)),t(e.context)}),e,{fdc3Version:\"1.2\"});return{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}async raiseIntent(t,n,i){this.wire.sendAction(\"fdc3-raise-intent\").catch((e=>{}));const r=i?{name:t,context:n,metadata:{target:i}}:{name:t,context:n};try{return await this.client.fireIntent(r)}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntent?\"ResolverUnavailable\":t.message;throw new Error(n)}}async findIntent(t,n){this.wire.sendAction(\"fdc3-find-intent\").catch((e=>{}));try{return await this.client.getInfoForIntent({name:t,context:n})}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntent?\"ResolverUnavailable\":t.message;throw new Error(n)}}async findIntentsByContext(t){this.wire.sendAction(\"fdc3-find-intents-by-context\").catch((e=>{}));try{return await this.client.getInfoForIntentsByContext(t)}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntentsByContext?\"ResolverUnavailable\":t.message;throw new Error(n)}}async raiseIntentForContext(t,n){this.wire.sendAction(\"fdc3-raise-intent-for-context\").catch((e=>{}));try{return await this.client.fireIntentForContext({...t,metadata:{target:n}})}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntentForContext?\"ResolverUnavailable\":t.message;throw new Error(n)}}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}getInfo(){return this.wire.sendAction(\"fdc3-get-info\").catch((e=>{})),{providerVersion:this.wire.environment.getAdapterVersionSync(),provider:`openfin-${this.wire.me.uuid}`,fdc3Version:\"1.2\"}}}return er.Fdc3Module=n,er}(),h=function(){if(lr)return pr;lr=1,Object.defineProperty(pr,\"__esModule\",{value:!0}),pr.Fdc3Module2=void 0;const e=hr(),t=Hi,n=wr(),i=nr,r=ir;class o extends e.FDC3ModuleBase{async open(e,t){return\"string\"==typeof e&&console.warn(\"Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).\"),super._open(e,t)}async findInstances(e){this.wire.sendAction(\"fdc3-find-instances\").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,\"fdc3FindInstances\",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3FindInstances?\"ResolverUnavailable\":e.message;throw new Error(n)}}async getAppMetadata(e){this.wire.sendAction(\"fdc3-get-app-metadata\").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,\"fdc3GetAppMetadata\",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3GetAppMetadata?\"ResolverUnavailable\":e.message;throw new Error(n)}}async addContextListener(e,t){this.wire.sendAction(\"fdc3-add-context-listener\").catch((e=>{}));const n=e=>t=>{const{contextMetadata:n,...i}=t,r=n?[{...i},n]:[t,null];e(...r)};let i=t,r=n(i);return\"function\"==typeof e?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),i=e,r=n(i),this.client.addContextHandler(r)):this.client.addContextHandler(r,null===e?void 0:e)}async findIntent(e,n,i){this.wire.sendAction(\"fdc3-find-intent\").catch((e=>{}));try{return await this.client.getInfoForIntent({name:e,context:n,metadata:{resultType:i}})}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntent?\"ResolverUnavailable\":e.message;throw new Error(n)}}async findIntentsByContext(e,i){this.wire.sendAction(\"fdc3-find-intents-by-context\").catch((e=>{}));const r=i?{context:e,metadata:{resultType:i}}:e;try{return await n.InteropClient.ferryFdc3Call(this.client,\"fdc3v2FindIntentsByContext\",r)}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntentsByContext?\"ResolverUnavailable\":e.message;throw new Error(n)}}async raiseIntent(e,n,r){this.wire.sendAction(\"fdc3-raise-intent\").catch((e=>{}));try{return\"string\"==typeof r&&console.warn(\"Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).\"),(0,i.getIntentResolution)(this.client,n,r,e)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?\"ResolverUnavailable\":e.message;throw new Error(n)}}async raiseIntentForContext(e,n){this.wire.sendAction(\"fdc3-raise-intent-for-context\").catch((e=>{}));try{return\"string\"==typeof n&&console.warn(\"Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).\"),(0,i.getIntentResolution)(this.client,e,n)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?\"ResolverUnavailable\":e.message;throw new Error(n)}}async addIntentListener(e,t){if(this.wire.sendAction(\"fdc3-add-intent-listener\").catch((e=>{})),\"string\"!=typeof e)throw new Error(\"First argument must be an Intent name\");return this.client.registerIntentHandler((async e=>{let n,i;const{context:r,metadata:o}=e,{contextMetadata:s,metadata:a,...c}=r,d=o?.intentResolutionResultId||a?.intentResolutionResultId;try{const e=a?{metadata:a,...c}:{...c};n=await t(e,s),i=n}catch(e){n=e,i={error:!0}}if(d&&this.fin.InterApplicationBus.publish(d,i).catch((()=>null)),n instanceof Error)throw new Error(n.message);return n}),e,{fdc3Version:\"2.0\"})}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}async createPrivateChannel(){const e=(0,t.generateId)();await n.InteropClient.ferryFdc3Call(this.client,\"createPrivateChannelProvider\",{channelId:e});const o=await this.fin.InterApplicationBus.Channel.connect(e),s=new r.PrivateChannelClient(o,e);return(0,i.buildPrivateChannelObject)(s)}async getUserChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:\"user\",...(0,i.getUnsupportedChannelApis)(\"User\")})))}async getSystemChannels(){return console.warn(\"This API has been deprecated. Please use fdc3.getUserChannels instead.\"),super.getSystemChannels()}async joinUserChannel(e){return super.joinChannel(e)}async joinChannel(e){return console.warn(\"This API has been deprecated. Please use fdc3.joinUserChannel instead.\"),super.joinChannel(e)}async getCurrentChannel(){const e=await super.getCurrentChannel();return e?{...e,type:\"user\",broadcast:this.broadcast.bind(this)}:null}async getInfo(){return n.InteropClient.ferryFdc3Call(this.client,\"fdc3v2GetInfo\",{fdc3Version:\"2.0\"})}}return pr.Fdc3Module2=o,pr}(),l=Hi;let u=class extends o.Base{constructor(i,r){super(i),e.set(this,void 0),t.set(this,void 0),n(this,t,new Map,\"f\"),n(this,e,r,\"f\")}async setContext(t){this.wire.sendAction(\"interop-client-set-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"setContext\",{context:t})}async addContextHandler(t,n){if(this.wire.sendAction(\"interop-client-add-context-handler\").catch((e=>{})),\"function\"!=typeof t)throw new Error(\"Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.\");const r=await i(this,e,\"f\");let o;o=n?`invokeContextHandler-${n}-${(0,l.generateId)()}`:\"invokeContextHandler\";const s=(0,l.wrapContextHandler)(t,o);return r.register(o,s),await r.dispatch(\"contextHandlerRegistered\",{handlerId:o,contextType:n}),{unsubscribe:async()=>{r.remove(o),await r.dispatch(\"removeContextHandler\",{handlerId:o})}}}async getContextGroups(){this.wire.sendAction(\"interop-client-get-context-groups\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getContextGroups\")}async joinContextGroup(t,n){this.wire.sendAction(\"interop-client-join-context-group\").catch((e=>{}));const r=await i(this,e,\"f\");if(!t)throw new Error(\"No contextGroupId specified for joinContextGroup.\");return r.dispatch(\"joinContextGroup\",{contextGroupId:t,target:n})}async removeFromContextGroup(t){this.wire.sendAction(\"interop-client-remove-from-context-group\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"removeFromContextGroup\",{target:t})}async getAllClientsInContextGroup(t){this.wire.sendAction(\"interop-client-get-all-clients-in-context-group\").catch((e=>{}));const n=await i(this,e,\"f\");if(!t)throw new Error(\"No contextGroupId specified for getAllClientsInContextGroup.\");return n.dispatch(\"getAllClientsInContextGroup\",{contextGroupId:t})}async getInfoForContextGroup(t){this.wire.sendAction(\"interop-client-get-info-for-context-group\").catch((e=>{}));const n=await i(this,e,\"f\");if(!t)throw new Error(\"No contextGroupId specified for getInfoForContextGroup.\");return n.dispatch(\"getInfoForContextGroup\",{contextGroupId:t})}async fireIntent(t){this.wire.sendAction(\"interop-client-fire-intent\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"fireIntent\",t)}async registerIntentHandler(t,n,r){this.wire.sendAction(\"interop-client-register-intent-handler\").catch((e=>{}));const o=await i(this,e,\"f\"),s=`intent-handler-${n}`,a=(0,l.wrapIntentHandler)(t,s);try{await o.register(s,a),await o.dispatch(\"intentHandlerRegistered\",{handlerId:s,...r})}catch(e){throw new Error(\"Unable to register intent handler\")}return{unsubscribe:async()=>{o.remove(s)}}}async getCurrentContext(t){this.wire.sendAction(\"interop-client-get-current-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getCurrentContext\",{contextType:t})}async getInfoForIntent(t){this.wire.sendAction(\"interop-client-get-info-for-intent\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getInfoForIntent\",t)}async getInfoForIntentsByContext(t){this.wire.sendAction(\"interop-client-get-info-for-intents-by-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getInfoForIntentsByContext\",t)}async fireIntentForContext(t){this.wire.sendAction(\"interop-client-fire-intent-for-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"fireIntentForContext\",t)}async joinSessionContextGroup(n){try{const r=i(this,t,\"f\").get(n);if(r)return r.getUserInstance();const o=await i(this,e,\"f\"),{hasConflict:s}=await o.dispatch(\"sessionContextGroup:createIfNeeded\",{sessionContextGroupId:n});s&&console.warn(`A (non-session) context group with the name \"${n}\" already exists. If you are trying to join a Context Group, call joinContextGroup instead.`);const c=new a.default(this.wire,i(this,e,\"f\"),n);return i(this,t,\"f\").set(n,c),c.getUserInstance()}catch(e){throw console.error(`Error thrown trying to create Session Context Group with id \"${n}\": ${e}`),e}}async onDisconnection(t){this.wire.sendAction(\"interop-client-add-ondisconnection-listener\").catch((e=>{}));return(await i(this,e,\"f\")).onDisconnection((e=>{const{uuid:n}=e;t({type:\"interop-broker\",topic:\"disconnected\",brokerName:n})}))}getFDC3Sync(e){switch(e){case\"1.2\":return new c.Fdc3Module((()=>this),this.wire);case\"2.0\":return new h.Fdc3Module2((()=>this),this.wire);default:throw new Error(`Invalid FDC3 version provided: ${e}. Must be '1.2' or '2.0'`)}}async getFDC3(e){return this.getFDC3Sync(e)}static async ferryFdc3Call(t,n,r){return(await i(t,e,\"f\")).dispatch(n,r||null)}};return Ki.InteropClient=u,e=new WeakMap,t=new WeakMap,Ki}var yr,fr,gr,mr={};function vr(){if(yr)return mr;yr=1,Object.defineProperty(mr,\"__esModule\",{value:!0}),mr.overrideCheck=mr.checkFDC32Overrides=mr.getDefaultViewFdc3VersionFromAppInfo=void 0;const e=Vi();function t(t){return[\"fdc3HandleFindInstances\",\"handleInfoForIntent\",\"handleInfoForIntentsByContext\",\"fdc3HandleGetAppMetadata\",\"fdc3HandleGetInfo\",\"fdc3HandleOpen\",\"handleFiredIntent\",\"handleFiredIntentForContext\"].filter((n=>t[n]===e.InteropBroker.prototype[n]))}return mr.getDefaultViewFdc3VersionFromAppInfo=function({manifest:e,initialOptions:t}){const n=e?.platform?.defaultViewOptions?.fdc3InteropApi??t.defaultViewOptions?.fdc3InteropApi;return[\"1.2\",\"2.0\"].includes(n??\"\")?n:void 0},mr.checkFDC32Overrides=t,mr.overrideCheck=function(e,n){if(n&&\"2.0\"===n){const n=t(e);n.length>0&&console.warn(`WARNING: FDC3 2.0 has been set as a default option for Views in this Platform, but the required InteropBroker APIs for FDC3 2.0 compliance have not all been overridden.\\nThe following APIs need to be overridden:\\n${n.join(\"\\n\")}`)}},mr}function Cr(){return gr||(gr=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),i=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),i(function(){if(fr)return Ti;fr=1;var e=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ti,\"__esModule\",{value:!0}),Ti.InteropModule=void 0;const t=e(n),i=$i,r=d,o=Vi(),a=wr(),c=vr(),h=Tn,l=e=>new e,u=\"You have attempted to use or modify InteropBroker parameters, which is not allowed. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.\";class p extends r.Base{async init(e,n=l){this.wire.sendAction(\"interop-init\").catch((()=>{}));const r=await this.wire.environment.getInteropInfo(this.wire.getFin()),s=(0,i.createUnusableObject)(u),a=(0,i.createWarningObject)(u,(0,t.default)(r)),d=async()=>{throw new Error(u)},p=o.InteropBroker.createClosedConstructor(this.wire,(()=>this.fin.InterApplicationBus.Channel.create(`interop-broker-${e}`)),r);let w;return w=Array.isArray(n)?new((0,h.overrideFromComposables)(...n)(p))(s,d,a):await n(p,s,d,a),(0,c.overrideCheck)(w,r.fdc3Version),w}connectSync(e,t){return this.wire.sendAction(\"interop-connect-sync\").catch((()=>{})),new a.InteropClient(this.wire,this.wire.environment.whenReady().then((()=>this.fin.InterApplicationBus.Channel.connect(`interop-broker-${e}`,{payload:t}))))}}return Ti.InteropModule=p,Ti}(),e),i(wr(),e),i(Vi(),e)}(Li)),Li}var br={},Ir={},Er={},xr={};Object.defineProperty(xr,\"__esModule\",{value:!0}),xr.getSnapshotSourceChannelName=void 0;xr.getSnapshotSourceChannelName=e=>`snapshot-source-provider-${e.uuid}`;var Ar,Pr,Mr,_r,Or,Sr=s&&s.__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},Rr=s&&s.__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)};Object.defineProperty(Er,\"__esModule\",{value:!0}),Er.SnapshotSource=void 0;const Fr=d,jr=xr,kr=new Map;class Lr extends Fr.Base{constructor(e,t){super(e),Ar.set(this,void 0),Pr.set(this,(()=>(kr.has(this.identity.uuid)||kr.set(this.identity.uuid,{eventFired:null,clientPromise:null}),kr.get(this.identity.uuid)))),Mr.set(this,(()=>(Rr(this,Pr,\"f\").call(this).clientPromise||(Rr(this,Pr,\"f\").call(this).clientPromise=Rr(this,_r,\"f\").call(this)),Rr(this,Pr,\"f\").call(this).clientPromise))),_r.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);try{Rr(this,Pr,\"f\").call(this).eventFired||await Rr(this,Or,\"f\").call(this);const t=await this.fin.InterApplicationBus.Channel.connect(e,{wait:!1});return t.onDisconnection((()=>{Rr(this,Pr,\"f\").call(this).clientPromise=null,Rr(this,Pr,\"f\").call(this).eventFired=null})),t}catch(e){throw Rr(this,Pr,\"f\").call(this).clientPromise=null,new Error(\"The targeted SnapshotSource is not currently initialized. Await this object's ready() method.\")}})),Or.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);let t,n;const i=new Promise(((e,i)=>{t=e,n=i}));Rr(this,Pr,\"f\").call(this).eventFired=i;const r=async i=>{try{i.channelName===e&&(t(),await this.fin.InterApplicationBus.Channel.removeListener(\"connected\",r))}catch(e){n(e)}};await this.fin.InterApplicationBus.Channel.on(\"connected\",r)})),Sr(this,Ar,t,\"f\")}get identity(){return Rr(this,Ar,\"f\")}async ready(){this.wire.sendAction(\"snapshot-source-ready\").catch((e=>{}));try{await Rr(this,Mr,\"f\").call(this)}catch(e){await Rr(this,Pr,\"f\").call(this).eventFired}}async getSnapshot(){this.wire.sendAction(\"snapshot-source-get-snapshot\").catch((e=>{}));const e=await Rr(this,Mr,\"f\").call(this),t=await e.dispatch(\"get-snapshot\");return(await t).snapshot}async applySnapshot(e){this.wire.sendAction(\"snapshot-source-apply-snapshot\").catch((e=>{}));return(await Rr(this,Mr,\"f\").call(this)).dispatch(\"apply-snapshot\",{snapshot:e})}}Er.SnapshotSource=Lr,Ar=new WeakMap,Pr=new WeakMap,Mr=new WeakMap,_r=new WeakMap,Or=new WeakMap,Object.defineProperty(Ir,\"__esModule\",{value:!0}),Ir.SnapshotSourceModule=void 0;const Tr=d,$r=Er,Br=xr;class Gr extends Tr.Base{async init(e){if(this.wire.sendAction(\"snapshot-source-init\").catch((e=>{})),\"object\"!=typeof e||\"function\"!=typeof e.getSnapshot||\"function\"!=typeof e.applySnapshot)throw new Error(\"you must pass in a valid SnapshotProvider\");const t=await this.fin.InterApplicationBus.Channel.create((0,Br.getSnapshotSourceChannelName)(this.fin.me));t.register(\"get-snapshot\",(async()=>({snapshot:await e.getSnapshot()}))),t.register(\"apply-snapshot\",(({snapshot:t})=>e.applySnapshot(t)))}wrapSync(e){return this.wire.sendAction(\"snapshot-source-wrap-sync\").catch((e=>{})),new $r.SnapshotSource(this.wire,e)}async wrap(e){return this.wire.sendAction(\"snapshot-source-wrap\").catch((e=>{})),this.wrapSync(e)}}Ir.SnapshotSourceModule=Gr,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Ir,e),n(Er,e)}(br),Object.defineProperty(a,\"__esModule\",{value:!0});var Wr=a.Fin=void 0;const Hr=t,Nr=c,Dr=ie(),Ur=Z(),Vr=de,zr=en,Kr=rn,qr=un,Jr=bn,Yr=J(),Zr=An,Qr=ki,Xr=Cr(),eo=br;class to extends Hr.EventEmitter{constructor(e){super(),this.wire=e,this.System=new Nr.System(e),this.Window=new Dr._WindowModule(e),this.Application=new Ur.ApplicationModule(e),this.InterApplicationBus=new Vr.InterApplicationBus(e),this.Clipboard=new zr.Clipboard(e),this.ExternalApplication=new Kr.ExternalApplicationModule(e),this.Frame=new qr._FrameModule(e),this.GlobalHotkey=new Jr.GlobalHotkey(e),this.Platform=new Zr.PlatformModule(e,this.InterApplicationBus.Channel),this.View=new Yr.ViewModule(e),this.Interop=new Xr.InteropModule(e),this.SnapshotSource=new eo.SnapshotSourceModule(e),e.registerFin(this),this.me=(0,Qr.getMe)(e),e.on(\"disconnected\",(()=>{this.emit(\"disconnected\")}))}}Wr=a.Fin=to;var no={},io={};function ro(e){return\"string\"==typeof e.manifestUrl}function oo(e){return ao(e)&&\"string\"==typeof e.address}function so(e){return oo(e)&&\"string\"==typeof e.token}function ao(e){return\"string\"==typeof e.uuid}function co(e){return e.runtime&&\"string\"==typeof e.runtime.version}function ho(e){return ao(e)&&co(e)}Object.defineProperty(io,\"__esModule\",{value:!0}),io.isInternalConnectConfig=io.isPortDiscoveryConfig=io.isNewConnectConfig=io.isConfigWithReceiver=io.isRemoteConfig=io.isExistingConnectConfig=io.isExternalConfig=void 0,io.isExternalConfig=ro,io.isExistingConnectConfig=oo,io.isRemoteConfig=so,io.isConfigWithReceiver=function(e){return\"object\"==typeof e.receiver&&so({...e,address:\"\"})},io.isNewConnectConfig=ho,io.isPortDiscoveryConfig=function(e){return ro(e)&&co(e)||ho(e)},io.isInternalConnectConfig=function(e){return oo(e)||ho(e)};var lo={},uo={};Object.defineProperty(uo,\"__esModule\",{value:!0}),uo.EmitterMap=void 0;const po=t;function wo(e){return Buffer.from(e).toString(\"base64\")}uo.EmitterMap=class{constructor(){this.storage=new Map}hashKeys(e){return e.map(wo).join(\"/\")}getOrCreate(e){const t=this.hashKeys(e);return this.storage.has(t)||this.storage.set(t,new po.EventEmitter),this.storage.get(t)}has(e){return this.storage.has(this.hashKeys(e))}delete(e){const t=this.hashKeys(e);return this.storage.delete(t)}},Object.defineProperty(lo,\"__esModule\",{value:!0});const yo=uo;class fo extends yo.EmitterMap{constructor(){super(...arguments),this.dispatchEvent=e=>{if(function(e){return\"process-desktop-event\"===e.action}(e)){const{payload:t}=e,n=function(e){const{topic:t}=e;if(\"frame\"===t||\"window\"===t||\"view\"===t){const{uuid:n,name:i}=e;return[t,n,i]}if(\"application\"===t){const{uuid:n}=e;return[t,n]}return[t]}(t);if(this.has(n))return this.getOrCreate(n).emit(t.type,t),!0}return!1}}}lo.default=fo;var go,mo,vo=s&&s.__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},Co=s&&s.__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)},bo=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(no,\"__esModule\",{value:!0});var Io=no.Transport=void 0;const Eo=t,xo=io,Ao=g,Po=bo(lo),Mo=ki,_o=ke;class Oo extends Eo.EventEmitter{constructor(e,t,n){super(),this.wireListeners=new Map,this.topicRefMap=new Map,this.eventAggregator=new Po.default,this.messageHandlers=[this.eventAggregator.dispatchEvent],go.set(this,void 0),mo.set(this,void 0),this.connectSync=()=>{Co(this,go,\"f\").connectSync()},this.getPort=()=>Co(this,go,\"f\").getPort(),vo(this,go,new e(this.onmessage.bind(this)),\"f\"),this.environment=t,this.sendRaw=Co(this,go,\"f\").send.bind(Co(this,go,\"f\")),this.registerMessageHandler(this.handleMessage.bind(this)),Co(this,go,\"f\").on(\"disconnected\",(()=>{for(const[,{handleNack:e}]of this.wireListeners)e({reason:\"Remote connection has closed\"});this.wireListeners.clear(),this.emit(\"disconnected\")}));const{uuid:i,name:r}=n,o=this.environment.getCurrentEntityType();this.me=(0,Mo.getBaseMe)(o,i,r)}getFin(){if(!Co(this,mo,\"f\"))throw new Error(\"No Fin object registered for this transport\");return Co(this,mo,\"f\")}registerFin(e){if(Co(this,mo,\"f\"))throw new Error(\"Fin object has already been registered for this transport\");vo(this,mo,e,\"f\")}shutdown(){return Co(this,go,\"f\").shutdown()}async connect(e){if((0,xo.isConfigWithReceiver)(e))return await Co(this,go,\"f\").connect(e.receiver),this.authorize(e);if((0,xo.isRemoteConfig)(e))return this.connectRemote(e);if((0,xo.isExistingConnectConfig)(e))return this.connectByPort(e);if((0,xo.isNewConnectConfig)(e)){const t=await this.environment.retrievePort(e);return this.connectByPort({...e,address:`ws://localhost:${t}`})}}async connectRemote(e){return await Co(this,go,\"f\").connect(new(this.environment.getWsConstructor())(e.address)),this.authorize(e)}async connectByPort(e){const{address:t,uuid:n}=e,i={...e,type:\"file-token\"},r=Co(this,go,\"f\");await r.connect(new(this.environment.getWsConstructor())(e.address));const o=await this.sendAction(\"request-external-authorization\",{uuid:n,type:\"file-token\"},!0);if(\"external-authorization-response\"!==o.action)throw new Ao.UnexpectedActionError(o.action);return await this.environment.writeToken(o.payload.file,o.payload.token),this.authorize(i)}async authorize(e){const t=await this.sendAction(\"request-authorization\",e,!0);if(\"authorization-response\"!==t.action)throw new Ao.UnexpectedActionError(t.action);if(!0!==t.payload.success)throw new Ao.RuntimeError(t.payload)}sendAction(e,t={},n=!1){let i=()=>{};const r=Ao.RuntimeError.getCallSite(1),o=this.environment.getNextMessageId(),s=new Promise(((s,a)=>{i=a;const c={action:e,payload:t,messageId:o},d=Co(this,go,\"f\");return this.addWireListener(o,s,(e=>this.nackHandler(e,a,r)),n),d.send(c).catch(a)}));return Object.assign(s,{cancel:i,messageId:o})}nackHandler(e,t,n){t(\"string\"==typeof e?e:new Ao.RuntimeError(e,n))}ferryAction(e){return new Promise(((t,n)=>{const i=this.environment.getNextMessageId();e.messageId=i;const r=e=>{t(e.payload)};return Co(this,go,\"f\").send(e).then((()=>this.addWireListener(i,r,(e=>this.nackHandler(e,n)),!1))).catch(n)}))}registerMessageHandler(e){this.messageHandlers.push(e)}addWireListener(e,t,n,i){i?this.uncorrelatedListener=t:this.wireListeners.has(e)?n({reason:\"Duplicate handler id\",error:(0,_o.errorToPOJO)(new Ao.DuplicateCorrelationError(String(e)))}):this.wireListeners.set(e,{resolve:t,handleNack:n})}onmessage(e){for(const t of this.messageHandlers)t.call(null,e)}handleMessage(e){const t=e.correlationId||NaN;if(\"correlationId\"in e){if(!this.wireListeners.has(t))return!1;{const{resolve:n,handleNack:i}=this.wireListeners.get(t);\"ack\"!==e.action?i({reason:\"Did not receive ack action\",error:(0,_o.errorToPOJO)(new Ao.NoAckError(e.action))}):\"payload\"in e?e.payload.success?n.call(null,e):i(e.payload):\"string\"==typeof e.reason?i(e):(console.warn(\"Received invalid response from core\",e),i({reason:\"invalid response shape\"})),this.wireListeners.delete(t)}}else this.uncorrelatedListener&&this.uncorrelatedListener.call(null,e),this.uncorrelatedListener=()=>{};return!0}}Io=no.Transport=Oo,go=new WeakMap,mo=new WeakMap;const So=(...e)=>({log:(...t)=>console.debug(`[${(new Date).toISOString()}]`,...(e=>e.map((e=>`[${e}]`)))(e),...t),getLogger:(...t)=>So(...e,...t)}),Ro=So(\"@openfin/core-web/client\");function Fo(e,t){if(!function(e){return\"string\"==typeof e}(e))throw new Error(`Property ${t} has invalid type. Expected string, got ${typeof e}.`)}const jo=\"web-broker-ports-ready\",ko=Ro.getLogger(\"get-web-interop-ports\");function Lo(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)}function To(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}\"function\"==typeof SuppressedError&&SuppressedError;const $o=e=>{var n,i,r;return r=class extends t.EventEmitter{constructor(t){super(),n.set(this,void 0),i.set(this,!1),this.connectSync=()=>{Lo(this,i,\"f\")||(e.addEventListener(\"message\",(e=>{e.data?.topic?.startsWith(\"wire-message\")&&e.data.message&&Lo(this,n,\"f\").call(this,{...JSON.parse(e.data.message),ports:e.ports})})),e.start())},this.connect=async()=>{this.connectSync()},this.send=t=>(e.postMessage({topic:\"wire-message\",message:JSON.stringify(t)}),Promise.resolve()),this.shutdown=async()=>{e.close()},To(this,n,t,\"f\")}getPort(){return e}},n=new WeakMap,i=new WeakMap,r};var Bo={},Go={};Object.defineProperty(Go,\"__esModule\",{value:!0}),Go.BaseEnvironment=void 0;const Wo=vr();Go.BaseEnvironment=class{async getViewWindowIdentity(e,t){const{identity:n}=await e.View.wrapSync(t).getCurrentWindow();return n}async getInteropInfo(e){const t=await e.Application.getCurrentSync().getInfo().catch((()=>null)),n=t?.initialOptions?.interopBrokerConfiguration??{};return{fdc3Version:t?(0,Wo.getDefaultViewFdc3VersionFromAppInfo)(t):void 0,...n,fdc3Info:{providerVersion:await e.System.getVersion(),provider:\"OpenFin\"}}}},Object.defineProperty(Bo,\"__esModule\",{value:!0});var Ho=Bo.BrowserEnvironment=void 0;const No=Go;class Do extends No.BaseEnvironment{constructor(){super(...arguments),this.type=\"other\",this.getRandomId=()=>{const e=new Uint32Array(1);return window.crypto.getRandomValues(e)[0].toString(32)}}getAdapterVersionSync(){return\"\"}observeBounds(e,t){throw new Error(\"Method not implemented.\")}layoutAllowedInContext(e){return!1}initLayoutManager(e,t,n){throw new Error(\"Method not implemented.\")}applyLayoutSnapshot(e,t,n){throw new Error(\"Method not implemented.\")}createLayout(e,t){throw new Error(\"Method not implemented.\")}destroyLayout(e,t){throw new Error(\"Method not implemented.\")}resolveLayout(e,t){throw new Error(\"Method not implemented.\")}initPlatform(...e){throw new Error(\"Method not implemented.\")}writeToken(e,t){return Promise.resolve(\"\")}retrievePort(e){throw new Error(\"Method not implemented.\")}getNextMessageId(){return this.getRandomId()}createChildContent(e){throw new Error(\"Method not implemented.\")}getWebWindow(e){throw new Error(\"Method not implemented.\")}getCurrentEntityIdentity(){throw new Error(\"Method not implemented.\")}getCurrentEntityType(){return\"external connection\"}raiseEvent(e,t){throw new Error(\"Method not implemented.\")}getUrl(){return location.href}getDefaultChannelOptions(){return{create:{},connect:{}}}getRtcPeer(){return new RTCPeerConnection}getWsConstructor(){return WebSocket}whenReady(){return Promise.resolve()}}Ho=Bo.BrowserEnvironment=Do;const Uo=e=>\"platform\"in e&&void 0!==e.platform;var Vo,zo;class Ko extends Ho{constructor(e){super(),this.connectConfig=e,Vo.set(this,void 0),zo.set(this,new W((async()=>Promise.resolve().then((function(){return require(\"./main-b14f67c9.js\")}))))),Uo(e)&&this.validatePlatformOptions(e)}getAdapterVersionSync(){return\"0.39.21\"}validatePlatformOptions({platform:e}){if(!(\"layoutSnapshot\"in e))throw new Error(\"Platform options are missing layoutSnapshot. Please provide a layoutSnapshot in the platform options.\");if(\"windows\"in e||\"windows\"in e.layoutSnapshot)throw new Error(\"It appears you tried to call connect() with a snapshot object from an OpenFin desktop environment. Note that connect() expects to be called with a platform property with this structure: { platform: { layoutSnapshot } }. To get a layoutSnapshot of the expected structure, use fin.Platform.Layout.getCurrentLayoutManagerSync().getLayoutSnapshot() in v34+ in your desktop environment.\");const{layouts:t}=e.layoutSnapshot;Object.entries(t).map((([e,t])=>{if(\"object\"!=typeof t||null===t)throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must be an object.`);if(!(\"content\"in t))throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must contain a 'content' property.`)}))}async getInteropInfo(e){return{...{contextGroups:void 0,logging:{beforeAction:{enabled:!1},afterAction:{enabled:!1}}},fdc3Version:void 0,fdc3Info:{providerVersion:\"0.39.21\",provider:\"OpenFin Web\"}}}layoutAllowedInContext(e){return!0}async initLayoutManager(e,t,n){if(Lo(this,Vo,\"f\"))throw new Error(\"Layout already initialized.\");if(!Uo(this.connectConfig))throw new Error(\"Platform options are missing from connection config.\");const{WebLayoutEntryPoint:i}=await Lo(this,zo,\"f\").getValue();return To(this,Vo,new i(this.connectConfig),\"f\"),await Lo(this,Vo,\"f\").initLayoutManager(e,t,n)}async applyLayoutSnapshot(e,t,n){Lo(this,Vo,\"f\")?.applyLayoutSnapshot(e,t,n)}async createLayout(e,t){return Lo(this,Vo,\"f\")?.createLayout(e,t)}async destroyLayout(e,t){return Lo(this,Vo,\"f\")?.destroyLayout(e,t)}async getViewWindowIdentity(e,t){return Promise.resolve({uuid:t.uuid,name:t.uuid})}}Vo=new WeakMap,zo=new WeakMap;const qo=()=>{const e=((e,t)=>{const n=new RegExp(`^${t}<(?.*)>$`).exec(e)?.groups?.meta;if(n)try{return JSON.parse(atob(n))}catch(e){throw new Error(`Failed to decode JSON from ${n}.`)}})(window.name,\"of-frame\");if(e)try{const{name:t,uuid:n,brokerUrl:i,providerId:r,contextGroup:o}=e;return Fo(i,\"brokerUrl\"),Fo(n,\"uuid\"),Fo(t,\"name\"),{identity:{name:t,uuid:n},brokerUrl:i,interopConfig:{providerId:r,currentContextGroup:o}}}catch(e){throw new Error(`Unexpected error occurred when inferring platform information: ${e.stack}`)}},Jo=()=>{const e=r.v4();return{uuid:e,name:e}},Yo=async e=>{if(\"enabled\"===e.connectionInheritance){const t=await(async e=>{const t=qo();if(t){const{validateOptions:n=(()=>!0)}=e,{identity:i,...r}=t;if(!await n(r))throw new Error(\"Parent options were rejected by validateOptions.\");return t}})(e);if(t)return t}if(!e.options){const t=\"enabled\"===e.connectionInheritance?\"Broker URL was not specified nor provided by a platform container.\":\"Connection inheritance is disabled but no options were provided.\";throw new Error(t)}return{...e.options,identity:Jo()}};exports.__classPrivateFieldGet=Lo,exports.__classPrivateFieldSet=To,exports.apiExposer=Gn,exports.commonjsGlobal=s,exports.connect=async t=>{try{Ro.log(\"Establishing connection\",t);const{brokerUrl:n,identity:i,timeout:r,interopConfig:s}=await Yo(t),{workerPort:a,iframeBrokerPort:c}=await(async(e,t,n)=>{const{origin:i}=new URL(e),r=document.createElement(\"IFRAME\");let s;r.style.display=\"none\";try{return await new Promise(((a,c)=>{const d=e=>{if(e.source===r.contentWindow&&e.data?.topic===`ack-${jo}`){if(e.origin!==i)c(new Error(`Broker redirected to unexpected origin ${e.origin}, expected ${i}.`));else if(e.data.success){const[t,n]=e.ports;a({iframeBrokerPort:t,workerPort:n})}else c(new m(e.data));window.removeEventListener(\"message\",d),clearTimeout(s)}};window.addEventListener(\"message\",d),ko.log(`Connecting to broker ${e}`),r.setAttribute(\"src\",e),r.setAttribute(\"name\",o(t,\"of-broker\")),document.body.appendChild(r),ko.log(\"Iframe loaded, awaiting init message from iframe\"),n&&(s=setTimeout((()=>{window.removeEventListener(\"message\",d),document.body.removeChild(r),c(new Error(\"Worker did not initialize in time\"))}),n))}))}catch(e){throw new Error(`Failed to initialise Fin Web Client. ${e.message}`,{cause:e})}})(n,i,r);Ro.log(\"Successfully established connection to shared worker\");const d={entityType:\"external connection\",...i};a.start(),c.start();const h=((t,n,i)=>{const r=$o(n),o=new Ko(t),s=new Io(r,o,i);return s.connectSync(),window.Buffer=e.Buffer,new Wr(s)})(t,a,d);return s?.providerId&&(h.me.interop=h.Interop.connectSync(s.providerId),s?.currentContextGroup&&h.me.interop.joinContextGroup(s.currentContextGroup).catch((e=>{console.warn(`Error joining specified context group: ${s?.currentContextGroup}, continuing`,e)}))),{...h,me:{...h.me,identity:{uuid:h.me.uuid,name:h.me.name}}}}catch(e){throw new Error(`An error occured during web-interop connection: ${e.message}`)}},exports.decorators=Nn,exports.encodeOptions=o,exports.layout_constants=ai,exports.lazy=G;\n","\"use strict\";var t=require(\"./main-8cad4070.js\"),e=require(\"uuid\");require(\"buffer/\"),require(\"events\"),require(\"lodash/cloneDeep\"),require(\"lodash/isEqual\");var i={},n={};Object.defineProperty(n,\"__esModule\",{value:!0}),n.mapValuesAsync=n.mapEntriesAsync=void 0;const o=(t,[e,i])=>({...t,[e]:i});async function s(t,e){return(await Promise.all(e.map((async([e,i])=>[e,await t(i,e)])))).reduce(o,{})}n.mapEntriesAsync=s,n.mapValuesAsync=async function(t,e){let i;return i=e instanceof Map?[...e.entries()]:Object.entries(e),s(t,i)};var r,a,l,h,d=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldSet||function(t,e,i,n,o){if(\"m\"===n)throw new TypeError(\"Private method is not writable\");if(\"a\"===n&&!o)throw new TypeError(\"Private accessor was defined without a setter\");if(\"function\"==typeof e?t!==e||!o:!e.has(t))throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");return\"a\"===n?o.call(t,i):o?o.value=i:e.set(t,i),i},c=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldGet||function(t,e,i,n){if(\"a\"===i&&!n)throw new TypeError(\"Private accessor was defined without a getter\");if(\"function\"==typeof e?t!==e||!n:!e.has(t))throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");return\"m\"===i?n:\"a\"===i?n.call(t):n?n.value:e.get(t)};Object.defineProperty(i,\"__esModule\",{value:!0});var m=i.DefaultLayoutManager=void 0;const u=n;class p{constructor(t){a.set(this,void 0),l.set(this,new Map),d(this,a,t,\"f\")}size(){return c(this,l,\"f\").size}async applyLayoutSnapshot({layouts:t}){if(Object.keys(t).length>1)throw new Error(\"[LayoutManager] Tried to call applyLayoutSnapshot with more than 1 layout. When implementing multiple layouts via overridden LayoutManager class, you must override and fully implement the applyLayoutSnapshot method without calling super.applyLayoutSnapshot().\");const[[e,i]]=Object.entries(t);await p.createLayout(this,{layoutName:e,layout:i})}async showLayout({layoutName:t}){}async getLayoutSnapshot(){return{layouts:await(0,u.mapValuesAsync)((t=>t.getFrameSnapshot()),c(this,l,\"f\"))}}async removeLayout({layoutName:t}){}getLayoutIdentityForView(t){const e=[...c(this,l,\"f\").values()].find((e=>e.getCurrentViews().some((e=>e.name===t.name&&e.uuid===t.uuid))));return e?.identity??void 0}isLayoutVisible({layoutName:t}){return c(p,r,\"m\",h).call(p,this,t).isVisible()}resolveLayoutIdentity(t){if(t&&\"layoutName\"in t)return t;const e=[...c(this,l,\"f\").values()];if(1===e.length)return e[0].identity;const i=e.find((t=>t.isVisible()));return i?.identity??void 0}static async resolveLayout(t,e){const i=t.resolveLayoutIdentity(e);if(void 0===i||!(\"layoutName\"in i))throw new Error(\"[layout-manager] resolveLayout: Could not resolve the layout identity. Make sure you include 'layoutName' in the identity object.\");return c(p,r,\"m\",h).call(p,t,i.layoutName)}static async handleSharedView(t,e,i){await(0,u.mapValuesAsync)((async t=>{if(t.identity.layoutName!==e.layoutName){const e=t.getCurrentViews().find((t=>t.name===i.name));e&&await t.onViewDetached({viewIdentity:e,target:null}).catch(console.error)}}),c(t,l,\"f\"))}static async handleLastViewRemoved(t,e){await t.removeLayout(e),await c(t,a,\"f\").handleLastViewRemoved(t)}static async destroyLayout(t,{layoutName:e}){await c(p,r,\"m\",h).call(p,t,e).destroy(),c(t,l,\"f\").delete(e)}static async createLayout(t,e){const{layoutName:i}=e;if(c(t,l,\"f\").has(i))throw new Error(`Layout name ${i} already exists`);await c(t,a,\"f\").createLayout(e,t)}static registerLayout(t,e,i){c(t,l,\"f\").set(e,i)}static getAllLayouts(t){return[...c(t,l,\"f\").values()]}static setInitialSnapshot(t,e){c(t,a,\"f\").setInitialSnapshot(e)}static createClosedConstructor(...t){return class extends p{constructor(){super(...t)}}}}m=i.DefaultLayoutManager=p,r=p,a=new WeakMap,l=new WeakMap,h=function(t,e){const i=c(t,l,\"f\").get(e);if(!i)throw new Error(`[layout-manager] getLayoutByName: Could not locate layout with name '${e}'`);return i};var g={},f={},v={};Object.defineProperty(v,\"__esModule\",{value:!0}),v.ReversibleMap=void 0;v.ReversibleMap=class{constructor(){this.valueToKey=new Map,this.keyToValue=new Map,this.setUnique=(t,e)=>{if(this.hasKey(t)||this.hasValue(e))throw new Error(\"Key or value already in the map.\");this.keyToValue.set(t,e),this.valueToKey.set(e,t)},this.getKey=t=>{const e=this.valueToKey.get(t);if(!e)throw new Error(\"Value not found in the map.\");return e},this.deleteKey=t=>{const e=this.getValue(t);return this.keyToValue.delete(t),this.valueToKey.delete(e),e},this.deleteValue=t=>{const e=this.getKey(t);return this.keyToValue.delete(e),this.valueToKey.delete(t),e},this.hasKey=t=>this.keyToValue.has(t),this.hasValue=t=>this.valueToKey.has(t)}getValue(t){const e=this.keyToValue.get(t);if(!e)throw new Error(\"Key not found in the map.\");return e}},Object.defineProperty(f,\"__esModule\",{value:!0});var _=f.LayoutContentCache=void 0;const y=t.lazy,C=v;class w{constructor(){this.contentItemCache=new C.ReversibleMap,this.contentItemCacheId=0,this.createCacheKey=()=>{const t=`entity-${this.contentItemCacheId.toString()}`;return this.contentItemCacheId+=1,t},this.hasKey=t=>this.contentItemCache.hasKey(t),this.getItemOrUndefined=t=>{try{return this.getContentItemOrThrow(t)}catch(t){return}},this.getContentItemOrThrow=(t,e)=>{if(!this.contentItemCache.hasKey(t))throw new Error(\"Layout component has been destroyed or detached from the current layout.\");const i=this.contentItemCache.getValue(t);if(e&&!e.includes(i.type))throw new Error(`Layout item is not the expected type. Expected ${e.join(\", \")}, got ${i.type}.`);return i},this.getOrCreateEntityId=t=>{if(this.contentItemCache.hasValue(t))return this.contentItemCache.getKey(t);t.onDestroyed((()=>{this.contentItemCache.deleteValue(t)}));const e=this.createCacheKey();return this.contentItemCache.setUnique(e,t),e}}static getSingleInstance(){return w.singleton.getValue()}}_=f.LayoutContentCache=w,w.singleton=new y.Lazy((()=>new w));var I={},b={};!function(t){Object.defineProperty(t,\"__esModule\",{value:!0}),t.getAdjacentStacks=t.doShareEdge=t.getAdjacentItem=void 0;t.getAdjacentItem=(e,i)=>{const{parent:n}=e;if(e.isRoot()||!n)return;const o=[\"top\",\"bottom\"].includes(i)?\"column\":\"row\",s=[\"top\",\"left\"].includes(i)?-1:1;if(n.type===o){const t=n.contentItems.indexOf(e)+s;if(t>=0&&t{const n=t.getBounds(),o=e.getBounds();if(!n||!o)return!1;if([\"top\",\"bottom\"].includes(i)){return!(n.righto.right)}return!(n.bottomo.bottom)};t.getAdjacentStacks=(e,i)=>{const n=[\"top\",\"bottom\"].includes(i)?\"row\":\"column\",o=s=>\"stack\"===s.type?(0,t.doShareEdge)(e,s,i)?[s]:[]:\"root\"===s.type||\"ground\"===s.type?[]:s.type===n?s.contentItems.map((t=>o(t))).flat():s.type!==n?[\"top\",\"right\"].includes(i)?o(s.contentItems[s.contentItems.length-1]):o(s.contentItems[0]):[],s=(0,t.getAdjacentItem)(e,i);return s?o(s):[]}}(b);var S=t.commonjsGlobal&&t.commonjsGlobal.__decorate||function(t,e,i,n){var o,s=arguments.length,r=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if(\"object\"==typeof Reflect&&\"function\"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(s<3?o(r):s>3?o(e,i,r):o(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};Object.defineProperty(I,\"__esModule\",{value:!0}),I.LayoutEntitiesController=void 0;const E=t.decorators,x=b,L=i;class z{constructor(t,e,i){this.wire=t,this.layoutManager=e,this.layoutContentCache=i,this.analytics=t=>{this.wire.sendAction(`layout-controller-${t}`).catch((()=>{}))},this.getLayoutIdentityForViewOrThrow=async t=>{const e=this.layoutManager.getLayoutIdentityForView(t);if(!e)throw new Error(`View identity ${t.name} is not attached to any layouts.`);return e},this.getRoot=async t=>{this.analytics(\"get-root\");const e=(await this.getLayout(t)).getRoot();return{type:e.type,entityId:this.layoutContentCache.getOrCreateEntityId(e)}},this.getStackByView=async t=>{this.analytics(\"get-stack-by-view\");const e=await this.getLayoutIdentityForViewOrThrow(t),i=(await this.getLayout(e)).getStackByView(t);if(\"stack\"===i?.type)return{entityId:this.layoutContentCache.getOrCreateEntityId(i),type:\"stack\"}},this.getStackViews=t=>{this.analytics(\"get-stack-views\");return this.layoutContentCache.getContentItemOrThrow(t,[\"stack\"]).contentItems.map((t=>({name:t.viewName,uuid:this.wire.me.uuid})))},this.isRoot=t=>{this.analytics(\"is-root\");return this.layoutContentCache.getContentItemOrThrow(t).isRoot()},this.exists=t=>(this.analytics(\"exists\"),this.layoutContentCache.hasKey(t)),this.addViewToStack=async(t,e,{index:i}={index:0})=>{this.analytics(\"add-view-to-stack\");const n=this.layoutContentCache.getContentItemOrThrow(t);if(i&&i>n.contentItems.length+1)throw new Error(`Index '${i}' out of range, please exclude the index or specify a number between 0 and ${n.contentItems.length}`);const o={id:t,index:i},{identity:s}=await n.layout.platformCreateView(e,{location:o});return s},this.findViewInStack=(t,e)=>t.contentItems.find((t=>t.viewName===e.name)),this.removeViewFromStack=async(t,e)=>{this.analytics(\"remove-view-from-stack\");const i=this.layoutContentCache.getContentItemOrThrow(t,[\"stack\"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to remove a view ('${e.name}') which does not belong to the stack.`);await n.layout.platformCloseView(e)},this.createAdjacentStack=async(t,e,{position:i=\"right\"}={})=>{if(this.analytics(\"create-adjacent-stack\"),!Array.isArray(e)||0===e.length)throw new Error('The parameter \"views\" must be an array with at least 1 element.');if(![\"top\",\"bottom\",\"left\",\"right\"].includes(i))throw new Error(`Invalid position '${i}' specified.`);const n=this.layoutContentCache.getContentItemOrThrow(t).createAdjacentStack({position:i}),o=this.layoutContentCache.getOrCreateEntityId(n);return await Promise.all(e.reverse().map((t=>this.addViewToStack(o,t)))),o},this.getAdjacentStacks=async({targetId:t,edge:e})=>{this.analytics(\"get-adjacent-stacks\");const i=this.layoutContentCache.getContentItemOrThrow(t);return(0,x.getAdjacentStacks)(i,e).map((t=>({entityId:this.layoutContentCache.getOrCreateEntityId(t)})))},this.setStackActiveView=async(t,e)=>{this.analytics(\"set-stack-active-view\");const i=this.layoutContentCache.getContentItemOrThrow(t,[\"stack\"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to set a view ('${e.name}') as active when it does not belong to the stack.`);i.setActiveContentItem(n,!0)}}async getLayout(t){const e=await L.DefaultLayoutManager.resolveLayout(this.layoutManager,t);if(!e)throw new Error(`Could not resolve target layout identity ${JSON.stringify(t)}`);return e}getContent(t){this.analytics(\"get-content\");return this.layoutContentCache.getContentItemOrThrow(t,[\"column\",\"row\"]).contentItems.map((t=>({type:t.type,entityId:this.layoutContentCache.getOrCreateEntityId(t)})))}getParent(t){this.analytics(\"get-parent\");const e=this.layoutContentCache.getContentItemOrThrow(t);if(!e.isRoot())return e.parent?.contentItems.includes(e)?{type:e.parent.type,entityId:this.layoutContentCache.getOrCreateEntityId(e.parent)}:void 0}}S([(0,E.expose)()],z.prototype,\"getLayoutIdentityForViewOrThrow\",void 0),S([(0,E.expose)()],z.prototype,\"getRoot\",void 0),S([(0,E.expose)()],z.prototype,\"getStackByView\",void 0),S([(0,E.expose)()],z.prototype,\"getStackViews\",void 0),S([(0,E.expose)()],z.prototype,\"getContent\",null),S([(0,E.expose)()],z.prototype,\"getParent\",null),S([(0,E.expose)()],z.prototype,\"isRoot\",void 0),S([(0,E.expose)()],z.prototype,\"exists\",void 0),S([(0,E.expose)()],z.prototype,\"addViewToStack\",void 0),S([(0,E.expose)()],z.prototype,\"removeViewFromStack\",void 0),S([(0,E.expose)()],z.prototype,\"createAdjacentStack\",void 0),S([(0,E.expose)()],z.prototype,\"getAdjacentStacks\",void 0),S([(0,E.expose)()],z.prototype,\"setStackActiveView\",void 0),I.LayoutEntitiesController=z,Object.defineProperty(g,\"__esModule\",{value:!0});var M=g.initLayoutEndpoints=void 0;const P=t.apiExposer,T=t.layout_constants,A=f,k=I,D=i;M=g.initLayoutEndpoints=async function(t,e){const i=t.getFin(),n=await i.Platform.getCurrentSync().getClient(),o=new P.ChannelsExposer(n);await new P.ApiExposer(o).exposeInstance(new k.LayoutEntitiesController(t,e,A.LayoutContentCache.getSingleInstance()),{id:T.LAYOUT_CONTROLLER_ID}),await async function(t,e){const i=t=>async i=>{const n=await D.DefaultLayoutManager.resolveLayout(e,i.target);if(!n)throw new Error(`Could not resolve the layout target from payload ${JSON.stringify(i)}`);return t(n,i)},n=(e,n)=>{t.register(e,i(n))},o=(t,e)=>{n(t,e)};n(\"replace-view\",((t,e)=>t.replaceView(e))),n(\"replace-layout\",((t,{layout:e})=>t.replaceLayout(e))),n(\"add-view\",((t,e)=>t.insertView(e))),o(\"layout-add-view\",((t,{viewOptions:e,location:i,targetView:n})=>t.platformCreateView(e,{location:i,targetView:n}))),n(\"close-view\",((t,e)=>t.cleanupView(e.viewIdentity))),o(\"layout-close-view\",((t,e)=>t.platformCloseView(e.viewIdentity))),n(\"apply-preset-layout\",((t,e)=>t.applyPreset(e))),n(\"get-layout-views\",(t=>t.getCurrentViews())),n(\"get-frame-snapshot\",(t=>t.getFrameSnapshot())),n(\"is-visible\",(t=>t.isVisible())),n(\"destroy\",(t=>t.destroy())),t.register(\"get-layout-snapshot\",(()=>e.getLayoutSnapshot()))}(n,e)};var R={};Object.defineProperty(R,\"__esModule\",{value:!0});var U=R.BaseLayout=void 0;U=R.BaseLayout=class{};var O={};Object.defineProperty(O,\"__esModule\",{value:!0});var V=O.DOMEmitter=void 0;V=O.DOMEmitter=class{constructor(t){this.container=t}dispatchLocalEvent(t,e){const i={...e,type:t,tabSelector:`tab-${e.name}`,containerSelector:`container-${e.name}`,topic:\"openfin-DOM-event\"};this.container.dispatchEvent(new CustomEvent(t,{detail:i}))}};var B={};Object.defineProperty(B,\"__esModule\",{value:!0});var H=B.mapLayoutContentItemsImmutableSync=B.mapLayoutContentItemsImmutable=W=B.isVisible=void 0;var W=B.isVisible=t=>(0!==t.offsetWidth||0!==t.offsetHeight)&&\"hidden\"!==window.getComputedStyle(t).visibility&&t.offsetTop>=0&&t.offsetLeft>=0&&t.offsetTop<=window.innerHeight&&t.offsetLeft<=window.innerWidth;const F=t=>\"type\"in t&&\"component\"===t.type;B.mapLayoutContentItemsImmutable=async function t(e,i){return F(i)?e(i):{...i,content:await Promise.all(i.content?.map((i=>t(e,i))))}},H=B.mapLayoutContentItemsImmutableSync=function t(e,i){return F(i)?e(i):{...i,content:i.content?.map((i=>t(e,i)))}};class N extends Error{constructor(t,e){super(e),this.type=t}}class G extends N{constructor(t,e){super(\"Configuration\",t),this.node=e}}class j extends N{constructor(t){super(\"PopoutBlocked\",t)}}class $ extends N{constructor(t){super(\"API\",t)}}class Z extends N{constructor(t){super(\"Bind\",t)}}class q extends Error{constructor(t,e,i){super(`${t}: ${e}${void 0===i?\"\":\": \"+i}`)}}class X extends q{constructor(t,e){super(\"Assert\",t,e)}}class Y extends q{constructor(t,e,i){super(\"UnreachableCase\",t,`${e}${void 0===i?\"\":\": \"+i}`)}}class K extends q{constructor(t,e){super(\"UnexpectedNull\",t,e)}}class J extends q{constructor(t,e){super(\"UnexpectedUndefined\",t,e)}}var Q;!function(t){let e=!1;const i={PopoutCannotBeCreatedWithGroundItemConfig:{id:0,default:\"Popout cannot be created with ground ItemConfig\"},PleaseRegisterAConstructorFunction:{id:1,default:\"Please register a constructor function\"},ComponentTypeNotRegisteredAndBindComponentEventHandlerNotAssigned:{id:2,default:\"Component type not registered and BindComponentEvent handler not assigned\"},ComponentIsAlreadyRegistered:{id:3,default:\"Component is already registered\"},ComponentIsNotVirtuable:{id:4,default:\"Component is not virtuable. Requires rootHtmlElement field/getter\"},VirtualComponentDoesNotHaveRootHtmlElement:{id:5,default:'Virtual component does not have getter \"rootHtmlElement\"'},ItemConfigIsNotTypeComponent:{id:6,default:\"ItemConfig is not of type component\"},InvalidNumberPartInSizeString:{id:7,default:\"Invalid number part in size string\"},UnknownUnitInSizeString:{id:8,default:\"Unknown unit in size string\"},UnsupportedUnitInSizeString:{id:9,default:\"Unsupported unit in size string\"}};t.idCount=Object.keys(i).length;const n=Object.values(i);t.checkInitialise=function(){if(!e)for(let e=0;e=\"0\"&&t<=\"9\"}function Tt(t,e){const i=zt(e);t.style.width=i}function At(t,e){const i=zt(e);t.style.height=i}function kt(t){return{width:t.offsetWidth,height:t.offsetHeight}}function Dt(t,e){t.style.display=e?\"\":\"none\"}function Rt(t,e){if(void 0!==e)for(const i in e)if(e.hasOwnProperty(i)){const n=e[i],o=t[i];t[i]=Ut(o,n)}return t}function Ut(t,e){if(\"object\"!=typeof e)return e;if(Array.isArray(e)){const t=e.length,i=new Array(t);for(let n=0;n36)throw new Error(\"Too many keys in config minifier map\")},t.translateObject=n}(dt||(dt={})),function(t){t.defaults={type:at.ground,content:[],size:1,sizeUnit:ht.Fractional,minSize:void 0,minSizeUnit:ht.Pixel,id:\"\",isClosable:!0},t.createCopy=function(t,e){switch(t.type){case at.ground:case at.row:case at.column:return gt.createCopy(t,e);case at.stack:return ut.createCopy(t,e);case at.component:return pt.createCopy(t);default:throw new Y(\"CICC91354\",t.type,\"Invalid Config Item type specified\")}},t.createDefault=function(t){switch(t){case at.ground:throw new X(\"CICCDR91562\");case at.row:case at.column:return gt.createDefault(t);case at.stack:return ut.createDefault();case at.component:return pt.createDefault();default:throw new Y(\"CICCDD91563\",t,\"Invalid Config Item type specified\")}},t.isComponentItem=function(t){return t.type===at.component},t.isStackItem=function(t){return t.type===at.stack},t.isGroundItem=function(t){return t.type===at.ground}}(ct||(ct={})),function(t){t.defaultMaximised=!1,function(t){t.createCopy=function(t,e){return void 0===t?void 0:{show:null!=e?e:t.show,popout:t.popout,close:t.close,maximise:t.maximise,minimise:t.minimise,tabDropdown:t.tabDropdown}}}(t.Header||(t.Header={}))}(mt||(mt={})),function(t){function e(t){const e=t.length,i=new Array(e);for(let n=0;n\"__glMaximised\"===t));t>0&&(o=!0,n=n.splice(t,1)),e=n.length>0?n[0]:ct.defaults.id}else e=n;return i=void 0!==t.maximised?t.maximised:o,{id:e,maximised:i}}}(wt||(wt={})),function(t){function e(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0;return{resolved:!0,root:Et.resolve(i),openPopouts:t.resolveOpenPopouts(e.openPopouts),dimensions:t.Dimensions.resolve(e.dimensions),settings:t.Settings.resolve(e.settings),header:t.Header.resolve(e.header,e.settings,e.labels)}}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:Lt.fromResolvedArray(e.openPopouts),settings:_t.Settings.createCopy(e.settings),dimensions:t.Dimensions.fromResolved(e.dimensions),header:_t.Header.createCopy(e.header)}},t.isResolved=function(t){const e=t;return void 0!==e.resolved&&!0===e.resolved},t.resolveOpenPopouts=function(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0,{root:Et.resolve(o),openPopouts:xt.resolveOpenPopouts(e.openPopouts),dimensions:xt.Dimensions.resolve(e.dimensions),settings:xt.Settings.resolve(e.settings),header:xt.Header.resolve(e.header,e.settings,e.labels),parentId:null!==(i=e.parentId)&&void 0!==i?i:null,indexInParent:null!==(n=e.indexInParent)&&void 0!==n?n:null,window:t.Window.resolve(e.window,e.dimensions),resolved:!0}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:i(e.openPopouts),dimensions:xt.Dimensions.fromResolved(e.dimensions),settings:_t.Settings.createCopy(e.settings),header:_t.Header.createCopy(e.header),parentId:e.parentId,indexInParent:e.indexInParent,window:t.Window.fromResolved(e.window)}},t.fromResolvedArray=i}(Lt||(Lt={}));class Wt{constructor(){this._allEventSubscriptions=[],this._subscriptionsMap=new Map,this.unbind=this.removeEventListener,this.trigger=this.emit}tryBubbleEvent(t,e){}emit(t,...e){let i=this._subscriptionsMap.get(t);if(void 0!==i){i=i.slice();for(let t=0;t0){const n=e.slice();n.unshift(t);const o=this._allEventSubscriptions.slice();for(let t=0;t0?n.contentItems[0]:n,e=0);const o=this._layoutManager.createAndInitContentItem(i,t);t.addChild(o,e),this._layoutManager.layoutConfig.settings.popInOnClose?this._onClose():this.close()}createWindow(){const t=this.createUrl(),e=Math.floor(1e6*Math.random()).toString(36),i=this.serializeWindowFeatures({width:this._initialWindowSize.width,height:this._initialWindowSize.height,innerWidth:this._initialWindowSize.width,innerHeight:this._initialWindowSize.height,menubar:\"no\",toolbar:\"no\",location:\"no\",personalbar:\"no\",resizable:\"yes\",scrollbars:\"no\",status:\"no\"});if(this._popoutWindow=globalThis.open(t,e,i),this._popoutWindow)this._popoutWindow.addEventListener(\"load\",(()=>this.positionWindow()),{passive:!0}),this._popoutWindow.addEventListener(\"beforeunload\",(()=>{this._layoutManager.layoutConfig.settings.popInOnClose?this.popIn():this._onClose()}),{passive:!0}),this._checkReadyInterval=setInterval((()=>this.checkReady()),10);else if(!0===this._layoutManager.layoutConfig.settings.blockedPopoutsThrowError){throw new j(\"Popout blocked\")}}checkReady(){if(null===this._popoutWindow)throw new K(\"BPCR01844\");this._popoutWindow.__glInstance&&this._popoutWindow.__glInstance.isInitialised&&(this.onInitialised(),void 0!==this._checkReadyInterval&&(clearInterval(this._checkReadyInterval),this._checkReadyInterval=void 0))}serializeWindowFeatures(t){const e=[];for(const i in t)e.push(i+\"=\"+t[i].toString());return e.join(\",\")}createUrl(){const t=\"gl-window-config-\"+Ot(),e=_t.minifyConfig(this._config);try{localStorage.setItem(t,JSON.stringify(e))}catch(t){throw new Error(\"Error while writing to localStorage \"+function(t){return t instanceof Error?t.message:\"string\"==typeof t?t:\"Unknown Error\"}(t))}const i=new URL(location.href);return i.searchParams.set(\"gl-window\",t),i.toString()}positionWindow(){if(null===this._popoutWindow)throw new Error(\"BrowserPopout.positionWindow: null popoutWindow\");this._popoutWindow.moveTo(this._initialWindowSize.left,this._initialWindowSize.top),this._popoutWindow.focus()}onInitialised(){this._isInitialised=!0,this.getGlInstance().on(\"popIn\",(()=>this.popIn())),this.emit(\"initialised\")}_onClose(){setTimeout((()=>this.emit(\"closed\")),50)}}class Gt extends Wt{constructor(t,e,i,n){super(),this.layoutManager=t,this._parent=i,this._element=n,this._popInParentIds=[],this._type=e.type,this._id=e.id,this._isInitialised=!1,this.isGround=!1,this.isRow=!1,this.isColumn=!1,this.isStack=!1,this.isComponent=!1,this.size=e.size,this.sizeUnit=e.sizeUnit,this.minSize=e.minSize,this.minSizeUnit=e.minSizeUnit,this._isClosable=e.isClosable,this._pendingEventPropagations={},this._throttledEvents=[\"stateChanged\"],this._contentItems=this.createContentItems(e.content)}get type(){return this._type}get id(){return this._id}set id(t){this._id=t}get popInParentIds(){return this._popInParentIds}get parent(){return this._parent}get contentItems(){return this._contentItems}get isClosable(){return this._isClosable}get element(){return this._element}get isInitialised(){return this._isInitialised}static isStack(t){return t.isStack}static isComponentItem(t){return t.isComponent}static isComponentParentableItem(t){return t.isStack||t.isGround}removeChild(t,e=!1){const i=this._contentItems.indexOf(t);if(-1===i)throw new Error(\"Can't remove child item. Unknown content item\");if(e||this._contentItems[i].destroy(),this._contentItems.splice(i,1),this._contentItems.length>0)this.updateSize(!1);else if(!this.isGround&&!0===this._isClosable){if(null===this._parent)throw new K(\"CIUC00874\");this._parent.removeChild(this)}}addChild(t,e,i){return null!=e||(e=this._contentItems.length),this._contentItems.splice(e,0,t),t.setParent(this),!0===this._isInitialised&&!1===t._isInitialised&&t.init(),e}replaceChild(t,e,i=!1){const n=this._contentItems.indexOf(t),o=t._element.parentNode;if(-1===n)throw new X(\"CIRCI23232\",\"Can't replace child. oldChild is not child of this\");if(null===o)throw new K(\"CIRCP23232\");if(o.replaceChild(e._element,t._element),!0===i&&(t._parent=null,t.destroy()),this._contentItems[n]=e,e.setParent(this),e.size=t.size,e.sizeUnit=t.sizeUnit,e.minSize=t.minSize,e.minSizeUnit=t.minSizeUnit,null===e._parent)throw new K(\"CIRCNC45699\");!0===e._parent._isInitialised&&!1===e._isInitialised&&e.init(),this.updateSize(!1)}remove(){if(null===this._parent)throw new K(\"CIR11110\");this._parent.removeChild(this)}popout(){const t=Ot(),e=this.layoutManager.createPopoutFromContentItem(this,void 0,t,void 0);return this.emitBaseBubblingEvent(\"stateChanged\"),e}calculateConfigContent(){const t=this._contentItems,e=t.length,i=new Array(e);for(let n=0;nthis.propagateEventToLayoutManager(t,e))))}propagateEventToLayoutManager(t,e){this._pendingEventPropagations[t]=!1,this.layoutManager.emitUnknown(t,e)}}class jt extends Gt{constructor(t,e,i){super(t,e,i,document.createElement(\"div\")),this._parentItem=i,this._focused=!1,this.isComponent=!0,this._reorderEnabled=e.reorderEnabled,this.applyUpdatableConfig(e),this._initialWantMaximise=e.maximised;const n=document.createElement(\"div\");n.classList.add(\"lm_content\"),this.element.appendChild(n),this._container=new Ft(e,this,t,n,(t=>this.handleUpdateItemConfigEvent(t)),(()=>this.show()),(()=>this.hide()),(t=>this.focus(t)),(t=>this.blur(t)))}get componentName(){return this._container.componentType}get componentType(){return this._container.componentType}get reorderEnabled(){return this._reorderEnabled}get initialWantMaximise(){return this._initialWantMaximise}get component(){return this._container.component}get container(){return this._container}get parentItem(){return this._parentItem}get headerConfig(){return this._headerConfig}get title(){return this._title}get tab(){return this._tab}get focused(){return this._focused}destroy(){this._container.destroy(),super.destroy()}applyUpdatableConfig(t){this.setTitle(t.title),this._headerConfig=t.header}toConfig(){const t=this._container.stateRequestEvent,e=void 0===t?this._container.state:t();return{type:at.component,content:[],size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,maximised:!1,isClosable:this.isClosable,reorderEnabled:this._reorderEnabled,title:this._title,header:mt.Header.createCopy(this._headerConfig),componentType:pt.copyComponentType(this.componentType),componentState:e}}close(){if(null===this.parent)throw new K(\"CIC68883\");this.parent.removeChild(this,!1)}enterDragMode(t,e){Tt(this.element,t),At(this.element,e),this._container.enterDragMode(t,e)}exitDragMode(){this._container.exitDragMode()}enterStackMaximised(){this._container.enterStackMaximised()}exitStackMaximised(){this._container.exitStackMaximised()}drag(){this._container.drag()}updateSize(t){this.updateNodeSize(t)}init(){this.updateNodeSize(!1),super.init(),this._container.emit(\"open\"),this.initContentItems()}setTitle(t){this._title=t,this.emit(\"titleChanged\",t),this.emit(\"stateChanged\")}setTab(t){this._tab=t,this.emit(\"tab\",t),this._container.setTab(t)}hide(){super.hide(),this._container.setVisibility(!1)}show(){super.show(),this._container.setVisibility(!0)}focus(t=!1){this.parentItem.setActiveComponentItem(this,!0,t)}setFocused(t){this._focused=!0,this.tab.setFocused(),t||this.emitBaseBubblingEvent(\"focus\")}blur(t=!1){this._focused&&this.layoutManager.setFocusedComponentItem(void 0,t)}setBlurred(t){this._focused=!1,this.tab.setBlurred(),t||this.emitBaseBubblingEvent(\"blur\")}setParent(t){this._parentItem=t,super.setParent(t)}handleUpdateItemConfigEvent(t){this.applyUpdatableConfig(t)}updateNodeSize(t){if(\"none\"!==this.element.style.display){const{width:e,height:i}=kt(this.element);this._container.setSizeToNodeSize(e,i,t)}}}class $t extends Gt{constructor(){super(...arguments),this._focused=!1}get focused(){return this._focused}setFocusedValue(t){this._focused=t}}class Zt extends Wt{constructor(t,e){super(),this._eElement=t,this._pointerTracking=!1,this._pointerDownEventListener=t=>this.onPointerDown(t),this._pointerMoveEventListener=t=>this.onPointerMove(t),this._pointerUpEventListener=t=>this.onPointerUp(t),this._timeout=void 0,this._allowableTargets=[t,...e],this._oDocument=document,this._eBody=document.body,this._nDelay=1800,this._nDistance=10,this._nX=0,this._nY=0,this._nOriginalX=0,this._nOriginalY=0,this._dragging=!1,this._eElement.addEventListener(\"pointerdown\",this._pointerDownEventListener,{passive:!0})}destroy(){this.checkRemovePointerTrackingEventListeners(),this._eElement.removeEventListener(\"pointerdown\",this._pointerDownEventListener)}cancelDrag(){this.processDragStop(void 0)}onPointerDown(t){if(this._allowableTargets.includes(t.target)&&t.isPrimary){const e=this.getPointerCoordinates(t);this.processPointerDown(e)}}processPointerDown(t){this._nOriginalX=t.x,this._nOriginalY=t.y,this._oDocument.addEventListener(\"pointermove\",this._pointerMoveEventListener),this._oDocument.addEventListener(\"pointerup\",this._pointerUpEventListener,{passive:!0}),this._pointerTracking=!0,this._timeout=setTimeout((()=>{try{this.startDrag()}catch(t){throw console.error(t),t}}),this._nDelay)}onPointerMove(t){this._pointerTracking&&(this.processDragMove(t),t.preventDefault())}processDragMove(t){this._nX=t.pageX-this._nOriginalX,this._nY=t.pageY-this._nOriginalY,!1===this._dragging&&(Math.abs(this._nX)>this._nDistance||Math.abs(this._nY)>this._nDistance)&&this.startDrag(),this._dragging&&this.emit(\"drag\",this._nX,this._nY,t)}onPointerUp(t){this.processDragStop(t)}processDragStop(t){var e;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this.checkRemovePointerTrackingEventListeners(),!0===this._dragging&&(this._eBody.classList.remove(\"lm_dragging\"),this._eElement.classList.remove(\"lm_dragging\"),null===(e=this._oDocument.querySelector(\"iframe\"))||void 0===e||e.style.setProperty(\"pointer-events\",\"\"),this._dragging=!1,this.emit(\"dragStop\",t))}checkRemovePointerTrackingEventListeners(){this._pointerTracking&&(this._oDocument.removeEventListener(\"pointermove\",this._pointerMoveEventListener),this._oDocument.removeEventListener(\"pointerup\",this._pointerUpEventListener),this._pointerTracking=!1)}startDrag(){var t;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this._dragging=!0,this._eBody.classList.add(\"lm_dragging\"),this._eElement.classList.add(\"lm_dragging\"),null===(t=this._oDocument.querySelector(\"iframe\"))||void 0===t||t.style.setProperty(\"pointer-events\",\"none\"),this.emit(\"dragStart\",this._nOriginalX,this._nOriginalY)}getPointerCoordinates(t){return{x:t.pageX,y:t.pageY}}}class qt{constructor(t,e,i){this._isVertical=t,this._size=e,this._grabSize=i0){const i=this.createSplitter(Math.max(0,e-1)).element;e>0?(this.contentItems[e-1].element.insertAdjacentElement(\"afterend\",i),i.insertAdjacentElement(\"afterend\",t.element)):(this.contentItems[0].element.insertAdjacentElement(\"beforebegin\",i),i.insertAdjacentElement(\"beforebegin\",t.element))}else this._childElementContainer.appendChild(t.element);super.addChild(t,e);const n=1/this.contentItems.length*100;if(!0===i)return this.emitBaseBubblingEvent(\"stateChanged\"),e;for(let e=0;e0&&(this.calculateRelativeSizes(),this.setAbsoluteSizes()),this.emitBaseBubblingEvent(\"stateChanged\"),this.emit(\"resize\")}setAbsoluteSizes(){const t=this.calculateAbsoluteSizes();for(let e=0;e0&&t.itemSizes[e]++,this._isColumn?(Tt(this.contentItems[e].element,t.crossAxisSize),At(this.contentItems[e].element,t.itemSizes[e])):(Tt(this.contentItems[e].element,t.itemSizes[e]),At(this.contentItems[e].element,t.crossAxisSize))}calculateAbsoluteSizes(){const t=(this.contentItems.length-1)*this._splitterSize,{width:e,height:i}=kt(this.element);let n,o;this._isColumn?(n=i-t,o=e):(n=e-t,o=i);let s=0;const r=[];for(let t=0;t0){const n=100-t;for(let t=0;t100&&e.length>0){for(let t=0;te)return;{const r=i/e;let a=i;for(let e=0;ethis.onSplitterDrag(e,t,i))),e.on(\"dragStop\",(()=>this.onSplitterDragStop(e))),e.on(\"dragStart\",(()=>this.onSplitterDragStart(e))),this._splitter.splice(t,0,e),e}getSplitItems(t){const e=this._splitter.indexOf(t);return{before:this.contentItems[e],after:this.contentItems[e+1]}}calculateContentItemMinSize(t){const e=t.minSize;if(void 0!==e){if(t.minSizeUnit===ht.Pixel)return e;throw new X(\"ROCGMD98831\",JSON.stringify(t))}{const t=this.layoutManager.layoutConfig.dimensions;return this._isColumn?t.defaultMinItemHeight:t.defaultMinItemWidth}}calculateContentItemsTotalMinSize(t){let e=0;for(const i of t)e+=this.calculateContentItemMinSize(i);return e}onSplitterDragStart(t){const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=this.calculateContentItemsTotalMinSize(e.before.contentItems),s=this.calculateContentItemsTotalMinSize(e.after.contentItems);this._splitterPosition=0,this._splitterMinPosition=-1*(i-o),this._splitterMaxPosition=n-s}onSplitterDrag(t,e,i){let n=this._isColumn?i:e;if(null===this._splitterMinPosition||null===this._splitterMaxPosition)throw new K(\"ROCOSD59226\");n=Math.max(n,this._splitterMinPosition),n=Math.min(n,this._splitterMaxPosition),this._splitterPosition=n;const o=zt(n);this._isColumn?t.element.style.top=o:t.element.style.left=o}onSplitterDragStop(t){if(null===this._splitterPosition)throw new K(\"ROCOSDS66932\");{const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=(this._splitterPosition+i)/(i+n),s=e.before.size+e.after.size;e.before.size=o*s,e.after.size=(1-o)*s,t.element.style.top=zt(0),t.element.style.left=zt(0),globalThis.requestAnimationFrame((()=>this.updateSize(!1)))}}}!function(t){t.getElementDimensionSize=function(t,e){return\"width\"===e?function(t){return t.offsetWidth}(t):function(t){return t.offsetHeight}(t)},t.setElementDimensionSize=function(t,e,i){return\"width\"===e?Tt(t,i):At(t,i)},t.createElement=function(t,e){const i=t.createElement(\"div\");return i.classList.add(\"lm_item\"),e?i.classList.add(\"lm_column\"):i.classList.add(\"lm_row\"),i}}(Xt||(Xt={}));class Yt extends $t{constructor(t,e,i){super(t,vt.create(e),null,Yt.createElement(document)),this.isGround=!0,this._childElementContainer=this.element,this._containerElement=i;let n=null;for(;;){const t=n?n.previousSibling:this._containerElement.lastChild;if(!(t instanceof Element&&t.classList.contains(\"lm_content\")))break;n=t}this._containerElement.insertBefore(this.element,n)}init(){if(!0!==this.isInitialised){this.updateNodeSize();for(let t=0;t0?this.contentItems[0]:this,n.isComponent)throw new Error(\"Cannot add item as child to ComponentItem\");{const t=this.layoutManager.createAndInitContentItem(i,n);return e=n.addChild(t,e),n===this?-1:e}}loadComponentAsRoot(t){this.clearRoot();const e=Ct.resolve(t,!1);if(e.maximised)throw new Error(\"Root Component cannot be maximised\");{const t=new jt(this.layoutManager,e,this);t.init(),this.addChild(t,0)}}addChild(t,e){if(this.contentItems.length>0)throw new Error(\"Ground node can only have a single child\");return this._childElementContainer.appendChild(t.element),e=super.addChild(t,e),this.updateSize(!1),this.emitBaseBubblingEvent(\"stateChanged\"),e}calculateConfigContent(){const t=this.contentItems,e=t.length,i=new Array(e);for(let n=0;n0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e)),this.updateContentItemsSize(!1))}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}createSideAreas(){const t=Yt.Area.oppositeSides,e=new Array(Object.keys(t).length);let i=0;for(const n in t){const o=n,s=this.getElementArea();if(null===s)throw new K(\"RCSA77553\");s.side=o,\"2\"===t[o][1]?s[o]=s[t[o]]-50:s[o]=s[t[o]]+50,s.surface=(s.x2-s.x1)*(s.y2-s.y1),e[i++]=s}return e}highlightDropZone(t,e,i){this.layoutManager.tabDropPlaceholder.remove(),super.highlightDropZone(t,e,i)}onDrop(t,e){if(t.isComponent){const e=ut.createDefault(),i=t;e.header=mt.Header.createCopy(i.headerConfig);const n=this.layoutManager.createAndInitContentItem(e,this);n.addChild(t),t=n}if(0===this.contentItems.length)this.addChild(t);else{if(t.type===at.row||t.type===at.column){const e=ut.createDefault(),i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}const i=\"x\"==e.side[0]?at.row:at.column,n=\"2\"==e.side[1],o=this.contentItems[0];if(o instanceof Xt&&o.type===i){const e=o.contentItems[n?0:o.contentItems.length-1];o.addChild(t,n?0:void 0,!0),e.size*=.5,t.size=e.size,t.sizeUnit=ht.Percent,o.updateSize(!1)}else{const e=ct.createDefault(i),s=this.layoutManager.createContentItem(e,this);this.replaceChild(o,s),s.addChild(t,n?0:void 0,!0),s.addChild(o,n?void 0:0,!0),o.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}}dock(){throw new X(\"GID87731\")}validateDocking(){throw new X(\"GIVD87732\")}getAllContentItems(){const t=[this];return this.deepGetAllContentItems(this.contentItems,t),t}getConfigMaximisedItems(){const t=[];return this.deepFilterContentItems(this.contentItems,t,(t=>!(!Gt.isStack(t)||!t.initialWantMaximise)||!(!Gt.isComponentItem(t)||!t.initialWantMaximise))),t}getItemsByPopInParentId(t){const e=[];return this.deepFilterContentItems(this.contentItems,e,(e=>e.popInParentIds.includes(t))),e}toConfig(){throw new Error(\"Cannot generate GroundItem config\")}setActiveComponentItem(t,e,i){}updateNodeSize(){const{width:t,height:e}=kt(this._containerElement);Tt(this.element,t),At(this.element,e),this.contentItems.length>0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e))}deepGetAllContentItems(t,e){for(let i=0;ithis.onClick(t),this._touchStartEventListener=t=>this.onTouchStart(t),this._element=document.createElement(\"div\"),this._element.classList.add(i),this._element.title=e,this._header.on(\"destroy\",(()=>this.destroy())),this._element.addEventListener(\"click\",this._clickEventListener,{passive:!0}),this._element.addEventListener(\"touchstart\",this._touchStartEventListener,{passive:!0}),this._header.controlsContainerElement.appendChild(this._element)}get element(){return this._element}destroy(){var t;this._element.removeEventListener(\"click\",this._clickEventListener),this._element.removeEventListener(\"touchstart\",this._touchStartEventListener),null===(t=this._element.parentNode)||void 0===t||t.removeChild(this._element)}onClick(t){this._pushEvent(t)}onTouchStart(t){this._pushEvent(t)}}class Jt{constructor(t,e,i,n,o){var s;this._layoutManager=t,this._componentItem=e,this._closeEvent=i,this._focusEvent=n,this._dragStartEvent=o,this._isActive=!1,this._tabClickListener=t=>this.onTabClickDown(t),this._tabTouchStartListener=t=>this.onTabTouchStart(t),this._closeClickListener=()=>this.onCloseClick(),this._closeTouchStartListener=()=>this.onCloseTouchStart(),this._dragStartListener=(t,e)=>this.onDragStart(t,e),this._contentItemDestroyListener=()=>this.onContentItemDestroy(),this._tabTitleChangedListener=t=>this.setTitle(t),this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_tab\"),this._titleElement=document.createElement(\"span\"),this._titleElement.classList.add(\"lm_title\"),this._closeElement=document.createElement(\"div\"),this._closeElement.classList.add(\"lm_close_tab\"),this._element.appendChild(this._titleElement),this._element.appendChild(this._closeElement),e.isClosable?this._closeElement.style.display=\"\":this._closeElement.style.display=\"none\",this.setTitle(e.title),this._componentItem.on(\"titleChanged\",this._tabTitleChangedListener);(null!==(s=e.reorderEnabled)&&void 0!==s?s:this._layoutManager.layoutConfig.settings.reorderEnabled)&&this.enableReorder(),this._element.addEventListener(\"click\",this._tabClickListener,{passive:!0}),this._element.addEventListener(\"touchstart\",this._tabTouchStartListener,{passive:!0}),this._componentItem.isClosable?(this._closeElement.addEventListener(\"click\",this._closeClickListener,{passive:!0}),this._closeElement.addEventListener(\"touchstart\",this._closeTouchStartListener,{passive:!0})):(this._closeElement.remove(),this._closeElement=void 0),this._componentItem.setTab(this),this._layoutManager.emit(\"tabCreated\",this)}get isActive(){return this._isActive}get componentItem(){return this._componentItem}get contentItem(){return this._componentItem}get element(){return this._element}get titleElement(){return this._titleElement}get closeElement(){return this._closeElement}get reorderEnabled(){return void 0!==this._dragListener}set reorderEnabled(t){t!==this.reorderEnabled&&(t?this.enableReorder():this.disableReorder())}setTitle(t){this._titleElement.innerText=t,this._element.title=t}setActive(t){t!==this._isActive&&(this._isActive=t,t?this._element.classList.add(\"lm_active\"):this._element.classList.remove(\"lm_active\"))}destroy(){var t,e;this._closeEvent=void 0,this._focusEvent=void 0,this._dragStartEvent=void 0,this._element.removeEventListener(\"click\",this._tabClickListener),this._element.removeEventListener(\"touchstart\",this._tabTouchStartListener),null===(t=this._closeElement)||void 0===t||t.removeEventListener(\"click\",this._closeClickListener),null===(e=this._closeElement)||void 0===e||e.removeEventListener(\"touchstart\",this._closeTouchStartListener),this._componentItem.off(\"titleChanged\",this._tabTitleChangedListener),this.reorderEnabled&&this.disableReorder(),this._element.remove()}setBlurred(){this._element.classList.remove(\"lm_focused\"),this._titleElement.classList.remove(\"lm_focused\")}setFocused(){this._element.classList.add(\"lm_focused\"),this._titleElement.classList.add(\"lm_focused\")}onDragStart(t,e){if(void 0===this._dragListener)throw new J(\"TODSDLU10093\");if(void 0===this._dragStartEvent)throw new J(\"TODS23309\");this._dragStartEvent(t,e,this._dragListener,this.componentItem)}onContentItemDestroy(){void 0!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=void 0)}onTabClickDown(t){const e=t.target;e!==this._element&&e!==this._titleElement||(0===t.button?this.notifyFocus():1===t.button&&this._componentItem.isClosable&&this.notifyClose())}onTabTouchStart(t){t.target===this._element&&this.notifyFocus()}onCloseClick(){this.notifyClose()}onCloseTouchStart(){this.notifyClose()}notifyClose(){if(void 0===this._closeEvent)throw new J(\"TNC15007\");this._closeEvent(this._componentItem)}notifyFocus(){if(void 0===this._focusEvent)throw new J(\"TNA15007\");this._focusEvent(this._componentItem)}enableReorder(){this._dragListener=new Zt(this._element,[this._titleElement]),this._dragListener.on(\"dragStart\",this._dragStartListener),this._componentItem.on(\"destroy\",this._contentItemDestroyListener)}disableReorder(){if(void 0===this._dragListener)throw new J(\"TDR87745\");this._componentItem.off(\"destroy\",this._contentItemDestroyListener),this._dragListener.off(\"dragStart\",this._dragStartListener),this._dragListener=void 0}}class Qt{constructor(t,e,i,n,o){this._layoutManager=t,this._componentRemoveEvent=e,this._componentFocusEvent=i,this._componentDragStartEvent=n,this._dropdownActiveChangedEvent=o,this._tabs=[],this._lastVisibleTabIndex=-1,this._dropdownActive=!1,this._element=document.createElement(\"section\"),this._element.classList.add(\"lm_tabs\"),this._dropdownElement=document.createElement(\"section\"),this._dropdownElement.classList.add(\"lm_tabdropdown_list\"),this._dropdownElement.style.display=\"none\"}get tabs(){return this._tabs}get tabCount(){return this._tabs.length}get lastVisibleTabIndex(){return this._lastVisibleTabIndex}get element(){return this._element}get dropdownElement(){return this._dropdownElement}get dropdownActive(){return this._dropdownActive}destroy(){for(let t=0;tthis.handleTabCloseEvent(t)),(t=>this.handleTabFocusEvent(t)),((t,e,i,n)=>this.handleTabDragStartEvent(t,e,i,n)));void 0===e&&(e=this._tabs.length),this._tabs.splice(e,0,i),ethis._lastVisibleTabIndex){const t=this._tabs[e];for(let t=e;t>0;t--)this._tabs[t]=this._tabs[t-1];this._tabs[0]=t}}updateTabSizes(t,e){let i=!1;this.tryUpdateTabSizes(i,t,e)||(i=!0,this.tryUpdateTabSizes(i,t,e)),i!==this._dropdownActive&&(this._dropdownActive=i,this._dropdownActiveChangedEvent())}tryUpdateTabSizes(t,e,i){if(this._tabs.length>0){if(void 0===i)throw new Error(\"non-empty tabs must have active component item\");let n=0,o=!1;const s=this._layoutManager.layoutConfig.settings.tabOverlapAllowance,r=this._tabs.indexOf(i.tab),a=this._tabs[r];this._lastVisibleTabIndex=-1;for(let i=0;ie){if(o)i===r&&(l.style.zIndex=\"auto\",l.style.marginLeft=\"\",l.parentElement!==this._element&&this._element.appendChild(l));else{let t;if(t=r>0&&r<=i?(d-e)/(i-1):(d-e)/i,tthis.onClick(t),this._touchStartListener=t=>this.onTouchStart(t),this._rowColumnClosable=!0,this._closeButton=null,this._popoutButton=null,this._tabsContainer=new Qt(this._layoutManager,(t=>this.handleTabInitiatedComponentRemoveEvent(t)),(t=>this.handleTabInitiatedComponentFocusEvent(t)),((t,e,i,n)=>this.handleTabInitiatedDragStartEvent(t,e,i,n)),(()=>this.processTabDropdownActiveChanged())),this._show=i.show,this._popoutEnabled=i.popoutEnabled,this._popoutLabel=i.popoutLabel,this._maximiseEnabled=i.maximiseEnabled,this._maximiseLabel=i.maximiseLabel,this._minimiseEnabled=i.minimiseEnabled,this._minimiseLabel=i.minimiseLabel,this._closeEnabled=i.closeEnabled,this._closeLabel=i.closeLabel,this._tabDropdownEnabled=i.tabDropdownEnabled,this._tabDropdownLabel=i.tabDropdownLabel,this.setSide(i.side),this._canRemoveComponent=this._configClosable,this._element=document.createElement(\"section\"),this._element.classList.add(\"lm_header\"),this._controlsContainerElement=document.createElement(\"section\"),this._controlsContainerElement.classList.add(\"lm_controls\"),this._element.appendChild(this._tabsContainer.element),this._element.appendChild(this._controlsContainerElement),this._element.appendChild(this._tabsContainer.dropdownElement),this._element.addEventListener(\"click\",this._clickListener,{passive:!0}),this._element.addEventListener(\"touchstart\",this._touchStartListener,{passive:!0}),this._documentMouseUpListener=()=>this._tabsContainer.hideAdditionalTabsDropdown(),globalThis.document.addEventListener(\"mouseup\",this._documentMouseUpListener,{passive:!0}),this._tabControlOffset=this._layoutManager.layoutConfig.settings.tabControlOffset,this._tabDropdownEnabled&&(this._tabDropdownButton=new Kt(this,this._tabDropdownLabel,\"lm_tabdropdown\",(()=>this._tabsContainer.showAdditionalTabsDropdown()))),this._popoutEnabled&&(this._popoutButton=new Kt(this,this._popoutLabel,\"lm_popout\",(()=>this.handleButtonPopoutEvent()))),this._maximiseEnabled&&(this._maximiseButton=new Kt(this,this._maximiseLabel,\"lm_maximise\",(t=>this.handleButtonMaximiseToggleEvent(t)))),this._configClosable&&(this._closeButton=new Kt(this,this._closeLabel,\"lm_close\",(()=>s()))),this.processTabDropdownActiveChanged()}get show(){return this._show}get side(){return this._side}get leftRightSided(){return this._leftRightSided}get layoutManager(){return this._layoutManager}get parent(){return this._parent}get tabs(){return this._tabsContainer.tabs}get lastVisibleTabIndex(){return this._tabsContainer.lastVisibleTabIndex}get element(){return this._element}get tabsContainerElement(){return this._tabsContainer.element}get controlsContainerElement(){return this._controlsContainerElement}destroy(){this.emit(\"destroy\"),this._popoutEvent=void 0,this._maximiseToggleEvent=void 0,this._clickEvent=void 0,this._touchStartEvent=void 0,this._componentRemoveEvent=void 0,this._componentFocusEvent=void 0,this._componentDragStartEvent=void 0,this._tabsContainer.destroy(),globalThis.document.removeEventListener(\"mouseup\",this._documentMouseUpListener),this._element.remove()}createTab(t,e){this._tabsContainer.createTab(t,e)}removeTab(t){this._tabsContainer.removeTab(t)}processActiveComponentChanged(t){this._tabsContainer.processActiveComponentChanged(t),this.updateTabSizes()}setSide(t){this._side=t,this._leftRightSided=[nt.right,nt.left].includes(this._side)}setRowColumnClosable(t){this._rowColumnClosable=t,this.updateClosability()}updateClosability(){let t;if(this._configClosable)if(this._rowColumnClosable){t=!0;const e=this.tabs.length;for(let i=0;i1}applyFocusedValue(t){t?this._element.classList.add(\"lm_focused\"):this._element.classList.remove(\"lm_focused\")}processMaximised(){if(void 0===this._maximiseButton)throw new J(\"HPMAX16997\");this._maximiseButton.element.setAttribute(\"title\",this._minimiseLabel)}processMinimised(){if(void 0===this._maximiseButton)throw new J(\"HPMIN16997\");this._maximiseButton.element.setAttribute(\"title\",this._maximiseLabel)}updateTabSizes(){if(this._tabsContainer.tabCount>0){const t=this._show?this._layoutManager.layoutConfig.dimensions.headerHeight:0;let e;this._leftRightSided?(this._element.style.height=\"\",this._element.style.width=zt(t)):(this._element.style.width=\"\",this._element.style.height=zt(t)),e=this._leftRightSided?this._element.offsetHeight-this._controlsContainerElement.offsetHeight-this._tabControlOffset:this._element.offsetWidth-this._controlsContainerElement.offsetWidth-this._tabControlOffset,this._tabsContainer.updateTabSizes(e,this._getActiveComponentItemEvent())}}handleTabInitiatedComponentRemoveEvent(t){if(this._canRemoveComponent){if(void 0===this._componentRemoveEvent)throw new J(\"HHTCE22294\");this._componentRemoveEvent(t)}}handleTabInitiatedComponentFocusEvent(t){if(void 0===this._componentFocusEvent)throw new J(\"HHTAE22294\");this._componentFocusEvent(t)}handleTabInitiatedDragStartEvent(t,e,i,n){if(this._canRemoveComponent){if(void 0===this._componentDragStartEvent)throw new J(\"HHTDSE22294\");this._componentDragStartEvent(t,e,i,n)}else i.cancelDrag()}processTabDropdownActiveChanged(){void 0!==this._tabDropdownButton&&Dt(this._tabDropdownButton.element,this._tabsContainer.dropdownActive)}handleButtonPopoutEvent(){if(this._layoutManager.layoutConfig.settings.popoutWholeStack){if(void 0===this._popoutEvent)throw new J(\"HHBPOE17834\");this._popoutEvent()}else{const t=this._getActiveComponentItemEvent();t&&t.popout()}}handleButtonMaximiseToggleEvent(t){if(void 0===this._maximiseToggleEvent)throw new J(\"HHBMTE16834\");this._maximiseToggleEvent()}onClick(t){t.target===this._element&&this.notifyClick(t)}onTouchStart(t){t.target===this._element&&this.notifyTouchStart(t)}notifyClick(t){if(void 0===this._clickEvent)throw new J(\"HNHC46834\");this._clickEvent(t)}notifyTouchStart(t){if(void 0===this._touchStartEvent)throw new J(\"HNHTS46834\");this._touchStartEvent(t)}}class ee extends $t{constructor(t,e,i){var n,o,s,r,a,l,h,d,c,m,u,p,g,f,v,_,y,C,w;super(t,e,i,ee.createElement(document)),this._headerSideChanged=!1,this._resizeListener=()=>this.handleResize(),this._maximisedListener=()=>this.handleMaximised(),this._minimisedListener=()=>this.handleMinimised(),this._headerConfig=e.header;const I=t.layoutConfig.header,b=e.content;let S;if(1!==b.length)S=void 0;else{S=b[0].header}this._initialWantMaximise=e.maximised,this._initialActiveItemIndex=null!==(n=e.activeItemIndex)&&void 0!==n?n:0;const E=null!==(r=null!==(s=null===(o=this._headerConfig)||void 0===o?void 0:o.show)&&void 0!==s?s:null==S?void 0:S.show)&&void 0!==r?r:I.show,x=null!==(h=null!==(l=null===(a=this._headerConfig)||void 0===a?void 0:a.popout)&&void 0!==l?l:null==S?void 0:S.popout)&&void 0!==h?h:I.popout,L=null!==(m=null!==(c=null===(d=this._headerConfig)||void 0===d?void 0:d.maximise)&&void 0!==c?c:null==S?void 0:S.maximise)&&void 0!==m?m:I.maximise,z=null!==(g=null!==(p=null===(u=this._headerConfig)||void 0===u?void 0:u.close)&&void 0!==p?p:null==S?void 0:S.close)&&void 0!==g?g:I.close,M=null!==(_=null!==(v=null===(f=this._headerConfig)||void 0===f?void 0:f.minimise)&&void 0!==v?v:null==S?void 0:S.minimise)&&void 0!==_?_:I.minimise,P=null!==(w=null!==(C=null===(y=this._headerConfig)||void 0===y?void 0:y.tabDropdown)&&void 0!==C?C:null==S?void 0:S.tabDropdown)&&void 0!==w?w:I.tabDropdown;this._maximisedEnabled=!1!==L;const T={show:!1!==E,side:!1===E?nt.top:E,popoutEnabled:!1!==x,popoutLabel:!1===x?\"\":x,maximiseEnabled:this._maximisedEnabled,maximiseLabel:!1===L?\"\":L,closeEnabled:!1!==z,closeLabel:!1===z?\"\":z,minimiseEnabled:!0,minimiseLabel:M,tabDropdownEnabled:!1!==P,tabDropdownLabel:!1===P?\"\":P};this._header=new te(t,this,T,e.isClosable&&!1!==z,(()=>this.getActiveComponentItem()),(()=>this.remove()),(()=>this.handlePopoutEvent()),(()=>this.toggleMaximise()),(t=>this.handleHeaderClickEvent(t)),(t=>this.handleHeaderTouchStartEvent(t)),(t=>this.handleHeaderComponentRemoveEvent(t)),(t=>this.handleHeaderComponentFocusEvent(t)),((t,e,i,n)=>this.handleHeaderComponentStartDragEvent(t,e,i,n))),this.isStack=!0,this._childElementContainer=document.createElement(\"section\"),this._childElementContainer.classList.add(\"lm_items\"),this.on(\"resize\",this._resizeListener),this._maximisedEnabled&&(this.on(\"maximised\",this._maximisedListener),this.on(\"minimised\",this._minimisedListener)),this.element.appendChild(this._header.element),this.element.appendChild(this._childElementContainer),this.setupHeaderPosition(),this._header.updateClosability()}get childElementContainer(){return this._childElementContainer}get header(){return this._header}get headerShow(){return this._header.show}get headerSide(){return this._header.side}get headerLeftRightSided(){return this._header.leftRightSided}get contentAreaDimensions(){return this._contentAreaDimensions}get initialWantMaximise(){return this._initialWantMaximise}get isMaximised(){return this===this.layoutManager.maximisedStack}get stackParent(){if(!this.parent)throw new Error(\"Stack should always have a parent\");return this.parent}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}init(){if(!0===this.isInitialised)return;this.updateNodeSize();for(let t=0;t0){if(this._initialActiveItemIndex<0||this._initialActiveItemIndex>=e)throw new Error(`ActiveItemIndex out of range: ${this._initialActiveItemIndex} id: ${this.id}`);for(let i=0;ithis.contentItems.length)throw e-=1,new X(\"SAC99728\");if(t instanceof jt)return e=super.addChild(t,e),this._childElementContainer.appendChild(t.element),this._header.createTab(t,e),this.setActiveComponentItem(t,i),this._header.updateTabSizes(),this.updateSize(!1),t.container.setBaseLogicalZIndex(),this._header.updateClosability(),this.emitStateChangedEvent(),e;throw new X(\"SACC88532\")}removeChild(t,e){const i=t,n=this.contentItems.indexOf(i),o=1===this.contentItems.length;if(this._activeComponentItem===i&&(i.focused&&i.blur(),!o)){const t=0===n?1:n-1;this.setActiveComponentItem(this.contentItems[t],!1)}this._header.removeTab(i),super.removeChild(i,e),o||this._header.updateClosability(),this.emitStateChangedEvent()}toggleMaximise(){this.isMaximised?this.minimise():this.maximise()}maximise(){if(!this.isMaximised){this.layoutManager.setMaximisedStack(this);const t=this.contentItems,e=t.length;for(let i=0;i0&&void 0===t)throw new Error(\"expected non-empty stack to have an active component item\");return{type:\"stack\",content:this.calculateConfigContent(),size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,isClosable:this.isClosable,maximised:this.isMaximised,header:this.createHeaderConfig(),activeItemIndex:t}}onDrop(t,e){if(\"header\"===this._dropSegment){if(this.resetHeaderDropZone(),void 0===this._dropIndex)throw new J(\"SODDI68990\");return void this.addChild(t,this._dropIndex)}if(\"body\"===this._dropSegment)return void this.addChild(t,0,!0);const i=\"top\"===this._dropSegment||\"bottom\"===this._dropSegment,n=\"left\"===this._dropSegment||\"right\"===this._dropSegment,o=\"top\"===this._dropSegment||\"left\"===this._dropSegment,s=i&&this.stackParent.isColumn||n&&this.stackParent.isRow;if(t.isComponent){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createAndInitContentItem(e,this);i.addChild(t),t=i}if(t.type===at.row||t.type===at.column){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}if(s){const e=this.stackParent.contentItems.indexOf(this);this.stackParent.addChild(t,o?e:e+1,!0),this.size*=.5,t.size=this.size,t.sizeUnit=this.sizeUnit,this.stackParent.updateSize(!1)}else{const e=i?at.column:at.row,n=ct.createDefault(e),s=this.layoutManager.createContentItem(n,this);this.stackParent.replaceChild(this,s),s.addChild(t,o?0:void 0,!0),s.addChild(this,o?void 0:0,!0),this.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}highlightDropZone(t,e){for(const i in this._contentAreaDimensions){const n=i,o=this._contentAreaDimensions[n].hoverArea;if(o.x1t&&o.y1e)return void(\"header\"===n?(this._dropSegment=\"header\",this.highlightHeaderDropZone(this._header.leftRightSided?e:t)):(this.resetHeaderDropZone(),this.highlightBodyDropZone(n)))}}getArea(){if(\"none\"===this.element.style.display)return null;const t=super.getElementArea(this._header.element),e=super.getElementArea(this._childElementContainer);if(null===t||null===e)throw new K(\"SGAHC13086\");const i=e.x2-e.x1,n=e.y2-e.y1;return this._contentAreaDimensions={header:{hoverArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2},highlightArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2}}},0===this.contentItems.length?(this._contentAreaDimensions.body={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2}},super.getElementArea(this.element)):(this._contentAreaDimensions.left={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x1+.25*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x1+.5*i,y2:e.y2}},this._contentAreaDimensions.top={hoverArea:{x1:e.x1+.25*i,y1:e.y1,x2:e.x1+.75*i,y2:e.y1+.5*n},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y1+.5*n}},this._contentAreaDimensions.right={hoverArea:{x1:e.x1+.75*i,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1+.5*i,y1:e.y1,x2:e.x2,y2:e.y2}},this._contentAreaDimensions.bottom={hoverArea:{x1:e.x1+.25*i,y1:e.y1+.5*n,x2:e.x1+.75*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1+.5*n,x2:e.x2,y2:e.y2}},super.getElementArea(this.element))}positionHeader(t){this._header.side!==t&&(this._header.setSide(t),this._headerSideChanged=!0,this.setupHeaderPosition())}updateNodeSize(){if(\"none\"!==this.element.style.display){const t=kt(this.element);if(this._header.show){t[this._header.leftRightSided?it.width:it.height]-=this.layoutManager.layoutConfig.dimensions.headerHeight}this._childElementContainer.style.width=zt(t.width),this._childElementContainer.style.height=zt(t.height);for(let e=0;e=o&&tthis.onDrag(t,e,i))),this._dragListener.on(\"dragStop\",(()=>this.onDrop())),this.createDragProxyElements(t,e),null===this._componentItem.parent)throw new K(\"DPC10097\");this._componentItemFocused=this._componentItem.focused,this._componentItemFocused&&this._componentItem.blur(),this._componentItem.parent.removeChild(this._componentItem,!0),this.setDimensions(),document.body.appendChild(this._element),this.determineMinMaxXY(),this._layoutManager.calculateItemAreas(),this.setDropPosition(t,e)}get element(){return this._element}createDragProxyElements(t,e){this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_dragProxy\");const i=document.createElement(\"div\");i.classList.add(\"lm_header\");const n=document.createElement(\"div\");n.classList.add(\"lm_tabs\");const o=document.createElement(\"div\");o.classList.add(\"lm_tab\");const s=document.createElement(\"span\");s.classList.add(\"lm_title\"),o.appendChild(s),n.appendChild(o),i.appendChild(n),this._proxyContainerElement=document.createElement(\"div\"),this._proxyContainerElement.classList.add(\"lm_content\"),this._element.appendChild(i),this._element.appendChild(this._proxyContainerElement),this._originalParent instanceof ee&&this._originalParent.headerShow&&(this._sided=this._originalParent.headerLeftRightSided,this._element.classList.add(\"lm_\"+this._originalParent.headerSide),[nt.right,nt.bottom].indexOf(this._originalParent.headerSide)>=0&&this._proxyContainerElement.insertAdjacentElement(\"afterend\",i)),this._element.style.left=zt(t),this._element.style.top=zt(e),o.setAttribute(\"title\",this._componentItem.title),s.insertAdjacentText(\"afterbegin\",this._componentItem.title),this._proxyContainerElement.appendChild(this._componentItem.element)}determineMinMaxXY(){const t=this._layoutManager.groundItem;if(void 0===t)throw new J(\"DPDMMXY73109\");{const e=t.element.getBoundingClientRect();this._minX=e.left+document.body.scrollLeft,this._minY=e.top+document.body.scrollTop,this._maxX=this._minX+e.width,this._maxY=this._minY+e.height}}onDrag(t,e,i){const n=i.pageX,o=i.pageY;this.setDropPosition(n,o),this._componentItem.drag()}setDropPosition(t,e){this._layoutManager.layoutConfig.settings.constrainDragToContainer&&(t<=this._minX?t=Math.ceil(this._minX):t>=this._maxX&&(t=Math.floor(this._maxX)),e<=this._minY?e=Math.ceil(this._minY):e>=this._maxY&&(e=Math.floor(this._maxY))),this._element.style.left=zt(t),this._element.style.top=zt(e),this._area=this._layoutManager.getArea(t,e),null!==this._area&&(this._lastValidArea=this._area,this._area.contentItem.highlightDropZone(t,e,this._area))}onDrop(){const t=this._layoutManager.dropTargetIndicator;if(null===t)throw new K(\"DPOD30011\");let e;if(t.hide(),this._componentItem.exitDragMode(),null!==this._area)e=this._componentItem,this._area.contentItem.onDrop(e,this._area);else if(null!==this._lastValidArea){e=this._componentItem;this._lastValidArea.contentItem.onDrop(e,this._lastValidArea)}else this._originalParent?(e=this._componentItem,this._originalParent.addChild(e)):this._componentItem.destroy();this._element.remove(),this._layoutManager.emit(\"itemDropped\",this._componentItem),this._componentItemFocused&&void 0!==e&&e.focus()}setDimensions(){const t=this._layoutManager.layoutConfig.dimensions;if(void 0===t)throw new Error(\"DragProxy.setDimensions: dimensions undefined\");let e=t.dragProxyWidth,i=t.dragProxyHeight;if(void 0===e||void 0===i)throw new Error(\"DragProxy.setDimensions: width and/or height undefined\");const n=!1===this._layoutManager.layoutConfig.header.show?0:t.headerHeight;this._element.style.width=zt(e),this._element.style.height=zt(i),e-=this._sided?n:0,i-=this._sided?0:n,this._proxyContainerElement.style.width=zt(e),this._proxyContainerElement.style.height=zt(i),this._componentItem.enterDragMode(e,i),this._componentItem.show()}}class ne{constructor(t,e,i,n,o,s,r){this._layoutManager=t,this._element=e,this._extraAllowableChildTargets=i,this._componentTypeOrFtn=n,this._componentState=o,this._title=s,this._id=r,this._dragListener=null,this._dummyGroundContainer=document.createElement(\"div\");const a=gt.createDefault(\"row\");this._dummyGroundContentItem=new Yt(this._layoutManager,a,this._dummyGroundContainer),this.createDragListener()}destroy(){this.removeDragListener()}createDragListener(){this.removeDragListener(),this._dragListener=new Zt(this._element,this._extraAllowableChildTargets),this._dragListener.on(\"dragStart\",((t,e)=>this.onDragStart(t,e))),this._dragListener.on(\"dragStop\",(()=>this.onDragStop()))}onDragStart(t,e){var i;const n=\"component\";let o;if(\"function\"==typeof this._componentTypeOrFtn){const t=this._componentTypeOrFtn();o=ne.isDragSourceComponentItemConfig(t)?{type:n,componentState:t.state,componentType:t.type,title:null!==(i=t.title)&&void 0!==i?i:this._title}:t}else o={type:n,componentState:this._componentState,componentType:this._componentTypeOrFtn,title:this._title,id:this._id};const s=bt.resolve(o,!1),r=new jt(this._layoutManager,s,this._dummyGroundContentItem);if(this._dummyGroundContentItem.contentItems.push(r),null===this._dragListener)throw new K(\"DSODSD66746\");{const i=new ie(t,e,this._dragListener,this._layoutManager,r,this._dummyGroundContentItem),n=this._layoutManager.transitionIndicator;if(null===n)throw new K(\"DSODST66746\");n.transitionElements(this._element,i.element)}}onDragStop(){this.createDragListener()}removeDragListener(){null!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=null)}}!function(t){t.isDragSourceComponentItemConfig=function(t){return!(\"componentType\"in t)}}(ne||(ne={}));class oe{constructor(){this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_dropTargetIndicator\");const t=document.createElement(\"div\");t.classList.add(\"lm_inner\"),this._element.appendChild(t),document.body.appendChild(this._element)}destroy(){this._element.remove()}highlightArea(t,e){this._element.style.left=zt(t.x1+e),this._element.style.top=zt(t.y1+e),this._element.style.width=zt(t.x2-t.x1-e),this._element.style.height=zt(t.y2-t.y1-e),this._element.style.display=\"block\"}hide(){Dt(this._element,!1)}}class se{constructor(){this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_transition_indicator\"),document.body.appendChild(this._element),this._toElement=null,this._fromDimensions=null,this._totalAnimationDuration=200,this._animationStartTime=null}destroy(){this._element.remove()}transitionElements(t,e){}nextAnimationFrame(){}measure(t){const e=t.getBoundingClientRect();return{left:e.left,top:e.top,width:t.offsetWidth,height:t.offsetHeight}}}class re extends Wt{constructor(t){super(),this._layoutManager=t,this._childEventListener=t=>this.onEventFromChild(t),globalThis.addEventListener(re.ChildEventName,this._childEventListener,{passive:!0})}emit(t,...e){\"userBroadcast\"===t?this.emitUserBroadcast(...e):super.emit(t,...e)}emitUserBroadcast(...t){this.handleUserBroadcastEvent(\"userBroadcast\",t)}destroy(){globalThis.removeEventListener(re.ChildEventName,this._childEventListener)}handleUserBroadcastEvent(t,e){this._layoutManager.isSubWindow?this.propagateToParent(t,e):this.propagateToThisAndSubtree(t,e)}onEventFromChild(t){const e=t.detail;this.handleUserBroadcastEvent(e.eventName,e.args)}propagateToParent(t,e){const i={bubbles:!0,cancelable:!0,detail:{layoutManager:this._layoutManager,eventName:t,args:e}},n=new CustomEvent(re.ChildEventName,i),o=globalThis.opener;if(null===o)throw new K(\"EHPTP15778\");o.dispatchEvent(n)}propagateToThisAndSubtree(t,e){this.emitUnknown(t,...e);for(let i=0;ithis.handleContainerResize())),this._windowBeforeUnloadListener=()=>this.onBeforeUnload(),this._windowBeforeUnloadListening=!1,this._maximisedStackBeforeDestroyedListener=t=>this.cleanupBeforeMaximisedStackDestroyed(t),this.isSubWindow=t.isSubWindow,this._constructorOrSubWindowLayoutConfig=t.constructorOrSubWindowLayoutConfig,Q.checkInitialise(),dt.checkInitialise(),void 0!==t.containerElement&&(this._containerElement=t.containerElement)}get container(){return this._containerElement}get isInitialised(){return this._isInitialised}get groundItem(){return this._groundItem}get root(){return this._groundItem}get openPopouts(){return this._openPopouts}get dropTargetIndicator(){return this._dropTargetIndicator}get transitionIndicator(){return this._transitionIndicator}get width(){return this._width}get height(){return this._height}get eventHub(){return this._eventHub}get rootItem(){if(void 0===this._groundItem)throw new Error(\"Cannot access rootItem before init\");return 0===this._groundItem.contentItems.length?void 0:this._groundItem.contentItems[0]}get focusedComponentItem(){return this._focusedComponentItem}get tabDropPlaceholder(){return this._tabDropPlaceholder}get maximisedStack(){return this._maximisedStack}get deprecatedConstructor(){return!this.isSubWindow&&void 0!==this._constructorOrSubWindowLayoutConfig}destroy(){if(this._isInitialised){this._windowBeforeUnloadListening&&(globalThis.removeEventListener(\"beforeunload\",this._windowBeforeUnloadListener),this._windowBeforeUnloadListening=!1),!0===this.layoutConfig.settings.closePopoutsOnUnload&&this.closeAllOpenPopouts(),this._resizeObserver.disconnect(),this.checkClearResizeTimeout(),void 0!==this._groundItem&&this._groundItem.destroy(),this._tabDropPlaceholder.remove(),null!==this._dropTargetIndicator&&this._dropTargetIndicator.destroy(),null!==this._transitionIndicator&&this._transitionIndicator.destroy(),this._eventHub.destroy();for(const t of this._dragSources)t.destroy();this._dragSources=[],this._isInitialised=!1}}minifyConfig(t){return _t.minifyConfig(t)}unminifyConfig(t){return _t.unminifyConfig(t)}init(){let t;if(this.setContainer(),this._dropTargetIndicator=new oe,this._transitionIndicator=new se,this.updateSizeFromContainer(),this.isSubWindow){if(void 0===this._constructorOrSubWindowLayoutConfig)throw new J(\"LMIU07155\");{const e=this._constructorOrSubWindowLayoutConfig.root;if(void 0===e)throw new X(\"LMIC07156\");if(!Ct.isComponent(e))throw new X(\"LMIC07157\");t=e;const i=xt.resolve(this._constructorOrSubWindowLayoutConfig);this.layoutConfig=Object.assign(Object.assign({},i),{root:void 0})}}else void 0===this._constructorOrSubWindowLayoutConfig?this.layoutConfig=_t.createDefault():this.layoutConfig=xt.resolve(this._constructorOrSubWindowLayoutConfig);const e=this.layoutConfig;this._groundItem=new Yt(this,e.root,this._containerElement),this._groundItem.init(),this.checkLoadedLayoutMaximiseItem(),this._resizeObserver.observe(this._containerElement),this._isInitialised=!0,this.adjustColumnsResponsive(),this.emit(\"initialised\"),void 0!==t&&this.loadComponentAsRoot(t)}loadLayout(t){if(!this.isInitialised)throw new Error(\"GoldenLayout: Need to call init() if LayoutConfig with defined root passed to constructor\");if(void 0===this._groundItem)throw new J(\"LMLL11119\");this.createSubWindows(),this.layoutConfig=xt.resolve(t),this._groundItem.loadRoot(this.layoutConfig.root),this.checkLoadedLayoutMaximiseItem(),this.adjustColumnsResponsive()}saveLayout(){if(!1===this._isInitialised)throw new Error(\"Can't create config, layout not yet initialised\");if(void 0===this._groundItem)throw new J(\"LMTC18244\");{const t=this._groundItem.calculateConfigContent();let e;e=1!==t.length?void 0:t[0],this.reconcilePopoutWindows();const i=[];for(let t=0;t=0?n=this._groundItem.contentItems[0]:e=0;break;case at.row:case at.column:e=n.addItem(t,i.index);break;case at.stack:if(Ct.isComponent(t)){e=n.addItem(t,i.index);break}throw Error(tt[6]);case at.component:throw new X(\"LMAIALC87444602\");default:throw new Y(\"LMAIALU98881733\",n.type)}if(Ct.isComponent(t)){const t=n.contentItems[e];Gt.isStack(t)&&(n=t,e=0)}return i.parentItem=n,i.index=e,i}}}loadComponentAsRoot(t){if(void 0===this._groundItem)throw new Error(\"Cannot add item before init\");this._groundItem.loadComponentAsRoot(t)}updateSize(t,e){this.setSize(t,e)}setSize(t,e){if(this._width=t,this._height=e,!0===this._isInitialised){if(void 0===this._groundItem)throw new J(\"LMUS18881\");if(this._groundItem.setSize(this._width,this._height),this._maximisedStack){const{width:t,height:e}=kt(this._containerElement);Tt(this._maximisedStack.element,t),At(this._maximisedStack.element,e),this._maximisedStack.updateSize(!1)}this.adjustColumnsResponsive()}}beginSizeInvalidation(){this._sizeInvalidationBeginCount++}endSizeInvalidation(){0==--this._sizeInvalidationBeginCount&&this.updateSizeFromContainer()}updateSizeFromContainer(){const{width:t,height:e}=kt(this._containerElement);this.setSize(t,e)}updateRootSize(t=!1){if(void 0===this._groundItem)throw new J(\"LMURS28881\");this._groundItem.updateSize(t)}createAndInitContentItem(t,e){const i=this.createContentItem(t,e);return i.init(),i}createContentItem(t,e){if(\"string\"!=typeof t.type)throw new G(\"Missing parameter 'type'\",JSON.stringify(t));if(ct.isComponentItem(t)&&!(e instanceof ee)&&e&&!(!0===this.isSubWindow&&e instanceof Yt)){t={type:at.stack,content:[t],size:t.size,sizeUnit:t.sizeUnit,minSize:t.minSize,minSizeUnit:t.minSizeUnit,id:t.id,maximised:t.maximised,isClosable:t.isClosable,activeItemIndex:0,header:void 0}}return this.createContentItemFromConfig(t,e)}findFirstComponentItemById(t){if(void 0===this._groundItem)throw new J(\"LMFFCIBI82446\");return this.findFirstContentItemTypeByIdRecursive(at.component,t,this._groundItem)}createPopout(t,e,i,n){return t instanceof Gt?this.createPopoutFromContentItem(t,e,i,n):this.createPopoutFromItemConfig(t,e,i,n)}createPopoutFromContentItem(t,e,i,n){let o=t.parent,s=t;for(;null!==o&&1===o.contentItems.length&&!o.isGround;)s=o,o=o.parent;if(null===o)throw new K(\"LMCPFCI00834\");{if(void 0===n&&(n=o.contentItems.indexOf(s)),null!==i&&o.addPopInParentId(i),void 0===e){const i=globalThis.screenX||globalThis.screenLeft,n=globalThis.screenY||globalThis.screenTop,o=t.element.offsetLeft,s=t.element.offsetTop,{width:r,height:a}=kt(t.element);e={left:i+o,top:n+s,width:r,height:a}}const r=t.toConfig();if(t.remove(),ft.isRootItemConfig(r))return this.createPopoutFromItemConfig(r,e,i,n);throw new Error(`${tt[0]}`)}}beginVirtualSizedContainerAdding(){0==++this._virtualSizedContainerAddingBeginCount&&(this._virtualSizedContainers.length=0)}addVirtualSizedContainer(t){this._virtualSizedContainers.push(t)}endVirtualSizedContainerAdding(){if(0==--this._virtualSizedContainerAddingBeginCount){const t=this._virtualSizedContainers.length;if(t>0){this.fireBeforeVirtualRectingEvent(t);for(let e=0;ethis.emit(\"windowOpened\",a))),a.on(\"closed\",(()=>this.reconcilePopoutWindows())),this._openPopouts.push(a),this.layoutConfig.settings.closePopoutsOnUnload&&!this._windowBeforeUnloadListening&&(globalThis.addEventListener(\"beforeunload\",this._windowBeforeUnloadListener,{passive:!0}),this._windowBeforeUnloadListening=!0),a}closeAllOpenPopouts(){for(let t=0;tglobalThis.close()),1)}getArea(t,e){let i=null,n=1/0;for(let o=0;o=s.x1&&t=s.y1&&es.surface&&(n=s.surface,i=s)}return i}calculateItemAreas(){const t=this.getAllContentItems(),e=this._groundItem;if(void 0===e)throw new J(\"LMCIAR44365\");if(1!==t.length){e.contentItems[0].isStack?this._itemAreas=[]:this._itemAreas=e.createSideAreas();for(let e=0;e0){let e=t[0];if(Gt.isComponentItem(e)){const t=e.parent;if(null===t)throw new K(\"LMXLLMI69999\");e=t}if(!Gt.isStack(e))throw new X(\"LMCLLMI19993\");e.maximise()}}}processMaximiseStack(t){if(this._maximisedStack=t,t.on(\"beforeItemDestroyed\",this._maximisedStackBeforeDestroyedListener),t.element.classList.add(\"lm_maximised\"),t.element.insertAdjacentElement(\"afterend\",this._maximisePlaceholder),void 0===this._groundItem)throw new J(\"LMMXI19993\");{this._groundItem.element.prepend(t.element);const{width:e,height:i}=kt(this._containerElement);Tt(t.element,e),At(t.element,i),t.updateSize(!0),t.focusActiveContentItem(),this._maximisedStack.emit(\"maximised\"),this.emit(\"stateChanged\")}}processMinimiseMaximisedStack(){if(void 0===this._maximisedStack)throw new X(\"LMMMS74422\");{const t=this._maximisedStack;if(null===t.parent)throw new K(\"LMMI13668\");t.element.classList.remove(\"lm_maximised\"),this._maximisePlaceholder.insertAdjacentElement(\"afterend\",t.element),this._maximisePlaceholder.remove(),this.updateRootSize(!0),this._maximisedStack=void 0,t.off(\"beforeItemDestroyed\",this._maximisedStackBeforeDestroyedListener),t.emit(\"minimised\"),this.emit(\"stateChanged\")}}reconcilePopoutWindows(){const t=[];for(let e=0;e{this._resizeTimeoutId=void 0,this.beginSizeInvalidation(),this.endSizeInvalidation()}),this.resizeDebounceInterval))}checkClearResizeTimeout(){void 0!==this._resizeTimeoutId&&(clearTimeout(this._resizeTimeoutId),this._resizeTimeoutId=void 0)}setContainer(){var t;const e=document.body,i=null!==(t=this._containerElement)&&void 0!==t?t:e;if(i===e){this.resizeWithContainerAutomatically=!0;const t=document.documentElement;t.style.height=\"100%\",t.style.margin=\"0\",t.style.padding=\"0\",t.style.overflow=\"clip\",e.style.height=\"100%\",e.style.margin=\"0\",e.style.padding=\"0\",e.style.overflow=\"clip\"}this._containerElement=i}onBeforeUnload(){this.destroy()}adjustColumnsResponsive(){if(void 0===this._groundItem)throw new J(\"LMACR20883\");if(this._firstLoad=!1,this.useResponsiveLayout()&&!this._updatingColumnsResponsive&&this._groundItem.contentItems.length>0&&this._groundItem.contentItems[0].isRow){if(void 0===this._groundItem||null===this._width)throw new J(\"LMACR77412\");{const t=this._groundItem.contentItems[0].contentItems.length;if(t<=1)return;{const e=this.layoutConfig.dimensions.defaultMinItemWidth;if(t*e<=this._width)return;{this._updatingColumnsResponsive=!0;const i=t-Math.max(Math.floor(this._width/e),1),n=this._groundItem.contentItems[0],o=this.getAllStacks();if(0===o.length)throw new X(\"LMACRS77413\");{const t=o[0];for(let e=0;en?void 0:{parentItem:t,index:o}}}case 1:if(void 0===this._focusedComponentItem)return;{const t=this._focusedComponentItem.parentItem;return this.tryCreateLocationFromParentItem(t,e)}case 2:{const t=this.findFirstContentItemType(at.stack);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 3:{let t=this.findFirstContentItemType(at.row);return void 0!==t?this.tryCreateLocationFromParentItem(t,e):(t=this.findFirstContentItemType(at.column),void 0!==t?this.tryCreateLocationFromParentItem(t,e):void 0)}case 4:{const t=this.findFirstContentItemType(at.row);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 5:{const t=this.findFirstContentItemType(at.column);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 6:if(void 0===this._groundItem)throw new J(\"LMFLRIF18244\");return void 0!==this.rootItem?void 0:void 0===e||0===e?{parentItem:this._groundItem,index:0}:void 0;case 7:if(void 0===this._groundItem)throw new J(\"LMFLF18244\");{const t=this._groundItem.contentItems;if(0===t.length)return void 0===e||0===e?{parentItem:this._groundItem,index:0}:void 0;{const i=t[0];return this.tryCreateLocationFromParentItem(i,e)}}}}tryCreateLocationFromParentItem(t,e){const i=t.contentItems.length;return void 0===e?{parentItem:t,index:i}:e<0||e>i?void 0:{parentItem:t,index:e}}}!function(t){t.createMaximisePlaceElement=function(t){const e=t.createElement(\"div\");return e.classList.add(\"lm_maximise_place\"),e},t.createTabDropPlaceholderElement=function(t){const e=t.createElement(\"div\");return e.classList.add(\"lm_drop_tab_placeholder\"),e},t.defaultLocationSelectors=[{typeId:1,index:void 0},{typeId:2,index:void 0},{typeId:3,index:void 0},{typeId:7,index:void 0}],t.afterFocusedItemIfPossibleLocationSelectors=[{typeId:0,index:1},{typeId:2,index:void 0},{typeId:3,index:void 0},{typeId:7,index:void 0}]}(ae||(ae={}));class le extends ae{constructor(t,e,i,n){if(super(le.createLayoutManagerConstructorParameters(t,e)),this._bindComponentEventHanlderPassedInConstructor=!1,this._creationTimeoutPassed=!1,void 0!==e&&\"function\"==typeof e&&(this.bindComponentEvent=e,this._bindComponentEventHanlderPassedInConstructor=!0,void 0!==i&&(this.unbindComponentEvent=i)),!this._bindComponentEventHanlderPassedInConstructor&&this.isSubWindow){if(void 0===this._constructorOrSubWindowLayoutConfig)throw new J(\"VLC98823\");{const t=xt.resolve(this._constructorOrSubWindowLayoutConfig);this.layoutConfig=Object.assign(Object.assign({},t),{root:void 0})}}!0!==n&&(this.deprecatedConstructor||this.init())}destroy(){this.bindComponentEvent=void 0,this.unbindComponentEvent=void 0,super.destroy()}init(){if(this._bindComponentEventHanlderPassedInConstructor||\"loading\"!==document.readyState&&null!==document.body){if(!this._bindComponentEventHanlderPassedInConstructor&&!0===this.isSubWindow&&!this._creationTimeoutPassed)return setTimeout((()=>this.init()),7),void(this._creationTimeoutPassed=!0);!0===this.isSubWindow&&(this._bindComponentEventHanlderPassedInConstructor||this.clearHtmlAndAdjustStylesForSubWindow(),window.__glInstance=this),super.init()}else document.addEventListener(\"DOMContentLoaded\",(()=>this.init()),{passive:!0})}clearHtmlAndAdjustStylesForSubWindow(){const t=document.head,e=new Array(4);e[0]=document.querySelectorAll(\"body link\"),e[1]=document.querySelectorAll(\"body style\"),e[2]=document.querySelectorAll(\"template\"),e[3]=document.querySelectorAll(\".gl_keep\");for(let i=0;ithis.emit(\"popIn\"))),document.body.appendChild(t),!0}}bindComponent(t,e){if(void 0!==this.bindComponentEvent){return this.bindComponentEvent(t,e)}if(void 0!==this.getComponentEvent)return{virtual:!1,component:this.getComponentEvent(t,e)};{const t=`${tt[2]}: ${JSON.stringify(e)}`;throw new Z(t)}}unbindComponent(t,e,i){if(void 0!==this.unbindComponentEvent)this.unbindComponentEvent(t);else if(!e&&void 0!==this.releaseComponentEvent){if(void 0===i)throw new J(\"VCUCRCU333998\");this.releaseComponentEvent(t,i)}}}!function(t){let e=!1;t.createLayoutManagerConstructorParameters=function(t,i){const n=e?null:new URL(document.location.href).searchParams.get(\"gl-window\");e=!0;const o=null!==n;let s,r;if(null!==n){const e=localStorage.getItem(n);if(null===e)throw new Error(\"Null gl-window Config\");localStorage.removeItem(n);const i=JSON.parse(e),o=_t.unminifyConfig(i);r=xt.fromResolved(o),t instanceof HTMLElement&&(s=t)}else void 0===t?r=void 0:t instanceof HTMLElement?(r=void 0,s=t):r=t,void 0===s&&i instanceof HTMLElement&&(s=i);return{constructorOrSubWindowLayoutConfig:r,isSubWindow:o,containerElement:s}}}(le||(le={}));class he extends le{constructor(t,e,i){super(t,e,i,!0),this._componentTypesMap=new Map,this._registeredComponentMap=new Map,this._virtuableComponentMap=new Map,this._containerVirtualRectingRequiredEventListener=(t,e,i)=>this.handleContainerVirtualRectingRequiredEvent(t,e,i),this._containerVirtualVisibilityChangeRequiredEventListener=(t,e)=>this.handleContainerVirtualVisibilityChangeRequiredEvent(t,e),this._containerVirtualZIndexChangeRequiredEventListener=(t,e,i)=>this.handleContainerVirtualZIndexChangeRequiredEvent(t,e,i),this.deprecatedConstructor||this.init()}registerComponent(t,e,i=!1){if(\"function\"!=typeof e)throw new $(\"registerComponent() componentConstructorOrFactoryFtn parameter is not a function\");if(e.hasOwnProperty(\"prototype\")){const n=e;this.registerComponentConstructor(t,n,i)}else{const n=e;this.registerComponentFactoryFunction(t,n,i)}}registerComponentConstructor(t,e,i=!1){if(\"function\"!=typeof e)throw new Error(tt[1]);if(void 0!==this._componentTypesMap.get(t))throw new Z(`${tt[3]}: ${t}`);this._componentTypesMap.set(t,{constructor:e,factoryFunction:void 0,virtual:i})}registerComponentFactoryFunction(t,e,i=!1){if(\"function\"!=typeof e)throw new Z(\"Please register a constructor function\");if(void 0!==this._componentTypesMap.get(t))throw new Z(`${tt[3]}: ${t}`);this._componentTypesMap.set(t,{constructor:void 0,factoryFunction:e,virtual:i})}registerComponentFunction(t){this.registerGetComponentConstructorCallback(t)}registerGetComponentConstructorCallback(t){if(\"function\"!=typeof t)throw new Error(\"Please register a callback function\");void 0!==this._getComponentConstructorFtn&&console.warn(\"Multiple component functions are being registered. Only the final registered function will be used.\"),this._getComponentConstructorFtn=t}getRegisteredComponentTypeNames(){const t=this._componentTypesMap.keys();return Array.from(t)}getComponentInstantiator(t){let e;const i=pt.resolveComponentTypeName(t);return void 0!==i&&(e=this._componentTypesMap.get(i)),void 0===e&&void 0!==this._getComponentConstructorFtn&&(e={constructor:this._getComponentConstructorFtn(t),factoryFunction:void 0,virtual:!1}),e}bindComponent(t,e){let i;const n=pt.resolveComponentTypeName(e);let o;if(void 0!==n&&(i=this._componentTypesMap.get(n)),void 0===i&&void 0!==this._getComponentConstructorFtn&&(i={constructor:this._getComponentConstructorFtn(e),factoryFunction:void 0,virtual:!1}),void 0!==i){const s=i.virtual;let r,a;r=void 0===e.componentState?void 0:Ut({},e.componentState);const l=i.constructor;if(void 0!==l)a=new l(t,r,s);else{const e=i.factoryFunction;if(void 0===e)throw new X(\"LMBCFFU10008\");a=e(t,r,s)}if(s){if(void 0===a)throw new J(\"GLBCVCU988774\");{const e=a,i=e.rootHtmlElement;if(void 0===i)throw new Z(`${tt[5]}: ${n}`);!function(t){const e=\"absolute\";t.style.position!==e&&(t.style.position=e)}(i),this.container.appendChild(i),this._virtuableComponentMap.set(t,e),t.virtualRectingRequiredEvent=this._containerVirtualRectingRequiredEventListener,t.virtualVisibilityChangeRequiredEvent=this._containerVirtualVisibilityChangeRequiredEventListener,t.virtualZIndexChangeRequiredEvent=this._containerVirtualZIndexChangeRequiredEventListener}}this._registeredComponentMap.set(t,a),o={virtual:i.virtual,component:a}}else o=super.bindComponent(t,e);return o}unbindComponent(t,e,i){if(void 0===this._registeredComponentMap.get(t))super.unbindComponent(t,e,i);else{const e=this._virtuableComponentMap.get(t);if(void 0!==e){const i=e.rootHtmlElement;if(void 0===i)throw new X(\"GLUC77743\",t.title);this.container.removeChild(i),this._virtuableComponentMap.delete(t)}}}fireBeforeVirtualRectingEvent(t){this._goldenLayoutBoundingClientRect=this.container.getBoundingClientRect(),super.fireBeforeVirtualRectingEvent(t)}handleContainerVirtualRectingRequiredEvent(t,e,i){const n=this._virtuableComponentMap.get(t);if(void 0===n)throw new J(\"GLHCSCE55933\");{const o=n.rootHtmlElement;if(void 0===o)throw new Z(tt[4]+\" \"+t.title);{const n=t.element.getBoundingClientRect(),s=n.left-this._goldenLayoutBoundingClientRect.left;o.style.left=zt(s);const r=n.top-this._goldenLayoutBoundingClientRect.top;o.style.top=zt(r),Tt(o,e),At(o,i)}}}handleContainerVirtualVisibilityChangeRequiredEvent(t,e){const i=this._virtuableComponentMap.get(t);if(void 0===i)throw new J(\"GLHCVVCRE55934\");{const n=i.rootHtmlElement;if(void 0===n)throw new Z(tt[4]+\" \"+t.title);Dt(n,e)}}handleContainerVirtualZIndexChangeRequiredEvent(t,e,i){const n=this._virtuableComponentMap.get(t);if(void 0===n)throw new J(\"GLHCVZICRE55935\");{const e=n.rootHtmlElement;if(void 0===e)throw new Z(tt[4]+\" \"+t.title);e.style.zIndex=i}}}const de=\"initial_\",ce={show:\"top\",popout:!1,maximise:!1,close:\"close-tab-unused\"},me={headerHeight:31},ue={hasHeaders:!0,reorderEnabled:!0},pe={popoutWholeStack:!1,constrainDragToContainer:!1,constrainDragToHeaders:!1,preventDragout:!1,showMaximiseIcon:!1,showPopoutIcon:!1,showCloseIcon:!1,blockedPopoutsThrowError:!0,closePopoutsOnUnload:!0,selectionEnabled:!1};var ge,fe;class ve{constructor(e){this.layout=e,ge.set(this,void 0),fe.set(this,void 0),this.handleResize=t=>{t.forEach((t=>this.resizeElement(t.target)))},this.handleMutation=()=>{this.layout.viewComponentsByContainerElement.forEach((t=>{this.resizeElement(t.container.element)}))},t.__classPrivateFieldSet(this,ge,new ResizeObserver(this.handleResize),\"f\"),t.__classPrivateFieldSet(this,fe,new MutationObserver(this.handleMutation),\"f\")}observeMutations(e){t.__classPrivateFieldGet(this,fe,\"f\")?.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[\"class\"]})}destroy(){t.__classPrivateFieldGet(this,ge,\"f\").disconnect(),t.__classPrivateFieldGet(this,fe,\"f\").disconnect()}observeContainer(e){t.__classPrivateFieldGet(this,ge,\"f\").observe(e)}unobserveContainer(e){t.__classPrivateFieldGet(this,ge,\"f\").unobserve(e)}resizeElement(t){const e=this.layout.viewComponentsByContainerElement.get(t);e&&e.resize()}}ge=new WeakMap,fe=new WeakMap;var _e={};Object.defineProperty(_e,\"__esModule\",{value:!0});var ye=_e.BaseItem=void 0;class Ce{constructor(t,e,i){this._item=t,this._layout=e,this._wrap=i}get raw(){return this._item}get layout(){return this._layout}get type(){return this._item.type}get contentItems(){return(this._item.contentItems??[]).map((t=>this._wrap(t)))}get parent(){const t=this._item.parent;return t?this._wrap(t):null}setActiveContentItem(t,e){if(\"stack\"!==this.type)throw new Error(`Cannot call setActiveContentItem from a non-stack item: ${this.type}`);this._item.setActiveContentItem(t.raw,e)}static wrapInternal(t,e,i){const n=Ce.wrapCache.get(e);if(n)return n;const o=new t(e,i,(e=>Ce.wrapInternal(t,e,i)));return Ce.wrapCache.set(e,o),o}}ye=_e.BaseItem=Ce,Ce.wrapCache=new WeakMap;const we=t=>!!t&&\"contentItems\"in t&&(t.isRow||t.isColumn);class Ie extends ye{isRoot(){return!!this._item.parent?.isGround}getBounds(){return this._item.element.getBoundingClientRect()}get viewName(){if(this._item.isComponent){const{component:t}=this._item;return t.identity.name}throw new Error(\"View name not found\")}onDestroyed(t){const e=({target:i})=>{i===this._item&&(t(),this._item.off(\"itemDestroyed\",e))};this._item.on(\"itemDestroyed\",e)}createAdjacentStack({position:t=\"right\"}={}){const e=this.raw;if(ee.isStack(e)&&e.parent){const i=[\"top\",\"bottom\"].includes(t)?\"column\":\"row\",n=[\"left\",\"top\"].includes(t)?1:0,o=we(e.parent)?e.parent:e.layoutManager,s=o,r=e.parent.contentItems.indexOf(e);e.parent.isGround&&e.parent.removeChild(e,!0);const a=o.newItem({type:i,content:[{type:\"stack\",content:[]}]},r);if(!a)throw new Error(\"createAdjacentStack: Failed to create new container\");const l=a.contentItems[0];return a.addChild(this.raw,n),we(s)&&s.removeChild(e,!0),this._wrap(l)}throw new Error(`Cannot creat adjacent stacks for type: ${e.type}, must be type 'stack'`)}setActiveContentItem(t,e=!0){if(!ee.isStack(this._item))throw new Error(`Cannot call setActiveContentItem from a non-stack item: ${this.type}`);this._item.setActiveComponentItem(t.raw,!e)}static wrap(t,e){return ye.wrapInternal(Ie,t,e)}}function be(t=[],e){for(const i of t)\"component\"===i.type?Object.keys(e).forEach((t=>{t in i&&(i.componentState={[`${de}${t}`]:i[t],...i.componentState}),i[t]=e[t]})):be(i.content,e)}function Se(t=[],e,i){for(const n of t)if(\"component\"===n.type)Object.keys(e).forEach((t=>{if(`${de}${t}`in n.componentState)return n[t]=n.componentState[`${de}${t}`],void delete n.componentState[`${de}${t}`];n[t]=e[t]}));else{if(n.size&&(\"row\"===i||\"column\"===i)){n[\"row\"===i?\"width\":\"height\"]=n.size?.includes(\".\")?parseFloat(n.size):parseInt(n.size)}Se(n.content,e,n.type)}}function Ee(t){if(t.root){t.root.content&&Se([t.root],{componentName:\"view\",isClosable:!0});const e=t.root;t.content=[e],delete t.root}return t}const xe=e=>class extends e{connectedCallback(){if(!this.name||!this.uuid)throw new Error(\" Name or uuid attribute missing\");if(!this.src)throw new Error(\" missing 'src' attribute.\");this.#t||(this.#t=document.createElement(\"iframe\"),this.#t.src=this.src,this.#t.style.height=\"100%\",this.#t.style.width=\"100%\",this.#t.style.border=\"none\",this.forceFrameName?this.#t.setAttribute(\"name\",this.forceFrameName):this.#t.setAttribute(\"name\",t.encodeOptions({brokerUrl:this.brokerUrl,name:this.name,uuid:this.uuid,providerId:this.providerId,contextGroup:this.contextGroup},\"of-frame\")),this.#t.setAttribute(\"id\",this.name),this.appendChild(this.#t))}#t;get brokerUrl(){return this.getAttribute(\"of-broker\")}set brokerUrl(t){t&&this.setAttribute(\"of-broker\",t)}get name(){return this.getAttribute(\"of-name\")}set name(t){t&&this.setAttribute(\"of-name\",t)}get forceFrameName(){return this.getAttribute(\"forceFrameName\")}set forceFrameName(t){t&&this.setAttribute(\"forceFrameName\",t)}get uuid(){return this.getAttribute(\"of-uuid\")}set uuid(t){t&&this.setAttribute(\"of-uuid\",t)}get src(){return this.getAttribute(\"src\")}set src(t){t&&this.setAttribute(\"src\",t)}get providerId(){return this.getAttribute(\"of-provider-id\")}set providerId(t){t&&this.setAttribute(\"of-provider-id\",t)}get contextGroup(){return this.getAttribute(\"of-context-group\")}set contextGroup(t){t&&this.setAttribute(\"of-context-group\",t)}static get observedAttributes(){return[\"name\"]}};class Le{static create(t){const e=document.createElement(\"of-view\");return Object.entries(t).forEach((([t,i])=>{e.setAttribute(t,i)})),e}}customElements.define(\"of-view\",xe(HTMLElement));class ze{constructor(t,i,n,{brokerUrl:o,interopConfig:s},r){this.container=t,this.config=i,this.ofView=null,this.isDragging=()=>this.container.tab.element?.className.includes(\"lm_dragging\")??!1;const{url:a,web:l,interop:h,name:d}=i||{},c=d??`internal-generated-view-${e.v4()}`;if(this.identity={uuid:n,name:c},this.container.element.setAttribute(\"of-name\",c),this.container.element.id=`container-${c}`,this.container.parent.id=c,void 0===a)return void this.handleUrlMissing();const m=this.updateTitleIfNotSet(a),u={\"of-broker\":o,\"of-uuid\":n,\"of-name\":c,src:a};l?.frameName&&(u.forceFrameName=l.frameName);const p=h?.currentContextGroup??s?.currentContextGroup;p&&(u[\"of-context-group\"]=p),s?.providerId&&(u[\"of-provider-id\"]=s?.providerId),this.ofView=Le.create(u),this.ofView.title=m??`Iframe: ${a}`,r.appendChild(this.ofView),this.ofView.style.position=\"absolute\"}updateTitleIfNotSet(t){return\"view\"===this.container.parent.title&&this.container.parent.setTitle(t),this.container.parent.title}handleUrlMissing(){const t=document.createElement(\"div\");t.setAttribute(\"style\",\"padding: 20px\");t.innerText=\"No URL provided\",this.container.element.appendChild(t)}destroy(){this.ofView?.remove(),this.ofView=null}closeView(){this.container.close()}resize(){if(this.ofView){if(this.isDragging())return void(this.ofView.style.display=\"none\");const t=this.container.element.getBoundingClientRect();this.ofView.style.position=\"absolute\",this.ofView.style.height=`${t.height}px`,this.ofView.style.width=`${t.width}px`,this.ofView.style.inset=`${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`,this.ofView.style.display=\"block\"}}}class Me extends U{static overrideConfig(t){const e={...ue,...t.settings,...pe};return e.reorderEnabled?be(t.content,{isClosable:!0}):be(t.content,{reorderEnabled:!1}),{dimensions:me,...t,settings:e,header:{...ce,show:!1!==t.settings?.hasHeaders&&ce.show}}}constructor(t,e,i,{options:n},o,s){super(),this.identity=t,this.container=e,this.initialConfig=i,this.layoutManager=o,this.platformProvider=s,this.viewComponentsByContainerElement=new Map,this.layoutContentCache=_.getSingleInstance(),this.reparentingViews=new Set,this.goldenLayoutDestroyed=!1,this.createViewComponent=(t,e)=>{m.handleSharedView(this.layoutManager,this.identity,e);const i=new ze(t,e,this.identity.uuid,this.options,this.iframeContainer);return e&&!1===e[`${de}isClosable`]&&this.stylesheet.insertRule(`#tab-${i.identity.name} .lm_close_tab { display: none; }`),this.viewComponentsByContainerElement.set(t.element,i),this.resizeController.observeContainer(t.element),i},this.iframeContainer=document.createElement(\"div\"),this.iframeContainer.id=`openfin-layout-iframe-container-${this.identity.layoutName}`,this.domEmitter=new V(e),this.setupStylesheets(),this.layout=new he(this.container),this.layout.resizeWithContainerAutomatically=!0,this.options=n,this.layout.registerComponent(\"view\",this.createViewComponent),this.setupListeners(),this.resizeController=new ve(this),this.layout.loadLayout(Me.overrideConfig(i));const r=document.createElement(\"div\");r.id=`openfin-layout-shadow-container-${this.identity.layoutName}`,r.attachShadow({mode:\"open\",delegatesFocus:!1}).appendChild(this.iframeContainer),this.container.appendChild(r),this.resizeController.observeMutations(this.container)}getStackByView({name:t}){const e=this.layout.findFirstComponentItemById(t);if(e?.parent&&e?.parent?.isStack)return Ie.wrap(e.parent,this)}getRoot(){return Ie.wrap(this.layout.rootItem,this)}async platformCloseView(t){const e=[...this.viewComponentsByContainerElement.values()].find((e=>e.identity.name===t.name));if(!e)throw new Error(`View with name: ${t.name} not found in layout.`);e.closeView()}async platformCreateView(t,{location:e,targetView:i}={}){if(i)throw new Error(\"TargetView not supported in web\");const n={options:this.platformProvider.normalizeOptions(t),target:this.identity,location:e};return this.insertView(n)}setupStylesheets(){if(this.container.setAttribute(\"data-openfin-layout-name\",this.identity.layoutName),this.stylesheet=new CSSStyleSheet,this.stylesheet.insertRule(\".lm_close { display: none; }\"),document.adoptedStyleSheets.push(this.stylesheet),this.initialConfig.settings?.preventSplitterResize){const t=`\\n [data-openfin-layout-name='${this.identity.layoutName}'] .lm_splitter {\\n pointer-events: none;\\n }`;this.stylesheet.insertRule(t)}}insertView({options:t,location:e,targetView:i}){const n=e?this.layoutContentCache.getItemOrUndefined(e.id):void 0,o=i?this.layoutContentCache.getItemOrUndefined(i.name):void 0,s=n??o??Ie.wrap(this.layout.rootItem,this);let r;if(ee.isStack(s.raw))r=s.raw;else{if(!we(s.raw))throw new Error(\"Cannot add a view at the requested location\");r=s.raw.newItem({type:\"stack\",content:[]})}const a=Math.min(r.contentItems.length,e?.index??r.contentItems.length);let l=this.layout.findFirstComponentItemById(t.name);l?(l.parent&&l.parent.removeChild(l,!0),r.addChild(l,a)):l=r.newComponent(\"view\",t,t.title??t.url??\"Default Title\",a);const h=l.component.identity;return Promise.resolve({identity:h})}replaceView({viewToReplace:t,newView:e}){throw new Error(\"Method not implemented.\")}replaceLayout(t){throw new Error(\"Method not implemented.\")}async cleanupView(t){}applyPreset(t){throw new Error(\"Method not implemented.\")}getCurrentViews(){return[...this.viewComponentsByContainerElement.values()].map((t=>t.identity))}async getFrameSnapshot(){return Ee(xt.fromResolved(this.layout.toConfig()))}isVisible(){return W(this.container)}async onViewDetached({viewIdentity:t}){this.reparentingViews.add(t.name),this.platformCloseView(t)}async destroy(){this.goldenLayoutDestroyed||(this.goldenLayoutDestroyed=!0,this.layout.destroy()),this.iframeContainer.remove(),this.resizeController.destroy(),document.adoptedStyleSheets=document.adoptedStyleSheets.filter((t=>t!==this.stylesheet)),this.viewComponentsByContainerElement.clear()}setupListeners(){this.container.addEventListener(\"pointerdown\",(t=>{if(t.target instanceof HTMLElement){const e=t.target.classList;[\"lm_tab\",\"lm_title\",\"lm_splitter\",\"lm_drag_handle\"].some((t=>e.contains(t)))&&(this.handleDragStart(),2===t.button&&t.stopPropagation())}}),!0),document.addEventListener(\"pointerup\",(()=>this.handleDragEnd()),!0),this.layout.on(\"tabCreated\",(t=>{const e=t.componentItem.component;t.element.id=`tab-${e.identity.name}`,this.domEmitter.dispatchLocalEvent(\"tab-created\",e.identity)})),this.layout.on(\"itemCreated\",(({target:t})=>{const e=t;if(Gt.isComponentItem(e)){const t=e.component;this.domEmitter.dispatchLocalEvent(\"container-created\",t.identity)}})),this.layout.on(\"itemDestroyed\",(t=>{const e=t.target;if(Gt.isComponentItem(e)){const t=e.component;this.removeViewComponent(t)}})),this.layout.on(\"itemDropped\",(()=>{this.handleDragEnd()}))}handleDragStart(){this.iframeContainer.style.pointerEvents=\"none\"}handleDragEnd(){this.iframeContainer.style.pointerEvents=\"\"}removeViewComponent(t){if(t.config&&!1===t.config[`${de}isClosable`]){const e=[...this.stylesheet.cssRules].findIndex((e=>e.cssText.includes(`#tab-${t.identity.name}`)));this.stylesheet.deleteRule(e)}t.destroy(),this.viewComponentsByContainerElement.delete(t.container.element),this.resizeController.unobserveContainer(t.container.element),this.reparentingViews.has(t.identity.name)?this.reparentingViews.delete(t.identity.name):this.platformProvider.closeView(t.identity.name);0===this.getCurrentViews().length&&(this.goldenLayoutDestroyed||(this.goldenLayoutDestroyed=!0,m.handleLastViewRemoved(this.layoutManager,this.identity)))}}class Pe{constructor(t,e,i,n){this.windowIdentity=t,this.connectConfig=e,this.provider=i,this.fallbackContainer=n}async createLayout(t,e){if(!(\"container\"in t)&&!this.fallbackContainer)throw new Error(\"Container property is not optional in web\");const{layoutName:i}=t,n=t,o=this.provider.initLayoutViews(n),s=n.container??this.fallbackContainer,r={...this.windowIdentity,layoutName:i},a=new Me(r,s,o,this.connectConfig,e,this.provider);m.registerLayout(e,i,a),this.fallbackContainer=null}async getLayoutSnapshot(t){return t.getLayoutSnapshot()}async handleLastViewRemoved(t){}}class Te{static async init(e){const i=e.getFin().InterApplicationBus.Channel,n=await i.create(`custom-frame-${e.me.uuid}`);return n.setDefaultAction((async(t,{target:e,opts:i},o)=>{const s=n.connections.find((t=>t.name===e.name));if(s)return n.dispatch(s,t,{...i,target:e});throw new Error(`Client with name ${e.name} not found`)})),await t.relayChannelClientApi_1(n,\"layout-relay\"),new Te(e)}constructor(t){this.wire=t,this.viewNames=new Set}normalizeOptions(t,i=\"default\"){const n=this.wire.me.uuid;let{name:o=`internal-generated-view-${e.v4()}`}=t;return o.match(/^internal-generated-view-/)&&this.viewNames.has(o)&&\"duplicate\"===i&&(o=`internal-generated-view-${e.v4()}`),this.viewNames.add(o),{...t,name:o,uuid:n}}closeView(t){this.viewNames.delete(t)}initLayoutViews({layout:t,multiInstanceViewBehavior:e}){return H((t=>{if(\"component\"===t.type&&t.componentState){const i=this.normalizeOptions(t.componentState,e);return{...t,componentState:i}}return t}),t)}}var Ae;const ke=t=>t;Ae=new WeakMap,exports.WebLayoutEntryPoint=class{constructor(e){Ae.set(this,void 0),this.initLayoutManager=async(e,i,{container:n,layoutManagerOverride:o})=>{const s=await Te.init(i),r=o??ke,a=new Pe(i.me,t.__classPrivateFieldGet(this,Ae,\"f\"),s,n),l=new(r(m.createClosedConstructor(a)));return await M(i,l),l},this.applyLayoutSnapshot=async(e,i,n)=>{await i.applyLayoutSnapshot(t.__classPrivateFieldGet(this,Ae,\"f\").platform.layoutSnapshot)},this.createLayout=async(t,e)=>m.createLayout(t,e),this.destroyLayout=async(t,e)=>m.destroyLayout(t,e),t.__classPrivateFieldSet(this,Ae,e,\"f\")}};\n","'use strict'\n\nexports.byteLength = byteLength\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\nfor (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i]\n revLookup[code.charCodeAt(i)] = i\n}\n\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction getLens (b64) {\n var len = b64.length\n\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // Trim off extra bytes after placeholder bytes are found\n // See: https://github.com/beatgammit/base64-js/issues/42\n var validLen = b64.indexOf('=')\n if (validLen === -1) validLen = len\n\n var placeHoldersLen = validLen === len\n ? 0\n : 4 - (validLen % 4)\n\n return [validLen, placeHoldersLen]\n}\n\n// base64 is 4/3 + up to two characters of the original data\nfunction byteLength (b64) {\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction _byteLength (b64, validLen, placeHoldersLen) {\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction toByteArray (b64) {\n var tmp\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n\n var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))\n\n var curByte = 0\n\n // if there are placeholders, only get up to the last complete 4 chars\n var len = placeHoldersLen > 0\n ? validLen - 4\n : validLen\n\n var i\n for (i = 0; i < len; i += 4) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 18) |\n (revLookup[b64.charCodeAt(i + 1)] << 12) |\n (revLookup[b64.charCodeAt(i + 2)] << 6) |\n revLookup[b64.charCodeAt(i + 3)]\n arr[curByte++] = (tmp >> 16) & 0xFF\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 2) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 2) |\n (revLookup[b64.charCodeAt(i + 1)] >> 4)\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 1) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 10) |\n (revLookup[b64.charCodeAt(i + 1)] << 4) |\n (revLookup[b64.charCodeAt(i + 2)] >> 2)\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] +\n lookup[num >> 12 & 0x3F] +\n lookup[num >> 6 & 0x3F] +\n lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n var tmp\n var output = []\n for (var i = start; i < end; i += 3) {\n tmp =\n ((uint8[i] << 16) & 0xFF0000) +\n ((uint8[i + 1] << 8) & 0xFF00) +\n (uint8[i + 2] & 0xFF)\n output.push(tripletToBase64(tmp))\n }\n return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n var tmp\n var len = uint8.length\n var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n var parts = []\n var maxChunkLength = 16383 // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1]\n parts.push(\n lookup[tmp >> 2] +\n lookup[(tmp << 4) & 0x3F] +\n '=='\n )\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + uint8[len - 1]\n parts.push(\n lookup[tmp >> 10] +\n lookup[(tmp >> 4) & 0x3F] +\n lookup[(tmp << 2) & 0x3F] +\n '='\n )\n }\n\n return parts.join('')\n}\n","/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n/* eslint-disable no-proto */\n\n'use strict'\n\nconst base64 = require('base64-js')\nconst ieee754 = require('ieee754')\nconst customInspectSymbol =\n (typeof Symbol === 'function' && typeof Symbol['for'] === 'function') // eslint-disable-line dot-notation\n ? Symbol['for']('nodejs.util.inspect.custom') // eslint-disable-line dot-notation\n : null\n\nexports.Buffer = Buffer\nexports.SlowBuffer = SlowBuffer\nexports.INSPECT_MAX_BYTES = 50\n\nconst K_MAX_LENGTH = 0x7fffffff\nexports.kMaxLength = K_MAX_LENGTH\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Print warning and recommend using `buffer` v4.x which has an Object\n * implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * We report that the browser does not support typed arrays if the are not subclassable\n * using __proto__. Firefox 4-29 lacks support for adding new properties to `Uint8Array`\n * (See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438). IE 10 lacks support\n * for __proto__ and has a buggy typed array implementation.\n */\nBuffer.TYPED_ARRAY_SUPPORT = typedArraySupport()\n\nif (!Buffer.TYPED_ARRAY_SUPPORT && typeof console !== 'undefined' &&\n typeof console.error === 'function') {\n console.error(\n 'This browser lacks typed array (Uint8Array) support which is required by ' +\n '`buffer` v5.x. Use `buffer` v4.x if you require old browser support.'\n )\n}\n\nfunction typedArraySupport () {\n // Can typed array instances can be augmented?\n try {\n const arr = new Uint8Array(1)\n const proto = { foo: function () { return 42 } }\n Object.setPrototypeOf(proto, Uint8Array.prototype)\n Object.setPrototypeOf(arr, proto)\n return arr.foo() === 42\n } catch (e) {\n return false\n }\n}\n\nObject.defineProperty(Buffer.prototype, 'parent', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.buffer\n }\n})\n\nObject.defineProperty(Buffer.prototype, 'offset', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.byteOffset\n }\n})\n\nfunction createBuffer (length) {\n if (length > K_MAX_LENGTH) {\n throw new RangeError('The value \"' + length + '\" is invalid for option \"size\"')\n }\n // Return an augmented `Uint8Array` instance\n const buf = new Uint8Array(length)\n Object.setPrototypeOf(buf, Buffer.prototype)\n return buf\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new TypeError(\n 'The \"string\" argument must be of type string. Received type number'\n )\n }\n return allocUnsafe(arg)\n }\n return from(arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\nfunction from (value, encodingOrOffset, length) {\n if (typeof value === 'string') {\n return fromString(value, encodingOrOffset)\n }\n\n if (ArrayBuffer.isView(value)) {\n return fromArrayView(value)\n }\n\n if (value == null) {\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n }\n\n if (isInstance(value, ArrayBuffer) ||\n (value && isInstance(value.buffer, ArrayBuffer))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof SharedArrayBuffer !== 'undefined' &&\n (isInstance(value, SharedArrayBuffer) ||\n (value && isInstance(value.buffer, SharedArrayBuffer)))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof value === 'number') {\n throw new TypeError(\n 'The \"value\" argument must not be of type number. Received type number'\n )\n }\n\n const valueOf = value.valueOf && value.valueOf()\n if (valueOf != null && valueOf !== value) {\n return Buffer.from(valueOf, encodingOrOffset, length)\n }\n\n const b = fromObject(value)\n if (b) return b\n\n if (typeof Symbol !== 'undefined' && Symbol.toPrimitive != null &&\n typeof value[Symbol.toPrimitive] === 'function') {\n return Buffer.from(value[Symbol.toPrimitive]('string'), encodingOrOffset, length)\n }\n\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n return from(value, encodingOrOffset, length)\n}\n\n// Note: Change prototype *after* Buffer.from is defined to workaround Chrome bug:\n// https://github.com/feross/buffer/pull/148\nObject.setPrototypeOf(Buffer.prototype, Uint8Array.prototype)\nObject.setPrototypeOf(Buffer, Uint8Array)\n\nfunction assertSize (size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be of type number')\n } else if (size < 0) {\n throw new RangeError('The value \"' + size + '\" is invalid for option \"size\"')\n }\n}\n\nfunction alloc (size, fill, encoding) {\n assertSize(size)\n if (size <= 0) {\n return createBuffer(size)\n }\n if (fill !== undefined) {\n // Only pay attention to encoding if it's a string. This\n // prevents accidentally sending in a number that would\n // be interpreted as a start offset.\n return typeof encoding === 'string'\n ? createBuffer(size).fill(fill, encoding)\n : createBuffer(size).fill(fill)\n }\n return createBuffer(size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n return alloc(size, fill, encoding)\n}\n\nfunction allocUnsafe (size) {\n assertSize(size)\n return createBuffer(size < 0 ? 0 : checked(size) | 0)\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n return allocUnsafe(size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n return allocUnsafe(size)\n}\n\nfunction fromString (string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8'\n }\n\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n\n const length = byteLength(string, encoding) | 0\n let buf = createBuffer(length)\n\n const actual = buf.write(string, encoding)\n\n if (actual !== length) {\n // Writing a hex string, for example, that contains invalid characters will\n // cause everything after the first invalid character to be ignored. (e.g.\n // 'abxxcd' will be treated as 'ab')\n buf = buf.slice(0, actual)\n }\n\n return buf\n}\n\nfunction fromArrayLike (array) {\n const length = array.length < 0 ? 0 : checked(array.length) | 0\n const buf = createBuffer(length)\n for (let i = 0; i < length; i += 1) {\n buf[i] = array[i] & 255\n }\n return buf\n}\n\nfunction fromArrayView (arrayView) {\n if (isInstance(arrayView, Uint8Array)) {\n const copy = new Uint8Array(arrayView)\n return fromArrayBuffer(copy.buffer, copy.byteOffset, copy.byteLength)\n }\n return fromArrayLike(arrayView)\n}\n\nfunction fromArrayBuffer (array, byteOffset, length) {\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\"offset\" is outside of buffer bounds')\n }\n\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\"length\" is outside of buffer bounds')\n }\n\n let buf\n if (byteOffset === undefined && length === undefined) {\n buf = new Uint8Array(array)\n } else if (length === undefined) {\n buf = new Uint8Array(array, byteOffset)\n } else {\n buf = new Uint8Array(array, byteOffset, length)\n }\n\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(buf, Buffer.prototype)\n\n return buf\n}\n\nfunction fromObject (obj) {\n if (Buffer.isBuffer(obj)) {\n const len = checked(obj.length) | 0\n const buf = createBuffer(len)\n\n if (buf.length === 0) {\n return buf\n }\n\n obj.copy(buf, 0, 0, len)\n return buf\n }\n\n if (obj.length !== undefined) {\n if (typeof obj.length !== 'number' || numberIsNaN(obj.length)) {\n return createBuffer(0)\n }\n return fromArrayLike(obj)\n }\n\n if (obj.type === 'Buffer' && Array.isArray(obj.data)) {\n return fromArrayLike(obj.data)\n }\n}\n\nfunction checked (length) {\n // Note: cannot use `length < K_MAX_LENGTH` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= K_MAX_LENGTH) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + K_MAX_LENGTH.toString(16) + ' bytes')\n }\n return length | 0\n}\n\nfunction SlowBuffer (length) {\n if (+length != length) { // eslint-disable-line eqeqeq\n length = 0\n }\n return Buffer.alloc(+length)\n}\n\nBuffer.isBuffer = function isBuffer (b) {\n return b != null && b._isBuffer === true &&\n b !== Buffer.prototype // so Buffer.isBuffer(Buffer.prototype) will be false\n}\n\nBuffer.compare = function compare (a, b) {\n if (isInstance(a, Uint8Array)) a = Buffer.from(a, a.offset, a.byteLength)\n if (isInstance(b, Uint8Array)) b = Buffer.from(b, b.offset, b.byteLength)\n if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n throw new TypeError(\n 'The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array'\n )\n }\n\n if (a === b) return 0\n\n let x = a.length\n let y = b.length\n\n for (let i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i]\n y = b[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n switch (String(encoding).toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'latin1':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return true\n default:\n return false\n }\n}\n\nBuffer.concat = function concat (list, length) {\n if (!Array.isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n\n if (list.length === 0) {\n return Buffer.alloc(0)\n }\n\n let i\n if (length === undefined) {\n length = 0\n for (i = 0; i < list.length; ++i) {\n length += list[i].length\n }\n }\n\n const buffer = Buffer.allocUnsafe(length)\n let pos = 0\n for (i = 0; i < list.length; ++i) {\n let buf = list[i]\n if (isInstance(buf, Uint8Array)) {\n if (pos + buf.length > buffer.length) {\n if (!Buffer.isBuffer(buf)) buf = Buffer.from(buf)\n buf.copy(buffer, pos)\n } else {\n Uint8Array.prototype.set.call(\n buffer,\n buf,\n pos\n )\n }\n } else if (!Buffer.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n } else {\n buf.copy(buffer, pos)\n }\n pos += buf.length\n }\n return buffer\n}\n\nfunction byteLength (string, encoding) {\n if (Buffer.isBuffer(string)) {\n return string.length\n }\n if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) {\n return string.byteLength\n }\n if (typeof string !== 'string') {\n throw new TypeError(\n 'The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. ' +\n 'Received type ' + typeof string\n )\n }\n\n const len = string.length\n const mustMatch = (arguments.length > 2 && arguments[2] === true)\n if (!mustMatch && len === 0) return 0\n\n // Use a for loop to avoid recursion\n let loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'ascii':\n case 'latin1':\n case 'binary':\n return len\n case 'utf8':\n case 'utf-8':\n return utf8ToBytes(string).length\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return len * 2\n case 'hex':\n return len >>> 1\n case 'base64':\n return base64ToBytes(string).length\n default:\n if (loweredCase) {\n return mustMatch ? -1 : utf8ToBytes(string).length // assume utf8\n }\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n let loweredCase = false\n\n // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n // property of a typed array.\n\n // This behaves neither like String nor Uint8Array in that we set start/end\n // to their upper/lower bounds if the value passed is out of range.\n // undefined is handled specially as per ECMA-262 6th Edition,\n // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n if (start === undefined || start < 0) {\n start = 0\n }\n // Return early if start > this.length. Done here to prevent potential uint32\n // coercion fail below.\n if (start > this.length) {\n return ''\n }\n\n if (end === undefined || end > this.length) {\n end = this.length\n }\n\n if (end <= 0) {\n return ''\n }\n\n // Force coercion to uint32. This will also coerce falsey/NaN values to 0.\n end >>>= 0\n start >>>= 0\n\n if (end <= start) {\n return ''\n }\n\n if (!encoding) encoding = 'utf8'\n\n while (true) {\n switch (encoding) {\n case 'hex':\n return hexSlice(this, start, end)\n\n case 'utf8':\n case 'utf-8':\n return utf8Slice(this, start, end)\n\n case 'ascii':\n return asciiSlice(this, start, end)\n\n case 'latin1':\n case 'binary':\n return latin1Slice(this, start, end)\n\n case 'base64':\n return base64Slice(this, start, end)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return utf16leSlice(this, start, end)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = (encoding + '').toLowerCase()\n loweredCase = true\n }\n }\n}\n\n// This property is used by `Buffer.isBuffer` (and the `is-buffer` npm package)\n// to detect a Buffer instance. It's not possible to use `instanceof Buffer`\n// reliably in a browserify context because there could be multiple different\n// copies of the 'buffer' package in use. This method works even for Buffer\n// instances that were created from another copy of the `buffer` package.\n// See: https://github.com/feross/buffer/issues/154\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n const i = b[n]\n b[n] = b[m]\n b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n const len = this.length\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits')\n }\n for (let i = 0; i < len; i += 2) {\n swap(this, i, i + 1)\n }\n return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n const len = this.length\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits')\n }\n for (let i = 0; i < len; i += 4) {\n swap(this, i, i + 3)\n swap(this, i + 1, i + 2)\n }\n return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n const len = this.length\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits')\n }\n for (let i = 0; i < len; i += 8) {\n swap(this, i, i + 7)\n swap(this, i + 1, i + 6)\n swap(this, i + 2, i + 5)\n swap(this, i + 3, i + 4)\n }\n return this\n}\n\nBuffer.prototype.toString = function toString () {\n const length = this.length\n if (length === 0) return ''\n if (arguments.length === 0) return utf8Slice(this, 0, length)\n return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.toLocaleString = Buffer.prototype.toString\n\nBuffer.prototype.equals = function equals (b) {\n if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n if (this === b) return true\n return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n let str = ''\n const max = exports.INSPECT_MAX_BYTES\n str = this.toString('hex', 0, max).replace(/(.{2})/g, '$1 ').trim()\n if (this.length > max) str += ' ... '\n return ''\n}\nif (customInspectSymbol) {\n Buffer.prototype[customInspectSymbol] = Buffer.prototype.inspect\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n if (isInstance(target, Uint8Array)) {\n target = Buffer.from(target, target.offset, target.byteLength)\n }\n if (!Buffer.isBuffer(target)) {\n throw new TypeError(\n 'The \"target\" argument must be one of type Buffer or Uint8Array. ' +\n 'Received type ' + (typeof target)\n )\n }\n\n if (start === undefined) {\n start = 0\n }\n if (end === undefined) {\n end = target ? target.length : 0\n }\n if (thisStart === undefined) {\n thisStart = 0\n }\n if (thisEnd === undefined) {\n thisEnd = this.length\n }\n\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError('out of range index')\n }\n\n if (thisStart >= thisEnd && start >= end) {\n return 0\n }\n if (thisStart >= thisEnd) {\n return -1\n }\n if (start >= end) {\n return 1\n }\n\n start >>>= 0\n end >>>= 0\n thisStart >>>= 0\n thisEnd >>>= 0\n\n if (this === target) return 0\n\n let x = thisEnd - thisStart\n let y = end - start\n const len = Math.min(x, y)\n\n const thisCopy = this.slice(thisStart, thisEnd)\n const targetCopy = target.slice(start, end)\n\n for (let i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i]\n y = targetCopy[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (numberIsNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [val], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n let indexSize = 1\n let arrLength = arr.length\n let valLength = val.length\n\n if (encoding !== undefined) {\n encoding = String(encoding).toLowerCase()\n if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n encoding === 'utf16le' || encoding === 'utf-16le') {\n if (arr.length < 2 || val.length < 2) {\n return -1\n }\n indexSize = 2\n arrLength /= 2\n valLength /= 2\n byteOffset /= 2\n }\n }\n\n function read (buf, i) {\n if (indexSize === 1) {\n return buf[i]\n } else {\n return buf.readUInt16BE(i * indexSize)\n }\n }\n\n let i\n if (dir) {\n let foundIndex = -1\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1) foundIndex = i\n if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n } else {\n if (foundIndex !== -1) i -= i - foundIndex\n foundIndex = -1\n }\n }\n } else {\n if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n for (i = byteOffset; i >= 0; i--) {\n let found = true\n for (let j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false\n break\n }\n }\n if (found) return i\n }\n }\n\n return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n offset = Number(offset) || 0\n const remaining = buf.length - offset\n if (!length) {\n length = remaining\n } else {\n length = Number(length)\n if (length > remaining) {\n length = remaining\n }\n }\n\n const strLen = string.length\n\n if (length > strLen / 2) {\n length = strLen / 2\n }\n let i\n for (i = 0; i < length; ++i) {\n const parsed = parseInt(string.substr(i * 2, 2), 16)\n if (numberIsNaN(parsed)) return i\n buf[offset + i] = parsed\n }\n return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n // Buffer#write(string)\n if (offset === undefined) {\n encoding = 'utf8'\n length = this.length\n offset = 0\n // Buffer#write(string, encoding)\n } else if (length === undefined && typeof offset === 'string') {\n encoding = offset\n length = this.length\n offset = 0\n // Buffer#write(string, offset[, length][, encoding])\n } else if (isFinite(offset)) {\n offset = offset >>> 0\n if (isFinite(length)) {\n length = length >>> 0\n if (encoding === undefined) encoding = 'utf8'\n } else {\n encoding = length\n length = undefined\n }\n } else {\n throw new Error(\n 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n )\n }\n\n const remaining = this.length - offset\n if (length === undefined || length > remaining) length = remaining\n\n if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n throw new RangeError('Attempt to write outside buffer bounds')\n }\n\n if (!encoding) encoding = 'utf8'\n\n let loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'hex':\n return hexWrite(this, string, offset, length)\n\n case 'utf8':\n case 'utf-8':\n return utf8Write(this, string, offset, length)\n\n case 'ascii':\n case 'latin1':\n case 'binary':\n return asciiWrite(this, string, offset, length)\n\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return base64Write(this, string, offset, length)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return ucs2Write(this, string, offset, length)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0)\n }\n}\n\nfunction base64Slice (buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf)\n } else {\n return base64.fromByteArray(buf.slice(start, end))\n }\n}\n\nfunction utf8Slice (buf, start, end) {\n end = Math.min(buf.length, end)\n const res = []\n\n let i = start\n while (i < end) {\n const firstByte = buf[i]\n let codePoint = null\n let bytesPerSequence = (firstByte > 0xEF)\n ? 4\n : (firstByte > 0xDF)\n ? 3\n : (firstByte > 0xBF)\n ? 2\n : 1\n\n if (i + bytesPerSequence <= end) {\n let secondByte, thirdByte, fourthByte, tempCodePoint\n\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 0x80) {\n codePoint = firstByte\n }\n break\n case 2:\n secondByte = buf[i + 1]\n if ((secondByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n if (tempCodePoint > 0x7F) {\n codePoint = tempCodePoint\n }\n }\n break\n case 3:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n codePoint = tempCodePoint\n }\n }\n break\n case 4:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n fourthByte = buf[i + 3]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n codePoint = tempCodePoint\n }\n }\n }\n }\n\n if (codePoint === null) {\n // we did not generate a valid codePoint so insert a\n // replacement char (U+FFFD) and advance only 1 byte\n codePoint = 0xFFFD\n bytesPerSequence = 1\n } else if (codePoint > 0xFFFF) {\n // encode to utf16 (surrogate pair dance)\n codePoint -= 0x10000\n res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n codePoint = 0xDC00 | codePoint & 0x3FF\n }\n\n res.push(codePoint)\n i += bytesPerSequence\n }\n\n return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nconst MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n const len = codePoints.length\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n }\n\n // Decode in chunks to avoid \"call stack size exceeded\".\n let res = ''\n let i = 0\n while (i < len) {\n res += String.fromCharCode.apply(\n String,\n codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n )\n }\n return res\n}\n\nfunction asciiSlice (buf, start, end) {\n let ret = ''\n end = Math.min(buf.length, end)\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F)\n }\n return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n let ret = ''\n end = Math.min(buf.length, end)\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i])\n }\n return ret\n}\n\nfunction hexSlice (buf, start, end) {\n const len = buf.length\n\n if (!start || start < 0) start = 0\n if (!end || end < 0 || end > len) end = len\n\n let out = ''\n for (let i = start; i < end; ++i) {\n out += hexSliceLookupTable[buf[i]]\n }\n return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n const bytes = buf.slice(start, end)\n let res = ''\n // If bytes.length is odd, the last 8 bits must be ignored (same as node.js)\n for (let i = 0; i < bytes.length - 1; i += 2) {\n res += String.fromCharCode(bytes[i] + (bytes[i + 1] * 256))\n }\n return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n const len = this.length\n start = ~~start\n end = end === undefined ? len : ~~end\n\n if (start < 0) {\n start += len\n if (start < 0) start = 0\n } else if (start > len) {\n start = len\n }\n\n if (end < 0) {\n end += len\n if (end < 0) end = 0\n } else if (end > len) {\n end = len\n }\n\n if (end < start) end = start\n\n const newBuf = this.subarray(start, end)\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(newBuf, Buffer.prototype)\n\n return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUintLE =\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let val = this[offset]\n let mul = 1\n let i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUintBE =\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n checkOffset(offset, byteLength, this.length)\n }\n\n let val = this[offset + --byteLength]\n let mul = 1\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUint8 =\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n return this[offset]\n}\n\nBuffer.prototype.readUint16LE =\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUint16BE =\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUint32LE =\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return ((this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16)) +\n (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUint32BE =\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] * 0x1000000) +\n ((this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n this[offset + 3])\n}\n\nBuffer.prototype.readBigUInt64LE = defineBigIntMethod(function readBigUInt64LE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const lo = first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24\n\n const hi = this[++offset] +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n last * 2 ** 24\n\n return BigInt(lo) + (BigInt(hi) << BigInt(32))\n})\n\nBuffer.prototype.readBigUInt64BE = defineBigIntMethod(function readBigUInt64BE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const hi = first * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset]\n\n const lo = this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last\n\n return (BigInt(hi) << BigInt(32)) + BigInt(lo)\n})\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let val = this[offset]\n let mul = 1\n let i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let i = byteLength\n let mul = 1\n let val = this[offset + --i]\n while (i > 0 && (mul *= 0x100)) {\n val += this[offset + --i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n if (!(this[offset] & 0x80)) return (this[offset])\n return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n const val = this[offset] | (this[offset + 1] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n const val = this[offset + 1] | (this[offset] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16) |\n (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] << 24) |\n (this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n (this[offset + 3])\n}\n\nBuffer.prototype.readBigInt64LE = defineBigIntMethod(function readBigInt64LE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const val = this[offset + 4] +\n this[offset + 5] * 2 ** 8 +\n this[offset + 6] * 2 ** 16 +\n (last << 24) // Overflow\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24)\n})\n\nBuffer.prototype.readBigInt64BE = defineBigIntMethod(function readBigInt64BE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const val = (first << 24) + // Overflow\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset]\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last)\n})\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUintLE =\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n let mul = 1\n let i = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUintBE =\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n let i = byteLength - 1\n let mul = 1\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUint8 =\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeUint16LE =\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeUint16BE =\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeUint32LE =\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset + 3] = (value >>> 24)\n this[offset + 2] = (value >>> 16)\n this[offset + 1] = (value >>> 8)\n this[offset] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeUint32BE =\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nfunction wrtBigUInt64LE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7)\n\n let lo = Number(value & BigInt(0xffffffff))\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n return offset\n}\n\nfunction wrtBigUInt64BE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7)\n\n let lo = Number(value & BigInt(0xffffffff))\n buf[offset + 7] = lo\n lo = lo >> 8\n buf[offset + 6] = lo\n lo = lo >> 8\n buf[offset + 5] = lo\n lo = lo >> 8\n buf[offset + 4] = lo\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n buf[offset + 3] = hi\n hi = hi >> 8\n buf[offset + 2] = hi\n hi = hi >> 8\n buf[offset + 1] = hi\n hi = hi >> 8\n buf[offset] = hi\n return offset + 8\n}\n\nBuffer.prototype.writeBigUInt64LE = defineBigIntMethod(function writeBigUInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeBigUInt64BE = defineBigIntMethod(function writeBigUInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n let i = 0\n let mul = 1\n let sub = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n let i = byteLength - 1\n let mul = 1\n let sub = 0\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n if (value < 0) value = 0xff + value + 1\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n this[offset + 2] = (value >>> 16)\n this[offset + 3] = (value >>> 24)\n return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (value < 0) value = 0xffffffff + value + 1\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeBigInt64LE = defineBigIntMethod(function writeBigInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nBuffer.prototype.writeBigInt64BE = defineBigIntMethod(function writeBigInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n }\n ieee754.write(buf, value, offset, littleEndian, 23, 4)\n return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n }\n ieee754.write(buf, value, offset, littleEndian, 52, 8)\n return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n if (!Buffer.isBuffer(target)) throw new TypeError('argument should be a Buffer')\n if (!start) start = 0\n if (!end && end !== 0) end = this.length\n if (targetStart >= target.length) targetStart = target.length\n if (!targetStart) targetStart = 0\n if (end > 0 && end < start) end = start\n\n // Copy 0 bytes; we're done\n if (end === start) return 0\n if (target.length === 0 || this.length === 0) return 0\n\n // Fatal error conditions\n if (targetStart < 0) {\n throw new RangeError('targetStart out of bounds')\n }\n if (start < 0 || start >= this.length) throw new RangeError('Index out of range')\n if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n // Are we oob?\n if (end > this.length) end = this.length\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start\n }\n\n const len = end - start\n\n if (this === target && typeof Uint8Array.prototype.copyWithin === 'function') {\n // Use built-in when available, missing from IE11\n this.copyWithin(targetStart, start, end)\n } else {\n Uint8Array.prototype.set.call(\n target,\n this.subarray(start, end),\n targetStart\n )\n }\n\n return len\n}\n\n// Usage:\n// buffer.fill(number[, offset[, end]])\n// buffer.fill(buffer[, offset[, end]])\n// buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n // Handle string cases:\n if (typeof val === 'string') {\n if (typeof start === 'string') {\n encoding = start\n start = 0\n end = this.length\n } else if (typeof end === 'string') {\n encoding = end\n end = this.length\n }\n if (encoding !== undefined && typeof encoding !== 'string') {\n throw new TypeError('encoding must be a string')\n }\n if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n if (val.length === 1) {\n const code = val.charCodeAt(0)\n if ((encoding === 'utf8' && code < 128) ||\n encoding === 'latin1') {\n // Fast path: If `val` fits into a single byte, use that numeric value.\n val = code\n }\n }\n } else if (typeof val === 'number') {\n val = val & 255\n } else if (typeof val === 'boolean') {\n val = Number(val)\n }\n\n // Invalid ranges are not set to a default, so can range check early.\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError('Out of range index')\n }\n\n if (end <= start) {\n return this\n }\n\n start = start >>> 0\n end = end === undefined ? this.length : end >>> 0\n\n if (!val) val = 0\n\n let i\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val\n }\n } else {\n const bytes = Buffer.isBuffer(val)\n ? val\n : Buffer.from(val, encoding)\n const len = bytes.length\n if (len === 0) {\n throw new TypeError('The value \"' + val +\n '\" is invalid for argument \"value\"')\n }\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len]\n }\n }\n\n return this\n}\n\n// CUSTOM ERRORS\n// =============\n\n// Simplified versions from Node, changed for Buffer-only usage\nconst errors = {}\nfunction E (sym, getMessage, Base) {\n errors[sym] = class NodeError extends Base {\n constructor () {\n super()\n\n Object.defineProperty(this, 'message', {\n value: getMessage.apply(this, arguments),\n writable: true,\n configurable: true\n })\n\n // Add the error code to the name to include it in the stack trace.\n this.name = `${this.name} [${sym}]`\n // Access the stack to generate the error message including the error code\n // from the name.\n this.stack // eslint-disable-line no-unused-expressions\n // Reset the name to the actual name.\n delete this.name\n }\n\n get code () {\n return sym\n }\n\n set code (value) {\n Object.defineProperty(this, 'code', {\n configurable: true,\n enumerable: true,\n value,\n writable: true\n })\n }\n\n toString () {\n return `${this.name} [${sym}]: ${this.message}`\n }\n }\n}\n\nE('ERR_BUFFER_OUT_OF_BOUNDS',\n function (name) {\n if (name) {\n return `${name} is outside of buffer bounds`\n }\n\n return 'Attempt to access memory outside buffer bounds'\n }, RangeError)\nE('ERR_INVALID_ARG_TYPE',\n function (name, actual) {\n return `The \"${name}\" argument must be of type number. Received type ${typeof actual}`\n }, TypeError)\nE('ERR_OUT_OF_RANGE',\n function (str, range, input) {\n let msg = `The value of \"${str}\" is out of range.`\n let received = input\n if (Number.isInteger(input) && Math.abs(input) > 2 ** 32) {\n received = addNumericalSeparator(String(input))\n } else if (typeof input === 'bigint') {\n received = String(input)\n if (input > BigInt(2) ** BigInt(32) || input < -(BigInt(2) ** BigInt(32))) {\n received = addNumericalSeparator(received)\n }\n received += 'n'\n }\n msg += ` It must be ${range}. Received ${received}`\n return msg\n }, RangeError)\n\nfunction addNumericalSeparator (val) {\n let res = ''\n let i = val.length\n const start = val[0] === '-' ? 1 : 0\n for (; i >= start + 4; i -= 3) {\n res = `_${val.slice(i - 3, i)}${res}`\n }\n return `${val.slice(0, i)}${res}`\n}\n\n// CHECK FUNCTIONS\n// ===============\n\nfunction checkBounds (buf, offset, byteLength) {\n validateNumber(offset, 'offset')\n if (buf[offset] === undefined || buf[offset + byteLength] === undefined) {\n boundsError(offset, buf.length - (byteLength + 1))\n }\n}\n\nfunction checkIntBI (value, min, max, buf, offset, byteLength) {\n if (value > max || value < min) {\n const n = typeof min === 'bigint' ? 'n' : ''\n let range\n if (byteLength > 3) {\n if (min === 0 || min === BigInt(0)) {\n range = `>= 0${n} and < 2${n} ** ${(byteLength + 1) * 8}${n}`\n } else {\n range = `>= -(2${n} ** ${(byteLength + 1) * 8 - 1}${n}) and < 2 ** ` +\n `${(byteLength + 1) * 8 - 1}${n}`\n }\n } else {\n range = `>= ${min}${n} and <= ${max}${n}`\n }\n throw new errors.ERR_OUT_OF_RANGE('value', range, value)\n }\n checkBounds(buf, offset, byteLength)\n}\n\nfunction validateNumber (value, name) {\n if (typeof value !== 'number') {\n throw new errors.ERR_INVALID_ARG_TYPE(name, 'number', value)\n }\n}\n\nfunction boundsError (value, length, type) {\n if (Math.floor(value) !== value) {\n validateNumber(value, type)\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset', 'an integer', value)\n }\n\n if (length < 0) {\n throw new errors.ERR_BUFFER_OUT_OF_BOUNDS()\n }\n\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset',\n `>= ${type ? 1 : 0} and <= ${length}`,\n value)\n}\n\n// HELPER FUNCTIONS\n// ================\n\nconst INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n // Node takes equal signs as end of the Base64 encoding\n str = str.split('=')[0]\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = str.trim().replace(INVALID_BASE64_RE, '')\n // Node converts strings with length < 2 to ''\n if (str.length < 2) return ''\n // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n while (str.length % 4 !== 0) {\n str = str + '='\n }\n return str\n}\n\nfunction utf8ToBytes (string, units) {\n units = units || Infinity\n let codePoint\n const length = string.length\n let leadSurrogate = null\n const bytes = []\n\n for (let i = 0; i < length; ++i) {\n codePoint = string.charCodeAt(i)\n\n // is surrogate component\n if (codePoint > 0xD7FF && codePoint < 0xE000) {\n // last char was a lead\n if (!leadSurrogate) {\n // no lead yet\n if (codePoint > 0xDBFF) {\n // unexpected trail\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n } else if (i + 1 === length) {\n // unpaired lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n }\n\n // valid lead\n leadSurrogate = codePoint\n\n continue\n }\n\n // 2 leads in a row\n if (codePoint < 0xDC00) {\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n leadSurrogate = codePoint\n continue\n }\n\n // valid surrogate pair\n codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n } else if (leadSurrogate) {\n // valid bmp char, but last char was a lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n }\n\n leadSurrogate = null\n\n // encode utf8\n if (codePoint < 0x80) {\n if ((units -= 1) < 0) break\n bytes.push(codePoint)\n } else if (codePoint < 0x800) {\n if ((units -= 2) < 0) break\n bytes.push(\n codePoint >> 0x6 | 0xC0,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x10000) {\n if ((units -= 3) < 0) break\n bytes.push(\n codePoint >> 0xC | 0xE0,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x110000) {\n if ((units -= 4) < 0) break\n bytes.push(\n codePoint >> 0x12 | 0xF0,\n codePoint >> 0xC & 0x3F | 0x80,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else {\n throw new Error('Invalid code point')\n }\n }\n\n return bytes\n}\n\nfunction asciiToBytes (str) {\n const byteArray = []\n for (let i = 0; i < str.length; ++i) {\n // Node's code seems to be doing this and not & 0x7F..\n byteArray.push(str.charCodeAt(i) & 0xFF)\n }\n return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n let c, hi, lo\n const byteArray = []\n for (let i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0) break\n\n c = str.charCodeAt(i)\n hi = c >> 8\n lo = c % 256\n byteArray.push(lo)\n byteArray.push(hi)\n }\n\n return byteArray\n}\n\nfunction base64ToBytes (str) {\n return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n let i\n for (i = 0; i < length; ++i) {\n if ((i + offset >= dst.length) || (i >= src.length)) break\n dst[i + offset] = src[i]\n }\n return i\n}\n\n// ArrayBuffer or Uint8Array objects from other contexts (i.e. iframes) do not pass\n// the `instanceof` check but they should be treated as of that type.\n// See: https://github.com/feross/buffer/issues/166\nfunction isInstance (obj, type) {\n return obj instanceof type ||\n (obj != null && obj.constructor != null && obj.constructor.name != null &&\n obj.constructor.name === type.name)\n}\nfunction numberIsNaN (obj) {\n // For IE11 support\n return obj !== obj // eslint-disable-line no-self-compare\n}\n\n// Create lookup table for `toString('hex')`\n// See: https://github.com/feross/buffer/issues/219\nconst hexSliceLookupTable = (function () {\n const alphabet = '0123456789abcdef'\n const table = new Array(256)\n for (let i = 0; i < 16; ++i) {\n const i16 = i * 16\n for (let j = 0; j < 16; ++j) {\n table[i16 + j] = alphabet[i] + alphabet[j]\n }\n }\n return table\n})()\n\n// Return not function with Error if BigInt not supported\nfunction defineBigIntMethod (fn) {\n return typeof BigInt === 'undefined' ? BufferBigIntNotDefined : fn\n}\n\nfunction BufferBigIntNotDefined () {\n throw new Error('BigInt not supported')\n}\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\nvar R = typeof Reflect === 'object' ? Reflect : null\nvar ReflectApply = R && typeof R.apply === 'function'\n ? R.apply\n : function ReflectApply(target, receiver, args) {\n return Function.prototype.apply.call(target, receiver, args);\n }\n\nvar ReflectOwnKeys\nif (R && typeof R.ownKeys === 'function') {\n ReflectOwnKeys = R.ownKeys\n} else if (Object.getOwnPropertySymbols) {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target)\n .concat(Object.getOwnPropertySymbols(target));\n };\n} else {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target);\n };\n}\n\nfunction ProcessEmitWarning(warning) {\n if (console && console.warn) console.warn(warning);\n}\n\nvar NumberIsNaN = Number.isNaN || function NumberIsNaN(value) {\n return value !== value;\n}\n\nfunction EventEmitter() {\n EventEmitter.init.call(this);\n}\nmodule.exports = EventEmitter;\nmodule.exports.once = once;\n\n// Backwards-compat with node 0.10.x\nEventEmitter.EventEmitter = EventEmitter;\n\nEventEmitter.prototype._events = undefined;\nEventEmitter.prototype._eventsCount = 0;\nEventEmitter.prototype._maxListeners = undefined;\n\n// By default EventEmitters will print a warning if more than 10 listeners are\n// added to it. This is a useful default which helps finding memory leaks.\nvar defaultMaxListeners = 10;\n\nfunction checkListener(listener) {\n if (typeof listener !== 'function') {\n throw new TypeError('The \"listener\" argument must be of type Function. Received type ' + typeof listener);\n }\n}\n\nObject.defineProperty(EventEmitter, 'defaultMaxListeners', {\n enumerable: true,\n get: function() {\n return defaultMaxListeners;\n },\n set: function(arg) {\n if (typeof arg !== 'number' || arg < 0 || NumberIsNaN(arg)) {\n throw new RangeError('The value of \"defaultMaxListeners\" is out of range. It must be a non-negative number. Received ' + arg + '.');\n }\n defaultMaxListeners = arg;\n }\n});\n\nEventEmitter.init = function() {\n\n if (this._events === undefined ||\n this._events === Object.getPrototypeOf(this)._events) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n }\n\n this._maxListeners = this._maxListeners || undefined;\n};\n\n// Obviously not all Emitters should be limited to 10. This function allows\n// that to be increased. Set to zero for unlimited.\nEventEmitter.prototype.setMaxListeners = function setMaxListeners(n) {\n if (typeof n !== 'number' || n < 0 || NumberIsNaN(n)) {\n throw new RangeError('The value of \"n\" is out of range. It must be a non-negative number. Received ' + n + '.');\n }\n this._maxListeners = n;\n return this;\n};\n\nfunction _getMaxListeners(that) {\n if (that._maxListeners === undefined)\n return EventEmitter.defaultMaxListeners;\n return that._maxListeners;\n}\n\nEventEmitter.prototype.getMaxListeners = function getMaxListeners() {\n return _getMaxListeners(this);\n};\n\nEventEmitter.prototype.emit = function emit(type) {\n var args = [];\n for (var i = 1; i < arguments.length; i++) args.push(arguments[i]);\n var doError = (type === 'error');\n\n var events = this._events;\n if (events !== undefined)\n doError = (doError && events.error === undefined);\n else if (!doError)\n return false;\n\n // If there is no 'error' event listener then throw.\n if (doError) {\n var er;\n if (args.length > 0)\n er = args[0];\n if (er instanceof Error) {\n // Note: The comments on the `throw` lines are intentional, they show\n // up in Node's output if this results in an unhandled exception.\n throw er; // Unhandled 'error' event\n }\n // At least give some kind of context to the user\n var err = new Error('Unhandled error.' + (er ? ' (' + er.message + ')' : ''));\n err.context = er;\n throw err; // Unhandled 'error' event\n }\n\n var handler = events[type];\n\n if (handler === undefined)\n return false;\n\n if (typeof handler === 'function') {\n ReflectApply(handler, this, args);\n } else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n ReflectApply(listeners[i], this, args);\n }\n\n return true;\n};\n\nfunction _addListener(target, type, listener, prepend) {\n var m;\n var events;\n var existing;\n\n checkListener(listener);\n\n events = target._events;\n if (events === undefined) {\n events = target._events = Object.create(null);\n target._eventsCount = 0;\n } else {\n // To avoid recursion in the case that type === \"newListener\"! Before\n // adding it to the listeners, first emit \"newListener\".\n if (events.newListener !== undefined) {\n target.emit('newListener', type,\n listener.listener ? listener.listener : listener);\n\n // Re-assign `events` because a newListener handler could have caused the\n // this._events to be assigned to a new object\n events = target._events;\n }\n existing = events[type];\n }\n\n if (existing === undefined) {\n // Optimize the case of one listener. Don't need the extra array object.\n existing = events[type] = listener;\n ++target._eventsCount;\n } else {\n if (typeof existing === 'function') {\n // Adding the second element, need to change to array.\n existing = events[type] =\n prepend ? [listener, existing] : [existing, listener];\n // If we've already got an array, just append.\n } else if (prepend) {\n existing.unshift(listener);\n } else {\n existing.push(listener);\n }\n\n // Check for listener leak\n m = _getMaxListeners(target);\n if (m > 0 && existing.length > m && !existing.warned) {\n existing.warned = true;\n // No error code for this since it is a Warning\n // eslint-disable-next-line no-restricted-syntax\n var w = new Error('Possible EventEmitter memory leak detected. ' +\n existing.length + ' ' + String(type) + ' listeners ' +\n 'added. Use emitter.setMaxListeners() to ' +\n 'increase limit');\n w.name = 'MaxListenersExceededWarning';\n w.emitter = target;\n w.type = type;\n w.count = existing.length;\n ProcessEmitWarning(w);\n }\n }\n\n return target;\n}\n\nEventEmitter.prototype.addListener = function addListener(type, listener) {\n return _addListener(this, type, listener, false);\n};\n\nEventEmitter.prototype.on = EventEmitter.prototype.addListener;\n\nEventEmitter.prototype.prependListener =\n function prependListener(type, listener) {\n return _addListener(this, type, listener, true);\n };\n\nfunction onceWrapper() {\n if (!this.fired) {\n this.target.removeListener(this.type, this.wrapFn);\n this.fired = true;\n if (arguments.length === 0)\n return this.listener.call(this.target);\n return this.listener.apply(this.target, arguments);\n }\n}\n\nfunction _onceWrap(target, type, listener) {\n var state = { fired: false, wrapFn: undefined, target: target, type: type, listener: listener };\n var wrapped = onceWrapper.bind(state);\n wrapped.listener = listener;\n state.wrapFn = wrapped;\n return wrapped;\n}\n\nEventEmitter.prototype.once = function once(type, listener) {\n checkListener(listener);\n this.on(type, _onceWrap(this, type, listener));\n return this;\n};\n\nEventEmitter.prototype.prependOnceListener =\n function prependOnceListener(type, listener) {\n checkListener(listener);\n this.prependListener(type, _onceWrap(this, type, listener));\n return this;\n };\n\n// Emits a 'removeListener' event if and only if the listener was removed.\nEventEmitter.prototype.removeListener =\n function removeListener(type, listener) {\n var list, events, position, i, originalListener;\n\n checkListener(listener);\n\n events = this._events;\n if (events === undefined)\n return this;\n\n list = events[type];\n if (list === undefined)\n return this;\n\n if (list === listener || list.listener === listener) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else {\n delete events[type];\n if (events.removeListener)\n this.emit('removeListener', type, list.listener || listener);\n }\n } else if (typeof list !== 'function') {\n position = -1;\n\n for (i = list.length - 1; i >= 0; i--) {\n if (list[i] === listener || list[i].listener === listener) {\n originalListener = list[i].listener;\n position = i;\n break;\n }\n }\n\n if (position < 0)\n return this;\n\n if (position === 0)\n list.shift();\n else {\n spliceOne(list, position);\n }\n\n if (list.length === 1)\n events[type] = list[0];\n\n if (events.removeListener !== undefined)\n this.emit('removeListener', type, originalListener || listener);\n }\n\n return this;\n };\n\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\n\nEventEmitter.prototype.removeAllListeners =\n function removeAllListeners(type) {\n var listeners, events, i;\n\n events = this._events;\n if (events === undefined)\n return this;\n\n // not listening for removeListener, no need to emit\n if (events.removeListener === undefined) {\n if (arguments.length === 0) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n } else if (events[type] !== undefined) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else\n delete events[type];\n }\n return this;\n }\n\n // emit removeListener for all listeners on all events\n if (arguments.length === 0) {\n var keys = Object.keys(events);\n var key;\n for (i = 0; i < keys.length; ++i) {\n key = keys[i];\n if (key === 'removeListener') continue;\n this.removeAllListeners(key);\n }\n this.removeAllListeners('removeListener');\n this._events = Object.create(null);\n this._eventsCount = 0;\n return this;\n }\n\n listeners = events[type];\n\n if (typeof listeners === 'function') {\n this.removeListener(type, listeners);\n } else if (listeners !== undefined) {\n // LIFO order\n for (i = listeners.length - 1; i >= 0; i--) {\n this.removeListener(type, listeners[i]);\n }\n }\n\n return this;\n };\n\nfunction _listeners(target, type, unwrap) {\n var events = target._events;\n\n if (events === undefined)\n return [];\n\n var evlistener = events[type];\n if (evlistener === undefined)\n return [];\n\n if (typeof evlistener === 'function')\n return unwrap ? [evlistener.listener || evlistener] : [evlistener];\n\n return unwrap ?\n unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length);\n}\n\nEventEmitter.prototype.listeners = function listeners(type) {\n return _listeners(this, type, true);\n};\n\nEventEmitter.prototype.rawListeners = function rawListeners(type) {\n return _listeners(this, type, false);\n};\n\nEventEmitter.listenerCount = function(emitter, type) {\n if (typeof emitter.listenerCount === 'function') {\n return emitter.listenerCount(type);\n } else {\n return listenerCount.call(emitter, type);\n }\n};\n\nEventEmitter.prototype.listenerCount = listenerCount;\nfunction listenerCount(type) {\n var events = this._events;\n\n if (events !== undefined) {\n var evlistener = events[type];\n\n if (typeof evlistener === 'function') {\n return 1;\n } else if (evlistener !== undefined) {\n return evlistener.length;\n }\n }\n\n return 0;\n}\n\nEventEmitter.prototype.eventNames = function eventNames() {\n return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : [];\n};\n\nfunction arrayClone(arr, n) {\n var copy = new Array(n);\n for (var i = 0; i < n; ++i)\n copy[i] = arr[i];\n return copy;\n}\n\nfunction spliceOne(list, index) {\n for (; index + 1 < list.length; index++)\n list[index] = list[index + 1];\n list.pop();\n}\n\nfunction unwrapListeners(arr) {\n var ret = new Array(arr.length);\n for (var i = 0; i < ret.length; ++i) {\n ret[i] = arr[i].listener || arr[i];\n }\n return ret;\n}\n\nfunction once(emitter, name) {\n return new Promise(function (resolve, reject) {\n function errorListener(err) {\n emitter.removeListener(name, resolver);\n reject(err);\n }\n\n function resolver() {\n if (typeof emitter.removeListener === 'function') {\n emitter.removeListener('error', errorListener);\n }\n resolve([].slice.call(arguments));\n };\n\n eventTargetAgnosticAddListener(emitter, name, resolver, { once: true });\n if (name !== 'error') {\n addErrorHandlerIfEventEmitter(emitter, errorListener, { once: true });\n }\n });\n}\n\nfunction addErrorHandlerIfEventEmitter(emitter, handler, flags) {\n if (typeof emitter.on === 'function') {\n eventTargetAgnosticAddListener(emitter, 'error', handler, flags);\n }\n}\n\nfunction eventTargetAgnosticAddListener(emitter, name, listener, flags) {\n if (typeof emitter.on === 'function') {\n if (flags.once) {\n emitter.once(name, listener);\n } else {\n emitter.on(name, listener);\n }\n } else if (typeof emitter.addEventListener === 'function') {\n // EventTarget does not have `error` event semantics like Node\n // EventEmitters, we do not listen for `error` events here.\n emitter.addEventListener(name, function wrapListener(arg) {\n // IE does not have builtin `{ once: true }` support so we\n // have to do it manually.\n if (flags.once) {\n emitter.removeEventListener(name, wrapListener);\n }\n listener(arg);\n });\n } else {\n throw new TypeError('The \"emitter\" argument must be of type EventEmitter. Received type ' + typeof emitter);\n }\n}\n","/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */\nexports.read = function (buffer, offset, isLE, mLen, nBytes) {\n var e, m\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var nBits = -7\n var i = isLE ? (nBytes - 1) : 0\n var d = isLE ? -1 : 1\n var s = buffer[offset + i]\n\n i += d\n\n e = s & ((1 << (-nBits)) - 1)\n s >>= (-nBits)\n nBits += eLen\n for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & ((1 << (-nBits)) - 1)\n e >>= (-nBits)\n nBits += mLen\n for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias\n } else if (e === eMax) {\n return m ? NaN : ((s ? -1 : 1) * Infinity)\n } else {\n m = m + Math.pow(2, mLen)\n e = e - eBias\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n var i = isLE ? 0 : (nBytes - 1)\n var d = isLE ? 1 : -1\n var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n value = Math.abs(value)\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0\n e = eMax\n } else {\n e = Math.floor(Math.log(value) / Math.LN2)\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--\n c *= 2\n }\n if (e + eBias >= 1) {\n value += rt / c\n } else {\n value += rt * Math.pow(2, 1 - eBias)\n }\n if (value * c >= 2) {\n e++\n c /= 2\n }\n\n if (e + eBias >= eMax) {\n m = 0\n e = eMax\n } else if (e + eBias >= 1) {\n m = ((value * c) - 1) * Math.pow(2, mLen)\n e = e + eBias\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n e = 0\n }\n }\n\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n e = (e << mLen) | m\n eLen += mLen\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128\n}\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView');\n\nmodule.exports = DataView;\n","var hashClear = require('./_hashClear'),\n hashDelete = require('./_hashDelete'),\n hashGet = require('./_hashGet'),\n hashHas = require('./_hashHas'),\n hashSet = require('./_hashSet');\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\nmodule.exports = Hash;\n","var listCacheClear = require('./_listCacheClear'),\n listCacheDelete = require('./_listCacheDelete'),\n listCacheGet = require('./_listCacheGet'),\n listCacheHas = require('./_listCacheHas'),\n listCacheSet = require('./_listCacheSet');\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\nmodule.exports = ListCache;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map');\n\nmodule.exports = Map;\n","var mapCacheClear = require('./_mapCacheClear'),\n mapCacheDelete = require('./_mapCacheDelete'),\n mapCacheGet = require('./_mapCacheGet'),\n mapCacheHas = require('./_mapCacheHas'),\n mapCacheSet = require('./_mapCacheSet');\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\nmodule.exports = MapCache;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Promise = getNative(root, 'Promise');\n\nmodule.exports = Promise;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Set = getNative(root, 'Set');\n\nmodule.exports = Set;\n","var MapCache = require('./_MapCache'),\n setCacheAdd = require('./_setCacheAdd'),\n setCacheHas = require('./_setCacheHas');\n\n/**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\nfunction SetCache(values) {\n var index = -1,\n length = values == null ? 0 : values.length;\n\n this.__data__ = new MapCache;\n while (++index < length) {\n this.add(values[index]);\n }\n}\n\n// Add methods to `SetCache`.\nSetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\nSetCache.prototype.has = setCacheHas;\n\nmodule.exports = SetCache;\n","var ListCache = require('./_ListCache'),\n stackClear = require('./_stackClear'),\n stackDelete = require('./_stackDelete'),\n stackGet = require('./_stackGet'),\n stackHas = require('./_stackHas'),\n stackSet = require('./_stackSet');\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\nmodule.exports = Stack;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Uint8Array = root.Uint8Array;\n\nmodule.exports = Uint8Array;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar WeakMap = getNative(root, 'WeakMap');\n\nmodule.exports = WeakMap;\n","/**\n * A specialized version of `_.forEach` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\nfunction arrayEach(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (iteratee(array[index], index, array) === false) {\n break;\n }\n }\n return array;\n}\n\nmodule.exports = arrayEach;\n","/**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\nfunction arrayFilter(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result[resIndex++] = value;\n }\n }\n return result;\n}\n\nmodule.exports = arrayFilter;\n","var baseTimes = require('./_baseTimes'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isIndex = require('./_isIndex'),\n isTypedArray = require('./isTypedArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = arrayLikeKeys;\n","/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n}\n\nmodule.exports = arrayPush;\n","/**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\nfunction arraySome(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (predicate(array[index], index, array)) {\n return true;\n }\n }\n return false;\n}\n\nmodule.exports = arraySome;\n","var baseAssignValue = require('./_baseAssignValue'),\n eq = require('./eq');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\nmodule.exports = assignValue;\n","var eq = require('./eq');\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\nmodule.exports = assocIndexOf;\n","var copyObject = require('./_copyObject'),\n keys = require('./keys');\n\n/**\n * The base implementation of `_.assign` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssign(object, source) {\n return object && copyObject(source, keys(source), object);\n}\n\nmodule.exports = baseAssign;\n","var copyObject = require('./_copyObject'),\n keysIn = require('./keysIn');\n\n/**\n * The base implementation of `_.assignIn` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssignIn(object, source) {\n return object && copyObject(source, keysIn(source), object);\n}\n\nmodule.exports = baseAssignIn;\n","var defineProperty = require('./_defineProperty');\n\n/**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction baseAssignValue(object, key, value) {\n if (key == '__proto__' && defineProperty) {\n defineProperty(object, key, {\n 'configurable': true,\n 'enumerable': true,\n 'value': value,\n 'writable': true\n });\n } else {\n object[key] = value;\n }\n}\n\nmodule.exports = baseAssignValue;\n","var Stack = require('./_Stack'),\n arrayEach = require('./_arrayEach'),\n assignValue = require('./_assignValue'),\n baseAssign = require('./_baseAssign'),\n baseAssignIn = require('./_baseAssignIn'),\n cloneBuffer = require('./_cloneBuffer'),\n copyArray = require('./_copyArray'),\n copySymbols = require('./_copySymbols'),\n copySymbolsIn = require('./_copySymbolsIn'),\n getAllKeys = require('./_getAllKeys'),\n getAllKeysIn = require('./_getAllKeysIn'),\n getTag = require('./_getTag'),\n initCloneArray = require('./_initCloneArray'),\n initCloneByTag = require('./_initCloneByTag'),\n initCloneObject = require('./_initCloneObject'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isMap = require('./isMap'),\n isObject = require('./isObject'),\n isSet = require('./isSet'),\n keys = require('./keys'),\n keysIn = require('./keysIn');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_FLAT_FLAG = 2,\n CLONE_SYMBOLS_FLAG = 4;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values supported by `_.clone`. */\nvar cloneableTags = {};\ncloneableTags[argsTag] = cloneableTags[arrayTag] =\ncloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =\ncloneableTags[boolTag] = cloneableTags[dateTag] =\ncloneableTags[float32Tag] = cloneableTags[float64Tag] =\ncloneableTags[int8Tag] = cloneableTags[int16Tag] =\ncloneableTags[int32Tag] = cloneableTags[mapTag] =\ncloneableTags[numberTag] = cloneableTags[objectTag] =\ncloneableTags[regexpTag] = cloneableTags[setTag] =\ncloneableTags[stringTag] = cloneableTags[symbolTag] =\ncloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =\ncloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;\ncloneableTags[errorTag] = cloneableTags[funcTag] =\ncloneableTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.clone` and `_.cloneDeep` which tracks\n * traversed objects.\n *\n * @private\n * @param {*} value The value to clone.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Deep clone\n * 2 - Flatten inherited properties\n * 4 - Clone symbols\n * @param {Function} [customizer] The function to customize cloning.\n * @param {string} [key] The key of `value`.\n * @param {Object} [object] The parent object of `value`.\n * @param {Object} [stack] Tracks traversed objects and their clone counterparts.\n * @returns {*} Returns the cloned value.\n */\nfunction baseClone(value, bitmask, customizer, key, object, stack) {\n var result,\n isDeep = bitmask & CLONE_DEEP_FLAG,\n isFlat = bitmask & CLONE_FLAT_FLAG,\n isFull = bitmask & CLONE_SYMBOLS_FLAG;\n\n if (customizer) {\n result = object ? customizer(value, key, object, stack) : customizer(value);\n }\n if (result !== undefined) {\n return result;\n }\n if (!isObject(value)) {\n return value;\n }\n var isArr = isArray(value);\n if (isArr) {\n result = initCloneArray(value);\n if (!isDeep) {\n return copyArray(value, result);\n }\n } else {\n var tag = getTag(value),\n isFunc = tag == funcTag || tag == genTag;\n\n if (isBuffer(value)) {\n return cloneBuffer(value, isDeep);\n }\n if (tag == objectTag || tag == argsTag || (isFunc && !object)) {\n result = (isFlat || isFunc) ? {} : initCloneObject(value);\n if (!isDeep) {\n return isFlat\n ? copySymbolsIn(value, baseAssignIn(result, value))\n : copySymbols(value, baseAssign(result, value));\n }\n } else {\n if (!cloneableTags[tag]) {\n return object ? value : {};\n }\n result = initCloneByTag(value, tag, isDeep);\n }\n }\n // Check for circular references and return its corresponding clone.\n stack || (stack = new Stack);\n var stacked = stack.get(value);\n if (stacked) {\n return stacked;\n }\n stack.set(value, result);\n\n if (isSet(value)) {\n value.forEach(function(subValue) {\n result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));\n });\n } else if (isMap(value)) {\n value.forEach(function(subValue, key) {\n result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n }\n\n var keysFunc = isFull\n ? (isFlat ? getAllKeysIn : getAllKeys)\n : (isFlat ? keysIn : keys);\n\n var props = isArr ? undefined : keysFunc(value);\n arrayEach(props || value, function(subValue, key) {\n if (props) {\n key = subValue;\n subValue = value[key];\n }\n // Recursively populate clone (susceptible to call stack limits).\n assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n return result;\n}\n\nmodule.exports = baseClone;\n","var isObject = require('./isObject');\n\n/** Built-in value references. */\nvar objectCreate = Object.create;\n\n/**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} proto The object to inherit from.\n * @returns {Object} Returns the new object.\n */\nvar baseCreate = (function() {\n function object() {}\n return function(proto) {\n if (!isObject(proto)) {\n return {};\n }\n if (objectCreate) {\n return objectCreate(proto);\n }\n object.prototype = proto;\n var result = new object;\n object.prototype = undefined;\n return result;\n };\n}());\n\nmodule.exports = baseCreate;\n","var arrayPush = require('./_arrayPush'),\n isArray = require('./isArray');\n\n/**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction baseGetAllKeys(object, keysFunc, symbolsFunc) {\n var result = keysFunc(object);\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n}\n\nmodule.exports = baseGetAllKeys;\n","var Symbol = require('./_Symbol'),\n getRawTag = require('./_getRawTag'),\n objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]';\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\nmodule.exports = baseIsArguments;\n","var baseIsEqualDeep = require('./_baseIsEqualDeep'),\n isObjectLike = require('./isObjectLike');\n\n/**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Unordered comparison\n * 2 - Partial comparison\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\nfunction baseIsEqual(value, other, bitmask, customizer, stack) {\n if (value === other) {\n return true;\n }\n if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\n return value !== value && other !== other;\n }\n return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n}\n\nmodule.exports = baseIsEqual;\n","var Stack = require('./_Stack'),\n equalArrays = require('./_equalArrays'),\n equalByTag = require('./_equalByTag'),\n equalObjects = require('./_equalObjects'),\n getTag = require('./_getTag'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isTypedArray = require('./isTypedArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n var objIsArr = isArray(object),\n othIsArr = isArray(other),\n objTag = objIsArr ? arrayTag : getTag(object),\n othTag = othIsArr ? arrayTag : getTag(other);\n\n objTag = objTag == argsTag ? objectTag : objTag;\n othTag = othTag == argsTag ? objectTag : othTag;\n\n var objIsObj = objTag == objectTag,\n othIsObj = othTag == objectTag,\n isSameTag = objTag == othTag;\n\n if (isSameTag && isBuffer(object)) {\n if (!isBuffer(other)) {\n return false;\n }\n objIsArr = true;\n objIsObj = false;\n }\n if (isSameTag && !objIsObj) {\n stack || (stack = new Stack);\n return (objIsArr || isTypedArray(object))\n ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n }\n if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n if (objIsWrapped || othIsWrapped) {\n var objUnwrapped = objIsWrapped ? object.value() : object,\n othUnwrapped = othIsWrapped ? other.value() : other;\n\n stack || (stack = new Stack);\n return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n }\n }\n if (!isSameTag) {\n return false;\n }\n stack || (stack = new Stack);\n return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n}\n\nmodule.exports = baseIsEqualDeep;\n","var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]';\n\n/**\n * The base implementation of `_.isMap` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n */\nfunction baseIsMap(value) {\n return isObjectLike(value) && getTag(value) == mapTag;\n}\n\nmodule.exports = baseIsMap;\n","var isFunction = require('./isFunction'),\n isMasked = require('./_isMasked'),\n isObject = require('./isObject'),\n toSource = require('./_toSource');\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\nmodule.exports = baseIsNative;\n","var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar setTag = '[object Set]';\n\n/**\n * The base implementation of `_.isSet` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n */\nfunction baseIsSet(value) {\n return isObjectLike(value) && getTag(value) == setTag;\n}\n\nmodule.exports = baseIsSet;\n","var baseGetTag = require('./_baseGetTag'),\n isLength = require('./isLength'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n\nmodule.exports = baseIsTypedArray;\n","var isPrototype = require('./_isPrototype'),\n nativeKeys = require('./_nativeKeys');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeys;\n","var isObject = require('./isObject'),\n isPrototype = require('./_isPrototype'),\n nativeKeysIn = require('./_nativeKeysIn');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeysIn(object) {\n if (!isObject(object)) {\n return nativeKeysIn(object);\n }\n var isProto = isPrototype(object),\n result = [];\n\n for (var key in object) {\n if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeysIn;\n","/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\nmodule.exports = baseTimes;\n","/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n return function(value) {\n return func(value);\n };\n}\n\nmodule.exports = baseUnary;\n","/**\n * Checks if a `cache` value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction cacheHas(cache, key) {\n return cache.has(key);\n}\n\nmodule.exports = cacheHas;\n","var Uint8Array = require('./_Uint8Array');\n\n/**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\nfunction cloneArrayBuffer(arrayBuffer) {\n var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n return result;\n}\n\nmodule.exports = cloneArrayBuffer;\n","var root = require('./_root');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined,\n allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;\n\n/**\n * Creates a clone of `buffer`.\n *\n * @private\n * @param {Buffer} buffer The buffer to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Buffer} Returns the cloned buffer.\n */\nfunction cloneBuffer(buffer, isDeep) {\n if (isDeep) {\n return buffer.slice();\n }\n var length = buffer.length,\n result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\n\n buffer.copy(result);\n return result;\n}\n\nmodule.exports = cloneBuffer;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer');\n\n/**\n * Creates a clone of `dataView`.\n *\n * @private\n * @param {Object} dataView The data view to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned data view.\n */\nfunction cloneDataView(dataView, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;\n return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);\n}\n\nmodule.exports = cloneDataView;\n","/** Used to match `RegExp` flags from their coerced string values. */\nvar reFlags = /\\w*$/;\n\n/**\n * Creates a clone of `regexp`.\n *\n * @private\n * @param {Object} regexp The regexp to clone.\n * @returns {Object} Returns the cloned regexp.\n */\nfunction cloneRegExp(regexp) {\n var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));\n result.lastIndex = regexp.lastIndex;\n return result;\n}\n\nmodule.exports = cloneRegExp;\n","var Symbol = require('./_Symbol');\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * Creates a clone of the `symbol` object.\n *\n * @private\n * @param {Object} symbol The symbol object to clone.\n * @returns {Object} Returns the cloned symbol object.\n */\nfunction cloneSymbol(symbol) {\n return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};\n}\n\nmodule.exports = cloneSymbol;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer');\n\n/**\n * Creates a clone of `typedArray`.\n *\n * @private\n * @param {Object} typedArray The typed array to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned typed array.\n */\nfunction cloneTypedArray(typedArray, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n}\n\nmodule.exports = cloneTypedArray;\n","/**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\nfunction copyArray(source, array) {\n var index = -1,\n length = source.length;\n\n array || (array = Array(length));\n while (++index < length) {\n array[index] = source[index];\n }\n return array;\n}\n\nmodule.exports = copyArray;\n","var assignValue = require('./_assignValue'),\n baseAssignValue = require('./_baseAssignValue');\n\n/**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\nfunction copyObject(source, props, object, customizer) {\n var isNew = !object;\n object || (object = {});\n\n var index = -1,\n length = props.length;\n\n while (++index < length) {\n var key = props[index];\n\n var newValue = customizer\n ? customizer(object[key], source[key], key, object, source)\n : undefined;\n\n if (newValue === undefined) {\n newValue = source[key];\n }\n if (isNew) {\n baseAssignValue(object, key, newValue);\n } else {\n assignValue(object, key, newValue);\n }\n }\n return object;\n}\n\nmodule.exports = copyObject;\n","var copyObject = require('./_copyObject'),\n getSymbols = require('./_getSymbols');\n\n/**\n * Copies own symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbols(source, object) {\n return copyObject(source, getSymbols(source), object);\n}\n\nmodule.exports = copySymbols;\n","var copyObject = require('./_copyObject'),\n getSymbolsIn = require('./_getSymbolsIn');\n\n/**\n * Copies own and inherited symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbolsIn(source, object) {\n return copyObject(source, getSymbolsIn(source), object);\n}\n\nmodule.exports = copySymbolsIn;\n","var root = require('./_root');\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\nmodule.exports = coreJsData;\n","var getNative = require('./_getNative');\n\nvar defineProperty = (function() {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n}());\n\nmodule.exports = defineProperty;\n","var SetCache = require('./_SetCache'),\n arraySome = require('./_arraySome'),\n cacheHas = require('./_cacheHas');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\nfunction equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n arrLength = array.length,\n othLength = other.length;\n\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n return false;\n }\n // Check that cyclic values are equal.\n var arrStacked = stack.get(array);\n var othStacked = stack.get(other);\n if (arrStacked && othStacked) {\n return arrStacked == other && othStacked == array;\n }\n var index = -1,\n result = true,\n seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n stack.set(array, other);\n stack.set(other, array);\n\n // Ignore non-index properties.\n while (++index < arrLength) {\n var arrValue = array[index],\n othValue = other[index];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, arrValue, index, other, array, stack)\n : customizer(arrValue, othValue, index, array, other, stack);\n }\n if (compared !== undefined) {\n if (compared) {\n continue;\n }\n result = false;\n break;\n }\n // Recursively compare arrays (susceptible to call stack limits).\n if (seen) {\n if (!arraySome(other, function(othValue, othIndex) {\n if (!cacheHas(seen, othIndex) &&\n (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n return seen.push(othIndex);\n }\n })) {\n result = false;\n break;\n }\n } else if (!(\n arrValue === othValue ||\n equalFunc(arrValue, othValue, bitmask, customizer, stack)\n )) {\n result = false;\n break;\n }\n }\n stack['delete'](array);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalArrays;\n","var Symbol = require('./_Symbol'),\n Uint8Array = require('./_Uint8Array'),\n eq = require('./eq'),\n equalArrays = require('./_equalArrays'),\n mapToArray = require('./_mapToArray'),\n setToArray = require('./_setToArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]';\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n switch (tag) {\n case dataViewTag:\n if ((object.byteLength != other.byteLength) ||\n (object.byteOffset != other.byteOffset)) {\n return false;\n }\n object = object.buffer;\n other = other.buffer;\n\n case arrayBufferTag:\n if ((object.byteLength != other.byteLength) ||\n !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n return false;\n }\n return true;\n\n case boolTag:\n case dateTag:\n case numberTag:\n // Coerce booleans to `1` or `0` and dates to milliseconds.\n // Invalid dates are coerced to `NaN`.\n return eq(+object, +other);\n\n case errorTag:\n return object.name == other.name && object.message == other.message;\n\n case regexpTag:\n case stringTag:\n // Coerce regexes to strings and treat strings, primitives and objects,\n // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n // for more details.\n return object == (other + '');\n\n case mapTag:\n var convert = mapToArray;\n\n case setTag:\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n convert || (convert = setToArray);\n\n if (object.size != other.size && !isPartial) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked) {\n return stacked == other;\n }\n bitmask |= COMPARE_UNORDERED_FLAG;\n\n // Recursively compare objects (susceptible to call stack limits).\n stack.set(object, other);\n var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n stack['delete'](object);\n return result;\n\n case symbolTag:\n if (symbolValueOf) {\n return symbolValueOf.call(object) == symbolValueOf.call(other);\n }\n }\n return false;\n}\n\nmodule.exports = equalByTag;\n","var getAllKeys = require('./_getAllKeys');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n objProps = getAllKeys(object),\n objLength = objProps.length,\n othProps = getAllKeys(other),\n othLength = othProps.length;\n\n if (objLength != othLength && !isPartial) {\n return false;\n }\n var index = objLength;\n while (index--) {\n var key = objProps[index];\n if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n return false;\n }\n }\n // Check that cyclic values are equal.\n var objStacked = stack.get(object);\n var othStacked = stack.get(other);\n if (objStacked && othStacked) {\n return objStacked == other && othStacked == object;\n }\n var result = true;\n stack.set(object, other);\n stack.set(other, object);\n\n var skipCtor = isPartial;\n while (++index < objLength) {\n key = objProps[index];\n var objValue = object[key],\n othValue = other[key];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, objValue, key, other, object, stack)\n : customizer(objValue, othValue, key, object, other, stack);\n }\n // Recursively compare objects (susceptible to call stack limits).\n if (!(compared === undefined\n ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n : compared\n )) {\n result = false;\n break;\n }\n skipCtor || (skipCtor = key == 'constructor');\n }\n if (result && !skipCtor) {\n var objCtor = object.constructor,\n othCtor = other.constructor;\n\n // Non `Object` object instances with different constructors are not equal.\n if (objCtor != othCtor &&\n ('constructor' in object && 'constructor' in other) &&\n !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n result = false;\n }\n }\n stack['delete'](object);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalObjects;\n","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n","var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbols = require('./_getSymbols'),\n keys = require('./keys');\n\n/**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeys(object) {\n return baseGetAllKeys(object, keys, getSymbols);\n}\n\nmodule.exports = getAllKeys;\n","var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbolsIn = require('./_getSymbolsIn'),\n keysIn = require('./keysIn');\n\n/**\n * Creates an array of own and inherited enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeysIn(object) {\n return baseGetAllKeys(object, keysIn, getSymbolsIn);\n}\n\nmodule.exports = getAllKeysIn;\n","var isKeyable = require('./_isKeyable');\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\nmodule.exports = getMapData;\n","var baseIsNative = require('./_baseIsNative'),\n getValue = require('./_getValue');\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\nmodule.exports = getNative;\n","var overArg = require('./_overArg');\n\n/** Built-in value references. */\nvar getPrototype = overArg(Object.getPrototypeOf, Object);\n\nmodule.exports = getPrototype;\n","var Symbol = require('./_Symbol');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nmodule.exports = getRawTag;\n","var arrayFilter = require('./_arrayFilter'),\n stubArray = require('./stubArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n if (object == null) {\n return [];\n }\n object = Object(object);\n return arrayFilter(nativeGetSymbols(object), function(symbol) {\n return propertyIsEnumerable.call(object, symbol);\n });\n};\n\nmodule.exports = getSymbols;\n","var arrayPush = require('./_arrayPush'),\n getPrototype = require('./_getPrototype'),\n getSymbols = require('./_getSymbols'),\n stubArray = require('./stubArray');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own and inherited enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {\n var result = [];\n while (object) {\n arrayPush(result, getSymbols(object));\n object = getPrototype(object);\n }\n return result;\n};\n\nmodule.exports = getSymbolsIn;\n","var DataView = require('./_DataView'),\n Map = require('./_Map'),\n Promise = require('./_Promise'),\n Set = require('./_Set'),\n WeakMap = require('./_WeakMap'),\n baseGetTag = require('./_baseGetTag'),\n toSource = require('./_toSource');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n setTag = '[object Set]',\n weakMapTag = '[object WeakMap]';\n\nvar dataViewTag = '[object DataView]';\n\n/** Used to detect maps, sets, and weakmaps. */\nvar dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nvar getTag = baseGetTag;\n\n// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\nif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = baseGetTag(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : '';\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n}\n\nmodule.exports = getTag;\n","/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\nmodule.exports = getValue;\n","var nativeCreate = require('./_nativeCreate');\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n}\n\nmodule.exports = hashClear;\n","/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = hashDelete;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\nmodule.exports = hashGet;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\nmodule.exports = hashHas;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\nmodule.exports = hashSet;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Initializes an array clone.\n *\n * @private\n * @param {Array} array The array to clone.\n * @returns {Array} Returns the initialized clone.\n */\nfunction initCloneArray(array) {\n var length = array.length,\n result = new array.constructor(length);\n\n // Add properties assigned by `RegExp#exec`.\n if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {\n result.index = array.index;\n result.input = array.input;\n }\n return result;\n}\n\nmodule.exports = initCloneArray;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer'),\n cloneDataView = require('./_cloneDataView'),\n cloneRegExp = require('./_cloneRegExp'),\n cloneSymbol = require('./_cloneSymbol'),\n cloneTypedArray = require('./_cloneTypedArray');\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/**\n * Initializes an object clone based on its `toStringTag`.\n *\n * **Note:** This function only supports cloning values with tags of\n * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.\n *\n * @private\n * @param {Object} object The object to clone.\n * @param {string} tag The `toStringTag` of the object to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneByTag(object, tag, isDeep) {\n var Ctor = object.constructor;\n switch (tag) {\n case arrayBufferTag:\n return cloneArrayBuffer(object);\n\n case boolTag:\n case dateTag:\n return new Ctor(+object);\n\n case dataViewTag:\n return cloneDataView(object, isDeep);\n\n case float32Tag: case float64Tag:\n case int8Tag: case int16Tag: case int32Tag:\n case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:\n return cloneTypedArray(object, isDeep);\n\n case mapTag:\n return new Ctor;\n\n case numberTag:\n case stringTag:\n return new Ctor(object);\n\n case regexpTag:\n return cloneRegExp(object);\n\n case setTag:\n return new Ctor;\n\n case symbolTag:\n return cloneSymbol(object);\n }\n}\n\nmodule.exports = initCloneByTag;\n","var baseCreate = require('./_baseCreate'),\n getPrototype = require('./_getPrototype'),\n isPrototype = require('./_isPrototype');\n\n/**\n * Initializes an object clone.\n *\n * @private\n * @param {Object} object The object to clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneObject(object) {\n return (typeof object.constructor == 'function' && !isPrototype(object))\n ? baseCreate(getPrototype(object))\n : {};\n}\n\nmodule.exports = initCloneObject;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n var type = typeof value;\n length = length == null ? MAX_SAFE_INTEGER : length;\n\n return !!length &&\n (type == 'number' ||\n (type != 'symbol' && reIsUint.test(value))) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\nmodule.exports = isIndex;\n","/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\nmodule.exports = isKeyable;\n","var coreJsData = require('./_coreJsData');\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\nmodule.exports = isMasked;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\nmodule.exports = isPrototype;\n","/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n}\n\nmodule.exports = listCacheClear;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype;\n\n/** Built-in value references. */\nvar splice = arrayProto.splice;\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n}\n\nmodule.exports = listCacheDelete;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\nmodule.exports = listCacheGet;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\nmodule.exports = listCacheHas;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\nmodule.exports = listCacheSet;\n","var Hash = require('./_Hash'),\n ListCache = require('./_ListCache'),\n Map = require('./_Map');\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\nmodule.exports = mapCacheClear;\n","var getMapData = require('./_getMapData');\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = mapCacheDelete;\n","var getMapData = require('./_getMapData');\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\nmodule.exports = mapCacheGet;\n","var getMapData = require('./_getMapData');\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\nmodule.exports = mapCacheHas;\n","var getMapData = require('./_getMapData');\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n}\n\nmodule.exports = mapCacheSet;\n","/**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\nfunction mapToArray(map) {\n var index = -1,\n result = Array(map.size);\n\n map.forEach(function(value, key) {\n result[++index] = [key, value];\n });\n return result;\n}\n\nmodule.exports = mapToArray;\n","var getNative = require('./_getNative');\n\n/* Built-in method references that are verified to be native. */\nvar nativeCreate = getNative(Object, 'create');\n\nmodule.exports = nativeCreate;\n","var overArg = require('./_overArg');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeKeys = overArg(Object.keys, Object);\n\nmodule.exports = nativeKeys;\n","/**\n * This function is like\n * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * except that it includes inherited enumerable properties.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction nativeKeysIn(object) {\n var result = [];\n if (object != null) {\n for (var key in Object(object)) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = nativeKeysIn;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n try {\n // Use `util.types` for Node.js 10+.\n var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n if (types) {\n return types;\n }\n\n // Legacy `process.binding('util')` for Node.js < 10.\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n}());\n\nmodule.exports = nodeUtil;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n","/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\nmodule.exports = overArg;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n","/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\nfunction setCacheAdd(value) {\n this.__data__.set(value, HASH_UNDEFINED);\n return this;\n}\n\nmodule.exports = setCacheAdd;\n","/**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\nfunction setCacheHas(value) {\n return this.__data__.has(value);\n}\n\nmodule.exports = setCacheHas;\n","/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\nfunction setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n}\n\nmodule.exports = setToArray;\n","var ListCache = require('./_ListCache');\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}\n\nmodule.exports = stackClear;\n","/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n var data = this.__data__,\n result = data['delete'](key);\n\n this.size = data.size;\n return result;\n}\n\nmodule.exports = stackDelete;\n","/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n return this.__data__.get(key);\n}\n\nmodule.exports = stackGet;\n","/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n return this.__data__.has(key);\n}\n\nmodule.exports = stackHas;\n","var ListCache = require('./_ListCache'),\n Map = require('./_Map'),\n MapCache = require('./_MapCache');\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n var data = this.__data__;\n if (data instanceof ListCache) {\n var pairs = data.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n this.size = ++data.size;\n return this;\n }\n data = this.__data__ = new MapCache(pairs);\n }\n data.set(key, value);\n this.size = data.size;\n return this;\n}\n\nmodule.exports = stackSet;\n","/** Used for built-in method references. */\nvar funcProto = Function.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\nmodule.exports = toSource;\n","var baseClone = require('./_baseClone');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_SYMBOLS_FLAG = 4;\n\n/**\n * This method is like `_.clone` except that it recursively clones `value`.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Lang\n * @param {*} value The value to recursively clone.\n * @returns {*} Returns the deep cloned value.\n * @see _.clone\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var deep = _.cloneDeep(objects);\n * console.log(deep[0] === objects[0]);\n * // => false\n */\nfunction cloneDeep(value) {\n return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);\n}\n\nmodule.exports = cloneDeep;\n","/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\nmodule.exports = eq;\n","var baseIsArguments = require('./_baseIsArguments'),\n isObjectLike = require('./isObjectLike');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n};\n\nmodule.exports = isArguments;\n","/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\nmodule.exports = isArray;\n","var isFunction = require('./isFunction'),\n isLength = require('./isLength');\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\nmodule.exports = isArrayLike;\n","var root = require('./_root'),\n stubFalse = require('./stubFalse');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\nmodule.exports = isBuffer;\n","var baseIsEqual = require('./_baseIsEqual');\n\n/**\n * Performs a deep comparison between two values to determine if they are\n * equivalent.\n *\n * **Note:** This method supports comparing arrays, array buffers, booleans,\n * date objects, error objects, maps, numbers, `Object` objects, regexes,\n * sets, strings, symbols, and typed arrays. `Object` objects are compared\n * by their own, not inherited, enumerable properties. Functions and DOM\n * nodes are compared by strict equality, i.e. `===`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.isEqual(object, other);\n * // => true\n *\n * object === other;\n * // => false\n */\nfunction isEqual(value, other) {\n return baseIsEqual(value, other);\n}\n\nmodule.exports = isEqual;\n","var baseGetTag = require('./_baseGetTag'),\n isObject = require('./isObject');\n\n/** `Object#toString` result references. */\nvar asyncTag = '[object AsyncFunction]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n proxyTag = '[object Proxy]';\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\nmodule.exports = isFunction;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\nmodule.exports = isLength;\n","var baseIsMap = require('./_baseIsMap'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsMap = nodeUtil && nodeUtil.isMap;\n\n/**\n * Checks if `value` is classified as a `Map` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n * @example\n *\n * _.isMap(new Map);\n * // => true\n *\n * _.isMap(new WeakMap);\n * // => false\n */\nvar isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;\n\nmodule.exports = isMap;\n","/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n","var baseIsSet = require('./_baseIsSet'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsSet = nodeUtil && nodeUtil.isSet;\n\n/**\n * Checks if `value` is classified as a `Set` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n * @example\n *\n * _.isSet(new Set);\n * // => true\n *\n * _.isSet(new WeakSet);\n * // => false\n */\nvar isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;\n\nmodule.exports = isSet;\n","var baseIsTypedArray = require('./_baseIsTypedArray'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\nmodule.exports = isTypedArray;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeys = require('./_baseKeys'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\nmodule.exports = keys;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeysIn = require('./_baseKeysIn'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\nfunction keysIn(object) {\n return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n}\n\nmodule.exports = keysIn;\n","/**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\nfunction stubArray() {\n return [];\n}\n\nmodule.exports = stubArray;\n","/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n return false;\n}\n\nmodule.exports = stubFalse;\n","import { connect, type BaseConnectionOptions } from \"@openfin/core-web\";\nimport { getSettings } from \"./settings\";\n\n/**\n * Initializes the OpenFin Web Broker connection.\n * @param inherit Should we inherit settings from the host (available in the OpenFin layout system) or use settings? Default is true.\n */\nexport async function init(inherit: boolean = true): Promise {\n\t// Set window.fin to the `fin` object.\n\tlet options: BaseConnectionOptions | undefined;\n\tif (window.fin === undefined) {\n\t\tif (!inherit) {\n\t\t\tconst settings = await getSettings();\n\t\t\tif (settings === undefined) {\n\t\t\t\tconsole.error(\n\t\t\t\t\t\"Unable to run the sample as we have been unable to load the web manifest and it's settings from the currently running html page. Please ensure that the web manifest is being served and that it contains the custom_settings section.\"\n\t\t\t\t);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\toptions = {\n\t\t\t\tbrokerUrl: settings.platform.interop.brokerUrl,\n\t\t\t\tinteropConfig: {\n\t\t\t\t\tproviderId: settings.platform.interop.providerId,\n\t\t\t\t\tcurrentContextGroup: settings.platform.interop.defaultContextGroup\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t\t// Specify an interopConfig with a specific provider ID and a context group to initialize the `fin.me.interop` client on connection.\n\t\tif (options) {\n\t\t\twindow.fin = await connect({\n\t\t\t\toptions\n\t\t\t});\n\t\t} else {\n\t\t\twindow.fin = await connect({\n\t\t\t\tconnectionInheritance: \"enabled\"\n\t\t\t});\n\t\t}\n\t\tconsole.log(\"Finished initializing the fin API.\");\n\t\t// Create and dispatch the finReady event\n\t\tconst event = new CustomEvent(\"finReady\");\n\t\twindow.dispatchEvent(event);\n\t}\n\n\tif (window.fdc3 === undefined && window?.fin?.me.interop?.getFDC3Sync !== undefined) {\n\t\twindow.fdc3 = fin.me.interop.getFDC3Sync(\"2.0\");\n\t\tconsole.log(\"Finished initializing the fdc3 API.\");\n\t\t// Create and dispatch the FDC3Ready event\n\t\tconst event = new CustomEvent(\"fdc3Ready\");\n\t\twindow.dispatchEvent(event);\n\t}\n}\n","import type { WebLayoutSnapshot } from \"@openfin/core-web\";\nimport type { Settings } from \"../shapes/setting-shapes\";\n\n/**\n * Fetches the settings for the application.\n * @returns The settings for the application.\n */\nexport async function getSettings(): Promise {\n\tconst settings = await getManifestSettings();\n\tif (settings === undefined) {\n\t\tconsole.error(\n\t\t\t\"Unable to run the example as settings are required and we fetch them from the link web manifest from the html page that is being served. It should exist in the customSettings section of the web manifest.\"\n\t\t);\n\t}\n\treturn settings;\n}\n\n/**\n * Returns a default layout from the settings if provided.\n * @returns The default layout from the settings.\n */\nexport async function getDefaultLayout(): Promise {\n\tconst settings = await getSettings();\n\tif (settings?.platform?.layout?.defaultLayout === undefined) {\n\t\tconsole.error(\n\t\t\t\"Unable to run the example as without a layout being defined. Please ensure that settings have been provided in the web manifest.\"\n\t\t);\n\t\treturn;\n\t}\n\tif (typeof settings.platform.layout.defaultLayout === \"string\") {\n\t\tconst layoutResponse = await fetch(settings.platform.layout.defaultLayout);\n\t\tconst layoutJson = (await layoutResponse.json()) as WebLayoutSnapshot;\n\t\treturn layoutJson;\n\t}\n\treturn settings.platform.layout.defaultLayout;\n}\n\n/**\n * Returns the settings from the manifest file.\n * @returns customSettings for this example\n */\nasync function getManifestSettings(): Promise {\n\t// Get the manifest link\n\tconst link = document.querySelector('link[rel=\"manifest\"]');\n\tif (link !== null) {\n\t\tconst manifestResponse = await fetch(link.href);\n\t\tconst manifestJson = (await manifestResponse.json()) as { custom_settings: Settings };\n\t\treturn manifestJson.custom_settings;\n\t}\n}\n","export { default as v1 } from './v1.js';\nexport { default as v3 } from './v3.js';\nexport { default as v4 } from './v4.js';\nexport { default as v5 } from './v5.js';\nexport { default as NIL } from './nil.js';\nexport { default as version } from './version.js';\nexport { default as validate } from './validate.js';\nexport { default as stringify } from './stringify.js';\nexport { default as parse } from './parse.js';","/*\n * Browser-compatible JavaScript MD5\n *\n * Modification of JavaScript MD5\n * https://github.com/blueimp/JavaScript-MD5\n *\n * Copyright 2011, Sebastian Tschan\n * https://blueimp.net\n *\n * Licensed under the MIT license:\n * https://opensource.org/licenses/MIT\n *\n * Based on\n * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message\n * Digest Algorithm, as defined in RFC 1321.\n * Version 2.2 Copyright (C) Paul Johnston 1999 - 2009\n * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet\n * Distributed under the BSD License\n * See http://pajhome.org.uk/crypt/md5 for more info.\n */\nfunction md5(bytes) {\n if (typeof bytes === 'string') {\n var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape\n\n bytes = new Uint8Array(msg.length);\n\n for (var i = 0; i < msg.length; ++i) {\n bytes[i] = msg.charCodeAt(i);\n }\n }\n\n return md5ToHexEncodedArray(wordsToMd5(bytesToWords(bytes), bytes.length * 8));\n}\n/*\n * Convert an array of little-endian words to an array of bytes\n */\n\n\nfunction md5ToHexEncodedArray(input) {\n var output = [];\n var length32 = input.length * 32;\n var hexTab = '0123456789abcdef';\n\n for (var i = 0; i < length32; i += 8) {\n var x = input[i >> 5] >>> i % 32 & 0xff;\n var hex = parseInt(hexTab.charAt(x >>> 4 & 0x0f) + hexTab.charAt(x & 0x0f), 16);\n output.push(hex);\n }\n\n return output;\n}\n/**\n * Calculate output length with padding and bit length\n */\n\n\nfunction getOutputLength(inputLength8) {\n return (inputLength8 + 64 >>> 9 << 4) + 14 + 1;\n}\n/*\n * Calculate the MD5 of an array of little-endian words, and a bit length.\n */\n\n\nfunction wordsToMd5(x, len) {\n /* append padding */\n x[len >> 5] |= 0x80 << len % 32;\n x[getOutputLength(len) - 1] = len;\n var a = 1732584193;\n var b = -271733879;\n var c = -1732584194;\n var d = 271733878;\n\n for (var i = 0; i < x.length; i += 16) {\n var olda = a;\n var oldb = b;\n var oldc = c;\n var oldd = d;\n a = md5ff(a, b, c, d, x[i], 7, -680876936);\n d = md5ff(d, a, b, c, x[i + 1], 12, -389564586);\n c = md5ff(c, d, a, b, x[i + 2], 17, 606105819);\n b = md5ff(b, c, d, a, x[i + 3], 22, -1044525330);\n a = md5ff(a, b, c, d, x[i + 4], 7, -176418897);\n d = md5ff(d, a, b, c, x[i + 5], 12, 1200080426);\n c = md5ff(c, d, a, b, x[i + 6], 17, -1473231341);\n b = md5ff(b, c, d, a, x[i + 7], 22, -45705983);\n a = md5ff(a, b, c, d, x[i + 8], 7, 1770035416);\n d = md5ff(d, a, b, c, x[i + 9], 12, -1958414417);\n c = md5ff(c, d, a, b, x[i + 10], 17, -42063);\n b = md5ff(b, c, d, a, x[i + 11], 22, -1990404162);\n a = md5ff(a, b, c, d, x[i + 12], 7, 1804603682);\n d = md5ff(d, a, b, c, x[i + 13], 12, -40341101);\n c = md5ff(c, d, a, b, x[i + 14], 17, -1502002290);\n b = md5ff(b, c, d, a, x[i + 15], 22, 1236535329);\n a = md5gg(a, b, c, d, x[i + 1], 5, -165796510);\n d = md5gg(d, a, b, c, x[i + 6], 9, -1069501632);\n c = md5gg(c, d, a, b, x[i + 11], 14, 643717713);\n b = md5gg(b, c, d, a, x[i], 20, -373897302);\n a = md5gg(a, b, c, d, x[i + 5], 5, -701558691);\n d = md5gg(d, a, b, c, x[i + 10], 9, 38016083);\n c = md5gg(c, d, a, b, x[i + 15], 14, -660478335);\n b = md5gg(b, c, d, a, x[i + 4], 20, -405537848);\n a = md5gg(a, b, c, d, x[i + 9], 5, 568446438);\n d = md5gg(d, a, b, c, x[i + 14], 9, -1019803690);\n c = md5gg(c, d, a, b, x[i + 3], 14, -187363961);\n b = md5gg(b, c, d, a, x[i + 8], 20, 1163531501);\n a = md5gg(a, b, c, d, x[i + 13], 5, -1444681467);\n d = md5gg(d, a, b, c, x[i + 2], 9, -51403784);\n c = md5gg(c, d, a, b, x[i + 7], 14, 1735328473);\n b = md5gg(b, c, d, a, x[i + 12], 20, -1926607734);\n a = md5hh(a, b, c, d, x[i + 5], 4, -378558);\n d = md5hh(d, a, b, c, x[i + 8], 11, -2022574463);\n c = md5hh(c, d, a, b, x[i + 11], 16, 1839030562);\n b = md5hh(b, c, d, a, x[i + 14], 23, -35309556);\n a = md5hh(a, b, c, d, x[i + 1], 4, -1530992060);\n d = md5hh(d, a, b, c, x[i + 4], 11, 1272893353);\n c = md5hh(c, d, a, b, x[i + 7], 16, -155497632);\n b = md5hh(b, c, d, a, x[i + 10], 23, -1094730640);\n a = md5hh(a, b, c, d, x[i + 13], 4, 681279174);\n d = md5hh(d, a, b, c, x[i], 11, -358537222);\n c = md5hh(c, d, a, b, x[i + 3], 16, -722521979);\n b = md5hh(b, c, d, a, x[i + 6], 23, 76029189);\n a = md5hh(a, b, c, d, x[i + 9], 4, -640364487);\n d = md5hh(d, a, b, c, x[i + 12], 11, -421815835);\n c = md5hh(c, d, a, b, x[i + 15], 16, 530742520);\n b = md5hh(b, c, d, a, x[i + 2], 23, -995338651);\n a = md5ii(a, b, c, d, x[i], 6, -198630844);\n d = md5ii(d, a, b, c, x[i + 7], 10, 1126891415);\n c = md5ii(c, d, a, b, x[i + 14], 15, -1416354905);\n b = md5ii(b, c, d, a, x[i + 5], 21, -57434055);\n a = md5ii(a, b, c, d, x[i + 12], 6, 1700485571);\n d = md5ii(d, a, b, c, x[i + 3], 10, -1894986606);\n c = md5ii(c, d, a, b, x[i + 10], 15, -1051523);\n b = md5ii(b, c, d, a, x[i + 1], 21, -2054922799);\n a = md5ii(a, b, c, d, x[i + 8], 6, 1873313359);\n d = md5ii(d, a, b, c, x[i + 15], 10, -30611744);\n c = md5ii(c, d, a, b, x[i + 6], 15, -1560198380);\n b = md5ii(b, c, d, a, x[i + 13], 21, 1309151649);\n a = md5ii(a, b, c, d, x[i + 4], 6, -145523070);\n d = md5ii(d, a, b, c, x[i + 11], 10, -1120210379);\n c = md5ii(c, d, a, b, x[i + 2], 15, 718787259);\n b = md5ii(b, c, d, a, x[i + 9], 21, -343485551);\n a = safeAdd(a, olda);\n b = safeAdd(b, oldb);\n c = safeAdd(c, oldc);\n d = safeAdd(d, oldd);\n }\n\n return [a, b, c, d];\n}\n/*\n * Convert an array bytes to an array of little-endian words\n * Characters >255 have their high-byte silently ignored.\n */\n\n\nfunction bytesToWords(input) {\n if (input.length === 0) {\n return [];\n }\n\n var length8 = input.length * 8;\n var output = new Uint32Array(getOutputLength(length8));\n\n for (var i = 0; i < length8; i += 8) {\n output[i >> 5] |= (input[i / 8] & 0xff) << i % 32;\n }\n\n return output;\n}\n/*\n * Add integers, wrapping at 2^32. This uses 16-bit operations internally\n * to work around bugs in some JS interpreters.\n */\n\n\nfunction safeAdd(x, y) {\n var lsw = (x & 0xffff) + (y & 0xffff);\n var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n return msw << 16 | lsw & 0xffff;\n}\n/*\n * Bitwise rotate a 32-bit number to the left.\n */\n\n\nfunction bitRotateLeft(num, cnt) {\n return num << cnt | num >>> 32 - cnt;\n}\n/*\n * These functions implement the four basic operations the algorithm uses.\n */\n\n\nfunction md5cmn(q, a, b, x, s, t) {\n return safeAdd(bitRotateLeft(safeAdd(safeAdd(a, q), safeAdd(x, t)), s), b);\n}\n\nfunction md5ff(a, b, c, d, x, s, t) {\n return md5cmn(b & c | ~b & d, a, b, x, s, t);\n}\n\nfunction md5gg(a, b, c, d, x, s, t) {\n return md5cmn(b & d | c & ~d, a, b, x, s, t);\n}\n\nfunction md5hh(a, b, c, d, x, s, t) {\n return md5cmn(b ^ c ^ d, a, b, x, s, t);\n}\n\nfunction md5ii(a, b, c, d, x, s, t) {\n return md5cmn(c ^ (b | ~d), a, b, x, s, t);\n}\n\nexport default md5;","export default '00000000-0000-0000-0000-000000000000';","import validate from './validate.js';\n\nfunction parse(uuid) {\n if (!validate(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n var v;\n var arr = new Uint8Array(16); // Parse ########-....-....-....-............\n\n arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24;\n arr[1] = v >>> 16 & 0xff;\n arr[2] = v >>> 8 & 0xff;\n arr[3] = v & 0xff; // Parse ........-####-....-....-............\n\n arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8;\n arr[5] = v & 0xff; // Parse ........-....-####-....-............\n\n arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8;\n arr[7] = v & 0xff; // Parse ........-....-....-####-............\n\n arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8;\n arr[9] = v & 0xff; // Parse ........-....-....-....-############\n // (Use \"/\" to avoid 32-bit truncation when bit-shifting high-order bytes)\n\n arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff;\n arr[11] = v / 0x100000000 & 0xff;\n arr[12] = v >>> 24 & 0xff;\n arr[13] = v >>> 16 & 0xff;\n arr[14] = v >>> 8 & 0xff;\n arr[15] = v & 0xff;\n return arr;\n}\n\nexport default parse;","export default /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;","// Unique ID creation requires a high quality random # generator. In the browser we therefore\n// require the crypto API and do not support built-in fallback to lower quality random number\n// generators (like Math.random()).\nvar getRandomValues;\nvar rnds8 = new Uint8Array(16);\nexport default function rng() {\n // lazy load so that environments that need to polyfill have a chance to do so\n if (!getRandomValues) {\n // getRandomValues needs to be invoked in a context where \"this\" is a Crypto implementation. Also,\n // find the complete implementation of crypto (msCrypto) on IE11.\n getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto !== 'undefined' && typeof msCrypto.getRandomValues === 'function' && msCrypto.getRandomValues.bind(msCrypto);\n\n if (!getRandomValues) {\n throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');\n }\n }\n\n return getRandomValues(rnds8);\n}","// Adapted from Chris Veness' SHA1 code at\n// http://www.movable-type.co.uk/scripts/sha1.html\nfunction f(s, x, y, z) {\n switch (s) {\n case 0:\n return x & y ^ ~x & z;\n\n case 1:\n return x ^ y ^ z;\n\n case 2:\n return x & y ^ x & z ^ y & z;\n\n case 3:\n return x ^ y ^ z;\n }\n}\n\nfunction ROTL(x, n) {\n return x << n | x >>> 32 - n;\n}\n\nfunction sha1(bytes) {\n var K = [0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xca62c1d6];\n var H = [0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0];\n\n if (typeof bytes === 'string') {\n var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape\n\n bytes = [];\n\n for (var i = 0; i < msg.length; ++i) {\n bytes.push(msg.charCodeAt(i));\n }\n } else if (!Array.isArray(bytes)) {\n // Convert Array-like to Array\n bytes = Array.prototype.slice.call(bytes);\n }\n\n bytes.push(0x80);\n var l = bytes.length / 4 + 2;\n var N = Math.ceil(l / 16);\n var M = new Array(N);\n\n for (var _i = 0; _i < N; ++_i) {\n var arr = new Uint32Array(16);\n\n for (var j = 0; j < 16; ++j) {\n arr[j] = bytes[_i * 64 + j * 4] << 24 | bytes[_i * 64 + j * 4 + 1] << 16 | bytes[_i * 64 + j * 4 + 2] << 8 | bytes[_i * 64 + j * 4 + 3];\n }\n\n M[_i] = arr;\n }\n\n M[N - 1][14] = (bytes.length - 1) * 8 / Math.pow(2, 32);\n M[N - 1][14] = Math.floor(M[N - 1][14]);\n M[N - 1][15] = (bytes.length - 1) * 8 & 0xffffffff;\n\n for (var _i2 = 0; _i2 < N; ++_i2) {\n var W = new Uint32Array(80);\n\n for (var t = 0; t < 16; ++t) {\n W[t] = M[_i2][t];\n }\n\n for (var _t = 16; _t < 80; ++_t) {\n W[_t] = ROTL(W[_t - 3] ^ W[_t - 8] ^ W[_t - 14] ^ W[_t - 16], 1);\n }\n\n var a = H[0];\n var b = H[1];\n var c = H[2];\n var d = H[3];\n var e = H[4];\n\n for (var _t2 = 0; _t2 < 80; ++_t2) {\n var s = Math.floor(_t2 / 20);\n var T = ROTL(a, 5) + f(s, b, c, d) + e + K[s] + W[_t2] >>> 0;\n e = d;\n d = c;\n c = ROTL(b, 30) >>> 0;\n b = a;\n a = T;\n }\n\n H[0] = H[0] + a >>> 0;\n H[1] = H[1] + b >>> 0;\n H[2] = H[2] + c >>> 0;\n H[3] = H[3] + d >>> 0;\n H[4] = H[4] + e >>> 0;\n }\n\n return [H[0] >> 24 & 0xff, H[0] >> 16 & 0xff, H[0] >> 8 & 0xff, H[0] & 0xff, H[1] >> 24 & 0xff, H[1] >> 16 & 0xff, H[1] >> 8 & 0xff, H[1] & 0xff, H[2] >> 24 & 0xff, H[2] >> 16 & 0xff, H[2] >> 8 & 0xff, H[2] & 0xff, H[3] >> 24 & 0xff, H[3] >> 16 & 0xff, H[3] >> 8 & 0xff, H[3] & 0xff, H[4] >> 24 & 0xff, H[4] >> 16 & 0xff, H[4] >> 8 & 0xff, H[4] & 0xff];\n}\n\nexport default sha1;","import validate from './validate.js';\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\n\nvar byteToHex = [];\n\nfor (var i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).substr(1));\n}\n\nfunction stringify(arr) {\n var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n var uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!validate(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n\n return uuid;\n}\n\nexport default stringify;","import rng from './rng.js';\nimport stringify from './stringify.js'; // **`v1()` - Generate time-based UUID**\n//\n// Inspired by https://github.com/LiosK/UUID.js\n// and http://docs.python.org/library/uuid.html\n\nvar _nodeId;\n\nvar _clockseq; // Previous uuid creation time\n\n\nvar _lastMSecs = 0;\nvar _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details\n\nfunction v1(options, buf, offset) {\n var i = buf && offset || 0;\n var b = buf || new Array(16);\n options = options || {};\n var node = options.node || _nodeId;\n var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not\n // specified. We do this lazily to minimize issues related to insufficient\n // system entropy. See #189\n\n if (node == null || clockseq == null) {\n var seedBytes = options.random || (options.rng || rng)();\n\n if (node == null) {\n // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)\n node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]];\n }\n\n if (clockseq == null) {\n // Per 4.2.2, randomize (14 bit) clockseq\n clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;\n }\n } // UUID timestamps are 100 nano-second units since the Gregorian epoch,\n // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so\n // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'\n // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.\n\n\n var msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock\n // cycle to simulate higher resolution clock\n\n var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs)\n\n var dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression\n\n if (dt < 0 && options.clockseq === undefined) {\n clockseq = clockseq + 1 & 0x3fff;\n } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new\n // time interval\n\n\n if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {\n nsecs = 0;\n } // Per 4.2.1.2 Throw error if too many uuids are requested\n\n\n if (nsecs >= 10000) {\n throw new Error(\"uuid.v1(): Can't create more than 10M uuids/sec\");\n }\n\n _lastMSecs = msecs;\n _lastNSecs = nsecs;\n _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch\n\n msecs += 12219292800000; // `time_low`\n\n var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;\n b[i++] = tl >>> 24 & 0xff;\n b[i++] = tl >>> 16 & 0xff;\n b[i++] = tl >>> 8 & 0xff;\n b[i++] = tl & 0xff; // `time_mid`\n\n var tmh = msecs / 0x100000000 * 10000 & 0xfffffff;\n b[i++] = tmh >>> 8 & 0xff;\n b[i++] = tmh & 0xff; // `time_high_and_version`\n\n b[i++] = tmh >>> 24 & 0xf | 0x10; // include version\n\n b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)\n\n b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low`\n\n b[i++] = clockseq & 0xff; // `node`\n\n for (var n = 0; n < 6; ++n) {\n b[i + n] = node[n];\n }\n\n return buf || stringify(b);\n}\n\nexport default v1;","import v35 from './v35.js';\nimport md5 from './md5.js';\nvar v3 = v35('v3', 0x30, md5);\nexport default v3;","import stringify from './stringify.js';\nimport parse from './parse.js';\n\nfunction stringToBytes(str) {\n str = unescape(encodeURIComponent(str)); // UTF8 escape\n\n var bytes = [];\n\n for (var i = 0; i < str.length; ++i) {\n bytes.push(str.charCodeAt(i));\n }\n\n return bytes;\n}\n\nexport var DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8';\nexport var URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8';\nexport default function (name, version, hashfunc) {\n function generateUUID(value, namespace, buf, offset) {\n if (typeof value === 'string') {\n value = stringToBytes(value);\n }\n\n if (typeof namespace === 'string') {\n namespace = parse(namespace);\n }\n\n if (namespace.length !== 16) {\n throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)');\n } // Compute hash of namespace and value, Per 4.3\n // Future: Use spread syntax when supported on all platforms, e.g. `bytes =\n // hashfunc([...namespace, ... value])`\n\n\n var bytes = new Uint8Array(16 + value.length);\n bytes.set(namespace);\n bytes.set(value, namespace.length);\n bytes = hashfunc(bytes);\n bytes[6] = bytes[6] & 0x0f | version;\n bytes[8] = bytes[8] & 0x3f | 0x80;\n\n if (buf) {\n offset = offset || 0;\n\n for (var i = 0; i < 16; ++i) {\n buf[offset + i] = bytes[i];\n }\n\n return buf;\n }\n\n return stringify(bytes);\n } // Function#name is not settable on some platforms (#270)\n\n\n try {\n generateUUID.name = name; // eslint-disable-next-line no-empty\n } catch (err) {} // For CommonJS default export support\n\n\n generateUUID.DNS = DNS;\n generateUUID.URL = URL;\n return generateUUID;\n}","import rng from './rng.js';\nimport stringify from './stringify.js';\n\nfunction v4(options, buf, offset) {\n options = options || {};\n var rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n offset = offset || 0;\n\n for (var i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n\n return buf;\n }\n\n return stringify(rnds);\n}\n\nexport default v4;","import v35 from './v35.js';\nimport sha1 from './sha1.js';\nvar v5 = v35('v5', 0x50, sha1);\nexport default v5;","import REGEX from './regex.js';\n\nfunction validate(uuid) {\n return typeof uuid === 'string' && REGEX.test(uuid);\n}\n\nexport default validate;","import validate from './validate.js';\n\nfunction version(uuid) {\n if (!validate(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n return parseInt(uuid.substr(14, 1), 16);\n}\n\nexport default version;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = (module) => {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","import type { Context } from \"@finos/fdc3\";\nimport { init } from \"../platform/api\";\n\nwindow.addEventListener(\"DOMContentLoaded\", async () => {\n\tawait init(false);\n\tawait initializeDOM();\n});\n\n/**\n * Adds an FDC3 context listener to the window.\n */\nasync function addFDC3Listener(): Promise {\n\tif (window.fdc3) {\n\t\tawait window.fdc3.addContextListener(null, (context) => {\n\t\t\tupdateDOMElements(context);\n\t\t});\n\t} else {\n\t\twindow.addEventListener(\"fdc3Ready\", async () => {\n\t\t\tawait window.fdc3.addContextListener(null, (context) => {\n\t\t\t\tupdateDOMElements(context);\n\t\t\t});\n\t\t});\n\t}\n}\n\n/**\n * Updates the DOM elements with the provided context.\n * @param context The context to update the DOM elements with.\n */\nfunction updateDOMElements(context: Context): void {\n\tconst contextTypeSpan = document.querySelector(\"#contextType\");\n\tconst contextNameSpan = document.querySelector(\"#contextName\");\n\tconst contextBodyPre = document.querySelector(\"#contextBody\");\n\n\tif (contextTypeSpan !== null && contextNameSpan !== null && contextBodyPre !== null) {\n\t\tcontextTypeSpan.textContent = context.type;\n\t\tcontextNameSpan.textContent = context.name ?? \"No name provided.\";\n\t\tcontextBodyPre.textContent = JSON.stringify(context, null, 2);\n\t}\n}\n\n/**\n * Initialize the DOM elements.\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;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,2CAA2C,UAAU;AACrD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;ACrJA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEY;;AAEZ,eAAe,mBAAO,CAAC,wDAAW;AAClC,gBAAgB,mBAAO,CAAC,oDAAS;AACjC;AACA;AACA;AACA;;AAEA,cAAc;AACd,kBAAkB;AAClB,yBAAyB;;AAEzB;AACA,kBAAkB;;AAElB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,kBAAkB,YAAY;AAC9B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA,wCAAwC,SAAS;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;;AAEA;AACA;AACA,cAAc,iBAAiB;AAC/B;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,iDAAiD,EAAE;AACnD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C;AAC1C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA,yBAAyB,eAAe;AACxC;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,yBAAyB,QAAQ;AACjC;AACA,sBAAsB,eAAe;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc,YAAY;AAC1B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB,sBAAsB;AACxC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,mBAAmB;AACnB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA,oBAAoB,SAAS;AAC7B;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA,qBAAqB,WAAW,GAAG,IAAI;AACvC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA,gBAAgB,WAAW,GAAG,IAAI,KAAK,aAAa;AACpD;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;;AAEA;AACA,GAAG;AACH;AACA;AACA,mBAAmB,KAAK,mDAAmD,cAAc;AACzF,GAAG;AACH;AACA;AACA,+BAA+B,IAAI;AACnC;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,MAAM,aAAa,SAAS;AACtD;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,SAAS,gBAAgB;AACzB,cAAc,oBAAoB,EAAE,IAAI;AACxC;AACA,YAAY,gBAAgB,EAAE,IAAI;AAClC;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,GAAG,SAAS,GAAG,KAAK,qBAAqB,EAAE,EAAE;AACpE,QAAQ;AACR,yBAAyB,GAAG,KAAK,yBAAyB,EAAE,EAAE;AAC9D,mBAAmB,yBAAyB,EAAE,EAAE;AAChD;AACA,MAAM;AACN,oBAAoB,IAAI,EAAE,GAAG,SAAS,IAAI,EAAE,EAAE;AAC9C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,0CAA0C,cAAc,SAAS,OAAO;AACxE;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,kBAAkB,YAAY;AAC9B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,kBAAkB,gBAAgB;AAClC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,kBAAkB,gBAAgB;AAClC;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,cAAc,YAAY;AAC1B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,QAAQ;AAC1B;AACA,oBAAoB,QAAQ;AAC5B;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;;;;;ACzjEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEa;;AAEb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB;;AAEnB;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,sBAAsB;AACxC;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA,eAAe;AACf;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA,oBAAoB,SAAS;AAC7B;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;;AAEA,kCAAkC,QAAQ;AAC1C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oBAAoB,iBAAiB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,QAAQ;AACR;AACA,uCAAuC,QAAQ;AAC/C;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,OAAO;AACzB;AACA;AACA;;AAEA;AACA,SAAS,yBAAyB;AAClC;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,gBAAgB;AAClC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,8DAA8D,YAAY;AAC1E;AACA,8DAA8D,YAAY;AAC1E;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,qCAAqC,YAAY;AACjD;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;AACA;;;;;;;;;;;AChfA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,SAAS,WAAW;;AAEpB;AACA;AACA;AACA,SAAS,WAAW;;AAEpB;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA,SAAS,WAAW;;AAEpB;AACA;AACA,SAAS,UAAU;;AAEnB;AACA;;;;;;;;;;;ACpFA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,WAAW,mBAAO,CAAC,mDAAS;;AAE5B;AACA;;AAEA;;;;;;;;;;;ACNA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,cAAc,mBAAO,CAAC,yDAAY;AAClC,cAAc,mBAAO,CAAC,yDAAY;AAClC,cAAc,mBAAO,CAAC,yDAAY;;AAElC;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC/BA,qBAAqB,mBAAO,CAAC,uEAAmB;AAChD,sBAAsB,mBAAO,CAAC,yEAAoB;AAClD,mBAAmB,mBAAO,CAAC,mEAAiB;AAC5C,mBAAmB,mBAAO,CAAC,mEAAiB;AAC5C,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;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;;AAE5B;AACA;;AAEA;;;;;;;;;;;ACLA,WAAW,mBAAO,CAAC,mDAAS;;AAE5B;AACA;;AAEA;;;;;;;;;;;ACLA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,WAAW,mBAAO,CAAC,mDAAS;;AAE5B;AACA;;AAEA;;;;;;;;;;;ACNA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,UAAU;AACrB,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACrBA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,UAAU;AACrB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACxBA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,kBAAkB,mBAAO,CAAC,+DAAe;AACzC,cAAc,mBAAO,CAAC,uDAAW;AACjC,eAAe,mBAAO,CAAC,yDAAY;AACnC,cAAc,mBAAO,CAAC,yDAAY;AAClC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,SAAS;AACpB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AChDA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACnBA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,UAAU;AACrB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;AAC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ACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC9CA,aAAa,mBAAO,CAAC,uDAAW;AAChC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,eAAe,mBAAO,CAAC,yDAAY;AACnC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC3DA,kBAAkB,mBAAO,CAAC,iEAAgB;AAC1C,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC7BA,eAAe,mBAAO,CAAC,yDAAY;AACnC,kBAAkB,mBAAO,CAAC,iEAAgB;AAC1C,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;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BAAO,CAAC,2DAAa;AACpC,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACnFA,aAAa,mBAAO,CAAC,uDAAW;AAChC,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,SAAS,mBAAO,CAAC,6CAAM;AACvB,kBAAkB,mBAAO,CAAC,iEAAgB;AAC1C,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC/GA,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACzFA;AACA,wBAAwB,qBAAM,gBAAgB,qBAAM,IAAI,qBAAM,sBAAsB,qBAAM;;AAE1F;;;;;;;;;;;ACHA,qBAAqB,mBAAO,CAAC,uEAAmB;AAChD,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,WAAW,mBAAO,CAAC,iDAAQ;;AAE3B;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACfA,qBAAqB,mBAAO,CAAC,uEAAmB;AAChD,mBAAmB,mBAAO,CAAC,mEAAiB;AAC5C,aAAa,mBAAO,CAAC,qDAAU;;AAE/B;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AChBA,gBAAgB,mBAAO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A;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACxBA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACdA,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACnBA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACZA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClCA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,GAAG;AAChB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;AClBA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACfA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;A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A;;AAEA;;;;;;;;;;;;ACnBA,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA,kBAAkB,KAA0B;;AAE5C;AACA,gCAAgC,QAAa;;AAE7C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ,CAAC;;AAED;;;;;;;;;;;AC7BA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACrBA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,aAAa,UAAU;AACvB;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACdA,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;ACRA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACbA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;;;;;;;;;;ACjBA,gBAAgB,mBAAO,CAAC,6DAAc;;AAEtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACdA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,GAAG;AAChB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACbA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACbA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,UAAU,mBAAO,CAAC,iDAAQ;AAC1B,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjCA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;;;;;;;;;;;ACzBA,gBAAgB,mBAAO,CAAC,6DAAc;;AAEtC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,GAAG;AAChB;AACA;AACA;AACA,oBAAoB,QAAQ,IAAI,QAAQ;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,kBAAkB;AAClB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpCA,sBAAsB,mBAAO,CAAC,yEAAoB;AAClD,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA,8BAA8B,mBAAmB;AACjD;AACA;AACA;AACA;AACA;AACA,+CAA+C,mBAAmB;AAClE;AACA;AACA;;AAEA;;;;;;;;;;;ACnCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACzBA,iBAAiB,mBAAO,CAAC,6DAAc;AACvC,eAAe,mBAAO,CAAC,yDAAY;;AAEnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AChCA,WAAW,mBAAO,CAAC,mDAAS;AAC5B,gBAAgB,mBAAO,CAAC,2DAAa;;AAErC;AACA,kBAAkB,KAA0B;;AAE5C;AACA,gCAAgC,QAAa;;AAE7C;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACrCA,kBAAkB,mBAAO,CAAC,iEAAgB;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,kBAAkB;AAClB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClCA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,eAAe,mBAAO,CAAC,yDAAY;;AAEnC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpCA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClCA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC1BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC9BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC5BA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC1BA,uBAAuB,mBAAO,CAAC,2EAAqB;AACpD,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC1BA,oBAAoB,mBAAO,CAAC,qEAAkB;AAC9C,eAAe,mBAAO,CAAC,2DAAa;AACpC,kBAAkB,mBAAO,CAAC,+DAAe;;AAEzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpCA,oBAAoB,mBAAO,CAAC,qEAAkB;AAC9C,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,kBAAkB,mBAAO,CAAC,+DAAe;;AAEzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC/BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;;;ACVA,oBA2CC;AAlDD,0HAAwE;AACxE,8FAAyC;AAEzC;;;GAGG;AACI,KAAK,UAAU,IAAI,CAAC,UAAmB,IAAI;IACj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EAAE,CAAC;QACnB,MAAM,gBAAgB,GAAG,MAAM,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAChD,MAAM,YAAY,GAAG,CAAC,MAAM,gBAAgB,CAAC,IAAI,EAAE,CAAkC,CAAC;QACtF,OAAO,YAAY,CAAC,eAAe,CAAC;IACrC,CAAC;AACF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACjDuC;AACA;AACA;AACA;AACE;AACQ;AACE;AACE;;;;;;;;;;;;;;;;ACPtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD;;AAEnD;;AAEA,oBAAoB,gBAAgB;AACpC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA,kBAAkB,cAAc;AAChC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,kBAAkB,cAAc;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,kBAAkB,aAAa;AAC/B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;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I,EAAE,CAAC,OAAO,EAAE,EAAE;YACtD,iBAAiB,CAAC,OAAO,CAAC,CAAC;QAC5B,CAAC,CAAC,CAAC;IACJ,CAAC;SAAM,CAAC;QACP,MAAM,CAAC,gBAAgB,CAAC,WAAW,EAAE,KAAK,IAAI,EAAE;YAC/C,MAAM,MAAM,CAAC,IAAI,CAAC,kBAAkB,CAAC,IAAI,EAAE,CAAC,OAAO,EAAE,EAAE;gBACtD,iBAAiB,CAAC,OAAO,CAAC,CAAC;YAC5B,CAAC,CAAC,CAAC;QACJ,CAAC,CAAC,CAAC;IACJ,CAAC;AACF,CAAC;AAED;;;GAGG;AACH,SAAS,iBAAiB,CAAC,OAAgB;IAC1C,MAAM,eAAe,GAAG,QAAQ,CAAC,aAAa,CAAkB,cAAc,CAAC,CAAC;IAChF,MAAM,eAAe,GAAG,QAAQ,CAAC,aAAa,CAAkB,cAAc,CAAC,CAAC;IAChF,MAAM,cAAc,GAAG,QAAQ,CAAC,aAAa,CAAiB,cAAc,CAAC,CAAC;IAE9E,IAAI,eAAe,KAAK,IAAI,IAAI,eAAe,KAAK,IAAI,IAAI,cAAc,KAAK,IAAI,EAAE,CAAC;QACrF,eAAe,CAAC,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;QAC3C,eAAe,CAAC,WAAW,GAAG,OAAO,CAAC,IAAI,IAAI,mBAAmB,CAAC;QAClE,cAAc,CAAC,WAAW,GAAG,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;IAC/D,CAAC;AACF,CAAC;AAED;;GAEG;AACH,KAAK,UAAU,aAAa;IAC3B,MAAM,eAAe,EAAE,CAAC;AACzB,CAAC","sources":["webpack://openfin-web--web-interop/../../node_modules/@openfin/core-web/out/api-client.js","webpack://openfin-web--web-interop/../../node_modules/@openfin/core-web/out/main-8cad4070.js","webpack://openfin-web--web-interop/../../node_modules/@openfin/core-web/out/main-b14f67c9.js","webpack://openfin-web--web-interop/../../node_modules/base64-js/index.js","webpack://openfin-web--web-interop/../../node_modules/buffer/index.js","webpack://openfin-web--web-interop/../../node_modules/events/events.js","webpack://openfin-web--web-interop/../../node_modules/ieee754/index.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_DataView.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_Hash.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_ListCache.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_Map.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_MapCache.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_Promise.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_Set.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_SetCache.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_Stack.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_Symbol.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_Uint8Array.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_WeakMap.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_arrayEach.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_arrayFilter.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_arrayLikeKeys.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_arrayPush.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_arraySome.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_assignValue.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_assocIndexOf.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseAssign.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseAssignIn.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseAssignValue.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseClone.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseCreate.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseGetAllKeys.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseGetTag.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseIsArguments.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseIsEqual.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseIsEqualDeep.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseIsMap.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseIsNative.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseIsSet.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseIsTypedArray.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseKeys.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseKeysIn.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseTimes.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseUnary.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_cacheHas.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_cloneArrayBuffer.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_cloneBuffer.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_cloneDataView.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_cloneRegExp.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_cloneSymbol.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_cloneTypedArray.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_copyArray.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_copyObject.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_copySymbols.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_copySymbolsIn.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_coreJsData.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_defineProperty.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_equalArrays.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_equalByTag.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_equalObjects.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_freeGlobal.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_getAllKeys.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_getAllKeysIn.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_getMapData.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_getNative.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_getPrototype.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_getRawTag.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_getSymbols.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_getSymbolsIn.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_getTag.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_getValue.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_hashClear.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_hashDelete.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_hashGet.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_hashHas.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_hashSet.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_initCloneArray.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_initCloneByTag.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_initCloneObject.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_isIndex.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_isKeyable.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_isMasked.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_isPrototype.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_listCacheClear.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_listCacheDelete.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_listCacheGet.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_listCacheHas.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_listCacheSet.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_mapCacheClear.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_mapCacheDelete.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_mapCacheGet.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_mapCacheHas.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_mapCacheSet.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_mapToArray.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_nativeCreate.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_nativeKeys.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_nativeKeysIn.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_nodeUtil.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_objectToString.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_overArg.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_root.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_setCacheAdd.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_setCacheHas.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_setToArray.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_stackClear.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_stackDelete.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_stackGet.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_stackHas.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_stackSet.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_toSource.js","webpack://openfin-web--web-interop/../../node_modules/lodash/cloneDeep.js","webpack://openfin-web--web-interop/../../node_modules/lodash/eq.js","webpack://openfin-web--web-interop/../../node_modules/lodash/isArguments.js","webpack://openfin-web--web-interop/../../node_modules/lodash/isArray.js","webpack://openfin-web--web-interop/../../node_modules/lodash/isArrayLike.js","webpack://openfin-web--web-interop/../../node_modules/lodash/isBuffer.js","webpack://openfin-web--web-interop/../../node_modules/lodash/isEqual.js","webpack://openfin-web--web-interop/../../node_modules/lodash/isFunction.js","webpack://openfin-web--web-interop/../../node_modules/lodash/isLength.js","webpack://openfin-web--web-interop/../../node_modules/lodash/isMap.js","webpack://openfin-web--web-interop/../../node_modules/lodash/isObject.js","webpack://openfin-web--web-interop/../../node_modules/lodash/isObjectLike.js","webpack://openfin-web--web-interop/../../node_modules/lodash/isSet.js","webpack://openfin-web--web-interop/../../node_modules/lodash/isTypedArray.js","webpack://openfin-web--web-interop/../../node_modules/lodash/keys.js","webpack://openfin-web--web-interop/../../node_modules/lodash/keysIn.js","webpack://openfin-web--web-interop/../../node_modules/lodash/stubArray.js","webpack://openfin-web--web-interop/../../node_modules/lodash/stubFalse.js","webpack://openfin-web--web-interop/./client/src/platform/api.ts","webpack://openfin-web--web-interop/./client/src/platform/settings.ts","webpack://openfin-web--web-interop/../../node_modules/uuid/dist/esm-browser/index.js","webpack://openfin-web--web-interop/../../node_modules/uuid/dist/esm-browser/md5.js","webpack://openfin-web--web-interop/../../node_modules/uuid/dist/esm-browser/nil.js","webpack://openfin-web--web-interop/../../node_modules/uuid/dist/esm-browser/parse.js","webpack://openfin-web--web-interop/../../node_modules/uuid/dist/esm-browser/regex.js","webpack://openfin-web--web-interop/../../node_modules/uuid/dist/esm-browser/rng.js","webpack://openfin-web--web-interop/../../node_modules/uuid/dist/esm-browser/sha1.js","webpack://openfin-web--web-interop/../../node_modules/uuid/dist/esm-browser/stringify.js","webpack://openfin-web--web-interop/../../node_modules/uuid/dist/esm-browser/v1.js","webpack://openfin-web--web-interop/../../node_modules/uuid/dist/esm-browser/v3.js","webpack://openfin-web--web-interop/../../node_modules/uuid/dist/esm-browser/v35.js","webpack://openfin-web--web-interop/../../node_modules/uuid/dist/esm-browser/v4.js","webpack://openfin-web--web-interop/../../node_modules/uuid/dist/esm-browser/v5.js","webpack://openfin-web--web-interop/../../node_modules/uuid/dist/esm-browser/validate.js","webpack://openfin-web--web-interop/../../node_modules/uuid/dist/esm-browser/version.js","webpack://openfin-web--web-interop/webpack/bootstrap","webpack://openfin-web--web-interop/webpack/runtime/define property getters","webpack://openfin-web--web-interop/webpack/runtime/global","webpack://openfin-web--web-interop/webpack/runtime/hasOwnProperty shorthand","webpack://openfin-web--web-interop/webpack/runtime/make namespace object","webpack://openfin-web--web-interop/webpack/runtime/node module decorator","webpack://openfin-web--web-interop/./client/src/content/fdc3-panel.ts"],"sourcesContent":["\"use strict\";var e=require(\"./main-8cad4070.js\");require(\"buffer/\"),require(\"uuid\"),require(\"events\"),require(\"lodash/cloneDeep\"),require(\"lodash/isEqual\"),exports.connect=e.connect;\n","\"use strict\";var e=require(\"buffer/\"),t=require(\"events\"),n=require(\"lodash/cloneDeep\"),i=require(\"lodash/isEqual\"),r=require(\"uuid\");const o=(e,t)=>`${t}<${btoa(JSON.stringify(e))}>`;var s=\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof window?window:\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:{},a={},c={},d={},h={};async function l(e){const t=[];for(const n of e){const e=await n();t.push(e)}return t}Object.defineProperty(h,\"__esModule\",{value:!0}),h.promiseMapSerial=h.serial=h.promiseMap=h.promisify=void 0,h.promisify=function(e){return(...t)=>new Promise(((n,i)=>{e(...t,((e,t)=>e?i(e):n(t)))}))},h.promiseMap=async function(e,t){return Promise.all(e.map(t))},h.serial=l,h.promiseMapSerial=async function(e,t){return l(e.map(((e,n,i)=>()=>t(e,n,i))))};var u,p=s&&s.__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},w=s&&s.__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)};Object.defineProperty(d,\"__esModule\",{value:!0}),d.Reply=d.EmitterBase=d.Base=void 0;const y=h;class f{constructor(e){this.isNodeEnvironment=()=>\"node\"===this.wire.environment.type,this.isOpenFinEnvironment=()=>\"openfin\"===this.wire.environment.type,this.isBrowserEnvironment=()=>\"other\"===this.wire.environment.type,this.wire=e}get fin(){return this.wire.getFin()}get me(){return this.wire.me}}d.Base=f;d.EmitterBase=class extends f{constructor(e,t,...n){super(e),this.topic=t,u.set(this,void 0),this.eventNames=()=>this.hasEmitter()?this.getOrCreateEmitter().eventNames():[],this.emit=(e,t,...n)=>!!this.hasEmitter()&&this.getOrCreateEmitter().emit(e,t,...n),this.hasEmitter=()=>this.wire.eventAggregator.has(w(this,u,\"f\")),this.getOrCreateEmitter=()=>this.wire.eventAggregator.getOrCreate(w(this,u,\"f\")),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[],this.listenerCount=e=>this.hasEmitter()?this.getOrCreateEmitter().listenerCount(e):0,this.registerEventListener=async(e,t={},n,i)=>{const r={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e},o=this.getOrCreateEmitter();n(o);try{await this.wire.sendAction(\"subscribe-to-desktop-event\",r)}catch(e){throw i(o),this.deleteEmitterIfNothingRegistered(o),e}},this.deregisterEventListener=async(e,t={})=>{if(this.hasEmitter()){const n={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e};await this.wire.sendAction(\"unsubscribe-to-desktop-event\",n).catch((()=>null));return this.getOrCreateEmitter()}return Promise.resolve()},p(this,u,[t,...n],\"f\"),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[]}async on(e,t,n){return await this.registerEventListener(e,n,(n=>{n.on(e,t)}),(n=>{n.removeListener(e,t)})),this}async addListener(e,t,n){return this.on(e,t,n)}async once(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.once(e,i),n.once(e,t)}),(n=>{n.removeListener(e,i),n.removeListener(e,t)})),this}async prependListener(e,t,n){return await this.registerEventListener(e,n,(n=>{n.prependListener(e,t)}),(n=>{n.removeListener(e,t)})),this}async prependOnceListener(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.prependOnceListener(e,t),n.once(e,i)}),(n=>{n.removeListener(e,t),n.removeListener(e,i)})),this}async removeListener(e,t,n){const i=await this.deregisterEventListener(e,n);return i&&(i.removeListener(e,t),this.deleteEmitterIfNothingRegistered(i)),this}async deregisterAllListeners(e){const t={...this.identity,type:e,topic:this.topic};if(this.hasEmitter()){const e=this.getOrCreateEmitter(),n=e.listenerCount(t.type),i=[];for(let e=0;enull)));return await Promise.all(i),e}}async removeAllListeners(e){const t=async e=>{const t=await this.deregisterAllListeners(e);t&&(t.removeAllListeners(e),this.deleteEmitterIfNothingRegistered(t))};if(e)await t(e);else if(this.hasEmitter()){const e=this.getOrCreateEmitter().eventNames();await(0,y.promiseMap)(e,t)}return this}deleteEmitterIfNothingRegistered(e){0===e.eventNames().length&&this.wire.eventAggregator.delete(w(this,u,\"f\"))}},u=new WeakMap;d.Reply=class{};var g={};Object.defineProperty(g,\"__esModule\",{value:!0});var m=g.RuntimeError=g.NotSupportedError=g.NotImplementedError=g.NoAckError=g.DuplicateCorrelationError=g.UnexpectedActionError=g.DisconnectedError=void 0;class v extends Error{constructor(e){super(`Expected websocket state OPEN but found ${e}`),this.readyState=e}}g.DisconnectedError=v;class C extends Error{}g.UnexpectedActionError=C;class b extends Error{}g.DuplicateCorrelationError=b;class I extends Error{}g.NoAckError=I;class E extends Error{}g.NotImplementedError=E;class x extends Error{}g.NotSupportedError=x;class A extends Error{constructor(e){const{message:t,name:n,stack:i,...r}=e;super(t),this.name=n||\"Error\",this.stack=i??this.toString(),Object.keys(r).forEach((e=>{this[e]=r[e]}))}}class P extends Error{static getCallSite(e=0){const t=Error.stackTraceLimit,n=e+1;Error.stackTraceLimit=t+n;const i=Error.prepareStackTrace;Error.prepareStackTrace=(e,t)=>t;const r=(new Error).stack?.slice(n)??[];return Error.prepareStackTrace=i,Error.stackTraceLimit=t,r}static prepareStackTrace(e,t){if(\"function\"==typeof Error.prepareStackTrace)return Error.prepareStackTrace(e,t);let n=\"\";n+=e.name||\"Error\",n+=`: ${e.message||\"\"}`;for(const e of t)n+=`\\n at ${e.toString()}`;return n}constructor(e,t){const{reason:n,error:i}=e;super(n),this.name=\"RuntimeError\",i?.stack&&(this.cause=new A(i)),t&&(this.stack=P.prepareStackTrace(this,t))}}m=g.RuntimeError=P;var M={},_={},O={};Object.defineProperty(O,\"__esModule\",{value:!0}),O.validateIdentity=void 0,O.validateIdentity=function(e){let t;return\"object\"==typeof e&&\"string\"==typeof e.uuid||(t=\"Not a valid identity object\"),t};var S={},R={},F={},j={},k={},L={},T={};Object.defineProperty(T,\"__esModule\",{value:!0}),T.handleDeprecatedWarnings=void 0;var $;T.handleDeprecatedWarnings=e=>{(e.contentNavigation?.whitelist||e.contentNavigation?.blacklist||e.contentRedirect?.whitelist||e.contentRedirect?.blacklist)&&console.warn(\"The properties 'whitelist' and 'blacklist' have been marked as deprecated and will be removed in a future version. Please use 'allowlist' and 'denylist'.\")};var B={},G={};Object.defineProperty(G,\"__esModule\",{value:!0}),G.AsyncRetryableLazy=W=G.Lazy=void 0;var W=G.Lazy=class{constructor(e){this.producerFn=e}getValue(){return this.value||(this.value=this.producerFn()),this.value}};G.AsyncRetryableLazy=class{constructor(e){this.producerFn=e}async getValue(){return this.promise||(this.promise=this.producerFn().catch((e=>{throw delete this.promise,e}))),this.promise}};var H={};Object.defineProperty(H,\"__esModule\",{value:!0}),H.WebContents=void 0;const N=d;class D extends N.EmitterBase{constructor(e,t,n){super(e,n,t.uuid,t.name),this.identity=t,this.entityType=n}capturePage(e){return this.wire.sendAction(\"capture-page\",{options:e,...this.identity}).then((({payload:e})=>e.data))}executeJavaScript(e){return this.wire.sendAction(\"execute-javascript-in-window\",{...this.identity,code:e}).then((({payload:e})=>e.data))}getZoomLevel(){return this.wire.sendAction(\"get-zoom-level\",this.identity).then((({payload:e})=>e.data))}setZoomLevel(e){return this.wire.sendAction(\"set-zoom-level\",{...this.identity,level:e}).then((()=>{}))}navigate(e){return this.wire.sendAction(\"navigate-window\",{...this.identity,url:e}).then((()=>{}))}navigateBack(){return this.wire.sendAction(\"navigate-window-back\",{...this.identity}).then((()=>{}))}async navigateForward(){await this.wire.sendAction(\"navigate-window-forward\",{...this.identity})}stopNavigation(){return this.wire.sendAction(\"stop-window-navigation\",{...this.identity}).then((()=>{}))}reload(e=!1){return this.wire.sendAction(\"reload-window\",{ignoreCache:e,...this.identity}).then((()=>{}))}print(e={}){return this.wire.sendAction(\"print\",{...this.identity,options:e}).then((()=>{}))}findInPage(e,t){return this.wire.sendAction(\"find-in-page\",{...this.identity,searchTerm:e,options:t}).then((({payload:e})=>e.data))}stopFindInPage(e){return this.wire.sendAction(\"stop-find-in-page\",{...this.identity,action:e}).then((()=>{}))}getPrinters(){return this.wire.sendAction(\"get-printers\",{...this.identity}).then((({payload:e})=>e.data))}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){await this.wire.sendAction(\"focus-window\",{emitSynthFocused:e,...this.identity})}async showDeveloperTools(){await this.wire.sendAction(\"show-developer-tools\",this.identity)}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction(\"get-process-info\",this.identity);return e}async getSharedWorkers(){return this.wire.sendAction(\"get-shared-workers\",this.identity).then((({payload:e})=>e.data))}async inspectSharedWorker(){await this.wire.sendAction(\"inspect-shared-worker\",{...this.identity})}async inspectSharedWorkerById(e){await this.wire.sendAction(\"inspect-shared-worker-by-id\",{...this.identity,workerId:e})}async inspectServiceWorker(){await this.wire.sendAction(\"inspect-service-worker\",{...this.identity})}async showPopupWindow(e){if(this.wire.sendAction(`${this.entityType}-show-popup-window`,this.identity).catch((()=>{})),e?.onPopupReady){const t=async({popupName:t})=>{try{const n=this.fin.Window.wrapSync({uuid:this.fin.me.uuid,name:t});await e.onPopupReady(n)}catch(e){throw new Error(`Something went wrong during onPopupReady execution: ${e}`)}};await this.once(\"popup-ready\",t)}const{payload:t}=await this.wire.sendAction(\"try-create-popup-window\",{options:{...e,hasResultCallback:!!e?.onPopupResult,hasReadyCallback:!!e?.onPopupReady},...this.identity}),{data:{willOpen:n,options:i}}=t;n&&await this.fin.Window.create(i.initialOptions);if(e?.onPopupResult){const t=async t=>{await e.onPopupResult((e=>{const{name:t,uuid:n,result:i,data:r}=e,o={identity:{name:t,uuid:n},result:i};return r&&(o.data=r),o})(t))},n=async()=>{await this.removeListener(\"popup-result\",t)};await this.on(\"popup-result\",t),await this.once(\"popup-teardown\",n)}const{payload:r}=await this.wire.sendAction(\"show-popup-window\",{options:i,...this.identity});return r.data}}var U,V,z,K,q;function J(){return V||(V=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(function(){if($)return L;$=1,Object.defineProperty(L,\"__esModule\",{value:!0}),L.ViewModule=void 0;const e=d,t=O,n=J(),i=T;class r extends e.Base{async create(e){const{uuid:t}=this.wire.me;if(!e.name||\"string\"!=typeof e.name)throw new Error(\"Please provide a name property as a string in order to create a View.\");return(0,i.handleDeprecatedWarnings)(e),this.wire.environment.childViews?await this.wire.environment.createChildContent({entityType:\"view\",options:{...e,uuid:t}}):await this.wire.sendAction(\"create-view\",{...e,uuid:t}),this.wrapSync({uuid:t,name:e.name})}async wrap(e){this.wire.sendAction(\"view-wrap\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}wrapSync(e){this.wire.sendAction(\"view-wrap-sync\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}getCurrent(){if(this.wire.sendAction(\"view-get-current\").catch((e=>{})),!this.wire.me.isView)throw new Error(\"You are not in a View context\");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction(\"view-get-current-sync\").catch((e=>{})),!this.wire.me.isView)throw new Error(\"You are not in a View context\");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return L.ViewModule=r,L}(),e),n(function(){if(U)return B;var e;U=1,Object.defineProperty(B,\"__esModule\",{value:!0}),B.View=void 0;const t=g,n=G,i=H,r=ie();class o extends i.WebContents{constructor(i,o){super(i,o,\"view\"),this.identity=o,e.set(this,new n.Lazy((()=>this.fin.Platform.wrapSync(this.identity).getClient()))),this.attach=async e=>{await this.wire.sendAction(\"attach-view\",{target:e,...this.identity})},this.destroy=async()=>{await this.wire.sendAction(\"destroy-view\",{...this.identity})},this.show=async()=>{await this.wire.sendAction(\"show-view\",{...this.identity})},this.showAt=async(e,t={})=>{await this.wire.sendAction(\"show-view-at\",{bounds:e,...this.identity,options:t})},this.bringToFront=async()=>{await this.wire.sendAction(\"bring-view-to-front\",{...this.identity})},this.hide=async()=>{await this.wire.sendAction(\"hide-view\",{...this.identity})},this.setBounds=async e=>{await this.wire.sendAction(\"set-view-bounds\",{bounds:e,...this.identity})},this.getBounds=async()=>(await this.wire.sendAction(\"get-view-bounds\",{...this.identity})).payload.data,this.getInfo=async()=>(await this.wire.sendAction(\"get-view-info\",{...this.identity})).payload.data,this.getParentLayout=async()=>(this.wire.sendAction(\"view-get-parent-layout\",{...this.identity}).catch((()=>{})),this.fin.Platform.Layout.getLayoutByViewIdentity(this.identity)),this.getOptions=async()=>this.wire.sendAction(\"get-view-options\",{...this.identity}).then((({payload:e})=>e.data)),this.updateOptions=async e=>this.wire.sendAction(\"update-view-options\",{options:e,...this.identity}).then((()=>{})),this.getCurrentWindow=async()=>{const{payload:{data:e}}=await this.wire.sendAction(\"get-view-window\",{...this.identity});return new r._Window(this.wire,e)},this.getCurrentStack=async()=>{this.wire.sendAction(\"view-get-current-stack\").catch((()=>{}));try{return(await this.getParentLayout()).getStackByViewIdentity(this.identity)}catch(e){throw new t.RuntimeError({reason:\"This view does not belong to a stack.\",error:e})}},this.triggerBeforeUnload=async()=>(await this.wire.sendAction(\"trigger-before-unload\",{...this.identity})).payload.data,this.bindToElement=async e=>{if(!e)throw new Error(\"Element not found.\");return this.wire.environment.observeBounds(e,(async e=>this.setBounds(e)))}}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){const t=await this.getCurrentWindow();await t.focusedWebViewWasChanged(),await super.focus({emitSynthFocused:e})}}return B.View=o,e=new WeakMap,B}(),e)}(k)),k}function Y(){if(z)return j;z=1,Object.defineProperty(j,\"__esModule\",{value:!0}),j.Application=void 0;const e=d,t=ie(),n=J();class i extends e.EmitterBase{constructor(e,n){super(e,\"application\",n.uuid),this.identity=n,this.window=new t._Window(this.wire,{uuid:this.identity.uuid,name:this.identity.uuid})}windowListFromIdentityList(e){const n=[];return e.forEach((e=>{n.push(new t._Window(this.wire,{uuid:e.uuid,name:e.name}))})),n}isRunning(){return this.wire.sendAction(\"is-application-running\",this.identity).then((({payload:e})=>e.data))}async quit(e=!1){try{await this._close(e),await this.wire.sendAction(\"destroy-application\",{force:e,...this.identity})}catch(e){if(![\"Remote connection has closed\",\"Could not locate the requested application\"].some((t=>e.message.includes(t))))throw e}}async _close(e=!1){try{await this.wire.sendAction(\"close-application\",{force:e,...this.identity})}catch(e){if(!e.message.includes(\"Remote connection has closed\"))throw e}}close(e=!1){return console.warn(\"Deprecation Warning: Application.close is deprecated Please use Application.quit\"),this.wire.sendAction(\"application-close\",this.identity).catch((e=>{})),this._close(e)}getChildWindows(){return this.wire.sendAction(\"get-child-windows\",this.identity).then((({payload:e})=>{const t=[];return e.data.forEach((e=>{t.push({uuid:this.identity.uuid,name:e})})),this.windowListFromIdentityList(t)}))}getManifest(){return this.wire.sendAction(\"get-application-manifest\",this.identity).then((({payload:e})=>e.data))}getParentUuid(){return this.wire.sendAction(\"get-parent-application\",this.identity).then((({payload:e})=>e.data))}getShortcuts(){return this.wire.sendAction(\"get-shortcuts\",this.identity).then((({payload:e})=>e.data))}async getViews(){const{payload:e}=await this.wire.sendAction(\"application-get-views\",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}getZoomLevel(){return this.wire.sendAction(\"get-application-zoom-level\",this.identity).then((({payload:e})=>e.data))}getWindow(){return this.wire.sendAction(\"application-get-window\",this.identity).catch((e=>{})),Promise.resolve(this.window)}registerUser(e,t){return this.wire.sendAction(\"register-user\",{userName:e,appName:t,...this.identity}).then((()=>{}))}removeTrayIcon(){return this.wire.sendAction(\"remove-tray-icon\",this.identity).then((()=>{}))}restart(){return this.wire.sendAction(\"restart-application\",this.identity).then((()=>{}))}run(){return console.warn(\"Deprecation Warning: Application.run is deprecated Please use fin.Application.start\"),this.wire.sendAction(\"application-run\",this.identity).catch((e=>{})),this._run()}_run(e={}){return this.wire.sendAction(\"run-application\",{manifestUrl:this._manifestUrl,opts:e,...this.identity}).then((()=>{}))}scheduleRestart(){return this.wire.sendAction(\"relaunch-on-close\",this.identity).then((()=>{}))}async sendApplicationLog(){const{payload:e}=await this.wire.sendAction(\"send-application-log\",this.identity);return e.data}async setJumpList(e){await this.wire.sendAction(\"set-jump-list\",{config:e,...this.identity})}setTrayIcon(e){return this.wire.sendAction(\"set-tray-icon\",{enabledIcon:e,...this.identity}).then((()=>{}))}setShortcuts(e){return this.wire.sendAction(\"set-shortcuts\",{data:e,...this.identity}).then((()=>{}))}async setShortcutQueryParams(e){await this.wire.sendAction(\"set-shortcut-query-args\",{data:e,...this.identity})}setZoomLevel(e){return this.wire.sendAction(\"set-application-zoom-level\",{level:e,...this.identity}).then((()=>{}))}async setAppLogUsername(e){await this.wire.sendAction(\"set-app-log-username\",{data:e,...this.identity})}getTrayIconInfo(){return this.wire.sendAction(\"get-tray-icon-info\",this.identity).then((({payload:e})=>e.data))}hasTrayIcon(){return this.wire.sendAction(\"has-tray-icon\",this.identity).then((({payload:e})=>e.data))}terminate(){return this.wire.sendAction(\"terminate-application\",this.identity).then((()=>{}))}wait(){return this.wire.sendAction(\"wait-for-hung-application\",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction(\"get-info\",this.identity).then((({payload:e})=>e.data))}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction(\"application-get-process-info\",this.identity);return e}async setFileDownloadLocation(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t};await this.wire.sendAction(\"set-file-download-location\",{...n,downloadLocation:e})}async getFileDownloadLocation(){const{payload:{data:e}}=await this.wire.sendAction(\"get-file-download-location\",this.identity);return e}async showTrayIconPopupMenu(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t},{payload:i}=await this.wire.sendAction(\"show-tray-icon-popup-menu\",{...n,options:e});return i.data}async closeTrayIconPopupMenu(){const{name:e}=this.wire.me,t={uuid:this.identity.uuid,name:e};await this.wire.sendAction(\"close-tray-icon-popup-menu\",{...t})}}return j.Application=i,j}function Z(){return q||(q=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(function(){if(K)return F;K=1,Object.defineProperty(F,\"__esModule\",{value:!0}),F.ApplicationModule=void 0;const e=d,t=O,n=Y();class i extends e.Base{async wrap(e){this.wire.sendAction(\"wrap-application\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}wrapSync(e){this.wire.sendAction(\"wrap-application-sync\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}async _create(e){return void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&void 0===e.isPlatformController&&(e.autoShow=!0),await this.wire.sendAction(\"create-application\",e),this.wrap({uuid:e.uuid})}create(e){return console.warn(\"Deprecation Warning: fin.Application.create is deprecated. Please use fin.Application.start\"),this.wire.sendAction(\"application-create\").catch((e=>{})),this._create(e)}async start(e){this.wire.sendAction(\"start-application\").catch((e=>{}));const t=await this._create(e);return await this.wire.sendAction(\"run-application\",{uuid:e.uuid}),t}async startManyManifests(e,t){return this.wire.sendAction(\"run-applications\",{applications:e,opts:t}).then((()=>{}))}getCurrent(){return this.wire.sendAction(\"get-current-application\").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction(\"get-current-application-sync\").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}async startFromManifest(e,t){this.wire.sendAction(\"application-start-from-manifest\").catch((e=>{}));const n=await this._createFromManifest(e);return await n._run(t),n}createFromManifest(e){return console.warn(\"Deprecation Warning: fin.Application.createFromManifest is deprecated. Please use fin.Application.startFromManifest\"),this.wire.sendAction(\"application-create-from-manifest\").catch((e=>{})),this._createFromManifest(e)}_createFromManifest(e){return this.wire.sendAction(\"get-application-manifest\",{manifestUrl:e}).then((({payload:e})=>{const t=e.data.platform?e.data.platform.uuid:e.data.startup_app.uuid;return this.wrap({uuid:t})})).then((t=>(t._manifestUrl=e,t)))}}return F.ApplicationModule=i,F}(),e),n(Y(),e)}(R)),R}H.WebContents=D;var Q={};Object.defineProperty(Q,\"__esModule\",{value:!0}),Q.promisifySubscription=void 0;var X,ee,te;function ne(){if(X)return S;X=1,Object.defineProperty(S,\"__esModule\",{value:!0}),S._Window=void 0;const e=Z(),t=H,n=J(),i=T,r=Q;class o extends t.WebContents{constructor(e,t){super(e,t,\"window\")}async createWindow(e){this.wire.sendAction(\"window-create-window\",this.identity).catch((e=>{}));const t=await(0,r.promisifySubscription)(this,\"fire-constructor-callback\");void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&(e.autoShow=!0),(0,i.handleDeprecatedWarnings)(e);const n=this.wire.environment.createChildContent({entityType:\"window\",options:e}),[o]=await Promise.all([t.getValue(),n]);let s;const{success:a}=o,c=o.data,{message:d}=c;s=a?{httpResponseCode:c.httpResponseCode,apiInjected:c.apiInjected}:{message:c.message,networkErrorCode:c.networkErrorCode,stack:c.stack};const h={message:d,cbPayload:s,success:a};try{this.getWebWindow().fin.__internal_.openerSuccessCBCalled()}catch(e){}return h.success?this:Promise.reject(h)}getAllFrames(){return this.wire.sendAction(\"get-all-frames\",this.identity).then((({payload:e})=>e.data))}getBounds(){return this.wire.sendAction(\"get-window-bounds\",this.identity).then((({payload:e})=>e.data))}center(){return this.wire.sendAction(\"center-window\",this.identity).then((()=>{}))}blur(){return this.wire.sendAction(\"blur-window\",this.identity).then((()=>{}))}bringToFront(){return this.wire.sendAction(\"bring-window-to-front\",this.identity).then((()=>{}))}animate(e,t){return this.wire.sendAction(\"animate-window\",{transitions:e,options:t,...this.identity}).then((()=>{}))}hide(){return this.wire.sendAction(\"hide-window\",this.identity).then((()=>{}))}close(e=!1){return this.wire.sendAction(\"close-window\",{force:e,...this.identity}).then((()=>{Object.setPrototypeOf(this,null)}))}focusedWebViewWasChanged(){return this.wire.sendAction(\"focused-webview-changed\",this.identity).then((()=>{}))}getNativeId(){return this.wire.sendAction(\"get-window-native-id\",this.identity).then((({payload:e})=>e.data))}async getCurrentViews(){const{payload:e}=await this.wire.sendAction(\"window-get-views\",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}disableFrame(){return console.warn(\"Function is deprecated; use disableUserMovement instead.\"),this.wire.sendAction(\"disable-window-frame\",this.identity).then((()=>{}))}disableUserMovement(){return this.wire.sendAction(\"disable-window-frame\",this.identity).then((()=>{}))}enableFrame(){return console.warn(\"Function is deprecated; use enableUserMovement instead.\"),this.wire.sendAction(\"enable-window-frame\",this.identity).then((()=>{}))}enableUserMovement(){return this.wire.sendAction(\"enable-window-frame\",this.identity).then((()=>{}))}flash(){return this.wire.sendAction(\"flash-window\",this.identity).then((()=>{}))}stopFlashing(){return this.wire.sendAction(\"stop-flash-window\",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction(\"get-window-info\",this.identity).then((({payload:e})=>e.data))}async getLayout(e){this.wire.sendAction(\"window-get-layout\",this.identity).catch((e=>{}));const t=await this.getOptions();if(!t.layout&&!t.layoutSnapshot)throw new Error(\"Window does not have a Layout\");return this.fin.Platform.Layout.wrap(e??this.identity)}getOptions(){return this.wire.sendAction(\"get-window-options\",this.identity).then((({payload:e})=>e.data))}getParentApplication(){return this.wire.sendAction(\"window-get-parent-application\",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity))}getParentWindow(){return this.wire.sendAction(\"window-get-parent-window\",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity)).then((e=>e.getWindow()))}async getSnapshot(e){const t={area:e,...this.identity};console.warn(\"Window.getSnapshot has been deprecated, please use Window.capturePage\");return(await this.wire.sendAction(\"get-window-snapshot\",t)).payload.data}getState(){return this.wire.sendAction(\"get-window-state\",this.identity).then((({payload:e})=>e.data))}getWebWindow(){return this.wire.sendAction(\"window-get-web-window\",this.identity).catch((e=>{})),this.wire.environment.getWebWindow(this.identity)}isMainWindow(){return this.wire.sendAction(\"window-is-main-window\",this.identity).catch((e=>{})),this.me.uuid===this.me.name}isShowing(){return this.wire.sendAction(\"is-window-showing\",this.identity).then((({payload:e})=>e.data))}maximize(){return this.wire.sendAction(\"maximize-window\",this.identity).then((()=>{}))}minimize(){return this.wire.sendAction(\"minimize-window\",this.identity).then((()=>{}))}moveBy(e,t,n){return this.wire.sendAction(\"move-window-by\",{deltaLeft:e,deltaTop:t,positioningOptions:n,...this.identity}).then((()=>{}))}moveTo(e,t,n){return this.wire.sendAction(\"move-window\",{left:e,top:t,positioningOptions:n,...this.identity}).then((()=>{}))}resizeBy(e,t,n,i){return this.wire.sendAction(\"resize-window-by\",{deltaWidth:Math.floor(e),deltaHeight:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}resizeTo(e,t,n,i){return this.wire.sendAction(\"resize-window\",{width:Math.floor(e),height:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}restore(){return this.wire.sendAction(\"restore-window\",this.identity).then((()=>{}))}setAsForeground(){return this.wire.sendAction(\"set-foreground-window\",this.identity).then((()=>{}))}setBounds(e,t){return this.wire.sendAction(\"set-window-bounds\",{...e,...this.identity,positioningOptions:t}).then((()=>{}))}show(e=!1){return this.wire.sendAction(\"show-window\",{force:e,...this.identity}).then((()=>{}))}showAt(e,t,n=!1){return this.wire.sendAction(\"show-at-window\",{force:n,left:Math.floor(e),top:Math.floor(t),...this.identity}).then((()=>{}))}updateOptions(e){return this.wire.sendAction(\"update-window-options\",{options:e,...this.identity}).then((()=>{}))}authenticate(e,t){return this.wire.sendAction(\"window-authenticate\",{userName:e,password:t,...this.identity}).then((()=>{}))}async showPopupMenu(e){const{payload:t}=await this.wire.sendAction(\"show-popup-menu\",{options:e,...this.identity});return t.data}async closePopupMenu(){return this.wire.sendAction(\"close-popup-menu\",{...this.identity}).then((()=>{}))}async dispatchPopupResult(e){this.wire.sendAction(\"window-dispatch-popup-result\",this.identity).catch((e=>{})),await this.wire.sendAction(\"dispatch-popup-result\",{data:e,...this.identity})}async print(e={content:\"self\"}){switch(e.content){case void 0:case\"self\":return super.print(e);case\"screenshot\":return this.wire.sendAction(\"print-screenshot\",this.identity).then((()=>{}));case\"views\":return this.wire.sendAction(\"print-views\",{...this.identity,options:e}).then((()=>{}));default:return}}}return S._Window=o,S}function ie(){return te||(te=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(function(){if(ee)return _;ee=1,Object.defineProperty(_,\"__esModule\",{value:!0}),_._WindowModule=void 0;const e=d,t=O,n=ne();class i extends e.Base{async wrap(e){this.wire.sendAction(\"window-wrap\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}wrapSync(e){this.wire.sendAction(\"window-wrap-sync\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}create(e){return this.wire.sendAction(\"create-window\").catch((e=>{})),new n._Window(this.wire,{uuid:this.me.uuid,name:e.name}).createWindow(e)}getCurrent(){if(this.wire.sendAction(\"get-current-window\").catch((e=>{})),!this.wire.me.isWindow)throw new Error(\"You are not in a Window context\");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction(\"get-current-window-sync\").catch((e=>{})),!this.wire.me.isWindow)throw new Error(\"You are not in a Window context\");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return _._WindowModule=i,_}(),e),n(ne(),e)}(M)),M}Q.promisifySubscription=async(e,t,n=(()=>!0),i)=>{let r,o,s;const a=new Promise(((e,t)=>{r=e,o=t})),c=e=>{n(e)&&(clearTimeout(s),r(e))};return await e.on(t,c),i&&(s=setTimeout((()=>o(new Error(\"event timed out\"))),i)),a.finally((()=>{e.removeListener(t,c).catch((()=>null))})),{getValue:()=>a}},Object.defineProperty(c,\"__esModule\",{value:!0}),c.System=void 0;const re=d,oe=g,se=ie(),ae=t;class ce extends re.EmitterBase{constructor(e){super(e,\"system\")}sendExternalProcessRequest(e,t){return new Promise(((n,i)=>{const r=\"external-process-exited\";let o,s,a,c;\"function\"==typeof t.listener&&(a=e=>{const n=e||{};s={topic:\"exited\",uuid:n.processUuid||\"\",exitCode:n.exitCode||0},o===e.processUuid&&(t.listener(s),c.removeListener(r,a))},this.wire.me.name||(this.wire.me.name=this.wire.me.uuid),c=new se._Window(this.wire,this.wire.me),c.on(r,a)),this.wire.sendAction(e,t).then((({payload:e})=>{o=e.data.uuid,n(e.data),s&&o===s.uuid&&(t.listener(s),c.removeListener(r,a))})).catch((e=>{c&&c.removeListener(r,a),i(e)}))}))}getVersion(){return this.wire.sendAction(\"get-version\").then((({payload:e})=>e.data))}clearCache(e){return this.wire.sendAction(\"clear-cache\",e).then((()=>{}))}deleteCacheOnExit(){return this.wire.sendAction(\"delete-cache-request\").then((()=>{}))}exit(){return this.wire.sendAction(\"exit-desktop\").then((()=>{}))}async fetchManifest(e){const{payload:{data:t}}=await this.wire.sendAction(\"fetch-manifest\",{manifestUrl:e});return t}flushCookieStore(){return this.wire.sendAction(\"flush-cookie-store\").then((()=>{}))}getAllWindows(){return this.wire.sendAction(\"get-all-windows\").then((({payload:e})=>e.data))}getAllApplications(){return this.wire.sendAction(\"get-all-applications\").then((({payload:e})=>e.data))}getCommandLineArguments(){return this.wire.sendAction(\"get-command-line-arguments\").then((({payload:e})=>e.data))}async getCrashReporterState(){const{payload:{data:{diagnosticMode:e,isRunning:t}}}=await this.wire.sendAction(\"get-crash-reporter-state\");return console.warn(\"diagnosticMode property is deprecated. It will be removed in a future version\"),{diagnosticMode:e,diagnosticsMode:e,isRunning:t}}async startCrashReporter(e){const t=e,n={...t,diagnosticMode:t.diagnosticsMode||t.diagnosticMode},{payload:{data:{diagnosticMode:i,isRunning:r}}}=await this.wire.sendAction(\"start-crash-reporter\",n);return{diagnosticMode:i,diagnosticsMode:i,isRunning:r}}getUniqueUserId(){return this.wire.sendAction(\"get-unique-user-id\").then((({payload:e})=>e.data))}getEntityInfo(e,t){return this.wire.sendAction(\"get-entity-info\",{uuid:e,name:t}).then((({payload:e})=>e.data))}getEnvironmentVariable(e){return this.wire.sendAction(\"get-environment-variable\",{environmentVariables:e}).then((({payload:e})=>e.data))}getFocusedWindow(){return this.wire.sendAction(\"get-focused-window\").then((({payload:e})=>e.data))}async isAppCertified(e){const{payload:{data:{certifiedInfo:t}}}=await this.wire.sendAction(\"is-app-certified\",{manifestUrl:e});return t}getInstalledRuntimes(){return this.wire.sendAction(\"get-installed-runtimes\").then((({payload:e})=>e.data.runtimes))}async getInstalledApps(){const{payload:{data:{installedApps:e}}}=await this.wire.sendAction(\"get-installed-apps\");return e}getLog(e){return this.wire.sendAction(\"view-log\",e).then((({payload:e})=>e.data))}getMachineId(){return this.wire.sendAction(\"get-machine-id\").then((({payload:e})=>e.data))}getMinLogLevel(){return this.wire.sendAction(\"get-min-log-level\").then((({payload:e})=>e.data))}getLogList(){return this.wire.sendAction(\"list-logs\").then((({payload:e})=>e.data))}getMonitorInfo(){return this.wire.sendAction(\"get-monitor-info\").then((({payload:e})=>e.data))}getMousePosition(){return this.wire.sendAction(\"get-mouse-position\").then((({payload:e})=>e.data))}getProcessList(){return console.warn(\"System.getProcessList has been deprecated. Please consider using our new process APIs: Window.getProcessInfo, View.getProcessInfo, Application.getProcessInfo, System.getAllProcessInfo\"),this.wire.sendAction(\"process-snapshot\").then((({payload:e})=>e.data))}async getAllProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction(\"get-all-process-info\",this.identity);return e}getProxySettings(){return this.wire.sendAction(\"get-proxy-settings\").then((({payload:e})=>e.data))}getRuntimeInfo(){return this.wire.sendAction(\"get-runtime-info\").then((({payload:e})=>e.data))}getRvmInfo(){return this.wire.sendAction(\"get-rvm-info\").then((({payload:e})=>e.data))}getHostSpecs(){return this.wire.sendAction(\"get-host-specs\").then((({payload:e})=>e.data))}getOSInfo(){return this.wire.sendAction(\"get-os-info\").then((({payload:e})=>e.data))}launchExternalProcess(e){return this.sendExternalProcessRequest(\"launch-external-process\",e)}monitorExternalProcess(e){return this.sendExternalProcessRequest(\"monitor-external-process\",e)}log(e,t){return this.wire.sendAction(\"write-to-log\",{level:e,message:t}).then((()=>{}))}openUrlWithBrowser(e){return this.wire.sendAction(\"open-url-with-browser\",{url:e}).then((()=>{}))}async registerCustomProtocol(e){if(\"object\"!=typeof e)throw new Error(\"Must provide an object with a `protocolName` property having a string value.\");await this.wire.sendAction(\"register-custom-protocol\",e)}async unregisterCustomProtocol(e){await this.wire.sendAction(\"unregister-custom-protocol\",{protocolName:e})}async getCustomProtocolState(e){return this.wire.sendAction(\"get-custom-protocol-state\",{protocolName:e}).then((({payload:e})=>e.data))}releaseExternalProcess(e){return this.wire.sendAction(\"release-external-process\",{uuid:e}).then((()=>{}))}showDeveloperTools(e){return this.wire.sendAction(\"show-developer-tools\",e).then((()=>{}))}terminateExternalProcess(e){return this.wire.sendAction(\"terminate-external-process\",e).then((()=>{}))}updateProxySettings(e){return this.wire.sendAction(\"update-proxy\",e).then((()=>{}))}async downloadAsset(e,t){const n=()=>{};let i=n,r=n;const o=new Promise(((e,t)=>{i=e,r=t}));if(\"openfin\"!==this.wire.environment.type)throw new oe.NotSupportedError(\"downloadAsset only supported in an OpenFin Render process\");const s=oe.RuntimeError.getCallSite(),a=this.wire.environment.getNextMessageId().toString(),c=`asset-download-progress-${a}`,d=`asset-download-error-${a}`,h=`asset-download-complete-${a}`,l=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},u=()=>{this.removeListener(c,l)};await Promise.all([this.on(c,l),this.once(d,(e=>{u();const{reason:t,err:n}=e;r(new oe.RuntimeError({reason:t,error:n},s))})),this.once(h,(()=>{u(),i()}))]);const p=Object.assign(e,{downloadId:a});return await this.wire.sendAction(\"download-asset\",p).catch((e=>{throw u(),e})),o}downloadRuntime(e,t){const n=oe.RuntimeError.getCallSite();return new Promise(((i,r)=>{if(\"openfin\"!==this.wire.environment.type)return void r(new oe.NotSupportedError(\"downloadRuntime only supported in an OpenFin Render process\"));const o=this.wire.environment.getNextMessageId().toString(),s=`runtime-download-progress-${o}`,a=`runtime-download-error-${o}`,c=`runtime-download-complete-${o}`,d=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},h=()=>{this.removeListener(s,d)};this.on(s,d),this.once(a,(e=>{h();const{reason:t,err:i}=e;r(new oe.RuntimeError({reason:t,error:i},n))})),this.once(c,(()=>{h(),i()}));const l=Object.assign(e,{downloadId:o});this.wire.sendAction(\"download-runtime\",l).catch((e=>{h(),r(e)}))}))}downloadPreloadScripts(e){return this.wire.sendAction(\"download-preload-scripts\",{scripts:e}).then((({payload:e})=>e.data))}getAllExternalApplications(){return this.wire.sendAction(\"get-all-external-applications\").then((({payload:e})=>e.data))}getAppAssetInfo(e){return this.wire.sendAction(\"get-app-asset-info\",e).then((({payload:e})=>e.data))}getCookies(e){const t=this.wire.environment.getUrl(),n=Object.assign(e,{url:t});return this.wire.sendAction(\"get-cookies\",n).then((({payload:e})=>e.data))}setMinLogLevel(e){return this.wire.sendAction(\"set-min-log-level\",{level:e}).then((()=>{}))}resolveUuid(e){return this.wire.sendAction(\"resolve-uuid\",{entityKey:e}).then((({payload:e})=>e.data))}executeOnRemote(e,t){return t.requestingIdentity=e,this.wire.ferryAction(t)}readRegistryValue(e,t,n){return this.wire.sendAction(\"read-registry-value\",{rootKey:e,subkey:t,value:n}).then((({payload:e})=>e.data))}registerExternalConnection(e){return this.wire.sendAction(\"register-external-connection\",{uuid:e}).then((({payload:e})=>e.data))}async getServiceConfiguration(e){if(\"string\"!=typeof e.name)throw new Error(\"Must provide an object with a `name` property having a string value\");const{name:t}=e;return this.wire.sendAction(\"get-service-configuration\",{name:t}).then((({payload:e})=>e.data))}async getSystemAppConfig(e){if(\"string\"!=typeof e)throw new Error(\"Must provide a string value for name of system app\");return this.wire.sendAction(\"get-system-app-configuration\",{name:e}).then((({payload:e})=>e.data))}async registerShutdownHandler(e){this.wire.sendAction(\"system-register-shutdown-handler\").catch((e=>{}));const{uuid:t,name:n}=this.wire.me;this.on(\"system-shutdown\",(i=>{e({proceed:()=>{this.wire.environment.raiseEvent(\"application/system-shutdown-handled\",{uuid:t,name:n,topic:\"application\"})}})}))}runRvmHealthCheck(){return this.wire.sendAction(\"run-rvm-health-check\").then((({payload:e})=>e.data))}async launchManifest(e,t={}){const{subscribe:n,...i}=t,r=i;if(n){const e=new ae.EventEmitter;n(e);const t=\"app-version-progress\",i=\"runtime-status\",o=\"app-version-complete\",s=\"app-version-error\",a=this.wire.environment.getNextMessageId().toString();r.appVersionId=a;const c=[o,t,i,s],d=e=>{const{appVersionId:t,topic:n,type:i,...r}=e;return{...r,type:c.find((e=>i.includes(e)))}},h=t=>{const n=d(t);e.emit(n.type,n)},l=()=>{this.removeListener(`${t}.${a}`,h),this.removeListener(`${i}.${a}`,h),this.removeListener(`${o}.${a}`,h),this.removeListener(`${s}.${a}`,h),this.removeListener(`${o}.${a}`,l),this.removeListener(`${s}.${a}`,l)};await Promise.all([this.on(`${t}.${a}`,h),this.on(`${i}.${a}`,h),this.once(`${o}.${a}`,h),this.once(`${s}.${a}`,h),this.once(`${o}.${a}`,l),this.once(`${s}.${a}`,l)])}return(await this.wire.sendAction(\"launch-manifest\",{manifestUrl:e,opts:r})).payload.data.manifest}async queryPermissionForCurrentContext(e){const t={uuid:this.wire.me.uuid,name:this.wire.me.name};return(await this.wire.sendAction(\"query-permission-for-current-context\",{apiName:e,identity:t})).payload.data}async enableNativeWindowIntegrationProvider(e){const{payload:t}=await this.wire.sendAction(\"enable-native-window-integration-provider\",{permissions:e});return t.data}async registerUsage({data:e,type:t}){await this.wire.sendAction(\"register-usage\",{data:e,type:t})}async getPrinters(){const{payload:e}=await this.wire.sendAction(\"system-get-printers\");return e.data}async updateProcessLoggingOptions(e){await this.wire.sendAction(\"system-update-process-logging-options\",{options:e})}async getDomainSettings(){const{payload:{data:e}}=await this.wire.sendAction(\"get-domain-settings\",this.identity);return e}async setDomainSettings(e){await this.wire.sendAction(\"set-domain-settings\",{domainSettings:e,...this.identity})}async refreshExtensions(){const{payload:e}=await this.wire.sendAction(\"refresh-extensions\");return e.data}async getInstalledExtensions(){const{payload:e}=await this.wire.sendAction(\"get-installed-extensions\");return e.data}}c.System=ce;var de={},he={};Object.defineProperty(he,\"__esModule\",{value:!0}),he.RefCounter=void 0;he.RefCounter=class{constructor(){this.topicRefMap=new Map}incRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t+1;n=i,this.topicRefMap.set(e,i)}else this.topicRefMap.set(e,1),n=1;return n}decRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t-1;this.topicRefMap.set(e,i),n=i}else n=-1;return n}actOnFirst(e,t,n){return 1===this.incRefCount(e)?t():n()}actOnLast(e,t,n){return 0===this.decRefCount(e)?t():n()}};var le={},ue={},pe={};Object.defineProperty(pe,\"__esModule\",{value:!0}),pe.ChannelBase=pe.ProtectedItems=void 0;const we=e=>async(t,n,i)=>{const r=await e(t,n,i);return void 0===r?n:r};pe.ProtectedItems=class{constructor(e,t){this.providerIdentity=e,this.close=t}};class ye{static defaultAction(e){throw new Error(`No action registered at target for ${e}`)}constructor(){this.subscriptions=new Map}async processAction(e,t,n){try{const i=this.subscriptions.has(e)?this.subscriptions.get(e):(t,n)=>(this.defaultAction??ye.defaultAction)(e,t,n),r=this.preAction?await this.preAction(e,t,n):t,o=await i(r,n);return this.postAction?await this.postAction(e,o,n):o}catch(t){if(this.errorMiddleware)return this.errorMiddleware(e,t,n);throw t}}beforeAction(e){if(this.preAction)throw new Error(\"Already registered beforeAction middleware\");this.preAction=we(e)}onError(e){if(this.errorMiddleware)throw new Error(\"Already registered error middleware\");this.errorMiddleware=e}afterAction(e){if(this.postAction)throw new Error(\"Already registered afterAction middleware\");this.postAction=we(e)}remove(e){this.subscriptions.delete(e)}setDefaultAction(e){if(this.defaultAction)throw new Error(\"default action can only be set once\");this.defaultAction=e}register(e,t){if(this.subscriptions.has(e))throw new Error(`Subscription already registered for action: ${e}. Unsubscribe before adding new subscription`);return this.subscriptions.set(e,t),!0}}pe.ChannelBase=ye;var fe,ge,me,ve=s&&s.__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)},Ce=s&&s.__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};Object.defineProperty(ue,\"__esModule\",{value:!0}),ue.ChannelClient=void 0;const be=pe,Ie=new Map;class Ee extends be.ChannelBase{static closeChannelByEndpointId(e){const t=Ie.get(e);t&&ve(t,me,\"f\").call(t)}static handleProviderDisconnect(e){for(const t of Ie.values())t.providerIdentity.channelId===e.channelId&&(t.disconnectListener(e),ve(t,me,\"f\").call(t))}constructor(e,t,n){super(),fe.set(this,void 0),ge.set(this,void 0),this.processAction=(e,t,n)=>super.processAction(e,t,n),me.set(this,(()=>{Ie.delete(this.endpointId),ve(this,ge,\"f\").close()})),Ce(this,fe,new be.ProtectedItems(e,t),\"f\"),this.disconnectListener=()=>{},this.endpointId=e.endpointId,Ce(this,ge,n,\"f\"),Ie.set(this.endpointId,this),n.receive(this.processAction)}get providerIdentity(){return ve(this,fe,\"f\").providerIdentity}async dispatch(e,t){if(ve(this,ge,\"f\").isEndpointConnected(this.providerIdentity.channelId))return ve(this,ge,\"f\").send(this.providerIdentity.channelId,e,t);throw new Error(\"The client you are trying to dispatch from is disconnected from the target provider.\")}onDisconnection(e){this.disconnectListener=t=>{try{e(t)}catch(e){throw new Error(`Error while calling the onDisconnection callback: ${e.message}`)}finally{this.disconnectListener=()=>{}}}}async disconnect(){await this.sendDisconnectAction(),ve(this,me,\"f\").call(this)}async sendDisconnectAction(){const e=ve(this,fe,\"f\");await e.close()}static async wireClose(e,t,n){const{channelName:i,uuid:r,name:o}=t;await e.sendAction(\"disconnect-from-channel\",{channelName:i,uuid:r,name:o,endpointId:n})}}ue.ChannelClient=Ee,fe=new WeakMap,ge=new WeakMap,me=new WeakMap;var xe={},Ae={};Object.defineProperty(Ae,\"__esModule\",{value:!0}),Ae.exhaustiveCheck=void 0,Ae.exhaustiveCheck=function(e,t){throw new Error(`Unsupported value: ${e}${t?`\\n Supported values are: ${t.join(\"\")}`:\"\"}`)};var Pe,Me,_e,Oe={},Se=s&&s.__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},Re=s&&s.__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)};Object.defineProperty(Oe,\"__esModule\",{value:!0}),Oe.ClassicInfo=Oe.ClassicStrategy=void 0;Oe.ClassicStrategy=class{constructor(e,t,n,i){this.messageReceiver=t,this.endpointId=n,this.providerIdentity=i,Pe.set(this,void 0),Me.set(this,new Map),_e.set(this,new Map),this.send=async(e,t,n)=>{const i=Re(this,Me,\"f\").get(e);if(!i)throw new Error(`Could not locate routing info for endpoint ${e}`);const r={...i};r.isLocalEndpointId&&delete r.endpointId,delete r.isLocalEndpointId;const o=Re(this,Pe,\"f\").sendAction(\"send-channel-message\",{...r,providerIdentity:this.providerIdentity,action:t,payload:n});Re(this,_e,\"f\").get(e)?.add(o);return(await o.catch((e=>{throw new Error(e.message)})).finally((()=>{Re(this,_e,\"f\").get(e)?.delete(o)}))).payload.data.result},this.close=async()=>{this.messageReceiver.removeEndpoint(this.providerIdentity.channelId,this.endpointId),[...Re(this,Me,\"f\").keys()].forEach((e=>this.closeEndpoint(e))),Se(this,Me,new Map,\"f\")},Se(this,Pe,e,\"f\")}onEndpointDisconnect(e,t){}receive(e){this.messageReceiver.addEndpoint(e,this.providerIdentity.channelId,this.endpointId)}async closeEndpoint(e){const t=Re(this,Me,\"f\").get(e);Re(this,Me,\"f\").delete(e);const n=Re(this,_e,\"f\").get(e);n?.forEach((n=>{const i=`Channel connection with identity uuid: ${t?.uuid} / name: ${t?.name} / endpointId: ${e} no longer connected.`;n.cancel(new Error(i))}))}isEndpointConnected(e){return Re(this,Me,\"f\").has(e)}addEndpoint(e,t){Re(this,Me,\"f\").set(e,t.endpointIdentity),Re(this,_e,\"f\").set(e,new Set)}isValidEndpointPayload(e){return\"string\"==typeof e?.endpointIdentity?.endpointId||\"string\"==typeof e?.endpointIdentity?.channelId}},Pe=new WeakMap,Me=new WeakMap,_e=new WeakMap,Oe.ClassicInfo={version:5,minimumVersion:0,type:\"classic\"};var Fe={},je={},ke={};Object.defineProperty(ke,\"__esModule\",{value:!0}),ke.errorToPOJO=void 0,ke.errorToPOJO=function(e){return{stack:e.stack,name:e.name,message:e.message,toString:()=>e.stack||e.toString()}};var Le,Te,$e=s&&s.__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)},Be=s&&s.__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};Object.defineProperty(je,\"__esModule\",{value:!0}),je.RTCEndpoint=void 0;const Ge=ke;je.RTCEndpoint=class{static isValidEndpointPayload(e){const t=e=>\"object\"==typeof e&&null!==e;return t(e)&&t(e.endpointIdentity)&&t(e.rtc)&&\"string\"==typeof e.endpointIdentity.endpointId}constructor({rtc:e,endpointIdentity:t}){this.responseMap=new Map,Le.set(this,null),Te.set(this,void 0),this.connectionStateChangeHandler=e=>{\"connected\"!==this.rtc.rtcClient.connectionState&&(this.rtc.rtcClient.removeEventListener(\"connectionstatechange\",this.connectionStateChangeHandler),this.close(),$e(this,Te,\"f\")&&$e(this,Te,\"f\").call(this))},this.send=async(e,t)=>{const n=`message-${Math.random()}`,i=new Promise(((e,t)=>{this.responseMap.set(n,{resolve:e,reject:t})}));return this.rtc.channels.request.send(JSON.stringify({action:e,payload:t,messageId:n})),i},this.close=()=>{this.responseMap.forEach((e=>e.reject(\"Connection has closed.\"))),this.responseMap=new Map,this.rtc.channels.request.close(),this.rtc.channels.response.close(),this.rtc.rtcClient.close()},this.rtc=e,this.endpointIdentity=t,this.rtc.channels.response.addEventListener(\"message\",(e=>{let{data:t}=e;e.data instanceof ArrayBuffer&&(t=(new TextDecoder).decode(e.data));const{messageId:n,payload:i,success:r,error:o}=JSON.parse(t),{resolve:s,reject:a}=this.responseMap.get(n)??{};s&&a?(this.responseMap.delete(n),r?s(i):a(o)):(console.log(\"Could not find id in responseMap.\"),console.log(e))})),this.rtc.channels.request.addEventListener(\"message\",(async e=>{let{data:n}=e;e.data instanceof ArrayBuffer&&(n=(new TextDecoder).decode(e.data));const{messageId:i,action:r,payload:o}=JSON.parse(n);if($e(this,Le,\"f\"))try{const e=await $e(this,Le,\"f\").call(this,r,o,t);this.rtc.channels.response.send(JSON.stringify({messageId:i,payload:e,success:!0}))}catch(e){\"open\"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,error:(0,Ge.errorToPOJO)(e),success:!1}))}else\"open\"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,success:!1,error:\"Connection not ready.\"}))})),this.rtc.rtcClient.addEventListener(\"connectionstatechange\",this.connectionStateChangeHandler),Object.values(this.rtc.channels).forEach((e=>{e.onclose=e=>{[...this.responseMap.values()].forEach((e=>e.reject(new Error(\"RTCDataChannel closed unexpectedly, this is most commonly caused by message size. Note: RTC Channels have a message size limit of ~255kB.\")))),this.close(),$e(this,Te,\"f\")&&$e(this,Te,\"f\").call(this)}}))}onDisconnect(e){if($e(this,Te,\"f\"))throw new Error(\"RTCEndpoint disconnectListener cannot be set twice.\");Be(this,Te,e,\"f\")}receive(e){if($e(this,Le,\"f\"))throw new Error(\"You have already set a listener for this RTC Endpoint.\");Be(this,Le,e,\"f\")}get connected(){return\"connected\"===this.rtc.rtcClient.connectionState}},Le=new WeakMap,Te=new WeakMap;var We,He,Ne,De={},Ue=s&&s.__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)},Ve=s&&s.__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};Object.defineProperty(De,\"__esModule\",{value:!0}),De.EndpointStrategy=void 0;De.EndpointStrategy=class{constructor(e,t,n){this.EndpointType=e,this.StrategyName=n,We.set(this,null),He.set(this,new Map),Ne.set(this,!0),this.send=async(e,t,n)=>this.getEndpointById(e).send(t,n),this.close=async()=>{Ue(this,Ne,\"f\")&&(Ue(this,He,\"f\").forEach((e=>e.close())),Ve(this,He,new Map,\"f\")),Ve(this,Ne,!1,\"f\")},this.isValidEndpointPayload=t}onEndpointDisconnect(e,t){this.getEndpointById(e).onDisconnect(t)}receive(e){if(Ue(this,We,\"f\"))throw new Error(`You have already set a listener for this ${this.StrategyName} Strategy`);Ve(this,We,e,\"f\"),Ue(this,He,\"f\").forEach((e=>e.receive(Ue(this,We,\"f\"))))}getEndpointById(e){const t=Ue(this,He,\"f\").get(e);if(!t)throw new Error(`Client with endpoint id ${e} is not connected`);return t}get connected(){return Ue(this,Ne,\"f\")}isEndpointConnected(e){return Ue(this,He,\"f\").has(e)}addEndpoint(e,t){if(!Ue(this,Ne,\"f\"))return void console.warn(`Adding endpoint to disconnected ${this.StrategyName} Strategy`);const n=new this.EndpointType(t);Ue(this,We,\"f\")&&n.receive(Ue(this,We,\"f\")),Ue(this,He,\"f\").set(e,n)}async closeEndpoint(e){Ue(this,He,\"f\").delete(e)}},We=new WeakMap,He=new WeakMap,Ne=new WeakMap,Object.defineProperty(Fe,\"__esModule\",{value:!0}),Fe.RTCInfo=Fe.RTCStrategy=void 0;const ze=je,Ke=De;class qe extends Ke.EndpointStrategy{constructor(){super(ze.RTCEndpoint,ze.RTCEndpoint.isValidEndpointPayload,\"RTC\")}}Fe.RTCStrategy=qe,Fe.RTCInfo={version:2,minimumVersion:0,type:\"rtc\"};var Je={};Object.defineProperty(Je,\"__esModule\",{value:!0}),Je.RTCICEManager=void 0;const Ye=d;class Ze extends Ye.EmitterBase{constructor(e){super(e,\"channel\"),this.ensureChannelOpened=e=>new Promise(((t,n)=>{if(\"open\"===e.readyState)t();else if(\"connecting\"===e.readyState){const n=()=>{e.removeEventListener(\"open\",n),t()};e.addEventListener(\"open\",n)}else n(new Error(\"This Channel has already closed\"))}))}static createDataChannelPromise(e,t){let n;const i=new Promise((e=>{n=e})),r=i=>{const o=()=>{i.channel.removeEventListener(\"open\",o),n(i.channel)};i.channel.label===e&&(i.channel.addEventListener(\"open\",o),t.removeEventListener(\"datachannel\",r))};return t.addEventListener(\"datachannel\",r),i}async listenForProviderIce(e,t){await this.on(this.createProviderEventName(e),t,{timestamp:Date.now()})}async raiseProviderIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createProviderEventName(e)),t)}async listenForClientIce(e,t){await this.on(this.createClientEventName(e),t,{timestamp:Date.now()})}async raiseClientIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createClientEventName(e)),t)}cleanupIceListeners(e){this.removeAllListeners(this.createClientEventName(e)),this.removeAllListeners(this.createProviderEventName(e))}createClientEventName(e){return`ice-client-${e}`}createProviderEventName(e){return`ice-provider-${e}`}createRouteString(e){return`channel/${e}`}createRtcPeer(){return this.wire.environment.getRtcPeer()}async startClientOffer(){const e=Math.random().toString(),t=this.createRtcPeer();t.addEventListener(\"icecandidate\",(async t=>{t.candidate&&await this.raiseClientIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForProviderIce(e,(async e=>{await t.addIceCandidate(e.candidate)}));const n={request:t.createDataChannel(\"request\"),response:t.createDataChannel(\"response\")},i=await t.createOffer();await t.setLocalDescription(i);const r=Promise.all([n.request,n.response].map(this.ensureChannelOpened)).then((()=>{}));return{rtcClient:t,channels:n,offer:i,rtcConnectionId:e,channelsOpened:r}}async finishClientOffer(e,t,n){return await e.setRemoteDescription(t),await n,!0}async createProviderAnswer(e,t){const n=this.createRtcPeer(),i=Ze.createDataChannelPromise(\"request\",n),r=Ze.createDataChannelPromise(\"response\",n);n.addEventListener(\"icecandidate\",(async t=>{t.candidate&&await this.raiseProviderIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForClientIce(e,(async e=>{await n.addIceCandidate(e.candidate)})),await n.setRemoteDescription(t);const o=await n.createAnswer();await n.setLocalDescription(o);const s=Promise.all([i,r]).then((([t,n])=>(this.cleanupIceListeners(e),{request:t,response:n})));return{rtcClient:n,answer:o,channels:s}}}Je.RTCICEManager=Ze;var Qe={},Xe={};function et(e){return[...e.split(\".\").reverse().entries()].reduce(((e,[t,n])=>e+ +n*1e4**t),0)}function tt(e,t){return et(e)>=et(t)}function nt(e){return e.split(\"/\")[0]}Object.defineProperty(Xe,\"__esModule\",{value:!0}),Xe.runtimeUuidMeetsMinimumRuntimeVersion=Xe.parseRuntimeUuid=Xe.meetsMinimumRuntimeVersion=void 0,Xe.meetsMinimumRuntimeVersion=tt,Xe.parseRuntimeUuid=nt,Xe.runtimeUuidMeetsMinimumRuntimeVersion=function(e,t){return tt(nt(e),t)};var it,rt,ot,st,at,ct=s&&s.__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)},dt=s&&s.__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};Object.defineProperty(Qe,\"__esModule\",{value:!0}),Qe.ChannelProvider=void 0;const ht=pe,lt=Xe;class ut extends ht.ChannelBase{get connections(){return[...ct(this,it,\"f\")]}static handleClientDisconnection(e,t){const n=e.connections.find((e=>e.endpointId===t.endpointId));if(n)ct(e,st,\"f\").call(e,n);else{e.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name)).forEach(ct(e,st,\"f\"))}e.disconnectListener(t)}static setProviderRemoval(e,t){ut.removalMap.set(e,t)}constructor(e,t,n){super(),it.set(this,void 0),rt.set(this,void 0),ot.set(this,void 0),st.set(this,(e=>{const t=this.connections.filter((t=>t.endpointId!==e.endpointId));ct(this,ot,\"f\").closeEndpoint(e.endpointId),dt(this,it,t,\"f\")})),this.processAction=async(e,t,n)=>(ut.clientIsMultiRuntime(n)&&!(0,lt.runtimeUuidMeetsMinimumRuntimeVersion)(n.runtimeUuid,\"18.87.56.0\")?this.handleMultiRuntimeLegacyClient(n):this.checkForClientConnection(n),super.processAction(e,t,n)),at.set(this,(()=>{ct(this,ot,\"f\").close();const e=ut.removalMap.get(this);e&&e()})),dt(this,rt,new ht.ProtectedItems(e,t),\"f\"),this.connectListener=()=>{},this.disconnectListener=()=>{},dt(this,it,[],\"f\"),dt(this,ot,n,\"f\"),n.receive(this.processAction)}dispatch(e,t,n){const i=e.endpointId??this.getEndpointIdForOpenFinId(e,t);return i&&ct(this,ot,\"f\").isEndpointConnected(i)?ct(this,ot,\"f\").send(i,t,n):Promise.reject(new Error(`Client connection with identity uuid: ${e.uuid} / name: ${e.name} / endpointId: ${i} no longer connected.`))}async processConnection(e,t){return ct(this,it,\"f\").push(e),this.connectListener(e,t)}publish(e,t){return this.connections.map((n=>ct(this,ot,\"f\").send(n.endpointId,e,t)))}onConnection(e){this.connectListener=e}onDisconnection(e){this.disconnectListener=e}async destroy(){const e=ct(this,rt,\"f\");e.providerIdentity,dt(this,it,[],\"f\"),await e.close(),ct(this,at,\"f\").call(this)}async getAllClientInfo(){return this.connections.map((e=>{const{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}=e;return{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}}))}checkForClientConnection(e){if(!this.isClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider.\\n Client Identity: {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}isClientConnected(e){return ut.clientIdentityIncludesEndpointId(e)?this.connections.some((t=>t.endpointId===e.endpointId&&t.uuid===e.uuid&&t.name===e.name)):this.isLegacyClientConnected(e)}isLegacyClientConnected(e){return this.connections.some((t=>t.uuid===e.uuid&&t.name===e.name))}handleMultiRuntimeLegacyClient(e){if(!this.isLegacyClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider. Client Identity:\\n {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}getEndpointIdForOpenFinId(e,t){const n=this.connections.filter((t=>t.name===e.name&&t.uuid===e.uuid));if(n.length>=2){const n=ct(this,rt,\"f\"),{uuid:i,name:r}=e,o=n?.providerIdentity.uuid,s=n?.providerIdentity.name;console.warn(`WARNING: Dispatch call may have unintended results. The \"to\" argument of your dispatch call is missing the\\n \"endpointId\" parameter. The identity you are dispatching to ({uuid: ${i}, name: ${r}})\\n has multiple channelClients for this channel. Your dispatched action: (${t}) from the provider:\\n ({uuid: ${o}, name: ${s}}) will only be processed by the most recently-created client.`)}return n.pop()?.endpointId}static clientIdentityIncludesEndpointId(e){return void 0!==e.endpointId}static clientIsMultiRuntime(e){return void 0!==e.runtimeUuid}static async wireClose(e,t){await e.sendAction(\"destroy-channel\",{channelName:t})}}Qe.ChannelProvider=ut,it=new WeakMap,rt=new WeakMap,ot=new WeakMap,st=new WeakMap,at=new WeakMap,ut.removalMap=new WeakMap;var pt={};Object.defineProperty(pt,\"__esModule\",{value:!0}),pt.MessageReceiver=void 0;const wt=ue,yt=d;class ft extends yt.Base{constructor(e){super(e),this.onmessage=e=>\"process-channel-message\"===e.action&&(this.processChannelMessage(e),!0),this.endpointMap=new Map,this.latestEndpointIdByChannelId=new Map,e.registerMessageHandler(this.onmessage.bind(this))}async processChannelMessage(e){const{senderIdentity:t,providerIdentity:n,action:i,ackToSender:r,payload:o,intendedTargetIdentity:s}=e.payload,a=s.channelId??s.endpointId??this.latestEndpointIdByChannelId.get(n.channelId),c=this.endpointMap.get(a);if(!c)return r.payload.success=!1,r.payload.reason=`Client connection with identity uuid: ${this.wire.me.uuid} / name: ${this.wire.me.name} / endpointId: ${a} no longer connected.`,this.wire.sendRaw(r);try{const e=await c(i,o,t);return r.payload.payload=r.payload.payload||{},r.payload.payload.result=e,this.wire.sendRaw(r)}catch(e){return r.payload.success=!1,r.payload.reason=e.message,this.wire.sendRaw(r)}}addEndpoint(e,t,n){this.endpointMap.set(n,e),t!==n&&this.latestEndpointIdByChannelId.set(t,n)}removeEndpoint(e,t){this.endpointMap.delete(t),this.latestEndpointIdByChannelId.get(e)===t&&this.latestEndpointIdByChannelId.delete(e)}checkForPreviousClientConnection(e){const t=this.latestEndpointIdByChannelId.get(e);t&&(wt.ChannelClient.closeChannelByEndpointId(t),console.warn(\"You have created a second connection to an older provider. First connection has been removed from the clientMap\"),console.warn(\"If the provider calls publish(), you may receive multiple messages.\"))}}pt.MessageReceiver=ft;var gt={};Object.defineProperty(gt,\"__esModule\",{value:!0}),gt.ProtocolManager=void 0;gt.ProtocolManager=class{constructor(e){this.ProtocolsInPreferenceOrder=e,this.DefaultClientProtocols=[\"classic\"],this.DefaultProviderProtocols=[\"classic\"],this.getClientProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultClientProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(\", \")}.`);return t},this.getProviderProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultProviderProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(\", \")}.`);return t},this.getCompatibleProtocols=(e,t)=>t.supportedProtocols.filter((t=>e.some((e=>e.type===t.type&&t.version>=e.minimumVersion&&e.version>=(t.minimumVersion??0))))).slice(0,t.maxProtocols)}};var mt={};Object.defineProperty(mt,\"__esModule\",{value:!0});class vt{static combine(e,t){return new vt(e,t)}constructor(e,t){this.primary=e,this.secondary=t}onEndpointDisconnect(e,t){this.primary.onEndpointDisconnect(e,(()=>{this.secondary.isEndpointConnected(e)||t()})),this.secondary.onEndpointDisconnect(e,(()=>{this.primary.isEndpointConnected(e)||t()}))}isValidEndpointPayload(e){return this.primary.isValidEndpointPayload(e)||this.secondary.isValidEndpointPayload(e)}async closeEndpoint(e){await this.primary.closeEndpoint(e),await this.secondary.closeEndpoint(e)}isEndpointConnected(e){return this.primary.isEndpointConnected(e)||this.secondary.isEndpointConnected(e)}async addEndpoint(e,t){this.primary.isValidEndpointPayload(t)&&await this.primary.addEndpoint(e,t),this.secondary.isValidEndpointPayload(t)&&await this.secondary.addEndpoint(e,t)}receive(e){this.primary.receive(e),this.secondary.receive(e)}send(e,t,n){return this.primary.isEndpointConnected(e)?this.primary.send(e,t,n):this.secondary.send(e,t,n)}async close(){await Promise.all([this.primary.close(),this.secondary.close()])}}mt.default=vt;var Ct,bt,It=s&&s.__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},Et=s&&s.__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)},xt=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(xe,\"__esModule\",{value:!0}),xe.ConnectionManager=void 0;const At=Ae,Pt=d,Mt=Oe,_t=Fe,Ot=Je,St=Qe,Rt=pt,Ft=gt,jt=xt(mt);class kt extends Pt.Base{static getProtocolOptionsFromStrings(e){return e.map((e=>{switch(e){case\"rtc\":return _t.RTCInfo;case\"classic\":return Mt.ClassicInfo;default:return(0,At.exhaustiveCheck)(e,[\"rtc\",\"classic\"])}}))}constructor(e){super(e),Ct.set(this,void 0),bt.set(this,void 0),this.removeChannelFromProviderMap=e=>{this.providerMap.delete(e)},this.onmessage=e=>\"process-channel-connection\"===e.action&&(this.processChannelConnection(e),!0),this.providerMap=new Map,this.protocolManager=new Ft.ProtocolManager(\"node\"===this.wire.environment.type?[\"classic\"]:[\"rtc\",\"classic\"]),It(this,Ct,new Rt.MessageReceiver(e),\"f\"),It(this,bt,new Ot.RTCICEManager(e),\"f\"),e.registerMessageHandler(this.onmessage.bind(this))}createProvider(e,t){const n=Object.assign(this.wire.environment.getDefaultChannelOptions().create,e||{}),i=this.protocolManager.getProviderProtocols(n?.protocols),r=i.map((e=>{switch(e){case\"rtc\":return new _t.RTCStrategy;case\"classic\":return new Mt.ClassicStrategy(this.wire,Et(this,Ct,\"f\"),t.channelId,t);default:return(0,At.exhaustiveCheck)(e,[\"rtc\",\"classic\"])}}));let o;if(2===r.length){const[e,t]=r;o=jt.default.combine(e,t)}else{if(1!==r.length)throw new Error(\"failed to combine strategies\");[o]=r}const s=new St.ChannelProvider(t,(()=>St.ChannelProvider.wireClose(this.wire,t.channelName)),o),a=t.channelId;return this.providerMap.set(a,{provider:s,strategy:o,supportedProtocols:kt.getProtocolOptionsFromStrings(i)}),St.ChannelProvider.setProviderRemoval(s,this.removeChannelFromProviderMap.bind(this)),s}async createClientOffer(e){const t=this.protocolManager.getClientProtocols(e?.protocols);let n;return{offer:{supportedProtocols:await Promise.all(t.map((async e=>{switch(e){case\"rtc\":{const{rtcClient:e,channels:t,offer:i,rtcConnectionId:r,channelsOpened:o}=await Et(this,bt,\"f\").startClientOffer();return n={rtcClient:e,channels:t,channelsOpened:o},{type:\"rtc\",version:_t.RTCInfo.version,payload:{offer:i,rtcConnectionId:r}}}case\"classic\":return{type:\"classic\",version:Mt.ClassicInfo.version};default:return(0,At.exhaustiveCheck)(e,[\"rtc\",\"classic\"])}}))),maxProtocols:2},rtc:n}}async createClientStrategy(e,t){t.endpointId||(t.endpointId=this.wire.environment.getNextMessageId(),Et(this,Ct,\"f\").checkForPreviousClientConnection(t.channelId));const n=t.answer??{supportedProtocols:[{type:\"classic\",version:1}]},i=(await Promise.all(n.supportedProtocols.map((async n=>\"rtc\"===n.type&&e?(await Et(this,bt,\"f\").finishClientOffer(e.rtcClient,n.payload.answer,e.channelsOpened),new _t.RTCStrategy):\"classic\"===n.type?new Mt.ClassicStrategy(this.wire,Et(this,Ct,\"f\"),t.endpointId,t):null)))).filter((e=>null!==e));let r;if(e&&!i.some((e=>e instanceof _t.RTCStrategy))&&e&&e.rtcClient.close(),i.length>=2)r=jt.default.combine(i[0],i[1]);else{if(!i.length)throw new Error(\"No compatible protocols\");[r]=i}const o={endpointIdentity:t,rtc:e};return r.addEndpoint(t.channelId,o),r}async processChannelConnection(e){const{clientIdentity:t,providerIdentity:n,ackToSender:i,payload:r,offer:o}=e.payload;t.endpointId?t.isLocalEndpointId=!1:(t.endpointId=this.wire.environment.getNextMessageId(),t.isLocalEndpointId=!0);const s=n.channelId,a=this.providerMap.get(s);if(!a)return i.payload.success=!1,i.payload.reason=`Channel \"${n.channelName}\" has been destroyed.`,this.wire.sendRaw(i);const{provider:c,strategy:d,supportedProtocols:h}=a;try{if(!(c instanceof St.ChannelProvider))throw Error(\"Cannot connect to a channel client\");const e=o??{supportedProtocols:[{type:\"classic\",version:1}],maxProtocols:1},n=this.protocolManager.getCompatibleProtocols(h,e);if(!n.length)throw new Error(\"This provider does not support any of the offered protocols.\");const s=await c.processConnection(t,r);i.payload.payload=i.payload.payload||{};let a={supportedProtocols:[],endpointPayloadPromise:Promise.resolve({endpointIdentity:t})};return a=await n.reduce((async(e,t)=>{const n=await e;if(\"rtc\"===t.type){const{answer:e,rtcClient:i,channels:r}=await Et(this,bt,\"f\").createProviderAnswer(t.payload.rtcConnectionId,t.payload.offer);n.supportedProtocols.push({type:\"rtc\",version:_t.RTCInfo.version,payload:{answer:e}}),n.endpointPayloadPromise=n.endpointPayloadPromise.then((e=>r.then((t=>({...e,rtc:{rtcClient:i,channels:t}})))))}else n.supportedProtocols.push({type:\"classic\",version:Mt.ClassicInfo.version});return n}),Promise.resolve(a)),a.endpointPayloadPromise.then((e=>d.addEndpoint(t.endpointId,e))),i.payload.payload.result=s,i.payload.payload.answer=a,this.wire.sendRaw(i)}catch(e){return i.payload.success=!1,i.payload.reason=e.message,this.wire.sendRaw(i)}}}xe.ConnectionManager=kt,Ct=new WeakMap,bt=new WeakMap;var Lt,Tt,$t,Bt=s&&s.__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},Gt=s&&s.__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)};Object.defineProperty(le,\"__esModule\",{value:!0}),le.Channel=void 0;const Wt=t,Ht=G,Nt=d,Dt=ue,Ut=xe,Vt=Qe;function zt(e){const t=Math.floor(e/10),n=Math.min(3e4,500*2**t);return new Promise((e=>{setTimeout((()=>{e(!1)}),n)}))}class Kt extends Nt.EmitterBase{constructor(e){super(e,\"channel\"),Lt.set(this,void 0),Tt.set(this,new Wt.EventEmitter),$t.set(this,new Ht.AsyncRetryableLazy((async()=>{await Promise.all([this.on(\"disconnected\",(e=>{Dt.ChannelClient.handleProviderDisconnect(e)})),this.on(\"connected\",((...e)=>{Gt(this,Tt,\"f\").emit(\"connected\",...e)}))]).catch((()=>new Error(\"error setting up channel connection listeners\")))}))),Bt(this,Lt,new Ut.ConnectionManager(e),\"f\")}async getAllChannels(){return this.wire.sendAction(\"get-all-channels\").then((({payload:e})=>e.data))}async onChannelConnect(e){await this.on(\"connected\",e)}async onChannelDisconnect(e){await this.on(\"disconnected\",e)}async safeConnect(e,t,n){const i={count:0};do{let r=()=>{};const o=new Promise((t=>{r=n=>{e===n.channelName&&t(!0)},Gt(this,Tt,\"f\").on(\"connected\",r)}));try{if(i.count>0){i.gotConnectedEvent=await Promise.race([zt(i.count),o]);const t=await this.wire.sendAction(\"connect-to-channel\",{...n,retryInfo:i});return console.log(`Successfully connected to channelName: ${e}`),t.payload.data}const t=this.wire.sendAction(\"connect-to-channel\",n);i.originalMessageId=t.messageId;return(await t).payload.data}catch(n){if(!n.message.includes(\"internal-nack\"))throw n;t&&0===i.count&&console.warn(`No channel found for channelName: ${e}. Waiting for connection...`)}finally{i.count+=1,Gt(this,Tt,\"f\").removeListener(\"connected\",r)}}while(t);throw new Error(`No channel found for channelName: ${e}.`)}async connect(e,t={}){if(await Gt(this,$t,\"f\").getValue(),!e||\"string\"!=typeof e)throw new Error(\"Please provide a channelName string to connect to a channel.\");const n={wait:!0,...this.wire.environment.getDefaultChannelOptions().connect,...t},{offer:i,rtc:r}=await Gt(this,Lt,\"f\").createClientOffer(n);let o;(this.fin.me.isFrame||this.fin.me.isView||this.fin.me.isWindow)&&(o=(await this.fin.me.getInfo()).url);const s={channelName:e,...n,offer:i,connectionUrl:o},a=await this.safeConnect(e,n.wait,s),c=await Gt(this,Lt,\"f\").createClientStrategy(r,a),d=new Dt.ChannelClient(a,(()=>Dt.ChannelClient.wireClose(this.wire,a,a.endpointId)),c);return c.onEndpointDisconnect(a.channelId,(async()=>{try{await d.sendDisconnectAction()}catch(e){console.warn(`Something went wrong during disconnect for client with uuid: ${a.uuid} / name: ${a.name} / endpointId: ${a.endpointId}.`)}finally{Dt.ChannelClient.handleProviderDisconnect(a)}})),d}async create(e,t){if(!e)throw new Error(\"Please provide a channelName to create a channel\");const{payload:{data:n}}=await this.wire.sendAction(\"create-channel\",{channelName:e}),i=Gt(this,Lt,\"f\").createProvider(t,n);return this.on(\"client-disconnected\",(t=>{t.channelName===e&&Vt.ChannelProvider.handleClientDisconnection(i,t)})),i}}le.Channel=Kt,Lt=new WeakMap,Tt=new WeakMap,$t=new WeakMap,Object.defineProperty(de,\"__esModule\",{value:!0}),de.InterAppPayload=de.InterApplicationBus=void 0;const qt=t,Jt=d,Yt=he,Zt=le,Qt=O;class Xt extends Jt.Base{constructor(e){super(e),this.events={subscriberAdded:\"subscriber-added\",subscriberRemoved:\"subscriber-removed\"},this.refCounter=new Yt.RefCounter,this.Channel=new Zt.Channel(e),this.emitter=new qt.EventEmitter,e.registerMessageHandler(this.onmessage.bind(this)),this.on=this.emitter.on.bind(this.emitter),this.removeAllListeners=this.emitter.removeAllListeners.bind(this.emitter)}async publish(e,t){await this.wire.sendAction(\"publish-message\",{topic:e,message:t,sourceWindowName:this.me.name})}async send(e,t,n){const i=(0,Qt.validateIdentity)(e);if(i)throw new Error(i);await this.wire.sendAction(\"send-message\",{destinationUuid:e.uuid,destinationWindowName:e.name,topic:t,message:n,sourceWindowName:this.me.name})}subscribe(e,t,n){const i=this.createSubscriptionKey(e.uuid,e.name||\"*\",t);return this.emitter.on(i,n),this.refCounter.actOnFirst(i,(async()=>{await this.wire.sendAction(\"subscribe\",{sourceUuid:e.uuid,sourceWindowName:e.name||\"*\",topic:t,destinationWindowName:this.me.name})}),(()=>Promise.resolve()))}unsubscribe(e,t,n){const i=e.name||\"*\",r=this.createSubscriptionKey(e.uuid,i,t);return this.emitter.removeListener(r,n),this.refCounter.actOnLast(r,(async()=>{await this.wire.sendAction(\"unsubscribe\",{sourceUuid:e.uuid,sourceWindowName:i,topic:t,destinationWindowName:this.me.name})}),(()=>new Promise((e=>e)).then((()=>{}))))}processMessage(e){const{payload:{message:t,sourceWindowName:n,sourceUuid:i,topic:r}}=e,o=[this.createSubscriptionKey(i,n,r),this.createSubscriptionKey(i,\"*\",r),this.createSubscriptionKey(\"*\",\"*\",r)],s={uuid:i,name:n};o.forEach((e=>{this.emitter.emit(e,t,s)}))}emitSubscriverEvent(e,t){const{payload:{targetName:n,uuid:i,topic:r}}=t,o={name:n,uuid:i,topic:r};this.emitter.emit(e,o)}createSubscriptionKey(e,t,n){const i=t||\"*\";if(!(e&&i&&n))throw new Error(\"Missing uuid, name, or topic string\");return function(...e){return e.map((e=>Buffer.from(`${e}`).toString(\"base64\"))).join(\"/\")}(e,i,n)}onmessage(e){const{action:t}=e;switch(t){case\"process-message\":this.processMessage(e);break;case this.events.subscriberAdded:this.emitSubscriverEvent(this.events.subscriberAdded,e);break;case this.events.subscriberRemoved:this.emitSubscriverEvent(this.events.subscriberRemoved,e)}return!0}}de.InterApplicationBus=Xt;de.InterAppPayload=class{};var en={};Object.defineProperty(en,\"__esModule\",{value:!0}),en.Clipboard=void 0;const tn=d;class nn extends tn.Base{async writeText(e){await this.wire.sendAction(\"clipboard-write-text\",e)}async readText(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-text\",{type:e});return t.data}async writeImage(e){await this.wire.sendAction(\"clipboard-write-image\",e)}async readImage(e={format:\"dataURL\"}){const{payload:t}=await this.wire.sendAction(\"clipboard-read-image\",e);return t.data}async writeHtml(e){await this.wire.sendAction(\"clipboard-write-html\",e)}async readHtml(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-html\",{type:e});return t.data}async writeRtf(e){await this.wire.sendAction(\"clipboard-write-rtf\",e)}async readRtf(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-rtf\",{type:e});return t.data}async write(e){await this.wire.sendAction(\"clipboard-write\",e)}async getAvailableFormats(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-formats\",{type:e});return t.data}}en.Clipboard=nn;var rn={},on={},sn={};Object.defineProperty(sn,\"__esModule\",{value:!0}),sn.ExternalApplication=void 0;const an=d;class cn extends an.EmitterBase{constructor(e,t){super(e,\"external-application\",t.uuid),this.identity=t}getInfo(){return this.wire.sendAction(\"get-external-application-info\",this.identity).then((({payload:e})=>e.data))}}sn.ExternalApplication=cn,Object.defineProperty(on,\"__esModule\",{value:!0}),on.ExternalApplicationModule=void 0;const dn=d,hn=sn;class ln extends dn.Base{wrap(e){return this.wire.sendAction(\"external-application-wrap\").catch((e=>{})),Promise.resolve(new hn.ExternalApplication(this.wire,{uuid:e}))}wrapSync(e){return this.wire.sendAction(\"external-application-wrap-sync\").catch((e=>{})),new hn.ExternalApplication(this.wire,{uuid:e})}}on.ExternalApplicationModule=ln,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(on,e),n(sn,e)}(rn);var un={},pn={},wn={};Object.defineProperty(wn,\"__esModule\",{value:!0}),wn._Frame=void 0;const yn=d;class fn extends yn.EmitterBase{constructor(e,t){super(e,\"frame\",t.uuid,t.name),this.identity=t}getInfo(){return this.wire.sendAction(\"get-frame-info\",this.identity).then((({payload:e})=>e.data))}getParentWindow(){return this.wire.sendAction(\"get-parent-window\",this.identity).then((({payload:e})=>e.data))}}wn._Frame=fn,Object.defineProperty(pn,\"__esModule\",{value:!0}),pn._FrameModule=void 0;const gn=d,mn=O,vn=wn;class Cn extends gn.Base{async wrap(e){this.wire.sendAction(\"frame-wrap\").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}wrapSync(e){this.wire.sendAction(\"frame-wrap-sync\").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}getCurrent(){return this.wire.sendAction(\"frame-get-current\").catch((e=>{})),Promise.resolve(new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity()))}getCurrentSync(){return this.wire.sendAction(\"frame-get-current-sync\").catch((e=>{})),new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity())}}pn._FrameModule=Cn,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(pn,e),n(wn,e)}(un);var bn={};Object.defineProperty(bn,\"__esModule\",{value:!0}),bn.GlobalHotkey=void 0;const In=d;class En extends In.EmitterBase{constructor(e){super(e,\"global-hotkey\")}async register(e,t){await this.on(e,t),await this.wire.sendAction(\"global-hotkey-register\",{hotkey:e})}async unregister(e){await this.removeAllListeners(e),await this.wire.sendAction(\"global-hotkey-unregister\",{hotkey:e})}async unregisterAll(){await Promise.all(this.eventNames().filter((e=>!(\"registered\"===e||\"unregistered\"===e))).map((e=>this.removeAllListeners(e)))),await this.wire.sendAction(\"global-hotkey-unregister-all\",{})}async isRegistered(e){const{payload:{data:t}}=await this.wire.sendAction(\"global-hotkey-is-registered\",{hotkey:e});return t}}bn.GlobalHotkey=En;var xn,An={},Pn={},Mn={},_n=s&&s.__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)};Object.defineProperty(Mn,\"__esModule\",{value:!0}),Mn.Platform=void 0;const On=d,Sn=O,Rn=new Map;class Fn extends On.EmitterBase{constructor(e,t){super(t.wire,\"application\",e.uuid),this.getClient=e=>{this.wire.sendAction(\"platform-get-client\",this.identity).catch((e=>{}));const t=e||this.identity,{uuid:n}=t;if(!Rn.has(n)){const e=_n(this,xn,\"f\").call(this,n);Rn.set(n,e)}return Rn.get(n)},xn.set(this,(async e=>{try{const t=`custom-frame-${e}`,n=await this._channel.connect(t,{wait:!1});return n.onDisconnection((()=>{Rn.delete(e)})),n}catch(t){throw Rn.delete(e),new Error(\"The targeted Platform is not currently running. Listen for application-started event for the given Uuid.\")}})),this.launchLegacyManifest=this.launchContentManifest;const n=(0,Sn.validateIdentity)(e);if(n)throw new Error(n);this._channel=t,this.identity={uuid:e.uuid},this.Layout=this.fin.Platform.Layout,this.Application=this.fin.Application.wrapSync(this.identity)}async createView(e,t,n){this.wire.sendAction(\"platform-create-view\",this.identity).catch((e=>{}));const i=await this.getClient(),r=await i.dispatch(\"create-view\",{target:t,opts:e,targetView:n});if(!r||(0,Sn.validateIdentity)(r.identity))throw new Error(`When overwriting the createView call, please return an object that has a valid 'identity' property: ${JSON.stringify(r)}`);return this.fin.View.wrapSync(r.identity)}async createWindow(e){this.wire.sendAction(\"platform-create-window\",this.identity).catch((e=>{}));const t=await this.getClient();e.reason||(e.reason=\"api-call\");const n=await t.dispatch(\"create-view-container\",e);if(!n||(0,Sn.validateIdentity)(n.identity))throw new Error(`When overwriting the createWindow call, please return an object that has a valid 'identity' property: ${JSON.stringify(n)}`);const{identity:i}=n,r=this.fin.Window.wrapSync(i);return r.name=i.name,r.uuid=i.uuid,r}async quit(){this.wire.sendAction(\"platform-quit\",this.identity).catch((e=>{}));return(await this.getClient()).dispatch(\"quit\")}async closeView(e){this.wire.sendAction(\"platform-close-view\",this.identity).catch((e=>{}));const t=await this.getClient();await t.dispatch(\"close-view\",{view:e})}async reparentView(e,t){console.warn(\"Platform.reparentView has been deprecated, please use Platform.createView\"),this.wire.sendAction(\"platform-reparent-view\",this.identity).catch((e=>{}));const n={...e,uuid:e.uuid??this.identity.uuid},i=await this.fin.View.wrap(n),r=await i.getOptions();return this.createView(r,t)}async getSnapshot(){this.wire.sendAction(\"platform-get-snapshot\",this.identity).catch((e=>{}));return(await this.getClient()).dispatch(\"get-snapshot\")}async getViewSnapshot(e){return(await this.getClient()).dispatch(\"get-view-snapshot\",{viewIdentity:e})}async applySnapshot(e,t){this.wire.sendAction(\"platform-apply-snapshot\",this.identity).catch((e=>{}));const n=\"Requested snapshot must be a valid Snapshot object, or a url or filepath to such an object.\";let i;if(\"string\"==typeof e)try{i=(await this._channel.wire.sendAction(\"get-application-manifest\",{manifestUrl:e})).payload.data}catch(e){throw new Error(`${n}: ${e}`)}else i=e;if(!i.windows)throw new Error(n);const r=await this.getClient();return await r.dispatch(\"apply-snapshot\",{snapshot:i,options:t}),this}async fetchManifest(e){return(await this.getClient()).dispatch(\"platform-fetch-manifest\",{manifestUrl:e})}async launchContentManifest(e){this.wire.sendAction(\"platform-launch-content-manifest\",this.identity).catch((()=>{}));const t=await this.getClient(),n=await this.fetchManifest(e);return t.dispatch(\"launch-into-platform\",{manifest:n,manifestUrl:e}),this}async setWindowContext(e={},t){if(this.wire.sendAction(\"platform-set-window-context\",this.identity).catch((e=>{})),!e)throw new Error(\"Please provide a serializable object or string to set the context.\");const n=await this.getClient(),{entityType:i}=t?await this.fin.System.getEntityInfo(t.uuid,t.name):this.fin.me;await n.dispatch(\"set-window-context\",{context:e,entityType:i,target:t||{uuid:this.fin.me.uuid,name:this.fin.me.name}})}async getWindowContext(e){this.wire.sendAction(\"platform-get-window-context\",this.identity).catch((e=>{}));const t=await this.getClient(),{entityType:n}=e?await this.fin.System.getEntityInfo(e.uuid,e.name):this.fin.me;return t.dispatch(\"get-window-context\",{target:e||{uuid:this.fin.me.uuid,name:this.fin.me.name},entityType:n})}async closeWindow(e,t={skipBeforeUnload:!1}){this.wire.sendAction(\"platform-close-window\",this.identity).catch((e=>{}));return(await this.getClient()).dispatch(\"close-window\",{windowId:e,options:t})}}Mn.Platform=Fn,xn=new WeakMap;var jn={},kn={},Ln={},Tn={};function $n(e){switch(e){case\"columns\":case\"grid\":case\"rows\":case\"tabs\":return!0;default:return!1}}Object.defineProperty(Tn,\"__esModule\",{value:!0}),Tn.overrideFromComposables=Tn.isValidPresetType=void 0,Tn.isValidPresetType=$n,Tn.overrideFromComposables=function(...e){return t=>e.reduceRight(((e,t)=>n=>t(e(n))),(e=>e))(t)},Tn.default={isValidPresetType:$n};var Bn={},Gn={},Wn={};Object.defineProperty(Wn,\"__esModule\",{value:!0}),Wn.ApiConsumer=void 0;Wn.ApiConsumer=class{constructor(e){this.strategy=e,this.consume=async e=>(await this.strategy.getExposedFunctions(e)).reduce(((t,n)=>({...t,[n.key]:this.strategy.createFunction(n,e)})),{})}};var Hn={},Nn={};Object.defineProperty(Nn,\"__esModule\",{value:!0}),Nn.expose=Nn.getExposedProperties=void 0;const Dn=Symbol(\"exposedProperties\");Nn.getExposedProperties=e=>e[Dn]||e.prototype[Dn]||[];Nn.expose=e=>(t,n,i)=>{t[Dn]=t[Dn]||[],t[Dn].push({key:n,descriptor:i,options:e})},Object.defineProperty(Hn,\"__esModule\",{value:!0}),Hn.ApiExposer=void 0;const Un=Nn;Hn.ApiExposer=class{constructor(e){this.strategy=e,this.exposeInstance=async(e,t)=>{const n=(0,Un.getExposedProperties)(e),i=await Promise.all(n.map((async({key:n,options:i})=>({key:n,options:await this.strategy.exposeFunction(e[n].bind(e),{key:n,options:i,meta:t})}))));await this.strategy.exposeMeta(t,i)}}};var Vn={},zn={},Kn={};Object.defineProperty(Kn,\"__esModule\",{value:!0}),Kn.ChannelsConsumer=void 0;Kn.ChannelsConsumer=class{constructor(e){this.channel=e,this.getExposedFunctions=async e=>{const{id:t}=e,{props:n}=await this.channel.dispatch(`api-meta:${t}`);return n},this.createFunction=e=>(...t)=>{const{action:n}=e.options;return this.channel.dispatch(n,{args:t})}}};var qn={};Object.defineProperty(qn,\"__esModule\",{value:!0}),qn.ChannelsExposer=void 0;qn.ChannelsExposer=class{constructor(e){this.channelProviderOrClient=e,this.exposeFunction=async(e,t)=>{const{key:n,options:i,meta:r}=t,{id:o}=r,s=`${o}.${i?.action||n}`;return await this.channelProviderOrClient.register(s,(async({args:t})=>e(...t))),{action:s}},this.exposeMeta=async({id:e},t)=>{const n=`api-meta:${e}`;await this.channelProviderOrClient.register(n,(()=>({props:t})))}}},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Kn,e),n(qn,e)}(zn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(zn,e)}(Vn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Wn,e),n(Hn,e),n(Vn,e),n(Nn,e)}(Gn);var Jn={};Object.defineProperty(Jn,\"__esModule\",{value:!0}),Jn.createRelayedDispatch=exports.relayChannelClientApi_1=Jn.relayChannelClientApi=void 0;const Yn=[\"no longer connected\",\"RTCDataChannel closed unexpectedly\",\"The client you are trying to dispatch from is disconnected from the target provider\"];exports.relayChannelClientApi_1=Jn.relayChannelClientApi=async(e,t)=>{e.register(`relay:${t}`,(({action:t,target:n,payload:i})=>e.dispatch(n,t,i))),await Promise.resolve()};Jn.createRelayedDispatch=(e,t,n,i)=>async(r,o)=>{try{return await e.dispatch(`relay:${n}`,{action:r,payload:o,target:t})}catch(e){if(s=e.message,Yn.some((e=>s.includes(e)))&&i)throw new Error(i);throw e}var s};var Zn,Qn,Xn,ei=s&&s.__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},ti=s&&s.__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)};Object.defineProperty(Bn,\"__esModule\",{value:!0}),Bn.ColumnOrRow=Bn.TabStack=Bn.LayoutNode=void 0;const ni=Gn,ii=Jn;class ri{constructor(e,t){Zn.set(this,void 0),this.isRoot=()=>ti(this,Zn,\"f\").isRoot(this.entityId),this.exists=()=>ti(this,Zn,\"f\").exists(this.entityId),this.getParent=async()=>{const e=await ti(this,Zn,\"f\").getParent(this.entityId);if(e)return ri.getEntity(e,ti(this,Zn,\"f\"))},this.createAdjacentStack=async(e,t)=>{const n=await ti(this,Zn,\"f\").createAdjacentStack(this.entityId,e,t);return ri.getEntity({entityId:n,type:\"stack\"},ti(this,Zn,\"f\"))},this.getAdjacentStacks=async e=>(await ti(this,Zn,\"f\").getAdjacentStacks({targetId:this.entityId,edge:e})).map((e=>ri.getEntity({type:\"stack\",entityId:e.entityId},ti(this,Zn,\"f\")))),ei(this,Zn,e,\"f\"),this.entityId=t}}Bn.LayoutNode=ri,Zn=new WeakMap,ri.newLayoutEntitiesClient=async(e,t,n)=>{const i=(0,ii.createRelayedDispatch)(e,n,\"layout-relay\",\"You are trying to interact with a layout component on a window that does not exist or has been destroyed.\");return new ni.ApiConsumer(new ni.ChannelsConsumer({dispatch:i})).consume({id:t})},ri.getEntity=(e,t)=>{const{entityId:n,type:i}=e;switch(i){case\"column\":case\"row\":return new si(t,n,i);case\"stack\":return new oi(t,n);default:throw new Error(`Unrecognised Layout Entity encountered ('${JSON.stringify(e)})`)}};class oi extends ri{constructor(e,t){super(e,t),Qn.set(this,void 0),this.type=\"stack\",this.getViews=()=>ti(this,Qn,\"f\").getStackViews(this.entityId),this.addView=async(e,t={index:0})=>ti(this,Qn,\"f\").addViewToStack(this.entityId,e,t),this.removeView=async e=>{await ti(this,Qn,\"f\").removeViewFromStack(this.entityId,e)},this.setActiveView=async e=>{await ti(this,Qn,\"f\").setStackActiveView(this.entityId,e)},ei(this,Qn,e,\"f\")}}Bn.TabStack=oi,Qn=new WeakMap;class si extends ri{constructor(e,t,n){super(e,t),Xn.set(this,void 0),this.getContent=async()=>(await ti(this,Xn,\"f\").getContent(this.entityId)).map((e=>ri.getEntity(e,ti(this,Xn,\"f\")))),ei(this,Xn,e,\"f\"),this.type=n}}Bn.ColumnOrRow=si,Xn=new WeakMap;var ai={};Object.defineProperty(ai,\"__esModule\",{value:!0}),ai.DEFAULT_LAYOUT_KEY=ai.LAYOUT_CONTROLLER_ID=void 0,ai.LAYOUT_CONTROLLER_ID=\"layout-entities\",ai.DEFAULT_LAYOUT_KEY=\"__default__\";var ci,di,hi,li=s&&s.__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)};Object.defineProperty(Ln,\"__esModule\",{value:!0}),Ln.Layout=void 0;const ui=G,pi=O,wi=d,yi=Tn,fi=Bn,gi=ai;class mi extends wi.Base{static getClient(e){return li(e,di,\"f\").getValue()}constructor(e,t){super(t),ci.add(this),di.set(this,new ui.Lazy((async()=>fi.LayoutNode.newLayoutEntitiesClient(await this.platform.getClient(),gi.LAYOUT_CONTROLLER_ID,this.identity)))),this.replace=async e=>{this.wire.sendAction(\"layout-replace\").catch((e=>{}));const t=await this.platform.getClient();await t.dispatch(\"replace-layout\",{target:this.identity,opts:{layout:e}})},this.replaceView=async(e,t)=>{this.wire.sendAction(\"layout-replace-view\").catch((e=>{}));const n=await this.platform.getClient();await n.dispatch(\"replace-view\",{target:this.identity,opts:{viewToReplace:e,newView:t}})},this.applyPreset=async e=>{this.wire.sendAction(\"layout-apply-preset\").catch((e=>{}));const t=await this.platform.getClient(),{presetType:n}=e;if(!n||!(0,yi.isValidPresetType)(n))throw new Error(\"Cannot apply preset layout, please include an applicable presetType property in the PresetLayoutOptions.\");await t.dispatch(\"apply-preset-layout\",{target:this.identity,opts:{presetType:n}})};const n=(0,pi.validateIdentity)(e);if(n)throw new Error(n);this.identity=e,this.platform=this.fin.Platform.wrapSync({uuid:e.uuid}),e.uuid===this.fin.me.uuid&&e.name===this.fin.me.name&&(this.init=this.fin.Platform.Layout.init)}async getConfig(){this.wire.sendAction(\"layout-get-config\").catch((e=>{}));return(await this.platform.getClient()).dispatch(\"get-frame-snapshot\",{target:this.identity})}async getCurrentViews(){this.wire.sendAction(\"layout-get-views\").catch((e=>{}));const e=await this.platform.getClient();return(await e.dispatch(\"get-layout-views\",{target:this.identity})).map((e=>this.fin.View.wrapSync(e)))}async getRootItem(){this.wire.sendAction(\"layout-get-root-item\").catch((()=>{}));const e=await li(this,di,\"f\").getValue(),t=await e.getRoot(\"layoutName\"in this.identity?this.identity:void 0);return fi.LayoutNode.getEntity(t,e)}async getStackByViewIdentity(e){this.wire.sendAction(\"layout-get-stack-by-view\").catch((()=>{}));const t=await li(this,di,\"f\").getValue(),n=await t.getStackByView(e);if(!n)throw new Error(`No stack found for view: ${e.uuid}/${e.name}`);return fi.LayoutNode.getEntity(n,t)}async addView(e,{location:t,targetView:n}={}){this.wire.sendAction(\"layout-add-view\").catch((e=>{}));const{identity:i}=await li(this,ci,\"m\",hi).call(this,\"layout-add-view\",{viewOptions:e,location:t,targetView:n});return{identity:i}}async closeView(e){this.wire.sendAction(\"layout-close-view\").catch((e=>{})),await li(this,ci,\"m\",hi).call(this,\"layout-close-view\",{viewIdentity:e})}}Ln.Layout=mi,di=new WeakMap,ci=new WeakSet,hi=async function(e,t){return(await this.platform.getClient()).dispatch(e,{target:this.identity,opts:t})};var vi,Ci,bi,Ii,Ei,xi=s&&s.__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)},Ai=s&&s.__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};Object.defineProperty(kn,\"__esModule\",{value:!0}),kn.LayoutModule=void 0;const Pi=d,Mi=Ln,_i=ai;class Oi extends Pi.Base{constructor(){super(...arguments),vi.add(this),Ci.set(this,!1),bi.set(this,null),this.init=async(e={})=>{if(this.wire.sendAction(\"layout-init\").catch((e=>{})),!this.wire.environment.layoutAllowedInContext(this.fin))throw new Error(\"Layout.init can only be called from a Window context.\");if(xi(this,Ci,\"f\"))throw new Error(\"Layout.init was already called, please use Layout.create to add additional layouts.\");\"openfin\"===this.wire.environment.type&&await this.fin.Platform.getCurrentSync().getClient(),Ai(this,Ci,!0,\"f\"),Ai(this,bi,await this.wire.environment.initLayoutManager(this.fin,this.wire,e),\"f\"),await this.wire.environment.applyLayoutSnapshot(this.fin,xi(this,bi,\"f\"),e);const t={name:this.fin.me.name,uuid:this.fin.me.uuid};if(!e.layoutManagerOverride){const e={layoutName:_i.DEFAULT_LAYOUT_KEY,...t};return xi(this,Ii,\"f\").call(this,e)}return this.wrapSync(t)},Ii.set(this,(e=>{const t=\"[Layout] You are using a deprecated property `layoutManager` - it will throw if you access it starting in v37.\",n=new Proxy({},{get(e,n){throw console.warn(`[Layout-mgr-proxy] accessing ${n.toString()}`),new Error(t)}}),i=Object.assign(this.wrapSync(e),{layoutManager:n});return new Proxy(i,{get(e,n){if(\"layoutManager\"===n)throw console.warn(`[Layout-proxy] accessing ${n.toString()}`),new Error(t);return e[n]}})})),this.getCurrentLayoutManagerSync=()=>xi(this,vi,\"m\",Ei).call(this,\"fin.Platform.Layout.getCurrentLayoutManagerSync()\"),this.create=async e=>this.wire.environment.createLayout(xi(this,vi,\"m\",Ei).call(this,\"fin.Platform.Layout.create()\"),e),this.destroy=async e=>this.wire.environment.destroyLayout(xi(this,vi,\"m\",Ei).call(this,\"fin.Platform.Layout.destroy()\"),e)}async wrap(e){return this.wire.sendAction(\"layout-wrap\").catch((e=>{})),new Mi.Layout(e,this.wire)}wrapSync(e){return this.wire.sendAction(\"layout-wrap-sync\").catch((e=>{})),new Mi.Layout(e,this.wire)}async getCurrent(){if(this.wire.sendAction(\"layout-get-current\").catch((e=>{})),\"openfin\"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error(\"You are not in a Window context. Only Windows can have a Layout.\");const{uuid:e,name:t}=this.fin.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction(\"layout-get-current-sync\").catch((e=>{})),\"openfin\"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error(\"You are not in a Window context. Only Windows can have a Layout.\");const{uuid:e,name:t}=this.fin.me;return this.wrapSync({uuid:e,name:t})}async getLayoutByViewIdentity(e){this.wire.sendAction(\"layout-get-by-view-identity\").catch((()=>{}));let t=await this.wire.environment.getViewWindowIdentity(this.fin,e);t.identity&&(t=t.identity);try{const n=this.wrapSync(t),i=await Mi.Layout.getClient(n),r=await i.getLayoutIdentityForViewOrThrow(e);return this.wrapSync(r)}catch(n){if(![\"No action registered at target for\",\"getLayoutIdentityForViewOrThrow is not a function\"].some((e=>n.message.includes(e))))throw n;if(t.uuid===t.name)throw new Error(`View identity ${JSON.stringify(e)} is not attached to any layout in provider window ${JSON.stringify(t)}.`);return this.wrapSync(t)}}}kn.LayoutModule=Oi,Ci=new WeakMap,bi=new WeakMap,Ii=new WeakMap,vi=new WeakSet,Ei=function(e){if(!xi(this,bi,\"f\"))throw new Error(`You must call init before using the API ${e}`);return xi(this,bi,\"f\")},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(kn,e),n(Ln,e)}(jn),Object.defineProperty(Pn,\"__esModule\",{value:!0}),Pn.PlatformModule=void 0;const Si=d,Ri=Mn,Fi=jn;class ji extends Si.Base{constructor(e,t){super(e),this._channel=t,this.Layout=new Fi.LayoutModule(this.wire)}async init(e){if(!fin.__internal_.isPlatform||fin.me.name!==fin.me.uuid)throw new Error(\"fin.Platform.init should only be called from a custom platform provider running in the main window of the application.\");return this.wire.environment.initPlatform(this.fin,e)}async wrap(e){return this.wire.sendAction(\"platform-wrap\").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}wrapSync(e){return this.wire.sendAction(\"platform-wrap-sync\").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}async getCurrent(){return this.wire.sendAction(\"platform-get-current\").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction(\"platform-get-current-sync\").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}start(e){return this.wire.sendAction(\"platform-start\").catch((e=>{})),new Promise((async(t,n)=>{try{const{uuid:n}=e,i=await this.fin.Application._create({...e,isPlatformController:!0});i.once(\"platform-api-ready\",(()=>t(this.wrapSync({uuid:n})))),i._run({uuid:n})}catch(e){n(e)}}))}startFromManifest(e,t){return this.wire.sendAction(\"platform-start-from-manifest\").catch((e=>{})),new Promise((async(n,i)=>{try{const i=await this.fin.Application._createFromManifest(e);i.once(\"platform-api-ready\",(()=>n(this.wrapSync({uuid:i.identity.uuid})))),i._run(t)}catch(e){i(e)}}))}}Pn.PlatformModule=ji,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Pn,e),n(Mn,e)}(An);var ki={};!function(e){Object.defineProperty(e,\"__esModule\",{value:!0}),e.getMe=e.getBaseMe=e.environmentUnsupportedMessage=void 0;const t=J(),n=un,i=ie(),r=rn;function o(e,t,n){return{...{isView:\"view\"===e,isWindow:\"window\"===e,isFrame:\"iframe\"===e,isExternal:\"external connection\"===e},uuid:t,name:n,entityType:e}}e.environmentUnsupportedMessage=\"You are not running in OpenFin.\",e.getBaseMe=o,e.getMe=function(s){const{uuid:a,name:c,entityType:d}=s.me,h={setContext(){throw new Error(e.environmentUnsupportedMessage)},addContextHandler(){throw new Error(e.environmentUnsupportedMessage)},getContextGroups(){throw new Error(e.environmentUnsupportedMessage)},joinContextGroup(){throw new Error(e.environmentUnsupportedMessage)},removeFromContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getAllClientsInContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getInfoForContextGroup(){throw new Error(e.environmentUnsupportedMessage)}},l=\"Interop API has not been instantiated. Either connection has failed or you have not declared interop in your config.\",u={setContext(){throw new Error(l)},addContextHandler(){throw new Error(l)},getContextGroups(){throw new Error(l)},joinContextGroup(){throw new Error(l)},removeFromContextGroup(){throw new Error(l)},getAllClientsInContextGroup(){throw new Error(l)},getInfoForContextGroup(){throw new Error(l)}},p={eventNames:()=>{throw new Error(e.environmentUnsupportedMessage)},emit:()=>{throw new Error(e.environmentUnsupportedMessage)},listeners:()=>{throw new Error(e.environmentUnsupportedMessage)},listenerCount:()=>{throw new Error(e.environmentUnsupportedMessage)},on:()=>{throw new Error(e.environmentUnsupportedMessage)},addListener:()=>{throw new Error(e.environmentUnsupportedMessage)},once:()=>{throw new Error(e.environmentUnsupportedMessage)},prependListener:()=>{throw new Error(e.environmentUnsupportedMessage)},prependOnceListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeAllListeners:()=>{throw new Error(e.environmentUnsupportedMessage)}};switch(d){case\"view\":return Object.assign(new t.View(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case\"window\":return Object.assign(new i._Window(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case\"iframe\":return Object.assign(new n._Frame(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case\"external connection\":return Object.assign(new r.ExternalApplication(s,{uuid:a}),o(d,a,c),{interop:u,isOpenFin:!1});default:return{...o(d,a,c),...p,interop:h,isOpenFin:!1}}}}(ki);var Li={},Ti={},$i={};Object.defineProperty($i,\"__esModule\",{value:!0}),$i.createWarningObject=$i.createUnusableObject=void 0,$i.createUnusableObject=function(e){const t=()=>{throw new Error(e)};return new Proxy({},{apply:t,construct:t,defineProperty:t,deleteProperty:t,get:t,getOwnPropertyDescriptor:t,getPrototypeOf:t,has:t,isExtensible:t,ownKeys:t,preventExtensions:t,set:t,setPrototypeOf:t})},$i.createWarningObject=function(e,t){return new Proxy(t,{get:(...t)=>(console.warn(e),Reflect.get(...t)),set:(...t)=>(console.warn(e),Reflect.set(...t)),getOwnPropertyDescriptor:(...t)=>(console.warn(e),Reflect.getOwnPropertyDescriptor(...t)),ownKeys:(...t)=>(console.warn(e),Reflect.ownKeys(...t))})};var Bi,Gi={},Wi={};var Hi={};!function(e){Object.defineProperty(e,\"__esModule\",{value:!0}),e.wrapIntentHandler=e.BROKER_ERRORS=e.generateOverrideWarning=e.generateOverrideError=e.wrapContextHandler=e.wrapInTryCatch=e.generateId=void 0;e.generateId=()=>`${Math.random()}${Date.now()}`;e.wrapInTryCatch=(e,t)=>(...n)=>{try{return e(...n)}catch(e){throw new Error((t||\"\")+e)}};e.wrapContextHandler=(e,t)=>async n=>{try{await e(n)}catch(e){throw console.error(`Error thrown by handler ${t} for context type ${n.type}: ${e}`),e}};e.generateOverrideError=(e,t)=>`You have tried to to use ${e} but ${t} has not been overridden in the Interop Broker. Please override this function. Refer to our documentation for more info.`;e.generateOverrideWarning=(e,t,n,i)=>{const{uuid:r,name:o}=n;return i?`Entity with identity: ${r}/${o} has called ${i} or ${e} but ${t} has not been overridden.`:`Entity with identity: ${r}/${o} has called ${e} but ${t} has not been overridden.`},e.BROKER_ERRORS={fireIntent:(0,e.generateOverrideError)(\"fireIntent\",\"handleFiredIntent\"),fireIntentForContext:(0,e.generateOverrideError)(\"fireIntentForContext\",\"handleFiredIntentForContext\"),getInfoForIntent:(0,e.generateOverrideError)(\"getInfoForIntent\",\"handleInfoForIntent\"),getInfoForIntentsByContext:(0,e.generateOverrideError)(\"getInfoForIntentsByContext\",\"handleInfoForIntentsByContext\"),joinSessionContextGroupWithJoinContextGroup:\"The Context Group you have tried to join is a Session Context Group. Custom Context Groups can only be defined by the Interop Broker through code or manifest configuration. Please use joinSessionContextGroup.\",fdc3Open:(0,e.generateOverrideError)(\"fdc3.open\",\"fdc3HandleOpen\"),fdc3FindInstances:(0,e.generateOverrideError)(\"fdc3.findInstances\",\"fdc3HandleFindInstances\"),fdc3GetAppMetadata:(0,e.generateOverrideError)(\"fdc3.getAppMetadata\",\"fdc3HandleGetAppMetadata\"),fdc3GetInfo:(0,e.generateOverrideError)(\"fdc3.getInfo\",\"fdc3HandleGetInfo\")};e.wrapIntentHandler=(e,t)=>async n=>{try{return e(n)}catch(e){throw console.error(`Error thrown by handler ${t}: ${e}`),e}}}(Hi);var Ni,Di,Ui={};function Vi(){if(Di)return Gi;Di=1;var e,t,n,r=s&&s.__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},o=s&&s.__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)},a=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Gi,\"__esModule\",{value:!0}),Gi.InteropBroker=void 0;const c=d,h=a(function(){if(Bi)return Wi;Bi=1,Object.defineProperty(Wi,\"__esModule\",{value:!0});const e=Cr();return Wi.default=class{constructor(e,t){this.provider=e,this.id=t,this.lastContext=void 0,this.contextGroupMap=new Map,this.clients=new Map,this.registerListeners()}registerListeners(){this.provider.register(`sessionContextGroup:getContext-${this.id}`,this.getCurrentContext.bind(this)),this.provider.register(`sessionContextGroup:setContext-${this.id}`,this.setContext.bind(this)),this.provider.register(`sessionContextGroup:handlerAdded-${this.id}`,this.handlerAdded.bind(this)),this.provider.register(`sessionContextGroup:handlerRemoved-${this.id}`,this.handlerRemoved.bind(this))}getCurrentContext(e){return e.type?this.contextGroupMap.get(e.type):this.lastContext}setContext(t,n){const{context:i}=t,r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name} not in Session Client State Map`);this.contextGroupMap.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{e.contextHandlers.get(i.type)?.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getClientState(e){return this.clients.get(e.endpointId)}async handlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(i){const e=r.contextHandlers.get(i)||[];r.contextHandlers.set(i,[...e,n]);const o=this.contextGroupMap.get(i);o&&await this.provider.dispatch(t,n,o)}else{r.globalHandler=n;const e=[...this.contextGroupMap.keys()].map((async e=>{const i=this.contextGroupMap.get(e);i&&await this.provider.dispatch(t,n,i)}));await Promise.all(e)}}handlerRemoved(e,t){const{handlerId:n}=e,i=this.clients.get(t.endpointId);i?(Array.from(i.contextHandlers).forEach((([,e])=>{const t=e.indexOf(n);t>-1&&e.splice(t,1)})),i.globalHandler===n&&(i.globalHandler=void 0)):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={contextHandlers:new Map,clientIdentity:e,globalHandler:void 0};this.clients.set(e.endpointId,t)}}onDisconnection(e){this.clients.delete(e.endpointId)}},Wi}()),l=Hi,u=a(i),p=function(){if(Ni)return Ui;Ni=1,Object.defineProperty(Ui,\"__esModule\",{value:!0}),Ui.PrivateChannelProvider=void 0;const e=Vi();return Ui.PrivateChannelProvider=class t{constructor(e,t){this.provider=e,this.id=t,this.clients=new Map,this.registerListeners(),this.contextByContextType=new Map,this.lastContext=void 0,this.provider.onConnection((e=>this.registerNewClient(e))),this.provider.onDisconnection((async e=>{const{endpointId:t}=e;this.clients.has(t)&&await this.handleClientDisconnecting(e),0===(await this.provider.getAllClientInfo()).length&&this.provider.destroy()}))}getClientState(e){return this.clients.get(e.endpointId)}registerListeners(){this.provider.register(\"broadcast\",this.broadcast.bind(this)),this.provider.register(\"getCurrentContext\",this.getCurrentContext.bind(this)),this.provider.register(\"contextHandlerAdded\",this.contextHandlerAdded.bind(this)),this.provider.register(\"contextHandlerRemoved\",this.contextHandlerRemoved.bind(this)),this.provider.register(\"nonStandardHandlerRemoved\",this.nonStandardHandlerRemoved.bind(this)),this.provider.register(\"onAddContextHandlerAdded\",this.onAddContextHandlerAdded.bind(this)),this.provider.register(\"onDisconnectHandlerAdded\",this.onDisconnectHandlerAdded.bind(this)),this.provider.register(\"onUnsubscribeHandlerAdded\",this.onUnsubscribeHandlerAdded.bind(this)),this.provider.register(\"clientDisconnecting\",((e,t)=>{this.handleClientDisconnecting(t)}))}broadcast(t,n){const{context:i}=t;if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name}, tried to call broadcast, is not connected to this Private Channel`);const r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to broadcast - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);this.contextByContextType.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{const t=e.handlerIdsByContextTypes.get(i.type);t&&t.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getCurrentContext(e,t){const{contextType:n}=e;if(!this.getClientState(t))throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call getCurrentContext, is not connected to this Private Channel`);if(void 0!==n){return this.contextByContextType.get(n)||null}return this.lastContext?this.lastContext:null}contextHandlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call addContextListener, is not connected to this Private Channel`);if(i){const e=r.handlerIdsByContextTypes.get(i)||[];r.handlerIdsByContextTypes.set(i,[...e,n])}else r.globalHandler=n;Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&e.onAddContextListenerHandlerId&&this.provider.dispatch(e.clientIdentity,e.onAddContextListenerHandlerId,i)}))}async contextHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);if(i){let e;if(i.globalHandler===n)i.globalHandler=void 0;else for(const[t,r]of i.handlerIdsByContextTypes){const i=r.indexOf(n);i>-1&&(r.splice(i,1),e=t)}const r=(await this.getConnectedClients()).map((async n=>{const{clientIdentity:i,clientIdentity:{endpointId:r},onUnsubscribeHandlerId:o}=n;r!==t.endpointId&&o&&await this.provider.dispatch(i,o,e)}));try{await Promise.all(r)}catch(e){throw console.error(`Problem when attempting to dispatch to onUnsubscribeHandlers. Error: ${e} Removing Client: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}`),new Error(e)}}else console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}.`)}nonStandardHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);i?i.onDisconnectHandlerId===n?i.onDisconnectHandlerId=void 0:i.onAddContextListenerHandlerId===n?i.onAddContextListenerHandlerId=void 0:i.onUnsubscribeHandlerId===n&&(i.onUnsubscribeHandlerId=void 0):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}onAddContextHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onAddContextListener, is not connected to this Private Channel`);n.onAddContextListenerHandlerId=i,Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&Array.from(e.handlerIdsByContextTypes.keys()).forEach((e=>{this.provider.dispatch(t,i,e)}))}))}onDisconnectHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onDisconnect, is not connected to this Private Channel`);n.onDisconnectHandlerId=i}onUnsubscribeHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onUnsubscribe, is not connected to this Private Channel`);n.onUnsubscribeHandlerId=i}removeClient(e){const t=this.getClientState(e);if(!t)throw new Error(`Client with Identity: ${e.uuid} ${e.name}, tried to call disconnect, is not connected to this Private Channel`);t.handlerIdsByContextTypes.clear(),this.clients.delete(e.endpointId)}async fireOnDisconnectForOtherClients(e){const{endpointId:t}=e,n=(await this.getConnectedClients()).map((async e=>{const{clientIdentity:{endpointId:n},onDisconnectHandlerId:i}=e;n!==t&&i&&await this.provider.dispatch(e.clientIdentity,i)}));try{await Promise.all(n)}catch(t){throw console.error(`Problem when attempting to dispatch to onDisconnectHandlers. Error: ${t} Disconnecting Client: uuid: ${e.uuid}. name: ${e.name}. endpointId: ${e.endpointId}`),new Error(t)}}async unsubscribeAll(e){const{endpointId:t}=e,n=this.clients.get(t);if(n){const t=Array.from(n.handlerIdsByContextTypes.values()).flat(),i=n.globalHandler;if(t.length>0){const n=t.map((async t=>this.contextHandlerRemoved({handlerId:t},e)));try{await Promise.all(n)}catch(e){console.error(e.message)}}if(i)try{await this.contextHandlerRemoved({handlerId:i},e)}catch(e){console.error(e.message)}}}async handleClientDisconnecting(e){await this.unsubscribeAll(e),this.removeClient(e),await this.fireOnDisconnectForOtherClients(e)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={clientIdentity:e,handlerIdsByContextTypes:new Map,globalHandler:void 0,onAddContextListenerHandlerId:void 0,onUnsubscribeHandlerId:void 0,onDisconnectHandlerId:void 0};this.clients.set(e.endpointId,t)}}async getConnectedClients(){const e=await this.provider.getAllClientInfo();return Array.from(this.clients.values()).filter((t=>{const{uuid:n,name:i}=t.clientIdentity;return e.some((e=>i===e.name&&n===e.uuid))}))}static init(e,n){return new t(e,n)}},Ui}(),w=G,y=[{id:\"green\",displayMetadata:{color:\"#00CC88\",name:\"green\"}},{id:\"purple\",displayMetadata:{color:\"#8C61FF\",name:\"purple\"}},{id:\"orange\",displayMetadata:{color:\"#FF8C4C\",name:\"orange\"}},{id:\"red\",displayMetadata:{color:\"#FF5E60\",name:\"red\"}},{id:\"pink\",displayMetadata:{color:\"#FF8FB8\",name:\"pink\"}},{id:\"yellow\",displayMetadata:{color:\"#E9FF8F\",name:\"yellow\"}}];let f=class i extends c.Base{constructor(i,s,a){super(i),e.set(this,void 0),t.set(this,void 0),n.set(this,void 0),this.getProvider=()=>o(this,n,\"f\").getValue(),this.interopClients=new Map,this.contextGroupsById=new Map,r(this,t,a.contextGroups??[...y],\"f\"),r(this,e,a.fdc3Info,\"f\"),a?.logging&&(this.logging=a.logging),this.intentClientMap=new Map,this.lastContextMap=new Map,this.sessionContextGroupMap=new Map,r(this,n,new w.Lazy(s),\"f\"),this.setContextGroupMap(),this.setupChannelProvider()}static createClosedConstructor(...e){return class extends i{constructor(...t){if(t.length){const[n,i,r]=t;if(r&&\"object\"==typeof r&&!(0,u.default)(r,e[2]))return console.warn(\"You have modified the parameters of the InteropOverride constructor. This behavior is deprecated and will be removed in a future version. You can modify these options in your manifest. Please consult our Interop docs for guidance on migrating to the new override scheme.\"),void super(e[0],e[1],r);console.warn(\"You are attempting to pass arguments to the InteropOverride constructor. This is not necessary, and these passed arguments will be ignored. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.\")}super(...e)}}}setContext({context:e},t){this.wire.sendAction(\"interop-broker-set-context\").catch((e=>{}));const n=this.getClientState(t);if(!n||!n.contextGroupId)throw n?new Error(\"You must join a context group before you can set context.\"):new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);{const{contextGroupId:t}=n;this.setContextForGroup({context:e},t)}}setContextForGroup({context:e},t){this.wire.sendAction(\"interop-broker-set-context-for-group\").catch((e=>{}));const n=this.contextGroupsById.get(t);if(!n)throw new Error(`Unable to set context for context group that isn't in the context group mapping: ${t}.`);const r=i.checkContextIntegrity(e);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(e)}`);const o=e.type;n.set(o,e),this.lastContextMap.set(t,o);Array.from(this.interopClients.values()).filter((e=>e.contextGroupId===t)).forEach((t=>{for(const[,n]of t.contextHandlers)i.isContextTypeCompatible(o,n.contextType)&&this.invokeContextHandler(t.clientIdentity,n.handlerId,e)}))}getCurrentContext(e,t){this.wire.sendAction(\"interop-broker-get-current-context\").catch((e=>{}));const n=this.getClientState(t);if(!n?.contextGroupId)throw new Error(\"You must be a member of a context group to call getCurrentContext\");const{contextGroupId:i}=n,r=this.contextGroupsById.get(i),o=this.lastContextMap.get(i),s=e?.contextType??o;return r&&s?r.get(s):void 0}async joinContextGroup({contextGroupId:e,target:t},n){if(this.wire.sendAction(\"interop-broker-join-context-group\").catch((e=>{})),this.sessionContextGroupMap.has(e))throw new Error(l.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup);if(t){i.hasEndpointId(t)&&await this.addClientToContextGroup({contextGroupId:e},t);try{const n=this.channel.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name));if(!n.length)throw new Error(`Given Identity ${t.uuid} ${t.name} is not connected to the Interop Broker.`);n.length>1&&console.warn(`More than one connection found for identity ${t.uuid} ${t.name}`);const i=[];for(const t of n)i.push(this.addClientToContextGroup({contextGroupId:e},t));await Promise.all(i)}catch(e){throw new Error(e)}}else await this.addClientToContextGroup({contextGroupId:e},n)}async addClientToContextGroup({contextGroupId:e},t){this.wire.sendAction(\"interop-broker-add-client-to-context-group\").catch((e=>{}));const n=this.getClientState(t);if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(!this.getContextGroups().find((t=>t.id===e)))throw new Error(`Attempting to join a context group that does not exist: ${e}. You may only join existing context groups.`);if(n.contextGroupId!==e){n.contextGroupId=e,await this.setCurrentContextGroupInClientOptions(t,e);const i=this.contextGroupsById.get(e);for(const[,e]of n.contextHandlers){const{contextType:n,handlerId:r}=e;if(void 0===n)i.forEach(((e,n)=>{this.invokeContextHandler(t,r,e)}));else if(i.has(n)){const e=i.get(n);e&&this.invokeContextHandler(t,r,e)}}}}async removeFromContextGroup({target:e},t){if(this.wire.sendAction(\"interop-broker-remove-from-context-group\").catch((e=>{})),e){i.hasEndpointId(e)&&await this.removeClientFromContextGroup(e);try{const t=this.channel.connections.filter((t=>t.uuid===e.uuid&&t.name===e.name));if(!t.length)throw new Error(`No connection found for given Identity ${e.uuid} ${e.name}`);t.length>1&&console.warn(`More than one connection found for identity ${e.uuid} ${e.name}`);const n=[];for(const e of t)n.push(this.removeClientFromContextGroup(e));await Promise.all(n)}catch(e){throw new Error(e)}}else await this.removeClientFromContextGroup(t)}async removeClientFromContextGroup(e){this.wire.sendAction(\"interop-broker-remove-client-from-context-group\").catch((e=>{}));const t=this.getClientState(e);t&&(t.contextGroupId=void 0),await this.setCurrentContextGroupInClientOptions(e,null)}getContextGroups(){return this.wire.sendAction(\"interop-broker-get-context-groups\").catch((e=>{})),o(this,t,\"f\").map((e=>({...e})))}getInfoForContextGroup({contextGroupId:e}){return this.wire.sendAction(\"interop-broker-get-info-for-context-group\").catch((e=>{})),this.getContextGroups().find((t=>t.id===e))}getAllClientsInContextGroup({contextGroupId:e}){this.wire.sendAction(\"interop-broker-get-all-clients-in-context-group\").catch((e=>{}));return Array.from(this.interopClients.values()).filter((t=>t.contextGroupId===e)).map((e=>e.clientIdentity))}async handleFiredIntent(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.raiseIntent\",\"InteropBroker.handleFiredIntent\",t,\"interopClient.fireIntent\");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntent)}async setIntentTarget(e,t){this.wire.sendAction(\"interop-broker-set-intent-target\").catch((e=>{}));const n=this.intentClientMap.get(t.name),i=`intent-handler-${e.name}`;if(n){const t=n.get(i);if(t){if(t.pendingIntents.push(e),t.clientIdentity&&t.isReady){const{clientIdentity:e,pendingIntents:n}=t;try{const r=n[n.length-1];await this.invokeIntentHandler(e,i,r),t.pendingIntents=[]}catch(n){console.error(`Error invoking intent handler for client ${e.uuid}/${e.name}/${e.endpointId}`),t.isReady=!1}}}else n.set(i,{isReady:!1,pendingIntents:[e]})}else{this.intentClientMap.set(t.name,new Map);const n=this.intentClientMap.get(t.name);n&&n.set(i,{isReady:!1,pendingIntents:[e]})}}async handleInfoForIntent(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.findIntent\",\"InteropBroker.handleInfoForIntent\",t,\"interopClient.getInfoForIntent\");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntent)}async handleInfoForIntentsByContext(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.findIntentsByContext\",\"InteropBroker.handleInfoForIntentsByContext\",t,\"interopClient.getInfoForIntentsByContext\");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntentsByContext)}async handleFiredIntentForContext(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.raiseIntentForContext\",\"InteropBroker.handleFiredIntentForContext\",t,\"interopClient.fireIntentForContext\");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntentForContext)}async clientDisconnected(e){}async fdc3HandleOpen({app:e,context:t},n){const i=(0,l.generateOverrideWarning)(\"fdc3.open\",\"InteropBroker.fdc3HandleOpen\",n);throw console.warn(i),new Error(l.BROKER_ERRORS.fdc3Open)}async fdc3HandleFindInstances(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.open\",\"InteropBroker.fdc3HandleFindInstances\",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3FindInstances)}async fdc3HandleGetAppMetadata(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.getAppMetadata\",\"InteropBroker.fdc3HandleGetAppMetadata\",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3GetAppMetadata)}async invokeContextHandler(e,t,n){const i=await this.getProvider();try{await i.dispatch(e,t,n)}catch(i){console.error(`Error invoking context handler ${t} for context type ${n.type} in client ${e.uuid}/${e.name}/${e.endpointId}`,i)}}async invokeIntentHandler(e,t,n){const i=await this.getProvider();await i.dispatch(e,t,n)}async fdc3HandleGetInfo(t,n){const{fdc3Version:i}=t;return{fdc3Version:i,...o(this,e,\"f\"),optionalFeatures:{OriginatingAppMetadata:!1,UserChannelMembershipAPIs:!0},appMetadata:{appId:\"\",instanceId:\"\"}}}async getAllClientInfo(){return(await this.getProvider()).getAllClientInfo()}decorateSnapshot(e){return{...e,interopSnapshotDetails:{contextGroupStates:this.getContextGroupStates()}}}applySnapshot(e,t){const n=e?.interopSnapshotDetails?.contextGroupStates;n&&(t?.closeExistingWindows||this.updateExistingClients(n),this.rehydrateContextGroupStates(n))}updateExistingClients(e){this.interopClients.forEach((t=>{const{clientIdentity:n,contextGroupId:r,contextHandlers:o}=t;if(r){const t=e[r];for(const[,e]of Object.entries(t))o.forEach((t=>{const{handlerId:r,contextType:o}=t;i.isContextTypeCompatible(e.type,o)&&this.invokeContextHandler(n,r,e)}))}}))}getContextGroupStates(){return i.toObject(this.contextGroupsById)}rehydrateContextGroupStates(e){const t=Object.entries(e);for(const[e,n]of t){const t=Object.entries(n);for(const[n,i]of t)if(this.contextGroupsById.has(e)){this.contextGroupsById.get(e).set(n,i)}else console.warn(`Attempting to set a context group that isn't in the context group mapping. Skipping context group rehydration for: ${e}`)}}contextHandlerRegistered({contextType:e,handlerId:t},n){const i={contextType:e,handlerId:t},r=this.getClientState(n);if(r?.contextHandlers.set(t,i),r&&r.contextGroupId){const{contextGroupId:i}=r,o=this.contextGroupsById.get(i);if(void 0===e)o.forEach(((e,i)=>{this.invokeContextHandler(n,t,e)}));else if(o.has(e)){const i=o.get(e);i&&this.invokeContextHandler(n,t,i)}}}async intentHandlerRegistered(e,t){const{handlerId:n}=e,i=this.intentClientMap.get(t.name),r=i?.get(n);if(i)if(r){const{pendingIntents:e}=r;r.clientIdentity=t,r.isReady=!0;try{if(e.length>0){const i=e[e.length-1];await this.invokeIntentHandler(t,n,i),r.pendingIntents=[]}}catch(e){console.error(`Error invoking intent handler: ${n} for client ${t.uuid}/${t.name}/${t.endpointId}`)}}else i.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t});else{this.intentClientMap.set(t.name,new Map);const e=this.intentClientMap.get(t.name);e&&e.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t})}}removeContextHandler({handlerId:e},t){const n=this.getClientState(t);n&&n.contextHandlers.delete(e)}handleJoinSessionContextGroup({sessionContextGroupId:e},t){try{if(!e)throw new Error(\"Failed to join session context group: must specify group id.\");const n=this.sessionContextGroupMap.get(e);if(n)n.registerNewClient(t);else{const n=new h.default(this.channel,e);n.registerNewClient(t),this.sessionContextGroupMap.set(e,n)}return{hasConflict:this.contextGroupsById.has(e)}}catch(e){throw new Error(e)}}getClientState(e){return this.interopClients.get(e.endpointId)}static toObject(e){const t=Object.fromEntries(e),n={};return Object.entries(t).forEach((([e,t])=>{const i=Object.fromEntries(t);n[e]=i})),n}static checkContextIntegrity(e){if(!e)return{isValid:!1,reason:\"No context supplied\"};if(\"object\"!=typeof e)return{isValid:!1,reason:\"Context must be an Object\"};if(!e.type)return{isValid:!1,reason:\"Context must have a type property\"};if(e.id&&\"object\"!=typeof e.id)return{isValid:!1,reason:\"Context id must be an Object populated with key-value identifiers (if set)\"};if(e.id){const{id:t}=e,n=Object.keys(t);let i=!1;if(!n.length)return{isValid:!1,reason:\"Context id must have at least one key-value identifier\"};if(n.forEach((e=>{\"string\"==typeof e&&\"string\"==typeof t[e]||(i=!0)})),i)return{isValid:!1,reason:\"Context id key-value identifiers must be of type string\"}}return e.name&&\"string\"!=typeof e.name?{isValid:!1,reason:\"Context name must be of string type (if set)\"}:{isValid:!0}}static hasEndpointId(e){return void 0!==e.endpointId}static isContextTypeCompatible(e,t){return void 0===t||e===t}setContextGroupMap(){for(const e of this.getContextGroups())this.contextGroupsById.set(e.id,new Map)}async setCurrentContextGroupInClientOptions(e,t){try{const n=await this.fin.System.getEntityInfo(e.uuid,e.name);let i;\"view\"===n.entityType?i=await this.fin.View.wrap(e):\"window\"===n.entityType&&(i=await this.fin.Window.wrap(e)),i&&await i.updateOptions({interop:{currentContextGroup:t}})}catch(e){}}async setupChannelProvider(){try{const e=await this.getProvider();this.channel=e,this.wireChannel(e)}catch(e){throw new Error(`Error setting up Interop Broker Channel Provider: ${e}`)}}wireChannel(e){e.onConnection((async(e,t)=>{if(!await this.isConnectionAuthorized(e,t))throw new Error(`Connection not authorized for ${e.uuid}, ${e.name}`);if(!e.endpointId)throw new Error(\"Version too old to be compatible with Interop. Please upgrade your runtime to a more recent version.\");const n={contextGroupId:void 0,contextHandlers:new Map,clientIdentity:e};t?.currentContextGroup&&this.contextGroupsById.has(t.currentContextGroup)&&(n.contextGroupId=t?.currentContextGroup),this.interopClients.set(e.endpointId,n)})),e.onDisconnection((e=>{this.interopClients.delete(e.endpointId);const t=this.intentClientMap.get(e.name);t&&e.uuid===this.fin.me.uuid&&t.forEach((e=>{e.isReady=!1})),this.sessionContextGroupMap.forEach((t=>{t.onDisconnection(e)})),this.clientDisconnected(e)})),e.beforeAction((async(e,t,n)=>{if(!await this.isActionAuthorized(e,t,n))throw new Error(`Action (${e}) not authorized for ${n.uuid}, ${n.name}`);this.logging?.beforeAction?.enabled&&console.log(e,t,n)})),e.afterAction(((e,t,n)=>{this.logging?.afterAction?.enabled&&console.log(e,t,n)})),e.register(\"setContext\",this.setContext.bind(this)),e.register(\"fireIntent\",this.handleFiredIntent.bind(this)),e.register(\"getCurrentContext\",this.getCurrentContext.bind(this)),e.register(\"getInfoForIntent\",this.handleInfoForIntent.bind(this)),e.register(\"getInfoForIntentsByContext\",this.handleInfoForIntentsByContext.bind(this)),e.register(\"fireIntentForContext\",this.handleFiredIntentForContext.bind(this)),e.register(\"getContextGroups\",this.getContextGroups.bind(this)),e.register(\"joinContextGroup\",this.joinContextGroup.bind(this)),e.register(\"removeFromContextGroup\",this.removeFromContextGroup.bind(this)),e.register(\"getAllClientsInContextGroup\",this.getAllClientsInContextGroup.bind(this)),e.register(\"getInfoForContextGroup\",this.getInfoForContextGroup.bind(this)),e.register(\"contextHandlerRegistered\",this.contextHandlerRegistered.bind(this)),e.register(\"intentHandlerRegistered\",this.intentHandlerRegistered.bind(this)),e.register(\"removeContextHandler\",this.removeContextHandler.bind(this)),e.register(\"sessionContextGroup:createIfNeeded\",this.handleJoinSessionContextGroup.bind(this)),e.register(\"fdc3Open\",this.fdc3HandleOpen.bind(this)),e.register(\"fdc3v2FindIntentsByContext\",this.handleInfoForIntentsByContext.bind(this)),e.register(\"fdc3FindInstances\",this.fdc3HandleFindInstances.bind(this)),e.register(\"fdc3GetAppMetadata\",this.fdc3HandleGetAppMetadata.bind(this)),e.register(\"fdc3v2GetInfo\",(async(e,t)=>this.fdc3HandleGetInfo.bind(this)(e,t))),e.register(\"createPrivateChannelProvider\",(async e=>{const{channelId:t}=e,n=await this.fin.InterApplicationBus.Channel.create(t);p.PrivateChannelProvider.init(n,t)}))}isConnectionAuthorized(e,t){return this.wire.sendAction(\"interop-broker-is-connection-authorized\").catch((e=>{})),Promise.resolve(!0)}isActionAuthorized(e,t,n){return this.wire.sendAction(\"interop-broker-is-action-authorized\").catch((e=>{})),Promise.resolve(!0)}};return Gi.InteropBroker=f,e=new WeakMap,t=new WeakMap,n=new WeakMap,Gi}var zi,Ki={},qi={},Ji=s&&s.__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},Yi=s&&s.__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)};Object.defineProperty(qi,\"__esModule\",{value:!0});const Zi=d,Qi=Hi;class Xi extends Zi.Base{constructor(e,t,n){super(e),zi.set(this,void 0),this.id=n,Ji(this,zi,t,\"f\")}async setContext(e){this.wire.sendAction(\"interop-session-context-group-set-context\").catch((e=>{}));return(await Yi(this,zi,\"f\")).dispatch(`sessionContextGroup:setContext-${this.id}`,{sessionContextGroupId:this.id,context:e})}async getCurrentContext(e){this.wire.sendAction(\"interop-session-context-group-get-context\").catch((e=>{}));return(await Yi(this,zi,\"f\")).dispatch(`sessionContextGroup:getContext-${this.id}`,{sessionContextGroupId:this.id,type:e})}async addContextHandler(e,t){if(this.wire.sendAction(\"interop-session-context-group-add-handler\").catch((e=>{})),\"function\"!=typeof e)throw new Error(\"Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.\");const n=await Yi(this,zi,\"f\");let i;return i=t?`sessionContextHandler:invoke-${this.id}-${t}-${(0,Qi.generateId)()}`:`sessionContextHandler:invoke-${this.id}`,n.register(i,(0,Qi.wrapContextHandler)(e,i)),await n.dispatch(`sessionContextGroup:handlerAdded-${this.id}`,{handlerId:i,contextType:t}),{unsubscribe:await this.createUnsubscribeCb(i)}}async createUnsubscribeCb(e){const t=await Yi(this,zi,\"f\");return async()=>{t.remove(e),await t.dispatch(`sessionContextGroup:handlerRemoved-${this.id}`,{handlerId:e})}}getUserInstance(){return{id:this.id,setContext:(0,Qi.wrapInTryCatch)(this.setContext.bind(this),\"Failed to set context: \"),getCurrentContext:(0,Qi.wrapInTryCatch)(this.getCurrentContext.bind(this),\"Failed to get context: \"),addContextHandler:(0,Qi.wrapInTryCatch)(this.addContextHandler.bind(this),\"Failed to add context handler: \")}}}qi.default=Xi,zi=new WeakMap;var er={},tr={},nr={},ir={},rr=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),or=s&&s.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,\"default\",{enumerable:!0,value:t})}:function(e,t){e.default=t}),sr=s&&s.__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)&&rr(t,e,n);return or(t,e),t};Object.defineProperty(ir,\"__esModule\",{value:!0}),ir.PrivateChannelClient=void 0;const ar=sr(Hi);var cr,dr;function hr(){if(cr)return tr;cr=1;var e,t=s&&s.__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)},n=s&&s.__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},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(tr,\"__esModule\",{value:!0}),tr.FDC3ModuleBase=void 0;const o=nr,a=Hi,c=wr(),d=r(i);return tr.FDC3ModuleBase=class{get client(){return t(this,e,\"f\").call(this)}get fin(){return this.wire.getFin()}constructor(t,i){this.wire=i,e.set(this,void 0),n(this,e,t,\"f\")}async broadcast(e){return this.wire.sendAction(\"fdc3-broadcast\").catch((e=>{})),this.client.setContext(e)}async _open(e,t){this.wire.sendAction(\"fdc3-open\").catch((e=>{}));try{return await c.InteropClient.ferryFdc3Call(this.client,\"fdc3Open\",{app:e,context:t})}catch(e){const t=e.message===a.BROKER_ERRORS.fdc3Open?\"ResolverUnavailable\":e.message;throw new Error(t)}}async _getChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:\"system\",...(0,o.getUnsupportedChannelApis)()})))}async getOrCreateChannel(e){this.wire.sendAction(\"fdc3-get-or-create-channel\").catch((e=>{}));const t=(await this._getChannels()).find((t=>t.id===e));if(t)return{...t,type:\"system\",...(0,o.getUnsupportedChannelApis)()};try{const t=await this.client.joinSessionContextGroup(e);return(0,o.buildAppChannelObject)(t)}catch(e){throw console.error(e.message),new Error(o.ChannelError.CreationFailed)}}async getSystemChannels(){return this.wire.sendAction(\"fdc3-get-system-channels\").catch((e=>{})),this._getChannels()}async joinChannel(e){this.wire.sendAction(\"fdc3-join-channel\").catch((e=>{}));try{return await this.client.joinContextGroup(e)}catch(e){if(e.message===a.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup?console.error(\"The Channel you have tried to join is an App Channel. Custom Channels can only be defined by the Interop Broker through code or manifest configuration. Please use getOrCreateChannel.\"):console.error(e.message),e.message.startsWith(\"Attempting to join a context group that does not exist\"))throw new Error(o.ChannelError.NoChannelFound);throw new Error(o.ChannelError.AccessDenied)}}async getCurrentChannel(){this.wire.sendAction(\"fdc3-get-current-channel\").catch((e=>{}));const e=await this.getCurrentContextGroupInfo();return e?this.buildChannelObject(e):null}async leaveCurrentChannel(){return this.wire.sendAction(\"fdc3-leave-current-channel\").catch((e=>{})),this.client.removeFromContextGroup()}async getCurrentContextGroupInfo(){const e=await this.client.getContextGroups(),t=e.map((async e=>this.client.getAllClientsInContextGroup(e.id))),n=(await Promise.all(t)).findIndex((e=>e.some((e=>{const{uuid:t,name:n}=e;return this.wire.me.uuid===t&&this.wire.me.name===n}))));return e[n]}async buildChannelObject(e){return{...e,type:\"system\",addContextListener:(...[e,t])=>{let n,i;\"function\"==typeof e?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),n=e):(n=t,\"string\"==typeof e&&(i=e));const r=(async()=>{let e=!0;const t=await this.client.getCurrentContext(i);return this.client.addContextHandler(((i,r)=>{if(!e||(e=!1,!(0,d.default)(t,i)))return n(i,r)}),i)})();return{...r,unsubscribe:()=>r.then((e=>e.unsubscribe()))}},broadcast:this.broadcast.bind(this),getCurrentContext:async e=>{const t=await this.client.getCurrentContext(e);return void 0===t?null:t}}}},e=new WeakMap,tr}ir.PrivateChannelClient=class{constructor(e,t){this.id=t,this.client=e,this.listeners=new Map}async broadcast(e){return this.client.dispatch(\"broadcast\",{context:e})}async getCurrentContext(e){return this.client.dispatch(\"getCurrentContext\",{contextType:e})}async addContextListener(e,t){if(\"function\"!=typeof t)throw new Error(\"Non-function argument passed to the second parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.\");let n;n=e?`contextHandler:invoke-${this.id}-${e}-${ar.generateId()}`:`contextHandler:invoke-${this.id}-${ar.generateId()}`,this.client.register(n,ar.wrapContextHandler(t,n));const i={unsubscribe:await this.createContextUnsubscribeCb(n)};return this.listeners.set(n,i),await this.client.dispatch(\"contextHandlerAdded\",{handlerId:n,contextType:e}),i}createNonStandardUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch(\"nonStandardHandlerRemoved\",{handlerId:e})}}createContextUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch(\"contextHandlerRemoved\",{handlerId:e})}}onAddContextListener(e){const t=`onContextHandlerAdded:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch(\"onAddContextHandlerAdded\",{handlerId:t}),n}onDisconnect(e){const t=`onDisconnect:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch(\"onDisconnectHandlerAdded\",{handlerId:t}),n}onUnsubscribe(e){const t=`onUnsubscribe:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch(\"onUnsubscribeHandlerAdded\",{handlerId:t}),n}async cleanUpAllSubs(){Array.from(this.listeners.keys()).forEach((e=>{this.client.remove(e),this.listeners.delete(e)}))}async disconnect(){try{await this.client.dispatch(\"clientDisconnecting\"),await this.cleanUpAllSubs(),await this.client.disconnect()}catch(e){throw new Error(e.message)}}},function(e){var t=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,\"__esModule\",{value:!0}),e.getIntentResolution=e.isChannel=e.isContext=e.connectPrivateChannel=e.buildAppChannelObject=e.buildPrivateChannelObject=e.ChannelError=e.ResultError=e.UnsupportedChannelApiError=e.getUnsupportedChannelApis=void 0;const n=Hi,r=ir,o=t(i);e.getUnsupportedChannelApis=e=>({addContextListener:()=>{throw new a(\"Channel.addContextListener\",e)},broadcast:()=>{throw new a(\"Channel.broadcast\",e)},getCurrentContext:()=>{throw new a(\"Channel.getCurrentContext\",e)}});class a extends Error{constructor(e,t=\"System\"){super(e),this.message=`Calling ${e} on an instance of a ${t} Channel returned by fdc3.get${t}Channels is not supported. If you would like to use a ${t} Channel, please use fdc3.joinChannel, fdc3.addContextListener, and fdc3.broadcast instead.`}}var c,d;e.UnsupportedChannelApiError=a,function(e){e.NoResultReturned=\"NoResultReturned\",e.IntentHandlerRejected=\"IntentHandlerRejected\"}(c=e.ResultError||(e.ResultError={})),(d=e.ChannelError||(e.ChannelError={})).NoChannelFound=\"NoChannelFound\",d.AccessDenied=\"AccessDenied\",d.CreationFailed=\"CreationFailed\";e.buildPrivateChannelObject=e=>{let t=!1;const n=()=>{if(t)throw new Error(\"Private Channel Client has been disconnected from the Private Channel\")};return{id:e.id,type:\"private\",broadcast:async t=>(n(),e.broadcast(t)),getCurrentContext:async t=>(n(),e.getCurrentContext(t)),addContextListener:async(t,i)=>{n();let r=i,o=t;\"function\"==typeof t&&(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),r=t,o=null);return e.addContextListener(o,r)},onAddContextListener:t=>(n(),e.onAddContextListener(t)),disconnect:async()=>(n(),t=!0,e.disconnect()),onDisconnect:t=>(n(),e.onDisconnect(t)),onUnsubscribe:t=>(n(),e.onUnsubscribe(t))}};e.buildAppChannelObject=e=>({id:e.id,type:\"app\",broadcast:e.setContext,getCurrentContext:async t=>{const n=await e.getCurrentContext(t);return void 0===n?null:n},addContextListener:(t,n)=>{let i,r;\"function\"==typeof t?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),i=t):(i=n,\"string\"==typeof t&&(r=t));const s=(async()=>{let t=!0;const n=await e.getCurrentContext(r);return e.addContextHandler(((e,r)=>{if(!t||(t=!1,!(0,o.default)(n,e)))return i(e,r)}),r)})();return{...s,unsubscribe:()=>s.then((e=>e.unsubscribe()))}}});e.connectPrivateChannel=async t=>{try{const n=await fin.InterApplicationBus.Channel.connect(t),i=new r.PrivateChannelClient(n,t);return(0,e.buildPrivateChannelObject)(i)}catch(e){throw new Error(`Private Channel with id: ${t} doesn't exist`)}};e.isContext=e=>{if(e&&\"object\"==typeof e&&\"type\"in e){const{type:t}=e;return\"string\"==typeof t}return!1};e.isChannel=e=>{if(e&&\"object\"==typeof e&&\"type\"in e&&\"id\"in e){const{type:t,id:n}=e;return\"string\"==typeof t&&\"string\"==typeof n&&(\"app\"===t||\"private\"===t)}return!1};e.getIntentResolution=async(t,i,r,o)=>{const s=(0,n.generateId)(),a=new Promise(((e,t)=>{fin.InterApplicationBus.subscribe({uuid:\"*\"},s,(t=>{e(t)})).catch((()=>t(new Error(\"getResult is not supported in this environment\"))))})),d=r?{target:r,intentResolutionResultId:s}:{intentResolutionResultId:s},h=o?{name:o,context:i,metadata:d}:{...i,metadata:d},l=async()=>{let n=await a;if(!n||\"object\"!=typeof n)throw new Error(c.NoResultReturned);const{error:i}=n;if(i)throw new Error(c.IntentHandlerRejected);if((0,e.isChannel)(n)){const{id:i,type:r}=n;switch(r){case\"private\":n=await(0,e.connectPrivateChannel)(i);break;case\"app\":{const r=await t.joinSessionContextGroup(i);n=(0,e.buildAppChannelObject)(r);break}}}else if(!(0,e.isContext)(n))throw new Error(c.NoResultReturned);return n},u=o?await t.fireIntent(h):await t.fireIntentForContext(h);return\"object\"!=typeof u?{source:{appId:\"\",instanceId:\"\"},intent:\"\",version:\"2.0\",getResult:l}:{...u,getResult:l}}}(nr);var lr,ur,pr={};function wr(){if(ur)return Ki;ur=1;var e,t,n=s&&s.__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},i=s&&s.__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)},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ki,\"__esModule\",{value:!0}),Ki.InteropClient=void 0;const o=d,a=r(qi),c=function(){if(dr)return er;dr=1,Object.defineProperty(er,\"__esModule\",{value:!0}),er.Fdc3Module=void 0;const e=Hi,t=hr();class n extends t.FDC3ModuleBase{async open(e,t){await super._open(e,t)}addContextListener(e,t){let n;return this.wire.sendAction(\"fdc3-add-context-listener\").catch((e=>{})),\"function\"==typeof e?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),n=this.client.addContextHandler(e)):n=this.client.addContextHandler(t,null===e?void 0:e),{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}addIntentListener(e,t){this.wire.sendAction(\"fdc3-add-intent-listener\").catch((e=>{}));const n=this.client.registerIntentHandler((e=>{const{context:n,metadata:i}=e,{metadata:r}=n,o=i?.intentResolutionResultId||r?.intentResolutionResultId;o&&this.fin.InterApplicationBus.publish(o,null).catch((()=>null)),t(e.context)}),e,{fdc3Version:\"1.2\"});return{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}async raiseIntent(t,n,i){this.wire.sendAction(\"fdc3-raise-intent\").catch((e=>{}));const r=i?{name:t,context:n,metadata:{target:i}}:{name:t,context:n};try{return await this.client.fireIntent(r)}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntent?\"ResolverUnavailable\":t.message;throw new Error(n)}}async findIntent(t,n){this.wire.sendAction(\"fdc3-find-intent\").catch((e=>{}));try{return await this.client.getInfoForIntent({name:t,context:n})}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntent?\"ResolverUnavailable\":t.message;throw new Error(n)}}async findIntentsByContext(t){this.wire.sendAction(\"fdc3-find-intents-by-context\").catch((e=>{}));try{return await this.client.getInfoForIntentsByContext(t)}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntentsByContext?\"ResolverUnavailable\":t.message;throw new Error(n)}}async raiseIntentForContext(t,n){this.wire.sendAction(\"fdc3-raise-intent-for-context\").catch((e=>{}));try{return await this.client.fireIntentForContext({...t,metadata:{target:n}})}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntentForContext?\"ResolverUnavailable\":t.message;throw new Error(n)}}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}getInfo(){return this.wire.sendAction(\"fdc3-get-info\").catch((e=>{})),{providerVersion:this.wire.environment.getAdapterVersionSync(),provider:`openfin-${this.wire.me.uuid}`,fdc3Version:\"1.2\"}}}return er.Fdc3Module=n,er}(),h=function(){if(lr)return pr;lr=1,Object.defineProperty(pr,\"__esModule\",{value:!0}),pr.Fdc3Module2=void 0;const e=hr(),t=Hi,n=wr(),i=nr,r=ir;class o extends e.FDC3ModuleBase{async open(e,t){return\"string\"==typeof e&&console.warn(\"Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).\"),super._open(e,t)}async findInstances(e){this.wire.sendAction(\"fdc3-find-instances\").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,\"fdc3FindInstances\",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3FindInstances?\"ResolverUnavailable\":e.message;throw new Error(n)}}async getAppMetadata(e){this.wire.sendAction(\"fdc3-get-app-metadata\").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,\"fdc3GetAppMetadata\",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3GetAppMetadata?\"ResolverUnavailable\":e.message;throw new Error(n)}}async addContextListener(e,t){this.wire.sendAction(\"fdc3-add-context-listener\").catch((e=>{}));const n=e=>t=>{const{contextMetadata:n,...i}=t,r=n?[{...i},n]:[t,null];e(...r)};let i=t,r=n(i);return\"function\"==typeof e?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),i=e,r=n(i),this.client.addContextHandler(r)):this.client.addContextHandler(r,null===e?void 0:e)}async findIntent(e,n,i){this.wire.sendAction(\"fdc3-find-intent\").catch((e=>{}));try{return await this.client.getInfoForIntent({name:e,context:n,metadata:{resultType:i}})}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntent?\"ResolverUnavailable\":e.message;throw new Error(n)}}async findIntentsByContext(e,i){this.wire.sendAction(\"fdc3-find-intents-by-context\").catch((e=>{}));const r=i?{context:e,metadata:{resultType:i}}:e;try{return await n.InteropClient.ferryFdc3Call(this.client,\"fdc3v2FindIntentsByContext\",r)}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntentsByContext?\"ResolverUnavailable\":e.message;throw new Error(n)}}async raiseIntent(e,n,r){this.wire.sendAction(\"fdc3-raise-intent\").catch((e=>{}));try{return\"string\"==typeof r&&console.warn(\"Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).\"),(0,i.getIntentResolution)(this.client,n,r,e)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?\"ResolverUnavailable\":e.message;throw new Error(n)}}async raiseIntentForContext(e,n){this.wire.sendAction(\"fdc3-raise-intent-for-context\").catch((e=>{}));try{return\"string\"==typeof n&&console.warn(\"Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).\"),(0,i.getIntentResolution)(this.client,e,n)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?\"ResolverUnavailable\":e.message;throw new Error(n)}}async addIntentListener(e,t){if(this.wire.sendAction(\"fdc3-add-intent-listener\").catch((e=>{})),\"string\"!=typeof e)throw new Error(\"First argument must be an Intent name\");return this.client.registerIntentHandler((async e=>{let n,i;const{context:r,metadata:o}=e,{contextMetadata:s,metadata:a,...c}=r,d=o?.intentResolutionResultId||a?.intentResolutionResultId;try{const e=a?{metadata:a,...c}:{...c};n=await t(e,s),i=n}catch(e){n=e,i={error:!0}}if(d&&this.fin.InterApplicationBus.publish(d,i).catch((()=>null)),n instanceof Error)throw new Error(n.message);return n}),e,{fdc3Version:\"2.0\"})}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}async createPrivateChannel(){const e=(0,t.generateId)();await n.InteropClient.ferryFdc3Call(this.client,\"createPrivateChannelProvider\",{channelId:e});const o=await this.fin.InterApplicationBus.Channel.connect(e),s=new r.PrivateChannelClient(o,e);return(0,i.buildPrivateChannelObject)(s)}async getUserChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:\"user\",...(0,i.getUnsupportedChannelApis)(\"User\")})))}async getSystemChannels(){return console.warn(\"This API has been deprecated. Please use fdc3.getUserChannels instead.\"),super.getSystemChannels()}async joinUserChannel(e){return super.joinChannel(e)}async joinChannel(e){return console.warn(\"This API has been deprecated. Please use fdc3.joinUserChannel instead.\"),super.joinChannel(e)}async getCurrentChannel(){const e=await super.getCurrentChannel();return e?{...e,type:\"user\",broadcast:this.broadcast.bind(this)}:null}async getInfo(){return n.InteropClient.ferryFdc3Call(this.client,\"fdc3v2GetInfo\",{fdc3Version:\"2.0\"})}}return pr.Fdc3Module2=o,pr}(),l=Hi;let u=class extends o.Base{constructor(i,r){super(i),e.set(this,void 0),t.set(this,void 0),n(this,t,new Map,\"f\"),n(this,e,r,\"f\")}async setContext(t){this.wire.sendAction(\"interop-client-set-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"setContext\",{context:t})}async addContextHandler(t,n){if(this.wire.sendAction(\"interop-client-add-context-handler\").catch((e=>{})),\"function\"!=typeof t)throw new Error(\"Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.\");const r=await i(this,e,\"f\");let o;o=n?`invokeContextHandler-${n}-${(0,l.generateId)()}`:\"invokeContextHandler\";const s=(0,l.wrapContextHandler)(t,o);return r.register(o,s),await r.dispatch(\"contextHandlerRegistered\",{handlerId:o,contextType:n}),{unsubscribe:async()=>{r.remove(o),await r.dispatch(\"removeContextHandler\",{handlerId:o})}}}async getContextGroups(){this.wire.sendAction(\"interop-client-get-context-groups\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getContextGroups\")}async joinContextGroup(t,n){this.wire.sendAction(\"interop-client-join-context-group\").catch((e=>{}));const r=await i(this,e,\"f\");if(!t)throw new Error(\"No contextGroupId specified for joinContextGroup.\");return r.dispatch(\"joinContextGroup\",{contextGroupId:t,target:n})}async removeFromContextGroup(t){this.wire.sendAction(\"interop-client-remove-from-context-group\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"removeFromContextGroup\",{target:t})}async getAllClientsInContextGroup(t){this.wire.sendAction(\"interop-client-get-all-clients-in-context-group\").catch((e=>{}));const n=await i(this,e,\"f\");if(!t)throw new Error(\"No contextGroupId specified for getAllClientsInContextGroup.\");return n.dispatch(\"getAllClientsInContextGroup\",{contextGroupId:t})}async getInfoForContextGroup(t){this.wire.sendAction(\"interop-client-get-info-for-context-group\").catch((e=>{}));const n=await i(this,e,\"f\");if(!t)throw new Error(\"No contextGroupId specified for getInfoForContextGroup.\");return n.dispatch(\"getInfoForContextGroup\",{contextGroupId:t})}async fireIntent(t){this.wire.sendAction(\"interop-client-fire-intent\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"fireIntent\",t)}async registerIntentHandler(t,n,r){this.wire.sendAction(\"interop-client-register-intent-handler\").catch((e=>{}));const o=await i(this,e,\"f\"),s=`intent-handler-${n}`,a=(0,l.wrapIntentHandler)(t,s);try{await o.register(s,a),await o.dispatch(\"intentHandlerRegistered\",{handlerId:s,...r})}catch(e){throw new Error(\"Unable to register intent handler\")}return{unsubscribe:async()=>{o.remove(s)}}}async getCurrentContext(t){this.wire.sendAction(\"interop-client-get-current-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getCurrentContext\",{contextType:t})}async getInfoForIntent(t){this.wire.sendAction(\"interop-client-get-info-for-intent\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getInfoForIntent\",t)}async getInfoForIntentsByContext(t){this.wire.sendAction(\"interop-client-get-info-for-intents-by-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getInfoForIntentsByContext\",t)}async fireIntentForContext(t){this.wire.sendAction(\"interop-client-fire-intent-for-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"fireIntentForContext\",t)}async joinSessionContextGroup(n){try{const r=i(this,t,\"f\").get(n);if(r)return r.getUserInstance();const o=await i(this,e,\"f\"),{hasConflict:s}=await o.dispatch(\"sessionContextGroup:createIfNeeded\",{sessionContextGroupId:n});s&&console.warn(`A (non-session) context group with the name \"${n}\" already exists. If you are trying to join a Context Group, call joinContextGroup instead.`);const c=new a.default(this.wire,i(this,e,\"f\"),n);return i(this,t,\"f\").set(n,c),c.getUserInstance()}catch(e){throw console.error(`Error thrown trying to create Session Context Group with id \"${n}\": ${e}`),e}}async onDisconnection(t){this.wire.sendAction(\"interop-client-add-ondisconnection-listener\").catch((e=>{}));return(await i(this,e,\"f\")).onDisconnection((e=>{const{uuid:n}=e;t({type:\"interop-broker\",topic:\"disconnected\",brokerName:n})}))}getFDC3Sync(e){switch(e){case\"1.2\":return new c.Fdc3Module((()=>this),this.wire);case\"2.0\":return new h.Fdc3Module2((()=>this),this.wire);default:throw new Error(`Invalid FDC3 version provided: ${e}. Must be '1.2' or '2.0'`)}}async getFDC3(e){return this.getFDC3Sync(e)}static async ferryFdc3Call(t,n,r){return(await i(t,e,\"f\")).dispatch(n,r||null)}};return Ki.InteropClient=u,e=new WeakMap,t=new WeakMap,Ki}var yr,fr,gr,mr={};function vr(){if(yr)return mr;yr=1,Object.defineProperty(mr,\"__esModule\",{value:!0}),mr.overrideCheck=mr.checkFDC32Overrides=mr.getDefaultViewFdc3VersionFromAppInfo=void 0;const e=Vi();function t(t){return[\"fdc3HandleFindInstances\",\"handleInfoForIntent\",\"handleInfoForIntentsByContext\",\"fdc3HandleGetAppMetadata\",\"fdc3HandleGetInfo\",\"fdc3HandleOpen\",\"handleFiredIntent\",\"handleFiredIntentForContext\"].filter((n=>t[n]===e.InteropBroker.prototype[n]))}return mr.getDefaultViewFdc3VersionFromAppInfo=function({manifest:e,initialOptions:t}){const n=e?.platform?.defaultViewOptions?.fdc3InteropApi??t.defaultViewOptions?.fdc3InteropApi;return[\"1.2\",\"2.0\"].includes(n??\"\")?n:void 0},mr.checkFDC32Overrides=t,mr.overrideCheck=function(e,n){if(n&&\"2.0\"===n){const n=t(e);n.length>0&&console.warn(`WARNING: FDC3 2.0 has been set as a default option for Views in this Platform, but the required InteropBroker APIs for FDC3 2.0 compliance have not all been overridden.\\nThe following APIs need to be overridden:\\n${n.join(\"\\n\")}`)}},mr}function Cr(){return gr||(gr=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),i=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),i(function(){if(fr)return Ti;fr=1;var e=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ti,\"__esModule\",{value:!0}),Ti.InteropModule=void 0;const t=e(n),i=$i,r=d,o=Vi(),a=wr(),c=vr(),h=Tn,l=e=>new e,u=\"You have attempted to use or modify InteropBroker parameters, which is not allowed. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.\";class p extends r.Base{async init(e,n=l){this.wire.sendAction(\"interop-init\").catch((()=>{}));const r=await this.wire.environment.getInteropInfo(this.wire.getFin()),s=(0,i.createUnusableObject)(u),a=(0,i.createWarningObject)(u,(0,t.default)(r)),d=async()=>{throw new Error(u)},p=o.InteropBroker.createClosedConstructor(this.wire,(()=>this.fin.InterApplicationBus.Channel.create(`interop-broker-${e}`)),r);let w;return w=Array.isArray(n)?new((0,h.overrideFromComposables)(...n)(p))(s,d,a):await n(p,s,d,a),(0,c.overrideCheck)(w,r.fdc3Version),w}connectSync(e,t){return this.wire.sendAction(\"interop-connect-sync\").catch((()=>{})),new a.InteropClient(this.wire,this.wire.environment.whenReady().then((()=>this.fin.InterApplicationBus.Channel.connect(`interop-broker-${e}`,{payload:t}))))}}return Ti.InteropModule=p,Ti}(),e),i(wr(),e),i(Vi(),e)}(Li)),Li}var br={},Ir={},Er={},xr={};Object.defineProperty(xr,\"__esModule\",{value:!0}),xr.getSnapshotSourceChannelName=void 0;xr.getSnapshotSourceChannelName=e=>`snapshot-source-provider-${e.uuid}`;var Ar,Pr,Mr,_r,Or,Sr=s&&s.__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},Rr=s&&s.__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)};Object.defineProperty(Er,\"__esModule\",{value:!0}),Er.SnapshotSource=void 0;const Fr=d,jr=xr,kr=new Map;class Lr extends Fr.Base{constructor(e,t){super(e),Ar.set(this,void 0),Pr.set(this,(()=>(kr.has(this.identity.uuid)||kr.set(this.identity.uuid,{eventFired:null,clientPromise:null}),kr.get(this.identity.uuid)))),Mr.set(this,(()=>(Rr(this,Pr,\"f\").call(this).clientPromise||(Rr(this,Pr,\"f\").call(this).clientPromise=Rr(this,_r,\"f\").call(this)),Rr(this,Pr,\"f\").call(this).clientPromise))),_r.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);try{Rr(this,Pr,\"f\").call(this).eventFired||await Rr(this,Or,\"f\").call(this);const t=await this.fin.InterApplicationBus.Channel.connect(e,{wait:!1});return t.onDisconnection((()=>{Rr(this,Pr,\"f\").call(this).clientPromise=null,Rr(this,Pr,\"f\").call(this).eventFired=null})),t}catch(e){throw Rr(this,Pr,\"f\").call(this).clientPromise=null,new Error(\"The targeted SnapshotSource is not currently initialized. Await this object's ready() method.\")}})),Or.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);let t,n;const i=new Promise(((e,i)=>{t=e,n=i}));Rr(this,Pr,\"f\").call(this).eventFired=i;const r=async i=>{try{i.channelName===e&&(t(),await this.fin.InterApplicationBus.Channel.removeListener(\"connected\",r))}catch(e){n(e)}};await this.fin.InterApplicationBus.Channel.on(\"connected\",r)})),Sr(this,Ar,t,\"f\")}get identity(){return Rr(this,Ar,\"f\")}async ready(){this.wire.sendAction(\"snapshot-source-ready\").catch((e=>{}));try{await Rr(this,Mr,\"f\").call(this)}catch(e){await Rr(this,Pr,\"f\").call(this).eventFired}}async getSnapshot(){this.wire.sendAction(\"snapshot-source-get-snapshot\").catch((e=>{}));const e=await Rr(this,Mr,\"f\").call(this),t=await e.dispatch(\"get-snapshot\");return(await t).snapshot}async applySnapshot(e){this.wire.sendAction(\"snapshot-source-apply-snapshot\").catch((e=>{}));return(await Rr(this,Mr,\"f\").call(this)).dispatch(\"apply-snapshot\",{snapshot:e})}}Er.SnapshotSource=Lr,Ar=new WeakMap,Pr=new WeakMap,Mr=new WeakMap,_r=new WeakMap,Or=new WeakMap,Object.defineProperty(Ir,\"__esModule\",{value:!0}),Ir.SnapshotSourceModule=void 0;const Tr=d,$r=Er,Br=xr;class Gr extends Tr.Base{async init(e){if(this.wire.sendAction(\"snapshot-source-init\").catch((e=>{})),\"object\"!=typeof e||\"function\"!=typeof e.getSnapshot||\"function\"!=typeof e.applySnapshot)throw new Error(\"you must pass in a valid SnapshotProvider\");const t=await this.fin.InterApplicationBus.Channel.create((0,Br.getSnapshotSourceChannelName)(this.fin.me));t.register(\"get-snapshot\",(async()=>({snapshot:await e.getSnapshot()}))),t.register(\"apply-snapshot\",(({snapshot:t})=>e.applySnapshot(t)))}wrapSync(e){return this.wire.sendAction(\"snapshot-source-wrap-sync\").catch((e=>{})),new $r.SnapshotSource(this.wire,e)}async wrap(e){return this.wire.sendAction(\"snapshot-source-wrap\").catch((e=>{})),this.wrapSync(e)}}Ir.SnapshotSourceModule=Gr,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Ir,e),n(Er,e)}(br),Object.defineProperty(a,\"__esModule\",{value:!0});var Wr=a.Fin=void 0;const Hr=t,Nr=c,Dr=ie(),Ur=Z(),Vr=de,zr=en,Kr=rn,qr=un,Jr=bn,Yr=J(),Zr=An,Qr=ki,Xr=Cr(),eo=br;class to extends Hr.EventEmitter{constructor(e){super(),this.wire=e,this.System=new Nr.System(e),this.Window=new Dr._WindowModule(e),this.Application=new Ur.ApplicationModule(e),this.InterApplicationBus=new Vr.InterApplicationBus(e),this.Clipboard=new zr.Clipboard(e),this.ExternalApplication=new Kr.ExternalApplicationModule(e),this.Frame=new qr._FrameModule(e),this.GlobalHotkey=new Jr.GlobalHotkey(e),this.Platform=new Zr.PlatformModule(e,this.InterApplicationBus.Channel),this.View=new Yr.ViewModule(e),this.Interop=new Xr.InteropModule(e),this.SnapshotSource=new eo.SnapshotSourceModule(e),e.registerFin(this),this.me=(0,Qr.getMe)(e),e.on(\"disconnected\",(()=>{this.emit(\"disconnected\")}))}}Wr=a.Fin=to;var no={},io={};function ro(e){return\"string\"==typeof e.manifestUrl}function oo(e){return ao(e)&&\"string\"==typeof e.address}function so(e){return oo(e)&&\"string\"==typeof e.token}function ao(e){return\"string\"==typeof e.uuid}function co(e){return e.runtime&&\"string\"==typeof e.runtime.version}function ho(e){return ao(e)&&co(e)}Object.defineProperty(io,\"__esModule\",{value:!0}),io.isInternalConnectConfig=io.isPortDiscoveryConfig=io.isNewConnectConfig=io.isConfigWithReceiver=io.isRemoteConfig=io.isExistingConnectConfig=io.isExternalConfig=void 0,io.isExternalConfig=ro,io.isExistingConnectConfig=oo,io.isRemoteConfig=so,io.isConfigWithReceiver=function(e){return\"object\"==typeof e.receiver&&so({...e,address:\"\"})},io.isNewConnectConfig=ho,io.isPortDiscoveryConfig=function(e){return ro(e)&&co(e)||ho(e)},io.isInternalConnectConfig=function(e){return oo(e)||ho(e)};var lo={},uo={};Object.defineProperty(uo,\"__esModule\",{value:!0}),uo.EmitterMap=void 0;const po=t;function wo(e){return Buffer.from(e).toString(\"base64\")}uo.EmitterMap=class{constructor(){this.storage=new Map}hashKeys(e){return e.map(wo).join(\"/\")}getOrCreate(e){const t=this.hashKeys(e);return this.storage.has(t)||this.storage.set(t,new po.EventEmitter),this.storage.get(t)}has(e){return this.storage.has(this.hashKeys(e))}delete(e){const t=this.hashKeys(e);return this.storage.delete(t)}},Object.defineProperty(lo,\"__esModule\",{value:!0});const yo=uo;class fo extends yo.EmitterMap{constructor(){super(...arguments),this.dispatchEvent=e=>{if(function(e){return\"process-desktop-event\"===e.action}(e)){const{payload:t}=e,n=function(e){const{topic:t}=e;if(\"frame\"===t||\"window\"===t||\"view\"===t){const{uuid:n,name:i}=e;return[t,n,i]}if(\"application\"===t){const{uuid:n}=e;return[t,n]}return[t]}(t);if(this.has(n))return this.getOrCreate(n).emit(t.type,t),!0}return!1}}}lo.default=fo;var go,mo,vo=s&&s.__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},Co=s&&s.__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)},bo=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(no,\"__esModule\",{value:!0});var Io=no.Transport=void 0;const Eo=t,xo=io,Ao=g,Po=bo(lo),Mo=ki,_o=ke;class Oo extends Eo.EventEmitter{constructor(e,t,n){super(),this.wireListeners=new Map,this.topicRefMap=new Map,this.eventAggregator=new Po.default,this.messageHandlers=[this.eventAggregator.dispatchEvent],go.set(this,void 0),mo.set(this,void 0),this.connectSync=()=>{Co(this,go,\"f\").connectSync()},this.getPort=()=>Co(this,go,\"f\").getPort(),vo(this,go,new e(this.onmessage.bind(this)),\"f\"),this.environment=t,this.sendRaw=Co(this,go,\"f\").send.bind(Co(this,go,\"f\")),this.registerMessageHandler(this.handleMessage.bind(this)),Co(this,go,\"f\").on(\"disconnected\",(()=>{for(const[,{handleNack:e}]of this.wireListeners)e({reason:\"Remote connection has closed\"});this.wireListeners.clear(),this.emit(\"disconnected\")}));const{uuid:i,name:r}=n,o=this.environment.getCurrentEntityType();this.me=(0,Mo.getBaseMe)(o,i,r)}getFin(){if(!Co(this,mo,\"f\"))throw new Error(\"No Fin object registered for this transport\");return Co(this,mo,\"f\")}registerFin(e){if(Co(this,mo,\"f\"))throw new Error(\"Fin object has already been registered for this transport\");vo(this,mo,e,\"f\")}shutdown(){return Co(this,go,\"f\").shutdown()}async connect(e){if((0,xo.isConfigWithReceiver)(e))return await Co(this,go,\"f\").connect(e.receiver),this.authorize(e);if((0,xo.isRemoteConfig)(e))return this.connectRemote(e);if((0,xo.isExistingConnectConfig)(e))return this.connectByPort(e);if((0,xo.isNewConnectConfig)(e)){const t=await this.environment.retrievePort(e);return this.connectByPort({...e,address:`ws://localhost:${t}`})}}async connectRemote(e){return await Co(this,go,\"f\").connect(new(this.environment.getWsConstructor())(e.address)),this.authorize(e)}async connectByPort(e){const{address:t,uuid:n}=e,i={...e,type:\"file-token\"},r=Co(this,go,\"f\");await r.connect(new(this.environment.getWsConstructor())(e.address));const o=await this.sendAction(\"request-external-authorization\",{uuid:n,type:\"file-token\"},!0);if(\"external-authorization-response\"!==o.action)throw new Ao.UnexpectedActionError(o.action);return await this.environment.writeToken(o.payload.file,o.payload.token),this.authorize(i)}async authorize(e){const t=await this.sendAction(\"request-authorization\",e,!0);if(\"authorization-response\"!==t.action)throw new Ao.UnexpectedActionError(t.action);if(!0!==t.payload.success)throw new Ao.RuntimeError(t.payload)}sendAction(e,t={},n=!1){let i=()=>{};const r=Ao.RuntimeError.getCallSite(1),o=this.environment.getNextMessageId(),s=new Promise(((s,a)=>{i=a;const c={action:e,payload:t,messageId:o},d=Co(this,go,\"f\");return this.addWireListener(o,s,(e=>this.nackHandler(e,a,r)),n),d.send(c).catch(a)}));return Object.assign(s,{cancel:i,messageId:o})}nackHandler(e,t,n){t(\"string\"==typeof e?e:new Ao.RuntimeError(e,n))}ferryAction(e){return new Promise(((t,n)=>{const i=this.environment.getNextMessageId();e.messageId=i;const r=e=>{t(e.payload)};return Co(this,go,\"f\").send(e).then((()=>this.addWireListener(i,r,(e=>this.nackHandler(e,n)),!1))).catch(n)}))}registerMessageHandler(e){this.messageHandlers.push(e)}addWireListener(e,t,n,i){i?this.uncorrelatedListener=t:this.wireListeners.has(e)?n({reason:\"Duplicate handler id\",error:(0,_o.errorToPOJO)(new Ao.DuplicateCorrelationError(String(e)))}):this.wireListeners.set(e,{resolve:t,handleNack:n})}onmessage(e){for(const t of this.messageHandlers)t.call(null,e)}handleMessage(e){const t=e.correlationId||NaN;if(\"correlationId\"in e){if(!this.wireListeners.has(t))return!1;{const{resolve:n,handleNack:i}=this.wireListeners.get(t);\"ack\"!==e.action?i({reason:\"Did not receive ack action\",error:(0,_o.errorToPOJO)(new Ao.NoAckError(e.action))}):\"payload\"in e?e.payload.success?n.call(null,e):i(e.payload):\"string\"==typeof e.reason?i(e):(console.warn(\"Received invalid response from core\",e),i({reason:\"invalid response shape\"})),this.wireListeners.delete(t)}}else this.uncorrelatedListener&&this.uncorrelatedListener.call(null,e),this.uncorrelatedListener=()=>{};return!0}}Io=no.Transport=Oo,go=new WeakMap,mo=new WeakMap;const So=(...e)=>({log:(...t)=>console.debug(`[${(new Date).toISOString()}]`,...(e=>e.map((e=>`[${e}]`)))(e),...t),getLogger:(...t)=>So(...e,...t)}),Ro=So(\"@openfin/core-web/client\");function Fo(e,t){if(!function(e){return\"string\"==typeof e}(e))throw new Error(`Property ${t} has invalid type. Expected string, got ${typeof e}.`)}const jo=\"web-broker-ports-ready\",ko=Ro.getLogger(\"get-web-interop-ports\");function Lo(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)}function To(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}\"function\"==typeof SuppressedError&&SuppressedError;const $o=e=>{var n,i,r;return r=class extends t.EventEmitter{constructor(t){super(),n.set(this,void 0),i.set(this,!1),this.connectSync=()=>{Lo(this,i,\"f\")||(e.addEventListener(\"message\",(e=>{e.data?.topic?.startsWith(\"wire-message\")&&e.data.message&&Lo(this,n,\"f\").call(this,{...JSON.parse(e.data.message),ports:e.ports})})),e.start())},this.connect=async()=>{this.connectSync()},this.send=t=>(e.postMessage({topic:\"wire-message\",message:JSON.stringify(t)}),Promise.resolve()),this.shutdown=async()=>{e.close()},To(this,n,t,\"f\")}getPort(){return e}},n=new WeakMap,i=new WeakMap,r};var Bo={},Go={};Object.defineProperty(Go,\"__esModule\",{value:!0}),Go.BaseEnvironment=void 0;const Wo=vr();Go.BaseEnvironment=class{async getViewWindowIdentity(e,t){const{identity:n}=await e.View.wrapSync(t).getCurrentWindow();return n}async getInteropInfo(e){const t=await e.Application.getCurrentSync().getInfo().catch((()=>null)),n=t?.initialOptions?.interopBrokerConfiguration??{};return{fdc3Version:t?(0,Wo.getDefaultViewFdc3VersionFromAppInfo)(t):void 0,...n,fdc3Info:{providerVersion:await e.System.getVersion(),provider:\"OpenFin\"}}}},Object.defineProperty(Bo,\"__esModule\",{value:!0});var Ho=Bo.BrowserEnvironment=void 0;const No=Go;class Do extends No.BaseEnvironment{constructor(){super(...arguments),this.type=\"other\",this.getRandomId=()=>{const e=new Uint32Array(1);return window.crypto.getRandomValues(e)[0].toString(32)}}getAdapterVersionSync(){return\"\"}observeBounds(e,t){throw new Error(\"Method not implemented.\")}layoutAllowedInContext(e){return!1}initLayoutManager(e,t,n){throw new Error(\"Method not implemented.\")}applyLayoutSnapshot(e,t,n){throw new Error(\"Method not implemented.\")}createLayout(e,t){throw new Error(\"Method not implemented.\")}destroyLayout(e,t){throw new Error(\"Method not implemented.\")}resolveLayout(e,t){throw new Error(\"Method not implemented.\")}initPlatform(...e){throw new Error(\"Method not implemented.\")}writeToken(e,t){return Promise.resolve(\"\")}retrievePort(e){throw new Error(\"Method not implemented.\")}getNextMessageId(){return this.getRandomId()}createChildContent(e){throw new Error(\"Method not implemented.\")}getWebWindow(e){throw new Error(\"Method not implemented.\")}getCurrentEntityIdentity(){throw new Error(\"Method not implemented.\")}getCurrentEntityType(){return\"external connection\"}raiseEvent(e,t){throw new Error(\"Method not implemented.\")}getUrl(){return location.href}getDefaultChannelOptions(){return{create:{},connect:{}}}getRtcPeer(){return new RTCPeerConnection}getWsConstructor(){return WebSocket}whenReady(){return Promise.resolve()}}Ho=Bo.BrowserEnvironment=Do;const Uo=e=>\"platform\"in e&&void 0!==e.platform;var Vo,zo;class Ko extends Ho{constructor(e){super(),this.connectConfig=e,Vo.set(this,void 0),zo.set(this,new W((async()=>Promise.resolve().then((function(){return require(\"./main-b14f67c9.js\")}))))),Uo(e)&&this.validatePlatformOptions(e)}getAdapterVersionSync(){return\"0.39.21\"}validatePlatformOptions({platform:e}){if(!(\"layoutSnapshot\"in e))throw new Error(\"Platform options are missing layoutSnapshot. Please provide a layoutSnapshot in the platform options.\");if(\"windows\"in e||\"windows\"in e.layoutSnapshot)throw new Error(\"It appears you tried to call connect() with a snapshot object from an OpenFin desktop environment. Note that connect() expects to be called with a platform property with this structure: { platform: { layoutSnapshot } }. To get a layoutSnapshot of the expected structure, use fin.Platform.Layout.getCurrentLayoutManagerSync().getLayoutSnapshot() in v34+ in your desktop environment.\");const{layouts:t}=e.layoutSnapshot;Object.entries(t).map((([e,t])=>{if(\"object\"!=typeof t||null===t)throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must be an object.`);if(!(\"content\"in t))throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must contain a 'content' property.`)}))}async getInteropInfo(e){return{...{contextGroups:void 0,logging:{beforeAction:{enabled:!1},afterAction:{enabled:!1}}},fdc3Version:void 0,fdc3Info:{providerVersion:\"0.39.21\",provider:\"OpenFin Web\"}}}layoutAllowedInContext(e){return!0}async initLayoutManager(e,t,n){if(Lo(this,Vo,\"f\"))throw new Error(\"Layout already initialized.\");if(!Uo(this.connectConfig))throw new Error(\"Platform options are missing from connection config.\");const{WebLayoutEntryPoint:i}=await Lo(this,zo,\"f\").getValue();return To(this,Vo,new i(this.connectConfig),\"f\"),await Lo(this,Vo,\"f\").initLayoutManager(e,t,n)}async applyLayoutSnapshot(e,t,n){Lo(this,Vo,\"f\")?.applyLayoutSnapshot(e,t,n)}async createLayout(e,t){return Lo(this,Vo,\"f\")?.createLayout(e,t)}async destroyLayout(e,t){return Lo(this,Vo,\"f\")?.destroyLayout(e,t)}async getViewWindowIdentity(e,t){return Promise.resolve({uuid:t.uuid,name:t.uuid})}}Vo=new WeakMap,zo=new WeakMap;const qo=()=>{const e=((e,t)=>{const n=new RegExp(`^${t}<(?.*)>$`).exec(e)?.groups?.meta;if(n)try{return JSON.parse(atob(n))}catch(e){throw new Error(`Failed to decode JSON from ${n}.`)}})(window.name,\"of-frame\");if(e)try{const{name:t,uuid:n,brokerUrl:i,providerId:r,contextGroup:o}=e;return Fo(i,\"brokerUrl\"),Fo(n,\"uuid\"),Fo(t,\"name\"),{identity:{name:t,uuid:n},brokerUrl:i,interopConfig:{providerId:r,currentContextGroup:o}}}catch(e){throw new Error(`Unexpected error occurred when inferring platform information: ${e.stack}`)}},Jo=()=>{const e=r.v4();return{uuid:e,name:e}},Yo=async e=>{if(\"enabled\"===e.connectionInheritance){const t=await(async e=>{const t=qo();if(t){const{validateOptions:n=(()=>!0)}=e,{identity:i,...r}=t;if(!await n(r))throw new Error(\"Parent options were rejected by validateOptions.\");return t}})(e);if(t)return t}if(!e.options){const t=\"enabled\"===e.connectionInheritance?\"Broker URL was not specified nor provided by a platform container.\":\"Connection inheritance is disabled but no options were provided.\";throw new Error(t)}return{...e.options,identity:Jo()}};exports.__classPrivateFieldGet=Lo,exports.__classPrivateFieldSet=To,exports.apiExposer=Gn,exports.commonjsGlobal=s,exports.connect=async t=>{try{Ro.log(\"Establishing connection\",t);const{brokerUrl:n,identity:i,timeout:r,interopConfig:s}=await Yo(t),{workerPort:a,iframeBrokerPort:c}=await(async(e,t,n)=>{const{origin:i}=new URL(e),r=document.createElement(\"IFRAME\");let s;r.style.display=\"none\";try{return await new Promise(((a,c)=>{const d=e=>{if(e.source===r.contentWindow&&e.data?.topic===`ack-${jo}`){if(e.origin!==i)c(new Error(`Broker redirected to unexpected origin ${e.origin}, expected ${i}.`));else if(e.data.success){const[t,n]=e.ports;a({iframeBrokerPort:t,workerPort:n})}else c(new m(e.data));window.removeEventListener(\"message\",d),clearTimeout(s)}};window.addEventListener(\"message\",d),ko.log(`Connecting to broker ${e}`),r.setAttribute(\"src\",e),r.setAttribute(\"name\",o(t,\"of-broker\")),document.body.appendChild(r),ko.log(\"Iframe loaded, awaiting init message from iframe\"),n&&(s=setTimeout((()=>{window.removeEventListener(\"message\",d),document.body.removeChild(r),c(new Error(\"Worker did not initialize in time\"))}),n))}))}catch(e){throw new Error(`Failed to initialise Fin Web Client. ${e.message}`,{cause:e})}})(n,i,r);Ro.log(\"Successfully established connection to shared worker\");const d={entityType:\"external connection\",...i};a.start(),c.start();const h=((t,n,i)=>{const r=$o(n),o=new Ko(t),s=new Io(r,o,i);return s.connectSync(),window.Buffer=e.Buffer,new Wr(s)})(t,a,d);return s?.providerId&&(h.me.interop=h.Interop.connectSync(s.providerId),s?.currentContextGroup&&h.me.interop.joinContextGroup(s.currentContextGroup).catch((e=>{console.warn(`Error joining specified context group: ${s?.currentContextGroup}, continuing`,e)}))),{...h,me:{...h.me,identity:{uuid:h.me.uuid,name:h.me.name}}}}catch(e){throw new Error(`An error occured during web-interop connection: ${e.message}`)}},exports.decorators=Nn,exports.encodeOptions=o,exports.layout_constants=ai,exports.lazy=G;\n","\"use strict\";var t=require(\"./main-8cad4070.js\"),e=require(\"uuid\");require(\"buffer/\"),require(\"events\"),require(\"lodash/cloneDeep\"),require(\"lodash/isEqual\");var i={},n={};Object.defineProperty(n,\"__esModule\",{value:!0}),n.mapValuesAsync=n.mapEntriesAsync=void 0;const o=(t,[e,i])=>({...t,[e]:i});async function s(t,e){return(await Promise.all(e.map((async([e,i])=>[e,await t(i,e)])))).reduce(o,{})}n.mapEntriesAsync=s,n.mapValuesAsync=async function(t,e){let i;return i=e instanceof Map?[...e.entries()]:Object.entries(e),s(t,i)};var r,a,l,h,d=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldSet||function(t,e,i,n,o){if(\"m\"===n)throw new TypeError(\"Private method is not writable\");if(\"a\"===n&&!o)throw new TypeError(\"Private accessor was defined without a setter\");if(\"function\"==typeof e?t!==e||!o:!e.has(t))throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");return\"a\"===n?o.call(t,i):o?o.value=i:e.set(t,i),i},c=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldGet||function(t,e,i,n){if(\"a\"===i&&!n)throw new TypeError(\"Private accessor was defined without a getter\");if(\"function\"==typeof e?t!==e||!n:!e.has(t))throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");return\"m\"===i?n:\"a\"===i?n.call(t):n?n.value:e.get(t)};Object.defineProperty(i,\"__esModule\",{value:!0});var m=i.DefaultLayoutManager=void 0;const u=n;class p{constructor(t){a.set(this,void 0),l.set(this,new Map),d(this,a,t,\"f\")}size(){return c(this,l,\"f\").size}async applyLayoutSnapshot({layouts:t}){if(Object.keys(t).length>1)throw new Error(\"[LayoutManager] Tried to call applyLayoutSnapshot with more than 1 layout. When implementing multiple layouts via overridden LayoutManager class, you must override and fully implement the applyLayoutSnapshot method without calling super.applyLayoutSnapshot().\");const[[e,i]]=Object.entries(t);await p.createLayout(this,{layoutName:e,layout:i})}async showLayout({layoutName:t}){}async getLayoutSnapshot(){return{layouts:await(0,u.mapValuesAsync)((t=>t.getFrameSnapshot()),c(this,l,\"f\"))}}async removeLayout({layoutName:t}){}getLayoutIdentityForView(t){const e=[...c(this,l,\"f\").values()].find((e=>e.getCurrentViews().some((e=>e.name===t.name&&e.uuid===t.uuid))));return e?.identity??void 0}isLayoutVisible({layoutName:t}){return c(p,r,\"m\",h).call(p,this,t).isVisible()}resolveLayoutIdentity(t){if(t&&\"layoutName\"in t)return t;const e=[...c(this,l,\"f\").values()];if(1===e.length)return e[0].identity;const i=e.find((t=>t.isVisible()));return i?.identity??void 0}static async resolveLayout(t,e){const i=t.resolveLayoutIdentity(e);if(void 0===i||!(\"layoutName\"in i))throw new Error(\"[layout-manager] resolveLayout: Could not resolve the layout identity. Make sure you include 'layoutName' in the identity object.\");return c(p,r,\"m\",h).call(p,t,i.layoutName)}static async handleSharedView(t,e,i){await(0,u.mapValuesAsync)((async t=>{if(t.identity.layoutName!==e.layoutName){const e=t.getCurrentViews().find((t=>t.name===i.name));e&&await t.onViewDetached({viewIdentity:e,target:null}).catch(console.error)}}),c(t,l,\"f\"))}static async handleLastViewRemoved(t,e){await t.removeLayout(e),await c(t,a,\"f\").handleLastViewRemoved(t)}static async destroyLayout(t,{layoutName:e}){await c(p,r,\"m\",h).call(p,t,e).destroy(),c(t,l,\"f\").delete(e)}static async createLayout(t,e){const{layoutName:i}=e;if(c(t,l,\"f\").has(i))throw new Error(`Layout name ${i} already exists`);await c(t,a,\"f\").createLayout(e,t)}static registerLayout(t,e,i){c(t,l,\"f\").set(e,i)}static getAllLayouts(t){return[...c(t,l,\"f\").values()]}static setInitialSnapshot(t,e){c(t,a,\"f\").setInitialSnapshot(e)}static createClosedConstructor(...t){return class extends p{constructor(){super(...t)}}}}m=i.DefaultLayoutManager=p,r=p,a=new WeakMap,l=new WeakMap,h=function(t,e){const i=c(t,l,\"f\").get(e);if(!i)throw new Error(`[layout-manager] getLayoutByName: Could not locate layout with name '${e}'`);return i};var g={},f={},v={};Object.defineProperty(v,\"__esModule\",{value:!0}),v.ReversibleMap=void 0;v.ReversibleMap=class{constructor(){this.valueToKey=new Map,this.keyToValue=new Map,this.setUnique=(t,e)=>{if(this.hasKey(t)||this.hasValue(e))throw new Error(\"Key or value already in the map.\");this.keyToValue.set(t,e),this.valueToKey.set(e,t)},this.getKey=t=>{const e=this.valueToKey.get(t);if(!e)throw new Error(\"Value not found in the map.\");return e},this.deleteKey=t=>{const e=this.getValue(t);return this.keyToValue.delete(t),this.valueToKey.delete(e),e},this.deleteValue=t=>{const e=this.getKey(t);return this.keyToValue.delete(e),this.valueToKey.delete(t),e},this.hasKey=t=>this.keyToValue.has(t),this.hasValue=t=>this.valueToKey.has(t)}getValue(t){const e=this.keyToValue.get(t);if(!e)throw new Error(\"Key not found in the map.\");return e}},Object.defineProperty(f,\"__esModule\",{value:!0});var _=f.LayoutContentCache=void 0;const y=t.lazy,C=v;class w{constructor(){this.contentItemCache=new C.ReversibleMap,this.contentItemCacheId=0,this.createCacheKey=()=>{const t=`entity-${this.contentItemCacheId.toString()}`;return this.contentItemCacheId+=1,t},this.hasKey=t=>this.contentItemCache.hasKey(t),this.getItemOrUndefined=t=>{try{return this.getContentItemOrThrow(t)}catch(t){return}},this.getContentItemOrThrow=(t,e)=>{if(!this.contentItemCache.hasKey(t))throw new Error(\"Layout component has been destroyed or detached from the current layout.\");const i=this.contentItemCache.getValue(t);if(e&&!e.includes(i.type))throw new Error(`Layout item is not the expected type. Expected ${e.join(\", \")}, got ${i.type}.`);return i},this.getOrCreateEntityId=t=>{if(this.contentItemCache.hasValue(t))return this.contentItemCache.getKey(t);t.onDestroyed((()=>{this.contentItemCache.deleteValue(t)}));const e=this.createCacheKey();return this.contentItemCache.setUnique(e,t),e}}static getSingleInstance(){return w.singleton.getValue()}}_=f.LayoutContentCache=w,w.singleton=new y.Lazy((()=>new w));var I={},b={};!function(t){Object.defineProperty(t,\"__esModule\",{value:!0}),t.getAdjacentStacks=t.doShareEdge=t.getAdjacentItem=void 0;t.getAdjacentItem=(e,i)=>{const{parent:n}=e;if(e.isRoot()||!n)return;const o=[\"top\",\"bottom\"].includes(i)?\"column\":\"row\",s=[\"top\",\"left\"].includes(i)?-1:1;if(n.type===o){const t=n.contentItems.indexOf(e)+s;if(t>=0&&t{const n=t.getBounds(),o=e.getBounds();if(!n||!o)return!1;if([\"top\",\"bottom\"].includes(i)){return!(n.righto.right)}return!(n.bottomo.bottom)};t.getAdjacentStacks=(e,i)=>{const n=[\"top\",\"bottom\"].includes(i)?\"row\":\"column\",o=s=>\"stack\"===s.type?(0,t.doShareEdge)(e,s,i)?[s]:[]:\"root\"===s.type||\"ground\"===s.type?[]:s.type===n?s.contentItems.map((t=>o(t))).flat():s.type!==n?[\"top\",\"right\"].includes(i)?o(s.contentItems[s.contentItems.length-1]):o(s.contentItems[0]):[],s=(0,t.getAdjacentItem)(e,i);return s?o(s):[]}}(b);var S=t.commonjsGlobal&&t.commonjsGlobal.__decorate||function(t,e,i,n){var o,s=arguments.length,r=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if(\"object\"==typeof Reflect&&\"function\"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(s<3?o(r):s>3?o(e,i,r):o(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};Object.defineProperty(I,\"__esModule\",{value:!0}),I.LayoutEntitiesController=void 0;const E=t.decorators,x=b,L=i;class z{constructor(t,e,i){this.wire=t,this.layoutManager=e,this.layoutContentCache=i,this.analytics=t=>{this.wire.sendAction(`layout-controller-${t}`).catch((()=>{}))},this.getLayoutIdentityForViewOrThrow=async t=>{const e=this.layoutManager.getLayoutIdentityForView(t);if(!e)throw new Error(`View identity ${t.name} is not attached to any layouts.`);return e},this.getRoot=async t=>{this.analytics(\"get-root\");const e=(await this.getLayout(t)).getRoot();return{type:e.type,entityId:this.layoutContentCache.getOrCreateEntityId(e)}},this.getStackByView=async t=>{this.analytics(\"get-stack-by-view\");const e=await this.getLayoutIdentityForViewOrThrow(t),i=(await this.getLayout(e)).getStackByView(t);if(\"stack\"===i?.type)return{entityId:this.layoutContentCache.getOrCreateEntityId(i),type:\"stack\"}},this.getStackViews=t=>{this.analytics(\"get-stack-views\");return this.layoutContentCache.getContentItemOrThrow(t,[\"stack\"]).contentItems.map((t=>({name:t.viewName,uuid:this.wire.me.uuid})))},this.isRoot=t=>{this.analytics(\"is-root\");return this.layoutContentCache.getContentItemOrThrow(t).isRoot()},this.exists=t=>(this.analytics(\"exists\"),this.layoutContentCache.hasKey(t)),this.addViewToStack=async(t,e,{index:i}={index:0})=>{this.analytics(\"add-view-to-stack\");const n=this.layoutContentCache.getContentItemOrThrow(t);if(i&&i>n.contentItems.length+1)throw new Error(`Index '${i}' out of range, please exclude the index or specify a number between 0 and ${n.contentItems.length}`);const o={id:t,index:i},{identity:s}=await n.layout.platformCreateView(e,{location:o});return s},this.findViewInStack=(t,e)=>t.contentItems.find((t=>t.viewName===e.name)),this.removeViewFromStack=async(t,e)=>{this.analytics(\"remove-view-from-stack\");const i=this.layoutContentCache.getContentItemOrThrow(t,[\"stack\"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to remove a view ('${e.name}') which does not belong to the stack.`);await n.layout.platformCloseView(e)},this.createAdjacentStack=async(t,e,{position:i=\"right\"}={})=>{if(this.analytics(\"create-adjacent-stack\"),!Array.isArray(e)||0===e.length)throw new Error('The parameter \"views\" must be an array with at least 1 element.');if(![\"top\",\"bottom\",\"left\",\"right\"].includes(i))throw new Error(`Invalid position '${i}' specified.`);const n=this.layoutContentCache.getContentItemOrThrow(t).createAdjacentStack({position:i}),o=this.layoutContentCache.getOrCreateEntityId(n);return await Promise.all(e.reverse().map((t=>this.addViewToStack(o,t)))),o},this.getAdjacentStacks=async({targetId:t,edge:e})=>{this.analytics(\"get-adjacent-stacks\");const i=this.layoutContentCache.getContentItemOrThrow(t);return(0,x.getAdjacentStacks)(i,e).map((t=>({entityId:this.layoutContentCache.getOrCreateEntityId(t)})))},this.setStackActiveView=async(t,e)=>{this.analytics(\"set-stack-active-view\");const i=this.layoutContentCache.getContentItemOrThrow(t,[\"stack\"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to set a view ('${e.name}') as active when it does not belong to the stack.`);i.setActiveContentItem(n,!0)}}async getLayout(t){const e=await L.DefaultLayoutManager.resolveLayout(this.layoutManager,t);if(!e)throw new Error(`Could not resolve target layout identity ${JSON.stringify(t)}`);return e}getContent(t){this.analytics(\"get-content\");return this.layoutContentCache.getContentItemOrThrow(t,[\"column\",\"row\"]).contentItems.map((t=>({type:t.type,entityId:this.layoutContentCache.getOrCreateEntityId(t)})))}getParent(t){this.analytics(\"get-parent\");const e=this.layoutContentCache.getContentItemOrThrow(t);if(!e.isRoot())return e.parent?.contentItems.includes(e)?{type:e.parent.type,entityId:this.layoutContentCache.getOrCreateEntityId(e.parent)}:void 0}}S([(0,E.expose)()],z.prototype,\"getLayoutIdentityForViewOrThrow\",void 0),S([(0,E.expose)()],z.prototype,\"getRoot\",void 0),S([(0,E.expose)()],z.prototype,\"getStackByView\",void 0),S([(0,E.expose)()],z.prototype,\"getStackViews\",void 0),S([(0,E.expose)()],z.prototype,\"getContent\",null),S([(0,E.expose)()],z.prototype,\"getParent\",null),S([(0,E.expose)()],z.prototype,\"isRoot\",void 0),S([(0,E.expose)()],z.prototype,\"exists\",void 0),S([(0,E.expose)()],z.prototype,\"addViewToStack\",void 0),S([(0,E.expose)()],z.prototype,\"removeViewFromStack\",void 0),S([(0,E.expose)()],z.prototype,\"createAdjacentStack\",void 0),S([(0,E.expose)()],z.prototype,\"getAdjacentStacks\",void 0),S([(0,E.expose)()],z.prototype,\"setStackActiveView\",void 0),I.LayoutEntitiesController=z,Object.defineProperty(g,\"__esModule\",{value:!0});var M=g.initLayoutEndpoints=void 0;const P=t.apiExposer,T=t.layout_constants,A=f,k=I,D=i;M=g.initLayoutEndpoints=async function(t,e){const i=t.getFin(),n=await i.Platform.getCurrentSync().getClient(),o=new P.ChannelsExposer(n);await new P.ApiExposer(o).exposeInstance(new k.LayoutEntitiesController(t,e,A.LayoutContentCache.getSingleInstance()),{id:T.LAYOUT_CONTROLLER_ID}),await async function(t,e){const i=t=>async i=>{const n=await D.DefaultLayoutManager.resolveLayout(e,i.target);if(!n)throw new Error(`Could not resolve the layout target from payload ${JSON.stringify(i)}`);return t(n,i)},n=(e,n)=>{t.register(e,i(n))},o=(t,e)=>{n(t,e)};n(\"replace-view\",((t,e)=>t.replaceView(e))),n(\"replace-layout\",((t,{layout:e})=>t.replaceLayout(e))),n(\"add-view\",((t,e)=>t.insertView(e))),o(\"layout-add-view\",((t,{viewOptions:e,location:i,targetView:n})=>t.platformCreateView(e,{location:i,targetView:n}))),n(\"close-view\",((t,e)=>t.cleanupView(e.viewIdentity))),o(\"layout-close-view\",((t,e)=>t.platformCloseView(e.viewIdentity))),n(\"apply-preset-layout\",((t,e)=>t.applyPreset(e))),n(\"get-layout-views\",(t=>t.getCurrentViews())),n(\"get-frame-snapshot\",(t=>t.getFrameSnapshot())),n(\"is-visible\",(t=>t.isVisible())),n(\"destroy\",(t=>t.destroy())),t.register(\"get-layout-snapshot\",(()=>e.getLayoutSnapshot()))}(n,e)};var R={};Object.defineProperty(R,\"__esModule\",{value:!0});var U=R.BaseLayout=void 0;U=R.BaseLayout=class{};var O={};Object.defineProperty(O,\"__esModule\",{value:!0});var V=O.DOMEmitter=void 0;V=O.DOMEmitter=class{constructor(t){this.container=t}dispatchLocalEvent(t,e){const i={...e,type:t,tabSelector:`tab-${e.name}`,containerSelector:`container-${e.name}`,topic:\"openfin-DOM-event\"};this.container.dispatchEvent(new CustomEvent(t,{detail:i}))}};var B={};Object.defineProperty(B,\"__esModule\",{value:!0});var H=B.mapLayoutContentItemsImmutableSync=B.mapLayoutContentItemsImmutable=W=B.isVisible=void 0;var W=B.isVisible=t=>(0!==t.offsetWidth||0!==t.offsetHeight)&&\"hidden\"!==window.getComputedStyle(t).visibility&&t.offsetTop>=0&&t.offsetLeft>=0&&t.offsetTop<=window.innerHeight&&t.offsetLeft<=window.innerWidth;const F=t=>\"type\"in t&&\"component\"===t.type;B.mapLayoutContentItemsImmutable=async function t(e,i){return F(i)?e(i):{...i,content:await Promise.all(i.content?.map((i=>t(e,i))))}},H=B.mapLayoutContentItemsImmutableSync=function t(e,i){return F(i)?e(i):{...i,content:i.content?.map((i=>t(e,i)))}};class N extends Error{constructor(t,e){super(e),this.type=t}}class G extends N{constructor(t,e){super(\"Configuration\",t),this.node=e}}class j extends N{constructor(t){super(\"PopoutBlocked\",t)}}class $ extends N{constructor(t){super(\"API\",t)}}class Z extends N{constructor(t){super(\"Bind\",t)}}class q extends Error{constructor(t,e,i){super(`${t}: ${e}${void 0===i?\"\":\": \"+i}`)}}class X extends q{constructor(t,e){super(\"Assert\",t,e)}}class Y extends q{constructor(t,e,i){super(\"UnreachableCase\",t,`${e}${void 0===i?\"\":\": \"+i}`)}}class K extends q{constructor(t,e){super(\"UnexpectedNull\",t,e)}}class J extends q{constructor(t,e){super(\"UnexpectedUndefined\",t,e)}}var Q;!function(t){let e=!1;const i={PopoutCannotBeCreatedWithGroundItemConfig:{id:0,default:\"Popout cannot be created with ground ItemConfig\"},PleaseRegisterAConstructorFunction:{id:1,default:\"Please register a constructor function\"},ComponentTypeNotRegisteredAndBindComponentEventHandlerNotAssigned:{id:2,default:\"Component type not registered and BindComponentEvent handler not assigned\"},ComponentIsAlreadyRegistered:{id:3,default:\"Component is already registered\"},ComponentIsNotVirtuable:{id:4,default:\"Component is not virtuable. Requires rootHtmlElement field/getter\"},VirtualComponentDoesNotHaveRootHtmlElement:{id:5,default:'Virtual component does not have getter \"rootHtmlElement\"'},ItemConfigIsNotTypeComponent:{id:6,default:\"ItemConfig is not of type component\"},InvalidNumberPartInSizeString:{id:7,default:\"Invalid number part in size string\"},UnknownUnitInSizeString:{id:8,default:\"Unknown unit in size string\"},UnsupportedUnitInSizeString:{id:9,default:\"Unsupported unit in size string\"}};t.idCount=Object.keys(i).length;const n=Object.values(i);t.checkInitialise=function(){if(!e)for(let e=0;e=\"0\"&&t<=\"9\"}function Tt(t,e){const i=zt(e);t.style.width=i}function At(t,e){const i=zt(e);t.style.height=i}function kt(t){return{width:t.offsetWidth,height:t.offsetHeight}}function Dt(t,e){t.style.display=e?\"\":\"none\"}function Rt(t,e){if(void 0!==e)for(const i in e)if(e.hasOwnProperty(i)){const n=e[i],o=t[i];t[i]=Ut(o,n)}return t}function Ut(t,e){if(\"object\"!=typeof e)return e;if(Array.isArray(e)){const t=e.length,i=new Array(t);for(let n=0;n36)throw new Error(\"Too many keys in config minifier map\")},t.translateObject=n}(dt||(dt={})),function(t){t.defaults={type:at.ground,content:[],size:1,sizeUnit:ht.Fractional,minSize:void 0,minSizeUnit:ht.Pixel,id:\"\",isClosable:!0},t.createCopy=function(t,e){switch(t.type){case at.ground:case at.row:case at.column:return gt.createCopy(t,e);case at.stack:return ut.createCopy(t,e);case at.component:return pt.createCopy(t);default:throw new Y(\"CICC91354\",t.type,\"Invalid Config Item type specified\")}},t.createDefault=function(t){switch(t){case at.ground:throw new X(\"CICCDR91562\");case at.row:case at.column:return gt.createDefault(t);case at.stack:return ut.createDefault();case at.component:return pt.createDefault();default:throw new Y(\"CICCDD91563\",t,\"Invalid Config Item type specified\")}},t.isComponentItem=function(t){return t.type===at.component},t.isStackItem=function(t){return t.type===at.stack},t.isGroundItem=function(t){return t.type===at.ground}}(ct||(ct={})),function(t){t.defaultMaximised=!1,function(t){t.createCopy=function(t,e){return void 0===t?void 0:{show:null!=e?e:t.show,popout:t.popout,close:t.close,maximise:t.maximise,minimise:t.minimise,tabDropdown:t.tabDropdown}}}(t.Header||(t.Header={}))}(mt||(mt={})),function(t){function e(t){const e=t.length,i=new Array(e);for(let n=0;n\"__glMaximised\"===t));t>0&&(o=!0,n=n.splice(t,1)),e=n.length>0?n[0]:ct.defaults.id}else e=n;return i=void 0!==t.maximised?t.maximised:o,{id:e,maximised:i}}}(wt||(wt={})),function(t){function e(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0;return{resolved:!0,root:Et.resolve(i),openPopouts:t.resolveOpenPopouts(e.openPopouts),dimensions:t.Dimensions.resolve(e.dimensions),settings:t.Settings.resolve(e.settings),header:t.Header.resolve(e.header,e.settings,e.labels)}}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:Lt.fromResolvedArray(e.openPopouts),settings:_t.Settings.createCopy(e.settings),dimensions:t.Dimensions.fromResolved(e.dimensions),header:_t.Header.createCopy(e.header)}},t.isResolved=function(t){const e=t;return void 0!==e.resolved&&!0===e.resolved},t.resolveOpenPopouts=function(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0,{root:Et.resolve(o),openPopouts:xt.resolveOpenPopouts(e.openPopouts),dimensions:xt.Dimensions.resolve(e.dimensions),settings:xt.Settings.resolve(e.settings),header:xt.Header.resolve(e.header,e.settings,e.labels),parentId:null!==(i=e.parentId)&&void 0!==i?i:null,indexInParent:null!==(n=e.indexInParent)&&void 0!==n?n:null,window:t.Window.resolve(e.window,e.dimensions),resolved:!0}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:i(e.openPopouts),dimensions:xt.Dimensions.fromResolved(e.dimensions),settings:_t.Settings.createCopy(e.settings),header:_t.Header.createCopy(e.header),parentId:e.parentId,indexInParent:e.indexInParent,window:t.Window.fromResolved(e.window)}},t.fromResolvedArray=i}(Lt||(Lt={}));class Wt{constructor(){this._allEventSubscriptions=[],this._subscriptionsMap=new Map,this.unbind=this.removeEventListener,this.trigger=this.emit}tryBubbleEvent(t,e){}emit(t,...e){let i=this._subscriptionsMap.get(t);if(void 0!==i){i=i.slice();for(let t=0;t0){const n=e.slice();n.unshift(t);const o=this._allEventSubscriptions.slice();for(let t=0;t0?n.contentItems[0]:n,e=0);const o=this._layoutManager.createAndInitContentItem(i,t);t.addChild(o,e),this._layoutManager.layoutConfig.settings.popInOnClose?this._onClose():this.close()}createWindow(){const t=this.createUrl(),e=Math.floor(1e6*Math.random()).toString(36),i=this.serializeWindowFeatures({width:this._initialWindowSize.width,height:this._initialWindowSize.height,innerWidth:this._initialWindowSize.width,innerHeight:this._initialWindowSize.height,menubar:\"no\",toolbar:\"no\",location:\"no\",personalbar:\"no\",resizable:\"yes\",scrollbars:\"no\",status:\"no\"});if(this._popoutWindow=globalThis.open(t,e,i),this._popoutWindow)this._popoutWindow.addEventListener(\"load\",(()=>this.positionWindow()),{passive:!0}),this._popoutWindow.addEventListener(\"beforeunload\",(()=>{this._layoutManager.layoutConfig.settings.popInOnClose?this.popIn():this._onClose()}),{passive:!0}),this._checkReadyInterval=setInterval((()=>this.checkReady()),10);else if(!0===this._layoutManager.layoutConfig.settings.blockedPopoutsThrowError){throw new j(\"Popout blocked\")}}checkReady(){if(null===this._popoutWindow)throw new K(\"BPCR01844\");this._popoutWindow.__glInstance&&this._popoutWindow.__glInstance.isInitialised&&(this.onInitialised(),void 0!==this._checkReadyInterval&&(clearInterval(this._checkReadyInterval),this._checkReadyInterval=void 0))}serializeWindowFeatures(t){const e=[];for(const i in t)e.push(i+\"=\"+t[i].toString());return e.join(\",\")}createUrl(){const t=\"gl-window-config-\"+Ot(),e=_t.minifyConfig(this._config);try{localStorage.setItem(t,JSON.stringify(e))}catch(t){throw new Error(\"Error while writing to localStorage \"+function(t){return t instanceof Error?t.message:\"string\"==typeof t?t:\"Unknown Error\"}(t))}const i=new URL(location.href);return i.searchParams.set(\"gl-window\",t),i.toString()}positionWindow(){if(null===this._popoutWindow)throw new Error(\"BrowserPopout.positionWindow: null popoutWindow\");this._popoutWindow.moveTo(this._initialWindowSize.left,this._initialWindowSize.top),this._popoutWindow.focus()}onInitialised(){this._isInitialised=!0,this.getGlInstance().on(\"popIn\",(()=>this.popIn())),this.emit(\"initialised\")}_onClose(){setTimeout((()=>this.emit(\"closed\")),50)}}class Gt extends Wt{constructor(t,e,i,n){super(),this.layoutManager=t,this._parent=i,this._element=n,this._popInParentIds=[],this._type=e.type,this._id=e.id,this._isInitialised=!1,this.isGround=!1,this.isRow=!1,this.isColumn=!1,this.isStack=!1,this.isComponent=!1,this.size=e.size,this.sizeUnit=e.sizeUnit,this.minSize=e.minSize,this.minSizeUnit=e.minSizeUnit,this._isClosable=e.isClosable,this._pendingEventPropagations={},this._throttledEvents=[\"stateChanged\"],this._contentItems=this.createContentItems(e.content)}get type(){return this._type}get id(){return this._id}set id(t){this._id=t}get popInParentIds(){return this._popInParentIds}get parent(){return this._parent}get contentItems(){return this._contentItems}get isClosable(){return this._isClosable}get element(){return this._element}get isInitialised(){return this._isInitialised}static isStack(t){return t.isStack}static isComponentItem(t){return t.isComponent}static isComponentParentableItem(t){return t.isStack||t.isGround}removeChild(t,e=!1){const i=this._contentItems.indexOf(t);if(-1===i)throw new Error(\"Can't remove child item. Unknown content item\");if(e||this._contentItems[i].destroy(),this._contentItems.splice(i,1),this._contentItems.length>0)this.updateSize(!1);else if(!this.isGround&&!0===this._isClosable){if(null===this._parent)throw new K(\"CIUC00874\");this._parent.removeChild(this)}}addChild(t,e,i){return null!=e||(e=this._contentItems.length),this._contentItems.splice(e,0,t),t.setParent(this),!0===this._isInitialised&&!1===t._isInitialised&&t.init(),e}replaceChild(t,e,i=!1){const n=this._contentItems.indexOf(t),o=t._element.parentNode;if(-1===n)throw new X(\"CIRCI23232\",\"Can't replace child. oldChild is not child of this\");if(null===o)throw new K(\"CIRCP23232\");if(o.replaceChild(e._element,t._element),!0===i&&(t._parent=null,t.destroy()),this._contentItems[n]=e,e.setParent(this),e.size=t.size,e.sizeUnit=t.sizeUnit,e.minSize=t.minSize,e.minSizeUnit=t.minSizeUnit,null===e._parent)throw new K(\"CIRCNC45699\");!0===e._parent._isInitialised&&!1===e._isInitialised&&e.init(),this.updateSize(!1)}remove(){if(null===this._parent)throw new K(\"CIR11110\");this._parent.removeChild(this)}popout(){const t=Ot(),e=this.layoutManager.createPopoutFromContentItem(this,void 0,t,void 0);return this.emitBaseBubblingEvent(\"stateChanged\"),e}calculateConfigContent(){const t=this._contentItems,e=t.length,i=new Array(e);for(let n=0;nthis.propagateEventToLayoutManager(t,e))))}propagateEventToLayoutManager(t,e){this._pendingEventPropagations[t]=!1,this.layoutManager.emitUnknown(t,e)}}class jt extends Gt{constructor(t,e,i){super(t,e,i,document.createElement(\"div\")),this._parentItem=i,this._focused=!1,this.isComponent=!0,this._reorderEnabled=e.reorderEnabled,this.applyUpdatableConfig(e),this._initialWantMaximise=e.maximised;const n=document.createElement(\"div\");n.classList.add(\"lm_content\"),this.element.appendChild(n),this._container=new Ft(e,this,t,n,(t=>this.handleUpdateItemConfigEvent(t)),(()=>this.show()),(()=>this.hide()),(t=>this.focus(t)),(t=>this.blur(t)))}get componentName(){return this._container.componentType}get componentType(){return this._container.componentType}get reorderEnabled(){return this._reorderEnabled}get initialWantMaximise(){return this._initialWantMaximise}get component(){return this._container.component}get container(){return this._container}get parentItem(){return this._parentItem}get headerConfig(){return this._headerConfig}get title(){return this._title}get tab(){return this._tab}get focused(){return this._focused}destroy(){this._container.destroy(),super.destroy()}applyUpdatableConfig(t){this.setTitle(t.title),this._headerConfig=t.header}toConfig(){const t=this._container.stateRequestEvent,e=void 0===t?this._container.state:t();return{type:at.component,content:[],size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,maximised:!1,isClosable:this.isClosable,reorderEnabled:this._reorderEnabled,title:this._title,header:mt.Header.createCopy(this._headerConfig),componentType:pt.copyComponentType(this.componentType),componentState:e}}close(){if(null===this.parent)throw new K(\"CIC68883\");this.parent.removeChild(this,!1)}enterDragMode(t,e){Tt(this.element,t),At(this.element,e),this._container.enterDragMode(t,e)}exitDragMode(){this._container.exitDragMode()}enterStackMaximised(){this._container.enterStackMaximised()}exitStackMaximised(){this._container.exitStackMaximised()}drag(){this._container.drag()}updateSize(t){this.updateNodeSize(t)}init(){this.updateNodeSize(!1),super.init(),this._container.emit(\"open\"),this.initContentItems()}setTitle(t){this._title=t,this.emit(\"titleChanged\",t),this.emit(\"stateChanged\")}setTab(t){this._tab=t,this.emit(\"tab\",t),this._container.setTab(t)}hide(){super.hide(),this._container.setVisibility(!1)}show(){super.show(),this._container.setVisibility(!0)}focus(t=!1){this.parentItem.setActiveComponentItem(this,!0,t)}setFocused(t){this._focused=!0,this.tab.setFocused(),t||this.emitBaseBubblingEvent(\"focus\")}blur(t=!1){this._focused&&this.layoutManager.setFocusedComponentItem(void 0,t)}setBlurred(t){this._focused=!1,this.tab.setBlurred(),t||this.emitBaseBubblingEvent(\"blur\")}setParent(t){this._parentItem=t,super.setParent(t)}handleUpdateItemConfigEvent(t){this.applyUpdatableConfig(t)}updateNodeSize(t){if(\"none\"!==this.element.style.display){const{width:e,height:i}=kt(this.element);this._container.setSizeToNodeSize(e,i,t)}}}class $t extends Gt{constructor(){super(...arguments),this._focused=!1}get focused(){return this._focused}setFocusedValue(t){this._focused=t}}class Zt extends Wt{constructor(t,e){super(),this._eElement=t,this._pointerTracking=!1,this._pointerDownEventListener=t=>this.onPointerDown(t),this._pointerMoveEventListener=t=>this.onPointerMove(t),this._pointerUpEventListener=t=>this.onPointerUp(t),this._timeout=void 0,this._allowableTargets=[t,...e],this._oDocument=document,this._eBody=document.body,this._nDelay=1800,this._nDistance=10,this._nX=0,this._nY=0,this._nOriginalX=0,this._nOriginalY=0,this._dragging=!1,this._eElement.addEventListener(\"pointerdown\",this._pointerDownEventListener,{passive:!0})}destroy(){this.checkRemovePointerTrackingEventListeners(),this._eElement.removeEventListener(\"pointerdown\",this._pointerDownEventListener)}cancelDrag(){this.processDragStop(void 0)}onPointerDown(t){if(this._allowableTargets.includes(t.target)&&t.isPrimary){const e=this.getPointerCoordinates(t);this.processPointerDown(e)}}processPointerDown(t){this._nOriginalX=t.x,this._nOriginalY=t.y,this._oDocument.addEventListener(\"pointermove\",this._pointerMoveEventListener),this._oDocument.addEventListener(\"pointerup\",this._pointerUpEventListener,{passive:!0}),this._pointerTracking=!0,this._timeout=setTimeout((()=>{try{this.startDrag()}catch(t){throw console.error(t),t}}),this._nDelay)}onPointerMove(t){this._pointerTracking&&(this.processDragMove(t),t.preventDefault())}processDragMove(t){this._nX=t.pageX-this._nOriginalX,this._nY=t.pageY-this._nOriginalY,!1===this._dragging&&(Math.abs(this._nX)>this._nDistance||Math.abs(this._nY)>this._nDistance)&&this.startDrag(),this._dragging&&this.emit(\"drag\",this._nX,this._nY,t)}onPointerUp(t){this.processDragStop(t)}processDragStop(t){var e;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this.checkRemovePointerTrackingEventListeners(),!0===this._dragging&&(this._eBody.classList.remove(\"lm_dragging\"),this._eElement.classList.remove(\"lm_dragging\"),null===(e=this._oDocument.querySelector(\"iframe\"))||void 0===e||e.style.setProperty(\"pointer-events\",\"\"),this._dragging=!1,this.emit(\"dragStop\",t))}checkRemovePointerTrackingEventListeners(){this._pointerTracking&&(this._oDocument.removeEventListener(\"pointermove\",this._pointerMoveEventListener),this._oDocument.removeEventListener(\"pointerup\",this._pointerUpEventListener),this._pointerTracking=!1)}startDrag(){var t;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this._dragging=!0,this._eBody.classList.add(\"lm_dragging\"),this._eElement.classList.add(\"lm_dragging\"),null===(t=this._oDocument.querySelector(\"iframe\"))||void 0===t||t.style.setProperty(\"pointer-events\",\"none\"),this.emit(\"dragStart\",this._nOriginalX,this._nOriginalY)}getPointerCoordinates(t){return{x:t.pageX,y:t.pageY}}}class qt{constructor(t,e,i){this._isVertical=t,this._size=e,this._grabSize=i0){const i=this.createSplitter(Math.max(0,e-1)).element;e>0?(this.contentItems[e-1].element.insertAdjacentElement(\"afterend\",i),i.insertAdjacentElement(\"afterend\",t.element)):(this.contentItems[0].element.insertAdjacentElement(\"beforebegin\",i),i.insertAdjacentElement(\"beforebegin\",t.element))}else this._childElementContainer.appendChild(t.element);super.addChild(t,e);const n=1/this.contentItems.length*100;if(!0===i)return this.emitBaseBubblingEvent(\"stateChanged\"),e;for(let e=0;e0&&(this.calculateRelativeSizes(),this.setAbsoluteSizes()),this.emitBaseBubblingEvent(\"stateChanged\"),this.emit(\"resize\")}setAbsoluteSizes(){const t=this.calculateAbsoluteSizes();for(let e=0;e0&&t.itemSizes[e]++,this._isColumn?(Tt(this.contentItems[e].element,t.crossAxisSize),At(this.contentItems[e].element,t.itemSizes[e])):(Tt(this.contentItems[e].element,t.itemSizes[e]),At(this.contentItems[e].element,t.crossAxisSize))}calculateAbsoluteSizes(){const t=(this.contentItems.length-1)*this._splitterSize,{width:e,height:i}=kt(this.element);let n,o;this._isColumn?(n=i-t,o=e):(n=e-t,o=i);let s=0;const r=[];for(let t=0;t0){const n=100-t;for(let t=0;t100&&e.length>0){for(let t=0;te)return;{const r=i/e;let a=i;for(let e=0;ethis.onSplitterDrag(e,t,i))),e.on(\"dragStop\",(()=>this.onSplitterDragStop(e))),e.on(\"dragStart\",(()=>this.onSplitterDragStart(e))),this._splitter.splice(t,0,e),e}getSplitItems(t){const e=this._splitter.indexOf(t);return{before:this.contentItems[e],after:this.contentItems[e+1]}}calculateContentItemMinSize(t){const e=t.minSize;if(void 0!==e){if(t.minSizeUnit===ht.Pixel)return e;throw new X(\"ROCGMD98831\",JSON.stringify(t))}{const t=this.layoutManager.layoutConfig.dimensions;return this._isColumn?t.defaultMinItemHeight:t.defaultMinItemWidth}}calculateContentItemsTotalMinSize(t){let e=0;for(const i of t)e+=this.calculateContentItemMinSize(i);return e}onSplitterDragStart(t){const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=this.calculateContentItemsTotalMinSize(e.before.contentItems),s=this.calculateContentItemsTotalMinSize(e.after.contentItems);this._splitterPosition=0,this._splitterMinPosition=-1*(i-o),this._splitterMaxPosition=n-s}onSplitterDrag(t,e,i){let n=this._isColumn?i:e;if(null===this._splitterMinPosition||null===this._splitterMaxPosition)throw new K(\"ROCOSD59226\");n=Math.max(n,this._splitterMinPosition),n=Math.min(n,this._splitterMaxPosition),this._splitterPosition=n;const o=zt(n);this._isColumn?t.element.style.top=o:t.element.style.left=o}onSplitterDragStop(t){if(null===this._splitterPosition)throw new K(\"ROCOSDS66932\");{const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=(this._splitterPosition+i)/(i+n),s=e.before.size+e.after.size;e.before.size=o*s,e.after.size=(1-o)*s,t.element.style.top=zt(0),t.element.style.left=zt(0),globalThis.requestAnimationFrame((()=>this.updateSize(!1)))}}}!function(t){t.getElementDimensionSize=function(t,e){return\"width\"===e?function(t){return t.offsetWidth}(t):function(t){return t.offsetHeight}(t)},t.setElementDimensionSize=function(t,e,i){return\"width\"===e?Tt(t,i):At(t,i)},t.createElement=function(t,e){const i=t.createElement(\"div\");return i.classList.add(\"lm_item\"),e?i.classList.add(\"lm_column\"):i.classList.add(\"lm_row\"),i}}(Xt||(Xt={}));class Yt extends $t{constructor(t,e,i){super(t,vt.create(e),null,Yt.createElement(document)),this.isGround=!0,this._childElementContainer=this.element,this._containerElement=i;let n=null;for(;;){const t=n?n.previousSibling:this._containerElement.lastChild;if(!(t instanceof Element&&t.classList.contains(\"lm_content\")))break;n=t}this._containerElement.insertBefore(this.element,n)}init(){if(!0!==this.isInitialised){this.updateNodeSize();for(let t=0;t0?this.contentItems[0]:this,n.isComponent)throw new Error(\"Cannot add item as child to ComponentItem\");{const t=this.layoutManager.createAndInitContentItem(i,n);return e=n.addChild(t,e),n===this?-1:e}}loadComponentAsRoot(t){this.clearRoot();const e=Ct.resolve(t,!1);if(e.maximised)throw new Error(\"Root Component cannot be maximised\");{const t=new jt(this.layoutManager,e,this);t.init(),this.addChild(t,0)}}addChild(t,e){if(this.contentItems.length>0)throw new Error(\"Ground node can only have a single child\");return this._childElementContainer.appendChild(t.element),e=super.addChild(t,e),this.updateSize(!1),this.emitBaseBubblingEvent(\"stateChanged\"),e}calculateConfigContent(){const t=this.contentItems,e=t.length,i=new Array(e);for(let n=0;n0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e)),this.updateContentItemsSize(!1))}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}createSideAreas(){const t=Yt.Area.oppositeSides,e=new Array(Object.keys(t).length);let i=0;for(const n in t){const o=n,s=this.getElementArea();if(null===s)throw new K(\"RCSA77553\");s.side=o,\"2\"===t[o][1]?s[o]=s[t[o]]-50:s[o]=s[t[o]]+50,s.surface=(s.x2-s.x1)*(s.y2-s.y1),e[i++]=s}return e}highlightDropZone(t,e,i){this.layoutManager.tabDropPlaceholder.remove(),super.highlightDropZone(t,e,i)}onDrop(t,e){if(t.isComponent){const e=ut.createDefault(),i=t;e.header=mt.Header.createCopy(i.headerConfig);const n=this.layoutManager.createAndInitContentItem(e,this);n.addChild(t),t=n}if(0===this.contentItems.length)this.addChild(t);else{if(t.type===at.row||t.type===at.column){const e=ut.createDefault(),i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}const i=\"x\"==e.side[0]?at.row:at.column,n=\"2\"==e.side[1],o=this.contentItems[0];if(o instanceof Xt&&o.type===i){const e=o.contentItems[n?0:o.contentItems.length-1];o.addChild(t,n?0:void 0,!0),e.size*=.5,t.size=e.size,t.sizeUnit=ht.Percent,o.updateSize(!1)}else{const e=ct.createDefault(i),s=this.layoutManager.createContentItem(e,this);this.replaceChild(o,s),s.addChild(t,n?0:void 0,!0),s.addChild(o,n?void 0:0,!0),o.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}}dock(){throw new X(\"GID87731\")}validateDocking(){throw new X(\"GIVD87732\")}getAllContentItems(){const t=[this];return this.deepGetAllContentItems(this.contentItems,t),t}getConfigMaximisedItems(){const t=[];return this.deepFilterContentItems(this.contentItems,t,(t=>!(!Gt.isStack(t)||!t.initialWantMaximise)||!(!Gt.isComponentItem(t)||!t.initialWantMaximise))),t}getItemsByPopInParentId(t){const e=[];return this.deepFilterContentItems(this.contentItems,e,(e=>e.popInParentIds.includes(t))),e}toConfig(){throw new Error(\"Cannot generate GroundItem config\")}setActiveComponentItem(t,e,i){}updateNodeSize(){const{width:t,height:e}=kt(this._containerElement);Tt(this.element,t),At(this.element,e),this.contentItems.length>0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e))}deepGetAllContentItems(t,e){for(let i=0;ithis.onClick(t),this._touchStartEventListener=t=>this.onTouchStart(t),this._element=document.createElement(\"div\"),this._element.classList.add(i),this._element.title=e,this._header.on(\"destroy\",(()=>this.destroy())),this._element.addEventListener(\"click\",this._clickEventListener,{passive:!0}),this._element.addEventListener(\"touchstart\",this._touchStartEventListener,{passive:!0}),this._header.controlsContainerElement.appendChild(this._element)}get element(){return this._element}destroy(){var t;this._element.removeEventListener(\"click\",this._clickEventListener),this._element.removeEventListener(\"touchstart\",this._touchStartEventListener),null===(t=this._element.parentNode)||void 0===t||t.removeChild(this._element)}onClick(t){this._pushEvent(t)}onTouchStart(t){this._pushEvent(t)}}class Jt{constructor(t,e,i,n,o){var s;this._layoutManager=t,this._componentItem=e,this._closeEvent=i,this._focusEvent=n,this._dragStartEvent=o,this._isActive=!1,this._tabClickListener=t=>this.onTabClickDown(t),this._tabTouchStartListener=t=>this.onTabTouchStart(t),this._closeClickListener=()=>this.onCloseClick(),this._closeTouchStartListener=()=>this.onCloseTouchStart(),this._dragStartListener=(t,e)=>this.onDragStart(t,e),this._contentItemDestroyListener=()=>this.onContentItemDestroy(),this._tabTitleChangedListener=t=>this.setTitle(t),this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_tab\"),this._titleElement=document.createElement(\"span\"),this._titleElement.classList.add(\"lm_title\"),this._closeElement=document.createElement(\"div\"),this._closeElement.classList.add(\"lm_close_tab\"),this._element.appendChild(this._titleElement),this._element.appendChild(this._closeElement),e.isClosable?this._closeElement.style.display=\"\":this._closeElement.style.display=\"none\",this.setTitle(e.title),this._componentItem.on(\"titleChanged\",this._tabTitleChangedListener);(null!==(s=e.reorderEnabled)&&void 0!==s?s:this._layoutManager.layoutConfig.settings.reorderEnabled)&&this.enableReorder(),this._element.addEventListener(\"click\",this._tabClickListener,{passive:!0}),this._element.addEventListener(\"touchstart\",this._tabTouchStartListener,{passive:!0}),this._componentItem.isClosable?(this._closeElement.addEventListener(\"click\",this._closeClickListener,{passive:!0}),this._closeElement.addEventListener(\"touchstart\",this._closeTouchStartListener,{passive:!0})):(this._closeElement.remove(),this._closeElement=void 0),this._componentItem.setTab(this),this._layoutManager.emit(\"tabCreated\",this)}get isActive(){return this._isActive}get componentItem(){return this._componentItem}get contentItem(){return this._componentItem}get element(){return this._element}get titleElement(){return this._titleElement}get closeElement(){return this._closeElement}get reorderEnabled(){return void 0!==this._dragListener}set reorderEnabled(t){t!==this.reorderEnabled&&(t?this.enableReorder():this.disableReorder())}setTitle(t){this._titleElement.innerText=t,this._element.title=t}setActive(t){t!==this._isActive&&(this._isActive=t,t?this._element.classList.add(\"lm_active\"):this._element.classList.remove(\"lm_active\"))}destroy(){var t,e;this._closeEvent=void 0,this._focusEvent=void 0,this._dragStartEvent=void 0,this._element.removeEventListener(\"click\",this._tabClickListener),this._element.removeEventListener(\"touchstart\",this._tabTouchStartListener),null===(t=this._closeElement)||void 0===t||t.removeEventListener(\"click\",this._closeClickListener),null===(e=this._closeElement)||void 0===e||e.removeEventListener(\"touchstart\",this._closeTouchStartListener),this._componentItem.off(\"titleChanged\",this._tabTitleChangedListener),this.reorderEnabled&&this.disableReorder(),this._element.remove()}setBlurred(){this._element.classList.remove(\"lm_focused\"),this._titleElement.classList.remove(\"lm_focused\")}setFocused(){this._element.classList.add(\"lm_focused\"),this._titleElement.classList.add(\"lm_focused\")}onDragStart(t,e){if(void 0===this._dragListener)throw new J(\"TODSDLU10093\");if(void 0===this._dragStartEvent)throw new J(\"TODS23309\");this._dragStartEvent(t,e,this._dragListener,this.componentItem)}onContentItemDestroy(){void 0!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=void 0)}onTabClickDown(t){const e=t.target;e!==this._element&&e!==this._titleElement||(0===t.button?this.notifyFocus():1===t.button&&this._componentItem.isClosable&&this.notifyClose())}onTabTouchStart(t){t.target===this._element&&this.notifyFocus()}onCloseClick(){this.notifyClose()}onCloseTouchStart(){this.notifyClose()}notifyClose(){if(void 0===this._closeEvent)throw new J(\"TNC15007\");this._closeEvent(this._componentItem)}notifyFocus(){if(void 0===this._focusEvent)throw new J(\"TNA15007\");this._focusEvent(this._componentItem)}enableReorder(){this._dragListener=new Zt(this._element,[this._titleElement]),this._dragListener.on(\"dragStart\",this._dragStartListener),this._componentItem.on(\"destroy\",this._contentItemDestroyListener)}disableReorder(){if(void 0===this._dragListener)throw new J(\"TDR87745\");this._componentItem.off(\"destroy\",this._contentItemDestroyListener),this._dragListener.off(\"dragStart\",this._dragStartListener),this._dragListener=void 0}}class Qt{constructor(t,e,i,n,o){this._layoutManager=t,this._componentRemoveEvent=e,this._componentFocusEvent=i,this._componentDragStartEvent=n,this._dropdownActiveChangedEvent=o,this._tabs=[],this._lastVisibleTabIndex=-1,this._dropdownActive=!1,this._element=document.createElement(\"section\"),this._element.classList.add(\"lm_tabs\"),this._dropdownElement=document.createElement(\"section\"),this._dropdownElement.classList.add(\"lm_tabdropdown_list\"),this._dropdownElement.style.display=\"none\"}get tabs(){return this._tabs}get tabCount(){return this._tabs.length}get lastVisibleTabIndex(){return this._lastVisibleTabIndex}get element(){return this._element}get dropdownElement(){return this._dropdownElement}get dropdownActive(){return this._dropdownActive}destroy(){for(let t=0;tthis.handleTabCloseEvent(t)),(t=>this.handleTabFocusEvent(t)),((t,e,i,n)=>this.handleTabDragStartEvent(t,e,i,n)));void 0===e&&(e=this._tabs.length),this._tabs.splice(e,0,i),ethis._lastVisibleTabIndex){const t=this._tabs[e];for(let t=e;t>0;t--)this._tabs[t]=this._tabs[t-1];this._tabs[0]=t}}updateTabSizes(t,e){let i=!1;this.tryUpdateTabSizes(i,t,e)||(i=!0,this.tryUpdateTabSizes(i,t,e)),i!==this._dropdownActive&&(this._dropdownActive=i,this._dropdownActiveChangedEvent())}tryUpdateTabSizes(t,e,i){if(this._tabs.length>0){if(void 0===i)throw new Error(\"non-empty tabs must have active component item\");let n=0,o=!1;const s=this._layoutManager.layoutConfig.settings.tabOverlapAllowance,r=this._tabs.indexOf(i.tab),a=this._tabs[r];this._lastVisibleTabIndex=-1;for(let i=0;ie){if(o)i===r&&(l.style.zIndex=\"auto\",l.style.marginLeft=\"\",l.parentElement!==this._element&&this._element.appendChild(l));else{let t;if(t=r>0&&r<=i?(d-e)/(i-1):(d-e)/i,tthis.onClick(t),this._touchStartListener=t=>this.onTouchStart(t),this._rowColumnClosable=!0,this._closeButton=null,this._popoutButton=null,this._tabsContainer=new Qt(this._layoutManager,(t=>this.handleTabInitiatedComponentRemoveEvent(t)),(t=>this.handleTabInitiatedComponentFocusEvent(t)),((t,e,i,n)=>this.handleTabInitiatedDragStartEvent(t,e,i,n)),(()=>this.processTabDropdownActiveChanged())),this._show=i.show,this._popoutEnabled=i.popoutEnabled,this._popoutLabel=i.popoutLabel,this._maximiseEnabled=i.maximiseEnabled,this._maximiseLabel=i.maximiseLabel,this._minimiseEnabled=i.minimiseEnabled,this._minimiseLabel=i.minimiseLabel,this._closeEnabled=i.closeEnabled,this._closeLabel=i.closeLabel,this._tabDropdownEnabled=i.tabDropdownEnabled,this._tabDropdownLabel=i.tabDropdownLabel,this.setSide(i.side),this._canRemoveComponent=this._configClosable,this._element=document.createElement(\"section\"),this._element.classList.add(\"lm_header\"),this._controlsContainerElement=document.createElement(\"section\"),this._controlsContainerElement.classList.add(\"lm_controls\"),this._element.appendChild(this._tabsContainer.element),this._element.appendChild(this._controlsContainerElement),this._element.appendChild(this._tabsContainer.dropdownElement),this._element.addEventListener(\"click\",this._clickListener,{passive:!0}),this._element.addEventListener(\"touchstart\",this._touchStartListener,{passive:!0}),this._documentMouseUpListener=()=>this._tabsContainer.hideAdditionalTabsDropdown(),globalThis.document.addEventListener(\"mouseup\",this._documentMouseUpListener,{passive:!0}),this._tabControlOffset=this._layoutManager.layoutConfig.settings.tabControlOffset,this._tabDropdownEnabled&&(this._tabDropdownButton=new Kt(this,this._tabDropdownLabel,\"lm_tabdropdown\",(()=>this._tabsContainer.showAdditionalTabsDropdown()))),this._popoutEnabled&&(this._popoutButton=new Kt(this,this._popoutLabel,\"lm_popout\",(()=>this.handleButtonPopoutEvent()))),this._maximiseEnabled&&(this._maximiseButton=new Kt(this,this._maximiseLabel,\"lm_maximise\",(t=>this.handleButtonMaximiseToggleEvent(t)))),this._configClosable&&(this._closeButton=new Kt(this,this._closeLabel,\"lm_close\",(()=>s()))),this.processTabDropdownActiveChanged()}get show(){return this._show}get side(){return this._side}get leftRightSided(){return this._leftRightSided}get layoutManager(){return this._layoutManager}get parent(){return this._parent}get tabs(){return this._tabsContainer.tabs}get lastVisibleTabIndex(){return this._tabsContainer.lastVisibleTabIndex}get element(){return this._element}get tabsContainerElement(){return this._tabsContainer.element}get controlsContainerElement(){return this._controlsContainerElement}destroy(){this.emit(\"destroy\"),this._popoutEvent=void 0,this._maximiseToggleEvent=void 0,this._clickEvent=void 0,this._touchStartEvent=void 0,this._componentRemoveEvent=void 0,this._componentFocusEvent=void 0,this._componentDragStartEvent=void 0,this._tabsContainer.destroy(),globalThis.document.removeEventListener(\"mouseup\",this._documentMouseUpListener),this._element.remove()}createTab(t,e){this._tabsContainer.createTab(t,e)}removeTab(t){this._tabsContainer.removeTab(t)}processActiveComponentChanged(t){this._tabsContainer.processActiveComponentChanged(t),this.updateTabSizes()}setSide(t){this._side=t,this._leftRightSided=[nt.right,nt.left].includes(this._side)}setRowColumnClosable(t){this._rowColumnClosable=t,this.updateClosability()}updateClosability(){let t;if(this._configClosable)if(this._rowColumnClosable){t=!0;const e=this.tabs.length;for(let i=0;i1}applyFocusedValue(t){t?this._element.classList.add(\"lm_focused\"):this._element.classList.remove(\"lm_focused\")}processMaximised(){if(void 0===this._maximiseButton)throw new J(\"HPMAX16997\");this._maximiseButton.element.setAttribute(\"title\",this._minimiseLabel)}processMinimised(){if(void 0===this._maximiseButton)throw new J(\"HPMIN16997\");this._maximiseButton.element.setAttribute(\"title\",this._maximiseLabel)}updateTabSizes(){if(this._tabsContainer.tabCount>0){const t=this._show?this._layoutManager.layoutConfig.dimensions.headerHeight:0;let e;this._leftRightSided?(this._element.style.height=\"\",this._element.style.width=zt(t)):(this._element.style.width=\"\",this._element.style.height=zt(t)),e=this._leftRightSided?this._element.offsetHeight-this._controlsContainerElement.offsetHeight-this._tabControlOffset:this._element.offsetWidth-this._controlsContainerElement.offsetWidth-this._tabControlOffset,this._tabsContainer.updateTabSizes(e,this._getActiveComponentItemEvent())}}handleTabInitiatedComponentRemoveEvent(t){if(this._canRemoveComponent){if(void 0===this._componentRemoveEvent)throw new J(\"HHTCE22294\");this._componentRemoveEvent(t)}}handleTabInitiatedComponentFocusEvent(t){if(void 0===this._componentFocusEvent)throw new J(\"HHTAE22294\");this._componentFocusEvent(t)}handleTabInitiatedDragStartEvent(t,e,i,n){if(this._canRemoveComponent){if(void 0===this._componentDragStartEvent)throw new J(\"HHTDSE22294\");this._componentDragStartEvent(t,e,i,n)}else i.cancelDrag()}processTabDropdownActiveChanged(){void 0!==this._tabDropdownButton&&Dt(this._tabDropdownButton.element,this._tabsContainer.dropdownActive)}handleButtonPopoutEvent(){if(this._layoutManager.layoutConfig.settings.popoutWholeStack){if(void 0===this._popoutEvent)throw new J(\"HHBPOE17834\");this._popoutEvent()}else{const t=this._getActiveComponentItemEvent();t&&t.popout()}}handleButtonMaximiseToggleEvent(t){if(void 0===this._maximiseToggleEvent)throw new J(\"HHBMTE16834\");this._maximiseToggleEvent()}onClick(t){t.target===this._element&&this.notifyClick(t)}onTouchStart(t){t.target===this._element&&this.notifyTouchStart(t)}notifyClick(t){if(void 0===this._clickEvent)throw new J(\"HNHC46834\");this._clickEvent(t)}notifyTouchStart(t){if(void 0===this._touchStartEvent)throw new J(\"HNHTS46834\");this._touchStartEvent(t)}}class ee extends $t{constructor(t,e,i){var n,o,s,r,a,l,h,d,c,m,u,p,g,f,v,_,y,C,w;super(t,e,i,ee.createElement(document)),this._headerSideChanged=!1,this._resizeListener=()=>this.handleResize(),this._maximisedListener=()=>this.handleMaximised(),this._minimisedListener=()=>this.handleMinimised(),this._headerConfig=e.header;const I=t.layoutConfig.header,b=e.content;let S;if(1!==b.length)S=void 0;else{S=b[0].header}this._initialWantMaximise=e.maximised,this._initialActiveItemIndex=null!==(n=e.activeItemIndex)&&void 0!==n?n:0;const E=null!==(r=null!==(s=null===(o=this._headerConfig)||void 0===o?void 0:o.show)&&void 0!==s?s:null==S?void 0:S.show)&&void 0!==r?r:I.show,x=null!==(h=null!==(l=null===(a=this._headerConfig)||void 0===a?void 0:a.popout)&&void 0!==l?l:null==S?void 0:S.popout)&&void 0!==h?h:I.popout,L=null!==(m=null!==(c=null===(d=this._headerConfig)||void 0===d?void 0:d.maximise)&&void 0!==c?c:null==S?void 0:S.maximise)&&void 0!==m?m:I.maximise,z=null!==(g=null!==(p=null===(u=this._headerConfig)||void 0===u?void 0:u.close)&&void 0!==p?p:null==S?void 0:S.close)&&void 0!==g?g:I.close,M=null!==(_=null!==(v=null===(f=this._headerConfig)||void 0===f?void 0:f.minimise)&&void 0!==v?v:null==S?void 0:S.minimise)&&void 0!==_?_:I.minimise,P=null!==(w=null!==(C=null===(y=this._headerConfig)||void 0===y?void 0:y.tabDropdown)&&void 0!==C?C:null==S?void 0:S.tabDropdown)&&void 0!==w?w:I.tabDropdown;this._maximisedEnabled=!1!==L;const T={show:!1!==E,side:!1===E?nt.top:E,popoutEnabled:!1!==x,popoutLabel:!1===x?\"\":x,maximiseEnabled:this._maximisedEnabled,maximiseLabel:!1===L?\"\":L,closeEnabled:!1!==z,closeLabel:!1===z?\"\":z,minimiseEnabled:!0,minimiseLabel:M,tabDropdownEnabled:!1!==P,tabDropdownLabel:!1===P?\"\":P};this._header=new te(t,this,T,e.isClosable&&!1!==z,(()=>this.getActiveComponentItem()),(()=>this.remove()),(()=>this.handlePopoutEvent()),(()=>this.toggleMaximise()),(t=>this.handleHeaderClickEvent(t)),(t=>this.handleHeaderTouchStartEvent(t)),(t=>this.handleHeaderComponentRemoveEvent(t)),(t=>this.handleHeaderComponentFocusEvent(t)),((t,e,i,n)=>this.handleHeaderComponentStartDragEvent(t,e,i,n))),this.isStack=!0,this._childElementContainer=document.createElement(\"section\"),this._childElementContainer.classList.add(\"lm_items\"),this.on(\"resize\",this._resizeListener),this._maximisedEnabled&&(this.on(\"maximised\",this._maximisedListener),this.on(\"minimised\",this._minimisedListener)),this.element.appendChild(this._header.element),this.element.appendChild(this._childElementContainer),this.setupHeaderPosition(),this._header.updateClosability()}get childElementContainer(){return this._childElementContainer}get header(){return this._header}get headerShow(){return this._header.show}get headerSide(){return this._header.side}get headerLeftRightSided(){return this._header.leftRightSided}get contentAreaDimensions(){return this._contentAreaDimensions}get initialWantMaximise(){return this._initialWantMaximise}get isMaximised(){return this===this.layoutManager.maximisedStack}get stackParent(){if(!this.parent)throw new Error(\"Stack should always have a parent\");return this.parent}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}init(){if(!0===this.isInitialised)return;this.updateNodeSize();for(let t=0;t0){if(this._initialActiveItemIndex<0||this._initialActiveItemIndex>=e)throw new Error(`ActiveItemIndex out of range: ${this._initialActiveItemIndex} id: ${this.id}`);for(let i=0;ithis.contentItems.length)throw e-=1,new X(\"SAC99728\");if(t instanceof jt)return e=super.addChild(t,e),this._childElementContainer.appendChild(t.element),this._header.createTab(t,e),this.setActiveComponentItem(t,i),this._header.updateTabSizes(),this.updateSize(!1),t.container.setBaseLogicalZIndex(),this._header.updateClosability(),this.emitStateChangedEvent(),e;throw new X(\"SACC88532\")}removeChild(t,e){const i=t,n=this.contentItems.indexOf(i),o=1===this.contentItems.length;if(this._activeComponentItem===i&&(i.focused&&i.blur(),!o)){const t=0===n?1:n-1;this.setActiveComponentItem(this.contentItems[t],!1)}this._header.removeTab(i),super.removeChild(i,e),o||this._header.updateClosability(),this.emitStateChangedEvent()}toggleMaximise(){this.isMaximised?this.minimise():this.maximise()}maximise(){if(!this.isMaximised){this.layoutManager.setMaximisedStack(this);const t=this.contentItems,e=t.length;for(let i=0;i0&&void 0===t)throw new Error(\"expected non-empty stack to have an active component item\");return{type:\"stack\",content:this.calculateConfigContent(),size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,isClosable:this.isClosable,maximised:this.isMaximised,header:this.createHeaderConfig(),activeItemIndex:t}}onDrop(t,e){if(\"header\"===this._dropSegment){if(this.resetHeaderDropZone(),void 0===this._dropIndex)throw new J(\"SODDI68990\");return void this.addChild(t,this._dropIndex)}if(\"body\"===this._dropSegment)return void this.addChild(t,0,!0);const i=\"top\"===this._dropSegment||\"bottom\"===this._dropSegment,n=\"left\"===this._dropSegment||\"right\"===this._dropSegment,o=\"top\"===this._dropSegment||\"left\"===this._dropSegment,s=i&&this.stackParent.isColumn||n&&this.stackParent.isRow;if(t.isComponent){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createAndInitContentItem(e,this);i.addChild(t),t=i}if(t.type===at.row||t.type===at.column){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}if(s){const e=this.stackParent.contentItems.indexOf(this);this.stackParent.addChild(t,o?e:e+1,!0),this.size*=.5,t.size=this.size,t.sizeUnit=this.sizeUnit,this.stackParent.updateSize(!1)}else{const e=i?at.column:at.row,n=ct.createDefault(e),s=this.layoutManager.createContentItem(n,this);this.stackParent.replaceChild(this,s),s.addChild(t,o?0:void 0,!0),s.addChild(this,o?void 0:0,!0),this.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}highlightDropZone(t,e){for(const i in this._contentAreaDimensions){const n=i,o=this._contentAreaDimensions[n].hoverArea;if(o.x1t&&o.y1e)return void(\"header\"===n?(this._dropSegment=\"header\",this.highlightHeaderDropZone(this._header.leftRightSided?e:t)):(this.resetHeaderDropZone(),this.highlightBodyDropZone(n)))}}getArea(){if(\"none\"===this.element.style.display)return null;const t=super.getElementArea(this._header.element),e=super.getElementArea(this._childElementContainer);if(null===t||null===e)throw new K(\"SGAHC13086\");const i=e.x2-e.x1,n=e.y2-e.y1;return this._contentAreaDimensions={header:{hoverArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2},highlightArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2}}},0===this.contentItems.length?(this._contentAreaDimensions.body={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2}},super.getElementArea(this.element)):(this._contentAreaDimensions.left={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x1+.25*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x1+.5*i,y2:e.y2}},this._contentAreaDimensions.top={hoverArea:{x1:e.x1+.25*i,y1:e.y1,x2:e.x1+.75*i,y2:e.y1+.5*n},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y1+.5*n}},this._contentAreaDimensions.right={hoverArea:{x1:e.x1+.75*i,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1+.5*i,y1:e.y1,x2:e.x2,y2:e.y2}},this._contentAreaDimensions.bottom={hoverArea:{x1:e.x1+.25*i,y1:e.y1+.5*n,x2:e.x1+.75*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1+.5*n,x2:e.x2,y2:e.y2}},super.getElementArea(this.element))}positionHeader(t){this._header.side!==t&&(this._header.setSide(t),this._headerSideChanged=!0,this.setupHeaderPosition())}updateNodeSize(){if(\"none\"!==this.element.style.display){const t=kt(this.element);if(this._header.show){t[this._header.leftRightSided?it.width:it.height]-=this.layoutManager.layoutConfig.dimensions.headerHeight}this._childElementContainer.style.width=zt(t.width),this._childElementContainer.style.height=zt(t.height);for(let e=0;e=o&&tthis.onDrag(t,e,i))),this._dragListener.on(\"dragStop\",(()=>this.onDrop())),this.createDragProxyElements(t,e),null===this._componentItem.parent)throw new K(\"DPC10097\");this._componentItemFocused=this._componentItem.focused,this._componentItemFocused&&this._componentItem.blur(),this._componentItem.parent.removeChild(this._componentItem,!0),this.setDimensions(),document.body.appendChild(this._element),this.determineMinMaxXY(),this._layoutManager.calculateItemAreas(),this.setDropPosition(t,e)}get element(){return this._element}createDragProxyElements(t,e){this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_dragProxy\");const i=document.createElement(\"div\");i.classList.add(\"lm_header\");const n=document.createElement(\"div\");n.classList.add(\"lm_tabs\");const o=document.createElement(\"div\");o.classList.add(\"lm_tab\");const s=document.createElement(\"span\");s.classList.add(\"lm_title\"),o.appendChild(s),n.appendChild(o),i.appendChild(n),this._proxyContainerElement=document.createElement(\"div\"),this._proxyContainerElement.classList.add(\"lm_content\"),this._element.appendChild(i),this._element.appendChild(this._proxyContainerElement),this._originalParent instanceof ee&&this._originalParent.headerShow&&(this._sided=this._originalParent.headerLeftRightSided,this._element.classList.add(\"lm_\"+this._originalParent.headerSide),[nt.right,nt.bottom].indexOf(this._originalParent.headerSide)>=0&&this._proxyContainerElement.insertAdjacentElement(\"afterend\",i)),this._element.style.left=zt(t),this._element.style.top=zt(e),o.setAttribute(\"title\",this._componentItem.title),s.insertAdjacentText(\"afterbegin\",this._componentItem.title),this._proxyContainerElement.appendChild(this._componentItem.element)}determineMinMaxXY(){const t=this._layoutManager.groundItem;if(void 0===t)throw new J(\"DPDMMXY73109\");{const e=t.element.getBoundingClientRect();this._minX=e.left+document.body.scrollLeft,this._minY=e.top+document.body.scrollTop,this._maxX=this._minX+e.width,this._maxY=this._minY+e.height}}onDrag(t,e,i){const n=i.pageX,o=i.pageY;this.setDropPosition(n,o),this._componentItem.drag()}setDropPosition(t,e){this._layoutManager.layoutConfig.settings.constrainDragToContainer&&(t<=this._minX?t=Math.ceil(this._minX):t>=this._maxX&&(t=Math.floor(this._maxX)),e<=this._minY?e=Math.ceil(this._minY):e>=this._maxY&&(e=Math.floor(this._maxY))),this._element.style.left=zt(t),this._element.style.top=zt(e),this._area=this._layoutManager.getArea(t,e),null!==this._area&&(this._lastValidArea=this._area,this._area.contentItem.highlightDropZone(t,e,this._area))}onDrop(){const t=this._layoutManager.dropTargetIndicator;if(null===t)throw new K(\"DPOD30011\");let e;if(t.hide(),this._componentItem.exitDragMode(),null!==this._area)e=this._componentItem,this._area.contentItem.onDrop(e,this._area);else if(null!==this._lastValidArea){e=this._componentItem;this._lastValidArea.contentItem.onDrop(e,this._lastValidArea)}else this._originalParent?(e=this._componentItem,this._originalParent.addChild(e)):this._componentItem.destroy();this._element.remove(),this._layoutManager.emit(\"itemDropped\",this._componentItem),this._componentItemFocused&&void 0!==e&&e.focus()}setDimensions(){const t=this._layoutManager.layoutConfig.dimensions;if(void 0===t)throw new Error(\"DragProxy.setDimensions: dimensions undefined\");let e=t.dragProxyWidth,i=t.dragProxyHeight;if(void 0===e||void 0===i)throw new Error(\"DragProxy.setDimensions: width and/or height undefined\");const n=!1===this._layoutManager.layoutConfig.header.show?0:t.headerHeight;this._element.style.width=zt(e),this._element.style.height=zt(i),e-=this._sided?n:0,i-=this._sided?0:n,this._proxyContainerElement.style.width=zt(e),this._proxyContainerElement.style.height=zt(i),this._componentItem.enterDragMode(e,i),this._componentItem.show()}}class ne{constructor(t,e,i,n,o,s,r){this._layoutManager=t,this._element=e,this._extraAllowableChildTargets=i,this._componentTypeOrFtn=n,this._componentState=o,this._title=s,this._id=r,this._dragListener=null,this._dummyGroundContainer=document.createElement(\"div\");const a=gt.createDefault(\"row\");this._dummyGroundContentItem=new Yt(this._layoutManager,a,this._dummyGroundContainer),this.createDragListener()}destroy(){this.removeDragListener()}createDragListener(){this.removeDragListener(),this._dragListener=new Zt(this._element,this._extraAllowableChildTargets),this._dragListener.on(\"dragStart\",((t,e)=>this.onDragStart(t,e))),this._dragListener.on(\"dragStop\",(()=>this.onDragStop()))}onDragStart(t,e){var i;const n=\"component\";let o;if(\"function\"==typeof this._componentTypeOrFtn){const t=this._componentTypeOrFtn();o=ne.isDragSourceComponentItemConfig(t)?{type:n,componentState:t.state,componentType:t.type,title:null!==(i=t.title)&&void 0!==i?i:this._title}:t}else o={type:n,componentState:this._componentState,componentType:this._componentTypeOrFtn,title:this._title,id:this._id};const s=bt.resolve(o,!1),r=new jt(this._layoutManager,s,this._dummyGroundContentItem);if(this._dummyGroundContentItem.contentItems.push(r),null===this._dragListener)throw new K(\"DSODSD66746\");{const i=new ie(t,e,this._dragListener,this._layoutManager,r,this._dummyGroundContentItem),n=this._layoutManager.transitionIndicator;if(null===n)throw new K(\"DSODST66746\");n.transitionElements(this._element,i.element)}}onDragStop(){this.createDragListener()}removeDragListener(){null!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=null)}}!function(t){t.isDragSourceComponentItemConfig=function(t){return!(\"componentType\"in t)}}(ne||(ne={}));class oe{constructor(){this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_dropTargetIndicator\");const t=document.createElement(\"div\");t.classList.add(\"lm_inner\"),this._element.appendChild(t),document.body.appendChild(this._element)}destroy(){this._element.remove()}highlightArea(t,e){this._element.style.left=zt(t.x1+e),this._element.style.top=zt(t.y1+e),this._element.style.width=zt(t.x2-t.x1-e),this._element.style.height=zt(t.y2-t.y1-e),this._element.style.display=\"block\"}hide(){Dt(this._element,!1)}}class se{constructor(){this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_transition_indicator\"),document.body.appendChild(this._element),this._toElement=null,this._fromDimensions=null,this._totalAnimationDuration=200,this._animationStartTime=null}destroy(){this._element.remove()}transitionElements(t,e){}nextAnimationFrame(){}measure(t){const e=t.getBoundingClientRect();return{left:e.left,top:e.top,width:t.offsetWidth,height:t.offsetHeight}}}class re extends Wt{constructor(t){super(),this._layoutManager=t,this._childEventListener=t=>this.onEventFromChild(t),globalThis.addEventListener(re.ChildEventName,this._childEventListener,{passive:!0})}emit(t,...e){\"userBroadcast\"===t?this.emitUserBroadcast(...e):super.emit(t,...e)}emitUserBroadcast(...t){this.handleUserBroadcastEvent(\"userBroadcast\",t)}destroy(){globalThis.removeEventListener(re.ChildEventName,this._childEventListener)}handleUserBroadcastEvent(t,e){this._layoutManager.isSubWindow?this.propagateToParent(t,e):this.propagateToThisAndSubtree(t,e)}onEventFromChild(t){const e=t.detail;this.handleUserBroadcastEvent(e.eventName,e.args)}propagateToParent(t,e){const i={bubbles:!0,cancelable:!0,detail:{layoutManager:this._layoutManager,eventName:t,args:e}},n=new CustomEvent(re.ChildEventName,i),o=globalThis.opener;if(null===o)throw new K(\"EHPTP15778\");o.dispatchEvent(n)}propagateToThisAndSubtree(t,e){this.emitUnknown(t,...e);for(let i=0;ithis.handleContainerResize())),this._windowBeforeUnloadListener=()=>this.onBeforeUnload(),this._windowBeforeUnloadListening=!1,this._maximisedStackBeforeDestroyedListener=t=>this.cleanupBeforeMaximisedStackDestroyed(t),this.isSubWindow=t.isSubWindow,this._constructorOrSubWindowLayoutConfig=t.constructorOrSubWindowLayoutConfig,Q.checkInitialise(),dt.checkInitialise(),void 0!==t.containerElement&&(this._containerElement=t.containerElement)}get container(){return this._containerElement}get isInitialised(){return this._isInitialised}get groundItem(){return this._groundItem}get root(){return this._groundItem}get openPopouts(){return this._openPopouts}get dropTargetIndicator(){return this._dropTargetIndicator}get transitionIndicator(){return this._transitionIndicator}get width(){return this._width}get height(){return this._height}get eventHub(){return this._eventHub}get rootItem(){if(void 0===this._groundItem)throw new Error(\"Cannot access rootItem before init\");return 0===this._groundItem.contentItems.length?void 0:this._groundItem.contentItems[0]}get focusedComponentItem(){return this._focusedComponentItem}get tabDropPlaceholder(){return this._tabDropPlaceholder}get maximisedStack(){return this._maximisedStack}get deprecatedConstructor(){return!this.isSubWindow&&void 0!==this._constructorOrSubWindowLayoutConfig}destroy(){if(this._isInitialised){this._windowBeforeUnloadListening&&(globalThis.removeEventListener(\"beforeunload\",this._windowBeforeUnloadListener),this._windowBeforeUnloadListening=!1),!0===this.layoutConfig.settings.closePopoutsOnUnload&&this.closeAllOpenPopouts(),this._resizeObserver.disconnect(),this.checkClearResizeTimeout(),void 0!==this._groundItem&&this._groundItem.destroy(),this._tabDropPlaceholder.remove(),null!==this._dropTargetIndicator&&this._dropTargetIndicator.destroy(),null!==this._transitionIndicator&&this._transitionIndicator.destroy(),this._eventHub.destroy();for(const t of this._dragSources)t.destroy();this._dragSources=[],this._isInitialised=!1}}minifyConfig(t){return _t.minifyConfig(t)}unminifyConfig(t){return _t.unminifyConfig(t)}init(){let t;if(this.setContainer(),this._dropTargetIndicator=new oe,this._transitionIndicator=new se,this.updateSizeFromContainer(),this.isSubWindow){if(void 0===this._constructorOrSubWindowLayoutConfig)throw new J(\"LMIU07155\");{const e=this._constructorOrSubWindowLayoutConfig.root;if(void 0===e)throw new X(\"LMIC07156\");if(!Ct.isComponent(e))throw new X(\"LMIC07157\");t=e;const i=xt.resolve(this._constructorOrSubWindowLayoutConfig);this.layoutConfig=Object.assign(Object.assign({},i),{root:void 0})}}else void 0===this._constructorOrSubWindowLayoutConfig?this.layoutConfig=_t.createDefault():this.layoutConfig=xt.resolve(this._constructorOrSubWindowLayoutConfig);const e=this.layoutConfig;this._groundItem=new Yt(this,e.root,this._containerElement),this._groundItem.init(),this.checkLoadedLayoutMaximiseItem(),this._resizeObserver.observe(this._containerElement),this._isInitialised=!0,this.adjustColumnsResponsive(),this.emit(\"initialised\"),void 0!==t&&this.loadComponentAsRoot(t)}loadLayout(t){if(!this.isInitialised)throw new Error(\"GoldenLayout: Need to call init() if LayoutConfig with defined root passed to constructor\");if(void 0===this._groundItem)throw new J(\"LMLL11119\");this.createSubWindows(),this.layoutConfig=xt.resolve(t),this._groundItem.loadRoot(this.layoutConfig.root),this.checkLoadedLayoutMaximiseItem(),this.adjustColumnsResponsive()}saveLayout(){if(!1===this._isInitialised)throw new Error(\"Can't create config, layout not yet initialised\");if(void 0===this._groundItem)throw new J(\"LMTC18244\");{const t=this._groundItem.calculateConfigContent();let e;e=1!==t.length?void 0:t[0],this.reconcilePopoutWindows();const i=[];for(let t=0;t=0?n=this._groundItem.contentItems[0]:e=0;break;case at.row:case at.column:e=n.addItem(t,i.index);break;case at.stack:if(Ct.isComponent(t)){e=n.addItem(t,i.index);break}throw Error(tt[6]);case at.component:throw new X(\"LMAIALC87444602\");default:throw new Y(\"LMAIALU98881733\",n.type)}if(Ct.isComponent(t)){const t=n.contentItems[e];Gt.isStack(t)&&(n=t,e=0)}return i.parentItem=n,i.index=e,i}}}loadComponentAsRoot(t){if(void 0===this._groundItem)throw new Error(\"Cannot add item before init\");this._groundItem.loadComponentAsRoot(t)}updateSize(t,e){this.setSize(t,e)}setSize(t,e){if(this._width=t,this._height=e,!0===this._isInitialised){if(void 0===this._groundItem)throw new J(\"LMUS18881\");if(this._groundItem.setSize(this._width,this._height),this._maximisedStack){const{width:t,height:e}=kt(this._containerElement);Tt(this._maximisedStack.element,t),At(this._maximisedStack.element,e),this._maximisedStack.updateSize(!1)}this.adjustColumnsResponsive()}}beginSizeInvalidation(){this._sizeInvalidationBeginCount++}endSizeInvalidation(){0==--this._sizeInvalidationBeginCount&&this.updateSizeFromContainer()}updateSizeFromContainer(){const{width:t,height:e}=kt(this._containerElement);this.setSize(t,e)}updateRootSize(t=!1){if(void 0===this._groundItem)throw new J(\"LMURS28881\");this._groundItem.updateSize(t)}createAndInitContentItem(t,e){const i=this.createContentItem(t,e);return i.init(),i}createContentItem(t,e){if(\"string\"!=typeof t.type)throw new G(\"Missing parameter 'type'\",JSON.stringify(t));if(ct.isComponentItem(t)&&!(e instanceof ee)&&e&&!(!0===this.isSubWindow&&e instanceof Yt)){t={type:at.stack,content:[t],size:t.size,sizeUnit:t.sizeUnit,minSize:t.minSize,minSizeUnit:t.minSizeUnit,id:t.id,maximised:t.maximised,isClosable:t.isClosable,activeItemIndex:0,header:void 0}}return this.createContentItemFromConfig(t,e)}findFirstComponentItemById(t){if(void 0===this._groundItem)throw new J(\"LMFFCIBI82446\");return this.findFirstContentItemTypeByIdRecursive(at.component,t,this._groundItem)}createPopout(t,e,i,n){return t instanceof Gt?this.createPopoutFromContentItem(t,e,i,n):this.createPopoutFromItemConfig(t,e,i,n)}createPopoutFromContentItem(t,e,i,n){let o=t.parent,s=t;for(;null!==o&&1===o.contentItems.length&&!o.isGround;)s=o,o=o.parent;if(null===o)throw new K(\"LMCPFCI00834\");{if(void 0===n&&(n=o.contentItems.indexOf(s)),null!==i&&o.addPopInParentId(i),void 0===e){const i=globalThis.screenX||globalThis.screenLeft,n=globalThis.screenY||globalThis.screenTop,o=t.element.offsetLeft,s=t.element.offsetTop,{width:r,height:a}=kt(t.element);e={left:i+o,top:n+s,width:r,height:a}}const r=t.toConfig();if(t.remove(),ft.isRootItemConfig(r))return this.createPopoutFromItemConfig(r,e,i,n);throw new Error(`${tt[0]}`)}}beginVirtualSizedContainerAdding(){0==++this._virtualSizedContainerAddingBeginCount&&(this._virtualSizedContainers.length=0)}addVirtualSizedContainer(t){this._virtualSizedContainers.push(t)}endVirtualSizedContainerAdding(){if(0==--this._virtualSizedContainerAddingBeginCount){const t=this._virtualSizedContainers.length;if(t>0){this.fireBeforeVirtualRectingEvent(t);for(let e=0;ethis.emit(\"windowOpened\",a))),a.on(\"closed\",(()=>this.reconcilePopoutWindows())),this._openPopouts.push(a),this.layoutConfig.settings.closePopoutsOnUnload&&!this._windowBeforeUnloadListening&&(globalThis.addEventListener(\"beforeunload\",this._windowBeforeUnloadListener,{passive:!0}),this._windowBeforeUnloadListening=!0),a}closeAllOpenPopouts(){for(let t=0;tglobalThis.close()),1)}getArea(t,e){let i=null,n=1/0;for(let o=0;o=s.x1&&t=s.y1&&es.surface&&(n=s.surface,i=s)}return i}calculateItemAreas(){const t=this.getAllContentItems(),e=this._groundItem;if(void 0===e)throw new J(\"LMCIAR44365\");if(1!==t.length){e.contentItems[0].isStack?this._itemAreas=[]:this._itemAreas=e.createSideAreas();for(let e=0;e0){let e=t[0];if(Gt.isComponentItem(e)){const t=e.parent;if(null===t)throw new K(\"LMXLLMI69999\");e=t}if(!Gt.isStack(e))throw new X(\"LMCLLMI19993\");e.maximise()}}}processMaximiseStack(t){if(this._maximisedStack=t,t.on(\"beforeItemDestroyed\",this._maximisedStackBeforeDestroyedListener),t.element.classList.add(\"lm_maximised\"),t.element.insertAdjacentElement(\"afterend\",this._maximisePlaceholder),void 0===this._groundItem)throw new J(\"LMMXI19993\");{this._groundItem.element.prepend(t.element);const{width:e,height:i}=kt(this._containerElement);Tt(t.element,e),At(t.element,i),t.updateSize(!0),t.focusActiveContentItem(),this._maximisedStack.emit(\"maximised\"),this.emit(\"stateChanged\")}}processMinimiseMaximisedStack(){if(void 0===this._maximisedStack)throw new X(\"LMMMS74422\");{const t=this._maximisedStack;if(null===t.parent)throw new K(\"LMMI13668\");t.element.classList.remove(\"lm_maximised\"),this._maximisePlaceholder.insertAdjacentElement(\"afterend\",t.element),this._maximisePlaceholder.remove(),this.updateRootSize(!0),this._maximisedStack=void 0,t.off(\"beforeItemDestroyed\",this._maximisedStackBeforeDestroyedListener),t.emit(\"minimised\"),this.emit(\"stateChanged\")}}reconcilePopoutWindows(){const t=[];for(let e=0;e{this._resizeTimeoutId=void 0,this.beginSizeInvalidation(),this.endSizeInvalidation()}),this.resizeDebounceInterval))}checkClearResizeTimeout(){void 0!==this._resizeTimeoutId&&(clearTimeout(this._resizeTimeoutId),this._resizeTimeoutId=void 0)}setContainer(){var t;const e=document.body,i=null!==(t=this._containerElement)&&void 0!==t?t:e;if(i===e){this.resizeWithContainerAutomatically=!0;const t=document.documentElement;t.style.height=\"100%\",t.style.margin=\"0\",t.style.padding=\"0\",t.style.overflow=\"clip\",e.style.height=\"100%\",e.style.margin=\"0\",e.style.padding=\"0\",e.style.overflow=\"clip\"}this._containerElement=i}onBeforeUnload(){this.destroy()}adjustColumnsResponsive(){if(void 0===this._groundItem)throw new J(\"LMACR20883\");if(this._firstLoad=!1,this.useResponsiveLayout()&&!this._updatingColumnsResponsive&&this._groundItem.contentItems.length>0&&this._groundItem.contentItems[0].isRow){if(void 0===this._groundItem||null===this._width)throw new J(\"LMACR77412\");{const t=this._groundItem.contentItems[0].contentItems.length;if(t<=1)return;{const e=this.layoutConfig.dimensions.defaultMinItemWidth;if(t*e<=this._width)return;{this._updatingColumnsResponsive=!0;const i=t-Math.max(Math.floor(this._width/e),1),n=this._groundItem.contentItems[0],o=this.getAllStacks();if(0===o.length)throw new X(\"LMACRS77413\");{const t=o[0];for(let e=0;en?void 0:{parentItem:t,index:o}}}case 1:if(void 0===this._focusedComponentItem)return;{const t=this._focusedComponentItem.parentItem;return this.tryCreateLocationFromParentItem(t,e)}case 2:{const t=this.findFirstContentItemType(at.stack);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 3:{let t=this.findFirstContentItemType(at.row);return void 0!==t?this.tryCreateLocationFromParentItem(t,e):(t=this.findFirstContentItemType(at.column),void 0!==t?this.tryCreateLocationFromParentItem(t,e):void 0)}case 4:{const t=this.findFirstContentItemType(at.row);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 5:{const t=this.findFirstContentItemType(at.column);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 6:if(void 0===this._groundItem)throw new J(\"LMFLRIF18244\");return void 0!==this.rootItem?void 0:void 0===e||0===e?{parentItem:this._groundItem,index:0}:void 0;case 7:if(void 0===this._groundItem)throw new J(\"LMFLF18244\");{const t=this._groundItem.contentItems;if(0===t.length)return void 0===e||0===e?{parentItem:this._groundItem,index:0}:void 0;{const i=t[0];return this.tryCreateLocationFromParentItem(i,e)}}}}tryCreateLocationFromParentItem(t,e){const i=t.contentItems.length;return void 0===e?{parentItem:t,index:i}:e<0||e>i?void 0:{parentItem:t,index:e}}}!function(t){t.createMaximisePlaceElement=function(t){const e=t.createElement(\"div\");return e.classList.add(\"lm_maximise_place\"),e},t.createTabDropPlaceholderElement=function(t){const e=t.createElement(\"div\");return e.classList.add(\"lm_drop_tab_placeholder\"),e},t.defaultLocationSelectors=[{typeId:1,index:void 0},{typeId:2,index:void 0},{typeId:3,index:void 0},{typeId:7,index:void 0}],t.afterFocusedItemIfPossibleLocationSelectors=[{typeId:0,index:1},{typeId:2,index:void 0},{typeId:3,index:void 0},{typeId:7,index:void 0}]}(ae||(ae={}));class le extends ae{constructor(t,e,i,n){if(super(le.createLayoutManagerConstructorParameters(t,e)),this._bindComponentEventHanlderPassedInConstructor=!1,this._creationTimeoutPassed=!1,void 0!==e&&\"function\"==typeof e&&(this.bindComponentEvent=e,this._bindComponentEventHanlderPassedInConstructor=!0,void 0!==i&&(this.unbindComponentEvent=i)),!this._bindComponentEventHanlderPassedInConstructor&&this.isSubWindow){if(void 0===this._constructorOrSubWindowLayoutConfig)throw new J(\"VLC98823\");{const t=xt.resolve(this._constructorOrSubWindowLayoutConfig);this.layoutConfig=Object.assign(Object.assign({},t),{root:void 0})}}!0!==n&&(this.deprecatedConstructor||this.init())}destroy(){this.bindComponentEvent=void 0,this.unbindComponentEvent=void 0,super.destroy()}init(){if(this._bindComponentEventHanlderPassedInConstructor||\"loading\"!==document.readyState&&null!==document.body){if(!this._bindComponentEventHanlderPassedInConstructor&&!0===this.isSubWindow&&!this._creationTimeoutPassed)return setTimeout((()=>this.init()),7),void(this._creationTimeoutPassed=!0);!0===this.isSubWindow&&(this._bindComponentEventHanlderPassedInConstructor||this.clearHtmlAndAdjustStylesForSubWindow(),window.__glInstance=this),super.init()}else document.addEventListener(\"DOMContentLoaded\",(()=>this.init()),{passive:!0})}clearHtmlAndAdjustStylesForSubWindow(){const t=document.head,e=new Array(4);e[0]=document.querySelectorAll(\"body link\"),e[1]=document.querySelectorAll(\"body style\"),e[2]=document.querySelectorAll(\"template\"),e[3]=document.querySelectorAll(\".gl_keep\");for(let i=0;ithis.emit(\"popIn\"))),document.body.appendChild(t),!0}}bindComponent(t,e){if(void 0!==this.bindComponentEvent){return this.bindComponentEvent(t,e)}if(void 0!==this.getComponentEvent)return{virtual:!1,component:this.getComponentEvent(t,e)};{const t=`${tt[2]}: ${JSON.stringify(e)}`;throw new Z(t)}}unbindComponent(t,e,i){if(void 0!==this.unbindComponentEvent)this.unbindComponentEvent(t);else if(!e&&void 0!==this.releaseComponentEvent){if(void 0===i)throw new J(\"VCUCRCU333998\");this.releaseComponentEvent(t,i)}}}!function(t){let e=!1;t.createLayoutManagerConstructorParameters=function(t,i){const n=e?null:new URL(document.location.href).searchParams.get(\"gl-window\");e=!0;const o=null!==n;let s,r;if(null!==n){const e=localStorage.getItem(n);if(null===e)throw new Error(\"Null gl-window Config\");localStorage.removeItem(n);const i=JSON.parse(e),o=_t.unminifyConfig(i);r=xt.fromResolved(o),t instanceof HTMLElement&&(s=t)}else void 0===t?r=void 0:t instanceof HTMLElement?(r=void 0,s=t):r=t,void 0===s&&i instanceof HTMLElement&&(s=i);return{constructorOrSubWindowLayoutConfig:r,isSubWindow:o,containerElement:s}}}(le||(le={}));class he extends le{constructor(t,e,i){super(t,e,i,!0),this._componentTypesMap=new Map,this._registeredComponentMap=new Map,this._virtuableComponentMap=new Map,this._containerVirtualRectingRequiredEventListener=(t,e,i)=>this.handleContainerVirtualRectingRequiredEvent(t,e,i),this._containerVirtualVisibilityChangeRequiredEventListener=(t,e)=>this.handleContainerVirtualVisibilityChangeRequiredEvent(t,e),this._containerVirtualZIndexChangeRequiredEventListener=(t,e,i)=>this.handleContainerVirtualZIndexChangeRequiredEvent(t,e,i),this.deprecatedConstructor||this.init()}registerComponent(t,e,i=!1){if(\"function\"!=typeof e)throw new $(\"registerComponent() componentConstructorOrFactoryFtn parameter is not a function\");if(e.hasOwnProperty(\"prototype\")){const n=e;this.registerComponentConstructor(t,n,i)}else{const n=e;this.registerComponentFactoryFunction(t,n,i)}}registerComponentConstructor(t,e,i=!1){if(\"function\"!=typeof e)throw new Error(tt[1]);if(void 0!==this._componentTypesMap.get(t))throw new Z(`${tt[3]}: ${t}`);this._componentTypesMap.set(t,{constructor:e,factoryFunction:void 0,virtual:i})}registerComponentFactoryFunction(t,e,i=!1){if(\"function\"!=typeof e)throw new Z(\"Please register a constructor function\");if(void 0!==this._componentTypesMap.get(t))throw new Z(`${tt[3]}: ${t}`);this._componentTypesMap.set(t,{constructor:void 0,factoryFunction:e,virtual:i})}registerComponentFunction(t){this.registerGetComponentConstructorCallback(t)}registerGetComponentConstructorCallback(t){if(\"function\"!=typeof t)throw new Error(\"Please register a callback function\");void 0!==this._getComponentConstructorFtn&&console.warn(\"Multiple component functions are being registered. Only the final registered function will be used.\"),this._getComponentConstructorFtn=t}getRegisteredComponentTypeNames(){const t=this._componentTypesMap.keys();return Array.from(t)}getComponentInstantiator(t){let e;const i=pt.resolveComponentTypeName(t);return void 0!==i&&(e=this._componentTypesMap.get(i)),void 0===e&&void 0!==this._getComponentConstructorFtn&&(e={constructor:this._getComponentConstructorFtn(t),factoryFunction:void 0,virtual:!1}),e}bindComponent(t,e){let i;const n=pt.resolveComponentTypeName(e);let o;if(void 0!==n&&(i=this._componentTypesMap.get(n)),void 0===i&&void 0!==this._getComponentConstructorFtn&&(i={constructor:this._getComponentConstructorFtn(e),factoryFunction:void 0,virtual:!1}),void 0!==i){const s=i.virtual;let r,a;r=void 0===e.componentState?void 0:Ut({},e.componentState);const l=i.constructor;if(void 0!==l)a=new l(t,r,s);else{const e=i.factoryFunction;if(void 0===e)throw new X(\"LMBCFFU10008\");a=e(t,r,s)}if(s){if(void 0===a)throw new J(\"GLBCVCU988774\");{const e=a,i=e.rootHtmlElement;if(void 0===i)throw new Z(`${tt[5]}: ${n}`);!function(t){const e=\"absolute\";t.style.position!==e&&(t.style.position=e)}(i),this.container.appendChild(i),this._virtuableComponentMap.set(t,e),t.virtualRectingRequiredEvent=this._containerVirtualRectingRequiredEventListener,t.virtualVisibilityChangeRequiredEvent=this._containerVirtualVisibilityChangeRequiredEventListener,t.virtualZIndexChangeRequiredEvent=this._containerVirtualZIndexChangeRequiredEventListener}}this._registeredComponentMap.set(t,a),o={virtual:i.virtual,component:a}}else o=super.bindComponent(t,e);return o}unbindComponent(t,e,i){if(void 0===this._registeredComponentMap.get(t))super.unbindComponent(t,e,i);else{const e=this._virtuableComponentMap.get(t);if(void 0!==e){const i=e.rootHtmlElement;if(void 0===i)throw new X(\"GLUC77743\",t.title);this.container.removeChild(i),this._virtuableComponentMap.delete(t)}}}fireBeforeVirtualRectingEvent(t){this._goldenLayoutBoundingClientRect=this.container.getBoundingClientRect(),super.fireBeforeVirtualRectingEvent(t)}handleContainerVirtualRectingRequiredEvent(t,e,i){const n=this._virtuableComponentMap.get(t);if(void 0===n)throw new J(\"GLHCSCE55933\");{const o=n.rootHtmlElement;if(void 0===o)throw new Z(tt[4]+\" \"+t.title);{const n=t.element.getBoundingClientRect(),s=n.left-this._goldenLayoutBoundingClientRect.left;o.style.left=zt(s);const r=n.top-this._goldenLayoutBoundingClientRect.top;o.style.top=zt(r),Tt(o,e),At(o,i)}}}handleContainerVirtualVisibilityChangeRequiredEvent(t,e){const i=this._virtuableComponentMap.get(t);if(void 0===i)throw new J(\"GLHCVVCRE55934\");{const n=i.rootHtmlElement;if(void 0===n)throw new Z(tt[4]+\" \"+t.title);Dt(n,e)}}handleContainerVirtualZIndexChangeRequiredEvent(t,e,i){const n=this._virtuableComponentMap.get(t);if(void 0===n)throw new J(\"GLHCVZICRE55935\");{const e=n.rootHtmlElement;if(void 0===e)throw new Z(tt[4]+\" \"+t.title);e.style.zIndex=i}}}const de=\"initial_\",ce={show:\"top\",popout:!1,maximise:!1,close:\"close-tab-unused\"},me={headerHeight:31},ue={hasHeaders:!0,reorderEnabled:!0},pe={popoutWholeStack:!1,constrainDragToContainer:!1,constrainDragToHeaders:!1,preventDragout:!1,showMaximiseIcon:!1,showPopoutIcon:!1,showCloseIcon:!1,blockedPopoutsThrowError:!0,closePopoutsOnUnload:!0,selectionEnabled:!1};var ge,fe;class ve{constructor(e){this.layout=e,ge.set(this,void 0),fe.set(this,void 0),this.handleResize=t=>{t.forEach((t=>this.resizeElement(t.target)))},this.handleMutation=()=>{this.layout.viewComponentsByContainerElement.forEach((t=>{this.resizeElement(t.container.element)}))},t.__classPrivateFieldSet(this,ge,new ResizeObserver(this.handleResize),\"f\"),t.__classPrivateFieldSet(this,fe,new MutationObserver(this.handleMutation),\"f\")}observeMutations(e){t.__classPrivateFieldGet(this,fe,\"f\")?.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[\"class\"]})}destroy(){t.__classPrivateFieldGet(this,ge,\"f\").disconnect(),t.__classPrivateFieldGet(this,fe,\"f\").disconnect()}observeContainer(e){t.__classPrivateFieldGet(this,ge,\"f\").observe(e)}unobserveContainer(e){t.__classPrivateFieldGet(this,ge,\"f\").unobserve(e)}resizeElement(t){const e=this.layout.viewComponentsByContainerElement.get(t);e&&e.resize()}}ge=new WeakMap,fe=new WeakMap;var _e={};Object.defineProperty(_e,\"__esModule\",{value:!0});var ye=_e.BaseItem=void 0;class Ce{constructor(t,e,i){this._item=t,this._layout=e,this._wrap=i}get raw(){return this._item}get layout(){return this._layout}get type(){return this._item.type}get contentItems(){return(this._item.contentItems??[]).map((t=>this._wrap(t)))}get parent(){const t=this._item.parent;return t?this._wrap(t):null}setActiveContentItem(t,e){if(\"stack\"!==this.type)throw new Error(`Cannot call setActiveContentItem from a non-stack item: ${this.type}`);this._item.setActiveContentItem(t.raw,e)}static wrapInternal(t,e,i){const n=Ce.wrapCache.get(e);if(n)return n;const o=new t(e,i,(e=>Ce.wrapInternal(t,e,i)));return Ce.wrapCache.set(e,o),o}}ye=_e.BaseItem=Ce,Ce.wrapCache=new WeakMap;const we=t=>!!t&&\"contentItems\"in t&&(t.isRow||t.isColumn);class Ie extends ye{isRoot(){return!!this._item.parent?.isGround}getBounds(){return this._item.element.getBoundingClientRect()}get viewName(){if(this._item.isComponent){const{component:t}=this._item;return t.identity.name}throw new Error(\"View name not found\")}onDestroyed(t){const e=({target:i})=>{i===this._item&&(t(),this._item.off(\"itemDestroyed\",e))};this._item.on(\"itemDestroyed\",e)}createAdjacentStack({position:t=\"right\"}={}){const e=this.raw;if(ee.isStack(e)&&e.parent){const i=[\"top\",\"bottom\"].includes(t)?\"column\":\"row\",n=[\"left\",\"top\"].includes(t)?1:0,o=we(e.parent)?e.parent:e.layoutManager,s=o,r=e.parent.contentItems.indexOf(e);e.parent.isGround&&e.parent.removeChild(e,!0);const a=o.newItem({type:i,content:[{type:\"stack\",content:[]}]},r);if(!a)throw new Error(\"createAdjacentStack: Failed to create new container\");const l=a.contentItems[0];return a.addChild(this.raw,n),we(s)&&s.removeChild(e,!0),this._wrap(l)}throw new Error(`Cannot creat adjacent stacks for type: ${e.type}, must be type 'stack'`)}setActiveContentItem(t,e=!0){if(!ee.isStack(this._item))throw new Error(`Cannot call setActiveContentItem from a non-stack item: ${this.type}`);this._item.setActiveComponentItem(t.raw,!e)}static wrap(t,e){return ye.wrapInternal(Ie,t,e)}}function be(t=[],e){for(const i of t)\"component\"===i.type?Object.keys(e).forEach((t=>{t in i&&(i.componentState={[`${de}${t}`]:i[t],...i.componentState}),i[t]=e[t]})):be(i.content,e)}function Se(t=[],e,i){for(const n of t)if(\"component\"===n.type)Object.keys(e).forEach((t=>{if(`${de}${t}`in n.componentState)return n[t]=n.componentState[`${de}${t}`],void delete n.componentState[`${de}${t}`];n[t]=e[t]}));else{if(n.size&&(\"row\"===i||\"column\"===i)){n[\"row\"===i?\"width\":\"height\"]=n.size?.includes(\".\")?parseFloat(n.size):parseInt(n.size)}Se(n.content,e,n.type)}}function Ee(t){if(t.root){t.root.content&&Se([t.root],{componentName:\"view\",isClosable:!0});const e=t.root;t.content=[e],delete t.root}return t}const xe=e=>class extends e{connectedCallback(){if(!this.name||!this.uuid)throw new Error(\" Name or uuid attribute missing\");if(!this.src)throw new Error(\" missing 'src' attribute.\");this.#t||(this.#t=document.createElement(\"iframe\"),this.#t.src=this.src,this.#t.style.height=\"100%\",this.#t.style.width=\"100%\",this.#t.style.border=\"none\",this.forceFrameName?this.#t.setAttribute(\"name\",this.forceFrameName):this.#t.setAttribute(\"name\",t.encodeOptions({brokerUrl:this.brokerUrl,name:this.name,uuid:this.uuid,providerId:this.providerId,contextGroup:this.contextGroup},\"of-frame\")),this.#t.setAttribute(\"id\",this.name),this.appendChild(this.#t))}#t;get brokerUrl(){return this.getAttribute(\"of-broker\")}set brokerUrl(t){t&&this.setAttribute(\"of-broker\",t)}get name(){return this.getAttribute(\"of-name\")}set name(t){t&&this.setAttribute(\"of-name\",t)}get forceFrameName(){return this.getAttribute(\"forceFrameName\")}set forceFrameName(t){t&&this.setAttribute(\"forceFrameName\",t)}get uuid(){return this.getAttribute(\"of-uuid\")}set uuid(t){t&&this.setAttribute(\"of-uuid\",t)}get src(){return this.getAttribute(\"src\")}set src(t){t&&this.setAttribute(\"src\",t)}get providerId(){return this.getAttribute(\"of-provider-id\")}set providerId(t){t&&this.setAttribute(\"of-provider-id\",t)}get contextGroup(){return this.getAttribute(\"of-context-group\")}set contextGroup(t){t&&this.setAttribute(\"of-context-group\",t)}static get observedAttributes(){return[\"name\"]}};class Le{static create(t){const e=document.createElement(\"of-view\");return Object.entries(t).forEach((([t,i])=>{e.setAttribute(t,i)})),e}}customElements.define(\"of-view\",xe(HTMLElement));class ze{constructor(t,i,n,{brokerUrl:o,interopConfig:s},r){this.container=t,this.config=i,this.ofView=null,this.isDragging=()=>this.container.tab.element?.className.includes(\"lm_dragging\")??!1;const{url:a,web:l,interop:h,name:d}=i||{},c=d??`internal-generated-view-${e.v4()}`;if(this.identity={uuid:n,name:c},this.container.element.setAttribute(\"of-name\",c),this.container.element.id=`container-${c}`,this.container.parent.id=c,void 0===a)return void this.handleUrlMissing();const m=this.updateTitleIfNotSet(a),u={\"of-broker\":o,\"of-uuid\":n,\"of-name\":c,src:a};l?.frameName&&(u.forceFrameName=l.frameName);const p=h?.currentContextGroup??s?.currentContextGroup;p&&(u[\"of-context-group\"]=p),s?.providerId&&(u[\"of-provider-id\"]=s?.providerId),this.ofView=Le.create(u),this.ofView.title=m??`Iframe: ${a}`,r.appendChild(this.ofView),this.ofView.style.position=\"absolute\"}updateTitleIfNotSet(t){return\"view\"===this.container.parent.title&&this.container.parent.setTitle(t),this.container.parent.title}handleUrlMissing(){const t=document.createElement(\"div\");t.setAttribute(\"style\",\"padding: 20px\");t.innerText=\"No URL provided\",this.container.element.appendChild(t)}destroy(){this.ofView?.remove(),this.ofView=null}closeView(){this.container.close()}resize(){if(this.ofView){if(this.isDragging())return void(this.ofView.style.display=\"none\");const t=this.container.element.getBoundingClientRect();this.ofView.style.position=\"absolute\",this.ofView.style.height=`${t.height}px`,this.ofView.style.width=`${t.width}px`,this.ofView.style.inset=`${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`,this.ofView.style.display=\"block\"}}}class Me extends U{static overrideConfig(t){const e={...ue,...t.settings,...pe};return e.reorderEnabled?be(t.content,{isClosable:!0}):be(t.content,{reorderEnabled:!1}),{dimensions:me,...t,settings:e,header:{...ce,show:!1!==t.settings?.hasHeaders&&ce.show}}}constructor(t,e,i,{options:n},o,s){super(),this.identity=t,this.container=e,this.initialConfig=i,this.layoutManager=o,this.platformProvider=s,this.viewComponentsByContainerElement=new Map,this.layoutContentCache=_.getSingleInstance(),this.reparentingViews=new Set,this.goldenLayoutDestroyed=!1,this.createViewComponent=(t,e)=>{m.handleSharedView(this.layoutManager,this.identity,e);const i=new ze(t,e,this.identity.uuid,this.options,this.iframeContainer);return e&&!1===e[`${de}isClosable`]&&this.stylesheet.insertRule(`#tab-${i.identity.name} .lm_close_tab { display: none; }`),this.viewComponentsByContainerElement.set(t.element,i),this.resizeController.observeContainer(t.element),i},this.iframeContainer=document.createElement(\"div\"),this.iframeContainer.id=`openfin-layout-iframe-container-${this.identity.layoutName}`,this.domEmitter=new V(e),this.setupStylesheets(),this.layout=new he(this.container),this.layout.resizeWithContainerAutomatically=!0,this.options=n,this.layout.registerComponent(\"view\",this.createViewComponent),this.setupListeners(),this.resizeController=new ve(this),this.layout.loadLayout(Me.overrideConfig(i));const r=document.createElement(\"div\");r.id=`openfin-layout-shadow-container-${this.identity.layoutName}`,r.attachShadow({mode:\"open\",delegatesFocus:!1}).appendChild(this.iframeContainer),this.container.appendChild(r),this.resizeController.observeMutations(this.container)}getStackByView({name:t}){const e=this.layout.findFirstComponentItemById(t);if(e?.parent&&e?.parent?.isStack)return Ie.wrap(e.parent,this)}getRoot(){return Ie.wrap(this.layout.rootItem,this)}async platformCloseView(t){const e=[...this.viewComponentsByContainerElement.values()].find((e=>e.identity.name===t.name));if(!e)throw new Error(`View with name: ${t.name} not found in layout.`);e.closeView()}async platformCreateView(t,{location:e,targetView:i}={}){if(i)throw new Error(\"TargetView not supported in web\");const n={options:this.platformProvider.normalizeOptions(t),target:this.identity,location:e};return this.insertView(n)}setupStylesheets(){if(this.container.setAttribute(\"data-openfin-layout-name\",this.identity.layoutName),this.stylesheet=new CSSStyleSheet,this.stylesheet.insertRule(\".lm_close { display: none; }\"),document.adoptedStyleSheets.push(this.stylesheet),this.initialConfig.settings?.preventSplitterResize){const t=`\\n [data-openfin-layout-name='${this.identity.layoutName}'] .lm_splitter {\\n pointer-events: none;\\n }`;this.stylesheet.insertRule(t)}}insertView({options:t,location:e,targetView:i}){const n=e?this.layoutContentCache.getItemOrUndefined(e.id):void 0,o=i?this.layoutContentCache.getItemOrUndefined(i.name):void 0,s=n??o??Ie.wrap(this.layout.rootItem,this);let r;if(ee.isStack(s.raw))r=s.raw;else{if(!we(s.raw))throw new Error(\"Cannot add a view at the requested location\");r=s.raw.newItem({type:\"stack\",content:[]})}const a=Math.min(r.contentItems.length,e?.index??r.contentItems.length);let l=this.layout.findFirstComponentItemById(t.name);l?(l.parent&&l.parent.removeChild(l,!0),r.addChild(l,a)):l=r.newComponent(\"view\",t,t.title??t.url??\"Default Title\",a);const h=l.component.identity;return Promise.resolve({identity:h})}replaceView({viewToReplace:t,newView:e}){throw new Error(\"Method not implemented.\")}replaceLayout(t){throw new Error(\"Method not implemented.\")}async cleanupView(t){}applyPreset(t){throw new Error(\"Method not implemented.\")}getCurrentViews(){return[...this.viewComponentsByContainerElement.values()].map((t=>t.identity))}async getFrameSnapshot(){return Ee(xt.fromResolved(this.layout.toConfig()))}isVisible(){return W(this.container)}async onViewDetached({viewIdentity:t}){this.reparentingViews.add(t.name),this.platformCloseView(t)}async destroy(){this.goldenLayoutDestroyed||(this.goldenLayoutDestroyed=!0,this.layout.destroy()),this.iframeContainer.remove(),this.resizeController.destroy(),document.adoptedStyleSheets=document.adoptedStyleSheets.filter((t=>t!==this.stylesheet)),this.viewComponentsByContainerElement.clear()}setupListeners(){this.container.addEventListener(\"pointerdown\",(t=>{if(t.target instanceof HTMLElement){const e=t.target.classList;[\"lm_tab\",\"lm_title\",\"lm_splitter\",\"lm_drag_handle\"].some((t=>e.contains(t)))&&(this.handleDragStart(),2===t.button&&t.stopPropagation())}}),!0),document.addEventListener(\"pointerup\",(()=>this.handleDragEnd()),!0),this.layout.on(\"tabCreated\",(t=>{const e=t.componentItem.component;t.element.id=`tab-${e.identity.name}`,this.domEmitter.dispatchLocalEvent(\"tab-created\",e.identity)})),this.layout.on(\"itemCreated\",(({target:t})=>{const e=t;if(Gt.isComponentItem(e)){const t=e.component;this.domEmitter.dispatchLocalEvent(\"container-created\",t.identity)}})),this.layout.on(\"itemDestroyed\",(t=>{const e=t.target;if(Gt.isComponentItem(e)){const t=e.component;this.removeViewComponent(t)}})),this.layout.on(\"itemDropped\",(()=>{this.handleDragEnd()}))}handleDragStart(){this.iframeContainer.style.pointerEvents=\"none\"}handleDragEnd(){this.iframeContainer.style.pointerEvents=\"\"}removeViewComponent(t){if(t.config&&!1===t.config[`${de}isClosable`]){const e=[...this.stylesheet.cssRules].findIndex((e=>e.cssText.includes(`#tab-${t.identity.name}`)));this.stylesheet.deleteRule(e)}t.destroy(),this.viewComponentsByContainerElement.delete(t.container.element),this.resizeController.unobserveContainer(t.container.element),this.reparentingViews.has(t.identity.name)?this.reparentingViews.delete(t.identity.name):this.platformProvider.closeView(t.identity.name);0===this.getCurrentViews().length&&(this.goldenLayoutDestroyed||(this.goldenLayoutDestroyed=!0,m.handleLastViewRemoved(this.layoutManager,this.identity)))}}class Pe{constructor(t,e,i,n){this.windowIdentity=t,this.connectConfig=e,this.provider=i,this.fallbackContainer=n}async createLayout(t,e){if(!(\"container\"in t)&&!this.fallbackContainer)throw new Error(\"Container property is not optional in web\");const{layoutName:i}=t,n=t,o=this.provider.initLayoutViews(n),s=n.container??this.fallbackContainer,r={...this.windowIdentity,layoutName:i},a=new Me(r,s,o,this.connectConfig,e,this.provider);m.registerLayout(e,i,a),this.fallbackContainer=null}async getLayoutSnapshot(t){return t.getLayoutSnapshot()}async handleLastViewRemoved(t){}}class Te{static async init(e){const i=e.getFin().InterApplicationBus.Channel,n=await i.create(`custom-frame-${e.me.uuid}`);return n.setDefaultAction((async(t,{target:e,opts:i},o)=>{const s=n.connections.find((t=>t.name===e.name));if(s)return n.dispatch(s,t,{...i,target:e});throw new Error(`Client with name ${e.name} not found`)})),await t.relayChannelClientApi_1(n,\"layout-relay\"),new Te(e)}constructor(t){this.wire=t,this.viewNames=new Set}normalizeOptions(t,i=\"default\"){const n=this.wire.me.uuid;let{name:o=`internal-generated-view-${e.v4()}`}=t;return o.match(/^internal-generated-view-/)&&this.viewNames.has(o)&&\"duplicate\"===i&&(o=`internal-generated-view-${e.v4()}`),this.viewNames.add(o),{...t,name:o,uuid:n}}closeView(t){this.viewNames.delete(t)}initLayoutViews({layout:t,multiInstanceViewBehavior:e}){return H((t=>{if(\"component\"===t.type&&t.componentState){const i=this.normalizeOptions(t.componentState,e);return{...t,componentState:i}}return t}),t)}}var Ae;const ke=t=>t;Ae=new WeakMap,exports.WebLayoutEntryPoint=class{constructor(e){Ae.set(this,void 0),this.initLayoutManager=async(e,i,{container:n,layoutManagerOverride:o})=>{const s=await Te.init(i),r=o??ke,a=new Pe(i.me,t.__classPrivateFieldGet(this,Ae,\"f\"),s,n),l=new(r(m.createClosedConstructor(a)));return await M(i,l),l},this.applyLayoutSnapshot=async(e,i,n)=>{await i.applyLayoutSnapshot(t.__classPrivateFieldGet(this,Ae,\"f\").platform.layoutSnapshot)},this.createLayout=async(t,e)=>m.createLayout(t,e),this.destroyLayout=async(t,e)=>m.destroyLayout(t,e),t.__classPrivateFieldSet(this,Ae,e,\"f\")}};\n","'use strict'\n\nexports.byteLength = byteLength\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\nfor (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i]\n revLookup[code.charCodeAt(i)] = i\n}\n\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction getLens (b64) {\n var len = b64.length\n\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // Trim off extra bytes after placeholder bytes are found\n // See: https://github.com/beatgammit/base64-js/issues/42\n var validLen = b64.indexOf('=')\n if (validLen === -1) validLen = len\n\n var placeHoldersLen = validLen === len\n ? 0\n : 4 - (validLen % 4)\n\n return [validLen, placeHoldersLen]\n}\n\n// base64 is 4/3 + up to two characters of the original data\nfunction byteLength (b64) {\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction _byteLength (b64, validLen, placeHoldersLen) {\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction toByteArray (b64) {\n var tmp\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n\n var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))\n\n var curByte = 0\n\n // if there are placeholders, only get up to the last complete 4 chars\n var len = placeHoldersLen > 0\n ? validLen - 4\n : validLen\n\n var i\n for (i = 0; i < len; i += 4) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 18) |\n (revLookup[b64.charCodeAt(i + 1)] << 12) |\n (revLookup[b64.charCodeAt(i + 2)] << 6) |\n revLookup[b64.charCodeAt(i + 3)]\n arr[curByte++] = (tmp >> 16) & 0xFF\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 2) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 2) |\n (revLookup[b64.charCodeAt(i + 1)] >> 4)\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 1) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 10) |\n (revLookup[b64.charCodeAt(i + 1)] << 4) |\n (revLookup[b64.charCodeAt(i + 2)] >> 2)\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] +\n lookup[num >> 12 & 0x3F] +\n lookup[num >> 6 & 0x3F] +\n lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n var tmp\n var output = []\n for (var i = start; i < end; i += 3) {\n tmp =\n ((uint8[i] << 16) & 0xFF0000) +\n ((uint8[i + 1] << 8) & 0xFF00) +\n (uint8[i + 2] & 0xFF)\n output.push(tripletToBase64(tmp))\n }\n return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n var tmp\n var len = uint8.length\n var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n var parts = []\n var maxChunkLength = 16383 // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1]\n parts.push(\n lookup[tmp >> 2] +\n lookup[(tmp << 4) & 0x3F] +\n '=='\n )\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + uint8[len - 1]\n parts.push(\n lookup[tmp >> 10] +\n lookup[(tmp >> 4) & 0x3F] +\n lookup[(tmp << 2) & 0x3F] +\n '='\n )\n }\n\n return parts.join('')\n}\n","/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n/* eslint-disable no-proto */\n\n'use strict'\n\nconst base64 = require('base64-js')\nconst ieee754 = require('ieee754')\nconst customInspectSymbol =\n (typeof Symbol === 'function' && typeof Symbol['for'] === 'function') // eslint-disable-line dot-notation\n ? Symbol['for']('nodejs.util.inspect.custom') // eslint-disable-line dot-notation\n : null\n\nexports.Buffer = Buffer\nexports.SlowBuffer = SlowBuffer\nexports.INSPECT_MAX_BYTES = 50\n\nconst K_MAX_LENGTH = 0x7fffffff\nexports.kMaxLength = K_MAX_LENGTH\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Print warning and recommend using `buffer` v4.x which has an Object\n * implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * We report that the browser does not support typed arrays if the are not subclassable\n * using __proto__. Firefox 4-29 lacks support for adding new properties to `Uint8Array`\n * (See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438). IE 10 lacks support\n * for __proto__ and has a buggy typed array implementation.\n */\nBuffer.TYPED_ARRAY_SUPPORT = typedArraySupport()\n\nif (!Buffer.TYPED_ARRAY_SUPPORT && typeof console !== 'undefined' &&\n typeof console.error === 'function') {\n console.error(\n 'This browser lacks typed array (Uint8Array) support which is required by ' +\n '`buffer` v5.x. Use `buffer` v4.x if you require old browser support.'\n )\n}\n\nfunction typedArraySupport () {\n // Can typed array instances can be augmented?\n try {\n const arr = new Uint8Array(1)\n const proto = { foo: function () { return 42 } }\n Object.setPrototypeOf(proto, Uint8Array.prototype)\n Object.setPrototypeOf(arr, proto)\n return arr.foo() === 42\n } catch (e) {\n return false\n }\n}\n\nObject.defineProperty(Buffer.prototype, 'parent', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.buffer\n }\n})\n\nObject.defineProperty(Buffer.prototype, 'offset', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.byteOffset\n }\n})\n\nfunction createBuffer (length) {\n if (length > K_MAX_LENGTH) {\n throw new RangeError('The value \"' + length + '\" is invalid for option \"size\"')\n }\n // Return an augmented `Uint8Array` instance\n const buf = new Uint8Array(length)\n Object.setPrototypeOf(buf, Buffer.prototype)\n return buf\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new TypeError(\n 'The \"string\" argument must be of type string. Received type number'\n )\n }\n return allocUnsafe(arg)\n }\n return from(arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\nfunction from (value, encodingOrOffset, length) {\n if (typeof value === 'string') {\n return fromString(value, encodingOrOffset)\n }\n\n if (ArrayBuffer.isView(value)) {\n return fromArrayView(value)\n }\n\n if (value == null) {\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n }\n\n if (isInstance(value, ArrayBuffer) ||\n (value && isInstance(value.buffer, ArrayBuffer))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof SharedArrayBuffer !== 'undefined' &&\n (isInstance(value, SharedArrayBuffer) ||\n (value && isInstance(value.buffer, SharedArrayBuffer)))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof value === 'number') {\n throw new TypeError(\n 'The \"value\" argument must not be of type number. Received type number'\n )\n }\n\n const valueOf = value.valueOf && value.valueOf()\n if (valueOf != null && valueOf !== value) {\n return Buffer.from(valueOf, encodingOrOffset, length)\n }\n\n const b = fromObject(value)\n if (b) return b\n\n if (typeof Symbol !== 'undefined' && Symbol.toPrimitive != null &&\n typeof value[Symbol.toPrimitive] === 'function') {\n return Buffer.from(value[Symbol.toPrimitive]('string'), encodingOrOffset, length)\n }\n\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n return from(value, encodingOrOffset, length)\n}\n\n// Note: Change prototype *after* Buffer.from is defined to workaround Chrome bug:\n// https://github.com/feross/buffer/pull/148\nObject.setPrototypeOf(Buffer.prototype, Uint8Array.prototype)\nObject.setPrototypeOf(Buffer, Uint8Array)\n\nfunction assertSize (size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be of type number')\n } else if (size < 0) {\n throw new RangeError('The value \"' + size + '\" is invalid for option \"size\"')\n }\n}\n\nfunction alloc (size, fill, encoding) {\n assertSize(size)\n if (size <= 0) {\n return createBuffer(size)\n }\n if (fill !== undefined) {\n // Only pay attention to encoding if it's a string. This\n // prevents accidentally sending in a number that would\n // be interpreted as a start offset.\n return typeof encoding === 'string'\n ? createBuffer(size).fill(fill, encoding)\n : createBuffer(size).fill(fill)\n }\n return createBuffer(size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n return alloc(size, fill, encoding)\n}\n\nfunction allocUnsafe (size) {\n assertSize(size)\n return createBuffer(size < 0 ? 0 : checked(size) | 0)\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n return allocUnsafe(size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n return allocUnsafe(size)\n}\n\nfunction fromString (string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8'\n }\n\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n\n const length = byteLength(string, encoding) | 0\n let buf = createBuffer(length)\n\n const actual = buf.write(string, encoding)\n\n if (actual !== length) {\n // Writing a hex string, for example, that contains invalid characters will\n // cause everything after the first invalid character to be ignored. (e.g.\n // 'abxxcd' will be treated as 'ab')\n buf = buf.slice(0, actual)\n }\n\n return buf\n}\n\nfunction fromArrayLike (array) {\n const length = array.length < 0 ? 0 : checked(array.length) | 0\n const buf = createBuffer(length)\n for (let i = 0; i < length; i += 1) {\n buf[i] = array[i] & 255\n }\n return buf\n}\n\nfunction fromArrayView (arrayView) {\n if (isInstance(arrayView, Uint8Array)) {\n const copy = new Uint8Array(arrayView)\n return fromArrayBuffer(copy.buffer, copy.byteOffset, copy.byteLength)\n }\n return fromArrayLike(arrayView)\n}\n\nfunction fromArrayBuffer (array, byteOffset, length) {\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\"offset\" is outside of buffer bounds')\n }\n\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\"length\" is outside of buffer bounds')\n }\n\n let buf\n if (byteOffset === undefined && length === undefined) {\n buf = new Uint8Array(array)\n } else if (length === undefined) {\n buf = new Uint8Array(array, byteOffset)\n } else {\n buf = new Uint8Array(array, byteOffset, length)\n }\n\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(buf, Buffer.prototype)\n\n return buf\n}\n\nfunction fromObject (obj) {\n if (Buffer.isBuffer(obj)) {\n const len = checked(obj.length) | 0\n const buf = createBuffer(len)\n\n if (buf.length === 0) {\n return buf\n }\n\n obj.copy(buf, 0, 0, len)\n return buf\n }\n\n if (obj.length !== undefined) {\n if (typeof obj.length !== 'number' || numberIsNaN(obj.length)) {\n return createBuffer(0)\n }\n return fromArrayLike(obj)\n }\n\n if (obj.type === 'Buffer' && Array.isArray(obj.data)) {\n return fromArrayLike(obj.data)\n }\n}\n\nfunction checked (length) {\n // Note: cannot use `length < K_MAX_LENGTH` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= K_MAX_LENGTH) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + K_MAX_LENGTH.toString(16) + ' bytes')\n }\n return length | 0\n}\n\nfunction SlowBuffer (length) {\n if (+length != length) { // eslint-disable-line eqeqeq\n length = 0\n }\n return Buffer.alloc(+length)\n}\n\nBuffer.isBuffer = function isBuffer (b) {\n return b != null && b._isBuffer === true &&\n b !== Buffer.prototype // so Buffer.isBuffer(Buffer.prototype) will be false\n}\n\nBuffer.compare = function compare (a, b) {\n if (isInstance(a, Uint8Array)) a = Buffer.from(a, a.offset, a.byteLength)\n if (isInstance(b, Uint8Array)) b = Buffer.from(b, b.offset, b.byteLength)\n if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n throw new TypeError(\n 'The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array'\n )\n }\n\n if (a === b) return 0\n\n let x = a.length\n let y = b.length\n\n for (let i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i]\n y = b[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n switch (String(encoding).toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'latin1':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return true\n default:\n return false\n }\n}\n\nBuffer.concat = function concat (list, length) {\n if (!Array.isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n\n if (list.length === 0) {\n return Buffer.alloc(0)\n }\n\n let i\n if (length === undefined) {\n length = 0\n for (i = 0; i < list.length; ++i) {\n length += list[i].length\n }\n }\n\n const buffer = Buffer.allocUnsafe(length)\n let pos = 0\n for (i = 0; i < list.length; ++i) {\n let buf = list[i]\n if (isInstance(buf, Uint8Array)) {\n if (pos + buf.length > buffer.length) {\n if (!Buffer.isBuffer(buf)) buf = Buffer.from(buf)\n buf.copy(buffer, pos)\n } else {\n Uint8Array.prototype.set.call(\n buffer,\n buf,\n pos\n )\n }\n } else if (!Buffer.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n } else {\n buf.copy(buffer, pos)\n }\n pos += buf.length\n }\n return buffer\n}\n\nfunction byteLength (string, encoding) {\n if (Buffer.isBuffer(string)) {\n return string.length\n }\n if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) {\n return string.byteLength\n }\n if (typeof string !== 'string') {\n throw new TypeError(\n 'The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. ' +\n 'Received type ' + typeof string\n )\n }\n\n const len = string.length\n const mustMatch = (arguments.length > 2 && arguments[2] === true)\n if (!mustMatch && len === 0) return 0\n\n // Use a for loop to avoid recursion\n let loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'ascii':\n case 'latin1':\n case 'binary':\n return len\n case 'utf8':\n case 'utf-8':\n return utf8ToBytes(string).length\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return len * 2\n case 'hex':\n return len >>> 1\n case 'base64':\n return base64ToBytes(string).length\n default:\n if (loweredCase) {\n return mustMatch ? -1 : utf8ToBytes(string).length // assume utf8\n }\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n let loweredCase = false\n\n // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n // property of a typed array.\n\n // This behaves neither like String nor Uint8Array in that we set start/end\n // to their upper/lower bounds if the value passed is out of range.\n // undefined is handled specially as per ECMA-262 6th Edition,\n // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n if (start === undefined || start < 0) {\n start = 0\n }\n // Return early if start > this.length. Done here to prevent potential uint32\n // coercion fail below.\n if (start > this.length) {\n return ''\n }\n\n if (end === undefined || end > this.length) {\n end = this.length\n }\n\n if (end <= 0) {\n return ''\n }\n\n // Force coercion to uint32. This will also coerce falsey/NaN values to 0.\n end >>>= 0\n start >>>= 0\n\n if (end <= start) {\n return ''\n }\n\n if (!encoding) encoding = 'utf8'\n\n while (true) {\n switch (encoding) {\n case 'hex':\n return hexSlice(this, start, end)\n\n case 'utf8':\n case 'utf-8':\n return utf8Slice(this, start, end)\n\n case 'ascii':\n return asciiSlice(this, start, end)\n\n case 'latin1':\n case 'binary':\n return latin1Slice(this, start, end)\n\n case 'base64':\n return base64Slice(this, start, end)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return utf16leSlice(this, start, end)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = (encoding + '').toLowerCase()\n loweredCase = true\n }\n }\n}\n\n// This property is used by `Buffer.isBuffer` (and the `is-buffer` npm package)\n// to detect a Buffer instance. It's not possible to use `instanceof Buffer`\n// reliably in a browserify context because there could be multiple different\n// copies of the 'buffer' package in use. This method works even for Buffer\n// instances that were created from another copy of the `buffer` package.\n// See: https://github.com/feross/buffer/issues/154\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n const i = b[n]\n b[n] = b[m]\n b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n const len = this.length\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits')\n }\n for (let i = 0; i < len; i += 2) {\n swap(this, i, i + 1)\n }\n return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n const len = this.length\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits')\n }\n for (let i = 0; i < len; i += 4) {\n swap(this, i, i + 3)\n swap(this, i + 1, i + 2)\n }\n return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n const len = this.length\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits')\n }\n for (let i = 0; i < len; i += 8) {\n swap(this, i, i + 7)\n swap(this, i + 1, i + 6)\n swap(this, i + 2, i + 5)\n swap(this, i + 3, i + 4)\n }\n return this\n}\n\nBuffer.prototype.toString = function toString () {\n const length = this.length\n if (length === 0) return ''\n if (arguments.length === 0) return utf8Slice(this, 0, length)\n return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.toLocaleString = Buffer.prototype.toString\n\nBuffer.prototype.equals = function equals (b) {\n if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n if (this === b) return true\n return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n let str = ''\n const max = exports.INSPECT_MAX_BYTES\n str = this.toString('hex', 0, max).replace(/(.{2})/g, '$1 ').trim()\n if (this.length > max) str += ' ... '\n return ''\n}\nif (customInspectSymbol) {\n Buffer.prototype[customInspectSymbol] = Buffer.prototype.inspect\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n if (isInstance(target, Uint8Array)) {\n target = Buffer.from(target, target.offset, target.byteLength)\n }\n if (!Buffer.isBuffer(target)) {\n throw new TypeError(\n 'The \"target\" argument must be one of type Buffer or Uint8Array. ' +\n 'Received type ' + (typeof target)\n )\n }\n\n if (start === undefined) {\n start = 0\n }\n if (end === undefined) {\n end = target ? target.length : 0\n }\n if (thisStart === undefined) {\n thisStart = 0\n }\n if (thisEnd === undefined) {\n thisEnd = this.length\n }\n\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError('out of range index')\n }\n\n if (thisStart >= thisEnd && start >= end) {\n return 0\n }\n if (thisStart >= thisEnd) {\n return -1\n }\n if (start >= end) {\n return 1\n }\n\n start >>>= 0\n end >>>= 0\n thisStart >>>= 0\n thisEnd >>>= 0\n\n if (this === target) return 0\n\n let x = thisEnd - thisStart\n let y = end - start\n const len = Math.min(x, y)\n\n const thisCopy = this.slice(thisStart, thisEnd)\n const targetCopy = target.slice(start, end)\n\n for (let i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i]\n y = targetCopy[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (numberIsNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [val], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n let indexSize = 1\n let arrLength = arr.length\n let valLength = val.length\n\n if (encoding !== undefined) {\n encoding = String(encoding).toLowerCase()\n if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n encoding === 'utf16le' || encoding === 'utf-16le') {\n if (arr.length < 2 || val.length < 2) {\n return -1\n }\n indexSize = 2\n arrLength /= 2\n valLength /= 2\n byteOffset /= 2\n }\n }\n\n function read (buf, i) {\n if (indexSize === 1) {\n return buf[i]\n } else {\n return buf.readUInt16BE(i * indexSize)\n }\n }\n\n let i\n if (dir) {\n let foundIndex = -1\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1) foundIndex = i\n if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n } else {\n if (foundIndex !== -1) i -= i - foundIndex\n foundIndex = -1\n }\n }\n } else {\n if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n for (i = byteOffset; i >= 0; i--) {\n let found = true\n for (let j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false\n break\n }\n }\n if (found) return i\n }\n }\n\n return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n offset = Number(offset) || 0\n const remaining = buf.length - offset\n if (!length) {\n length = remaining\n } else {\n length = Number(length)\n if (length > remaining) {\n length = remaining\n }\n }\n\n const strLen = string.length\n\n if (length > strLen / 2) {\n length = strLen / 2\n }\n let i\n for (i = 0; i < length; ++i) {\n const parsed = parseInt(string.substr(i * 2, 2), 16)\n if (numberIsNaN(parsed)) return i\n buf[offset + i] = parsed\n }\n return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n // Buffer#write(string)\n if (offset === undefined) {\n encoding = 'utf8'\n length = this.length\n offset = 0\n // Buffer#write(string, encoding)\n } else if (length === undefined && typeof offset === 'string') {\n encoding = offset\n length = this.length\n offset = 0\n // Buffer#write(string, offset[, length][, encoding])\n } else if (isFinite(offset)) {\n offset = offset >>> 0\n if (isFinite(length)) {\n length = length >>> 0\n if (encoding === undefined) encoding = 'utf8'\n } else {\n encoding = length\n length = undefined\n }\n } else {\n throw new Error(\n 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n )\n }\n\n const remaining = this.length - offset\n if (length === undefined || length > remaining) length = remaining\n\n if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n throw new RangeError('Attempt to write outside buffer bounds')\n }\n\n if (!encoding) encoding = 'utf8'\n\n let loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'hex':\n return hexWrite(this, string, offset, length)\n\n case 'utf8':\n case 'utf-8':\n return utf8Write(this, string, offset, length)\n\n case 'ascii':\n case 'latin1':\n case 'binary':\n return asciiWrite(this, string, offset, length)\n\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return base64Write(this, string, offset, length)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return ucs2Write(this, string, offset, length)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0)\n }\n}\n\nfunction base64Slice (buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf)\n } else {\n return base64.fromByteArray(buf.slice(start, end))\n }\n}\n\nfunction utf8Slice (buf, start, end) {\n end = Math.min(buf.length, end)\n const res = []\n\n let i = start\n while (i < end) {\n const firstByte = buf[i]\n let codePoint = null\n let bytesPerSequence = (firstByte > 0xEF)\n ? 4\n : (firstByte > 0xDF)\n ? 3\n : (firstByte > 0xBF)\n ? 2\n : 1\n\n if (i + bytesPerSequence <= end) {\n let secondByte, thirdByte, fourthByte, tempCodePoint\n\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 0x80) {\n codePoint = firstByte\n }\n break\n case 2:\n secondByte = buf[i + 1]\n if ((secondByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n if (tempCodePoint > 0x7F) {\n codePoint = tempCodePoint\n }\n }\n break\n case 3:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n codePoint = tempCodePoint\n }\n }\n break\n case 4:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n fourthByte = buf[i + 3]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n codePoint = tempCodePoint\n }\n }\n }\n }\n\n if (codePoint === null) {\n // we did not generate a valid codePoint so insert a\n // replacement char (U+FFFD) and advance only 1 byte\n codePoint = 0xFFFD\n bytesPerSequence = 1\n } else if (codePoint > 0xFFFF) {\n // encode to utf16 (surrogate pair dance)\n codePoint -= 0x10000\n res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n codePoint = 0xDC00 | codePoint & 0x3FF\n }\n\n res.push(codePoint)\n i += bytesPerSequence\n }\n\n return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nconst MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n const len = codePoints.length\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n }\n\n // Decode in chunks to avoid \"call stack size exceeded\".\n let res = ''\n let i = 0\n while (i < len) {\n res += String.fromCharCode.apply(\n String,\n codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n )\n }\n return res\n}\n\nfunction asciiSlice (buf, start, end) {\n let ret = ''\n end = Math.min(buf.length, end)\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F)\n }\n return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n let ret = ''\n end = Math.min(buf.length, end)\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i])\n }\n return ret\n}\n\nfunction hexSlice (buf, start, end) {\n const len = buf.length\n\n if (!start || start < 0) start = 0\n if (!end || end < 0 || end > len) end = len\n\n let out = ''\n for (let i = start; i < end; ++i) {\n out += hexSliceLookupTable[buf[i]]\n }\n return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n const bytes = buf.slice(start, end)\n let res = ''\n // If bytes.length is odd, the last 8 bits must be ignored (same as node.js)\n for (let i = 0; i < bytes.length - 1; i += 2) {\n res += String.fromCharCode(bytes[i] + (bytes[i + 1] * 256))\n }\n return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n const len = this.length\n start = ~~start\n end = end === undefined ? len : ~~end\n\n if (start < 0) {\n start += len\n if (start < 0) start = 0\n } else if (start > len) {\n start = len\n }\n\n if (end < 0) {\n end += len\n if (end < 0) end = 0\n } else if (end > len) {\n end = len\n }\n\n if (end < start) end = start\n\n const newBuf = this.subarray(start, end)\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(newBuf, Buffer.prototype)\n\n return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUintLE =\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let val = this[offset]\n let mul = 1\n let i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUintBE =\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n checkOffset(offset, byteLength, this.length)\n }\n\n let val = this[offset + --byteLength]\n let mul = 1\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUint8 =\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n return this[offset]\n}\n\nBuffer.prototype.readUint16LE =\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUint16BE =\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUint32LE =\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return ((this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16)) +\n (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUint32BE =\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] * 0x1000000) +\n ((this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n this[offset + 3])\n}\n\nBuffer.prototype.readBigUInt64LE = defineBigIntMethod(function readBigUInt64LE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const lo = first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24\n\n const hi = this[++offset] +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n last * 2 ** 24\n\n return BigInt(lo) + (BigInt(hi) << BigInt(32))\n})\n\nBuffer.prototype.readBigUInt64BE = defineBigIntMethod(function readBigUInt64BE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const hi = first * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset]\n\n const lo = this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last\n\n return (BigInt(hi) << BigInt(32)) + BigInt(lo)\n})\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let val = this[offset]\n let mul = 1\n let i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let i = byteLength\n let mul = 1\n let val = this[offset + --i]\n while (i > 0 && (mul *= 0x100)) {\n val += this[offset + --i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n if (!(this[offset] & 0x80)) return (this[offset])\n return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n const val = this[offset] | (this[offset + 1] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n const val = this[offset + 1] | (this[offset] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16) |\n (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] << 24) |\n (this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n (this[offset + 3])\n}\n\nBuffer.prototype.readBigInt64LE = defineBigIntMethod(function readBigInt64LE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const val = this[offset + 4] +\n this[offset + 5] * 2 ** 8 +\n this[offset + 6] * 2 ** 16 +\n (last << 24) // Overflow\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24)\n})\n\nBuffer.prototype.readBigInt64BE = defineBigIntMethod(function readBigInt64BE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const val = (first << 24) + // Overflow\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset]\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last)\n})\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUintLE =\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n let mul = 1\n let i = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUintBE =\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n let i = byteLength - 1\n let mul = 1\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUint8 =\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeUint16LE =\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeUint16BE =\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeUint32LE =\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset + 3] = (value >>> 24)\n this[offset + 2] = (value >>> 16)\n this[offset + 1] = (value >>> 8)\n this[offset] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeUint32BE =\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nfunction wrtBigUInt64LE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7)\n\n let lo = Number(value & BigInt(0xffffffff))\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n return offset\n}\n\nfunction wrtBigUInt64BE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7)\n\n let lo = Number(value & BigInt(0xffffffff))\n buf[offset + 7] = lo\n lo = lo >> 8\n buf[offset + 6] = lo\n lo = lo >> 8\n buf[offset + 5] = lo\n lo = lo >> 8\n buf[offset + 4] = lo\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n buf[offset + 3] = hi\n hi = hi >> 8\n buf[offset + 2] = hi\n hi = hi >> 8\n buf[offset + 1] = hi\n hi = hi >> 8\n buf[offset] = hi\n return offset + 8\n}\n\nBuffer.prototype.writeBigUInt64LE = defineBigIntMethod(function writeBigUInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeBigUInt64BE = defineBigIntMethod(function writeBigUInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n let i = 0\n let mul = 1\n let sub = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n let i = byteLength - 1\n let mul = 1\n let sub = 0\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n if (value < 0) value = 0xff + value + 1\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n this[offset + 2] = (value >>> 16)\n this[offset + 3] = (value >>> 24)\n return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (value < 0) value = 0xffffffff + value + 1\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeBigInt64LE = defineBigIntMethod(function writeBigInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nBuffer.prototype.writeBigInt64BE = defineBigIntMethod(function writeBigInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n }\n ieee754.write(buf, value, offset, littleEndian, 23, 4)\n return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n }\n ieee754.write(buf, value, offset, littleEndian, 52, 8)\n return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n if (!Buffer.isBuffer(target)) throw new TypeError('argument should be a Buffer')\n if (!start) start = 0\n if (!end && end !== 0) end = this.length\n if (targetStart >= target.length) targetStart = target.length\n if (!targetStart) targetStart = 0\n if (end > 0 && end < start) end = start\n\n // Copy 0 bytes; we're done\n if (end === start) return 0\n if (target.length === 0 || this.length === 0) return 0\n\n // Fatal error conditions\n if (targetStart < 0) {\n throw new RangeError('targetStart out of bounds')\n }\n if (start < 0 || start >= this.length) throw new RangeError('Index out of range')\n if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n // Are we oob?\n if (end > this.length) end = this.length\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start\n }\n\n const len = end - start\n\n if (this === target && typeof Uint8Array.prototype.copyWithin === 'function') {\n // Use built-in when available, missing from IE11\n this.copyWithin(targetStart, start, end)\n } else {\n Uint8Array.prototype.set.call(\n target,\n this.subarray(start, end),\n targetStart\n )\n }\n\n return len\n}\n\n// Usage:\n// buffer.fill(number[, offset[, end]])\n// buffer.fill(buffer[, offset[, end]])\n// buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n // Handle string cases:\n if (typeof val === 'string') {\n if (typeof start === 'string') {\n encoding = start\n start = 0\n end = this.length\n } else if (typeof end === 'string') {\n encoding = end\n end = this.length\n }\n if (encoding !== undefined && typeof encoding !== 'string') {\n throw new TypeError('encoding must be a string')\n }\n if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n if (val.length === 1) {\n const code = val.charCodeAt(0)\n if ((encoding === 'utf8' && code < 128) ||\n encoding === 'latin1') {\n // Fast path: If `val` fits into a single byte, use that numeric value.\n val = code\n }\n }\n } else if (typeof val === 'number') {\n val = val & 255\n } else if (typeof val === 'boolean') {\n val = Number(val)\n }\n\n // Invalid ranges are not set to a default, so can range check early.\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError('Out of range index')\n }\n\n if (end <= start) {\n return this\n }\n\n start = start >>> 0\n end = end === undefined ? this.length : end >>> 0\n\n if (!val) val = 0\n\n let i\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val\n }\n } else {\n const bytes = Buffer.isBuffer(val)\n ? val\n : Buffer.from(val, encoding)\n const len = bytes.length\n if (len === 0) {\n throw new TypeError('The value \"' + val +\n '\" is invalid for argument \"value\"')\n }\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len]\n }\n }\n\n return this\n}\n\n// CUSTOM ERRORS\n// =============\n\n// Simplified versions from Node, changed for Buffer-only usage\nconst errors = {}\nfunction E (sym, getMessage, Base) {\n errors[sym] = class NodeError extends Base {\n constructor () {\n super()\n\n Object.defineProperty(this, 'message', {\n value: getMessage.apply(this, arguments),\n writable: true,\n configurable: true\n })\n\n // Add the error code to the name to include it in the stack trace.\n this.name = `${this.name} [${sym}]`\n // Access the stack to generate the error message including the error code\n // from the name.\n this.stack // eslint-disable-line no-unused-expressions\n // Reset the name to the actual name.\n delete this.name\n }\n\n get code () {\n return sym\n }\n\n set code (value) {\n Object.defineProperty(this, 'code', {\n configurable: true,\n enumerable: true,\n value,\n writable: true\n })\n }\n\n toString () {\n return `${this.name} [${sym}]: ${this.message}`\n }\n }\n}\n\nE('ERR_BUFFER_OUT_OF_BOUNDS',\n function (name) {\n if (name) {\n return `${name} is outside of buffer bounds`\n }\n\n return 'Attempt to access memory outside buffer bounds'\n }, RangeError)\nE('ERR_INVALID_ARG_TYPE',\n function (name, actual) {\n return `The \"${name}\" argument must be of type number. Received type ${typeof actual}`\n }, TypeError)\nE('ERR_OUT_OF_RANGE',\n function (str, range, input) {\n let msg = `The value of \"${str}\" is out of range.`\n let received = input\n if (Number.isInteger(input) && Math.abs(input) > 2 ** 32) {\n received = addNumericalSeparator(String(input))\n } else if (typeof input === 'bigint') {\n received = String(input)\n if (input > BigInt(2) ** BigInt(32) || input < -(BigInt(2) ** BigInt(32))) {\n received = addNumericalSeparator(received)\n }\n received += 'n'\n }\n msg += ` It must be ${range}. Received ${received}`\n return msg\n }, RangeError)\n\nfunction addNumericalSeparator (val) {\n let res = ''\n let i = val.length\n const start = val[0] === '-' ? 1 : 0\n for (; i >= start + 4; i -= 3) {\n res = `_${val.slice(i - 3, i)}${res}`\n }\n return `${val.slice(0, i)}${res}`\n}\n\n// CHECK FUNCTIONS\n// ===============\n\nfunction checkBounds (buf, offset, byteLength) {\n validateNumber(offset, 'offset')\n if (buf[offset] === undefined || buf[offset + byteLength] === undefined) {\n boundsError(offset, buf.length - (byteLength + 1))\n }\n}\n\nfunction checkIntBI (value, min, max, buf, offset, byteLength) {\n if (value > max || value < min) {\n const n = typeof min === 'bigint' ? 'n' : ''\n let range\n if (byteLength > 3) {\n if (min === 0 || min === BigInt(0)) {\n range = `>= 0${n} and < 2${n} ** ${(byteLength + 1) * 8}${n}`\n } else {\n range = `>= -(2${n} ** ${(byteLength + 1) * 8 - 1}${n}) and < 2 ** ` +\n `${(byteLength + 1) * 8 - 1}${n}`\n }\n } else {\n range = `>= ${min}${n} and <= ${max}${n}`\n }\n throw new errors.ERR_OUT_OF_RANGE('value', range, value)\n }\n checkBounds(buf, offset, byteLength)\n}\n\nfunction validateNumber (value, name) {\n if (typeof value !== 'number') {\n throw new errors.ERR_INVALID_ARG_TYPE(name, 'number', value)\n }\n}\n\nfunction boundsError (value, length, type) {\n if (Math.floor(value) !== value) {\n validateNumber(value, type)\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset', 'an integer', value)\n }\n\n if (length < 0) {\n throw new errors.ERR_BUFFER_OUT_OF_BOUNDS()\n }\n\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset',\n `>= ${type ? 1 : 0} and <= ${length}`,\n value)\n}\n\n// HELPER FUNCTIONS\n// ================\n\nconst INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n // Node takes equal signs as end of the Base64 encoding\n str = str.split('=')[0]\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = str.trim().replace(INVALID_BASE64_RE, '')\n // Node converts strings with length < 2 to ''\n if (str.length < 2) return ''\n // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n while (str.length % 4 !== 0) {\n str = str + '='\n }\n return str\n}\n\nfunction utf8ToBytes (string, units) {\n units = units || Infinity\n let codePoint\n const length = string.length\n let leadSurrogate = null\n const bytes = []\n\n for (let i = 0; i < length; ++i) {\n codePoint = string.charCodeAt(i)\n\n // is surrogate component\n if (codePoint > 0xD7FF && codePoint < 0xE000) {\n // last char was a lead\n if (!leadSurrogate) {\n // no lead yet\n if (codePoint > 0xDBFF) {\n // unexpected trail\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n } else if (i + 1 === length) {\n // unpaired lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n }\n\n // valid lead\n leadSurrogate = codePoint\n\n continue\n }\n\n // 2 leads in a row\n if (codePoint < 0xDC00) {\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n leadSurrogate = codePoint\n continue\n }\n\n // valid surrogate pair\n codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n } else if (leadSurrogate) {\n // valid bmp char, but last char was a lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n }\n\n leadSurrogate = null\n\n // encode utf8\n if (codePoint < 0x80) {\n if ((units -= 1) < 0) break\n bytes.push(codePoint)\n } else if (codePoint < 0x800) {\n if ((units -= 2) < 0) break\n bytes.push(\n codePoint >> 0x6 | 0xC0,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x10000) {\n if ((units -= 3) < 0) break\n bytes.push(\n codePoint >> 0xC | 0xE0,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x110000) {\n if ((units -= 4) < 0) break\n bytes.push(\n codePoint >> 0x12 | 0xF0,\n codePoint >> 0xC & 0x3F | 0x80,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else {\n throw new Error('Invalid code point')\n }\n }\n\n return bytes\n}\n\nfunction asciiToBytes (str) {\n const byteArray = []\n for (let i = 0; i < str.length; ++i) {\n // Node's code seems to be doing this and not & 0x7F..\n byteArray.push(str.charCodeAt(i) & 0xFF)\n }\n return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n let c, hi, lo\n const byteArray = []\n for (let i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0) break\n\n c = str.charCodeAt(i)\n hi = c >> 8\n lo = c % 256\n byteArray.push(lo)\n byteArray.push(hi)\n }\n\n return byteArray\n}\n\nfunction base64ToBytes (str) {\n return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n let i\n for (i = 0; i < length; ++i) {\n if ((i + offset >= dst.length) || (i >= src.length)) break\n dst[i + offset] = src[i]\n }\n return i\n}\n\n// ArrayBuffer or Uint8Array objects from other contexts (i.e. iframes) do not pass\n// the `instanceof` check but they should be treated as of that type.\n// See: https://github.com/feross/buffer/issues/166\nfunction isInstance (obj, type) {\n return obj instanceof type ||\n (obj != null && obj.constructor != null && obj.constructor.name != null &&\n obj.constructor.name === type.name)\n}\nfunction numberIsNaN (obj) {\n // For IE11 support\n return obj !== obj // eslint-disable-line no-self-compare\n}\n\n// Create lookup table for `toString('hex')`\n// See: https://github.com/feross/buffer/issues/219\nconst hexSliceLookupTable = (function () {\n const alphabet = '0123456789abcdef'\n const table = new Array(256)\n for (let i = 0; i < 16; ++i) {\n const i16 = i * 16\n for (let j = 0; j < 16; ++j) {\n table[i16 + j] = alphabet[i] + alphabet[j]\n }\n }\n return table\n})()\n\n// Return not function with Error if BigInt not supported\nfunction defineBigIntMethod (fn) {\n return typeof BigInt === 'undefined' ? BufferBigIntNotDefined : fn\n}\n\nfunction BufferBigIntNotDefined () {\n throw new Error('BigInt not supported')\n}\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\nvar R = typeof Reflect === 'object' ? Reflect : null\nvar ReflectApply = R && typeof R.apply === 'function'\n ? R.apply\n : function ReflectApply(target, receiver, args) {\n return Function.prototype.apply.call(target, receiver, args);\n }\n\nvar ReflectOwnKeys\nif (R && typeof R.ownKeys === 'function') {\n ReflectOwnKeys = R.ownKeys\n} else if (Object.getOwnPropertySymbols) {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target)\n .concat(Object.getOwnPropertySymbols(target));\n };\n} else {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target);\n };\n}\n\nfunction ProcessEmitWarning(warning) {\n if (console && console.warn) console.warn(warning);\n}\n\nvar NumberIsNaN = Number.isNaN || function NumberIsNaN(value) {\n return value !== value;\n}\n\nfunction EventEmitter() {\n EventEmitter.init.call(this);\n}\nmodule.exports = EventEmitter;\nmodule.exports.once = once;\n\n// Backwards-compat with node 0.10.x\nEventEmitter.EventEmitter = EventEmitter;\n\nEventEmitter.prototype._events = undefined;\nEventEmitter.prototype._eventsCount = 0;\nEventEmitter.prototype._maxListeners = undefined;\n\n// By default EventEmitters will print a warning if more than 10 listeners are\n// added to it. This is a useful default which helps finding memory leaks.\nvar defaultMaxListeners = 10;\n\nfunction checkListener(listener) {\n if (typeof listener !== 'function') {\n throw new TypeError('The \"listener\" argument must be of type Function. Received type ' + typeof listener);\n }\n}\n\nObject.defineProperty(EventEmitter, 'defaultMaxListeners', {\n enumerable: true,\n get: function() {\n return defaultMaxListeners;\n },\n set: function(arg) {\n if (typeof arg !== 'number' || arg < 0 || NumberIsNaN(arg)) {\n throw new RangeError('The value of \"defaultMaxListeners\" is out of range. It must be a non-negative number. Received ' + arg + '.');\n }\n defaultMaxListeners = arg;\n }\n});\n\nEventEmitter.init = function() {\n\n if (this._events === undefined ||\n this._events === Object.getPrototypeOf(this)._events) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n }\n\n this._maxListeners = this._maxListeners || undefined;\n};\n\n// Obviously not all Emitters should be limited to 10. This function allows\n// that to be increased. Set to zero for unlimited.\nEventEmitter.prototype.setMaxListeners = function setMaxListeners(n) {\n if (typeof n !== 'number' || n < 0 || NumberIsNaN(n)) {\n throw new RangeError('The value of \"n\" is out of range. It must be a non-negative number. Received ' + n + '.');\n }\n this._maxListeners = n;\n return this;\n};\n\nfunction _getMaxListeners(that) {\n if (that._maxListeners === undefined)\n return EventEmitter.defaultMaxListeners;\n return that._maxListeners;\n}\n\nEventEmitter.prototype.getMaxListeners = function getMaxListeners() {\n return _getMaxListeners(this);\n};\n\nEventEmitter.prototype.emit = function emit(type) {\n var args = [];\n for (var i = 1; i < arguments.length; i++) args.push(arguments[i]);\n var doError = (type === 'error');\n\n var events = this._events;\n if (events !== undefined)\n doError = (doError && events.error === undefined);\n else if (!doError)\n return false;\n\n // If there is no 'error' event listener then throw.\n if (doError) {\n var er;\n if (args.length > 0)\n er = args[0];\n if (er instanceof Error) {\n // Note: The comments on the `throw` lines are intentional, they show\n // up in Node's output if this results in an unhandled exception.\n throw er; // Unhandled 'error' event\n }\n // At least give some kind of context to the user\n var err = new Error('Unhandled error.' + (er ? ' (' + er.message + ')' : ''));\n err.context = er;\n throw err; // Unhandled 'error' event\n }\n\n var handler = events[type];\n\n if (handler === undefined)\n return false;\n\n if (typeof handler === 'function') {\n ReflectApply(handler, this, args);\n } else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n ReflectApply(listeners[i], this, args);\n }\n\n return true;\n};\n\nfunction _addListener(target, type, listener, prepend) {\n var m;\n var events;\n var existing;\n\n checkListener(listener);\n\n events = target._events;\n if (events === undefined) {\n events = target._events = Object.create(null);\n target._eventsCount = 0;\n } else {\n // To avoid recursion in the case that type === \"newListener\"! Before\n // adding it to the listeners, first emit \"newListener\".\n if (events.newListener !== undefined) {\n target.emit('newListener', type,\n listener.listener ? listener.listener : listener);\n\n // Re-assign `events` because a newListener handler could have caused the\n // this._events to be assigned to a new object\n events = target._events;\n }\n existing = events[type];\n }\n\n if (existing === undefined) {\n // Optimize the case of one listener. Don't need the extra array object.\n existing = events[type] = listener;\n ++target._eventsCount;\n } else {\n if (typeof existing === 'function') {\n // Adding the second element, need to change to array.\n existing = events[type] =\n prepend ? [listener, existing] : [existing, listener];\n // If we've already got an array, just append.\n } else if (prepend) {\n existing.unshift(listener);\n } else {\n existing.push(listener);\n }\n\n // Check for listener leak\n m = _getMaxListeners(target);\n if (m > 0 && existing.length > m && !existing.warned) {\n existing.warned = true;\n // No error code for this since it is a Warning\n // eslint-disable-next-line no-restricted-syntax\n var w = new Error('Possible EventEmitter memory leak detected. ' +\n existing.length + ' ' + String(type) + ' listeners ' +\n 'added. Use emitter.setMaxListeners() to ' +\n 'increase limit');\n w.name = 'MaxListenersExceededWarning';\n w.emitter = target;\n w.type = type;\n w.count = existing.length;\n ProcessEmitWarning(w);\n }\n }\n\n return target;\n}\n\nEventEmitter.prototype.addListener = function addListener(type, listener) {\n return _addListener(this, type, listener, false);\n};\n\nEventEmitter.prototype.on = EventEmitter.prototype.addListener;\n\nEventEmitter.prototype.prependListener =\n function prependListener(type, listener) {\n return _addListener(this, type, listener, true);\n };\n\nfunction onceWrapper() {\n if (!this.fired) {\n this.target.removeListener(this.type, this.wrapFn);\n this.fired = true;\n if (arguments.length === 0)\n return this.listener.call(this.target);\n return this.listener.apply(this.target, arguments);\n }\n}\n\nfunction _onceWrap(target, type, listener) {\n var state = { fired: false, wrapFn: undefined, target: target, type: type, listener: listener };\n var wrapped = onceWrapper.bind(state);\n wrapped.listener = listener;\n state.wrapFn = wrapped;\n return wrapped;\n}\n\nEventEmitter.prototype.once = function once(type, listener) {\n checkListener(listener);\n this.on(type, _onceWrap(this, type, listener));\n return this;\n};\n\nEventEmitter.prototype.prependOnceListener =\n function prependOnceListener(type, listener) {\n checkListener(listener);\n this.prependListener(type, _onceWrap(this, type, listener));\n return this;\n };\n\n// Emits a 'removeListener' event if and only if the listener was removed.\nEventEmitter.prototype.removeListener =\n function removeListener(type, listener) {\n var list, events, position, i, originalListener;\n\n checkListener(listener);\n\n events = this._events;\n if (events === undefined)\n return this;\n\n list = events[type];\n if (list === undefined)\n return this;\n\n if (list === listener || list.listener === listener) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else {\n delete events[type];\n if (events.removeListener)\n this.emit('removeListener', type, list.listener || listener);\n }\n } else if (typeof list !== 'function') {\n position = -1;\n\n for (i = list.length - 1; i >= 0; i--) {\n if (list[i] === listener || list[i].listener === listener) {\n originalListener = list[i].listener;\n position = i;\n break;\n }\n }\n\n if (position < 0)\n return this;\n\n if (position === 0)\n list.shift();\n else {\n spliceOne(list, position);\n }\n\n if (list.length === 1)\n events[type] = list[0];\n\n if (events.removeListener !== undefined)\n this.emit('removeListener', type, originalListener || listener);\n }\n\n return this;\n };\n\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\n\nEventEmitter.prototype.removeAllListeners =\n function removeAllListeners(type) {\n var listeners, events, i;\n\n events = this._events;\n if (events === undefined)\n return this;\n\n // not listening for removeListener, no need to emit\n if (events.removeListener === undefined) {\n if (arguments.length === 0) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n } else if (events[type] !== undefined) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else\n delete events[type];\n }\n return this;\n }\n\n // emit removeListener for all listeners on all events\n if (arguments.length === 0) {\n var keys = Object.keys(events);\n var key;\n for (i = 0; i < keys.length; ++i) {\n key = keys[i];\n if (key === 'removeListener') continue;\n this.removeAllListeners(key);\n }\n this.removeAllListeners('removeListener');\n this._events = Object.create(null);\n this._eventsCount = 0;\n return this;\n }\n\n listeners = events[type];\n\n if (typeof listeners === 'function') {\n this.removeListener(type, listeners);\n } else if (listeners !== undefined) {\n // LIFO order\n for (i = listeners.length - 1; i >= 0; i--) {\n this.removeListener(type, listeners[i]);\n }\n }\n\n return this;\n };\n\nfunction _listeners(target, type, unwrap) {\n var events = target._events;\n\n if (events === undefined)\n return [];\n\n var evlistener = events[type];\n if (evlistener === undefined)\n return [];\n\n if (typeof evlistener === 'function')\n return unwrap ? [evlistener.listener || evlistener] : [evlistener];\n\n return unwrap ?\n unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length);\n}\n\nEventEmitter.prototype.listeners = function listeners(type) {\n return _listeners(this, type, true);\n};\n\nEventEmitter.prototype.rawListeners = function rawListeners(type) {\n return _listeners(this, type, false);\n};\n\nEventEmitter.listenerCount = function(emitter, type) {\n if (typeof emitter.listenerCount === 'function') {\n return emitter.listenerCount(type);\n } else {\n return listenerCount.call(emitter, type);\n }\n};\n\nEventEmitter.prototype.listenerCount = listenerCount;\nfunction listenerCount(type) {\n var events = this._events;\n\n if (events !== undefined) {\n var evlistener = events[type];\n\n if (typeof evlistener === 'function') {\n return 1;\n } else if (evlistener !== undefined) {\n return evlistener.length;\n }\n }\n\n return 0;\n}\n\nEventEmitter.prototype.eventNames = function eventNames() {\n return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : [];\n};\n\nfunction arrayClone(arr, n) {\n var copy = new Array(n);\n for (var i = 0; i < n; ++i)\n copy[i] = arr[i];\n return copy;\n}\n\nfunction spliceOne(list, index) {\n for (; index + 1 < list.length; index++)\n list[index] = list[index + 1];\n list.pop();\n}\n\nfunction unwrapListeners(arr) {\n var ret = new Array(arr.length);\n for (var i = 0; i < ret.length; ++i) {\n ret[i] = arr[i].listener || arr[i];\n }\n return ret;\n}\n\nfunction once(emitter, name) {\n return new Promise(function (resolve, reject) {\n function errorListener(err) {\n emitter.removeListener(name, resolver);\n reject(err);\n }\n\n function resolver() {\n if (typeof emitter.removeListener === 'function') {\n emitter.removeListener('error', errorListener);\n }\n resolve([].slice.call(arguments));\n };\n\n eventTargetAgnosticAddListener(emitter, name, resolver, { once: true });\n if (name !== 'error') {\n addErrorHandlerIfEventEmitter(emitter, errorListener, { once: true });\n }\n });\n}\n\nfunction addErrorHandlerIfEventEmitter(emitter, handler, flags) {\n if (typeof emitter.on === 'function') {\n eventTargetAgnosticAddListener(emitter, 'error', handler, flags);\n }\n}\n\nfunction eventTargetAgnosticAddListener(emitter, name, listener, flags) {\n if (typeof emitter.on === 'function') {\n if (flags.once) {\n emitter.once(name, listener);\n } else {\n emitter.on(name, listener);\n }\n } else if (typeof emitter.addEventListener === 'function') {\n // EventTarget does not have `error` event semantics like Node\n // EventEmitters, we do not listen for `error` events here.\n emitter.addEventListener(name, function wrapListener(arg) {\n // IE does not have builtin `{ once: true }` support so we\n // have to do it manually.\n if (flags.once) {\n emitter.removeEventListener(name, wrapListener);\n }\n listener(arg);\n });\n } else {\n throw new TypeError('The \"emitter\" argument must be of type EventEmitter. Received type ' + typeof emitter);\n }\n}\n","/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */\nexports.read = function (buffer, offset, isLE, mLen, nBytes) {\n var e, m\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var nBits = -7\n var i = isLE ? (nBytes - 1) : 0\n var d = isLE ? -1 : 1\n var s = buffer[offset + i]\n\n i += d\n\n e = s & ((1 << (-nBits)) - 1)\n s >>= (-nBits)\n nBits += eLen\n for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & ((1 << (-nBits)) - 1)\n e >>= (-nBits)\n nBits += mLen\n for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias\n } else if (e === eMax) {\n return m ? NaN : ((s ? -1 : 1) * Infinity)\n } else {\n m = m + Math.pow(2, mLen)\n e = e - eBias\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n var i = isLE ? 0 : (nBytes - 1)\n var d = isLE ? 1 : -1\n var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n value = Math.abs(value)\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0\n e = eMax\n } else {\n e = Math.floor(Math.log(value) / Math.LN2)\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--\n c *= 2\n }\n if (e + eBias >= 1) {\n value += rt / c\n } else {\n value += rt * Math.pow(2, 1 - eBias)\n }\n if (value * c >= 2) {\n e++\n c /= 2\n }\n\n if (e + eBias >= eMax) {\n m = 0\n e = eMax\n } else if (e + eBias >= 1) {\n m = ((value * c) - 1) * Math.pow(2, mLen)\n e = e + eBias\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n e = 0\n }\n }\n\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n e = (e << mLen) | m\n eLen += mLen\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128\n}\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView');\n\nmodule.exports = DataView;\n","var hashClear = require('./_hashClear'),\n hashDelete = require('./_hashDelete'),\n hashGet = require('./_hashGet'),\n hashHas = require('./_hashHas'),\n hashSet = require('./_hashSet');\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\nmodule.exports = Hash;\n","var listCacheClear = require('./_listCacheClear'),\n listCacheDelete = require('./_listCacheDelete'),\n listCacheGet = require('./_listCacheGet'),\n listCacheHas = require('./_listCacheHas'),\n listCacheSet = require('./_listCacheSet');\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\nmodule.exports = ListCache;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map');\n\nmodule.exports = Map;\n","var mapCacheClear = require('./_mapCacheClear'),\n mapCacheDelete = require('./_mapCacheDelete'),\n mapCacheGet = require('./_mapCacheGet'),\n mapCacheHas = require('./_mapCacheHas'),\n mapCacheSet = require('./_mapCacheSet');\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\nmodule.exports = MapCache;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Promise = getNative(root, 'Promise');\n\nmodule.exports = Promise;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Set = getNative(root, 'Set');\n\nmodule.exports = Set;\n","var MapCache = require('./_MapCache'),\n setCacheAdd = require('./_setCacheAdd'),\n setCacheHas = require('./_setCacheHas');\n\n/**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\nfunction SetCache(values) {\n var index = -1,\n length = values == null ? 0 : values.length;\n\n this.__data__ = new MapCache;\n while (++index < length) {\n this.add(values[index]);\n }\n}\n\n// Add methods to `SetCache`.\nSetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\nSetCache.prototype.has = setCacheHas;\n\nmodule.exports = SetCache;\n","var ListCache = require('./_ListCache'),\n stackClear = require('./_stackClear'),\n stackDelete = require('./_stackDelete'),\n stackGet = require('./_stackGet'),\n stackHas = require('./_stackHas'),\n stackSet = require('./_stackSet');\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\nmodule.exports = Stack;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Uint8Array = root.Uint8Array;\n\nmodule.exports = Uint8Array;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar WeakMap = getNative(root, 'WeakMap');\n\nmodule.exports = WeakMap;\n","/**\n * A specialized version of `_.forEach` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\nfunction arrayEach(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (iteratee(array[index], index, array) === false) {\n break;\n }\n }\n return array;\n}\n\nmodule.exports = arrayEach;\n","/**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\nfunction arrayFilter(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result[resIndex++] = value;\n }\n }\n return result;\n}\n\nmodule.exports = arrayFilter;\n","var baseTimes = require('./_baseTimes'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isIndex = require('./_isIndex'),\n isTypedArray = require('./isTypedArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = arrayLikeKeys;\n","/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n}\n\nmodule.exports = arrayPush;\n","/**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\nfunction arraySome(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (predicate(array[index], index, array)) {\n return true;\n }\n }\n return false;\n}\n\nmodule.exports = arraySome;\n","var baseAssignValue = require('./_baseAssignValue'),\n eq = require('./eq');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\nmodule.exports = assignValue;\n","var eq = require('./eq');\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\nmodule.exports = assocIndexOf;\n","var copyObject = require('./_copyObject'),\n keys = require('./keys');\n\n/**\n * The base implementation of `_.assign` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssign(object, source) {\n return object && copyObject(source, keys(source), object);\n}\n\nmodule.exports = baseAssign;\n","var copyObject = require('./_copyObject'),\n keysIn = require('./keysIn');\n\n/**\n * The base implementation of `_.assignIn` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssignIn(object, source) {\n return object && copyObject(source, keysIn(source), object);\n}\n\nmodule.exports = baseAssignIn;\n","var defineProperty = require('./_defineProperty');\n\n/**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction baseAssignValue(object, key, value) {\n if (key == '__proto__' && defineProperty) {\n defineProperty(object, key, {\n 'configurable': true,\n 'enumerable': true,\n 'value': value,\n 'writable': true\n });\n } else {\n object[key] = value;\n }\n}\n\nmodule.exports = baseAssignValue;\n","var Stack = require('./_Stack'),\n arrayEach = require('./_arrayEach'),\n assignValue = require('./_assignValue'),\n baseAssign = require('./_baseAssign'),\n baseAssignIn = require('./_baseAssignIn'),\n cloneBuffer = require('./_cloneBuffer'),\n copyArray = require('./_copyArray'),\n copySymbols = require('./_copySymbols'),\n copySymbolsIn = require('./_copySymbolsIn'),\n getAllKeys = require('./_getAllKeys'),\n getAllKeysIn = require('./_getAllKeysIn'),\n getTag = require('./_getTag'),\n initCloneArray = require('./_initCloneArray'),\n initCloneByTag = require('./_initCloneByTag'),\n initCloneObject = require('./_initCloneObject'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isMap = require('./isMap'),\n isObject = require('./isObject'),\n isSet = require('./isSet'),\n keys = require('./keys'),\n keysIn = require('./keysIn');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_FLAT_FLAG = 2,\n CLONE_SYMBOLS_FLAG = 4;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values supported by `_.clone`. */\nvar cloneableTags = {};\ncloneableTags[argsTag] = cloneableTags[arrayTag] =\ncloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =\ncloneableTags[boolTag] = cloneableTags[dateTag] =\ncloneableTags[float32Tag] = cloneableTags[float64Tag] =\ncloneableTags[int8Tag] = cloneableTags[int16Tag] =\ncloneableTags[int32Tag] = cloneableTags[mapTag] =\ncloneableTags[numberTag] = cloneableTags[objectTag] =\ncloneableTags[regexpTag] = cloneableTags[setTag] =\ncloneableTags[stringTag] = cloneableTags[symbolTag] =\ncloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =\ncloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;\ncloneableTags[errorTag] = cloneableTags[funcTag] =\ncloneableTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.clone` and `_.cloneDeep` which tracks\n * traversed objects.\n *\n * @private\n * @param {*} value The value to clone.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Deep clone\n * 2 - Flatten inherited properties\n * 4 - Clone symbols\n * @param {Function} [customizer] The function to customize cloning.\n * @param {string} [key] The key of `value`.\n * @param {Object} [object] The parent object of `value`.\n * @param {Object} [stack] Tracks traversed objects and their clone counterparts.\n * @returns {*} Returns the cloned value.\n */\nfunction baseClone(value, bitmask, customizer, key, object, stack) {\n var result,\n isDeep = bitmask & CLONE_DEEP_FLAG,\n isFlat = bitmask & CLONE_FLAT_FLAG,\n isFull = bitmask & CLONE_SYMBOLS_FLAG;\n\n if (customizer) {\n result = object ? customizer(value, key, object, stack) : customizer(value);\n }\n if (result !== undefined) {\n return result;\n }\n if (!isObject(value)) {\n return value;\n }\n var isArr = isArray(value);\n if (isArr) {\n result = initCloneArray(value);\n if (!isDeep) {\n return copyArray(value, result);\n }\n } else {\n var tag = getTag(value),\n isFunc = tag == funcTag || tag == genTag;\n\n if (isBuffer(value)) {\n return cloneBuffer(value, isDeep);\n }\n if (tag == objectTag || tag == argsTag || (isFunc && !object)) {\n result = (isFlat || isFunc) ? {} : initCloneObject(value);\n if (!isDeep) {\n return isFlat\n ? copySymbolsIn(value, baseAssignIn(result, value))\n : copySymbols(value, baseAssign(result, value));\n }\n } else {\n if (!cloneableTags[tag]) {\n return object ? value : {};\n }\n result = initCloneByTag(value, tag, isDeep);\n }\n }\n // Check for circular references and return its corresponding clone.\n stack || (stack = new Stack);\n var stacked = stack.get(value);\n if (stacked) {\n return stacked;\n }\n stack.set(value, result);\n\n if (isSet(value)) {\n value.forEach(function(subValue) {\n result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));\n });\n } else if (isMap(value)) {\n value.forEach(function(subValue, key) {\n result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n }\n\n var keysFunc = isFull\n ? (isFlat ? getAllKeysIn : getAllKeys)\n : (isFlat ? keysIn : keys);\n\n var props = isArr ? undefined : keysFunc(value);\n arrayEach(props || value, function(subValue, key) {\n if (props) {\n key = subValue;\n subValue = value[key];\n }\n // Recursively populate clone (susceptible to call stack limits).\n assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n return result;\n}\n\nmodule.exports = baseClone;\n","var isObject = require('./isObject');\n\n/** Built-in value references. */\nvar objectCreate = Object.create;\n\n/**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} proto The object to inherit from.\n * @returns {Object} Returns the new object.\n */\nvar baseCreate = (function() {\n function object() {}\n return function(proto) {\n if (!isObject(proto)) {\n return {};\n }\n if (objectCreate) {\n return objectCreate(proto);\n }\n object.prototype = proto;\n var result = new object;\n object.prototype = undefined;\n return result;\n };\n}());\n\nmodule.exports = baseCreate;\n","var arrayPush = require('./_arrayPush'),\n isArray = require('./isArray');\n\n/**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction baseGetAllKeys(object, keysFunc, symbolsFunc) {\n var result = keysFunc(object);\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n}\n\nmodule.exports = baseGetAllKeys;\n","var Symbol = require('./_Symbol'),\n getRawTag = require('./_getRawTag'),\n objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]';\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\nmodule.exports = baseIsArguments;\n","var baseIsEqualDeep = require('./_baseIsEqualDeep'),\n isObjectLike = require('./isObjectLike');\n\n/**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Unordered comparison\n * 2 - Partial comparison\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\nfunction baseIsEqual(value, other, bitmask, customizer, stack) {\n if (value === other) {\n return true;\n }\n if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\n return value !== value && other !== other;\n }\n return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n}\n\nmodule.exports = baseIsEqual;\n","var Stack = require('./_Stack'),\n equalArrays = require('./_equalArrays'),\n equalByTag = require('./_equalByTag'),\n equalObjects = require('./_equalObjects'),\n getTag = require('./_getTag'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isTypedArray = require('./isTypedArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n var objIsArr = isArray(object),\n othIsArr = isArray(other),\n objTag = objIsArr ? arrayTag : getTag(object),\n othTag = othIsArr ? arrayTag : getTag(other);\n\n objTag = objTag == argsTag ? objectTag : objTag;\n othTag = othTag == argsTag ? objectTag : othTag;\n\n var objIsObj = objTag == objectTag,\n othIsObj = othTag == objectTag,\n isSameTag = objTag == othTag;\n\n if (isSameTag && isBuffer(object)) {\n if (!isBuffer(other)) {\n return false;\n }\n objIsArr = true;\n objIsObj = false;\n }\n if (isSameTag && !objIsObj) {\n stack || (stack = new Stack);\n return (objIsArr || isTypedArray(object))\n ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n }\n if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n if (objIsWrapped || othIsWrapped) {\n var objUnwrapped = objIsWrapped ? object.value() : object,\n othUnwrapped = othIsWrapped ? other.value() : other;\n\n stack || (stack = new Stack);\n return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n }\n }\n if (!isSameTag) {\n return false;\n }\n stack || (stack = new Stack);\n return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n}\n\nmodule.exports = baseIsEqualDeep;\n","var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]';\n\n/**\n * The base implementation of `_.isMap` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n */\nfunction baseIsMap(value) {\n return isObjectLike(value) && getTag(value) == mapTag;\n}\n\nmodule.exports = baseIsMap;\n","var isFunction = require('./isFunction'),\n isMasked = require('./_isMasked'),\n isObject = require('./isObject'),\n toSource = require('./_toSource');\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\nmodule.exports = baseIsNative;\n","var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar setTag = '[object Set]';\n\n/**\n * The base implementation of `_.isSet` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n */\nfunction baseIsSet(value) {\n return isObjectLike(value) && getTag(value) == setTag;\n}\n\nmodule.exports = baseIsSet;\n","var baseGetTag = require('./_baseGetTag'),\n isLength = require('./isLength'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n\nmodule.exports = baseIsTypedArray;\n","var isPrototype = require('./_isPrototype'),\n nativeKeys = require('./_nativeKeys');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeys;\n","var isObject = require('./isObject'),\n isPrototype = require('./_isPrototype'),\n nativeKeysIn = require('./_nativeKeysIn');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeysIn(object) {\n if (!isObject(object)) {\n return nativeKeysIn(object);\n }\n var isProto = isPrototype(object),\n result = [];\n\n for (var key in object) {\n if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeysIn;\n","/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\nmodule.exports = baseTimes;\n","/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n return function(value) {\n return func(value);\n };\n}\n\nmodule.exports = baseUnary;\n","/**\n * Checks if a `cache` value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction cacheHas(cache, key) {\n return cache.has(key);\n}\n\nmodule.exports = cacheHas;\n","var Uint8Array = require('./_Uint8Array');\n\n/**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\nfunction cloneArrayBuffer(arrayBuffer) {\n var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n return result;\n}\n\nmodule.exports = cloneArrayBuffer;\n","var root = require('./_root');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined,\n allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;\n\n/**\n * Creates a clone of `buffer`.\n *\n * @private\n * @param {Buffer} buffer The buffer to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Buffer} Returns the cloned buffer.\n */\nfunction cloneBuffer(buffer, isDeep) {\n if (isDeep) {\n return buffer.slice();\n }\n var length = buffer.length,\n result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\n\n buffer.copy(result);\n return result;\n}\n\nmodule.exports = cloneBuffer;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer');\n\n/**\n * Creates a clone of `dataView`.\n *\n * @private\n * @param {Object} dataView The data view to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned data view.\n */\nfunction cloneDataView(dataView, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;\n return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);\n}\n\nmodule.exports = cloneDataView;\n","/** Used to match `RegExp` flags from their coerced string values. */\nvar reFlags = /\\w*$/;\n\n/**\n * Creates a clone of `regexp`.\n *\n * @private\n * @param {Object} regexp The regexp to clone.\n * @returns {Object} Returns the cloned regexp.\n */\nfunction cloneRegExp(regexp) {\n var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));\n result.lastIndex = regexp.lastIndex;\n return result;\n}\n\nmodule.exports = cloneRegExp;\n","var Symbol = require('./_Symbol');\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * Creates a clone of the `symbol` object.\n *\n * @private\n * @param {Object} symbol The symbol object to clone.\n * @returns {Object} Returns the cloned symbol object.\n */\nfunction cloneSymbol(symbol) {\n return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};\n}\n\nmodule.exports = cloneSymbol;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer');\n\n/**\n * Creates a clone of `typedArray`.\n *\n * @private\n * @param {Object} typedArray The typed array to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned typed array.\n */\nfunction cloneTypedArray(typedArray, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n}\n\nmodule.exports = cloneTypedArray;\n","/**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\nfunction copyArray(source, array) {\n var index = -1,\n length = source.length;\n\n array || (array = Array(length));\n while (++index < length) {\n array[index] = source[index];\n }\n return array;\n}\n\nmodule.exports = copyArray;\n","var assignValue = require('./_assignValue'),\n baseAssignValue = require('./_baseAssignValue');\n\n/**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\nfunction copyObject(source, props, object, customizer) {\n var isNew = !object;\n object || (object = {});\n\n var index = -1,\n length = props.length;\n\n while (++index < length) {\n var key = props[index];\n\n var newValue = customizer\n ? customizer(object[key], source[key], key, object, source)\n : undefined;\n\n if (newValue === undefined) {\n newValue = source[key];\n }\n if (isNew) {\n baseAssignValue(object, key, newValue);\n } else {\n assignValue(object, key, newValue);\n }\n }\n return object;\n}\n\nmodule.exports = copyObject;\n","var copyObject = require('./_copyObject'),\n getSymbols = require('./_getSymbols');\n\n/**\n * Copies own symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbols(source, object) {\n return copyObject(source, getSymbols(source), object);\n}\n\nmodule.exports = copySymbols;\n","var copyObject = require('./_copyObject'),\n getSymbolsIn = require('./_getSymbolsIn');\n\n/**\n * Copies own and inherited symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbolsIn(source, object) {\n return copyObject(source, getSymbolsIn(source), object);\n}\n\nmodule.exports = copySymbolsIn;\n","var root = require('./_root');\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\nmodule.exports = coreJsData;\n","var getNative = require('./_getNative');\n\nvar defineProperty = (function() {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n}());\n\nmodule.exports = defineProperty;\n","var SetCache = require('./_SetCache'),\n arraySome = require('./_arraySome'),\n cacheHas = require('./_cacheHas');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\nfunction equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n arrLength = array.length,\n othLength = other.length;\n\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n return false;\n }\n // Check that cyclic values are equal.\n var arrStacked = stack.get(array);\n var othStacked = stack.get(other);\n if (arrStacked && othStacked) {\n return arrStacked == other && othStacked == array;\n }\n var index = -1,\n result = true,\n seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n stack.set(array, other);\n stack.set(other, array);\n\n // Ignore non-index properties.\n while (++index < arrLength) {\n var arrValue = array[index],\n othValue = other[index];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, arrValue, index, other, array, stack)\n : customizer(arrValue, othValue, index, array, other, stack);\n }\n if (compared !== undefined) {\n if (compared) {\n continue;\n }\n result = false;\n break;\n }\n // Recursively compare arrays (susceptible to call stack limits).\n if (seen) {\n if (!arraySome(other, function(othValue, othIndex) {\n if (!cacheHas(seen, othIndex) &&\n (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n return seen.push(othIndex);\n }\n })) {\n result = false;\n break;\n }\n } else if (!(\n arrValue === othValue ||\n equalFunc(arrValue, othValue, bitmask, customizer, stack)\n )) {\n result = false;\n break;\n }\n }\n stack['delete'](array);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalArrays;\n","var Symbol = require('./_Symbol'),\n Uint8Array = require('./_Uint8Array'),\n eq = require('./eq'),\n equalArrays = require('./_equalArrays'),\n mapToArray = require('./_mapToArray'),\n setToArray = require('./_setToArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]';\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n switch (tag) {\n case dataViewTag:\n if ((object.byteLength != other.byteLength) ||\n (object.byteOffset != other.byteOffset)) {\n return false;\n }\n object = object.buffer;\n other = other.buffer;\n\n case arrayBufferTag:\n if ((object.byteLength != other.byteLength) ||\n !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n return false;\n }\n return true;\n\n case boolTag:\n case dateTag:\n case numberTag:\n // Coerce booleans to `1` or `0` and dates to milliseconds.\n // Invalid dates are coerced to `NaN`.\n return eq(+object, +other);\n\n case errorTag:\n return object.name == other.name && object.message == other.message;\n\n case regexpTag:\n case stringTag:\n // Coerce regexes to strings and treat strings, primitives and objects,\n // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n // for more details.\n return object == (other + '');\n\n case mapTag:\n var convert = mapToArray;\n\n case setTag:\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n convert || (convert = setToArray);\n\n if (object.size != other.size && !isPartial) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked) {\n return stacked == other;\n }\n bitmask |= COMPARE_UNORDERED_FLAG;\n\n // Recursively compare objects (susceptible to call stack limits).\n stack.set(object, other);\n var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n stack['delete'](object);\n return result;\n\n case symbolTag:\n if (symbolValueOf) {\n return symbolValueOf.call(object) == symbolValueOf.call(other);\n }\n }\n return false;\n}\n\nmodule.exports = equalByTag;\n","var getAllKeys = require('./_getAllKeys');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n objProps = getAllKeys(object),\n objLength = objProps.length,\n othProps = getAllKeys(other),\n othLength = othProps.length;\n\n if (objLength != othLength && !isPartial) {\n return false;\n }\n var index = objLength;\n while (index--) {\n var key = objProps[index];\n if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n return false;\n }\n }\n // Check that cyclic values are equal.\n var objStacked = stack.get(object);\n var othStacked = stack.get(other);\n if (objStacked && othStacked) {\n return objStacked == other && othStacked == object;\n }\n var result = true;\n stack.set(object, other);\n stack.set(other, object);\n\n var skipCtor = isPartial;\n while (++index < objLength) {\n key = objProps[index];\n var objValue = object[key],\n othValue = other[key];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, objValue, key, other, object, stack)\n : customizer(objValue, othValue, key, object, other, stack);\n }\n // Recursively compare objects (susceptible to call stack limits).\n if (!(compared === undefined\n ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n : compared\n )) {\n result = false;\n break;\n }\n skipCtor || (skipCtor = key == 'constructor');\n }\n if (result && !skipCtor) {\n var objCtor = object.constructor,\n othCtor = other.constructor;\n\n // Non `Object` object instances with different constructors are not equal.\n if (objCtor != othCtor &&\n ('constructor' in object && 'constructor' in other) &&\n !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n result = false;\n }\n }\n stack['delete'](object);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalObjects;\n","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n","var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbols = require('./_getSymbols'),\n keys = require('./keys');\n\n/**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeys(object) {\n return baseGetAllKeys(object, keys, getSymbols);\n}\n\nmodule.exports = getAllKeys;\n","var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbolsIn = require('./_getSymbolsIn'),\n keysIn = require('./keysIn');\n\n/**\n * Creates an array of own and inherited enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeysIn(object) {\n return baseGetAllKeys(object, keysIn, getSymbolsIn);\n}\n\nmodule.exports = getAllKeysIn;\n","var isKeyable = require('./_isKeyable');\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\nmodule.exports = getMapData;\n","var baseIsNative = require('./_baseIsNative'),\n getValue = require('./_getValue');\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\nmodule.exports = getNative;\n","var overArg = require('./_overArg');\n\n/** Built-in value references. */\nvar getPrototype = overArg(Object.getPrototypeOf, Object);\n\nmodule.exports = getPrototype;\n","var Symbol = require('./_Symbol');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nmodule.exports = getRawTag;\n","var arrayFilter = require('./_arrayFilter'),\n stubArray = require('./stubArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n if (object == null) {\n return [];\n }\n object = Object(object);\n return arrayFilter(nativeGetSymbols(object), function(symbol) {\n return propertyIsEnumerable.call(object, symbol);\n });\n};\n\nmodule.exports = getSymbols;\n","var arrayPush = require('./_arrayPush'),\n getPrototype = require('./_getPrototype'),\n getSymbols = require('./_getSymbols'),\n stubArray = require('./stubArray');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own and inherited enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {\n var result = [];\n while (object) {\n arrayPush(result, getSymbols(object));\n object = getPrototype(object);\n }\n return result;\n};\n\nmodule.exports = getSymbolsIn;\n","var DataView = require('./_DataView'),\n Map = require('./_Map'),\n Promise = require('./_Promise'),\n Set = require('./_Set'),\n WeakMap = require('./_WeakMap'),\n baseGetTag = require('./_baseGetTag'),\n toSource = require('./_toSource');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n setTag = '[object Set]',\n weakMapTag = '[object WeakMap]';\n\nvar dataViewTag = '[object DataView]';\n\n/** Used to detect maps, sets, and weakmaps. */\nvar dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nvar getTag = baseGetTag;\n\n// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\nif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = baseGetTag(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : '';\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n}\n\nmodule.exports = getTag;\n","/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\nmodule.exports = getValue;\n","var nativeCreate = require('./_nativeCreate');\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n}\n\nmodule.exports = hashClear;\n","/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = hashDelete;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\nmodule.exports = hashGet;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\nmodule.exports = hashHas;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\nmodule.exports = hashSet;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Initializes an array clone.\n *\n * @private\n * @param {Array} array The array to clone.\n * @returns {Array} Returns the initialized clone.\n */\nfunction initCloneArray(array) {\n var length = array.length,\n result = new array.constructor(length);\n\n // Add properties assigned by `RegExp#exec`.\n if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {\n result.index = array.index;\n result.input = array.input;\n }\n return result;\n}\n\nmodule.exports = initCloneArray;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer'),\n cloneDataView = require('./_cloneDataView'),\n cloneRegExp = require('./_cloneRegExp'),\n cloneSymbol = require('./_cloneSymbol'),\n cloneTypedArray = require('./_cloneTypedArray');\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/**\n * Initializes an object clone based on its `toStringTag`.\n *\n * **Note:** This function only supports cloning values with tags of\n * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.\n *\n * @private\n * @param {Object} object The object to clone.\n * @param {string} tag The `toStringTag` of the object to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneByTag(object, tag, isDeep) {\n var Ctor = object.constructor;\n switch (tag) {\n case arrayBufferTag:\n return cloneArrayBuffer(object);\n\n case boolTag:\n case dateTag:\n return new Ctor(+object);\n\n case dataViewTag:\n return cloneDataView(object, isDeep);\n\n case float32Tag: case float64Tag:\n case int8Tag: case int16Tag: case int32Tag:\n case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:\n return cloneTypedArray(object, isDeep);\n\n case mapTag:\n return new Ctor;\n\n case numberTag:\n case stringTag:\n return new Ctor(object);\n\n case regexpTag:\n return cloneRegExp(object);\n\n case setTag:\n return new Ctor;\n\n case symbolTag:\n return cloneSymbol(object);\n }\n}\n\nmodule.exports = initCloneByTag;\n","var baseCreate = require('./_baseCreate'),\n getPrototype = require('./_getPrototype'),\n isPrototype = require('./_isPrototype');\n\n/**\n * Initializes an object clone.\n *\n * @private\n * @param {Object} object The object to clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneObject(object) {\n return (typeof object.constructor == 'function' && !isPrototype(object))\n ? baseCreate(getPrototype(object))\n : {};\n}\n\nmodule.exports = initCloneObject;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n var type = typeof value;\n length = length == null ? MAX_SAFE_INTEGER : length;\n\n return !!length &&\n (type == 'number' ||\n (type != 'symbol' && reIsUint.test(value))) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\nmodule.exports = isIndex;\n","/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\nmodule.exports = isKeyable;\n","var coreJsData = require('./_coreJsData');\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\nmodule.exports = isMasked;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\nmodule.exports = isPrototype;\n","/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n}\n\nmodule.exports = listCacheClear;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype;\n\n/** Built-in value references. */\nvar splice = arrayProto.splice;\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n}\n\nmodule.exports = listCacheDelete;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\nmodule.exports = listCacheGet;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\nmodule.exports = listCacheHas;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\nmodule.exports = listCacheSet;\n","var Hash = require('./_Hash'),\n ListCache = require('./_ListCache'),\n Map = require('./_Map');\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\nmodule.exports = mapCacheClear;\n","var getMapData = require('./_getMapData');\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = mapCacheDelete;\n","var getMapData = require('./_getMapData');\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\nmodule.exports = mapCacheGet;\n","var getMapData = require('./_getMapData');\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\nmodule.exports = mapCacheHas;\n","var getMapData = require('./_getMapData');\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n}\n\nmodule.exports = mapCacheSet;\n","/**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\nfunction mapToArray(map) {\n var index = -1,\n result = Array(map.size);\n\n map.forEach(function(value, key) {\n result[++index] = [key, value];\n });\n return result;\n}\n\nmodule.exports = mapToArray;\n","var getNative = require('./_getNative');\n\n/* Built-in method references that are verified to be native. */\nvar nativeCreate = getNative(Object, 'create');\n\nmodule.exports = nativeCreate;\n","var overArg = require('./_overArg');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeKeys = overArg(Object.keys, Object);\n\nmodule.exports = nativeKeys;\n","/**\n * This function is like\n * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * except that it includes inherited enumerable properties.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction nativeKeysIn(object) {\n var result = [];\n if (object != null) {\n for (var key in Object(object)) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = nativeKeysIn;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n try {\n // Use `util.types` for Node.js 10+.\n var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n if (types) {\n return types;\n }\n\n // Legacy `process.binding('util')` for Node.js < 10.\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n}());\n\nmodule.exports = nodeUtil;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n","/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\nmodule.exports = overArg;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n","/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\nfunction setCacheAdd(value) {\n this.__data__.set(value, HASH_UNDEFINED);\n return this;\n}\n\nmodule.exports = setCacheAdd;\n","/**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\nfunction setCacheHas(value) {\n return this.__data__.has(value);\n}\n\nmodule.exports = setCacheHas;\n","/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\nfunction setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n}\n\nmodule.exports = setToArray;\n","var ListCache = require('./_ListCache');\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}\n\nmodule.exports = stackClear;\n","/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n var data = this.__data__,\n result = data['delete'](key);\n\n this.size = data.size;\n return result;\n}\n\nmodule.exports = stackDelete;\n","/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n return this.__data__.get(key);\n}\n\nmodule.exports = stackGet;\n","/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n return this.__data__.has(key);\n}\n\nmodule.exports = stackHas;\n","var ListCache = require('./_ListCache'),\n Map = require('./_Map'),\n MapCache = require('./_MapCache');\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n var data = this.__data__;\n if (data instanceof ListCache) {\n var pairs = data.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n this.size = ++data.size;\n return this;\n }\n data = this.__data__ = new MapCache(pairs);\n }\n data.set(key, value);\n this.size = data.size;\n return this;\n}\n\nmodule.exports = stackSet;\n","/** Used for built-in method references. */\nvar funcProto = Function.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\nmodule.exports = toSource;\n","var baseClone = require('./_baseClone');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_SYMBOLS_FLAG = 4;\n\n/**\n * This method is like `_.clone` except that it recursively clones `value`.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Lang\n * @param {*} value The value to recursively clone.\n * @returns {*} Returns the deep cloned value.\n * @see _.clone\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var deep = _.cloneDeep(objects);\n * console.log(deep[0] === objects[0]);\n * // => false\n */\nfunction cloneDeep(value) {\n return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);\n}\n\nmodule.exports = cloneDeep;\n","/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\nmodule.exports = eq;\n","var baseIsArguments = require('./_baseIsArguments'),\n isObjectLike = require('./isObjectLike');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n};\n\nmodule.exports = isArguments;\n","/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\nmodule.exports = isArray;\n","var isFunction = require('./isFunction'),\n isLength = require('./isLength');\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\nmodule.exports = isArrayLike;\n","var root = require('./_root'),\n stubFalse = require('./stubFalse');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\nmodule.exports = isBuffer;\n","var baseIsEqual = require('./_baseIsEqual');\n\n/**\n * Performs a deep comparison between two values to determine if they are\n * equivalent.\n *\n * **Note:** This method supports comparing arrays, array buffers, booleans,\n * date objects, error objects, maps, numbers, `Object` objects, regexes,\n * sets, strings, symbols, and typed arrays. `Object` objects are compared\n * by their own, not inherited, enumerable properties. Functions and DOM\n * nodes are compared by strict equality, i.e. `===`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.isEqual(object, other);\n * // => true\n *\n * object === other;\n * // => false\n */\nfunction isEqual(value, other) {\n return baseIsEqual(value, other);\n}\n\nmodule.exports = isEqual;\n","var baseGetTag = require('./_baseGetTag'),\n isObject = require('./isObject');\n\n/** `Object#toString` result references. */\nvar asyncTag = '[object AsyncFunction]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n proxyTag = '[object Proxy]';\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\nmodule.exports = isFunction;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\nmodule.exports = isLength;\n","var baseIsMap = require('./_baseIsMap'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsMap = nodeUtil && nodeUtil.isMap;\n\n/**\n * Checks if `value` is classified as a `Map` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n * @example\n *\n * _.isMap(new Map);\n * // => true\n *\n * _.isMap(new WeakMap);\n * // => false\n */\nvar isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;\n\nmodule.exports = isMap;\n","/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n","var baseIsSet = require('./_baseIsSet'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsSet = nodeUtil && nodeUtil.isSet;\n\n/**\n * Checks if `value` is classified as a `Set` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n * @example\n *\n * _.isSet(new Set);\n * // => true\n *\n * _.isSet(new WeakSet);\n * // => false\n */\nvar isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;\n\nmodule.exports = isSet;\n","var baseIsTypedArray = require('./_baseIsTypedArray'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\nmodule.exports = isTypedArray;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeys = require('./_baseKeys'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\nmodule.exports = keys;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeysIn = require('./_baseKeysIn'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\nfunction keysIn(object) {\n return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n}\n\nmodule.exports = keysIn;\n","/**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\nfunction stubArray() {\n return [];\n}\n\nmodule.exports = stubArray;\n","/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n return false;\n}\n\nmodule.exports = stubFalse;\n","import { connect, type BaseConnectionOptions } from \"@openfin/core-web\";\nimport { getSettings } from \"./settings\";\n\n/**\n * Initializes the OpenFin Web Broker connection.\n * @param inherit Should we inherit settings from the host (available in the OpenFin layout system) or use settings? Default is true.\n */\nexport async function init(inherit: boolean = true): Promise {\n\t// Set window.fin to the `fin` object.\n\tlet options: BaseConnectionOptions | undefined;\n\tif (window.fin === undefined) {\n\t\tif (!inherit) {\n\t\t\tconst settings = await getSettings();\n\t\t\tif (settings === undefined) {\n\t\t\t\tconsole.error(\n\t\t\t\t\t\"Unable to run the sample as we have been unable to load the web manifest and it's settings from the currently running html page. Please ensure that the web manifest is being served and that it contains the custom_settings section.\"\n\t\t\t\t);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\toptions = {\n\t\t\t\tbrokerUrl: settings.platform.interop.brokerUrl,\n\t\t\t\tinteropConfig: {\n\t\t\t\t\tproviderId: settings.platform.interop.providerId,\n\t\t\t\t\tcurrentContextGroup: settings.platform.interop.defaultContextGroup\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t\t// Specify an interopConfig with a specific provider ID and a context group to initialize the `fin.me.interop` client on connection.\n\t\tif (options) {\n\t\t\twindow.fin = await connect({\n\t\t\t\toptions\n\t\t\t});\n\t\t} else {\n\t\t\twindow.fin = await connect({\n\t\t\t\tconnectionInheritance: \"enabled\"\n\t\t\t});\n\t\t}\n\t\tconsole.log(\"Finished initializing the fin API.\");\n\t\t// Create and dispatch the finReady event\n\t\tconst event = new CustomEvent(\"finReady\");\n\t\twindow.dispatchEvent(event);\n\t}\n\n\tif (window.fdc3 === undefined && window?.fin?.me.interop?.getFDC3Sync !== undefined) {\n\t\twindow.fdc3 = fin.me.interop.getFDC3Sync(\"2.0\");\n\t\tconsole.log(\"Finished initializing the fdc3 API.\");\n\t\t// Create and dispatch the FDC3Ready event\n\t\tconst event = new CustomEvent(\"fdc3Ready\");\n\t\twindow.dispatchEvent(event);\n\t}\n}\n","import type { WebLayoutSnapshot } from \"@openfin/core-web\";\nimport type { Settings } from \"../shapes/setting-shapes\";\n\n/**\n * Fetches the settings for the application.\n * @returns The settings for the application.\n */\nexport async function getSettings(): Promise {\n\tconst settings = await getManifestSettings();\n\tif (settings === undefined) {\n\t\tconsole.error(\n\t\t\t\"Unable to run the example as settings are required and we fetch them from the link web manifest from the html page that is being served. It should exist in the customSettings section of the web manifest.\"\n\t\t);\n\t}\n\treturn settings;\n}\n\n/**\n * Returns a default layout from the settings if provided.\n * @returns The default layout from the settings.\n */\nexport async function getDefaultLayout(): Promise {\n\tconst settings = await getSettings();\n\tif (settings?.platform?.layout?.defaultLayout === undefined) {\n\t\tconsole.error(\n\t\t\t\"Unable to run the example as without a layout being defined. Please ensure that settings have been provided in the web manifest.\"\n\t\t);\n\t\treturn;\n\t}\n\tif (typeof settings.platform.layout.defaultLayout === \"string\") {\n\t\tconst layoutResponse = await fetch(settings.platform.layout.defaultLayout);\n\t\tconst layoutJson = (await layoutResponse.json()) as WebLayoutSnapshot;\n\t\treturn layoutJson;\n\t}\n\treturn settings.platform.layout.defaultLayout;\n}\n\n/**\n * Returns the settings from the manifest file.\n * @returns customSettings for this example\n */\nasync function getManifestSettings(): Promise {\n\t// Get the manifest link\n\tconst link = document.querySelector('link[rel=\"manifest\"]');\n\tif (link !== null) {\n\t\tconst manifestResponse = await fetch(link.href);\n\t\tconst manifestJson = (await manifestResponse.json()) as { custom_settings: Settings };\n\t\treturn manifestJson.custom_settings;\n\t}\n}\n","export { default as v1 } from './v1.js';\nexport { default as v3 } from './v3.js';\nexport { default as v4 } from './v4.js';\nexport { default as v5 } from './v5.js';\nexport { default as NIL } from './nil.js';\nexport { default as version } from './version.js';\nexport { default as validate } from './validate.js';\nexport { default as stringify } from './stringify.js';\nexport { default as parse } from './parse.js';","/*\n * Browser-compatible JavaScript MD5\n *\n * Modification of JavaScript MD5\n * https://github.com/blueimp/JavaScript-MD5\n *\n * Copyright 2011, Sebastian Tschan\n * https://blueimp.net\n *\n * Licensed under the MIT license:\n * https://opensource.org/licenses/MIT\n *\n * Based on\n * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message\n * Digest Algorithm, as defined in RFC 1321.\n * Version 2.2 Copyright (C) Paul Johnston 1999 - 2009\n * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet\n * Distributed under the BSD License\n * See http://pajhome.org.uk/crypt/md5 for more info.\n */\nfunction md5(bytes) {\n if (typeof bytes === 'string') {\n var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape\n\n bytes = new Uint8Array(msg.length);\n\n for (var i = 0; i < msg.length; ++i) {\n bytes[i] = msg.charCodeAt(i);\n }\n }\n\n return md5ToHexEncodedArray(wordsToMd5(bytesToWords(bytes), bytes.length * 8));\n}\n/*\n * Convert an array of little-endian words to an array of bytes\n */\n\n\nfunction md5ToHexEncodedArray(input) {\n var output = [];\n var length32 = input.length * 32;\n var hexTab = '0123456789abcdef';\n\n for (var i = 0; i < length32; i += 8) {\n var x = input[i >> 5] >>> i % 32 & 0xff;\n var hex = parseInt(hexTab.charAt(x >>> 4 & 0x0f) + hexTab.charAt(x & 0x0f), 16);\n output.push(hex);\n }\n\n return output;\n}\n/**\n * Calculate output length with padding and bit length\n */\n\n\nfunction getOutputLength(inputLength8) {\n return (inputLength8 + 64 >>> 9 << 4) + 14 + 1;\n}\n/*\n * Calculate the MD5 of an array of little-endian words, and a bit length.\n */\n\n\nfunction wordsToMd5(x, len) {\n /* append padding */\n x[len >> 5] |= 0x80 << len % 32;\n x[getOutputLength(len) - 1] = len;\n var a = 1732584193;\n var b = -271733879;\n var c = -1732584194;\n var d = 271733878;\n\n for (var i = 0; i < x.length; i += 16) {\n var olda = a;\n var oldb = b;\n var oldc = c;\n var oldd = d;\n a = md5ff(a, b, c, d, x[i], 7, -680876936);\n d = md5ff(d, a, b, c, x[i + 1], 12, -389564586);\n c = md5ff(c, d, a, b, x[i + 2], 17, 606105819);\n b = md5ff(b, c, d, a, x[i + 3], 22, -1044525330);\n a = md5ff(a, b, c, d, x[i + 4], 7, -176418897);\n d = md5ff(d, a, b, c, x[i + 5], 12, 1200080426);\n c = md5ff(c, d, a, b, x[i + 6], 17, -1473231341);\n b = md5ff(b, c, d, a, x[i + 7], 22, -45705983);\n a = md5ff(a, b, c, d, x[i + 8], 7, 1770035416);\n d = md5ff(d, a, b, c, x[i + 9], 12, -1958414417);\n c = md5ff(c, d, a, b, x[i + 10], 17, -42063);\n b = md5ff(b, c, d, a, x[i + 11], 22, -1990404162);\n a = md5ff(a, b, c, d, x[i + 12], 7, 1804603682);\n d = md5ff(d, a, b, c, x[i + 13], 12, -40341101);\n c = md5ff(c, d, a, b, x[i + 14], 17, -1502002290);\n b = md5ff(b, c, d, a, x[i + 15], 22, 1236535329);\n a = md5gg(a, b, c, d, x[i + 1], 5, -165796510);\n d = md5gg(d, a, b, c, x[i + 6], 9, -1069501632);\n c = md5gg(c, d, a, b, x[i + 11], 14, 643717713);\n b = md5gg(b, c, d, a, x[i], 20, -373897302);\n a = md5gg(a, b, c, d, x[i + 5], 5, -701558691);\n d = md5gg(d, a, b, c, x[i + 10], 9, 38016083);\n c = md5gg(c, d, a, b, x[i + 15], 14, -660478335);\n b = md5gg(b, c, d, a, x[i + 4], 20, -405537848);\n a = md5gg(a, b, c, d, x[i + 9], 5, 568446438);\n d = md5gg(d, a, b, c, x[i + 14], 9, -1019803690);\n c = md5gg(c, d, a, b, x[i + 3], 14, -187363961);\n b = md5gg(b, c, d, a, x[i + 8], 20, 1163531501);\n a = md5gg(a, b, c, d, x[i + 13], 5, -1444681467);\n d = md5gg(d, a, b, c, x[i + 2], 9, -51403784);\n c = md5gg(c, d, a, b, x[i + 7], 14, 1735328473);\n b = md5gg(b, c, d, a, x[i + 12], 20, -1926607734);\n a = md5hh(a, b, c, d, x[i + 5], 4, -378558);\n d = md5hh(d, a, b, c, x[i + 8], 11, -2022574463);\n c = md5hh(c, d, a, b, x[i + 11], 16, 1839030562);\n b = md5hh(b, c, d, a, x[i + 14], 23, -35309556);\n a = md5hh(a, b, c, d, x[i + 1], 4, -1530992060);\n d = md5hh(d, a, b, c, x[i + 4], 11, 1272893353);\n c = md5hh(c, d, a, b, x[i + 7], 16, -155497632);\n b = md5hh(b, c, d, a, x[i + 10], 23, -1094730640);\n a = md5hh(a, b, c, d, x[i + 13], 4, 681279174);\n d = md5hh(d, a, b, c, x[i], 11, -358537222);\n c = md5hh(c, d, a, b, x[i + 3], 16, -722521979);\n b = md5hh(b, c, d, a, x[i + 6], 23, 76029189);\n a = md5hh(a, b, c, d, x[i + 9], 4, -640364487);\n d = md5hh(d, a, b, c, x[i + 12], 11, -421815835);\n c = md5hh(c, d, a, b, x[i + 15], 16, 530742520);\n b = md5hh(b, c, d, a, x[i + 2], 23, -995338651);\n a = md5ii(a, b, c, d, x[i], 6, -198630844);\n d = md5ii(d, a, b, c, x[i + 7], 10, 1126891415);\n c = md5ii(c, d, a, b, x[i + 14], 15, -1416354905);\n b = md5ii(b, c, d, a, x[i + 5], 21, -57434055);\n a = md5ii(a, b, c, d, x[i + 12], 6, 1700485571);\n d = md5ii(d, a, b, c, x[i + 3], 10, -1894986606);\n c = md5ii(c, d, a, b, x[i + 10], 15, -1051523);\n b = md5ii(b, c, d, a, x[i + 1], 21, -2054922799);\n a = md5ii(a, b, c, d, x[i + 8], 6, 1873313359);\n d = md5ii(d, a, b, c, x[i + 15], 10, -30611744);\n c = md5ii(c, d, a, b, x[i + 6], 15, -1560198380);\n b = md5ii(b, c, d, a, x[i + 13], 21, 1309151649);\n a = md5ii(a, b, c, d, x[i + 4], 6, -145523070);\n d = md5ii(d, a, b, c, x[i + 11], 10, -1120210379);\n c = md5ii(c, d, a, b, x[i + 2], 15, 718787259);\n b = md5ii(b, c, d, a, x[i + 9], 21, -343485551);\n a = safeAdd(a, olda);\n b = safeAdd(b, oldb);\n c = safeAdd(c, oldc);\n d = safeAdd(d, oldd);\n }\n\n return [a, b, c, d];\n}\n/*\n * Convert an array bytes to an array of little-endian words\n * Characters >255 have their high-byte silently ignored.\n */\n\n\nfunction bytesToWords(input) {\n if (input.length === 0) {\n return [];\n }\n\n var length8 = input.length * 8;\n var output = new Uint32Array(getOutputLength(length8));\n\n for (var i = 0; i < length8; i += 8) {\n output[i >> 5] |= (input[i / 8] & 0xff) << i % 32;\n }\n\n return output;\n}\n/*\n * Add integers, wrapping at 2^32. This uses 16-bit operations internally\n * to work around bugs in some JS interpreters.\n */\n\n\nfunction safeAdd(x, y) {\n var lsw = (x & 0xffff) + (y & 0xffff);\n var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n return msw << 16 | lsw & 0xffff;\n}\n/*\n * Bitwise rotate a 32-bit number to the left.\n */\n\n\nfunction bitRotateLeft(num, cnt) {\n return num << cnt | num >>> 32 - cnt;\n}\n/*\n * These functions implement the four basic operations the algorithm uses.\n */\n\n\nfunction md5cmn(q, a, b, x, s, t) {\n return safeAdd(bitRotateLeft(safeAdd(safeAdd(a, q), safeAdd(x, t)), s), b);\n}\n\nfunction md5ff(a, b, c, d, x, s, t) {\n return md5cmn(b & c | ~b & d, a, b, x, s, t);\n}\n\nfunction md5gg(a, b, c, d, x, s, t) {\n return md5cmn(b & d | c & ~d, a, b, x, s, t);\n}\n\nfunction md5hh(a, b, c, d, x, s, t) {\n return md5cmn(b ^ c ^ d, a, b, x, s, t);\n}\n\nfunction md5ii(a, b, c, d, x, s, t) {\n return md5cmn(c ^ (b | ~d), a, b, x, s, t);\n}\n\nexport default md5;","export default '00000000-0000-0000-0000-000000000000';","import validate from './validate.js';\n\nfunction parse(uuid) {\n if (!validate(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n var v;\n var arr = new Uint8Array(16); // Parse ########-....-....-....-............\n\n arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24;\n arr[1] = v >>> 16 & 0xff;\n arr[2] = v >>> 8 & 0xff;\n arr[3] = v & 0xff; // Parse ........-####-....-....-............\n\n arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8;\n arr[5] = v & 0xff; // Parse ........-....-####-....-............\n\n arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8;\n arr[7] = v & 0xff; // Parse ........-....-....-####-............\n\n arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8;\n arr[9] = v & 0xff; // Parse ........-....-....-....-############\n // (Use \"/\" to avoid 32-bit truncation when bit-shifting high-order bytes)\n\n arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff;\n arr[11] = v / 0x100000000 & 0xff;\n arr[12] = v >>> 24 & 0xff;\n arr[13] = v >>> 16 & 0xff;\n arr[14] = v >>> 8 & 0xff;\n arr[15] = v & 0xff;\n return arr;\n}\n\nexport default parse;","export default /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;","// Unique ID creation requires a high quality random # generator. In the browser we therefore\n// require the crypto API and do not support built-in fallback to lower quality random number\n// generators (like Math.random()).\nvar getRandomValues;\nvar rnds8 = new Uint8Array(16);\nexport default function rng() {\n // lazy load so that environments that need to polyfill have a chance to do so\n if (!getRandomValues) {\n // getRandomValues needs to be invoked in a context where \"this\" is a Crypto implementation. Also,\n // find the complete implementation of crypto (msCrypto) on IE11.\n getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto !== 'undefined' && typeof msCrypto.getRandomValues === 'function' && msCrypto.getRandomValues.bind(msCrypto);\n\n if (!getRandomValues) {\n throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');\n }\n }\n\n return getRandomValues(rnds8);\n}","// Adapted from Chris Veness' SHA1 code at\n// http://www.movable-type.co.uk/scripts/sha1.html\nfunction f(s, x, y, z) {\n switch (s) {\n case 0:\n return x & y ^ ~x & z;\n\n case 1:\n return x ^ y ^ z;\n\n case 2:\n return x & y ^ x & z ^ y & z;\n\n case 3:\n return x ^ y ^ z;\n }\n}\n\nfunction ROTL(x, n) {\n return x << n | x >>> 32 - n;\n}\n\nfunction sha1(bytes) {\n var K = [0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xca62c1d6];\n var H = [0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0];\n\n if (typeof bytes === 'string') {\n var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape\n\n bytes = [];\n\n for (var i = 0; i < msg.length; ++i) {\n bytes.push(msg.charCodeAt(i));\n }\n } else if (!Array.isArray(bytes)) {\n // Convert Array-like to Array\n bytes = Array.prototype.slice.call(bytes);\n }\n\n bytes.push(0x80);\n var l = bytes.length / 4 + 2;\n var N = Math.ceil(l / 16);\n var M = new Array(N);\n\n for (var _i = 0; _i < N; ++_i) {\n var arr = new Uint32Array(16);\n\n for (var j = 0; j < 16; ++j) {\n arr[j] = bytes[_i * 64 + j * 4] << 24 | bytes[_i * 64 + j * 4 + 1] << 16 | bytes[_i * 64 + j * 4 + 2] << 8 | bytes[_i * 64 + j * 4 + 3];\n }\n\n M[_i] = arr;\n }\n\n M[N - 1][14] = (bytes.length - 1) * 8 / Math.pow(2, 32);\n M[N - 1][14] = Math.floor(M[N - 1][14]);\n M[N - 1][15] = (bytes.length - 1) * 8 & 0xffffffff;\n\n for (var _i2 = 0; _i2 < N; ++_i2) {\n var W = new Uint32Array(80);\n\n for (var t = 0; t < 16; ++t) {\n W[t] = M[_i2][t];\n }\n\n for (var _t = 16; _t < 80; ++_t) {\n W[_t] = ROTL(W[_t - 3] ^ W[_t - 8] ^ W[_t - 14] ^ W[_t - 16], 1);\n }\n\n var a = H[0];\n var b = H[1];\n var c = H[2];\n var d = H[3];\n var e = H[4];\n\n for (var _t2 = 0; _t2 < 80; ++_t2) {\n var s = Math.floor(_t2 / 20);\n var T = ROTL(a, 5) + f(s, b, c, d) + e + K[s] + W[_t2] >>> 0;\n e = d;\n d = c;\n c = ROTL(b, 30) >>> 0;\n b = a;\n a = T;\n }\n\n H[0] = H[0] + a >>> 0;\n H[1] = H[1] + b >>> 0;\n H[2] = H[2] + c >>> 0;\n H[3] = H[3] + d >>> 0;\n H[4] = H[4] + e >>> 0;\n }\n\n return [H[0] >> 24 & 0xff, H[0] >> 16 & 0xff, H[0] >> 8 & 0xff, H[0] & 0xff, H[1] >> 24 & 0xff, H[1] >> 16 & 0xff, H[1] >> 8 & 0xff, H[1] & 0xff, H[2] >> 24 & 0xff, H[2] >> 16 & 0xff, H[2] >> 8 & 0xff, H[2] & 0xff, H[3] >> 24 & 0xff, H[3] >> 16 & 0xff, H[3] >> 8 & 0xff, H[3] & 0xff, H[4] >> 24 & 0xff, H[4] >> 16 & 0xff, H[4] >> 8 & 0xff, H[4] & 0xff];\n}\n\nexport default sha1;","import validate from './validate.js';\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\n\nvar byteToHex = [];\n\nfor (var i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).substr(1));\n}\n\nfunction stringify(arr) {\n var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n var uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!validate(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n\n return uuid;\n}\n\nexport default stringify;","import rng from './rng.js';\nimport stringify from './stringify.js'; // **`v1()` - Generate time-based UUID**\n//\n// Inspired by https://github.com/LiosK/UUID.js\n// and http://docs.python.org/library/uuid.html\n\nvar _nodeId;\n\nvar _clockseq; // Previous uuid creation time\n\n\nvar _lastMSecs = 0;\nvar _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details\n\nfunction v1(options, buf, offset) {\n var i = buf && offset || 0;\n var b = buf || new Array(16);\n options = options || {};\n var node = options.node || _nodeId;\n var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not\n // specified. We do this lazily to minimize issues related to insufficient\n // system entropy. See #189\n\n if (node == null || clockseq == null) {\n var seedBytes = options.random || (options.rng || rng)();\n\n if (node == null) {\n // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)\n node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]];\n }\n\n if (clockseq == null) {\n // Per 4.2.2, randomize (14 bit) clockseq\n clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;\n }\n } // UUID timestamps are 100 nano-second units since the Gregorian epoch,\n // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so\n // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'\n // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.\n\n\n var msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock\n // cycle to simulate higher resolution clock\n\n var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs)\n\n var dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression\n\n if (dt < 0 && options.clockseq === undefined) {\n clockseq = clockseq + 1 & 0x3fff;\n } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new\n // time interval\n\n\n if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {\n nsecs = 0;\n } // Per 4.2.1.2 Throw error if too many uuids are requested\n\n\n if (nsecs >= 10000) {\n throw new Error(\"uuid.v1(): Can't create more than 10M uuids/sec\");\n }\n\n _lastMSecs = msecs;\n _lastNSecs = nsecs;\n _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch\n\n msecs += 12219292800000; // `time_low`\n\n var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;\n b[i++] = tl >>> 24 & 0xff;\n b[i++] = tl >>> 16 & 0xff;\n b[i++] = tl >>> 8 & 0xff;\n b[i++] = tl & 0xff; // `time_mid`\n\n var tmh = msecs / 0x100000000 * 10000 & 0xfffffff;\n b[i++] = tmh >>> 8 & 0xff;\n b[i++] = tmh & 0xff; // `time_high_and_version`\n\n b[i++] = tmh >>> 24 & 0xf | 0x10; // include version\n\n b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)\n\n b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low`\n\n b[i++] = clockseq & 0xff; // `node`\n\n for (var n = 0; n < 6; ++n) {\n b[i + n] = node[n];\n }\n\n return buf || stringify(b);\n}\n\nexport default v1;","import v35 from './v35.js';\nimport md5 from './md5.js';\nvar v3 = v35('v3', 0x30, md5);\nexport default v3;","import stringify from './stringify.js';\nimport parse from './parse.js';\n\nfunction stringToBytes(str) {\n str = unescape(encodeURIComponent(str)); // UTF8 escape\n\n var bytes = [];\n\n for (var i = 0; i < str.length; ++i) {\n bytes.push(str.charCodeAt(i));\n }\n\n return bytes;\n}\n\nexport var DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8';\nexport var URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8';\nexport default function (name, version, hashfunc) {\n function generateUUID(value, namespace, buf, offset) {\n if (typeof value === 'string') {\n value = stringToBytes(value);\n }\n\n if (typeof namespace === 'string') {\n namespace = parse(namespace);\n }\n\n if (namespace.length !== 16) {\n throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)');\n } // Compute hash of namespace and value, Per 4.3\n // Future: Use spread syntax when supported on all platforms, e.g. `bytes =\n // hashfunc([...namespace, ... value])`\n\n\n var bytes = new Uint8Array(16 + value.length);\n bytes.set(namespace);\n bytes.set(value, namespace.length);\n bytes = hashfunc(bytes);\n bytes[6] = bytes[6] & 0x0f | version;\n bytes[8] = bytes[8] & 0x3f | 0x80;\n\n if (buf) {\n offset = offset || 0;\n\n for (var i = 0; i < 16; ++i) {\n buf[offset + i] = bytes[i];\n }\n\n return buf;\n }\n\n return stringify(bytes);\n } // Function#name is not settable on some platforms (#270)\n\n\n try {\n generateUUID.name = name; // eslint-disable-next-line no-empty\n } catch (err) {} // For CommonJS default export support\n\n\n generateUUID.DNS = DNS;\n generateUUID.URL = URL;\n return generateUUID;\n}","import rng from './rng.js';\nimport stringify from './stringify.js';\n\nfunction v4(options, buf, offset) {\n options = options || {};\n var rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n offset = offset || 0;\n\n for (var i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n\n return buf;\n }\n\n return stringify(rnds);\n}\n\nexport default v4;","import v35 from './v35.js';\nimport sha1 from './sha1.js';\nvar v5 = v35('v5', 0x50, sha1);\nexport default v5;","import REGEX from './regex.js';\n\nfunction validate(uuid) {\n return typeof uuid === 'string' && REGEX.test(uuid);\n}\n\nexport default validate;","import validate from './validate.js';\n\nfunction version(uuid) {\n if (!validate(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n return parseInt(uuid.substr(14, 1), 16);\n}\n\nexport default version;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = (module) => {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","import type { Context } from \"@finos/fdc3\";\nimport { init } from \"../platform/api\";\n\nwindow.addEventListener(\"DOMContentLoaded\", async () => {\n\tawait init(false);\n\tawait initializeDOM();\n});\n\n/**\n * Adds an FDC3 context listener to the window.\n */\nasync function addFDC3Listener(): Promise {\n\tif (window.fdc3) {\n\t\tawait window.fdc3.addContextListener(null, (context) => {\n\t\t\tupdateDOMElements(context);\n\t\t});\n\t} else {\n\t\twindow.addEventListener(\"fdc3Ready\", async () => {\n\t\t\tawait window.fdc3.addContextListener(null, (context) => {\n\t\t\t\tupdateDOMElements(context);\n\t\t\t});\n\t\t});\n\t}\n}\n\n/**\n * Updates the DOM elements with the provided context.\n * @param context The context to update the DOM elements with.\n */\nfunction updateDOMElements(context: Context): void {\n\tconst contextTypeSpan = document.querySelector(\"#contextType\");\n\tconst contextNameSpan = document.querySelector(\"#contextName\");\n\tconst contextBodyPre = document.querySelector(\"#contextBody\");\n\n\tif (contextTypeSpan !== null && contextNameSpan !== null && contextBodyPre !== null) {\n\t\tcontextTypeSpan.textContent = context.type;\n\t\tcontextNameSpan.textContent = context.name ?? \"No name provided.\";\n\t\tcontextBodyPre.textContent = JSON.stringify(context, null, 2);\n\t}\n}\n\n/**\n * Initialize the DOM elements.\n */\nasync function initializeDOM(): Promise {\n\tawait addFDC3Listener();\n}\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/web/v19.2.0/web-interop/js/fdc3-view.bundle.js b/web/v19.2.0/web-interop/js/fdc3-view.bundle.js index 2b461d7..b618e9f 100644 --- a/web/v19.2.0/web-interop/js/fdc3-view.bundle.js +++ b/web/v19.2.0/web-interop/js/fdc3-view.bundle.js @@ -1,38 +1,38 @@ /******/ (() => { // webpackBootstrap /******/ var __webpack_modules__ = ({ -/***/ "./node_modules/@openfin/core-web/out/api-client.js": -/*!**********************************************************!*\ - !*** ./node_modules/@openfin/core-web/out/api-client.js ***! - \**********************************************************/ +/***/ "../../node_modules/@openfin/core-web/out/api-client.js": +/*!**************************************************************!*\ + !*** ../../node_modules/@openfin/core-web/out/api-client.js ***! + \**************************************************************/ /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; -var e=__webpack_require__(/*! ./main-8cad4070.js */ "./node_modules/@openfin/core-web/out/main-8cad4070.js");__webpack_require__(/*! buffer/ */ "../../node_modules/buffer/index.js"),__webpack_require__(/*! uuid */ "../../node_modules/uuid/dist/esm-browser/index.js"),__webpack_require__(/*! events */ "../../node_modules/events/events.js"),__webpack_require__(/*! lodash/cloneDeep */ "../../node_modules/lodash/cloneDeep.js"),__webpack_require__(/*! lodash/isEqual */ "../../node_modules/lodash/isEqual.js"),exports.connect=e.connect; +var e=__webpack_require__(/*! ./main-8cad4070.js */ "../../node_modules/@openfin/core-web/out/main-8cad4070.js");__webpack_require__(/*! buffer/ */ "../../node_modules/buffer/index.js"),__webpack_require__(/*! uuid */ "../../node_modules/uuid/dist/esm-browser/index.js"),__webpack_require__(/*! events */ "../../node_modules/events/events.js"),__webpack_require__(/*! lodash/cloneDeep */ "../../node_modules/lodash/cloneDeep.js"),__webpack_require__(/*! lodash/isEqual */ "../../node_modules/lodash/isEqual.js"),exports.connect=e.connect; /***/ }), -/***/ "./node_modules/@openfin/core-web/out/main-8cad4070.js": -/*!*************************************************************!*\ - !*** ./node_modules/@openfin/core-web/out/main-8cad4070.js ***! - \*************************************************************/ +/***/ "../../node_modules/@openfin/core-web/out/main-8cad4070.js": +/*!*****************************************************************!*\ + !*** ../../node_modules/@openfin/core-web/out/main-8cad4070.js ***! + \*****************************************************************/ /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; -var e=__webpack_require__(/*! buffer/ */ "../../node_modules/buffer/index.js"),t=__webpack_require__(/*! events */ "../../node_modules/events/events.js"),n=__webpack_require__(/*! lodash/cloneDeep */ "../../node_modules/lodash/cloneDeep.js"),i=__webpack_require__(/*! lodash/isEqual */ "../../node_modules/lodash/isEqual.js"),r=__webpack_require__(/*! uuid */ "../../node_modules/uuid/dist/esm-browser/index.js");const o=(e,t)=>`${t}<${btoa(JSON.stringify(e))}>`;var s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof __webpack_require__.g?__webpack_require__.g:"undefined"!=typeof self?self:{},a={},c={},d={},h={};async function l(e){const t=[];for(const n of e){const e=await n();t.push(e)}return t}Object.defineProperty(h,"__esModule",{value:!0}),h.promiseMapSerial=h.serial=h.promiseMap=h.promisify=void 0,h.promisify=function(e){return(...t)=>new Promise(((n,i)=>{e(...t,((e,t)=>e?i(e):n(t)))}))},h.promiseMap=async function(e,t){return Promise.all(e.map(t))},h.serial=l,h.promiseMapSerial=async function(e,t){return l(e.map(((e,n,i)=>()=>t(e,n,i))))};var u,p=s&&s.__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},w=s&&s.__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)};Object.defineProperty(d,"__esModule",{value:!0}),d.Reply=d.EmitterBase=d.Base=void 0;const y=h;class f{constructor(e){this.isNodeEnvironment=()=>"node"===this.wire.environment.type,this.isOpenFinEnvironment=()=>"openfin"===this.wire.environment.type,this.isBrowserEnvironment=()=>"other"===this.wire.environment.type,this.wire=e}get fin(){return this.wire.getFin()}get me(){return this.wire.me}}d.Base=f;d.EmitterBase=class extends f{constructor(e,t,...n){super(e),this.topic=t,u.set(this,void 0),this.eventNames=()=>this.hasEmitter()?this.getOrCreateEmitter().eventNames():[],this.emit=(e,t,...n)=>!!this.hasEmitter()&&this.getOrCreateEmitter().emit(e,t,...n),this.hasEmitter=()=>this.wire.eventAggregator.has(w(this,u,"f")),this.getOrCreateEmitter=()=>this.wire.eventAggregator.getOrCreate(w(this,u,"f")),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[],this.listenerCount=e=>this.hasEmitter()?this.getOrCreateEmitter().listenerCount(e):0,this.registerEventListener=async(e,t={},n,i)=>{const r={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e},o=this.getOrCreateEmitter();n(o);try{await this.wire.sendAction("subscribe-to-desktop-event",r)}catch(e){throw i(o),this.deleteEmitterIfNothingRegistered(o),e}},this.deregisterEventListener=async(e,t={})=>{if(this.hasEmitter()){const n={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e};await this.wire.sendAction("unsubscribe-to-desktop-event",n).catch((()=>null));return this.getOrCreateEmitter()}return Promise.resolve()},p(this,u,[t,...n],"f"),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[]}async on(e,t,n){return await this.registerEventListener(e,n,(n=>{n.on(e,t)}),(n=>{n.removeListener(e,t)})),this}async addListener(e,t,n){return this.on(e,t,n)}async once(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.once(e,i),n.once(e,t)}),(n=>{n.removeListener(e,i),n.removeListener(e,t)})),this}async prependListener(e,t,n){return await this.registerEventListener(e,n,(n=>{n.prependListener(e,t)}),(n=>{n.removeListener(e,t)})),this}async prependOnceListener(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.prependOnceListener(e,t),n.once(e,i)}),(n=>{n.removeListener(e,t),n.removeListener(e,i)})),this}async removeListener(e,t,n){const i=await this.deregisterEventListener(e,n);return i&&(i.removeListener(e,t),this.deleteEmitterIfNothingRegistered(i)),this}async deregisterAllListeners(e){const t={...this.identity,type:e,topic:this.topic};if(this.hasEmitter()){const e=this.getOrCreateEmitter(),n=e.listenerCount(t.type),i=[];for(let e=0;enull)));return await Promise.all(i),e}}async removeAllListeners(e){const t=async e=>{const t=await this.deregisterAllListeners(e);t&&(t.removeAllListeners(e),this.deleteEmitterIfNothingRegistered(t))};if(e)await t(e);else if(this.hasEmitter()){const e=this.getOrCreateEmitter().eventNames();await(0,y.promiseMap)(e,t)}return this}deleteEmitterIfNothingRegistered(e){0===e.eventNames().length&&this.wire.eventAggregator.delete(w(this,u,"f"))}},u=new WeakMap;d.Reply=class{};var g={};Object.defineProperty(g,"__esModule",{value:!0});var m=g.RuntimeError=g.NotSupportedError=g.NotImplementedError=g.NoAckError=g.DuplicateCorrelationError=g.UnexpectedActionError=g.DisconnectedError=void 0;class v extends Error{constructor(e){super(`Expected websocket state OPEN but found ${e}`),this.readyState=e}}g.DisconnectedError=v;class C extends Error{}g.UnexpectedActionError=C;class b extends Error{}g.DuplicateCorrelationError=b;class I extends Error{}g.NoAckError=I;class E extends Error{}g.NotImplementedError=E;class x extends Error{}g.NotSupportedError=x;class A extends Error{constructor(e){const{message:t,name:n,stack:i,...r}=e;super(t),this.name=n||"Error",this.stack=i??this.toString(),Object.keys(r).forEach((e=>{this[e]=r[e]}))}}class P extends Error{static getCallSite(e=0){const t=Error.stackTraceLimit,n=e+1;Error.stackTraceLimit=t+n;const i=Error.prepareStackTrace;Error.prepareStackTrace=(e,t)=>t;const r=(new Error).stack?.slice(n)??[];return Error.prepareStackTrace=i,Error.stackTraceLimit=t,r}static prepareStackTrace(e,t){if("function"==typeof Error.prepareStackTrace)return Error.prepareStackTrace(e,t);let n="";n+=e.name||"Error",n+=`: ${e.message||""}`;for(const e of t)n+=`\n at ${e.toString()}`;return n}constructor(e,t){const{reason:n,error:i}=e;super(n),this.name="RuntimeError",i?.stack&&(this.cause=new A(i)),t&&(this.stack=P.prepareStackTrace(this,t))}}m=g.RuntimeError=P;var M={},_={},O={};Object.defineProperty(O,"__esModule",{value:!0}),O.validateIdentity=void 0,O.validateIdentity=function(e){let t;return"object"==typeof e&&"string"==typeof e.uuid||(t="Not a valid identity object"),t};var S={},R={},F={},j={},k={},L={},T={};Object.defineProperty(T,"__esModule",{value:!0}),T.handleDeprecatedWarnings=void 0;var $;T.handleDeprecatedWarnings=e=>{(e.contentNavigation?.whitelist||e.contentNavigation?.blacklist||e.contentRedirect?.whitelist||e.contentRedirect?.blacklist)&&console.warn("The properties 'whitelist' and 'blacklist' have been marked as deprecated and will be removed in a future version. Please use 'allowlist' and 'denylist'.")};var B={},G={};Object.defineProperty(G,"__esModule",{value:!0}),G.AsyncRetryableLazy=W=G.Lazy=void 0;var W=G.Lazy=class{constructor(e){this.producerFn=e}getValue(){return this.value||(this.value=this.producerFn()),this.value}};G.AsyncRetryableLazy=class{constructor(e){this.producerFn=e}async getValue(){return this.promise||(this.promise=this.producerFn().catch((e=>{throw delete this.promise,e}))),this.promise}};var H={};Object.defineProperty(H,"__esModule",{value:!0}),H.WebContents=void 0;const N=d;class D extends N.EmitterBase{constructor(e,t,n){super(e,n,t.uuid,t.name),this.identity=t,this.entityType=n}capturePage(e){return this.wire.sendAction("capture-page",{options:e,...this.identity}).then((({payload:e})=>e.data))}executeJavaScript(e){return this.wire.sendAction("execute-javascript-in-window",{...this.identity,code:e}).then((({payload:e})=>e.data))}getZoomLevel(){return this.wire.sendAction("get-zoom-level",this.identity).then((({payload:e})=>e.data))}setZoomLevel(e){return this.wire.sendAction("set-zoom-level",{...this.identity,level:e}).then((()=>{}))}navigate(e){return this.wire.sendAction("navigate-window",{...this.identity,url:e}).then((()=>{}))}navigateBack(){return this.wire.sendAction("navigate-window-back",{...this.identity}).then((()=>{}))}async navigateForward(){await this.wire.sendAction("navigate-window-forward",{...this.identity})}stopNavigation(){return this.wire.sendAction("stop-window-navigation",{...this.identity}).then((()=>{}))}reload(e=!1){return this.wire.sendAction("reload-window",{ignoreCache:e,...this.identity}).then((()=>{}))}print(e={}){return this.wire.sendAction("print",{...this.identity,options:e}).then((()=>{}))}findInPage(e,t){return this.wire.sendAction("find-in-page",{...this.identity,searchTerm:e,options:t}).then((({payload:e})=>e.data))}stopFindInPage(e){return this.wire.sendAction("stop-find-in-page",{...this.identity,action:e}).then((()=>{}))}getPrinters(){return this.wire.sendAction("get-printers",{...this.identity}).then((({payload:e})=>e.data))}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){await this.wire.sendAction("focus-window",{emitSynthFocused:e,...this.identity})}async showDeveloperTools(){await this.wire.sendAction("show-developer-tools",this.identity)}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction("get-process-info",this.identity);return e}async getSharedWorkers(){return this.wire.sendAction("get-shared-workers",this.identity).then((({payload:e})=>e.data))}async inspectSharedWorker(){await this.wire.sendAction("inspect-shared-worker",{...this.identity})}async inspectSharedWorkerById(e){await this.wire.sendAction("inspect-shared-worker-by-id",{...this.identity,workerId:e})}async inspectServiceWorker(){await this.wire.sendAction("inspect-service-worker",{...this.identity})}async showPopupWindow(e){if(this.wire.sendAction(`${this.entityType}-show-popup-window`,this.identity).catch((()=>{})),e?.onPopupReady){const t=async({popupName:t})=>{try{const n=this.fin.Window.wrapSync({uuid:this.fin.me.uuid,name:t});await e.onPopupReady(n)}catch(e){throw new Error(`Something went wrong during onPopupReady execution: ${e}`)}};await this.once("popup-ready",t)}const{payload:t}=await this.wire.sendAction("try-create-popup-window",{options:{...e,hasResultCallback:!!e?.onPopupResult,hasReadyCallback:!!e?.onPopupReady},...this.identity}),{data:{willOpen:n,options:i}}=t;n&&await this.fin.Window.create(i.initialOptions);if(e?.onPopupResult){const t=async t=>{await e.onPopupResult((e=>{const{name:t,uuid:n,result:i,data:r}=e,o={identity:{name:t,uuid:n},result:i};return r&&(o.data=r),o})(t))},n=async()=>{await this.removeListener("popup-result",t)};await this.on("popup-result",t),await this.once("popup-teardown",n)}const{payload:r}=await this.wire.sendAction("show-popup-window",{options:i,...this.identity});return r.data}}var U,V,z,K,q;function J(){return V||(V=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(function(){if($)return L;$=1,Object.defineProperty(L,"__esModule",{value:!0}),L.ViewModule=void 0;const e=d,t=O,n=J(),i=T;class r extends e.Base{async create(e){const{uuid:t}=this.wire.me;if(!e.name||"string"!=typeof e.name)throw new Error("Please provide a name property as a string in order to create a View.");return(0,i.handleDeprecatedWarnings)(e),this.wire.environment.childViews?await this.wire.environment.createChildContent({entityType:"view",options:{...e,uuid:t}}):await this.wire.sendAction("create-view",{...e,uuid:t}),this.wrapSync({uuid:t,name:e.name})}async wrap(e){this.wire.sendAction("view-wrap").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}wrapSync(e){this.wire.sendAction("view-wrap-sync").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}getCurrent(){if(this.wire.sendAction("view-get-current").catch((e=>{})),!this.wire.me.isView)throw new Error("You are not in a View context");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction("view-get-current-sync").catch((e=>{})),!this.wire.me.isView)throw new Error("You are not in a View context");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return L.ViewModule=r,L}(),e),n(function(){if(U)return B;var e;U=1,Object.defineProperty(B,"__esModule",{value:!0}),B.View=void 0;const t=g,n=G,i=H,r=ie();class o extends i.WebContents{constructor(i,o){super(i,o,"view"),this.identity=o,e.set(this,new n.Lazy((()=>this.fin.Platform.wrapSync(this.identity).getClient()))),this.attach=async e=>{await this.wire.sendAction("attach-view",{target:e,...this.identity})},this.destroy=async()=>{await this.wire.sendAction("destroy-view",{...this.identity})},this.show=async()=>{await this.wire.sendAction("show-view",{...this.identity})},this.showAt=async(e,t={})=>{await this.wire.sendAction("show-view-at",{bounds:e,...this.identity,options:t})},this.bringToFront=async()=>{await this.wire.sendAction("bring-view-to-front",{...this.identity})},this.hide=async()=>{await this.wire.sendAction("hide-view",{...this.identity})},this.setBounds=async e=>{await this.wire.sendAction("set-view-bounds",{bounds:e,...this.identity})},this.getBounds=async()=>(await this.wire.sendAction("get-view-bounds",{...this.identity})).payload.data,this.getInfo=async()=>(await this.wire.sendAction("get-view-info",{...this.identity})).payload.data,this.getParentLayout=async()=>(this.wire.sendAction("view-get-parent-layout",{...this.identity}).catch((()=>{})),this.fin.Platform.Layout.getLayoutByViewIdentity(this.identity)),this.getOptions=async()=>this.wire.sendAction("get-view-options",{...this.identity}).then((({payload:e})=>e.data)),this.updateOptions=async e=>this.wire.sendAction("update-view-options",{options:e,...this.identity}).then((()=>{})),this.getCurrentWindow=async()=>{const{payload:{data:e}}=await this.wire.sendAction("get-view-window",{...this.identity});return new r._Window(this.wire,e)},this.getCurrentStack=async()=>{this.wire.sendAction("view-get-current-stack").catch((()=>{}));try{return(await this.getParentLayout()).getStackByViewIdentity(this.identity)}catch(e){throw new t.RuntimeError({reason:"This view does not belong to a stack.",error:e})}},this.triggerBeforeUnload=async()=>(await this.wire.sendAction("trigger-before-unload",{...this.identity})).payload.data,this.bindToElement=async e=>{if(!e)throw new Error("Element not found.");return this.wire.environment.observeBounds(e,(async e=>this.setBounds(e)))}}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){const t=await this.getCurrentWindow();await t.focusedWebViewWasChanged(),await super.focus({emitSynthFocused:e})}}return B.View=o,e=new WeakMap,B}(),e)}(k)),k}function Y(){if(z)return j;z=1,Object.defineProperty(j,"__esModule",{value:!0}),j.Application=void 0;const e=d,t=ie(),n=J();class i extends e.EmitterBase{constructor(e,n){super(e,"application",n.uuid),this.identity=n,this.window=new t._Window(this.wire,{uuid:this.identity.uuid,name:this.identity.uuid})}windowListFromIdentityList(e){const n=[];return e.forEach((e=>{n.push(new t._Window(this.wire,{uuid:e.uuid,name:e.name}))})),n}isRunning(){return this.wire.sendAction("is-application-running",this.identity).then((({payload:e})=>e.data))}async quit(e=!1){try{await this._close(e),await this.wire.sendAction("destroy-application",{force:e,...this.identity})}catch(e){if(!["Remote connection has closed","Could not locate the requested application"].some((t=>e.message.includes(t))))throw e}}async _close(e=!1){try{await this.wire.sendAction("close-application",{force:e,...this.identity})}catch(e){if(!e.message.includes("Remote connection has closed"))throw e}}close(e=!1){return console.warn("Deprecation Warning: Application.close is deprecated Please use Application.quit"),this.wire.sendAction("application-close",this.identity).catch((e=>{})),this._close(e)}getChildWindows(){return this.wire.sendAction("get-child-windows",this.identity).then((({payload:e})=>{const t=[];return e.data.forEach((e=>{t.push({uuid:this.identity.uuid,name:e})})),this.windowListFromIdentityList(t)}))}getManifest(){return this.wire.sendAction("get-application-manifest",this.identity).then((({payload:e})=>e.data))}getParentUuid(){return this.wire.sendAction("get-parent-application",this.identity).then((({payload:e})=>e.data))}getShortcuts(){return this.wire.sendAction("get-shortcuts",this.identity).then((({payload:e})=>e.data))}async getViews(){const{payload:e}=await this.wire.sendAction("application-get-views",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}getZoomLevel(){return this.wire.sendAction("get-application-zoom-level",this.identity).then((({payload:e})=>e.data))}getWindow(){return this.wire.sendAction("application-get-window",this.identity).catch((e=>{})),Promise.resolve(this.window)}registerUser(e,t){return this.wire.sendAction("register-user",{userName:e,appName:t,...this.identity}).then((()=>{}))}removeTrayIcon(){return this.wire.sendAction("remove-tray-icon",this.identity).then((()=>{}))}restart(){return this.wire.sendAction("restart-application",this.identity).then((()=>{}))}run(){return console.warn("Deprecation Warning: Application.run is deprecated Please use fin.Application.start"),this.wire.sendAction("application-run",this.identity).catch((e=>{})),this._run()}_run(e={}){return this.wire.sendAction("run-application",{manifestUrl:this._manifestUrl,opts:e,...this.identity}).then((()=>{}))}scheduleRestart(){return this.wire.sendAction("relaunch-on-close",this.identity).then((()=>{}))}async sendApplicationLog(){const{payload:e}=await this.wire.sendAction("send-application-log",this.identity);return e.data}async setJumpList(e){await this.wire.sendAction("set-jump-list",{config:e,...this.identity})}setTrayIcon(e){return this.wire.sendAction("set-tray-icon",{enabledIcon:e,...this.identity}).then((()=>{}))}setShortcuts(e){return this.wire.sendAction("set-shortcuts",{data:e,...this.identity}).then((()=>{}))}async setShortcutQueryParams(e){await this.wire.sendAction("set-shortcut-query-args",{data:e,...this.identity})}setZoomLevel(e){return this.wire.sendAction("set-application-zoom-level",{level:e,...this.identity}).then((()=>{}))}async setAppLogUsername(e){await this.wire.sendAction("set-app-log-username",{data:e,...this.identity})}getTrayIconInfo(){return this.wire.sendAction("get-tray-icon-info",this.identity).then((({payload:e})=>e.data))}hasTrayIcon(){return this.wire.sendAction("has-tray-icon",this.identity).then((({payload:e})=>e.data))}terminate(){return this.wire.sendAction("terminate-application",this.identity).then((()=>{}))}wait(){return this.wire.sendAction("wait-for-hung-application",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction("get-info",this.identity).then((({payload:e})=>e.data))}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction("application-get-process-info",this.identity);return e}async setFileDownloadLocation(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t};await this.wire.sendAction("set-file-download-location",{...n,downloadLocation:e})}async getFileDownloadLocation(){const{payload:{data:e}}=await this.wire.sendAction("get-file-download-location",this.identity);return e}async showTrayIconPopupMenu(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t},{payload:i}=await this.wire.sendAction("show-tray-icon-popup-menu",{...n,options:e});return i.data}async closeTrayIconPopupMenu(){const{name:e}=this.wire.me,t={uuid:this.identity.uuid,name:e};await this.wire.sendAction("close-tray-icon-popup-menu",{...t})}}return j.Application=i,j}function Z(){return q||(q=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(function(){if(K)return F;K=1,Object.defineProperty(F,"__esModule",{value:!0}),F.ApplicationModule=void 0;const e=d,t=O,n=Y();class i extends e.Base{async wrap(e){this.wire.sendAction("wrap-application").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}wrapSync(e){this.wire.sendAction("wrap-application-sync").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}async _create(e){return void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&void 0===e.isPlatformController&&(e.autoShow=!0),await this.wire.sendAction("create-application",e),this.wrap({uuid:e.uuid})}create(e){return console.warn("Deprecation Warning: fin.Application.create is deprecated. Please use fin.Application.start"),this.wire.sendAction("application-create").catch((e=>{})),this._create(e)}async start(e){this.wire.sendAction("start-application").catch((e=>{}));const t=await this._create(e);return await this.wire.sendAction("run-application",{uuid:e.uuid}),t}async startManyManifests(e,t){return this.wire.sendAction("run-applications",{applications:e,opts:t}).then((()=>{}))}getCurrent(){return this.wire.sendAction("get-current-application").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction("get-current-application-sync").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}async startFromManifest(e,t){this.wire.sendAction("application-start-from-manifest").catch((e=>{}));const n=await this._createFromManifest(e);return await n._run(t),n}createFromManifest(e){return console.warn("Deprecation Warning: fin.Application.createFromManifest is deprecated. Please use fin.Application.startFromManifest"),this.wire.sendAction("application-create-from-manifest").catch((e=>{})),this._createFromManifest(e)}_createFromManifest(e){return this.wire.sendAction("get-application-manifest",{manifestUrl:e}).then((({payload:e})=>{const t=e.data.platform?e.data.platform.uuid:e.data.startup_app.uuid;return this.wrap({uuid:t})})).then((t=>(t._manifestUrl=e,t)))}}return F.ApplicationModule=i,F}(),e),n(Y(),e)}(R)),R}H.WebContents=D;var Q={};Object.defineProperty(Q,"__esModule",{value:!0}),Q.promisifySubscription=void 0;var X,ee,te;function ne(){if(X)return S;X=1,Object.defineProperty(S,"__esModule",{value:!0}),S._Window=void 0;const e=Z(),t=H,n=J(),i=T,r=Q;class o extends t.WebContents{constructor(e,t){super(e,t,"window")}async createWindow(e){this.wire.sendAction("window-create-window",this.identity).catch((e=>{}));const t=await(0,r.promisifySubscription)(this,"fire-constructor-callback");void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&(e.autoShow=!0),(0,i.handleDeprecatedWarnings)(e);const n=this.wire.environment.createChildContent({entityType:"window",options:e}),[o]=await Promise.all([t.getValue(),n]);let s;const{success:a}=o,c=o.data,{message:d}=c;s=a?{httpResponseCode:c.httpResponseCode,apiInjected:c.apiInjected}:{message:c.message,networkErrorCode:c.networkErrorCode,stack:c.stack};const h={message:d,cbPayload:s,success:a};try{this.getWebWindow().fin.__internal_.openerSuccessCBCalled()}catch(e){}return h.success?this:Promise.reject(h)}getAllFrames(){return this.wire.sendAction("get-all-frames",this.identity).then((({payload:e})=>e.data))}getBounds(){return this.wire.sendAction("get-window-bounds",this.identity).then((({payload:e})=>e.data))}center(){return this.wire.sendAction("center-window",this.identity).then((()=>{}))}blur(){return this.wire.sendAction("blur-window",this.identity).then((()=>{}))}bringToFront(){return this.wire.sendAction("bring-window-to-front",this.identity).then((()=>{}))}animate(e,t){return this.wire.sendAction("animate-window",{transitions:e,options:t,...this.identity}).then((()=>{}))}hide(){return this.wire.sendAction("hide-window",this.identity).then((()=>{}))}close(e=!1){return this.wire.sendAction("close-window",{force:e,...this.identity}).then((()=>{Object.setPrototypeOf(this,null)}))}focusedWebViewWasChanged(){return this.wire.sendAction("focused-webview-changed",this.identity).then((()=>{}))}getNativeId(){return this.wire.sendAction("get-window-native-id",this.identity).then((({payload:e})=>e.data))}async getCurrentViews(){const{payload:e}=await this.wire.sendAction("window-get-views",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}disableFrame(){return console.warn("Function is deprecated; use disableUserMovement instead."),this.wire.sendAction("disable-window-frame",this.identity).then((()=>{}))}disableUserMovement(){return this.wire.sendAction("disable-window-frame",this.identity).then((()=>{}))}enableFrame(){return console.warn("Function is deprecated; use enableUserMovement instead."),this.wire.sendAction("enable-window-frame",this.identity).then((()=>{}))}enableUserMovement(){return this.wire.sendAction("enable-window-frame",this.identity).then((()=>{}))}flash(){return this.wire.sendAction("flash-window",this.identity).then((()=>{}))}stopFlashing(){return this.wire.sendAction("stop-flash-window",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction("get-window-info",this.identity).then((({payload:e})=>e.data))}async getLayout(e){this.wire.sendAction("window-get-layout",this.identity).catch((e=>{}));const t=await this.getOptions();if(!t.layout&&!t.layoutSnapshot)throw new Error("Window does not have a Layout");return this.fin.Platform.Layout.wrap(e??this.identity)}getOptions(){return this.wire.sendAction("get-window-options",this.identity).then((({payload:e})=>e.data))}getParentApplication(){return this.wire.sendAction("window-get-parent-application",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity))}getParentWindow(){return this.wire.sendAction("window-get-parent-window",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity)).then((e=>e.getWindow()))}async getSnapshot(e){const t={area:e,...this.identity};console.warn("Window.getSnapshot has been deprecated, please use Window.capturePage");return(await this.wire.sendAction("get-window-snapshot",t)).payload.data}getState(){return this.wire.sendAction("get-window-state",this.identity).then((({payload:e})=>e.data))}getWebWindow(){return this.wire.sendAction("window-get-web-window",this.identity).catch((e=>{})),this.wire.environment.getWebWindow(this.identity)}isMainWindow(){return this.wire.sendAction("window-is-main-window",this.identity).catch((e=>{})),this.me.uuid===this.me.name}isShowing(){return this.wire.sendAction("is-window-showing",this.identity).then((({payload:e})=>e.data))}maximize(){return this.wire.sendAction("maximize-window",this.identity).then((()=>{}))}minimize(){return this.wire.sendAction("minimize-window",this.identity).then((()=>{}))}moveBy(e,t,n){return this.wire.sendAction("move-window-by",{deltaLeft:e,deltaTop:t,positioningOptions:n,...this.identity}).then((()=>{}))}moveTo(e,t,n){return this.wire.sendAction("move-window",{left:e,top:t,positioningOptions:n,...this.identity}).then((()=>{}))}resizeBy(e,t,n,i){return this.wire.sendAction("resize-window-by",{deltaWidth:Math.floor(e),deltaHeight:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}resizeTo(e,t,n,i){return this.wire.sendAction("resize-window",{width:Math.floor(e),height:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}restore(){return this.wire.sendAction("restore-window",this.identity).then((()=>{}))}setAsForeground(){return this.wire.sendAction("set-foreground-window",this.identity).then((()=>{}))}setBounds(e,t){return this.wire.sendAction("set-window-bounds",{...e,...this.identity,positioningOptions:t}).then((()=>{}))}show(e=!1){return this.wire.sendAction("show-window",{force:e,...this.identity}).then((()=>{}))}showAt(e,t,n=!1){return this.wire.sendAction("show-at-window",{force:n,left:Math.floor(e),top:Math.floor(t),...this.identity}).then((()=>{}))}updateOptions(e){return this.wire.sendAction("update-window-options",{options:e,...this.identity}).then((()=>{}))}authenticate(e,t){return this.wire.sendAction("window-authenticate",{userName:e,password:t,...this.identity}).then((()=>{}))}async showPopupMenu(e){const{payload:t}=await this.wire.sendAction("show-popup-menu",{options:e,...this.identity});return t.data}async closePopupMenu(){return this.wire.sendAction("close-popup-menu",{...this.identity}).then((()=>{}))}async dispatchPopupResult(e){this.wire.sendAction("window-dispatch-popup-result",this.identity).catch((e=>{})),await this.wire.sendAction("dispatch-popup-result",{data:e,...this.identity})}async print(e={content:"self"}){switch(e.content){case void 0:case"self":return super.print(e);case"screenshot":return this.wire.sendAction("print-screenshot",this.identity).then((()=>{}));case"views":return this.wire.sendAction("print-views",{...this.identity,options:e}).then((()=>{}));default:return}}}return S._Window=o,S}function ie(){return te||(te=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(function(){if(ee)return _;ee=1,Object.defineProperty(_,"__esModule",{value:!0}),_._WindowModule=void 0;const e=d,t=O,n=ne();class i extends e.Base{async wrap(e){this.wire.sendAction("window-wrap").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}wrapSync(e){this.wire.sendAction("window-wrap-sync").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}create(e){return this.wire.sendAction("create-window").catch((e=>{})),new n._Window(this.wire,{uuid:this.me.uuid,name:e.name}).createWindow(e)}getCurrent(){if(this.wire.sendAction("get-current-window").catch((e=>{})),!this.wire.me.isWindow)throw new Error("You are not in a Window context");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction("get-current-window-sync").catch((e=>{})),!this.wire.me.isWindow)throw new Error("You are not in a Window context");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return _._WindowModule=i,_}(),e),n(ne(),e)}(M)),M}Q.promisifySubscription=async(e,t,n=(()=>!0),i)=>{let r,o,s;const a=new Promise(((e,t)=>{r=e,o=t})),c=e=>{n(e)&&(clearTimeout(s),r(e))};return await e.on(t,c),i&&(s=setTimeout((()=>o(new Error("event timed out"))),i)),a.finally((()=>{e.removeListener(t,c).catch((()=>null))})),{getValue:()=>a}},Object.defineProperty(c,"__esModule",{value:!0}),c.System=void 0;const re=d,oe=g,se=ie(),ae=t;class ce extends re.EmitterBase{constructor(e){super(e,"system")}sendExternalProcessRequest(e,t){return new Promise(((n,i)=>{const r="external-process-exited";let o,s,a,c;"function"==typeof t.listener&&(a=e=>{const n=e||{};s={topic:"exited",uuid:n.processUuid||"",exitCode:n.exitCode||0},o===e.processUuid&&(t.listener(s),c.removeListener(r,a))},this.wire.me.name||(this.wire.me.name=this.wire.me.uuid),c=new se._Window(this.wire,this.wire.me),c.on(r,a)),this.wire.sendAction(e,t).then((({payload:e})=>{o=e.data.uuid,n(e.data),s&&o===s.uuid&&(t.listener(s),c.removeListener(r,a))})).catch((e=>{c&&c.removeListener(r,a),i(e)}))}))}getVersion(){return this.wire.sendAction("get-version").then((({payload:e})=>e.data))}clearCache(e){return this.wire.sendAction("clear-cache",e).then((()=>{}))}deleteCacheOnExit(){return this.wire.sendAction("delete-cache-request").then((()=>{}))}exit(){return this.wire.sendAction("exit-desktop").then((()=>{}))}async fetchManifest(e){const{payload:{data:t}}=await this.wire.sendAction("fetch-manifest",{manifestUrl:e});return t}flushCookieStore(){return this.wire.sendAction("flush-cookie-store").then((()=>{}))}getAllWindows(){return this.wire.sendAction("get-all-windows").then((({payload:e})=>e.data))}getAllApplications(){return this.wire.sendAction("get-all-applications").then((({payload:e})=>e.data))}getCommandLineArguments(){return this.wire.sendAction("get-command-line-arguments").then((({payload:e})=>e.data))}async getCrashReporterState(){const{payload:{data:{diagnosticMode:e,isRunning:t}}}=await this.wire.sendAction("get-crash-reporter-state");return console.warn("diagnosticMode property is deprecated. It will be removed in a future version"),{diagnosticMode:e,diagnosticsMode:e,isRunning:t}}async startCrashReporter(e){const t=e,n={...t,diagnosticMode:t.diagnosticsMode||t.diagnosticMode},{payload:{data:{diagnosticMode:i,isRunning:r}}}=await this.wire.sendAction("start-crash-reporter",n);return{diagnosticMode:i,diagnosticsMode:i,isRunning:r}}getUniqueUserId(){return this.wire.sendAction("get-unique-user-id").then((({payload:e})=>e.data))}getEntityInfo(e,t){return this.wire.sendAction("get-entity-info",{uuid:e,name:t}).then((({payload:e})=>e.data))}getEnvironmentVariable(e){return this.wire.sendAction("get-environment-variable",{environmentVariables:e}).then((({payload:e})=>e.data))}getFocusedWindow(){return this.wire.sendAction("get-focused-window").then((({payload:e})=>e.data))}async isAppCertified(e){const{payload:{data:{certifiedInfo:t}}}=await this.wire.sendAction("is-app-certified",{manifestUrl:e});return t}getInstalledRuntimes(){return this.wire.sendAction("get-installed-runtimes").then((({payload:e})=>e.data.runtimes))}async getInstalledApps(){const{payload:{data:{installedApps:e}}}=await this.wire.sendAction("get-installed-apps");return e}getLog(e){return this.wire.sendAction("view-log",e).then((({payload:e})=>e.data))}getMachineId(){return this.wire.sendAction("get-machine-id").then((({payload:e})=>e.data))}getMinLogLevel(){return this.wire.sendAction("get-min-log-level").then((({payload:e})=>e.data))}getLogList(){return this.wire.sendAction("list-logs").then((({payload:e})=>e.data))}getMonitorInfo(){return this.wire.sendAction("get-monitor-info").then((({payload:e})=>e.data))}getMousePosition(){return this.wire.sendAction("get-mouse-position").then((({payload:e})=>e.data))}getProcessList(){return console.warn("System.getProcessList has been deprecated. Please consider using our new process APIs: Window.getProcessInfo, View.getProcessInfo, Application.getProcessInfo, System.getAllProcessInfo"),this.wire.sendAction("process-snapshot").then((({payload:e})=>e.data))}async getAllProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction("get-all-process-info",this.identity);return e}getProxySettings(){return this.wire.sendAction("get-proxy-settings").then((({payload:e})=>e.data))}getRuntimeInfo(){return this.wire.sendAction("get-runtime-info").then((({payload:e})=>e.data))}getRvmInfo(){return this.wire.sendAction("get-rvm-info").then((({payload:e})=>e.data))}getHostSpecs(){return this.wire.sendAction("get-host-specs").then((({payload:e})=>e.data))}getOSInfo(){return this.wire.sendAction("get-os-info").then((({payload:e})=>e.data))}launchExternalProcess(e){return this.sendExternalProcessRequest("launch-external-process",e)}monitorExternalProcess(e){return this.sendExternalProcessRequest("monitor-external-process",e)}log(e,t){return this.wire.sendAction("write-to-log",{level:e,message:t}).then((()=>{}))}openUrlWithBrowser(e){return this.wire.sendAction("open-url-with-browser",{url:e}).then((()=>{}))}async registerCustomProtocol(e){if("object"!=typeof e)throw new Error("Must provide an object with a `protocolName` property having a string value.");await this.wire.sendAction("register-custom-protocol",e)}async unregisterCustomProtocol(e){await this.wire.sendAction("unregister-custom-protocol",{protocolName:e})}async getCustomProtocolState(e){return this.wire.sendAction("get-custom-protocol-state",{protocolName:e}).then((({payload:e})=>e.data))}releaseExternalProcess(e){return this.wire.sendAction("release-external-process",{uuid:e}).then((()=>{}))}showDeveloperTools(e){return this.wire.sendAction("show-developer-tools",e).then((()=>{}))}terminateExternalProcess(e){return this.wire.sendAction("terminate-external-process",e).then((()=>{}))}updateProxySettings(e){return this.wire.sendAction("update-proxy",e).then((()=>{}))}async downloadAsset(e,t){const n=()=>{};let i=n,r=n;const o=new Promise(((e,t)=>{i=e,r=t}));if("openfin"!==this.wire.environment.type)throw new oe.NotSupportedError("downloadAsset only supported in an OpenFin Render process");const s=oe.RuntimeError.getCallSite(),a=this.wire.environment.getNextMessageId().toString(),c=`asset-download-progress-${a}`,d=`asset-download-error-${a}`,h=`asset-download-complete-${a}`,l=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},u=()=>{this.removeListener(c,l)};await Promise.all([this.on(c,l),this.once(d,(e=>{u();const{reason:t,err:n}=e;r(new oe.RuntimeError({reason:t,error:n},s))})),this.once(h,(()=>{u(),i()}))]);const p=Object.assign(e,{downloadId:a});return await this.wire.sendAction("download-asset",p).catch((e=>{throw u(),e})),o}downloadRuntime(e,t){const n=oe.RuntimeError.getCallSite();return new Promise(((i,r)=>{if("openfin"!==this.wire.environment.type)return void r(new oe.NotSupportedError("downloadRuntime only supported in an OpenFin Render process"));const o=this.wire.environment.getNextMessageId().toString(),s=`runtime-download-progress-${o}`,a=`runtime-download-error-${o}`,c=`runtime-download-complete-${o}`,d=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},h=()=>{this.removeListener(s,d)};this.on(s,d),this.once(a,(e=>{h();const{reason:t,err:i}=e;r(new oe.RuntimeError({reason:t,error:i},n))})),this.once(c,(()=>{h(),i()}));const l=Object.assign(e,{downloadId:o});this.wire.sendAction("download-runtime",l).catch((e=>{h(),r(e)}))}))}downloadPreloadScripts(e){return this.wire.sendAction("download-preload-scripts",{scripts:e}).then((({payload:e})=>e.data))}getAllExternalApplications(){return this.wire.sendAction("get-all-external-applications").then((({payload:e})=>e.data))}getAppAssetInfo(e){return this.wire.sendAction("get-app-asset-info",e).then((({payload:e})=>e.data))}getCookies(e){const t=this.wire.environment.getUrl(),n=Object.assign(e,{url:t});return this.wire.sendAction("get-cookies",n).then((({payload:e})=>e.data))}setMinLogLevel(e){return this.wire.sendAction("set-min-log-level",{level:e}).then((()=>{}))}resolveUuid(e){return this.wire.sendAction("resolve-uuid",{entityKey:e}).then((({payload:e})=>e.data))}executeOnRemote(e,t){return t.requestingIdentity=e,this.wire.ferryAction(t)}readRegistryValue(e,t,n){return this.wire.sendAction("read-registry-value",{rootKey:e,subkey:t,value:n}).then((({payload:e})=>e.data))}registerExternalConnection(e){return this.wire.sendAction("register-external-connection",{uuid:e}).then((({payload:e})=>e.data))}async getServiceConfiguration(e){if("string"!=typeof e.name)throw new Error("Must provide an object with a `name` property having a string value");const{name:t}=e;return this.wire.sendAction("get-service-configuration",{name:t}).then((({payload:e})=>e.data))}async getSystemAppConfig(e){if("string"!=typeof e)throw new Error("Must provide a string value for name of system app");return this.wire.sendAction("get-system-app-configuration",{name:e}).then((({payload:e})=>e.data))}async registerShutdownHandler(e){this.wire.sendAction("system-register-shutdown-handler").catch((e=>{}));const{uuid:t,name:n}=this.wire.me;this.on("system-shutdown",(i=>{e({proceed:()=>{this.wire.environment.raiseEvent("application/system-shutdown-handled",{uuid:t,name:n,topic:"application"})}})}))}runRvmHealthCheck(){return this.wire.sendAction("run-rvm-health-check").then((({payload:e})=>e.data))}async launchManifest(e,t={}){const{subscribe:n,...i}=t,r=i;if(n){const e=new ae.EventEmitter;n(e);const t="app-version-progress",i="runtime-status",o="app-version-complete",s="app-version-error",a=this.wire.environment.getNextMessageId().toString();r.appVersionId=a;const c=[o,t,i,s],d=e=>{const{appVersionId:t,topic:n,type:i,...r}=e;return{...r,type:c.find((e=>i.includes(e)))}},h=t=>{const n=d(t);e.emit(n.type,n)},l=()=>{this.removeListener(`${t}.${a}`,h),this.removeListener(`${i}.${a}`,h),this.removeListener(`${o}.${a}`,h),this.removeListener(`${s}.${a}`,h),this.removeListener(`${o}.${a}`,l),this.removeListener(`${s}.${a}`,l)};await Promise.all([this.on(`${t}.${a}`,h),this.on(`${i}.${a}`,h),this.once(`${o}.${a}`,h),this.once(`${s}.${a}`,h),this.once(`${o}.${a}`,l),this.once(`${s}.${a}`,l)])}return(await this.wire.sendAction("launch-manifest",{manifestUrl:e,opts:r})).payload.data.manifest}async queryPermissionForCurrentContext(e){const t={uuid:this.wire.me.uuid,name:this.wire.me.name};return(await this.wire.sendAction("query-permission-for-current-context",{apiName:e,identity:t})).payload.data}async enableNativeWindowIntegrationProvider(e){const{payload:t}=await this.wire.sendAction("enable-native-window-integration-provider",{permissions:e});return t.data}async registerUsage({data:e,type:t}){await this.wire.sendAction("register-usage",{data:e,type:t})}async getPrinters(){const{payload:e}=await this.wire.sendAction("system-get-printers");return e.data}async updateProcessLoggingOptions(e){await this.wire.sendAction("system-update-process-logging-options",{options:e})}async getDomainSettings(){const{payload:{data:e}}=await this.wire.sendAction("get-domain-settings",this.identity);return e}async setDomainSettings(e){await this.wire.sendAction("set-domain-settings",{domainSettings:e,...this.identity})}async refreshExtensions(){const{payload:e}=await this.wire.sendAction("refresh-extensions");return e.data}async getInstalledExtensions(){const{payload:e}=await this.wire.sendAction("get-installed-extensions");return e.data}}c.System=ce;var de={},he={};Object.defineProperty(he,"__esModule",{value:!0}),he.RefCounter=void 0;he.RefCounter=class{constructor(){this.topicRefMap=new Map}incRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t+1;n=i,this.topicRefMap.set(e,i)}else this.topicRefMap.set(e,1),n=1;return n}decRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t-1;this.topicRefMap.set(e,i),n=i}else n=-1;return n}actOnFirst(e,t,n){return 1===this.incRefCount(e)?t():n()}actOnLast(e,t,n){return 0===this.decRefCount(e)?t():n()}};var le={},ue={},pe={};Object.defineProperty(pe,"__esModule",{value:!0}),pe.ChannelBase=pe.ProtectedItems=void 0;const we=e=>async(t,n,i)=>{const r=await e(t,n,i);return void 0===r?n:r};pe.ProtectedItems=class{constructor(e,t){this.providerIdentity=e,this.close=t}};class ye{static defaultAction(e){throw new Error(`No action registered at target for ${e}`)}constructor(){this.subscriptions=new Map}async processAction(e,t,n){try{const i=this.subscriptions.has(e)?this.subscriptions.get(e):(t,n)=>(this.defaultAction??ye.defaultAction)(e,t,n),r=this.preAction?await this.preAction(e,t,n):t,o=await i(r,n);return this.postAction?await this.postAction(e,o,n):o}catch(t){if(this.errorMiddleware)return this.errorMiddleware(e,t,n);throw t}}beforeAction(e){if(this.preAction)throw new Error("Already registered beforeAction middleware");this.preAction=we(e)}onError(e){if(this.errorMiddleware)throw new Error("Already registered error middleware");this.errorMiddleware=e}afterAction(e){if(this.postAction)throw new Error("Already registered afterAction middleware");this.postAction=we(e)}remove(e){this.subscriptions.delete(e)}setDefaultAction(e){if(this.defaultAction)throw new Error("default action can only be set once");this.defaultAction=e}register(e,t){if(this.subscriptions.has(e))throw new Error(`Subscription already registered for action: ${e}. Unsubscribe before adding new subscription`);return this.subscriptions.set(e,t),!0}}pe.ChannelBase=ye;var fe,ge,me,ve=s&&s.__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)},Ce=s&&s.__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};Object.defineProperty(ue,"__esModule",{value:!0}),ue.ChannelClient=void 0;const be=pe,Ie=new Map;class Ee extends be.ChannelBase{static closeChannelByEndpointId(e){const t=Ie.get(e);t&&ve(t,me,"f").call(t)}static handleProviderDisconnect(e){for(const t of Ie.values())t.providerIdentity.channelId===e.channelId&&(t.disconnectListener(e),ve(t,me,"f").call(t))}constructor(e,t,n){super(),fe.set(this,void 0),ge.set(this,void 0),this.processAction=(e,t,n)=>super.processAction(e,t,n),me.set(this,(()=>{Ie.delete(this.endpointId),ve(this,ge,"f").close()})),Ce(this,fe,new be.ProtectedItems(e,t),"f"),this.disconnectListener=()=>{},this.endpointId=e.endpointId,Ce(this,ge,n,"f"),Ie.set(this.endpointId,this),n.receive(this.processAction)}get providerIdentity(){return ve(this,fe,"f").providerIdentity}async dispatch(e,t){if(ve(this,ge,"f").isEndpointConnected(this.providerIdentity.channelId))return ve(this,ge,"f").send(this.providerIdentity.channelId,e,t);throw new Error("The client you are trying to dispatch from is disconnected from the target provider.")}onDisconnection(e){this.disconnectListener=t=>{try{e(t)}catch(e){throw new Error(`Error while calling the onDisconnection callback: ${e.message}`)}finally{this.disconnectListener=()=>{}}}}async disconnect(){await this.sendDisconnectAction(),ve(this,me,"f").call(this)}async sendDisconnectAction(){const e=ve(this,fe,"f");await e.close()}static async wireClose(e,t,n){const{channelName:i,uuid:r,name:o}=t;await e.sendAction("disconnect-from-channel",{channelName:i,uuid:r,name:o,endpointId:n})}}ue.ChannelClient=Ee,fe=new WeakMap,ge=new WeakMap,me=new WeakMap;var xe={},Ae={};Object.defineProperty(Ae,"__esModule",{value:!0}),Ae.exhaustiveCheck=void 0,Ae.exhaustiveCheck=function(e,t){throw new Error(`Unsupported value: ${e}${t?`\n Supported values are: ${t.join("")}`:""}`)};var Pe,Me,_e,Oe={},Se=s&&s.__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},Re=s&&s.__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)};Object.defineProperty(Oe,"__esModule",{value:!0}),Oe.ClassicInfo=Oe.ClassicStrategy=void 0;Oe.ClassicStrategy=class{constructor(e,t,n,i){this.messageReceiver=t,this.endpointId=n,this.providerIdentity=i,Pe.set(this,void 0),Me.set(this,new Map),_e.set(this,new Map),this.send=async(e,t,n)=>{const i=Re(this,Me,"f").get(e);if(!i)throw new Error(`Could not locate routing info for endpoint ${e}`);const r={...i};r.isLocalEndpointId&&delete r.endpointId,delete r.isLocalEndpointId;const o=Re(this,Pe,"f").sendAction("send-channel-message",{...r,providerIdentity:this.providerIdentity,action:t,payload:n});Re(this,_e,"f").get(e)?.add(o);return(await o.catch((e=>{throw new Error(e.message)})).finally((()=>{Re(this,_e,"f").get(e)?.delete(o)}))).payload.data.result},this.close=async()=>{this.messageReceiver.removeEndpoint(this.providerIdentity.channelId,this.endpointId),[...Re(this,Me,"f").keys()].forEach((e=>this.closeEndpoint(e))),Se(this,Me,new Map,"f")},Se(this,Pe,e,"f")}onEndpointDisconnect(e,t){}receive(e){this.messageReceiver.addEndpoint(e,this.providerIdentity.channelId,this.endpointId)}async closeEndpoint(e){const t=Re(this,Me,"f").get(e);Re(this,Me,"f").delete(e);const n=Re(this,_e,"f").get(e);n?.forEach((n=>{const i=`Channel connection with identity uuid: ${t?.uuid} / name: ${t?.name} / endpointId: ${e} no longer connected.`;n.cancel(new Error(i))}))}isEndpointConnected(e){return Re(this,Me,"f").has(e)}addEndpoint(e,t){Re(this,Me,"f").set(e,t.endpointIdentity),Re(this,_e,"f").set(e,new Set)}isValidEndpointPayload(e){return"string"==typeof e?.endpointIdentity?.endpointId||"string"==typeof e?.endpointIdentity?.channelId}},Pe=new WeakMap,Me=new WeakMap,_e=new WeakMap,Oe.ClassicInfo={version:5,minimumVersion:0,type:"classic"};var Fe={},je={},ke={};Object.defineProperty(ke,"__esModule",{value:!0}),ke.errorToPOJO=void 0,ke.errorToPOJO=function(e){return{stack:e.stack,name:e.name,message:e.message,toString:()=>e.stack||e.toString()}};var Le,Te,$e=s&&s.__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)},Be=s&&s.__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};Object.defineProperty(je,"__esModule",{value:!0}),je.RTCEndpoint=void 0;const Ge=ke;je.RTCEndpoint=class{static isValidEndpointPayload(e){const t=e=>"object"==typeof e&&null!==e;return t(e)&&t(e.endpointIdentity)&&t(e.rtc)&&"string"==typeof e.endpointIdentity.endpointId}constructor({rtc:e,endpointIdentity:t}){this.responseMap=new Map,Le.set(this,null),Te.set(this,void 0),this.connectionStateChangeHandler=e=>{"connected"!==this.rtc.rtcClient.connectionState&&(this.rtc.rtcClient.removeEventListener("connectionstatechange",this.connectionStateChangeHandler),this.close(),$e(this,Te,"f")&&$e(this,Te,"f").call(this))},this.send=async(e,t)=>{const n=`message-${Math.random()}`,i=new Promise(((e,t)=>{this.responseMap.set(n,{resolve:e,reject:t})}));return this.rtc.channels.request.send(JSON.stringify({action:e,payload:t,messageId:n})),i},this.close=()=>{this.responseMap.forEach((e=>e.reject("Connection has closed."))),this.responseMap=new Map,this.rtc.channels.request.close(),this.rtc.channels.response.close(),this.rtc.rtcClient.close()},this.rtc=e,this.endpointIdentity=t,this.rtc.channels.response.addEventListener("message",(e=>{let{data:t}=e;e.data instanceof ArrayBuffer&&(t=(new TextDecoder).decode(e.data));const{messageId:n,payload:i,success:r,error:o}=JSON.parse(t),{resolve:s,reject:a}=this.responseMap.get(n)??{};s&&a?(this.responseMap.delete(n),r?s(i):a(o)):(console.log("Could not find id in responseMap."),console.log(e))})),this.rtc.channels.request.addEventListener("message",(async e=>{let{data:n}=e;e.data instanceof ArrayBuffer&&(n=(new TextDecoder).decode(e.data));const{messageId:i,action:r,payload:o}=JSON.parse(n);if($e(this,Le,"f"))try{const e=await $e(this,Le,"f").call(this,r,o,t);this.rtc.channels.response.send(JSON.stringify({messageId:i,payload:e,success:!0}))}catch(e){"open"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,error:(0,Ge.errorToPOJO)(e),success:!1}))}else"open"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,success:!1,error:"Connection not ready."}))})),this.rtc.rtcClient.addEventListener("connectionstatechange",this.connectionStateChangeHandler),Object.values(this.rtc.channels).forEach((e=>{e.onclose=e=>{[...this.responseMap.values()].forEach((e=>e.reject(new Error("RTCDataChannel closed unexpectedly, this is most commonly caused by message size. Note: RTC Channels have a message size limit of ~255kB.")))),this.close(),$e(this,Te,"f")&&$e(this,Te,"f").call(this)}}))}onDisconnect(e){if($e(this,Te,"f"))throw new Error("RTCEndpoint disconnectListener cannot be set twice.");Be(this,Te,e,"f")}receive(e){if($e(this,Le,"f"))throw new Error("You have already set a listener for this RTC Endpoint.");Be(this,Le,e,"f")}get connected(){return"connected"===this.rtc.rtcClient.connectionState}},Le=new WeakMap,Te=new WeakMap;var We,He,Ne,De={},Ue=s&&s.__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)},Ve=s&&s.__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};Object.defineProperty(De,"__esModule",{value:!0}),De.EndpointStrategy=void 0;De.EndpointStrategy=class{constructor(e,t,n){this.EndpointType=e,this.StrategyName=n,We.set(this,null),He.set(this,new Map),Ne.set(this,!0),this.send=async(e,t,n)=>this.getEndpointById(e).send(t,n),this.close=async()=>{Ue(this,Ne,"f")&&(Ue(this,He,"f").forEach((e=>e.close())),Ve(this,He,new Map,"f")),Ve(this,Ne,!1,"f")},this.isValidEndpointPayload=t}onEndpointDisconnect(e,t){this.getEndpointById(e).onDisconnect(t)}receive(e){if(Ue(this,We,"f"))throw new Error(`You have already set a listener for this ${this.StrategyName} Strategy`);Ve(this,We,e,"f"),Ue(this,He,"f").forEach((e=>e.receive(Ue(this,We,"f"))))}getEndpointById(e){const t=Ue(this,He,"f").get(e);if(!t)throw new Error(`Client with endpoint id ${e} is not connected`);return t}get connected(){return Ue(this,Ne,"f")}isEndpointConnected(e){return Ue(this,He,"f").has(e)}addEndpoint(e,t){if(!Ue(this,Ne,"f"))return void console.warn(`Adding endpoint to disconnected ${this.StrategyName} Strategy`);const n=new this.EndpointType(t);Ue(this,We,"f")&&n.receive(Ue(this,We,"f")),Ue(this,He,"f").set(e,n)}async closeEndpoint(e){Ue(this,He,"f").delete(e)}},We=new WeakMap,He=new WeakMap,Ne=new WeakMap,Object.defineProperty(Fe,"__esModule",{value:!0}),Fe.RTCInfo=Fe.RTCStrategy=void 0;const ze=je,Ke=De;class qe extends Ke.EndpointStrategy{constructor(){super(ze.RTCEndpoint,ze.RTCEndpoint.isValidEndpointPayload,"RTC")}}Fe.RTCStrategy=qe,Fe.RTCInfo={version:2,minimumVersion:0,type:"rtc"};var Je={};Object.defineProperty(Je,"__esModule",{value:!0}),Je.RTCICEManager=void 0;const Ye=d;class Ze extends Ye.EmitterBase{constructor(e){super(e,"channel"),this.ensureChannelOpened=e=>new Promise(((t,n)=>{if("open"===e.readyState)t();else if("connecting"===e.readyState){const n=()=>{e.removeEventListener("open",n),t()};e.addEventListener("open",n)}else n(new Error("This Channel has already closed"))}))}static createDataChannelPromise(e,t){let n;const i=new Promise((e=>{n=e})),r=i=>{const o=()=>{i.channel.removeEventListener("open",o),n(i.channel)};i.channel.label===e&&(i.channel.addEventListener("open",o),t.removeEventListener("datachannel",r))};return t.addEventListener("datachannel",r),i}async listenForProviderIce(e,t){await this.on(this.createProviderEventName(e),t,{timestamp:Date.now()})}async raiseProviderIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createProviderEventName(e)),t)}async listenForClientIce(e,t){await this.on(this.createClientEventName(e),t,{timestamp:Date.now()})}async raiseClientIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createClientEventName(e)),t)}cleanupIceListeners(e){this.removeAllListeners(this.createClientEventName(e)),this.removeAllListeners(this.createProviderEventName(e))}createClientEventName(e){return`ice-client-${e}`}createProviderEventName(e){return`ice-provider-${e}`}createRouteString(e){return`channel/${e}`}createRtcPeer(){return this.wire.environment.getRtcPeer()}async startClientOffer(){const e=Math.random().toString(),t=this.createRtcPeer();t.addEventListener("icecandidate",(async t=>{t.candidate&&await this.raiseClientIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForProviderIce(e,(async e=>{await t.addIceCandidate(e.candidate)}));const n={request:t.createDataChannel("request"),response:t.createDataChannel("response")},i=await t.createOffer();await t.setLocalDescription(i);const r=Promise.all([n.request,n.response].map(this.ensureChannelOpened)).then((()=>{}));return{rtcClient:t,channels:n,offer:i,rtcConnectionId:e,channelsOpened:r}}async finishClientOffer(e,t,n){return await e.setRemoteDescription(t),await n,!0}async createProviderAnswer(e,t){const n=this.createRtcPeer(),i=Ze.createDataChannelPromise("request",n),r=Ze.createDataChannelPromise("response",n);n.addEventListener("icecandidate",(async t=>{t.candidate&&await this.raiseProviderIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForClientIce(e,(async e=>{await n.addIceCandidate(e.candidate)})),await n.setRemoteDescription(t);const o=await n.createAnswer();await n.setLocalDescription(o);const s=Promise.all([i,r]).then((([t,n])=>(this.cleanupIceListeners(e),{request:t,response:n})));return{rtcClient:n,answer:o,channels:s}}}Je.RTCICEManager=Ze;var Qe={},Xe={};function et(e){return[...e.split(".").reverse().entries()].reduce(((e,[t,n])=>e+ +n*1e4**t),0)}function tt(e,t){return et(e)>=et(t)}function nt(e){return e.split("/")[0]}Object.defineProperty(Xe,"__esModule",{value:!0}),Xe.runtimeUuidMeetsMinimumRuntimeVersion=Xe.parseRuntimeUuid=Xe.meetsMinimumRuntimeVersion=void 0,Xe.meetsMinimumRuntimeVersion=tt,Xe.parseRuntimeUuid=nt,Xe.runtimeUuidMeetsMinimumRuntimeVersion=function(e,t){return tt(nt(e),t)};var it,rt,ot,st,at,ct=s&&s.__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)},dt=s&&s.__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};Object.defineProperty(Qe,"__esModule",{value:!0}),Qe.ChannelProvider=void 0;const ht=pe,lt=Xe;class ut extends ht.ChannelBase{get connections(){return[...ct(this,it,"f")]}static handleClientDisconnection(e,t){const n=e.connections.find((e=>e.endpointId===t.endpointId));if(n)ct(e,st,"f").call(e,n);else{e.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name)).forEach(ct(e,st,"f"))}e.disconnectListener(t)}static setProviderRemoval(e,t){ut.removalMap.set(e,t)}constructor(e,t,n){super(),it.set(this,void 0),rt.set(this,void 0),ot.set(this,void 0),st.set(this,(e=>{const t=this.connections.filter((t=>t.endpointId!==e.endpointId));ct(this,ot,"f").closeEndpoint(e.endpointId),dt(this,it,t,"f")})),this.processAction=async(e,t,n)=>(ut.clientIsMultiRuntime(n)&&!(0,lt.runtimeUuidMeetsMinimumRuntimeVersion)(n.runtimeUuid,"18.87.56.0")?this.handleMultiRuntimeLegacyClient(n):this.checkForClientConnection(n),super.processAction(e,t,n)),at.set(this,(()=>{ct(this,ot,"f").close();const e=ut.removalMap.get(this);e&&e()})),dt(this,rt,new ht.ProtectedItems(e,t),"f"),this.connectListener=()=>{},this.disconnectListener=()=>{},dt(this,it,[],"f"),dt(this,ot,n,"f"),n.receive(this.processAction)}dispatch(e,t,n){const i=e.endpointId??this.getEndpointIdForOpenFinId(e,t);return i&&ct(this,ot,"f").isEndpointConnected(i)?ct(this,ot,"f").send(i,t,n):Promise.reject(new Error(`Client connection with identity uuid: ${e.uuid} / name: ${e.name} / endpointId: ${i} no longer connected.`))}async processConnection(e,t){return ct(this,it,"f").push(e),this.connectListener(e,t)}publish(e,t){return this.connections.map((n=>ct(this,ot,"f").send(n.endpointId,e,t)))}onConnection(e){this.connectListener=e}onDisconnection(e){this.disconnectListener=e}async destroy(){const e=ct(this,rt,"f");e.providerIdentity,dt(this,it,[],"f"),await e.close(),ct(this,at,"f").call(this)}async getAllClientInfo(){return this.connections.map((e=>{const{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}=e;return{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}}))}checkForClientConnection(e){if(!this.isClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider.\n Client Identity: {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}isClientConnected(e){return ut.clientIdentityIncludesEndpointId(e)?this.connections.some((t=>t.endpointId===e.endpointId&&t.uuid===e.uuid&&t.name===e.name)):this.isLegacyClientConnected(e)}isLegacyClientConnected(e){return this.connections.some((t=>t.uuid===e.uuid&&t.name===e.name))}handleMultiRuntimeLegacyClient(e){if(!this.isLegacyClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider. Client Identity:\n {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}getEndpointIdForOpenFinId(e,t){const n=this.connections.filter((t=>t.name===e.name&&t.uuid===e.uuid));if(n.length>=2){const n=ct(this,rt,"f"),{uuid:i,name:r}=e,o=n?.providerIdentity.uuid,s=n?.providerIdentity.name;console.warn(`WARNING: Dispatch call may have unintended results. The "to" argument of your dispatch call is missing the\n "endpointId" parameter. The identity you are dispatching to ({uuid: ${i}, name: ${r}})\n has multiple channelClients for this channel. Your dispatched action: (${t}) from the provider:\n ({uuid: ${o}, name: ${s}}) will only be processed by the most recently-created client.`)}return n.pop()?.endpointId}static clientIdentityIncludesEndpointId(e){return void 0!==e.endpointId}static clientIsMultiRuntime(e){return void 0!==e.runtimeUuid}static async wireClose(e,t){await e.sendAction("destroy-channel",{channelName:t})}}Qe.ChannelProvider=ut,it=new WeakMap,rt=new WeakMap,ot=new WeakMap,st=new WeakMap,at=new WeakMap,ut.removalMap=new WeakMap;var pt={};Object.defineProperty(pt,"__esModule",{value:!0}),pt.MessageReceiver=void 0;const wt=ue,yt=d;class ft extends yt.Base{constructor(e){super(e),this.onmessage=e=>"process-channel-message"===e.action&&(this.processChannelMessage(e),!0),this.endpointMap=new Map,this.latestEndpointIdByChannelId=new Map,e.registerMessageHandler(this.onmessage.bind(this))}async processChannelMessage(e){const{senderIdentity:t,providerIdentity:n,action:i,ackToSender:r,payload:o,intendedTargetIdentity:s}=e.payload,a=s.channelId??s.endpointId??this.latestEndpointIdByChannelId.get(n.channelId),c=this.endpointMap.get(a);if(!c)return r.payload.success=!1,r.payload.reason=`Client connection with identity uuid: ${this.wire.me.uuid} / name: ${this.wire.me.name} / endpointId: ${a} no longer connected.`,this.wire.sendRaw(r);try{const e=await c(i,o,t);return r.payload.payload=r.payload.payload||{},r.payload.payload.result=e,this.wire.sendRaw(r)}catch(e){return r.payload.success=!1,r.payload.reason=e.message,this.wire.sendRaw(r)}}addEndpoint(e,t,n){this.endpointMap.set(n,e),t!==n&&this.latestEndpointIdByChannelId.set(t,n)}removeEndpoint(e,t){this.endpointMap.delete(t),this.latestEndpointIdByChannelId.get(e)===t&&this.latestEndpointIdByChannelId.delete(e)}checkForPreviousClientConnection(e){const t=this.latestEndpointIdByChannelId.get(e);t&&(wt.ChannelClient.closeChannelByEndpointId(t),console.warn("You have created a second connection to an older provider. First connection has been removed from the clientMap"),console.warn("If the provider calls publish(), you may receive multiple messages."))}}pt.MessageReceiver=ft;var gt={};Object.defineProperty(gt,"__esModule",{value:!0}),gt.ProtocolManager=void 0;gt.ProtocolManager=class{constructor(e){this.ProtocolsInPreferenceOrder=e,this.DefaultClientProtocols=["classic"],this.DefaultProviderProtocols=["classic"],this.getClientProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultClientProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(", ")}.`);return t},this.getProviderProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultProviderProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(", ")}.`);return t},this.getCompatibleProtocols=(e,t)=>t.supportedProtocols.filter((t=>e.some((e=>e.type===t.type&&t.version>=e.minimumVersion&&e.version>=(t.minimumVersion??0))))).slice(0,t.maxProtocols)}};var mt={};Object.defineProperty(mt,"__esModule",{value:!0});class vt{static combine(e,t){return new vt(e,t)}constructor(e,t){this.primary=e,this.secondary=t}onEndpointDisconnect(e,t){this.primary.onEndpointDisconnect(e,(()=>{this.secondary.isEndpointConnected(e)||t()})),this.secondary.onEndpointDisconnect(e,(()=>{this.primary.isEndpointConnected(e)||t()}))}isValidEndpointPayload(e){return this.primary.isValidEndpointPayload(e)||this.secondary.isValidEndpointPayload(e)}async closeEndpoint(e){await this.primary.closeEndpoint(e),await this.secondary.closeEndpoint(e)}isEndpointConnected(e){return this.primary.isEndpointConnected(e)||this.secondary.isEndpointConnected(e)}async addEndpoint(e,t){this.primary.isValidEndpointPayload(t)&&await this.primary.addEndpoint(e,t),this.secondary.isValidEndpointPayload(t)&&await this.secondary.addEndpoint(e,t)}receive(e){this.primary.receive(e),this.secondary.receive(e)}send(e,t,n){return this.primary.isEndpointConnected(e)?this.primary.send(e,t,n):this.secondary.send(e,t,n)}async close(){await Promise.all([this.primary.close(),this.secondary.close()])}}mt.default=vt;var Ct,bt,It=s&&s.__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},Et=s&&s.__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)},xt=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(xe,"__esModule",{value:!0}),xe.ConnectionManager=void 0;const At=Ae,Pt=d,Mt=Oe,_t=Fe,Ot=Je,St=Qe,Rt=pt,Ft=gt,jt=xt(mt);class kt extends Pt.Base{static getProtocolOptionsFromStrings(e){return e.map((e=>{switch(e){case"rtc":return _t.RTCInfo;case"classic":return Mt.ClassicInfo;default:return(0,At.exhaustiveCheck)(e,["rtc","classic"])}}))}constructor(e){super(e),Ct.set(this,void 0),bt.set(this,void 0),this.removeChannelFromProviderMap=e=>{this.providerMap.delete(e)},this.onmessage=e=>"process-channel-connection"===e.action&&(this.processChannelConnection(e),!0),this.providerMap=new Map,this.protocolManager=new Ft.ProtocolManager("node"===this.wire.environment.type?["classic"]:["rtc","classic"]),It(this,Ct,new Rt.MessageReceiver(e),"f"),It(this,bt,new Ot.RTCICEManager(e),"f"),e.registerMessageHandler(this.onmessage.bind(this))}createProvider(e,t){const n=Object.assign(this.wire.environment.getDefaultChannelOptions().create,e||{}),i=this.protocolManager.getProviderProtocols(n?.protocols),r=i.map((e=>{switch(e){case"rtc":return new _t.RTCStrategy;case"classic":return new Mt.ClassicStrategy(this.wire,Et(this,Ct,"f"),t.channelId,t);default:return(0,At.exhaustiveCheck)(e,["rtc","classic"])}}));let o;if(2===r.length){const[e,t]=r;o=jt.default.combine(e,t)}else{if(1!==r.length)throw new Error("failed to combine strategies");[o]=r}const s=new St.ChannelProvider(t,(()=>St.ChannelProvider.wireClose(this.wire,t.channelName)),o),a=t.channelId;return this.providerMap.set(a,{provider:s,strategy:o,supportedProtocols:kt.getProtocolOptionsFromStrings(i)}),St.ChannelProvider.setProviderRemoval(s,this.removeChannelFromProviderMap.bind(this)),s}async createClientOffer(e){const t=this.protocolManager.getClientProtocols(e?.protocols);let n;return{offer:{supportedProtocols:await Promise.all(t.map((async e=>{switch(e){case"rtc":{const{rtcClient:e,channels:t,offer:i,rtcConnectionId:r,channelsOpened:o}=await Et(this,bt,"f").startClientOffer();return n={rtcClient:e,channels:t,channelsOpened:o},{type:"rtc",version:_t.RTCInfo.version,payload:{offer:i,rtcConnectionId:r}}}case"classic":return{type:"classic",version:Mt.ClassicInfo.version};default:return(0,At.exhaustiveCheck)(e,["rtc","classic"])}}))),maxProtocols:2},rtc:n}}async createClientStrategy(e,t){t.endpointId||(t.endpointId=this.wire.environment.getNextMessageId(),Et(this,Ct,"f").checkForPreviousClientConnection(t.channelId));const n=t.answer??{supportedProtocols:[{type:"classic",version:1}]},i=(await Promise.all(n.supportedProtocols.map((async n=>"rtc"===n.type&&e?(await Et(this,bt,"f").finishClientOffer(e.rtcClient,n.payload.answer,e.channelsOpened),new _t.RTCStrategy):"classic"===n.type?new Mt.ClassicStrategy(this.wire,Et(this,Ct,"f"),t.endpointId,t):null)))).filter((e=>null!==e));let r;if(e&&!i.some((e=>e instanceof _t.RTCStrategy))&&e&&e.rtcClient.close(),i.length>=2)r=jt.default.combine(i[0],i[1]);else{if(!i.length)throw new Error("No compatible protocols");[r]=i}const o={endpointIdentity:t,rtc:e};return r.addEndpoint(t.channelId,o),r}async processChannelConnection(e){const{clientIdentity:t,providerIdentity:n,ackToSender:i,payload:r,offer:o}=e.payload;t.endpointId?t.isLocalEndpointId=!1:(t.endpointId=this.wire.environment.getNextMessageId(),t.isLocalEndpointId=!0);const s=n.channelId,a=this.providerMap.get(s);if(!a)return i.payload.success=!1,i.payload.reason=`Channel "${n.channelName}" has been destroyed.`,this.wire.sendRaw(i);const{provider:c,strategy:d,supportedProtocols:h}=a;try{if(!(c instanceof St.ChannelProvider))throw Error("Cannot connect to a channel client");const e=o??{supportedProtocols:[{type:"classic",version:1}],maxProtocols:1},n=this.protocolManager.getCompatibleProtocols(h,e);if(!n.length)throw new Error("This provider does not support any of the offered protocols.");const s=await c.processConnection(t,r);i.payload.payload=i.payload.payload||{};let a={supportedProtocols:[],endpointPayloadPromise:Promise.resolve({endpointIdentity:t})};return a=await n.reduce((async(e,t)=>{const n=await e;if("rtc"===t.type){const{answer:e,rtcClient:i,channels:r}=await Et(this,bt,"f").createProviderAnswer(t.payload.rtcConnectionId,t.payload.offer);n.supportedProtocols.push({type:"rtc",version:_t.RTCInfo.version,payload:{answer:e}}),n.endpointPayloadPromise=n.endpointPayloadPromise.then((e=>r.then((t=>({...e,rtc:{rtcClient:i,channels:t}})))))}else n.supportedProtocols.push({type:"classic",version:Mt.ClassicInfo.version});return n}),Promise.resolve(a)),a.endpointPayloadPromise.then((e=>d.addEndpoint(t.endpointId,e))),i.payload.payload.result=s,i.payload.payload.answer=a,this.wire.sendRaw(i)}catch(e){return i.payload.success=!1,i.payload.reason=e.message,this.wire.sendRaw(i)}}}xe.ConnectionManager=kt,Ct=new WeakMap,bt=new WeakMap;var Lt,Tt,$t,Bt=s&&s.__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},Gt=s&&s.__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)};Object.defineProperty(le,"__esModule",{value:!0}),le.Channel=void 0;const Wt=t,Ht=G,Nt=d,Dt=ue,Ut=xe,Vt=Qe;function zt(e){const t=Math.floor(e/10),n=Math.min(3e4,500*2**t);return new Promise((e=>{setTimeout((()=>{e(!1)}),n)}))}class Kt extends Nt.EmitterBase{constructor(e){super(e,"channel"),Lt.set(this,void 0),Tt.set(this,new Wt.EventEmitter),$t.set(this,new Ht.AsyncRetryableLazy((async()=>{await Promise.all([this.on("disconnected",(e=>{Dt.ChannelClient.handleProviderDisconnect(e)})),this.on("connected",((...e)=>{Gt(this,Tt,"f").emit("connected",...e)}))]).catch((()=>new Error("error setting up channel connection listeners")))}))),Bt(this,Lt,new Ut.ConnectionManager(e),"f")}async getAllChannels(){return this.wire.sendAction("get-all-channels").then((({payload:e})=>e.data))}async onChannelConnect(e){await this.on("connected",e)}async onChannelDisconnect(e){await this.on("disconnected",e)}async safeConnect(e,t,n){const i={count:0};do{let r=()=>{};const o=new Promise((t=>{r=n=>{e===n.channelName&&t(!0)},Gt(this,Tt,"f").on("connected",r)}));try{if(i.count>0){i.gotConnectedEvent=await Promise.race([zt(i.count),o]);const t=await this.wire.sendAction("connect-to-channel",{...n,retryInfo:i});return console.log(`Successfully connected to channelName: ${e}`),t.payload.data}const t=this.wire.sendAction("connect-to-channel",n);i.originalMessageId=t.messageId;return(await t).payload.data}catch(n){if(!n.message.includes("internal-nack"))throw n;t&&0===i.count&&console.warn(`No channel found for channelName: ${e}. Waiting for connection...`)}finally{i.count+=1,Gt(this,Tt,"f").removeListener("connected",r)}}while(t);throw new Error(`No channel found for channelName: ${e}.`)}async connect(e,t={}){if(await Gt(this,$t,"f").getValue(),!e||"string"!=typeof e)throw new Error("Please provide a channelName string to connect to a channel.");const n={wait:!0,...this.wire.environment.getDefaultChannelOptions().connect,...t},{offer:i,rtc:r}=await Gt(this,Lt,"f").createClientOffer(n);let o;(this.fin.me.isFrame||this.fin.me.isView||this.fin.me.isWindow)&&(o=(await this.fin.me.getInfo()).url);const s={channelName:e,...n,offer:i,connectionUrl:o},a=await this.safeConnect(e,n.wait,s),c=await Gt(this,Lt,"f").createClientStrategy(r,a),d=new Dt.ChannelClient(a,(()=>Dt.ChannelClient.wireClose(this.wire,a,a.endpointId)),c);return c.onEndpointDisconnect(a.channelId,(async()=>{try{await d.sendDisconnectAction()}catch(e){console.warn(`Something went wrong during disconnect for client with uuid: ${a.uuid} / name: ${a.name} / endpointId: ${a.endpointId}.`)}finally{Dt.ChannelClient.handleProviderDisconnect(a)}})),d}async create(e,t){if(!e)throw new Error("Please provide a channelName to create a channel");const{payload:{data:n}}=await this.wire.sendAction("create-channel",{channelName:e}),i=Gt(this,Lt,"f").createProvider(t,n);return this.on("client-disconnected",(t=>{t.channelName===e&&Vt.ChannelProvider.handleClientDisconnection(i,t)})),i}}le.Channel=Kt,Lt=new WeakMap,Tt=new WeakMap,$t=new WeakMap,Object.defineProperty(de,"__esModule",{value:!0}),de.InterAppPayload=de.InterApplicationBus=void 0;const qt=t,Jt=d,Yt=he,Zt=le,Qt=O;class Xt extends Jt.Base{constructor(e){super(e),this.events={subscriberAdded:"subscriber-added",subscriberRemoved:"subscriber-removed"},this.refCounter=new Yt.RefCounter,this.Channel=new Zt.Channel(e),this.emitter=new qt.EventEmitter,e.registerMessageHandler(this.onmessage.bind(this)),this.on=this.emitter.on.bind(this.emitter),this.removeAllListeners=this.emitter.removeAllListeners.bind(this.emitter)}async publish(e,t){await this.wire.sendAction("publish-message",{topic:e,message:t,sourceWindowName:this.me.name})}async send(e,t,n){const i=(0,Qt.validateIdentity)(e);if(i)throw new Error(i);await this.wire.sendAction("send-message",{destinationUuid:e.uuid,destinationWindowName:e.name,topic:t,message:n,sourceWindowName:this.me.name})}subscribe(e,t,n){const i=this.createSubscriptionKey(e.uuid,e.name||"*",t);return this.emitter.on(i,n),this.refCounter.actOnFirst(i,(async()=>{await this.wire.sendAction("subscribe",{sourceUuid:e.uuid,sourceWindowName:e.name||"*",topic:t,destinationWindowName:this.me.name})}),(()=>Promise.resolve()))}unsubscribe(e,t,n){const i=e.name||"*",r=this.createSubscriptionKey(e.uuid,i,t);return this.emitter.removeListener(r,n),this.refCounter.actOnLast(r,(async()=>{await this.wire.sendAction("unsubscribe",{sourceUuid:e.uuid,sourceWindowName:i,topic:t,destinationWindowName:this.me.name})}),(()=>new Promise((e=>e)).then((()=>{}))))}processMessage(e){const{payload:{message:t,sourceWindowName:n,sourceUuid:i,topic:r}}=e,o=[this.createSubscriptionKey(i,n,r),this.createSubscriptionKey(i,"*",r),this.createSubscriptionKey("*","*",r)],s={uuid:i,name:n};o.forEach((e=>{this.emitter.emit(e,t,s)}))}emitSubscriverEvent(e,t){const{payload:{targetName:n,uuid:i,topic:r}}=t,o={name:n,uuid:i,topic:r};this.emitter.emit(e,o)}createSubscriptionKey(e,t,n){const i=t||"*";if(!(e&&i&&n))throw new Error("Missing uuid, name, or topic string");return function(...e){return e.map((e=>Buffer.from(`${e}`).toString("base64"))).join("/")}(e,i,n)}onmessage(e){const{action:t}=e;switch(t){case"process-message":this.processMessage(e);break;case this.events.subscriberAdded:this.emitSubscriverEvent(this.events.subscriberAdded,e);break;case this.events.subscriberRemoved:this.emitSubscriverEvent(this.events.subscriberRemoved,e)}return!0}}de.InterApplicationBus=Xt;de.InterAppPayload=class{};var en={};Object.defineProperty(en,"__esModule",{value:!0}),en.Clipboard=void 0;const tn=d;class nn extends tn.Base{async writeText(e){await this.wire.sendAction("clipboard-write-text",e)}async readText(e){const{payload:t}=await this.wire.sendAction("clipboard-read-text",{type:e});return t.data}async writeImage(e){await this.wire.sendAction("clipboard-write-image",e)}async readImage(e={format:"dataURL"}){const{payload:t}=await this.wire.sendAction("clipboard-read-image",e);return t.data}async writeHtml(e){await this.wire.sendAction("clipboard-write-html",e)}async readHtml(e){const{payload:t}=await this.wire.sendAction("clipboard-read-html",{type:e});return t.data}async writeRtf(e){await this.wire.sendAction("clipboard-write-rtf",e)}async readRtf(e){const{payload:t}=await this.wire.sendAction("clipboard-read-rtf",{type:e});return t.data}async write(e){await this.wire.sendAction("clipboard-write",e)}async getAvailableFormats(e){const{payload:t}=await this.wire.sendAction("clipboard-read-formats",{type:e});return t.data}}en.Clipboard=nn;var rn={},on={},sn={};Object.defineProperty(sn,"__esModule",{value:!0}),sn.ExternalApplication=void 0;const an=d;class cn extends an.EmitterBase{constructor(e,t){super(e,"external-application",t.uuid),this.identity=t}getInfo(){return this.wire.sendAction("get-external-application-info",this.identity).then((({payload:e})=>e.data))}}sn.ExternalApplication=cn,Object.defineProperty(on,"__esModule",{value:!0}),on.ExternalApplicationModule=void 0;const dn=d,hn=sn;class ln extends dn.Base{wrap(e){return this.wire.sendAction("external-application-wrap").catch((e=>{})),Promise.resolve(new hn.ExternalApplication(this.wire,{uuid:e}))}wrapSync(e){return this.wire.sendAction("external-application-wrap-sync").catch((e=>{})),new hn.ExternalApplication(this.wire,{uuid:e})}}on.ExternalApplicationModule=ln,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(on,e),n(sn,e)}(rn);var un={},pn={},wn={};Object.defineProperty(wn,"__esModule",{value:!0}),wn._Frame=void 0;const yn=d;class fn extends yn.EmitterBase{constructor(e,t){super(e,"frame",t.uuid,t.name),this.identity=t}getInfo(){return this.wire.sendAction("get-frame-info",this.identity).then((({payload:e})=>e.data))}getParentWindow(){return this.wire.sendAction("get-parent-window",this.identity).then((({payload:e})=>e.data))}}wn._Frame=fn,Object.defineProperty(pn,"__esModule",{value:!0}),pn._FrameModule=void 0;const gn=d,mn=O,vn=wn;class Cn extends gn.Base{async wrap(e){this.wire.sendAction("frame-wrap").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}wrapSync(e){this.wire.sendAction("frame-wrap-sync").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}getCurrent(){return this.wire.sendAction("frame-get-current").catch((e=>{})),Promise.resolve(new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity()))}getCurrentSync(){return this.wire.sendAction("frame-get-current-sync").catch((e=>{})),new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity())}}pn._FrameModule=Cn,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(pn,e),n(wn,e)}(un);var bn={};Object.defineProperty(bn,"__esModule",{value:!0}),bn.GlobalHotkey=void 0;const In=d;class En extends In.EmitterBase{constructor(e){super(e,"global-hotkey")}async register(e,t){await this.on(e,t),await this.wire.sendAction("global-hotkey-register",{hotkey:e})}async unregister(e){await this.removeAllListeners(e),await this.wire.sendAction("global-hotkey-unregister",{hotkey:e})}async unregisterAll(){await Promise.all(this.eventNames().filter((e=>!("registered"===e||"unregistered"===e))).map((e=>this.removeAllListeners(e)))),await this.wire.sendAction("global-hotkey-unregister-all",{})}async isRegistered(e){const{payload:{data:t}}=await this.wire.sendAction("global-hotkey-is-registered",{hotkey:e});return t}}bn.GlobalHotkey=En;var xn,An={},Pn={},Mn={},_n=s&&s.__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)};Object.defineProperty(Mn,"__esModule",{value:!0}),Mn.Platform=void 0;const On=d,Sn=O,Rn=new Map;class Fn extends On.EmitterBase{constructor(e,t){super(t.wire,"application",e.uuid),this.getClient=e=>{this.wire.sendAction("platform-get-client",this.identity).catch((e=>{}));const t=e||this.identity,{uuid:n}=t;if(!Rn.has(n)){const e=_n(this,xn,"f").call(this,n);Rn.set(n,e)}return Rn.get(n)},xn.set(this,(async e=>{try{const t=`custom-frame-${e}`,n=await this._channel.connect(t,{wait:!1});return n.onDisconnection((()=>{Rn.delete(e)})),n}catch(t){throw Rn.delete(e),new Error("The targeted Platform is not currently running. Listen for application-started event for the given Uuid.")}})),this.launchLegacyManifest=this.launchContentManifest;const n=(0,Sn.validateIdentity)(e);if(n)throw new Error(n);this._channel=t,this.identity={uuid:e.uuid},this.Layout=this.fin.Platform.Layout,this.Application=this.fin.Application.wrapSync(this.identity)}async createView(e,t,n){this.wire.sendAction("platform-create-view",this.identity).catch((e=>{}));const i=await this.getClient(),r=await i.dispatch("create-view",{target:t,opts:e,targetView:n});if(!r||(0,Sn.validateIdentity)(r.identity))throw new Error(`When overwriting the createView call, please return an object that has a valid 'identity' property: ${JSON.stringify(r)}`);return this.fin.View.wrapSync(r.identity)}async createWindow(e){this.wire.sendAction("platform-create-window",this.identity).catch((e=>{}));const t=await this.getClient();e.reason||(e.reason="api-call");const n=await t.dispatch("create-view-container",e);if(!n||(0,Sn.validateIdentity)(n.identity))throw new Error(`When overwriting the createWindow call, please return an object that has a valid 'identity' property: ${JSON.stringify(n)}`);const{identity:i}=n,r=this.fin.Window.wrapSync(i);return r.name=i.name,r.uuid=i.uuid,r}async quit(){this.wire.sendAction("platform-quit",this.identity).catch((e=>{}));return(await this.getClient()).dispatch("quit")}async closeView(e){this.wire.sendAction("platform-close-view",this.identity).catch((e=>{}));const t=await this.getClient();await t.dispatch("close-view",{view:e})}async reparentView(e,t){console.warn("Platform.reparentView has been deprecated, please use Platform.createView"),this.wire.sendAction("platform-reparent-view",this.identity).catch((e=>{}));const n={...e,uuid:e.uuid??this.identity.uuid},i=await this.fin.View.wrap(n),r=await i.getOptions();return this.createView(r,t)}async getSnapshot(){this.wire.sendAction("platform-get-snapshot",this.identity).catch((e=>{}));return(await this.getClient()).dispatch("get-snapshot")}async getViewSnapshot(e){return(await this.getClient()).dispatch("get-view-snapshot",{viewIdentity:e})}async applySnapshot(e,t){this.wire.sendAction("platform-apply-snapshot",this.identity).catch((e=>{}));const n="Requested snapshot must be a valid Snapshot object, or a url or filepath to such an object.";let i;if("string"==typeof e)try{i=(await this._channel.wire.sendAction("get-application-manifest",{manifestUrl:e})).payload.data}catch(e){throw new Error(`${n}: ${e}`)}else i=e;if(!i.windows)throw new Error(n);const r=await this.getClient();return await r.dispatch("apply-snapshot",{snapshot:i,options:t}),this}async fetchManifest(e){return(await this.getClient()).dispatch("platform-fetch-manifest",{manifestUrl:e})}async launchContentManifest(e){this.wire.sendAction("platform-launch-content-manifest",this.identity).catch((()=>{}));const t=await this.getClient(),n=await this.fetchManifest(e);return t.dispatch("launch-into-platform",{manifest:n,manifestUrl:e}),this}async setWindowContext(e={},t){if(this.wire.sendAction("platform-set-window-context",this.identity).catch((e=>{})),!e)throw new Error("Please provide a serializable object or string to set the context.");const n=await this.getClient(),{entityType:i}=t?await this.fin.System.getEntityInfo(t.uuid,t.name):this.fin.me;await n.dispatch("set-window-context",{context:e,entityType:i,target:t||{uuid:this.fin.me.uuid,name:this.fin.me.name}})}async getWindowContext(e){this.wire.sendAction("platform-get-window-context",this.identity).catch((e=>{}));const t=await this.getClient(),{entityType:n}=e?await this.fin.System.getEntityInfo(e.uuid,e.name):this.fin.me;return t.dispatch("get-window-context",{target:e||{uuid:this.fin.me.uuid,name:this.fin.me.name},entityType:n})}async closeWindow(e,t={skipBeforeUnload:!1}){this.wire.sendAction("platform-close-window",this.identity).catch((e=>{}));return(await this.getClient()).dispatch("close-window",{windowId:e,options:t})}}Mn.Platform=Fn,xn=new WeakMap;var jn={},kn={},Ln={},Tn={};function $n(e){switch(e){case"columns":case"grid":case"rows":case"tabs":return!0;default:return!1}}Object.defineProperty(Tn,"__esModule",{value:!0}),Tn.overrideFromComposables=Tn.isValidPresetType=void 0,Tn.isValidPresetType=$n,Tn.overrideFromComposables=function(...e){return t=>e.reduceRight(((e,t)=>n=>t(e(n))),(e=>e))(t)},Tn.default={isValidPresetType:$n};var Bn={},Gn={},Wn={};Object.defineProperty(Wn,"__esModule",{value:!0}),Wn.ApiConsumer=void 0;Wn.ApiConsumer=class{constructor(e){this.strategy=e,this.consume=async e=>(await this.strategy.getExposedFunctions(e)).reduce(((t,n)=>({...t,[n.key]:this.strategy.createFunction(n,e)})),{})}};var Hn={},Nn={};Object.defineProperty(Nn,"__esModule",{value:!0}),Nn.expose=Nn.getExposedProperties=void 0;const Dn=Symbol("exposedProperties");Nn.getExposedProperties=e=>e[Dn]||e.prototype[Dn]||[];Nn.expose=e=>(t,n,i)=>{t[Dn]=t[Dn]||[],t[Dn].push({key:n,descriptor:i,options:e})},Object.defineProperty(Hn,"__esModule",{value:!0}),Hn.ApiExposer=void 0;const Un=Nn;Hn.ApiExposer=class{constructor(e){this.strategy=e,this.exposeInstance=async(e,t)=>{const n=(0,Un.getExposedProperties)(e),i=await Promise.all(n.map((async({key:n,options:i})=>({key:n,options:await this.strategy.exposeFunction(e[n].bind(e),{key:n,options:i,meta:t})}))));await this.strategy.exposeMeta(t,i)}}};var Vn={},zn={},Kn={};Object.defineProperty(Kn,"__esModule",{value:!0}),Kn.ChannelsConsumer=void 0;Kn.ChannelsConsumer=class{constructor(e){this.channel=e,this.getExposedFunctions=async e=>{const{id:t}=e,{props:n}=await this.channel.dispatch(`api-meta:${t}`);return n},this.createFunction=e=>(...t)=>{const{action:n}=e.options;return this.channel.dispatch(n,{args:t})}}};var qn={};Object.defineProperty(qn,"__esModule",{value:!0}),qn.ChannelsExposer=void 0;qn.ChannelsExposer=class{constructor(e){this.channelProviderOrClient=e,this.exposeFunction=async(e,t)=>{const{key:n,options:i,meta:r}=t,{id:o}=r,s=`${o}.${i?.action||n}`;return await this.channelProviderOrClient.register(s,(async({args:t})=>e(...t))),{action:s}},this.exposeMeta=async({id:e},t)=>{const n=`api-meta:${e}`;await this.channelProviderOrClient.register(n,(()=>({props:t})))}}},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Kn,e),n(qn,e)}(zn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(zn,e)}(Vn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Wn,e),n(Hn,e),n(Vn,e),n(Nn,e)}(Gn);var Jn={};Object.defineProperty(Jn,"__esModule",{value:!0}),Jn.createRelayedDispatch=exports.relayChannelClientApi_1=Jn.relayChannelClientApi=void 0;const Yn=["no longer connected","RTCDataChannel closed unexpectedly","The client you are trying to dispatch from is disconnected from the target provider"];exports.relayChannelClientApi_1=Jn.relayChannelClientApi=async(e,t)=>{e.register(`relay:${t}`,(({action:t,target:n,payload:i})=>e.dispatch(n,t,i))),await Promise.resolve()};Jn.createRelayedDispatch=(e,t,n,i)=>async(r,o)=>{try{return await e.dispatch(`relay:${n}`,{action:r,payload:o,target:t})}catch(e){if(s=e.message,Yn.some((e=>s.includes(e)))&&i)throw new Error(i);throw e}var s};var Zn,Qn,Xn,ei=s&&s.__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},ti=s&&s.__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)};Object.defineProperty(Bn,"__esModule",{value:!0}),Bn.ColumnOrRow=Bn.TabStack=Bn.LayoutNode=void 0;const ni=Gn,ii=Jn;class ri{constructor(e,t){Zn.set(this,void 0),this.isRoot=()=>ti(this,Zn,"f").isRoot(this.entityId),this.exists=()=>ti(this,Zn,"f").exists(this.entityId),this.getParent=async()=>{const e=await ti(this,Zn,"f").getParent(this.entityId);if(e)return ri.getEntity(e,ti(this,Zn,"f"))},this.createAdjacentStack=async(e,t)=>{const n=await ti(this,Zn,"f").createAdjacentStack(this.entityId,e,t);return ri.getEntity({entityId:n,type:"stack"},ti(this,Zn,"f"))},this.getAdjacentStacks=async e=>(await ti(this,Zn,"f").getAdjacentStacks({targetId:this.entityId,edge:e})).map((e=>ri.getEntity({type:"stack",entityId:e.entityId},ti(this,Zn,"f")))),ei(this,Zn,e,"f"),this.entityId=t}}Bn.LayoutNode=ri,Zn=new WeakMap,ri.newLayoutEntitiesClient=async(e,t,n)=>{const i=(0,ii.createRelayedDispatch)(e,n,"layout-relay","You are trying to interact with a layout component on a window that does not exist or has been destroyed.");return new ni.ApiConsumer(new ni.ChannelsConsumer({dispatch:i})).consume({id:t})},ri.getEntity=(e,t)=>{const{entityId:n,type:i}=e;switch(i){case"column":case"row":return new si(t,n,i);case"stack":return new oi(t,n);default:throw new Error(`Unrecognised Layout Entity encountered ('${JSON.stringify(e)})`)}};class oi extends ri{constructor(e,t){super(e,t),Qn.set(this,void 0),this.type="stack",this.getViews=()=>ti(this,Qn,"f").getStackViews(this.entityId),this.addView=async(e,t={index:0})=>ti(this,Qn,"f").addViewToStack(this.entityId,e,t),this.removeView=async e=>{await ti(this,Qn,"f").removeViewFromStack(this.entityId,e)},this.setActiveView=async e=>{await ti(this,Qn,"f").setStackActiveView(this.entityId,e)},ei(this,Qn,e,"f")}}Bn.TabStack=oi,Qn=new WeakMap;class si extends ri{constructor(e,t,n){super(e,t),Xn.set(this,void 0),this.getContent=async()=>(await ti(this,Xn,"f").getContent(this.entityId)).map((e=>ri.getEntity(e,ti(this,Xn,"f")))),ei(this,Xn,e,"f"),this.type=n}}Bn.ColumnOrRow=si,Xn=new WeakMap;var ai={};Object.defineProperty(ai,"__esModule",{value:!0}),ai.DEFAULT_LAYOUT_KEY=ai.LAYOUT_CONTROLLER_ID=void 0,ai.LAYOUT_CONTROLLER_ID="layout-entities",ai.DEFAULT_LAYOUT_KEY="__default__";var ci,di,hi,li=s&&s.__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)};Object.defineProperty(Ln,"__esModule",{value:!0}),Ln.Layout=void 0;const ui=G,pi=O,wi=d,yi=Tn,fi=Bn,gi=ai;class mi extends wi.Base{static getClient(e){return li(e,di,"f").getValue()}constructor(e,t){super(t),ci.add(this),di.set(this,new ui.Lazy((async()=>fi.LayoutNode.newLayoutEntitiesClient(await this.platform.getClient(),gi.LAYOUT_CONTROLLER_ID,this.identity)))),this.replace=async e=>{this.wire.sendAction("layout-replace").catch((e=>{}));const t=await this.platform.getClient();await t.dispatch("replace-layout",{target:this.identity,opts:{layout:e}})},this.replaceView=async(e,t)=>{this.wire.sendAction("layout-replace-view").catch((e=>{}));const n=await this.platform.getClient();await n.dispatch("replace-view",{target:this.identity,opts:{viewToReplace:e,newView:t}})},this.applyPreset=async e=>{this.wire.sendAction("layout-apply-preset").catch((e=>{}));const t=await this.platform.getClient(),{presetType:n}=e;if(!n||!(0,yi.isValidPresetType)(n))throw new Error("Cannot apply preset layout, please include an applicable presetType property in the PresetLayoutOptions.");await t.dispatch("apply-preset-layout",{target:this.identity,opts:{presetType:n}})};const n=(0,pi.validateIdentity)(e);if(n)throw new Error(n);this.identity=e,this.platform=this.fin.Platform.wrapSync({uuid:e.uuid}),e.uuid===this.fin.me.uuid&&e.name===this.fin.me.name&&(this.init=this.fin.Platform.Layout.init)}async getConfig(){this.wire.sendAction("layout-get-config").catch((e=>{}));return(await this.platform.getClient()).dispatch("get-frame-snapshot",{target:this.identity})}async getCurrentViews(){this.wire.sendAction("layout-get-views").catch((e=>{}));const e=await this.platform.getClient();return(await e.dispatch("get-layout-views",{target:this.identity})).map((e=>this.fin.View.wrapSync(e)))}async getRootItem(){this.wire.sendAction("layout-get-root-item").catch((()=>{}));const e=await li(this,di,"f").getValue(),t=await e.getRoot("layoutName"in this.identity?this.identity:void 0);return fi.LayoutNode.getEntity(t,e)}async getStackByViewIdentity(e){this.wire.sendAction("layout-get-stack-by-view").catch((()=>{}));const t=await li(this,di,"f").getValue(),n=await t.getStackByView(e);if(!n)throw new Error(`No stack found for view: ${e.uuid}/${e.name}`);return fi.LayoutNode.getEntity(n,t)}async addView(e,{location:t,targetView:n}={}){this.wire.sendAction("layout-add-view").catch((e=>{}));const{identity:i}=await li(this,ci,"m",hi).call(this,"layout-add-view",{viewOptions:e,location:t,targetView:n});return{identity:i}}async closeView(e){this.wire.sendAction("layout-close-view").catch((e=>{})),await li(this,ci,"m",hi).call(this,"layout-close-view",{viewIdentity:e})}}Ln.Layout=mi,di=new WeakMap,ci=new WeakSet,hi=async function(e,t){return(await this.platform.getClient()).dispatch(e,{target:this.identity,opts:t})};var vi,Ci,bi,Ii,Ei,xi=s&&s.__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)},Ai=s&&s.__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};Object.defineProperty(kn,"__esModule",{value:!0}),kn.LayoutModule=void 0;const Pi=d,Mi=Ln,_i=ai;class Oi extends Pi.Base{constructor(){super(...arguments),vi.add(this),Ci.set(this,!1),bi.set(this,null),this.init=async(e={})=>{if(this.wire.sendAction("layout-init").catch((e=>{})),!this.wire.environment.layoutAllowedInContext(this.fin))throw new Error("Layout.init can only be called from a Window context.");if(xi(this,Ci,"f"))throw new Error("Layout.init was already called, please use Layout.create to add additional layouts.");"openfin"===this.wire.environment.type&&await this.fin.Platform.getCurrentSync().getClient(),Ai(this,Ci,!0,"f"),Ai(this,bi,await this.wire.environment.initLayoutManager(this.fin,this.wire,e),"f"),await this.wire.environment.applyLayoutSnapshot(this.fin,xi(this,bi,"f"),e);const t={name:this.fin.me.name,uuid:this.fin.me.uuid};if(!e.layoutManagerOverride){const e={layoutName:_i.DEFAULT_LAYOUT_KEY,...t};return xi(this,Ii,"f").call(this,e)}return this.wrapSync(t)},Ii.set(this,(e=>{const t="[Layout] You are using a deprecated property `layoutManager` - it will throw if you access it starting in v37.",n=new Proxy({},{get(e,n){throw console.warn(`[Layout-mgr-proxy] accessing ${n.toString()}`),new Error(t)}}),i=Object.assign(this.wrapSync(e),{layoutManager:n});return new Proxy(i,{get(e,n){if("layoutManager"===n)throw console.warn(`[Layout-proxy] accessing ${n.toString()}`),new Error(t);return e[n]}})})),this.getCurrentLayoutManagerSync=()=>xi(this,vi,"m",Ei).call(this,"fin.Platform.Layout.getCurrentLayoutManagerSync()"),this.create=async e=>this.wire.environment.createLayout(xi(this,vi,"m",Ei).call(this,"fin.Platform.Layout.create()"),e),this.destroy=async e=>this.wire.environment.destroyLayout(xi(this,vi,"m",Ei).call(this,"fin.Platform.Layout.destroy()"),e)}async wrap(e){return this.wire.sendAction("layout-wrap").catch((e=>{})),new Mi.Layout(e,this.wire)}wrapSync(e){return this.wire.sendAction("layout-wrap-sync").catch((e=>{})),new Mi.Layout(e,this.wire)}async getCurrent(){if(this.wire.sendAction("layout-get-current").catch((e=>{})),"openfin"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error("You are not in a Window context. Only Windows can have a Layout.");const{uuid:e,name:t}=this.fin.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction("layout-get-current-sync").catch((e=>{})),"openfin"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error("You are not in a Window context. Only Windows can have a Layout.");const{uuid:e,name:t}=this.fin.me;return this.wrapSync({uuid:e,name:t})}async getLayoutByViewIdentity(e){this.wire.sendAction("layout-get-by-view-identity").catch((()=>{}));let t=await this.wire.environment.getViewWindowIdentity(this.fin,e);t.identity&&(t=t.identity);try{const n=this.wrapSync(t),i=await Mi.Layout.getClient(n),r=await i.getLayoutIdentityForViewOrThrow(e);return this.wrapSync(r)}catch(n){if(!["No action registered at target for","getLayoutIdentityForViewOrThrow is not a function"].some((e=>n.message.includes(e))))throw n;if(t.uuid===t.name)throw new Error(`View identity ${JSON.stringify(e)} is not attached to any layout in provider window ${JSON.stringify(t)}.`);return this.wrapSync(t)}}}kn.LayoutModule=Oi,Ci=new WeakMap,bi=new WeakMap,Ii=new WeakMap,vi=new WeakSet,Ei=function(e){if(!xi(this,bi,"f"))throw new Error(`You must call init before using the API ${e}`);return xi(this,bi,"f")},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(kn,e),n(Ln,e)}(jn),Object.defineProperty(Pn,"__esModule",{value:!0}),Pn.PlatformModule=void 0;const Si=d,Ri=Mn,Fi=jn;class ji extends Si.Base{constructor(e,t){super(e),this._channel=t,this.Layout=new Fi.LayoutModule(this.wire)}async init(e){if(!fin.__internal_.isPlatform||fin.me.name!==fin.me.uuid)throw new Error("fin.Platform.init should only be called from a custom platform provider running in the main window of the application.");return this.wire.environment.initPlatform(this.fin,e)}async wrap(e){return this.wire.sendAction("platform-wrap").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}wrapSync(e){return this.wire.sendAction("platform-wrap-sync").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}async getCurrent(){return this.wire.sendAction("platform-get-current").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction("platform-get-current-sync").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}start(e){return this.wire.sendAction("platform-start").catch((e=>{})),new Promise((async(t,n)=>{try{const{uuid:n}=e,i=await this.fin.Application._create({...e,isPlatformController:!0});i.once("platform-api-ready",(()=>t(this.wrapSync({uuid:n})))),i._run({uuid:n})}catch(e){n(e)}}))}startFromManifest(e,t){return this.wire.sendAction("platform-start-from-manifest").catch((e=>{})),new Promise((async(n,i)=>{try{const i=await this.fin.Application._createFromManifest(e);i.once("platform-api-ready",(()=>n(this.wrapSync({uuid:i.identity.uuid})))),i._run(t)}catch(e){i(e)}}))}}Pn.PlatformModule=ji,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Pn,e),n(Mn,e)}(An);var ki={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getMe=e.getBaseMe=e.environmentUnsupportedMessage=void 0;const t=J(),n=un,i=ie(),r=rn;function o(e,t,n){return{...{isView:"view"===e,isWindow:"window"===e,isFrame:"iframe"===e,isExternal:"external connection"===e},uuid:t,name:n,entityType:e}}e.environmentUnsupportedMessage="You are not running in OpenFin.",e.getBaseMe=o,e.getMe=function(s){const{uuid:a,name:c,entityType:d}=s.me,h={setContext(){throw new Error(e.environmentUnsupportedMessage)},addContextHandler(){throw new Error(e.environmentUnsupportedMessage)},getContextGroups(){throw new Error(e.environmentUnsupportedMessage)},joinContextGroup(){throw new Error(e.environmentUnsupportedMessage)},removeFromContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getAllClientsInContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getInfoForContextGroup(){throw new Error(e.environmentUnsupportedMessage)}},l="Interop API has not been instantiated. Either connection has failed or you have not declared interop in your config.",u={setContext(){throw new Error(l)},addContextHandler(){throw new Error(l)},getContextGroups(){throw new Error(l)},joinContextGroup(){throw new Error(l)},removeFromContextGroup(){throw new Error(l)},getAllClientsInContextGroup(){throw new Error(l)},getInfoForContextGroup(){throw new Error(l)}},p={eventNames:()=>{throw new Error(e.environmentUnsupportedMessage)},emit:()=>{throw new Error(e.environmentUnsupportedMessage)},listeners:()=>{throw new Error(e.environmentUnsupportedMessage)},listenerCount:()=>{throw new Error(e.environmentUnsupportedMessage)},on:()=>{throw new Error(e.environmentUnsupportedMessage)},addListener:()=>{throw new Error(e.environmentUnsupportedMessage)},once:()=>{throw new Error(e.environmentUnsupportedMessage)},prependListener:()=>{throw new Error(e.environmentUnsupportedMessage)},prependOnceListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeAllListeners:()=>{throw new Error(e.environmentUnsupportedMessage)}};switch(d){case"view":return Object.assign(new t.View(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case"window":return Object.assign(new i._Window(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case"iframe":return Object.assign(new n._Frame(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case"external connection":return Object.assign(new r.ExternalApplication(s,{uuid:a}),o(d,a,c),{interop:u,isOpenFin:!1});default:return{...o(d,a,c),...p,interop:h,isOpenFin:!1}}}}(ki);var Li={},Ti={},$i={};Object.defineProperty($i,"__esModule",{value:!0}),$i.createWarningObject=$i.createUnusableObject=void 0,$i.createUnusableObject=function(e){const t=()=>{throw new Error(e)};return new Proxy({},{apply:t,construct:t,defineProperty:t,deleteProperty:t,get:t,getOwnPropertyDescriptor:t,getPrototypeOf:t,has:t,isExtensible:t,ownKeys:t,preventExtensions:t,set:t,setPrototypeOf:t})},$i.createWarningObject=function(e,t){return new Proxy(t,{get:(...t)=>(console.warn(e),Reflect.get(...t)),set:(...t)=>(console.warn(e),Reflect.set(...t)),getOwnPropertyDescriptor:(...t)=>(console.warn(e),Reflect.getOwnPropertyDescriptor(...t)),ownKeys:(...t)=>(console.warn(e),Reflect.ownKeys(...t))})};var Bi,Gi={},Wi={};var Hi={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.wrapIntentHandler=e.BROKER_ERRORS=e.generateOverrideWarning=e.generateOverrideError=e.wrapContextHandler=e.wrapInTryCatch=e.generateId=void 0;e.generateId=()=>`${Math.random()}${Date.now()}`;e.wrapInTryCatch=(e,t)=>(...n)=>{try{return e(...n)}catch(e){throw new Error((t||"")+e)}};e.wrapContextHandler=(e,t)=>async n=>{try{await e(n)}catch(e){throw console.error(`Error thrown by handler ${t} for context type ${n.type}: ${e}`),e}};e.generateOverrideError=(e,t)=>`You have tried to to use ${e} but ${t} has not been overridden in the Interop Broker. Please override this function. Refer to our documentation for more info.`;e.generateOverrideWarning=(e,t,n,i)=>{const{uuid:r,name:o}=n;return i?`Entity with identity: ${r}/${o} has called ${i} or ${e} but ${t} has not been overridden.`:`Entity with identity: ${r}/${o} has called ${e} but ${t} has not been overridden.`},e.BROKER_ERRORS={fireIntent:(0,e.generateOverrideError)("fireIntent","handleFiredIntent"),fireIntentForContext:(0,e.generateOverrideError)("fireIntentForContext","handleFiredIntentForContext"),getInfoForIntent:(0,e.generateOverrideError)("getInfoForIntent","handleInfoForIntent"),getInfoForIntentsByContext:(0,e.generateOverrideError)("getInfoForIntentsByContext","handleInfoForIntentsByContext"),joinSessionContextGroupWithJoinContextGroup:"The Context Group you have tried to join is a Session Context Group. Custom Context Groups can only be defined by the Interop Broker through code or manifest configuration. Please use joinSessionContextGroup.",fdc3Open:(0,e.generateOverrideError)("fdc3.open","fdc3HandleOpen"),fdc3FindInstances:(0,e.generateOverrideError)("fdc3.findInstances","fdc3HandleFindInstances"),fdc3GetAppMetadata:(0,e.generateOverrideError)("fdc3.getAppMetadata","fdc3HandleGetAppMetadata"),fdc3GetInfo:(0,e.generateOverrideError)("fdc3.getInfo","fdc3HandleGetInfo")};e.wrapIntentHandler=(e,t)=>async n=>{try{return e(n)}catch(e){throw console.error(`Error thrown by handler ${t}: ${e}`),e}}}(Hi);var Ni,Di,Ui={};function Vi(){if(Di)return Gi;Di=1;var e,t,n,r=s&&s.__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},o=s&&s.__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)},a=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Gi,"__esModule",{value:!0}),Gi.InteropBroker=void 0;const c=d,h=a(function(){if(Bi)return Wi;Bi=1,Object.defineProperty(Wi,"__esModule",{value:!0});const e=Cr();return Wi.default=class{constructor(e,t){this.provider=e,this.id=t,this.lastContext=void 0,this.contextGroupMap=new Map,this.clients=new Map,this.registerListeners()}registerListeners(){this.provider.register(`sessionContextGroup:getContext-${this.id}`,this.getCurrentContext.bind(this)),this.provider.register(`sessionContextGroup:setContext-${this.id}`,this.setContext.bind(this)),this.provider.register(`sessionContextGroup:handlerAdded-${this.id}`,this.handlerAdded.bind(this)),this.provider.register(`sessionContextGroup:handlerRemoved-${this.id}`,this.handlerRemoved.bind(this))}getCurrentContext(e){return e.type?this.contextGroupMap.get(e.type):this.lastContext}setContext(t,n){const{context:i}=t,r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name} not in Session Client State Map`);this.contextGroupMap.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{e.contextHandlers.get(i.type)?.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getClientState(e){return this.clients.get(e.endpointId)}async handlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(i){const e=r.contextHandlers.get(i)||[];r.contextHandlers.set(i,[...e,n]);const o=this.contextGroupMap.get(i);o&&await this.provider.dispatch(t,n,o)}else{r.globalHandler=n;const e=[...this.contextGroupMap.keys()].map((async e=>{const i=this.contextGroupMap.get(e);i&&await this.provider.dispatch(t,n,i)}));await Promise.all(e)}}handlerRemoved(e,t){const{handlerId:n}=e,i=this.clients.get(t.endpointId);i?(Array.from(i.contextHandlers).forEach((([,e])=>{const t=e.indexOf(n);t>-1&&e.splice(t,1)})),i.globalHandler===n&&(i.globalHandler=void 0)):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={contextHandlers:new Map,clientIdentity:e,globalHandler:void 0};this.clients.set(e.endpointId,t)}}onDisconnection(e){this.clients.delete(e.endpointId)}},Wi}()),l=Hi,u=a(i),p=function(){if(Ni)return Ui;Ni=1,Object.defineProperty(Ui,"__esModule",{value:!0}),Ui.PrivateChannelProvider=void 0;const e=Vi();return Ui.PrivateChannelProvider=class t{constructor(e,t){this.provider=e,this.id=t,this.clients=new Map,this.registerListeners(),this.contextByContextType=new Map,this.lastContext=void 0,this.provider.onConnection((e=>this.registerNewClient(e))),this.provider.onDisconnection((async e=>{const{endpointId:t}=e;this.clients.has(t)&&await this.handleClientDisconnecting(e),0===(await this.provider.getAllClientInfo()).length&&this.provider.destroy()}))}getClientState(e){return this.clients.get(e.endpointId)}registerListeners(){this.provider.register("broadcast",this.broadcast.bind(this)),this.provider.register("getCurrentContext",this.getCurrentContext.bind(this)),this.provider.register("contextHandlerAdded",this.contextHandlerAdded.bind(this)),this.provider.register("contextHandlerRemoved",this.contextHandlerRemoved.bind(this)),this.provider.register("nonStandardHandlerRemoved",this.nonStandardHandlerRemoved.bind(this)),this.provider.register("onAddContextHandlerAdded",this.onAddContextHandlerAdded.bind(this)),this.provider.register("onDisconnectHandlerAdded",this.onDisconnectHandlerAdded.bind(this)),this.provider.register("onUnsubscribeHandlerAdded",this.onUnsubscribeHandlerAdded.bind(this)),this.provider.register("clientDisconnecting",((e,t)=>{this.handleClientDisconnecting(t)}))}broadcast(t,n){const{context:i}=t;if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name}, tried to call broadcast, is not connected to this Private Channel`);const r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to broadcast - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);this.contextByContextType.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{const t=e.handlerIdsByContextTypes.get(i.type);t&&t.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getCurrentContext(e,t){const{contextType:n}=e;if(!this.getClientState(t))throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call getCurrentContext, is not connected to this Private Channel`);if(void 0!==n){return this.contextByContextType.get(n)||null}return this.lastContext?this.lastContext:null}contextHandlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call addContextListener, is not connected to this Private Channel`);if(i){const e=r.handlerIdsByContextTypes.get(i)||[];r.handlerIdsByContextTypes.set(i,[...e,n])}else r.globalHandler=n;Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&e.onAddContextListenerHandlerId&&this.provider.dispatch(e.clientIdentity,e.onAddContextListenerHandlerId,i)}))}async contextHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);if(i){let e;if(i.globalHandler===n)i.globalHandler=void 0;else for(const[t,r]of i.handlerIdsByContextTypes){const i=r.indexOf(n);i>-1&&(r.splice(i,1),e=t)}const r=(await this.getConnectedClients()).map((async n=>{const{clientIdentity:i,clientIdentity:{endpointId:r},onUnsubscribeHandlerId:o}=n;r!==t.endpointId&&o&&await this.provider.dispatch(i,o,e)}));try{await Promise.all(r)}catch(e){throw console.error(`Problem when attempting to dispatch to onUnsubscribeHandlers. Error: ${e} Removing Client: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}`),new Error(e)}}else console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}.`)}nonStandardHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);i?i.onDisconnectHandlerId===n?i.onDisconnectHandlerId=void 0:i.onAddContextListenerHandlerId===n?i.onAddContextListenerHandlerId=void 0:i.onUnsubscribeHandlerId===n&&(i.onUnsubscribeHandlerId=void 0):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}onAddContextHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onAddContextListener, is not connected to this Private Channel`);n.onAddContextListenerHandlerId=i,Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&Array.from(e.handlerIdsByContextTypes.keys()).forEach((e=>{this.provider.dispatch(t,i,e)}))}))}onDisconnectHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onDisconnect, is not connected to this Private Channel`);n.onDisconnectHandlerId=i}onUnsubscribeHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onUnsubscribe, is not connected to this Private Channel`);n.onUnsubscribeHandlerId=i}removeClient(e){const t=this.getClientState(e);if(!t)throw new Error(`Client with Identity: ${e.uuid} ${e.name}, tried to call disconnect, is not connected to this Private Channel`);t.handlerIdsByContextTypes.clear(),this.clients.delete(e.endpointId)}async fireOnDisconnectForOtherClients(e){const{endpointId:t}=e,n=(await this.getConnectedClients()).map((async e=>{const{clientIdentity:{endpointId:n},onDisconnectHandlerId:i}=e;n!==t&&i&&await this.provider.dispatch(e.clientIdentity,i)}));try{await Promise.all(n)}catch(t){throw console.error(`Problem when attempting to dispatch to onDisconnectHandlers. Error: ${t} Disconnecting Client: uuid: ${e.uuid}. name: ${e.name}. endpointId: ${e.endpointId}`),new Error(t)}}async unsubscribeAll(e){const{endpointId:t}=e,n=this.clients.get(t);if(n){const t=Array.from(n.handlerIdsByContextTypes.values()).flat(),i=n.globalHandler;if(t.length>0){const n=t.map((async t=>this.contextHandlerRemoved({handlerId:t},e)));try{await Promise.all(n)}catch(e){console.error(e.message)}}if(i)try{await this.contextHandlerRemoved({handlerId:i},e)}catch(e){console.error(e.message)}}}async handleClientDisconnecting(e){await this.unsubscribeAll(e),this.removeClient(e),await this.fireOnDisconnectForOtherClients(e)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={clientIdentity:e,handlerIdsByContextTypes:new Map,globalHandler:void 0,onAddContextListenerHandlerId:void 0,onUnsubscribeHandlerId:void 0,onDisconnectHandlerId:void 0};this.clients.set(e.endpointId,t)}}async getConnectedClients(){const e=await this.provider.getAllClientInfo();return Array.from(this.clients.values()).filter((t=>{const{uuid:n,name:i}=t.clientIdentity;return e.some((e=>i===e.name&&n===e.uuid))}))}static init(e,n){return new t(e,n)}},Ui}(),w=G,y=[{id:"green",displayMetadata:{color:"#00CC88",name:"green"}},{id:"purple",displayMetadata:{color:"#8C61FF",name:"purple"}},{id:"orange",displayMetadata:{color:"#FF8C4C",name:"orange"}},{id:"red",displayMetadata:{color:"#FF5E60",name:"red"}},{id:"pink",displayMetadata:{color:"#FF8FB8",name:"pink"}},{id:"yellow",displayMetadata:{color:"#E9FF8F",name:"yellow"}}];let f=class i extends c.Base{constructor(i,s,a){super(i),e.set(this,void 0),t.set(this,void 0),n.set(this,void 0),this.getProvider=()=>o(this,n,"f").getValue(),this.interopClients=new Map,this.contextGroupsById=new Map,r(this,t,a.contextGroups??[...y],"f"),r(this,e,a.fdc3Info,"f"),a?.logging&&(this.logging=a.logging),this.intentClientMap=new Map,this.lastContextMap=new Map,this.sessionContextGroupMap=new Map,r(this,n,new w.Lazy(s),"f"),this.setContextGroupMap(),this.setupChannelProvider()}static createClosedConstructor(...e){return class extends i{constructor(...t){if(t.length){const[n,i,r]=t;if(r&&"object"==typeof r&&!(0,u.default)(r,e[2]))return console.warn("You have modified the parameters of the InteropOverride constructor. This behavior is deprecated and will be removed in a future version. You can modify these options in your manifest. Please consult our Interop docs for guidance on migrating to the new override scheme."),void super(e[0],e[1],r);console.warn("You are attempting to pass arguments to the InteropOverride constructor. This is not necessary, and these passed arguments will be ignored. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.")}super(...e)}}}setContext({context:e},t){this.wire.sendAction("interop-broker-set-context").catch((e=>{}));const n=this.getClientState(t);if(!n||!n.contextGroupId)throw n?new Error("You must join a context group before you can set context."):new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);{const{contextGroupId:t}=n;this.setContextForGroup({context:e},t)}}setContextForGroup({context:e},t){this.wire.sendAction("interop-broker-set-context-for-group").catch((e=>{}));const n=this.contextGroupsById.get(t);if(!n)throw new Error(`Unable to set context for context group that isn't in the context group mapping: ${t}.`);const r=i.checkContextIntegrity(e);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(e)}`);const o=e.type;n.set(o,e),this.lastContextMap.set(t,o);Array.from(this.interopClients.values()).filter((e=>e.contextGroupId===t)).forEach((t=>{for(const[,n]of t.contextHandlers)i.isContextTypeCompatible(o,n.contextType)&&this.invokeContextHandler(t.clientIdentity,n.handlerId,e)}))}getCurrentContext(e,t){this.wire.sendAction("interop-broker-get-current-context").catch((e=>{}));const n=this.getClientState(t);if(!n?.contextGroupId)throw new Error("You must be a member of a context group to call getCurrentContext");const{contextGroupId:i}=n,r=this.contextGroupsById.get(i),o=this.lastContextMap.get(i),s=e?.contextType??o;return r&&s?r.get(s):void 0}async joinContextGroup({contextGroupId:e,target:t},n){if(this.wire.sendAction("interop-broker-join-context-group").catch((e=>{})),this.sessionContextGroupMap.has(e))throw new Error(l.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup);if(t){i.hasEndpointId(t)&&await this.addClientToContextGroup({contextGroupId:e},t);try{const n=this.channel.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name));if(!n.length)throw new Error(`Given Identity ${t.uuid} ${t.name} is not connected to the Interop Broker.`);n.length>1&&console.warn(`More than one connection found for identity ${t.uuid} ${t.name}`);const i=[];for(const t of n)i.push(this.addClientToContextGroup({contextGroupId:e},t));await Promise.all(i)}catch(e){throw new Error(e)}}else await this.addClientToContextGroup({contextGroupId:e},n)}async addClientToContextGroup({contextGroupId:e},t){this.wire.sendAction("interop-broker-add-client-to-context-group").catch((e=>{}));const n=this.getClientState(t);if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(!this.getContextGroups().find((t=>t.id===e)))throw new Error(`Attempting to join a context group that does not exist: ${e}. You may only join existing context groups.`);if(n.contextGroupId!==e){n.contextGroupId=e,await this.setCurrentContextGroupInClientOptions(t,e);const i=this.contextGroupsById.get(e);for(const[,e]of n.contextHandlers){const{contextType:n,handlerId:r}=e;if(void 0===n)i.forEach(((e,n)=>{this.invokeContextHandler(t,r,e)}));else if(i.has(n)){const e=i.get(n);e&&this.invokeContextHandler(t,r,e)}}}}async removeFromContextGroup({target:e},t){if(this.wire.sendAction("interop-broker-remove-from-context-group").catch((e=>{})),e){i.hasEndpointId(e)&&await this.removeClientFromContextGroup(e);try{const t=this.channel.connections.filter((t=>t.uuid===e.uuid&&t.name===e.name));if(!t.length)throw new Error(`No connection found for given Identity ${e.uuid} ${e.name}`);t.length>1&&console.warn(`More than one connection found for identity ${e.uuid} ${e.name}`);const n=[];for(const e of t)n.push(this.removeClientFromContextGroup(e));await Promise.all(n)}catch(e){throw new Error(e)}}else await this.removeClientFromContextGroup(t)}async removeClientFromContextGroup(e){this.wire.sendAction("interop-broker-remove-client-from-context-group").catch((e=>{}));const t=this.getClientState(e);t&&(t.contextGroupId=void 0),await this.setCurrentContextGroupInClientOptions(e,null)}getContextGroups(){return this.wire.sendAction("interop-broker-get-context-groups").catch((e=>{})),o(this,t,"f").map((e=>({...e})))}getInfoForContextGroup({contextGroupId:e}){return this.wire.sendAction("interop-broker-get-info-for-context-group").catch((e=>{})),this.getContextGroups().find((t=>t.id===e))}getAllClientsInContextGroup({contextGroupId:e}){this.wire.sendAction("interop-broker-get-all-clients-in-context-group").catch((e=>{}));return Array.from(this.interopClients.values()).filter((t=>t.contextGroupId===e)).map((e=>e.clientIdentity))}async handleFiredIntent(e,t){const n=(0,l.generateOverrideWarning)("fdc3.raiseIntent","InteropBroker.handleFiredIntent",t,"interopClient.fireIntent");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntent)}async setIntentTarget(e,t){this.wire.sendAction("interop-broker-set-intent-target").catch((e=>{}));const n=this.intentClientMap.get(t.name),i=`intent-handler-${e.name}`;if(n){const t=n.get(i);if(t){if(t.pendingIntents.push(e),t.clientIdentity&&t.isReady){const{clientIdentity:e,pendingIntents:n}=t;try{const r=n[n.length-1];await this.invokeIntentHandler(e,i,r),t.pendingIntents=[]}catch(n){console.error(`Error invoking intent handler for client ${e.uuid}/${e.name}/${e.endpointId}`),t.isReady=!1}}}else n.set(i,{isReady:!1,pendingIntents:[e]})}else{this.intentClientMap.set(t.name,new Map);const n=this.intentClientMap.get(t.name);n&&n.set(i,{isReady:!1,pendingIntents:[e]})}}async handleInfoForIntent(e,t){const n=(0,l.generateOverrideWarning)("fdc3.findIntent","InteropBroker.handleInfoForIntent",t,"interopClient.getInfoForIntent");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntent)}async handleInfoForIntentsByContext(e,t){const n=(0,l.generateOverrideWarning)("fdc3.findIntentsByContext","InteropBroker.handleInfoForIntentsByContext",t,"interopClient.getInfoForIntentsByContext");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntentsByContext)}async handleFiredIntentForContext(e,t){const n=(0,l.generateOverrideWarning)("fdc3.raiseIntentForContext","InteropBroker.handleFiredIntentForContext",t,"interopClient.fireIntentForContext");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntentForContext)}async clientDisconnected(e){}async fdc3HandleOpen({app:e,context:t},n){const i=(0,l.generateOverrideWarning)("fdc3.open","InteropBroker.fdc3HandleOpen",n);throw console.warn(i),new Error(l.BROKER_ERRORS.fdc3Open)}async fdc3HandleFindInstances(e,t){const n=(0,l.generateOverrideWarning)("fdc3.open","InteropBroker.fdc3HandleFindInstances",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3FindInstances)}async fdc3HandleGetAppMetadata(e,t){const n=(0,l.generateOverrideWarning)("fdc3.getAppMetadata","InteropBroker.fdc3HandleGetAppMetadata",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3GetAppMetadata)}async invokeContextHandler(e,t,n){const i=await this.getProvider();try{await i.dispatch(e,t,n)}catch(i){console.error(`Error invoking context handler ${t} for context type ${n.type} in client ${e.uuid}/${e.name}/${e.endpointId}`,i)}}async invokeIntentHandler(e,t,n){const i=await this.getProvider();await i.dispatch(e,t,n)}async fdc3HandleGetInfo(t,n){const{fdc3Version:i}=t;return{fdc3Version:i,...o(this,e,"f"),optionalFeatures:{OriginatingAppMetadata:!1,UserChannelMembershipAPIs:!0},appMetadata:{appId:"",instanceId:""}}}async getAllClientInfo(){return(await this.getProvider()).getAllClientInfo()}decorateSnapshot(e){return{...e,interopSnapshotDetails:{contextGroupStates:this.getContextGroupStates()}}}applySnapshot(e,t){const n=e?.interopSnapshotDetails?.contextGroupStates;n&&(t?.closeExistingWindows||this.updateExistingClients(n),this.rehydrateContextGroupStates(n))}updateExistingClients(e){this.interopClients.forEach((t=>{const{clientIdentity:n,contextGroupId:r,contextHandlers:o}=t;if(r){const t=e[r];for(const[,e]of Object.entries(t))o.forEach((t=>{const{handlerId:r,contextType:o}=t;i.isContextTypeCompatible(e.type,o)&&this.invokeContextHandler(n,r,e)}))}}))}getContextGroupStates(){return i.toObject(this.contextGroupsById)}rehydrateContextGroupStates(e){const t=Object.entries(e);for(const[e,n]of t){const t=Object.entries(n);for(const[n,i]of t)if(this.contextGroupsById.has(e)){this.contextGroupsById.get(e).set(n,i)}else console.warn(`Attempting to set a context group that isn't in the context group mapping. Skipping context group rehydration for: ${e}`)}}contextHandlerRegistered({contextType:e,handlerId:t},n){const i={contextType:e,handlerId:t},r=this.getClientState(n);if(r?.contextHandlers.set(t,i),r&&r.contextGroupId){const{contextGroupId:i}=r,o=this.contextGroupsById.get(i);if(void 0===e)o.forEach(((e,i)=>{this.invokeContextHandler(n,t,e)}));else if(o.has(e)){const i=o.get(e);i&&this.invokeContextHandler(n,t,i)}}}async intentHandlerRegistered(e,t){const{handlerId:n}=e,i=this.intentClientMap.get(t.name),r=i?.get(n);if(i)if(r){const{pendingIntents:e}=r;r.clientIdentity=t,r.isReady=!0;try{if(e.length>0){const i=e[e.length-1];await this.invokeIntentHandler(t,n,i),r.pendingIntents=[]}}catch(e){console.error(`Error invoking intent handler: ${n} for client ${t.uuid}/${t.name}/${t.endpointId}`)}}else i.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t});else{this.intentClientMap.set(t.name,new Map);const e=this.intentClientMap.get(t.name);e&&e.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t})}}removeContextHandler({handlerId:e},t){const n=this.getClientState(t);n&&n.contextHandlers.delete(e)}handleJoinSessionContextGroup({sessionContextGroupId:e},t){try{if(!e)throw new Error("Failed to join session context group: must specify group id.");const n=this.sessionContextGroupMap.get(e);if(n)n.registerNewClient(t);else{const n=new h.default(this.channel,e);n.registerNewClient(t),this.sessionContextGroupMap.set(e,n)}return{hasConflict:this.contextGroupsById.has(e)}}catch(e){throw new Error(e)}}getClientState(e){return this.interopClients.get(e.endpointId)}static toObject(e){const t=Object.fromEntries(e),n={};return Object.entries(t).forEach((([e,t])=>{const i=Object.fromEntries(t);n[e]=i})),n}static checkContextIntegrity(e){if(!e)return{isValid:!1,reason:"No context supplied"};if("object"!=typeof e)return{isValid:!1,reason:"Context must be an Object"};if(!e.type)return{isValid:!1,reason:"Context must have a type property"};if(e.id&&"object"!=typeof e.id)return{isValid:!1,reason:"Context id must be an Object populated with key-value identifiers (if set)"};if(e.id){const{id:t}=e,n=Object.keys(t);let i=!1;if(!n.length)return{isValid:!1,reason:"Context id must have at least one key-value identifier"};if(n.forEach((e=>{"string"==typeof e&&"string"==typeof t[e]||(i=!0)})),i)return{isValid:!1,reason:"Context id key-value identifiers must be of type string"}}return e.name&&"string"!=typeof e.name?{isValid:!1,reason:"Context name must be of string type (if set)"}:{isValid:!0}}static hasEndpointId(e){return void 0!==e.endpointId}static isContextTypeCompatible(e,t){return void 0===t||e===t}setContextGroupMap(){for(const e of this.getContextGroups())this.contextGroupsById.set(e.id,new Map)}async setCurrentContextGroupInClientOptions(e,t){try{const n=await this.fin.System.getEntityInfo(e.uuid,e.name);let i;"view"===n.entityType?i=await this.fin.View.wrap(e):"window"===n.entityType&&(i=await this.fin.Window.wrap(e)),i&&await i.updateOptions({interop:{currentContextGroup:t}})}catch(e){}}async setupChannelProvider(){try{const e=await this.getProvider();this.channel=e,this.wireChannel(e)}catch(e){throw new Error(`Error setting up Interop Broker Channel Provider: ${e}`)}}wireChannel(e){e.onConnection((async(e,t)=>{if(!await this.isConnectionAuthorized(e,t))throw new Error(`Connection not authorized for ${e.uuid}, ${e.name}`);if(!e.endpointId)throw new Error("Version too old to be compatible with Interop. Please upgrade your runtime to a more recent version.");const n={contextGroupId:void 0,contextHandlers:new Map,clientIdentity:e};t?.currentContextGroup&&this.contextGroupsById.has(t.currentContextGroup)&&(n.contextGroupId=t?.currentContextGroup),this.interopClients.set(e.endpointId,n)})),e.onDisconnection((e=>{this.interopClients.delete(e.endpointId);const t=this.intentClientMap.get(e.name);t&&e.uuid===this.fin.me.uuid&&t.forEach((e=>{e.isReady=!1})),this.sessionContextGroupMap.forEach((t=>{t.onDisconnection(e)})),this.clientDisconnected(e)})),e.beforeAction((async(e,t,n)=>{if(!await this.isActionAuthorized(e,t,n))throw new Error(`Action (${e}) not authorized for ${n.uuid}, ${n.name}`);this.logging?.beforeAction?.enabled&&console.log(e,t,n)})),e.afterAction(((e,t,n)=>{this.logging?.afterAction?.enabled&&console.log(e,t,n)})),e.register("setContext",this.setContext.bind(this)),e.register("fireIntent",this.handleFiredIntent.bind(this)),e.register("getCurrentContext",this.getCurrentContext.bind(this)),e.register("getInfoForIntent",this.handleInfoForIntent.bind(this)),e.register("getInfoForIntentsByContext",this.handleInfoForIntentsByContext.bind(this)),e.register("fireIntentForContext",this.handleFiredIntentForContext.bind(this)),e.register("getContextGroups",this.getContextGroups.bind(this)),e.register("joinContextGroup",this.joinContextGroup.bind(this)),e.register("removeFromContextGroup",this.removeFromContextGroup.bind(this)),e.register("getAllClientsInContextGroup",this.getAllClientsInContextGroup.bind(this)),e.register("getInfoForContextGroup",this.getInfoForContextGroup.bind(this)),e.register("contextHandlerRegistered",this.contextHandlerRegistered.bind(this)),e.register("intentHandlerRegistered",this.intentHandlerRegistered.bind(this)),e.register("removeContextHandler",this.removeContextHandler.bind(this)),e.register("sessionContextGroup:createIfNeeded",this.handleJoinSessionContextGroup.bind(this)),e.register("fdc3Open",this.fdc3HandleOpen.bind(this)),e.register("fdc3v2FindIntentsByContext",this.handleInfoForIntentsByContext.bind(this)),e.register("fdc3FindInstances",this.fdc3HandleFindInstances.bind(this)),e.register("fdc3GetAppMetadata",this.fdc3HandleGetAppMetadata.bind(this)),e.register("fdc3v2GetInfo",(async(e,t)=>this.fdc3HandleGetInfo.bind(this)(e,t))),e.register("createPrivateChannelProvider",(async e=>{const{channelId:t}=e,n=await this.fin.InterApplicationBus.Channel.create(t);p.PrivateChannelProvider.init(n,t)}))}isConnectionAuthorized(e,t){return this.wire.sendAction("interop-broker-is-connection-authorized").catch((e=>{})),Promise.resolve(!0)}isActionAuthorized(e,t,n){return this.wire.sendAction("interop-broker-is-action-authorized").catch((e=>{})),Promise.resolve(!0)}};return Gi.InteropBroker=f,e=new WeakMap,t=new WeakMap,n=new WeakMap,Gi}var zi,Ki={},qi={},Ji=s&&s.__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},Yi=s&&s.__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)};Object.defineProperty(qi,"__esModule",{value:!0});const Zi=d,Qi=Hi;class Xi extends Zi.Base{constructor(e,t,n){super(e),zi.set(this,void 0),this.id=n,Ji(this,zi,t,"f")}async setContext(e){this.wire.sendAction("interop-session-context-group-set-context").catch((e=>{}));return(await Yi(this,zi,"f")).dispatch(`sessionContextGroup:setContext-${this.id}`,{sessionContextGroupId:this.id,context:e})}async getCurrentContext(e){this.wire.sendAction("interop-session-context-group-get-context").catch((e=>{}));return(await Yi(this,zi,"f")).dispatch(`sessionContextGroup:getContext-${this.id}`,{sessionContextGroupId:this.id,type:e})}async addContextHandler(e,t){if(this.wire.sendAction("interop-session-context-group-add-handler").catch((e=>{})),"function"!=typeof e)throw new Error("Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");const n=await Yi(this,zi,"f");let i;return i=t?`sessionContextHandler:invoke-${this.id}-${t}-${(0,Qi.generateId)()}`:`sessionContextHandler:invoke-${this.id}`,n.register(i,(0,Qi.wrapContextHandler)(e,i)),await n.dispatch(`sessionContextGroup:handlerAdded-${this.id}`,{handlerId:i,contextType:t}),{unsubscribe:await this.createUnsubscribeCb(i)}}async createUnsubscribeCb(e){const t=await Yi(this,zi,"f");return async()=>{t.remove(e),await t.dispatch(`sessionContextGroup:handlerRemoved-${this.id}`,{handlerId:e})}}getUserInstance(){return{id:this.id,setContext:(0,Qi.wrapInTryCatch)(this.setContext.bind(this),"Failed to set context: "),getCurrentContext:(0,Qi.wrapInTryCatch)(this.getCurrentContext.bind(this),"Failed to get context: "),addContextHandler:(0,Qi.wrapInTryCatch)(this.addContextHandler.bind(this),"Failed to add context handler: ")}}}qi.default=Xi,zi=new WeakMap;var er={},tr={},nr={},ir={},rr=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),or=s&&s.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),sr=s&&s.__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)&&rr(t,e,n);return or(t,e),t};Object.defineProperty(ir,"__esModule",{value:!0}),ir.PrivateChannelClient=void 0;const ar=sr(Hi);var cr,dr;function hr(){if(cr)return tr;cr=1;var e,t=s&&s.__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)},n=s&&s.__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},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(tr,"__esModule",{value:!0}),tr.FDC3ModuleBase=void 0;const o=nr,a=Hi,c=wr(),d=r(i);return tr.FDC3ModuleBase=class{get client(){return t(this,e,"f").call(this)}get fin(){return this.wire.getFin()}constructor(t,i){this.wire=i,e.set(this,void 0),n(this,e,t,"f")}async broadcast(e){return this.wire.sendAction("fdc3-broadcast").catch((e=>{})),this.client.setContext(e)}async _open(e,t){this.wire.sendAction("fdc3-open").catch((e=>{}));try{return await c.InteropClient.ferryFdc3Call(this.client,"fdc3Open",{app:e,context:t})}catch(e){const t=e.message===a.BROKER_ERRORS.fdc3Open?"ResolverUnavailable":e.message;throw new Error(t)}}async _getChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:"system",...(0,o.getUnsupportedChannelApis)()})))}async getOrCreateChannel(e){this.wire.sendAction("fdc3-get-or-create-channel").catch((e=>{}));const t=(await this._getChannels()).find((t=>t.id===e));if(t)return{...t,type:"system",...(0,o.getUnsupportedChannelApis)()};try{const t=await this.client.joinSessionContextGroup(e);return(0,o.buildAppChannelObject)(t)}catch(e){throw console.error(e.message),new Error(o.ChannelError.CreationFailed)}}async getSystemChannels(){return this.wire.sendAction("fdc3-get-system-channels").catch((e=>{})),this._getChannels()}async joinChannel(e){this.wire.sendAction("fdc3-join-channel").catch((e=>{}));try{return await this.client.joinContextGroup(e)}catch(e){if(e.message===a.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup?console.error("The Channel you have tried to join is an App Channel. Custom Channels can only be defined by the Interop Broker through code or manifest configuration. Please use getOrCreateChannel."):console.error(e.message),e.message.startsWith("Attempting to join a context group that does not exist"))throw new Error(o.ChannelError.NoChannelFound);throw new Error(o.ChannelError.AccessDenied)}}async getCurrentChannel(){this.wire.sendAction("fdc3-get-current-channel").catch((e=>{}));const e=await this.getCurrentContextGroupInfo();return e?this.buildChannelObject(e):null}async leaveCurrentChannel(){return this.wire.sendAction("fdc3-leave-current-channel").catch((e=>{})),this.client.removeFromContextGroup()}async getCurrentContextGroupInfo(){const e=await this.client.getContextGroups(),t=e.map((async e=>this.client.getAllClientsInContextGroup(e.id))),n=(await Promise.all(t)).findIndex((e=>e.some((e=>{const{uuid:t,name:n}=e;return this.wire.me.uuid===t&&this.wire.me.name===n}))));return e[n]}async buildChannelObject(e){return{...e,type:"system",addContextListener:(...[e,t])=>{let n,i;"function"==typeof e?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),n=e):(n=t,"string"==typeof e&&(i=e));const r=(async()=>{let e=!0;const t=await this.client.getCurrentContext(i);return this.client.addContextHandler(((i,r)=>{if(!e||(e=!1,!(0,d.default)(t,i)))return n(i,r)}),i)})();return{...r,unsubscribe:()=>r.then((e=>e.unsubscribe()))}},broadcast:this.broadcast.bind(this),getCurrentContext:async e=>{const t=await this.client.getCurrentContext(e);return void 0===t?null:t}}}},e=new WeakMap,tr}ir.PrivateChannelClient=class{constructor(e,t){this.id=t,this.client=e,this.listeners=new Map}async broadcast(e){return this.client.dispatch("broadcast",{context:e})}async getCurrentContext(e){return this.client.dispatch("getCurrentContext",{contextType:e})}async addContextListener(e,t){if("function"!=typeof t)throw new Error("Non-function argument passed to the second parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");let n;n=e?`contextHandler:invoke-${this.id}-${e}-${ar.generateId()}`:`contextHandler:invoke-${this.id}-${ar.generateId()}`,this.client.register(n,ar.wrapContextHandler(t,n));const i={unsubscribe:await this.createContextUnsubscribeCb(n)};return this.listeners.set(n,i),await this.client.dispatch("contextHandlerAdded",{handlerId:n,contextType:e}),i}createNonStandardUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch("nonStandardHandlerRemoved",{handlerId:e})}}createContextUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch("contextHandlerRemoved",{handlerId:e})}}onAddContextListener(e){const t=`onContextHandlerAdded:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch("onAddContextHandlerAdded",{handlerId:t}),n}onDisconnect(e){const t=`onDisconnect:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch("onDisconnectHandlerAdded",{handlerId:t}),n}onUnsubscribe(e){const t=`onUnsubscribe:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch("onUnsubscribeHandlerAdded",{handlerId:t}),n}async cleanUpAllSubs(){Array.from(this.listeners.keys()).forEach((e=>{this.client.remove(e),this.listeners.delete(e)}))}async disconnect(){try{await this.client.dispatch("clientDisconnecting"),await this.cleanUpAllSubs(),await this.client.disconnect()}catch(e){throw new Error(e.message)}}},function(e){var t=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.getIntentResolution=e.isChannel=e.isContext=e.connectPrivateChannel=e.buildAppChannelObject=e.buildPrivateChannelObject=e.ChannelError=e.ResultError=e.UnsupportedChannelApiError=e.getUnsupportedChannelApis=void 0;const n=Hi,r=ir,o=t(i);e.getUnsupportedChannelApis=e=>({addContextListener:()=>{throw new a("Channel.addContextListener",e)},broadcast:()=>{throw new a("Channel.broadcast",e)},getCurrentContext:()=>{throw new a("Channel.getCurrentContext",e)}});class a extends Error{constructor(e,t="System"){super(e),this.message=`Calling ${e} on an instance of a ${t} Channel returned by fdc3.get${t}Channels is not supported. If you would like to use a ${t} Channel, please use fdc3.joinChannel, fdc3.addContextListener, and fdc3.broadcast instead.`}}var c,d;e.UnsupportedChannelApiError=a,function(e){e.NoResultReturned="NoResultReturned",e.IntentHandlerRejected="IntentHandlerRejected"}(c=e.ResultError||(e.ResultError={})),(d=e.ChannelError||(e.ChannelError={})).NoChannelFound="NoChannelFound",d.AccessDenied="AccessDenied",d.CreationFailed="CreationFailed";e.buildPrivateChannelObject=e=>{let t=!1;const n=()=>{if(t)throw new Error("Private Channel Client has been disconnected from the Private Channel")};return{id:e.id,type:"private",broadcast:async t=>(n(),e.broadcast(t)),getCurrentContext:async t=>(n(),e.getCurrentContext(t)),addContextListener:async(t,i)=>{n();let r=i,o=t;"function"==typeof t&&(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),r=t,o=null);return e.addContextListener(o,r)},onAddContextListener:t=>(n(),e.onAddContextListener(t)),disconnect:async()=>(n(),t=!0,e.disconnect()),onDisconnect:t=>(n(),e.onDisconnect(t)),onUnsubscribe:t=>(n(),e.onUnsubscribe(t))}};e.buildAppChannelObject=e=>({id:e.id,type:"app",broadcast:e.setContext,getCurrentContext:async t=>{const n=await e.getCurrentContext(t);return void 0===n?null:n},addContextListener:(t,n)=>{let i,r;"function"==typeof t?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),i=t):(i=n,"string"==typeof t&&(r=t));const s=(async()=>{let t=!0;const n=await e.getCurrentContext(r);return e.addContextHandler(((e,r)=>{if(!t||(t=!1,!(0,o.default)(n,e)))return i(e,r)}),r)})();return{...s,unsubscribe:()=>s.then((e=>e.unsubscribe()))}}});e.connectPrivateChannel=async t=>{try{const n=await fin.InterApplicationBus.Channel.connect(t),i=new r.PrivateChannelClient(n,t);return(0,e.buildPrivateChannelObject)(i)}catch(e){throw new Error(`Private Channel with id: ${t} doesn't exist`)}};e.isContext=e=>{if(e&&"object"==typeof e&&"type"in e){const{type:t}=e;return"string"==typeof t}return!1};e.isChannel=e=>{if(e&&"object"==typeof e&&"type"in e&&"id"in e){const{type:t,id:n}=e;return"string"==typeof t&&"string"==typeof n&&("app"===t||"private"===t)}return!1};e.getIntentResolution=async(t,i,r,o)=>{const s=(0,n.generateId)(),a=new Promise(((e,t)=>{fin.InterApplicationBus.subscribe({uuid:"*"},s,(t=>{e(t)})).catch((()=>t(new Error("getResult is not supported in this environment"))))})),d=r?{target:r,intentResolutionResultId:s}:{intentResolutionResultId:s},h=o?{name:o,context:i,metadata:d}:{...i,metadata:d},l=async()=>{let n=await a;if(!n||"object"!=typeof n)throw new Error(c.NoResultReturned);const{error:i}=n;if(i)throw new Error(c.IntentHandlerRejected);if((0,e.isChannel)(n)){const{id:i,type:r}=n;switch(r){case"private":n=await(0,e.connectPrivateChannel)(i);break;case"app":{const r=await t.joinSessionContextGroup(i);n=(0,e.buildAppChannelObject)(r);break}}}else if(!(0,e.isContext)(n))throw new Error(c.NoResultReturned);return n},u=o?await t.fireIntent(h):await t.fireIntentForContext(h);return"object"!=typeof u?{source:{appId:"",instanceId:""},intent:"",version:"2.0",getResult:l}:{...u,getResult:l}}}(nr);var lr,ur,pr={};function wr(){if(ur)return Ki;ur=1;var e,t,n=s&&s.__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},i=s&&s.__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)},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ki,"__esModule",{value:!0}),Ki.InteropClient=void 0;const o=d,a=r(qi),c=function(){if(dr)return er;dr=1,Object.defineProperty(er,"__esModule",{value:!0}),er.Fdc3Module=void 0;const e=Hi,t=hr();class n extends t.FDC3ModuleBase{async open(e,t){await super._open(e,t)}addContextListener(e,t){let n;return this.wire.sendAction("fdc3-add-context-listener").catch((e=>{})),"function"==typeof e?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),n=this.client.addContextHandler(e)):n=this.client.addContextHandler(t,null===e?void 0:e),{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}addIntentListener(e,t){this.wire.sendAction("fdc3-add-intent-listener").catch((e=>{}));const n=this.client.registerIntentHandler((e=>{const{context:n,metadata:i}=e,{metadata:r}=n,o=i?.intentResolutionResultId||r?.intentResolutionResultId;o&&this.fin.InterApplicationBus.publish(o,null).catch((()=>null)),t(e.context)}),e,{fdc3Version:"1.2"});return{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}async raiseIntent(t,n,i){this.wire.sendAction("fdc3-raise-intent").catch((e=>{}));const r=i?{name:t,context:n,metadata:{target:i}}:{name:t,context:n};try{return await this.client.fireIntent(r)}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntent?"ResolverUnavailable":t.message;throw new Error(n)}}async findIntent(t,n){this.wire.sendAction("fdc3-find-intent").catch((e=>{}));try{return await this.client.getInfoForIntent({name:t,context:n})}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntent?"ResolverUnavailable":t.message;throw new Error(n)}}async findIntentsByContext(t){this.wire.sendAction("fdc3-find-intents-by-context").catch((e=>{}));try{return await this.client.getInfoForIntentsByContext(t)}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntentsByContext?"ResolverUnavailable":t.message;throw new Error(n)}}async raiseIntentForContext(t,n){this.wire.sendAction("fdc3-raise-intent-for-context").catch((e=>{}));try{return await this.client.fireIntentForContext({...t,metadata:{target:n}})}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntentForContext?"ResolverUnavailable":t.message;throw new Error(n)}}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}getInfo(){return this.wire.sendAction("fdc3-get-info").catch((e=>{})),{providerVersion:this.wire.environment.getAdapterVersionSync(),provider:`openfin-${this.wire.me.uuid}`,fdc3Version:"1.2"}}}return er.Fdc3Module=n,er}(),h=function(){if(lr)return pr;lr=1,Object.defineProperty(pr,"__esModule",{value:!0}),pr.Fdc3Module2=void 0;const e=hr(),t=Hi,n=wr(),i=nr,r=ir;class o extends e.FDC3ModuleBase{async open(e,t){return"string"==typeof e&&console.warn("Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string })."),super._open(e,t)}async findInstances(e){this.wire.sendAction("fdc3-find-instances").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,"fdc3FindInstances",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3FindInstances?"ResolverUnavailable":e.message;throw new Error(n)}}async getAppMetadata(e){this.wire.sendAction("fdc3-get-app-metadata").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,"fdc3GetAppMetadata",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3GetAppMetadata?"ResolverUnavailable":e.message;throw new Error(n)}}async addContextListener(e,t){this.wire.sendAction("fdc3-add-context-listener").catch((e=>{}));const n=e=>t=>{const{contextMetadata:n,...i}=t,r=n?[{...i},n]:[t,null];e(...r)};let i=t,r=n(i);return"function"==typeof e?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),i=e,r=n(i),this.client.addContextHandler(r)):this.client.addContextHandler(r,null===e?void 0:e)}async findIntent(e,n,i){this.wire.sendAction("fdc3-find-intent").catch((e=>{}));try{return await this.client.getInfoForIntent({name:e,context:n,metadata:{resultType:i}})}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntent?"ResolverUnavailable":e.message;throw new Error(n)}}async findIntentsByContext(e,i){this.wire.sendAction("fdc3-find-intents-by-context").catch((e=>{}));const r=i?{context:e,metadata:{resultType:i}}:e;try{return await n.InteropClient.ferryFdc3Call(this.client,"fdc3v2FindIntentsByContext",r)}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntentsByContext?"ResolverUnavailable":e.message;throw new Error(n)}}async raiseIntent(e,n,r){this.wire.sendAction("fdc3-raise-intent").catch((e=>{}));try{return"string"==typeof r&&console.warn("Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string })."),(0,i.getIntentResolution)(this.client,n,r,e)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?"ResolverUnavailable":e.message;throw new Error(n)}}async raiseIntentForContext(e,n){this.wire.sendAction("fdc3-raise-intent-for-context").catch((e=>{}));try{return"string"==typeof n&&console.warn("Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string })."),(0,i.getIntentResolution)(this.client,e,n)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?"ResolverUnavailable":e.message;throw new Error(n)}}async addIntentListener(e,t){if(this.wire.sendAction("fdc3-add-intent-listener").catch((e=>{})),"string"!=typeof e)throw new Error("First argument must be an Intent name");return this.client.registerIntentHandler((async e=>{let n,i;const{context:r,metadata:o}=e,{contextMetadata:s,metadata:a,...c}=r,d=o?.intentResolutionResultId||a?.intentResolutionResultId;try{const e=a?{metadata:a,...c}:{...c};n=await t(e,s),i=n}catch(e){n=e,i={error:!0}}if(d&&this.fin.InterApplicationBus.publish(d,i).catch((()=>null)),n instanceof Error)throw new Error(n.message);return n}),e,{fdc3Version:"2.0"})}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}async createPrivateChannel(){const e=(0,t.generateId)();await n.InteropClient.ferryFdc3Call(this.client,"createPrivateChannelProvider",{channelId:e});const o=await this.fin.InterApplicationBus.Channel.connect(e),s=new r.PrivateChannelClient(o,e);return(0,i.buildPrivateChannelObject)(s)}async getUserChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:"user",...(0,i.getUnsupportedChannelApis)("User")})))}async getSystemChannels(){return console.warn("This API has been deprecated. Please use fdc3.getUserChannels instead."),super.getSystemChannels()}async joinUserChannel(e){return super.joinChannel(e)}async joinChannel(e){return console.warn("This API has been deprecated. Please use fdc3.joinUserChannel instead."),super.joinChannel(e)}async getCurrentChannel(){const e=await super.getCurrentChannel();return e?{...e,type:"user",broadcast:this.broadcast.bind(this)}:null}async getInfo(){return n.InteropClient.ferryFdc3Call(this.client,"fdc3v2GetInfo",{fdc3Version:"2.0"})}}return pr.Fdc3Module2=o,pr}(),l=Hi;let u=class extends o.Base{constructor(i,r){super(i),e.set(this,void 0),t.set(this,void 0),n(this,t,new Map,"f"),n(this,e,r,"f")}async setContext(t){this.wire.sendAction("interop-client-set-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("setContext",{context:t})}async addContextHandler(t,n){if(this.wire.sendAction("interop-client-add-context-handler").catch((e=>{})),"function"!=typeof t)throw new Error("Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");const r=await i(this,e,"f");let o;o=n?`invokeContextHandler-${n}-${(0,l.generateId)()}`:"invokeContextHandler";const s=(0,l.wrapContextHandler)(t,o);return r.register(o,s),await r.dispatch("contextHandlerRegistered",{handlerId:o,contextType:n}),{unsubscribe:async()=>{r.remove(o),await r.dispatch("removeContextHandler",{handlerId:o})}}}async getContextGroups(){this.wire.sendAction("interop-client-get-context-groups").catch((e=>{}));return(await i(this,e,"f")).dispatch("getContextGroups")}async joinContextGroup(t,n){this.wire.sendAction("interop-client-join-context-group").catch((e=>{}));const r=await i(this,e,"f");if(!t)throw new Error("No contextGroupId specified for joinContextGroup.");return r.dispatch("joinContextGroup",{contextGroupId:t,target:n})}async removeFromContextGroup(t){this.wire.sendAction("interop-client-remove-from-context-group").catch((e=>{}));return(await i(this,e,"f")).dispatch("removeFromContextGroup",{target:t})}async getAllClientsInContextGroup(t){this.wire.sendAction("interop-client-get-all-clients-in-context-group").catch((e=>{}));const n=await i(this,e,"f");if(!t)throw new Error("No contextGroupId specified for getAllClientsInContextGroup.");return n.dispatch("getAllClientsInContextGroup",{contextGroupId:t})}async getInfoForContextGroup(t){this.wire.sendAction("interop-client-get-info-for-context-group").catch((e=>{}));const n=await i(this,e,"f");if(!t)throw new Error("No contextGroupId specified for getInfoForContextGroup.");return n.dispatch("getInfoForContextGroup",{contextGroupId:t})}async fireIntent(t){this.wire.sendAction("interop-client-fire-intent").catch((e=>{}));return(await i(this,e,"f")).dispatch("fireIntent",t)}async registerIntentHandler(t,n,r){this.wire.sendAction("interop-client-register-intent-handler").catch((e=>{}));const o=await i(this,e,"f"),s=`intent-handler-${n}`,a=(0,l.wrapIntentHandler)(t,s);try{await o.register(s,a),await o.dispatch("intentHandlerRegistered",{handlerId:s,...r})}catch(e){throw new Error("Unable to register intent handler")}return{unsubscribe:async()=>{o.remove(s)}}}async getCurrentContext(t){this.wire.sendAction("interop-client-get-current-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("getCurrentContext",{contextType:t})}async getInfoForIntent(t){this.wire.sendAction("interop-client-get-info-for-intent").catch((e=>{}));return(await i(this,e,"f")).dispatch("getInfoForIntent",t)}async getInfoForIntentsByContext(t){this.wire.sendAction("interop-client-get-info-for-intents-by-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("getInfoForIntentsByContext",t)}async fireIntentForContext(t){this.wire.sendAction("interop-client-fire-intent-for-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("fireIntentForContext",t)}async joinSessionContextGroup(n){try{const r=i(this,t,"f").get(n);if(r)return r.getUserInstance();const o=await i(this,e,"f"),{hasConflict:s}=await o.dispatch("sessionContextGroup:createIfNeeded",{sessionContextGroupId:n});s&&console.warn(`A (non-session) context group with the name "${n}" already exists. If you are trying to join a Context Group, call joinContextGroup instead.`);const c=new a.default(this.wire,i(this,e,"f"),n);return i(this,t,"f").set(n,c),c.getUserInstance()}catch(e){throw console.error(`Error thrown trying to create Session Context Group with id "${n}": ${e}`),e}}async onDisconnection(t){this.wire.sendAction("interop-client-add-ondisconnection-listener").catch((e=>{}));return(await i(this,e,"f")).onDisconnection((e=>{const{uuid:n}=e;t({type:"interop-broker",topic:"disconnected",brokerName:n})}))}getFDC3Sync(e){switch(e){case"1.2":return new c.Fdc3Module((()=>this),this.wire);case"2.0":return new h.Fdc3Module2((()=>this),this.wire);default:throw new Error(`Invalid FDC3 version provided: ${e}. Must be '1.2' or '2.0'`)}}async getFDC3(e){return this.getFDC3Sync(e)}static async ferryFdc3Call(t,n,r){return(await i(t,e,"f")).dispatch(n,r||null)}};return Ki.InteropClient=u,e=new WeakMap,t=new WeakMap,Ki}var yr,fr,gr,mr={};function vr(){if(yr)return mr;yr=1,Object.defineProperty(mr,"__esModule",{value:!0}),mr.overrideCheck=mr.checkFDC32Overrides=mr.getDefaultViewFdc3VersionFromAppInfo=void 0;const e=Vi();function t(t){return["fdc3HandleFindInstances","handleInfoForIntent","handleInfoForIntentsByContext","fdc3HandleGetAppMetadata","fdc3HandleGetInfo","fdc3HandleOpen","handleFiredIntent","handleFiredIntentForContext"].filter((n=>t[n]===e.InteropBroker.prototype[n]))}return mr.getDefaultViewFdc3VersionFromAppInfo=function({manifest:e,initialOptions:t}){const n=e?.platform?.defaultViewOptions?.fdc3InteropApi??t.defaultViewOptions?.fdc3InteropApi;return["1.2","2.0"].includes(n??"")?n:void 0},mr.checkFDC32Overrides=t,mr.overrideCheck=function(e,n){if(n&&"2.0"===n){const n=t(e);n.length>0&&console.warn(`WARNING: FDC3 2.0 has been set as a default option for Views in this Platform, but the required InteropBroker APIs for FDC3 2.0 compliance have not all been overridden.\nThe following APIs need to be overridden:\n${n.join("\n")}`)}},mr}function Cr(){return gr||(gr=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),i=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),i(function(){if(fr)return Ti;fr=1;var e=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ti,"__esModule",{value:!0}),Ti.InteropModule=void 0;const t=e(n),i=$i,r=d,o=Vi(),a=wr(),c=vr(),h=Tn,l=e=>new e,u="You have attempted to use or modify InteropBroker parameters, which is not allowed. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.";class p extends r.Base{async init(e,n=l){this.wire.sendAction("interop-init").catch((()=>{}));const r=await this.wire.environment.getInteropInfo(this.wire.getFin()),s=(0,i.createUnusableObject)(u),a=(0,i.createWarningObject)(u,(0,t.default)(r)),d=async()=>{throw new Error(u)},p=o.InteropBroker.createClosedConstructor(this.wire,(()=>this.fin.InterApplicationBus.Channel.create(`interop-broker-${e}`)),r);let w;return w=Array.isArray(n)?new((0,h.overrideFromComposables)(...n)(p))(s,d,a):await n(p,s,d,a),(0,c.overrideCheck)(w,r.fdc3Version),w}connectSync(e,t){return this.wire.sendAction("interop-connect-sync").catch((()=>{})),new a.InteropClient(this.wire,this.wire.environment.whenReady().then((()=>this.fin.InterApplicationBus.Channel.connect(`interop-broker-${e}`,{payload:t}))))}}return Ti.InteropModule=p,Ti}(),e),i(wr(),e),i(Vi(),e)}(Li)),Li}var br={},Ir={},Er={},xr={};Object.defineProperty(xr,"__esModule",{value:!0}),xr.getSnapshotSourceChannelName=void 0;xr.getSnapshotSourceChannelName=e=>`snapshot-source-provider-${e.uuid}`;var Ar,Pr,Mr,_r,Or,Sr=s&&s.__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},Rr=s&&s.__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)};Object.defineProperty(Er,"__esModule",{value:!0}),Er.SnapshotSource=void 0;const Fr=d,jr=xr,kr=new Map;class Lr extends Fr.Base{constructor(e,t){super(e),Ar.set(this,void 0),Pr.set(this,(()=>(kr.has(this.identity.uuid)||kr.set(this.identity.uuid,{eventFired:null,clientPromise:null}),kr.get(this.identity.uuid)))),Mr.set(this,(()=>(Rr(this,Pr,"f").call(this).clientPromise||(Rr(this,Pr,"f").call(this).clientPromise=Rr(this,_r,"f").call(this)),Rr(this,Pr,"f").call(this).clientPromise))),_r.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);try{Rr(this,Pr,"f").call(this).eventFired||await Rr(this,Or,"f").call(this);const t=await this.fin.InterApplicationBus.Channel.connect(e,{wait:!1});return t.onDisconnection((()=>{Rr(this,Pr,"f").call(this).clientPromise=null,Rr(this,Pr,"f").call(this).eventFired=null})),t}catch(e){throw Rr(this,Pr,"f").call(this).clientPromise=null,new Error("The targeted SnapshotSource is not currently initialized. Await this object's ready() method.")}})),Or.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);let t,n;const i=new Promise(((e,i)=>{t=e,n=i}));Rr(this,Pr,"f").call(this).eventFired=i;const r=async i=>{try{i.channelName===e&&(t(),await this.fin.InterApplicationBus.Channel.removeListener("connected",r))}catch(e){n(e)}};await this.fin.InterApplicationBus.Channel.on("connected",r)})),Sr(this,Ar,t,"f")}get identity(){return Rr(this,Ar,"f")}async ready(){this.wire.sendAction("snapshot-source-ready").catch((e=>{}));try{await Rr(this,Mr,"f").call(this)}catch(e){await Rr(this,Pr,"f").call(this).eventFired}}async getSnapshot(){this.wire.sendAction("snapshot-source-get-snapshot").catch((e=>{}));const e=await Rr(this,Mr,"f").call(this),t=await e.dispatch("get-snapshot");return(await t).snapshot}async applySnapshot(e){this.wire.sendAction("snapshot-source-apply-snapshot").catch((e=>{}));return(await Rr(this,Mr,"f").call(this)).dispatch("apply-snapshot",{snapshot:e})}}Er.SnapshotSource=Lr,Ar=new WeakMap,Pr=new WeakMap,Mr=new WeakMap,_r=new WeakMap,Or=new WeakMap,Object.defineProperty(Ir,"__esModule",{value:!0}),Ir.SnapshotSourceModule=void 0;const Tr=d,$r=Er,Br=xr;class Gr extends Tr.Base{async init(e){if(this.wire.sendAction("snapshot-source-init").catch((e=>{})),"object"!=typeof e||"function"!=typeof e.getSnapshot||"function"!=typeof e.applySnapshot)throw new Error("you must pass in a valid SnapshotProvider");const t=await this.fin.InterApplicationBus.Channel.create((0,Br.getSnapshotSourceChannelName)(this.fin.me));t.register("get-snapshot",(async()=>({snapshot:await e.getSnapshot()}))),t.register("apply-snapshot",(({snapshot:t})=>e.applySnapshot(t)))}wrapSync(e){return this.wire.sendAction("snapshot-source-wrap-sync").catch((e=>{})),new $r.SnapshotSource(this.wire,e)}async wrap(e){return this.wire.sendAction("snapshot-source-wrap").catch((e=>{})),this.wrapSync(e)}}Ir.SnapshotSourceModule=Gr,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Ir,e),n(Er,e)}(br),Object.defineProperty(a,"__esModule",{value:!0});var Wr=a.Fin=void 0;const Hr=t,Nr=c,Dr=ie(),Ur=Z(),Vr=de,zr=en,Kr=rn,qr=un,Jr=bn,Yr=J(),Zr=An,Qr=ki,Xr=Cr(),eo=br;class to extends Hr.EventEmitter{constructor(e){super(),this.wire=e,this.System=new Nr.System(e),this.Window=new Dr._WindowModule(e),this.Application=new Ur.ApplicationModule(e),this.InterApplicationBus=new Vr.InterApplicationBus(e),this.Clipboard=new zr.Clipboard(e),this.ExternalApplication=new Kr.ExternalApplicationModule(e),this.Frame=new qr._FrameModule(e),this.GlobalHotkey=new Jr.GlobalHotkey(e),this.Platform=new Zr.PlatformModule(e,this.InterApplicationBus.Channel),this.View=new Yr.ViewModule(e),this.Interop=new Xr.InteropModule(e),this.SnapshotSource=new eo.SnapshotSourceModule(e),e.registerFin(this),this.me=(0,Qr.getMe)(e),e.on("disconnected",(()=>{this.emit("disconnected")}))}}Wr=a.Fin=to;var no={},io={};function ro(e){return"string"==typeof e.manifestUrl}function oo(e){return ao(e)&&"string"==typeof e.address}function so(e){return oo(e)&&"string"==typeof e.token}function ao(e){return"string"==typeof e.uuid}function co(e){return e.runtime&&"string"==typeof e.runtime.version}function ho(e){return ao(e)&&co(e)}Object.defineProperty(io,"__esModule",{value:!0}),io.isInternalConnectConfig=io.isPortDiscoveryConfig=io.isNewConnectConfig=io.isConfigWithReceiver=io.isRemoteConfig=io.isExistingConnectConfig=io.isExternalConfig=void 0,io.isExternalConfig=ro,io.isExistingConnectConfig=oo,io.isRemoteConfig=so,io.isConfigWithReceiver=function(e){return"object"==typeof e.receiver&&so({...e,address:""})},io.isNewConnectConfig=ho,io.isPortDiscoveryConfig=function(e){return ro(e)&&co(e)||ho(e)},io.isInternalConnectConfig=function(e){return oo(e)||ho(e)};var lo={},uo={};Object.defineProperty(uo,"__esModule",{value:!0}),uo.EmitterMap=void 0;const po=t;function wo(e){return Buffer.from(e).toString("base64")}uo.EmitterMap=class{constructor(){this.storage=new Map}hashKeys(e){return e.map(wo).join("/")}getOrCreate(e){const t=this.hashKeys(e);return this.storage.has(t)||this.storage.set(t,new po.EventEmitter),this.storage.get(t)}has(e){return this.storage.has(this.hashKeys(e))}delete(e){const t=this.hashKeys(e);return this.storage.delete(t)}},Object.defineProperty(lo,"__esModule",{value:!0});const yo=uo;class fo extends yo.EmitterMap{constructor(){super(...arguments),this.dispatchEvent=e=>{if(function(e){return"process-desktop-event"===e.action}(e)){const{payload:t}=e,n=function(e){const{topic:t}=e;if("frame"===t||"window"===t||"view"===t){const{uuid:n,name:i}=e;return[t,n,i]}if("application"===t){const{uuid:n}=e;return[t,n]}return[t]}(t);if(this.has(n))return this.getOrCreate(n).emit(t.type,t),!0}return!1}}}lo.default=fo;var go,mo,vo=s&&s.__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},Co=s&&s.__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)},bo=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(no,"__esModule",{value:!0});var Io=no.Transport=void 0;const Eo=t,xo=io,Ao=g,Po=bo(lo),Mo=ki,_o=ke;class Oo extends Eo.EventEmitter{constructor(e,t,n){super(),this.wireListeners=new Map,this.topicRefMap=new Map,this.eventAggregator=new Po.default,this.messageHandlers=[this.eventAggregator.dispatchEvent],go.set(this,void 0),mo.set(this,void 0),this.connectSync=()=>{Co(this,go,"f").connectSync()},this.getPort=()=>Co(this,go,"f").getPort(),vo(this,go,new e(this.onmessage.bind(this)),"f"),this.environment=t,this.sendRaw=Co(this,go,"f").send.bind(Co(this,go,"f")),this.registerMessageHandler(this.handleMessage.bind(this)),Co(this,go,"f").on("disconnected",(()=>{for(const[,{handleNack:e}]of this.wireListeners)e({reason:"Remote connection has closed"});this.wireListeners.clear(),this.emit("disconnected")}));const{uuid:i,name:r}=n,o=this.environment.getCurrentEntityType();this.me=(0,Mo.getBaseMe)(o,i,r)}getFin(){if(!Co(this,mo,"f"))throw new Error("No Fin object registered for this transport");return Co(this,mo,"f")}registerFin(e){if(Co(this,mo,"f"))throw new Error("Fin object has already been registered for this transport");vo(this,mo,e,"f")}shutdown(){return Co(this,go,"f").shutdown()}async connect(e){if((0,xo.isConfigWithReceiver)(e))return await Co(this,go,"f").connect(e.receiver),this.authorize(e);if((0,xo.isRemoteConfig)(e))return this.connectRemote(e);if((0,xo.isExistingConnectConfig)(e))return this.connectByPort(e);if((0,xo.isNewConnectConfig)(e)){const t=await this.environment.retrievePort(e);return this.connectByPort({...e,address:`ws://localhost:${t}`})}}async connectRemote(e){return await Co(this,go,"f").connect(new(this.environment.getWsConstructor())(e.address)),this.authorize(e)}async connectByPort(e){const{address:t,uuid:n}=e,i={...e,type:"file-token"},r=Co(this,go,"f");await r.connect(new(this.environment.getWsConstructor())(e.address));const o=await this.sendAction("request-external-authorization",{uuid:n,type:"file-token"},!0);if("external-authorization-response"!==o.action)throw new Ao.UnexpectedActionError(o.action);return await this.environment.writeToken(o.payload.file,o.payload.token),this.authorize(i)}async authorize(e){const t=await this.sendAction("request-authorization",e,!0);if("authorization-response"!==t.action)throw new Ao.UnexpectedActionError(t.action);if(!0!==t.payload.success)throw new Ao.RuntimeError(t.payload)}sendAction(e,t={},n=!1){let i=()=>{};const r=Ao.RuntimeError.getCallSite(1),o=this.environment.getNextMessageId(),s=new Promise(((s,a)=>{i=a;const c={action:e,payload:t,messageId:o},d=Co(this,go,"f");return this.addWireListener(o,s,(e=>this.nackHandler(e,a,r)),n),d.send(c).catch(a)}));return Object.assign(s,{cancel:i,messageId:o})}nackHandler(e,t,n){t("string"==typeof e?e:new Ao.RuntimeError(e,n))}ferryAction(e){return new Promise(((t,n)=>{const i=this.environment.getNextMessageId();e.messageId=i;const r=e=>{t(e.payload)};return Co(this,go,"f").send(e).then((()=>this.addWireListener(i,r,(e=>this.nackHandler(e,n)),!1))).catch(n)}))}registerMessageHandler(e){this.messageHandlers.push(e)}addWireListener(e,t,n,i){i?this.uncorrelatedListener=t:this.wireListeners.has(e)?n({reason:"Duplicate handler id",error:(0,_o.errorToPOJO)(new Ao.DuplicateCorrelationError(String(e)))}):this.wireListeners.set(e,{resolve:t,handleNack:n})}onmessage(e){for(const t of this.messageHandlers)t.call(null,e)}handleMessage(e){const t=e.correlationId||NaN;if("correlationId"in e){if(!this.wireListeners.has(t))return!1;{const{resolve:n,handleNack:i}=this.wireListeners.get(t);"ack"!==e.action?i({reason:"Did not receive ack action",error:(0,_o.errorToPOJO)(new Ao.NoAckError(e.action))}):"payload"in e?e.payload.success?n.call(null,e):i(e.payload):"string"==typeof e.reason?i(e):(console.warn("Received invalid response from core",e),i({reason:"invalid response shape"})),this.wireListeners.delete(t)}}else this.uncorrelatedListener&&this.uncorrelatedListener.call(null,e),this.uncorrelatedListener=()=>{};return!0}}Io=no.Transport=Oo,go=new WeakMap,mo=new WeakMap;const So=(...e)=>({log:(...t)=>console.debug(`[${(new Date).toISOString()}]`,...(e=>e.map((e=>`[${e}]`)))(e),...t),getLogger:(...t)=>So(...e,...t)}),Ro=So("@openfin/core-web/client");function Fo(e,t){if(!function(e){return"string"==typeof e}(e))throw new Error(`Property ${t} has invalid type. Expected string, got ${typeof e}.`)}const jo="web-broker-ports-ready",ko=Ro.getLogger("get-web-interop-ports");function Lo(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)}function To(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}"function"==typeof SuppressedError&&SuppressedError;const $o=e=>{var n,i,r;return r=class extends t.EventEmitter{constructor(t){super(),n.set(this,void 0),i.set(this,!1),this.connectSync=()=>{Lo(this,i,"f")||(e.addEventListener("message",(e=>{e.data?.topic?.startsWith("wire-message")&&e.data.message&&Lo(this,n,"f").call(this,{...JSON.parse(e.data.message),ports:e.ports})})),e.start())},this.connect=async()=>{this.connectSync()},this.send=t=>(e.postMessage({topic:"wire-message",message:JSON.stringify(t)}),Promise.resolve()),this.shutdown=async()=>{e.close()},To(this,n,t,"f")}getPort(){return e}},n=new WeakMap,i=new WeakMap,r};var Bo={},Go={};Object.defineProperty(Go,"__esModule",{value:!0}),Go.BaseEnvironment=void 0;const Wo=vr();Go.BaseEnvironment=class{async getViewWindowIdentity(e,t){const{identity:n}=await e.View.wrapSync(t).getCurrentWindow();return n}async getInteropInfo(e){const t=await e.Application.getCurrentSync().getInfo().catch((()=>null)),n=t?.initialOptions?.interopBrokerConfiguration??{};return{fdc3Version:t?(0,Wo.getDefaultViewFdc3VersionFromAppInfo)(t):void 0,...n,fdc3Info:{providerVersion:await e.System.getVersion(),provider:"OpenFin"}}}},Object.defineProperty(Bo,"__esModule",{value:!0});var Ho=Bo.BrowserEnvironment=void 0;const No=Go;class Do extends No.BaseEnvironment{constructor(){super(...arguments),this.type="other",this.getRandomId=()=>{const e=new Uint32Array(1);return window.crypto.getRandomValues(e)[0].toString(32)}}getAdapterVersionSync(){return""}observeBounds(e,t){throw new Error("Method not implemented.")}layoutAllowedInContext(e){return!1}initLayoutManager(e,t,n){throw new Error("Method not implemented.")}applyLayoutSnapshot(e,t,n){throw new Error("Method not implemented.")}createLayout(e,t){throw new Error("Method not implemented.")}destroyLayout(e,t){throw new Error("Method not implemented.")}resolveLayout(e,t){throw new Error("Method not implemented.")}initPlatform(...e){throw new Error("Method not implemented.")}writeToken(e,t){return Promise.resolve("")}retrievePort(e){throw new Error("Method not implemented.")}getNextMessageId(){return this.getRandomId()}createChildContent(e){throw new Error("Method not implemented.")}getWebWindow(e){throw new Error("Method not implemented.")}getCurrentEntityIdentity(){throw new Error("Method not implemented.")}getCurrentEntityType(){return"external connection"}raiseEvent(e,t){throw new Error("Method not implemented.")}getUrl(){return location.href}getDefaultChannelOptions(){return{create:{},connect:{}}}getRtcPeer(){return new RTCPeerConnection}getWsConstructor(){return WebSocket}whenReady(){return Promise.resolve()}}Ho=Bo.BrowserEnvironment=Do;const Uo=e=>"platform"in e&&void 0!==e.platform;var Vo,zo;class Ko extends Ho{constructor(e){super(),this.connectConfig=e,Vo.set(this,void 0),zo.set(this,new W((async()=>Promise.resolve().then((function(){return __webpack_require__(/*! ./main-b14f67c9.js */ "./node_modules/@openfin/core-web/out/main-b14f67c9.js")}))))),Uo(e)&&this.validatePlatformOptions(e)}getAdapterVersionSync(){return"0.39.21"}validatePlatformOptions({platform:e}){if(!("layoutSnapshot"in e))throw new Error("Platform options are missing layoutSnapshot. Please provide a layoutSnapshot in the platform options.");if("windows"in e||"windows"in e.layoutSnapshot)throw new Error("It appears you tried to call connect() with a snapshot object from an OpenFin desktop environment. Note that connect() expects to be called with a platform property with this structure: { platform: { layoutSnapshot } }. To get a layoutSnapshot of the expected structure, use fin.Platform.Layout.getCurrentLayoutManagerSync().getLayoutSnapshot() in v34+ in your desktop environment.");const{layouts:t}=e.layoutSnapshot;Object.entries(t).map((([e,t])=>{if("object"!=typeof t||null===t)throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must be an object.`);if(!("content"in t))throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must contain a 'content' property.`)}))}async getInteropInfo(e){return{...{contextGroups:void 0,logging:{beforeAction:{enabled:!1},afterAction:{enabled:!1}}},fdc3Version:void 0,fdc3Info:{providerVersion:"0.39.21",provider:"OpenFin Web"}}}layoutAllowedInContext(e){return!0}async initLayoutManager(e,t,n){if(Lo(this,Vo,"f"))throw new Error("Layout already initialized.");if(!Uo(this.connectConfig))throw new Error("Platform options are missing from connection config.");const{WebLayoutEntryPoint:i}=await Lo(this,zo,"f").getValue();return To(this,Vo,new i(this.connectConfig),"f"),await Lo(this,Vo,"f").initLayoutManager(e,t,n)}async applyLayoutSnapshot(e,t,n){Lo(this,Vo,"f")?.applyLayoutSnapshot(e,t,n)}async createLayout(e,t){return Lo(this,Vo,"f")?.createLayout(e,t)}async destroyLayout(e,t){return Lo(this,Vo,"f")?.destroyLayout(e,t)}async getViewWindowIdentity(e,t){return Promise.resolve({uuid:t.uuid,name:t.uuid})}}Vo=new WeakMap,zo=new WeakMap;const qo=()=>{const e=((e,t)=>{const n=new RegExp(`^${t}<(?.*)>$`).exec(e)?.groups?.meta;if(n)try{return JSON.parse(atob(n))}catch(e){throw new Error(`Failed to decode JSON from ${n}.`)}})(window.name,"of-frame");if(e)try{const{name:t,uuid:n,brokerUrl:i,providerId:r,contextGroup:o}=e;return Fo(i,"brokerUrl"),Fo(n,"uuid"),Fo(t,"name"),{identity:{name:t,uuid:n},brokerUrl:i,interopConfig:{providerId:r,currentContextGroup:o}}}catch(e){throw new Error(`Unexpected error occurred when inferring platform information: ${e.stack}`)}},Jo=()=>{const e=r.v4();return{uuid:e,name:e}},Yo=async e=>{if("enabled"===e.connectionInheritance){const t=await(async e=>{const t=qo();if(t){const{validateOptions:n=(()=>!0)}=e,{identity:i,...r}=t;if(!await n(r))throw new Error("Parent options were rejected by validateOptions.");return t}})(e);if(t)return t}if(!e.options){const t="enabled"===e.connectionInheritance?"Broker URL was not specified nor provided by a platform container.":"Connection inheritance is disabled but no options were provided.";throw new Error(t)}return{...e.options,identity:Jo()}};exports.__classPrivateFieldGet=Lo,exports.__classPrivateFieldSet=To,exports.apiExposer=Gn,exports.commonjsGlobal=s,exports.connect=async t=>{try{Ro.log("Establishing connection",t);const{brokerUrl:n,identity:i,timeout:r,interopConfig:s}=await Yo(t),{workerPort:a,iframeBrokerPort:c}=await(async(e,t,n)=>{const{origin:i}=new URL(e),r=document.createElement("IFRAME");let s;r.style.display="none";try{return await new Promise(((a,c)=>{const d=e=>{if(e.source===r.contentWindow&&e.data?.topic===`ack-${jo}`){if(e.origin!==i)c(new Error(`Broker redirected to unexpected origin ${e.origin}, expected ${i}.`));else if(e.data.success){const[t,n]=e.ports;a({iframeBrokerPort:t,workerPort:n})}else c(new m(e.data));window.removeEventListener("message",d),clearTimeout(s)}};window.addEventListener("message",d),ko.log(`Connecting to broker ${e}`),r.setAttribute("src",e),r.setAttribute("name",o(t,"of-broker")),document.body.appendChild(r),ko.log("Iframe loaded, awaiting init message from iframe"),n&&(s=setTimeout((()=>{window.removeEventListener("message",d),document.body.removeChild(r),c(new Error("Worker did not initialize in time"))}),n))}))}catch(e){throw new Error(`Failed to initialise Fin Web Client. ${e.message}`,{cause:e})}})(n,i,r);Ro.log("Successfully established connection to shared worker");const d={entityType:"external connection",...i};a.start(),c.start();const h=((t,n,i)=>{const r=$o(n),o=new Ko(t),s=new Io(r,o,i);return s.connectSync(),window.Buffer=e.Buffer,new Wr(s)})(t,a,d);return s?.providerId&&(h.me.interop=h.Interop.connectSync(s.providerId),s?.currentContextGroup&&h.me.interop.joinContextGroup(s.currentContextGroup).catch((e=>{console.warn(`Error joining specified context group: ${s?.currentContextGroup}, continuing`,e)}))),{...h,me:{...h.me,identity:{uuid:h.me.uuid,name:h.me.name}}}}catch(e){throw new Error(`An error occured during web-interop connection: ${e.message}`)}},exports.decorators=Nn,exports.encodeOptions=o,exports.layout_constants=ai,exports.lazy=G; +var e=__webpack_require__(/*! buffer/ */ "../../node_modules/buffer/index.js"),t=__webpack_require__(/*! events */ "../../node_modules/events/events.js"),n=__webpack_require__(/*! lodash/cloneDeep */ "../../node_modules/lodash/cloneDeep.js"),i=__webpack_require__(/*! lodash/isEqual */ "../../node_modules/lodash/isEqual.js"),r=__webpack_require__(/*! uuid */ "../../node_modules/uuid/dist/esm-browser/index.js");const o=(e,t)=>`${t}<${btoa(JSON.stringify(e))}>`;var s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof __webpack_require__.g?__webpack_require__.g:"undefined"!=typeof self?self:{},a={},c={},d={},h={};async function l(e){const t=[];for(const n of e){const e=await n();t.push(e)}return t}Object.defineProperty(h,"__esModule",{value:!0}),h.promiseMapSerial=h.serial=h.promiseMap=h.promisify=void 0,h.promisify=function(e){return(...t)=>new Promise(((n,i)=>{e(...t,((e,t)=>e?i(e):n(t)))}))},h.promiseMap=async function(e,t){return Promise.all(e.map(t))},h.serial=l,h.promiseMapSerial=async function(e,t){return l(e.map(((e,n,i)=>()=>t(e,n,i))))};var u,p=s&&s.__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},w=s&&s.__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)};Object.defineProperty(d,"__esModule",{value:!0}),d.Reply=d.EmitterBase=d.Base=void 0;const y=h;class f{constructor(e){this.isNodeEnvironment=()=>"node"===this.wire.environment.type,this.isOpenFinEnvironment=()=>"openfin"===this.wire.environment.type,this.isBrowserEnvironment=()=>"other"===this.wire.environment.type,this.wire=e}get fin(){return this.wire.getFin()}get me(){return this.wire.me}}d.Base=f;d.EmitterBase=class extends f{constructor(e,t,...n){super(e),this.topic=t,u.set(this,void 0),this.eventNames=()=>this.hasEmitter()?this.getOrCreateEmitter().eventNames():[],this.emit=(e,t,...n)=>!!this.hasEmitter()&&this.getOrCreateEmitter().emit(e,t,...n),this.hasEmitter=()=>this.wire.eventAggregator.has(w(this,u,"f")),this.getOrCreateEmitter=()=>this.wire.eventAggregator.getOrCreate(w(this,u,"f")),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[],this.listenerCount=e=>this.hasEmitter()?this.getOrCreateEmitter().listenerCount(e):0,this.registerEventListener=async(e,t={},n,i)=>{const r={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e},o=this.getOrCreateEmitter();n(o);try{await this.wire.sendAction("subscribe-to-desktop-event",r)}catch(e){throw i(o),this.deleteEmitterIfNothingRegistered(o),e}},this.deregisterEventListener=async(e,t={})=>{if(this.hasEmitter()){const n={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e};await this.wire.sendAction("unsubscribe-to-desktop-event",n).catch((()=>null));return this.getOrCreateEmitter()}return Promise.resolve()},p(this,u,[t,...n],"f"),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[]}async on(e,t,n){return await this.registerEventListener(e,n,(n=>{n.on(e,t)}),(n=>{n.removeListener(e,t)})),this}async addListener(e,t,n){return this.on(e,t,n)}async once(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.once(e,i),n.once(e,t)}),(n=>{n.removeListener(e,i),n.removeListener(e,t)})),this}async prependListener(e,t,n){return await this.registerEventListener(e,n,(n=>{n.prependListener(e,t)}),(n=>{n.removeListener(e,t)})),this}async prependOnceListener(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.prependOnceListener(e,t),n.once(e,i)}),(n=>{n.removeListener(e,t),n.removeListener(e,i)})),this}async removeListener(e,t,n){const i=await this.deregisterEventListener(e,n);return i&&(i.removeListener(e,t),this.deleteEmitterIfNothingRegistered(i)),this}async deregisterAllListeners(e){const t={...this.identity,type:e,topic:this.topic};if(this.hasEmitter()){const e=this.getOrCreateEmitter(),n=e.listenerCount(t.type),i=[];for(let e=0;enull)));return await Promise.all(i),e}}async removeAllListeners(e){const t=async e=>{const t=await this.deregisterAllListeners(e);t&&(t.removeAllListeners(e),this.deleteEmitterIfNothingRegistered(t))};if(e)await t(e);else if(this.hasEmitter()){const e=this.getOrCreateEmitter().eventNames();await(0,y.promiseMap)(e,t)}return this}deleteEmitterIfNothingRegistered(e){0===e.eventNames().length&&this.wire.eventAggregator.delete(w(this,u,"f"))}},u=new WeakMap;d.Reply=class{};var g={};Object.defineProperty(g,"__esModule",{value:!0});var m=g.RuntimeError=g.NotSupportedError=g.NotImplementedError=g.NoAckError=g.DuplicateCorrelationError=g.UnexpectedActionError=g.DisconnectedError=void 0;class v extends Error{constructor(e){super(`Expected websocket state OPEN but found ${e}`),this.readyState=e}}g.DisconnectedError=v;class C extends Error{}g.UnexpectedActionError=C;class b extends Error{}g.DuplicateCorrelationError=b;class I extends Error{}g.NoAckError=I;class E extends Error{}g.NotImplementedError=E;class x extends Error{}g.NotSupportedError=x;class A extends Error{constructor(e){const{message:t,name:n,stack:i,...r}=e;super(t),this.name=n||"Error",this.stack=i??this.toString(),Object.keys(r).forEach((e=>{this[e]=r[e]}))}}class P extends Error{static getCallSite(e=0){const t=Error.stackTraceLimit,n=e+1;Error.stackTraceLimit=t+n;const i=Error.prepareStackTrace;Error.prepareStackTrace=(e,t)=>t;const r=(new Error).stack?.slice(n)??[];return Error.prepareStackTrace=i,Error.stackTraceLimit=t,r}static prepareStackTrace(e,t){if("function"==typeof Error.prepareStackTrace)return Error.prepareStackTrace(e,t);let n="";n+=e.name||"Error",n+=`: ${e.message||""}`;for(const e of t)n+=`\n at ${e.toString()}`;return n}constructor(e,t){const{reason:n,error:i}=e;super(n),this.name="RuntimeError",i?.stack&&(this.cause=new A(i)),t&&(this.stack=P.prepareStackTrace(this,t))}}m=g.RuntimeError=P;var M={},_={},O={};Object.defineProperty(O,"__esModule",{value:!0}),O.validateIdentity=void 0,O.validateIdentity=function(e){let t;return"object"==typeof e&&"string"==typeof e.uuid||(t="Not a valid identity object"),t};var S={},R={},F={},j={},k={},L={},T={};Object.defineProperty(T,"__esModule",{value:!0}),T.handleDeprecatedWarnings=void 0;var $;T.handleDeprecatedWarnings=e=>{(e.contentNavigation?.whitelist||e.contentNavigation?.blacklist||e.contentRedirect?.whitelist||e.contentRedirect?.blacklist)&&console.warn("The properties 'whitelist' and 'blacklist' have been marked as deprecated and will be removed in a future version. Please use 'allowlist' and 'denylist'.")};var B={},G={};Object.defineProperty(G,"__esModule",{value:!0}),G.AsyncRetryableLazy=W=G.Lazy=void 0;var W=G.Lazy=class{constructor(e){this.producerFn=e}getValue(){return this.value||(this.value=this.producerFn()),this.value}};G.AsyncRetryableLazy=class{constructor(e){this.producerFn=e}async getValue(){return this.promise||(this.promise=this.producerFn().catch((e=>{throw delete this.promise,e}))),this.promise}};var H={};Object.defineProperty(H,"__esModule",{value:!0}),H.WebContents=void 0;const N=d;class D extends N.EmitterBase{constructor(e,t,n){super(e,n,t.uuid,t.name),this.identity=t,this.entityType=n}capturePage(e){return this.wire.sendAction("capture-page",{options:e,...this.identity}).then((({payload:e})=>e.data))}executeJavaScript(e){return this.wire.sendAction("execute-javascript-in-window",{...this.identity,code:e}).then((({payload:e})=>e.data))}getZoomLevel(){return this.wire.sendAction("get-zoom-level",this.identity).then((({payload:e})=>e.data))}setZoomLevel(e){return this.wire.sendAction("set-zoom-level",{...this.identity,level:e}).then((()=>{}))}navigate(e){return this.wire.sendAction("navigate-window",{...this.identity,url:e}).then((()=>{}))}navigateBack(){return this.wire.sendAction("navigate-window-back",{...this.identity}).then((()=>{}))}async navigateForward(){await this.wire.sendAction("navigate-window-forward",{...this.identity})}stopNavigation(){return this.wire.sendAction("stop-window-navigation",{...this.identity}).then((()=>{}))}reload(e=!1){return this.wire.sendAction("reload-window",{ignoreCache:e,...this.identity}).then((()=>{}))}print(e={}){return this.wire.sendAction("print",{...this.identity,options:e}).then((()=>{}))}findInPage(e,t){return this.wire.sendAction("find-in-page",{...this.identity,searchTerm:e,options:t}).then((({payload:e})=>e.data))}stopFindInPage(e){return this.wire.sendAction("stop-find-in-page",{...this.identity,action:e}).then((()=>{}))}getPrinters(){return this.wire.sendAction("get-printers",{...this.identity}).then((({payload:e})=>e.data))}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){await this.wire.sendAction("focus-window",{emitSynthFocused:e,...this.identity})}async showDeveloperTools(){await this.wire.sendAction("show-developer-tools",this.identity)}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction("get-process-info",this.identity);return e}async getSharedWorkers(){return this.wire.sendAction("get-shared-workers",this.identity).then((({payload:e})=>e.data))}async inspectSharedWorker(){await this.wire.sendAction("inspect-shared-worker",{...this.identity})}async inspectSharedWorkerById(e){await this.wire.sendAction("inspect-shared-worker-by-id",{...this.identity,workerId:e})}async inspectServiceWorker(){await this.wire.sendAction("inspect-service-worker",{...this.identity})}async showPopupWindow(e){if(this.wire.sendAction(`${this.entityType}-show-popup-window`,this.identity).catch((()=>{})),e?.onPopupReady){const t=async({popupName:t})=>{try{const n=this.fin.Window.wrapSync({uuid:this.fin.me.uuid,name:t});await e.onPopupReady(n)}catch(e){throw new Error(`Something went wrong during onPopupReady execution: ${e}`)}};await this.once("popup-ready",t)}const{payload:t}=await this.wire.sendAction("try-create-popup-window",{options:{...e,hasResultCallback:!!e?.onPopupResult,hasReadyCallback:!!e?.onPopupReady},...this.identity}),{data:{willOpen:n,options:i}}=t;n&&await this.fin.Window.create(i.initialOptions);if(e?.onPopupResult){const t=async t=>{await e.onPopupResult((e=>{const{name:t,uuid:n,result:i,data:r}=e,o={identity:{name:t,uuid:n},result:i};return r&&(o.data=r),o})(t))},n=async()=>{await this.removeListener("popup-result",t)};await this.on("popup-result",t),await this.once("popup-teardown",n)}const{payload:r}=await this.wire.sendAction("show-popup-window",{options:i,...this.identity});return r.data}}var U,V,z,K,q;function J(){return V||(V=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(function(){if($)return L;$=1,Object.defineProperty(L,"__esModule",{value:!0}),L.ViewModule=void 0;const e=d,t=O,n=J(),i=T;class r extends e.Base{async create(e){const{uuid:t}=this.wire.me;if(!e.name||"string"!=typeof e.name)throw new Error("Please provide a name property as a string in order to create a View.");return(0,i.handleDeprecatedWarnings)(e),this.wire.environment.childViews?await this.wire.environment.createChildContent({entityType:"view",options:{...e,uuid:t}}):await this.wire.sendAction("create-view",{...e,uuid:t}),this.wrapSync({uuid:t,name:e.name})}async wrap(e){this.wire.sendAction("view-wrap").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}wrapSync(e){this.wire.sendAction("view-wrap-sync").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}getCurrent(){if(this.wire.sendAction("view-get-current").catch((e=>{})),!this.wire.me.isView)throw new Error("You are not in a View context");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction("view-get-current-sync").catch((e=>{})),!this.wire.me.isView)throw new Error("You are not in a View context");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return L.ViewModule=r,L}(),e),n(function(){if(U)return B;var e;U=1,Object.defineProperty(B,"__esModule",{value:!0}),B.View=void 0;const t=g,n=G,i=H,r=ie();class o extends i.WebContents{constructor(i,o){super(i,o,"view"),this.identity=o,e.set(this,new n.Lazy((()=>this.fin.Platform.wrapSync(this.identity).getClient()))),this.attach=async e=>{await this.wire.sendAction("attach-view",{target:e,...this.identity})},this.destroy=async()=>{await this.wire.sendAction("destroy-view",{...this.identity})},this.show=async()=>{await this.wire.sendAction("show-view",{...this.identity})},this.showAt=async(e,t={})=>{await this.wire.sendAction("show-view-at",{bounds:e,...this.identity,options:t})},this.bringToFront=async()=>{await this.wire.sendAction("bring-view-to-front",{...this.identity})},this.hide=async()=>{await this.wire.sendAction("hide-view",{...this.identity})},this.setBounds=async e=>{await this.wire.sendAction("set-view-bounds",{bounds:e,...this.identity})},this.getBounds=async()=>(await this.wire.sendAction("get-view-bounds",{...this.identity})).payload.data,this.getInfo=async()=>(await this.wire.sendAction("get-view-info",{...this.identity})).payload.data,this.getParentLayout=async()=>(this.wire.sendAction("view-get-parent-layout",{...this.identity}).catch((()=>{})),this.fin.Platform.Layout.getLayoutByViewIdentity(this.identity)),this.getOptions=async()=>this.wire.sendAction("get-view-options",{...this.identity}).then((({payload:e})=>e.data)),this.updateOptions=async e=>this.wire.sendAction("update-view-options",{options:e,...this.identity}).then((()=>{})),this.getCurrentWindow=async()=>{const{payload:{data:e}}=await this.wire.sendAction("get-view-window",{...this.identity});return new r._Window(this.wire,e)},this.getCurrentStack=async()=>{this.wire.sendAction("view-get-current-stack").catch((()=>{}));try{return(await this.getParentLayout()).getStackByViewIdentity(this.identity)}catch(e){throw new t.RuntimeError({reason:"This view does not belong to a stack.",error:e})}},this.triggerBeforeUnload=async()=>(await this.wire.sendAction("trigger-before-unload",{...this.identity})).payload.data,this.bindToElement=async e=>{if(!e)throw new Error("Element not found.");return this.wire.environment.observeBounds(e,(async e=>this.setBounds(e)))}}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){const t=await this.getCurrentWindow();await t.focusedWebViewWasChanged(),await super.focus({emitSynthFocused:e})}}return B.View=o,e=new WeakMap,B}(),e)}(k)),k}function Y(){if(z)return j;z=1,Object.defineProperty(j,"__esModule",{value:!0}),j.Application=void 0;const e=d,t=ie(),n=J();class i extends e.EmitterBase{constructor(e,n){super(e,"application",n.uuid),this.identity=n,this.window=new t._Window(this.wire,{uuid:this.identity.uuid,name:this.identity.uuid})}windowListFromIdentityList(e){const n=[];return e.forEach((e=>{n.push(new t._Window(this.wire,{uuid:e.uuid,name:e.name}))})),n}isRunning(){return this.wire.sendAction("is-application-running",this.identity).then((({payload:e})=>e.data))}async quit(e=!1){try{await this._close(e),await this.wire.sendAction("destroy-application",{force:e,...this.identity})}catch(e){if(!["Remote connection has closed","Could not locate the requested application"].some((t=>e.message.includes(t))))throw e}}async _close(e=!1){try{await this.wire.sendAction("close-application",{force:e,...this.identity})}catch(e){if(!e.message.includes("Remote connection has closed"))throw e}}close(e=!1){return console.warn("Deprecation Warning: Application.close is deprecated Please use Application.quit"),this.wire.sendAction("application-close",this.identity).catch((e=>{})),this._close(e)}getChildWindows(){return this.wire.sendAction("get-child-windows",this.identity).then((({payload:e})=>{const t=[];return e.data.forEach((e=>{t.push({uuid:this.identity.uuid,name:e})})),this.windowListFromIdentityList(t)}))}getManifest(){return this.wire.sendAction("get-application-manifest",this.identity).then((({payload:e})=>e.data))}getParentUuid(){return this.wire.sendAction("get-parent-application",this.identity).then((({payload:e})=>e.data))}getShortcuts(){return this.wire.sendAction("get-shortcuts",this.identity).then((({payload:e})=>e.data))}async getViews(){const{payload:e}=await this.wire.sendAction("application-get-views",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}getZoomLevel(){return this.wire.sendAction("get-application-zoom-level",this.identity).then((({payload:e})=>e.data))}getWindow(){return this.wire.sendAction("application-get-window",this.identity).catch((e=>{})),Promise.resolve(this.window)}registerUser(e,t){return this.wire.sendAction("register-user",{userName:e,appName:t,...this.identity}).then((()=>{}))}removeTrayIcon(){return this.wire.sendAction("remove-tray-icon",this.identity).then((()=>{}))}restart(){return this.wire.sendAction("restart-application",this.identity).then((()=>{}))}run(){return console.warn("Deprecation Warning: Application.run is deprecated Please use fin.Application.start"),this.wire.sendAction("application-run",this.identity).catch((e=>{})),this._run()}_run(e={}){return this.wire.sendAction("run-application",{manifestUrl:this._manifestUrl,opts:e,...this.identity}).then((()=>{}))}scheduleRestart(){return this.wire.sendAction("relaunch-on-close",this.identity).then((()=>{}))}async sendApplicationLog(){const{payload:e}=await this.wire.sendAction("send-application-log",this.identity);return e.data}async setJumpList(e){await this.wire.sendAction("set-jump-list",{config:e,...this.identity})}setTrayIcon(e){return this.wire.sendAction("set-tray-icon",{enabledIcon:e,...this.identity}).then((()=>{}))}setShortcuts(e){return this.wire.sendAction("set-shortcuts",{data:e,...this.identity}).then((()=>{}))}async setShortcutQueryParams(e){await this.wire.sendAction("set-shortcut-query-args",{data:e,...this.identity})}setZoomLevel(e){return this.wire.sendAction("set-application-zoom-level",{level:e,...this.identity}).then((()=>{}))}async setAppLogUsername(e){await this.wire.sendAction("set-app-log-username",{data:e,...this.identity})}getTrayIconInfo(){return this.wire.sendAction("get-tray-icon-info",this.identity).then((({payload:e})=>e.data))}hasTrayIcon(){return this.wire.sendAction("has-tray-icon",this.identity).then((({payload:e})=>e.data))}terminate(){return this.wire.sendAction("terminate-application",this.identity).then((()=>{}))}wait(){return this.wire.sendAction("wait-for-hung-application",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction("get-info",this.identity).then((({payload:e})=>e.data))}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction("application-get-process-info",this.identity);return e}async setFileDownloadLocation(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t};await this.wire.sendAction("set-file-download-location",{...n,downloadLocation:e})}async getFileDownloadLocation(){const{payload:{data:e}}=await this.wire.sendAction("get-file-download-location",this.identity);return e}async showTrayIconPopupMenu(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t},{payload:i}=await this.wire.sendAction("show-tray-icon-popup-menu",{...n,options:e});return i.data}async closeTrayIconPopupMenu(){const{name:e}=this.wire.me,t={uuid:this.identity.uuid,name:e};await this.wire.sendAction("close-tray-icon-popup-menu",{...t})}}return j.Application=i,j}function Z(){return q||(q=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(function(){if(K)return F;K=1,Object.defineProperty(F,"__esModule",{value:!0}),F.ApplicationModule=void 0;const e=d,t=O,n=Y();class i extends e.Base{async wrap(e){this.wire.sendAction("wrap-application").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}wrapSync(e){this.wire.sendAction("wrap-application-sync").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}async _create(e){return void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&void 0===e.isPlatformController&&(e.autoShow=!0),await this.wire.sendAction("create-application",e),this.wrap({uuid:e.uuid})}create(e){return console.warn("Deprecation Warning: fin.Application.create is deprecated. Please use fin.Application.start"),this.wire.sendAction("application-create").catch((e=>{})),this._create(e)}async start(e){this.wire.sendAction("start-application").catch((e=>{}));const t=await this._create(e);return await this.wire.sendAction("run-application",{uuid:e.uuid}),t}async startManyManifests(e,t){return this.wire.sendAction("run-applications",{applications:e,opts:t}).then((()=>{}))}getCurrent(){return this.wire.sendAction("get-current-application").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction("get-current-application-sync").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}async startFromManifest(e,t){this.wire.sendAction("application-start-from-manifest").catch((e=>{}));const n=await this._createFromManifest(e);return await n._run(t),n}createFromManifest(e){return console.warn("Deprecation Warning: fin.Application.createFromManifest is deprecated. Please use fin.Application.startFromManifest"),this.wire.sendAction("application-create-from-manifest").catch((e=>{})),this._createFromManifest(e)}_createFromManifest(e){return this.wire.sendAction("get-application-manifest",{manifestUrl:e}).then((({payload:e})=>{const t=e.data.platform?e.data.platform.uuid:e.data.startup_app.uuid;return this.wrap({uuid:t})})).then((t=>(t._manifestUrl=e,t)))}}return F.ApplicationModule=i,F}(),e),n(Y(),e)}(R)),R}H.WebContents=D;var Q={};Object.defineProperty(Q,"__esModule",{value:!0}),Q.promisifySubscription=void 0;var X,ee,te;function ne(){if(X)return S;X=1,Object.defineProperty(S,"__esModule",{value:!0}),S._Window=void 0;const e=Z(),t=H,n=J(),i=T,r=Q;class o extends t.WebContents{constructor(e,t){super(e,t,"window")}async createWindow(e){this.wire.sendAction("window-create-window",this.identity).catch((e=>{}));const t=await(0,r.promisifySubscription)(this,"fire-constructor-callback");void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&(e.autoShow=!0),(0,i.handleDeprecatedWarnings)(e);const n=this.wire.environment.createChildContent({entityType:"window",options:e}),[o]=await Promise.all([t.getValue(),n]);let s;const{success:a}=o,c=o.data,{message:d}=c;s=a?{httpResponseCode:c.httpResponseCode,apiInjected:c.apiInjected}:{message:c.message,networkErrorCode:c.networkErrorCode,stack:c.stack};const h={message:d,cbPayload:s,success:a};try{this.getWebWindow().fin.__internal_.openerSuccessCBCalled()}catch(e){}return h.success?this:Promise.reject(h)}getAllFrames(){return this.wire.sendAction("get-all-frames",this.identity).then((({payload:e})=>e.data))}getBounds(){return this.wire.sendAction("get-window-bounds",this.identity).then((({payload:e})=>e.data))}center(){return this.wire.sendAction("center-window",this.identity).then((()=>{}))}blur(){return this.wire.sendAction("blur-window",this.identity).then((()=>{}))}bringToFront(){return this.wire.sendAction("bring-window-to-front",this.identity).then((()=>{}))}animate(e,t){return this.wire.sendAction("animate-window",{transitions:e,options:t,...this.identity}).then((()=>{}))}hide(){return this.wire.sendAction("hide-window",this.identity).then((()=>{}))}close(e=!1){return this.wire.sendAction("close-window",{force:e,...this.identity}).then((()=>{Object.setPrototypeOf(this,null)}))}focusedWebViewWasChanged(){return this.wire.sendAction("focused-webview-changed",this.identity).then((()=>{}))}getNativeId(){return this.wire.sendAction("get-window-native-id",this.identity).then((({payload:e})=>e.data))}async getCurrentViews(){const{payload:e}=await this.wire.sendAction("window-get-views",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}disableFrame(){return console.warn("Function is deprecated; use disableUserMovement instead."),this.wire.sendAction("disable-window-frame",this.identity).then((()=>{}))}disableUserMovement(){return this.wire.sendAction("disable-window-frame",this.identity).then((()=>{}))}enableFrame(){return console.warn("Function is deprecated; use enableUserMovement instead."),this.wire.sendAction("enable-window-frame",this.identity).then((()=>{}))}enableUserMovement(){return this.wire.sendAction("enable-window-frame",this.identity).then((()=>{}))}flash(){return this.wire.sendAction("flash-window",this.identity).then((()=>{}))}stopFlashing(){return this.wire.sendAction("stop-flash-window",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction("get-window-info",this.identity).then((({payload:e})=>e.data))}async getLayout(e){this.wire.sendAction("window-get-layout",this.identity).catch((e=>{}));const t=await this.getOptions();if(!t.layout&&!t.layoutSnapshot)throw new Error("Window does not have a Layout");return this.fin.Platform.Layout.wrap(e??this.identity)}getOptions(){return this.wire.sendAction("get-window-options",this.identity).then((({payload:e})=>e.data))}getParentApplication(){return this.wire.sendAction("window-get-parent-application",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity))}getParentWindow(){return this.wire.sendAction("window-get-parent-window",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity)).then((e=>e.getWindow()))}async getSnapshot(e){const t={area:e,...this.identity};console.warn("Window.getSnapshot has been deprecated, please use Window.capturePage");return(await this.wire.sendAction("get-window-snapshot",t)).payload.data}getState(){return this.wire.sendAction("get-window-state",this.identity).then((({payload:e})=>e.data))}getWebWindow(){return this.wire.sendAction("window-get-web-window",this.identity).catch((e=>{})),this.wire.environment.getWebWindow(this.identity)}isMainWindow(){return this.wire.sendAction("window-is-main-window",this.identity).catch((e=>{})),this.me.uuid===this.me.name}isShowing(){return this.wire.sendAction("is-window-showing",this.identity).then((({payload:e})=>e.data))}maximize(){return this.wire.sendAction("maximize-window",this.identity).then((()=>{}))}minimize(){return this.wire.sendAction("minimize-window",this.identity).then((()=>{}))}moveBy(e,t,n){return this.wire.sendAction("move-window-by",{deltaLeft:e,deltaTop:t,positioningOptions:n,...this.identity}).then((()=>{}))}moveTo(e,t,n){return this.wire.sendAction("move-window",{left:e,top:t,positioningOptions:n,...this.identity}).then((()=>{}))}resizeBy(e,t,n,i){return this.wire.sendAction("resize-window-by",{deltaWidth:Math.floor(e),deltaHeight:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}resizeTo(e,t,n,i){return this.wire.sendAction("resize-window",{width:Math.floor(e),height:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}restore(){return this.wire.sendAction("restore-window",this.identity).then((()=>{}))}setAsForeground(){return this.wire.sendAction("set-foreground-window",this.identity).then((()=>{}))}setBounds(e,t){return this.wire.sendAction("set-window-bounds",{...e,...this.identity,positioningOptions:t}).then((()=>{}))}show(e=!1){return this.wire.sendAction("show-window",{force:e,...this.identity}).then((()=>{}))}showAt(e,t,n=!1){return this.wire.sendAction("show-at-window",{force:n,left:Math.floor(e),top:Math.floor(t),...this.identity}).then((()=>{}))}updateOptions(e){return this.wire.sendAction("update-window-options",{options:e,...this.identity}).then((()=>{}))}authenticate(e,t){return this.wire.sendAction("window-authenticate",{userName:e,password:t,...this.identity}).then((()=>{}))}async showPopupMenu(e){const{payload:t}=await this.wire.sendAction("show-popup-menu",{options:e,...this.identity});return t.data}async closePopupMenu(){return this.wire.sendAction("close-popup-menu",{...this.identity}).then((()=>{}))}async dispatchPopupResult(e){this.wire.sendAction("window-dispatch-popup-result",this.identity).catch((e=>{})),await this.wire.sendAction("dispatch-popup-result",{data:e,...this.identity})}async print(e={content:"self"}){switch(e.content){case void 0:case"self":return super.print(e);case"screenshot":return this.wire.sendAction("print-screenshot",this.identity).then((()=>{}));case"views":return this.wire.sendAction("print-views",{...this.identity,options:e}).then((()=>{}));default:return}}}return S._Window=o,S}function ie(){return te||(te=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(function(){if(ee)return _;ee=1,Object.defineProperty(_,"__esModule",{value:!0}),_._WindowModule=void 0;const e=d,t=O,n=ne();class i extends e.Base{async wrap(e){this.wire.sendAction("window-wrap").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}wrapSync(e){this.wire.sendAction("window-wrap-sync").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}create(e){return this.wire.sendAction("create-window").catch((e=>{})),new n._Window(this.wire,{uuid:this.me.uuid,name:e.name}).createWindow(e)}getCurrent(){if(this.wire.sendAction("get-current-window").catch((e=>{})),!this.wire.me.isWindow)throw new Error("You are not in a Window context");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction("get-current-window-sync").catch((e=>{})),!this.wire.me.isWindow)throw new Error("You are not in a Window context");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return _._WindowModule=i,_}(),e),n(ne(),e)}(M)),M}Q.promisifySubscription=async(e,t,n=(()=>!0),i)=>{let r,o,s;const a=new Promise(((e,t)=>{r=e,o=t})),c=e=>{n(e)&&(clearTimeout(s),r(e))};return await e.on(t,c),i&&(s=setTimeout((()=>o(new Error("event timed out"))),i)),a.finally((()=>{e.removeListener(t,c).catch((()=>null))})),{getValue:()=>a}},Object.defineProperty(c,"__esModule",{value:!0}),c.System=void 0;const re=d,oe=g,se=ie(),ae=t;class ce extends re.EmitterBase{constructor(e){super(e,"system")}sendExternalProcessRequest(e,t){return new Promise(((n,i)=>{const r="external-process-exited";let o,s,a,c;"function"==typeof t.listener&&(a=e=>{const n=e||{};s={topic:"exited",uuid:n.processUuid||"",exitCode:n.exitCode||0},o===e.processUuid&&(t.listener(s),c.removeListener(r,a))},this.wire.me.name||(this.wire.me.name=this.wire.me.uuid),c=new se._Window(this.wire,this.wire.me),c.on(r,a)),this.wire.sendAction(e,t).then((({payload:e})=>{o=e.data.uuid,n(e.data),s&&o===s.uuid&&(t.listener(s),c.removeListener(r,a))})).catch((e=>{c&&c.removeListener(r,a),i(e)}))}))}getVersion(){return this.wire.sendAction("get-version").then((({payload:e})=>e.data))}clearCache(e){return this.wire.sendAction("clear-cache",e).then((()=>{}))}deleteCacheOnExit(){return this.wire.sendAction("delete-cache-request").then((()=>{}))}exit(){return this.wire.sendAction("exit-desktop").then((()=>{}))}async fetchManifest(e){const{payload:{data:t}}=await this.wire.sendAction("fetch-manifest",{manifestUrl:e});return t}flushCookieStore(){return this.wire.sendAction("flush-cookie-store").then((()=>{}))}getAllWindows(){return this.wire.sendAction("get-all-windows").then((({payload:e})=>e.data))}getAllApplications(){return this.wire.sendAction("get-all-applications").then((({payload:e})=>e.data))}getCommandLineArguments(){return this.wire.sendAction("get-command-line-arguments").then((({payload:e})=>e.data))}async getCrashReporterState(){const{payload:{data:{diagnosticMode:e,isRunning:t}}}=await this.wire.sendAction("get-crash-reporter-state");return console.warn("diagnosticMode property is deprecated. It will be removed in a future version"),{diagnosticMode:e,diagnosticsMode:e,isRunning:t}}async startCrashReporter(e){const t=e,n={...t,diagnosticMode:t.diagnosticsMode||t.diagnosticMode},{payload:{data:{diagnosticMode:i,isRunning:r}}}=await this.wire.sendAction("start-crash-reporter",n);return{diagnosticMode:i,diagnosticsMode:i,isRunning:r}}getUniqueUserId(){return this.wire.sendAction("get-unique-user-id").then((({payload:e})=>e.data))}getEntityInfo(e,t){return this.wire.sendAction("get-entity-info",{uuid:e,name:t}).then((({payload:e})=>e.data))}getEnvironmentVariable(e){return this.wire.sendAction("get-environment-variable",{environmentVariables:e}).then((({payload:e})=>e.data))}getFocusedWindow(){return this.wire.sendAction("get-focused-window").then((({payload:e})=>e.data))}async isAppCertified(e){const{payload:{data:{certifiedInfo:t}}}=await this.wire.sendAction("is-app-certified",{manifestUrl:e});return t}getInstalledRuntimes(){return this.wire.sendAction("get-installed-runtimes").then((({payload:e})=>e.data.runtimes))}async getInstalledApps(){const{payload:{data:{installedApps:e}}}=await this.wire.sendAction("get-installed-apps");return e}getLog(e){return this.wire.sendAction("view-log",e).then((({payload:e})=>e.data))}getMachineId(){return this.wire.sendAction("get-machine-id").then((({payload:e})=>e.data))}getMinLogLevel(){return this.wire.sendAction("get-min-log-level").then((({payload:e})=>e.data))}getLogList(){return this.wire.sendAction("list-logs").then((({payload:e})=>e.data))}getMonitorInfo(){return this.wire.sendAction("get-monitor-info").then((({payload:e})=>e.data))}getMousePosition(){return this.wire.sendAction("get-mouse-position").then((({payload:e})=>e.data))}getProcessList(){return console.warn("System.getProcessList has been deprecated. Please consider using our new process APIs: Window.getProcessInfo, View.getProcessInfo, Application.getProcessInfo, System.getAllProcessInfo"),this.wire.sendAction("process-snapshot").then((({payload:e})=>e.data))}async getAllProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction("get-all-process-info",this.identity);return e}getProxySettings(){return this.wire.sendAction("get-proxy-settings").then((({payload:e})=>e.data))}getRuntimeInfo(){return this.wire.sendAction("get-runtime-info").then((({payload:e})=>e.data))}getRvmInfo(){return this.wire.sendAction("get-rvm-info").then((({payload:e})=>e.data))}getHostSpecs(){return this.wire.sendAction("get-host-specs").then((({payload:e})=>e.data))}getOSInfo(){return this.wire.sendAction("get-os-info").then((({payload:e})=>e.data))}launchExternalProcess(e){return this.sendExternalProcessRequest("launch-external-process",e)}monitorExternalProcess(e){return this.sendExternalProcessRequest("monitor-external-process",e)}log(e,t){return this.wire.sendAction("write-to-log",{level:e,message:t}).then((()=>{}))}openUrlWithBrowser(e){return this.wire.sendAction("open-url-with-browser",{url:e}).then((()=>{}))}async registerCustomProtocol(e){if("object"!=typeof e)throw new Error("Must provide an object with a `protocolName` property having a string value.");await this.wire.sendAction("register-custom-protocol",e)}async unregisterCustomProtocol(e){await this.wire.sendAction("unregister-custom-protocol",{protocolName:e})}async getCustomProtocolState(e){return this.wire.sendAction("get-custom-protocol-state",{protocolName:e}).then((({payload:e})=>e.data))}releaseExternalProcess(e){return this.wire.sendAction("release-external-process",{uuid:e}).then((()=>{}))}showDeveloperTools(e){return this.wire.sendAction("show-developer-tools",e).then((()=>{}))}terminateExternalProcess(e){return this.wire.sendAction("terminate-external-process",e).then((()=>{}))}updateProxySettings(e){return this.wire.sendAction("update-proxy",e).then((()=>{}))}async downloadAsset(e,t){const n=()=>{};let i=n,r=n;const o=new Promise(((e,t)=>{i=e,r=t}));if("openfin"!==this.wire.environment.type)throw new oe.NotSupportedError("downloadAsset only supported in an OpenFin Render process");const s=oe.RuntimeError.getCallSite(),a=this.wire.environment.getNextMessageId().toString(),c=`asset-download-progress-${a}`,d=`asset-download-error-${a}`,h=`asset-download-complete-${a}`,l=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},u=()=>{this.removeListener(c,l)};await Promise.all([this.on(c,l),this.once(d,(e=>{u();const{reason:t,err:n}=e;r(new oe.RuntimeError({reason:t,error:n},s))})),this.once(h,(()=>{u(),i()}))]);const p=Object.assign(e,{downloadId:a});return await this.wire.sendAction("download-asset",p).catch((e=>{throw u(),e})),o}downloadRuntime(e,t){const n=oe.RuntimeError.getCallSite();return new Promise(((i,r)=>{if("openfin"!==this.wire.environment.type)return void r(new oe.NotSupportedError("downloadRuntime only supported in an OpenFin Render process"));const o=this.wire.environment.getNextMessageId().toString(),s=`runtime-download-progress-${o}`,a=`runtime-download-error-${o}`,c=`runtime-download-complete-${o}`,d=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},h=()=>{this.removeListener(s,d)};this.on(s,d),this.once(a,(e=>{h();const{reason:t,err:i}=e;r(new oe.RuntimeError({reason:t,error:i},n))})),this.once(c,(()=>{h(),i()}));const l=Object.assign(e,{downloadId:o});this.wire.sendAction("download-runtime",l).catch((e=>{h(),r(e)}))}))}downloadPreloadScripts(e){return this.wire.sendAction("download-preload-scripts",{scripts:e}).then((({payload:e})=>e.data))}getAllExternalApplications(){return this.wire.sendAction("get-all-external-applications").then((({payload:e})=>e.data))}getAppAssetInfo(e){return this.wire.sendAction("get-app-asset-info",e).then((({payload:e})=>e.data))}getCookies(e){const t=this.wire.environment.getUrl(),n=Object.assign(e,{url:t});return this.wire.sendAction("get-cookies",n).then((({payload:e})=>e.data))}setMinLogLevel(e){return this.wire.sendAction("set-min-log-level",{level:e}).then((()=>{}))}resolveUuid(e){return this.wire.sendAction("resolve-uuid",{entityKey:e}).then((({payload:e})=>e.data))}executeOnRemote(e,t){return t.requestingIdentity=e,this.wire.ferryAction(t)}readRegistryValue(e,t,n){return this.wire.sendAction("read-registry-value",{rootKey:e,subkey:t,value:n}).then((({payload:e})=>e.data))}registerExternalConnection(e){return this.wire.sendAction("register-external-connection",{uuid:e}).then((({payload:e})=>e.data))}async getServiceConfiguration(e){if("string"!=typeof e.name)throw new Error("Must provide an object with a `name` property having a string value");const{name:t}=e;return this.wire.sendAction("get-service-configuration",{name:t}).then((({payload:e})=>e.data))}async getSystemAppConfig(e){if("string"!=typeof e)throw new Error("Must provide a string value for name of system app");return this.wire.sendAction("get-system-app-configuration",{name:e}).then((({payload:e})=>e.data))}async registerShutdownHandler(e){this.wire.sendAction("system-register-shutdown-handler").catch((e=>{}));const{uuid:t,name:n}=this.wire.me;this.on("system-shutdown",(i=>{e({proceed:()=>{this.wire.environment.raiseEvent("application/system-shutdown-handled",{uuid:t,name:n,topic:"application"})}})}))}runRvmHealthCheck(){return this.wire.sendAction("run-rvm-health-check").then((({payload:e})=>e.data))}async launchManifest(e,t={}){const{subscribe:n,...i}=t,r=i;if(n){const e=new ae.EventEmitter;n(e);const t="app-version-progress",i="runtime-status",o="app-version-complete",s="app-version-error",a=this.wire.environment.getNextMessageId().toString();r.appVersionId=a;const c=[o,t,i,s],d=e=>{const{appVersionId:t,topic:n,type:i,...r}=e;return{...r,type:c.find((e=>i.includes(e)))}},h=t=>{const n=d(t);e.emit(n.type,n)},l=()=>{this.removeListener(`${t}.${a}`,h),this.removeListener(`${i}.${a}`,h),this.removeListener(`${o}.${a}`,h),this.removeListener(`${s}.${a}`,h),this.removeListener(`${o}.${a}`,l),this.removeListener(`${s}.${a}`,l)};await Promise.all([this.on(`${t}.${a}`,h),this.on(`${i}.${a}`,h),this.once(`${o}.${a}`,h),this.once(`${s}.${a}`,h),this.once(`${o}.${a}`,l),this.once(`${s}.${a}`,l)])}return(await this.wire.sendAction("launch-manifest",{manifestUrl:e,opts:r})).payload.data.manifest}async queryPermissionForCurrentContext(e){const t={uuid:this.wire.me.uuid,name:this.wire.me.name};return(await this.wire.sendAction("query-permission-for-current-context",{apiName:e,identity:t})).payload.data}async enableNativeWindowIntegrationProvider(e){const{payload:t}=await this.wire.sendAction("enable-native-window-integration-provider",{permissions:e});return t.data}async registerUsage({data:e,type:t}){await this.wire.sendAction("register-usage",{data:e,type:t})}async getPrinters(){const{payload:e}=await this.wire.sendAction("system-get-printers");return e.data}async updateProcessLoggingOptions(e){await this.wire.sendAction("system-update-process-logging-options",{options:e})}async getDomainSettings(){const{payload:{data:e}}=await this.wire.sendAction("get-domain-settings",this.identity);return e}async setDomainSettings(e){await this.wire.sendAction("set-domain-settings",{domainSettings:e,...this.identity})}async refreshExtensions(){const{payload:e}=await this.wire.sendAction("refresh-extensions");return e.data}async getInstalledExtensions(){const{payload:e}=await this.wire.sendAction("get-installed-extensions");return e.data}}c.System=ce;var de={},he={};Object.defineProperty(he,"__esModule",{value:!0}),he.RefCounter=void 0;he.RefCounter=class{constructor(){this.topicRefMap=new Map}incRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t+1;n=i,this.topicRefMap.set(e,i)}else this.topicRefMap.set(e,1),n=1;return n}decRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t-1;this.topicRefMap.set(e,i),n=i}else n=-1;return n}actOnFirst(e,t,n){return 1===this.incRefCount(e)?t():n()}actOnLast(e,t,n){return 0===this.decRefCount(e)?t():n()}};var le={},ue={},pe={};Object.defineProperty(pe,"__esModule",{value:!0}),pe.ChannelBase=pe.ProtectedItems=void 0;const we=e=>async(t,n,i)=>{const r=await e(t,n,i);return void 0===r?n:r};pe.ProtectedItems=class{constructor(e,t){this.providerIdentity=e,this.close=t}};class ye{static defaultAction(e){throw new Error(`No action registered at target for ${e}`)}constructor(){this.subscriptions=new Map}async processAction(e,t,n){try{const i=this.subscriptions.has(e)?this.subscriptions.get(e):(t,n)=>(this.defaultAction??ye.defaultAction)(e,t,n),r=this.preAction?await this.preAction(e,t,n):t,o=await i(r,n);return this.postAction?await this.postAction(e,o,n):o}catch(t){if(this.errorMiddleware)return this.errorMiddleware(e,t,n);throw t}}beforeAction(e){if(this.preAction)throw new Error("Already registered beforeAction middleware");this.preAction=we(e)}onError(e){if(this.errorMiddleware)throw new Error("Already registered error middleware");this.errorMiddleware=e}afterAction(e){if(this.postAction)throw new Error("Already registered afterAction middleware");this.postAction=we(e)}remove(e){this.subscriptions.delete(e)}setDefaultAction(e){if(this.defaultAction)throw new Error("default action can only be set once");this.defaultAction=e}register(e,t){if(this.subscriptions.has(e))throw new Error(`Subscription already registered for action: ${e}. Unsubscribe before adding new subscription`);return this.subscriptions.set(e,t),!0}}pe.ChannelBase=ye;var fe,ge,me,ve=s&&s.__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)},Ce=s&&s.__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};Object.defineProperty(ue,"__esModule",{value:!0}),ue.ChannelClient=void 0;const be=pe,Ie=new Map;class Ee extends be.ChannelBase{static closeChannelByEndpointId(e){const t=Ie.get(e);t&&ve(t,me,"f").call(t)}static handleProviderDisconnect(e){for(const t of Ie.values())t.providerIdentity.channelId===e.channelId&&(t.disconnectListener(e),ve(t,me,"f").call(t))}constructor(e,t,n){super(),fe.set(this,void 0),ge.set(this,void 0),this.processAction=(e,t,n)=>super.processAction(e,t,n),me.set(this,(()=>{Ie.delete(this.endpointId),ve(this,ge,"f").close()})),Ce(this,fe,new be.ProtectedItems(e,t),"f"),this.disconnectListener=()=>{},this.endpointId=e.endpointId,Ce(this,ge,n,"f"),Ie.set(this.endpointId,this),n.receive(this.processAction)}get providerIdentity(){return ve(this,fe,"f").providerIdentity}async dispatch(e,t){if(ve(this,ge,"f").isEndpointConnected(this.providerIdentity.channelId))return ve(this,ge,"f").send(this.providerIdentity.channelId,e,t);throw new Error("The client you are trying to dispatch from is disconnected from the target provider.")}onDisconnection(e){this.disconnectListener=t=>{try{e(t)}catch(e){throw new Error(`Error while calling the onDisconnection callback: ${e.message}`)}finally{this.disconnectListener=()=>{}}}}async disconnect(){await this.sendDisconnectAction(),ve(this,me,"f").call(this)}async sendDisconnectAction(){const e=ve(this,fe,"f");await e.close()}static async wireClose(e,t,n){const{channelName:i,uuid:r,name:o}=t;await e.sendAction("disconnect-from-channel",{channelName:i,uuid:r,name:o,endpointId:n})}}ue.ChannelClient=Ee,fe=new WeakMap,ge=new WeakMap,me=new WeakMap;var xe={},Ae={};Object.defineProperty(Ae,"__esModule",{value:!0}),Ae.exhaustiveCheck=void 0,Ae.exhaustiveCheck=function(e,t){throw new Error(`Unsupported value: ${e}${t?`\n Supported values are: ${t.join("")}`:""}`)};var Pe,Me,_e,Oe={},Se=s&&s.__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},Re=s&&s.__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)};Object.defineProperty(Oe,"__esModule",{value:!0}),Oe.ClassicInfo=Oe.ClassicStrategy=void 0;Oe.ClassicStrategy=class{constructor(e,t,n,i){this.messageReceiver=t,this.endpointId=n,this.providerIdentity=i,Pe.set(this,void 0),Me.set(this,new Map),_e.set(this,new Map),this.send=async(e,t,n)=>{const i=Re(this,Me,"f").get(e);if(!i)throw new Error(`Could not locate routing info for endpoint ${e}`);const r={...i};r.isLocalEndpointId&&delete r.endpointId,delete r.isLocalEndpointId;const o=Re(this,Pe,"f").sendAction("send-channel-message",{...r,providerIdentity:this.providerIdentity,action:t,payload:n});Re(this,_e,"f").get(e)?.add(o);return(await o.catch((e=>{throw new Error(e.message)})).finally((()=>{Re(this,_e,"f").get(e)?.delete(o)}))).payload.data.result},this.close=async()=>{this.messageReceiver.removeEndpoint(this.providerIdentity.channelId,this.endpointId),[...Re(this,Me,"f").keys()].forEach((e=>this.closeEndpoint(e))),Se(this,Me,new Map,"f")},Se(this,Pe,e,"f")}onEndpointDisconnect(e,t){}receive(e){this.messageReceiver.addEndpoint(e,this.providerIdentity.channelId,this.endpointId)}async closeEndpoint(e){const t=Re(this,Me,"f").get(e);Re(this,Me,"f").delete(e);const n=Re(this,_e,"f").get(e);n?.forEach((n=>{const i=`Channel connection with identity uuid: ${t?.uuid} / name: ${t?.name} / endpointId: ${e} no longer connected.`;n.cancel(new Error(i))}))}isEndpointConnected(e){return Re(this,Me,"f").has(e)}addEndpoint(e,t){Re(this,Me,"f").set(e,t.endpointIdentity),Re(this,_e,"f").set(e,new Set)}isValidEndpointPayload(e){return"string"==typeof e?.endpointIdentity?.endpointId||"string"==typeof e?.endpointIdentity?.channelId}},Pe=new WeakMap,Me=new WeakMap,_e=new WeakMap,Oe.ClassicInfo={version:5,minimumVersion:0,type:"classic"};var Fe={},je={},ke={};Object.defineProperty(ke,"__esModule",{value:!0}),ke.errorToPOJO=void 0,ke.errorToPOJO=function(e){return{stack:e.stack,name:e.name,message:e.message,toString:()=>e.stack||e.toString()}};var Le,Te,$e=s&&s.__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)},Be=s&&s.__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};Object.defineProperty(je,"__esModule",{value:!0}),je.RTCEndpoint=void 0;const Ge=ke;je.RTCEndpoint=class{static isValidEndpointPayload(e){const t=e=>"object"==typeof e&&null!==e;return t(e)&&t(e.endpointIdentity)&&t(e.rtc)&&"string"==typeof e.endpointIdentity.endpointId}constructor({rtc:e,endpointIdentity:t}){this.responseMap=new Map,Le.set(this,null),Te.set(this,void 0),this.connectionStateChangeHandler=e=>{"connected"!==this.rtc.rtcClient.connectionState&&(this.rtc.rtcClient.removeEventListener("connectionstatechange",this.connectionStateChangeHandler),this.close(),$e(this,Te,"f")&&$e(this,Te,"f").call(this))},this.send=async(e,t)=>{const n=`message-${Math.random()}`,i=new Promise(((e,t)=>{this.responseMap.set(n,{resolve:e,reject:t})}));return this.rtc.channels.request.send(JSON.stringify({action:e,payload:t,messageId:n})),i},this.close=()=>{this.responseMap.forEach((e=>e.reject("Connection has closed."))),this.responseMap=new Map,this.rtc.channels.request.close(),this.rtc.channels.response.close(),this.rtc.rtcClient.close()},this.rtc=e,this.endpointIdentity=t,this.rtc.channels.response.addEventListener("message",(e=>{let{data:t}=e;e.data instanceof ArrayBuffer&&(t=(new TextDecoder).decode(e.data));const{messageId:n,payload:i,success:r,error:o}=JSON.parse(t),{resolve:s,reject:a}=this.responseMap.get(n)??{};s&&a?(this.responseMap.delete(n),r?s(i):a(o)):(console.log("Could not find id in responseMap."),console.log(e))})),this.rtc.channels.request.addEventListener("message",(async e=>{let{data:n}=e;e.data instanceof ArrayBuffer&&(n=(new TextDecoder).decode(e.data));const{messageId:i,action:r,payload:o}=JSON.parse(n);if($e(this,Le,"f"))try{const e=await $e(this,Le,"f").call(this,r,o,t);this.rtc.channels.response.send(JSON.stringify({messageId:i,payload:e,success:!0}))}catch(e){"open"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,error:(0,Ge.errorToPOJO)(e),success:!1}))}else"open"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,success:!1,error:"Connection not ready."}))})),this.rtc.rtcClient.addEventListener("connectionstatechange",this.connectionStateChangeHandler),Object.values(this.rtc.channels).forEach((e=>{e.onclose=e=>{[...this.responseMap.values()].forEach((e=>e.reject(new Error("RTCDataChannel closed unexpectedly, this is most commonly caused by message size. Note: RTC Channels have a message size limit of ~255kB.")))),this.close(),$e(this,Te,"f")&&$e(this,Te,"f").call(this)}}))}onDisconnect(e){if($e(this,Te,"f"))throw new Error("RTCEndpoint disconnectListener cannot be set twice.");Be(this,Te,e,"f")}receive(e){if($e(this,Le,"f"))throw new Error("You have already set a listener for this RTC Endpoint.");Be(this,Le,e,"f")}get connected(){return"connected"===this.rtc.rtcClient.connectionState}},Le=new WeakMap,Te=new WeakMap;var We,He,Ne,De={},Ue=s&&s.__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)},Ve=s&&s.__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};Object.defineProperty(De,"__esModule",{value:!0}),De.EndpointStrategy=void 0;De.EndpointStrategy=class{constructor(e,t,n){this.EndpointType=e,this.StrategyName=n,We.set(this,null),He.set(this,new Map),Ne.set(this,!0),this.send=async(e,t,n)=>this.getEndpointById(e).send(t,n),this.close=async()=>{Ue(this,Ne,"f")&&(Ue(this,He,"f").forEach((e=>e.close())),Ve(this,He,new Map,"f")),Ve(this,Ne,!1,"f")},this.isValidEndpointPayload=t}onEndpointDisconnect(e,t){this.getEndpointById(e).onDisconnect(t)}receive(e){if(Ue(this,We,"f"))throw new Error(`You have already set a listener for this ${this.StrategyName} Strategy`);Ve(this,We,e,"f"),Ue(this,He,"f").forEach((e=>e.receive(Ue(this,We,"f"))))}getEndpointById(e){const t=Ue(this,He,"f").get(e);if(!t)throw new Error(`Client with endpoint id ${e} is not connected`);return t}get connected(){return Ue(this,Ne,"f")}isEndpointConnected(e){return Ue(this,He,"f").has(e)}addEndpoint(e,t){if(!Ue(this,Ne,"f"))return void console.warn(`Adding endpoint to disconnected ${this.StrategyName} Strategy`);const n=new this.EndpointType(t);Ue(this,We,"f")&&n.receive(Ue(this,We,"f")),Ue(this,He,"f").set(e,n)}async closeEndpoint(e){Ue(this,He,"f").delete(e)}},We=new WeakMap,He=new WeakMap,Ne=new WeakMap,Object.defineProperty(Fe,"__esModule",{value:!0}),Fe.RTCInfo=Fe.RTCStrategy=void 0;const ze=je,Ke=De;class qe extends Ke.EndpointStrategy{constructor(){super(ze.RTCEndpoint,ze.RTCEndpoint.isValidEndpointPayload,"RTC")}}Fe.RTCStrategy=qe,Fe.RTCInfo={version:2,minimumVersion:0,type:"rtc"};var Je={};Object.defineProperty(Je,"__esModule",{value:!0}),Je.RTCICEManager=void 0;const Ye=d;class Ze extends Ye.EmitterBase{constructor(e){super(e,"channel"),this.ensureChannelOpened=e=>new Promise(((t,n)=>{if("open"===e.readyState)t();else if("connecting"===e.readyState){const n=()=>{e.removeEventListener("open",n),t()};e.addEventListener("open",n)}else n(new Error("This Channel has already closed"))}))}static createDataChannelPromise(e,t){let n;const i=new Promise((e=>{n=e})),r=i=>{const o=()=>{i.channel.removeEventListener("open",o),n(i.channel)};i.channel.label===e&&(i.channel.addEventListener("open",o),t.removeEventListener("datachannel",r))};return t.addEventListener("datachannel",r),i}async listenForProviderIce(e,t){await this.on(this.createProviderEventName(e),t,{timestamp:Date.now()})}async raiseProviderIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createProviderEventName(e)),t)}async listenForClientIce(e,t){await this.on(this.createClientEventName(e),t,{timestamp:Date.now()})}async raiseClientIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createClientEventName(e)),t)}cleanupIceListeners(e){this.removeAllListeners(this.createClientEventName(e)),this.removeAllListeners(this.createProviderEventName(e))}createClientEventName(e){return`ice-client-${e}`}createProviderEventName(e){return`ice-provider-${e}`}createRouteString(e){return`channel/${e}`}createRtcPeer(){return this.wire.environment.getRtcPeer()}async startClientOffer(){const e=Math.random().toString(),t=this.createRtcPeer();t.addEventListener("icecandidate",(async t=>{t.candidate&&await this.raiseClientIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForProviderIce(e,(async e=>{await t.addIceCandidate(e.candidate)}));const n={request:t.createDataChannel("request"),response:t.createDataChannel("response")},i=await t.createOffer();await t.setLocalDescription(i);const r=Promise.all([n.request,n.response].map(this.ensureChannelOpened)).then((()=>{}));return{rtcClient:t,channels:n,offer:i,rtcConnectionId:e,channelsOpened:r}}async finishClientOffer(e,t,n){return await e.setRemoteDescription(t),await n,!0}async createProviderAnswer(e,t){const n=this.createRtcPeer(),i=Ze.createDataChannelPromise("request",n),r=Ze.createDataChannelPromise("response",n);n.addEventListener("icecandidate",(async t=>{t.candidate&&await this.raiseProviderIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForClientIce(e,(async e=>{await n.addIceCandidate(e.candidate)})),await n.setRemoteDescription(t);const o=await n.createAnswer();await n.setLocalDescription(o);const s=Promise.all([i,r]).then((([t,n])=>(this.cleanupIceListeners(e),{request:t,response:n})));return{rtcClient:n,answer:o,channels:s}}}Je.RTCICEManager=Ze;var Qe={},Xe={};function et(e){return[...e.split(".").reverse().entries()].reduce(((e,[t,n])=>e+ +n*1e4**t),0)}function tt(e,t){return et(e)>=et(t)}function nt(e){return e.split("/")[0]}Object.defineProperty(Xe,"__esModule",{value:!0}),Xe.runtimeUuidMeetsMinimumRuntimeVersion=Xe.parseRuntimeUuid=Xe.meetsMinimumRuntimeVersion=void 0,Xe.meetsMinimumRuntimeVersion=tt,Xe.parseRuntimeUuid=nt,Xe.runtimeUuidMeetsMinimumRuntimeVersion=function(e,t){return tt(nt(e),t)};var it,rt,ot,st,at,ct=s&&s.__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)},dt=s&&s.__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};Object.defineProperty(Qe,"__esModule",{value:!0}),Qe.ChannelProvider=void 0;const ht=pe,lt=Xe;class ut extends ht.ChannelBase{get connections(){return[...ct(this,it,"f")]}static handleClientDisconnection(e,t){const n=e.connections.find((e=>e.endpointId===t.endpointId));if(n)ct(e,st,"f").call(e,n);else{e.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name)).forEach(ct(e,st,"f"))}e.disconnectListener(t)}static setProviderRemoval(e,t){ut.removalMap.set(e,t)}constructor(e,t,n){super(),it.set(this,void 0),rt.set(this,void 0),ot.set(this,void 0),st.set(this,(e=>{const t=this.connections.filter((t=>t.endpointId!==e.endpointId));ct(this,ot,"f").closeEndpoint(e.endpointId),dt(this,it,t,"f")})),this.processAction=async(e,t,n)=>(ut.clientIsMultiRuntime(n)&&!(0,lt.runtimeUuidMeetsMinimumRuntimeVersion)(n.runtimeUuid,"18.87.56.0")?this.handleMultiRuntimeLegacyClient(n):this.checkForClientConnection(n),super.processAction(e,t,n)),at.set(this,(()=>{ct(this,ot,"f").close();const e=ut.removalMap.get(this);e&&e()})),dt(this,rt,new ht.ProtectedItems(e,t),"f"),this.connectListener=()=>{},this.disconnectListener=()=>{},dt(this,it,[],"f"),dt(this,ot,n,"f"),n.receive(this.processAction)}dispatch(e,t,n){const i=e.endpointId??this.getEndpointIdForOpenFinId(e,t);return i&&ct(this,ot,"f").isEndpointConnected(i)?ct(this,ot,"f").send(i,t,n):Promise.reject(new Error(`Client connection with identity uuid: ${e.uuid} / name: ${e.name} / endpointId: ${i} no longer connected.`))}async processConnection(e,t){return ct(this,it,"f").push(e),this.connectListener(e,t)}publish(e,t){return this.connections.map((n=>ct(this,ot,"f").send(n.endpointId,e,t)))}onConnection(e){this.connectListener=e}onDisconnection(e){this.disconnectListener=e}async destroy(){const e=ct(this,rt,"f");e.providerIdentity,dt(this,it,[],"f"),await e.close(),ct(this,at,"f").call(this)}async getAllClientInfo(){return this.connections.map((e=>{const{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}=e;return{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}}))}checkForClientConnection(e){if(!this.isClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider.\n Client Identity: {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}isClientConnected(e){return ut.clientIdentityIncludesEndpointId(e)?this.connections.some((t=>t.endpointId===e.endpointId&&t.uuid===e.uuid&&t.name===e.name)):this.isLegacyClientConnected(e)}isLegacyClientConnected(e){return this.connections.some((t=>t.uuid===e.uuid&&t.name===e.name))}handleMultiRuntimeLegacyClient(e){if(!this.isLegacyClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider. Client Identity:\n {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}getEndpointIdForOpenFinId(e,t){const n=this.connections.filter((t=>t.name===e.name&&t.uuid===e.uuid));if(n.length>=2){const n=ct(this,rt,"f"),{uuid:i,name:r}=e,o=n?.providerIdentity.uuid,s=n?.providerIdentity.name;console.warn(`WARNING: Dispatch call may have unintended results. The "to" argument of your dispatch call is missing the\n "endpointId" parameter. The identity you are dispatching to ({uuid: ${i}, name: ${r}})\n has multiple channelClients for this channel. Your dispatched action: (${t}) from the provider:\n ({uuid: ${o}, name: ${s}}) will only be processed by the most recently-created client.`)}return n.pop()?.endpointId}static clientIdentityIncludesEndpointId(e){return void 0!==e.endpointId}static clientIsMultiRuntime(e){return void 0!==e.runtimeUuid}static async wireClose(e,t){await e.sendAction("destroy-channel",{channelName:t})}}Qe.ChannelProvider=ut,it=new WeakMap,rt=new WeakMap,ot=new WeakMap,st=new WeakMap,at=new WeakMap,ut.removalMap=new WeakMap;var pt={};Object.defineProperty(pt,"__esModule",{value:!0}),pt.MessageReceiver=void 0;const wt=ue,yt=d;class ft extends yt.Base{constructor(e){super(e),this.onmessage=e=>"process-channel-message"===e.action&&(this.processChannelMessage(e),!0),this.endpointMap=new Map,this.latestEndpointIdByChannelId=new Map,e.registerMessageHandler(this.onmessage.bind(this))}async processChannelMessage(e){const{senderIdentity:t,providerIdentity:n,action:i,ackToSender:r,payload:o,intendedTargetIdentity:s}=e.payload,a=s.channelId??s.endpointId??this.latestEndpointIdByChannelId.get(n.channelId),c=this.endpointMap.get(a);if(!c)return r.payload.success=!1,r.payload.reason=`Client connection with identity uuid: ${this.wire.me.uuid} / name: ${this.wire.me.name} / endpointId: ${a} no longer connected.`,this.wire.sendRaw(r);try{const e=await c(i,o,t);return r.payload.payload=r.payload.payload||{},r.payload.payload.result=e,this.wire.sendRaw(r)}catch(e){return r.payload.success=!1,r.payload.reason=e.message,this.wire.sendRaw(r)}}addEndpoint(e,t,n){this.endpointMap.set(n,e),t!==n&&this.latestEndpointIdByChannelId.set(t,n)}removeEndpoint(e,t){this.endpointMap.delete(t),this.latestEndpointIdByChannelId.get(e)===t&&this.latestEndpointIdByChannelId.delete(e)}checkForPreviousClientConnection(e){const t=this.latestEndpointIdByChannelId.get(e);t&&(wt.ChannelClient.closeChannelByEndpointId(t),console.warn("You have created a second connection to an older provider. First connection has been removed from the clientMap"),console.warn("If the provider calls publish(), you may receive multiple messages."))}}pt.MessageReceiver=ft;var gt={};Object.defineProperty(gt,"__esModule",{value:!0}),gt.ProtocolManager=void 0;gt.ProtocolManager=class{constructor(e){this.ProtocolsInPreferenceOrder=e,this.DefaultClientProtocols=["classic"],this.DefaultProviderProtocols=["classic"],this.getClientProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultClientProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(", ")}.`);return t},this.getProviderProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultProviderProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(", ")}.`);return t},this.getCompatibleProtocols=(e,t)=>t.supportedProtocols.filter((t=>e.some((e=>e.type===t.type&&t.version>=e.minimumVersion&&e.version>=(t.minimumVersion??0))))).slice(0,t.maxProtocols)}};var mt={};Object.defineProperty(mt,"__esModule",{value:!0});class vt{static combine(e,t){return new vt(e,t)}constructor(e,t){this.primary=e,this.secondary=t}onEndpointDisconnect(e,t){this.primary.onEndpointDisconnect(e,(()=>{this.secondary.isEndpointConnected(e)||t()})),this.secondary.onEndpointDisconnect(e,(()=>{this.primary.isEndpointConnected(e)||t()}))}isValidEndpointPayload(e){return this.primary.isValidEndpointPayload(e)||this.secondary.isValidEndpointPayload(e)}async closeEndpoint(e){await this.primary.closeEndpoint(e),await this.secondary.closeEndpoint(e)}isEndpointConnected(e){return this.primary.isEndpointConnected(e)||this.secondary.isEndpointConnected(e)}async addEndpoint(e,t){this.primary.isValidEndpointPayload(t)&&await this.primary.addEndpoint(e,t),this.secondary.isValidEndpointPayload(t)&&await this.secondary.addEndpoint(e,t)}receive(e){this.primary.receive(e),this.secondary.receive(e)}send(e,t,n){return this.primary.isEndpointConnected(e)?this.primary.send(e,t,n):this.secondary.send(e,t,n)}async close(){await Promise.all([this.primary.close(),this.secondary.close()])}}mt.default=vt;var Ct,bt,It=s&&s.__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},Et=s&&s.__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)},xt=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(xe,"__esModule",{value:!0}),xe.ConnectionManager=void 0;const At=Ae,Pt=d,Mt=Oe,_t=Fe,Ot=Je,St=Qe,Rt=pt,Ft=gt,jt=xt(mt);class kt extends Pt.Base{static getProtocolOptionsFromStrings(e){return e.map((e=>{switch(e){case"rtc":return _t.RTCInfo;case"classic":return Mt.ClassicInfo;default:return(0,At.exhaustiveCheck)(e,["rtc","classic"])}}))}constructor(e){super(e),Ct.set(this,void 0),bt.set(this,void 0),this.removeChannelFromProviderMap=e=>{this.providerMap.delete(e)},this.onmessage=e=>"process-channel-connection"===e.action&&(this.processChannelConnection(e),!0),this.providerMap=new Map,this.protocolManager=new Ft.ProtocolManager("node"===this.wire.environment.type?["classic"]:["rtc","classic"]),It(this,Ct,new Rt.MessageReceiver(e),"f"),It(this,bt,new Ot.RTCICEManager(e),"f"),e.registerMessageHandler(this.onmessage.bind(this))}createProvider(e,t){const n=Object.assign(this.wire.environment.getDefaultChannelOptions().create,e||{}),i=this.protocolManager.getProviderProtocols(n?.protocols),r=i.map((e=>{switch(e){case"rtc":return new _t.RTCStrategy;case"classic":return new Mt.ClassicStrategy(this.wire,Et(this,Ct,"f"),t.channelId,t);default:return(0,At.exhaustiveCheck)(e,["rtc","classic"])}}));let o;if(2===r.length){const[e,t]=r;o=jt.default.combine(e,t)}else{if(1!==r.length)throw new Error("failed to combine strategies");[o]=r}const s=new St.ChannelProvider(t,(()=>St.ChannelProvider.wireClose(this.wire,t.channelName)),o),a=t.channelId;return this.providerMap.set(a,{provider:s,strategy:o,supportedProtocols:kt.getProtocolOptionsFromStrings(i)}),St.ChannelProvider.setProviderRemoval(s,this.removeChannelFromProviderMap.bind(this)),s}async createClientOffer(e){const t=this.protocolManager.getClientProtocols(e?.protocols);let n;return{offer:{supportedProtocols:await Promise.all(t.map((async e=>{switch(e){case"rtc":{const{rtcClient:e,channels:t,offer:i,rtcConnectionId:r,channelsOpened:o}=await Et(this,bt,"f").startClientOffer();return n={rtcClient:e,channels:t,channelsOpened:o},{type:"rtc",version:_t.RTCInfo.version,payload:{offer:i,rtcConnectionId:r}}}case"classic":return{type:"classic",version:Mt.ClassicInfo.version};default:return(0,At.exhaustiveCheck)(e,["rtc","classic"])}}))),maxProtocols:2},rtc:n}}async createClientStrategy(e,t){t.endpointId||(t.endpointId=this.wire.environment.getNextMessageId(),Et(this,Ct,"f").checkForPreviousClientConnection(t.channelId));const n=t.answer??{supportedProtocols:[{type:"classic",version:1}]},i=(await Promise.all(n.supportedProtocols.map((async n=>"rtc"===n.type&&e?(await Et(this,bt,"f").finishClientOffer(e.rtcClient,n.payload.answer,e.channelsOpened),new _t.RTCStrategy):"classic"===n.type?new Mt.ClassicStrategy(this.wire,Et(this,Ct,"f"),t.endpointId,t):null)))).filter((e=>null!==e));let r;if(e&&!i.some((e=>e instanceof _t.RTCStrategy))&&e&&e.rtcClient.close(),i.length>=2)r=jt.default.combine(i[0],i[1]);else{if(!i.length)throw new Error("No compatible protocols");[r]=i}const o={endpointIdentity:t,rtc:e};return r.addEndpoint(t.channelId,o),r}async processChannelConnection(e){const{clientIdentity:t,providerIdentity:n,ackToSender:i,payload:r,offer:o}=e.payload;t.endpointId?t.isLocalEndpointId=!1:(t.endpointId=this.wire.environment.getNextMessageId(),t.isLocalEndpointId=!0);const s=n.channelId,a=this.providerMap.get(s);if(!a)return i.payload.success=!1,i.payload.reason=`Channel "${n.channelName}" has been destroyed.`,this.wire.sendRaw(i);const{provider:c,strategy:d,supportedProtocols:h}=a;try{if(!(c instanceof St.ChannelProvider))throw Error("Cannot connect to a channel client");const e=o??{supportedProtocols:[{type:"classic",version:1}],maxProtocols:1},n=this.protocolManager.getCompatibleProtocols(h,e);if(!n.length)throw new Error("This provider does not support any of the offered protocols.");const s=await c.processConnection(t,r);i.payload.payload=i.payload.payload||{};let a={supportedProtocols:[],endpointPayloadPromise:Promise.resolve({endpointIdentity:t})};return a=await n.reduce((async(e,t)=>{const n=await e;if("rtc"===t.type){const{answer:e,rtcClient:i,channels:r}=await Et(this,bt,"f").createProviderAnswer(t.payload.rtcConnectionId,t.payload.offer);n.supportedProtocols.push({type:"rtc",version:_t.RTCInfo.version,payload:{answer:e}}),n.endpointPayloadPromise=n.endpointPayloadPromise.then((e=>r.then((t=>({...e,rtc:{rtcClient:i,channels:t}})))))}else n.supportedProtocols.push({type:"classic",version:Mt.ClassicInfo.version});return n}),Promise.resolve(a)),a.endpointPayloadPromise.then((e=>d.addEndpoint(t.endpointId,e))),i.payload.payload.result=s,i.payload.payload.answer=a,this.wire.sendRaw(i)}catch(e){return i.payload.success=!1,i.payload.reason=e.message,this.wire.sendRaw(i)}}}xe.ConnectionManager=kt,Ct=new WeakMap,bt=new WeakMap;var Lt,Tt,$t,Bt=s&&s.__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},Gt=s&&s.__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)};Object.defineProperty(le,"__esModule",{value:!0}),le.Channel=void 0;const Wt=t,Ht=G,Nt=d,Dt=ue,Ut=xe,Vt=Qe;function zt(e){const t=Math.floor(e/10),n=Math.min(3e4,500*2**t);return new Promise((e=>{setTimeout((()=>{e(!1)}),n)}))}class Kt extends Nt.EmitterBase{constructor(e){super(e,"channel"),Lt.set(this,void 0),Tt.set(this,new Wt.EventEmitter),$t.set(this,new Ht.AsyncRetryableLazy((async()=>{await Promise.all([this.on("disconnected",(e=>{Dt.ChannelClient.handleProviderDisconnect(e)})),this.on("connected",((...e)=>{Gt(this,Tt,"f").emit("connected",...e)}))]).catch((()=>new Error("error setting up channel connection listeners")))}))),Bt(this,Lt,new Ut.ConnectionManager(e),"f")}async getAllChannels(){return this.wire.sendAction("get-all-channels").then((({payload:e})=>e.data))}async onChannelConnect(e){await this.on("connected",e)}async onChannelDisconnect(e){await this.on("disconnected",e)}async safeConnect(e,t,n){const i={count:0};do{let r=()=>{};const o=new Promise((t=>{r=n=>{e===n.channelName&&t(!0)},Gt(this,Tt,"f").on("connected",r)}));try{if(i.count>0){i.gotConnectedEvent=await Promise.race([zt(i.count),o]);const t=await this.wire.sendAction("connect-to-channel",{...n,retryInfo:i});return console.log(`Successfully connected to channelName: ${e}`),t.payload.data}const t=this.wire.sendAction("connect-to-channel",n);i.originalMessageId=t.messageId;return(await t).payload.data}catch(n){if(!n.message.includes("internal-nack"))throw n;t&&0===i.count&&console.warn(`No channel found for channelName: ${e}. Waiting for connection...`)}finally{i.count+=1,Gt(this,Tt,"f").removeListener("connected",r)}}while(t);throw new Error(`No channel found for channelName: ${e}.`)}async connect(e,t={}){if(await Gt(this,$t,"f").getValue(),!e||"string"!=typeof e)throw new Error("Please provide a channelName string to connect to a channel.");const n={wait:!0,...this.wire.environment.getDefaultChannelOptions().connect,...t},{offer:i,rtc:r}=await Gt(this,Lt,"f").createClientOffer(n);let o;(this.fin.me.isFrame||this.fin.me.isView||this.fin.me.isWindow)&&(o=(await this.fin.me.getInfo()).url);const s={channelName:e,...n,offer:i,connectionUrl:o},a=await this.safeConnect(e,n.wait,s),c=await Gt(this,Lt,"f").createClientStrategy(r,a),d=new Dt.ChannelClient(a,(()=>Dt.ChannelClient.wireClose(this.wire,a,a.endpointId)),c);return c.onEndpointDisconnect(a.channelId,(async()=>{try{await d.sendDisconnectAction()}catch(e){console.warn(`Something went wrong during disconnect for client with uuid: ${a.uuid} / name: ${a.name} / endpointId: ${a.endpointId}.`)}finally{Dt.ChannelClient.handleProviderDisconnect(a)}})),d}async create(e,t){if(!e)throw new Error("Please provide a channelName to create a channel");const{payload:{data:n}}=await this.wire.sendAction("create-channel",{channelName:e}),i=Gt(this,Lt,"f").createProvider(t,n);return this.on("client-disconnected",(t=>{t.channelName===e&&Vt.ChannelProvider.handleClientDisconnection(i,t)})),i}}le.Channel=Kt,Lt=new WeakMap,Tt=new WeakMap,$t=new WeakMap,Object.defineProperty(de,"__esModule",{value:!0}),de.InterAppPayload=de.InterApplicationBus=void 0;const qt=t,Jt=d,Yt=he,Zt=le,Qt=O;class Xt extends Jt.Base{constructor(e){super(e),this.events={subscriberAdded:"subscriber-added",subscriberRemoved:"subscriber-removed"},this.refCounter=new Yt.RefCounter,this.Channel=new Zt.Channel(e),this.emitter=new qt.EventEmitter,e.registerMessageHandler(this.onmessage.bind(this)),this.on=this.emitter.on.bind(this.emitter),this.removeAllListeners=this.emitter.removeAllListeners.bind(this.emitter)}async publish(e,t){await this.wire.sendAction("publish-message",{topic:e,message:t,sourceWindowName:this.me.name})}async send(e,t,n){const i=(0,Qt.validateIdentity)(e);if(i)throw new Error(i);await this.wire.sendAction("send-message",{destinationUuid:e.uuid,destinationWindowName:e.name,topic:t,message:n,sourceWindowName:this.me.name})}subscribe(e,t,n){const i=this.createSubscriptionKey(e.uuid,e.name||"*",t);return this.emitter.on(i,n),this.refCounter.actOnFirst(i,(async()=>{await this.wire.sendAction("subscribe",{sourceUuid:e.uuid,sourceWindowName:e.name||"*",topic:t,destinationWindowName:this.me.name})}),(()=>Promise.resolve()))}unsubscribe(e,t,n){const i=e.name||"*",r=this.createSubscriptionKey(e.uuid,i,t);return this.emitter.removeListener(r,n),this.refCounter.actOnLast(r,(async()=>{await this.wire.sendAction("unsubscribe",{sourceUuid:e.uuid,sourceWindowName:i,topic:t,destinationWindowName:this.me.name})}),(()=>new Promise((e=>e)).then((()=>{}))))}processMessage(e){const{payload:{message:t,sourceWindowName:n,sourceUuid:i,topic:r}}=e,o=[this.createSubscriptionKey(i,n,r),this.createSubscriptionKey(i,"*",r),this.createSubscriptionKey("*","*",r)],s={uuid:i,name:n};o.forEach((e=>{this.emitter.emit(e,t,s)}))}emitSubscriverEvent(e,t){const{payload:{targetName:n,uuid:i,topic:r}}=t,o={name:n,uuid:i,topic:r};this.emitter.emit(e,o)}createSubscriptionKey(e,t,n){const i=t||"*";if(!(e&&i&&n))throw new Error("Missing uuid, name, or topic string");return function(...e){return e.map((e=>Buffer.from(`${e}`).toString("base64"))).join("/")}(e,i,n)}onmessage(e){const{action:t}=e;switch(t){case"process-message":this.processMessage(e);break;case this.events.subscriberAdded:this.emitSubscriverEvent(this.events.subscriberAdded,e);break;case this.events.subscriberRemoved:this.emitSubscriverEvent(this.events.subscriberRemoved,e)}return!0}}de.InterApplicationBus=Xt;de.InterAppPayload=class{};var en={};Object.defineProperty(en,"__esModule",{value:!0}),en.Clipboard=void 0;const tn=d;class nn extends tn.Base{async writeText(e){await this.wire.sendAction("clipboard-write-text",e)}async readText(e){const{payload:t}=await this.wire.sendAction("clipboard-read-text",{type:e});return t.data}async writeImage(e){await this.wire.sendAction("clipboard-write-image",e)}async readImage(e={format:"dataURL"}){const{payload:t}=await this.wire.sendAction("clipboard-read-image",e);return t.data}async writeHtml(e){await this.wire.sendAction("clipboard-write-html",e)}async readHtml(e){const{payload:t}=await this.wire.sendAction("clipboard-read-html",{type:e});return t.data}async writeRtf(e){await this.wire.sendAction("clipboard-write-rtf",e)}async readRtf(e){const{payload:t}=await this.wire.sendAction("clipboard-read-rtf",{type:e});return t.data}async write(e){await this.wire.sendAction("clipboard-write",e)}async getAvailableFormats(e){const{payload:t}=await this.wire.sendAction("clipboard-read-formats",{type:e});return t.data}}en.Clipboard=nn;var rn={},on={},sn={};Object.defineProperty(sn,"__esModule",{value:!0}),sn.ExternalApplication=void 0;const an=d;class cn extends an.EmitterBase{constructor(e,t){super(e,"external-application",t.uuid),this.identity=t}getInfo(){return this.wire.sendAction("get-external-application-info",this.identity).then((({payload:e})=>e.data))}}sn.ExternalApplication=cn,Object.defineProperty(on,"__esModule",{value:!0}),on.ExternalApplicationModule=void 0;const dn=d,hn=sn;class ln extends dn.Base{wrap(e){return this.wire.sendAction("external-application-wrap").catch((e=>{})),Promise.resolve(new hn.ExternalApplication(this.wire,{uuid:e}))}wrapSync(e){return this.wire.sendAction("external-application-wrap-sync").catch((e=>{})),new hn.ExternalApplication(this.wire,{uuid:e})}}on.ExternalApplicationModule=ln,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(on,e),n(sn,e)}(rn);var un={},pn={},wn={};Object.defineProperty(wn,"__esModule",{value:!0}),wn._Frame=void 0;const yn=d;class fn extends yn.EmitterBase{constructor(e,t){super(e,"frame",t.uuid,t.name),this.identity=t}getInfo(){return this.wire.sendAction("get-frame-info",this.identity).then((({payload:e})=>e.data))}getParentWindow(){return this.wire.sendAction("get-parent-window",this.identity).then((({payload:e})=>e.data))}}wn._Frame=fn,Object.defineProperty(pn,"__esModule",{value:!0}),pn._FrameModule=void 0;const gn=d,mn=O,vn=wn;class Cn extends gn.Base{async wrap(e){this.wire.sendAction("frame-wrap").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}wrapSync(e){this.wire.sendAction("frame-wrap-sync").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}getCurrent(){return this.wire.sendAction("frame-get-current").catch((e=>{})),Promise.resolve(new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity()))}getCurrentSync(){return this.wire.sendAction("frame-get-current-sync").catch((e=>{})),new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity())}}pn._FrameModule=Cn,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(pn,e),n(wn,e)}(un);var bn={};Object.defineProperty(bn,"__esModule",{value:!0}),bn.GlobalHotkey=void 0;const In=d;class En extends In.EmitterBase{constructor(e){super(e,"global-hotkey")}async register(e,t){await this.on(e,t),await this.wire.sendAction("global-hotkey-register",{hotkey:e})}async unregister(e){await this.removeAllListeners(e),await this.wire.sendAction("global-hotkey-unregister",{hotkey:e})}async unregisterAll(){await Promise.all(this.eventNames().filter((e=>!("registered"===e||"unregistered"===e))).map((e=>this.removeAllListeners(e)))),await this.wire.sendAction("global-hotkey-unregister-all",{})}async isRegistered(e){const{payload:{data:t}}=await this.wire.sendAction("global-hotkey-is-registered",{hotkey:e});return t}}bn.GlobalHotkey=En;var xn,An={},Pn={},Mn={},_n=s&&s.__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)};Object.defineProperty(Mn,"__esModule",{value:!0}),Mn.Platform=void 0;const On=d,Sn=O,Rn=new Map;class Fn extends On.EmitterBase{constructor(e,t){super(t.wire,"application",e.uuid),this.getClient=e=>{this.wire.sendAction("platform-get-client",this.identity).catch((e=>{}));const t=e||this.identity,{uuid:n}=t;if(!Rn.has(n)){const e=_n(this,xn,"f").call(this,n);Rn.set(n,e)}return Rn.get(n)},xn.set(this,(async e=>{try{const t=`custom-frame-${e}`,n=await this._channel.connect(t,{wait:!1});return n.onDisconnection((()=>{Rn.delete(e)})),n}catch(t){throw Rn.delete(e),new Error("The targeted Platform is not currently running. Listen for application-started event for the given Uuid.")}})),this.launchLegacyManifest=this.launchContentManifest;const n=(0,Sn.validateIdentity)(e);if(n)throw new Error(n);this._channel=t,this.identity={uuid:e.uuid},this.Layout=this.fin.Platform.Layout,this.Application=this.fin.Application.wrapSync(this.identity)}async createView(e,t,n){this.wire.sendAction("platform-create-view",this.identity).catch((e=>{}));const i=await this.getClient(),r=await i.dispatch("create-view",{target:t,opts:e,targetView:n});if(!r||(0,Sn.validateIdentity)(r.identity))throw new Error(`When overwriting the createView call, please return an object that has a valid 'identity' property: ${JSON.stringify(r)}`);return this.fin.View.wrapSync(r.identity)}async createWindow(e){this.wire.sendAction("platform-create-window",this.identity).catch((e=>{}));const t=await this.getClient();e.reason||(e.reason="api-call");const n=await t.dispatch("create-view-container",e);if(!n||(0,Sn.validateIdentity)(n.identity))throw new Error(`When overwriting the createWindow call, please return an object that has a valid 'identity' property: ${JSON.stringify(n)}`);const{identity:i}=n,r=this.fin.Window.wrapSync(i);return r.name=i.name,r.uuid=i.uuid,r}async quit(){this.wire.sendAction("platform-quit",this.identity).catch((e=>{}));return(await this.getClient()).dispatch("quit")}async closeView(e){this.wire.sendAction("platform-close-view",this.identity).catch((e=>{}));const t=await this.getClient();await t.dispatch("close-view",{view:e})}async reparentView(e,t){console.warn("Platform.reparentView has been deprecated, please use Platform.createView"),this.wire.sendAction("platform-reparent-view",this.identity).catch((e=>{}));const n={...e,uuid:e.uuid??this.identity.uuid},i=await this.fin.View.wrap(n),r=await i.getOptions();return this.createView(r,t)}async getSnapshot(){this.wire.sendAction("platform-get-snapshot",this.identity).catch((e=>{}));return(await this.getClient()).dispatch("get-snapshot")}async getViewSnapshot(e){return(await this.getClient()).dispatch("get-view-snapshot",{viewIdentity:e})}async applySnapshot(e,t){this.wire.sendAction("platform-apply-snapshot",this.identity).catch((e=>{}));const n="Requested snapshot must be a valid Snapshot object, or a url or filepath to such an object.";let i;if("string"==typeof e)try{i=(await this._channel.wire.sendAction("get-application-manifest",{manifestUrl:e})).payload.data}catch(e){throw new Error(`${n}: ${e}`)}else i=e;if(!i.windows)throw new Error(n);const r=await this.getClient();return await r.dispatch("apply-snapshot",{snapshot:i,options:t}),this}async fetchManifest(e){return(await this.getClient()).dispatch("platform-fetch-manifest",{manifestUrl:e})}async launchContentManifest(e){this.wire.sendAction("platform-launch-content-manifest",this.identity).catch((()=>{}));const t=await this.getClient(),n=await this.fetchManifest(e);return t.dispatch("launch-into-platform",{manifest:n,manifestUrl:e}),this}async setWindowContext(e={},t){if(this.wire.sendAction("platform-set-window-context",this.identity).catch((e=>{})),!e)throw new Error("Please provide a serializable object or string to set the context.");const n=await this.getClient(),{entityType:i}=t?await this.fin.System.getEntityInfo(t.uuid,t.name):this.fin.me;await n.dispatch("set-window-context",{context:e,entityType:i,target:t||{uuid:this.fin.me.uuid,name:this.fin.me.name}})}async getWindowContext(e){this.wire.sendAction("platform-get-window-context",this.identity).catch((e=>{}));const t=await this.getClient(),{entityType:n}=e?await this.fin.System.getEntityInfo(e.uuid,e.name):this.fin.me;return t.dispatch("get-window-context",{target:e||{uuid:this.fin.me.uuid,name:this.fin.me.name},entityType:n})}async closeWindow(e,t={skipBeforeUnload:!1}){this.wire.sendAction("platform-close-window",this.identity).catch((e=>{}));return(await this.getClient()).dispatch("close-window",{windowId:e,options:t})}}Mn.Platform=Fn,xn=new WeakMap;var jn={},kn={},Ln={},Tn={};function $n(e){switch(e){case"columns":case"grid":case"rows":case"tabs":return!0;default:return!1}}Object.defineProperty(Tn,"__esModule",{value:!0}),Tn.overrideFromComposables=Tn.isValidPresetType=void 0,Tn.isValidPresetType=$n,Tn.overrideFromComposables=function(...e){return t=>e.reduceRight(((e,t)=>n=>t(e(n))),(e=>e))(t)},Tn.default={isValidPresetType:$n};var Bn={},Gn={},Wn={};Object.defineProperty(Wn,"__esModule",{value:!0}),Wn.ApiConsumer=void 0;Wn.ApiConsumer=class{constructor(e){this.strategy=e,this.consume=async e=>(await this.strategy.getExposedFunctions(e)).reduce(((t,n)=>({...t,[n.key]:this.strategy.createFunction(n,e)})),{})}};var Hn={},Nn={};Object.defineProperty(Nn,"__esModule",{value:!0}),Nn.expose=Nn.getExposedProperties=void 0;const Dn=Symbol("exposedProperties");Nn.getExposedProperties=e=>e[Dn]||e.prototype[Dn]||[];Nn.expose=e=>(t,n,i)=>{t[Dn]=t[Dn]||[],t[Dn].push({key:n,descriptor:i,options:e})},Object.defineProperty(Hn,"__esModule",{value:!0}),Hn.ApiExposer=void 0;const Un=Nn;Hn.ApiExposer=class{constructor(e){this.strategy=e,this.exposeInstance=async(e,t)=>{const n=(0,Un.getExposedProperties)(e),i=await Promise.all(n.map((async({key:n,options:i})=>({key:n,options:await this.strategy.exposeFunction(e[n].bind(e),{key:n,options:i,meta:t})}))));await this.strategy.exposeMeta(t,i)}}};var Vn={},zn={},Kn={};Object.defineProperty(Kn,"__esModule",{value:!0}),Kn.ChannelsConsumer=void 0;Kn.ChannelsConsumer=class{constructor(e){this.channel=e,this.getExposedFunctions=async e=>{const{id:t}=e,{props:n}=await this.channel.dispatch(`api-meta:${t}`);return n},this.createFunction=e=>(...t)=>{const{action:n}=e.options;return this.channel.dispatch(n,{args:t})}}};var qn={};Object.defineProperty(qn,"__esModule",{value:!0}),qn.ChannelsExposer=void 0;qn.ChannelsExposer=class{constructor(e){this.channelProviderOrClient=e,this.exposeFunction=async(e,t)=>{const{key:n,options:i,meta:r}=t,{id:o}=r,s=`${o}.${i?.action||n}`;return await this.channelProviderOrClient.register(s,(async({args:t})=>e(...t))),{action:s}},this.exposeMeta=async({id:e},t)=>{const n=`api-meta:${e}`;await this.channelProviderOrClient.register(n,(()=>({props:t})))}}},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Kn,e),n(qn,e)}(zn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(zn,e)}(Vn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Wn,e),n(Hn,e),n(Vn,e),n(Nn,e)}(Gn);var Jn={};Object.defineProperty(Jn,"__esModule",{value:!0}),Jn.createRelayedDispatch=exports.relayChannelClientApi_1=Jn.relayChannelClientApi=void 0;const Yn=["no longer connected","RTCDataChannel closed unexpectedly","The client you are trying to dispatch from is disconnected from the target provider"];exports.relayChannelClientApi_1=Jn.relayChannelClientApi=async(e,t)=>{e.register(`relay:${t}`,(({action:t,target:n,payload:i})=>e.dispatch(n,t,i))),await Promise.resolve()};Jn.createRelayedDispatch=(e,t,n,i)=>async(r,o)=>{try{return await e.dispatch(`relay:${n}`,{action:r,payload:o,target:t})}catch(e){if(s=e.message,Yn.some((e=>s.includes(e)))&&i)throw new Error(i);throw e}var s};var Zn,Qn,Xn,ei=s&&s.__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},ti=s&&s.__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)};Object.defineProperty(Bn,"__esModule",{value:!0}),Bn.ColumnOrRow=Bn.TabStack=Bn.LayoutNode=void 0;const ni=Gn,ii=Jn;class ri{constructor(e,t){Zn.set(this,void 0),this.isRoot=()=>ti(this,Zn,"f").isRoot(this.entityId),this.exists=()=>ti(this,Zn,"f").exists(this.entityId),this.getParent=async()=>{const e=await ti(this,Zn,"f").getParent(this.entityId);if(e)return ri.getEntity(e,ti(this,Zn,"f"))},this.createAdjacentStack=async(e,t)=>{const n=await ti(this,Zn,"f").createAdjacentStack(this.entityId,e,t);return ri.getEntity({entityId:n,type:"stack"},ti(this,Zn,"f"))},this.getAdjacentStacks=async e=>(await ti(this,Zn,"f").getAdjacentStacks({targetId:this.entityId,edge:e})).map((e=>ri.getEntity({type:"stack",entityId:e.entityId},ti(this,Zn,"f")))),ei(this,Zn,e,"f"),this.entityId=t}}Bn.LayoutNode=ri,Zn=new WeakMap,ri.newLayoutEntitiesClient=async(e,t,n)=>{const i=(0,ii.createRelayedDispatch)(e,n,"layout-relay","You are trying to interact with a layout component on a window that does not exist or has been destroyed.");return new ni.ApiConsumer(new ni.ChannelsConsumer({dispatch:i})).consume({id:t})},ri.getEntity=(e,t)=>{const{entityId:n,type:i}=e;switch(i){case"column":case"row":return new si(t,n,i);case"stack":return new oi(t,n);default:throw new Error(`Unrecognised Layout Entity encountered ('${JSON.stringify(e)})`)}};class oi extends ri{constructor(e,t){super(e,t),Qn.set(this,void 0),this.type="stack",this.getViews=()=>ti(this,Qn,"f").getStackViews(this.entityId),this.addView=async(e,t={index:0})=>ti(this,Qn,"f").addViewToStack(this.entityId,e,t),this.removeView=async e=>{await ti(this,Qn,"f").removeViewFromStack(this.entityId,e)},this.setActiveView=async e=>{await ti(this,Qn,"f").setStackActiveView(this.entityId,e)},ei(this,Qn,e,"f")}}Bn.TabStack=oi,Qn=new WeakMap;class si extends ri{constructor(e,t,n){super(e,t),Xn.set(this,void 0),this.getContent=async()=>(await ti(this,Xn,"f").getContent(this.entityId)).map((e=>ri.getEntity(e,ti(this,Xn,"f")))),ei(this,Xn,e,"f"),this.type=n}}Bn.ColumnOrRow=si,Xn=new WeakMap;var ai={};Object.defineProperty(ai,"__esModule",{value:!0}),ai.DEFAULT_LAYOUT_KEY=ai.LAYOUT_CONTROLLER_ID=void 0,ai.LAYOUT_CONTROLLER_ID="layout-entities",ai.DEFAULT_LAYOUT_KEY="__default__";var ci,di,hi,li=s&&s.__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)};Object.defineProperty(Ln,"__esModule",{value:!0}),Ln.Layout=void 0;const ui=G,pi=O,wi=d,yi=Tn,fi=Bn,gi=ai;class mi extends wi.Base{static getClient(e){return li(e,di,"f").getValue()}constructor(e,t){super(t),ci.add(this),di.set(this,new ui.Lazy((async()=>fi.LayoutNode.newLayoutEntitiesClient(await this.platform.getClient(),gi.LAYOUT_CONTROLLER_ID,this.identity)))),this.replace=async e=>{this.wire.sendAction("layout-replace").catch((e=>{}));const t=await this.platform.getClient();await t.dispatch("replace-layout",{target:this.identity,opts:{layout:e}})},this.replaceView=async(e,t)=>{this.wire.sendAction("layout-replace-view").catch((e=>{}));const n=await this.platform.getClient();await n.dispatch("replace-view",{target:this.identity,opts:{viewToReplace:e,newView:t}})},this.applyPreset=async e=>{this.wire.sendAction("layout-apply-preset").catch((e=>{}));const t=await this.platform.getClient(),{presetType:n}=e;if(!n||!(0,yi.isValidPresetType)(n))throw new Error("Cannot apply preset layout, please include an applicable presetType property in the PresetLayoutOptions.");await t.dispatch("apply-preset-layout",{target:this.identity,opts:{presetType:n}})};const n=(0,pi.validateIdentity)(e);if(n)throw new Error(n);this.identity=e,this.platform=this.fin.Platform.wrapSync({uuid:e.uuid}),e.uuid===this.fin.me.uuid&&e.name===this.fin.me.name&&(this.init=this.fin.Platform.Layout.init)}async getConfig(){this.wire.sendAction("layout-get-config").catch((e=>{}));return(await this.platform.getClient()).dispatch("get-frame-snapshot",{target:this.identity})}async getCurrentViews(){this.wire.sendAction("layout-get-views").catch((e=>{}));const e=await this.platform.getClient();return(await e.dispatch("get-layout-views",{target:this.identity})).map((e=>this.fin.View.wrapSync(e)))}async getRootItem(){this.wire.sendAction("layout-get-root-item").catch((()=>{}));const e=await li(this,di,"f").getValue(),t=await e.getRoot("layoutName"in this.identity?this.identity:void 0);return fi.LayoutNode.getEntity(t,e)}async getStackByViewIdentity(e){this.wire.sendAction("layout-get-stack-by-view").catch((()=>{}));const t=await li(this,di,"f").getValue(),n=await t.getStackByView(e);if(!n)throw new Error(`No stack found for view: ${e.uuid}/${e.name}`);return fi.LayoutNode.getEntity(n,t)}async addView(e,{location:t,targetView:n}={}){this.wire.sendAction("layout-add-view").catch((e=>{}));const{identity:i}=await li(this,ci,"m",hi).call(this,"layout-add-view",{viewOptions:e,location:t,targetView:n});return{identity:i}}async closeView(e){this.wire.sendAction("layout-close-view").catch((e=>{})),await li(this,ci,"m",hi).call(this,"layout-close-view",{viewIdentity:e})}}Ln.Layout=mi,di=new WeakMap,ci=new WeakSet,hi=async function(e,t){return(await this.platform.getClient()).dispatch(e,{target:this.identity,opts:t})};var vi,Ci,bi,Ii,Ei,xi=s&&s.__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)},Ai=s&&s.__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};Object.defineProperty(kn,"__esModule",{value:!0}),kn.LayoutModule=void 0;const Pi=d,Mi=Ln,_i=ai;class Oi extends Pi.Base{constructor(){super(...arguments),vi.add(this),Ci.set(this,!1),bi.set(this,null),this.init=async(e={})=>{if(this.wire.sendAction("layout-init").catch((e=>{})),!this.wire.environment.layoutAllowedInContext(this.fin))throw new Error("Layout.init can only be called from a Window context.");if(xi(this,Ci,"f"))throw new Error("Layout.init was already called, please use Layout.create to add additional layouts.");"openfin"===this.wire.environment.type&&await this.fin.Platform.getCurrentSync().getClient(),Ai(this,Ci,!0,"f"),Ai(this,bi,await this.wire.environment.initLayoutManager(this.fin,this.wire,e),"f"),await this.wire.environment.applyLayoutSnapshot(this.fin,xi(this,bi,"f"),e);const t={name:this.fin.me.name,uuid:this.fin.me.uuid};if(!e.layoutManagerOverride){const e={layoutName:_i.DEFAULT_LAYOUT_KEY,...t};return xi(this,Ii,"f").call(this,e)}return this.wrapSync(t)},Ii.set(this,(e=>{const t="[Layout] You are using a deprecated property `layoutManager` - it will throw if you access it starting in v37.",n=new Proxy({},{get(e,n){throw console.warn(`[Layout-mgr-proxy] accessing ${n.toString()}`),new Error(t)}}),i=Object.assign(this.wrapSync(e),{layoutManager:n});return new Proxy(i,{get(e,n){if("layoutManager"===n)throw console.warn(`[Layout-proxy] accessing ${n.toString()}`),new Error(t);return e[n]}})})),this.getCurrentLayoutManagerSync=()=>xi(this,vi,"m",Ei).call(this,"fin.Platform.Layout.getCurrentLayoutManagerSync()"),this.create=async e=>this.wire.environment.createLayout(xi(this,vi,"m",Ei).call(this,"fin.Platform.Layout.create()"),e),this.destroy=async e=>this.wire.environment.destroyLayout(xi(this,vi,"m",Ei).call(this,"fin.Platform.Layout.destroy()"),e)}async wrap(e){return this.wire.sendAction("layout-wrap").catch((e=>{})),new Mi.Layout(e,this.wire)}wrapSync(e){return this.wire.sendAction("layout-wrap-sync").catch((e=>{})),new Mi.Layout(e,this.wire)}async getCurrent(){if(this.wire.sendAction("layout-get-current").catch((e=>{})),"openfin"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error("You are not in a Window context. Only Windows can have a Layout.");const{uuid:e,name:t}=this.fin.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction("layout-get-current-sync").catch((e=>{})),"openfin"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error("You are not in a Window context. Only Windows can have a Layout.");const{uuid:e,name:t}=this.fin.me;return this.wrapSync({uuid:e,name:t})}async getLayoutByViewIdentity(e){this.wire.sendAction("layout-get-by-view-identity").catch((()=>{}));let t=await this.wire.environment.getViewWindowIdentity(this.fin,e);t.identity&&(t=t.identity);try{const n=this.wrapSync(t),i=await Mi.Layout.getClient(n),r=await i.getLayoutIdentityForViewOrThrow(e);return this.wrapSync(r)}catch(n){if(!["No action registered at target for","getLayoutIdentityForViewOrThrow is not a function"].some((e=>n.message.includes(e))))throw n;if(t.uuid===t.name)throw new Error(`View identity ${JSON.stringify(e)} is not attached to any layout in provider window ${JSON.stringify(t)}.`);return this.wrapSync(t)}}}kn.LayoutModule=Oi,Ci=new WeakMap,bi=new WeakMap,Ii=new WeakMap,vi=new WeakSet,Ei=function(e){if(!xi(this,bi,"f"))throw new Error(`You must call init before using the API ${e}`);return xi(this,bi,"f")},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(kn,e),n(Ln,e)}(jn),Object.defineProperty(Pn,"__esModule",{value:!0}),Pn.PlatformModule=void 0;const Si=d,Ri=Mn,Fi=jn;class ji extends Si.Base{constructor(e,t){super(e),this._channel=t,this.Layout=new Fi.LayoutModule(this.wire)}async init(e){if(!fin.__internal_.isPlatform||fin.me.name!==fin.me.uuid)throw new Error("fin.Platform.init should only be called from a custom platform provider running in the main window of the application.");return this.wire.environment.initPlatform(this.fin,e)}async wrap(e){return this.wire.sendAction("platform-wrap").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}wrapSync(e){return this.wire.sendAction("platform-wrap-sync").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}async getCurrent(){return this.wire.sendAction("platform-get-current").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction("platform-get-current-sync").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}start(e){return this.wire.sendAction("platform-start").catch((e=>{})),new Promise((async(t,n)=>{try{const{uuid:n}=e,i=await this.fin.Application._create({...e,isPlatformController:!0});i.once("platform-api-ready",(()=>t(this.wrapSync({uuid:n})))),i._run({uuid:n})}catch(e){n(e)}}))}startFromManifest(e,t){return this.wire.sendAction("platform-start-from-manifest").catch((e=>{})),new Promise((async(n,i)=>{try{const i=await this.fin.Application._createFromManifest(e);i.once("platform-api-ready",(()=>n(this.wrapSync({uuid:i.identity.uuid})))),i._run(t)}catch(e){i(e)}}))}}Pn.PlatformModule=ji,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Pn,e),n(Mn,e)}(An);var ki={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getMe=e.getBaseMe=e.environmentUnsupportedMessage=void 0;const t=J(),n=un,i=ie(),r=rn;function o(e,t,n){return{...{isView:"view"===e,isWindow:"window"===e,isFrame:"iframe"===e,isExternal:"external connection"===e},uuid:t,name:n,entityType:e}}e.environmentUnsupportedMessage="You are not running in OpenFin.",e.getBaseMe=o,e.getMe=function(s){const{uuid:a,name:c,entityType:d}=s.me,h={setContext(){throw new Error(e.environmentUnsupportedMessage)},addContextHandler(){throw new Error(e.environmentUnsupportedMessage)},getContextGroups(){throw new Error(e.environmentUnsupportedMessage)},joinContextGroup(){throw new Error(e.environmentUnsupportedMessage)},removeFromContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getAllClientsInContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getInfoForContextGroup(){throw new Error(e.environmentUnsupportedMessage)}},l="Interop API has not been instantiated. Either connection has failed or you have not declared interop in your config.",u={setContext(){throw new Error(l)},addContextHandler(){throw new Error(l)},getContextGroups(){throw new Error(l)},joinContextGroup(){throw new Error(l)},removeFromContextGroup(){throw new Error(l)},getAllClientsInContextGroup(){throw new Error(l)},getInfoForContextGroup(){throw new Error(l)}},p={eventNames:()=>{throw new Error(e.environmentUnsupportedMessage)},emit:()=>{throw new Error(e.environmentUnsupportedMessage)},listeners:()=>{throw new Error(e.environmentUnsupportedMessage)},listenerCount:()=>{throw new Error(e.environmentUnsupportedMessage)},on:()=>{throw new Error(e.environmentUnsupportedMessage)},addListener:()=>{throw new Error(e.environmentUnsupportedMessage)},once:()=>{throw new Error(e.environmentUnsupportedMessage)},prependListener:()=>{throw new Error(e.environmentUnsupportedMessage)},prependOnceListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeAllListeners:()=>{throw new Error(e.environmentUnsupportedMessage)}};switch(d){case"view":return Object.assign(new t.View(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case"window":return Object.assign(new i._Window(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case"iframe":return Object.assign(new n._Frame(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case"external connection":return Object.assign(new r.ExternalApplication(s,{uuid:a}),o(d,a,c),{interop:u,isOpenFin:!1});default:return{...o(d,a,c),...p,interop:h,isOpenFin:!1}}}}(ki);var Li={},Ti={},$i={};Object.defineProperty($i,"__esModule",{value:!0}),$i.createWarningObject=$i.createUnusableObject=void 0,$i.createUnusableObject=function(e){const t=()=>{throw new Error(e)};return new Proxy({},{apply:t,construct:t,defineProperty:t,deleteProperty:t,get:t,getOwnPropertyDescriptor:t,getPrototypeOf:t,has:t,isExtensible:t,ownKeys:t,preventExtensions:t,set:t,setPrototypeOf:t})},$i.createWarningObject=function(e,t){return new Proxy(t,{get:(...t)=>(console.warn(e),Reflect.get(...t)),set:(...t)=>(console.warn(e),Reflect.set(...t)),getOwnPropertyDescriptor:(...t)=>(console.warn(e),Reflect.getOwnPropertyDescriptor(...t)),ownKeys:(...t)=>(console.warn(e),Reflect.ownKeys(...t))})};var Bi,Gi={},Wi={};var Hi={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.wrapIntentHandler=e.BROKER_ERRORS=e.generateOverrideWarning=e.generateOverrideError=e.wrapContextHandler=e.wrapInTryCatch=e.generateId=void 0;e.generateId=()=>`${Math.random()}${Date.now()}`;e.wrapInTryCatch=(e,t)=>(...n)=>{try{return e(...n)}catch(e){throw new Error((t||"")+e)}};e.wrapContextHandler=(e,t)=>async n=>{try{await e(n)}catch(e){throw console.error(`Error thrown by handler ${t} for context type ${n.type}: ${e}`),e}};e.generateOverrideError=(e,t)=>`You have tried to to use ${e} but ${t} has not been overridden in the Interop Broker. Please override this function. Refer to our documentation for more info.`;e.generateOverrideWarning=(e,t,n,i)=>{const{uuid:r,name:o}=n;return i?`Entity with identity: ${r}/${o} has called ${i} or ${e} but ${t} has not been overridden.`:`Entity with identity: ${r}/${o} has called ${e} but ${t} has not been overridden.`},e.BROKER_ERRORS={fireIntent:(0,e.generateOverrideError)("fireIntent","handleFiredIntent"),fireIntentForContext:(0,e.generateOverrideError)("fireIntentForContext","handleFiredIntentForContext"),getInfoForIntent:(0,e.generateOverrideError)("getInfoForIntent","handleInfoForIntent"),getInfoForIntentsByContext:(0,e.generateOverrideError)("getInfoForIntentsByContext","handleInfoForIntentsByContext"),joinSessionContextGroupWithJoinContextGroup:"The Context Group you have tried to join is a Session Context Group. Custom Context Groups can only be defined by the Interop Broker through code or manifest configuration. Please use joinSessionContextGroup.",fdc3Open:(0,e.generateOverrideError)("fdc3.open","fdc3HandleOpen"),fdc3FindInstances:(0,e.generateOverrideError)("fdc3.findInstances","fdc3HandleFindInstances"),fdc3GetAppMetadata:(0,e.generateOverrideError)("fdc3.getAppMetadata","fdc3HandleGetAppMetadata"),fdc3GetInfo:(0,e.generateOverrideError)("fdc3.getInfo","fdc3HandleGetInfo")};e.wrapIntentHandler=(e,t)=>async n=>{try{return e(n)}catch(e){throw console.error(`Error thrown by handler ${t}: ${e}`),e}}}(Hi);var Ni,Di,Ui={};function Vi(){if(Di)return Gi;Di=1;var e,t,n,r=s&&s.__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},o=s&&s.__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)},a=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Gi,"__esModule",{value:!0}),Gi.InteropBroker=void 0;const c=d,h=a(function(){if(Bi)return Wi;Bi=1,Object.defineProperty(Wi,"__esModule",{value:!0});const e=Cr();return Wi.default=class{constructor(e,t){this.provider=e,this.id=t,this.lastContext=void 0,this.contextGroupMap=new Map,this.clients=new Map,this.registerListeners()}registerListeners(){this.provider.register(`sessionContextGroup:getContext-${this.id}`,this.getCurrentContext.bind(this)),this.provider.register(`sessionContextGroup:setContext-${this.id}`,this.setContext.bind(this)),this.provider.register(`sessionContextGroup:handlerAdded-${this.id}`,this.handlerAdded.bind(this)),this.provider.register(`sessionContextGroup:handlerRemoved-${this.id}`,this.handlerRemoved.bind(this))}getCurrentContext(e){return e.type?this.contextGroupMap.get(e.type):this.lastContext}setContext(t,n){const{context:i}=t,r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name} not in Session Client State Map`);this.contextGroupMap.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{e.contextHandlers.get(i.type)?.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getClientState(e){return this.clients.get(e.endpointId)}async handlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(i){const e=r.contextHandlers.get(i)||[];r.contextHandlers.set(i,[...e,n]);const o=this.contextGroupMap.get(i);o&&await this.provider.dispatch(t,n,o)}else{r.globalHandler=n;const e=[...this.contextGroupMap.keys()].map((async e=>{const i=this.contextGroupMap.get(e);i&&await this.provider.dispatch(t,n,i)}));await Promise.all(e)}}handlerRemoved(e,t){const{handlerId:n}=e,i=this.clients.get(t.endpointId);i?(Array.from(i.contextHandlers).forEach((([,e])=>{const t=e.indexOf(n);t>-1&&e.splice(t,1)})),i.globalHandler===n&&(i.globalHandler=void 0)):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={contextHandlers:new Map,clientIdentity:e,globalHandler:void 0};this.clients.set(e.endpointId,t)}}onDisconnection(e){this.clients.delete(e.endpointId)}},Wi}()),l=Hi,u=a(i),p=function(){if(Ni)return Ui;Ni=1,Object.defineProperty(Ui,"__esModule",{value:!0}),Ui.PrivateChannelProvider=void 0;const e=Vi();return Ui.PrivateChannelProvider=class t{constructor(e,t){this.provider=e,this.id=t,this.clients=new Map,this.registerListeners(),this.contextByContextType=new Map,this.lastContext=void 0,this.provider.onConnection((e=>this.registerNewClient(e))),this.provider.onDisconnection((async e=>{const{endpointId:t}=e;this.clients.has(t)&&await this.handleClientDisconnecting(e),0===(await this.provider.getAllClientInfo()).length&&this.provider.destroy()}))}getClientState(e){return this.clients.get(e.endpointId)}registerListeners(){this.provider.register("broadcast",this.broadcast.bind(this)),this.provider.register("getCurrentContext",this.getCurrentContext.bind(this)),this.provider.register("contextHandlerAdded",this.contextHandlerAdded.bind(this)),this.provider.register("contextHandlerRemoved",this.contextHandlerRemoved.bind(this)),this.provider.register("nonStandardHandlerRemoved",this.nonStandardHandlerRemoved.bind(this)),this.provider.register("onAddContextHandlerAdded",this.onAddContextHandlerAdded.bind(this)),this.provider.register("onDisconnectHandlerAdded",this.onDisconnectHandlerAdded.bind(this)),this.provider.register("onUnsubscribeHandlerAdded",this.onUnsubscribeHandlerAdded.bind(this)),this.provider.register("clientDisconnecting",((e,t)=>{this.handleClientDisconnecting(t)}))}broadcast(t,n){const{context:i}=t;if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name}, tried to call broadcast, is not connected to this Private Channel`);const r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to broadcast - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);this.contextByContextType.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{const t=e.handlerIdsByContextTypes.get(i.type);t&&t.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getCurrentContext(e,t){const{contextType:n}=e;if(!this.getClientState(t))throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call getCurrentContext, is not connected to this Private Channel`);if(void 0!==n){return this.contextByContextType.get(n)||null}return this.lastContext?this.lastContext:null}contextHandlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call addContextListener, is not connected to this Private Channel`);if(i){const e=r.handlerIdsByContextTypes.get(i)||[];r.handlerIdsByContextTypes.set(i,[...e,n])}else r.globalHandler=n;Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&e.onAddContextListenerHandlerId&&this.provider.dispatch(e.clientIdentity,e.onAddContextListenerHandlerId,i)}))}async contextHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);if(i){let e;if(i.globalHandler===n)i.globalHandler=void 0;else for(const[t,r]of i.handlerIdsByContextTypes){const i=r.indexOf(n);i>-1&&(r.splice(i,1),e=t)}const r=(await this.getConnectedClients()).map((async n=>{const{clientIdentity:i,clientIdentity:{endpointId:r},onUnsubscribeHandlerId:o}=n;r!==t.endpointId&&o&&await this.provider.dispatch(i,o,e)}));try{await Promise.all(r)}catch(e){throw console.error(`Problem when attempting to dispatch to onUnsubscribeHandlers. Error: ${e} Removing Client: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}`),new Error(e)}}else console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}.`)}nonStandardHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);i?i.onDisconnectHandlerId===n?i.onDisconnectHandlerId=void 0:i.onAddContextListenerHandlerId===n?i.onAddContextListenerHandlerId=void 0:i.onUnsubscribeHandlerId===n&&(i.onUnsubscribeHandlerId=void 0):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}onAddContextHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onAddContextListener, is not connected to this Private Channel`);n.onAddContextListenerHandlerId=i,Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&Array.from(e.handlerIdsByContextTypes.keys()).forEach((e=>{this.provider.dispatch(t,i,e)}))}))}onDisconnectHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onDisconnect, is not connected to this Private Channel`);n.onDisconnectHandlerId=i}onUnsubscribeHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onUnsubscribe, is not connected to this Private Channel`);n.onUnsubscribeHandlerId=i}removeClient(e){const t=this.getClientState(e);if(!t)throw new Error(`Client with Identity: ${e.uuid} ${e.name}, tried to call disconnect, is not connected to this Private Channel`);t.handlerIdsByContextTypes.clear(),this.clients.delete(e.endpointId)}async fireOnDisconnectForOtherClients(e){const{endpointId:t}=e,n=(await this.getConnectedClients()).map((async e=>{const{clientIdentity:{endpointId:n},onDisconnectHandlerId:i}=e;n!==t&&i&&await this.provider.dispatch(e.clientIdentity,i)}));try{await Promise.all(n)}catch(t){throw console.error(`Problem when attempting to dispatch to onDisconnectHandlers. Error: ${t} Disconnecting Client: uuid: ${e.uuid}. name: ${e.name}. endpointId: ${e.endpointId}`),new Error(t)}}async unsubscribeAll(e){const{endpointId:t}=e,n=this.clients.get(t);if(n){const t=Array.from(n.handlerIdsByContextTypes.values()).flat(),i=n.globalHandler;if(t.length>0){const n=t.map((async t=>this.contextHandlerRemoved({handlerId:t},e)));try{await Promise.all(n)}catch(e){console.error(e.message)}}if(i)try{await this.contextHandlerRemoved({handlerId:i},e)}catch(e){console.error(e.message)}}}async handleClientDisconnecting(e){await this.unsubscribeAll(e),this.removeClient(e),await this.fireOnDisconnectForOtherClients(e)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={clientIdentity:e,handlerIdsByContextTypes:new Map,globalHandler:void 0,onAddContextListenerHandlerId:void 0,onUnsubscribeHandlerId:void 0,onDisconnectHandlerId:void 0};this.clients.set(e.endpointId,t)}}async getConnectedClients(){const e=await this.provider.getAllClientInfo();return Array.from(this.clients.values()).filter((t=>{const{uuid:n,name:i}=t.clientIdentity;return e.some((e=>i===e.name&&n===e.uuid))}))}static init(e,n){return new t(e,n)}},Ui}(),w=G,y=[{id:"green",displayMetadata:{color:"#00CC88",name:"green"}},{id:"purple",displayMetadata:{color:"#8C61FF",name:"purple"}},{id:"orange",displayMetadata:{color:"#FF8C4C",name:"orange"}},{id:"red",displayMetadata:{color:"#FF5E60",name:"red"}},{id:"pink",displayMetadata:{color:"#FF8FB8",name:"pink"}},{id:"yellow",displayMetadata:{color:"#E9FF8F",name:"yellow"}}];let f=class i extends c.Base{constructor(i,s,a){super(i),e.set(this,void 0),t.set(this,void 0),n.set(this,void 0),this.getProvider=()=>o(this,n,"f").getValue(),this.interopClients=new Map,this.contextGroupsById=new Map,r(this,t,a.contextGroups??[...y],"f"),r(this,e,a.fdc3Info,"f"),a?.logging&&(this.logging=a.logging),this.intentClientMap=new Map,this.lastContextMap=new Map,this.sessionContextGroupMap=new Map,r(this,n,new w.Lazy(s),"f"),this.setContextGroupMap(),this.setupChannelProvider()}static createClosedConstructor(...e){return class extends i{constructor(...t){if(t.length){const[n,i,r]=t;if(r&&"object"==typeof r&&!(0,u.default)(r,e[2]))return console.warn("You have modified the parameters of the InteropOverride constructor. This behavior is deprecated and will be removed in a future version. You can modify these options in your manifest. Please consult our Interop docs for guidance on migrating to the new override scheme."),void super(e[0],e[1],r);console.warn("You are attempting to pass arguments to the InteropOverride constructor. This is not necessary, and these passed arguments will be ignored. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.")}super(...e)}}}setContext({context:e},t){this.wire.sendAction("interop-broker-set-context").catch((e=>{}));const n=this.getClientState(t);if(!n||!n.contextGroupId)throw n?new Error("You must join a context group before you can set context."):new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);{const{contextGroupId:t}=n;this.setContextForGroup({context:e},t)}}setContextForGroup({context:e},t){this.wire.sendAction("interop-broker-set-context-for-group").catch((e=>{}));const n=this.contextGroupsById.get(t);if(!n)throw new Error(`Unable to set context for context group that isn't in the context group mapping: ${t}.`);const r=i.checkContextIntegrity(e);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(e)}`);const o=e.type;n.set(o,e),this.lastContextMap.set(t,o);Array.from(this.interopClients.values()).filter((e=>e.contextGroupId===t)).forEach((t=>{for(const[,n]of t.contextHandlers)i.isContextTypeCompatible(o,n.contextType)&&this.invokeContextHandler(t.clientIdentity,n.handlerId,e)}))}getCurrentContext(e,t){this.wire.sendAction("interop-broker-get-current-context").catch((e=>{}));const n=this.getClientState(t);if(!n?.contextGroupId)throw new Error("You must be a member of a context group to call getCurrentContext");const{contextGroupId:i}=n,r=this.contextGroupsById.get(i),o=this.lastContextMap.get(i),s=e?.contextType??o;return r&&s?r.get(s):void 0}async joinContextGroup({contextGroupId:e,target:t},n){if(this.wire.sendAction("interop-broker-join-context-group").catch((e=>{})),this.sessionContextGroupMap.has(e))throw new Error(l.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup);if(t){i.hasEndpointId(t)&&await this.addClientToContextGroup({contextGroupId:e},t);try{const n=this.channel.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name));if(!n.length)throw new Error(`Given Identity ${t.uuid} ${t.name} is not connected to the Interop Broker.`);n.length>1&&console.warn(`More than one connection found for identity ${t.uuid} ${t.name}`);const i=[];for(const t of n)i.push(this.addClientToContextGroup({contextGroupId:e},t));await Promise.all(i)}catch(e){throw new Error(e)}}else await this.addClientToContextGroup({contextGroupId:e},n)}async addClientToContextGroup({contextGroupId:e},t){this.wire.sendAction("interop-broker-add-client-to-context-group").catch((e=>{}));const n=this.getClientState(t);if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(!this.getContextGroups().find((t=>t.id===e)))throw new Error(`Attempting to join a context group that does not exist: ${e}. You may only join existing context groups.`);if(n.contextGroupId!==e){n.contextGroupId=e,await this.setCurrentContextGroupInClientOptions(t,e);const i=this.contextGroupsById.get(e);for(const[,e]of n.contextHandlers){const{contextType:n,handlerId:r}=e;if(void 0===n)i.forEach(((e,n)=>{this.invokeContextHandler(t,r,e)}));else if(i.has(n)){const e=i.get(n);e&&this.invokeContextHandler(t,r,e)}}}}async removeFromContextGroup({target:e},t){if(this.wire.sendAction("interop-broker-remove-from-context-group").catch((e=>{})),e){i.hasEndpointId(e)&&await this.removeClientFromContextGroup(e);try{const t=this.channel.connections.filter((t=>t.uuid===e.uuid&&t.name===e.name));if(!t.length)throw new Error(`No connection found for given Identity ${e.uuid} ${e.name}`);t.length>1&&console.warn(`More than one connection found for identity ${e.uuid} ${e.name}`);const n=[];for(const e of t)n.push(this.removeClientFromContextGroup(e));await Promise.all(n)}catch(e){throw new Error(e)}}else await this.removeClientFromContextGroup(t)}async removeClientFromContextGroup(e){this.wire.sendAction("interop-broker-remove-client-from-context-group").catch((e=>{}));const t=this.getClientState(e);t&&(t.contextGroupId=void 0),await this.setCurrentContextGroupInClientOptions(e,null)}getContextGroups(){return this.wire.sendAction("interop-broker-get-context-groups").catch((e=>{})),o(this,t,"f").map((e=>({...e})))}getInfoForContextGroup({contextGroupId:e}){return this.wire.sendAction("interop-broker-get-info-for-context-group").catch((e=>{})),this.getContextGroups().find((t=>t.id===e))}getAllClientsInContextGroup({contextGroupId:e}){this.wire.sendAction("interop-broker-get-all-clients-in-context-group").catch((e=>{}));return Array.from(this.interopClients.values()).filter((t=>t.contextGroupId===e)).map((e=>e.clientIdentity))}async handleFiredIntent(e,t){const n=(0,l.generateOverrideWarning)("fdc3.raiseIntent","InteropBroker.handleFiredIntent",t,"interopClient.fireIntent");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntent)}async setIntentTarget(e,t){this.wire.sendAction("interop-broker-set-intent-target").catch((e=>{}));const n=this.intentClientMap.get(t.name),i=`intent-handler-${e.name}`;if(n){const t=n.get(i);if(t){if(t.pendingIntents.push(e),t.clientIdentity&&t.isReady){const{clientIdentity:e,pendingIntents:n}=t;try{const r=n[n.length-1];await this.invokeIntentHandler(e,i,r),t.pendingIntents=[]}catch(n){console.error(`Error invoking intent handler for client ${e.uuid}/${e.name}/${e.endpointId}`),t.isReady=!1}}}else n.set(i,{isReady:!1,pendingIntents:[e]})}else{this.intentClientMap.set(t.name,new Map);const n=this.intentClientMap.get(t.name);n&&n.set(i,{isReady:!1,pendingIntents:[e]})}}async handleInfoForIntent(e,t){const n=(0,l.generateOverrideWarning)("fdc3.findIntent","InteropBroker.handleInfoForIntent",t,"interopClient.getInfoForIntent");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntent)}async handleInfoForIntentsByContext(e,t){const n=(0,l.generateOverrideWarning)("fdc3.findIntentsByContext","InteropBroker.handleInfoForIntentsByContext",t,"interopClient.getInfoForIntentsByContext");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntentsByContext)}async handleFiredIntentForContext(e,t){const n=(0,l.generateOverrideWarning)("fdc3.raiseIntentForContext","InteropBroker.handleFiredIntentForContext",t,"interopClient.fireIntentForContext");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntentForContext)}async clientDisconnected(e){}async fdc3HandleOpen({app:e,context:t},n){const i=(0,l.generateOverrideWarning)("fdc3.open","InteropBroker.fdc3HandleOpen",n);throw console.warn(i),new Error(l.BROKER_ERRORS.fdc3Open)}async fdc3HandleFindInstances(e,t){const n=(0,l.generateOverrideWarning)("fdc3.open","InteropBroker.fdc3HandleFindInstances",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3FindInstances)}async fdc3HandleGetAppMetadata(e,t){const n=(0,l.generateOverrideWarning)("fdc3.getAppMetadata","InteropBroker.fdc3HandleGetAppMetadata",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3GetAppMetadata)}async invokeContextHandler(e,t,n){const i=await this.getProvider();try{await i.dispatch(e,t,n)}catch(i){console.error(`Error invoking context handler ${t} for context type ${n.type} in client ${e.uuid}/${e.name}/${e.endpointId}`,i)}}async invokeIntentHandler(e,t,n){const i=await this.getProvider();await i.dispatch(e,t,n)}async fdc3HandleGetInfo(t,n){const{fdc3Version:i}=t;return{fdc3Version:i,...o(this,e,"f"),optionalFeatures:{OriginatingAppMetadata:!1,UserChannelMembershipAPIs:!0},appMetadata:{appId:"",instanceId:""}}}async getAllClientInfo(){return(await this.getProvider()).getAllClientInfo()}decorateSnapshot(e){return{...e,interopSnapshotDetails:{contextGroupStates:this.getContextGroupStates()}}}applySnapshot(e,t){const n=e?.interopSnapshotDetails?.contextGroupStates;n&&(t?.closeExistingWindows||this.updateExistingClients(n),this.rehydrateContextGroupStates(n))}updateExistingClients(e){this.interopClients.forEach((t=>{const{clientIdentity:n,contextGroupId:r,contextHandlers:o}=t;if(r){const t=e[r];for(const[,e]of Object.entries(t))o.forEach((t=>{const{handlerId:r,contextType:o}=t;i.isContextTypeCompatible(e.type,o)&&this.invokeContextHandler(n,r,e)}))}}))}getContextGroupStates(){return i.toObject(this.contextGroupsById)}rehydrateContextGroupStates(e){const t=Object.entries(e);for(const[e,n]of t){const t=Object.entries(n);for(const[n,i]of t)if(this.contextGroupsById.has(e)){this.contextGroupsById.get(e).set(n,i)}else console.warn(`Attempting to set a context group that isn't in the context group mapping. Skipping context group rehydration for: ${e}`)}}contextHandlerRegistered({contextType:e,handlerId:t},n){const i={contextType:e,handlerId:t},r=this.getClientState(n);if(r?.contextHandlers.set(t,i),r&&r.contextGroupId){const{contextGroupId:i}=r,o=this.contextGroupsById.get(i);if(void 0===e)o.forEach(((e,i)=>{this.invokeContextHandler(n,t,e)}));else if(o.has(e)){const i=o.get(e);i&&this.invokeContextHandler(n,t,i)}}}async intentHandlerRegistered(e,t){const{handlerId:n}=e,i=this.intentClientMap.get(t.name),r=i?.get(n);if(i)if(r){const{pendingIntents:e}=r;r.clientIdentity=t,r.isReady=!0;try{if(e.length>0){const i=e[e.length-1];await this.invokeIntentHandler(t,n,i),r.pendingIntents=[]}}catch(e){console.error(`Error invoking intent handler: ${n} for client ${t.uuid}/${t.name}/${t.endpointId}`)}}else i.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t});else{this.intentClientMap.set(t.name,new Map);const e=this.intentClientMap.get(t.name);e&&e.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t})}}removeContextHandler({handlerId:e},t){const n=this.getClientState(t);n&&n.contextHandlers.delete(e)}handleJoinSessionContextGroup({sessionContextGroupId:e},t){try{if(!e)throw new Error("Failed to join session context group: must specify group id.");const n=this.sessionContextGroupMap.get(e);if(n)n.registerNewClient(t);else{const n=new h.default(this.channel,e);n.registerNewClient(t),this.sessionContextGroupMap.set(e,n)}return{hasConflict:this.contextGroupsById.has(e)}}catch(e){throw new Error(e)}}getClientState(e){return this.interopClients.get(e.endpointId)}static toObject(e){const t=Object.fromEntries(e),n={};return Object.entries(t).forEach((([e,t])=>{const i=Object.fromEntries(t);n[e]=i})),n}static checkContextIntegrity(e){if(!e)return{isValid:!1,reason:"No context supplied"};if("object"!=typeof e)return{isValid:!1,reason:"Context must be an Object"};if(!e.type)return{isValid:!1,reason:"Context must have a type property"};if(e.id&&"object"!=typeof e.id)return{isValid:!1,reason:"Context id must be an Object populated with key-value identifiers (if set)"};if(e.id){const{id:t}=e,n=Object.keys(t);let i=!1;if(!n.length)return{isValid:!1,reason:"Context id must have at least one key-value identifier"};if(n.forEach((e=>{"string"==typeof e&&"string"==typeof t[e]||(i=!0)})),i)return{isValid:!1,reason:"Context id key-value identifiers must be of type string"}}return e.name&&"string"!=typeof e.name?{isValid:!1,reason:"Context name must be of string type (if set)"}:{isValid:!0}}static hasEndpointId(e){return void 0!==e.endpointId}static isContextTypeCompatible(e,t){return void 0===t||e===t}setContextGroupMap(){for(const e of this.getContextGroups())this.contextGroupsById.set(e.id,new Map)}async setCurrentContextGroupInClientOptions(e,t){try{const n=await this.fin.System.getEntityInfo(e.uuid,e.name);let i;"view"===n.entityType?i=await this.fin.View.wrap(e):"window"===n.entityType&&(i=await this.fin.Window.wrap(e)),i&&await i.updateOptions({interop:{currentContextGroup:t}})}catch(e){}}async setupChannelProvider(){try{const e=await this.getProvider();this.channel=e,this.wireChannel(e)}catch(e){throw new Error(`Error setting up Interop Broker Channel Provider: ${e}`)}}wireChannel(e){e.onConnection((async(e,t)=>{if(!await this.isConnectionAuthorized(e,t))throw new Error(`Connection not authorized for ${e.uuid}, ${e.name}`);if(!e.endpointId)throw new Error("Version too old to be compatible with Interop. Please upgrade your runtime to a more recent version.");const n={contextGroupId:void 0,contextHandlers:new Map,clientIdentity:e};t?.currentContextGroup&&this.contextGroupsById.has(t.currentContextGroup)&&(n.contextGroupId=t?.currentContextGroup),this.interopClients.set(e.endpointId,n)})),e.onDisconnection((e=>{this.interopClients.delete(e.endpointId);const t=this.intentClientMap.get(e.name);t&&e.uuid===this.fin.me.uuid&&t.forEach((e=>{e.isReady=!1})),this.sessionContextGroupMap.forEach((t=>{t.onDisconnection(e)})),this.clientDisconnected(e)})),e.beforeAction((async(e,t,n)=>{if(!await this.isActionAuthorized(e,t,n))throw new Error(`Action (${e}) not authorized for ${n.uuid}, ${n.name}`);this.logging?.beforeAction?.enabled&&console.log(e,t,n)})),e.afterAction(((e,t,n)=>{this.logging?.afterAction?.enabled&&console.log(e,t,n)})),e.register("setContext",this.setContext.bind(this)),e.register("fireIntent",this.handleFiredIntent.bind(this)),e.register("getCurrentContext",this.getCurrentContext.bind(this)),e.register("getInfoForIntent",this.handleInfoForIntent.bind(this)),e.register("getInfoForIntentsByContext",this.handleInfoForIntentsByContext.bind(this)),e.register("fireIntentForContext",this.handleFiredIntentForContext.bind(this)),e.register("getContextGroups",this.getContextGroups.bind(this)),e.register("joinContextGroup",this.joinContextGroup.bind(this)),e.register("removeFromContextGroup",this.removeFromContextGroup.bind(this)),e.register("getAllClientsInContextGroup",this.getAllClientsInContextGroup.bind(this)),e.register("getInfoForContextGroup",this.getInfoForContextGroup.bind(this)),e.register("contextHandlerRegistered",this.contextHandlerRegistered.bind(this)),e.register("intentHandlerRegistered",this.intentHandlerRegistered.bind(this)),e.register("removeContextHandler",this.removeContextHandler.bind(this)),e.register("sessionContextGroup:createIfNeeded",this.handleJoinSessionContextGroup.bind(this)),e.register("fdc3Open",this.fdc3HandleOpen.bind(this)),e.register("fdc3v2FindIntentsByContext",this.handleInfoForIntentsByContext.bind(this)),e.register("fdc3FindInstances",this.fdc3HandleFindInstances.bind(this)),e.register("fdc3GetAppMetadata",this.fdc3HandleGetAppMetadata.bind(this)),e.register("fdc3v2GetInfo",(async(e,t)=>this.fdc3HandleGetInfo.bind(this)(e,t))),e.register("createPrivateChannelProvider",(async e=>{const{channelId:t}=e,n=await this.fin.InterApplicationBus.Channel.create(t);p.PrivateChannelProvider.init(n,t)}))}isConnectionAuthorized(e,t){return this.wire.sendAction("interop-broker-is-connection-authorized").catch((e=>{})),Promise.resolve(!0)}isActionAuthorized(e,t,n){return this.wire.sendAction("interop-broker-is-action-authorized").catch((e=>{})),Promise.resolve(!0)}};return Gi.InteropBroker=f,e=new WeakMap,t=new WeakMap,n=new WeakMap,Gi}var zi,Ki={},qi={},Ji=s&&s.__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},Yi=s&&s.__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)};Object.defineProperty(qi,"__esModule",{value:!0});const Zi=d,Qi=Hi;class Xi extends Zi.Base{constructor(e,t,n){super(e),zi.set(this,void 0),this.id=n,Ji(this,zi,t,"f")}async setContext(e){this.wire.sendAction("interop-session-context-group-set-context").catch((e=>{}));return(await Yi(this,zi,"f")).dispatch(`sessionContextGroup:setContext-${this.id}`,{sessionContextGroupId:this.id,context:e})}async getCurrentContext(e){this.wire.sendAction("interop-session-context-group-get-context").catch((e=>{}));return(await Yi(this,zi,"f")).dispatch(`sessionContextGroup:getContext-${this.id}`,{sessionContextGroupId:this.id,type:e})}async addContextHandler(e,t){if(this.wire.sendAction("interop-session-context-group-add-handler").catch((e=>{})),"function"!=typeof e)throw new Error("Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");const n=await Yi(this,zi,"f");let i;return i=t?`sessionContextHandler:invoke-${this.id}-${t}-${(0,Qi.generateId)()}`:`sessionContextHandler:invoke-${this.id}`,n.register(i,(0,Qi.wrapContextHandler)(e,i)),await n.dispatch(`sessionContextGroup:handlerAdded-${this.id}`,{handlerId:i,contextType:t}),{unsubscribe:await this.createUnsubscribeCb(i)}}async createUnsubscribeCb(e){const t=await Yi(this,zi,"f");return async()=>{t.remove(e),await t.dispatch(`sessionContextGroup:handlerRemoved-${this.id}`,{handlerId:e})}}getUserInstance(){return{id:this.id,setContext:(0,Qi.wrapInTryCatch)(this.setContext.bind(this),"Failed to set context: "),getCurrentContext:(0,Qi.wrapInTryCatch)(this.getCurrentContext.bind(this),"Failed to get context: "),addContextHandler:(0,Qi.wrapInTryCatch)(this.addContextHandler.bind(this),"Failed to add context handler: ")}}}qi.default=Xi,zi=new WeakMap;var er={},tr={},nr={},ir={},rr=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),or=s&&s.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),sr=s&&s.__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)&&rr(t,e,n);return or(t,e),t};Object.defineProperty(ir,"__esModule",{value:!0}),ir.PrivateChannelClient=void 0;const ar=sr(Hi);var cr,dr;function hr(){if(cr)return tr;cr=1;var e,t=s&&s.__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)},n=s&&s.__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},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(tr,"__esModule",{value:!0}),tr.FDC3ModuleBase=void 0;const o=nr,a=Hi,c=wr(),d=r(i);return tr.FDC3ModuleBase=class{get client(){return t(this,e,"f").call(this)}get fin(){return this.wire.getFin()}constructor(t,i){this.wire=i,e.set(this,void 0),n(this,e,t,"f")}async broadcast(e){return this.wire.sendAction("fdc3-broadcast").catch((e=>{})),this.client.setContext(e)}async _open(e,t){this.wire.sendAction("fdc3-open").catch((e=>{}));try{return await c.InteropClient.ferryFdc3Call(this.client,"fdc3Open",{app:e,context:t})}catch(e){const t=e.message===a.BROKER_ERRORS.fdc3Open?"ResolverUnavailable":e.message;throw new Error(t)}}async _getChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:"system",...(0,o.getUnsupportedChannelApis)()})))}async getOrCreateChannel(e){this.wire.sendAction("fdc3-get-or-create-channel").catch((e=>{}));const t=(await this._getChannels()).find((t=>t.id===e));if(t)return{...t,type:"system",...(0,o.getUnsupportedChannelApis)()};try{const t=await this.client.joinSessionContextGroup(e);return(0,o.buildAppChannelObject)(t)}catch(e){throw console.error(e.message),new Error(o.ChannelError.CreationFailed)}}async getSystemChannels(){return this.wire.sendAction("fdc3-get-system-channels").catch((e=>{})),this._getChannels()}async joinChannel(e){this.wire.sendAction("fdc3-join-channel").catch((e=>{}));try{return await this.client.joinContextGroup(e)}catch(e){if(e.message===a.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup?console.error("The Channel you have tried to join is an App Channel. Custom Channels can only be defined by the Interop Broker through code or manifest configuration. Please use getOrCreateChannel."):console.error(e.message),e.message.startsWith("Attempting to join a context group that does not exist"))throw new Error(o.ChannelError.NoChannelFound);throw new Error(o.ChannelError.AccessDenied)}}async getCurrentChannel(){this.wire.sendAction("fdc3-get-current-channel").catch((e=>{}));const e=await this.getCurrentContextGroupInfo();return e?this.buildChannelObject(e):null}async leaveCurrentChannel(){return this.wire.sendAction("fdc3-leave-current-channel").catch((e=>{})),this.client.removeFromContextGroup()}async getCurrentContextGroupInfo(){const e=await this.client.getContextGroups(),t=e.map((async e=>this.client.getAllClientsInContextGroup(e.id))),n=(await Promise.all(t)).findIndex((e=>e.some((e=>{const{uuid:t,name:n}=e;return this.wire.me.uuid===t&&this.wire.me.name===n}))));return e[n]}async buildChannelObject(e){return{...e,type:"system",addContextListener:(...[e,t])=>{let n,i;"function"==typeof e?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),n=e):(n=t,"string"==typeof e&&(i=e));const r=(async()=>{let e=!0;const t=await this.client.getCurrentContext(i);return this.client.addContextHandler(((i,r)=>{if(!e||(e=!1,!(0,d.default)(t,i)))return n(i,r)}),i)})();return{...r,unsubscribe:()=>r.then((e=>e.unsubscribe()))}},broadcast:this.broadcast.bind(this),getCurrentContext:async e=>{const t=await this.client.getCurrentContext(e);return void 0===t?null:t}}}},e=new WeakMap,tr}ir.PrivateChannelClient=class{constructor(e,t){this.id=t,this.client=e,this.listeners=new Map}async broadcast(e){return this.client.dispatch("broadcast",{context:e})}async getCurrentContext(e){return this.client.dispatch("getCurrentContext",{contextType:e})}async addContextListener(e,t){if("function"!=typeof t)throw new Error("Non-function argument passed to the second parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");let n;n=e?`contextHandler:invoke-${this.id}-${e}-${ar.generateId()}`:`contextHandler:invoke-${this.id}-${ar.generateId()}`,this.client.register(n,ar.wrapContextHandler(t,n));const i={unsubscribe:await this.createContextUnsubscribeCb(n)};return this.listeners.set(n,i),await this.client.dispatch("contextHandlerAdded",{handlerId:n,contextType:e}),i}createNonStandardUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch("nonStandardHandlerRemoved",{handlerId:e})}}createContextUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch("contextHandlerRemoved",{handlerId:e})}}onAddContextListener(e){const t=`onContextHandlerAdded:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch("onAddContextHandlerAdded",{handlerId:t}),n}onDisconnect(e){const t=`onDisconnect:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch("onDisconnectHandlerAdded",{handlerId:t}),n}onUnsubscribe(e){const t=`onUnsubscribe:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch("onUnsubscribeHandlerAdded",{handlerId:t}),n}async cleanUpAllSubs(){Array.from(this.listeners.keys()).forEach((e=>{this.client.remove(e),this.listeners.delete(e)}))}async disconnect(){try{await this.client.dispatch("clientDisconnecting"),await this.cleanUpAllSubs(),await this.client.disconnect()}catch(e){throw new Error(e.message)}}},function(e){var t=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.getIntentResolution=e.isChannel=e.isContext=e.connectPrivateChannel=e.buildAppChannelObject=e.buildPrivateChannelObject=e.ChannelError=e.ResultError=e.UnsupportedChannelApiError=e.getUnsupportedChannelApis=void 0;const n=Hi,r=ir,o=t(i);e.getUnsupportedChannelApis=e=>({addContextListener:()=>{throw new a("Channel.addContextListener",e)},broadcast:()=>{throw new a("Channel.broadcast",e)},getCurrentContext:()=>{throw new a("Channel.getCurrentContext",e)}});class a extends Error{constructor(e,t="System"){super(e),this.message=`Calling ${e} on an instance of a ${t} Channel returned by fdc3.get${t}Channels is not supported. If you would like to use a ${t} Channel, please use fdc3.joinChannel, fdc3.addContextListener, and fdc3.broadcast instead.`}}var c,d;e.UnsupportedChannelApiError=a,function(e){e.NoResultReturned="NoResultReturned",e.IntentHandlerRejected="IntentHandlerRejected"}(c=e.ResultError||(e.ResultError={})),(d=e.ChannelError||(e.ChannelError={})).NoChannelFound="NoChannelFound",d.AccessDenied="AccessDenied",d.CreationFailed="CreationFailed";e.buildPrivateChannelObject=e=>{let t=!1;const n=()=>{if(t)throw new Error("Private Channel Client has been disconnected from the Private Channel")};return{id:e.id,type:"private",broadcast:async t=>(n(),e.broadcast(t)),getCurrentContext:async t=>(n(),e.getCurrentContext(t)),addContextListener:async(t,i)=>{n();let r=i,o=t;"function"==typeof t&&(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),r=t,o=null);return e.addContextListener(o,r)},onAddContextListener:t=>(n(),e.onAddContextListener(t)),disconnect:async()=>(n(),t=!0,e.disconnect()),onDisconnect:t=>(n(),e.onDisconnect(t)),onUnsubscribe:t=>(n(),e.onUnsubscribe(t))}};e.buildAppChannelObject=e=>({id:e.id,type:"app",broadcast:e.setContext,getCurrentContext:async t=>{const n=await e.getCurrentContext(t);return void 0===n?null:n},addContextListener:(t,n)=>{let i,r;"function"==typeof t?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),i=t):(i=n,"string"==typeof t&&(r=t));const s=(async()=>{let t=!0;const n=await e.getCurrentContext(r);return e.addContextHandler(((e,r)=>{if(!t||(t=!1,!(0,o.default)(n,e)))return i(e,r)}),r)})();return{...s,unsubscribe:()=>s.then((e=>e.unsubscribe()))}}});e.connectPrivateChannel=async t=>{try{const n=await fin.InterApplicationBus.Channel.connect(t),i=new r.PrivateChannelClient(n,t);return(0,e.buildPrivateChannelObject)(i)}catch(e){throw new Error(`Private Channel with id: ${t} doesn't exist`)}};e.isContext=e=>{if(e&&"object"==typeof e&&"type"in e){const{type:t}=e;return"string"==typeof t}return!1};e.isChannel=e=>{if(e&&"object"==typeof e&&"type"in e&&"id"in e){const{type:t,id:n}=e;return"string"==typeof t&&"string"==typeof n&&("app"===t||"private"===t)}return!1};e.getIntentResolution=async(t,i,r,o)=>{const s=(0,n.generateId)(),a=new Promise(((e,t)=>{fin.InterApplicationBus.subscribe({uuid:"*"},s,(t=>{e(t)})).catch((()=>t(new Error("getResult is not supported in this environment"))))})),d=r?{target:r,intentResolutionResultId:s}:{intentResolutionResultId:s},h=o?{name:o,context:i,metadata:d}:{...i,metadata:d},l=async()=>{let n=await a;if(!n||"object"!=typeof n)throw new Error(c.NoResultReturned);const{error:i}=n;if(i)throw new Error(c.IntentHandlerRejected);if((0,e.isChannel)(n)){const{id:i,type:r}=n;switch(r){case"private":n=await(0,e.connectPrivateChannel)(i);break;case"app":{const r=await t.joinSessionContextGroup(i);n=(0,e.buildAppChannelObject)(r);break}}}else if(!(0,e.isContext)(n))throw new Error(c.NoResultReturned);return n},u=o?await t.fireIntent(h):await t.fireIntentForContext(h);return"object"!=typeof u?{source:{appId:"",instanceId:""},intent:"",version:"2.0",getResult:l}:{...u,getResult:l}}}(nr);var lr,ur,pr={};function wr(){if(ur)return Ki;ur=1;var e,t,n=s&&s.__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},i=s&&s.__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)},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ki,"__esModule",{value:!0}),Ki.InteropClient=void 0;const o=d,a=r(qi),c=function(){if(dr)return er;dr=1,Object.defineProperty(er,"__esModule",{value:!0}),er.Fdc3Module=void 0;const e=Hi,t=hr();class n extends t.FDC3ModuleBase{async open(e,t){await super._open(e,t)}addContextListener(e,t){let n;return this.wire.sendAction("fdc3-add-context-listener").catch((e=>{})),"function"==typeof e?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),n=this.client.addContextHandler(e)):n=this.client.addContextHandler(t,null===e?void 0:e),{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}addIntentListener(e,t){this.wire.sendAction("fdc3-add-intent-listener").catch((e=>{}));const n=this.client.registerIntentHandler((e=>{const{context:n,metadata:i}=e,{metadata:r}=n,o=i?.intentResolutionResultId||r?.intentResolutionResultId;o&&this.fin.InterApplicationBus.publish(o,null).catch((()=>null)),t(e.context)}),e,{fdc3Version:"1.2"});return{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}async raiseIntent(t,n,i){this.wire.sendAction("fdc3-raise-intent").catch((e=>{}));const r=i?{name:t,context:n,metadata:{target:i}}:{name:t,context:n};try{return await this.client.fireIntent(r)}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntent?"ResolverUnavailable":t.message;throw new Error(n)}}async findIntent(t,n){this.wire.sendAction("fdc3-find-intent").catch((e=>{}));try{return await this.client.getInfoForIntent({name:t,context:n})}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntent?"ResolverUnavailable":t.message;throw new Error(n)}}async findIntentsByContext(t){this.wire.sendAction("fdc3-find-intents-by-context").catch((e=>{}));try{return await this.client.getInfoForIntentsByContext(t)}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntentsByContext?"ResolverUnavailable":t.message;throw new Error(n)}}async raiseIntentForContext(t,n){this.wire.sendAction("fdc3-raise-intent-for-context").catch((e=>{}));try{return await this.client.fireIntentForContext({...t,metadata:{target:n}})}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntentForContext?"ResolverUnavailable":t.message;throw new Error(n)}}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}getInfo(){return this.wire.sendAction("fdc3-get-info").catch((e=>{})),{providerVersion:this.wire.environment.getAdapterVersionSync(),provider:`openfin-${this.wire.me.uuid}`,fdc3Version:"1.2"}}}return er.Fdc3Module=n,er}(),h=function(){if(lr)return pr;lr=1,Object.defineProperty(pr,"__esModule",{value:!0}),pr.Fdc3Module2=void 0;const e=hr(),t=Hi,n=wr(),i=nr,r=ir;class o extends e.FDC3ModuleBase{async open(e,t){return"string"==typeof e&&console.warn("Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string })."),super._open(e,t)}async findInstances(e){this.wire.sendAction("fdc3-find-instances").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,"fdc3FindInstances",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3FindInstances?"ResolverUnavailable":e.message;throw new Error(n)}}async getAppMetadata(e){this.wire.sendAction("fdc3-get-app-metadata").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,"fdc3GetAppMetadata",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3GetAppMetadata?"ResolverUnavailable":e.message;throw new Error(n)}}async addContextListener(e,t){this.wire.sendAction("fdc3-add-context-listener").catch((e=>{}));const n=e=>t=>{const{contextMetadata:n,...i}=t,r=n?[{...i},n]:[t,null];e(...r)};let i=t,r=n(i);return"function"==typeof e?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),i=e,r=n(i),this.client.addContextHandler(r)):this.client.addContextHandler(r,null===e?void 0:e)}async findIntent(e,n,i){this.wire.sendAction("fdc3-find-intent").catch((e=>{}));try{return await this.client.getInfoForIntent({name:e,context:n,metadata:{resultType:i}})}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntent?"ResolverUnavailable":e.message;throw new Error(n)}}async findIntentsByContext(e,i){this.wire.sendAction("fdc3-find-intents-by-context").catch((e=>{}));const r=i?{context:e,metadata:{resultType:i}}:e;try{return await n.InteropClient.ferryFdc3Call(this.client,"fdc3v2FindIntentsByContext",r)}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntentsByContext?"ResolverUnavailable":e.message;throw new Error(n)}}async raiseIntent(e,n,r){this.wire.sendAction("fdc3-raise-intent").catch((e=>{}));try{return"string"==typeof r&&console.warn("Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string })."),(0,i.getIntentResolution)(this.client,n,r,e)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?"ResolverUnavailable":e.message;throw new Error(n)}}async raiseIntentForContext(e,n){this.wire.sendAction("fdc3-raise-intent-for-context").catch((e=>{}));try{return"string"==typeof n&&console.warn("Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string })."),(0,i.getIntentResolution)(this.client,e,n)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?"ResolverUnavailable":e.message;throw new Error(n)}}async addIntentListener(e,t){if(this.wire.sendAction("fdc3-add-intent-listener").catch((e=>{})),"string"!=typeof e)throw new Error("First argument must be an Intent name");return this.client.registerIntentHandler((async e=>{let n,i;const{context:r,metadata:o}=e,{contextMetadata:s,metadata:a,...c}=r,d=o?.intentResolutionResultId||a?.intentResolutionResultId;try{const e=a?{metadata:a,...c}:{...c};n=await t(e,s),i=n}catch(e){n=e,i={error:!0}}if(d&&this.fin.InterApplicationBus.publish(d,i).catch((()=>null)),n instanceof Error)throw new Error(n.message);return n}),e,{fdc3Version:"2.0"})}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}async createPrivateChannel(){const e=(0,t.generateId)();await n.InteropClient.ferryFdc3Call(this.client,"createPrivateChannelProvider",{channelId:e});const o=await this.fin.InterApplicationBus.Channel.connect(e),s=new r.PrivateChannelClient(o,e);return(0,i.buildPrivateChannelObject)(s)}async getUserChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:"user",...(0,i.getUnsupportedChannelApis)("User")})))}async getSystemChannels(){return console.warn("This API has been deprecated. Please use fdc3.getUserChannels instead."),super.getSystemChannels()}async joinUserChannel(e){return super.joinChannel(e)}async joinChannel(e){return console.warn("This API has been deprecated. Please use fdc3.joinUserChannel instead."),super.joinChannel(e)}async getCurrentChannel(){const e=await super.getCurrentChannel();return e?{...e,type:"user",broadcast:this.broadcast.bind(this)}:null}async getInfo(){return n.InteropClient.ferryFdc3Call(this.client,"fdc3v2GetInfo",{fdc3Version:"2.0"})}}return pr.Fdc3Module2=o,pr}(),l=Hi;let u=class extends o.Base{constructor(i,r){super(i),e.set(this,void 0),t.set(this,void 0),n(this,t,new Map,"f"),n(this,e,r,"f")}async setContext(t){this.wire.sendAction("interop-client-set-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("setContext",{context:t})}async addContextHandler(t,n){if(this.wire.sendAction("interop-client-add-context-handler").catch((e=>{})),"function"!=typeof t)throw new Error("Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");const r=await i(this,e,"f");let o;o=n?`invokeContextHandler-${n}-${(0,l.generateId)()}`:"invokeContextHandler";const s=(0,l.wrapContextHandler)(t,o);return r.register(o,s),await r.dispatch("contextHandlerRegistered",{handlerId:o,contextType:n}),{unsubscribe:async()=>{r.remove(o),await r.dispatch("removeContextHandler",{handlerId:o})}}}async getContextGroups(){this.wire.sendAction("interop-client-get-context-groups").catch((e=>{}));return(await i(this,e,"f")).dispatch("getContextGroups")}async joinContextGroup(t,n){this.wire.sendAction("interop-client-join-context-group").catch((e=>{}));const r=await i(this,e,"f");if(!t)throw new Error("No contextGroupId specified for joinContextGroup.");return r.dispatch("joinContextGroup",{contextGroupId:t,target:n})}async removeFromContextGroup(t){this.wire.sendAction("interop-client-remove-from-context-group").catch((e=>{}));return(await i(this,e,"f")).dispatch("removeFromContextGroup",{target:t})}async getAllClientsInContextGroup(t){this.wire.sendAction("interop-client-get-all-clients-in-context-group").catch((e=>{}));const n=await i(this,e,"f");if(!t)throw new Error("No contextGroupId specified for getAllClientsInContextGroup.");return n.dispatch("getAllClientsInContextGroup",{contextGroupId:t})}async getInfoForContextGroup(t){this.wire.sendAction("interop-client-get-info-for-context-group").catch((e=>{}));const n=await i(this,e,"f");if(!t)throw new Error("No contextGroupId specified for getInfoForContextGroup.");return n.dispatch("getInfoForContextGroup",{contextGroupId:t})}async fireIntent(t){this.wire.sendAction("interop-client-fire-intent").catch((e=>{}));return(await i(this,e,"f")).dispatch("fireIntent",t)}async registerIntentHandler(t,n,r){this.wire.sendAction("interop-client-register-intent-handler").catch((e=>{}));const o=await i(this,e,"f"),s=`intent-handler-${n}`,a=(0,l.wrapIntentHandler)(t,s);try{await o.register(s,a),await o.dispatch("intentHandlerRegistered",{handlerId:s,...r})}catch(e){throw new Error("Unable to register intent handler")}return{unsubscribe:async()=>{o.remove(s)}}}async getCurrentContext(t){this.wire.sendAction("interop-client-get-current-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("getCurrentContext",{contextType:t})}async getInfoForIntent(t){this.wire.sendAction("interop-client-get-info-for-intent").catch((e=>{}));return(await i(this,e,"f")).dispatch("getInfoForIntent",t)}async getInfoForIntentsByContext(t){this.wire.sendAction("interop-client-get-info-for-intents-by-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("getInfoForIntentsByContext",t)}async fireIntentForContext(t){this.wire.sendAction("interop-client-fire-intent-for-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("fireIntentForContext",t)}async joinSessionContextGroup(n){try{const r=i(this,t,"f").get(n);if(r)return r.getUserInstance();const o=await i(this,e,"f"),{hasConflict:s}=await o.dispatch("sessionContextGroup:createIfNeeded",{sessionContextGroupId:n});s&&console.warn(`A (non-session) context group with the name "${n}" already exists. If you are trying to join a Context Group, call joinContextGroup instead.`);const c=new a.default(this.wire,i(this,e,"f"),n);return i(this,t,"f").set(n,c),c.getUserInstance()}catch(e){throw console.error(`Error thrown trying to create Session Context Group with id "${n}": ${e}`),e}}async onDisconnection(t){this.wire.sendAction("interop-client-add-ondisconnection-listener").catch((e=>{}));return(await i(this,e,"f")).onDisconnection((e=>{const{uuid:n}=e;t({type:"interop-broker",topic:"disconnected",brokerName:n})}))}getFDC3Sync(e){switch(e){case"1.2":return new c.Fdc3Module((()=>this),this.wire);case"2.0":return new h.Fdc3Module2((()=>this),this.wire);default:throw new Error(`Invalid FDC3 version provided: ${e}. Must be '1.2' or '2.0'`)}}async getFDC3(e){return this.getFDC3Sync(e)}static async ferryFdc3Call(t,n,r){return(await i(t,e,"f")).dispatch(n,r||null)}};return Ki.InteropClient=u,e=new WeakMap,t=new WeakMap,Ki}var yr,fr,gr,mr={};function vr(){if(yr)return mr;yr=1,Object.defineProperty(mr,"__esModule",{value:!0}),mr.overrideCheck=mr.checkFDC32Overrides=mr.getDefaultViewFdc3VersionFromAppInfo=void 0;const e=Vi();function t(t){return["fdc3HandleFindInstances","handleInfoForIntent","handleInfoForIntentsByContext","fdc3HandleGetAppMetadata","fdc3HandleGetInfo","fdc3HandleOpen","handleFiredIntent","handleFiredIntentForContext"].filter((n=>t[n]===e.InteropBroker.prototype[n]))}return mr.getDefaultViewFdc3VersionFromAppInfo=function({manifest:e,initialOptions:t}){const n=e?.platform?.defaultViewOptions?.fdc3InteropApi??t.defaultViewOptions?.fdc3InteropApi;return["1.2","2.0"].includes(n??"")?n:void 0},mr.checkFDC32Overrides=t,mr.overrideCheck=function(e,n){if(n&&"2.0"===n){const n=t(e);n.length>0&&console.warn(`WARNING: FDC3 2.0 has been set as a default option for Views in this Platform, but the required InteropBroker APIs for FDC3 2.0 compliance have not all been overridden.\nThe following APIs need to be overridden:\n${n.join("\n")}`)}},mr}function Cr(){return gr||(gr=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),i=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),i(function(){if(fr)return Ti;fr=1;var e=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ti,"__esModule",{value:!0}),Ti.InteropModule=void 0;const t=e(n),i=$i,r=d,o=Vi(),a=wr(),c=vr(),h=Tn,l=e=>new e,u="You have attempted to use or modify InteropBroker parameters, which is not allowed. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.";class p extends r.Base{async init(e,n=l){this.wire.sendAction("interop-init").catch((()=>{}));const r=await this.wire.environment.getInteropInfo(this.wire.getFin()),s=(0,i.createUnusableObject)(u),a=(0,i.createWarningObject)(u,(0,t.default)(r)),d=async()=>{throw new Error(u)},p=o.InteropBroker.createClosedConstructor(this.wire,(()=>this.fin.InterApplicationBus.Channel.create(`interop-broker-${e}`)),r);let w;return w=Array.isArray(n)?new((0,h.overrideFromComposables)(...n)(p))(s,d,a):await n(p,s,d,a),(0,c.overrideCheck)(w,r.fdc3Version),w}connectSync(e,t){return this.wire.sendAction("interop-connect-sync").catch((()=>{})),new a.InteropClient(this.wire,this.wire.environment.whenReady().then((()=>this.fin.InterApplicationBus.Channel.connect(`interop-broker-${e}`,{payload:t}))))}}return Ti.InteropModule=p,Ti}(),e),i(wr(),e),i(Vi(),e)}(Li)),Li}var br={},Ir={},Er={},xr={};Object.defineProperty(xr,"__esModule",{value:!0}),xr.getSnapshotSourceChannelName=void 0;xr.getSnapshotSourceChannelName=e=>`snapshot-source-provider-${e.uuid}`;var Ar,Pr,Mr,_r,Or,Sr=s&&s.__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},Rr=s&&s.__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)};Object.defineProperty(Er,"__esModule",{value:!0}),Er.SnapshotSource=void 0;const Fr=d,jr=xr,kr=new Map;class Lr extends Fr.Base{constructor(e,t){super(e),Ar.set(this,void 0),Pr.set(this,(()=>(kr.has(this.identity.uuid)||kr.set(this.identity.uuid,{eventFired:null,clientPromise:null}),kr.get(this.identity.uuid)))),Mr.set(this,(()=>(Rr(this,Pr,"f").call(this).clientPromise||(Rr(this,Pr,"f").call(this).clientPromise=Rr(this,_r,"f").call(this)),Rr(this,Pr,"f").call(this).clientPromise))),_r.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);try{Rr(this,Pr,"f").call(this).eventFired||await Rr(this,Or,"f").call(this);const t=await this.fin.InterApplicationBus.Channel.connect(e,{wait:!1});return t.onDisconnection((()=>{Rr(this,Pr,"f").call(this).clientPromise=null,Rr(this,Pr,"f").call(this).eventFired=null})),t}catch(e){throw Rr(this,Pr,"f").call(this).clientPromise=null,new Error("The targeted SnapshotSource is not currently initialized. Await this object's ready() method.")}})),Or.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);let t,n;const i=new Promise(((e,i)=>{t=e,n=i}));Rr(this,Pr,"f").call(this).eventFired=i;const r=async i=>{try{i.channelName===e&&(t(),await this.fin.InterApplicationBus.Channel.removeListener("connected",r))}catch(e){n(e)}};await this.fin.InterApplicationBus.Channel.on("connected",r)})),Sr(this,Ar,t,"f")}get identity(){return Rr(this,Ar,"f")}async ready(){this.wire.sendAction("snapshot-source-ready").catch((e=>{}));try{await Rr(this,Mr,"f").call(this)}catch(e){await Rr(this,Pr,"f").call(this).eventFired}}async getSnapshot(){this.wire.sendAction("snapshot-source-get-snapshot").catch((e=>{}));const e=await Rr(this,Mr,"f").call(this),t=await e.dispatch("get-snapshot");return(await t).snapshot}async applySnapshot(e){this.wire.sendAction("snapshot-source-apply-snapshot").catch((e=>{}));return(await Rr(this,Mr,"f").call(this)).dispatch("apply-snapshot",{snapshot:e})}}Er.SnapshotSource=Lr,Ar=new WeakMap,Pr=new WeakMap,Mr=new WeakMap,_r=new WeakMap,Or=new WeakMap,Object.defineProperty(Ir,"__esModule",{value:!0}),Ir.SnapshotSourceModule=void 0;const Tr=d,$r=Er,Br=xr;class Gr extends Tr.Base{async init(e){if(this.wire.sendAction("snapshot-source-init").catch((e=>{})),"object"!=typeof e||"function"!=typeof e.getSnapshot||"function"!=typeof e.applySnapshot)throw new Error("you must pass in a valid SnapshotProvider");const t=await this.fin.InterApplicationBus.Channel.create((0,Br.getSnapshotSourceChannelName)(this.fin.me));t.register("get-snapshot",(async()=>({snapshot:await e.getSnapshot()}))),t.register("apply-snapshot",(({snapshot:t})=>e.applySnapshot(t)))}wrapSync(e){return this.wire.sendAction("snapshot-source-wrap-sync").catch((e=>{})),new $r.SnapshotSource(this.wire,e)}async wrap(e){return this.wire.sendAction("snapshot-source-wrap").catch((e=>{})),this.wrapSync(e)}}Ir.SnapshotSourceModule=Gr,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Ir,e),n(Er,e)}(br),Object.defineProperty(a,"__esModule",{value:!0});var Wr=a.Fin=void 0;const Hr=t,Nr=c,Dr=ie(),Ur=Z(),Vr=de,zr=en,Kr=rn,qr=un,Jr=bn,Yr=J(),Zr=An,Qr=ki,Xr=Cr(),eo=br;class to extends Hr.EventEmitter{constructor(e){super(),this.wire=e,this.System=new Nr.System(e),this.Window=new Dr._WindowModule(e),this.Application=new Ur.ApplicationModule(e),this.InterApplicationBus=new Vr.InterApplicationBus(e),this.Clipboard=new zr.Clipboard(e),this.ExternalApplication=new Kr.ExternalApplicationModule(e),this.Frame=new qr._FrameModule(e),this.GlobalHotkey=new Jr.GlobalHotkey(e),this.Platform=new Zr.PlatformModule(e,this.InterApplicationBus.Channel),this.View=new Yr.ViewModule(e),this.Interop=new Xr.InteropModule(e),this.SnapshotSource=new eo.SnapshotSourceModule(e),e.registerFin(this),this.me=(0,Qr.getMe)(e),e.on("disconnected",(()=>{this.emit("disconnected")}))}}Wr=a.Fin=to;var no={},io={};function ro(e){return"string"==typeof e.manifestUrl}function oo(e){return ao(e)&&"string"==typeof e.address}function so(e){return oo(e)&&"string"==typeof e.token}function ao(e){return"string"==typeof e.uuid}function co(e){return e.runtime&&"string"==typeof e.runtime.version}function ho(e){return ao(e)&&co(e)}Object.defineProperty(io,"__esModule",{value:!0}),io.isInternalConnectConfig=io.isPortDiscoveryConfig=io.isNewConnectConfig=io.isConfigWithReceiver=io.isRemoteConfig=io.isExistingConnectConfig=io.isExternalConfig=void 0,io.isExternalConfig=ro,io.isExistingConnectConfig=oo,io.isRemoteConfig=so,io.isConfigWithReceiver=function(e){return"object"==typeof e.receiver&&so({...e,address:""})},io.isNewConnectConfig=ho,io.isPortDiscoveryConfig=function(e){return ro(e)&&co(e)||ho(e)},io.isInternalConnectConfig=function(e){return oo(e)||ho(e)};var lo={},uo={};Object.defineProperty(uo,"__esModule",{value:!0}),uo.EmitterMap=void 0;const po=t;function wo(e){return Buffer.from(e).toString("base64")}uo.EmitterMap=class{constructor(){this.storage=new Map}hashKeys(e){return e.map(wo).join("/")}getOrCreate(e){const t=this.hashKeys(e);return this.storage.has(t)||this.storage.set(t,new po.EventEmitter),this.storage.get(t)}has(e){return this.storage.has(this.hashKeys(e))}delete(e){const t=this.hashKeys(e);return this.storage.delete(t)}},Object.defineProperty(lo,"__esModule",{value:!0});const yo=uo;class fo extends yo.EmitterMap{constructor(){super(...arguments),this.dispatchEvent=e=>{if(function(e){return"process-desktop-event"===e.action}(e)){const{payload:t}=e,n=function(e){const{topic:t}=e;if("frame"===t||"window"===t||"view"===t){const{uuid:n,name:i}=e;return[t,n,i]}if("application"===t){const{uuid:n}=e;return[t,n]}return[t]}(t);if(this.has(n))return this.getOrCreate(n).emit(t.type,t),!0}return!1}}}lo.default=fo;var go,mo,vo=s&&s.__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},Co=s&&s.__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)},bo=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(no,"__esModule",{value:!0});var Io=no.Transport=void 0;const Eo=t,xo=io,Ao=g,Po=bo(lo),Mo=ki,_o=ke;class Oo extends Eo.EventEmitter{constructor(e,t,n){super(),this.wireListeners=new Map,this.topicRefMap=new Map,this.eventAggregator=new Po.default,this.messageHandlers=[this.eventAggregator.dispatchEvent],go.set(this,void 0),mo.set(this,void 0),this.connectSync=()=>{Co(this,go,"f").connectSync()},this.getPort=()=>Co(this,go,"f").getPort(),vo(this,go,new e(this.onmessage.bind(this)),"f"),this.environment=t,this.sendRaw=Co(this,go,"f").send.bind(Co(this,go,"f")),this.registerMessageHandler(this.handleMessage.bind(this)),Co(this,go,"f").on("disconnected",(()=>{for(const[,{handleNack:e}]of this.wireListeners)e({reason:"Remote connection has closed"});this.wireListeners.clear(),this.emit("disconnected")}));const{uuid:i,name:r}=n,o=this.environment.getCurrentEntityType();this.me=(0,Mo.getBaseMe)(o,i,r)}getFin(){if(!Co(this,mo,"f"))throw new Error("No Fin object registered for this transport");return Co(this,mo,"f")}registerFin(e){if(Co(this,mo,"f"))throw new Error("Fin object has already been registered for this transport");vo(this,mo,e,"f")}shutdown(){return Co(this,go,"f").shutdown()}async connect(e){if((0,xo.isConfigWithReceiver)(e))return await Co(this,go,"f").connect(e.receiver),this.authorize(e);if((0,xo.isRemoteConfig)(e))return this.connectRemote(e);if((0,xo.isExistingConnectConfig)(e))return this.connectByPort(e);if((0,xo.isNewConnectConfig)(e)){const t=await this.environment.retrievePort(e);return this.connectByPort({...e,address:`ws://localhost:${t}`})}}async connectRemote(e){return await Co(this,go,"f").connect(new(this.environment.getWsConstructor())(e.address)),this.authorize(e)}async connectByPort(e){const{address:t,uuid:n}=e,i={...e,type:"file-token"},r=Co(this,go,"f");await r.connect(new(this.environment.getWsConstructor())(e.address));const o=await this.sendAction("request-external-authorization",{uuid:n,type:"file-token"},!0);if("external-authorization-response"!==o.action)throw new Ao.UnexpectedActionError(o.action);return await this.environment.writeToken(o.payload.file,o.payload.token),this.authorize(i)}async authorize(e){const t=await this.sendAction("request-authorization",e,!0);if("authorization-response"!==t.action)throw new Ao.UnexpectedActionError(t.action);if(!0!==t.payload.success)throw new Ao.RuntimeError(t.payload)}sendAction(e,t={},n=!1){let i=()=>{};const r=Ao.RuntimeError.getCallSite(1),o=this.environment.getNextMessageId(),s=new Promise(((s,a)=>{i=a;const c={action:e,payload:t,messageId:o},d=Co(this,go,"f");return this.addWireListener(o,s,(e=>this.nackHandler(e,a,r)),n),d.send(c).catch(a)}));return Object.assign(s,{cancel:i,messageId:o})}nackHandler(e,t,n){t("string"==typeof e?e:new Ao.RuntimeError(e,n))}ferryAction(e){return new Promise(((t,n)=>{const i=this.environment.getNextMessageId();e.messageId=i;const r=e=>{t(e.payload)};return Co(this,go,"f").send(e).then((()=>this.addWireListener(i,r,(e=>this.nackHandler(e,n)),!1))).catch(n)}))}registerMessageHandler(e){this.messageHandlers.push(e)}addWireListener(e,t,n,i){i?this.uncorrelatedListener=t:this.wireListeners.has(e)?n({reason:"Duplicate handler id",error:(0,_o.errorToPOJO)(new Ao.DuplicateCorrelationError(String(e)))}):this.wireListeners.set(e,{resolve:t,handleNack:n})}onmessage(e){for(const t of this.messageHandlers)t.call(null,e)}handleMessage(e){const t=e.correlationId||NaN;if("correlationId"in e){if(!this.wireListeners.has(t))return!1;{const{resolve:n,handleNack:i}=this.wireListeners.get(t);"ack"!==e.action?i({reason:"Did not receive ack action",error:(0,_o.errorToPOJO)(new Ao.NoAckError(e.action))}):"payload"in e?e.payload.success?n.call(null,e):i(e.payload):"string"==typeof e.reason?i(e):(console.warn("Received invalid response from core",e),i({reason:"invalid response shape"})),this.wireListeners.delete(t)}}else this.uncorrelatedListener&&this.uncorrelatedListener.call(null,e),this.uncorrelatedListener=()=>{};return!0}}Io=no.Transport=Oo,go=new WeakMap,mo=new WeakMap;const So=(...e)=>({log:(...t)=>console.debug(`[${(new Date).toISOString()}]`,...(e=>e.map((e=>`[${e}]`)))(e),...t),getLogger:(...t)=>So(...e,...t)}),Ro=So("@openfin/core-web/client");function Fo(e,t){if(!function(e){return"string"==typeof e}(e))throw new Error(`Property ${t} has invalid type. Expected string, got ${typeof e}.`)}const jo="web-broker-ports-ready",ko=Ro.getLogger("get-web-interop-ports");function Lo(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)}function To(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}"function"==typeof SuppressedError&&SuppressedError;const $o=e=>{var n,i,r;return r=class extends t.EventEmitter{constructor(t){super(),n.set(this,void 0),i.set(this,!1),this.connectSync=()=>{Lo(this,i,"f")||(e.addEventListener("message",(e=>{e.data?.topic?.startsWith("wire-message")&&e.data.message&&Lo(this,n,"f").call(this,{...JSON.parse(e.data.message),ports:e.ports})})),e.start())},this.connect=async()=>{this.connectSync()},this.send=t=>(e.postMessage({topic:"wire-message",message:JSON.stringify(t)}),Promise.resolve()),this.shutdown=async()=>{e.close()},To(this,n,t,"f")}getPort(){return e}},n=new WeakMap,i=new WeakMap,r};var Bo={},Go={};Object.defineProperty(Go,"__esModule",{value:!0}),Go.BaseEnvironment=void 0;const Wo=vr();Go.BaseEnvironment=class{async getViewWindowIdentity(e,t){const{identity:n}=await e.View.wrapSync(t).getCurrentWindow();return n}async getInteropInfo(e){const t=await e.Application.getCurrentSync().getInfo().catch((()=>null)),n=t?.initialOptions?.interopBrokerConfiguration??{};return{fdc3Version:t?(0,Wo.getDefaultViewFdc3VersionFromAppInfo)(t):void 0,...n,fdc3Info:{providerVersion:await e.System.getVersion(),provider:"OpenFin"}}}},Object.defineProperty(Bo,"__esModule",{value:!0});var Ho=Bo.BrowserEnvironment=void 0;const No=Go;class Do extends No.BaseEnvironment{constructor(){super(...arguments),this.type="other",this.getRandomId=()=>{const e=new Uint32Array(1);return window.crypto.getRandomValues(e)[0].toString(32)}}getAdapterVersionSync(){return""}observeBounds(e,t){throw new Error("Method not implemented.")}layoutAllowedInContext(e){return!1}initLayoutManager(e,t,n){throw new Error("Method not implemented.")}applyLayoutSnapshot(e,t,n){throw new Error("Method not implemented.")}createLayout(e,t){throw new Error("Method not implemented.")}destroyLayout(e,t){throw new Error("Method not implemented.")}resolveLayout(e,t){throw new Error("Method not implemented.")}initPlatform(...e){throw new Error("Method not implemented.")}writeToken(e,t){return Promise.resolve("")}retrievePort(e){throw new Error("Method not implemented.")}getNextMessageId(){return this.getRandomId()}createChildContent(e){throw new Error("Method not implemented.")}getWebWindow(e){throw new Error("Method not implemented.")}getCurrentEntityIdentity(){throw new Error("Method not implemented.")}getCurrentEntityType(){return"external connection"}raiseEvent(e,t){throw new Error("Method not implemented.")}getUrl(){return location.href}getDefaultChannelOptions(){return{create:{},connect:{}}}getRtcPeer(){return new RTCPeerConnection}getWsConstructor(){return WebSocket}whenReady(){return Promise.resolve()}}Ho=Bo.BrowserEnvironment=Do;const Uo=e=>"platform"in e&&void 0!==e.platform;var Vo,zo;class Ko extends Ho{constructor(e){super(),this.connectConfig=e,Vo.set(this,void 0),zo.set(this,new W((async()=>Promise.resolve().then((function(){return __webpack_require__(/*! ./main-b14f67c9.js */ "../../node_modules/@openfin/core-web/out/main-b14f67c9.js")}))))),Uo(e)&&this.validatePlatformOptions(e)}getAdapterVersionSync(){return"0.39.21"}validatePlatformOptions({platform:e}){if(!("layoutSnapshot"in e))throw new Error("Platform options are missing layoutSnapshot. Please provide a layoutSnapshot in the platform options.");if("windows"in e||"windows"in e.layoutSnapshot)throw new Error("It appears you tried to call connect() with a snapshot object from an OpenFin desktop environment. Note that connect() expects to be called with a platform property with this structure: { platform: { layoutSnapshot } }. To get a layoutSnapshot of the expected structure, use fin.Platform.Layout.getCurrentLayoutManagerSync().getLayoutSnapshot() in v34+ in your desktop environment.");const{layouts:t}=e.layoutSnapshot;Object.entries(t).map((([e,t])=>{if("object"!=typeof t||null===t)throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must be an object.`);if(!("content"in t))throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must contain a 'content' property.`)}))}async getInteropInfo(e){return{...{contextGroups:void 0,logging:{beforeAction:{enabled:!1},afterAction:{enabled:!1}}},fdc3Version:void 0,fdc3Info:{providerVersion:"0.39.21",provider:"OpenFin Web"}}}layoutAllowedInContext(e){return!0}async initLayoutManager(e,t,n){if(Lo(this,Vo,"f"))throw new Error("Layout already initialized.");if(!Uo(this.connectConfig))throw new Error("Platform options are missing from connection config.");const{WebLayoutEntryPoint:i}=await Lo(this,zo,"f").getValue();return To(this,Vo,new i(this.connectConfig),"f"),await Lo(this,Vo,"f").initLayoutManager(e,t,n)}async applyLayoutSnapshot(e,t,n){Lo(this,Vo,"f")?.applyLayoutSnapshot(e,t,n)}async createLayout(e,t){return Lo(this,Vo,"f")?.createLayout(e,t)}async destroyLayout(e,t){return Lo(this,Vo,"f")?.destroyLayout(e,t)}async getViewWindowIdentity(e,t){return Promise.resolve({uuid:t.uuid,name:t.uuid})}}Vo=new WeakMap,zo=new WeakMap;const qo=()=>{const e=((e,t)=>{const n=new RegExp(`^${t}<(?.*)>$`).exec(e)?.groups?.meta;if(n)try{return JSON.parse(atob(n))}catch(e){throw new Error(`Failed to decode JSON from ${n}.`)}})(window.name,"of-frame");if(e)try{const{name:t,uuid:n,brokerUrl:i,providerId:r,contextGroup:o}=e;return Fo(i,"brokerUrl"),Fo(n,"uuid"),Fo(t,"name"),{identity:{name:t,uuid:n},brokerUrl:i,interopConfig:{providerId:r,currentContextGroup:o}}}catch(e){throw new Error(`Unexpected error occurred when inferring platform information: ${e.stack}`)}},Jo=()=>{const e=r.v4();return{uuid:e,name:e}},Yo=async e=>{if("enabled"===e.connectionInheritance){const t=await(async e=>{const t=qo();if(t){const{validateOptions:n=(()=>!0)}=e,{identity:i,...r}=t;if(!await n(r))throw new Error("Parent options were rejected by validateOptions.");return t}})(e);if(t)return t}if(!e.options){const t="enabled"===e.connectionInheritance?"Broker URL was not specified nor provided by a platform container.":"Connection inheritance is disabled but no options were provided.";throw new Error(t)}return{...e.options,identity:Jo()}};exports.__classPrivateFieldGet=Lo,exports.__classPrivateFieldSet=To,exports.apiExposer=Gn,exports.commonjsGlobal=s,exports.connect=async t=>{try{Ro.log("Establishing connection",t);const{brokerUrl:n,identity:i,timeout:r,interopConfig:s}=await Yo(t),{workerPort:a,iframeBrokerPort:c}=await(async(e,t,n)=>{const{origin:i}=new URL(e),r=document.createElement("IFRAME");let s;r.style.display="none";try{return await new Promise(((a,c)=>{const d=e=>{if(e.source===r.contentWindow&&e.data?.topic===`ack-${jo}`){if(e.origin!==i)c(new Error(`Broker redirected to unexpected origin ${e.origin}, expected ${i}.`));else if(e.data.success){const[t,n]=e.ports;a({iframeBrokerPort:t,workerPort:n})}else c(new m(e.data));window.removeEventListener("message",d),clearTimeout(s)}};window.addEventListener("message",d),ko.log(`Connecting to broker ${e}`),r.setAttribute("src",e),r.setAttribute("name",o(t,"of-broker")),document.body.appendChild(r),ko.log("Iframe loaded, awaiting init message from iframe"),n&&(s=setTimeout((()=>{window.removeEventListener("message",d),document.body.removeChild(r),c(new Error("Worker did not initialize in time"))}),n))}))}catch(e){throw new Error(`Failed to initialise Fin Web Client. ${e.message}`,{cause:e})}})(n,i,r);Ro.log("Successfully established connection to shared worker");const d={entityType:"external connection",...i};a.start(),c.start();const h=((t,n,i)=>{const r=$o(n),o=new Ko(t),s=new Io(r,o,i);return s.connectSync(),window.Buffer=e.Buffer,new Wr(s)})(t,a,d);return s?.providerId&&(h.me.interop=h.Interop.connectSync(s.providerId),s?.currentContextGroup&&h.me.interop.joinContextGroup(s.currentContextGroup).catch((e=>{console.warn(`Error joining specified context group: ${s?.currentContextGroup}, continuing`,e)}))),{...h,me:{...h.me,identity:{uuid:h.me.uuid,name:h.me.name}}}}catch(e){throw new Error(`An error occured during web-interop connection: ${e.message}`)}},exports.decorators=Nn,exports.encodeOptions=o,exports.layout_constants=ai,exports.lazy=G; /***/ }), -/***/ "./node_modules/@openfin/core-web/out/main-b14f67c9.js": -/*!*************************************************************!*\ - !*** ./node_modules/@openfin/core-web/out/main-b14f67c9.js ***! - \*************************************************************/ +/***/ "../../node_modules/@openfin/core-web/out/main-b14f67c9.js": +/*!*****************************************************************!*\ + !*** ../../node_modules/@openfin/core-web/out/main-b14f67c9.js ***! + \*****************************************************************/ /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; -var t=__webpack_require__(/*! ./main-8cad4070.js */ "./node_modules/@openfin/core-web/out/main-8cad4070.js"),e=__webpack_require__(/*! uuid */ "../../node_modules/uuid/dist/esm-browser/index.js");__webpack_require__(/*! buffer/ */ "../../node_modules/buffer/index.js"),__webpack_require__(/*! events */ "../../node_modules/events/events.js"),__webpack_require__(/*! lodash/cloneDeep */ "../../node_modules/lodash/cloneDeep.js"),__webpack_require__(/*! lodash/isEqual */ "../../node_modules/lodash/isEqual.js");var i={},n={};Object.defineProperty(n,"__esModule",{value:!0}),n.mapValuesAsync=n.mapEntriesAsync=void 0;const o=(t,[e,i])=>({...t,[e]:i});async function s(t,e){return(await Promise.all(e.map((async([e,i])=>[e,await t(i,e)])))).reduce(o,{})}n.mapEntriesAsync=s,n.mapValuesAsync=async function(t,e){let i;return i=e instanceof Map?[...e.entries()]:Object.entries(e),s(t,i)};var r,a,l,h,d=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldSet||function(t,e,i,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(t,i):o?o.value=i:e.set(t,i),i},c=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldGet||function(t,e,i,n){if("a"===i&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?n:"a"===i?n.call(t):n?n.value:e.get(t)};Object.defineProperty(i,"__esModule",{value:!0});var m=i.DefaultLayoutManager=void 0;const u=n;class p{constructor(t){a.set(this,void 0),l.set(this,new Map),d(this,a,t,"f")}size(){return c(this,l,"f").size}async applyLayoutSnapshot({layouts:t}){if(Object.keys(t).length>1)throw new Error("[LayoutManager] Tried to call applyLayoutSnapshot with more than 1 layout. When implementing multiple layouts via overridden LayoutManager class, you must override and fully implement the applyLayoutSnapshot method without calling super.applyLayoutSnapshot().");const[[e,i]]=Object.entries(t);await p.createLayout(this,{layoutName:e,layout:i})}async showLayout({layoutName:t}){}async getLayoutSnapshot(){return{layouts:await(0,u.mapValuesAsync)((t=>t.getFrameSnapshot()),c(this,l,"f"))}}async removeLayout({layoutName:t}){}getLayoutIdentityForView(t){const e=[...c(this,l,"f").values()].find((e=>e.getCurrentViews().some((e=>e.name===t.name&&e.uuid===t.uuid))));return e?.identity??void 0}isLayoutVisible({layoutName:t}){return c(p,r,"m",h).call(p,this,t).isVisible()}resolveLayoutIdentity(t){if(t&&"layoutName"in t)return t;const e=[...c(this,l,"f").values()];if(1===e.length)return e[0].identity;const i=e.find((t=>t.isVisible()));return i?.identity??void 0}static async resolveLayout(t,e){const i=t.resolveLayoutIdentity(e);if(void 0===i||!("layoutName"in i))throw new Error("[layout-manager] resolveLayout: Could not resolve the layout identity. Make sure you include 'layoutName' in the identity object.");return c(p,r,"m",h).call(p,t,i.layoutName)}static async handleSharedView(t,e,i){await(0,u.mapValuesAsync)((async t=>{if(t.identity.layoutName!==e.layoutName){const e=t.getCurrentViews().find((t=>t.name===i.name));e&&await t.onViewDetached({viewIdentity:e,target:null}).catch(console.error)}}),c(t,l,"f"))}static async handleLastViewRemoved(t,e){await t.removeLayout(e),await c(t,a,"f").handleLastViewRemoved(t)}static async destroyLayout(t,{layoutName:e}){await c(p,r,"m",h).call(p,t,e).destroy(),c(t,l,"f").delete(e)}static async createLayout(t,e){const{layoutName:i}=e;if(c(t,l,"f").has(i))throw new Error(`Layout name ${i} already exists`);await c(t,a,"f").createLayout(e,t)}static registerLayout(t,e,i){c(t,l,"f").set(e,i)}static getAllLayouts(t){return[...c(t,l,"f").values()]}static setInitialSnapshot(t,e){c(t,a,"f").setInitialSnapshot(e)}static createClosedConstructor(...t){return class extends p{constructor(){super(...t)}}}}m=i.DefaultLayoutManager=p,r=p,a=new WeakMap,l=new WeakMap,h=function(t,e){const i=c(t,l,"f").get(e);if(!i)throw new Error(`[layout-manager] getLayoutByName: Could not locate layout with name '${e}'`);return i};var g={},f={},v={};Object.defineProperty(v,"__esModule",{value:!0}),v.ReversibleMap=void 0;v.ReversibleMap=class{constructor(){this.valueToKey=new Map,this.keyToValue=new Map,this.setUnique=(t,e)=>{if(this.hasKey(t)||this.hasValue(e))throw new Error("Key or value already in the map.");this.keyToValue.set(t,e),this.valueToKey.set(e,t)},this.getKey=t=>{const e=this.valueToKey.get(t);if(!e)throw new Error("Value not found in the map.");return e},this.deleteKey=t=>{const e=this.getValue(t);return this.keyToValue.delete(t),this.valueToKey.delete(e),e},this.deleteValue=t=>{const e=this.getKey(t);return this.keyToValue.delete(e),this.valueToKey.delete(t),e},this.hasKey=t=>this.keyToValue.has(t),this.hasValue=t=>this.valueToKey.has(t)}getValue(t){const e=this.keyToValue.get(t);if(!e)throw new Error("Key not found in the map.");return e}},Object.defineProperty(f,"__esModule",{value:!0});var _=f.LayoutContentCache=void 0;const y=t.lazy,C=v;class w{constructor(){this.contentItemCache=new C.ReversibleMap,this.contentItemCacheId=0,this.createCacheKey=()=>{const t=`entity-${this.contentItemCacheId.toString()}`;return this.contentItemCacheId+=1,t},this.hasKey=t=>this.contentItemCache.hasKey(t),this.getItemOrUndefined=t=>{try{return this.getContentItemOrThrow(t)}catch(t){return}},this.getContentItemOrThrow=(t,e)=>{if(!this.contentItemCache.hasKey(t))throw new Error("Layout component has been destroyed or detached from the current layout.");const i=this.contentItemCache.getValue(t);if(e&&!e.includes(i.type))throw new Error(`Layout item is not the expected type. Expected ${e.join(", ")}, got ${i.type}.`);return i},this.getOrCreateEntityId=t=>{if(this.contentItemCache.hasValue(t))return this.contentItemCache.getKey(t);t.onDestroyed((()=>{this.contentItemCache.deleteValue(t)}));const e=this.createCacheKey();return this.contentItemCache.setUnique(e,t),e}}static getSingleInstance(){return w.singleton.getValue()}}_=f.LayoutContentCache=w,w.singleton=new y.Lazy((()=>new w));var I={},b={};!function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.getAdjacentStacks=t.doShareEdge=t.getAdjacentItem=void 0;t.getAdjacentItem=(e,i)=>{const{parent:n}=e;if(e.isRoot()||!n)return;const o=["top","bottom"].includes(i)?"column":"row",s=["top","left"].includes(i)?-1:1;if(n.type===o){const t=n.contentItems.indexOf(e)+s;if(t>=0&&t{const n=t.getBounds(),o=e.getBounds();if(!n||!o)return!1;if(["top","bottom"].includes(i)){return!(n.righto.right)}return!(n.bottomo.bottom)};t.getAdjacentStacks=(e,i)=>{const n=["top","bottom"].includes(i)?"row":"column",o=s=>"stack"===s.type?(0,t.doShareEdge)(e,s,i)?[s]:[]:"root"===s.type||"ground"===s.type?[]:s.type===n?s.contentItems.map((t=>o(t))).flat():s.type!==n?["top","right"].includes(i)?o(s.contentItems[s.contentItems.length-1]):o(s.contentItems[0]):[],s=(0,t.getAdjacentItem)(e,i);return s?o(s):[]}}(b);var S=t.commonjsGlobal&&t.commonjsGlobal.__decorate||function(t,e,i,n){var o,s=arguments.length,r=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(s<3?o(r):s>3?o(e,i,r):o(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};Object.defineProperty(I,"__esModule",{value:!0}),I.LayoutEntitiesController=void 0;const E=t.decorators,x=b,L=i;class z{constructor(t,e,i){this.wire=t,this.layoutManager=e,this.layoutContentCache=i,this.analytics=t=>{this.wire.sendAction(`layout-controller-${t}`).catch((()=>{}))},this.getLayoutIdentityForViewOrThrow=async t=>{const e=this.layoutManager.getLayoutIdentityForView(t);if(!e)throw new Error(`View identity ${t.name} is not attached to any layouts.`);return e},this.getRoot=async t=>{this.analytics("get-root");const e=(await this.getLayout(t)).getRoot();return{type:e.type,entityId:this.layoutContentCache.getOrCreateEntityId(e)}},this.getStackByView=async t=>{this.analytics("get-stack-by-view");const e=await this.getLayoutIdentityForViewOrThrow(t),i=(await this.getLayout(e)).getStackByView(t);if("stack"===i?.type)return{entityId:this.layoutContentCache.getOrCreateEntityId(i),type:"stack"}},this.getStackViews=t=>{this.analytics("get-stack-views");return this.layoutContentCache.getContentItemOrThrow(t,["stack"]).contentItems.map((t=>({name:t.viewName,uuid:this.wire.me.uuid})))},this.isRoot=t=>{this.analytics("is-root");return this.layoutContentCache.getContentItemOrThrow(t).isRoot()},this.exists=t=>(this.analytics("exists"),this.layoutContentCache.hasKey(t)),this.addViewToStack=async(t,e,{index:i}={index:0})=>{this.analytics("add-view-to-stack");const n=this.layoutContentCache.getContentItemOrThrow(t);if(i&&i>n.contentItems.length+1)throw new Error(`Index '${i}' out of range, please exclude the index or specify a number between 0 and ${n.contentItems.length}`);const o={id:t,index:i},{identity:s}=await n.layout.platformCreateView(e,{location:o});return s},this.findViewInStack=(t,e)=>t.contentItems.find((t=>t.viewName===e.name)),this.removeViewFromStack=async(t,e)=>{this.analytics("remove-view-from-stack");const i=this.layoutContentCache.getContentItemOrThrow(t,["stack"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to remove a view ('${e.name}') which does not belong to the stack.`);await n.layout.platformCloseView(e)},this.createAdjacentStack=async(t,e,{position:i="right"}={})=>{if(this.analytics("create-adjacent-stack"),!Array.isArray(e)||0===e.length)throw new Error('The parameter "views" must be an array with at least 1 element.');if(!["top","bottom","left","right"].includes(i))throw new Error(`Invalid position '${i}' specified.`);const n=this.layoutContentCache.getContentItemOrThrow(t).createAdjacentStack({position:i}),o=this.layoutContentCache.getOrCreateEntityId(n);return await Promise.all(e.reverse().map((t=>this.addViewToStack(o,t)))),o},this.getAdjacentStacks=async({targetId:t,edge:e})=>{this.analytics("get-adjacent-stacks");const i=this.layoutContentCache.getContentItemOrThrow(t);return(0,x.getAdjacentStacks)(i,e).map((t=>({entityId:this.layoutContentCache.getOrCreateEntityId(t)})))},this.setStackActiveView=async(t,e)=>{this.analytics("set-stack-active-view");const i=this.layoutContentCache.getContentItemOrThrow(t,["stack"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to set a view ('${e.name}') as active when it does not belong to the stack.`);i.setActiveContentItem(n,!0)}}async getLayout(t){const e=await L.DefaultLayoutManager.resolveLayout(this.layoutManager,t);if(!e)throw new Error(`Could not resolve target layout identity ${JSON.stringify(t)}`);return e}getContent(t){this.analytics("get-content");return this.layoutContentCache.getContentItemOrThrow(t,["column","row"]).contentItems.map((t=>({type:t.type,entityId:this.layoutContentCache.getOrCreateEntityId(t)})))}getParent(t){this.analytics("get-parent");const e=this.layoutContentCache.getContentItemOrThrow(t);if(!e.isRoot())return e.parent?.contentItems.includes(e)?{type:e.parent.type,entityId:this.layoutContentCache.getOrCreateEntityId(e.parent)}:void 0}}S([(0,E.expose)()],z.prototype,"getLayoutIdentityForViewOrThrow",void 0),S([(0,E.expose)()],z.prototype,"getRoot",void 0),S([(0,E.expose)()],z.prototype,"getStackByView",void 0),S([(0,E.expose)()],z.prototype,"getStackViews",void 0),S([(0,E.expose)()],z.prototype,"getContent",null),S([(0,E.expose)()],z.prototype,"getParent",null),S([(0,E.expose)()],z.prototype,"isRoot",void 0),S([(0,E.expose)()],z.prototype,"exists",void 0),S([(0,E.expose)()],z.prototype,"addViewToStack",void 0),S([(0,E.expose)()],z.prototype,"removeViewFromStack",void 0),S([(0,E.expose)()],z.prototype,"createAdjacentStack",void 0),S([(0,E.expose)()],z.prototype,"getAdjacentStacks",void 0),S([(0,E.expose)()],z.prototype,"setStackActiveView",void 0),I.LayoutEntitiesController=z,Object.defineProperty(g,"__esModule",{value:!0});var M=g.initLayoutEndpoints=void 0;const P=t.apiExposer,T=t.layout_constants,A=f,k=I,D=i;M=g.initLayoutEndpoints=async function(t,e){const i=t.getFin(),n=await i.Platform.getCurrentSync().getClient(),o=new P.ChannelsExposer(n);await new P.ApiExposer(o).exposeInstance(new k.LayoutEntitiesController(t,e,A.LayoutContentCache.getSingleInstance()),{id:T.LAYOUT_CONTROLLER_ID}),await async function(t,e){const i=t=>async i=>{const n=await D.DefaultLayoutManager.resolveLayout(e,i.target);if(!n)throw new Error(`Could not resolve the layout target from payload ${JSON.stringify(i)}`);return t(n,i)},n=(e,n)=>{t.register(e,i(n))},o=(t,e)=>{n(t,e)};n("replace-view",((t,e)=>t.replaceView(e))),n("replace-layout",((t,{layout:e})=>t.replaceLayout(e))),n("add-view",((t,e)=>t.insertView(e))),o("layout-add-view",((t,{viewOptions:e,location:i,targetView:n})=>t.platformCreateView(e,{location:i,targetView:n}))),n("close-view",((t,e)=>t.cleanupView(e.viewIdentity))),o("layout-close-view",((t,e)=>t.platformCloseView(e.viewIdentity))),n("apply-preset-layout",((t,e)=>t.applyPreset(e))),n("get-layout-views",(t=>t.getCurrentViews())),n("get-frame-snapshot",(t=>t.getFrameSnapshot())),n("is-visible",(t=>t.isVisible())),n("destroy",(t=>t.destroy())),t.register("get-layout-snapshot",(()=>e.getLayoutSnapshot()))}(n,e)};var R={};Object.defineProperty(R,"__esModule",{value:!0});var U=R.BaseLayout=void 0;U=R.BaseLayout=class{};var O={};Object.defineProperty(O,"__esModule",{value:!0});var V=O.DOMEmitter=void 0;V=O.DOMEmitter=class{constructor(t){this.container=t}dispatchLocalEvent(t,e){const i={...e,type:t,tabSelector:`tab-${e.name}`,containerSelector:`container-${e.name}`,topic:"openfin-DOM-event"};this.container.dispatchEvent(new CustomEvent(t,{detail:i}))}};var B={};Object.defineProperty(B,"__esModule",{value:!0});var H=B.mapLayoutContentItemsImmutableSync=B.mapLayoutContentItemsImmutable=W=B.isVisible=void 0;var W=B.isVisible=t=>(0!==t.offsetWidth||0!==t.offsetHeight)&&"hidden"!==window.getComputedStyle(t).visibility&&t.offsetTop>=0&&t.offsetLeft>=0&&t.offsetTop<=window.innerHeight&&t.offsetLeft<=window.innerWidth;const F=t=>"type"in t&&"component"===t.type;B.mapLayoutContentItemsImmutable=async function t(e,i){return F(i)?e(i):{...i,content:await Promise.all(i.content?.map((i=>t(e,i))))}},H=B.mapLayoutContentItemsImmutableSync=function t(e,i){return F(i)?e(i):{...i,content:i.content?.map((i=>t(e,i)))}};class N extends Error{constructor(t,e){super(e),this.type=t}}class G extends N{constructor(t,e){super("Configuration",t),this.node=e}}class j extends N{constructor(t){super("PopoutBlocked",t)}}class $ extends N{constructor(t){super("API",t)}}class Z extends N{constructor(t){super("Bind",t)}}class q extends Error{constructor(t,e,i){super(`${t}: ${e}${void 0===i?"":": "+i}`)}}class X extends q{constructor(t,e){super("Assert",t,e)}}class Y extends q{constructor(t,e,i){super("UnreachableCase",t,`${e}${void 0===i?"":": "+i}`)}}class K extends q{constructor(t,e){super("UnexpectedNull",t,e)}}class J extends q{constructor(t,e){super("UnexpectedUndefined",t,e)}}var Q;!function(t){let e=!1;const i={PopoutCannotBeCreatedWithGroundItemConfig:{id:0,default:"Popout cannot be created with ground ItemConfig"},PleaseRegisterAConstructorFunction:{id:1,default:"Please register a constructor function"},ComponentTypeNotRegisteredAndBindComponentEventHandlerNotAssigned:{id:2,default:"Component type not registered and BindComponentEvent handler not assigned"},ComponentIsAlreadyRegistered:{id:3,default:"Component is already registered"},ComponentIsNotVirtuable:{id:4,default:"Component is not virtuable. Requires rootHtmlElement field/getter"},VirtualComponentDoesNotHaveRootHtmlElement:{id:5,default:'Virtual component does not have getter "rootHtmlElement"'},ItemConfigIsNotTypeComponent:{id:6,default:"ItemConfig is not of type component"},InvalidNumberPartInSizeString:{id:7,default:"Invalid number part in size string"},UnknownUnitInSizeString:{id:8,default:"Unknown unit in size string"},UnsupportedUnitInSizeString:{id:9,default:"Unsupported unit in size string"}};t.idCount=Object.keys(i).length;const n=Object.values(i);t.checkInitialise=function(){if(!e)for(let e=0;e="0"&&t<="9"}function Tt(t,e){const i=zt(e);t.style.width=i}function At(t,e){const i=zt(e);t.style.height=i}function kt(t){return{width:t.offsetWidth,height:t.offsetHeight}}function Dt(t,e){t.style.display=e?"":"none"}function Rt(t,e){if(void 0!==e)for(const i in e)if(e.hasOwnProperty(i)){const n=e[i],o=t[i];t[i]=Ut(o,n)}return t}function Ut(t,e){if("object"!=typeof e)return e;if(Array.isArray(e)){const t=e.length,i=new Array(t);for(let n=0;n36)throw new Error("Too many keys in config minifier map")},t.translateObject=n}(dt||(dt={})),function(t){t.defaults={type:at.ground,content:[],size:1,sizeUnit:ht.Fractional,minSize:void 0,minSizeUnit:ht.Pixel,id:"",isClosable:!0},t.createCopy=function(t,e){switch(t.type){case at.ground:case at.row:case at.column:return gt.createCopy(t,e);case at.stack:return ut.createCopy(t,e);case at.component:return pt.createCopy(t);default:throw new Y("CICC91354",t.type,"Invalid Config Item type specified")}},t.createDefault=function(t){switch(t){case at.ground:throw new X("CICCDR91562");case at.row:case at.column:return gt.createDefault(t);case at.stack:return ut.createDefault();case at.component:return pt.createDefault();default:throw new Y("CICCDD91563",t,"Invalid Config Item type specified")}},t.isComponentItem=function(t){return t.type===at.component},t.isStackItem=function(t){return t.type===at.stack},t.isGroundItem=function(t){return t.type===at.ground}}(ct||(ct={})),function(t){t.defaultMaximised=!1,function(t){t.createCopy=function(t,e){return void 0===t?void 0:{show:null!=e?e:t.show,popout:t.popout,close:t.close,maximise:t.maximise,minimise:t.minimise,tabDropdown:t.tabDropdown}}}(t.Header||(t.Header={}))}(mt||(mt={})),function(t){function e(t){const e=t.length,i=new Array(e);for(let n=0;n"__glMaximised"===t));t>0&&(o=!0,n=n.splice(t,1)),e=n.length>0?n[0]:ct.defaults.id}else e=n;return i=void 0!==t.maximised?t.maximised:o,{id:e,maximised:i}}}(wt||(wt={})),function(t){function e(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0;return{resolved:!0,root:Et.resolve(i),openPopouts:t.resolveOpenPopouts(e.openPopouts),dimensions:t.Dimensions.resolve(e.dimensions),settings:t.Settings.resolve(e.settings),header:t.Header.resolve(e.header,e.settings,e.labels)}}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:Lt.fromResolvedArray(e.openPopouts),settings:_t.Settings.createCopy(e.settings),dimensions:t.Dimensions.fromResolved(e.dimensions),header:_t.Header.createCopy(e.header)}},t.isResolved=function(t){const e=t;return void 0!==e.resolved&&!0===e.resolved},t.resolveOpenPopouts=function(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0,{root:Et.resolve(o),openPopouts:xt.resolveOpenPopouts(e.openPopouts),dimensions:xt.Dimensions.resolve(e.dimensions),settings:xt.Settings.resolve(e.settings),header:xt.Header.resolve(e.header,e.settings,e.labels),parentId:null!==(i=e.parentId)&&void 0!==i?i:null,indexInParent:null!==(n=e.indexInParent)&&void 0!==n?n:null,window:t.Window.resolve(e.window,e.dimensions),resolved:!0}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:i(e.openPopouts),dimensions:xt.Dimensions.fromResolved(e.dimensions),settings:_t.Settings.createCopy(e.settings),header:_t.Header.createCopy(e.header),parentId:e.parentId,indexInParent:e.indexInParent,window:t.Window.fromResolved(e.window)}},t.fromResolvedArray=i}(Lt||(Lt={}));class Wt{constructor(){this._allEventSubscriptions=[],this._subscriptionsMap=new Map,this.unbind=this.removeEventListener,this.trigger=this.emit}tryBubbleEvent(t,e){}emit(t,...e){let i=this._subscriptionsMap.get(t);if(void 0!==i){i=i.slice();for(let t=0;t0){const n=e.slice();n.unshift(t);const o=this._allEventSubscriptions.slice();for(let t=0;t0?n.contentItems[0]:n,e=0);const o=this._layoutManager.createAndInitContentItem(i,t);t.addChild(o,e),this._layoutManager.layoutConfig.settings.popInOnClose?this._onClose():this.close()}createWindow(){const t=this.createUrl(),e=Math.floor(1e6*Math.random()).toString(36),i=this.serializeWindowFeatures({width:this._initialWindowSize.width,height:this._initialWindowSize.height,innerWidth:this._initialWindowSize.width,innerHeight:this._initialWindowSize.height,menubar:"no",toolbar:"no",location:"no",personalbar:"no",resizable:"yes",scrollbars:"no",status:"no"});if(this._popoutWindow=globalThis.open(t,e,i),this._popoutWindow)this._popoutWindow.addEventListener("load",(()=>this.positionWindow()),{passive:!0}),this._popoutWindow.addEventListener("beforeunload",(()=>{this._layoutManager.layoutConfig.settings.popInOnClose?this.popIn():this._onClose()}),{passive:!0}),this._checkReadyInterval=setInterval((()=>this.checkReady()),10);else if(!0===this._layoutManager.layoutConfig.settings.blockedPopoutsThrowError){throw new j("Popout blocked")}}checkReady(){if(null===this._popoutWindow)throw new K("BPCR01844");this._popoutWindow.__glInstance&&this._popoutWindow.__glInstance.isInitialised&&(this.onInitialised(),void 0!==this._checkReadyInterval&&(clearInterval(this._checkReadyInterval),this._checkReadyInterval=void 0))}serializeWindowFeatures(t){const e=[];for(const i in t)e.push(i+"="+t[i].toString());return e.join(",")}createUrl(){const t="gl-window-config-"+Ot(),e=_t.minifyConfig(this._config);try{localStorage.setItem(t,JSON.stringify(e))}catch(t){throw new Error("Error while writing to localStorage "+function(t){return t instanceof Error?t.message:"string"==typeof t?t:"Unknown Error"}(t))}const i=new URL(location.href);return i.searchParams.set("gl-window",t),i.toString()}positionWindow(){if(null===this._popoutWindow)throw new Error("BrowserPopout.positionWindow: null popoutWindow");this._popoutWindow.moveTo(this._initialWindowSize.left,this._initialWindowSize.top),this._popoutWindow.focus()}onInitialised(){this._isInitialised=!0,this.getGlInstance().on("popIn",(()=>this.popIn())),this.emit("initialised")}_onClose(){setTimeout((()=>this.emit("closed")),50)}}class Gt extends Wt{constructor(t,e,i,n){super(),this.layoutManager=t,this._parent=i,this._element=n,this._popInParentIds=[],this._type=e.type,this._id=e.id,this._isInitialised=!1,this.isGround=!1,this.isRow=!1,this.isColumn=!1,this.isStack=!1,this.isComponent=!1,this.size=e.size,this.sizeUnit=e.sizeUnit,this.minSize=e.minSize,this.minSizeUnit=e.minSizeUnit,this._isClosable=e.isClosable,this._pendingEventPropagations={},this._throttledEvents=["stateChanged"],this._contentItems=this.createContentItems(e.content)}get type(){return this._type}get id(){return this._id}set id(t){this._id=t}get popInParentIds(){return this._popInParentIds}get parent(){return this._parent}get contentItems(){return this._contentItems}get isClosable(){return this._isClosable}get element(){return this._element}get isInitialised(){return this._isInitialised}static isStack(t){return t.isStack}static isComponentItem(t){return t.isComponent}static isComponentParentableItem(t){return t.isStack||t.isGround}removeChild(t,e=!1){const i=this._contentItems.indexOf(t);if(-1===i)throw new Error("Can't remove child item. Unknown content item");if(e||this._contentItems[i].destroy(),this._contentItems.splice(i,1),this._contentItems.length>0)this.updateSize(!1);else if(!this.isGround&&!0===this._isClosable){if(null===this._parent)throw new K("CIUC00874");this._parent.removeChild(this)}}addChild(t,e,i){return null!=e||(e=this._contentItems.length),this._contentItems.splice(e,0,t),t.setParent(this),!0===this._isInitialised&&!1===t._isInitialised&&t.init(),e}replaceChild(t,e,i=!1){const n=this._contentItems.indexOf(t),o=t._element.parentNode;if(-1===n)throw new X("CIRCI23232","Can't replace child. oldChild is not child of this");if(null===o)throw new K("CIRCP23232");if(o.replaceChild(e._element,t._element),!0===i&&(t._parent=null,t.destroy()),this._contentItems[n]=e,e.setParent(this),e.size=t.size,e.sizeUnit=t.sizeUnit,e.minSize=t.minSize,e.minSizeUnit=t.minSizeUnit,null===e._parent)throw new K("CIRCNC45699");!0===e._parent._isInitialised&&!1===e._isInitialised&&e.init(),this.updateSize(!1)}remove(){if(null===this._parent)throw new K("CIR11110");this._parent.removeChild(this)}popout(){const t=Ot(),e=this.layoutManager.createPopoutFromContentItem(this,void 0,t,void 0);return this.emitBaseBubblingEvent("stateChanged"),e}calculateConfigContent(){const t=this._contentItems,e=t.length,i=new Array(e);for(let n=0;nthis.propagateEventToLayoutManager(t,e))))}propagateEventToLayoutManager(t,e){this._pendingEventPropagations[t]=!1,this.layoutManager.emitUnknown(t,e)}}class jt extends Gt{constructor(t,e,i){super(t,e,i,document.createElement("div")),this._parentItem=i,this._focused=!1,this.isComponent=!0,this._reorderEnabled=e.reorderEnabled,this.applyUpdatableConfig(e),this._initialWantMaximise=e.maximised;const n=document.createElement("div");n.classList.add("lm_content"),this.element.appendChild(n),this._container=new Ft(e,this,t,n,(t=>this.handleUpdateItemConfigEvent(t)),(()=>this.show()),(()=>this.hide()),(t=>this.focus(t)),(t=>this.blur(t)))}get componentName(){return this._container.componentType}get componentType(){return this._container.componentType}get reorderEnabled(){return this._reorderEnabled}get initialWantMaximise(){return this._initialWantMaximise}get component(){return this._container.component}get container(){return this._container}get parentItem(){return this._parentItem}get headerConfig(){return this._headerConfig}get title(){return this._title}get tab(){return this._tab}get focused(){return this._focused}destroy(){this._container.destroy(),super.destroy()}applyUpdatableConfig(t){this.setTitle(t.title),this._headerConfig=t.header}toConfig(){const t=this._container.stateRequestEvent,e=void 0===t?this._container.state:t();return{type:at.component,content:[],size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,maximised:!1,isClosable:this.isClosable,reorderEnabled:this._reorderEnabled,title:this._title,header:mt.Header.createCopy(this._headerConfig),componentType:pt.copyComponentType(this.componentType),componentState:e}}close(){if(null===this.parent)throw new K("CIC68883");this.parent.removeChild(this,!1)}enterDragMode(t,e){Tt(this.element,t),At(this.element,e),this._container.enterDragMode(t,e)}exitDragMode(){this._container.exitDragMode()}enterStackMaximised(){this._container.enterStackMaximised()}exitStackMaximised(){this._container.exitStackMaximised()}drag(){this._container.drag()}updateSize(t){this.updateNodeSize(t)}init(){this.updateNodeSize(!1),super.init(),this._container.emit("open"),this.initContentItems()}setTitle(t){this._title=t,this.emit("titleChanged",t),this.emit("stateChanged")}setTab(t){this._tab=t,this.emit("tab",t),this._container.setTab(t)}hide(){super.hide(),this._container.setVisibility(!1)}show(){super.show(),this._container.setVisibility(!0)}focus(t=!1){this.parentItem.setActiveComponentItem(this,!0,t)}setFocused(t){this._focused=!0,this.tab.setFocused(),t||this.emitBaseBubblingEvent("focus")}blur(t=!1){this._focused&&this.layoutManager.setFocusedComponentItem(void 0,t)}setBlurred(t){this._focused=!1,this.tab.setBlurred(),t||this.emitBaseBubblingEvent("blur")}setParent(t){this._parentItem=t,super.setParent(t)}handleUpdateItemConfigEvent(t){this.applyUpdatableConfig(t)}updateNodeSize(t){if("none"!==this.element.style.display){const{width:e,height:i}=kt(this.element);this._container.setSizeToNodeSize(e,i,t)}}}class $t extends Gt{constructor(){super(...arguments),this._focused=!1}get focused(){return this._focused}setFocusedValue(t){this._focused=t}}class Zt extends Wt{constructor(t,e){super(),this._eElement=t,this._pointerTracking=!1,this._pointerDownEventListener=t=>this.onPointerDown(t),this._pointerMoveEventListener=t=>this.onPointerMove(t),this._pointerUpEventListener=t=>this.onPointerUp(t),this._timeout=void 0,this._allowableTargets=[t,...e],this._oDocument=document,this._eBody=document.body,this._nDelay=1800,this._nDistance=10,this._nX=0,this._nY=0,this._nOriginalX=0,this._nOriginalY=0,this._dragging=!1,this._eElement.addEventListener("pointerdown",this._pointerDownEventListener,{passive:!0})}destroy(){this.checkRemovePointerTrackingEventListeners(),this._eElement.removeEventListener("pointerdown",this._pointerDownEventListener)}cancelDrag(){this.processDragStop(void 0)}onPointerDown(t){if(this._allowableTargets.includes(t.target)&&t.isPrimary){const e=this.getPointerCoordinates(t);this.processPointerDown(e)}}processPointerDown(t){this._nOriginalX=t.x,this._nOriginalY=t.y,this._oDocument.addEventListener("pointermove",this._pointerMoveEventListener),this._oDocument.addEventListener("pointerup",this._pointerUpEventListener,{passive:!0}),this._pointerTracking=!0,this._timeout=setTimeout((()=>{try{this.startDrag()}catch(t){throw console.error(t),t}}),this._nDelay)}onPointerMove(t){this._pointerTracking&&(this.processDragMove(t),t.preventDefault())}processDragMove(t){this._nX=t.pageX-this._nOriginalX,this._nY=t.pageY-this._nOriginalY,!1===this._dragging&&(Math.abs(this._nX)>this._nDistance||Math.abs(this._nY)>this._nDistance)&&this.startDrag(),this._dragging&&this.emit("drag",this._nX,this._nY,t)}onPointerUp(t){this.processDragStop(t)}processDragStop(t){var e;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this.checkRemovePointerTrackingEventListeners(),!0===this._dragging&&(this._eBody.classList.remove("lm_dragging"),this._eElement.classList.remove("lm_dragging"),null===(e=this._oDocument.querySelector("iframe"))||void 0===e||e.style.setProperty("pointer-events",""),this._dragging=!1,this.emit("dragStop",t))}checkRemovePointerTrackingEventListeners(){this._pointerTracking&&(this._oDocument.removeEventListener("pointermove",this._pointerMoveEventListener),this._oDocument.removeEventListener("pointerup",this._pointerUpEventListener),this._pointerTracking=!1)}startDrag(){var t;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this._dragging=!0,this._eBody.classList.add("lm_dragging"),this._eElement.classList.add("lm_dragging"),null===(t=this._oDocument.querySelector("iframe"))||void 0===t||t.style.setProperty("pointer-events","none"),this.emit("dragStart",this._nOriginalX,this._nOriginalY)}getPointerCoordinates(t){return{x:t.pageX,y:t.pageY}}}class qt{constructor(t,e,i){this._isVertical=t,this._size=e,this._grabSize=i0){const i=this.createSplitter(Math.max(0,e-1)).element;e>0?(this.contentItems[e-1].element.insertAdjacentElement("afterend",i),i.insertAdjacentElement("afterend",t.element)):(this.contentItems[0].element.insertAdjacentElement("beforebegin",i),i.insertAdjacentElement("beforebegin",t.element))}else this._childElementContainer.appendChild(t.element);super.addChild(t,e);const n=1/this.contentItems.length*100;if(!0===i)return this.emitBaseBubblingEvent("stateChanged"),e;for(let e=0;e0&&(this.calculateRelativeSizes(),this.setAbsoluteSizes()),this.emitBaseBubblingEvent("stateChanged"),this.emit("resize")}setAbsoluteSizes(){const t=this.calculateAbsoluteSizes();for(let e=0;e0&&t.itemSizes[e]++,this._isColumn?(Tt(this.contentItems[e].element,t.crossAxisSize),At(this.contentItems[e].element,t.itemSizes[e])):(Tt(this.contentItems[e].element,t.itemSizes[e]),At(this.contentItems[e].element,t.crossAxisSize))}calculateAbsoluteSizes(){const t=(this.contentItems.length-1)*this._splitterSize,{width:e,height:i}=kt(this.element);let n,o;this._isColumn?(n=i-t,o=e):(n=e-t,o=i);let s=0;const r=[];for(let t=0;t0){const n=100-t;for(let t=0;t100&&e.length>0){for(let t=0;te)return;{const r=i/e;let a=i;for(let e=0;ethis.onSplitterDrag(e,t,i))),e.on("dragStop",(()=>this.onSplitterDragStop(e))),e.on("dragStart",(()=>this.onSplitterDragStart(e))),this._splitter.splice(t,0,e),e}getSplitItems(t){const e=this._splitter.indexOf(t);return{before:this.contentItems[e],after:this.contentItems[e+1]}}calculateContentItemMinSize(t){const e=t.minSize;if(void 0!==e){if(t.minSizeUnit===ht.Pixel)return e;throw new X("ROCGMD98831",JSON.stringify(t))}{const t=this.layoutManager.layoutConfig.dimensions;return this._isColumn?t.defaultMinItemHeight:t.defaultMinItemWidth}}calculateContentItemsTotalMinSize(t){let e=0;for(const i of t)e+=this.calculateContentItemMinSize(i);return e}onSplitterDragStart(t){const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=this.calculateContentItemsTotalMinSize(e.before.contentItems),s=this.calculateContentItemsTotalMinSize(e.after.contentItems);this._splitterPosition=0,this._splitterMinPosition=-1*(i-o),this._splitterMaxPosition=n-s}onSplitterDrag(t,e,i){let n=this._isColumn?i:e;if(null===this._splitterMinPosition||null===this._splitterMaxPosition)throw new K("ROCOSD59226");n=Math.max(n,this._splitterMinPosition),n=Math.min(n,this._splitterMaxPosition),this._splitterPosition=n;const o=zt(n);this._isColumn?t.element.style.top=o:t.element.style.left=o}onSplitterDragStop(t){if(null===this._splitterPosition)throw new K("ROCOSDS66932");{const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=(this._splitterPosition+i)/(i+n),s=e.before.size+e.after.size;e.before.size=o*s,e.after.size=(1-o)*s,t.element.style.top=zt(0),t.element.style.left=zt(0),globalThis.requestAnimationFrame((()=>this.updateSize(!1)))}}}!function(t){t.getElementDimensionSize=function(t,e){return"width"===e?function(t){return t.offsetWidth}(t):function(t){return t.offsetHeight}(t)},t.setElementDimensionSize=function(t,e,i){return"width"===e?Tt(t,i):At(t,i)},t.createElement=function(t,e){const i=t.createElement("div");return i.classList.add("lm_item"),e?i.classList.add("lm_column"):i.classList.add("lm_row"),i}}(Xt||(Xt={}));class Yt extends $t{constructor(t,e,i){super(t,vt.create(e),null,Yt.createElement(document)),this.isGround=!0,this._childElementContainer=this.element,this._containerElement=i;let n=null;for(;;){const t=n?n.previousSibling:this._containerElement.lastChild;if(!(t instanceof Element&&t.classList.contains("lm_content")))break;n=t}this._containerElement.insertBefore(this.element,n)}init(){if(!0!==this.isInitialised){this.updateNodeSize();for(let t=0;t0?this.contentItems[0]:this,n.isComponent)throw new Error("Cannot add item as child to ComponentItem");{const t=this.layoutManager.createAndInitContentItem(i,n);return e=n.addChild(t,e),n===this?-1:e}}loadComponentAsRoot(t){this.clearRoot();const e=Ct.resolve(t,!1);if(e.maximised)throw new Error("Root Component cannot be maximised");{const t=new jt(this.layoutManager,e,this);t.init(),this.addChild(t,0)}}addChild(t,e){if(this.contentItems.length>0)throw new Error("Ground node can only have a single child");return this._childElementContainer.appendChild(t.element),e=super.addChild(t,e),this.updateSize(!1),this.emitBaseBubblingEvent("stateChanged"),e}calculateConfigContent(){const t=this.contentItems,e=t.length,i=new Array(e);for(let n=0;n0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e)),this.updateContentItemsSize(!1))}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}createSideAreas(){const t=Yt.Area.oppositeSides,e=new Array(Object.keys(t).length);let i=0;for(const n in t){const o=n,s=this.getElementArea();if(null===s)throw new K("RCSA77553");s.side=o,"2"===t[o][1]?s[o]=s[t[o]]-50:s[o]=s[t[o]]+50,s.surface=(s.x2-s.x1)*(s.y2-s.y1),e[i++]=s}return e}highlightDropZone(t,e,i){this.layoutManager.tabDropPlaceholder.remove(),super.highlightDropZone(t,e,i)}onDrop(t,e){if(t.isComponent){const e=ut.createDefault(),i=t;e.header=mt.Header.createCopy(i.headerConfig);const n=this.layoutManager.createAndInitContentItem(e,this);n.addChild(t),t=n}if(0===this.contentItems.length)this.addChild(t);else{if(t.type===at.row||t.type===at.column){const e=ut.createDefault(),i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}const i="x"==e.side[0]?at.row:at.column,n="2"==e.side[1],o=this.contentItems[0];if(o instanceof Xt&&o.type===i){const e=o.contentItems[n?0:o.contentItems.length-1];o.addChild(t,n?0:void 0,!0),e.size*=.5,t.size=e.size,t.sizeUnit=ht.Percent,o.updateSize(!1)}else{const e=ct.createDefault(i),s=this.layoutManager.createContentItem(e,this);this.replaceChild(o,s),s.addChild(t,n?0:void 0,!0),s.addChild(o,n?void 0:0,!0),o.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}}dock(){throw new X("GID87731")}validateDocking(){throw new X("GIVD87732")}getAllContentItems(){const t=[this];return this.deepGetAllContentItems(this.contentItems,t),t}getConfigMaximisedItems(){const t=[];return this.deepFilterContentItems(this.contentItems,t,(t=>!(!Gt.isStack(t)||!t.initialWantMaximise)||!(!Gt.isComponentItem(t)||!t.initialWantMaximise))),t}getItemsByPopInParentId(t){const e=[];return this.deepFilterContentItems(this.contentItems,e,(e=>e.popInParentIds.includes(t))),e}toConfig(){throw new Error("Cannot generate GroundItem config")}setActiveComponentItem(t,e,i){}updateNodeSize(){const{width:t,height:e}=kt(this._containerElement);Tt(this.element,t),At(this.element,e),this.contentItems.length>0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e))}deepGetAllContentItems(t,e){for(let i=0;ithis.onClick(t),this._touchStartEventListener=t=>this.onTouchStart(t),this._element=document.createElement("div"),this._element.classList.add(i),this._element.title=e,this._header.on("destroy",(()=>this.destroy())),this._element.addEventListener("click",this._clickEventListener,{passive:!0}),this._element.addEventListener("touchstart",this._touchStartEventListener,{passive:!0}),this._header.controlsContainerElement.appendChild(this._element)}get element(){return this._element}destroy(){var t;this._element.removeEventListener("click",this._clickEventListener),this._element.removeEventListener("touchstart",this._touchStartEventListener),null===(t=this._element.parentNode)||void 0===t||t.removeChild(this._element)}onClick(t){this._pushEvent(t)}onTouchStart(t){this._pushEvent(t)}}class Jt{constructor(t,e,i,n,o){var s;this._layoutManager=t,this._componentItem=e,this._closeEvent=i,this._focusEvent=n,this._dragStartEvent=o,this._isActive=!1,this._tabClickListener=t=>this.onTabClickDown(t),this._tabTouchStartListener=t=>this.onTabTouchStart(t),this._closeClickListener=()=>this.onCloseClick(),this._closeTouchStartListener=()=>this.onCloseTouchStart(),this._dragStartListener=(t,e)=>this.onDragStart(t,e),this._contentItemDestroyListener=()=>this.onContentItemDestroy(),this._tabTitleChangedListener=t=>this.setTitle(t),this._element=document.createElement("div"),this._element.classList.add("lm_tab"),this._titleElement=document.createElement("span"),this._titleElement.classList.add("lm_title"),this._closeElement=document.createElement("div"),this._closeElement.classList.add("lm_close_tab"),this._element.appendChild(this._titleElement),this._element.appendChild(this._closeElement),e.isClosable?this._closeElement.style.display="":this._closeElement.style.display="none",this.setTitle(e.title),this._componentItem.on("titleChanged",this._tabTitleChangedListener);(null!==(s=e.reorderEnabled)&&void 0!==s?s:this._layoutManager.layoutConfig.settings.reorderEnabled)&&this.enableReorder(),this._element.addEventListener("click",this._tabClickListener,{passive:!0}),this._element.addEventListener("touchstart",this._tabTouchStartListener,{passive:!0}),this._componentItem.isClosable?(this._closeElement.addEventListener("click",this._closeClickListener,{passive:!0}),this._closeElement.addEventListener("touchstart",this._closeTouchStartListener,{passive:!0})):(this._closeElement.remove(),this._closeElement=void 0),this._componentItem.setTab(this),this._layoutManager.emit("tabCreated",this)}get isActive(){return this._isActive}get componentItem(){return this._componentItem}get contentItem(){return this._componentItem}get element(){return this._element}get titleElement(){return this._titleElement}get closeElement(){return this._closeElement}get reorderEnabled(){return void 0!==this._dragListener}set reorderEnabled(t){t!==this.reorderEnabled&&(t?this.enableReorder():this.disableReorder())}setTitle(t){this._titleElement.innerText=t,this._element.title=t}setActive(t){t!==this._isActive&&(this._isActive=t,t?this._element.classList.add("lm_active"):this._element.classList.remove("lm_active"))}destroy(){var t,e;this._closeEvent=void 0,this._focusEvent=void 0,this._dragStartEvent=void 0,this._element.removeEventListener("click",this._tabClickListener),this._element.removeEventListener("touchstart",this._tabTouchStartListener),null===(t=this._closeElement)||void 0===t||t.removeEventListener("click",this._closeClickListener),null===(e=this._closeElement)||void 0===e||e.removeEventListener("touchstart",this._closeTouchStartListener),this._componentItem.off("titleChanged",this._tabTitleChangedListener),this.reorderEnabled&&this.disableReorder(),this._element.remove()}setBlurred(){this._element.classList.remove("lm_focused"),this._titleElement.classList.remove("lm_focused")}setFocused(){this._element.classList.add("lm_focused"),this._titleElement.classList.add("lm_focused")}onDragStart(t,e){if(void 0===this._dragListener)throw new J("TODSDLU10093");if(void 0===this._dragStartEvent)throw new J("TODS23309");this._dragStartEvent(t,e,this._dragListener,this.componentItem)}onContentItemDestroy(){void 0!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=void 0)}onTabClickDown(t){const e=t.target;e!==this._element&&e!==this._titleElement||(0===t.button?this.notifyFocus():1===t.button&&this._componentItem.isClosable&&this.notifyClose())}onTabTouchStart(t){t.target===this._element&&this.notifyFocus()}onCloseClick(){this.notifyClose()}onCloseTouchStart(){this.notifyClose()}notifyClose(){if(void 0===this._closeEvent)throw new J("TNC15007");this._closeEvent(this._componentItem)}notifyFocus(){if(void 0===this._focusEvent)throw new J("TNA15007");this._focusEvent(this._componentItem)}enableReorder(){this._dragListener=new Zt(this._element,[this._titleElement]),this._dragListener.on("dragStart",this._dragStartListener),this._componentItem.on("destroy",this._contentItemDestroyListener)}disableReorder(){if(void 0===this._dragListener)throw new J("TDR87745");this._componentItem.off("destroy",this._contentItemDestroyListener),this._dragListener.off("dragStart",this._dragStartListener),this._dragListener=void 0}}class Qt{constructor(t,e,i,n,o){this._layoutManager=t,this._componentRemoveEvent=e,this._componentFocusEvent=i,this._componentDragStartEvent=n,this._dropdownActiveChangedEvent=o,this._tabs=[],this._lastVisibleTabIndex=-1,this._dropdownActive=!1,this._element=document.createElement("section"),this._element.classList.add("lm_tabs"),this._dropdownElement=document.createElement("section"),this._dropdownElement.classList.add("lm_tabdropdown_list"),this._dropdownElement.style.display="none"}get tabs(){return this._tabs}get tabCount(){return this._tabs.length}get lastVisibleTabIndex(){return this._lastVisibleTabIndex}get element(){return this._element}get dropdownElement(){return this._dropdownElement}get dropdownActive(){return this._dropdownActive}destroy(){for(let t=0;tthis.handleTabCloseEvent(t)),(t=>this.handleTabFocusEvent(t)),((t,e,i,n)=>this.handleTabDragStartEvent(t,e,i,n)));void 0===e&&(e=this._tabs.length),this._tabs.splice(e,0,i),ethis._lastVisibleTabIndex){const t=this._tabs[e];for(let t=e;t>0;t--)this._tabs[t]=this._tabs[t-1];this._tabs[0]=t}}updateTabSizes(t,e){let i=!1;this.tryUpdateTabSizes(i,t,e)||(i=!0,this.tryUpdateTabSizes(i,t,e)),i!==this._dropdownActive&&(this._dropdownActive=i,this._dropdownActiveChangedEvent())}tryUpdateTabSizes(t,e,i){if(this._tabs.length>0){if(void 0===i)throw new Error("non-empty tabs must have active component item");let n=0,o=!1;const s=this._layoutManager.layoutConfig.settings.tabOverlapAllowance,r=this._tabs.indexOf(i.tab),a=this._tabs[r];this._lastVisibleTabIndex=-1;for(let i=0;ie){if(o)i===r&&(l.style.zIndex="auto",l.style.marginLeft="",l.parentElement!==this._element&&this._element.appendChild(l));else{let t;if(t=r>0&&r<=i?(d-e)/(i-1):(d-e)/i,tthis.onClick(t),this._touchStartListener=t=>this.onTouchStart(t),this._rowColumnClosable=!0,this._closeButton=null,this._popoutButton=null,this._tabsContainer=new Qt(this._layoutManager,(t=>this.handleTabInitiatedComponentRemoveEvent(t)),(t=>this.handleTabInitiatedComponentFocusEvent(t)),((t,e,i,n)=>this.handleTabInitiatedDragStartEvent(t,e,i,n)),(()=>this.processTabDropdownActiveChanged())),this._show=i.show,this._popoutEnabled=i.popoutEnabled,this._popoutLabel=i.popoutLabel,this._maximiseEnabled=i.maximiseEnabled,this._maximiseLabel=i.maximiseLabel,this._minimiseEnabled=i.minimiseEnabled,this._minimiseLabel=i.minimiseLabel,this._closeEnabled=i.closeEnabled,this._closeLabel=i.closeLabel,this._tabDropdownEnabled=i.tabDropdownEnabled,this._tabDropdownLabel=i.tabDropdownLabel,this.setSide(i.side),this._canRemoveComponent=this._configClosable,this._element=document.createElement("section"),this._element.classList.add("lm_header"),this._controlsContainerElement=document.createElement("section"),this._controlsContainerElement.classList.add("lm_controls"),this._element.appendChild(this._tabsContainer.element),this._element.appendChild(this._controlsContainerElement),this._element.appendChild(this._tabsContainer.dropdownElement),this._element.addEventListener("click",this._clickListener,{passive:!0}),this._element.addEventListener("touchstart",this._touchStartListener,{passive:!0}),this._documentMouseUpListener=()=>this._tabsContainer.hideAdditionalTabsDropdown(),globalThis.document.addEventListener("mouseup",this._documentMouseUpListener,{passive:!0}),this._tabControlOffset=this._layoutManager.layoutConfig.settings.tabControlOffset,this._tabDropdownEnabled&&(this._tabDropdownButton=new Kt(this,this._tabDropdownLabel,"lm_tabdropdown",(()=>this._tabsContainer.showAdditionalTabsDropdown()))),this._popoutEnabled&&(this._popoutButton=new Kt(this,this._popoutLabel,"lm_popout",(()=>this.handleButtonPopoutEvent()))),this._maximiseEnabled&&(this._maximiseButton=new Kt(this,this._maximiseLabel,"lm_maximise",(t=>this.handleButtonMaximiseToggleEvent(t)))),this._configClosable&&(this._closeButton=new Kt(this,this._closeLabel,"lm_close",(()=>s()))),this.processTabDropdownActiveChanged()}get show(){return this._show}get side(){return this._side}get leftRightSided(){return this._leftRightSided}get layoutManager(){return this._layoutManager}get parent(){return this._parent}get tabs(){return this._tabsContainer.tabs}get lastVisibleTabIndex(){return this._tabsContainer.lastVisibleTabIndex}get element(){return this._element}get tabsContainerElement(){return this._tabsContainer.element}get controlsContainerElement(){return this._controlsContainerElement}destroy(){this.emit("destroy"),this._popoutEvent=void 0,this._maximiseToggleEvent=void 0,this._clickEvent=void 0,this._touchStartEvent=void 0,this._componentRemoveEvent=void 0,this._componentFocusEvent=void 0,this._componentDragStartEvent=void 0,this._tabsContainer.destroy(),globalThis.document.removeEventListener("mouseup",this._documentMouseUpListener),this._element.remove()}createTab(t,e){this._tabsContainer.createTab(t,e)}removeTab(t){this._tabsContainer.removeTab(t)}processActiveComponentChanged(t){this._tabsContainer.processActiveComponentChanged(t),this.updateTabSizes()}setSide(t){this._side=t,this._leftRightSided=[nt.right,nt.left].includes(this._side)}setRowColumnClosable(t){this._rowColumnClosable=t,this.updateClosability()}updateClosability(){let t;if(this._configClosable)if(this._rowColumnClosable){t=!0;const e=this.tabs.length;for(let i=0;i1}applyFocusedValue(t){t?this._element.classList.add("lm_focused"):this._element.classList.remove("lm_focused")}processMaximised(){if(void 0===this._maximiseButton)throw new J("HPMAX16997");this._maximiseButton.element.setAttribute("title",this._minimiseLabel)}processMinimised(){if(void 0===this._maximiseButton)throw new J("HPMIN16997");this._maximiseButton.element.setAttribute("title",this._maximiseLabel)}updateTabSizes(){if(this._tabsContainer.tabCount>0){const t=this._show?this._layoutManager.layoutConfig.dimensions.headerHeight:0;let e;this._leftRightSided?(this._element.style.height="",this._element.style.width=zt(t)):(this._element.style.width="",this._element.style.height=zt(t)),e=this._leftRightSided?this._element.offsetHeight-this._controlsContainerElement.offsetHeight-this._tabControlOffset:this._element.offsetWidth-this._controlsContainerElement.offsetWidth-this._tabControlOffset,this._tabsContainer.updateTabSizes(e,this._getActiveComponentItemEvent())}}handleTabInitiatedComponentRemoveEvent(t){if(this._canRemoveComponent){if(void 0===this._componentRemoveEvent)throw new J("HHTCE22294");this._componentRemoveEvent(t)}}handleTabInitiatedComponentFocusEvent(t){if(void 0===this._componentFocusEvent)throw new J("HHTAE22294");this._componentFocusEvent(t)}handleTabInitiatedDragStartEvent(t,e,i,n){if(this._canRemoveComponent){if(void 0===this._componentDragStartEvent)throw new J("HHTDSE22294");this._componentDragStartEvent(t,e,i,n)}else i.cancelDrag()}processTabDropdownActiveChanged(){void 0!==this._tabDropdownButton&&Dt(this._tabDropdownButton.element,this._tabsContainer.dropdownActive)}handleButtonPopoutEvent(){if(this._layoutManager.layoutConfig.settings.popoutWholeStack){if(void 0===this._popoutEvent)throw new J("HHBPOE17834");this._popoutEvent()}else{const t=this._getActiveComponentItemEvent();t&&t.popout()}}handleButtonMaximiseToggleEvent(t){if(void 0===this._maximiseToggleEvent)throw new J("HHBMTE16834");this._maximiseToggleEvent()}onClick(t){t.target===this._element&&this.notifyClick(t)}onTouchStart(t){t.target===this._element&&this.notifyTouchStart(t)}notifyClick(t){if(void 0===this._clickEvent)throw new J("HNHC46834");this._clickEvent(t)}notifyTouchStart(t){if(void 0===this._touchStartEvent)throw new J("HNHTS46834");this._touchStartEvent(t)}}class ee extends $t{constructor(t,e,i){var n,o,s,r,a,l,h,d,c,m,u,p,g,f,v,_,y,C,w;super(t,e,i,ee.createElement(document)),this._headerSideChanged=!1,this._resizeListener=()=>this.handleResize(),this._maximisedListener=()=>this.handleMaximised(),this._minimisedListener=()=>this.handleMinimised(),this._headerConfig=e.header;const I=t.layoutConfig.header,b=e.content;let S;if(1!==b.length)S=void 0;else{S=b[0].header}this._initialWantMaximise=e.maximised,this._initialActiveItemIndex=null!==(n=e.activeItemIndex)&&void 0!==n?n:0;const E=null!==(r=null!==(s=null===(o=this._headerConfig)||void 0===o?void 0:o.show)&&void 0!==s?s:null==S?void 0:S.show)&&void 0!==r?r:I.show,x=null!==(h=null!==(l=null===(a=this._headerConfig)||void 0===a?void 0:a.popout)&&void 0!==l?l:null==S?void 0:S.popout)&&void 0!==h?h:I.popout,L=null!==(m=null!==(c=null===(d=this._headerConfig)||void 0===d?void 0:d.maximise)&&void 0!==c?c:null==S?void 0:S.maximise)&&void 0!==m?m:I.maximise,z=null!==(g=null!==(p=null===(u=this._headerConfig)||void 0===u?void 0:u.close)&&void 0!==p?p:null==S?void 0:S.close)&&void 0!==g?g:I.close,M=null!==(_=null!==(v=null===(f=this._headerConfig)||void 0===f?void 0:f.minimise)&&void 0!==v?v:null==S?void 0:S.minimise)&&void 0!==_?_:I.minimise,P=null!==(w=null!==(C=null===(y=this._headerConfig)||void 0===y?void 0:y.tabDropdown)&&void 0!==C?C:null==S?void 0:S.tabDropdown)&&void 0!==w?w:I.tabDropdown;this._maximisedEnabled=!1!==L;const T={show:!1!==E,side:!1===E?nt.top:E,popoutEnabled:!1!==x,popoutLabel:!1===x?"":x,maximiseEnabled:this._maximisedEnabled,maximiseLabel:!1===L?"":L,closeEnabled:!1!==z,closeLabel:!1===z?"":z,minimiseEnabled:!0,minimiseLabel:M,tabDropdownEnabled:!1!==P,tabDropdownLabel:!1===P?"":P};this._header=new te(t,this,T,e.isClosable&&!1!==z,(()=>this.getActiveComponentItem()),(()=>this.remove()),(()=>this.handlePopoutEvent()),(()=>this.toggleMaximise()),(t=>this.handleHeaderClickEvent(t)),(t=>this.handleHeaderTouchStartEvent(t)),(t=>this.handleHeaderComponentRemoveEvent(t)),(t=>this.handleHeaderComponentFocusEvent(t)),((t,e,i,n)=>this.handleHeaderComponentStartDragEvent(t,e,i,n))),this.isStack=!0,this._childElementContainer=document.createElement("section"),this._childElementContainer.classList.add("lm_items"),this.on("resize",this._resizeListener),this._maximisedEnabled&&(this.on("maximised",this._maximisedListener),this.on("minimised",this._minimisedListener)),this.element.appendChild(this._header.element),this.element.appendChild(this._childElementContainer),this.setupHeaderPosition(),this._header.updateClosability()}get childElementContainer(){return this._childElementContainer}get header(){return this._header}get headerShow(){return this._header.show}get headerSide(){return this._header.side}get headerLeftRightSided(){return this._header.leftRightSided}get contentAreaDimensions(){return this._contentAreaDimensions}get initialWantMaximise(){return this._initialWantMaximise}get isMaximised(){return this===this.layoutManager.maximisedStack}get stackParent(){if(!this.parent)throw new Error("Stack should always have a parent");return this.parent}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}init(){if(!0===this.isInitialised)return;this.updateNodeSize();for(let t=0;t0){if(this._initialActiveItemIndex<0||this._initialActiveItemIndex>=e)throw new Error(`ActiveItemIndex out of range: ${this._initialActiveItemIndex} id: ${this.id}`);for(let i=0;ithis.contentItems.length)throw e-=1,new X("SAC99728");if(t instanceof jt)return e=super.addChild(t,e),this._childElementContainer.appendChild(t.element),this._header.createTab(t,e),this.setActiveComponentItem(t,i),this._header.updateTabSizes(),this.updateSize(!1),t.container.setBaseLogicalZIndex(),this._header.updateClosability(),this.emitStateChangedEvent(),e;throw new X("SACC88532")}removeChild(t,e){const i=t,n=this.contentItems.indexOf(i),o=1===this.contentItems.length;if(this._activeComponentItem===i&&(i.focused&&i.blur(),!o)){const t=0===n?1:n-1;this.setActiveComponentItem(this.contentItems[t],!1)}this._header.removeTab(i),super.removeChild(i,e),o||this._header.updateClosability(),this.emitStateChangedEvent()}toggleMaximise(){this.isMaximised?this.minimise():this.maximise()}maximise(){if(!this.isMaximised){this.layoutManager.setMaximisedStack(this);const t=this.contentItems,e=t.length;for(let i=0;i0&&void 0===t)throw new Error("expected non-empty stack to have an active component item");return{type:"stack",content:this.calculateConfigContent(),size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,isClosable:this.isClosable,maximised:this.isMaximised,header:this.createHeaderConfig(),activeItemIndex:t}}onDrop(t,e){if("header"===this._dropSegment){if(this.resetHeaderDropZone(),void 0===this._dropIndex)throw new J("SODDI68990");return void this.addChild(t,this._dropIndex)}if("body"===this._dropSegment)return void this.addChild(t,0,!0);const i="top"===this._dropSegment||"bottom"===this._dropSegment,n="left"===this._dropSegment||"right"===this._dropSegment,o="top"===this._dropSegment||"left"===this._dropSegment,s=i&&this.stackParent.isColumn||n&&this.stackParent.isRow;if(t.isComponent){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createAndInitContentItem(e,this);i.addChild(t),t=i}if(t.type===at.row||t.type===at.column){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}if(s){const e=this.stackParent.contentItems.indexOf(this);this.stackParent.addChild(t,o?e:e+1,!0),this.size*=.5,t.size=this.size,t.sizeUnit=this.sizeUnit,this.stackParent.updateSize(!1)}else{const e=i?at.column:at.row,n=ct.createDefault(e),s=this.layoutManager.createContentItem(n,this);this.stackParent.replaceChild(this,s),s.addChild(t,o?0:void 0,!0),s.addChild(this,o?void 0:0,!0),this.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}highlightDropZone(t,e){for(const i in this._contentAreaDimensions){const n=i,o=this._contentAreaDimensions[n].hoverArea;if(o.x1t&&o.y1e)return void("header"===n?(this._dropSegment="header",this.highlightHeaderDropZone(this._header.leftRightSided?e:t)):(this.resetHeaderDropZone(),this.highlightBodyDropZone(n)))}}getArea(){if("none"===this.element.style.display)return null;const t=super.getElementArea(this._header.element),e=super.getElementArea(this._childElementContainer);if(null===t||null===e)throw new K("SGAHC13086");const i=e.x2-e.x1,n=e.y2-e.y1;return this._contentAreaDimensions={header:{hoverArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2},highlightArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2}}},0===this.contentItems.length?(this._contentAreaDimensions.body={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2}},super.getElementArea(this.element)):(this._contentAreaDimensions.left={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x1+.25*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x1+.5*i,y2:e.y2}},this._contentAreaDimensions.top={hoverArea:{x1:e.x1+.25*i,y1:e.y1,x2:e.x1+.75*i,y2:e.y1+.5*n},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y1+.5*n}},this._contentAreaDimensions.right={hoverArea:{x1:e.x1+.75*i,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1+.5*i,y1:e.y1,x2:e.x2,y2:e.y2}},this._contentAreaDimensions.bottom={hoverArea:{x1:e.x1+.25*i,y1:e.y1+.5*n,x2:e.x1+.75*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1+.5*n,x2:e.x2,y2:e.y2}},super.getElementArea(this.element))}positionHeader(t){this._header.side!==t&&(this._header.setSide(t),this._headerSideChanged=!0,this.setupHeaderPosition())}updateNodeSize(){if("none"!==this.element.style.display){const t=kt(this.element);if(this._header.show){t[this._header.leftRightSided?it.width:it.height]-=this.layoutManager.layoutConfig.dimensions.headerHeight}this._childElementContainer.style.width=zt(t.width),this._childElementContainer.style.height=zt(t.height);for(let e=0;e=o&&t({...t,[e]:i});async function s(t,e){return(await Promise.all(e.map((async([e,i])=>[e,await t(i,e)])))).reduce(o,{})}n.mapEntriesAsync=s,n.mapValuesAsync=async function(t,e){let i;return i=e instanceof Map?[...e.entries()]:Object.entries(e),s(t,i)};var r,a,l,h,d=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldSet||function(t,e,i,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(t,i):o?o.value=i:e.set(t,i),i},c=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldGet||function(t,e,i,n){if("a"===i&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?n:"a"===i?n.call(t):n?n.value:e.get(t)};Object.defineProperty(i,"__esModule",{value:!0});var m=i.DefaultLayoutManager=void 0;const u=n;class p{constructor(t){a.set(this,void 0),l.set(this,new Map),d(this,a,t,"f")}size(){return c(this,l,"f").size}async applyLayoutSnapshot({layouts:t}){if(Object.keys(t).length>1)throw new Error("[LayoutManager] Tried to call applyLayoutSnapshot with more than 1 layout. When implementing multiple layouts via overridden LayoutManager class, you must override and fully implement the applyLayoutSnapshot method without calling super.applyLayoutSnapshot().");const[[e,i]]=Object.entries(t);await p.createLayout(this,{layoutName:e,layout:i})}async showLayout({layoutName:t}){}async getLayoutSnapshot(){return{layouts:await(0,u.mapValuesAsync)((t=>t.getFrameSnapshot()),c(this,l,"f"))}}async removeLayout({layoutName:t}){}getLayoutIdentityForView(t){const e=[...c(this,l,"f").values()].find((e=>e.getCurrentViews().some((e=>e.name===t.name&&e.uuid===t.uuid))));return e?.identity??void 0}isLayoutVisible({layoutName:t}){return c(p,r,"m",h).call(p,this,t).isVisible()}resolveLayoutIdentity(t){if(t&&"layoutName"in t)return t;const e=[...c(this,l,"f").values()];if(1===e.length)return e[0].identity;const i=e.find((t=>t.isVisible()));return i?.identity??void 0}static async resolveLayout(t,e){const i=t.resolveLayoutIdentity(e);if(void 0===i||!("layoutName"in i))throw new Error("[layout-manager] resolveLayout: Could not resolve the layout identity. Make sure you include 'layoutName' in the identity object.");return c(p,r,"m",h).call(p,t,i.layoutName)}static async handleSharedView(t,e,i){await(0,u.mapValuesAsync)((async t=>{if(t.identity.layoutName!==e.layoutName){const e=t.getCurrentViews().find((t=>t.name===i.name));e&&await t.onViewDetached({viewIdentity:e,target:null}).catch(console.error)}}),c(t,l,"f"))}static async handleLastViewRemoved(t,e){await t.removeLayout(e),await c(t,a,"f").handleLastViewRemoved(t)}static async destroyLayout(t,{layoutName:e}){await c(p,r,"m",h).call(p,t,e).destroy(),c(t,l,"f").delete(e)}static async createLayout(t,e){const{layoutName:i}=e;if(c(t,l,"f").has(i))throw new Error(`Layout name ${i} already exists`);await c(t,a,"f").createLayout(e,t)}static registerLayout(t,e,i){c(t,l,"f").set(e,i)}static getAllLayouts(t){return[...c(t,l,"f").values()]}static setInitialSnapshot(t,e){c(t,a,"f").setInitialSnapshot(e)}static createClosedConstructor(...t){return class extends p{constructor(){super(...t)}}}}m=i.DefaultLayoutManager=p,r=p,a=new WeakMap,l=new WeakMap,h=function(t,e){const i=c(t,l,"f").get(e);if(!i)throw new Error(`[layout-manager] getLayoutByName: Could not locate layout with name '${e}'`);return i};var g={},f={},v={};Object.defineProperty(v,"__esModule",{value:!0}),v.ReversibleMap=void 0;v.ReversibleMap=class{constructor(){this.valueToKey=new Map,this.keyToValue=new Map,this.setUnique=(t,e)=>{if(this.hasKey(t)||this.hasValue(e))throw new Error("Key or value already in the map.");this.keyToValue.set(t,e),this.valueToKey.set(e,t)},this.getKey=t=>{const e=this.valueToKey.get(t);if(!e)throw new Error("Value not found in the map.");return e},this.deleteKey=t=>{const e=this.getValue(t);return this.keyToValue.delete(t),this.valueToKey.delete(e),e},this.deleteValue=t=>{const e=this.getKey(t);return this.keyToValue.delete(e),this.valueToKey.delete(t),e},this.hasKey=t=>this.keyToValue.has(t),this.hasValue=t=>this.valueToKey.has(t)}getValue(t){const e=this.keyToValue.get(t);if(!e)throw new Error("Key not found in the map.");return e}},Object.defineProperty(f,"__esModule",{value:!0});var _=f.LayoutContentCache=void 0;const y=t.lazy,C=v;class w{constructor(){this.contentItemCache=new C.ReversibleMap,this.contentItemCacheId=0,this.createCacheKey=()=>{const t=`entity-${this.contentItemCacheId.toString()}`;return this.contentItemCacheId+=1,t},this.hasKey=t=>this.contentItemCache.hasKey(t),this.getItemOrUndefined=t=>{try{return this.getContentItemOrThrow(t)}catch(t){return}},this.getContentItemOrThrow=(t,e)=>{if(!this.contentItemCache.hasKey(t))throw new Error("Layout component has been destroyed or detached from the current layout.");const i=this.contentItemCache.getValue(t);if(e&&!e.includes(i.type))throw new Error(`Layout item is not the expected type. Expected ${e.join(", ")}, got ${i.type}.`);return i},this.getOrCreateEntityId=t=>{if(this.contentItemCache.hasValue(t))return this.contentItemCache.getKey(t);t.onDestroyed((()=>{this.contentItemCache.deleteValue(t)}));const e=this.createCacheKey();return this.contentItemCache.setUnique(e,t),e}}static getSingleInstance(){return w.singleton.getValue()}}_=f.LayoutContentCache=w,w.singleton=new y.Lazy((()=>new w));var I={},b={};!function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.getAdjacentStacks=t.doShareEdge=t.getAdjacentItem=void 0;t.getAdjacentItem=(e,i)=>{const{parent:n}=e;if(e.isRoot()||!n)return;const o=["top","bottom"].includes(i)?"column":"row",s=["top","left"].includes(i)?-1:1;if(n.type===o){const t=n.contentItems.indexOf(e)+s;if(t>=0&&t{const n=t.getBounds(),o=e.getBounds();if(!n||!o)return!1;if(["top","bottom"].includes(i)){return!(n.righto.right)}return!(n.bottomo.bottom)};t.getAdjacentStacks=(e,i)=>{const n=["top","bottom"].includes(i)?"row":"column",o=s=>"stack"===s.type?(0,t.doShareEdge)(e,s,i)?[s]:[]:"root"===s.type||"ground"===s.type?[]:s.type===n?s.contentItems.map((t=>o(t))).flat():s.type!==n?["top","right"].includes(i)?o(s.contentItems[s.contentItems.length-1]):o(s.contentItems[0]):[],s=(0,t.getAdjacentItem)(e,i);return s?o(s):[]}}(b);var S=t.commonjsGlobal&&t.commonjsGlobal.__decorate||function(t,e,i,n){var o,s=arguments.length,r=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(s<3?o(r):s>3?o(e,i,r):o(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};Object.defineProperty(I,"__esModule",{value:!0}),I.LayoutEntitiesController=void 0;const E=t.decorators,x=b,L=i;class z{constructor(t,e,i){this.wire=t,this.layoutManager=e,this.layoutContentCache=i,this.analytics=t=>{this.wire.sendAction(`layout-controller-${t}`).catch((()=>{}))},this.getLayoutIdentityForViewOrThrow=async t=>{const e=this.layoutManager.getLayoutIdentityForView(t);if(!e)throw new Error(`View identity ${t.name} is not attached to any layouts.`);return e},this.getRoot=async t=>{this.analytics("get-root");const e=(await this.getLayout(t)).getRoot();return{type:e.type,entityId:this.layoutContentCache.getOrCreateEntityId(e)}},this.getStackByView=async t=>{this.analytics("get-stack-by-view");const e=await this.getLayoutIdentityForViewOrThrow(t),i=(await this.getLayout(e)).getStackByView(t);if("stack"===i?.type)return{entityId:this.layoutContentCache.getOrCreateEntityId(i),type:"stack"}},this.getStackViews=t=>{this.analytics("get-stack-views");return this.layoutContentCache.getContentItemOrThrow(t,["stack"]).contentItems.map((t=>({name:t.viewName,uuid:this.wire.me.uuid})))},this.isRoot=t=>{this.analytics("is-root");return this.layoutContentCache.getContentItemOrThrow(t).isRoot()},this.exists=t=>(this.analytics("exists"),this.layoutContentCache.hasKey(t)),this.addViewToStack=async(t,e,{index:i}={index:0})=>{this.analytics("add-view-to-stack");const n=this.layoutContentCache.getContentItemOrThrow(t);if(i&&i>n.contentItems.length+1)throw new Error(`Index '${i}' out of range, please exclude the index or specify a number between 0 and ${n.contentItems.length}`);const o={id:t,index:i},{identity:s}=await n.layout.platformCreateView(e,{location:o});return s},this.findViewInStack=(t,e)=>t.contentItems.find((t=>t.viewName===e.name)),this.removeViewFromStack=async(t,e)=>{this.analytics("remove-view-from-stack");const i=this.layoutContentCache.getContentItemOrThrow(t,["stack"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to remove a view ('${e.name}') which does not belong to the stack.`);await n.layout.platformCloseView(e)},this.createAdjacentStack=async(t,e,{position:i="right"}={})=>{if(this.analytics("create-adjacent-stack"),!Array.isArray(e)||0===e.length)throw new Error('The parameter "views" must be an array with at least 1 element.');if(!["top","bottom","left","right"].includes(i))throw new Error(`Invalid position '${i}' specified.`);const n=this.layoutContentCache.getContentItemOrThrow(t).createAdjacentStack({position:i}),o=this.layoutContentCache.getOrCreateEntityId(n);return await Promise.all(e.reverse().map((t=>this.addViewToStack(o,t)))),o},this.getAdjacentStacks=async({targetId:t,edge:e})=>{this.analytics("get-adjacent-stacks");const i=this.layoutContentCache.getContentItemOrThrow(t);return(0,x.getAdjacentStacks)(i,e).map((t=>({entityId:this.layoutContentCache.getOrCreateEntityId(t)})))},this.setStackActiveView=async(t,e)=>{this.analytics("set-stack-active-view");const i=this.layoutContentCache.getContentItemOrThrow(t,["stack"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to set a view ('${e.name}') as active when it does not belong to the stack.`);i.setActiveContentItem(n,!0)}}async getLayout(t){const e=await L.DefaultLayoutManager.resolveLayout(this.layoutManager,t);if(!e)throw new Error(`Could not resolve target layout identity ${JSON.stringify(t)}`);return e}getContent(t){this.analytics("get-content");return this.layoutContentCache.getContentItemOrThrow(t,["column","row"]).contentItems.map((t=>({type:t.type,entityId:this.layoutContentCache.getOrCreateEntityId(t)})))}getParent(t){this.analytics("get-parent");const e=this.layoutContentCache.getContentItemOrThrow(t);if(!e.isRoot())return e.parent?.contentItems.includes(e)?{type:e.parent.type,entityId:this.layoutContentCache.getOrCreateEntityId(e.parent)}:void 0}}S([(0,E.expose)()],z.prototype,"getLayoutIdentityForViewOrThrow",void 0),S([(0,E.expose)()],z.prototype,"getRoot",void 0),S([(0,E.expose)()],z.prototype,"getStackByView",void 0),S([(0,E.expose)()],z.prototype,"getStackViews",void 0),S([(0,E.expose)()],z.prototype,"getContent",null),S([(0,E.expose)()],z.prototype,"getParent",null),S([(0,E.expose)()],z.prototype,"isRoot",void 0),S([(0,E.expose)()],z.prototype,"exists",void 0),S([(0,E.expose)()],z.prototype,"addViewToStack",void 0),S([(0,E.expose)()],z.prototype,"removeViewFromStack",void 0),S([(0,E.expose)()],z.prototype,"createAdjacentStack",void 0),S([(0,E.expose)()],z.prototype,"getAdjacentStacks",void 0),S([(0,E.expose)()],z.prototype,"setStackActiveView",void 0),I.LayoutEntitiesController=z,Object.defineProperty(g,"__esModule",{value:!0});var M=g.initLayoutEndpoints=void 0;const P=t.apiExposer,T=t.layout_constants,A=f,k=I,D=i;M=g.initLayoutEndpoints=async function(t,e){const i=t.getFin(),n=await i.Platform.getCurrentSync().getClient(),o=new P.ChannelsExposer(n);await new P.ApiExposer(o).exposeInstance(new k.LayoutEntitiesController(t,e,A.LayoutContentCache.getSingleInstance()),{id:T.LAYOUT_CONTROLLER_ID}),await async function(t,e){const i=t=>async i=>{const n=await D.DefaultLayoutManager.resolveLayout(e,i.target);if(!n)throw new Error(`Could not resolve the layout target from payload ${JSON.stringify(i)}`);return t(n,i)},n=(e,n)=>{t.register(e,i(n))},o=(t,e)=>{n(t,e)};n("replace-view",((t,e)=>t.replaceView(e))),n("replace-layout",((t,{layout:e})=>t.replaceLayout(e))),n("add-view",((t,e)=>t.insertView(e))),o("layout-add-view",((t,{viewOptions:e,location:i,targetView:n})=>t.platformCreateView(e,{location:i,targetView:n}))),n("close-view",((t,e)=>t.cleanupView(e.viewIdentity))),o("layout-close-view",((t,e)=>t.platformCloseView(e.viewIdentity))),n("apply-preset-layout",((t,e)=>t.applyPreset(e))),n("get-layout-views",(t=>t.getCurrentViews())),n("get-frame-snapshot",(t=>t.getFrameSnapshot())),n("is-visible",(t=>t.isVisible())),n("destroy",(t=>t.destroy())),t.register("get-layout-snapshot",(()=>e.getLayoutSnapshot()))}(n,e)};var R={};Object.defineProperty(R,"__esModule",{value:!0});var U=R.BaseLayout=void 0;U=R.BaseLayout=class{};var O={};Object.defineProperty(O,"__esModule",{value:!0});var V=O.DOMEmitter=void 0;V=O.DOMEmitter=class{constructor(t){this.container=t}dispatchLocalEvent(t,e){const i={...e,type:t,tabSelector:`tab-${e.name}`,containerSelector:`container-${e.name}`,topic:"openfin-DOM-event"};this.container.dispatchEvent(new CustomEvent(t,{detail:i}))}};var B={};Object.defineProperty(B,"__esModule",{value:!0});var H=B.mapLayoutContentItemsImmutableSync=B.mapLayoutContentItemsImmutable=W=B.isVisible=void 0;var W=B.isVisible=t=>(0!==t.offsetWidth||0!==t.offsetHeight)&&"hidden"!==window.getComputedStyle(t).visibility&&t.offsetTop>=0&&t.offsetLeft>=0&&t.offsetTop<=window.innerHeight&&t.offsetLeft<=window.innerWidth;const F=t=>"type"in t&&"component"===t.type;B.mapLayoutContentItemsImmutable=async function t(e,i){return F(i)?e(i):{...i,content:await Promise.all(i.content?.map((i=>t(e,i))))}},H=B.mapLayoutContentItemsImmutableSync=function t(e,i){return F(i)?e(i):{...i,content:i.content?.map((i=>t(e,i)))}};class N extends Error{constructor(t,e){super(e),this.type=t}}class G extends N{constructor(t,e){super("Configuration",t),this.node=e}}class j extends N{constructor(t){super("PopoutBlocked",t)}}class $ extends N{constructor(t){super("API",t)}}class Z extends N{constructor(t){super("Bind",t)}}class q extends Error{constructor(t,e,i){super(`${t}: ${e}${void 0===i?"":": "+i}`)}}class X extends q{constructor(t,e){super("Assert",t,e)}}class Y extends q{constructor(t,e,i){super("UnreachableCase",t,`${e}${void 0===i?"":": "+i}`)}}class K extends q{constructor(t,e){super("UnexpectedNull",t,e)}}class J extends q{constructor(t,e){super("UnexpectedUndefined",t,e)}}var Q;!function(t){let e=!1;const i={PopoutCannotBeCreatedWithGroundItemConfig:{id:0,default:"Popout cannot be created with ground ItemConfig"},PleaseRegisterAConstructorFunction:{id:1,default:"Please register a constructor function"},ComponentTypeNotRegisteredAndBindComponentEventHandlerNotAssigned:{id:2,default:"Component type not registered and BindComponentEvent handler not assigned"},ComponentIsAlreadyRegistered:{id:3,default:"Component is already registered"},ComponentIsNotVirtuable:{id:4,default:"Component is not virtuable. Requires rootHtmlElement field/getter"},VirtualComponentDoesNotHaveRootHtmlElement:{id:5,default:'Virtual component does not have getter "rootHtmlElement"'},ItemConfigIsNotTypeComponent:{id:6,default:"ItemConfig is not of type component"},InvalidNumberPartInSizeString:{id:7,default:"Invalid number part in size string"},UnknownUnitInSizeString:{id:8,default:"Unknown unit in size string"},UnsupportedUnitInSizeString:{id:9,default:"Unsupported unit in size string"}};t.idCount=Object.keys(i).length;const n=Object.values(i);t.checkInitialise=function(){if(!e)for(let e=0;e="0"&&t<="9"}function Tt(t,e){const i=zt(e);t.style.width=i}function At(t,e){const i=zt(e);t.style.height=i}function kt(t){return{width:t.offsetWidth,height:t.offsetHeight}}function Dt(t,e){t.style.display=e?"":"none"}function Rt(t,e){if(void 0!==e)for(const i in e)if(e.hasOwnProperty(i)){const n=e[i],o=t[i];t[i]=Ut(o,n)}return t}function Ut(t,e){if("object"!=typeof e)return e;if(Array.isArray(e)){const t=e.length,i=new Array(t);for(let n=0;n36)throw new Error("Too many keys in config minifier map")},t.translateObject=n}(dt||(dt={})),function(t){t.defaults={type:at.ground,content:[],size:1,sizeUnit:ht.Fractional,minSize:void 0,minSizeUnit:ht.Pixel,id:"",isClosable:!0},t.createCopy=function(t,e){switch(t.type){case at.ground:case at.row:case at.column:return gt.createCopy(t,e);case at.stack:return ut.createCopy(t,e);case at.component:return pt.createCopy(t);default:throw new Y("CICC91354",t.type,"Invalid Config Item type specified")}},t.createDefault=function(t){switch(t){case at.ground:throw new X("CICCDR91562");case at.row:case at.column:return gt.createDefault(t);case at.stack:return ut.createDefault();case at.component:return pt.createDefault();default:throw new Y("CICCDD91563",t,"Invalid Config Item type specified")}},t.isComponentItem=function(t){return t.type===at.component},t.isStackItem=function(t){return t.type===at.stack},t.isGroundItem=function(t){return t.type===at.ground}}(ct||(ct={})),function(t){t.defaultMaximised=!1,function(t){t.createCopy=function(t,e){return void 0===t?void 0:{show:null!=e?e:t.show,popout:t.popout,close:t.close,maximise:t.maximise,minimise:t.minimise,tabDropdown:t.tabDropdown}}}(t.Header||(t.Header={}))}(mt||(mt={})),function(t){function e(t){const e=t.length,i=new Array(e);for(let n=0;n"__glMaximised"===t));t>0&&(o=!0,n=n.splice(t,1)),e=n.length>0?n[0]:ct.defaults.id}else e=n;return i=void 0!==t.maximised?t.maximised:o,{id:e,maximised:i}}}(wt||(wt={})),function(t){function e(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0;return{resolved:!0,root:Et.resolve(i),openPopouts:t.resolveOpenPopouts(e.openPopouts),dimensions:t.Dimensions.resolve(e.dimensions),settings:t.Settings.resolve(e.settings),header:t.Header.resolve(e.header,e.settings,e.labels)}}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:Lt.fromResolvedArray(e.openPopouts),settings:_t.Settings.createCopy(e.settings),dimensions:t.Dimensions.fromResolved(e.dimensions),header:_t.Header.createCopy(e.header)}},t.isResolved=function(t){const e=t;return void 0!==e.resolved&&!0===e.resolved},t.resolveOpenPopouts=function(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0,{root:Et.resolve(o),openPopouts:xt.resolveOpenPopouts(e.openPopouts),dimensions:xt.Dimensions.resolve(e.dimensions),settings:xt.Settings.resolve(e.settings),header:xt.Header.resolve(e.header,e.settings,e.labels),parentId:null!==(i=e.parentId)&&void 0!==i?i:null,indexInParent:null!==(n=e.indexInParent)&&void 0!==n?n:null,window:t.Window.resolve(e.window,e.dimensions),resolved:!0}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:i(e.openPopouts),dimensions:xt.Dimensions.fromResolved(e.dimensions),settings:_t.Settings.createCopy(e.settings),header:_t.Header.createCopy(e.header),parentId:e.parentId,indexInParent:e.indexInParent,window:t.Window.fromResolved(e.window)}},t.fromResolvedArray=i}(Lt||(Lt={}));class Wt{constructor(){this._allEventSubscriptions=[],this._subscriptionsMap=new Map,this.unbind=this.removeEventListener,this.trigger=this.emit}tryBubbleEvent(t,e){}emit(t,...e){let i=this._subscriptionsMap.get(t);if(void 0!==i){i=i.slice();for(let t=0;t0){const n=e.slice();n.unshift(t);const o=this._allEventSubscriptions.slice();for(let t=0;t0?n.contentItems[0]:n,e=0);const o=this._layoutManager.createAndInitContentItem(i,t);t.addChild(o,e),this._layoutManager.layoutConfig.settings.popInOnClose?this._onClose():this.close()}createWindow(){const t=this.createUrl(),e=Math.floor(1e6*Math.random()).toString(36),i=this.serializeWindowFeatures({width:this._initialWindowSize.width,height:this._initialWindowSize.height,innerWidth:this._initialWindowSize.width,innerHeight:this._initialWindowSize.height,menubar:"no",toolbar:"no",location:"no",personalbar:"no",resizable:"yes",scrollbars:"no",status:"no"});if(this._popoutWindow=globalThis.open(t,e,i),this._popoutWindow)this._popoutWindow.addEventListener("load",(()=>this.positionWindow()),{passive:!0}),this._popoutWindow.addEventListener("beforeunload",(()=>{this._layoutManager.layoutConfig.settings.popInOnClose?this.popIn():this._onClose()}),{passive:!0}),this._checkReadyInterval=setInterval((()=>this.checkReady()),10);else if(!0===this._layoutManager.layoutConfig.settings.blockedPopoutsThrowError){throw new j("Popout blocked")}}checkReady(){if(null===this._popoutWindow)throw new K("BPCR01844");this._popoutWindow.__glInstance&&this._popoutWindow.__glInstance.isInitialised&&(this.onInitialised(),void 0!==this._checkReadyInterval&&(clearInterval(this._checkReadyInterval),this._checkReadyInterval=void 0))}serializeWindowFeatures(t){const e=[];for(const i in t)e.push(i+"="+t[i].toString());return e.join(",")}createUrl(){const t="gl-window-config-"+Ot(),e=_t.minifyConfig(this._config);try{localStorage.setItem(t,JSON.stringify(e))}catch(t){throw new Error("Error while writing to localStorage "+function(t){return t instanceof Error?t.message:"string"==typeof t?t:"Unknown Error"}(t))}const i=new URL(location.href);return i.searchParams.set("gl-window",t),i.toString()}positionWindow(){if(null===this._popoutWindow)throw new Error("BrowserPopout.positionWindow: null popoutWindow");this._popoutWindow.moveTo(this._initialWindowSize.left,this._initialWindowSize.top),this._popoutWindow.focus()}onInitialised(){this._isInitialised=!0,this.getGlInstance().on("popIn",(()=>this.popIn())),this.emit("initialised")}_onClose(){setTimeout((()=>this.emit("closed")),50)}}class Gt extends Wt{constructor(t,e,i,n){super(),this.layoutManager=t,this._parent=i,this._element=n,this._popInParentIds=[],this._type=e.type,this._id=e.id,this._isInitialised=!1,this.isGround=!1,this.isRow=!1,this.isColumn=!1,this.isStack=!1,this.isComponent=!1,this.size=e.size,this.sizeUnit=e.sizeUnit,this.minSize=e.minSize,this.minSizeUnit=e.minSizeUnit,this._isClosable=e.isClosable,this._pendingEventPropagations={},this._throttledEvents=["stateChanged"],this._contentItems=this.createContentItems(e.content)}get type(){return this._type}get id(){return this._id}set id(t){this._id=t}get popInParentIds(){return this._popInParentIds}get parent(){return this._parent}get contentItems(){return this._contentItems}get isClosable(){return this._isClosable}get element(){return this._element}get isInitialised(){return this._isInitialised}static isStack(t){return t.isStack}static isComponentItem(t){return t.isComponent}static isComponentParentableItem(t){return t.isStack||t.isGround}removeChild(t,e=!1){const i=this._contentItems.indexOf(t);if(-1===i)throw new Error("Can't remove child item. Unknown content item");if(e||this._contentItems[i].destroy(),this._contentItems.splice(i,1),this._contentItems.length>0)this.updateSize(!1);else if(!this.isGround&&!0===this._isClosable){if(null===this._parent)throw new K("CIUC00874");this._parent.removeChild(this)}}addChild(t,e,i){return null!=e||(e=this._contentItems.length),this._contentItems.splice(e,0,t),t.setParent(this),!0===this._isInitialised&&!1===t._isInitialised&&t.init(),e}replaceChild(t,e,i=!1){const n=this._contentItems.indexOf(t),o=t._element.parentNode;if(-1===n)throw new X("CIRCI23232","Can't replace child. oldChild is not child of this");if(null===o)throw new K("CIRCP23232");if(o.replaceChild(e._element,t._element),!0===i&&(t._parent=null,t.destroy()),this._contentItems[n]=e,e.setParent(this),e.size=t.size,e.sizeUnit=t.sizeUnit,e.minSize=t.minSize,e.minSizeUnit=t.minSizeUnit,null===e._parent)throw new K("CIRCNC45699");!0===e._parent._isInitialised&&!1===e._isInitialised&&e.init(),this.updateSize(!1)}remove(){if(null===this._parent)throw new K("CIR11110");this._parent.removeChild(this)}popout(){const t=Ot(),e=this.layoutManager.createPopoutFromContentItem(this,void 0,t,void 0);return this.emitBaseBubblingEvent("stateChanged"),e}calculateConfigContent(){const t=this._contentItems,e=t.length,i=new Array(e);for(let n=0;nthis.propagateEventToLayoutManager(t,e))))}propagateEventToLayoutManager(t,e){this._pendingEventPropagations[t]=!1,this.layoutManager.emitUnknown(t,e)}}class jt extends Gt{constructor(t,e,i){super(t,e,i,document.createElement("div")),this._parentItem=i,this._focused=!1,this.isComponent=!0,this._reorderEnabled=e.reorderEnabled,this.applyUpdatableConfig(e),this._initialWantMaximise=e.maximised;const n=document.createElement("div");n.classList.add("lm_content"),this.element.appendChild(n),this._container=new Ft(e,this,t,n,(t=>this.handleUpdateItemConfigEvent(t)),(()=>this.show()),(()=>this.hide()),(t=>this.focus(t)),(t=>this.blur(t)))}get componentName(){return this._container.componentType}get componentType(){return this._container.componentType}get reorderEnabled(){return this._reorderEnabled}get initialWantMaximise(){return this._initialWantMaximise}get component(){return this._container.component}get container(){return this._container}get parentItem(){return this._parentItem}get headerConfig(){return this._headerConfig}get title(){return this._title}get tab(){return this._tab}get focused(){return this._focused}destroy(){this._container.destroy(),super.destroy()}applyUpdatableConfig(t){this.setTitle(t.title),this._headerConfig=t.header}toConfig(){const t=this._container.stateRequestEvent,e=void 0===t?this._container.state:t();return{type:at.component,content:[],size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,maximised:!1,isClosable:this.isClosable,reorderEnabled:this._reorderEnabled,title:this._title,header:mt.Header.createCopy(this._headerConfig),componentType:pt.copyComponentType(this.componentType),componentState:e}}close(){if(null===this.parent)throw new K("CIC68883");this.parent.removeChild(this,!1)}enterDragMode(t,e){Tt(this.element,t),At(this.element,e),this._container.enterDragMode(t,e)}exitDragMode(){this._container.exitDragMode()}enterStackMaximised(){this._container.enterStackMaximised()}exitStackMaximised(){this._container.exitStackMaximised()}drag(){this._container.drag()}updateSize(t){this.updateNodeSize(t)}init(){this.updateNodeSize(!1),super.init(),this._container.emit("open"),this.initContentItems()}setTitle(t){this._title=t,this.emit("titleChanged",t),this.emit("stateChanged")}setTab(t){this._tab=t,this.emit("tab",t),this._container.setTab(t)}hide(){super.hide(),this._container.setVisibility(!1)}show(){super.show(),this._container.setVisibility(!0)}focus(t=!1){this.parentItem.setActiveComponentItem(this,!0,t)}setFocused(t){this._focused=!0,this.tab.setFocused(),t||this.emitBaseBubblingEvent("focus")}blur(t=!1){this._focused&&this.layoutManager.setFocusedComponentItem(void 0,t)}setBlurred(t){this._focused=!1,this.tab.setBlurred(),t||this.emitBaseBubblingEvent("blur")}setParent(t){this._parentItem=t,super.setParent(t)}handleUpdateItemConfigEvent(t){this.applyUpdatableConfig(t)}updateNodeSize(t){if("none"!==this.element.style.display){const{width:e,height:i}=kt(this.element);this._container.setSizeToNodeSize(e,i,t)}}}class $t extends Gt{constructor(){super(...arguments),this._focused=!1}get focused(){return this._focused}setFocusedValue(t){this._focused=t}}class Zt extends Wt{constructor(t,e){super(),this._eElement=t,this._pointerTracking=!1,this._pointerDownEventListener=t=>this.onPointerDown(t),this._pointerMoveEventListener=t=>this.onPointerMove(t),this._pointerUpEventListener=t=>this.onPointerUp(t),this._timeout=void 0,this._allowableTargets=[t,...e],this._oDocument=document,this._eBody=document.body,this._nDelay=1800,this._nDistance=10,this._nX=0,this._nY=0,this._nOriginalX=0,this._nOriginalY=0,this._dragging=!1,this._eElement.addEventListener("pointerdown",this._pointerDownEventListener,{passive:!0})}destroy(){this.checkRemovePointerTrackingEventListeners(),this._eElement.removeEventListener("pointerdown",this._pointerDownEventListener)}cancelDrag(){this.processDragStop(void 0)}onPointerDown(t){if(this._allowableTargets.includes(t.target)&&t.isPrimary){const e=this.getPointerCoordinates(t);this.processPointerDown(e)}}processPointerDown(t){this._nOriginalX=t.x,this._nOriginalY=t.y,this._oDocument.addEventListener("pointermove",this._pointerMoveEventListener),this._oDocument.addEventListener("pointerup",this._pointerUpEventListener,{passive:!0}),this._pointerTracking=!0,this._timeout=setTimeout((()=>{try{this.startDrag()}catch(t){throw console.error(t),t}}),this._nDelay)}onPointerMove(t){this._pointerTracking&&(this.processDragMove(t),t.preventDefault())}processDragMove(t){this._nX=t.pageX-this._nOriginalX,this._nY=t.pageY-this._nOriginalY,!1===this._dragging&&(Math.abs(this._nX)>this._nDistance||Math.abs(this._nY)>this._nDistance)&&this.startDrag(),this._dragging&&this.emit("drag",this._nX,this._nY,t)}onPointerUp(t){this.processDragStop(t)}processDragStop(t){var e;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this.checkRemovePointerTrackingEventListeners(),!0===this._dragging&&(this._eBody.classList.remove("lm_dragging"),this._eElement.classList.remove("lm_dragging"),null===(e=this._oDocument.querySelector("iframe"))||void 0===e||e.style.setProperty("pointer-events",""),this._dragging=!1,this.emit("dragStop",t))}checkRemovePointerTrackingEventListeners(){this._pointerTracking&&(this._oDocument.removeEventListener("pointermove",this._pointerMoveEventListener),this._oDocument.removeEventListener("pointerup",this._pointerUpEventListener),this._pointerTracking=!1)}startDrag(){var t;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this._dragging=!0,this._eBody.classList.add("lm_dragging"),this._eElement.classList.add("lm_dragging"),null===(t=this._oDocument.querySelector("iframe"))||void 0===t||t.style.setProperty("pointer-events","none"),this.emit("dragStart",this._nOriginalX,this._nOriginalY)}getPointerCoordinates(t){return{x:t.pageX,y:t.pageY}}}class qt{constructor(t,e,i){this._isVertical=t,this._size=e,this._grabSize=i0){const i=this.createSplitter(Math.max(0,e-1)).element;e>0?(this.contentItems[e-1].element.insertAdjacentElement("afterend",i),i.insertAdjacentElement("afterend",t.element)):(this.contentItems[0].element.insertAdjacentElement("beforebegin",i),i.insertAdjacentElement("beforebegin",t.element))}else this._childElementContainer.appendChild(t.element);super.addChild(t,e);const n=1/this.contentItems.length*100;if(!0===i)return this.emitBaseBubblingEvent("stateChanged"),e;for(let e=0;e0&&(this.calculateRelativeSizes(),this.setAbsoluteSizes()),this.emitBaseBubblingEvent("stateChanged"),this.emit("resize")}setAbsoluteSizes(){const t=this.calculateAbsoluteSizes();for(let e=0;e0&&t.itemSizes[e]++,this._isColumn?(Tt(this.contentItems[e].element,t.crossAxisSize),At(this.contentItems[e].element,t.itemSizes[e])):(Tt(this.contentItems[e].element,t.itemSizes[e]),At(this.contentItems[e].element,t.crossAxisSize))}calculateAbsoluteSizes(){const t=(this.contentItems.length-1)*this._splitterSize,{width:e,height:i}=kt(this.element);let n,o;this._isColumn?(n=i-t,o=e):(n=e-t,o=i);let s=0;const r=[];for(let t=0;t0){const n=100-t;for(let t=0;t100&&e.length>0){for(let t=0;te)return;{const r=i/e;let a=i;for(let e=0;ethis.onSplitterDrag(e,t,i))),e.on("dragStop",(()=>this.onSplitterDragStop(e))),e.on("dragStart",(()=>this.onSplitterDragStart(e))),this._splitter.splice(t,0,e),e}getSplitItems(t){const e=this._splitter.indexOf(t);return{before:this.contentItems[e],after:this.contentItems[e+1]}}calculateContentItemMinSize(t){const e=t.minSize;if(void 0!==e){if(t.minSizeUnit===ht.Pixel)return e;throw new X("ROCGMD98831",JSON.stringify(t))}{const t=this.layoutManager.layoutConfig.dimensions;return this._isColumn?t.defaultMinItemHeight:t.defaultMinItemWidth}}calculateContentItemsTotalMinSize(t){let e=0;for(const i of t)e+=this.calculateContentItemMinSize(i);return e}onSplitterDragStart(t){const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=this.calculateContentItemsTotalMinSize(e.before.contentItems),s=this.calculateContentItemsTotalMinSize(e.after.contentItems);this._splitterPosition=0,this._splitterMinPosition=-1*(i-o),this._splitterMaxPosition=n-s}onSplitterDrag(t,e,i){let n=this._isColumn?i:e;if(null===this._splitterMinPosition||null===this._splitterMaxPosition)throw new K("ROCOSD59226");n=Math.max(n,this._splitterMinPosition),n=Math.min(n,this._splitterMaxPosition),this._splitterPosition=n;const o=zt(n);this._isColumn?t.element.style.top=o:t.element.style.left=o}onSplitterDragStop(t){if(null===this._splitterPosition)throw new K("ROCOSDS66932");{const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=(this._splitterPosition+i)/(i+n),s=e.before.size+e.after.size;e.before.size=o*s,e.after.size=(1-o)*s,t.element.style.top=zt(0),t.element.style.left=zt(0),globalThis.requestAnimationFrame((()=>this.updateSize(!1)))}}}!function(t){t.getElementDimensionSize=function(t,e){return"width"===e?function(t){return t.offsetWidth}(t):function(t){return t.offsetHeight}(t)},t.setElementDimensionSize=function(t,e,i){return"width"===e?Tt(t,i):At(t,i)},t.createElement=function(t,e){const i=t.createElement("div");return i.classList.add("lm_item"),e?i.classList.add("lm_column"):i.classList.add("lm_row"),i}}(Xt||(Xt={}));class Yt extends $t{constructor(t,e,i){super(t,vt.create(e),null,Yt.createElement(document)),this.isGround=!0,this._childElementContainer=this.element,this._containerElement=i;let n=null;for(;;){const t=n?n.previousSibling:this._containerElement.lastChild;if(!(t instanceof Element&&t.classList.contains("lm_content")))break;n=t}this._containerElement.insertBefore(this.element,n)}init(){if(!0!==this.isInitialised){this.updateNodeSize();for(let t=0;t0?this.contentItems[0]:this,n.isComponent)throw new Error("Cannot add item as child to ComponentItem");{const t=this.layoutManager.createAndInitContentItem(i,n);return e=n.addChild(t,e),n===this?-1:e}}loadComponentAsRoot(t){this.clearRoot();const e=Ct.resolve(t,!1);if(e.maximised)throw new Error("Root Component cannot be maximised");{const t=new jt(this.layoutManager,e,this);t.init(),this.addChild(t,0)}}addChild(t,e){if(this.contentItems.length>0)throw new Error("Ground node can only have a single child");return this._childElementContainer.appendChild(t.element),e=super.addChild(t,e),this.updateSize(!1),this.emitBaseBubblingEvent("stateChanged"),e}calculateConfigContent(){const t=this.contentItems,e=t.length,i=new Array(e);for(let n=0;n0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e)),this.updateContentItemsSize(!1))}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}createSideAreas(){const t=Yt.Area.oppositeSides,e=new Array(Object.keys(t).length);let i=0;for(const n in t){const o=n,s=this.getElementArea();if(null===s)throw new K("RCSA77553");s.side=o,"2"===t[o][1]?s[o]=s[t[o]]-50:s[o]=s[t[o]]+50,s.surface=(s.x2-s.x1)*(s.y2-s.y1),e[i++]=s}return e}highlightDropZone(t,e,i){this.layoutManager.tabDropPlaceholder.remove(),super.highlightDropZone(t,e,i)}onDrop(t,e){if(t.isComponent){const e=ut.createDefault(),i=t;e.header=mt.Header.createCopy(i.headerConfig);const n=this.layoutManager.createAndInitContentItem(e,this);n.addChild(t),t=n}if(0===this.contentItems.length)this.addChild(t);else{if(t.type===at.row||t.type===at.column){const e=ut.createDefault(),i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}const i="x"==e.side[0]?at.row:at.column,n="2"==e.side[1],o=this.contentItems[0];if(o instanceof Xt&&o.type===i){const e=o.contentItems[n?0:o.contentItems.length-1];o.addChild(t,n?0:void 0,!0),e.size*=.5,t.size=e.size,t.sizeUnit=ht.Percent,o.updateSize(!1)}else{const e=ct.createDefault(i),s=this.layoutManager.createContentItem(e,this);this.replaceChild(o,s),s.addChild(t,n?0:void 0,!0),s.addChild(o,n?void 0:0,!0),o.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}}dock(){throw new X("GID87731")}validateDocking(){throw new X("GIVD87732")}getAllContentItems(){const t=[this];return this.deepGetAllContentItems(this.contentItems,t),t}getConfigMaximisedItems(){const t=[];return this.deepFilterContentItems(this.contentItems,t,(t=>!(!Gt.isStack(t)||!t.initialWantMaximise)||!(!Gt.isComponentItem(t)||!t.initialWantMaximise))),t}getItemsByPopInParentId(t){const e=[];return this.deepFilterContentItems(this.contentItems,e,(e=>e.popInParentIds.includes(t))),e}toConfig(){throw new Error("Cannot generate GroundItem config")}setActiveComponentItem(t,e,i){}updateNodeSize(){const{width:t,height:e}=kt(this._containerElement);Tt(this.element,t),At(this.element,e),this.contentItems.length>0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e))}deepGetAllContentItems(t,e){for(let i=0;ithis.onClick(t),this._touchStartEventListener=t=>this.onTouchStart(t),this._element=document.createElement("div"),this._element.classList.add(i),this._element.title=e,this._header.on("destroy",(()=>this.destroy())),this._element.addEventListener("click",this._clickEventListener,{passive:!0}),this._element.addEventListener("touchstart",this._touchStartEventListener,{passive:!0}),this._header.controlsContainerElement.appendChild(this._element)}get element(){return this._element}destroy(){var t;this._element.removeEventListener("click",this._clickEventListener),this._element.removeEventListener("touchstart",this._touchStartEventListener),null===(t=this._element.parentNode)||void 0===t||t.removeChild(this._element)}onClick(t){this._pushEvent(t)}onTouchStart(t){this._pushEvent(t)}}class Jt{constructor(t,e,i,n,o){var s;this._layoutManager=t,this._componentItem=e,this._closeEvent=i,this._focusEvent=n,this._dragStartEvent=o,this._isActive=!1,this._tabClickListener=t=>this.onTabClickDown(t),this._tabTouchStartListener=t=>this.onTabTouchStart(t),this._closeClickListener=()=>this.onCloseClick(),this._closeTouchStartListener=()=>this.onCloseTouchStart(),this._dragStartListener=(t,e)=>this.onDragStart(t,e),this._contentItemDestroyListener=()=>this.onContentItemDestroy(),this._tabTitleChangedListener=t=>this.setTitle(t),this._element=document.createElement("div"),this._element.classList.add("lm_tab"),this._titleElement=document.createElement("span"),this._titleElement.classList.add("lm_title"),this._closeElement=document.createElement("div"),this._closeElement.classList.add("lm_close_tab"),this._element.appendChild(this._titleElement),this._element.appendChild(this._closeElement),e.isClosable?this._closeElement.style.display="":this._closeElement.style.display="none",this.setTitle(e.title),this._componentItem.on("titleChanged",this._tabTitleChangedListener);(null!==(s=e.reorderEnabled)&&void 0!==s?s:this._layoutManager.layoutConfig.settings.reorderEnabled)&&this.enableReorder(),this._element.addEventListener("click",this._tabClickListener,{passive:!0}),this._element.addEventListener("touchstart",this._tabTouchStartListener,{passive:!0}),this._componentItem.isClosable?(this._closeElement.addEventListener("click",this._closeClickListener,{passive:!0}),this._closeElement.addEventListener("touchstart",this._closeTouchStartListener,{passive:!0})):(this._closeElement.remove(),this._closeElement=void 0),this._componentItem.setTab(this),this._layoutManager.emit("tabCreated",this)}get isActive(){return this._isActive}get componentItem(){return this._componentItem}get contentItem(){return this._componentItem}get element(){return this._element}get titleElement(){return this._titleElement}get closeElement(){return this._closeElement}get reorderEnabled(){return void 0!==this._dragListener}set reorderEnabled(t){t!==this.reorderEnabled&&(t?this.enableReorder():this.disableReorder())}setTitle(t){this._titleElement.innerText=t,this._element.title=t}setActive(t){t!==this._isActive&&(this._isActive=t,t?this._element.classList.add("lm_active"):this._element.classList.remove("lm_active"))}destroy(){var t,e;this._closeEvent=void 0,this._focusEvent=void 0,this._dragStartEvent=void 0,this._element.removeEventListener("click",this._tabClickListener),this._element.removeEventListener("touchstart",this._tabTouchStartListener),null===(t=this._closeElement)||void 0===t||t.removeEventListener("click",this._closeClickListener),null===(e=this._closeElement)||void 0===e||e.removeEventListener("touchstart",this._closeTouchStartListener),this._componentItem.off("titleChanged",this._tabTitleChangedListener),this.reorderEnabled&&this.disableReorder(),this._element.remove()}setBlurred(){this._element.classList.remove("lm_focused"),this._titleElement.classList.remove("lm_focused")}setFocused(){this._element.classList.add("lm_focused"),this._titleElement.classList.add("lm_focused")}onDragStart(t,e){if(void 0===this._dragListener)throw new J("TODSDLU10093");if(void 0===this._dragStartEvent)throw new J("TODS23309");this._dragStartEvent(t,e,this._dragListener,this.componentItem)}onContentItemDestroy(){void 0!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=void 0)}onTabClickDown(t){const e=t.target;e!==this._element&&e!==this._titleElement||(0===t.button?this.notifyFocus():1===t.button&&this._componentItem.isClosable&&this.notifyClose())}onTabTouchStart(t){t.target===this._element&&this.notifyFocus()}onCloseClick(){this.notifyClose()}onCloseTouchStart(){this.notifyClose()}notifyClose(){if(void 0===this._closeEvent)throw new J("TNC15007");this._closeEvent(this._componentItem)}notifyFocus(){if(void 0===this._focusEvent)throw new J("TNA15007");this._focusEvent(this._componentItem)}enableReorder(){this._dragListener=new Zt(this._element,[this._titleElement]),this._dragListener.on("dragStart",this._dragStartListener),this._componentItem.on("destroy",this._contentItemDestroyListener)}disableReorder(){if(void 0===this._dragListener)throw new J("TDR87745");this._componentItem.off("destroy",this._contentItemDestroyListener),this._dragListener.off("dragStart",this._dragStartListener),this._dragListener=void 0}}class Qt{constructor(t,e,i,n,o){this._layoutManager=t,this._componentRemoveEvent=e,this._componentFocusEvent=i,this._componentDragStartEvent=n,this._dropdownActiveChangedEvent=o,this._tabs=[],this._lastVisibleTabIndex=-1,this._dropdownActive=!1,this._element=document.createElement("section"),this._element.classList.add("lm_tabs"),this._dropdownElement=document.createElement("section"),this._dropdownElement.classList.add("lm_tabdropdown_list"),this._dropdownElement.style.display="none"}get tabs(){return this._tabs}get tabCount(){return this._tabs.length}get lastVisibleTabIndex(){return this._lastVisibleTabIndex}get element(){return this._element}get dropdownElement(){return this._dropdownElement}get dropdownActive(){return this._dropdownActive}destroy(){for(let t=0;tthis.handleTabCloseEvent(t)),(t=>this.handleTabFocusEvent(t)),((t,e,i,n)=>this.handleTabDragStartEvent(t,e,i,n)));void 0===e&&(e=this._tabs.length),this._tabs.splice(e,0,i),ethis._lastVisibleTabIndex){const t=this._tabs[e];for(let t=e;t>0;t--)this._tabs[t]=this._tabs[t-1];this._tabs[0]=t}}updateTabSizes(t,e){let i=!1;this.tryUpdateTabSizes(i,t,e)||(i=!0,this.tryUpdateTabSizes(i,t,e)),i!==this._dropdownActive&&(this._dropdownActive=i,this._dropdownActiveChangedEvent())}tryUpdateTabSizes(t,e,i){if(this._tabs.length>0){if(void 0===i)throw new Error("non-empty tabs must have active component item");let n=0,o=!1;const s=this._layoutManager.layoutConfig.settings.tabOverlapAllowance,r=this._tabs.indexOf(i.tab),a=this._tabs[r];this._lastVisibleTabIndex=-1;for(let i=0;ie){if(o)i===r&&(l.style.zIndex="auto",l.style.marginLeft="",l.parentElement!==this._element&&this._element.appendChild(l));else{let t;if(t=r>0&&r<=i?(d-e)/(i-1):(d-e)/i,tthis.onClick(t),this._touchStartListener=t=>this.onTouchStart(t),this._rowColumnClosable=!0,this._closeButton=null,this._popoutButton=null,this._tabsContainer=new Qt(this._layoutManager,(t=>this.handleTabInitiatedComponentRemoveEvent(t)),(t=>this.handleTabInitiatedComponentFocusEvent(t)),((t,e,i,n)=>this.handleTabInitiatedDragStartEvent(t,e,i,n)),(()=>this.processTabDropdownActiveChanged())),this._show=i.show,this._popoutEnabled=i.popoutEnabled,this._popoutLabel=i.popoutLabel,this._maximiseEnabled=i.maximiseEnabled,this._maximiseLabel=i.maximiseLabel,this._minimiseEnabled=i.minimiseEnabled,this._minimiseLabel=i.minimiseLabel,this._closeEnabled=i.closeEnabled,this._closeLabel=i.closeLabel,this._tabDropdownEnabled=i.tabDropdownEnabled,this._tabDropdownLabel=i.tabDropdownLabel,this.setSide(i.side),this._canRemoveComponent=this._configClosable,this._element=document.createElement("section"),this._element.classList.add("lm_header"),this._controlsContainerElement=document.createElement("section"),this._controlsContainerElement.classList.add("lm_controls"),this._element.appendChild(this._tabsContainer.element),this._element.appendChild(this._controlsContainerElement),this._element.appendChild(this._tabsContainer.dropdownElement),this._element.addEventListener("click",this._clickListener,{passive:!0}),this._element.addEventListener("touchstart",this._touchStartListener,{passive:!0}),this._documentMouseUpListener=()=>this._tabsContainer.hideAdditionalTabsDropdown(),globalThis.document.addEventListener("mouseup",this._documentMouseUpListener,{passive:!0}),this._tabControlOffset=this._layoutManager.layoutConfig.settings.tabControlOffset,this._tabDropdownEnabled&&(this._tabDropdownButton=new Kt(this,this._tabDropdownLabel,"lm_tabdropdown",(()=>this._tabsContainer.showAdditionalTabsDropdown()))),this._popoutEnabled&&(this._popoutButton=new Kt(this,this._popoutLabel,"lm_popout",(()=>this.handleButtonPopoutEvent()))),this._maximiseEnabled&&(this._maximiseButton=new Kt(this,this._maximiseLabel,"lm_maximise",(t=>this.handleButtonMaximiseToggleEvent(t)))),this._configClosable&&(this._closeButton=new Kt(this,this._closeLabel,"lm_close",(()=>s()))),this.processTabDropdownActiveChanged()}get show(){return this._show}get side(){return this._side}get leftRightSided(){return this._leftRightSided}get layoutManager(){return this._layoutManager}get parent(){return this._parent}get tabs(){return this._tabsContainer.tabs}get lastVisibleTabIndex(){return this._tabsContainer.lastVisibleTabIndex}get element(){return this._element}get tabsContainerElement(){return this._tabsContainer.element}get controlsContainerElement(){return this._controlsContainerElement}destroy(){this.emit("destroy"),this._popoutEvent=void 0,this._maximiseToggleEvent=void 0,this._clickEvent=void 0,this._touchStartEvent=void 0,this._componentRemoveEvent=void 0,this._componentFocusEvent=void 0,this._componentDragStartEvent=void 0,this._tabsContainer.destroy(),globalThis.document.removeEventListener("mouseup",this._documentMouseUpListener),this._element.remove()}createTab(t,e){this._tabsContainer.createTab(t,e)}removeTab(t){this._tabsContainer.removeTab(t)}processActiveComponentChanged(t){this._tabsContainer.processActiveComponentChanged(t),this.updateTabSizes()}setSide(t){this._side=t,this._leftRightSided=[nt.right,nt.left].includes(this._side)}setRowColumnClosable(t){this._rowColumnClosable=t,this.updateClosability()}updateClosability(){let t;if(this._configClosable)if(this._rowColumnClosable){t=!0;const e=this.tabs.length;for(let i=0;i1}applyFocusedValue(t){t?this._element.classList.add("lm_focused"):this._element.classList.remove("lm_focused")}processMaximised(){if(void 0===this._maximiseButton)throw new J("HPMAX16997");this._maximiseButton.element.setAttribute("title",this._minimiseLabel)}processMinimised(){if(void 0===this._maximiseButton)throw new J("HPMIN16997");this._maximiseButton.element.setAttribute("title",this._maximiseLabel)}updateTabSizes(){if(this._tabsContainer.tabCount>0){const t=this._show?this._layoutManager.layoutConfig.dimensions.headerHeight:0;let e;this._leftRightSided?(this._element.style.height="",this._element.style.width=zt(t)):(this._element.style.width="",this._element.style.height=zt(t)),e=this._leftRightSided?this._element.offsetHeight-this._controlsContainerElement.offsetHeight-this._tabControlOffset:this._element.offsetWidth-this._controlsContainerElement.offsetWidth-this._tabControlOffset,this._tabsContainer.updateTabSizes(e,this._getActiveComponentItemEvent())}}handleTabInitiatedComponentRemoveEvent(t){if(this._canRemoveComponent){if(void 0===this._componentRemoveEvent)throw new J("HHTCE22294");this._componentRemoveEvent(t)}}handleTabInitiatedComponentFocusEvent(t){if(void 0===this._componentFocusEvent)throw new J("HHTAE22294");this._componentFocusEvent(t)}handleTabInitiatedDragStartEvent(t,e,i,n){if(this._canRemoveComponent){if(void 0===this._componentDragStartEvent)throw new J("HHTDSE22294");this._componentDragStartEvent(t,e,i,n)}else i.cancelDrag()}processTabDropdownActiveChanged(){void 0!==this._tabDropdownButton&&Dt(this._tabDropdownButton.element,this._tabsContainer.dropdownActive)}handleButtonPopoutEvent(){if(this._layoutManager.layoutConfig.settings.popoutWholeStack){if(void 0===this._popoutEvent)throw new J("HHBPOE17834");this._popoutEvent()}else{const t=this._getActiveComponentItemEvent();t&&t.popout()}}handleButtonMaximiseToggleEvent(t){if(void 0===this._maximiseToggleEvent)throw new J("HHBMTE16834");this._maximiseToggleEvent()}onClick(t){t.target===this._element&&this.notifyClick(t)}onTouchStart(t){t.target===this._element&&this.notifyTouchStart(t)}notifyClick(t){if(void 0===this._clickEvent)throw new J("HNHC46834");this._clickEvent(t)}notifyTouchStart(t){if(void 0===this._touchStartEvent)throw new J("HNHTS46834");this._touchStartEvent(t)}}class ee extends $t{constructor(t,e,i){var n,o,s,r,a,l,h,d,c,m,u,p,g,f,v,_,y,C,w;super(t,e,i,ee.createElement(document)),this._headerSideChanged=!1,this._resizeListener=()=>this.handleResize(),this._maximisedListener=()=>this.handleMaximised(),this._minimisedListener=()=>this.handleMinimised(),this._headerConfig=e.header;const I=t.layoutConfig.header,b=e.content;let S;if(1!==b.length)S=void 0;else{S=b[0].header}this._initialWantMaximise=e.maximised,this._initialActiveItemIndex=null!==(n=e.activeItemIndex)&&void 0!==n?n:0;const E=null!==(r=null!==(s=null===(o=this._headerConfig)||void 0===o?void 0:o.show)&&void 0!==s?s:null==S?void 0:S.show)&&void 0!==r?r:I.show,x=null!==(h=null!==(l=null===(a=this._headerConfig)||void 0===a?void 0:a.popout)&&void 0!==l?l:null==S?void 0:S.popout)&&void 0!==h?h:I.popout,L=null!==(m=null!==(c=null===(d=this._headerConfig)||void 0===d?void 0:d.maximise)&&void 0!==c?c:null==S?void 0:S.maximise)&&void 0!==m?m:I.maximise,z=null!==(g=null!==(p=null===(u=this._headerConfig)||void 0===u?void 0:u.close)&&void 0!==p?p:null==S?void 0:S.close)&&void 0!==g?g:I.close,M=null!==(_=null!==(v=null===(f=this._headerConfig)||void 0===f?void 0:f.minimise)&&void 0!==v?v:null==S?void 0:S.minimise)&&void 0!==_?_:I.minimise,P=null!==(w=null!==(C=null===(y=this._headerConfig)||void 0===y?void 0:y.tabDropdown)&&void 0!==C?C:null==S?void 0:S.tabDropdown)&&void 0!==w?w:I.tabDropdown;this._maximisedEnabled=!1!==L;const T={show:!1!==E,side:!1===E?nt.top:E,popoutEnabled:!1!==x,popoutLabel:!1===x?"":x,maximiseEnabled:this._maximisedEnabled,maximiseLabel:!1===L?"":L,closeEnabled:!1!==z,closeLabel:!1===z?"":z,minimiseEnabled:!0,minimiseLabel:M,tabDropdownEnabled:!1!==P,tabDropdownLabel:!1===P?"":P};this._header=new te(t,this,T,e.isClosable&&!1!==z,(()=>this.getActiveComponentItem()),(()=>this.remove()),(()=>this.handlePopoutEvent()),(()=>this.toggleMaximise()),(t=>this.handleHeaderClickEvent(t)),(t=>this.handleHeaderTouchStartEvent(t)),(t=>this.handleHeaderComponentRemoveEvent(t)),(t=>this.handleHeaderComponentFocusEvent(t)),((t,e,i,n)=>this.handleHeaderComponentStartDragEvent(t,e,i,n))),this.isStack=!0,this._childElementContainer=document.createElement("section"),this._childElementContainer.classList.add("lm_items"),this.on("resize",this._resizeListener),this._maximisedEnabled&&(this.on("maximised",this._maximisedListener),this.on("minimised",this._minimisedListener)),this.element.appendChild(this._header.element),this.element.appendChild(this._childElementContainer),this.setupHeaderPosition(),this._header.updateClosability()}get childElementContainer(){return this._childElementContainer}get header(){return this._header}get headerShow(){return this._header.show}get headerSide(){return this._header.side}get headerLeftRightSided(){return this._header.leftRightSided}get contentAreaDimensions(){return this._contentAreaDimensions}get initialWantMaximise(){return this._initialWantMaximise}get isMaximised(){return this===this.layoutManager.maximisedStack}get stackParent(){if(!this.parent)throw new Error("Stack should always have a parent");return this.parent}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}init(){if(!0===this.isInitialised)return;this.updateNodeSize();for(let t=0;t0){if(this._initialActiveItemIndex<0||this._initialActiveItemIndex>=e)throw new Error(`ActiveItemIndex out of range: ${this._initialActiveItemIndex} id: ${this.id}`);for(let i=0;ithis.contentItems.length)throw e-=1,new X("SAC99728");if(t instanceof jt)return e=super.addChild(t,e),this._childElementContainer.appendChild(t.element),this._header.createTab(t,e),this.setActiveComponentItem(t,i),this._header.updateTabSizes(),this.updateSize(!1),t.container.setBaseLogicalZIndex(),this._header.updateClosability(),this.emitStateChangedEvent(),e;throw new X("SACC88532")}removeChild(t,e){const i=t,n=this.contentItems.indexOf(i),o=1===this.contentItems.length;if(this._activeComponentItem===i&&(i.focused&&i.blur(),!o)){const t=0===n?1:n-1;this.setActiveComponentItem(this.contentItems[t],!1)}this._header.removeTab(i),super.removeChild(i,e),o||this._header.updateClosability(),this.emitStateChangedEvent()}toggleMaximise(){this.isMaximised?this.minimise():this.maximise()}maximise(){if(!this.isMaximised){this.layoutManager.setMaximisedStack(this);const t=this.contentItems,e=t.length;for(let i=0;i0&&void 0===t)throw new Error("expected non-empty stack to have an active component item");return{type:"stack",content:this.calculateConfigContent(),size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,isClosable:this.isClosable,maximised:this.isMaximised,header:this.createHeaderConfig(),activeItemIndex:t}}onDrop(t,e){if("header"===this._dropSegment){if(this.resetHeaderDropZone(),void 0===this._dropIndex)throw new J("SODDI68990");return void this.addChild(t,this._dropIndex)}if("body"===this._dropSegment)return void this.addChild(t,0,!0);const i="top"===this._dropSegment||"bottom"===this._dropSegment,n="left"===this._dropSegment||"right"===this._dropSegment,o="top"===this._dropSegment||"left"===this._dropSegment,s=i&&this.stackParent.isColumn||n&&this.stackParent.isRow;if(t.isComponent){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createAndInitContentItem(e,this);i.addChild(t),t=i}if(t.type===at.row||t.type===at.column){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}if(s){const e=this.stackParent.contentItems.indexOf(this);this.stackParent.addChild(t,o?e:e+1,!0),this.size*=.5,t.size=this.size,t.sizeUnit=this.sizeUnit,this.stackParent.updateSize(!1)}else{const e=i?at.column:at.row,n=ct.createDefault(e),s=this.layoutManager.createContentItem(n,this);this.stackParent.replaceChild(this,s),s.addChild(t,o?0:void 0,!0),s.addChild(this,o?void 0:0,!0),this.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}highlightDropZone(t,e){for(const i in this._contentAreaDimensions){const n=i,o=this._contentAreaDimensions[n].hoverArea;if(o.x1t&&o.y1e)return void("header"===n?(this._dropSegment="header",this.highlightHeaderDropZone(this._header.leftRightSided?e:t)):(this.resetHeaderDropZone(),this.highlightBodyDropZone(n)))}}getArea(){if("none"===this.element.style.display)return null;const t=super.getElementArea(this._header.element),e=super.getElementArea(this._childElementContainer);if(null===t||null===e)throw new K("SGAHC13086");const i=e.x2-e.x1,n=e.y2-e.y1;return this._contentAreaDimensions={header:{hoverArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2},highlightArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2}}},0===this.contentItems.length?(this._contentAreaDimensions.body={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2}},super.getElementArea(this.element)):(this._contentAreaDimensions.left={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x1+.25*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x1+.5*i,y2:e.y2}},this._contentAreaDimensions.top={hoverArea:{x1:e.x1+.25*i,y1:e.y1,x2:e.x1+.75*i,y2:e.y1+.5*n},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y1+.5*n}},this._contentAreaDimensions.right={hoverArea:{x1:e.x1+.75*i,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1+.5*i,y1:e.y1,x2:e.x2,y2:e.y2}},this._contentAreaDimensions.bottom={hoverArea:{x1:e.x1+.25*i,y1:e.y1+.5*n,x2:e.x1+.75*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1+.5*n,x2:e.x2,y2:e.y2}},super.getElementArea(this.element))}positionHeader(t){this._header.side!==t&&(this._header.setSide(t),this._headerSideChanged=!0,this.setupHeaderPosition())}updateNodeSize(){if("none"!==this.element.style.display){const t=kt(this.element);if(this._header.show){t[this._header.leftRightSided?it.width:it.height]-=this.layoutManager.layoutConfig.dimensions.headerHeight}this._childElementContainer.style.width=zt(t.width),this._childElementContainer.style.height=zt(t.height);for(let e=0;e=o&&tthis.onDrag(t,e,i))),this._dragListener.on("dragStop",(()=>this.onDrop())),this.createDragProxyElements(t,e),null===this._componentItem.parent)throw new K("DPC10097");this._componentItemFocused=this._componentItem.focused,this._componentItemFocused&&this._componentItem.blur(),this._componentItem.parent.removeChild(this._componentItem,!0),this.setDimensions(),document.body.appendChild(this._element),this.determineMinMaxXY(),this._layoutManager.calculateItemAreas(),this.setDropPosition(t,e)}get element(){return this._element}createDragProxyElements(t,e){this._element=document.createElement("div"),this._element.classList.add("lm_dragProxy");const i=document.createElement("div");i.classList.add("lm_header");const n=document.createElement("div");n.classList.add("lm_tabs");const o=document.createElement("div");o.classList.add("lm_tab");const s=document.createElement("span");s.classList.add("lm_title"),o.appendChild(s),n.appendChild(o),i.appendChild(n),this._proxyContainerElement=document.createElement("div"),this._proxyContainerElement.classList.add("lm_content"),this._element.appendChild(i),this._element.appendChild(this._proxyContainerElement),this._originalParent instanceof ee&&this._originalParent.headerShow&&(this._sided=this._originalParent.headerLeftRightSided,this._element.classList.add("lm_"+this._originalParent.headerSide),[nt.right,nt.bottom].indexOf(this._originalParent.headerSide)>=0&&this._proxyContainerElement.insertAdjacentElement("afterend",i)),this._element.style.left=zt(t),this._element.style.top=zt(e),o.setAttribute("title",this._componentItem.title),s.insertAdjacentText("afterbegin",this._componentItem.title),this._proxyContainerElement.appendChild(this._componentItem.element)}determineMinMaxXY(){const t=this._layoutManager.groundItem;if(void 0===t)throw new J("DPDMMXY73109");{const e=t.element.getBoundingClientRect();this._minX=e.left+document.body.scrollLeft,this._minY=e.top+document.body.scrollTop,this._maxX=this._minX+e.width,this._maxY=this._minY+e.height}}onDrag(t,e,i){const n=i.pageX,o=i.pageY;this.setDropPosition(n,o),this._componentItem.drag()}setDropPosition(t,e){this._layoutManager.layoutConfig.settings.constrainDragToContainer&&(t<=this._minX?t=Math.ceil(this._minX):t>=this._maxX&&(t=Math.floor(this._maxX)),e<=this._minY?e=Math.ceil(this._minY):e>=this._maxY&&(e=Math.floor(this._maxY))),this._element.style.left=zt(t),this._element.style.top=zt(e),this._area=this._layoutManager.getArea(t,e),null!==this._area&&(this._lastValidArea=this._area,this._area.contentItem.highlightDropZone(t,e,this._area))}onDrop(){const t=this._layoutManager.dropTargetIndicator;if(null===t)throw new K("DPOD30011");let e;if(t.hide(),this._componentItem.exitDragMode(),null!==this._area)e=this._componentItem,this._area.contentItem.onDrop(e,this._area);else if(null!==this._lastValidArea){e=this._componentItem;this._lastValidArea.contentItem.onDrop(e,this._lastValidArea)}else this._originalParent?(e=this._componentItem,this._originalParent.addChild(e)):this._componentItem.destroy();this._element.remove(),this._layoutManager.emit("itemDropped",this._componentItem),this._componentItemFocused&&void 0!==e&&e.focus()}setDimensions(){const t=this._layoutManager.layoutConfig.dimensions;if(void 0===t)throw new Error("DragProxy.setDimensions: dimensions undefined");let e=t.dragProxyWidth,i=t.dragProxyHeight;if(void 0===e||void 0===i)throw new Error("DragProxy.setDimensions: width and/or height undefined");const n=!1===this._layoutManager.layoutConfig.header.show?0:t.headerHeight;this._element.style.width=zt(e),this._element.style.height=zt(i),e-=this._sided?n:0,i-=this._sided?0:n,this._proxyContainerElement.style.width=zt(e),this._proxyContainerElement.style.height=zt(i),this._componentItem.enterDragMode(e,i),this._componentItem.show()}}class ne{constructor(t,e,i,n,o,s,r){this._layoutManager=t,this._element=e,this._extraAllowableChildTargets=i,this._componentTypeOrFtn=n,this._componentState=o,this._title=s,this._id=r,this._dragListener=null,this._dummyGroundContainer=document.createElement("div");const a=gt.createDefault("row");this._dummyGroundContentItem=new Yt(this._layoutManager,a,this._dummyGroundContainer),this.createDragListener()}destroy(){this.removeDragListener()}createDragListener(){this.removeDragListener(),this._dragListener=new Zt(this._element,this._extraAllowableChildTargets),this._dragListener.on("dragStart",((t,e)=>this.onDragStart(t,e))),this._dragListener.on("dragStop",(()=>this.onDragStop()))}onDragStart(t,e){var i;const n="component";let o;if("function"==typeof this._componentTypeOrFtn){const t=this._componentTypeOrFtn();o=ne.isDragSourceComponentItemConfig(t)?{type:n,componentState:t.state,componentType:t.type,title:null!==(i=t.title)&&void 0!==i?i:this._title}:t}else o={type:n,componentState:this._componentState,componentType:this._componentTypeOrFtn,title:this._title,id:this._id};const s=bt.resolve(o,!1),r=new jt(this._layoutManager,s,this._dummyGroundContentItem);if(this._dummyGroundContentItem.contentItems.push(r),null===this._dragListener)throw new K("DSODSD66746");{const i=new ie(t,e,this._dragListener,this._layoutManager,r,this._dummyGroundContentItem),n=this._layoutManager.transitionIndicator;if(null===n)throw new K("DSODST66746");n.transitionElements(this._element,i.element)}}onDragStop(){this.createDragListener()}removeDragListener(){null!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=null)}}!function(t){t.isDragSourceComponentItemConfig=function(t){return!("componentType"in t)}}(ne||(ne={}));class oe{constructor(){this._element=document.createElement("div"),this._element.classList.add("lm_dropTargetIndicator");const t=document.createElement("div");t.classList.add("lm_inner"),this._element.appendChild(t),document.body.appendChild(this._element)}destroy(){this._element.remove()}highlightArea(t,e){this._element.style.left=zt(t.x1+e),this._element.style.top=zt(t.y1+e),this._element.style.width=zt(t.x2-t.x1-e),this._element.style.height=zt(t.y2-t.y1-e),this._element.style.display="block"}hide(){Dt(this._element,!1)}}class se{constructor(){this._element=document.createElement("div"),this._element.classList.add("lm_transition_indicator"),document.body.appendChild(this._element),this._toElement=null,this._fromDimensions=null,this._totalAnimationDuration=200,this._animationStartTime=null}destroy(){this._element.remove()}transitionElements(t,e){}nextAnimationFrame(){}measure(t){const e=t.getBoundingClientRect();return{left:e.left,top:e.top,width:t.offsetWidth,height:t.offsetHeight}}}class re extends Wt{constructor(t){super(),this._layoutManager=t,this._childEventListener=t=>this.onEventFromChild(t),globalThis.addEventListener(re.ChildEventName,this._childEventListener,{passive:!0})}emit(t,...e){"userBroadcast"===t?this.emitUserBroadcast(...e):super.emit(t,...e)}emitUserBroadcast(...t){this.handleUserBroadcastEvent("userBroadcast",t)}destroy(){globalThis.removeEventListener(re.ChildEventName,this._childEventListener)}handleUserBroadcastEvent(t,e){this._layoutManager.isSubWindow?this.propagateToParent(t,e):this.propagateToThisAndSubtree(t,e)}onEventFromChild(t){const e=t.detail;this.handleUserBroadcastEvent(e.eventName,e.args)}propagateToParent(t,e){const i={bubbles:!0,cancelable:!0,detail:{layoutManager:this._layoutManager,eventName:t,args:e}},n=new CustomEvent(re.ChildEventName,i),o=globalThis.opener;if(null===o)throw new K("EHPTP15778");o.dispatchEvent(n)}propagateToThisAndSubtree(t,e){this.emitUnknown(t,...e);for(let i=0;ithis.handleContainerResize())),this._windowBeforeUnloadListener=()=>this.onBeforeUnload(),this._windowBeforeUnloadListening=!1,this._maximisedStackBeforeDestroyedListener=t=>this.cleanupBeforeMaximisedStackDestroyed(t),this.isSubWindow=t.isSubWindow,this._constructorOrSubWindowLayoutConfig=t.constructorOrSubWindowLayoutConfig,Q.checkInitialise(),dt.checkInitialise(),void 0!==t.containerElement&&(this._containerElement=t.containerElement)}get container(){return this._containerElement}get isInitialised(){return this._isInitialised}get groundItem(){return this._groundItem}get root(){return this._groundItem}get openPopouts(){return this._openPopouts}get dropTargetIndicator(){return this._dropTargetIndicator}get transitionIndicator(){return this._transitionIndicator}get width(){return this._width}get height(){return this._height}get eventHub(){return this._eventHub}get rootItem(){if(void 0===this._groundItem)throw new Error("Cannot access rootItem before init");return 0===this._groundItem.contentItems.length?void 0:this._groundItem.contentItems[0]}get focusedComponentItem(){return this._focusedComponentItem}get tabDropPlaceholder(){return this._tabDropPlaceholder}get maximisedStack(){return this._maximisedStack}get deprecatedConstructor(){return!this.isSubWindow&&void 0!==this._constructorOrSubWindowLayoutConfig}destroy(){if(this._isInitialised){this._windowBeforeUnloadListening&&(globalThis.removeEventListener("beforeunload",this._windowBeforeUnloadListener),this._windowBeforeUnloadListening=!1),!0===this.layoutConfig.settings.closePopoutsOnUnload&&this.closeAllOpenPopouts(),this._resizeObserver.disconnect(),this.checkClearResizeTimeout(),void 0!==this._groundItem&&this._groundItem.destroy(),this._tabDropPlaceholder.remove(),null!==this._dropTargetIndicator&&this._dropTargetIndicator.destroy(),null!==this._transitionIndicator&&this._transitionIndicator.destroy(),this._eventHub.destroy();for(const t of this._dragSources)t.destroy();this._dragSources=[],this._isInitialised=!1}}minifyConfig(t){return _t.minifyConfig(t)}unminifyConfig(t){return _t.unminifyConfig(t)}init(){let t;if(this.setContainer(),this._dropTargetIndicator=new oe,this._transitionIndicator=new se,this.updateSizeFromContainer(),this.isSubWindow){if(void 0===this._constructorOrSubWindowLayoutConfig)throw new J("LMIU07155");{const e=this._constructorOrSubWindowLayoutConfig.root;if(void 0===e)throw new X("LMIC07156");if(!Ct.isComponent(e))throw new X("LMIC07157");t=e;const i=xt.resolve(this._constructorOrSubWindowLayoutConfig);this.layoutConfig=Object.assign(Object.assign({},i),{root:void 0})}}else void 0===this._constructorOrSubWindowLayoutConfig?this.layoutConfig=_t.createDefault():this.layoutConfig=xt.resolve(this._constructorOrSubWindowLayoutConfig);const e=this.layoutConfig;this._groundItem=new Yt(this,e.root,this._containerElement),this._groundItem.init(),this.checkLoadedLayoutMaximiseItem(),this._resizeObserver.observe(this._containerElement),this._isInitialised=!0,this.adjustColumnsResponsive(),this.emit("initialised"),void 0!==t&&this.loadComponentAsRoot(t)}loadLayout(t){if(!this.isInitialised)throw new Error("GoldenLayout: Need to call init() if LayoutConfig with defined root passed to constructor");if(void 0===this._groundItem)throw new J("LMLL11119");this.createSubWindows(),this.layoutConfig=xt.resolve(t),this._groundItem.loadRoot(this.layoutConfig.root),this.checkLoadedLayoutMaximiseItem(),this.adjustColumnsResponsive()}saveLayout(){if(!1===this._isInitialised)throw new Error("Can't create config, layout not yet initialised");if(void 0===this._groundItem)throw new J("LMTC18244");{const t=this._groundItem.calculateConfigContent();let e;e=1!==t.length?void 0:t[0],this.reconcilePopoutWindows();const i=[];for(let t=0;t=0?n=this._groundItem.contentItems[0]:e=0;break;case at.row:case at.column:e=n.addItem(t,i.index);break;case at.stack:if(Ct.isComponent(t)){e=n.addItem(t,i.index);break}throw Error(tt[6]);case at.component:throw new X("LMAIALC87444602");default:throw new Y("LMAIALU98881733",n.type)}if(Ct.isComponent(t)){const t=n.contentItems[e];Gt.isStack(t)&&(n=t,e=0)}return i.parentItem=n,i.index=e,i}}}loadComponentAsRoot(t){if(void 0===this._groundItem)throw new Error("Cannot add item before init");this._groundItem.loadComponentAsRoot(t)}updateSize(t,e){this.setSize(t,e)}setSize(t,e){if(this._width=t,this._height=e,!0===this._isInitialised){if(void 0===this._groundItem)throw new J("LMUS18881");if(this._groundItem.setSize(this._width,this._height),this._maximisedStack){const{width:t,height:e}=kt(this._containerElement);Tt(this._maximisedStack.element,t),At(this._maximisedStack.element,e),this._maximisedStack.updateSize(!1)}this.adjustColumnsResponsive()}}beginSizeInvalidation(){this._sizeInvalidationBeginCount++}endSizeInvalidation(){0==--this._sizeInvalidationBeginCount&&this.updateSizeFromContainer()}updateSizeFromContainer(){const{width:t,height:e}=kt(this._containerElement);this.setSize(t,e)}updateRootSize(t=!1){if(void 0===this._groundItem)throw new J("LMURS28881");this._groundItem.updateSize(t)}createAndInitContentItem(t,e){const i=this.createContentItem(t,e);return i.init(),i}createContentItem(t,e){if("string"!=typeof t.type)throw new G("Missing parameter 'type'",JSON.stringify(t));if(ct.isComponentItem(t)&&!(e instanceof ee)&&e&&!(!0===this.isSubWindow&&e instanceof Yt)){t={type:at.stack,content:[t],size:t.size,sizeUnit:t.sizeUnit,minSize:t.minSize,minSizeUnit:t.minSizeUnit,id:t.id,maximised:t.maximised,isClosable:t.isClosable,activeItemIndex:0,header:void 0}}return this.createContentItemFromConfig(t,e)}findFirstComponentItemById(t){if(void 0===this._groundItem)throw new J("LMFFCIBI82446");return this.findFirstContentItemTypeByIdRecursive(at.component,t,this._groundItem)}createPopout(t,e,i,n){return t instanceof Gt?this.createPopoutFromContentItem(t,e,i,n):this.createPopoutFromItemConfig(t,e,i,n)}createPopoutFromContentItem(t,e,i,n){let o=t.parent,s=t;for(;null!==o&&1===o.contentItems.length&&!o.isGround;)s=o,o=o.parent;if(null===o)throw new K("LMCPFCI00834");{if(void 0===n&&(n=o.contentItems.indexOf(s)),null!==i&&o.addPopInParentId(i),void 0===e){const i=globalThis.screenX||globalThis.screenLeft,n=globalThis.screenY||globalThis.screenTop,o=t.element.offsetLeft,s=t.element.offsetTop,{width:r,height:a}=kt(t.element);e={left:i+o,top:n+s,width:r,height:a}}const r=t.toConfig();if(t.remove(),ft.isRootItemConfig(r))return this.createPopoutFromItemConfig(r,e,i,n);throw new Error(`${tt[0]}`)}}beginVirtualSizedContainerAdding(){0==++this._virtualSizedContainerAddingBeginCount&&(this._virtualSizedContainers.length=0)}addVirtualSizedContainer(t){this._virtualSizedContainers.push(t)}endVirtualSizedContainerAdding(){if(0==--this._virtualSizedContainerAddingBeginCount){const t=this._virtualSizedContainers.length;if(t>0){this.fireBeforeVirtualRectingEvent(t);for(let e=0;ethis.emit("windowOpened",a))),a.on("closed",(()=>this.reconcilePopoutWindows())),this._openPopouts.push(a),this.layoutConfig.settings.closePopoutsOnUnload&&!this._windowBeforeUnloadListening&&(globalThis.addEventListener("beforeunload",this._windowBeforeUnloadListener,{passive:!0}),this._windowBeforeUnloadListening=!0),a}closeAllOpenPopouts(){for(let t=0;tglobalThis.close()),1)}getArea(t,e){let i=null,n=1/0;for(let o=0;o=s.x1&&t=s.y1&&es.surface&&(n=s.surface,i=s)}return i}calculateItemAreas(){const t=this.getAllContentItems(),e=this._groundItem;if(void 0===e)throw new J("LMCIAR44365");if(1!==t.length){e.contentItems[0].isStack?this._itemAreas=[]:this._itemAreas=e.createSideAreas();for(let e=0;e0){let e=t[0];if(Gt.isComponentItem(e)){const t=e.parent;if(null===t)throw new K("LMXLLMI69999");e=t}if(!Gt.isStack(e))throw new X("LMCLLMI19993");e.maximise()}}}processMaximiseStack(t){if(this._maximisedStack=t,t.on("beforeItemDestroyed",this._maximisedStackBeforeDestroyedListener),t.element.classList.add("lm_maximised"),t.element.insertAdjacentElement("afterend",this._maximisePlaceholder),void 0===this._groundItem)throw new J("LMMXI19993");{this._groundItem.element.prepend(t.element);const{width:e,height:i}=kt(this._containerElement);Tt(t.element,e),At(t.element,i),t.updateSize(!0),t.focusActiveContentItem(),this._maximisedStack.emit("maximised"),this.emit("stateChanged")}}processMinimiseMaximisedStack(){if(void 0===this._maximisedStack)throw new X("LMMMS74422");{const t=this._maximisedStack;if(null===t.parent)throw new K("LMMI13668");t.element.classList.remove("lm_maximised"),this._maximisePlaceholder.insertAdjacentElement("afterend",t.element),this._maximisePlaceholder.remove(),this.updateRootSize(!0),this._maximisedStack=void 0,t.off("beforeItemDestroyed",this._maximisedStackBeforeDestroyedListener),t.emit("minimised"),this.emit("stateChanged")}}reconcilePopoutWindows(){const t=[];for(let e=0;e{this._resizeTimeoutId=void 0,this.beginSizeInvalidation(),this.endSizeInvalidation()}),this.resizeDebounceInterval))}checkClearResizeTimeout(){void 0!==this._resizeTimeoutId&&(clearTimeout(this._resizeTimeoutId),this._resizeTimeoutId=void 0)}setContainer(){var t;const e=document.body,i=null!==(t=this._containerElement)&&void 0!==t?t:e;if(i===e){this.resizeWithContainerAutomatically=!0;const t=document.documentElement;t.style.height="100%",t.style.margin="0",t.style.padding="0",t.style.overflow="clip",e.style.height="100%",e.style.margin="0",e.style.padding="0",e.style.overflow="clip"}this._containerElement=i}onBeforeUnload(){this.destroy()}adjustColumnsResponsive(){if(void 0===this._groundItem)throw new J("LMACR20883");if(this._firstLoad=!1,this.useResponsiveLayout()&&!this._updatingColumnsResponsive&&this._groundItem.contentItems.length>0&&this._groundItem.contentItems[0].isRow){if(void 0===this._groundItem||null===this._width)throw new J("LMACR77412");{const t=this._groundItem.contentItems[0].contentItems.length;if(t<=1)return;{const e=this.layoutConfig.dimensions.defaultMinItemWidth;if(t*e<=this._width)return;{this._updatingColumnsResponsive=!0;const i=t-Math.max(Math.floor(this._width/e),1),n=this._groundItem.contentItems[0],o=this.getAllStacks();if(0===o.length)throw new X("LMACRS77413");{const t=o[0];for(let e=0;en?void 0:{parentItem:t,index:o}}}case 1:if(void 0===this._focusedComponentItem)return;{const t=this._focusedComponentItem.parentItem;return this.tryCreateLocationFromParentItem(t,e)}case 2:{const t=this.findFirstContentItemType(at.stack);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 3:{let t=this.findFirstContentItemType(at.row);return void 0!==t?this.tryCreateLocationFromParentItem(t,e):(t=this.findFirstContentItemType(at.column),void 0!==t?this.tryCreateLocationFromParentItem(t,e):void 0)}case 4:{const t=this.findFirstContentItemType(at.row);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 5:{const t=this.findFirstContentItemType(at.column);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 6:if(void 0===this._groundItem)throw new J("LMFLRIF18244");return void 0!==this.rootItem?void 0:void 0===e||0===e?{parentItem:this._groundItem,index:0}:void 0;case 7:if(void 0===this._groundItem)throw new J("LMFLF18244");{const t=this._groundItem.contentItems;if(0===t.length)return void 0===e||0===e?{parentItem:this._groundItem,index:0}:void 0;{const i=t[0];return this.tryCreateLocationFromParentItem(i,e)}}}}tryCreateLocationFromParentItem(t,e){const i=t.contentItems.length;return void 0===e?{parentItem:t,index:i}:e<0||e>i?void 0:{parentItem:t,index:e}}}!function(t){t.createMaximisePlaceElement=function(t){const e=t.createElement("div");return e.classList.add("lm_maximise_place"),e},t.createTabDropPlaceholderElement=function(t){const e=t.createElement("div");return e.classList.add("lm_drop_tab_placeholder"),e},t.defaultLocationSelectors=[{typeId:1,index:void 0},{typeId:2,index:void 0},{typeId:3,index:void 0},{typeId:7,index:void 0}],t.afterFocusedItemIfPossibleLocationSelectors=[{typeId:0,index:1},{typeId:2,index:void 0},{typeId:3,index:void 0},{typeId:7,index:void 0}]}(ae||(ae={}));class le extends ae{constructor(t,e,i,n){if(super(le.createLayoutManagerConstructorParameters(t,e)),this._bindComponentEventHanlderPassedInConstructor=!1,this._creationTimeoutPassed=!1,void 0!==e&&"function"==typeof e&&(this.bindComponentEvent=e,this._bindComponentEventHanlderPassedInConstructor=!0,void 0!==i&&(this.unbindComponentEvent=i)),!this._bindComponentEventHanlderPassedInConstructor&&this.isSubWindow){if(void 0===this._constructorOrSubWindowLayoutConfig)throw new J("VLC98823");{const t=xt.resolve(this._constructorOrSubWindowLayoutConfig);this.layoutConfig=Object.assign(Object.assign({},t),{root:void 0})}}!0!==n&&(this.deprecatedConstructor||this.init())}destroy(){this.bindComponentEvent=void 0,this.unbindComponentEvent=void 0,super.destroy()}init(){if(this._bindComponentEventHanlderPassedInConstructor||"loading"!==document.readyState&&null!==document.body){if(!this._bindComponentEventHanlderPassedInConstructor&&!0===this.isSubWindow&&!this._creationTimeoutPassed)return setTimeout((()=>this.init()),7),void(this._creationTimeoutPassed=!0);!0===this.isSubWindow&&(this._bindComponentEventHanlderPassedInConstructor||this.clearHtmlAndAdjustStylesForSubWindow(),window.__glInstance=this),super.init()}else document.addEventListener("DOMContentLoaded",(()=>this.init()),{passive:!0})}clearHtmlAndAdjustStylesForSubWindow(){const t=document.head,e=new Array(4);e[0]=document.querySelectorAll("body link"),e[1]=document.querySelectorAll("body style"),e[2]=document.querySelectorAll("template"),e[3]=document.querySelectorAll(".gl_keep");for(let i=0;ithis.emit("popIn"))),document.body.appendChild(t),!0}}bindComponent(t,e){if(void 0!==this.bindComponentEvent){return this.bindComponentEvent(t,e)}if(void 0!==this.getComponentEvent)return{virtual:!1,component:this.getComponentEvent(t,e)};{const t=`${tt[2]}: ${JSON.stringify(e)}`;throw new Z(t)}}unbindComponent(t,e,i){if(void 0!==this.unbindComponentEvent)this.unbindComponentEvent(t);else if(!e&&void 0!==this.releaseComponentEvent){if(void 0===i)throw new J("VCUCRCU333998");this.releaseComponentEvent(t,i)}}}!function(t){let e=!1;t.createLayoutManagerConstructorParameters=function(t,i){const n=e?null:new URL(document.location.href).searchParams.get("gl-window");e=!0;const o=null!==n;let s,r;if(null!==n){const e=localStorage.getItem(n);if(null===e)throw new Error("Null gl-window Config");localStorage.removeItem(n);const i=JSON.parse(e),o=_t.unminifyConfig(i);r=xt.fromResolved(o),t instanceof HTMLElement&&(s=t)}else void 0===t?r=void 0:t instanceof HTMLElement?(r=void 0,s=t):r=t,void 0===s&&i instanceof HTMLElement&&(s=i);return{constructorOrSubWindowLayoutConfig:r,isSubWindow:o,containerElement:s}}}(le||(le={}));class he extends le{constructor(t,e,i){super(t,e,i,!0),this._componentTypesMap=new Map,this._registeredComponentMap=new Map,this._virtuableComponentMap=new Map,this._containerVirtualRectingRequiredEventListener=(t,e,i)=>this.handleContainerVirtualRectingRequiredEvent(t,e,i),this._containerVirtualVisibilityChangeRequiredEventListener=(t,e)=>this.handleContainerVirtualVisibilityChangeRequiredEvent(t,e),this._containerVirtualZIndexChangeRequiredEventListener=(t,e,i)=>this.handleContainerVirtualZIndexChangeRequiredEvent(t,e,i),this.deprecatedConstructor||this.init()}registerComponent(t,e,i=!1){if("function"!=typeof e)throw new $("registerComponent() componentConstructorOrFactoryFtn parameter is not a function");if(e.hasOwnProperty("prototype")){const n=e;this.registerComponentConstructor(t,n,i)}else{const n=e;this.registerComponentFactoryFunction(t,n,i)}}registerComponentConstructor(t,e,i=!1){if("function"!=typeof e)throw new Error(tt[1]);if(void 0!==this._componentTypesMap.get(t))throw new Z(`${tt[3]}: ${t}`);this._componentTypesMap.set(t,{constructor:e,factoryFunction:void 0,virtual:i})}registerComponentFactoryFunction(t,e,i=!1){if("function"!=typeof e)throw new Z("Please register a constructor function");if(void 0!==this._componentTypesMap.get(t))throw new Z(`${tt[3]}: ${t}`);this._componentTypesMap.set(t,{constructor:void 0,factoryFunction:e,virtual:i})}registerComponentFunction(t){this.registerGetComponentConstructorCallback(t)}registerGetComponentConstructorCallback(t){if("function"!=typeof t)throw new Error("Please register a callback function");void 0!==this._getComponentConstructorFtn&&console.warn("Multiple component functions are being registered. Only the final registered function will be used."),this._getComponentConstructorFtn=t}getRegisteredComponentTypeNames(){const t=this._componentTypesMap.keys();return Array.from(t)}getComponentInstantiator(t){let e;const i=pt.resolveComponentTypeName(t);return void 0!==i&&(e=this._componentTypesMap.get(i)),void 0===e&&void 0!==this._getComponentConstructorFtn&&(e={constructor:this._getComponentConstructorFtn(t),factoryFunction:void 0,virtual:!1}),e}bindComponent(t,e){let i;const n=pt.resolveComponentTypeName(e);let o;if(void 0!==n&&(i=this._componentTypesMap.get(n)),void 0===i&&void 0!==this._getComponentConstructorFtn&&(i={constructor:this._getComponentConstructorFtn(e),factoryFunction:void 0,virtual:!1}),void 0!==i){const s=i.virtual;let r,a;r=void 0===e.componentState?void 0:Ut({},e.componentState);const l=i.constructor;if(void 0!==l)a=new l(t,r,s);else{const e=i.factoryFunction;if(void 0===e)throw new X("LMBCFFU10008");a=e(t,r,s)}if(s){if(void 0===a)throw new J("GLBCVCU988774");{const e=a,i=e.rootHtmlElement;if(void 0===i)throw new Z(`${tt[5]}: ${n}`);!function(t){const e="absolute";t.style.position!==e&&(t.style.position=e)}(i),this.container.appendChild(i),this._virtuableComponentMap.set(t,e),t.virtualRectingRequiredEvent=this._containerVirtualRectingRequiredEventListener,t.virtualVisibilityChangeRequiredEvent=this._containerVirtualVisibilityChangeRequiredEventListener,t.virtualZIndexChangeRequiredEvent=this._containerVirtualZIndexChangeRequiredEventListener}}this._registeredComponentMap.set(t,a),o={virtual:i.virtual,component:a}}else o=super.bindComponent(t,e);return o}unbindComponent(t,e,i){if(void 0===this._registeredComponentMap.get(t))super.unbindComponent(t,e,i);else{const e=this._virtuableComponentMap.get(t);if(void 0!==e){const i=e.rootHtmlElement;if(void 0===i)throw new X("GLUC77743",t.title);this.container.removeChild(i),this._virtuableComponentMap.delete(t)}}}fireBeforeVirtualRectingEvent(t){this._goldenLayoutBoundingClientRect=this.container.getBoundingClientRect(),super.fireBeforeVirtualRectingEvent(t)}handleContainerVirtualRectingRequiredEvent(t,e,i){const n=this._virtuableComponentMap.get(t);if(void 0===n)throw new J("GLHCSCE55933");{const o=n.rootHtmlElement;if(void 0===o)throw new Z(tt[4]+" "+t.title);{const n=t.element.getBoundingClientRect(),s=n.left-this._goldenLayoutBoundingClientRect.left;o.style.left=zt(s);const r=n.top-this._goldenLayoutBoundingClientRect.top;o.style.top=zt(r),Tt(o,e),At(o,i)}}}handleContainerVirtualVisibilityChangeRequiredEvent(t,e){const i=this._virtuableComponentMap.get(t);if(void 0===i)throw new J("GLHCVVCRE55934");{const n=i.rootHtmlElement;if(void 0===n)throw new Z(tt[4]+" "+t.title);Dt(n,e)}}handleContainerVirtualZIndexChangeRequiredEvent(t,e,i){const n=this._virtuableComponentMap.get(t);if(void 0===n)throw new J("GLHCVZICRE55935");{const e=n.rootHtmlElement;if(void 0===e)throw new Z(tt[4]+" "+t.title);e.style.zIndex=i}}}const de="initial_",ce={show:"top",popout:!1,maximise:!1,close:"close-tab-unused"},me={headerHeight:31},ue={hasHeaders:!0,reorderEnabled:!0},pe={popoutWholeStack:!1,constrainDragToContainer:!1,constrainDragToHeaders:!1,preventDragout:!1,showMaximiseIcon:!1,showPopoutIcon:!1,showCloseIcon:!1,blockedPopoutsThrowError:!0,closePopoutsOnUnload:!0,selectionEnabled:!1};var ge,fe;class ve{constructor(e){this.layout=e,ge.set(this,void 0),fe.set(this,void 0),this.handleResize=t=>{t.forEach((t=>this.resizeElement(t.target)))},this.handleMutation=()=>{this.layout.viewComponentsByContainerElement.forEach((t=>{this.resizeElement(t.container.element)}))},t.__classPrivateFieldSet(this,ge,new ResizeObserver(this.handleResize),"f"),t.__classPrivateFieldSet(this,fe,new MutationObserver(this.handleMutation),"f")}observeMutations(e){t.__classPrivateFieldGet(this,fe,"f")?.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["class"]})}destroy(){t.__classPrivateFieldGet(this,ge,"f").disconnect(),t.__classPrivateFieldGet(this,fe,"f").disconnect()}observeContainer(e){t.__classPrivateFieldGet(this,ge,"f").observe(e)}unobserveContainer(e){t.__classPrivateFieldGet(this,ge,"f").unobserve(e)}resizeElement(t){const e=this.layout.viewComponentsByContainerElement.get(t);e&&e.resize()}}ge=new WeakMap,fe=new WeakMap;var _e={};Object.defineProperty(_e,"__esModule",{value:!0});var ye=_e.BaseItem=void 0;class Ce{constructor(t,e,i){this._item=t,this._layout=e,this._wrap=i}get raw(){return this._item}get layout(){return this._layout}get type(){return this._item.type}get contentItems(){return(this._item.contentItems??[]).map((t=>this._wrap(t)))}get parent(){const t=this._item.parent;return t?this._wrap(t):null}setActiveContentItem(t,e){if("stack"!==this.type)throw new Error(`Cannot call setActiveContentItem from a non-stack item: ${this.type}`);this._item.setActiveContentItem(t.raw,e)}static wrapInternal(t,e,i){const n=Ce.wrapCache.get(e);if(n)return n;const o=new t(e,i,(e=>Ce.wrapInternal(t,e,i)));return Ce.wrapCache.set(e,o),o}}ye=_e.BaseItem=Ce,Ce.wrapCache=new WeakMap;const we=t=>!!t&&"contentItems"in t&&(t.isRow||t.isColumn);class Ie extends ye{isRoot(){return!!this._item.parent?.isGround}getBounds(){return this._item.element.getBoundingClientRect()}get viewName(){if(this._item.isComponent){const{component:t}=this._item;return t.identity.name}throw new Error("View name not found")}onDestroyed(t){const e=({target:i})=>{i===this._item&&(t(),this._item.off("itemDestroyed",e))};this._item.on("itemDestroyed",e)}createAdjacentStack({position:t="right"}={}){const e=this.raw;if(ee.isStack(e)&&e.parent){const i=["top","bottom"].includes(t)?"column":"row",n=["left","top"].includes(t)?1:0,o=we(e.parent)?e.parent:e.layoutManager,s=o,r=e.parent.contentItems.indexOf(e);e.parent.isGround&&e.parent.removeChild(e,!0);const a=o.newItem({type:i,content:[{type:"stack",content:[]}]},r);if(!a)throw new Error("createAdjacentStack: Failed to create new container");const l=a.contentItems[0];return a.addChild(this.raw,n),we(s)&&s.removeChild(e,!0),this._wrap(l)}throw new Error(`Cannot creat adjacent stacks for type: ${e.type}, must be type 'stack'`)}setActiveContentItem(t,e=!0){if(!ee.isStack(this._item))throw new Error(`Cannot call setActiveContentItem from a non-stack item: ${this.type}`);this._item.setActiveComponentItem(t.raw,!e)}static wrap(t,e){return ye.wrapInternal(Ie,t,e)}}function be(t=[],e){for(const i of t)"component"===i.type?Object.keys(e).forEach((t=>{t in i&&(i.componentState={[`${de}${t}`]:i[t],...i.componentState}),i[t]=e[t]})):be(i.content,e)}function Se(t=[],e,i){for(const n of t)if("component"===n.type)Object.keys(e).forEach((t=>{if(`${de}${t}`in n.componentState)return n[t]=n.componentState[`${de}${t}`],void delete n.componentState[`${de}${t}`];n[t]=e[t]}));else{if(n.size&&("row"===i||"column"===i)){n["row"===i?"width":"height"]=n.size?.includes(".")?parseFloat(n.size):parseInt(n.size)}Se(n.content,e,n.type)}}function Ee(t){if(t.root){t.root.content&&Se([t.root],{componentName:"view",isClosable:!0});const e=t.root;t.content=[e],delete t.root}return t}const xe=e=>class extends e{connectedCallback(){if(!this.name||!this.uuid)throw new Error(" Name or uuid attribute missing");if(!this.src)throw new Error(" missing 'src' attribute.");this.#t||(this.#t=document.createElement("iframe"),this.#t.src=this.src,this.#t.style.height="100%",this.#t.style.width="100%",this.#t.style.border="none",this.forceFrameName?this.#t.setAttribute("name",this.forceFrameName):this.#t.setAttribute("name",t.encodeOptions({brokerUrl:this.brokerUrl,name:this.name,uuid:this.uuid,providerId:this.providerId,contextGroup:this.contextGroup},"of-frame")),this.#t.setAttribute("id",this.name),this.appendChild(this.#t))}#t;get brokerUrl(){return this.getAttribute("of-broker")}set brokerUrl(t){t&&this.setAttribute("of-broker",t)}get name(){return this.getAttribute("of-name")}set name(t){t&&this.setAttribute("of-name",t)}get forceFrameName(){return this.getAttribute("forceFrameName")}set forceFrameName(t){t&&this.setAttribute("forceFrameName",t)}get uuid(){return this.getAttribute("of-uuid")}set uuid(t){t&&this.setAttribute("of-uuid",t)}get src(){return this.getAttribute("src")}set src(t){t&&this.setAttribute("src",t)}get providerId(){return this.getAttribute("of-provider-id")}set providerId(t){t&&this.setAttribute("of-provider-id",t)}get contextGroup(){return this.getAttribute("of-context-group")}set contextGroup(t){t&&this.setAttribute("of-context-group",t)}static get observedAttributes(){return["name"]}};class Le{static create(t){const e=document.createElement("of-view");return Object.entries(t).forEach((([t,i])=>{e.setAttribute(t,i)})),e}}customElements.define("of-view",xe(HTMLElement));class ze{constructor(t,i,n,{brokerUrl:o,interopConfig:s},r){this.container=t,this.config=i,this.ofView=null,this.isDragging=()=>this.container.tab.element?.className.includes("lm_dragging")??!1;const{url:a,web:l,interop:h,name:d}=i||{},c=d??`internal-generated-view-${e.v4()}`;if(this.identity={uuid:n,name:c},this.container.element.setAttribute("of-name",c),this.container.element.id=`container-${c}`,this.container.parent.id=c,void 0===a)return void this.handleUrlMissing();const m=this.updateTitleIfNotSet(a),u={"of-broker":o,"of-uuid":n,"of-name":c,src:a};l?.frameName&&(u.forceFrameName=l.frameName);const p=h?.currentContextGroup??s?.currentContextGroup;p&&(u["of-context-group"]=p),s?.providerId&&(u["of-provider-id"]=s?.providerId),this.ofView=Le.create(u),this.ofView.title=m??`Iframe: ${a}`,r.appendChild(this.ofView),this.ofView.style.position="absolute"}updateTitleIfNotSet(t){return"view"===this.container.parent.title&&this.container.parent.setTitle(t),this.container.parent.title}handleUrlMissing(){const t=document.createElement("div");t.setAttribute("style","padding: 20px");t.innerText="No URL provided",this.container.element.appendChild(t)}destroy(){this.ofView?.remove(),this.ofView=null}closeView(){this.container.close()}resize(){if(this.ofView){if(this.isDragging())return void(this.ofView.style.display="none");const t=this.container.element.getBoundingClientRect();this.ofView.style.position="absolute",this.ofView.style.height=`${t.height}px`,this.ofView.style.width=`${t.width}px`,this.ofView.style.inset=`${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`,this.ofView.style.display="block"}}}class Me extends U{static overrideConfig(t){const e={...ue,...t.settings,...pe};return e.reorderEnabled?be(t.content,{isClosable:!0}):be(t.content,{reorderEnabled:!1}),{dimensions:me,...t,settings:e,header:{...ce,show:!1!==t.settings?.hasHeaders&&ce.show}}}constructor(t,e,i,{options:n},o,s){super(),this.identity=t,this.container=e,this.initialConfig=i,this.layoutManager=o,this.platformProvider=s,this.viewComponentsByContainerElement=new Map,this.layoutContentCache=_.getSingleInstance(),this.reparentingViews=new Set,this.goldenLayoutDestroyed=!1,this.createViewComponent=(t,e)=>{m.handleSharedView(this.layoutManager,this.identity,e);const i=new ze(t,e,this.identity.uuid,this.options,this.iframeContainer);return e&&!1===e[`${de}isClosable`]&&this.stylesheet.insertRule(`#tab-${i.identity.name} .lm_close_tab { display: none; }`),this.viewComponentsByContainerElement.set(t.element,i),this.resizeController.observeContainer(t.element),i},this.iframeContainer=document.createElement("div"),this.iframeContainer.id=`openfin-layout-iframe-container-${this.identity.layoutName}`,this.domEmitter=new V(e),this.setupStylesheets(),this.layout=new he(this.container),this.layout.resizeWithContainerAutomatically=!0,this.options=n,this.layout.registerComponent("view",this.createViewComponent),this.setupListeners(),this.resizeController=new ve(this),this.layout.loadLayout(Me.overrideConfig(i));const r=document.createElement("div");r.id=`openfin-layout-shadow-container-${this.identity.layoutName}`,r.attachShadow({mode:"open",delegatesFocus:!1}).appendChild(this.iframeContainer),this.container.appendChild(r),this.resizeController.observeMutations(this.container)}getStackByView({name:t}){const e=this.layout.findFirstComponentItemById(t);if(e?.parent&&e?.parent?.isStack)return Ie.wrap(e.parent,this)}getRoot(){return Ie.wrap(this.layout.rootItem,this)}async platformCloseView(t){const e=[...this.viewComponentsByContainerElement.values()].find((e=>e.identity.name===t.name));if(!e)throw new Error(`View with name: ${t.name} not found in layout.`);e.closeView()}async platformCreateView(t,{location:e,targetView:i}={}){if(i)throw new Error("TargetView not supported in web");const n={options:this.platformProvider.normalizeOptions(t),target:this.identity,location:e};return this.insertView(n)}setupStylesheets(){if(this.container.setAttribute("data-openfin-layout-name",this.identity.layoutName),this.stylesheet=new CSSStyleSheet,this.stylesheet.insertRule(".lm_close { display: none; }"),document.adoptedStyleSheets.push(this.stylesheet),this.initialConfig.settings?.preventSplitterResize){const t=`\n [data-openfin-layout-name='${this.identity.layoutName}'] .lm_splitter {\n pointer-events: none;\n }`;this.stylesheet.insertRule(t)}}insertView({options:t,location:e,targetView:i}){const n=e?this.layoutContentCache.getItemOrUndefined(e.id):void 0,o=i?this.layoutContentCache.getItemOrUndefined(i.name):void 0,s=n??o??Ie.wrap(this.layout.rootItem,this);let r;if(ee.isStack(s.raw))r=s.raw;else{if(!we(s.raw))throw new Error("Cannot add a view at the requested location");r=s.raw.newItem({type:"stack",content:[]})}const a=Math.min(r.contentItems.length,e?.index??r.contentItems.length);let l=this.layout.findFirstComponentItemById(t.name);l?(l.parent&&l.parent.removeChild(l,!0),r.addChild(l,a)):l=r.newComponent("view",t,t.title??t.url??"Default Title",a);const h=l.component.identity;return Promise.resolve({identity:h})}replaceView({viewToReplace:t,newView:e}){throw new Error("Method not implemented.")}replaceLayout(t){throw new Error("Method not implemented.")}async cleanupView(t){}applyPreset(t){throw new Error("Method not implemented.")}getCurrentViews(){return[...this.viewComponentsByContainerElement.values()].map((t=>t.identity))}async getFrameSnapshot(){return Ee(xt.fromResolved(this.layout.toConfig()))}isVisible(){return W(this.container)}async onViewDetached({viewIdentity:t}){this.reparentingViews.add(t.name),this.platformCloseView(t)}async destroy(){this.goldenLayoutDestroyed||(this.goldenLayoutDestroyed=!0,this.layout.destroy()),this.iframeContainer.remove(),this.resizeController.destroy(),document.adoptedStyleSheets=document.adoptedStyleSheets.filter((t=>t!==this.stylesheet)),this.viewComponentsByContainerElement.clear()}setupListeners(){this.container.addEventListener("pointerdown",(t=>{if(t.target instanceof HTMLElement){const e=t.target.classList;["lm_tab","lm_title","lm_splitter","lm_drag_handle"].some((t=>e.contains(t)))&&(this.handleDragStart(),2===t.button&&t.stopPropagation())}}),!0),document.addEventListener("pointerup",(()=>this.handleDragEnd()),!0),this.layout.on("tabCreated",(t=>{const e=t.componentItem.component;t.element.id=`tab-${e.identity.name}`,this.domEmitter.dispatchLocalEvent("tab-created",e.identity)})),this.layout.on("itemCreated",(({target:t})=>{const e=t;if(Gt.isComponentItem(e)){const t=e.component;this.domEmitter.dispatchLocalEvent("container-created",t.identity)}})),this.layout.on("itemDestroyed",(t=>{const e=t.target;if(Gt.isComponentItem(e)){const t=e.component;this.removeViewComponent(t)}})),this.layout.on("itemDropped",(()=>{this.handleDragEnd()}))}handleDragStart(){this.iframeContainer.style.pointerEvents="none"}handleDragEnd(){this.iframeContainer.style.pointerEvents=""}removeViewComponent(t){if(t.config&&!1===t.config[`${de}isClosable`]){const e=[...this.stylesheet.cssRules].findIndex((e=>e.cssText.includes(`#tab-${t.identity.name}`)));this.stylesheet.deleteRule(e)}t.destroy(),this.viewComponentsByContainerElement.delete(t.container.element),this.resizeController.unobserveContainer(t.container.element),this.reparentingViews.has(t.identity.name)?this.reparentingViews.delete(t.identity.name):this.platformProvider.closeView(t.identity.name);0===this.getCurrentViews().length&&(this.goldenLayoutDestroyed||(this.goldenLayoutDestroyed=!0,m.handleLastViewRemoved(this.layoutManager,this.identity)))}}class Pe{constructor(t,e,i,n){this.windowIdentity=t,this.connectConfig=e,this.provider=i,this.fallbackContainer=n}async createLayout(t,e){if(!("container"in t)&&!this.fallbackContainer)throw new Error("Container property is not optional in web");const{layoutName:i}=t,n=t,o=this.provider.initLayoutViews(n),s=n.container??this.fallbackContainer,r={...this.windowIdentity,layoutName:i},a=new Me(r,s,o,this.connectConfig,e,this.provider);m.registerLayout(e,i,a),this.fallbackContainer=null}async getLayoutSnapshot(t){return t.getLayoutSnapshot()}async handleLastViewRemoved(t){}}class Te{static async init(e){const i=e.getFin().InterApplicationBus.Channel,n=await i.create(`custom-frame-${e.me.uuid}`);return n.setDefaultAction((async(t,{target:e,opts:i},o)=>{const s=n.connections.find((t=>t.name===e.name));if(s)return n.dispatch(s,t,{...i,target:e});throw new Error(`Client with name ${e.name} not found`)})),await t.relayChannelClientApi_1(n,"layout-relay"),new Te(e)}constructor(t){this.wire=t,this.viewNames=new Set}normalizeOptions(t,i="default"){const n=this.wire.me.uuid;let{name:o=`internal-generated-view-${e.v4()}`}=t;return o.match(/^internal-generated-view-/)&&this.viewNames.has(o)&&"duplicate"===i&&(o=`internal-generated-view-${e.v4()}`),this.viewNames.add(o),{...t,name:o,uuid:n}}closeView(t){this.viewNames.delete(t)}initLayoutViews({layout:t,multiInstanceViewBehavior:e}){return H((t=>{if("component"===t.type&&t.componentState){const i=this.normalizeOptions(t.componentState,e);return{...t,componentState:i}}return t}),t)}}var Ae;const ke=t=>t;Ae=new WeakMap,exports.WebLayoutEntryPoint=class{constructor(e){Ae.set(this,void 0),this.initLayoutManager=async(e,i,{container:n,layoutManagerOverride:o})=>{const s=await Te.init(i),r=o??ke,a=new Pe(i.me,t.__classPrivateFieldGet(this,Ae,"f"),s,n),l=new(r(m.createClosedConstructor(a)));return await M(i,l),l},this.applyLayoutSnapshot=async(e,i,n)=>{await i.applyLayoutSnapshot(t.__classPrivateFieldGet(this,Ae,"f").platform.layoutSnapshot)},this.createLayout=async(t,e)=>m.createLayout(t,e),this.destroyLayout=async(t,e)=>m.destroyLayout(t,e),t.__classPrivateFieldSet(this,Ae,e,"f")}}; @@ -7340,7 +7340,7 @@ module.exports = stubFalse; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.init = init; -const core_web_1 = __webpack_require__(/*! @openfin/core-web */ "./node_modules/@openfin/core-web/out/api-client.js"); +const core_web_1 = __webpack_require__(/*! @openfin/core-web */ "../../node_modules/@openfin/core-web/out/api-client.js"); const settings_1 = __webpack_require__(/*! ./settings */ "./client/src/platform/settings.ts"); /** * Initializes the OpenFin Web Broker connection. @@ -8387,7 +8387,7 @@ function version(uuid) { /******/ /************************************************************************/ var __webpack_exports__ = {}; -// This entry need to be wrapped in an IIFE because it need to be in strict mode. +// This entry needs to be wrapped in an IIFE because it needs to be in strict mode. (() => { "use strict"; var exports = __webpack_exports__; diff --git a/web/v19.2.0/web-interop/js/fdc3-view.bundle.js.map b/web/v19.2.0/web-interop/js/fdc3-view.bundle.js.map index 07e7120..71c8717 100644 --- a/web/v19.2.0/web-interop/js/fdc3-view.bundle.js.map +++ b/web/v19.2.0/web-interop/js/fdc3-view.bundle.js.map @@ -1 +1 @@ -{"version":3,"file":"fdc3-view.bundle.js","mappings":";;;;;;;;;;AAAa,MAAM,mBAAO,CAAC,iFAAoB,EAAE,mBAAO,CAAC,mDAAS,EAAE,mBAAO,CAAC,+DAAM,EAAE,mBAAO,CAAC,mDAAQ,EAAE,mBAAO,CAAC,gEAAkB,EAAE,mBAAO,CAAC,4DAAgB,EAAE,eAAe;;;;;;;;;;;;ACA9J,MAAM,mBAAO,CAAC,mDAAS,IAAI,mBAAO,CAAC,mDAAQ,IAAI,mBAAO,CAAC,gEAAkB,IAAI,mBAAO,CAAC,4DAAgB,IAAI,mBAAO,CAAC,+DAAM,EAAE,kBAAkB,EAAE,GAAG,wBAAwB,GAAG,sGAAsG,qBAAM,CAAC,qBAAM,iCAAiC,KAAK,KAAK,KAAK,MAAM,oBAAoB,WAAW,kBAAkB,kBAAkB,UAAU,SAAS,sCAAsC,SAAS,sFAAsF,mCAAmC,6BAA6B,GAAG,kCAAkC,6BAA6B,mDAAmD,0CAA0C,yDAAyD,iEAAiE,oFAAoF,2IAA2I,mDAAmD,kDAAkD,oFAAoF,4IAA4I,sDAAsD,sCAAsC,SAAS,sCAAsC,UAAU,QAAQ,eAAe,mNAAmN,UAAU,0BAA0B,SAAS,qBAAqB,SAAS,8BAA8B,sBAAsB,yiB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ACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,cAAc,SAAS;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,2CAA2C,UAAU;AACrD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;ACrJA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEY;;AAEZ,eAAe,mBAAO,CAAC,wDAAW;AAClC,gBAAgB,mBAAO,CAAC,oDAAS;AACjC;AACA;AACA;AACA;;AAEA,cAAc;AACd,kBAAkB;AAClB,yBAAyB;;AAEzB;AACA,kBAAkB;;AAElB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,kBAAkB,YAAY;AAC9B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA,wCAAwC,SAAS;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;;AAEA;AACA;AACA,cAAc,iBAAiB;AAC/B;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,iDAAiD,EAAE;AACnD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C;AAC1C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA,yBAAyB,eAAe;AACxC;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,yBAAyB,QAAQ;AACjC;AACA,sBAAsB,eAAe;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc,YAAY;AAC1B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB,sBAAsB;AACxC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,mBAAmB;AACnB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA,oBAAoB,SAAS;AAC7B;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA,qBAAqB,WAAW,GAAG,IAAI;AACvC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA,gBAAgB,WAAW,GAAG,IAAI,KAAK,aAAa;AACpD;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;;AAEA;AACA,GAAG;AACH;AACA;AACA,mBAAmB,KAAK,mDAAmD,cAAc;AACzF,GAAG;AACH;AACA;AACA,+BAA+B,IAAI;AACnC;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,MAAM,aAAa,SAAS;AACtD;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,SAAS,gBAAgB;AACzB,cAAc,oBAAoB,EAAE,IAAI;AACxC;AACA,YAAY,gBAAgB,EAAE,IAAI;AAClC;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,GAAG,SAAS,GAAG,KAAK,qBAAqB,EAAE,EAAE;AACpE,QAAQ;AACR,yBAAyB,GAAG,KAAK,yBAAyB,EAAE,EAAE;AAC9D,mBAAmB,yBAAyB,EAAE,EAAE;AAChD;AACA,MAAM;AACN,oBAAoB,IAAI,EAAE,GAAG,SAAS,IAAI,EAAE,EAAE;AAC9C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,0CAA0C,cAAc,SAAS,OAAO;AACxE;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,kBAAkB,YAAY;AAC9B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,kBAAkB,gBAAgB;AAClC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,kBAAkB,gBAAgB;AAClC;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,cAAc,YAAY;AAC1B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,QAAQ;AAC1B;AACA,oBAAoB,QAAQ;AAC5B;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;;;;;ACzjEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEa;;AAEb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB;;AAEnB;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,sBAAsB;AACxC;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA,eAAe;AACf;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA,oBAAoB,SAAS;AAC7B;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;;AAEA,kCAAkC,QAAQ;AAC1C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oBAAoB,iBAAiB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,QAAQ;AACR;AACA,uCAAuC,QAAQ;AAC/C;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,OAAO;AACzB;AACA;AACA;;AAEA;AACA,SAAS,yBAAyB;AAClC;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,gBAAgB;AAClC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,8DAA8D,YAAY;AAC1E;AACA,8DAA8D,YAAY;AAC1E;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,qCAAqC,YAAY;AACjD;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;AACA;;;;;;;;;;;AChfA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,SAAS,WAAW;;AAEpB;AACA;AACA;AACA,SAAS,WAAW;;AAEpB;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA,SAAS,WAAW;;AAEpB;AACA;AACA,SAAS,UAAU;;AAEnB;AACA;;;;;;;;;;;ACpFA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,WAAW,mBAAO,CAAC,mDAAS;;AAE5B;AACA;;AAEA;;;;;;;;;;;ACNA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,cAAc,mBAAO,CAAC,yDAAY;AAClC,cAAc,mBAAO,CAAC,yDAAY;AAClC,cAAc,mBAAO,CAAC,yDAAY;;AAElC;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;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,GAAG;AACd,WAAW,SAAS;AACpB;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa,GAAG;AAChB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;AACA,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;;;;;;;;;;ACrKA,eAAe,mBAAO,CAAC,yDAAY;;AAEnC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;;;;;;;;;;AC7BA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,cAAc,mBAAO,CAAC,uDAAW;;AAEjC;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACnBA,aAAa,mBAAO,CAAC,uDAAW;AAChC,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,qBAAqB,mBAAO,CAAC,uEAAmB;;AAEhD;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;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ChC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA,iBAAiB,mBAAO,CAAC,6DAAc;AACvC,eAAe,mBAAO,CAAC,2DAAa;AACpC,eAAe,mBAAO,CAAC,yDAAY;AACnC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;AACA;AACA;AACA,oCAAoC;;AAEpC;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC9CA,aAAa,mBAAO,CAAC,uDAAW;AAChC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,eAAe,mBAAO,CAAC,yDAAY;AACnC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC3DA,kBAAkB,mBAAO,CAAC,iEAAgB;AAC1C,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;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AEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC/GA,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACzFA;AACA,wBAAwB,qBAAM,gBAAgB,qBAAM,IAAI,qBAAM,sBAAsB,qBAAM;;AAE1F;;;;;;;;;;;ACHA,qBAAqB,mBAAO,CAAC,uEAAmB;AAChD,iBAAiB,mBAAO,CAAC,+DAAe;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EAAiB;;AAE5C;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,GAAG;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC7BA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACtBA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACtBA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACzBA,uBAAuB,mBAAO,CAAC,2EAAqB;AACpD,oBAAoB,mBAAO,CAAC,qEAAkB;AAC9C,kBAAkB,mBAAO,CAAC,iEAAgB;AAC1C,kBAAkB,mBAAO,CAAC,iEAAgB;AAC1C,sBAAsB,mBAAO,CAAC,yEAAoB;;AAElD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC5EA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,mBAAmB,mBAAO,CAAC,mEAAiB;AAC5C,kBAAkB,mBAAO,CAAC,iEAAgB;;AAE1C;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACxBA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACdA,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACnBA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACZA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClCA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,GAAG;AAChB;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;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;;;;;;;;;;ACjBA,gBAAgB,mBAAO,CAAC,6DAAc;;AAEtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACdA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,GAAG;AAChB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACbA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACbA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,UAAU,mBAAO,CAAC,iDAAQ;AAC1B,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjCA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;;;;;;;;;;;ACzBA,gBAAgB,mBAAO,CAAC,6DAAc;;AAEtC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,GAAG;AAChB;AACA;AACA;AACA,oBAAoB,QAAQ,IAAI,QAAQ;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,kBAAkB;AAClB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpCA,sBAAsB,mBAAO,CAAC,yEAAoB;AAClD,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA,8BAA8B,mBAAmB;AACjD;AACA;AACA;AACA;AACA;AACA,+CAA+C,mBAAmB;AAClE;AACA;AACA;;AAEA;;;;;;;;;;;ACnCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACzBA,iBAAiB,mBAAO,CAAC,6DAAc;AACvC,eAAe,mBAAO,CAAC,yDAAY;;AAEnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AChCA,WAAW,mBAAO,CAAC,mDAAS;AAC5B,gBAAgB,mBAAO,CAAC,2DAAa;;AAErC;AACA,kBAAkB,KAA0B;;AAE5C;AACA,gCAAgC,QAAa;;AAE7C;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACrCA,kBAAkB,mBAAO,CAAC,iEAAgB;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,kBAAkB;AAClB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClCA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,eAAe,mBAAO,CAAC,yDAAY;;AAEnC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpCA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClCA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC1BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC9BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC5BA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC1BA,uBAAuB,mBAAO,CAAC,2EAAqB;AACpD,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC1BA,oBAAoB,mBAAO,CAAC,qEAAkB;AAC9C,eAAe,mBAAO,CAAC,2DAAa;AACpC,kBAAkB,mBAAO,CAAC,+DAAe;;AAEzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpCA,oBAAoB,mBAAO,CAAC,qEAAkB;AAC9C,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,kBAAkB,mBAAO,CAAC,+DAAe;;AAEzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;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AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,kBAAkB,aAAa;AAC/B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,iEAAe,GAAG;;;;;;;;;;;;;;;ACtNlB,iEAAe,sCAAsC;;;;;;;;;;;;;;;;ACAhB;;AAErC;AACA,OAAO,wDAAQ;AACf;AACA;;AAEA;AACA,gCAAgC;;AAEhC;AACA;AACA;AACA,qBAAqB;;AAErB;AACA,qBAAqB;;AAErB;AACA,qBAAqB;;AAErB;AACA,qBAAqB;AACrB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,iEAAe,KAAK;;;;;;;;;;;;;;;AClCpB,iEAAe,cAAc,EAAE,UAAU,EAAE,eAAe,EAAE,gBAAgB,EAAE,UAAU,GAAG,yCAAyC;;;;;;;;;;;;;;;ACApI;AACA;AACA;AACA;AACA;AACe;AACf;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;AClBA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,mDAAmD;;AAEnD;;AAEA,oBAAoB,gBAAgB;AACpC;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAE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openfin/core-web/out/main-8cad4070.js","webpack://openfin-web--web-interop/./node_modules/@openfin/core-web/out/main-b14f67c9.js","webpack://openfin-web--web-interop/../../node_modules/base64-js/index.js","webpack://openfin-web--web-interop/../../node_modules/buffer/index.js","webpack://openfin-web--web-interop/../../node_modules/events/events.js","webpack://openfin-web--web-interop/../../node_modules/ieee754/index.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_DataView.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_Hash.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_ListCache.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_Map.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_MapCache.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_Promise.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_Set.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_SetCache.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_Stack.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_Symbol.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_Uint8Array.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_WeakMap.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_arrayEach.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_arrayFilter.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_arrayLikeKeys.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_arrayPush.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_arraySome.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_assignValue.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_assocIndexOf.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseAssign.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseAssignIn.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseAssignValue.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseClone.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseCreate.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseGetAllKeys.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseGetTag.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseIsArguments.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseIsEqual.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseIsEqualDeep.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseIsMap.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseIsNative.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseIsSet.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseIsTypedArray.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseKeys.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseKeysIn.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseTimes.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseUnary.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_cacheHas.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_cloneArrayBuffer.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_cloneBuffer.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_cloneDataView.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_cloneRegExp.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_cloneSymbol.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_cloneTypedArray.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_copyArray.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_copyObject.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_copySymbols.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_copySymbolsIn.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_coreJsData.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_defineProperty.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_equalArrays.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_equalByTag.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_equalObjects.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_freeGlobal.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_getAllKeys.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_getAllKeysIn.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_getMapData.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_getNative.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_getPrototype.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_getRawTag.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_getSymbols.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_getSymbolsIn.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_getTag.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_getValue.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_hashClear.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_hashDelete.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_hashGet.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_hashHas.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_hashSet.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_initCloneArray.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_initCloneByTag.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_initCloneObject.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_isIndex.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_isKeyable.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_isMasked.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_isPrototype.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_listCacheClear.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_listCacheDelete.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_listCacheGet.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_listCacheHas.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_listCacheSet.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_mapCacheClear.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_mapCacheDelete.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_mapCacheGet.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_mapCacheHas.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_mapCacheSet.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_mapToArray.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_nativeCreate.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_nativeKeys.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_nativeKeysIn.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_nodeUtil.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_objectToString.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_overArg.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_root.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_setCacheAdd.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_setCacheHas.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_setToArray.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_stackClear.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_stackDelete.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_stackGet.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_stackHas.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_stackSet.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_toSource.js","webpack://openfin-web--web-interop/../../node_modules/lodash/cloneDeep.js","webpack://openfin-web--web-interop/../../node_modules/lodash/eq.js","webpack://openfin-web--web-interop/../../node_modules/lodash/isArguments.js","webpack://openfin-web--web-interop/../../node_modules/lodash/isArray.js","webpack://openfin-web--web-interop/../../node_modules/lodash/isArrayLike.js","webpack://openfin-web--web-interop/../../node_modules/lodash/isBuffer.js","webpack://openfin-web--web-interop/../../node_modules/lodash/isEqual.js","webpack://openfin-web--web-interop/../../node_modules/lodash/isFunction.js","webpack://openfin-web--web-interop/../../node_modules/lodash/isLength.js","webpack://openfin-web--web-interop/../../node_modules/lodash/isMap.js","webpack://openfin-web--web-interop/../../node_modules/lodash/isObject.js","webpack://openfin-web--web-interop/../../node_modules/lodash/isObjectLike.js","webpack://openfin-web--web-interop/../../node_modules/lodash/isSet.js","webpack://openfin-web--web-interop/../../node_modules/lodash/isTypedArray.js","webpack://openfin-web--web-interop/../../node_modules/lodash/keys.js","webpack://openfin-web--web-interop/../../node_modules/lodash/keysIn.js","webpack://openfin-web--web-interop/../../node_modules/lodash/stubArray.js","webpack://openfin-web--web-interop/../../node_modules/lodash/stubFalse.js","webpack://openfin-web--web-interop/./client/src/platform/api.ts","webpack://openfin-web--web-interop/./client/src/platform/settings.ts","webpack://openfin-web--web-interop/../../node_modules/uuid/dist/esm-browser/index.js","webpack://openfin-web--web-interop/../../node_modules/uuid/dist/esm-browser/md5.js","webpack://openfin-web--web-interop/../../node_modules/uuid/dist/esm-browser/nil.js","webpack://openfin-web--web-interop/../../node_modules/uuid/dist/esm-browser/parse.js","webpack://openfin-web--web-interop/../../node_modules/uuid/dist/esm-browser/regex.js","webpack://openfin-web--web-interop/../../node_modules/uuid/dist/esm-browser/rng.js","webpack://openfin-web--web-interop/../../node_modules/uuid/dist/esm-browser/sha1.js","webpack://openfin-web--web-interop/../../node_modules/uuid/dist/esm-browser/stringify.js","webpack://openfin-web--web-interop/../../node_modules/uuid/dist/esm-browser/v1.js","webpack://openfin-web--web-interop/../../node_modules/uuid/dist/esm-browser/v3.js","webpack://openfin-web--web-interop/../../node_modules/uuid/dist/esm-browser/v35.js","webpack://openfin-web--web-interop/../../node_modules/uuid/dist/esm-browser/v4.js","webpack://openfin-web--web-interop/../../node_modules/uuid/dist/esm-browser/v5.js","webpack://openfin-web--web-interop/../../node_modules/uuid/dist/esm-browser/validate.js","webpack://openfin-web--web-interop/../../node_modules/uuid/dist/esm-browser/version.js","webpack://openfin-web--web-interop/webpack/bootstrap","webpack://openfin-web--web-interop/webpack/runtime/define property getters","webpack://openfin-web--web-interop/webpack/runtime/global","webpack://openfin-web--web-interop/webpack/runtime/hasOwnProperty shorthand","webpack://openfin-web--web-interop/webpack/runtime/make namespace object","webpack://openfin-web--web-interop/webpack/runtime/node module decorator","webpack://openfin-web--web-interop/./client/src/content/fdc3-view.ts"],"sourcesContent":["\"use strict\";var e=require(\"./main-8cad4070.js\");require(\"buffer/\"),require(\"uuid\"),require(\"events\"),require(\"lodash/cloneDeep\"),require(\"lodash/isEqual\"),exports.connect=e.connect;\n","\"use strict\";var e=require(\"buffer/\"),t=require(\"events\"),n=require(\"lodash/cloneDeep\"),i=require(\"lodash/isEqual\"),r=require(\"uuid\");const o=(e,t)=>`${t}<${btoa(JSON.stringify(e))}>`;var s=\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof window?window:\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:{},a={},c={},d={},h={};async function l(e){const t=[];for(const n of e){const e=await n();t.push(e)}return t}Object.defineProperty(h,\"__esModule\",{value:!0}),h.promiseMapSerial=h.serial=h.promiseMap=h.promisify=void 0,h.promisify=function(e){return(...t)=>new Promise(((n,i)=>{e(...t,((e,t)=>e?i(e):n(t)))}))},h.promiseMap=async function(e,t){return Promise.all(e.map(t))},h.serial=l,h.promiseMapSerial=async function(e,t){return l(e.map(((e,n,i)=>()=>t(e,n,i))))};var u,p=s&&s.__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},w=s&&s.__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)};Object.defineProperty(d,\"__esModule\",{value:!0}),d.Reply=d.EmitterBase=d.Base=void 0;const y=h;class f{constructor(e){this.isNodeEnvironment=()=>\"node\"===this.wire.environment.type,this.isOpenFinEnvironment=()=>\"openfin\"===this.wire.environment.type,this.isBrowserEnvironment=()=>\"other\"===this.wire.environment.type,this.wire=e}get fin(){return this.wire.getFin()}get me(){return this.wire.me}}d.Base=f;d.EmitterBase=class extends f{constructor(e,t,...n){super(e),this.topic=t,u.set(this,void 0),this.eventNames=()=>this.hasEmitter()?this.getOrCreateEmitter().eventNames():[],this.emit=(e,t,...n)=>!!this.hasEmitter()&&this.getOrCreateEmitter().emit(e,t,...n),this.hasEmitter=()=>this.wire.eventAggregator.has(w(this,u,\"f\")),this.getOrCreateEmitter=()=>this.wire.eventAggregator.getOrCreate(w(this,u,\"f\")),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[],this.listenerCount=e=>this.hasEmitter()?this.getOrCreateEmitter().listenerCount(e):0,this.registerEventListener=async(e,t={},n,i)=>{const r={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e},o=this.getOrCreateEmitter();n(o);try{await this.wire.sendAction(\"subscribe-to-desktop-event\",r)}catch(e){throw i(o),this.deleteEmitterIfNothingRegistered(o),e}},this.deregisterEventListener=async(e,t={})=>{if(this.hasEmitter()){const n={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e};await this.wire.sendAction(\"unsubscribe-to-desktop-event\",n).catch((()=>null));return this.getOrCreateEmitter()}return Promise.resolve()},p(this,u,[t,...n],\"f\"),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[]}async on(e,t,n){return await this.registerEventListener(e,n,(n=>{n.on(e,t)}),(n=>{n.removeListener(e,t)})),this}async addListener(e,t,n){return this.on(e,t,n)}async once(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.once(e,i),n.once(e,t)}),(n=>{n.removeListener(e,i),n.removeListener(e,t)})),this}async prependListener(e,t,n){return await this.registerEventListener(e,n,(n=>{n.prependListener(e,t)}),(n=>{n.removeListener(e,t)})),this}async prependOnceListener(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.prependOnceListener(e,t),n.once(e,i)}),(n=>{n.removeListener(e,t),n.removeListener(e,i)})),this}async removeListener(e,t,n){const i=await this.deregisterEventListener(e,n);return i&&(i.removeListener(e,t),this.deleteEmitterIfNothingRegistered(i)),this}async deregisterAllListeners(e){const t={...this.identity,type:e,topic:this.topic};if(this.hasEmitter()){const e=this.getOrCreateEmitter(),n=e.listenerCount(t.type),i=[];for(let e=0;enull)));return await Promise.all(i),e}}async removeAllListeners(e){const t=async e=>{const t=await this.deregisterAllListeners(e);t&&(t.removeAllListeners(e),this.deleteEmitterIfNothingRegistered(t))};if(e)await t(e);else if(this.hasEmitter()){const e=this.getOrCreateEmitter().eventNames();await(0,y.promiseMap)(e,t)}return this}deleteEmitterIfNothingRegistered(e){0===e.eventNames().length&&this.wire.eventAggregator.delete(w(this,u,\"f\"))}},u=new WeakMap;d.Reply=class{};var g={};Object.defineProperty(g,\"__esModule\",{value:!0});var m=g.RuntimeError=g.NotSupportedError=g.NotImplementedError=g.NoAckError=g.DuplicateCorrelationError=g.UnexpectedActionError=g.DisconnectedError=void 0;class v extends Error{constructor(e){super(`Expected websocket state OPEN but found ${e}`),this.readyState=e}}g.DisconnectedError=v;class C extends Error{}g.UnexpectedActionError=C;class b extends Error{}g.DuplicateCorrelationError=b;class I extends Error{}g.NoAckError=I;class E extends Error{}g.NotImplementedError=E;class x extends Error{}g.NotSupportedError=x;class A extends Error{constructor(e){const{message:t,name:n,stack:i,...r}=e;super(t),this.name=n||\"Error\",this.stack=i??this.toString(),Object.keys(r).forEach((e=>{this[e]=r[e]}))}}class P extends Error{static getCallSite(e=0){const t=Error.stackTraceLimit,n=e+1;Error.stackTraceLimit=t+n;const i=Error.prepareStackTrace;Error.prepareStackTrace=(e,t)=>t;const r=(new Error).stack?.slice(n)??[];return Error.prepareStackTrace=i,Error.stackTraceLimit=t,r}static prepareStackTrace(e,t){if(\"function\"==typeof Error.prepareStackTrace)return Error.prepareStackTrace(e,t);let n=\"\";n+=e.name||\"Error\",n+=`: ${e.message||\"\"}`;for(const e of t)n+=`\\n at ${e.toString()}`;return n}constructor(e,t){const{reason:n,error:i}=e;super(n),this.name=\"RuntimeError\",i?.stack&&(this.cause=new A(i)),t&&(this.stack=P.prepareStackTrace(this,t))}}m=g.RuntimeError=P;var M={},_={},O={};Object.defineProperty(O,\"__esModule\",{value:!0}),O.validateIdentity=void 0,O.validateIdentity=function(e){let t;return\"object\"==typeof e&&\"string\"==typeof e.uuid||(t=\"Not a valid identity object\"),t};var S={},R={},F={},j={},k={},L={},T={};Object.defineProperty(T,\"__esModule\",{value:!0}),T.handleDeprecatedWarnings=void 0;var $;T.handleDeprecatedWarnings=e=>{(e.contentNavigation?.whitelist||e.contentNavigation?.blacklist||e.contentRedirect?.whitelist||e.contentRedirect?.blacklist)&&console.warn(\"The properties 'whitelist' and 'blacklist' have been marked as deprecated and will be removed in a future version. Please use 'allowlist' and 'denylist'.\")};var B={},G={};Object.defineProperty(G,\"__esModule\",{value:!0}),G.AsyncRetryableLazy=W=G.Lazy=void 0;var W=G.Lazy=class{constructor(e){this.producerFn=e}getValue(){return this.value||(this.value=this.producerFn()),this.value}};G.AsyncRetryableLazy=class{constructor(e){this.producerFn=e}async getValue(){return this.promise||(this.promise=this.producerFn().catch((e=>{throw delete this.promise,e}))),this.promise}};var H={};Object.defineProperty(H,\"__esModule\",{value:!0}),H.WebContents=void 0;const N=d;class D extends N.EmitterBase{constructor(e,t,n){super(e,n,t.uuid,t.name),this.identity=t,this.entityType=n}capturePage(e){return this.wire.sendAction(\"capture-page\",{options:e,...this.identity}).then((({payload:e})=>e.data))}executeJavaScript(e){return this.wire.sendAction(\"execute-javascript-in-window\",{...this.identity,code:e}).then((({payload:e})=>e.data))}getZoomLevel(){return this.wire.sendAction(\"get-zoom-level\",this.identity).then((({payload:e})=>e.data))}setZoomLevel(e){return this.wire.sendAction(\"set-zoom-level\",{...this.identity,level:e}).then((()=>{}))}navigate(e){return this.wire.sendAction(\"navigate-window\",{...this.identity,url:e}).then((()=>{}))}navigateBack(){return this.wire.sendAction(\"navigate-window-back\",{...this.identity}).then((()=>{}))}async navigateForward(){await this.wire.sendAction(\"navigate-window-forward\",{...this.identity})}stopNavigation(){return this.wire.sendAction(\"stop-window-navigation\",{...this.identity}).then((()=>{}))}reload(e=!1){return this.wire.sendAction(\"reload-window\",{ignoreCache:e,...this.identity}).then((()=>{}))}print(e={}){return this.wire.sendAction(\"print\",{...this.identity,options:e}).then((()=>{}))}findInPage(e,t){return this.wire.sendAction(\"find-in-page\",{...this.identity,searchTerm:e,options:t}).then((({payload:e})=>e.data))}stopFindInPage(e){return this.wire.sendAction(\"stop-find-in-page\",{...this.identity,action:e}).then((()=>{}))}getPrinters(){return this.wire.sendAction(\"get-printers\",{...this.identity}).then((({payload:e})=>e.data))}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){await this.wire.sendAction(\"focus-window\",{emitSynthFocused:e,...this.identity})}async showDeveloperTools(){await this.wire.sendAction(\"show-developer-tools\",this.identity)}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction(\"get-process-info\",this.identity);return e}async getSharedWorkers(){return this.wire.sendAction(\"get-shared-workers\",this.identity).then((({payload:e})=>e.data))}async inspectSharedWorker(){await this.wire.sendAction(\"inspect-shared-worker\",{...this.identity})}async inspectSharedWorkerById(e){await this.wire.sendAction(\"inspect-shared-worker-by-id\",{...this.identity,workerId:e})}async inspectServiceWorker(){await this.wire.sendAction(\"inspect-service-worker\",{...this.identity})}async showPopupWindow(e){if(this.wire.sendAction(`${this.entityType}-show-popup-window`,this.identity).catch((()=>{})),e?.onPopupReady){const t=async({popupName:t})=>{try{const n=this.fin.Window.wrapSync({uuid:this.fin.me.uuid,name:t});await e.onPopupReady(n)}catch(e){throw new Error(`Something went wrong during onPopupReady execution: ${e}`)}};await this.once(\"popup-ready\",t)}const{payload:t}=await this.wire.sendAction(\"try-create-popup-window\",{options:{...e,hasResultCallback:!!e?.onPopupResult,hasReadyCallback:!!e?.onPopupReady},...this.identity}),{data:{willOpen:n,options:i}}=t;n&&await this.fin.Window.create(i.initialOptions);if(e?.onPopupResult){const t=async t=>{await e.onPopupResult((e=>{const{name:t,uuid:n,result:i,data:r}=e,o={identity:{name:t,uuid:n},result:i};return r&&(o.data=r),o})(t))},n=async()=>{await this.removeListener(\"popup-result\",t)};await this.on(\"popup-result\",t),await this.once(\"popup-teardown\",n)}const{payload:r}=await this.wire.sendAction(\"show-popup-window\",{options:i,...this.identity});return r.data}}var U,V,z,K,q;function J(){return V||(V=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(function(){if($)return L;$=1,Object.defineProperty(L,\"__esModule\",{value:!0}),L.ViewModule=void 0;const e=d,t=O,n=J(),i=T;class r extends e.Base{async create(e){const{uuid:t}=this.wire.me;if(!e.name||\"string\"!=typeof e.name)throw new Error(\"Please provide a name property as a string in order to create a View.\");return(0,i.handleDeprecatedWarnings)(e),this.wire.environment.childViews?await this.wire.environment.createChildContent({entityType:\"view\",options:{...e,uuid:t}}):await this.wire.sendAction(\"create-view\",{...e,uuid:t}),this.wrapSync({uuid:t,name:e.name})}async wrap(e){this.wire.sendAction(\"view-wrap\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}wrapSync(e){this.wire.sendAction(\"view-wrap-sync\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}getCurrent(){if(this.wire.sendAction(\"view-get-current\").catch((e=>{})),!this.wire.me.isView)throw new Error(\"You are not in a View context\");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction(\"view-get-current-sync\").catch((e=>{})),!this.wire.me.isView)throw new Error(\"You are not in a View context\");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return L.ViewModule=r,L}(),e),n(function(){if(U)return B;var e;U=1,Object.defineProperty(B,\"__esModule\",{value:!0}),B.View=void 0;const t=g,n=G,i=H,r=ie();class o extends i.WebContents{constructor(i,o){super(i,o,\"view\"),this.identity=o,e.set(this,new n.Lazy((()=>this.fin.Platform.wrapSync(this.identity).getClient()))),this.attach=async e=>{await this.wire.sendAction(\"attach-view\",{target:e,...this.identity})},this.destroy=async()=>{await this.wire.sendAction(\"destroy-view\",{...this.identity})},this.show=async()=>{await this.wire.sendAction(\"show-view\",{...this.identity})},this.showAt=async(e,t={})=>{await this.wire.sendAction(\"show-view-at\",{bounds:e,...this.identity,options:t})},this.bringToFront=async()=>{await this.wire.sendAction(\"bring-view-to-front\",{...this.identity})},this.hide=async()=>{await this.wire.sendAction(\"hide-view\",{...this.identity})},this.setBounds=async e=>{await this.wire.sendAction(\"set-view-bounds\",{bounds:e,...this.identity})},this.getBounds=async()=>(await this.wire.sendAction(\"get-view-bounds\",{...this.identity})).payload.data,this.getInfo=async()=>(await this.wire.sendAction(\"get-view-info\",{...this.identity})).payload.data,this.getParentLayout=async()=>(this.wire.sendAction(\"view-get-parent-layout\",{...this.identity}).catch((()=>{})),this.fin.Platform.Layout.getLayoutByViewIdentity(this.identity)),this.getOptions=async()=>this.wire.sendAction(\"get-view-options\",{...this.identity}).then((({payload:e})=>e.data)),this.updateOptions=async e=>this.wire.sendAction(\"update-view-options\",{options:e,...this.identity}).then((()=>{})),this.getCurrentWindow=async()=>{const{payload:{data:e}}=await this.wire.sendAction(\"get-view-window\",{...this.identity});return new r._Window(this.wire,e)},this.getCurrentStack=async()=>{this.wire.sendAction(\"view-get-current-stack\").catch((()=>{}));try{return(await this.getParentLayout()).getStackByViewIdentity(this.identity)}catch(e){throw new t.RuntimeError({reason:\"This view does not belong to a stack.\",error:e})}},this.triggerBeforeUnload=async()=>(await this.wire.sendAction(\"trigger-before-unload\",{...this.identity})).payload.data,this.bindToElement=async e=>{if(!e)throw new Error(\"Element not found.\");return this.wire.environment.observeBounds(e,(async e=>this.setBounds(e)))}}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){const t=await this.getCurrentWindow();await t.focusedWebViewWasChanged(),await super.focus({emitSynthFocused:e})}}return B.View=o,e=new WeakMap,B}(),e)}(k)),k}function Y(){if(z)return j;z=1,Object.defineProperty(j,\"__esModule\",{value:!0}),j.Application=void 0;const e=d,t=ie(),n=J();class i extends e.EmitterBase{constructor(e,n){super(e,\"application\",n.uuid),this.identity=n,this.window=new t._Window(this.wire,{uuid:this.identity.uuid,name:this.identity.uuid})}windowListFromIdentityList(e){const n=[];return e.forEach((e=>{n.push(new t._Window(this.wire,{uuid:e.uuid,name:e.name}))})),n}isRunning(){return this.wire.sendAction(\"is-application-running\",this.identity).then((({payload:e})=>e.data))}async quit(e=!1){try{await this._close(e),await this.wire.sendAction(\"destroy-application\",{force:e,...this.identity})}catch(e){if(![\"Remote connection has closed\",\"Could not locate the requested application\"].some((t=>e.message.includes(t))))throw e}}async _close(e=!1){try{await this.wire.sendAction(\"close-application\",{force:e,...this.identity})}catch(e){if(!e.message.includes(\"Remote connection has closed\"))throw e}}close(e=!1){return console.warn(\"Deprecation Warning: Application.close is deprecated Please use Application.quit\"),this.wire.sendAction(\"application-close\",this.identity).catch((e=>{})),this._close(e)}getChildWindows(){return this.wire.sendAction(\"get-child-windows\",this.identity).then((({payload:e})=>{const t=[];return e.data.forEach((e=>{t.push({uuid:this.identity.uuid,name:e})})),this.windowListFromIdentityList(t)}))}getManifest(){return this.wire.sendAction(\"get-application-manifest\",this.identity).then((({payload:e})=>e.data))}getParentUuid(){return this.wire.sendAction(\"get-parent-application\",this.identity).then((({payload:e})=>e.data))}getShortcuts(){return this.wire.sendAction(\"get-shortcuts\",this.identity).then((({payload:e})=>e.data))}async getViews(){const{payload:e}=await this.wire.sendAction(\"application-get-views\",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}getZoomLevel(){return this.wire.sendAction(\"get-application-zoom-level\",this.identity).then((({payload:e})=>e.data))}getWindow(){return this.wire.sendAction(\"application-get-window\",this.identity).catch((e=>{})),Promise.resolve(this.window)}registerUser(e,t){return this.wire.sendAction(\"register-user\",{userName:e,appName:t,...this.identity}).then((()=>{}))}removeTrayIcon(){return this.wire.sendAction(\"remove-tray-icon\",this.identity).then((()=>{}))}restart(){return this.wire.sendAction(\"restart-application\",this.identity).then((()=>{}))}run(){return console.warn(\"Deprecation Warning: Application.run is deprecated Please use fin.Application.start\"),this.wire.sendAction(\"application-run\",this.identity).catch((e=>{})),this._run()}_run(e={}){return this.wire.sendAction(\"run-application\",{manifestUrl:this._manifestUrl,opts:e,...this.identity}).then((()=>{}))}scheduleRestart(){return this.wire.sendAction(\"relaunch-on-close\",this.identity).then((()=>{}))}async sendApplicationLog(){const{payload:e}=await this.wire.sendAction(\"send-application-log\",this.identity);return e.data}async setJumpList(e){await this.wire.sendAction(\"set-jump-list\",{config:e,...this.identity})}setTrayIcon(e){return this.wire.sendAction(\"set-tray-icon\",{enabledIcon:e,...this.identity}).then((()=>{}))}setShortcuts(e){return this.wire.sendAction(\"set-shortcuts\",{data:e,...this.identity}).then((()=>{}))}async setShortcutQueryParams(e){await this.wire.sendAction(\"set-shortcut-query-args\",{data:e,...this.identity})}setZoomLevel(e){return this.wire.sendAction(\"set-application-zoom-level\",{level:e,...this.identity}).then((()=>{}))}async setAppLogUsername(e){await this.wire.sendAction(\"set-app-log-username\",{data:e,...this.identity})}getTrayIconInfo(){return this.wire.sendAction(\"get-tray-icon-info\",this.identity).then((({payload:e})=>e.data))}hasTrayIcon(){return this.wire.sendAction(\"has-tray-icon\",this.identity).then((({payload:e})=>e.data))}terminate(){return this.wire.sendAction(\"terminate-application\",this.identity).then((()=>{}))}wait(){return this.wire.sendAction(\"wait-for-hung-application\",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction(\"get-info\",this.identity).then((({payload:e})=>e.data))}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction(\"application-get-process-info\",this.identity);return e}async setFileDownloadLocation(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t};await this.wire.sendAction(\"set-file-download-location\",{...n,downloadLocation:e})}async getFileDownloadLocation(){const{payload:{data:e}}=await this.wire.sendAction(\"get-file-download-location\",this.identity);return e}async showTrayIconPopupMenu(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t},{payload:i}=await this.wire.sendAction(\"show-tray-icon-popup-menu\",{...n,options:e});return i.data}async closeTrayIconPopupMenu(){const{name:e}=this.wire.me,t={uuid:this.identity.uuid,name:e};await this.wire.sendAction(\"close-tray-icon-popup-menu\",{...t})}}return j.Application=i,j}function Z(){return q||(q=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(function(){if(K)return F;K=1,Object.defineProperty(F,\"__esModule\",{value:!0}),F.ApplicationModule=void 0;const e=d,t=O,n=Y();class i extends e.Base{async wrap(e){this.wire.sendAction(\"wrap-application\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}wrapSync(e){this.wire.sendAction(\"wrap-application-sync\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}async _create(e){return void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&void 0===e.isPlatformController&&(e.autoShow=!0),await this.wire.sendAction(\"create-application\",e),this.wrap({uuid:e.uuid})}create(e){return console.warn(\"Deprecation Warning: fin.Application.create is deprecated. Please use fin.Application.start\"),this.wire.sendAction(\"application-create\").catch((e=>{})),this._create(e)}async start(e){this.wire.sendAction(\"start-application\").catch((e=>{}));const t=await this._create(e);return await this.wire.sendAction(\"run-application\",{uuid:e.uuid}),t}async startManyManifests(e,t){return this.wire.sendAction(\"run-applications\",{applications:e,opts:t}).then((()=>{}))}getCurrent(){return this.wire.sendAction(\"get-current-application\").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction(\"get-current-application-sync\").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}async startFromManifest(e,t){this.wire.sendAction(\"application-start-from-manifest\").catch((e=>{}));const n=await this._createFromManifest(e);return await n._run(t),n}createFromManifest(e){return console.warn(\"Deprecation Warning: fin.Application.createFromManifest is deprecated. Please use fin.Application.startFromManifest\"),this.wire.sendAction(\"application-create-from-manifest\").catch((e=>{})),this._createFromManifest(e)}_createFromManifest(e){return this.wire.sendAction(\"get-application-manifest\",{manifestUrl:e}).then((({payload:e})=>{const t=e.data.platform?e.data.platform.uuid:e.data.startup_app.uuid;return this.wrap({uuid:t})})).then((t=>(t._manifestUrl=e,t)))}}return F.ApplicationModule=i,F}(),e),n(Y(),e)}(R)),R}H.WebContents=D;var Q={};Object.defineProperty(Q,\"__esModule\",{value:!0}),Q.promisifySubscription=void 0;var X,ee,te;function ne(){if(X)return S;X=1,Object.defineProperty(S,\"__esModule\",{value:!0}),S._Window=void 0;const e=Z(),t=H,n=J(),i=T,r=Q;class o extends t.WebContents{constructor(e,t){super(e,t,\"window\")}async createWindow(e){this.wire.sendAction(\"window-create-window\",this.identity).catch((e=>{}));const t=await(0,r.promisifySubscription)(this,\"fire-constructor-callback\");void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&(e.autoShow=!0),(0,i.handleDeprecatedWarnings)(e);const n=this.wire.environment.createChildContent({entityType:\"window\",options:e}),[o]=await Promise.all([t.getValue(),n]);let s;const{success:a}=o,c=o.data,{message:d}=c;s=a?{httpResponseCode:c.httpResponseCode,apiInjected:c.apiInjected}:{message:c.message,networkErrorCode:c.networkErrorCode,stack:c.stack};const h={message:d,cbPayload:s,success:a};try{this.getWebWindow().fin.__internal_.openerSuccessCBCalled()}catch(e){}return h.success?this:Promise.reject(h)}getAllFrames(){return this.wire.sendAction(\"get-all-frames\",this.identity).then((({payload:e})=>e.data))}getBounds(){return this.wire.sendAction(\"get-window-bounds\",this.identity).then((({payload:e})=>e.data))}center(){return this.wire.sendAction(\"center-window\",this.identity).then((()=>{}))}blur(){return this.wire.sendAction(\"blur-window\",this.identity).then((()=>{}))}bringToFront(){return this.wire.sendAction(\"bring-window-to-front\",this.identity).then((()=>{}))}animate(e,t){return this.wire.sendAction(\"animate-window\",{transitions:e,options:t,...this.identity}).then((()=>{}))}hide(){return this.wire.sendAction(\"hide-window\",this.identity).then((()=>{}))}close(e=!1){return this.wire.sendAction(\"close-window\",{force:e,...this.identity}).then((()=>{Object.setPrototypeOf(this,null)}))}focusedWebViewWasChanged(){return this.wire.sendAction(\"focused-webview-changed\",this.identity).then((()=>{}))}getNativeId(){return this.wire.sendAction(\"get-window-native-id\",this.identity).then((({payload:e})=>e.data))}async getCurrentViews(){const{payload:e}=await this.wire.sendAction(\"window-get-views\",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}disableFrame(){return console.warn(\"Function is deprecated; use disableUserMovement instead.\"),this.wire.sendAction(\"disable-window-frame\",this.identity).then((()=>{}))}disableUserMovement(){return this.wire.sendAction(\"disable-window-frame\",this.identity).then((()=>{}))}enableFrame(){return console.warn(\"Function is deprecated; use enableUserMovement instead.\"),this.wire.sendAction(\"enable-window-frame\",this.identity).then((()=>{}))}enableUserMovement(){return this.wire.sendAction(\"enable-window-frame\",this.identity).then((()=>{}))}flash(){return this.wire.sendAction(\"flash-window\",this.identity).then((()=>{}))}stopFlashing(){return this.wire.sendAction(\"stop-flash-window\",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction(\"get-window-info\",this.identity).then((({payload:e})=>e.data))}async getLayout(e){this.wire.sendAction(\"window-get-layout\",this.identity).catch((e=>{}));const t=await this.getOptions();if(!t.layout&&!t.layoutSnapshot)throw new Error(\"Window does not have a Layout\");return this.fin.Platform.Layout.wrap(e??this.identity)}getOptions(){return this.wire.sendAction(\"get-window-options\",this.identity).then((({payload:e})=>e.data))}getParentApplication(){return this.wire.sendAction(\"window-get-parent-application\",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity))}getParentWindow(){return this.wire.sendAction(\"window-get-parent-window\",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity)).then((e=>e.getWindow()))}async getSnapshot(e){const t={area:e,...this.identity};console.warn(\"Window.getSnapshot has been deprecated, please use Window.capturePage\");return(await this.wire.sendAction(\"get-window-snapshot\",t)).payload.data}getState(){return this.wire.sendAction(\"get-window-state\",this.identity).then((({payload:e})=>e.data))}getWebWindow(){return this.wire.sendAction(\"window-get-web-window\",this.identity).catch((e=>{})),this.wire.environment.getWebWindow(this.identity)}isMainWindow(){return this.wire.sendAction(\"window-is-main-window\",this.identity).catch((e=>{})),this.me.uuid===this.me.name}isShowing(){return this.wire.sendAction(\"is-window-showing\",this.identity).then((({payload:e})=>e.data))}maximize(){return this.wire.sendAction(\"maximize-window\",this.identity).then((()=>{}))}minimize(){return this.wire.sendAction(\"minimize-window\",this.identity).then((()=>{}))}moveBy(e,t,n){return this.wire.sendAction(\"move-window-by\",{deltaLeft:e,deltaTop:t,positioningOptions:n,...this.identity}).then((()=>{}))}moveTo(e,t,n){return this.wire.sendAction(\"move-window\",{left:e,top:t,positioningOptions:n,...this.identity}).then((()=>{}))}resizeBy(e,t,n,i){return this.wire.sendAction(\"resize-window-by\",{deltaWidth:Math.floor(e),deltaHeight:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}resizeTo(e,t,n,i){return this.wire.sendAction(\"resize-window\",{width:Math.floor(e),height:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}restore(){return this.wire.sendAction(\"restore-window\",this.identity).then((()=>{}))}setAsForeground(){return this.wire.sendAction(\"set-foreground-window\",this.identity).then((()=>{}))}setBounds(e,t){return this.wire.sendAction(\"set-window-bounds\",{...e,...this.identity,positioningOptions:t}).then((()=>{}))}show(e=!1){return this.wire.sendAction(\"show-window\",{force:e,...this.identity}).then((()=>{}))}showAt(e,t,n=!1){return this.wire.sendAction(\"show-at-window\",{force:n,left:Math.floor(e),top:Math.floor(t),...this.identity}).then((()=>{}))}updateOptions(e){return this.wire.sendAction(\"update-window-options\",{options:e,...this.identity}).then((()=>{}))}authenticate(e,t){return this.wire.sendAction(\"window-authenticate\",{userName:e,password:t,...this.identity}).then((()=>{}))}async showPopupMenu(e){const{payload:t}=await this.wire.sendAction(\"show-popup-menu\",{options:e,...this.identity});return t.data}async closePopupMenu(){return this.wire.sendAction(\"close-popup-menu\",{...this.identity}).then((()=>{}))}async dispatchPopupResult(e){this.wire.sendAction(\"window-dispatch-popup-result\",this.identity).catch((e=>{})),await this.wire.sendAction(\"dispatch-popup-result\",{data:e,...this.identity})}async print(e={content:\"self\"}){switch(e.content){case void 0:case\"self\":return super.print(e);case\"screenshot\":return this.wire.sendAction(\"print-screenshot\",this.identity).then((()=>{}));case\"views\":return this.wire.sendAction(\"print-views\",{...this.identity,options:e}).then((()=>{}));default:return}}}return S._Window=o,S}function ie(){return te||(te=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(function(){if(ee)return _;ee=1,Object.defineProperty(_,\"__esModule\",{value:!0}),_._WindowModule=void 0;const e=d,t=O,n=ne();class i extends e.Base{async wrap(e){this.wire.sendAction(\"window-wrap\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}wrapSync(e){this.wire.sendAction(\"window-wrap-sync\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}create(e){return this.wire.sendAction(\"create-window\").catch((e=>{})),new n._Window(this.wire,{uuid:this.me.uuid,name:e.name}).createWindow(e)}getCurrent(){if(this.wire.sendAction(\"get-current-window\").catch((e=>{})),!this.wire.me.isWindow)throw new Error(\"You are not in a Window context\");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction(\"get-current-window-sync\").catch((e=>{})),!this.wire.me.isWindow)throw new Error(\"You are not in a Window context\");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return _._WindowModule=i,_}(),e),n(ne(),e)}(M)),M}Q.promisifySubscription=async(e,t,n=(()=>!0),i)=>{let r,o,s;const a=new Promise(((e,t)=>{r=e,o=t})),c=e=>{n(e)&&(clearTimeout(s),r(e))};return await e.on(t,c),i&&(s=setTimeout((()=>o(new Error(\"event timed out\"))),i)),a.finally((()=>{e.removeListener(t,c).catch((()=>null))})),{getValue:()=>a}},Object.defineProperty(c,\"__esModule\",{value:!0}),c.System=void 0;const re=d,oe=g,se=ie(),ae=t;class ce extends re.EmitterBase{constructor(e){super(e,\"system\")}sendExternalProcessRequest(e,t){return new Promise(((n,i)=>{const r=\"external-process-exited\";let o,s,a,c;\"function\"==typeof t.listener&&(a=e=>{const n=e||{};s={topic:\"exited\",uuid:n.processUuid||\"\",exitCode:n.exitCode||0},o===e.processUuid&&(t.listener(s),c.removeListener(r,a))},this.wire.me.name||(this.wire.me.name=this.wire.me.uuid),c=new se._Window(this.wire,this.wire.me),c.on(r,a)),this.wire.sendAction(e,t).then((({payload:e})=>{o=e.data.uuid,n(e.data),s&&o===s.uuid&&(t.listener(s),c.removeListener(r,a))})).catch((e=>{c&&c.removeListener(r,a),i(e)}))}))}getVersion(){return this.wire.sendAction(\"get-version\").then((({payload:e})=>e.data))}clearCache(e){return this.wire.sendAction(\"clear-cache\",e).then((()=>{}))}deleteCacheOnExit(){return this.wire.sendAction(\"delete-cache-request\").then((()=>{}))}exit(){return this.wire.sendAction(\"exit-desktop\").then((()=>{}))}async fetchManifest(e){const{payload:{data:t}}=await this.wire.sendAction(\"fetch-manifest\",{manifestUrl:e});return t}flushCookieStore(){return this.wire.sendAction(\"flush-cookie-store\").then((()=>{}))}getAllWindows(){return this.wire.sendAction(\"get-all-windows\").then((({payload:e})=>e.data))}getAllApplications(){return this.wire.sendAction(\"get-all-applications\").then((({payload:e})=>e.data))}getCommandLineArguments(){return this.wire.sendAction(\"get-command-line-arguments\").then((({payload:e})=>e.data))}async getCrashReporterState(){const{payload:{data:{diagnosticMode:e,isRunning:t}}}=await this.wire.sendAction(\"get-crash-reporter-state\");return console.warn(\"diagnosticMode property is deprecated. It will be removed in a future version\"),{diagnosticMode:e,diagnosticsMode:e,isRunning:t}}async startCrashReporter(e){const t=e,n={...t,diagnosticMode:t.diagnosticsMode||t.diagnosticMode},{payload:{data:{diagnosticMode:i,isRunning:r}}}=await this.wire.sendAction(\"start-crash-reporter\",n);return{diagnosticMode:i,diagnosticsMode:i,isRunning:r}}getUniqueUserId(){return this.wire.sendAction(\"get-unique-user-id\").then((({payload:e})=>e.data))}getEntityInfo(e,t){return this.wire.sendAction(\"get-entity-info\",{uuid:e,name:t}).then((({payload:e})=>e.data))}getEnvironmentVariable(e){return this.wire.sendAction(\"get-environment-variable\",{environmentVariables:e}).then((({payload:e})=>e.data))}getFocusedWindow(){return this.wire.sendAction(\"get-focused-window\").then((({payload:e})=>e.data))}async isAppCertified(e){const{payload:{data:{certifiedInfo:t}}}=await this.wire.sendAction(\"is-app-certified\",{manifestUrl:e});return t}getInstalledRuntimes(){return this.wire.sendAction(\"get-installed-runtimes\").then((({payload:e})=>e.data.runtimes))}async getInstalledApps(){const{payload:{data:{installedApps:e}}}=await this.wire.sendAction(\"get-installed-apps\");return e}getLog(e){return this.wire.sendAction(\"view-log\",e).then((({payload:e})=>e.data))}getMachineId(){return this.wire.sendAction(\"get-machine-id\").then((({payload:e})=>e.data))}getMinLogLevel(){return this.wire.sendAction(\"get-min-log-level\").then((({payload:e})=>e.data))}getLogList(){return this.wire.sendAction(\"list-logs\").then((({payload:e})=>e.data))}getMonitorInfo(){return this.wire.sendAction(\"get-monitor-info\").then((({payload:e})=>e.data))}getMousePosition(){return this.wire.sendAction(\"get-mouse-position\").then((({payload:e})=>e.data))}getProcessList(){return console.warn(\"System.getProcessList has been deprecated. Please consider using our new process APIs: Window.getProcessInfo, View.getProcessInfo, Application.getProcessInfo, System.getAllProcessInfo\"),this.wire.sendAction(\"process-snapshot\").then((({payload:e})=>e.data))}async getAllProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction(\"get-all-process-info\",this.identity);return e}getProxySettings(){return this.wire.sendAction(\"get-proxy-settings\").then((({payload:e})=>e.data))}getRuntimeInfo(){return this.wire.sendAction(\"get-runtime-info\").then((({payload:e})=>e.data))}getRvmInfo(){return this.wire.sendAction(\"get-rvm-info\").then((({payload:e})=>e.data))}getHostSpecs(){return this.wire.sendAction(\"get-host-specs\").then((({payload:e})=>e.data))}getOSInfo(){return this.wire.sendAction(\"get-os-info\").then((({payload:e})=>e.data))}launchExternalProcess(e){return this.sendExternalProcessRequest(\"launch-external-process\",e)}monitorExternalProcess(e){return this.sendExternalProcessRequest(\"monitor-external-process\",e)}log(e,t){return this.wire.sendAction(\"write-to-log\",{level:e,message:t}).then((()=>{}))}openUrlWithBrowser(e){return this.wire.sendAction(\"open-url-with-browser\",{url:e}).then((()=>{}))}async registerCustomProtocol(e){if(\"object\"!=typeof e)throw new Error(\"Must provide an object with a `protocolName` property having a string value.\");await this.wire.sendAction(\"register-custom-protocol\",e)}async unregisterCustomProtocol(e){await this.wire.sendAction(\"unregister-custom-protocol\",{protocolName:e})}async getCustomProtocolState(e){return this.wire.sendAction(\"get-custom-protocol-state\",{protocolName:e}).then((({payload:e})=>e.data))}releaseExternalProcess(e){return this.wire.sendAction(\"release-external-process\",{uuid:e}).then((()=>{}))}showDeveloperTools(e){return this.wire.sendAction(\"show-developer-tools\",e).then((()=>{}))}terminateExternalProcess(e){return this.wire.sendAction(\"terminate-external-process\",e).then((()=>{}))}updateProxySettings(e){return this.wire.sendAction(\"update-proxy\",e).then((()=>{}))}async downloadAsset(e,t){const n=()=>{};let i=n,r=n;const o=new Promise(((e,t)=>{i=e,r=t}));if(\"openfin\"!==this.wire.environment.type)throw new oe.NotSupportedError(\"downloadAsset only supported in an OpenFin Render process\");const s=oe.RuntimeError.getCallSite(),a=this.wire.environment.getNextMessageId().toString(),c=`asset-download-progress-${a}`,d=`asset-download-error-${a}`,h=`asset-download-complete-${a}`,l=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},u=()=>{this.removeListener(c,l)};await Promise.all([this.on(c,l),this.once(d,(e=>{u();const{reason:t,err:n}=e;r(new oe.RuntimeError({reason:t,error:n},s))})),this.once(h,(()=>{u(),i()}))]);const p=Object.assign(e,{downloadId:a});return await this.wire.sendAction(\"download-asset\",p).catch((e=>{throw u(),e})),o}downloadRuntime(e,t){const n=oe.RuntimeError.getCallSite();return new Promise(((i,r)=>{if(\"openfin\"!==this.wire.environment.type)return void r(new oe.NotSupportedError(\"downloadRuntime only supported in an OpenFin Render process\"));const o=this.wire.environment.getNextMessageId().toString(),s=`runtime-download-progress-${o}`,a=`runtime-download-error-${o}`,c=`runtime-download-complete-${o}`,d=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},h=()=>{this.removeListener(s,d)};this.on(s,d),this.once(a,(e=>{h();const{reason:t,err:i}=e;r(new oe.RuntimeError({reason:t,error:i},n))})),this.once(c,(()=>{h(),i()}));const l=Object.assign(e,{downloadId:o});this.wire.sendAction(\"download-runtime\",l).catch((e=>{h(),r(e)}))}))}downloadPreloadScripts(e){return this.wire.sendAction(\"download-preload-scripts\",{scripts:e}).then((({payload:e})=>e.data))}getAllExternalApplications(){return this.wire.sendAction(\"get-all-external-applications\").then((({payload:e})=>e.data))}getAppAssetInfo(e){return this.wire.sendAction(\"get-app-asset-info\",e).then((({payload:e})=>e.data))}getCookies(e){const t=this.wire.environment.getUrl(),n=Object.assign(e,{url:t});return this.wire.sendAction(\"get-cookies\",n).then((({payload:e})=>e.data))}setMinLogLevel(e){return this.wire.sendAction(\"set-min-log-level\",{level:e}).then((()=>{}))}resolveUuid(e){return this.wire.sendAction(\"resolve-uuid\",{entityKey:e}).then((({payload:e})=>e.data))}executeOnRemote(e,t){return t.requestingIdentity=e,this.wire.ferryAction(t)}readRegistryValue(e,t,n){return this.wire.sendAction(\"read-registry-value\",{rootKey:e,subkey:t,value:n}).then((({payload:e})=>e.data))}registerExternalConnection(e){return this.wire.sendAction(\"register-external-connection\",{uuid:e}).then((({payload:e})=>e.data))}async getServiceConfiguration(e){if(\"string\"!=typeof e.name)throw new Error(\"Must provide an object with a `name` property having a string value\");const{name:t}=e;return this.wire.sendAction(\"get-service-configuration\",{name:t}).then((({payload:e})=>e.data))}async getSystemAppConfig(e){if(\"string\"!=typeof e)throw new Error(\"Must provide a string value for name of system app\");return this.wire.sendAction(\"get-system-app-configuration\",{name:e}).then((({payload:e})=>e.data))}async registerShutdownHandler(e){this.wire.sendAction(\"system-register-shutdown-handler\").catch((e=>{}));const{uuid:t,name:n}=this.wire.me;this.on(\"system-shutdown\",(i=>{e({proceed:()=>{this.wire.environment.raiseEvent(\"application/system-shutdown-handled\",{uuid:t,name:n,topic:\"application\"})}})}))}runRvmHealthCheck(){return this.wire.sendAction(\"run-rvm-health-check\").then((({payload:e})=>e.data))}async launchManifest(e,t={}){const{subscribe:n,...i}=t,r=i;if(n){const e=new ae.EventEmitter;n(e);const t=\"app-version-progress\",i=\"runtime-status\",o=\"app-version-complete\",s=\"app-version-error\",a=this.wire.environment.getNextMessageId().toString();r.appVersionId=a;const c=[o,t,i,s],d=e=>{const{appVersionId:t,topic:n,type:i,...r}=e;return{...r,type:c.find((e=>i.includes(e)))}},h=t=>{const n=d(t);e.emit(n.type,n)},l=()=>{this.removeListener(`${t}.${a}`,h),this.removeListener(`${i}.${a}`,h),this.removeListener(`${o}.${a}`,h),this.removeListener(`${s}.${a}`,h),this.removeListener(`${o}.${a}`,l),this.removeListener(`${s}.${a}`,l)};await Promise.all([this.on(`${t}.${a}`,h),this.on(`${i}.${a}`,h),this.once(`${o}.${a}`,h),this.once(`${s}.${a}`,h),this.once(`${o}.${a}`,l),this.once(`${s}.${a}`,l)])}return(await this.wire.sendAction(\"launch-manifest\",{manifestUrl:e,opts:r})).payload.data.manifest}async queryPermissionForCurrentContext(e){const t={uuid:this.wire.me.uuid,name:this.wire.me.name};return(await this.wire.sendAction(\"query-permission-for-current-context\",{apiName:e,identity:t})).payload.data}async enableNativeWindowIntegrationProvider(e){const{payload:t}=await this.wire.sendAction(\"enable-native-window-integration-provider\",{permissions:e});return t.data}async registerUsage({data:e,type:t}){await this.wire.sendAction(\"register-usage\",{data:e,type:t})}async getPrinters(){const{payload:e}=await this.wire.sendAction(\"system-get-printers\");return e.data}async updateProcessLoggingOptions(e){await this.wire.sendAction(\"system-update-process-logging-options\",{options:e})}async getDomainSettings(){const{payload:{data:e}}=await this.wire.sendAction(\"get-domain-settings\",this.identity);return e}async setDomainSettings(e){await this.wire.sendAction(\"set-domain-settings\",{domainSettings:e,...this.identity})}async refreshExtensions(){const{payload:e}=await this.wire.sendAction(\"refresh-extensions\");return e.data}async getInstalledExtensions(){const{payload:e}=await this.wire.sendAction(\"get-installed-extensions\");return e.data}}c.System=ce;var de={},he={};Object.defineProperty(he,\"__esModule\",{value:!0}),he.RefCounter=void 0;he.RefCounter=class{constructor(){this.topicRefMap=new Map}incRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t+1;n=i,this.topicRefMap.set(e,i)}else this.topicRefMap.set(e,1),n=1;return n}decRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t-1;this.topicRefMap.set(e,i),n=i}else n=-1;return n}actOnFirst(e,t,n){return 1===this.incRefCount(e)?t():n()}actOnLast(e,t,n){return 0===this.decRefCount(e)?t():n()}};var le={},ue={},pe={};Object.defineProperty(pe,\"__esModule\",{value:!0}),pe.ChannelBase=pe.ProtectedItems=void 0;const we=e=>async(t,n,i)=>{const r=await e(t,n,i);return void 0===r?n:r};pe.ProtectedItems=class{constructor(e,t){this.providerIdentity=e,this.close=t}};class ye{static defaultAction(e){throw new Error(`No action registered at target for ${e}`)}constructor(){this.subscriptions=new Map}async processAction(e,t,n){try{const i=this.subscriptions.has(e)?this.subscriptions.get(e):(t,n)=>(this.defaultAction??ye.defaultAction)(e,t,n),r=this.preAction?await this.preAction(e,t,n):t,o=await i(r,n);return this.postAction?await this.postAction(e,o,n):o}catch(t){if(this.errorMiddleware)return this.errorMiddleware(e,t,n);throw t}}beforeAction(e){if(this.preAction)throw new Error(\"Already registered beforeAction middleware\");this.preAction=we(e)}onError(e){if(this.errorMiddleware)throw new Error(\"Already registered error middleware\");this.errorMiddleware=e}afterAction(e){if(this.postAction)throw new Error(\"Already registered afterAction middleware\");this.postAction=we(e)}remove(e){this.subscriptions.delete(e)}setDefaultAction(e){if(this.defaultAction)throw new Error(\"default action can only be set once\");this.defaultAction=e}register(e,t){if(this.subscriptions.has(e))throw new Error(`Subscription already registered for action: ${e}. Unsubscribe before adding new subscription`);return this.subscriptions.set(e,t),!0}}pe.ChannelBase=ye;var fe,ge,me,ve=s&&s.__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)},Ce=s&&s.__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};Object.defineProperty(ue,\"__esModule\",{value:!0}),ue.ChannelClient=void 0;const be=pe,Ie=new Map;class Ee extends be.ChannelBase{static closeChannelByEndpointId(e){const t=Ie.get(e);t&&ve(t,me,\"f\").call(t)}static handleProviderDisconnect(e){for(const t of Ie.values())t.providerIdentity.channelId===e.channelId&&(t.disconnectListener(e),ve(t,me,\"f\").call(t))}constructor(e,t,n){super(),fe.set(this,void 0),ge.set(this,void 0),this.processAction=(e,t,n)=>super.processAction(e,t,n),me.set(this,(()=>{Ie.delete(this.endpointId),ve(this,ge,\"f\").close()})),Ce(this,fe,new be.ProtectedItems(e,t),\"f\"),this.disconnectListener=()=>{},this.endpointId=e.endpointId,Ce(this,ge,n,\"f\"),Ie.set(this.endpointId,this),n.receive(this.processAction)}get providerIdentity(){return ve(this,fe,\"f\").providerIdentity}async dispatch(e,t){if(ve(this,ge,\"f\").isEndpointConnected(this.providerIdentity.channelId))return ve(this,ge,\"f\").send(this.providerIdentity.channelId,e,t);throw new Error(\"The client you are trying to dispatch from is disconnected from the target provider.\")}onDisconnection(e){this.disconnectListener=t=>{try{e(t)}catch(e){throw new Error(`Error while calling the onDisconnection callback: ${e.message}`)}finally{this.disconnectListener=()=>{}}}}async disconnect(){await this.sendDisconnectAction(),ve(this,me,\"f\").call(this)}async sendDisconnectAction(){const e=ve(this,fe,\"f\");await e.close()}static async wireClose(e,t,n){const{channelName:i,uuid:r,name:o}=t;await e.sendAction(\"disconnect-from-channel\",{channelName:i,uuid:r,name:o,endpointId:n})}}ue.ChannelClient=Ee,fe=new WeakMap,ge=new WeakMap,me=new WeakMap;var xe={},Ae={};Object.defineProperty(Ae,\"__esModule\",{value:!0}),Ae.exhaustiveCheck=void 0,Ae.exhaustiveCheck=function(e,t){throw new Error(`Unsupported value: ${e}${t?`\\n Supported values are: ${t.join(\"\")}`:\"\"}`)};var Pe,Me,_e,Oe={},Se=s&&s.__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},Re=s&&s.__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)};Object.defineProperty(Oe,\"__esModule\",{value:!0}),Oe.ClassicInfo=Oe.ClassicStrategy=void 0;Oe.ClassicStrategy=class{constructor(e,t,n,i){this.messageReceiver=t,this.endpointId=n,this.providerIdentity=i,Pe.set(this,void 0),Me.set(this,new Map),_e.set(this,new Map),this.send=async(e,t,n)=>{const i=Re(this,Me,\"f\").get(e);if(!i)throw new Error(`Could not locate routing info for endpoint ${e}`);const r={...i};r.isLocalEndpointId&&delete r.endpointId,delete r.isLocalEndpointId;const o=Re(this,Pe,\"f\").sendAction(\"send-channel-message\",{...r,providerIdentity:this.providerIdentity,action:t,payload:n});Re(this,_e,\"f\").get(e)?.add(o);return(await o.catch((e=>{throw new Error(e.message)})).finally((()=>{Re(this,_e,\"f\").get(e)?.delete(o)}))).payload.data.result},this.close=async()=>{this.messageReceiver.removeEndpoint(this.providerIdentity.channelId,this.endpointId),[...Re(this,Me,\"f\").keys()].forEach((e=>this.closeEndpoint(e))),Se(this,Me,new Map,\"f\")},Se(this,Pe,e,\"f\")}onEndpointDisconnect(e,t){}receive(e){this.messageReceiver.addEndpoint(e,this.providerIdentity.channelId,this.endpointId)}async closeEndpoint(e){const t=Re(this,Me,\"f\").get(e);Re(this,Me,\"f\").delete(e);const n=Re(this,_e,\"f\").get(e);n?.forEach((n=>{const i=`Channel connection with identity uuid: ${t?.uuid} / name: ${t?.name} / endpointId: ${e} no longer connected.`;n.cancel(new Error(i))}))}isEndpointConnected(e){return Re(this,Me,\"f\").has(e)}addEndpoint(e,t){Re(this,Me,\"f\").set(e,t.endpointIdentity),Re(this,_e,\"f\").set(e,new Set)}isValidEndpointPayload(e){return\"string\"==typeof e?.endpointIdentity?.endpointId||\"string\"==typeof e?.endpointIdentity?.channelId}},Pe=new WeakMap,Me=new WeakMap,_e=new WeakMap,Oe.ClassicInfo={version:5,minimumVersion:0,type:\"classic\"};var Fe={},je={},ke={};Object.defineProperty(ke,\"__esModule\",{value:!0}),ke.errorToPOJO=void 0,ke.errorToPOJO=function(e){return{stack:e.stack,name:e.name,message:e.message,toString:()=>e.stack||e.toString()}};var Le,Te,$e=s&&s.__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)},Be=s&&s.__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};Object.defineProperty(je,\"__esModule\",{value:!0}),je.RTCEndpoint=void 0;const Ge=ke;je.RTCEndpoint=class{static isValidEndpointPayload(e){const t=e=>\"object\"==typeof e&&null!==e;return t(e)&&t(e.endpointIdentity)&&t(e.rtc)&&\"string\"==typeof e.endpointIdentity.endpointId}constructor({rtc:e,endpointIdentity:t}){this.responseMap=new Map,Le.set(this,null),Te.set(this,void 0),this.connectionStateChangeHandler=e=>{\"connected\"!==this.rtc.rtcClient.connectionState&&(this.rtc.rtcClient.removeEventListener(\"connectionstatechange\",this.connectionStateChangeHandler),this.close(),$e(this,Te,\"f\")&&$e(this,Te,\"f\").call(this))},this.send=async(e,t)=>{const n=`message-${Math.random()}`,i=new Promise(((e,t)=>{this.responseMap.set(n,{resolve:e,reject:t})}));return this.rtc.channels.request.send(JSON.stringify({action:e,payload:t,messageId:n})),i},this.close=()=>{this.responseMap.forEach((e=>e.reject(\"Connection has closed.\"))),this.responseMap=new Map,this.rtc.channels.request.close(),this.rtc.channels.response.close(),this.rtc.rtcClient.close()},this.rtc=e,this.endpointIdentity=t,this.rtc.channels.response.addEventListener(\"message\",(e=>{let{data:t}=e;e.data instanceof ArrayBuffer&&(t=(new TextDecoder).decode(e.data));const{messageId:n,payload:i,success:r,error:o}=JSON.parse(t),{resolve:s,reject:a}=this.responseMap.get(n)??{};s&&a?(this.responseMap.delete(n),r?s(i):a(o)):(console.log(\"Could not find id in responseMap.\"),console.log(e))})),this.rtc.channels.request.addEventListener(\"message\",(async e=>{let{data:n}=e;e.data instanceof ArrayBuffer&&(n=(new TextDecoder).decode(e.data));const{messageId:i,action:r,payload:o}=JSON.parse(n);if($e(this,Le,\"f\"))try{const e=await $e(this,Le,\"f\").call(this,r,o,t);this.rtc.channels.response.send(JSON.stringify({messageId:i,payload:e,success:!0}))}catch(e){\"open\"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,error:(0,Ge.errorToPOJO)(e),success:!1}))}else\"open\"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,success:!1,error:\"Connection not ready.\"}))})),this.rtc.rtcClient.addEventListener(\"connectionstatechange\",this.connectionStateChangeHandler),Object.values(this.rtc.channels).forEach((e=>{e.onclose=e=>{[...this.responseMap.values()].forEach((e=>e.reject(new Error(\"RTCDataChannel closed unexpectedly, this is most commonly caused by message size. Note: RTC Channels have a message size limit of ~255kB.\")))),this.close(),$e(this,Te,\"f\")&&$e(this,Te,\"f\").call(this)}}))}onDisconnect(e){if($e(this,Te,\"f\"))throw new Error(\"RTCEndpoint disconnectListener cannot be set twice.\");Be(this,Te,e,\"f\")}receive(e){if($e(this,Le,\"f\"))throw new Error(\"You have already set a listener for this RTC Endpoint.\");Be(this,Le,e,\"f\")}get connected(){return\"connected\"===this.rtc.rtcClient.connectionState}},Le=new WeakMap,Te=new WeakMap;var We,He,Ne,De={},Ue=s&&s.__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)},Ve=s&&s.__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};Object.defineProperty(De,\"__esModule\",{value:!0}),De.EndpointStrategy=void 0;De.EndpointStrategy=class{constructor(e,t,n){this.EndpointType=e,this.StrategyName=n,We.set(this,null),He.set(this,new Map),Ne.set(this,!0),this.send=async(e,t,n)=>this.getEndpointById(e).send(t,n),this.close=async()=>{Ue(this,Ne,\"f\")&&(Ue(this,He,\"f\").forEach((e=>e.close())),Ve(this,He,new Map,\"f\")),Ve(this,Ne,!1,\"f\")},this.isValidEndpointPayload=t}onEndpointDisconnect(e,t){this.getEndpointById(e).onDisconnect(t)}receive(e){if(Ue(this,We,\"f\"))throw new Error(`You have already set a listener for this ${this.StrategyName} Strategy`);Ve(this,We,e,\"f\"),Ue(this,He,\"f\").forEach((e=>e.receive(Ue(this,We,\"f\"))))}getEndpointById(e){const t=Ue(this,He,\"f\").get(e);if(!t)throw new Error(`Client with endpoint id ${e} is not connected`);return t}get connected(){return Ue(this,Ne,\"f\")}isEndpointConnected(e){return Ue(this,He,\"f\").has(e)}addEndpoint(e,t){if(!Ue(this,Ne,\"f\"))return void console.warn(`Adding endpoint to disconnected ${this.StrategyName} Strategy`);const n=new this.EndpointType(t);Ue(this,We,\"f\")&&n.receive(Ue(this,We,\"f\")),Ue(this,He,\"f\").set(e,n)}async closeEndpoint(e){Ue(this,He,\"f\").delete(e)}},We=new WeakMap,He=new WeakMap,Ne=new WeakMap,Object.defineProperty(Fe,\"__esModule\",{value:!0}),Fe.RTCInfo=Fe.RTCStrategy=void 0;const ze=je,Ke=De;class qe extends Ke.EndpointStrategy{constructor(){super(ze.RTCEndpoint,ze.RTCEndpoint.isValidEndpointPayload,\"RTC\")}}Fe.RTCStrategy=qe,Fe.RTCInfo={version:2,minimumVersion:0,type:\"rtc\"};var Je={};Object.defineProperty(Je,\"__esModule\",{value:!0}),Je.RTCICEManager=void 0;const Ye=d;class Ze extends Ye.EmitterBase{constructor(e){super(e,\"channel\"),this.ensureChannelOpened=e=>new Promise(((t,n)=>{if(\"open\"===e.readyState)t();else if(\"connecting\"===e.readyState){const n=()=>{e.removeEventListener(\"open\",n),t()};e.addEventListener(\"open\",n)}else n(new Error(\"This Channel has already closed\"))}))}static createDataChannelPromise(e,t){let n;const i=new Promise((e=>{n=e})),r=i=>{const o=()=>{i.channel.removeEventListener(\"open\",o),n(i.channel)};i.channel.label===e&&(i.channel.addEventListener(\"open\",o),t.removeEventListener(\"datachannel\",r))};return t.addEventListener(\"datachannel\",r),i}async listenForProviderIce(e,t){await this.on(this.createProviderEventName(e),t,{timestamp:Date.now()})}async raiseProviderIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createProviderEventName(e)),t)}async listenForClientIce(e,t){await this.on(this.createClientEventName(e),t,{timestamp:Date.now()})}async raiseClientIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createClientEventName(e)),t)}cleanupIceListeners(e){this.removeAllListeners(this.createClientEventName(e)),this.removeAllListeners(this.createProviderEventName(e))}createClientEventName(e){return`ice-client-${e}`}createProviderEventName(e){return`ice-provider-${e}`}createRouteString(e){return`channel/${e}`}createRtcPeer(){return this.wire.environment.getRtcPeer()}async startClientOffer(){const e=Math.random().toString(),t=this.createRtcPeer();t.addEventListener(\"icecandidate\",(async t=>{t.candidate&&await this.raiseClientIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForProviderIce(e,(async e=>{await t.addIceCandidate(e.candidate)}));const n={request:t.createDataChannel(\"request\"),response:t.createDataChannel(\"response\")},i=await t.createOffer();await t.setLocalDescription(i);const r=Promise.all([n.request,n.response].map(this.ensureChannelOpened)).then((()=>{}));return{rtcClient:t,channels:n,offer:i,rtcConnectionId:e,channelsOpened:r}}async finishClientOffer(e,t,n){return await e.setRemoteDescription(t),await n,!0}async createProviderAnswer(e,t){const n=this.createRtcPeer(),i=Ze.createDataChannelPromise(\"request\",n),r=Ze.createDataChannelPromise(\"response\",n);n.addEventListener(\"icecandidate\",(async t=>{t.candidate&&await this.raiseProviderIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForClientIce(e,(async e=>{await n.addIceCandidate(e.candidate)})),await n.setRemoteDescription(t);const o=await n.createAnswer();await n.setLocalDescription(o);const s=Promise.all([i,r]).then((([t,n])=>(this.cleanupIceListeners(e),{request:t,response:n})));return{rtcClient:n,answer:o,channels:s}}}Je.RTCICEManager=Ze;var Qe={},Xe={};function et(e){return[...e.split(\".\").reverse().entries()].reduce(((e,[t,n])=>e+ +n*1e4**t),0)}function tt(e,t){return et(e)>=et(t)}function nt(e){return e.split(\"/\")[0]}Object.defineProperty(Xe,\"__esModule\",{value:!0}),Xe.runtimeUuidMeetsMinimumRuntimeVersion=Xe.parseRuntimeUuid=Xe.meetsMinimumRuntimeVersion=void 0,Xe.meetsMinimumRuntimeVersion=tt,Xe.parseRuntimeUuid=nt,Xe.runtimeUuidMeetsMinimumRuntimeVersion=function(e,t){return tt(nt(e),t)};var it,rt,ot,st,at,ct=s&&s.__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)},dt=s&&s.__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};Object.defineProperty(Qe,\"__esModule\",{value:!0}),Qe.ChannelProvider=void 0;const ht=pe,lt=Xe;class ut extends ht.ChannelBase{get connections(){return[...ct(this,it,\"f\")]}static handleClientDisconnection(e,t){const n=e.connections.find((e=>e.endpointId===t.endpointId));if(n)ct(e,st,\"f\").call(e,n);else{e.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name)).forEach(ct(e,st,\"f\"))}e.disconnectListener(t)}static setProviderRemoval(e,t){ut.removalMap.set(e,t)}constructor(e,t,n){super(),it.set(this,void 0),rt.set(this,void 0),ot.set(this,void 0),st.set(this,(e=>{const t=this.connections.filter((t=>t.endpointId!==e.endpointId));ct(this,ot,\"f\").closeEndpoint(e.endpointId),dt(this,it,t,\"f\")})),this.processAction=async(e,t,n)=>(ut.clientIsMultiRuntime(n)&&!(0,lt.runtimeUuidMeetsMinimumRuntimeVersion)(n.runtimeUuid,\"18.87.56.0\")?this.handleMultiRuntimeLegacyClient(n):this.checkForClientConnection(n),super.processAction(e,t,n)),at.set(this,(()=>{ct(this,ot,\"f\").close();const e=ut.removalMap.get(this);e&&e()})),dt(this,rt,new ht.ProtectedItems(e,t),\"f\"),this.connectListener=()=>{},this.disconnectListener=()=>{},dt(this,it,[],\"f\"),dt(this,ot,n,\"f\"),n.receive(this.processAction)}dispatch(e,t,n){const i=e.endpointId??this.getEndpointIdForOpenFinId(e,t);return i&&ct(this,ot,\"f\").isEndpointConnected(i)?ct(this,ot,\"f\").send(i,t,n):Promise.reject(new Error(`Client connection with identity uuid: ${e.uuid} / name: ${e.name} / endpointId: ${i} no longer connected.`))}async processConnection(e,t){return ct(this,it,\"f\").push(e),this.connectListener(e,t)}publish(e,t){return this.connections.map((n=>ct(this,ot,\"f\").send(n.endpointId,e,t)))}onConnection(e){this.connectListener=e}onDisconnection(e){this.disconnectListener=e}async destroy(){const e=ct(this,rt,\"f\");e.providerIdentity,dt(this,it,[],\"f\"),await e.close(),ct(this,at,\"f\").call(this)}async getAllClientInfo(){return this.connections.map((e=>{const{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}=e;return{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}}))}checkForClientConnection(e){if(!this.isClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider.\\n Client Identity: {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}isClientConnected(e){return ut.clientIdentityIncludesEndpointId(e)?this.connections.some((t=>t.endpointId===e.endpointId&&t.uuid===e.uuid&&t.name===e.name)):this.isLegacyClientConnected(e)}isLegacyClientConnected(e){return this.connections.some((t=>t.uuid===e.uuid&&t.name===e.name))}handleMultiRuntimeLegacyClient(e){if(!this.isLegacyClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider. Client Identity:\\n {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}getEndpointIdForOpenFinId(e,t){const n=this.connections.filter((t=>t.name===e.name&&t.uuid===e.uuid));if(n.length>=2){const n=ct(this,rt,\"f\"),{uuid:i,name:r}=e,o=n?.providerIdentity.uuid,s=n?.providerIdentity.name;console.warn(`WARNING: Dispatch call may have unintended results. The \"to\" argument of your dispatch call is missing the\\n \"endpointId\" parameter. The identity you are dispatching to ({uuid: ${i}, name: ${r}})\\n has multiple channelClients for this channel. Your dispatched action: (${t}) from the provider:\\n ({uuid: ${o}, name: ${s}}) will only be processed by the most recently-created client.`)}return n.pop()?.endpointId}static clientIdentityIncludesEndpointId(e){return void 0!==e.endpointId}static clientIsMultiRuntime(e){return void 0!==e.runtimeUuid}static async wireClose(e,t){await e.sendAction(\"destroy-channel\",{channelName:t})}}Qe.ChannelProvider=ut,it=new WeakMap,rt=new WeakMap,ot=new WeakMap,st=new WeakMap,at=new WeakMap,ut.removalMap=new WeakMap;var pt={};Object.defineProperty(pt,\"__esModule\",{value:!0}),pt.MessageReceiver=void 0;const wt=ue,yt=d;class ft extends yt.Base{constructor(e){super(e),this.onmessage=e=>\"process-channel-message\"===e.action&&(this.processChannelMessage(e),!0),this.endpointMap=new Map,this.latestEndpointIdByChannelId=new Map,e.registerMessageHandler(this.onmessage.bind(this))}async processChannelMessage(e){const{senderIdentity:t,providerIdentity:n,action:i,ackToSender:r,payload:o,intendedTargetIdentity:s}=e.payload,a=s.channelId??s.endpointId??this.latestEndpointIdByChannelId.get(n.channelId),c=this.endpointMap.get(a);if(!c)return r.payload.success=!1,r.payload.reason=`Client connection with identity uuid: ${this.wire.me.uuid} / name: ${this.wire.me.name} / endpointId: ${a} no longer connected.`,this.wire.sendRaw(r);try{const e=await c(i,o,t);return r.payload.payload=r.payload.payload||{},r.payload.payload.result=e,this.wire.sendRaw(r)}catch(e){return r.payload.success=!1,r.payload.reason=e.message,this.wire.sendRaw(r)}}addEndpoint(e,t,n){this.endpointMap.set(n,e),t!==n&&this.latestEndpointIdByChannelId.set(t,n)}removeEndpoint(e,t){this.endpointMap.delete(t),this.latestEndpointIdByChannelId.get(e)===t&&this.latestEndpointIdByChannelId.delete(e)}checkForPreviousClientConnection(e){const t=this.latestEndpointIdByChannelId.get(e);t&&(wt.ChannelClient.closeChannelByEndpointId(t),console.warn(\"You have created a second connection to an older provider. First connection has been removed from the clientMap\"),console.warn(\"If the provider calls publish(), you may receive multiple messages.\"))}}pt.MessageReceiver=ft;var gt={};Object.defineProperty(gt,\"__esModule\",{value:!0}),gt.ProtocolManager=void 0;gt.ProtocolManager=class{constructor(e){this.ProtocolsInPreferenceOrder=e,this.DefaultClientProtocols=[\"classic\"],this.DefaultProviderProtocols=[\"classic\"],this.getClientProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultClientProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(\", \")}.`);return t},this.getProviderProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultProviderProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(\", \")}.`);return t},this.getCompatibleProtocols=(e,t)=>t.supportedProtocols.filter((t=>e.some((e=>e.type===t.type&&t.version>=e.minimumVersion&&e.version>=(t.minimumVersion??0))))).slice(0,t.maxProtocols)}};var mt={};Object.defineProperty(mt,\"__esModule\",{value:!0});class vt{static combine(e,t){return new vt(e,t)}constructor(e,t){this.primary=e,this.secondary=t}onEndpointDisconnect(e,t){this.primary.onEndpointDisconnect(e,(()=>{this.secondary.isEndpointConnected(e)||t()})),this.secondary.onEndpointDisconnect(e,(()=>{this.primary.isEndpointConnected(e)||t()}))}isValidEndpointPayload(e){return this.primary.isValidEndpointPayload(e)||this.secondary.isValidEndpointPayload(e)}async closeEndpoint(e){await this.primary.closeEndpoint(e),await this.secondary.closeEndpoint(e)}isEndpointConnected(e){return this.primary.isEndpointConnected(e)||this.secondary.isEndpointConnected(e)}async addEndpoint(e,t){this.primary.isValidEndpointPayload(t)&&await this.primary.addEndpoint(e,t),this.secondary.isValidEndpointPayload(t)&&await this.secondary.addEndpoint(e,t)}receive(e){this.primary.receive(e),this.secondary.receive(e)}send(e,t,n){return this.primary.isEndpointConnected(e)?this.primary.send(e,t,n):this.secondary.send(e,t,n)}async close(){await Promise.all([this.primary.close(),this.secondary.close()])}}mt.default=vt;var Ct,bt,It=s&&s.__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},Et=s&&s.__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)},xt=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(xe,\"__esModule\",{value:!0}),xe.ConnectionManager=void 0;const At=Ae,Pt=d,Mt=Oe,_t=Fe,Ot=Je,St=Qe,Rt=pt,Ft=gt,jt=xt(mt);class kt extends Pt.Base{static getProtocolOptionsFromStrings(e){return e.map((e=>{switch(e){case\"rtc\":return _t.RTCInfo;case\"classic\":return Mt.ClassicInfo;default:return(0,At.exhaustiveCheck)(e,[\"rtc\",\"classic\"])}}))}constructor(e){super(e),Ct.set(this,void 0),bt.set(this,void 0),this.removeChannelFromProviderMap=e=>{this.providerMap.delete(e)},this.onmessage=e=>\"process-channel-connection\"===e.action&&(this.processChannelConnection(e),!0),this.providerMap=new Map,this.protocolManager=new Ft.ProtocolManager(\"node\"===this.wire.environment.type?[\"classic\"]:[\"rtc\",\"classic\"]),It(this,Ct,new Rt.MessageReceiver(e),\"f\"),It(this,bt,new Ot.RTCICEManager(e),\"f\"),e.registerMessageHandler(this.onmessage.bind(this))}createProvider(e,t){const n=Object.assign(this.wire.environment.getDefaultChannelOptions().create,e||{}),i=this.protocolManager.getProviderProtocols(n?.protocols),r=i.map((e=>{switch(e){case\"rtc\":return new _t.RTCStrategy;case\"classic\":return new Mt.ClassicStrategy(this.wire,Et(this,Ct,\"f\"),t.channelId,t);default:return(0,At.exhaustiveCheck)(e,[\"rtc\",\"classic\"])}}));let o;if(2===r.length){const[e,t]=r;o=jt.default.combine(e,t)}else{if(1!==r.length)throw new Error(\"failed to combine strategies\");[o]=r}const s=new St.ChannelProvider(t,(()=>St.ChannelProvider.wireClose(this.wire,t.channelName)),o),a=t.channelId;return this.providerMap.set(a,{provider:s,strategy:o,supportedProtocols:kt.getProtocolOptionsFromStrings(i)}),St.ChannelProvider.setProviderRemoval(s,this.removeChannelFromProviderMap.bind(this)),s}async createClientOffer(e){const t=this.protocolManager.getClientProtocols(e?.protocols);let n;return{offer:{supportedProtocols:await Promise.all(t.map((async e=>{switch(e){case\"rtc\":{const{rtcClient:e,channels:t,offer:i,rtcConnectionId:r,channelsOpened:o}=await Et(this,bt,\"f\").startClientOffer();return n={rtcClient:e,channels:t,channelsOpened:o},{type:\"rtc\",version:_t.RTCInfo.version,payload:{offer:i,rtcConnectionId:r}}}case\"classic\":return{type:\"classic\",version:Mt.ClassicInfo.version};default:return(0,At.exhaustiveCheck)(e,[\"rtc\",\"classic\"])}}))),maxProtocols:2},rtc:n}}async createClientStrategy(e,t){t.endpointId||(t.endpointId=this.wire.environment.getNextMessageId(),Et(this,Ct,\"f\").checkForPreviousClientConnection(t.channelId));const n=t.answer??{supportedProtocols:[{type:\"classic\",version:1}]},i=(await Promise.all(n.supportedProtocols.map((async n=>\"rtc\"===n.type&&e?(await Et(this,bt,\"f\").finishClientOffer(e.rtcClient,n.payload.answer,e.channelsOpened),new _t.RTCStrategy):\"classic\"===n.type?new Mt.ClassicStrategy(this.wire,Et(this,Ct,\"f\"),t.endpointId,t):null)))).filter((e=>null!==e));let r;if(e&&!i.some((e=>e instanceof _t.RTCStrategy))&&e&&e.rtcClient.close(),i.length>=2)r=jt.default.combine(i[0],i[1]);else{if(!i.length)throw new Error(\"No compatible protocols\");[r]=i}const o={endpointIdentity:t,rtc:e};return r.addEndpoint(t.channelId,o),r}async processChannelConnection(e){const{clientIdentity:t,providerIdentity:n,ackToSender:i,payload:r,offer:o}=e.payload;t.endpointId?t.isLocalEndpointId=!1:(t.endpointId=this.wire.environment.getNextMessageId(),t.isLocalEndpointId=!0);const s=n.channelId,a=this.providerMap.get(s);if(!a)return i.payload.success=!1,i.payload.reason=`Channel \"${n.channelName}\" has been destroyed.`,this.wire.sendRaw(i);const{provider:c,strategy:d,supportedProtocols:h}=a;try{if(!(c instanceof St.ChannelProvider))throw Error(\"Cannot connect to a channel client\");const e=o??{supportedProtocols:[{type:\"classic\",version:1}],maxProtocols:1},n=this.protocolManager.getCompatibleProtocols(h,e);if(!n.length)throw new Error(\"This provider does not support any of the offered protocols.\");const s=await c.processConnection(t,r);i.payload.payload=i.payload.payload||{};let a={supportedProtocols:[],endpointPayloadPromise:Promise.resolve({endpointIdentity:t})};return a=await n.reduce((async(e,t)=>{const n=await e;if(\"rtc\"===t.type){const{answer:e,rtcClient:i,channels:r}=await Et(this,bt,\"f\").createProviderAnswer(t.payload.rtcConnectionId,t.payload.offer);n.supportedProtocols.push({type:\"rtc\",version:_t.RTCInfo.version,payload:{answer:e}}),n.endpointPayloadPromise=n.endpointPayloadPromise.then((e=>r.then((t=>({...e,rtc:{rtcClient:i,channels:t}})))))}else n.supportedProtocols.push({type:\"classic\",version:Mt.ClassicInfo.version});return n}),Promise.resolve(a)),a.endpointPayloadPromise.then((e=>d.addEndpoint(t.endpointId,e))),i.payload.payload.result=s,i.payload.payload.answer=a,this.wire.sendRaw(i)}catch(e){return i.payload.success=!1,i.payload.reason=e.message,this.wire.sendRaw(i)}}}xe.ConnectionManager=kt,Ct=new WeakMap,bt=new WeakMap;var Lt,Tt,$t,Bt=s&&s.__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},Gt=s&&s.__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)};Object.defineProperty(le,\"__esModule\",{value:!0}),le.Channel=void 0;const Wt=t,Ht=G,Nt=d,Dt=ue,Ut=xe,Vt=Qe;function zt(e){const t=Math.floor(e/10),n=Math.min(3e4,500*2**t);return new Promise((e=>{setTimeout((()=>{e(!1)}),n)}))}class Kt extends Nt.EmitterBase{constructor(e){super(e,\"channel\"),Lt.set(this,void 0),Tt.set(this,new Wt.EventEmitter),$t.set(this,new Ht.AsyncRetryableLazy((async()=>{await Promise.all([this.on(\"disconnected\",(e=>{Dt.ChannelClient.handleProviderDisconnect(e)})),this.on(\"connected\",((...e)=>{Gt(this,Tt,\"f\").emit(\"connected\",...e)}))]).catch((()=>new Error(\"error setting up channel connection listeners\")))}))),Bt(this,Lt,new Ut.ConnectionManager(e),\"f\")}async getAllChannels(){return this.wire.sendAction(\"get-all-channels\").then((({payload:e})=>e.data))}async onChannelConnect(e){await this.on(\"connected\",e)}async onChannelDisconnect(e){await this.on(\"disconnected\",e)}async safeConnect(e,t,n){const i={count:0};do{let r=()=>{};const o=new Promise((t=>{r=n=>{e===n.channelName&&t(!0)},Gt(this,Tt,\"f\").on(\"connected\",r)}));try{if(i.count>0){i.gotConnectedEvent=await Promise.race([zt(i.count),o]);const t=await this.wire.sendAction(\"connect-to-channel\",{...n,retryInfo:i});return console.log(`Successfully connected to channelName: ${e}`),t.payload.data}const t=this.wire.sendAction(\"connect-to-channel\",n);i.originalMessageId=t.messageId;return(await t).payload.data}catch(n){if(!n.message.includes(\"internal-nack\"))throw n;t&&0===i.count&&console.warn(`No channel found for channelName: ${e}. Waiting for connection...`)}finally{i.count+=1,Gt(this,Tt,\"f\").removeListener(\"connected\",r)}}while(t);throw new Error(`No channel found for channelName: ${e}.`)}async connect(e,t={}){if(await Gt(this,$t,\"f\").getValue(),!e||\"string\"!=typeof e)throw new Error(\"Please provide a channelName string to connect to a channel.\");const n={wait:!0,...this.wire.environment.getDefaultChannelOptions().connect,...t},{offer:i,rtc:r}=await Gt(this,Lt,\"f\").createClientOffer(n);let o;(this.fin.me.isFrame||this.fin.me.isView||this.fin.me.isWindow)&&(o=(await this.fin.me.getInfo()).url);const s={channelName:e,...n,offer:i,connectionUrl:o},a=await this.safeConnect(e,n.wait,s),c=await Gt(this,Lt,\"f\").createClientStrategy(r,a),d=new Dt.ChannelClient(a,(()=>Dt.ChannelClient.wireClose(this.wire,a,a.endpointId)),c);return c.onEndpointDisconnect(a.channelId,(async()=>{try{await d.sendDisconnectAction()}catch(e){console.warn(`Something went wrong during disconnect for client with uuid: ${a.uuid} / name: ${a.name} / endpointId: ${a.endpointId}.`)}finally{Dt.ChannelClient.handleProviderDisconnect(a)}})),d}async create(e,t){if(!e)throw new Error(\"Please provide a channelName to create a channel\");const{payload:{data:n}}=await this.wire.sendAction(\"create-channel\",{channelName:e}),i=Gt(this,Lt,\"f\").createProvider(t,n);return this.on(\"client-disconnected\",(t=>{t.channelName===e&&Vt.ChannelProvider.handleClientDisconnection(i,t)})),i}}le.Channel=Kt,Lt=new WeakMap,Tt=new WeakMap,$t=new WeakMap,Object.defineProperty(de,\"__esModule\",{value:!0}),de.InterAppPayload=de.InterApplicationBus=void 0;const qt=t,Jt=d,Yt=he,Zt=le,Qt=O;class Xt extends Jt.Base{constructor(e){super(e),this.events={subscriberAdded:\"subscriber-added\",subscriberRemoved:\"subscriber-removed\"},this.refCounter=new Yt.RefCounter,this.Channel=new Zt.Channel(e),this.emitter=new qt.EventEmitter,e.registerMessageHandler(this.onmessage.bind(this)),this.on=this.emitter.on.bind(this.emitter),this.removeAllListeners=this.emitter.removeAllListeners.bind(this.emitter)}async publish(e,t){await this.wire.sendAction(\"publish-message\",{topic:e,message:t,sourceWindowName:this.me.name})}async send(e,t,n){const i=(0,Qt.validateIdentity)(e);if(i)throw new Error(i);await this.wire.sendAction(\"send-message\",{destinationUuid:e.uuid,destinationWindowName:e.name,topic:t,message:n,sourceWindowName:this.me.name})}subscribe(e,t,n){const i=this.createSubscriptionKey(e.uuid,e.name||\"*\",t);return this.emitter.on(i,n),this.refCounter.actOnFirst(i,(async()=>{await this.wire.sendAction(\"subscribe\",{sourceUuid:e.uuid,sourceWindowName:e.name||\"*\",topic:t,destinationWindowName:this.me.name})}),(()=>Promise.resolve()))}unsubscribe(e,t,n){const i=e.name||\"*\",r=this.createSubscriptionKey(e.uuid,i,t);return this.emitter.removeListener(r,n),this.refCounter.actOnLast(r,(async()=>{await this.wire.sendAction(\"unsubscribe\",{sourceUuid:e.uuid,sourceWindowName:i,topic:t,destinationWindowName:this.me.name})}),(()=>new Promise((e=>e)).then((()=>{}))))}processMessage(e){const{payload:{message:t,sourceWindowName:n,sourceUuid:i,topic:r}}=e,o=[this.createSubscriptionKey(i,n,r),this.createSubscriptionKey(i,\"*\",r),this.createSubscriptionKey(\"*\",\"*\",r)],s={uuid:i,name:n};o.forEach((e=>{this.emitter.emit(e,t,s)}))}emitSubscriverEvent(e,t){const{payload:{targetName:n,uuid:i,topic:r}}=t,o={name:n,uuid:i,topic:r};this.emitter.emit(e,o)}createSubscriptionKey(e,t,n){const i=t||\"*\";if(!(e&&i&&n))throw new Error(\"Missing uuid, name, or topic string\");return function(...e){return e.map((e=>Buffer.from(`${e}`).toString(\"base64\"))).join(\"/\")}(e,i,n)}onmessage(e){const{action:t}=e;switch(t){case\"process-message\":this.processMessage(e);break;case this.events.subscriberAdded:this.emitSubscriverEvent(this.events.subscriberAdded,e);break;case this.events.subscriberRemoved:this.emitSubscriverEvent(this.events.subscriberRemoved,e)}return!0}}de.InterApplicationBus=Xt;de.InterAppPayload=class{};var en={};Object.defineProperty(en,\"__esModule\",{value:!0}),en.Clipboard=void 0;const tn=d;class nn extends tn.Base{async writeText(e){await this.wire.sendAction(\"clipboard-write-text\",e)}async readText(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-text\",{type:e});return t.data}async writeImage(e){await this.wire.sendAction(\"clipboard-write-image\",e)}async readImage(e={format:\"dataURL\"}){const{payload:t}=await this.wire.sendAction(\"clipboard-read-image\",e);return t.data}async writeHtml(e){await this.wire.sendAction(\"clipboard-write-html\",e)}async readHtml(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-html\",{type:e});return t.data}async writeRtf(e){await this.wire.sendAction(\"clipboard-write-rtf\",e)}async readRtf(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-rtf\",{type:e});return t.data}async write(e){await this.wire.sendAction(\"clipboard-write\",e)}async getAvailableFormats(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-formats\",{type:e});return t.data}}en.Clipboard=nn;var rn={},on={},sn={};Object.defineProperty(sn,\"__esModule\",{value:!0}),sn.ExternalApplication=void 0;const an=d;class cn extends an.EmitterBase{constructor(e,t){super(e,\"external-application\",t.uuid),this.identity=t}getInfo(){return this.wire.sendAction(\"get-external-application-info\",this.identity).then((({payload:e})=>e.data))}}sn.ExternalApplication=cn,Object.defineProperty(on,\"__esModule\",{value:!0}),on.ExternalApplicationModule=void 0;const dn=d,hn=sn;class ln extends dn.Base{wrap(e){return this.wire.sendAction(\"external-application-wrap\").catch((e=>{})),Promise.resolve(new hn.ExternalApplication(this.wire,{uuid:e}))}wrapSync(e){return this.wire.sendAction(\"external-application-wrap-sync\").catch((e=>{})),new hn.ExternalApplication(this.wire,{uuid:e})}}on.ExternalApplicationModule=ln,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(on,e),n(sn,e)}(rn);var un={},pn={},wn={};Object.defineProperty(wn,\"__esModule\",{value:!0}),wn._Frame=void 0;const yn=d;class fn extends yn.EmitterBase{constructor(e,t){super(e,\"frame\",t.uuid,t.name),this.identity=t}getInfo(){return this.wire.sendAction(\"get-frame-info\",this.identity).then((({payload:e})=>e.data))}getParentWindow(){return this.wire.sendAction(\"get-parent-window\",this.identity).then((({payload:e})=>e.data))}}wn._Frame=fn,Object.defineProperty(pn,\"__esModule\",{value:!0}),pn._FrameModule=void 0;const gn=d,mn=O,vn=wn;class Cn extends gn.Base{async wrap(e){this.wire.sendAction(\"frame-wrap\").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}wrapSync(e){this.wire.sendAction(\"frame-wrap-sync\").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}getCurrent(){return this.wire.sendAction(\"frame-get-current\").catch((e=>{})),Promise.resolve(new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity()))}getCurrentSync(){return this.wire.sendAction(\"frame-get-current-sync\").catch((e=>{})),new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity())}}pn._FrameModule=Cn,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(pn,e),n(wn,e)}(un);var bn={};Object.defineProperty(bn,\"__esModule\",{value:!0}),bn.GlobalHotkey=void 0;const In=d;class En extends In.EmitterBase{constructor(e){super(e,\"global-hotkey\")}async register(e,t){await this.on(e,t),await this.wire.sendAction(\"global-hotkey-register\",{hotkey:e})}async unregister(e){await this.removeAllListeners(e),await this.wire.sendAction(\"global-hotkey-unregister\",{hotkey:e})}async unregisterAll(){await Promise.all(this.eventNames().filter((e=>!(\"registered\"===e||\"unregistered\"===e))).map((e=>this.removeAllListeners(e)))),await this.wire.sendAction(\"global-hotkey-unregister-all\",{})}async isRegistered(e){const{payload:{data:t}}=await this.wire.sendAction(\"global-hotkey-is-registered\",{hotkey:e});return t}}bn.GlobalHotkey=En;var xn,An={},Pn={},Mn={},_n=s&&s.__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)};Object.defineProperty(Mn,\"__esModule\",{value:!0}),Mn.Platform=void 0;const On=d,Sn=O,Rn=new Map;class Fn extends On.EmitterBase{constructor(e,t){super(t.wire,\"application\",e.uuid),this.getClient=e=>{this.wire.sendAction(\"platform-get-client\",this.identity).catch((e=>{}));const t=e||this.identity,{uuid:n}=t;if(!Rn.has(n)){const e=_n(this,xn,\"f\").call(this,n);Rn.set(n,e)}return Rn.get(n)},xn.set(this,(async e=>{try{const t=`custom-frame-${e}`,n=await this._channel.connect(t,{wait:!1});return n.onDisconnection((()=>{Rn.delete(e)})),n}catch(t){throw Rn.delete(e),new Error(\"The targeted Platform is not currently running. Listen for application-started event for the given Uuid.\")}})),this.launchLegacyManifest=this.launchContentManifest;const n=(0,Sn.validateIdentity)(e);if(n)throw new Error(n);this._channel=t,this.identity={uuid:e.uuid},this.Layout=this.fin.Platform.Layout,this.Application=this.fin.Application.wrapSync(this.identity)}async createView(e,t,n){this.wire.sendAction(\"platform-create-view\",this.identity).catch((e=>{}));const i=await this.getClient(),r=await i.dispatch(\"create-view\",{target:t,opts:e,targetView:n});if(!r||(0,Sn.validateIdentity)(r.identity))throw new Error(`When overwriting the createView call, please return an object that has a valid 'identity' property: ${JSON.stringify(r)}`);return this.fin.View.wrapSync(r.identity)}async createWindow(e){this.wire.sendAction(\"platform-create-window\",this.identity).catch((e=>{}));const t=await this.getClient();e.reason||(e.reason=\"api-call\");const n=await t.dispatch(\"create-view-container\",e);if(!n||(0,Sn.validateIdentity)(n.identity))throw new Error(`When overwriting the createWindow call, please return an object that has a valid 'identity' property: ${JSON.stringify(n)}`);const{identity:i}=n,r=this.fin.Window.wrapSync(i);return r.name=i.name,r.uuid=i.uuid,r}async quit(){this.wire.sendAction(\"platform-quit\",this.identity).catch((e=>{}));return(await this.getClient()).dispatch(\"quit\")}async closeView(e){this.wire.sendAction(\"platform-close-view\",this.identity).catch((e=>{}));const t=await this.getClient();await t.dispatch(\"close-view\",{view:e})}async reparentView(e,t){console.warn(\"Platform.reparentView has been deprecated, please use Platform.createView\"),this.wire.sendAction(\"platform-reparent-view\",this.identity).catch((e=>{}));const n={...e,uuid:e.uuid??this.identity.uuid},i=await this.fin.View.wrap(n),r=await i.getOptions();return this.createView(r,t)}async getSnapshot(){this.wire.sendAction(\"platform-get-snapshot\",this.identity).catch((e=>{}));return(await this.getClient()).dispatch(\"get-snapshot\")}async getViewSnapshot(e){return(await this.getClient()).dispatch(\"get-view-snapshot\",{viewIdentity:e})}async applySnapshot(e,t){this.wire.sendAction(\"platform-apply-snapshot\",this.identity).catch((e=>{}));const n=\"Requested snapshot must be a valid Snapshot object, or a url or filepath to such an object.\";let i;if(\"string\"==typeof e)try{i=(await this._channel.wire.sendAction(\"get-application-manifest\",{manifestUrl:e})).payload.data}catch(e){throw new Error(`${n}: ${e}`)}else i=e;if(!i.windows)throw new Error(n);const r=await this.getClient();return await r.dispatch(\"apply-snapshot\",{snapshot:i,options:t}),this}async fetchManifest(e){return(await this.getClient()).dispatch(\"platform-fetch-manifest\",{manifestUrl:e})}async launchContentManifest(e){this.wire.sendAction(\"platform-launch-content-manifest\",this.identity).catch((()=>{}));const t=await this.getClient(),n=await this.fetchManifest(e);return t.dispatch(\"launch-into-platform\",{manifest:n,manifestUrl:e}),this}async setWindowContext(e={},t){if(this.wire.sendAction(\"platform-set-window-context\",this.identity).catch((e=>{})),!e)throw new Error(\"Please provide a serializable object or string to set the context.\");const n=await this.getClient(),{entityType:i}=t?await this.fin.System.getEntityInfo(t.uuid,t.name):this.fin.me;await n.dispatch(\"set-window-context\",{context:e,entityType:i,target:t||{uuid:this.fin.me.uuid,name:this.fin.me.name}})}async getWindowContext(e){this.wire.sendAction(\"platform-get-window-context\",this.identity).catch((e=>{}));const t=await this.getClient(),{entityType:n}=e?await this.fin.System.getEntityInfo(e.uuid,e.name):this.fin.me;return t.dispatch(\"get-window-context\",{target:e||{uuid:this.fin.me.uuid,name:this.fin.me.name},entityType:n})}async closeWindow(e,t={skipBeforeUnload:!1}){this.wire.sendAction(\"platform-close-window\",this.identity).catch((e=>{}));return(await this.getClient()).dispatch(\"close-window\",{windowId:e,options:t})}}Mn.Platform=Fn,xn=new WeakMap;var jn={},kn={},Ln={},Tn={};function $n(e){switch(e){case\"columns\":case\"grid\":case\"rows\":case\"tabs\":return!0;default:return!1}}Object.defineProperty(Tn,\"__esModule\",{value:!0}),Tn.overrideFromComposables=Tn.isValidPresetType=void 0,Tn.isValidPresetType=$n,Tn.overrideFromComposables=function(...e){return t=>e.reduceRight(((e,t)=>n=>t(e(n))),(e=>e))(t)},Tn.default={isValidPresetType:$n};var Bn={},Gn={},Wn={};Object.defineProperty(Wn,\"__esModule\",{value:!0}),Wn.ApiConsumer=void 0;Wn.ApiConsumer=class{constructor(e){this.strategy=e,this.consume=async e=>(await this.strategy.getExposedFunctions(e)).reduce(((t,n)=>({...t,[n.key]:this.strategy.createFunction(n,e)})),{})}};var Hn={},Nn={};Object.defineProperty(Nn,\"__esModule\",{value:!0}),Nn.expose=Nn.getExposedProperties=void 0;const Dn=Symbol(\"exposedProperties\");Nn.getExposedProperties=e=>e[Dn]||e.prototype[Dn]||[];Nn.expose=e=>(t,n,i)=>{t[Dn]=t[Dn]||[],t[Dn].push({key:n,descriptor:i,options:e})},Object.defineProperty(Hn,\"__esModule\",{value:!0}),Hn.ApiExposer=void 0;const Un=Nn;Hn.ApiExposer=class{constructor(e){this.strategy=e,this.exposeInstance=async(e,t)=>{const n=(0,Un.getExposedProperties)(e),i=await Promise.all(n.map((async({key:n,options:i})=>({key:n,options:await this.strategy.exposeFunction(e[n].bind(e),{key:n,options:i,meta:t})}))));await this.strategy.exposeMeta(t,i)}}};var Vn={},zn={},Kn={};Object.defineProperty(Kn,\"__esModule\",{value:!0}),Kn.ChannelsConsumer=void 0;Kn.ChannelsConsumer=class{constructor(e){this.channel=e,this.getExposedFunctions=async e=>{const{id:t}=e,{props:n}=await this.channel.dispatch(`api-meta:${t}`);return n},this.createFunction=e=>(...t)=>{const{action:n}=e.options;return this.channel.dispatch(n,{args:t})}}};var qn={};Object.defineProperty(qn,\"__esModule\",{value:!0}),qn.ChannelsExposer=void 0;qn.ChannelsExposer=class{constructor(e){this.channelProviderOrClient=e,this.exposeFunction=async(e,t)=>{const{key:n,options:i,meta:r}=t,{id:o}=r,s=`${o}.${i?.action||n}`;return await this.channelProviderOrClient.register(s,(async({args:t})=>e(...t))),{action:s}},this.exposeMeta=async({id:e},t)=>{const n=`api-meta:${e}`;await this.channelProviderOrClient.register(n,(()=>({props:t})))}}},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Kn,e),n(qn,e)}(zn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(zn,e)}(Vn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Wn,e),n(Hn,e),n(Vn,e),n(Nn,e)}(Gn);var Jn={};Object.defineProperty(Jn,\"__esModule\",{value:!0}),Jn.createRelayedDispatch=exports.relayChannelClientApi_1=Jn.relayChannelClientApi=void 0;const Yn=[\"no longer connected\",\"RTCDataChannel closed unexpectedly\",\"The client you are trying to dispatch from is disconnected from the target provider\"];exports.relayChannelClientApi_1=Jn.relayChannelClientApi=async(e,t)=>{e.register(`relay:${t}`,(({action:t,target:n,payload:i})=>e.dispatch(n,t,i))),await Promise.resolve()};Jn.createRelayedDispatch=(e,t,n,i)=>async(r,o)=>{try{return await e.dispatch(`relay:${n}`,{action:r,payload:o,target:t})}catch(e){if(s=e.message,Yn.some((e=>s.includes(e)))&&i)throw new Error(i);throw e}var s};var Zn,Qn,Xn,ei=s&&s.__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},ti=s&&s.__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)};Object.defineProperty(Bn,\"__esModule\",{value:!0}),Bn.ColumnOrRow=Bn.TabStack=Bn.LayoutNode=void 0;const ni=Gn,ii=Jn;class ri{constructor(e,t){Zn.set(this,void 0),this.isRoot=()=>ti(this,Zn,\"f\").isRoot(this.entityId),this.exists=()=>ti(this,Zn,\"f\").exists(this.entityId),this.getParent=async()=>{const e=await ti(this,Zn,\"f\").getParent(this.entityId);if(e)return ri.getEntity(e,ti(this,Zn,\"f\"))},this.createAdjacentStack=async(e,t)=>{const n=await ti(this,Zn,\"f\").createAdjacentStack(this.entityId,e,t);return ri.getEntity({entityId:n,type:\"stack\"},ti(this,Zn,\"f\"))},this.getAdjacentStacks=async e=>(await ti(this,Zn,\"f\").getAdjacentStacks({targetId:this.entityId,edge:e})).map((e=>ri.getEntity({type:\"stack\",entityId:e.entityId},ti(this,Zn,\"f\")))),ei(this,Zn,e,\"f\"),this.entityId=t}}Bn.LayoutNode=ri,Zn=new WeakMap,ri.newLayoutEntitiesClient=async(e,t,n)=>{const i=(0,ii.createRelayedDispatch)(e,n,\"layout-relay\",\"You are trying to interact with a layout component on a window that does not exist or has been destroyed.\");return new ni.ApiConsumer(new ni.ChannelsConsumer({dispatch:i})).consume({id:t})},ri.getEntity=(e,t)=>{const{entityId:n,type:i}=e;switch(i){case\"column\":case\"row\":return new si(t,n,i);case\"stack\":return new oi(t,n);default:throw new Error(`Unrecognised Layout Entity encountered ('${JSON.stringify(e)})`)}};class oi extends ri{constructor(e,t){super(e,t),Qn.set(this,void 0),this.type=\"stack\",this.getViews=()=>ti(this,Qn,\"f\").getStackViews(this.entityId),this.addView=async(e,t={index:0})=>ti(this,Qn,\"f\").addViewToStack(this.entityId,e,t),this.removeView=async e=>{await ti(this,Qn,\"f\").removeViewFromStack(this.entityId,e)},this.setActiveView=async e=>{await ti(this,Qn,\"f\").setStackActiveView(this.entityId,e)},ei(this,Qn,e,\"f\")}}Bn.TabStack=oi,Qn=new WeakMap;class si extends ri{constructor(e,t,n){super(e,t),Xn.set(this,void 0),this.getContent=async()=>(await ti(this,Xn,\"f\").getContent(this.entityId)).map((e=>ri.getEntity(e,ti(this,Xn,\"f\")))),ei(this,Xn,e,\"f\"),this.type=n}}Bn.ColumnOrRow=si,Xn=new WeakMap;var ai={};Object.defineProperty(ai,\"__esModule\",{value:!0}),ai.DEFAULT_LAYOUT_KEY=ai.LAYOUT_CONTROLLER_ID=void 0,ai.LAYOUT_CONTROLLER_ID=\"layout-entities\",ai.DEFAULT_LAYOUT_KEY=\"__default__\";var ci,di,hi,li=s&&s.__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)};Object.defineProperty(Ln,\"__esModule\",{value:!0}),Ln.Layout=void 0;const ui=G,pi=O,wi=d,yi=Tn,fi=Bn,gi=ai;class mi extends wi.Base{static getClient(e){return li(e,di,\"f\").getValue()}constructor(e,t){super(t),ci.add(this),di.set(this,new ui.Lazy((async()=>fi.LayoutNode.newLayoutEntitiesClient(await this.platform.getClient(),gi.LAYOUT_CONTROLLER_ID,this.identity)))),this.replace=async e=>{this.wire.sendAction(\"layout-replace\").catch((e=>{}));const t=await this.platform.getClient();await t.dispatch(\"replace-layout\",{target:this.identity,opts:{layout:e}})},this.replaceView=async(e,t)=>{this.wire.sendAction(\"layout-replace-view\").catch((e=>{}));const n=await this.platform.getClient();await n.dispatch(\"replace-view\",{target:this.identity,opts:{viewToReplace:e,newView:t}})},this.applyPreset=async e=>{this.wire.sendAction(\"layout-apply-preset\").catch((e=>{}));const t=await this.platform.getClient(),{presetType:n}=e;if(!n||!(0,yi.isValidPresetType)(n))throw new Error(\"Cannot apply preset layout, please include an applicable presetType property in the PresetLayoutOptions.\");await t.dispatch(\"apply-preset-layout\",{target:this.identity,opts:{presetType:n}})};const n=(0,pi.validateIdentity)(e);if(n)throw new Error(n);this.identity=e,this.platform=this.fin.Platform.wrapSync({uuid:e.uuid}),e.uuid===this.fin.me.uuid&&e.name===this.fin.me.name&&(this.init=this.fin.Platform.Layout.init)}async getConfig(){this.wire.sendAction(\"layout-get-config\").catch((e=>{}));return(await this.platform.getClient()).dispatch(\"get-frame-snapshot\",{target:this.identity})}async getCurrentViews(){this.wire.sendAction(\"layout-get-views\").catch((e=>{}));const e=await this.platform.getClient();return(await e.dispatch(\"get-layout-views\",{target:this.identity})).map((e=>this.fin.View.wrapSync(e)))}async getRootItem(){this.wire.sendAction(\"layout-get-root-item\").catch((()=>{}));const e=await li(this,di,\"f\").getValue(),t=await e.getRoot(\"layoutName\"in this.identity?this.identity:void 0);return fi.LayoutNode.getEntity(t,e)}async getStackByViewIdentity(e){this.wire.sendAction(\"layout-get-stack-by-view\").catch((()=>{}));const t=await li(this,di,\"f\").getValue(),n=await t.getStackByView(e);if(!n)throw new Error(`No stack found for view: ${e.uuid}/${e.name}`);return fi.LayoutNode.getEntity(n,t)}async addView(e,{location:t,targetView:n}={}){this.wire.sendAction(\"layout-add-view\").catch((e=>{}));const{identity:i}=await li(this,ci,\"m\",hi).call(this,\"layout-add-view\",{viewOptions:e,location:t,targetView:n});return{identity:i}}async closeView(e){this.wire.sendAction(\"layout-close-view\").catch((e=>{})),await li(this,ci,\"m\",hi).call(this,\"layout-close-view\",{viewIdentity:e})}}Ln.Layout=mi,di=new WeakMap,ci=new WeakSet,hi=async function(e,t){return(await this.platform.getClient()).dispatch(e,{target:this.identity,opts:t})};var vi,Ci,bi,Ii,Ei,xi=s&&s.__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)},Ai=s&&s.__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};Object.defineProperty(kn,\"__esModule\",{value:!0}),kn.LayoutModule=void 0;const Pi=d,Mi=Ln,_i=ai;class Oi extends Pi.Base{constructor(){super(...arguments),vi.add(this),Ci.set(this,!1),bi.set(this,null),this.init=async(e={})=>{if(this.wire.sendAction(\"layout-init\").catch((e=>{})),!this.wire.environment.layoutAllowedInContext(this.fin))throw new Error(\"Layout.init can only be called from a Window context.\");if(xi(this,Ci,\"f\"))throw new Error(\"Layout.init was already called, please use Layout.create to add additional layouts.\");\"openfin\"===this.wire.environment.type&&await this.fin.Platform.getCurrentSync().getClient(),Ai(this,Ci,!0,\"f\"),Ai(this,bi,await this.wire.environment.initLayoutManager(this.fin,this.wire,e),\"f\"),await this.wire.environment.applyLayoutSnapshot(this.fin,xi(this,bi,\"f\"),e);const t={name:this.fin.me.name,uuid:this.fin.me.uuid};if(!e.layoutManagerOverride){const e={layoutName:_i.DEFAULT_LAYOUT_KEY,...t};return xi(this,Ii,\"f\").call(this,e)}return this.wrapSync(t)},Ii.set(this,(e=>{const t=\"[Layout] You are using a deprecated property `layoutManager` - it will throw if you access it starting in v37.\",n=new Proxy({},{get(e,n){throw console.warn(`[Layout-mgr-proxy] accessing ${n.toString()}`),new Error(t)}}),i=Object.assign(this.wrapSync(e),{layoutManager:n});return new Proxy(i,{get(e,n){if(\"layoutManager\"===n)throw console.warn(`[Layout-proxy] accessing ${n.toString()}`),new Error(t);return e[n]}})})),this.getCurrentLayoutManagerSync=()=>xi(this,vi,\"m\",Ei).call(this,\"fin.Platform.Layout.getCurrentLayoutManagerSync()\"),this.create=async e=>this.wire.environment.createLayout(xi(this,vi,\"m\",Ei).call(this,\"fin.Platform.Layout.create()\"),e),this.destroy=async e=>this.wire.environment.destroyLayout(xi(this,vi,\"m\",Ei).call(this,\"fin.Platform.Layout.destroy()\"),e)}async wrap(e){return this.wire.sendAction(\"layout-wrap\").catch((e=>{})),new Mi.Layout(e,this.wire)}wrapSync(e){return this.wire.sendAction(\"layout-wrap-sync\").catch((e=>{})),new Mi.Layout(e,this.wire)}async getCurrent(){if(this.wire.sendAction(\"layout-get-current\").catch((e=>{})),\"openfin\"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error(\"You are not in a Window context. Only Windows can have a Layout.\");const{uuid:e,name:t}=this.fin.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction(\"layout-get-current-sync\").catch((e=>{})),\"openfin\"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error(\"You are not in a Window context. Only Windows can have a Layout.\");const{uuid:e,name:t}=this.fin.me;return this.wrapSync({uuid:e,name:t})}async getLayoutByViewIdentity(e){this.wire.sendAction(\"layout-get-by-view-identity\").catch((()=>{}));let t=await this.wire.environment.getViewWindowIdentity(this.fin,e);t.identity&&(t=t.identity);try{const n=this.wrapSync(t),i=await Mi.Layout.getClient(n),r=await i.getLayoutIdentityForViewOrThrow(e);return this.wrapSync(r)}catch(n){if(![\"No action registered at target for\",\"getLayoutIdentityForViewOrThrow is not a function\"].some((e=>n.message.includes(e))))throw n;if(t.uuid===t.name)throw new Error(`View identity ${JSON.stringify(e)} is not attached to any layout in provider window ${JSON.stringify(t)}.`);return this.wrapSync(t)}}}kn.LayoutModule=Oi,Ci=new WeakMap,bi=new WeakMap,Ii=new WeakMap,vi=new WeakSet,Ei=function(e){if(!xi(this,bi,\"f\"))throw new Error(`You must call init before using the API ${e}`);return xi(this,bi,\"f\")},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(kn,e),n(Ln,e)}(jn),Object.defineProperty(Pn,\"__esModule\",{value:!0}),Pn.PlatformModule=void 0;const Si=d,Ri=Mn,Fi=jn;class ji extends Si.Base{constructor(e,t){super(e),this._channel=t,this.Layout=new Fi.LayoutModule(this.wire)}async init(e){if(!fin.__internal_.isPlatform||fin.me.name!==fin.me.uuid)throw new Error(\"fin.Platform.init should only be called from a custom platform provider running in the main window of the application.\");return this.wire.environment.initPlatform(this.fin,e)}async wrap(e){return this.wire.sendAction(\"platform-wrap\").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}wrapSync(e){return this.wire.sendAction(\"platform-wrap-sync\").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}async getCurrent(){return this.wire.sendAction(\"platform-get-current\").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction(\"platform-get-current-sync\").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}start(e){return this.wire.sendAction(\"platform-start\").catch((e=>{})),new Promise((async(t,n)=>{try{const{uuid:n}=e,i=await this.fin.Application._create({...e,isPlatformController:!0});i.once(\"platform-api-ready\",(()=>t(this.wrapSync({uuid:n})))),i._run({uuid:n})}catch(e){n(e)}}))}startFromManifest(e,t){return this.wire.sendAction(\"platform-start-from-manifest\").catch((e=>{})),new Promise((async(n,i)=>{try{const i=await this.fin.Application._createFromManifest(e);i.once(\"platform-api-ready\",(()=>n(this.wrapSync({uuid:i.identity.uuid})))),i._run(t)}catch(e){i(e)}}))}}Pn.PlatformModule=ji,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Pn,e),n(Mn,e)}(An);var ki={};!function(e){Object.defineProperty(e,\"__esModule\",{value:!0}),e.getMe=e.getBaseMe=e.environmentUnsupportedMessage=void 0;const t=J(),n=un,i=ie(),r=rn;function o(e,t,n){return{...{isView:\"view\"===e,isWindow:\"window\"===e,isFrame:\"iframe\"===e,isExternal:\"external connection\"===e},uuid:t,name:n,entityType:e}}e.environmentUnsupportedMessage=\"You are not running in OpenFin.\",e.getBaseMe=o,e.getMe=function(s){const{uuid:a,name:c,entityType:d}=s.me,h={setContext(){throw new Error(e.environmentUnsupportedMessage)},addContextHandler(){throw new Error(e.environmentUnsupportedMessage)},getContextGroups(){throw new Error(e.environmentUnsupportedMessage)},joinContextGroup(){throw new Error(e.environmentUnsupportedMessage)},removeFromContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getAllClientsInContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getInfoForContextGroup(){throw new Error(e.environmentUnsupportedMessage)}},l=\"Interop API has not been instantiated. Either connection has failed or you have not declared interop in your config.\",u={setContext(){throw new Error(l)},addContextHandler(){throw new Error(l)},getContextGroups(){throw new Error(l)},joinContextGroup(){throw new Error(l)},removeFromContextGroup(){throw new Error(l)},getAllClientsInContextGroup(){throw new Error(l)},getInfoForContextGroup(){throw new Error(l)}},p={eventNames:()=>{throw new Error(e.environmentUnsupportedMessage)},emit:()=>{throw new Error(e.environmentUnsupportedMessage)},listeners:()=>{throw new Error(e.environmentUnsupportedMessage)},listenerCount:()=>{throw new Error(e.environmentUnsupportedMessage)},on:()=>{throw new Error(e.environmentUnsupportedMessage)},addListener:()=>{throw new Error(e.environmentUnsupportedMessage)},once:()=>{throw new Error(e.environmentUnsupportedMessage)},prependListener:()=>{throw new Error(e.environmentUnsupportedMessage)},prependOnceListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeAllListeners:()=>{throw new Error(e.environmentUnsupportedMessage)}};switch(d){case\"view\":return Object.assign(new t.View(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case\"window\":return Object.assign(new i._Window(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case\"iframe\":return Object.assign(new n._Frame(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case\"external connection\":return Object.assign(new r.ExternalApplication(s,{uuid:a}),o(d,a,c),{interop:u,isOpenFin:!1});default:return{...o(d,a,c),...p,interop:h,isOpenFin:!1}}}}(ki);var Li={},Ti={},$i={};Object.defineProperty($i,\"__esModule\",{value:!0}),$i.createWarningObject=$i.createUnusableObject=void 0,$i.createUnusableObject=function(e){const t=()=>{throw new Error(e)};return new Proxy({},{apply:t,construct:t,defineProperty:t,deleteProperty:t,get:t,getOwnPropertyDescriptor:t,getPrototypeOf:t,has:t,isExtensible:t,ownKeys:t,preventExtensions:t,set:t,setPrototypeOf:t})},$i.createWarningObject=function(e,t){return new Proxy(t,{get:(...t)=>(console.warn(e),Reflect.get(...t)),set:(...t)=>(console.warn(e),Reflect.set(...t)),getOwnPropertyDescriptor:(...t)=>(console.warn(e),Reflect.getOwnPropertyDescriptor(...t)),ownKeys:(...t)=>(console.warn(e),Reflect.ownKeys(...t))})};var Bi,Gi={},Wi={};var Hi={};!function(e){Object.defineProperty(e,\"__esModule\",{value:!0}),e.wrapIntentHandler=e.BROKER_ERRORS=e.generateOverrideWarning=e.generateOverrideError=e.wrapContextHandler=e.wrapInTryCatch=e.generateId=void 0;e.generateId=()=>`${Math.random()}${Date.now()}`;e.wrapInTryCatch=(e,t)=>(...n)=>{try{return e(...n)}catch(e){throw new Error((t||\"\")+e)}};e.wrapContextHandler=(e,t)=>async n=>{try{await e(n)}catch(e){throw console.error(`Error thrown by handler ${t} for context type ${n.type}: ${e}`),e}};e.generateOverrideError=(e,t)=>`You have tried to to use ${e} but ${t} has not been overridden in the Interop Broker. Please override this function. Refer to our documentation for more info.`;e.generateOverrideWarning=(e,t,n,i)=>{const{uuid:r,name:o}=n;return i?`Entity with identity: ${r}/${o} has called ${i} or ${e} but ${t} has not been overridden.`:`Entity with identity: ${r}/${o} has called ${e} but ${t} has not been overridden.`},e.BROKER_ERRORS={fireIntent:(0,e.generateOverrideError)(\"fireIntent\",\"handleFiredIntent\"),fireIntentForContext:(0,e.generateOverrideError)(\"fireIntentForContext\",\"handleFiredIntentForContext\"),getInfoForIntent:(0,e.generateOverrideError)(\"getInfoForIntent\",\"handleInfoForIntent\"),getInfoForIntentsByContext:(0,e.generateOverrideError)(\"getInfoForIntentsByContext\",\"handleInfoForIntentsByContext\"),joinSessionContextGroupWithJoinContextGroup:\"The Context Group you have tried to join is a Session Context Group. Custom Context Groups can only be defined by the Interop Broker through code or manifest configuration. Please use joinSessionContextGroup.\",fdc3Open:(0,e.generateOverrideError)(\"fdc3.open\",\"fdc3HandleOpen\"),fdc3FindInstances:(0,e.generateOverrideError)(\"fdc3.findInstances\",\"fdc3HandleFindInstances\"),fdc3GetAppMetadata:(0,e.generateOverrideError)(\"fdc3.getAppMetadata\",\"fdc3HandleGetAppMetadata\"),fdc3GetInfo:(0,e.generateOverrideError)(\"fdc3.getInfo\",\"fdc3HandleGetInfo\")};e.wrapIntentHandler=(e,t)=>async n=>{try{return e(n)}catch(e){throw console.error(`Error thrown by handler ${t}: ${e}`),e}}}(Hi);var Ni,Di,Ui={};function Vi(){if(Di)return Gi;Di=1;var e,t,n,r=s&&s.__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},o=s&&s.__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)},a=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Gi,\"__esModule\",{value:!0}),Gi.InteropBroker=void 0;const c=d,h=a(function(){if(Bi)return Wi;Bi=1,Object.defineProperty(Wi,\"__esModule\",{value:!0});const e=Cr();return Wi.default=class{constructor(e,t){this.provider=e,this.id=t,this.lastContext=void 0,this.contextGroupMap=new Map,this.clients=new Map,this.registerListeners()}registerListeners(){this.provider.register(`sessionContextGroup:getContext-${this.id}`,this.getCurrentContext.bind(this)),this.provider.register(`sessionContextGroup:setContext-${this.id}`,this.setContext.bind(this)),this.provider.register(`sessionContextGroup:handlerAdded-${this.id}`,this.handlerAdded.bind(this)),this.provider.register(`sessionContextGroup:handlerRemoved-${this.id}`,this.handlerRemoved.bind(this))}getCurrentContext(e){return e.type?this.contextGroupMap.get(e.type):this.lastContext}setContext(t,n){const{context:i}=t,r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name} not in Session Client State Map`);this.contextGroupMap.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{e.contextHandlers.get(i.type)?.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getClientState(e){return this.clients.get(e.endpointId)}async handlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(i){const e=r.contextHandlers.get(i)||[];r.contextHandlers.set(i,[...e,n]);const o=this.contextGroupMap.get(i);o&&await this.provider.dispatch(t,n,o)}else{r.globalHandler=n;const e=[...this.contextGroupMap.keys()].map((async e=>{const i=this.contextGroupMap.get(e);i&&await this.provider.dispatch(t,n,i)}));await Promise.all(e)}}handlerRemoved(e,t){const{handlerId:n}=e,i=this.clients.get(t.endpointId);i?(Array.from(i.contextHandlers).forEach((([,e])=>{const t=e.indexOf(n);t>-1&&e.splice(t,1)})),i.globalHandler===n&&(i.globalHandler=void 0)):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={contextHandlers:new Map,clientIdentity:e,globalHandler:void 0};this.clients.set(e.endpointId,t)}}onDisconnection(e){this.clients.delete(e.endpointId)}},Wi}()),l=Hi,u=a(i),p=function(){if(Ni)return Ui;Ni=1,Object.defineProperty(Ui,\"__esModule\",{value:!0}),Ui.PrivateChannelProvider=void 0;const e=Vi();return Ui.PrivateChannelProvider=class t{constructor(e,t){this.provider=e,this.id=t,this.clients=new Map,this.registerListeners(),this.contextByContextType=new Map,this.lastContext=void 0,this.provider.onConnection((e=>this.registerNewClient(e))),this.provider.onDisconnection((async e=>{const{endpointId:t}=e;this.clients.has(t)&&await this.handleClientDisconnecting(e),0===(await this.provider.getAllClientInfo()).length&&this.provider.destroy()}))}getClientState(e){return this.clients.get(e.endpointId)}registerListeners(){this.provider.register(\"broadcast\",this.broadcast.bind(this)),this.provider.register(\"getCurrentContext\",this.getCurrentContext.bind(this)),this.provider.register(\"contextHandlerAdded\",this.contextHandlerAdded.bind(this)),this.provider.register(\"contextHandlerRemoved\",this.contextHandlerRemoved.bind(this)),this.provider.register(\"nonStandardHandlerRemoved\",this.nonStandardHandlerRemoved.bind(this)),this.provider.register(\"onAddContextHandlerAdded\",this.onAddContextHandlerAdded.bind(this)),this.provider.register(\"onDisconnectHandlerAdded\",this.onDisconnectHandlerAdded.bind(this)),this.provider.register(\"onUnsubscribeHandlerAdded\",this.onUnsubscribeHandlerAdded.bind(this)),this.provider.register(\"clientDisconnecting\",((e,t)=>{this.handleClientDisconnecting(t)}))}broadcast(t,n){const{context:i}=t;if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name}, tried to call broadcast, is not connected to this Private Channel`);const r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to broadcast - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);this.contextByContextType.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{const t=e.handlerIdsByContextTypes.get(i.type);t&&t.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getCurrentContext(e,t){const{contextType:n}=e;if(!this.getClientState(t))throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call getCurrentContext, is not connected to this Private Channel`);if(void 0!==n){return this.contextByContextType.get(n)||null}return this.lastContext?this.lastContext:null}contextHandlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call addContextListener, is not connected to this Private Channel`);if(i){const e=r.handlerIdsByContextTypes.get(i)||[];r.handlerIdsByContextTypes.set(i,[...e,n])}else r.globalHandler=n;Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&e.onAddContextListenerHandlerId&&this.provider.dispatch(e.clientIdentity,e.onAddContextListenerHandlerId,i)}))}async contextHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);if(i){let e;if(i.globalHandler===n)i.globalHandler=void 0;else for(const[t,r]of i.handlerIdsByContextTypes){const i=r.indexOf(n);i>-1&&(r.splice(i,1),e=t)}const r=(await this.getConnectedClients()).map((async n=>{const{clientIdentity:i,clientIdentity:{endpointId:r},onUnsubscribeHandlerId:o}=n;r!==t.endpointId&&o&&await this.provider.dispatch(i,o,e)}));try{await Promise.all(r)}catch(e){throw console.error(`Problem when attempting to dispatch to onUnsubscribeHandlers. Error: ${e} Removing Client: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}`),new Error(e)}}else console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}.`)}nonStandardHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);i?i.onDisconnectHandlerId===n?i.onDisconnectHandlerId=void 0:i.onAddContextListenerHandlerId===n?i.onAddContextListenerHandlerId=void 0:i.onUnsubscribeHandlerId===n&&(i.onUnsubscribeHandlerId=void 0):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}onAddContextHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onAddContextListener, is not connected to this Private Channel`);n.onAddContextListenerHandlerId=i,Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&Array.from(e.handlerIdsByContextTypes.keys()).forEach((e=>{this.provider.dispatch(t,i,e)}))}))}onDisconnectHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onDisconnect, is not connected to this Private Channel`);n.onDisconnectHandlerId=i}onUnsubscribeHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onUnsubscribe, is not connected to this Private Channel`);n.onUnsubscribeHandlerId=i}removeClient(e){const t=this.getClientState(e);if(!t)throw new Error(`Client with Identity: ${e.uuid} ${e.name}, tried to call disconnect, is not connected to this Private Channel`);t.handlerIdsByContextTypes.clear(),this.clients.delete(e.endpointId)}async fireOnDisconnectForOtherClients(e){const{endpointId:t}=e,n=(await this.getConnectedClients()).map((async e=>{const{clientIdentity:{endpointId:n},onDisconnectHandlerId:i}=e;n!==t&&i&&await this.provider.dispatch(e.clientIdentity,i)}));try{await Promise.all(n)}catch(t){throw console.error(`Problem when attempting to dispatch to onDisconnectHandlers. Error: ${t} Disconnecting Client: uuid: ${e.uuid}. name: ${e.name}. endpointId: ${e.endpointId}`),new Error(t)}}async unsubscribeAll(e){const{endpointId:t}=e,n=this.clients.get(t);if(n){const t=Array.from(n.handlerIdsByContextTypes.values()).flat(),i=n.globalHandler;if(t.length>0){const n=t.map((async t=>this.contextHandlerRemoved({handlerId:t},e)));try{await Promise.all(n)}catch(e){console.error(e.message)}}if(i)try{await this.contextHandlerRemoved({handlerId:i},e)}catch(e){console.error(e.message)}}}async handleClientDisconnecting(e){await this.unsubscribeAll(e),this.removeClient(e),await this.fireOnDisconnectForOtherClients(e)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={clientIdentity:e,handlerIdsByContextTypes:new Map,globalHandler:void 0,onAddContextListenerHandlerId:void 0,onUnsubscribeHandlerId:void 0,onDisconnectHandlerId:void 0};this.clients.set(e.endpointId,t)}}async getConnectedClients(){const e=await this.provider.getAllClientInfo();return Array.from(this.clients.values()).filter((t=>{const{uuid:n,name:i}=t.clientIdentity;return e.some((e=>i===e.name&&n===e.uuid))}))}static init(e,n){return new t(e,n)}},Ui}(),w=G,y=[{id:\"green\",displayMetadata:{color:\"#00CC88\",name:\"green\"}},{id:\"purple\",displayMetadata:{color:\"#8C61FF\",name:\"purple\"}},{id:\"orange\",displayMetadata:{color:\"#FF8C4C\",name:\"orange\"}},{id:\"red\",displayMetadata:{color:\"#FF5E60\",name:\"red\"}},{id:\"pink\",displayMetadata:{color:\"#FF8FB8\",name:\"pink\"}},{id:\"yellow\",displayMetadata:{color:\"#E9FF8F\",name:\"yellow\"}}];let f=class i extends c.Base{constructor(i,s,a){super(i),e.set(this,void 0),t.set(this,void 0),n.set(this,void 0),this.getProvider=()=>o(this,n,\"f\").getValue(),this.interopClients=new Map,this.contextGroupsById=new Map,r(this,t,a.contextGroups??[...y],\"f\"),r(this,e,a.fdc3Info,\"f\"),a?.logging&&(this.logging=a.logging),this.intentClientMap=new Map,this.lastContextMap=new Map,this.sessionContextGroupMap=new Map,r(this,n,new w.Lazy(s),\"f\"),this.setContextGroupMap(),this.setupChannelProvider()}static createClosedConstructor(...e){return class extends i{constructor(...t){if(t.length){const[n,i,r]=t;if(r&&\"object\"==typeof r&&!(0,u.default)(r,e[2]))return console.warn(\"You have modified the parameters of the InteropOverride constructor. This behavior is deprecated and will be removed in a future version. You can modify these options in your manifest. Please consult our Interop docs for guidance on migrating to the new override scheme.\"),void super(e[0],e[1],r);console.warn(\"You are attempting to pass arguments to the InteropOverride constructor. This is not necessary, and these passed arguments will be ignored. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.\")}super(...e)}}}setContext({context:e},t){this.wire.sendAction(\"interop-broker-set-context\").catch((e=>{}));const n=this.getClientState(t);if(!n||!n.contextGroupId)throw n?new Error(\"You must join a context group before you can set context.\"):new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);{const{contextGroupId:t}=n;this.setContextForGroup({context:e},t)}}setContextForGroup({context:e},t){this.wire.sendAction(\"interop-broker-set-context-for-group\").catch((e=>{}));const n=this.contextGroupsById.get(t);if(!n)throw new Error(`Unable to set context for context group that isn't in the context group mapping: ${t}.`);const r=i.checkContextIntegrity(e);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(e)}`);const o=e.type;n.set(o,e),this.lastContextMap.set(t,o);Array.from(this.interopClients.values()).filter((e=>e.contextGroupId===t)).forEach((t=>{for(const[,n]of t.contextHandlers)i.isContextTypeCompatible(o,n.contextType)&&this.invokeContextHandler(t.clientIdentity,n.handlerId,e)}))}getCurrentContext(e,t){this.wire.sendAction(\"interop-broker-get-current-context\").catch((e=>{}));const n=this.getClientState(t);if(!n?.contextGroupId)throw new Error(\"You must be a member of a context group to call getCurrentContext\");const{contextGroupId:i}=n,r=this.contextGroupsById.get(i),o=this.lastContextMap.get(i),s=e?.contextType??o;return r&&s?r.get(s):void 0}async joinContextGroup({contextGroupId:e,target:t},n){if(this.wire.sendAction(\"interop-broker-join-context-group\").catch((e=>{})),this.sessionContextGroupMap.has(e))throw new Error(l.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup);if(t){i.hasEndpointId(t)&&await this.addClientToContextGroup({contextGroupId:e},t);try{const n=this.channel.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name));if(!n.length)throw new Error(`Given Identity ${t.uuid} ${t.name} is not connected to the Interop Broker.`);n.length>1&&console.warn(`More than one connection found for identity ${t.uuid} ${t.name}`);const i=[];for(const t of n)i.push(this.addClientToContextGroup({contextGroupId:e},t));await Promise.all(i)}catch(e){throw new Error(e)}}else await this.addClientToContextGroup({contextGroupId:e},n)}async addClientToContextGroup({contextGroupId:e},t){this.wire.sendAction(\"interop-broker-add-client-to-context-group\").catch((e=>{}));const n=this.getClientState(t);if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(!this.getContextGroups().find((t=>t.id===e)))throw new Error(`Attempting to join a context group that does not exist: ${e}. You may only join existing context groups.`);if(n.contextGroupId!==e){n.contextGroupId=e,await this.setCurrentContextGroupInClientOptions(t,e);const i=this.contextGroupsById.get(e);for(const[,e]of n.contextHandlers){const{contextType:n,handlerId:r}=e;if(void 0===n)i.forEach(((e,n)=>{this.invokeContextHandler(t,r,e)}));else if(i.has(n)){const e=i.get(n);e&&this.invokeContextHandler(t,r,e)}}}}async removeFromContextGroup({target:e},t){if(this.wire.sendAction(\"interop-broker-remove-from-context-group\").catch((e=>{})),e){i.hasEndpointId(e)&&await this.removeClientFromContextGroup(e);try{const t=this.channel.connections.filter((t=>t.uuid===e.uuid&&t.name===e.name));if(!t.length)throw new Error(`No connection found for given Identity ${e.uuid} ${e.name}`);t.length>1&&console.warn(`More than one connection found for identity ${e.uuid} ${e.name}`);const n=[];for(const e of t)n.push(this.removeClientFromContextGroup(e));await Promise.all(n)}catch(e){throw new Error(e)}}else await this.removeClientFromContextGroup(t)}async removeClientFromContextGroup(e){this.wire.sendAction(\"interop-broker-remove-client-from-context-group\").catch((e=>{}));const t=this.getClientState(e);t&&(t.contextGroupId=void 0),await this.setCurrentContextGroupInClientOptions(e,null)}getContextGroups(){return this.wire.sendAction(\"interop-broker-get-context-groups\").catch((e=>{})),o(this,t,\"f\").map((e=>({...e})))}getInfoForContextGroup({contextGroupId:e}){return this.wire.sendAction(\"interop-broker-get-info-for-context-group\").catch((e=>{})),this.getContextGroups().find((t=>t.id===e))}getAllClientsInContextGroup({contextGroupId:e}){this.wire.sendAction(\"interop-broker-get-all-clients-in-context-group\").catch((e=>{}));return Array.from(this.interopClients.values()).filter((t=>t.contextGroupId===e)).map((e=>e.clientIdentity))}async handleFiredIntent(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.raiseIntent\",\"InteropBroker.handleFiredIntent\",t,\"interopClient.fireIntent\");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntent)}async setIntentTarget(e,t){this.wire.sendAction(\"interop-broker-set-intent-target\").catch((e=>{}));const n=this.intentClientMap.get(t.name),i=`intent-handler-${e.name}`;if(n){const t=n.get(i);if(t){if(t.pendingIntents.push(e),t.clientIdentity&&t.isReady){const{clientIdentity:e,pendingIntents:n}=t;try{const r=n[n.length-1];await this.invokeIntentHandler(e,i,r),t.pendingIntents=[]}catch(n){console.error(`Error invoking intent handler for client ${e.uuid}/${e.name}/${e.endpointId}`),t.isReady=!1}}}else n.set(i,{isReady:!1,pendingIntents:[e]})}else{this.intentClientMap.set(t.name,new Map);const n=this.intentClientMap.get(t.name);n&&n.set(i,{isReady:!1,pendingIntents:[e]})}}async handleInfoForIntent(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.findIntent\",\"InteropBroker.handleInfoForIntent\",t,\"interopClient.getInfoForIntent\");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntent)}async handleInfoForIntentsByContext(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.findIntentsByContext\",\"InteropBroker.handleInfoForIntentsByContext\",t,\"interopClient.getInfoForIntentsByContext\");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntentsByContext)}async handleFiredIntentForContext(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.raiseIntentForContext\",\"InteropBroker.handleFiredIntentForContext\",t,\"interopClient.fireIntentForContext\");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntentForContext)}async clientDisconnected(e){}async fdc3HandleOpen({app:e,context:t},n){const i=(0,l.generateOverrideWarning)(\"fdc3.open\",\"InteropBroker.fdc3HandleOpen\",n);throw console.warn(i),new Error(l.BROKER_ERRORS.fdc3Open)}async fdc3HandleFindInstances(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.open\",\"InteropBroker.fdc3HandleFindInstances\",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3FindInstances)}async fdc3HandleGetAppMetadata(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.getAppMetadata\",\"InteropBroker.fdc3HandleGetAppMetadata\",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3GetAppMetadata)}async invokeContextHandler(e,t,n){const i=await this.getProvider();try{await i.dispatch(e,t,n)}catch(i){console.error(`Error invoking context handler ${t} for context type ${n.type} in client ${e.uuid}/${e.name}/${e.endpointId}`,i)}}async invokeIntentHandler(e,t,n){const i=await this.getProvider();await i.dispatch(e,t,n)}async fdc3HandleGetInfo(t,n){const{fdc3Version:i}=t;return{fdc3Version:i,...o(this,e,\"f\"),optionalFeatures:{OriginatingAppMetadata:!1,UserChannelMembershipAPIs:!0},appMetadata:{appId:\"\",instanceId:\"\"}}}async getAllClientInfo(){return(await this.getProvider()).getAllClientInfo()}decorateSnapshot(e){return{...e,interopSnapshotDetails:{contextGroupStates:this.getContextGroupStates()}}}applySnapshot(e,t){const n=e?.interopSnapshotDetails?.contextGroupStates;n&&(t?.closeExistingWindows||this.updateExistingClients(n),this.rehydrateContextGroupStates(n))}updateExistingClients(e){this.interopClients.forEach((t=>{const{clientIdentity:n,contextGroupId:r,contextHandlers:o}=t;if(r){const t=e[r];for(const[,e]of Object.entries(t))o.forEach((t=>{const{handlerId:r,contextType:o}=t;i.isContextTypeCompatible(e.type,o)&&this.invokeContextHandler(n,r,e)}))}}))}getContextGroupStates(){return i.toObject(this.contextGroupsById)}rehydrateContextGroupStates(e){const t=Object.entries(e);for(const[e,n]of t){const t=Object.entries(n);for(const[n,i]of t)if(this.contextGroupsById.has(e)){this.contextGroupsById.get(e).set(n,i)}else console.warn(`Attempting to set a context group that isn't in the context group mapping. Skipping context group rehydration for: ${e}`)}}contextHandlerRegistered({contextType:e,handlerId:t},n){const i={contextType:e,handlerId:t},r=this.getClientState(n);if(r?.contextHandlers.set(t,i),r&&r.contextGroupId){const{contextGroupId:i}=r,o=this.contextGroupsById.get(i);if(void 0===e)o.forEach(((e,i)=>{this.invokeContextHandler(n,t,e)}));else if(o.has(e)){const i=o.get(e);i&&this.invokeContextHandler(n,t,i)}}}async intentHandlerRegistered(e,t){const{handlerId:n}=e,i=this.intentClientMap.get(t.name),r=i?.get(n);if(i)if(r){const{pendingIntents:e}=r;r.clientIdentity=t,r.isReady=!0;try{if(e.length>0){const i=e[e.length-1];await this.invokeIntentHandler(t,n,i),r.pendingIntents=[]}}catch(e){console.error(`Error invoking intent handler: ${n} for client ${t.uuid}/${t.name}/${t.endpointId}`)}}else i.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t});else{this.intentClientMap.set(t.name,new Map);const e=this.intentClientMap.get(t.name);e&&e.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t})}}removeContextHandler({handlerId:e},t){const n=this.getClientState(t);n&&n.contextHandlers.delete(e)}handleJoinSessionContextGroup({sessionContextGroupId:e},t){try{if(!e)throw new Error(\"Failed to join session context group: must specify group id.\");const n=this.sessionContextGroupMap.get(e);if(n)n.registerNewClient(t);else{const n=new h.default(this.channel,e);n.registerNewClient(t),this.sessionContextGroupMap.set(e,n)}return{hasConflict:this.contextGroupsById.has(e)}}catch(e){throw new Error(e)}}getClientState(e){return this.interopClients.get(e.endpointId)}static toObject(e){const t=Object.fromEntries(e),n={};return Object.entries(t).forEach((([e,t])=>{const i=Object.fromEntries(t);n[e]=i})),n}static checkContextIntegrity(e){if(!e)return{isValid:!1,reason:\"No context supplied\"};if(\"object\"!=typeof e)return{isValid:!1,reason:\"Context must be an Object\"};if(!e.type)return{isValid:!1,reason:\"Context must have a type property\"};if(e.id&&\"object\"!=typeof e.id)return{isValid:!1,reason:\"Context id must be an Object populated with key-value identifiers (if set)\"};if(e.id){const{id:t}=e,n=Object.keys(t);let i=!1;if(!n.length)return{isValid:!1,reason:\"Context id must have at least one key-value identifier\"};if(n.forEach((e=>{\"string\"==typeof e&&\"string\"==typeof t[e]||(i=!0)})),i)return{isValid:!1,reason:\"Context id key-value identifiers must be of type string\"}}return e.name&&\"string\"!=typeof e.name?{isValid:!1,reason:\"Context name must be of string type (if set)\"}:{isValid:!0}}static hasEndpointId(e){return void 0!==e.endpointId}static isContextTypeCompatible(e,t){return void 0===t||e===t}setContextGroupMap(){for(const e of this.getContextGroups())this.contextGroupsById.set(e.id,new Map)}async setCurrentContextGroupInClientOptions(e,t){try{const n=await this.fin.System.getEntityInfo(e.uuid,e.name);let i;\"view\"===n.entityType?i=await this.fin.View.wrap(e):\"window\"===n.entityType&&(i=await this.fin.Window.wrap(e)),i&&await i.updateOptions({interop:{currentContextGroup:t}})}catch(e){}}async setupChannelProvider(){try{const e=await this.getProvider();this.channel=e,this.wireChannel(e)}catch(e){throw new Error(`Error setting up Interop Broker Channel Provider: ${e}`)}}wireChannel(e){e.onConnection((async(e,t)=>{if(!await this.isConnectionAuthorized(e,t))throw new Error(`Connection not authorized for ${e.uuid}, ${e.name}`);if(!e.endpointId)throw new Error(\"Version too old to be compatible with Interop. Please upgrade your runtime to a more recent version.\");const n={contextGroupId:void 0,contextHandlers:new Map,clientIdentity:e};t?.currentContextGroup&&this.contextGroupsById.has(t.currentContextGroup)&&(n.contextGroupId=t?.currentContextGroup),this.interopClients.set(e.endpointId,n)})),e.onDisconnection((e=>{this.interopClients.delete(e.endpointId);const t=this.intentClientMap.get(e.name);t&&e.uuid===this.fin.me.uuid&&t.forEach((e=>{e.isReady=!1})),this.sessionContextGroupMap.forEach((t=>{t.onDisconnection(e)})),this.clientDisconnected(e)})),e.beforeAction((async(e,t,n)=>{if(!await this.isActionAuthorized(e,t,n))throw new Error(`Action (${e}) not authorized for ${n.uuid}, ${n.name}`);this.logging?.beforeAction?.enabled&&console.log(e,t,n)})),e.afterAction(((e,t,n)=>{this.logging?.afterAction?.enabled&&console.log(e,t,n)})),e.register(\"setContext\",this.setContext.bind(this)),e.register(\"fireIntent\",this.handleFiredIntent.bind(this)),e.register(\"getCurrentContext\",this.getCurrentContext.bind(this)),e.register(\"getInfoForIntent\",this.handleInfoForIntent.bind(this)),e.register(\"getInfoForIntentsByContext\",this.handleInfoForIntentsByContext.bind(this)),e.register(\"fireIntentForContext\",this.handleFiredIntentForContext.bind(this)),e.register(\"getContextGroups\",this.getContextGroups.bind(this)),e.register(\"joinContextGroup\",this.joinContextGroup.bind(this)),e.register(\"removeFromContextGroup\",this.removeFromContextGroup.bind(this)),e.register(\"getAllClientsInContextGroup\",this.getAllClientsInContextGroup.bind(this)),e.register(\"getInfoForContextGroup\",this.getInfoForContextGroup.bind(this)),e.register(\"contextHandlerRegistered\",this.contextHandlerRegistered.bind(this)),e.register(\"intentHandlerRegistered\",this.intentHandlerRegistered.bind(this)),e.register(\"removeContextHandler\",this.removeContextHandler.bind(this)),e.register(\"sessionContextGroup:createIfNeeded\",this.handleJoinSessionContextGroup.bind(this)),e.register(\"fdc3Open\",this.fdc3HandleOpen.bind(this)),e.register(\"fdc3v2FindIntentsByContext\",this.handleInfoForIntentsByContext.bind(this)),e.register(\"fdc3FindInstances\",this.fdc3HandleFindInstances.bind(this)),e.register(\"fdc3GetAppMetadata\",this.fdc3HandleGetAppMetadata.bind(this)),e.register(\"fdc3v2GetInfo\",(async(e,t)=>this.fdc3HandleGetInfo.bind(this)(e,t))),e.register(\"createPrivateChannelProvider\",(async e=>{const{channelId:t}=e,n=await this.fin.InterApplicationBus.Channel.create(t);p.PrivateChannelProvider.init(n,t)}))}isConnectionAuthorized(e,t){return this.wire.sendAction(\"interop-broker-is-connection-authorized\").catch((e=>{})),Promise.resolve(!0)}isActionAuthorized(e,t,n){return this.wire.sendAction(\"interop-broker-is-action-authorized\").catch((e=>{})),Promise.resolve(!0)}};return Gi.InteropBroker=f,e=new WeakMap,t=new WeakMap,n=new WeakMap,Gi}var zi,Ki={},qi={},Ji=s&&s.__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},Yi=s&&s.__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)};Object.defineProperty(qi,\"__esModule\",{value:!0});const Zi=d,Qi=Hi;class Xi extends Zi.Base{constructor(e,t,n){super(e),zi.set(this,void 0),this.id=n,Ji(this,zi,t,\"f\")}async setContext(e){this.wire.sendAction(\"interop-session-context-group-set-context\").catch((e=>{}));return(await Yi(this,zi,\"f\")).dispatch(`sessionContextGroup:setContext-${this.id}`,{sessionContextGroupId:this.id,context:e})}async getCurrentContext(e){this.wire.sendAction(\"interop-session-context-group-get-context\").catch((e=>{}));return(await Yi(this,zi,\"f\")).dispatch(`sessionContextGroup:getContext-${this.id}`,{sessionContextGroupId:this.id,type:e})}async addContextHandler(e,t){if(this.wire.sendAction(\"interop-session-context-group-add-handler\").catch((e=>{})),\"function\"!=typeof e)throw new Error(\"Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.\");const n=await Yi(this,zi,\"f\");let i;return i=t?`sessionContextHandler:invoke-${this.id}-${t}-${(0,Qi.generateId)()}`:`sessionContextHandler:invoke-${this.id}`,n.register(i,(0,Qi.wrapContextHandler)(e,i)),await n.dispatch(`sessionContextGroup:handlerAdded-${this.id}`,{handlerId:i,contextType:t}),{unsubscribe:await this.createUnsubscribeCb(i)}}async createUnsubscribeCb(e){const t=await Yi(this,zi,\"f\");return async()=>{t.remove(e),await t.dispatch(`sessionContextGroup:handlerRemoved-${this.id}`,{handlerId:e})}}getUserInstance(){return{id:this.id,setContext:(0,Qi.wrapInTryCatch)(this.setContext.bind(this),\"Failed to set context: \"),getCurrentContext:(0,Qi.wrapInTryCatch)(this.getCurrentContext.bind(this),\"Failed to get context: \"),addContextHandler:(0,Qi.wrapInTryCatch)(this.addContextHandler.bind(this),\"Failed to add context handler: \")}}}qi.default=Xi,zi=new WeakMap;var er={},tr={},nr={},ir={},rr=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),or=s&&s.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,\"default\",{enumerable:!0,value:t})}:function(e,t){e.default=t}),sr=s&&s.__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)&&rr(t,e,n);return or(t,e),t};Object.defineProperty(ir,\"__esModule\",{value:!0}),ir.PrivateChannelClient=void 0;const ar=sr(Hi);var cr,dr;function hr(){if(cr)return tr;cr=1;var e,t=s&&s.__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)},n=s&&s.__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},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(tr,\"__esModule\",{value:!0}),tr.FDC3ModuleBase=void 0;const o=nr,a=Hi,c=wr(),d=r(i);return tr.FDC3ModuleBase=class{get client(){return t(this,e,\"f\").call(this)}get fin(){return this.wire.getFin()}constructor(t,i){this.wire=i,e.set(this,void 0),n(this,e,t,\"f\")}async broadcast(e){return this.wire.sendAction(\"fdc3-broadcast\").catch((e=>{})),this.client.setContext(e)}async _open(e,t){this.wire.sendAction(\"fdc3-open\").catch((e=>{}));try{return await c.InteropClient.ferryFdc3Call(this.client,\"fdc3Open\",{app:e,context:t})}catch(e){const t=e.message===a.BROKER_ERRORS.fdc3Open?\"ResolverUnavailable\":e.message;throw new Error(t)}}async _getChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:\"system\",...(0,o.getUnsupportedChannelApis)()})))}async getOrCreateChannel(e){this.wire.sendAction(\"fdc3-get-or-create-channel\").catch((e=>{}));const t=(await this._getChannels()).find((t=>t.id===e));if(t)return{...t,type:\"system\",...(0,o.getUnsupportedChannelApis)()};try{const t=await this.client.joinSessionContextGroup(e);return(0,o.buildAppChannelObject)(t)}catch(e){throw console.error(e.message),new Error(o.ChannelError.CreationFailed)}}async getSystemChannels(){return this.wire.sendAction(\"fdc3-get-system-channels\").catch((e=>{})),this._getChannels()}async joinChannel(e){this.wire.sendAction(\"fdc3-join-channel\").catch((e=>{}));try{return await this.client.joinContextGroup(e)}catch(e){if(e.message===a.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup?console.error(\"The Channel you have tried to join is an App Channel. Custom Channels can only be defined by the Interop Broker through code or manifest configuration. Please use getOrCreateChannel.\"):console.error(e.message),e.message.startsWith(\"Attempting to join a context group that does not exist\"))throw new Error(o.ChannelError.NoChannelFound);throw new Error(o.ChannelError.AccessDenied)}}async getCurrentChannel(){this.wire.sendAction(\"fdc3-get-current-channel\").catch((e=>{}));const e=await this.getCurrentContextGroupInfo();return e?this.buildChannelObject(e):null}async leaveCurrentChannel(){return this.wire.sendAction(\"fdc3-leave-current-channel\").catch((e=>{})),this.client.removeFromContextGroup()}async getCurrentContextGroupInfo(){const e=await this.client.getContextGroups(),t=e.map((async e=>this.client.getAllClientsInContextGroup(e.id))),n=(await Promise.all(t)).findIndex((e=>e.some((e=>{const{uuid:t,name:n}=e;return this.wire.me.uuid===t&&this.wire.me.name===n}))));return e[n]}async buildChannelObject(e){return{...e,type:\"system\",addContextListener:(...[e,t])=>{let n,i;\"function\"==typeof e?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),n=e):(n=t,\"string\"==typeof e&&(i=e));const r=(async()=>{let e=!0;const t=await this.client.getCurrentContext(i);return this.client.addContextHandler(((i,r)=>{if(!e||(e=!1,!(0,d.default)(t,i)))return n(i,r)}),i)})();return{...r,unsubscribe:()=>r.then((e=>e.unsubscribe()))}},broadcast:this.broadcast.bind(this),getCurrentContext:async e=>{const t=await this.client.getCurrentContext(e);return void 0===t?null:t}}}},e=new WeakMap,tr}ir.PrivateChannelClient=class{constructor(e,t){this.id=t,this.client=e,this.listeners=new Map}async broadcast(e){return this.client.dispatch(\"broadcast\",{context:e})}async getCurrentContext(e){return this.client.dispatch(\"getCurrentContext\",{contextType:e})}async addContextListener(e,t){if(\"function\"!=typeof t)throw new Error(\"Non-function argument passed to the second parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.\");let n;n=e?`contextHandler:invoke-${this.id}-${e}-${ar.generateId()}`:`contextHandler:invoke-${this.id}-${ar.generateId()}`,this.client.register(n,ar.wrapContextHandler(t,n));const i={unsubscribe:await this.createContextUnsubscribeCb(n)};return this.listeners.set(n,i),await this.client.dispatch(\"contextHandlerAdded\",{handlerId:n,contextType:e}),i}createNonStandardUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch(\"nonStandardHandlerRemoved\",{handlerId:e})}}createContextUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch(\"contextHandlerRemoved\",{handlerId:e})}}onAddContextListener(e){const t=`onContextHandlerAdded:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch(\"onAddContextHandlerAdded\",{handlerId:t}),n}onDisconnect(e){const t=`onDisconnect:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch(\"onDisconnectHandlerAdded\",{handlerId:t}),n}onUnsubscribe(e){const t=`onUnsubscribe:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch(\"onUnsubscribeHandlerAdded\",{handlerId:t}),n}async cleanUpAllSubs(){Array.from(this.listeners.keys()).forEach((e=>{this.client.remove(e),this.listeners.delete(e)}))}async disconnect(){try{await this.client.dispatch(\"clientDisconnecting\"),await this.cleanUpAllSubs(),await this.client.disconnect()}catch(e){throw new Error(e.message)}}},function(e){var t=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,\"__esModule\",{value:!0}),e.getIntentResolution=e.isChannel=e.isContext=e.connectPrivateChannel=e.buildAppChannelObject=e.buildPrivateChannelObject=e.ChannelError=e.ResultError=e.UnsupportedChannelApiError=e.getUnsupportedChannelApis=void 0;const n=Hi,r=ir,o=t(i);e.getUnsupportedChannelApis=e=>({addContextListener:()=>{throw new a(\"Channel.addContextListener\",e)},broadcast:()=>{throw new a(\"Channel.broadcast\",e)},getCurrentContext:()=>{throw new a(\"Channel.getCurrentContext\",e)}});class a extends Error{constructor(e,t=\"System\"){super(e),this.message=`Calling ${e} on an instance of a ${t} Channel returned by fdc3.get${t}Channels is not supported. If you would like to use a ${t} Channel, please use fdc3.joinChannel, fdc3.addContextListener, and fdc3.broadcast instead.`}}var c,d;e.UnsupportedChannelApiError=a,function(e){e.NoResultReturned=\"NoResultReturned\",e.IntentHandlerRejected=\"IntentHandlerRejected\"}(c=e.ResultError||(e.ResultError={})),(d=e.ChannelError||(e.ChannelError={})).NoChannelFound=\"NoChannelFound\",d.AccessDenied=\"AccessDenied\",d.CreationFailed=\"CreationFailed\";e.buildPrivateChannelObject=e=>{let t=!1;const n=()=>{if(t)throw new Error(\"Private Channel Client has been disconnected from the Private Channel\")};return{id:e.id,type:\"private\",broadcast:async t=>(n(),e.broadcast(t)),getCurrentContext:async t=>(n(),e.getCurrentContext(t)),addContextListener:async(t,i)=>{n();let r=i,o=t;\"function\"==typeof t&&(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),r=t,o=null);return e.addContextListener(o,r)},onAddContextListener:t=>(n(),e.onAddContextListener(t)),disconnect:async()=>(n(),t=!0,e.disconnect()),onDisconnect:t=>(n(),e.onDisconnect(t)),onUnsubscribe:t=>(n(),e.onUnsubscribe(t))}};e.buildAppChannelObject=e=>({id:e.id,type:\"app\",broadcast:e.setContext,getCurrentContext:async t=>{const n=await e.getCurrentContext(t);return void 0===n?null:n},addContextListener:(t,n)=>{let i,r;\"function\"==typeof t?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),i=t):(i=n,\"string\"==typeof t&&(r=t));const s=(async()=>{let t=!0;const n=await e.getCurrentContext(r);return e.addContextHandler(((e,r)=>{if(!t||(t=!1,!(0,o.default)(n,e)))return i(e,r)}),r)})();return{...s,unsubscribe:()=>s.then((e=>e.unsubscribe()))}}});e.connectPrivateChannel=async t=>{try{const n=await fin.InterApplicationBus.Channel.connect(t),i=new r.PrivateChannelClient(n,t);return(0,e.buildPrivateChannelObject)(i)}catch(e){throw new Error(`Private Channel with id: ${t} doesn't exist`)}};e.isContext=e=>{if(e&&\"object\"==typeof e&&\"type\"in e){const{type:t}=e;return\"string\"==typeof t}return!1};e.isChannel=e=>{if(e&&\"object\"==typeof e&&\"type\"in e&&\"id\"in e){const{type:t,id:n}=e;return\"string\"==typeof t&&\"string\"==typeof n&&(\"app\"===t||\"private\"===t)}return!1};e.getIntentResolution=async(t,i,r,o)=>{const s=(0,n.generateId)(),a=new Promise(((e,t)=>{fin.InterApplicationBus.subscribe({uuid:\"*\"},s,(t=>{e(t)})).catch((()=>t(new Error(\"getResult is not supported in this environment\"))))})),d=r?{target:r,intentResolutionResultId:s}:{intentResolutionResultId:s},h=o?{name:o,context:i,metadata:d}:{...i,metadata:d},l=async()=>{let n=await a;if(!n||\"object\"!=typeof n)throw new Error(c.NoResultReturned);const{error:i}=n;if(i)throw new Error(c.IntentHandlerRejected);if((0,e.isChannel)(n)){const{id:i,type:r}=n;switch(r){case\"private\":n=await(0,e.connectPrivateChannel)(i);break;case\"app\":{const r=await t.joinSessionContextGroup(i);n=(0,e.buildAppChannelObject)(r);break}}}else if(!(0,e.isContext)(n))throw new Error(c.NoResultReturned);return n},u=o?await t.fireIntent(h):await t.fireIntentForContext(h);return\"object\"!=typeof u?{source:{appId:\"\",instanceId:\"\"},intent:\"\",version:\"2.0\",getResult:l}:{...u,getResult:l}}}(nr);var lr,ur,pr={};function wr(){if(ur)return Ki;ur=1;var e,t,n=s&&s.__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},i=s&&s.__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)},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ki,\"__esModule\",{value:!0}),Ki.InteropClient=void 0;const o=d,a=r(qi),c=function(){if(dr)return er;dr=1,Object.defineProperty(er,\"__esModule\",{value:!0}),er.Fdc3Module=void 0;const e=Hi,t=hr();class n extends t.FDC3ModuleBase{async open(e,t){await super._open(e,t)}addContextListener(e,t){let n;return this.wire.sendAction(\"fdc3-add-context-listener\").catch((e=>{})),\"function\"==typeof e?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),n=this.client.addContextHandler(e)):n=this.client.addContextHandler(t,null===e?void 0:e),{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}addIntentListener(e,t){this.wire.sendAction(\"fdc3-add-intent-listener\").catch((e=>{}));const n=this.client.registerIntentHandler((e=>{const{context:n,metadata:i}=e,{metadata:r}=n,o=i?.intentResolutionResultId||r?.intentResolutionResultId;o&&this.fin.InterApplicationBus.publish(o,null).catch((()=>null)),t(e.context)}),e,{fdc3Version:\"1.2\"});return{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}async raiseIntent(t,n,i){this.wire.sendAction(\"fdc3-raise-intent\").catch((e=>{}));const r=i?{name:t,context:n,metadata:{target:i}}:{name:t,context:n};try{return await this.client.fireIntent(r)}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntent?\"ResolverUnavailable\":t.message;throw new Error(n)}}async findIntent(t,n){this.wire.sendAction(\"fdc3-find-intent\").catch((e=>{}));try{return await this.client.getInfoForIntent({name:t,context:n})}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntent?\"ResolverUnavailable\":t.message;throw new Error(n)}}async findIntentsByContext(t){this.wire.sendAction(\"fdc3-find-intents-by-context\").catch((e=>{}));try{return await this.client.getInfoForIntentsByContext(t)}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntentsByContext?\"ResolverUnavailable\":t.message;throw new Error(n)}}async raiseIntentForContext(t,n){this.wire.sendAction(\"fdc3-raise-intent-for-context\").catch((e=>{}));try{return await this.client.fireIntentForContext({...t,metadata:{target:n}})}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntentForContext?\"ResolverUnavailable\":t.message;throw new Error(n)}}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}getInfo(){return this.wire.sendAction(\"fdc3-get-info\").catch((e=>{})),{providerVersion:this.wire.environment.getAdapterVersionSync(),provider:`openfin-${this.wire.me.uuid}`,fdc3Version:\"1.2\"}}}return er.Fdc3Module=n,er}(),h=function(){if(lr)return pr;lr=1,Object.defineProperty(pr,\"__esModule\",{value:!0}),pr.Fdc3Module2=void 0;const e=hr(),t=Hi,n=wr(),i=nr,r=ir;class o extends e.FDC3ModuleBase{async open(e,t){return\"string\"==typeof e&&console.warn(\"Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).\"),super._open(e,t)}async findInstances(e){this.wire.sendAction(\"fdc3-find-instances\").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,\"fdc3FindInstances\",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3FindInstances?\"ResolverUnavailable\":e.message;throw new Error(n)}}async getAppMetadata(e){this.wire.sendAction(\"fdc3-get-app-metadata\").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,\"fdc3GetAppMetadata\",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3GetAppMetadata?\"ResolverUnavailable\":e.message;throw new Error(n)}}async addContextListener(e,t){this.wire.sendAction(\"fdc3-add-context-listener\").catch((e=>{}));const n=e=>t=>{const{contextMetadata:n,...i}=t,r=n?[{...i},n]:[t,null];e(...r)};let i=t,r=n(i);return\"function\"==typeof e?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),i=e,r=n(i),this.client.addContextHandler(r)):this.client.addContextHandler(r,null===e?void 0:e)}async findIntent(e,n,i){this.wire.sendAction(\"fdc3-find-intent\").catch((e=>{}));try{return await this.client.getInfoForIntent({name:e,context:n,metadata:{resultType:i}})}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntent?\"ResolverUnavailable\":e.message;throw new Error(n)}}async findIntentsByContext(e,i){this.wire.sendAction(\"fdc3-find-intents-by-context\").catch((e=>{}));const r=i?{context:e,metadata:{resultType:i}}:e;try{return await n.InteropClient.ferryFdc3Call(this.client,\"fdc3v2FindIntentsByContext\",r)}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntentsByContext?\"ResolverUnavailable\":e.message;throw new Error(n)}}async raiseIntent(e,n,r){this.wire.sendAction(\"fdc3-raise-intent\").catch((e=>{}));try{return\"string\"==typeof r&&console.warn(\"Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).\"),(0,i.getIntentResolution)(this.client,n,r,e)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?\"ResolverUnavailable\":e.message;throw new Error(n)}}async raiseIntentForContext(e,n){this.wire.sendAction(\"fdc3-raise-intent-for-context\").catch((e=>{}));try{return\"string\"==typeof n&&console.warn(\"Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).\"),(0,i.getIntentResolution)(this.client,e,n)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?\"ResolverUnavailable\":e.message;throw new Error(n)}}async addIntentListener(e,t){if(this.wire.sendAction(\"fdc3-add-intent-listener\").catch((e=>{})),\"string\"!=typeof e)throw new Error(\"First argument must be an Intent name\");return this.client.registerIntentHandler((async e=>{let n,i;const{context:r,metadata:o}=e,{contextMetadata:s,metadata:a,...c}=r,d=o?.intentResolutionResultId||a?.intentResolutionResultId;try{const e=a?{metadata:a,...c}:{...c};n=await t(e,s),i=n}catch(e){n=e,i={error:!0}}if(d&&this.fin.InterApplicationBus.publish(d,i).catch((()=>null)),n instanceof Error)throw new Error(n.message);return n}),e,{fdc3Version:\"2.0\"})}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}async createPrivateChannel(){const e=(0,t.generateId)();await n.InteropClient.ferryFdc3Call(this.client,\"createPrivateChannelProvider\",{channelId:e});const o=await this.fin.InterApplicationBus.Channel.connect(e),s=new r.PrivateChannelClient(o,e);return(0,i.buildPrivateChannelObject)(s)}async getUserChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:\"user\",...(0,i.getUnsupportedChannelApis)(\"User\")})))}async getSystemChannels(){return console.warn(\"This API has been deprecated. Please use fdc3.getUserChannels instead.\"),super.getSystemChannels()}async joinUserChannel(e){return super.joinChannel(e)}async joinChannel(e){return console.warn(\"This API has been deprecated. Please use fdc3.joinUserChannel instead.\"),super.joinChannel(e)}async getCurrentChannel(){const e=await super.getCurrentChannel();return e?{...e,type:\"user\",broadcast:this.broadcast.bind(this)}:null}async getInfo(){return n.InteropClient.ferryFdc3Call(this.client,\"fdc3v2GetInfo\",{fdc3Version:\"2.0\"})}}return pr.Fdc3Module2=o,pr}(),l=Hi;let u=class extends o.Base{constructor(i,r){super(i),e.set(this,void 0),t.set(this,void 0),n(this,t,new Map,\"f\"),n(this,e,r,\"f\")}async setContext(t){this.wire.sendAction(\"interop-client-set-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"setContext\",{context:t})}async addContextHandler(t,n){if(this.wire.sendAction(\"interop-client-add-context-handler\").catch((e=>{})),\"function\"!=typeof t)throw new Error(\"Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.\");const r=await i(this,e,\"f\");let o;o=n?`invokeContextHandler-${n}-${(0,l.generateId)()}`:\"invokeContextHandler\";const s=(0,l.wrapContextHandler)(t,o);return r.register(o,s),await r.dispatch(\"contextHandlerRegistered\",{handlerId:o,contextType:n}),{unsubscribe:async()=>{r.remove(o),await r.dispatch(\"removeContextHandler\",{handlerId:o})}}}async getContextGroups(){this.wire.sendAction(\"interop-client-get-context-groups\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getContextGroups\")}async joinContextGroup(t,n){this.wire.sendAction(\"interop-client-join-context-group\").catch((e=>{}));const r=await i(this,e,\"f\");if(!t)throw new Error(\"No contextGroupId specified for joinContextGroup.\");return r.dispatch(\"joinContextGroup\",{contextGroupId:t,target:n})}async removeFromContextGroup(t){this.wire.sendAction(\"interop-client-remove-from-context-group\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"removeFromContextGroup\",{target:t})}async getAllClientsInContextGroup(t){this.wire.sendAction(\"interop-client-get-all-clients-in-context-group\").catch((e=>{}));const n=await i(this,e,\"f\");if(!t)throw new Error(\"No contextGroupId specified for getAllClientsInContextGroup.\");return n.dispatch(\"getAllClientsInContextGroup\",{contextGroupId:t})}async getInfoForContextGroup(t){this.wire.sendAction(\"interop-client-get-info-for-context-group\").catch((e=>{}));const n=await i(this,e,\"f\");if(!t)throw new Error(\"No contextGroupId specified for getInfoForContextGroup.\");return n.dispatch(\"getInfoForContextGroup\",{contextGroupId:t})}async fireIntent(t){this.wire.sendAction(\"interop-client-fire-intent\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"fireIntent\",t)}async registerIntentHandler(t,n,r){this.wire.sendAction(\"interop-client-register-intent-handler\").catch((e=>{}));const o=await i(this,e,\"f\"),s=`intent-handler-${n}`,a=(0,l.wrapIntentHandler)(t,s);try{await o.register(s,a),await o.dispatch(\"intentHandlerRegistered\",{handlerId:s,...r})}catch(e){throw new Error(\"Unable to register intent handler\")}return{unsubscribe:async()=>{o.remove(s)}}}async getCurrentContext(t){this.wire.sendAction(\"interop-client-get-current-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getCurrentContext\",{contextType:t})}async getInfoForIntent(t){this.wire.sendAction(\"interop-client-get-info-for-intent\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getInfoForIntent\",t)}async getInfoForIntentsByContext(t){this.wire.sendAction(\"interop-client-get-info-for-intents-by-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getInfoForIntentsByContext\",t)}async fireIntentForContext(t){this.wire.sendAction(\"interop-client-fire-intent-for-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"fireIntentForContext\",t)}async joinSessionContextGroup(n){try{const r=i(this,t,\"f\").get(n);if(r)return r.getUserInstance();const o=await i(this,e,\"f\"),{hasConflict:s}=await o.dispatch(\"sessionContextGroup:createIfNeeded\",{sessionContextGroupId:n});s&&console.warn(`A (non-session) context group with the name \"${n}\" already exists. If you are trying to join a Context Group, call joinContextGroup instead.`);const c=new a.default(this.wire,i(this,e,\"f\"),n);return i(this,t,\"f\").set(n,c),c.getUserInstance()}catch(e){throw console.error(`Error thrown trying to create Session Context Group with id \"${n}\": ${e}`),e}}async onDisconnection(t){this.wire.sendAction(\"interop-client-add-ondisconnection-listener\").catch((e=>{}));return(await i(this,e,\"f\")).onDisconnection((e=>{const{uuid:n}=e;t({type:\"interop-broker\",topic:\"disconnected\",brokerName:n})}))}getFDC3Sync(e){switch(e){case\"1.2\":return new c.Fdc3Module((()=>this),this.wire);case\"2.0\":return new h.Fdc3Module2((()=>this),this.wire);default:throw new Error(`Invalid FDC3 version provided: ${e}. Must be '1.2' or '2.0'`)}}async getFDC3(e){return this.getFDC3Sync(e)}static async ferryFdc3Call(t,n,r){return(await i(t,e,\"f\")).dispatch(n,r||null)}};return Ki.InteropClient=u,e=new WeakMap,t=new WeakMap,Ki}var yr,fr,gr,mr={};function vr(){if(yr)return mr;yr=1,Object.defineProperty(mr,\"__esModule\",{value:!0}),mr.overrideCheck=mr.checkFDC32Overrides=mr.getDefaultViewFdc3VersionFromAppInfo=void 0;const e=Vi();function t(t){return[\"fdc3HandleFindInstances\",\"handleInfoForIntent\",\"handleInfoForIntentsByContext\",\"fdc3HandleGetAppMetadata\",\"fdc3HandleGetInfo\",\"fdc3HandleOpen\",\"handleFiredIntent\",\"handleFiredIntentForContext\"].filter((n=>t[n]===e.InteropBroker.prototype[n]))}return mr.getDefaultViewFdc3VersionFromAppInfo=function({manifest:e,initialOptions:t}){const n=e?.platform?.defaultViewOptions?.fdc3InteropApi??t.defaultViewOptions?.fdc3InteropApi;return[\"1.2\",\"2.0\"].includes(n??\"\")?n:void 0},mr.checkFDC32Overrides=t,mr.overrideCheck=function(e,n){if(n&&\"2.0\"===n){const n=t(e);n.length>0&&console.warn(`WARNING: FDC3 2.0 has been set as a default option for Views in this Platform, but the required InteropBroker APIs for FDC3 2.0 compliance have not all been overridden.\\nThe following APIs need to be overridden:\\n${n.join(\"\\n\")}`)}},mr}function Cr(){return gr||(gr=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),i=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),i(function(){if(fr)return Ti;fr=1;var e=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ti,\"__esModule\",{value:!0}),Ti.InteropModule=void 0;const t=e(n),i=$i,r=d,o=Vi(),a=wr(),c=vr(),h=Tn,l=e=>new e,u=\"You have attempted to use or modify InteropBroker parameters, which is not allowed. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.\";class p extends r.Base{async init(e,n=l){this.wire.sendAction(\"interop-init\").catch((()=>{}));const r=await this.wire.environment.getInteropInfo(this.wire.getFin()),s=(0,i.createUnusableObject)(u),a=(0,i.createWarningObject)(u,(0,t.default)(r)),d=async()=>{throw new Error(u)},p=o.InteropBroker.createClosedConstructor(this.wire,(()=>this.fin.InterApplicationBus.Channel.create(`interop-broker-${e}`)),r);let w;return w=Array.isArray(n)?new((0,h.overrideFromComposables)(...n)(p))(s,d,a):await n(p,s,d,a),(0,c.overrideCheck)(w,r.fdc3Version),w}connectSync(e,t){return this.wire.sendAction(\"interop-connect-sync\").catch((()=>{})),new a.InteropClient(this.wire,this.wire.environment.whenReady().then((()=>this.fin.InterApplicationBus.Channel.connect(`interop-broker-${e}`,{payload:t}))))}}return Ti.InteropModule=p,Ti}(),e),i(wr(),e),i(Vi(),e)}(Li)),Li}var br={},Ir={},Er={},xr={};Object.defineProperty(xr,\"__esModule\",{value:!0}),xr.getSnapshotSourceChannelName=void 0;xr.getSnapshotSourceChannelName=e=>`snapshot-source-provider-${e.uuid}`;var Ar,Pr,Mr,_r,Or,Sr=s&&s.__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},Rr=s&&s.__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)};Object.defineProperty(Er,\"__esModule\",{value:!0}),Er.SnapshotSource=void 0;const Fr=d,jr=xr,kr=new Map;class Lr extends Fr.Base{constructor(e,t){super(e),Ar.set(this,void 0),Pr.set(this,(()=>(kr.has(this.identity.uuid)||kr.set(this.identity.uuid,{eventFired:null,clientPromise:null}),kr.get(this.identity.uuid)))),Mr.set(this,(()=>(Rr(this,Pr,\"f\").call(this).clientPromise||(Rr(this,Pr,\"f\").call(this).clientPromise=Rr(this,_r,\"f\").call(this)),Rr(this,Pr,\"f\").call(this).clientPromise))),_r.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);try{Rr(this,Pr,\"f\").call(this).eventFired||await Rr(this,Or,\"f\").call(this);const t=await this.fin.InterApplicationBus.Channel.connect(e,{wait:!1});return t.onDisconnection((()=>{Rr(this,Pr,\"f\").call(this).clientPromise=null,Rr(this,Pr,\"f\").call(this).eventFired=null})),t}catch(e){throw Rr(this,Pr,\"f\").call(this).clientPromise=null,new Error(\"The targeted SnapshotSource is not currently initialized. Await this object's ready() method.\")}})),Or.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);let t,n;const i=new Promise(((e,i)=>{t=e,n=i}));Rr(this,Pr,\"f\").call(this).eventFired=i;const r=async i=>{try{i.channelName===e&&(t(),await this.fin.InterApplicationBus.Channel.removeListener(\"connected\",r))}catch(e){n(e)}};await this.fin.InterApplicationBus.Channel.on(\"connected\",r)})),Sr(this,Ar,t,\"f\")}get identity(){return Rr(this,Ar,\"f\")}async ready(){this.wire.sendAction(\"snapshot-source-ready\").catch((e=>{}));try{await Rr(this,Mr,\"f\").call(this)}catch(e){await Rr(this,Pr,\"f\").call(this).eventFired}}async getSnapshot(){this.wire.sendAction(\"snapshot-source-get-snapshot\").catch((e=>{}));const e=await Rr(this,Mr,\"f\").call(this),t=await e.dispatch(\"get-snapshot\");return(await t).snapshot}async applySnapshot(e){this.wire.sendAction(\"snapshot-source-apply-snapshot\").catch((e=>{}));return(await Rr(this,Mr,\"f\").call(this)).dispatch(\"apply-snapshot\",{snapshot:e})}}Er.SnapshotSource=Lr,Ar=new WeakMap,Pr=new WeakMap,Mr=new WeakMap,_r=new WeakMap,Or=new WeakMap,Object.defineProperty(Ir,\"__esModule\",{value:!0}),Ir.SnapshotSourceModule=void 0;const Tr=d,$r=Er,Br=xr;class Gr extends Tr.Base{async init(e){if(this.wire.sendAction(\"snapshot-source-init\").catch((e=>{})),\"object\"!=typeof e||\"function\"!=typeof e.getSnapshot||\"function\"!=typeof e.applySnapshot)throw new Error(\"you must pass in a valid SnapshotProvider\");const t=await this.fin.InterApplicationBus.Channel.create((0,Br.getSnapshotSourceChannelName)(this.fin.me));t.register(\"get-snapshot\",(async()=>({snapshot:await e.getSnapshot()}))),t.register(\"apply-snapshot\",(({snapshot:t})=>e.applySnapshot(t)))}wrapSync(e){return this.wire.sendAction(\"snapshot-source-wrap-sync\").catch((e=>{})),new $r.SnapshotSource(this.wire,e)}async wrap(e){return this.wire.sendAction(\"snapshot-source-wrap\").catch((e=>{})),this.wrapSync(e)}}Ir.SnapshotSourceModule=Gr,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Ir,e),n(Er,e)}(br),Object.defineProperty(a,\"__esModule\",{value:!0});var Wr=a.Fin=void 0;const Hr=t,Nr=c,Dr=ie(),Ur=Z(),Vr=de,zr=en,Kr=rn,qr=un,Jr=bn,Yr=J(),Zr=An,Qr=ki,Xr=Cr(),eo=br;class to extends Hr.EventEmitter{constructor(e){super(),this.wire=e,this.System=new Nr.System(e),this.Window=new Dr._WindowModule(e),this.Application=new Ur.ApplicationModule(e),this.InterApplicationBus=new Vr.InterApplicationBus(e),this.Clipboard=new zr.Clipboard(e),this.ExternalApplication=new Kr.ExternalApplicationModule(e),this.Frame=new qr._FrameModule(e),this.GlobalHotkey=new Jr.GlobalHotkey(e),this.Platform=new Zr.PlatformModule(e,this.InterApplicationBus.Channel),this.View=new Yr.ViewModule(e),this.Interop=new Xr.InteropModule(e),this.SnapshotSource=new eo.SnapshotSourceModule(e),e.registerFin(this),this.me=(0,Qr.getMe)(e),e.on(\"disconnected\",(()=>{this.emit(\"disconnected\")}))}}Wr=a.Fin=to;var no={},io={};function ro(e){return\"string\"==typeof e.manifestUrl}function oo(e){return ao(e)&&\"string\"==typeof e.address}function so(e){return oo(e)&&\"string\"==typeof e.token}function ao(e){return\"string\"==typeof e.uuid}function co(e){return e.runtime&&\"string\"==typeof e.runtime.version}function ho(e){return ao(e)&&co(e)}Object.defineProperty(io,\"__esModule\",{value:!0}),io.isInternalConnectConfig=io.isPortDiscoveryConfig=io.isNewConnectConfig=io.isConfigWithReceiver=io.isRemoteConfig=io.isExistingConnectConfig=io.isExternalConfig=void 0,io.isExternalConfig=ro,io.isExistingConnectConfig=oo,io.isRemoteConfig=so,io.isConfigWithReceiver=function(e){return\"object\"==typeof e.receiver&&so({...e,address:\"\"})},io.isNewConnectConfig=ho,io.isPortDiscoveryConfig=function(e){return ro(e)&&co(e)||ho(e)},io.isInternalConnectConfig=function(e){return oo(e)||ho(e)};var lo={},uo={};Object.defineProperty(uo,\"__esModule\",{value:!0}),uo.EmitterMap=void 0;const po=t;function wo(e){return Buffer.from(e).toString(\"base64\")}uo.EmitterMap=class{constructor(){this.storage=new Map}hashKeys(e){return e.map(wo).join(\"/\")}getOrCreate(e){const t=this.hashKeys(e);return this.storage.has(t)||this.storage.set(t,new po.EventEmitter),this.storage.get(t)}has(e){return this.storage.has(this.hashKeys(e))}delete(e){const t=this.hashKeys(e);return this.storage.delete(t)}},Object.defineProperty(lo,\"__esModule\",{value:!0});const yo=uo;class fo extends yo.EmitterMap{constructor(){super(...arguments),this.dispatchEvent=e=>{if(function(e){return\"process-desktop-event\"===e.action}(e)){const{payload:t}=e,n=function(e){const{topic:t}=e;if(\"frame\"===t||\"window\"===t||\"view\"===t){const{uuid:n,name:i}=e;return[t,n,i]}if(\"application\"===t){const{uuid:n}=e;return[t,n]}return[t]}(t);if(this.has(n))return this.getOrCreate(n).emit(t.type,t),!0}return!1}}}lo.default=fo;var go,mo,vo=s&&s.__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},Co=s&&s.__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)},bo=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(no,\"__esModule\",{value:!0});var Io=no.Transport=void 0;const Eo=t,xo=io,Ao=g,Po=bo(lo),Mo=ki,_o=ke;class Oo extends Eo.EventEmitter{constructor(e,t,n){super(),this.wireListeners=new Map,this.topicRefMap=new Map,this.eventAggregator=new Po.default,this.messageHandlers=[this.eventAggregator.dispatchEvent],go.set(this,void 0),mo.set(this,void 0),this.connectSync=()=>{Co(this,go,\"f\").connectSync()},this.getPort=()=>Co(this,go,\"f\").getPort(),vo(this,go,new e(this.onmessage.bind(this)),\"f\"),this.environment=t,this.sendRaw=Co(this,go,\"f\").send.bind(Co(this,go,\"f\")),this.registerMessageHandler(this.handleMessage.bind(this)),Co(this,go,\"f\").on(\"disconnected\",(()=>{for(const[,{handleNack:e}]of this.wireListeners)e({reason:\"Remote connection has closed\"});this.wireListeners.clear(),this.emit(\"disconnected\")}));const{uuid:i,name:r}=n,o=this.environment.getCurrentEntityType();this.me=(0,Mo.getBaseMe)(o,i,r)}getFin(){if(!Co(this,mo,\"f\"))throw new Error(\"No Fin object registered for this transport\");return Co(this,mo,\"f\")}registerFin(e){if(Co(this,mo,\"f\"))throw new Error(\"Fin object has already been registered for this transport\");vo(this,mo,e,\"f\")}shutdown(){return Co(this,go,\"f\").shutdown()}async connect(e){if((0,xo.isConfigWithReceiver)(e))return await Co(this,go,\"f\").connect(e.receiver),this.authorize(e);if((0,xo.isRemoteConfig)(e))return this.connectRemote(e);if((0,xo.isExistingConnectConfig)(e))return this.connectByPort(e);if((0,xo.isNewConnectConfig)(e)){const t=await this.environment.retrievePort(e);return this.connectByPort({...e,address:`ws://localhost:${t}`})}}async connectRemote(e){return await Co(this,go,\"f\").connect(new(this.environment.getWsConstructor())(e.address)),this.authorize(e)}async connectByPort(e){const{address:t,uuid:n}=e,i={...e,type:\"file-token\"},r=Co(this,go,\"f\");await r.connect(new(this.environment.getWsConstructor())(e.address));const o=await this.sendAction(\"request-external-authorization\",{uuid:n,type:\"file-token\"},!0);if(\"external-authorization-response\"!==o.action)throw new Ao.UnexpectedActionError(o.action);return await this.environment.writeToken(o.payload.file,o.payload.token),this.authorize(i)}async authorize(e){const t=await this.sendAction(\"request-authorization\",e,!0);if(\"authorization-response\"!==t.action)throw new Ao.UnexpectedActionError(t.action);if(!0!==t.payload.success)throw new Ao.RuntimeError(t.payload)}sendAction(e,t={},n=!1){let i=()=>{};const r=Ao.RuntimeError.getCallSite(1),o=this.environment.getNextMessageId(),s=new Promise(((s,a)=>{i=a;const c={action:e,payload:t,messageId:o},d=Co(this,go,\"f\");return this.addWireListener(o,s,(e=>this.nackHandler(e,a,r)),n),d.send(c).catch(a)}));return Object.assign(s,{cancel:i,messageId:o})}nackHandler(e,t,n){t(\"string\"==typeof e?e:new Ao.RuntimeError(e,n))}ferryAction(e){return new Promise(((t,n)=>{const i=this.environment.getNextMessageId();e.messageId=i;const r=e=>{t(e.payload)};return Co(this,go,\"f\").send(e).then((()=>this.addWireListener(i,r,(e=>this.nackHandler(e,n)),!1))).catch(n)}))}registerMessageHandler(e){this.messageHandlers.push(e)}addWireListener(e,t,n,i){i?this.uncorrelatedListener=t:this.wireListeners.has(e)?n({reason:\"Duplicate handler id\",error:(0,_o.errorToPOJO)(new Ao.DuplicateCorrelationError(String(e)))}):this.wireListeners.set(e,{resolve:t,handleNack:n})}onmessage(e){for(const t of this.messageHandlers)t.call(null,e)}handleMessage(e){const t=e.correlationId||NaN;if(\"correlationId\"in e){if(!this.wireListeners.has(t))return!1;{const{resolve:n,handleNack:i}=this.wireListeners.get(t);\"ack\"!==e.action?i({reason:\"Did not receive ack action\",error:(0,_o.errorToPOJO)(new Ao.NoAckError(e.action))}):\"payload\"in e?e.payload.success?n.call(null,e):i(e.payload):\"string\"==typeof e.reason?i(e):(console.warn(\"Received invalid response from core\",e),i({reason:\"invalid response shape\"})),this.wireListeners.delete(t)}}else this.uncorrelatedListener&&this.uncorrelatedListener.call(null,e),this.uncorrelatedListener=()=>{};return!0}}Io=no.Transport=Oo,go=new WeakMap,mo=new WeakMap;const So=(...e)=>({log:(...t)=>console.debug(`[${(new Date).toISOString()}]`,...(e=>e.map((e=>`[${e}]`)))(e),...t),getLogger:(...t)=>So(...e,...t)}),Ro=So(\"@openfin/core-web/client\");function Fo(e,t){if(!function(e){return\"string\"==typeof e}(e))throw new Error(`Property ${t} has invalid type. Expected string, got ${typeof e}.`)}const jo=\"web-broker-ports-ready\",ko=Ro.getLogger(\"get-web-interop-ports\");function Lo(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)}function To(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}\"function\"==typeof SuppressedError&&SuppressedError;const $o=e=>{var n,i,r;return r=class extends t.EventEmitter{constructor(t){super(),n.set(this,void 0),i.set(this,!1),this.connectSync=()=>{Lo(this,i,\"f\")||(e.addEventListener(\"message\",(e=>{e.data?.topic?.startsWith(\"wire-message\")&&e.data.message&&Lo(this,n,\"f\").call(this,{...JSON.parse(e.data.message),ports:e.ports})})),e.start())},this.connect=async()=>{this.connectSync()},this.send=t=>(e.postMessage({topic:\"wire-message\",message:JSON.stringify(t)}),Promise.resolve()),this.shutdown=async()=>{e.close()},To(this,n,t,\"f\")}getPort(){return e}},n=new WeakMap,i=new WeakMap,r};var Bo={},Go={};Object.defineProperty(Go,\"__esModule\",{value:!0}),Go.BaseEnvironment=void 0;const Wo=vr();Go.BaseEnvironment=class{async getViewWindowIdentity(e,t){const{identity:n}=await e.View.wrapSync(t).getCurrentWindow();return n}async getInteropInfo(e){const t=await e.Application.getCurrentSync().getInfo().catch((()=>null)),n=t?.initialOptions?.interopBrokerConfiguration??{};return{fdc3Version:t?(0,Wo.getDefaultViewFdc3VersionFromAppInfo)(t):void 0,...n,fdc3Info:{providerVersion:await e.System.getVersion(),provider:\"OpenFin\"}}}},Object.defineProperty(Bo,\"__esModule\",{value:!0});var Ho=Bo.BrowserEnvironment=void 0;const No=Go;class Do extends No.BaseEnvironment{constructor(){super(...arguments),this.type=\"other\",this.getRandomId=()=>{const e=new Uint32Array(1);return window.crypto.getRandomValues(e)[0].toString(32)}}getAdapterVersionSync(){return\"\"}observeBounds(e,t){throw new Error(\"Method not implemented.\")}layoutAllowedInContext(e){return!1}initLayoutManager(e,t,n){throw new Error(\"Method not implemented.\")}applyLayoutSnapshot(e,t,n){throw new Error(\"Method not implemented.\")}createLayout(e,t){throw new Error(\"Method not implemented.\")}destroyLayout(e,t){throw new Error(\"Method not implemented.\")}resolveLayout(e,t){throw new Error(\"Method not implemented.\")}initPlatform(...e){throw new Error(\"Method not implemented.\")}writeToken(e,t){return Promise.resolve(\"\")}retrievePort(e){throw new Error(\"Method not implemented.\")}getNextMessageId(){return this.getRandomId()}createChildContent(e){throw new Error(\"Method not implemented.\")}getWebWindow(e){throw new Error(\"Method not implemented.\")}getCurrentEntityIdentity(){throw new Error(\"Method not implemented.\")}getCurrentEntityType(){return\"external connection\"}raiseEvent(e,t){throw new Error(\"Method not implemented.\")}getUrl(){return location.href}getDefaultChannelOptions(){return{create:{},connect:{}}}getRtcPeer(){return new RTCPeerConnection}getWsConstructor(){return WebSocket}whenReady(){return Promise.resolve()}}Ho=Bo.BrowserEnvironment=Do;const Uo=e=>\"platform\"in e&&void 0!==e.platform;var Vo,zo;class Ko extends Ho{constructor(e){super(),this.connectConfig=e,Vo.set(this,void 0),zo.set(this,new W((async()=>Promise.resolve().then((function(){return require(\"./main-b14f67c9.js\")}))))),Uo(e)&&this.validatePlatformOptions(e)}getAdapterVersionSync(){return\"0.39.21\"}validatePlatformOptions({platform:e}){if(!(\"layoutSnapshot\"in e))throw new Error(\"Platform options are missing layoutSnapshot. Please provide a layoutSnapshot in the platform options.\");if(\"windows\"in e||\"windows\"in e.layoutSnapshot)throw new Error(\"It appears you tried to call connect() with a snapshot object from an OpenFin desktop environment. Note that connect() expects to be called with a platform property with this structure: { platform: { layoutSnapshot } }. To get a layoutSnapshot of the expected structure, use fin.Platform.Layout.getCurrentLayoutManagerSync().getLayoutSnapshot() in v34+ in your desktop environment.\");const{layouts:t}=e.layoutSnapshot;Object.entries(t).map((([e,t])=>{if(\"object\"!=typeof t||null===t)throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must be an object.`);if(!(\"content\"in t))throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must contain a 'content' property.`)}))}async getInteropInfo(e){return{...{contextGroups:void 0,logging:{beforeAction:{enabled:!1},afterAction:{enabled:!1}}},fdc3Version:void 0,fdc3Info:{providerVersion:\"0.39.21\",provider:\"OpenFin Web\"}}}layoutAllowedInContext(e){return!0}async initLayoutManager(e,t,n){if(Lo(this,Vo,\"f\"))throw new Error(\"Layout already initialized.\");if(!Uo(this.connectConfig))throw new Error(\"Platform options are missing from connection config.\");const{WebLayoutEntryPoint:i}=await Lo(this,zo,\"f\").getValue();return To(this,Vo,new i(this.connectConfig),\"f\"),await Lo(this,Vo,\"f\").initLayoutManager(e,t,n)}async applyLayoutSnapshot(e,t,n){Lo(this,Vo,\"f\")?.applyLayoutSnapshot(e,t,n)}async createLayout(e,t){return Lo(this,Vo,\"f\")?.createLayout(e,t)}async destroyLayout(e,t){return Lo(this,Vo,\"f\")?.destroyLayout(e,t)}async getViewWindowIdentity(e,t){return Promise.resolve({uuid:t.uuid,name:t.uuid})}}Vo=new WeakMap,zo=new WeakMap;const qo=()=>{const e=((e,t)=>{const n=new RegExp(`^${t}<(?.*)>$`).exec(e)?.groups?.meta;if(n)try{return JSON.parse(atob(n))}catch(e){throw new Error(`Failed to decode JSON from ${n}.`)}})(window.name,\"of-frame\");if(e)try{const{name:t,uuid:n,brokerUrl:i,providerId:r,contextGroup:o}=e;return Fo(i,\"brokerUrl\"),Fo(n,\"uuid\"),Fo(t,\"name\"),{identity:{name:t,uuid:n},brokerUrl:i,interopConfig:{providerId:r,currentContextGroup:o}}}catch(e){throw new Error(`Unexpected error occurred when inferring platform information: ${e.stack}`)}},Jo=()=>{const e=r.v4();return{uuid:e,name:e}},Yo=async e=>{if(\"enabled\"===e.connectionInheritance){const t=await(async e=>{const t=qo();if(t){const{validateOptions:n=(()=>!0)}=e,{identity:i,...r}=t;if(!await n(r))throw new Error(\"Parent options were rejected by validateOptions.\");return t}})(e);if(t)return t}if(!e.options){const t=\"enabled\"===e.connectionInheritance?\"Broker URL was not specified nor provided by a platform container.\":\"Connection inheritance is disabled but no options were provided.\";throw new Error(t)}return{...e.options,identity:Jo()}};exports.__classPrivateFieldGet=Lo,exports.__classPrivateFieldSet=To,exports.apiExposer=Gn,exports.commonjsGlobal=s,exports.connect=async t=>{try{Ro.log(\"Establishing connection\",t);const{brokerUrl:n,identity:i,timeout:r,interopConfig:s}=await Yo(t),{workerPort:a,iframeBrokerPort:c}=await(async(e,t,n)=>{const{origin:i}=new URL(e),r=document.createElement(\"IFRAME\");let s;r.style.display=\"none\";try{return await new Promise(((a,c)=>{const d=e=>{if(e.source===r.contentWindow&&e.data?.topic===`ack-${jo}`){if(e.origin!==i)c(new Error(`Broker redirected to unexpected origin ${e.origin}, expected ${i}.`));else if(e.data.success){const[t,n]=e.ports;a({iframeBrokerPort:t,workerPort:n})}else c(new m(e.data));window.removeEventListener(\"message\",d),clearTimeout(s)}};window.addEventListener(\"message\",d),ko.log(`Connecting to broker ${e}`),r.setAttribute(\"src\",e),r.setAttribute(\"name\",o(t,\"of-broker\")),document.body.appendChild(r),ko.log(\"Iframe loaded, awaiting init message from iframe\"),n&&(s=setTimeout((()=>{window.removeEventListener(\"message\",d),document.body.removeChild(r),c(new Error(\"Worker did not initialize in time\"))}),n))}))}catch(e){throw new Error(`Failed to initialise Fin Web Client. ${e.message}`,{cause:e})}})(n,i,r);Ro.log(\"Successfully established connection to shared worker\");const d={entityType:\"external connection\",...i};a.start(),c.start();const h=((t,n,i)=>{const r=$o(n),o=new Ko(t),s=new Io(r,o,i);return s.connectSync(),window.Buffer=e.Buffer,new Wr(s)})(t,a,d);return s?.providerId&&(h.me.interop=h.Interop.connectSync(s.providerId),s?.currentContextGroup&&h.me.interop.joinContextGroup(s.currentContextGroup).catch((e=>{console.warn(`Error joining specified context group: ${s?.currentContextGroup}, continuing`,e)}))),{...h,me:{...h.me,identity:{uuid:h.me.uuid,name:h.me.name}}}}catch(e){throw new Error(`An error occured during web-interop connection: ${e.message}`)}},exports.decorators=Nn,exports.encodeOptions=o,exports.layout_constants=ai,exports.lazy=G;\n","\"use strict\";var t=require(\"./main-8cad4070.js\"),e=require(\"uuid\");require(\"buffer/\"),require(\"events\"),require(\"lodash/cloneDeep\"),require(\"lodash/isEqual\");var i={},n={};Object.defineProperty(n,\"__esModule\",{value:!0}),n.mapValuesAsync=n.mapEntriesAsync=void 0;const o=(t,[e,i])=>({...t,[e]:i});async function s(t,e){return(await Promise.all(e.map((async([e,i])=>[e,await t(i,e)])))).reduce(o,{})}n.mapEntriesAsync=s,n.mapValuesAsync=async function(t,e){let i;return i=e instanceof Map?[...e.entries()]:Object.entries(e),s(t,i)};var r,a,l,h,d=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldSet||function(t,e,i,n,o){if(\"m\"===n)throw new TypeError(\"Private method is not writable\");if(\"a\"===n&&!o)throw new TypeError(\"Private accessor was defined without a setter\");if(\"function\"==typeof e?t!==e||!o:!e.has(t))throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");return\"a\"===n?o.call(t,i):o?o.value=i:e.set(t,i),i},c=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldGet||function(t,e,i,n){if(\"a\"===i&&!n)throw new TypeError(\"Private accessor was defined without a getter\");if(\"function\"==typeof e?t!==e||!n:!e.has(t))throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");return\"m\"===i?n:\"a\"===i?n.call(t):n?n.value:e.get(t)};Object.defineProperty(i,\"__esModule\",{value:!0});var m=i.DefaultLayoutManager=void 0;const u=n;class p{constructor(t){a.set(this,void 0),l.set(this,new Map),d(this,a,t,\"f\")}size(){return c(this,l,\"f\").size}async applyLayoutSnapshot({layouts:t}){if(Object.keys(t).length>1)throw new Error(\"[LayoutManager] Tried to call applyLayoutSnapshot with more than 1 layout. When implementing multiple layouts via overridden LayoutManager class, you must override and fully implement the applyLayoutSnapshot method without calling super.applyLayoutSnapshot().\");const[[e,i]]=Object.entries(t);await p.createLayout(this,{layoutName:e,layout:i})}async showLayout({layoutName:t}){}async getLayoutSnapshot(){return{layouts:await(0,u.mapValuesAsync)((t=>t.getFrameSnapshot()),c(this,l,\"f\"))}}async removeLayout({layoutName:t}){}getLayoutIdentityForView(t){const e=[...c(this,l,\"f\").values()].find((e=>e.getCurrentViews().some((e=>e.name===t.name&&e.uuid===t.uuid))));return e?.identity??void 0}isLayoutVisible({layoutName:t}){return c(p,r,\"m\",h).call(p,this,t).isVisible()}resolveLayoutIdentity(t){if(t&&\"layoutName\"in t)return t;const e=[...c(this,l,\"f\").values()];if(1===e.length)return e[0].identity;const i=e.find((t=>t.isVisible()));return i?.identity??void 0}static async resolveLayout(t,e){const i=t.resolveLayoutIdentity(e);if(void 0===i||!(\"layoutName\"in i))throw new Error(\"[layout-manager] resolveLayout: Could not resolve the layout identity. Make sure you include 'layoutName' in the identity object.\");return c(p,r,\"m\",h).call(p,t,i.layoutName)}static async handleSharedView(t,e,i){await(0,u.mapValuesAsync)((async t=>{if(t.identity.layoutName!==e.layoutName){const e=t.getCurrentViews().find((t=>t.name===i.name));e&&await t.onViewDetached({viewIdentity:e,target:null}).catch(console.error)}}),c(t,l,\"f\"))}static async handleLastViewRemoved(t,e){await t.removeLayout(e),await c(t,a,\"f\").handleLastViewRemoved(t)}static async destroyLayout(t,{layoutName:e}){await c(p,r,\"m\",h).call(p,t,e).destroy(),c(t,l,\"f\").delete(e)}static async createLayout(t,e){const{layoutName:i}=e;if(c(t,l,\"f\").has(i))throw new Error(`Layout name ${i} already exists`);await c(t,a,\"f\").createLayout(e,t)}static registerLayout(t,e,i){c(t,l,\"f\").set(e,i)}static getAllLayouts(t){return[...c(t,l,\"f\").values()]}static setInitialSnapshot(t,e){c(t,a,\"f\").setInitialSnapshot(e)}static createClosedConstructor(...t){return class extends p{constructor(){super(...t)}}}}m=i.DefaultLayoutManager=p,r=p,a=new WeakMap,l=new WeakMap,h=function(t,e){const i=c(t,l,\"f\").get(e);if(!i)throw new Error(`[layout-manager] getLayoutByName: Could not locate layout with name '${e}'`);return i};var g={},f={},v={};Object.defineProperty(v,\"__esModule\",{value:!0}),v.ReversibleMap=void 0;v.ReversibleMap=class{constructor(){this.valueToKey=new Map,this.keyToValue=new Map,this.setUnique=(t,e)=>{if(this.hasKey(t)||this.hasValue(e))throw new Error(\"Key or value already in the map.\");this.keyToValue.set(t,e),this.valueToKey.set(e,t)},this.getKey=t=>{const e=this.valueToKey.get(t);if(!e)throw new Error(\"Value not found in the map.\");return e},this.deleteKey=t=>{const e=this.getValue(t);return this.keyToValue.delete(t),this.valueToKey.delete(e),e},this.deleteValue=t=>{const e=this.getKey(t);return this.keyToValue.delete(e),this.valueToKey.delete(t),e},this.hasKey=t=>this.keyToValue.has(t),this.hasValue=t=>this.valueToKey.has(t)}getValue(t){const e=this.keyToValue.get(t);if(!e)throw new Error(\"Key not found in the map.\");return e}},Object.defineProperty(f,\"__esModule\",{value:!0});var _=f.LayoutContentCache=void 0;const y=t.lazy,C=v;class w{constructor(){this.contentItemCache=new C.ReversibleMap,this.contentItemCacheId=0,this.createCacheKey=()=>{const t=`entity-${this.contentItemCacheId.toString()}`;return this.contentItemCacheId+=1,t},this.hasKey=t=>this.contentItemCache.hasKey(t),this.getItemOrUndefined=t=>{try{return this.getContentItemOrThrow(t)}catch(t){return}},this.getContentItemOrThrow=(t,e)=>{if(!this.contentItemCache.hasKey(t))throw new Error(\"Layout component has been destroyed or detached from the current layout.\");const i=this.contentItemCache.getValue(t);if(e&&!e.includes(i.type))throw new Error(`Layout item is not the expected type. Expected ${e.join(\", \")}, got ${i.type}.`);return i},this.getOrCreateEntityId=t=>{if(this.contentItemCache.hasValue(t))return this.contentItemCache.getKey(t);t.onDestroyed((()=>{this.contentItemCache.deleteValue(t)}));const e=this.createCacheKey();return this.contentItemCache.setUnique(e,t),e}}static getSingleInstance(){return w.singleton.getValue()}}_=f.LayoutContentCache=w,w.singleton=new y.Lazy((()=>new w));var I={},b={};!function(t){Object.defineProperty(t,\"__esModule\",{value:!0}),t.getAdjacentStacks=t.doShareEdge=t.getAdjacentItem=void 0;t.getAdjacentItem=(e,i)=>{const{parent:n}=e;if(e.isRoot()||!n)return;const o=[\"top\",\"bottom\"].includes(i)?\"column\":\"row\",s=[\"top\",\"left\"].includes(i)?-1:1;if(n.type===o){const t=n.contentItems.indexOf(e)+s;if(t>=0&&t{const n=t.getBounds(),o=e.getBounds();if(!n||!o)return!1;if([\"top\",\"bottom\"].includes(i)){return!(n.righto.right)}return!(n.bottomo.bottom)};t.getAdjacentStacks=(e,i)=>{const n=[\"top\",\"bottom\"].includes(i)?\"row\":\"column\",o=s=>\"stack\"===s.type?(0,t.doShareEdge)(e,s,i)?[s]:[]:\"root\"===s.type||\"ground\"===s.type?[]:s.type===n?s.contentItems.map((t=>o(t))).flat():s.type!==n?[\"top\",\"right\"].includes(i)?o(s.contentItems[s.contentItems.length-1]):o(s.contentItems[0]):[],s=(0,t.getAdjacentItem)(e,i);return s?o(s):[]}}(b);var S=t.commonjsGlobal&&t.commonjsGlobal.__decorate||function(t,e,i,n){var o,s=arguments.length,r=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if(\"object\"==typeof Reflect&&\"function\"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(s<3?o(r):s>3?o(e,i,r):o(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};Object.defineProperty(I,\"__esModule\",{value:!0}),I.LayoutEntitiesController=void 0;const E=t.decorators,x=b,L=i;class z{constructor(t,e,i){this.wire=t,this.layoutManager=e,this.layoutContentCache=i,this.analytics=t=>{this.wire.sendAction(`layout-controller-${t}`).catch((()=>{}))},this.getLayoutIdentityForViewOrThrow=async t=>{const e=this.layoutManager.getLayoutIdentityForView(t);if(!e)throw new Error(`View identity ${t.name} is not attached to any layouts.`);return e},this.getRoot=async t=>{this.analytics(\"get-root\");const e=(await this.getLayout(t)).getRoot();return{type:e.type,entityId:this.layoutContentCache.getOrCreateEntityId(e)}},this.getStackByView=async t=>{this.analytics(\"get-stack-by-view\");const e=await this.getLayoutIdentityForViewOrThrow(t),i=(await this.getLayout(e)).getStackByView(t);if(\"stack\"===i?.type)return{entityId:this.layoutContentCache.getOrCreateEntityId(i),type:\"stack\"}},this.getStackViews=t=>{this.analytics(\"get-stack-views\");return this.layoutContentCache.getContentItemOrThrow(t,[\"stack\"]).contentItems.map((t=>({name:t.viewName,uuid:this.wire.me.uuid})))},this.isRoot=t=>{this.analytics(\"is-root\");return this.layoutContentCache.getContentItemOrThrow(t).isRoot()},this.exists=t=>(this.analytics(\"exists\"),this.layoutContentCache.hasKey(t)),this.addViewToStack=async(t,e,{index:i}={index:0})=>{this.analytics(\"add-view-to-stack\");const n=this.layoutContentCache.getContentItemOrThrow(t);if(i&&i>n.contentItems.length+1)throw new Error(`Index '${i}' out of range, please exclude the index or specify a number between 0 and ${n.contentItems.length}`);const o={id:t,index:i},{identity:s}=await n.layout.platformCreateView(e,{location:o});return s},this.findViewInStack=(t,e)=>t.contentItems.find((t=>t.viewName===e.name)),this.removeViewFromStack=async(t,e)=>{this.analytics(\"remove-view-from-stack\");const i=this.layoutContentCache.getContentItemOrThrow(t,[\"stack\"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to remove a view ('${e.name}') which does not belong to the stack.`);await n.layout.platformCloseView(e)},this.createAdjacentStack=async(t,e,{position:i=\"right\"}={})=>{if(this.analytics(\"create-adjacent-stack\"),!Array.isArray(e)||0===e.length)throw new Error('The parameter \"views\" must be an array with at least 1 element.');if(![\"top\",\"bottom\",\"left\",\"right\"].includes(i))throw new Error(`Invalid position '${i}' specified.`);const n=this.layoutContentCache.getContentItemOrThrow(t).createAdjacentStack({position:i}),o=this.layoutContentCache.getOrCreateEntityId(n);return await Promise.all(e.reverse().map((t=>this.addViewToStack(o,t)))),o},this.getAdjacentStacks=async({targetId:t,edge:e})=>{this.analytics(\"get-adjacent-stacks\");const i=this.layoutContentCache.getContentItemOrThrow(t);return(0,x.getAdjacentStacks)(i,e).map((t=>({entityId:this.layoutContentCache.getOrCreateEntityId(t)})))},this.setStackActiveView=async(t,e)=>{this.analytics(\"set-stack-active-view\");const i=this.layoutContentCache.getContentItemOrThrow(t,[\"stack\"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to set a view ('${e.name}') as active when it does not belong to the stack.`);i.setActiveContentItem(n,!0)}}async getLayout(t){const e=await L.DefaultLayoutManager.resolveLayout(this.layoutManager,t);if(!e)throw new Error(`Could not resolve target layout identity ${JSON.stringify(t)}`);return e}getContent(t){this.analytics(\"get-content\");return this.layoutContentCache.getContentItemOrThrow(t,[\"column\",\"row\"]).contentItems.map((t=>({type:t.type,entityId:this.layoutContentCache.getOrCreateEntityId(t)})))}getParent(t){this.analytics(\"get-parent\");const e=this.layoutContentCache.getContentItemOrThrow(t);if(!e.isRoot())return e.parent?.contentItems.includes(e)?{type:e.parent.type,entityId:this.layoutContentCache.getOrCreateEntityId(e.parent)}:void 0}}S([(0,E.expose)()],z.prototype,\"getLayoutIdentityForViewOrThrow\",void 0),S([(0,E.expose)()],z.prototype,\"getRoot\",void 0),S([(0,E.expose)()],z.prototype,\"getStackByView\",void 0),S([(0,E.expose)()],z.prototype,\"getStackViews\",void 0),S([(0,E.expose)()],z.prototype,\"getContent\",null),S([(0,E.expose)()],z.prototype,\"getParent\",null),S([(0,E.expose)()],z.prototype,\"isRoot\",void 0),S([(0,E.expose)()],z.prototype,\"exists\",void 0),S([(0,E.expose)()],z.prototype,\"addViewToStack\",void 0),S([(0,E.expose)()],z.prototype,\"removeViewFromStack\",void 0),S([(0,E.expose)()],z.prototype,\"createAdjacentStack\",void 0),S([(0,E.expose)()],z.prototype,\"getAdjacentStacks\",void 0),S([(0,E.expose)()],z.prototype,\"setStackActiveView\",void 0),I.LayoutEntitiesController=z,Object.defineProperty(g,\"__esModule\",{value:!0});var M=g.initLayoutEndpoints=void 0;const P=t.apiExposer,T=t.layout_constants,A=f,k=I,D=i;M=g.initLayoutEndpoints=async function(t,e){const i=t.getFin(),n=await i.Platform.getCurrentSync().getClient(),o=new P.ChannelsExposer(n);await new P.ApiExposer(o).exposeInstance(new k.LayoutEntitiesController(t,e,A.LayoutContentCache.getSingleInstance()),{id:T.LAYOUT_CONTROLLER_ID}),await async function(t,e){const i=t=>async i=>{const n=await D.DefaultLayoutManager.resolveLayout(e,i.target);if(!n)throw new Error(`Could not resolve the layout target from payload ${JSON.stringify(i)}`);return t(n,i)},n=(e,n)=>{t.register(e,i(n))},o=(t,e)=>{n(t,e)};n(\"replace-view\",((t,e)=>t.replaceView(e))),n(\"replace-layout\",((t,{layout:e})=>t.replaceLayout(e))),n(\"add-view\",((t,e)=>t.insertView(e))),o(\"layout-add-view\",((t,{viewOptions:e,location:i,targetView:n})=>t.platformCreateView(e,{location:i,targetView:n}))),n(\"close-view\",((t,e)=>t.cleanupView(e.viewIdentity))),o(\"layout-close-view\",((t,e)=>t.platformCloseView(e.viewIdentity))),n(\"apply-preset-layout\",((t,e)=>t.applyPreset(e))),n(\"get-layout-views\",(t=>t.getCurrentViews())),n(\"get-frame-snapshot\",(t=>t.getFrameSnapshot())),n(\"is-visible\",(t=>t.isVisible())),n(\"destroy\",(t=>t.destroy())),t.register(\"get-layout-snapshot\",(()=>e.getLayoutSnapshot()))}(n,e)};var R={};Object.defineProperty(R,\"__esModule\",{value:!0});var U=R.BaseLayout=void 0;U=R.BaseLayout=class{};var O={};Object.defineProperty(O,\"__esModule\",{value:!0});var V=O.DOMEmitter=void 0;V=O.DOMEmitter=class{constructor(t){this.container=t}dispatchLocalEvent(t,e){const i={...e,type:t,tabSelector:`tab-${e.name}`,containerSelector:`container-${e.name}`,topic:\"openfin-DOM-event\"};this.container.dispatchEvent(new CustomEvent(t,{detail:i}))}};var B={};Object.defineProperty(B,\"__esModule\",{value:!0});var H=B.mapLayoutContentItemsImmutableSync=B.mapLayoutContentItemsImmutable=W=B.isVisible=void 0;var W=B.isVisible=t=>(0!==t.offsetWidth||0!==t.offsetHeight)&&\"hidden\"!==window.getComputedStyle(t).visibility&&t.offsetTop>=0&&t.offsetLeft>=0&&t.offsetTop<=window.innerHeight&&t.offsetLeft<=window.innerWidth;const F=t=>\"type\"in t&&\"component\"===t.type;B.mapLayoutContentItemsImmutable=async function t(e,i){return F(i)?e(i):{...i,content:await Promise.all(i.content?.map((i=>t(e,i))))}},H=B.mapLayoutContentItemsImmutableSync=function t(e,i){return F(i)?e(i):{...i,content:i.content?.map((i=>t(e,i)))}};class N extends Error{constructor(t,e){super(e),this.type=t}}class G extends N{constructor(t,e){super(\"Configuration\",t),this.node=e}}class j extends N{constructor(t){super(\"PopoutBlocked\",t)}}class $ extends N{constructor(t){super(\"API\",t)}}class Z extends N{constructor(t){super(\"Bind\",t)}}class q extends Error{constructor(t,e,i){super(`${t}: ${e}${void 0===i?\"\":\": \"+i}`)}}class X extends q{constructor(t,e){super(\"Assert\",t,e)}}class Y extends q{constructor(t,e,i){super(\"UnreachableCase\",t,`${e}${void 0===i?\"\":\": \"+i}`)}}class K extends q{constructor(t,e){super(\"UnexpectedNull\",t,e)}}class J extends q{constructor(t,e){super(\"UnexpectedUndefined\",t,e)}}var Q;!function(t){let e=!1;const i={PopoutCannotBeCreatedWithGroundItemConfig:{id:0,default:\"Popout cannot be created with ground ItemConfig\"},PleaseRegisterAConstructorFunction:{id:1,default:\"Please register a constructor function\"},ComponentTypeNotRegisteredAndBindComponentEventHandlerNotAssigned:{id:2,default:\"Component type not registered and BindComponentEvent handler not assigned\"},ComponentIsAlreadyRegistered:{id:3,default:\"Component is already registered\"},ComponentIsNotVirtuable:{id:4,default:\"Component is not virtuable. Requires rootHtmlElement field/getter\"},VirtualComponentDoesNotHaveRootHtmlElement:{id:5,default:'Virtual component does not have getter \"rootHtmlElement\"'},ItemConfigIsNotTypeComponent:{id:6,default:\"ItemConfig is not of type component\"},InvalidNumberPartInSizeString:{id:7,default:\"Invalid number part in size string\"},UnknownUnitInSizeString:{id:8,default:\"Unknown unit in size string\"},UnsupportedUnitInSizeString:{id:9,default:\"Unsupported unit in size string\"}};t.idCount=Object.keys(i).length;const n=Object.values(i);t.checkInitialise=function(){if(!e)for(let e=0;e=\"0\"&&t<=\"9\"}function Tt(t,e){const i=zt(e);t.style.width=i}function At(t,e){const i=zt(e);t.style.height=i}function kt(t){return{width:t.offsetWidth,height:t.offsetHeight}}function Dt(t,e){t.style.display=e?\"\":\"none\"}function Rt(t,e){if(void 0!==e)for(const i in e)if(e.hasOwnProperty(i)){const n=e[i],o=t[i];t[i]=Ut(o,n)}return t}function Ut(t,e){if(\"object\"!=typeof e)return e;if(Array.isArray(e)){const t=e.length,i=new Array(t);for(let n=0;n36)throw new Error(\"Too many keys in config minifier map\")},t.translateObject=n}(dt||(dt={})),function(t){t.defaults={type:at.ground,content:[],size:1,sizeUnit:ht.Fractional,minSize:void 0,minSizeUnit:ht.Pixel,id:\"\",isClosable:!0},t.createCopy=function(t,e){switch(t.type){case at.ground:case at.row:case at.column:return gt.createCopy(t,e);case at.stack:return ut.createCopy(t,e);case at.component:return pt.createCopy(t);default:throw new Y(\"CICC91354\",t.type,\"Invalid Config Item type specified\")}},t.createDefault=function(t){switch(t){case at.ground:throw new X(\"CICCDR91562\");case at.row:case at.column:return gt.createDefault(t);case at.stack:return ut.createDefault();case at.component:return pt.createDefault();default:throw new Y(\"CICCDD91563\",t,\"Invalid Config Item type specified\")}},t.isComponentItem=function(t){return t.type===at.component},t.isStackItem=function(t){return t.type===at.stack},t.isGroundItem=function(t){return t.type===at.ground}}(ct||(ct={})),function(t){t.defaultMaximised=!1,function(t){t.createCopy=function(t,e){return void 0===t?void 0:{show:null!=e?e:t.show,popout:t.popout,close:t.close,maximise:t.maximise,minimise:t.minimise,tabDropdown:t.tabDropdown}}}(t.Header||(t.Header={}))}(mt||(mt={})),function(t){function e(t){const e=t.length,i=new Array(e);for(let n=0;n\"__glMaximised\"===t));t>0&&(o=!0,n=n.splice(t,1)),e=n.length>0?n[0]:ct.defaults.id}else e=n;return i=void 0!==t.maximised?t.maximised:o,{id:e,maximised:i}}}(wt||(wt={})),function(t){function e(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0;return{resolved:!0,root:Et.resolve(i),openPopouts:t.resolveOpenPopouts(e.openPopouts),dimensions:t.Dimensions.resolve(e.dimensions),settings:t.Settings.resolve(e.settings),header:t.Header.resolve(e.header,e.settings,e.labels)}}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:Lt.fromResolvedArray(e.openPopouts),settings:_t.Settings.createCopy(e.settings),dimensions:t.Dimensions.fromResolved(e.dimensions),header:_t.Header.createCopy(e.header)}},t.isResolved=function(t){const e=t;return void 0!==e.resolved&&!0===e.resolved},t.resolveOpenPopouts=function(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0,{root:Et.resolve(o),openPopouts:xt.resolveOpenPopouts(e.openPopouts),dimensions:xt.Dimensions.resolve(e.dimensions),settings:xt.Settings.resolve(e.settings),header:xt.Header.resolve(e.header,e.settings,e.labels),parentId:null!==(i=e.parentId)&&void 0!==i?i:null,indexInParent:null!==(n=e.indexInParent)&&void 0!==n?n:null,window:t.Window.resolve(e.window,e.dimensions),resolved:!0}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:i(e.openPopouts),dimensions:xt.Dimensions.fromResolved(e.dimensions),settings:_t.Settings.createCopy(e.settings),header:_t.Header.createCopy(e.header),parentId:e.parentId,indexInParent:e.indexInParent,window:t.Window.fromResolved(e.window)}},t.fromResolvedArray=i}(Lt||(Lt={}));class Wt{constructor(){this._allEventSubscriptions=[],this._subscriptionsMap=new Map,this.unbind=this.removeEventListener,this.trigger=this.emit}tryBubbleEvent(t,e){}emit(t,...e){let i=this._subscriptionsMap.get(t);if(void 0!==i){i=i.slice();for(let t=0;t0){const n=e.slice();n.unshift(t);const o=this._allEventSubscriptions.slice();for(let t=0;t0?n.contentItems[0]:n,e=0);const o=this._layoutManager.createAndInitContentItem(i,t);t.addChild(o,e),this._layoutManager.layoutConfig.settings.popInOnClose?this._onClose():this.close()}createWindow(){const t=this.createUrl(),e=Math.floor(1e6*Math.random()).toString(36),i=this.serializeWindowFeatures({width:this._initialWindowSize.width,height:this._initialWindowSize.height,innerWidth:this._initialWindowSize.width,innerHeight:this._initialWindowSize.height,menubar:\"no\",toolbar:\"no\",location:\"no\",personalbar:\"no\",resizable:\"yes\",scrollbars:\"no\",status:\"no\"});if(this._popoutWindow=globalThis.open(t,e,i),this._popoutWindow)this._popoutWindow.addEventListener(\"load\",(()=>this.positionWindow()),{passive:!0}),this._popoutWindow.addEventListener(\"beforeunload\",(()=>{this._layoutManager.layoutConfig.settings.popInOnClose?this.popIn():this._onClose()}),{passive:!0}),this._checkReadyInterval=setInterval((()=>this.checkReady()),10);else if(!0===this._layoutManager.layoutConfig.settings.blockedPopoutsThrowError){throw new j(\"Popout blocked\")}}checkReady(){if(null===this._popoutWindow)throw new K(\"BPCR01844\");this._popoutWindow.__glInstance&&this._popoutWindow.__glInstance.isInitialised&&(this.onInitialised(),void 0!==this._checkReadyInterval&&(clearInterval(this._checkReadyInterval),this._checkReadyInterval=void 0))}serializeWindowFeatures(t){const e=[];for(const i in t)e.push(i+\"=\"+t[i].toString());return e.join(\",\")}createUrl(){const t=\"gl-window-config-\"+Ot(),e=_t.minifyConfig(this._config);try{localStorage.setItem(t,JSON.stringify(e))}catch(t){throw new Error(\"Error while writing to localStorage \"+function(t){return t instanceof Error?t.message:\"string\"==typeof t?t:\"Unknown Error\"}(t))}const i=new URL(location.href);return i.searchParams.set(\"gl-window\",t),i.toString()}positionWindow(){if(null===this._popoutWindow)throw new Error(\"BrowserPopout.positionWindow: null popoutWindow\");this._popoutWindow.moveTo(this._initialWindowSize.left,this._initialWindowSize.top),this._popoutWindow.focus()}onInitialised(){this._isInitialised=!0,this.getGlInstance().on(\"popIn\",(()=>this.popIn())),this.emit(\"initialised\")}_onClose(){setTimeout((()=>this.emit(\"closed\")),50)}}class Gt extends Wt{constructor(t,e,i,n){super(),this.layoutManager=t,this._parent=i,this._element=n,this._popInParentIds=[],this._type=e.type,this._id=e.id,this._isInitialised=!1,this.isGround=!1,this.isRow=!1,this.isColumn=!1,this.isStack=!1,this.isComponent=!1,this.size=e.size,this.sizeUnit=e.sizeUnit,this.minSize=e.minSize,this.minSizeUnit=e.minSizeUnit,this._isClosable=e.isClosable,this._pendingEventPropagations={},this._throttledEvents=[\"stateChanged\"],this._contentItems=this.createContentItems(e.content)}get type(){return this._type}get id(){return this._id}set id(t){this._id=t}get popInParentIds(){return this._popInParentIds}get parent(){return this._parent}get contentItems(){return this._contentItems}get isClosable(){return this._isClosable}get element(){return this._element}get isInitialised(){return this._isInitialised}static isStack(t){return t.isStack}static isComponentItem(t){return t.isComponent}static isComponentParentableItem(t){return t.isStack||t.isGround}removeChild(t,e=!1){const i=this._contentItems.indexOf(t);if(-1===i)throw new Error(\"Can't remove child item. Unknown content item\");if(e||this._contentItems[i].destroy(),this._contentItems.splice(i,1),this._contentItems.length>0)this.updateSize(!1);else if(!this.isGround&&!0===this._isClosable){if(null===this._parent)throw new K(\"CIUC00874\");this._parent.removeChild(this)}}addChild(t,e,i){return null!=e||(e=this._contentItems.length),this._contentItems.splice(e,0,t),t.setParent(this),!0===this._isInitialised&&!1===t._isInitialised&&t.init(),e}replaceChild(t,e,i=!1){const n=this._contentItems.indexOf(t),o=t._element.parentNode;if(-1===n)throw new X(\"CIRCI23232\",\"Can't replace child. oldChild is not child of this\");if(null===o)throw new K(\"CIRCP23232\");if(o.replaceChild(e._element,t._element),!0===i&&(t._parent=null,t.destroy()),this._contentItems[n]=e,e.setParent(this),e.size=t.size,e.sizeUnit=t.sizeUnit,e.minSize=t.minSize,e.minSizeUnit=t.minSizeUnit,null===e._parent)throw new K(\"CIRCNC45699\");!0===e._parent._isInitialised&&!1===e._isInitialised&&e.init(),this.updateSize(!1)}remove(){if(null===this._parent)throw new K(\"CIR11110\");this._parent.removeChild(this)}popout(){const t=Ot(),e=this.layoutManager.createPopoutFromContentItem(this,void 0,t,void 0);return this.emitBaseBubblingEvent(\"stateChanged\"),e}calculateConfigContent(){const t=this._contentItems,e=t.length,i=new Array(e);for(let n=0;nthis.propagateEventToLayoutManager(t,e))))}propagateEventToLayoutManager(t,e){this._pendingEventPropagations[t]=!1,this.layoutManager.emitUnknown(t,e)}}class jt extends Gt{constructor(t,e,i){super(t,e,i,document.createElement(\"div\")),this._parentItem=i,this._focused=!1,this.isComponent=!0,this._reorderEnabled=e.reorderEnabled,this.applyUpdatableConfig(e),this._initialWantMaximise=e.maximised;const n=document.createElement(\"div\");n.classList.add(\"lm_content\"),this.element.appendChild(n),this._container=new Ft(e,this,t,n,(t=>this.handleUpdateItemConfigEvent(t)),(()=>this.show()),(()=>this.hide()),(t=>this.focus(t)),(t=>this.blur(t)))}get componentName(){return this._container.componentType}get componentType(){return this._container.componentType}get reorderEnabled(){return this._reorderEnabled}get initialWantMaximise(){return this._initialWantMaximise}get component(){return this._container.component}get container(){return this._container}get parentItem(){return this._parentItem}get headerConfig(){return this._headerConfig}get title(){return this._title}get tab(){return this._tab}get focused(){return this._focused}destroy(){this._container.destroy(),super.destroy()}applyUpdatableConfig(t){this.setTitle(t.title),this._headerConfig=t.header}toConfig(){const t=this._container.stateRequestEvent,e=void 0===t?this._container.state:t();return{type:at.component,content:[],size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,maximised:!1,isClosable:this.isClosable,reorderEnabled:this._reorderEnabled,title:this._title,header:mt.Header.createCopy(this._headerConfig),componentType:pt.copyComponentType(this.componentType),componentState:e}}close(){if(null===this.parent)throw new K(\"CIC68883\");this.parent.removeChild(this,!1)}enterDragMode(t,e){Tt(this.element,t),At(this.element,e),this._container.enterDragMode(t,e)}exitDragMode(){this._container.exitDragMode()}enterStackMaximised(){this._container.enterStackMaximised()}exitStackMaximised(){this._container.exitStackMaximised()}drag(){this._container.drag()}updateSize(t){this.updateNodeSize(t)}init(){this.updateNodeSize(!1),super.init(),this._container.emit(\"open\"),this.initContentItems()}setTitle(t){this._title=t,this.emit(\"titleChanged\",t),this.emit(\"stateChanged\")}setTab(t){this._tab=t,this.emit(\"tab\",t),this._container.setTab(t)}hide(){super.hide(),this._container.setVisibility(!1)}show(){super.show(),this._container.setVisibility(!0)}focus(t=!1){this.parentItem.setActiveComponentItem(this,!0,t)}setFocused(t){this._focused=!0,this.tab.setFocused(),t||this.emitBaseBubblingEvent(\"focus\")}blur(t=!1){this._focused&&this.layoutManager.setFocusedComponentItem(void 0,t)}setBlurred(t){this._focused=!1,this.tab.setBlurred(),t||this.emitBaseBubblingEvent(\"blur\")}setParent(t){this._parentItem=t,super.setParent(t)}handleUpdateItemConfigEvent(t){this.applyUpdatableConfig(t)}updateNodeSize(t){if(\"none\"!==this.element.style.display){const{width:e,height:i}=kt(this.element);this._container.setSizeToNodeSize(e,i,t)}}}class $t extends Gt{constructor(){super(...arguments),this._focused=!1}get focused(){return this._focused}setFocusedValue(t){this._focused=t}}class Zt extends Wt{constructor(t,e){super(),this._eElement=t,this._pointerTracking=!1,this._pointerDownEventListener=t=>this.onPointerDown(t),this._pointerMoveEventListener=t=>this.onPointerMove(t),this._pointerUpEventListener=t=>this.onPointerUp(t),this._timeout=void 0,this._allowableTargets=[t,...e],this._oDocument=document,this._eBody=document.body,this._nDelay=1800,this._nDistance=10,this._nX=0,this._nY=0,this._nOriginalX=0,this._nOriginalY=0,this._dragging=!1,this._eElement.addEventListener(\"pointerdown\",this._pointerDownEventListener,{passive:!0})}destroy(){this.checkRemovePointerTrackingEventListeners(),this._eElement.removeEventListener(\"pointerdown\",this._pointerDownEventListener)}cancelDrag(){this.processDragStop(void 0)}onPointerDown(t){if(this._allowableTargets.includes(t.target)&&t.isPrimary){const e=this.getPointerCoordinates(t);this.processPointerDown(e)}}processPointerDown(t){this._nOriginalX=t.x,this._nOriginalY=t.y,this._oDocument.addEventListener(\"pointermove\",this._pointerMoveEventListener),this._oDocument.addEventListener(\"pointerup\",this._pointerUpEventListener,{passive:!0}),this._pointerTracking=!0,this._timeout=setTimeout((()=>{try{this.startDrag()}catch(t){throw console.error(t),t}}),this._nDelay)}onPointerMove(t){this._pointerTracking&&(this.processDragMove(t),t.preventDefault())}processDragMove(t){this._nX=t.pageX-this._nOriginalX,this._nY=t.pageY-this._nOriginalY,!1===this._dragging&&(Math.abs(this._nX)>this._nDistance||Math.abs(this._nY)>this._nDistance)&&this.startDrag(),this._dragging&&this.emit(\"drag\",this._nX,this._nY,t)}onPointerUp(t){this.processDragStop(t)}processDragStop(t){var e;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this.checkRemovePointerTrackingEventListeners(),!0===this._dragging&&(this._eBody.classList.remove(\"lm_dragging\"),this._eElement.classList.remove(\"lm_dragging\"),null===(e=this._oDocument.querySelector(\"iframe\"))||void 0===e||e.style.setProperty(\"pointer-events\",\"\"),this._dragging=!1,this.emit(\"dragStop\",t))}checkRemovePointerTrackingEventListeners(){this._pointerTracking&&(this._oDocument.removeEventListener(\"pointermove\",this._pointerMoveEventListener),this._oDocument.removeEventListener(\"pointerup\",this._pointerUpEventListener),this._pointerTracking=!1)}startDrag(){var t;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this._dragging=!0,this._eBody.classList.add(\"lm_dragging\"),this._eElement.classList.add(\"lm_dragging\"),null===(t=this._oDocument.querySelector(\"iframe\"))||void 0===t||t.style.setProperty(\"pointer-events\",\"none\"),this.emit(\"dragStart\",this._nOriginalX,this._nOriginalY)}getPointerCoordinates(t){return{x:t.pageX,y:t.pageY}}}class qt{constructor(t,e,i){this._isVertical=t,this._size=e,this._grabSize=i0){const i=this.createSplitter(Math.max(0,e-1)).element;e>0?(this.contentItems[e-1].element.insertAdjacentElement(\"afterend\",i),i.insertAdjacentElement(\"afterend\",t.element)):(this.contentItems[0].element.insertAdjacentElement(\"beforebegin\",i),i.insertAdjacentElement(\"beforebegin\",t.element))}else this._childElementContainer.appendChild(t.element);super.addChild(t,e);const n=1/this.contentItems.length*100;if(!0===i)return this.emitBaseBubblingEvent(\"stateChanged\"),e;for(let e=0;e0&&(this.calculateRelativeSizes(),this.setAbsoluteSizes()),this.emitBaseBubblingEvent(\"stateChanged\"),this.emit(\"resize\")}setAbsoluteSizes(){const t=this.calculateAbsoluteSizes();for(let e=0;e0&&t.itemSizes[e]++,this._isColumn?(Tt(this.contentItems[e].element,t.crossAxisSize),At(this.contentItems[e].element,t.itemSizes[e])):(Tt(this.contentItems[e].element,t.itemSizes[e]),At(this.contentItems[e].element,t.crossAxisSize))}calculateAbsoluteSizes(){const t=(this.contentItems.length-1)*this._splitterSize,{width:e,height:i}=kt(this.element);let n,o;this._isColumn?(n=i-t,o=e):(n=e-t,o=i);let s=0;const r=[];for(let t=0;t0){const n=100-t;for(let t=0;t100&&e.length>0){for(let t=0;te)return;{const r=i/e;let a=i;for(let e=0;ethis.onSplitterDrag(e,t,i))),e.on(\"dragStop\",(()=>this.onSplitterDragStop(e))),e.on(\"dragStart\",(()=>this.onSplitterDragStart(e))),this._splitter.splice(t,0,e),e}getSplitItems(t){const e=this._splitter.indexOf(t);return{before:this.contentItems[e],after:this.contentItems[e+1]}}calculateContentItemMinSize(t){const e=t.minSize;if(void 0!==e){if(t.minSizeUnit===ht.Pixel)return e;throw new X(\"ROCGMD98831\",JSON.stringify(t))}{const t=this.layoutManager.layoutConfig.dimensions;return this._isColumn?t.defaultMinItemHeight:t.defaultMinItemWidth}}calculateContentItemsTotalMinSize(t){let e=0;for(const i of t)e+=this.calculateContentItemMinSize(i);return e}onSplitterDragStart(t){const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=this.calculateContentItemsTotalMinSize(e.before.contentItems),s=this.calculateContentItemsTotalMinSize(e.after.contentItems);this._splitterPosition=0,this._splitterMinPosition=-1*(i-o),this._splitterMaxPosition=n-s}onSplitterDrag(t,e,i){let n=this._isColumn?i:e;if(null===this._splitterMinPosition||null===this._splitterMaxPosition)throw new K(\"ROCOSD59226\");n=Math.max(n,this._splitterMinPosition),n=Math.min(n,this._splitterMaxPosition),this._splitterPosition=n;const o=zt(n);this._isColumn?t.element.style.top=o:t.element.style.left=o}onSplitterDragStop(t){if(null===this._splitterPosition)throw new K(\"ROCOSDS66932\");{const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=(this._splitterPosition+i)/(i+n),s=e.before.size+e.after.size;e.before.size=o*s,e.after.size=(1-o)*s,t.element.style.top=zt(0),t.element.style.left=zt(0),globalThis.requestAnimationFrame((()=>this.updateSize(!1)))}}}!function(t){t.getElementDimensionSize=function(t,e){return\"width\"===e?function(t){return t.offsetWidth}(t):function(t){return t.offsetHeight}(t)},t.setElementDimensionSize=function(t,e,i){return\"width\"===e?Tt(t,i):At(t,i)},t.createElement=function(t,e){const i=t.createElement(\"div\");return i.classList.add(\"lm_item\"),e?i.classList.add(\"lm_column\"):i.classList.add(\"lm_row\"),i}}(Xt||(Xt={}));class Yt extends $t{constructor(t,e,i){super(t,vt.create(e),null,Yt.createElement(document)),this.isGround=!0,this._childElementContainer=this.element,this._containerElement=i;let n=null;for(;;){const t=n?n.previousSibling:this._containerElement.lastChild;if(!(t instanceof Element&&t.classList.contains(\"lm_content\")))break;n=t}this._containerElement.insertBefore(this.element,n)}init(){if(!0!==this.isInitialised){this.updateNodeSize();for(let t=0;t0?this.contentItems[0]:this,n.isComponent)throw new Error(\"Cannot add item as child to ComponentItem\");{const t=this.layoutManager.createAndInitContentItem(i,n);return e=n.addChild(t,e),n===this?-1:e}}loadComponentAsRoot(t){this.clearRoot();const e=Ct.resolve(t,!1);if(e.maximised)throw new Error(\"Root Component cannot be maximised\");{const t=new jt(this.layoutManager,e,this);t.init(),this.addChild(t,0)}}addChild(t,e){if(this.contentItems.length>0)throw new Error(\"Ground node can only have a single child\");return this._childElementContainer.appendChild(t.element),e=super.addChild(t,e),this.updateSize(!1),this.emitBaseBubblingEvent(\"stateChanged\"),e}calculateConfigContent(){const t=this.contentItems,e=t.length,i=new Array(e);for(let n=0;n0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e)),this.updateContentItemsSize(!1))}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}createSideAreas(){const t=Yt.Area.oppositeSides,e=new Array(Object.keys(t).length);let i=0;for(const n in t){const o=n,s=this.getElementArea();if(null===s)throw new K(\"RCSA77553\");s.side=o,\"2\"===t[o][1]?s[o]=s[t[o]]-50:s[o]=s[t[o]]+50,s.surface=(s.x2-s.x1)*(s.y2-s.y1),e[i++]=s}return e}highlightDropZone(t,e,i){this.layoutManager.tabDropPlaceholder.remove(),super.highlightDropZone(t,e,i)}onDrop(t,e){if(t.isComponent){const e=ut.createDefault(),i=t;e.header=mt.Header.createCopy(i.headerConfig);const n=this.layoutManager.createAndInitContentItem(e,this);n.addChild(t),t=n}if(0===this.contentItems.length)this.addChild(t);else{if(t.type===at.row||t.type===at.column){const e=ut.createDefault(),i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}const i=\"x\"==e.side[0]?at.row:at.column,n=\"2\"==e.side[1],o=this.contentItems[0];if(o instanceof Xt&&o.type===i){const e=o.contentItems[n?0:o.contentItems.length-1];o.addChild(t,n?0:void 0,!0),e.size*=.5,t.size=e.size,t.sizeUnit=ht.Percent,o.updateSize(!1)}else{const e=ct.createDefault(i),s=this.layoutManager.createContentItem(e,this);this.replaceChild(o,s),s.addChild(t,n?0:void 0,!0),s.addChild(o,n?void 0:0,!0),o.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}}dock(){throw new X(\"GID87731\")}validateDocking(){throw new X(\"GIVD87732\")}getAllContentItems(){const t=[this];return this.deepGetAllContentItems(this.contentItems,t),t}getConfigMaximisedItems(){const t=[];return this.deepFilterContentItems(this.contentItems,t,(t=>!(!Gt.isStack(t)||!t.initialWantMaximise)||!(!Gt.isComponentItem(t)||!t.initialWantMaximise))),t}getItemsByPopInParentId(t){const e=[];return this.deepFilterContentItems(this.contentItems,e,(e=>e.popInParentIds.includes(t))),e}toConfig(){throw new Error(\"Cannot generate GroundItem config\")}setActiveComponentItem(t,e,i){}updateNodeSize(){const{width:t,height:e}=kt(this._containerElement);Tt(this.element,t),At(this.element,e),this.contentItems.length>0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e))}deepGetAllContentItems(t,e){for(let i=0;ithis.onClick(t),this._touchStartEventListener=t=>this.onTouchStart(t),this._element=document.createElement(\"div\"),this._element.classList.add(i),this._element.title=e,this._header.on(\"destroy\",(()=>this.destroy())),this._element.addEventListener(\"click\",this._clickEventListener,{passive:!0}),this._element.addEventListener(\"touchstart\",this._touchStartEventListener,{passive:!0}),this._header.controlsContainerElement.appendChild(this._element)}get element(){return this._element}destroy(){var t;this._element.removeEventListener(\"click\",this._clickEventListener),this._element.removeEventListener(\"touchstart\",this._touchStartEventListener),null===(t=this._element.parentNode)||void 0===t||t.removeChild(this._element)}onClick(t){this._pushEvent(t)}onTouchStart(t){this._pushEvent(t)}}class Jt{constructor(t,e,i,n,o){var s;this._layoutManager=t,this._componentItem=e,this._closeEvent=i,this._focusEvent=n,this._dragStartEvent=o,this._isActive=!1,this._tabClickListener=t=>this.onTabClickDown(t),this._tabTouchStartListener=t=>this.onTabTouchStart(t),this._closeClickListener=()=>this.onCloseClick(),this._closeTouchStartListener=()=>this.onCloseTouchStart(),this._dragStartListener=(t,e)=>this.onDragStart(t,e),this._contentItemDestroyListener=()=>this.onContentItemDestroy(),this._tabTitleChangedListener=t=>this.setTitle(t),this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_tab\"),this._titleElement=document.createElement(\"span\"),this._titleElement.classList.add(\"lm_title\"),this._closeElement=document.createElement(\"div\"),this._closeElement.classList.add(\"lm_close_tab\"),this._element.appendChild(this._titleElement),this._element.appendChild(this._closeElement),e.isClosable?this._closeElement.style.display=\"\":this._closeElement.style.display=\"none\",this.setTitle(e.title),this._componentItem.on(\"titleChanged\",this._tabTitleChangedListener);(null!==(s=e.reorderEnabled)&&void 0!==s?s:this._layoutManager.layoutConfig.settings.reorderEnabled)&&this.enableReorder(),this._element.addEventListener(\"click\",this._tabClickListener,{passive:!0}),this._element.addEventListener(\"touchstart\",this._tabTouchStartListener,{passive:!0}),this._componentItem.isClosable?(this._closeElement.addEventListener(\"click\",this._closeClickListener,{passive:!0}),this._closeElement.addEventListener(\"touchstart\",this._closeTouchStartListener,{passive:!0})):(this._closeElement.remove(),this._closeElement=void 0),this._componentItem.setTab(this),this._layoutManager.emit(\"tabCreated\",this)}get isActive(){return this._isActive}get componentItem(){return this._componentItem}get contentItem(){return this._componentItem}get element(){return this._element}get titleElement(){return this._titleElement}get closeElement(){return this._closeElement}get reorderEnabled(){return void 0!==this._dragListener}set reorderEnabled(t){t!==this.reorderEnabled&&(t?this.enableReorder():this.disableReorder())}setTitle(t){this._titleElement.innerText=t,this._element.title=t}setActive(t){t!==this._isActive&&(this._isActive=t,t?this._element.classList.add(\"lm_active\"):this._element.classList.remove(\"lm_active\"))}destroy(){var t,e;this._closeEvent=void 0,this._focusEvent=void 0,this._dragStartEvent=void 0,this._element.removeEventListener(\"click\",this._tabClickListener),this._element.removeEventListener(\"touchstart\",this._tabTouchStartListener),null===(t=this._closeElement)||void 0===t||t.removeEventListener(\"click\",this._closeClickListener),null===(e=this._closeElement)||void 0===e||e.removeEventListener(\"touchstart\",this._closeTouchStartListener),this._componentItem.off(\"titleChanged\",this._tabTitleChangedListener),this.reorderEnabled&&this.disableReorder(),this._element.remove()}setBlurred(){this._element.classList.remove(\"lm_focused\"),this._titleElement.classList.remove(\"lm_focused\")}setFocused(){this._element.classList.add(\"lm_focused\"),this._titleElement.classList.add(\"lm_focused\")}onDragStart(t,e){if(void 0===this._dragListener)throw new J(\"TODSDLU10093\");if(void 0===this._dragStartEvent)throw new J(\"TODS23309\");this._dragStartEvent(t,e,this._dragListener,this.componentItem)}onContentItemDestroy(){void 0!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=void 0)}onTabClickDown(t){const e=t.target;e!==this._element&&e!==this._titleElement||(0===t.button?this.notifyFocus():1===t.button&&this._componentItem.isClosable&&this.notifyClose())}onTabTouchStart(t){t.target===this._element&&this.notifyFocus()}onCloseClick(){this.notifyClose()}onCloseTouchStart(){this.notifyClose()}notifyClose(){if(void 0===this._closeEvent)throw new J(\"TNC15007\");this._closeEvent(this._componentItem)}notifyFocus(){if(void 0===this._focusEvent)throw new J(\"TNA15007\");this._focusEvent(this._componentItem)}enableReorder(){this._dragListener=new Zt(this._element,[this._titleElement]),this._dragListener.on(\"dragStart\",this._dragStartListener),this._componentItem.on(\"destroy\",this._contentItemDestroyListener)}disableReorder(){if(void 0===this._dragListener)throw new J(\"TDR87745\");this._componentItem.off(\"destroy\",this._contentItemDestroyListener),this._dragListener.off(\"dragStart\",this._dragStartListener),this._dragListener=void 0}}class Qt{constructor(t,e,i,n,o){this._layoutManager=t,this._componentRemoveEvent=e,this._componentFocusEvent=i,this._componentDragStartEvent=n,this._dropdownActiveChangedEvent=o,this._tabs=[],this._lastVisibleTabIndex=-1,this._dropdownActive=!1,this._element=document.createElement(\"section\"),this._element.classList.add(\"lm_tabs\"),this._dropdownElement=document.createElement(\"section\"),this._dropdownElement.classList.add(\"lm_tabdropdown_list\"),this._dropdownElement.style.display=\"none\"}get tabs(){return this._tabs}get tabCount(){return this._tabs.length}get lastVisibleTabIndex(){return this._lastVisibleTabIndex}get element(){return this._element}get dropdownElement(){return this._dropdownElement}get dropdownActive(){return this._dropdownActive}destroy(){for(let t=0;tthis.handleTabCloseEvent(t)),(t=>this.handleTabFocusEvent(t)),((t,e,i,n)=>this.handleTabDragStartEvent(t,e,i,n)));void 0===e&&(e=this._tabs.length),this._tabs.splice(e,0,i),ethis._lastVisibleTabIndex){const t=this._tabs[e];for(let t=e;t>0;t--)this._tabs[t]=this._tabs[t-1];this._tabs[0]=t}}updateTabSizes(t,e){let i=!1;this.tryUpdateTabSizes(i,t,e)||(i=!0,this.tryUpdateTabSizes(i,t,e)),i!==this._dropdownActive&&(this._dropdownActive=i,this._dropdownActiveChangedEvent())}tryUpdateTabSizes(t,e,i){if(this._tabs.length>0){if(void 0===i)throw new Error(\"non-empty tabs must have active component item\");let n=0,o=!1;const s=this._layoutManager.layoutConfig.settings.tabOverlapAllowance,r=this._tabs.indexOf(i.tab),a=this._tabs[r];this._lastVisibleTabIndex=-1;for(let i=0;ie){if(o)i===r&&(l.style.zIndex=\"auto\",l.style.marginLeft=\"\",l.parentElement!==this._element&&this._element.appendChild(l));else{let t;if(t=r>0&&r<=i?(d-e)/(i-1):(d-e)/i,tthis.onClick(t),this._touchStartListener=t=>this.onTouchStart(t),this._rowColumnClosable=!0,this._closeButton=null,this._popoutButton=null,this._tabsContainer=new Qt(this._layoutManager,(t=>this.handleTabInitiatedComponentRemoveEvent(t)),(t=>this.handleTabInitiatedComponentFocusEvent(t)),((t,e,i,n)=>this.handleTabInitiatedDragStartEvent(t,e,i,n)),(()=>this.processTabDropdownActiveChanged())),this._show=i.show,this._popoutEnabled=i.popoutEnabled,this._popoutLabel=i.popoutLabel,this._maximiseEnabled=i.maximiseEnabled,this._maximiseLabel=i.maximiseLabel,this._minimiseEnabled=i.minimiseEnabled,this._minimiseLabel=i.minimiseLabel,this._closeEnabled=i.closeEnabled,this._closeLabel=i.closeLabel,this._tabDropdownEnabled=i.tabDropdownEnabled,this._tabDropdownLabel=i.tabDropdownLabel,this.setSide(i.side),this._canRemoveComponent=this._configClosable,this._element=document.createElement(\"section\"),this._element.classList.add(\"lm_header\"),this._controlsContainerElement=document.createElement(\"section\"),this._controlsContainerElement.classList.add(\"lm_controls\"),this._element.appendChild(this._tabsContainer.element),this._element.appendChild(this._controlsContainerElement),this._element.appendChild(this._tabsContainer.dropdownElement),this._element.addEventListener(\"click\",this._clickListener,{passive:!0}),this._element.addEventListener(\"touchstart\",this._touchStartListener,{passive:!0}),this._documentMouseUpListener=()=>this._tabsContainer.hideAdditionalTabsDropdown(),globalThis.document.addEventListener(\"mouseup\",this._documentMouseUpListener,{passive:!0}),this._tabControlOffset=this._layoutManager.layoutConfig.settings.tabControlOffset,this._tabDropdownEnabled&&(this._tabDropdownButton=new Kt(this,this._tabDropdownLabel,\"lm_tabdropdown\",(()=>this._tabsContainer.showAdditionalTabsDropdown()))),this._popoutEnabled&&(this._popoutButton=new Kt(this,this._popoutLabel,\"lm_popout\",(()=>this.handleButtonPopoutEvent()))),this._maximiseEnabled&&(this._maximiseButton=new Kt(this,this._maximiseLabel,\"lm_maximise\",(t=>this.handleButtonMaximiseToggleEvent(t)))),this._configClosable&&(this._closeButton=new Kt(this,this._closeLabel,\"lm_close\",(()=>s()))),this.processTabDropdownActiveChanged()}get show(){return this._show}get side(){return this._side}get leftRightSided(){return this._leftRightSided}get layoutManager(){return this._layoutManager}get parent(){return this._parent}get tabs(){return this._tabsContainer.tabs}get lastVisibleTabIndex(){return this._tabsContainer.lastVisibleTabIndex}get element(){return this._element}get tabsContainerElement(){return this._tabsContainer.element}get controlsContainerElement(){return this._controlsContainerElement}destroy(){this.emit(\"destroy\"),this._popoutEvent=void 0,this._maximiseToggleEvent=void 0,this._clickEvent=void 0,this._touchStartEvent=void 0,this._componentRemoveEvent=void 0,this._componentFocusEvent=void 0,this._componentDragStartEvent=void 0,this._tabsContainer.destroy(),globalThis.document.removeEventListener(\"mouseup\",this._documentMouseUpListener),this._element.remove()}createTab(t,e){this._tabsContainer.createTab(t,e)}removeTab(t){this._tabsContainer.removeTab(t)}processActiveComponentChanged(t){this._tabsContainer.processActiveComponentChanged(t),this.updateTabSizes()}setSide(t){this._side=t,this._leftRightSided=[nt.right,nt.left].includes(this._side)}setRowColumnClosable(t){this._rowColumnClosable=t,this.updateClosability()}updateClosability(){let t;if(this._configClosable)if(this._rowColumnClosable){t=!0;const e=this.tabs.length;for(let i=0;i1}applyFocusedValue(t){t?this._element.classList.add(\"lm_focused\"):this._element.classList.remove(\"lm_focused\")}processMaximised(){if(void 0===this._maximiseButton)throw new J(\"HPMAX16997\");this._maximiseButton.element.setAttribute(\"title\",this._minimiseLabel)}processMinimised(){if(void 0===this._maximiseButton)throw new J(\"HPMIN16997\");this._maximiseButton.element.setAttribute(\"title\",this._maximiseLabel)}updateTabSizes(){if(this._tabsContainer.tabCount>0){const t=this._show?this._layoutManager.layoutConfig.dimensions.headerHeight:0;let e;this._leftRightSided?(this._element.style.height=\"\",this._element.style.width=zt(t)):(this._element.style.width=\"\",this._element.style.height=zt(t)),e=this._leftRightSided?this._element.offsetHeight-this._controlsContainerElement.offsetHeight-this._tabControlOffset:this._element.offsetWidth-this._controlsContainerElement.offsetWidth-this._tabControlOffset,this._tabsContainer.updateTabSizes(e,this._getActiveComponentItemEvent())}}handleTabInitiatedComponentRemoveEvent(t){if(this._canRemoveComponent){if(void 0===this._componentRemoveEvent)throw new J(\"HHTCE22294\");this._componentRemoveEvent(t)}}handleTabInitiatedComponentFocusEvent(t){if(void 0===this._componentFocusEvent)throw new J(\"HHTAE22294\");this._componentFocusEvent(t)}handleTabInitiatedDragStartEvent(t,e,i,n){if(this._canRemoveComponent){if(void 0===this._componentDragStartEvent)throw new J(\"HHTDSE22294\");this._componentDragStartEvent(t,e,i,n)}else i.cancelDrag()}processTabDropdownActiveChanged(){void 0!==this._tabDropdownButton&&Dt(this._tabDropdownButton.element,this._tabsContainer.dropdownActive)}handleButtonPopoutEvent(){if(this._layoutManager.layoutConfig.settings.popoutWholeStack){if(void 0===this._popoutEvent)throw new J(\"HHBPOE17834\");this._popoutEvent()}else{const t=this._getActiveComponentItemEvent();t&&t.popout()}}handleButtonMaximiseToggleEvent(t){if(void 0===this._maximiseToggleEvent)throw new J(\"HHBMTE16834\");this._maximiseToggleEvent()}onClick(t){t.target===this._element&&this.notifyClick(t)}onTouchStart(t){t.target===this._element&&this.notifyTouchStart(t)}notifyClick(t){if(void 0===this._clickEvent)throw new J(\"HNHC46834\");this._clickEvent(t)}notifyTouchStart(t){if(void 0===this._touchStartEvent)throw new J(\"HNHTS46834\");this._touchStartEvent(t)}}class ee extends $t{constructor(t,e,i){var n,o,s,r,a,l,h,d,c,m,u,p,g,f,v,_,y,C,w;super(t,e,i,ee.createElement(document)),this._headerSideChanged=!1,this._resizeListener=()=>this.handleResize(),this._maximisedListener=()=>this.handleMaximised(),this._minimisedListener=()=>this.handleMinimised(),this._headerConfig=e.header;const I=t.layoutConfig.header,b=e.content;let S;if(1!==b.length)S=void 0;else{S=b[0].header}this._initialWantMaximise=e.maximised,this._initialActiveItemIndex=null!==(n=e.activeItemIndex)&&void 0!==n?n:0;const E=null!==(r=null!==(s=null===(o=this._headerConfig)||void 0===o?void 0:o.show)&&void 0!==s?s:null==S?void 0:S.show)&&void 0!==r?r:I.show,x=null!==(h=null!==(l=null===(a=this._headerConfig)||void 0===a?void 0:a.popout)&&void 0!==l?l:null==S?void 0:S.popout)&&void 0!==h?h:I.popout,L=null!==(m=null!==(c=null===(d=this._headerConfig)||void 0===d?void 0:d.maximise)&&void 0!==c?c:null==S?void 0:S.maximise)&&void 0!==m?m:I.maximise,z=null!==(g=null!==(p=null===(u=this._headerConfig)||void 0===u?void 0:u.close)&&void 0!==p?p:null==S?void 0:S.close)&&void 0!==g?g:I.close,M=null!==(_=null!==(v=null===(f=this._headerConfig)||void 0===f?void 0:f.minimise)&&void 0!==v?v:null==S?void 0:S.minimise)&&void 0!==_?_:I.minimise,P=null!==(w=null!==(C=null===(y=this._headerConfig)||void 0===y?void 0:y.tabDropdown)&&void 0!==C?C:null==S?void 0:S.tabDropdown)&&void 0!==w?w:I.tabDropdown;this._maximisedEnabled=!1!==L;const T={show:!1!==E,side:!1===E?nt.top:E,popoutEnabled:!1!==x,popoutLabel:!1===x?\"\":x,maximiseEnabled:this._maximisedEnabled,maximiseLabel:!1===L?\"\":L,closeEnabled:!1!==z,closeLabel:!1===z?\"\":z,minimiseEnabled:!0,minimiseLabel:M,tabDropdownEnabled:!1!==P,tabDropdownLabel:!1===P?\"\":P};this._header=new te(t,this,T,e.isClosable&&!1!==z,(()=>this.getActiveComponentItem()),(()=>this.remove()),(()=>this.handlePopoutEvent()),(()=>this.toggleMaximise()),(t=>this.handleHeaderClickEvent(t)),(t=>this.handleHeaderTouchStartEvent(t)),(t=>this.handleHeaderComponentRemoveEvent(t)),(t=>this.handleHeaderComponentFocusEvent(t)),((t,e,i,n)=>this.handleHeaderComponentStartDragEvent(t,e,i,n))),this.isStack=!0,this._childElementContainer=document.createElement(\"section\"),this._childElementContainer.classList.add(\"lm_items\"),this.on(\"resize\",this._resizeListener),this._maximisedEnabled&&(this.on(\"maximised\",this._maximisedListener),this.on(\"minimised\",this._minimisedListener)),this.element.appendChild(this._header.element),this.element.appendChild(this._childElementContainer),this.setupHeaderPosition(),this._header.updateClosability()}get childElementContainer(){return this._childElementContainer}get header(){return this._header}get headerShow(){return this._header.show}get headerSide(){return this._header.side}get headerLeftRightSided(){return this._header.leftRightSided}get contentAreaDimensions(){return this._contentAreaDimensions}get initialWantMaximise(){return this._initialWantMaximise}get isMaximised(){return this===this.layoutManager.maximisedStack}get stackParent(){if(!this.parent)throw new Error(\"Stack should always have a parent\");return this.parent}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}init(){if(!0===this.isInitialised)return;this.updateNodeSize();for(let t=0;t0){if(this._initialActiveItemIndex<0||this._initialActiveItemIndex>=e)throw new Error(`ActiveItemIndex out of range: ${this._initialActiveItemIndex} id: ${this.id}`);for(let i=0;ithis.contentItems.length)throw e-=1,new X(\"SAC99728\");if(t instanceof jt)return e=super.addChild(t,e),this._childElementContainer.appendChild(t.element),this._header.createTab(t,e),this.setActiveComponentItem(t,i),this._header.updateTabSizes(),this.updateSize(!1),t.container.setBaseLogicalZIndex(),this._header.updateClosability(),this.emitStateChangedEvent(),e;throw new X(\"SACC88532\")}removeChild(t,e){const i=t,n=this.contentItems.indexOf(i),o=1===this.contentItems.length;if(this._activeComponentItem===i&&(i.focused&&i.blur(),!o)){const t=0===n?1:n-1;this.setActiveComponentItem(this.contentItems[t],!1)}this._header.removeTab(i),super.removeChild(i,e),o||this._header.updateClosability(),this.emitStateChangedEvent()}toggleMaximise(){this.isMaximised?this.minimise():this.maximise()}maximise(){if(!this.isMaximised){this.layoutManager.setMaximisedStack(this);const t=this.contentItems,e=t.length;for(let i=0;i0&&void 0===t)throw new Error(\"expected non-empty stack to have an active component item\");return{type:\"stack\",content:this.calculateConfigContent(),size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,isClosable:this.isClosable,maximised:this.isMaximised,header:this.createHeaderConfig(),activeItemIndex:t}}onDrop(t,e){if(\"header\"===this._dropSegment){if(this.resetHeaderDropZone(),void 0===this._dropIndex)throw new J(\"SODDI68990\");return void this.addChild(t,this._dropIndex)}if(\"body\"===this._dropSegment)return void this.addChild(t,0,!0);const i=\"top\"===this._dropSegment||\"bottom\"===this._dropSegment,n=\"left\"===this._dropSegment||\"right\"===this._dropSegment,o=\"top\"===this._dropSegment||\"left\"===this._dropSegment,s=i&&this.stackParent.isColumn||n&&this.stackParent.isRow;if(t.isComponent){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createAndInitContentItem(e,this);i.addChild(t),t=i}if(t.type===at.row||t.type===at.column){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}if(s){const e=this.stackParent.contentItems.indexOf(this);this.stackParent.addChild(t,o?e:e+1,!0),this.size*=.5,t.size=this.size,t.sizeUnit=this.sizeUnit,this.stackParent.updateSize(!1)}else{const e=i?at.column:at.row,n=ct.createDefault(e),s=this.layoutManager.createContentItem(n,this);this.stackParent.replaceChild(this,s),s.addChild(t,o?0:void 0,!0),s.addChild(this,o?void 0:0,!0),this.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}highlightDropZone(t,e){for(const i in this._contentAreaDimensions){const n=i,o=this._contentAreaDimensions[n].hoverArea;if(o.x1t&&o.y1e)return void(\"header\"===n?(this._dropSegment=\"header\",this.highlightHeaderDropZone(this._header.leftRightSided?e:t)):(this.resetHeaderDropZone(),this.highlightBodyDropZone(n)))}}getArea(){if(\"none\"===this.element.style.display)return null;const t=super.getElementArea(this._header.element),e=super.getElementArea(this._childElementContainer);if(null===t||null===e)throw new K(\"SGAHC13086\");const i=e.x2-e.x1,n=e.y2-e.y1;return this._contentAreaDimensions={header:{hoverArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2},highlightArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2}}},0===this.contentItems.length?(this._contentAreaDimensions.body={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2}},super.getElementArea(this.element)):(this._contentAreaDimensions.left={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x1+.25*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x1+.5*i,y2:e.y2}},this._contentAreaDimensions.top={hoverArea:{x1:e.x1+.25*i,y1:e.y1,x2:e.x1+.75*i,y2:e.y1+.5*n},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y1+.5*n}},this._contentAreaDimensions.right={hoverArea:{x1:e.x1+.75*i,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1+.5*i,y1:e.y1,x2:e.x2,y2:e.y2}},this._contentAreaDimensions.bottom={hoverArea:{x1:e.x1+.25*i,y1:e.y1+.5*n,x2:e.x1+.75*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1+.5*n,x2:e.x2,y2:e.y2}},super.getElementArea(this.element))}positionHeader(t){this._header.side!==t&&(this._header.setSide(t),this._headerSideChanged=!0,this.setupHeaderPosition())}updateNodeSize(){if(\"none\"!==this.element.style.display){const t=kt(this.element);if(this._header.show){t[this._header.leftRightSided?it.width:it.height]-=this.layoutManager.layoutConfig.dimensions.headerHeight}this._childElementContainer.style.width=zt(t.width),this._childElementContainer.style.height=zt(t.height);for(let e=0;e=o&&tthis.onDrag(t,e,i))),this._dragListener.on(\"dragStop\",(()=>this.onDrop())),this.createDragProxyElements(t,e),null===this._componentItem.parent)throw new K(\"DPC10097\");this._componentItemFocused=this._componentItem.focused,this._componentItemFocused&&this._componentItem.blur(),this._componentItem.parent.removeChild(this._componentItem,!0),this.setDimensions(),document.body.appendChild(this._element),this.determineMinMaxXY(),this._layoutManager.calculateItemAreas(),this.setDropPosition(t,e)}get element(){return this._element}createDragProxyElements(t,e){this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_dragProxy\");const i=document.createElement(\"div\");i.classList.add(\"lm_header\");const n=document.createElement(\"div\");n.classList.add(\"lm_tabs\");const o=document.createElement(\"div\");o.classList.add(\"lm_tab\");const s=document.createElement(\"span\");s.classList.add(\"lm_title\"),o.appendChild(s),n.appendChild(o),i.appendChild(n),this._proxyContainerElement=document.createElement(\"div\"),this._proxyContainerElement.classList.add(\"lm_content\"),this._element.appendChild(i),this._element.appendChild(this._proxyContainerElement),this._originalParent instanceof ee&&this._originalParent.headerShow&&(this._sided=this._originalParent.headerLeftRightSided,this._element.classList.add(\"lm_\"+this._originalParent.headerSide),[nt.right,nt.bottom].indexOf(this._originalParent.headerSide)>=0&&this._proxyContainerElement.insertAdjacentElement(\"afterend\",i)),this._element.style.left=zt(t),this._element.style.top=zt(e),o.setAttribute(\"title\",this._componentItem.title),s.insertAdjacentText(\"afterbegin\",this._componentItem.title),this._proxyContainerElement.appendChild(this._componentItem.element)}determineMinMaxXY(){const t=this._layoutManager.groundItem;if(void 0===t)throw new J(\"DPDMMXY73109\");{const e=t.element.getBoundingClientRect();this._minX=e.left+document.body.scrollLeft,this._minY=e.top+document.body.scrollTop,this._maxX=this._minX+e.width,this._maxY=this._minY+e.height}}onDrag(t,e,i){const n=i.pageX,o=i.pageY;this.setDropPosition(n,o),this._componentItem.drag()}setDropPosition(t,e){this._layoutManager.layoutConfig.settings.constrainDragToContainer&&(t<=this._minX?t=Math.ceil(this._minX):t>=this._maxX&&(t=Math.floor(this._maxX)),e<=this._minY?e=Math.ceil(this._minY):e>=this._maxY&&(e=Math.floor(this._maxY))),this._element.style.left=zt(t),this._element.style.top=zt(e),this._area=this._layoutManager.getArea(t,e),null!==this._area&&(this._lastValidArea=this._area,this._area.contentItem.highlightDropZone(t,e,this._area))}onDrop(){const t=this._layoutManager.dropTargetIndicator;if(null===t)throw new K(\"DPOD30011\");let e;if(t.hide(),this._componentItem.exitDragMode(),null!==this._area)e=this._componentItem,this._area.contentItem.onDrop(e,this._area);else if(null!==this._lastValidArea){e=this._componentItem;this._lastValidArea.contentItem.onDrop(e,this._lastValidArea)}else this._originalParent?(e=this._componentItem,this._originalParent.addChild(e)):this._componentItem.destroy();this._element.remove(),this._layoutManager.emit(\"itemDropped\",this._componentItem),this._componentItemFocused&&void 0!==e&&e.focus()}setDimensions(){const t=this._layoutManager.layoutConfig.dimensions;if(void 0===t)throw new Error(\"DragProxy.setDimensions: dimensions undefined\");let e=t.dragProxyWidth,i=t.dragProxyHeight;if(void 0===e||void 0===i)throw new Error(\"DragProxy.setDimensions: width and/or height undefined\");const n=!1===this._layoutManager.layoutConfig.header.show?0:t.headerHeight;this._element.style.width=zt(e),this._element.style.height=zt(i),e-=this._sided?n:0,i-=this._sided?0:n,this._proxyContainerElement.style.width=zt(e),this._proxyContainerElement.style.height=zt(i),this._componentItem.enterDragMode(e,i),this._componentItem.show()}}class ne{constructor(t,e,i,n,o,s,r){this._layoutManager=t,this._element=e,this._extraAllowableChildTargets=i,this._componentTypeOrFtn=n,this._componentState=o,this._title=s,this._id=r,this._dragListener=null,this._dummyGroundContainer=document.createElement(\"div\");const a=gt.createDefault(\"row\");this._dummyGroundContentItem=new Yt(this._layoutManager,a,this._dummyGroundContainer),this.createDragListener()}destroy(){this.removeDragListener()}createDragListener(){this.removeDragListener(),this._dragListener=new Zt(this._element,this._extraAllowableChildTargets),this._dragListener.on(\"dragStart\",((t,e)=>this.onDragStart(t,e))),this._dragListener.on(\"dragStop\",(()=>this.onDragStop()))}onDragStart(t,e){var i;const n=\"component\";let o;if(\"function\"==typeof this._componentTypeOrFtn){const t=this._componentTypeOrFtn();o=ne.isDragSourceComponentItemConfig(t)?{type:n,componentState:t.state,componentType:t.type,title:null!==(i=t.title)&&void 0!==i?i:this._title}:t}else o={type:n,componentState:this._componentState,componentType:this._componentTypeOrFtn,title:this._title,id:this._id};const s=bt.resolve(o,!1),r=new jt(this._layoutManager,s,this._dummyGroundContentItem);if(this._dummyGroundContentItem.contentItems.push(r),null===this._dragListener)throw new K(\"DSODSD66746\");{const i=new ie(t,e,this._dragListener,this._layoutManager,r,this._dummyGroundContentItem),n=this._layoutManager.transitionIndicator;if(null===n)throw new K(\"DSODST66746\");n.transitionElements(this._element,i.element)}}onDragStop(){this.createDragListener()}removeDragListener(){null!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=null)}}!function(t){t.isDragSourceComponentItemConfig=function(t){return!(\"componentType\"in t)}}(ne||(ne={}));class oe{constructor(){this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_dropTargetIndicator\");const t=document.createElement(\"div\");t.classList.add(\"lm_inner\"),this._element.appendChild(t),document.body.appendChild(this._element)}destroy(){this._element.remove()}highlightArea(t,e){this._element.style.left=zt(t.x1+e),this._element.style.top=zt(t.y1+e),this._element.style.width=zt(t.x2-t.x1-e),this._element.style.height=zt(t.y2-t.y1-e),this._element.style.display=\"block\"}hide(){Dt(this._element,!1)}}class se{constructor(){this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_transition_indicator\"),document.body.appendChild(this._element),this._toElement=null,this._fromDimensions=null,this._totalAnimationDuration=200,this._animationStartTime=null}destroy(){this._element.remove()}transitionElements(t,e){}nextAnimationFrame(){}measure(t){const e=t.getBoundingClientRect();return{left:e.left,top:e.top,width:t.offsetWidth,height:t.offsetHeight}}}class re extends Wt{constructor(t){super(),this._layoutManager=t,this._childEventListener=t=>this.onEventFromChild(t),globalThis.addEventListener(re.ChildEventName,this._childEventListener,{passive:!0})}emit(t,...e){\"userBroadcast\"===t?this.emitUserBroadcast(...e):super.emit(t,...e)}emitUserBroadcast(...t){this.handleUserBroadcastEvent(\"userBroadcast\",t)}destroy(){globalThis.removeEventListener(re.ChildEventName,this._childEventListener)}handleUserBroadcastEvent(t,e){this._layoutManager.isSubWindow?this.propagateToParent(t,e):this.propagateToThisAndSubtree(t,e)}onEventFromChild(t){const e=t.detail;this.handleUserBroadcastEvent(e.eventName,e.args)}propagateToParent(t,e){const i={bubbles:!0,cancelable:!0,detail:{layoutManager:this._layoutManager,eventName:t,args:e}},n=new CustomEvent(re.ChildEventName,i),o=globalThis.opener;if(null===o)throw new K(\"EHPTP15778\");o.dispatchEvent(n)}propagateToThisAndSubtree(t,e){this.emitUnknown(t,...e);for(let i=0;ithis.handleContainerResize())),this._windowBeforeUnloadListener=()=>this.onBeforeUnload(),this._windowBeforeUnloadListening=!1,this._maximisedStackBeforeDestroyedListener=t=>this.cleanupBeforeMaximisedStackDestroyed(t),this.isSubWindow=t.isSubWindow,this._constructorOrSubWindowLayoutConfig=t.constructorOrSubWindowLayoutConfig,Q.checkInitialise(),dt.checkInitialise(),void 0!==t.containerElement&&(this._containerElement=t.containerElement)}get container(){return this._containerElement}get isInitialised(){return this._isInitialised}get groundItem(){return this._groundItem}get root(){return this._groundItem}get openPopouts(){return this._openPopouts}get dropTargetIndicator(){return this._dropTargetIndicator}get transitionIndicator(){return this._transitionIndicator}get width(){return this._width}get height(){return this._height}get eventHub(){return this._eventHub}get rootItem(){if(void 0===this._groundItem)throw new Error(\"Cannot access rootItem before init\");return 0===this._groundItem.contentItems.length?void 0:this._groundItem.contentItems[0]}get focusedComponentItem(){return this._focusedComponentItem}get tabDropPlaceholder(){return this._tabDropPlaceholder}get maximisedStack(){return this._maximisedStack}get deprecatedConstructor(){return!this.isSubWindow&&void 0!==this._constructorOrSubWindowLayoutConfig}destroy(){if(this._isInitialised){this._windowBeforeUnloadListening&&(globalThis.removeEventListener(\"beforeunload\",this._windowBeforeUnloadListener),this._windowBeforeUnloadListening=!1),!0===this.layoutConfig.settings.closePopoutsOnUnload&&this.closeAllOpenPopouts(),this._resizeObserver.disconnect(),this.checkClearResizeTimeout(),void 0!==this._groundItem&&this._groundItem.destroy(),this._tabDropPlaceholder.remove(),null!==this._dropTargetIndicator&&this._dropTargetIndicator.destroy(),null!==this._transitionIndicator&&this._transitionIndicator.destroy(),this._eventHub.destroy();for(const t of this._dragSources)t.destroy();this._dragSources=[],this._isInitialised=!1}}minifyConfig(t){return _t.minifyConfig(t)}unminifyConfig(t){return _t.unminifyConfig(t)}init(){let t;if(this.setContainer(),this._dropTargetIndicator=new oe,this._transitionIndicator=new se,this.updateSizeFromContainer(),this.isSubWindow){if(void 0===this._constructorOrSubWindowLayoutConfig)throw new J(\"LMIU07155\");{const e=this._constructorOrSubWindowLayoutConfig.root;if(void 0===e)throw new X(\"LMIC07156\");if(!Ct.isComponent(e))throw new X(\"LMIC07157\");t=e;const i=xt.resolve(this._constructorOrSubWindowLayoutConfig);this.layoutConfig=Object.assign(Object.assign({},i),{root:void 0})}}else void 0===this._constructorOrSubWindowLayoutConfig?this.layoutConfig=_t.createDefault():this.layoutConfig=xt.resolve(this._constructorOrSubWindowLayoutConfig);const e=this.layoutConfig;this._groundItem=new Yt(this,e.root,this._containerElement),this._groundItem.init(),this.checkLoadedLayoutMaximiseItem(),this._resizeObserver.observe(this._containerElement),this._isInitialised=!0,this.adjustColumnsResponsive(),this.emit(\"initialised\"),void 0!==t&&this.loadComponentAsRoot(t)}loadLayout(t){if(!this.isInitialised)throw new Error(\"GoldenLayout: Need to call init() if LayoutConfig with defined root passed to constructor\");if(void 0===this._groundItem)throw new J(\"LMLL11119\");this.createSubWindows(),this.layoutConfig=xt.resolve(t),this._groundItem.loadRoot(this.layoutConfig.root),this.checkLoadedLayoutMaximiseItem(),this.adjustColumnsResponsive()}saveLayout(){if(!1===this._isInitialised)throw new Error(\"Can't create config, layout not yet initialised\");if(void 0===this._groundItem)throw new J(\"LMTC18244\");{const t=this._groundItem.calculateConfigContent();let e;e=1!==t.length?void 0:t[0],this.reconcilePopoutWindows();const i=[];for(let t=0;t=0?n=this._groundItem.contentItems[0]:e=0;break;case at.row:case at.column:e=n.addItem(t,i.index);break;case at.stack:if(Ct.isComponent(t)){e=n.addItem(t,i.index);break}throw Error(tt[6]);case at.component:throw new X(\"LMAIALC87444602\");default:throw new Y(\"LMAIALU98881733\",n.type)}if(Ct.isComponent(t)){const t=n.contentItems[e];Gt.isStack(t)&&(n=t,e=0)}return i.parentItem=n,i.index=e,i}}}loadComponentAsRoot(t){if(void 0===this._groundItem)throw new Error(\"Cannot add item before init\");this._groundItem.loadComponentAsRoot(t)}updateSize(t,e){this.setSize(t,e)}setSize(t,e){if(this._width=t,this._height=e,!0===this._isInitialised){if(void 0===this._groundItem)throw new J(\"LMUS18881\");if(this._groundItem.setSize(this._width,this._height),this._maximisedStack){const{width:t,height:e}=kt(this._containerElement);Tt(this._maximisedStack.element,t),At(this._maximisedStack.element,e),this._maximisedStack.updateSize(!1)}this.adjustColumnsResponsive()}}beginSizeInvalidation(){this._sizeInvalidationBeginCount++}endSizeInvalidation(){0==--this._sizeInvalidationBeginCount&&this.updateSizeFromContainer()}updateSizeFromContainer(){const{width:t,height:e}=kt(this._containerElement);this.setSize(t,e)}updateRootSize(t=!1){if(void 0===this._groundItem)throw new J(\"LMURS28881\");this._groundItem.updateSize(t)}createAndInitContentItem(t,e){const i=this.createContentItem(t,e);return i.init(),i}createContentItem(t,e){if(\"string\"!=typeof t.type)throw new G(\"Missing parameter 'type'\",JSON.stringify(t));if(ct.isComponentItem(t)&&!(e instanceof ee)&&e&&!(!0===this.isSubWindow&&e instanceof Yt)){t={type:at.stack,content:[t],size:t.size,sizeUnit:t.sizeUnit,minSize:t.minSize,minSizeUnit:t.minSizeUnit,id:t.id,maximised:t.maximised,isClosable:t.isClosable,activeItemIndex:0,header:void 0}}return this.createContentItemFromConfig(t,e)}findFirstComponentItemById(t){if(void 0===this._groundItem)throw new J(\"LMFFCIBI82446\");return this.findFirstContentItemTypeByIdRecursive(at.component,t,this._groundItem)}createPopout(t,e,i,n){return t instanceof Gt?this.createPopoutFromContentItem(t,e,i,n):this.createPopoutFromItemConfig(t,e,i,n)}createPopoutFromContentItem(t,e,i,n){let o=t.parent,s=t;for(;null!==o&&1===o.contentItems.length&&!o.isGround;)s=o,o=o.parent;if(null===o)throw new K(\"LMCPFCI00834\");{if(void 0===n&&(n=o.contentItems.indexOf(s)),null!==i&&o.addPopInParentId(i),void 0===e){const i=globalThis.screenX||globalThis.screenLeft,n=globalThis.screenY||globalThis.screenTop,o=t.element.offsetLeft,s=t.element.offsetTop,{width:r,height:a}=kt(t.element);e={left:i+o,top:n+s,width:r,height:a}}const r=t.toConfig();if(t.remove(),ft.isRootItemConfig(r))return this.createPopoutFromItemConfig(r,e,i,n);throw new Error(`${tt[0]}`)}}beginVirtualSizedContainerAdding(){0==++this._virtualSizedContainerAddingBeginCount&&(this._virtualSizedContainers.length=0)}addVirtualSizedContainer(t){this._virtualSizedContainers.push(t)}endVirtualSizedContainerAdding(){if(0==--this._virtualSizedContainerAddingBeginCount){const t=this._virtualSizedContainers.length;if(t>0){this.fireBeforeVirtualRectingEvent(t);for(let e=0;ethis.emit(\"windowOpened\",a))),a.on(\"closed\",(()=>this.reconcilePopoutWindows())),this._openPopouts.push(a),this.layoutConfig.settings.closePopoutsOnUnload&&!this._windowBeforeUnloadListening&&(globalThis.addEventListener(\"beforeunload\",this._windowBeforeUnloadListener,{passive:!0}),this._windowBeforeUnloadListening=!0),a}closeAllOpenPopouts(){for(let t=0;tglobalThis.close()),1)}getArea(t,e){let i=null,n=1/0;for(let o=0;o=s.x1&&t=s.y1&&es.surface&&(n=s.surface,i=s)}return i}calculateItemAreas(){const t=this.getAllContentItems(),e=this._groundItem;if(void 0===e)throw new J(\"LMCIAR44365\");if(1!==t.length){e.contentItems[0].isStack?this._itemAreas=[]:this._itemAreas=e.createSideAreas();for(let e=0;e0){let e=t[0];if(Gt.isComponentItem(e)){const t=e.parent;if(null===t)throw new K(\"LMXLLMI69999\");e=t}if(!Gt.isStack(e))throw new X(\"LMCLLMI19993\");e.maximise()}}}processMaximiseStack(t){if(this._maximisedStack=t,t.on(\"beforeItemDestroyed\",this._maximisedStackBeforeDestroyedListener),t.element.classList.add(\"lm_maximised\"),t.element.insertAdjacentElement(\"afterend\",this._maximisePlaceholder),void 0===this._groundItem)throw new J(\"LMMXI19993\");{this._groundItem.element.prepend(t.element);const{width:e,height:i}=kt(this._containerElement);Tt(t.element,e),At(t.element,i),t.updateSize(!0),t.focusActiveContentItem(),this._maximisedStack.emit(\"maximised\"),this.emit(\"stateChanged\")}}processMinimiseMaximisedStack(){if(void 0===this._maximisedStack)throw new X(\"LMMMS74422\");{const t=this._maximisedStack;if(null===t.parent)throw new K(\"LMMI13668\");t.element.classList.remove(\"lm_maximised\"),this._maximisePlaceholder.insertAdjacentElement(\"afterend\",t.element),this._maximisePlaceholder.remove(),this.updateRootSize(!0),this._maximisedStack=void 0,t.off(\"beforeItemDestroyed\",this._maximisedStackBeforeDestroyedListener),t.emit(\"minimised\"),this.emit(\"stateChanged\")}}reconcilePopoutWindows(){const t=[];for(let e=0;e{this._resizeTimeoutId=void 0,this.beginSizeInvalidation(),this.endSizeInvalidation()}),this.resizeDebounceInterval))}checkClearResizeTimeout(){void 0!==this._resizeTimeoutId&&(clearTimeout(this._resizeTimeoutId),this._resizeTimeoutId=void 0)}setContainer(){var t;const e=document.body,i=null!==(t=this._containerElement)&&void 0!==t?t:e;if(i===e){this.resizeWithContainerAutomatically=!0;const t=document.documentElement;t.style.height=\"100%\",t.style.margin=\"0\",t.style.padding=\"0\",t.style.overflow=\"clip\",e.style.height=\"100%\",e.style.margin=\"0\",e.style.padding=\"0\",e.style.overflow=\"clip\"}this._containerElement=i}onBeforeUnload(){this.destroy()}adjustColumnsResponsive(){if(void 0===this._groundItem)throw new J(\"LMACR20883\");if(this._firstLoad=!1,this.useResponsiveLayout()&&!this._updatingColumnsResponsive&&this._groundItem.contentItems.length>0&&this._groundItem.contentItems[0].isRow){if(void 0===this._groundItem||null===this._width)throw new J(\"LMACR77412\");{const t=this._groundItem.contentItems[0].contentItems.length;if(t<=1)return;{const e=this.layoutConfig.dimensions.defaultMinItemWidth;if(t*e<=this._width)return;{this._updatingColumnsResponsive=!0;const i=t-Math.max(Math.floor(this._width/e),1),n=this._groundItem.contentItems[0],o=this.getAllStacks();if(0===o.length)throw new X(\"LMACRS77413\");{const t=o[0];for(let e=0;en?void 0:{parentItem:t,index:o}}}case 1:if(void 0===this._focusedComponentItem)return;{const t=this._focusedComponentItem.parentItem;return this.tryCreateLocationFromParentItem(t,e)}case 2:{const t=this.findFirstContentItemType(at.stack);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 3:{let t=this.findFirstContentItemType(at.row);return void 0!==t?this.tryCreateLocationFromParentItem(t,e):(t=this.findFirstContentItemType(at.column),void 0!==t?this.tryCreateLocationFromParentItem(t,e):void 0)}case 4:{const t=this.findFirstContentItemType(at.row);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 5:{const t=this.findFirstContentItemType(at.column);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 6:if(void 0===this._groundItem)throw new J(\"LMFLRIF18244\");return void 0!==this.rootItem?void 0:void 0===e||0===e?{parentItem:this._groundItem,index:0}:void 0;case 7:if(void 0===this._groundItem)throw new J(\"LMFLF18244\");{const t=this._groundItem.contentItems;if(0===t.length)return void 0===e||0===e?{parentItem:this._groundItem,index:0}:void 0;{const i=t[0];return this.tryCreateLocationFromParentItem(i,e)}}}}tryCreateLocationFromParentItem(t,e){const i=t.contentItems.length;return void 0===e?{parentItem:t,index:i}:e<0||e>i?void 0:{parentItem:t,index:e}}}!function(t){t.createMaximisePlaceElement=function(t){const e=t.createElement(\"div\");return e.classList.add(\"lm_maximise_place\"),e},t.createTabDropPlaceholderElement=function(t){const e=t.createElement(\"div\");return e.classList.add(\"lm_drop_tab_placeholder\"),e},t.defaultLocationSelectors=[{typeId:1,index:void 0},{typeId:2,index:void 0},{typeId:3,index:void 0},{typeId:7,index:void 0}],t.afterFocusedItemIfPossibleLocationSelectors=[{typeId:0,index:1},{typeId:2,index:void 0},{typeId:3,index:void 0},{typeId:7,index:void 0}]}(ae||(ae={}));class le extends ae{constructor(t,e,i,n){if(super(le.createLayoutManagerConstructorParameters(t,e)),this._bindComponentEventHanlderPassedInConstructor=!1,this._creationTimeoutPassed=!1,void 0!==e&&\"function\"==typeof e&&(this.bindComponentEvent=e,this._bindComponentEventHanlderPassedInConstructor=!0,void 0!==i&&(this.unbindComponentEvent=i)),!this._bindComponentEventHanlderPassedInConstructor&&this.isSubWindow){if(void 0===this._constructorOrSubWindowLayoutConfig)throw new J(\"VLC98823\");{const t=xt.resolve(this._constructorOrSubWindowLayoutConfig);this.layoutConfig=Object.assign(Object.assign({},t),{root:void 0})}}!0!==n&&(this.deprecatedConstructor||this.init())}destroy(){this.bindComponentEvent=void 0,this.unbindComponentEvent=void 0,super.destroy()}init(){if(this._bindComponentEventHanlderPassedInConstructor||\"loading\"!==document.readyState&&null!==document.body){if(!this._bindComponentEventHanlderPassedInConstructor&&!0===this.isSubWindow&&!this._creationTimeoutPassed)return setTimeout((()=>this.init()),7),void(this._creationTimeoutPassed=!0);!0===this.isSubWindow&&(this._bindComponentEventHanlderPassedInConstructor||this.clearHtmlAndAdjustStylesForSubWindow(),window.__glInstance=this),super.init()}else document.addEventListener(\"DOMContentLoaded\",(()=>this.init()),{passive:!0})}clearHtmlAndAdjustStylesForSubWindow(){const t=document.head,e=new Array(4);e[0]=document.querySelectorAll(\"body link\"),e[1]=document.querySelectorAll(\"body style\"),e[2]=document.querySelectorAll(\"template\"),e[3]=document.querySelectorAll(\".gl_keep\");for(let i=0;ithis.emit(\"popIn\"))),document.body.appendChild(t),!0}}bindComponent(t,e){if(void 0!==this.bindComponentEvent){return this.bindComponentEvent(t,e)}if(void 0!==this.getComponentEvent)return{virtual:!1,component:this.getComponentEvent(t,e)};{const t=`${tt[2]}: ${JSON.stringify(e)}`;throw new Z(t)}}unbindComponent(t,e,i){if(void 0!==this.unbindComponentEvent)this.unbindComponentEvent(t);else if(!e&&void 0!==this.releaseComponentEvent){if(void 0===i)throw new J(\"VCUCRCU333998\");this.releaseComponentEvent(t,i)}}}!function(t){let e=!1;t.createLayoutManagerConstructorParameters=function(t,i){const n=e?null:new URL(document.location.href).searchParams.get(\"gl-window\");e=!0;const o=null!==n;let s,r;if(null!==n){const e=localStorage.getItem(n);if(null===e)throw new Error(\"Null gl-window Config\");localStorage.removeItem(n);const i=JSON.parse(e),o=_t.unminifyConfig(i);r=xt.fromResolved(o),t instanceof HTMLElement&&(s=t)}else void 0===t?r=void 0:t instanceof HTMLElement?(r=void 0,s=t):r=t,void 0===s&&i instanceof HTMLElement&&(s=i);return{constructorOrSubWindowLayoutConfig:r,isSubWindow:o,containerElement:s}}}(le||(le={}));class he extends le{constructor(t,e,i){super(t,e,i,!0),this._componentTypesMap=new Map,this._registeredComponentMap=new Map,this._virtuableComponentMap=new Map,this._containerVirtualRectingRequiredEventListener=(t,e,i)=>this.handleContainerVirtualRectingRequiredEvent(t,e,i),this._containerVirtualVisibilityChangeRequiredEventListener=(t,e)=>this.handleContainerVirtualVisibilityChangeRequiredEvent(t,e),this._containerVirtualZIndexChangeRequiredEventListener=(t,e,i)=>this.handleContainerVirtualZIndexChangeRequiredEvent(t,e,i),this.deprecatedConstructor||this.init()}registerComponent(t,e,i=!1){if(\"function\"!=typeof e)throw new $(\"registerComponent() componentConstructorOrFactoryFtn parameter is not a function\");if(e.hasOwnProperty(\"prototype\")){const n=e;this.registerComponentConstructor(t,n,i)}else{const n=e;this.registerComponentFactoryFunction(t,n,i)}}registerComponentConstructor(t,e,i=!1){if(\"function\"!=typeof e)throw new Error(tt[1]);if(void 0!==this._componentTypesMap.get(t))throw new Z(`${tt[3]}: ${t}`);this._componentTypesMap.set(t,{constructor:e,factoryFunction:void 0,virtual:i})}registerComponentFactoryFunction(t,e,i=!1){if(\"function\"!=typeof e)throw new Z(\"Please register a constructor function\");if(void 0!==this._componentTypesMap.get(t))throw new Z(`${tt[3]}: ${t}`);this._componentTypesMap.set(t,{constructor:void 0,factoryFunction:e,virtual:i})}registerComponentFunction(t){this.registerGetComponentConstructorCallback(t)}registerGetComponentConstructorCallback(t){if(\"function\"!=typeof t)throw new Error(\"Please register a callback function\");void 0!==this._getComponentConstructorFtn&&console.warn(\"Multiple component functions are being registered. Only the final registered function will be used.\"),this._getComponentConstructorFtn=t}getRegisteredComponentTypeNames(){const t=this._componentTypesMap.keys();return Array.from(t)}getComponentInstantiator(t){let e;const i=pt.resolveComponentTypeName(t);return void 0!==i&&(e=this._componentTypesMap.get(i)),void 0===e&&void 0!==this._getComponentConstructorFtn&&(e={constructor:this._getComponentConstructorFtn(t),factoryFunction:void 0,virtual:!1}),e}bindComponent(t,e){let i;const n=pt.resolveComponentTypeName(e);let o;if(void 0!==n&&(i=this._componentTypesMap.get(n)),void 0===i&&void 0!==this._getComponentConstructorFtn&&(i={constructor:this._getComponentConstructorFtn(e),factoryFunction:void 0,virtual:!1}),void 0!==i){const s=i.virtual;let r,a;r=void 0===e.componentState?void 0:Ut({},e.componentState);const l=i.constructor;if(void 0!==l)a=new l(t,r,s);else{const e=i.factoryFunction;if(void 0===e)throw new X(\"LMBCFFU10008\");a=e(t,r,s)}if(s){if(void 0===a)throw new J(\"GLBCVCU988774\");{const e=a,i=e.rootHtmlElement;if(void 0===i)throw new Z(`${tt[5]}: ${n}`);!function(t){const e=\"absolute\";t.style.position!==e&&(t.style.position=e)}(i),this.container.appendChild(i),this._virtuableComponentMap.set(t,e),t.virtualRectingRequiredEvent=this._containerVirtualRectingRequiredEventListener,t.virtualVisibilityChangeRequiredEvent=this._containerVirtualVisibilityChangeRequiredEventListener,t.virtualZIndexChangeRequiredEvent=this._containerVirtualZIndexChangeRequiredEventListener}}this._registeredComponentMap.set(t,a),o={virtual:i.virtual,component:a}}else o=super.bindComponent(t,e);return o}unbindComponent(t,e,i){if(void 0===this._registeredComponentMap.get(t))super.unbindComponent(t,e,i);else{const e=this._virtuableComponentMap.get(t);if(void 0!==e){const i=e.rootHtmlElement;if(void 0===i)throw new X(\"GLUC77743\",t.title);this.container.removeChild(i),this._virtuableComponentMap.delete(t)}}}fireBeforeVirtualRectingEvent(t){this._goldenLayoutBoundingClientRect=this.container.getBoundingClientRect(),super.fireBeforeVirtualRectingEvent(t)}handleContainerVirtualRectingRequiredEvent(t,e,i){const n=this._virtuableComponentMap.get(t);if(void 0===n)throw new J(\"GLHCSCE55933\");{const o=n.rootHtmlElement;if(void 0===o)throw new Z(tt[4]+\" \"+t.title);{const n=t.element.getBoundingClientRect(),s=n.left-this._goldenLayoutBoundingClientRect.left;o.style.left=zt(s);const r=n.top-this._goldenLayoutBoundingClientRect.top;o.style.top=zt(r),Tt(o,e),At(o,i)}}}handleContainerVirtualVisibilityChangeRequiredEvent(t,e){const i=this._virtuableComponentMap.get(t);if(void 0===i)throw new J(\"GLHCVVCRE55934\");{const n=i.rootHtmlElement;if(void 0===n)throw new Z(tt[4]+\" \"+t.title);Dt(n,e)}}handleContainerVirtualZIndexChangeRequiredEvent(t,e,i){const n=this._virtuableComponentMap.get(t);if(void 0===n)throw new J(\"GLHCVZICRE55935\");{const e=n.rootHtmlElement;if(void 0===e)throw new Z(tt[4]+\" \"+t.title);e.style.zIndex=i}}}const de=\"initial_\",ce={show:\"top\",popout:!1,maximise:!1,close:\"close-tab-unused\"},me={headerHeight:31},ue={hasHeaders:!0,reorderEnabled:!0},pe={popoutWholeStack:!1,constrainDragToContainer:!1,constrainDragToHeaders:!1,preventDragout:!1,showMaximiseIcon:!1,showPopoutIcon:!1,showCloseIcon:!1,blockedPopoutsThrowError:!0,closePopoutsOnUnload:!0,selectionEnabled:!1};var ge,fe;class ve{constructor(e){this.layout=e,ge.set(this,void 0),fe.set(this,void 0),this.handleResize=t=>{t.forEach((t=>this.resizeElement(t.target)))},this.handleMutation=()=>{this.layout.viewComponentsByContainerElement.forEach((t=>{this.resizeElement(t.container.element)}))},t.__classPrivateFieldSet(this,ge,new ResizeObserver(this.handleResize),\"f\"),t.__classPrivateFieldSet(this,fe,new MutationObserver(this.handleMutation),\"f\")}observeMutations(e){t.__classPrivateFieldGet(this,fe,\"f\")?.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[\"class\"]})}destroy(){t.__classPrivateFieldGet(this,ge,\"f\").disconnect(),t.__classPrivateFieldGet(this,fe,\"f\").disconnect()}observeContainer(e){t.__classPrivateFieldGet(this,ge,\"f\").observe(e)}unobserveContainer(e){t.__classPrivateFieldGet(this,ge,\"f\").unobserve(e)}resizeElement(t){const e=this.layout.viewComponentsByContainerElement.get(t);e&&e.resize()}}ge=new WeakMap,fe=new WeakMap;var _e={};Object.defineProperty(_e,\"__esModule\",{value:!0});var ye=_e.BaseItem=void 0;class Ce{constructor(t,e,i){this._item=t,this._layout=e,this._wrap=i}get raw(){return this._item}get layout(){return this._layout}get type(){return this._item.type}get contentItems(){return(this._item.contentItems??[]).map((t=>this._wrap(t)))}get parent(){const t=this._item.parent;return t?this._wrap(t):null}setActiveContentItem(t,e){if(\"stack\"!==this.type)throw new Error(`Cannot call setActiveContentItem from a non-stack item: ${this.type}`);this._item.setActiveContentItem(t.raw,e)}static wrapInternal(t,e,i){const n=Ce.wrapCache.get(e);if(n)return n;const o=new t(e,i,(e=>Ce.wrapInternal(t,e,i)));return Ce.wrapCache.set(e,o),o}}ye=_e.BaseItem=Ce,Ce.wrapCache=new WeakMap;const we=t=>!!t&&\"contentItems\"in t&&(t.isRow||t.isColumn);class Ie extends ye{isRoot(){return!!this._item.parent?.isGround}getBounds(){return this._item.element.getBoundingClientRect()}get viewName(){if(this._item.isComponent){const{component:t}=this._item;return t.identity.name}throw new Error(\"View name not found\")}onDestroyed(t){const e=({target:i})=>{i===this._item&&(t(),this._item.off(\"itemDestroyed\",e))};this._item.on(\"itemDestroyed\",e)}createAdjacentStack({position:t=\"right\"}={}){const e=this.raw;if(ee.isStack(e)&&e.parent){const i=[\"top\",\"bottom\"].includes(t)?\"column\":\"row\",n=[\"left\",\"top\"].includes(t)?1:0,o=we(e.parent)?e.parent:e.layoutManager,s=o,r=e.parent.contentItems.indexOf(e);e.parent.isGround&&e.parent.removeChild(e,!0);const a=o.newItem({type:i,content:[{type:\"stack\",content:[]}]},r);if(!a)throw new Error(\"createAdjacentStack: Failed to create new container\");const l=a.contentItems[0];return a.addChild(this.raw,n),we(s)&&s.removeChild(e,!0),this._wrap(l)}throw new Error(`Cannot creat adjacent stacks for type: ${e.type}, must be type 'stack'`)}setActiveContentItem(t,e=!0){if(!ee.isStack(this._item))throw new Error(`Cannot call setActiveContentItem from a non-stack item: ${this.type}`);this._item.setActiveComponentItem(t.raw,!e)}static wrap(t,e){return ye.wrapInternal(Ie,t,e)}}function be(t=[],e){for(const i of t)\"component\"===i.type?Object.keys(e).forEach((t=>{t in i&&(i.componentState={[`${de}${t}`]:i[t],...i.componentState}),i[t]=e[t]})):be(i.content,e)}function Se(t=[],e,i){for(const n of t)if(\"component\"===n.type)Object.keys(e).forEach((t=>{if(`${de}${t}`in n.componentState)return n[t]=n.componentState[`${de}${t}`],void delete n.componentState[`${de}${t}`];n[t]=e[t]}));else{if(n.size&&(\"row\"===i||\"column\"===i)){n[\"row\"===i?\"width\":\"height\"]=n.size?.includes(\".\")?parseFloat(n.size):parseInt(n.size)}Se(n.content,e,n.type)}}function Ee(t){if(t.root){t.root.content&&Se([t.root],{componentName:\"view\",isClosable:!0});const e=t.root;t.content=[e],delete t.root}return t}const xe=e=>class extends e{connectedCallback(){if(!this.name||!this.uuid)throw new Error(\" Name or uuid attribute missing\");if(!this.src)throw new Error(\" missing 'src' attribute.\");this.#t||(this.#t=document.createElement(\"iframe\"),this.#t.src=this.src,this.#t.style.height=\"100%\",this.#t.style.width=\"100%\",this.#t.style.border=\"none\",this.forceFrameName?this.#t.setAttribute(\"name\",this.forceFrameName):this.#t.setAttribute(\"name\",t.encodeOptions({brokerUrl:this.brokerUrl,name:this.name,uuid:this.uuid,providerId:this.providerId,contextGroup:this.contextGroup},\"of-frame\")),this.#t.setAttribute(\"id\",this.name),this.appendChild(this.#t))}#t;get brokerUrl(){return this.getAttribute(\"of-broker\")}set brokerUrl(t){t&&this.setAttribute(\"of-broker\",t)}get name(){return this.getAttribute(\"of-name\")}set name(t){t&&this.setAttribute(\"of-name\",t)}get forceFrameName(){return this.getAttribute(\"forceFrameName\")}set forceFrameName(t){t&&this.setAttribute(\"forceFrameName\",t)}get uuid(){return this.getAttribute(\"of-uuid\")}set uuid(t){t&&this.setAttribute(\"of-uuid\",t)}get src(){return this.getAttribute(\"src\")}set src(t){t&&this.setAttribute(\"src\",t)}get providerId(){return this.getAttribute(\"of-provider-id\")}set providerId(t){t&&this.setAttribute(\"of-provider-id\",t)}get contextGroup(){return this.getAttribute(\"of-context-group\")}set contextGroup(t){t&&this.setAttribute(\"of-context-group\",t)}static get observedAttributes(){return[\"name\"]}};class Le{static create(t){const e=document.createElement(\"of-view\");return Object.entries(t).forEach((([t,i])=>{e.setAttribute(t,i)})),e}}customElements.define(\"of-view\",xe(HTMLElement));class ze{constructor(t,i,n,{brokerUrl:o,interopConfig:s},r){this.container=t,this.config=i,this.ofView=null,this.isDragging=()=>this.container.tab.element?.className.includes(\"lm_dragging\")??!1;const{url:a,web:l,interop:h,name:d}=i||{},c=d??`internal-generated-view-${e.v4()}`;if(this.identity={uuid:n,name:c},this.container.element.setAttribute(\"of-name\",c),this.container.element.id=`container-${c}`,this.container.parent.id=c,void 0===a)return void this.handleUrlMissing();const m=this.updateTitleIfNotSet(a),u={\"of-broker\":o,\"of-uuid\":n,\"of-name\":c,src:a};l?.frameName&&(u.forceFrameName=l.frameName);const p=h?.currentContextGroup??s?.currentContextGroup;p&&(u[\"of-context-group\"]=p),s?.providerId&&(u[\"of-provider-id\"]=s?.providerId),this.ofView=Le.create(u),this.ofView.title=m??`Iframe: ${a}`,r.appendChild(this.ofView),this.ofView.style.position=\"absolute\"}updateTitleIfNotSet(t){return\"view\"===this.container.parent.title&&this.container.parent.setTitle(t),this.container.parent.title}handleUrlMissing(){const t=document.createElement(\"div\");t.setAttribute(\"style\",\"padding: 20px\");t.innerText=\"No URL provided\",this.container.element.appendChild(t)}destroy(){this.ofView?.remove(),this.ofView=null}closeView(){this.container.close()}resize(){if(this.ofView){if(this.isDragging())return void(this.ofView.style.display=\"none\");const t=this.container.element.getBoundingClientRect();this.ofView.style.position=\"absolute\",this.ofView.style.height=`${t.height}px`,this.ofView.style.width=`${t.width}px`,this.ofView.style.inset=`${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`,this.ofView.style.display=\"block\"}}}class Me extends U{static overrideConfig(t){const e={...ue,...t.settings,...pe};return e.reorderEnabled?be(t.content,{isClosable:!0}):be(t.content,{reorderEnabled:!1}),{dimensions:me,...t,settings:e,header:{...ce,show:!1!==t.settings?.hasHeaders&&ce.show}}}constructor(t,e,i,{options:n},o,s){super(),this.identity=t,this.container=e,this.initialConfig=i,this.layoutManager=o,this.platformProvider=s,this.viewComponentsByContainerElement=new Map,this.layoutContentCache=_.getSingleInstance(),this.reparentingViews=new Set,this.goldenLayoutDestroyed=!1,this.createViewComponent=(t,e)=>{m.handleSharedView(this.layoutManager,this.identity,e);const i=new ze(t,e,this.identity.uuid,this.options,this.iframeContainer);return e&&!1===e[`${de}isClosable`]&&this.stylesheet.insertRule(`#tab-${i.identity.name} .lm_close_tab { display: none; }`),this.viewComponentsByContainerElement.set(t.element,i),this.resizeController.observeContainer(t.element),i},this.iframeContainer=document.createElement(\"div\"),this.iframeContainer.id=`openfin-layout-iframe-container-${this.identity.layoutName}`,this.domEmitter=new V(e),this.setupStylesheets(),this.layout=new he(this.container),this.layout.resizeWithContainerAutomatically=!0,this.options=n,this.layout.registerComponent(\"view\",this.createViewComponent),this.setupListeners(),this.resizeController=new ve(this),this.layout.loadLayout(Me.overrideConfig(i));const r=document.createElement(\"div\");r.id=`openfin-layout-shadow-container-${this.identity.layoutName}`,r.attachShadow({mode:\"open\",delegatesFocus:!1}).appendChild(this.iframeContainer),this.container.appendChild(r),this.resizeController.observeMutations(this.container)}getStackByView({name:t}){const e=this.layout.findFirstComponentItemById(t);if(e?.parent&&e?.parent?.isStack)return Ie.wrap(e.parent,this)}getRoot(){return Ie.wrap(this.layout.rootItem,this)}async platformCloseView(t){const e=[...this.viewComponentsByContainerElement.values()].find((e=>e.identity.name===t.name));if(!e)throw new Error(`View with name: ${t.name} not found in layout.`);e.closeView()}async platformCreateView(t,{location:e,targetView:i}={}){if(i)throw new Error(\"TargetView not supported in web\");const n={options:this.platformProvider.normalizeOptions(t),target:this.identity,location:e};return this.insertView(n)}setupStylesheets(){if(this.container.setAttribute(\"data-openfin-layout-name\",this.identity.layoutName),this.stylesheet=new CSSStyleSheet,this.stylesheet.insertRule(\".lm_close { display: none; }\"),document.adoptedStyleSheets.push(this.stylesheet),this.initialConfig.settings?.preventSplitterResize){const t=`\\n [data-openfin-layout-name='${this.identity.layoutName}'] .lm_splitter {\\n pointer-events: none;\\n }`;this.stylesheet.insertRule(t)}}insertView({options:t,location:e,targetView:i}){const n=e?this.layoutContentCache.getItemOrUndefined(e.id):void 0,o=i?this.layoutContentCache.getItemOrUndefined(i.name):void 0,s=n??o??Ie.wrap(this.layout.rootItem,this);let r;if(ee.isStack(s.raw))r=s.raw;else{if(!we(s.raw))throw new Error(\"Cannot add a view at the requested location\");r=s.raw.newItem({type:\"stack\",content:[]})}const a=Math.min(r.contentItems.length,e?.index??r.contentItems.length);let l=this.layout.findFirstComponentItemById(t.name);l?(l.parent&&l.parent.removeChild(l,!0),r.addChild(l,a)):l=r.newComponent(\"view\",t,t.title??t.url??\"Default Title\",a);const h=l.component.identity;return Promise.resolve({identity:h})}replaceView({viewToReplace:t,newView:e}){throw new Error(\"Method not implemented.\")}replaceLayout(t){throw new Error(\"Method not implemented.\")}async cleanupView(t){}applyPreset(t){throw new Error(\"Method not implemented.\")}getCurrentViews(){return[...this.viewComponentsByContainerElement.values()].map((t=>t.identity))}async getFrameSnapshot(){return Ee(xt.fromResolved(this.layout.toConfig()))}isVisible(){return W(this.container)}async onViewDetached({viewIdentity:t}){this.reparentingViews.add(t.name),this.platformCloseView(t)}async destroy(){this.goldenLayoutDestroyed||(this.goldenLayoutDestroyed=!0,this.layout.destroy()),this.iframeContainer.remove(),this.resizeController.destroy(),document.adoptedStyleSheets=document.adoptedStyleSheets.filter((t=>t!==this.stylesheet)),this.viewComponentsByContainerElement.clear()}setupListeners(){this.container.addEventListener(\"pointerdown\",(t=>{if(t.target instanceof HTMLElement){const e=t.target.classList;[\"lm_tab\",\"lm_title\",\"lm_splitter\",\"lm_drag_handle\"].some((t=>e.contains(t)))&&(this.handleDragStart(),2===t.button&&t.stopPropagation())}}),!0),document.addEventListener(\"pointerup\",(()=>this.handleDragEnd()),!0),this.layout.on(\"tabCreated\",(t=>{const e=t.componentItem.component;t.element.id=`tab-${e.identity.name}`,this.domEmitter.dispatchLocalEvent(\"tab-created\",e.identity)})),this.layout.on(\"itemCreated\",(({target:t})=>{const e=t;if(Gt.isComponentItem(e)){const t=e.component;this.domEmitter.dispatchLocalEvent(\"container-created\",t.identity)}})),this.layout.on(\"itemDestroyed\",(t=>{const e=t.target;if(Gt.isComponentItem(e)){const t=e.component;this.removeViewComponent(t)}})),this.layout.on(\"itemDropped\",(()=>{this.handleDragEnd()}))}handleDragStart(){this.iframeContainer.style.pointerEvents=\"none\"}handleDragEnd(){this.iframeContainer.style.pointerEvents=\"\"}removeViewComponent(t){if(t.config&&!1===t.config[`${de}isClosable`]){const e=[...this.stylesheet.cssRules].findIndex((e=>e.cssText.includes(`#tab-${t.identity.name}`)));this.stylesheet.deleteRule(e)}t.destroy(),this.viewComponentsByContainerElement.delete(t.container.element),this.resizeController.unobserveContainer(t.container.element),this.reparentingViews.has(t.identity.name)?this.reparentingViews.delete(t.identity.name):this.platformProvider.closeView(t.identity.name);0===this.getCurrentViews().length&&(this.goldenLayoutDestroyed||(this.goldenLayoutDestroyed=!0,m.handleLastViewRemoved(this.layoutManager,this.identity)))}}class Pe{constructor(t,e,i,n){this.windowIdentity=t,this.connectConfig=e,this.provider=i,this.fallbackContainer=n}async createLayout(t,e){if(!(\"container\"in t)&&!this.fallbackContainer)throw new Error(\"Container property is not optional in web\");const{layoutName:i}=t,n=t,o=this.provider.initLayoutViews(n),s=n.container??this.fallbackContainer,r={...this.windowIdentity,layoutName:i},a=new Me(r,s,o,this.connectConfig,e,this.provider);m.registerLayout(e,i,a),this.fallbackContainer=null}async getLayoutSnapshot(t){return t.getLayoutSnapshot()}async handleLastViewRemoved(t){}}class Te{static async init(e){const i=e.getFin().InterApplicationBus.Channel,n=await i.create(`custom-frame-${e.me.uuid}`);return n.setDefaultAction((async(t,{target:e,opts:i},o)=>{const s=n.connections.find((t=>t.name===e.name));if(s)return n.dispatch(s,t,{...i,target:e});throw new Error(`Client with name ${e.name} not found`)})),await t.relayChannelClientApi_1(n,\"layout-relay\"),new Te(e)}constructor(t){this.wire=t,this.viewNames=new Set}normalizeOptions(t,i=\"default\"){const n=this.wire.me.uuid;let{name:o=`internal-generated-view-${e.v4()}`}=t;return o.match(/^internal-generated-view-/)&&this.viewNames.has(o)&&\"duplicate\"===i&&(o=`internal-generated-view-${e.v4()}`),this.viewNames.add(o),{...t,name:o,uuid:n}}closeView(t){this.viewNames.delete(t)}initLayoutViews({layout:t,multiInstanceViewBehavior:e}){return H((t=>{if(\"component\"===t.type&&t.componentState){const i=this.normalizeOptions(t.componentState,e);return{...t,componentState:i}}return t}),t)}}var Ae;const ke=t=>t;Ae=new WeakMap,exports.WebLayoutEntryPoint=class{constructor(e){Ae.set(this,void 0),this.initLayoutManager=async(e,i,{container:n,layoutManagerOverride:o})=>{const s=await Te.init(i),r=o??ke,a=new Pe(i.me,t.__classPrivateFieldGet(this,Ae,\"f\"),s,n),l=new(r(m.createClosedConstructor(a)));return await M(i,l),l},this.applyLayoutSnapshot=async(e,i,n)=>{await i.applyLayoutSnapshot(t.__classPrivateFieldGet(this,Ae,\"f\").platform.layoutSnapshot)},this.createLayout=async(t,e)=>m.createLayout(t,e),this.destroyLayout=async(t,e)=>m.destroyLayout(t,e),t.__classPrivateFieldSet(this,Ae,e,\"f\")}};\n","'use strict'\n\nexports.byteLength = byteLength\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\nfor (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i]\n revLookup[code.charCodeAt(i)] = i\n}\n\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction getLens (b64) {\n var len = b64.length\n\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // Trim off extra bytes after placeholder bytes are found\n // See: https://github.com/beatgammit/base64-js/issues/42\n var validLen = b64.indexOf('=')\n if (validLen === -1) validLen = len\n\n var placeHoldersLen = validLen === len\n ? 0\n : 4 - (validLen % 4)\n\n return [validLen, placeHoldersLen]\n}\n\n// base64 is 4/3 + up to two characters of the original data\nfunction byteLength (b64) {\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction _byteLength (b64, validLen, placeHoldersLen) {\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction toByteArray (b64) {\n var tmp\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n\n var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))\n\n var curByte = 0\n\n // if there are placeholders, only get up to the last complete 4 chars\n var len = placeHoldersLen > 0\n ? validLen - 4\n : validLen\n\n var i\n for (i = 0; i < len; i += 4) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 18) |\n (revLookup[b64.charCodeAt(i + 1)] << 12) |\n (revLookup[b64.charCodeAt(i + 2)] << 6) |\n revLookup[b64.charCodeAt(i + 3)]\n arr[curByte++] = (tmp >> 16) & 0xFF\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 2) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 2) |\n (revLookup[b64.charCodeAt(i + 1)] >> 4)\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 1) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 10) |\n (revLookup[b64.charCodeAt(i + 1)] << 4) |\n (revLookup[b64.charCodeAt(i + 2)] >> 2)\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] +\n lookup[num >> 12 & 0x3F] +\n lookup[num >> 6 & 0x3F] +\n lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n var tmp\n var output = []\n for (var i = start; i < end; i += 3) {\n tmp =\n ((uint8[i] << 16) & 0xFF0000) +\n ((uint8[i + 1] << 8) & 0xFF00) +\n (uint8[i + 2] & 0xFF)\n output.push(tripletToBase64(tmp))\n }\n return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n var tmp\n var len = uint8.length\n var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n var parts = []\n var maxChunkLength = 16383 // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1]\n parts.push(\n lookup[tmp >> 2] +\n lookup[(tmp << 4) & 0x3F] +\n '=='\n )\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + uint8[len - 1]\n parts.push(\n lookup[tmp >> 10] +\n lookup[(tmp >> 4) & 0x3F] +\n lookup[(tmp << 2) & 0x3F] +\n '='\n )\n }\n\n return parts.join('')\n}\n","/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n/* eslint-disable no-proto */\n\n'use strict'\n\nconst base64 = require('base64-js')\nconst ieee754 = require('ieee754')\nconst customInspectSymbol =\n (typeof Symbol === 'function' && typeof Symbol['for'] === 'function') // eslint-disable-line dot-notation\n ? Symbol['for']('nodejs.util.inspect.custom') // eslint-disable-line dot-notation\n : null\n\nexports.Buffer = Buffer\nexports.SlowBuffer = SlowBuffer\nexports.INSPECT_MAX_BYTES = 50\n\nconst K_MAX_LENGTH = 0x7fffffff\nexports.kMaxLength = K_MAX_LENGTH\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Print warning and recommend using `buffer` v4.x which has an Object\n * implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * We report that the browser does not support typed arrays if the are not subclassable\n * using __proto__. Firefox 4-29 lacks support for adding new properties to `Uint8Array`\n * (See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438). IE 10 lacks support\n * for __proto__ and has a buggy typed array implementation.\n */\nBuffer.TYPED_ARRAY_SUPPORT = typedArraySupport()\n\nif (!Buffer.TYPED_ARRAY_SUPPORT && typeof console !== 'undefined' &&\n typeof console.error === 'function') {\n console.error(\n 'This browser lacks typed array (Uint8Array) support which is required by ' +\n '`buffer` v5.x. Use `buffer` v4.x if you require old browser support.'\n )\n}\n\nfunction typedArraySupport () {\n // Can typed array instances can be augmented?\n try {\n const arr = new Uint8Array(1)\n const proto = { foo: function () { return 42 } }\n Object.setPrototypeOf(proto, Uint8Array.prototype)\n Object.setPrototypeOf(arr, proto)\n return arr.foo() === 42\n } catch (e) {\n return false\n }\n}\n\nObject.defineProperty(Buffer.prototype, 'parent', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.buffer\n }\n})\n\nObject.defineProperty(Buffer.prototype, 'offset', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.byteOffset\n }\n})\n\nfunction createBuffer (length) {\n if (length > K_MAX_LENGTH) {\n throw new RangeError('The value \"' + length + '\" is invalid for option \"size\"')\n }\n // Return an augmented `Uint8Array` instance\n const buf = new Uint8Array(length)\n Object.setPrototypeOf(buf, Buffer.prototype)\n return buf\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new TypeError(\n 'The \"string\" argument must be of type string. Received type number'\n )\n }\n return allocUnsafe(arg)\n }\n return from(arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\nfunction from (value, encodingOrOffset, length) {\n if (typeof value === 'string') {\n return fromString(value, encodingOrOffset)\n }\n\n if (ArrayBuffer.isView(value)) {\n return fromArrayView(value)\n }\n\n if (value == null) {\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n }\n\n if (isInstance(value, ArrayBuffer) ||\n (value && isInstance(value.buffer, ArrayBuffer))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof SharedArrayBuffer !== 'undefined' &&\n (isInstance(value, SharedArrayBuffer) ||\n (value && isInstance(value.buffer, SharedArrayBuffer)))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof value === 'number') {\n throw new TypeError(\n 'The \"value\" argument must not be of type number. Received type number'\n )\n }\n\n const valueOf = value.valueOf && value.valueOf()\n if (valueOf != null && valueOf !== value) {\n return Buffer.from(valueOf, encodingOrOffset, length)\n }\n\n const b = fromObject(value)\n if (b) return b\n\n if (typeof Symbol !== 'undefined' && Symbol.toPrimitive != null &&\n typeof value[Symbol.toPrimitive] === 'function') {\n return Buffer.from(value[Symbol.toPrimitive]('string'), encodingOrOffset, length)\n }\n\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n return from(value, encodingOrOffset, length)\n}\n\n// Note: Change prototype *after* Buffer.from is defined to workaround Chrome bug:\n// https://github.com/feross/buffer/pull/148\nObject.setPrototypeOf(Buffer.prototype, Uint8Array.prototype)\nObject.setPrototypeOf(Buffer, Uint8Array)\n\nfunction assertSize (size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be of type number')\n } else if (size < 0) {\n throw new RangeError('The value \"' + size + '\" is invalid for option \"size\"')\n }\n}\n\nfunction alloc (size, fill, encoding) {\n assertSize(size)\n if (size <= 0) {\n return createBuffer(size)\n }\n if (fill !== undefined) {\n // Only pay attention to encoding if it's a string. This\n // prevents accidentally sending in a number that would\n // be interpreted as a start offset.\n return typeof encoding === 'string'\n ? createBuffer(size).fill(fill, encoding)\n : createBuffer(size).fill(fill)\n }\n return createBuffer(size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n return alloc(size, fill, encoding)\n}\n\nfunction allocUnsafe (size) {\n assertSize(size)\n return createBuffer(size < 0 ? 0 : checked(size) | 0)\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n return allocUnsafe(size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n return allocUnsafe(size)\n}\n\nfunction fromString (string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8'\n }\n\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n\n const length = byteLength(string, encoding) | 0\n let buf = createBuffer(length)\n\n const actual = buf.write(string, encoding)\n\n if (actual !== length) {\n // Writing a hex string, for example, that contains invalid characters will\n // cause everything after the first invalid character to be ignored. (e.g.\n // 'abxxcd' will be treated as 'ab')\n buf = buf.slice(0, actual)\n }\n\n return buf\n}\n\nfunction fromArrayLike (array) {\n const length = array.length < 0 ? 0 : checked(array.length) | 0\n const buf = createBuffer(length)\n for (let i = 0; i < length; i += 1) {\n buf[i] = array[i] & 255\n }\n return buf\n}\n\nfunction fromArrayView (arrayView) {\n if (isInstance(arrayView, Uint8Array)) {\n const copy = new Uint8Array(arrayView)\n return fromArrayBuffer(copy.buffer, copy.byteOffset, copy.byteLength)\n }\n return fromArrayLike(arrayView)\n}\n\nfunction fromArrayBuffer (array, byteOffset, length) {\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\"offset\" is outside of buffer bounds')\n }\n\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\"length\" is outside of buffer bounds')\n }\n\n let buf\n if (byteOffset === undefined && length === undefined) {\n buf = new Uint8Array(array)\n } else if (length === undefined) {\n buf = new Uint8Array(array, byteOffset)\n } else {\n buf = new Uint8Array(array, byteOffset, length)\n }\n\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(buf, Buffer.prototype)\n\n return buf\n}\n\nfunction fromObject (obj) {\n if (Buffer.isBuffer(obj)) {\n const len = checked(obj.length) | 0\n const buf = createBuffer(len)\n\n if (buf.length === 0) {\n return buf\n }\n\n obj.copy(buf, 0, 0, len)\n return buf\n }\n\n if (obj.length !== undefined) {\n if (typeof obj.length !== 'number' || numberIsNaN(obj.length)) {\n return createBuffer(0)\n }\n return fromArrayLike(obj)\n }\n\n if (obj.type === 'Buffer' && Array.isArray(obj.data)) {\n return fromArrayLike(obj.data)\n }\n}\n\nfunction checked (length) {\n // Note: cannot use `length < K_MAX_LENGTH` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= K_MAX_LENGTH) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + K_MAX_LENGTH.toString(16) + ' bytes')\n }\n return length | 0\n}\n\nfunction SlowBuffer (length) {\n if (+length != length) { // eslint-disable-line eqeqeq\n length = 0\n }\n return Buffer.alloc(+length)\n}\n\nBuffer.isBuffer = function isBuffer (b) {\n return b != null && b._isBuffer === true &&\n b !== Buffer.prototype // so Buffer.isBuffer(Buffer.prototype) will be false\n}\n\nBuffer.compare = function compare (a, b) {\n if (isInstance(a, Uint8Array)) a = Buffer.from(a, a.offset, a.byteLength)\n if (isInstance(b, Uint8Array)) b = Buffer.from(b, b.offset, b.byteLength)\n if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n throw new TypeError(\n 'The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array'\n )\n }\n\n if (a === b) return 0\n\n let x = a.length\n let y = b.length\n\n for (let i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i]\n y = b[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n switch (String(encoding).toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'latin1':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return true\n default:\n return false\n }\n}\n\nBuffer.concat = function concat (list, length) {\n if (!Array.isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n\n if (list.length === 0) {\n return Buffer.alloc(0)\n }\n\n let i\n if (length === undefined) {\n length = 0\n for (i = 0; i < list.length; ++i) {\n length += list[i].length\n }\n }\n\n const buffer = Buffer.allocUnsafe(length)\n let pos = 0\n for (i = 0; i < list.length; ++i) {\n let buf = list[i]\n if (isInstance(buf, Uint8Array)) {\n if (pos + buf.length > buffer.length) {\n if (!Buffer.isBuffer(buf)) buf = Buffer.from(buf)\n buf.copy(buffer, pos)\n } else {\n Uint8Array.prototype.set.call(\n buffer,\n buf,\n pos\n )\n }\n } else if (!Buffer.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n } else {\n buf.copy(buffer, pos)\n }\n pos += buf.length\n }\n return buffer\n}\n\nfunction byteLength (string, encoding) {\n if (Buffer.isBuffer(string)) {\n return string.length\n }\n if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) {\n return string.byteLength\n }\n if (typeof string !== 'string') {\n throw new TypeError(\n 'The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. ' +\n 'Received type ' + typeof string\n )\n }\n\n const len = string.length\n const mustMatch = (arguments.length > 2 && arguments[2] === true)\n if (!mustMatch && len === 0) return 0\n\n // Use a for loop to avoid recursion\n let loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'ascii':\n case 'latin1':\n case 'binary':\n return len\n case 'utf8':\n case 'utf-8':\n return utf8ToBytes(string).length\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return len * 2\n case 'hex':\n return len >>> 1\n case 'base64':\n return base64ToBytes(string).length\n default:\n if (loweredCase) {\n return mustMatch ? -1 : utf8ToBytes(string).length // assume utf8\n }\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n let loweredCase = false\n\n // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n // property of a typed array.\n\n // This behaves neither like String nor Uint8Array in that we set start/end\n // to their upper/lower bounds if the value passed is out of range.\n // undefined is handled specially as per ECMA-262 6th Edition,\n // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n if (start === undefined || start < 0) {\n start = 0\n }\n // Return early if start > this.length. Done here to prevent potential uint32\n // coercion fail below.\n if (start > this.length) {\n return ''\n }\n\n if (end === undefined || end > this.length) {\n end = this.length\n }\n\n if (end <= 0) {\n return ''\n }\n\n // Force coercion to uint32. This will also coerce falsey/NaN values to 0.\n end >>>= 0\n start >>>= 0\n\n if (end <= start) {\n return ''\n }\n\n if (!encoding) encoding = 'utf8'\n\n while (true) {\n switch (encoding) {\n case 'hex':\n return hexSlice(this, start, end)\n\n case 'utf8':\n case 'utf-8':\n return utf8Slice(this, start, end)\n\n case 'ascii':\n return asciiSlice(this, start, end)\n\n case 'latin1':\n case 'binary':\n return latin1Slice(this, start, end)\n\n case 'base64':\n return base64Slice(this, start, end)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return utf16leSlice(this, start, end)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = (encoding + '').toLowerCase()\n loweredCase = true\n }\n }\n}\n\n// This property is used by `Buffer.isBuffer` (and the `is-buffer` npm package)\n// to detect a Buffer instance. It's not possible to use `instanceof Buffer`\n// reliably in a browserify context because there could be multiple different\n// copies of the 'buffer' package in use. This method works even for Buffer\n// instances that were created from another copy of the `buffer` package.\n// See: https://github.com/feross/buffer/issues/154\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n const i = b[n]\n b[n] = b[m]\n b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n const len = this.length\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits')\n }\n for (let i = 0; i < len; i += 2) {\n swap(this, i, i + 1)\n }\n return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n const len = this.length\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits')\n }\n for (let i = 0; i < len; i += 4) {\n swap(this, i, i + 3)\n swap(this, i + 1, i + 2)\n }\n return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n const len = this.length\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits')\n }\n for (let i = 0; i < len; i += 8) {\n swap(this, i, i + 7)\n swap(this, i + 1, i + 6)\n swap(this, i + 2, i + 5)\n swap(this, i + 3, i + 4)\n }\n return this\n}\n\nBuffer.prototype.toString = function toString () {\n const length = this.length\n if (length === 0) return ''\n if (arguments.length === 0) return utf8Slice(this, 0, length)\n return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.toLocaleString = Buffer.prototype.toString\n\nBuffer.prototype.equals = function equals (b) {\n if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n if (this === b) return true\n return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n let str = ''\n const max = exports.INSPECT_MAX_BYTES\n str = this.toString('hex', 0, max).replace(/(.{2})/g, '$1 ').trim()\n if (this.length > max) str += ' ... '\n return ''\n}\nif (customInspectSymbol) {\n Buffer.prototype[customInspectSymbol] = Buffer.prototype.inspect\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n if (isInstance(target, Uint8Array)) {\n target = Buffer.from(target, target.offset, target.byteLength)\n }\n if (!Buffer.isBuffer(target)) {\n throw new TypeError(\n 'The \"target\" argument must be one of type Buffer or Uint8Array. ' +\n 'Received type ' + (typeof target)\n )\n }\n\n if (start === undefined) {\n start = 0\n }\n if (end === undefined) {\n end = target ? target.length : 0\n }\n if (thisStart === undefined) {\n thisStart = 0\n }\n if (thisEnd === undefined) {\n thisEnd = this.length\n }\n\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError('out of range index')\n }\n\n if (thisStart >= thisEnd && start >= end) {\n return 0\n }\n if (thisStart >= thisEnd) {\n return -1\n }\n if (start >= end) {\n return 1\n }\n\n start >>>= 0\n end >>>= 0\n thisStart >>>= 0\n thisEnd >>>= 0\n\n if (this === target) return 0\n\n let x = thisEnd - thisStart\n let y = end - start\n const len = Math.min(x, y)\n\n const thisCopy = this.slice(thisStart, thisEnd)\n const targetCopy = target.slice(start, end)\n\n for (let i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i]\n y = targetCopy[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (numberIsNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [val], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n let indexSize = 1\n let arrLength = arr.length\n let valLength = val.length\n\n if (encoding !== undefined) {\n encoding = String(encoding).toLowerCase()\n if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n encoding === 'utf16le' || encoding === 'utf-16le') {\n if (arr.length < 2 || val.length < 2) {\n return -1\n }\n indexSize = 2\n arrLength /= 2\n valLength /= 2\n byteOffset /= 2\n }\n }\n\n function read (buf, i) {\n if (indexSize === 1) {\n return buf[i]\n } else {\n return buf.readUInt16BE(i * indexSize)\n }\n }\n\n let i\n if (dir) {\n let foundIndex = -1\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1) foundIndex = i\n if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n } else {\n if (foundIndex !== -1) i -= i - foundIndex\n foundIndex = -1\n }\n }\n } else {\n if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n for (i = byteOffset; i >= 0; i--) {\n let found = true\n for (let j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false\n break\n }\n }\n if (found) return i\n }\n }\n\n return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n offset = Number(offset) || 0\n const remaining = buf.length - offset\n if (!length) {\n length = remaining\n } else {\n length = Number(length)\n if (length > remaining) {\n length = remaining\n }\n }\n\n const strLen = string.length\n\n if (length > strLen / 2) {\n length = strLen / 2\n }\n let i\n for (i = 0; i < length; ++i) {\n const parsed = parseInt(string.substr(i * 2, 2), 16)\n if (numberIsNaN(parsed)) return i\n buf[offset + i] = parsed\n }\n return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n // Buffer#write(string)\n if (offset === undefined) {\n encoding = 'utf8'\n length = this.length\n offset = 0\n // Buffer#write(string, encoding)\n } else if (length === undefined && typeof offset === 'string') {\n encoding = offset\n length = this.length\n offset = 0\n // Buffer#write(string, offset[, length][, encoding])\n } else if (isFinite(offset)) {\n offset = offset >>> 0\n if (isFinite(length)) {\n length = length >>> 0\n if (encoding === undefined) encoding = 'utf8'\n } else {\n encoding = length\n length = undefined\n }\n } else {\n throw new Error(\n 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n )\n }\n\n const remaining = this.length - offset\n if (length === undefined || length > remaining) length = remaining\n\n if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n throw new RangeError('Attempt to write outside buffer bounds')\n }\n\n if (!encoding) encoding = 'utf8'\n\n let loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'hex':\n return hexWrite(this, string, offset, length)\n\n case 'utf8':\n case 'utf-8':\n return utf8Write(this, string, offset, length)\n\n case 'ascii':\n case 'latin1':\n case 'binary':\n return asciiWrite(this, string, offset, length)\n\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return base64Write(this, string, offset, length)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return ucs2Write(this, string, offset, length)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0)\n }\n}\n\nfunction base64Slice (buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf)\n } else {\n return base64.fromByteArray(buf.slice(start, end))\n }\n}\n\nfunction utf8Slice (buf, start, end) {\n end = Math.min(buf.length, end)\n const res = []\n\n let i = start\n while (i < end) {\n const firstByte = buf[i]\n let codePoint = null\n let bytesPerSequence = (firstByte > 0xEF)\n ? 4\n : (firstByte > 0xDF)\n ? 3\n : (firstByte > 0xBF)\n ? 2\n : 1\n\n if (i + bytesPerSequence <= end) {\n let secondByte, thirdByte, fourthByte, tempCodePoint\n\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 0x80) {\n codePoint = firstByte\n }\n break\n case 2:\n secondByte = buf[i + 1]\n if ((secondByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n if (tempCodePoint > 0x7F) {\n codePoint = tempCodePoint\n }\n }\n break\n case 3:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n codePoint = tempCodePoint\n }\n }\n break\n case 4:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n fourthByte = buf[i + 3]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n codePoint = tempCodePoint\n }\n }\n }\n }\n\n if (codePoint === null) {\n // we did not generate a valid codePoint so insert a\n // replacement char (U+FFFD) and advance only 1 byte\n codePoint = 0xFFFD\n bytesPerSequence = 1\n } else if (codePoint > 0xFFFF) {\n // encode to utf16 (surrogate pair dance)\n codePoint -= 0x10000\n res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n codePoint = 0xDC00 | codePoint & 0x3FF\n }\n\n res.push(codePoint)\n i += bytesPerSequence\n }\n\n return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nconst MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n const len = codePoints.length\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n }\n\n // Decode in chunks to avoid \"call stack size exceeded\".\n let res = ''\n let i = 0\n while (i < len) {\n res += String.fromCharCode.apply(\n String,\n codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n )\n }\n return res\n}\n\nfunction asciiSlice (buf, start, end) {\n let ret = ''\n end = Math.min(buf.length, end)\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F)\n }\n return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n let ret = ''\n end = Math.min(buf.length, end)\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i])\n }\n return ret\n}\n\nfunction hexSlice (buf, start, end) {\n const len = buf.length\n\n if (!start || start < 0) start = 0\n if (!end || end < 0 || end > len) end = len\n\n let out = ''\n for (let i = start; i < end; ++i) {\n out += hexSliceLookupTable[buf[i]]\n }\n return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n const bytes = buf.slice(start, end)\n let res = ''\n // If bytes.length is odd, the last 8 bits must be ignored (same as node.js)\n for (let i = 0; i < bytes.length - 1; i += 2) {\n res += String.fromCharCode(bytes[i] + (bytes[i + 1] * 256))\n }\n return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n const len = this.length\n start = ~~start\n end = end === undefined ? len : ~~end\n\n if (start < 0) {\n start += len\n if (start < 0) start = 0\n } else if (start > len) {\n start = len\n }\n\n if (end < 0) {\n end += len\n if (end < 0) end = 0\n } else if (end > len) {\n end = len\n }\n\n if (end < start) end = start\n\n const newBuf = this.subarray(start, end)\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(newBuf, Buffer.prototype)\n\n return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUintLE =\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let val = this[offset]\n let mul = 1\n let i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUintBE =\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n checkOffset(offset, byteLength, this.length)\n }\n\n let val = this[offset + --byteLength]\n let mul = 1\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUint8 =\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n return this[offset]\n}\n\nBuffer.prototype.readUint16LE =\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUint16BE =\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUint32LE =\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return ((this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16)) +\n (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUint32BE =\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] * 0x1000000) +\n ((this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n this[offset + 3])\n}\n\nBuffer.prototype.readBigUInt64LE = defineBigIntMethod(function readBigUInt64LE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const lo = first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24\n\n const hi = this[++offset] +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n last * 2 ** 24\n\n return BigInt(lo) + (BigInt(hi) << BigInt(32))\n})\n\nBuffer.prototype.readBigUInt64BE = defineBigIntMethod(function readBigUInt64BE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const hi = first * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset]\n\n const lo = this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last\n\n return (BigInt(hi) << BigInt(32)) + BigInt(lo)\n})\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let val = this[offset]\n let mul = 1\n let i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let i = byteLength\n let mul = 1\n let val = this[offset + --i]\n while (i > 0 && (mul *= 0x100)) {\n val += this[offset + --i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n if (!(this[offset] & 0x80)) return (this[offset])\n return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n const val = this[offset] | (this[offset + 1] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n const val = this[offset + 1] | (this[offset] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16) |\n (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] << 24) |\n (this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n (this[offset + 3])\n}\n\nBuffer.prototype.readBigInt64LE = defineBigIntMethod(function readBigInt64LE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const val = this[offset + 4] +\n this[offset + 5] * 2 ** 8 +\n this[offset + 6] * 2 ** 16 +\n (last << 24) // Overflow\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24)\n})\n\nBuffer.prototype.readBigInt64BE = defineBigIntMethod(function readBigInt64BE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const val = (first << 24) + // Overflow\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset]\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last)\n})\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUintLE =\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n let mul = 1\n let i = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUintBE =\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n let i = byteLength - 1\n let mul = 1\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUint8 =\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeUint16LE =\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeUint16BE =\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeUint32LE =\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset + 3] = (value >>> 24)\n this[offset + 2] = (value >>> 16)\n this[offset + 1] = (value >>> 8)\n this[offset] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeUint32BE =\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nfunction wrtBigUInt64LE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7)\n\n let lo = Number(value & BigInt(0xffffffff))\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n return offset\n}\n\nfunction wrtBigUInt64BE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7)\n\n let lo = Number(value & BigInt(0xffffffff))\n buf[offset + 7] = lo\n lo = lo >> 8\n buf[offset + 6] = lo\n lo = lo >> 8\n buf[offset + 5] = lo\n lo = lo >> 8\n buf[offset + 4] = lo\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n buf[offset + 3] = hi\n hi = hi >> 8\n buf[offset + 2] = hi\n hi = hi >> 8\n buf[offset + 1] = hi\n hi = hi >> 8\n buf[offset] = hi\n return offset + 8\n}\n\nBuffer.prototype.writeBigUInt64LE = defineBigIntMethod(function writeBigUInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeBigUInt64BE = defineBigIntMethod(function writeBigUInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n let i = 0\n let mul = 1\n let sub = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n let i = byteLength - 1\n let mul = 1\n let sub = 0\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n if (value < 0) value = 0xff + value + 1\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n this[offset + 2] = (value >>> 16)\n this[offset + 3] = (value >>> 24)\n return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (value < 0) value = 0xffffffff + value + 1\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeBigInt64LE = defineBigIntMethod(function writeBigInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nBuffer.prototype.writeBigInt64BE = defineBigIntMethod(function writeBigInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n }\n ieee754.write(buf, value, offset, littleEndian, 23, 4)\n return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n }\n ieee754.write(buf, value, offset, littleEndian, 52, 8)\n return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n if (!Buffer.isBuffer(target)) throw new TypeError('argument should be a Buffer')\n if (!start) start = 0\n if (!end && end !== 0) end = this.length\n if (targetStart >= target.length) targetStart = target.length\n if (!targetStart) targetStart = 0\n if (end > 0 && end < start) end = start\n\n // Copy 0 bytes; we're done\n if (end === start) return 0\n if (target.length === 0 || this.length === 0) return 0\n\n // Fatal error conditions\n if (targetStart < 0) {\n throw new RangeError('targetStart out of bounds')\n }\n if (start < 0 || start >= this.length) throw new RangeError('Index out of range')\n if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n // Are we oob?\n if (end > this.length) end = this.length\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start\n }\n\n const len = end - start\n\n if (this === target && typeof Uint8Array.prototype.copyWithin === 'function') {\n // Use built-in when available, missing from IE11\n this.copyWithin(targetStart, start, end)\n } else {\n Uint8Array.prototype.set.call(\n target,\n this.subarray(start, end),\n targetStart\n )\n }\n\n return len\n}\n\n// Usage:\n// buffer.fill(number[, offset[, end]])\n// buffer.fill(buffer[, offset[, end]])\n// buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n // Handle string cases:\n if (typeof val === 'string') {\n if (typeof start === 'string') {\n encoding = start\n start = 0\n end = this.length\n } else if (typeof end === 'string') {\n encoding = end\n end = this.length\n }\n if (encoding !== undefined && typeof encoding !== 'string') {\n throw new TypeError('encoding must be a string')\n }\n if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n if (val.length === 1) {\n const code = val.charCodeAt(0)\n if ((encoding === 'utf8' && code < 128) ||\n encoding === 'latin1') {\n // Fast path: If `val` fits into a single byte, use that numeric value.\n val = code\n }\n }\n } else if (typeof val === 'number') {\n val = val & 255\n } else if (typeof val === 'boolean') {\n val = Number(val)\n }\n\n // Invalid ranges are not set to a default, so can range check early.\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError('Out of range index')\n }\n\n if (end <= start) {\n return this\n }\n\n start = start >>> 0\n end = end === undefined ? this.length : end >>> 0\n\n if (!val) val = 0\n\n let i\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val\n }\n } else {\n const bytes = Buffer.isBuffer(val)\n ? val\n : Buffer.from(val, encoding)\n const len = bytes.length\n if (len === 0) {\n throw new TypeError('The value \"' + val +\n '\" is invalid for argument \"value\"')\n }\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len]\n }\n }\n\n return this\n}\n\n// CUSTOM ERRORS\n// =============\n\n// Simplified versions from Node, changed for Buffer-only usage\nconst errors = {}\nfunction E (sym, getMessage, Base) {\n errors[sym] = class NodeError extends Base {\n constructor () {\n super()\n\n Object.defineProperty(this, 'message', {\n value: getMessage.apply(this, arguments),\n writable: true,\n configurable: true\n })\n\n // Add the error code to the name to include it in the stack trace.\n this.name = `${this.name} [${sym}]`\n // Access the stack to generate the error message including the error code\n // from the name.\n this.stack // eslint-disable-line no-unused-expressions\n // Reset the name to the actual name.\n delete this.name\n }\n\n get code () {\n return sym\n }\n\n set code (value) {\n Object.defineProperty(this, 'code', {\n configurable: true,\n enumerable: true,\n value,\n writable: true\n })\n }\n\n toString () {\n return `${this.name} [${sym}]: ${this.message}`\n }\n }\n}\n\nE('ERR_BUFFER_OUT_OF_BOUNDS',\n function (name) {\n if (name) {\n return `${name} is outside of buffer bounds`\n }\n\n return 'Attempt to access memory outside buffer bounds'\n }, RangeError)\nE('ERR_INVALID_ARG_TYPE',\n function (name, actual) {\n return `The \"${name}\" argument must be of type number. Received type ${typeof actual}`\n }, TypeError)\nE('ERR_OUT_OF_RANGE',\n function (str, range, input) {\n let msg = `The value of \"${str}\" is out of range.`\n let received = input\n if (Number.isInteger(input) && Math.abs(input) > 2 ** 32) {\n received = addNumericalSeparator(String(input))\n } else if (typeof input === 'bigint') {\n received = String(input)\n if (input > BigInt(2) ** BigInt(32) || input < -(BigInt(2) ** BigInt(32))) {\n received = addNumericalSeparator(received)\n }\n received += 'n'\n }\n msg += ` It must be ${range}. Received ${received}`\n return msg\n }, RangeError)\n\nfunction addNumericalSeparator (val) {\n let res = ''\n let i = val.length\n const start = val[0] === '-' ? 1 : 0\n for (; i >= start + 4; i -= 3) {\n res = `_${val.slice(i - 3, i)}${res}`\n }\n return `${val.slice(0, i)}${res}`\n}\n\n// CHECK FUNCTIONS\n// ===============\n\nfunction checkBounds (buf, offset, byteLength) {\n validateNumber(offset, 'offset')\n if (buf[offset] === undefined || buf[offset + byteLength] === undefined) {\n boundsError(offset, buf.length - (byteLength + 1))\n }\n}\n\nfunction checkIntBI (value, min, max, buf, offset, byteLength) {\n if (value > max || value < min) {\n const n = typeof min === 'bigint' ? 'n' : ''\n let range\n if (byteLength > 3) {\n if (min === 0 || min === BigInt(0)) {\n range = `>= 0${n} and < 2${n} ** ${(byteLength + 1) * 8}${n}`\n } else {\n range = `>= -(2${n} ** ${(byteLength + 1) * 8 - 1}${n}) and < 2 ** ` +\n `${(byteLength + 1) * 8 - 1}${n}`\n }\n } else {\n range = `>= ${min}${n} and <= ${max}${n}`\n }\n throw new errors.ERR_OUT_OF_RANGE('value', range, value)\n }\n checkBounds(buf, offset, byteLength)\n}\n\nfunction validateNumber (value, name) {\n if (typeof value !== 'number') {\n throw new errors.ERR_INVALID_ARG_TYPE(name, 'number', value)\n }\n}\n\nfunction boundsError (value, length, type) {\n if (Math.floor(value) !== value) {\n validateNumber(value, type)\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset', 'an integer', value)\n }\n\n if (length < 0) {\n throw new errors.ERR_BUFFER_OUT_OF_BOUNDS()\n }\n\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset',\n `>= ${type ? 1 : 0} and <= ${length}`,\n value)\n}\n\n// HELPER FUNCTIONS\n// ================\n\nconst INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n // Node takes equal signs as end of the Base64 encoding\n str = str.split('=')[0]\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = str.trim().replace(INVALID_BASE64_RE, '')\n // Node converts strings with length < 2 to ''\n if (str.length < 2) return ''\n // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n while (str.length % 4 !== 0) {\n str = str + '='\n }\n return str\n}\n\nfunction utf8ToBytes (string, units) {\n units = units || Infinity\n let codePoint\n const length = string.length\n let leadSurrogate = null\n const bytes = []\n\n for (let i = 0; i < length; ++i) {\n codePoint = string.charCodeAt(i)\n\n // is surrogate component\n if (codePoint > 0xD7FF && codePoint < 0xE000) {\n // last char was a lead\n if (!leadSurrogate) {\n // no lead yet\n if (codePoint > 0xDBFF) {\n // unexpected trail\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n } else if (i + 1 === length) {\n // unpaired lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n }\n\n // valid lead\n leadSurrogate = codePoint\n\n continue\n }\n\n // 2 leads in a row\n if (codePoint < 0xDC00) {\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n leadSurrogate = codePoint\n continue\n }\n\n // valid surrogate pair\n codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n } else if (leadSurrogate) {\n // valid bmp char, but last char was a lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n }\n\n leadSurrogate = null\n\n // encode utf8\n if (codePoint < 0x80) {\n if ((units -= 1) < 0) break\n bytes.push(codePoint)\n } else if (codePoint < 0x800) {\n if ((units -= 2) < 0) break\n bytes.push(\n codePoint >> 0x6 | 0xC0,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x10000) {\n if ((units -= 3) < 0) break\n bytes.push(\n codePoint >> 0xC | 0xE0,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x110000) {\n if ((units -= 4) < 0) break\n bytes.push(\n codePoint >> 0x12 | 0xF0,\n codePoint >> 0xC & 0x3F | 0x80,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else {\n throw new Error('Invalid code point')\n }\n }\n\n return bytes\n}\n\nfunction asciiToBytes (str) {\n const byteArray = []\n for (let i = 0; i < str.length; ++i) {\n // Node's code seems to be doing this and not & 0x7F..\n byteArray.push(str.charCodeAt(i) & 0xFF)\n }\n return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n let c, hi, lo\n const byteArray = []\n for (let i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0) break\n\n c = str.charCodeAt(i)\n hi = c >> 8\n lo = c % 256\n byteArray.push(lo)\n byteArray.push(hi)\n }\n\n return byteArray\n}\n\nfunction base64ToBytes (str) {\n return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n let i\n for (i = 0; i < length; ++i) {\n if ((i + offset >= dst.length) || (i >= src.length)) break\n dst[i + offset] = src[i]\n }\n return i\n}\n\n// ArrayBuffer or Uint8Array objects from other contexts (i.e. iframes) do not pass\n// the `instanceof` check but they should be treated as of that type.\n// See: https://github.com/feross/buffer/issues/166\nfunction isInstance (obj, type) {\n return obj instanceof type ||\n (obj != null && obj.constructor != null && obj.constructor.name != null &&\n obj.constructor.name === type.name)\n}\nfunction numberIsNaN (obj) {\n // For IE11 support\n return obj !== obj // eslint-disable-line no-self-compare\n}\n\n// Create lookup table for `toString('hex')`\n// See: https://github.com/feross/buffer/issues/219\nconst hexSliceLookupTable = (function () {\n const alphabet = '0123456789abcdef'\n const table = new Array(256)\n for (let i = 0; i < 16; ++i) {\n const i16 = i * 16\n for (let j = 0; j < 16; ++j) {\n table[i16 + j] = alphabet[i] + alphabet[j]\n }\n }\n return table\n})()\n\n// Return not function with Error if BigInt not supported\nfunction defineBigIntMethod (fn) {\n return typeof BigInt === 'undefined' ? BufferBigIntNotDefined : fn\n}\n\nfunction BufferBigIntNotDefined () {\n throw new Error('BigInt not supported')\n}\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\nvar R = typeof Reflect === 'object' ? Reflect : null\nvar ReflectApply = R && typeof R.apply === 'function'\n ? R.apply\n : function ReflectApply(target, receiver, args) {\n return Function.prototype.apply.call(target, receiver, args);\n }\n\nvar ReflectOwnKeys\nif (R && typeof R.ownKeys === 'function') {\n ReflectOwnKeys = R.ownKeys\n} else if (Object.getOwnPropertySymbols) {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target)\n .concat(Object.getOwnPropertySymbols(target));\n };\n} else {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target);\n };\n}\n\nfunction ProcessEmitWarning(warning) {\n if (console && console.warn) console.warn(warning);\n}\n\nvar NumberIsNaN = Number.isNaN || function NumberIsNaN(value) {\n return value !== value;\n}\n\nfunction EventEmitter() {\n EventEmitter.init.call(this);\n}\nmodule.exports = EventEmitter;\nmodule.exports.once = once;\n\n// Backwards-compat with node 0.10.x\nEventEmitter.EventEmitter = EventEmitter;\n\nEventEmitter.prototype._events = undefined;\nEventEmitter.prototype._eventsCount = 0;\nEventEmitter.prototype._maxListeners = undefined;\n\n// By default EventEmitters will print a warning if more than 10 listeners are\n// added to it. This is a useful default which helps finding memory leaks.\nvar defaultMaxListeners = 10;\n\nfunction checkListener(listener) {\n if (typeof listener !== 'function') {\n throw new TypeError('The \"listener\" argument must be of type Function. Received type ' + typeof listener);\n }\n}\n\nObject.defineProperty(EventEmitter, 'defaultMaxListeners', {\n enumerable: true,\n get: function() {\n return defaultMaxListeners;\n },\n set: function(arg) {\n if (typeof arg !== 'number' || arg < 0 || NumberIsNaN(arg)) {\n throw new RangeError('The value of \"defaultMaxListeners\" is out of range. It must be a non-negative number. Received ' + arg + '.');\n }\n defaultMaxListeners = arg;\n }\n});\n\nEventEmitter.init = function() {\n\n if (this._events === undefined ||\n this._events === Object.getPrototypeOf(this)._events) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n }\n\n this._maxListeners = this._maxListeners || undefined;\n};\n\n// Obviously not all Emitters should be limited to 10. This function allows\n// that to be increased. Set to zero for unlimited.\nEventEmitter.prototype.setMaxListeners = function setMaxListeners(n) {\n if (typeof n !== 'number' || n < 0 || NumberIsNaN(n)) {\n throw new RangeError('The value of \"n\" is out of range. It must be a non-negative number. Received ' + n + '.');\n }\n this._maxListeners = n;\n return this;\n};\n\nfunction _getMaxListeners(that) {\n if (that._maxListeners === undefined)\n return EventEmitter.defaultMaxListeners;\n return that._maxListeners;\n}\n\nEventEmitter.prototype.getMaxListeners = function getMaxListeners() {\n return _getMaxListeners(this);\n};\n\nEventEmitter.prototype.emit = function emit(type) {\n var args = [];\n for (var i = 1; i < arguments.length; i++) args.push(arguments[i]);\n var doError = (type === 'error');\n\n var events = this._events;\n if (events !== undefined)\n doError = (doError && events.error === undefined);\n else if (!doError)\n return false;\n\n // If there is no 'error' event listener then throw.\n if (doError) {\n var er;\n if (args.length > 0)\n er = args[0];\n if (er instanceof Error) {\n // Note: The comments on the `throw` lines are intentional, they show\n // up in Node's output if this results in an unhandled exception.\n throw er; // Unhandled 'error' event\n }\n // At least give some kind of context to the user\n var err = new Error('Unhandled error.' + (er ? ' (' + er.message + ')' : ''));\n err.context = er;\n throw err; // Unhandled 'error' event\n }\n\n var handler = events[type];\n\n if (handler === undefined)\n return false;\n\n if (typeof handler === 'function') {\n ReflectApply(handler, this, args);\n } else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n ReflectApply(listeners[i], this, args);\n }\n\n return true;\n};\n\nfunction _addListener(target, type, listener, prepend) {\n var m;\n var events;\n var existing;\n\n checkListener(listener);\n\n events = target._events;\n if (events === undefined) {\n events = target._events = Object.create(null);\n target._eventsCount = 0;\n } else {\n // To avoid recursion in the case that type === \"newListener\"! Before\n // adding it to the listeners, first emit \"newListener\".\n if (events.newListener !== undefined) {\n target.emit('newListener', type,\n listener.listener ? listener.listener : listener);\n\n // Re-assign `events` because a newListener handler could have caused the\n // this._events to be assigned to a new object\n events = target._events;\n }\n existing = events[type];\n }\n\n if (existing === undefined) {\n // Optimize the case of one listener. Don't need the extra array object.\n existing = events[type] = listener;\n ++target._eventsCount;\n } else {\n if (typeof existing === 'function') {\n // Adding the second element, need to change to array.\n existing = events[type] =\n prepend ? [listener, existing] : [existing, listener];\n // If we've already got an array, just append.\n } else if (prepend) {\n existing.unshift(listener);\n } else {\n existing.push(listener);\n }\n\n // Check for listener leak\n m = _getMaxListeners(target);\n if (m > 0 && existing.length > m && !existing.warned) {\n existing.warned = true;\n // No error code for this since it is a Warning\n // eslint-disable-next-line no-restricted-syntax\n var w = new Error('Possible EventEmitter memory leak detected. ' +\n existing.length + ' ' + String(type) + ' listeners ' +\n 'added. Use emitter.setMaxListeners() to ' +\n 'increase limit');\n w.name = 'MaxListenersExceededWarning';\n w.emitter = target;\n w.type = type;\n w.count = existing.length;\n ProcessEmitWarning(w);\n }\n }\n\n return target;\n}\n\nEventEmitter.prototype.addListener = function addListener(type, listener) {\n return _addListener(this, type, listener, false);\n};\n\nEventEmitter.prototype.on = EventEmitter.prototype.addListener;\n\nEventEmitter.prototype.prependListener =\n function prependListener(type, listener) {\n return _addListener(this, type, listener, true);\n };\n\nfunction onceWrapper() {\n if (!this.fired) {\n this.target.removeListener(this.type, this.wrapFn);\n this.fired = true;\n if (arguments.length === 0)\n return this.listener.call(this.target);\n return this.listener.apply(this.target, arguments);\n }\n}\n\nfunction _onceWrap(target, type, listener) {\n var state = { fired: false, wrapFn: undefined, target: target, type: type, listener: listener };\n var wrapped = onceWrapper.bind(state);\n wrapped.listener = listener;\n state.wrapFn = wrapped;\n return wrapped;\n}\n\nEventEmitter.prototype.once = function once(type, listener) {\n checkListener(listener);\n this.on(type, _onceWrap(this, type, listener));\n return this;\n};\n\nEventEmitter.prototype.prependOnceListener =\n function prependOnceListener(type, listener) {\n checkListener(listener);\n this.prependListener(type, _onceWrap(this, type, listener));\n return this;\n };\n\n// Emits a 'removeListener' event if and only if the listener was removed.\nEventEmitter.prototype.removeListener =\n function removeListener(type, listener) {\n var list, events, position, i, originalListener;\n\n checkListener(listener);\n\n events = this._events;\n if (events === undefined)\n return this;\n\n list = events[type];\n if (list === undefined)\n return this;\n\n if (list === listener || list.listener === listener) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else {\n delete events[type];\n if (events.removeListener)\n this.emit('removeListener', type, list.listener || listener);\n }\n } else if (typeof list !== 'function') {\n position = -1;\n\n for (i = list.length - 1; i >= 0; i--) {\n if (list[i] === listener || list[i].listener === listener) {\n originalListener = list[i].listener;\n position = i;\n break;\n }\n }\n\n if (position < 0)\n return this;\n\n if (position === 0)\n list.shift();\n else {\n spliceOne(list, position);\n }\n\n if (list.length === 1)\n events[type] = list[0];\n\n if (events.removeListener !== undefined)\n this.emit('removeListener', type, originalListener || listener);\n }\n\n return this;\n };\n\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\n\nEventEmitter.prototype.removeAllListeners =\n function removeAllListeners(type) {\n var listeners, events, i;\n\n events = this._events;\n if (events === undefined)\n return this;\n\n // not listening for removeListener, no need to emit\n if (events.removeListener === undefined) {\n if (arguments.length === 0) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n } else if (events[type] !== undefined) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else\n delete events[type];\n }\n return this;\n }\n\n // emit removeListener for all listeners on all events\n if (arguments.length === 0) {\n var keys = Object.keys(events);\n var key;\n for (i = 0; i < keys.length; ++i) {\n key = keys[i];\n if (key === 'removeListener') continue;\n this.removeAllListeners(key);\n }\n this.removeAllListeners('removeListener');\n this._events = Object.create(null);\n this._eventsCount = 0;\n return this;\n }\n\n listeners = events[type];\n\n if (typeof listeners === 'function') {\n this.removeListener(type, listeners);\n } else if (listeners !== undefined) {\n // LIFO order\n for (i = listeners.length - 1; i >= 0; i--) {\n this.removeListener(type, listeners[i]);\n }\n }\n\n return this;\n };\n\nfunction _listeners(target, type, unwrap) {\n var events = target._events;\n\n if (events === undefined)\n return [];\n\n var evlistener = events[type];\n if (evlistener === undefined)\n return [];\n\n if (typeof evlistener === 'function')\n return unwrap ? [evlistener.listener || evlistener] : [evlistener];\n\n return unwrap ?\n unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length);\n}\n\nEventEmitter.prototype.listeners = function listeners(type) {\n return _listeners(this, type, true);\n};\n\nEventEmitter.prototype.rawListeners = function rawListeners(type) {\n return _listeners(this, type, false);\n};\n\nEventEmitter.listenerCount = function(emitter, type) {\n if (typeof emitter.listenerCount === 'function') {\n return emitter.listenerCount(type);\n } else {\n return listenerCount.call(emitter, type);\n }\n};\n\nEventEmitter.prototype.listenerCount = listenerCount;\nfunction listenerCount(type) {\n var events = this._events;\n\n if (events !== undefined) {\n var evlistener = events[type];\n\n if (typeof evlistener === 'function') {\n return 1;\n } else if (evlistener !== undefined) {\n return evlistener.length;\n }\n }\n\n return 0;\n}\n\nEventEmitter.prototype.eventNames = function eventNames() {\n return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : [];\n};\n\nfunction arrayClone(arr, n) {\n var copy = new Array(n);\n for (var i = 0; i < n; ++i)\n copy[i] = arr[i];\n return copy;\n}\n\nfunction spliceOne(list, index) {\n for (; index + 1 < list.length; index++)\n list[index] = list[index + 1];\n list.pop();\n}\n\nfunction unwrapListeners(arr) {\n var ret = new Array(arr.length);\n for (var i = 0; i < ret.length; ++i) {\n ret[i] = arr[i].listener || arr[i];\n }\n return ret;\n}\n\nfunction once(emitter, name) {\n return new Promise(function (resolve, reject) {\n function errorListener(err) {\n emitter.removeListener(name, resolver);\n reject(err);\n }\n\n function resolver() {\n if (typeof emitter.removeListener === 'function') {\n emitter.removeListener('error', errorListener);\n }\n resolve([].slice.call(arguments));\n };\n\n eventTargetAgnosticAddListener(emitter, name, resolver, { once: true });\n if (name !== 'error') {\n addErrorHandlerIfEventEmitter(emitter, errorListener, { once: true });\n }\n });\n}\n\nfunction addErrorHandlerIfEventEmitter(emitter, handler, flags) {\n if (typeof emitter.on === 'function') {\n eventTargetAgnosticAddListener(emitter, 'error', handler, flags);\n }\n}\n\nfunction eventTargetAgnosticAddListener(emitter, name, listener, flags) {\n if (typeof emitter.on === 'function') {\n if (flags.once) {\n emitter.once(name, listener);\n } else {\n emitter.on(name, listener);\n }\n } else if (typeof emitter.addEventListener === 'function') {\n // EventTarget does not have `error` event semantics like Node\n // EventEmitters, we do not listen for `error` events here.\n emitter.addEventListener(name, function wrapListener(arg) {\n // IE does not have builtin `{ once: true }` support so we\n // have to do it manually.\n if (flags.once) {\n emitter.removeEventListener(name, wrapListener);\n }\n listener(arg);\n });\n } else {\n throw new TypeError('The \"emitter\" argument must be of type EventEmitter. Received type ' + typeof emitter);\n }\n}\n","/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */\nexports.read = function (buffer, offset, isLE, mLen, nBytes) {\n var e, m\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var nBits = -7\n var i = isLE ? (nBytes - 1) : 0\n var d = isLE ? -1 : 1\n var s = buffer[offset + i]\n\n i += d\n\n e = s & ((1 << (-nBits)) - 1)\n s >>= (-nBits)\n nBits += eLen\n for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & ((1 << (-nBits)) - 1)\n e >>= (-nBits)\n nBits += mLen\n for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias\n } else if (e === eMax) {\n return m ? NaN : ((s ? -1 : 1) * Infinity)\n } else {\n m = m + Math.pow(2, mLen)\n e = e - eBias\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n var i = isLE ? 0 : (nBytes - 1)\n var d = isLE ? 1 : -1\n var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n value = Math.abs(value)\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0\n e = eMax\n } else {\n e = Math.floor(Math.log(value) / Math.LN2)\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--\n c *= 2\n }\n if (e + eBias >= 1) {\n value += rt / c\n } else {\n value += rt * Math.pow(2, 1 - eBias)\n }\n if (value * c >= 2) {\n e++\n c /= 2\n }\n\n if (e + eBias >= eMax) {\n m = 0\n e = eMax\n } else if (e + eBias >= 1) {\n m = ((value * c) - 1) * Math.pow(2, mLen)\n e = e + eBias\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n e = 0\n }\n }\n\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n e = (e << mLen) | m\n eLen += mLen\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128\n}\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView');\n\nmodule.exports = DataView;\n","var hashClear = require('./_hashClear'),\n hashDelete = require('./_hashDelete'),\n hashGet = require('./_hashGet'),\n hashHas = require('./_hashHas'),\n hashSet = require('./_hashSet');\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\nmodule.exports = Hash;\n","var listCacheClear = require('./_listCacheClear'),\n listCacheDelete = require('./_listCacheDelete'),\n listCacheGet = require('./_listCacheGet'),\n listCacheHas = require('./_listCacheHas'),\n listCacheSet = require('./_listCacheSet');\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\nmodule.exports = ListCache;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map');\n\nmodule.exports = Map;\n","var mapCacheClear = require('./_mapCacheClear'),\n mapCacheDelete = require('./_mapCacheDelete'),\n mapCacheGet = require('./_mapCacheGet'),\n mapCacheHas = require('./_mapCacheHas'),\n mapCacheSet = require('./_mapCacheSet');\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\nmodule.exports = MapCache;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Promise = getNative(root, 'Promise');\n\nmodule.exports = Promise;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Set = getNative(root, 'Set');\n\nmodule.exports = Set;\n","var MapCache = require('./_MapCache'),\n setCacheAdd = require('./_setCacheAdd'),\n setCacheHas = require('./_setCacheHas');\n\n/**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\nfunction SetCache(values) {\n var index = -1,\n length = values == null ? 0 : values.length;\n\n this.__data__ = new MapCache;\n while (++index < length) {\n this.add(values[index]);\n }\n}\n\n// Add methods to `SetCache`.\nSetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\nSetCache.prototype.has = setCacheHas;\n\nmodule.exports = SetCache;\n","var ListCache = require('./_ListCache'),\n stackClear = require('./_stackClear'),\n stackDelete = require('./_stackDelete'),\n stackGet = require('./_stackGet'),\n stackHas = require('./_stackHas'),\n stackSet = require('./_stackSet');\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\nmodule.exports = Stack;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Uint8Array = root.Uint8Array;\n\nmodule.exports = Uint8Array;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar WeakMap = getNative(root, 'WeakMap');\n\nmodule.exports = WeakMap;\n","/**\n * A specialized version of `_.forEach` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\nfunction arrayEach(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (iteratee(array[index], index, array) === false) {\n break;\n }\n }\n return array;\n}\n\nmodule.exports = arrayEach;\n","/**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\nfunction arrayFilter(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result[resIndex++] = value;\n }\n }\n return result;\n}\n\nmodule.exports = arrayFilter;\n","var baseTimes = require('./_baseTimes'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isIndex = require('./_isIndex'),\n isTypedArray = require('./isTypedArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = arrayLikeKeys;\n","/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n}\n\nmodule.exports = arrayPush;\n","/**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\nfunction arraySome(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (predicate(array[index], index, array)) {\n return true;\n }\n }\n return false;\n}\n\nmodule.exports = arraySome;\n","var baseAssignValue = require('./_baseAssignValue'),\n eq = require('./eq');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\nmodule.exports = assignValue;\n","var eq = require('./eq');\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\nmodule.exports = assocIndexOf;\n","var copyObject = require('./_copyObject'),\n keys = require('./keys');\n\n/**\n * The base implementation of `_.assign` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssign(object, source) {\n return object && copyObject(source, keys(source), object);\n}\n\nmodule.exports = baseAssign;\n","var copyObject = require('./_copyObject'),\n keysIn = require('./keysIn');\n\n/**\n * The base implementation of `_.assignIn` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssignIn(object, source) {\n return object && copyObject(source, keysIn(source), object);\n}\n\nmodule.exports = baseAssignIn;\n","var defineProperty = require('./_defineProperty');\n\n/**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction baseAssignValue(object, key, value) {\n if (key == '__proto__' && defineProperty) {\n defineProperty(object, key, {\n 'configurable': true,\n 'enumerable': true,\n 'value': value,\n 'writable': true\n });\n } else {\n object[key] = value;\n }\n}\n\nmodule.exports = baseAssignValue;\n","var Stack = require('./_Stack'),\n arrayEach = require('./_arrayEach'),\n assignValue = require('./_assignValue'),\n baseAssign = require('./_baseAssign'),\n baseAssignIn = require('./_baseAssignIn'),\n cloneBuffer = require('./_cloneBuffer'),\n copyArray = require('./_copyArray'),\n copySymbols = require('./_copySymbols'),\n copySymbolsIn = require('./_copySymbolsIn'),\n getAllKeys = require('./_getAllKeys'),\n getAllKeysIn = require('./_getAllKeysIn'),\n getTag = require('./_getTag'),\n initCloneArray = require('./_initCloneArray'),\n initCloneByTag = require('./_initCloneByTag'),\n initCloneObject = require('./_initCloneObject'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isMap = require('./isMap'),\n isObject = require('./isObject'),\n isSet = require('./isSet'),\n keys = require('./keys'),\n keysIn = require('./keysIn');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_FLAT_FLAG = 2,\n CLONE_SYMBOLS_FLAG = 4;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values supported by `_.clone`. */\nvar cloneableTags = {};\ncloneableTags[argsTag] = cloneableTags[arrayTag] =\ncloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =\ncloneableTags[boolTag] = cloneableTags[dateTag] =\ncloneableTags[float32Tag] = cloneableTags[float64Tag] =\ncloneableTags[int8Tag] = cloneableTags[int16Tag] =\ncloneableTags[int32Tag] = cloneableTags[mapTag] =\ncloneableTags[numberTag] = cloneableTags[objectTag] =\ncloneableTags[regexpTag] = cloneableTags[setTag] =\ncloneableTags[stringTag] = cloneableTags[symbolTag] =\ncloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =\ncloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;\ncloneableTags[errorTag] = cloneableTags[funcTag] =\ncloneableTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.clone` and `_.cloneDeep` which tracks\n * traversed objects.\n *\n * @private\n * @param {*} value The value to clone.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Deep clone\n * 2 - Flatten inherited properties\n * 4 - Clone symbols\n * @param {Function} [customizer] The function to customize cloning.\n * @param {string} [key] The key of `value`.\n * @param {Object} [object] The parent object of `value`.\n * @param {Object} [stack] Tracks traversed objects and their clone counterparts.\n * @returns {*} Returns the cloned value.\n */\nfunction baseClone(value, bitmask, customizer, key, object, stack) {\n var result,\n isDeep = bitmask & CLONE_DEEP_FLAG,\n isFlat = bitmask & CLONE_FLAT_FLAG,\n isFull = bitmask & CLONE_SYMBOLS_FLAG;\n\n if (customizer) {\n result = object ? customizer(value, key, object, stack) : customizer(value);\n }\n if (result !== undefined) {\n return result;\n }\n if (!isObject(value)) {\n return value;\n }\n var isArr = isArray(value);\n if (isArr) {\n result = initCloneArray(value);\n if (!isDeep) {\n return copyArray(value, result);\n }\n } else {\n var tag = getTag(value),\n isFunc = tag == funcTag || tag == genTag;\n\n if (isBuffer(value)) {\n return cloneBuffer(value, isDeep);\n }\n if (tag == objectTag || tag == argsTag || (isFunc && !object)) {\n result = (isFlat || isFunc) ? {} : initCloneObject(value);\n if (!isDeep) {\n return isFlat\n ? copySymbolsIn(value, baseAssignIn(result, value))\n : copySymbols(value, baseAssign(result, value));\n }\n } else {\n if (!cloneableTags[tag]) {\n return object ? value : {};\n }\n result = initCloneByTag(value, tag, isDeep);\n }\n }\n // Check for circular references and return its corresponding clone.\n stack || (stack = new Stack);\n var stacked = stack.get(value);\n if (stacked) {\n return stacked;\n }\n stack.set(value, result);\n\n if (isSet(value)) {\n value.forEach(function(subValue) {\n result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));\n });\n } else if (isMap(value)) {\n value.forEach(function(subValue, key) {\n result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n }\n\n var keysFunc = isFull\n ? (isFlat ? getAllKeysIn : getAllKeys)\n : (isFlat ? keysIn : keys);\n\n var props = isArr ? undefined : keysFunc(value);\n arrayEach(props || value, function(subValue, key) {\n if (props) {\n key = subValue;\n subValue = value[key];\n }\n // Recursively populate clone (susceptible to call stack limits).\n assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n return result;\n}\n\nmodule.exports = baseClone;\n","var isObject = require('./isObject');\n\n/** Built-in value references. */\nvar objectCreate = Object.create;\n\n/**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} proto The object to inherit from.\n * @returns {Object} Returns the new object.\n */\nvar baseCreate = (function() {\n function object() {}\n return function(proto) {\n if (!isObject(proto)) {\n return {};\n }\n if (objectCreate) {\n return objectCreate(proto);\n }\n object.prototype = proto;\n var result = new object;\n object.prototype = undefined;\n return result;\n };\n}());\n\nmodule.exports = baseCreate;\n","var arrayPush = require('./_arrayPush'),\n isArray = require('./isArray');\n\n/**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction baseGetAllKeys(object, keysFunc, symbolsFunc) {\n var result = keysFunc(object);\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n}\n\nmodule.exports = baseGetAllKeys;\n","var Symbol = require('./_Symbol'),\n getRawTag = require('./_getRawTag'),\n objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]';\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\nmodule.exports = baseIsArguments;\n","var baseIsEqualDeep = require('./_baseIsEqualDeep'),\n isObjectLike = require('./isObjectLike');\n\n/**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Unordered comparison\n * 2 - Partial comparison\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\nfunction baseIsEqual(value, other, bitmask, customizer, stack) {\n if (value === other) {\n return true;\n }\n if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\n return value !== value && other !== other;\n }\n return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n}\n\nmodule.exports = baseIsEqual;\n","var Stack = require('./_Stack'),\n equalArrays = require('./_equalArrays'),\n equalByTag = require('./_equalByTag'),\n equalObjects = require('./_equalObjects'),\n getTag = require('./_getTag'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isTypedArray = require('./isTypedArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n var objIsArr = isArray(object),\n othIsArr = isArray(other),\n objTag = objIsArr ? arrayTag : getTag(object),\n othTag = othIsArr ? arrayTag : getTag(other);\n\n objTag = objTag == argsTag ? objectTag : objTag;\n othTag = othTag == argsTag ? objectTag : othTag;\n\n var objIsObj = objTag == objectTag,\n othIsObj = othTag == objectTag,\n isSameTag = objTag == othTag;\n\n if (isSameTag && isBuffer(object)) {\n if (!isBuffer(other)) {\n return false;\n }\n objIsArr = true;\n objIsObj = false;\n }\n if (isSameTag && !objIsObj) {\n stack || (stack = new Stack);\n return (objIsArr || isTypedArray(object))\n ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n }\n if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n if (objIsWrapped || othIsWrapped) {\n var objUnwrapped = objIsWrapped ? object.value() : object,\n othUnwrapped = othIsWrapped ? other.value() : other;\n\n stack || (stack = new Stack);\n return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n }\n }\n if (!isSameTag) {\n return false;\n }\n stack || (stack = new Stack);\n return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n}\n\nmodule.exports = baseIsEqualDeep;\n","var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]';\n\n/**\n * The base implementation of `_.isMap` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n */\nfunction baseIsMap(value) {\n return isObjectLike(value) && getTag(value) == mapTag;\n}\n\nmodule.exports = baseIsMap;\n","var isFunction = require('./isFunction'),\n isMasked = require('./_isMasked'),\n isObject = require('./isObject'),\n toSource = require('./_toSource');\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\nmodule.exports = baseIsNative;\n","var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar setTag = '[object Set]';\n\n/**\n * The base implementation of `_.isSet` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n */\nfunction baseIsSet(value) {\n return isObjectLike(value) && getTag(value) == setTag;\n}\n\nmodule.exports = baseIsSet;\n","var baseGetTag = require('./_baseGetTag'),\n isLength = require('./isLength'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n\nmodule.exports = baseIsTypedArray;\n","var isPrototype = require('./_isPrototype'),\n nativeKeys = require('./_nativeKeys');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeys;\n","var isObject = require('./isObject'),\n isPrototype = require('./_isPrototype'),\n nativeKeysIn = require('./_nativeKeysIn');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeysIn(object) {\n if (!isObject(object)) {\n return nativeKeysIn(object);\n }\n var isProto = isPrototype(object),\n result = [];\n\n for (var key in object) {\n if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeysIn;\n","/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\nmodule.exports = baseTimes;\n","/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n return function(value) {\n return func(value);\n };\n}\n\nmodule.exports = baseUnary;\n","/**\n * Checks if a `cache` value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction cacheHas(cache, key) {\n return cache.has(key);\n}\n\nmodule.exports = cacheHas;\n","var Uint8Array = require('./_Uint8Array');\n\n/**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\nfunction cloneArrayBuffer(arrayBuffer) {\n var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n return result;\n}\n\nmodule.exports = cloneArrayBuffer;\n","var root = require('./_root');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined,\n allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;\n\n/**\n * Creates a clone of `buffer`.\n *\n * @private\n * @param {Buffer} buffer The buffer to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Buffer} Returns the cloned buffer.\n */\nfunction cloneBuffer(buffer, isDeep) {\n if (isDeep) {\n return buffer.slice();\n }\n var length = buffer.length,\n result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\n\n buffer.copy(result);\n return result;\n}\n\nmodule.exports = cloneBuffer;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer');\n\n/**\n * Creates a clone of `dataView`.\n *\n * @private\n * @param {Object} dataView The data view to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned data view.\n */\nfunction cloneDataView(dataView, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;\n return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);\n}\n\nmodule.exports = cloneDataView;\n","/** Used to match `RegExp` flags from their coerced string values. */\nvar reFlags = /\\w*$/;\n\n/**\n * Creates a clone of `regexp`.\n *\n * @private\n * @param {Object} regexp The regexp to clone.\n * @returns {Object} Returns the cloned regexp.\n */\nfunction cloneRegExp(regexp) {\n var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));\n result.lastIndex = regexp.lastIndex;\n return result;\n}\n\nmodule.exports = cloneRegExp;\n","var Symbol = require('./_Symbol');\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * Creates a clone of the `symbol` object.\n *\n * @private\n * @param {Object} symbol The symbol object to clone.\n * @returns {Object} Returns the cloned symbol object.\n */\nfunction cloneSymbol(symbol) {\n return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};\n}\n\nmodule.exports = cloneSymbol;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer');\n\n/**\n * Creates a clone of `typedArray`.\n *\n * @private\n * @param {Object} typedArray The typed array to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned typed array.\n */\nfunction cloneTypedArray(typedArray, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n}\n\nmodule.exports = cloneTypedArray;\n","/**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\nfunction copyArray(source, array) {\n var index = -1,\n length = source.length;\n\n array || (array = Array(length));\n while (++index < length) {\n array[index] = source[index];\n }\n return array;\n}\n\nmodule.exports = copyArray;\n","var assignValue = require('./_assignValue'),\n baseAssignValue = require('./_baseAssignValue');\n\n/**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\nfunction copyObject(source, props, object, customizer) {\n var isNew = !object;\n object || (object = {});\n\n var index = -1,\n length = props.length;\n\n while (++index < length) {\n var key = props[index];\n\n var newValue = customizer\n ? customizer(object[key], source[key], key, object, source)\n : undefined;\n\n if (newValue === undefined) {\n newValue = source[key];\n }\n if (isNew) {\n baseAssignValue(object, key, newValue);\n } else {\n assignValue(object, key, newValue);\n }\n }\n return object;\n}\n\nmodule.exports = copyObject;\n","var copyObject = require('./_copyObject'),\n getSymbols = require('./_getSymbols');\n\n/**\n * Copies own symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbols(source, object) {\n return copyObject(source, getSymbols(source), object);\n}\n\nmodule.exports = copySymbols;\n","var copyObject = require('./_copyObject'),\n getSymbolsIn = require('./_getSymbolsIn');\n\n/**\n * Copies own and inherited symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbolsIn(source, object) {\n return copyObject(source, getSymbolsIn(source), object);\n}\n\nmodule.exports = copySymbolsIn;\n","var root = require('./_root');\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\nmodule.exports = coreJsData;\n","var getNative = require('./_getNative');\n\nvar defineProperty = (function() {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n}());\n\nmodule.exports = defineProperty;\n","var SetCache = require('./_SetCache'),\n arraySome = require('./_arraySome'),\n cacheHas = require('./_cacheHas');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\nfunction equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n arrLength = array.length,\n othLength = other.length;\n\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n return false;\n }\n // Check that cyclic values are equal.\n var arrStacked = stack.get(array);\n var othStacked = stack.get(other);\n if (arrStacked && othStacked) {\n return arrStacked == other && othStacked == array;\n }\n var index = -1,\n result = true,\n seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n stack.set(array, other);\n stack.set(other, array);\n\n // Ignore non-index properties.\n while (++index < arrLength) {\n var arrValue = array[index],\n othValue = other[index];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, arrValue, index, other, array, stack)\n : customizer(arrValue, othValue, index, array, other, stack);\n }\n if (compared !== undefined) {\n if (compared) {\n continue;\n }\n result = false;\n break;\n }\n // Recursively compare arrays (susceptible to call stack limits).\n if (seen) {\n if (!arraySome(other, function(othValue, othIndex) {\n if (!cacheHas(seen, othIndex) &&\n (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n return seen.push(othIndex);\n }\n })) {\n result = false;\n break;\n }\n } else if (!(\n arrValue === othValue ||\n equalFunc(arrValue, othValue, bitmask, customizer, stack)\n )) {\n result = false;\n break;\n }\n }\n stack['delete'](array);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalArrays;\n","var Symbol = require('./_Symbol'),\n Uint8Array = require('./_Uint8Array'),\n eq = require('./eq'),\n equalArrays = require('./_equalArrays'),\n mapToArray = require('./_mapToArray'),\n setToArray = require('./_setToArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]';\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n switch (tag) {\n case dataViewTag:\n if ((object.byteLength != other.byteLength) ||\n (object.byteOffset != other.byteOffset)) {\n return false;\n }\n object = object.buffer;\n other = other.buffer;\n\n case arrayBufferTag:\n if ((object.byteLength != other.byteLength) ||\n !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n return false;\n }\n return true;\n\n case boolTag:\n case dateTag:\n case numberTag:\n // Coerce booleans to `1` or `0` and dates to milliseconds.\n // Invalid dates are coerced to `NaN`.\n return eq(+object, +other);\n\n case errorTag:\n return object.name == other.name && object.message == other.message;\n\n case regexpTag:\n case stringTag:\n // Coerce regexes to strings and treat strings, primitives and objects,\n // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n // for more details.\n return object == (other + '');\n\n case mapTag:\n var convert = mapToArray;\n\n case setTag:\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n convert || (convert = setToArray);\n\n if (object.size != other.size && !isPartial) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked) {\n return stacked == other;\n }\n bitmask |= COMPARE_UNORDERED_FLAG;\n\n // Recursively compare objects (susceptible to call stack limits).\n stack.set(object, other);\n var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n stack['delete'](object);\n return result;\n\n case symbolTag:\n if (symbolValueOf) {\n return symbolValueOf.call(object) == symbolValueOf.call(other);\n }\n }\n return false;\n}\n\nmodule.exports = equalByTag;\n","var getAllKeys = require('./_getAllKeys');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n objProps = getAllKeys(object),\n objLength = objProps.length,\n othProps = getAllKeys(other),\n othLength = othProps.length;\n\n if (objLength != othLength && !isPartial) {\n return false;\n }\n var index = objLength;\n while (index--) {\n var key = objProps[index];\n if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n return false;\n }\n }\n // Check that cyclic values are equal.\n var objStacked = stack.get(object);\n var othStacked = stack.get(other);\n if (objStacked && othStacked) {\n return objStacked == other && othStacked == object;\n }\n var result = true;\n stack.set(object, other);\n stack.set(other, object);\n\n var skipCtor = isPartial;\n while (++index < objLength) {\n key = objProps[index];\n var objValue = object[key],\n othValue = other[key];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, objValue, key, other, object, stack)\n : customizer(objValue, othValue, key, object, other, stack);\n }\n // Recursively compare objects (susceptible to call stack limits).\n if (!(compared === undefined\n ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n : compared\n )) {\n result = false;\n break;\n }\n skipCtor || (skipCtor = key == 'constructor');\n }\n if (result && !skipCtor) {\n var objCtor = object.constructor,\n othCtor = other.constructor;\n\n // Non `Object` object instances with different constructors are not equal.\n if (objCtor != othCtor &&\n ('constructor' in object && 'constructor' in other) &&\n !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n result = false;\n }\n }\n stack['delete'](object);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalObjects;\n","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n","var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbols = require('./_getSymbols'),\n keys = require('./keys');\n\n/**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeys(object) {\n return baseGetAllKeys(object, keys, getSymbols);\n}\n\nmodule.exports = getAllKeys;\n","var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbolsIn = require('./_getSymbolsIn'),\n keysIn = require('./keysIn');\n\n/**\n * Creates an array of own and inherited enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeysIn(object) {\n return baseGetAllKeys(object, keysIn, getSymbolsIn);\n}\n\nmodule.exports = getAllKeysIn;\n","var isKeyable = require('./_isKeyable');\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\nmodule.exports = getMapData;\n","var baseIsNative = require('./_baseIsNative'),\n getValue = require('./_getValue');\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\nmodule.exports = getNative;\n","var overArg = require('./_overArg');\n\n/** Built-in value references. */\nvar getPrototype = overArg(Object.getPrototypeOf, Object);\n\nmodule.exports = getPrototype;\n","var Symbol = require('./_Symbol');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nmodule.exports = getRawTag;\n","var arrayFilter = require('./_arrayFilter'),\n stubArray = require('./stubArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n if (object == null) {\n return [];\n }\n object = Object(object);\n return arrayFilter(nativeGetSymbols(object), function(symbol) {\n return propertyIsEnumerable.call(object, symbol);\n });\n};\n\nmodule.exports = getSymbols;\n","var arrayPush = require('./_arrayPush'),\n getPrototype = require('./_getPrototype'),\n getSymbols = require('./_getSymbols'),\n stubArray = require('./stubArray');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own and inherited enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {\n var result = [];\n while (object) {\n arrayPush(result, getSymbols(object));\n object = getPrototype(object);\n }\n return result;\n};\n\nmodule.exports = getSymbolsIn;\n","var DataView = require('./_DataView'),\n Map = require('./_Map'),\n Promise = require('./_Promise'),\n Set = require('./_Set'),\n WeakMap = require('./_WeakMap'),\n baseGetTag = require('./_baseGetTag'),\n toSource = require('./_toSource');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n setTag = '[object Set]',\n weakMapTag = '[object WeakMap]';\n\nvar dataViewTag = '[object DataView]';\n\n/** Used to detect maps, sets, and weakmaps. */\nvar dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nvar getTag = baseGetTag;\n\n// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\nif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = baseGetTag(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : '';\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n}\n\nmodule.exports = getTag;\n","/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\nmodule.exports = getValue;\n","var nativeCreate = require('./_nativeCreate');\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n}\n\nmodule.exports = hashClear;\n","/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = hashDelete;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\nmodule.exports = hashGet;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\nmodule.exports = hashHas;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\nmodule.exports = hashSet;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Initializes an array clone.\n *\n * @private\n * @param {Array} array The array to clone.\n * @returns {Array} Returns the initialized clone.\n */\nfunction initCloneArray(array) {\n var length = array.length,\n result = new array.constructor(length);\n\n // Add properties assigned by `RegExp#exec`.\n if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {\n result.index = array.index;\n result.input = array.input;\n }\n return result;\n}\n\nmodule.exports = initCloneArray;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer'),\n cloneDataView = require('./_cloneDataView'),\n cloneRegExp = require('./_cloneRegExp'),\n cloneSymbol = require('./_cloneSymbol'),\n cloneTypedArray = require('./_cloneTypedArray');\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/**\n * Initializes an object clone based on its `toStringTag`.\n *\n * **Note:** This function only supports cloning values with tags of\n * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.\n *\n * @private\n * @param {Object} object The object to clone.\n * @param {string} tag The `toStringTag` of the object to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneByTag(object, tag, isDeep) {\n var Ctor = object.constructor;\n switch (tag) {\n case arrayBufferTag:\n return cloneArrayBuffer(object);\n\n case boolTag:\n case dateTag:\n return new Ctor(+object);\n\n case dataViewTag:\n return cloneDataView(object, isDeep);\n\n case float32Tag: case float64Tag:\n case int8Tag: case int16Tag: case int32Tag:\n case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:\n return cloneTypedArray(object, isDeep);\n\n case mapTag:\n return new Ctor;\n\n case numberTag:\n case stringTag:\n return new Ctor(object);\n\n case regexpTag:\n return cloneRegExp(object);\n\n case setTag:\n return new Ctor;\n\n case symbolTag:\n return cloneSymbol(object);\n }\n}\n\nmodule.exports = initCloneByTag;\n","var baseCreate = require('./_baseCreate'),\n getPrototype = require('./_getPrototype'),\n isPrototype = require('./_isPrototype');\n\n/**\n * Initializes an object clone.\n *\n * @private\n * @param {Object} object The object to clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneObject(object) {\n return (typeof object.constructor == 'function' && !isPrototype(object))\n ? baseCreate(getPrototype(object))\n : {};\n}\n\nmodule.exports = initCloneObject;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n var type = typeof value;\n length = length == null ? MAX_SAFE_INTEGER : length;\n\n return !!length &&\n (type == 'number' ||\n (type != 'symbol' && reIsUint.test(value))) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\nmodule.exports = isIndex;\n","/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\nmodule.exports = isKeyable;\n","var coreJsData = require('./_coreJsData');\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\nmodule.exports = isMasked;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\nmodule.exports = isPrototype;\n","/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n}\n\nmodule.exports = listCacheClear;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype;\n\n/** Built-in value references. */\nvar splice = arrayProto.splice;\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n}\n\nmodule.exports = listCacheDelete;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\nmodule.exports = listCacheGet;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\nmodule.exports = listCacheHas;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\nmodule.exports = listCacheSet;\n","var Hash = require('./_Hash'),\n ListCache = require('./_ListCache'),\n Map = require('./_Map');\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\nmodule.exports = mapCacheClear;\n","var getMapData = require('./_getMapData');\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = mapCacheDelete;\n","var getMapData = require('./_getMapData');\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\nmodule.exports = mapCacheGet;\n","var getMapData = require('./_getMapData');\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\nmodule.exports = mapCacheHas;\n","var getMapData = require('./_getMapData');\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n}\n\nmodule.exports = mapCacheSet;\n","/**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\nfunction mapToArray(map) {\n var index = -1,\n result = Array(map.size);\n\n map.forEach(function(value, key) {\n result[++index] = [key, value];\n });\n return result;\n}\n\nmodule.exports = mapToArray;\n","var getNative = require('./_getNative');\n\n/* Built-in method references that are verified to be native. */\nvar nativeCreate = getNative(Object, 'create');\n\nmodule.exports = nativeCreate;\n","var overArg = require('./_overArg');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeKeys = overArg(Object.keys, Object);\n\nmodule.exports = nativeKeys;\n","/**\n * This function is like\n * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * except that it includes inherited enumerable properties.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction nativeKeysIn(object) {\n var result = [];\n if (object != null) {\n for (var key in Object(object)) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = nativeKeysIn;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n try {\n // Use `util.types` for Node.js 10+.\n var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n if (types) {\n return types;\n }\n\n // Legacy `process.binding('util')` for Node.js < 10.\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n}());\n\nmodule.exports = nodeUtil;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n","/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\nmodule.exports = overArg;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n","/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\nfunction setCacheAdd(value) {\n this.__data__.set(value, HASH_UNDEFINED);\n return this;\n}\n\nmodule.exports = setCacheAdd;\n","/**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\nfunction setCacheHas(value) {\n return this.__data__.has(value);\n}\n\nmodule.exports = setCacheHas;\n","/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\nfunction setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n}\n\nmodule.exports = setToArray;\n","var ListCache = require('./_ListCache');\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}\n\nmodule.exports = stackClear;\n","/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n var data = this.__data__,\n result = data['delete'](key);\n\n this.size = data.size;\n return result;\n}\n\nmodule.exports = stackDelete;\n","/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n return this.__data__.get(key);\n}\n\nmodule.exports = stackGet;\n","/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n return this.__data__.has(key);\n}\n\nmodule.exports = stackHas;\n","var ListCache = require('./_ListCache'),\n Map = require('./_Map'),\n MapCache = require('./_MapCache');\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n var data = this.__data__;\n if (data instanceof ListCache) {\n var pairs = data.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n this.size = ++data.size;\n return this;\n }\n data = this.__data__ = new MapCache(pairs);\n }\n data.set(key, value);\n this.size = data.size;\n return this;\n}\n\nmodule.exports = stackSet;\n","/** Used for built-in method references. */\nvar funcProto = Function.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\nmodule.exports = toSource;\n","var baseClone = require('./_baseClone');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_SYMBOLS_FLAG = 4;\n\n/**\n * This method is like `_.clone` except that it recursively clones `value`.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Lang\n * @param {*} value The value to recursively clone.\n * @returns {*} Returns the deep cloned value.\n * @see _.clone\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var deep = _.cloneDeep(objects);\n * console.log(deep[0] === objects[0]);\n * // => false\n */\nfunction cloneDeep(value) {\n return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);\n}\n\nmodule.exports = cloneDeep;\n","/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\nmodule.exports = eq;\n","var baseIsArguments = require('./_baseIsArguments'),\n isObjectLike = require('./isObjectLike');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n};\n\nmodule.exports = isArguments;\n","/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\nmodule.exports = isArray;\n","var isFunction = require('./isFunction'),\n isLength = require('./isLength');\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\nmodule.exports = isArrayLike;\n","var root = require('./_root'),\n stubFalse = require('./stubFalse');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\nmodule.exports = isBuffer;\n","var baseIsEqual = require('./_baseIsEqual');\n\n/**\n * Performs a deep comparison between two values to determine if they are\n * equivalent.\n *\n * **Note:** This method supports comparing arrays, array buffers, booleans,\n * date objects, error objects, maps, numbers, `Object` objects, regexes,\n * sets, strings, symbols, and typed arrays. `Object` objects are compared\n * by their own, not inherited, enumerable properties. Functions and DOM\n * nodes are compared by strict equality, i.e. `===`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.isEqual(object, other);\n * // => true\n *\n * object === other;\n * // => false\n */\nfunction isEqual(value, other) {\n return baseIsEqual(value, other);\n}\n\nmodule.exports = isEqual;\n","var baseGetTag = require('./_baseGetTag'),\n isObject = require('./isObject');\n\n/** `Object#toString` result references. */\nvar asyncTag = '[object AsyncFunction]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n proxyTag = '[object Proxy]';\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\nmodule.exports = isFunction;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\nmodule.exports = isLength;\n","var baseIsMap = require('./_baseIsMap'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsMap = nodeUtil && nodeUtil.isMap;\n\n/**\n * Checks if `value` is classified as a `Map` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n * @example\n *\n * _.isMap(new Map);\n * // => true\n *\n * _.isMap(new WeakMap);\n * // => false\n */\nvar isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;\n\nmodule.exports = isMap;\n","/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n","var baseIsSet = require('./_baseIsSet'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsSet = nodeUtil && nodeUtil.isSet;\n\n/**\n * Checks if `value` is classified as a `Set` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n * @example\n *\n * _.isSet(new Set);\n * // => true\n *\n * _.isSet(new WeakSet);\n * // => false\n */\nvar isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;\n\nmodule.exports = isSet;\n","var baseIsTypedArray = require('./_baseIsTypedArray'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\nmodule.exports = isTypedArray;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeys = require('./_baseKeys'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\nmodule.exports = keys;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeysIn = require('./_baseKeysIn'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\nfunction keysIn(object) {\n return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n}\n\nmodule.exports = keysIn;\n","/**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\nfunction stubArray() {\n return [];\n}\n\nmodule.exports = stubArray;\n","/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n return false;\n}\n\nmodule.exports = stubFalse;\n","import { connect, type BaseConnectionOptions } from \"@openfin/core-web\";\nimport { getSettings } from \"./settings\";\n\n/**\n * Initializes the OpenFin Web Broker connection.\n * @param inherit Should we inherit settings from the host (available in the OpenFin layout system) or use settings? Default is true.\n */\nexport async function init(inherit: boolean = true): Promise {\n\t// Set window.fin to the `fin` object.\n\tlet options: BaseConnectionOptions | undefined;\n\tif (window.fin === undefined) {\n\t\tif (!inherit) {\n\t\t\tconst settings = await getSettings();\n\t\t\tif (settings === undefined) {\n\t\t\t\tconsole.error(\n\t\t\t\t\t\"Unable to run the sample as we have been unable to load the web manifest and it's settings from the currently running html page. Please ensure that the web manifest is being served and that it contains the custom_settings section.\"\n\t\t\t\t);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\toptions = {\n\t\t\t\tbrokerUrl: settings.platform.interop.brokerUrl,\n\t\t\t\tinteropConfig: {\n\t\t\t\t\tproviderId: settings.platform.interop.providerId,\n\t\t\t\t\tcurrentContextGroup: settings.platform.interop.defaultContextGroup\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t\t// Specify an interopConfig with a specific provider ID and a context group to initialize the `fin.me.interop` client on connection.\n\t\tif (options) {\n\t\t\twindow.fin = await connect({\n\t\t\t\toptions\n\t\t\t});\n\t\t} else {\n\t\t\twindow.fin = await connect({\n\t\t\t\tconnectionInheritance: \"enabled\"\n\t\t\t});\n\t\t}\n\t\tconsole.log(\"Finished initializing the fin API.\");\n\t\t// Create and dispatch the finReady event\n\t\tconst event = new CustomEvent(\"finReady\");\n\t\twindow.dispatchEvent(event);\n\t}\n\n\tif (window.fdc3 === undefined && window?.fin?.me.interop?.getFDC3Sync !== undefined) {\n\t\twindow.fdc3 = fin.me.interop.getFDC3Sync(\"2.0\");\n\t\tconsole.log(\"Finished initializing the fdc3 API.\");\n\t\t// Create and dispatch the FDC3Ready event\n\t\tconst event = new CustomEvent(\"fdc3Ready\");\n\t\twindow.dispatchEvent(event);\n\t}\n}\n","import type { WebLayoutSnapshot } from \"@openfin/core-web\";\nimport type { Settings } from \"../shapes/setting-shapes\";\n\n/**\n * Fetches the settings for the application.\n * @returns The settings for the application.\n */\nexport async function getSettings(): Promise {\n\tconst settings = await getManifestSettings();\n\tif (settings === undefined) {\n\t\tconsole.error(\n\t\t\t\"Unable to run the example as settings are required and we fetch them from the link web manifest from the html page that is being served. It should exist in the customSettings section of the web manifest.\"\n\t\t);\n\t}\n\treturn settings;\n}\n\n/**\n * Returns a default layout from the settings if provided.\n * @returns The default layout from the settings.\n */\nexport async function getDefaultLayout(): Promise {\n\tconst settings = await getSettings();\n\tif (settings?.platform?.layout?.defaultLayout === undefined) {\n\t\tconsole.error(\n\t\t\t\"Unable to run the example as without a layout being defined. Please ensure that settings have been provided in the web manifest.\"\n\t\t);\n\t\treturn;\n\t}\n\tif (typeof settings.platform.layout.defaultLayout === \"string\") {\n\t\tconst layoutResponse = await fetch(settings.platform.layout.defaultLayout);\n\t\tconst layoutJson = (await layoutResponse.json()) as WebLayoutSnapshot;\n\t\treturn layoutJson;\n\t}\n\treturn settings.platform.layout.defaultLayout;\n}\n\n/**\n * Returns the settings from the manifest file.\n * @returns customSettings for this example\n */\nasync function getManifestSettings(): Promise {\n\t// Get the manifest link\n\tconst link = document.querySelector('link[rel=\"manifest\"]');\n\tif (link !== null) {\n\t\tconst manifestResponse = await fetch(link.href);\n\t\tconst manifestJson = (await manifestResponse.json()) as { custom_settings: Settings };\n\t\treturn manifestJson.custom_settings;\n\t}\n}\n","export { default as v1 } from './v1.js';\nexport { default as v3 } from './v3.js';\nexport { default as v4 } from './v4.js';\nexport { default as v5 } from './v5.js';\nexport { default as NIL } from './nil.js';\nexport { default as version } from './version.js';\nexport { default as validate } from './validate.js';\nexport { default as stringify } from './stringify.js';\nexport { default as parse } from './parse.js';","/*\n * Browser-compatible JavaScript MD5\n *\n * Modification of JavaScript MD5\n * https://github.com/blueimp/JavaScript-MD5\n *\n * Copyright 2011, Sebastian Tschan\n * https://blueimp.net\n *\n * Licensed under the MIT license:\n * https://opensource.org/licenses/MIT\n *\n * Based on\n * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message\n * Digest Algorithm, as defined in RFC 1321.\n * Version 2.2 Copyright (C) Paul Johnston 1999 - 2009\n * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet\n * Distributed under the BSD License\n * See http://pajhome.org.uk/crypt/md5 for more info.\n */\nfunction md5(bytes) {\n if (typeof bytes === 'string') {\n var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape\n\n bytes = new Uint8Array(msg.length);\n\n for (var i = 0; i < msg.length; ++i) {\n bytes[i] = msg.charCodeAt(i);\n }\n }\n\n return md5ToHexEncodedArray(wordsToMd5(bytesToWords(bytes), bytes.length * 8));\n}\n/*\n * Convert an array of little-endian words to an array of bytes\n */\n\n\nfunction md5ToHexEncodedArray(input) {\n var output = [];\n var length32 = input.length * 32;\n var hexTab = '0123456789abcdef';\n\n for (var i = 0; i < length32; i += 8) {\n var x = input[i >> 5] >>> i % 32 & 0xff;\n var hex = parseInt(hexTab.charAt(x >>> 4 & 0x0f) + hexTab.charAt(x & 0x0f), 16);\n output.push(hex);\n }\n\n return output;\n}\n/**\n * Calculate output length with padding and bit length\n */\n\n\nfunction getOutputLength(inputLength8) {\n return (inputLength8 + 64 >>> 9 << 4) + 14 + 1;\n}\n/*\n * Calculate the MD5 of an array of little-endian words, and a bit length.\n */\n\n\nfunction wordsToMd5(x, len) {\n /* append padding */\n x[len >> 5] |= 0x80 << len % 32;\n x[getOutputLength(len) - 1] = len;\n var a = 1732584193;\n var b = -271733879;\n var c = -1732584194;\n var d = 271733878;\n\n for (var i = 0; i < x.length; i += 16) {\n var olda = a;\n var oldb = b;\n var oldc = c;\n var oldd = d;\n a = md5ff(a, b, c, d, x[i], 7, -680876936);\n d = md5ff(d, a, b, c, x[i + 1], 12, -389564586);\n c = md5ff(c, d, a, b, x[i + 2], 17, 606105819);\n b = md5ff(b, c, d, a, x[i + 3], 22, -1044525330);\n a = md5ff(a, b, c, d, x[i + 4], 7, -176418897);\n d = md5ff(d, a, b, c, x[i + 5], 12, 1200080426);\n c = md5ff(c, d, a, b, x[i + 6], 17, -1473231341);\n b = md5ff(b, c, d, a, x[i + 7], 22, -45705983);\n a = md5ff(a, b, c, d, x[i + 8], 7, 1770035416);\n d = md5ff(d, a, b, c, x[i + 9], 12, -1958414417);\n c = md5ff(c, d, a, b, x[i + 10], 17, -42063);\n b = md5ff(b, c, d, a, x[i + 11], 22, -1990404162);\n a = md5ff(a, b, c, d, x[i + 12], 7, 1804603682);\n d = md5ff(d, a, b, c, x[i + 13], 12, -40341101);\n c = md5ff(c, d, a, b, x[i + 14], 17, -1502002290);\n b = md5ff(b, c, d, a, x[i + 15], 22, 1236535329);\n a = md5gg(a, b, c, d, x[i + 1], 5, -165796510);\n d = md5gg(d, a, b, c, x[i + 6], 9, -1069501632);\n c = md5gg(c, d, a, b, x[i + 11], 14, 643717713);\n b = md5gg(b, c, d, a, x[i], 20, -373897302);\n a = md5gg(a, b, c, d, x[i + 5], 5, -701558691);\n d = md5gg(d, a, b, c, x[i + 10], 9, 38016083);\n c = md5gg(c, d, a, b, x[i + 15], 14, -660478335);\n b = md5gg(b, c, d, a, x[i + 4], 20, -405537848);\n a = md5gg(a, b, c, d, x[i + 9], 5, 568446438);\n d = md5gg(d, a, b, c, x[i + 14], 9, -1019803690);\n c = md5gg(c, d, a, b, x[i + 3], 14, -187363961);\n b = md5gg(b, c, d, a, x[i + 8], 20, 1163531501);\n a = md5gg(a, b, c, d, x[i + 13], 5, -1444681467);\n d = md5gg(d, a, b, c, x[i + 2], 9, -51403784);\n c = md5gg(c, d, a, b, x[i + 7], 14, 1735328473);\n b = md5gg(b, c, d, a, x[i + 12], 20, -1926607734);\n a = md5hh(a, b, c, d, x[i + 5], 4, -378558);\n d = md5hh(d, a, b, c, x[i + 8], 11, -2022574463);\n c = md5hh(c, d, a, b, x[i + 11], 16, 1839030562);\n b = md5hh(b, c, d, a, x[i + 14], 23, -35309556);\n a = md5hh(a, b, c, d, x[i + 1], 4, -1530992060);\n d = md5hh(d, a, b, c, x[i + 4], 11, 1272893353);\n c = md5hh(c, d, a, b, x[i + 7], 16, -155497632);\n b = md5hh(b, c, d, a, x[i + 10], 23, -1094730640);\n a = md5hh(a, b, c, d, x[i + 13], 4, 681279174);\n d = md5hh(d, a, b, c, x[i], 11, -358537222);\n c = md5hh(c, d, a, b, x[i + 3], 16, -722521979);\n b = md5hh(b, c, d, a, x[i + 6], 23, 76029189);\n a = md5hh(a, b, c, d, x[i + 9], 4, -640364487);\n d = md5hh(d, a, b, c, x[i + 12], 11, -421815835);\n c = md5hh(c, d, a, b, x[i + 15], 16, 530742520);\n b = md5hh(b, c, d, a, x[i + 2], 23, -995338651);\n a = md5ii(a, b, c, d, x[i], 6, -198630844);\n d = md5ii(d, a, b, c, x[i + 7], 10, 1126891415);\n c = md5ii(c, d, a, b, x[i + 14], 15, -1416354905);\n b = md5ii(b, c, d, a, x[i + 5], 21, -57434055);\n a = md5ii(a, b, c, d, x[i + 12], 6, 1700485571);\n d = md5ii(d, a, b, c, x[i + 3], 10, -1894986606);\n c = md5ii(c, d, a, b, x[i + 10], 15, -1051523);\n b = md5ii(b, c, d, a, x[i + 1], 21, -2054922799);\n a = md5ii(a, b, c, d, x[i + 8], 6, 1873313359);\n d = md5ii(d, a, b, c, x[i + 15], 10, -30611744);\n c = md5ii(c, d, a, b, x[i + 6], 15, -1560198380);\n b = md5ii(b, c, d, a, x[i + 13], 21, 1309151649);\n a = md5ii(a, b, c, d, x[i + 4], 6, -145523070);\n d = md5ii(d, a, b, c, x[i + 11], 10, -1120210379);\n c = md5ii(c, d, a, b, x[i + 2], 15, 718787259);\n b = md5ii(b, c, d, a, x[i + 9], 21, -343485551);\n a = safeAdd(a, olda);\n b = safeAdd(b, oldb);\n c = safeAdd(c, oldc);\n d = safeAdd(d, oldd);\n }\n\n return [a, b, c, d];\n}\n/*\n * Convert an array bytes to an array of little-endian words\n * Characters >255 have their high-byte silently ignored.\n */\n\n\nfunction bytesToWords(input) {\n if (input.length === 0) {\n return [];\n }\n\n var length8 = input.length * 8;\n var output = new Uint32Array(getOutputLength(length8));\n\n for (var i = 0; i < length8; i += 8) {\n output[i >> 5] |= (input[i / 8] & 0xff) << i % 32;\n }\n\n return output;\n}\n/*\n * Add integers, wrapping at 2^32. This uses 16-bit operations internally\n * to work around bugs in some JS interpreters.\n */\n\n\nfunction safeAdd(x, y) {\n var lsw = (x & 0xffff) + (y & 0xffff);\n var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n return msw << 16 | lsw & 0xffff;\n}\n/*\n * Bitwise rotate a 32-bit number to the left.\n */\n\n\nfunction bitRotateLeft(num, cnt) {\n return num << cnt | num >>> 32 - cnt;\n}\n/*\n * These functions implement the four basic operations the algorithm uses.\n */\n\n\nfunction md5cmn(q, a, b, x, s, t) {\n return safeAdd(bitRotateLeft(safeAdd(safeAdd(a, q), safeAdd(x, t)), s), b);\n}\n\nfunction md5ff(a, b, c, d, x, s, t) {\n return md5cmn(b & c | ~b & d, a, b, x, s, t);\n}\n\nfunction md5gg(a, b, c, d, x, s, t) {\n return md5cmn(b & d | c & ~d, a, b, x, s, t);\n}\n\nfunction md5hh(a, b, c, d, x, s, t) {\n return md5cmn(b ^ c ^ d, a, b, x, s, t);\n}\n\nfunction md5ii(a, b, c, d, x, s, t) {\n return md5cmn(c ^ (b | ~d), a, b, x, s, t);\n}\n\nexport default md5;","export default '00000000-0000-0000-0000-000000000000';","import validate from './validate.js';\n\nfunction parse(uuid) {\n if (!validate(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n var v;\n var arr = new Uint8Array(16); // Parse ########-....-....-....-............\n\n arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24;\n arr[1] = v >>> 16 & 0xff;\n arr[2] = v >>> 8 & 0xff;\n arr[3] = v & 0xff; // Parse ........-####-....-....-............\n\n arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8;\n arr[5] = v & 0xff; // Parse ........-....-####-....-............\n\n arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8;\n arr[7] = v & 0xff; // Parse ........-....-....-####-............\n\n arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8;\n arr[9] = v & 0xff; // Parse ........-....-....-....-############\n // (Use \"/\" to avoid 32-bit truncation when bit-shifting high-order bytes)\n\n arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff;\n arr[11] = v / 0x100000000 & 0xff;\n arr[12] = v >>> 24 & 0xff;\n arr[13] = v >>> 16 & 0xff;\n arr[14] = v >>> 8 & 0xff;\n arr[15] = v & 0xff;\n return arr;\n}\n\nexport default parse;","export default /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;","// Unique ID creation requires a high quality random # generator. In the browser we therefore\n// require the crypto API and do not support built-in fallback to lower quality random number\n// generators (like Math.random()).\nvar getRandomValues;\nvar rnds8 = new Uint8Array(16);\nexport default function rng() {\n // lazy load so that environments that need to polyfill have a chance to do so\n if (!getRandomValues) {\n // getRandomValues needs to be invoked in a context where \"this\" is a Crypto implementation. Also,\n // find the complete implementation of crypto (msCrypto) on IE11.\n getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto !== 'undefined' && typeof msCrypto.getRandomValues === 'function' && msCrypto.getRandomValues.bind(msCrypto);\n\n if (!getRandomValues) {\n throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');\n }\n }\n\n return getRandomValues(rnds8);\n}","// Adapted from Chris Veness' SHA1 code at\n// http://www.movable-type.co.uk/scripts/sha1.html\nfunction f(s, x, y, z) {\n switch (s) {\n case 0:\n return x & y ^ ~x & z;\n\n case 1:\n return x ^ y ^ z;\n\n case 2:\n return x & y ^ x & z ^ y & z;\n\n case 3:\n return x ^ y ^ z;\n }\n}\n\nfunction ROTL(x, n) {\n return x << n | x >>> 32 - n;\n}\n\nfunction sha1(bytes) {\n var K = [0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xca62c1d6];\n var H = [0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0];\n\n if (typeof bytes === 'string') {\n var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape\n\n bytes = [];\n\n for (var i = 0; i < msg.length; ++i) {\n bytes.push(msg.charCodeAt(i));\n }\n } else if (!Array.isArray(bytes)) {\n // Convert Array-like to Array\n bytes = Array.prototype.slice.call(bytes);\n }\n\n bytes.push(0x80);\n var l = bytes.length / 4 + 2;\n var N = Math.ceil(l / 16);\n var M = new Array(N);\n\n for (var _i = 0; _i < N; ++_i) {\n var arr = new Uint32Array(16);\n\n for (var j = 0; j < 16; ++j) {\n arr[j] = bytes[_i * 64 + j * 4] << 24 | bytes[_i * 64 + j * 4 + 1] << 16 | bytes[_i * 64 + j * 4 + 2] << 8 | bytes[_i * 64 + j * 4 + 3];\n }\n\n M[_i] = arr;\n }\n\n M[N - 1][14] = (bytes.length - 1) * 8 / Math.pow(2, 32);\n M[N - 1][14] = Math.floor(M[N - 1][14]);\n M[N - 1][15] = (bytes.length - 1) * 8 & 0xffffffff;\n\n for (var _i2 = 0; _i2 < N; ++_i2) {\n var W = new Uint32Array(80);\n\n for (var t = 0; t < 16; ++t) {\n W[t] = M[_i2][t];\n }\n\n for (var _t = 16; _t < 80; ++_t) {\n W[_t] = ROTL(W[_t - 3] ^ W[_t - 8] ^ W[_t - 14] ^ W[_t - 16], 1);\n }\n\n var a = H[0];\n var b = H[1];\n var c = H[2];\n var d = H[3];\n var e = H[4];\n\n for (var _t2 = 0; _t2 < 80; ++_t2) {\n var s = Math.floor(_t2 / 20);\n var T = ROTL(a, 5) + f(s, b, c, d) + e + K[s] + W[_t2] >>> 0;\n e = d;\n d = c;\n c = ROTL(b, 30) >>> 0;\n b = a;\n a = T;\n }\n\n H[0] = H[0] + a >>> 0;\n H[1] = H[1] + b >>> 0;\n H[2] = H[2] + c >>> 0;\n H[3] = H[3] + d >>> 0;\n H[4] = H[4] + e >>> 0;\n }\n\n return [H[0] >> 24 & 0xff, H[0] >> 16 & 0xff, H[0] >> 8 & 0xff, H[0] & 0xff, H[1] >> 24 & 0xff, H[1] >> 16 & 0xff, H[1] >> 8 & 0xff, H[1] & 0xff, H[2] >> 24 & 0xff, H[2] >> 16 & 0xff, H[2] >> 8 & 0xff, H[2] & 0xff, H[3] >> 24 & 0xff, H[3] >> 16 & 0xff, H[3] >> 8 & 0xff, H[3] & 0xff, H[4] >> 24 & 0xff, H[4] >> 16 & 0xff, H[4] >> 8 & 0xff, H[4] & 0xff];\n}\n\nexport default sha1;","import validate from './validate.js';\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\n\nvar byteToHex = [];\n\nfor (var i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).substr(1));\n}\n\nfunction stringify(arr) {\n var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n var uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!validate(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n\n return uuid;\n}\n\nexport default stringify;","import rng from './rng.js';\nimport stringify from './stringify.js'; // **`v1()` - Generate time-based UUID**\n//\n// Inspired by https://github.com/LiosK/UUID.js\n// and http://docs.python.org/library/uuid.html\n\nvar _nodeId;\n\nvar _clockseq; // Previous uuid creation time\n\n\nvar _lastMSecs = 0;\nvar _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details\n\nfunction v1(options, buf, offset) {\n var i = buf && offset || 0;\n var b = buf || new Array(16);\n options = options || {};\n var node = options.node || _nodeId;\n var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not\n // specified. We do this lazily to minimize issues related to insufficient\n // system entropy. See #189\n\n if (node == null || clockseq == null) {\n var seedBytes = options.random || (options.rng || rng)();\n\n if (node == null) {\n // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)\n node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]];\n }\n\n if (clockseq == null) {\n // Per 4.2.2, randomize (14 bit) clockseq\n clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;\n }\n } // UUID timestamps are 100 nano-second units since the Gregorian epoch,\n // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so\n // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'\n // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.\n\n\n var msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock\n // cycle to simulate higher resolution clock\n\n var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs)\n\n var dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression\n\n if (dt < 0 && options.clockseq === undefined) {\n clockseq = clockseq + 1 & 0x3fff;\n } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new\n // time interval\n\n\n if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {\n nsecs = 0;\n } // Per 4.2.1.2 Throw error if too many uuids are requested\n\n\n if (nsecs >= 10000) {\n throw new Error(\"uuid.v1(): Can't create more than 10M uuids/sec\");\n }\n\n _lastMSecs = msecs;\n _lastNSecs = nsecs;\n _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch\n\n msecs += 12219292800000; // `time_low`\n\n var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;\n b[i++] = tl >>> 24 & 0xff;\n b[i++] = tl >>> 16 & 0xff;\n b[i++] = tl >>> 8 & 0xff;\n b[i++] = tl & 0xff; // `time_mid`\n\n var tmh = msecs / 0x100000000 * 10000 & 0xfffffff;\n b[i++] = tmh >>> 8 & 0xff;\n b[i++] = tmh & 0xff; // `time_high_and_version`\n\n b[i++] = tmh >>> 24 & 0xf | 0x10; // include version\n\n b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)\n\n b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low`\n\n b[i++] = clockseq & 0xff; // `node`\n\n for (var n = 0; n < 6; ++n) {\n b[i + n] = node[n];\n }\n\n return buf || stringify(b);\n}\n\nexport default v1;","import v35 from './v35.js';\nimport md5 from './md5.js';\nvar v3 = v35('v3', 0x30, md5);\nexport default v3;","import stringify from './stringify.js';\nimport parse from './parse.js';\n\nfunction stringToBytes(str) {\n str = unescape(encodeURIComponent(str)); // UTF8 escape\n\n var bytes = [];\n\n for (var i = 0; i < str.length; ++i) {\n bytes.push(str.charCodeAt(i));\n }\n\n return bytes;\n}\n\nexport var DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8';\nexport var URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8';\nexport default function (name, version, hashfunc) {\n function generateUUID(value, namespace, buf, offset) {\n if (typeof value === 'string') {\n value = stringToBytes(value);\n }\n\n if (typeof namespace === 'string') {\n namespace = parse(namespace);\n }\n\n if (namespace.length !== 16) {\n throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)');\n } // Compute hash of namespace and value, Per 4.3\n // Future: Use spread syntax when supported on all platforms, e.g. `bytes =\n // hashfunc([...namespace, ... value])`\n\n\n var bytes = new Uint8Array(16 + value.length);\n bytes.set(namespace);\n bytes.set(value, namespace.length);\n bytes = hashfunc(bytes);\n bytes[6] = bytes[6] & 0x0f | version;\n bytes[8] = bytes[8] & 0x3f | 0x80;\n\n if (buf) {\n offset = offset || 0;\n\n for (var i = 0; i < 16; ++i) {\n buf[offset + i] = bytes[i];\n }\n\n return buf;\n }\n\n return stringify(bytes);\n } // Function#name is not settable on some platforms (#270)\n\n\n try {\n generateUUID.name = name; // eslint-disable-next-line no-empty\n } catch (err) {} // For CommonJS default export support\n\n\n generateUUID.DNS = DNS;\n generateUUID.URL = URL;\n return generateUUID;\n}","import rng from './rng.js';\nimport stringify from './stringify.js';\n\nfunction v4(options, buf, offset) {\n options = options || {};\n var rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n offset = offset || 0;\n\n for (var i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n\n return buf;\n }\n\n return stringify(rnds);\n}\n\nexport default v4;","import v35 from './v35.js';\nimport sha1 from './sha1.js';\nvar v5 = v35('v5', 0x50, sha1);\nexport default v5;","import REGEX from './regex.js';\n\nfunction validate(uuid) {\n return typeof uuid === 'string' && REGEX.test(uuid);\n}\n\nexport default validate;","import validate from './validate.js';\n\nfunction version(uuid) {\n if (!validate(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n return parseInt(uuid.substr(14, 1), 16);\n}\n\nexport default version;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = (module) => {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","import type { Context } from \"@finos/fdc3\";\nimport { init } from \"../platform/api\";\n\nwindow.addEventListener(\"DOMContentLoaded\", async () => {\n\tawait init(true);\n\tawait initializeDOM();\n});\n\n/**\n * Broadcasts a context using FDC3.\n */\nasync function broadcastContext(): Promise {\n\tconst contextType = \"fdc3.instrument\";\n\tconst contextName = \"Apple\";\n\tconst idData = {\n\t\tticker: \"AAPL\"\n\t};\n\tconst context = {\n\t\ttype: contextType,\n\t\tname: contextName,\n\t\tid: idData\n\t};\n\tif (window.fdc3) {\n\t\tawait window.fdc3.broadcast(context);\n\t\tconsole.log(`Broadcasted context: ${contextType} - ${contextName}`);\n\t} else {\n\t\twindow.addEventListener(\"fdc3Ready\", async () => {\n\t\t\tawait window.fdc3.broadcast(context);\n\t\t\tconsole.log(`Broadcasted context: ${contextType} - ${contextName}`);\n\t\t});\n\t}\n}\n\n/**\n * Adds an FDC3 context listener to the window.\n */\nasync function addFDC3Listener(): Promise {\n\tif (window.fdc3) {\n\t\tawait window.fdc3.addContextListener(null, (context) => {\n\t\t\tupdateDOMElements(context);\n\t\t});\n\t} else {\n\t\twindow.addEventListener(\"fdc3Ready\", async () => {\n\t\t\tawait window.fdc3.addContextListener(null, (context) => {\n\t\t\t\tupdateDOMElements(context);\n\t\t\t});\n\t\t});\n\t}\n}\n\n/**\n * Updates the DOM elements with the provided context.\n * @param context The context to update the DOM elements with.\n */\nfunction updateDOMElements(context: Context): void {\n\tconst contextTypeSpan = document.querySelector(\"#contextType\");\n\tconst contextNameSpan = document.querySelector(\"#contextName\");\n\tconst contextBodyPre = document.querySelector(\"#contextBody\");\n\n\tif (contextTypeSpan !== null && contextNameSpan !== null && contextBodyPre !== null) {\n\t\tcontextTypeSpan.textContent = context.type;\n\t\tcontextNameSpan.textContent = context.name ?? \"No name provided.\";\n\t\tcontextBodyPre.textContent = JSON.stringify(context, null, 2);\n\t}\n}\n\n/**\n * Initialize the DOM elements.\n */\nasync function initializeDOM(): Promise {\n\tconst broadcastButton = document.querySelector(\"#broadcast\");\n\n\tif (broadcastButton !== null) {\n\t\tbroadcastButton.addEventListener(\"click\", async () => {\n\t\t\tawait broadcastContext();\n\t\t});\n\t}\n\n\tawait addFDC3Listener();\n}\n"],"names":[],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"fdc3-view.bundle.js","mappings":";;;;;;;;;;AAAa,MAAM,mBAAO,CAAC,qFAAoB,EAAE,mBAAO,CAAC,mDAAS,EAAE,mBAAO,CAAC,+DAAM,EAAE,mBAAO,CAAC,mDAAQ,EAAE,mBAAO,CAAC,gEAAkB,EAAE,mBAAO,CAAC,4DAAgB,EAAE,eAAe;;;;;;;;;;;;ACA9J,MAAM,mBAAO,CAAC,mDAAS,IAAI,mBAAO,CAAC,mDAAQ,IAAI,mBAAO,CAAC,gEAAkB,IAAI,mBAAO,CAAC,4DAAgB,IAAI,mBAAO,CAAC,+DAAM,EAAE,kBAAkB,EAAE,GAAG,wBAAwB,GAAG,sGAAsG,qBAAM,CAAC,qBAAM,iCAAiC,KAAK,KAAK,KAAK,MAAM,oBAAoB,WAAW,kBAAkB,kBAAkB,UAAU,SAAS,sCAAsC,SAAS,sFAAsF,mCAAmC,6BAA6B,GAAG,kCAAkC,6BAA6B,mDAAmD,0CAA0C,yDAAyD,iEAAiE,oFAAoF,2IAA2I,mDAAmD,kDAAkD,oFAAoF,4IAA4I,sDAAsD,sCAAsC,SAAS,sCAAsC,UAAU,QAAQ,eAAe,mNAAmN,UAAU,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A;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,cAAc,SAAS;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,2CAA2C,UAAU;AACrD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;ACrJA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEY;;AAEZ,eAAe,mBAAO,CAAC,wDAAW;AAClC,gBAAgB,mBAAO,CAAC,oDAAS;AACjC;AACA;AACA;AACA;;AAEA,cAAc;AACd,kBAAkB;AAClB,yBAAyB;;AAEzB;AACA,kBAAkB;;AAElB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,kBAAkB,YAAY;AAC9B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA,wCAAwC,SAAS;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;;AAEA;AACA;AACA,cAAc,iBAAiB;AAC/B;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,iDAAiD,EAAE;AACnD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C;AAC1C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA,yBAAyB,eAAe;AACxC;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,yBAAyB,QAAQ;AACjC;AACA,sBAAsB,eAAe;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc,YAAY;AAC1B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB,sBAAsB;AACxC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,mBAAmB;AACnB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA,oBAAoB,SAAS;AAC7B;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA,qBAAqB,WAAW,GAAG,IAAI;AACvC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA,gBAAgB,WAAW,GAAG,IAAI,KAAK,aAAa;AACpD;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;;AAEA;AACA,GAAG;AACH;AACA;AACA,mBAAmB,KAAK,mDAAmD,cAAc;AACzF,GAAG;AACH;AACA;AACA,+BAA+B,IAAI;AACnC;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,MAAM,aAAa,SAAS;AACtD;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,SAAS,gBAAgB;AACzB,cAAc,oBAAoB,EAAE,IAAI;AACxC;AACA,YAAY,gBAAgB,EAAE,IAAI;AAClC;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,GAAG,SAAS,GAAG,KAAK,qBAAqB,EAAE,EAAE;AACpE,QAAQ;AACR,yBAAyB,GAAG,KAAK,yBAAyB,EAAE,EAAE;AAC9D,mBAAmB,yBAAyB,EAAE,EAAE;AAChD;AACA,MAAM;AACN,oBAAoB,IAAI,EAAE,GAAG,SAAS,IAAI,EAAE,EAAE;AAC9C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,0CAA0C,cAAc,SAAS,OAAO;AACxE;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,kBAAkB,YAAY;AAC9B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,kBAAkB,gBAAgB;AAClC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,kBAAkB,gBAAgB;AAClC;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,cAAc,YAAY;AAC1B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,QAAQ;AAC1B;AACA,oBAAoB,QAAQ;AAC5B;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;;;;;ACzjEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEa;;AAEb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB;;AAEnB;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,sBAAsB;AACxC;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA,eAAe;AACf;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA,oBAAoB,SAAS;AAC7B;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;;AAEA,kCAAkC,QAAQ;AAC1C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oBAAoB,iBAAiB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,QAAQ;AACR;AACA,uCAAuC,QAAQ;AAC/C;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,OAAO;AACzB;AACA;AACA;;AAEA;AACA,SAAS,yBAAyB;AAClC;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,gBAAgB;AAClC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,8DAA8D,YAAY;AAC1E;AACA,8DAA8D,YAAY;AAC1E;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,qCAAqC,YAAY;AACjD;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;AACA;;;;;;;;;;;AChfA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,SAAS,WAAW;;AAEpB;AACA;AACA;AACA,SAAS,WAAW;;AAEpB;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA,SAAS,WAAW;;AAEpB;AACA;AACA,SAAS,UAAU;;AAEnB;AACA;;;;;;;;;;;ACpFA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,WAAW,mBAAO,CAAC,mDAAS;;AAE5B;AACA;;AAEA;;;;;;;;;;;ACNA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,cAAc,mBAAO,CAAC,yDAAY;AAClC,cAAc,mBAAO,CAAC,yDAAY;AAClC,cAAc,mBAAO,CAAC,yDAAY;;AAElC;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA;AACA;AACA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AAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AChDA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACnBA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,UAAU;AACrB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACtBA,sBAAsB,mBAAO,CAAC,yEAAoB;AAClD,SAAS,mBAAO,CAAC,6CAAM;;AAEvB;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC3BA,SAAS,mBAAO,CAAC,6CAAM;;AAEvB;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpBA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,WAAW,mBAAO,CAAC,iDAAQ;;AAE3B;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AChBA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,aAAa,mBAAO,CAAC,qDAAU;;AAE/B;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa,QAAQ;AACrB;AACA;A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ACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,SAAS;AACpB;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa,GAAG;AAChB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;AACA,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;;;;;;;;;;ACrKA,eAAe,mBAAO,CAAC,yDAAY;;AAEnC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;;;;;;;;;;AC7BA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,cAAc,mBAAO,CAAC,uDAAW;;AAEjC;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACnBA,aAAa,mBAAO,CAAC,uDAAW;AAChC,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,qBAAqB,mBAAO,CAAC,uEAAmB;;AAEhD;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;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A;;;;;;;;;;;AClFA,aAAa,mBAAO,CAAC,uDAAW;AAChC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA,iBAAiB,mBAAO,CAAC,6DAAc;AACvC,eAAe,mBAAO,CAAC,2DAAa;AACpC,eAAe,mBAAO,CAAC,yDAAY;AACnC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;AACA;AACA;AACA,oCAAoC;;AAEpC;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC9CA,aAAa,mBAAO,CAAC,uDAAW;AAChC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,eAAe,mBAAO,CAAC,yDAAY;AACnC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC3DA,kBAAkB,mBAAO,CAAC,iEAAgB;AAC1C,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;;A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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC/GA,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACzFA;AACA,wBAAwB,qBAAM,gBAAgB,qBAAM,IAAI,qBAAM,sBAAsB,qBAAM;;AAE1F;;;;;;;;;;;ACHA,qBAAqB,mBAAO,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ACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC5EA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,mBAAmB,mBAAO,CAAC,mEAAiB;AAC5C,kBAAkB,mBAAO,CAAC,iEAAgB;;AAE1C;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACxBA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACdA,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACnBA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACZA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClCA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;AACA;AACA;AAC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ACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;;;;;;;;;;ACjBA,gBAAgB,mBAAO,CAAC,6DAAc;;AAEtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACdA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,GAAG;AAChB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACbA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACbA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,UAAU,mBAAO,CAAC,iDAAQ;AAC1B,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjCA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;;;;;;;;;;;ACzBA,gBAAgB,mBAAO,CAAC,6DAAc;;AAEtC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,GAAG;AAChB;AACA;AACA;AACA,oBAAoB,QAAQ,IAAI,QAAQ;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,kBAAkB;AAClB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpCA,sBAAsB,mBAAO,CAAC,yEAAoB;AAClD,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA,8BAA8B,mBAAmB;AACjD;AACA;AACA;AACA;AACA;AACA,+CAA+C,mBAAmB;AAClE;AACA;AACA;;AAEA;;;;;;;;;;;ACnCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACzBA,iBAAiB,mBAAO,CAAC,6DAAc;AACvC,eAAe,mBAAO,CAAC,yDAAY;;AAEnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AChCA,WAAW,mBAAO,CAAC,mDAAS;AAC5B,gBAAgB,mBAAO,CAAC,2DAAa;;AAErC;AACA,kBAAkB,KAA0B;;AAE5C;AACA,gCAAgC,QAAa;;AAE7C;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACrCA,kBAAkB,mBAAO,CAAC,iEAAgB;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,kBAAkB;AAClB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClCA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,eAAe,mBAAO,CAAC,yDAAY;;AAEnC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpCA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClCA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC1BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC9BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC5BA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC1BA,uBAAuB,mBAAO,CAAC,2EAAqB;AACpD,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC1BA,oBAAoB,mBAAO,CAAC,qEAAkB;AAC9C,eAAe,mBAAO,CAAC,2DAAa;AACpC,kBAAkB,mBAAO,CAAC,+DAAe;;AAEzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpCA,oBAAoB,mBAAO,CAAC,qEAAkB;AAC9C,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,kBAAkB,mBAAO,CAAC,+DAAe;;AAEzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,kBAAkB,aAAa;AAC/B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,iEAAe,GAAG;;;;;;;;;;;;;;;ACtNlB,iEAAe,sCAAsC;;;;;;;;;;;;;;;;ACAhB;;AAErC;AACA,OAAO,wDAAQ;AACf;AACA;;AAEA;AACA,gCAAgC;;AAEhC;AACA;AACA;AACA,qBAAqB;;AAErB;AACA,qBAAqB;;AAErB;AACA,qBAAqB;;AAErB;AACA,qBAAqB;AACrB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,iEAAe,KAAK;;;;;;;;;;;;;;;AClCpB,iEAAe,cAAc,EAAE,UAAU,EAAE,eAAe,EAAE,gBAAgB,EAAE,UAAU,GAAG,yCAAyC;;;;;;;;;;;;;;;ACApI;AACA;AACA;AACA;AACA;AACe;AACf;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;AClBA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,mDAAmD;;AAEnD;;AAEA,oBAAoB,gBAAgB;AACpC;AACA;AACA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modules/@openfin/core-web/out/api-client.js","webpack://openfin-web--web-interop/../../node_modules/@openfin/core-web/out/main-8cad4070.js","webpack://openfin-web--web-interop/../../node_modules/@openfin/core-web/out/main-b14f67c9.js","webpack://openfin-web--web-interop/../../node_modules/base64-js/index.js","webpack://openfin-web--web-interop/../../node_modules/buffer/index.js","webpack://openfin-web--web-interop/../../node_modules/events/events.js","webpack://openfin-web--web-interop/../../node_modules/ieee754/index.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_DataView.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_Hash.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_ListCache.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_Map.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_MapCache.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_Promise.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_Set.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_SetCache.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_Stack.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_Symbol.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_Uint8Array.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_WeakMap.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_arrayEach.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_arrayFilter.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_arrayLikeKeys.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_arrayPush.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_arraySome.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_assignValue.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_assocIndexOf.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseAssign.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseAssignIn.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseAssignValue.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseClone.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseCreate.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseGetAllKeys.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseGetTag.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseIsArguments.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseIsEqual.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseIsEqualDeep.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseIsMap.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseIsNative.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseIsSet.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseIsTypedArray.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseKeys.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseKeysIn.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseTimes.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseUnary.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_cacheHas.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_cloneArrayBuffer.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_cloneBuffer.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_cloneDataView.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_cloneRegExp.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_cloneSymbol.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_cloneTypedArray.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_copyArray.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_copyObject.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_copySymbols.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_copySymbolsIn.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_coreJsData.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_defineProperty.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_equalArrays.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_equalByTag.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_equalObjects.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_freeGlobal.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_getAllKeys.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_getAllKeysIn.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_getMapData.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_getNative.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_getPrototype.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_getRawTag.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_getSymbols.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_getSymbolsIn.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_getTag.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_getValue.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_hashClear.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_hashDelete.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_hashGet.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_hashHas.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_hashSet.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_initCloneArray.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_initCloneByTag.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_initCloneObject.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_isIndex.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_isKeyable.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_isMasked.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_isPrototype.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_listCacheClear.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_listCacheDelete.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_listCacheGet.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_listCacheHas.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_listCacheSet.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_mapCacheClear.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_mapCacheDelete.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_mapCacheGet.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_mapCacheHas.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_mapCacheSet.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_mapToArray.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_nativeCreate.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_nativeKeys.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_nativeKeysIn.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_nodeUtil.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_objectToString.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_overArg.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_root.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_setCacheAdd.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_setCacheHas.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_setToArray.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_stackClear.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_stackDelete.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_stackGet.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_stackHas.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_stackSet.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_toSource.js","webpack://openfin-web--web-interop/../../node_modules/lodash/cloneDeep.js","webpack://openfin-web--web-interop/../../node_modules/lodash/eq.js","webpack://openfin-web--web-interop/../../node_modules/lodash/isArguments.js","webpack://openfin-web--web-interop/../../node_modules/lodash/isArray.js","webpack://openfin-web--web-interop/../../node_modules/lodash/isArrayLike.js","webpack://openfin-web--web-interop/../../node_modules/lodash/isBuffer.js","webpack://openfin-web--web-interop/../../node_modules/lodash/isEqual.js","webpack://openfin-web--web-interop/../../node_modules/lodash/isFunction.js","webpack://openfin-web--web-interop/../../node_modules/lodash/isLength.js","webpack://openfin-web--web-interop/../../node_modules/lodash/isMap.js","webpack://openfin-web--web-interop/../../node_modules/lodash/isObject.js","webpack://openfin-web--web-interop/../../node_modules/lodash/isObjectLike.js","webpack://openfin-web--web-interop/../../node_modules/lodash/isSet.js","webpack://openfin-web--web-interop/../../node_modules/lodash/isTypedArray.js","webpack://openfin-web--web-interop/../../node_modules/lodash/keys.js","webpack://openfin-web--web-interop/../../node_modules/lodash/keysIn.js","webpack://openfin-web--web-interop/../../node_modules/lodash/stubArray.js","webpack://openfin-web--web-interop/../../node_modules/lodash/stubFalse.js","webpack://openfin-web--web-interop/./client/src/platform/api.ts","webpack://openfin-web--web-interop/./client/src/platform/settings.ts","webpack://openfin-web--web-interop/../../node_modules/uuid/dist/esm-browser/index.js","webpack://openfin-web--web-interop/../../node_modules/uuid/dist/esm-browser/md5.js","webpack://openfin-web--web-interop/../../node_modules/uuid/dist/esm-browser/nil.js","webpack://openfin-web--web-interop/../../node_modules/uuid/dist/esm-browser/parse.js","webpack://openfin-web--web-interop/../../node_modules/uuid/dist/esm-browser/regex.js","webpack://openfin-web--web-interop/../../node_modules/uuid/dist/esm-browser/rng.js","webpack://openfin-web--web-interop/../../node_modules/uuid/dist/esm-browser/sha1.js","webpack://openfin-web--web-interop/../../node_modules/uuid/dist/esm-browser/stringify.js","webpack://openfin-web--web-interop/../../node_modules/uuid/dist/esm-browser/v1.js","webpack://openfin-web--web-interop/../../node_modules/uuid/dist/esm-browser/v3.js","webpack://openfin-web--web-interop/../../node_modules/uuid/dist/esm-browser/v35.js","webpack://openfin-web--web-interop/../../node_modules/uuid/dist/esm-browser/v4.js","webpack://openfin-web--web-interop/../../node_modules/uuid/dist/esm-browser/v5.js","webpack://openfin-web--web-interop/../../node_modules/uuid/dist/esm-browser/validate.js","webpack://openfin-web--web-interop/../../node_modules/uuid/dist/esm-browser/version.js","webpack://openfin-web--web-interop/webpack/bootstrap","webpack://openfin-web--web-interop/webpack/runtime/define property getters","webpack://openfin-web--web-interop/webpack/runtime/global","webpack://openfin-web--web-interop/webpack/runtime/hasOwnProperty shorthand","webpack://openfin-web--web-interop/webpack/runtime/make namespace object","webpack://openfin-web--web-interop/webpack/runtime/node module decorator","webpack://openfin-web--web-interop/./client/src/content/fdc3-view.ts"],"sourcesContent":["\"use strict\";var e=require(\"./main-8cad4070.js\");require(\"buffer/\"),require(\"uuid\"),require(\"events\"),require(\"lodash/cloneDeep\"),require(\"lodash/isEqual\"),exports.connect=e.connect;\n","\"use strict\";var e=require(\"buffer/\"),t=require(\"events\"),n=require(\"lodash/cloneDeep\"),i=require(\"lodash/isEqual\"),r=require(\"uuid\");const o=(e,t)=>`${t}<${btoa(JSON.stringify(e))}>`;var s=\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof window?window:\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:{},a={},c={},d={},h={};async function l(e){const t=[];for(const n of e){const e=await n();t.push(e)}return t}Object.defineProperty(h,\"__esModule\",{value:!0}),h.promiseMapSerial=h.serial=h.promiseMap=h.promisify=void 0,h.promisify=function(e){return(...t)=>new Promise(((n,i)=>{e(...t,((e,t)=>e?i(e):n(t)))}))},h.promiseMap=async function(e,t){return Promise.all(e.map(t))},h.serial=l,h.promiseMapSerial=async function(e,t){return l(e.map(((e,n,i)=>()=>t(e,n,i))))};var u,p=s&&s.__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},w=s&&s.__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)};Object.defineProperty(d,\"__esModule\",{value:!0}),d.Reply=d.EmitterBase=d.Base=void 0;const y=h;class f{constructor(e){this.isNodeEnvironment=()=>\"node\"===this.wire.environment.type,this.isOpenFinEnvironment=()=>\"openfin\"===this.wire.environment.type,this.isBrowserEnvironment=()=>\"other\"===this.wire.environment.type,this.wire=e}get fin(){return this.wire.getFin()}get me(){return this.wire.me}}d.Base=f;d.EmitterBase=class extends f{constructor(e,t,...n){super(e),this.topic=t,u.set(this,void 0),this.eventNames=()=>this.hasEmitter()?this.getOrCreateEmitter().eventNames():[],this.emit=(e,t,...n)=>!!this.hasEmitter()&&this.getOrCreateEmitter().emit(e,t,...n),this.hasEmitter=()=>this.wire.eventAggregator.has(w(this,u,\"f\")),this.getOrCreateEmitter=()=>this.wire.eventAggregator.getOrCreate(w(this,u,\"f\")),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[],this.listenerCount=e=>this.hasEmitter()?this.getOrCreateEmitter().listenerCount(e):0,this.registerEventListener=async(e,t={},n,i)=>{const r={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e},o=this.getOrCreateEmitter();n(o);try{await this.wire.sendAction(\"subscribe-to-desktop-event\",r)}catch(e){throw i(o),this.deleteEmitterIfNothingRegistered(o),e}},this.deregisterEventListener=async(e,t={})=>{if(this.hasEmitter()){const n={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e};await this.wire.sendAction(\"unsubscribe-to-desktop-event\",n).catch((()=>null));return this.getOrCreateEmitter()}return Promise.resolve()},p(this,u,[t,...n],\"f\"),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[]}async on(e,t,n){return await this.registerEventListener(e,n,(n=>{n.on(e,t)}),(n=>{n.removeListener(e,t)})),this}async addListener(e,t,n){return this.on(e,t,n)}async once(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.once(e,i),n.once(e,t)}),(n=>{n.removeListener(e,i),n.removeListener(e,t)})),this}async prependListener(e,t,n){return await this.registerEventListener(e,n,(n=>{n.prependListener(e,t)}),(n=>{n.removeListener(e,t)})),this}async prependOnceListener(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.prependOnceListener(e,t),n.once(e,i)}),(n=>{n.removeListener(e,t),n.removeListener(e,i)})),this}async removeListener(e,t,n){const i=await this.deregisterEventListener(e,n);return i&&(i.removeListener(e,t),this.deleteEmitterIfNothingRegistered(i)),this}async deregisterAllListeners(e){const t={...this.identity,type:e,topic:this.topic};if(this.hasEmitter()){const e=this.getOrCreateEmitter(),n=e.listenerCount(t.type),i=[];for(let e=0;enull)));return await Promise.all(i),e}}async removeAllListeners(e){const t=async e=>{const t=await this.deregisterAllListeners(e);t&&(t.removeAllListeners(e),this.deleteEmitterIfNothingRegistered(t))};if(e)await t(e);else if(this.hasEmitter()){const e=this.getOrCreateEmitter().eventNames();await(0,y.promiseMap)(e,t)}return this}deleteEmitterIfNothingRegistered(e){0===e.eventNames().length&&this.wire.eventAggregator.delete(w(this,u,\"f\"))}},u=new WeakMap;d.Reply=class{};var g={};Object.defineProperty(g,\"__esModule\",{value:!0});var m=g.RuntimeError=g.NotSupportedError=g.NotImplementedError=g.NoAckError=g.DuplicateCorrelationError=g.UnexpectedActionError=g.DisconnectedError=void 0;class v extends Error{constructor(e){super(`Expected websocket state OPEN but found ${e}`),this.readyState=e}}g.DisconnectedError=v;class C extends Error{}g.UnexpectedActionError=C;class b extends Error{}g.DuplicateCorrelationError=b;class I extends Error{}g.NoAckError=I;class E extends Error{}g.NotImplementedError=E;class x extends Error{}g.NotSupportedError=x;class A extends Error{constructor(e){const{message:t,name:n,stack:i,...r}=e;super(t),this.name=n||\"Error\",this.stack=i??this.toString(),Object.keys(r).forEach((e=>{this[e]=r[e]}))}}class P extends Error{static getCallSite(e=0){const t=Error.stackTraceLimit,n=e+1;Error.stackTraceLimit=t+n;const i=Error.prepareStackTrace;Error.prepareStackTrace=(e,t)=>t;const r=(new Error).stack?.slice(n)??[];return Error.prepareStackTrace=i,Error.stackTraceLimit=t,r}static prepareStackTrace(e,t){if(\"function\"==typeof Error.prepareStackTrace)return Error.prepareStackTrace(e,t);let n=\"\";n+=e.name||\"Error\",n+=`: ${e.message||\"\"}`;for(const e of t)n+=`\\n at ${e.toString()}`;return n}constructor(e,t){const{reason:n,error:i}=e;super(n),this.name=\"RuntimeError\",i?.stack&&(this.cause=new A(i)),t&&(this.stack=P.prepareStackTrace(this,t))}}m=g.RuntimeError=P;var M={},_={},O={};Object.defineProperty(O,\"__esModule\",{value:!0}),O.validateIdentity=void 0,O.validateIdentity=function(e){let t;return\"object\"==typeof e&&\"string\"==typeof e.uuid||(t=\"Not a valid identity object\"),t};var S={},R={},F={},j={},k={},L={},T={};Object.defineProperty(T,\"__esModule\",{value:!0}),T.handleDeprecatedWarnings=void 0;var $;T.handleDeprecatedWarnings=e=>{(e.contentNavigation?.whitelist||e.contentNavigation?.blacklist||e.contentRedirect?.whitelist||e.contentRedirect?.blacklist)&&console.warn(\"The properties 'whitelist' and 'blacklist' have been marked as deprecated and will be removed in a future version. Please use 'allowlist' and 'denylist'.\")};var B={},G={};Object.defineProperty(G,\"__esModule\",{value:!0}),G.AsyncRetryableLazy=W=G.Lazy=void 0;var W=G.Lazy=class{constructor(e){this.producerFn=e}getValue(){return this.value||(this.value=this.producerFn()),this.value}};G.AsyncRetryableLazy=class{constructor(e){this.producerFn=e}async getValue(){return this.promise||(this.promise=this.producerFn().catch((e=>{throw delete this.promise,e}))),this.promise}};var H={};Object.defineProperty(H,\"__esModule\",{value:!0}),H.WebContents=void 0;const N=d;class D extends N.EmitterBase{constructor(e,t,n){super(e,n,t.uuid,t.name),this.identity=t,this.entityType=n}capturePage(e){return this.wire.sendAction(\"capture-page\",{options:e,...this.identity}).then((({payload:e})=>e.data))}executeJavaScript(e){return this.wire.sendAction(\"execute-javascript-in-window\",{...this.identity,code:e}).then((({payload:e})=>e.data))}getZoomLevel(){return this.wire.sendAction(\"get-zoom-level\",this.identity).then((({payload:e})=>e.data))}setZoomLevel(e){return this.wire.sendAction(\"set-zoom-level\",{...this.identity,level:e}).then((()=>{}))}navigate(e){return this.wire.sendAction(\"navigate-window\",{...this.identity,url:e}).then((()=>{}))}navigateBack(){return this.wire.sendAction(\"navigate-window-back\",{...this.identity}).then((()=>{}))}async navigateForward(){await this.wire.sendAction(\"navigate-window-forward\",{...this.identity})}stopNavigation(){return this.wire.sendAction(\"stop-window-navigation\",{...this.identity}).then((()=>{}))}reload(e=!1){return this.wire.sendAction(\"reload-window\",{ignoreCache:e,...this.identity}).then((()=>{}))}print(e={}){return this.wire.sendAction(\"print\",{...this.identity,options:e}).then((()=>{}))}findInPage(e,t){return this.wire.sendAction(\"find-in-page\",{...this.identity,searchTerm:e,options:t}).then((({payload:e})=>e.data))}stopFindInPage(e){return this.wire.sendAction(\"stop-find-in-page\",{...this.identity,action:e}).then((()=>{}))}getPrinters(){return this.wire.sendAction(\"get-printers\",{...this.identity}).then((({payload:e})=>e.data))}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){await this.wire.sendAction(\"focus-window\",{emitSynthFocused:e,...this.identity})}async showDeveloperTools(){await this.wire.sendAction(\"show-developer-tools\",this.identity)}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction(\"get-process-info\",this.identity);return e}async getSharedWorkers(){return this.wire.sendAction(\"get-shared-workers\",this.identity).then((({payload:e})=>e.data))}async inspectSharedWorker(){await this.wire.sendAction(\"inspect-shared-worker\",{...this.identity})}async inspectSharedWorkerById(e){await this.wire.sendAction(\"inspect-shared-worker-by-id\",{...this.identity,workerId:e})}async inspectServiceWorker(){await this.wire.sendAction(\"inspect-service-worker\",{...this.identity})}async showPopupWindow(e){if(this.wire.sendAction(`${this.entityType}-show-popup-window`,this.identity).catch((()=>{})),e?.onPopupReady){const t=async({popupName:t})=>{try{const n=this.fin.Window.wrapSync({uuid:this.fin.me.uuid,name:t});await e.onPopupReady(n)}catch(e){throw new Error(`Something went wrong during onPopupReady execution: ${e}`)}};await this.once(\"popup-ready\",t)}const{payload:t}=await this.wire.sendAction(\"try-create-popup-window\",{options:{...e,hasResultCallback:!!e?.onPopupResult,hasReadyCallback:!!e?.onPopupReady},...this.identity}),{data:{willOpen:n,options:i}}=t;n&&await this.fin.Window.create(i.initialOptions);if(e?.onPopupResult){const t=async t=>{await e.onPopupResult((e=>{const{name:t,uuid:n,result:i,data:r}=e,o={identity:{name:t,uuid:n},result:i};return r&&(o.data=r),o})(t))},n=async()=>{await this.removeListener(\"popup-result\",t)};await this.on(\"popup-result\",t),await this.once(\"popup-teardown\",n)}const{payload:r}=await this.wire.sendAction(\"show-popup-window\",{options:i,...this.identity});return r.data}}var U,V,z,K,q;function J(){return V||(V=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(function(){if($)return L;$=1,Object.defineProperty(L,\"__esModule\",{value:!0}),L.ViewModule=void 0;const e=d,t=O,n=J(),i=T;class r extends e.Base{async create(e){const{uuid:t}=this.wire.me;if(!e.name||\"string\"!=typeof e.name)throw new Error(\"Please provide a name property as a string in order to create a View.\");return(0,i.handleDeprecatedWarnings)(e),this.wire.environment.childViews?await this.wire.environment.createChildContent({entityType:\"view\",options:{...e,uuid:t}}):await this.wire.sendAction(\"create-view\",{...e,uuid:t}),this.wrapSync({uuid:t,name:e.name})}async wrap(e){this.wire.sendAction(\"view-wrap\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}wrapSync(e){this.wire.sendAction(\"view-wrap-sync\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}getCurrent(){if(this.wire.sendAction(\"view-get-current\").catch((e=>{})),!this.wire.me.isView)throw new Error(\"You are not in a View context\");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction(\"view-get-current-sync\").catch((e=>{})),!this.wire.me.isView)throw new Error(\"You are not in a View context\");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return L.ViewModule=r,L}(),e),n(function(){if(U)return B;var e;U=1,Object.defineProperty(B,\"__esModule\",{value:!0}),B.View=void 0;const t=g,n=G,i=H,r=ie();class o extends i.WebContents{constructor(i,o){super(i,o,\"view\"),this.identity=o,e.set(this,new n.Lazy((()=>this.fin.Platform.wrapSync(this.identity).getClient()))),this.attach=async e=>{await this.wire.sendAction(\"attach-view\",{target:e,...this.identity})},this.destroy=async()=>{await this.wire.sendAction(\"destroy-view\",{...this.identity})},this.show=async()=>{await this.wire.sendAction(\"show-view\",{...this.identity})},this.showAt=async(e,t={})=>{await this.wire.sendAction(\"show-view-at\",{bounds:e,...this.identity,options:t})},this.bringToFront=async()=>{await this.wire.sendAction(\"bring-view-to-front\",{...this.identity})},this.hide=async()=>{await this.wire.sendAction(\"hide-view\",{...this.identity})},this.setBounds=async e=>{await this.wire.sendAction(\"set-view-bounds\",{bounds:e,...this.identity})},this.getBounds=async()=>(await this.wire.sendAction(\"get-view-bounds\",{...this.identity})).payload.data,this.getInfo=async()=>(await this.wire.sendAction(\"get-view-info\",{...this.identity})).payload.data,this.getParentLayout=async()=>(this.wire.sendAction(\"view-get-parent-layout\",{...this.identity}).catch((()=>{})),this.fin.Platform.Layout.getLayoutByViewIdentity(this.identity)),this.getOptions=async()=>this.wire.sendAction(\"get-view-options\",{...this.identity}).then((({payload:e})=>e.data)),this.updateOptions=async e=>this.wire.sendAction(\"update-view-options\",{options:e,...this.identity}).then((()=>{})),this.getCurrentWindow=async()=>{const{payload:{data:e}}=await this.wire.sendAction(\"get-view-window\",{...this.identity});return new r._Window(this.wire,e)},this.getCurrentStack=async()=>{this.wire.sendAction(\"view-get-current-stack\").catch((()=>{}));try{return(await this.getParentLayout()).getStackByViewIdentity(this.identity)}catch(e){throw new t.RuntimeError({reason:\"This view does not belong to a stack.\",error:e})}},this.triggerBeforeUnload=async()=>(await this.wire.sendAction(\"trigger-before-unload\",{...this.identity})).payload.data,this.bindToElement=async e=>{if(!e)throw new Error(\"Element not found.\");return this.wire.environment.observeBounds(e,(async e=>this.setBounds(e)))}}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){const t=await this.getCurrentWindow();await t.focusedWebViewWasChanged(),await super.focus({emitSynthFocused:e})}}return B.View=o,e=new WeakMap,B}(),e)}(k)),k}function Y(){if(z)return j;z=1,Object.defineProperty(j,\"__esModule\",{value:!0}),j.Application=void 0;const e=d,t=ie(),n=J();class i extends e.EmitterBase{constructor(e,n){super(e,\"application\",n.uuid),this.identity=n,this.window=new t._Window(this.wire,{uuid:this.identity.uuid,name:this.identity.uuid})}windowListFromIdentityList(e){const n=[];return e.forEach((e=>{n.push(new t._Window(this.wire,{uuid:e.uuid,name:e.name}))})),n}isRunning(){return this.wire.sendAction(\"is-application-running\",this.identity).then((({payload:e})=>e.data))}async quit(e=!1){try{await this._close(e),await this.wire.sendAction(\"destroy-application\",{force:e,...this.identity})}catch(e){if(![\"Remote connection has closed\",\"Could not locate the requested application\"].some((t=>e.message.includes(t))))throw e}}async _close(e=!1){try{await this.wire.sendAction(\"close-application\",{force:e,...this.identity})}catch(e){if(!e.message.includes(\"Remote connection has closed\"))throw e}}close(e=!1){return console.warn(\"Deprecation Warning: Application.close is deprecated Please use Application.quit\"),this.wire.sendAction(\"application-close\",this.identity).catch((e=>{})),this._close(e)}getChildWindows(){return this.wire.sendAction(\"get-child-windows\",this.identity).then((({payload:e})=>{const t=[];return e.data.forEach((e=>{t.push({uuid:this.identity.uuid,name:e})})),this.windowListFromIdentityList(t)}))}getManifest(){return this.wire.sendAction(\"get-application-manifest\",this.identity).then((({payload:e})=>e.data))}getParentUuid(){return this.wire.sendAction(\"get-parent-application\",this.identity).then((({payload:e})=>e.data))}getShortcuts(){return this.wire.sendAction(\"get-shortcuts\",this.identity).then((({payload:e})=>e.data))}async getViews(){const{payload:e}=await this.wire.sendAction(\"application-get-views\",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}getZoomLevel(){return this.wire.sendAction(\"get-application-zoom-level\",this.identity).then((({payload:e})=>e.data))}getWindow(){return this.wire.sendAction(\"application-get-window\",this.identity).catch((e=>{})),Promise.resolve(this.window)}registerUser(e,t){return this.wire.sendAction(\"register-user\",{userName:e,appName:t,...this.identity}).then((()=>{}))}removeTrayIcon(){return this.wire.sendAction(\"remove-tray-icon\",this.identity).then((()=>{}))}restart(){return this.wire.sendAction(\"restart-application\",this.identity).then((()=>{}))}run(){return console.warn(\"Deprecation Warning: Application.run is deprecated Please use fin.Application.start\"),this.wire.sendAction(\"application-run\",this.identity).catch((e=>{})),this._run()}_run(e={}){return this.wire.sendAction(\"run-application\",{manifestUrl:this._manifestUrl,opts:e,...this.identity}).then((()=>{}))}scheduleRestart(){return this.wire.sendAction(\"relaunch-on-close\",this.identity).then((()=>{}))}async sendApplicationLog(){const{payload:e}=await this.wire.sendAction(\"send-application-log\",this.identity);return e.data}async setJumpList(e){await this.wire.sendAction(\"set-jump-list\",{config:e,...this.identity})}setTrayIcon(e){return this.wire.sendAction(\"set-tray-icon\",{enabledIcon:e,...this.identity}).then((()=>{}))}setShortcuts(e){return this.wire.sendAction(\"set-shortcuts\",{data:e,...this.identity}).then((()=>{}))}async setShortcutQueryParams(e){await this.wire.sendAction(\"set-shortcut-query-args\",{data:e,...this.identity})}setZoomLevel(e){return this.wire.sendAction(\"set-application-zoom-level\",{level:e,...this.identity}).then((()=>{}))}async setAppLogUsername(e){await this.wire.sendAction(\"set-app-log-username\",{data:e,...this.identity})}getTrayIconInfo(){return this.wire.sendAction(\"get-tray-icon-info\",this.identity).then((({payload:e})=>e.data))}hasTrayIcon(){return this.wire.sendAction(\"has-tray-icon\",this.identity).then((({payload:e})=>e.data))}terminate(){return this.wire.sendAction(\"terminate-application\",this.identity).then((()=>{}))}wait(){return this.wire.sendAction(\"wait-for-hung-application\",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction(\"get-info\",this.identity).then((({payload:e})=>e.data))}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction(\"application-get-process-info\",this.identity);return e}async setFileDownloadLocation(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t};await this.wire.sendAction(\"set-file-download-location\",{...n,downloadLocation:e})}async getFileDownloadLocation(){const{payload:{data:e}}=await this.wire.sendAction(\"get-file-download-location\",this.identity);return e}async showTrayIconPopupMenu(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t},{payload:i}=await this.wire.sendAction(\"show-tray-icon-popup-menu\",{...n,options:e});return i.data}async closeTrayIconPopupMenu(){const{name:e}=this.wire.me,t={uuid:this.identity.uuid,name:e};await this.wire.sendAction(\"close-tray-icon-popup-menu\",{...t})}}return j.Application=i,j}function Z(){return q||(q=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(function(){if(K)return F;K=1,Object.defineProperty(F,\"__esModule\",{value:!0}),F.ApplicationModule=void 0;const e=d,t=O,n=Y();class i extends e.Base{async wrap(e){this.wire.sendAction(\"wrap-application\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}wrapSync(e){this.wire.sendAction(\"wrap-application-sync\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}async _create(e){return void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&void 0===e.isPlatformController&&(e.autoShow=!0),await this.wire.sendAction(\"create-application\",e),this.wrap({uuid:e.uuid})}create(e){return console.warn(\"Deprecation Warning: fin.Application.create is deprecated. Please use fin.Application.start\"),this.wire.sendAction(\"application-create\").catch((e=>{})),this._create(e)}async start(e){this.wire.sendAction(\"start-application\").catch((e=>{}));const t=await this._create(e);return await this.wire.sendAction(\"run-application\",{uuid:e.uuid}),t}async startManyManifests(e,t){return this.wire.sendAction(\"run-applications\",{applications:e,opts:t}).then((()=>{}))}getCurrent(){return this.wire.sendAction(\"get-current-application\").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction(\"get-current-application-sync\").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}async startFromManifest(e,t){this.wire.sendAction(\"application-start-from-manifest\").catch((e=>{}));const n=await this._createFromManifest(e);return await n._run(t),n}createFromManifest(e){return console.warn(\"Deprecation Warning: fin.Application.createFromManifest is deprecated. Please use fin.Application.startFromManifest\"),this.wire.sendAction(\"application-create-from-manifest\").catch((e=>{})),this._createFromManifest(e)}_createFromManifest(e){return this.wire.sendAction(\"get-application-manifest\",{manifestUrl:e}).then((({payload:e})=>{const t=e.data.platform?e.data.platform.uuid:e.data.startup_app.uuid;return this.wrap({uuid:t})})).then((t=>(t._manifestUrl=e,t)))}}return F.ApplicationModule=i,F}(),e),n(Y(),e)}(R)),R}H.WebContents=D;var Q={};Object.defineProperty(Q,\"__esModule\",{value:!0}),Q.promisifySubscription=void 0;var X,ee,te;function ne(){if(X)return S;X=1,Object.defineProperty(S,\"__esModule\",{value:!0}),S._Window=void 0;const e=Z(),t=H,n=J(),i=T,r=Q;class o extends t.WebContents{constructor(e,t){super(e,t,\"window\")}async createWindow(e){this.wire.sendAction(\"window-create-window\",this.identity).catch((e=>{}));const t=await(0,r.promisifySubscription)(this,\"fire-constructor-callback\");void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&(e.autoShow=!0),(0,i.handleDeprecatedWarnings)(e);const n=this.wire.environment.createChildContent({entityType:\"window\",options:e}),[o]=await Promise.all([t.getValue(),n]);let s;const{success:a}=o,c=o.data,{message:d}=c;s=a?{httpResponseCode:c.httpResponseCode,apiInjected:c.apiInjected}:{message:c.message,networkErrorCode:c.networkErrorCode,stack:c.stack};const h={message:d,cbPayload:s,success:a};try{this.getWebWindow().fin.__internal_.openerSuccessCBCalled()}catch(e){}return h.success?this:Promise.reject(h)}getAllFrames(){return this.wire.sendAction(\"get-all-frames\",this.identity).then((({payload:e})=>e.data))}getBounds(){return this.wire.sendAction(\"get-window-bounds\",this.identity).then((({payload:e})=>e.data))}center(){return this.wire.sendAction(\"center-window\",this.identity).then((()=>{}))}blur(){return this.wire.sendAction(\"blur-window\",this.identity).then((()=>{}))}bringToFront(){return this.wire.sendAction(\"bring-window-to-front\",this.identity).then((()=>{}))}animate(e,t){return this.wire.sendAction(\"animate-window\",{transitions:e,options:t,...this.identity}).then((()=>{}))}hide(){return this.wire.sendAction(\"hide-window\",this.identity).then((()=>{}))}close(e=!1){return this.wire.sendAction(\"close-window\",{force:e,...this.identity}).then((()=>{Object.setPrototypeOf(this,null)}))}focusedWebViewWasChanged(){return this.wire.sendAction(\"focused-webview-changed\",this.identity).then((()=>{}))}getNativeId(){return this.wire.sendAction(\"get-window-native-id\",this.identity).then((({payload:e})=>e.data))}async getCurrentViews(){const{payload:e}=await this.wire.sendAction(\"window-get-views\",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}disableFrame(){return console.warn(\"Function is deprecated; use disableUserMovement instead.\"),this.wire.sendAction(\"disable-window-frame\",this.identity).then((()=>{}))}disableUserMovement(){return this.wire.sendAction(\"disable-window-frame\",this.identity).then((()=>{}))}enableFrame(){return console.warn(\"Function is deprecated; use enableUserMovement instead.\"),this.wire.sendAction(\"enable-window-frame\",this.identity).then((()=>{}))}enableUserMovement(){return this.wire.sendAction(\"enable-window-frame\",this.identity).then((()=>{}))}flash(){return this.wire.sendAction(\"flash-window\",this.identity).then((()=>{}))}stopFlashing(){return this.wire.sendAction(\"stop-flash-window\",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction(\"get-window-info\",this.identity).then((({payload:e})=>e.data))}async getLayout(e){this.wire.sendAction(\"window-get-layout\",this.identity).catch((e=>{}));const t=await this.getOptions();if(!t.layout&&!t.layoutSnapshot)throw new Error(\"Window does not have a Layout\");return this.fin.Platform.Layout.wrap(e??this.identity)}getOptions(){return this.wire.sendAction(\"get-window-options\",this.identity).then((({payload:e})=>e.data))}getParentApplication(){return this.wire.sendAction(\"window-get-parent-application\",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity))}getParentWindow(){return this.wire.sendAction(\"window-get-parent-window\",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity)).then((e=>e.getWindow()))}async getSnapshot(e){const t={area:e,...this.identity};console.warn(\"Window.getSnapshot has been deprecated, please use Window.capturePage\");return(await this.wire.sendAction(\"get-window-snapshot\",t)).payload.data}getState(){return this.wire.sendAction(\"get-window-state\",this.identity).then((({payload:e})=>e.data))}getWebWindow(){return this.wire.sendAction(\"window-get-web-window\",this.identity).catch((e=>{})),this.wire.environment.getWebWindow(this.identity)}isMainWindow(){return this.wire.sendAction(\"window-is-main-window\",this.identity).catch((e=>{})),this.me.uuid===this.me.name}isShowing(){return this.wire.sendAction(\"is-window-showing\",this.identity).then((({payload:e})=>e.data))}maximize(){return this.wire.sendAction(\"maximize-window\",this.identity).then((()=>{}))}minimize(){return this.wire.sendAction(\"minimize-window\",this.identity).then((()=>{}))}moveBy(e,t,n){return this.wire.sendAction(\"move-window-by\",{deltaLeft:e,deltaTop:t,positioningOptions:n,...this.identity}).then((()=>{}))}moveTo(e,t,n){return this.wire.sendAction(\"move-window\",{left:e,top:t,positioningOptions:n,...this.identity}).then((()=>{}))}resizeBy(e,t,n,i){return this.wire.sendAction(\"resize-window-by\",{deltaWidth:Math.floor(e),deltaHeight:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}resizeTo(e,t,n,i){return this.wire.sendAction(\"resize-window\",{width:Math.floor(e),height:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}restore(){return this.wire.sendAction(\"restore-window\",this.identity).then((()=>{}))}setAsForeground(){return this.wire.sendAction(\"set-foreground-window\",this.identity).then((()=>{}))}setBounds(e,t){return this.wire.sendAction(\"set-window-bounds\",{...e,...this.identity,positioningOptions:t}).then((()=>{}))}show(e=!1){return this.wire.sendAction(\"show-window\",{force:e,...this.identity}).then((()=>{}))}showAt(e,t,n=!1){return this.wire.sendAction(\"show-at-window\",{force:n,left:Math.floor(e),top:Math.floor(t),...this.identity}).then((()=>{}))}updateOptions(e){return this.wire.sendAction(\"update-window-options\",{options:e,...this.identity}).then((()=>{}))}authenticate(e,t){return this.wire.sendAction(\"window-authenticate\",{userName:e,password:t,...this.identity}).then((()=>{}))}async showPopupMenu(e){const{payload:t}=await this.wire.sendAction(\"show-popup-menu\",{options:e,...this.identity});return t.data}async closePopupMenu(){return this.wire.sendAction(\"close-popup-menu\",{...this.identity}).then((()=>{}))}async dispatchPopupResult(e){this.wire.sendAction(\"window-dispatch-popup-result\",this.identity).catch((e=>{})),await this.wire.sendAction(\"dispatch-popup-result\",{data:e,...this.identity})}async print(e={content:\"self\"}){switch(e.content){case void 0:case\"self\":return super.print(e);case\"screenshot\":return this.wire.sendAction(\"print-screenshot\",this.identity).then((()=>{}));case\"views\":return this.wire.sendAction(\"print-views\",{...this.identity,options:e}).then((()=>{}));default:return}}}return S._Window=o,S}function ie(){return te||(te=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(function(){if(ee)return _;ee=1,Object.defineProperty(_,\"__esModule\",{value:!0}),_._WindowModule=void 0;const e=d,t=O,n=ne();class i extends e.Base{async wrap(e){this.wire.sendAction(\"window-wrap\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}wrapSync(e){this.wire.sendAction(\"window-wrap-sync\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}create(e){return this.wire.sendAction(\"create-window\").catch((e=>{})),new n._Window(this.wire,{uuid:this.me.uuid,name:e.name}).createWindow(e)}getCurrent(){if(this.wire.sendAction(\"get-current-window\").catch((e=>{})),!this.wire.me.isWindow)throw new Error(\"You are not in a Window context\");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction(\"get-current-window-sync\").catch((e=>{})),!this.wire.me.isWindow)throw new Error(\"You are not in a Window context\");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return _._WindowModule=i,_}(),e),n(ne(),e)}(M)),M}Q.promisifySubscription=async(e,t,n=(()=>!0),i)=>{let r,o,s;const a=new Promise(((e,t)=>{r=e,o=t})),c=e=>{n(e)&&(clearTimeout(s),r(e))};return await e.on(t,c),i&&(s=setTimeout((()=>o(new Error(\"event timed out\"))),i)),a.finally((()=>{e.removeListener(t,c).catch((()=>null))})),{getValue:()=>a}},Object.defineProperty(c,\"__esModule\",{value:!0}),c.System=void 0;const re=d,oe=g,se=ie(),ae=t;class ce extends re.EmitterBase{constructor(e){super(e,\"system\")}sendExternalProcessRequest(e,t){return new Promise(((n,i)=>{const r=\"external-process-exited\";let o,s,a,c;\"function\"==typeof t.listener&&(a=e=>{const n=e||{};s={topic:\"exited\",uuid:n.processUuid||\"\",exitCode:n.exitCode||0},o===e.processUuid&&(t.listener(s),c.removeListener(r,a))},this.wire.me.name||(this.wire.me.name=this.wire.me.uuid),c=new se._Window(this.wire,this.wire.me),c.on(r,a)),this.wire.sendAction(e,t).then((({payload:e})=>{o=e.data.uuid,n(e.data),s&&o===s.uuid&&(t.listener(s),c.removeListener(r,a))})).catch((e=>{c&&c.removeListener(r,a),i(e)}))}))}getVersion(){return this.wire.sendAction(\"get-version\").then((({payload:e})=>e.data))}clearCache(e){return this.wire.sendAction(\"clear-cache\",e).then((()=>{}))}deleteCacheOnExit(){return this.wire.sendAction(\"delete-cache-request\").then((()=>{}))}exit(){return this.wire.sendAction(\"exit-desktop\").then((()=>{}))}async fetchManifest(e){const{payload:{data:t}}=await this.wire.sendAction(\"fetch-manifest\",{manifestUrl:e});return t}flushCookieStore(){return this.wire.sendAction(\"flush-cookie-store\").then((()=>{}))}getAllWindows(){return this.wire.sendAction(\"get-all-windows\").then((({payload:e})=>e.data))}getAllApplications(){return this.wire.sendAction(\"get-all-applications\").then((({payload:e})=>e.data))}getCommandLineArguments(){return this.wire.sendAction(\"get-command-line-arguments\").then((({payload:e})=>e.data))}async getCrashReporterState(){const{payload:{data:{diagnosticMode:e,isRunning:t}}}=await this.wire.sendAction(\"get-crash-reporter-state\");return console.warn(\"diagnosticMode property is deprecated. It will be removed in a future version\"),{diagnosticMode:e,diagnosticsMode:e,isRunning:t}}async startCrashReporter(e){const t=e,n={...t,diagnosticMode:t.diagnosticsMode||t.diagnosticMode},{payload:{data:{diagnosticMode:i,isRunning:r}}}=await this.wire.sendAction(\"start-crash-reporter\",n);return{diagnosticMode:i,diagnosticsMode:i,isRunning:r}}getUniqueUserId(){return this.wire.sendAction(\"get-unique-user-id\").then((({payload:e})=>e.data))}getEntityInfo(e,t){return this.wire.sendAction(\"get-entity-info\",{uuid:e,name:t}).then((({payload:e})=>e.data))}getEnvironmentVariable(e){return this.wire.sendAction(\"get-environment-variable\",{environmentVariables:e}).then((({payload:e})=>e.data))}getFocusedWindow(){return this.wire.sendAction(\"get-focused-window\").then((({payload:e})=>e.data))}async isAppCertified(e){const{payload:{data:{certifiedInfo:t}}}=await this.wire.sendAction(\"is-app-certified\",{manifestUrl:e});return t}getInstalledRuntimes(){return this.wire.sendAction(\"get-installed-runtimes\").then((({payload:e})=>e.data.runtimes))}async getInstalledApps(){const{payload:{data:{installedApps:e}}}=await this.wire.sendAction(\"get-installed-apps\");return e}getLog(e){return this.wire.sendAction(\"view-log\",e).then((({payload:e})=>e.data))}getMachineId(){return this.wire.sendAction(\"get-machine-id\").then((({payload:e})=>e.data))}getMinLogLevel(){return this.wire.sendAction(\"get-min-log-level\").then((({payload:e})=>e.data))}getLogList(){return this.wire.sendAction(\"list-logs\").then((({payload:e})=>e.data))}getMonitorInfo(){return this.wire.sendAction(\"get-monitor-info\").then((({payload:e})=>e.data))}getMousePosition(){return this.wire.sendAction(\"get-mouse-position\").then((({payload:e})=>e.data))}getProcessList(){return console.warn(\"System.getProcessList has been deprecated. Please consider using our new process APIs: Window.getProcessInfo, View.getProcessInfo, Application.getProcessInfo, System.getAllProcessInfo\"),this.wire.sendAction(\"process-snapshot\").then((({payload:e})=>e.data))}async getAllProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction(\"get-all-process-info\",this.identity);return e}getProxySettings(){return this.wire.sendAction(\"get-proxy-settings\").then((({payload:e})=>e.data))}getRuntimeInfo(){return this.wire.sendAction(\"get-runtime-info\").then((({payload:e})=>e.data))}getRvmInfo(){return this.wire.sendAction(\"get-rvm-info\").then((({payload:e})=>e.data))}getHostSpecs(){return this.wire.sendAction(\"get-host-specs\").then((({payload:e})=>e.data))}getOSInfo(){return this.wire.sendAction(\"get-os-info\").then((({payload:e})=>e.data))}launchExternalProcess(e){return this.sendExternalProcessRequest(\"launch-external-process\",e)}monitorExternalProcess(e){return this.sendExternalProcessRequest(\"monitor-external-process\",e)}log(e,t){return this.wire.sendAction(\"write-to-log\",{level:e,message:t}).then((()=>{}))}openUrlWithBrowser(e){return this.wire.sendAction(\"open-url-with-browser\",{url:e}).then((()=>{}))}async registerCustomProtocol(e){if(\"object\"!=typeof e)throw new Error(\"Must provide an object with a `protocolName` property having a string value.\");await this.wire.sendAction(\"register-custom-protocol\",e)}async unregisterCustomProtocol(e){await this.wire.sendAction(\"unregister-custom-protocol\",{protocolName:e})}async getCustomProtocolState(e){return this.wire.sendAction(\"get-custom-protocol-state\",{protocolName:e}).then((({payload:e})=>e.data))}releaseExternalProcess(e){return this.wire.sendAction(\"release-external-process\",{uuid:e}).then((()=>{}))}showDeveloperTools(e){return this.wire.sendAction(\"show-developer-tools\",e).then((()=>{}))}terminateExternalProcess(e){return this.wire.sendAction(\"terminate-external-process\",e).then((()=>{}))}updateProxySettings(e){return this.wire.sendAction(\"update-proxy\",e).then((()=>{}))}async downloadAsset(e,t){const n=()=>{};let i=n,r=n;const o=new Promise(((e,t)=>{i=e,r=t}));if(\"openfin\"!==this.wire.environment.type)throw new oe.NotSupportedError(\"downloadAsset only supported in an OpenFin Render process\");const s=oe.RuntimeError.getCallSite(),a=this.wire.environment.getNextMessageId().toString(),c=`asset-download-progress-${a}`,d=`asset-download-error-${a}`,h=`asset-download-complete-${a}`,l=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},u=()=>{this.removeListener(c,l)};await Promise.all([this.on(c,l),this.once(d,(e=>{u();const{reason:t,err:n}=e;r(new oe.RuntimeError({reason:t,error:n},s))})),this.once(h,(()=>{u(),i()}))]);const p=Object.assign(e,{downloadId:a});return await this.wire.sendAction(\"download-asset\",p).catch((e=>{throw u(),e})),o}downloadRuntime(e,t){const n=oe.RuntimeError.getCallSite();return new Promise(((i,r)=>{if(\"openfin\"!==this.wire.environment.type)return void r(new oe.NotSupportedError(\"downloadRuntime only supported in an OpenFin Render process\"));const o=this.wire.environment.getNextMessageId().toString(),s=`runtime-download-progress-${o}`,a=`runtime-download-error-${o}`,c=`runtime-download-complete-${o}`,d=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},h=()=>{this.removeListener(s,d)};this.on(s,d),this.once(a,(e=>{h();const{reason:t,err:i}=e;r(new oe.RuntimeError({reason:t,error:i},n))})),this.once(c,(()=>{h(),i()}));const l=Object.assign(e,{downloadId:o});this.wire.sendAction(\"download-runtime\",l).catch((e=>{h(),r(e)}))}))}downloadPreloadScripts(e){return this.wire.sendAction(\"download-preload-scripts\",{scripts:e}).then((({payload:e})=>e.data))}getAllExternalApplications(){return this.wire.sendAction(\"get-all-external-applications\").then((({payload:e})=>e.data))}getAppAssetInfo(e){return this.wire.sendAction(\"get-app-asset-info\",e).then((({payload:e})=>e.data))}getCookies(e){const t=this.wire.environment.getUrl(),n=Object.assign(e,{url:t});return this.wire.sendAction(\"get-cookies\",n).then((({payload:e})=>e.data))}setMinLogLevel(e){return this.wire.sendAction(\"set-min-log-level\",{level:e}).then((()=>{}))}resolveUuid(e){return this.wire.sendAction(\"resolve-uuid\",{entityKey:e}).then((({payload:e})=>e.data))}executeOnRemote(e,t){return t.requestingIdentity=e,this.wire.ferryAction(t)}readRegistryValue(e,t,n){return this.wire.sendAction(\"read-registry-value\",{rootKey:e,subkey:t,value:n}).then((({payload:e})=>e.data))}registerExternalConnection(e){return this.wire.sendAction(\"register-external-connection\",{uuid:e}).then((({payload:e})=>e.data))}async getServiceConfiguration(e){if(\"string\"!=typeof e.name)throw new Error(\"Must provide an object with a `name` property having a string value\");const{name:t}=e;return this.wire.sendAction(\"get-service-configuration\",{name:t}).then((({payload:e})=>e.data))}async getSystemAppConfig(e){if(\"string\"!=typeof e)throw new Error(\"Must provide a string value for name of system app\");return this.wire.sendAction(\"get-system-app-configuration\",{name:e}).then((({payload:e})=>e.data))}async registerShutdownHandler(e){this.wire.sendAction(\"system-register-shutdown-handler\").catch((e=>{}));const{uuid:t,name:n}=this.wire.me;this.on(\"system-shutdown\",(i=>{e({proceed:()=>{this.wire.environment.raiseEvent(\"application/system-shutdown-handled\",{uuid:t,name:n,topic:\"application\"})}})}))}runRvmHealthCheck(){return this.wire.sendAction(\"run-rvm-health-check\").then((({payload:e})=>e.data))}async launchManifest(e,t={}){const{subscribe:n,...i}=t,r=i;if(n){const e=new ae.EventEmitter;n(e);const t=\"app-version-progress\",i=\"runtime-status\",o=\"app-version-complete\",s=\"app-version-error\",a=this.wire.environment.getNextMessageId().toString();r.appVersionId=a;const c=[o,t,i,s],d=e=>{const{appVersionId:t,topic:n,type:i,...r}=e;return{...r,type:c.find((e=>i.includes(e)))}},h=t=>{const n=d(t);e.emit(n.type,n)},l=()=>{this.removeListener(`${t}.${a}`,h),this.removeListener(`${i}.${a}`,h),this.removeListener(`${o}.${a}`,h),this.removeListener(`${s}.${a}`,h),this.removeListener(`${o}.${a}`,l),this.removeListener(`${s}.${a}`,l)};await Promise.all([this.on(`${t}.${a}`,h),this.on(`${i}.${a}`,h),this.once(`${o}.${a}`,h),this.once(`${s}.${a}`,h),this.once(`${o}.${a}`,l),this.once(`${s}.${a}`,l)])}return(await this.wire.sendAction(\"launch-manifest\",{manifestUrl:e,opts:r})).payload.data.manifest}async queryPermissionForCurrentContext(e){const t={uuid:this.wire.me.uuid,name:this.wire.me.name};return(await this.wire.sendAction(\"query-permission-for-current-context\",{apiName:e,identity:t})).payload.data}async enableNativeWindowIntegrationProvider(e){const{payload:t}=await this.wire.sendAction(\"enable-native-window-integration-provider\",{permissions:e});return t.data}async registerUsage({data:e,type:t}){await this.wire.sendAction(\"register-usage\",{data:e,type:t})}async getPrinters(){const{payload:e}=await this.wire.sendAction(\"system-get-printers\");return e.data}async updateProcessLoggingOptions(e){await this.wire.sendAction(\"system-update-process-logging-options\",{options:e})}async getDomainSettings(){const{payload:{data:e}}=await this.wire.sendAction(\"get-domain-settings\",this.identity);return e}async setDomainSettings(e){await this.wire.sendAction(\"set-domain-settings\",{domainSettings:e,...this.identity})}async refreshExtensions(){const{payload:e}=await this.wire.sendAction(\"refresh-extensions\");return e.data}async getInstalledExtensions(){const{payload:e}=await this.wire.sendAction(\"get-installed-extensions\");return e.data}}c.System=ce;var de={},he={};Object.defineProperty(he,\"__esModule\",{value:!0}),he.RefCounter=void 0;he.RefCounter=class{constructor(){this.topicRefMap=new Map}incRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t+1;n=i,this.topicRefMap.set(e,i)}else this.topicRefMap.set(e,1),n=1;return n}decRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t-1;this.topicRefMap.set(e,i),n=i}else n=-1;return n}actOnFirst(e,t,n){return 1===this.incRefCount(e)?t():n()}actOnLast(e,t,n){return 0===this.decRefCount(e)?t():n()}};var le={},ue={},pe={};Object.defineProperty(pe,\"__esModule\",{value:!0}),pe.ChannelBase=pe.ProtectedItems=void 0;const we=e=>async(t,n,i)=>{const r=await e(t,n,i);return void 0===r?n:r};pe.ProtectedItems=class{constructor(e,t){this.providerIdentity=e,this.close=t}};class ye{static defaultAction(e){throw new Error(`No action registered at target for ${e}`)}constructor(){this.subscriptions=new Map}async processAction(e,t,n){try{const i=this.subscriptions.has(e)?this.subscriptions.get(e):(t,n)=>(this.defaultAction??ye.defaultAction)(e,t,n),r=this.preAction?await this.preAction(e,t,n):t,o=await i(r,n);return this.postAction?await this.postAction(e,o,n):o}catch(t){if(this.errorMiddleware)return this.errorMiddleware(e,t,n);throw t}}beforeAction(e){if(this.preAction)throw new Error(\"Already registered beforeAction middleware\");this.preAction=we(e)}onError(e){if(this.errorMiddleware)throw new Error(\"Already registered error middleware\");this.errorMiddleware=e}afterAction(e){if(this.postAction)throw new Error(\"Already registered afterAction middleware\");this.postAction=we(e)}remove(e){this.subscriptions.delete(e)}setDefaultAction(e){if(this.defaultAction)throw new Error(\"default action can only be set once\");this.defaultAction=e}register(e,t){if(this.subscriptions.has(e))throw new Error(`Subscription already registered for action: ${e}. Unsubscribe before adding new subscription`);return this.subscriptions.set(e,t),!0}}pe.ChannelBase=ye;var fe,ge,me,ve=s&&s.__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)},Ce=s&&s.__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};Object.defineProperty(ue,\"__esModule\",{value:!0}),ue.ChannelClient=void 0;const be=pe,Ie=new Map;class Ee extends be.ChannelBase{static closeChannelByEndpointId(e){const t=Ie.get(e);t&&ve(t,me,\"f\").call(t)}static handleProviderDisconnect(e){for(const t of Ie.values())t.providerIdentity.channelId===e.channelId&&(t.disconnectListener(e),ve(t,me,\"f\").call(t))}constructor(e,t,n){super(),fe.set(this,void 0),ge.set(this,void 0),this.processAction=(e,t,n)=>super.processAction(e,t,n),me.set(this,(()=>{Ie.delete(this.endpointId),ve(this,ge,\"f\").close()})),Ce(this,fe,new be.ProtectedItems(e,t),\"f\"),this.disconnectListener=()=>{},this.endpointId=e.endpointId,Ce(this,ge,n,\"f\"),Ie.set(this.endpointId,this),n.receive(this.processAction)}get providerIdentity(){return ve(this,fe,\"f\").providerIdentity}async dispatch(e,t){if(ve(this,ge,\"f\").isEndpointConnected(this.providerIdentity.channelId))return ve(this,ge,\"f\").send(this.providerIdentity.channelId,e,t);throw new Error(\"The client you are trying to dispatch from is disconnected from the target provider.\")}onDisconnection(e){this.disconnectListener=t=>{try{e(t)}catch(e){throw new Error(`Error while calling the onDisconnection callback: ${e.message}`)}finally{this.disconnectListener=()=>{}}}}async disconnect(){await this.sendDisconnectAction(),ve(this,me,\"f\").call(this)}async sendDisconnectAction(){const e=ve(this,fe,\"f\");await e.close()}static async wireClose(e,t,n){const{channelName:i,uuid:r,name:o}=t;await e.sendAction(\"disconnect-from-channel\",{channelName:i,uuid:r,name:o,endpointId:n})}}ue.ChannelClient=Ee,fe=new WeakMap,ge=new WeakMap,me=new WeakMap;var xe={},Ae={};Object.defineProperty(Ae,\"__esModule\",{value:!0}),Ae.exhaustiveCheck=void 0,Ae.exhaustiveCheck=function(e,t){throw new Error(`Unsupported value: ${e}${t?`\\n Supported values are: ${t.join(\"\")}`:\"\"}`)};var Pe,Me,_e,Oe={},Se=s&&s.__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},Re=s&&s.__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)};Object.defineProperty(Oe,\"__esModule\",{value:!0}),Oe.ClassicInfo=Oe.ClassicStrategy=void 0;Oe.ClassicStrategy=class{constructor(e,t,n,i){this.messageReceiver=t,this.endpointId=n,this.providerIdentity=i,Pe.set(this,void 0),Me.set(this,new Map),_e.set(this,new Map),this.send=async(e,t,n)=>{const i=Re(this,Me,\"f\").get(e);if(!i)throw new Error(`Could not locate routing info for endpoint ${e}`);const r={...i};r.isLocalEndpointId&&delete r.endpointId,delete r.isLocalEndpointId;const o=Re(this,Pe,\"f\").sendAction(\"send-channel-message\",{...r,providerIdentity:this.providerIdentity,action:t,payload:n});Re(this,_e,\"f\").get(e)?.add(o);return(await o.catch((e=>{throw new Error(e.message)})).finally((()=>{Re(this,_e,\"f\").get(e)?.delete(o)}))).payload.data.result},this.close=async()=>{this.messageReceiver.removeEndpoint(this.providerIdentity.channelId,this.endpointId),[...Re(this,Me,\"f\").keys()].forEach((e=>this.closeEndpoint(e))),Se(this,Me,new Map,\"f\")},Se(this,Pe,e,\"f\")}onEndpointDisconnect(e,t){}receive(e){this.messageReceiver.addEndpoint(e,this.providerIdentity.channelId,this.endpointId)}async closeEndpoint(e){const t=Re(this,Me,\"f\").get(e);Re(this,Me,\"f\").delete(e);const n=Re(this,_e,\"f\").get(e);n?.forEach((n=>{const i=`Channel connection with identity uuid: ${t?.uuid} / name: ${t?.name} / endpointId: ${e} no longer connected.`;n.cancel(new Error(i))}))}isEndpointConnected(e){return Re(this,Me,\"f\").has(e)}addEndpoint(e,t){Re(this,Me,\"f\").set(e,t.endpointIdentity),Re(this,_e,\"f\").set(e,new Set)}isValidEndpointPayload(e){return\"string\"==typeof e?.endpointIdentity?.endpointId||\"string\"==typeof e?.endpointIdentity?.channelId}},Pe=new WeakMap,Me=new WeakMap,_e=new WeakMap,Oe.ClassicInfo={version:5,minimumVersion:0,type:\"classic\"};var Fe={},je={},ke={};Object.defineProperty(ke,\"__esModule\",{value:!0}),ke.errorToPOJO=void 0,ke.errorToPOJO=function(e){return{stack:e.stack,name:e.name,message:e.message,toString:()=>e.stack||e.toString()}};var Le,Te,$e=s&&s.__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)},Be=s&&s.__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};Object.defineProperty(je,\"__esModule\",{value:!0}),je.RTCEndpoint=void 0;const Ge=ke;je.RTCEndpoint=class{static isValidEndpointPayload(e){const t=e=>\"object\"==typeof e&&null!==e;return t(e)&&t(e.endpointIdentity)&&t(e.rtc)&&\"string\"==typeof e.endpointIdentity.endpointId}constructor({rtc:e,endpointIdentity:t}){this.responseMap=new Map,Le.set(this,null),Te.set(this,void 0),this.connectionStateChangeHandler=e=>{\"connected\"!==this.rtc.rtcClient.connectionState&&(this.rtc.rtcClient.removeEventListener(\"connectionstatechange\",this.connectionStateChangeHandler),this.close(),$e(this,Te,\"f\")&&$e(this,Te,\"f\").call(this))},this.send=async(e,t)=>{const n=`message-${Math.random()}`,i=new Promise(((e,t)=>{this.responseMap.set(n,{resolve:e,reject:t})}));return this.rtc.channels.request.send(JSON.stringify({action:e,payload:t,messageId:n})),i},this.close=()=>{this.responseMap.forEach((e=>e.reject(\"Connection has closed.\"))),this.responseMap=new Map,this.rtc.channels.request.close(),this.rtc.channels.response.close(),this.rtc.rtcClient.close()},this.rtc=e,this.endpointIdentity=t,this.rtc.channels.response.addEventListener(\"message\",(e=>{let{data:t}=e;e.data instanceof ArrayBuffer&&(t=(new TextDecoder).decode(e.data));const{messageId:n,payload:i,success:r,error:o}=JSON.parse(t),{resolve:s,reject:a}=this.responseMap.get(n)??{};s&&a?(this.responseMap.delete(n),r?s(i):a(o)):(console.log(\"Could not find id in responseMap.\"),console.log(e))})),this.rtc.channels.request.addEventListener(\"message\",(async e=>{let{data:n}=e;e.data instanceof ArrayBuffer&&(n=(new TextDecoder).decode(e.data));const{messageId:i,action:r,payload:o}=JSON.parse(n);if($e(this,Le,\"f\"))try{const e=await $e(this,Le,\"f\").call(this,r,o,t);this.rtc.channels.response.send(JSON.stringify({messageId:i,payload:e,success:!0}))}catch(e){\"open\"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,error:(0,Ge.errorToPOJO)(e),success:!1}))}else\"open\"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,success:!1,error:\"Connection not ready.\"}))})),this.rtc.rtcClient.addEventListener(\"connectionstatechange\",this.connectionStateChangeHandler),Object.values(this.rtc.channels).forEach((e=>{e.onclose=e=>{[...this.responseMap.values()].forEach((e=>e.reject(new Error(\"RTCDataChannel closed unexpectedly, this is most commonly caused by message size. Note: RTC Channels have a message size limit of ~255kB.\")))),this.close(),$e(this,Te,\"f\")&&$e(this,Te,\"f\").call(this)}}))}onDisconnect(e){if($e(this,Te,\"f\"))throw new Error(\"RTCEndpoint disconnectListener cannot be set twice.\");Be(this,Te,e,\"f\")}receive(e){if($e(this,Le,\"f\"))throw new Error(\"You have already set a listener for this RTC Endpoint.\");Be(this,Le,e,\"f\")}get connected(){return\"connected\"===this.rtc.rtcClient.connectionState}},Le=new WeakMap,Te=new WeakMap;var We,He,Ne,De={},Ue=s&&s.__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)},Ve=s&&s.__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};Object.defineProperty(De,\"__esModule\",{value:!0}),De.EndpointStrategy=void 0;De.EndpointStrategy=class{constructor(e,t,n){this.EndpointType=e,this.StrategyName=n,We.set(this,null),He.set(this,new Map),Ne.set(this,!0),this.send=async(e,t,n)=>this.getEndpointById(e).send(t,n),this.close=async()=>{Ue(this,Ne,\"f\")&&(Ue(this,He,\"f\").forEach((e=>e.close())),Ve(this,He,new Map,\"f\")),Ve(this,Ne,!1,\"f\")},this.isValidEndpointPayload=t}onEndpointDisconnect(e,t){this.getEndpointById(e).onDisconnect(t)}receive(e){if(Ue(this,We,\"f\"))throw new Error(`You have already set a listener for this ${this.StrategyName} Strategy`);Ve(this,We,e,\"f\"),Ue(this,He,\"f\").forEach((e=>e.receive(Ue(this,We,\"f\"))))}getEndpointById(e){const t=Ue(this,He,\"f\").get(e);if(!t)throw new Error(`Client with endpoint id ${e} is not connected`);return t}get connected(){return Ue(this,Ne,\"f\")}isEndpointConnected(e){return Ue(this,He,\"f\").has(e)}addEndpoint(e,t){if(!Ue(this,Ne,\"f\"))return void console.warn(`Adding endpoint to disconnected ${this.StrategyName} Strategy`);const n=new this.EndpointType(t);Ue(this,We,\"f\")&&n.receive(Ue(this,We,\"f\")),Ue(this,He,\"f\").set(e,n)}async closeEndpoint(e){Ue(this,He,\"f\").delete(e)}},We=new WeakMap,He=new WeakMap,Ne=new WeakMap,Object.defineProperty(Fe,\"__esModule\",{value:!0}),Fe.RTCInfo=Fe.RTCStrategy=void 0;const ze=je,Ke=De;class qe extends Ke.EndpointStrategy{constructor(){super(ze.RTCEndpoint,ze.RTCEndpoint.isValidEndpointPayload,\"RTC\")}}Fe.RTCStrategy=qe,Fe.RTCInfo={version:2,minimumVersion:0,type:\"rtc\"};var Je={};Object.defineProperty(Je,\"__esModule\",{value:!0}),Je.RTCICEManager=void 0;const Ye=d;class Ze extends Ye.EmitterBase{constructor(e){super(e,\"channel\"),this.ensureChannelOpened=e=>new Promise(((t,n)=>{if(\"open\"===e.readyState)t();else if(\"connecting\"===e.readyState){const n=()=>{e.removeEventListener(\"open\",n),t()};e.addEventListener(\"open\",n)}else n(new Error(\"This Channel has already closed\"))}))}static createDataChannelPromise(e,t){let n;const i=new Promise((e=>{n=e})),r=i=>{const o=()=>{i.channel.removeEventListener(\"open\",o),n(i.channel)};i.channel.label===e&&(i.channel.addEventListener(\"open\",o),t.removeEventListener(\"datachannel\",r))};return t.addEventListener(\"datachannel\",r),i}async listenForProviderIce(e,t){await this.on(this.createProviderEventName(e),t,{timestamp:Date.now()})}async raiseProviderIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createProviderEventName(e)),t)}async listenForClientIce(e,t){await this.on(this.createClientEventName(e),t,{timestamp:Date.now()})}async raiseClientIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createClientEventName(e)),t)}cleanupIceListeners(e){this.removeAllListeners(this.createClientEventName(e)),this.removeAllListeners(this.createProviderEventName(e))}createClientEventName(e){return`ice-client-${e}`}createProviderEventName(e){return`ice-provider-${e}`}createRouteString(e){return`channel/${e}`}createRtcPeer(){return this.wire.environment.getRtcPeer()}async startClientOffer(){const e=Math.random().toString(),t=this.createRtcPeer();t.addEventListener(\"icecandidate\",(async t=>{t.candidate&&await this.raiseClientIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForProviderIce(e,(async e=>{await t.addIceCandidate(e.candidate)}));const n={request:t.createDataChannel(\"request\"),response:t.createDataChannel(\"response\")},i=await t.createOffer();await t.setLocalDescription(i);const r=Promise.all([n.request,n.response].map(this.ensureChannelOpened)).then((()=>{}));return{rtcClient:t,channels:n,offer:i,rtcConnectionId:e,channelsOpened:r}}async finishClientOffer(e,t,n){return await e.setRemoteDescription(t),await n,!0}async createProviderAnswer(e,t){const n=this.createRtcPeer(),i=Ze.createDataChannelPromise(\"request\",n),r=Ze.createDataChannelPromise(\"response\",n);n.addEventListener(\"icecandidate\",(async t=>{t.candidate&&await this.raiseProviderIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForClientIce(e,(async e=>{await n.addIceCandidate(e.candidate)})),await n.setRemoteDescription(t);const o=await n.createAnswer();await n.setLocalDescription(o);const s=Promise.all([i,r]).then((([t,n])=>(this.cleanupIceListeners(e),{request:t,response:n})));return{rtcClient:n,answer:o,channels:s}}}Je.RTCICEManager=Ze;var Qe={},Xe={};function et(e){return[...e.split(\".\").reverse().entries()].reduce(((e,[t,n])=>e+ +n*1e4**t),0)}function tt(e,t){return et(e)>=et(t)}function nt(e){return e.split(\"/\")[0]}Object.defineProperty(Xe,\"__esModule\",{value:!0}),Xe.runtimeUuidMeetsMinimumRuntimeVersion=Xe.parseRuntimeUuid=Xe.meetsMinimumRuntimeVersion=void 0,Xe.meetsMinimumRuntimeVersion=tt,Xe.parseRuntimeUuid=nt,Xe.runtimeUuidMeetsMinimumRuntimeVersion=function(e,t){return tt(nt(e),t)};var it,rt,ot,st,at,ct=s&&s.__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)},dt=s&&s.__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};Object.defineProperty(Qe,\"__esModule\",{value:!0}),Qe.ChannelProvider=void 0;const ht=pe,lt=Xe;class ut extends ht.ChannelBase{get connections(){return[...ct(this,it,\"f\")]}static handleClientDisconnection(e,t){const n=e.connections.find((e=>e.endpointId===t.endpointId));if(n)ct(e,st,\"f\").call(e,n);else{e.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name)).forEach(ct(e,st,\"f\"))}e.disconnectListener(t)}static setProviderRemoval(e,t){ut.removalMap.set(e,t)}constructor(e,t,n){super(),it.set(this,void 0),rt.set(this,void 0),ot.set(this,void 0),st.set(this,(e=>{const t=this.connections.filter((t=>t.endpointId!==e.endpointId));ct(this,ot,\"f\").closeEndpoint(e.endpointId),dt(this,it,t,\"f\")})),this.processAction=async(e,t,n)=>(ut.clientIsMultiRuntime(n)&&!(0,lt.runtimeUuidMeetsMinimumRuntimeVersion)(n.runtimeUuid,\"18.87.56.0\")?this.handleMultiRuntimeLegacyClient(n):this.checkForClientConnection(n),super.processAction(e,t,n)),at.set(this,(()=>{ct(this,ot,\"f\").close();const e=ut.removalMap.get(this);e&&e()})),dt(this,rt,new ht.ProtectedItems(e,t),\"f\"),this.connectListener=()=>{},this.disconnectListener=()=>{},dt(this,it,[],\"f\"),dt(this,ot,n,\"f\"),n.receive(this.processAction)}dispatch(e,t,n){const i=e.endpointId??this.getEndpointIdForOpenFinId(e,t);return i&&ct(this,ot,\"f\").isEndpointConnected(i)?ct(this,ot,\"f\").send(i,t,n):Promise.reject(new Error(`Client connection with identity uuid: ${e.uuid} / name: ${e.name} / endpointId: ${i} no longer connected.`))}async processConnection(e,t){return ct(this,it,\"f\").push(e),this.connectListener(e,t)}publish(e,t){return this.connections.map((n=>ct(this,ot,\"f\").send(n.endpointId,e,t)))}onConnection(e){this.connectListener=e}onDisconnection(e){this.disconnectListener=e}async destroy(){const e=ct(this,rt,\"f\");e.providerIdentity,dt(this,it,[],\"f\"),await e.close(),ct(this,at,\"f\").call(this)}async getAllClientInfo(){return this.connections.map((e=>{const{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}=e;return{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}}))}checkForClientConnection(e){if(!this.isClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider.\\n Client Identity: {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}isClientConnected(e){return ut.clientIdentityIncludesEndpointId(e)?this.connections.some((t=>t.endpointId===e.endpointId&&t.uuid===e.uuid&&t.name===e.name)):this.isLegacyClientConnected(e)}isLegacyClientConnected(e){return this.connections.some((t=>t.uuid===e.uuid&&t.name===e.name))}handleMultiRuntimeLegacyClient(e){if(!this.isLegacyClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider. Client Identity:\\n {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}getEndpointIdForOpenFinId(e,t){const n=this.connections.filter((t=>t.name===e.name&&t.uuid===e.uuid));if(n.length>=2){const n=ct(this,rt,\"f\"),{uuid:i,name:r}=e,o=n?.providerIdentity.uuid,s=n?.providerIdentity.name;console.warn(`WARNING: Dispatch call may have unintended results. The \"to\" argument of your dispatch call is missing the\\n \"endpointId\" parameter. The identity you are dispatching to ({uuid: ${i}, name: ${r}})\\n has multiple channelClients for this channel. Your dispatched action: (${t}) from the provider:\\n ({uuid: ${o}, name: ${s}}) will only be processed by the most recently-created client.`)}return n.pop()?.endpointId}static clientIdentityIncludesEndpointId(e){return void 0!==e.endpointId}static clientIsMultiRuntime(e){return void 0!==e.runtimeUuid}static async wireClose(e,t){await e.sendAction(\"destroy-channel\",{channelName:t})}}Qe.ChannelProvider=ut,it=new WeakMap,rt=new WeakMap,ot=new WeakMap,st=new WeakMap,at=new WeakMap,ut.removalMap=new WeakMap;var pt={};Object.defineProperty(pt,\"__esModule\",{value:!0}),pt.MessageReceiver=void 0;const wt=ue,yt=d;class ft extends yt.Base{constructor(e){super(e),this.onmessage=e=>\"process-channel-message\"===e.action&&(this.processChannelMessage(e),!0),this.endpointMap=new Map,this.latestEndpointIdByChannelId=new Map,e.registerMessageHandler(this.onmessage.bind(this))}async processChannelMessage(e){const{senderIdentity:t,providerIdentity:n,action:i,ackToSender:r,payload:o,intendedTargetIdentity:s}=e.payload,a=s.channelId??s.endpointId??this.latestEndpointIdByChannelId.get(n.channelId),c=this.endpointMap.get(a);if(!c)return r.payload.success=!1,r.payload.reason=`Client connection with identity uuid: ${this.wire.me.uuid} / name: ${this.wire.me.name} / endpointId: ${a} no longer connected.`,this.wire.sendRaw(r);try{const e=await c(i,o,t);return r.payload.payload=r.payload.payload||{},r.payload.payload.result=e,this.wire.sendRaw(r)}catch(e){return r.payload.success=!1,r.payload.reason=e.message,this.wire.sendRaw(r)}}addEndpoint(e,t,n){this.endpointMap.set(n,e),t!==n&&this.latestEndpointIdByChannelId.set(t,n)}removeEndpoint(e,t){this.endpointMap.delete(t),this.latestEndpointIdByChannelId.get(e)===t&&this.latestEndpointIdByChannelId.delete(e)}checkForPreviousClientConnection(e){const t=this.latestEndpointIdByChannelId.get(e);t&&(wt.ChannelClient.closeChannelByEndpointId(t),console.warn(\"You have created a second connection to an older provider. First connection has been removed from the clientMap\"),console.warn(\"If the provider calls publish(), you may receive multiple messages.\"))}}pt.MessageReceiver=ft;var gt={};Object.defineProperty(gt,\"__esModule\",{value:!0}),gt.ProtocolManager=void 0;gt.ProtocolManager=class{constructor(e){this.ProtocolsInPreferenceOrder=e,this.DefaultClientProtocols=[\"classic\"],this.DefaultProviderProtocols=[\"classic\"],this.getClientProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultClientProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(\", \")}.`);return t},this.getProviderProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultProviderProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(\", \")}.`);return t},this.getCompatibleProtocols=(e,t)=>t.supportedProtocols.filter((t=>e.some((e=>e.type===t.type&&t.version>=e.minimumVersion&&e.version>=(t.minimumVersion??0))))).slice(0,t.maxProtocols)}};var mt={};Object.defineProperty(mt,\"__esModule\",{value:!0});class vt{static combine(e,t){return new vt(e,t)}constructor(e,t){this.primary=e,this.secondary=t}onEndpointDisconnect(e,t){this.primary.onEndpointDisconnect(e,(()=>{this.secondary.isEndpointConnected(e)||t()})),this.secondary.onEndpointDisconnect(e,(()=>{this.primary.isEndpointConnected(e)||t()}))}isValidEndpointPayload(e){return this.primary.isValidEndpointPayload(e)||this.secondary.isValidEndpointPayload(e)}async closeEndpoint(e){await this.primary.closeEndpoint(e),await this.secondary.closeEndpoint(e)}isEndpointConnected(e){return this.primary.isEndpointConnected(e)||this.secondary.isEndpointConnected(e)}async addEndpoint(e,t){this.primary.isValidEndpointPayload(t)&&await this.primary.addEndpoint(e,t),this.secondary.isValidEndpointPayload(t)&&await this.secondary.addEndpoint(e,t)}receive(e){this.primary.receive(e),this.secondary.receive(e)}send(e,t,n){return this.primary.isEndpointConnected(e)?this.primary.send(e,t,n):this.secondary.send(e,t,n)}async close(){await Promise.all([this.primary.close(),this.secondary.close()])}}mt.default=vt;var Ct,bt,It=s&&s.__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},Et=s&&s.__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)},xt=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(xe,\"__esModule\",{value:!0}),xe.ConnectionManager=void 0;const At=Ae,Pt=d,Mt=Oe,_t=Fe,Ot=Je,St=Qe,Rt=pt,Ft=gt,jt=xt(mt);class kt extends Pt.Base{static getProtocolOptionsFromStrings(e){return e.map((e=>{switch(e){case\"rtc\":return _t.RTCInfo;case\"classic\":return Mt.ClassicInfo;default:return(0,At.exhaustiveCheck)(e,[\"rtc\",\"classic\"])}}))}constructor(e){super(e),Ct.set(this,void 0),bt.set(this,void 0),this.removeChannelFromProviderMap=e=>{this.providerMap.delete(e)},this.onmessage=e=>\"process-channel-connection\"===e.action&&(this.processChannelConnection(e),!0),this.providerMap=new Map,this.protocolManager=new Ft.ProtocolManager(\"node\"===this.wire.environment.type?[\"classic\"]:[\"rtc\",\"classic\"]),It(this,Ct,new Rt.MessageReceiver(e),\"f\"),It(this,bt,new Ot.RTCICEManager(e),\"f\"),e.registerMessageHandler(this.onmessage.bind(this))}createProvider(e,t){const n=Object.assign(this.wire.environment.getDefaultChannelOptions().create,e||{}),i=this.protocolManager.getProviderProtocols(n?.protocols),r=i.map((e=>{switch(e){case\"rtc\":return new _t.RTCStrategy;case\"classic\":return new Mt.ClassicStrategy(this.wire,Et(this,Ct,\"f\"),t.channelId,t);default:return(0,At.exhaustiveCheck)(e,[\"rtc\",\"classic\"])}}));let o;if(2===r.length){const[e,t]=r;o=jt.default.combine(e,t)}else{if(1!==r.length)throw new Error(\"failed to combine strategies\");[o]=r}const s=new St.ChannelProvider(t,(()=>St.ChannelProvider.wireClose(this.wire,t.channelName)),o),a=t.channelId;return this.providerMap.set(a,{provider:s,strategy:o,supportedProtocols:kt.getProtocolOptionsFromStrings(i)}),St.ChannelProvider.setProviderRemoval(s,this.removeChannelFromProviderMap.bind(this)),s}async createClientOffer(e){const t=this.protocolManager.getClientProtocols(e?.protocols);let n;return{offer:{supportedProtocols:await Promise.all(t.map((async e=>{switch(e){case\"rtc\":{const{rtcClient:e,channels:t,offer:i,rtcConnectionId:r,channelsOpened:o}=await Et(this,bt,\"f\").startClientOffer();return n={rtcClient:e,channels:t,channelsOpened:o},{type:\"rtc\",version:_t.RTCInfo.version,payload:{offer:i,rtcConnectionId:r}}}case\"classic\":return{type:\"classic\",version:Mt.ClassicInfo.version};default:return(0,At.exhaustiveCheck)(e,[\"rtc\",\"classic\"])}}))),maxProtocols:2},rtc:n}}async createClientStrategy(e,t){t.endpointId||(t.endpointId=this.wire.environment.getNextMessageId(),Et(this,Ct,\"f\").checkForPreviousClientConnection(t.channelId));const n=t.answer??{supportedProtocols:[{type:\"classic\",version:1}]},i=(await Promise.all(n.supportedProtocols.map((async n=>\"rtc\"===n.type&&e?(await Et(this,bt,\"f\").finishClientOffer(e.rtcClient,n.payload.answer,e.channelsOpened),new _t.RTCStrategy):\"classic\"===n.type?new Mt.ClassicStrategy(this.wire,Et(this,Ct,\"f\"),t.endpointId,t):null)))).filter((e=>null!==e));let r;if(e&&!i.some((e=>e instanceof _t.RTCStrategy))&&e&&e.rtcClient.close(),i.length>=2)r=jt.default.combine(i[0],i[1]);else{if(!i.length)throw new Error(\"No compatible protocols\");[r]=i}const o={endpointIdentity:t,rtc:e};return r.addEndpoint(t.channelId,o),r}async processChannelConnection(e){const{clientIdentity:t,providerIdentity:n,ackToSender:i,payload:r,offer:o}=e.payload;t.endpointId?t.isLocalEndpointId=!1:(t.endpointId=this.wire.environment.getNextMessageId(),t.isLocalEndpointId=!0);const s=n.channelId,a=this.providerMap.get(s);if(!a)return i.payload.success=!1,i.payload.reason=`Channel \"${n.channelName}\" has been destroyed.`,this.wire.sendRaw(i);const{provider:c,strategy:d,supportedProtocols:h}=a;try{if(!(c instanceof St.ChannelProvider))throw Error(\"Cannot connect to a channel client\");const e=o??{supportedProtocols:[{type:\"classic\",version:1}],maxProtocols:1},n=this.protocolManager.getCompatibleProtocols(h,e);if(!n.length)throw new Error(\"This provider does not support any of the offered protocols.\");const s=await c.processConnection(t,r);i.payload.payload=i.payload.payload||{};let a={supportedProtocols:[],endpointPayloadPromise:Promise.resolve({endpointIdentity:t})};return a=await n.reduce((async(e,t)=>{const n=await e;if(\"rtc\"===t.type){const{answer:e,rtcClient:i,channels:r}=await Et(this,bt,\"f\").createProviderAnswer(t.payload.rtcConnectionId,t.payload.offer);n.supportedProtocols.push({type:\"rtc\",version:_t.RTCInfo.version,payload:{answer:e}}),n.endpointPayloadPromise=n.endpointPayloadPromise.then((e=>r.then((t=>({...e,rtc:{rtcClient:i,channels:t}})))))}else n.supportedProtocols.push({type:\"classic\",version:Mt.ClassicInfo.version});return n}),Promise.resolve(a)),a.endpointPayloadPromise.then((e=>d.addEndpoint(t.endpointId,e))),i.payload.payload.result=s,i.payload.payload.answer=a,this.wire.sendRaw(i)}catch(e){return i.payload.success=!1,i.payload.reason=e.message,this.wire.sendRaw(i)}}}xe.ConnectionManager=kt,Ct=new WeakMap,bt=new WeakMap;var Lt,Tt,$t,Bt=s&&s.__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},Gt=s&&s.__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)};Object.defineProperty(le,\"__esModule\",{value:!0}),le.Channel=void 0;const Wt=t,Ht=G,Nt=d,Dt=ue,Ut=xe,Vt=Qe;function zt(e){const t=Math.floor(e/10),n=Math.min(3e4,500*2**t);return new Promise((e=>{setTimeout((()=>{e(!1)}),n)}))}class Kt extends Nt.EmitterBase{constructor(e){super(e,\"channel\"),Lt.set(this,void 0),Tt.set(this,new Wt.EventEmitter),$t.set(this,new Ht.AsyncRetryableLazy((async()=>{await Promise.all([this.on(\"disconnected\",(e=>{Dt.ChannelClient.handleProviderDisconnect(e)})),this.on(\"connected\",((...e)=>{Gt(this,Tt,\"f\").emit(\"connected\",...e)}))]).catch((()=>new Error(\"error setting up channel connection listeners\")))}))),Bt(this,Lt,new Ut.ConnectionManager(e),\"f\")}async getAllChannels(){return this.wire.sendAction(\"get-all-channels\").then((({payload:e})=>e.data))}async onChannelConnect(e){await this.on(\"connected\",e)}async onChannelDisconnect(e){await this.on(\"disconnected\",e)}async safeConnect(e,t,n){const i={count:0};do{let r=()=>{};const o=new Promise((t=>{r=n=>{e===n.channelName&&t(!0)},Gt(this,Tt,\"f\").on(\"connected\",r)}));try{if(i.count>0){i.gotConnectedEvent=await Promise.race([zt(i.count),o]);const t=await this.wire.sendAction(\"connect-to-channel\",{...n,retryInfo:i});return console.log(`Successfully connected to channelName: ${e}`),t.payload.data}const t=this.wire.sendAction(\"connect-to-channel\",n);i.originalMessageId=t.messageId;return(await t).payload.data}catch(n){if(!n.message.includes(\"internal-nack\"))throw n;t&&0===i.count&&console.warn(`No channel found for channelName: ${e}. Waiting for connection...`)}finally{i.count+=1,Gt(this,Tt,\"f\").removeListener(\"connected\",r)}}while(t);throw new Error(`No channel found for channelName: ${e}.`)}async connect(e,t={}){if(await Gt(this,$t,\"f\").getValue(),!e||\"string\"!=typeof e)throw new Error(\"Please provide a channelName string to connect to a channel.\");const n={wait:!0,...this.wire.environment.getDefaultChannelOptions().connect,...t},{offer:i,rtc:r}=await Gt(this,Lt,\"f\").createClientOffer(n);let o;(this.fin.me.isFrame||this.fin.me.isView||this.fin.me.isWindow)&&(o=(await this.fin.me.getInfo()).url);const s={channelName:e,...n,offer:i,connectionUrl:o},a=await this.safeConnect(e,n.wait,s),c=await Gt(this,Lt,\"f\").createClientStrategy(r,a),d=new Dt.ChannelClient(a,(()=>Dt.ChannelClient.wireClose(this.wire,a,a.endpointId)),c);return c.onEndpointDisconnect(a.channelId,(async()=>{try{await d.sendDisconnectAction()}catch(e){console.warn(`Something went wrong during disconnect for client with uuid: ${a.uuid} / name: ${a.name} / endpointId: ${a.endpointId}.`)}finally{Dt.ChannelClient.handleProviderDisconnect(a)}})),d}async create(e,t){if(!e)throw new Error(\"Please provide a channelName to create a channel\");const{payload:{data:n}}=await this.wire.sendAction(\"create-channel\",{channelName:e}),i=Gt(this,Lt,\"f\").createProvider(t,n);return this.on(\"client-disconnected\",(t=>{t.channelName===e&&Vt.ChannelProvider.handleClientDisconnection(i,t)})),i}}le.Channel=Kt,Lt=new WeakMap,Tt=new WeakMap,$t=new WeakMap,Object.defineProperty(de,\"__esModule\",{value:!0}),de.InterAppPayload=de.InterApplicationBus=void 0;const qt=t,Jt=d,Yt=he,Zt=le,Qt=O;class Xt extends Jt.Base{constructor(e){super(e),this.events={subscriberAdded:\"subscriber-added\",subscriberRemoved:\"subscriber-removed\"},this.refCounter=new Yt.RefCounter,this.Channel=new Zt.Channel(e),this.emitter=new qt.EventEmitter,e.registerMessageHandler(this.onmessage.bind(this)),this.on=this.emitter.on.bind(this.emitter),this.removeAllListeners=this.emitter.removeAllListeners.bind(this.emitter)}async publish(e,t){await this.wire.sendAction(\"publish-message\",{topic:e,message:t,sourceWindowName:this.me.name})}async send(e,t,n){const i=(0,Qt.validateIdentity)(e);if(i)throw new Error(i);await this.wire.sendAction(\"send-message\",{destinationUuid:e.uuid,destinationWindowName:e.name,topic:t,message:n,sourceWindowName:this.me.name})}subscribe(e,t,n){const i=this.createSubscriptionKey(e.uuid,e.name||\"*\",t);return this.emitter.on(i,n),this.refCounter.actOnFirst(i,(async()=>{await this.wire.sendAction(\"subscribe\",{sourceUuid:e.uuid,sourceWindowName:e.name||\"*\",topic:t,destinationWindowName:this.me.name})}),(()=>Promise.resolve()))}unsubscribe(e,t,n){const i=e.name||\"*\",r=this.createSubscriptionKey(e.uuid,i,t);return this.emitter.removeListener(r,n),this.refCounter.actOnLast(r,(async()=>{await this.wire.sendAction(\"unsubscribe\",{sourceUuid:e.uuid,sourceWindowName:i,topic:t,destinationWindowName:this.me.name})}),(()=>new Promise((e=>e)).then((()=>{}))))}processMessage(e){const{payload:{message:t,sourceWindowName:n,sourceUuid:i,topic:r}}=e,o=[this.createSubscriptionKey(i,n,r),this.createSubscriptionKey(i,\"*\",r),this.createSubscriptionKey(\"*\",\"*\",r)],s={uuid:i,name:n};o.forEach((e=>{this.emitter.emit(e,t,s)}))}emitSubscriverEvent(e,t){const{payload:{targetName:n,uuid:i,topic:r}}=t,o={name:n,uuid:i,topic:r};this.emitter.emit(e,o)}createSubscriptionKey(e,t,n){const i=t||\"*\";if(!(e&&i&&n))throw new Error(\"Missing uuid, name, or topic string\");return function(...e){return e.map((e=>Buffer.from(`${e}`).toString(\"base64\"))).join(\"/\")}(e,i,n)}onmessage(e){const{action:t}=e;switch(t){case\"process-message\":this.processMessage(e);break;case this.events.subscriberAdded:this.emitSubscriverEvent(this.events.subscriberAdded,e);break;case this.events.subscriberRemoved:this.emitSubscriverEvent(this.events.subscriberRemoved,e)}return!0}}de.InterApplicationBus=Xt;de.InterAppPayload=class{};var en={};Object.defineProperty(en,\"__esModule\",{value:!0}),en.Clipboard=void 0;const tn=d;class nn extends tn.Base{async writeText(e){await this.wire.sendAction(\"clipboard-write-text\",e)}async readText(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-text\",{type:e});return t.data}async writeImage(e){await this.wire.sendAction(\"clipboard-write-image\",e)}async readImage(e={format:\"dataURL\"}){const{payload:t}=await this.wire.sendAction(\"clipboard-read-image\",e);return t.data}async writeHtml(e){await this.wire.sendAction(\"clipboard-write-html\",e)}async readHtml(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-html\",{type:e});return t.data}async writeRtf(e){await this.wire.sendAction(\"clipboard-write-rtf\",e)}async readRtf(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-rtf\",{type:e});return t.data}async write(e){await this.wire.sendAction(\"clipboard-write\",e)}async getAvailableFormats(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-formats\",{type:e});return t.data}}en.Clipboard=nn;var rn={},on={},sn={};Object.defineProperty(sn,\"__esModule\",{value:!0}),sn.ExternalApplication=void 0;const an=d;class cn extends an.EmitterBase{constructor(e,t){super(e,\"external-application\",t.uuid),this.identity=t}getInfo(){return this.wire.sendAction(\"get-external-application-info\",this.identity).then((({payload:e})=>e.data))}}sn.ExternalApplication=cn,Object.defineProperty(on,\"__esModule\",{value:!0}),on.ExternalApplicationModule=void 0;const dn=d,hn=sn;class ln extends dn.Base{wrap(e){return this.wire.sendAction(\"external-application-wrap\").catch((e=>{})),Promise.resolve(new hn.ExternalApplication(this.wire,{uuid:e}))}wrapSync(e){return this.wire.sendAction(\"external-application-wrap-sync\").catch((e=>{})),new hn.ExternalApplication(this.wire,{uuid:e})}}on.ExternalApplicationModule=ln,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(on,e),n(sn,e)}(rn);var un={},pn={},wn={};Object.defineProperty(wn,\"__esModule\",{value:!0}),wn._Frame=void 0;const yn=d;class fn extends yn.EmitterBase{constructor(e,t){super(e,\"frame\",t.uuid,t.name),this.identity=t}getInfo(){return this.wire.sendAction(\"get-frame-info\",this.identity).then((({payload:e})=>e.data))}getParentWindow(){return this.wire.sendAction(\"get-parent-window\",this.identity).then((({payload:e})=>e.data))}}wn._Frame=fn,Object.defineProperty(pn,\"__esModule\",{value:!0}),pn._FrameModule=void 0;const gn=d,mn=O,vn=wn;class Cn extends gn.Base{async wrap(e){this.wire.sendAction(\"frame-wrap\").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}wrapSync(e){this.wire.sendAction(\"frame-wrap-sync\").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}getCurrent(){return this.wire.sendAction(\"frame-get-current\").catch((e=>{})),Promise.resolve(new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity()))}getCurrentSync(){return this.wire.sendAction(\"frame-get-current-sync\").catch((e=>{})),new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity())}}pn._FrameModule=Cn,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(pn,e),n(wn,e)}(un);var bn={};Object.defineProperty(bn,\"__esModule\",{value:!0}),bn.GlobalHotkey=void 0;const In=d;class En extends In.EmitterBase{constructor(e){super(e,\"global-hotkey\")}async register(e,t){await this.on(e,t),await this.wire.sendAction(\"global-hotkey-register\",{hotkey:e})}async unregister(e){await this.removeAllListeners(e),await this.wire.sendAction(\"global-hotkey-unregister\",{hotkey:e})}async unregisterAll(){await Promise.all(this.eventNames().filter((e=>!(\"registered\"===e||\"unregistered\"===e))).map((e=>this.removeAllListeners(e)))),await this.wire.sendAction(\"global-hotkey-unregister-all\",{})}async isRegistered(e){const{payload:{data:t}}=await this.wire.sendAction(\"global-hotkey-is-registered\",{hotkey:e});return t}}bn.GlobalHotkey=En;var xn,An={},Pn={},Mn={},_n=s&&s.__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)};Object.defineProperty(Mn,\"__esModule\",{value:!0}),Mn.Platform=void 0;const On=d,Sn=O,Rn=new Map;class Fn extends On.EmitterBase{constructor(e,t){super(t.wire,\"application\",e.uuid),this.getClient=e=>{this.wire.sendAction(\"platform-get-client\",this.identity).catch((e=>{}));const t=e||this.identity,{uuid:n}=t;if(!Rn.has(n)){const e=_n(this,xn,\"f\").call(this,n);Rn.set(n,e)}return Rn.get(n)},xn.set(this,(async e=>{try{const t=`custom-frame-${e}`,n=await this._channel.connect(t,{wait:!1});return n.onDisconnection((()=>{Rn.delete(e)})),n}catch(t){throw Rn.delete(e),new Error(\"The targeted Platform is not currently running. Listen for application-started event for the given Uuid.\")}})),this.launchLegacyManifest=this.launchContentManifest;const n=(0,Sn.validateIdentity)(e);if(n)throw new Error(n);this._channel=t,this.identity={uuid:e.uuid},this.Layout=this.fin.Platform.Layout,this.Application=this.fin.Application.wrapSync(this.identity)}async createView(e,t,n){this.wire.sendAction(\"platform-create-view\",this.identity).catch((e=>{}));const i=await this.getClient(),r=await i.dispatch(\"create-view\",{target:t,opts:e,targetView:n});if(!r||(0,Sn.validateIdentity)(r.identity))throw new Error(`When overwriting the createView call, please return an object that has a valid 'identity' property: ${JSON.stringify(r)}`);return this.fin.View.wrapSync(r.identity)}async createWindow(e){this.wire.sendAction(\"platform-create-window\",this.identity).catch((e=>{}));const t=await this.getClient();e.reason||(e.reason=\"api-call\");const n=await t.dispatch(\"create-view-container\",e);if(!n||(0,Sn.validateIdentity)(n.identity))throw new Error(`When overwriting the createWindow call, please return an object that has a valid 'identity' property: ${JSON.stringify(n)}`);const{identity:i}=n,r=this.fin.Window.wrapSync(i);return r.name=i.name,r.uuid=i.uuid,r}async quit(){this.wire.sendAction(\"platform-quit\",this.identity).catch((e=>{}));return(await this.getClient()).dispatch(\"quit\")}async closeView(e){this.wire.sendAction(\"platform-close-view\",this.identity).catch((e=>{}));const t=await this.getClient();await t.dispatch(\"close-view\",{view:e})}async reparentView(e,t){console.warn(\"Platform.reparentView has been deprecated, please use Platform.createView\"),this.wire.sendAction(\"platform-reparent-view\",this.identity).catch((e=>{}));const n={...e,uuid:e.uuid??this.identity.uuid},i=await this.fin.View.wrap(n),r=await i.getOptions();return this.createView(r,t)}async getSnapshot(){this.wire.sendAction(\"platform-get-snapshot\",this.identity).catch((e=>{}));return(await this.getClient()).dispatch(\"get-snapshot\")}async getViewSnapshot(e){return(await this.getClient()).dispatch(\"get-view-snapshot\",{viewIdentity:e})}async applySnapshot(e,t){this.wire.sendAction(\"platform-apply-snapshot\",this.identity).catch((e=>{}));const n=\"Requested snapshot must be a valid Snapshot object, or a url or filepath to such an object.\";let i;if(\"string\"==typeof e)try{i=(await this._channel.wire.sendAction(\"get-application-manifest\",{manifestUrl:e})).payload.data}catch(e){throw new Error(`${n}: ${e}`)}else i=e;if(!i.windows)throw new Error(n);const r=await this.getClient();return await r.dispatch(\"apply-snapshot\",{snapshot:i,options:t}),this}async fetchManifest(e){return(await this.getClient()).dispatch(\"platform-fetch-manifest\",{manifestUrl:e})}async launchContentManifest(e){this.wire.sendAction(\"platform-launch-content-manifest\",this.identity).catch((()=>{}));const t=await this.getClient(),n=await this.fetchManifest(e);return t.dispatch(\"launch-into-platform\",{manifest:n,manifestUrl:e}),this}async setWindowContext(e={},t){if(this.wire.sendAction(\"platform-set-window-context\",this.identity).catch((e=>{})),!e)throw new Error(\"Please provide a serializable object or string to set the context.\");const n=await this.getClient(),{entityType:i}=t?await this.fin.System.getEntityInfo(t.uuid,t.name):this.fin.me;await n.dispatch(\"set-window-context\",{context:e,entityType:i,target:t||{uuid:this.fin.me.uuid,name:this.fin.me.name}})}async getWindowContext(e){this.wire.sendAction(\"platform-get-window-context\",this.identity).catch((e=>{}));const t=await this.getClient(),{entityType:n}=e?await this.fin.System.getEntityInfo(e.uuid,e.name):this.fin.me;return t.dispatch(\"get-window-context\",{target:e||{uuid:this.fin.me.uuid,name:this.fin.me.name},entityType:n})}async closeWindow(e,t={skipBeforeUnload:!1}){this.wire.sendAction(\"platform-close-window\",this.identity).catch((e=>{}));return(await this.getClient()).dispatch(\"close-window\",{windowId:e,options:t})}}Mn.Platform=Fn,xn=new WeakMap;var jn={},kn={},Ln={},Tn={};function $n(e){switch(e){case\"columns\":case\"grid\":case\"rows\":case\"tabs\":return!0;default:return!1}}Object.defineProperty(Tn,\"__esModule\",{value:!0}),Tn.overrideFromComposables=Tn.isValidPresetType=void 0,Tn.isValidPresetType=$n,Tn.overrideFromComposables=function(...e){return t=>e.reduceRight(((e,t)=>n=>t(e(n))),(e=>e))(t)},Tn.default={isValidPresetType:$n};var Bn={},Gn={},Wn={};Object.defineProperty(Wn,\"__esModule\",{value:!0}),Wn.ApiConsumer=void 0;Wn.ApiConsumer=class{constructor(e){this.strategy=e,this.consume=async e=>(await this.strategy.getExposedFunctions(e)).reduce(((t,n)=>({...t,[n.key]:this.strategy.createFunction(n,e)})),{})}};var Hn={},Nn={};Object.defineProperty(Nn,\"__esModule\",{value:!0}),Nn.expose=Nn.getExposedProperties=void 0;const Dn=Symbol(\"exposedProperties\");Nn.getExposedProperties=e=>e[Dn]||e.prototype[Dn]||[];Nn.expose=e=>(t,n,i)=>{t[Dn]=t[Dn]||[],t[Dn].push({key:n,descriptor:i,options:e})},Object.defineProperty(Hn,\"__esModule\",{value:!0}),Hn.ApiExposer=void 0;const Un=Nn;Hn.ApiExposer=class{constructor(e){this.strategy=e,this.exposeInstance=async(e,t)=>{const n=(0,Un.getExposedProperties)(e),i=await Promise.all(n.map((async({key:n,options:i})=>({key:n,options:await this.strategy.exposeFunction(e[n].bind(e),{key:n,options:i,meta:t})}))));await this.strategy.exposeMeta(t,i)}}};var Vn={},zn={},Kn={};Object.defineProperty(Kn,\"__esModule\",{value:!0}),Kn.ChannelsConsumer=void 0;Kn.ChannelsConsumer=class{constructor(e){this.channel=e,this.getExposedFunctions=async e=>{const{id:t}=e,{props:n}=await this.channel.dispatch(`api-meta:${t}`);return n},this.createFunction=e=>(...t)=>{const{action:n}=e.options;return this.channel.dispatch(n,{args:t})}}};var qn={};Object.defineProperty(qn,\"__esModule\",{value:!0}),qn.ChannelsExposer=void 0;qn.ChannelsExposer=class{constructor(e){this.channelProviderOrClient=e,this.exposeFunction=async(e,t)=>{const{key:n,options:i,meta:r}=t,{id:o}=r,s=`${o}.${i?.action||n}`;return await this.channelProviderOrClient.register(s,(async({args:t})=>e(...t))),{action:s}},this.exposeMeta=async({id:e},t)=>{const n=`api-meta:${e}`;await this.channelProviderOrClient.register(n,(()=>({props:t})))}}},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Kn,e),n(qn,e)}(zn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(zn,e)}(Vn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Wn,e),n(Hn,e),n(Vn,e),n(Nn,e)}(Gn);var Jn={};Object.defineProperty(Jn,\"__esModule\",{value:!0}),Jn.createRelayedDispatch=exports.relayChannelClientApi_1=Jn.relayChannelClientApi=void 0;const Yn=[\"no longer connected\",\"RTCDataChannel closed unexpectedly\",\"The client you are trying to dispatch from is disconnected from the target provider\"];exports.relayChannelClientApi_1=Jn.relayChannelClientApi=async(e,t)=>{e.register(`relay:${t}`,(({action:t,target:n,payload:i})=>e.dispatch(n,t,i))),await Promise.resolve()};Jn.createRelayedDispatch=(e,t,n,i)=>async(r,o)=>{try{return await e.dispatch(`relay:${n}`,{action:r,payload:o,target:t})}catch(e){if(s=e.message,Yn.some((e=>s.includes(e)))&&i)throw new Error(i);throw e}var s};var Zn,Qn,Xn,ei=s&&s.__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},ti=s&&s.__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)};Object.defineProperty(Bn,\"__esModule\",{value:!0}),Bn.ColumnOrRow=Bn.TabStack=Bn.LayoutNode=void 0;const ni=Gn,ii=Jn;class ri{constructor(e,t){Zn.set(this,void 0),this.isRoot=()=>ti(this,Zn,\"f\").isRoot(this.entityId),this.exists=()=>ti(this,Zn,\"f\").exists(this.entityId),this.getParent=async()=>{const e=await ti(this,Zn,\"f\").getParent(this.entityId);if(e)return ri.getEntity(e,ti(this,Zn,\"f\"))},this.createAdjacentStack=async(e,t)=>{const n=await ti(this,Zn,\"f\").createAdjacentStack(this.entityId,e,t);return ri.getEntity({entityId:n,type:\"stack\"},ti(this,Zn,\"f\"))},this.getAdjacentStacks=async e=>(await ti(this,Zn,\"f\").getAdjacentStacks({targetId:this.entityId,edge:e})).map((e=>ri.getEntity({type:\"stack\",entityId:e.entityId},ti(this,Zn,\"f\")))),ei(this,Zn,e,\"f\"),this.entityId=t}}Bn.LayoutNode=ri,Zn=new WeakMap,ri.newLayoutEntitiesClient=async(e,t,n)=>{const i=(0,ii.createRelayedDispatch)(e,n,\"layout-relay\",\"You are trying to interact with a layout component on a window that does not exist or has been destroyed.\");return new ni.ApiConsumer(new ni.ChannelsConsumer({dispatch:i})).consume({id:t})},ri.getEntity=(e,t)=>{const{entityId:n,type:i}=e;switch(i){case\"column\":case\"row\":return new si(t,n,i);case\"stack\":return new oi(t,n);default:throw new Error(`Unrecognised Layout Entity encountered ('${JSON.stringify(e)})`)}};class oi extends ri{constructor(e,t){super(e,t),Qn.set(this,void 0),this.type=\"stack\",this.getViews=()=>ti(this,Qn,\"f\").getStackViews(this.entityId),this.addView=async(e,t={index:0})=>ti(this,Qn,\"f\").addViewToStack(this.entityId,e,t),this.removeView=async e=>{await ti(this,Qn,\"f\").removeViewFromStack(this.entityId,e)},this.setActiveView=async e=>{await ti(this,Qn,\"f\").setStackActiveView(this.entityId,e)},ei(this,Qn,e,\"f\")}}Bn.TabStack=oi,Qn=new WeakMap;class si extends ri{constructor(e,t,n){super(e,t),Xn.set(this,void 0),this.getContent=async()=>(await ti(this,Xn,\"f\").getContent(this.entityId)).map((e=>ri.getEntity(e,ti(this,Xn,\"f\")))),ei(this,Xn,e,\"f\"),this.type=n}}Bn.ColumnOrRow=si,Xn=new WeakMap;var ai={};Object.defineProperty(ai,\"__esModule\",{value:!0}),ai.DEFAULT_LAYOUT_KEY=ai.LAYOUT_CONTROLLER_ID=void 0,ai.LAYOUT_CONTROLLER_ID=\"layout-entities\",ai.DEFAULT_LAYOUT_KEY=\"__default__\";var ci,di,hi,li=s&&s.__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)};Object.defineProperty(Ln,\"__esModule\",{value:!0}),Ln.Layout=void 0;const ui=G,pi=O,wi=d,yi=Tn,fi=Bn,gi=ai;class mi extends wi.Base{static getClient(e){return li(e,di,\"f\").getValue()}constructor(e,t){super(t),ci.add(this),di.set(this,new ui.Lazy((async()=>fi.LayoutNode.newLayoutEntitiesClient(await this.platform.getClient(),gi.LAYOUT_CONTROLLER_ID,this.identity)))),this.replace=async e=>{this.wire.sendAction(\"layout-replace\").catch((e=>{}));const t=await this.platform.getClient();await t.dispatch(\"replace-layout\",{target:this.identity,opts:{layout:e}})},this.replaceView=async(e,t)=>{this.wire.sendAction(\"layout-replace-view\").catch((e=>{}));const n=await this.platform.getClient();await n.dispatch(\"replace-view\",{target:this.identity,opts:{viewToReplace:e,newView:t}})},this.applyPreset=async e=>{this.wire.sendAction(\"layout-apply-preset\").catch((e=>{}));const t=await this.platform.getClient(),{presetType:n}=e;if(!n||!(0,yi.isValidPresetType)(n))throw new Error(\"Cannot apply preset layout, please include an applicable presetType property in the PresetLayoutOptions.\");await t.dispatch(\"apply-preset-layout\",{target:this.identity,opts:{presetType:n}})};const n=(0,pi.validateIdentity)(e);if(n)throw new Error(n);this.identity=e,this.platform=this.fin.Platform.wrapSync({uuid:e.uuid}),e.uuid===this.fin.me.uuid&&e.name===this.fin.me.name&&(this.init=this.fin.Platform.Layout.init)}async getConfig(){this.wire.sendAction(\"layout-get-config\").catch((e=>{}));return(await this.platform.getClient()).dispatch(\"get-frame-snapshot\",{target:this.identity})}async getCurrentViews(){this.wire.sendAction(\"layout-get-views\").catch((e=>{}));const e=await this.platform.getClient();return(await e.dispatch(\"get-layout-views\",{target:this.identity})).map((e=>this.fin.View.wrapSync(e)))}async getRootItem(){this.wire.sendAction(\"layout-get-root-item\").catch((()=>{}));const e=await li(this,di,\"f\").getValue(),t=await e.getRoot(\"layoutName\"in this.identity?this.identity:void 0);return fi.LayoutNode.getEntity(t,e)}async getStackByViewIdentity(e){this.wire.sendAction(\"layout-get-stack-by-view\").catch((()=>{}));const t=await li(this,di,\"f\").getValue(),n=await t.getStackByView(e);if(!n)throw new Error(`No stack found for view: ${e.uuid}/${e.name}`);return fi.LayoutNode.getEntity(n,t)}async addView(e,{location:t,targetView:n}={}){this.wire.sendAction(\"layout-add-view\").catch((e=>{}));const{identity:i}=await li(this,ci,\"m\",hi).call(this,\"layout-add-view\",{viewOptions:e,location:t,targetView:n});return{identity:i}}async closeView(e){this.wire.sendAction(\"layout-close-view\").catch((e=>{})),await li(this,ci,\"m\",hi).call(this,\"layout-close-view\",{viewIdentity:e})}}Ln.Layout=mi,di=new WeakMap,ci=new WeakSet,hi=async function(e,t){return(await this.platform.getClient()).dispatch(e,{target:this.identity,opts:t})};var vi,Ci,bi,Ii,Ei,xi=s&&s.__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)},Ai=s&&s.__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};Object.defineProperty(kn,\"__esModule\",{value:!0}),kn.LayoutModule=void 0;const Pi=d,Mi=Ln,_i=ai;class Oi extends Pi.Base{constructor(){super(...arguments),vi.add(this),Ci.set(this,!1),bi.set(this,null),this.init=async(e={})=>{if(this.wire.sendAction(\"layout-init\").catch((e=>{})),!this.wire.environment.layoutAllowedInContext(this.fin))throw new Error(\"Layout.init can only be called from a Window context.\");if(xi(this,Ci,\"f\"))throw new Error(\"Layout.init was already called, please use Layout.create to add additional layouts.\");\"openfin\"===this.wire.environment.type&&await this.fin.Platform.getCurrentSync().getClient(),Ai(this,Ci,!0,\"f\"),Ai(this,bi,await this.wire.environment.initLayoutManager(this.fin,this.wire,e),\"f\"),await this.wire.environment.applyLayoutSnapshot(this.fin,xi(this,bi,\"f\"),e);const t={name:this.fin.me.name,uuid:this.fin.me.uuid};if(!e.layoutManagerOverride){const e={layoutName:_i.DEFAULT_LAYOUT_KEY,...t};return xi(this,Ii,\"f\").call(this,e)}return this.wrapSync(t)},Ii.set(this,(e=>{const t=\"[Layout] You are using a deprecated property `layoutManager` - it will throw if you access it starting in v37.\",n=new Proxy({},{get(e,n){throw console.warn(`[Layout-mgr-proxy] accessing ${n.toString()}`),new Error(t)}}),i=Object.assign(this.wrapSync(e),{layoutManager:n});return new Proxy(i,{get(e,n){if(\"layoutManager\"===n)throw console.warn(`[Layout-proxy] accessing ${n.toString()}`),new Error(t);return e[n]}})})),this.getCurrentLayoutManagerSync=()=>xi(this,vi,\"m\",Ei).call(this,\"fin.Platform.Layout.getCurrentLayoutManagerSync()\"),this.create=async e=>this.wire.environment.createLayout(xi(this,vi,\"m\",Ei).call(this,\"fin.Platform.Layout.create()\"),e),this.destroy=async e=>this.wire.environment.destroyLayout(xi(this,vi,\"m\",Ei).call(this,\"fin.Platform.Layout.destroy()\"),e)}async wrap(e){return this.wire.sendAction(\"layout-wrap\").catch((e=>{})),new Mi.Layout(e,this.wire)}wrapSync(e){return this.wire.sendAction(\"layout-wrap-sync\").catch((e=>{})),new Mi.Layout(e,this.wire)}async getCurrent(){if(this.wire.sendAction(\"layout-get-current\").catch((e=>{})),\"openfin\"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error(\"You are not in a Window context. Only Windows can have a Layout.\");const{uuid:e,name:t}=this.fin.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction(\"layout-get-current-sync\").catch((e=>{})),\"openfin\"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error(\"You are not in a Window context. Only Windows can have a Layout.\");const{uuid:e,name:t}=this.fin.me;return this.wrapSync({uuid:e,name:t})}async getLayoutByViewIdentity(e){this.wire.sendAction(\"layout-get-by-view-identity\").catch((()=>{}));let t=await this.wire.environment.getViewWindowIdentity(this.fin,e);t.identity&&(t=t.identity);try{const n=this.wrapSync(t),i=await Mi.Layout.getClient(n),r=await i.getLayoutIdentityForViewOrThrow(e);return this.wrapSync(r)}catch(n){if(![\"No action registered at target for\",\"getLayoutIdentityForViewOrThrow is not a function\"].some((e=>n.message.includes(e))))throw n;if(t.uuid===t.name)throw new Error(`View identity ${JSON.stringify(e)} is not attached to any layout in provider window ${JSON.stringify(t)}.`);return this.wrapSync(t)}}}kn.LayoutModule=Oi,Ci=new WeakMap,bi=new WeakMap,Ii=new WeakMap,vi=new WeakSet,Ei=function(e){if(!xi(this,bi,\"f\"))throw new Error(`You must call init before using the API ${e}`);return xi(this,bi,\"f\")},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(kn,e),n(Ln,e)}(jn),Object.defineProperty(Pn,\"__esModule\",{value:!0}),Pn.PlatformModule=void 0;const Si=d,Ri=Mn,Fi=jn;class ji extends Si.Base{constructor(e,t){super(e),this._channel=t,this.Layout=new Fi.LayoutModule(this.wire)}async init(e){if(!fin.__internal_.isPlatform||fin.me.name!==fin.me.uuid)throw new Error(\"fin.Platform.init should only be called from a custom platform provider running in the main window of the application.\");return this.wire.environment.initPlatform(this.fin,e)}async wrap(e){return this.wire.sendAction(\"platform-wrap\").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}wrapSync(e){return this.wire.sendAction(\"platform-wrap-sync\").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}async getCurrent(){return this.wire.sendAction(\"platform-get-current\").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction(\"platform-get-current-sync\").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}start(e){return this.wire.sendAction(\"platform-start\").catch((e=>{})),new Promise((async(t,n)=>{try{const{uuid:n}=e,i=await this.fin.Application._create({...e,isPlatformController:!0});i.once(\"platform-api-ready\",(()=>t(this.wrapSync({uuid:n})))),i._run({uuid:n})}catch(e){n(e)}}))}startFromManifest(e,t){return this.wire.sendAction(\"platform-start-from-manifest\").catch((e=>{})),new Promise((async(n,i)=>{try{const i=await this.fin.Application._createFromManifest(e);i.once(\"platform-api-ready\",(()=>n(this.wrapSync({uuid:i.identity.uuid})))),i._run(t)}catch(e){i(e)}}))}}Pn.PlatformModule=ji,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Pn,e),n(Mn,e)}(An);var ki={};!function(e){Object.defineProperty(e,\"__esModule\",{value:!0}),e.getMe=e.getBaseMe=e.environmentUnsupportedMessage=void 0;const t=J(),n=un,i=ie(),r=rn;function o(e,t,n){return{...{isView:\"view\"===e,isWindow:\"window\"===e,isFrame:\"iframe\"===e,isExternal:\"external connection\"===e},uuid:t,name:n,entityType:e}}e.environmentUnsupportedMessage=\"You are not running in OpenFin.\",e.getBaseMe=o,e.getMe=function(s){const{uuid:a,name:c,entityType:d}=s.me,h={setContext(){throw new Error(e.environmentUnsupportedMessage)},addContextHandler(){throw new Error(e.environmentUnsupportedMessage)},getContextGroups(){throw new Error(e.environmentUnsupportedMessage)},joinContextGroup(){throw new Error(e.environmentUnsupportedMessage)},removeFromContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getAllClientsInContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getInfoForContextGroup(){throw new Error(e.environmentUnsupportedMessage)}},l=\"Interop API has not been instantiated. Either connection has failed or you have not declared interop in your config.\",u={setContext(){throw new Error(l)},addContextHandler(){throw new Error(l)},getContextGroups(){throw new Error(l)},joinContextGroup(){throw new Error(l)},removeFromContextGroup(){throw new Error(l)},getAllClientsInContextGroup(){throw new Error(l)},getInfoForContextGroup(){throw new Error(l)}},p={eventNames:()=>{throw new Error(e.environmentUnsupportedMessage)},emit:()=>{throw new Error(e.environmentUnsupportedMessage)},listeners:()=>{throw new Error(e.environmentUnsupportedMessage)},listenerCount:()=>{throw new Error(e.environmentUnsupportedMessage)},on:()=>{throw new Error(e.environmentUnsupportedMessage)},addListener:()=>{throw new Error(e.environmentUnsupportedMessage)},once:()=>{throw new Error(e.environmentUnsupportedMessage)},prependListener:()=>{throw new Error(e.environmentUnsupportedMessage)},prependOnceListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeAllListeners:()=>{throw new Error(e.environmentUnsupportedMessage)}};switch(d){case\"view\":return Object.assign(new t.View(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case\"window\":return Object.assign(new i._Window(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case\"iframe\":return Object.assign(new n._Frame(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case\"external connection\":return Object.assign(new r.ExternalApplication(s,{uuid:a}),o(d,a,c),{interop:u,isOpenFin:!1});default:return{...o(d,a,c),...p,interop:h,isOpenFin:!1}}}}(ki);var Li={},Ti={},$i={};Object.defineProperty($i,\"__esModule\",{value:!0}),$i.createWarningObject=$i.createUnusableObject=void 0,$i.createUnusableObject=function(e){const t=()=>{throw new Error(e)};return new Proxy({},{apply:t,construct:t,defineProperty:t,deleteProperty:t,get:t,getOwnPropertyDescriptor:t,getPrototypeOf:t,has:t,isExtensible:t,ownKeys:t,preventExtensions:t,set:t,setPrototypeOf:t})},$i.createWarningObject=function(e,t){return new Proxy(t,{get:(...t)=>(console.warn(e),Reflect.get(...t)),set:(...t)=>(console.warn(e),Reflect.set(...t)),getOwnPropertyDescriptor:(...t)=>(console.warn(e),Reflect.getOwnPropertyDescriptor(...t)),ownKeys:(...t)=>(console.warn(e),Reflect.ownKeys(...t))})};var Bi,Gi={},Wi={};var Hi={};!function(e){Object.defineProperty(e,\"__esModule\",{value:!0}),e.wrapIntentHandler=e.BROKER_ERRORS=e.generateOverrideWarning=e.generateOverrideError=e.wrapContextHandler=e.wrapInTryCatch=e.generateId=void 0;e.generateId=()=>`${Math.random()}${Date.now()}`;e.wrapInTryCatch=(e,t)=>(...n)=>{try{return e(...n)}catch(e){throw new Error((t||\"\")+e)}};e.wrapContextHandler=(e,t)=>async n=>{try{await e(n)}catch(e){throw console.error(`Error thrown by handler ${t} for context type ${n.type}: ${e}`),e}};e.generateOverrideError=(e,t)=>`You have tried to to use ${e} but ${t} has not been overridden in the Interop Broker. Please override this function. Refer to our documentation for more info.`;e.generateOverrideWarning=(e,t,n,i)=>{const{uuid:r,name:o}=n;return i?`Entity with identity: ${r}/${o} has called ${i} or ${e} but ${t} has not been overridden.`:`Entity with identity: ${r}/${o} has called ${e} but ${t} has not been overridden.`},e.BROKER_ERRORS={fireIntent:(0,e.generateOverrideError)(\"fireIntent\",\"handleFiredIntent\"),fireIntentForContext:(0,e.generateOverrideError)(\"fireIntentForContext\",\"handleFiredIntentForContext\"),getInfoForIntent:(0,e.generateOverrideError)(\"getInfoForIntent\",\"handleInfoForIntent\"),getInfoForIntentsByContext:(0,e.generateOverrideError)(\"getInfoForIntentsByContext\",\"handleInfoForIntentsByContext\"),joinSessionContextGroupWithJoinContextGroup:\"The Context Group you have tried to join is a Session Context Group. Custom Context Groups can only be defined by the Interop Broker through code or manifest configuration. Please use joinSessionContextGroup.\",fdc3Open:(0,e.generateOverrideError)(\"fdc3.open\",\"fdc3HandleOpen\"),fdc3FindInstances:(0,e.generateOverrideError)(\"fdc3.findInstances\",\"fdc3HandleFindInstances\"),fdc3GetAppMetadata:(0,e.generateOverrideError)(\"fdc3.getAppMetadata\",\"fdc3HandleGetAppMetadata\"),fdc3GetInfo:(0,e.generateOverrideError)(\"fdc3.getInfo\",\"fdc3HandleGetInfo\")};e.wrapIntentHandler=(e,t)=>async n=>{try{return e(n)}catch(e){throw console.error(`Error thrown by handler ${t}: ${e}`),e}}}(Hi);var Ni,Di,Ui={};function Vi(){if(Di)return Gi;Di=1;var e,t,n,r=s&&s.__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},o=s&&s.__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)},a=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Gi,\"__esModule\",{value:!0}),Gi.InteropBroker=void 0;const c=d,h=a(function(){if(Bi)return Wi;Bi=1,Object.defineProperty(Wi,\"__esModule\",{value:!0});const e=Cr();return Wi.default=class{constructor(e,t){this.provider=e,this.id=t,this.lastContext=void 0,this.contextGroupMap=new Map,this.clients=new Map,this.registerListeners()}registerListeners(){this.provider.register(`sessionContextGroup:getContext-${this.id}`,this.getCurrentContext.bind(this)),this.provider.register(`sessionContextGroup:setContext-${this.id}`,this.setContext.bind(this)),this.provider.register(`sessionContextGroup:handlerAdded-${this.id}`,this.handlerAdded.bind(this)),this.provider.register(`sessionContextGroup:handlerRemoved-${this.id}`,this.handlerRemoved.bind(this))}getCurrentContext(e){return e.type?this.contextGroupMap.get(e.type):this.lastContext}setContext(t,n){const{context:i}=t,r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name} not in Session Client State Map`);this.contextGroupMap.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{e.contextHandlers.get(i.type)?.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getClientState(e){return this.clients.get(e.endpointId)}async handlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(i){const e=r.contextHandlers.get(i)||[];r.contextHandlers.set(i,[...e,n]);const o=this.contextGroupMap.get(i);o&&await this.provider.dispatch(t,n,o)}else{r.globalHandler=n;const e=[...this.contextGroupMap.keys()].map((async e=>{const i=this.contextGroupMap.get(e);i&&await this.provider.dispatch(t,n,i)}));await Promise.all(e)}}handlerRemoved(e,t){const{handlerId:n}=e,i=this.clients.get(t.endpointId);i?(Array.from(i.contextHandlers).forEach((([,e])=>{const t=e.indexOf(n);t>-1&&e.splice(t,1)})),i.globalHandler===n&&(i.globalHandler=void 0)):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={contextHandlers:new Map,clientIdentity:e,globalHandler:void 0};this.clients.set(e.endpointId,t)}}onDisconnection(e){this.clients.delete(e.endpointId)}},Wi}()),l=Hi,u=a(i),p=function(){if(Ni)return Ui;Ni=1,Object.defineProperty(Ui,\"__esModule\",{value:!0}),Ui.PrivateChannelProvider=void 0;const e=Vi();return Ui.PrivateChannelProvider=class t{constructor(e,t){this.provider=e,this.id=t,this.clients=new Map,this.registerListeners(),this.contextByContextType=new Map,this.lastContext=void 0,this.provider.onConnection((e=>this.registerNewClient(e))),this.provider.onDisconnection((async e=>{const{endpointId:t}=e;this.clients.has(t)&&await this.handleClientDisconnecting(e),0===(await this.provider.getAllClientInfo()).length&&this.provider.destroy()}))}getClientState(e){return this.clients.get(e.endpointId)}registerListeners(){this.provider.register(\"broadcast\",this.broadcast.bind(this)),this.provider.register(\"getCurrentContext\",this.getCurrentContext.bind(this)),this.provider.register(\"contextHandlerAdded\",this.contextHandlerAdded.bind(this)),this.provider.register(\"contextHandlerRemoved\",this.contextHandlerRemoved.bind(this)),this.provider.register(\"nonStandardHandlerRemoved\",this.nonStandardHandlerRemoved.bind(this)),this.provider.register(\"onAddContextHandlerAdded\",this.onAddContextHandlerAdded.bind(this)),this.provider.register(\"onDisconnectHandlerAdded\",this.onDisconnectHandlerAdded.bind(this)),this.provider.register(\"onUnsubscribeHandlerAdded\",this.onUnsubscribeHandlerAdded.bind(this)),this.provider.register(\"clientDisconnecting\",((e,t)=>{this.handleClientDisconnecting(t)}))}broadcast(t,n){const{context:i}=t;if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name}, tried to call broadcast, is not connected to this Private Channel`);const r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to broadcast - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);this.contextByContextType.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{const t=e.handlerIdsByContextTypes.get(i.type);t&&t.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getCurrentContext(e,t){const{contextType:n}=e;if(!this.getClientState(t))throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call getCurrentContext, is not connected to this Private Channel`);if(void 0!==n){return this.contextByContextType.get(n)||null}return this.lastContext?this.lastContext:null}contextHandlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call addContextListener, is not connected to this Private Channel`);if(i){const e=r.handlerIdsByContextTypes.get(i)||[];r.handlerIdsByContextTypes.set(i,[...e,n])}else r.globalHandler=n;Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&e.onAddContextListenerHandlerId&&this.provider.dispatch(e.clientIdentity,e.onAddContextListenerHandlerId,i)}))}async contextHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);if(i){let e;if(i.globalHandler===n)i.globalHandler=void 0;else for(const[t,r]of i.handlerIdsByContextTypes){const i=r.indexOf(n);i>-1&&(r.splice(i,1),e=t)}const r=(await this.getConnectedClients()).map((async n=>{const{clientIdentity:i,clientIdentity:{endpointId:r},onUnsubscribeHandlerId:o}=n;r!==t.endpointId&&o&&await this.provider.dispatch(i,o,e)}));try{await Promise.all(r)}catch(e){throw console.error(`Problem when attempting to dispatch to onUnsubscribeHandlers. Error: ${e} Removing Client: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}`),new Error(e)}}else console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}.`)}nonStandardHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);i?i.onDisconnectHandlerId===n?i.onDisconnectHandlerId=void 0:i.onAddContextListenerHandlerId===n?i.onAddContextListenerHandlerId=void 0:i.onUnsubscribeHandlerId===n&&(i.onUnsubscribeHandlerId=void 0):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}onAddContextHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onAddContextListener, is not connected to this Private Channel`);n.onAddContextListenerHandlerId=i,Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&Array.from(e.handlerIdsByContextTypes.keys()).forEach((e=>{this.provider.dispatch(t,i,e)}))}))}onDisconnectHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onDisconnect, is not connected to this Private Channel`);n.onDisconnectHandlerId=i}onUnsubscribeHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onUnsubscribe, is not connected to this Private Channel`);n.onUnsubscribeHandlerId=i}removeClient(e){const t=this.getClientState(e);if(!t)throw new Error(`Client with Identity: ${e.uuid} ${e.name}, tried to call disconnect, is not connected to this Private Channel`);t.handlerIdsByContextTypes.clear(),this.clients.delete(e.endpointId)}async fireOnDisconnectForOtherClients(e){const{endpointId:t}=e,n=(await this.getConnectedClients()).map((async e=>{const{clientIdentity:{endpointId:n},onDisconnectHandlerId:i}=e;n!==t&&i&&await this.provider.dispatch(e.clientIdentity,i)}));try{await Promise.all(n)}catch(t){throw console.error(`Problem when attempting to dispatch to onDisconnectHandlers. Error: ${t} Disconnecting Client: uuid: ${e.uuid}. name: ${e.name}. endpointId: ${e.endpointId}`),new Error(t)}}async unsubscribeAll(e){const{endpointId:t}=e,n=this.clients.get(t);if(n){const t=Array.from(n.handlerIdsByContextTypes.values()).flat(),i=n.globalHandler;if(t.length>0){const n=t.map((async t=>this.contextHandlerRemoved({handlerId:t},e)));try{await Promise.all(n)}catch(e){console.error(e.message)}}if(i)try{await this.contextHandlerRemoved({handlerId:i},e)}catch(e){console.error(e.message)}}}async handleClientDisconnecting(e){await this.unsubscribeAll(e),this.removeClient(e),await this.fireOnDisconnectForOtherClients(e)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={clientIdentity:e,handlerIdsByContextTypes:new Map,globalHandler:void 0,onAddContextListenerHandlerId:void 0,onUnsubscribeHandlerId:void 0,onDisconnectHandlerId:void 0};this.clients.set(e.endpointId,t)}}async getConnectedClients(){const e=await this.provider.getAllClientInfo();return Array.from(this.clients.values()).filter((t=>{const{uuid:n,name:i}=t.clientIdentity;return e.some((e=>i===e.name&&n===e.uuid))}))}static init(e,n){return new t(e,n)}},Ui}(),w=G,y=[{id:\"green\",displayMetadata:{color:\"#00CC88\",name:\"green\"}},{id:\"purple\",displayMetadata:{color:\"#8C61FF\",name:\"purple\"}},{id:\"orange\",displayMetadata:{color:\"#FF8C4C\",name:\"orange\"}},{id:\"red\",displayMetadata:{color:\"#FF5E60\",name:\"red\"}},{id:\"pink\",displayMetadata:{color:\"#FF8FB8\",name:\"pink\"}},{id:\"yellow\",displayMetadata:{color:\"#E9FF8F\",name:\"yellow\"}}];let f=class i extends c.Base{constructor(i,s,a){super(i),e.set(this,void 0),t.set(this,void 0),n.set(this,void 0),this.getProvider=()=>o(this,n,\"f\").getValue(),this.interopClients=new Map,this.contextGroupsById=new Map,r(this,t,a.contextGroups??[...y],\"f\"),r(this,e,a.fdc3Info,\"f\"),a?.logging&&(this.logging=a.logging),this.intentClientMap=new Map,this.lastContextMap=new Map,this.sessionContextGroupMap=new Map,r(this,n,new w.Lazy(s),\"f\"),this.setContextGroupMap(),this.setupChannelProvider()}static createClosedConstructor(...e){return class extends i{constructor(...t){if(t.length){const[n,i,r]=t;if(r&&\"object\"==typeof r&&!(0,u.default)(r,e[2]))return console.warn(\"You have modified the parameters of the InteropOverride constructor. This behavior is deprecated and will be removed in a future version. You can modify these options in your manifest. Please consult our Interop docs for guidance on migrating to the new override scheme.\"),void super(e[0],e[1],r);console.warn(\"You are attempting to pass arguments to the InteropOverride constructor. This is not necessary, and these passed arguments will be ignored. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.\")}super(...e)}}}setContext({context:e},t){this.wire.sendAction(\"interop-broker-set-context\").catch((e=>{}));const n=this.getClientState(t);if(!n||!n.contextGroupId)throw n?new Error(\"You must join a context group before you can set context.\"):new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);{const{contextGroupId:t}=n;this.setContextForGroup({context:e},t)}}setContextForGroup({context:e},t){this.wire.sendAction(\"interop-broker-set-context-for-group\").catch((e=>{}));const n=this.contextGroupsById.get(t);if(!n)throw new Error(`Unable to set context for context group that isn't in the context group mapping: ${t}.`);const r=i.checkContextIntegrity(e);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(e)}`);const o=e.type;n.set(o,e),this.lastContextMap.set(t,o);Array.from(this.interopClients.values()).filter((e=>e.contextGroupId===t)).forEach((t=>{for(const[,n]of t.contextHandlers)i.isContextTypeCompatible(o,n.contextType)&&this.invokeContextHandler(t.clientIdentity,n.handlerId,e)}))}getCurrentContext(e,t){this.wire.sendAction(\"interop-broker-get-current-context\").catch((e=>{}));const n=this.getClientState(t);if(!n?.contextGroupId)throw new Error(\"You must be a member of a context group to call getCurrentContext\");const{contextGroupId:i}=n,r=this.contextGroupsById.get(i),o=this.lastContextMap.get(i),s=e?.contextType??o;return r&&s?r.get(s):void 0}async joinContextGroup({contextGroupId:e,target:t},n){if(this.wire.sendAction(\"interop-broker-join-context-group\").catch((e=>{})),this.sessionContextGroupMap.has(e))throw new Error(l.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup);if(t){i.hasEndpointId(t)&&await this.addClientToContextGroup({contextGroupId:e},t);try{const n=this.channel.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name));if(!n.length)throw new Error(`Given Identity ${t.uuid} ${t.name} is not connected to the Interop Broker.`);n.length>1&&console.warn(`More than one connection found for identity ${t.uuid} ${t.name}`);const i=[];for(const t of n)i.push(this.addClientToContextGroup({contextGroupId:e},t));await Promise.all(i)}catch(e){throw new Error(e)}}else await this.addClientToContextGroup({contextGroupId:e},n)}async addClientToContextGroup({contextGroupId:e},t){this.wire.sendAction(\"interop-broker-add-client-to-context-group\").catch((e=>{}));const n=this.getClientState(t);if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(!this.getContextGroups().find((t=>t.id===e)))throw new Error(`Attempting to join a context group that does not exist: ${e}. You may only join existing context groups.`);if(n.contextGroupId!==e){n.contextGroupId=e,await this.setCurrentContextGroupInClientOptions(t,e);const i=this.contextGroupsById.get(e);for(const[,e]of n.contextHandlers){const{contextType:n,handlerId:r}=e;if(void 0===n)i.forEach(((e,n)=>{this.invokeContextHandler(t,r,e)}));else if(i.has(n)){const e=i.get(n);e&&this.invokeContextHandler(t,r,e)}}}}async removeFromContextGroup({target:e},t){if(this.wire.sendAction(\"interop-broker-remove-from-context-group\").catch((e=>{})),e){i.hasEndpointId(e)&&await this.removeClientFromContextGroup(e);try{const t=this.channel.connections.filter((t=>t.uuid===e.uuid&&t.name===e.name));if(!t.length)throw new Error(`No connection found for given Identity ${e.uuid} ${e.name}`);t.length>1&&console.warn(`More than one connection found for identity ${e.uuid} ${e.name}`);const n=[];for(const e of t)n.push(this.removeClientFromContextGroup(e));await Promise.all(n)}catch(e){throw new Error(e)}}else await this.removeClientFromContextGroup(t)}async removeClientFromContextGroup(e){this.wire.sendAction(\"interop-broker-remove-client-from-context-group\").catch((e=>{}));const t=this.getClientState(e);t&&(t.contextGroupId=void 0),await this.setCurrentContextGroupInClientOptions(e,null)}getContextGroups(){return this.wire.sendAction(\"interop-broker-get-context-groups\").catch((e=>{})),o(this,t,\"f\").map((e=>({...e})))}getInfoForContextGroup({contextGroupId:e}){return this.wire.sendAction(\"interop-broker-get-info-for-context-group\").catch((e=>{})),this.getContextGroups().find((t=>t.id===e))}getAllClientsInContextGroup({contextGroupId:e}){this.wire.sendAction(\"interop-broker-get-all-clients-in-context-group\").catch((e=>{}));return Array.from(this.interopClients.values()).filter((t=>t.contextGroupId===e)).map((e=>e.clientIdentity))}async handleFiredIntent(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.raiseIntent\",\"InteropBroker.handleFiredIntent\",t,\"interopClient.fireIntent\");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntent)}async setIntentTarget(e,t){this.wire.sendAction(\"interop-broker-set-intent-target\").catch((e=>{}));const n=this.intentClientMap.get(t.name),i=`intent-handler-${e.name}`;if(n){const t=n.get(i);if(t){if(t.pendingIntents.push(e),t.clientIdentity&&t.isReady){const{clientIdentity:e,pendingIntents:n}=t;try{const r=n[n.length-1];await this.invokeIntentHandler(e,i,r),t.pendingIntents=[]}catch(n){console.error(`Error invoking intent handler for client ${e.uuid}/${e.name}/${e.endpointId}`),t.isReady=!1}}}else n.set(i,{isReady:!1,pendingIntents:[e]})}else{this.intentClientMap.set(t.name,new Map);const n=this.intentClientMap.get(t.name);n&&n.set(i,{isReady:!1,pendingIntents:[e]})}}async handleInfoForIntent(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.findIntent\",\"InteropBroker.handleInfoForIntent\",t,\"interopClient.getInfoForIntent\");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntent)}async handleInfoForIntentsByContext(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.findIntentsByContext\",\"InteropBroker.handleInfoForIntentsByContext\",t,\"interopClient.getInfoForIntentsByContext\");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntentsByContext)}async handleFiredIntentForContext(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.raiseIntentForContext\",\"InteropBroker.handleFiredIntentForContext\",t,\"interopClient.fireIntentForContext\");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntentForContext)}async clientDisconnected(e){}async fdc3HandleOpen({app:e,context:t},n){const i=(0,l.generateOverrideWarning)(\"fdc3.open\",\"InteropBroker.fdc3HandleOpen\",n);throw console.warn(i),new Error(l.BROKER_ERRORS.fdc3Open)}async fdc3HandleFindInstances(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.open\",\"InteropBroker.fdc3HandleFindInstances\",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3FindInstances)}async fdc3HandleGetAppMetadata(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.getAppMetadata\",\"InteropBroker.fdc3HandleGetAppMetadata\",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3GetAppMetadata)}async invokeContextHandler(e,t,n){const i=await this.getProvider();try{await i.dispatch(e,t,n)}catch(i){console.error(`Error invoking context handler ${t} for context type ${n.type} in client ${e.uuid}/${e.name}/${e.endpointId}`,i)}}async invokeIntentHandler(e,t,n){const i=await this.getProvider();await i.dispatch(e,t,n)}async fdc3HandleGetInfo(t,n){const{fdc3Version:i}=t;return{fdc3Version:i,...o(this,e,\"f\"),optionalFeatures:{OriginatingAppMetadata:!1,UserChannelMembershipAPIs:!0},appMetadata:{appId:\"\",instanceId:\"\"}}}async getAllClientInfo(){return(await this.getProvider()).getAllClientInfo()}decorateSnapshot(e){return{...e,interopSnapshotDetails:{contextGroupStates:this.getContextGroupStates()}}}applySnapshot(e,t){const n=e?.interopSnapshotDetails?.contextGroupStates;n&&(t?.closeExistingWindows||this.updateExistingClients(n),this.rehydrateContextGroupStates(n))}updateExistingClients(e){this.interopClients.forEach((t=>{const{clientIdentity:n,contextGroupId:r,contextHandlers:o}=t;if(r){const t=e[r];for(const[,e]of Object.entries(t))o.forEach((t=>{const{handlerId:r,contextType:o}=t;i.isContextTypeCompatible(e.type,o)&&this.invokeContextHandler(n,r,e)}))}}))}getContextGroupStates(){return i.toObject(this.contextGroupsById)}rehydrateContextGroupStates(e){const t=Object.entries(e);for(const[e,n]of t){const t=Object.entries(n);for(const[n,i]of t)if(this.contextGroupsById.has(e)){this.contextGroupsById.get(e).set(n,i)}else console.warn(`Attempting to set a context group that isn't in the context group mapping. Skipping context group rehydration for: ${e}`)}}contextHandlerRegistered({contextType:e,handlerId:t},n){const i={contextType:e,handlerId:t},r=this.getClientState(n);if(r?.contextHandlers.set(t,i),r&&r.contextGroupId){const{contextGroupId:i}=r,o=this.contextGroupsById.get(i);if(void 0===e)o.forEach(((e,i)=>{this.invokeContextHandler(n,t,e)}));else if(o.has(e)){const i=o.get(e);i&&this.invokeContextHandler(n,t,i)}}}async intentHandlerRegistered(e,t){const{handlerId:n}=e,i=this.intentClientMap.get(t.name),r=i?.get(n);if(i)if(r){const{pendingIntents:e}=r;r.clientIdentity=t,r.isReady=!0;try{if(e.length>0){const i=e[e.length-1];await this.invokeIntentHandler(t,n,i),r.pendingIntents=[]}}catch(e){console.error(`Error invoking intent handler: ${n} for client ${t.uuid}/${t.name}/${t.endpointId}`)}}else i.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t});else{this.intentClientMap.set(t.name,new Map);const e=this.intentClientMap.get(t.name);e&&e.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t})}}removeContextHandler({handlerId:e},t){const n=this.getClientState(t);n&&n.contextHandlers.delete(e)}handleJoinSessionContextGroup({sessionContextGroupId:e},t){try{if(!e)throw new Error(\"Failed to join session context group: must specify group id.\");const n=this.sessionContextGroupMap.get(e);if(n)n.registerNewClient(t);else{const n=new h.default(this.channel,e);n.registerNewClient(t),this.sessionContextGroupMap.set(e,n)}return{hasConflict:this.contextGroupsById.has(e)}}catch(e){throw new Error(e)}}getClientState(e){return this.interopClients.get(e.endpointId)}static toObject(e){const t=Object.fromEntries(e),n={};return Object.entries(t).forEach((([e,t])=>{const i=Object.fromEntries(t);n[e]=i})),n}static checkContextIntegrity(e){if(!e)return{isValid:!1,reason:\"No context supplied\"};if(\"object\"!=typeof e)return{isValid:!1,reason:\"Context must be an Object\"};if(!e.type)return{isValid:!1,reason:\"Context must have a type property\"};if(e.id&&\"object\"!=typeof e.id)return{isValid:!1,reason:\"Context id must be an Object populated with key-value identifiers (if set)\"};if(e.id){const{id:t}=e,n=Object.keys(t);let i=!1;if(!n.length)return{isValid:!1,reason:\"Context id must have at least one key-value identifier\"};if(n.forEach((e=>{\"string\"==typeof e&&\"string\"==typeof t[e]||(i=!0)})),i)return{isValid:!1,reason:\"Context id key-value identifiers must be of type string\"}}return e.name&&\"string\"!=typeof e.name?{isValid:!1,reason:\"Context name must be of string type (if set)\"}:{isValid:!0}}static hasEndpointId(e){return void 0!==e.endpointId}static isContextTypeCompatible(e,t){return void 0===t||e===t}setContextGroupMap(){for(const e of this.getContextGroups())this.contextGroupsById.set(e.id,new Map)}async setCurrentContextGroupInClientOptions(e,t){try{const n=await this.fin.System.getEntityInfo(e.uuid,e.name);let i;\"view\"===n.entityType?i=await this.fin.View.wrap(e):\"window\"===n.entityType&&(i=await this.fin.Window.wrap(e)),i&&await i.updateOptions({interop:{currentContextGroup:t}})}catch(e){}}async setupChannelProvider(){try{const e=await this.getProvider();this.channel=e,this.wireChannel(e)}catch(e){throw new Error(`Error setting up Interop Broker Channel Provider: ${e}`)}}wireChannel(e){e.onConnection((async(e,t)=>{if(!await this.isConnectionAuthorized(e,t))throw new Error(`Connection not authorized for ${e.uuid}, ${e.name}`);if(!e.endpointId)throw new Error(\"Version too old to be compatible with Interop. Please upgrade your runtime to a more recent version.\");const n={contextGroupId:void 0,contextHandlers:new Map,clientIdentity:e};t?.currentContextGroup&&this.contextGroupsById.has(t.currentContextGroup)&&(n.contextGroupId=t?.currentContextGroup),this.interopClients.set(e.endpointId,n)})),e.onDisconnection((e=>{this.interopClients.delete(e.endpointId);const t=this.intentClientMap.get(e.name);t&&e.uuid===this.fin.me.uuid&&t.forEach((e=>{e.isReady=!1})),this.sessionContextGroupMap.forEach((t=>{t.onDisconnection(e)})),this.clientDisconnected(e)})),e.beforeAction((async(e,t,n)=>{if(!await this.isActionAuthorized(e,t,n))throw new Error(`Action (${e}) not authorized for ${n.uuid}, ${n.name}`);this.logging?.beforeAction?.enabled&&console.log(e,t,n)})),e.afterAction(((e,t,n)=>{this.logging?.afterAction?.enabled&&console.log(e,t,n)})),e.register(\"setContext\",this.setContext.bind(this)),e.register(\"fireIntent\",this.handleFiredIntent.bind(this)),e.register(\"getCurrentContext\",this.getCurrentContext.bind(this)),e.register(\"getInfoForIntent\",this.handleInfoForIntent.bind(this)),e.register(\"getInfoForIntentsByContext\",this.handleInfoForIntentsByContext.bind(this)),e.register(\"fireIntentForContext\",this.handleFiredIntentForContext.bind(this)),e.register(\"getContextGroups\",this.getContextGroups.bind(this)),e.register(\"joinContextGroup\",this.joinContextGroup.bind(this)),e.register(\"removeFromContextGroup\",this.removeFromContextGroup.bind(this)),e.register(\"getAllClientsInContextGroup\",this.getAllClientsInContextGroup.bind(this)),e.register(\"getInfoForContextGroup\",this.getInfoForContextGroup.bind(this)),e.register(\"contextHandlerRegistered\",this.contextHandlerRegistered.bind(this)),e.register(\"intentHandlerRegistered\",this.intentHandlerRegistered.bind(this)),e.register(\"removeContextHandler\",this.removeContextHandler.bind(this)),e.register(\"sessionContextGroup:createIfNeeded\",this.handleJoinSessionContextGroup.bind(this)),e.register(\"fdc3Open\",this.fdc3HandleOpen.bind(this)),e.register(\"fdc3v2FindIntentsByContext\",this.handleInfoForIntentsByContext.bind(this)),e.register(\"fdc3FindInstances\",this.fdc3HandleFindInstances.bind(this)),e.register(\"fdc3GetAppMetadata\",this.fdc3HandleGetAppMetadata.bind(this)),e.register(\"fdc3v2GetInfo\",(async(e,t)=>this.fdc3HandleGetInfo.bind(this)(e,t))),e.register(\"createPrivateChannelProvider\",(async e=>{const{channelId:t}=e,n=await this.fin.InterApplicationBus.Channel.create(t);p.PrivateChannelProvider.init(n,t)}))}isConnectionAuthorized(e,t){return this.wire.sendAction(\"interop-broker-is-connection-authorized\").catch((e=>{})),Promise.resolve(!0)}isActionAuthorized(e,t,n){return this.wire.sendAction(\"interop-broker-is-action-authorized\").catch((e=>{})),Promise.resolve(!0)}};return Gi.InteropBroker=f,e=new WeakMap,t=new WeakMap,n=new WeakMap,Gi}var zi,Ki={},qi={},Ji=s&&s.__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},Yi=s&&s.__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)};Object.defineProperty(qi,\"__esModule\",{value:!0});const Zi=d,Qi=Hi;class Xi extends Zi.Base{constructor(e,t,n){super(e),zi.set(this,void 0),this.id=n,Ji(this,zi,t,\"f\")}async setContext(e){this.wire.sendAction(\"interop-session-context-group-set-context\").catch((e=>{}));return(await Yi(this,zi,\"f\")).dispatch(`sessionContextGroup:setContext-${this.id}`,{sessionContextGroupId:this.id,context:e})}async getCurrentContext(e){this.wire.sendAction(\"interop-session-context-group-get-context\").catch((e=>{}));return(await Yi(this,zi,\"f\")).dispatch(`sessionContextGroup:getContext-${this.id}`,{sessionContextGroupId:this.id,type:e})}async addContextHandler(e,t){if(this.wire.sendAction(\"interop-session-context-group-add-handler\").catch((e=>{})),\"function\"!=typeof e)throw new Error(\"Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.\");const n=await Yi(this,zi,\"f\");let i;return i=t?`sessionContextHandler:invoke-${this.id}-${t}-${(0,Qi.generateId)()}`:`sessionContextHandler:invoke-${this.id}`,n.register(i,(0,Qi.wrapContextHandler)(e,i)),await n.dispatch(`sessionContextGroup:handlerAdded-${this.id}`,{handlerId:i,contextType:t}),{unsubscribe:await this.createUnsubscribeCb(i)}}async createUnsubscribeCb(e){const t=await Yi(this,zi,\"f\");return async()=>{t.remove(e),await t.dispatch(`sessionContextGroup:handlerRemoved-${this.id}`,{handlerId:e})}}getUserInstance(){return{id:this.id,setContext:(0,Qi.wrapInTryCatch)(this.setContext.bind(this),\"Failed to set context: \"),getCurrentContext:(0,Qi.wrapInTryCatch)(this.getCurrentContext.bind(this),\"Failed to get context: \"),addContextHandler:(0,Qi.wrapInTryCatch)(this.addContextHandler.bind(this),\"Failed to add context handler: \")}}}qi.default=Xi,zi=new WeakMap;var er={},tr={},nr={},ir={},rr=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),or=s&&s.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,\"default\",{enumerable:!0,value:t})}:function(e,t){e.default=t}),sr=s&&s.__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)&&rr(t,e,n);return or(t,e),t};Object.defineProperty(ir,\"__esModule\",{value:!0}),ir.PrivateChannelClient=void 0;const ar=sr(Hi);var cr,dr;function hr(){if(cr)return tr;cr=1;var e,t=s&&s.__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)},n=s&&s.__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},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(tr,\"__esModule\",{value:!0}),tr.FDC3ModuleBase=void 0;const o=nr,a=Hi,c=wr(),d=r(i);return tr.FDC3ModuleBase=class{get client(){return t(this,e,\"f\").call(this)}get fin(){return this.wire.getFin()}constructor(t,i){this.wire=i,e.set(this,void 0),n(this,e,t,\"f\")}async broadcast(e){return this.wire.sendAction(\"fdc3-broadcast\").catch((e=>{})),this.client.setContext(e)}async _open(e,t){this.wire.sendAction(\"fdc3-open\").catch((e=>{}));try{return await c.InteropClient.ferryFdc3Call(this.client,\"fdc3Open\",{app:e,context:t})}catch(e){const t=e.message===a.BROKER_ERRORS.fdc3Open?\"ResolverUnavailable\":e.message;throw new Error(t)}}async _getChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:\"system\",...(0,o.getUnsupportedChannelApis)()})))}async getOrCreateChannel(e){this.wire.sendAction(\"fdc3-get-or-create-channel\").catch((e=>{}));const t=(await this._getChannels()).find((t=>t.id===e));if(t)return{...t,type:\"system\",...(0,o.getUnsupportedChannelApis)()};try{const t=await this.client.joinSessionContextGroup(e);return(0,o.buildAppChannelObject)(t)}catch(e){throw console.error(e.message),new Error(o.ChannelError.CreationFailed)}}async getSystemChannels(){return this.wire.sendAction(\"fdc3-get-system-channels\").catch((e=>{})),this._getChannels()}async joinChannel(e){this.wire.sendAction(\"fdc3-join-channel\").catch((e=>{}));try{return await this.client.joinContextGroup(e)}catch(e){if(e.message===a.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup?console.error(\"The Channel you have tried to join is an App Channel. Custom Channels can only be defined by the Interop Broker through code or manifest configuration. Please use getOrCreateChannel.\"):console.error(e.message),e.message.startsWith(\"Attempting to join a context group that does not exist\"))throw new Error(o.ChannelError.NoChannelFound);throw new Error(o.ChannelError.AccessDenied)}}async getCurrentChannel(){this.wire.sendAction(\"fdc3-get-current-channel\").catch((e=>{}));const e=await this.getCurrentContextGroupInfo();return e?this.buildChannelObject(e):null}async leaveCurrentChannel(){return this.wire.sendAction(\"fdc3-leave-current-channel\").catch((e=>{})),this.client.removeFromContextGroup()}async getCurrentContextGroupInfo(){const e=await this.client.getContextGroups(),t=e.map((async e=>this.client.getAllClientsInContextGroup(e.id))),n=(await Promise.all(t)).findIndex((e=>e.some((e=>{const{uuid:t,name:n}=e;return this.wire.me.uuid===t&&this.wire.me.name===n}))));return e[n]}async buildChannelObject(e){return{...e,type:\"system\",addContextListener:(...[e,t])=>{let n,i;\"function\"==typeof e?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),n=e):(n=t,\"string\"==typeof e&&(i=e));const r=(async()=>{let e=!0;const t=await this.client.getCurrentContext(i);return this.client.addContextHandler(((i,r)=>{if(!e||(e=!1,!(0,d.default)(t,i)))return n(i,r)}),i)})();return{...r,unsubscribe:()=>r.then((e=>e.unsubscribe()))}},broadcast:this.broadcast.bind(this),getCurrentContext:async e=>{const t=await this.client.getCurrentContext(e);return void 0===t?null:t}}}},e=new WeakMap,tr}ir.PrivateChannelClient=class{constructor(e,t){this.id=t,this.client=e,this.listeners=new Map}async broadcast(e){return this.client.dispatch(\"broadcast\",{context:e})}async getCurrentContext(e){return this.client.dispatch(\"getCurrentContext\",{contextType:e})}async addContextListener(e,t){if(\"function\"!=typeof t)throw new Error(\"Non-function argument passed to the second parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.\");let n;n=e?`contextHandler:invoke-${this.id}-${e}-${ar.generateId()}`:`contextHandler:invoke-${this.id}-${ar.generateId()}`,this.client.register(n,ar.wrapContextHandler(t,n));const i={unsubscribe:await this.createContextUnsubscribeCb(n)};return this.listeners.set(n,i),await this.client.dispatch(\"contextHandlerAdded\",{handlerId:n,contextType:e}),i}createNonStandardUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch(\"nonStandardHandlerRemoved\",{handlerId:e})}}createContextUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch(\"contextHandlerRemoved\",{handlerId:e})}}onAddContextListener(e){const t=`onContextHandlerAdded:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch(\"onAddContextHandlerAdded\",{handlerId:t}),n}onDisconnect(e){const t=`onDisconnect:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch(\"onDisconnectHandlerAdded\",{handlerId:t}),n}onUnsubscribe(e){const t=`onUnsubscribe:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch(\"onUnsubscribeHandlerAdded\",{handlerId:t}),n}async cleanUpAllSubs(){Array.from(this.listeners.keys()).forEach((e=>{this.client.remove(e),this.listeners.delete(e)}))}async disconnect(){try{await this.client.dispatch(\"clientDisconnecting\"),await this.cleanUpAllSubs(),await this.client.disconnect()}catch(e){throw new Error(e.message)}}},function(e){var t=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,\"__esModule\",{value:!0}),e.getIntentResolution=e.isChannel=e.isContext=e.connectPrivateChannel=e.buildAppChannelObject=e.buildPrivateChannelObject=e.ChannelError=e.ResultError=e.UnsupportedChannelApiError=e.getUnsupportedChannelApis=void 0;const n=Hi,r=ir,o=t(i);e.getUnsupportedChannelApis=e=>({addContextListener:()=>{throw new a(\"Channel.addContextListener\",e)},broadcast:()=>{throw new a(\"Channel.broadcast\",e)},getCurrentContext:()=>{throw new a(\"Channel.getCurrentContext\",e)}});class a extends Error{constructor(e,t=\"System\"){super(e),this.message=`Calling ${e} on an instance of a ${t} Channel returned by fdc3.get${t}Channels is not supported. If you would like to use a ${t} Channel, please use fdc3.joinChannel, fdc3.addContextListener, and fdc3.broadcast instead.`}}var c,d;e.UnsupportedChannelApiError=a,function(e){e.NoResultReturned=\"NoResultReturned\",e.IntentHandlerRejected=\"IntentHandlerRejected\"}(c=e.ResultError||(e.ResultError={})),(d=e.ChannelError||(e.ChannelError={})).NoChannelFound=\"NoChannelFound\",d.AccessDenied=\"AccessDenied\",d.CreationFailed=\"CreationFailed\";e.buildPrivateChannelObject=e=>{let t=!1;const n=()=>{if(t)throw new Error(\"Private Channel Client has been disconnected from the Private Channel\")};return{id:e.id,type:\"private\",broadcast:async t=>(n(),e.broadcast(t)),getCurrentContext:async t=>(n(),e.getCurrentContext(t)),addContextListener:async(t,i)=>{n();let r=i,o=t;\"function\"==typeof t&&(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),r=t,o=null);return e.addContextListener(o,r)},onAddContextListener:t=>(n(),e.onAddContextListener(t)),disconnect:async()=>(n(),t=!0,e.disconnect()),onDisconnect:t=>(n(),e.onDisconnect(t)),onUnsubscribe:t=>(n(),e.onUnsubscribe(t))}};e.buildAppChannelObject=e=>({id:e.id,type:\"app\",broadcast:e.setContext,getCurrentContext:async t=>{const n=await e.getCurrentContext(t);return void 0===n?null:n},addContextListener:(t,n)=>{let i,r;\"function\"==typeof t?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),i=t):(i=n,\"string\"==typeof t&&(r=t));const s=(async()=>{let t=!0;const n=await e.getCurrentContext(r);return e.addContextHandler(((e,r)=>{if(!t||(t=!1,!(0,o.default)(n,e)))return i(e,r)}),r)})();return{...s,unsubscribe:()=>s.then((e=>e.unsubscribe()))}}});e.connectPrivateChannel=async t=>{try{const n=await fin.InterApplicationBus.Channel.connect(t),i=new r.PrivateChannelClient(n,t);return(0,e.buildPrivateChannelObject)(i)}catch(e){throw new Error(`Private Channel with id: ${t} doesn't exist`)}};e.isContext=e=>{if(e&&\"object\"==typeof e&&\"type\"in e){const{type:t}=e;return\"string\"==typeof t}return!1};e.isChannel=e=>{if(e&&\"object\"==typeof e&&\"type\"in e&&\"id\"in e){const{type:t,id:n}=e;return\"string\"==typeof t&&\"string\"==typeof n&&(\"app\"===t||\"private\"===t)}return!1};e.getIntentResolution=async(t,i,r,o)=>{const s=(0,n.generateId)(),a=new Promise(((e,t)=>{fin.InterApplicationBus.subscribe({uuid:\"*\"},s,(t=>{e(t)})).catch((()=>t(new Error(\"getResult is not supported in this environment\"))))})),d=r?{target:r,intentResolutionResultId:s}:{intentResolutionResultId:s},h=o?{name:o,context:i,metadata:d}:{...i,metadata:d},l=async()=>{let n=await a;if(!n||\"object\"!=typeof n)throw new Error(c.NoResultReturned);const{error:i}=n;if(i)throw new Error(c.IntentHandlerRejected);if((0,e.isChannel)(n)){const{id:i,type:r}=n;switch(r){case\"private\":n=await(0,e.connectPrivateChannel)(i);break;case\"app\":{const r=await t.joinSessionContextGroup(i);n=(0,e.buildAppChannelObject)(r);break}}}else if(!(0,e.isContext)(n))throw new Error(c.NoResultReturned);return n},u=o?await t.fireIntent(h):await t.fireIntentForContext(h);return\"object\"!=typeof u?{source:{appId:\"\",instanceId:\"\"},intent:\"\",version:\"2.0\",getResult:l}:{...u,getResult:l}}}(nr);var lr,ur,pr={};function wr(){if(ur)return Ki;ur=1;var e,t,n=s&&s.__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},i=s&&s.__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)},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ki,\"__esModule\",{value:!0}),Ki.InteropClient=void 0;const o=d,a=r(qi),c=function(){if(dr)return er;dr=1,Object.defineProperty(er,\"__esModule\",{value:!0}),er.Fdc3Module=void 0;const e=Hi,t=hr();class n extends t.FDC3ModuleBase{async open(e,t){await super._open(e,t)}addContextListener(e,t){let n;return this.wire.sendAction(\"fdc3-add-context-listener\").catch((e=>{})),\"function\"==typeof e?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),n=this.client.addContextHandler(e)):n=this.client.addContextHandler(t,null===e?void 0:e),{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}addIntentListener(e,t){this.wire.sendAction(\"fdc3-add-intent-listener\").catch((e=>{}));const n=this.client.registerIntentHandler((e=>{const{context:n,metadata:i}=e,{metadata:r}=n,o=i?.intentResolutionResultId||r?.intentResolutionResultId;o&&this.fin.InterApplicationBus.publish(o,null).catch((()=>null)),t(e.context)}),e,{fdc3Version:\"1.2\"});return{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}async raiseIntent(t,n,i){this.wire.sendAction(\"fdc3-raise-intent\").catch((e=>{}));const r=i?{name:t,context:n,metadata:{target:i}}:{name:t,context:n};try{return await this.client.fireIntent(r)}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntent?\"ResolverUnavailable\":t.message;throw new Error(n)}}async findIntent(t,n){this.wire.sendAction(\"fdc3-find-intent\").catch((e=>{}));try{return await this.client.getInfoForIntent({name:t,context:n})}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntent?\"ResolverUnavailable\":t.message;throw new Error(n)}}async findIntentsByContext(t){this.wire.sendAction(\"fdc3-find-intents-by-context\").catch((e=>{}));try{return await this.client.getInfoForIntentsByContext(t)}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntentsByContext?\"ResolverUnavailable\":t.message;throw new Error(n)}}async raiseIntentForContext(t,n){this.wire.sendAction(\"fdc3-raise-intent-for-context\").catch((e=>{}));try{return await this.client.fireIntentForContext({...t,metadata:{target:n}})}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntentForContext?\"ResolverUnavailable\":t.message;throw new Error(n)}}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}getInfo(){return this.wire.sendAction(\"fdc3-get-info\").catch((e=>{})),{providerVersion:this.wire.environment.getAdapterVersionSync(),provider:`openfin-${this.wire.me.uuid}`,fdc3Version:\"1.2\"}}}return er.Fdc3Module=n,er}(),h=function(){if(lr)return pr;lr=1,Object.defineProperty(pr,\"__esModule\",{value:!0}),pr.Fdc3Module2=void 0;const e=hr(),t=Hi,n=wr(),i=nr,r=ir;class o extends e.FDC3ModuleBase{async open(e,t){return\"string\"==typeof e&&console.warn(\"Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).\"),super._open(e,t)}async findInstances(e){this.wire.sendAction(\"fdc3-find-instances\").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,\"fdc3FindInstances\",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3FindInstances?\"ResolverUnavailable\":e.message;throw new Error(n)}}async getAppMetadata(e){this.wire.sendAction(\"fdc3-get-app-metadata\").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,\"fdc3GetAppMetadata\",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3GetAppMetadata?\"ResolverUnavailable\":e.message;throw new Error(n)}}async addContextListener(e,t){this.wire.sendAction(\"fdc3-add-context-listener\").catch((e=>{}));const n=e=>t=>{const{contextMetadata:n,...i}=t,r=n?[{...i},n]:[t,null];e(...r)};let i=t,r=n(i);return\"function\"==typeof e?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),i=e,r=n(i),this.client.addContextHandler(r)):this.client.addContextHandler(r,null===e?void 0:e)}async findIntent(e,n,i){this.wire.sendAction(\"fdc3-find-intent\").catch((e=>{}));try{return await this.client.getInfoForIntent({name:e,context:n,metadata:{resultType:i}})}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntent?\"ResolverUnavailable\":e.message;throw new Error(n)}}async findIntentsByContext(e,i){this.wire.sendAction(\"fdc3-find-intents-by-context\").catch((e=>{}));const r=i?{context:e,metadata:{resultType:i}}:e;try{return await n.InteropClient.ferryFdc3Call(this.client,\"fdc3v2FindIntentsByContext\",r)}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntentsByContext?\"ResolverUnavailable\":e.message;throw new Error(n)}}async raiseIntent(e,n,r){this.wire.sendAction(\"fdc3-raise-intent\").catch((e=>{}));try{return\"string\"==typeof r&&console.warn(\"Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).\"),(0,i.getIntentResolution)(this.client,n,r,e)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?\"ResolverUnavailable\":e.message;throw new Error(n)}}async raiseIntentForContext(e,n){this.wire.sendAction(\"fdc3-raise-intent-for-context\").catch((e=>{}));try{return\"string\"==typeof n&&console.warn(\"Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).\"),(0,i.getIntentResolution)(this.client,e,n)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?\"ResolverUnavailable\":e.message;throw new Error(n)}}async addIntentListener(e,t){if(this.wire.sendAction(\"fdc3-add-intent-listener\").catch((e=>{})),\"string\"!=typeof e)throw new Error(\"First argument must be an Intent name\");return this.client.registerIntentHandler((async e=>{let n,i;const{context:r,metadata:o}=e,{contextMetadata:s,metadata:a,...c}=r,d=o?.intentResolutionResultId||a?.intentResolutionResultId;try{const e=a?{metadata:a,...c}:{...c};n=await t(e,s),i=n}catch(e){n=e,i={error:!0}}if(d&&this.fin.InterApplicationBus.publish(d,i).catch((()=>null)),n instanceof Error)throw new Error(n.message);return n}),e,{fdc3Version:\"2.0\"})}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}async createPrivateChannel(){const e=(0,t.generateId)();await n.InteropClient.ferryFdc3Call(this.client,\"createPrivateChannelProvider\",{channelId:e});const o=await this.fin.InterApplicationBus.Channel.connect(e),s=new r.PrivateChannelClient(o,e);return(0,i.buildPrivateChannelObject)(s)}async getUserChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:\"user\",...(0,i.getUnsupportedChannelApis)(\"User\")})))}async getSystemChannels(){return console.warn(\"This API has been deprecated. Please use fdc3.getUserChannels instead.\"),super.getSystemChannels()}async joinUserChannel(e){return super.joinChannel(e)}async joinChannel(e){return console.warn(\"This API has been deprecated. Please use fdc3.joinUserChannel instead.\"),super.joinChannel(e)}async getCurrentChannel(){const e=await super.getCurrentChannel();return e?{...e,type:\"user\",broadcast:this.broadcast.bind(this)}:null}async getInfo(){return n.InteropClient.ferryFdc3Call(this.client,\"fdc3v2GetInfo\",{fdc3Version:\"2.0\"})}}return pr.Fdc3Module2=o,pr}(),l=Hi;let u=class extends o.Base{constructor(i,r){super(i),e.set(this,void 0),t.set(this,void 0),n(this,t,new Map,\"f\"),n(this,e,r,\"f\")}async setContext(t){this.wire.sendAction(\"interop-client-set-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"setContext\",{context:t})}async addContextHandler(t,n){if(this.wire.sendAction(\"interop-client-add-context-handler\").catch((e=>{})),\"function\"!=typeof t)throw new Error(\"Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.\");const r=await i(this,e,\"f\");let o;o=n?`invokeContextHandler-${n}-${(0,l.generateId)()}`:\"invokeContextHandler\";const s=(0,l.wrapContextHandler)(t,o);return r.register(o,s),await r.dispatch(\"contextHandlerRegistered\",{handlerId:o,contextType:n}),{unsubscribe:async()=>{r.remove(o),await r.dispatch(\"removeContextHandler\",{handlerId:o})}}}async getContextGroups(){this.wire.sendAction(\"interop-client-get-context-groups\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getContextGroups\")}async joinContextGroup(t,n){this.wire.sendAction(\"interop-client-join-context-group\").catch((e=>{}));const r=await i(this,e,\"f\");if(!t)throw new Error(\"No contextGroupId specified for joinContextGroup.\");return r.dispatch(\"joinContextGroup\",{contextGroupId:t,target:n})}async removeFromContextGroup(t){this.wire.sendAction(\"interop-client-remove-from-context-group\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"removeFromContextGroup\",{target:t})}async getAllClientsInContextGroup(t){this.wire.sendAction(\"interop-client-get-all-clients-in-context-group\").catch((e=>{}));const n=await i(this,e,\"f\");if(!t)throw new Error(\"No contextGroupId specified for getAllClientsInContextGroup.\");return n.dispatch(\"getAllClientsInContextGroup\",{contextGroupId:t})}async getInfoForContextGroup(t){this.wire.sendAction(\"interop-client-get-info-for-context-group\").catch((e=>{}));const n=await i(this,e,\"f\");if(!t)throw new Error(\"No contextGroupId specified for getInfoForContextGroup.\");return n.dispatch(\"getInfoForContextGroup\",{contextGroupId:t})}async fireIntent(t){this.wire.sendAction(\"interop-client-fire-intent\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"fireIntent\",t)}async registerIntentHandler(t,n,r){this.wire.sendAction(\"interop-client-register-intent-handler\").catch((e=>{}));const o=await i(this,e,\"f\"),s=`intent-handler-${n}`,a=(0,l.wrapIntentHandler)(t,s);try{await o.register(s,a),await o.dispatch(\"intentHandlerRegistered\",{handlerId:s,...r})}catch(e){throw new Error(\"Unable to register intent handler\")}return{unsubscribe:async()=>{o.remove(s)}}}async getCurrentContext(t){this.wire.sendAction(\"interop-client-get-current-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getCurrentContext\",{contextType:t})}async getInfoForIntent(t){this.wire.sendAction(\"interop-client-get-info-for-intent\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getInfoForIntent\",t)}async getInfoForIntentsByContext(t){this.wire.sendAction(\"interop-client-get-info-for-intents-by-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getInfoForIntentsByContext\",t)}async fireIntentForContext(t){this.wire.sendAction(\"interop-client-fire-intent-for-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"fireIntentForContext\",t)}async joinSessionContextGroup(n){try{const r=i(this,t,\"f\").get(n);if(r)return r.getUserInstance();const o=await i(this,e,\"f\"),{hasConflict:s}=await o.dispatch(\"sessionContextGroup:createIfNeeded\",{sessionContextGroupId:n});s&&console.warn(`A (non-session) context group with the name \"${n}\" already exists. If you are trying to join a Context Group, call joinContextGroup instead.`);const c=new a.default(this.wire,i(this,e,\"f\"),n);return i(this,t,\"f\").set(n,c),c.getUserInstance()}catch(e){throw console.error(`Error thrown trying to create Session Context Group with id \"${n}\": ${e}`),e}}async onDisconnection(t){this.wire.sendAction(\"interop-client-add-ondisconnection-listener\").catch((e=>{}));return(await i(this,e,\"f\")).onDisconnection((e=>{const{uuid:n}=e;t({type:\"interop-broker\",topic:\"disconnected\",brokerName:n})}))}getFDC3Sync(e){switch(e){case\"1.2\":return new c.Fdc3Module((()=>this),this.wire);case\"2.0\":return new h.Fdc3Module2((()=>this),this.wire);default:throw new Error(`Invalid FDC3 version provided: ${e}. Must be '1.2' or '2.0'`)}}async getFDC3(e){return this.getFDC3Sync(e)}static async ferryFdc3Call(t,n,r){return(await i(t,e,\"f\")).dispatch(n,r||null)}};return Ki.InteropClient=u,e=new WeakMap,t=new WeakMap,Ki}var yr,fr,gr,mr={};function vr(){if(yr)return mr;yr=1,Object.defineProperty(mr,\"__esModule\",{value:!0}),mr.overrideCheck=mr.checkFDC32Overrides=mr.getDefaultViewFdc3VersionFromAppInfo=void 0;const e=Vi();function t(t){return[\"fdc3HandleFindInstances\",\"handleInfoForIntent\",\"handleInfoForIntentsByContext\",\"fdc3HandleGetAppMetadata\",\"fdc3HandleGetInfo\",\"fdc3HandleOpen\",\"handleFiredIntent\",\"handleFiredIntentForContext\"].filter((n=>t[n]===e.InteropBroker.prototype[n]))}return mr.getDefaultViewFdc3VersionFromAppInfo=function({manifest:e,initialOptions:t}){const n=e?.platform?.defaultViewOptions?.fdc3InteropApi??t.defaultViewOptions?.fdc3InteropApi;return[\"1.2\",\"2.0\"].includes(n??\"\")?n:void 0},mr.checkFDC32Overrides=t,mr.overrideCheck=function(e,n){if(n&&\"2.0\"===n){const n=t(e);n.length>0&&console.warn(`WARNING: FDC3 2.0 has been set as a default option for Views in this Platform, but the required InteropBroker APIs for FDC3 2.0 compliance have not all been overridden.\\nThe following APIs need to be overridden:\\n${n.join(\"\\n\")}`)}},mr}function Cr(){return gr||(gr=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),i=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),i(function(){if(fr)return Ti;fr=1;var e=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ti,\"__esModule\",{value:!0}),Ti.InteropModule=void 0;const t=e(n),i=$i,r=d,o=Vi(),a=wr(),c=vr(),h=Tn,l=e=>new e,u=\"You have attempted to use or modify InteropBroker parameters, which is not allowed. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.\";class p extends r.Base{async init(e,n=l){this.wire.sendAction(\"interop-init\").catch((()=>{}));const r=await this.wire.environment.getInteropInfo(this.wire.getFin()),s=(0,i.createUnusableObject)(u),a=(0,i.createWarningObject)(u,(0,t.default)(r)),d=async()=>{throw new Error(u)},p=o.InteropBroker.createClosedConstructor(this.wire,(()=>this.fin.InterApplicationBus.Channel.create(`interop-broker-${e}`)),r);let w;return w=Array.isArray(n)?new((0,h.overrideFromComposables)(...n)(p))(s,d,a):await n(p,s,d,a),(0,c.overrideCheck)(w,r.fdc3Version),w}connectSync(e,t){return this.wire.sendAction(\"interop-connect-sync\").catch((()=>{})),new a.InteropClient(this.wire,this.wire.environment.whenReady().then((()=>this.fin.InterApplicationBus.Channel.connect(`interop-broker-${e}`,{payload:t}))))}}return Ti.InteropModule=p,Ti}(),e),i(wr(),e),i(Vi(),e)}(Li)),Li}var br={},Ir={},Er={},xr={};Object.defineProperty(xr,\"__esModule\",{value:!0}),xr.getSnapshotSourceChannelName=void 0;xr.getSnapshotSourceChannelName=e=>`snapshot-source-provider-${e.uuid}`;var Ar,Pr,Mr,_r,Or,Sr=s&&s.__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},Rr=s&&s.__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)};Object.defineProperty(Er,\"__esModule\",{value:!0}),Er.SnapshotSource=void 0;const Fr=d,jr=xr,kr=new Map;class Lr extends Fr.Base{constructor(e,t){super(e),Ar.set(this,void 0),Pr.set(this,(()=>(kr.has(this.identity.uuid)||kr.set(this.identity.uuid,{eventFired:null,clientPromise:null}),kr.get(this.identity.uuid)))),Mr.set(this,(()=>(Rr(this,Pr,\"f\").call(this).clientPromise||(Rr(this,Pr,\"f\").call(this).clientPromise=Rr(this,_r,\"f\").call(this)),Rr(this,Pr,\"f\").call(this).clientPromise))),_r.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);try{Rr(this,Pr,\"f\").call(this).eventFired||await Rr(this,Or,\"f\").call(this);const t=await this.fin.InterApplicationBus.Channel.connect(e,{wait:!1});return t.onDisconnection((()=>{Rr(this,Pr,\"f\").call(this).clientPromise=null,Rr(this,Pr,\"f\").call(this).eventFired=null})),t}catch(e){throw Rr(this,Pr,\"f\").call(this).clientPromise=null,new Error(\"The targeted SnapshotSource is not currently initialized. Await this object's ready() method.\")}})),Or.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);let t,n;const i=new Promise(((e,i)=>{t=e,n=i}));Rr(this,Pr,\"f\").call(this).eventFired=i;const r=async i=>{try{i.channelName===e&&(t(),await this.fin.InterApplicationBus.Channel.removeListener(\"connected\",r))}catch(e){n(e)}};await this.fin.InterApplicationBus.Channel.on(\"connected\",r)})),Sr(this,Ar,t,\"f\")}get identity(){return Rr(this,Ar,\"f\")}async ready(){this.wire.sendAction(\"snapshot-source-ready\").catch((e=>{}));try{await Rr(this,Mr,\"f\").call(this)}catch(e){await Rr(this,Pr,\"f\").call(this).eventFired}}async getSnapshot(){this.wire.sendAction(\"snapshot-source-get-snapshot\").catch((e=>{}));const e=await Rr(this,Mr,\"f\").call(this),t=await e.dispatch(\"get-snapshot\");return(await t).snapshot}async applySnapshot(e){this.wire.sendAction(\"snapshot-source-apply-snapshot\").catch((e=>{}));return(await Rr(this,Mr,\"f\").call(this)).dispatch(\"apply-snapshot\",{snapshot:e})}}Er.SnapshotSource=Lr,Ar=new WeakMap,Pr=new WeakMap,Mr=new WeakMap,_r=new WeakMap,Or=new WeakMap,Object.defineProperty(Ir,\"__esModule\",{value:!0}),Ir.SnapshotSourceModule=void 0;const Tr=d,$r=Er,Br=xr;class Gr extends Tr.Base{async init(e){if(this.wire.sendAction(\"snapshot-source-init\").catch((e=>{})),\"object\"!=typeof e||\"function\"!=typeof e.getSnapshot||\"function\"!=typeof e.applySnapshot)throw new Error(\"you must pass in a valid SnapshotProvider\");const t=await this.fin.InterApplicationBus.Channel.create((0,Br.getSnapshotSourceChannelName)(this.fin.me));t.register(\"get-snapshot\",(async()=>({snapshot:await e.getSnapshot()}))),t.register(\"apply-snapshot\",(({snapshot:t})=>e.applySnapshot(t)))}wrapSync(e){return this.wire.sendAction(\"snapshot-source-wrap-sync\").catch((e=>{})),new $r.SnapshotSource(this.wire,e)}async wrap(e){return this.wire.sendAction(\"snapshot-source-wrap\").catch((e=>{})),this.wrapSync(e)}}Ir.SnapshotSourceModule=Gr,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Ir,e),n(Er,e)}(br),Object.defineProperty(a,\"__esModule\",{value:!0});var Wr=a.Fin=void 0;const Hr=t,Nr=c,Dr=ie(),Ur=Z(),Vr=de,zr=en,Kr=rn,qr=un,Jr=bn,Yr=J(),Zr=An,Qr=ki,Xr=Cr(),eo=br;class to extends Hr.EventEmitter{constructor(e){super(),this.wire=e,this.System=new Nr.System(e),this.Window=new Dr._WindowModule(e),this.Application=new Ur.ApplicationModule(e),this.InterApplicationBus=new Vr.InterApplicationBus(e),this.Clipboard=new zr.Clipboard(e),this.ExternalApplication=new Kr.ExternalApplicationModule(e),this.Frame=new qr._FrameModule(e),this.GlobalHotkey=new Jr.GlobalHotkey(e),this.Platform=new Zr.PlatformModule(e,this.InterApplicationBus.Channel),this.View=new Yr.ViewModule(e),this.Interop=new Xr.InteropModule(e),this.SnapshotSource=new eo.SnapshotSourceModule(e),e.registerFin(this),this.me=(0,Qr.getMe)(e),e.on(\"disconnected\",(()=>{this.emit(\"disconnected\")}))}}Wr=a.Fin=to;var no={},io={};function ro(e){return\"string\"==typeof e.manifestUrl}function oo(e){return ao(e)&&\"string\"==typeof e.address}function so(e){return oo(e)&&\"string\"==typeof e.token}function ao(e){return\"string\"==typeof e.uuid}function co(e){return e.runtime&&\"string\"==typeof e.runtime.version}function ho(e){return ao(e)&&co(e)}Object.defineProperty(io,\"__esModule\",{value:!0}),io.isInternalConnectConfig=io.isPortDiscoveryConfig=io.isNewConnectConfig=io.isConfigWithReceiver=io.isRemoteConfig=io.isExistingConnectConfig=io.isExternalConfig=void 0,io.isExternalConfig=ro,io.isExistingConnectConfig=oo,io.isRemoteConfig=so,io.isConfigWithReceiver=function(e){return\"object\"==typeof e.receiver&&so({...e,address:\"\"})},io.isNewConnectConfig=ho,io.isPortDiscoveryConfig=function(e){return ro(e)&&co(e)||ho(e)},io.isInternalConnectConfig=function(e){return oo(e)||ho(e)};var lo={},uo={};Object.defineProperty(uo,\"__esModule\",{value:!0}),uo.EmitterMap=void 0;const po=t;function wo(e){return Buffer.from(e).toString(\"base64\")}uo.EmitterMap=class{constructor(){this.storage=new Map}hashKeys(e){return e.map(wo).join(\"/\")}getOrCreate(e){const t=this.hashKeys(e);return this.storage.has(t)||this.storage.set(t,new po.EventEmitter),this.storage.get(t)}has(e){return this.storage.has(this.hashKeys(e))}delete(e){const t=this.hashKeys(e);return this.storage.delete(t)}},Object.defineProperty(lo,\"__esModule\",{value:!0});const yo=uo;class fo extends yo.EmitterMap{constructor(){super(...arguments),this.dispatchEvent=e=>{if(function(e){return\"process-desktop-event\"===e.action}(e)){const{payload:t}=e,n=function(e){const{topic:t}=e;if(\"frame\"===t||\"window\"===t||\"view\"===t){const{uuid:n,name:i}=e;return[t,n,i]}if(\"application\"===t){const{uuid:n}=e;return[t,n]}return[t]}(t);if(this.has(n))return this.getOrCreate(n).emit(t.type,t),!0}return!1}}}lo.default=fo;var go,mo,vo=s&&s.__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},Co=s&&s.__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)},bo=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(no,\"__esModule\",{value:!0});var Io=no.Transport=void 0;const Eo=t,xo=io,Ao=g,Po=bo(lo),Mo=ki,_o=ke;class Oo extends Eo.EventEmitter{constructor(e,t,n){super(),this.wireListeners=new Map,this.topicRefMap=new Map,this.eventAggregator=new Po.default,this.messageHandlers=[this.eventAggregator.dispatchEvent],go.set(this,void 0),mo.set(this,void 0),this.connectSync=()=>{Co(this,go,\"f\").connectSync()},this.getPort=()=>Co(this,go,\"f\").getPort(),vo(this,go,new e(this.onmessage.bind(this)),\"f\"),this.environment=t,this.sendRaw=Co(this,go,\"f\").send.bind(Co(this,go,\"f\")),this.registerMessageHandler(this.handleMessage.bind(this)),Co(this,go,\"f\").on(\"disconnected\",(()=>{for(const[,{handleNack:e}]of this.wireListeners)e({reason:\"Remote connection has closed\"});this.wireListeners.clear(),this.emit(\"disconnected\")}));const{uuid:i,name:r}=n,o=this.environment.getCurrentEntityType();this.me=(0,Mo.getBaseMe)(o,i,r)}getFin(){if(!Co(this,mo,\"f\"))throw new Error(\"No Fin object registered for this transport\");return Co(this,mo,\"f\")}registerFin(e){if(Co(this,mo,\"f\"))throw new Error(\"Fin object has already been registered for this transport\");vo(this,mo,e,\"f\")}shutdown(){return Co(this,go,\"f\").shutdown()}async connect(e){if((0,xo.isConfigWithReceiver)(e))return await Co(this,go,\"f\").connect(e.receiver),this.authorize(e);if((0,xo.isRemoteConfig)(e))return this.connectRemote(e);if((0,xo.isExistingConnectConfig)(e))return this.connectByPort(e);if((0,xo.isNewConnectConfig)(e)){const t=await this.environment.retrievePort(e);return this.connectByPort({...e,address:`ws://localhost:${t}`})}}async connectRemote(e){return await Co(this,go,\"f\").connect(new(this.environment.getWsConstructor())(e.address)),this.authorize(e)}async connectByPort(e){const{address:t,uuid:n}=e,i={...e,type:\"file-token\"},r=Co(this,go,\"f\");await r.connect(new(this.environment.getWsConstructor())(e.address));const o=await this.sendAction(\"request-external-authorization\",{uuid:n,type:\"file-token\"},!0);if(\"external-authorization-response\"!==o.action)throw new Ao.UnexpectedActionError(o.action);return await this.environment.writeToken(o.payload.file,o.payload.token),this.authorize(i)}async authorize(e){const t=await this.sendAction(\"request-authorization\",e,!0);if(\"authorization-response\"!==t.action)throw new Ao.UnexpectedActionError(t.action);if(!0!==t.payload.success)throw new Ao.RuntimeError(t.payload)}sendAction(e,t={},n=!1){let i=()=>{};const r=Ao.RuntimeError.getCallSite(1),o=this.environment.getNextMessageId(),s=new Promise(((s,a)=>{i=a;const c={action:e,payload:t,messageId:o},d=Co(this,go,\"f\");return this.addWireListener(o,s,(e=>this.nackHandler(e,a,r)),n),d.send(c).catch(a)}));return Object.assign(s,{cancel:i,messageId:o})}nackHandler(e,t,n){t(\"string\"==typeof e?e:new Ao.RuntimeError(e,n))}ferryAction(e){return new Promise(((t,n)=>{const i=this.environment.getNextMessageId();e.messageId=i;const r=e=>{t(e.payload)};return Co(this,go,\"f\").send(e).then((()=>this.addWireListener(i,r,(e=>this.nackHandler(e,n)),!1))).catch(n)}))}registerMessageHandler(e){this.messageHandlers.push(e)}addWireListener(e,t,n,i){i?this.uncorrelatedListener=t:this.wireListeners.has(e)?n({reason:\"Duplicate handler id\",error:(0,_o.errorToPOJO)(new Ao.DuplicateCorrelationError(String(e)))}):this.wireListeners.set(e,{resolve:t,handleNack:n})}onmessage(e){for(const t of this.messageHandlers)t.call(null,e)}handleMessage(e){const t=e.correlationId||NaN;if(\"correlationId\"in e){if(!this.wireListeners.has(t))return!1;{const{resolve:n,handleNack:i}=this.wireListeners.get(t);\"ack\"!==e.action?i({reason:\"Did not receive ack action\",error:(0,_o.errorToPOJO)(new Ao.NoAckError(e.action))}):\"payload\"in e?e.payload.success?n.call(null,e):i(e.payload):\"string\"==typeof e.reason?i(e):(console.warn(\"Received invalid response from core\",e),i({reason:\"invalid response shape\"})),this.wireListeners.delete(t)}}else this.uncorrelatedListener&&this.uncorrelatedListener.call(null,e),this.uncorrelatedListener=()=>{};return!0}}Io=no.Transport=Oo,go=new WeakMap,mo=new WeakMap;const So=(...e)=>({log:(...t)=>console.debug(`[${(new Date).toISOString()}]`,...(e=>e.map((e=>`[${e}]`)))(e),...t),getLogger:(...t)=>So(...e,...t)}),Ro=So(\"@openfin/core-web/client\");function Fo(e,t){if(!function(e){return\"string\"==typeof e}(e))throw new Error(`Property ${t} has invalid type. Expected string, got ${typeof e}.`)}const jo=\"web-broker-ports-ready\",ko=Ro.getLogger(\"get-web-interop-ports\");function Lo(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)}function To(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}\"function\"==typeof SuppressedError&&SuppressedError;const $o=e=>{var n,i,r;return r=class extends t.EventEmitter{constructor(t){super(),n.set(this,void 0),i.set(this,!1),this.connectSync=()=>{Lo(this,i,\"f\")||(e.addEventListener(\"message\",(e=>{e.data?.topic?.startsWith(\"wire-message\")&&e.data.message&&Lo(this,n,\"f\").call(this,{...JSON.parse(e.data.message),ports:e.ports})})),e.start())},this.connect=async()=>{this.connectSync()},this.send=t=>(e.postMessage({topic:\"wire-message\",message:JSON.stringify(t)}),Promise.resolve()),this.shutdown=async()=>{e.close()},To(this,n,t,\"f\")}getPort(){return e}},n=new WeakMap,i=new WeakMap,r};var Bo={},Go={};Object.defineProperty(Go,\"__esModule\",{value:!0}),Go.BaseEnvironment=void 0;const Wo=vr();Go.BaseEnvironment=class{async getViewWindowIdentity(e,t){const{identity:n}=await e.View.wrapSync(t).getCurrentWindow();return n}async getInteropInfo(e){const t=await e.Application.getCurrentSync().getInfo().catch((()=>null)),n=t?.initialOptions?.interopBrokerConfiguration??{};return{fdc3Version:t?(0,Wo.getDefaultViewFdc3VersionFromAppInfo)(t):void 0,...n,fdc3Info:{providerVersion:await e.System.getVersion(),provider:\"OpenFin\"}}}},Object.defineProperty(Bo,\"__esModule\",{value:!0});var Ho=Bo.BrowserEnvironment=void 0;const No=Go;class Do extends No.BaseEnvironment{constructor(){super(...arguments),this.type=\"other\",this.getRandomId=()=>{const e=new Uint32Array(1);return window.crypto.getRandomValues(e)[0].toString(32)}}getAdapterVersionSync(){return\"\"}observeBounds(e,t){throw new Error(\"Method not implemented.\")}layoutAllowedInContext(e){return!1}initLayoutManager(e,t,n){throw new Error(\"Method not implemented.\")}applyLayoutSnapshot(e,t,n){throw new Error(\"Method not implemented.\")}createLayout(e,t){throw new Error(\"Method not implemented.\")}destroyLayout(e,t){throw new Error(\"Method not implemented.\")}resolveLayout(e,t){throw new Error(\"Method not implemented.\")}initPlatform(...e){throw new Error(\"Method not implemented.\")}writeToken(e,t){return Promise.resolve(\"\")}retrievePort(e){throw new Error(\"Method not implemented.\")}getNextMessageId(){return this.getRandomId()}createChildContent(e){throw new Error(\"Method not implemented.\")}getWebWindow(e){throw new Error(\"Method not implemented.\")}getCurrentEntityIdentity(){throw new Error(\"Method not implemented.\")}getCurrentEntityType(){return\"external connection\"}raiseEvent(e,t){throw new Error(\"Method not implemented.\")}getUrl(){return location.href}getDefaultChannelOptions(){return{create:{},connect:{}}}getRtcPeer(){return new RTCPeerConnection}getWsConstructor(){return WebSocket}whenReady(){return Promise.resolve()}}Ho=Bo.BrowserEnvironment=Do;const Uo=e=>\"platform\"in e&&void 0!==e.platform;var Vo,zo;class Ko extends Ho{constructor(e){super(),this.connectConfig=e,Vo.set(this,void 0),zo.set(this,new W((async()=>Promise.resolve().then((function(){return require(\"./main-b14f67c9.js\")}))))),Uo(e)&&this.validatePlatformOptions(e)}getAdapterVersionSync(){return\"0.39.21\"}validatePlatformOptions({platform:e}){if(!(\"layoutSnapshot\"in e))throw new Error(\"Platform options are missing layoutSnapshot. Please provide a layoutSnapshot in the platform options.\");if(\"windows\"in e||\"windows\"in e.layoutSnapshot)throw new Error(\"It appears you tried to call connect() with a snapshot object from an OpenFin desktop environment. Note that connect() expects to be called with a platform property with this structure: { platform: { layoutSnapshot } }. To get a layoutSnapshot of the expected structure, use fin.Platform.Layout.getCurrentLayoutManagerSync().getLayoutSnapshot() in v34+ in your desktop environment.\");const{layouts:t}=e.layoutSnapshot;Object.entries(t).map((([e,t])=>{if(\"object\"!=typeof t||null===t)throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must be an object.`);if(!(\"content\"in t))throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must contain a 'content' property.`)}))}async getInteropInfo(e){return{...{contextGroups:void 0,logging:{beforeAction:{enabled:!1},afterAction:{enabled:!1}}},fdc3Version:void 0,fdc3Info:{providerVersion:\"0.39.21\",provider:\"OpenFin Web\"}}}layoutAllowedInContext(e){return!0}async initLayoutManager(e,t,n){if(Lo(this,Vo,\"f\"))throw new Error(\"Layout already initialized.\");if(!Uo(this.connectConfig))throw new Error(\"Platform options are missing from connection config.\");const{WebLayoutEntryPoint:i}=await Lo(this,zo,\"f\").getValue();return To(this,Vo,new i(this.connectConfig),\"f\"),await Lo(this,Vo,\"f\").initLayoutManager(e,t,n)}async applyLayoutSnapshot(e,t,n){Lo(this,Vo,\"f\")?.applyLayoutSnapshot(e,t,n)}async createLayout(e,t){return Lo(this,Vo,\"f\")?.createLayout(e,t)}async destroyLayout(e,t){return Lo(this,Vo,\"f\")?.destroyLayout(e,t)}async getViewWindowIdentity(e,t){return Promise.resolve({uuid:t.uuid,name:t.uuid})}}Vo=new WeakMap,zo=new WeakMap;const qo=()=>{const e=((e,t)=>{const n=new RegExp(`^${t}<(?.*)>$`).exec(e)?.groups?.meta;if(n)try{return JSON.parse(atob(n))}catch(e){throw new Error(`Failed to decode JSON from ${n}.`)}})(window.name,\"of-frame\");if(e)try{const{name:t,uuid:n,brokerUrl:i,providerId:r,contextGroup:o}=e;return Fo(i,\"brokerUrl\"),Fo(n,\"uuid\"),Fo(t,\"name\"),{identity:{name:t,uuid:n},brokerUrl:i,interopConfig:{providerId:r,currentContextGroup:o}}}catch(e){throw new Error(`Unexpected error occurred when inferring platform information: ${e.stack}`)}},Jo=()=>{const e=r.v4();return{uuid:e,name:e}},Yo=async e=>{if(\"enabled\"===e.connectionInheritance){const t=await(async e=>{const t=qo();if(t){const{validateOptions:n=(()=>!0)}=e,{identity:i,...r}=t;if(!await n(r))throw new Error(\"Parent options were rejected by validateOptions.\");return t}})(e);if(t)return t}if(!e.options){const t=\"enabled\"===e.connectionInheritance?\"Broker URL was not specified nor provided by a platform container.\":\"Connection inheritance is disabled but no options were provided.\";throw new Error(t)}return{...e.options,identity:Jo()}};exports.__classPrivateFieldGet=Lo,exports.__classPrivateFieldSet=To,exports.apiExposer=Gn,exports.commonjsGlobal=s,exports.connect=async t=>{try{Ro.log(\"Establishing connection\",t);const{brokerUrl:n,identity:i,timeout:r,interopConfig:s}=await Yo(t),{workerPort:a,iframeBrokerPort:c}=await(async(e,t,n)=>{const{origin:i}=new URL(e),r=document.createElement(\"IFRAME\");let s;r.style.display=\"none\";try{return await new Promise(((a,c)=>{const d=e=>{if(e.source===r.contentWindow&&e.data?.topic===`ack-${jo}`){if(e.origin!==i)c(new Error(`Broker redirected to unexpected origin ${e.origin}, expected ${i}.`));else if(e.data.success){const[t,n]=e.ports;a({iframeBrokerPort:t,workerPort:n})}else c(new m(e.data));window.removeEventListener(\"message\",d),clearTimeout(s)}};window.addEventListener(\"message\",d),ko.log(`Connecting to broker ${e}`),r.setAttribute(\"src\",e),r.setAttribute(\"name\",o(t,\"of-broker\")),document.body.appendChild(r),ko.log(\"Iframe loaded, awaiting init message from iframe\"),n&&(s=setTimeout((()=>{window.removeEventListener(\"message\",d),document.body.removeChild(r),c(new Error(\"Worker did not initialize in time\"))}),n))}))}catch(e){throw new Error(`Failed to initialise Fin Web Client. ${e.message}`,{cause:e})}})(n,i,r);Ro.log(\"Successfully established connection to shared worker\");const d={entityType:\"external connection\",...i};a.start(),c.start();const h=((t,n,i)=>{const r=$o(n),o=new Ko(t),s=new Io(r,o,i);return s.connectSync(),window.Buffer=e.Buffer,new Wr(s)})(t,a,d);return s?.providerId&&(h.me.interop=h.Interop.connectSync(s.providerId),s?.currentContextGroup&&h.me.interop.joinContextGroup(s.currentContextGroup).catch((e=>{console.warn(`Error joining specified context group: ${s?.currentContextGroup}, continuing`,e)}))),{...h,me:{...h.me,identity:{uuid:h.me.uuid,name:h.me.name}}}}catch(e){throw new Error(`An error occured during web-interop connection: ${e.message}`)}},exports.decorators=Nn,exports.encodeOptions=o,exports.layout_constants=ai,exports.lazy=G;\n","\"use strict\";var t=require(\"./main-8cad4070.js\"),e=require(\"uuid\");require(\"buffer/\"),require(\"events\"),require(\"lodash/cloneDeep\"),require(\"lodash/isEqual\");var i={},n={};Object.defineProperty(n,\"__esModule\",{value:!0}),n.mapValuesAsync=n.mapEntriesAsync=void 0;const o=(t,[e,i])=>({...t,[e]:i});async function s(t,e){return(await Promise.all(e.map((async([e,i])=>[e,await t(i,e)])))).reduce(o,{})}n.mapEntriesAsync=s,n.mapValuesAsync=async function(t,e){let i;return i=e instanceof Map?[...e.entries()]:Object.entries(e),s(t,i)};var r,a,l,h,d=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldSet||function(t,e,i,n,o){if(\"m\"===n)throw new TypeError(\"Private method is not writable\");if(\"a\"===n&&!o)throw new TypeError(\"Private accessor was defined without a setter\");if(\"function\"==typeof e?t!==e||!o:!e.has(t))throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");return\"a\"===n?o.call(t,i):o?o.value=i:e.set(t,i),i},c=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldGet||function(t,e,i,n){if(\"a\"===i&&!n)throw new TypeError(\"Private accessor was defined without a getter\");if(\"function\"==typeof e?t!==e||!n:!e.has(t))throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");return\"m\"===i?n:\"a\"===i?n.call(t):n?n.value:e.get(t)};Object.defineProperty(i,\"__esModule\",{value:!0});var m=i.DefaultLayoutManager=void 0;const u=n;class p{constructor(t){a.set(this,void 0),l.set(this,new Map),d(this,a,t,\"f\")}size(){return c(this,l,\"f\").size}async applyLayoutSnapshot({layouts:t}){if(Object.keys(t).length>1)throw new Error(\"[LayoutManager] Tried to call applyLayoutSnapshot with more than 1 layout. When implementing multiple layouts via overridden LayoutManager class, you must override and fully implement the applyLayoutSnapshot method without calling super.applyLayoutSnapshot().\");const[[e,i]]=Object.entries(t);await p.createLayout(this,{layoutName:e,layout:i})}async showLayout({layoutName:t}){}async getLayoutSnapshot(){return{layouts:await(0,u.mapValuesAsync)((t=>t.getFrameSnapshot()),c(this,l,\"f\"))}}async removeLayout({layoutName:t}){}getLayoutIdentityForView(t){const e=[...c(this,l,\"f\").values()].find((e=>e.getCurrentViews().some((e=>e.name===t.name&&e.uuid===t.uuid))));return e?.identity??void 0}isLayoutVisible({layoutName:t}){return c(p,r,\"m\",h).call(p,this,t).isVisible()}resolveLayoutIdentity(t){if(t&&\"layoutName\"in t)return t;const e=[...c(this,l,\"f\").values()];if(1===e.length)return e[0].identity;const i=e.find((t=>t.isVisible()));return i?.identity??void 0}static async resolveLayout(t,e){const i=t.resolveLayoutIdentity(e);if(void 0===i||!(\"layoutName\"in i))throw new Error(\"[layout-manager] resolveLayout: Could not resolve the layout identity. Make sure you include 'layoutName' in the identity object.\");return c(p,r,\"m\",h).call(p,t,i.layoutName)}static async handleSharedView(t,e,i){await(0,u.mapValuesAsync)((async t=>{if(t.identity.layoutName!==e.layoutName){const e=t.getCurrentViews().find((t=>t.name===i.name));e&&await t.onViewDetached({viewIdentity:e,target:null}).catch(console.error)}}),c(t,l,\"f\"))}static async handleLastViewRemoved(t,e){await t.removeLayout(e),await c(t,a,\"f\").handleLastViewRemoved(t)}static async destroyLayout(t,{layoutName:e}){await c(p,r,\"m\",h).call(p,t,e).destroy(),c(t,l,\"f\").delete(e)}static async createLayout(t,e){const{layoutName:i}=e;if(c(t,l,\"f\").has(i))throw new Error(`Layout name ${i} already exists`);await c(t,a,\"f\").createLayout(e,t)}static registerLayout(t,e,i){c(t,l,\"f\").set(e,i)}static getAllLayouts(t){return[...c(t,l,\"f\").values()]}static setInitialSnapshot(t,e){c(t,a,\"f\").setInitialSnapshot(e)}static createClosedConstructor(...t){return class extends p{constructor(){super(...t)}}}}m=i.DefaultLayoutManager=p,r=p,a=new WeakMap,l=new WeakMap,h=function(t,e){const i=c(t,l,\"f\").get(e);if(!i)throw new Error(`[layout-manager] getLayoutByName: Could not locate layout with name '${e}'`);return i};var g={},f={},v={};Object.defineProperty(v,\"__esModule\",{value:!0}),v.ReversibleMap=void 0;v.ReversibleMap=class{constructor(){this.valueToKey=new Map,this.keyToValue=new Map,this.setUnique=(t,e)=>{if(this.hasKey(t)||this.hasValue(e))throw new Error(\"Key or value already in the map.\");this.keyToValue.set(t,e),this.valueToKey.set(e,t)},this.getKey=t=>{const e=this.valueToKey.get(t);if(!e)throw new Error(\"Value not found in the map.\");return e},this.deleteKey=t=>{const e=this.getValue(t);return this.keyToValue.delete(t),this.valueToKey.delete(e),e},this.deleteValue=t=>{const e=this.getKey(t);return this.keyToValue.delete(e),this.valueToKey.delete(t),e},this.hasKey=t=>this.keyToValue.has(t),this.hasValue=t=>this.valueToKey.has(t)}getValue(t){const e=this.keyToValue.get(t);if(!e)throw new Error(\"Key not found in the map.\");return e}},Object.defineProperty(f,\"__esModule\",{value:!0});var _=f.LayoutContentCache=void 0;const y=t.lazy,C=v;class w{constructor(){this.contentItemCache=new C.ReversibleMap,this.contentItemCacheId=0,this.createCacheKey=()=>{const t=`entity-${this.contentItemCacheId.toString()}`;return this.contentItemCacheId+=1,t},this.hasKey=t=>this.contentItemCache.hasKey(t),this.getItemOrUndefined=t=>{try{return this.getContentItemOrThrow(t)}catch(t){return}},this.getContentItemOrThrow=(t,e)=>{if(!this.contentItemCache.hasKey(t))throw new Error(\"Layout component has been destroyed or detached from the current layout.\");const i=this.contentItemCache.getValue(t);if(e&&!e.includes(i.type))throw new Error(`Layout item is not the expected type. Expected ${e.join(\", \")}, got ${i.type}.`);return i},this.getOrCreateEntityId=t=>{if(this.contentItemCache.hasValue(t))return this.contentItemCache.getKey(t);t.onDestroyed((()=>{this.contentItemCache.deleteValue(t)}));const e=this.createCacheKey();return this.contentItemCache.setUnique(e,t),e}}static getSingleInstance(){return w.singleton.getValue()}}_=f.LayoutContentCache=w,w.singleton=new y.Lazy((()=>new w));var I={},b={};!function(t){Object.defineProperty(t,\"__esModule\",{value:!0}),t.getAdjacentStacks=t.doShareEdge=t.getAdjacentItem=void 0;t.getAdjacentItem=(e,i)=>{const{parent:n}=e;if(e.isRoot()||!n)return;const o=[\"top\",\"bottom\"].includes(i)?\"column\":\"row\",s=[\"top\",\"left\"].includes(i)?-1:1;if(n.type===o){const t=n.contentItems.indexOf(e)+s;if(t>=0&&t{const n=t.getBounds(),o=e.getBounds();if(!n||!o)return!1;if([\"top\",\"bottom\"].includes(i)){return!(n.righto.right)}return!(n.bottomo.bottom)};t.getAdjacentStacks=(e,i)=>{const n=[\"top\",\"bottom\"].includes(i)?\"row\":\"column\",o=s=>\"stack\"===s.type?(0,t.doShareEdge)(e,s,i)?[s]:[]:\"root\"===s.type||\"ground\"===s.type?[]:s.type===n?s.contentItems.map((t=>o(t))).flat():s.type!==n?[\"top\",\"right\"].includes(i)?o(s.contentItems[s.contentItems.length-1]):o(s.contentItems[0]):[],s=(0,t.getAdjacentItem)(e,i);return s?o(s):[]}}(b);var S=t.commonjsGlobal&&t.commonjsGlobal.__decorate||function(t,e,i,n){var o,s=arguments.length,r=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if(\"object\"==typeof Reflect&&\"function\"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(s<3?o(r):s>3?o(e,i,r):o(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};Object.defineProperty(I,\"__esModule\",{value:!0}),I.LayoutEntitiesController=void 0;const E=t.decorators,x=b,L=i;class z{constructor(t,e,i){this.wire=t,this.layoutManager=e,this.layoutContentCache=i,this.analytics=t=>{this.wire.sendAction(`layout-controller-${t}`).catch((()=>{}))},this.getLayoutIdentityForViewOrThrow=async t=>{const e=this.layoutManager.getLayoutIdentityForView(t);if(!e)throw new Error(`View identity ${t.name} is not attached to any layouts.`);return e},this.getRoot=async t=>{this.analytics(\"get-root\");const e=(await this.getLayout(t)).getRoot();return{type:e.type,entityId:this.layoutContentCache.getOrCreateEntityId(e)}},this.getStackByView=async t=>{this.analytics(\"get-stack-by-view\");const e=await this.getLayoutIdentityForViewOrThrow(t),i=(await this.getLayout(e)).getStackByView(t);if(\"stack\"===i?.type)return{entityId:this.layoutContentCache.getOrCreateEntityId(i),type:\"stack\"}},this.getStackViews=t=>{this.analytics(\"get-stack-views\");return this.layoutContentCache.getContentItemOrThrow(t,[\"stack\"]).contentItems.map((t=>({name:t.viewName,uuid:this.wire.me.uuid})))},this.isRoot=t=>{this.analytics(\"is-root\");return this.layoutContentCache.getContentItemOrThrow(t).isRoot()},this.exists=t=>(this.analytics(\"exists\"),this.layoutContentCache.hasKey(t)),this.addViewToStack=async(t,e,{index:i}={index:0})=>{this.analytics(\"add-view-to-stack\");const n=this.layoutContentCache.getContentItemOrThrow(t);if(i&&i>n.contentItems.length+1)throw new Error(`Index '${i}' out of range, please exclude the index or specify a number between 0 and ${n.contentItems.length}`);const o={id:t,index:i},{identity:s}=await n.layout.platformCreateView(e,{location:o});return s},this.findViewInStack=(t,e)=>t.contentItems.find((t=>t.viewName===e.name)),this.removeViewFromStack=async(t,e)=>{this.analytics(\"remove-view-from-stack\");const i=this.layoutContentCache.getContentItemOrThrow(t,[\"stack\"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to remove a view ('${e.name}') which does not belong to the stack.`);await n.layout.platformCloseView(e)},this.createAdjacentStack=async(t,e,{position:i=\"right\"}={})=>{if(this.analytics(\"create-adjacent-stack\"),!Array.isArray(e)||0===e.length)throw new Error('The parameter \"views\" must be an array with at least 1 element.');if(![\"top\",\"bottom\",\"left\",\"right\"].includes(i))throw new Error(`Invalid position '${i}' specified.`);const n=this.layoutContentCache.getContentItemOrThrow(t).createAdjacentStack({position:i}),o=this.layoutContentCache.getOrCreateEntityId(n);return await Promise.all(e.reverse().map((t=>this.addViewToStack(o,t)))),o},this.getAdjacentStacks=async({targetId:t,edge:e})=>{this.analytics(\"get-adjacent-stacks\");const i=this.layoutContentCache.getContentItemOrThrow(t);return(0,x.getAdjacentStacks)(i,e).map((t=>({entityId:this.layoutContentCache.getOrCreateEntityId(t)})))},this.setStackActiveView=async(t,e)=>{this.analytics(\"set-stack-active-view\");const i=this.layoutContentCache.getContentItemOrThrow(t,[\"stack\"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to set a view ('${e.name}') as active when it does not belong to the stack.`);i.setActiveContentItem(n,!0)}}async getLayout(t){const e=await L.DefaultLayoutManager.resolveLayout(this.layoutManager,t);if(!e)throw new Error(`Could not resolve target layout identity ${JSON.stringify(t)}`);return e}getContent(t){this.analytics(\"get-content\");return this.layoutContentCache.getContentItemOrThrow(t,[\"column\",\"row\"]).contentItems.map((t=>({type:t.type,entityId:this.layoutContentCache.getOrCreateEntityId(t)})))}getParent(t){this.analytics(\"get-parent\");const e=this.layoutContentCache.getContentItemOrThrow(t);if(!e.isRoot())return e.parent?.contentItems.includes(e)?{type:e.parent.type,entityId:this.layoutContentCache.getOrCreateEntityId(e.parent)}:void 0}}S([(0,E.expose)()],z.prototype,\"getLayoutIdentityForViewOrThrow\",void 0),S([(0,E.expose)()],z.prototype,\"getRoot\",void 0),S([(0,E.expose)()],z.prototype,\"getStackByView\",void 0),S([(0,E.expose)()],z.prototype,\"getStackViews\",void 0),S([(0,E.expose)()],z.prototype,\"getContent\",null),S([(0,E.expose)()],z.prototype,\"getParent\",null),S([(0,E.expose)()],z.prototype,\"isRoot\",void 0),S([(0,E.expose)()],z.prototype,\"exists\",void 0),S([(0,E.expose)()],z.prototype,\"addViewToStack\",void 0),S([(0,E.expose)()],z.prototype,\"removeViewFromStack\",void 0),S([(0,E.expose)()],z.prototype,\"createAdjacentStack\",void 0),S([(0,E.expose)()],z.prototype,\"getAdjacentStacks\",void 0),S([(0,E.expose)()],z.prototype,\"setStackActiveView\",void 0),I.LayoutEntitiesController=z,Object.defineProperty(g,\"__esModule\",{value:!0});var M=g.initLayoutEndpoints=void 0;const P=t.apiExposer,T=t.layout_constants,A=f,k=I,D=i;M=g.initLayoutEndpoints=async function(t,e){const i=t.getFin(),n=await i.Platform.getCurrentSync().getClient(),o=new P.ChannelsExposer(n);await new P.ApiExposer(o).exposeInstance(new k.LayoutEntitiesController(t,e,A.LayoutContentCache.getSingleInstance()),{id:T.LAYOUT_CONTROLLER_ID}),await async function(t,e){const i=t=>async i=>{const n=await D.DefaultLayoutManager.resolveLayout(e,i.target);if(!n)throw new Error(`Could not resolve the layout target from payload ${JSON.stringify(i)}`);return t(n,i)},n=(e,n)=>{t.register(e,i(n))},o=(t,e)=>{n(t,e)};n(\"replace-view\",((t,e)=>t.replaceView(e))),n(\"replace-layout\",((t,{layout:e})=>t.replaceLayout(e))),n(\"add-view\",((t,e)=>t.insertView(e))),o(\"layout-add-view\",((t,{viewOptions:e,location:i,targetView:n})=>t.platformCreateView(e,{location:i,targetView:n}))),n(\"close-view\",((t,e)=>t.cleanupView(e.viewIdentity))),o(\"layout-close-view\",((t,e)=>t.platformCloseView(e.viewIdentity))),n(\"apply-preset-layout\",((t,e)=>t.applyPreset(e))),n(\"get-layout-views\",(t=>t.getCurrentViews())),n(\"get-frame-snapshot\",(t=>t.getFrameSnapshot())),n(\"is-visible\",(t=>t.isVisible())),n(\"destroy\",(t=>t.destroy())),t.register(\"get-layout-snapshot\",(()=>e.getLayoutSnapshot()))}(n,e)};var R={};Object.defineProperty(R,\"__esModule\",{value:!0});var U=R.BaseLayout=void 0;U=R.BaseLayout=class{};var O={};Object.defineProperty(O,\"__esModule\",{value:!0});var V=O.DOMEmitter=void 0;V=O.DOMEmitter=class{constructor(t){this.container=t}dispatchLocalEvent(t,e){const i={...e,type:t,tabSelector:`tab-${e.name}`,containerSelector:`container-${e.name}`,topic:\"openfin-DOM-event\"};this.container.dispatchEvent(new CustomEvent(t,{detail:i}))}};var B={};Object.defineProperty(B,\"__esModule\",{value:!0});var H=B.mapLayoutContentItemsImmutableSync=B.mapLayoutContentItemsImmutable=W=B.isVisible=void 0;var W=B.isVisible=t=>(0!==t.offsetWidth||0!==t.offsetHeight)&&\"hidden\"!==window.getComputedStyle(t).visibility&&t.offsetTop>=0&&t.offsetLeft>=0&&t.offsetTop<=window.innerHeight&&t.offsetLeft<=window.innerWidth;const F=t=>\"type\"in t&&\"component\"===t.type;B.mapLayoutContentItemsImmutable=async function t(e,i){return F(i)?e(i):{...i,content:await Promise.all(i.content?.map((i=>t(e,i))))}},H=B.mapLayoutContentItemsImmutableSync=function t(e,i){return F(i)?e(i):{...i,content:i.content?.map((i=>t(e,i)))}};class N extends Error{constructor(t,e){super(e),this.type=t}}class G extends N{constructor(t,e){super(\"Configuration\",t),this.node=e}}class j extends N{constructor(t){super(\"PopoutBlocked\",t)}}class $ extends N{constructor(t){super(\"API\",t)}}class Z extends N{constructor(t){super(\"Bind\",t)}}class q extends Error{constructor(t,e,i){super(`${t}: ${e}${void 0===i?\"\":\": \"+i}`)}}class X extends q{constructor(t,e){super(\"Assert\",t,e)}}class Y extends q{constructor(t,e,i){super(\"UnreachableCase\",t,`${e}${void 0===i?\"\":\": \"+i}`)}}class K extends q{constructor(t,e){super(\"UnexpectedNull\",t,e)}}class J extends q{constructor(t,e){super(\"UnexpectedUndefined\",t,e)}}var Q;!function(t){let e=!1;const i={PopoutCannotBeCreatedWithGroundItemConfig:{id:0,default:\"Popout cannot be created with ground ItemConfig\"},PleaseRegisterAConstructorFunction:{id:1,default:\"Please register a constructor function\"},ComponentTypeNotRegisteredAndBindComponentEventHandlerNotAssigned:{id:2,default:\"Component type not registered and BindComponentEvent handler not assigned\"},ComponentIsAlreadyRegistered:{id:3,default:\"Component is already registered\"},ComponentIsNotVirtuable:{id:4,default:\"Component is not virtuable. Requires rootHtmlElement field/getter\"},VirtualComponentDoesNotHaveRootHtmlElement:{id:5,default:'Virtual component does not have getter \"rootHtmlElement\"'},ItemConfigIsNotTypeComponent:{id:6,default:\"ItemConfig is not of type component\"},InvalidNumberPartInSizeString:{id:7,default:\"Invalid number part in size string\"},UnknownUnitInSizeString:{id:8,default:\"Unknown unit in size string\"},UnsupportedUnitInSizeString:{id:9,default:\"Unsupported unit in size string\"}};t.idCount=Object.keys(i).length;const n=Object.values(i);t.checkInitialise=function(){if(!e)for(let e=0;e=\"0\"&&t<=\"9\"}function Tt(t,e){const i=zt(e);t.style.width=i}function At(t,e){const i=zt(e);t.style.height=i}function kt(t){return{width:t.offsetWidth,height:t.offsetHeight}}function Dt(t,e){t.style.display=e?\"\":\"none\"}function Rt(t,e){if(void 0!==e)for(const i in e)if(e.hasOwnProperty(i)){const n=e[i],o=t[i];t[i]=Ut(o,n)}return t}function Ut(t,e){if(\"object\"!=typeof e)return e;if(Array.isArray(e)){const t=e.length,i=new Array(t);for(let n=0;n36)throw new Error(\"Too many keys in config minifier map\")},t.translateObject=n}(dt||(dt={})),function(t){t.defaults={type:at.ground,content:[],size:1,sizeUnit:ht.Fractional,minSize:void 0,minSizeUnit:ht.Pixel,id:\"\",isClosable:!0},t.createCopy=function(t,e){switch(t.type){case at.ground:case at.row:case at.column:return gt.createCopy(t,e);case at.stack:return ut.createCopy(t,e);case at.component:return pt.createCopy(t);default:throw new Y(\"CICC91354\",t.type,\"Invalid Config Item type specified\")}},t.createDefault=function(t){switch(t){case at.ground:throw new X(\"CICCDR91562\");case at.row:case at.column:return gt.createDefault(t);case at.stack:return ut.createDefault();case at.component:return pt.createDefault();default:throw new Y(\"CICCDD91563\",t,\"Invalid Config Item type specified\")}},t.isComponentItem=function(t){return t.type===at.component},t.isStackItem=function(t){return t.type===at.stack},t.isGroundItem=function(t){return t.type===at.ground}}(ct||(ct={})),function(t){t.defaultMaximised=!1,function(t){t.createCopy=function(t,e){return void 0===t?void 0:{show:null!=e?e:t.show,popout:t.popout,close:t.close,maximise:t.maximise,minimise:t.minimise,tabDropdown:t.tabDropdown}}}(t.Header||(t.Header={}))}(mt||(mt={})),function(t){function e(t){const e=t.length,i=new Array(e);for(let n=0;n\"__glMaximised\"===t));t>0&&(o=!0,n=n.splice(t,1)),e=n.length>0?n[0]:ct.defaults.id}else e=n;return i=void 0!==t.maximised?t.maximised:o,{id:e,maximised:i}}}(wt||(wt={})),function(t){function e(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0;return{resolved:!0,root:Et.resolve(i),openPopouts:t.resolveOpenPopouts(e.openPopouts),dimensions:t.Dimensions.resolve(e.dimensions),settings:t.Settings.resolve(e.settings),header:t.Header.resolve(e.header,e.settings,e.labels)}}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:Lt.fromResolvedArray(e.openPopouts),settings:_t.Settings.createCopy(e.settings),dimensions:t.Dimensions.fromResolved(e.dimensions),header:_t.Header.createCopy(e.header)}},t.isResolved=function(t){const e=t;return void 0!==e.resolved&&!0===e.resolved},t.resolveOpenPopouts=function(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0,{root:Et.resolve(o),openPopouts:xt.resolveOpenPopouts(e.openPopouts),dimensions:xt.Dimensions.resolve(e.dimensions),settings:xt.Settings.resolve(e.settings),header:xt.Header.resolve(e.header,e.settings,e.labels),parentId:null!==(i=e.parentId)&&void 0!==i?i:null,indexInParent:null!==(n=e.indexInParent)&&void 0!==n?n:null,window:t.Window.resolve(e.window,e.dimensions),resolved:!0}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:i(e.openPopouts),dimensions:xt.Dimensions.fromResolved(e.dimensions),settings:_t.Settings.createCopy(e.settings),header:_t.Header.createCopy(e.header),parentId:e.parentId,indexInParent:e.indexInParent,window:t.Window.fromResolved(e.window)}},t.fromResolvedArray=i}(Lt||(Lt={}));class Wt{constructor(){this._allEventSubscriptions=[],this._subscriptionsMap=new Map,this.unbind=this.removeEventListener,this.trigger=this.emit}tryBubbleEvent(t,e){}emit(t,...e){let i=this._subscriptionsMap.get(t);if(void 0!==i){i=i.slice();for(let t=0;t0){const n=e.slice();n.unshift(t);const o=this._allEventSubscriptions.slice();for(let t=0;t0?n.contentItems[0]:n,e=0);const o=this._layoutManager.createAndInitContentItem(i,t);t.addChild(o,e),this._layoutManager.layoutConfig.settings.popInOnClose?this._onClose():this.close()}createWindow(){const t=this.createUrl(),e=Math.floor(1e6*Math.random()).toString(36),i=this.serializeWindowFeatures({width:this._initialWindowSize.width,height:this._initialWindowSize.height,innerWidth:this._initialWindowSize.width,innerHeight:this._initialWindowSize.height,menubar:\"no\",toolbar:\"no\",location:\"no\",personalbar:\"no\",resizable:\"yes\",scrollbars:\"no\",status:\"no\"});if(this._popoutWindow=globalThis.open(t,e,i),this._popoutWindow)this._popoutWindow.addEventListener(\"load\",(()=>this.positionWindow()),{passive:!0}),this._popoutWindow.addEventListener(\"beforeunload\",(()=>{this._layoutManager.layoutConfig.settings.popInOnClose?this.popIn():this._onClose()}),{passive:!0}),this._checkReadyInterval=setInterval((()=>this.checkReady()),10);else if(!0===this._layoutManager.layoutConfig.settings.blockedPopoutsThrowError){throw new j(\"Popout blocked\")}}checkReady(){if(null===this._popoutWindow)throw new K(\"BPCR01844\");this._popoutWindow.__glInstance&&this._popoutWindow.__glInstance.isInitialised&&(this.onInitialised(),void 0!==this._checkReadyInterval&&(clearInterval(this._checkReadyInterval),this._checkReadyInterval=void 0))}serializeWindowFeatures(t){const e=[];for(const i in t)e.push(i+\"=\"+t[i].toString());return e.join(\",\")}createUrl(){const t=\"gl-window-config-\"+Ot(),e=_t.minifyConfig(this._config);try{localStorage.setItem(t,JSON.stringify(e))}catch(t){throw new Error(\"Error while writing to localStorage \"+function(t){return t instanceof Error?t.message:\"string\"==typeof t?t:\"Unknown Error\"}(t))}const i=new URL(location.href);return i.searchParams.set(\"gl-window\",t),i.toString()}positionWindow(){if(null===this._popoutWindow)throw new Error(\"BrowserPopout.positionWindow: null popoutWindow\");this._popoutWindow.moveTo(this._initialWindowSize.left,this._initialWindowSize.top),this._popoutWindow.focus()}onInitialised(){this._isInitialised=!0,this.getGlInstance().on(\"popIn\",(()=>this.popIn())),this.emit(\"initialised\")}_onClose(){setTimeout((()=>this.emit(\"closed\")),50)}}class Gt extends Wt{constructor(t,e,i,n){super(),this.layoutManager=t,this._parent=i,this._element=n,this._popInParentIds=[],this._type=e.type,this._id=e.id,this._isInitialised=!1,this.isGround=!1,this.isRow=!1,this.isColumn=!1,this.isStack=!1,this.isComponent=!1,this.size=e.size,this.sizeUnit=e.sizeUnit,this.minSize=e.minSize,this.minSizeUnit=e.minSizeUnit,this._isClosable=e.isClosable,this._pendingEventPropagations={},this._throttledEvents=[\"stateChanged\"],this._contentItems=this.createContentItems(e.content)}get type(){return this._type}get id(){return this._id}set id(t){this._id=t}get popInParentIds(){return this._popInParentIds}get parent(){return this._parent}get contentItems(){return this._contentItems}get isClosable(){return this._isClosable}get element(){return this._element}get isInitialised(){return this._isInitialised}static isStack(t){return t.isStack}static isComponentItem(t){return t.isComponent}static isComponentParentableItem(t){return t.isStack||t.isGround}removeChild(t,e=!1){const i=this._contentItems.indexOf(t);if(-1===i)throw new Error(\"Can't remove child item. Unknown content item\");if(e||this._contentItems[i].destroy(),this._contentItems.splice(i,1),this._contentItems.length>0)this.updateSize(!1);else if(!this.isGround&&!0===this._isClosable){if(null===this._parent)throw new K(\"CIUC00874\");this._parent.removeChild(this)}}addChild(t,e,i){return null!=e||(e=this._contentItems.length),this._contentItems.splice(e,0,t),t.setParent(this),!0===this._isInitialised&&!1===t._isInitialised&&t.init(),e}replaceChild(t,e,i=!1){const n=this._contentItems.indexOf(t),o=t._element.parentNode;if(-1===n)throw new X(\"CIRCI23232\",\"Can't replace child. oldChild is not child of this\");if(null===o)throw new K(\"CIRCP23232\");if(o.replaceChild(e._element,t._element),!0===i&&(t._parent=null,t.destroy()),this._contentItems[n]=e,e.setParent(this),e.size=t.size,e.sizeUnit=t.sizeUnit,e.minSize=t.minSize,e.minSizeUnit=t.minSizeUnit,null===e._parent)throw new K(\"CIRCNC45699\");!0===e._parent._isInitialised&&!1===e._isInitialised&&e.init(),this.updateSize(!1)}remove(){if(null===this._parent)throw new K(\"CIR11110\");this._parent.removeChild(this)}popout(){const t=Ot(),e=this.layoutManager.createPopoutFromContentItem(this,void 0,t,void 0);return this.emitBaseBubblingEvent(\"stateChanged\"),e}calculateConfigContent(){const t=this._contentItems,e=t.length,i=new Array(e);for(let n=0;nthis.propagateEventToLayoutManager(t,e))))}propagateEventToLayoutManager(t,e){this._pendingEventPropagations[t]=!1,this.layoutManager.emitUnknown(t,e)}}class jt extends Gt{constructor(t,e,i){super(t,e,i,document.createElement(\"div\")),this._parentItem=i,this._focused=!1,this.isComponent=!0,this._reorderEnabled=e.reorderEnabled,this.applyUpdatableConfig(e),this._initialWantMaximise=e.maximised;const n=document.createElement(\"div\");n.classList.add(\"lm_content\"),this.element.appendChild(n),this._container=new Ft(e,this,t,n,(t=>this.handleUpdateItemConfigEvent(t)),(()=>this.show()),(()=>this.hide()),(t=>this.focus(t)),(t=>this.blur(t)))}get componentName(){return this._container.componentType}get componentType(){return this._container.componentType}get reorderEnabled(){return this._reorderEnabled}get initialWantMaximise(){return this._initialWantMaximise}get component(){return this._container.component}get container(){return this._container}get parentItem(){return this._parentItem}get headerConfig(){return this._headerConfig}get title(){return this._title}get tab(){return this._tab}get focused(){return this._focused}destroy(){this._container.destroy(),super.destroy()}applyUpdatableConfig(t){this.setTitle(t.title),this._headerConfig=t.header}toConfig(){const t=this._container.stateRequestEvent,e=void 0===t?this._container.state:t();return{type:at.component,content:[],size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,maximised:!1,isClosable:this.isClosable,reorderEnabled:this._reorderEnabled,title:this._title,header:mt.Header.createCopy(this._headerConfig),componentType:pt.copyComponentType(this.componentType),componentState:e}}close(){if(null===this.parent)throw new K(\"CIC68883\");this.parent.removeChild(this,!1)}enterDragMode(t,e){Tt(this.element,t),At(this.element,e),this._container.enterDragMode(t,e)}exitDragMode(){this._container.exitDragMode()}enterStackMaximised(){this._container.enterStackMaximised()}exitStackMaximised(){this._container.exitStackMaximised()}drag(){this._container.drag()}updateSize(t){this.updateNodeSize(t)}init(){this.updateNodeSize(!1),super.init(),this._container.emit(\"open\"),this.initContentItems()}setTitle(t){this._title=t,this.emit(\"titleChanged\",t),this.emit(\"stateChanged\")}setTab(t){this._tab=t,this.emit(\"tab\",t),this._container.setTab(t)}hide(){super.hide(),this._container.setVisibility(!1)}show(){super.show(),this._container.setVisibility(!0)}focus(t=!1){this.parentItem.setActiveComponentItem(this,!0,t)}setFocused(t){this._focused=!0,this.tab.setFocused(),t||this.emitBaseBubblingEvent(\"focus\")}blur(t=!1){this._focused&&this.layoutManager.setFocusedComponentItem(void 0,t)}setBlurred(t){this._focused=!1,this.tab.setBlurred(),t||this.emitBaseBubblingEvent(\"blur\")}setParent(t){this._parentItem=t,super.setParent(t)}handleUpdateItemConfigEvent(t){this.applyUpdatableConfig(t)}updateNodeSize(t){if(\"none\"!==this.element.style.display){const{width:e,height:i}=kt(this.element);this._container.setSizeToNodeSize(e,i,t)}}}class $t extends Gt{constructor(){super(...arguments),this._focused=!1}get focused(){return this._focused}setFocusedValue(t){this._focused=t}}class Zt extends Wt{constructor(t,e){super(),this._eElement=t,this._pointerTracking=!1,this._pointerDownEventListener=t=>this.onPointerDown(t),this._pointerMoveEventListener=t=>this.onPointerMove(t),this._pointerUpEventListener=t=>this.onPointerUp(t),this._timeout=void 0,this._allowableTargets=[t,...e],this._oDocument=document,this._eBody=document.body,this._nDelay=1800,this._nDistance=10,this._nX=0,this._nY=0,this._nOriginalX=0,this._nOriginalY=0,this._dragging=!1,this._eElement.addEventListener(\"pointerdown\",this._pointerDownEventListener,{passive:!0})}destroy(){this.checkRemovePointerTrackingEventListeners(),this._eElement.removeEventListener(\"pointerdown\",this._pointerDownEventListener)}cancelDrag(){this.processDragStop(void 0)}onPointerDown(t){if(this._allowableTargets.includes(t.target)&&t.isPrimary){const e=this.getPointerCoordinates(t);this.processPointerDown(e)}}processPointerDown(t){this._nOriginalX=t.x,this._nOriginalY=t.y,this._oDocument.addEventListener(\"pointermove\",this._pointerMoveEventListener),this._oDocument.addEventListener(\"pointerup\",this._pointerUpEventListener,{passive:!0}),this._pointerTracking=!0,this._timeout=setTimeout((()=>{try{this.startDrag()}catch(t){throw console.error(t),t}}),this._nDelay)}onPointerMove(t){this._pointerTracking&&(this.processDragMove(t),t.preventDefault())}processDragMove(t){this._nX=t.pageX-this._nOriginalX,this._nY=t.pageY-this._nOriginalY,!1===this._dragging&&(Math.abs(this._nX)>this._nDistance||Math.abs(this._nY)>this._nDistance)&&this.startDrag(),this._dragging&&this.emit(\"drag\",this._nX,this._nY,t)}onPointerUp(t){this.processDragStop(t)}processDragStop(t){var e;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this.checkRemovePointerTrackingEventListeners(),!0===this._dragging&&(this._eBody.classList.remove(\"lm_dragging\"),this._eElement.classList.remove(\"lm_dragging\"),null===(e=this._oDocument.querySelector(\"iframe\"))||void 0===e||e.style.setProperty(\"pointer-events\",\"\"),this._dragging=!1,this.emit(\"dragStop\",t))}checkRemovePointerTrackingEventListeners(){this._pointerTracking&&(this._oDocument.removeEventListener(\"pointermove\",this._pointerMoveEventListener),this._oDocument.removeEventListener(\"pointerup\",this._pointerUpEventListener),this._pointerTracking=!1)}startDrag(){var t;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this._dragging=!0,this._eBody.classList.add(\"lm_dragging\"),this._eElement.classList.add(\"lm_dragging\"),null===(t=this._oDocument.querySelector(\"iframe\"))||void 0===t||t.style.setProperty(\"pointer-events\",\"none\"),this.emit(\"dragStart\",this._nOriginalX,this._nOriginalY)}getPointerCoordinates(t){return{x:t.pageX,y:t.pageY}}}class qt{constructor(t,e,i){this._isVertical=t,this._size=e,this._grabSize=i0){const i=this.createSplitter(Math.max(0,e-1)).element;e>0?(this.contentItems[e-1].element.insertAdjacentElement(\"afterend\",i),i.insertAdjacentElement(\"afterend\",t.element)):(this.contentItems[0].element.insertAdjacentElement(\"beforebegin\",i),i.insertAdjacentElement(\"beforebegin\",t.element))}else this._childElementContainer.appendChild(t.element);super.addChild(t,e);const n=1/this.contentItems.length*100;if(!0===i)return this.emitBaseBubblingEvent(\"stateChanged\"),e;for(let e=0;e0&&(this.calculateRelativeSizes(),this.setAbsoluteSizes()),this.emitBaseBubblingEvent(\"stateChanged\"),this.emit(\"resize\")}setAbsoluteSizes(){const t=this.calculateAbsoluteSizes();for(let e=0;e0&&t.itemSizes[e]++,this._isColumn?(Tt(this.contentItems[e].element,t.crossAxisSize),At(this.contentItems[e].element,t.itemSizes[e])):(Tt(this.contentItems[e].element,t.itemSizes[e]),At(this.contentItems[e].element,t.crossAxisSize))}calculateAbsoluteSizes(){const t=(this.contentItems.length-1)*this._splitterSize,{width:e,height:i}=kt(this.element);let n,o;this._isColumn?(n=i-t,o=e):(n=e-t,o=i);let s=0;const r=[];for(let t=0;t0){const n=100-t;for(let t=0;t100&&e.length>0){for(let t=0;te)return;{const r=i/e;let a=i;for(let e=0;ethis.onSplitterDrag(e,t,i))),e.on(\"dragStop\",(()=>this.onSplitterDragStop(e))),e.on(\"dragStart\",(()=>this.onSplitterDragStart(e))),this._splitter.splice(t,0,e),e}getSplitItems(t){const e=this._splitter.indexOf(t);return{before:this.contentItems[e],after:this.contentItems[e+1]}}calculateContentItemMinSize(t){const e=t.minSize;if(void 0!==e){if(t.minSizeUnit===ht.Pixel)return e;throw new X(\"ROCGMD98831\",JSON.stringify(t))}{const t=this.layoutManager.layoutConfig.dimensions;return this._isColumn?t.defaultMinItemHeight:t.defaultMinItemWidth}}calculateContentItemsTotalMinSize(t){let e=0;for(const i of t)e+=this.calculateContentItemMinSize(i);return e}onSplitterDragStart(t){const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=this.calculateContentItemsTotalMinSize(e.before.contentItems),s=this.calculateContentItemsTotalMinSize(e.after.contentItems);this._splitterPosition=0,this._splitterMinPosition=-1*(i-o),this._splitterMaxPosition=n-s}onSplitterDrag(t,e,i){let n=this._isColumn?i:e;if(null===this._splitterMinPosition||null===this._splitterMaxPosition)throw new K(\"ROCOSD59226\");n=Math.max(n,this._splitterMinPosition),n=Math.min(n,this._splitterMaxPosition),this._splitterPosition=n;const o=zt(n);this._isColumn?t.element.style.top=o:t.element.style.left=o}onSplitterDragStop(t){if(null===this._splitterPosition)throw new K(\"ROCOSDS66932\");{const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=(this._splitterPosition+i)/(i+n),s=e.before.size+e.after.size;e.before.size=o*s,e.after.size=(1-o)*s,t.element.style.top=zt(0),t.element.style.left=zt(0),globalThis.requestAnimationFrame((()=>this.updateSize(!1)))}}}!function(t){t.getElementDimensionSize=function(t,e){return\"width\"===e?function(t){return t.offsetWidth}(t):function(t){return t.offsetHeight}(t)},t.setElementDimensionSize=function(t,e,i){return\"width\"===e?Tt(t,i):At(t,i)},t.createElement=function(t,e){const i=t.createElement(\"div\");return i.classList.add(\"lm_item\"),e?i.classList.add(\"lm_column\"):i.classList.add(\"lm_row\"),i}}(Xt||(Xt={}));class Yt extends $t{constructor(t,e,i){super(t,vt.create(e),null,Yt.createElement(document)),this.isGround=!0,this._childElementContainer=this.element,this._containerElement=i;let n=null;for(;;){const t=n?n.previousSibling:this._containerElement.lastChild;if(!(t instanceof Element&&t.classList.contains(\"lm_content\")))break;n=t}this._containerElement.insertBefore(this.element,n)}init(){if(!0!==this.isInitialised){this.updateNodeSize();for(let t=0;t0?this.contentItems[0]:this,n.isComponent)throw new Error(\"Cannot add item as child to ComponentItem\");{const t=this.layoutManager.createAndInitContentItem(i,n);return e=n.addChild(t,e),n===this?-1:e}}loadComponentAsRoot(t){this.clearRoot();const e=Ct.resolve(t,!1);if(e.maximised)throw new Error(\"Root Component cannot be maximised\");{const t=new jt(this.layoutManager,e,this);t.init(),this.addChild(t,0)}}addChild(t,e){if(this.contentItems.length>0)throw new Error(\"Ground node can only have a single child\");return this._childElementContainer.appendChild(t.element),e=super.addChild(t,e),this.updateSize(!1),this.emitBaseBubblingEvent(\"stateChanged\"),e}calculateConfigContent(){const t=this.contentItems,e=t.length,i=new Array(e);for(let n=0;n0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e)),this.updateContentItemsSize(!1))}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}createSideAreas(){const t=Yt.Area.oppositeSides,e=new Array(Object.keys(t).length);let i=0;for(const n in t){const o=n,s=this.getElementArea();if(null===s)throw new K(\"RCSA77553\");s.side=o,\"2\"===t[o][1]?s[o]=s[t[o]]-50:s[o]=s[t[o]]+50,s.surface=(s.x2-s.x1)*(s.y2-s.y1),e[i++]=s}return e}highlightDropZone(t,e,i){this.layoutManager.tabDropPlaceholder.remove(),super.highlightDropZone(t,e,i)}onDrop(t,e){if(t.isComponent){const e=ut.createDefault(),i=t;e.header=mt.Header.createCopy(i.headerConfig);const n=this.layoutManager.createAndInitContentItem(e,this);n.addChild(t),t=n}if(0===this.contentItems.length)this.addChild(t);else{if(t.type===at.row||t.type===at.column){const e=ut.createDefault(),i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}const i=\"x\"==e.side[0]?at.row:at.column,n=\"2\"==e.side[1],o=this.contentItems[0];if(o instanceof Xt&&o.type===i){const e=o.contentItems[n?0:o.contentItems.length-1];o.addChild(t,n?0:void 0,!0),e.size*=.5,t.size=e.size,t.sizeUnit=ht.Percent,o.updateSize(!1)}else{const e=ct.createDefault(i),s=this.layoutManager.createContentItem(e,this);this.replaceChild(o,s),s.addChild(t,n?0:void 0,!0),s.addChild(o,n?void 0:0,!0),o.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}}dock(){throw new X(\"GID87731\")}validateDocking(){throw new X(\"GIVD87732\")}getAllContentItems(){const t=[this];return this.deepGetAllContentItems(this.contentItems,t),t}getConfigMaximisedItems(){const t=[];return this.deepFilterContentItems(this.contentItems,t,(t=>!(!Gt.isStack(t)||!t.initialWantMaximise)||!(!Gt.isComponentItem(t)||!t.initialWantMaximise))),t}getItemsByPopInParentId(t){const e=[];return this.deepFilterContentItems(this.contentItems,e,(e=>e.popInParentIds.includes(t))),e}toConfig(){throw new Error(\"Cannot generate GroundItem config\")}setActiveComponentItem(t,e,i){}updateNodeSize(){const{width:t,height:e}=kt(this._containerElement);Tt(this.element,t),At(this.element,e),this.contentItems.length>0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e))}deepGetAllContentItems(t,e){for(let i=0;ithis.onClick(t),this._touchStartEventListener=t=>this.onTouchStart(t),this._element=document.createElement(\"div\"),this._element.classList.add(i),this._element.title=e,this._header.on(\"destroy\",(()=>this.destroy())),this._element.addEventListener(\"click\",this._clickEventListener,{passive:!0}),this._element.addEventListener(\"touchstart\",this._touchStartEventListener,{passive:!0}),this._header.controlsContainerElement.appendChild(this._element)}get element(){return this._element}destroy(){var t;this._element.removeEventListener(\"click\",this._clickEventListener),this._element.removeEventListener(\"touchstart\",this._touchStartEventListener),null===(t=this._element.parentNode)||void 0===t||t.removeChild(this._element)}onClick(t){this._pushEvent(t)}onTouchStart(t){this._pushEvent(t)}}class Jt{constructor(t,e,i,n,o){var s;this._layoutManager=t,this._componentItem=e,this._closeEvent=i,this._focusEvent=n,this._dragStartEvent=o,this._isActive=!1,this._tabClickListener=t=>this.onTabClickDown(t),this._tabTouchStartListener=t=>this.onTabTouchStart(t),this._closeClickListener=()=>this.onCloseClick(),this._closeTouchStartListener=()=>this.onCloseTouchStart(),this._dragStartListener=(t,e)=>this.onDragStart(t,e),this._contentItemDestroyListener=()=>this.onContentItemDestroy(),this._tabTitleChangedListener=t=>this.setTitle(t),this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_tab\"),this._titleElement=document.createElement(\"span\"),this._titleElement.classList.add(\"lm_title\"),this._closeElement=document.createElement(\"div\"),this._closeElement.classList.add(\"lm_close_tab\"),this._element.appendChild(this._titleElement),this._element.appendChild(this._closeElement),e.isClosable?this._closeElement.style.display=\"\":this._closeElement.style.display=\"none\",this.setTitle(e.title),this._componentItem.on(\"titleChanged\",this._tabTitleChangedListener);(null!==(s=e.reorderEnabled)&&void 0!==s?s:this._layoutManager.layoutConfig.settings.reorderEnabled)&&this.enableReorder(),this._element.addEventListener(\"click\",this._tabClickListener,{passive:!0}),this._element.addEventListener(\"touchstart\",this._tabTouchStartListener,{passive:!0}),this._componentItem.isClosable?(this._closeElement.addEventListener(\"click\",this._closeClickListener,{passive:!0}),this._closeElement.addEventListener(\"touchstart\",this._closeTouchStartListener,{passive:!0})):(this._closeElement.remove(),this._closeElement=void 0),this._componentItem.setTab(this),this._layoutManager.emit(\"tabCreated\",this)}get isActive(){return this._isActive}get componentItem(){return this._componentItem}get contentItem(){return this._componentItem}get element(){return this._element}get titleElement(){return this._titleElement}get closeElement(){return this._closeElement}get reorderEnabled(){return void 0!==this._dragListener}set reorderEnabled(t){t!==this.reorderEnabled&&(t?this.enableReorder():this.disableReorder())}setTitle(t){this._titleElement.innerText=t,this._element.title=t}setActive(t){t!==this._isActive&&(this._isActive=t,t?this._element.classList.add(\"lm_active\"):this._element.classList.remove(\"lm_active\"))}destroy(){var t,e;this._closeEvent=void 0,this._focusEvent=void 0,this._dragStartEvent=void 0,this._element.removeEventListener(\"click\",this._tabClickListener),this._element.removeEventListener(\"touchstart\",this._tabTouchStartListener),null===(t=this._closeElement)||void 0===t||t.removeEventListener(\"click\",this._closeClickListener),null===(e=this._closeElement)||void 0===e||e.removeEventListener(\"touchstart\",this._closeTouchStartListener),this._componentItem.off(\"titleChanged\",this._tabTitleChangedListener),this.reorderEnabled&&this.disableReorder(),this._element.remove()}setBlurred(){this._element.classList.remove(\"lm_focused\"),this._titleElement.classList.remove(\"lm_focused\")}setFocused(){this._element.classList.add(\"lm_focused\"),this._titleElement.classList.add(\"lm_focused\")}onDragStart(t,e){if(void 0===this._dragListener)throw new J(\"TODSDLU10093\");if(void 0===this._dragStartEvent)throw new J(\"TODS23309\");this._dragStartEvent(t,e,this._dragListener,this.componentItem)}onContentItemDestroy(){void 0!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=void 0)}onTabClickDown(t){const e=t.target;e!==this._element&&e!==this._titleElement||(0===t.button?this.notifyFocus():1===t.button&&this._componentItem.isClosable&&this.notifyClose())}onTabTouchStart(t){t.target===this._element&&this.notifyFocus()}onCloseClick(){this.notifyClose()}onCloseTouchStart(){this.notifyClose()}notifyClose(){if(void 0===this._closeEvent)throw new J(\"TNC15007\");this._closeEvent(this._componentItem)}notifyFocus(){if(void 0===this._focusEvent)throw new J(\"TNA15007\");this._focusEvent(this._componentItem)}enableReorder(){this._dragListener=new Zt(this._element,[this._titleElement]),this._dragListener.on(\"dragStart\",this._dragStartListener),this._componentItem.on(\"destroy\",this._contentItemDestroyListener)}disableReorder(){if(void 0===this._dragListener)throw new J(\"TDR87745\");this._componentItem.off(\"destroy\",this._contentItemDestroyListener),this._dragListener.off(\"dragStart\",this._dragStartListener),this._dragListener=void 0}}class Qt{constructor(t,e,i,n,o){this._layoutManager=t,this._componentRemoveEvent=e,this._componentFocusEvent=i,this._componentDragStartEvent=n,this._dropdownActiveChangedEvent=o,this._tabs=[],this._lastVisibleTabIndex=-1,this._dropdownActive=!1,this._element=document.createElement(\"section\"),this._element.classList.add(\"lm_tabs\"),this._dropdownElement=document.createElement(\"section\"),this._dropdownElement.classList.add(\"lm_tabdropdown_list\"),this._dropdownElement.style.display=\"none\"}get tabs(){return this._tabs}get tabCount(){return this._tabs.length}get lastVisibleTabIndex(){return this._lastVisibleTabIndex}get element(){return this._element}get dropdownElement(){return this._dropdownElement}get dropdownActive(){return this._dropdownActive}destroy(){for(let t=0;tthis.handleTabCloseEvent(t)),(t=>this.handleTabFocusEvent(t)),((t,e,i,n)=>this.handleTabDragStartEvent(t,e,i,n)));void 0===e&&(e=this._tabs.length),this._tabs.splice(e,0,i),ethis._lastVisibleTabIndex){const t=this._tabs[e];for(let t=e;t>0;t--)this._tabs[t]=this._tabs[t-1];this._tabs[0]=t}}updateTabSizes(t,e){let i=!1;this.tryUpdateTabSizes(i,t,e)||(i=!0,this.tryUpdateTabSizes(i,t,e)),i!==this._dropdownActive&&(this._dropdownActive=i,this._dropdownActiveChangedEvent())}tryUpdateTabSizes(t,e,i){if(this._tabs.length>0){if(void 0===i)throw new Error(\"non-empty tabs must have active component item\");let n=0,o=!1;const s=this._layoutManager.layoutConfig.settings.tabOverlapAllowance,r=this._tabs.indexOf(i.tab),a=this._tabs[r];this._lastVisibleTabIndex=-1;for(let i=0;ie){if(o)i===r&&(l.style.zIndex=\"auto\",l.style.marginLeft=\"\",l.parentElement!==this._element&&this._element.appendChild(l));else{let t;if(t=r>0&&r<=i?(d-e)/(i-1):(d-e)/i,tthis.onClick(t),this._touchStartListener=t=>this.onTouchStart(t),this._rowColumnClosable=!0,this._closeButton=null,this._popoutButton=null,this._tabsContainer=new Qt(this._layoutManager,(t=>this.handleTabInitiatedComponentRemoveEvent(t)),(t=>this.handleTabInitiatedComponentFocusEvent(t)),((t,e,i,n)=>this.handleTabInitiatedDragStartEvent(t,e,i,n)),(()=>this.processTabDropdownActiveChanged())),this._show=i.show,this._popoutEnabled=i.popoutEnabled,this._popoutLabel=i.popoutLabel,this._maximiseEnabled=i.maximiseEnabled,this._maximiseLabel=i.maximiseLabel,this._minimiseEnabled=i.minimiseEnabled,this._minimiseLabel=i.minimiseLabel,this._closeEnabled=i.closeEnabled,this._closeLabel=i.closeLabel,this._tabDropdownEnabled=i.tabDropdownEnabled,this._tabDropdownLabel=i.tabDropdownLabel,this.setSide(i.side),this._canRemoveComponent=this._configClosable,this._element=document.createElement(\"section\"),this._element.classList.add(\"lm_header\"),this._controlsContainerElement=document.createElement(\"section\"),this._controlsContainerElement.classList.add(\"lm_controls\"),this._element.appendChild(this._tabsContainer.element),this._element.appendChild(this._controlsContainerElement),this._element.appendChild(this._tabsContainer.dropdownElement),this._element.addEventListener(\"click\",this._clickListener,{passive:!0}),this._element.addEventListener(\"touchstart\",this._touchStartListener,{passive:!0}),this._documentMouseUpListener=()=>this._tabsContainer.hideAdditionalTabsDropdown(),globalThis.document.addEventListener(\"mouseup\",this._documentMouseUpListener,{passive:!0}),this._tabControlOffset=this._layoutManager.layoutConfig.settings.tabControlOffset,this._tabDropdownEnabled&&(this._tabDropdownButton=new Kt(this,this._tabDropdownLabel,\"lm_tabdropdown\",(()=>this._tabsContainer.showAdditionalTabsDropdown()))),this._popoutEnabled&&(this._popoutButton=new Kt(this,this._popoutLabel,\"lm_popout\",(()=>this.handleButtonPopoutEvent()))),this._maximiseEnabled&&(this._maximiseButton=new Kt(this,this._maximiseLabel,\"lm_maximise\",(t=>this.handleButtonMaximiseToggleEvent(t)))),this._configClosable&&(this._closeButton=new Kt(this,this._closeLabel,\"lm_close\",(()=>s()))),this.processTabDropdownActiveChanged()}get show(){return this._show}get side(){return this._side}get leftRightSided(){return this._leftRightSided}get layoutManager(){return this._layoutManager}get parent(){return this._parent}get tabs(){return this._tabsContainer.tabs}get lastVisibleTabIndex(){return this._tabsContainer.lastVisibleTabIndex}get element(){return this._element}get tabsContainerElement(){return this._tabsContainer.element}get controlsContainerElement(){return this._controlsContainerElement}destroy(){this.emit(\"destroy\"),this._popoutEvent=void 0,this._maximiseToggleEvent=void 0,this._clickEvent=void 0,this._touchStartEvent=void 0,this._componentRemoveEvent=void 0,this._componentFocusEvent=void 0,this._componentDragStartEvent=void 0,this._tabsContainer.destroy(),globalThis.document.removeEventListener(\"mouseup\",this._documentMouseUpListener),this._element.remove()}createTab(t,e){this._tabsContainer.createTab(t,e)}removeTab(t){this._tabsContainer.removeTab(t)}processActiveComponentChanged(t){this._tabsContainer.processActiveComponentChanged(t),this.updateTabSizes()}setSide(t){this._side=t,this._leftRightSided=[nt.right,nt.left].includes(this._side)}setRowColumnClosable(t){this._rowColumnClosable=t,this.updateClosability()}updateClosability(){let t;if(this._configClosable)if(this._rowColumnClosable){t=!0;const e=this.tabs.length;for(let i=0;i1}applyFocusedValue(t){t?this._element.classList.add(\"lm_focused\"):this._element.classList.remove(\"lm_focused\")}processMaximised(){if(void 0===this._maximiseButton)throw new J(\"HPMAX16997\");this._maximiseButton.element.setAttribute(\"title\",this._minimiseLabel)}processMinimised(){if(void 0===this._maximiseButton)throw new J(\"HPMIN16997\");this._maximiseButton.element.setAttribute(\"title\",this._maximiseLabel)}updateTabSizes(){if(this._tabsContainer.tabCount>0){const t=this._show?this._layoutManager.layoutConfig.dimensions.headerHeight:0;let e;this._leftRightSided?(this._element.style.height=\"\",this._element.style.width=zt(t)):(this._element.style.width=\"\",this._element.style.height=zt(t)),e=this._leftRightSided?this._element.offsetHeight-this._controlsContainerElement.offsetHeight-this._tabControlOffset:this._element.offsetWidth-this._controlsContainerElement.offsetWidth-this._tabControlOffset,this._tabsContainer.updateTabSizes(e,this._getActiveComponentItemEvent())}}handleTabInitiatedComponentRemoveEvent(t){if(this._canRemoveComponent){if(void 0===this._componentRemoveEvent)throw new J(\"HHTCE22294\");this._componentRemoveEvent(t)}}handleTabInitiatedComponentFocusEvent(t){if(void 0===this._componentFocusEvent)throw new J(\"HHTAE22294\");this._componentFocusEvent(t)}handleTabInitiatedDragStartEvent(t,e,i,n){if(this._canRemoveComponent){if(void 0===this._componentDragStartEvent)throw new J(\"HHTDSE22294\");this._componentDragStartEvent(t,e,i,n)}else i.cancelDrag()}processTabDropdownActiveChanged(){void 0!==this._tabDropdownButton&&Dt(this._tabDropdownButton.element,this._tabsContainer.dropdownActive)}handleButtonPopoutEvent(){if(this._layoutManager.layoutConfig.settings.popoutWholeStack){if(void 0===this._popoutEvent)throw new J(\"HHBPOE17834\");this._popoutEvent()}else{const t=this._getActiveComponentItemEvent();t&&t.popout()}}handleButtonMaximiseToggleEvent(t){if(void 0===this._maximiseToggleEvent)throw new J(\"HHBMTE16834\");this._maximiseToggleEvent()}onClick(t){t.target===this._element&&this.notifyClick(t)}onTouchStart(t){t.target===this._element&&this.notifyTouchStart(t)}notifyClick(t){if(void 0===this._clickEvent)throw new J(\"HNHC46834\");this._clickEvent(t)}notifyTouchStart(t){if(void 0===this._touchStartEvent)throw new J(\"HNHTS46834\");this._touchStartEvent(t)}}class ee extends $t{constructor(t,e,i){var n,o,s,r,a,l,h,d,c,m,u,p,g,f,v,_,y,C,w;super(t,e,i,ee.createElement(document)),this._headerSideChanged=!1,this._resizeListener=()=>this.handleResize(),this._maximisedListener=()=>this.handleMaximised(),this._minimisedListener=()=>this.handleMinimised(),this._headerConfig=e.header;const I=t.layoutConfig.header,b=e.content;let S;if(1!==b.length)S=void 0;else{S=b[0].header}this._initialWantMaximise=e.maximised,this._initialActiveItemIndex=null!==(n=e.activeItemIndex)&&void 0!==n?n:0;const E=null!==(r=null!==(s=null===(o=this._headerConfig)||void 0===o?void 0:o.show)&&void 0!==s?s:null==S?void 0:S.show)&&void 0!==r?r:I.show,x=null!==(h=null!==(l=null===(a=this._headerConfig)||void 0===a?void 0:a.popout)&&void 0!==l?l:null==S?void 0:S.popout)&&void 0!==h?h:I.popout,L=null!==(m=null!==(c=null===(d=this._headerConfig)||void 0===d?void 0:d.maximise)&&void 0!==c?c:null==S?void 0:S.maximise)&&void 0!==m?m:I.maximise,z=null!==(g=null!==(p=null===(u=this._headerConfig)||void 0===u?void 0:u.close)&&void 0!==p?p:null==S?void 0:S.close)&&void 0!==g?g:I.close,M=null!==(_=null!==(v=null===(f=this._headerConfig)||void 0===f?void 0:f.minimise)&&void 0!==v?v:null==S?void 0:S.minimise)&&void 0!==_?_:I.minimise,P=null!==(w=null!==(C=null===(y=this._headerConfig)||void 0===y?void 0:y.tabDropdown)&&void 0!==C?C:null==S?void 0:S.tabDropdown)&&void 0!==w?w:I.tabDropdown;this._maximisedEnabled=!1!==L;const T={show:!1!==E,side:!1===E?nt.top:E,popoutEnabled:!1!==x,popoutLabel:!1===x?\"\":x,maximiseEnabled:this._maximisedEnabled,maximiseLabel:!1===L?\"\":L,closeEnabled:!1!==z,closeLabel:!1===z?\"\":z,minimiseEnabled:!0,minimiseLabel:M,tabDropdownEnabled:!1!==P,tabDropdownLabel:!1===P?\"\":P};this._header=new te(t,this,T,e.isClosable&&!1!==z,(()=>this.getActiveComponentItem()),(()=>this.remove()),(()=>this.handlePopoutEvent()),(()=>this.toggleMaximise()),(t=>this.handleHeaderClickEvent(t)),(t=>this.handleHeaderTouchStartEvent(t)),(t=>this.handleHeaderComponentRemoveEvent(t)),(t=>this.handleHeaderComponentFocusEvent(t)),((t,e,i,n)=>this.handleHeaderComponentStartDragEvent(t,e,i,n))),this.isStack=!0,this._childElementContainer=document.createElement(\"section\"),this._childElementContainer.classList.add(\"lm_items\"),this.on(\"resize\",this._resizeListener),this._maximisedEnabled&&(this.on(\"maximised\",this._maximisedListener),this.on(\"minimised\",this._minimisedListener)),this.element.appendChild(this._header.element),this.element.appendChild(this._childElementContainer),this.setupHeaderPosition(),this._header.updateClosability()}get childElementContainer(){return this._childElementContainer}get header(){return this._header}get headerShow(){return this._header.show}get headerSide(){return this._header.side}get headerLeftRightSided(){return this._header.leftRightSided}get contentAreaDimensions(){return this._contentAreaDimensions}get initialWantMaximise(){return this._initialWantMaximise}get isMaximised(){return this===this.layoutManager.maximisedStack}get stackParent(){if(!this.parent)throw new Error(\"Stack should always have a parent\");return this.parent}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}init(){if(!0===this.isInitialised)return;this.updateNodeSize();for(let t=0;t0){if(this._initialActiveItemIndex<0||this._initialActiveItemIndex>=e)throw new Error(`ActiveItemIndex out of range: ${this._initialActiveItemIndex} id: ${this.id}`);for(let i=0;ithis.contentItems.length)throw e-=1,new X(\"SAC99728\");if(t instanceof jt)return e=super.addChild(t,e),this._childElementContainer.appendChild(t.element),this._header.createTab(t,e),this.setActiveComponentItem(t,i),this._header.updateTabSizes(),this.updateSize(!1),t.container.setBaseLogicalZIndex(),this._header.updateClosability(),this.emitStateChangedEvent(),e;throw new X(\"SACC88532\")}removeChild(t,e){const i=t,n=this.contentItems.indexOf(i),o=1===this.contentItems.length;if(this._activeComponentItem===i&&(i.focused&&i.blur(),!o)){const t=0===n?1:n-1;this.setActiveComponentItem(this.contentItems[t],!1)}this._header.removeTab(i),super.removeChild(i,e),o||this._header.updateClosability(),this.emitStateChangedEvent()}toggleMaximise(){this.isMaximised?this.minimise():this.maximise()}maximise(){if(!this.isMaximised){this.layoutManager.setMaximisedStack(this);const t=this.contentItems,e=t.length;for(let i=0;i0&&void 0===t)throw new Error(\"expected non-empty stack to have an active component item\");return{type:\"stack\",content:this.calculateConfigContent(),size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,isClosable:this.isClosable,maximised:this.isMaximised,header:this.createHeaderConfig(),activeItemIndex:t}}onDrop(t,e){if(\"header\"===this._dropSegment){if(this.resetHeaderDropZone(),void 0===this._dropIndex)throw new J(\"SODDI68990\");return void this.addChild(t,this._dropIndex)}if(\"body\"===this._dropSegment)return void this.addChild(t,0,!0);const i=\"top\"===this._dropSegment||\"bottom\"===this._dropSegment,n=\"left\"===this._dropSegment||\"right\"===this._dropSegment,o=\"top\"===this._dropSegment||\"left\"===this._dropSegment,s=i&&this.stackParent.isColumn||n&&this.stackParent.isRow;if(t.isComponent){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createAndInitContentItem(e,this);i.addChild(t),t=i}if(t.type===at.row||t.type===at.column){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}if(s){const e=this.stackParent.contentItems.indexOf(this);this.stackParent.addChild(t,o?e:e+1,!0),this.size*=.5,t.size=this.size,t.sizeUnit=this.sizeUnit,this.stackParent.updateSize(!1)}else{const e=i?at.column:at.row,n=ct.createDefault(e),s=this.layoutManager.createContentItem(n,this);this.stackParent.replaceChild(this,s),s.addChild(t,o?0:void 0,!0),s.addChild(this,o?void 0:0,!0),this.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}highlightDropZone(t,e){for(const i in this._contentAreaDimensions){const n=i,o=this._contentAreaDimensions[n].hoverArea;if(o.x1t&&o.y1e)return void(\"header\"===n?(this._dropSegment=\"header\",this.highlightHeaderDropZone(this._header.leftRightSided?e:t)):(this.resetHeaderDropZone(),this.highlightBodyDropZone(n)))}}getArea(){if(\"none\"===this.element.style.display)return null;const t=super.getElementArea(this._header.element),e=super.getElementArea(this._childElementContainer);if(null===t||null===e)throw new K(\"SGAHC13086\");const i=e.x2-e.x1,n=e.y2-e.y1;return this._contentAreaDimensions={header:{hoverArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2},highlightArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2}}},0===this.contentItems.length?(this._contentAreaDimensions.body={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2}},super.getElementArea(this.element)):(this._contentAreaDimensions.left={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x1+.25*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x1+.5*i,y2:e.y2}},this._contentAreaDimensions.top={hoverArea:{x1:e.x1+.25*i,y1:e.y1,x2:e.x1+.75*i,y2:e.y1+.5*n},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y1+.5*n}},this._contentAreaDimensions.right={hoverArea:{x1:e.x1+.75*i,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1+.5*i,y1:e.y1,x2:e.x2,y2:e.y2}},this._contentAreaDimensions.bottom={hoverArea:{x1:e.x1+.25*i,y1:e.y1+.5*n,x2:e.x1+.75*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1+.5*n,x2:e.x2,y2:e.y2}},super.getElementArea(this.element))}positionHeader(t){this._header.side!==t&&(this._header.setSide(t),this._headerSideChanged=!0,this.setupHeaderPosition())}updateNodeSize(){if(\"none\"!==this.element.style.display){const t=kt(this.element);if(this._header.show){t[this._header.leftRightSided?it.width:it.height]-=this.layoutManager.layoutConfig.dimensions.headerHeight}this._childElementContainer.style.width=zt(t.width),this._childElementContainer.style.height=zt(t.height);for(let e=0;e=o&&tthis.onDrag(t,e,i))),this._dragListener.on(\"dragStop\",(()=>this.onDrop())),this.createDragProxyElements(t,e),null===this._componentItem.parent)throw new K(\"DPC10097\");this._componentItemFocused=this._componentItem.focused,this._componentItemFocused&&this._componentItem.blur(),this._componentItem.parent.removeChild(this._componentItem,!0),this.setDimensions(),document.body.appendChild(this._element),this.determineMinMaxXY(),this._layoutManager.calculateItemAreas(),this.setDropPosition(t,e)}get element(){return this._element}createDragProxyElements(t,e){this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_dragProxy\");const i=document.createElement(\"div\");i.classList.add(\"lm_header\");const n=document.createElement(\"div\");n.classList.add(\"lm_tabs\");const o=document.createElement(\"div\");o.classList.add(\"lm_tab\");const s=document.createElement(\"span\");s.classList.add(\"lm_title\"),o.appendChild(s),n.appendChild(o),i.appendChild(n),this._proxyContainerElement=document.createElement(\"div\"),this._proxyContainerElement.classList.add(\"lm_content\"),this._element.appendChild(i),this._element.appendChild(this._proxyContainerElement),this._originalParent instanceof ee&&this._originalParent.headerShow&&(this._sided=this._originalParent.headerLeftRightSided,this._element.classList.add(\"lm_\"+this._originalParent.headerSide),[nt.right,nt.bottom].indexOf(this._originalParent.headerSide)>=0&&this._proxyContainerElement.insertAdjacentElement(\"afterend\",i)),this._element.style.left=zt(t),this._element.style.top=zt(e),o.setAttribute(\"title\",this._componentItem.title),s.insertAdjacentText(\"afterbegin\",this._componentItem.title),this._proxyContainerElement.appendChild(this._componentItem.element)}determineMinMaxXY(){const t=this._layoutManager.groundItem;if(void 0===t)throw new J(\"DPDMMXY73109\");{const e=t.element.getBoundingClientRect();this._minX=e.left+document.body.scrollLeft,this._minY=e.top+document.body.scrollTop,this._maxX=this._minX+e.width,this._maxY=this._minY+e.height}}onDrag(t,e,i){const n=i.pageX,o=i.pageY;this.setDropPosition(n,o),this._componentItem.drag()}setDropPosition(t,e){this._layoutManager.layoutConfig.settings.constrainDragToContainer&&(t<=this._minX?t=Math.ceil(this._minX):t>=this._maxX&&(t=Math.floor(this._maxX)),e<=this._minY?e=Math.ceil(this._minY):e>=this._maxY&&(e=Math.floor(this._maxY))),this._element.style.left=zt(t),this._element.style.top=zt(e),this._area=this._layoutManager.getArea(t,e),null!==this._area&&(this._lastValidArea=this._area,this._area.contentItem.highlightDropZone(t,e,this._area))}onDrop(){const t=this._layoutManager.dropTargetIndicator;if(null===t)throw new K(\"DPOD30011\");let e;if(t.hide(),this._componentItem.exitDragMode(),null!==this._area)e=this._componentItem,this._area.contentItem.onDrop(e,this._area);else if(null!==this._lastValidArea){e=this._componentItem;this._lastValidArea.contentItem.onDrop(e,this._lastValidArea)}else this._originalParent?(e=this._componentItem,this._originalParent.addChild(e)):this._componentItem.destroy();this._element.remove(),this._layoutManager.emit(\"itemDropped\",this._componentItem),this._componentItemFocused&&void 0!==e&&e.focus()}setDimensions(){const t=this._layoutManager.layoutConfig.dimensions;if(void 0===t)throw new Error(\"DragProxy.setDimensions: dimensions undefined\");let e=t.dragProxyWidth,i=t.dragProxyHeight;if(void 0===e||void 0===i)throw new Error(\"DragProxy.setDimensions: width and/or height undefined\");const n=!1===this._layoutManager.layoutConfig.header.show?0:t.headerHeight;this._element.style.width=zt(e),this._element.style.height=zt(i),e-=this._sided?n:0,i-=this._sided?0:n,this._proxyContainerElement.style.width=zt(e),this._proxyContainerElement.style.height=zt(i),this._componentItem.enterDragMode(e,i),this._componentItem.show()}}class ne{constructor(t,e,i,n,o,s,r){this._layoutManager=t,this._element=e,this._extraAllowableChildTargets=i,this._componentTypeOrFtn=n,this._componentState=o,this._title=s,this._id=r,this._dragListener=null,this._dummyGroundContainer=document.createElement(\"div\");const a=gt.createDefault(\"row\");this._dummyGroundContentItem=new Yt(this._layoutManager,a,this._dummyGroundContainer),this.createDragListener()}destroy(){this.removeDragListener()}createDragListener(){this.removeDragListener(),this._dragListener=new Zt(this._element,this._extraAllowableChildTargets),this._dragListener.on(\"dragStart\",((t,e)=>this.onDragStart(t,e))),this._dragListener.on(\"dragStop\",(()=>this.onDragStop()))}onDragStart(t,e){var i;const n=\"component\";let o;if(\"function\"==typeof this._componentTypeOrFtn){const t=this._componentTypeOrFtn();o=ne.isDragSourceComponentItemConfig(t)?{type:n,componentState:t.state,componentType:t.type,title:null!==(i=t.title)&&void 0!==i?i:this._title}:t}else o={type:n,componentState:this._componentState,componentType:this._componentTypeOrFtn,title:this._title,id:this._id};const s=bt.resolve(o,!1),r=new jt(this._layoutManager,s,this._dummyGroundContentItem);if(this._dummyGroundContentItem.contentItems.push(r),null===this._dragListener)throw new K(\"DSODSD66746\");{const i=new ie(t,e,this._dragListener,this._layoutManager,r,this._dummyGroundContentItem),n=this._layoutManager.transitionIndicator;if(null===n)throw new K(\"DSODST66746\");n.transitionElements(this._element,i.element)}}onDragStop(){this.createDragListener()}removeDragListener(){null!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=null)}}!function(t){t.isDragSourceComponentItemConfig=function(t){return!(\"componentType\"in t)}}(ne||(ne={}));class oe{constructor(){this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_dropTargetIndicator\");const t=document.createElement(\"div\");t.classList.add(\"lm_inner\"),this._element.appendChild(t),document.body.appendChild(this._element)}destroy(){this._element.remove()}highlightArea(t,e){this._element.style.left=zt(t.x1+e),this._element.style.top=zt(t.y1+e),this._element.style.width=zt(t.x2-t.x1-e),this._element.style.height=zt(t.y2-t.y1-e),this._element.style.display=\"block\"}hide(){Dt(this._element,!1)}}class se{constructor(){this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_transition_indicator\"),document.body.appendChild(this._element),this._toElement=null,this._fromDimensions=null,this._totalAnimationDuration=200,this._animationStartTime=null}destroy(){this._element.remove()}transitionElements(t,e){}nextAnimationFrame(){}measure(t){const e=t.getBoundingClientRect();return{left:e.left,top:e.top,width:t.offsetWidth,height:t.offsetHeight}}}class re extends Wt{constructor(t){super(),this._layoutManager=t,this._childEventListener=t=>this.onEventFromChild(t),globalThis.addEventListener(re.ChildEventName,this._childEventListener,{passive:!0})}emit(t,...e){\"userBroadcast\"===t?this.emitUserBroadcast(...e):super.emit(t,...e)}emitUserBroadcast(...t){this.handleUserBroadcastEvent(\"userBroadcast\",t)}destroy(){globalThis.removeEventListener(re.ChildEventName,this._childEventListener)}handleUserBroadcastEvent(t,e){this._layoutManager.isSubWindow?this.propagateToParent(t,e):this.propagateToThisAndSubtree(t,e)}onEventFromChild(t){const e=t.detail;this.handleUserBroadcastEvent(e.eventName,e.args)}propagateToParent(t,e){const i={bubbles:!0,cancelable:!0,detail:{layoutManager:this._layoutManager,eventName:t,args:e}},n=new CustomEvent(re.ChildEventName,i),o=globalThis.opener;if(null===o)throw new K(\"EHPTP15778\");o.dispatchEvent(n)}propagateToThisAndSubtree(t,e){this.emitUnknown(t,...e);for(let i=0;ithis.handleContainerResize())),this._windowBeforeUnloadListener=()=>this.onBeforeUnload(),this._windowBeforeUnloadListening=!1,this._maximisedStackBeforeDestroyedListener=t=>this.cleanupBeforeMaximisedStackDestroyed(t),this.isSubWindow=t.isSubWindow,this._constructorOrSubWindowLayoutConfig=t.constructorOrSubWindowLayoutConfig,Q.checkInitialise(),dt.checkInitialise(),void 0!==t.containerElement&&(this._containerElement=t.containerElement)}get container(){return this._containerElement}get isInitialised(){return this._isInitialised}get groundItem(){return this._groundItem}get root(){return this._groundItem}get openPopouts(){return this._openPopouts}get dropTargetIndicator(){return this._dropTargetIndicator}get transitionIndicator(){return this._transitionIndicator}get width(){return this._width}get height(){return this._height}get eventHub(){return this._eventHub}get rootItem(){if(void 0===this._groundItem)throw new Error(\"Cannot access rootItem before init\");return 0===this._groundItem.contentItems.length?void 0:this._groundItem.contentItems[0]}get focusedComponentItem(){return this._focusedComponentItem}get tabDropPlaceholder(){return this._tabDropPlaceholder}get maximisedStack(){return this._maximisedStack}get deprecatedConstructor(){return!this.isSubWindow&&void 0!==this._constructorOrSubWindowLayoutConfig}destroy(){if(this._isInitialised){this._windowBeforeUnloadListening&&(globalThis.removeEventListener(\"beforeunload\",this._windowBeforeUnloadListener),this._windowBeforeUnloadListening=!1),!0===this.layoutConfig.settings.closePopoutsOnUnload&&this.closeAllOpenPopouts(),this._resizeObserver.disconnect(),this.checkClearResizeTimeout(),void 0!==this._groundItem&&this._groundItem.destroy(),this._tabDropPlaceholder.remove(),null!==this._dropTargetIndicator&&this._dropTargetIndicator.destroy(),null!==this._transitionIndicator&&this._transitionIndicator.destroy(),this._eventHub.destroy();for(const t of this._dragSources)t.destroy();this._dragSources=[],this._isInitialised=!1}}minifyConfig(t){return _t.minifyConfig(t)}unminifyConfig(t){return _t.unminifyConfig(t)}init(){let t;if(this.setContainer(),this._dropTargetIndicator=new oe,this._transitionIndicator=new se,this.updateSizeFromContainer(),this.isSubWindow){if(void 0===this._constructorOrSubWindowLayoutConfig)throw new J(\"LMIU07155\");{const e=this._constructorOrSubWindowLayoutConfig.root;if(void 0===e)throw new X(\"LMIC07156\");if(!Ct.isComponent(e))throw new X(\"LMIC07157\");t=e;const i=xt.resolve(this._constructorOrSubWindowLayoutConfig);this.layoutConfig=Object.assign(Object.assign({},i),{root:void 0})}}else void 0===this._constructorOrSubWindowLayoutConfig?this.layoutConfig=_t.createDefault():this.layoutConfig=xt.resolve(this._constructorOrSubWindowLayoutConfig);const e=this.layoutConfig;this._groundItem=new Yt(this,e.root,this._containerElement),this._groundItem.init(),this.checkLoadedLayoutMaximiseItem(),this._resizeObserver.observe(this._containerElement),this._isInitialised=!0,this.adjustColumnsResponsive(),this.emit(\"initialised\"),void 0!==t&&this.loadComponentAsRoot(t)}loadLayout(t){if(!this.isInitialised)throw new Error(\"GoldenLayout: Need to call init() if LayoutConfig with defined root passed to constructor\");if(void 0===this._groundItem)throw new J(\"LMLL11119\");this.createSubWindows(),this.layoutConfig=xt.resolve(t),this._groundItem.loadRoot(this.layoutConfig.root),this.checkLoadedLayoutMaximiseItem(),this.adjustColumnsResponsive()}saveLayout(){if(!1===this._isInitialised)throw new Error(\"Can't create config, layout not yet initialised\");if(void 0===this._groundItem)throw new J(\"LMTC18244\");{const t=this._groundItem.calculateConfigContent();let e;e=1!==t.length?void 0:t[0],this.reconcilePopoutWindows();const i=[];for(let t=0;t=0?n=this._groundItem.contentItems[0]:e=0;break;case at.row:case at.column:e=n.addItem(t,i.index);break;case at.stack:if(Ct.isComponent(t)){e=n.addItem(t,i.index);break}throw Error(tt[6]);case at.component:throw new X(\"LMAIALC87444602\");default:throw new Y(\"LMAIALU98881733\",n.type)}if(Ct.isComponent(t)){const t=n.contentItems[e];Gt.isStack(t)&&(n=t,e=0)}return i.parentItem=n,i.index=e,i}}}loadComponentAsRoot(t){if(void 0===this._groundItem)throw new Error(\"Cannot add item before init\");this._groundItem.loadComponentAsRoot(t)}updateSize(t,e){this.setSize(t,e)}setSize(t,e){if(this._width=t,this._height=e,!0===this._isInitialised){if(void 0===this._groundItem)throw new J(\"LMUS18881\");if(this._groundItem.setSize(this._width,this._height),this._maximisedStack){const{width:t,height:e}=kt(this._containerElement);Tt(this._maximisedStack.element,t),At(this._maximisedStack.element,e),this._maximisedStack.updateSize(!1)}this.adjustColumnsResponsive()}}beginSizeInvalidation(){this._sizeInvalidationBeginCount++}endSizeInvalidation(){0==--this._sizeInvalidationBeginCount&&this.updateSizeFromContainer()}updateSizeFromContainer(){const{width:t,height:e}=kt(this._containerElement);this.setSize(t,e)}updateRootSize(t=!1){if(void 0===this._groundItem)throw new J(\"LMURS28881\");this._groundItem.updateSize(t)}createAndInitContentItem(t,e){const i=this.createContentItem(t,e);return i.init(),i}createContentItem(t,e){if(\"string\"!=typeof t.type)throw new G(\"Missing parameter 'type'\",JSON.stringify(t));if(ct.isComponentItem(t)&&!(e instanceof ee)&&e&&!(!0===this.isSubWindow&&e instanceof Yt)){t={type:at.stack,content:[t],size:t.size,sizeUnit:t.sizeUnit,minSize:t.minSize,minSizeUnit:t.minSizeUnit,id:t.id,maximised:t.maximised,isClosable:t.isClosable,activeItemIndex:0,header:void 0}}return this.createContentItemFromConfig(t,e)}findFirstComponentItemById(t){if(void 0===this._groundItem)throw new J(\"LMFFCIBI82446\");return this.findFirstContentItemTypeByIdRecursive(at.component,t,this._groundItem)}createPopout(t,e,i,n){return t instanceof Gt?this.createPopoutFromContentItem(t,e,i,n):this.createPopoutFromItemConfig(t,e,i,n)}createPopoutFromContentItem(t,e,i,n){let o=t.parent,s=t;for(;null!==o&&1===o.contentItems.length&&!o.isGround;)s=o,o=o.parent;if(null===o)throw new K(\"LMCPFCI00834\");{if(void 0===n&&(n=o.contentItems.indexOf(s)),null!==i&&o.addPopInParentId(i),void 0===e){const i=globalThis.screenX||globalThis.screenLeft,n=globalThis.screenY||globalThis.screenTop,o=t.element.offsetLeft,s=t.element.offsetTop,{width:r,height:a}=kt(t.element);e={left:i+o,top:n+s,width:r,height:a}}const r=t.toConfig();if(t.remove(),ft.isRootItemConfig(r))return this.createPopoutFromItemConfig(r,e,i,n);throw new Error(`${tt[0]}`)}}beginVirtualSizedContainerAdding(){0==++this._virtualSizedContainerAddingBeginCount&&(this._virtualSizedContainers.length=0)}addVirtualSizedContainer(t){this._virtualSizedContainers.push(t)}endVirtualSizedContainerAdding(){if(0==--this._virtualSizedContainerAddingBeginCount){const t=this._virtualSizedContainers.length;if(t>0){this.fireBeforeVirtualRectingEvent(t);for(let e=0;ethis.emit(\"windowOpened\",a))),a.on(\"closed\",(()=>this.reconcilePopoutWindows())),this._openPopouts.push(a),this.layoutConfig.settings.closePopoutsOnUnload&&!this._windowBeforeUnloadListening&&(globalThis.addEventListener(\"beforeunload\",this._windowBeforeUnloadListener,{passive:!0}),this._windowBeforeUnloadListening=!0),a}closeAllOpenPopouts(){for(let t=0;tglobalThis.close()),1)}getArea(t,e){let i=null,n=1/0;for(let o=0;o=s.x1&&t=s.y1&&es.surface&&(n=s.surface,i=s)}return i}calculateItemAreas(){const t=this.getAllContentItems(),e=this._groundItem;if(void 0===e)throw new J(\"LMCIAR44365\");if(1!==t.length){e.contentItems[0].isStack?this._itemAreas=[]:this._itemAreas=e.createSideAreas();for(let e=0;e0){let e=t[0];if(Gt.isComponentItem(e)){const t=e.parent;if(null===t)throw new K(\"LMXLLMI69999\");e=t}if(!Gt.isStack(e))throw new X(\"LMCLLMI19993\");e.maximise()}}}processMaximiseStack(t){if(this._maximisedStack=t,t.on(\"beforeItemDestroyed\",this._maximisedStackBeforeDestroyedListener),t.element.classList.add(\"lm_maximised\"),t.element.insertAdjacentElement(\"afterend\",this._maximisePlaceholder),void 0===this._groundItem)throw new J(\"LMMXI19993\");{this._groundItem.element.prepend(t.element);const{width:e,height:i}=kt(this._containerElement);Tt(t.element,e),At(t.element,i),t.updateSize(!0),t.focusActiveContentItem(),this._maximisedStack.emit(\"maximised\"),this.emit(\"stateChanged\")}}processMinimiseMaximisedStack(){if(void 0===this._maximisedStack)throw new X(\"LMMMS74422\");{const t=this._maximisedStack;if(null===t.parent)throw new K(\"LMMI13668\");t.element.classList.remove(\"lm_maximised\"),this._maximisePlaceholder.insertAdjacentElement(\"afterend\",t.element),this._maximisePlaceholder.remove(),this.updateRootSize(!0),this._maximisedStack=void 0,t.off(\"beforeItemDestroyed\",this._maximisedStackBeforeDestroyedListener),t.emit(\"minimised\"),this.emit(\"stateChanged\")}}reconcilePopoutWindows(){const t=[];for(let e=0;e{this._resizeTimeoutId=void 0,this.beginSizeInvalidation(),this.endSizeInvalidation()}),this.resizeDebounceInterval))}checkClearResizeTimeout(){void 0!==this._resizeTimeoutId&&(clearTimeout(this._resizeTimeoutId),this._resizeTimeoutId=void 0)}setContainer(){var t;const e=document.body,i=null!==(t=this._containerElement)&&void 0!==t?t:e;if(i===e){this.resizeWithContainerAutomatically=!0;const t=document.documentElement;t.style.height=\"100%\",t.style.margin=\"0\",t.style.padding=\"0\",t.style.overflow=\"clip\",e.style.height=\"100%\",e.style.margin=\"0\",e.style.padding=\"0\",e.style.overflow=\"clip\"}this._containerElement=i}onBeforeUnload(){this.destroy()}adjustColumnsResponsive(){if(void 0===this._groundItem)throw new J(\"LMACR20883\");if(this._firstLoad=!1,this.useResponsiveLayout()&&!this._updatingColumnsResponsive&&this._groundItem.contentItems.length>0&&this._groundItem.contentItems[0].isRow){if(void 0===this._groundItem||null===this._width)throw new J(\"LMACR77412\");{const t=this._groundItem.contentItems[0].contentItems.length;if(t<=1)return;{const e=this.layoutConfig.dimensions.defaultMinItemWidth;if(t*e<=this._width)return;{this._updatingColumnsResponsive=!0;const i=t-Math.max(Math.floor(this._width/e),1),n=this._groundItem.contentItems[0],o=this.getAllStacks();if(0===o.length)throw new X(\"LMACRS77413\");{const t=o[0];for(let e=0;en?void 0:{parentItem:t,index:o}}}case 1:if(void 0===this._focusedComponentItem)return;{const t=this._focusedComponentItem.parentItem;return this.tryCreateLocationFromParentItem(t,e)}case 2:{const t=this.findFirstContentItemType(at.stack);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 3:{let t=this.findFirstContentItemType(at.row);return void 0!==t?this.tryCreateLocationFromParentItem(t,e):(t=this.findFirstContentItemType(at.column),void 0!==t?this.tryCreateLocationFromParentItem(t,e):void 0)}case 4:{const t=this.findFirstContentItemType(at.row);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 5:{const t=this.findFirstContentItemType(at.column);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 6:if(void 0===this._groundItem)throw new J(\"LMFLRIF18244\");return void 0!==this.rootItem?void 0:void 0===e||0===e?{parentItem:this._groundItem,index:0}:void 0;case 7:if(void 0===this._groundItem)throw new J(\"LMFLF18244\");{const t=this._groundItem.contentItems;if(0===t.length)return void 0===e||0===e?{parentItem:this._groundItem,index:0}:void 0;{const i=t[0];return this.tryCreateLocationFromParentItem(i,e)}}}}tryCreateLocationFromParentItem(t,e){const i=t.contentItems.length;return void 0===e?{parentItem:t,index:i}:e<0||e>i?void 0:{parentItem:t,index:e}}}!function(t){t.createMaximisePlaceElement=function(t){const e=t.createElement(\"div\");return e.classList.add(\"lm_maximise_place\"),e},t.createTabDropPlaceholderElement=function(t){const e=t.createElement(\"div\");return e.classList.add(\"lm_drop_tab_placeholder\"),e},t.defaultLocationSelectors=[{typeId:1,index:void 0},{typeId:2,index:void 0},{typeId:3,index:void 0},{typeId:7,index:void 0}],t.afterFocusedItemIfPossibleLocationSelectors=[{typeId:0,index:1},{typeId:2,index:void 0},{typeId:3,index:void 0},{typeId:7,index:void 0}]}(ae||(ae={}));class le extends ae{constructor(t,e,i,n){if(super(le.createLayoutManagerConstructorParameters(t,e)),this._bindComponentEventHanlderPassedInConstructor=!1,this._creationTimeoutPassed=!1,void 0!==e&&\"function\"==typeof e&&(this.bindComponentEvent=e,this._bindComponentEventHanlderPassedInConstructor=!0,void 0!==i&&(this.unbindComponentEvent=i)),!this._bindComponentEventHanlderPassedInConstructor&&this.isSubWindow){if(void 0===this._constructorOrSubWindowLayoutConfig)throw new J(\"VLC98823\");{const t=xt.resolve(this._constructorOrSubWindowLayoutConfig);this.layoutConfig=Object.assign(Object.assign({},t),{root:void 0})}}!0!==n&&(this.deprecatedConstructor||this.init())}destroy(){this.bindComponentEvent=void 0,this.unbindComponentEvent=void 0,super.destroy()}init(){if(this._bindComponentEventHanlderPassedInConstructor||\"loading\"!==document.readyState&&null!==document.body){if(!this._bindComponentEventHanlderPassedInConstructor&&!0===this.isSubWindow&&!this._creationTimeoutPassed)return setTimeout((()=>this.init()),7),void(this._creationTimeoutPassed=!0);!0===this.isSubWindow&&(this._bindComponentEventHanlderPassedInConstructor||this.clearHtmlAndAdjustStylesForSubWindow(),window.__glInstance=this),super.init()}else document.addEventListener(\"DOMContentLoaded\",(()=>this.init()),{passive:!0})}clearHtmlAndAdjustStylesForSubWindow(){const t=document.head,e=new Array(4);e[0]=document.querySelectorAll(\"body link\"),e[1]=document.querySelectorAll(\"body style\"),e[2]=document.querySelectorAll(\"template\"),e[3]=document.querySelectorAll(\".gl_keep\");for(let i=0;ithis.emit(\"popIn\"))),document.body.appendChild(t),!0}}bindComponent(t,e){if(void 0!==this.bindComponentEvent){return this.bindComponentEvent(t,e)}if(void 0!==this.getComponentEvent)return{virtual:!1,component:this.getComponentEvent(t,e)};{const t=`${tt[2]}: ${JSON.stringify(e)}`;throw new Z(t)}}unbindComponent(t,e,i){if(void 0!==this.unbindComponentEvent)this.unbindComponentEvent(t);else if(!e&&void 0!==this.releaseComponentEvent){if(void 0===i)throw new J(\"VCUCRCU333998\");this.releaseComponentEvent(t,i)}}}!function(t){let e=!1;t.createLayoutManagerConstructorParameters=function(t,i){const n=e?null:new URL(document.location.href).searchParams.get(\"gl-window\");e=!0;const o=null!==n;let s,r;if(null!==n){const e=localStorage.getItem(n);if(null===e)throw new Error(\"Null gl-window Config\");localStorage.removeItem(n);const i=JSON.parse(e),o=_t.unminifyConfig(i);r=xt.fromResolved(o),t instanceof HTMLElement&&(s=t)}else void 0===t?r=void 0:t instanceof HTMLElement?(r=void 0,s=t):r=t,void 0===s&&i instanceof HTMLElement&&(s=i);return{constructorOrSubWindowLayoutConfig:r,isSubWindow:o,containerElement:s}}}(le||(le={}));class he extends le{constructor(t,e,i){super(t,e,i,!0),this._componentTypesMap=new Map,this._registeredComponentMap=new Map,this._virtuableComponentMap=new Map,this._containerVirtualRectingRequiredEventListener=(t,e,i)=>this.handleContainerVirtualRectingRequiredEvent(t,e,i),this._containerVirtualVisibilityChangeRequiredEventListener=(t,e)=>this.handleContainerVirtualVisibilityChangeRequiredEvent(t,e),this._containerVirtualZIndexChangeRequiredEventListener=(t,e,i)=>this.handleContainerVirtualZIndexChangeRequiredEvent(t,e,i),this.deprecatedConstructor||this.init()}registerComponent(t,e,i=!1){if(\"function\"!=typeof e)throw new $(\"registerComponent() componentConstructorOrFactoryFtn parameter is not a function\");if(e.hasOwnProperty(\"prototype\")){const n=e;this.registerComponentConstructor(t,n,i)}else{const n=e;this.registerComponentFactoryFunction(t,n,i)}}registerComponentConstructor(t,e,i=!1){if(\"function\"!=typeof e)throw new Error(tt[1]);if(void 0!==this._componentTypesMap.get(t))throw new Z(`${tt[3]}: ${t}`);this._componentTypesMap.set(t,{constructor:e,factoryFunction:void 0,virtual:i})}registerComponentFactoryFunction(t,e,i=!1){if(\"function\"!=typeof e)throw new Z(\"Please register a constructor function\");if(void 0!==this._componentTypesMap.get(t))throw new Z(`${tt[3]}: ${t}`);this._componentTypesMap.set(t,{constructor:void 0,factoryFunction:e,virtual:i})}registerComponentFunction(t){this.registerGetComponentConstructorCallback(t)}registerGetComponentConstructorCallback(t){if(\"function\"!=typeof t)throw new Error(\"Please register a callback function\");void 0!==this._getComponentConstructorFtn&&console.warn(\"Multiple component functions are being registered. Only the final registered function will be used.\"),this._getComponentConstructorFtn=t}getRegisteredComponentTypeNames(){const t=this._componentTypesMap.keys();return Array.from(t)}getComponentInstantiator(t){let e;const i=pt.resolveComponentTypeName(t);return void 0!==i&&(e=this._componentTypesMap.get(i)),void 0===e&&void 0!==this._getComponentConstructorFtn&&(e={constructor:this._getComponentConstructorFtn(t),factoryFunction:void 0,virtual:!1}),e}bindComponent(t,e){let i;const n=pt.resolveComponentTypeName(e);let o;if(void 0!==n&&(i=this._componentTypesMap.get(n)),void 0===i&&void 0!==this._getComponentConstructorFtn&&(i={constructor:this._getComponentConstructorFtn(e),factoryFunction:void 0,virtual:!1}),void 0!==i){const s=i.virtual;let r,a;r=void 0===e.componentState?void 0:Ut({},e.componentState);const l=i.constructor;if(void 0!==l)a=new l(t,r,s);else{const e=i.factoryFunction;if(void 0===e)throw new X(\"LMBCFFU10008\");a=e(t,r,s)}if(s){if(void 0===a)throw new J(\"GLBCVCU988774\");{const e=a,i=e.rootHtmlElement;if(void 0===i)throw new Z(`${tt[5]}: ${n}`);!function(t){const e=\"absolute\";t.style.position!==e&&(t.style.position=e)}(i),this.container.appendChild(i),this._virtuableComponentMap.set(t,e),t.virtualRectingRequiredEvent=this._containerVirtualRectingRequiredEventListener,t.virtualVisibilityChangeRequiredEvent=this._containerVirtualVisibilityChangeRequiredEventListener,t.virtualZIndexChangeRequiredEvent=this._containerVirtualZIndexChangeRequiredEventListener}}this._registeredComponentMap.set(t,a),o={virtual:i.virtual,component:a}}else o=super.bindComponent(t,e);return o}unbindComponent(t,e,i){if(void 0===this._registeredComponentMap.get(t))super.unbindComponent(t,e,i);else{const e=this._virtuableComponentMap.get(t);if(void 0!==e){const i=e.rootHtmlElement;if(void 0===i)throw new X(\"GLUC77743\",t.title);this.container.removeChild(i),this._virtuableComponentMap.delete(t)}}}fireBeforeVirtualRectingEvent(t){this._goldenLayoutBoundingClientRect=this.container.getBoundingClientRect(),super.fireBeforeVirtualRectingEvent(t)}handleContainerVirtualRectingRequiredEvent(t,e,i){const n=this._virtuableComponentMap.get(t);if(void 0===n)throw new J(\"GLHCSCE55933\");{const o=n.rootHtmlElement;if(void 0===o)throw new Z(tt[4]+\" \"+t.title);{const n=t.element.getBoundingClientRect(),s=n.left-this._goldenLayoutBoundingClientRect.left;o.style.left=zt(s);const r=n.top-this._goldenLayoutBoundingClientRect.top;o.style.top=zt(r),Tt(o,e),At(o,i)}}}handleContainerVirtualVisibilityChangeRequiredEvent(t,e){const i=this._virtuableComponentMap.get(t);if(void 0===i)throw new J(\"GLHCVVCRE55934\");{const n=i.rootHtmlElement;if(void 0===n)throw new Z(tt[4]+\" \"+t.title);Dt(n,e)}}handleContainerVirtualZIndexChangeRequiredEvent(t,e,i){const n=this._virtuableComponentMap.get(t);if(void 0===n)throw new J(\"GLHCVZICRE55935\");{const e=n.rootHtmlElement;if(void 0===e)throw new Z(tt[4]+\" \"+t.title);e.style.zIndex=i}}}const de=\"initial_\",ce={show:\"top\",popout:!1,maximise:!1,close:\"close-tab-unused\"},me={headerHeight:31},ue={hasHeaders:!0,reorderEnabled:!0},pe={popoutWholeStack:!1,constrainDragToContainer:!1,constrainDragToHeaders:!1,preventDragout:!1,showMaximiseIcon:!1,showPopoutIcon:!1,showCloseIcon:!1,blockedPopoutsThrowError:!0,closePopoutsOnUnload:!0,selectionEnabled:!1};var ge,fe;class ve{constructor(e){this.layout=e,ge.set(this,void 0),fe.set(this,void 0),this.handleResize=t=>{t.forEach((t=>this.resizeElement(t.target)))},this.handleMutation=()=>{this.layout.viewComponentsByContainerElement.forEach((t=>{this.resizeElement(t.container.element)}))},t.__classPrivateFieldSet(this,ge,new ResizeObserver(this.handleResize),\"f\"),t.__classPrivateFieldSet(this,fe,new MutationObserver(this.handleMutation),\"f\")}observeMutations(e){t.__classPrivateFieldGet(this,fe,\"f\")?.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[\"class\"]})}destroy(){t.__classPrivateFieldGet(this,ge,\"f\").disconnect(),t.__classPrivateFieldGet(this,fe,\"f\").disconnect()}observeContainer(e){t.__classPrivateFieldGet(this,ge,\"f\").observe(e)}unobserveContainer(e){t.__classPrivateFieldGet(this,ge,\"f\").unobserve(e)}resizeElement(t){const e=this.layout.viewComponentsByContainerElement.get(t);e&&e.resize()}}ge=new WeakMap,fe=new WeakMap;var _e={};Object.defineProperty(_e,\"__esModule\",{value:!0});var ye=_e.BaseItem=void 0;class Ce{constructor(t,e,i){this._item=t,this._layout=e,this._wrap=i}get raw(){return this._item}get layout(){return this._layout}get type(){return this._item.type}get contentItems(){return(this._item.contentItems??[]).map((t=>this._wrap(t)))}get parent(){const t=this._item.parent;return t?this._wrap(t):null}setActiveContentItem(t,e){if(\"stack\"!==this.type)throw new Error(`Cannot call setActiveContentItem from a non-stack item: ${this.type}`);this._item.setActiveContentItem(t.raw,e)}static wrapInternal(t,e,i){const n=Ce.wrapCache.get(e);if(n)return n;const o=new t(e,i,(e=>Ce.wrapInternal(t,e,i)));return Ce.wrapCache.set(e,o),o}}ye=_e.BaseItem=Ce,Ce.wrapCache=new WeakMap;const we=t=>!!t&&\"contentItems\"in t&&(t.isRow||t.isColumn);class Ie extends ye{isRoot(){return!!this._item.parent?.isGround}getBounds(){return this._item.element.getBoundingClientRect()}get viewName(){if(this._item.isComponent){const{component:t}=this._item;return t.identity.name}throw new Error(\"View name not found\")}onDestroyed(t){const e=({target:i})=>{i===this._item&&(t(),this._item.off(\"itemDestroyed\",e))};this._item.on(\"itemDestroyed\",e)}createAdjacentStack({position:t=\"right\"}={}){const e=this.raw;if(ee.isStack(e)&&e.parent){const i=[\"top\",\"bottom\"].includes(t)?\"column\":\"row\",n=[\"left\",\"top\"].includes(t)?1:0,o=we(e.parent)?e.parent:e.layoutManager,s=o,r=e.parent.contentItems.indexOf(e);e.parent.isGround&&e.parent.removeChild(e,!0);const a=o.newItem({type:i,content:[{type:\"stack\",content:[]}]},r);if(!a)throw new Error(\"createAdjacentStack: Failed to create new container\");const l=a.contentItems[0];return a.addChild(this.raw,n),we(s)&&s.removeChild(e,!0),this._wrap(l)}throw new Error(`Cannot creat adjacent stacks for type: ${e.type}, must be type 'stack'`)}setActiveContentItem(t,e=!0){if(!ee.isStack(this._item))throw new Error(`Cannot call setActiveContentItem from a non-stack item: ${this.type}`);this._item.setActiveComponentItem(t.raw,!e)}static wrap(t,e){return ye.wrapInternal(Ie,t,e)}}function be(t=[],e){for(const i of t)\"component\"===i.type?Object.keys(e).forEach((t=>{t in i&&(i.componentState={[`${de}${t}`]:i[t],...i.componentState}),i[t]=e[t]})):be(i.content,e)}function Se(t=[],e,i){for(const n of t)if(\"component\"===n.type)Object.keys(e).forEach((t=>{if(`${de}${t}`in n.componentState)return n[t]=n.componentState[`${de}${t}`],void delete n.componentState[`${de}${t}`];n[t]=e[t]}));else{if(n.size&&(\"row\"===i||\"column\"===i)){n[\"row\"===i?\"width\":\"height\"]=n.size?.includes(\".\")?parseFloat(n.size):parseInt(n.size)}Se(n.content,e,n.type)}}function Ee(t){if(t.root){t.root.content&&Se([t.root],{componentName:\"view\",isClosable:!0});const e=t.root;t.content=[e],delete t.root}return t}const xe=e=>class extends e{connectedCallback(){if(!this.name||!this.uuid)throw new Error(\" Name or uuid attribute missing\");if(!this.src)throw new Error(\" missing 'src' attribute.\");this.#t||(this.#t=document.createElement(\"iframe\"),this.#t.src=this.src,this.#t.style.height=\"100%\",this.#t.style.width=\"100%\",this.#t.style.border=\"none\",this.forceFrameName?this.#t.setAttribute(\"name\",this.forceFrameName):this.#t.setAttribute(\"name\",t.encodeOptions({brokerUrl:this.brokerUrl,name:this.name,uuid:this.uuid,providerId:this.providerId,contextGroup:this.contextGroup},\"of-frame\")),this.#t.setAttribute(\"id\",this.name),this.appendChild(this.#t))}#t;get brokerUrl(){return this.getAttribute(\"of-broker\")}set brokerUrl(t){t&&this.setAttribute(\"of-broker\",t)}get name(){return this.getAttribute(\"of-name\")}set name(t){t&&this.setAttribute(\"of-name\",t)}get forceFrameName(){return this.getAttribute(\"forceFrameName\")}set forceFrameName(t){t&&this.setAttribute(\"forceFrameName\",t)}get uuid(){return this.getAttribute(\"of-uuid\")}set uuid(t){t&&this.setAttribute(\"of-uuid\",t)}get src(){return this.getAttribute(\"src\")}set src(t){t&&this.setAttribute(\"src\",t)}get providerId(){return this.getAttribute(\"of-provider-id\")}set providerId(t){t&&this.setAttribute(\"of-provider-id\",t)}get contextGroup(){return this.getAttribute(\"of-context-group\")}set contextGroup(t){t&&this.setAttribute(\"of-context-group\",t)}static get observedAttributes(){return[\"name\"]}};class Le{static create(t){const e=document.createElement(\"of-view\");return Object.entries(t).forEach((([t,i])=>{e.setAttribute(t,i)})),e}}customElements.define(\"of-view\",xe(HTMLElement));class ze{constructor(t,i,n,{brokerUrl:o,interopConfig:s},r){this.container=t,this.config=i,this.ofView=null,this.isDragging=()=>this.container.tab.element?.className.includes(\"lm_dragging\")??!1;const{url:a,web:l,interop:h,name:d}=i||{},c=d??`internal-generated-view-${e.v4()}`;if(this.identity={uuid:n,name:c},this.container.element.setAttribute(\"of-name\",c),this.container.element.id=`container-${c}`,this.container.parent.id=c,void 0===a)return void this.handleUrlMissing();const m=this.updateTitleIfNotSet(a),u={\"of-broker\":o,\"of-uuid\":n,\"of-name\":c,src:a};l?.frameName&&(u.forceFrameName=l.frameName);const p=h?.currentContextGroup??s?.currentContextGroup;p&&(u[\"of-context-group\"]=p),s?.providerId&&(u[\"of-provider-id\"]=s?.providerId),this.ofView=Le.create(u),this.ofView.title=m??`Iframe: ${a}`,r.appendChild(this.ofView),this.ofView.style.position=\"absolute\"}updateTitleIfNotSet(t){return\"view\"===this.container.parent.title&&this.container.parent.setTitle(t),this.container.parent.title}handleUrlMissing(){const t=document.createElement(\"div\");t.setAttribute(\"style\",\"padding: 20px\");t.innerText=\"No URL provided\",this.container.element.appendChild(t)}destroy(){this.ofView?.remove(),this.ofView=null}closeView(){this.container.close()}resize(){if(this.ofView){if(this.isDragging())return void(this.ofView.style.display=\"none\");const t=this.container.element.getBoundingClientRect();this.ofView.style.position=\"absolute\",this.ofView.style.height=`${t.height}px`,this.ofView.style.width=`${t.width}px`,this.ofView.style.inset=`${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`,this.ofView.style.display=\"block\"}}}class Me extends U{static overrideConfig(t){const e={...ue,...t.settings,...pe};return e.reorderEnabled?be(t.content,{isClosable:!0}):be(t.content,{reorderEnabled:!1}),{dimensions:me,...t,settings:e,header:{...ce,show:!1!==t.settings?.hasHeaders&&ce.show}}}constructor(t,e,i,{options:n},o,s){super(),this.identity=t,this.container=e,this.initialConfig=i,this.layoutManager=o,this.platformProvider=s,this.viewComponentsByContainerElement=new Map,this.layoutContentCache=_.getSingleInstance(),this.reparentingViews=new Set,this.goldenLayoutDestroyed=!1,this.createViewComponent=(t,e)=>{m.handleSharedView(this.layoutManager,this.identity,e);const i=new ze(t,e,this.identity.uuid,this.options,this.iframeContainer);return e&&!1===e[`${de}isClosable`]&&this.stylesheet.insertRule(`#tab-${i.identity.name} .lm_close_tab { display: none; }`),this.viewComponentsByContainerElement.set(t.element,i),this.resizeController.observeContainer(t.element),i},this.iframeContainer=document.createElement(\"div\"),this.iframeContainer.id=`openfin-layout-iframe-container-${this.identity.layoutName}`,this.domEmitter=new V(e),this.setupStylesheets(),this.layout=new he(this.container),this.layout.resizeWithContainerAutomatically=!0,this.options=n,this.layout.registerComponent(\"view\",this.createViewComponent),this.setupListeners(),this.resizeController=new ve(this),this.layout.loadLayout(Me.overrideConfig(i));const r=document.createElement(\"div\");r.id=`openfin-layout-shadow-container-${this.identity.layoutName}`,r.attachShadow({mode:\"open\",delegatesFocus:!1}).appendChild(this.iframeContainer),this.container.appendChild(r),this.resizeController.observeMutations(this.container)}getStackByView({name:t}){const e=this.layout.findFirstComponentItemById(t);if(e?.parent&&e?.parent?.isStack)return Ie.wrap(e.parent,this)}getRoot(){return Ie.wrap(this.layout.rootItem,this)}async platformCloseView(t){const e=[...this.viewComponentsByContainerElement.values()].find((e=>e.identity.name===t.name));if(!e)throw new Error(`View with name: ${t.name} not found in layout.`);e.closeView()}async platformCreateView(t,{location:e,targetView:i}={}){if(i)throw new Error(\"TargetView not supported in web\");const n={options:this.platformProvider.normalizeOptions(t),target:this.identity,location:e};return this.insertView(n)}setupStylesheets(){if(this.container.setAttribute(\"data-openfin-layout-name\",this.identity.layoutName),this.stylesheet=new CSSStyleSheet,this.stylesheet.insertRule(\".lm_close { display: none; }\"),document.adoptedStyleSheets.push(this.stylesheet),this.initialConfig.settings?.preventSplitterResize){const t=`\\n [data-openfin-layout-name='${this.identity.layoutName}'] .lm_splitter {\\n pointer-events: none;\\n }`;this.stylesheet.insertRule(t)}}insertView({options:t,location:e,targetView:i}){const n=e?this.layoutContentCache.getItemOrUndefined(e.id):void 0,o=i?this.layoutContentCache.getItemOrUndefined(i.name):void 0,s=n??o??Ie.wrap(this.layout.rootItem,this);let r;if(ee.isStack(s.raw))r=s.raw;else{if(!we(s.raw))throw new Error(\"Cannot add a view at the requested location\");r=s.raw.newItem({type:\"stack\",content:[]})}const a=Math.min(r.contentItems.length,e?.index??r.contentItems.length);let l=this.layout.findFirstComponentItemById(t.name);l?(l.parent&&l.parent.removeChild(l,!0),r.addChild(l,a)):l=r.newComponent(\"view\",t,t.title??t.url??\"Default Title\",a);const h=l.component.identity;return Promise.resolve({identity:h})}replaceView({viewToReplace:t,newView:e}){throw new Error(\"Method not implemented.\")}replaceLayout(t){throw new Error(\"Method not implemented.\")}async cleanupView(t){}applyPreset(t){throw new Error(\"Method not implemented.\")}getCurrentViews(){return[...this.viewComponentsByContainerElement.values()].map((t=>t.identity))}async getFrameSnapshot(){return Ee(xt.fromResolved(this.layout.toConfig()))}isVisible(){return W(this.container)}async onViewDetached({viewIdentity:t}){this.reparentingViews.add(t.name),this.platformCloseView(t)}async destroy(){this.goldenLayoutDestroyed||(this.goldenLayoutDestroyed=!0,this.layout.destroy()),this.iframeContainer.remove(),this.resizeController.destroy(),document.adoptedStyleSheets=document.adoptedStyleSheets.filter((t=>t!==this.stylesheet)),this.viewComponentsByContainerElement.clear()}setupListeners(){this.container.addEventListener(\"pointerdown\",(t=>{if(t.target instanceof HTMLElement){const e=t.target.classList;[\"lm_tab\",\"lm_title\",\"lm_splitter\",\"lm_drag_handle\"].some((t=>e.contains(t)))&&(this.handleDragStart(),2===t.button&&t.stopPropagation())}}),!0),document.addEventListener(\"pointerup\",(()=>this.handleDragEnd()),!0),this.layout.on(\"tabCreated\",(t=>{const e=t.componentItem.component;t.element.id=`tab-${e.identity.name}`,this.domEmitter.dispatchLocalEvent(\"tab-created\",e.identity)})),this.layout.on(\"itemCreated\",(({target:t})=>{const e=t;if(Gt.isComponentItem(e)){const t=e.component;this.domEmitter.dispatchLocalEvent(\"container-created\",t.identity)}})),this.layout.on(\"itemDestroyed\",(t=>{const e=t.target;if(Gt.isComponentItem(e)){const t=e.component;this.removeViewComponent(t)}})),this.layout.on(\"itemDropped\",(()=>{this.handleDragEnd()}))}handleDragStart(){this.iframeContainer.style.pointerEvents=\"none\"}handleDragEnd(){this.iframeContainer.style.pointerEvents=\"\"}removeViewComponent(t){if(t.config&&!1===t.config[`${de}isClosable`]){const e=[...this.stylesheet.cssRules].findIndex((e=>e.cssText.includes(`#tab-${t.identity.name}`)));this.stylesheet.deleteRule(e)}t.destroy(),this.viewComponentsByContainerElement.delete(t.container.element),this.resizeController.unobserveContainer(t.container.element),this.reparentingViews.has(t.identity.name)?this.reparentingViews.delete(t.identity.name):this.platformProvider.closeView(t.identity.name);0===this.getCurrentViews().length&&(this.goldenLayoutDestroyed||(this.goldenLayoutDestroyed=!0,m.handleLastViewRemoved(this.layoutManager,this.identity)))}}class Pe{constructor(t,e,i,n){this.windowIdentity=t,this.connectConfig=e,this.provider=i,this.fallbackContainer=n}async createLayout(t,e){if(!(\"container\"in t)&&!this.fallbackContainer)throw new Error(\"Container property is not optional in web\");const{layoutName:i}=t,n=t,o=this.provider.initLayoutViews(n),s=n.container??this.fallbackContainer,r={...this.windowIdentity,layoutName:i},a=new Me(r,s,o,this.connectConfig,e,this.provider);m.registerLayout(e,i,a),this.fallbackContainer=null}async getLayoutSnapshot(t){return t.getLayoutSnapshot()}async handleLastViewRemoved(t){}}class Te{static async init(e){const i=e.getFin().InterApplicationBus.Channel,n=await i.create(`custom-frame-${e.me.uuid}`);return n.setDefaultAction((async(t,{target:e,opts:i},o)=>{const s=n.connections.find((t=>t.name===e.name));if(s)return n.dispatch(s,t,{...i,target:e});throw new Error(`Client with name ${e.name} not found`)})),await t.relayChannelClientApi_1(n,\"layout-relay\"),new Te(e)}constructor(t){this.wire=t,this.viewNames=new Set}normalizeOptions(t,i=\"default\"){const n=this.wire.me.uuid;let{name:o=`internal-generated-view-${e.v4()}`}=t;return o.match(/^internal-generated-view-/)&&this.viewNames.has(o)&&\"duplicate\"===i&&(o=`internal-generated-view-${e.v4()}`),this.viewNames.add(o),{...t,name:o,uuid:n}}closeView(t){this.viewNames.delete(t)}initLayoutViews({layout:t,multiInstanceViewBehavior:e}){return H((t=>{if(\"component\"===t.type&&t.componentState){const i=this.normalizeOptions(t.componentState,e);return{...t,componentState:i}}return t}),t)}}var Ae;const ke=t=>t;Ae=new WeakMap,exports.WebLayoutEntryPoint=class{constructor(e){Ae.set(this,void 0),this.initLayoutManager=async(e,i,{container:n,layoutManagerOverride:o})=>{const s=await Te.init(i),r=o??ke,a=new Pe(i.me,t.__classPrivateFieldGet(this,Ae,\"f\"),s,n),l=new(r(m.createClosedConstructor(a)));return await M(i,l),l},this.applyLayoutSnapshot=async(e,i,n)=>{await i.applyLayoutSnapshot(t.__classPrivateFieldGet(this,Ae,\"f\").platform.layoutSnapshot)},this.createLayout=async(t,e)=>m.createLayout(t,e),this.destroyLayout=async(t,e)=>m.destroyLayout(t,e),t.__classPrivateFieldSet(this,Ae,e,\"f\")}};\n","'use strict'\n\nexports.byteLength = byteLength\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\nfor (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i]\n revLookup[code.charCodeAt(i)] = i\n}\n\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction getLens (b64) {\n var len = b64.length\n\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // Trim off extra bytes after placeholder bytes are found\n // See: https://github.com/beatgammit/base64-js/issues/42\n var validLen = b64.indexOf('=')\n if (validLen === -1) validLen = len\n\n var placeHoldersLen = validLen === len\n ? 0\n : 4 - (validLen % 4)\n\n return [validLen, placeHoldersLen]\n}\n\n// base64 is 4/3 + up to two characters of the original data\nfunction byteLength (b64) {\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction _byteLength (b64, validLen, placeHoldersLen) {\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction toByteArray (b64) {\n var tmp\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n\n var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))\n\n var curByte = 0\n\n // if there are placeholders, only get up to the last complete 4 chars\n var len = placeHoldersLen > 0\n ? validLen - 4\n : validLen\n\n var i\n for (i = 0; i < len; i += 4) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 18) |\n (revLookup[b64.charCodeAt(i + 1)] << 12) |\n (revLookup[b64.charCodeAt(i + 2)] << 6) |\n revLookup[b64.charCodeAt(i + 3)]\n arr[curByte++] = (tmp >> 16) & 0xFF\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 2) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 2) |\n (revLookup[b64.charCodeAt(i + 1)] >> 4)\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 1) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 10) |\n (revLookup[b64.charCodeAt(i + 1)] << 4) |\n (revLookup[b64.charCodeAt(i + 2)] >> 2)\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] +\n lookup[num >> 12 & 0x3F] +\n lookup[num >> 6 & 0x3F] +\n lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n var tmp\n var output = []\n for (var i = start; i < end; i += 3) {\n tmp =\n ((uint8[i] << 16) & 0xFF0000) +\n ((uint8[i + 1] << 8) & 0xFF00) +\n (uint8[i + 2] & 0xFF)\n output.push(tripletToBase64(tmp))\n }\n return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n var tmp\n var len = uint8.length\n var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n var parts = []\n var maxChunkLength = 16383 // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1]\n parts.push(\n lookup[tmp >> 2] +\n lookup[(tmp << 4) & 0x3F] +\n '=='\n )\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + uint8[len - 1]\n parts.push(\n lookup[tmp >> 10] +\n lookup[(tmp >> 4) & 0x3F] +\n lookup[(tmp << 2) & 0x3F] +\n '='\n )\n }\n\n return parts.join('')\n}\n","/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n/* eslint-disable no-proto */\n\n'use strict'\n\nconst base64 = require('base64-js')\nconst ieee754 = require('ieee754')\nconst customInspectSymbol =\n (typeof Symbol === 'function' && typeof Symbol['for'] === 'function') // eslint-disable-line dot-notation\n ? Symbol['for']('nodejs.util.inspect.custom') // eslint-disable-line dot-notation\n : null\n\nexports.Buffer = Buffer\nexports.SlowBuffer = SlowBuffer\nexports.INSPECT_MAX_BYTES = 50\n\nconst K_MAX_LENGTH = 0x7fffffff\nexports.kMaxLength = K_MAX_LENGTH\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Print warning and recommend using `buffer` v4.x which has an Object\n * implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * We report that the browser does not support typed arrays if the are not subclassable\n * using __proto__. Firefox 4-29 lacks support for adding new properties to `Uint8Array`\n * (See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438). IE 10 lacks support\n * for __proto__ and has a buggy typed array implementation.\n */\nBuffer.TYPED_ARRAY_SUPPORT = typedArraySupport()\n\nif (!Buffer.TYPED_ARRAY_SUPPORT && typeof console !== 'undefined' &&\n typeof console.error === 'function') {\n console.error(\n 'This browser lacks typed array (Uint8Array) support which is required by ' +\n '`buffer` v5.x. Use `buffer` v4.x if you require old browser support.'\n )\n}\n\nfunction typedArraySupport () {\n // Can typed array instances can be augmented?\n try {\n const arr = new Uint8Array(1)\n const proto = { foo: function () { return 42 } }\n Object.setPrototypeOf(proto, Uint8Array.prototype)\n Object.setPrototypeOf(arr, proto)\n return arr.foo() === 42\n } catch (e) {\n return false\n }\n}\n\nObject.defineProperty(Buffer.prototype, 'parent', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.buffer\n }\n})\n\nObject.defineProperty(Buffer.prototype, 'offset', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.byteOffset\n }\n})\n\nfunction createBuffer (length) {\n if (length > K_MAX_LENGTH) {\n throw new RangeError('The value \"' + length + '\" is invalid for option \"size\"')\n }\n // Return an augmented `Uint8Array` instance\n const buf = new Uint8Array(length)\n Object.setPrototypeOf(buf, Buffer.prototype)\n return buf\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new TypeError(\n 'The \"string\" argument must be of type string. Received type number'\n )\n }\n return allocUnsafe(arg)\n }\n return from(arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\nfunction from (value, encodingOrOffset, length) {\n if (typeof value === 'string') {\n return fromString(value, encodingOrOffset)\n }\n\n if (ArrayBuffer.isView(value)) {\n return fromArrayView(value)\n }\n\n if (value == null) {\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n }\n\n if (isInstance(value, ArrayBuffer) ||\n (value && isInstance(value.buffer, ArrayBuffer))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof SharedArrayBuffer !== 'undefined' &&\n (isInstance(value, SharedArrayBuffer) ||\n (value && isInstance(value.buffer, SharedArrayBuffer)))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof value === 'number') {\n throw new TypeError(\n 'The \"value\" argument must not be of type number. Received type number'\n )\n }\n\n const valueOf = value.valueOf && value.valueOf()\n if (valueOf != null && valueOf !== value) {\n return Buffer.from(valueOf, encodingOrOffset, length)\n }\n\n const b = fromObject(value)\n if (b) return b\n\n if (typeof Symbol !== 'undefined' && Symbol.toPrimitive != null &&\n typeof value[Symbol.toPrimitive] === 'function') {\n return Buffer.from(value[Symbol.toPrimitive]('string'), encodingOrOffset, length)\n }\n\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n return from(value, encodingOrOffset, length)\n}\n\n// Note: Change prototype *after* Buffer.from is defined to workaround Chrome bug:\n// https://github.com/feross/buffer/pull/148\nObject.setPrototypeOf(Buffer.prototype, Uint8Array.prototype)\nObject.setPrototypeOf(Buffer, Uint8Array)\n\nfunction assertSize (size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be of type number')\n } else if (size < 0) {\n throw new RangeError('The value \"' + size + '\" is invalid for option \"size\"')\n }\n}\n\nfunction alloc (size, fill, encoding) {\n assertSize(size)\n if (size <= 0) {\n return createBuffer(size)\n }\n if (fill !== undefined) {\n // Only pay attention to encoding if it's a string. This\n // prevents accidentally sending in a number that would\n // be interpreted as a start offset.\n return typeof encoding === 'string'\n ? createBuffer(size).fill(fill, encoding)\n : createBuffer(size).fill(fill)\n }\n return createBuffer(size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n return alloc(size, fill, encoding)\n}\n\nfunction allocUnsafe (size) {\n assertSize(size)\n return createBuffer(size < 0 ? 0 : checked(size) | 0)\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n return allocUnsafe(size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n return allocUnsafe(size)\n}\n\nfunction fromString (string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8'\n }\n\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n\n const length = byteLength(string, encoding) | 0\n let buf = createBuffer(length)\n\n const actual = buf.write(string, encoding)\n\n if (actual !== length) {\n // Writing a hex string, for example, that contains invalid characters will\n // cause everything after the first invalid character to be ignored. (e.g.\n // 'abxxcd' will be treated as 'ab')\n buf = buf.slice(0, actual)\n }\n\n return buf\n}\n\nfunction fromArrayLike (array) {\n const length = array.length < 0 ? 0 : checked(array.length) | 0\n const buf = createBuffer(length)\n for (let i = 0; i < length; i += 1) {\n buf[i] = array[i] & 255\n }\n return buf\n}\n\nfunction fromArrayView (arrayView) {\n if (isInstance(arrayView, Uint8Array)) {\n const copy = new Uint8Array(arrayView)\n return fromArrayBuffer(copy.buffer, copy.byteOffset, copy.byteLength)\n }\n return fromArrayLike(arrayView)\n}\n\nfunction fromArrayBuffer (array, byteOffset, length) {\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\"offset\" is outside of buffer bounds')\n }\n\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\"length\" is outside of buffer bounds')\n }\n\n let buf\n if (byteOffset === undefined && length === undefined) {\n buf = new Uint8Array(array)\n } else if (length === undefined) {\n buf = new Uint8Array(array, byteOffset)\n } else {\n buf = new Uint8Array(array, byteOffset, length)\n }\n\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(buf, Buffer.prototype)\n\n return buf\n}\n\nfunction fromObject (obj) {\n if (Buffer.isBuffer(obj)) {\n const len = checked(obj.length) | 0\n const buf = createBuffer(len)\n\n if (buf.length === 0) {\n return buf\n }\n\n obj.copy(buf, 0, 0, len)\n return buf\n }\n\n if (obj.length !== undefined) {\n if (typeof obj.length !== 'number' || numberIsNaN(obj.length)) {\n return createBuffer(0)\n }\n return fromArrayLike(obj)\n }\n\n if (obj.type === 'Buffer' && Array.isArray(obj.data)) {\n return fromArrayLike(obj.data)\n }\n}\n\nfunction checked (length) {\n // Note: cannot use `length < K_MAX_LENGTH` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= K_MAX_LENGTH) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + K_MAX_LENGTH.toString(16) + ' bytes')\n }\n return length | 0\n}\n\nfunction SlowBuffer (length) {\n if (+length != length) { // eslint-disable-line eqeqeq\n length = 0\n }\n return Buffer.alloc(+length)\n}\n\nBuffer.isBuffer = function isBuffer (b) {\n return b != null && b._isBuffer === true &&\n b !== Buffer.prototype // so Buffer.isBuffer(Buffer.prototype) will be false\n}\n\nBuffer.compare = function compare (a, b) {\n if (isInstance(a, Uint8Array)) a = Buffer.from(a, a.offset, a.byteLength)\n if (isInstance(b, Uint8Array)) b = Buffer.from(b, b.offset, b.byteLength)\n if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n throw new TypeError(\n 'The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array'\n )\n }\n\n if (a === b) return 0\n\n let x = a.length\n let y = b.length\n\n for (let i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i]\n y = b[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n switch (String(encoding).toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'latin1':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return true\n default:\n return false\n }\n}\n\nBuffer.concat = function concat (list, length) {\n if (!Array.isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n\n if (list.length === 0) {\n return Buffer.alloc(0)\n }\n\n let i\n if (length === undefined) {\n length = 0\n for (i = 0; i < list.length; ++i) {\n length += list[i].length\n }\n }\n\n const buffer = Buffer.allocUnsafe(length)\n let pos = 0\n for (i = 0; i < list.length; ++i) {\n let buf = list[i]\n if (isInstance(buf, Uint8Array)) {\n if (pos + buf.length > buffer.length) {\n if (!Buffer.isBuffer(buf)) buf = Buffer.from(buf)\n buf.copy(buffer, pos)\n } else {\n Uint8Array.prototype.set.call(\n buffer,\n buf,\n pos\n )\n }\n } else if (!Buffer.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n } else {\n buf.copy(buffer, pos)\n }\n pos += buf.length\n }\n return buffer\n}\n\nfunction byteLength (string, encoding) {\n if (Buffer.isBuffer(string)) {\n return string.length\n }\n if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) {\n return string.byteLength\n }\n if (typeof string !== 'string') {\n throw new TypeError(\n 'The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. ' +\n 'Received type ' + typeof string\n )\n }\n\n const len = string.length\n const mustMatch = (arguments.length > 2 && arguments[2] === true)\n if (!mustMatch && len === 0) return 0\n\n // Use a for loop to avoid recursion\n let loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'ascii':\n case 'latin1':\n case 'binary':\n return len\n case 'utf8':\n case 'utf-8':\n return utf8ToBytes(string).length\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return len * 2\n case 'hex':\n return len >>> 1\n case 'base64':\n return base64ToBytes(string).length\n default:\n if (loweredCase) {\n return mustMatch ? -1 : utf8ToBytes(string).length // assume utf8\n }\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n let loweredCase = false\n\n // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n // property of a typed array.\n\n // This behaves neither like String nor Uint8Array in that we set start/end\n // to their upper/lower bounds if the value passed is out of range.\n // undefined is handled specially as per ECMA-262 6th Edition,\n // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n if (start === undefined || start < 0) {\n start = 0\n }\n // Return early if start > this.length. Done here to prevent potential uint32\n // coercion fail below.\n if (start > this.length) {\n return ''\n }\n\n if (end === undefined || end > this.length) {\n end = this.length\n }\n\n if (end <= 0) {\n return ''\n }\n\n // Force coercion to uint32. This will also coerce falsey/NaN values to 0.\n end >>>= 0\n start >>>= 0\n\n if (end <= start) {\n return ''\n }\n\n if (!encoding) encoding = 'utf8'\n\n while (true) {\n switch (encoding) {\n case 'hex':\n return hexSlice(this, start, end)\n\n case 'utf8':\n case 'utf-8':\n return utf8Slice(this, start, end)\n\n case 'ascii':\n return asciiSlice(this, start, end)\n\n case 'latin1':\n case 'binary':\n return latin1Slice(this, start, end)\n\n case 'base64':\n return base64Slice(this, start, end)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return utf16leSlice(this, start, end)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = (encoding + '').toLowerCase()\n loweredCase = true\n }\n }\n}\n\n// This property is used by `Buffer.isBuffer` (and the `is-buffer` npm package)\n// to detect a Buffer instance. It's not possible to use `instanceof Buffer`\n// reliably in a browserify context because there could be multiple different\n// copies of the 'buffer' package in use. This method works even for Buffer\n// instances that were created from another copy of the `buffer` package.\n// See: https://github.com/feross/buffer/issues/154\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n const i = b[n]\n b[n] = b[m]\n b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n const len = this.length\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits')\n }\n for (let i = 0; i < len; i += 2) {\n swap(this, i, i + 1)\n }\n return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n const len = this.length\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits')\n }\n for (let i = 0; i < len; i += 4) {\n swap(this, i, i + 3)\n swap(this, i + 1, i + 2)\n }\n return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n const len = this.length\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits')\n }\n for (let i = 0; i < len; i += 8) {\n swap(this, i, i + 7)\n swap(this, i + 1, i + 6)\n swap(this, i + 2, i + 5)\n swap(this, i + 3, i + 4)\n }\n return this\n}\n\nBuffer.prototype.toString = function toString () {\n const length = this.length\n if (length === 0) return ''\n if (arguments.length === 0) return utf8Slice(this, 0, length)\n return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.toLocaleString = Buffer.prototype.toString\n\nBuffer.prototype.equals = function equals (b) {\n if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n if (this === b) return true\n return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n let str = ''\n const max = exports.INSPECT_MAX_BYTES\n str = this.toString('hex', 0, max).replace(/(.{2})/g, '$1 ').trim()\n if (this.length > max) str += ' ... '\n return ''\n}\nif (customInspectSymbol) {\n Buffer.prototype[customInspectSymbol] = Buffer.prototype.inspect\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n if (isInstance(target, Uint8Array)) {\n target = Buffer.from(target, target.offset, target.byteLength)\n }\n if (!Buffer.isBuffer(target)) {\n throw new TypeError(\n 'The \"target\" argument must be one of type Buffer or Uint8Array. ' +\n 'Received type ' + (typeof target)\n )\n }\n\n if (start === undefined) {\n start = 0\n }\n if (end === undefined) {\n end = target ? target.length : 0\n }\n if (thisStart === undefined) {\n thisStart = 0\n }\n if (thisEnd === undefined) {\n thisEnd = this.length\n }\n\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError('out of range index')\n }\n\n if (thisStart >= thisEnd && start >= end) {\n return 0\n }\n if (thisStart >= thisEnd) {\n return -1\n }\n if (start >= end) {\n return 1\n }\n\n start >>>= 0\n end >>>= 0\n thisStart >>>= 0\n thisEnd >>>= 0\n\n if (this === target) return 0\n\n let x = thisEnd - thisStart\n let y = end - start\n const len = Math.min(x, y)\n\n const thisCopy = this.slice(thisStart, thisEnd)\n const targetCopy = target.slice(start, end)\n\n for (let i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i]\n y = targetCopy[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (numberIsNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [val], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n let indexSize = 1\n let arrLength = arr.length\n let valLength = val.length\n\n if (encoding !== undefined) {\n encoding = String(encoding).toLowerCase()\n if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n encoding === 'utf16le' || encoding === 'utf-16le') {\n if (arr.length < 2 || val.length < 2) {\n return -1\n }\n indexSize = 2\n arrLength /= 2\n valLength /= 2\n byteOffset /= 2\n }\n }\n\n function read (buf, i) {\n if (indexSize === 1) {\n return buf[i]\n } else {\n return buf.readUInt16BE(i * indexSize)\n }\n }\n\n let i\n if (dir) {\n let foundIndex = -1\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1) foundIndex = i\n if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n } else {\n if (foundIndex !== -1) i -= i - foundIndex\n foundIndex = -1\n }\n }\n } else {\n if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n for (i = byteOffset; i >= 0; i--) {\n let found = true\n for (let j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false\n break\n }\n }\n if (found) return i\n }\n }\n\n return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n offset = Number(offset) || 0\n const remaining = buf.length - offset\n if (!length) {\n length = remaining\n } else {\n length = Number(length)\n if (length > remaining) {\n length = remaining\n }\n }\n\n const strLen = string.length\n\n if (length > strLen / 2) {\n length = strLen / 2\n }\n let i\n for (i = 0; i < length; ++i) {\n const parsed = parseInt(string.substr(i * 2, 2), 16)\n if (numberIsNaN(parsed)) return i\n buf[offset + i] = parsed\n }\n return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n // Buffer#write(string)\n if (offset === undefined) {\n encoding = 'utf8'\n length = this.length\n offset = 0\n // Buffer#write(string, encoding)\n } else if (length === undefined && typeof offset === 'string') {\n encoding = offset\n length = this.length\n offset = 0\n // Buffer#write(string, offset[, length][, encoding])\n } else if (isFinite(offset)) {\n offset = offset >>> 0\n if (isFinite(length)) {\n length = length >>> 0\n if (encoding === undefined) encoding = 'utf8'\n } else {\n encoding = length\n length = undefined\n }\n } else {\n throw new Error(\n 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n )\n }\n\n const remaining = this.length - offset\n if (length === undefined || length > remaining) length = remaining\n\n if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n throw new RangeError('Attempt to write outside buffer bounds')\n }\n\n if (!encoding) encoding = 'utf8'\n\n let loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'hex':\n return hexWrite(this, string, offset, length)\n\n case 'utf8':\n case 'utf-8':\n return utf8Write(this, string, offset, length)\n\n case 'ascii':\n case 'latin1':\n case 'binary':\n return asciiWrite(this, string, offset, length)\n\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return base64Write(this, string, offset, length)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return ucs2Write(this, string, offset, length)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0)\n }\n}\n\nfunction base64Slice (buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf)\n } else {\n return base64.fromByteArray(buf.slice(start, end))\n }\n}\n\nfunction utf8Slice (buf, start, end) {\n end = Math.min(buf.length, end)\n const res = []\n\n let i = start\n while (i < end) {\n const firstByte = buf[i]\n let codePoint = null\n let bytesPerSequence = (firstByte > 0xEF)\n ? 4\n : (firstByte > 0xDF)\n ? 3\n : (firstByte > 0xBF)\n ? 2\n : 1\n\n if (i + bytesPerSequence <= end) {\n let secondByte, thirdByte, fourthByte, tempCodePoint\n\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 0x80) {\n codePoint = firstByte\n }\n break\n case 2:\n secondByte = buf[i + 1]\n if ((secondByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n if (tempCodePoint > 0x7F) {\n codePoint = tempCodePoint\n }\n }\n break\n case 3:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n codePoint = tempCodePoint\n }\n }\n break\n case 4:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n fourthByte = buf[i + 3]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n codePoint = tempCodePoint\n }\n }\n }\n }\n\n if (codePoint === null) {\n // we did not generate a valid codePoint so insert a\n // replacement char (U+FFFD) and advance only 1 byte\n codePoint = 0xFFFD\n bytesPerSequence = 1\n } else if (codePoint > 0xFFFF) {\n // encode to utf16 (surrogate pair dance)\n codePoint -= 0x10000\n res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n codePoint = 0xDC00 | codePoint & 0x3FF\n }\n\n res.push(codePoint)\n i += bytesPerSequence\n }\n\n return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nconst MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n const len = codePoints.length\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n }\n\n // Decode in chunks to avoid \"call stack size exceeded\".\n let res = ''\n let i = 0\n while (i < len) {\n res += String.fromCharCode.apply(\n String,\n codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n )\n }\n return res\n}\n\nfunction asciiSlice (buf, start, end) {\n let ret = ''\n end = Math.min(buf.length, end)\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F)\n }\n return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n let ret = ''\n end = Math.min(buf.length, end)\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i])\n }\n return ret\n}\n\nfunction hexSlice (buf, start, end) {\n const len = buf.length\n\n if (!start || start < 0) start = 0\n if (!end || end < 0 || end > len) end = len\n\n let out = ''\n for (let i = start; i < end; ++i) {\n out += hexSliceLookupTable[buf[i]]\n }\n return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n const bytes = buf.slice(start, end)\n let res = ''\n // If bytes.length is odd, the last 8 bits must be ignored (same as node.js)\n for (let i = 0; i < bytes.length - 1; i += 2) {\n res += String.fromCharCode(bytes[i] + (bytes[i + 1] * 256))\n }\n return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n const len = this.length\n start = ~~start\n end = end === undefined ? len : ~~end\n\n if (start < 0) {\n start += len\n if (start < 0) start = 0\n } else if (start > len) {\n start = len\n }\n\n if (end < 0) {\n end += len\n if (end < 0) end = 0\n } else if (end > len) {\n end = len\n }\n\n if (end < start) end = start\n\n const newBuf = this.subarray(start, end)\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(newBuf, Buffer.prototype)\n\n return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUintLE =\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let val = this[offset]\n let mul = 1\n let i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUintBE =\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n checkOffset(offset, byteLength, this.length)\n }\n\n let val = this[offset + --byteLength]\n let mul = 1\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUint8 =\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n return this[offset]\n}\n\nBuffer.prototype.readUint16LE =\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUint16BE =\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUint32LE =\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return ((this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16)) +\n (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUint32BE =\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] * 0x1000000) +\n ((this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n this[offset + 3])\n}\n\nBuffer.prototype.readBigUInt64LE = defineBigIntMethod(function readBigUInt64LE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const lo = first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24\n\n const hi = this[++offset] +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n last * 2 ** 24\n\n return BigInt(lo) + (BigInt(hi) << BigInt(32))\n})\n\nBuffer.prototype.readBigUInt64BE = defineBigIntMethod(function readBigUInt64BE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const hi = first * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset]\n\n const lo = this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last\n\n return (BigInt(hi) << BigInt(32)) + BigInt(lo)\n})\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let val = this[offset]\n let mul = 1\n let i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let i = byteLength\n let mul = 1\n let val = this[offset + --i]\n while (i > 0 && (mul *= 0x100)) {\n val += this[offset + --i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n if (!(this[offset] & 0x80)) return (this[offset])\n return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n const val = this[offset] | (this[offset + 1] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n const val = this[offset + 1] | (this[offset] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16) |\n (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] << 24) |\n (this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n (this[offset + 3])\n}\n\nBuffer.prototype.readBigInt64LE = defineBigIntMethod(function readBigInt64LE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const val = this[offset + 4] +\n this[offset + 5] * 2 ** 8 +\n this[offset + 6] * 2 ** 16 +\n (last << 24) // Overflow\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24)\n})\n\nBuffer.prototype.readBigInt64BE = defineBigIntMethod(function readBigInt64BE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const val = (first << 24) + // Overflow\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset]\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last)\n})\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUintLE =\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n let mul = 1\n let i = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUintBE =\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n let i = byteLength - 1\n let mul = 1\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUint8 =\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeUint16LE =\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeUint16BE =\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeUint32LE =\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset + 3] = (value >>> 24)\n this[offset + 2] = (value >>> 16)\n this[offset + 1] = (value >>> 8)\n this[offset] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeUint32BE =\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nfunction wrtBigUInt64LE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7)\n\n let lo = Number(value & BigInt(0xffffffff))\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n return offset\n}\n\nfunction wrtBigUInt64BE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7)\n\n let lo = Number(value & BigInt(0xffffffff))\n buf[offset + 7] = lo\n lo = lo >> 8\n buf[offset + 6] = lo\n lo = lo >> 8\n buf[offset + 5] = lo\n lo = lo >> 8\n buf[offset + 4] = lo\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n buf[offset + 3] = hi\n hi = hi >> 8\n buf[offset + 2] = hi\n hi = hi >> 8\n buf[offset + 1] = hi\n hi = hi >> 8\n buf[offset] = hi\n return offset + 8\n}\n\nBuffer.prototype.writeBigUInt64LE = defineBigIntMethod(function writeBigUInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeBigUInt64BE = defineBigIntMethod(function writeBigUInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n let i = 0\n let mul = 1\n let sub = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n let i = byteLength - 1\n let mul = 1\n let sub = 0\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n if (value < 0) value = 0xff + value + 1\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n this[offset + 2] = (value >>> 16)\n this[offset + 3] = (value >>> 24)\n return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (value < 0) value = 0xffffffff + value + 1\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeBigInt64LE = defineBigIntMethod(function writeBigInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nBuffer.prototype.writeBigInt64BE = defineBigIntMethod(function writeBigInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n }\n ieee754.write(buf, value, offset, littleEndian, 23, 4)\n return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n }\n ieee754.write(buf, value, offset, littleEndian, 52, 8)\n return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n if (!Buffer.isBuffer(target)) throw new TypeError('argument should be a Buffer')\n if (!start) start = 0\n if (!end && end !== 0) end = this.length\n if (targetStart >= target.length) targetStart = target.length\n if (!targetStart) targetStart = 0\n if (end > 0 && end < start) end = start\n\n // Copy 0 bytes; we're done\n if (end === start) return 0\n if (target.length === 0 || this.length === 0) return 0\n\n // Fatal error conditions\n if (targetStart < 0) {\n throw new RangeError('targetStart out of bounds')\n }\n if (start < 0 || start >= this.length) throw new RangeError('Index out of range')\n if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n // Are we oob?\n if (end > this.length) end = this.length\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start\n }\n\n const len = end - start\n\n if (this === target && typeof Uint8Array.prototype.copyWithin === 'function') {\n // Use built-in when available, missing from IE11\n this.copyWithin(targetStart, start, end)\n } else {\n Uint8Array.prototype.set.call(\n target,\n this.subarray(start, end),\n targetStart\n )\n }\n\n return len\n}\n\n// Usage:\n// buffer.fill(number[, offset[, end]])\n// buffer.fill(buffer[, offset[, end]])\n// buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n // Handle string cases:\n if (typeof val === 'string') {\n if (typeof start === 'string') {\n encoding = start\n start = 0\n end = this.length\n } else if (typeof end === 'string') {\n encoding = end\n end = this.length\n }\n if (encoding !== undefined && typeof encoding !== 'string') {\n throw new TypeError('encoding must be a string')\n }\n if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n if (val.length === 1) {\n const code = val.charCodeAt(0)\n if ((encoding === 'utf8' && code < 128) ||\n encoding === 'latin1') {\n // Fast path: If `val` fits into a single byte, use that numeric value.\n val = code\n }\n }\n } else if (typeof val === 'number') {\n val = val & 255\n } else if (typeof val === 'boolean') {\n val = Number(val)\n }\n\n // Invalid ranges are not set to a default, so can range check early.\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError('Out of range index')\n }\n\n if (end <= start) {\n return this\n }\n\n start = start >>> 0\n end = end === undefined ? this.length : end >>> 0\n\n if (!val) val = 0\n\n let i\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val\n }\n } else {\n const bytes = Buffer.isBuffer(val)\n ? val\n : Buffer.from(val, encoding)\n const len = bytes.length\n if (len === 0) {\n throw new TypeError('The value \"' + val +\n '\" is invalid for argument \"value\"')\n }\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len]\n }\n }\n\n return this\n}\n\n// CUSTOM ERRORS\n// =============\n\n// Simplified versions from Node, changed for Buffer-only usage\nconst errors = {}\nfunction E (sym, getMessage, Base) {\n errors[sym] = class NodeError extends Base {\n constructor () {\n super()\n\n Object.defineProperty(this, 'message', {\n value: getMessage.apply(this, arguments),\n writable: true,\n configurable: true\n })\n\n // Add the error code to the name to include it in the stack trace.\n this.name = `${this.name} [${sym}]`\n // Access the stack to generate the error message including the error code\n // from the name.\n this.stack // eslint-disable-line no-unused-expressions\n // Reset the name to the actual name.\n delete this.name\n }\n\n get code () {\n return sym\n }\n\n set code (value) {\n Object.defineProperty(this, 'code', {\n configurable: true,\n enumerable: true,\n value,\n writable: true\n })\n }\n\n toString () {\n return `${this.name} [${sym}]: ${this.message}`\n }\n }\n}\n\nE('ERR_BUFFER_OUT_OF_BOUNDS',\n function (name) {\n if (name) {\n return `${name} is outside of buffer bounds`\n }\n\n return 'Attempt to access memory outside buffer bounds'\n }, RangeError)\nE('ERR_INVALID_ARG_TYPE',\n function (name, actual) {\n return `The \"${name}\" argument must be of type number. Received type ${typeof actual}`\n }, TypeError)\nE('ERR_OUT_OF_RANGE',\n function (str, range, input) {\n let msg = `The value of \"${str}\" is out of range.`\n let received = input\n if (Number.isInteger(input) && Math.abs(input) > 2 ** 32) {\n received = addNumericalSeparator(String(input))\n } else if (typeof input === 'bigint') {\n received = String(input)\n if (input > BigInt(2) ** BigInt(32) || input < -(BigInt(2) ** BigInt(32))) {\n received = addNumericalSeparator(received)\n }\n received += 'n'\n }\n msg += ` It must be ${range}. Received ${received}`\n return msg\n }, RangeError)\n\nfunction addNumericalSeparator (val) {\n let res = ''\n let i = val.length\n const start = val[0] === '-' ? 1 : 0\n for (; i >= start + 4; i -= 3) {\n res = `_${val.slice(i - 3, i)}${res}`\n }\n return `${val.slice(0, i)}${res}`\n}\n\n// CHECK FUNCTIONS\n// ===============\n\nfunction checkBounds (buf, offset, byteLength) {\n validateNumber(offset, 'offset')\n if (buf[offset] === undefined || buf[offset + byteLength] === undefined) {\n boundsError(offset, buf.length - (byteLength + 1))\n }\n}\n\nfunction checkIntBI (value, min, max, buf, offset, byteLength) {\n if (value > max || value < min) {\n const n = typeof min === 'bigint' ? 'n' : ''\n let range\n if (byteLength > 3) {\n if (min === 0 || min === BigInt(0)) {\n range = `>= 0${n} and < 2${n} ** ${(byteLength + 1) * 8}${n}`\n } else {\n range = `>= -(2${n} ** ${(byteLength + 1) * 8 - 1}${n}) and < 2 ** ` +\n `${(byteLength + 1) * 8 - 1}${n}`\n }\n } else {\n range = `>= ${min}${n} and <= ${max}${n}`\n }\n throw new errors.ERR_OUT_OF_RANGE('value', range, value)\n }\n checkBounds(buf, offset, byteLength)\n}\n\nfunction validateNumber (value, name) {\n if (typeof value !== 'number') {\n throw new errors.ERR_INVALID_ARG_TYPE(name, 'number', value)\n }\n}\n\nfunction boundsError (value, length, type) {\n if (Math.floor(value) !== value) {\n validateNumber(value, type)\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset', 'an integer', value)\n }\n\n if (length < 0) {\n throw new errors.ERR_BUFFER_OUT_OF_BOUNDS()\n }\n\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset',\n `>= ${type ? 1 : 0} and <= ${length}`,\n value)\n}\n\n// HELPER FUNCTIONS\n// ================\n\nconst INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n // Node takes equal signs as end of the Base64 encoding\n str = str.split('=')[0]\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = str.trim().replace(INVALID_BASE64_RE, '')\n // Node converts strings with length < 2 to ''\n if (str.length < 2) return ''\n // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n while (str.length % 4 !== 0) {\n str = str + '='\n }\n return str\n}\n\nfunction utf8ToBytes (string, units) {\n units = units || Infinity\n let codePoint\n const length = string.length\n let leadSurrogate = null\n const bytes = []\n\n for (let i = 0; i < length; ++i) {\n codePoint = string.charCodeAt(i)\n\n // is surrogate component\n if (codePoint > 0xD7FF && codePoint < 0xE000) {\n // last char was a lead\n if (!leadSurrogate) {\n // no lead yet\n if (codePoint > 0xDBFF) {\n // unexpected trail\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n } else if (i + 1 === length) {\n // unpaired lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n }\n\n // valid lead\n leadSurrogate = codePoint\n\n continue\n }\n\n // 2 leads in a row\n if (codePoint < 0xDC00) {\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n leadSurrogate = codePoint\n continue\n }\n\n // valid surrogate pair\n codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n } else if (leadSurrogate) {\n // valid bmp char, but last char was a lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n }\n\n leadSurrogate = null\n\n // encode utf8\n if (codePoint < 0x80) {\n if ((units -= 1) < 0) break\n bytes.push(codePoint)\n } else if (codePoint < 0x800) {\n if ((units -= 2) < 0) break\n bytes.push(\n codePoint >> 0x6 | 0xC0,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x10000) {\n if ((units -= 3) < 0) break\n bytes.push(\n codePoint >> 0xC | 0xE0,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x110000) {\n if ((units -= 4) < 0) break\n bytes.push(\n codePoint >> 0x12 | 0xF0,\n codePoint >> 0xC & 0x3F | 0x80,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else {\n throw new Error('Invalid code point')\n }\n }\n\n return bytes\n}\n\nfunction asciiToBytes (str) {\n const byteArray = []\n for (let i = 0; i < str.length; ++i) {\n // Node's code seems to be doing this and not & 0x7F..\n byteArray.push(str.charCodeAt(i) & 0xFF)\n }\n return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n let c, hi, lo\n const byteArray = []\n for (let i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0) break\n\n c = str.charCodeAt(i)\n hi = c >> 8\n lo = c % 256\n byteArray.push(lo)\n byteArray.push(hi)\n }\n\n return byteArray\n}\n\nfunction base64ToBytes (str) {\n return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n let i\n for (i = 0; i < length; ++i) {\n if ((i + offset >= dst.length) || (i >= src.length)) break\n dst[i + offset] = src[i]\n }\n return i\n}\n\n// ArrayBuffer or Uint8Array objects from other contexts (i.e. iframes) do not pass\n// the `instanceof` check but they should be treated as of that type.\n// See: https://github.com/feross/buffer/issues/166\nfunction isInstance (obj, type) {\n return obj instanceof type ||\n (obj != null && obj.constructor != null && obj.constructor.name != null &&\n obj.constructor.name === type.name)\n}\nfunction numberIsNaN (obj) {\n // For IE11 support\n return obj !== obj // eslint-disable-line no-self-compare\n}\n\n// Create lookup table for `toString('hex')`\n// See: https://github.com/feross/buffer/issues/219\nconst hexSliceLookupTable = (function () {\n const alphabet = '0123456789abcdef'\n const table = new Array(256)\n for (let i = 0; i < 16; ++i) {\n const i16 = i * 16\n for (let j = 0; j < 16; ++j) {\n table[i16 + j] = alphabet[i] + alphabet[j]\n }\n }\n return table\n})()\n\n// Return not function with Error if BigInt not supported\nfunction defineBigIntMethod (fn) {\n return typeof BigInt === 'undefined' ? BufferBigIntNotDefined : fn\n}\n\nfunction BufferBigIntNotDefined () {\n throw new Error('BigInt not supported')\n}\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\nvar R = typeof Reflect === 'object' ? Reflect : null\nvar ReflectApply = R && typeof R.apply === 'function'\n ? R.apply\n : function ReflectApply(target, receiver, args) {\n return Function.prototype.apply.call(target, receiver, args);\n }\n\nvar ReflectOwnKeys\nif (R && typeof R.ownKeys === 'function') {\n ReflectOwnKeys = R.ownKeys\n} else if (Object.getOwnPropertySymbols) {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target)\n .concat(Object.getOwnPropertySymbols(target));\n };\n} else {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target);\n };\n}\n\nfunction ProcessEmitWarning(warning) {\n if (console && console.warn) console.warn(warning);\n}\n\nvar NumberIsNaN = Number.isNaN || function NumberIsNaN(value) {\n return value !== value;\n}\n\nfunction EventEmitter() {\n EventEmitter.init.call(this);\n}\nmodule.exports = EventEmitter;\nmodule.exports.once = once;\n\n// Backwards-compat with node 0.10.x\nEventEmitter.EventEmitter = EventEmitter;\n\nEventEmitter.prototype._events = undefined;\nEventEmitter.prototype._eventsCount = 0;\nEventEmitter.prototype._maxListeners = undefined;\n\n// By default EventEmitters will print a warning if more than 10 listeners are\n// added to it. This is a useful default which helps finding memory leaks.\nvar defaultMaxListeners = 10;\n\nfunction checkListener(listener) {\n if (typeof listener !== 'function') {\n throw new TypeError('The \"listener\" argument must be of type Function. Received type ' + typeof listener);\n }\n}\n\nObject.defineProperty(EventEmitter, 'defaultMaxListeners', {\n enumerable: true,\n get: function() {\n return defaultMaxListeners;\n },\n set: function(arg) {\n if (typeof arg !== 'number' || arg < 0 || NumberIsNaN(arg)) {\n throw new RangeError('The value of \"defaultMaxListeners\" is out of range. It must be a non-negative number. Received ' + arg + '.');\n }\n defaultMaxListeners = arg;\n }\n});\n\nEventEmitter.init = function() {\n\n if (this._events === undefined ||\n this._events === Object.getPrototypeOf(this)._events) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n }\n\n this._maxListeners = this._maxListeners || undefined;\n};\n\n// Obviously not all Emitters should be limited to 10. This function allows\n// that to be increased. Set to zero for unlimited.\nEventEmitter.prototype.setMaxListeners = function setMaxListeners(n) {\n if (typeof n !== 'number' || n < 0 || NumberIsNaN(n)) {\n throw new RangeError('The value of \"n\" is out of range. It must be a non-negative number. Received ' + n + '.');\n }\n this._maxListeners = n;\n return this;\n};\n\nfunction _getMaxListeners(that) {\n if (that._maxListeners === undefined)\n return EventEmitter.defaultMaxListeners;\n return that._maxListeners;\n}\n\nEventEmitter.prototype.getMaxListeners = function getMaxListeners() {\n return _getMaxListeners(this);\n};\n\nEventEmitter.prototype.emit = function emit(type) {\n var args = [];\n for (var i = 1; i < arguments.length; i++) args.push(arguments[i]);\n var doError = (type === 'error');\n\n var events = this._events;\n if (events !== undefined)\n doError = (doError && events.error === undefined);\n else if (!doError)\n return false;\n\n // If there is no 'error' event listener then throw.\n if (doError) {\n var er;\n if (args.length > 0)\n er = args[0];\n if (er instanceof Error) {\n // Note: The comments on the `throw` lines are intentional, they show\n // up in Node's output if this results in an unhandled exception.\n throw er; // Unhandled 'error' event\n }\n // At least give some kind of context to the user\n var err = new Error('Unhandled error.' + (er ? ' (' + er.message + ')' : ''));\n err.context = er;\n throw err; // Unhandled 'error' event\n }\n\n var handler = events[type];\n\n if (handler === undefined)\n return false;\n\n if (typeof handler === 'function') {\n ReflectApply(handler, this, args);\n } else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n ReflectApply(listeners[i], this, args);\n }\n\n return true;\n};\n\nfunction _addListener(target, type, listener, prepend) {\n var m;\n var events;\n var existing;\n\n checkListener(listener);\n\n events = target._events;\n if (events === undefined) {\n events = target._events = Object.create(null);\n target._eventsCount = 0;\n } else {\n // To avoid recursion in the case that type === \"newListener\"! Before\n // adding it to the listeners, first emit \"newListener\".\n if (events.newListener !== undefined) {\n target.emit('newListener', type,\n listener.listener ? listener.listener : listener);\n\n // Re-assign `events` because a newListener handler could have caused the\n // this._events to be assigned to a new object\n events = target._events;\n }\n existing = events[type];\n }\n\n if (existing === undefined) {\n // Optimize the case of one listener. Don't need the extra array object.\n existing = events[type] = listener;\n ++target._eventsCount;\n } else {\n if (typeof existing === 'function') {\n // Adding the second element, need to change to array.\n existing = events[type] =\n prepend ? [listener, existing] : [existing, listener];\n // If we've already got an array, just append.\n } else if (prepend) {\n existing.unshift(listener);\n } else {\n existing.push(listener);\n }\n\n // Check for listener leak\n m = _getMaxListeners(target);\n if (m > 0 && existing.length > m && !existing.warned) {\n existing.warned = true;\n // No error code for this since it is a Warning\n // eslint-disable-next-line no-restricted-syntax\n var w = new Error('Possible EventEmitter memory leak detected. ' +\n existing.length + ' ' + String(type) + ' listeners ' +\n 'added. Use emitter.setMaxListeners() to ' +\n 'increase limit');\n w.name = 'MaxListenersExceededWarning';\n w.emitter = target;\n w.type = type;\n w.count = existing.length;\n ProcessEmitWarning(w);\n }\n }\n\n return target;\n}\n\nEventEmitter.prototype.addListener = function addListener(type, listener) {\n return _addListener(this, type, listener, false);\n};\n\nEventEmitter.prototype.on = EventEmitter.prototype.addListener;\n\nEventEmitter.prototype.prependListener =\n function prependListener(type, listener) {\n return _addListener(this, type, listener, true);\n };\n\nfunction onceWrapper() {\n if (!this.fired) {\n this.target.removeListener(this.type, this.wrapFn);\n this.fired = true;\n if (arguments.length === 0)\n return this.listener.call(this.target);\n return this.listener.apply(this.target, arguments);\n }\n}\n\nfunction _onceWrap(target, type, listener) {\n var state = { fired: false, wrapFn: undefined, target: target, type: type, listener: listener };\n var wrapped = onceWrapper.bind(state);\n wrapped.listener = listener;\n state.wrapFn = wrapped;\n return wrapped;\n}\n\nEventEmitter.prototype.once = function once(type, listener) {\n checkListener(listener);\n this.on(type, _onceWrap(this, type, listener));\n return this;\n};\n\nEventEmitter.prototype.prependOnceListener =\n function prependOnceListener(type, listener) {\n checkListener(listener);\n this.prependListener(type, _onceWrap(this, type, listener));\n return this;\n };\n\n// Emits a 'removeListener' event if and only if the listener was removed.\nEventEmitter.prototype.removeListener =\n function removeListener(type, listener) {\n var list, events, position, i, originalListener;\n\n checkListener(listener);\n\n events = this._events;\n if (events === undefined)\n return this;\n\n list = events[type];\n if (list === undefined)\n return this;\n\n if (list === listener || list.listener === listener) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else {\n delete events[type];\n if (events.removeListener)\n this.emit('removeListener', type, list.listener || listener);\n }\n } else if (typeof list !== 'function') {\n position = -1;\n\n for (i = list.length - 1; i >= 0; i--) {\n if (list[i] === listener || list[i].listener === listener) {\n originalListener = list[i].listener;\n position = i;\n break;\n }\n }\n\n if (position < 0)\n return this;\n\n if (position === 0)\n list.shift();\n else {\n spliceOne(list, position);\n }\n\n if (list.length === 1)\n events[type] = list[0];\n\n if (events.removeListener !== undefined)\n this.emit('removeListener', type, originalListener || listener);\n }\n\n return this;\n };\n\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\n\nEventEmitter.prototype.removeAllListeners =\n function removeAllListeners(type) {\n var listeners, events, i;\n\n events = this._events;\n if (events === undefined)\n return this;\n\n // not listening for removeListener, no need to emit\n if (events.removeListener === undefined) {\n if (arguments.length === 0) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n } else if (events[type] !== undefined) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else\n delete events[type];\n }\n return this;\n }\n\n // emit removeListener for all listeners on all events\n if (arguments.length === 0) {\n var keys = Object.keys(events);\n var key;\n for (i = 0; i < keys.length; ++i) {\n key = keys[i];\n if (key === 'removeListener') continue;\n this.removeAllListeners(key);\n }\n this.removeAllListeners('removeListener');\n this._events = Object.create(null);\n this._eventsCount = 0;\n return this;\n }\n\n listeners = events[type];\n\n if (typeof listeners === 'function') {\n this.removeListener(type, listeners);\n } else if (listeners !== undefined) {\n // LIFO order\n for (i = listeners.length - 1; i >= 0; i--) {\n this.removeListener(type, listeners[i]);\n }\n }\n\n return this;\n };\n\nfunction _listeners(target, type, unwrap) {\n var events = target._events;\n\n if (events === undefined)\n return [];\n\n var evlistener = events[type];\n if (evlistener === undefined)\n return [];\n\n if (typeof evlistener === 'function')\n return unwrap ? [evlistener.listener || evlistener] : [evlistener];\n\n return unwrap ?\n unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length);\n}\n\nEventEmitter.prototype.listeners = function listeners(type) {\n return _listeners(this, type, true);\n};\n\nEventEmitter.prototype.rawListeners = function rawListeners(type) {\n return _listeners(this, type, false);\n};\n\nEventEmitter.listenerCount = function(emitter, type) {\n if (typeof emitter.listenerCount === 'function') {\n return emitter.listenerCount(type);\n } else {\n return listenerCount.call(emitter, type);\n }\n};\n\nEventEmitter.prototype.listenerCount = listenerCount;\nfunction listenerCount(type) {\n var events = this._events;\n\n if (events !== undefined) {\n var evlistener = events[type];\n\n if (typeof evlistener === 'function') {\n return 1;\n } else if (evlistener !== undefined) {\n return evlistener.length;\n }\n }\n\n return 0;\n}\n\nEventEmitter.prototype.eventNames = function eventNames() {\n return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : [];\n};\n\nfunction arrayClone(arr, n) {\n var copy = new Array(n);\n for (var i = 0; i < n; ++i)\n copy[i] = arr[i];\n return copy;\n}\n\nfunction spliceOne(list, index) {\n for (; index + 1 < list.length; index++)\n list[index] = list[index + 1];\n list.pop();\n}\n\nfunction unwrapListeners(arr) {\n var ret = new Array(arr.length);\n for (var i = 0; i < ret.length; ++i) {\n ret[i] = arr[i].listener || arr[i];\n }\n return ret;\n}\n\nfunction once(emitter, name) {\n return new Promise(function (resolve, reject) {\n function errorListener(err) {\n emitter.removeListener(name, resolver);\n reject(err);\n }\n\n function resolver() {\n if (typeof emitter.removeListener === 'function') {\n emitter.removeListener('error', errorListener);\n }\n resolve([].slice.call(arguments));\n };\n\n eventTargetAgnosticAddListener(emitter, name, resolver, { once: true });\n if (name !== 'error') {\n addErrorHandlerIfEventEmitter(emitter, errorListener, { once: true });\n }\n });\n}\n\nfunction addErrorHandlerIfEventEmitter(emitter, handler, flags) {\n if (typeof emitter.on === 'function') {\n eventTargetAgnosticAddListener(emitter, 'error', handler, flags);\n }\n}\n\nfunction eventTargetAgnosticAddListener(emitter, name, listener, flags) {\n if (typeof emitter.on === 'function') {\n if (flags.once) {\n emitter.once(name, listener);\n } else {\n emitter.on(name, listener);\n }\n } else if (typeof emitter.addEventListener === 'function') {\n // EventTarget does not have `error` event semantics like Node\n // EventEmitters, we do not listen for `error` events here.\n emitter.addEventListener(name, function wrapListener(arg) {\n // IE does not have builtin `{ once: true }` support so we\n // have to do it manually.\n if (flags.once) {\n emitter.removeEventListener(name, wrapListener);\n }\n listener(arg);\n });\n } else {\n throw new TypeError('The \"emitter\" argument must be of type EventEmitter. Received type ' + typeof emitter);\n }\n}\n","/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */\nexports.read = function (buffer, offset, isLE, mLen, nBytes) {\n var e, m\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var nBits = -7\n var i = isLE ? (nBytes - 1) : 0\n var d = isLE ? -1 : 1\n var s = buffer[offset + i]\n\n i += d\n\n e = s & ((1 << (-nBits)) - 1)\n s >>= (-nBits)\n nBits += eLen\n for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & ((1 << (-nBits)) - 1)\n e >>= (-nBits)\n nBits += mLen\n for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias\n } else if (e === eMax) {\n return m ? NaN : ((s ? -1 : 1) * Infinity)\n } else {\n m = m + Math.pow(2, mLen)\n e = e - eBias\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n var i = isLE ? 0 : (nBytes - 1)\n var d = isLE ? 1 : -1\n var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n value = Math.abs(value)\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0\n e = eMax\n } else {\n e = Math.floor(Math.log(value) / Math.LN2)\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--\n c *= 2\n }\n if (e + eBias >= 1) {\n value += rt / c\n } else {\n value += rt * Math.pow(2, 1 - eBias)\n }\n if (value * c >= 2) {\n e++\n c /= 2\n }\n\n if (e + eBias >= eMax) {\n m = 0\n e = eMax\n } else if (e + eBias >= 1) {\n m = ((value * c) - 1) * Math.pow(2, mLen)\n e = e + eBias\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n e = 0\n }\n }\n\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n e = (e << mLen) | m\n eLen += mLen\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128\n}\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView');\n\nmodule.exports = DataView;\n","var hashClear = require('./_hashClear'),\n hashDelete = require('./_hashDelete'),\n hashGet = require('./_hashGet'),\n hashHas = require('./_hashHas'),\n hashSet = require('./_hashSet');\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\nmodule.exports = Hash;\n","var listCacheClear = require('./_listCacheClear'),\n listCacheDelete = require('./_listCacheDelete'),\n listCacheGet = require('./_listCacheGet'),\n listCacheHas = require('./_listCacheHas'),\n listCacheSet = require('./_listCacheSet');\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\nmodule.exports = ListCache;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map');\n\nmodule.exports = Map;\n","var mapCacheClear = require('./_mapCacheClear'),\n mapCacheDelete = require('./_mapCacheDelete'),\n mapCacheGet = require('./_mapCacheGet'),\n mapCacheHas = require('./_mapCacheHas'),\n mapCacheSet = require('./_mapCacheSet');\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\nmodule.exports = MapCache;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Promise = getNative(root, 'Promise');\n\nmodule.exports = Promise;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Set = getNative(root, 'Set');\n\nmodule.exports = Set;\n","var MapCache = require('./_MapCache'),\n setCacheAdd = require('./_setCacheAdd'),\n setCacheHas = require('./_setCacheHas');\n\n/**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\nfunction SetCache(values) {\n var index = -1,\n length = values == null ? 0 : values.length;\n\n this.__data__ = new MapCache;\n while (++index < length) {\n this.add(values[index]);\n }\n}\n\n// Add methods to `SetCache`.\nSetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\nSetCache.prototype.has = setCacheHas;\n\nmodule.exports = SetCache;\n","var ListCache = require('./_ListCache'),\n stackClear = require('./_stackClear'),\n stackDelete = require('./_stackDelete'),\n stackGet = require('./_stackGet'),\n stackHas = require('./_stackHas'),\n stackSet = require('./_stackSet');\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\nmodule.exports = Stack;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Uint8Array = root.Uint8Array;\n\nmodule.exports = Uint8Array;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar WeakMap = getNative(root, 'WeakMap');\n\nmodule.exports = WeakMap;\n","/**\n * A specialized version of `_.forEach` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\nfunction arrayEach(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (iteratee(array[index], index, array) === false) {\n break;\n }\n }\n return array;\n}\n\nmodule.exports = arrayEach;\n","/**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\nfunction arrayFilter(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result[resIndex++] = value;\n }\n }\n return result;\n}\n\nmodule.exports = arrayFilter;\n","var baseTimes = require('./_baseTimes'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isIndex = require('./_isIndex'),\n isTypedArray = require('./isTypedArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = arrayLikeKeys;\n","/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n}\n\nmodule.exports = arrayPush;\n","/**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\nfunction arraySome(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (predicate(array[index], index, array)) {\n return true;\n }\n }\n return false;\n}\n\nmodule.exports = arraySome;\n","var baseAssignValue = require('./_baseAssignValue'),\n eq = require('./eq');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\nmodule.exports = assignValue;\n","var eq = require('./eq');\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\nmodule.exports = assocIndexOf;\n","var copyObject = require('./_copyObject'),\n keys = require('./keys');\n\n/**\n * The base implementation of `_.assign` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssign(object, source) {\n return object && copyObject(source, keys(source), object);\n}\n\nmodule.exports = baseAssign;\n","var copyObject = require('./_copyObject'),\n keysIn = require('./keysIn');\n\n/**\n * The base implementation of `_.assignIn` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssignIn(object, source) {\n return object && copyObject(source, keysIn(source), object);\n}\n\nmodule.exports = baseAssignIn;\n","var defineProperty = require('./_defineProperty');\n\n/**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction baseAssignValue(object, key, value) {\n if (key == '__proto__' && defineProperty) {\n defineProperty(object, key, {\n 'configurable': true,\n 'enumerable': true,\n 'value': value,\n 'writable': true\n });\n } else {\n object[key] = value;\n }\n}\n\nmodule.exports = baseAssignValue;\n","var Stack = require('./_Stack'),\n arrayEach = require('./_arrayEach'),\n assignValue = require('./_assignValue'),\n baseAssign = require('./_baseAssign'),\n baseAssignIn = require('./_baseAssignIn'),\n cloneBuffer = require('./_cloneBuffer'),\n copyArray = require('./_copyArray'),\n copySymbols = require('./_copySymbols'),\n copySymbolsIn = require('./_copySymbolsIn'),\n getAllKeys = require('./_getAllKeys'),\n getAllKeysIn = require('./_getAllKeysIn'),\n getTag = require('./_getTag'),\n initCloneArray = require('./_initCloneArray'),\n initCloneByTag = require('./_initCloneByTag'),\n initCloneObject = require('./_initCloneObject'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isMap = require('./isMap'),\n isObject = require('./isObject'),\n isSet = require('./isSet'),\n keys = require('./keys'),\n keysIn = require('./keysIn');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_FLAT_FLAG = 2,\n CLONE_SYMBOLS_FLAG = 4;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values supported by `_.clone`. */\nvar cloneableTags = {};\ncloneableTags[argsTag] = cloneableTags[arrayTag] =\ncloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =\ncloneableTags[boolTag] = cloneableTags[dateTag] =\ncloneableTags[float32Tag] = cloneableTags[float64Tag] =\ncloneableTags[int8Tag] = cloneableTags[int16Tag] =\ncloneableTags[int32Tag] = cloneableTags[mapTag] =\ncloneableTags[numberTag] = cloneableTags[objectTag] =\ncloneableTags[regexpTag] = cloneableTags[setTag] =\ncloneableTags[stringTag] = cloneableTags[symbolTag] =\ncloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =\ncloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;\ncloneableTags[errorTag] = cloneableTags[funcTag] =\ncloneableTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.clone` and `_.cloneDeep` which tracks\n * traversed objects.\n *\n * @private\n * @param {*} value The value to clone.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Deep clone\n * 2 - Flatten inherited properties\n * 4 - Clone symbols\n * @param {Function} [customizer] The function to customize cloning.\n * @param {string} [key] The key of `value`.\n * @param {Object} [object] The parent object of `value`.\n * @param {Object} [stack] Tracks traversed objects and their clone counterparts.\n * @returns {*} Returns the cloned value.\n */\nfunction baseClone(value, bitmask, customizer, key, object, stack) {\n var result,\n isDeep = bitmask & CLONE_DEEP_FLAG,\n isFlat = bitmask & CLONE_FLAT_FLAG,\n isFull = bitmask & CLONE_SYMBOLS_FLAG;\n\n if (customizer) {\n result = object ? customizer(value, key, object, stack) : customizer(value);\n }\n if (result !== undefined) {\n return result;\n }\n if (!isObject(value)) {\n return value;\n }\n var isArr = isArray(value);\n if (isArr) {\n result = initCloneArray(value);\n if (!isDeep) {\n return copyArray(value, result);\n }\n } else {\n var tag = getTag(value),\n isFunc = tag == funcTag || tag == genTag;\n\n if (isBuffer(value)) {\n return cloneBuffer(value, isDeep);\n }\n if (tag == objectTag || tag == argsTag || (isFunc && !object)) {\n result = (isFlat || isFunc) ? {} : initCloneObject(value);\n if (!isDeep) {\n return isFlat\n ? copySymbolsIn(value, baseAssignIn(result, value))\n : copySymbols(value, baseAssign(result, value));\n }\n } else {\n if (!cloneableTags[tag]) {\n return object ? value : {};\n }\n result = initCloneByTag(value, tag, isDeep);\n }\n }\n // Check for circular references and return its corresponding clone.\n stack || (stack = new Stack);\n var stacked = stack.get(value);\n if (stacked) {\n return stacked;\n }\n stack.set(value, result);\n\n if (isSet(value)) {\n value.forEach(function(subValue) {\n result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));\n });\n } else if (isMap(value)) {\n value.forEach(function(subValue, key) {\n result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n }\n\n var keysFunc = isFull\n ? (isFlat ? getAllKeysIn : getAllKeys)\n : (isFlat ? keysIn : keys);\n\n var props = isArr ? undefined : keysFunc(value);\n arrayEach(props || value, function(subValue, key) {\n if (props) {\n key = subValue;\n subValue = value[key];\n }\n // Recursively populate clone (susceptible to call stack limits).\n assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n return result;\n}\n\nmodule.exports = baseClone;\n","var isObject = require('./isObject');\n\n/** Built-in value references. */\nvar objectCreate = Object.create;\n\n/**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} proto The object to inherit from.\n * @returns {Object} Returns the new object.\n */\nvar baseCreate = (function() {\n function object() {}\n return function(proto) {\n if (!isObject(proto)) {\n return {};\n }\n if (objectCreate) {\n return objectCreate(proto);\n }\n object.prototype = proto;\n var result = new object;\n object.prototype = undefined;\n return result;\n };\n}());\n\nmodule.exports = baseCreate;\n","var arrayPush = require('./_arrayPush'),\n isArray = require('./isArray');\n\n/**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction baseGetAllKeys(object, keysFunc, symbolsFunc) {\n var result = keysFunc(object);\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n}\n\nmodule.exports = baseGetAllKeys;\n","var Symbol = require('./_Symbol'),\n getRawTag = require('./_getRawTag'),\n objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]';\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\nmodule.exports = baseIsArguments;\n","var baseIsEqualDeep = require('./_baseIsEqualDeep'),\n isObjectLike = require('./isObjectLike');\n\n/**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Unordered comparison\n * 2 - Partial comparison\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\nfunction baseIsEqual(value, other, bitmask, customizer, stack) {\n if (value === other) {\n return true;\n }\n if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\n return value !== value && other !== other;\n }\n return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n}\n\nmodule.exports = baseIsEqual;\n","var Stack = require('./_Stack'),\n equalArrays = require('./_equalArrays'),\n equalByTag = require('./_equalByTag'),\n equalObjects = require('./_equalObjects'),\n getTag = require('./_getTag'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isTypedArray = require('./isTypedArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n var objIsArr = isArray(object),\n othIsArr = isArray(other),\n objTag = objIsArr ? arrayTag : getTag(object),\n othTag = othIsArr ? arrayTag : getTag(other);\n\n objTag = objTag == argsTag ? objectTag : objTag;\n othTag = othTag == argsTag ? objectTag : othTag;\n\n var objIsObj = objTag == objectTag,\n othIsObj = othTag == objectTag,\n isSameTag = objTag == othTag;\n\n if (isSameTag && isBuffer(object)) {\n if (!isBuffer(other)) {\n return false;\n }\n objIsArr = true;\n objIsObj = false;\n }\n if (isSameTag && !objIsObj) {\n stack || (stack = new Stack);\n return (objIsArr || isTypedArray(object))\n ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n }\n if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n if (objIsWrapped || othIsWrapped) {\n var objUnwrapped = objIsWrapped ? object.value() : object,\n othUnwrapped = othIsWrapped ? other.value() : other;\n\n stack || (stack = new Stack);\n return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n }\n }\n if (!isSameTag) {\n return false;\n }\n stack || (stack = new Stack);\n return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n}\n\nmodule.exports = baseIsEqualDeep;\n","var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]';\n\n/**\n * The base implementation of `_.isMap` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n */\nfunction baseIsMap(value) {\n return isObjectLike(value) && getTag(value) == mapTag;\n}\n\nmodule.exports = baseIsMap;\n","var isFunction = require('./isFunction'),\n isMasked = require('./_isMasked'),\n isObject = require('./isObject'),\n toSource = require('./_toSource');\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\nmodule.exports = baseIsNative;\n","var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar setTag = '[object Set]';\n\n/**\n * The base implementation of `_.isSet` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n */\nfunction baseIsSet(value) {\n return isObjectLike(value) && getTag(value) == setTag;\n}\n\nmodule.exports = baseIsSet;\n","var baseGetTag = require('./_baseGetTag'),\n isLength = require('./isLength'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n\nmodule.exports = baseIsTypedArray;\n","var isPrototype = require('./_isPrototype'),\n nativeKeys = require('./_nativeKeys');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeys;\n","var isObject = require('./isObject'),\n isPrototype = require('./_isPrototype'),\n nativeKeysIn = require('./_nativeKeysIn');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeysIn(object) {\n if (!isObject(object)) {\n return nativeKeysIn(object);\n }\n var isProto = isPrototype(object),\n result = [];\n\n for (var key in object) {\n if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeysIn;\n","/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\nmodule.exports = baseTimes;\n","/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n return function(value) {\n return func(value);\n };\n}\n\nmodule.exports = baseUnary;\n","/**\n * Checks if a `cache` value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction cacheHas(cache, key) {\n return cache.has(key);\n}\n\nmodule.exports = cacheHas;\n","var Uint8Array = require('./_Uint8Array');\n\n/**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\nfunction cloneArrayBuffer(arrayBuffer) {\n var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n return result;\n}\n\nmodule.exports = cloneArrayBuffer;\n","var root = require('./_root');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined,\n allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;\n\n/**\n * Creates a clone of `buffer`.\n *\n * @private\n * @param {Buffer} buffer The buffer to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Buffer} Returns the cloned buffer.\n */\nfunction cloneBuffer(buffer, isDeep) {\n if (isDeep) {\n return buffer.slice();\n }\n var length = buffer.length,\n result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\n\n buffer.copy(result);\n return result;\n}\n\nmodule.exports = cloneBuffer;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer');\n\n/**\n * Creates a clone of `dataView`.\n *\n * @private\n * @param {Object} dataView The data view to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned data view.\n */\nfunction cloneDataView(dataView, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;\n return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);\n}\n\nmodule.exports = cloneDataView;\n","/** Used to match `RegExp` flags from their coerced string values. */\nvar reFlags = /\\w*$/;\n\n/**\n * Creates a clone of `regexp`.\n *\n * @private\n * @param {Object} regexp The regexp to clone.\n * @returns {Object} Returns the cloned regexp.\n */\nfunction cloneRegExp(regexp) {\n var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));\n result.lastIndex = regexp.lastIndex;\n return result;\n}\n\nmodule.exports = cloneRegExp;\n","var Symbol = require('./_Symbol');\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * Creates a clone of the `symbol` object.\n *\n * @private\n * @param {Object} symbol The symbol object to clone.\n * @returns {Object} Returns the cloned symbol object.\n */\nfunction cloneSymbol(symbol) {\n return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};\n}\n\nmodule.exports = cloneSymbol;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer');\n\n/**\n * Creates a clone of `typedArray`.\n *\n * @private\n * @param {Object} typedArray The typed array to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned typed array.\n */\nfunction cloneTypedArray(typedArray, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n}\n\nmodule.exports = cloneTypedArray;\n","/**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\nfunction copyArray(source, array) {\n var index = -1,\n length = source.length;\n\n array || (array = Array(length));\n while (++index < length) {\n array[index] = source[index];\n }\n return array;\n}\n\nmodule.exports = copyArray;\n","var assignValue = require('./_assignValue'),\n baseAssignValue = require('./_baseAssignValue');\n\n/**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\nfunction copyObject(source, props, object, customizer) {\n var isNew = !object;\n object || (object = {});\n\n var index = -1,\n length = props.length;\n\n while (++index < length) {\n var key = props[index];\n\n var newValue = customizer\n ? customizer(object[key], source[key], key, object, source)\n : undefined;\n\n if (newValue === undefined) {\n newValue = source[key];\n }\n if (isNew) {\n baseAssignValue(object, key, newValue);\n } else {\n assignValue(object, key, newValue);\n }\n }\n return object;\n}\n\nmodule.exports = copyObject;\n","var copyObject = require('./_copyObject'),\n getSymbols = require('./_getSymbols');\n\n/**\n * Copies own symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbols(source, object) {\n return copyObject(source, getSymbols(source), object);\n}\n\nmodule.exports = copySymbols;\n","var copyObject = require('./_copyObject'),\n getSymbolsIn = require('./_getSymbolsIn');\n\n/**\n * Copies own and inherited symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbolsIn(source, object) {\n return copyObject(source, getSymbolsIn(source), object);\n}\n\nmodule.exports = copySymbolsIn;\n","var root = require('./_root');\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\nmodule.exports = coreJsData;\n","var getNative = require('./_getNative');\n\nvar defineProperty = (function() {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n}());\n\nmodule.exports = defineProperty;\n","var SetCache = require('./_SetCache'),\n arraySome = require('./_arraySome'),\n cacheHas = require('./_cacheHas');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\nfunction equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n arrLength = array.length,\n othLength = other.length;\n\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n return false;\n }\n // Check that cyclic values are equal.\n var arrStacked = stack.get(array);\n var othStacked = stack.get(other);\n if (arrStacked && othStacked) {\n return arrStacked == other && othStacked == array;\n }\n var index = -1,\n result = true,\n seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n stack.set(array, other);\n stack.set(other, array);\n\n // Ignore non-index properties.\n while (++index < arrLength) {\n var arrValue = array[index],\n othValue = other[index];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, arrValue, index, other, array, stack)\n : customizer(arrValue, othValue, index, array, other, stack);\n }\n if (compared !== undefined) {\n if (compared) {\n continue;\n }\n result = false;\n break;\n }\n // Recursively compare arrays (susceptible to call stack limits).\n if (seen) {\n if (!arraySome(other, function(othValue, othIndex) {\n if (!cacheHas(seen, othIndex) &&\n (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n return seen.push(othIndex);\n }\n })) {\n result = false;\n break;\n }\n } else if (!(\n arrValue === othValue ||\n equalFunc(arrValue, othValue, bitmask, customizer, stack)\n )) {\n result = false;\n break;\n }\n }\n stack['delete'](array);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalArrays;\n","var Symbol = require('./_Symbol'),\n Uint8Array = require('./_Uint8Array'),\n eq = require('./eq'),\n equalArrays = require('./_equalArrays'),\n mapToArray = require('./_mapToArray'),\n setToArray = require('./_setToArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]';\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n switch (tag) {\n case dataViewTag:\n if ((object.byteLength != other.byteLength) ||\n (object.byteOffset != other.byteOffset)) {\n return false;\n }\n object = object.buffer;\n other = other.buffer;\n\n case arrayBufferTag:\n if ((object.byteLength != other.byteLength) ||\n !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n return false;\n }\n return true;\n\n case boolTag:\n case dateTag:\n case numberTag:\n // Coerce booleans to `1` or `0` and dates to milliseconds.\n // Invalid dates are coerced to `NaN`.\n return eq(+object, +other);\n\n case errorTag:\n return object.name == other.name && object.message == other.message;\n\n case regexpTag:\n case stringTag:\n // Coerce regexes to strings and treat strings, primitives and objects,\n // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n // for more details.\n return object == (other + '');\n\n case mapTag:\n var convert = mapToArray;\n\n case setTag:\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n convert || (convert = setToArray);\n\n if (object.size != other.size && !isPartial) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked) {\n return stacked == other;\n }\n bitmask |= COMPARE_UNORDERED_FLAG;\n\n // Recursively compare objects (susceptible to call stack limits).\n stack.set(object, other);\n var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n stack['delete'](object);\n return result;\n\n case symbolTag:\n if (symbolValueOf) {\n return symbolValueOf.call(object) == symbolValueOf.call(other);\n }\n }\n return false;\n}\n\nmodule.exports = equalByTag;\n","var getAllKeys = require('./_getAllKeys');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n objProps = getAllKeys(object),\n objLength = objProps.length,\n othProps = getAllKeys(other),\n othLength = othProps.length;\n\n if (objLength != othLength && !isPartial) {\n return false;\n }\n var index = objLength;\n while (index--) {\n var key = objProps[index];\n if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n return false;\n }\n }\n // Check that cyclic values are equal.\n var objStacked = stack.get(object);\n var othStacked = stack.get(other);\n if (objStacked && othStacked) {\n return objStacked == other && othStacked == object;\n }\n var result = true;\n stack.set(object, other);\n stack.set(other, object);\n\n var skipCtor = isPartial;\n while (++index < objLength) {\n key = objProps[index];\n var objValue = object[key],\n othValue = other[key];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, objValue, key, other, object, stack)\n : customizer(objValue, othValue, key, object, other, stack);\n }\n // Recursively compare objects (susceptible to call stack limits).\n if (!(compared === undefined\n ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n : compared\n )) {\n result = false;\n break;\n }\n skipCtor || (skipCtor = key == 'constructor');\n }\n if (result && !skipCtor) {\n var objCtor = object.constructor,\n othCtor = other.constructor;\n\n // Non `Object` object instances with different constructors are not equal.\n if (objCtor != othCtor &&\n ('constructor' in object && 'constructor' in other) &&\n !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n result = false;\n }\n }\n stack['delete'](object);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalObjects;\n","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n","var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbols = require('./_getSymbols'),\n keys = require('./keys');\n\n/**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeys(object) {\n return baseGetAllKeys(object, keys, getSymbols);\n}\n\nmodule.exports = getAllKeys;\n","var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbolsIn = require('./_getSymbolsIn'),\n keysIn = require('./keysIn');\n\n/**\n * Creates an array of own and inherited enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeysIn(object) {\n return baseGetAllKeys(object, keysIn, getSymbolsIn);\n}\n\nmodule.exports = getAllKeysIn;\n","var isKeyable = require('./_isKeyable');\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\nmodule.exports = getMapData;\n","var baseIsNative = require('./_baseIsNative'),\n getValue = require('./_getValue');\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\nmodule.exports = getNative;\n","var overArg = require('./_overArg');\n\n/** Built-in value references. */\nvar getPrototype = overArg(Object.getPrototypeOf, Object);\n\nmodule.exports = getPrototype;\n","var Symbol = require('./_Symbol');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nmodule.exports = getRawTag;\n","var arrayFilter = require('./_arrayFilter'),\n stubArray = require('./stubArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n if (object == null) {\n return [];\n }\n object = Object(object);\n return arrayFilter(nativeGetSymbols(object), function(symbol) {\n return propertyIsEnumerable.call(object, symbol);\n });\n};\n\nmodule.exports = getSymbols;\n","var arrayPush = require('./_arrayPush'),\n getPrototype = require('./_getPrototype'),\n getSymbols = require('./_getSymbols'),\n stubArray = require('./stubArray');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own and inherited enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {\n var result = [];\n while (object) {\n arrayPush(result, getSymbols(object));\n object = getPrototype(object);\n }\n return result;\n};\n\nmodule.exports = getSymbolsIn;\n","var DataView = require('./_DataView'),\n Map = require('./_Map'),\n Promise = require('./_Promise'),\n Set = require('./_Set'),\n WeakMap = require('./_WeakMap'),\n baseGetTag = require('./_baseGetTag'),\n toSource = require('./_toSource');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n setTag = '[object Set]',\n weakMapTag = '[object WeakMap]';\n\nvar dataViewTag = '[object DataView]';\n\n/** Used to detect maps, sets, and weakmaps. */\nvar dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nvar getTag = baseGetTag;\n\n// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\nif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = baseGetTag(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : '';\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n}\n\nmodule.exports = getTag;\n","/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\nmodule.exports = getValue;\n","var nativeCreate = require('./_nativeCreate');\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n}\n\nmodule.exports = hashClear;\n","/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = hashDelete;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\nmodule.exports = hashGet;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\nmodule.exports = hashHas;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\nmodule.exports = hashSet;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Initializes an array clone.\n *\n * @private\n * @param {Array} array The array to clone.\n * @returns {Array} Returns the initialized clone.\n */\nfunction initCloneArray(array) {\n var length = array.length,\n result = new array.constructor(length);\n\n // Add properties assigned by `RegExp#exec`.\n if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {\n result.index = array.index;\n result.input = array.input;\n }\n return result;\n}\n\nmodule.exports = initCloneArray;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer'),\n cloneDataView = require('./_cloneDataView'),\n cloneRegExp = require('./_cloneRegExp'),\n cloneSymbol = require('./_cloneSymbol'),\n cloneTypedArray = require('./_cloneTypedArray');\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/**\n * Initializes an object clone based on its `toStringTag`.\n *\n * **Note:** This function only supports cloning values with tags of\n * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.\n *\n * @private\n * @param {Object} object The object to clone.\n * @param {string} tag The `toStringTag` of the object to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneByTag(object, tag, isDeep) {\n var Ctor = object.constructor;\n switch (tag) {\n case arrayBufferTag:\n return cloneArrayBuffer(object);\n\n case boolTag:\n case dateTag:\n return new Ctor(+object);\n\n case dataViewTag:\n return cloneDataView(object, isDeep);\n\n case float32Tag: case float64Tag:\n case int8Tag: case int16Tag: case int32Tag:\n case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:\n return cloneTypedArray(object, isDeep);\n\n case mapTag:\n return new Ctor;\n\n case numberTag:\n case stringTag:\n return new Ctor(object);\n\n case regexpTag:\n return cloneRegExp(object);\n\n case setTag:\n return new Ctor;\n\n case symbolTag:\n return cloneSymbol(object);\n }\n}\n\nmodule.exports = initCloneByTag;\n","var baseCreate = require('./_baseCreate'),\n getPrototype = require('./_getPrototype'),\n isPrototype = require('./_isPrototype');\n\n/**\n * Initializes an object clone.\n *\n * @private\n * @param {Object} object The object to clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneObject(object) {\n return (typeof object.constructor == 'function' && !isPrototype(object))\n ? baseCreate(getPrototype(object))\n : {};\n}\n\nmodule.exports = initCloneObject;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n var type = typeof value;\n length = length == null ? MAX_SAFE_INTEGER : length;\n\n return !!length &&\n (type == 'number' ||\n (type != 'symbol' && reIsUint.test(value))) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\nmodule.exports = isIndex;\n","/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\nmodule.exports = isKeyable;\n","var coreJsData = require('./_coreJsData');\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\nmodule.exports = isMasked;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\nmodule.exports = isPrototype;\n","/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n}\n\nmodule.exports = listCacheClear;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype;\n\n/** Built-in value references. */\nvar splice = arrayProto.splice;\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n}\n\nmodule.exports = listCacheDelete;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\nmodule.exports = listCacheGet;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\nmodule.exports = listCacheHas;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\nmodule.exports = listCacheSet;\n","var Hash = require('./_Hash'),\n ListCache = require('./_ListCache'),\n Map = require('./_Map');\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\nmodule.exports = mapCacheClear;\n","var getMapData = require('./_getMapData');\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = mapCacheDelete;\n","var getMapData = require('./_getMapData');\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\nmodule.exports = mapCacheGet;\n","var getMapData = require('./_getMapData');\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\nmodule.exports = mapCacheHas;\n","var getMapData = require('./_getMapData');\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n}\n\nmodule.exports = mapCacheSet;\n","/**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\nfunction mapToArray(map) {\n var index = -1,\n result = Array(map.size);\n\n map.forEach(function(value, key) {\n result[++index] = [key, value];\n });\n return result;\n}\n\nmodule.exports = mapToArray;\n","var getNative = require('./_getNative');\n\n/* Built-in method references that are verified to be native. */\nvar nativeCreate = getNative(Object, 'create');\n\nmodule.exports = nativeCreate;\n","var overArg = require('./_overArg');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeKeys = overArg(Object.keys, Object);\n\nmodule.exports = nativeKeys;\n","/**\n * This function is like\n * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * except that it includes inherited enumerable properties.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction nativeKeysIn(object) {\n var result = [];\n if (object != null) {\n for (var key in Object(object)) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = nativeKeysIn;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n try {\n // Use `util.types` for Node.js 10+.\n var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n if (types) {\n return types;\n }\n\n // Legacy `process.binding('util')` for Node.js < 10.\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n}());\n\nmodule.exports = nodeUtil;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n","/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\nmodule.exports = overArg;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n","/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\nfunction setCacheAdd(value) {\n this.__data__.set(value, HASH_UNDEFINED);\n return this;\n}\n\nmodule.exports = setCacheAdd;\n","/**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\nfunction setCacheHas(value) {\n return this.__data__.has(value);\n}\n\nmodule.exports = setCacheHas;\n","/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\nfunction setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n}\n\nmodule.exports = setToArray;\n","var ListCache = require('./_ListCache');\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}\n\nmodule.exports = stackClear;\n","/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n var data = this.__data__,\n result = data['delete'](key);\n\n this.size = data.size;\n return result;\n}\n\nmodule.exports = stackDelete;\n","/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n return this.__data__.get(key);\n}\n\nmodule.exports = stackGet;\n","/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n return this.__data__.has(key);\n}\n\nmodule.exports = stackHas;\n","var ListCache = require('./_ListCache'),\n Map = require('./_Map'),\n MapCache = require('./_MapCache');\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n var data = this.__data__;\n if (data instanceof ListCache) {\n var pairs = data.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n this.size = ++data.size;\n return this;\n }\n data = this.__data__ = new MapCache(pairs);\n }\n data.set(key, value);\n this.size = data.size;\n return this;\n}\n\nmodule.exports = stackSet;\n","/** Used for built-in method references. */\nvar funcProto = Function.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\nmodule.exports = toSource;\n","var baseClone = require('./_baseClone');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_SYMBOLS_FLAG = 4;\n\n/**\n * This method is like `_.clone` except that it recursively clones `value`.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Lang\n * @param {*} value The value to recursively clone.\n * @returns {*} Returns the deep cloned value.\n * @see _.clone\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var deep = _.cloneDeep(objects);\n * console.log(deep[0] === objects[0]);\n * // => false\n */\nfunction cloneDeep(value) {\n return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);\n}\n\nmodule.exports = cloneDeep;\n","/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\nmodule.exports = eq;\n","var baseIsArguments = require('./_baseIsArguments'),\n isObjectLike = require('./isObjectLike');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n};\n\nmodule.exports = isArguments;\n","/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\nmodule.exports = isArray;\n","var isFunction = require('./isFunction'),\n isLength = require('./isLength');\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\nmodule.exports = isArrayLike;\n","var root = require('./_root'),\n stubFalse = require('./stubFalse');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\nmodule.exports = isBuffer;\n","var baseIsEqual = require('./_baseIsEqual');\n\n/**\n * Performs a deep comparison between two values to determine if they are\n * equivalent.\n *\n * **Note:** This method supports comparing arrays, array buffers, booleans,\n * date objects, error objects, maps, numbers, `Object` objects, regexes,\n * sets, strings, symbols, and typed arrays. `Object` objects are compared\n * by their own, not inherited, enumerable properties. Functions and DOM\n * nodes are compared by strict equality, i.e. `===`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.isEqual(object, other);\n * // => true\n *\n * object === other;\n * // => false\n */\nfunction isEqual(value, other) {\n return baseIsEqual(value, other);\n}\n\nmodule.exports = isEqual;\n","var baseGetTag = require('./_baseGetTag'),\n isObject = require('./isObject');\n\n/** `Object#toString` result references. */\nvar asyncTag = '[object AsyncFunction]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n proxyTag = '[object Proxy]';\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\nmodule.exports = isFunction;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\nmodule.exports = isLength;\n","var baseIsMap = require('./_baseIsMap'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsMap = nodeUtil && nodeUtil.isMap;\n\n/**\n * Checks if `value` is classified as a `Map` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n * @example\n *\n * _.isMap(new Map);\n * // => true\n *\n * _.isMap(new WeakMap);\n * // => false\n */\nvar isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;\n\nmodule.exports = isMap;\n","/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n","var baseIsSet = require('./_baseIsSet'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsSet = nodeUtil && nodeUtil.isSet;\n\n/**\n * Checks if `value` is classified as a `Set` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n * @example\n *\n * _.isSet(new Set);\n * // => true\n *\n * _.isSet(new WeakSet);\n * // => false\n */\nvar isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;\n\nmodule.exports = isSet;\n","var baseIsTypedArray = require('./_baseIsTypedArray'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\nmodule.exports = isTypedArray;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeys = require('./_baseKeys'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\nmodule.exports = keys;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeysIn = require('./_baseKeysIn'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\nfunction keysIn(object) {\n return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n}\n\nmodule.exports = keysIn;\n","/**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\nfunction stubArray() {\n return [];\n}\n\nmodule.exports = stubArray;\n","/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n return false;\n}\n\nmodule.exports = stubFalse;\n","import { connect, type BaseConnectionOptions } from \"@openfin/core-web\";\nimport { getSettings } from \"./settings\";\n\n/**\n * Initializes the OpenFin Web Broker connection.\n * @param inherit Should we inherit settings from the host (available in the OpenFin layout system) or use settings? Default is true.\n */\nexport async function init(inherit: boolean = true): Promise {\n\t// Set window.fin to the `fin` object.\n\tlet options: BaseConnectionOptions | undefined;\n\tif (window.fin === undefined) {\n\t\tif (!inherit) {\n\t\t\tconst settings = await getSettings();\n\t\t\tif (settings === undefined) {\n\t\t\t\tconsole.error(\n\t\t\t\t\t\"Unable to run the sample as we have been unable to load the web manifest and it's settings from the currently running html page. Please ensure that the web manifest is being served and that it contains the custom_settings section.\"\n\t\t\t\t);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\toptions = {\n\t\t\t\tbrokerUrl: settings.platform.interop.brokerUrl,\n\t\t\t\tinteropConfig: {\n\t\t\t\t\tproviderId: settings.platform.interop.providerId,\n\t\t\t\t\tcurrentContextGroup: settings.platform.interop.defaultContextGroup\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t\t// Specify an interopConfig with a specific provider ID and a context group to initialize the `fin.me.interop` client on connection.\n\t\tif (options) {\n\t\t\twindow.fin = await connect({\n\t\t\t\toptions\n\t\t\t});\n\t\t} else {\n\t\t\twindow.fin = await connect({\n\t\t\t\tconnectionInheritance: \"enabled\"\n\t\t\t});\n\t\t}\n\t\tconsole.log(\"Finished initializing the fin API.\");\n\t\t// Create and dispatch the finReady event\n\t\tconst event = new CustomEvent(\"finReady\");\n\t\twindow.dispatchEvent(event);\n\t}\n\n\tif (window.fdc3 === undefined && window?.fin?.me.interop?.getFDC3Sync !== undefined) {\n\t\twindow.fdc3 = fin.me.interop.getFDC3Sync(\"2.0\");\n\t\tconsole.log(\"Finished initializing the fdc3 API.\");\n\t\t// Create and dispatch the FDC3Ready event\n\t\tconst event = new CustomEvent(\"fdc3Ready\");\n\t\twindow.dispatchEvent(event);\n\t}\n}\n","import type { WebLayoutSnapshot } from \"@openfin/core-web\";\nimport type { Settings } from \"../shapes/setting-shapes\";\n\n/**\n * Fetches the settings for the application.\n * @returns The settings for the application.\n */\nexport async function getSettings(): Promise {\n\tconst settings = await getManifestSettings();\n\tif (settings === undefined) {\n\t\tconsole.error(\n\t\t\t\"Unable to run the example as settings are required and we fetch them from the link web manifest from the html page that is being served. It should exist in the customSettings section of the web manifest.\"\n\t\t);\n\t}\n\treturn settings;\n}\n\n/**\n * Returns a default layout from the settings if provided.\n * @returns The default layout from the settings.\n */\nexport async function getDefaultLayout(): Promise {\n\tconst settings = await getSettings();\n\tif (settings?.platform?.layout?.defaultLayout === undefined) {\n\t\tconsole.error(\n\t\t\t\"Unable to run the example as without a layout being defined. Please ensure that settings have been provided in the web manifest.\"\n\t\t);\n\t\treturn;\n\t}\n\tif (typeof settings.platform.layout.defaultLayout === \"string\") {\n\t\tconst layoutResponse = await fetch(settings.platform.layout.defaultLayout);\n\t\tconst layoutJson = (await layoutResponse.json()) as WebLayoutSnapshot;\n\t\treturn layoutJson;\n\t}\n\treturn settings.platform.layout.defaultLayout;\n}\n\n/**\n * Returns the settings from the manifest file.\n * @returns customSettings for this example\n */\nasync function getManifestSettings(): Promise {\n\t// Get the manifest link\n\tconst link = document.querySelector('link[rel=\"manifest\"]');\n\tif (link !== null) {\n\t\tconst manifestResponse = await fetch(link.href);\n\t\tconst manifestJson = (await manifestResponse.json()) as { custom_settings: Settings };\n\t\treturn manifestJson.custom_settings;\n\t}\n}\n","export { default as v1 } from './v1.js';\nexport { default as v3 } from './v3.js';\nexport { default as v4 } from './v4.js';\nexport { default as v5 } from './v5.js';\nexport { default as NIL } from './nil.js';\nexport { default as version } from './version.js';\nexport { default as validate } from './validate.js';\nexport { default as stringify } from './stringify.js';\nexport { default as parse } from './parse.js';","/*\n * Browser-compatible JavaScript MD5\n *\n * Modification of JavaScript MD5\n * https://github.com/blueimp/JavaScript-MD5\n *\n * Copyright 2011, Sebastian Tschan\n * https://blueimp.net\n *\n * Licensed under the MIT license:\n * https://opensource.org/licenses/MIT\n *\n * Based on\n * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message\n * Digest Algorithm, as defined in RFC 1321.\n * Version 2.2 Copyright (C) Paul Johnston 1999 - 2009\n * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet\n * Distributed under the BSD License\n * See http://pajhome.org.uk/crypt/md5 for more info.\n */\nfunction md5(bytes) {\n if (typeof bytes === 'string') {\n var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape\n\n bytes = new Uint8Array(msg.length);\n\n for (var i = 0; i < msg.length; ++i) {\n bytes[i] = msg.charCodeAt(i);\n }\n }\n\n return md5ToHexEncodedArray(wordsToMd5(bytesToWords(bytes), bytes.length * 8));\n}\n/*\n * Convert an array of little-endian words to an array of bytes\n */\n\n\nfunction md5ToHexEncodedArray(input) {\n var output = [];\n var length32 = input.length * 32;\n var hexTab = '0123456789abcdef';\n\n for (var i = 0; i < length32; i += 8) {\n var x = input[i >> 5] >>> i % 32 & 0xff;\n var hex = parseInt(hexTab.charAt(x >>> 4 & 0x0f) + hexTab.charAt(x & 0x0f), 16);\n output.push(hex);\n }\n\n return output;\n}\n/**\n * Calculate output length with padding and bit length\n */\n\n\nfunction getOutputLength(inputLength8) {\n return (inputLength8 + 64 >>> 9 << 4) + 14 + 1;\n}\n/*\n * Calculate the MD5 of an array of little-endian words, and a bit length.\n */\n\n\nfunction wordsToMd5(x, len) {\n /* append padding */\n x[len >> 5] |= 0x80 << len % 32;\n x[getOutputLength(len) - 1] = len;\n var a = 1732584193;\n var b = -271733879;\n var c = -1732584194;\n var d = 271733878;\n\n for (var i = 0; i < x.length; i += 16) {\n var olda = a;\n var oldb = b;\n var oldc = c;\n var oldd = d;\n a = md5ff(a, b, c, d, x[i], 7, -680876936);\n d = md5ff(d, a, b, c, x[i + 1], 12, -389564586);\n c = md5ff(c, d, a, b, x[i + 2], 17, 606105819);\n b = md5ff(b, c, d, a, x[i + 3], 22, -1044525330);\n a = md5ff(a, b, c, d, x[i + 4], 7, -176418897);\n d = md5ff(d, a, b, c, x[i + 5], 12, 1200080426);\n c = md5ff(c, d, a, b, x[i + 6], 17, -1473231341);\n b = md5ff(b, c, d, a, x[i + 7], 22, -45705983);\n a = md5ff(a, b, c, d, x[i + 8], 7, 1770035416);\n d = md5ff(d, a, b, c, x[i + 9], 12, -1958414417);\n c = md5ff(c, d, a, b, x[i + 10], 17, -42063);\n b = md5ff(b, c, d, a, x[i + 11], 22, -1990404162);\n a = md5ff(a, b, c, d, x[i + 12], 7, 1804603682);\n d = md5ff(d, a, b, c, x[i + 13], 12, -40341101);\n c = md5ff(c, d, a, b, x[i + 14], 17, -1502002290);\n b = md5ff(b, c, d, a, x[i + 15], 22, 1236535329);\n a = md5gg(a, b, c, d, x[i + 1], 5, -165796510);\n d = md5gg(d, a, b, c, x[i + 6], 9, -1069501632);\n c = md5gg(c, d, a, b, x[i + 11], 14, 643717713);\n b = md5gg(b, c, d, a, x[i], 20, -373897302);\n a = md5gg(a, b, c, d, x[i + 5], 5, -701558691);\n d = md5gg(d, a, b, c, x[i + 10], 9, 38016083);\n c = md5gg(c, d, a, b, x[i + 15], 14, -660478335);\n b = md5gg(b, c, d, a, x[i + 4], 20, -405537848);\n a = md5gg(a, b, c, d, x[i + 9], 5, 568446438);\n d = md5gg(d, a, b, c, x[i + 14], 9, -1019803690);\n c = md5gg(c, d, a, b, x[i + 3], 14, -187363961);\n b = md5gg(b, c, d, a, x[i + 8], 20, 1163531501);\n a = md5gg(a, b, c, d, x[i + 13], 5, -1444681467);\n d = md5gg(d, a, b, c, x[i + 2], 9, -51403784);\n c = md5gg(c, d, a, b, x[i + 7], 14, 1735328473);\n b = md5gg(b, c, d, a, x[i + 12], 20, -1926607734);\n a = md5hh(a, b, c, d, x[i + 5], 4, -378558);\n d = md5hh(d, a, b, c, x[i + 8], 11, -2022574463);\n c = md5hh(c, d, a, b, x[i + 11], 16, 1839030562);\n b = md5hh(b, c, d, a, x[i + 14], 23, -35309556);\n a = md5hh(a, b, c, d, x[i + 1], 4, -1530992060);\n d = md5hh(d, a, b, c, x[i + 4], 11, 1272893353);\n c = md5hh(c, d, a, b, x[i + 7], 16, -155497632);\n b = md5hh(b, c, d, a, x[i + 10], 23, -1094730640);\n a = md5hh(a, b, c, d, x[i + 13], 4, 681279174);\n d = md5hh(d, a, b, c, x[i], 11, -358537222);\n c = md5hh(c, d, a, b, x[i + 3], 16, -722521979);\n b = md5hh(b, c, d, a, x[i + 6], 23, 76029189);\n a = md5hh(a, b, c, d, x[i + 9], 4, -640364487);\n d = md5hh(d, a, b, c, x[i + 12], 11, -421815835);\n c = md5hh(c, d, a, b, x[i + 15], 16, 530742520);\n b = md5hh(b, c, d, a, x[i + 2], 23, -995338651);\n a = md5ii(a, b, c, d, x[i], 6, -198630844);\n d = md5ii(d, a, b, c, x[i + 7], 10, 1126891415);\n c = md5ii(c, d, a, b, x[i + 14], 15, -1416354905);\n b = md5ii(b, c, d, a, x[i + 5], 21, -57434055);\n a = md5ii(a, b, c, d, x[i + 12], 6, 1700485571);\n d = md5ii(d, a, b, c, x[i + 3], 10, -1894986606);\n c = md5ii(c, d, a, b, x[i + 10], 15, -1051523);\n b = md5ii(b, c, d, a, x[i + 1], 21, -2054922799);\n a = md5ii(a, b, c, d, x[i + 8], 6, 1873313359);\n d = md5ii(d, a, b, c, x[i + 15], 10, -30611744);\n c = md5ii(c, d, a, b, x[i + 6], 15, -1560198380);\n b = md5ii(b, c, d, a, x[i + 13], 21, 1309151649);\n a = md5ii(a, b, c, d, x[i + 4], 6, -145523070);\n d = md5ii(d, a, b, c, x[i + 11], 10, -1120210379);\n c = md5ii(c, d, a, b, x[i + 2], 15, 718787259);\n b = md5ii(b, c, d, a, x[i + 9], 21, -343485551);\n a = safeAdd(a, olda);\n b = safeAdd(b, oldb);\n c = safeAdd(c, oldc);\n d = safeAdd(d, oldd);\n }\n\n return [a, b, c, d];\n}\n/*\n * Convert an array bytes to an array of little-endian words\n * Characters >255 have their high-byte silently ignored.\n */\n\n\nfunction bytesToWords(input) {\n if (input.length === 0) {\n return [];\n }\n\n var length8 = input.length * 8;\n var output = new Uint32Array(getOutputLength(length8));\n\n for (var i = 0; i < length8; i += 8) {\n output[i >> 5] |= (input[i / 8] & 0xff) << i % 32;\n }\n\n return output;\n}\n/*\n * Add integers, wrapping at 2^32. This uses 16-bit operations internally\n * to work around bugs in some JS interpreters.\n */\n\n\nfunction safeAdd(x, y) {\n var lsw = (x & 0xffff) + (y & 0xffff);\n var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n return msw << 16 | lsw & 0xffff;\n}\n/*\n * Bitwise rotate a 32-bit number to the left.\n */\n\n\nfunction bitRotateLeft(num, cnt) {\n return num << cnt | num >>> 32 - cnt;\n}\n/*\n * These functions implement the four basic operations the algorithm uses.\n */\n\n\nfunction md5cmn(q, a, b, x, s, t) {\n return safeAdd(bitRotateLeft(safeAdd(safeAdd(a, q), safeAdd(x, t)), s), b);\n}\n\nfunction md5ff(a, b, c, d, x, s, t) {\n return md5cmn(b & c | ~b & d, a, b, x, s, t);\n}\n\nfunction md5gg(a, b, c, d, x, s, t) {\n return md5cmn(b & d | c & ~d, a, b, x, s, t);\n}\n\nfunction md5hh(a, b, c, d, x, s, t) {\n return md5cmn(b ^ c ^ d, a, b, x, s, t);\n}\n\nfunction md5ii(a, b, c, d, x, s, t) {\n return md5cmn(c ^ (b | ~d), a, b, x, s, t);\n}\n\nexport default md5;","export default '00000000-0000-0000-0000-000000000000';","import validate from './validate.js';\n\nfunction parse(uuid) {\n if (!validate(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n var v;\n var arr = new Uint8Array(16); // Parse ########-....-....-....-............\n\n arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24;\n arr[1] = v >>> 16 & 0xff;\n arr[2] = v >>> 8 & 0xff;\n arr[3] = v & 0xff; // Parse ........-####-....-....-............\n\n arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8;\n arr[5] = v & 0xff; // Parse ........-....-####-....-............\n\n arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8;\n arr[7] = v & 0xff; // Parse ........-....-....-####-............\n\n arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8;\n arr[9] = v & 0xff; // Parse ........-....-....-....-############\n // (Use \"/\" to avoid 32-bit truncation when bit-shifting high-order bytes)\n\n arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff;\n arr[11] = v / 0x100000000 & 0xff;\n arr[12] = v >>> 24 & 0xff;\n arr[13] = v >>> 16 & 0xff;\n arr[14] = v >>> 8 & 0xff;\n arr[15] = v & 0xff;\n return arr;\n}\n\nexport default parse;","export default /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;","// Unique ID creation requires a high quality random # generator. In the browser we therefore\n// require the crypto API and do not support built-in fallback to lower quality random number\n// generators (like Math.random()).\nvar getRandomValues;\nvar rnds8 = new Uint8Array(16);\nexport default function rng() {\n // lazy load so that environments that need to polyfill have a chance to do so\n if (!getRandomValues) {\n // getRandomValues needs to be invoked in a context where \"this\" is a Crypto implementation. Also,\n // find the complete implementation of crypto (msCrypto) on IE11.\n getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto !== 'undefined' && typeof msCrypto.getRandomValues === 'function' && msCrypto.getRandomValues.bind(msCrypto);\n\n if (!getRandomValues) {\n throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');\n }\n }\n\n return getRandomValues(rnds8);\n}","// Adapted from Chris Veness' SHA1 code at\n// http://www.movable-type.co.uk/scripts/sha1.html\nfunction f(s, x, y, z) {\n switch (s) {\n case 0:\n return x & y ^ ~x & z;\n\n case 1:\n return x ^ y ^ z;\n\n case 2:\n return x & y ^ x & z ^ y & z;\n\n case 3:\n return x ^ y ^ z;\n }\n}\n\nfunction ROTL(x, n) {\n return x << n | x >>> 32 - n;\n}\n\nfunction sha1(bytes) {\n var K = [0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xca62c1d6];\n var H = [0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0];\n\n if (typeof bytes === 'string') {\n var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape\n\n bytes = [];\n\n for (var i = 0; i < msg.length; ++i) {\n bytes.push(msg.charCodeAt(i));\n }\n } else if (!Array.isArray(bytes)) {\n // Convert Array-like to Array\n bytes = Array.prototype.slice.call(bytes);\n }\n\n bytes.push(0x80);\n var l = bytes.length / 4 + 2;\n var N = Math.ceil(l / 16);\n var M = new Array(N);\n\n for (var _i = 0; _i < N; ++_i) {\n var arr = new Uint32Array(16);\n\n for (var j = 0; j < 16; ++j) {\n arr[j] = bytes[_i * 64 + j * 4] << 24 | bytes[_i * 64 + j * 4 + 1] << 16 | bytes[_i * 64 + j * 4 + 2] << 8 | bytes[_i * 64 + j * 4 + 3];\n }\n\n M[_i] = arr;\n }\n\n M[N - 1][14] = (bytes.length - 1) * 8 / Math.pow(2, 32);\n M[N - 1][14] = Math.floor(M[N - 1][14]);\n M[N - 1][15] = (bytes.length - 1) * 8 & 0xffffffff;\n\n for (var _i2 = 0; _i2 < N; ++_i2) {\n var W = new Uint32Array(80);\n\n for (var t = 0; t < 16; ++t) {\n W[t] = M[_i2][t];\n }\n\n for (var _t = 16; _t < 80; ++_t) {\n W[_t] = ROTL(W[_t - 3] ^ W[_t - 8] ^ W[_t - 14] ^ W[_t - 16], 1);\n }\n\n var a = H[0];\n var b = H[1];\n var c = H[2];\n var d = H[3];\n var e = H[4];\n\n for (var _t2 = 0; _t2 < 80; ++_t2) {\n var s = Math.floor(_t2 / 20);\n var T = ROTL(a, 5) + f(s, b, c, d) + e + K[s] + W[_t2] >>> 0;\n e = d;\n d = c;\n c = ROTL(b, 30) >>> 0;\n b = a;\n a = T;\n }\n\n H[0] = H[0] + a >>> 0;\n H[1] = H[1] + b >>> 0;\n H[2] = H[2] + c >>> 0;\n H[3] = H[3] + d >>> 0;\n H[4] = H[4] + e >>> 0;\n }\n\n return [H[0] >> 24 & 0xff, H[0] >> 16 & 0xff, H[0] >> 8 & 0xff, H[0] & 0xff, H[1] >> 24 & 0xff, H[1] >> 16 & 0xff, H[1] >> 8 & 0xff, H[1] & 0xff, H[2] >> 24 & 0xff, H[2] >> 16 & 0xff, H[2] >> 8 & 0xff, H[2] & 0xff, H[3] >> 24 & 0xff, H[3] >> 16 & 0xff, H[3] >> 8 & 0xff, H[3] & 0xff, H[4] >> 24 & 0xff, H[4] >> 16 & 0xff, H[4] >> 8 & 0xff, H[4] & 0xff];\n}\n\nexport default sha1;","import validate from './validate.js';\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\n\nvar byteToHex = [];\n\nfor (var i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).substr(1));\n}\n\nfunction stringify(arr) {\n var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n var uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!validate(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n\n return uuid;\n}\n\nexport default stringify;","import rng from './rng.js';\nimport stringify from './stringify.js'; // **`v1()` - Generate time-based UUID**\n//\n// Inspired by https://github.com/LiosK/UUID.js\n// and http://docs.python.org/library/uuid.html\n\nvar _nodeId;\n\nvar _clockseq; // Previous uuid creation time\n\n\nvar _lastMSecs = 0;\nvar _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details\n\nfunction v1(options, buf, offset) {\n var i = buf && offset || 0;\n var b = buf || new Array(16);\n options = options || {};\n var node = options.node || _nodeId;\n var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not\n // specified. We do this lazily to minimize issues related to insufficient\n // system entropy. See #189\n\n if (node == null || clockseq == null) {\n var seedBytes = options.random || (options.rng || rng)();\n\n if (node == null) {\n // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)\n node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]];\n }\n\n if (clockseq == null) {\n // Per 4.2.2, randomize (14 bit) clockseq\n clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;\n }\n } // UUID timestamps are 100 nano-second units since the Gregorian epoch,\n // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so\n // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'\n // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.\n\n\n var msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock\n // cycle to simulate higher resolution clock\n\n var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs)\n\n var dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression\n\n if (dt < 0 && options.clockseq === undefined) {\n clockseq = clockseq + 1 & 0x3fff;\n } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new\n // time interval\n\n\n if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {\n nsecs = 0;\n } // Per 4.2.1.2 Throw error if too many uuids are requested\n\n\n if (nsecs >= 10000) {\n throw new Error(\"uuid.v1(): Can't create more than 10M uuids/sec\");\n }\n\n _lastMSecs = msecs;\n _lastNSecs = nsecs;\n _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch\n\n msecs += 12219292800000; // `time_low`\n\n var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;\n b[i++] = tl >>> 24 & 0xff;\n b[i++] = tl >>> 16 & 0xff;\n b[i++] = tl >>> 8 & 0xff;\n b[i++] = tl & 0xff; // `time_mid`\n\n var tmh = msecs / 0x100000000 * 10000 & 0xfffffff;\n b[i++] = tmh >>> 8 & 0xff;\n b[i++] = tmh & 0xff; // `time_high_and_version`\n\n b[i++] = tmh >>> 24 & 0xf | 0x10; // include version\n\n b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)\n\n b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low`\n\n b[i++] = clockseq & 0xff; // `node`\n\n for (var n = 0; n < 6; ++n) {\n b[i + n] = node[n];\n }\n\n return buf || stringify(b);\n}\n\nexport default v1;","import v35 from './v35.js';\nimport md5 from './md5.js';\nvar v3 = v35('v3', 0x30, md5);\nexport default v3;","import stringify from './stringify.js';\nimport parse from './parse.js';\n\nfunction stringToBytes(str) {\n str = unescape(encodeURIComponent(str)); // UTF8 escape\n\n var bytes = [];\n\n for (var i = 0; i < str.length; ++i) {\n bytes.push(str.charCodeAt(i));\n }\n\n return bytes;\n}\n\nexport var DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8';\nexport var URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8';\nexport default function (name, version, hashfunc) {\n function generateUUID(value, namespace, buf, offset) {\n if (typeof value === 'string') {\n value = stringToBytes(value);\n }\n\n if (typeof namespace === 'string') {\n namespace = parse(namespace);\n }\n\n if (namespace.length !== 16) {\n throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)');\n } // Compute hash of namespace and value, Per 4.3\n // Future: Use spread syntax when supported on all platforms, e.g. `bytes =\n // hashfunc([...namespace, ... value])`\n\n\n var bytes = new Uint8Array(16 + value.length);\n bytes.set(namespace);\n bytes.set(value, namespace.length);\n bytes = hashfunc(bytes);\n bytes[6] = bytes[6] & 0x0f | version;\n bytes[8] = bytes[8] & 0x3f | 0x80;\n\n if (buf) {\n offset = offset || 0;\n\n for (var i = 0; i < 16; ++i) {\n buf[offset + i] = bytes[i];\n }\n\n return buf;\n }\n\n return stringify(bytes);\n } // Function#name is not settable on some platforms (#270)\n\n\n try {\n generateUUID.name = name; // eslint-disable-next-line no-empty\n } catch (err) {} // For CommonJS default export support\n\n\n generateUUID.DNS = DNS;\n generateUUID.URL = URL;\n return generateUUID;\n}","import rng from './rng.js';\nimport stringify from './stringify.js';\n\nfunction v4(options, buf, offset) {\n options = options || {};\n var rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n offset = offset || 0;\n\n for (var i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n\n return buf;\n }\n\n return stringify(rnds);\n}\n\nexport default v4;","import v35 from './v35.js';\nimport sha1 from './sha1.js';\nvar v5 = v35('v5', 0x50, sha1);\nexport default v5;","import REGEX from './regex.js';\n\nfunction validate(uuid) {\n return typeof uuid === 'string' && REGEX.test(uuid);\n}\n\nexport default validate;","import validate from './validate.js';\n\nfunction version(uuid) {\n if (!validate(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n return parseInt(uuid.substr(14, 1), 16);\n}\n\nexport default version;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = (module) => {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","import type { Context } from \"@finos/fdc3\";\nimport { init } from \"../platform/api\";\n\nwindow.addEventListener(\"DOMContentLoaded\", async () => {\n\tawait init(true);\n\tawait initializeDOM();\n});\n\n/**\n * Broadcasts a context using FDC3.\n */\nasync function broadcastContext(): Promise {\n\tconst contextType = \"fdc3.instrument\";\n\tconst contextName = \"Apple\";\n\tconst idData = {\n\t\tticker: \"AAPL\"\n\t};\n\tconst context = {\n\t\ttype: contextType,\n\t\tname: contextName,\n\t\tid: idData\n\t};\n\tif (window.fdc3) {\n\t\tawait window.fdc3.broadcast(context);\n\t\tconsole.log(`Broadcasted context: ${contextType} - ${contextName}`);\n\t} else {\n\t\twindow.addEventListener(\"fdc3Ready\", async () => {\n\t\t\tawait window.fdc3.broadcast(context);\n\t\t\tconsole.log(`Broadcasted context: ${contextType} - ${contextName}`);\n\t\t});\n\t}\n}\n\n/**\n * Adds an FDC3 context listener to the window.\n */\nasync function addFDC3Listener(): Promise {\n\tif (window.fdc3) {\n\t\tawait window.fdc3.addContextListener(null, (context) => {\n\t\t\tupdateDOMElements(context);\n\t\t});\n\t} else {\n\t\twindow.addEventListener(\"fdc3Ready\", async () => {\n\t\t\tawait window.fdc3.addContextListener(null, (context) => {\n\t\t\t\tupdateDOMElements(context);\n\t\t\t});\n\t\t});\n\t}\n}\n\n/**\n * Updates the DOM elements with the provided context.\n * @param context The context to update the DOM elements with.\n */\nfunction updateDOMElements(context: Context): void {\n\tconst contextTypeSpan = document.querySelector(\"#contextType\");\n\tconst contextNameSpan = document.querySelector(\"#contextName\");\n\tconst contextBodyPre = document.querySelector(\"#contextBody\");\n\n\tif (contextTypeSpan !== null && contextNameSpan !== null && contextBodyPre !== null) {\n\t\tcontextTypeSpan.textContent = context.type;\n\t\tcontextNameSpan.textContent = context.name ?? \"No name provided.\";\n\t\tcontextBodyPre.textContent = JSON.stringify(context, null, 2);\n\t}\n}\n\n/**\n * Initialize the DOM elements.\n */\nasync function initializeDOM(): Promise {\n\tconst broadcastButton = document.querySelector(\"#broadcast\");\n\n\tif (broadcastButton !== null) {\n\t\tbroadcastButton.addEventListener(\"click\", async () => {\n\t\t\tawait broadcastContext();\n\t\t});\n\t}\n\n\tawait addFDC3Listener();\n}\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/web/v19.2.0/web-interop/js/iframe-broker.bundle.js b/web/v19.2.0/web-interop/js/iframe-broker.bundle.js index db83fa5..4ccf924 100644 --- a/web/v19.2.0/web-interop/js/iframe-broker.bundle.js +++ b/web/v19.2.0/web-interop/js/iframe-broker.bundle.js @@ -2,10 +2,10 @@ /******/ "use strict"; /******/ var __webpack_modules__ = ({ -/***/ "./node_modules/@openfin/core-web/out/iframe-broker.js": -/*!*************************************************************!*\ - !*** ./node_modules/@openfin/core-web/out/iframe-broker.js ***! - \*************************************************************/ +/***/ "../../node_modules/@openfin/core-web/out/iframe-broker.js": +/*!*****************************************************************!*\ + !*** ../../node_modules/@openfin/core-web/out/iframe-broker.js ***! + \*****************************************************************/ /***/ ((__unused_webpack_module, exports) => { const e="web-broker-ports-ready",t="worker-initialize-connection",i="create-fallback-connection",r="request-fallback-connection",n=e=>`ack-${e}`,o=(...e)=>({log:(...t)=>console.debug(`[${(new Date).toISOString()}]`,...(e=>e.map((e=>`[${e}]`)))(e),...t),getLogger:(...t)=>o(...e,...t)}),s=e=>window.top===e,a=(e,t)=>{try{return e.origin===t.origin}catch(e){return!1}},c="openfin/web-shared-worker";class d{static get lockApi(){return navigator.locks}constructor(e){this.name=e,this.releaseCallback=null,d.pending.add(this),this.lockAcquiredPromise=new Promise(((e,t)=>{this.lockReleasedPromise=d.lockApi.request(this.name,(()=>(d.pending.delete(this),e(),new Promise((e=>{d.held.add(this),this.releaseCallback=e}))))).catch((e=>{throw t(e),e}))}))}async acquired(){await this.lockAcquiredPromise}async release(){if(!this.releaseCallback)throw new Error(`Lock ${this.name} not acquired.`);this.releaseCallback(),this.releaseCallback=null,await this.lockReleasedPromise,d.held.delete(this)}async onReleased(e){if(!this.lockReleasedPromise)throw new Error(`Lock ${this.name} not queued.`);return this.lockReleasedPromise.then(e)}autoRelease(){this.acquired().then((()=>this.release()))}static async releaseAll(){const e=Promise.all([...this.pending].map((async e=>{await e.acquired(),await e.release()})));await Promise.all([...this.held].map((async e=>{await e.release()}))),await e}}d.pending=new Set,d.held=new Set;class l{constructor(e=100,t=2){this.pingIntervalMs=e,this.allowedMissedPings=t,this.lockSelf=async e=>{const t=new d((e=>`__OPENFIN__${e.uuid}_${e.name}`)(e));return await t.acquired(),t}}async lockProxiedConnection(e,t){let i=0;t.addEventListener("message",(e=>{"pong"===e.data.topic&&i--}));const r=await this.lockSelf(e);let n=setInterval((()=>{i>=this.allowedMissedPings?(r.release(),clearInterval(n)):(i++,t.postMessage({topic:"ping"}))}),this.pingIntervalMs);t.start()}registerProxiedConnection(e){e.addEventListener("message",(t=>{"ping"===t.data.topic&&e.postMessage({topic:"pong"})})),e.start()}}class h{constructor(e,t,o){this.workerUrl=e,this.iframeWindow=t,this.forceWorker=o,this.identityDisconnectionController=new l,this.isSharedWorkerSupported=()=>!this.forceWorker&&!!window.SharedWorker,this.state="ready",this.establishWorkerConnectionViaWindow=async(e,t)=>{if(a(this.iframeWindow,e)){const o=new MessageChannel,s=new MessageChannel;return this.identityDisconnectionController.registerProxiedConnection(s.port1),new Promise(((a,c)=>{o.port1.addEventListener("message",(e=>{e.data.topic===n(i)&&(e.data.success?a(o.port1):c(e.data.reason))})),o.port1.start();const d={topic:r,payload:{identity:t}};e.postMessage(d,location.origin,[o.port2,s.port2])}))}throw new Error("Could not connect via top level browsing context as its origin does not much the web interop broker.")},this.listenForNestedConnections=e=>{"top-window"===this.state&&a(this.iframeWindow,this.iframeWindow.parent)&&this.iframeWindow.parent.addEventListener("message",(async t=>{const{data:n}=t;if(t.origin===location.origin&&n.topic===r){const[r,...o]=t.ports;if(o.length>0&&n.payload?.identity){const[e]=o;await this.identityDisconnectionController.lockProxiedConnection(n.payload.identity,e)}const s={topic:i};e.postMessage(s,[r])}}))},this.initialize=async e=>{if("ready"!==this.state)throw new Error("Worker connection already initialized");return(e=>{const t=i=>!(!(e=>{try{return!e.origin}catch(e){return!0}})(i)&&i.origin===e.origin)||!s(i)&&t(i.parent);return!s(e)&&t(e.parent)})(this.iframeWindow)&&a(this.iframeWindow,this.iframeWindow.top)?this.state="partitioned-frame":s(this.iframeWindow.parent)?this.state="top-window":this.state="frame",this.connect(e)}}async connect(e){if("ready"===this.state)throw new Error("Must call initialize before connect");switch(this.state){case"partitioned-frame":return this.establishWorkerConnectionViaWindow(this.iframeWindow.top,e);case"top-window":{let t;return t=this.isSharedWorkerSupported()?new SharedWorker(this.workerUrl,c).port:new Worker(this.workerUrl),await this.identityDisconnectionController.lockSelf(e),this.listenForNestedConnections(t),t}case"frame":{if(!this.isSharedWorkerSupported())try{return await this.establishWorkerConnectionViaWindow(this.iframeWindow.top,e)}catch(e){throw new Error(`SharedWorker is not supported and an unexpected error occured when trying to connect via fallback mechanism: ${e.message}`,{cause:e})}await this.identityDisconnectionController.lockSelf(e);const{port:t}=new SharedWorker(this.workerUrl,c);return t}default:throw this.state,new Error(`Invalid state: ${this.state}`)}}}const w=o("@openfin/core-web/iframe-broker"),p=()=>{const e=((e,t)=>{const i=new RegExp(`^${t}<(?.*)>$`).exec(e)?.groups?.meta;if(i)try{return JSON.parse(atob(i))}catch(e){throw new Error(`Failed to decode JSON from ${i}.`)}})(window.name,"of-broker");if(!e)throw new Error("Invalid or missing identity string in iframe context. Ensure that this iframe is being renderered via the @openfin/core-web library.");return e};function g(t){const i={topic:n(e),success:!1,reason:t?.reason??"Connection Rejected"};window.parent.postMessage(i,"*")}exports.init=async i=>{try{const{sharedWorkerUrl:r}=i;await("loading"===document.readyState?new Promise((e=>{const t=()=>{e(),window.removeEventListener("DOMContentLoaded",t)};window.addEventListener("DOMContentLoaded",t)})):Promise.resolve());const o=p(),s=new h(r,window,"same-site"!==i.experimental?.crossTab),a=await s.initialize(o);w.log(`Loading ${r} in ${s.state} mode...`);const c=await(async(i,r,o)=>{const s=new MessageChannel,a=new MessageChannel,c={topic:t,payload:{identity:o}};await new Promise(((e,i)=>{r.addEventListener("message",(r=>{r.data.topic===n(t)&&(r.data.success?e():i(new Error(r.data.reason)))})),r.start?.(),r.postMessage(c,[a.port2])}));const d={topic:n(e),success:!0,payload:{identity:o}};return i.postMessage(d,"*",[s.port2,a.port1]),s.port1})(window.parent,a,o);c.start(),a.start?.(),w.log(`Port transfer complete in ${s.state} mode. Connection established with identity ${JSON.stringify(o)}. SharedWorker support=${s.isSharedWorkerSupported()}`)}catch(e){const t=new Error(`An unexpected error occured during initialization. ${e.message}`);g({reason:t.message}),console.error(t)}},exports.rejectConnections=g; @@ -96,7 +96,7 @@ async function getManifestSettings() { /******/ /************************************************************************/ var __webpack_exports__ = {}; -// This entry need to be wrapped in an IIFE because it uses a non-standard name for the exports (exports). +// This entry needs to be wrapped in an IIFE because it needs to be isolated against other modules in the chunk. (() => { var exports = __webpack_exports__; /*!**********************************************!*\ @@ -104,7 +104,7 @@ var exports = __webpack_exports__; \**********************************************/ Object.defineProperty(exports, "__esModule", ({ value: true })); -const iframe_broker_1 = __webpack_require__(/*! @openfin/core-web/iframe-broker */ "./node_modules/@openfin/core-web/out/iframe-broker.js"); +const iframe_broker_1 = __webpack_require__(/*! @openfin/core-web/iframe-broker */ "../../node_modules/@openfin/core-web/out/iframe-broker.js"); const settings_1 = __webpack_require__(/*! ./settings */ "./client/src/platform/settings.ts"); /** * Initializes the OpenFin Web Broker connection. diff --git a/web/v19.2.0/web-interop/js/iframe-broker.bundle.js.map b/web/v19.2.0/web-interop/js/iframe-broker.bundle.js.map index e7597e7..082f68a 100644 --- a/web/v19.2.0/web-interop/js/iframe-broker.bundle.js.map +++ b/web/v19.2.0/web-interop/js/iframe-broker.bundle.js.map @@ -1 +1 @@ -{"version":3,"file":"iframe-broker.bundle.js","mappings":";;;;;;;;;;AAAa,6IAA6I,EAAE,cAAc,8BAA8B,yBAAyB,wBAAwB,EAAE,8CAA8C,gCAAgC,IAAI,2BAA2B,SAAS,UAAU,+BAA+B,QAAQ,qBAAqB,uBAAuB,eAAe,wGAAwG,uGAAuG,wCAAwC,iBAAiB,aAAa,GAAG,GAAG,iBAAiB,+BAA+B,gBAAgB,iDAAiD,WAAW,gBAAgB,oGAAoG,oBAAoB,qDAAqD,WAAW,cAAc,wCAAwC,cAAc,2CAA2C,0BAA0B,qDAAqD,qCAAqC,IAAI,gDAAgD,kBAAkB,aAAa,iCAAiC,QAAQ,uBAAuB,wEAAwE,gCAAgC,OAAO,GAAG,OAAO,OAAO,6BAA6B,iCAAiC,QAAQ,kCAAkC,2BAA2B,GAAG,+BAA+B,wBAAwB,8EAA8E,aAAa,GAAG,uBAAuB,UAAU,6BAA6B,kCAAkC,sCAAsC,aAAa,EAAE,cAAc,QAAQ,mBAAmB,qPAAqP,2BAA2B,gDAAgD,oGAAoG,wCAAwC,kEAAkE,mBAAmB,SAAS,iBAAiB,aAAa,mDAAmD,GAAG,wHAAwH,qCAAqC,yIAAyI,MAAM,OAAO,GAAG,4CAA4C,sBAAsB,oCAAoC,WAAW,uFAAuF,SAAS,SAAS,sBAAsB,GAAG,2BAA2B,iFAAiF,WAAW,mBAAmB,IAAI,gBAAgB,SAAS,UAAU,+CAA+C,yBAAyB,wLAAwL,iBAAiB,+EAA+E,mBAAmB,gGAAgG,kBAAkB,MA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O,IAAI,CAAC;AACb,CAAC,CAAC;KACD,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC","sources":["webpack://openfin-web--web-interop/./node_modules/@openfin/core-web/out/iframe-broker.js","webpack://openfin-web--web-interop/./client/src/platform/settings.ts","webpack://openfin-web--web-interop/webpack/bootstrap","webpack://openfin-web--web-interop/./client/src/platform/iframe-broker.ts"],"sourcesContent":["\"use strict\";const e=\"web-broker-ports-ready\",t=\"worker-initialize-connection\",i=\"create-fallback-connection\",r=\"request-fallback-connection\",n=e=>`ack-${e}`,o=(...e)=>({log:(...t)=>console.debug(`[${(new Date).toISOString()}]`,...(e=>e.map((e=>`[${e}]`)))(e),...t),getLogger:(...t)=>o(...e,...t)}),s=e=>window.top===e,a=(e,t)=>{try{return e.origin===t.origin}catch(e){return!1}},c=\"openfin/web-shared-worker\";class d{static get lockApi(){return navigator.locks}constructor(e){this.name=e,this.releaseCallback=null,d.pending.add(this),this.lockAcquiredPromise=new Promise(((e,t)=>{this.lockReleasedPromise=d.lockApi.request(this.name,(()=>(d.pending.delete(this),e(),new Promise((e=>{d.held.add(this),this.releaseCallback=e}))))).catch((e=>{throw t(e),e}))}))}async acquired(){await this.lockAcquiredPromise}async release(){if(!this.releaseCallback)throw new Error(`Lock ${this.name} not acquired.`);this.releaseCallback(),this.releaseCallback=null,await this.lockReleasedPromise,d.held.delete(this)}async onReleased(e){if(!this.lockReleasedPromise)throw new Error(`Lock ${this.name} not queued.`);return this.lockReleasedPromise.then(e)}autoRelease(){this.acquired().then((()=>this.release()))}static async releaseAll(){const e=Promise.all([...this.pending].map((async e=>{await e.acquired(),await e.release()})));await Promise.all([...this.held].map((async e=>{await e.release()}))),await e}}d.pending=new Set,d.held=new Set;class l{constructor(e=100,t=2){this.pingIntervalMs=e,this.allowedMissedPings=t,this.lockSelf=async e=>{const t=new d((e=>`__OPENFIN__${e.uuid}_${e.name}`)(e));return await t.acquired(),t}}async lockProxiedConnection(e,t){let i=0;t.addEventListener(\"message\",(e=>{\"pong\"===e.data.topic&&i--}));const r=await this.lockSelf(e);let n=setInterval((()=>{i>=this.allowedMissedPings?(r.release(),clearInterval(n)):(i++,t.postMessage({topic:\"ping\"}))}),this.pingIntervalMs);t.start()}registerProxiedConnection(e){e.addEventListener(\"message\",(t=>{\"ping\"===t.data.topic&&e.postMessage({topic:\"pong\"})})),e.start()}}class h{constructor(e,t,o){this.workerUrl=e,this.iframeWindow=t,this.forceWorker=o,this.identityDisconnectionController=new l,this.isSharedWorkerSupported=()=>!this.forceWorker&&!!window.SharedWorker,this.state=\"ready\",this.establishWorkerConnectionViaWindow=async(e,t)=>{if(a(this.iframeWindow,e)){const o=new MessageChannel,s=new MessageChannel;return this.identityDisconnectionController.registerProxiedConnection(s.port1),new Promise(((a,c)=>{o.port1.addEventListener(\"message\",(e=>{e.data.topic===n(i)&&(e.data.success?a(o.port1):c(e.data.reason))})),o.port1.start();const d={topic:r,payload:{identity:t}};e.postMessage(d,location.origin,[o.port2,s.port2])}))}throw new Error(\"Could not connect via top level browsing context as its origin does not much the web interop broker.\")},this.listenForNestedConnections=e=>{\"top-window\"===this.state&&a(this.iframeWindow,this.iframeWindow.parent)&&this.iframeWindow.parent.addEventListener(\"message\",(async t=>{const{data:n}=t;if(t.origin===location.origin&&n.topic===r){const[r,...o]=t.ports;if(o.length>0&&n.payload?.identity){const[e]=o;await this.identityDisconnectionController.lockProxiedConnection(n.payload.identity,e)}const s={topic:i};e.postMessage(s,[r])}}))},this.initialize=async e=>{if(\"ready\"!==this.state)throw new Error(\"Worker connection already initialized\");return(e=>{const t=i=>!(!(e=>{try{return!e.origin}catch(e){return!0}})(i)&&i.origin===e.origin)||!s(i)&&t(i.parent);return!s(e)&&t(e.parent)})(this.iframeWindow)&&a(this.iframeWindow,this.iframeWindow.top)?this.state=\"partitioned-frame\":s(this.iframeWindow.parent)?this.state=\"top-window\":this.state=\"frame\",this.connect(e)}}async connect(e){if(\"ready\"===this.state)throw new Error(\"Must call initialize before connect\");switch(this.state){case\"partitioned-frame\":return this.establishWorkerConnectionViaWindow(this.iframeWindow.top,e);case\"top-window\":{let t;return t=this.isSharedWorkerSupported()?new SharedWorker(this.workerUrl,c).port:new Worker(this.workerUrl),await this.identityDisconnectionController.lockSelf(e),this.listenForNestedConnections(t),t}case\"frame\":{if(!this.isSharedWorkerSupported())try{return await this.establishWorkerConnectionViaWindow(this.iframeWindow.top,e)}catch(e){throw new Error(`SharedWorker is not supported and an unexpected error occured when trying to connect via fallback mechanism: ${e.message}`,{cause:e})}await this.identityDisconnectionController.lockSelf(e);const{port:t}=new SharedWorker(this.workerUrl,c);return t}default:throw this.state,new Error(`Invalid state: ${this.state}`)}}}const w=o(\"@openfin/core-web/iframe-broker\"),p=()=>{const e=((e,t)=>{const i=new RegExp(`^${t}<(?.*)>$`).exec(e)?.groups?.meta;if(i)try{return JSON.parse(atob(i))}catch(e){throw new Error(`Failed to decode JSON from ${i}.`)}})(window.name,\"of-broker\");if(!e)throw new Error(\"Invalid or missing identity string in iframe context. Ensure that this iframe is being renderered via the @openfin/core-web library.\");return e};function g(t){const i={topic:n(e),success:!1,reason:t?.reason??\"Connection Rejected\"};window.parent.postMessage(i,\"*\")}exports.init=async i=>{try{const{sharedWorkerUrl:r}=i;await(\"loading\"===document.readyState?new Promise((e=>{const t=()=>{e(),window.removeEventListener(\"DOMContentLoaded\",t)};window.addEventListener(\"DOMContentLoaded\",t)})):Promise.resolve());const o=p(),s=new h(r,window,\"same-site\"!==i.experimental?.crossTab),a=await s.initialize(o);w.log(`Loading ${r} in ${s.state} mode...`);const c=await(async(i,r,o)=>{const s=new MessageChannel,a=new MessageChannel,c={topic:t,payload:{identity:o}};await new Promise(((e,i)=>{r.addEventListener(\"message\",(r=>{r.data.topic===n(t)&&(r.data.success?e():i(new Error(r.data.reason)))})),r.start?.(),r.postMessage(c,[a.port2])}));const d={topic:n(e),success:!0,payload:{identity:o}};return i.postMessage(d,\"*\",[s.port2,a.port1]),s.port1})(window.parent,a,o);c.start(),a.start?.(),w.log(`Port transfer complete in ${s.state} mode. Connection established with identity ${JSON.stringify(o)}. SharedWorker support=${s.isSharedWorkerSupported()}`)}catch(e){const t=new Error(`An unexpected error occured during initialization. ${e.message}`);g({reason:t.message}),console.error(t)}},exports.rejectConnections=g;\n","import type { WebLayoutSnapshot } from \"@openfin/core-web\";\nimport type { Settings } from \"../shapes/setting-shapes\";\n\n/**\n * Fetches the settings for the application.\n * @returns The settings for the application.\n */\nexport async function getSettings(): Promise {\n\tconst settings = await getManifestSettings();\n\tif (settings === undefined) {\n\t\tconsole.error(\n\t\t\t\"Unable to run the example as settings are required and we fetch them from the link web manifest from the html page that is being served. It should exist in the customSettings section of the web manifest.\"\n\t\t);\n\t}\n\treturn settings;\n}\n\n/**\n * Returns a default layout from the settings if provided.\n * @returns The default layout from the settings.\n */\nexport async function getDefaultLayout(): Promise {\n\tconst settings = await getSettings();\n\tif (settings?.platform?.layout?.defaultLayout === undefined) {\n\t\tconsole.error(\n\t\t\t\"Unable to run the example as without a layout being defined. Please ensure that settings have been provided in the web manifest.\"\n\t\t);\n\t\treturn;\n\t}\n\tif (typeof settings.platform.layout.defaultLayout === \"string\") {\n\t\tconst layoutResponse = await fetch(settings.platform.layout.defaultLayout);\n\t\tconst layoutJson = (await layoutResponse.json()) as WebLayoutSnapshot;\n\t\treturn layoutJson;\n\t}\n\treturn settings.platform.layout.defaultLayout;\n}\n\n/**\n * Returns the settings from the manifest file.\n * @returns customSettings for this example\n */\nasync function getManifestSettings(): Promise {\n\t// Get the manifest link\n\tconst link = document.querySelector('link[rel=\"manifest\"]');\n\tif (link !== null) {\n\t\tconst manifestResponse = await fetch(link.href);\n\t\tconst manifestJson = (await manifestResponse.json()) as { custom_settings: Settings };\n\t\treturn manifestJson.custom_settings;\n\t}\n}\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","import { init as initBrokerConnection } from \"@openfin/core-web/iframe-broker\";\nimport { getSettings } from \"./settings\";\n\n/**\n * Initializes the OpenFin Web Broker connection.\n * @returns A promise that resolves when the connection is established.\n */\nasync function init(): Promise {\n\tconst settings = await getSettings();\n\tif (settings === undefined) {\n\t\tconsole.error(\n\t\t\t\"Unable to run the sample as we have been unable to load the web manifest and it's settings from the currently running html page. Please ensure that the web manifest is being served and that it contains the custom_settings section.\"\n\t\t);\n\t\treturn;\n\t}\n\treturn initBrokerConnection({\n\t\tsharedWorkerUrl: settings.platform.interop.sharedWorkerUrl\n\t});\n}\n\ninit()\n\t.then(() => {\n\t\tconsole.log(\"Connected to the OpenFin IFrame Web Broker.\");\n\t\treturn true;\n\t})\n\t.catch((err) => console.error(err));\n"],"names":[],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"iframe-broker.bundle.js","mappings":";;;;;;;;;;AAAa,6IAA6I,EAAE,cAAc,8BAA8B,yBAAyB,wBAAwB,EAAE,8CAA8C,gCAAgC,IAAI,2BAA2B,SAAS,UAAU,+BAA+B,QAAQ,qBAAqB,uBAAuB,eAAe,wGAAwG,uGAAuG,wCAAwC,iBAAiB,aAAa,GAAG,GAAG,iBAAiB,+BAA+B,gBAAgB,iDAAiD,WAAW,gBAAgB,oGAAoG,oBAAoB,qDAAqD,WAAW,cAAc,wCAAwC,cAAc,2CAA2C,0BAA0B,qDAAqD,qCAAqC,IAAI,gDAAgD,kBAAkB,aAAa,iCAAiC,QAAQ,uBAAuB,wEAAwE,gCAAgC,O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UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;;;;;;;;ACtBA,gJAA+E;AAC/E,8FAAyC;AAEzC;;;GAGG;AACH,KAAK,UAAU,IAAI;IAClB,MAAM,QAAQ,GAAG,MAAM,0BAAW,GAAE,CAAC;IACrC,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;QAC5B,OAAO,CAAC,KAAK,CACZ,wOAAwO,CACxO,CAAC;QACF,OAAO;IACR,CAAC;IACD,OAAO,wBAAoB,EAAC;QAC3B,eAAe,EAAE,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,eAAe;KAC1D,CAAC,CAAC;AACJ,CAAC;AAED,IAAI,EAAE;KACJ,IAAI,CAAC,GAAG,EAAE;IACV,OAAO,CAAC,GAAG,CAAC,6CAA6C,CAAC,CAAC;IAC3D,OAAO,IAAI,CAAC;AACb,CAAC,CAAC;KACD,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC","sources":["webpack://openfin-web--web-interop/../../node_modules/@openfin/core-web/out/iframe-broker.js","webpack://openfin-web--web-interop/./client/src/platform/settings.ts","webpack://openfin-web--web-interop/webpack/bootstrap","webpack://openfin-web--web-interop/./client/src/platform/iframe-broker.ts"],"sourcesContent":["\"use strict\";const e=\"web-broker-ports-ready\",t=\"worker-initialize-connection\",i=\"create-fallback-connection\",r=\"request-fallback-connection\",n=e=>`ack-${e}`,o=(...e)=>({log:(...t)=>console.debug(`[${(new Date).toISOString()}]`,...(e=>e.map((e=>`[${e}]`)))(e),...t),getLogger:(...t)=>o(...e,...t)}),s=e=>window.top===e,a=(e,t)=>{try{return e.origin===t.origin}catch(e){return!1}},c=\"openfin/web-shared-worker\";class d{static get lockApi(){return navigator.locks}constructor(e){this.name=e,this.releaseCallback=null,d.pending.add(this),this.lockAcquiredPromise=new Promise(((e,t)=>{this.lockReleasedPromise=d.lockApi.request(this.name,(()=>(d.pending.delete(this),e(),new Promise((e=>{d.held.add(this),this.releaseCallback=e}))))).catch((e=>{throw t(e),e}))}))}async acquired(){await this.lockAcquiredPromise}async release(){if(!this.releaseCallback)throw new Error(`Lock ${this.name} not acquired.`);this.releaseCallback(),this.releaseCallback=null,await this.lockReleasedPromise,d.held.delete(this)}async onReleased(e){if(!this.lockReleasedPromise)throw new Error(`Lock ${this.name} not queued.`);return this.lockReleasedPromise.then(e)}autoRelease(){this.acquired().then((()=>this.release()))}static async releaseAll(){const e=Promise.all([...this.pending].map((async e=>{await e.acquired(),await e.release()})));await Promise.all([...this.held].map((async e=>{await e.release()}))),await e}}d.pending=new Set,d.held=new Set;class l{constructor(e=100,t=2){this.pingIntervalMs=e,this.allowedMissedPings=t,this.lockSelf=async e=>{const t=new d((e=>`__OPENFIN__${e.uuid}_${e.name}`)(e));return await t.acquired(),t}}async lockProxiedConnection(e,t){let i=0;t.addEventListener(\"message\",(e=>{\"pong\"===e.data.topic&&i--}));const r=await this.lockSelf(e);let n=setInterval((()=>{i>=this.allowedMissedPings?(r.release(),clearInterval(n)):(i++,t.postMessage({topic:\"ping\"}))}),this.pingIntervalMs);t.start()}registerProxiedConnection(e){e.addEventListener(\"message\",(t=>{\"ping\"===t.data.topic&&e.postMessage({topic:\"pong\"})})),e.start()}}class h{constructor(e,t,o){this.workerUrl=e,this.iframeWindow=t,this.forceWorker=o,this.identityDisconnectionController=new l,this.isSharedWorkerSupported=()=>!this.forceWorker&&!!window.SharedWorker,this.state=\"ready\",this.establishWorkerConnectionViaWindow=async(e,t)=>{if(a(this.iframeWindow,e)){const o=new MessageChannel,s=new MessageChannel;return this.identityDisconnectionController.registerProxiedConnection(s.port1),new Promise(((a,c)=>{o.port1.addEventListener(\"message\",(e=>{e.data.topic===n(i)&&(e.data.success?a(o.port1):c(e.data.reason))})),o.port1.start();const d={topic:r,payload:{identity:t}};e.postMessage(d,location.origin,[o.port2,s.port2])}))}throw new Error(\"Could not connect via top level browsing context as its origin does not much the web interop broker.\")},this.listenForNestedConnections=e=>{\"top-window\"===this.state&&a(this.iframeWindow,this.iframeWindow.parent)&&this.iframeWindow.parent.addEventListener(\"message\",(async t=>{const{data:n}=t;if(t.origin===location.origin&&n.topic===r){const[r,...o]=t.ports;if(o.length>0&&n.payload?.identity){const[e]=o;await this.identityDisconnectionController.lockProxiedConnection(n.payload.identity,e)}const s={topic:i};e.postMessage(s,[r])}}))},this.initialize=async e=>{if(\"ready\"!==this.state)throw new Error(\"Worker connection already initialized\");return(e=>{const t=i=>!(!(e=>{try{return!e.origin}catch(e){return!0}})(i)&&i.origin===e.origin)||!s(i)&&t(i.parent);return!s(e)&&t(e.parent)})(this.iframeWindow)&&a(this.iframeWindow,this.iframeWindow.top)?this.state=\"partitioned-frame\":s(this.iframeWindow.parent)?this.state=\"top-window\":this.state=\"frame\",this.connect(e)}}async connect(e){if(\"ready\"===this.state)throw new Error(\"Must call initialize before connect\");switch(this.state){case\"partitioned-frame\":return this.establishWorkerConnectionViaWindow(this.iframeWindow.top,e);case\"top-window\":{let t;return t=this.isSharedWorkerSupported()?new SharedWorker(this.workerUrl,c).port:new Worker(this.workerUrl),await this.identityDisconnectionController.lockSelf(e),this.listenForNestedConnections(t),t}case\"frame\":{if(!this.isSharedWorkerSupported())try{return await this.establishWorkerConnectionViaWindow(this.iframeWindow.top,e)}catch(e){throw new Error(`SharedWorker is not supported and an unexpected error occured when trying to connect via fallback mechanism: ${e.message}`,{cause:e})}await this.identityDisconnectionController.lockSelf(e);const{port:t}=new SharedWorker(this.workerUrl,c);return t}default:throw this.state,new Error(`Invalid state: ${this.state}`)}}}const w=o(\"@openfin/core-web/iframe-broker\"),p=()=>{const e=((e,t)=>{const i=new RegExp(`^${t}<(?.*)>$`).exec(e)?.groups?.meta;if(i)try{return JSON.parse(atob(i))}catch(e){throw new Error(`Failed to decode JSON from ${i}.`)}})(window.name,\"of-broker\");if(!e)throw new Error(\"Invalid or missing identity string in iframe context. Ensure that this iframe is being renderered via the @openfin/core-web library.\");return e};function g(t){const i={topic:n(e),success:!1,reason:t?.reason??\"Connection Rejected\"};window.parent.postMessage(i,\"*\")}exports.init=async i=>{try{const{sharedWorkerUrl:r}=i;await(\"loading\"===document.readyState?new Promise((e=>{const t=()=>{e(),window.removeEventListener(\"DOMContentLoaded\",t)};window.addEventListener(\"DOMContentLoaded\",t)})):Promise.resolve());const o=p(),s=new h(r,window,\"same-site\"!==i.experimental?.crossTab),a=await s.initialize(o);w.log(`Loading ${r} in ${s.state} mode...`);const c=await(async(i,r,o)=>{const s=new MessageChannel,a=new MessageChannel,c={topic:t,payload:{identity:o}};await new Promise(((e,i)=>{r.addEventListener(\"message\",(r=>{r.data.topic===n(t)&&(r.data.success?e():i(new Error(r.data.reason)))})),r.start?.(),r.postMessage(c,[a.port2])}));const d={topic:n(e),success:!0,payload:{identity:o}};return i.postMessage(d,\"*\",[s.port2,a.port1]),s.port1})(window.parent,a,o);c.start(),a.start?.(),w.log(`Port transfer complete in ${s.state} mode. Connection established with identity ${JSON.stringify(o)}. SharedWorker support=${s.isSharedWorkerSupported()}`)}catch(e){const t=new Error(`An unexpected error occured during initialization. ${e.message}`);g({reason:t.message}),console.error(t)}},exports.rejectConnections=g;\n","import type { WebLayoutSnapshot } from \"@openfin/core-web\";\nimport type { Settings } from \"../shapes/setting-shapes\";\n\n/**\n * Fetches the settings for the application.\n * @returns The settings for the application.\n */\nexport async function getSettings(): Promise {\n\tconst settings = await getManifestSettings();\n\tif (settings === undefined) {\n\t\tconsole.error(\n\t\t\t\"Unable to run the example as settings are required and we fetch them from the link web manifest from the html page that is being served. It should exist in the customSettings section of the web manifest.\"\n\t\t);\n\t}\n\treturn settings;\n}\n\n/**\n * Returns a default layout from the settings if provided.\n * @returns The default layout from the settings.\n */\nexport async function getDefaultLayout(): Promise {\n\tconst settings = await getSettings();\n\tif (settings?.platform?.layout?.defaultLayout === undefined) {\n\t\tconsole.error(\n\t\t\t\"Unable to run the example as without a layout being defined. Please ensure that settings have been provided in the web manifest.\"\n\t\t);\n\t\treturn;\n\t}\n\tif (typeof settings.platform.layout.defaultLayout === \"string\") {\n\t\tconst layoutResponse = await fetch(settings.platform.layout.defaultLayout);\n\t\tconst layoutJson = (await layoutResponse.json()) as WebLayoutSnapshot;\n\t\treturn layoutJson;\n\t}\n\treturn settings.platform.layout.defaultLayout;\n}\n\n/**\n * Returns the settings from the manifest file.\n * @returns customSettings for this example\n */\nasync function getManifestSettings(): Promise {\n\t// Get the manifest link\n\tconst link = document.querySelector('link[rel=\"manifest\"]');\n\tif (link !== null) {\n\t\tconst manifestResponse = await fetch(link.href);\n\t\tconst manifestJson = (await manifestResponse.json()) as { custom_settings: Settings };\n\t\treturn manifestJson.custom_settings;\n\t}\n}\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","import { init as initBrokerConnection } from \"@openfin/core-web/iframe-broker\";\nimport { getSettings } from \"./settings\";\n\n/**\n * Initializes the OpenFin Web Broker connection.\n * @returns A promise that resolves when the connection is established.\n */\nasync function init(): Promise {\n\tconst settings = await getSettings();\n\tif (settings === undefined) {\n\t\tconsole.error(\n\t\t\t\"Unable to run the sample as we have been unable to load the web manifest and it's settings from the currently running html page. Please ensure that the web manifest is being served and that it contains the custom_settings section.\"\n\t\t);\n\t\treturn;\n\t}\n\treturn initBrokerConnection({\n\t\tsharedWorkerUrl: settings.platform.interop.sharedWorkerUrl\n\t});\n}\n\ninit()\n\t.then(() => {\n\t\tconsole.log(\"Connected to the OpenFin IFrame Web Broker.\");\n\t\treturn true;\n\t})\n\t.catch((err) => console.error(err));\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/web/v19.2.0/web-interop/js/interop-view.bundle.js b/web/v19.2.0/web-interop/js/interop-view.bundle.js index ef7a58e..cef614b 100644 --- a/web/v19.2.0/web-interop/js/interop-view.bundle.js +++ b/web/v19.2.0/web-interop/js/interop-view.bundle.js @@ -1,38 +1,38 @@ /******/ (() => { // webpackBootstrap /******/ var __webpack_modules__ = ({ -/***/ "./node_modules/@openfin/core-web/out/api-client.js": -/*!**********************************************************!*\ - !*** ./node_modules/@openfin/core-web/out/api-client.js ***! - \**********************************************************/ +/***/ "../../node_modules/@openfin/core-web/out/api-client.js": +/*!**************************************************************!*\ + !*** ../../node_modules/@openfin/core-web/out/api-client.js ***! + \**************************************************************/ /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; -var e=__webpack_require__(/*! ./main-8cad4070.js */ "./node_modules/@openfin/core-web/out/main-8cad4070.js");__webpack_require__(/*! buffer/ */ "../../node_modules/buffer/index.js"),__webpack_require__(/*! uuid */ "../../node_modules/uuid/dist/esm-browser/index.js"),__webpack_require__(/*! events */ "../../node_modules/events/events.js"),__webpack_require__(/*! lodash/cloneDeep */ "../../node_modules/lodash/cloneDeep.js"),__webpack_require__(/*! lodash/isEqual */ "../../node_modules/lodash/isEqual.js"),exports.connect=e.connect; +var e=__webpack_require__(/*! ./main-8cad4070.js */ "../../node_modules/@openfin/core-web/out/main-8cad4070.js");__webpack_require__(/*! buffer/ */ "../../node_modules/buffer/index.js"),__webpack_require__(/*! uuid */ "../../node_modules/uuid/dist/esm-browser/index.js"),__webpack_require__(/*! events */ "../../node_modules/events/events.js"),__webpack_require__(/*! lodash/cloneDeep */ "../../node_modules/lodash/cloneDeep.js"),__webpack_require__(/*! lodash/isEqual */ "../../node_modules/lodash/isEqual.js"),exports.connect=e.connect; /***/ }), -/***/ "./node_modules/@openfin/core-web/out/main-8cad4070.js": -/*!*************************************************************!*\ - !*** ./node_modules/@openfin/core-web/out/main-8cad4070.js ***! - \*************************************************************/ +/***/ "../../node_modules/@openfin/core-web/out/main-8cad4070.js": +/*!*****************************************************************!*\ + !*** ../../node_modules/@openfin/core-web/out/main-8cad4070.js ***! + \*****************************************************************/ /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; -var e=__webpack_require__(/*! buffer/ */ "../../node_modules/buffer/index.js"),t=__webpack_require__(/*! events */ "../../node_modules/events/events.js"),n=__webpack_require__(/*! lodash/cloneDeep */ "../../node_modules/lodash/cloneDeep.js"),i=__webpack_require__(/*! lodash/isEqual */ "../../node_modules/lodash/isEqual.js"),r=__webpack_require__(/*! uuid */ "../../node_modules/uuid/dist/esm-browser/index.js");const o=(e,t)=>`${t}<${btoa(JSON.stringify(e))}>`;var s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof __webpack_require__.g?__webpack_require__.g:"undefined"!=typeof self?self:{},a={},c={},d={},h={};async function l(e){const t=[];for(const n of e){const e=await n();t.push(e)}return t}Object.defineProperty(h,"__esModule",{value:!0}),h.promiseMapSerial=h.serial=h.promiseMap=h.promisify=void 0,h.promisify=function(e){return(...t)=>new Promise(((n,i)=>{e(...t,((e,t)=>e?i(e):n(t)))}))},h.promiseMap=async function(e,t){return Promise.all(e.map(t))},h.serial=l,h.promiseMapSerial=async function(e,t){return l(e.map(((e,n,i)=>()=>t(e,n,i))))};var u,p=s&&s.__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},w=s&&s.__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)};Object.defineProperty(d,"__esModule",{value:!0}),d.Reply=d.EmitterBase=d.Base=void 0;const y=h;class f{constructor(e){this.isNodeEnvironment=()=>"node"===this.wire.environment.type,this.isOpenFinEnvironment=()=>"openfin"===this.wire.environment.type,this.isBrowserEnvironment=()=>"other"===this.wire.environment.type,this.wire=e}get fin(){return this.wire.getFin()}get me(){return this.wire.me}}d.Base=f;d.EmitterBase=class extends f{constructor(e,t,...n){super(e),this.topic=t,u.set(this,void 0),this.eventNames=()=>this.hasEmitter()?this.getOrCreateEmitter().eventNames():[],this.emit=(e,t,...n)=>!!this.hasEmitter()&&this.getOrCreateEmitter().emit(e,t,...n),this.hasEmitter=()=>this.wire.eventAggregator.has(w(this,u,"f")),this.getOrCreateEmitter=()=>this.wire.eventAggregator.getOrCreate(w(this,u,"f")),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[],this.listenerCount=e=>this.hasEmitter()?this.getOrCreateEmitter().listenerCount(e):0,this.registerEventListener=async(e,t={},n,i)=>{const r={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e},o=this.getOrCreateEmitter();n(o);try{await this.wire.sendAction("subscribe-to-desktop-event",r)}catch(e){throw i(o),this.deleteEmitterIfNothingRegistered(o),e}},this.deregisterEventListener=async(e,t={})=>{if(this.hasEmitter()){const n={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e};await this.wire.sendAction("unsubscribe-to-desktop-event",n).catch((()=>null));return this.getOrCreateEmitter()}return Promise.resolve()},p(this,u,[t,...n],"f"),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[]}async on(e,t,n){return await this.registerEventListener(e,n,(n=>{n.on(e,t)}),(n=>{n.removeListener(e,t)})),this}async addListener(e,t,n){return this.on(e,t,n)}async once(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.once(e,i),n.once(e,t)}),(n=>{n.removeListener(e,i),n.removeListener(e,t)})),this}async prependListener(e,t,n){return await this.registerEventListener(e,n,(n=>{n.prependListener(e,t)}),(n=>{n.removeListener(e,t)})),this}async prependOnceListener(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.prependOnceListener(e,t),n.once(e,i)}),(n=>{n.removeListener(e,t),n.removeListener(e,i)})),this}async removeListener(e,t,n){const i=await this.deregisterEventListener(e,n);return i&&(i.removeListener(e,t),this.deleteEmitterIfNothingRegistered(i)),this}async deregisterAllListeners(e){const t={...this.identity,type:e,topic:this.topic};if(this.hasEmitter()){const e=this.getOrCreateEmitter(),n=e.listenerCount(t.type),i=[];for(let e=0;enull)));return await Promise.all(i),e}}async removeAllListeners(e){const t=async e=>{const t=await this.deregisterAllListeners(e);t&&(t.removeAllListeners(e),this.deleteEmitterIfNothingRegistered(t))};if(e)await t(e);else if(this.hasEmitter()){const e=this.getOrCreateEmitter().eventNames();await(0,y.promiseMap)(e,t)}return this}deleteEmitterIfNothingRegistered(e){0===e.eventNames().length&&this.wire.eventAggregator.delete(w(this,u,"f"))}},u=new WeakMap;d.Reply=class{};var g={};Object.defineProperty(g,"__esModule",{value:!0});var m=g.RuntimeError=g.NotSupportedError=g.NotImplementedError=g.NoAckError=g.DuplicateCorrelationError=g.UnexpectedActionError=g.DisconnectedError=void 0;class v extends Error{constructor(e){super(`Expected websocket state OPEN but found ${e}`),this.readyState=e}}g.DisconnectedError=v;class C extends Error{}g.UnexpectedActionError=C;class b extends Error{}g.DuplicateCorrelationError=b;class I extends Error{}g.NoAckError=I;class E extends Error{}g.NotImplementedError=E;class x extends Error{}g.NotSupportedError=x;class A extends Error{constructor(e){const{message:t,name:n,stack:i,...r}=e;super(t),this.name=n||"Error",this.stack=i??this.toString(),Object.keys(r).forEach((e=>{this[e]=r[e]}))}}class P extends Error{static getCallSite(e=0){const t=Error.stackTraceLimit,n=e+1;Error.stackTraceLimit=t+n;const i=Error.prepareStackTrace;Error.prepareStackTrace=(e,t)=>t;const r=(new Error).stack?.slice(n)??[];return Error.prepareStackTrace=i,Error.stackTraceLimit=t,r}static prepareStackTrace(e,t){if("function"==typeof Error.prepareStackTrace)return Error.prepareStackTrace(e,t);let n="";n+=e.name||"Error",n+=`: ${e.message||""}`;for(const e of t)n+=`\n at ${e.toString()}`;return n}constructor(e,t){const{reason:n,error:i}=e;super(n),this.name="RuntimeError",i?.stack&&(this.cause=new A(i)),t&&(this.stack=P.prepareStackTrace(this,t))}}m=g.RuntimeError=P;var M={},_={},O={};Object.defineProperty(O,"__esModule",{value:!0}),O.validateIdentity=void 0,O.validateIdentity=function(e){let t;return"object"==typeof e&&"string"==typeof e.uuid||(t="Not a valid identity object"),t};var S={},R={},F={},j={},k={},L={},T={};Object.defineProperty(T,"__esModule",{value:!0}),T.handleDeprecatedWarnings=void 0;var $;T.handleDeprecatedWarnings=e=>{(e.contentNavigation?.whitelist||e.contentNavigation?.blacklist||e.contentRedirect?.whitelist||e.contentRedirect?.blacklist)&&console.warn("The properties 'whitelist' and 'blacklist' have been marked as deprecated and will be removed in a future version. Please use 'allowlist' and 'denylist'.")};var B={},G={};Object.defineProperty(G,"__esModule",{value:!0}),G.AsyncRetryableLazy=W=G.Lazy=void 0;var W=G.Lazy=class{constructor(e){this.producerFn=e}getValue(){return this.value||(this.value=this.producerFn()),this.value}};G.AsyncRetryableLazy=class{constructor(e){this.producerFn=e}async getValue(){return this.promise||(this.promise=this.producerFn().catch((e=>{throw delete this.promise,e}))),this.promise}};var H={};Object.defineProperty(H,"__esModule",{value:!0}),H.WebContents=void 0;const N=d;class D extends N.EmitterBase{constructor(e,t,n){super(e,n,t.uuid,t.name),this.identity=t,this.entityType=n}capturePage(e){return this.wire.sendAction("capture-page",{options:e,...this.identity}).then((({payload:e})=>e.data))}executeJavaScript(e){return this.wire.sendAction("execute-javascript-in-window",{...this.identity,code:e}).then((({payload:e})=>e.data))}getZoomLevel(){return this.wire.sendAction("get-zoom-level",this.identity).then((({payload:e})=>e.data))}setZoomLevel(e){return this.wire.sendAction("set-zoom-level",{...this.identity,level:e}).then((()=>{}))}navigate(e){return this.wire.sendAction("navigate-window",{...this.identity,url:e}).then((()=>{}))}navigateBack(){return this.wire.sendAction("navigate-window-back",{...this.identity}).then((()=>{}))}async navigateForward(){await this.wire.sendAction("navigate-window-forward",{...this.identity})}stopNavigation(){return this.wire.sendAction("stop-window-navigation",{...this.identity}).then((()=>{}))}reload(e=!1){return this.wire.sendAction("reload-window",{ignoreCache:e,...this.identity}).then((()=>{}))}print(e={}){return this.wire.sendAction("print",{...this.identity,options:e}).then((()=>{}))}findInPage(e,t){return this.wire.sendAction("find-in-page",{...this.identity,searchTerm:e,options:t}).then((({payload:e})=>e.data))}stopFindInPage(e){return this.wire.sendAction("stop-find-in-page",{...this.identity,action:e}).then((()=>{}))}getPrinters(){return this.wire.sendAction("get-printers",{...this.identity}).then((({payload:e})=>e.data))}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){await this.wire.sendAction("focus-window",{emitSynthFocused:e,...this.identity})}async showDeveloperTools(){await this.wire.sendAction("show-developer-tools",this.identity)}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction("get-process-info",this.identity);return e}async getSharedWorkers(){return this.wire.sendAction("get-shared-workers",this.identity).then((({payload:e})=>e.data))}async inspectSharedWorker(){await this.wire.sendAction("inspect-shared-worker",{...this.identity})}async inspectSharedWorkerById(e){await this.wire.sendAction("inspect-shared-worker-by-id",{...this.identity,workerId:e})}async inspectServiceWorker(){await this.wire.sendAction("inspect-service-worker",{...this.identity})}async showPopupWindow(e){if(this.wire.sendAction(`${this.entityType}-show-popup-window`,this.identity).catch((()=>{})),e?.onPopupReady){const t=async({popupName:t})=>{try{const n=this.fin.Window.wrapSync({uuid:this.fin.me.uuid,name:t});await e.onPopupReady(n)}catch(e){throw new Error(`Something went wrong during onPopupReady execution: ${e}`)}};await this.once("popup-ready",t)}const{payload:t}=await this.wire.sendAction("try-create-popup-window",{options:{...e,hasResultCallback:!!e?.onPopupResult,hasReadyCallback:!!e?.onPopupReady},...this.identity}),{data:{willOpen:n,options:i}}=t;n&&await this.fin.Window.create(i.initialOptions);if(e?.onPopupResult){const t=async t=>{await e.onPopupResult((e=>{const{name:t,uuid:n,result:i,data:r}=e,o={identity:{name:t,uuid:n},result:i};return r&&(o.data=r),o})(t))},n=async()=>{await this.removeListener("popup-result",t)};await this.on("popup-result",t),await this.once("popup-teardown",n)}const{payload:r}=await this.wire.sendAction("show-popup-window",{options:i,...this.identity});return r.data}}var U,V,z,K,q;function J(){return V||(V=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(function(){if($)return L;$=1,Object.defineProperty(L,"__esModule",{value:!0}),L.ViewModule=void 0;const e=d,t=O,n=J(),i=T;class r extends e.Base{async create(e){const{uuid:t}=this.wire.me;if(!e.name||"string"!=typeof e.name)throw new Error("Please provide a name property as a string in order to create a View.");return(0,i.handleDeprecatedWarnings)(e),this.wire.environment.childViews?await this.wire.environment.createChildContent({entityType:"view",options:{...e,uuid:t}}):await this.wire.sendAction("create-view",{...e,uuid:t}),this.wrapSync({uuid:t,name:e.name})}async wrap(e){this.wire.sendAction("view-wrap").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}wrapSync(e){this.wire.sendAction("view-wrap-sync").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}getCurrent(){if(this.wire.sendAction("view-get-current").catch((e=>{})),!this.wire.me.isView)throw new Error("You are not in a View context");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction("view-get-current-sync").catch((e=>{})),!this.wire.me.isView)throw new Error("You are not in a View context");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return L.ViewModule=r,L}(),e),n(function(){if(U)return B;var e;U=1,Object.defineProperty(B,"__esModule",{value:!0}),B.View=void 0;const t=g,n=G,i=H,r=ie();class o extends i.WebContents{constructor(i,o){super(i,o,"view"),this.identity=o,e.set(this,new n.Lazy((()=>this.fin.Platform.wrapSync(this.identity).getClient()))),this.attach=async e=>{await this.wire.sendAction("attach-view",{target:e,...this.identity})},this.destroy=async()=>{await this.wire.sendAction("destroy-view",{...this.identity})},this.show=async()=>{await this.wire.sendAction("show-view",{...this.identity})},this.showAt=async(e,t={})=>{await this.wire.sendAction("show-view-at",{bounds:e,...this.identity,options:t})},this.bringToFront=async()=>{await this.wire.sendAction("bring-view-to-front",{...this.identity})},this.hide=async()=>{await this.wire.sendAction("hide-view",{...this.identity})},this.setBounds=async e=>{await this.wire.sendAction("set-view-bounds",{bounds:e,...this.identity})},this.getBounds=async()=>(await this.wire.sendAction("get-view-bounds",{...this.identity})).payload.data,this.getInfo=async()=>(await this.wire.sendAction("get-view-info",{...this.identity})).payload.data,this.getParentLayout=async()=>(this.wire.sendAction("view-get-parent-layout",{...this.identity}).catch((()=>{})),this.fin.Platform.Layout.getLayoutByViewIdentity(this.identity)),this.getOptions=async()=>this.wire.sendAction("get-view-options",{...this.identity}).then((({payload:e})=>e.data)),this.updateOptions=async e=>this.wire.sendAction("update-view-options",{options:e,...this.identity}).then((()=>{})),this.getCurrentWindow=async()=>{const{payload:{data:e}}=await this.wire.sendAction("get-view-window",{...this.identity});return new r._Window(this.wire,e)},this.getCurrentStack=async()=>{this.wire.sendAction("view-get-current-stack").catch((()=>{}));try{return(await this.getParentLayout()).getStackByViewIdentity(this.identity)}catch(e){throw new t.RuntimeError({reason:"This view does not belong to a stack.",error:e})}},this.triggerBeforeUnload=async()=>(await this.wire.sendAction("trigger-before-unload",{...this.identity})).payload.data,this.bindToElement=async e=>{if(!e)throw new Error("Element not found.");return this.wire.environment.observeBounds(e,(async e=>this.setBounds(e)))}}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){const t=await this.getCurrentWindow();await t.focusedWebViewWasChanged(),await super.focus({emitSynthFocused:e})}}return B.View=o,e=new WeakMap,B}(),e)}(k)),k}function Y(){if(z)return j;z=1,Object.defineProperty(j,"__esModule",{value:!0}),j.Application=void 0;const e=d,t=ie(),n=J();class i extends e.EmitterBase{constructor(e,n){super(e,"application",n.uuid),this.identity=n,this.window=new t._Window(this.wire,{uuid:this.identity.uuid,name:this.identity.uuid})}windowListFromIdentityList(e){const n=[];return e.forEach((e=>{n.push(new t._Window(this.wire,{uuid:e.uuid,name:e.name}))})),n}isRunning(){return this.wire.sendAction("is-application-running",this.identity).then((({payload:e})=>e.data))}async quit(e=!1){try{await this._close(e),await this.wire.sendAction("destroy-application",{force:e,...this.identity})}catch(e){if(!["Remote connection has closed","Could not locate the requested application"].some((t=>e.message.includes(t))))throw e}}async _close(e=!1){try{await this.wire.sendAction("close-application",{force:e,...this.identity})}catch(e){if(!e.message.includes("Remote connection has closed"))throw e}}close(e=!1){return console.warn("Deprecation Warning: Application.close is deprecated Please use Application.quit"),this.wire.sendAction("application-close",this.identity).catch((e=>{})),this._close(e)}getChildWindows(){return this.wire.sendAction("get-child-windows",this.identity).then((({payload:e})=>{const t=[];return e.data.forEach((e=>{t.push({uuid:this.identity.uuid,name:e})})),this.windowListFromIdentityList(t)}))}getManifest(){return this.wire.sendAction("get-application-manifest",this.identity).then((({payload:e})=>e.data))}getParentUuid(){return this.wire.sendAction("get-parent-application",this.identity).then((({payload:e})=>e.data))}getShortcuts(){return this.wire.sendAction("get-shortcuts",this.identity).then((({payload:e})=>e.data))}async getViews(){const{payload:e}=await this.wire.sendAction("application-get-views",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}getZoomLevel(){return this.wire.sendAction("get-application-zoom-level",this.identity).then((({payload:e})=>e.data))}getWindow(){return this.wire.sendAction("application-get-window",this.identity).catch((e=>{})),Promise.resolve(this.window)}registerUser(e,t){return this.wire.sendAction("register-user",{userName:e,appName:t,...this.identity}).then((()=>{}))}removeTrayIcon(){return this.wire.sendAction("remove-tray-icon",this.identity).then((()=>{}))}restart(){return this.wire.sendAction("restart-application",this.identity).then((()=>{}))}run(){return console.warn("Deprecation Warning: Application.run is deprecated Please use fin.Application.start"),this.wire.sendAction("application-run",this.identity).catch((e=>{})),this._run()}_run(e={}){return this.wire.sendAction("run-application",{manifestUrl:this._manifestUrl,opts:e,...this.identity}).then((()=>{}))}scheduleRestart(){return this.wire.sendAction("relaunch-on-close",this.identity).then((()=>{}))}async sendApplicationLog(){const{payload:e}=await this.wire.sendAction("send-application-log",this.identity);return e.data}async setJumpList(e){await this.wire.sendAction("set-jump-list",{config:e,...this.identity})}setTrayIcon(e){return this.wire.sendAction("set-tray-icon",{enabledIcon:e,...this.identity}).then((()=>{}))}setShortcuts(e){return this.wire.sendAction("set-shortcuts",{data:e,...this.identity}).then((()=>{}))}async setShortcutQueryParams(e){await this.wire.sendAction("set-shortcut-query-args",{data:e,...this.identity})}setZoomLevel(e){return this.wire.sendAction("set-application-zoom-level",{level:e,...this.identity}).then((()=>{}))}async setAppLogUsername(e){await this.wire.sendAction("set-app-log-username",{data:e,...this.identity})}getTrayIconInfo(){return this.wire.sendAction("get-tray-icon-info",this.identity).then((({payload:e})=>e.data))}hasTrayIcon(){return this.wire.sendAction("has-tray-icon",this.identity).then((({payload:e})=>e.data))}terminate(){return this.wire.sendAction("terminate-application",this.identity).then((()=>{}))}wait(){return this.wire.sendAction("wait-for-hung-application",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction("get-info",this.identity).then((({payload:e})=>e.data))}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction("application-get-process-info",this.identity);return e}async setFileDownloadLocation(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t};await this.wire.sendAction("set-file-download-location",{...n,downloadLocation:e})}async getFileDownloadLocation(){const{payload:{data:e}}=await this.wire.sendAction("get-file-download-location",this.identity);return e}async showTrayIconPopupMenu(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t},{payload:i}=await this.wire.sendAction("show-tray-icon-popup-menu",{...n,options:e});return i.data}async closeTrayIconPopupMenu(){const{name:e}=this.wire.me,t={uuid:this.identity.uuid,name:e};await this.wire.sendAction("close-tray-icon-popup-menu",{...t})}}return j.Application=i,j}function Z(){return q||(q=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(function(){if(K)return F;K=1,Object.defineProperty(F,"__esModule",{value:!0}),F.ApplicationModule=void 0;const e=d,t=O,n=Y();class i extends e.Base{async wrap(e){this.wire.sendAction("wrap-application").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}wrapSync(e){this.wire.sendAction("wrap-application-sync").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}async _create(e){return void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&void 0===e.isPlatformController&&(e.autoShow=!0),await this.wire.sendAction("create-application",e),this.wrap({uuid:e.uuid})}create(e){return console.warn("Deprecation Warning: fin.Application.create is deprecated. Please use fin.Application.start"),this.wire.sendAction("application-create").catch((e=>{})),this._create(e)}async start(e){this.wire.sendAction("start-application").catch((e=>{}));const t=await this._create(e);return await this.wire.sendAction("run-application",{uuid:e.uuid}),t}async startManyManifests(e,t){return this.wire.sendAction("run-applications",{applications:e,opts:t}).then((()=>{}))}getCurrent(){return this.wire.sendAction("get-current-application").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction("get-current-application-sync").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}async startFromManifest(e,t){this.wire.sendAction("application-start-from-manifest").catch((e=>{}));const n=await this._createFromManifest(e);return await n._run(t),n}createFromManifest(e){return console.warn("Deprecation Warning: fin.Application.createFromManifest is deprecated. Please use fin.Application.startFromManifest"),this.wire.sendAction("application-create-from-manifest").catch((e=>{})),this._createFromManifest(e)}_createFromManifest(e){return this.wire.sendAction("get-application-manifest",{manifestUrl:e}).then((({payload:e})=>{const t=e.data.platform?e.data.platform.uuid:e.data.startup_app.uuid;return this.wrap({uuid:t})})).then((t=>(t._manifestUrl=e,t)))}}return F.ApplicationModule=i,F}(),e),n(Y(),e)}(R)),R}H.WebContents=D;var Q={};Object.defineProperty(Q,"__esModule",{value:!0}),Q.promisifySubscription=void 0;var X,ee,te;function ne(){if(X)return S;X=1,Object.defineProperty(S,"__esModule",{value:!0}),S._Window=void 0;const e=Z(),t=H,n=J(),i=T,r=Q;class o extends t.WebContents{constructor(e,t){super(e,t,"window")}async createWindow(e){this.wire.sendAction("window-create-window",this.identity).catch((e=>{}));const t=await(0,r.promisifySubscription)(this,"fire-constructor-callback");void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&(e.autoShow=!0),(0,i.handleDeprecatedWarnings)(e);const n=this.wire.environment.createChildContent({entityType:"window",options:e}),[o]=await Promise.all([t.getValue(),n]);let s;const{success:a}=o,c=o.data,{message:d}=c;s=a?{httpResponseCode:c.httpResponseCode,apiInjected:c.apiInjected}:{message:c.message,networkErrorCode:c.networkErrorCode,stack:c.stack};const h={message:d,cbPayload:s,success:a};try{this.getWebWindow().fin.__internal_.openerSuccessCBCalled()}catch(e){}return h.success?this:Promise.reject(h)}getAllFrames(){return this.wire.sendAction("get-all-frames",this.identity).then((({payload:e})=>e.data))}getBounds(){return this.wire.sendAction("get-window-bounds",this.identity).then((({payload:e})=>e.data))}center(){return this.wire.sendAction("center-window",this.identity).then((()=>{}))}blur(){return this.wire.sendAction("blur-window",this.identity).then((()=>{}))}bringToFront(){return this.wire.sendAction("bring-window-to-front",this.identity).then((()=>{}))}animate(e,t){return this.wire.sendAction("animate-window",{transitions:e,options:t,...this.identity}).then((()=>{}))}hide(){return this.wire.sendAction("hide-window",this.identity).then((()=>{}))}close(e=!1){return this.wire.sendAction("close-window",{force:e,...this.identity}).then((()=>{Object.setPrototypeOf(this,null)}))}focusedWebViewWasChanged(){return this.wire.sendAction("focused-webview-changed",this.identity).then((()=>{}))}getNativeId(){return this.wire.sendAction("get-window-native-id",this.identity).then((({payload:e})=>e.data))}async getCurrentViews(){const{payload:e}=await this.wire.sendAction("window-get-views",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}disableFrame(){return console.warn("Function is deprecated; use disableUserMovement instead."),this.wire.sendAction("disable-window-frame",this.identity).then((()=>{}))}disableUserMovement(){return this.wire.sendAction("disable-window-frame",this.identity).then((()=>{}))}enableFrame(){return console.warn("Function is deprecated; use enableUserMovement instead."),this.wire.sendAction("enable-window-frame",this.identity).then((()=>{}))}enableUserMovement(){return this.wire.sendAction("enable-window-frame",this.identity).then((()=>{}))}flash(){return this.wire.sendAction("flash-window",this.identity).then((()=>{}))}stopFlashing(){return this.wire.sendAction("stop-flash-window",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction("get-window-info",this.identity).then((({payload:e})=>e.data))}async getLayout(e){this.wire.sendAction("window-get-layout",this.identity).catch((e=>{}));const t=await this.getOptions();if(!t.layout&&!t.layoutSnapshot)throw new Error("Window does not have a Layout");return this.fin.Platform.Layout.wrap(e??this.identity)}getOptions(){return this.wire.sendAction("get-window-options",this.identity).then((({payload:e})=>e.data))}getParentApplication(){return this.wire.sendAction("window-get-parent-application",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity))}getParentWindow(){return this.wire.sendAction("window-get-parent-window",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity)).then((e=>e.getWindow()))}async getSnapshot(e){const t={area:e,...this.identity};console.warn("Window.getSnapshot has been deprecated, please use Window.capturePage");return(await this.wire.sendAction("get-window-snapshot",t)).payload.data}getState(){return this.wire.sendAction("get-window-state",this.identity).then((({payload:e})=>e.data))}getWebWindow(){return this.wire.sendAction("window-get-web-window",this.identity).catch((e=>{})),this.wire.environment.getWebWindow(this.identity)}isMainWindow(){return this.wire.sendAction("window-is-main-window",this.identity).catch((e=>{})),this.me.uuid===this.me.name}isShowing(){return this.wire.sendAction("is-window-showing",this.identity).then((({payload:e})=>e.data))}maximize(){return this.wire.sendAction("maximize-window",this.identity).then((()=>{}))}minimize(){return this.wire.sendAction("minimize-window",this.identity).then((()=>{}))}moveBy(e,t,n){return this.wire.sendAction("move-window-by",{deltaLeft:e,deltaTop:t,positioningOptions:n,...this.identity}).then((()=>{}))}moveTo(e,t,n){return this.wire.sendAction("move-window",{left:e,top:t,positioningOptions:n,...this.identity}).then((()=>{}))}resizeBy(e,t,n,i){return this.wire.sendAction("resize-window-by",{deltaWidth:Math.floor(e),deltaHeight:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}resizeTo(e,t,n,i){return this.wire.sendAction("resize-window",{width:Math.floor(e),height:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}restore(){return this.wire.sendAction("restore-window",this.identity).then((()=>{}))}setAsForeground(){return this.wire.sendAction("set-foreground-window",this.identity).then((()=>{}))}setBounds(e,t){return this.wire.sendAction("set-window-bounds",{...e,...this.identity,positioningOptions:t}).then((()=>{}))}show(e=!1){return this.wire.sendAction("show-window",{force:e,...this.identity}).then((()=>{}))}showAt(e,t,n=!1){return this.wire.sendAction("show-at-window",{force:n,left:Math.floor(e),top:Math.floor(t),...this.identity}).then((()=>{}))}updateOptions(e){return this.wire.sendAction("update-window-options",{options:e,...this.identity}).then((()=>{}))}authenticate(e,t){return this.wire.sendAction("window-authenticate",{userName:e,password:t,...this.identity}).then((()=>{}))}async showPopupMenu(e){const{payload:t}=await this.wire.sendAction("show-popup-menu",{options:e,...this.identity});return t.data}async closePopupMenu(){return this.wire.sendAction("close-popup-menu",{...this.identity}).then((()=>{}))}async dispatchPopupResult(e){this.wire.sendAction("window-dispatch-popup-result",this.identity).catch((e=>{})),await this.wire.sendAction("dispatch-popup-result",{data:e,...this.identity})}async print(e={content:"self"}){switch(e.content){case void 0:case"self":return super.print(e);case"screenshot":return this.wire.sendAction("print-screenshot",this.identity).then((()=>{}));case"views":return this.wire.sendAction("print-views",{...this.identity,options:e}).then((()=>{}));default:return}}}return S._Window=o,S}function ie(){return te||(te=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(function(){if(ee)return _;ee=1,Object.defineProperty(_,"__esModule",{value:!0}),_._WindowModule=void 0;const e=d,t=O,n=ne();class i extends e.Base{async wrap(e){this.wire.sendAction("window-wrap").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}wrapSync(e){this.wire.sendAction("window-wrap-sync").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}create(e){return this.wire.sendAction("create-window").catch((e=>{})),new n._Window(this.wire,{uuid:this.me.uuid,name:e.name}).createWindow(e)}getCurrent(){if(this.wire.sendAction("get-current-window").catch((e=>{})),!this.wire.me.isWindow)throw new Error("You are not in a Window context");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction("get-current-window-sync").catch((e=>{})),!this.wire.me.isWindow)throw new Error("You are not in a Window context");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return _._WindowModule=i,_}(),e),n(ne(),e)}(M)),M}Q.promisifySubscription=async(e,t,n=(()=>!0),i)=>{let r,o,s;const a=new Promise(((e,t)=>{r=e,o=t})),c=e=>{n(e)&&(clearTimeout(s),r(e))};return await e.on(t,c),i&&(s=setTimeout((()=>o(new Error("event timed out"))),i)),a.finally((()=>{e.removeListener(t,c).catch((()=>null))})),{getValue:()=>a}},Object.defineProperty(c,"__esModule",{value:!0}),c.System=void 0;const re=d,oe=g,se=ie(),ae=t;class ce extends re.EmitterBase{constructor(e){super(e,"system")}sendExternalProcessRequest(e,t){return new Promise(((n,i)=>{const r="external-process-exited";let o,s,a,c;"function"==typeof t.listener&&(a=e=>{const n=e||{};s={topic:"exited",uuid:n.processUuid||"",exitCode:n.exitCode||0},o===e.processUuid&&(t.listener(s),c.removeListener(r,a))},this.wire.me.name||(this.wire.me.name=this.wire.me.uuid),c=new se._Window(this.wire,this.wire.me),c.on(r,a)),this.wire.sendAction(e,t).then((({payload:e})=>{o=e.data.uuid,n(e.data),s&&o===s.uuid&&(t.listener(s),c.removeListener(r,a))})).catch((e=>{c&&c.removeListener(r,a),i(e)}))}))}getVersion(){return this.wire.sendAction("get-version").then((({payload:e})=>e.data))}clearCache(e){return this.wire.sendAction("clear-cache",e).then((()=>{}))}deleteCacheOnExit(){return this.wire.sendAction("delete-cache-request").then((()=>{}))}exit(){return this.wire.sendAction("exit-desktop").then((()=>{}))}async fetchManifest(e){const{payload:{data:t}}=await this.wire.sendAction("fetch-manifest",{manifestUrl:e});return t}flushCookieStore(){return this.wire.sendAction("flush-cookie-store").then((()=>{}))}getAllWindows(){return this.wire.sendAction("get-all-windows").then((({payload:e})=>e.data))}getAllApplications(){return this.wire.sendAction("get-all-applications").then((({payload:e})=>e.data))}getCommandLineArguments(){return this.wire.sendAction("get-command-line-arguments").then((({payload:e})=>e.data))}async getCrashReporterState(){const{payload:{data:{diagnosticMode:e,isRunning:t}}}=await this.wire.sendAction("get-crash-reporter-state");return console.warn("diagnosticMode property is deprecated. It will be removed in a future version"),{diagnosticMode:e,diagnosticsMode:e,isRunning:t}}async startCrashReporter(e){const t=e,n={...t,diagnosticMode:t.diagnosticsMode||t.diagnosticMode},{payload:{data:{diagnosticMode:i,isRunning:r}}}=await this.wire.sendAction("start-crash-reporter",n);return{diagnosticMode:i,diagnosticsMode:i,isRunning:r}}getUniqueUserId(){return this.wire.sendAction("get-unique-user-id").then((({payload:e})=>e.data))}getEntityInfo(e,t){return this.wire.sendAction("get-entity-info",{uuid:e,name:t}).then((({payload:e})=>e.data))}getEnvironmentVariable(e){return this.wire.sendAction("get-environment-variable",{environmentVariables:e}).then((({payload:e})=>e.data))}getFocusedWindow(){return this.wire.sendAction("get-focused-window").then((({payload:e})=>e.data))}async isAppCertified(e){const{payload:{data:{certifiedInfo:t}}}=await this.wire.sendAction("is-app-certified",{manifestUrl:e});return t}getInstalledRuntimes(){return this.wire.sendAction("get-installed-runtimes").then((({payload:e})=>e.data.runtimes))}async getInstalledApps(){const{payload:{data:{installedApps:e}}}=await this.wire.sendAction("get-installed-apps");return e}getLog(e){return this.wire.sendAction("view-log",e).then((({payload:e})=>e.data))}getMachineId(){return this.wire.sendAction("get-machine-id").then((({payload:e})=>e.data))}getMinLogLevel(){return this.wire.sendAction("get-min-log-level").then((({payload:e})=>e.data))}getLogList(){return this.wire.sendAction("list-logs").then((({payload:e})=>e.data))}getMonitorInfo(){return this.wire.sendAction("get-monitor-info").then((({payload:e})=>e.data))}getMousePosition(){return this.wire.sendAction("get-mouse-position").then((({payload:e})=>e.data))}getProcessList(){return console.warn("System.getProcessList has been deprecated. Please consider using our new process APIs: Window.getProcessInfo, View.getProcessInfo, Application.getProcessInfo, System.getAllProcessInfo"),this.wire.sendAction("process-snapshot").then((({payload:e})=>e.data))}async getAllProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction("get-all-process-info",this.identity);return e}getProxySettings(){return this.wire.sendAction("get-proxy-settings").then((({payload:e})=>e.data))}getRuntimeInfo(){return this.wire.sendAction("get-runtime-info").then((({payload:e})=>e.data))}getRvmInfo(){return this.wire.sendAction("get-rvm-info").then((({payload:e})=>e.data))}getHostSpecs(){return this.wire.sendAction("get-host-specs").then((({payload:e})=>e.data))}getOSInfo(){return this.wire.sendAction("get-os-info").then((({payload:e})=>e.data))}launchExternalProcess(e){return this.sendExternalProcessRequest("launch-external-process",e)}monitorExternalProcess(e){return this.sendExternalProcessRequest("monitor-external-process",e)}log(e,t){return this.wire.sendAction("write-to-log",{level:e,message:t}).then((()=>{}))}openUrlWithBrowser(e){return this.wire.sendAction("open-url-with-browser",{url:e}).then((()=>{}))}async registerCustomProtocol(e){if("object"!=typeof e)throw new Error("Must provide an object with a `protocolName` property having a string value.");await this.wire.sendAction("register-custom-protocol",e)}async unregisterCustomProtocol(e){await this.wire.sendAction("unregister-custom-protocol",{protocolName:e})}async getCustomProtocolState(e){return this.wire.sendAction("get-custom-protocol-state",{protocolName:e}).then((({payload:e})=>e.data))}releaseExternalProcess(e){return this.wire.sendAction("release-external-process",{uuid:e}).then((()=>{}))}showDeveloperTools(e){return this.wire.sendAction("show-developer-tools",e).then((()=>{}))}terminateExternalProcess(e){return this.wire.sendAction("terminate-external-process",e).then((()=>{}))}updateProxySettings(e){return this.wire.sendAction("update-proxy",e).then((()=>{}))}async downloadAsset(e,t){const n=()=>{};let i=n,r=n;const o=new Promise(((e,t)=>{i=e,r=t}));if("openfin"!==this.wire.environment.type)throw new oe.NotSupportedError("downloadAsset only supported in an OpenFin Render process");const s=oe.RuntimeError.getCallSite(),a=this.wire.environment.getNextMessageId().toString(),c=`asset-download-progress-${a}`,d=`asset-download-error-${a}`,h=`asset-download-complete-${a}`,l=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},u=()=>{this.removeListener(c,l)};await Promise.all([this.on(c,l),this.once(d,(e=>{u();const{reason:t,err:n}=e;r(new oe.RuntimeError({reason:t,error:n},s))})),this.once(h,(()=>{u(),i()}))]);const p=Object.assign(e,{downloadId:a});return await this.wire.sendAction("download-asset",p).catch((e=>{throw u(),e})),o}downloadRuntime(e,t){const n=oe.RuntimeError.getCallSite();return new Promise(((i,r)=>{if("openfin"!==this.wire.environment.type)return void r(new oe.NotSupportedError("downloadRuntime only supported in an OpenFin Render process"));const o=this.wire.environment.getNextMessageId().toString(),s=`runtime-download-progress-${o}`,a=`runtime-download-error-${o}`,c=`runtime-download-complete-${o}`,d=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},h=()=>{this.removeListener(s,d)};this.on(s,d),this.once(a,(e=>{h();const{reason:t,err:i}=e;r(new oe.RuntimeError({reason:t,error:i},n))})),this.once(c,(()=>{h(),i()}));const l=Object.assign(e,{downloadId:o});this.wire.sendAction("download-runtime",l).catch((e=>{h(),r(e)}))}))}downloadPreloadScripts(e){return this.wire.sendAction("download-preload-scripts",{scripts:e}).then((({payload:e})=>e.data))}getAllExternalApplications(){return this.wire.sendAction("get-all-external-applications").then((({payload:e})=>e.data))}getAppAssetInfo(e){return this.wire.sendAction("get-app-asset-info",e).then((({payload:e})=>e.data))}getCookies(e){const t=this.wire.environment.getUrl(),n=Object.assign(e,{url:t});return this.wire.sendAction("get-cookies",n).then((({payload:e})=>e.data))}setMinLogLevel(e){return this.wire.sendAction("set-min-log-level",{level:e}).then((()=>{}))}resolveUuid(e){return this.wire.sendAction("resolve-uuid",{entityKey:e}).then((({payload:e})=>e.data))}executeOnRemote(e,t){return t.requestingIdentity=e,this.wire.ferryAction(t)}readRegistryValue(e,t,n){return this.wire.sendAction("read-registry-value",{rootKey:e,subkey:t,value:n}).then((({payload:e})=>e.data))}registerExternalConnection(e){return this.wire.sendAction("register-external-connection",{uuid:e}).then((({payload:e})=>e.data))}async getServiceConfiguration(e){if("string"!=typeof e.name)throw new Error("Must provide an object with a `name` property having a string value");const{name:t}=e;return this.wire.sendAction("get-service-configuration",{name:t}).then((({payload:e})=>e.data))}async getSystemAppConfig(e){if("string"!=typeof e)throw new Error("Must provide a string value for name of system app");return this.wire.sendAction("get-system-app-configuration",{name:e}).then((({payload:e})=>e.data))}async registerShutdownHandler(e){this.wire.sendAction("system-register-shutdown-handler").catch((e=>{}));const{uuid:t,name:n}=this.wire.me;this.on("system-shutdown",(i=>{e({proceed:()=>{this.wire.environment.raiseEvent("application/system-shutdown-handled",{uuid:t,name:n,topic:"application"})}})}))}runRvmHealthCheck(){return this.wire.sendAction("run-rvm-health-check").then((({payload:e})=>e.data))}async launchManifest(e,t={}){const{subscribe:n,...i}=t,r=i;if(n){const e=new ae.EventEmitter;n(e);const t="app-version-progress",i="runtime-status",o="app-version-complete",s="app-version-error",a=this.wire.environment.getNextMessageId().toString();r.appVersionId=a;const c=[o,t,i,s],d=e=>{const{appVersionId:t,topic:n,type:i,...r}=e;return{...r,type:c.find((e=>i.includes(e)))}},h=t=>{const n=d(t);e.emit(n.type,n)},l=()=>{this.removeListener(`${t}.${a}`,h),this.removeListener(`${i}.${a}`,h),this.removeListener(`${o}.${a}`,h),this.removeListener(`${s}.${a}`,h),this.removeListener(`${o}.${a}`,l),this.removeListener(`${s}.${a}`,l)};await Promise.all([this.on(`${t}.${a}`,h),this.on(`${i}.${a}`,h),this.once(`${o}.${a}`,h),this.once(`${s}.${a}`,h),this.once(`${o}.${a}`,l),this.once(`${s}.${a}`,l)])}return(await this.wire.sendAction("launch-manifest",{manifestUrl:e,opts:r})).payload.data.manifest}async queryPermissionForCurrentContext(e){const t={uuid:this.wire.me.uuid,name:this.wire.me.name};return(await this.wire.sendAction("query-permission-for-current-context",{apiName:e,identity:t})).payload.data}async enableNativeWindowIntegrationProvider(e){const{payload:t}=await this.wire.sendAction("enable-native-window-integration-provider",{permissions:e});return t.data}async registerUsage({data:e,type:t}){await this.wire.sendAction("register-usage",{data:e,type:t})}async getPrinters(){const{payload:e}=await this.wire.sendAction("system-get-printers");return e.data}async updateProcessLoggingOptions(e){await this.wire.sendAction("system-update-process-logging-options",{options:e})}async getDomainSettings(){const{payload:{data:e}}=await this.wire.sendAction("get-domain-settings",this.identity);return e}async setDomainSettings(e){await this.wire.sendAction("set-domain-settings",{domainSettings:e,...this.identity})}async refreshExtensions(){const{payload:e}=await this.wire.sendAction("refresh-extensions");return e.data}async getInstalledExtensions(){const{payload:e}=await this.wire.sendAction("get-installed-extensions");return e.data}}c.System=ce;var de={},he={};Object.defineProperty(he,"__esModule",{value:!0}),he.RefCounter=void 0;he.RefCounter=class{constructor(){this.topicRefMap=new Map}incRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t+1;n=i,this.topicRefMap.set(e,i)}else this.topicRefMap.set(e,1),n=1;return n}decRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t-1;this.topicRefMap.set(e,i),n=i}else n=-1;return n}actOnFirst(e,t,n){return 1===this.incRefCount(e)?t():n()}actOnLast(e,t,n){return 0===this.decRefCount(e)?t():n()}};var le={},ue={},pe={};Object.defineProperty(pe,"__esModule",{value:!0}),pe.ChannelBase=pe.ProtectedItems=void 0;const we=e=>async(t,n,i)=>{const r=await e(t,n,i);return void 0===r?n:r};pe.ProtectedItems=class{constructor(e,t){this.providerIdentity=e,this.close=t}};class ye{static defaultAction(e){throw new Error(`No action registered at target for ${e}`)}constructor(){this.subscriptions=new Map}async processAction(e,t,n){try{const i=this.subscriptions.has(e)?this.subscriptions.get(e):(t,n)=>(this.defaultAction??ye.defaultAction)(e,t,n),r=this.preAction?await this.preAction(e,t,n):t,o=await i(r,n);return this.postAction?await this.postAction(e,o,n):o}catch(t){if(this.errorMiddleware)return this.errorMiddleware(e,t,n);throw t}}beforeAction(e){if(this.preAction)throw new Error("Already registered beforeAction middleware");this.preAction=we(e)}onError(e){if(this.errorMiddleware)throw new Error("Already registered error middleware");this.errorMiddleware=e}afterAction(e){if(this.postAction)throw new Error("Already registered afterAction middleware");this.postAction=we(e)}remove(e){this.subscriptions.delete(e)}setDefaultAction(e){if(this.defaultAction)throw new Error("default action can only be set once");this.defaultAction=e}register(e,t){if(this.subscriptions.has(e))throw new Error(`Subscription already registered for action: ${e}. Unsubscribe before adding new subscription`);return this.subscriptions.set(e,t),!0}}pe.ChannelBase=ye;var fe,ge,me,ve=s&&s.__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)},Ce=s&&s.__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};Object.defineProperty(ue,"__esModule",{value:!0}),ue.ChannelClient=void 0;const be=pe,Ie=new Map;class Ee extends be.ChannelBase{static closeChannelByEndpointId(e){const t=Ie.get(e);t&&ve(t,me,"f").call(t)}static handleProviderDisconnect(e){for(const t of Ie.values())t.providerIdentity.channelId===e.channelId&&(t.disconnectListener(e),ve(t,me,"f").call(t))}constructor(e,t,n){super(),fe.set(this,void 0),ge.set(this,void 0),this.processAction=(e,t,n)=>super.processAction(e,t,n),me.set(this,(()=>{Ie.delete(this.endpointId),ve(this,ge,"f").close()})),Ce(this,fe,new be.ProtectedItems(e,t),"f"),this.disconnectListener=()=>{},this.endpointId=e.endpointId,Ce(this,ge,n,"f"),Ie.set(this.endpointId,this),n.receive(this.processAction)}get providerIdentity(){return ve(this,fe,"f").providerIdentity}async dispatch(e,t){if(ve(this,ge,"f").isEndpointConnected(this.providerIdentity.channelId))return ve(this,ge,"f").send(this.providerIdentity.channelId,e,t);throw new Error("The client you are trying to dispatch from is disconnected from the target provider.")}onDisconnection(e){this.disconnectListener=t=>{try{e(t)}catch(e){throw new Error(`Error while calling the onDisconnection callback: ${e.message}`)}finally{this.disconnectListener=()=>{}}}}async disconnect(){await this.sendDisconnectAction(),ve(this,me,"f").call(this)}async sendDisconnectAction(){const e=ve(this,fe,"f");await e.close()}static async wireClose(e,t,n){const{channelName:i,uuid:r,name:o}=t;await e.sendAction("disconnect-from-channel",{channelName:i,uuid:r,name:o,endpointId:n})}}ue.ChannelClient=Ee,fe=new WeakMap,ge=new WeakMap,me=new WeakMap;var xe={},Ae={};Object.defineProperty(Ae,"__esModule",{value:!0}),Ae.exhaustiveCheck=void 0,Ae.exhaustiveCheck=function(e,t){throw new Error(`Unsupported value: ${e}${t?`\n Supported values are: ${t.join("")}`:""}`)};var Pe,Me,_e,Oe={},Se=s&&s.__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},Re=s&&s.__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)};Object.defineProperty(Oe,"__esModule",{value:!0}),Oe.ClassicInfo=Oe.ClassicStrategy=void 0;Oe.ClassicStrategy=class{constructor(e,t,n,i){this.messageReceiver=t,this.endpointId=n,this.providerIdentity=i,Pe.set(this,void 0),Me.set(this,new Map),_e.set(this,new Map),this.send=async(e,t,n)=>{const i=Re(this,Me,"f").get(e);if(!i)throw new Error(`Could not locate routing info for endpoint ${e}`);const r={...i};r.isLocalEndpointId&&delete r.endpointId,delete r.isLocalEndpointId;const o=Re(this,Pe,"f").sendAction("send-channel-message",{...r,providerIdentity:this.providerIdentity,action:t,payload:n});Re(this,_e,"f").get(e)?.add(o);return(await o.catch((e=>{throw new Error(e.message)})).finally((()=>{Re(this,_e,"f").get(e)?.delete(o)}))).payload.data.result},this.close=async()=>{this.messageReceiver.removeEndpoint(this.providerIdentity.channelId,this.endpointId),[...Re(this,Me,"f").keys()].forEach((e=>this.closeEndpoint(e))),Se(this,Me,new Map,"f")},Se(this,Pe,e,"f")}onEndpointDisconnect(e,t){}receive(e){this.messageReceiver.addEndpoint(e,this.providerIdentity.channelId,this.endpointId)}async closeEndpoint(e){const t=Re(this,Me,"f").get(e);Re(this,Me,"f").delete(e);const n=Re(this,_e,"f").get(e);n?.forEach((n=>{const i=`Channel connection with identity uuid: ${t?.uuid} / name: ${t?.name} / endpointId: ${e} no longer connected.`;n.cancel(new Error(i))}))}isEndpointConnected(e){return Re(this,Me,"f").has(e)}addEndpoint(e,t){Re(this,Me,"f").set(e,t.endpointIdentity),Re(this,_e,"f").set(e,new Set)}isValidEndpointPayload(e){return"string"==typeof e?.endpointIdentity?.endpointId||"string"==typeof e?.endpointIdentity?.channelId}},Pe=new WeakMap,Me=new WeakMap,_e=new WeakMap,Oe.ClassicInfo={version:5,minimumVersion:0,type:"classic"};var Fe={},je={},ke={};Object.defineProperty(ke,"__esModule",{value:!0}),ke.errorToPOJO=void 0,ke.errorToPOJO=function(e){return{stack:e.stack,name:e.name,message:e.message,toString:()=>e.stack||e.toString()}};var Le,Te,$e=s&&s.__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)},Be=s&&s.__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};Object.defineProperty(je,"__esModule",{value:!0}),je.RTCEndpoint=void 0;const Ge=ke;je.RTCEndpoint=class{static isValidEndpointPayload(e){const t=e=>"object"==typeof e&&null!==e;return t(e)&&t(e.endpointIdentity)&&t(e.rtc)&&"string"==typeof e.endpointIdentity.endpointId}constructor({rtc:e,endpointIdentity:t}){this.responseMap=new Map,Le.set(this,null),Te.set(this,void 0),this.connectionStateChangeHandler=e=>{"connected"!==this.rtc.rtcClient.connectionState&&(this.rtc.rtcClient.removeEventListener("connectionstatechange",this.connectionStateChangeHandler),this.close(),$e(this,Te,"f")&&$e(this,Te,"f").call(this))},this.send=async(e,t)=>{const n=`message-${Math.random()}`,i=new Promise(((e,t)=>{this.responseMap.set(n,{resolve:e,reject:t})}));return this.rtc.channels.request.send(JSON.stringify({action:e,payload:t,messageId:n})),i},this.close=()=>{this.responseMap.forEach((e=>e.reject("Connection has closed."))),this.responseMap=new Map,this.rtc.channels.request.close(),this.rtc.channels.response.close(),this.rtc.rtcClient.close()},this.rtc=e,this.endpointIdentity=t,this.rtc.channels.response.addEventListener("message",(e=>{let{data:t}=e;e.data instanceof ArrayBuffer&&(t=(new TextDecoder).decode(e.data));const{messageId:n,payload:i,success:r,error:o}=JSON.parse(t),{resolve:s,reject:a}=this.responseMap.get(n)??{};s&&a?(this.responseMap.delete(n),r?s(i):a(o)):(console.log("Could not find id in responseMap."),console.log(e))})),this.rtc.channels.request.addEventListener("message",(async e=>{let{data:n}=e;e.data instanceof ArrayBuffer&&(n=(new TextDecoder).decode(e.data));const{messageId:i,action:r,payload:o}=JSON.parse(n);if($e(this,Le,"f"))try{const e=await $e(this,Le,"f").call(this,r,o,t);this.rtc.channels.response.send(JSON.stringify({messageId:i,payload:e,success:!0}))}catch(e){"open"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,error:(0,Ge.errorToPOJO)(e),success:!1}))}else"open"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,success:!1,error:"Connection not ready."}))})),this.rtc.rtcClient.addEventListener("connectionstatechange",this.connectionStateChangeHandler),Object.values(this.rtc.channels).forEach((e=>{e.onclose=e=>{[...this.responseMap.values()].forEach((e=>e.reject(new Error("RTCDataChannel closed unexpectedly, this is most commonly caused by message size. Note: RTC Channels have a message size limit of ~255kB.")))),this.close(),$e(this,Te,"f")&&$e(this,Te,"f").call(this)}}))}onDisconnect(e){if($e(this,Te,"f"))throw new Error("RTCEndpoint disconnectListener cannot be set twice.");Be(this,Te,e,"f")}receive(e){if($e(this,Le,"f"))throw new Error("You have already set a listener for this RTC Endpoint.");Be(this,Le,e,"f")}get connected(){return"connected"===this.rtc.rtcClient.connectionState}},Le=new WeakMap,Te=new WeakMap;var We,He,Ne,De={},Ue=s&&s.__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)},Ve=s&&s.__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};Object.defineProperty(De,"__esModule",{value:!0}),De.EndpointStrategy=void 0;De.EndpointStrategy=class{constructor(e,t,n){this.EndpointType=e,this.StrategyName=n,We.set(this,null),He.set(this,new Map),Ne.set(this,!0),this.send=async(e,t,n)=>this.getEndpointById(e).send(t,n),this.close=async()=>{Ue(this,Ne,"f")&&(Ue(this,He,"f").forEach((e=>e.close())),Ve(this,He,new Map,"f")),Ve(this,Ne,!1,"f")},this.isValidEndpointPayload=t}onEndpointDisconnect(e,t){this.getEndpointById(e).onDisconnect(t)}receive(e){if(Ue(this,We,"f"))throw new Error(`You have already set a listener for this ${this.StrategyName} Strategy`);Ve(this,We,e,"f"),Ue(this,He,"f").forEach((e=>e.receive(Ue(this,We,"f"))))}getEndpointById(e){const t=Ue(this,He,"f").get(e);if(!t)throw new Error(`Client with endpoint id ${e} is not connected`);return t}get connected(){return Ue(this,Ne,"f")}isEndpointConnected(e){return Ue(this,He,"f").has(e)}addEndpoint(e,t){if(!Ue(this,Ne,"f"))return void console.warn(`Adding endpoint to disconnected ${this.StrategyName} Strategy`);const n=new this.EndpointType(t);Ue(this,We,"f")&&n.receive(Ue(this,We,"f")),Ue(this,He,"f").set(e,n)}async closeEndpoint(e){Ue(this,He,"f").delete(e)}},We=new WeakMap,He=new WeakMap,Ne=new WeakMap,Object.defineProperty(Fe,"__esModule",{value:!0}),Fe.RTCInfo=Fe.RTCStrategy=void 0;const ze=je,Ke=De;class qe extends Ke.EndpointStrategy{constructor(){super(ze.RTCEndpoint,ze.RTCEndpoint.isValidEndpointPayload,"RTC")}}Fe.RTCStrategy=qe,Fe.RTCInfo={version:2,minimumVersion:0,type:"rtc"};var Je={};Object.defineProperty(Je,"__esModule",{value:!0}),Je.RTCICEManager=void 0;const Ye=d;class Ze extends Ye.EmitterBase{constructor(e){super(e,"channel"),this.ensureChannelOpened=e=>new Promise(((t,n)=>{if("open"===e.readyState)t();else if("connecting"===e.readyState){const n=()=>{e.removeEventListener("open",n),t()};e.addEventListener("open",n)}else n(new Error("This Channel has already closed"))}))}static createDataChannelPromise(e,t){let n;const i=new Promise((e=>{n=e})),r=i=>{const o=()=>{i.channel.removeEventListener("open",o),n(i.channel)};i.channel.label===e&&(i.channel.addEventListener("open",o),t.removeEventListener("datachannel",r))};return t.addEventListener("datachannel",r),i}async listenForProviderIce(e,t){await this.on(this.createProviderEventName(e),t,{timestamp:Date.now()})}async raiseProviderIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createProviderEventName(e)),t)}async listenForClientIce(e,t){await this.on(this.createClientEventName(e),t,{timestamp:Date.now()})}async raiseClientIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createClientEventName(e)),t)}cleanupIceListeners(e){this.removeAllListeners(this.createClientEventName(e)),this.removeAllListeners(this.createProviderEventName(e))}createClientEventName(e){return`ice-client-${e}`}createProviderEventName(e){return`ice-provider-${e}`}createRouteString(e){return`channel/${e}`}createRtcPeer(){return this.wire.environment.getRtcPeer()}async startClientOffer(){const e=Math.random().toString(),t=this.createRtcPeer();t.addEventListener("icecandidate",(async t=>{t.candidate&&await this.raiseClientIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForProviderIce(e,(async e=>{await t.addIceCandidate(e.candidate)}));const n={request:t.createDataChannel("request"),response:t.createDataChannel("response")},i=await t.createOffer();await t.setLocalDescription(i);const r=Promise.all([n.request,n.response].map(this.ensureChannelOpened)).then((()=>{}));return{rtcClient:t,channels:n,offer:i,rtcConnectionId:e,channelsOpened:r}}async finishClientOffer(e,t,n){return await e.setRemoteDescription(t),await n,!0}async createProviderAnswer(e,t){const n=this.createRtcPeer(),i=Ze.createDataChannelPromise("request",n),r=Ze.createDataChannelPromise("response",n);n.addEventListener("icecandidate",(async t=>{t.candidate&&await this.raiseProviderIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForClientIce(e,(async e=>{await n.addIceCandidate(e.candidate)})),await n.setRemoteDescription(t);const o=await n.createAnswer();await n.setLocalDescription(o);const s=Promise.all([i,r]).then((([t,n])=>(this.cleanupIceListeners(e),{request:t,response:n})));return{rtcClient:n,answer:o,channels:s}}}Je.RTCICEManager=Ze;var Qe={},Xe={};function et(e){return[...e.split(".").reverse().entries()].reduce(((e,[t,n])=>e+ +n*1e4**t),0)}function tt(e,t){return et(e)>=et(t)}function nt(e){return e.split("/")[0]}Object.defineProperty(Xe,"__esModule",{value:!0}),Xe.runtimeUuidMeetsMinimumRuntimeVersion=Xe.parseRuntimeUuid=Xe.meetsMinimumRuntimeVersion=void 0,Xe.meetsMinimumRuntimeVersion=tt,Xe.parseRuntimeUuid=nt,Xe.runtimeUuidMeetsMinimumRuntimeVersion=function(e,t){return tt(nt(e),t)};var it,rt,ot,st,at,ct=s&&s.__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)},dt=s&&s.__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};Object.defineProperty(Qe,"__esModule",{value:!0}),Qe.ChannelProvider=void 0;const ht=pe,lt=Xe;class ut extends ht.ChannelBase{get connections(){return[...ct(this,it,"f")]}static handleClientDisconnection(e,t){const n=e.connections.find((e=>e.endpointId===t.endpointId));if(n)ct(e,st,"f").call(e,n);else{e.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name)).forEach(ct(e,st,"f"))}e.disconnectListener(t)}static setProviderRemoval(e,t){ut.removalMap.set(e,t)}constructor(e,t,n){super(),it.set(this,void 0),rt.set(this,void 0),ot.set(this,void 0),st.set(this,(e=>{const t=this.connections.filter((t=>t.endpointId!==e.endpointId));ct(this,ot,"f").closeEndpoint(e.endpointId),dt(this,it,t,"f")})),this.processAction=async(e,t,n)=>(ut.clientIsMultiRuntime(n)&&!(0,lt.runtimeUuidMeetsMinimumRuntimeVersion)(n.runtimeUuid,"18.87.56.0")?this.handleMultiRuntimeLegacyClient(n):this.checkForClientConnection(n),super.processAction(e,t,n)),at.set(this,(()=>{ct(this,ot,"f").close();const e=ut.removalMap.get(this);e&&e()})),dt(this,rt,new ht.ProtectedItems(e,t),"f"),this.connectListener=()=>{},this.disconnectListener=()=>{},dt(this,it,[],"f"),dt(this,ot,n,"f"),n.receive(this.processAction)}dispatch(e,t,n){const i=e.endpointId??this.getEndpointIdForOpenFinId(e,t);return i&&ct(this,ot,"f").isEndpointConnected(i)?ct(this,ot,"f").send(i,t,n):Promise.reject(new Error(`Client connection with identity uuid: ${e.uuid} / name: ${e.name} / endpointId: ${i} no longer connected.`))}async processConnection(e,t){return ct(this,it,"f").push(e),this.connectListener(e,t)}publish(e,t){return this.connections.map((n=>ct(this,ot,"f").send(n.endpointId,e,t)))}onConnection(e){this.connectListener=e}onDisconnection(e){this.disconnectListener=e}async destroy(){const e=ct(this,rt,"f");e.providerIdentity,dt(this,it,[],"f"),await e.close(),ct(this,at,"f").call(this)}async getAllClientInfo(){return this.connections.map((e=>{const{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}=e;return{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}}))}checkForClientConnection(e){if(!this.isClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider.\n Client Identity: {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}isClientConnected(e){return ut.clientIdentityIncludesEndpointId(e)?this.connections.some((t=>t.endpointId===e.endpointId&&t.uuid===e.uuid&&t.name===e.name)):this.isLegacyClientConnected(e)}isLegacyClientConnected(e){return this.connections.some((t=>t.uuid===e.uuid&&t.name===e.name))}handleMultiRuntimeLegacyClient(e){if(!this.isLegacyClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider. Client Identity:\n {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}getEndpointIdForOpenFinId(e,t){const n=this.connections.filter((t=>t.name===e.name&&t.uuid===e.uuid));if(n.length>=2){const n=ct(this,rt,"f"),{uuid:i,name:r}=e,o=n?.providerIdentity.uuid,s=n?.providerIdentity.name;console.warn(`WARNING: Dispatch call may have unintended results. The "to" argument of your dispatch call is missing the\n "endpointId" parameter. The identity you are dispatching to ({uuid: ${i}, name: ${r}})\n has multiple channelClients for this channel. Your dispatched action: (${t}) from the provider:\n ({uuid: ${o}, name: ${s}}) will only be processed by the most recently-created client.`)}return n.pop()?.endpointId}static clientIdentityIncludesEndpointId(e){return void 0!==e.endpointId}static clientIsMultiRuntime(e){return void 0!==e.runtimeUuid}static async wireClose(e,t){await e.sendAction("destroy-channel",{channelName:t})}}Qe.ChannelProvider=ut,it=new WeakMap,rt=new WeakMap,ot=new WeakMap,st=new WeakMap,at=new WeakMap,ut.removalMap=new WeakMap;var pt={};Object.defineProperty(pt,"__esModule",{value:!0}),pt.MessageReceiver=void 0;const wt=ue,yt=d;class ft extends yt.Base{constructor(e){super(e),this.onmessage=e=>"process-channel-message"===e.action&&(this.processChannelMessage(e),!0),this.endpointMap=new Map,this.latestEndpointIdByChannelId=new Map,e.registerMessageHandler(this.onmessage.bind(this))}async processChannelMessage(e){const{senderIdentity:t,providerIdentity:n,action:i,ackToSender:r,payload:o,intendedTargetIdentity:s}=e.payload,a=s.channelId??s.endpointId??this.latestEndpointIdByChannelId.get(n.channelId),c=this.endpointMap.get(a);if(!c)return r.payload.success=!1,r.payload.reason=`Client connection with identity uuid: ${this.wire.me.uuid} / name: ${this.wire.me.name} / endpointId: ${a} no longer connected.`,this.wire.sendRaw(r);try{const e=await c(i,o,t);return r.payload.payload=r.payload.payload||{},r.payload.payload.result=e,this.wire.sendRaw(r)}catch(e){return r.payload.success=!1,r.payload.reason=e.message,this.wire.sendRaw(r)}}addEndpoint(e,t,n){this.endpointMap.set(n,e),t!==n&&this.latestEndpointIdByChannelId.set(t,n)}removeEndpoint(e,t){this.endpointMap.delete(t),this.latestEndpointIdByChannelId.get(e)===t&&this.latestEndpointIdByChannelId.delete(e)}checkForPreviousClientConnection(e){const t=this.latestEndpointIdByChannelId.get(e);t&&(wt.ChannelClient.closeChannelByEndpointId(t),console.warn("You have created a second connection to an older provider. First connection has been removed from the clientMap"),console.warn("If the provider calls publish(), you may receive multiple messages."))}}pt.MessageReceiver=ft;var gt={};Object.defineProperty(gt,"__esModule",{value:!0}),gt.ProtocolManager=void 0;gt.ProtocolManager=class{constructor(e){this.ProtocolsInPreferenceOrder=e,this.DefaultClientProtocols=["classic"],this.DefaultProviderProtocols=["classic"],this.getClientProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultClientProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(", ")}.`);return t},this.getProviderProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultProviderProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(", ")}.`);return t},this.getCompatibleProtocols=(e,t)=>t.supportedProtocols.filter((t=>e.some((e=>e.type===t.type&&t.version>=e.minimumVersion&&e.version>=(t.minimumVersion??0))))).slice(0,t.maxProtocols)}};var mt={};Object.defineProperty(mt,"__esModule",{value:!0});class vt{static combine(e,t){return new vt(e,t)}constructor(e,t){this.primary=e,this.secondary=t}onEndpointDisconnect(e,t){this.primary.onEndpointDisconnect(e,(()=>{this.secondary.isEndpointConnected(e)||t()})),this.secondary.onEndpointDisconnect(e,(()=>{this.primary.isEndpointConnected(e)||t()}))}isValidEndpointPayload(e){return this.primary.isValidEndpointPayload(e)||this.secondary.isValidEndpointPayload(e)}async closeEndpoint(e){await this.primary.closeEndpoint(e),await this.secondary.closeEndpoint(e)}isEndpointConnected(e){return this.primary.isEndpointConnected(e)||this.secondary.isEndpointConnected(e)}async addEndpoint(e,t){this.primary.isValidEndpointPayload(t)&&await this.primary.addEndpoint(e,t),this.secondary.isValidEndpointPayload(t)&&await this.secondary.addEndpoint(e,t)}receive(e){this.primary.receive(e),this.secondary.receive(e)}send(e,t,n){return this.primary.isEndpointConnected(e)?this.primary.send(e,t,n):this.secondary.send(e,t,n)}async close(){await Promise.all([this.primary.close(),this.secondary.close()])}}mt.default=vt;var Ct,bt,It=s&&s.__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},Et=s&&s.__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)},xt=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(xe,"__esModule",{value:!0}),xe.ConnectionManager=void 0;const At=Ae,Pt=d,Mt=Oe,_t=Fe,Ot=Je,St=Qe,Rt=pt,Ft=gt,jt=xt(mt);class kt extends Pt.Base{static getProtocolOptionsFromStrings(e){return e.map((e=>{switch(e){case"rtc":return _t.RTCInfo;case"classic":return Mt.ClassicInfo;default:return(0,At.exhaustiveCheck)(e,["rtc","classic"])}}))}constructor(e){super(e),Ct.set(this,void 0),bt.set(this,void 0),this.removeChannelFromProviderMap=e=>{this.providerMap.delete(e)},this.onmessage=e=>"process-channel-connection"===e.action&&(this.processChannelConnection(e),!0),this.providerMap=new Map,this.protocolManager=new Ft.ProtocolManager("node"===this.wire.environment.type?["classic"]:["rtc","classic"]),It(this,Ct,new Rt.MessageReceiver(e),"f"),It(this,bt,new Ot.RTCICEManager(e),"f"),e.registerMessageHandler(this.onmessage.bind(this))}createProvider(e,t){const n=Object.assign(this.wire.environment.getDefaultChannelOptions().create,e||{}),i=this.protocolManager.getProviderProtocols(n?.protocols),r=i.map((e=>{switch(e){case"rtc":return new _t.RTCStrategy;case"classic":return new Mt.ClassicStrategy(this.wire,Et(this,Ct,"f"),t.channelId,t);default:return(0,At.exhaustiveCheck)(e,["rtc","classic"])}}));let o;if(2===r.length){const[e,t]=r;o=jt.default.combine(e,t)}else{if(1!==r.length)throw new Error("failed to combine strategies");[o]=r}const s=new St.ChannelProvider(t,(()=>St.ChannelProvider.wireClose(this.wire,t.channelName)),o),a=t.channelId;return this.providerMap.set(a,{provider:s,strategy:o,supportedProtocols:kt.getProtocolOptionsFromStrings(i)}),St.ChannelProvider.setProviderRemoval(s,this.removeChannelFromProviderMap.bind(this)),s}async createClientOffer(e){const t=this.protocolManager.getClientProtocols(e?.protocols);let n;return{offer:{supportedProtocols:await Promise.all(t.map((async e=>{switch(e){case"rtc":{const{rtcClient:e,channels:t,offer:i,rtcConnectionId:r,channelsOpened:o}=await Et(this,bt,"f").startClientOffer();return n={rtcClient:e,channels:t,channelsOpened:o},{type:"rtc",version:_t.RTCInfo.version,payload:{offer:i,rtcConnectionId:r}}}case"classic":return{type:"classic",version:Mt.ClassicInfo.version};default:return(0,At.exhaustiveCheck)(e,["rtc","classic"])}}))),maxProtocols:2},rtc:n}}async createClientStrategy(e,t){t.endpointId||(t.endpointId=this.wire.environment.getNextMessageId(),Et(this,Ct,"f").checkForPreviousClientConnection(t.channelId));const n=t.answer??{supportedProtocols:[{type:"classic",version:1}]},i=(await Promise.all(n.supportedProtocols.map((async n=>"rtc"===n.type&&e?(await Et(this,bt,"f").finishClientOffer(e.rtcClient,n.payload.answer,e.channelsOpened),new _t.RTCStrategy):"classic"===n.type?new Mt.ClassicStrategy(this.wire,Et(this,Ct,"f"),t.endpointId,t):null)))).filter((e=>null!==e));let r;if(e&&!i.some((e=>e instanceof _t.RTCStrategy))&&e&&e.rtcClient.close(),i.length>=2)r=jt.default.combine(i[0],i[1]);else{if(!i.length)throw new Error("No compatible protocols");[r]=i}const o={endpointIdentity:t,rtc:e};return r.addEndpoint(t.channelId,o),r}async processChannelConnection(e){const{clientIdentity:t,providerIdentity:n,ackToSender:i,payload:r,offer:o}=e.payload;t.endpointId?t.isLocalEndpointId=!1:(t.endpointId=this.wire.environment.getNextMessageId(),t.isLocalEndpointId=!0);const s=n.channelId,a=this.providerMap.get(s);if(!a)return i.payload.success=!1,i.payload.reason=`Channel "${n.channelName}" has been destroyed.`,this.wire.sendRaw(i);const{provider:c,strategy:d,supportedProtocols:h}=a;try{if(!(c instanceof St.ChannelProvider))throw Error("Cannot connect to a channel client");const e=o??{supportedProtocols:[{type:"classic",version:1}],maxProtocols:1},n=this.protocolManager.getCompatibleProtocols(h,e);if(!n.length)throw new Error("This provider does not support any of the offered protocols.");const s=await c.processConnection(t,r);i.payload.payload=i.payload.payload||{};let a={supportedProtocols:[],endpointPayloadPromise:Promise.resolve({endpointIdentity:t})};return a=await n.reduce((async(e,t)=>{const n=await e;if("rtc"===t.type){const{answer:e,rtcClient:i,channels:r}=await Et(this,bt,"f").createProviderAnswer(t.payload.rtcConnectionId,t.payload.offer);n.supportedProtocols.push({type:"rtc",version:_t.RTCInfo.version,payload:{answer:e}}),n.endpointPayloadPromise=n.endpointPayloadPromise.then((e=>r.then((t=>({...e,rtc:{rtcClient:i,channels:t}})))))}else n.supportedProtocols.push({type:"classic",version:Mt.ClassicInfo.version});return n}),Promise.resolve(a)),a.endpointPayloadPromise.then((e=>d.addEndpoint(t.endpointId,e))),i.payload.payload.result=s,i.payload.payload.answer=a,this.wire.sendRaw(i)}catch(e){return i.payload.success=!1,i.payload.reason=e.message,this.wire.sendRaw(i)}}}xe.ConnectionManager=kt,Ct=new WeakMap,bt=new WeakMap;var Lt,Tt,$t,Bt=s&&s.__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},Gt=s&&s.__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)};Object.defineProperty(le,"__esModule",{value:!0}),le.Channel=void 0;const Wt=t,Ht=G,Nt=d,Dt=ue,Ut=xe,Vt=Qe;function zt(e){const t=Math.floor(e/10),n=Math.min(3e4,500*2**t);return new Promise((e=>{setTimeout((()=>{e(!1)}),n)}))}class Kt extends Nt.EmitterBase{constructor(e){super(e,"channel"),Lt.set(this,void 0),Tt.set(this,new Wt.EventEmitter),$t.set(this,new Ht.AsyncRetryableLazy((async()=>{await Promise.all([this.on("disconnected",(e=>{Dt.ChannelClient.handleProviderDisconnect(e)})),this.on("connected",((...e)=>{Gt(this,Tt,"f").emit("connected",...e)}))]).catch((()=>new Error("error setting up channel connection listeners")))}))),Bt(this,Lt,new Ut.ConnectionManager(e),"f")}async getAllChannels(){return this.wire.sendAction("get-all-channels").then((({payload:e})=>e.data))}async onChannelConnect(e){await this.on("connected",e)}async onChannelDisconnect(e){await this.on("disconnected",e)}async safeConnect(e,t,n){const i={count:0};do{let r=()=>{};const o=new Promise((t=>{r=n=>{e===n.channelName&&t(!0)},Gt(this,Tt,"f").on("connected",r)}));try{if(i.count>0){i.gotConnectedEvent=await Promise.race([zt(i.count),o]);const t=await this.wire.sendAction("connect-to-channel",{...n,retryInfo:i});return console.log(`Successfully connected to channelName: ${e}`),t.payload.data}const t=this.wire.sendAction("connect-to-channel",n);i.originalMessageId=t.messageId;return(await t).payload.data}catch(n){if(!n.message.includes("internal-nack"))throw n;t&&0===i.count&&console.warn(`No channel found for channelName: ${e}. Waiting for connection...`)}finally{i.count+=1,Gt(this,Tt,"f").removeListener("connected",r)}}while(t);throw new Error(`No channel found for channelName: ${e}.`)}async connect(e,t={}){if(await Gt(this,$t,"f").getValue(),!e||"string"!=typeof e)throw new Error("Please provide a channelName string to connect to a channel.");const n={wait:!0,...this.wire.environment.getDefaultChannelOptions().connect,...t},{offer:i,rtc:r}=await Gt(this,Lt,"f").createClientOffer(n);let o;(this.fin.me.isFrame||this.fin.me.isView||this.fin.me.isWindow)&&(o=(await this.fin.me.getInfo()).url);const s={channelName:e,...n,offer:i,connectionUrl:o},a=await this.safeConnect(e,n.wait,s),c=await Gt(this,Lt,"f").createClientStrategy(r,a),d=new Dt.ChannelClient(a,(()=>Dt.ChannelClient.wireClose(this.wire,a,a.endpointId)),c);return c.onEndpointDisconnect(a.channelId,(async()=>{try{await d.sendDisconnectAction()}catch(e){console.warn(`Something went wrong during disconnect for client with uuid: ${a.uuid} / name: ${a.name} / endpointId: ${a.endpointId}.`)}finally{Dt.ChannelClient.handleProviderDisconnect(a)}})),d}async create(e,t){if(!e)throw new Error("Please provide a channelName to create a channel");const{payload:{data:n}}=await this.wire.sendAction("create-channel",{channelName:e}),i=Gt(this,Lt,"f").createProvider(t,n);return this.on("client-disconnected",(t=>{t.channelName===e&&Vt.ChannelProvider.handleClientDisconnection(i,t)})),i}}le.Channel=Kt,Lt=new WeakMap,Tt=new WeakMap,$t=new WeakMap,Object.defineProperty(de,"__esModule",{value:!0}),de.InterAppPayload=de.InterApplicationBus=void 0;const qt=t,Jt=d,Yt=he,Zt=le,Qt=O;class Xt extends Jt.Base{constructor(e){super(e),this.events={subscriberAdded:"subscriber-added",subscriberRemoved:"subscriber-removed"},this.refCounter=new Yt.RefCounter,this.Channel=new Zt.Channel(e),this.emitter=new qt.EventEmitter,e.registerMessageHandler(this.onmessage.bind(this)),this.on=this.emitter.on.bind(this.emitter),this.removeAllListeners=this.emitter.removeAllListeners.bind(this.emitter)}async publish(e,t){await this.wire.sendAction("publish-message",{topic:e,message:t,sourceWindowName:this.me.name})}async send(e,t,n){const i=(0,Qt.validateIdentity)(e);if(i)throw new Error(i);await this.wire.sendAction("send-message",{destinationUuid:e.uuid,destinationWindowName:e.name,topic:t,message:n,sourceWindowName:this.me.name})}subscribe(e,t,n){const i=this.createSubscriptionKey(e.uuid,e.name||"*",t);return this.emitter.on(i,n),this.refCounter.actOnFirst(i,(async()=>{await this.wire.sendAction("subscribe",{sourceUuid:e.uuid,sourceWindowName:e.name||"*",topic:t,destinationWindowName:this.me.name})}),(()=>Promise.resolve()))}unsubscribe(e,t,n){const i=e.name||"*",r=this.createSubscriptionKey(e.uuid,i,t);return this.emitter.removeListener(r,n),this.refCounter.actOnLast(r,(async()=>{await this.wire.sendAction("unsubscribe",{sourceUuid:e.uuid,sourceWindowName:i,topic:t,destinationWindowName:this.me.name})}),(()=>new Promise((e=>e)).then((()=>{}))))}processMessage(e){const{payload:{message:t,sourceWindowName:n,sourceUuid:i,topic:r}}=e,o=[this.createSubscriptionKey(i,n,r),this.createSubscriptionKey(i,"*",r),this.createSubscriptionKey("*","*",r)],s={uuid:i,name:n};o.forEach((e=>{this.emitter.emit(e,t,s)}))}emitSubscriverEvent(e,t){const{payload:{targetName:n,uuid:i,topic:r}}=t,o={name:n,uuid:i,topic:r};this.emitter.emit(e,o)}createSubscriptionKey(e,t,n){const i=t||"*";if(!(e&&i&&n))throw new Error("Missing uuid, name, or topic string");return function(...e){return e.map((e=>Buffer.from(`${e}`).toString("base64"))).join("/")}(e,i,n)}onmessage(e){const{action:t}=e;switch(t){case"process-message":this.processMessage(e);break;case this.events.subscriberAdded:this.emitSubscriverEvent(this.events.subscriberAdded,e);break;case this.events.subscriberRemoved:this.emitSubscriverEvent(this.events.subscriberRemoved,e)}return!0}}de.InterApplicationBus=Xt;de.InterAppPayload=class{};var en={};Object.defineProperty(en,"__esModule",{value:!0}),en.Clipboard=void 0;const tn=d;class nn extends tn.Base{async writeText(e){await this.wire.sendAction("clipboard-write-text",e)}async readText(e){const{payload:t}=await this.wire.sendAction("clipboard-read-text",{type:e});return t.data}async writeImage(e){await this.wire.sendAction("clipboard-write-image",e)}async readImage(e={format:"dataURL"}){const{payload:t}=await this.wire.sendAction("clipboard-read-image",e);return t.data}async writeHtml(e){await this.wire.sendAction("clipboard-write-html",e)}async readHtml(e){const{payload:t}=await this.wire.sendAction("clipboard-read-html",{type:e});return t.data}async writeRtf(e){await this.wire.sendAction("clipboard-write-rtf",e)}async readRtf(e){const{payload:t}=await this.wire.sendAction("clipboard-read-rtf",{type:e});return t.data}async write(e){await this.wire.sendAction("clipboard-write",e)}async getAvailableFormats(e){const{payload:t}=await this.wire.sendAction("clipboard-read-formats",{type:e});return t.data}}en.Clipboard=nn;var rn={},on={},sn={};Object.defineProperty(sn,"__esModule",{value:!0}),sn.ExternalApplication=void 0;const an=d;class cn extends an.EmitterBase{constructor(e,t){super(e,"external-application",t.uuid),this.identity=t}getInfo(){return this.wire.sendAction("get-external-application-info",this.identity).then((({payload:e})=>e.data))}}sn.ExternalApplication=cn,Object.defineProperty(on,"__esModule",{value:!0}),on.ExternalApplicationModule=void 0;const dn=d,hn=sn;class ln extends dn.Base{wrap(e){return this.wire.sendAction("external-application-wrap").catch((e=>{})),Promise.resolve(new hn.ExternalApplication(this.wire,{uuid:e}))}wrapSync(e){return this.wire.sendAction("external-application-wrap-sync").catch((e=>{})),new hn.ExternalApplication(this.wire,{uuid:e})}}on.ExternalApplicationModule=ln,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(on,e),n(sn,e)}(rn);var un={},pn={},wn={};Object.defineProperty(wn,"__esModule",{value:!0}),wn._Frame=void 0;const yn=d;class fn extends yn.EmitterBase{constructor(e,t){super(e,"frame",t.uuid,t.name),this.identity=t}getInfo(){return this.wire.sendAction("get-frame-info",this.identity).then((({payload:e})=>e.data))}getParentWindow(){return this.wire.sendAction("get-parent-window",this.identity).then((({payload:e})=>e.data))}}wn._Frame=fn,Object.defineProperty(pn,"__esModule",{value:!0}),pn._FrameModule=void 0;const gn=d,mn=O,vn=wn;class Cn extends gn.Base{async wrap(e){this.wire.sendAction("frame-wrap").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}wrapSync(e){this.wire.sendAction("frame-wrap-sync").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}getCurrent(){return this.wire.sendAction("frame-get-current").catch((e=>{})),Promise.resolve(new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity()))}getCurrentSync(){return this.wire.sendAction("frame-get-current-sync").catch((e=>{})),new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity())}}pn._FrameModule=Cn,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(pn,e),n(wn,e)}(un);var bn={};Object.defineProperty(bn,"__esModule",{value:!0}),bn.GlobalHotkey=void 0;const In=d;class En extends In.EmitterBase{constructor(e){super(e,"global-hotkey")}async register(e,t){await this.on(e,t),await this.wire.sendAction("global-hotkey-register",{hotkey:e})}async unregister(e){await this.removeAllListeners(e),await this.wire.sendAction("global-hotkey-unregister",{hotkey:e})}async unregisterAll(){await Promise.all(this.eventNames().filter((e=>!("registered"===e||"unregistered"===e))).map((e=>this.removeAllListeners(e)))),await this.wire.sendAction("global-hotkey-unregister-all",{})}async isRegistered(e){const{payload:{data:t}}=await this.wire.sendAction("global-hotkey-is-registered",{hotkey:e});return t}}bn.GlobalHotkey=En;var xn,An={},Pn={},Mn={},_n=s&&s.__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)};Object.defineProperty(Mn,"__esModule",{value:!0}),Mn.Platform=void 0;const On=d,Sn=O,Rn=new Map;class Fn extends On.EmitterBase{constructor(e,t){super(t.wire,"application",e.uuid),this.getClient=e=>{this.wire.sendAction("platform-get-client",this.identity).catch((e=>{}));const t=e||this.identity,{uuid:n}=t;if(!Rn.has(n)){const e=_n(this,xn,"f").call(this,n);Rn.set(n,e)}return Rn.get(n)},xn.set(this,(async e=>{try{const t=`custom-frame-${e}`,n=await this._channel.connect(t,{wait:!1});return n.onDisconnection((()=>{Rn.delete(e)})),n}catch(t){throw Rn.delete(e),new Error("The targeted Platform is not currently running. Listen for application-started event for the given Uuid.")}})),this.launchLegacyManifest=this.launchContentManifest;const n=(0,Sn.validateIdentity)(e);if(n)throw new Error(n);this._channel=t,this.identity={uuid:e.uuid},this.Layout=this.fin.Platform.Layout,this.Application=this.fin.Application.wrapSync(this.identity)}async createView(e,t,n){this.wire.sendAction("platform-create-view",this.identity).catch((e=>{}));const i=await this.getClient(),r=await i.dispatch("create-view",{target:t,opts:e,targetView:n});if(!r||(0,Sn.validateIdentity)(r.identity))throw new Error(`When overwriting the createView call, please return an object that has a valid 'identity' property: ${JSON.stringify(r)}`);return this.fin.View.wrapSync(r.identity)}async createWindow(e){this.wire.sendAction("platform-create-window",this.identity).catch((e=>{}));const t=await this.getClient();e.reason||(e.reason="api-call");const n=await t.dispatch("create-view-container",e);if(!n||(0,Sn.validateIdentity)(n.identity))throw new Error(`When overwriting the createWindow call, please return an object that has a valid 'identity' property: ${JSON.stringify(n)}`);const{identity:i}=n,r=this.fin.Window.wrapSync(i);return r.name=i.name,r.uuid=i.uuid,r}async quit(){this.wire.sendAction("platform-quit",this.identity).catch((e=>{}));return(await this.getClient()).dispatch("quit")}async closeView(e){this.wire.sendAction("platform-close-view",this.identity).catch((e=>{}));const t=await this.getClient();await t.dispatch("close-view",{view:e})}async reparentView(e,t){console.warn("Platform.reparentView has been deprecated, please use Platform.createView"),this.wire.sendAction("platform-reparent-view",this.identity).catch((e=>{}));const n={...e,uuid:e.uuid??this.identity.uuid},i=await this.fin.View.wrap(n),r=await i.getOptions();return this.createView(r,t)}async getSnapshot(){this.wire.sendAction("platform-get-snapshot",this.identity).catch((e=>{}));return(await this.getClient()).dispatch("get-snapshot")}async getViewSnapshot(e){return(await this.getClient()).dispatch("get-view-snapshot",{viewIdentity:e})}async applySnapshot(e,t){this.wire.sendAction("platform-apply-snapshot",this.identity).catch((e=>{}));const n="Requested snapshot must be a valid Snapshot object, or a url or filepath to such an object.";let i;if("string"==typeof e)try{i=(await this._channel.wire.sendAction("get-application-manifest",{manifestUrl:e})).payload.data}catch(e){throw new Error(`${n}: ${e}`)}else i=e;if(!i.windows)throw new Error(n);const r=await this.getClient();return await r.dispatch("apply-snapshot",{snapshot:i,options:t}),this}async fetchManifest(e){return(await this.getClient()).dispatch("platform-fetch-manifest",{manifestUrl:e})}async launchContentManifest(e){this.wire.sendAction("platform-launch-content-manifest",this.identity).catch((()=>{}));const t=await this.getClient(),n=await this.fetchManifest(e);return t.dispatch("launch-into-platform",{manifest:n,manifestUrl:e}),this}async setWindowContext(e={},t){if(this.wire.sendAction("platform-set-window-context",this.identity).catch((e=>{})),!e)throw new Error("Please provide a serializable object or string to set the context.");const n=await this.getClient(),{entityType:i}=t?await this.fin.System.getEntityInfo(t.uuid,t.name):this.fin.me;await n.dispatch("set-window-context",{context:e,entityType:i,target:t||{uuid:this.fin.me.uuid,name:this.fin.me.name}})}async getWindowContext(e){this.wire.sendAction("platform-get-window-context",this.identity).catch((e=>{}));const t=await this.getClient(),{entityType:n}=e?await this.fin.System.getEntityInfo(e.uuid,e.name):this.fin.me;return t.dispatch("get-window-context",{target:e||{uuid:this.fin.me.uuid,name:this.fin.me.name},entityType:n})}async closeWindow(e,t={skipBeforeUnload:!1}){this.wire.sendAction("platform-close-window",this.identity).catch((e=>{}));return(await this.getClient()).dispatch("close-window",{windowId:e,options:t})}}Mn.Platform=Fn,xn=new WeakMap;var jn={},kn={},Ln={},Tn={};function $n(e){switch(e){case"columns":case"grid":case"rows":case"tabs":return!0;default:return!1}}Object.defineProperty(Tn,"__esModule",{value:!0}),Tn.overrideFromComposables=Tn.isValidPresetType=void 0,Tn.isValidPresetType=$n,Tn.overrideFromComposables=function(...e){return t=>e.reduceRight(((e,t)=>n=>t(e(n))),(e=>e))(t)},Tn.default={isValidPresetType:$n};var Bn={},Gn={},Wn={};Object.defineProperty(Wn,"__esModule",{value:!0}),Wn.ApiConsumer=void 0;Wn.ApiConsumer=class{constructor(e){this.strategy=e,this.consume=async e=>(await this.strategy.getExposedFunctions(e)).reduce(((t,n)=>({...t,[n.key]:this.strategy.createFunction(n,e)})),{})}};var Hn={},Nn={};Object.defineProperty(Nn,"__esModule",{value:!0}),Nn.expose=Nn.getExposedProperties=void 0;const Dn=Symbol("exposedProperties");Nn.getExposedProperties=e=>e[Dn]||e.prototype[Dn]||[];Nn.expose=e=>(t,n,i)=>{t[Dn]=t[Dn]||[],t[Dn].push({key:n,descriptor:i,options:e})},Object.defineProperty(Hn,"__esModule",{value:!0}),Hn.ApiExposer=void 0;const Un=Nn;Hn.ApiExposer=class{constructor(e){this.strategy=e,this.exposeInstance=async(e,t)=>{const n=(0,Un.getExposedProperties)(e),i=await Promise.all(n.map((async({key:n,options:i})=>({key:n,options:await this.strategy.exposeFunction(e[n].bind(e),{key:n,options:i,meta:t})}))));await this.strategy.exposeMeta(t,i)}}};var Vn={},zn={},Kn={};Object.defineProperty(Kn,"__esModule",{value:!0}),Kn.ChannelsConsumer=void 0;Kn.ChannelsConsumer=class{constructor(e){this.channel=e,this.getExposedFunctions=async e=>{const{id:t}=e,{props:n}=await this.channel.dispatch(`api-meta:${t}`);return n},this.createFunction=e=>(...t)=>{const{action:n}=e.options;return this.channel.dispatch(n,{args:t})}}};var qn={};Object.defineProperty(qn,"__esModule",{value:!0}),qn.ChannelsExposer=void 0;qn.ChannelsExposer=class{constructor(e){this.channelProviderOrClient=e,this.exposeFunction=async(e,t)=>{const{key:n,options:i,meta:r}=t,{id:o}=r,s=`${o}.${i?.action||n}`;return await this.channelProviderOrClient.register(s,(async({args:t})=>e(...t))),{action:s}},this.exposeMeta=async({id:e},t)=>{const n=`api-meta:${e}`;await this.channelProviderOrClient.register(n,(()=>({props:t})))}}},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Kn,e),n(qn,e)}(zn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(zn,e)}(Vn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Wn,e),n(Hn,e),n(Vn,e),n(Nn,e)}(Gn);var Jn={};Object.defineProperty(Jn,"__esModule",{value:!0}),Jn.createRelayedDispatch=exports.relayChannelClientApi_1=Jn.relayChannelClientApi=void 0;const Yn=["no longer connected","RTCDataChannel closed unexpectedly","The client you are trying to dispatch from is disconnected from the target provider"];exports.relayChannelClientApi_1=Jn.relayChannelClientApi=async(e,t)=>{e.register(`relay:${t}`,(({action:t,target:n,payload:i})=>e.dispatch(n,t,i))),await Promise.resolve()};Jn.createRelayedDispatch=(e,t,n,i)=>async(r,o)=>{try{return await e.dispatch(`relay:${n}`,{action:r,payload:o,target:t})}catch(e){if(s=e.message,Yn.some((e=>s.includes(e)))&&i)throw new Error(i);throw e}var s};var Zn,Qn,Xn,ei=s&&s.__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},ti=s&&s.__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)};Object.defineProperty(Bn,"__esModule",{value:!0}),Bn.ColumnOrRow=Bn.TabStack=Bn.LayoutNode=void 0;const ni=Gn,ii=Jn;class ri{constructor(e,t){Zn.set(this,void 0),this.isRoot=()=>ti(this,Zn,"f").isRoot(this.entityId),this.exists=()=>ti(this,Zn,"f").exists(this.entityId),this.getParent=async()=>{const e=await ti(this,Zn,"f").getParent(this.entityId);if(e)return ri.getEntity(e,ti(this,Zn,"f"))},this.createAdjacentStack=async(e,t)=>{const n=await ti(this,Zn,"f").createAdjacentStack(this.entityId,e,t);return ri.getEntity({entityId:n,type:"stack"},ti(this,Zn,"f"))},this.getAdjacentStacks=async e=>(await ti(this,Zn,"f").getAdjacentStacks({targetId:this.entityId,edge:e})).map((e=>ri.getEntity({type:"stack",entityId:e.entityId},ti(this,Zn,"f")))),ei(this,Zn,e,"f"),this.entityId=t}}Bn.LayoutNode=ri,Zn=new WeakMap,ri.newLayoutEntitiesClient=async(e,t,n)=>{const i=(0,ii.createRelayedDispatch)(e,n,"layout-relay","You are trying to interact with a layout component on a window that does not exist or has been destroyed.");return new ni.ApiConsumer(new ni.ChannelsConsumer({dispatch:i})).consume({id:t})},ri.getEntity=(e,t)=>{const{entityId:n,type:i}=e;switch(i){case"column":case"row":return new si(t,n,i);case"stack":return new oi(t,n);default:throw new Error(`Unrecognised Layout Entity encountered ('${JSON.stringify(e)})`)}};class oi extends ri{constructor(e,t){super(e,t),Qn.set(this,void 0),this.type="stack",this.getViews=()=>ti(this,Qn,"f").getStackViews(this.entityId),this.addView=async(e,t={index:0})=>ti(this,Qn,"f").addViewToStack(this.entityId,e,t),this.removeView=async e=>{await ti(this,Qn,"f").removeViewFromStack(this.entityId,e)},this.setActiveView=async e=>{await ti(this,Qn,"f").setStackActiveView(this.entityId,e)},ei(this,Qn,e,"f")}}Bn.TabStack=oi,Qn=new WeakMap;class si extends ri{constructor(e,t,n){super(e,t),Xn.set(this,void 0),this.getContent=async()=>(await ti(this,Xn,"f").getContent(this.entityId)).map((e=>ri.getEntity(e,ti(this,Xn,"f")))),ei(this,Xn,e,"f"),this.type=n}}Bn.ColumnOrRow=si,Xn=new WeakMap;var ai={};Object.defineProperty(ai,"__esModule",{value:!0}),ai.DEFAULT_LAYOUT_KEY=ai.LAYOUT_CONTROLLER_ID=void 0,ai.LAYOUT_CONTROLLER_ID="layout-entities",ai.DEFAULT_LAYOUT_KEY="__default__";var ci,di,hi,li=s&&s.__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)};Object.defineProperty(Ln,"__esModule",{value:!0}),Ln.Layout=void 0;const ui=G,pi=O,wi=d,yi=Tn,fi=Bn,gi=ai;class mi extends wi.Base{static getClient(e){return li(e,di,"f").getValue()}constructor(e,t){super(t),ci.add(this),di.set(this,new ui.Lazy((async()=>fi.LayoutNode.newLayoutEntitiesClient(await this.platform.getClient(),gi.LAYOUT_CONTROLLER_ID,this.identity)))),this.replace=async e=>{this.wire.sendAction("layout-replace").catch((e=>{}));const t=await this.platform.getClient();await t.dispatch("replace-layout",{target:this.identity,opts:{layout:e}})},this.replaceView=async(e,t)=>{this.wire.sendAction("layout-replace-view").catch((e=>{}));const n=await this.platform.getClient();await n.dispatch("replace-view",{target:this.identity,opts:{viewToReplace:e,newView:t}})},this.applyPreset=async e=>{this.wire.sendAction("layout-apply-preset").catch((e=>{}));const t=await this.platform.getClient(),{presetType:n}=e;if(!n||!(0,yi.isValidPresetType)(n))throw new Error("Cannot apply preset layout, please include an applicable presetType property in the PresetLayoutOptions.");await t.dispatch("apply-preset-layout",{target:this.identity,opts:{presetType:n}})};const n=(0,pi.validateIdentity)(e);if(n)throw new Error(n);this.identity=e,this.platform=this.fin.Platform.wrapSync({uuid:e.uuid}),e.uuid===this.fin.me.uuid&&e.name===this.fin.me.name&&(this.init=this.fin.Platform.Layout.init)}async getConfig(){this.wire.sendAction("layout-get-config").catch((e=>{}));return(await this.platform.getClient()).dispatch("get-frame-snapshot",{target:this.identity})}async getCurrentViews(){this.wire.sendAction("layout-get-views").catch((e=>{}));const e=await this.platform.getClient();return(await e.dispatch("get-layout-views",{target:this.identity})).map((e=>this.fin.View.wrapSync(e)))}async getRootItem(){this.wire.sendAction("layout-get-root-item").catch((()=>{}));const e=await li(this,di,"f").getValue(),t=await e.getRoot("layoutName"in this.identity?this.identity:void 0);return fi.LayoutNode.getEntity(t,e)}async getStackByViewIdentity(e){this.wire.sendAction("layout-get-stack-by-view").catch((()=>{}));const t=await li(this,di,"f").getValue(),n=await t.getStackByView(e);if(!n)throw new Error(`No stack found for view: ${e.uuid}/${e.name}`);return fi.LayoutNode.getEntity(n,t)}async addView(e,{location:t,targetView:n}={}){this.wire.sendAction("layout-add-view").catch((e=>{}));const{identity:i}=await li(this,ci,"m",hi).call(this,"layout-add-view",{viewOptions:e,location:t,targetView:n});return{identity:i}}async closeView(e){this.wire.sendAction("layout-close-view").catch((e=>{})),await li(this,ci,"m",hi).call(this,"layout-close-view",{viewIdentity:e})}}Ln.Layout=mi,di=new WeakMap,ci=new WeakSet,hi=async function(e,t){return(await this.platform.getClient()).dispatch(e,{target:this.identity,opts:t})};var vi,Ci,bi,Ii,Ei,xi=s&&s.__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)},Ai=s&&s.__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};Object.defineProperty(kn,"__esModule",{value:!0}),kn.LayoutModule=void 0;const Pi=d,Mi=Ln,_i=ai;class Oi extends Pi.Base{constructor(){super(...arguments),vi.add(this),Ci.set(this,!1),bi.set(this,null),this.init=async(e={})=>{if(this.wire.sendAction("layout-init").catch((e=>{})),!this.wire.environment.layoutAllowedInContext(this.fin))throw new Error("Layout.init can only be called from a Window context.");if(xi(this,Ci,"f"))throw new Error("Layout.init was already called, please use Layout.create to add additional layouts.");"openfin"===this.wire.environment.type&&await this.fin.Platform.getCurrentSync().getClient(),Ai(this,Ci,!0,"f"),Ai(this,bi,await this.wire.environment.initLayoutManager(this.fin,this.wire,e),"f"),await this.wire.environment.applyLayoutSnapshot(this.fin,xi(this,bi,"f"),e);const t={name:this.fin.me.name,uuid:this.fin.me.uuid};if(!e.layoutManagerOverride){const e={layoutName:_i.DEFAULT_LAYOUT_KEY,...t};return xi(this,Ii,"f").call(this,e)}return this.wrapSync(t)},Ii.set(this,(e=>{const t="[Layout] You are using a deprecated property `layoutManager` - it will throw if you access it starting in v37.",n=new Proxy({},{get(e,n){throw console.warn(`[Layout-mgr-proxy] accessing ${n.toString()}`),new Error(t)}}),i=Object.assign(this.wrapSync(e),{layoutManager:n});return new Proxy(i,{get(e,n){if("layoutManager"===n)throw console.warn(`[Layout-proxy] accessing ${n.toString()}`),new Error(t);return e[n]}})})),this.getCurrentLayoutManagerSync=()=>xi(this,vi,"m",Ei).call(this,"fin.Platform.Layout.getCurrentLayoutManagerSync()"),this.create=async e=>this.wire.environment.createLayout(xi(this,vi,"m",Ei).call(this,"fin.Platform.Layout.create()"),e),this.destroy=async e=>this.wire.environment.destroyLayout(xi(this,vi,"m",Ei).call(this,"fin.Platform.Layout.destroy()"),e)}async wrap(e){return this.wire.sendAction("layout-wrap").catch((e=>{})),new Mi.Layout(e,this.wire)}wrapSync(e){return this.wire.sendAction("layout-wrap-sync").catch((e=>{})),new Mi.Layout(e,this.wire)}async getCurrent(){if(this.wire.sendAction("layout-get-current").catch((e=>{})),"openfin"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error("You are not in a Window context. Only Windows can have a Layout.");const{uuid:e,name:t}=this.fin.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction("layout-get-current-sync").catch((e=>{})),"openfin"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error("You are not in a Window context. Only Windows can have a Layout.");const{uuid:e,name:t}=this.fin.me;return this.wrapSync({uuid:e,name:t})}async getLayoutByViewIdentity(e){this.wire.sendAction("layout-get-by-view-identity").catch((()=>{}));let t=await this.wire.environment.getViewWindowIdentity(this.fin,e);t.identity&&(t=t.identity);try{const n=this.wrapSync(t),i=await Mi.Layout.getClient(n),r=await i.getLayoutIdentityForViewOrThrow(e);return this.wrapSync(r)}catch(n){if(!["No action registered at target for","getLayoutIdentityForViewOrThrow is not a function"].some((e=>n.message.includes(e))))throw n;if(t.uuid===t.name)throw new Error(`View identity ${JSON.stringify(e)} is not attached to any layout in provider window ${JSON.stringify(t)}.`);return this.wrapSync(t)}}}kn.LayoutModule=Oi,Ci=new WeakMap,bi=new WeakMap,Ii=new WeakMap,vi=new WeakSet,Ei=function(e){if(!xi(this,bi,"f"))throw new Error(`You must call init before using the API ${e}`);return xi(this,bi,"f")},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(kn,e),n(Ln,e)}(jn),Object.defineProperty(Pn,"__esModule",{value:!0}),Pn.PlatformModule=void 0;const Si=d,Ri=Mn,Fi=jn;class ji extends Si.Base{constructor(e,t){super(e),this._channel=t,this.Layout=new Fi.LayoutModule(this.wire)}async init(e){if(!fin.__internal_.isPlatform||fin.me.name!==fin.me.uuid)throw new Error("fin.Platform.init should only be called from a custom platform provider running in the main window of the application.");return this.wire.environment.initPlatform(this.fin,e)}async wrap(e){return this.wire.sendAction("platform-wrap").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}wrapSync(e){return this.wire.sendAction("platform-wrap-sync").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}async getCurrent(){return this.wire.sendAction("platform-get-current").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction("platform-get-current-sync").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}start(e){return this.wire.sendAction("platform-start").catch((e=>{})),new Promise((async(t,n)=>{try{const{uuid:n}=e,i=await this.fin.Application._create({...e,isPlatformController:!0});i.once("platform-api-ready",(()=>t(this.wrapSync({uuid:n})))),i._run({uuid:n})}catch(e){n(e)}}))}startFromManifest(e,t){return this.wire.sendAction("platform-start-from-manifest").catch((e=>{})),new Promise((async(n,i)=>{try{const i=await this.fin.Application._createFromManifest(e);i.once("platform-api-ready",(()=>n(this.wrapSync({uuid:i.identity.uuid})))),i._run(t)}catch(e){i(e)}}))}}Pn.PlatformModule=ji,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Pn,e),n(Mn,e)}(An);var ki={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getMe=e.getBaseMe=e.environmentUnsupportedMessage=void 0;const t=J(),n=un,i=ie(),r=rn;function o(e,t,n){return{...{isView:"view"===e,isWindow:"window"===e,isFrame:"iframe"===e,isExternal:"external connection"===e},uuid:t,name:n,entityType:e}}e.environmentUnsupportedMessage="You are not running in OpenFin.",e.getBaseMe=o,e.getMe=function(s){const{uuid:a,name:c,entityType:d}=s.me,h={setContext(){throw new Error(e.environmentUnsupportedMessage)},addContextHandler(){throw new Error(e.environmentUnsupportedMessage)},getContextGroups(){throw new Error(e.environmentUnsupportedMessage)},joinContextGroup(){throw new Error(e.environmentUnsupportedMessage)},removeFromContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getAllClientsInContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getInfoForContextGroup(){throw new Error(e.environmentUnsupportedMessage)}},l="Interop API has not been instantiated. Either connection has failed or you have not declared interop in your config.",u={setContext(){throw new Error(l)},addContextHandler(){throw new Error(l)},getContextGroups(){throw new Error(l)},joinContextGroup(){throw new Error(l)},removeFromContextGroup(){throw new Error(l)},getAllClientsInContextGroup(){throw new Error(l)},getInfoForContextGroup(){throw new Error(l)}},p={eventNames:()=>{throw new Error(e.environmentUnsupportedMessage)},emit:()=>{throw new Error(e.environmentUnsupportedMessage)},listeners:()=>{throw new Error(e.environmentUnsupportedMessage)},listenerCount:()=>{throw new Error(e.environmentUnsupportedMessage)},on:()=>{throw new Error(e.environmentUnsupportedMessage)},addListener:()=>{throw new Error(e.environmentUnsupportedMessage)},once:()=>{throw new Error(e.environmentUnsupportedMessage)},prependListener:()=>{throw new Error(e.environmentUnsupportedMessage)},prependOnceListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeAllListeners:()=>{throw new Error(e.environmentUnsupportedMessage)}};switch(d){case"view":return Object.assign(new t.View(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case"window":return Object.assign(new i._Window(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case"iframe":return Object.assign(new n._Frame(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case"external connection":return Object.assign(new r.ExternalApplication(s,{uuid:a}),o(d,a,c),{interop:u,isOpenFin:!1});default:return{...o(d,a,c),...p,interop:h,isOpenFin:!1}}}}(ki);var Li={},Ti={},$i={};Object.defineProperty($i,"__esModule",{value:!0}),$i.createWarningObject=$i.createUnusableObject=void 0,$i.createUnusableObject=function(e){const t=()=>{throw new Error(e)};return new Proxy({},{apply:t,construct:t,defineProperty:t,deleteProperty:t,get:t,getOwnPropertyDescriptor:t,getPrototypeOf:t,has:t,isExtensible:t,ownKeys:t,preventExtensions:t,set:t,setPrototypeOf:t})},$i.createWarningObject=function(e,t){return new Proxy(t,{get:(...t)=>(console.warn(e),Reflect.get(...t)),set:(...t)=>(console.warn(e),Reflect.set(...t)),getOwnPropertyDescriptor:(...t)=>(console.warn(e),Reflect.getOwnPropertyDescriptor(...t)),ownKeys:(...t)=>(console.warn(e),Reflect.ownKeys(...t))})};var Bi,Gi={},Wi={};var Hi={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.wrapIntentHandler=e.BROKER_ERRORS=e.generateOverrideWarning=e.generateOverrideError=e.wrapContextHandler=e.wrapInTryCatch=e.generateId=void 0;e.generateId=()=>`${Math.random()}${Date.now()}`;e.wrapInTryCatch=(e,t)=>(...n)=>{try{return e(...n)}catch(e){throw new Error((t||"")+e)}};e.wrapContextHandler=(e,t)=>async n=>{try{await e(n)}catch(e){throw console.error(`Error thrown by handler ${t} for context type ${n.type}: ${e}`),e}};e.generateOverrideError=(e,t)=>`You have tried to to use ${e} but ${t} has not been overridden in the Interop Broker. Please override this function. Refer to our documentation for more info.`;e.generateOverrideWarning=(e,t,n,i)=>{const{uuid:r,name:o}=n;return i?`Entity with identity: ${r}/${o} has called ${i} or ${e} but ${t} has not been overridden.`:`Entity with identity: ${r}/${o} has called ${e} but ${t} has not been overridden.`},e.BROKER_ERRORS={fireIntent:(0,e.generateOverrideError)("fireIntent","handleFiredIntent"),fireIntentForContext:(0,e.generateOverrideError)("fireIntentForContext","handleFiredIntentForContext"),getInfoForIntent:(0,e.generateOverrideError)("getInfoForIntent","handleInfoForIntent"),getInfoForIntentsByContext:(0,e.generateOverrideError)("getInfoForIntentsByContext","handleInfoForIntentsByContext"),joinSessionContextGroupWithJoinContextGroup:"The Context Group you have tried to join is a Session Context Group. Custom Context Groups can only be defined by the Interop Broker through code or manifest configuration. Please use joinSessionContextGroup.",fdc3Open:(0,e.generateOverrideError)("fdc3.open","fdc3HandleOpen"),fdc3FindInstances:(0,e.generateOverrideError)("fdc3.findInstances","fdc3HandleFindInstances"),fdc3GetAppMetadata:(0,e.generateOverrideError)("fdc3.getAppMetadata","fdc3HandleGetAppMetadata"),fdc3GetInfo:(0,e.generateOverrideError)("fdc3.getInfo","fdc3HandleGetInfo")};e.wrapIntentHandler=(e,t)=>async n=>{try{return e(n)}catch(e){throw console.error(`Error thrown by handler ${t}: ${e}`),e}}}(Hi);var Ni,Di,Ui={};function Vi(){if(Di)return Gi;Di=1;var e,t,n,r=s&&s.__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},o=s&&s.__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)},a=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Gi,"__esModule",{value:!0}),Gi.InteropBroker=void 0;const c=d,h=a(function(){if(Bi)return Wi;Bi=1,Object.defineProperty(Wi,"__esModule",{value:!0});const e=Cr();return Wi.default=class{constructor(e,t){this.provider=e,this.id=t,this.lastContext=void 0,this.contextGroupMap=new Map,this.clients=new Map,this.registerListeners()}registerListeners(){this.provider.register(`sessionContextGroup:getContext-${this.id}`,this.getCurrentContext.bind(this)),this.provider.register(`sessionContextGroup:setContext-${this.id}`,this.setContext.bind(this)),this.provider.register(`sessionContextGroup:handlerAdded-${this.id}`,this.handlerAdded.bind(this)),this.provider.register(`sessionContextGroup:handlerRemoved-${this.id}`,this.handlerRemoved.bind(this))}getCurrentContext(e){return e.type?this.contextGroupMap.get(e.type):this.lastContext}setContext(t,n){const{context:i}=t,r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name} not in Session Client State Map`);this.contextGroupMap.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{e.contextHandlers.get(i.type)?.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getClientState(e){return this.clients.get(e.endpointId)}async handlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(i){const e=r.contextHandlers.get(i)||[];r.contextHandlers.set(i,[...e,n]);const o=this.contextGroupMap.get(i);o&&await this.provider.dispatch(t,n,o)}else{r.globalHandler=n;const e=[...this.contextGroupMap.keys()].map((async e=>{const i=this.contextGroupMap.get(e);i&&await this.provider.dispatch(t,n,i)}));await Promise.all(e)}}handlerRemoved(e,t){const{handlerId:n}=e,i=this.clients.get(t.endpointId);i?(Array.from(i.contextHandlers).forEach((([,e])=>{const t=e.indexOf(n);t>-1&&e.splice(t,1)})),i.globalHandler===n&&(i.globalHandler=void 0)):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={contextHandlers:new Map,clientIdentity:e,globalHandler:void 0};this.clients.set(e.endpointId,t)}}onDisconnection(e){this.clients.delete(e.endpointId)}},Wi}()),l=Hi,u=a(i),p=function(){if(Ni)return Ui;Ni=1,Object.defineProperty(Ui,"__esModule",{value:!0}),Ui.PrivateChannelProvider=void 0;const e=Vi();return Ui.PrivateChannelProvider=class t{constructor(e,t){this.provider=e,this.id=t,this.clients=new Map,this.registerListeners(),this.contextByContextType=new Map,this.lastContext=void 0,this.provider.onConnection((e=>this.registerNewClient(e))),this.provider.onDisconnection((async e=>{const{endpointId:t}=e;this.clients.has(t)&&await this.handleClientDisconnecting(e),0===(await this.provider.getAllClientInfo()).length&&this.provider.destroy()}))}getClientState(e){return this.clients.get(e.endpointId)}registerListeners(){this.provider.register("broadcast",this.broadcast.bind(this)),this.provider.register("getCurrentContext",this.getCurrentContext.bind(this)),this.provider.register("contextHandlerAdded",this.contextHandlerAdded.bind(this)),this.provider.register("contextHandlerRemoved",this.contextHandlerRemoved.bind(this)),this.provider.register("nonStandardHandlerRemoved",this.nonStandardHandlerRemoved.bind(this)),this.provider.register("onAddContextHandlerAdded",this.onAddContextHandlerAdded.bind(this)),this.provider.register("onDisconnectHandlerAdded",this.onDisconnectHandlerAdded.bind(this)),this.provider.register("onUnsubscribeHandlerAdded",this.onUnsubscribeHandlerAdded.bind(this)),this.provider.register("clientDisconnecting",((e,t)=>{this.handleClientDisconnecting(t)}))}broadcast(t,n){const{context:i}=t;if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name}, tried to call broadcast, is not connected to this Private Channel`);const r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to broadcast - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);this.contextByContextType.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{const t=e.handlerIdsByContextTypes.get(i.type);t&&t.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getCurrentContext(e,t){const{contextType:n}=e;if(!this.getClientState(t))throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call getCurrentContext, is not connected to this Private Channel`);if(void 0!==n){return this.contextByContextType.get(n)||null}return this.lastContext?this.lastContext:null}contextHandlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call addContextListener, is not connected to this Private Channel`);if(i){const e=r.handlerIdsByContextTypes.get(i)||[];r.handlerIdsByContextTypes.set(i,[...e,n])}else r.globalHandler=n;Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&e.onAddContextListenerHandlerId&&this.provider.dispatch(e.clientIdentity,e.onAddContextListenerHandlerId,i)}))}async contextHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);if(i){let e;if(i.globalHandler===n)i.globalHandler=void 0;else for(const[t,r]of i.handlerIdsByContextTypes){const i=r.indexOf(n);i>-1&&(r.splice(i,1),e=t)}const r=(await this.getConnectedClients()).map((async n=>{const{clientIdentity:i,clientIdentity:{endpointId:r},onUnsubscribeHandlerId:o}=n;r!==t.endpointId&&o&&await this.provider.dispatch(i,o,e)}));try{await Promise.all(r)}catch(e){throw console.error(`Problem when attempting to dispatch to onUnsubscribeHandlers. Error: ${e} Removing Client: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}`),new Error(e)}}else console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}.`)}nonStandardHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);i?i.onDisconnectHandlerId===n?i.onDisconnectHandlerId=void 0:i.onAddContextListenerHandlerId===n?i.onAddContextListenerHandlerId=void 0:i.onUnsubscribeHandlerId===n&&(i.onUnsubscribeHandlerId=void 0):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}onAddContextHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onAddContextListener, is not connected to this Private Channel`);n.onAddContextListenerHandlerId=i,Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&Array.from(e.handlerIdsByContextTypes.keys()).forEach((e=>{this.provider.dispatch(t,i,e)}))}))}onDisconnectHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onDisconnect, is not connected to this Private Channel`);n.onDisconnectHandlerId=i}onUnsubscribeHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onUnsubscribe, is not connected to this Private Channel`);n.onUnsubscribeHandlerId=i}removeClient(e){const t=this.getClientState(e);if(!t)throw new Error(`Client with Identity: ${e.uuid} ${e.name}, tried to call disconnect, is not connected to this Private Channel`);t.handlerIdsByContextTypes.clear(),this.clients.delete(e.endpointId)}async fireOnDisconnectForOtherClients(e){const{endpointId:t}=e,n=(await this.getConnectedClients()).map((async e=>{const{clientIdentity:{endpointId:n},onDisconnectHandlerId:i}=e;n!==t&&i&&await this.provider.dispatch(e.clientIdentity,i)}));try{await Promise.all(n)}catch(t){throw console.error(`Problem when attempting to dispatch to onDisconnectHandlers. Error: ${t} Disconnecting Client: uuid: ${e.uuid}. name: ${e.name}. endpointId: ${e.endpointId}`),new Error(t)}}async unsubscribeAll(e){const{endpointId:t}=e,n=this.clients.get(t);if(n){const t=Array.from(n.handlerIdsByContextTypes.values()).flat(),i=n.globalHandler;if(t.length>0){const n=t.map((async t=>this.contextHandlerRemoved({handlerId:t},e)));try{await Promise.all(n)}catch(e){console.error(e.message)}}if(i)try{await this.contextHandlerRemoved({handlerId:i},e)}catch(e){console.error(e.message)}}}async handleClientDisconnecting(e){await this.unsubscribeAll(e),this.removeClient(e),await this.fireOnDisconnectForOtherClients(e)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={clientIdentity:e,handlerIdsByContextTypes:new Map,globalHandler:void 0,onAddContextListenerHandlerId:void 0,onUnsubscribeHandlerId:void 0,onDisconnectHandlerId:void 0};this.clients.set(e.endpointId,t)}}async getConnectedClients(){const e=await this.provider.getAllClientInfo();return Array.from(this.clients.values()).filter((t=>{const{uuid:n,name:i}=t.clientIdentity;return e.some((e=>i===e.name&&n===e.uuid))}))}static init(e,n){return new t(e,n)}},Ui}(),w=G,y=[{id:"green",displayMetadata:{color:"#00CC88",name:"green"}},{id:"purple",displayMetadata:{color:"#8C61FF",name:"purple"}},{id:"orange",displayMetadata:{color:"#FF8C4C",name:"orange"}},{id:"red",displayMetadata:{color:"#FF5E60",name:"red"}},{id:"pink",displayMetadata:{color:"#FF8FB8",name:"pink"}},{id:"yellow",displayMetadata:{color:"#E9FF8F",name:"yellow"}}];let f=class i extends c.Base{constructor(i,s,a){super(i),e.set(this,void 0),t.set(this,void 0),n.set(this,void 0),this.getProvider=()=>o(this,n,"f").getValue(),this.interopClients=new Map,this.contextGroupsById=new Map,r(this,t,a.contextGroups??[...y],"f"),r(this,e,a.fdc3Info,"f"),a?.logging&&(this.logging=a.logging),this.intentClientMap=new Map,this.lastContextMap=new Map,this.sessionContextGroupMap=new Map,r(this,n,new w.Lazy(s),"f"),this.setContextGroupMap(),this.setupChannelProvider()}static createClosedConstructor(...e){return class extends i{constructor(...t){if(t.length){const[n,i,r]=t;if(r&&"object"==typeof r&&!(0,u.default)(r,e[2]))return console.warn("You have modified the parameters of the InteropOverride constructor. This behavior is deprecated and will be removed in a future version. You can modify these options in your manifest. Please consult our Interop docs for guidance on migrating to the new override scheme."),void super(e[0],e[1],r);console.warn("You are attempting to pass arguments to the InteropOverride constructor. This is not necessary, and these passed arguments will be ignored. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.")}super(...e)}}}setContext({context:e},t){this.wire.sendAction("interop-broker-set-context").catch((e=>{}));const n=this.getClientState(t);if(!n||!n.contextGroupId)throw n?new Error("You must join a context group before you can set context."):new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);{const{contextGroupId:t}=n;this.setContextForGroup({context:e},t)}}setContextForGroup({context:e},t){this.wire.sendAction("interop-broker-set-context-for-group").catch((e=>{}));const n=this.contextGroupsById.get(t);if(!n)throw new Error(`Unable to set context for context group that isn't in the context group mapping: ${t}.`);const r=i.checkContextIntegrity(e);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(e)}`);const o=e.type;n.set(o,e),this.lastContextMap.set(t,o);Array.from(this.interopClients.values()).filter((e=>e.contextGroupId===t)).forEach((t=>{for(const[,n]of t.contextHandlers)i.isContextTypeCompatible(o,n.contextType)&&this.invokeContextHandler(t.clientIdentity,n.handlerId,e)}))}getCurrentContext(e,t){this.wire.sendAction("interop-broker-get-current-context").catch((e=>{}));const n=this.getClientState(t);if(!n?.contextGroupId)throw new Error("You must be a member of a context group to call getCurrentContext");const{contextGroupId:i}=n,r=this.contextGroupsById.get(i),o=this.lastContextMap.get(i),s=e?.contextType??o;return r&&s?r.get(s):void 0}async joinContextGroup({contextGroupId:e,target:t},n){if(this.wire.sendAction("interop-broker-join-context-group").catch((e=>{})),this.sessionContextGroupMap.has(e))throw new Error(l.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup);if(t){i.hasEndpointId(t)&&await this.addClientToContextGroup({contextGroupId:e},t);try{const n=this.channel.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name));if(!n.length)throw new Error(`Given Identity ${t.uuid} ${t.name} is not connected to the Interop Broker.`);n.length>1&&console.warn(`More than one connection found for identity ${t.uuid} ${t.name}`);const i=[];for(const t of n)i.push(this.addClientToContextGroup({contextGroupId:e},t));await Promise.all(i)}catch(e){throw new Error(e)}}else await this.addClientToContextGroup({contextGroupId:e},n)}async addClientToContextGroup({contextGroupId:e},t){this.wire.sendAction("interop-broker-add-client-to-context-group").catch((e=>{}));const n=this.getClientState(t);if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(!this.getContextGroups().find((t=>t.id===e)))throw new Error(`Attempting to join a context group that does not exist: ${e}. You may only join existing context groups.`);if(n.contextGroupId!==e){n.contextGroupId=e,await this.setCurrentContextGroupInClientOptions(t,e);const i=this.contextGroupsById.get(e);for(const[,e]of n.contextHandlers){const{contextType:n,handlerId:r}=e;if(void 0===n)i.forEach(((e,n)=>{this.invokeContextHandler(t,r,e)}));else if(i.has(n)){const e=i.get(n);e&&this.invokeContextHandler(t,r,e)}}}}async removeFromContextGroup({target:e},t){if(this.wire.sendAction("interop-broker-remove-from-context-group").catch((e=>{})),e){i.hasEndpointId(e)&&await this.removeClientFromContextGroup(e);try{const t=this.channel.connections.filter((t=>t.uuid===e.uuid&&t.name===e.name));if(!t.length)throw new Error(`No connection found for given Identity ${e.uuid} ${e.name}`);t.length>1&&console.warn(`More than one connection found for identity ${e.uuid} ${e.name}`);const n=[];for(const e of t)n.push(this.removeClientFromContextGroup(e));await Promise.all(n)}catch(e){throw new Error(e)}}else await this.removeClientFromContextGroup(t)}async removeClientFromContextGroup(e){this.wire.sendAction("interop-broker-remove-client-from-context-group").catch((e=>{}));const t=this.getClientState(e);t&&(t.contextGroupId=void 0),await this.setCurrentContextGroupInClientOptions(e,null)}getContextGroups(){return this.wire.sendAction("interop-broker-get-context-groups").catch((e=>{})),o(this,t,"f").map((e=>({...e})))}getInfoForContextGroup({contextGroupId:e}){return this.wire.sendAction("interop-broker-get-info-for-context-group").catch((e=>{})),this.getContextGroups().find((t=>t.id===e))}getAllClientsInContextGroup({contextGroupId:e}){this.wire.sendAction("interop-broker-get-all-clients-in-context-group").catch((e=>{}));return Array.from(this.interopClients.values()).filter((t=>t.contextGroupId===e)).map((e=>e.clientIdentity))}async handleFiredIntent(e,t){const n=(0,l.generateOverrideWarning)("fdc3.raiseIntent","InteropBroker.handleFiredIntent",t,"interopClient.fireIntent");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntent)}async setIntentTarget(e,t){this.wire.sendAction("interop-broker-set-intent-target").catch((e=>{}));const n=this.intentClientMap.get(t.name),i=`intent-handler-${e.name}`;if(n){const t=n.get(i);if(t){if(t.pendingIntents.push(e),t.clientIdentity&&t.isReady){const{clientIdentity:e,pendingIntents:n}=t;try{const r=n[n.length-1];await this.invokeIntentHandler(e,i,r),t.pendingIntents=[]}catch(n){console.error(`Error invoking intent handler for client ${e.uuid}/${e.name}/${e.endpointId}`),t.isReady=!1}}}else n.set(i,{isReady:!1,pendingIntents:[e]})}else{this.intentClientMap.set(t.name,new Map);const n=this.intentClientMap.get(t.name);n&&n.set(i,{isReady:!1,pendingIntents:[e]})}}async handleInfoForIntent(e,t){const n=(0,l.generateOverrideWarning)("fdc3.findIntent","InteropBroker.handleInfoForIntent",t,"interopClient.getInfoForIntent");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntent)}async handleInfoForIntentsByContext(e,t){const n=(0,l.generateOverrideWarning)("fdc3.findIntentsByContext","InteropBroker.handleInfoForIntentsByContext",t,"interopClient.getInfoForIntentsByContext");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntentsByContext)}async handleFiredIntentForContext(e,t){const n=(0,l.generateOverrideWarning)("fdc3.raiseIntentForContext","InteropBroker.handleFiredIntentForContext",t,"interopClient.fireIntentForContext");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntentForContext)}async clientDisconnected(e){}async fdc3HandleOpen({app:e,context:t},n){const i=(0,l.generateOverrideWarning)("fdc3.open","InteropBroker.fdc3HandleOpen",n);throw console.warn(i),new Error(l.BROKER_ERRORS.fdc3Open)}async fdc3HandleFindInstances(e,t){const n=(0,l.generateOverrideWarning)("fdc3.open","InteropBroker.fdc3HandleFindInstances",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3FindInstances)}async fdc3HandleGetAppMetadata(e,t){const n=(0,l.generateOverrideWarning)("fdc3.getAppMetadata","InteropBroker.fdc3HandleGetAppMetadata",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3GetAppMetadata)}async invokeContextHandler(e,t,n){const i=await this.getProvider();try{await i.dispatch(e,t,n)}catch(i){console.error(`Error invoking context handler ${t} for context type ${n.type} in client ${e.uuid}/${e.name}/${e.endpointId}`,i)}}async invokeIntentHandler(e,t,n){const i=await this.getProvider();await i.dispatch(e,t,n)}async fdc3HandleGetInfo(t,n){const{fdc3Version:i}=t;return{fdc3Version:i,...o(this,e,"f"),optionalFeatures:{OriginatingAppMetadata:!1,UserChannelMembershipAPIs:!0},appMetadata:{appId:"",instanceId:""}}}async getAllClientInfo(){return(await this.getProvider()).getAllClientInfo()}decorateSnapshot(e){return{...e,interopSnapshotDetails:{contextGroupStates:this.getContextGroupStates()}}}applySnapshot(e,t){const n=e?.interopSnapshotDetails?.contextGroupStates;n&&(t?.closeExistingWindows||this.updateExistingClients(n),this.rehydrateContextGroupStates(n))}updateExistingClients(e){this.interopClients.forEach((t=>{const{clientIdentity:n,contextGroupId:r,contextHandlers:o}=t;if(r){const t=e[r];for(const[,e]of Object.entries(t))o.forEach((t=>{const{handlerId:r,contextType:o}=t;i.isContextTypeCompatible(e.type,o)&&this.invokeContextHandler(n,r,e)}))}}))}getContextGroupStates(){return i.toObject(this.contextGroupsById)}rehydrateContextGroupStates(e){const t=Object.entries(e);for(const[e,n]of t){const t=Object.entries(n);for(const[n,i]of t)if(this.contextGroupsById.has(e)){this.contextGroupsById.get(e).set(n,i)}else console.warn(`Attempting to set a context group that isn't in the context group mapping. Skipping context group rehydration for: ${e}`)}}contextHandlerRegistered({contextType:e,handlerId:t},n){const i={contextType:e,handlerId:t},r=this.getClientState(n);if(r?.contextHandlers.set(t,i),r&&r.contextGroupId){const{contextGroupId:i}=r,o=this.contextGroupsById.get(i);if(void 0===e)o.forEach(((e,i)=>{this.invokeContextHandler(n,t,e)}));else if(o.has(e)){const i=o.get(e);i&&this.invokeContextHandler(n,t,i)}}}async intentHandlerRegistered(e,t){const{handlerId:n}=e,i=this.intentClientMap.get(t.name),r=i?.get(n);if(i)if(r){const{pendingIntents:e}=r;r.clientIdentity=t,r.isReady=!0;try{if(e.length>0){const i=e[e.length-1];await this.invokeIntentHandler(t,n,i),r.pendingIntents=[]}}catch(e){console.error(`Error invoking intent handler: ${n} for client ${t.uuid}/${t.name}/${t.endpointId}`)}}else i.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t});else{this.intentClientMap.set(t.name,new Map);const e=this.intentClientMap.get(t.name);e&&e.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t})}}removeContextHandler({handlerId:e},t){const n=this.getClientState(t);n&&n.contextHandlers.delete(e)}handleJoinSessionContextGroup({sessionContextGroupId:e},t){try{if(!e)throw new Error("Failed to join session context group: must specify group id.");const n=this.sessionContextGroupMap.get(e);if(n)n.registerNewClient(t);else{const n=new h.default(this.channel,e);n.registerNewClient(t),this.sessionContextGroupMap.set(e,n)}return{hasConflict:this.contextGroupsById.has(e)}}catch(e){throw new Error(e)}}getClientState(e){return this.interopClients.get(e.endpointId)}static toObject(e){const t=Object.fromEntries(e),n={};return Object.entries(t).forEach((([e,t])=>{const i=Object.fromEntries(t);n[e]=i})),n}static checkContextIntegrity(e){if(!e)return{isValid:!1,reason:"No context supplied"};if("object"!=typeof e)return{isValid:!1,reason:"Context must be an Object"};if(!e.type)return{isValid:!1,reason:"Context must have a type property"};if(e.id&&"object"!=typeof e.id)return{isValid:!1,reason:"Context id must be an Object populated with key-value identifiers (if set)"};if(e.id){const{id:t}=e,n=Object.keys(t);let i=!1;if(!n.length)return{isValid:!1,reason:"Context id must have at least one key-value identifier"};if(n.forEach((e=>{"string"==typeof e&&"string"==typeof t[e]||(i=!0)})),i)return{isValid:!1,reason:"Context id key-value identifiers must be of type string"}}return e.name&&"string"!=typeof e.name?{isValid:!1,reason:"Context name must be of string type (if set)"}:{isValid:!0}}static hasEndpointId(e){return void 0!==e.endpointId}static isContextTypeCompatible(e,t){return void 0===t||e===t}setContextGroupMap(){for(const e of this.getContextGroups())this.contextGroupsById.set(e.id,new Map)}async setCurrentContextGroupInClientOptions(e,t){try{const n=await this.fin.System.getEntityInfo(e.uuid,e.name);let i;"view"===n.entityType?i=await this.fin.View.wrap(e):"window"===n.entityType&&(i=await this.fin.Window.wrap(e)),i&&await i.updateOptions({interop:{currentContextGroup:t}})}catch(e){}}async setupChannelProvider(){try{const e=await this.getProvider();this.channel=e,this.wireChannel(e)}catch(e){throw new Error(`Error setting up Interop Broker Channel Provider: ${e}`)}}wireChannel(e){e.onConnection((async(e,t)=>{if(!await this.isConnectionAuthorized(e,t))throw new Error(`Connection not authorized for ${e.uuid}, ${e.name}`);if(!e.endpointId)throw new Error("Version too old to be compatible with Interop. Please upgrade your runtime to a more recent version.");const n={contextGroupId:void 0,contextHandlers:new Map,clientIdentity:e};t?.currentContextGroup&&this.contextGroupsById.has(t.currentContextGroup)&&(n.contextGroupId=t?.currentContextGroup),this.interopClients.set(e.endpointId,n)})),e.onDisconnection((e=>{this.interopClients.delete(e.endpointId);const t=this.intentClientMap.get(e.name);t&&e.uuid===this.fin.me.uuid&&t.forEach((e=>{e.isReady=!1})),this.sessionContextGroupMap.forEach((t=>{t.onDisconnection(e)})),this.clientDisconnected(e)})),e.beforeAction((async(e,t,n)=>{if(!await this.isActionAuthorized(e,t,n))throw new Error(`Action (${e}) not authorized for ${n.uuid}, ${n.name}`);this.logging?.beforeAction?.enabled&&console.log(e,t,n)})),e.afterAction(((e,t,n)=>{this.logging?.afterAction?.enabled&&console.log(e,t,n)})),e.register("setContext",this.setContext.bind(this)),e.register("fireIntent",this.handleFiredIntent.bind(this)),e.register("getCurrentContext",this.getCurrentContext.bind(this)),e.register("getInfoForIntent",this.handleInfoForIntent.bind(this)),e.register("getInfoForIntentsByContext",this.handleInfoForIntentsByContext.bind(this)),e.register("fireIntentForContext",this.handleFiredIntentForContext.bind(this)),e.register("getContextGroups",this.getContextGroups.bind(this)),e.register("joinContextGroup",this.joinContextGroup.bind(this)),e.register("removeFromContextGroup",this.removeFromContextGroup.bind(this)),e.register("getAllClientsInContextGroup",this.getAllClientsInContextGroup.bind(this)),e.register("getInfoForContextGroup",this.getInfoForContextGroup.bind(this)),e.register("contextHandlerRegistered",this.contextHandlerRegistered.bind(this)),e.register("intentHandlerRegistered",this.intentHandlerRegistered.bind(this)),e.register("removeContextHandler",this.removeContextHandler.bind(this)),e.register("sessionContextGroup:createIfNeeded",this.handleJoinSessionContextGroup.bind(this)),e.register("fdc3Open",this.fdc3HandleOpen.bind(this)),e.register("fdc3v2FindIntentsByContext",this.handleInfoForIntentsByContext.bind(this)),e.register("fdc3FindInstances",this.fdc3HandleFindInstances.bind(this)),e.register("fdc3GetAppMetadata",this.fdc3HandleGetAppMetadata.bind(this)),e.register("fdc3v2GetInfo",(async(e,t)=>this.fdc3HandleGetInfo.bind(this)(e,t))),e.register("createPrivateChannelProvider",(async e=>{const{channelId:t}=e,n=await this.fin.InterApplicationBus.Channel.create(t);p.PrivateChannelProvider.init(n,t)}))}isConnectionAuthorized(e,t){return this.wire.sendAction("interop-broker-is-connection-authorized").catch((e=>{})),Promise.resolve(!0)}isActionAuthorized(e,t,n){return this.wire.sendAction("interop-broker-is-action-authorized").catch((e=>{})),Promise.resolve(!0)}};return Gi.InteropBroker=f,e=new WeakMap,t=new WeakMap,n=new WeakMap,Gi}var zi,Ki={},qi={},Ji=s&&s.__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},Yi=s&&s.__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)};Object.defineProperty(qi,"__esModule",{value:!0});const Zi=d,Qi=Hi;class Xi extends Zi.Base{constructor(e,t,n){super(e),zi.set(this,void 0),this.id=n,Ji(this,zi,t,"f")}async setContext(e){this.wire.sendAction("interop-session-context-group-set-context").catch((e=>{}));return(await Yi(this,zi,"f")).dispatch(`sessionContextGroup:setContext-${this.id}`,{sessionContextGroupId:this.id,context:e})}async getCurrentContext(e){this.wire.sendAction("interop-session-context-group-get-context").catch((e=>{}));return(await Yi(this,zi,"f")).dispatch(`sessionContextGroup:getContext-${this.id}`,{sessionContextGroupId:this.id,type:e})}async addContextHandler(e,t){if(this.wire.sendAction("interop-session-context-group-add-handler").catch((e=>{})),"function"!=typeof e)throw new Error("Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");const n=await Yi(this,zi,"f");let i;return i=t?`sessionContextHandler:invoke-${this.id}-${t}-${(0,Qi.generateId)()}`:`sessionContextHandler:invoke-${this.id}`,n.register(i,(0,Qi.wrapContextHandler)(e,i)),await n.dispatch(`sessionContextGroup:handlerAdded-${this.id}`,{handlerId:i,contextType:t}),{unsubscribe:await this.createUnsubscribeCb(i)}}async createUnsubscribeCb(e){const t=await Yi(this,zi,"f");return async()=>{t.remove(e),await t.dispatch(`sessionContextGroup:handlerRemoved-${this.id}`,{handlerId:e})}}getUserInstance(){return{id:this.id,setContext:(0,Qi.wrapInTryCatch)(this.setContext.bind(this),"Failed to set context: "),getCurrentContext:(0,Qi.wrapInTryCatch)(this.getCurrentContext.bind(this),"Failed to get context: "),addContextHandler:(0,Qi.wrapInTryCatch)(this.addContextHandler.bind(this),"Failed to add context handler: ")}}}qi.default=Xi,zi=new WeakMap;var er={},tr={},nr={},ir={},rr=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),or=s&&s.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),sr=s&&s.__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)&&rr(t,e,n);return or(t,e),t};Object.defineProperty(ir,"__esModule",{value:!0}),ir.PrivateChannelClient=void 0;const ar=sr(Hi);var cr,dr;function hr(){if(cr)return tr;cr=1;var e,t=s&&s.__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)},n=s&&s.__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},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(tr,"__esModule",{value:!0}),tr.FDC3ModuleBase=void 0;const o=nr,a=Hi,c=wr(),d=r(i);return tr.FDC3ModuleBase=class{get client(){return t(this,e,"f").call(this)}get fin(){return this.wire.getFin()}constructor(t,i){this.wire=i,e.set(this,void 0),n(this,e,t,"f")}async broadcast(e){return this.wire.sendAction("fdc3-broadcast").catch((e=>{})),this.client.setContext(e)}async _open(e,t){this.wire.sendAction("fdc3-open").catch((e=>{}));try{return await c.InteropClient.ferryFdc3Call(this.client,"fdc3Open",{app:e,context:t})}catch(e){const t=e.message===a.BROKER_ERRORS.fdc3Open?"ResolverUnavailable":e.message;throw new Error(t)}}async _getChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:"system",...(0,o.getUnsupportedChannelApis)()})))}async getOrCreateChannel(e){this.wire.sendAction("fdc3-get-or-create-channel").catch((e=>{}));const t=(await this._getChannels()).find((t=>t.id===e));if(t)return{...t,type:"system",...(0,o.getUnsupportedChannelApis)()};try{const t=await this.client.joinSessionContextGroup(e);return(0,o.buildAppChannelObject)(t)}catch(e){throw console.error(e.message),new Error(o.ChannelError.CreationFailed)}}async getSystemChannels(){return this.wire.sendAction("fdc3-get-system-channels").catch((e=>{})),this._getChannels()}async joinChannel(e){this.wire.sendAction("fdc3-join-channel").catch((e=>{}));try{return await this.client.joinContextGroup(e)}catch(e){if(e.message===a.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup?console.error("The Channel you have tried to join is an App Channel. Custom Channels can only be defined by the Interop Broker through code or manifest configuration. Please use getOrCreateChannel."):console.error(e.message),e.message.startsWith("Attempting to join a context group that does not exist"))throw new Error(o.ChannelError.NoChannelFound);throw new Error(o.ChannelError.AccessDenied)}}async getCurrentChannel(){this.wire.sendAction("fdc3-get-current-channel").catch((e=>{}));const e=await this.getCurrentContextGroupInfo();return e?this.buildChannelObject(e):null}async leaveCurrentChannel(){return this.wire.sendAction("fdc3-leave-current-channel").catch((e=>{})),this.client.removeFromContextGroup()}async getCurrentContextGroupInfo(){const e=await this.client.getContextGroups(),t=e.map((async e=>this.client.getAllClientsInContextGroup(e.id))),n=(await Promise.all(t)).findIndex((e=>e.some((e=>{const{uuid:t,name:n}=e;return this.wire.me.uuid===t&&this.wire.me.name===n}))));return e[n]}async buildChannelObject(e){return{...e,type:"system",addContextListener:(...[e,t])=>{let n,i;"function"==typeof e?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),n=e):(n=t,"string"==typeof e&&(i=e));const r=(async()=>{let e=!0;const t=await this.client.getCurrentContext(i);return this.client.addContextHandler(((i,r)=>{if(!e||(e=!1,!(0,d.default)(t,i)))return n(i,r)}),i)})();return{...r,unsubscribe:()=>r.then((e=>e.unsubscribe()))}},broadcast:this.broadcast.bind(this),getCurrentContext:async e=>{const t=await this.client.getCurrentContext(e);return void 0===t?null:t}}}},e=new WeakMap,tr}ir.PrivateChannelClient=class{constructor(e,t){this.id=t,this.client=e,this.listeners=new Map}async broadcast(e){return this.client.dispatch("broadcast",{context:e})}async getCurrentContext(e){return this.client.dispatch("getCurrentContext",{contextType:e})}async addContextListener(e,t){if("function"!=typeof t)throw new Error("Non-function argument passed to the second parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");let n;n=e?`contextHandler:invoke-${this.id}-${e}-${ar.generateId()}`:`contextHandler:invoke-${this.id}-${ar.generateId()}`,this.client.register(n,ar.wrapContextHandler(t,n));const i={unsubscribe:await this.createContextUnsubscribeCb(n)};return this.listeners.set(n,i),await this.client.dispatch("contextHandlerAdded",{handlerId:n,contextType:e}),i}createNonStandardUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch("nonStandardHandlerRemoved",{handlerId:e})}}createContextUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch("contextHandlerRemoved",{handlerId:e})}}onAddContextListener(e){const t=`onContextHandlerAdded:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch("onAddContextHandlerAdded",{handlerId:t}),n}onDisconnect(e){const t=`onDisconnect:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch("onDisconnectHandlerAdded",{handlerId:t}),n}onUnsubscribe(e){const t=`onUnsubscribe:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch("onUnsubscribeHandlerAdded",{handlerId:t}),n}async cleanUpAllSubs(){Array.from(this.listeners.keys()).forEach((e=>{this.client.remove(e),this.listeners.delete(e)}))}async disconnect(){try{await this.client.dispatch("clientDisconnecting"),await this.cleanUpAllSubs(),await this.client.disconnect()}catch(e){throw new Error(e.message)}}},function(e){var t=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.getIntentResolution=e.isChannel=e.isContext=e.connectPrivateChannel=e.buildAppChannelObject=e.buildPrivateChannelObject=e.ChannelError=e.ResultError=e.UnsupportedChannelApiError=e.getUnsupportedChannelApis=void 0;const n=Hi,r=ir,o=t(i);e.getUnsupportedChannelApis=e=>({addContextListener:()=>{throw new a("Channel.addContextListener",e)},broadcast:()=>{throw new a("Channel.broadcast",e)},getCurrentContext:()=>{throw new a("Channel.getCurrentContext",e)}});class a extends Error{constructor(e,t="System"){super(e),this.message=`Calling ${e} on an instance of a ${t} Channel returned by fdc3.get${t}Channels is not supported. If you would like to use a ${t} Channel, please use fdc3.joinChannel, fdc3.addContextListener, and fdc3.broadcast instead.`}}var c,d;e.UnsupportedChannelApiError=a,function(e){e.NoResultReturned="NoResultReturned",e.IntentHandlerRejected="IntentHandlerRejected"}(c=e.ResultError||(e.ResultError={})),(d=e.ChannelError||(e.ChannelError={})).NoChannelFound="NoChannelFound",d.AccessDenied="AccessDenied",d.CreationFailed="CreationFailed";e.buildPrivateChannelObject=e=>{let t=!1;const n=()=>{if(t)throw new Error("Private Channel Client has been disconnected from the Private Channel")};return{id:e.id,type:"private",broadcast:async t=>(n(),e.broadcast(t)),getCurrentContext:async t=>(n(),e.getCurrentContext(t)),addContextListener:async(t,i)=>{n();let r=i,o=t;"function"==typeof t&&(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),r=t,o=null);return e.addContextListener(o,r)},onAddContextListener:t=>(n(),e.onAddContextListener(t)),disconnect:async()=>(n(),t=!0,e.disconnect()),onDisconnect:t=>(n(),e.onDisconnect(t)),onUnsubscribe:t=>(n(),e.onUnsubscribe(t))}};e.buildAppChannelObject=e=>({id:e.id,type:"app",broadcast:e.setContext,getCurrentContext:async t=>{const n=await e.getCurrentContext(t);return void 0===n?null:n},addContextListener:(t,n)=>{let i,r;"function"==typeof t?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),i=t):(i=n,"string"==typeof t&&(r=t));const s=(async()=>{let t=!0;const n=await e.getCurrentContext(r);return e.addContextHandler(((e,r)=>{if(!t||(t=!1,!(0,o.default)(n,e)))return i(e,r)}),r)})();return{...s,unsubscribe:()=>s.then((e=>e.unsubscribe()))}}});e.connectPrivateChannel=async t=>{try{const n=await fin.InterApplicationBus.Channel.connect(t),i=new r.PrivateChannelClient(n,t);return(0,e.buildPrivateChannelObject)(i)}catch(e){throw new Error(`Private Channel with id: ${t} doesn't exist`)}};e.isContext=e=>{if(e&&"object"==typeof e&&"type"in e){const{type:t}=e;return"string"==typeof t}return!1};e.isChannel=e=>{if(e&&"object"==typeof e&&"type"in e&&"id"in e){const{type:t,id:n}=e;return"string"==typeof t&&"string"==typeof n&&("app"===t||"private"===t)}return!1};e.getIntentResolution=async(t,i,r,o)=>{const s=(0,n.generateId)(),a=new Promise(((e,t)=>{fin.InterApplicationBus.subscribe({uuid:"*"},s,(t=>{e(t)})).catch((()=>t(new Error("getResult is not supported in this environment"))))})),d=r?{target:r,intentResolutionResultId:s}:{intentResolutionResultId:s},h=o?{name:o,context:i,metadata:d}:{...i,metadata:d},l=async()=>{let n=await a;if(!n||"object"!=typeof n)throw new Error(c.NoResultReturned);const{error:i}=n;if(i)throw new Error(c.IntentHandlerRejected);if((0,e.isChannel)(n)){const{id:i,type:r}=n;switch(r){case"private":n=await(0,e.connectPrivateChannel)(i);break;case"app":{const r=await t.joinSessionContextGroup(i);n=(0,e.buildAppChannelObject)(r);break}}}else if(!(0,e.isContext)(n))throw new Error(c.NoResultReturned);return n},u=o?await t.fireIntent(h):await t.fireIntentForContext(h);return"object"!=typeof u?{source:{appId:"",instanceId:""},intent:"",version:"2.0",getResult:l}:{...u,getResult:l}}}(nr);var lr,ur,pr={};function wr(){if(ur)return Ki;ur=1;var e,t,n=s&&s.__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},i=s&&s.__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)},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ki,"__esModule",{value:!0}),Ki.InteropClient=void 0;const o=d,a=r(qi),c=function(){if(dr)return er;dr=1,Object.defineProperty(er,"__esModule",{value:!0}),er.Fdc3Module=void 0;const e=Hi,t=hr();class n extends t.FDC3ModuleBase{async open(e,t){await super._open(e,t)}addContextListener(e,t){let n;return this.wire.sendAction("fdc3-add-context-listener").catch((e=>{})),"function"==typeof e?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),n=this.client.addContextHandler(e)):n=this.client.addContextHandler(t,null===e?void 0:e),{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}addIntentListener(e,t){this.wire.sendAction("fdc3-add-intent-listener").catch((e=>{}));const n=this.client.registerIntentHandler((e=>{const{context:n,metadata:i}=e,{metadata:r}=n,o=i?.intentResolutionResultId||r?.intentResolutionResultId;o&&this.fin.InterApplicationBus.publish(o,null).catch((()=>null)),t(e.context)}),e,{fdc3Version:"1.2"});return{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}async raiseIntent(t,n,i){this.wire.sendAction("fdc3-raise-intent").catch((e=>{}));const r=i?{name:t,context:n,metadata:{target:i}}:{name:t,context:n};try{return await this.client.fireIntent(r)}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntent?"ResolverUnavailable":t.message;throw new Error(n)}}async findIntent(t,n){this.wire.sendAction("fdc3-find-intent").catch((e=>{}));try{return await this.client.getInfoForIntent({name:t,context:n})}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntent?"ResolverUnavailable":t.message;throw new Error(n)}}async findIntentsByContext(t){this.wire.sendAction("fdc3-find-intents-by-context").catch((e=>{}));try{return await this.client.getInfoForIntentsByContext(t)}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntentsByContext?"ResolverUnavailable":t.message;throw new Error(n)}}async raiseIntentForContext(t,n){this.wire.sendAction("fdc3-raise-intent-for-context").catch((e=>{}));try{return await this.client.fireIntentForContext({...t,metadata:{target:n}})}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntentForContext?"ResolverUnavailable":t.message;throw new Error(n)}}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}getInfo(){return this.wire.sendAction("fdc3-get-info").catch((e=>{})),{providerVersion:this.wire.environment.getAdapterVersionSync(),provider:`openfin-${this.wire.me.uuid}`,fdc3Version:"1.2"}}}return er.Fdc3Module=n,er}(),h=function(){if(lr)return pr;lr=1,Object.defineProperty(pr,"__esModule",{value:!0}),pr.Fdc3Module2=void 0;const e=hr(),t=Hi,n=wr(),i=nr,r=ir;class o extends e.FDC3ModuleBase{async open(e,t){return"string"==typeof e&&console.warn("Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string })."),super._open(e,t)}async findInstances(e){this.wire.sendAction("fdc3-find-instances").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,"fdc3FindInstances",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3FindInstances?"ResolverUnavailable":e.message;throw new Error(n)}}async getAppMetadata(e){this.wire.sendAction("fdc3-get-app-metadata").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,"fdc3GetAppMetadata",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3GetAppMetadata?"ResolverUnavailable":e.message;throw new Error(n)}}async addContextListener(e,t){this.wire.sendAction("fdc3-add-context-listener").catch((e=>{}));const n=e=>t=>{const{contextMetadata:n,...i}=t,r=n?[{...i},n]:[t,null];e(...r)};let i=t,r=n(i);return"function"==typeof e?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),i=e,r=n(i),this.client.addContextHandler(r)):this.client.addContextHandler(r,null===e?void 0:e)}async findIntent(e,n,i){this.wire.sendAction("fdc3-find-intent").catch((e=>{}));try{return await this.client.getInfoForIntent({name:e,context:n,metadata:{resultType:i}})}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntent?"ResolverUnavailable":e.message;throw new Error(n)}}async findIntentsByContext(e,i){this.wire.sendAction("fdc3-find-intents-by-context").catch((e=>{}));const r=i?{context:e,metadata:{resultType:i}}:e;try{return await n.InteropClient.ferryFdc3Call(this.client,"fdc3v2FindIntentsByContext",r)}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntentsByContext?"ResolverUnavailable":e.message;throw new Error(n)}}async raiseIntent(e,n,r){this.wire.sendAction("fdc3-raise-intent").catch((e=>{}));try{return"string"==typeof r&&console.warn("Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string })."),(0,i.getIntentResolution)(this.client,n,r,e)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?"ResolverUnavailable":e.message;throw new Error(n)}}async raiseIntentForContext(e,n){this.wire.sendAction("fdc3-raise-intent-for-context").catch((e=>{}));try{return"string"==typeof n&&console.warn("Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string })."),(0,i.getIntentResolution)(this.client,e,n)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?"ResolverUnavailable":e.message;throw new Error(n)}}async addIntentListener(e,t){if(this.wire.sendAction("fdc3-add-intent-listener").catch((e=>{})),"string"!=typeof e)throw new Error("First argument must be an Intent name");return this.client.registerIntentHandler((async e=>{let n,i;const{context:r,metadata:o}=e,{contextMetadata:s,metadata:a,...c}=r,d=o?.intentResolutionResultId||a?.intentResolutionResultId;try{const e=a?{metadata:a,...c}:{...c};n=await t(e,s),i=n}catch(e){n=e,i={error:!0}}if(d&&this.fin.InterApplicationBus.publish(d,i).catch((()=>null)),n instanceof Error)throw new Error(n.message);return n}),e,{fdc3Version:"2.0"})}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}async createPrivateChannel(){const e=(0,t.generateId)();await n.InteropClient.ferryFdc3Call(this.client,"createPrivateChannelProvider",{channelId:e});const o=await this.fin.InterApplicationBus.Channel.connect(e),s=new r.PrivateChannelClient(o,e);return(0,i.buildPrivateChannelObject)(s)}async getUserChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:"user",...(0,i.getUnsupportedChannelApis)("User")})))}async getSystemChannels(){return console.warn("This API has been deprecated. Please use fdc3.getUserChannels instead."),super.getSystemChannels()}async joinUserChannel(e){return super.joinChannel(e)}async joinChannel(e){return console.warn("This API has been deprecated. Please use fdc3.joinUserChannel instead."),super.joinChannel(e)}async getCurrentChannel(){const e=await super.getCurrentChannel();return e?{...e,type:"user",broadcast:this.broadcast.bind(this)}:null}async getInfo(){return n.InteropClient.ferryFdc3Call(this.client,"fdc3v2GetInfo",{fdc3Version:"2.0"})}}return pr.Fdc3Module2=o,pr}(),l=Hi;let u=class extends o.Base{constructor(i,r){super(i),e.set(this,void 0),t.set(this,void 0),n(this,t,new Map,"f"),n(this,e,r,"f")}async setContext(t){this.wire.sendAction("interop-client-set-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("setContext",{context:t})}async addContextHandler(t,n){if(this.wire.sendAction("interop-client-add-context-handler").catch((e=>{})),"function"!=typeof t)throw new Error("Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");const r=await i(this,e,"f");let o;o=n?`invokeContextHandler-${n}-${(0,l.generateId)()}`:"invokeContextHandler";const s=(0,l.wrapContextHandler)(t,o);return r.register(o,s),await r.dispatch("contextHandlerRegistered",{handlerId:o,contextType:n}),{unsubscribe:async()=>{r.remove(o),await r.dispatch("removeContextHandler",{handlerId:o})}}}async getContextGroups(){this.wire.sendAction("interop-client-get-context-groups").catch((e=>{}));return(await i(this,e,"f")).dispatch("getContextGroups")}async joinContextGroup(t,n){this.wire.sendAction("interop-client-join-context-group").catch((e=>{}));const r=await i(this,e,"f");if(!t)throw new Error("No contextGroupId specified for joinContextGroup.");return r.dispatch("joinContextGroup",{contextGroupId:t,target:n})}async removeFromContextGroup(t){this.wire.sendAction("interop-client-remove-from-context-group").catch((e=>{}));return(await i(this,e,"f")).dispatch("removeFromContextGroup",{target:t})}async getAllClientsInContextGroup(t){this.wire.sendAction("interop-client-get-all-clients-in-context-group").catch((e=>{}));const n=await i(this,e,"f");if(!t)throw new Error("No contextGroupId specified for getAllClientsInContextGroup.");return n.dispatch("getAllClientsInContextGroup",{contextGroupId:t})}async getInfoForContextGroup(t){this.wire.sendAction("interop-client-get-info-for-context-group").catch((e=>{}));const n=await i(this,e,"f");if(!t)throw new Error("No contextGroupId specified for getInfoForContextGroup.");return n.dispatch("getInfoForContextGroup",{contextGroupId:t})}async fireIntent(t){this.wire.sendAction("interop-client-fire-intent").catch((e=>{}));return(await i(this,e,"f")).dispatch("fireIntent",t)}async registerIntentHandler(t,n,r){this.wire.sendAction("interop-client-register-intent-handler").catch((e=>{}));const o=await i(this,e,"f"),s=`intent-handler-${n}`,a=(0,l.wrapIntentHandler)(t,s);try{await o.register(s,a),await o.dispatch("intentHandlerRegistered",{handlerId:s,...r})}catch(e){throw new Error("Unable to register intent handler")}return{unsubscribe:async()=>{o.remove(s)}}}async getCurrentContext(t){this.wire.sendAction("interop-client-get-current-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("getCurrentContext",{contextType:t})}async getInfoForIntent(t){this.wire.sendAction("interop-client-get-info-for-intent").catch((e=>{}));return(await i(this,e,"f")).dispatch("getInfoForIntent",t)}async getInfoForIntentsByContext(t){this.wire.sendAction("interop-client-get-info-for-intents-by-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("getInfoForIntentsByContext",t)}async fireIntentForContext(t){this.wire.sendAction("interop-client-fire-intent-for-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("fireIntentForContext",t)}async joinSessionContextGroup(n){try{const r=i(this,t,"f").get(n);if(r)return r.getUserInstance();const o=await i(this,e,"f"),{hasConflict:s}=await o.dispatch("sessionContextGroup:createIfNeeded",{sessionContextGroupId:n});s&&console.warn(`A (non-session) context group with the name "${n}" already exists. If you are trying to join a Context Group, call joinContextGroup instead.`);const c=new a.default(this.wire,i(this,e,"f"),n);return i(this,t,"f").set(n,c),c.getUserInstance()}catch(e){throw console.error(`Error thrown trying to create Session Context Group with id "${n}": ${e}`),e}}async onDisconnection(t){this.wire.sendAction("interop-client-add-ondisconnection-listener").catch((e=>{}));return(await i(this,e,"f")).onDisconnection((e=>{const{uuid:n}=e;t({type:"interop-broker",topic:"disconnected",brokerName:n})}))}getFDC3Sync(e){switch(e){case"1.2":return new c.Fdc3Module((()=>this),this.wire);case"2.0":return new h.Fdc3Module2((()=>this),this.wire);default:throw new Error(`Invalid FDC3 version provided: ${e}. Must be '1.2' or '2.0'`)}}async getFDC3(e){return this.getFDC3Sync(e)}static async ferryFdc3Call(t,n,r){return(await i(t,e,"f")).dispatch(n,r||null)}};return Ki.InteropClient=u,e=new WeakMap,t=new WeakMap,Ki}var yr,fr,gr,mr={};function vr(){if(yr)return mr;yr=1,Object.defineProperty(mr,"__esModule",{value:!0}),mr.overrideCheck=mr.checkFDC32Overrides=mr.getDefaultViewFdc3VersionFromAppInfo=void 0;const e=Vi();function t(t){return["fdc3HandleFindInstances","handleInfoForIntent","handleInfoForIntentsByContext","fdc3HandleGetAppMetadata","fdc3HandleGetInfo","fdc3HandleOpen","handleFiredIntent","handleFiredIntentForContext"].filter((n=>t[n]===e.InteropBroker.prototype[n]))}return mr.getDefaultViewFdc3VersionFromAppInfo=function({manifest:e,initialOptions:t}){const n=e?.platform?.defaultViewOptions?.fdc3InteropApi??t.defaultViewOptions?.fdc3InteropApi;return["1.2","2.0"].includes(n??"")?n:void 0},mr.checkFDC32Overrides=t,mr.overrideCheck=function(e,n){if(n&&"2.0"===n){const n=t(e);n.length>0&&console.warn(`WARNING: FDC3 2.0 has been set as a default option for Views in this Platform, but the required InteropBroker APIs for FDC3 2.0 compliance have not all been overridden.\nThe following APIs need to be overridden:\n${n.join("\n")}`)}},mr}function Cr(){return gr||(gr=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),i=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),i(function(){if(fr)return Ti;fr=1;var e=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ti,"__esModule",{value:!0}),Ti.InteropModule=void 0;const t=e(n),i=$i,r=d,o=Vi(),a=wr(),c=vr(),h=Tn,l=e=>new e,u="You have attempted to use or modify InteropBroker parameters, which is not allowed. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.";class p extends r.Base{async init(e,n=l){this.wire.sendAction("interop-init").catch((()=>{}));const r=await this.wire.environment.getInteropInfo(this.wire.getFin()),s=(0,i.createUnusableObject)(u),a=(0,i.createWarningObject)(u,(0,t.default)(r)),d=async()=>{throw new Error(u)},p=o.InteropBroker.createClosedConstructor(this.wire,(()=>this.fin.InterApplicationBus.Channel.create(`interop-broker-${e}`)),r);let w;return w=Array.isArray(n)?new((0,h.overrideFromComposables)(...n)(p))(s,d,a):await n(p,s,d,a),(0,c.overrideCheck)(w,r.fdc3Version),w}connectSync(e,t){return this.wire.sendAction("interop-connect-sync").catch((()=>{})),new a.InteropClient(this.wire,this.wire.environment.whenReady().then((()=>this.fin.InterApplicationBus.Channel.connect(`interop-broker-${e}`,{payload:t}))))}}return Ti.InteropModule=p,Ti}(),e),i(wr(),e),i(Vi(),e)}(Li)),Li}var br={},Ir={},Er={},xr={};Object.defineProperty(xr,"__esModule",{value:!0}),xr.getSnapshotSourceChannelName=void 0;xr.getSnapshotSourceChannelName=e=>`snapshot-source-provider-${e.uuid}`;var Ar,Pr,Mr,_r,Or,Sr=s&&s.__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},Rr=s&&s.__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)};Object.defineProperty(Er,"__esModule",{value:!0}),Er.SnapshotSource=void 0;const Fr=d,jr=xr,kr=new Map;class Lr extends Fr.Base{constructor(e,t){super(e),Ar.set(this,void 0),Pr.set(this,(()=>(kr.has(this.identity.uuid)||kr.set(this.identity.uuid,{eventFired:null,clientPromise:null}),kr.get(this.identity.uuid)))),Mr.set(this,(()=>(Rr(this,Pr,"f").call(this).clientPromise||(Rr(this,Pr,"f").call(this).clientPromise=Rr(this,_r,"f").call(this)),Rr(this,Pr,"f").call(this).clientPromise))),_r.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);try{Rr(this,Pr,"f").call(this).eventFired||await Rr(this,Or,"f").call(this);const t=await this.fin.InterApplicationBus.Channel.connect(e,{wait:!1});return t.onDisconnection((()=>{Rr(this,Pr,"f").call(this).clientPromise=null,Rr(this,Pr,"f").call(this).eventFired=null})),t}catch(e){throw Rr(this,Pr,"f").call(this).clientPromise=null,new Error("The targeted SnapshotSource is not currently initialized. Await this object's ready() method.")}})),Or.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);let t,n;const i=new Promise(((e,i)=>{t=e,n=i}));Rr(this,Pr,"f").call(this).eventFired=i;const r=async i=>{try{i.channelName===e&&(t(),await this.fin.InterApplicationBus.Channel.removeListener("connected",r))}catch(e){n(e)}};await this.fin.InterApplicationBus.Channel.on("connected",r)})),Sr(this,Ar,t,"f")}get identity(){return Rr(this,Ar,"f")}async ready(){this.wire.sendAction("snapshot-source-ready").catch((e=>{}));try{await Rr(this,Mr,"f").call(this)}catch(e){await Rr(this,Pr,"f").call(this).eventFired}}async getSnapshot(){this.wire.sendAction("snapshot-source-get-snapshot").catch((e=>{}));const e=await Rr(this,Mr,"f").call(this),t=await e.dispatch("get-snapshot");return(await t).snapshot}async applySnapshot(e){this.wire.sendAction("snapshot-source-apply-snapshot").catch((e=>{}));return(await Rr(this,Mr,"f").call(this)).dispatch("apply-snapshot",{snapshot:e})}}Er.SnapshotSource=Lr,Ar=new WeakMap,Pr=new WeakMap,Mr=new WeakMap,_r=new WeakMap,Or=new WeakMap,Object.defineProperty(Ir,"__esModule",{value:!0}),Ir.SnapshotSourceModule=void 0;const Tr=d,$r=Er,Br=xr;class Gr extends Tr.Base{async init(e){if(this.wire.sendAction("snapshot-source-init").catch((e=>{})),"object"!=typeof e||"function"!=typeof e.getSnapshot||"function"!=typeof e.applySnapshot)throw new Error("you must pass in a valid SnapshotProvider");const t=await this.fin.InterApplicationBus.Channel.create((0,Br.getSnapshotSourceChannelName)(this.fin.me));t.register("get-snapshot",(async()=>({snapshot:await e.getSnapshot()}))),t.register("apply-snapshot",(({snapshot:t})=>e.applySnapshot(t)))}wrapSync(e){return this.wire.sendAction("snapshot-source-wrap-sync").catch((e=>{})),new $r.SnapshotSource(this.wire,e)}async wrap(e){return this.wire.sendAction("snapshot-source-wrap").catch((e=>{})),this.wrapSync(e)}}Ir.SnapshotSourceModule=Gr,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Ir,e),n(Er,e)}(br),Object.defineProperty(a,"__esModule",{value:!0});var Wr=a.Fin=void 0;const Hr=t,Nr=c,Dr=ie(),Ur=Z(),Vr=de,zr=en,Kr=rn,qr=un,Jr=bn,Yr=J(),Zr=An,Qr=ki,Xr=Cr(),eo=br;class to extends Hr.EventEmitter{constructor(e){super(),this.wire=e,this.System=new Nr.System(e),this.Window=new Dr._WindowModule(e),this.Application=new Ur.ApplicationModule(e),this.InterApplicationBus=new Vr.InterApplicationBus(e),this.Clipboard=new zr.Clipboard(e),this.ExternalApplication=new Kr.ExternalApplicationModule(e),this.Frame=new qr._FrameModule(e),this.GlobalHotkey=new Jr.GlobalHotkey(e),this.Platform=new Zr.PlatformModule(e,this.InterApplicationBus.Channel),this.View=new Yr.ViewModule(e),this.Interop=new Xr.InteropModule(e),this.SnapshotSource=new eo.SnapshotSourceModule(e),e.registerFin(this),this.me=(0,Qr.getMe)(e),e.on("disconnected",(()=>{this.emit("disconnected")}))}}Wr=a.Fin=to;var no={},io={};function ro(e){return"string"==typeof e.manifestUrl}function oo(e){return ao(e)&&"string"==typeof e.address}function so(e){return oo(e)&&"string"==typeof e.token}function ao(e){return"string"==typeof e.uuid}function co(e){return e.runtime&&"string"==typeof e.runtime.version}function ho(e){return ao(e)&&co(e)}Object.defineProperty(io,"__esModule",{value:!0}),io.isInternalConnectConfig=io.isPortDiscoveryConfig=io.isNewConnectConfig=io.isConfigWithReceiver=io.isRemoteConfig=io.isExistingConnectConfig=io.isExternalConfig=void 0,io.isExternalConfig=ro,io.isExistingConnectConfig=oo,io.isRemoteConfig=so,io.isConfigWithReceiver=function(e){return"object"==typeof e.receiver&&so({...e,address:""})},io.isNewConnectConfig=ho,io.isPortDiscoveryConfig=function(e){return ro(e)&&co(e)||ho(e)},io.isInternalConnectConfig=function(e){return oo(e)||ho(e)};var lo={},uo={};Object.defineProperty(uo,"__esModule",{value:!0}),uo.EmitterMap=void 0;const po=t;function wo(e){return Buffer.from(e).toString("base64")}uo.EmitterMap=class{constructor(){this.storage=new Map}hashKeys(e){return e.map(wo).join("/")}getOrCreate(e){const t=this.hashKeys(e);return this.storage.has(t)||this.storage.set(t,new po.EventEmitter),this.storage.get(t)}has(e){return this.storage.has(this.hashKeys(e))}delete(e){const t=this.hashKeys(e);return this.storage.delete(t)}},Object.defineProperty(lo,"__esModule",{value:!0});const yo=uo;class fo extends yo.EmitterMap{constructor(){super(...arguments),this.dispatchEvent=e=>{if(function(e){return"process-desktop-event"===e.action}(e)){const{payload:t}=e,n=function(e){const{topic:t}=e;if("frame"===t||"window"===t||"view"===t){const{uuid:n,name:i}=e;return[t,n,i]}if("application"===t){const{uuid:n}=e;return[t,n]}return[t]}(t);if(this.has(n))return this.getOrCreate(n).emit(t.type,t),!0}return!1}}}lo.default=fo;var go,mo,vo=s&&s.__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},Co=s&&s.__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)},bo=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(no,"__esModule",{value:!0});var Io=no.Transport=void 0;const Eo=t,xo=io,Ao=g,Po=bo(lo),Mo=ki,_o=ke;class Oo extends Eo.EventEmitter{constructor(e,t,n){super(),this.wireListeners=new Map,this.topicRefMap=new Map,this.eventAggregator=new Po.default,this.messageHandlers=[this.eventAggregator.dispatchEvent],go.set(this,void 0),mo.set(this,void 0),this.connectSync=()=>{Co(this,go,"f").connectSync()},this.getPort=()=>Co(this,go,"f").getPort(),vo(this,go,new e(this.onmessage.bind(this)),"f"),this.environment=t,this.sendRaw=Co(this,go,"f").send.bind(Co(this,go,"f")),this.registerMessageHandler(this.handleMessage.bind(this)),Co(this,go,"f").on("disconnected",(()=>{for(const[,{handleNack:e}]of this.wireListeners)e({reason:"Remote connection has closed"});this.wireListeners.clear(),this.emit("disconnected")}));const{uuid:i,name:r}=n,o=this.environment.getCurrentEntityType();this.me=(0,Mo.getBaseMe)(o,i,r)}getFin(){if(!Co(this,mo,"f"))throw new Error("No Fin object registered for this transport");return Co(this,mo,"f")}registerFin(e){if(Co(this,mo,"f"))throw new Error("Fin object has already been registered for this transport");vo(this,mo,e,"f")}shutdown(){return Co(this,go,"f").shutdown()}async connect(e){if((0,xo.isConfigWithReceiver)(e))return await Co(this,go,"f").connect(e.receiver),this.authorize(e);if((0,xo.isRemoteConfig)(e))return this.connectRemote(e);if((0,xo.isExistingConnectConfig)(e))return this.connectByPort(e);if((0,xo.isNewConnectConfig)(e)){const t=await this.environment.retrievePort(e);return this.connectByPort({...e,address:`ws://localhost:${t}`})}}async connectRemote(e){return await Co(this,go,"f").connect(new(this.environment.getWsConstructor())(e.address)),this.authorize(e)}async connectByPort(e){const{address:t,uuid:n}=e,i={...e,type:"file-token"},r=Co(this,go,"f");await r.connect(new(this.environment.getWsConstructor())(e.address));const o=await this.sendAction("request-external-authorization",{uuid:n,type:"file-token"},!0);if("external-authorization-response"!==o.action)throw new Ao.UnexpectedActionError(o.action);return await this.environment.writeToken(o.payload.file,o.payload.token),this.authorize(i)}async authorize(e){const t=await this.sendAction("request-authorization",e,!0);if("authorization-response"!==t.action)throw new Ao.UnexpectedActionError(t.action);if(!0!==t.payload.success)throw new Ao.RuntimeError(t.payload)}sendAction(e,t={},n=!1){let i=()=>{};const r=Ao.RuntimeError.getCallSite(1),o=this.environment.getNextMessageId(),s=new Promise(((s,a)=>{i=a;const c={action:e,payload:t,messageId:o},d=Co(this,go,"f");return this.addWireListener(o,s,(e=>this.nackHandler(e,a,r)),n),d.send(c).catch(a)}));return Object.assign(s,{cancel:i,messageId:o})}nackHandler(e,t,n){t("string"==typeof e?e:new Ao.RuntimeError(e,n))}ferryAction(e){return new Promise(((t,n)=>{const i=this.environment.getNextMessageId();e.messageId=i;const r=e=>{t(e.payload)};return Co(this,go,"f").send(e).then((()=>this.addWireListener(i,r,(e=>this.nackHandler(e,n)),!1))).catch(n)}))}registerMessageHandler(e){this.messageHandlers.push(e)}addWireListener(e,t,n,i){i?this.uncorrelatedListener=t:this.wireListeners.has(e)?n({reason:"Duplicate handler id",error:(0,_o.errorToPOJO)(new Ao.DuplicateCorrelationError(String(e)))}):this.wireListeners.set(e,{resolve:t,handleNack:n})}onmessage(e){for(const t of this.messageHandlers)t.call(null,e)}handleMessage(e){const t=e.correlationId||NaN;if("correlationId"in e){if(!this.wireListeners.has(t))return!1;{const{resolve:n,handleNack:i}=this.wireListeners.get(t);"ack"!==e.action?i({reason:"Did not receive ack action",error:(0,_o.errorToPOJO)(new Ao.NoAckError(e.action))}):"payload"in e?e.payload.success?n.call(null,e):i(e.payload):"string"==typeof e.reason?i(e):(console.warn("Received invalid response from core",e),i({reason:"invalid response shape"})),this.wireListeners.delete(t)}}else this.uncorrelatedListener&&this.uncorrelatedListener.call(null,e),this.uncorrelatedListener=()=>{};return!0}}Io=no.Transport=Oo,go=new WeakMap,mo=new WeakMap;const So=(...e)=>({log:(...t)=>console.debug(`[${(new Date).toISOString()}]`,...(e=>e.map((e=>`[${e}]`)))(e),...t),getLogger:(...t)=>So(...e,...t)}),Ro=So("@openfin/core-web/client");function Fo(e,t){if(!function(e){return"string"==typeof e}(e))throw new Error(`Property ${t} has invalid type. Expected string, got ${typeof e}.`)}const jo="web-broker-ports-ready",ko=Ro.getLogger("get-web-interop-ports");function Lo(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)}function To(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}"function"==typeof SuppressedError&&SuppressedError;const $o=e=>{var n,i,r;return r=class extends t.EventEmitter{constructor(t){super(),n.set(this,void 0),i.set(this,!1),this.connectSync=()=>{Lo(this,i,"f")||(e.addEventListener("message",(e=>{e.data?.topic?.startsWith("wire-message")&&e.data.message&&Lo(this,n,"f").call(this,{...JSON.parse(e.data.message),ports:e.ports})})),e.start())},this.connect=async()=>{this.connectSync()},this.send=t=>(e.postMessage({topic:"wire-message",message:JSON.stringify(t)}),Promise.resolve()),this.shutdown=async()=>{e.close()},To(this,n,t,"f")}getPort(){return e}},n=new WeakMap,i=new WeakMap,r};var Bo={},Go={};Object.defineProperty(Go,"__esModule",{value:!0}),Go.BaseEnvironment=void 0;const Wo=vr();Go.BaseEnvironment=class{async getViewWindowIdentity(e,t){const{identity:n}=await e.View.wrapSync(t).getCurrentWindow();return n}async getInteropInfo(e){const t=await e.Application.getCurrentSync().getInfo().catch((()=>null)),n=t?.initialOptions?.interopBrokerConfiguration??{};return{fdc3Version:t?(0,Wo.getDefaultViewFdc3VersionFromAppInfo)(t):void 0,...n,fdc3Info:{providerVersion:await e.System.getVersion(),provider:"OpenFin"}}}},Object.defineProperty(Bo,"__esModule",{value:!0});var Ho=Bo.BrowserEnvironment=void 0;const No=Go;class Do extends No.BaseEnvironment{constructor(){super(...arguments),this.type="other",this.getRandomId=()=>{const e=new Uint32Array(1);return window.crypto.getRandomValues(e)[0].toString(32)}}getAdapterVersionSync(){return""}observeBounds(e,t){throw new Error("Method not implemented.")}layoutAllowedInContext(e){return!1}initLayoutManager(e,t,n){throw new Error("Method not implemented.")}applyLayoutSnapshot(e,t,n){throw new Error("Method not implemented.")}createLayout(e,t){throw new Error("Method not implemented.")}destroyLayout(e,t){throw new Error("Method not implemented.")}resolveLayout(e,t){throw new Error("Method not implemented.")}initPlatform(...e){throw new Error("Method not implemented.")}writeToken(e,t){return Promise.resolve("")}retrievePort(e){throw new Error("Method not implemented.")}getNextMessageId(){return this.getRandomId()}createChildContent(e){throw new Error("Method not implemented.")}getWebWindow(e){throw new Error("Method not implemented.")}getCurrentEntityIdentity(){throw new Error("Method not implemented.")}getCurrentEntityType(){return"external connection"}raiseEvent(e,t){throw new Error("Method not implemented.")}getUrl(){return location.href}getDefaultChannelOptions(){return{create:{},connect:{}}}getRtcPeer(){return new RTCPeerConnection}getWsConstructor(){return WebSocket}whenReady(){return Promise.resolve()}}Ho=Bo.BrowserEnvironment=Do;const Uo=e=>"platform"in e&&void 0!==e.platform;var Vo,zo;class Ko extends Ho{constructor(e){super(),this.connectConfig=e,Vo.set(this,void 0),zo.set(this,new W((async()=>Promise.resolve().then((function(){return __webpack_require__(/*! ./main-b14f67c9.js */ "./node_modules/@openfin/core-web/out/main-b14f67c9.js")}))))),Uo(e)&&this.validatePlatformOptions(e)}getAdapterVersionSync(){return"0.39.21"}validatePlatformOptions({platform:e}){if(!("layoutSnapshot"in e))throw new Error("Platform options are missing layoutSnapshot. Please provide a layoutSnapshot in the platform options.");if("windows"in e||"windows"in e.layoutSnapshot)throw new Error("It appears you tried to call connect() with a snapshot object from an OpenFin desktop environment. Note that connect() expects to be called with a platform property with this structure: { platform: { layoutSnapshot } }. To get a layoutSnapshot of the expected structure, use fin.Platform.Layout.getCurrentLayoutManagerSync().getLayoutSnapshot() in v34+ in your desktop environment.");const{layouts:t}=e.layoutSnapshot;Object.entries(t).map((([e,t])=>{if("object"!=typeof t||null===t)throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must be an object.`);if(!("content"in t))throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must contain a 'content' property.`)}))}async getInteropInfo(e){return{...{contextGroups:void 0,logging:{beforeAction:{enabled:!1},afterAction:{enabled:!1}}},fdc3Version:void 0,fdc3Info:{providerVersion:"0.39.21",provider:"OpenFin Web"}}}layoutAllowedInContext(e){return!0}async initLayoutManager(e,t,n){if(Lo(this,Vo,"f"))throw new Error("Layout already initialized.");if(!Uo(this.connectConfig))throw new Error("Platform options are missing from connection config.");const{WebLayoutEntryPoint:i}=await Lo(this,zo,"f").getValue();return To(this,Vo,new i(this.connectConfig),"f"),await Lo(this,Vo,"f").initLayoutManager(e,t,n)}async applyLayoutSnapshot(e,t,n){Lo(this,Vo,"f")?.applyLayoutSnapshot(e,t,n)}async createLayout(e,t){return Lo(this,Vo,"f")?.createLayout(e,t)}async destroyLayout(e,t){return Lo(this,Vo,"f")?.destroyLayout(e,t)}async getViewWindowIdentity(e,t){return Promise.resolve({uuid:t.uuid,name:t.uuid})}}Vo=new WeakMap,zo=new WeakMap;const qo=()=>{const e=((e,t)=>{const n=new RegExp(`^${t}<(?.*)>$`).exec(e)?.groups?.meta;if(n)try{return JSON.parse(atob(n))}catch(e){throw new Error(`Failed to decode JSON from ${n}.`)}})(window.name,"of-frame");if(e)try{const{name:t,uuid:n,brokerUrl:i,providerId:r,contextGroup:o}=e;return Fo(i,"brokerUrl"),Fo(n,"uuid"),Fo(t,"name"),{identity:{name:t,uuid:n},brokerUrl:i,interopConfig:{providerId:r,currentContextGroup:o}}}catch(e){throw new Error(`Unexpected error occurred when inferring platform information: ${e.stack}`)}},Jo=()=>{const e=r.v4();return{uuid:e,name:e}},Yo=async e=>{if("enabled"===e.connectionInheritance){const t=await(async e=>{const t=qo();if(t){const{validateOptions:n=(()=>!0)}=e,{identity:i,...r}=t;if(!await n(r))throw new Error("Parent options were rejected by validateOptions.");return t}})(e);if(t)return t}if(!e.options){const t="enabled"===e.connectionInheritance?"Broker URL was not specified nor provided by a platform container.":"Connection inheritance is disabled but no options were provided.";throw new Error(t)}return{...e.options,identity:Jo()}};exports.__classPrivateFieldGet=Lo,exports.__classPrivateFieldSet=To,exports.apiExposer=Gn,exports.commonjsGlobal=s,exports.connect=async t=>{try{Ro.log("Establishing connection",t);const{brokerUrl:n,identity:i,timeout:r,interopConfig:s}=await Yo(t),{workerPort:a,iframeBrokerPort:c}=await(async(e,t,n)=>{const{origin:i}=new URL(e),r=document.createElement("IFRAME");let s;r.style.display="none";try{return await new Promise(((a,c)=>{const d=e=>{if(e.source===r.contentWindow&&e.data?.topic===`ack-${jo}`){if(e.origin!==i)c(new Error(`Broker redirected to unexpected origin ${e.origin}, expected ${i}.`));else if(e.data.success){const[t,n]=e.ports;a({iframeBrokerPort:t,workerPort:n})}else c(new m(e.data));window.removeEventListener("message",d),clearTimeout(s)}};window.addEventListener("message",d),ko.log(`Connecting to broker ${e}`),r.setAttribute("src",e),r.setAttribute("name",o(t,"of-broker")),document.body.appendChild(r),ko.log("Iframe loaded, awaiting init message from iframe"),n&&(s=setTimeout((()=>{window.removeEventListener("message",d),document.body.removeChild(r),c(new Error("Worker did not initialize in time"))}),n))}))}catch(e){throw new Error(`Failed to initialise Fin Web Client. ${e.message}`,{cause:e})}})(n,i,r);Ro.log("Successfully established connection to shared worker");const d={entityType:"external connection",...i};a.start(),c.start();const h=((t,n,i)=>{const r=$o(n),o=new Ko(t),s=new Io(r,o,i);return s.connectSync(),window.Buffer=e.Buffer,new Wr(s)})(t,a,d);return s?.providerId&&(h.me.interop=h.Interop.connectSync(s.providerId),s?.currentContextGroup&&h.me.interop.joinContextGroup(s.currentContextGroup).catch((e=>{console.warn(`Error joining specified context group: ${s?.currentContextGroup}, continuing`,e)}))),{...h,me:{...h.me,identity:{uuid:h.me.uuid,name:h.me.name}}}}catch(e){throw new Error(`An error occured during web-interop connection: ${e.message}`)}},exports.decorators=Nn,exports.encodeOptions=o,exports.layout_constants=ai,exports.lazy=G; +var e=__webpack_require__(/*! buffer/ */ "../../node_modules/buffer/index.js"),t=__webpack_require__(/*! events */ "../../node_modules/events/events.js"),n=__webpack_require__(/*! lodash/cloneDeep */ "../../node_modules/lodash/cloneDeep.js"),i=__webpack_require__(/*! lodash/isEqual */ "../../node_modules/lodash/isEqual.js"),r=__webpack_require__(/*! uuid */ "../../node_modules/uuid/dist/esm-browser/index.js");const o=(e,t)=>`${t}<${btoa(JSON.stringify(e))}>`;var s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof __webpack_require__.g?__webpack_require__.g:"undefined"!=typeof self?self:{},a={},c={},d={},h={};async function l(e){const t=[];for(const n of e){const e=await n();t.push(e)}return t}Object.defineProperty(h,"__esModule",{value:!0}),h.promiseMapSerial=h.serial=h.promiseMap=h.promisify=void 0,h.promisify=function(e){return(...t)=>new Promise(((n,i)=>{e(...t,((e,t)=>e?i(e):n(t)))}))},h.promiseMap=async function(e,t){return Promise.all(e.map(t))},h.serial=l,h.promiseMapSerial=async function(e,t){return l(e.map(((e,n,i)=>()=>t(e,n,i))))};var u,p=s&&s.__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},w=s&&s.__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)};Object.defineProperty(d,"__esModule",{value:!0}),d.Reply=d.EmitterBase=d.Base=void 0;const y=h;class f{constructor(e){this.isNodeEnvironment=()=>"node"===this.wire.environment.type,this.isOpenFinEnvironment=()=>"openfin"===this.wire.environment.type,this.isBrowserEnvironment=()=>"other"===this.wire.environment.type,this.wire=e}get fin(){return this.wire.getFin()}get me(){return this.wire.me}}d.Base=f;d.EmitterBase=class extends f{constructor(e,t,...n){super(e),this.topic=t,u.set(this,void 0),this.eventNames=()=>this.hasEmitter()?this.getOrCreateEmitter().eventNames():[],this.emit=(e,t,...n)=>!!this.hasEmitter()&&this.getOrCreateEmitter().emit(e,t,...n),this.hasEmitter=()=>this.wire.eventAggregator.has(w(this,u,"f")),this.getOrCreateEmitter=()=>this.wire.eventAggregator.getOrCreate(w(this,u,"f")),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[],this.listenerCount=e=>this.hasEmitter()?this.getOrCreateEmitter().listenerCount(e):0,this.registerEventListener=async(e,t={},n,i)=>{const r={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e},o=this.getOrCreateEmitter();n(o);try{await this.wire.sendAction("subscribe-to-desktop-event",r)}catch(e){throw i(o),this.deleteEmitterIfNothingRegistered(o),e}},this.deregisterEventListener=async(e,t={})=>{if(this.hasEmitter()){const n={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e};await this.wire.sendAction("unsubscribe-to-desktop-event",n).catch((()=>null));return this.getOrCreateEmitter()}return Promise.resolve()},p(this,u,[t,...n],"f"),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[]}async on(e,t,n){return await this.registerEventListener(e,n,(n=>{n.on(e,t)}),(n=>{n.removeListener(e,t)})),this}async addListener(e,t,n){return this.on(e,t,n)}async once(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.once(e,i),n.once(e,t)}),(n=>{n.removeListener(e,i),n.removeListener(e,t)})),this}async prependListener(e,t,n){return await this.registerEventListener(e,n,(n=>{n.prependListener(e,t)}),(n=>{n.removeListener(e,t)})),this}async prependOnceListener(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.prependOnceListener(e,t),n.once(e,i)}),(n=>{n.removeListener(e,t),n.removeListener(e,i)})),this}async removeListener(e,t,n){const i=await this.deregisterEventListener(e,n);return i&&(i.removeListener(e,t),this.deleteEmitterIfNothingRegistered(i)),this}async deregisterAllListeners(e){const t={...this.identity,type:e,topic:this.topic};if(this.hasEmitter()){const e=this.getOrCreateEmitter(),n=e.listenerCount(t.type),i=[];for(let e=0;enull)));return await Promise.all(i),e}}async removeAllListeners(e){const t=async e=>{const t=await this.deregisterAllListeners(e);t&&(t.removeAllListeners(e),this.deleteEmitterIfNothingRegistered(t))};if(e)await t(e);else if(this.hasEmitter()){const e=this.getOrCreateEmitter().eventNames();await(0,y.promiseMap)(e,t)}return this}deleteEmitterIfNothingRegistered(e){0===e.eventNames().length&&this.wire.eventAggregator.delete(w(this,u,"f"))}},u=new WeakMap;d.Reply=class{};var g={};Object.defineProperty(g,"__esModule",{value:!0});var m=g.RuntimeError=g.NotSupportedError=g.NotImplementedError=g.NoAckError=g.DuplicateCorrelationError=g.UnexpectedActionError=g.DisconnectedError=void 0;class v extends Error{constructor(e){super(`Expected websocket state OPEN but found ${e}`),this.readyState=e}}g.DisconnectedError=v;class C extends Error{}g.UnexpectedActionError=C;class b extends Error{}g.DuplicateCorrelationError=b;class I extends Error{}g.NoAckError=I;class E extends Error{}g.NotImplementedError=E;class x extends Error{}g.NotSupportedError=x;class A extends Error{constructor(e){const{message:t,name:n,stack:i,...r}=e;super(t),this.name=n||"Error",this.stack=i??this.toString(),Object.keys(r).forEach((e=>{this[e]=r[e]}))}}class P extends Error{static getCallSite(e=0){const t=Error.stackTraceLimit,n=e+1;Error.stackTraceLimit=t+n;const i=Error.prepareStackTrace;Error.prepareStackTrace=(e,t)=>t;const r=(new Error).stack?.slice(n)??[];return Error.prepareStackTrace=i,Error.stackTraceLimit=t,r}static prepareStackTrace(e,t){if("function"==typeof Error.prepareStackTrace)return Error.prepareStackTrace(e,t);let n="";n+=e.name||"Error",n+=`: ${e.message||""}`;for(const e of t)n+=`\n at ${e.toString()}`;return n}constructor(e,t){const{reason:n,error:i}=e;super(n),this.name="RuntimeError",i?.stack&&(this.cause=new A(i)),t&&(this.stack=P.prepareStackTrace(this,t))}}m=g.RuntimeError=P;var M={},_={},O={};Object.defineProperty(O,"__esModule",{value:!0}),O.validateIdentity=void 0,O.validateIdentity=function(e){let t;return"object"==typeof e&&"string"==typeof e.uuid||(t="Not a valid identity object"),t};var S={},R={},F={},j={},k={},L={},T={};Object.defineProperty(T,"__esModule",{value:!0}),T.handleDeprecatedWarnings=void 0;var $;T.handleDeprecatedWarnings=e=>{(e.contentNavigation?.whitelist||e.contentNavigation?.blacklist||e.contentRedirect?.whitelist||e.contentRedirect?.blacklist)&&console.warn("The properties 'whitelist' and 'blacklist' have been marked as deprecated and will be removed in a future version. Please use 'allowlist' and 'denylist'.")};var B={},G={};Object.defineProperty(G,"__esModule",{value:!0}),G.AsyncRetryableLazy=W=G.Lazy=void 0;var W=G.Lazy=class{constructor(e){this.producerFn=e}getValue(){return this.value||(this.value=this.producerFn()),this.value}};G.AsyncRetryableLazy=class{constructor(e){this.producerFn=e}async getValue(){return this.promise||(this.promise=this.producerFn().catch((e=>{throw delete this.promise,e}))),this.promise}};var H={};Object.defineProperty(H,"__esModule",{value:!0}),H.WebContents=void 0;const N=d;class D extends N.EmitterBase{constructor(e,t,n){super(e,n,t.uuid,t.name),this.identity=t,this.entityType=n}capturePage(e){return this.wire.sendAction("capture-page",{options:e,...this.identity}).then((({payload:e})=>e.data))}executeJavaScript(e){return this.wire.sendAction("execute-javascript-in-window",{...this.identity,code:e}).then((({payload:e})=>e.data))}getZoomLevel(){return this.wire.sendAction("get-zoom-level",this.identity).then((({payload:e})=>e.data))}setZoomLevel(e){return this.wire.sendAction("set-zoom-level",{...this.identity,level:e}).then((()=>{}))}navigate(e){return this.wire.sendAction("navigate-window",{...this.identity,url:e}).then((()=>{}))}navigateBack(){return this.wire.sendAction("navigate-window-back",{...this.identity}).then((()=>{}))}async navigateForward(){await this.wire.sendAction("navigate-window-forward",{...this.identity})}stopNavigation(){return this.wire.sendAction("stop-window-navigation",{...this.identity}).then((()=>{}))}reload(e=!1){return this.wire.sendAction("reload-window",{ignoreCache:e,...this.identity}).then((()=>{}))}print(e={}){return this.wire.sendAction("print",{...this.identity,options:e}).then((()=>{}))}findInPage(e,t){return this.wire.sendAction("find-in-page",{...this.identity,searchTerm:e,options:t}).then((({payload:e})=>e.data))}stopFindInPage(e){return this.wire.sendAction("stop-find-in-page",{...this.identity,action:e}).then((()=>{}))}getPrinters(){return this.wire.sendAction("get-printers",{...this.identity}).then((({payload:e})=>e.data))}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){await this.wire.sendAction("focus-window",{emitSynthFocused:e,...this.identity})}async showDeveloperTools(){await this.wire.sendAction("show-developer-tools",this.identity)}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction("get-process-info",this.identity);return e}async getSharedWorkers(){return this.wire.sendAction("get-shared-workers",this.identity).then((({payload:e})=>e.data))}async inspectSharedWorker(){await this.wire.sendAction("inspect-shared-worker",{...this.identity})}async inspectSharedWorkerById(e){await this.wire.sendAction("inspect-shared-worker-by-id",{...this.identity,workerId:e})}async inspectServiceWorker(){await this.wire.sendAction("inspect-service-worker",{...this.identity})}async showPopupWindow(e){if(this.wire.sendAction(`${this.entityType}-show-popup-window`,this.identity).catch((()=>{})),e?.onPopupReady){const t=async({popupName:t})=>{try{const n=this.fin.Window.wrapSync({uuid:this.fin.me.uuid,name:t});await e.onPopupReady(n)}catch(e){throw new Error(`Something went wrong during onPopupReady execution: ${e}`)}};await this.once("popup-ready",t)}const{payload:t}=await this.wire.sendAction("try-create-popup-window",{options:{...e,hasResultCallback:!!e?.onPopupResult,hasReadyCallback:!!e?.onPopupReady},...this.identity}),{data:{willOpen:n,options:i}}=t;n&&await this.fin.Window.create(i.initialOptions);if(e?.onPopupResult){const t=async t=>{await e.onPopupResult((e=>{const{name:t,uuid:n,result:i,data:r}=e,o={identity:{name:t,uuid:n},result:i};return r&&(o.data=r),o})(t))},n=async()=>{await this.removeListener("popup-result",t)};await this.on("popup-result",t),await this.once("popup-teardown",n)}const{payload:r}=await this.wire.sendAction("show-popup-window",{options:i,...this.identity});return r.data}}var U,V,z,K,q;function J(){return V||(V=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(function(){if($)return L;$=1,Object.defineProperty(L,"__esModule",{value:!0}),L.ViewModule=void 0;const e=d,t=O,n=J(),i=T;class r extends e.Base{async create(e){const{uuid:t}=this.wire.me;if(!e.name||"string"!=typeof e.name)throw new Error("Please provide a name property as a string in order to create a View.");return(0,i.handleDeprecatedWarnings)(e),this.wire.environment.childViews?await this.wire.environment.createChildContent({entityType:"view",options:{...e,uuid:t}}):await this.wire.sendAction("create-view",{...e,uuid:t}),this.wrapSync({uuid:t,name:e.name})}async wrap(e){this.wire.sendAction("view-wrap").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}wrapSync(e){this.wire.sendAction("view-wrap-sync").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}getCurrent(){if(this.wire.sendAction("view-get-current").catch((e=>{})),!this.wire.me.isView)throw new Error("You are not in a View context");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction("view-get-current-sync").catch((e=>{})),!this.wire.me.isView)throw new Error("You are not in a View context");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return L.ViewModule=r,L}(),e),n(function(){if(U)return B;var e;U=1,Object.defineProperty(B,"__esModule",{value:!0}),B.View=void 0;const t=g,n=G,i=H,r=ie();class o extends i.WebContents{constructor(i,o){super(i,o,"view"),this.identity=o,e.set(this,new n.Lazy((()=>this.fin.Platform.wrapSync(this.identity).getClient()))),this.attach=async e=>{await this.wire.sendAction("attach-view",{target:e,...this.identity})},this.destroy=async()=>{await this.wire.sendAction("destroy-view",{...this.identity})},this.show=async()=>{await this.wire.sendAction("show-view",{...this.identity})},this.showAt=async(e,t={})=>{await this.wire.sendAction("show-view-at",{bounds:e,...this.identity,options:t})},this.bringToFront=async()=>{await this.wire.sendAction("bring-view-to-front",{...this.identity})},this.hide=async()=>{await this.wire.sendAction("hide-view",{...this.identity})},this.setBounds=async e=>{await this.wire.sendAction("set-view-bounds",{bounds:e,...this.identity})},this.getBounds=async()=>(await this.wire.sendAction("get-view-bounds",{...this.identity})).payload.data,this.getInfo=async()=>(await this.wire.sendAction("get-view-info",{...this.identity})).payload.data,this.getParentLayout=async()=>(this.wire.sendAction("view-get-parent-layout",{...this.identity}).catch((()=>{})),this.fin.Platform.Layout.getLayoutByViewIdentity(this.identity)),this.getOptions=async()=>this.wire.sendAction("get-view-options",{...this.identity}).then((({payload:e})=>e.data)),this.updateOptions=async e=>this.wire.sendAction("update-view-options",{options:e,...this.identity}).then((()=>{})),this.getCurrentWindow=async()=>{const{payload:{data:e}}=await this.wire.sendAction("get-view-window",{...this.identity});return new r._Window(this.wire,e)},this.getCurrentStack=async()=>{this.wire.sendAction("view-get-current-stack").catch((()=>{}));try{return(await this.getParentLayout()).getStackByViewIdentity(this.identity)}catch(e){throw new t.RuntimeError({reason:"This view does not belong to a stack.",error:e})}},this.triggerBeforeUnload=async()=>(await this.wire.sendAction("trigger-before-unload",{...this.identity})).payload.data,this.bindToElement=async e=>{if(!e)throw new Error("Element not found.");return this.wire.environment.observeBounds(e,(async e=>this.setBounds(e)))}}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){const t=await this.getCurrentWindow();await t.focusedWebViewWasChanged(),await super.focus({emitSynthFocused:e})}}return B.View=o,e=new WeakMap,B}(),e)}(k)),k}function Y(){if(z)return j;z=1,Object.defineProperty(j,"__esModule",{value:!0}),j.Application=void 0;const e=d,t=ie(),n=J();class i extends e.EmitterBase{constructor(e,n){super(e,"application",n.uuid),this.identity=n,this.window=new t._Window(this.wire,{uuid:this.identity.uuid,name:this.identity.uuid})}windowListFromIdentityList(e){const n=[];return e.forEach((e=>{n.push(new t._Window(this.wire,{uuid:e.uuid,name:e.name}))})),n}isRunning(){return this.wire.sendAction("is-application-running",this.identity).then((({payload:e})=>e.data))}async quit(e=!1){try{await this._close(e),await this.wire.sendAction("destroy-application",{force:e,...this.identity})}catch(e){if(!["Remote connection has closed","Could not locate the requested application"].some((t=>e.message.includes(t))))throw e}}async _close(e=!1){try{await this.wire.sendAction("close-application",{force:e,...this.identity})}catch(e){if(!e.message.includes("Remote connection has closed"))throw e}}close(e=!1){return console.warn("Deprecation Warning: Application.close is deprecated Please use Application.quit"),this.wire.sendAction("application-close",this.identity).catch((e=>{})),this._close(e)}getChildWindows(){return this.wire.sendAction("get-child-windows",this.identity).then((({payload:e})=>{const t=[];return e.data.forEach((e=>{t.push({uuid:this.identity.uuid,name:e})})),this.windowListFromIdentityList(t)}))}getManifest(){return this.wire.sendAction("get-application-manifest",this.identity).then((({payload:e})=>e.data))}getParentUuid(){return this.wire.sendAction("get-parent-application",this.identity).then((({payload:e})=>e.data))}getShortcuts(){return this.wire.sendAction("get-shortcuts",this.identity).then((({payload:e})=>e.data))}async getViews(){const{payload:e}=await this.wire.sendAction("application-get-views",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}getZoomLevel(){return this.wire.sendAction("get-application-zoom-level",this.identity).then((({payload:e})=>e.data))}getWindow(){return this.wire.sendAction("application-get-window",this.identity).catch((e=>{})),Promise.resolve(this.window)}registerUser(e,t){return this.wire.sendAction("register-user",{userName:e,appName:t,...this.identity}).then((()=>{}))}removeTrayIcon(){return this.wire.sendAction("remove-tray-icon",this.identity).then((()=>{}))}restart(){return this.wire.sendAction("restart-application",this.identity).then((()=>{}))}run(){return console.warn("Deprecation Warning: Application.run is deprecated Please use fin.Application.start"),this.wire.sendAction("application-run",this.identity).catch((e=>{})),this._run()}_run(e={}){return this.wire.sendAction("run-application",{manifestUrl:this._manifestUrl,opts:e,...this.identity}).then((()=>{}))}scheduleRestart(){return this.wire.sendAction("relaunch-on-close",this.identity).then((()=>{}))}async sendApplicationLog(){const{payload:e}=await this.wire.sendAction("send-application-log",this.identity);return e.data}async setJumpList(e){await this.wire.sendAction("set-jump-list",{config:e,...this.identity})}setTrayIcon(e){return this.wire.sendAction("set-tray-icon",{enabledIcon:e,...this.identity}).then((()=>{}))}setShortcuts(e){return this.wire.sendAction("set-shortcuts",{data:e,...this.identity}).then((()=>{}))}async setShortcutQueryParams(e){await this.wire.sendAction("set-shortcut-query-args",{data:e,...this.identity})}setZoomLevel(e){return this.wire.sendAction("set-application-zoom-level",{level:e,...this.identity}).then((()=>{}))}async setAppLogUsername(e){await this.wire.sendAction("set-app-log-username",{data:e,...this.identity})}getTrayIconInfo(){return this.wire.sendAction("get-tray-icon-info",this.identity).then((({payload:e})=>e.data))}hasTrayIcon(){return this.wire.sendAction("has-tray-icon",this.identity).then((({payload:e})=>e.data))}terminate(){return this.wire.sendAction("terminate-application",this.identity).then((()=>{}))}wait(){return this.wire.sendAction("wait-for-hung-application",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction("get-info",this.identity).then((({payload:e})=>e.data))}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction("application-get-process-info",this.identity);return e}async setFileDownloadLocation(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t};await this.wire.sendAction("set-file-download-location",{...n,downloadLocation:e})}async getFileDownloadLocation(){const{payload:{data:e}}=await this.wire.sendAction("get-file-download-location",this.identity);return e}async showTrayIconPopupMenu(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t},{payload:i}=await this.wire.sendAction("show-tray-icon-popup-menu",{...n,options:e});return i.data}async closeTrayIconPopupMenu(){const{name:e}=this.wire.me,t={uuid:this.identity.uuid,name:e};await this.wire.sendAction("close-tray-icon-popup-menu",{...t})}}return j.Application=i,j}function Z(){return q||(q=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(function(){if(K)return F;K=1,Object.defineProperty(F,"__esModule",{value:!0}),F.ApplicationModule=void 0;const e=d,t=O,n=Y();class i extends e.Base{async wrap(e){this.wire.sendAction("wrap-application").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}wrapSync(e){this.wire.sendAction("wrap-application-sync").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}async _create(e){return void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&void 0===e.isPlatformController&&(e.autoShow=!0),await this.wire.sendAction("create-application",e),this.wrap({uuid:e.uuid})}create(e){return console.warn("Deprecation Warning: fin.Application.create is deprecated. Please use fin.Application.start"),this.wire.sendAction("application-create").catch((e=>{})),this._create(e)}async start(e){this.wire.sendAction("start-application").catch((e=>{}));const t=await this._create(e);return await this.wire.sendAction("run-application",{uuid:e.uuid}),t}async startManyManifests(e,t){return this.wire.sendAction("run-applications",{applications:e,opts:t}).then((()=>{}))}getCurrent(){return this.wire.sendAction("get-current-application").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction("get-current-application-sync").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}async startFromManifest(e,t){this.wire.sendAction("application-start-from-manifest").catch((e=>{}));const n=await this._createFromManifest(e);return await n._run(t),n}createFromManifest(e){return console.warn("Deprecation Warning: fin.Application.createFromManifest is deprecated. Please use fin.Application.startFromManifest"),this.wire.sendAction("application-create-from-manifest").catch((e=>{})),this._createFromManifest(e)}_createFromManifest(e){return this.wire.sendAction("get-application-manifest",{manifestUrl:e}).then((({payload:e})=>{const t=e.data.platform?e.data.platform.uuid:e.data.startup_app.uuid;return this.wrap({uuid:t})})).then((t=>(t._manifestUrl=e,t)))}}return F.ApplicationModule=i,F}(),e),n(Y(),e)}(R)),R}H.WebContents=D;var Q={};Object.defineProperty(Q,"__esModule",{value:!0}),Q.promisifySubscription=void 0;var X,ee,te;function ne(){if(X)return S;X=1,Object.defineProperty(S,"__esModule",{value:!0}),S._Window=void 0;const e=Z(),t=H,n=J(),i=T,r=Q;class o extends t.WebContents{constructor(e,t){super(e,t,"window")}async createWindow(e){this.wire.sendAction("window-create-window",this.identity).catch((e=>{}));const t=await(0,r.promisifySubscription)(this,"fire-constructor-callback");void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&(e.autoShow=!0),(0,i.handleDeprecatedWarnings)(e);const n=this.wire.environment.createChildContent({entityType:"window",options:e}),[o]=await Promise.all([t.getValue(),n]);let s;const{success:a}=o,c=o.data,{message:d}=c;s=a?{httpResponseCode:c.httpResponseCode,apiInjected:c.apiInjected}:{message:c.message,networkErrorCode:c.networkErrorCode,stack:c.stack};const h={message:d,cbPayload:s,success:a};try{this.getWebWindow().fin.__internal_.openerSuccessCBCalled()}catch(e){}return h.success?this:Promise.reject(h)}getAllFrames(){return this.wire.sendAction("get-all-frames",this.identity).then((({payload:e})=>e.data))}getBounds(){return this.wire.sendAction("get-window-bounds",this.identity).then((({payload:e})=>e.data))}center(){return this.wire.sendAction("center-window",this.identity).then((()=>{}))}blur(){return this.wire.sendAction("blur-window",this.identity).then((()=>{}))}bringToFront(){return this.wire.sendAction("bring-window-to-front",this.identity).then((()=>{}))}animate(e,t){return this.wire.sendAction("animate-window",{transitions:e,options:t,...this.identity}).then((()=>{}))}hide(){return this.wire.sendAction("hide-window",this.identity).then((()=>{}))}close(e=!1){return this.wire.sendAction("close-window",{force:e,...this.identity}).then((()=>{Object.setPrototypeOf(this,null)}))}focusedWebViewWasChanged(){return this.wire.sendAction("focused-webview-changed",this.identity).then((()=>{}))}getNativeId(){return this.wire.sendAction("get-window-native-id",this.identity).then((({payload:e})=>e.data))}async getCurrentViews(){const{payload:e}=await this.wire.sendAction("window-get-views",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}disableFrame(){return console.warn("Function is deprecated; use disableUserMovement instead."),this.wire.sendAction("disable-window-frame",this.identity).then((()=>{}))}disableUserMovement(){return this.wire.sendAction("disable-window-frame",this.identity).then((()=>{}))}enableFrame(){return console.warn("Function is deprecated; use enableUserMovement instead."),this.wire.sendAction("enable-window-frame",this.identity).then((()=>{}))}enableUserMovement(){return this.wire.sendAction("enable-window-frame",this.identity).then((()=>{}))}flash(){return this.wire.sendAction("flash-window",this.identity).then((()=>{}))}stopFlashing(){return this.wire.sendAction("stop-flash-window",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction("get-window-info",this.identity).then((({payload:e})=>e.data))}async getLayout(e){this.wire.sendAction("window-get-layout",this.identity).catch((e=>{}));const t=await this.getOptions();if(!t.layout&&!t.layoutSnapshot)throw new Error("Window does not have a Layout");return this.fin.Platform.Layout.wrap(e??this.identity)}getOptions(){return this.wire.sendAction("get-window-options",this.identity).then((({payload:e})=>e.data))}getParentApplication(){return this.wire.sendAction("window-get-parent-application",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity))}getParentWindow(){return this.wire.sendAction("window-get-parent-window",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity)).then((e=>e.getWindow()))}async getSnapshot(e){const t={area:e,...this.identity};console.warn("Window.getSnapshot has been deprecated, please use Window.capturePage");return(await this.wire.sendAction("get-window-snapshot",t)).payload.data}getState(){return this.wire.sendAction("get-window-state",this.identity).then((({payload:e})=>e.data))}getWebWindow(){return this.wire.sendAction("window-get-web-window",this.identity).catch((e=>{})),this.wire.environment.getWebWindow(this.identity)}isMainWindow(){return this.wire.sendAction("window-is-main-window",this.identity).catch((e=>{})),this.me.uuid===this.me.name}isShowing(){return this.wire.sendAction("is-window-showing",this.identity).then((({payload:e})=>e.data))}maximize(){return this.wire.sendAction("maximize-window",this.identity).then((()=>{}))}minimize(){return this.wire.sendAction("minimize-window",this.identity).then((()=>{}))}moveBy(e,t,n){return this.wire.sendAction("move-window-by",{deltaLeft:e,deltaTop:t,positioningOptions:n,...this.identity}).then((()=>{}))}moveTo(e,t,n){return this.wire.sendAction("move-window",{left:e,top:t,positioningOptions:n,...this.identity}).then((()=>{}))}resizeBy(e,t,n,i){return this.wire.sendAction("resize-window-by",{deltaWidth:Math.floor(e),deltaHeight:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}resizeTo(e,t,n,i){return this.wire.sendAction("resize-window",{width:Math.floor(e),height:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}restore(){return this.wire.sendAction("restore-window",this.identity).then((()=>{}))}setAsForeground(){return this.wire.sendAction("set-foreground-window",this.identity).then((()=>{}))}setBounds(e,t){return this.wire.sendAction("set-window-bounds",{...e,...this.identity,positioningOptions:t}).then((()=>{}))}show(e=!1){return this.wire.sendAction("show-window",{force:e,...this.identity}).then((()=>{}))}showAt(e,t,n=!1){return this.wire.sendAction("show-at-window",{force:n,left:Math.floor(e),top:Math.floor(t),...this.identity}).then((()=>{}))}updateOptions(e){return this.wire.sendAction("update-window-options",{options:e,...this.identity}).then((()=>{}))}authenticate(e,t){return this.wire.sendAction("window-authenticate",{userName:e,password:t,...this.identity}).then((()=>{}))}async showPopupMenu(e){const{payload:t}=await this.wire.sendAction("show-popup-menu",{options:e,...this.identity});return t.data}async closePopupMenu(){return this.wire.sendAction("close-popup-menu",{...this.identity}).then((()=>{}))}async dispatchPopupResult(e){this.wire.sendAction("window-dispatch-popup-result",this.identity).catch((e=>{})),await this.wire.sendAction("dispatch-popup-result",{data:e,...this.identity})}async print(e={content:"self"}){switch(e.content){case void 0:case"self":return super.print(e);case"screenshot":return this.wire.sendAction("print-screenshot",this.identity).then((()=>{}));case"views":return this.wire.sendAction("print-views",{...this.identity,options:e}).then((()=>{}));default:return}}}return S._Window=o,S}function ie(){return te||(te=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(function(){if(ee)return _;ee=1,Object.defineProperty(_,"__esModule",{value:!0}),_._WindowModule=void 0;const e=d,t=O,n=ne();class i extends e.Base{async wrap(e){this.wire.sendAction("window-wrap").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}wrapSync(e){this.wire.sendAction("window-wrap-sync").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}create(e){return this.wire.sendAction("create-window").catch((e=>{})),new n._Window(this.wire,{uuid:this.me.uuid,name:e.name}).createWindow(e)}getCurrent(){if(this.wire.sendAction("get-current-window").catch((e=>{})),!this.wire.me.isWindow)throw new Error("You are not in a Window context");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction("get-current-window-sync").catch((e=>{})),!this.wire.me.isWindow)throw new Error("You are not in a Window context");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return _._WindowModule=i,_}(),e),n(ne(),e)}(M)),M}Q.promisifySubscription=async(e,t,n=(()=>!0),i)=>{let r,o,s;const a=new Promise(((e,t)=>{r=e,o=t})),c=e=>{n(e)&&(clearTimeout(s),r(e))};return await e.on(t,c),i&&(s=setTimeout((()=>o(new Error("event timed out"))),i)),a.finally((()=>{e.removeListener(t,c).catch((()=>null))})),{getValue:()=>a}},Object.defineProperty(c,"__esModule",{value:!0}),c.System=void 0;const re=d,oe=g,se=ie(),ae=t;class ce extends re.EmitterBase{constructor(e){super(e,"system")}sendExternalProcessRequest(e,t){return new Promise(((n,i)=>{const r="external-process-exited";let o,s,a,c;"function"==typeof t.listener&&(a=e=>{const n=e||{};s={topic:"exited",uuid:n.processUuid||"",exitCode:n.exitCode||0},o===e.processUuid&&(t.listener(s),c.removeListener(r,a))},this.wire.me.name||(this.wire.me.name=this.wire.me.uuid),c=new se._Window(this.wire,this.wire.me),c.on(r,a)),this.wire.sendAction(e,t).then((({payload:e})=>{o=e.data.uuid,n(e.data),s&&o===s.uuid&&(t.listener(s),c.removeListener(r,a))})).catch((e=>{c&&c.removeListener(r,a),i(e)}))}))}getVersion(){return this.wire.sendAction("get-version").then((({payload:e})=>e.data))}clearCache(e){return this.wire.sendAction("clear-cache",e).then((()=>{}))}deleteCacheOnExit(){return this.wire.sendAction("delete-cache-request").then((()=>{}))}exit(){return this.wire.sendAction("exit-desktop").then((()=>{}))}async fetchManifest(e){const{payload:{data:t}}=await this.wire.sendAction("fetch-manifest",{manifestUrl:e});return t}flushCookieStore(){return this.wire.sendAction("flush-cookie-store").then((()=>{}))}getAllWindows(){return this.wire.sendAction("get-all-windows").then((({payload:e})=>e.data))}getAllApplications(){return this.wire.sendAction("get-all-applications").then((({payload:e})=>e.data))}getCommandLineArguments(){return this.wire.sendAction("get-command-line-arguments").then((({payload:e})=>e.data))}async getCrashReporterState(){const{payload:{data:{diagnosticMode:e,isRunning:t}}}=await this.wire.sendAction("get-crash-reporter-state");return console.warn("diagnosticMode property is deprecated. It will be removed in a future version"),{diagnosticMode:e,diagnosticsMode:e,isRunning:t}}async startCrashReporter(e){const t=e,n={...t,diagnosticMode:t.diagnosticsMode||t.diagnosticMode},{payload:{data:{diagnosticMode:i,isRunning:r}}}=await this.wire.sendAction("start-crash-reporter",n);return{diagnosticMode:i,diagnosticsMode:i,isRunning:r}}getUniqueUserId(){return this.wire.sendAction("get-unique-user-id").then((({payload:e})=>e.data))}getEntityInfo(e,t){return this.wire.sendAction("get-entity-info",{uuid:e,name:t}).then((({payload:e})=>e.data))}getEnvironmentVariable(e){return this.wire.sendAction("get-environment-variable",{environmentVariables:e}).then((({payload:e})=>e.data))}getFocusedWindow(){return this.wire.sendAction("get-focused-window").then((({payload:e})=>e.data))}async isAppCertified(e){const{payload:{data:{certifiedInfo:t}}}=await this.wire.sendAction("is-app-certified",{manifestUrl:e});return t}getInstalledRuntimes(){return this.wire.sendAction("get-installed-runtimes").then((({payload:e})=>e.data.runtimes))}async getInstalledApps(){const{payload:{data:{installedApps:e}}}=await this.wire.sendAction("get-installed-apps");return e}getLog(e){return this.wire.sendAction("view-log",e).then((({payload:e})=>e.data))}getMachineId(){return this.wire.sendAction("get-machine-id").then((({payload:e})=>e.data))}getMinLogLevel(){return this.wire.sendAction("get-min-log-level").then((({payload:e})=>e.data))}getLogList(){return this.wire.sendAction("list-logs").then((({payload:e})=>e.data))}getMonitorInfo(){return this.wire.sendAction("get-monitor-info").then((({payload:e})=>e.data))}getMousePosition(){return this.wire.sendAction("get-mouse-position").then((({payload:e})=>e.data))}getProcessList(){return console.warn("System.getProcessList has been deprecated. Please consider using our new process APIs: Window.getProcessInfo, View.getProcessInfo, Application.getProcessInfo, System.getAllProcessInfo"),this.wire.sendAction("process-snapshot").then((({payload:e})=>e.data))}async getAllProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction("get-all-process-info",this.identity);return e}getProxySettings(){return this.wire.sendAction("get-proxy-settings").then((({payload:e})=>e.data))}getRuntimeInfo(){return this.wire.sendAction("get-runtime-info").then((({payload:e})=>e.data))}getRvmInfo(){return this.wire.sendAction("get-rvm-info").then((({payload:e})=>e.data))}getHostSpecs(){return this.wire.sendAction("get-host-specs").then((({payload:e})=>e.data))}getOSInfo(){return this.wire.sendAction("get-os-info").then((({payload:e})=>e.data))}launchExternalProcess(e){return this.sendExternalProcessRequest("launch-external-process",e)}monitorExternalProcess(e){return this.sendExternalProcessRequest("monitor-external-process",e)}log(e,t){return this.wire.sendAction("write-to-log",{level:e,message:t}).then((()=>{}))}openUrlWithBrowser(e){return this.wire.sendAction("open-url-with-browser",{url:e}).then((()=>{}))}async registerCustomProtocol(e){if("object"!=typeof e)throw new Error("Must provide an object with a `protocolName` property having a string value.");await this.wire.sendAction("register-custom-protocol",e)}async unregisterCustomProtocol(e){await this.wire.sendAction("unregister-custom-protocol",{protocolName:e})}async getCustomProtocolState(e){return this.wire.sendAction("get-custom-protocol-state",{protocolName:e}).then((({payload:e})=>e.data))}releaseExternalProcess(e){return this.wire.sendAction("release-external-process",{uuid:e}).then((()=>{}))}showDeveloperTools(e){return this.wire.sendAction("show-developer-tools",e).then((()=>{}))}terminateExternalProcess(e){return this.wire.sendAction("terminate-external-process",e).then((()=>{}))}updateProxySettings(e){return this.wire.sendAction("update-proxy",e).then((()=>{}))}async downloadAsset(e,t){const n=()=>{};let i=n,r=n;const o=new Promise(((e,t)=>{i=e,r=t}));if("openfin"!==this.wire.environment.type)throw new oe.NotSupportedError("downloadAsset only supported in an OpenFin Render process");const s=oe.RuntimeError.getCallSite(),a=this.wire.environment.getNextMessageId().toString(),c=`asset-download-progress-${a}`,d=`asset-download-error-${a}`,h=`asset-download-complete-${a}`,l=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},u=()=>{this.removeListener(c,l)};await Promise.all([this.on(c,l),this.once(d,(e=>{u();const{reason:t,err:n}=e;r(new oe.RuntimeError({reason:t,error:n},s))})),this.once(h,(()=>{u(),i()}))]);const p=Object.assign(e,{downloadId:a});return await this.wire.sendAction("download-asset",p).catch((e=>{throw u(),e})),o}downloadRuntime(e,t){const n=oe.RuntimeError.getCallSite();return new Promise(((i,r)=>{if("openfin"!==this.wire.environment.type)return void r(new oe.NotSupportedError("downloadRuntime only supported in an OpenFin Render process"));const o=this.wire.environment.getNextMessageId().toString(),s=`runtime-download-progress-${o}`,a=`runtime-download-error-${o}`,c=`runtime-download-complete-${o}`,d=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},h=()=>{this.removeListener(s,d)};this.on(s,d),this.once(a,(e=>{h();const{reason:t,err:i}=e;r(new oe.RuntimeError({reason:t,error:i},n))})),this.once(c,(()=>{h(),i()}));const l=Object.assign(e,{downloadId:o});this.wire.sendAction("download-runtime",l).catch((e=>{h(),r(e)}))}))}downloadPreloadScripts(e){return this.wire.sendAction("download-preload-scripts",{scripts:e}).then((({payload:e})=>e.data))}getAllExternalApplications(){return this.wire.sendAction("get-all-external-applications").then((({payload:e})=>e.data))}getAppAssetInfo(e){return this.wire.sendAction("get-app-asset-info",e).then((({payload:e})=>e.data))}getCookies(e){const t=this.wire.environment.getUrl(),n=Object.assign(e,{url:t});return this.wire.sendAction("get-cookies",n).then((({payload:e})=>e.data))}setMinLogLevel(e){return this.wire.sendAction("set-min-log-level",{level:e}).then((()=>{}))}resolveUuid(e){return this.wire.sendAction("resolve-uuid",{entityKey:e}).then((({payload:e})=>e.data))}executeOnRemote(e,t){return t.requestingIdentity=e,this.wire.ferryAction(t)}readRegistryValue(e,t,n){return this.wire.sendAction("read-registry-value",{rootKey:e,subkey:t,value:n}).then((({payload:e})=>e.data))}registerExternalConnection(e){return this.wire.sendAction("register-external-connection",{uuid:e}).then((({payload:e})=>e.data))}async getServiceConfiguration(e){if("string"!=typeof e.name)throw new Error("Must provide an object with a `name` property having a string value");const{name:t}=e;return this.wire.sendAction("get-service-configuration",{name:t}).then((({payload:e})=>e.data))}async getSystemAppConfig(e){if("string"!=typeof e)throw new Error("Must provide a string value for name of system app");return this.wire.sendAction("get-system-app-configuration",{name:e}).then((({payload:e})=>e.data))}async registerShutdownHandler(e){this.wire.sendAction("system-register-shutdown-handler").catch((e=>{}));const{uuid:t,name:n}=this.wire.me;this.on("system-shutdown",(i=>{e({proceed:()=>{this.wire.environment.raiseEvent("application/system-shutdown-handled",{uuid:t,name:n,topic:"application"})}})}))}runRvmHealthCheck(){return this.wire.sendAction("run-rvm-health-check").then((({payload:e})=>e.data))}async launchManifest(e,t={}){const{subscribe:n,...i}=t,r=i;if(n){const e=new ae.EventEmitter;n(e);const t="app-version-progress",i="runtime-status",o="app-version-complete",s="app-version-error",a=this.wire.environment.getNextMessageId().toString();r.appVersionId=a;const c=[o,t,i,s],d=e=>{const{appVersionId:t,topic:n,type:i,...r}=e;return{...r,type:c.find((e=>i.includes(e)))}},h=t=>{const n=d(t);e.emit(n.type,n)},l=()=>{this.removeListener(`${t}.${a}`,h),this.removeListener(`${i}.${a}`,h),this.removeListener(`${o}.${a}`,h),this.removeListener(`${s}.${a}`,h),this.removeListener(`${o}.${a}`,l),this.removeListener(`${s}.${a}`,l)};await Promise.all([this.on(`${t}.${a}`,h),this.on(`${i}.${a}`,h),this.once(`${o}.${a}`,h),this.once(`${s}.${a}`,h),this.once(`${o}.${a}`,l),this.once(`${s}.${a}`,l)])}return(await this.wire.sendAction("launch-manifest",{manifestUrl:e,opts:r})).payload.data.manifest}async queryPermissionForCurrentContext(e){const t={uuid:this.wire.me.uuid,name:this.wire.me.name};return(await this.wire.sendAction("query-permission-for-current-context",{apiName:e,identity:t})).payload.data}async enableNativeWindowIntegrationProvider(e){const{payload:t}=await this.wire.sendAction("enable-native-window-integration-provider",{permissions:e});return t.data}async registerUsage({data:e,type:t}){await this.wire.sendAction("register-usage",{data:e,type:t})}async getPrinters(){const{payload:e}=await this.wire.sendAction("system-get-printers");return e.data}async updateProcessLoggingOptions(e){await this.wire.sendAction("system-update-process-logging-options",{options:e})}async getDomainSettings(){const{payload:{data:e}}=await this.wire.sendAction("get-domain-settings",this.identity);return e}async setDomainSettings(e){await this.wire.sendAction("set-domain-settings",{domainSettings:e,...this.identity})}async refreshExtensions(){const{payload:e}=await this.wire.sendAction("refresh-extensions");return e.data}async getInstalledExtensions(){const{payload:e}=await this.wire.sendAction("get-installed-extensions");return e.data}}c.System=ce;var de={},he={};Object.defineProperty(he,"__esModule",{value:!0}),he.RefCounter=void 0;he.RefCounter=class{constructor(){this.topicRefMap=new Map}incRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t+1;n=i,this.topicRefMap.set(e,i)}else this.topicRefMap.set(e,1),n=1;return n}decRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t-1;this.topicRefMap.set(e,i),n=i}else n=-1;return n}actOnFirst(e,t,n){return 1===this.incRefCount(e)?t():n()}actOnLast(e,t,n){return 0===this.decRefCount(e)?t():n()}};var le={},ue={},pe={};Object.defineProperty(pe,"__esModule",{value:!0}),pe.ChannelBase=pe.ProtectedItems=void 0;const we=e=>async(t,n,i)=>{const r=await e(t,n,i);return void 0===r?n:r};pe.ProtectedItems=class{constructor(e,t){this.providerIdentity=e,this.close=t}};class ye{static defaultAction(e){throw new Error(`No action registered at target for ${e}`)}constructor(){this.subscriptions=new Map}async processAction(e,t,n){try{const i=this.subscriptions.has(e)?this.subscriptions.get(e):(t,n)=>(this.defaultAction??ye.defaultAction)(e,t,n),r=this.preAction?await this.preAction(e,t,n):t,o=await i(r,n);return this.postAction?await this.postAction(e,o,n):o}catch(t){if(this.errorMiddleware)return this.errorMiddleware(e,t,n);throw t}}beforeAction(e){if(this.preAction)throw new Error("Already registered beforeAction middleware");this.preAction=we(e)}onError(e){if(this.errorMiddleware)throw new Error("Already registered error middleware");this.errorMiddleware=e}afterAction(e){if(this.postAction)throw new Error("Already registered afterAction middleware");this.postAction=we(e)}remove(e){this.subscriptions.delete(e)}setDefaultAction(e){if(this.defaultAction)throw new Error("default action can only be set once");this.defaultAction=e}register(e,t){if(this.subscriptions.has(e))throw new Error(`Subscription already registered for action: ${e}. Unsubscribe before adding new subscription`);return this.subscriptions.set(e,t),!0}}pe.ChannelBase=ye;var fe,ge,me,ve=s&&s.__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)},Ce=s&&s.__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};Object.defineProperty(ue,"__esModule",{value:!0}),ue.ChannelClient=void 0;const be=pe,Ie=new Map;class Ee extends be.ChannelBase{static closeChannelByEndpointId(e){const t=Ie.get(e);t&&ve(t,me,"f").call(t)}static handleProviderDisconnect(e){for(const t of Ie.values())t.providerIdentity.channelId===e.channelId&&(t.disconnectListener(e),ve(t,me,"f").call(t))}constructor(e,t,n){super(),fe.set(this,void 0),ge.set(this,void 0),this.processAction=(e,t,n)=>super.processAction(e,t,n),me.set(this,(()=>{Ie.delete(this.endpointId),ve(this,ge,"f").close()})),Ce(this,fe,new be.ProtectedItems(e,t),"f"),this.disconnectListener=()=>{},this.endpointId=e.endpointId,Ce(this,ge,n,"f"),Ie.set(this.endpointId,this),n.receive(this.processAction)}get providerIdentity(){return ve(this,fe,"f").providerIdentity}async dispatch(e,t){if(ve(this,ge,"f").isEndpointConnected(this.providerIdentity.channelId))return ve(this,ge,"f").send(this.providerIdentity.channelId,e,t);throw new Error("The client you are trying to dispatch from is disconnected from the target provider.")}onDisconnection(e){this.disconnectListener=t=>{try{e(t)}catch(e){throw new Error(`Error while calling the onDisconnection callback: ${e.message}`)}finally{this.disconnectListener=()=>{}}}}async disconnect(){await this.sendDisconnectAction(),ve(this,me,"f").call(this)}async sendDisconnectAction(){const e=ve(this,fe,"f");await e.close()}static async wireClose(e,t,n){const{channelName:i,uuid:r,name:o}=t;await e.sendAction("disconnect-from-channel",{channelName:i,uuid:r,name:o,endpointId:n})}}ue.ChannelClient=Ee,fe=new WeakMap,ge=new WeakMap,me=new WeakMap;var xe={},Ae={};Object.defineProperty(Ae,"__esModule",{value:!0}),Ae.exhaustiveCheck=void 0,Ae.exhaustiveCheck=function(e,t){throw new Error(`Unsupported value: ${e}${t?`\n Supported values are: ${t.join("")}`:""}`)};var Pe,Me,_e,Oe={},Se=s&&s.__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},Re=s&&s.__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)};Object.defineProperty(Oe,"__esModule",{value:!0}),Oe.ClassicInfo=Oe.ClassicStrategy=void 0;Oe.ClassicStrategy=class{constructor(e,t,n,i){this.messageReceiver=t,this.endpointId=n,this.providerIdentity=i,Pe.set(this,void 0),Me.set(this,new Map),_e.set(this,new Map),this.send=async(e,t,n)=>{const i=Re(this,Me,"f").get(e);if(!i)throw new Error(`Could not locate routing info for endpoint ${e}`);const r={...i};r.isLocalEndpointId&&delete r.endpointId,delete r.isLocalEndpointId;const o=Re(this,Pe,"f").sendAction("send-channel-message",{...r,providerIdentity:this.providerIdentity,action:t,payload:n});Re(this,_e,"f").get(e)?.add(o);return(await o.catch((e=>{throw new Error(e.message)})).finally((()=>{Re(this,_e,"f").get(e)?.delete(o)}))).payload.data.result},this.close=async()=>{this.messageReceiver.removeEndpoint(this.providerIdentity.channelId,this.endpointId),[...Re(this,Me,"f").keys()].forEach((e=>this.closeEndpoint(e))),Se(this,Me,new Map,"f")},Se(this,Pe,e,"f")}onEndpointDisconnect(e,t){}receive(e){this.messageReceiver.addEndpoint(e,this.providerIdentity.channelId,this.endpointId)}async closeEndpoint(e){const t=Re(this,Me,"f").get(e);Re(this,Me,"f").delete(e);const n=Re(this,_e,"f").get(e);n?.forEach((n=>{const i=`Channel connection with identity uuid: ${t?.uuid} / name: ${t?.name} / endpointId: ${e} no longer connected.`;n.cancel(new Error(i))}))}isEndpointConnected(e){return Re(this,Me,"f").has(e)}addEndpoint(e,t){Re(this,Me,"f").set(e,t.endpointIdentity),Re(this,_e,"f").set(e,new Set)}isValidEndpointPayload(e){return"string"==typeof e?.endpointIdentity?.endpointId||"string"==typeof e?.endpointIdentity?.channelId}},Pe=new WeakMap,Me=new WeakMap,_e=new WeakMap,Oe.ClassicInfo={version:5,minimumVersion:0,type:"classic"};var Fe={},je={},ke={};Object.defineProperty(ke,"__esModule",{value:!0}),ke.errorToPOJO=void 0,ke.errorToPOJO=function(e){return{stack:e.stack,name:e.name,message:e.message,toString:()=>e.stack||e.toString()}};var Le,Te,$e=s&&s.__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)},Be=s&&s.__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};Object.defineProperty(je,"__esModule",{value:!0}),je.RTCEndpoint=void 0;const Ge=ke;je.RTCEndpoint=class{static isValidEndpointPayload(e){const t=e=>"object"==typeof e&&null!==e;return t(e)&&t(e.endpointIdentity)&&t(e.rtc)&&"string"==typeof e.endpointIdentity.endpointId}constructor({rtc:e,endpointIdentity:t}){this.responseMap=new Map,Le.set(this,null),Te.set(this,void 0),this.connectionStateChangeHandler=e=>{"connected"!==this.rtc.rtcClient.connectionState&&(this.rtc.rtcClient.removeEventListener("connectionstatechange",this.connectionStateChangeHandler),this.close(),$e(this,Te,"f")&&$e(this,Te,"f").call(this))},this.send=async(e,t)=>{const n=`message-${Math.random()}`,i=new Promise(((e,t)=>{this.responseMap.set(n,{resolve:e,reject:t})}));return this.rtc.channels.request.send(JSON.stringify({action:e,payload:t,messageId:n})),i},this.close=()=>{this.responseMap.forEach((e=>e.reject("Connection has closed."))),this.responseMap=new Map,this.rtc.channels.request.close(),this.rtc.channels.response.close(),this.rtc.rtcClient.close()},this.rtc=e,this.endpointIdentity=t,this.rtc.channels.response.addEventListener("message",(e=>{let{data:t}=e;e.data instanceof ArrayBuffer&&(t=(new TextDecoder).decode(e.data));const{messageId:n,payload:i,success:r,error:o}=JSON.parse(t),{resolve:s,reject:a}=this.responseMap.get(n)??{};s&&a?(this.responseMap.delete(n),r?s(i):a(o)):(console.log("Could not find id in responseMap."),console.log(e))})),this.rtc.channels.request.addEventListener("message",(async e=>{let{data:n}=e;e.data instanceof ArrayBuffer&&(n=(new TextDecoder).decode(e.data));const{messageId:i,action:r,payload:o}=JSON.parse(n);if($e(this,Le,"f"))try{const e=await $e(this,Le,"f").call(this,r,o,t);this.rtc.channels.response.send(JSON.stringify({messageId:i,payload:e,success:!0}))}catch(e){"open"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,error:(0,Ge.errorToPOJO)(e),success:!1}))}else"open"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,success:!1,error:"Connection not ready."}))})),this.rtc.rtcClient.addEventListener("connectionstatechange",this.connectionStateChangeHandler),Object.values(this.rtc.channels).forEach((e=>{e.onclose=e=>{[...this.responseMap.values()].forEach((e=>e.reject(new Error("RTCDataChannel closed unexpectedly, this is most commonly caused by message size. Note: RTC Channels have a message size limit of ~255kB.")))),this.close(),$e(this,Te,"f")&&$e(this,Te,"f").call(this)}}))}onDisconnect(e){if($e(this,Te,"f"))throw new Error("RTCEndpoint disconnectListener cannot be set twice.");Be(this,Te,e,"f")}receive(e){if($e(this,Le,"f"))throw new Error("You have already set a listener for this RTC Endpoint.");Be(this,Le,e,"f")}get connected(){return"connected"===this.rtc.rtcClient.connectionState}},Le=new WeakMap,Te=new WeakMap;var We,He,Ne,De={},Ue=s&&s.__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)},Ve=s&&s.__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};Object.defineProperty(De,"__esModule",{value:!0}),De.EndpointStrategy=void 0;De.EndpointStrategy=class{constructor(e,t,n){this.EndpointType=e,this.StrategyName=n,We.set(this,null),He.set(this,new Map),Ne.set(this,!0),this.send=async(e,t,n)=>this.getEndpointById(e).send(t,n),this.close=async()=>{Ue(this,Ne,"f")&&(Ue(this,He,"f").forEach((e=>e.close())),Ve(this,He,new Map,"f")),Ve(this,Ne,!1,"f")},this.isValidEndpointPayload=t}onEndpointDisconnect(e,t){this.getEndpointById(e).onDisconnect(t)}receive(e){if(Ue(this,We,"f"))throw new Error(`You have already set a listener for this ${this.StrategyName} Strategy`);Ve(this,We,e,"f"),Ue(this,He,"f").forEach((e=>e.receive(Ue(this,We,"f"))))}getEndpointById(e){const t=Ue(this,He,"f").get(e);if(!t)throw new Error(`Client with endpoint id ${e} is not connected`);return t}get connected(){return Ue(this,Ne,"f")}isEndpointConnected(e){return Ue(this,He,"f").has(e)}addEndpoint(e,t){if(!Ue(this,Ne,"f"))return void console.warn(`Adding endpoint to disconnected ${this.StrategyName} Strategy`);const n=new this.EndpointType(t);Ue(this,We,"f")&&n.receive(Ue(this,We,"f")),Ue(this,He,"f").set(e,n)}async closeEndpoint(e){Ue(this,He,"f").delete(e)}},We=new WeakMap,He=new WeakMap,Ne=new WeakMap,Object.defineProperty(Fe,"__esModule",{value:!0}),Fe.RTCInfo=Fe.RTCStrategy=void 0;const ze=je,Ke=De;class qe extends Ke.EndpointStrategy{constructor(){super(ze.RTCEndpoint,ze.RTCEndpoint.isValidEndpointPayload,"RTC")}}Fe.RTCStrategy=qe,Fe.RTCInfo={version:2,minimumVersion:0,type:"rtc"};var Je={};Object.defineProperty(Je,"__esModule",{value:!0}),Je.RTCICEManager=void 0;const Ye=d;class Ze extends Ye.EmitterBase{constructor(e){super(e,"channel"),this.ensureChannelOpened=e=>new Promise(((t,n)=>{if("open"===e.readyState)t();else if("connecting"===e.readyState){const n=()=>{e.removeEventListener("open",n),t()};e.addEventListener("open",n)}else n(new Error("This Channel has already closed"))}))}static createDataChannelPromise(e,t){let n;const i=new Promise((e=>{n=e})),r=i=>{const o=()=>{i.channel.removeEventListener("open",o),n(i.channel)};i.channel.label===e&&(i.channel.addEventListener("open",o),t.removeEventListener("datachannel",r))};return t.addEventListener("datachannel",r),i}async listenForProviderIce(e,t){await this.on(this.createProviderEventName(e),t,{timestamp:Date.now()})}async raiseProviderIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createProviderEventName(e)),t)}async listenForClientIce(e,t){await this.on(this.createClientEventName(e),t,{timestamp:Date.now()})}async raiseClientIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createClientEventName(e)),t)}cleanupIceListeners(e){this.removeAllListeners(this.createClientEventName(e)),this.removeAllListeners(this.createProviderEventName(e))}createClientEventName(e){return`ice-client-${e}`}createProviderEventName(e){return`ice-provider-${e}`}createRouteString(e){return`channel/${e}`}createRtcPeer(){return this.wire.environment.getRtcPeer()}async startClientOffer(){const e=Math.random().toString(),t=this.createRtcPeer();t.addEventListener("icecandidate",(async t=>{t.candidate&&await this.raiseClientIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForProviderIce(e,(async e=>{await t.addIceCandidate(e.candidate)}));const n={request:t.createDataChannel("request"),response:t.createDataChannel("response")},i=await t.createOffer();await t.setLocalDescription(i);const r=Promise.all([n.request,n.response].map(this.ensureChannelOpened)).then((()=>{}));return{rtcClient:t,channels:n,offer:i,rtcConnectionId:e,channelsOpened:r}}async finishClientOffer(e,t,n){return await e.setRemoteDescription(t),await n,!0}async createProviderAnswer(e,t){const n=this.createRtcPeer(),i=Ze.createDataChannelPromise("request",n),r=Ze.createDataChannelPromise("response",n);n.addEventListener("icecandidate",(async t=>{t.candidate&&await this.raiseProviderIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForClientIce(e,(async e=>{await n.addIceCandidate(e.candidate)})),await n.setRemoteDescription(t);const o=await n.createAnswer();await n.setLocalDescription(o);const s=Promise.all([i,r]).then((([t,n])=>(this.cleanupIceListeners(e),{request:t,response:n})));return{rtcClient:n,answer:o,channels:s}}}Je.RTCICEManager=Ze;var Qe={},Xe={};function et(e){return[...e.split(".").reverse().entries()].reduce(((e,[t,n])=>e+ +n*1e4**t),0)}function tt(e,t){return et(e)>=et(t)}function nt(e){return e.split("/")[0]}Object.defineProperty(Xe,"__esModule",{value:!0}),Xe.runtimeUuidMeetsMinimumRuntimeVersion=Xe.parseRuntimeUuid=Xe.meetsMinimumRuntimeVersion=void 0,Xe.meetsMinimumRuntimeVersion=tt,Xe.parseRuntimeUuid=nt,Xe.runtimeUuidMeetsMinimumRuntimeVersion=function(e,t){return tt(nt(e),t)};var it,rt,ot,st,at,ct=s&&s.__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)},dt=s&&s.__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};Object.defineProperty(Qe,"__esModule",{value:!0}),Qe.ChannelProvider=void 0;const ht=pe,lt=Xe;class ut extends ht.ChannelBase{get connections(){return[...ct(this,it,"f")]}static handleClientDisconnection(e,t){const n=e.connections.find((e=>e.endpointId===t.endpointId));if(n)ct(e,st,"f").call(e,n);else{e.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name)).forEach(ct(e,st,"f"))}e.disconnectListener(t)}static setProviderRemoval(e,t){ut.removalMap.set(e,t)}constructor(e,t,n){super(),it.set(this,void 0),rt.set(this,void 0),ot.set(this,void 0),st.set(this,(e=>{const t=this.connections.filter((t=>t.endpointId!==e.endpointId));ct(this,ot,"f").closeEndpoint(e.endpointId),dt(this,it,t,"f")})),this.processAction=async(e,t,n)=>(ut.clientIsMultiRuntime(n)&&!(0,lt.runtimeUuidMeetsMinimumRuntimeVersion)(n.runtimeUuid,"18.87.56.0")?this.handleMultiRuntimeLegacyClient(n):this.checkForClientConnection(n),super.processAction(e,t,n)),at.set(this,(()=>{ct(this,ot,"f").close();const e=ut.removalMap.get(this);e&&e()})),dt(this,rt,new ht.ProtectedItems(e,t),"f"),this.connectListener=()=>{},this.disconnectListener=()=>{},dt(this,it,[],"f"),dt(this,ot,n,"f"),n.receive(this.processAction)}dispatch(e,t,n){const i=e.endpointId??this.getEndpointIdForOpenFinId(e,t);return i&&ct(this,ot,"f").isEndpointConnected(i)?ct(this,ot,"f").send(i,t,n):Promise.reject(new Error(`Client connection with identity uuid: ${e.uuid} / name: ${e.name} / endpointId: ${i} no longer connected.`))}async processConnection(e,t){return ct(this,it,"f").push(e),this.connectListener(e,t)}publish(e,t){return this.connections.map((n=>ct(this,ot,"f").send(n.endpointId,e,t)))}onConnection(e){this.connectListener=e}onDisconnection(e){this.disconnectListener=e}async destroy(){const e=ct(this,rt,"f");e.providerIdentity,dt(this,it,[],"f"),await e.close(),ct(this,at,"f").call(this)}async getAllClientInfo(){return this.connections.map((e=>{const{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}=e;return{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}}))}checkForClientConnection(e){if(!this.isClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider.\n Client Identity: {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}isClientConnected(e){return ut.clientIdentityIncludesEndpointId(e)?this.connections.some((t=>t.endpointId===e.endpointId&&t.uuid===e.uuid&&t.name===e.name)):this.isLegacyClientConnected(e)}isLegacyClientConnected(e){return this.connections.some((t=>t.uuid===e.uuid&&t.name===e.name))}handleMultiRuntimeLegacyClient(e){if(!this.isLegacyClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider. Client Identity:\n {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}getEndpointIdForOpenFinId(e,t){const n=this.connections.filter((t=>t.name===e.name&&t.uuid===e.uuid));if(n.length>=2){const n=ct(this,rt,"f"),{uuid:i,name:r}=e,o=n?.providerIdentity.uuid,s=n?.providerIdentity.name;console.warn(`WARNING: Dispatch call may have unintended results. The "to" argument of your dispatch call is missing the\n "endpointId" parameter. The identity you are dispatching to ({uuid: ${i}, name: ${r}})\n has multiple channelClients for this channel. Your dispatched action: (${t}) from the provider:\n ({uuid: ${o}, name: ${s}}) will only be processed by the most recently-created client.`)}return n.pop()?.endpointId}static clientIdentityIncludesEndpointId(e){return void 0!==e.endpointId}static clientIsMultiRuntime(e){return void 0!==e.runtimeUuid}static async wireClose(e,t){await e.sendAction("destroy-channel",{channelName:t})}}Qe.ChannelProvider=ut,it=new WeakMap,rt=new WeakMap,ot=new WeakMap,st=new WeakMap,at=new WeakMap,ut.removalMap=new WeakMap;var pt={};Object.defineProperty(pt,"__esModule",{value:!0}),pt.MessageReceiver=void 0;const wt=ue,yt=d;class ft extends yt.Base{constructor(e){super(e),this.onmessage=e=>"process-channel-message"===e.action&&(this.processChannelMessage(e),!0),this.endpointMap=new Map,this.latestEndpointIdByChannelId=new Map,e.registerMessageHandler(this.onmessage.bind(this))}async processChannelMessage(e){const{senderIdentity:t,providerIdentity:n,action:i,ackToSender:r,payload:o,intendedTargetIdentity:s}=e.payload,a=s.channelId??s.endpointId??this.latestEndpointIdByChannelId.get(n.channelId),c=this.endpointMap.get(a);if(!c)return r.payload.success=!1,r.payload.reason=`Client connection with identity uuid: ${this.wire.me.uuid} / name: ${this.wire.me.name} / endpointId: ${a} no longer connected.`,this.wire.sendRaw(r);try{const e=await c(i,o,t);return r.payload.payload=r.payload.payload||{},r.payload.payload.result=e,this.wire.sendRaw(r)}catch(e){return r.payload.success=!1,r.payload.reason=e.message,this.wire.sendRaw(r)}}addEndpoint(e,t,n){this.endpointMap.set(n,e),t!==n&&this.latestEndpointIdByChannelId.set(t,n)}removeEndpoint(e,t){this.endpointMap.delete(t),this.latestEndpointIdByChannelId.get(e)===t&&this.latestEndpointIdByChannelId.delete(e)}checkForPreviousClientConnection(e){const t=this.latestEndpointIdByChannelId.get(e);t&&(wt.ChannelClient.closeChannelByEndpointId(t),console.warn("You have created a second connection to an older provider. First connection has been removed from the clientMap"),console.warn("If the provider calls publish(), you may receive multiple messages."))}}pt.MessageReceiver=ft;var gt={};Object.defineProperty(gt,"__esModule",{value:!0}),gt.ProtocolManager=void 0;gt.ProtocolManager=class{constructor(e){this.ProtocolsInPreferenceOrder=e,this.DefaultClientProtocols=["classic"],this.DefaultProviderProtocols=["classic"],this.getClientProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultClientProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(", ")}.`);return t},this.getProviderProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultProviderProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(", ")}.`);return t},this.getCompatibleProtocols=(e,t)=>t.supportedProtocols.filter((t=>e.some((e=>e.type===t.type&&t.version>=e.minimumVersion&&e.version>=(t.minimumVersion??0))))).slice(0,t.maxProtocols)}};var mt={};Object.defineProperty(mt,"__esModule",{value:!0});class vt{static combine(e,t){return new vt(e,t)}constructor(e,t){this.primary=e,this.secondary=t}onEndpointDisconnect(e,t){this.primary.onEndpointDisconnect(e,(()=>{this.secondary.isEndpointConnected(e)||t()})),this.secondary.onEndpointDisconnect(e,(()=>{this.primary.isEndpointConnected(e)||t()}))}isValidEndpointPayload(e){return this.primary.isValidEndpointPayload(e)||this.secondary.isValidEndpointPayload(e)}async closeEndpoint(e){await this.primary.closeEndpoint(e),await this.secondary.closeEndpoint(e)}isEndpointConnected(e){return this.primary.isEndpointConnected(e)||this.secondary.isEndpointConnected(e)}async addEndpoint(e,t){this.primary.isValidEndpointPayload(t)&&await this.primary.addEndpoint(e,t),this.secondary.isValidEndpointPayload(t)&&await this.secondary.addEndpoint(e,t)}receive(e){this.primary.receive(e),this.secondary.receive(e)}send(e,t,n){return this.primary.isEndpointConnected(e)?this.primary.send(e,t,n):this.secondary.send(e,t,n)}async close(){await Promise.all([this.primary.close(),this.secondary.close()])}}mt.default=vt;var Ct,bt,It=s&&s.__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},Et=s&&s.__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)},xt=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(xe,"__esModule",{value:!0}),xe.ConnectionManager=void 0;const At=Ae,Pt=d,Mt=Oe,_t=Fe,Ot=Je,St=Qe,Rt=pt,Ft=gt,jt=xt(mt);class kt extends Pt.Base{static getProtocolOptionsFromStrings(e){return e.map((e=>{switch(e){case"rtc":return _t.RTCInfo;case"classic":return Mt.ClassicInfo;default:return(0,At.exhaustiveCheck)(e,["rtc","classic"])}}))}constructor(e){super(e),Ct.set(this,void 0),bt.set(this,void 0),this.removeChannelFromProviderMap=e=>{this.providerMap.delete(e)},this.onmessage=e=>"process-channel-connection"===e.action&&(this.processChannelConnection(e),!0),this.providerMap=new Map,this.protocolManager=new Ft.ProtocolManager("node"===this.wire.environment.type?["classic"]:["rtc","classic"]),It(this,Ct,new Rt.MessageReceiver(e),"f"),It(this,bt,new Ot.RTCICEManager(e),"f"),e.registerMessageHandler(this.onmessage.bind(this))}createProvider(e,t){const n=Object.assign(this.wire.environment.getDefaultChannelOptions().create,e||{}),i=this.protocolManager.getProviderProtocols(n?.protocols),r=i.map((e=>{switch(e){case"rtc":return new _t.RTCStrategy;case"classic":return new Mt.ClassicStrategy(this.wire,Et(this,Ct,"f"),t.channelId,t);default:return(0,At.exhaustiveCheck)(e,["rtc","classic"])}}));let o;if(2===r.length){const[e,t]=r;o=jt.default.combine(e,t)}else{if(1!==r.length)throw new Error("failed to combine strategies");[o]=r}const s=new St.ChannelProvider(t,(()=>St.ChannelProvider.wireClose(this.wire,t.channelName)),o),a=t.channelId;return this.providerMap.set(a,{provider:s,strategy:o,supportedProtocols:kt.getProtocolOptionsFromStrings(i)}),St.ChannelProvider.setProviderRemoval(s,this.removeChannelFromProviderMap.bind(this)),s}async createClientOffer(e){const t=this.protocolManager.getClientProtocols(e?.protocols);let n;return{offer:{supportedProtocols:await Promise.all(t.map((async e=>{switch(e){case"rtc":{const{rtcClient:e,channels:t,offer:i,rtcConnectionId:r,channelsOpened:o}=await Et(this,bt,"f").startClientOffer();return n={rtcClient:e,channels:t,channelsOpened:o},{type:"rtc",version:_t.RTCInfo.version,payload:{offer:i,rtcConnectionId:r}}}case"classic":return{type:"classic",version:Mt.ClassicInfo.version};default:return(0,At.exhaustiveCheck)(e,["rtc","classic"])}}))),maxProtocols:2},rtc:n}}async createClientStrategy(e,t){t.endpointId||(t.endpointId=this.wire.environment.getNextMessageId(),Et(this,Ct,"f").checkForPreviousClientConnection(t.channelId));const n=t.answer??{supportedProtocols:[{type:"classic",version:1}]},i=(await Promise.all(n.supportedProtocols.map((async n=>"rtc"===n.type&&e?(await Et(this,bt,"f").finishClientOffer(e.rtcClient,n.payload.answer,e.channelsOpened),new _t.RTCStrategy):"classic"===n.type?new Mt.ClassicStrategy(this.wire,Et(this,Ct,"f"),t.endpointId,t):null)))).filter((e=>null!==e));let r;if(e&&!i.some((e=>e instanceof _t.RTCStrategy))&&e&&e.rtcClient.close(),i.length>=2)r=jt.default.combine(i[0],i[1]);else{if(!i.length)throw new Error("No compatible protocols");[r]=i}const o={endpointIdentity:t,rtc:e};return r.addEndpoint(t.channelId,o),r}async processChannelConnection(e){const{clientIdentity:t,providerIdentity:n,ackToSender:i,payload:r,offer:o}=e.payload;t.endpointId?t.isLocalEndpointId=!1:(t.endpointId=this.wire.environment.getNextMessageId(),t.isLocalEndpointId=!0);const s=n.channelId,a=this.providerMap.get(s);if(!a)return i.payload.success=!1,i.payload.reason=`Channel "${n.channelName}" has been destroyed.`,this.wire.sendRaw(i);const{provider:c,strategy:d,supportedProtocols:h}=a;try{if(!(c instanceof St.ChannelProvider))throw Error("Cannot connect to a channel client");const e=o??{supportedProtocols:[{type:"classic",version:1}],maxProtocols:1},n=this.protocolManager.getCompatibleProtocols(h,e);if(!n.length)throw new Error("This provider does not support any of the offered protocols.");const s=await c.processConnection(t,r);i.payload.payload=i.payload.payload||{};let a={supportedProtocols:[],endpointPayloadPromise:Promise.resolve({endpointIdentity:t})};return a=await n.reduce((async(e,t)=>{const n=await e;if("rtc"===t.type){const{answer:e,rtcClient:i,channels:r}=await Et(this,bt,"f").createProviderAnswer(t.payload.rtcConnectionId,t.payload.offer);n.supportedProtocols.push({type:"rtc",version:_t.RTCInfo.version,payload:{answer:e}}),n.endpointPayloadPromise=n.endpointPayloadPromise.then((e=>r.then((t=>({...e,rtc:{rtcClient:i,channels:t}})))))}else n.supportedProtocols.push({type:"classic",version:Mt.ClassicInfo.version});return n}),Promise.resolve(a)),a.endpointPayloadPromise.then((e=>d.addEndpoint(t.endpointId,e))),i.payload.payload.result=s,i.payload.payload.answer=a,this.wire.sendRaw(i)}catch(e){return i.payload.success=!1,i.payload.reason=e.message,this.wire.sendRaw(i)}}}xe.ConnectionManager=kt,Ct=new WeakMap,bt=new WeakMap;var Lt,Tt,$t,Bt=s&&s.__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},Gt=s&&s.__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)};Object.defineProperty(le,"__esModule",{value:!0}),le.Channel=void 0;const Wt=t,Ht=G,Nt=d,Dt=ue,Ut=xe,Vt=Qe;function zt(e){const t=Math.floor(e/10),n=Math.min(3e4,500*2**t);return new Promise((e=>{setTimeout((()=>{e(!1)}),n)}))}class Kt extends Nt.EmitterBase{constructor(e){super(e,"channel"),Lt.set(this,void 0),Tt.set(this,new Wt.EventEmitter),$t.set(this,new Ht.AsyncRetryableLazy((async()=>{await Promise.all([this.on("disconnected",(e=>{Dt.ChannelClient.handleProviderDisconnect(e)})),this.on("connected",((...e)=>{Gt(this,Tt,"f").emit("connected",...e)}))]).catch((()=>new Error("error setting up channel connection listeners")))}))),Bt(this,Lt,new Ut.ConnectionManager(e),"f")}async getAllChannels(){return this.wire.sendAction("get-all-channels").then((({payload:e})=>e.data))}async onChannelConnect(e){await this.on("connected",e)}async onChannelDisconnect(e){await this.on("disconnected",e)}async safeConnect(e,t,n){const i={count:0};do{let r=()=>{};const o=new Promise((t=>{r=n=>{e===n.channelName&&t(!0)},Gt(this,Tt,"f").on("connected",r)}));try{if(i.count>0){i.gotConnectedEvent=await Promise.race([zt(i.count),o]);const t=await this.wire.sendAction("connect-to-channel",{...n,retryInfo:i});return console.log(`Successfully connected to channelName: ${e}`),t.payload.data}const t=this.wire.sendAction("connect-to-channel",n);i.originalMessageId=t.messageId;return(await t).payload.data}catch(n){if(!n.message.includes("internal-nack"))throw n;t&&0===i.count&&console.warn(`No channel found for channelName: ${e}. Waiting for connection...`)}finally{i.count+=1,Gt(this,Tt,"f").removeListener("connected",r)}}while(t);throw new Error(`No channel found for channelName: ${e}.`)}async connect(e,t={}){if(await Gt(this,$t,"f").getValue(),!e||"string"!=typeof e)throw new Error("Please provide a channelName string to connect to a channel.");const n={wait:!0,...this.wire.environment.getDefaultChannelOptions().connect,...t},{offer:i,rtc:r}=await Gt(this,Lt,"f").createClientOffer(n);let o;(this.fin.me.isFrame||this.fin.me.isView||this.fin.me.isWindow)&&(o=(await this.fin.me.getInfo()).url);const s={channelName:e,...n,offer:i,connectionUrl:o},a=await this.safeConnect(e,n.wait,s),c=await Gt(this,Lt,"f").createClientStrategy(r,a),d=new Dt.ChannelClient(a,(()=>Dt.ChannelClient.wireClose(this.wire,a,a.endpointId)),c);return c.onEndpointDisconnect(a.channelId,(async()=>{try{await d.sendDisconnectAction()}catch(e){console.warn(`Something went wrong during disconnect for client with uuid: ${a.uuid} / name: ${a.name} / endpointId: ${a.endpointId}.`)}finally{Dt.ChannelClient.handleProviderDisconnect(a)}})),d}async create(e,t){if(!e)throw new Error("Please provide a channelName to create a channel");const{payload:{data:n}}=await this.wire.sendAction("create-channel",{channelName:e}),i=Gt(this,Lt,"f").createProvider(t,n);return this.on("client-disconnected",(t=>{t.channelName===e&&Vt.ChannelProvider.handleClientDisconnection(i,t)})),i}}le.Channel=Kt,Lt=new WeakMap,Tt=new WeakMap,$t=new WeakMap,Object.defineProperty(de,"__esModule",{value:!0}),de.InterAppPayload=de.InterApplicationBus=void 0;const qt=t,Jt=d,Yt=he,Zt=le,Qt=O;class Xt extends Jt.Base{constructor(e){super(e),this.events={subscriberAdded:"subscriber-added",subscriberRemoved:"subscriber-removed"},this.refCounter=new Yt.RefCounter,this.Channel=new Zt.Channel(e),this.emitter=new qt.EventEmitter,e.registerMessageHandler(this.onmessage.bind(this)),this.on=this.emitter.on.bind(this.emitter),this.removeAllListeners=this.emitter.removeAllListeners.bind(this.emitter)}async publish(e,t){await this.wire.sendAction("publish-message",{topic:e,message:t,sourceWindowName:this.me.name})}async send(e,t,n){const i=(0,Qt.validateIdentity)(e);if(i)throw new Error(i);await this.wire.sendAction("send-message",{destinationUuid:e.uuid,destinationWindowName:e.name,topic:t,message:n,sourceWindowName:this.me.name})}subscribe(e,t,n){const i=this.createSubscriptionKey(e.uuid,e.name||"*",t);return this.emitter.on(i,n),this.refCounter.actOnFirst(i,(async()=>{await this.wire.sendAction("subscribe",{sourceUuid:e.uuid,sourceWindowName:e.name||"*",topic:t,destinationWindowName:this.me.name})}),(()=>Promise.resolve()))}unsubscribe(e,t,n){const i=e.name||"*",r=this.createSubscriptionKey(e.uuid,i,t);return this.emitter.removeListener(r,n),this.refCounter.actOnLast(r,(async()=>{await this.wire.sendAction("unsubscribe",{sourceUuid:e.uuid,sourceWindowName:i,topic:t,destinationWindowName:this.me.name})}),(()=>new Promise((e=>e)).then((()=>{}))))}processMessage(e){const{payload:{message:t,sourceWindowName:n,sourceUuid:i,topic:r}}=e,o=[this.createSubscriptionKey(i,n,r),this.createSubscriptionKey(i,"*",r),this.createSubscriptionKey("*","*",r)],s={uuid:i,name:n};o.forEach((e=>{this.emitter.emit(e,t,s)}))}emitSubscriverEvent(e,t){const{payload:{targetName:n,uuid:i,topic:r}}=t,o={name:n,uuid:i,topic:r};this.emitter.emit(e,o)}createSubscriptionKey(e,t,n){const i=t||"*";if(!(e&&i&&n))throw new Error("Missing uuid, name, or topic string");return function(...e){return e.map((e=>Buffer.from(`${e}`).toString("base64"))).join("/")}(e,i,n)}onmessage(e){const{action:t}=e;switch(t){case"process-message":this.processMessage(e);break;case this.events.subscriberAdded:this.emitSubscriverEvent(this.events.subscriberAdded,e);break;case this.events.subscriberRemoved:this.emitSubscriverEvent(this.events.subscriberRemoved,e)}return!0}}de.InterApplicationBus=Xt;de.InterAppPayload=class{};var en={};Object.defineProperty(en,"__esModule",{value:!0}),en.Clipboard=void 0;const tn=d;class nn extends tn.Base{async writeText(e){await this.wire.sendAction("clipboard-write-text",e)}async readText(e){const{payload:t}=await this.wire.sendAction("clipboard-read-text",{type:e});return t.data}async writeImage(e){await this.wire.sendAction("clipboard-write-image",e)}async readImage(e={format:"dataURL"}){const{payload:t}=await this.wire.sendAction("clipboard-read-image",e);return t.data}async writeHtml(e){await this.wire.sendAction("clipboard-write-html",e)}async readHtml(e){const{payload:t}=await this.wire.sendAction("clipboard-read-html",{type:e});return t.data}async writeRtf(e){await this.wire.sendAction("clipboard-write-rtf",e)}async readRtf(e){const{payload:t}=await this.wire.sendAction("clipboard-read-rtf",{type:e});return t.data}async write(e){await this.wire.sendAction("clipboard-write",e)}async getAvailableFormats(e){const{payload:t}=await this.wire.sendAction("clipboard-read-formats",{type:e});return t.data}}en.Clipboard=nn;var rn={},on={},sn={};Object.defineProperty(sn,"__esModule",{value:!0}),sn.ExternalApplication=void 0;const an=d;class cn extends an.EmitterBase{constructor(e,t){super(e,"external-application",t.uuid),this.identity=t}getInfo(){return this.wire.sendAction("get-external-application-info",this.identity).then((({payload:e})=>e.data))}}sn.ExternalApplication=cn,Object.defineProperty(on,"__esModule",{value:!0}),on.ExternalApplicationModule=void 0;const dn=d,hn=sn;class ln extends dn.Base{wrap(e){return this.wire.sendAction("external-application-wrap").catch((e=>{})),Promise.resolve(new hn.ExternalApplication(this.wire,{uuid:e}))}wrapSync(e){return this.wire.sendAction("external-application-wrap-sync").catch((e=>{})),new hn.ExternalApplication(this.wire,{uuid:e})}}on.ExternalApplicationModule=ln,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(on,e),n(sn,e)}(rn);var un={},pn={},wn={};Object.defineProperty(wn,"__esModule",{value:!0}),wn._Frame=void 0;const yn=d;class fn extends yn.EmitterBase{constructor(e,t){super(e,"frame",t.uuid,t.name),this.identity=t}getInfo(){return this.wire.sendAction("get-frame-info",this.identity).then((({payload:e})=>e.data))}getParentWindow(){return this.wire.sendAction("get-parent-window",this.identity).then((({payload:e})=>e.data))}}wn._Frame=fn,Object.defineProperty(pn,"__esModule",{value:!0}),pn._FrameModule=void 0;const gn=d,mn=O,vn=wn;class Cn extends gn.Base{async wrap(e){this.wire.sendAction("frame-wrap").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}wrapSync(e){this.wire.sendAction("frame-wrap-sync").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}getCurrent(){return this.wire.sendAction("frame-get-current").catch((e=>{})),Promise.resolve(new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity()))}getCurrentSync(){return this.wire.sendAction("frame-get-current-sync").catch((e=>{})),new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity())}}pn._FrameModule=Cn,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(pn,e),n(wn,e)}(un);var bn={};Object.defineProperty(bn,"__esModule",{value:!0}),bn.GlobalHotkey=void 0;const In=d;class En extends In.EmitterBase{constructor(e){super(e,"global-hotkey")}async register(e,t){await this.on(e,t),await this.wire.sendAction("global-hotkey-register",{hotkey:e})}async unregister(e){await this.removeAllListeners(e),await this.wire.sendAction("global-hotkey-unregister",{hotkey:e})}async unregisterAll(){await Promise.all(this.eventNames().filter((e=>!("registered"===e||"unregistered"===e))).map((e=>this.removeAllListeners(e)))),await this.wire.sendAction("global-hotkey-unregister-all",{})}async isRegistered(e){const{payload:{data:t}}=await this.wire.sendAction("global-hotkey-is-registered",{hotkey:e});return t}}bn.GlobalHotkey=En;var xn,An={},Pn={},Mn={},_n=s&&s.__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)};Object.defineProperty(Mn,"__esModule",{value:!0}),Mn.Platform=void 0;const On=d,Sn=O,Rn=new Map;class Fn extends On.EmitterBase{constructor(e,t){super(t.wire,"application",e.uuid),this.getClient=e=>{this.wire.sendAction("platform-get-client",this.identity).catch((e=>{}));const t=e||this.identity,{uuid:n}=t;if(!Rn.has(n)){const e=_n(this,xn,"f").call(this,n);Rn.set(n,e)}return Rn.get(n)},xn.set(this,(async e=>{try{const t=`custom-frame-${e}`,n=await this._channel.connect(t,{wait:!1});return n.onDisconnection((()=>{Rn.delete(e)})),n}catch(t){throw Rn.delete(e),new Error("The targeted Platform is not currently running. Listen for application-started event for the given Uuid.")}})),this.launchLegacyManifest=this.launchContentManifest;const n=(0,Sn.validateIdentity)(e);if(n)throw new Error(n);this._channel=t,this.identity={uuid:e.uuid},this.Layout=this.fin.Platform.Layout,this.Application=this.fin.Application.wrapSync(this.identity)}async createView(e,t,n){this.wire.sendAction("platform-create-view",this.identity).catch((e=>{}));const i=await this.getClient(),r=await i.dispatch("create-view",{target:t,opts:e,targetView:n});if(!r||(0,Sn.validateIdentity)(r.identity))throw new Error(`When overwriting the createView call, please return an object that has a valid 'identity' property: ${JSON.stringify(r)}`);return this.fin.View.wrapSync(r.identity)}async createWindow(e){this.wire.sendAction("platform-create-window",this.identity).catch((e=>{}));const t=await this.getClient();e.reason||(e.reason="api-call");const n=await t.dispatch("create-view-container",e);if(!n||(0,Sn.validateIdentity)(n.identity))throw new Error(`When overwriting the createWindow call, please return an object that has a valid 'identity' property: ${JSON.stringify(n)}`);const{identity:i}=n,r=this.fin.Window.wrapSync(i);return r.name=i.name,r.uuid=i.uuid,r}async quit(){this.wire.sendAction("platform-quit",this.identity).catch((e=>{}));return(await this.getClient()).dispatch("quit")}async closeView(e){this.wire.sendAction("platform-close-view",this.identity).catch((e=>{}));const t=await this.getClient();await t.dispatch("close-view",{view:e})}async reparentView(e,t){console.warn("Platform.reparentView has been deprecated, please use Platform.createView"),this.wire.sendAction("platform-reparent-view",this.identity).catch((e=>{}));const n={...e,uuid:e.uuid??this.identity.uuid},i=await this.fin.View.wrap(n),r=await i.getOptions();return this.createView(r,t)}async getSnapshot(){this.wire.sendAction("platform-get-snapshot",this.identity).catch((e=>{}));return(await this.getClient()).dispatch("get-snapshot")}async getViewSnapshot(e){return(await this.getClient()).dispatch("get-view-snapshot",{viewIdentity:e})}async applySnapshot(e,t){this.wire.sendAction("platform-apply-snapshot",this.identity).catch((e=>{}));const n="Requested snapshot must be a valid Snapshot object, or a url or filepath to such an object.";let i;if("string"==typeof e)try{i=(await this._channel.wire.sendAction("get-application-manifest",{manifestUrl:e})).payload.data}catch(e){throw new Error(`${n}: ${e}`)}else i=e;if(!i.windows)throw new Error(n);const r=await this.getClient();return await r.dispatch("apply-snapshot",{snapshot:i,options:t}),this}async fetchManifest(e){return(await this.getClient()).dispatch("platform-fetch-manifest",{manifestUrl:e})}async launchContentManifest(e){this.wire.sendAction("platform-launch-content-manifest",this.identity).catch((()=>{}));const t=await this.getClient(),n=await this.fetchManifest(e);return t.dispatch("launch-into-platform",{manifest:n,manifestUrl:e}),this}async setWindowContext(e={},t){if(this.wire.sendAction("platform-set-window-context",this.identity).catch((e=>{})),!e)throw new Error("Please provide a serializable object or string to set the context.");const n=await this.getClient(),{entityType:i}=t?await this.fin.System.getEntityInfo(t.uuid,t.name):this.fin.me;await n.dispatch("set-window-context",{context:e,entityType:i,target:t||{uuid:this.fin.me.uuid,name:this.fin.me.name}})}async getWindowContext(e){this.wire.sendAction("platform-get-window-context",this.identity).catch((e=>{}));const t=await this.getClient(),{entityType:n}=e?await this.fin.System.getEntityInfo(e.uuid,e.name):this.fin.me;return t.dispatch("get-window-context",{target:e||{uuid:this.fin.me.uuid,name:this.fin.me.name},entityType:n})}async closeWindow(e,t={skipBeforeUnload:!1}){this.wire.sendAction("platform-close-window",this.identity).catch((e=>{}));return(await this.getClient()).dispatch("close-window",{windowId:e,options:t})}}Mn.Platform=Fn,xn=new WeakMap;var jn={},kn={},Ln={},Tn={};function $n(e){switch(e){case"columns":case"grid":case"rows":case"tabs":return!0;default:return!1}}Object.defineProperty(Tn,"__esModule",{value:!0}),Tn.overrideFromComposables=Tn.isValidPresetType=void 0,Tn.isValidPresetType=$n,Tn.overrideFromComposables=function(...e){return t=>e.reduceRight(((e,t)=>n=>t(e(n))),(e=>e))(t)},Tn.default={isValidPresetType:$n};var Bn={},Gn={},Wn={};Object.defineProperty(Wn,"__esModule",{value:!0}),Wn.ApiConsumer=void 0;Wn.ApiConsumer=class{constructor(e){this.strategy=e,this.consume=async e=>(await this.strategy.getExposedFunctions(e)).reduce(((t,n)=>({...t,[n.key]:this.strategy.createFunction(n,e)})),{})}};var Hn={},Nn={};Object.defineProperty(Nn,"__esModule",{value:!0}),Nn.expose=Nn.getExposedProperties=void 0;const Dn=Symbol("exposedProperties");Nn.getExposedProperties=e=>e[Dn]||e.prototype[Dn]||[];Nn.expose=e=>(t,n,i)=>{t[Dn]=t[Dn]||[],t[Dn].push({key:n,descriptor:i,options:e})},Object.defineProperty(Hn,"__esModule",{value:!0}),Hn.ApiExposer=void 0;const Un=Nn;Hn.ApiExposer=class{constructor(e){this.strategy=e,this.exposeInstance=async(e,t)=>{const n=(0,Un.getExposedProperties)(e),i=await Promise.all(n.map((async({key:n,options:i})=>({key:n,options:await this.strategy.exposeFunction(e[n].bind(e),{key:n,options:i,meta:t})}))));await this.strategy.exposeMeta(t,i)}}};var Vn={},zn={},Kn={};Object.defineProperty(Kn,"__esModule",{value:!0}),Kn.ChannelsConsumer=void 0;Kn.ChannelsConsumer=class{constructor(e){this.channel=e,this.getExposedFunctions=async e=>{const{id:t}=e,{props:n}=await this.channel.dispatch(`api-meta:${t}`);return n},this.createFunction=e=>(...t)=>{const{action:n}=e.options;return this.channel.dispatch(n,{args:t})}}};var qn={};Object.defineProperty(qn,"__esModule",{value:!0}),qn.ChannelsExposer=void 0;qn.ChannelsExposer=class{constructor(e){this.channelProviderOrClient=e,this.exposeFunction=async(e,t)=>{const{key:n,options:i,meta:r}=t,{id:o}=r,s=`${o}.${i?.action||n}`;return await this.channelProviderOrClient.register(s,(async({args:t})=>e(...t))),{action:s}},this.exposeMeta=async({id:e},t)=>{const n=`api-meta:${e}`;await this.channelProviderOrClient.register(n,(()=>({props:t})))}}},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Kn,e),n(qn,e)}(zn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(zn,e)}(Vn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Wn,e),n(Hn,e),n(Vn,e),n(Nn,e)}(Gn);var Jn={};Object.defineProperty(Jn,"__esModule",{value:!0}),Jn.createRelayedDispatch=exports.relayChannelClientApi_1=Jn.relayChannelClientApi=void 0;const Yn=["no longer connected","RTCDataChannel closed unexpectedly","The client you are trying to dispatch from is disconnected from the target provider"];exports.relayChannelClientApi_1=Jn.relayChannelClientApi=async(e,t)=>{e.register(`relay:${t}`,(({action:t,target:n,payload:i})=>e.dispatch(n,t,i))),await Promise.resolve()};Jn.createRelayedDispatch=(e,t,n,i)=>async(r,o)=>{try{return await e.dispatch(`relay:${n}`,{action:r,payload:o,target:t})}catch(e){if(s=e.message,Yn.some((e=>s.includes(e)))&&i)throw new Error(i);throw e}var s};var Zn,Qn,Xn,ei=s&&s.__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},ti=s&&s.__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)};Object.defineProperty(Bn,"__esModule",{value:!0}),Bn.ColumnOrRow=Bn.TabStack=Bn.LayoutNode=void 0;const ni=Gn,ii=Jn;class ri{constructor(e,t){Zn.set(this,void 0),this.isRoot=()=>ti(this,Zn,"f").isRoot(this.entityId),this.exists=()=>ti(this,Zn,"f").exists(this.entityId),this.getParent=async()=>{const e=await ti(this,Zn,"f").getParent(this.entityId);if(e)return ri.getEntity(e,ti(this,Zn,"f"))},this.createAdjacentStack=async(e,t)=>{const n=await ti(this,Zn,"f").createAdjacentStack(this.entityId,e,t);return ri.getEntity({entityId:n,type:"stack"},ti(this,Zn,"f"))},this.getAdjacentStacks=async e=>(await ti(this,Zn,"f").getAdjacentStacks({targetId:this.entityId,edge:e})).map((e=>ri.getEntity({type:"stack",entityId:e.entityId},ti(this,Zn,"f")))),ei(this,Zn,e,"f"),this.entityId=t}}Bn.LayoutNode=ri,Zn=new WeakMap,ri.newLayoutEntitiesClient=async(e,t,n)=>{const i=(0,ii.createRelayedDispatch)(e,n,"layout-relay","You are trying to interact with a layout component on a window that does not exist or has been destroyed.");return new ni.ApiConsumer(new ni.ChannelsConsumer({dispatch:i})).consume({id:t})},ri.getEntity=(e,t)=>{const{entityId:n,type:i}=e;switch(i){case"column":case"row":return new si(t,n,i);case"stack":return new oi(t,n);default:throw new Error(`Unrecognised Layout Entity encountered ('${JSON.stringify(e)})`)}};class oi extends ri{constructor(e,t){super(e,t),Qn.set(this,void 0),this.type="stack",this.getViews=()=>ti(this,Qn,"f").getStackViews(this.entityId),this.addView=async(e,t={index:0})=>ti(this,Qn,"f").addViewToStack(this.entityId,e,t),this.removeView=async e=>{await ti(this,Qn,"f").removeViewFromStack(this.entityId,e)},this.setActiveView=async e=>{await ti(this,Qn,"f").setStackActiveView(this.entityId,e)},ei(this,Qn,e,"f")}}Bn.TabStack=oi,Qn=new WeakMap;class si extends ri{constructor(e,t,n){super(e,t),Xn.set(this,void 0),this.getContent=async()=>(await ti(this,Xn,"f").getContent(this.entityId)).map((e=>ri.getEntity(e,ti(this,Xn,"f")))),ei(this,Xn,e,"f"),this.type=n}}Bn.ColumnOrRow=si,Xn=new WeakMap;var ai={};Object.defineProperty(ai,"__esModule",{value:!0}),ai.DEFAULT_LAYOUT_KEY=ai.LAYOUT_CONTROLLER_ID=void 0,ai.LAYOUT_CONTROLLER_ID="layout-entities",ai.DEFAULT_LAYOUT_KEY="__default__";var ci,di,hi,li=s&&s.__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)};Object.defineProperty(Ln,"__esModule",{value:!0}),Ln.Layout=void 0;const ui=G,pi=O,wi=d,yi=Tn,fi=Bn,gi=ai;class mi extends wi.Base{static getClient(e){return li(e,di,"f").getValue()}constructor(e,t){super(t),ci.add(this),di.set(this,new ui.Lazy((async()=>fi.LayoutNode.newLayoutEntitiesClient(await this.platform.getClient(),gi.LAYOUT_CONTROLLER_ID,this.identity)))),this.replace=async e=>{this.wire.sendAction("layout-replace").catch((e=>{}));const t=await this.platform.getClient();await t.dispatch("replace-layout",{target:this.identity,opts:{layout:e}})},this.replaceView=async(e,t)=>{this.wire.sendAction("layout-replace-view").catch((e=>{}));const n=await this.platform.getClient();await n.dispatch("replace-view",{target:this.identity,opts:{viewToReplace:e,newView:t}})},this.applyPreset=async e=>{this.wire.sendAction("layout-apply-preset").catch((e=>{}));const t=await this.platform.getClient(),{presetType:n}=e;if(!n||!(0,yi.isValidPresetType)(n))throw new Error("Cannot apply preset layout, please include an applicable presetType property in the PresetLayoutOptions.");await t.dispatch("apply-preset-layout",{target:this.identity,opts:{presetType:n}})};const n=(0,pi.validateIdentity)(e);if(n)throw new Error(n);this.identity=e,this.platform=this.fin.Platform.wrapSync({uuid:e.uuid}),e.uuid===this.fin.me.uuid&&e.name===this.fin.me.name&&(this.init=this.fin.Platform.Layout.init)}async getConfig(){this.wire.sendAction("layout-get-config").catch((e=>{}));return(await this.platform.getClient()).dispatch("get-frame-snapshot",{target:this.identity})}async getCurrentViews(){this.wire.sendAction("layout-get-views").catch((e=>{}));const e=await this.platform.getClient();return(await e.dispatch("get-layout-views",{target:this.identity})).map((e=>this.fin.View.wrapSync(e)))}async getRootItem(){this.wire.sendAction("layout-get-root-item").catch((()=>{}));const e=await li(this,di,"f").getValue(),t=await e.getRoot("layoutName"in this.identity?this.identity:void 0);return fi.LayoutNode.getEntity(t,e)}async getStackByViewIdentity(e){this.wire.sendAction("layout-get-stack-by-view").catch((()=>{}));const t=await li(this,di,"f").getValue(),n=await t.getStackByView(e);if(!n)throw new Error(`No stack found for view: ${e.uuid}/${e.name}`);return fi.LayoutNode.getEntity(n,t)}async addView(e,{location:t,targetView:n}={}){this.wire.sendAction("layout-add-view").catch((e=>{}));const{identity:i}=await li(this,ci,"m",hi).call(this,"layout-add-view",{viewOptions:e,location:t,targetView:n});return{identity:i}}async closeView(e){this.wire.sendAction("layout-close-view").catch((e=>{})),await li(this,ci,"m",hi).call(this,"layout-close-view",{viewIdentity:e})}}Ln.Layout=mi,di=new WeakMap,ci=new WeakSet,hi=async function(e,t){return(await this.platform.getClient()).dispatch(e,{target:this.identity,opts:t})};var vi,Ci,bi,Ii,Ei,xi=s&&s.__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)},Ai=s&&s.__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};Object.defineProperty(kn,"__esModule",{value:!0}),kn.LayoutModule=void 0;const Pi=d,Mi=Ln,_i=ai;class Oi extends Pi.Base{constructor(){super(...arguments),vi.add(this),Ci.set(this,!1),bi.set(this,null),this.init=async(e={})=>{if(this.wire.sendAction("layout-init").catch((e=>{})),!this.wire.environment.layoutAllowedInContext(this.fin))throw new Error("Layout.init can only be called from a Window context.");if(xi(this,Ci,"f"))throw new Error("Layout.init was already called, please use Layout.create to add additional layouts.");"openfin"===this.wire.environment.type&&await this.fin.Platform.getCurrentSync().getClient(),Ai(this,Ci,!0,"f"),Ai(this,bi,await this.wire.environment.initLayoutManager(this.fin,this.wire,e),"f"),await this.wire.environment.applyLayoutSnapshot(this.fin,xi(this,bi,"f"),e);const t={name:this.fin.me.name,uuid:this.fin.me.uuid};if(!e.layoutManagerOverride){const e={layoutName:_i.DEFAULT_LAYOUT_KEY,...t};return xi(this,Ii,"f").call(this,e)}return this.wrapSync(t)},Ii.set(this,(e=>{const t="[Layout] You are using a deprecated property `layoutManager` - it will throw if you access it starting in v37.",n=new Proxy({},{get(e,n){throw console.warn(`[Layout-mgr-proxy] accessing ${n.toString()}`),new Error(t)}}),i=Object.assign(this.wrapSync(e),{layoutManager:n});return new Proxy(i,{get(e,n){if("layoutManager"===n)throw console.warn(`[Layout-proxy] accessing ${n.toString()}`),new Error(t);return e[n]}})})),this.getCurrentLayoutManagerSync=()=>xi(this,vi,"m",Ei).call(this,"fin.Platform.Layout.getCurrentLayoutManagerSync()"),this.create=async e=>this.wire.environment.createLayout(xi(this,vi,"m",Ei).call(this,"fin.Platform.Layout.create()"),e),this.destroy=async e=>this.wire.environment.destroyLayout(xi(this,vi,"m",Ei).call(this,"fin.Platform.Layout.destroy()"),e)}async wrap(e){return this.wire.sendAction("layout-wrap").catch((e=>{})),new Mi.Layout(e,this.wire)}wrapSync(e){return this.wire.sendAction("layout-wrap-sync").catch((e=>{})),new Mi.Layout(e,this.wire)}async getCurrent(){if(this.wire.sendAction("layout-get-current").catch((e=>{})),"openfin"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error("You are not in a Window context. Only Windows can have a Layout.");const{uuid:e,name:t}=this.fin.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction("layout-get-current-sync").catch((e=>{})),"openfin"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error("You are not in a Window context. Only Windows can have a Layout.");const{uuid:e,name:t}=this.fin.me;return this.wrapSync({uuid:e,name:t})}async getLayoutByViewIdentity(e){this.wire.sendAction("layout-get-by-view-identity").catch((()=>{}));let t=await this.wire.environment.getViewWindowIdentity(this.fin,e);t.identity&&(t=t.identity);try{const n=this.wrapSync(t),i=await Mi.Layout.getClient(n),r=await i.getLayoutIdentityForViewOrThrow(e);return this.wrapSync(r)}catch(n){if(!["No action registered at target for","getLayoutIdentityForViewOrThrow is not a function"].some((e=>n.message.includes(e))))throw n;if(t.uuid===t.name)throw new Error(`View identity ${JSON.stringify(e)} is not attached to any layout in provider window ${JSON.stringify(t)}.`);return this.wrapSync(t)}}}kn.LayoutModule=Oi,Ci=new WeakMap,bi=new WeakMap,Ii=new WeakMap,vi=new WeakSet,Ei=function(e){if(!xi(this,bi,"f"))throw new Error(`You must call init before using the API ${e}`);return xi(this,bi,"f")},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(kn,e),n(Ln,e)}(jn),Object.defineProperty(Pn,"__esModule",{value:!0}),Pn.PlatformModule=void 0;const Si=d,Ri=Mn,Fi=jn;class ji extends Si.Base{constructor(e,t){super(e),this._channel=t,this.Layout=new Fi.LayoutModule(this.wire)}async init(e){if(!fin.__internal_.isPlatform||fin.me.name!==fin.me.uuid)throw new Error("fin.Platform.init should only be called from a custom platform provider running in the main window of the application.");return this.wire.environment.initPlatform(this.fin,e)}async wrap(e){return this.wire.sendAction("platform-wrap").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}wrapSync(e){return this.wire.sendAction("platform-wrap-sync").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}async getCurrent(){return this.wire.sendAction("platform-get-current").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction("platform-get-current-sync").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}start(e){return this.wire.sendAction("platform-start").catch((e=>{})),new Promise((async(t,n)=>{try{const{uuid:n}=e,i=await this.fin.Application._create({...e,isPlatformController:!0});i.once("platform-api-ready",(()=>t(this.wrapSync({uuid:n})))),i._run({uuid:n})}catch(e){n(e)}}))}startFromManifest(e,t){return this.wire.sendAction("platform-start-from-manifest").catch((e=>{})),new Promise((async(n,i)=>{try{const i=await this.fin.Application._createFromManifest(e);i.once("platform-api-ready",(()=>n(this.wrapSync({uuid:i.identity.uuid})))),i._run(t)}catch(e){i(e)}}))}}Pn.PlatformModule=ji,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Pn,e),n(Mn,e)}(An);var ki={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getMe=e.getBaseMe=e.environmentUnsupportedMessage=void 0;const t=J(),n=un,i=ie(),r=rn;function o(e,t,n){return{...{isView:"view"===e,isWindow:"window"===e,isFrame:"iframe"===e,isExternal:"external connection"===e},uuid:t,name:n,entityType:e}}e.environmentUnsupportedMessage="You are not running in OpenFin.",e.getBaseMe=o,e.getMe=function(s){const{uuid:a,name:c,entityType:d}=s.me,h={setContext(){throw new Error(e.environmentUnsupportedMessage)},addContextHandler(){throw new Error(e.environmentUnsupportedMessage)},getContextGroups(){throw new Error(e.environmentUnsupportedMessage)},joinContextGroup(){throw new Error(e.environmentUnsupportedMessage)},removeFromContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getAllClientsInContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getInfoForContextGroup(){throw new Error(e.environmentUnsupportedMessage)}},l="Interop API has not been instantiated. Either connection has failed or you have not declared interop in your config.",u={setContext(){throw new Error(l)},addContextHandler(){throw new Error(l)},getContextGroups(){throw new Error(l)},joinContextGroup(){throw new Error(l)},removeFromContextGroup(){throw new Error(l)},getAllClientsInContextGroup(){throw new Error(l)},getInfoForContextGroup(){throw new Error(l)}},p={eventNames:()=>{throw new Error(e.environmentUnsupportedMessage)},emit:()=>{throw new Error(e.environmentUnsupportedMessage)},listeners:()=>{throw new Error(e.environmentUnsupportedMessage)},listenerCount:()=>{throw new Error(e.environmentUnsupportedMessage)},on:()=>{throw new Error(e.environmentUnsupportedMessage)},addListener:()=>{throw new Error(e.environmentUnsupportedMessage)},once:()=>{throw new Error(e.environmentUnsupportedMessage)},prependListener:()=>{throw new Error(e.environmentUnsupportedMessage)},prependOnceListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeAllListeners:()=>{throw new Error(e.environmentUnsupportedMessage)}};switch(d){case"view":return Object.assign(new t.View(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case"window":return Object.assign(new i._Window(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case"iframe":return Object.assign(new n._Frame(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case"external connection":return Object.assign(new r.ExternalApplication(s,{uuid:a}),o(d,a,c),{interop:u,isOpenFin:!1});default:return{...o(d,a,c),...p,interop:h,isOpenFin:!1}}}}(ki);var Li={},Ti={},$i={};Object.defineProperty($i,"__esModule",{value:!0}),$i.createWarningObject=$i.createUnusableObject=void 0,$i.createUnusableObject=function(e){const t=()=>{throw new Error(e)};return new Proxy({},{apply:t,construct:t,defineProperty:t,deleteProperty:t,get:t,getOwnPropertyDescriptor:t,getPrototypeOf:t,has:t,isExtensible:t,ownKeys:t,preventExtensions:t,set:t,setPrototypeOf:t})},$i.createWarningObject=function(e,t){return new Proxy(t,{get:(...t)=>(console.warn(e),Reflect.get(...t)),set:(...t)=>(console.warn(e),Reflect.set(...t)),getOwnPropertyDescriptor:(...t)=>(console.warn(e),Reflect.getOwnPropertyDescriptor(...t)),ownKeys:(...t)=>(console.warn(e),Reflect.ownKeys(...t))})};var Bi,Gi={},Wi={};var Hi={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.wrapIntentHandler=e.BROKER_ERRORS=e.generateOverrideWarning=e.generateOverrideError=e.wrapContextHandler=e.wrapInTryCatch=e.generateId=void 0;e.generateId=()=>`${Math.random()}${Date.now()}`;e.wrapInTryCatch=(e,t)=>(...n)=>{try{return e(...n)}catch(e){throw new Error((t||"")+e)}};e.wrapContextHandler=(e,t)=>async n=>{try{await e(n)}catch(e){throw console.error(`Error thrown by handler ${t} for context type ${n.type}: ${e}`),e}};e.generateOverrideError=(e,t)=>`You have tried to to use ${e} but ${t} has not been overridden in the Interop Broker. Please override this function. Refer to our documentation for more info.`;e.generateOverrideWarning=(e,t,n,i)=>{const{uuid:r,name:o}=n;return i?`Entity with identity: ${r}/${o} has called ${i} or ${e} but ${t} has not been overridden.`:`Entity with identity: ${r}/${o} has called ${e} but ${t} has not been overridden.`},e.BROKER_ERRORS={fireIntent:(0,e.generateOverrideError)("fireIntent","handleFiredIntent"),fireIntentForContext:(0,e.generateOverrideError)("fireIntentForContext","handleFiredIntentForContext"),getInfoForIntent:(0,e.generateOverrideError)("getInfoForIntent","handleInfoForIntent"),getInfoForIntentsByContext:(0,e.generateOverrideError)("getInfoForIntentsByContext","handleInfoForIntentsByContext"),joinSessionContextGroupWithJoinContextGroup:"The Context Group you have tried to join is a Session Context Group. Custom Context Groups can only be defined by the Interop Broker through code or manifest configuration. Please use joinSessionContextGroup.",fdc3Open:(0,e.generateOverrideError)("fdc3.open","fdc3HandleOpen"),fdc3FindInstances:(0,e.generateOverrideError)("fdc3.findInstances","fdc3HandleFindInstances"),fdc3GetAppMetadata:(0,e.generateOverrideError)("fdc3.getAppMetadata","fdc3HandleGetAppMetadata"),fdc3GetInfo:(0,e.generateOverrideError)("fdc3.getInfo","fdc3HandleGetInfo")};e.wrapIntentHandler=(e,t)=>async n=>{try{return e(n)}catch(e){throw console.error(`Error thrown by handler ${t}: ${e}`),e}}}(Hi);var Ni,Di,Ui={};function Vi(){if(Di)return Gi;Di=1;var e,t,n,r=s&&s.__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},o=s&&s.__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)},a=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Gi,"__esModule",{value:!0}),Gi.InteropBroker=void 0;const c=d,h=a(function(){if(Bi)return Wi;Bi=1,Object.defineProperty(Wi,"__esModule",{value:!0});const e=Cr();return Wi.default=class{constructor(e,t){this.provider=e,this.id=t,this.lastContext=void 0,this.contextGroupMap=new Map,this.clients=new Map,this.registerListeners()}registerListeners(){this.provider.register(`sessionContextGroup:getContext-${this.id}`,this.getCurrentContext.bind(this)),this.provider.register(`sessionContextGroup:setContext-${this.id}`,this.setContext.bind(this)),this.provider.register(`sessionContextGroup:handlerAdded-${this.id}`,this.handlerAdded.bind(this)),this.provider.register(`sessionContextGroup:handlerRemoved-${this.id}`,this.handlerRemoved.bind(this))}getCurrentContext(e){return e.type?this.contextGroupMap.get(e.type):this.lastContext}setContext(t,n){const{context:i}=t,r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name} not in Session Client State Map`);this.contextGroupMap.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{e.contextHandlers.get(i.type)?.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getClientState(e){return this.clients.get(e.endpointId)}async handlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(i){const e=r.contextHandlers.get(i)||[];r.contextHandlers.set(i,[...e,n]);const o=this.contextGroupMap.get(i);o&&await this.provider.dispatch(t,n,o)}else{r.globalHandler=n;const e=[...this.contextGroupMap.keys()].map((async e=>{const i=this.contextGroupMap.get(e);i&&await this.provider.dispatch(t,n,i)}));await Promise.all(e)}}handlerRemoved(e,t){const{handlerId:n}=e,i=this.clients.get(t.endpointId);i?(Array.from(i.contextHandlers).forEach((([,e])=>{const t=e.indexOf(n);t>-1&&e.splice(t,1)})),i.globalHandler===n&&(i.globalHandler=void 0)):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={contextHandlers:new Map,clientIdentity:e,globalHandler:void 0};this.clients.set(e.endpointId,t)}}onDisconnection(e){this.clients.delete(e.endpointId)}},Wi}()),l=Hi,u=a(i),p=function(){if(Ni)return Ui;Ni=1,Object.defineProperty(Ui,"__esModule",{value:!0}),Ui.PrivateChannelProvider=void 0;const e=Vi();return Ui.PrivateChannelProvider=class t{constructor(e,t){this.provider=e,this.id=t,this.clients=new Map,this.registerListeners(),this.contextByContextType=new Map,this.lastContext=void 0,this.provider.onConnection((e=>this.registerNewClient(e))),this.provider.onDisconnection((async e=>{const{endpointId:t}=e;this.clients.has(t)&&await this.handleClientDisconnecting(e),0===(await this.provider.getAllClientInfo()).length&&this.provider.destroy()}))}getClientState(e){return this.clients.get(e.endpointId)}registerListeners(){this.provider.register("broadcast",this.broadcast.bind(this)),this.provider.register("getCurrentContext",this.getCurrentContext.bind(this)),this.provider.register("contextHandlerAdded",this.contextHandlerAdded.bind(this)),this.provider.register("contextHandlerRemoved",this.contextHandlerRemoved.bind(this)),this.provider.register("nonStandardHandlerRemoved",this.nonStandardHandlerRemoved.bind(this)),this.provider.register("onAddContextHandlerAdded",this.onAddContextHandlerAdded.bind(this)),this.provider.register("onDisconnectHandlerAdded",this.onDisconnectHandlerAdded.bind(this)),this.provider.register("onUnsubscribeHandlerAdded",this.onUnsubscribeHandlerAdded.bind(this)),this.provider.register("clientDisconnecting",((e,t)=>{this.handleClientDisconnecting(t)}))}broadcast(t,n){const{context:i}=t;if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name}, tried to call broadcast, is not connected to this Private Channel`);const r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to broadcast - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);this.contextByContextType.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{const t=e.handlerIdsByContextTypes.get(i.type);t&&t.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getCurrentContext(e,t){const{contextType:n}=e;if(!this.getClientState(t))throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call getCurrentContext, is not connected to this Private Channel`);if(void 0!==n){return this.contextByContextType.get(n)||null}return this.lastContext?this.lastContext:null}contextHandlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call addContextListener, is not connected to this Private Channel`);if(i){const e=r.handlerIdsByContextTypes.get(i)||[];r.handlerIdsByContextTypes.set(i,[...e,n])}else r.globalHandler=n;Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&e.onAddContextListenerHandlerId&&this.provider.dispatch(e.clientIdentity,e.onAddContextListenerHandlerId,i)}))}async contextHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);if(i){let e;if(i.globalHandler===n)i.globalHandler=void 0;else for(const[t,r]of i.handlerIdsByContextTypes){const i=r.indexOf(n);i>-1&&(r.splice(i,1),e=t)}const r=(await this.getConnectedClients()).map((async n=>{const{clientIdentity:i,clientIdentity:{endpointId:r},onUnsubscribeHandlerId:o}=n;r!==t.endpointId&&o&&await this.provider.dispatch(i,o,e)}));try{await Promise.all(r)}catch(e){throw console.error(`Problem when attempting to dispatch to onUnsubscribeHandlers. Error: ${e} Removing Client: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}`),new Error(e)}}else console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}.`)}nonStandardHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);i?i.onDisconnectHandlerId===n?i.onDisconnectHandlerId=void 0:i.onAddContextListenerHandlerId===n?i.onAddContextListenerHandlerId=void 0:i.onUnsubscribeHandlerId===n&&(i.onUnsubscribeHandlerId=void 0):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}onAddContextHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onAddContextListener, is not connected to this Private Channel`);n.onAddContextListenerHandlerId=i,Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&Array.from(e.handlerIdsByContextTypes.keys()).forEach((e=>{this.provider.dispatch(t,i,e)}))}))}onDisconnectHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onDisconnect, is not connected to this Private Channel`);n.onDisconnectHandlerId=i}onUnsubscribeHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onUnsubscribe, is not connected to this Private Channel`);n.onUnsubscribeHandlerId=i}removeClient(e){const t=this.getClientState(e);if(!t)throw new Error(`Client with Identity: ${e.uuid} ${e.name}, tried to call disconnect, is not connected to this Private Channel`);t.handlerIdsByContextTypes.clear(),this.clients.delete(e.endpointId)}async fireOnDisconnectForOtherClients(e){const{endpointId:t}=e,n=(await this.getConnectedClients()).map((async e=>{const{clientIdentity:{endpointId:n},onDisconnectHandlerId:i}=e;n!==t&&i&&await this.provider.dispatch(e.clientIdentity,i)}));try{await Promise.all(n)}catch(t){throw console.error(`Problem when attempting to dispatch to onDisconnectHandlers. Error: ${t} Disconnecting Client: uuid: ${e.uuid}. name: ${e.name}. endpointId: ${e.endpointId}`),new Error(t)}}async unsubscribeAll(e){const{endpointId:t}=e,n=this.clients.get(t);if(n){const t=Array.from(n.handlerIdsByContextTypes.values()).flat(),i=n.globalHandler;if(t.length>0){const n=t.map((async t=>this.contextHandlerRemoved({handlerId:t},e)));try{await Promise.all(n)}catch(e){console.error(e.message)}}if(i)try{await this.contextHandlerRemoved({handlerId:i},e)}catch(e){console.error(e.message)}}}async handleClientDisconnecting(e){await this.unsubscribeAll(e),this.removeClient(e),await this.fireOnDisconnectForOtherClients(e)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={clientIdentity:e,handlerIdsByContextTypes:new Map,globalHandler:void 0,onAddContextListenerHandlerId:void 0,onUnsubscribeHandlerId:void 0,onDisconnectHandlerId:void 0};this.clients.set(e.endpointId,t)}}async getConnectedClients(){const e=await this.provider.getAllClientInfo();return Array.from(this.clients.values()).filter((t=>{const{uuid:n,name:i}=t.clientIdentity;return e.some((e=>i===e.name&&n===e.uuid))}))}static init(e,n){return new t(e,n)}},Ui}(),w=G,y=[{id:"green",displayMetadata:{color:"#00CC88",name:"green"}},{id:"purple",displayMetadata:{color:"#8C61FF",name:"purple"}},{id:"orange",displayMetadata:{color:"#FF8C4C",name:"orange"}},{id:"red",displayMetadata:{color:"#FF5E60",name:"red"}},{id:"pink",displayMetadata:{color:"#FF8FB8",name:"pink"}},{id:"yellow",displayMetadata:{color:"#E9FF8F",name:"yellow"}}];let f=class i extends c.Base{constructor(i,s,a){super(i),e.set(this,void 0),t.set(this,void 0),n.set(this,void 0),this.getProvider=()=>o(this,n,"f").getValue(),this.interopClients=new Map,this.contextGroupsById=new Map,r(this,t,a.contextGroups??[...y],"f"),r(this,e,a.fdc3Info,"f"),a?.logging&&(this.logging=a.logging),this.intentClientMap=new Map,this.lastContextMap=new Map,this.sessionContextGroupMap=new Map,r(this,n,new w.Lazy(s),"f"),this.setContextGroupMap(),this.setupChannelProvider()}static createClosedConstructor(...e){return class extends i{constructor(...t){if(t.length){const[n,i,r]=t;if(r&&"object"==typeof r&&!(0,u.default)(r,e[2]))return console.warn("You have modified the parameters of the InteropOverride constructor. This behavior is deprecated and will be removed in a future version. You can modify these options in your manifest. Please consult our Interop docs for guidance on migrating to the new override scheme."),void super(e[0],e[1],r);console.warn("You are attempting to pass arguments to the InteropOverride constructor. This is not necessary, and these passed arguments will be ignored. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.")}super(...e)}}}setContext({context:e},t){this.wire.sendAction("interop-broker-set-context").catch((e=>{}));const n=this.getClientState(t);if(!n||!n.contextGroupId)throw n?new Error("You must join a context group before you can set context."):new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);{const{contextGroupId:t}=n;this.setContextForGroup({context:e},t)}}setContextForGroup({context:e},t){this.wire.sendAction("interop-broker-set-context-for-group").catch((e=>{}));const n=this.contextGroupsById.get(t);if(!n)throw new Error(`Unable to set context for context group that isn't in the context group mapping: ${t}.`);const r=i.checkContextIntegrity(e);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(e)}`);const o=e.type;n.set(o,e),this.lastContextMap.set(t,o);Array.from(this.interopClients.values()).filter((e=>e.contextGroupId===t)).forEach((t=>{for(const[,n]of t.contextHandlers)i.isContextTypeCompatible(o,n.contextType)&&this.invokeContextHandler(t.clientIdentity,n.handlerId,e)}))}getCurrentContext(e,t){this.wire.sendAction("interop-broker-get-current-context").catch((e=>{}));const n=this.getClientState(t);if(!n?.contextGroupId)throw new Error("You must be a member of a context group to call getCurrentContext");const{contextGroupId:i}=n,r=this.contextGroupsById.get(i),o=this.lastContextMap.get(i),s=e?.contextType??o;return r&&s?r.get(s):void 0}async joinContextGroup({contextGroupId:e,target:t},n){if(this.wire.sendAction("interop-broker-join-context-group").catch((e=>{})),this.sessionContextGroupMap.has(e))throw new Error(l.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup);if(t){i.hasEndpointId(t)&&await this.addClientToContextGroup({contextGroupId:e},t);try{const n=this.channel.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name));if(!n.length)throw new Error(`Given Identity ${t.uuid} ${t.name} is not connected to the Interop Broker.`);n.length>1&&console.warn(`More than one connection found for identity ${t.uuid} ${t.name}`);const i=[];for(const t of n)i.push(this.addClientToContextGroup({contextGroupId:e},t));await Promise.all(i)}catch(e){throw new Error(e)}}else await this.addClientToContextGroup({contextGroupId:e},n)}async addClientToContextGroup({contextGroupId:e},t){this.wire.sendAction("interop-broker-add-client-to-context-group").catch((e=>{}));const n=this.getClientState(t);if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(!this.getContextGroups().find((t=>t.id===e)))throw new Error(`Attempting to join a context group that does not exist: ${e}. You may only join existing context groups.`);if(n.contextGroupId!==e){n.contextGroupId=e,await this.setCurrentContextGroupInClientOptions(t,e);const i=this.contextGroupsById.get(e);for(const[,e]of n.contextHandlers){const{contextType:n,handlerId:r}=e;if(void 0===n)i.forEach(((e,n)=>{this.invokeContextHandler(t,r,e)}));else if(i.has(n)){const e=i.get(n);e&&this.invokeContextHandler(t,r,e)}}}}async removeFromContextGroup({target:e},t){if(this.wire.sendAction("interop-broker-remove-from-context-group").catch((e=>{})),e){i.hasEndpointId(e)&&await this.removeClientFromContextGroup(e);try{const t=this.channel.connections.filter((t=>t.uuid===e.uuid&&t.name===e.name));if(!t.length)throw new Error(`No connection found for given Identity ${e.uuid} ${e.name}`);t.length>1&&console.warn(`More than one connection found for identity ${e.uuid} ${e.name}`);const n=[];for(const e of t)n.push(this.removeClientFromContextGroup(e));await Promise.all(n)}catch(e){throw new Error(e)}}else await this.removeClientFromContextGroup(t)}async removeClientFromContextGroup(e){this.wire.sendAction("interop-broker-remove-client-from-context-group").catch((e=>{}));const t=this.getClientState(e);t&&(t.contextGroupId=void 0),await this.setCurrentContextGroupInClientOptions(e,null)}getContextGroups(){return this.wire.sendAction("interop-broker-get-context-groups").catch((e=>{})),o(this,t,"f").map((e=>({...e})))}getInfoForContextGroup({contextGroupId:e}){return this.wire.sendAction("interop-broker-get-info-for-context-group").catch((e=>{})),this.getContextGroups().find((t=>t.id===e))}getAllClientsInContextGroup({contextGroupId:e}){this.wire.sendAction("interop-broker-get-all-clients-in-context-group").catch((e=>{}));return Array.from(this.interopClients.values()).filter((t=>t.contextGroupId===e)).map((e=>e.clientIdentity))}async handleFiredIntent(e,t){const n=(0,l.generateOverrideWarning)("fdc3.raiseIntent","InteropBroker.handleFiredIntent",t,"interopClient.fireIntent");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntent)}async setIntentTarget(e,t){this.wire.sendAction("interop-broker-set-intent-target").catch((e=>{}));const n=this.intentClientMap.get(t.name),i=`intent-handler-${e.name}`;if(n){const t=n.get(i);if(t){if(t.pendingIntents.push(e),t.clientIdentity&&t.isReady){const{clientIdentity:e,pendingIntents:n}=t;try{const r=n[n.length-1];await this.invokeIntentHandler(e,i,r),t.pendingIntents=[]}catch(n){console.error(`Error invoking intent handler for client ${e.uuid}/${e.name}/${e.endpointId}`),t.isReady=!1}}}else n.set(i,{isReady:!1,pendingIntents:[e]})}else{this.intentClientMap.set(t.name,new Map);const n=this.intentClientMap.get(t.name);n&&n.set(i,{isReady:!1,pendingIntents:[e]})}}async handleInfoForIntent(e,t){const n=(0,l.generateOverrideWarning)("fdc3.findIntent","InteropBroker.handleInfoForIntent",t,"interopClient.getInfoForIntent");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntent)}async handleInfoForIntentsByContext(e,t){const n=(0,l.generateOverrideWarning)("fdc3.findIntentsByContext","InteropBroker.handleInfoForIntentsByContext",t,"interopClient.getInfoForIntentsByContext");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntentsByContext)}async handleFiredIntentForContext(e,t){const n=(0,l.generateOverrideWarning)("fdc3.raiseIntentForContext","InteropBroker.handleFiredIntentForContext",t,"interopClient.fireIntentForContext");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntentForContext)}async clientDisconnected(e){}async fdc3HandleOpen({app:e,context:t},n){const i=(0,l.generateOverrideWarning)("fdc3.open","InteropBroker.fdc3HandleOpen",n);throw console.warn(i),new Error(l.BROKER_ERRORS.fdc3Open)}async fdc3HandleFindInstances(e,t){const n=(0,l.generateOverrideWarning)("fdc3.open","InteropBroker.fdc3HandleFindInstances",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3FindInstances)}async fdc3HandleGetAppMetadata(e,t){const n=(0,l.generateOverrideWarning)("fdc3.getAppMetadata","InteropBroker.fdc3HandleGetAppMetadata",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3GetAppMetadata)}async invokeContextHandler(e,t,n){const i=await this.getProvider();try{await i.dispatch(e,t,n)}catch(i){console.error(`Error invoking context handler ${t} for context type ${n.type} in client ${e.uuid}/${e.name}/${e.endpointId}`,i)}}async invokeIntentHandler(e,t,n){const i=await this.getProvider();await i.dispatch(e,t,n)}async fdc3HandleGetInfo(t,n){const{fdc3Version:i}=t;return{fdc3Version:i,...o(this,e,"f"),optionalFeatures:{OriginatingAppMetadata:!1,UserChannelMembershipAPIs:!0},appMetadata:{appId:"",instanceId:""}}}async getAllClientInfo(){return(await this.getProvider()).getAllClientInfo()}decorateSnapshot(e){return{...e,interopSnapshotDetails:{contextGroupStates:this.getContextGroupStates()}}}applySnapshot(e,t){const n=e?.interopSnapshotDetails?.contextGroupStates;n&&(t?.closeExistingWindows||this.updateExistingClients(n),this.rehydrateContextGroupStates(n))}updateExistingClients(e){this.interopClients.forEach((t=>{const{clientIdentity:n,contextGroupId:r,contextHandlers:o}=t;if(r){const t=e[r];for(const[,e]of Object.entries(t))o.forEach((t=>{const{handlerId:r,contextType:o}=t;i.isContextTypeCompatible(e.type,o)&&this.invokeContextHandler(n,r,e)}))}}))}getContextGroupStates(){return i.toObject(this.contextGroupsById)}rehydrateContextGroupStates(e){const t=Object.entries(e);for(const[e,n]of t){const t=Object.entries(n);for(const[n,i]of t)if(this.contextGroupsById.has(e)){this.contextGroupsById.get(e).set(n,i)}else console.warn(`Attempting to set a context group that isn't in the context group mapping. Skipping context group rehydration for: ${e}`)}}contextHandlerRegistered({contextType:e,handlerId:t},n){const i={contextType:e,handlerId:t},r=this.getClientState(n);if(r?.contextHandlers.set(t,i),r&&r.contextGroupId){const{contextGroupId:i}=r,o=this.contextGroupsById.get(i);if(void 0===e)o.forEach(((e,i)=>{this.invokeContextHandler(n,t,e)}));else if(o.has(e)){const i=o.get(e);i&&this.invokeContextHandler(n,t,i)}}}async intentHandlerRegistered(e,t){const{handlerId:n}=e,i=this.intentClientMap.get(t.name),r=i?.get(n);if(i)if(r){const{pendingIntents:e}=r;r.clientIdentity=t,r.isReady=!0;try{if(e.length>0){const i=e[e.length-1];await this.invokeIntentHandler(t,n,i),r.pendingIntents=[]}}catch(e){console.error(`Error invoking intent handler: ${n} for client ${t.uuid}/${t.name}/${t.endpointId}`)}}else i.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t});else{this.intentClientMap.set(t.name,new Map);const e=this.intentClientMap.get(t.name);e&&e.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t})}}removeContextHandler({handlerId:e},t){const n=this.getClientState(t);n&&n.contextHandlers.delete(e)}handleJoinSessionContextGroup({sessionContextGroupId:e},t){try{if(!e)throw new Error("Failed to join session context group: must specify group id.");const n=this.sessionContextGroupMap.get(e);if(n)n.registerNewClient(t);else{const n=new h.default(this.channel,e);n.registerNewClient(t),this.sessionContextGroupMap.set(e,n)}return{hasConflict:this.contextGroupsById.has(e)}}catch(e){throw new Error(e)}}getClientState(e){return this.interopClients.get(e.endpointId)}static toObject(e){const t=Object.fromEntries(e),n={};return Object.entries(t).forEach((([e,t])=>{const i=Object.fromEntries(t);n[e]=i})),n}static checkContextIntegrity(e){if(!e)return{isValid:!1,reason:"No context supplied"};if("object"!=typeof e)return{isValid:!1,reason:"Context must be an Object"};if(!e.type)return{isValid:!1,reason:"Context must have a type property"};if(e.id&&"object"!=typeof e.id)return{isValid:!1,reason:"Context id must be an Object populated with key-value identifiers (if set)"};if(e.id){const{id:t}=e,n=Object.keys(t);let i=!1;if(!n.length)return{isValid:!1,reason:"Context id must have at least one key-value identifier"};if(n.forEach((e=>{"string"==typeof e&&"string"==typeof t[e]||(i=!0)})),i)return{isValid:!1,reason:"Context id key-value identifiers must be of type string"}}return e.name&&"string"!=typeof e.name?{isValid:!1,reason:"Context name must be of string type (if set)"}:{isValid:!0}}static hasEndpointId(e){return void 0!==e.endpointId}static isContextTypeCompatible(e,t){return void 0===t||e===t}setContextGroupMap(){for(const e of this.getContextGroups())this.contextGroupsById.set(e.id,new Map)}async setCurrentContextGroupInClientOptions(e,t){try{const n=await this.fin.System.getEntityInfo(e.uuid,e.name);let i;"view"===n.entityType?i=await this.fin.View.wrap(e):"window"===n.entityType&&(i=await this.fin.Window.wrap(e)),i&&await i.updateOptions({interop:{currentContextGroup:t}})}catch(e){}}async setupChannelProvider(){try{const e=await this.getProvider();this.channel=e,this.wireChannel(e)}catch(e){throw new Error(`Error setting up Interop Broker Channel Provider: ${e}`)}}wireChannel(e){e.onConnection((async(e,t)=>{if(!await this.isConnectionAuthorized(e,t))throw new Error(`Connection not authorized for ${e.uuid}, ${e.name}`);if(!e.endpointId)throw new Error("Version too old to be compatible with Interop. Please upgrade your runtime to a more recent version.");const n={contextGroupId:void 0,contextHandlers:new Map,clientIdentity:e};t?.currentContextGroup&&this.contextGroupsById.has(t.currentContextGroup)&&(n.contextGroupId=t?.currentContextGroup),this.interopClients.set(e.endpointId,n)})),e.onDisconnection((e=>{this.interopClients.delete(e.endpointId);const t=this.intentClientMap.get(e.name);t&&e.uuid===this.fin.me.uuid&&t.forEach((e=>{e.isReady=!1})),this.sessionContextGroupMap.forEach((t=>{t.onDisconnection(e)})),this.clientDisconnected(e)})),e.beforeAction((async(e,t,n)=>{if(!await this.isActionAuthorized(e,t,n))throw new Error(`Action (${e}) not authorized for ${n.uuid}, ${n.name}`);this.logging?.beforeAction?.enabled&&console.log(e,t,n)})),e.afterAction(((e,t,n)=>{this.logging?.afterAction?.enabled&&console.log(e,t,n)})),e.register("setContext",this.setContext.bind(this)),e.register("fireIntent",this.handleFiredIntent.bind(this)),e.register("getCurrentContext",this.getCurrentContext.bind(this)),e.register("getInfoForIntent",this.handleInfoForIntent.bind(this)),e.register("getInfoForIntentsByContext",this.handleInfoForIntentsByContext.bind(this)),e.register("fireIntentForContext",this.handleFiredIntentForContext.bind(this)),e.register("getContextGroups",this.getContextGroups.bind(this)),e.register("joinContextGroup",this.joinContextGroup.bind(this)),e.register("removeFromContextGroup",this.removeFromContextGroup.bind(this)),e.register("getAllClientsInContextGroup",this.getAllClientsInContextGroup.bind(this)),e.register("getInfoForContextGroup",this.getInfoForContextGroup.bind(this)),e.register("contextHandlerRegistered",this.contextHandlerRegistered.bind(this)),e.register("intentHandlerRegistered",this.intentHandlerRegistered.bind(this)),e.register("removeContextHandler",this.removeContextHandler.bind(this)),e.register("sessionContextGroup:createIfNeeded",this.handleJoinSessionContextGroup.bind(this)),e.register("fdc3Open",this.fdc3HandleOpen.bind(this)),e.register("fdc3v2FindIntentsByContext",this.handleInfoForIntentsByContext.bind(this)),e.register("fdc3FindInstances",this.fdc3HandleFindInstances.bind(this)),e.register("fdc3GetAppMetadata",this.fdc3HandleGetAppMetadata.bind(this)),e.register("fdc3v2GetInfo",(async(e,t)=>this.fdc3HandleGetInfo.bind(this)(e,t))),e.register("createPrivateChannelProvider",(async e=>{const{channelId:t}=e,n=await this.fin.InterApplicationBus.Channel.create(t);p.PrivateChannelProvider.init(n,t)}))}isConnectionAuthorized(e,t){return this.wire.sendAction("interop-broker-is-connection-authorized").catch((e=>{})),Promise.resolve(!0)}isActionAuthorized(e,t,n){return this.wire.sendAction("interop-broker-is-action-authorized").catch((e=>{})),Promise.resolve(!0)}};return Gi.InteropBroker=f,e=new WeakMap,t=new WeakMap,n=new WeakMap,Gi}var zi,Ki={},qi={},Ji=s&&s.__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},Yi=s&&s.__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)};Object.defineProperty(qi,"__esModule",{value:!0});const Zi=d,Qi=Hi;class Xi extends Zi.Base{constructor(e,t,n){super(e),zi.set(this,void 0),this.id=n,Ji(this,zi,t,"f")}async setContext(e){this.wire.sendAction("interop-session-context-group-set-context").catch((e=>{}));return(await Yi(this,zi,"f")).dispatch(`sessionContextGroup:setContext-${this.id}`,{sessionContextGroupId:this.id,context:e})}async getCurrentContext(e){this.wire.sendAction("interop-session-context-group-get-context").catch((e=>{}));return(await Yi(this,zi,"f")).dispatch(`sessionContextGroup:getContext-${this.id}`,{sessionContextGroupId:this.id,type:e})}async addContextHandler(e,t){if(this.wire.sendAction("interop-session-context-group-add-handler").catch((e=>{})),"function"!=typeof e)throw new Error("Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");const n=await Yi(this,zi,"f");let i;return i=t?`sessionContextHandler:invoke-${this.id}-${t}-${(0,Qi.generateId)()}`:`sessionContextHandler:invoke-${this.id}`,n.register(i,(0,Qi.wrapContextHandler)(e,i)),await n.dispatch(`sessionContextGroup:handlerAdded-${this.id}`,{handlerId:i,contextType:t}),{unsubscribe:await this.createUnsubscribeCb(i)}}async createUnsubscribeCb(e){const t=await Yi(this,zi,"f");return async()=>{t.remove(e),await t.dispatch(`sessionContextGroup:handlerRemoved-${this.id}`,{handlerId:e})}}getUserInstance(){return{id:this.id,setContext:(0,Qi.wrapInTryCatch)(this.setContext.bind(this),"Failed to set context: "),getCurrentContext:(0,Qi.wrapInTryCatch)(this.getCurrentContext.bind(this),"Failed to get context: "),addContextHandler:(0,Qi.wrapInTryCatch)(this.addContextHandler.bind(this),"Failed to add context handler: ")}}}qi.default=Xi,zi=new WeakMap;var er={},tr={},nr={},ir={},rr=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),or=s&&s.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),sr=s&&s.__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)&&rr(t,e,n);return or(t,e),t};Object.defineProperty(ir,"__esModule",{value:!0}),ir.PrivateChannelClient=void 0;const ar=sr(Hi);var cr,dr;function hr(){if(cr)return tr;cr=1;var e,t=s&&s.__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)},n=s&&s.__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},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(tr,"__esModule",{value:!0}),tr.FDC3ModuleBase=void 0;const o=nr,a=Hi,c=wr(),d=r(i);return tr.FDC3ModuleBase=class{get client(){return t(this,e,"f").call(this)}get fin(){return this.wire.getFin()}constructor(t,i){this.wire=i,e.set(this,void 0),n(this,e,t,"f")}async broadcast(e){return this.wire.sendAction("fdc3-broadcast").catch((e=>{})),this.client.setContext(e)}async _open(e,t){this.wire.sendAction("fdc3-open").catch((e=>{}));try{return await c.InteropClient.ferryFdc3Call(this.client,"fdc3Open",{app:e,context:t})}catch(e){const t=e.message===a.BROKER_ERRORS.fdc3Open?"ResolverUnavailable":e.message;throw new Error(t)}}async _getChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:"system",...(0,o.getUnsupportedChannelApis)()})))}async getOrCreateChannel(e){this.wire.sendAction("fdc3-get-or-create-channel").catch((e=>{}));const t=(await this._getChannels()).find((t=>t.id===e));if(t)return{...t,type:"system",...(0,o.getUnsupportedChannelApis)()};try{const t=await this.client.joinSessionContextGroup(e);return(0,o.buildAppChannelObject)(t)}catch(e){throw console.error(e.message),new Error(o.ChannelError.CreationFailed)}}async getSystemChannels(){return this.wire.sendAction("fdc3-get-system-channels").catch((e=>{})),this._getChannels()}async joinChannel(e){this.wire.sendAction("fdc3-join-channel").catch((e=>{}));try{return await this.client.joinContextGroup(e)}catch(e){if(e.message===a.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup?console.error("The Channel you have tried to join is an App Channel. Custom Channels can only be defined by the Interop Broker through code or manifest configuration. Please use getOrCreateChannel."):console.error(e.message),e.message.startsWith("Attempting to join a context group that does not exist"))throw new Error(o.ChannelError.NoChannelFound);throw new Error(o.ChannelError.AccessDenied)}}async getCurrentChannel(){this.wire.sendAction("fdc3-get-current-channel").catch((e=>{}));const e=await this.getCurrentContextGroupInfo();return e?this.buildChannelObject(e):null}async leaveCurrentChannel(){return this.wire.sendAction("fdc3-leave-current-channel").catch((e=>{})),this.client.removeFromContextGroup()}async getCurrentContextGroupInfo(){const e=await this.client.getContextGroups(),t=e.map((async e=>this.client.getAllClientsInContextGroup(e.id))),n=(await Promise.all(t)).findIndex((e=>e.some((e=>{const{uuid:t,name:n}=e;return this.wire.me.uuid===t&&this.wire.me.name===n}))));return e[n]}async buildChannelObject(e){return{...e,type:"system",addContextListener:(...[e,t])=>{let n,i;"function"==typeof e?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),n=e):(n=t,"string"==typeof e&&(i=e));const r=(async()=>{let e=!0;const t=await this.client.getCurrentContext(i);return this.client.addContextHandler(((i,r)=>{if(!e||(e=!1,!(0,d.default)(t,i)))return n(i,r)}),i)})();return{...r,unsubscribe:()=>r.then((e=>e.unsubscribe()))}},broadcast:this.broadcast.bind(this),getCurrentContext:async e=>{const t=await this.client.getCurrentContext(e);return void 0===t?null:t}}}},e=new WeakMap,tr}ir.PrivateChannelClient=class{constructor(e,t){this.id=t,this.client=e,this.listeners=new Map}async broadcast(e){return this.client.dispatch("broadcast",{context:e})}async getCurrentContext(e){return this.client.dispatch("getCurrentContext",{contextType:e})}async addContextListener(e,t){if("function"!=typeof t)throw new Error("Non-function argument passed to the second parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");let n;n=e?`contextHandler:invoke-${this.id}-${e}-${ar.generateId()}`:`contextHandler:invoke-${this.id}-${ar.generateId()}`,this.client.register(n,ar.wrapContextHandler(t,n));const i={unsubscribe:await this.createContextUnsubscribeCb(n)};return this.listeners.set(n,i),await this.client.dispatch("contextHandlerAdded",{handlerId:n,contextType:e}),i}createNonStandardUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch("nonStandardHandlerRemoved",{handlerId:e})}}createContextUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch("contextHandlerRemoved",{handlerId:e})}}onAddContextListener(e){const t=`onContextHandlerAdded:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch("onAddContextHandlerAdded",{handlerId:t}),n}onDisconnect(e){const t=`onDisconnect:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch("onDisconnectHandlerAdded",{handlerId:t}),n}onUnsubscribe(e){const t=`onUnsubscribe:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch("onUnsubscribeHandlerAdded",{handlerId:t}),n}async cleanUpAllSubs(){Array.from(this.listeners.keys()).forEach((e=>{this.client.remove(e),this.listeners.delete(e)}))}async disconnect(){try{await this.client.dispatch("clientDisconnecting"),await this.cleanUpAllSubs(),await this.client.disconnect()}catch(e){throw new Error(e.message)}}},function(e){var t=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.getIntentResolution=e.isChannel=e.isContext=e.connectPrivateChannel=e.buildAppChannelObject=e.buildPrivateChannelObject=e.ChannelError=e.ResultError=e.UnsupportedChannelApiError=e.getUnsupportedChannelApis=void 0;const n=Hi,r=ir,o=t(i);e.getUnsupportedChannelApis=e=>({addContextListener:()=>{throw new a("Channel.addContextListener",e)},broadcast:()=>{throw new a("Channel.broadcast",e)},getCurrentContext:()=>{throw new a("Channel.getCurrentContext",e)}});class a extends Error{constructor(e,t="System"){super(e),this.message=`Calling ${e} on an instance of a ${t} Channel returned by fdc3.get${t}Channels is not supported. If you would like to use a ${t} Channel, please use fdc3.joinChannel, fdc3.addContextListener, and fdc3.broadcast instead.`}}var c,d;e.UnsupportedChannelApiError=a,function(e){e.NoResultReturned="NoResultReturned",e.IntentHandlerRejected="IntentHandlerRejected"}(c=e.ResultError||(e.ResultError={})),(d=e.ChannelError||(e.ChannelError={})).NoChannelFound="NoChannelFound",d.AccessDenied="AccessDenied",d.CreationFailed="CreationFailed";e.buildPrivateChannelObject=e=>{let t=!1;const n=()=>{if(t)throw new Error("Private Channel Client has been disconnected from the Private Channel")};return{id:e.id,type:"private",broadcast:async t=>(n(),e.broadcast(t)),getCurrentContext:async t=>(n(),e.getCurrentContext(t)),addContextListener:async(t,i)=>{n();let r=i,o=t;"function"==typeof t&&(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),r=t,o=null);return e.addContextListener(o,r)},onAddContextListener:t=>(n(),e.onAddContextListener(t)),disconnect:async()=>(n(),t=!0,e.disconnect()),onDisconnect:t=>(n(),e.onDisconnect(t)),onUnsubscribe:t=>(n(),e.onUnsubscribe(t))}};e.buildAppChannelObject=e=>({id:e.id,type:"app",broadcast:e.setContext,getCurrentContext:async t=>{const n=await e.getCurrentContext(t);return void 0===n?null:n},addContextListener:(t,n)=>{let i,r;"function"==typeof t?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),i=t):(i=n,"string"==typeof t&&(r=t));const s=(async()=>{let t=!0;const n=await e.getCurrentContext(r);return e.addContextHandler(((e,r)=>{if(!t||(t=!1,!(0,o.default)(n,e)))return i(e,r)}),r)})();return{...s,unsubscribe:()=>s.then((e=>e.unsubscribe()))}}});e.connectPrivateChannel=async t=>{try{const n=await fin.InterApplicationBus.Channel.connect(t),i=new r.PrivateChannelClient(n,t);return(0,e.buildPrivateChannelObject)(i)}catch(e){throw new Error(`Private Channel with id: ${t} doesn't exist`)}};e.isContext=e=>{if(e&&"object"==typeof e&&"type"in e){const{type:t}=e;return"string"==typeof t}return!1};e.isChannel=e=>{if(e&&"object"==typeof e&&"type"in e&&"id"in e){const{type:t,id:n}=e;return"string"==typeof t&&"string"==typeof n&&("app"===t||"private"===t)}return!1};e.getIntentResolution=async(t,i,r,o)=>{const s=(0,n.generateId)(),a=new Promise(((e,t)=>{fin.InterApplicationBus.subscribe({uuid:"*"},s,(t=>{e(t)})).catch((()=>t(new Error("getResult is not supported in this environment"))))})),d=r?{target:r,intentResolutionResultId:s}:{intentResolutionResultId:s},h=o?{name:o,context:i,metadata:d}:{...i,metadata:d},l=async()=>{let n=await a;if(!n||"object"!=typeof n)throw new Error(c.NoResultReturned);const{error:i}=n;if(i)throw new Error(c.IntentHandlerRejected);if((0,e.isChannel)(n)){const{id:i,type:r}=n;switch(r){case"private":n=await(0,e.connectPrivateChannel)(i);break;case"app":{const r=await t.joinSessionContextGroup(i);n=(0,e.buildAppChannelObject)(r);break}}}else if(!(0,e.isContext)(n))throw new Error(c.NoResultReturned);return n},u=o?await t.fireIntent(h):await t.fireIntentForContext(h);return"object"!=typeof u?{source:{appId:"",instanceId:""},intent:"",version:"2.0",getResult:l}:{...u,getResult:l}}}(nr);var lr,ur,pr={};function wr(){if(ur)return Ki;ur=1;var e,t,n=s&&s.__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},i=s&&s.__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)},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ki,"__esModule",{value:!0}),Ki.InteropClient=void 0;const o=d,a=r(qi),c=function(){if(dr)return er;dr=1,Object.defineProperty(er,"__esModule",{value:!0}),er.Fdc3Module=void 0;const e=Hi,t=hr();class n extends t.FDC3ModuleBase{async open(e,t){await super._open(e,t)}addContextListener(e,t){let n;return this.wire.sendAction("fdc3-add-context-listener").catch((e=>{})),"function"==typeof e?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),n=this.client.addContextHandler(e)):n=this.client.addContextHandler(t,null===e?void 0:e),{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}addIntentListener(e,t){this.wire.sendAction("fdc3-add-intent-listener").catch((e=>{}));const n=this.client.registerIntentHandler((e=>{const{context:n,metadata:i}=e,{metadata:r}=n,o=i?.intentResolutionResultId||r?.intentResolutionResultId;o&&this.fin.InterApplicationBus.publish(o,null).catch((()=>null)),t(e.context)}),e,{fdc3Version:"1.2"});return{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}async raiseIntent(t,n,i){this.wire.sendAction("fdc3-raise-intent").catch((e=>{}));const r=i?{name:t,context:n,metadata:{target:i}}:{name:t,context:n};try{return await this.client.fireIntent(r)}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntent?"ResolverUnavailable":t.message;throw new Error(n)}}async findIntent(t,n){this.wire.sendAction("fdc3-find-intent").catch((e=>{}));try{return await this.client.getInfoForIntent({name:t,context:n})}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntent?"ResolverUnavailable":t.message;throw new Error(n)}}async findIntentsByContext(t){this.wire.sendAction("fdc3-find-intents-by-context").catch((e=>{}));try{return await this.client.getInfoForIntentsByContext(t)}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntentsByContext?"ResolverUnavailable":t.message;throw new Error(n)}}async raiseIntentForContext(t,n){this.wire.sendAction("fdc3-raise-intent-for-context").catch((e=>{}));try{return await this.client.fireIntentForContext({...t,metadata:{target:n}})}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntentForContext?"ResolverUnavailable":t.message;throw new Error(n)}}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}getInfo(){return this.wire.sendAction("fdc3-get-info").catch((e=>{})),{providerVersion:this.wire.environment.getAdapterVersionSync(),provider:`openfin-${this.wire.me.uuid}`,fdc3Version:"1.2"}}}return er.Fdc3Module=n,er}(),h=function(){if(lr)return pr;lr=1,Object.defineProperty(pr,"__esModule",{value:!0}),pr.Fdc3Module2=void 0;const e=hr(),t=Hi,n=wr(),i=nr,r=ir;class o extends e.FDC3ModuleBase{async open(e,t){return"string"==typeof e&&console.warn("Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string })."),super._open(e,t)}async findInstances(e){this.wire.sendAction("fdc3-find-instances").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,"fdc3FindInstances",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3FindInstances?"ResolverUnavailable":e.message;throw new Error(n)}}async getAppMetadata(e){this.wire.sendAction("fdc3-get-app-metadata").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,"fdc3GetAppMetadata",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3GetAppMetadata?"ResolverUnavailable":e.message;throw new Error(n)}}async addContextListener(e,t){this.wire.sendAction("fdc3-add-context-listener").catch((e=>{}));const n=e=>t=>{const{contextMetadata:n,...i}=t,r=n?[{...i},n]:[t,null];e(...r)};let i=t,r=n(i);return"function"==typeof e?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),i=e,r=n(i),this.client.addContextHandler(r)):this.client.addContextHandler(r,null===e?void 0:e)}async findIntent(e,n,i){this.wire.sendAction("fdc3-find-intent").catch((e=>{}));try{return await this.client.getInfoForIntent({name:e,context:n,metadata:{resultType:i}})}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntent?"ResolverUnavailable":e.message;throw new Error(n)}}async findIntentsByContext(e,i){this.wire.sendAction("fdc3-find-intents-by-context").catch((e=>{}));const r=i?{context:e,metadata:{resultType:i}}:e;try{return await n.InteropClient.ferryFdc3Call(this.client,"fdc3v2FindIntentsByContext",r)}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntentsByContext?"ResolverUnavailable":e.message;throw new Error(n)}}async raiseIntent(e,n,r){this.wire.sendAction("fdc3-raise-intent").catch((e=>{}));try{return"string"==typeof r&&console.warn("Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string })."),(0,i.getIntentResolution)(this.client,n,r,e)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?"ResolverUnavailable":e.message;throw new Error(n)}}async raiseIntentForContext(e,n){this.wire.sendAction("fdc3-raise-intent-for-context").catch((e=>{}));try{return"string"==typeof n&&console.warn("Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string })."),(0,i.getIntentResolution)(this.client,e,n)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?"ResolverUnavailable":e.message;throw new Error(n)}}async addIntentListener(e,t){if(this.wire.sendAction("fdc3-add-intent-listener").catch((e=>{})),"string"!=typeof e)throw new Error("First argument must be an Intent name");return this.client.registerIntentHandler((async e=>{let n,i;const{context:r,metadata:o}=e,{contextMetadata:s,metadata:a,...c}=r,d=o?.intentResolutionResultId||a?.intentResolutionResultId;try{const e=a?{metadata:a,...c}:{...c};n=await t(e,s),i=n}catch(e){n=e,i={error:!0}}if(d&&this.fin.InterApplicationBus.publish(d,i).catch((()=>null)),n instanceof Error)throw new Error(n.message);return n}),e,{fdc3Version:"2.0"})}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}async createPrivateChannel(){const e=(0,t.generateId)();await n.InteropClient.ferryFdc3Call(this.client,"createPrivateChannelProvider",{channelId:e});const o=await this.fin.InterApplicationBus.Channel.connect(e),s=new r.PrivateChannelClient(o,e);return(0,i.buildPrivateChannelObject)(s)}async getUserChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:"user",...(0,i.getUnsupportedChannelApis)("User")})))}async getSystemChannels(){return console.warn("This API has been deprecated. Please use fdc3.getUserChannels instead."),super.getSystemChannels()}async joinUserChannel(e){return super.joinChannel(e)}async joinChannel(e){return console.warn("This API has been deprecated. Please use fdc3.joinUserChannel instead."),super.joinChannel(e)}async getCurrentChannel(){const e=await super.getCurrentChannel();return e?{...e,type:"user",broadcast:this.broadcast.bind(this)}:null}async getInfo(){return n.InteropClient.ferryFdc3Call(this.client,"fdc3v2GetInfo",{fdc3Version:"2.0"})}}return pr.Fdc3Module2=o,pr}(),l=Hi;let u=class extends o.Base{constructor(i,r){super(i),e.set(this,void 0),t.set(this,void 0),n(this,t,new Map,"f"),n(this,e,r,"f")}async setContext(t){this.wire.sendAction("interop-client-set-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("setContext",{context:t})}async addContextHandler(t,n){if(this.wire.sendAction("interop-client-add-context-handler").catch((e=>{})),"function"!=typeof t)throw new Error("Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");const r=await i(this,e,"f");let o;o=n?`invokeContextHandler-${n}-${(0,l.generateId)()}`:"invokeContextHandler";const s=(0,l.wrapContextHandler)(t,o);return r.register(o,s),await r.dispatch("contextHandlerRegistered",{handlerId:o,contextType:n}),{unsubscribe:async()=>{r.remove(o),await r.dispatch("removeContextHandler",{handlerId:o})}}}async getContextGroups(){this.wire.sendAction("interop-client-get-context-groups").catch((e=>{}));return(await i(this,e,"f")).dispatch("getContextGroups")}async joinContextGroup(t,n){this.wire.sendAction("interop-client-join-context-group").catch((e=>{}));const r=await i(this,e,"f");if(!t)throw new Error("No contextGroupId specified for joinContextGroup.");return r.dispatch("joinContextGroup",{contextGroupId:t,target:n})}async removeFromContextGroup(t){this.wire.sendAction("interop-client-remove-from-context-group").catch((e=>{}));return(await i(this,e,"f")).dispatch("removeFromContextGroup",{target:t})}async getAllClientsInContextGroup(t){this.wire.sendAction("interop-client-get-all-clients-in-context-group").catch((e=>{}));const n=await i(this,e,"f");if(!t)throw new Error("No contextGroupId specified for getAllClientsInContextGroup.");return n.dispatch("getAllClientsInContextGroup",{contextGroupId:t})}async getInfoForContextGroup(t){this.wire.sendAction("interop-client-get-info-for-context-group").catch((e=>{}));const n=await i(this,e,"f");if(!t)throw new Error("No contextGroupId specified for getInfoForContextGroup.");return n.dispatch("getInfoForContextGroup",{contextGroupId:t})}async fireIntent(t){this.wire.sendAction("interop-client-fire-intent").catch((e=>{}));return(await i(this,e,"f")).dispatch("fireIntent",t)}async registerIntentHandler(t,n,r){this.wire.sendAction("interop-client-register-intent-handler").catch((e=>{}));const o=await i(this,e,"f"),s=`intent-handler-${n}`,a=(0,l.wrapIntentHandler)(t,s);try{await o.register(s,a),await o.dispatch("intentHandlerRegistered",{handlerId:s,...r})}catch(e){throw new Error("Unable to register intent handler")}return{unsubscribe:async()=>{o.remove(s)}}}async getCurrentContext(t){this.wire.sendAction("interop-client-get-current-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("getCurrentContext",{contextType:t})}async getInfoForIntent(t){this.wire.sendAction("interop-client-get-info-for-intent").catch((e=>{}));return(await i(this,e,"f")).dispatch("getInfoForIntent",t)}async getInfoForIntentsByContext(t){this.wire.sendAction("interop-client-get-info-for-intents-by-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("getInfoForIntentsByContext",t)}async fireIntentForContext(t){this.wire.sendAction("interop-client-fire-intent-for-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("fireIntentForContext",t)}async joinSessionContextGroup(n){try{const r=i(this,t,"f").get(n);if(r)return r.getUserInstance();const o=await i(this,e,"f"),{hasConflict:s}=await o.dispatch("sessionContextGroup:createIfNeeded",{sessionContextGroupId:n});s&&console.warn(`A (non-session) context group with the name "${n}" already exists. If you are trying to join a Context Group, call joinContextGroup instead.`);const c=new a.default(this.wire,i(this,e,"f"),n);return i(this,t,"f").set(n,c),c.getUserInstance()}catch(e){throw console.error(`Error thrown trying to create Session Context Group with id "${n}": ${e}`),e}}async onDisconnection(t){this.wire.sendAction("interop-client-add-ondisconnection-listener").catch((e=>{}));return(await i(this,e,"f")).onDisconnection((e=>{const{uuid:n}=e;t({type:"interop-broker",topic:"disconnected",brokerName:n})}))}getFDC3Sync(e){switch(e){case"1.2":return new c.Fdc3Module((()=>this),this.wire);case"2.0":return new h.Fdc3Module2((()=>this),this.wire);default:throw new Error(`Invalid FDC3 version provided: ${e}. Must be '1.2' or '2.0'`)}}async getFDC3(e){return this.getFDC3Sync(e)}static async ferryFdc3Call(t,n,r){return(await i(t,e,"f")).dispatch(n,r||null)}};return Ki.InteropClient=u,e=new WeakMap,t=new WeakMap,Ki}var yr,fr,gr,mr={};function vr(){if(yr)return mr;yr=1,Object.defineProperty(mr,"__esModule",{value:!0}),mr.overrideCheck=mr.checkFDC32Overrides=mr.getDefaultViewFdc3VersionFromAppInfo=void 0;const e=Vi();function t(t){return["fdc3HandleFindInstances","handleInfoForIntent","handleInfoForIntentsByContext","fdc3HandleGetAppMetadata","fdc3HandleGetInfo","fdc3HandleOpen","handleFiredIntent","handleFiredIntentForContext"].filter((n=>t[n]===e.InteropBroker.prototype[n]))}return mr.getDefaultViewFdc3VersionFromAppInfo=function({manifest:e,initialOptions:t}){const n=e?.platform?.defaultViewOptions?.fdc3InteropApi??t.defaultViewOptions?.fdc3InteropApi;return["1.2","2.0"].includes(n??"")?n:void 0},mr.checkFDC32Overrides=t,mr.overrideCheck=function(e,n){if(n&&"2.0"===n){const n=t(e);n.length>0&&console.warn(`WARNING: FDC3 2.0 has been set as a default option for Views in this Platform, but the required InteropBroker APIs for FDC3 2.0 compliance have not all been overridden.\nThe following APIs need to be overridden:\n${n.join("\n")}`)}},mr}function Cr(){return gr||(gr=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),i=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),i(function(){if(fr)return Ti;fr=1;var e=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ti,"__esModule",{value:!0}),Ti.InteropModule=void 0;const t=e(n),i=$i,r=d,o=Vi(),a=wr(),c=vr(),h=Tn,l=e=>new e,u="You have attempted to use or modify InteropBroker parameters, which is not allowed. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.";class p extends r.Base{async init(e,n=l){this.wire.sendAction("interop-init").catch((()=>{}));const r=await this.wire.environment.getInteropInfo(this.wire.getFin()),s=(0,i.createUnusableObject)(u),a=(0,i.createWarningObject)(u,(0,t.default)(r)),d=async()=>{throw new Error(u)},p=o.InteropBroker.createClosedConstructor(this.wire,(()=>this.fin.InterApplicationBus.Channel.create(`interop-broker-${e}`)),r);let w;return w=Array.isArray(n)?new((0,h.overrideFromComposables)(...n)(p))(s,d,a):await n(p,s,d,a),(0,c.overrideCheck)(w,r.fdc3Version),w}connectSync(e,t){return this.wire.sendAction("interop-connect-sync").catch((()=>{})),new a.InteropClient(this.wire,this.wire.environment.whenReady().then((()=>this.fin.InterApplicationBus.Channel.connect(`interop-broker-${e}`,{payload:t}))))}}return Ti.InteropModule=p,Ti}(),e),i(wr(),e),i(Vi(),e)}(Li)),Li}var br={},Ir={},Er={},xr={};Object.defineProperty(xr,"__esModule",{value:!0}),xr.getSnapshotSourceChannelName=void 0;xr.getSnapshotSourceChannelName=e=>`snapshot-source-provider-${e.uuid}`;var Ar,Pr,Mr,_r,Or,Sr=s&&s.__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},Rr=s&&s.__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)};Object.defineProperty(Er,"__esModule",{value:!0}),Er.SnapshotSource=void 0;const Fr=d,jr=xr,kr=new Map;class Lr extends Fr.Base{constructor(e,t){super(e),Ar.set(this,void 0),Pr.set(this,(()=>(kr.has(this.identity.uuid)||kr.set(this.identity.uuid,{eventFired:null,clientPromise:null}),kr.get(this.identity.uuid)))),Mr.set(this,(()=>(Rr(this,Pr,"f").call(this).clientPromise||(Rr(this,Pr,"f").call(this).clientPromise=Rr(this,_r,"f").call(this)),Rr(this,Pr,"f").call(this).clientPromise))),_r.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);try{Rr(this,Pr,"f").call(this).eventFired||await Rr(this,Or,"f").call(this);const t=await this.fin.InterApplicationBus.Channel.connect(e,{wait:!1});return t.onDisconnection((()=>{Rr(this,Pr,"f").call(this).clientPromise=null,Rr(this,Pr,"f").call(this).eventFired=null})),t}catch(e){throw Rr(this,Pr,"f").call(this).clientPromise=null,new Error("The targeted SnapshotSource is not currently initialized. Await this object's ready() method.")}})),Or.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);let t,n;const i=new Promise(((e,i)=>{t=e,n=i}));Rr(this,Pr,"f").call(this).eventFired=i;const r=async i=>{try{i.channelName===e&&(t(),await this.fin.InterApplicationBus.Channel.removeListener("connected",r))}catch(e){n(e)}};await this.fin.InterApplicationBus.Channel.on("connected",r)})),Sr(this,Ar,t,"f")}get identity(){return Rr(this,Ar,"f")}async ready(){this.wire.sendAction("snapshot-source-ready").catch((e=>{}));try{await Rr(this,Mr,"f").call(this)}catch(e){await Rr(this,Pr,"f").call(this).eventFired}}async getSnapshot(){this.wire.sendAction("snapshot-source-get-snapshot").catch((e=>{}));const e=await Rr(this,Mr,"f").call(this),t=await e.dispatch("get-snapshot");return(await t).snapshot}async applySnapshot(e){this.wire.sendAction("snapshot-source-apply-snapshot").catch((e=>{}));return(await Rr(this,Mr,"f").call(this)).dispatch("apply-snapshot",{snapshot:e})}}Er.SnapshotSource=Lr,Ar=new WeakMap,Pr=new WeakMap,Mr=new WeakMap,_r=new WeakMap,Or=new WeakMap,Object.defineProperty(Ir,"__esModule",{value:!0}),Ir.SnapshotSourceModule=void 0;const Tr=d,$r=Er,Br=xr;class Gr extends Tr.Base{async init(e){if(this.wire.sendAction("snapshot-source-init").catch((e=>{})),"object"!=typeof e||"function"!=typeof e.getSnapshot||"function"!=typeof e.applySnapshot)throw new Error("you must pass in a valid SnapshotProvider");const t=await this.fin.InterApplicationBus.Channel.create((0,Br.getSnapshotSourceChannelName)(this.fin.me));t.register("get-snapshot",(async()=>({snapshot:await e.getSnapshot()}))),t.register("apply-snapshot",(({snapshot:t})=>e.applySnapshot(t)))}wrapSync(e){return this.wire.sendAction("snapshot-source-wrap-sync").catch((e=>{})),new $r.SnapshotSource(this.wire,e)}async wrap(e){return this.wire.sendAction("snapshot-source-wrap").catch((e=>{})),this.wrapSync(e)}}Ir.SnapshotSourceModule=Gr,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Ir,e),n(Er,e)}(br),Object.defineProperty(a,"__esModule",{value:!0});var Wr=a.Fin=void 0;const Hr=t,Nr=c,Dr=ie(),Ur=Z(),Vr=de,zr=en,Kr=rn,qr=un,Jr=bn,Yr=J(),Zr=An,Qr=ki,Xr=Cr(),eo=br;class to extends Hr.EventEmitter{constructor(e){super(),this.wire=e,this.System=new Nr.System(e),this.Window=new Dr._WindowModule(e),this.Application=new Ur.ApplicationModule(e),this.InterApplicationBus=new Vr.InterApplicationBus(e),this.Clipboard=new zr.Clipboard(e),this.ExternalApplication=new Kr.ExternalApplicationModule(e),this.Frame=new qr._FrameModule(e),this.GlobalHotkey=new Jr.GlobalHotkey(e),this.Platform=new Zr.PlatformModule(e,this.InterApplicationBus.Channel),this.View=new Yr.ViewModule(e),this.Interop=new Xr.InteropModule(e),this.SnapshotSource=new eo.SnapshotSourceModule(e),e.registerFin(this),this.me=(0,Qr.getMe)(e),e.on("disconnected",(()=>{this.emit("disconnected")}))}}Wr=a.Fin=to;var no={},io={};function ro(e){return"string"==typeof e.manifestUrl}function oo(e){return ao(e)&&"string"==typeof e.address}function so(e){return oo(e)&&"string"==typeof e.token}function ao(e){return"string"==typeof e.uuid}function co(e){return e.runtime&&"string"==typeof e.runtime.version}function ho(e){return ao(e)&&co(e)}Object.defineProperty(io,"__esModule",{value:!0}),io.isInternalConnectConfig=io.isPortDiscoveryConfig=io.isNewConnectConfig=io.isConfigWithReceiver=io.isRemoteConfig=io.isExistingConnectConfig=io.isExternalConfig=void 0,io.isExternalConfig=ro,io.isExistingConnectConfig=oo,io.isRemoteConfig=so,io.isConfigWithReceiver=function(e){return"object"==typeof e.receiver&&so({...e,address:""})},io.isNewConnectConfig=ho,io.isPortDiscoveryConfig=function(e){return ro(e)&&co(e)||ho(e)},io.isInternalConnectConfig=function(e){return oo(e)||ho(e)};var lo={},uo={};Object.defineProperty(uo,"__esModule",{value:!0}),uo.EmitterMap=void 0;const po=t;function wo(e){return Buffer.from(e).toString("base64")}uo.EmitterMap=class{constructor(){this.storage=new Map}hashKeys(e){return e.map(wo).join("/")}getOrCreate(e){const t=this.hashKeys(e);return this.storage.has(t)||this.storage.set(t,new po.EventEmitter),this.storage.get(t)}has(e){return this.storage.has(this.hashKeys(e))}delete(e){const t=this.hashKeys(e);return this.storage.delete(t)}},Object.defineProperty(lo,"__esModule",{value:!0});const yo=uo;class fo extends yo.EmitterMap{constructor(){super(...arguments),this.dispatchEvent=e=>{if(function(e){return"process-desktop-event"===e.action}(e)){const{payload:t}=e,n=function(e){const{topic:t}=e;if("frame"===t||"window"===t||"view"===t){const{uuid:n,name:i}=e;return[t,n,i]}if("application"===t){const{uuid:n}=e;return[t,n]}return[t]}(t);if(this.has(n))return this.getOrCreate(n).emit(t.type,t),!0}return!1}}}lo.default=fo;var go,mo,vo=s&&s.__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},Co=s&&s.__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)},bo=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(no,"__esModule",{value:!0});var Io=no.Transport=void 0;const Eo=t,xo=io,Ao=g,Po=bo(lo),Mo=ki,_o=ke;class Oo extends Eo.EventEmitter{constructor(e,t,n){super(),this.wireListeners=new Map,this.topicRefMap=new Map,this.eventAggregator=new Po.default,this.messageHandlers=[this.eventAggregator.dispatchEvent],go.set(this,void 0),mo.set(this,void 0),this.connectSync=()=>{Co(this,go,"f").connectSync()},this.getPort=()=>Co(this,go,"f").getPort(),vo(this,go,new e(this.onmessage.bind(this)),"f"),this.environment=t,this.sendRaw=Co(this,go,"f").send.bind(Co(this,go,"f")),this.registerMessageHandler(this.handleMessage.bind(this)),Co(this,go,"f").on("disconnected",(()=>{for(const[,{handleNack:e}]of this.wireListeners)e({reason:"Remote connection has closed"});this.wireListeners.clear(),this.emit("disconnected")}));const{uuid:i,name:r}=n,o=this.environment.getCurrentEntityType();this.me=(0,Mo.getBaseMe)(o,i,r)}getFin(){if(!Co(this,mo,"f"))throw new Error("No Fin object registered for this transport");return Co(this,mo,"f")}registerFin(e){if(Co(this,mo,"f"))throw new Error("Fin object has already been registered for this transport");vo(this,mo,e,"f")}shutdown(){return Co(this,go,"f").shutdown()}async connect(e){if((0,xo.isConfigWithReceiver)(e))return await Co(this,go,"f").connect(e.receiver),this.authorize(e);if((0,xo.isRemoteConfig)(e))return this.connectRemote(e);if((0,xo.isExistingConnectConfig)(e))return this.connectByPort(e);if((0,xo.isNewConnectConfig)(e)){const t=await this.environment.retrievePort(e);return this.connectByPort({...e,address:`ws://localhost:${t}`})}}async connectRemote(e){return await Co(this,go,"f").connect(new(this.environment.getWsConstructor())(e.address)),this.authorize(e)}async connectByPort(e){const{address:t,uuid:n}=e,i={...e,type:"file-token"},r=Co(this,go,"f");await r.connect(new(this.environment.getWsConstructor())(e.address));const o=await this.sendAction("request-external-authorization",{uuid:n,type:"file-token"},!0);if("external-authorization-response"!==o.action)throw new Ao.UnexpectedActionError(o.action);return await this.environment.writeToken(o.payload.file,o.payload.token),this.authorize(i)}async authorize(e){const t=await this.sendAction("request-authorization",e,!0);if("authorization-response"!==t.action)throw new Ao.UnexpectedActionError(t.action);if(!0!==t.payload.success)throw new Ao.RuntimeError(t.payload)}sendAction(e,t={},n=!1){let i=()=>{};const r=Ao.RuntimeError.getCallSite(1),o=this.environment.getNextMessageId(),s=new Promise(((s,a)=>{i=a;const c={action:e,payload:t,messageId:o},d=Co(this,go,"f");return this.addWireListener(o,s,(e=>this.nackHandler(e,a,r)),n),d.send(c).catch(a)}));return Object.assign(s,{cancel:i,messageId:o})}nackHandler(e,t,n){t("string"==typeof e?e:new Ao.RuntimeError(e,n))}ferryAction(e){return new Promise(((t,n)=>{const i=this.environment.getNextMessageId();e.messageId=i;const r=e=>{t(e.payload)};return Co(this,go,"f").send(e).then((()=>this.addWireListener(i,r,(e=>this.nackHandler(e,n)),!1))).catch(n)}))}registerMessageHandler(e){this.messageHandlers.push(e)}addWireListener(e,t,n,i){i?this.uncorrelatedListener=t:this.wireListeners.has(e)?n({reason:"Duplicate handler id",error:(0,_o.errorToPOJO)(new Ao.DuplicateCorrelationError(String(e)))}):this.wireListeners.set(e,{resolve:t,handleNack:n})}onmessage(e){for(const t of this.messageHandlers)t.call(null,e)}handleMessage(e){const t=e.correlationId||NaN;if("correlationId"in e){if(!this.wireListeners.has(t))return!1;{const{resolve:n,handleNack:i}=this.wireListeners.get(t);"ack"!==e.action?i({reason:"Did not receive ack action",error:(0,_o.errorToPOJO)(new Ao.NoAckError(e.action))}):"payload"in e?e.payload.success?n.call(null,e):i(e.payload):"string"==typeof e.reason?i(e):(console.warn("Received invalid response from core",e),i({reason:"invalid response shape"})),this.wireListeners.delete(t)}}else this.uncorrelatedListener&&this.uncorrelatedListener.call(null,e),this.uncorrelatedListener=()=>{};return!0}}Io=no.Transport=Oo,go=new WeakMap,mo=new WeakMap;const So=(...e)=>({log:(...t)=>console.debug(`[${(new Date).toISOString()}]`,...(e=>e.map((e=>`[${e}]`)))(e),...t),getLogger:(...t)=>So(...e,...t)}),Ro=So("@openfin/core-web/client");function Fo(e,t){if(!function(e){return"string"==typeof e}(e))throw new Error(`Property ${t} has invalid type. Expected string, got ${typeof e}.`)}const jo="web-broker-ports-ready",ko=Ro.getLogger("get-web-interop-ports");function Lo(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)}function To(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}"function"==typeof SuppressedError&&SuppressedError;const $o=e=>{var n,i,r;return r=class extends t.EventEmitter{constructor(t){super(),n.set(this,void 0),i.set(this,!1),this.connectSync=()=>{Lo(this,i,"f")||(e.addEventListener("message",(e=>{e.data?.topic?.startsWith("wire-message")&&e.data.message&&Lo(this,n,"f").call(this,{...JSON.parse(e.data.message),ports:e.ports})})),e.start())},this.connect=async()=>{this.connectSync()},this.send=t=>(e.postMessage({topic:"wire-message",message:JSON.stringify(t)}),Promise.resolve()),this.shutdown=async()=>{e.close()},To(this,n,t,"f")}getPort(){return e}},n=new WeakMap,i=new WeakMap,r};var Bo={},Go={};Object.defineProperty(Go,"__esModule",{value:!0}),Go.BaseEnvironment=void 0;const Wo=vr();Go.BaseEnvironment=class{async getViewWindowIdentity(e,t){const{identity:n}=await e.View.wrapSync(t).getCurrentWindow();return n}async getInteropInfo(e){const t=await e.Application.getCurrentSync().getInfo().catch((()=>null)),n=t?.initialOptions?.interopBrokerConfiguration??{};return{fdc3Version:t?(0,Wo.getDefaultViewFdc3VersionFromAppInfo)(t):void 0,...n,fdc3Info:{providerVersion:await e.System.getVersion(),provider:"OpenFin"}}}},Object.defineProperty(Bo,"__esModule",{value:!0});var Ho=Bo.BrowserEnvironment=void 0;const No=Go;class Do extends No.BaseEnvironment{constructor(){super(...arguments),this.type="other",this.getRandomId=()=>{const e=new Uint32Array(1);return window.crypto.getRandomValues(e)[0].toString(32)}}getAdapterVersionSync(){return""}observeBounds(e,t){throw new Error("Method not implemented.")}layoutAllowedInContext(e){return!1}initLayoutManager(e,t,n){throw new Error("Method not implemented.")}applyLayoutSnapshot(e,t,n){throw new Error("Method not implemented.")}createLayout(e,t){throw new Error("Method not implemented.")}destroyLayout(e,t){throw new Error("Method not implemented.")}resolveLayout(e,t){throw new Error("Method not implemented.")}initPlatform(...e){throw new Error("Method not implemented.")}writeToken(e,t){return Promise.resolve("")}retrievePort(e){throw new Error("Method not implemented.")}getNextMessageId(){return this.getRandomId()}createChildContent(e){throw new Error("Method not implemented.")}getWebWindow(e){throw new Error("Method not implemented.")}getCurrentEntityIdentity(){throw new Error("Method not implemented.")}getCurrentEntityType(){return"external connection"}raiseEvent(e,t){throw new Error("Method not implemented.")}getUrl(){return location.href}getDefaultChannelOptions(){return{create:{},connect:{}}}getRtcPeer(){return new RTCPeerConnection}getWsConstructor(){return WebSocket}whenReady(){return Promise.resolve()}}Ho=Bo.BrowserEnvironment=Do;const Uo=e=>"platform"in e&&void 0!==e.platform;var Vo,zo;class Ko extends Ho{constructor(e){super(),this.connectConfig=e,Vo.set(this,void 0),zo.set(this,new W((async()=>Promise.resolve().then((function(){return __webpack_require__(/*! ./main-b14f67c9.js */ "../../node_modules/@openfin/core-web/out/main-b14f67c9.js")}))))),Uo(e)&&this.validatePlatformOptions(e)}getAdapterVersionSync(){return"0.39.21"}validatePlatformOptions({platform:e}){if(!("layoutSnapshot"in e))throw new Error("Platform options are missing layoutSnapshot. Please provide a layoutSnapshot in the platform options.");if("windows"in e||"windows"in e.layoutSnapshot)throw new Error("It appears you tried to call connect() with a snapshot object from an OpenFin desktop environment. Note that connect() expects to be called with a platform property with this structure: { platform: { layoutSnapshot } }. To get a layoutSnapshot of the expected structure, use fin.Platform.Layout.getCurrentLayoutManagerSync().getLayoutSnapshot() in v34+ in your desktop environment.");const{layouts:t}=e.layoutSnapshot;Object.entries(t).map((([e,t])=>{if("object"!=typeof t||null===t)throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must be an object.`);if(!("content"in t))throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must contain a 'content' property.`)}))}async getInteropInfo(e){return{...{contextGroups:void 0,logging:{beforeAction:{enabled:!1},afterAction:{enabled:!1}}},fdc3Version:void 0,fdc3Info:{providerVersion:"0.39.21",provider:"OpenFin Web"}}}layoutAllowedInContext(e){return!0}async initLayoutManager(e,t,n){if(Lo(this,Vo,"f"))throw new Error("Layout already initialized.");if(!Uo(this.connectConfig))throw new Error("Platform options are missing from connection config.");const{WebLayoutEntryPoint:i}=await Lo(this,zo,"f").getValue();return To(this,Vo,new i(this.connectConfig),"f"),await Lo(this,Vo,"f").initLayoutManager(e,t,n)}async applyLayoutSnapshot(e,t,n){Lo(this,Vo,"f")?.applyLayoutSnapshot(e,t,n)}async createLayout(e,t){return Lo(this,Vo,"f")?.createLayout(e,t)}async destroyLayout(e,t){return Lo(this,Vo,"f")?.destroyLayout(e,t)}async getViewWindowIdentity(e,t){return Promise.resolve({uuid:t.uuid,name:t.uuid})}}Vo=new WeakMap,zo=new WeakMap;const qo=()=>{const e=((e,t)=>{const n=new RegExp(`^${t}<(?.*)>$`).exec(e)?.groups?.meta;if(n)try{return JSON.parse(atob(n))}catch(e){throw new Error(`Failed to decode JSON from ${n}.`)}})(window.name,"of-frame");if(e)try{const{name:t,uuid:n,brokerUrl:i,providerId:r,contextGroup:o}=e;return Fo(i,"brokerUrl"),Fo(n,"uuid"),Fo(t,"name"),{identity:{name:t,uuid:n},brokerUrl:i,interopConfig:{providerId:r,currentContextGroup:o}}}catch(e){throw new Error(`Unexpected error occurred when inferring platform information: ${e.stack}`)}},Jo=()=>{const e=r.v4();return{uuid:e,name:e}},Yo=async e=>{if("enabled"===e.connectionInheritance){const t=await(async e=>{const t=qo();if(t){const{validateOptions:n=(()=>!0)}=e,{identity:i,...r}=t;if(!await n(r))throw new Error("Parent options were rejected by validateOptions.");return t}})(e);if(t)return t}if(!e.options){const t="enabled"===e.connectionInheritance?"Broker URL was not specified nor provided by a platform container.":"Connection inheritance is disabled but no options were provided.";throw new Error(t)}return{...e.options,identity:Jo()}};exports.__classPrivateFieldGet=Lo,exports.__classPrivateFieldSet=To,exports.apiExposer=Gn,exports.commonjsGlobal=s,exports.connect=async t=>{try{Ro.log("Establishing connection",t);const{brokerUrl:n,identity:i,timeout:r,interopConfig:s}=await Yo(t),{workerPort:a,iframeBrokerPort:c}=await(async(e,t,n)=>{const{origin:i}=new URL(e),r=document.createElement("IFRAME");let s;r.style.display="none";try{return await new Promise(((a,c)=>{const d=e=>{if(e.source===r.contentWindow&&e.data?.topic===`ack-${jo}`){if(e.origin!==i)c(new Error(`Broker redirected to unexpected origin ${e.origin}, expected ${i}.`));else if(e.data.success){const[t,n]=e.ports;a({iframeBrokerPort:t,workerPort:n})}else c(new m(e.data));window.removeEventListener("message",d),clearTimeout(s)}};window.addEventListener("message",d),ko.log(`Connecting to broker ${e}`),r.setAttribute("src",e),r.setAttribute("name",o(t,"of-broker")),document.body.appendChild(r),ko.log("Iframe loaded, awaiting init message from iframe"),n&&(s=setTimeout((()=>{window.removeEventListener("message",d),document.body.removeChild(r),c(new Error("Worker did not initialize in time"))}),n))}))}catch(e){throw new Error(`Failed to initialise Fin Web Client. ${e.message}`,{cause:e})}})(n,i,r);Ro.log("Successfully established connection to shared worker");const d={entityType:"external connection",...i};a.start(),c.start();const h=((t,n,i)=>{const r=$o(n),o=new Ko(t),s=new Io(r,o,i);return s.connectSync(),window.Buffer=e.Buffer,new Wr(s)})(t,a,d);return s?.providerId&&(h.me.interop=h.Interop.connectSync(s.providerId),s?.currentContextGroup&&h.me.interop.joinContextGroup(s.currentContextGroup).catch((e=>{console.warn(`Error joining specified context group: ${s?.currentContextGroup}, continuing`,e)}))),{...h,me:{...h.me,identity:{uuid:h.me.uuid,name:h.me.name}}}}catch(e){throw new Error(`An error occured during web-interop connection: ${e.message}`)}},exports.decorators=Nn,exports.encodeOptions=o,exports.layout_constants=ai,exports.lazy=G; /***/ }), -/***/ "./node_modules/@openfin/core-web/out/main-b14f67c9.js": -/*!*************************************************************!*\ - !*** ./node_modules/@openfin/core-web/out/main-b14f67c9.js ***! - \*************************************************************/ +/***/ "../../node_modules/@openfin/core-web/out/main-b14f67c9.js": +/*!*****************************************************************!*\ + !*** ../../node_modules/@openfin/core-web/out/main-b14f67c9.js ***! + \*****************************************************************/ /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; -var t=__webpack_require__(/*! ./main-8cad4070.js */ "./node_modules/@openfin/core-web/out/main-8cad4070.js"),e=__webpack_require__(/*! uuid */ "../../node_modules/uuid/dist/esm-browser/index.js");__webpack_require__(/*! buffer/ */ "../../node_modules/buffer/index.js"),__webpack_require__(/*! events */ "../../node_modules/events/events.js"),__webpack_require__(/*! lodash/cloneDeep */ "../../node_modules/lodash/cloneDeep.js"),__webpack_require__(/*! lodash/isEqual */ "../../node_modules/lodash/isEqual.js");var i={},n={};Object.defineProperty(n,"__esModule",{value:!0}),n.mapValuesAsync=n.mapEntriesAsync=void 0;const o=(t,[e,i])=>({...t,[e]:i});async function s(t,e){return(await Promise.all(e.map((async([e,i])=>[e,await t(i,e)])))).reduce(o,{})}n.mapEntriesAsync=s,n.mapValuesAsync=async function(t,e){let i;return i=e instanceof Map?[...e.entries()]:Object.entries(e),s(t,i)};var r,a,l,h,d=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldSet||function(t,e,i,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(t,i):o?o.value=i:e.set(t,i),i},c=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldGet||function(t,e,i,n){if("a"===i&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?n:"a"===i?n.call(t):n?n.value:e.get(t)};Object.defineProperty(i,"__esModule",{value:!0});var m=i.DefaultLayoutManager=void 0;const u=n;class p{constructor(t){a.set(this,void 0),l.set(this,new Map),d(this,a,t,"f")}size(){return c(this,l,"f").size}async applyLayoutSnapshot({layouts:t}){if(Object.keys(t).length>1)throw new Error("[LayoutManager] Tried to call applyLayoutSnapshot with more than 1 layout. When implementing multiple layouts via overridden LayoutManager class, you must override and fully implement the applyLayoutSnapshot method without calling super.applyLayoutSnapshot().");const[[e,i]]=Object.entries(t);await p.createLayout(this,{layoutName:e,layout:i})}async showLayout({layoutName:t}){}async getLayoutSnapshot(){return{layouts:await(0,u.mapValuesAsync)((t=>t.getFrameSnapshot()),c(this,l,"f"))}}async removeLayout({layoutName:t}){}getLayoutIdentityForView(t){const e=[...c(this,l,"f").values()].find((e=>e.getCurrentViews().some((e=>e.name===t.name&&e.uuid===t.uuid))));return e?.identity??void 0}isLayoutVisible({layoutName:t}){return c(p,r,"m",h).call(p,this,t).isVisible()}resolveLayoutIdentity(t){if(t&&"layoutName"in t)return t;const e=[...c(this,l,"f").values()];if(1===e.length)return e[0].identity;const i=e.find((t=>t.isVisible()));return i?.identity??void 0}static async resolveLayout(t,e){const i=t.resolveLayoutIdentity(e);if(void 0===i||!("layoutName"in i))throw new Error("[layout-manager] resolveLayout: Could not resolve the layout identity. Make sure you include 'layoutName' in the identity object.");return c(p,r,"m",h).call(p,t,i.layoutName)}static async handleSharedView(t,e,i){await(0,u.mapValuesAsync)((async t=>{if(t.identity.layoutName!==e.layoutName){const e=t.getCurrentViews().find((t=>t.name===i.name));e&&await t.onViewDetached({viewIdentity:e,target:null}).catch(console.error)}}),c(t,l,"f"))}static async handleLastViewRemoved(t,e){await t.removeLayout(e),await c(t,a,"f").handleLastViewRemoved(t)}static async destroyLayout(t,{layoutName:e}){await c(p,r,"m",h).call(p,t,e).destroy(),c(t,l,"f").delete(e)}static async createLayout(t,e){const{layoutName:i}=e;if(c(t,l,"f").has(i))throw new Error(`Layout name ${i} already exists`);await c(t,a,"f").createLayout(e,t)}static registerLayout(t,e,i){c(t,l,"f").set(e,i)}static getAllLayouts(t){return[...c(t,l,"f").values()]}static setInitialSnapshot(t,e){c(t,a,"f").setInitialSnapshot(e)}static createClosedConstructor(...t){return class extends p{constructor(){super(...t)}}}}m=i.DefaultLayoutManager=p,r=p,a=new WeakMap,l=new WeakMap,h=function(t,e){const i=c(t,l,"f").get(e);if(!i)throw new Error(`[layout-manager] getLayoutByName: Could not locate layout with name '${e}'`);return i};var g={},f={},v={};Object.defineProperty(v,"__esModule",{value:!0}),v.ReversibleMap=void 0;v.ReversibleMap=class{constructor(){this.valueToKey=new Map,this.keyToValue=new Map,this.setUnique=(t,e)=>{if(this.hasKey(t)||this.hasValue(e))throw new Error("Key or value already in the map.");this.keyToValue.set(t,e),this.valueToKey.set(e,t)},this.getKey=t=>{const e=this.valueToKey.get(t);if(!e)throw new Error("Value not found in the map.");return e},this.deleteKey=t=>{const e=this.getValue(t);return this.keyToValue.delete(t),this.valueToKey.delete(e),e},this.deleteValue=t=>{const e=this.getKey(t);return this.keyToValue.delete(e),this.valueToKey.delete(t),e},this.hasKey=t=>this.keyToValue.has(t),this.hasValue=t=>this.valueToKey.has(t)}getValue(t){const e=this.keyToValue.get(t);if(!e)throw new Error("Key not found in the map.");return e}},Object.defineProperty(f,"__esModule",{value:!0});var _=f.LayoutContentCache=void 0;const y=t.lazy,C=v;class w{constructor(){this.contentItemCache=new C.ReversibleMap,this.contentItemCacheId=0,this.createCacheKey=()=>{const t=`entity-${this.contentItemCacheId.toString()}`;return this.contentItemCacheId+=1,t},this.hasKey=t=>this.contentItemCache.hasKey(t),this.getItemOrUndefined=t=>{try{return this.getContentItemOrThrow(t)}catch(t){return}},this.getContentItemOrThrow=(t,e)=>{if(!this.contentItemCache.hasKey(t))throw new Error("Layout component has been destroyed or detached from the current layout.");const i=this.contentItemCache.getValue(t);if(e&&!e.includes(i.type))throw new Error(`Layout item is not the expected type. Expected ${e.join(", ")}, got ${i.type}.`);return i},this.getOrCreateEntityId=t=>{if(this.contentItemCache.hasValue(t))return this.contentItemCache.getKey(t);t.onDestroyed((()=>{this.contentItemCache.deleteValue(t)}));const e=this.createCacheKey();return this.contentItemCache.setUnique(e,t),e}}static getSingleInstance(){return w.singleton.getValue()}}_=f.LayoutContentCache=w,w.singleton=new y.Lazy((()=>new w));var I={},b={};!function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.getAdjacentStacks=t.doShareEdge=t.getAdjacentItem=void 0;t.getAdjacentItem=(e,i)=>{const{parent:n}=e;if(e.isRoot()||!n)return;const o=["top","bottom"].includes(i)?"column":"row",s=["top","left"].includes(i)?-1:1;if(n.type===o){const t=n.contentItems.indexOf(e)+s;if(t>=0&&t{const n=t.getBounds(),o=e.getBounds();if(!n||!o)return!1;if(["top","bottom"].includes(i)){return!(n.righto.right)}return!(n.bottomo.bottom)};t.getAdjacentStacks=(e,i)=>{const n=["top","bottom"].includes(i)?"row":"column",o=s=>"stack"===s.type?(0,t.doShareEdge)(e,s,i)?[s]:[]:"root"===s.type||"ground"===s.type?[]:s.type===n?s.contentItems.map((t=>o(t))).flat():s.type!==n?["top","right"].includes(i)?o(s.contentItems[s.contentItems.length-1]):o(s.contentItems[0]):[],s=(0,t.getAdjacentItem)(e,i);return s?o(s):[]}}(b);var S=t.commonjsGlobal&&t.commonjsGlobal.__decorate||function(t,e,i,n){var o,s=arguments.length,r=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(s<3?o(r):s>3?o(e,i,r):o(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};Object.defineProperty(I,"__esModule",{value:!0}),I.LayoutEntitiesController=void 0;const E=t.decorators,x=b,L=i;class z{constructor(t,e,i){this.wire=t,this.layoutManager=e,this.layoutContentCache=i,this.analytics=t=>{this.wire.sendAction(`layout-controller-${t}`).catch((()=>{}))},this.getLayoutIdentityForViewOrThrow=async t=>{const e=this.layoutManager.getLayoutIdentityForView(t);if(!e)throw new Error(`View identity ${t.name} is not attached to any layouts.`);return e},this.getRoot=async t=>{this.analytics("get-root");const e=(await this.getLayout(t)).getRoot();return{type:e.type,entityId:this.layoutContentCache.getOrCreateEntityId(e)}},this.getStackByView=async t=>{this.analytics("get-stack-by-view");const e=await this.getLayoutIdentityForViewOrThrow(t),i=(await this.getLayout(e)).getStackByView(t);if("stack"===i?.type)return{entityId:this.layoutContentCache.getOrCreateEntityId(i),type:"stack"}},this.getStackViews=t=>{this.analytics("get-stack-views");return this.layoutContentCache.getContentItemOrThrow(t,["stack"]).contentItems.map((t=>({name:t.viewName,uuid:this.wire.me.uuid})))},this.isRoot=t=>{this.analytics("is-root");return this.layoutContentCache.getContentItemOrThrow(t).isRoot()},this.exists=t=>(this.analytics("exists"),this.layoutContentCache.hasKey(t)),this.addViewToStack=async(t,e,{index:i}={index:0})=>{this.analytics("add-view-to-stack");const n=this.layoutContentCache.getContentItemOrThrow(t);if(i&&i>n.contentItems.length+1)throw new Error(`Index '${i}' out of range, please exclude the index or specify a number between 0 and ${n.contentItems.length}`);const o={id:t,index:i},{identity:s}=await n.layout.platformCreateView(e,{location:o});return s},this.findViewInStack=(t,e)=>t.contentItems.find((t=>t.viewName===e.name)),this.removeViewFromStack=async(t,e)=>{this.analytics("remove-view-from-stack");const i=this.layoutContentCache.getContentItemOrThrow(t,["stack"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to remove a view ('${e.name}') which does not belong to the stack.`);await n.layout.platformCloseView(e)},this.createAdjacentStack=async(t,e,{position:i="right"}={})=>{if(this.analytics("create-adjacent-stack"),!Array.isArray(e)||0===e.length)throw new Error('The parameter "views" must be an array with at least 1 element.');if(!["top","bottom","left","right"].includes(i))throw new Error(`Invalid position '${i}' specified.`);const n=this.layoutContentCache.getContentItemOrThrow(t).createAdjacentStack({position:i}),o=this.layoutContentCache.getOrCreateEntityId(n);return await Promise.all(e.reverse().map((t=>this.addViewToStack(o,t)))),o},this.getAdjacentStacks=async({targetId:t,edge:e})=>{this.analytics("get-adjacent-stacks");const i=this.layoutContentCache.getContentItemOrThrow(t);return(0,x.getAdjacentStacks)(i,e).map((t=>({entityId:this.layoutContentCache.getOrCreateEntityId(t)})))},this.setStackActiveView=async(t,e)=>{this.analytics("set-stack-active-view");const i=this.layoutContentCache.getContentItemOrThrow(t,["stack"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to set a view ('${e.name}') as active when it does not belong to the stack.`);i.setActiveContentItem(n,!0)}}async getLayout(t){const e=await L.DefaultLayoutManager.resolveLayout(this.layoutManager,t);if(!e)throw new Error(`Could not resolve target layout identity ${JSON.stringify(t)}`);return e}getContent(t){this.analytics("get-content");return this.layoutContentCache.getContentItemOrThrow(t,["column","row"]).contentItems.map((t=>({type:t.type,entityId:this.layoutContentCache.getOrCreateEntityId(t)})))}getParent(t){this.analytics("get-parent");const e=this.layoutContentCache.getContentItemOrThrow(t);if(!e.isRoot())return e.parent?.contentItems.includes(e)?{type:e.parent.type,entityId:this.layoutContentCache.getOrCreateEntityId(e.parent)}:void 0}}S([(0,E.expose)()],z.prototype,"getLayoutIdentityForViewOrThrow",void 0),S([(0,E.expose)()],z.prototype,"getRoot",void 0),S([(0,E.expose)()],z.prototype,"getStackByView",void 0),S([(0,E.expose)()],z.prototype,"getStackViews",void 0),S([(0,E.expose)()],z.prototype,"getContent",null),S([(0,E.expose)()],z.prototype,"getParent",null),S([(0,E.expose)()],z.prototype,"isRoot",void 0),S([(0,E.expose)()],z.prototype,"exists",void 0),S([(0,E.expose)()],z.prototype,"addViewToStack",void 0),S([(0,E.expose)()],z.prototype,"removeViewFromStack",void 0),S([(0,E.expose)()],z.prototype,"createAdjacentStack",void 0),S([(0,E.expose)()],z.prototype,"getAdjacentStacks",void 0),S([(0,E.expose)()],z.prototype,"setStackActiveView",void 0),I.LayoutEntitiesController=z,Object.defineProperty(g,"__esModule",{value:!0});var M=g.initLayoutEndpoints=void 0;const P=t.apiExposer,T=t.layout_constants,A=f,k=I,D=i;M=g.initLayoutEndpoints=async function(t,e){const i=t.getFin(),n=await i.Platform.getCurrentSync().getClient(),o=new P.ChannelsExposer(n);await new P.ApiExposer(o).exposeInstance(new k.LayoutEntitiesController(t,e,A.LayoutContentCache.getSingleInstance()),{id:T.LAYOUT_CONTROLLER_ID}),await async function(t,e){const i=t=>async i=>{const n=await D.DefaultLayoutManager.resolveLayout(e,i.target);if(!n)throw new Error(`Could not resolve the layout target from payload ${JSON.stringify(i)}`);return t(n,i)},n=(e,n)=>{t.register(e,i(n))},o=(t,e)=>{n(t,e)};n("replace-view",((t,e)=>t.replaceView(e))),n("replace-layout",((t,{layout:e})=>t.replaceLayout(e))),n("add-view",((t,e)=>t.insertView(e))),o("layout-add-view",((t,{viewOptions:e,location:i,targetView:n})=>t.platformCreateView(e,{location:i,targetView:n}))),n("close-view",((t,e)=>t.cleanupView(e.viewIdentity))),o("layout-close-view",((t,e)=>t.platformCloseView(e.viewIdentity))),n("apply-preset-layout",((t,e)=>t.applyPreset(e))),n("get-layout-views",(t=>t.getCurrentViews())),n("get-frame-snapshot",(t=>t.getFrameSnapshot())),n("is-visible",(t=>t.isVisible())),n("destroy",(t=>t.destroy())),t.register("get-layout-snapshot",(()=>e.getLayoutSnapshot()))}(n,e)};var R={};Object.defineProperty(R,"__esModule",{value:!0});var U=R.BaseLayout=void 0;U=R.BaseLayout=class{};var O={};Object.defineProperty(O,"__esModule",{value:!0});var V=O.DOMEmitter=void 0;V=O.DOMEmitter=class{constructor(t){this.container=t}dispatchLocalEvent(t,e){const i={...e,type:t,tabSelector:`tab-${e.name}`,containerSelector:`container-${e.name}`,topic:"openfin-DOM-event"};this.container.dispatchEvent(new CustomEvent(t,{detail:i}))}};var B={};Object.defineProperty(B,"__esModule",{value:!0});var H=B.mapLayoutContentItemsImmutableSync=B.mapLayoutContentItemsImmutable=W=B.isVisible=void 0;var W=B.isVisible=t=>(0!==t.offsetWidth||0!==t.offsetHeight)&&"hidden"!==window.getComputedStyle(t).visibility&&t.offsetTop>=0&&t.offsetLeft>=0&&t.offsetTop<=window.innerHeight&&t.offsetLeft<=window.innerWidth;const F=t=>"type"in t&&"component"===t.type;B.mapLayoutContentItemsImmutable=async function t(e,i){return F(i)?e(i):{...i,content:await Promise.all(i.content?.map((i=>t(e,i))))}},H=B.mapLayoutContentItemsImmutableSync=function t(e,i){return F(i)?e(i):{...i,content:i.content?.map((i=>t(e,i)))}};class N extends Error{constructor(t,e){super(e),this.type=t}}class G extends N{constructor(t,e){super("Configuration",t),this.node=e}}class j extends N{constructor(t){super("PopoutBlocked",t)}}class $ extends N{constructor(t){super("API",t)}}class Z extends N{constructor(t){super("Bind",t)}}class q extends Error{constructor(t,e,i){super(`${t}: ${e}${void 0===i?"":": "+i}`)}}class X extends q{constructor(t,e){super("Assert",t,e)}}class Y extends q{constructor(t,e,i){super("UnreachableCase",t,`${e}${void 0===i?"":": "+i}`)}}class K extends q{constructor(t,e){super("UnexpectedNull",t,e)}}class J extends q{constructor(t,e){super("UnexpectedUndefined",t,e)}}var Q;!function(t){let e=!1;const i={PopoutCannotBeCreatedWithGroundItemConfig:{id:0,default:"Popout cannot be created with ground ItemConfig"},PleaseRegisterAConstructorFunction:{id:1,default:"Please register a constructor function"},ComponentTypeNotRegisteredAndBindComponentEventHandlerNotAssigned:{id:2,default:"Component type not registered and BindComponentEvent handler not assigned"},ComponentIsAlreadyRegistered:{id:3,default:"Component is already registered"},ComponentIsNotVirtuable:{id:4,default:"Component is not virtuable. Requires rootHtmlElement field/getter"},VirtualComponentDoesNotHaveRootHtmlElement:{id:5,default:'Virtual component does not have getter "rootHtmlElement"'},ItemConfigIsNotTypeComponent:{id:6,default:"ItemConfig is not of type component"},InvalidNumberPartInSizeString:{id:7,default:"Invalid number part in size string"},UnknownUnitInSizeString:{id:8,default:"Unknown unit in size string"},UnsupportedUnitInSizeString:{id:9,default:"Unsupported unit in size string"}};t.idCount=Object.keys(i).length;const n=Object.values(i);t.checkInitialise=function(){if(!e)for(let e=0;e="0"&&t<="9"}function Tt(t,e){const i=zt(e);t.style.width=i}function At(t,e){const i=zt(e);t.style.height=i}function kt(t){return{width:t.offsetWidth,height:t.offsetHeight}}function Dt(t,e){t.style.display=e?"":"none"}function Rt(t,e){if(void 0!==e)for(const i in e)if(e.hasOwnProperty(i)){const n=e[i],o=t[i];t[i]=Ut(o,n)}return t}function Ut(t,e){if("object"!=typeof e)return e;if(Array.isArray(e)){const t=e.length,i=new Array(t);for(let n=0;n36)throw new Error("Too many keys in config minifier map")},t.translateObject=n}(dt||(dt={})),function(t){t.defaults={type:at.ground,content:[],size:1,sizeUnit:ht.Fractional,minSize:void 0,minSizeUnit:ht.Pixel,id:"",isClosable:!0},t.createCopy=function(t,e){switch(t.type){case at.ground:case at.row:case at.column:return gt.createCopy(t,e);case at.stack:return ut.createCopy(t,e);case at.component:return pt.createCopy(t);default:throw new Y("CICC91354",t.type,"Invalid Config Item type specified")}},t.createDefault=function(t){switch(t){case at.ground:throw new X("CICCDR91562");case at.row:case at.column:return gt.createDefault(t);case at.stack:return ut.createDefault();case at.component:return pt.createDefault();default:throw new Y("CICCDD91563",t,"Invalid Config Item type specified")}},t.isComponentItem=function(t){return t.type===at.component},t.isStackItem=function(t){return t.type===at.stack},t.isGroundItem=function(t){return t.type===at.ground}}(ct||(ct={})),function(t){t.defaultMaximised=!1,function(t){t.createCopy=function(t,e){return void 0===t?void 0:{show:null!=e?e:t.show,popout:t.popout,close:t.close,maximise:t.maximise,minimise:t.minimise,tabDropdown:t.tabDropdown}}}(t.Header||(t.Header={}))}(mt||(mt={})),function(t){function e(t){const e=t.length,i=new Array(e);for(let n=0;n"__glMaximised"===t));t>0&&(o=!0,n=n.splice(t,1)),e=n.length>0?n[0]:ct.defaults.id}else e=n;return i=void 0!==t.maximised?t.maximised:o,{id:e,maximised:i}}}(wt||(wt={})),function(t){function e(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0;return{resolved:!0,root:Et.resolve(i),openPopouts:t.resolveOpenPopouts(e.openPopouts),dimensions:t.Dimensions.resolve(e.dimensions),settings:t.Settings.resolve(e.settings),header:t.Header.resolve(e.header,e.settings,e.labels)}}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:Lt.fromResolvedArray(e.openPopouts),settings:_t.Settings.createCopy(e.settings),dimensions:t.Dimensions.fromResolved(e.dimensions),header:_t.Header.createCopy(e.header)}},t.isResolved=function(t){const e=t;return void 0!==e.resolved&&!0===e.resolved},t.resolveOpenPopouts=function(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0,{root:Et.resolve(o),openPopouts:xt.resolveOpenPopouts(e.openPopouts),dimensions:xt.Dimensions.resolve(e.dimensions),settings:xt.Settings.resolve(e.settings),header:xt.Header.resolve(e.header,e.settings,e.labels),parentId:null!==(i=e.parentId)&&void 0!==i?i:null,indexInParent:null!==(n=e.indexInParent)&&void 0!==n?n:null,window:t.Window.resolve(e.window,e.dimensions),resolved:!0}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:i(e.openPopouts),dimensions:xt.Dimensions.fromResolved(e.dimensions),settings:_t.Settings.createCopy(e.settings),header:_t.Header.createCopy(e.header),parentId:e.parentId,indexInParent:e.indexInParent,window:t.Window.fromResolved(e.window)}},t.fromResolvedArray=i}(Lt||(Lt={}));class Wt{constructor(){this._allEventSubscriptions=[],this._subscriptionsMap=new Map,this.unbind=this.removeEventListener,this.trigger=this.emit}tryBubbleEvent(t,e){}emit(t,...e){let i=this._subscriptionsMap.get(t);if(void 0!==i){i=i.slice();for(let t=0;t0){const n=e.slice();n.unshift(t);const o=this._allEventSubscriptions.slice();for(let t=0;t0?n.contentItems[0]:n,e=0);const o=this._layoutManager.createAndInitContentItem(i,t);t.addChild(o,e),this._layoutManager.layoutConfig.settings.popInOnClose?this._onClose():this.close()}createWindow(){const t=this.createUrl(),e=Math.floor(1e6*Math.random()).toString(36),i=this.serializeWindowFeatures({width:this._initialWindowSize.width,height:this._initialWindowSize.height,innerWidth:this._initialWindowSize.width,innerHeight:this._initialWindowSize.height,menubar:"no",toolbar:"no",location:"no",personalbar:"no",resizable:"yes",scrollbars:"no",status:"no"});if(this._popoutWindow=globalThis.open(t,e,i),this._popoutWindow)this._popoutWindow.addEventListener("load",(()=>this.positionWindow()),{passive:!0}),this._popoutWindow.addEventListener("beforeunload",(()=>{this._layoutManager.layoutConfig.settings.popInOnClose?this.popIn():this._onClose()}),{passive:!0}),this._checkReadyInterval=setInterval((()=>this.checkReady()),10);else if(!0===this._layoutManager.layoutConfig.settings.blockedPopoutsThrowError){throw new j("Popout blocked")}}checkReady(){if(null===this._popoutWindow)throw new K("BPCR01844");this._popoutWindow.__glInstance&&this._popoutWindow.__glInstance.isInitialised&&(this.onInitialised(),void 0!==this._checkReadyInterval&&(clearInterval(this._checkReadyInterval),this._checkReadyInterval=void 0))}serializeWindowFeatures(t){const e=[];for(const i in t)e.push(i+"="+t[i].toString());return e.join(",")}createUrl(){const t="gl-window-config-"+Ot(),e=_t.minifyConfig(this._config);try{localStorage.setItem(t,JSON.stringify(e))}catch(t){throw new Error("Error while writing to localStorage "+function(t){return t instanceof Error?t.message:"string"==typeof t?t:"Unknown Error"}(t))}const i=new URL(location.href);return i.searchParams.set("gl-window",t),i.toString()}positionWindow(){if(null===this._popoutWindow)throw new Error("BrowserPopout.positionWindow: null popoutWindow");this._popoutWindow.moveTo(this._initialWindowSize.left,this._initialWindowSize.top),this._popoutWindow.focus()}onInitialised(){this._isInitialised=!0,this.getGlInstance().on("popIn",(()=>this.popIn())),this.emit("initialised")}_onClose(){setTimeout((()=>this.emit("closed")),50)}}class Gt extends Wt{constructor(t,e,i,n){super(),this.layoutManager=t,this._parent=i,this._element=n,this._popInParentIds=[],this._type=e.type,this._id=e.id,this._isInitialised=!1,this.isGround=!1,this.isRow=!1,this.isColumn=!1,this.isStack=!1,this.isComponent=!1,this.size=e.size,this.sizeUnit=e.sizeUnit,this.minSize=e.minSize,this.minSizeUnit=e.minSizeUnit,this._isClosable=e.isClosable,this._pendingEventPropagations={},this._throttledEvents=["stateChanged"],this._contentItems=this.createContentItems(e.content)}get type(){return this._type}get id(){return this._id}set id(t){this._id=t}get popInParentIds(){return this._popInParentIds}get parent(){return this._parent}get contentItems(){return this._contentItems}get isClosable(){return this._isClosable}get element(){return this._element}get isInitialised(){return this._isInitialised}static isStack(t){return t.isStack}static isComponentItem(t){return t.isComponent}static isComponentParentableItem(t){return t.isStack||t.isGround}removeChild(t,e=!1){const i=this._contentItems.indexOf(t);if(-1===i)throw new Error("Can't remove child item. Unknown content item");if(e||this._contentItems[i].destroy(),this._contentItems.splice(i,1),this._contentItems.length>0)this.updateSize(!1);else if(!this.isGround&&!0===this._isClosable){if(null===this._parent)throw new K("CIUC00874");this._parent.removeChild(this)}}addChild(t,e,i){return null!=e||(e=this._contentItems.length),this._contentItems.splice(e,0,t),t.setParent(this),!0===this._isInitialised&&!1===t._isInitialised&&t.init(),e}replaceChild(t,e,i=!1){const n=this._contentItems.indexOf(t),o=t._element.parentNode;if(-1===n)throw new X("CIRCI23232","Can't replace child. oldChild is not child of this");if(null===o)throw new K("CIRCP23232");if(o.replaceChild(e._element,t._element),!0===i&&(t._parent=null,t.destroy()),this._contentItems[n]=e,e.setParent(this),e.size=t.size,e.sizeUnit=t.sizeUnit,e.minSize=t.minSize,e.minSizeUnit=t.minSizeUnit,null===e._parent)throw new K("CIRCNC45699");!0===e._parent._isInitialised&&!1===e._isInitialised&&e.init(),this.updateSize(!1)}remove(){if(null===this._parent)throw new K("CIR11110");this._parent.removeChild(this)}popout(){const t=Ot(),e=this.layoutManager.createPopoutFromContentItem(this,void 0,t,void 0);return this.emitBaseBubblingEvent("stateChanged"),e}calculateConfigContent(){const t=this._contentItems,e=t.length,i=new Array(e);for(let n=0;nthis.propagateEventToLayoutManager(t,e))))}propagateEventToLayoutManager(t,e){this._pendingEventPropagations[t]=!1,this.layoutManager.emitUnknown(t,e)}}class jt extends Gt{constructor(t,e,i){super(t,e,i,document.createElement("div")),this._parentItem=i,this._focused=!1,this.isComponent=!0,this._reorderEnabled=e.reorderEnabled,this.applyUpdatableConfig(e),this._initialWantMaximise=e.maximised;const n=document.createElement("div");n.classList.add("lm_content"),this.element.appendChild(n),this._container=new Ft(e,this,t,n,(t=>this.handleUpdateItemConfigEvent(t)),(()=>this.show()),(()=>this.hide()),(t=>this.focus(t)),(t=>this.blur(t)))}get componentName(){return this._container.componentType}get componentType(){return this._container.componentType}get reorderEnabled(){return this._reorderEnabled}get initialWantMaximise(){return this._initialWantMaximise}get component(){return this._container.component}get container(){return this._container}get parentItem(){return this._parentItem}get headerConfig(){return this._headerConfig}get title(){return this._title}get tab(){return this._tab}get focused(){return this._focused}destroy(){this._container.destroy(),super.destroy()}applyUpdatableConfig(t){this.setTitle(t.title),this._headerConfig=t.header}toConfig(){const t=this._container.stateRequestEvent,e=void 0===t?this._container.state:t();return{type:at.component,content:[],size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,maximised:!1,isClosable:this.isClosable,reorderEnabled:this._reorderEnabled,title:this._title,header:mt.Header.createCopy(this._headerConfig),componentType:pt.copyComponentType(this.componentType),componentState:e}}close(){if(null===this.parent)throw new K("CIC68883");this.parent.removeChild(this,!1)}enterDragMode(t,e){Tt(this.element,t),At(this.element,e),this._container.enterDragMode(t,e)}exitDragMode(){this._container.exitDragMode()}enterStackMaximised(){this._container.enterStackMaximised()}exitStackMaximised(){this._container.exitStackMaximised()}drag(){this._container.drag()}updateSize(t){this.updateNodeSize(t)}init(){this.updateNodeSize(!1),super.init(),this._container.emit("open"),this.initContentItems()}setTitle(t){this._title=t,this.emit("titleChanged",t),this.emit("stateChanged")}setTab(t){this._tab=t,this.emit("tab",t),this._container.setTab(t)}hide(){super.hide(),this._container.setVisibility(!1)}show(){super.show(),this._container.setVisibility(!0)}focus(t=!1){this.parentItem.setActiveComponentItem(this,!0,t)}setFocused(t){this._focused=!0,this.tab.setFocused(),t||this.emitBaseBubblingEvent("focus")}blur(t=!1){this._focused&&this.layoutManager.setFocusedComponentItem(void 0,t)}setBlurred(t){this._focused=!1,this.tab.setBlurred(),t||this.emitBaseBubblingEvent("blur")}setParent(t){this._parentItem=t,super.setParent(t)}handleUpdateItemConfigEvent(t){this.applyUpdatableConfig(t)}updateNodeSize(t){if("none"!==this.element.style.display){const{width:e,height:i}=kt(this.element);this._container.setSizeToNodeSize(e,i,t)}}}class $t extends Gt{constructor(){super(...arguments),this._focused=!1}get focused(){return this._focused}setFocusedValue(t){this._focused=t}}class Zt extends Wt{constructor(t,e){super(),this._eElement=t,this._pointerTracking=!1,this._pointerDownEventListener=t=>this.onPointerDown(t),this._pointerMoveEventListener=t=>this.onPointerMove(t),this._pointerUpEventListener=t=>this.onPointerUp(t),this._timeout=void 0,this._allowableTargets=[t,...e],this._oDocument=document,this._eBody=document.body,this._nDelay=1800,this._nDistance=10,this._nX=0,this._nY=0,this._nOriginalX=0,this._nOriginalY=0,this._dragging=!1,this._eElement.addEventListener("pointerdown",this._pointerDownEventListener,{passive:!0})}destroy(){this.checkRemovePointerTrackingEventListeners(),this._eElement.removeEventListener("pointerdown",this._pointerDownEventListener)}cancelDrag(){this.processDragStop(void 0)}onPointerDown(t){if(this._allowableTargets.includes(t.target)&&t.isPrimary){const e=this.getPointerCoordinates(t);this.processPointerDown(e)}}processPointerDown(t){this._nOriginalX=t.x,this._nOriginalY=t.y,this._oDocument.addEventListener("pointermove",this._pointerMoveEventListener),this._oDocument.addEventListener("pointerup",this._pointerUpEventListener,{passive:!0}),this._pointerTracking=!0,this._timeout=setTimeout((()=>{try{this.startDrag()}catch(t){throw console.error(t),t}}),this._nDelay)}onPointerMove(t){this._pointerTracking&&(this.processDragMove(t),t.preventDefault())}processDragMove(t){this._nX=t.pageX-this._nOriginalX,this._nY=t.pageY-this._nOriginalY,!1===this._dragging&&(Math.abs(this._nX)>this._nDistance||Math.abs(this._nY)>this._nDistance)&&this.startDrag(),this._dragging&&this.emit("drag",this._nX,this._nY,t)}onPointerUp(t){this.processDragStop(t)}processDragStop(t){var e;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this.checkRemovePointerTrackingEventListeners(),!0===this._dragging&&(this._eBody.classList.remove("lm_dragging"),this._eElement.classList.remove("lm_dragging"),null===(e=this._oDocument.querySelector("iframe"))||void 0===e||e.style.setProperty("pointer-events",""),this._dragging=!1,this.emit("dragStop",t))}checkRemovePointerTrackingEventListeners(){this._pointerTracking&&(this._oDocument.removeEventListener("pointermove",this._pointerMoveEventListener),this._oDocument.removeEventListener("pointerup",this._pointerUpEventListener),this._pointerTracking=!1)}startDrag(){var t;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this._dragging=!0,this._eBody.classList.add("lm_dragging"),this._eElement.classList.add("lm_dragging"),null===(t=this._oDocument.querySelector("iframe"))||void 0===t||t.style.setProperty("pointer-events","none"),this.emit("dragStart",this._nOriginalX,this._nOriginalY)}getPointerCoordinates(t){return{x:t.pageX,y:t.pageY}}}class qt{constructor(t,e,i){this._isVertical=t,this._size=e,this._grabSize=i0){const i=this.createSplitter(Math.max(0,e-1)).element;e>0?(this.contentItems[e-1].element.insertAdjacentElement("afterend",i),i.insertAdjacentElement("afterend",t.element)):(this.contentItems[0].element.insertAdjacentElement("beforebegin",i),i.insertAdjacentElement("beforebegin",t.element))}else this._childElementContainer.appendChild(t.element);super.addChild(t,e);const n=1/this.contentItems.length*100;if(!0===i)return this.emitBaseBubblingEvent("stateChanged"),e;for(let e=0;e0&&(this.calculateRelativeSizes(),this.setAbsoluteSizes()),this.emitBaseBubblingEvent("stateChanged"),this.emit("resize")}setAbsoluteSizes(){const t=this.calculateAbsoluteSizes();for(let e=0;e0&&t.itemSizes[e]++,this._isColumn?(Tt(this.contentItems[e].element,t.crossAxisSize),At(this.contentItems[e].element,t.itemSizes[e])):(Tt(this.contentItems[e].element,t.itemSizes[e]),At(this.contentItems[e].element,t.crossAxisSize))}calculateAbsoluteSizes(){const t=(this.contentItems.length-1)*this._splitterSize,{width:e,height:i}=kt(this.element);let n,o;this._isColumn?(n=i-t,o=e):(n=e-t,o=i);let s=0;const r=[];for(let t=0;t0){const n=100-t;for(let t=0;t100&&e.length>0){for(let t=0;te)return;{const r=i/e;let a=i;for(let e=0;ethis.onSplitterDrag(e,t,i))),e.on("dragStop",(()=>this.onSplitterDragStop(e))),e.on("dragStart",(()=>this.onSplitterDragStart(e))),this._splitter.splice(t,0,e),e}getSplitItems(t){const e=this._splitter.indexOf(t);return{before:this.contentItems[e],after:this.contentItems[e+1]}}calculateContentItemMinSize(t){const e=t.minSize;if(void 0!==e){if(t.minSizeUnit===ht.Pixel)return e;throw new X("ROCGMD98831",JSON.stringify(t))}{const t=this.layoutManager.layoutConfig.dimensions;return this._isColumn?t.defaultMinItemHeight:t.defaultMinItemWidth}}calculateContentItemsTotalMinSize(t){let e=0;for(const i of t)e+=this.calculateContentItemMinSize(i);return e}onSplitterDragStart(t){const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=this.calculateContentItemsTotalMinSize(e.before.contentItems),s=this.calculateContentItemsTotalMinSize(e.after.contentItems);this._splitterPosition=0,this._splitterMinPosition=-1*(i-o),this._splitterMaxPosition=n-s}onSplitterDrag(t,e,i){let n=this._isColumn?i:e;if(null===this._splitterMinPosition||null===this._splitterMaxPosition)throw new K("ROCOSD59226");n=Math.max(n,this._splitterMinPosition),n=Math.min(n,this._splitterMaxPosition),this._splitterPosition=n;const o=zt(n);this._isColumn?t.element.style.top=o:t.element.style.left=o}onSplitterDragStop(t){if(null===this._splitterPosition)throw new K("ROCOSDS66932");{const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=(this._splitterPosition+i)/(i+n),s=e.before.size+e.after.size;e.before.size=o*s,e.after.size=(1-o)*s,t.element.style.top=zt(0),t.element.style.left=zt(0),globalThis.requestAnimationFrame((()=>this.updateSize(!1)))}}}!function(t){t.getElementDimensionSize=function(t,e){return"width"===e?function(t){return t.offsetWidth}(t):function(t){return t.offsetHeight}(t)},t.setElementDimensionSize=function(t,e,i){return"width"===e?Tt(t,i):At(t,i)},t.createElement=function(t,e){const i=t.createElement("div");return i.classList.add("lm_item"),e?i.classList.add("lm_column"):i.classList.add("lm_row"),i}}(Xt||(Xt={}));class Yt extends $t{constructor(t,e,i){super(t,vt.create(e),null,Yt.createElement(document)),this.isGround=!0,this._childElementContainer=this.element,this._containerElement=i;let n=null;for(;;){const t=n?n.previousSibling:this._containerElement.lastChild;if(!(t instanceof Element&&t.classList.contains("lm_content")))break;n=t}this._containerElement.insertBefore(this.element,n)}init(){if(!0!==this.isInitialised){this.updateNodeSize();for(let t=0;t0?this.contentItems[0]:this,n.isComponent)throw new Error("Cannot add item as child to ComponentItem");{const t=this.layoutManager.createAndInitContentItem(i,n);return e=n.addChild(t,e),n===this?-1:e}}loadComponentAsRoot(t){this.clearRoot();const e=Ct.resolve(t,!1);if(e.maximised)throw new Error("Root Component cannot be maximised");{const t=new jt(this.layoutManager,e,this);t.init(),this.addChild(t,0)}}addChild(t,e){if(this.contentItems.length>0)throw new Error("Ground node can only have a single child");return this._childElementContainer.appendChild(t.element),e=super.addChild(t,e),this.updateSize(!1),this.emitBaseBubblingEvent("stateChanged"),e}calculateConfigContent(){const t=this.contentItems,e=t.length,i=new Array(e);for(let n=0;n0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e)),this.updateContentItemsSize(!1))}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}createSideAreas(){const t=Yt.Area.oppositeSides,e=new Array(Object.keys(t).length);let i=0;for(const n in t){const o=n,s=this.getElementArea();if(null===s)throw new K("RCSA77553");s.side=o,"2"===t[o][1]?s[o]=s[t[o]]-50:s[o]=s[t[o]]+50,s.surface=(s.x2-s.x1)*(s.y2-s.y1),e[i++]=s}return e}highlightDropZone(t,e,i){this.layoutManager.tabDropPlaceholder.remove(),super.highlightDropZone(t,e,i)}onDrop(t,e){if(t.isComponent){const e=ut.createDefault(),i=t;e.header=mt.Header.createCopy(i.headerConfig);const n=this.layoutManager.createAndInitContentItem(e,this);n.addChild(t),t=n}if(0===this.contentItems.length)this.addChild(t);else{if(t.type===at.row||t.type===at.column){const e=ut.createDefault(),i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}const i="x"==e.side[0]?at.row:at.column,n="2"==e.side[1],o=this.contentItems[0];if(o instanceof Xt&&o.type===i){const e=o.contentItems[n?0:o.contentItems.length-1];o.addChild(t,n?0:void 0,!0),e.size*=.5,t.size=e.size,t.sizeUnit=ht.Percent,o.updateSize(!1)}else{const e=ct.createDefault(i),s=this.layoutManager.createContentItem(e,this);this.replaceChild(o,s),s.addChild(t,n?0:void 0,!0),s.addChild(o,n?void 0:0,!0),o.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}}dock(){throw new X("GID87731")}validateDocking(){throw new X("GIVD87732")}getAllContentItems(){const t=[this];return this.deepGetAllContentItems(this.contentItems,t),t}getConfigMaximisedItems(){const t=[];return this.deepFilterContentItems(this.contentItems,t,(t=>!(!Gt.isStack(t)||!t.initialWantMaximise)||!(!Gt.isComponentItem(t)||!t.initialWantMaximise))),t}getItemsByPopInParentId(t){const e=[];return this.deepFilterContentItems(this.contentItems,e,(e=>e.popInParentIds.includes(t))),e}toConfig(){throw new Error("Cannot generate GroundItem config")}setActiveComponentItem(t,e,i){}updateNodeSize(){const{width:t,height:e}=kt(this._containerElement);Tt(this.element,t),At(this.element,e),this.contentItems.length>0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e))}deepGetAllContentItems(t,e){for(let i=0;ithis.onClick(t),this._touchStartEventListener=t=>this.onTouchStart(t),this._element=document.createElement("div"),this._element.classList.add(i),this._element.title=e,this._header.on("destroy",(()=>this.destroy())),this._element.addEventListener("click",this._clickEventListener,{passive:!0}),this._element.addEventListener("touchstart",this._touchStartEventListener,{passive:!0}),this._header.controlsContainerElement.appendChild(this._element)}get element(){return this._element}destroy(){var t;this._element.removeEventListener("click",this._clickEventListener),this._element.removeEventListener("touchstart",this._touchStartEventListener),null===(t=this._element.parentNode)||void 0===t||t.removeChild(this._element)}onClick(t){this._pushEvent(t)}onTouchStart(t){this._pushEvent(t)}}class Jt{constructor(t,e,i,n,o){var s;this._layoutManager=t,this._componentItem=e,this._closeEvent=i,this._focusEvent=n,this._dragStartEvent=o,this._isActive=!1,this._tabClickListener=t=>this.onTabClickDown(t),this._tabTouchStartListener=t=>this.onTabTouchStart(t),this._closeClickListener=()=>this.onCloseClick(),this._closeTouchStartListener=()=>this.onCloseTouchStart(),this._dragStartListener=(t,e)=>this.onDragStart(t,e),this._contentItemDestroyListener=()=>this.onContentItemDestroy(),this._tabTitleChangedListener=t=>this.setTitle(t),this._element=document.createElement("div"),this._element.classList.add("lm_tab"),this._titleElement=document.createElement("span"),this._titleElement.classList.add("lm_title"),this._closeElement=document.createElement("div"),this._closeElement.classList.add("lm_close_tab"),this._element.appendChild(this._titleElement),this._element.appendChild(this._closeElement),e.isClosable?this._closeElement.style.display="":this._closeElement.style.display="none",this.setTitle(e.title),this._componentItem.on("titleChanged",this._tabTitleChangedListener);(null!==(s=e.reorderEnabled)&&void 0!==s?s:this._layoutManager.layoutConfig.settings.reorderEnabled)&&this.enableReorder(),this._element.addEventListener("click",this._tabClickListener,{passive:!0}),this._element.addEventListener("touchstart",this._tabTouchStartListener,{passive:!0}),this._componentItem.isClosable?(this._closeElement.addEventListener("click",this._closeClickListener,{passive:!0}),this._closeElement.addEventListener("touchstart",this._closeTouchStartListener,{passive:!0})):(this._closeElement.remove(),this._closeElement=void 0),this._componentItem.setTab(this),this._layoutManager.emit("tabCreated",this)}get isActive(){return this._isActive}get componentItem(){return this._componentItem}get contentItem(){return this._componentItem}get element(){return this._element}get titleElement(){return this._titleElement}get closeElement(){return this._closeElement}get reorderEnabled(){return void 0!==this._dragListener}set reorderEnabled(t){t!==this.reorderEnabled&&(t?this.enableReorder():this.disableReorder())}setTitle(t){this._titleElement.innerText=t,this._element.title=t}setActive(t){t!==this._isActive&&(this._isActive=t,t?this._element.classList.add("lm_active"):this._element.classList.remove("lm_active"))}destroy(){var t,e;this._closeEvent=void 0,this._focusEvent=void 0,this._dragStartEvent=void 0,this._element.removeEventListener("click",this._tabClickListener),this._element.removeEventListener("touchstart",this._tabTouchStartListener),null===(t=this._closeElement)||void 0===t||t.removeEventListener("click",this._closeClickListener),null===(e=this._closeElement)||void 0===e||e.removeEventListener("touchstart",this._closeTouchStartListener),this._componentItem.off("titleChanged",this._tabTitleChangedListener),this.reorderEnabled&&this.disableReorder(),this._element.remove()}setBlurred(){this._element.classList.remove("lm_focused"),this._titleElement.classList.remove("lm_focused")}setFocused(){this._element.classList.add("lm_focused"),this._titleElement.classList.add("lm_focused")}onDragStart(t,e){if(void 0===this._dragListener)throw new J("TODSDLU10093");if(void 0===this._dragStartEvent)throw new J("TODS23309");this._dragStartEvent(t,e,this._dragListener,this.componentItem)}onContentItemDestroy(){void 0!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=void 0)}onTabClickDown(t){const e=t.target;e!==this._element&&e!==this._titleElement||(0===t.button?this.notifyFocus():1===t.button&&this._componentItem.isClosable&&this.notifyClose())}onTabTouchStart(t){t.target===this._element&&this.notifyFocus()}onCloseClick(){this.notifyClose()}onCloseTouchStart(){this.notifyClose()}notifyClose(){if(void 0===this._closeEvent)throw new J("TNC15007");this._closeEvent(this._componentItem)}notifyFocus(){if(void 0===this._focusEvent)throw new J("TNA15007");this._focusEvent(this._componentItem)}enableReorder(){this._dragListener=new Zt(this._element,[this._titleElement]),this._dragListener.on("dragStart",this._dragStartListener),this._componentItem.on("destroy",this._contentItemDestroyListener)}disableReorder(){if(void 0===this._dragListener)throw new J("TDR87745");this._componentItem.off("destroy",this._contentItemDestroyListener),this._dragListener.off("dragStart",this._dragStartListener),this._dragListener=void 0}}class Qt{constructor(t,e,i,n,o){this._layoutManager=t,this._componentRemoveEvent=e,this._componentFocusEvent=i,this._componentDragStartEvent=n,this._dropdownActiveChangedEvent=o,this._tabs=[],this._lastVisibleTabIndex=-1,this._dropdownActive=!1,this._element=document.createElement("section"),this._element.classList.add("lm_tabs"),this._dropdownElement=document.createElement("section"),this._dropdownElement.classList.add("lm_tabdropdown_list"),this._dropdownElement.style.display="none"}get tabs(){return this._tabs}get tabCount(){return this._tabs.length}get lastVisibleTabIndex(){return this._lastVisibleTabIndex}get element(){return this._element}get dropdownElement(){return this._dropdownElement}get dropdownActive(){return this._dropdownActive}destroy(){for(let t=0;tthis.handleTabCloseEvent(t)),(t=>this.handleTabFocusEvent(t)),((t,e,i,n)=>this.handleTabDragStartEvent(t,e,i,n)));void 0===e&&(e=this._tabs.length),this._tabs.splice(e,0,i),ethis._lastVisibleTabIndex){const t=this._tabs[e];for(let t=e;t>0;t--)this._tabs[t]=this._tabs[t-1];this._tabs[0]=t}}updateTabSizes(t,e){let i=!1;this.tryUpdateTabSizes(i,t,e)||(i=!0,this.tryUpdateTabSizes(i,t,e)),i!==this._dropdownActive&&(this._dropdownActive=i,this._dropdownActiveChangedEvent())}tryUpdateTabSizes(t,e,i){if(this._tabs.length>0){if(void 0===i)throw new Error("non-empty tabs must have active component item");let n=0,o=!1;const s=this._layoutManager.layoutConfig.settings.tabOverlapAllowance,r=this._tabs.indexOf(i.tab),a=this._tabs[r];this._lastVisibleTabIndex=-1;for(let i=0;ie){if(o)i===r&&(l.style.zIndex="auto",l.style.marginLeft="",l.parentElement!==this._element&&this._element.appendChild(l));else{let t;if(t=r>0&&r<=i?(d-e)/(i-1):(d-e)/i,tthis.onClick(t),this._touchStartListener=t=>this.onTouchStart(t),this._rowColumnClosable=!0,this._closeButton=null,this._popoutButton=null,this._tabsContainer=new Qt(this._layoutManager,(t=>this.handleTabInitiatedComponentRemoveEvent(t)),(t=>this.handleTabInitiatedComponentFocusEvent(t)),((t,e,i,n)=>this.handleTabInitiatedDragStartEvent(t,e,i,n)),(()=>this.processTabDropdownActiveChanged())),this._show=i.show,this._popoutEnabled=i.popoutEnabled,this._popoutLabel=i.popoutLabel,this._maximiseEnabled=i.maximiseEnabled,this._maximiseLabel=i.maximiseLabel,this._minimiseEnabled=i.minimiseEnabled,this._minimiseLabel=i.minimiseLabel,this._closeEnabled=i.closeEnabled,this._closeLabel=i.closeLabel,this._tabDropdownEnabled=i.tabDropdownEnabled,this._tabDropdownLabel=i.tabDropdownLabel,this.setSide(i.side),this._canRemoveComponent=this._configClosable,this._element=document.createElement("section"),this._element.classList.add("lm_header"),this._controlsContainerElement=document.createElement("section"),this._controlsContainerElement.classList.add("lm_controls"),this._element.appendChild(this._tabsContainer.element),this._element.appendChild(this._controlsContainerElement),this._element.appendChild(this._tabsContainer.dropdownElement),this._element.addEventListener("click",this._clickListener,{passive:!0}),this._element.addEventListener("touchstart",this._touchStartListener,{passive:!0}),this._documentMouseUpListener=()=>this._tabsContainer.hideAdditionalTabsDropdown(),globalThis.document.addEventListener("mouseup",this._documentMouseUpListener,{passive:!0}),this._tabControlOffset=this._layoutManager.layoutConfig.settings.tabControlOffset,this._tabDropdownEnabled&&(this._tabDropdownButton=new Kt(this,this._tabDropdownLabel,"lm_tabdropdown",(()=>this._tabsContainer.showAdditionalTabsDropdown()))),this._popoutEnabled&&(this._popoutButton=new Kt(this,this._popoutLabel,"lm_popout",(()=>this.handleButtonPopoutEvent()))),this._maximiseEnabled&&(this._maximiseButton=new Kt(this,this._maximiseLabel,"lm_maximise",(t=>this.handleButtonMaximiseToggleEvent(t)))),this._configClosable&&(this._closeButton=new Kt(this,this._closeLabel,"lm_close",(()=>s()))),this.processTabDropdownActiveChanged()}get show(){return this._show}get side(){return this._side}get leftRightSided(){return this._leftRightSided}get layoutManager(){return this._layoutManager}get parent(){return this._parent}get tabs(){return this._tabsContainer.tabs}get lastVisibleTabIndex(){return this._tabsContainer.lastVisibleTabIndex}get element(){return this._element}get tabsContainerElement(){return this._tabsContainer.element}get controlsContainerElement(){return this._controlsContainerElement}destroy(){this.emit("destroy"),this._popoutEvent=void 0,this._maximiseToggleEvent=void 0,this._clickEvent=void 0,this._touchStartEvent=void 0,this._componentRemoveEvent=void 0,this._componentFocusEvent=void 0,this._componentDragStartEvent=void 0,this._tabsContainer.destroy(),globalThis.document.removeEventListener("mouseup",this._documentMouseUpListener),this._element.remove()}createTab(t,e){this._tabsContainer.createTab(t,e)}removeTab(t){this._tabsContainer.removeTab(t)}processActiveComponentChanged(t){this._tabsContainer.processActiveComponentChanged(t),this.updateTabSizes()}setSide(t){this._side=t,this._leftRightSided=[nt.right,nt.left].includes(this._side)}setRowColumnClosable(t){this._rowColumnClosable=t,this.updateClosability()}updateClosability(){let t;if(this._configClosable)if(this._rowColumnClosable){t=!0;const e=this.tabs.length;for(let i=0;i1}applyFocusedValue(t){t?this._element.classList.add("lm_focused"):this._element.classList.remove("lm_focused")}processMaximised(){if(void 0===this._maximiseButton)throw new J("HPMAX16997");this._maximiseButton.element.setAttribute("title",this._minimiseLabel)}processMinimised(){if(void 0===this._maximiseButton)throw new J("HPMIN16997");this._maximiseButton.element.setAttribute("title",this._maximiseLabel)}updateTabSizes(){if(this._tabsContainer.tabCount>0){const t=this._show?this._layoutManager.layoutConfig.dimensions.headerHeight:0;let e;this._leftRightSided?(this._element.style.height="",this._element.style.width=zt(t)):(this._element.style.width="",this._element.style.height=zt(t)),e=this._leftRightSided?this._element.offsetHeight-this._controlsContainerElement.offsetHeight-this._tabControlOffset:this._element.offsetWidth-this._controlsContainerElement.offsetWidth-this._tabControlOffset,this._tabsContainer.updateTabSizes(e,this._getActiveComponentItemEvent())}}handleTabInitiatedComponentRemoveEvent(t){if(this._canRemoveComponent){if(void 0===this._componentRemoveEvent)throw new J("HHTCE22294");this._componentRemoveEvent(t)}}handleTabInitiatedComponentFocusEvent(t){if(void 0===this._componentFocusEvent)throw new J("HHTAE22294");this._componentFocusEvent(t)}handleTabInitiatedDragStartEvent(t,e,i,n){if(this._canRemoveComponent){if(void 0===this._componentDragStartEvent)throw new J("HHTDSE22294");this._componentDragStartEvent(t,e,i,n)}else i.cancelDrag()}processTabDropdownActiveChanged(){void 0!==this._tabDropdownButton&&Dt(this._tabDropdownButton.element,this._tabsContainer.dropdownActive)}handleButtonPopoutEvent(){if(this._layoutManager.layoutConfig.settings.popoutWholeStack){if(void 0===this._popoutEvent)throw new J("HHBPOE17834");this._popoutEvent()}else{const t=this._getActiveComponentItemEvent();t&&t.popout()}}handleButtonMaximiseToggleEvent(t){if(void 0===this._maximiseToggleEvent)throw new J("HHBMTE16834");this._maximiseToggleEvent()}onClick(t){t.target===this._element&&this.notifyClick(t)}onTouchStart(t){t.target===this._element&&this.notifyTouchStart(t)}notifyClick(t){if(void 0===this._clickEvent)throw new J("HNHC46834");this._clickEvent(t)}notifyTouchStart(t){if(void 0===this._touchStartEvent)throw new J("HNHTS46834");this._touchStartEvent(t)}}class ee extends $t{constructor(t,e,i){var n,o,s,r,a,l,h,d,c,m,u,p,g,f,v,_,y,C,w;super(t,e,i,ee.createElement(document)),this._headerSideChanged=!1,this._resizeListener=()=>this.handleResize(),this._maximisedListener=()=>this.handleMaximised(),this._minimisedListener=()=>this.handleMinimised(),this._headerConfig=e.header;const I=t.layoutConfig.header,b=e.content;let S;if(1!==b.length)S=void 0;else{S=b[0].header}this._initialWantMaximise=e.maximised,this._initialActiveItemIndex=null!==(n=e.activeItemIndex)&&void 0!==n?n:0;const E=null!==(r=null!==(s=null===(o=this._headerConfig)||void 0===o?void 0:o.show)&&void 0!==s?s:null==S?void 0:S.show)&&void 0!==r?r:I.show,x=null!==(h=null!==(l=null===(a=this._headerConfig)||void 0===a?void 0:a.popout)&&void 0!==l?l:null==S?void 0:S.popout)&&void 0!==h?h:I.popout,L=null!==(m=null!==(c=null===(d=this._headerConfig)||void 0===d?void 0:d.maximise)&&void 0!==c?c:null==S?void 0:S.maximise)&&void 0!==m?m:I.maximise,z=null!==(g=null!==(p=null===(u=this._headerConfig)||void 0===u?void 0:u.close)&&void 0!==p?p:null==S?void 0:S.close)&&void 0!==g?g:I.close,M=null!==(_=null!==(v=null===(f=this._headerConfig)||void 0===f?void 0:f.minimise)&&void 0!==v?v:null==S?void 0:S.minimise)&&void 0!==_?_:I.minimise,P=null!==(w=null!==(C=null===(y=this._headerConfig)||void 0===y?void 0:y.tabDropdown)&&void 0!==C?C:null==S?void 0:S.tabDropdown)&&void 0!==w?w:I.tabDropdown;this._maximisedEnabled=!1!==L;const T={show:!1!==E,side:!1===E?nt.top:E,popoutEnabled:!1!==x,popoutLabel:!1===x?"":x,maximiseEnabled:this._maximisedEnabled,maximiseLabel:!1===L?"":L,closeEnabled:!1!==z,closeLabel:!1===z?"":z,minimiseEnabled:!0,minimiseLabel:M,tabDropdownEnabled:!1!==P,tabDropdownLabel:!1===P?"":P};this._header=new te(t,this,T,e.isClosable&&!1!==z,(()=>this.getActiveComponentItem()),(()=>this.remove()),(()=>this.handlePopoutEvent()),(()=>this.toggleMaximise()),(t=>this.handleHeaderClickEvent(t)),(t=>this.handleHeaderTouchStartEvent(t)),(t=>this.handleHeaderComponentRemoveEvent(t)),(t=>this.handleHeaderComponentFocusEvent(t)),((t,e,i,n)=>this.handleHeaderComponentStartDragEvent(t,e,i,n))),this.isStack=!0,this._childElementContainer=document.createElement("section"),this._childElementContainer.classList.add("lm_items"),this.on("resize",this._resizeListener),this._maximisedEnabled&&(this.on("maximised",this._maximisedListener),this.on("minimised",this._minimisedListener)),this.element.appendChild(this._header.element),this.element.appendChild(this._childElementContainer),this.setupHeaderPosition(),this._header.updateClosability()}get childElementContainer(){return this._childElementContainer}get header(){return this._header}get headerShow(){return this._header.show}get headerSide(){return this._header.side}get headerLeftRightSided(){return this._header.leftRightSided}get contentAreaDimensions(){return this._contentAreaDimensions}get initialWantMaximise(){return this._initialWantMaximise}get isMaximised(){return this===this.layoutManager.maximisedStack}get stackParent(){if(!this.parent)throw new Error("Stack should always have a parent");return this.parent}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}init(){if(!0===this.isInitialised)return;this.updateNodeSize();for(let t=0;t0){if(this._initialActiveItemIndex<0||this._initialActiveItemIndex>=e)throw new Error(`ActiveItemIndex out of range: ${this._initialActiveItemIndex} id: ${this.id}`);for(let i=0;ithis.contentItems.length)throw e-=1,new X("SAC99728");if(t instanceof jt)return e=super.addChild(t,e),this._childElementContainer.appendChild(t.element),this._header.createTab(t,e),this.setActiveComponentItem(t,i),this._header.updateTabSizes(),this.updateSize(!1),t.container.setBaseLogicalZIndex(),this._header.updateClosability(),this.emitStateChangedEvent(),e;throw new X("SACC88532")}removeChild(t,e){const i=t,n=this.contentItems.indexOf(i),o=1===this.contentItems.length;if(this._activeComponentItem===i&&(i.focused&&i.blur(),!o)){const t=0===n?1:n-1;this.setActiveComponentItem(this.contentItems[t],!1)}this._header.removeTab(i),super.removeChild(i,e),o||this._header.updateClosability(),this.emitStateChangedEvent()}toggleMaximise(){this.isMaximised?this.minimise():this.maximise()}maximise(){if(!this.isMaximised){this.layoutManager.setMaximisedStack(this);const t=this.contentItems,e=t.length;for(let i=0;i0&&void 0===t)throw new Error("expected non-empty stack to have an active component item");return{type:"stack",content:this.calculateConfigContent(),size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,isClosable:this.isClosable,maximised:this.isMaximised,header:this.createHeaderConfig(),activeItemIndex:t}}onDrop(t,e){if("header"===this._dropSegment){if(this.resetHeaderDropZone(),void 0===this._dropIndex)throw new J("SODDI68990");return void this.addChild(t,this._dropIndex)}if("body"===this._dropSegment)return void this.addChild(t,0,!0);const i="top"===this._dropSegment||"bottom"===this._dropSegment,n="left"===this._dropSegment||"right"===this._dropSegment,o="top"===this._dropSegment||"left"===this._dropSegment,s=i&&this.stackParent.isColumn||n&&this.stackParent.isRow;if(t.isComponent){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createAndInitContentItem(e,this);i.addChild(t),t=i}if(t.type===at.row||t.type===at.column){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}if(s){const e=this.stackParent.contentItems.indexOf(this);this.stackParent.addChild(t,o?e:e+1,!0),this.size*=.5,t.size=this.size,t.sizeUnit=this.sizeUnit,this.stackParent.updateSize(!1)}else{const e=i?at.column:at.row,n=ct.createDefault(e),s=this.layoutManager.createContentItem(n,this);this.stackParent.replaceChild(this,s),s.addChild(t,o?0:void 0,!0),s.addChild(this,o?void 0:0,!0),this.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}highlightDropZone(t,e){for(const i in this._contentAreaDimensions){const n=i,o=this._contentAreaDimensions[n].hoverArea;if(o.x1t&&o.y1e)return void("header"===n?(this._dropSegment="header",this.highlightHeaderDropZone(this._header.leftRightSided?e:t)):(this.resetHeaderDropZone(),this.highlightBodyDropZone(n)))}}getArea(){if("none"===this.element.style.display)return null;const t=super.getElementArea(this._header.element),e=super.getElementArea(this._childElementContainer);if(null===t||null===e)throw new K("SGAHC13086");const i=e.x2-e.x1,n=e.y2-e.y1;return this._contentAreaDimensions={header:{hoverArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2},highlightArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2}}},0===this.contentItems.length?(this._contentAreaDimensions.body={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2}},super.getElementArea(this.element)):(this._contentAreaDimensions.left={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x1+.25*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x1+.5*i,y2:e.y2}},this._contentAreaDimensions.top={hoverArea:{x1:e.x1+.25*i,y1:e.y1,x2:e.x1+.75*i,y2:e.y1+.5*n},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y1+.5*n}},this._contentAreaDimensions.right={hoverArea:{x1:e.x1+.75*i,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1+.5*i,y1:e.y1,x2:e.x2,y2:e.y2}},this._contentAreaDimensions.bottom={hoverArea:{x1:e.x1+.25*i,y1:e.y1+.5*n,x2:e.x1+.75*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1+.5*n,x2:e.x2,y2:e.y2}},super.getElementArea(this.element))}positionHeader(t){this._header.side!==t&&(this._header.setSide(t),this._headerSideChanged=!0,this.setupHeaderPosition())}updateNodeSize(){if("none"!==this.element.style.display){const t=kt(this.element);if(this._header.show){t[this._header.leftRightSided?it.width:it.height]-=this.layoutManager.layoutConfig.dimensions.headerHeight}this._childElementContainer.style.width=zt(t.width),this._childElementContainer.style.height=zt(t.height);for(let e=0;e=o&&t({...t,[e]:i});async function s(t,e){return(await Promise.all(e.map((async([e,i])=>[e,await t(i,e)])))).reduce(o,{})}n.mapEntriesAsync=s,n.mapValuesAsync=async function(t,e){let i;return i=e instanceof Map?[...e.entries()]:Object.entries(e),s(t,i)};var r,a,l,h,d=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldSet||function(t,e,i,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(t,i):o?o.value=i:e.set(t,i),i},c=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldGet||function(t,e,i,n){if("a"===i&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?n:"a"===i?n.call(t):n?n.value:e.get(t)};Object.defineProperty(i,"__esModule",{value:!0});var m=i.DefaultLayoutManager=void 0;const u=n;class p{constructor(t){a.set(this,void 0),l.set(this,new Map),d(this,a,t,"f")}size(){return c(this,l,"f").size}async applyLayoutSnapshot({layouts:t}){if(Object.keys(t).length>1)throw new Error("[LayoutManager] Tried to call applyLayoutSnapshot with more than 1 layout. When implementing multiple layouts via overridden LayoutManager class, you must override and fully implement the applyLayoutSnapshot method without calling super.applyLayoutSnapshot().");const[[e,i]]=Object.entries(t);await p.createLayout(this,{layoutName:e,layout:i})}async showLayout({layoutName:t}){}async getLayoutSnapshot(){return{layouts:await(0,u.mapValuesAsync)((t=>t.getFrameSnapshot()),c(this,l,"f"))}}async removeLayout({layoutName:t}){}getLayoutIdentityForView(t){const e=[...c(this,l,"f").values()].find((e=>e.getCurrentViews().some((e=>e.name===t.name&&e.uuid===t.uuid))));return e?.identity??void 0}isLayoutVisible({layoutName:t}){return c(p,r,"m",h).call(p,this,t).isVisible()}resolveLayoutIdentity(t){if(t&&"layoutName"in t)return t;const e=[...c(this,l,"f").values()];if(1===e.length)return e[0].identity;const i=e.find((t=>t.isVisible()));return i?.identity??void 0}static async resolveLayout(t,e){const i=t.resolveLayoutIdentity(e);if(void 0===i||!("layoutName"in i))throw new Error("[layout-manager] resolveLayout: Could not resolve the layout identity. Make sure you include 'layoutName' in the identity object.");return c(p,r,"m",h).call(p,t,i.layoutName)}static async handleSharedView(t,e,i){await(0,u.mapValuesAsync)((async t=>{if(t.identity.layoutName!==e.layoutName){const e=t.getCurrentViews().find((t=>t.name===i.name));e&&await t.onViewDetached({viewIdentity:e,target:null}).catch(console.error)}}),c(t,l,"f"))}static async handleLastViewRemoved(t,e){await t.removeLayout(e),await c(t,a,"f").handleLastViewRemoved(t)}static async destroyLayout(t,{layoutName:e}){await c(p,r,"m",h).call(p,t,e).destroy(),c(t,l,"f").delete(e)}static async createLayout(t,e){const{layoutName:i}=e;if(c(t,l,"f").has(i))throw new Error(`Layout name ${i} already exists`);await c(t,a,"f").createLayout(e,t)}static registerLayout(t,e,i){c(t,l,"f").set(e,i)}static getAllLayouts(t){return[...c(t,l,"f").values()]}static setInitialSnapshot(t,e){c(t,a,"f").setInitialSnapshot(e)}static createClosedConstructor(...t){return class extends p{constructor(){super(...t)}}}}m=i.DefaultLayoutManager=p,r=p,a=new WeakMap,l=new WeakMap,h=function(t,e){const i=c(t,l,"f").get(e);if(!i)throw new Error(`[layout-manager] getLayoutByName: Could not locate layout with name '${e}'`);return i};var g={},f={},v={};Object.defineProperty(v,"__esModule",{value:!0}),v.ReversibleMap=void 0;v.ReversibleMap=class{constructor(){this.valueToKey=new Map,this.keyToValue=new Map,this.setUnique=(t,e)=>{if(this.hasKey(t)||this.hasValue(e))throw new Error("Key or value already in the map.");this.keyToValue.set(t,e),this.valueToKey.set(e,t)},this.getKey=t=>{const e=this.valueToKey.get(t);if(!e)throw new Error("Value not found in the map.");return e},this.deleteKey=t=>{const e=this.getValue(t);return this.keyToValue.delete(t),this.valueToKey.delete(e),e},this.deleteValue=t=>{const e=this.getKey(t);return this.keyToValue.delete(e),this.valueToKey.delete(t),e},this.hasKey=t=>this.keyToValue.has(t),this.hasValue=t=>this.valueToKey.has(t)}getValue(t){const e=this.keyToValue.get(t);if(!e)throw new Error("Key not found in the map.");return e}},Object.defineProperty(f,"__esModule",{value:!0});var _=f.LayoutContentCache=void 0;const y=t.lazy,C=v;class w{constructor(){this.contentItemCache=new C.ReversibleMap,this.contentItemCacheId=0,this.createCacheKey=()=>{const t=`entity-${this.contentItemCacheId.toString()}`;return this.contentItemCacheId+=1,t},this.hasKey=t=>this.contentItemCache.hasKey(t),this.getItemOrUndefined=t=>{try{return this.getContentItemOrThrow(t)}catch(t){return}},this.getContentItemOrThrow=(t,e)=>{if(!this.contentItemCache.hasKey(t))throw new Error("Layout component has been destroyed or detached from the current layout.");const i=this.contentItemCache.getValue(t);if(e&&!e.includes(i.type))throw new Error(`Layout item is not the expected type. Expected ${e.join(", ")}, got ${i.type}.`);return i},this.getOrCreateEntityId=t=>{if(this.contentItemCache.hasValue(t))return this.contentItemCache.getKey(t);t.onDestroyed((()=>{this.contentItemCache.deleteValue(t)}));const e=this.createCacheKey();return this.contentItemCache.setUnique(e,t),e}}static getSingleInstance(){return w.singleton.getValue()}}_=f.LayoutContentCache=w,w.singleton=new y.Lazy((()=>new w));var I={},b={};!function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.getAdjacentStacks=t.doShareEdge=t.getAdjacentItem=void 0;t.getAdjacentItem=(e,i)=>{const{parent:n}=e;if(e.isRoot()||!n)return;const o=["top","bottom"].includes(i)?"column":"row",s=["top","left"].includes(i)?-1:1;if(n.type===o){const t=n.contentItems.indexOf(e)+s;if(t>=0&&t{const n=t.getBounds(),o=e.getBounds();if(!n||!o)return!1;if(["top","bottom"].includes(i)){return!(n.righto.right)}return!(n.bottomo.bottom)};t.getAdjacentStacks=(e,i)=>{const n=["top","bottom"].includes(i)?"row":"column",o=s=>"stack"===s.type?(0,t.doShareEdge)(e,s,i)?[s]:[]:"root"===s.type||"ground"===s.type?[]:s.type===n?s.contentItems.map((t=>o(t))).flat():s.type!==n?["top","right"].includes(i)?o(s.contentItems[s.contentItems.length-1]):o(s.contentItems[0]):[],s=(0,t.getAdjacentItem)(e,i);return s?o(s):[]}}(b);var S=t.commonjsGlobal&&t.commonjsGlobal.__decorate||function(t,e,i,n){var o,s=arguments.length,r=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(s<3?o(r):s>3?o(e,i,r):o(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};Object.defineProperty(I,"__esModule",{value:!0}),I.LayoutEntitiesController=void 0;const E=t.decorators,x=b,L=i;class z{constructor(t,e,i){this.wire=t,this.layoutManager=e,this.layoutContentCache=i,this.analytics=t=>{this.wire.sendAction(`layout-controller-${t}`).catch((()=>{}))},this.getLayoutIdentityForViewOrThrow=async t=>{const e=this.layoutManager.getLayoutIdentityForView(t);if(!e)throw new Error(`View identity ${t.name} is not attached to any layouts.`);return e},this.getRoot=async t=>{this.analytics("get-root");const e=(await this.getLayout(t)).getRoot();return{type:e.type,entityId:this.layoutContentCache.getOrCreateEntityId(e)}},this.getStackByView=async t=>{this.analytics("get-stack-by-view");const e=await this.getLayoutIdentityForViewOrThrow(t),i=(await this.getLayout(e)).getStackByView(t);if("stack"===i?.type)return{entityId:this.layoutContentCache.getOrCreateEntityId(i),type:"stack"}},this.getStackViews=t=>{this.analytics("get-stack-views");return this.layoutContentCache.getContentItemOrThrow(t,["stack"]).contentItems.map((t=>({name:t.viewName,uuid:this.wire.me.uuid})))},this.isRoot=t=>{this.analytics("is-root");return this.layoutContentCache.getContentItemOrThrow(t).isRoot()},this.exists=t=>(this.analytics("exists"),this.layoutContentCache.hasKey(t)),this.addViewToStack=async(t,e,{index:i}={index:0})=>{this.analytics("add-view-to-stack");const n=this.layoutContentCache.getContentItemOrThrow(t);if(i&&i>n.contentItems.length+1)throw new Error(`Index '${i}' out of range, please exclude the index or specify a number between 0 and ${n.contentItems.length}`);const o={id:t,index:i},{identity:s}=await n.layout.platformCreateView(e,{location:o});return s},this.findViewInStack=(t,e)=>t.contentItems.find((t=>t.viewName===e.name)),this.removeViewFromStack=async(t,e)=>{this.analytics("remove-view-from-stack");const i=this.layoutContentCache.getContentItemOrThrow(t,["stack"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to remove a view ('${e.name}') which does not belong to the stack.`);await n.layout.platformCloseView(e)},this.createAdjacentStack=async(t,e,{position:i="right"}={})=>{if(this.analytics("create-adjacent-stack"),!Array.isArray(e)||0===e.length)throw new Error('The parameter "views" must be an array with at least 1 element.');if(!["top","bottom","left","right"].includes(i))throw new Error(`Invalid position '${i}' specified.`);const n=this.layoutContentCache.getContentItemOrThrow(t).createAdjacentStack({position:i}),o=this.layoutContentCache.getOrCreateEntityId(n);return await Promise.all(e.reverse().map((t=>this.addViewToStack(o,t)))),o},this.getAdjacentStacks=async({targetId:t,edge:e})=>{this.analytics("get-adjacent-stacks");const i=this.layoutContentCache.getContentItemOrThrow(t);return(0,x.getAdjacentStacks)(i,e).map((t=>({entityId:this.layoutContentCache.getOrCreateEntityId(t)})))},this.setStackActiveView=async(t,e)=>{this.analytics("set-stack-active-view");const i=this.layoutContentCache.getContentItemOrThrow(t,["stack"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to set a view ('${e.name}') as active when it does not belong to the stack.`);i.setActiveContentItem(n,!0)}}async getLayout(t){const e=await L.DefaultLayoutManager.resolveLayout(this.layoutManager,t);if(!e)throw new Error(`Could not resolve target layout identity ${JSON.stringify(t)}`);return e}getContent(t){this.analytics("get-content");return this.layoutContentCache.getContentItemOrThrow(t,["column","row"]).contentItems.map((t=>({type:t.type,entityId:this.layoutContentCache.getOrCreateEntityId(t)})))}getParent(t){this.analytics("get-parent");const e=this.layoutContentCache.getContentItemOrThrow(t);if(!e.isRoot())return e.parent?.contentItems.includes(e)?{type:e.parent.type,entityId:this.layoutContentCache.getOrCreateEntityId(e.parent)}:void 0}}S([(0,E.expose)()],z.prototype,"getLayoutIdentityForViewOrThrow",void 0),S([(0,E.expose)()],z.prototype,"getRoot",void 0),S([(0,E.expose)()],z.prototype,"getStackByView",void 0),S([(0,E.expose)()],z.prototype,"getStackViews",void 0),S([(0,E.expose)()],z.prototype,"getContent",null),S([(0,E.expose)()],z.prototype,"getParent",null),S([(0,E.expose)()],z.prototype,"isRoot",void 0),S([(0,E.expose)()],z.prototype,"exists",void 0),S([(0,E.expose)()],z.prototype,"addViewToStack",void 0),S([(0,E.expose)()],z.prototype,"removeViewFromStack",void 0),S([(0,E.expose)()],z.prototype,"createAdjacentStack",void 0),S([(0,E.expose)()],z.prototype,"getAdjacentStacks",void 0),S([(0,E.expose)()],z.prototype,"setStackActiveView",void 0),I.LayoutEntitiesController=z,Object.defineProperty(g,"__esModule",{value:!0});var M=g.initLayoutEndpoints=void 0;const P=t.apiExposer,T=t.layout_constants,A=f,k=I,D=i;M=g.initLayoutEndpoints=async function(t,e){const i=t.getFin(),n=await i.Platform.getCurrentSync().getClient(),o=new P.ChannelsExposer(n);await new P.ApiExposer(o).exposeInstance(new k.LayoutEntitiesController(t,e,A.LayoutContentCache.getSingleInstance()),{id:T.LAYOUT_CONTROLLER_ID}),await async function(t,e){const i=t=>async i=>{const n=await D.DefaultLayoutManager.resolveLayout(e,i.target);if(!n)throw new Error(`Could not resolve the layout target from payload ${JSON.stringify(i)}`);return t(n,i)},n=(e,n)=>{t.register(e,i(n))},o=(t,e)=>{n(t,e)};n("replace-view",((t,e)=>t.replaceView(e))),n("replace-layout",((t,{layout:e})=>t.replaceLayout(e))),n("add-view",((t,e)=>t.insertView(e))),o("layout-add-view",((t,{viewOptions:e,location:i,targetView:n})=>t.platformCreateView(e,{location:i,targetView:n}))),n("close-view",((t,e)=>t.cleanupView(e.viewIdentity))),o("layout-close-view",((t,e)=>t.platformCloseView(e.viewIdentity))),n("apply-preset-layout",((t,e)=>t.applyPreset(e))),n("get-layout-views",(t=>t.getCurrentViews())),n("get-frame-snapshot",(t=>t.getFrameSnapshot())),n("is-visible",(t=>t.isVisible())),n("destroy",(t=>t.destroy())),t.register("get-layout-snapshot",(()=>e.getLayoutSnapshot()))}(n,e)};var R={};Object.defineProperty(R,"__esModule",{value:!0});var U=R.BaseLayout=void 0;U=R.BaseLayout=class{};var O={};Object.defineProperty(O,"__esModule",{value:!0});var V=O.DOMEmitter=void 0;V=O.DOMEmitter=class{constructor(t){this.container=t}dispatchLocalEvent(t,e){const i={...e,type:t,tabSelector:`tab-${e.name}`,containerSelector:`container-${e.name}`,topic:"openfin-DOM-event"};this.container.dispatchEvent(new CustomEvent(t,{detail:i}))}};var B={};Object.defineProperty(B,"__esModule",{value:!0});var H=B.mapLayoutContentItemsImmutableSync=B.mapLayoutContentItemsImmutable=W=B.isVisible=void 0;var W=B.isVisible=t=>(0!==t.offsetWidth||0!==t.offsetHeight)&&"hidden"!==window.getComputedStyle(t).visibility&&t.offsetTop>=0&&t.offsetLeft>=0&&t.offsetTop<=window.innerHeight&&t.offsetLeft<=window.innerWidth;const F=t=>"type"in t&&"component"===t.type;B.mapLayoutContentItemsImmutable=async function t(e,i){return F(i)?e(i):{...i,content:await Promise.all(i.content?.map((i=>t(e,i))))}},H=B.mapLayoutContentItemsImmutableSync=function t(e,i){return F(i)?e(i):{...i,content:i.content?.map((i=>t(e,i)))}};class N extends Error{constructor(t,e){super(e),this.type=t}}class G extends N{constructor(t,e){super("Configuration",t),this.node=e}}class j extends N{constructor(t){super("PopoutBlocked",t)}}class $ extends N{constructor(t){super("API",t)}}class Z extends N{constructor(t){super("Bind",t)}}class q extends Error{constructor(t,e,i){super(`${t}: ${e}${void 0===i?"":": "+i}`)}}class X extends q{constructor(t,e){super("Assert",t,e)}}class Y extends q{constructor(t,e,i){super("UnreachableCase",t,`${e}${void 0===i?"":": "+i}`)}}class K extends q{constructor(t,e){super("UnexpectedNull",t,e)}}class J extends q{constructor(t,e){super("UnexpectedUndefined",t,e)}}var Q;!function(t){let e=!1;const i={PopoutCannotBeCreatedWithGroundItemConfig:{id:0,default:"Popout cannot be created with ground ItemConfig"},PleaseRegisterAConstructorFunction:{id:1,default:"Please register a constructor function"},ComponentTypeNotRegisteredAndBindComponentEventHandlerNotAssigned:{id:2,default:"Component type not registered and BindComponentEvent handler not assigned"},ComponentIsAlreadyRegistered:{id:3,default:"Component is already registered"},ComponentIsNotVirtuable:{id:4,default:"Component is not virtuable. Requires rootHtmlElement field/getter"},VirtualComponentDoesNotHaveRootHtmlElement:{id:5,default:'Virtual component does not have getter "rootHtmlElement"'},ItemConfigIsNotTypeComponent:{id:6,default:"ItemConfig is not of type component"},InvalidNumberPartInSizeString:{id:7,default:"Invalid number part in size string"},UnknownUnitInSizeString:{id:8,default:"Unknown unit in size string"},UnsupportedUnitInSizeString:{id:9,default:"Unsupported unit in size string"}};t.idCount=Object.keys(i).length;const n=Object.values(i);t.checkInitialise=function(){if(!e)for(let e=0;e="0"&&t<="9"}function Tt(t,e){const i=zt(e);t.style.width=i}function At(t,e){const i=zt(e);t.style.height=i}function kt(t){return{width:t.offsetWidth,height:t.offsetHeight}}function Dt(t,e){t.style.display=e?"":"none"}function Rt(t,e){if(void 0!==e)for(const i in e)if(e.hasOwnProperty(i)){const n=e[i],o=t[i];t[i]=Ut(o,n)}return t}function Ut(t,e){if("object"!=typeof e)return e;if(Array.isArray(e)){const t=e.length,i=new Array(t);for(let n=0;n36)throw new Error("Too many keys in config minifier map")},t.translateObject=n}(dt||(dt={})),function(t){t.defaults={type:at.ground,content:[],size:1,sizeUnit:ht.Fractional,minSize:void 0,minSizeUnit:ht.Pixel,id:"",isClosable:!0},t.createCopy=function(t,e){switch(t.type){case at.ground:case at.row:case at.column:return gt.createCopy(t,e);case at.stack:return ut.createCopy(t,e);case at.component:return pt.createCopy(t);default:throw new Y("CICC91354",t.type,"Invalid Config Item type specified")}},t.createDefault=function(t){switch(t){case at.ground:throw new X("CICCDR91562");case at.row:case at.column:return gt.createDefault(t);case at.stack:return ut.createDefault();case at.component:return pt.createDefault();default:throw new Y("CICCDD91563",t,"Invalid Config Item type specified")}},t.isComponentItem=function(t){return t.type===at.component},t.isStackItem=function(t){return t.type===at.stack},t.isGroundItem=function(t){return t.type===at.ground}}(ct||(ct={})),function(t){t.defaultMaximised=!1,function(t){t.createCopy=function(t,e){return void 0===t?void 0:{show:null!=e?e:t.show,popout:t.popout,close:t.close,maximise:t.maximise,minimise:t.minimise,tabDropdown:t.tabDropdown}}}(t.Header||(t.Header={}))}(mt||(mt={})),function(t){function e(t){const e=t.length,i=new Array(e);for(let n=0;n"__glMaximised"===t));t>0&&(o=!0,n=n.splice(t,1)),e=n.length>0?n[0]:ct.defaults.id}else e=n;return i=void 0!==t.maximised?t.maximised:o,{id:e,maximised:i}}}(wt||(wt={})),function(t){function e(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0;return{resolved:!0,root:Et.resolve(i),openPopouts:t.resolveOpenPopouts(e.openPopouts),dimensions:t.Dimensions.resolve(e.dimensions),settings:t.Settings.resolve(e.settings),header:t.Header.resolve(e.header,e.settings,e.labels)}}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:Lt.fromResolvedArray(e.openPopouts),settings:_t.Settings.createCopy(e.settings),dimensions:t.Dimensions.fromResolved(e.dimensions),header:_t.Header.createCopy(e.header)}},t.isResolved=function(t){const e=t;return void 0!==e.resolved&&!0===e.resolved},t.resolveOpenPopouts=function(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0,{root:Et.resolve(o),openPopouts:xt.resolveOpenPopouts(e.openPopouts),dimensions:xt.Dimensions.resolve(e.dimensions),settings:xt.Settings.resolve(e.settings),header:xt.Header.resolve(e.header,e.settings,e.labels),parentId:null!==(i=e.parentId)&&void 0!==i?i:null,indexInParent:null!==(n=e.indexInParent)&&void 0!==n?n:null,window:t.Window.resolve(e.window,e.dimensions),resolved:!0}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:i(e.openPopouts),dimensions:xt.Dimensions.fromResolved(e.dimensions),settings:_t.Settings.createCopy(e.settings),header:_t.Header.createCopy(e.header),parentId:e.parentId,indexInParent:e.indexInParent,window:t.Window.fromResolved(e.window)}},t.fromResolvedArray=i}(Lt||(Lt={}));class Wt{constructor(){this._allEventSubscriptions=[],this._subscriptionsMap=new Map,this.unbind=this.removeEventListener,this.trigger=this.emit}tryBubbleEvent(t,e){}emit(t,...e){let i=this._subscriptionsMap.get(t);if(void 0!==i){i=i.slice();for(let t=0;t0){const n=e.slice();n.unshift(t);const o=this._allEventSubscriptions.slice();for(let t=0;t0?n.contentItems[0]:n,e=0);const o=this._layoutManager.createAndInitContentItem(i,t);t.addChild(o,e),this._layoutManager.layoutConfig.settings.popInOnClose?this._onClose():this.close()}createWindow(){const t=this.createUrl(),e=Math.floor(1e6*Math.random()).toString(36),i=this.serializeWindowFeatures({width:this._initialWindowSize.width,height:this._initialWindowSize.height,innerWidth:this._initialWindowSize.width,innerHeight:this._initialWindowSize.height,menubar:"no",toolbar:"no",location:"no",personalbar:"no",resizable:"yes",scrollbars:"no",status:"no"});if(this._popoutWindow=globalThis.open(t,e,i),this._popoutWindow)this._popoutWindow.addEventListener("load",(()=>this.positionWindow()),{passive:!0}),this._popoutWindow.addEventListener("beforeunload",(()=>{this._layoutManager.layoutConfig.settings.popInOnClose?this.popIn():this._onClose()}),{passive:!0}),this._checkReadyInterval=setInterval((()=>this.checkReady()),10);else if(!0===this._layoutManager.layoutConfig.settings.blockedPopoutsThrowError){throw new j("Popout blocked")}}checkReady(){if(null===this._popoutWindow)throw new K("BPCR01844");this._popoutWindow.__glInstance&&this._popoutWindow.__glInstance.isInitialised&&(this.onInitialised(),void 0!==this._checkReadyInterval&&(clearInterval(this._checkReadyInterval),this._checkReadyInterval=void 0))}serializeWindowFeatures(t){const e=[];for(const i in t)e.push(i+"="+t[i].toString());return e.join(",")}createUrl(){const t="gl-window-config-"+Ot(),e=_t.minifyConfig(this._config);try{localStorage.setItem(t,JSON.stringify(e))}catch(t){throw new Error("Error while writing to localStorage "+function(t){return t instanceof Error?t.message:"string"==typeof t?t:"Unknown Error"}(t))}const i=new URL(location.href);return i.searchParams.set("gl-window",t),i.toString()}positionWindow(){if(null===this._popoutWindow)throw new Error("BrowserPopout.positionWindow: null popoutWindow");this._popoutWindow.moveTo(this._initialWindowSize.left,this._initialWindowSize.top),this._popoutWindow.focus()}onInitialised(){this._isInitialised=!0,this.getGlInstance().on("popIn",(()=>this.popIn())),this.emit("initialised")}_onClose(){setTimeout((()=>this.emit("closed")),50)}}class Gt extends Wt{constructor(t,e,i,n){super(),this.layoutManager=t,this._parent=i,this._element=n,this._popInParentIds=[],this._type=e.type,this._id=e.id,this._isInitialised=!1,this.isGround=!1,this.isRow=!1,this.isColumn=!1,this.isStack=!1,this.isComponent=!1,this.size=e.size,this.sizeUnit=e.sizeUnit,this.minSize=e.minSize,this.minSizeUnit=e.minSizeUnit,this._isClosable=e.isClosable,this._pendingEventPropagations={},this._throttledEvents=["stateChanged"],this._contentItems=this.createContentItems(e.content)}get type(){return this._type}get id(){return this._id}set id(t){this._id=t}get popInParentIds(){return this._popInParentIds}get parent(){return this._parent}get contentItems(){return this._contentItems}get isClosable(){return this._isClosable}get element(){return this._element}get isInitialised(){return this._isInitialised}static isStack(t){return t.isStack}static isComponentItem(t){return t.isComponent}static isComponentParentableItem(t){return t.isStack||t.isGround}removeChild(t,e=!1){const i=this._contentItems.indexOf(t);if(-1===i)throw new Error("Can't remove child item. Unknown content item");if(e||this._contentItems[i].destroy(),this._contentItems.splice(i,1),this._contentItems.length>0)this.updateSize(!1);else if(!this.isGround&&!0===this._isClosable){if(null===this._parent)throw new K("CIUC00874");this._parent.removeChild(this)}}addChild(t,e,i){return null!=e||(e=this._contentItems.length),this._contentItems.splice(e,0,t),t.setParent(this),!0===this._isInitialised&&!1===t._isInitialised&&t.init(),e}replaceChild(t,e,i=!1){const n=this._contentItems.indexOf(t),o=t._element.parentNode;if(-1===n)throw new X("CIRCI23232","Can't replace child. oldChild is not child of this");if(null===o)throw new K("CIRCP23232");if(o.replaceChild(e._element,t._element),!0===i&&(t._parent=null,t.destroy()),this._contentItems[n]=e,e.setParent(this),e.size=t.size,e.sizeUnit=t.sizeUnit,e.minSize=t.minSize,e.minSizeUnit=t.minSizeUnit,null===e._parent)throw new K("CIRCNC45699");!0===e._parent._isInitialised&&!1===e._isInitialised&&e.init(),this.updateSize(!1)}remove(){if(null===this._parent)throw new K("CIR11110");this._parent.removeChild(this)}popout(){const t=Ot(),e=this.layoutManager.createPopoutFromContentItem(this,void 0,t,void 0);return this.emitBaseBubblingEvent("stateChanged"),e}calculateConfigContent(){const t=this._contentItems,e=t.length,i=new Array(e);for(let n=0;nthis.propagateEventToLayoutManager(t,e))))}propagateEventToLayoutManager(t,e){this._pendingEventPropagations[t]=!1,this.layoutManager.emitUnknown(t,e)}}class jt extends Gt{constructor(t,e,i){super(t,e,i,document.createElement("div")),this._parentItem=i,this._focused=!1,this.isComponent=!0,this._reorderEnabled=e.reorderEnabled,this.applyUpdatableConfig(e),this._initialWantMaximise=e.maximised;const n=document.createElement("div");n.classList.add("lm_content"),this.element.appendChild(n),this._container=new Ft(e,this,t,n,(t=>this.handleUpdateItemConfigEvent(t)),(()=>this.show()),(()=>this.hide()),(t=>this.focus(t)),(t=>this.blur(t)))}get componentName(){return this._container.componentType}get componentType(){return this._container.componentType}get reorderEnabled(){return this._reorderEnabled}get initialWantMaximise(){return this._initialWantMaximise}get component(){return this._container.component}get container(){return this._container}get parentItem(){return this._parentItem}get headerConfig(){return this._headerConfig}get title(){return this._title}get tab(){return this._tab}get focused(){return this._focused}destroy(){this._container.destroy(),super.destroy()}applyUpdatableConfig(t){this.setTitle(t.title),this._headerConfig=t.header}toConfig(){const t=this._container.stateRequestEvent,e=void 0===t?this._container.state:t();return{type:at.component,content:[],size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,maximised:!1,isClosable:this.isClosable,reorderEnabled:this._reorderEnabled,title:this._title,header:mt.Header.createCopy(this._headerConfig),componentType:pt.copyComponentType(this.componentType),componentState:e}}close(){if(null===this.parent)throw new K("CIC68883");this.parent.removeChild(this,!1)}enterDragMode(t,e){Tt(this.element,t),At(this.element,e),this._container.enterDragMode(t,e)}exitDragMode(){this._container.exitDragMode()}enterStackMaximised(){this._container.enterStackMaximised()}exitStackMaximised(){this._container.exitStackMaximised()}drag(){this._container.drag()}updateSize(t){this.updateNodeSize(t)}init(){this.updateNodeSize(!1),super.init(),this._container.emit("open"),this.initContentItems()}setTitle(t){this._title=t,this.emit("titleChanged",t),this.emit("stateChanged")}setTab(t){this._tab=t,this.emit("tab",t),this._container.setTab(t)}hide(){super.hide(),this._container.setVisibility(!1)}show(){super.show(),this._container.setVisibility(!0)}focus(t=!1){this.parentItem.setActiveComponentItem(this,!0,t)}setFocused(t){this._focused=!0,this.tab.setFocused(),t||this.emitBaseBubblingEvent("focus")}blur(t=!1){this._focused&&this.layoutManager.setFocusedComponentItem(void 0,t)}setBlurred(t){this._focused=!1,this.tab.setBlurred(),t||this.emitBaseBubblingEvent("blur")}setParent(t){this._parentItem=t,super.setParent(t)}handleUpdateItemConfigEvent(t){this.applyUpdatableConfig(t)}updateNodeSize(t){if("none"!==this.element.style.display){const{width:e,height:i}=kt(this.element);this._container.setSizeToNodeSize(e,i,t)}}}class $t extends Gt{constructor(){super(...arguments),this._focused=!1}get focused(){return this._focused}setFocusedValue(t){this._focused=t}}class Zt extends Wt{constructor(t,e){super(),this._eElement=t,this._pointerTracking=!1,this._pointerDownEventListener=t=>this.onPointerDown(t),this._pointerMoveEventListener=t=>this.onPointerMove(t),this._pointerUpEventListener=t=>this.onPointerUp(t),this._timeout=void 0,this._allowableTargets=[t,...e],this._oDocument=document,this._eBody=document.body,this._nDelay=1800,this._nDistance=10,this._nX=0,this._nY=0,this._nOriginalX=0,this._nOriginalY=0,this._dragging=!1,this._eElement.addEventListener("pointerdown",this._pointerDownEventListener,{passive:!0})}destroy(){this.checkRemovePointerTrackingEventListeners(),this._eElement.removeEventListener("pointerdown",this._pointerDownEventListener)}cancelDrag(){this.processDragStop(void 0)}onPointerDown(t){if(this._allowableTargets.includes(t.target)&&t.isPrimary){const e=this.getPointerCoordinates(t);this.processPointerDown(e)}}processPointerDown(t){this._nOriginalX=t.x,this._nOriginalY=t.y,this._oDocument.addEventListener("pointermove",this._pointerMoveEventListener),this._oDocument.addEventListener("pointerup",this._pointerUpEventListener,{passive:!0}),this._pointerTracking=!0,this._timeout=setTimeout((()=>{try{this.startDrag()}catch(t){throw console.error(t),t}}),this._nDelay)}onPointerMove(t){this._pointerTracking&&(this.processDragMove(t),t.preventDefault())}processDragMove(t){this._nX=t.pageX-this._nOriginalX,this._nY=t.pageY-this._nOriginalY,!1===this._dragging&&(Math.abs(this._nX)>this._nDistance||Math.abs(this._nY)>this._nDistance)&&this.startDrag(),this._dragging&&this.emit("drag",this._nX,this._nY,t)}onPointerUp(t){this.processDragStop(t)}processDragStop(t){var e;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this.checkRemovePointerTrackingEventListeners(),!0===this._dragging&&(this._eBody.classList.remove("lm_dragging"),this._eElement.classList.remove("lm_dragging"),null===(e=this._oDocument.querySelector("iframe"))||void 0===e||e.style.setProperty("pointer-events",""),this._dragging=!1,this.emit("dragStop",t))}checkRemovePointerTrackingEventListeners(){this._pointerTracking&&(this._oDocument.removeEventListener("pointermove",this._pointerMoveEventListener),this._oDocument.removeEventListener("pointerup",this._pointerUpEventListener),this._pointerTracking=!1)}startDrag(){var t;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this._dragging=!0,this._eBody.classList.add("lm_dragging"),this._eElement.classList.add("lm_dragging"),null===(t=this._oDocument.querySelector("iframe"))||void 0===t||t.style.setProperty("pointer-events","none"),this.emit("dragStart",this._nOriginalX,this._nOriginalY)}getPointerCoordinates(t){return{x:t.pageX,y:t.pageY}}}class qt{constructor(t,e,i){this._isVertical=t,this._size=e,this._grabSize=i0){const i=this.createSplitter(Math.max(0,e-1)).element;e>0?(this.contentItems[e-1].element.insertAdjacentElement("afterend",i),i.insertAdjacentElement("afterend",t.element)):(this.contentItems[0].element.insertAdjacentElement("beforebegin",i),i.insertAdjacentElement("beforebegin",t.element))}else this._childElementContainer.appendChild(t.element);super.addChild(t,e);const n=1/this.contentItems.length*100;if(!0===i)return this.emitBaseBubblingEvent("stateChanged"),e;for(let e=0;e0&&(this.calculateRelativeSizes(),this.setAbsoluteSizes()),this.emitBaseBubblingEvent("stateChanged"),this.emit("resize")}setAbsoluteSizes(){const t=this.calculateAbsoluteSizes();for(let e=0;e0&&t.itemSizes[e]++,this._isColumn?(Tt(this.contentItems[e].element,t.crossAxisSize),At(this.contentItems[e].element,t.itemSizes[e])):(Tt(this.contentItems[e].element,t.itemSizes[e]),At(this.contentItems[e].element,t.crossAxisSize))}calculateAbsoluteSizes(){const t=(this.contentItems.length-1)*this._splitterSize,{width:e,height:i}=kt(this.element);let n,o;this._isColumn?(n=i-t,o=e):(n=e-t,o=i);let s=0;const r=[];for(let t=0;t0){const n=100-t;for(let t=0;t100&&e.length>0){for(let t=0;te)return;{const r=i/e;let a=i;for(let e=0;ethis.onSplitterDrag(e,t,i))),e.on("dragStop",(()=>this.onSplitterDragStop(e))),e.on("dragStart",(()=>this.onSplitterDragStart(e))),this._splitter.splice(t,0,e),e}getSplitItems(t){const e=this._splitter.indexOf(t);return{before:this.contentItems[e],after:this.contentItems[e+1]}}calculateContentItemMinSize(t){const e=t.minSize;if(void 0!==e){if(t.minSizeUnit===ht.Pixel)return e;throw new X("ROCGMD98831",JSON.stringify(t))}{const t=this.layoutManager.layoutConfig.dimensions;return this._isColumn?t.defaultMinItemHeight:t.defaultMinItemWidth}}calculateContentItemsTotalMinSize(t){let e=0;for(const i of t)e+=this.calculateContentItemMinSize(i);return e}onSplitterDragStart(t){const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=this.calculateContentItemsTotalMinSize(e.before.contentItems),s=this.calculateContentItemsTotalMinSize(e.after.contentItems);this._splitterPosition=0,this._splitterMinPosition=-1*(i-o),this._splitterMaxPosition=n-s}onSplitterDrag(t,e,i){let n=this._isColumn?i:e;if(null===this._splitterMinPosition||null===this._splitterMaxPosition)throw new K("ROCOSD59226");n=Math.max(n,this._splitterMinPosition),n=Math.min(n,this._splitterMaxPosition),this._splitterPosition=n;const o=zt(n);this._isColumn?t.element.style.top=o:t.element.style.left=o}onSplitterDragStop(t){if(null===this._splitterPosition)throw new K("ROCOSDS66932");{const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=(this._splitterPosition+i)/(i+n),s=e.before.size+e.after.size;e.before.size=o*s,e.after.size=(1-o)*s,t.element.style.top=zt(0),t.element.style.left=zt(0),globalThis.requestAnimationFrame((()=>this.updateSize(!1)))}}}!function(t){t.getElementDimensionSize=function(t,e){return"width"===e?function(t){return t.offsetWidth}(t):function(t){return t.offsetHeight}(t)},t.setElementDimensionSize=function(t,e,i){return"width"===e?Tt(t,i):At(t,i)},t.createElement=function(t,e){const i=t.createElement("div");return i.classList.add("lm_item"),e?i.classList.add("lm_column"):i.classList.add("lm_row"),i}}(Xt||(Xt={}));class Yt extends $t{constructor(t,e,i){super(t,vt.create(e),null,Yt.createElement(document)),this.isGround=!0,this._childElementContainer=this.element,this._containerElement=i;let n=null;for(;;){const t=n?n.previousSibling:this._containerElement.lastChild;if(!(t instanceof Element&&t.classList.contains("lm_content")))break;n=t}this._containerElement.insertBefore(this.element,n)}init(){if(!0!==this.isInitialised){this.updateNodeSize();for(let t=0;t0?this.contentItems[0]:this,n.isComponent)throw new Error("Cannot add item as child to ComponentItem");{const t=this.layoutManager.createAndInitContentItem(i,n);return e=n.addChild(t,e),n===this?-1:e}}loadComponentAsRoot(t){this.clearRoot();const e=Ct.resolve(t,!1);if(e.maximised)throw new Error("Root Component cannot be maximised");{const t=new jt(this.layoutManager,e,this);t.init(),this.addChild(t,0)}}addChild(t,e){if(this.contentItems.length>0)throw new Error("Ground node can only have a single child");return this._childElementContainer.appendChild(t.element),e=super.addChild(t,e),this.updateSize(!1),this.emitBaseBubblingEvent("stateChanged"),e}calculateConfigContent(){const t=this.contentItems,e=t.length,i=new Array(e);for(let n=0;n0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e)),this.updateContentItemsSize(!1))}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}createSideAreas(){const t=Yt.Area.oppositeSides,e=new Array(Object.keys(t).length);let i=0;for(const n in t){const o=n,s=this.getElementArea();if(null===s)throw new K("RCSA77553");s.side=o,"2"===t[o][1]?s[o]=s[t[o]]-50:s[o]=s[t[o]]+50,s.surface=(s.x2-s.x1)*(s.y2-s.y1),e[i++]=s}return e}highlightDropZone(t,e,i){this.layoutManager.tabDropPlaceholder.remove(),super.highlightDropZone(t,e,i)}onDrop(t,e){if(t.isComponent){const e=ut.createDefault(),i=t;e.header=mt.Header.createCopy(i.headerConfig);const n=this.layoutManager.createAndInitContentItem(e,this);n.addChild(t),t=n}if(0===this.contentItems.length)this.addChild(t);else{if(t.type===at.row||t.type===at.column){const e=ut.createDefault(),i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}const i="x"==e.side[0]?at.row:at.column,n="2"==e.side[1],o=this.contentItems[0];if(o instanceof Xt&&o.type===i){const e=o.contentItems[n?0:o.contentItems.length-1];o.addChild(t,n?0:void 0,!0),e.size*=.5,t.size=e.size,t.sizeUnit=ht.Percent,o.updateSize(!1)}else{const e=ct.createDefault(i),s=this.layoutManager.createContentItem(e,this);this.replaceChild(o,s),s.addChild(t,n?0:void 0,!0),s.addChild(o,n?void 0:0,!0),o.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}}dock(){throw new X("GID87731")}validateDocking(){throw new X("GIVD87732")}getAllContentItems(){const t=[this];return this.deepGetAllContentItems(this.contentItems,t),t}getConfigMaximisedItems(){const t=[];return this.deepFilterContentItems(this.contentItems,t,(t=>!(!Gt.isStack(t)||!t.initialWantMaximise)||!(!Gt.isComponentItem(t)||!t.initialWantMaximise))),t}getItemsByPopInParentId(t){const e=[];return this.deepFilterContentItems(this.contentItems,e,(e=>e.popInParentIds.includes(t))),e}toConfig(){throw new Error("Cannot generate GroundItem config")}setActiveComponentItem(t,e,i){}updateNodeSize(){const{width:t,height:e}=kt(this._containerElement);Tt(this.element,t),At(this.element,e),this.contentItems.length>0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e))}deepGetAllContentItems(t,e){for(let i=0;ithis.onClick(t),this._touchStartEventListener=t=>this.onTouchStart(t),this._element=document.createElement("div"),this._element.classList.add(i),this._element.title=e,this._header.on("destroy",(()=>this.destroy())),this._element.addEventListener("click",this._clickEventListener,{passive:!0}),this._element.addEventListener("touchstart",this._touchStartEventListener,{passive:!0}),this._header.controlsContainerElement.appendChild(this._element)}get element(){return this._element}destroy(){var t;this._element.removeEventListener("click",this._clickEventListener),this._element.removeEventListener("touchstart",this._touchStartEventListener),null===(t=this._element.parentNode)||void 0===t||t.removeChild(this._element)}onClick(t){this._pushEvent(t)}onTouchStart(t){this._pushEvent(t)}}class Jt{constructor(t,e,i,n,o){var s;this._layoutManager=t,this._componentItem=e,this._closeEvent=i,this._focusEvent=n,this._dragStartEvent=o,this._isActive=!1,this._tabClickListener=t=>this.onTabClickDown(t),this._tabTouchStartListener=t=>this.onTabTouchStart(t),this._closeClickListener=()=>this.onCloseClick(),this._closeTouchStartListener=()=>this.onCloseTouchStart(),this._dragStartListener=(t,e)=>this.onDragStart(t,e),this._contentItemDestroyListener=()=>this.onContentItemDestroy(),this._tabTitleChangedListener=t=>this.setTitle(t),this._element=document.createElement("div"),this._element.classList.add("lm_tab"),this._titleElement=document.createElement("span"),this._titleElement.classList.add("lm_title"),this._closeElement=document.createElement("div"),this._closeElement.classList.add("lm_close_tab"),this._element.appendChild(this._titleElement),this._element.appendChild(this._closeElement),e.isClosable?this._closeElement.style.display="":this._closeElement.style.display="none",this.setTitle(e.title),this._componentItem.on("titleChanged",this._tabTitleChangedListener);(null!==(s=e.reorderEnabled)&&void 0!==s?s:this._layoutManager.layoutConfig.settings.reorderEnabled)&&this.enableReorder(),this._element.addEventListener("click",this._tabClickListener,{passive:!0}),this._element.addEventListener("touchstart",this._tabTouchStartListener,{passive:!0}),this._componentItem.isClosable?(this._closeElement.addEventListener("click",this._closeClickListener,{passive:!0}),this._closeElement.addEventListener("touchstart",this._closeTouchStartListener,{passive:!0})):(this._closeElement.remove(),this._closeElement=void 0),this._componentItem.setTab(this),this._layoutManager.emit("tabCreated",this)}get isActive(){return this._isActive}get componentItem(){return this._componentItem}get contentItem(){return this._componentItem}get element(){return this._element}get titleElement(){return this._titleElement}get closeElement(){return this._closeElement}get reorderEnabled(){return void 0!==this._dragListener}set reorderEnabled(t){t!==this.reorderEnabled&&(t?this.enableReorder():this.disableReorder())}setTitle(t){this._titleElement.innerText=t,this._element.title=t}setActive(t){t!==this._isActive&&(this._isActive=t,t?this._element.classList.add("lm_active"):this._element.classList.remove("lm_active"))}destroy(){var t,e;this._closeEvent=void 0,this._focusEvent=void 0,this._dragStartEvent=void 0,this._element.removeEventListener("click",this._tabClickListener),this._element.removeEventListener("touchstart",this._tabTouchStartListener),null===(t=this._closeElement)||void 0===t||t.removeEventListener("click",this._closeClickListener),null===(e=this._closeElement)||void 0===e||e.removeEventListener("touchstart",this._closeTouchStartListener),this._componentItem.off("titleChanged",this._tabTitleChangedListener),this.reorderEnabled&&this.disableReorder(),this._element.remove()}setBlurred(){this._element.classList.remove("lm_focused"),this._titleElement.classList.remove("lm_focused")}setFocused(){this._element.classList.add("lm_focused"),this._titleElement.classList.add("lm_focused")}onDragStart(t,e){if(void 0===this._dragListener)throw new J("TODSDLU10093");if(void 0===this._dragStartEvent)throw new J("TODS23309");this._dragStartEvent(t,e,this._dragListener,this.componentItem)}onContentItemDestroy(){void 0!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=void 0)}onTabClickDown(t){const e=t.target;e!==this._element&&e!==this._titleElement||(0===t.button?this.notifyFocus():1===t.button&&this._componentItem.isClosable&&this.notifyClose())}onTabTouchStart(t){t.target===this._element&&this.notifyFocus()}onCloseClick(){this.notifyClose()}onCloseTouchStart(){this.notifyClose()}notifyClose(){if(void 0===this._closeEvent)throw new J("TNC15007");this._closeEvent(this._componentItem)}notifyFocus(){if(void 0===this._focusEvent)throw new J("TNA15007");this._focusEvent(this._componentItem)}enableReorder(){this._dragListener=new Zt(this._element,[this._titleElement]),this._dragListener.on("dragStart",this._dragStartListener),this._componentItem.on("destroy",this._contentItemDestroyListener)}disableReorder(){if(void 0===this._dragListener)throw new J("TDR87745");this._componentItem.off("destroy",this._contentItemDestroyListener),this._dragListener.off("dragStart",this._dragStartListener),this._dragListener=void 0}}class Qt{constructor(t,e,i,n,o){this._layoutManager=t,this._componentRemoveEvent=e,this._componentFocusEvent=i,this._componentDragStartEvent=n,this._dropdownActiveChangedEvent=o,this._tabs=[],this._lastVisibleTabIndex=-1,this._dropdownActive=!1,this._element=document.createElement("section"),this._element.classList.add("lm_tabs"),this._dropdownElement=document.createElement("section"),this._dropdownElement.classList.add("lm_tabdropdown_list"),this._dropdownElement.style.display="none"}get tabs(){return this._tabs}get tabCount(){return this._tabs.length}get lastVisibleTabIndex(){return this._lastVisibleTabIndex}get element(){return this._element}get dropdownElement(){return this._dropdownElement}get dropdownActive(){return this._dropdownActive}destroy(){for(let t=0;tthis.handleTabCloseEvent(t)),(t=>this.handleTabFocusEvent(t)),((t,e,i,n)=>this.handleTabDragStartEvent(t,e,i,n)));void 0===e&&(e=this._tabs.length),this._tabs.splice(e,0,i),ethis._lastVisibleTabIndex){const t=this._tabs[e];for(let t=e;t>0;t--)this._tabs[t]=this._tabs[t-1];this._tabs[0]=t}}updateTabSizes(t,e){let i=!1;this.tryUpdateTabSizes(i,t,e)||(i=!0,this.tryUpdateTabSizes(i,t,e)),i!==this._dropdownActive&&(this._dropdownActive=i,this._dropdownActiveChangedEvent())}tryUpdateTabSizes(t,e,i){if(this._tabs.length>0){if(void 0===i)throw new Error("non-empty tabs must have active component item");let n=0,o=!1;const s=this._layoutManager.layoutConfig.settings.tabOverlapAllowance,r=this._tabs.indexOf(i.tab),a=this._tabs[r];this._lastVisibleTabIndex=-1;for(let i=0;ie){if(o)i===r&&(l.style.zIndex="auto",l.style.marginLeft="",l.parentElement!==this._element&&this._element.appendChild(l));else{let t;if(t=r>0&&r<=i?(d-e)/(i-1):(d-e)/i,tthis.onClick(t),this._touchStartListener=t=>this.onTouchStart(t),this._rowColumnClosable=!0,this._closeButton=null,this._popoutButton=null,this._tabsContainer=new Qt(this._layoutManager,(t=>this.handleTabInitiatedComponentRemoveEvent(t)),(t=>this.handleTabInitiatedComponentFocusEvent(t)),((t,e,i,n)=>this.handleTabInitiatedDragStartEvent(t,e,i,n)),(()=>this.processTabDropdownActiveChanged())),this._show=i.show,this._popoutEnabled=i.popoutEnabled,this._popoutLabel=i.popoutLabel,this._maximiseEnabled=i.maximiseEnabled,this._maximiseLabel=i.maximiseLabel,this._minimiseEnabled=i.minimiseEnabled,this._minimiseLabel=i.minimiseLabel,this._closeEnabled=i.closeEnabled,this._closeLabel=i.closeLabel,this._tabDropdownEnabled=i.tabDropdownEnabled,this._tabDropdownLabel=i.tabDropdownLabel,this.setSide(i.side),this._canRemoveComponent=this._configClosable,this._element=document.createElement("section"),this._element.classList.add("lm_header"),this._controlsContainerElement=document.createElement("section"),this._controlsContainerElement.classList.add("lm_controls"),this._element.appendChild(this._tabsContainer.element),this._element.appendChild(this._controlsContainerElement),this._element.appendChild(this._tabsContainer.dropdownElement),this._element.addEventListener("click",this._clickListener,{passive:!0}),this._element.addEventListener("touchstart",this._touchStartListener,{passive:!0}),this._documentMouseUpListener=()=>this._tabsContainer.hideAdditionalTabsDropdown(),globalThis.document.addEventListener("mouseup",this._documentMouseUpListener,{passive:!0}),this._tabControlOffset=this._layoutManager.layoutConfig.settings.tabControlOffset,this._tabDropdownEnabled&&(this._tabDropdownButton=new Kt(this,this._tabDropdownLabel,"lm_tabdropdown",(()=>this._tabsContainer.showAdditionalTabsDropdown()))),this._popoutEnabled&&(this._popoutButton=new Kt(this,this._popoutLabel,"lm_popout",(()=>this.handleButtonPopoutEvent()))),this._maximiseEnabled&&(this._maximiseButton=new Kt(this,this._maximiseLabel,"lm_maximise",(t=>this.handleButtonMaximiseToggleEvent(t)))),this._configClosable&&(this._closeButton=new Kt(this,this._closeLabel,"lm_close",(()=>s()))),this.processTabDropdownActiveChanged()}get show(){return this._show}get side(){return this._side}get leftRightSided(){return this._leftRightSided}get layoutManager(){return this._layoutManager}get parent(){return this._parent}get tabs(){return this._tabsContainer.tabs}get lastVisibleTabIndex(){return this._tabsContainer.lastVisibleTabIndex}get element(){return this._element}get tabsContainerElement(){return this._tabsContainer.element}get controlsContainerElement(){return this._controlsContainerElement}destroy(){this.emit("destroy"),this._popoutEvent=void 0,this._maximiseToggleEvent=void 0,this._clickEvent=void 0,this._touchStartEvent=void 0,this._componentRemoveEvent=void 0,this._componentFocusEvent=void 0,this._componentDragStartEvent=void 0,this._tabsContainer.destroy(),globalThis.document.removeEventListener("mouseup",this._documentMouseUpListener),this._element.remove()}createTab(t,e){this._tabsContainer.createTab(t,e)}removeTab(t){this._tabsContainer.removeTab(t)}processActiveComponentChanged(t){this._tabsContainer.processActiveComponentChanged(t),this.updateTabSizes()}setSide(t){this._side=t,this._leftRightSided=[nt.right,nt.left].includes(this._side)}setRowColumnClosable(t){this._rowColumnClosable=t,this.updateClosability()}updateClosability(){let t;if(this._configClosable)if(this._rowColumnClosable){t=!0;const e=this.tabs.length;for(let i=0;i1}applyFocusedValue(t){t?this._element.classList.add("lm_focused"):this._element.classList.remove("lm_focused")}processMaximised(){if(void 0===this._maximiseButton)throw new J("HPMAX16997");this._maximiseButton.element.setAttribute("title",this._minimiseLabel)}processMinimised(){if(void 0===this._maximiseButton)throw new J("HPMIN16997");this._maximiseButton.element.setAttribute("title",this._maximiseLabel)}updateTabSizes(){if(this._tabsContainer.tabCount>0){const t=this._show?this._layoutManager.layoutConfig.dimensions.headerHeight:0;let e;this._leftRightSided?(this._element.style.height="",this._element.style.width=zt(t)):(this._element.style.width="",this._element.style.height=zt(t)),e=this._leftRightSided?this._element.offsetHeight-this._controlsContainerElement.offsetHeight-this._tabControlOffset:this._element.offsetWidth-this._controlsContainerElement.offsetWidth-this._tabControlOffset,this._tabsContainer.updateTabSizes(e,this._getActiveComponentItemEvent())}}handleTabInitiatedComponentRemoveEvent(t){if(this._canRemoveComponent){if(void 0===this._componentRemoveEvent)throw new J("HHTCE22294");this._componentRemoveEvent(t)}}handleTabInitiatedComponentFocusEvent(t){if(void 0===this._componentFocusEvent)throw new J("HHTAE22294");this._componentFocusEvent(t)}handleTabInitiatedDragStartEvent(t,e,i,n){if(this._canRemoveComponent){if(void 0===this._componentDragStartEvent)throw new J("HHTDSE22294");this._componentDragStartEvent(t,e,i,n)}else i.cancelDrag()}processTabDropdownActiveChanged(){void 0!==this._tabDropdownButton&&Dt(this._tabDropdownButton.element,this._tabsContainer.dropdownActive)}handleButtonPopoutEvent(){if(this._layoutManager.layoutConfig.settings.popoutWholeStack){if(void 0===this._popoutEvent)throw new J("HHBPOE17834");this._popoutEvent()}else{const t=this._getActiveComponentItemEvent();t&&t.popout()}}handleButtonMaximiseToggleEvent(t){if(void 0===this._maximiseToggleEvent)throw new J("HHBMTE16834");this._maximiseToggleEvent()}onClick(t){t.target===this._element&&this.notifyClick(t)}onTouchStart(t){t.target===this._element&&this.notifyTouchStart(t)}notifyClick(t){if(void 0===this._clickEvent)throw new J("HNHC46834");this._clickEvent(t)}notifyTouchStart(t){if(void 0===this._touchStartEvent)throw new J("HNHTS46834");this._touchStartEvent(t)}}class ee extends $t{constructor(t,e,i){var n,o,s,r,a,l,h,d,c,m,u,p,g,f,v,_,y,C,w;super(t,e,i,ee.createElement(document)),this._headerSideChanged=!1,this._resizeListener=()=>this.handleResize(),this._maximisedListener=()=>this.handleMaximised(),this._minimisedListener=()=>this.handleMinimised(),this._headerConfig=e.header;const I=t.layoutConfig.header,b=e.content;let S;if(1!==b.length)S=void 0;else{S=b[0].header}this._initialWantMaximise=e.maximised,this._initialActiveItemIndex=null!==(n=e.activeItemIndex)&&void 0!==n?n:0;const E=null!==(r=null!==(s=null===(o=this._headerConfig)||void 0===o?void 0:o.show)&&void 0!==s?s:null==S?void 0:S.show)&&void 0!==r?r:I.show,x=null!==(h=null!==(l=null===(a=this._headerConfig)||void 0===a?void 0:a.popout)&&void 0!==l?l:null==S?void 0:S.popout)&&void 0!==h?h:I.popout,L=null!==(m=null!==(c=null===(d=this._headerConfig)||void 0===d?void 0:d.maximise)&&void 0!==c?c:null==S?void 0:S.maximise)&&void 0!==m?m:I.maximise,z=null!==(g=null!==(p=null===(u=this._headerConfig)||void 0===u?void 0:u.close)&&void 0!==p?p:null==S?void 0:S.close)&&void 0!==g?g:I.close,M=null!==(_=null!==(v=null===(f=this._headerConfig)||void 0===f?void 0:f.minimise)&&void 0!==v?v:null==S?void 0:S.minimise)&&void 0!==_?_:I.minimise,P=null!==(w=null!==(C=null===(y=this._headerConfig)||void 0===y?void 0:y.tabDropdown)&&void 0!==C?C:null==S?void 0:S.tabDropdown)&&void 0!==w?w:I.tabDropdown;this._maximisedEnabled=!1!==L;const T={show:!1!==E,side:!1===E?nt.top:E,popoutEnabled:!1!==x,popoutLabel:!1===x?"":x,maximiseEnabled:this._maximisedEnabled,maximiseLabel:!1===L?"":L,closeEnabled:!1!==z,closeLabel:!1===z?"":z,minimiseEnabled:!0,minimiseLabel:M,tabDropdownEnabled:!1!==P,tabDropdownLabel:!1===P?"":P};this._header=new te(t,this,T,e.isClosable&&!1!==z,(()=>this.getActiveComponentItem()),(()=>this.remove()),(()=>this.handlePopoutEvent()),(()=>this.toggleMaximise()),(t=>this.handleHeaderClickEvent(t)),(t=>this.handleHeaderTouchStartEvent(t)),(t=>this.handleHeaderComponentRemoveEvent(t)),(t=>this.handleHeaderComponentFocusEvent(t)),((t,e,i,n)=>this.handleHeaderComponentStartDragEvent(t,e,i,n))),this.isStack=!0,this._childElementContainer=document.createElement("section"),this._childElementContainer.classList.add("lm_items"),this.on("resize",this._resizeListener),this._maximisedEnabled&&(this.on("maximised",this._maximisedListener),this.on("minimised",this._minimisedListener)),this.element.appendChild(this._header.element),this.element.appendChild(this._childElementContainer),this.setupHeaderPosition(),this._header.updateClosability()}get childElementContainer(){return this._childElementContainer}get header(){return this._header}get headerShow(){return this._header.show}get headerSide(){return this._header.side}get headerLeftRightSided(){return this._header.leftRightSided}get contentAreaDimensions(){return this._contentAreaDimensions}get initialWantMaximise(){return this._initialWantMaximise}get isMaximised(){return this===this.layoutManager.maximisedStack}get stackParent(){if(!this.parent)throw new Error("Stack should always have a parent");return this.parent}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}init(){if(!0===this.isInitialised)return;this.updateNodeSize();for(let t=0;t0){if(this._initialActiveItemIndex<0||this._initialActiveItemIndex>=e)throw new Error(`ActiveItemIndex out of range: ${this._initialActiveItemIndex} id: ${this.id}`);for(let i=0;ithis.contentItems.length)throw e-=1,new X("SAC99728");if(t instanceof jt)return e=super.addChild(t,e),this._childElementContainer.appendChild(t.element),this._header.createTab(t,e),this.setActiveComponentItem(t,i),this._header.updateTabSizes(),this.updateSize(!1),t.container.setBaseLogicalZIndex(),this._header.updateClosability(),this.emitStateChangedEvent(),e;throw new X("SACC88532")}removeChild(t,e){const i=t,n=this.contentItems.indexOf(i),o=1===this.contentItems.length;if(this._activeComponentItem===i&&(i.focused&&i.blur(),!o)){const t=0===n?1:n-1;this.setActiveComponentItem(this.contentItems[t],!1)}this._header.removeTab(i),super.removeChild(i,e),o||this._header.updateClosability(),this.emitStateChangedEvent()}toggleMaximise(){this.isMaximised?this.minimise():this.maximise()}maximise(){if(!this.isMaximised){this.layoutManager.setMaximisedStack(this);const t=this.contentItems,e=t.length;for(let i=0;i0&&void 0===t)throw new Error("expected non-empty stack to have an active component item");return{type:"stack",content:this.calculateConfigContent(),size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,isClosable:this.isClosable,maximised:this.isMaximised,header:this.createHeaderConfig(),activeItemIndex:t}}onDrop(t,e){if("header"===this._dropSegment){if(this.resetHeaderDropZone(),void 0===this._dropIndex)throw new J("SODDI68990");return void this.addChild(t,this._dropIndex)}if("body"===this._dropSegment)return void this.addChild(t,0,!0);const i="top"===this._dropSegment||"bottom"===this._dropSegment,n="left"===this._dropSegment||"right"===this._dropSegment,o="top"===this._dropSegment||"left"===this._dropSegment,s=i&&this.stackParent.isColumn||n&&this.stackParent.isRow;if(t.isComponent){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createAndInitContentItem(e,this);i.addChild(t),t=i}if(t.type===at.row||t.type===at.column){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}if(s){const e=this.stackParent.contentItems.indexOf(this);this.stackParent.addChild(t,o?e:e+1,!0),this.size*=.5,t.size=this.size,t.sizeUnit=this.sizeUnit,this.stackParent.updateSize(!1)}else{const e=i?at.column:at.row,n=ct.createDefault(e),s=this.layoutManager.createContentItem(n,this);this.stackParent.replaceChild(this,s),s.addChild(t,o?0:void 0,!0),s.addChild(this,o?void 0:0,!0),this.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}highlightDropZone(t,e){for(const i in this._contentAreaDimensions){const n=i,o=this._contentAreaDimensions[n].hoverArea;if(o.x1t&&o.y1e)return void("header"===n?(this._dropSegment="header",this.highlightHeaderDropZone(this._header.leftRightSided?e:t)):(this.resetHeaderDropZone(),this.highlightBodyDropZone(n)))}}getArea(){if("none"===this.element.style.display)return null;const t=super.getElementArea(this._header.element),e=super.getElementArea(this._childElementContainer);if(null===t||null===e)throw new K("SGAHC13086");const i=e.x2-e.x1,n=e.y2-e.y1;return this._contentAreaDimensions={header:{hoverArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2},highlightArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2}}},0===this.contentItems.length?(this._contentAreaDimensions.body={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2}},super.getElementArea(this.element)):(this._contentAreaDimensions.left={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x1+.25*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x1+.5*i,y2:e.y2}},this._contentAreaDimensions.top={hoverArea:{x1:e.x1+.25*i,y1:e.y1,x2:e.x1+.75*i,y2:e.y1+.5*n},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y1+.5*n}},this._contentAreaDimensions.right={hoverArea:{x1:e.x1+.75*i,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1+.5*i,y1:e.y1,x2:e.x2,y2:e.y2}},this._contentAreaDimensions.bottom={hoverArea:{x1:e.x1+.25*i,y1:e.y1+.5*n,x2:e.x1+.75*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1+.5*n,x2:e.x2,y2:e.y2}},super.getElementArea(this.element))}positionHeader(t){this._header.side!==t&&(this._header.setSide(t),this._headerSideChanged=!0,this.setupHeaderPosition())}updateNodeSize(){if("none"!==this.element.style.display){const t=kt(this.element);if(this._header.show){t[this._header.leftRightSided?it.width:it.height]-=this.layoutManager.layoutConfig.dimensions.headerHeight}this._childElementContainer.style.width=zt(t.width),this._childElementContainer.style.height=zt(t.height);for(let e=0;e=o&&tthis.onDrag(t,e,i))),this._dragListener.on("dragStop",(()=>this.onDrop())),this.createDragProxyElements(t,e),null===this._componentItem.parent)throw new K("DPC10097");this._componentItemFocused=this._componentItem.focused,this._componentItemFocused&&this._componentItem.blur(),this._componentItem.parent.removeChild(this._componentItem,!0),this.setDimensions(),document.body.appendChild(this._element),this.determineMinMaxXY(),this._layoutManager.calculateItemAreas(),this.setDropPosition(t,e)}get element(){return this._element}createDragProxyElements(t,e){this._element=document.createElement("div"),this._element.classList.add("lm_dragProxy");const i=document.createElement("div");i.classList.add("lm_header");const n=document.createElement("div");n.classList.add("lm_tabs");const o=document.createElement("div");o.classList.add("lm_tab");const s=document.createElement("span");s.classList.add("lm_title"),o.appendChild(s),n.appendChild(o),i.appendChild(n),this._proxyContainerElement=document.createElement("div"),this._proxyContainerElement.classList.add("lm_content"),this._element.appendChild(i),this._element.appendChild(this._proxyContainerElement),this._originalParent instanceof ee&&this._originalParent.headerShow&&(this._sided=this._originalParent.headerLeftRightSided,this._element.classList.add("lm_"+this._originalParent.headerSide),[nt.right,nt.bottom].indexOf(this._originalParent.headerSide)>=0&&this._proxyContainerElement.insertAdjacentElement("afterend",i)),this._element.style.left=zt(t),this._element.style.top=zt(e),o.setAttribute("title",this._componentItem.title),s.insertAdjacentText("afterbegin",this._componentItem.title),this._proxyContainerElement.appendChild(this._componentItem.element)}determineMinMaxXY(){const t=this._layoutManager.groundItem;if(void 0===t)throw new J("DPDMMXY73109");{const e=t.element.getBoundingClientRect();this._minX=e.left+document.body.scrollLeft,this._minY=e.top+document.body.scrollTop,this._maxX=this._minX+e.width,this._maxY=this._minY+e.height}}onDrag(t,e,i){const n=i.pageX,o=i.pageY;this.setDropPosition(n,o),this._componentItem.drag()}setDropPosition(t,e){this._layoutManager.layoutConfig.settings.constrainDragToContainer&&(t<=this._minX?t=Math.ceil(this._minX):t>=this._maxX&&(t=Math.floor(this._maxX)),e<=this._minY?e=Math.ceil(this._minY):e>=this._maxY&&(e=Math.floor(this._maxY))),this._element.style.left=zt(t),this._element.style.top=zt(e),this._area=this._layoutManager.getArea(t,e),null!==this._area&&(this._lastValidArea=this._area,this._area.contentItem.highlightDropZone(t,e,this._area))}onDrop(){const t=this._layoutManager.dropTargetIndicator;if(null===t)throw new K("DPOD30011");let e;if(t.hide(),this._componentItem.exitDragMode(),null!==this._area)e=this._componentItem,this._area.contentItem.onDrop(e,this._area);else if(null!==this._lastValidArea){e=this._componentItem;this._lastValidArea.contentItem.onDrop(e,this._lastValidArea)}else this._originalParent?(e=this._componentItem,this._originalParent.addChild(e)):this._componentItem.destroy();this._element.remove(),this._layoutManager.emit("itemDropped",this._componentItem),this._componentItemFocused&&void 0!==e&&e.focus()}setDimensions(){const t=this._layoutManager.layoutConfig.dimensions;if(void 0===t)throw new Error("DragProxy.setDimensions: dimensions undefined");let e=t.dragProxyWidth,i=t.dragProxyHeight;if(void 0===e||void 0===i)throw new Error("DragProxy.setDimensions: width and/or height undefined");const n=!1===this._layoutManager.layoutConfig.header.show?0:t.headerHeight;this._element.style.width=zt(e),this._element.style.height=zt(i),e-=this._sided?n:0,i-=this._sided?0:n,this._proxyContainerElement.style.width=zt(e),this._proxyContainerElement.style.height=zt(i),this._componentItem.enterDragMode(e,i),this._componentItem.show()}}class ne{constructor(t,e,i,n,o,s,r){this._layoutManager=t,this._element=e,this._extraAllowableChildTargets=i,this._componentTypeOrFtn=n,this._componentState=o,this._title=s,this._id=r,this._dragListener=null,this._dummyGroundContainer=document.createElement("div");const a=gt.createDefault("row");this._dummyGroundContentItem=new Yt(this._layoutManager,a,this._dummyGroundContainer),this.createDragListener()}destroy(){this.removeDragListener()}createDragListener(){this.removeDragListener(),this._dragListener=new Zt(this._element,this._extraAllowableChildTargets),this._dragListener.on("dragStart",((t,e)=>this.onDragStart(t,e))),this._dragListener.on("dragStop",(()=>this.onDragStop()))}onDragStart(t,e){var i;const n="component";let o;if("function"==typeof this._componentTypeOrFtn){const t=this._componentTypeOrFtn();o=ne.isDragSourceComponentItemConfig(t)?{type:n,componentState:t.state,componentType:t.type,title:null!==(i=t.title)&&void 0!==i?i:this._title}:t}else o={type:n,componentState:this._componentState,componentType:this._componentTypeOrFtn,title:this._title,id:this._id};const s=bt.resolve(o,!1),r=new jt(this._layoutManager,s,this._dummyGroundContentItem);if(this._dummyGroundContentItem.contentItems.push(r),null===this._dragListener)throw new K("DSODSD66746");{const i=new ie(t,e,this._dragListener,this._layoutManager,r,this._dummyGroundContentItem),n=this._layoutManager.transitionIndicator;if(null===n)throw new K("DSODST66746");n.transitionElements(this._element,i.element)}}onDragStop(){this.createDragListener()}removeDragListener(){null!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=null)}}!function(t){t.isDragSourceComponentItemConfig=function(t){return!("componentType"in t)}}(ne||(ne={}));class oe{constructor(){this._element=document.createElement("div"),this._element.classList.add("lm_dropTargetIndicator");const t=document.createElement("div");t.classList.add("lm_inner"),this._element.appendChild(t),document.body.appendChild(this._element)}destroy(){this._element.remove()}highlightArea(t,e){this._element.style.left=zt(t.x1+e),this._element.style.top=zt(t.y1+e),this._element.style.width=zt(t.x2-t.x1-e),this._element.style.height=zt(t.y2-t.y1-e),this._element.style.display="block"}hide(){Dt(this._element,!1)}}class se{constructor(){this._element=document.createElement("div"),this._element.classList.add("lm_transition_indicator"),document.body.appendChild(this._element),this._toElement=null,this._fromDimensions=null,this._totalAnimationDuration=200,this._animationStartTime=null}destroy(){this._element.remove()}transitionElements(t,e){}nextAnimationFrame(){}measure(t){const e=t.getBoundingClientRect();return{left:e.left,top:e.top,width:t.offsetWidth,height:t.offsetHeight}}}class re extends Wt{constructor(t){super(),this._layoutManager=t,this._childEventListener=t=>this.onEventFromChild(t),globalThis.addEventListener(re.ChildEventName,this._childEventListener,{passive:!0})}emit(t,...e){"userBroadcast"===t?this.emitUserBroadcast(...e):super.emit(t,...e)}emitUserBroadcast(...t){this.handleUserBroadcastEvent("userBroadcast",t)}destroy(){globalThis.removeEventListener(re.ChildEventName,this._childEventListener)}handleUserBroadcastEvent(t,e){this._layoutManager.isSubWindow?this.propagateToParent(t,e):this.propagateToThisAndSubtree(t,e)}onEventFromChild(t){const e=t.detail;this.handleUserBroadcastEvent(e.eventName,e.args)}propagateToParent(t,e){const i={bubbles:!0,cancelable:!0,detail:{layoutManager:this._layoutManager,eventName:t,args:e}},n=new CustomEvent(re.ChildEventName,i),o=globalThis.opener;if(null===o)throw new K("EHPTP15778");o.dispatchEvent(n)}propagateToThisAndSubtree(t,e){this.emitUnknown(t,...e);for(let i=0;ithis.handleContainerResize())),this._windowBeforeUnloadListener=()=>this.onBeforeUnload(),this._windowBeforeUnloadListening=!1,this._maximisedStackBeforeDestroyedListener=t=>this.cleanupBeforeMaximisedStackDestroyed(t),this.isSubWindow=t.isSubWindow,this._constructorOrSubWindowLayoutConfig=t.constructorOrSubWindowLayoutConfig,Q.checkInitialise(),dt.checkInitialise(),void 0!==t.containerElement&&(this._containerElement=t.containerElement)}get container(){return this._containerElement}get isInitialised(){return this._isInitialised}get groundItem(){return this._groundItem}get root(){return this._groundItem}get openPopouts(){return this._openPopouts}get dropTargetIndicator(){return this._dropTargetIndicator}get transitionIndicator(){return this._transitionIndicator}get width(){return this._width}get height(){return this._height}get eventHub(){return this._eventHub}get rootItem(){if(void 0===this._groundItem)throw new Error("Cannot access rootItem before init");return 0===this._groundItem.contentItems.length?void 0:this._groundItem.contentItems[0]}get focusedComponentItem(){return this._focusedComponentItem}get tabDropPlaceholder(){return this._tabDropPlaceholder}get maximisedStack(){return this._maximisedStack}get deprecatedConstructor(){return!this.isSubWindow&&void 0!==this._constructorOrSubWindowLayoutConfig}destroy(){if(this._isInitialised){this._windowBeforeUnloadListening&&(globalThis.removeEventListener("beforeunload",this._windowBeforeUnloadListener),this._windowBeforeUnloadListening=!1),!0===this.layoutConfig.settings.closePopoutsOnUnload&&this.closeAllOpenPopouts(),this._resizeObserver.disconnect(),this.checkClearResizeTimeout(),void 0!==this._groundItem&&this._groundItem.destroy(),this._tabDropPlaceholder.remove(),null!==this._dropTargetIndicator&&this._dropTargetIndicator.destroy(),null!==this._transitionIndicator&&this._transitionIndicator.destroy(),this._eventHub.destroy();for(const t of this._dragSources)t.destroy();this._dragSources=[],this._isInitialised=!1}}minifyConfig(t){return _t.minifyConfig(t)}unminifyConfig(t){return _t.unminifyConfig(t)}init(){let t;if(this.setContainer(),this._dropTargetIndicator=new oe,this._transitionIndicator=new se,this.updateSizeFromContainer(),this.isSubWindow){if(void 0===this._constructorOrSubWindowLayoutConfig)throw new J("LMIU07155");{const e=this._constructorOrSubWindowLayoutConfig.root;if(void 0===e)throw new X("LMIC07156");if(!Ct.isComponent(e))throw new X("LMIC07157");t=e;const i=xt.resolve(this._constructorOrSubWindowLayoutConfig);this.layoutConfig=Object.assign(Object.assign({},i),{root:void 0})}}else void 0===this._constructorOrSubWindowLayoutConfig?this.layoutConfig=_t.createDefault():this.layoutConfig=xt.resolve(this._constructorOrSubWindowLayoutConfig);const e=this.layoutConfig;this._groundItem=new Yt(this,e.root,this._containerElement),this._groundItem.init(),this.checkLoadedLayoutMaximiseItem(),this._resizeObserver.observe(this._containerElement),this._isInitialised=!0,this.adjustColumnsResponsive(),this.emit("initialised"),void 0!==t&&this.loadComponentAsRoot(t)}loadLayout(t){if(!this.isInitialised)throw new Error("GoldenLayout: Need to call init() if LayoutConfig with defined root passed to constructor");if(void 0===this._groundItem)throw new J("LMLL11119");this.createSubWindows(),this.layoutConfig=xt.resolve(t),this._groundItem.loadRoot(this.layoutConfig.root),this.checkLoadedLayoutMaximiseItem(),this.adjustColumnsResponsive()}saveLayout(){if(!1===this._isInitialised)throw new Error("Can't create config, layout not yet initialised");if(void 0===this._groundItem)throw new J("LMTC18244");{const t=this._groundItem.calculateConfigContent();let e;e=1!==t.length?void 0:t[0],this.reconcilePopoutWindows();const i=[];for(let t=0;t=0?n=this._groundItem.contentItems[0]:e=0;break;case at.row:case at.column:e=n.addItem(t,i.index);break;case at.stack:if(Ct.isComponent(t)){e=n.addItem(t,i.index);break}throw Error(tt[6]);case at.component:throw new X("LMAIALC87444602");default:throw new Y("LMAIALU98881733",n.type)}if(Ct.isComponent(t)){const t=n.contentItems[e];Gt.isStack(t)&&(n=t,e=0)}return i.parentItem=n,i.index=e,i}}}loadComponentAsRoot(t){if(void 0===this._groundItem)throw new Error("Cannot add item before init");this._groundItem.loadComponentAsRoot(t)}updateSize(t,e){this.setSize(t,e)}setSize(t,e){if(this._width=t,this._height=e,!0===this._isInitialised){if(void 0===this._groundItem)throw new J("LMUS18881");if(this._groundItem.setSize(this._width,this._height),this._maximisedStack){const{width:t,height:e}=kt(this._containerElement);Tt(this._maximisedStack.element,t),At(this._maximisedStack.element,e),this._maximisedStack.updateSize(!1)}this.adjustColumnsResponsive()}}beginSizeInvalidation(){this._sizeInvalidationBeginCount++}endSizeInvalidation(){0==--this._sizeInvalidationBeginCount&&this.updateSizeFromContainer()}updateSizeFromContainer(){const{width:t,height:e}=kt(this._containerElement);this.setSize(t,e)}updateRootSize(t=!1){if(void 0===this._groundItem)throw new J("LMURS28881");this._groundItem.updateSize(t)}createAndInitContentItem(t,e){const i=this.createContentItem(t,e);return i.init(),i}createContentItem(t,e){if("string"!=typeof t.type)throw new G("Missing parameter 'type'",JSON.stringify(t));if(ct.isComponentItem(t)&&!(e instanceof ee)&&e&&!(!0===this.isSubWindow&&e instanceof Yt)){t={type:at.stack,content:[t],size:t.size,sizeUnit:t.sizeUnit,minSize:t.minSize,minSizeUnit:t.minSizeUnit,id:t.id,maximised:t.maximised,isClosable:t.isClosable,activeItemIndex:0,header:void 0}}return this.createContentItemFromConfig(t,e)}findFirstComponentItemById(t){if(void 0===this._groundItem)throw new J("LMFFCIBI82446");return this.findFirstContentItemTypeByIdRecursive(at.component,t,this._groundItem)}createPopout(t,e,i,n){return t instanceof Gt?this.createPopoutFromContentItem(t,e,i,n):this.createPopoutFromItemConfig(t,e,i,n)}createPopoutFromContentItem(t,e,i,n){let o=t.parent,s=t;for(;null!==o&&1===o.contentItems.length&&!o.isGround;)s=o,o=o.parent;if(null===o)throw new K("LMCPFCI00834");{if(void 0===n&&(n=o.contentItems.indexOf(s)),null!==i&&o.addPopInParentId(i),void 0===e){const i=globalThis.screenX||globalThis.screenLeft,n=globalThis.screenY||globalThis.screenTop,o=t.element.offsetLeft,s=t.element.offsetTop,{width:r,height:a}=kt(t.element);e={left:i+o,top:n+s,width:r,height:a}}const r=t.toConfig();if(t.remove(),ft.isRootItemConfig(r))return this.createPopoutFromItemConfig(r,e,i,n);throw new Error(`${tt[0]}`)}}beginVirtualSizedContainerAdding(){0==++this._virtualSizedContainerAddingBeginCount&&(this._virtualSizedContainers.length=0)}addVirtualSizedContainer(t){this._virtualSizedContainers.push(t)}endVirtualSizedContainerAdding(){if(0==--this._virtualSizedContainerAddingBeginCount){const t=this._virtualSizedContainers.length;if(t>0){this.fireBeforeVirtualRectingEvent(t);for(let e=0;ethis.emit("windowOpened",a))),a.on("closed",(()=>this.reconcilePopoutWindows())),this._openPopouts.push(a),this.layoutConfig.settings.closePopoutsOnUnload&&!this._windowBeforeUnloadListening&&(globalThis.addEventListener("beforeunload",this._windowBeforeUnloadListener,{passive:!0}),this._windowBeforeUnloadListening=!0),a}closeAllOpenPopouts(){for(let t=0;tglobalThis.close()),1)}getArea(t,e){let i=null,n=1/0;for(let o=0;o=s.x1&&t=s.y1&&es.surface&&(n=s.surface,i=s)}return i}calculateItemAreas(){const t=this.getAllContentItems(),e=this._groundItem;if(void 0===e)throw new J("LMCIAR44365");if(1!==t.length){e.contentItems[0].isStack?this._itemAreas=[]:this._itemAreas=e.createSideAreas();for(let e=0;e0){let e=t[0];if(Gt.isComponentItem(e)){const t=e.parent;if(null===t)throw new K("LMXLLMI69999");e=t}if(!Gt.isStack(e))throw new X("LMCLLMI19993");e.maximise()}}}processMaximiseStack(t){if(this._maximisedStack=t,t.on("beforeItemDestroyed",this._maximisedStackBeforeDestroyedListener),t.element.classList.add("lm_maximised"),t.element.insertAdjacentElement("afterend",this._maximisePlaceholder),void 0===this._groundItem)throw new J("LMMXI19993");{this._groundItem.element.prepend(t.element);const{width:e,height:i}=kt(this._containerElement);Tt(t.element,e),At(t.element,i),t.updateSize(!0),t.focusActiveContentItem(),this._maximisedStack.emit("maximised"),this.emit("stateChanged")}}processMinimiseMaximisedStack(){if(void 0===this._maximisedStack)throw new X("LMMMS74422");{const t=this._maximisedStack;if(null===t.parent)throw new K("LMMI13668");t.element.classList.remove("lm_maximised"),this._maximisePlaceholder.insertAdjacentElement("afterend",t.element),this._maximisePlaceholder.remove(),this.updateRootSize(!0),this._maximisedStack=void 0,t.off("beforeItemDestroyed",this._maximisedStackBeforeDestroyedListener),t.emit("minimised"),this.emit("stateChanged")}}reconcilePopoutWindows(){const t=[];for(let e=0;e{this._resizeTimeoutId=void 0,this.beginSizeInvalidation(),this.endSizeInvalidation()}),this.resizeDebounceInterval))}checkClearResizeTimeout(){void 0!==this._resizeTimeoutId&&(clearTimeout(this._resizeTimeoutId),this._resizeTimeoutId=void 0)}setContainer(){var t;const e=document.body,i=null!==(t=this._containerElement)&&void 0!==t?t:e;if(i===e){this.resizeWithContainerAutomatically=!0;const t=document.documentElement;t.style.height="100%",t.style.margin="0",t.style.padding="0",t.style.overflow="clip",e.style.height="100%",e.style.margin="0",e.style.padding="0",e.style.overflow="clip"}this._containerElement=i}onBeforeUnload(){this.destroy()}adjustColumnsResponsive(){if(void 0===this._groundItem)throw new J("LMACR20883");if(this._firstLoad=!1,this.useResponsiveLayout()&&!this._updatingColumnsResponsive&&this._groundItem.contentItems.length>0&&this._groundItem.contentItems[0].isRow){if(void 0===this._groundItem||null===this._width)throw new J("LMACR77412");{const t=this._groundItem.contentItems[0].contentItems.length;if(t<=1)return;{const e=this.layoutConfig.dimensions.defaultMinItemWidth;if(t*e<=this._width)return;{this._updatingColumnsResponsive=!0;const i=t-Math.max(Math.floor(this._width/e),1),n=this._groundItem.contentItems[0],o=this.getAllStacks();if(0===o.length)throw new X("LMACRS77413");{const t=o[0];for(let e=0;en?void 0:{parentItem:t,index:o}}}case 1:if(void 0===this._focusedComponentItem)return;{const t=this._focusedComponentItem.parentItem;return this.tryCreateLocationFromParentItem(t,e)}case 2:{const t=this.findFirstContentItemType(at.stack);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 3:{let t=this.findFirstContentItemType(at.row);return void 0!==t?this.tryCreateLocationFromParentItem(t,e):(t=this.findFirstContentItemType(at.column),void 0!==t?this.tryCreateLocationFromParentItem(t,e):void 0)}case 4:{const t=this.findFirstContentItemType(at.row);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 5:{const t=this.findFirstContentItemType(at.column);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 6:if(void 0===this._groundItem)throw new J("LMFLRIF18244");return void 0!==this.rootItem?void 0:void 0===e||0===e?{parentItem:this._groundItem,index:0}:void 0;case 7:if(void 0===this._groundItem)throw new J("LMFLF18244");{const t=this._groundItem.contentItems;if(0===t.length)return void 0===e||0===e?{parentItem:this._groundItem,index:0}:void 0;{const i=t[0];return this.tryCreateLocationFromParentItem(i,e)}}}}tryCreateLocationFromParentItem(t,e){const i=t.contentItems.length;return void 0===e?{parentItem:t,index:i}:e<0||e>i?void 0:{parentItem:t,index:e}}}!function(t){t.createMaximisePlaceElement=function(t){const e=t.createElement("div");return e.classList.add("lm_maximise_place"),e},t.createTabDropPlaceholderElement=function(t){const e=t.createElement("div");return e.classList.add("lm_drop_tab_placeholder"),e},t.defaultLocationSelectors=[{typeId:1,index:void 0},{typeId:2,index:void 0},{typeId:3,index:void 0},{typeId:7,index:void 0}],t.afterFocusedItemIfPossibleLocationSelectors=[{typeId:0,index:1},{typeId:2,index:void 0},{typeId:3,index:void 0},{typeId:7,index:void 0}]}(ae||(ae={}));class le extends ae{constructor(t,e,i,n){if(super(le.createLayoutManagerConstructorParameters(t,e)),this._bindComponentEventHanlderPassedInConstructor=!1,this._creationTimeoutPassed=!1,void 0!==e&&"function"==typeof e&&(this.bindComponentEvent=e,this._bindComponentEventHanlderPassedInConstructor=!0,void 0!==i&&(this.unbindComponentEvent=i)),!this._bindComponentEventHanlderPassedInConstructor&&this.isSubWindow){if(void 0===this._constructorOrSubWindowLayoutConfig)throw new J("VLC98823");{const t=xt.resolve(this._constructorOrSubWindowLayoutConfig);this.layoutConfig=Object.assign(Object.assign({},t),{root:void 0})}}!0!==n&&(this.deprecatedConstructor||this.init())}destroy(){this.bindComponentEvent=void 0,this.unbindComponentEvent=void 0,super.destroy()}init(){if(this._bindComponentEventHanlderPassedInConstructor||"loading"!==document.readyState&&null!==document.body){if(!this._bindComponentEventHanlderPassedInConstructor&&!0===this.isSubWindow&&!this._creationTimeoutPassed)return setTimeout((()=>this.init()),7),void(this._creationTimeoutPassed=!0);!0===this.isSubWindow&&(this._bindComponentEventHanlderPassedInConstructor||this.clearHtmlAndAdjustStylesForSubWindow(),window.__glInstance=this),super.init()}else document.addEventListener("DOMContentLoaded",(()=>this.init()),{passive:!0})}clearHtmlAndAdjustStylesForSubWindow(){const t=document.head,e=new Array(4);e[0]=document.querySelectorAll("body link"),e[1]=document.querySelectorAll("body style"),e[2]=document.querySelectorAll("template"),e[3]=document.querySelectorAll(".gl_keep");for(let i=0;ithis.emit("popIn"))),document.body.appendChild(t),!0}}bindComponent(t,e){if(void 0!==this.bindComponentEvent){return this.bindComponentEvent(t,e)}if(void 0!==this.getComponentEvent)return{virtual:!1,component:this.getComponentEvent(t,e)};{const t=`${tt[2]}: ${JSON.stringify(e)}`;throw new Z(t)}}unbindComponent(t,e,i){if(void 0!==this.unbindComponentEvent)this.unbindComponentEvent(t);else if(!e&&void 0!==this.releaseComponentEvent){if(void 0===i)throw new J("VCUCRCU333998");this.releaseComponentEvent(t,i)}}}!function(t){let e=!1;t.createLayoutManagerConstructorParameters=function(t,i){const n=e?null:new URL(document.location.href).searchParams.get("gl-window");e=!0;const o=null!==n;let s,r;if(null!==n){const e=localStorage.getItem(n);if(null===e)throw new Error("Null gl-window Config");localStorage.removeItem(n);const i=JSON.parse(e),o=_t.unminifyConfig(i);r=xt.fromResolved(o),t instanceof HTMLElement&&(s=t)}else void 0===t?r=void 0:t instanceof HTMLElement?(r=void 0,s=t):r=t,void 0===s&&i instanceof HTMLElement&&(s=i);return{constructorOrSubWindowLayoutConfig:r,isSubWindow:o,containerElement:s}}}(le||(le={}));class he extends le{constructor(t,e,i){super(t,e,i,!0),this._componentTypesMap=new Map,this._registeredComponentMap=new Map,this._virtuableComponentMap=new Map,this._containerVirtualRectingRequiredEventListener=(t,e,i)=>this.handleContainerVirtualRectingRequiredEvent(t,e,i),this._containerVirtualVisibilityChangeRequiredEventListener=(t,e)=>this.handleContainerVirtualVisibilityChangeRequiredEvent(t,e),this._containerVirtualZIndexChangeRequiredEventListener=(t,e,i)=>this.handleContainerVirtualZIndexChangeRequiredEvent(t,e,i),this.deprecatedConstructor||this.init()}registerComponent(t,e,i=!1){if("function"!=typeof e)throw new $("registerComponent() componentConstructorOrFactoryFtn parameter is not a function");if(e.hasOwnProperty("prototype")){const n=e;this.registerComponentConstructor(t,n,i)}else{const n=e;this.registerComponentFactoryFunction(t,n,i)}}registerComponentConstructor(t,e,i=!1){if("function"!=typeof e)throw new Error(tt[1]);if(void 0!==this._componentTypesMap.get(t))throw new Z(`${tt[3]}: ${t}`);this._componentTypesMap.set(t,{constructor:e,factoryFunction:void 0,virtual:i})}registerComponentFactoryFunction(t,e,i=!1){if("function"!=typeof e)throw new Z("Please register a constructor function");if(void 0!==this._componentTypesMap.get(t))throw new Z(`${tt[3]}: ${t}`);this._componentTypesMap.set(t,{constructor:void 0,factoryFunction:e,virtual:i})}registerComponentFunction(t){this.registerGetComponentConstructorCallback(t)}registerGetComponentConstructorCallback(t){if("function"!=typeof t)throw new Error("Please register a callback function");void 0!==this._getComponentConstructorFtn&&console.warn("Multiple component functions are being registered. Only the final registered function will be used."),this._getComponentConstructorFtn=t}getRegisteredComponentTypeNames(){const t=this._componentTypesMap.keys();return Array.from(t)}getComponentInstantiator(t){let e;const i=pt.resolveComponentTypeName(t);return void 0!==i&&(e=this._componentTypesMap.get(i)),void 0===e&&void 0!==this._getComponentConstructorFtn&&(e={constructor:this._getComponentConstructorFtn(t),factoryFunction:void 0,virtual:!1}),e}bindComponent(t,e){let i;const n=pt.resolveComponentTypeName(e);let o;if(void 0!==n&&(i=this._componentTypesMap.get(n)),void 0===i&&void 0!==this._getComponentConstructorFtn&&(i={constructor:this._getComponentConstructorFtn(e),factoryFunction:void 0,virtual:!1}),void 0!==i){const s=i.virtual;let r,a;r=void 0===e.componentState?void 0:Ut({},e.componentState);const l=i.constructor;if(void 0!==l)a=new l(t,r,s);else{const e=i.factoryFunction;if(void 0===e)throw new X("LMBCFFU10008");a=e(t,r,s)}if(s){if(void 0===a)throw new J("GLBCVCU988774");{const e=a,i=e.rootHtmlElement;if(void 0===i)throw new Z(`${tt[5]}: ${n}`);!function(t){const e="absolute";t.style.position!==e&&(t.style.position=e)}(i),this.container.appendChild(i),this._virtuableComponentMap.set(t,e),t.virtualRectingRequiredEvent=this._containerVirtualRectingRequiredEventListener,t.virtualVisibilityChangeRequiredEvent=this._containerVirtualVisibilityChangeRequiredEventListener,t.virtualZIndexChangeRequiredEvent=this._containerVirtualZIndexChangeRequiredEventListener}}this._registeredComponentMap.set(t,a),o={virtual:i.virtual,component:a}}else o=super.bindComponent(t,e);return o}unbindComponent(t,e,i){if(void 0===this._registeredComponentMap.get(t))super.unbindComponent(t,e,i);else{const e=this._virtuableComponentMap.get(t);if(void 0!==e){const i=e.rootHtmlElement;if(void 0===i)throw new X("GLUC77743",t.title);this.container.removeChild(i),this._virtuableComponentMap.delete(t)}}}fireBeforeVirtualRectingEvent(t){this._goldenLayoutBoundingClientRect=this.container.getBoundingClientRect(),super.fireBeforeVirtualRectingEvent(t)}handleContainerVirtualRectingRequiredEvent(t,e,i){const n=this._virtuableComponentMap.get(t);if(void 0===n)throw new J("GLHCSCE55933");{const o=n.rootHtmlElement;if(void 0===o)throw new Z(tt[4]+" "+t.title);{const n=t.element.getBoundingClientRect(),s=n.left-this._goldenLayoutBoundingClientRect.left;o.style.left=zt(s);const r=n.top-this._goldenLayoutBoundingClientRect.top;o.style.top=zt(r),Tt(o,e),At(o,i)}}}handleContainerVirtualVisibilityChangeRequiredEvent(t,e){const i=this._virtuableComponentMap.get(t);if(void 0===i)throw new J("GLHCVVCRE55934");{const n=i.rootHtmlElement;if(void 0===n)throw new Z(tt[4]+" "+t.title);Dt(n,e)}}handleContainerVirtualZIndexChangeRequiredEvent(t,e,i){const n=this._virtuableComponentMap.get(t);if(void 0===n)throw new J("GLHCVZICRE55935");{const e=n.rootHtmlElement;if(void 0===e)throw new Z(tt[4]+" "+t.title);e.style.zIndex=i}}}const de="initial_",ce={show:"top",popout:!1,maximise:!1,close:"close-tab-unused"},me={headerHeight:31},ue={hasHeaders:!0,reorderEnabled:!0},pe={popoutWholeStack:!1,constrainDragToContainer:!1,constrainDragToHeaders:!1,preventDragout:!1,showMaximiseIcon:!1,showPopoutIcon:!1,showCloseIcon:!1,blockedPopoutsThrowError:!0,closePopoutsOnUnload:!0,selectionEnabled:!1};var ge,fe;class ve{constructor(e){this.layout=e,ge.set(this,void 0),fe.set(this,void 0),this.handleResize=t=>{t.forEach((t=>this.resizeElement(t.target)))},this.handleMutation=()=>{this.layout.viewComponentsByContainerElement.forEach((t=>{this.resizeElement(t.container.element)}))},t.__classPrivateFieldSet(this,ge,new ResizeObserver(this.handleResize),"f"),t.__classPrivateFieldSet(this,fe,new MutationObserver(this.handleMutation),"f")}observeMutations(e){t.__classPrivateFieldGet(this,fe,"f")?.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["class"]})}destroy(){t.__classPrivateFieldGet(this,ge,"f").disconnect(),t.__classPrivateFieldGet(this,fe,"f").disconnect()}observeContainer(e){t.__classPrivateFieldGet(this,ge,"f").observe(e)}unobserveContainer(e){t.__classPrivateFieldGet(this,ge,"f").unobserve(e)}resizeElement(t){const e=this.layout.viewComponentsByContainerElement.get(t);e&&e.resize()}}ge=new WeakMap,fe=new WeakMap;var _e={};Object.defineProperty(_e,"__esModule",{value:!0});var ye=_e.BaseItem=void 0;class Ce{constructor(t,e,i){this._item=t,this._layout=e,this._wrap=i}get raw(){return this._item}get layout(){return this._layout}get type(){return this._item.type}get contentItems(){return(this._item.contentItems??[]).map((t=>this._wrap(t)))}get parent(){const t=this._item.parent;return t?this._wrap(t):null}setActiveContentItem(t,e){if("stack"!==this.type)throw new Error(`Cannot call setActiveContentItem from a non-stack item: ${this.type}`);this._item.setActiveContentItem(t.raw,e)}static wrapInternal(t,e,i){const n=Ce.wrapCache.get(e);if(n)return n;const o=new t(e,i,(e=>Ce.wrapInternal(t,e,i)));return Ce.wrapCache.set(e,o),o}}ye=_e.BaseItem=Ce,Ce.wrapCache=new WeakMap;const we=t=>!!t&&"contentItems"in t&&(t.isRow||t.isColumn);class Ie extends ye{isRoot(){return!!this._item.parent?.isGround}getBounds(){return this._item.element.getBoundingClientRect()}get viewName(){if(this._item.isComponent){const{component:t}=this._item;return t.identity.name}throw new Error("View name not found")}onDestroyed(t){const e=({target:i})=>{i===this._item&&(t(),this._item.off("itemDestroyed",e))};this._item.on("itemDestroyed",e)}createAdjacentStack({position:t="right"}={}){const e=this.raw;if(ee.isStack(e)&&e.parent){const i=["top","bottom"].includes(t)?"column":"row",n=["left","top"].includes(t)?1:0,o=we(e.parent)?e.parent:e.layoutManager,s=o,r=e.parent.contentItems.indexOf(e);e.parent.isGround&&e.parent.removeChild(e,!0);const a=o.newItem({type:i,content:[{type:"stack",content:[]}]},r);if(!a)throw new Error("createAdjacentStack: Failed to create new container");const l=a.contentItems[0];return a.addChild(this.raw,n),we(s)&&s.removeChild(e,!0),this._wrap(l)}throw new Error(`Cannot creat adjacent stacks for type: ${e.type}, must be type 'stack'`)}setActiveContentItem(t,e=!0){if(!ee.isStack(this._item))throw new Error(`Cannot call setActiveContentItem from a non-stack item: ${this.type}`);this._item.setActiveComponentItem(t.raw,!e)}static wrap(t,e){return ye.wrapInternal(Ie,t,e)}}function be(t=[],e){for(const i of t)"component"===i.type?Object.keys(e).forEach((t=>{t in i&&(i.componentState={[`${de}${t}`]:i[t],...i.componentState}),i[t]=e[t]})):be(i.content,e)}function Se(t=[],e,i){for(const n of t)if("component"===n.type)Object.keys(e).forEach((t=>{if(`${de}${t}`in n.componentState)return n[t]=n.componentState[`${de}${t}`],void delete n.componentState[`${de}${t}`];n[t]=e[t]}));else{if(n.size&&("row"===i||"column"===i)){n["row"===i?"width":"height"]=n.size?.includes(".")?parseFloat(n.size):parseInt(n.size)}Se(n.content,e,n.type)}}function Ee(t){if(t.root){t.root.content&&Se([t.root],{componentName:"view",isClosable:!0});const e=t.root;t.content=[e],delete t.root}return t}const xe=e=>class extends e{connectedCallback(){if(!this.name||!this.uuid)throw new Error(" Name or uuid attribute missing");if(!this.src)throw new Error(" missing 'src' attribute.");this.#t||(this.#t=document.createElement("iframe"),this.#t.src=this.src,this.#t.style.height="100%",this.#t.style.width="100%",this.#t.style.border="none",this.forceFrameName?this.#t.setAttribute("name",this.forceFrameName):this.#t.setAttribute("name",t.encodeOptions({brokerUrl:this.brokerUrl,name:this.name,uuid:this.uuid,providerId:this.providerId,contextGroup:this.contextGroup},"of-frame")),this.#t.setAttribute("id",this.name),this.appendChild(this.#t))}#t;get brokerUrl(){return this.getAttribute("of-broker")}set brokerUrl(t){t&&this.setAttribute("of-broker",t)}get name(){return this.getAttribute("of-name")}set name(t){t&&this.setAttribute("of-name",t)}get forceFrameName(){return this.getAttribute("forceFrameName")}set forceFrameName(t){t&&this.setAttribute("forceFrameName",t)}get uuid(){return this.getAttribute("of-uuid")}set uuid(t){t&&this.setAttribute("of-uuid",t)}get src(){return this.getAttribute("src")}set src(t){t&&this.setAttribute("src",t)}get providerId(){return this.getAttribute("of-provider-id")}set providerId(t){t&&this.setAttribute("of-provider-id",t)}get contextGroup(){return this.getAttribute("of-context-group")}set contextGroup(t){t&&this.setAttribute("of-context-group",t)}static get observedAttributes(){return["name"]}};class Le{static create(t){const e=document.createElement("of-view");return Object.entries(t).forEach((([t,i])=>{e.setAttribute(t,i)})),e}}customElements.define("of-view",xe(HTMLElement));class ze{constructor(t,i,n,{brokerUrl:o,interopConfig:s},r){this.container=t,this.config=i,this.ofView=null,this.isDragging=()=>this.container.tab.element?.className.includes("lm_dragging")??!1;const{url:a,web:l,interop:h,name:d}=i||{},c=d??`internal-generated-view-${e.v4()}`;if(this.identity={uuid:n,name:c},this.container.element.setAttribute("of-name",c),this.container.element.id=`container-${c}`,this.container.parent.id=c,void 0===a)return void this.handleUrlMissing();const m=this.updateTitleIfNotSet(a),u={"of-broker":o,"of-uuid":n,"of-name":c,src:a};l?.frameName&&(u.forceFrameName=l.frameName);const p=h?.currentContextGroup??s?.currentContextGroup;p&&(u["of-context-group"]=p),s?.providerId&&(u["of-provider-id"]=s?.providerId),this.ofView=Le.create(u),this.ofView.title=m??`Iframe: ${a}`,r.appendChild(this.ofView),this.ofView.style.position="absolute"}updateTitleIfNotSet(t){return"view"===this.container.parent.title&&this.container.parent.setTitle(t),this.container.parent.title}handleUrlMissing(){const t=document.createElement("div");t.setAttribute("style","padding: 20px");t.innerText="No URL provided",this.container.element.appendChild(t)}destroy(){this.ofView?.remove(),this.ofView=null}closeView(){this.container.close()}resize(){if(this.ofView){if(this.isDragging())return void(this.ofView.style.display="none");const t=this.container.element.getBoundingClientRect();this.ofView.style.position="absolute",this.ofView.style.height=`${t.height}px`,this.ofView.style.width=`${t.width}px`,this.ofView.style.inset=`${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`,this.ofView.style.display="block"}}}class Me extends U{static overrideConfig(t){const e={...ue,...t.settings,...pe};return e.reorderEnabled?be(t.content,{isClosable:!0}):be(t.content,{reorderEnabled:!1}),{dimensions:me,...t,settings:e,header:{...ce,show:!1!==t.settings?.hasHeaders&&ce.show}}}constructor(t,e,i,{options:n},o,s){super(),this.identity=t,this.container=e,this.initialConfig=i,this.layoutManager=o,this.platformProvider=s,this.viewComponentsByContainerElement=new Map,this.layoutContentCache=_.getSingleInstance(),this.reparentingViews=new Set,this.goldenLayoutDestroyed=!1,this.createViewComponent=(t,e)=>{m.handleSharedView(this.layoutManager,this.identity,e);const i=new ze(t,e,this.identity.uuid,this.options,this.iframeContainer);return e&&!1===e[`${de}isClosable`]&&this.stylesheet.insertRule(`#tab-${i.identity.name} .lm_close_tab { display: none; }`),this.viewComponentsByContainerElement.set(t.element,i),this.resizeController.observeContainer(t.element),i},this.iframeContainer=document.createElement("div"),this.iframeContainer.id=`openfin-layout-iframe-container-${this.identity.layoutName}`,this.domEmitter=new V(e),this.setupStylesheets(),this.layout=new he(this.container),this.layout.resizeWithContainerAutomatically=!0,this.options=n,this.layout.registerComponent("view",this.createViewComponent),this.setupListeners(),this.resizeController=new ve(this),this.layout.loadLayout(Me.overrideConfig(i));const r=document.createElement("div");r.id=`openfin-layout-shadow-container-${this.identity.layoutName}`,r.attachShadow({mode:"open",delegatesFocus:!1}).appendChild(this.iframeContainer),this.container.appendChild(r),this.resizeController.observeMutations(this.container)}getStackByView({name:t}){const e=this.layout.findFirstComponentItemById(t);if(e?.parent&&e?.parent?.isStack)return Ie.wrap(e.parent,this)}getRoot(){return Ie.wrap(this.layout.rootItem,this)}async platformCloseView(t){const e=[...this.viewComponentsByContainerElement.values()].find((e=>e.identity.name===t.name));if(!e)throw new Error(`View with name: ${t.name} not found in layout.`);e.closeView()}async platformCreateView(t,{location:e,targetView:i}={}){if(i)throw new Error("TargetView not supported in web");const n={options:this.platformProvider.normalizeOptions(t),target:this.identity,location:e};return this.insertView(n)}setupStylesheets(){if(this.container.setAttribute("data-openfin-layout-name",this.identity.layoutName),this.stylesheet=new CSSStyleSheet,this.stylesheet.insertRule(".lm_close { display: none; }"),document.adoptedStyleSheets.push(this.stylesheet),this.initialConfig.settings?.preventSplitterResize){const t=`\n [data-openfin-layout-name='${this.identity.layoutName}'] .lm_splitter {\n pointer-events: none;\n }`;this.stylesheet.insertRule(t)}}insertView({options:t,location:e,targetView:i}){const n=e?this.layoutContentCache.getItemOrUndefined(e.id):void 0,o=i?this.layoutContentCache.getItemOrUndefined(i.name):void 0,s=n??o??Ie.wrap(this.layout.rootItem,this);let r;if(ee.isStack(s.raw))r=s.raw;else{if(!we(s.raw))throw new Error("Cannot add a view at the requested location");r=s.raw.newItem({type:"stack",content:[]})}const a=Math.min(r.contentItems.length,e?.index??r.contentItems.length);let l=this.layout.findFirstComponentItemById(t.name);l?(l.parent&&l.parent.removeChild(l,!0),r.addChild(l,a)):l=r.newComponent("view",t,t.title??t.url??"Default Title",a);const h=l.component.identity;return Promise.resolve({identity:h})}replaceView({viewToReplace:t,newView:e}){throw new Error("Method not implemented.")}replaceLayout(t){throw new Error("Method not implemented.")}async cleanupView(t){}applyPreset(t){throw new Error("Method not implemented.")}getCurrentViews(){return[...this.viewComponentsByContainerElement.values()].map((t=>t.identity))}async getFrameSnapshot(){return Ee(xt.fromResolved(this.layout.toConfig()))}isVisible(){return W(this.container)}async onViewDetached({viewIdentity:t}){this.reparentingViews.add(t.name),this.platformCloseView(t)}async destroy(){this.goldenLayoutDestroyed||(this.goldenLayoutDestroyed=!0,this.layout.destroy()),this.iframeContainer.remove(),this.resizeController.destroy(),document.adoptedStyleSheets=document.adoptedStyleSheets.filter((t=>t!==this.stylesheet)),this.viewComponentsByContainerElement.clear()}setupListeners(){this.container.addEventListener("pointerdown",(t=>{if(t.target instanceof HTMLElement){const e=t.target.classList;["lm_tab","lm_title","lm_splitter","lm_drag_handle"].some((t=>e.contains(t)))&&(this.handleDragStart(),2===t.button&&t.stopPropagation())}}),!0),document.addEventListener("pointerup",(()=>this.handleDragEnd()),!0),this.layout.on("tabCreated",(t=>{const e=t.componentItem.component;t.element.id=`tab-${e.identity.name}`,this.domEmitter.dispatchLocalEvent("tab-created",e.identity)})),this.layout.on("itemCreated",(({target:t})=>{const e=t;if(Gt.isComponentItem(e)){const t=e.component;this.domEmitter.dispatchLocalEvent("container-created",t.identity)}})),this.layout.on("itemDestroyed",(t=>{const e=t.target;if(Gt.isComponentItem(e)){const t=e.component;this.removeViewComponent(t)}})),this.layout.on("itemDropped",(()=>{this.handleDragEnd()}))}handleDragStart(){this.iframeContainer.style.pointerEvents="none"}handleDragEnd(){this.iframeContainer.style.pointerEvents=""}removeViewComponent(t){if(t.config&&!1===t.config[`${de}isClosable`]){const e=[...this.stylesheet.cssRules].findIndex((e=>e.cssText.includes(`#tab-${t.identity.name}`)));this.stylesheet.deleteRule(e)}t.destroy(),this.viewComponentsByContainerElement.delete(t.container.element),this.resizeController.unobserveContainer(t.container.element),this.reparentingViews.has(t.identity.name)?this.reparentingViews.delete(t.identity.name):this.platformProvider.closeView(t.identity.name);0===this.getCurrentViews().length&&(this.goldenLayoutDestroyed||(this.goldenLayoutDestroyed=!0,m.handleLastViewRemoved(this.layoutManager,this.identity)))}}class Pe{constructor(t,e,i,n){this.windowIdentity=t,this.connectConfig=e,this.provider=i,this.fallbackContainer=n}async createLayout(t,e){if(!("container"in t)&&!this.fallbackContainer)throw new Error("Container property is not optional in web");const{layoutName:i}=t,n=t,o=this.provider.initLayoutViews(n),s=n.container??this.fallbackContainer,r={...this.windowIdentity,layoutName:i},a=new Me(r,s,o,this.connectConfig,e,this.provider);m.registerLayout(e,i,a),this.fallbackContainer=null}async getLayoutSnapshot(t){return t.getLayoutSnapshot()}async handleLastViewRemoved(t){}}class Te{static async init(e){const i=e.getFin().InterApplicationBus.Channel,n=await i.create(`custom-frame-${e.me.uuid}`);return n.setDefaultAction((async(t,{target:e,opts:i},o)=>{const s=n.connections.find((t=>t.name===e.name));if(s)return n.dispatch(s,t,{...i,target:e});throw new Error(`Client with name ${e.name} not found`)})),await t.relayChannelClientApi_1(n,"layout-relay"),new Te(e)}constructor(t){this.wire=t,this.viewNames=new Set}normalizeOptions(t,i="default"){const n=this.wire.me.uuid;let{name:o=`internal-generated-view-${e.v4()}`}=t;return o.match(/^internal-generated-view-/)&&this.viewNames.has(o)&&"duplicate"===i&&(o=`internal-generated-view-${e.v4()}`),this.viewNames.add(o),{...t,name:o,uuid:n}}closeView(t){this.viewNames.delete(t)}initLayoutViews({layout:t,multiInstanceViewBehavior:e}){return H((t=>{if("component"===t.type&&t.componentState){const i=this.normalizeOptions(t.componentState,e);return{...t,componentState:i}}return t}),t)}}var Ae;const ke=t=>t;Ae=new WeakMap,exports.WebLayoutEntryPoint=class{constructor(e){Ae.set(this,void 0),this.initLayoutManager=async(e,i,{container:n,layoutManagerOverride:o})=>{const s=await Te.init(i),r=o??ke,a=new Pe(i.me,t.__classPrivateFieldGet(this,Ae,"f"),s,n),l=new(r(m.createClosedConstructor(a)));return await M(i,l),l},this.applyLayoutSnapshot=async(e,i,n)=>{await i.applyLayoutSnapshot(t.__classPrivateFieldGet(this,Ae,"f").platform.layoutSnapshot)},this.createLayout=async(t,e)=>m.createLayout(t,e),this.destroyLayout=async(t,e)=>m.destroyLayout(t,e),t.__classPrivateFieldSet(this,Ae,e,"f")}}; @@ -7340,7 +7340,7 @@ module.exports = stubFalse; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.init = init; -const core_web_1 = __webpack_require__(/*! @openfin/core-web */ "./node_modules/@openfin/core-web/out/api-client.js"); +const core_web_1 = __webpack_require__(/*! @openfin/core-web */ "../../node_modules/@openfin/core-web/out/api-client.js"); const settings_1 = __webpack_require__(/*! ./settings */ "./client/src/platform/settings.ts"); /** * Initializes the OpenFin Web Broker connection. @@ -8387,7 +8387,7 @@ function version(uuid) { /******/ /************************************************************************/ var __webpack_exports__ = {}; -// This entry need to be wrapped in an IIFE because it need to be in strict mode. +// This entry needs to be wrapped in an IIFE because it needs to be in strict mode. (() => { "use strict"; var exports = __webpack_exports__; diff --git a/web/v19.2.0/web-interop/js/interop-view.bundle.js.map b/web/v19.2.0/web-interop/js/interop-view.bundle.js.map index 3bd2436..ee2cb06 100644 --- a/web/v19.2.0/web-interop/js/interop-view.bundle.js.map +++ b/web/v19.2.0/web-interop/js/interop-view.bundle.js.map @@ -1 +1 @@ -{"version":3,"file":"interop-view.bundle.js","mappings":";;;;;;;;;;AAAa,MAAM,mBAAO,CAAC,iFAAoB,EAAE,mBAAO,CAAC,mDAAS,EAAE,mBAAO,CAAC,+DAAM,EAAE,mBAAO,CAAC,mDAAQ,EAAE,mBAAO,CAAC,gEAAkB,EAAE,mBAAO,CAAC,4DAAgB,EAAE,eAAe;;;;;;;;;;;;ACA9J,MAAM,mBAAO,CAAC,mDAAS,IAAI,mBAAO,CAAC,mDAAQ,IAAI,mBAAO,CAAC,gEAAkB,IAAI,mBAAO,CAAC,4DAAgB,IAAI,mBAAO,CAAC,+DAAM,EAAE,kBAAkB,EAAE,GAAG,wBAAwB,GAAG,sGAAsG,qBAAM,CAAC,qBAAM,iCAAiC,KAAK,KAAK,KAAK,MAAM,oBAAoB,WAAW,kBAAkB,kBAAkB,UAAU,SAAS,sCAAsC,SAAS,sFAAsF,mCAAmC,6BAA6B,GAAG,kCAAkC,6BAA6B,mDAAmD,0CAA0C,yDAAyD,i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AErB;AACA;AACA;;AAEA;AACA,mCAAmC,SAAS;AAC5C;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,cAAc,SAAS;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,2CAA2C,UAAU;AACrD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;ACrJA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEY;;AAEZ,eAAe,mBAAO,CAAC,wDAAW;AAClC,gBAAgB,mBAAO,CAAC,oDAAS;AACjC;AACA;AACA;AACA;;AAEA,cAAc;AACd,kBAAkB;AAClB,yBAAyB;;AAEzB;AACA,kBAAkB;;AAElB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,kBAAkB,YAAY;AAC9B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA,wCAAwC,SAAS;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;;AAEA;AACA;AACA,cAAc,iBAAiB;AAC/B;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,iDAAiD,EAAE;AACnD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C;AAC1C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA,yBAAyB,eAAe;AACxC;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,yBAAyB,QAAQ;AACjC;AACA,sBAAsB,eAAe;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc,YAAY;AAC1B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB,sBAAsB;AACxC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,mBAAmB;AACnB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA,oBAAoB,SAAS;AAC7B;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA,qBAAqB,WAAW,GAAG,IAAI;AACvC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA,gBAAgB,WAAW,GAAG,IAAI,KAAK,aAAa;AACpD;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;;AAEA;AACA,GAAG;AACH;AACA;AACA,mBAAmB,KAAK,mDAAmD,cAAc;AACzF,GAAG;AACH;AACA;AACA,+BAA+B,IAAI;AACnC;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,MAAM,aAAa,SAAS;AACtD;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,SAAS,gBAAgB;AACzB,cAAc,oBAAoB,EAAE,IAAI;AACxC;AACA,YAAY,gBAAgB,EAAE,IAAI;AAClC;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,GAAG,SAAS,GAAG,KAAK,qBAAqB,EAAE,EAAE;AACpE,QAAQ;AACR,yBAAyB,GAAG,KAAK,yBAAyB,EAAE,EAAE;AAC9D,mBAAmB,yBAAyB,EAAE,EAAE;AAChD;AACA,MAAM;AACN,oBAAoB,IAAI,EAAE,GAAG,SAAS,IAAI,EAAE,EAAE;AAC9C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,0CAA0C,cAAc,SAAS,OAAO;AACxE;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,kBAAkB,YAAY;AAC9B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,kBAAkB,gBAAgB;AAClC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,kBAAkB,gBAAgB;AAClC;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,cAAc,YAAY;AAC1B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,QAAQ;AAC1B;AACA,oBAAoB,QAAQ;AAC5B;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;;;;;ACzjEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEa;;AAEb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB;;AAEnB;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,sBAAsB;AACxC;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA,eAAe;AACf;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA,oBAAoB,SAAS;AAC7B;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;;AAEA,kCAAkC,QAAQ;AAC1C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oBAAoB,iBAAiB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,QAAQ;AACR;AACA,uCAAuC,QAAQ;AAC/C;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,OAAO;AACzB;AACA;AACA;;AAEA;AACA,SAAS,yBAAyB;AAClC;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,gBAAgB;AAClC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,8DAA8D,YAAY;AAC1E;AACA,8DAA8D,YAAY;AAC1E;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,qCAAqC,YAAY;AACjD;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;AACA;;;;;;;;;;;AChfA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,SAAS,WAAW;;AAEpB;AACA;AACA;AACA,SAAS,WAAW;;AAEpB;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA,SAAS,WAAW;;AAEpB;AACA;AACA,SAAS,UAAU;;AAEnB;AACA;;;;;;;;;;;ACpFA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,WAAW,mBAAO,CAAC,mDAAS;;AAE5B;AACA;;AAEA;;;;;;;;;;;ACNA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,cAAc,mBAAO,CAAC,yDAAY;AAClC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BAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,SAAS;AACpB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AChDA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACnBA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,UAAU;AACrB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACtBA,sBAAsB,mBAAO,CAAC,yEAAoB;AAClD,SAAS,mBAAO,CAAC,6CAAM;;AAEvB;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC3BA,SAAS,mBAAO,CAAC,6CAAM;;AAEvB;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpBA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,WAAW,mBAAO,CAAC,iDAAQ;;AAE3B;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AChBA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,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;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,SAAS;AACpB;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa,GAAG;AAChB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;AACA,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;;;;;;;;;;ACrKA,eAAe,mBAAO,CAAC,yDAAY;;AAEnC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;;;;;;;;;;AC7BA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,cAAc,mBAAO,CAAC,uDAAW;;AAEjC;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACnBA,aAAa,mBAAO,CAAC,uDAAW;AAChC,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,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A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClFA,aAAa,mBAAO,CAAC,uDAAW;AAChC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA,iBAAiB,mBAAO,CAAC,6DAAc;AACvC,eAAe,mBAAO,CAAC,2DAAa;AACpC,eAAe,mBAAO,CAAC,yDAAY;AACnC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;AACA;AACA;AACA,oCAAoC;;AAEpC;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC9CA,aAAa,mBAAO,CAAC,uDAAW;AAChC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,eAAe,mBAAO,CAAC,yDAAY;AACnC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA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AAO,CAAC,iEAAgB;AAC1C,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC/GA,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;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B,WAAW,SAAS;AACpB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC5EA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,mBAAmB,mBAAO,CAAC,mEAAiB;AAC5C,kBAAkB,mBAAO,CAAC,iEAAgB;;AAE1C;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACxBA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACdA,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACnBA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACZA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA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;;;;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACbA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;;;;;;;;;;ACjBA,gBAAgB,mBAAO,CAAC,6DAAc;;AAEtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACdA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,GAAG;AAChB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACbA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACbA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,UAAU,mBAAO,CAAC,iDAAQ;AAC1B,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjCA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;;;;;;;;;;;ACzBA,gBAAgB,mBAAO,CAAC,6DAAc;;AAEtC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,GAAG;AAChB;AACA;AACA;AACA,oBAAoB,QAAQ,IAAI,QAAQ;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,kBAAkB;AAClB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpCA,sBAAsB,mBAAO,CAAC,yEAAoB;AAClD,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA,8BAA8B,mBAAmB;AACjD;AACA;AACA;AACA;AACA;AACA,+CAA+C,mBAAmB;AAClE;AACA;AACA;;AAEA;;;;;;;;;;;ACnCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACzBA,iBAAiB,mBAAO,CAAC,6DAAc;AACvC,eAAe,mBAAO,CAAC,yDAAY;;AAEnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AChCA,WAAW,mBAAO,CAAC,mDAAS;AAC5B,gBAAgB,mBAAO,CAAC,2DAAa;;AAErC;AACA,kBAAkB,KAA0B;;AAE5C;AACA,gCAAgC,QAAa;;AAE7C;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACrCA,kBAAkB,mBAAO,CAAC,iEAAgB;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,kBAAkB;AAClB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClCA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,eAAe,mBAAO,CAAC,yDAAY;;AAEnC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpCA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClCA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC1BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC9BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC5BA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC1BA,uBAAuB,mBAAO,CAAC,2EAAqB;AACpD,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC1BA,oBAAoB,mBAAO,CAAC,qEAAkB;AAC9C,eAAe,mBAAO,CAAC,2DAAa;AACpC,kBAAkB,mBAAO,CAAC,+DAAe;;AAEzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpCA,oBAAoB,mBAAO,CAAC,qEAAkB;AAC9C,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,kBAAkB,mBAAO,CAAC,+DAAe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,cAAc;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,kBAAkB,aAAa;AAC/B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,iEAAe,GAAG;;;;;;;;;;;;;;;ACtNlB,iEAAe,sCAAsC;;;;;;;;;;;;;;;;ACAhB;;AAErC;AACA,OAAO,wDAAQ;AACf;AACA;;AAEA;AACA,gCAAgC;;AAEhC;AACA;AACA;AACA,qBAAqB;;AAErB;AACA,qBAAqB;;AAErB;AACA,qBAAqB;;AAErB;AACA,qBAAqB;AACrB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,iEAAe,KAAK;;;;;;;;;;;;;;;AClCpB,iEAAe,cAAc,EAAE,UAAU,EAAE,eAAe,EAAE,gBAAgB,EAAE,UAAU,GAAG,yCAAyC;;;;;;;;;;;;;;;ACApI;AACA;AACA;AACA;AACA;AACe;AACf;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;AClBA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;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AAM,gBAAgB,GAAG,QAAQ,CAAC,aAAa,CAAoB,aAAa,CAAC,CAAC;IAElF,IAAI,gBAAgB,KAAK,IAAI,EAAE,CAAC;QAC/B,gBAAgB,CAAC,gBAAgB,CAAC,OAAO,EAAE,KAAK,IAAI,EAAE;YACrD,MAAM,UAAU,EAAE,CAAC;QACpB,CAAC,CAAC,CAAC;IACJ,CAAC;IAED,MAAM,kBAAkB,EAAE,CAAC;AAC5B,CAAC","sources":["webpack://openfin-web--web-interop/./node_modules/@openfin/core-web/out/api-client.js","webpack://openfin-web--web-interop/./node_modules/@openfin/core-web/out/main-8cad4070.js","webpack://openfin-web--web-interop/./node_modules/@openfin/core-web/out/main-b14f67c9.js","webpack://openfin-web--web-interop/../../node_modules/base64-js/index.js","webpack://openfin-web--web-interop/../../node_modules/buffer/index.js","webpack://openfin-web--web-interop/../../node_modules/events/events.js","webpack://openfin-web--web-interop/../../node_modules/ieee754/index.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_DataView.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_Hash.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_ListCache.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_Map.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_MapCache.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_Promise.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_Set.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_SetCache.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_Stack.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_Symbol.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_Uint8Array.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_WeakMap.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_arrayEach.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_arrayFilter.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_arrayLikeKeys.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_arrayPush.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_arraySome.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_assignValue.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_assocIndexOf.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseAssign.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseAssignIn.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseAssignValue.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseClone.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseCreate.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseGetAllKeys.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseGetTag.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseIsArguments.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseIsEqual.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseIsEqualDeep.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseIsMap.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseIsNative.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseIsSet.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseIsTypedArray.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseKeys.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseKeysIn.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseTimes.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseUnary.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_cacheHas.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_cloneArrayBuffer.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_cloneBuffer.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_cloneDataView.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_cloneRegExp.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_cloneSymbol.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_cloneTypedArray.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_copyArray.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_copyObject.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_copySymbols.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_copySymbolsIn.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_coreJsData.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_defineProperty.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_equalArrays.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_equalByTag.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_equalObjects.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_freeGlobal.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_getAllKeys.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_getAllKeysIn.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_getMapData.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_getNative.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_getPrototype.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_getRawTag.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_getSymbols.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_getSymbolsIn.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_getTag.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_getValue.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_hashClear.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_hashDelete.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_hashGet.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_hashHas.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_hashSet.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_initCloneArray.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_initCloneByTag.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_initCloneObject.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_isIndex.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_isKeyable.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_isMasked.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_isPrototype.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_listCacheClear.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_listCacheDelete.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_listCacheGet.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_listCacheHas.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_listCacheSet.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_mapCacheClear.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_mapCacheDelete.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_mapCacheGet.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_mapCacheHas.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_mapCacheSet.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_mapToArray.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_nativeCreate.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_nativeKeys.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_nativeKeysIn.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_nodeUtil.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_objectToString.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_overArg.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_root.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_setCacheAdd.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_setCacheHas.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_setToArray.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_stackClear.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_stackDelete.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_stackGet.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_stackHas.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_stackSet.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_toSource.js","webpack://openfin-web--web-interop/../../node_modules/lodash/cloneDeep.js","webpack://openfin-web--web-interop/../../node_modules/lodash/eq.js","webpack://openfin-web--web-interop/../../node_modules/lodash/isArguments.js","webpack://openfin-web--web-interop/../../node_modules/lodash/isArray.js","webpack://openfin-web--web-interop/../../node_modules/lodash/isArrayLike.js","webpack://openfin-web--web-interop/../../node_modules/lodash/isBuffer.js","webpack://openfin-web--web-interop/../../node_modules/lodash/isEqual.js","webpack://openfin-web--web-interop/../../node_modules/lodash/isFunction.js","webpack://openfin-web--web-interop/../../node_modules/lodash/isLength.js","webpack://openfin-web--web-interop/../../node_modules/lodash/isMap.js","webpack://openfin-web--web-interop/../../node_modules/lodash/isObject.js","webpack://openfin-web--web-interop/../../node_modules/lodash/isObjectLike.js","webpack://openfin-web--web-interop/../../node_modules/lodash/isSet.js","webpack://openfin-web--web-interop/../../node_modules/lodash/isTypedArray.js","webpack://openfin-web--web-interop/../../node_modules/lodash/keys.js","webpack://openfin-web--web-interop/../../node_modules/lodash/keysIn.js","webpack://openfin-web--web-interop/../../node_modules/lodash/stubArray.js","webpack://openfin-web--web-interop/../../node_modules/lodash/stubFalse.js","webpack://openfin-web--web-interop/./client/src/platform/api.ts","webpack://openfin-web--web-interop/./client/src/platform/settings.ts","webpack://openfin-web--web-interop/../../node_modules/uuid/dist/esm-browser/index.js","webpack://openfin-web--web-interop/../../node_modules/uuid/dist/esm-browser/md5.js","webpack://openfin-web--web-interop/../../node_modules/uuid/dist/esm-browser/nil.js","webpack://openfin-web--web-interop/../../node_modules/uuid/dist/esm-browser/parse.js","webpack://openfin-web--web-interop/../../node_modules/uuid/dist/esm-browser/regex.js","webpack://openfin-web--web-interop/../../node_modules/uuid/dist/esm-browser/rng.js","webpack://openfin-web--web-interop/../../node_modules/uuid/dist/esm-browser/sha1.js","webpack://openfin-web--web-interop/../../node_modules/uuid/dist/esm-browser/stringify.js","webpack://openfin-web--web-interop/../../node_modules/uuid/dist/esm-browser/v1.js","webpack://openfin-web--web-interop/../../node_modules/uuid/dist/esm-browser/v3.js","webpack://openfin-web--web-interop/../../node_modules/uuid/dist/esm-browser/v35.js","webpack://openfin-web--web-interop/../../node_modules/uuid/dist/esm-browser/v4.js","webpack://openfin-web--web-interop/../../node_modules/uuid/dist/esm-browser/v5.js","webpack://openfin-web--web-interop/../../node_modules/uuid/dist/esm-browser/validate.js","webpack://openfin-web--web-interop/../../node_modules/uuid/dist/esm-browser/version.js","webpack://openfin-web--web-interop/webpack/bootstrap","webpack://openfin-web--web-interop/webpack/runtime/define property getters","webpack://openfin-web--web-interop/webpack/runtime/global","webpack://openfin-web--web-interop/webpack/runtime/hasOwnProperty shorthand","webpack://openfin-web--web-interop/webpack/runtime/make namespace object","webpack://openfin-web--web-interop/webpack/runtime/node module decorator","webpack://openfin-web--web-interop/./client/src/content/interop-view.ts"],"sourcesContent":["\"use strict\";var e=require(\"./main-8cad4070.js\");require(\"buffer/\"),require(\"uuid\"),require(\"events\"),require(\"lodash/cloneDeep\"),require(\"lodash/isEqual\"),exports.connect=e.connect;\n","\"use strict\";var e=require(\"buffer/\"),t=require(\"events\"),n=require(\"lodash/cloneDeep\"),i=require(\"lodash/isEqual\"),r=require(\"uuid\");const o=(e,t)=>`${t}<${btoa(JSON.stringify(e))}>`;var s=\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof window?window:\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:{},a={},c={},d={},h={};async function l(e){const t=[];for(const n of e){const e=await n();t.push(e)}return t}Object.defineProperty(h,\"__esModule\",{value:!0}),h.promiseMapSerial=h.serial=h.promiseMap=h.promisify=void 0,h.promisify=function(e){return(...t)=>new Promise(((n,i)=>{e(...t,((e,t)=>e?i(e):n(t)))}))},h.promiseMap=async function(e,t){return Promise.all(e.map(t))},h.serial=l,h.promiseMapSerial=async function(e,t){return l(e.map(((e,n,i)=>()=>t(e,n,i))))};var u,p=s&&s.__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},w=s&&s.__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)};Object.defineProperty(d,\"__esModule\",{value:!0}),d.Reply=d.EmitterBase=d.Base=void 0;const y=h;class f{constructor(e){this.isNodeEnvironment=()=>\"node\"===this.wire.environment.type,this.isOpenFinEnvironment=()=>\"openfin\"===this.wire.environment.type,this.isBrowserEnvironment=()=>\"other\"===this.wire.environment.type,this.wire=e}get fin(){return this.wire.getFin()}get me(){return this.wire.me}}d.Base=f;d.EmitterBase=class extends f{constructor(e,t,...n){super(e),this.topic=t,u.set(this,void 0),this.eventNames=()=>this.hasEmitter()?this.getOrCreateEmitter().eventNames():[],this.emit=(e,t,...n)=>!!this.hasEmitter()&&this.getOrCreateEmitter().emit(e,t,...n),this.hasEmitter=()=>this.wire.eventAggregator.has(w(this,u,\"f\")),this.getOrCreateEmitter=()=>this.wire.eventAggregator.getOrCreate(w(this,u,\"f\")),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[],this.listenerCount=e=>this.hasEmitter()?this.getOrCreateEmitter().listenerCount(e):0,this.registerEventListener=async(e,t={},n,i)=>{const r={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e},o=this.getOrCreateEmitter();n(o);try{await this.wire.sendAction(\"subscribe-to-desktop-event\",r)}catch(e){throw i(o),this.deleteEmitterIfNothingRegistered(o),e}},this.deregisterEventListener=async(e,t={})=>{if(this.hasEmitter()){const n={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e};await this.wire.sendAction(\"unsubscribe-to-desktop-event\",n).catch((()=>null));return this.getOrCreateEmitter()}return Promise.resolve()},p(this,u,[t,...n],\"f\"),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[]}async on(e,t,n){return await this.registerEventListener(e,n,(n=>{n.on(e,t)}),(n=>{n.removeListener(e,t)})),this}async addListener(e,t,n){return this.on(e,t,n)}async once(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.once(e,i),n.once(e,t)}),(n=>{n.removeListener(e,i),n.removeListener(e,t)})),this}async prependListener(e,t,n){return await this.registerEventListener(e,n,(n=>{n.prependListener(e,t)}),(n=>{n.removeListener(e,t)})),this}async prependOnceListener(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.prependOnceListener(e,t),n.once(e,i)}),(n=>{n.removeListener(e,t),n.removeListener(e,i)})),this}async removeListener(e,t,n){const i=await this.deregisterEventListener(e,n);return i&&(i.removeListener(e,t),this.deleteEmitterIfNothingRegistered(i)),this}async deregisterAllListeners(e){const t={...this.identity,type:e,topic:this.topic};if(this.hasEmitter()){const e=this.getOrCreateEmitter(),n=e.listenerCount(t.type),i=[];for(let e=0;enull)));return await Promise.all(i),e}}async removeAllListeners(e){const t=async e=>{const t=await this.deregisterAllListeners(e);t&&(t.removeAllListeners(e),this.deleteEmitterIfNothingRegistered(t))};if(e)await t(e);else if(this.hasEmitter()){const e=this.getOrCreateEmitter().eventNames();await(0,y.promiseMap)(e,t)}return this}deleteEmitterIfNothingRegistered(e){0===e.eventNames().length&&this.wire.eventAggregator.delete(w(this,u,\"f\"))}},u=new WeakMap;d.Reply=class{};var g={};Object.defineProperty(g,\"__esModule\",{value:!0});var m=g.RuntimeError=g.NotSupportedError=g.NotImplementedError=g.NoAckError=g.DuplicateCorrelationError=g.UnexpectedActionError=g.DisconnectedError=void 0;class v extends Error{constructor(e){super(`Expected websocket state OPEN but found ${e}`),this.readyState=e}}g.DisconnectedError=v;class C extends Error{}g.UnexpectedActionError=C;class b extends Error{}g.DuplicateCorrelationError=b;class I extends Error{}g.NoAckError=I;class E extends Error{}g.NotImplementedError=E;class x extends Error{}g.NotSupportedError=x;class A extends Error{constructor(e){const{message:t,name:n,stack:i,...r}=e;super(t),this.name=n||\"Error\",this.stack=i??this.toString(),Object.keys(r).forEach((e=>{this[e]=r[e]}))}}class P extends Error{static getCallSite(e=0){const t=Error.stackTraceLimit,n=e+1;Error.stackTraceLimit=t+n;const i=Error.prepareStackTrace;Error.prepareStackTrace=(e,t)=>t;const r=(new Error).stack?.slice(n)??[];return Error.prepareStackTrace=i,Error.stackTraceLimit=t,r}static prepareStackTrace(e,t){if(\"function\"==typeof Error.prepareStackTrace)return Error.prepareStackTrace(e,t);let n=\"\";n+=e.name||\"Error\",n+=`: ${e.message||\"\"}`;for(const e of t)n+=`\\n at ${e.toString()}`;return n}constructor(e,t){const{reason:n,error:i}=e;super(n),this.name=\"RuntimeError\",i?.stack&&(this.cause=new A(i)),t&&(this.stack=P.prepareStackTrace(this,t))}}m=g.RuntimeError=P;var M={},_={},O={};Object.defineProperty(O,\"__esModule\",{value:!0}),O.validateIdentity=void 0,O.validateIdentity=function(e){let t;return\"object\"==typeof e&&\"string\"==typeof e.uuid||(t=\"Not a valid identity object\"),t};var S={},R={},F={},j={},k={},L={},T={};Object.defineProperty(T,\"__esModule\",{value:!0}),T.handleDeprecatedWarnings=void 0;var $;T.handleDeprecatedWarnings=e=>{(e.contentNavigation?.whitelist||e.contentNavigation?.blacklist||e.contentRedirect?.whitelist||e.contentRedirect?.blacklist)&&console.warn(\"The properties 'whitelist' and 'blacklist' have been marked as deprecated and will be removed in a future version. Please use 'allowlist' and 'denylist'.\")};var B={},G={};Object.defineProperty(G,\"__esModule\",{value:!0}),G.AsyncRetryableLazy=W=G.Lazy=void 0;var W=G.Lazy=class{constructor(e){this.producerFn=e}getValue(){return this.value||(this.value=this.producerFn()),this.value}};G.AsyncRetryableLazy=class{constructor(e){this.producerFn=e}async getValue(){return this.promise||(this.promise=this.producerFn().catch((e=>{throw delete this.promise,e}))),this.promise}};var H={};Object.defineProperty(H,\"__esModule\",{value:!0}),H.WebContents=void 0;const N=d;class D extends N.EmitterBase{constructor(e,t,n){super(e,n,t.uuid,t.name),this.identity=t,this.entityType=n}capturePage(e){return this.wire.sendAction(\"capture-page\",{options:e,...this.identity}).then((({payload:e})=>e.data))}executeJavaScript(e){return this.wire.sendAction(\"execute-javascript-in-window\",{...this.identity,code:e}).then((({payload:e})=>e.data))}getZoomLevel(){return this.wire.sendAction(\"get-zoom-level\",this.identity).then((({payload:e})=>e.data))}setZoomLevel(e){return this.wire.sendAction(\"set-zoom-level\",{...this.identity,level:e}).then((()=>{}))}navigate(e){return this.wire.sendAction(\"navigate-window\",{...this.identity,url:e}).then((()=>{}))}navigateBack(){return this.wire.sendAction(\"navigate-window-back\",{...this.identity}).then((()=>{}))}async navigateForward(){await this.wire.sendAction(\"navigate-window-forward\",{...this.identity})}stopNavigation(){return this.wire.sendAction(\"stop-window-navigation\",{...this.identity}).then((()=>{}))}reload(e=!1){return this.wire.sendAction(\"reload-window\",{ignoreCache:e,...this.identity}).then((()=>{}))}print(e={}){return this.wire.sendAction(\"print\",{...this.identity,options:e}).then((()=>{}))}findInPage(e,t){return this.wire.sendAction(\"find-in-page\",{...this.identity,searchTerm:e,options:t}).then((({payload:e})=>e.data))}stopFindInPage(e){return this.wire.sendAction(\"stop-find-in-page\",{...this.identity,action:e}).then((()=>{}))}getPrinters(){return this.wire.sendAction(\"get-printers\",{...this.identity}).then((({payload:e})=>e.data))}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){await this.wire.sendAction(\"focus-window\",{emitSynthFocused:e,...this.identity})}async showDeveloperTools(){await this.wire.sendAction(\"show-developer-tools\",this.identity)}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction(\"get-process-info\",this.identity);return e}async getSharedWorkers(){return this.wire.sendAction(\"get-shared-workers\",this.identity).then((({payload:e})=>e.data))}async inspectSharedWorker(){await this.wire.sendAction(\"inspect-shared-worker\",{...this.identity})}async inspectSharedWorkerById(e){await this.wire.sendAction(\"inspect-shared-worker-by-id\",{...this.identity,workerId:e})}async inspectServiceWorker(){await this.wire.sendAction(\"inspect-service-worker\",{...this.identity})}async showPopupWindow(e){if(this.wire.sendAction(`${this.entityType}-show-popup-window`,this.identity).catch((()=>{})),e?.onPopupReady){const t=async({popupName:t})=>{try{const n=this.fin.Window.wrapSync({uuid:this.fin.me.uuid,name:t});await e.onPopupReady(n)}catch(e){throw new Error(`Something went wrong during onPopupReady execution: ${e}`)}};await this.once(\"popup-ready\",t)}const{payload:t}=await this.wire.sendAction(\"try-create-popup-window\",{options:{...e,hasResultCallback:!!e?.onPopupResult,hasReadyCallback:!!e?.onPopupReady},...this.identity}),{data:{willOpen:n,options:i}}=t;n&&await this.fin.Window.create(i.initialOptions);if(e?.onPopupResult){const t=async t=>{await e.onPopupResult((e=>{const{name:t,uuid:n,result:i,data:r}=e,o={identity:{name:t,uuid:n},result:i};return r&&(o.data=r),o})(t))},n=async()=>{await this.removeListener(\"popup-result\",t)};await this.on(\"popup-result\",t),await this.once(\"popup-teardown\",n)}const{payload:r}=await this.wire.sendAction(\"show-popup-window\",{options:i,...this.identity});return r.data}}var U,V,z,K,q;function J(){return V||(V=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(function(){if($)return L;$=1,Object.defineProperty(L,\"__esModule\",{value:!0}),L.ViewModule=void 0;const e=d,t=O,n=J(),i=T;class r extends e.Base{async create(e){const{uuid:t}=this.wire.me;if(!e.name||\"string\"!=typeof e.name)throw new Error(\"Please provide a name property as a string in order to create a View.\");return(0,i.handleDeprecatedWarnings)(e),this.wire.environment.childViews?await this.wire.environment.createChildContent({entityType:\"view\",options:{...e,uuid:t}}):await this.wire.sendAction(\"create-view\",{...e,uuid:t}),this.wrapSync({uuid:t,name:e.name})}async wrap(e){this.wire.sendAction(\"view-wrap\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}wrapSync(e){this.wire.sendAction(\"view-wrap-sync\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}getCurrent(){if(this.wire.sendAction(\"view-get-current\").catch((e=>{})),!this.wire.me.isView)throw new Error(\"You are not in a View context\");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction(\"view-get-current-sync\").catch((e=>{})),!this.wire.me.isView)throw new Error(\"You are not in a View context\");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return L.ViewModule=r,L}(),e),n(function(){if(U)return B;var e;U=1,Object.defineProperty(B,\"__esModule\",{value:!0}),B.View=void 0;const t=g,n=G,i=H,r=ie();class o extends i.WebContents{constructor(i,o){super(i,o,\"view\"),this.identity=o,e.set(this,new n.Lazy((()=>this.fin.Platform.wrapSync(this.identity).getClient()))),this.attach=async e=>{await this.wire.sendAction(\"attach-view\",{target:e,...this.identity})},this.destroy=async()=>{await this.wire.sendAction(\"destroy-view\",{...this.identity})},this.show=async()=>{await this.wire.sendAction(\"show-view\",{...this.identity})},this.showAt=async(e,t={})=>{await this.wire.sendAction(\"show-view-at\",{bounds:e,...this.identity,options:t})},this.bringToFront=async()=>{await this.wire.sendAction(\"bring-view-to-front\",{...this.identity})},this.hide=async()=>{await this.wire.sendAction(\"hide-view\",{...this.identity})},this.setBounds=async e=>{await this.wire.sendAction(\"set-view-bounds\",{bounds:e,...this.identity})},this.getBounds=async()=>(await this.wire.sendAction(\"get-view-bounds\",{...this.identity})).payload.data,this.getInfo=async()=>(await this.wire.sendAction(\"get-view-info\",{...this.identity})).payload.data,this.getParentLayout=async()=>(this.wire.sendAction(\"view-get-parent-layout\",{...this.identity}).catch((()=>{})),this.fin.Platform.Layout.getLayoutByViewIdentity(this.identity)),this.getOptions=async()=>this.wire.sendAction(\"get-view-options\",{...this.identity}).then((({payload:e})=>e.data)),this.updateOptions=async e=>this.wire.sendAction(\"update-view-options\",{options:e,...this.identity}).then((()=>{})),this.getCurrentWindow=async()=>{const{payload:{data:e}}=await this.wire.sendAction(\"get-view-window\",{...this.identity});return new r._Window(this.wire,e)},this.getCurrentStack=async()=>{this.wire.sendAction(\"view-get-current-stack\").catch((()=>{}));try{return(await this.getParentLayout()).getStackByViewIdentity(this.identity)}catch(e){throw new t.RuntimeError({reason:\"This view does not belong to a stack.\",error:e})}},this.triggerBeforeUnload=async()=>(await this.wire.sendAction(\"trigger-before-unload\",{...this.identity})).payload.data,this.bindToElement=async e=>{if(!e)throw new Error(\"Element not found.\");return this.wire.environment.observeBounds(e,(async e=>this.setBounds(e)))}}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){const t=await this.getCurrentWindow();await t.focusedWebViewWasChanged(),await super.focus({emitSynthFocused:e})}}return B.View=o,e=new WeakMap,B}(),e)}(k)),k}function Y(){if(z)return j;z=1,Object.defineProperty(j,\"__esModule\",{value:!0}),j.Application=void 0;const e=d,t=ie(),n=J();class i extends e.EmitterBase{constructor(e,n){super(e,\"application\",n.uuid),this.identity=n,this.window=new t._Window(this.wire,{uuid:this.identity.uuid,name:this.identity.uuid})}windowListFromIdentityList(e){const n=[];return e.forEach((e=>{n.push(new t._Window(this.wire,{uuid:e.uuid,name:e.name}))})),n}isRunning(){return this.wire.sendAction(\"is-application-running\",this.identity).then((({payload:e})=>e.data))}async quit(e=!1){try{await this._close(e),await this.wire.sendAction(\"destroy-application\",{force:e,...this.identity})}catch(e){if(![\"Remote connection has closed\",\"Could not locate the requested application\"].some((t=>e.message.includes(t))))throw e}}async _close(e=!1){try{await this.wire.sendAction(\"close-application\",{force:e,...this.identity})}catch(e){if(!e.message.includes(\"Remote connection has closed\"))throw e}}close(e=!1){return console.warn(\"Deprecation Warning: Application.close is deprecated Please use Application.quit\"),this.wire.sendAction(\"application-close\",this.identity).catch((e=>{})),this._close(e)}getChildWindows(){return this.wire.sendAction(\"get-child-windows\",this.identity).then((({payload:e})=>{const t=[];return e.data.forEach((e=>{t.push({uuid:this.identity.uuid,name:e})})),this.windowListFromIdentityList(t)}))}getManifest(){return this.wire.sendAction(\"get-application-manifest\",this.identity).then((({payload:e})=>e.data))}getParentUuid(){return this.wire.sendAction(\"get-parent-application\",this.identity).then((({payload:e})=>e.data))}getShortcuts(){return this.wire.sendAction(\"get-shortcuts\",this.identity).then((({payload:e})=>e.data))}async getViews(){const{payload:e}=await this.wire.sendAction(\"application-get-views\",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}getZoomLevel(){return this.wire.sendAction(\"get-application-zoom-level\",this.identity).then((({payload:e})=>e.data))}getWindow(){return this.wire.sendAction(\"application-get-window\",this.identity).catch((e=>{})),Promise.resolve(this.window)}registerUser(e,t){return this.wire.sendAction(\"register-user\",{userName:e,appName:t,...this.identity}).then((()=>{}))}removeTrayIcon(){return this.wire.sendAction(\"remove-tray-icon\",this.identity).then((()=>{}))}restart(){return this.wire.sendAction(\"restart-application\",this.identity).then((()=>{}))}run(){return console.warn(\"Deprecation Warning: Application.run is deprecated Please use fin.Application.start\"),this.wire.sendAction(\"application-run\",this.identity).catch((e=>{})),this._run()}_run(e={}){return this.wire.sendAction(\"run-application\",{manifestUrl:this._manifestUrl,opts:e,...this.identity}).then((()=>{}))}scheduleRestart(){return this.wire.sendAction(\"relaunch-on-close\",this.identity).then((()=>{}))}async sendApplicationLog(){const{payload:e}=await this.wire.sendAction(\"send-application-log\",this.identity);return e.data}async setJumpList(e){await this.wire.sendAction(\"set-jump-list\",{config:e,...this.identity})}setTrayIcon(e){return this.wire.sendAction(\"set-tray-icon\",{enabledIcon:e,...this.identity}).then((()=>{}))}setShortcuts(e){return this.wire.sendAction(\"set-shortcuts\",{data:e,...this.identity}).then((()=>{}))}async setShortcutQueryParams(e){await this.wire.sendAction(\"set-shortcut-query-args\",{data:e,...this.identity})}setZoomLevel(e){return this.wire.sendAction(\"set-application-zoom-level\",{level:e,...this.identity}).then((()=>{}))}async setAppLogUsername(e){await this.wire.sendAction(\"set-app-log-username\",{data:e,...this.identity})}getTrayIconInfo(){return this.wire.sendAction(\"get-tray-icon-info\",this.identity).then((({payload:e})=>e.data))}hasTrayIcon(){return this.wire.sendAction(\"has-tray-icon\",this.identity).then((({payload:e})=>e.data))}terminate(){return this.wire.sendAction(\"terminate-application\",this.identity).then((()=>{}))}wait(){return this.wire.sendAction(\"wait-for-hung-application\",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction(\"get-info\",this.identity).then((({payload:e})=>e.data))}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction(\"application-get-process-info\",this.identity);return e}async setFileDownloadLocation(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t};await this.wire.sendAction(\"set-file-download-location\",{...n,downloadLocation:e})}async getFileDownloadLocation(){const{payload:{data:e}}=await this.wire.sendAction(\"get-file-download-location\",this.identity);return e}async showTrayIconPopupMenu(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t},{payload:i}=await this.wire.sendAction(\"show-tray-icon-popup-menu\",{...n,options:e});return i.data}async closeTrayIconPopupMenu(){const{name:e}=this.wire.me,t={uuid:this.identity.uuid,name:e};await this.wire.sendAction(\"close-tray-icon-popup-menu\",{...t})}}return j.Application=i,j}function Z(){return q||(q=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(function(){if(K)return F;K=1,Object.defineProperty(F,\"__esModule\",{value:!0}),F.ApplicationModule=void 0;const e=d,t=O,n=Y();class i extends e.Base{async wrap(e){this.wire.sendAction(\"wrap-application\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}wrapSync(e){this.wire.sendAction(\"wrap-application-sync\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}async _create(e){return void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&void 0===e.isPlatformController&&(e.autoShow=!0),await this.wire.sendAction(\"create-application\",e),this.wrap({uuid:e.uuid})}create(e){return console.warn(\"Deprecation Warning: fin.Application.create is deprecated. Please use fin.Application.start\"),this.wire.sendAction(\"application-create\").catch((e=>{})),this._create(e)}async start(e){this.wire.sendAction(\"start-application\").catch((e=>{}));const t=await this._create(e);return await this.wire.sendAction(\"run-application\",{uuid:e.uuid}),t}async startManyManifests(e,t){return this.wire.sendAction(\"run-applications\",{applications:e,opts:t}).then((()=>{}))}getCurrent(){return this.wire.sendAction(\"get-current-application\").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction(\"get-current-application-sync\").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}async startFromManifest(e,t){this.wire.sendAction(\"application-start-from-manifest\").catch((e=>{}));const n=await this._createFromManifest(e);return await n._run(t),n}createFromManifest(e){return console.warn(\"Deprecation Warning: fin.Application.createFromManifest is deprecated. Please use fin.Application.startFromManifest\"),this.wire.sendAction(\"application-create-from-manifest\").catch((e=>{})),this._createFromManifest(e)}_createFromManifest(e){return this.wire.sendAction(\"get-application-manifest\",{manifestUrl:e}).then((({payload:e})=>{const t=e.data.platform?e.data.platform.uuid:e.data.startup_app.uuid;return this.wrap({uuid:t})})).then((t=>(t._manifestUrl=e,t)))}}return F.ApplicationModule=i,F}(),e),n(Y(),e)}(R)),R}H.WebContents=D;var Q={};Object.defineProperty(Q,\"__esModule\",{value:!0}),Q.promisifySubscription=void 0;var X,ee,te;function ne(){if(X)return S;X=1,Object.defineProperty(S,\"__esModule\",{value:!0}),S._Window=void 0;const e=Z(),t=H,n=J(),i=T,r=Q;class o extends t.WebContents{constructor(e,t){super(e,t,\"window\")}async createWindow(e){this.wire.sendAction(\"window-create-window\",this.identity).catch((e=>{}));const t=await(0,r.promisifySubscription)(this,\"fire-constructor-callback\");void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&(e.autoShow=!0),(0,i.handleDeprecatedWarnings)(e);const n=this.wire.environment.createChildContent({entityType:\"window\",options:e}),[o]=await Promise.all([t.getValue(),n]);let s;const{success:a}=o,c=o.data,{message:d}=c;s=a?{httpResponseCode:c.httpResponseCode,apiInjected:c.apiInjected}:{message:c.message,networkErrorCode:c.networkErrorCode,stack:c.stack};const h={message:d,cbPayload:s,success:a};try{this.getWebWindow().fin.__internal_.openerSuccessCBCalled()}catch(e){}return h.success?this:Promise.reject(h)}getAllFrames(){return this.wire.sendAction(\"get-all-frames\",this.identity).then((({payload:e})=>e.data))}getBounds(){return this.wire.sendAction(\"get-window-bounds\",this.identity).then((({payload:e})=>e.data))}center(){return this.wire.sendAction(\"center-window\",this.identity).then((()=>{}))}blur(){return this.wire.sendAction(\"blur-window\",this.identity).then((()=>{}))}bringToFront(){return this.wire.sendAction(\"bring-window-to-front\",this.identity).then((()=>{}))}animate(e,t){return this.wire.sendAction(\"animate-window\",{transitions:e,options:t,...this.identity}).then((()=>{}))}hide(){return this.wire.sendAction(\"hide-window\",this.identity).then((()=>{}))}close(e=!1){return this.wire.sendAction(\"close-window\",{force:e,...this.identity}).then((()=>{Object.setPrototypeOf(this,null)}))}focusedWebViewWasChanged(){return this.wire.sendAction(\"focused-webview-changed\",this.identity).then((()=>{}))}getNativeId(){return this.wire.sendAction(\"get-window-native-id\",this.identity).then((({payload:e})=>e.data))}async getCurrentViews(){const{payload:e}=await this.wire.sendAction(\"window-get-views\",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}disableFrame(){return console.warn(\"Function is deprecated; use disableUserMovement instead.\"),this.wire.sendAction(\"disable-window-frame\",this.identity).then((()=>{}))}disableUserMovement(){return this.wire.sendAction(\"disable-window-frame\",this.identity).then((()=>{}))}enableFrame(){return console.warn(\"Function is deprecated; use enableUserMovement instead.\"),this.wire.sendAction(\"enable-window-frame\",this.identity).then((()=>{}))}enableUserMovement(){return this.wire.sendAction(\"enable-window-frame\",this.identity).then((()=>{}))}flash(){return this.wire.sendAction(\"flash-window\",this.identity).then((()=>{}))}stopFlashing(){return this.wire.sendAction(\"stop-flash-window\",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction(\"get-window-info\",this.identity).then((({payload:e})=>e.data))}async getLayout(e){this.wire.sendAction(\"window-get-layout\",this.identity).catch((e=>{}));const t=await this.getOptions();if(!t.layout&&!t.layoutSnapshot)throw new Error(\"Window does not have a Layout\");return this.fin.Platform.Layout.wrap(e??this.identity)}getOptions(){return this.wire.sendAction(\"get-window-options\",this.identity).then((({payload:e})=>e.data))}getParentApplication(){return this.wire.sendAction(\"window-get-parent-application\",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity))}getParentWindow(){return this.wire.sendAction(\"window-get-parent-window\",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity)).then((e=>e.getWindow()))}async getSnapshot(e){const t={area:e,...this.identity};console.warn(\"Window.getSnapshot has been deprecated, please use Window.capturePage\");return(await this.wire.sendAction(\"get-window-snapshot\",t)).payload.data}getState(){return this.wire.sendAction(\"get-window-state\",this.identity).then((({payload:e})=>e.data))}getWebWindow(){return this.wire.sendAction(\"window-get-web-window\",this.identity).catch((e=>{})),this.wire.environment.getWebWindow(this.identity)}isMainWindow(){return this.wire.sendAction(\"window-is-main-window\",this.identity).catch((e=>{})),this.me.uuid===this.me.name}isShowing(){return this.wire.sendAction(\"is-window-showing\",this.identity).then((({payload:e})=>e.data))}maximize(){return this.wire.sendAction(\"maximize-window\",this.identity).then((()=>{}))}minimize(){return this.wire.sendAction(\"minimize-window\",this.identity).then((()=>{}))}moveBy(e,t,n){return this.wire.sendAction(\"move-window-by\",{deltaLeft:e,deltaTop:t,positioningOptions:n,...this.identity}).then((()=>{}))}moveTo(e,t,n){return this.wire.sendAction(\"move-window\",{left:e,top:t,positioningOptions:n,...this.identity}).then((()=>{}))}resizeBy(e,t,n,i){return this.wire.sendAction(\"resize-window-by\",{deltaWidth:Math.floor(e),deltaHeight:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}resizeTo(e,t,n,i){return this.wire.sendAction(\"resize-window\",{width:Math.floor(e),height:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}restore(){return this.wire.sendAction(\"restore-window\",this.identity).then((()=>{}))}setAsForeground(){return this.wire.sendAction(\"set-foreground-window\",this.identity).then((()=>{}))}setBounds(e,t){return this.wire.sendAction(\"set-window-bounds\",{...e,...this.identity,positioningOptions:t}).then((()=>{}))}show(e=!1){return this.wire.sendAction(\"show-window\",{force:e,...this.identity}).then((()=>{}))}showAt(e,t,n=!1){return this.wire.sendAction(\"show-at-window\",{force:n,left:Math.floor(e),top:Math.floor(t),...this.identity}).then((()=>{}))}updateOptions(e){return this.wire.sendAction(\"update-window-options\",{options:e,...this.identity}).then((()=>{}))}authenticate(e,t){return this.wire.sendAction(\"window-authenticate\",{userName:e,password:t,...this.identity}).then((()=>{}))}async showPopupMenu(e){const{payload:t}=await this.wire.sendAction(\"show-popup-menu\",{options:e,...this.identity});return t.data}async closePopupMenu(){return this.wire.sendAction(\"close-popup-menu\",{...this.identity}).then((()=>{}))}async dispatchPopupResult(e){this.wire.sendAction(\"window-dispatch-popup-result\",this.identity).catch((e=>{})),await this.wire.sendAction(\"dispatch-popup-result\",{data:e,...this.identity})}async print(e={content:\"self\"}){switch(e.content){case void 0:case\"self\":return super.print(e);case\"screenshot\":return this.wire.sendAction(\"print-screenshot\",this.identity).then((()=>{}));case\"views\":return this.wire.sendAction(\"print-views\",{...this.identity,options:e}).then((()=>{}));default:return}}}return S._Window=o,S}function ie(){return te||(te=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(function(){if(ee)return _;ee=1,Object.defineProperty(_,\"__esModule\",{value:!0}),_._WindowModule=void 0;const e=d,t=O,n=ne();class i extends e.Base{async wrap(e){this.wire.sendAction(\"window-wrap\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}wrapSync(e){this.wire.sendAction(\"window-wrap-sync\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}create(e){return this.wire.sendAction(\"create-window\").catch((e=>{})),new n._Window(this.wire,{uuid:this.me.uuid,name:e.name}).createWindow(e)}getCurrent(){if(this.wire.sendAction(\"get-current-window\").catch((e=>{})),!this.wire.me.isWindow)throw new Error(\"You are not in a Window context\");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction(\"get-current-window-sync\").catch((e=>{})),!this.wire.me.isWindow)throw new Error(\"You are not in a Window context\");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return _._WindowModule=i,_}(),e),n(ne(),e)}(M)),M}Q.promisifySubscription=async(e,t,n=(()=>!0),i)=>{let r,o,s;const a=new Promise(((e,t)=>{r=e,o=t})),c=e=>{n(e)&&(clearTimeout(s),r(e))};return await e.on(t,c),i&&(s=setTimeout((()=>o(new Error(\"event timed out\"))),i)),a.finally((()=>{e.removeListener(t,c).catch((()=>null))})),{getValue:()=>a}},Object.defineProperty(c,\"__esModule\",{value:!0}),c.System=void 0;const re=d,oe=g,se=ie(),ae=t;class ce extends re.EmitterBase{constructor(e){super(e,\"system\")}sendExternalProcessRequest(e,t){return new Promise(((n,i)=>{const r=\"external-process-exited\";let o,s,a,c;\"function\"==typeof t.listener&&(a=e=>{const n=e||{};s={topic:\"exited\",uuid:n.processUuid||\"\",exitCode:n.exitCode||0},o===e.processUuid&&(t.listener(s),c.removeListener(r,a))},this.wire.me.name||(this.wire.me.name=this.wire.me.uuid),c=new se._Window(this.wire,this.wire.me),c.on(r,a)),this.wire.sendAction(e,t).then((({payload:e})=>{o=e.data.uuid,n(e.data),s&&o===s.uuid&&(t.listener(s),c.removeListener(r,a))})).catch((e=>{c&&c.removeListener(r,a),i(e)}))}))}getVersion(){return this.wire.sendAction(\"get-version\").then((({payload:e})=>e.data))}clearCache(e){return this.wire.sendAction(\"clear-cache\",e).then((()=>{}))}deleteCacheOnExit(){return this.wire.sendAction(\"delete-cache-request\").then((()=>{}))}exit(){return this.wire.sendAction(\"exit-desktop\").then((()=>{}))}async fetchManifest(e){const{payload:{data:t}}=await this.wire.sendAction(\"fetch-manifest\",{manifestUrl:e});return t}flushCookieStore(){return this.wire.sendAction(\"flush-cookie-store\").then((()=>{}))}getAllWindows(){return this.wire.sendAction(\"get-all-windows\").then((({payload:e})=>e.data))}getAllApplications(){return this.wire.sendAction(\"get-all-applications\").then((({payload:e})=>e.data))}getCommandLineArguments(){return this.wire.sendAction(\"get-command-line-arguments\").then((({payload:e})=>e.data))}async getCrashReporterState(){const{payload:{data:{diagnosticMode:e,isRunning:t}}}=await this.wire.sendAction(\"get-crash-reporter-state\");return console.warn(\"diagnosticMode property is deprecated. It will be removed in a future version\"),{diagnosticMode:e,diagnosticsMode:e,isRunning:t}}async startCrashReporter(e){const t=e,n={...t,diagnosticMode:t.diagnosticsMode||t.diagnosticMode},{payload:{data:{diagnosticMode:i,isRunning:r}}}=await this.wire.sendAction(\"start-crash-reporter\",n);return{diagnosticMode:i,diagnosticsMode:i,isRunning:r}}getUniqueUserId(){return this.wire.sendAction(\"get-unique-user-id\").then((({payload:e})=>e.data))}getEntityInfo(e,t){return this.wire.sendAction(\"get-entity-info\",{uuid:e,name:t}).then((({payload:e})=>e.data))}getEnvironmentVariable(e){return this.wire.sendAction(\"get-environment-variable\",{environmentVariables:e}).then((({payload:e})=>e.data))}getFocusedWindow(){return this.wire.sendAction(\"get-focused-window\").then((({payload:e})=>e.data))}async isAppCertified(e){const{payload:{data:{certifiedInfo:t}}}=await this.wire.sendAction(\"is-app-certified\",{manifestUrl:e});return t}getInstalledRuntimes(){return this.wire.sendAction(\"get-installed-runtimes\").then((({payload:e})=>e.data.runtimes))}async getInstalledApps(){const{payload:{data:{installedApps:e}}}=await this.wire.sendAction(\"get-installed-apps\");return e}getLog(e){return this.wire.sendAction(\"view-log\",e).then((({payload:e})=>e.data))}getMachineId(){return this.wire.sendAction(\"get-machine-id\").then((({payload:e})=>e.data))}getMinLogLevel(){return this.wire.sendAction(\"get-min-log-level\").then((({payload:e})=>e.data))}getLogList(){return this.wire.sendAction(\"list-logs\").then((({payload:e})=>e.data))}getMonitorInfo(){return this.wire.sendAction(\"get-monitor-info\").then((({payload:e})=>e.data))}getMousePosition(){return this.wire.sendAction(\"get-mouse-position\").then((({payload:e})=>e.data))}getProcessList(){return console.warn(\"System.getProcessList has been deprecated. Please consider using our new process APIs: Window.getProcessInfo, View.getProcessInfo, Application.getProcessInfo, System.getAllProcessInfo\"),this.wire.sendAction(\"process-snapshot\").then((({payload:e})=>e.data))}async getAllProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction(\"get-all-process-info\",this.identity);return e}getProxySettings(){return this.wire.sendAction(\"get-proxy-settings\").then((({payload:e})=>e.data))}getRuntimeInfo(){return this.wire.sendAction(\"get-runtime-info\").then((({payload:e})=>e.data))}getRvmInfo(){return this.wire.sendAction(\"get-rvm-info\").then((({payload:e})=>e.data))}getHostSpecs(){return this.wire.sendAction(\"get-host-specs\").then((({payload:e})=>e.data))}getOSInfo(){return this.wire.sendAction(\"get-os-info\").then((({payload:e})=>e.data))}launchExternalProcess(e){return this.sendExternalProcessRequest(\"launch-external-process\",e)}monitorExternalProcess(e){return this.sendExternalProcessRequest(\"monitor-external-process\",e)}log(e,t){return this.wire.sendAction(\"write-to-log\",{level:e,message:t}).then((()=>{}))}openUrlWithBrowser(e){return this.wire.sendAction(\"open-url-with-browser\",{url:e}).then((()=>{}))}async registerCustomProtocol(e){if(\"object\"!=typeof e)throw new Error(\"Must provide an object with a `protocolName` property having a string value.\");await this.wire.sendAction(\"register-custom-protocol\",e)}async unregisterCustomProtocol(e){await this.wire.sendAction(\"unregister-custom-protocol\",{protocolName:e})}async getCustomProtocolState(e){return this.wire.sendAction(\"get-custom-protocol-state\",{protocolName:e}).then((({payload:e})=>e.data))}releaseExternalProcess(e){return this.wire.sendAction(\"release-external-process\",{uuid:e}).then((()=>{}))}showDeveloperTools(e){return this.wire.sendAction(\"show-developer-tools\",e).then((()=>{}))}terminateExternalProcess(e){return this.wire.sendAction(\"terminate-external-process\",e).then((()=>{}))}updateProxySettings(e){return this.wire.sendAction(\"update-proxy\",e).then((()=>{}))}async downloadAsset(e,t){const n=()=>{};let i=n,r=n;const o=new Promise(((e,t)=>{i=e,r=t}));if(\"openfin\"!==this.wire.environment.type)throw new oe.NotSupportedError(\"downloadAsset only supported in an OpenFin Render process\");const s=oe.RuntimeError.getCallSite(),a=this.wire.environment.getNextMessageId().toString(),c=`asset-download-progress-${a}`,d=`asset-download-error-${a}`,h=`asset-download-complete-${a}`,l=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},u=()=>{this.removeListener(c,l)};await Promise.all([this.on(c,l),this.once(d,(e=>{u();const{reason:t,err:n}=e;r(new oe.RuntimeError({reason:t,error:n},s))})),this.once(h,(()=>{u(),i()}))]);const p=Object.assign(e,{downloadId:a});return await this.wire.sendAction(\"download-asset\",p).catch((e=>{throw u(),e})),o}downloadRuntime(e,t){const n=oe.RuntimeError.getCallSite();return new Promise(((i,r)=>{if(\"openfin\"!==this.wire.environment.type)return void r(new oe.NotSupportedError(\"downloadRuntime only supported in an OpenFin Render process\"));const o=this.wire.environment.getNextMessageId().toString(),s=`runtime-download-progress-${o}`,a=`runtime-download-error-${o}`,c=`runtime-download-complete-${o}`,d=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},h=()=>{this.removeListener(s,d)};this.on(s,d),this.once(a,(e=>{h();const{reason:t,err:i}=e;r(new oe.RuntimeError({reason:t,error:i},n))})),this.once(c,(()=>{h(),i()}));const l=Object.assign(e,{downloadId:o});this.wire.sendAction(\"download-runtime\",l).catch((e=>{h(),r(e)}))}))}downloadPreloadScripts(e){return this.wire.sendAction(\"download-preload-scripts\",{scripts:e}).then((({payload:e})=>e.data))}getAllExternalApplications(){return this.wire.sendAction(\"get-all-external-applications\").then((({payload:e})=>e.data))}getAppAssetInfo(e){return this.wire.sendAction(\"get-app-asset-info\",e).then((({payload:e})=>e.data))}getCookies(e){const t=this.wire.environment.getUrl(),n=Object.assign(e,{url:t});return this.wire.sendAction(\"get-cookies\",n).then((({payload:e})=>e.data))}setMinLogLevel(e){return this.wire.sendAction(\"set-min-log-level\",{level:e}).then((()=>{}))}resolveUuid(e){return this.wire.sendAction(\"resolve-uuid\",{entityKey:e}).then((({payload:e})=>e.data))}executeOnRemote(e,t){return t.requestingIdentity=e,this.wire.ferryAction(t)}readRegistryValue(e,t,n){return this.wire.sendAction(\"read-registry-value\",{rootKey:e,subkey:t,value:n}).then((({payload:e})=>e.data))}registerExternalConnection(e){return this.wire.sendAction(\"register-external-connection\",{uuid:e}).then((({payload:e})=>e.data))}async getServiceConfiguration(e){if(\"string\"!=typeof e.name)throw new Error(\"Must provide an object with a `name` property having a string value\");const{name:t}=e;return this.wire.sendAction(\"get-service-configuration\",{name:t}).then((({payload:e})=>e.data))}async getSystemAppConfig(e){if(\"string\"!=typeof e)throw new Error(\"Must provide a string value for name of system app\");return this.wire.sendAction(\"get-system-app-configuration\",{name:e}).then((({payload:e})=>e.data))}async registerShutdownHandler(e){this.wire.sendAction(\"system-register-shutdown-handler\").catch((e=>{}));const{uuid:t,name:n}=this.wire.me;this.on(\"system-shutdown\",(i=>{e({proceed:()=>{this.wire.environment.raiseEvent(\"application/system-shutdown-handled\",{uuid:t,name:n,topic:\"application\"})}})}))}runRvmHealthCheck(){return this.wire.sendAction(\"run-rvm-health-check\").then((({payload:e})=>e.data))}async launchManifest(e,t={}){const{subscribe:n,...i}=t,r=i;if(n){const e=new ae.EventEmitter;n(e);const t=\"app-version-progress\",i=\"runtime-status\",o=\"app-version-complete\",s=\"app-version-error\",a=this.wire.environment.getNextMessageId().toString();r.appVersionId=a;const c=[o,t,i,s],d=e=>{const{appVersionId:t,topic:n,type:i,...r}=e;return{...r,type:c.find((e=>i.includes(e)))}},h=t=>{const n=d(t);e.emit(n.type,n)},l=()=>{this.removeListener(`${t}.${a}`,h),this.removeListener(`${i}.${a}`,h),this.removeListener(`${o}.${a}`,h),this.removeListener(`${s}.${a}`,h),this.removeListener(`${o}.${a}`,l),this.removeListener(`${s}.${a}`,l)};await Promise.all([this.on(`${t}.${a}`,h),this.on(`${i}.${a}`,h),this.once(`${o}.${a}`,h),this.once(`${s}.${a}`,h),this.once(`${o}.${a}`,l),this.once(`${s}.${a}`,l)])}return(await this.wire.sendAction(\"launch-manifest\",{manifestUrl:e,opts:r})).payload.data.manifest}async queryPermissionForCurrentContext(e){const t={uuid:this.wire.me.uuid,name:this.wire.me.name};return(await this.wire.sendAction(\"query-permission-for-current-context\",{apiName:e,identity:t})).payload.data}async enableNativeWindowIntegrationProvider(e){const{payload:t}=await this.wire.sendAction(\"enable-native-window-integration-provider\",{permissions:e});return t.data}async registerUsage({data:e,type:t}){await this.wire.sendAction(\"register-usage\",{data:e,type:t})}async getPrinters(){const{payload:e}=await this.wire.sendAction(\"system-get-printers\");return e.data}async updateProcessLoggingOptions(e){await this.wire.sendAction(\"system-update-process-logging-options\",{options:e})}async getDomainSettings(){const{payload:{data:e}}=await this.wire.sendAction(\"get-domain-settings\",this.identity);return e}async setDomainSettings(e){await this.wire.sendAction(\"set-domain-settings\",{domainSettings:e,...this.identity})}async refreshExtensions(){const{payload:e}=await this.wire.sendAction(\"refresh-extensions\");return e.data}async getInstalledExtensions(){const{payload:e}=await this.wire.sendAction(\"get-installed-extensions\");return e.data}}c.System=ce;var de={},he={};Object.defineProperty(he,\"__esModule\",{value:!0}),he.RefCounter=void 0;he.RefCounter=class{constructor(){this.topicRefMap=new Map}incRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t+1;n=i,this.topicRefMap.set(e,i)}else this.topicRefMap.set(e,1),n=1;return n}decRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t-1;this.topicRefMap.set(e,i),n=i}else n=-1;return n}actOnFirst(e,t,n){return 1===this.incRefCount(e)?t():n()}actOnLast(e,t,n){return 0===this.decRefCount(e)?t():n()}};var le={},ue={},pe={};Object.defineProperty(pe,\"__esModule\",{value:!0}),pe.ChannelBase=pe.ProtectedItems=void 0;const we=e=>async(t,n,i)=>{const r=await e(t,n,i);return void 0===r?n:r};pe.ProtectedItems=class{constructor(e,t){this.providerIdentity=e,this.close=t}};class ye{static defaultAction(e){throw new Error(`No action registered at target for ${e}`)}constructor(){this.subscriptions=new Map}async processAction(e,t,n){try{const i=this.subscriptions.has(e)?this.subscriptions.get(e):(t,n)=>(this.defaultAction??ye.defaultAction)(e,t,n),r=this.preAction?await this.preAction(e,t,n):t,o=await i(r,n);return this.postAction?await this.postAction(e,o,n):o}catch(t){if(this.errorMiddleware)return this.errorMiddleware(e,t,n);throw t}}beforeAction(e){if(this.preAction)throw new Error(\"Already registered beforeAction middleware\");this.preAction=we(e)}onError(e){if(this.errorMiddleware)throw new Error(\"Already registered error middleware\");this.errorMiddleware=e}afterAction(e){if(this.postAction)throw new Error(\"Already registered afterAction middleware\");this.postAction=we(e)}remove(e){this.subscriptions.delete(e)}setDefaultAction(e){if(this.defaultAction)throw new Error(\"default action can only be set once\");this.defaultAction=e}register(e,t){if(this.subscriptions.has(e))throw new Error(`Subscription already registered for action: ${e}. Unsubscribe before adding new subscription`);return this.subscriptions.set(e,t),!0}}pe.ChannelBase=ye;var fe,ge,me,ve=s&&s.__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)},Ce=s&&s.__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};Object.defineProperty(ue,\"__esModule\",{value:!0}),ue.ChannelClient=void 0;const be=pe,Ie=new Map;class Ee extends be.ChannelBase{static closeChannelByEndpointId(e){const t=Ie.get(e);t&&ve(t,me,\"f\").call(t)}static handleProviderDisconnect(e){for(const t of Ie.values())t.providerIdentity.channelId===e.channelId&&(t.disconnectListener(e),ve(t,me,\"f\").call(t))}constructor(e,t,n){super(),fe.set(this,void 0),ge.set(this,void 0),this.processAction=(e,t,n)=>super.processAction(e,t,n),me.set(this,(()=>{Ie.delete(this.endpointId),ve(this,ge,\"f\").close()})),Ce(this,fe,new be.ProtectedItems(e,t),\"f\"),this.disconnectListener=()=>{},this.endpointId=e.endpointId,Ce(this,ge,n,\"f\"),Ie.set(this.endpointId,this),n.receive(this.processAction)}get providerIdentity(){return ve(this,fe,\"f\").providerIdentity}async dispatch(e,t){if(ve(this,ge,\"f\").isEndpointConnected(this.providerIdentity.channelId))return ve(this,ge,\"f\").send(this.providerIdentity.channelId,e,t);throw new Error(\"The client you are trying to dispatch from is disconnected from the target provider.\")}onDisconnection(e){this.disconnectListener=t=>{try{e(t)}catch(e){throw new Error(`Error while calling the onDisconnection callback: ${e.message}`)}finally{this.disconnectListener=()=>{}}}}async disconnect(){await this.sendDisconnectAction(),ve(this,me,\"f\").call(this)}async sendDisconnectAction(){const e=ve(this,fe,\"f\");await e.close()}static async wireClose(e,t,n){const{channelName:i,uuid:r,name:o}=t;await e.sendAction(\"disconnect-from-channel\",{channelName:i,uuid:r,name:o,endpointId:n})}}ue.ChannelClient=Ee,fe=new WeakMap,ge=new WeakMap,me=new WeakMap;var xe={},Ae={};Object.defineProperty(Ae,\"__esModule\",{value:!0}),Ae.exhaustiveCheck=void 0,Ae.exhaustiveCheck=function(e,t){throw new Error(`Unsupported value: ${e}${t?`\\n Supported values are: ${t.join(\"\")}`:\"\"}`)};var Pe,Me,_e,Oe={},Se=s&&s.__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},Re=s&&s.__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)};Object.defineProperty(Oe,\"__esModule\",{value:!0}),Oe.ClassicInfo=Oe.ClassicStrategy=void 0;Oe.ClassicStrategy=class{constructor(e,t,n,i){this.messageReceiver=t,this.endpointId=n,this.providerIdentity=i,Pe.set(this,void 0),Me.set(this,new Map),_e.set(this,new Map),this.send=async(e,t,n)=>{const i=Re(this,Me,\"f\").get(e);if(!i)throw new Error(`Could not locate routing info for endpoint ${e}`);const r={...i};r.isLocalEndpointId&&delete r.endpointId,delete r.isLocalEndpointId;const o=Re(this,Pe,\"f\").sendAction(\"send-channel-message\",{...r,providerIdentity:this.providerIdentity,action:t,payload:n});Re(this,_e,\"f\").get(e)?.add(o);return(await o.catch((e=>{throw new Error(e.message)})).finally((()=>{Re(this,_e,\"f\").get(e)?.delete(o)}))).payload.data.result},this.close=async()=>{this.messageReceiver.removeEndpoint(this.providerIdentity.channelId,this.endpointId),[...Re(this,Me,\"f\").keys()].forEach((e=>this.closeEndpoint(e))),Se(this,Me,new Map,\"f\")},Se(this,Pe,e,\"f\")}onEndpointDisconnect(e,t){}receive(e){this.messageReceiver.addEndpoint(e,this.providerIdentity.channelId,this.endpointId)}async closeEndpoint(e){const t=Re(this,Me,\"f\").get(e);Re(this,Me,\"f\").delete(e);const n=Re(this,_e,\"f\").get(e);n?.forEach((n=>{const i=`Channel connection with identity uuid: ${t?.uuid} / name: ${t?.name} / endpointId: ${e} no longer connected.`;n.cancel(new Error(i))}))}isEndpointConnected(e){return Re(this,Me,\"f\").has(e)}addEndpoint(e,t){Re(this,Me,\"f\").set(e,t.endpointIdentity),Re(this,_e,\"f\").set(e,new Set)}isValidEndpointPayload(e){return\"string\"==typeof e?.endpointIdentity?.endpointId||\"string\"==typeof e?.endpointIdentity?.channelId}},Pe=new WeakMap,Me=new WeakMap,_e=new WeakMap,Oe.ClassicInfo={version:5,minimumVersion:0,type:\"classic\"};var Fe={},je={},ke={};Object.defineProperty(ke,\"__esModule\",{value:!0}),ke.errorToPOJO=void 0,ke.errorToPOJO=function(e){return{stack:e.stack,name:e.name,message:e.message,toString:()=>e.stack||e.toString()}};var Le,Te,$e=s&&s.__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)},Be=s&&s.__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};Object.defineProperty(je,\"__esModule\",{value:!0}),je.RTCEndpoint=void 0;const Ge=ke;je.RTCEndpoint=class{static isValidEndpointPayload(e){const t=e=>\"object\"==typeof e&&null!==e;return t(e)&&t(e.endpointIdentity)&&t(e.rtc)&&\"string\"==typeof e.endpointIdentity.endpointId}constructor({rtc:e,endpointIdentity:t}){this.responseMap=new Map,Le.set(this,null),Te.set(this,void 0),this.connectionStateChangeHandler=e=>{\"connected\"!==this.rtc.rtcClient.connectionState&&(this.rtc.rtcClient.removeEventListener(\"connectionstatechange\",this.connectionStateChangeHandler),this.close(),$e(this,Te,\"f\")&&$e(this,Te,\"f\").call(this))},this.send=async(e,t)=>{const n=`message-${Math.random()}`,i=new Promise(((e,t)=>{this.responseMap.set(n,{resolve:e,reject:t})}));return this.rtc.channels.request.send(JSON.stringify({action:e,payload:t,messageId:n})),i},this.close=()=>{this.responseMap.forEach((e=>e.reject(\"Connection has closed.\"))),this.responseMap=new Map,this.rtc.channels.request.close(),this.rtc.channels.response.close(),this.rtc.rtcClient.close()},this.rtc=e,this.endpointIdentity=t,this.rtc.channels.response.addEventListener(\"message\",(e=>{let{data:t}=e;e.data instanceof ArrayBuffer&&(t=(new TextDecoder).decode(e.data));const{messageId:n,payload:i,success:r,error:o}=JSON.parse(t),{resolve:s,reject:a}=this.responseMap.get(n)??{};s&&a?(this.responseMap.delete(n),r?s(i):a(o)):(console.log(\"Could not find id in responseMap.\"),console.log(e))})),this.rtc.channels.request.addEventListener(\"message\",(async e=>{let{data:n}=e;e.data instanceof ArrayBuffer&&(n=(new TextDecoder).decode(e.data));const{messageId:i,action:r,payload:o}=JSON.parse(n);if($e(this,Le,\"f\"))try{const e=await $e(this,Le,\"f\").call(this,r,o,t);this.rtc.channels.response.send(JSON.stringify({messageId:i,payload:e,success:!0}))}catch(e){\"open\"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,error:(0,Ge.errorToPOJO)(e),success:!1}))}else\"open\"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,success:!1,error:\"Connection not ready.\"}))})),this.rtc.rtcClient.addEventListener(\"connectionstatechange\",this.connectionStateChangeHandler),Object.values(this.rtc.channels).forEach((e=>{e.onclose=e=>{[...this.responseMap.values()].forEach((e=>e.reject(new Error(\"RTCDataChannel closed unexpectedly, this is most commonly caused by message size. Note: RTC Channels have a message size limit of ~255kB.\")))),this.close(),$e(this,Te,\"f\")&&$e(this,Te,\"f\").call(this)}}))}onDisconnect(e){if($e(this,Te,\"f\"))throw new Error(\"RTCEndpoint disconnectListener cannot be set twice.\");Be(this,Te,e,\"f\")}receive(e){if($e(this,Le,\"f\"))throw new Error(\"You have already set a listener for this RTC Endpoint.\");Be(this,Le,e,\"f\")}get connected(){return\"connected\"===this.rtc.rtcClient.connectionState}},Le=new WeakMap,Te=new WeakMap;var We,He,Ne,De={},Ue=s&&s.__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)},Ve=s&&s.__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};Object.defineProperty(De,\"__esModule\",{value:!0}),De.EndpointStrategy=void 0;De.EndpointStrategy=class{constructor(e,t,n){this.EndpointType=e,this.StrategyName=n,We.set(this,null),He.set(this,new Map),Ne.set(this,!0),this.send=async(e,t,n)=>this.getEndpointById(e).send(t,n),this.close=async()=>{Ue(this,Ne,\"f\")&&(Ue(this,He,\"f\").forEach((e=>e.close())),Ve(this,He,new Map,\"f\")),Ve(this,Ne,!1,\"f\")},this.isValidEndpointPayload=t}onEndpointDisconnect(e,t){this.getEndpointById(e).onDisconnect(t)}receive(e){if(Ue(this,We,\"f\"))throw new Error(`You have already set a listener for this ${this.StrategyName} Strategy`);Ve(this,We,e,\"f\"),Ue(this,He,\"f\").forEach((e=>e.receive(Ue(this,We,\"f\"))))}getEndpointById(e){const t=Ue(this,He,\"f\").get(e);if(!t)throw new Error(`Client with endpoint id ${e} is not connected`);return t}get connected(){return Ue(this,Ne,\"f\")}isEndpointConnected(e){return Ue(this,He,\"f\").has(e)}addEndpoint(e,t){if(!Ue(this,Ne,\"f\"))return void console.warn(`Adding endpoint to disconnected ${this.StrategyName} Strategy`);const n=new this.EndpointType(t);Ue(this,We,\"f\")&&n.receive(Ue(this,We,\"f\")),Ue(this,He,\"f\").set(e,n)}async closeEndpoint(e){Ue(this,He,\"f\").delete(e)}},We=new WeakMap,He=new WeakMap,Ne=new WeakMap,Object.defineProperty(Fe,\"__esModule\",{value:!0}),Fe.RTCInfo=Fe.RTCStrategy=void 0;const ze=je,Ke=De;class qe extends Ke.EndpointStrategy{constructor(){super(ze.RTCEndpoint,ze.RTCEndpoint.isValidEndpointPayload,\"RTC\")}}Fe.RTCStrategy=qe,Fe.RTCInfo={version:2,minimumVersion:0,type:\"rtc\"};var Je={};Object.defineProperty(Je,\"__esModule\",{value:!0}),Je.RTCICEManager=void 0;const Ye=d;class Ze extends Ye.EmitterBase{constructor(e){super(e,\"channel\"),this.ensureChannelOpened=e=>new Promise(((t,n)=>{if(\"open\"===e.readyState)t();else if(\"connecting\"===e.readyState){const n=()=>{e.removeEventListener(\"open\",n),t()};e.addEventListener(\"open\",n)}else n(new Error(\"This Channel has already closed\"))}))}static createDataChannelPromise(e,t){let n;const i=new Promise((e=>{n=e})),r=i=>{const o=()=>{i.channel.removeEventListener(\"open\",o),n(i.channel)};i.channel.label===e&&(i.channel.addEventListener(\"open\",o),t.removeEventListener(\"datachannel\",r))};return t.addEventListener(\"datachannel\",r),i}async listenForProviderIce(e,t){await this.on(this.createProviderEventName(e),t,{timestamp:Date.now()})}async raiseProviderIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createProviderEventName(e)),t)}async listenForClientIce(e,t){await this.on(this.createClientEventName(e),t,{timestamp:Date.now()})}async raiseClientIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createClientEventName(e)),t)}cleanupIceListeners(e){this.removeAllListeners(this.createClientEventName(e)),this.removeAllListeners(this.createProviderEventName(e))}createClientEventName(e){return`ice-client-${e}`}createProviderEventName(e){return`ice-provider-${e}`}createRouteString(e){return`channel/${e}`}createRtcPeer(){return this.wire.environment.getRtcPeer()}async startClientOffer(){const e=Math.random().toString(),t=this.createRtcPeer();t.addEventListener(\"icecandidate\",(async t=>{t.candidate&&await this.raiseClientIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForProviderIce(e,(async e=>{await t.addIceCandidate(e.candidate)}));const n={request:t.createDataChannel(\"request\"),response:t.createDataChannel(\"response\")},i=await t.createOffer();await t.setLocalDescription(i);const r=Promise.all([n.request,n.response].map(this.ensureChannelOpened)).then((()=>{}));return{rtcClient:t,channels:n,offer:i,rtcConnectionId:e,channelsOpened:r}}async finishClientOffer(e,t,n){return await e.setRemoteDescription(t),await n,!0}async createProviderAnswer(e,t){const n=this.createRtcPeer(),i=Ze.createDataChannelPromise(\"request\",n),r=Ze.createDataChannelPromise(\"response\",n);n.addEventListener(\"icecandidate\",(async t=>{t.candidate&&await this.raiseProviderIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForClientIce(e,(async e=>{await n.addIceCandidate(e.candidate)})),await n.setRemoteDescription(t);const o=await n.createAnswer();await n.setLocalDescription(o);const s=Promise.all([i,r]).then((([t,n])=>(this.cleanupIceListeners(e),{request:t,response:n})));return{rtcClient:n,answer:o,channels:s}}}Je.RTCICEManager=Ze;var Qe={},Xe={};function et(e){return[...e.split(\".\").reverse().entries()].reduce(((e,[t,n])=>e+ +n*1e4**t),0)}function tt(e,t){return et(e)>=et(t)}function nt(e){return e.split(\"/\")[0]}Object.defineProperty(Xe,\"__esModule\",{value:!0}),Xe.runtimeUuidMeetsMinimumRuntimeVersion=Xe.parseRuntimeUuid=Xe.meetsMinimumRuntimeVersion=void 0,Xe.meetsMinimumRuntimeVersion=tt,Xe.parseRuntimeUuid=nt,Xe.runtimeUuidMeetsMinimumRuntimeVersion=function(e,t){return tt(nt(e),t)};var it,rt,ot,st,at,ct=s&&s.__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)},dt=s&&s.__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};Object.defineProperty(Qe,\"__esModule\",{value:!0}),Qe.ChannelProvider=void 0;const ht=pe,lt=Xe;class ut extends ht.ChannelBase{get connections(){return[...ct(this,it,\"f\")]}static handleClientDisconnection(e,t){const n=e.connections.find((e=>e.endpointId===t.endpointId));if(n)ct(e,st,\"f\").call(e,n);else{e.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name)).forEach(ct(e,st,\"f\"))}e.disconnectListener(t)}static setProviderRemoval(e,t){ut.removalMap.set(e,t)}constructor(e,t,n){super(),it.set(this,void 0),rt.set(this,void 0),ot.set(this,void 0),st.set(this,(e=>{const t=this.connections.filter((t=>t.endpointId!==e.endpointId));ct(this,ot,\"f\").closeEndpoint(e.endpointId),dt(this,it,t,\"f\")})),this.processAction=async(e,t,n)=>(ut.clientIsMultiRuntime(n)&&!(0,lt.runtimeUuidMeetsMinimumRuntimeVersion)(n.runtimeUuid,\"18.87.56.0\")?this.handleMultiRuntimeLegacyClient(n):this.checkForClientConnection(n),super.processAction(e,t,n)),at.set(this,(()=>{ct(this,ot,\"f\").close();const e=ut.removalMap.get(this);e&&e()})),dt(this,rt,new ht.ProtectedItems(e,t),\"f\"),this.connectListener=()=>{},this.disconnectListener=()=>{},dt(this,it,[],\"f\"),dt(this,ot,n,\"f\"),n.receive(this.processAction)}dispatch(e,t,n){const i=e.endpointId??this.getEndpointIdForOpenFinId(e,t);return i&&ct(this,ot,\"f\").isEndpointConnected(i)?ct(this,ot,\"f\").send(i,t,n):Promise.reject(new Error(`Client connection with identity uuid: ${e.uuid} / name: ${e.name} / endpointId: ${i} no longer connected.`))}async processConnection(e,t){return ct(this,it,\"f\").push(e),this.connectListener(e,t)}publish(e,t){return this.connections.map((n=>ct(this,ot,\"f\").send(n.endpointId,e,t)))}onConnection(e){this.connectListener=e}onDisconnection(e){this.disconnectListener=e}async destroy(){const e=ct(this,rt,\"f\");e.providerIdentity,dt(this,it,[],\"f\"),await e.close(),ct(this,at,\"f\").call(this)}async getAllClientInfo(){return this.connections.map((e=>{const{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}=e;return{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}}))}checkForClientConnection(e){if(!this.isClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider.\\n Client Identity: {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}isClientConnected(e){return ut.clientIdentityIncludesEndpointId(e)?this.connections.some((t=>t.endpointId===e.endpointId&&t.uuid===e.uuid&&t.name===e.name)):this.isLegacyClientConnected(e)}isLegacyClientConnected(e){return this.connections.some((t=>t.uuid===e.uuid&&t.name===e.name))}handleMultiRuntimeLegacyClient(e){if(!this.isLegacyClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider. Client Identity:\\n {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}getEndpointIdForOpenFinId(e,t){const n=this.connections.filter((t=>t.name===e.name&&t.uuid===e.uuid));if(n.length>=2){const n=ct(this,rt,\"f\"),{uuid:i,name:r}=e,o=n?.providerIdentity.uuid,s=n?.providerIdentity.name;console.warn(`WARNING: Dispatch call may have unintended results. The \"to\" argument of your dispatch call is missing the\\n \"endpointId\" parameter. The identity you are dispatching to ({uuid: ${i}, name: ${r}})\\n has multiple channelClients for this channel. Your dispatched action: (${t}) from the provider:\\n ({uuid: ${o}, name: ${s}}) will only be processed by the most recently-created client.`)}return n.pop()?.endpointId}static clientIdentityIncludesEndpointId(e){return void 0!==e.endpointId}static clientIsMultiRuntime(e){return void 0!==e.runtimeUuid}static async wireClose(e,t){await e.sendAction(\"destroy-channel\",{channelName:t})}}Qe.ChannelProvider=ut,it=new WeakMap,rt=new WeakMap,ot=new WeakMap,st=new WeakMap,at=new WeakMap,ut.removalMap=new WeakMap;var pt={};Object.defineProperty(pt,\"__esModule\",{value:!0}),pt.MessageReceiver=void 0;const wt=ue,yt=d;class ft extends yt.Base{constructor(e){super(e),this.onmessage=e=>\"process-channel-message\"===e.action&&(this.processChannelMessage(e),!0),this.endpointMap=new Map,this.latestEndpointIdByChannelId=new Map,e.registerMessageHandler(this.onmessage.bind(this))}async processChannelMessage(e){const{senderIdentity:t,providerIdentity:n,action:i,ackToSender:r,payload:o,intendedTargetIdentity:s}=e.payload,a=s.channelId??s.endpointId??this.latestEndpointIdByChannelId.get(n.channelId),c=this.endpointMap.get(a);if(!c)return r.payload.success=!1,r.payload.reason=`Client connection with identity uuid: ${this.wire.me.uuid} / name: ${this.wire.me.name} / endpointId: ${a} no longer connected.`,this.wire.sendRaw(r);try{const e=await c(i,o,t);return r.payload.payload=r.payload.payload||{},r.payload.payload.result=e,this.wire.sendRaw(r)}catch(e){return r.payload.success=!1,r.payload.reason=e.message,this.wire.sendRaw(r)}}addEndpoint(e,t,n){this.endpointMap.set(n,e),t!==n&&this.latestEndpointIdByChannelId.set(t,n)}removeEndpoint(e,t){this.endpointMap.delete(t),this.latestEndpointIdByChannelId.get(e)===t&&this.latestEndpointIdByChannelId.delete(e)}checkForPreviousClientConnection(e){const t=this.latestEndpointIdByChannelId.get(e);t&&(wt.ChannelClient.closeChannelByEndpointId(t),console.warn(\"You have created a second connection to an older provider. First connection has been removed from the clientMap\"),console.warn(\"If the provider calls publish(), you may receive multiple messages.\"))}}pt.MessageReceiver=ft;var gt={};Object.defineProperty(gt,\"__esModule\",{value:!0}),gt.ProtocolManager=void 0;gt.ProtocolManager=class{constructor(e){this.ProtocolsInPreferenceOrder=e,this.DefaultClientProtocols=[\"classic\"],this.DefaultProviderProtocols=[\"classic\"],this.getClientProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultClientProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(\", \")}.`);return t},this.getProviderProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultProviderProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(\", \")}.`);return t},this.getCompatibleProtocols=(e,t)=>t.supportedProtocols.filter((t=>e.some((e=>e.type===t.type&&t.version>=e.minimumVersion&&e.version>=(t.minimumVersion??0))))).slice(0,t.maxProtocols)}};var mt={};Object.defineProperty(mt,\"__esModule\",{value:!0});class vt{static combine(e,t){return new vt(e,t)}constructor(e,t){this.primary=e,this.secondary=t}onEndpointDisconnect(e,t){this.primary.onEndpointDisconnect(e,(()=>{this.secondary.isEndpointConnected(e)||t()})),this.secondary.onEndpointDisconnect(e,(()=>{this.primary.isEndpointConnected(e)||t()}))}isValidEndpointPayload(e){return this.primary.isValidEndpointPayload(e)||this.secondary.isValidEndpointPayload(e)}async closeEndpoint(e){await this.primary.closeEndpoint(e),await this.secondary.closeEndpoint(e)}isEndpointConnected(e){return this.primary.isEndpointConnected(e)||this.secondary.isEndpointConnected(e)}async addEndpoint(e,t){this.primary.isValidEndpointPayload(t)&&await this.primary.addEndpoint(e,t),this.secondary.isValidEndpointPayload(t)&&await this.secondary.addEndpoint(e,t)}receive(e){this.primary.receive(e),this.secondary.receive(e)}send(e,t,n){return this.primary.isEndpointConnected(e)?this.primary.send(e,t,n):this.secondary.send(e,t,n)}async close(){await Promise.all([this.primary.close(),this.secondary.close()])}}mt.default=vt;var Ct,bt,It=s&&s.__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},Et=s&&s.__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)},xt=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(xe,\"__esModule\",{value:!0}),xe.ConnectionManager=void 0;const At=Ae,Pt=d,Mt=Oe,_t=Fe,Ot=Je,St=Qe,Rt=pt,Ft=gt,jt=xt(mt);class kt extends Pt.Base{static getProtocolOptionsFromStrings(e){return e.map((e=>{switch(e){case\"rtc\":return _t.RTCInfo;case\"classic\":return Mt.ClassicInfo;default:return(0,At.exhaustiveCheck)(e,[\"rtc\",\"classic\"])}}))}constructor(e){super(e),Ct.set(this,void 0),bt.set(this,void 0),this.removeChannelFromProviderMap=e=>{this.providerMap.delete(e)},this.onmessage=e=>\"process-channel-connection\"===e.action&&(this.processChannelConnection(e),!0),this.providerMap=new Map,this.protocolManager=new Ft.ProtocolManager(\"node\"===this.wire.environment.type?[\"classic\"]:[\"rtc\",\"classic\"]),It(this,Ct,new Rt.MessageReceiver(e),\"f\"),It(this,bt,new Ot.RTCICEManager(e),\"f\"),e.registerMessageHandler(this.onmessage.bind(this))}createProvider(e,t){const n=Object.assign(this.wire.environment.getDefaultChannelOptions().create,e||{}),i=this.protocolManager.getProviderProtocols(n?.protocols),r=i.map((e=>{switch(e){case\"rtc\":return new _t.RTCStrategy;case\"classic\":return new Mt.ClassicStrategy(this.wire,Et(this,Ct,\"f\"),t.channelId,t);default:return(0,At.exhaustiveCheck)(e,[\"rtc\",\"classic\"])}}));let o;if(2===r.length){const[e,t]=r;o=jt.default.combine(e,t)}else{if(1!==r.length)throw new Error(\"failed to combine strategies\");[o]=r}const s=new St.ChannelProvider(t,(()=>St.ChannelProvider.wireClose(this.wire,t.channelName)),o),a=t.channelId;return this.providerMap.set(a,{provider:s,strategy:o,supportedProtocols:kt.getProtocolOptionsFromStrings(i)}),St.ChannelProvider.setProviderRemoval(s,this.removeChannelFromProviderMap.bind(this)),s}async createClientOffer(e){const t=this.protocolManager.getClientProtocols(e?.protocols);let n;return{offer:{supportedProtocols:await Promise.all(t.map((async e=>{switch(e){case\"rtc\":{const{rtcClient:e,channels:t,offer:i,rtcConnectionId:r,channelsOpened:o}=await Et(this,bt,\"f\").startClientOffer();return n={rtcClient:e,channels:t,channelsOpened:o},{type:\"rtc\",version:_t.RTCInfo.version,payload:{offer:i,rtcConnectionId:r}}}case\"classic\":return{type:\"classic\",version:Mt.ClassicInfo.version};default:return(0,At.exhaustiveCheck)(e,[\"rtc\",\"classic\"])}}))),maxProtocols:2},rtc:n}}async createClientStrategy(e,t){t.endpointId||(t.endpointId=this.wire.environment.getNextMessageId(),Et(this,Ct,\"f\").checkForPreviousClientConnection(t.channelId));const n=t.answer??{supportedProtocols:[{type:\"classic\",version:1}]},i=(await Promise.all(n.supportedProtocols.map((async n=>\"rtc\"===n.type&&e?(await Et(this,bt,\"f\").finishClientOffer(e.rtcClient,n.payload.answer,e.channelsOpened),new _t.RTCStrategy):\"classic\"===n.type?new Mt.ClassicStrategy(this.wire,Et(this,Ct,\"f\"),t.endpointId,t):null)))).filter((e=>null!==e));let r;if(e&&!i.some((e=>e instanceof _t.RTCStrategy))&&e&&e.rtcClient.close(),i.length>=2)r=jt.default.combine(i[0],i[1]);else{if(!i.length)throw new Error(\"No compatible protocols\");[r]=i}const o={endpointIdentity:t,rtc:e};return r.addEndpoint(t.channelId,o),r}async processChannelConnection(e){const{clientIdentity:t,providerIdentity:n,ackToSender:i,payload:r,offer:o}=e.payload;t.endpointId?t.isLocalEndpointId=!1:(t.endpointId=this.wire.environment.getNextMessageId(),t.isLocalEndpointId=!0);const s=n.channelId,a=this.providerMap.get(s);if(!a)return i.payload.success=!1,i.payload.reason=`Channel \"${n.channelName}\" has been destroyed.`,this.wire.sendRaw(i);const{provider:c,strategy:d,supportedProtocols:h}=a;try{if(!(c instanceof St.ChannelProvider))throw Error(\"Cannot connect to a channel client\");const e=o??{supportedProtocols:[{type:\"classic\",version:1}],maxProtocols:1},n=this.protocolManager.getCompatibleProtocols(h,e);if(!n.length)throw new Error(\"This provider does not support any of the offered protocols.\");const s=await c.processConnection(t,r);i.payload.payload=i.payload.payload||{};let a={supportedProtocols:[],endpointPayloadPromise:Promise.resolve({endpointIdentity:t})};return a=await n.reduce((async(e,t)=>{const n=await e;if(\"rtc\"===t.type){const{answer:e,rtcClient:i,channels:r}=await Et(this,bt,\"f\").createProviderAnswer(t.payload.rtcConnectionId,t.payload.offer);n.supportedProtocols.push({type:\"rtc\",version:_t.RTCInfo.version,payload:{answer:e}}),n.endpointPayloadPromise=n.endpointPayloadPromise.then((e=>r.then((t=>({...e,rtc:{rtcClient:i,channels:t}})))))}else n.supportedProtocols.push({type:\"classic\",version:Mt.ClassicInfo.version});return n}),Promise.resolve(a)),a.endpointPayloadPromise.then((e=>d.addEndpoint(t.endpointId,e))),i.payload.payload.result=s,i.payload.payload.answer=a,this.wire.sendRaw(i)}catch(e){return i.payload.success=!1,i.payload.reason=e.message,this.wire.sendRaw(i)}}}xe.ConnectionManager=kt,Ct=new WeakMap,bt=new WeakMap;var Lt,Tt,$t,Bt=s&&s.__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},Gt=s&&s.__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)};Object.defineProperty(le,\"__esModule\",{value:!0}),le.Channel=void 0;const Wt=t,Ht=G,Nt=d,Dt=ue,Ut=xe,Vt=Qe;function zt(e){const t=Math.floor(e/10),n=Math.min(3e4,500*2**t);return new Promise((e=>{setTimeout((()=>{e(!1)}),n)}))}class Kt extends Nt.EmitterBase{constructor(e){super(e,\"channel\"),Lt.set(this,void 0),Tt.set(this,new Wt.EventEmitter),$t.set(this,new Ht.AsyncRetryableLazy((async()=>{await Promise.all([this.on(\"disconnected\",(e=>{Dt.ChannelClient.handleProviderDisconnect(e)})),this.on(\"connected\",((...e)=>{Gt(this,Tt,\"f\").emit(\"connected\",...e)}))]).catch((()=>new Error(\"error setting up channel connection listeners\")))}))),Bt(this,Lt,new Ut.ConnectionManager(e),\"f\")}async getAllChannels(){return this.wire.sendAction(\"get-all-channels\").then((({payload:e})=>e.data))}async onChannelConnect(e){await this.on(\"connected\",e)}async onChannelDisconnect(e){await this.on(\"disconnected\",e)}async safeConnect(e,t,n){const i={count:0};do{let r=()=>{};const o=new Promise((t=>{r=n=>{e===n.channelName&&t(!0)},Gt(this,Tt,\"f\").on(\"connected\",r)}));try{if(i.count>0){i.gotConnectedEvent=await Promise.race([zt(i.count),o]);const t=await this.wire.sendAction(\"connect-to-channel\",{...n,retryInfo:i});return console.log(`Successfully connected to channelName: ${e}`),t.payload.data}const t=this.wire.sendAction(\"connect-to-channel\",n);i.originalMessageId=t.messageId;return(await t).payload.data}catch(n){if(!n.message.includes(\"internal-nack\"))throw n;t&&0===i.count&&console.warn(`No channel found for channelName: ${e}. Waiting for connection...`)}finally{i.count+=1,Gt(this,Tt,\"f\").removeListener(\"connected\",r)}}while(t);throw new Error(`No channel found for channelName: ${e}.`)}async connect(e,t={}){if(await Gt(this,$t,\"f\").getValue(),!e||\"string\"!=typeof e)throw new Error(\"Please provide a channelName string to connect to a channel.\");const n={wait:!0,...this.wire.environment.getDefaultChannelOptions().connect,...t},{offer:i,rtc:r}=await Gt(this,Lt,\"f\").createClientOffer(n);let o;(this.fin.me.isFrame||this.fin.me.isView||this.fin.me.isWindow)&&(o=(await this.fin.me.getInfo()).url);const s={channelName:e,...n,offer:i,connectionUrl:o},a=await this.safeConnect(e,n.wait,s),c=await Gt(this,Lt,\"f\").createClientStrategy(r,a),d=new Dt.ChannelClient(a,(()=>Dt.ChannelClient.wireClose(this.wire,a,a.endpointId)),c);return c.onEndpointDisconnect(a.channelId,(async()=>{try{await d.sendDisconnectAction()}catch(e){console.warn(`Something went wrong during disconnect for client with uuid: ${a.uuid} / name: ${a.name} / endpointId: ${a.endpointId}.`)}finally{Dt.ChannelClient.handleProviderDisconnect(a)}})),d}async create(e,t){if(!e)throw new Error(\"Please provide a channelName to create a channel\");const{payload:{data:n}}=await this.wire.sendAction(\"create-channel\",{channelName:e}),i=Gt(this,Lt,\"f\").createProvider(t,n);return this.on(\"client-disconnected\",(t=>{t.channelName===e&&Vt.ChannelProvider.handleClientDisconnection(i,t)})),i}}le.Channel=Kt,Lt=new WeakMap,Tt=new WeakMap,$t=new WeakMap,Object.defineProperty(de,\"__esModule\",{value:!0}),de.InterAppPayload=de.InterApplicationBus=void 0;const qt=t,Jt=d,Yt=he,Zt=le,Qt=O;class Xt extends Jt.Base{constructor(e){super(e),this.events={subscriberAdded:\"subscriber-added\",subscriberRemoved:\"subscriber-removed\"},this.refCounter=new Yt.RefCounter,this.Channel=new Zt.Channel(e),this.emitter=new qt.EventEmitter,e.registerMessageHandler(this.onmessage.bind(this)),this.on=this.emitter.on.bind(this.emitter),this.removeAllListeners=this.emitter.removeAllListeners.bind(this.emitter)}async publish(e,t){await this.wire.sendAction(\"publish-message\",{topic:e,message:t,sourceWindowName:this.me.name})}async send(e,t,n){const i=(0,Qt.validateIdentity)(e);if(i)throw new Error(i);await this.wire.sendAction(\"send-message\",{destinationUuid:e.uuid,destinationWindowName:e.name,topic:t,message:n,sourceWindowName:this.me.name})}subscribe(e,t,n){const i=this.createSubscriptionKey(e.uuid,e.name||\"*\",t);return this.emitter.on(i,n),this.refCounter.actOnFirst(i,(async()=>{await this.wire.sendAction(\"subscribe\",{sourceUuid:e.uuid,sourceWindowName:e.name||\"*\",topic:t,destinationWindowName:this.me.name})}),(()=>Promise.resolve()))}unsubscribe(e,t,n){const i=e.name||\"*\",r=this.createSubscriptionKey(e.uuid,i,t);return this.emitter.removeListener(r,n),this.refCounter.actOnLast(r,(async()=>{await this.wire.sendAction(\"unsubscribe\",{sourceUuid:e.uuid,sourceWindowName:i,topic:t,destinationWindowName:this.me.name})}),(()=>new Promise((e=>e)).then((()=>{}))))}processMessage(e){const{payload:{message:t,sourceWindowName:n,sourceUuid:i,topic:r}}=e,o=[this.createSubscriptionKey(i,n,r),this.createSubscriptionKey(i,\"*\",r),this.createSubscriptionKey(\"*\",\"*\",r)],s={uuid:i,name:n};o.forEach((e=>{this.emitter.emit(e,t,s)}))}emitSubscriverEvent(e,t){const{payload:{targetName:n,uuid:i,topic:r}}=t,o={name:n,uuid:i,topic:r};this.emitter.emit(e,o)}createSubscriptionKey(e,t,n){const i=t||\"*\";if(!(e&&i&&n))throw new Error(\"Missing uuid, name, or topic string\");return function(...e){return e.map((e=>Buffer.from(`${e}`).toString(\"base64\"))).join(\"/\")}(e,i,n)}onmessage(e){const{action:t}=e;switch(t){case\"process-message\":this.processMessage(e);break;case this.events.subscriberAdded:this.emitSubscriverEvent(this.events.subscriberAdded,e);break;case this.events.subscriberRemoved:this.emitSubscriverEvent(this.events.subscriberRemoved,e)}return!0}}de.InterApplicationBus=Xt;de.InterAppPayload=class{};var en={};Object.defineProperty(en,\"__esModule\",{value:!0}),en.Clipboard=void 0;const tn=d;class nn extends tn.Base{async writeText(e){await this.wire.sendAction(\"clipboard-write-text\",e)}async readText(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-text\",{type:e});return t.data}async writeImage(e){await this.wire.sendAction(\"clipboard-write-image\",e)}async readImage(e={format:\"dataURL\"}){const{payload:t}=await this.wire.sendAction(\"clipboard-read-image\",e);return t.data}async writeHtml(e){await this.wire.sendAction(\"clipboard-write-html\",e)}async readHtml(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-html\",{type:e});return t.data}async writeRtf(e){await this.wire.sendAction(\"clipboard-write-rtf\",e)}async readRtf(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-rtf\",{type:e});return t.data}async write(e){await this.wire.sendAction(\"clipboard-write\",e)}async getAvailableFormats(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-formats\",{type:e});return t.data}}en.Clipboard=nn;var rn={},on={},sn={};Object.defineProperty(sn,\"__esModule\",{value:!0}),sn.ExternalApplication=void 0;const an=d;class cn extends an.EmitterBase{constructor(e,t){super(e,\"external-application\",t.uuid),this.identity=t}getInfo(){return this.wire.sendAction(\"get-external-application-info\",this.identity).then((({payload:e})=>e.data))}}sn.ExternalApplication=cn,Object.defineProperty(on,\"__esModule\",{value:!0}),on.ExternalApplicationModule=void 0;const dn=d,hn=sn;class ln extends dn.Base{wrap(e){return this.wire.sendAction(\"external-application-wrap\").catch((e=>{})),Promise.resolve(new hn.ExternalApplication(this.wire,{uuid:e}))}wrapSync(e){return this.wire.sendAction(\"external-application-wrap-sync\").catch((e=>{})),new hn.ExternalApplication(this.wire,{uuid:e})}}on.ExternalApplicationModule=ln,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(on,e),n(sn,e)}(rn);var un={},pn={},wn={};Object.defineProperty(wn,\"__esModule\",{value:!0}),wn._Frame=void 0;const yn=d;class fn extends yn.EmitterBase{constructor(e,t){super(e,\"frame\",t.uuid,t.name),this.identity=t}getInfo(){return this.wire.sendAction(\"get-frame-info\",this.identity).then((({payload:e})=>e.data))}getParentWindow(){return this.wire.sendAction(\"get-parent-window\",this.identity).then((({payload:e})=>e.data))}}wn._Frame=fn,Object.defineProperty(pn,\"__esModule\",{value:!0}),pn._FrameModule=void 0;const gn=d,mn=O,vn=wn;class Cn extends gn.Base{async wrap(e){this.wire.sendAction(\"frame-wrap\").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}wrapSync(e){this.wire.sendAction(\"frame-wrap-sync\").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}getCurrent(){return this.wire.sendAction(\"frame-get-current\").catch((e=>{})),Promise.resolve(new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity()))}getCurrentSync(){return this.wire.sendAction(\"frame-get-current-sync\").catch((e=>{})),new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity())}}pn._FrameModule=Cn,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(pn,e),n(wn,e)}(un);var bn={};Object.defineProperty(bn,\"__esModule\",{value:!0}),bn.GlobalHotkey=void 0;const In=d;class En extends In.EmitterBase{constructor(e){super(e,\"global-hotkey\")}async register(e,t){await this.on(e,t),await this.wire.sendAction(\"global-hotkey-register\",{hotkey:e})}async unregister(e){await this.removeAllListeners(e),await this.wire.sendAction(\"global-hotkey-unregister\",{hotkey:e})}async unregisterAll(){await Promise.all(this.eventNames().filter((e=>!(\"registered\"===e||\"unregistered\"===e))).map((e=>this.removeAllListeners(e)))),await this.wire.sendAction(\"global-hotkey-unregister-all\",{})}async isRegistered(e){const{payload:{data:t}}=await this.wire.sendAction(\"global-hotkey-is-registered\",{hotkey:e});return t}}bn.GlobalHotkey=En;var xn,An={},Pn={},Mn={},_n=s&&s.__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)};Object.defineProperty(Mn,\"__esModule\",{value:!0}),Mn.Platform=void 0;const On=d,Sn=O,Rn=new Map;class Fn extends On.EmitterBase{constructor(e,t){super(t.wire,\"application\",e.uuid),this.getClient=e=>{this.wire.sendAction(\"platform-get-client\",this.identity).catch((e=>{}));const t=e||this.identity,{uuid:n}=t;if(!Rn.has(n)){const e=_n(this,xn,\"f\").call(this,n);Rn.set(n,e)}return Rn.get(n)},xn.set(this,(async e=>{try{const t=`custom-frame-${e}`,n=await this._channel.connect(t,{wait:!1});return n.onDisconnection((()=>{Rn.delete(e)})),n}catch(t){throw Rn.delete(e),new Error(\"The targeted Platform is not currently running. Listen for application-started event for the given Uuid.\")}})),this.launchLegacyManifest=this.launchContentManifest;const n=(0,Sn.validateIdentity)(e);if(n)throw new Error(n);this._channel=t,this.identity={uuid:e.uuid},this.Layout=this.fin.Platform.Layout,this.Application=this.fin.Application.wrapSync(this.identity)}async createView(e,t,n){this.wire.sendAction(\"platform-create-view\",this.identity).catch((e=>{}));const i=await this.getClient(),r=await i.dispatch(\"create-view\",{target:t,opts:e,targetView:n});if(!r||(0,Sn.validateIdentity)(r.identity))throw new Error(`When overwriting the createView call, please return an object that has a valid 'identity' property: ${JSON.stringify(r)}`);return this.fin.View.wrapSync(r.identity)}async createWindow(e){this.wire.sendAction(\"platform-create-window\",this.identity).catch((e=>{}));const t=await this.getClient();e.reason||(e.reason=\"api-call\");const n=await t.dispatch(\"create-view-container\",e);if(!n||(0,Sn.validateIdentity)(n.identity))throw new Error(`When overwriting the createWindow call, please return an object that has a valid 'identity' property: ${JSON.stringify(n)}`);const{identity:i}=n,r=this.fin.Window.wrapSync(i);return r.name=i.name,r.uuid=i.uuid,r}async quit(){this.wire.sendAction(\"platform-quit\",this.identity).catch((e=>{}));return(await this.getClient()).dispatch(\"quit\")}async closeView(e){this.wire.sendAction(\"platform-close-view\",this.identity).catch((e=>{}));const t=await this.getClient();await t.dispatch(\"close-view\",{view:e})}async reparentView(e,t){console.warn(\"Platform.reparentView has been deprecated, please use Platform.createView\"),this.wire.sendAction(\"platform-reparent-view\",this.identity).catch((e=>{}));const n={...e,uuid:e.uuid??this.identity.uuid},i=await this.fin.View.wrap(n),r=await i.getOptions();return this.createView(r,t)}async getSnapshot(){this.wire.sendAction(\"platform-get-snapshot\",this.identity).catch((e=>{}));return(await this.getClient()).dispatch(\"get-snapshot\")}async getViewSnapshot(e){return(await this.getClient()).dispatch(\"get-view-snapshot\",{viewIdentity:e})}async applySnapshot(e,t){this.wire.sendAction(\"platform-apply-snapshot\",this.identity).catch((e=>{}));const n=\"Requested snapshot must be a valid Snapshot object, or a url or filepath to such an object.\";let i;if(\"string\"==typeof e)try{i=(await this._channel.wire.sendAction(\"get-application-manifest\",{manifestUrl:e})).payload.data}catch(e){throw new Error(`${n}: ${e}`)}else i=e;if(!i.windows)throw new Error(n);const r=await this.getClient();return await r.dispatch(\"apply-snapshot\",{snapshot:i,options:t}),this}async fetchManifest(e){return(await this.getClient()).dispatch(\"platform-fetch-manifest\",{manifestUrl:e})}async launchContentManifest(e){this.wire.sendAction(\"platform-launch-content-manifest\",this.identity).catch((()=>{}));const t=await this.getClient(),n=await this.fetchManifest(e);return t.dispatch(\"launch-into-platform\",{manifest:n,manifestUrl:e}),this}async setWindowContext(e={},t){if(this.wire.sendAction(\"platform-set-window-context\",this.identity).catch((e=>{})),!e)throw new Error(\"Please provide a serializable object or string to set the context.\");const n=await this.getClient(),{entityType:i}=t?await this.fin.System.getEntityInfo(t.uuid,t.name):this.fin.me;await n.dispatch(\"set-window-context\",{context:e,entityType:i,target:t||{uuid:this.fin.me.uuid,name:this.fin.me.name}})}async getWindowContext(e){this.wire.sendAction(\"platform-get-window-context\",this.identity).catch((e=>{}));const t=await this.getClient(),{entityType:n}=e?await this.fin.System.getEntityInfo(e.uuid,e.name):this.fin.me;return t.dispatch(\"get-window-context\",{target:e||{uuid:this.fin.me.uuid,name:this.fin.me.name},entityType:n})}async closeWindow(e,t={skipBeforeUnload:!1}){this.wire.sendAction(\"platform-close-window\",this.identity).catch((e=>{}));return(await this.getClient()).dispatch(\"close-window\",{windowId:e,options:t})}}Mn.Platform=Fn,xn=new WeakMap;var jn={},kn={},Ln={},Tn={};function $n(e){switch(e){case\"columns\":case\"grid\":case\"rows\":case\"tabs\":return!0;default:return!1}}Object.defineProperty(Tn,\"__esModule\",{value:!0}),Tn.overrideFromComposables=Tn.isValidPresetType=void 0,Tn.isValidPresetType=$n,Tn.overrideFromComposables=function(...e){return t=>e.reduceRight(((e,t)=>n=>t(e(n))),(e=>e))(t)},Tn.default={isValidPresetType:$n};var Bn={},Gn={},Wn={};Object.defineProperty(Wn,\"__esModule\",{value:!0}),Wn.ApiConsumer=void 0;Wn.ApiConsumer=class{constructor(e){this.strategy=e,this.consume=async e=>(await this.strategy.getExposedFunctions(e)).reduce(((t,n)=>({...t,[n.key]:this.strategy.createFunction(n,e)})),{})}};var Hn={},Nn={};Object.defineProperty(Nn,\"__esModule\",{value:!0}),Nn.expose=Nn.getExposedProperties=void 0;const Dn=Symbol(\"exposedProperties\");Nn.getExposedProperties=e=>e[Dn]||e.prototype[Dn]||[];Nn.expose=e=>(t,n,i)=>{t[Dn]=t[Dn]||[],t[Dn].push({key:n,descriptor:i,options:e})},Object.defineProperty(Hn,\"__esModule\",{value:!0}),Hn.ApiExposer=void 0;const Un=Nn;Hn.ApiExposer=class{constructor(e){this.strategy=e,this.exposeInstance=async(e,t)=>{const n=(0,Un.getExposedProperties)(e),i=await Promise.all(n.map((async({key:n,options:i})=>({key:n,options:await this.strategy.exposeFunction(e[n].bind(e),{key:n,options:i,meta:t})}))));await this.strategy.exposeMeta(t,i)}}};var Vn={},zn={},Kn={};Object.defineProperty(Kn,\"__esModule\",{value:!0}),Kn.ChannelsConsumer=void 0;Kn.ChannelsConsumer=class{constructor(e){this.channel=e,this.getExposedFunctions=async e=>{const{id:t}=e,{props:n}=await this.channel.dispatch(`api-meta:${t}`);return n},this.createFunction=e=>(...t)=>{const{action:n}=e.options;return this.channel.dispatch(n,{args:t})}}};var qn={};Object.defineProperty(qn,\"__esModule\",{value:!0}),qn.ChannelsExposer=void 0;qn.ChannelsExposer=class{constructor(e){this.channelProviderOrClient=e,this.exposeFunction=async(e,t)=>{const{key:n,options:i,meta:r}=t,{id:o}=r,s=`${o}.${i?.action||n}`;return await this.channelProviderOrClient.register(s,(async({args:t})=>e(...t))),{action:s}},this.exposeMeta=async({id:e},t)=>{const n=`api-meta:${e}`;await this.channelProviderOrClient.register(n,(()=>({props:t})))}}},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Kn,e),n(qn,e)}(zn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(zn,e)}(Vn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Wn,e),n(Hn,e),n(Vn,e),n(Nn,e)}(Gn);var Jn={};Object.defineProperty(Jn,\"__esModule\",{value:!0}),Jn.createRelayedDispatch=exports.relayChannelClientApi_1=Jn.relayChannelClientApi=void 0;const Yn=[\"no longer connected\",\"RTCDataChannel closed unexpectedly\",\"The client you are trying to dispatch from is disconnected from the target provider\"];exports.relayChannelClientApi_1=Jn.relayChannelClientApi=async(e,t)=>{e.register(`relay:${t}`,(({action:t,target:n,payload:i})=>e.dispatch(n,t,i))),await Promise.resolve()};Jn.createRelayedDispatch=(e,t,n,i)=>async(r,o)=>{try{return await e.dispatch(`relay:${n}`,{action:r,payload:o,target:t})}catch(e){if(s=e.message,Yn.some((e=>s.includes(e)))&&i)throw new Error(i);throw e}var s};var Zn,Qn,Xn,ei=s&&s.__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},ti=s&&s.__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)};Object.defineProperty(Bn,\"__esModule\",{value:!0}),Bn.ColumnOrRow=Bn.TabStack=Bn.LayoutNode=void 0;const ni=Gn,ii=Jn;class ri{constructor(e,t){Zn.set(this,void 0),this.isRoot=()=>ti(this,Zn,\"f\").isRoot(this.entityId),this.exists=()=>ti(this,Zn,\"f\").exists(this.entityId),this.getParent=async()=>{const e=await ti(this,Zn,\"f\").getParent(this.entityId);if(e)return ri.getEntity(e,ti(this,Zn,\"f\"))},this.createAdjacentStack=async(e,t)=>{const n=await ti(this,Zn,\"f\").createAdjacentStack(this.entityId,e,t);return ri.getEntity({entityId:n,type:\"stack\"},ti(this,Zn,\"f\"))},this.getAdjacentStacks=async e=>(await ti(this,Zn,\"f\").getAdjacentStacks({targetId:this.entityId,edge:e})).map((e=>ri.getEntity({type:\"stack\",entityId:e.entityId},ti(this,Zn,\"f\")))),ei(this,Zn,e,\"f\"),this.entityId=t}}Bn.LayoutNode=ri,Zn=new WeakMap,ri.newLayoutEntitiesClient=async(e,t,n)=>{const i=(0,ii.createRelayedDispatch)(e,n,\"layout-relay\",\"You are trying to interact with a layout component on a window that does not exist or has been destroyed.\");return new ni.ApiConsumer(new ni.ChannelsConsumer({dispatch:i})).consume({id:t})},ri.getEntity=(e,t)=>{const{entityId:n,type:i}=e;switch(i){case\"column\":case\"row\":return new si(t,n,i);case\"stack\":return new oi(t,n);default:throw new Error(`Unrecognised Layout Entity encountered ('${JSON.stringify(e)})`)}};class oi extends ri{constructor(e,t){super(e,t),Qn.set(this,void 0),this.type=\"stack\",this.getViews=()=>ti(this,Qn,\"f\").getStackViews(this.entityId),this.addView=async(e,t={index:0})=>ti(this,Qn,\"f\").addViewToStack(this.entityId,e,t),this.removeView=async e=>{await ti(this,Qn,\"f\").removeViewFromStack(this.entityId,e)},this.setActiveView=async e=>{await ti(this,Qn,\"f\").setStackActiveView(this.entityId,e)},ei(this,Qn,e,\"f\")}}Bn.TabStack=oi,Qn=new WeakMap;class si extends ri{constructor(e,t,n){super(e,t),Xn.set(this,void 0),this.getContent=async()=>(await ti(this,Xn,\"f\").getContent(this.entityId)).map((e=>ri.getEntity(e,ti(this,Xn,\"f\")))),ei(this,Xn,e,\"f\"),this.type=n}}Bn.ColumnOrRow=si,Xn=new WeakMap;var ai={};Object.defineProperty(ai,\"__esModule\",{value:!0}),ai.DEFAULT_LAYOUT_KEY=ai.LAYOUT_CONTROLLER_ID=void 0,ai.LAYOUT_CONTROLLER_ID=\"layout-entities\",ai.DEFAULT_LAYOUT_KEY=\"__default__\";var ci,di,hi,li=s&&s.__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)};Object.defineProperty(Ln,\"__esModule\",{value:!0}),Ln.Layout=void 0;const ui=G,pi=O,wi=d,yi=Tn,fi=Bn,gi=ai;class mi extends wi.Base{static getClient(e){return li(e,di,\"f\").getValue()}constructor(e,t){super(t),ci.add(this),di.set(this,new ui.Lazy((async()=>fi.LayoutNode.newLayoutEntitiesClient(await this.platform.getClient(),gi.LAYOUT_CONTROLLER_ID,this.identity)))),this.replace=async e=>{this.wire.sendAction(\"layout-replace\").catch((e=>{}));const t=await this.platform.getClient();await t.dispatch(\"replace-layout\",{target:this.identity,opts:{layout:e}})},this.replaceView=async(e,t)=>{this.wire.sendAction(\"layout-replace-view\").catch((e=>{}));const n=await this.platform.getClient();await n.dispatch(\"replace-view\",{target:this.identity,opts:{viewToReplace:e,newView:t}})},this.applyPreset=async e=>{this.wire.sendAction(\"layout-apply-preset\").catch((e=>{}));const t=await this.platform.getClient(),{presetType:n}=e;if(!n||!(0,yi.isValidPresetType)(n))throw new Error(\"Cannot apply preset layout, please include an applicable presetType property in the PresetLayoutOptions.\");await t.dispatch(\"apply-preset-layout\",{target:this.identity,opts:{presetType:n}})};const n=(0,pi.validateIdentity)(e);if(n)throw new Error(n);this.identity=e,this.platform=this.fin.Platform.wrapSync({uuid:e.uuid}),e.uuid===this.fin.me.uuid&&e.name===this.fin.me.name&&(this.init=this.fin.Platform.Layout.init)}async getConfig(){this.wire.sendAction(\"layout-get-config\").catch((e=>{}));return(await this.platform.getClient()).dispatch(\"get-frame-snapshot\",{target:this.identity})}async getCurrentViews(){this.wire.sendAction(\"layout-get-views\").catch((e=>{}));const e=await this.platform.getClient();return(await e.dispatch(\"get-layout-views\",{target:this.identity})).map((e=>this.fin.View.wrapSync(e)))}async getRootItem(){this.wire.sendAction(\"layout-get-root-item\").catch((()=>{}));const e=await li(this,di,\"f\").getValue(),t=await e.getRoot(\"layoutName\"in this.identity?this.identity:void 0);return fi.LayoutNode.getEntity(t,e)}async getStackByViewIdentity(e){this.wire.sendAction(\"layout-get-stack-by-view\").catch((()=>{}));const t=await li(this,di,\"f\").getValue(),n=await t.getStackByView(e);if(!n)throw new Error(`No stack found for view: ${e.uuid}/${e.name}`);return fi.LayoutNode.getEntity(n,t)}async addView(e,{location:t,targetView:n}={}){this.wire.sendAction(\"layout-add-view\").catch((e=>{}));const{identity:i}=await li(this,ci,\"m\",hi).call(this,\"layout-add-view\",{viewOptions:e,location:t,targetView:n});return{identity:i}}async closeView(e){this.wire.sendAction(\"layout-close-view\").catch((e=>{})),await li(this,ci,\"m\",hi).call(this,\"layout-close-view\",{viewIdentity:e})}}Ln.Layout=mi,di=new WeakMap,ci=new WeakSet,hi=async function(e,t){return(await this.platform.getClient()).dispatch(e,{target:this.identity,opts:t})};var vi,Ci,bi,Ii,Ei,xi=s&&s.__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)},Ai=s&&s.__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};Object.defineProperty(kn,\"__esModule\",{value:!0}),kn.LayoutModule=void 0;const Pi=d,Mi=Ln,_i=ai;class Oi extends Pi.Base{constructor(){super(...arguments),vi.add(this),Ci.set(this,!1),bi.set(this,null),this.init=async(e={})=>{if(this.wire.sendAction(\"layout-init\").catch((e=>{})),!this.wire.environment.layoutAllowedInContext(this.fin))throw new Error(\"Layout.init can only be called from a Window context.\");if(xi(this,Ci,\"f\"))throw new Error(\"Layout.init was already called, please use Layout.create to add additional layouts.\");\"openfin\"===this.wire.environment.type&&await this.fin.Platform.getCurrentSync().getClient(),Ai(this,Ci,!0,\"f\"),Ai(this,bi,await this.wire.environment.initLayoutManager(this.fin,this.wire,e),\"f\"),await this.wire.environment.applyLayoutSnapshot(this.fin,xi(this,bi,\"f\"),e);const t={name:this.fin.me.name,uuid:this.fin.me.uuid};if(!e.layoutManagerOverride){const e={layoutName:_i.DEFAULT_LAYOUT_KEY,...t};return xi(this,Ii,\"f\").call(this,e)}return this.wrapSync(t)},Ii.set(this,(e=>{const t=\"[Layout] You are using a deprecated property `layoutManager` - it will throw if you access it starting in v37.\",n=new Proxy({},{get(e,n){throw console.warn(`[Layout-mgr-proxy] accessing ${n.toString()}`),new Error(t)}}),i=Object.assign(this.wrapSync(e),{layoutManager:n});return new Proxy(i,{get(e,n){if(\"layoutManager\"===n)throw console.warn(`[Layout-proxy] accessing ${n.toString()}`),new Error(t);return e[n]}})})),this.getCurrentLayoutManagerSync=()=>xi(this,vi,\"m\",Ei).call(this,\"fin.Platform.Layout.getCurrentLayoutManagerSync()\"),this.create=async e=>this.wire.environment.createLayout(xi(this,vi,\"m\",Ei).call(this,\"fin.Platform.Layout.create()\"),e),this.destroy=async e=>this.wire.environment.destroyLayout(xi(this,vi,\"m\",Ei).call(this,\"fin.Platform.Layout.destroy()\"),e)}async wrap(e){return this.wire.sendAction(\"layout-wrap\").catch((e=>{})),new Mi.Layout(e,this.wire)}wrapSync(e){return this.wire.sendAction(\"layout-wrap-sync\").catch((e=>{})),new Mi.Layout(e,this.wire)}async getCurrent(){if(this.wire.sendAction(\"layout-get-current\").catch((e=>{})),\"openfin\"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error(\"You are not in a Window context. Only Windows can have a Layout.\");const{uuid:e,name:t}=this.fin.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction(\"layout-get-current-sync\").catch((e=>{})),\"openfin\"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error(\"You are not in a Window context. Only Windows can have a Layout.\");const{uuid:e,name:t}=this.fin.me;return this.wrapSync({uuid:e,name:t})}async getLayoutByViewIdentity(e){this.wire.sendAction(\"layout-get-by-view-identity\").catch((()=>{}));let t=await this.wire.environment.getViewWindowIdentity(this.fin,e);t.identity&&(t=t.identity);try{const n=this.wrapSync(t),i=await Mi.Layout.getClient(n),r=await i.getLayoutIdentityForViewOrThrow(e);return this.wrapSync(r)}catch(n){if(![\"No action registered at target for\",\"getLayoutIdentityForViewOrThrow is not a function\"].some((e=>n.message.includes(e))))throw n;if(t.uuid===t.name)throw new Error(`View identity ${JSON.stringify(e)} is not attached to any layout in provider window ${JSON.stringify(t)}.`);return this.wrapSync(t)}}}kn.LayoutModule=Oi,Ci=new WeakMap,bi=new WeakMap,Ii=new WeakMap,vi=new WeakSet,Ei=function(e){if(!xi(this,bi,\"f\"))throw new Error(`You must call init before using the API ${e}`);return xi(this,bi,\"f\")},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(kn,e),n(Ln,e)}(jn),Object.defineProperty(Pn,\"__esModule\",{value:!0}),Pn.PlatformModule=void 0;const Si=d,Ri=Mn,Fi=jn;class ji extends Si.Base{constructor(e,t){super(e),this._channel=t,this.Layout=new Fi.LayoutModule(this.wire)}async init(e){if(!fin.__internal_.isPlatform||fin.me.name!==fin.me.uuid)throw new Error(\"fin.Platform.init should only be called from a custom platform provider running in the main window of the application.\");return this.wire.environment.initPlatform(this.fin,e)}async wrap(e){return this.wire.sendAction(\"platform-wrap\").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}wrapSync(e){return this.wire.sendAction(\"platform-wrap-sync\").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}async getCurrent(){return this.wire.sendAction(\"platform-get-current\").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction(\"platform-get-current-sync\").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}start(e){return this.wire.sendAction(\"platform-start\").catch((e=>{})),new Promise((async(t,n)=>{try{const{uuid:n}=e,i=await this.fin.Application._create({...e,isPlatformController:!0});i.once(\"platform-api-ready\",(()=>t(this.wrapSync({uuid:n})))),i._run({uuid:n})}catch(e){n(e)}}))}startFromManifest(e,t){return this.wire.sendAction(\"platform-start-from-manifest\").catch((e=>{})),new Promise((async(n,i)=>{try{const i=await this.fin.Application._createFromManifest(e);i.once(\"platform-api-ready\",(()=>n(this.wrapSync({uuid:i.identity.uuid})))),i._run(t)}catch(e){i(e)}}))}}Pn.PlatformModule=ji,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Pn,e),n(Mn,e)}(An);var ki={};!function(e){Object.defineProperty(e,\"__esModule\",{value:!0}),e.getMe=e.getBaseMe=e.environmentUnsupportedMessage=void 0;const t=J(),n=un,i=ie(),r=rn;function o(e,t,n){return{...{isView:\"view\"===e,isWindow:\"window\"===e,isFrame:\"iframe\"===e,isExternal:\"external connection\"===e},uuid:t,name:n,entityType:e}}e.environmentUnsupportedMessage=\"You are not running in OpenFin.\",e.getBaseMe=o,e.getMe=function(s){const{uuid:a,name:c,entityType:d}=s.me,h={setContext(){throw new Error(e.environmentUnsupportedMessage)},addContextHandler(){throw new Error(e.environmentUnsupportedMessage)},getContextGroups(){throw new Error(e.environmentUnsupportedMessage)},joinContextGroup(){throw new Error(e.environmentUnsupportedMessage)},removeFromContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getAllClientsInContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getInfoForContextGroup(){throw new Error(e.environmentUnsupportedMessage)}},l=\"Interop API has not been instantiated. Either connection has failed or you have not declared interop in your config.\",u={setContext(){throw new Error(l)},addContextHandler(){throw new Error(l)},getContextGroups(){throw new Error(l)},joinContextGroup(){throw new Error(l)},removeFromContextGroup(){throw new Error(l)},getAllClientsInContextGroup(){throw new Error(l)},getInfoForContextGroup(){throw new Error(l)}},p={eventNames:()=>{throw new Error(e.environmentUnsupportedMessage)},emit:()=>{throw new Error(e.environmentUnsupportedMessage)},listeners:()=>{throw new Error(e.environmentUnsupportedMessage)},listenerCount:()=>{throw new Error(e.environmentUnsupportedMessage)},on:()=>{throw new Error(e.environmentUnsupportedMessage)},addListener:()=>{throw new Error(e.environmentUnsupportedMessage)},once:()=>{throw new Error(e.environmentUnsupportedMessage)},prependListener:()=>{throw new Error(e.environmentUnsupportedMessage)},prependOnceListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeAllListeners:()=>{throw new Error(e.environmentUnsupportedMessage)}};switch(d){case\"view\":return Object.assign(new t.View(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case\"window\":return Object.assign(new i._Window(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case\"iframe\":return Object.assign(new n._Frame(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case\"external connection\":return Object.assign(new r.ExternalApplication(s,{uuid:a}),o(d,a,c),{interop:u,isOpenFin:!1});default:return{...o(d,a,c),...p,interop:h,isOpenFin:!1}}}}(ki);var Li={},Ti={},$i={};Object.defineProperty($i,\"__esModule\",{value:!0}),$i.createWarningObject=$i.createUnusableObject=void 0,$i.createUnusableObject=function(e){const t=()=>{throw new Error(e)};return new Proxy({},{apply:t,construct:t,defineProperty:t,deleteProperty:t,get:t,getOwnPropertyDescriptor:t,getPrototypeOf:t,has:t,isExtensible:t,ownKeys:t,preventExtensions:t,set:t,setPrototypeOf:t})},$i.createWarningObject=function(e,t){return new Proxy(t,{get:(...t)=>(console.warn(e),Reflect.get(...t)),set:(...t)=>(console.warn(e),Reflect.set(...t)),getOwnPropertyDescriptor:(...t)=>(console.warn(e),Reflect.getOwnPropertyDescriptor(...t)),ownKeys:(...t)=>(console.warn(e),Reflect.ownKeys(...t))})};var Bi,Gi={},Wi={};var Hi={};!function(e){Object.defineProperty(e,\"__esModule\",{value:!0}),e.wrapIntentHandler=e.BROKER_ERRORS=e.generateOverrideWarning=e.generateOverrideError=e.wrapContextHandler=e.wrapInTryCatch=e.generateId=void 0;e.generateId=()=>`${Math.random()}${Date.now()}`;e.wrapInTryCatch=(e,t)=>(...n)=>{try{return e(...n)}catch(e){throw new Error((t||\"\")+e)}};e.wrapContextHandler=(e,t)=>async n=>{try{await e(n)}catch(e){throw console.error(`Error thrown by handler ${t} for context type ${n.type}: ${e}`),e}};e.generateOverrideError=(e,t)=>`You have tried to to use ${e} but ${t} has not been overridden in the Interop Broker. Please override this function. Refer to our documentation for more info.`;e.generateOverrideWarning=(e,t,n,i)=>{const{uuid:r,name:o}=n;return i?`Entity with identity: ${r}/${o} has called ${i} or ${e} but ${t} has not been overridden.`:`Entity with identity: ${r}/${o} has called ${e} but ${t} has not been overridden.`},e.BROKER_ERRORS={fireIntent:(0,e.generateOverrideError)(\"fireIntent\",\"handleFiredIntent\"),fireIntentForContext:(0,e.generateOverrideError)(\"fireIntentForContext\",\"handleFiredIntentForContext\"),getInfoForIntent:(0,e.generateOverrideError)(\"getInfoForIntent\",\"handleInfoForIntent\"),getInfoForIntentsByContext:(0,e.generateOverrideError)(\"getInfoForIntentsByContext\",\"handleInfoForIntentsByContext\"),joinSessionContextGroupWithJoinContextGroup:\"The Context Group you have tried to join is a Session Context Group. Custom Context Groups can only be defined by the Interop Broker through code or manifest configuration. Please use joinSessionContextGroup.\",fdc3Open:(0,e.generateOverrideError)(\"fdc3.open\",\"fdc3HandleOpen\"),fdc3FindInstances:(0,e.generateOverrideError)(\"fdc3.findInstances\",\"fdc3HandleFindInstances\"),fdc3GetAppMetadata:(0,e.generateOverrideError)(\"fdc3.getAppMetadata\",\"fdc3HandleGetAppMetadata\"),fdc3GetInfo:(0,e.generateOverrideError)(\"fdc3.getInfo\",\"fdc3HandleGetInfo\")};e.wrapIntentHandler=(e,t)=>async n=>{try{return e(n)}catch(e){throw console.error(`Error thrown by handler ${t}: ${e}`),e}}}(Hi);var Ni,Di,Ui={};function Vi(){if(Di)return Gi;Di=1;var e,t,n,r=s&&s.__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},o=s&&s.__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)},a=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Gi,\"__esModule\",{value:!0}),Gi.InteropBroker=void 0;const c=d,h=a(function(){if(Bi)return Wi;Bi=1,Object.defineProperty(Wi,\"__esModule\",{value:!0});const e=Cr();return Wi.default=class{constructor(e,t){this.provider=e,this.id=t,this.lastContext=void 0,this.contextGroupMap=new Map,this.clients=new Map,this.registerListeners()}registerListeners(){this.provider.register(`sessionContextGroup:getContext-${this.id}`,this.getCurrentContext.bind(this)),this.provider.register(`sessionContextGroup:setContext-${this.id}`,this.setContext.bind(this)),this.provider.register(`sessionContextGroup:handlerAdded-${this.id}`,this.handlerAdded.bind(this)),this.provider.register(`sessionContextGroup:handlerRemoved-${this.id}`,this.handlerRemoved.bind(this))}getCurrentContext(e){return e.type?this.contextGroupMap.get(e.type):this.lastContext}setContext(t,n){const{context:i}=t,r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name} not in Session Client State Map`);this.contextGroupMap.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{e.contextHandlers.get(i.type)?.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getClientState(e){return this.clients.get(e.endpointId)}async handlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(i){const e=r.contextHandlers.get(i)||[];r.contextHandlers.set(i,[...e,n]);const o=this.contextGroupMap.get(i);o&&await this.provider.dispatch(t,n,o)}else{r.globalHandler=n;const e=[...this.contextGroupMap.keys()].map((async e=>{const i=this.contextGroupMap.get(e);i&&await this.provider.dispatch(t,n,i)}));await Promise.all(e)}}handlerRemoved(e,t){const{handlerId:n}=e,i=this.clients.get(t.endpointId);i?(Array.from(i.contextHandlers).forEach((([,e])=>{const t=e.indexOf(n);t>-1&&e.splice(t,1)})),i.globalHandler===n&&(i.globalHandler=void 0)):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={contextHandlers:new Map,clientIdentity:e,globalHandler:void 0};this.clients.set(e.endpointId,t)}}onDisconnection(e){this.clients.delete(e.endpointId)}},Wi}()),l=Hi,u=a(i),p=function(){if(Ni)return Ui;Ni=1,Object.defineProperty(Ui,\"__esModule\",{value:!0}),Ui.PrivateChannelProvider=void 0;const e=Vi();return Ui.PrivateChannelProvider=class t{constructor(e,t){this.provider=e,this.id=t,this.clients=new Map,this.registerListeners(),this.contextByContextType=new Map,this.lastContext=void 0,this.provider.onConnection((e=>this.registerNewClient(e))),this.provider.onDisconnection((async e=>{const{endpointId:t}=e;this.clients.has(t)&&await this.handleClientDisconnecting(e),0===(await this.provider.getAllClientInfo()).length&&this.provider.destroy()}))}getClientState(e){return this.clients.get(e.endpointId)}registerListeners(){this.provider.register(\"broadcast\",this.broadcast.bind(this)),this.provider.register(\"getCurrentContext\",this.getCurrentContext.bind(this)),this.provider.register(\"contextHandlerAdded\",this.contextHandlerAdded.bind(this)),this.provider.register(\"contextHandlerRemoved\",this.contextHandlerRemoved.bind(this)),this.provider.register(\"nonStandardHandlerRemoved\",this.nonStandardHandlerRemoved.bind(this)),this.provider.register(\"onAddContextHandlerAdded\",this.onAddContextHandlerAdded.bind(this)),this.provider.register(\"onDisconnectHandlerAdded\",this.onDisconnectHandlerAdded.bind(this)),this.provider.register(\"onUnsubscribeHandlerAdded\",this.onUnsubscribeHandlerAdded.bind(this)),this.provider.register(\"clientDisconnecting\",((e,t)=>{this.handleClientDisconnecting(t)}))}broadcast(t,n){const{context:i}=t;if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name}, tried to call broadcast, is not connected to this Private Channel`);const r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to broadcast - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);this.contextByContextType.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{const t=e.handlerIdsByContextTypes.get(i.type);t&&t.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getCurrentContext(e,t){const{contextType:n}=e;if(!this.getClientState(t))throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call getCurrentContext, is not connected to this Private Channel`);if(void 0!==n){return this.contextByContextType.get(n)||null}return this.lastContext?this.lastContext:null}contextHandlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call addContextListener, is not connected to this Private Channel`);if(i){const e=r.handlerIdsByContextTypes.get(i)||[];r.handlerIdsByContextTypes.set(i,[...e,n])}else r.globalHandler=n;Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&e.onAddContextListenerHandlerId&&this.provider.dispatch(e.clientIdentity,e.onAddContextListenerHandlerId,i)}))}async contextHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);if(i){let e;if(i.globalHandler===n)i.globalHandler=void 0;else for(const[t,r]of i.handlerIdsByContextTypes){const i=r.indexOf(n);i>-1&&(r.splice(i,1),e=t)}const r=(await this.getConnectedClients()).map((async n=>{const{clientIdentity:i,clientIdentity:{endpointId:r},onUnsubscribeHandlerId:o}=n;r!==t.endpointId&&o&&await this.provider.dispatch(i,o,e)}));try{await Promise.all(r)}catch(e){throw console.error(`Problem when attempting to dispatch to onUnsubscribeHandlers. Error: ${e} Removing Client: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}`),new Error(e)}}else console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}.`)}nonStandardHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);i?i.onDisconnectHandlerId===n?i.onDisconnectHandlerId=void 0:i.onAddContextListenerHandlerId===n?i.onAddContextListenerHandlerId=void 0:i.onUnsubscribeHandlerId===n&&(i.onUnsubscribeHandlerId=void 0):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}onAddContextHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onAddContextListener, is not connected to this Private Channel`);n.onAddContextListenerHandlerId=i,Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&Array.from(e.handlerIdsByContextTypes.keys()).forEach((e=>{this.provider.dispatch(t,i,e)}))}))}onDisconnectHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onDisconnect, is not connected to this Private Channel`);n.onDisconnectHandlerId=i}onUnsubscribeHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onUnsubscribe, is not connected to this Private Channel`);n.onUnsubscribeHandlerId=i}removeClient(e){const t=this.getClientState(e);if(!t)throw new Error(`Client with Identity: ${e.uuid} ${e.name}, tried to call disconnect, is not connected to this Private Channel`);t.handlerIdsByContextTypes.clear(),this.clients.delete(e.endpointId)}async fireOnDisconnectForOtherClients(e){const{endpointId:t}=e,n=(await this.getConnectedClients()).map((async e=>{const{clientIdentity:{endpointId:n},onDisconnectHandlerId:i}=e;n!==t&&i&&await this.provider.dispatch(e.clientIdentity,i)}));try{await Promise.all(n)}catch(t){throw console.error(`Problem when attempting to dispatch to onDisconnectHandlers. Error: ${t} Disconnecting Client: uuid: ${e.uuid}. name: ${e.name}. endpointId: ${e.endpointId}`),new Error(t)}}async unsubscribeAll(e){const{endpointId:t}=e,n=this.clients.get(t);if(n){const t=Array.from(n.handlerIdsByContextTypes.values()).flat(),i=n.globalHandler;if(t.length>0){const n=t.map((async t=>this.contextHandlerRemoved({handlerId:t},e)));try{await Promise.all(n)}catch(e){console.error(e.message)}}if(i)try{await this.contextHandlerRemoved({handlerId:i},e)}catch(e){console.error(e.message)}}}async handleClientDisconnecting(e){await this.unsubscribeAll(e),this.removeClient(e),await this.fireOnDisconnectForOtherClients(e)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={clientIdentity:e,handlerIdsByContextTypes:new Map,globalHandler:void 0,onAddContextListenerHandlerId:void 0,onUnsubscribeHandlerId:void 0,onDisconnectHandlerId:void 0};this.clients.set(e.endpointId,t)}}async getConnectedClients(){const e=await this.provider.getAllClientInfo();return Array.from(this.clients.values()).filter((t=>{const{uuid:n,name:i}=t.clientIdentity;return e.some((e=>i===e.name&&n===e.uuid))}))}static init(e,n){return new t(e,n)}},Ui}(),w=G,y=[{id:\"green\",displayMetadata:{color:\"#00CC88\",name:\"green\"}},{id:\"purple\",displayMetadata:{color:\"#8C61FF\",name:\"purple\"}},{id:\"orange\",displayMetadata:{color:\"#FF8C4C\",name:\"orange\"}},{id:\"red\",displayMetadata:{color:\"#FF5E60\",name:\"red\"}},{id:\"pink\",displayMetadata:{color:\"#FF8FB8\",name:\"pink\"}},{id:\"yellow\",displayMetadata:{color:\"#E9FF8F\",name:\"yellow\"}}];let f=class i extends c.Base{constructor(i,s,a){super(i),e.set(this,void 0),t.set(this,void 0),n.set(this,void 0),this.getProvider=()=>o(this,n,\"f\").getValue(),this.interopClients=new Map,this.contextGroupsById=new Map,r(this,t,a.contextGroups??[...y],\"f\"),r(this,e,a.fdc3Info,\"f\"),a?.logging&&(this.logging=a.logging),this.intentClientMap=new Map,this.lastContextMap=new Map,this.sessionContextGroupMap=new Map,r(this,n,new w.Lazy(s),\"f\"),this.setContextGroupMap(),this.setupChannelProvider()}static createClosedConstructor(...e){return class extends i{constructor(...t){if(t.length){const[n,i,r]=t;if(r&&\"object\"==typeof r&&!(0,u.default)(r,e[2]))return console.warn(\"You have modified the parameters of the InteropOverride constructor. This behavior is deprecated and will be removed in a future version. You can modify these options in your manifest. Please consult our Interop docs for guidance on migrating to the new override scheme.\"),void super(e[0],e[1],r);console.warn(\"You are attempting to pass arguments to the InteropOverride constructor. This is not necessary, and these passed arguments will be ignored. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.\")}super(...e)}}}setContext({context:e},t){this.wire.sendAction(\"interop-broker-set-context\").catch((e=>{}));const n=this.getClientState(t);if(!n||!n.contextGroupId)throw n?new Error(\"You must join a context group before you can set context.\"):new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);{const{contextGroupId:t}=n;this.setContextForGroup({context:e},t)}}setContextForGroup({context:e},t){this.wire.sendAction(\"interop-broker-set-context-for-group\").catch((e=>{}));const n=this.contextGroupsById.get(t);if(!n)throw new Error(`Unable to set context for context group that isn't in the context group mapping: ${t}.`);const r=i.checkContextIntegrity(e);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(e)}`);const o=e.type;n.set(o,e),this.lastContextMap.set(t,o);Array.from(this.interopClients.values()).filter((e=>e.contextGroupId===t)).forEach((t=>{for(const[,n]of t.contextHandlers)i.isContextTypeCompatible(o,n.contextType)&&this.invokeContextHandler(t.clientIdentity,n.handlerId,e)}))}getCurrentContext(e,t){this.wire.sendAction(\"interop-broker-get-current-context\").catch((e=>{}));const n=this.getClientState(t);if(!n?.contextGroupId)throw new Error(\"You must be a member of a context group to call getCurrentContext\");const{contextGroupId:i}=n,r=this.contextGroupsById.get(i),o=this.lastContextMap.get(i),s=e?.contextType??o;return r&&s?r.get(s):void 0}async joinContextGroup({contextGroupId:e,target:t},n){if(this.wire.sendAction(\"interop-broker-join-context-group\").catch((e=>{})),this.sessionContextGroupMap.has(e))throw new Error(l.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup);if(t){i.hasEndpointId(t)&&await this.addClientToContextGroup({contextGroupId:e},t);try{const n=this.channel.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name));if(!n.length)throw new Error(`Given Identity ${t.uuid} ${t.name} is not connected to the Interop Broker.`);n.length>1&&console.warn(`More than one connection found for identity ${t.uuid} ${t.name}`);const i=[];for(const t of n)i.push(this.addClientToContextGroup({contextGroupId:e},t));await Promise.all(i)}catch(e){throw new Error(e)}}else await this.addClientToContextGroup({contextGroupId:e},n)}async addClientToContextGroup({contextGroupId:e},t){this.wire.sendAction(\"interop-broker-add-client-to-context-group\").catch((e=>{}));const n=this.getClientState(t);if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(!this.getContextGroups().find((t=>t.id===e)))throw new Error(`Attempting to join a context group that does not exist: ${e}. You may only join existing context groups.`);if(n.contextGroupId!==e){n.contextGroupId=e,await this.setCurrentContextGroupInClientOptions(t,e);const i=this.contextGroupsById.get(e);for(const[,e]of n.contextHandlers){const{contextType:n,handlerId:r}=e;if(void 0===n)i.forEach(((e,n)=>{this.invokeContextHandler(t,r,e)}));else if(i.has(n)){const e=i.get(n);e&&this.invokeContextHandler(t,r,e)}}}}async removeFromContextGroup({target:e},t){if(this.wire.sendAction(\"interop-broker-remove-from-context-group\").catch((e=>{})),e){i.hasEndpointId(e)&&await this.removeClientFromContextGroup(e);try{const t=this.channel.connections.filter((t=>t.uuid===e.uuid&&t.name===e.name));if(!t.length)throw new Error(`No connection found for given Identity ${e.uuid} ${e.name}`);t.length>1&&console.warn(`More than one connection found for identity ${e.uuid} ${e.name}`);const n=[];for(const e of t)n.push(this.removeClientFromContextGroup(e));await Promise.all(n)}catch(e){throw new Error(e)}}else await this.removeClientFromContextGroup(t)}async removeClientFromContextGroup(e){this.wire.sendAction(\"interop-broker-remove-client-from-context-group\").catch((e=>{}));const t=this.getClientState(e);t&&(t.contextGroupId=void 0),await this.setCurrentContextGroupInClientOptions(e,null)}getContextGroups(){return this.wire.sendAction(\"interop-broker-get-context-groups\").catch((e=>{})),o(this,t,\"f\").map((e=>({...e})))}getInfoForContextGroup({contextGroupId:e}){return this.wire.sendAction(\"interop-broker-get-info-for-context-group\").catch((e=>{})),this.getContextGroups().find((t=>t.id===e))}getAllClientsInContextGroup({contextGroupId:e}){this.wire.sendAction(\"interop-broker-get-all-clients-in-context-group\").catch((e=>{}));return Array.from(this.interopClients.values()).filter((t=>t.contextGroupId===e)).map((e=>e.clientIdentity))}async handleFiredIntent(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.raiseIntent\",\"InteropBroker.handleFiredIntent\",t,\"interopClient.fireIntent\");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntent)}async setIntentTarget(e,t){this.wire.sendAction(\"interop-broker-set-intent-target\").catch((e=>{}));const n=this.intentClientMap.get(t.name),i=`intent-handler-${e.name}`;if(n){const t=n.get(i);if(t){if(t.pendingIntents.push(e),t.clientIdentity&&t.isReady){const{clientIdentity:e,pendingIntents:n}=t;try{const r=n[n.length-1];await this.invokeIntentHandler(e,i,r),t.pendingIntents=[]}catch(n){console.error(`Error invoking intent handler for client ${e.uuid}/${e.name}/${e.endpointId}`),t.isReady=!1}}}else n.set(i,{isReady:!1,pendingIntents:[e]})}else{this.intentClientMap.set(t.name,new Map);const n=this.intentClientMap.get(t.name);n&&n.set(i,{isReady:!1,pendingIntents:[e]})}}async handleInfoForIntent(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.findIntent\",\"InteropBroker.handleInfoForIntent\",t,\"interopClient.getInfoForIntent\");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntent)}async handleInfoForIntentsByContext(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.findIntentsByContext\",\"InteropBroker.handleInfoForIntentsByContext\",t,\"interopClient.getInfoForIntentsByContext\");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntentsByContext)}async handleFiredIntentForContext(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.raiseIntentForContext\",\"InteropBroker.handleFiredIntentForContext\",t,\"interopClient.fireIntentForContext\");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntentForContext)}async clientDisconnected(e){}async fdc3HandleOpen({app:e,context:t},n){const i=(0,l.generateOverrideWarning)(\"fdc3.open\",\"InteropBroker.fdc3HandleOpen\",n);throw console.warn(i),new Error(l.BROKER_ERRORS.fdc3Open)}async fdc3HandleFindInstances(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.open\",\"InteropBroker.fdc3HandleFindInstances\",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3FindInstances)}async fdc3HandleGetAppMetadata(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.getAppMetadata\",\"InteropBroker.fdc3HandleGetAppMetadata\",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3GetAppMetadata)}async invokeContextHandler(e,t,n){const i=await this.getProvider();try{await i.dispatch(e,t,n)}catch(i){console.error(`Error invoking context handler ${t} for context type ${n.type} in client ${e.uuid}/${e.name}/${e.endpointId}`,i)}}async invokeIntentHandler(e,t,n){const i=await this.getProvider();await i.dispatch(e,t,n)}async fdc3HandleGetInfo(t,n){const{fdc3Version:i}=t;return{fdc3Version:i,...o(this,e,\"f\"),optionalFeatures:{OriginatingAppMetadata:!1,UserChannelMembershipAPIs:!0},appMetadata:{appId:\"\",instanceId:\"\"}}}async getAllClientInfo(){return(await this.getProvider()).getAllClientInfo()}decorateSnapshot(e){return{...e,interopSnapshotDetails:{contextGroupStates:this.getContextGroupStates()}}}applySnapshot(e,t){const n=e?.interopSnapshotDetails?.contextGroupStates;n&&(t?.closeExistingWindows||this.updateExistingClients(n),this.rehydrateContextGroupStates(n))}updateExistingClients(e){this.interopClients.forEach((t=>{const{clientIdentity:n,contextGroupId:r,contextHandlers:o}=t;if(r){const t=e[r];for(const[,e]of Object.entries(t))o.forEach((t=>{const{handlerId:r,contextType:o}=t;i.isContextTypeCompatible(e.type,o)&&this.invokeContextHandler(n,r,e)}))}}))}getContextGroupStates(){return i.toObject(this.contextGroupsById)}rehydrateContextGroupStates(e){const t=Object.entries(e);for(const[e,n]of t){const t=Object.entries(n);for(const[n,i]of t)if(this.contextGroupsById.has(e)){this.contextGroupsById.get(e).set(n,i)}else console.warn(`Attempting to set a context group that isn't in the context group mapping. Skipping context group rehydration for: ${e}`)}}contextHandlerRegistered({contextType:e,handlerId:t},n){const i={contextType:e,handlerId:t},r=this.getClientState(n);if(r?.contextHandlers.set(t,i),r&&r.contextGroupId){const{contextGroupId:i}=r,o=this.contextGroupsById.get(i);if(void 0===e)o.forEach(((e,i)=>{this.invokeContextHandler(n,t,e)}));else if(o.has(e)){const i=o.get(e);i&&this.invokeContextHandler(n,t,i)}}}async intentHandlerRegistered(e,t){const{handlerId:n}=e,i=this.intentClientMap.get(t.name),r=i?.get(n);if(i)if(r){const{pendingIntents:e}=r;r.clientIdentity=t,r.isReady=!0;try{if(e.length>0){const i=e[e.length-1];await this.invokeIntentHandler(t,n,i),r.pendingIntents=[]}}catch(e){console.error(`Error invoking intent handler: ${n} for client ${t.uuid}/${t.name}/${t.endpointId}`)}}else i.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t});else{this.intentClientMap.set(t.name,new Map);const e=this.intentClientMap.get(t.name);e&&e.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t})}}removeContextHandler({handlerId:e},t){const n=this.getClientState(t);n&&n.contextHandlers.delete(e)}handleJoinSessionContextGroup({sessionContextGroupId:e},t){try{if(!e)throw new Error(\"Failed to join session context group: must specify group id.\");const n=this.sessionContextGroupMap.get(e);if(n)n.registerNewClient(t);else{const n=new h.default(this.channel,e);n.registerNewClient(t),this.sessionContextGroupMap.set(e,n)}return{hasConflict:this.contextGroupsById.has(e)}}catch(e){throw new Error(e)}}getClientState(e){return this.interopClients.get(e.endpointId)}static toObject(e){const t=Object.fromEntries(e),n={};return Object.entries(t).forEach((([e,t])=>{const i=Object.fromEntries(t);n[e]=i})),n}static checkContextIntegrity(e){if(!e)return{isValid:!1,reason:\"No context supplied\"};if(\"object\"!=typeof e)return{isValid:!1,reason:\"Context must be an Object\"};if(!e.type)return{isValid:!1,reason:\"Context must have a type property\"};if(e.id&&\"object\"!=typeof e.id)return{isValid:!1,reason:\"Context id must be an Object populated with key-value identifiers (if set)\"};if(e.id){const{id:t}=e,n=Object.keys(t);let i=!1;if(!n.length)return{isValid:!1,reason:\"Context id must have at least one key-value identifier\"};if(n.forEach((e=>{\"string\"==typeof e&&\"string\"==typeof t[e]||(i=!0)})),i)return{isValid:!1,reason:\"Context id key-value identifiers must be of type string\"}}return e.name&&\"string\"!=typeof e.name?{isValid:!1,reason:\"Context name must be of string type (if set)\"}:{isValid:!0}}static hasEndpointId(e){return void 0!==e.endpointId}static isContextTypeCompatible(e,t){return void 0===t||e===t}setContextGroupMap(){for(const e of this.getContextGroups())this.contextGroupsById.set(e.id,new Map)}async setCurrentContextGroupInClientOptions(e,t){try{const n=await this.fin.System.getEntityInfo(e.uuid,e.name);let i;\"view\"===n.entityType?i=await this.fin.View.wrap(e):\"window\"===n.entityType&&(i=await this.fin.Window.wrap(e)),i&&await i.updateOptions({interop:{currentContextGroup:t}})}catch(e){}}async setupChannelProvider(){try{const e=await this.getProvider();this.channel=e,this.wireChannel(e)}catch(e){throw new Error(`Error setting up Interop Broker Channel Provider: ${e}`)}}wireChannel(e){e.onConnection((async(e,t)=>{if(!await this.isConnectionAuthorized(e,t))throw new Error(`Connection not authorized for ${e.uuid}, ${e.name}`);if(!e.endpointId)throw new Error(\"Version too old to be compatible with Interop. Please upgrade your runtime to a more recent version.\");const n={contextGroupId:void 0,contextHandlers:new Map,clientIdentity:e};t?.currentContextGroup&&this.contextGroupsById.has(t.currentContextGroup)&&(n.contextGroupId=t?.currentContextGroup),this.interopClients.set(e.endpointId,n)})),e.onDisconnection((e=>{this.interopClients.delete(e.endpointId);const t=this.intentClientMap.get(e.name);t&&e.uuid===this.fin.me.uuid&&t.forEach((e=>{e.isReady=!1})),this.sessionContextGroupMap.forEach((t=>{t.onDisconnection(e)})),this.clientDisconnected(e)})),e.beforeAction((async(e,t,n)=>{if(!await this.isActionAuthorized(e,t,n))throw new Error(`Action (${e}) not authorized for ${n.uuid}, ${n.name}`);this.logging?.beforeAction?.enabled&&console.log(e,t,n)})),e.afterAction(((e,t,n)=>{this.logging?.afterAction?.enabled&&console.log(e,t,n)})),e.register(\"setContext\",this.setContext.bind(this)),e.register(\"fireIntent\",this.handleFiredIntent.bind(this)),e.register(\"getCurrentContext\",this.getCurrentContext.bind(this)),e.register(\"getInfoForIntent\",this.handleInfoForIntent.bind(this)),e.register(\"getInfoForIntentsByContext\",this.handleInfoForIntentsByContext.bind(this)),e.register(\"fireIntentForContext\",this.handleFiredIntentForContext.bind(this)),e.register(\"getContextGroups\",this.getContextGroups.bind(this)),e.register(\"joinContextGroup\",this.joinContextGroup.bind(this)),e.register(\"removeFromContextGroup\",this.removeFromContextGroup.bind(this)),e.register(\"getAllClientsInContextGroup\",this.getAllClientsInContextGroup.bind(this)),e.register(\"getInfoForContextGroup\",this.getInfoForContextGroup.bind(this)),e.register(\"contextHandlerRegistered\",this.contextHandlerRegistered.bind(this)),e.register(\"intentHandlerRegistered\",this.intentHandlerRegistered.bind(this)),e.register(\"removeContextHandler\",this.removeContextHandler.bind(this)),e.register(\"sessionContextGroup:createIfNeeded\",this.handleJoinSessionContextGroup.bind(this)),e.register(\"fdc3Open\",this.fdc3HandleOpen.bind(this)),e.register(\"fdc3v2FindIntentsByContext\",this.handleInfoForIntentsByContext.bind(this)),e.register(\"fdc3FindInstances\",this.fdc3HandleFindInstances.bind(this)),e.register(\"fdc3GetAppMetadata\",this.fdc3HandleGetAppMetadata.bind(this)),e.register(\"fdc3v2GetInfo\",(async(e,t)=>this.fdc3HandleGetInfo.bind(this)(e,t))),e.register(\"createPrivateChannelProvider\",(async e=>{const{channelId:t}=e,n=await this.fin.InterApplicationBus.Channel.create(t);p.PrivateChannelProvider.init(n,t)}))}isConnectionAuthorized(e,t){return this.wire.sendAction(\"interop-broker-is-connection-authorized\").catch((e=>{})),Promise.resolve(!0)}isActionAuthorized(e,t,n){return this.wire.sendAction(\"interop-broker-is-action-authorized\").catch((e=>{})),Promise.resolve(!0)}};return Gi.InteropBroker=f,e=new WeakMap,t=new WeakMap,n=new WeakMap,Gi}var zi,Ki={},qi={},Ji=s&&s.__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},Yi=s&&s.__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)};Object.defineProperty(qi,\"__esModule\",{value:!0});const Zi=d,Qi=Hi;class Xi extends Zi.Base{constructor(e,t,n){super(e),zi.set(this,void 0),this.id=n,Ji(this,zi,t,\"f\")}async setContext(e){this.wire.sendAction(\"interop-session-context-group-set-context\").catch((e=>{}));return(await Yi(this,zi,\"f\")).dispatch(`sessionContextGroup:setContext-${this.id}`,{sessionContextGroupId:this.id,context:e})}async getCurrentContext(e){this.wire.sendAction(\"interop-session-context-group-get-context\").catch((e=>{}));return(await Yi(this,zi,\"f\")).dispatch(`sessionContextGroup:getContext-${this.id}`,{sessionContextGroupId:this.id,type:e})}async addContextHandler(e,t){if(this.wire.sendAction(\"interop-session-context-group-add-handler\").catch((e=>{})),\"function\"!=typeof e)throw new Error(\"Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.\");const n=await Yi(this,zi,\"f\");let i;return i=t?`sessionContextHandler:invoke-${this.id}-${t}-${(0,Qi.generateId)()}`:`sessionContextHandler:invoke-${this.id}`,n.register(i,(0,Qi.wrapContextHandler)(e,i)),await n.dispatch(`sessionContextGroup:handlerAdded-${this.id}`,{handlerId:i,contextType:t}),{unsubscribe:await this.createUnsubscribeCb(i)}}async createUnsubscribeCb(e){const t=await Yi(this,zi,\"f\");return async()=>{t.remove(e),await t.dispatch(`sessionContextGroup:handlerRemoved-${this.id}`,{handlerId:e})}}getUserInstance(){return{id:this.id,setContext:(0,Qi.wrapInTryCatch)(this.setContext.bind(this),\"Failed to set context: \"),getCurrentContext:(0,Qi.wrapInTryCatch)(this.getCurrentContext.bind(this),\"Failed to get context: \"),addContextHandler:(0,Qi.wrapInTryCatch)(this.addContextHandler.bind(this),\"Failed to add context handler: \")}}}qi.default=Xi,zi=new WeakMap;var er={},tr={},nr={},ir={},rr=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),or=s&&s.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,\"default\",{enumerable:!0,value:t})}:function(e,t){e.default=t}),sr=s&&s.__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)&&rr(t,e,n);return or(t,e),t};Object.defineProperty(ir,\"__esModule\",{value:!0}),ir.PrivateChannelClient=void 0;const ar=sr(Hi);var cr,dr;function hr(){if(cr)return tr;cr=1;var e,t=s&&s.__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)},n=s&&s.__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},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(tr,\"__esModule\",{value:!0}),tr.FDC3ModuleBase=void 0;const o=nr,a=Hi,c=wr(),d=r(i);return tr.FDC3ModuleBase=class{get client(){return t(this,e,\"f\").call(this)}get fin(){return this.wire.getFin()}constructor(t,i){this.wire=i,e.set(this,void 0),n(this,e,t,\"f\")}async broadcast(e){return this.wire.sendAction(\"fdc3-broadcast\").catch((e=>{})),this.client.setContext(e)}async _open(e,t){this.wire.sendAction(\"fdc3-open\").catch((e=>{}));try{return await c.InteropClient.ferryFdc3Call(this.client,\"fdc3Open\",{app:e,context:t})}catch(e){const t=e.message===a.BROKER_ERRORS.fdc3Open?\"ResolverUnavailable\":e.message;throw new Error(t)}}async _getChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:\"system\",...(0,o.getUnsupportedChannelApis)()})))}async getOrCreateChannel(e){this.wire.sendAction(\"fdc3-get-or-create-channel\").catch((e=>{}));const t=(await this._getChannels()).find((t=>t.id===e));if(t)return{...t,type:\"system\",...(0,o.getUnsupportedChannelApis)()};try{const t=await this.client.joinSessionContextGroup(e);return(0,o.buildAppChannelObject)(t)}catch(e){throw console.error(e.message),new Error(o.ChannelError.CreationFailed)}}async getSystemChannels(){return this.wire.sendAction(\"fdc3-get-system-channels\").catch((e=>{})),this._getChannels()}async joinChannel(e){this.wire.sendAction(\"fdc3-join-channel\").catch((e=>{}));try{return await this.client.joinContextGroup(e)}catch(e){if(e.message===a.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup?console.error(\"The Channel you have tried to join is an App Channel. Custom Channels can only be defined by the Interop Broker through code or manifest configuration. Please use getOrCreateChannel.\"):console.error(e.message),e.message.startsWith(\"Attempting to join a context group that does not exist\"))throw new Error(o.ChannelError.NoChannelFound);throw new Error(o.ChannelError.AccessDenied)}}async getCurrentChannel(){this.wire.sendAction(\"fdc3-get-current-channel\").catch((e=>{}));const e=await this.getCurrentContextGroupInfo();return e?this.buildChannelObject(e):null}async leaveCurrentChannel(){return this.wire.sendAction(\"fdc3-leave-current-channel\").catch((e=>{})),this.client.removeFromContextGroup()}async getCurrentContextGroupInfo(){const e=await this.client.getContextGroups(),t=e.map((async e=>this.client.getAllClientsInContextGroup(e.id))),n=(await Promise.all(t)).findIndex((e=>e.some((e=>{const{uuid:t,name:n}=e;return this.wire.me.uuid===t&&this.wire.me.name===n}))));return e[n]}async buildChannelObject(e){return{...e,type:\"system\",addContextListener:(...[e,t])=>{let n,i;\"function\"==typeof e?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),n=e):(n=t,\"string\"==typeof e&&(i=e));const r=(async()=>{let e=!0;const t=await this.client.getCurrentContext(i);return this.client.addContextHandler(((i,r)=>{if(!e||(e=!1,!(0,d.default)(t,i)))return n(i,r)}),i)})();return{...r,unsubscribe:()=>r.then((e=>e.unsubscribe()))}},broadcast:this.broadcast.bind(this),getCurrentContext:async e=>{const t=await this.client.getCurrentContext(e);return void 0===t?null:t}}}},e=new WeakMap,tr}ir.PrivateChannelClient=class{constructor(e,t){this.id=t,this.client=e,this.listeners=new Map}async broadcast(e){return this.client.dispatch(\"broadcast\",{context:e})}async getCurrentContext(e){return this.client.dispatch(\"getCurrentContext\",{contextType:e})}async addContextListener(e,t){if(\"function\"!=typeof t)throw new Error(\"Non-function argument passed to the second parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.\");let n;n=e?`contextHandler:invoke-${this.id}-${e}-${ar.generateId()}`:`contextHandler:invoke-${this.id}-${ar.generateId()}`,this.client.register(n,ar.wrapContextHandler(t,n));const i={unsubscribe:await this.createContextUnsubscribeCb(n)};return this.listeners.set(n,i),await this.client.dispatch(\"contextHandlerAdded\",{handlerId:n,contextType:e}),i}createNonStandardUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch(\"nonStandardHandlerRemoved\",{handlerId:e})}}createContextUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch(\"contextHandlerRemoved\",{handlerId:e})}}onAddContextListener(e){const t=`onContextHandlerAdded:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch(\"onAddContextHandlerAdded\",{handlerId:t}),n}onDisconnect(e){const t=`onDisconnect:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch(\"onDisconnectHandlerAdded\",{handlerId:t}),n}onUnsubscribe(e){const t=`onUnsubscribe:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch(\"onUnsubscribeHandlerAdded\",{handlerId:t}),n}async cleanUpAllSubs(){Array.from(this.listeners.keys()).forEach((e=>{this.client.remove(e),this.listeners.delete(e)}))}async disconnect(){try{await this.client.dispatch(\"clientDisconnecting\"),await this.cleanUpAllSubs(),await this.client.disconnect()}catch(e){throw new Error(e.message)}}},function(e){var t=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,\"__esModule\",{value:!0}),e.getIntentResolution=e.isChannel=e.isContext=e.connectPrivateChannel=e.buildAppChannelObject=e.buildPrivateChannelObject=e.ChannelError=e.ResultError=e.UnsupportedChannelApiError=e.getUnsupportedChannelApis=void 0;const n=Hi,r=ir,o=t(i);e.getUnsupportedChannelApis=e=>({addContextListener:()=>{throw new a(\"Channel.addContextListener\",e)},broadcast:()=>{throw new a(\"Channel.broadcast\",e)},getCurrentContext:()=>{throw new a(\"Channel.getCurrentContext\",e)}});class a extends Error{constructor(e,t=\"System\"){super(e),this.message=`Calling ${e} on an instance of a ${t} Channel returned by fdc3.get${t}Channels is not supported. If you would like to use a ${t} Channel, please use fdc3.joinChannel, fdc3.addContextListener, and fdc3.broadcast instead.`}}var c,d;e.UnsupportedChannelApiError=a,function(e){e.NoResultReturned=\"NoResultReturned\",e.IntentHandlerRejected=\"IntentHandlerRejected\"}(c=e.ResultError||(e.ResultError={})),(d=e.ChannelError||(e.ChannelError={})).NoChannelFound=\"NoChannelFound\",d.AccessDenied=\"AccessDenied\",d.CreationFailed=\"CreationFailed\";e.buildPrivateChannelObject=e=>{let t=!1;const n=()=>{if(t)throw new Error(\"Private Channel Client has been disconnected from the Private Channel\")};return{id:e.id,type:\"private\",broadcast:async t=>(n(),e.broadcast(t)),getCurrentContext:async t=>(n(),e.getCurrentContext(t)),addContextListener:async(t,i)=>{n();let r=i,o=t;\"function\"==typeof t&&(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),r=t,o=null);return e.addContextListener(o,r)},onAddContextListener:t=>(n(),e.onAddContextListener(t)),disconnect:async()=>(n(),t=!0,e.disconnect()),onDisconnect:t=>(n(),e.onDisconnect(t)),onUnsubscribe:t=>(n(),e.onUnsubscribe(t))}};e.buildAppChannelObject=e=>({id:e.id,type:\"app\",broadcast:e.setContext,getCurrentContext:async t=>{const n=await e.getCurrentContext(t);return void 0===n?null:n},addContextListener:(t,n)=>{let i,r;\"function\"==typeof t?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),i=t):(i=n,\"string\"==typeof t&&(r=t));const s=(async()=>{let t=!0;const n=await e.getCurrentContext(r);return e.addContextHandler(((e,r)=>{if(!t||(t=!1,!(0,o.default)(n,e)))return i(e,r)}),r)})();return{...s,unsubscribe:()=>s.then((e=>e.unsubscribe()))}}});e.connectPrivateChannel=async t=>{try{const n=await fin.InterApplicationBus.Channel.connect(t),i=new r.PrivateChannelClient(n,t);return(0,e.buildPrivateChannelObject)(i)}catch(e){throw new Error(`Private Channel with id: ${t} doesn't exist`)}};e.isContext=e=>{if(e&&\"object\"==typeof e&&\"type\"in e){const{type:t}=e;return\"string\"==typeof t}return!1};e.isChannel=e=>{if(e&&\"object\"==typeof e&&\"type\"in e&&\"id\"in e){const{type:t,id:n}=e;return\"string\"==typeof t&&\"string\"==typeof n&&(\"app\"===t||\"private\"===t)}return!1};e.getIntentResolution=async(t,i,r,o)=>{const s=(0,n.generateId)(),a=new Promise(((e,t)=>{fin.InterApplicationBus.subscribe({uuid:\"*\"},s,(t=>{e(t)})).catch((()=>t(new Error(\"getResult is not supported in this environment\"))))})),d=r?{target:r,intentResolutionResultId:s}:{intentResolutionResultId:s},h=o?{name:o,context:i,metadata:d}:{...i,metadata:d},l=async()=>{let n=await a;if(!n||\"object\"!=typeof n)throw new Error(c.NoResultReturned);const{error:i}=n;if(i)throw new Error(c.IntentHandlerRejected);if((0,e.isChannel)(n)){const{id:i,type:r}=n;switch(r){case\"private\":n=await(0,e.connectPrivateChannel)(i);break;case\"app\":{const r=await t.joinSessionContextGroup(i);n=(0,e.buildAppChannelObject)(r);break}}}else if(!(0,e.isContext)(n))throw new Error(c.NoResultReturned);return n},u=o?await t.fireIntent(h):await t.fireIntentForContext(h);return\"object\"!=typeof u?{source:{appId:\"\",instanceId:\"\"},intent:\"\",version:\"2.0\",getResult:l}:{...u,getResult:l}}}(nr);var lr,ur,pr={};function wr(){if(ur)return Ki;ur=1;var e,t,n=s&&s.__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},i=s&&s.__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)},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ki,\"__esModule\",{value:!0}),Ki.InteropClient=void 0;const o=d,a=r(qi),c=function(){if(dr)return er;dr=1,Object.defineProperty(er,\"__esModule\",{value:!0}),er.Fdc3Module=void 0;const e=Hi,t=hr();class n extends t.FDC3ModuleBase{async open(e,t){await super._open(e,t)}addContextListener(e,t){let n;return this.wire.sendAction(\"fdc3-add-context-listener\").catch((e=>{})),\"function\"==typeof e?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),n=this.client.addContextHandler(e)):n=this.client.addContextHandler(t,null===e?void 0:e),{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}addIntentListener(e,t){this.wire.sendAction(\"fdc3-add-intent-listener\").catch((e=>{}));const n=this.client.registerIntentHandler((e=>{const{context:n,metadata:i}=e,{metadata:r}=n,o=i?.intentResolutionResultId||r?.intentResolutionResultId;o&&this.fin.InterApplicationBus.publish(o,null).catch((()=>null)),t(e.context)}),e,{fdc3Version:\"1.2\"});return{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}async raiseIntent(t,n,i){this.wire.sendAction(\"fdc3-raise-intent\").catch((e=>{}));const r=i?{name:t,context:n,metadata:{target:i}}:{name:t,context:n};try{return await this.client.fireIntent(r)}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntent?\"ResolverUnavailable\":t.message;throw new Error(n)}}async findIntent(t,n){this.wire.sendAction(\"fdc3-find-intent\").catch((e=>{}));try{return await this.client.getInfoForIntent({name:t,context:n})}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntent?\"ResolverUnavailable\":t.message;throw new Error(n)}}async findIntentsByContext(t){this.wire.sendAction(\"fdc3-find-intents-by-context\").catch((e=>{}));try{return await this.client.getInfoForIntentsByContext(t)}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntentsByContext?\"ResolverUnavailable\":t.message;throw new Error(n)}}async raiseIntentForContext(t,n){this.wire.sendAction(\"fdc3-raise-intent-for-context\").catch((e=>{}));try{return await this.client.fireIntentForContext({...t,metadata:{target:n}})}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntentForContext?\"ResolverUnavailable\":t.message;throw new Error(n)}}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}getInfo(){return this.wire.sendAction(\"fdc3-get-info\").catch((e=>{})),{providerVersion:this.wire.environment.getAdapterVersionSync(),provider:`openfin-${this.wire.me.uuid}`,fdc3Version:\"1.2\"}}}return er.Fdc3Module=n,er}(),h=function(){if(lr)return pr;lr=1,Object.defineProperty(pr,\"__esModule\",{value:!0}),pr.Fdc3Module2=void 0;const e=hr(),t=Hi,n=wr(),i=nr,r=ir;class o extends e.FDC3ModuleBase{async open(e,t){return\"string\"==typeof e&&console.warn(\"Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).\"),super._open(e,t)}async findInstances(e){this.wire.sendAction(\"fdc3-find-instances\").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,\"fdc3FindInstances\",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3FindInstances?\"ResolverUnavailable\":e.message;throw new Error(n)}}async getAppMetadata(e){this.wire.sendAction(\"fdc3-get-app-metadata\").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,\"fdc3GetAppMetadata\",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3GetAppMetadata?\"ResolverUnavailable\":e.message;throw new Error(n)}}async addContextListener(e,t){this.wire.sendAction(\"fdc3-add-context-listener\").catch((e=>{}));const n=e=>t=>{const{contextMetadata:n,...i}=t,r=n?[{...i},n]:[t,null];e(...r)};let i=t,r=n(i);return\"function\"==typeof e?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),i=e,r=n(i),this.client.addContextHandler(r)):this.client.addContextHandler(r,null===e?void 0:e)}async findIntent(e,n,i){this.wire.sendAction(\"fdc3-find-intent\").catch((e=>{}));try{return await this.client.getInfoForIntent({name:e,context:n,metadata:{resultType:i}})}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntent?\"ResolverUnavailable\":e.message;throw new Error(n)}}async findIntentsByContext(e,i){this.wire.sendAction(\"fdc3-find-intents-by-context\").catch((e=>{}));const r=i?{context:e,metadata:{resultType:i}}:e;try{return await n.InteropClient.ferryFdc3Call(this.client,\"fdc3v2FindIntentsByContext\",r)}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntentsByContext?\"ResolverUnavailable\":e.message;throw new Error(n)}}async raiseIntent(e,n,r){this.wire.sendAction(\"fdc3-raise-intent\").catch((e=>{}));try{return\"string\"==typeof r&&console.warn(\"Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).\"),(0,i.getIntentResolution)(this.client,n,r,e)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?\"ResolverUnavailable\":e.message;throw new Error(n)}}async raiseIntentForContext(e,n){this.wire.sendAction(\"fdc3-raise-intent-for-context\").catch((e=>{}));try{return\"string\"==typeof n&&console.warn(\"Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).\"),(0,i.getIntentResolution)(this.client,e,n)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?\"ResolverUnavailable\":e.message;throw new Error(n)}}async addIntentListener(e,t){if(this.wire.sendAction(\"fdc3-add-intent-listener\").catch((e=>{})),\"string\"!=typeof e)throw new Error(\"First argument must be an Intent name\");return this.client.registerIntentHandler((async e=>{let n,i;const{context:r,metadata:o}=e,{contextMetadata:s,metadata:a,...c}=r,d=o?.intentResolutionResultId||a?.intentResolutionResultId;try{const e=a?{metadata:a,...c}:{...c};n=await t(e,s),i=n}catch(e){n=e,i={error:!0}}if(d&&this.fin.InterApplicationBus.publish(d,i).catch((()=>null)),n instanceof Error)throw new Error(n.message);return n}),e,{fdc3Version:\"2.0\"})}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}async createPrivateChannel(){const e=(0,t.generateId)();await n.InteropClient.ferryFdc3Call(this.client,\"createPrivateChannelProvider\",{channelId:e});const o=await this.fin.InterApplicationBus.Channel.connect(e),s=new r.PrivateChannelClient(o,e);return(0,i.buildPrivateChannelObject)(s)}async getUserChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:\"user\",...(0,i.getUnsupportedChannelApis)(\"User\")})))}async getSystemChannels(){return console.warn(\"This API has been deprecated. Please use fdc3.getUserChannels instead.\"),super.getSystemChannels()}async joinUserChannel(e){return super.joinChannel(e)}async joinChannel(e){return console.warn(\"This API has been deprecated. Please use fdc3.joinUserChannel instead.\"),super.joinChannel(e)}async getCurrentChannel(){const e=await super.getCurrentChannel();return e?{...e,type:\"user\",broadcast:this.broadcast.bind(this)}:null}async getInfo(){return n.InteropClient.ferryFdc3Call(this.client,\"fdc3v2GetInfo\",{fdc3Version:\"2.0\"})}}return pr.Fdc3Module2=o,pr}(),l=Hi;let u=class extends o.Base{constructor(i,r){super(i),e.set(this,void 0),t.set(this,void 0),n(this,t,new Map,\"f\"),n(this,e,r,\"f\")}async setContext(t){this.wire.sendAction(\"interop-client-set-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"setContext\",{context:t})}async addContextHandler(t,n){if(this.wire.sendAction(\"interop-client-add-context-handler\").catch((e=>{})),\"function\"!=typeof t)throw new Error(\"Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.\");const r=await i(this,e,\"f\");let o;o=n?`invokeContextHandler-${n}-${(0,l.generateId)()}`:\"invokeContextHandler\";const s=(0,l.wrapContextHandler)(t,o);return r.register(o,s),await r.dispatch(\"contextHandlerRegistered\",{handlerId:o,contextType:n}),{unsubscribe:async()=>{r.remove(o),await r.dispatch(\"removeContextHandler\",{handlerId:o})}}}async getContextGroups(){this.wire.sendAction(\"interop-client-get-context-groups\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getContextGroups\")}async joinContextGroup(t,n){this.wire.sendAction(\"interop-client-join-context-group\").catch((e=>{}));const r=await i(this,e,\"f\");if(!t)throw new Error(\"No contextGroupId specified for joinContextGroup.\");return r.dispatch(\"joinContextGroup\",{contextGroupId:t,target:n})}async removeFromContextGroup(t){this.wire.sendAction(\"interop-client-remove-from-context-group\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"removeFromContextGroup\",{target:t})}async getAllClientsInContextGroup(t){this.wire.sendAction(\"interop-client-get-all-clients-in-context-group\").catch((e=>{}));const n=await i(this,e,\"f\");if(!t)throw new Error(\"No contextGroupId specified for getAllClientsInContextGroup.\");return n.dispatch(\"getAllClientsInContextGroup\",{contextGroupId:t})}async getInfoForContextGroup(t){this.wire.sendAction(\"interop-client-get-info-for-context-group\").catch((e=>{}));const n=await i(this,e,\"f\");if(!t)throw new Error(\"No contextGroupId specified for getInfoForContextGroup.\");return n.dispatch(\"getInfoForContextGroup\",{contextGroupId:t})}async fireIntent(t){this.wire.sendAction(\"interop-client-fire-intent\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"fireIntent\",t)}async registerIntentHandler(t,n,r){this.wire.sendAction(\"interop-client-register-intent-handler\").catch((e=>{}));const o=await i(this,e,\"f\"),s=`intent-handler-${n}`,a=(0,l.wrapIntentHandler)(t,s);try{await o.register(s,a),await o.dispatch(\"intentHandlerRegistered\",{handlerId:s,...r})}catch(e){throw new Error(\"Unable to register intent handler\")}return{unsubscribe:async()=>{o.remove(s)}}}async getCurrentContext(t){this.wire.sendAction(\"interop-client-get-current-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getCurrentContext\",{contextType:t})}async getInfoForIntent(t){this.wire.sendAction(\"interop-client-get-info-for-intent\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getInfoForIntent\",t)}async getInfoForIntentsByContext(t){this.wire.sendAction(\"interop-client-get-info-for-intents-by-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getInfoForIntentsByContext\",t)}async fireIntentForContext(t){this.wire.sendAction(\"interop-client-fire-intent-for-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"fireIntentForContext\",t)}async joinSessionContextGroup(n){try{const r=i(this,t,\"f\").get(n);if(r)return r.getUserInstance();const o=await i(this,e,\"f\"),{hasConflict:s}=await o.dispatch(\"sessionContextGroup:createIfNeeded\",{sessionContextGroupId:n});s&&console.warn(`A (non-session) context group with the name \"${n}\" already exists. If you are trying to join a Context Group, call joinContextGroup instead.`);const c=new a.default(this.wire,i(this,e,\"f\"),n);return i(this,t,\"f\").set(n,c),c.getUserInstance()}catch(e){throw console.error(`Error thrown trying to create Session Context Group with id \"${n}\": ${e}`),e}}async onDisconnection(t){this.wire.sendAction(\"interop-client-add-ondisconnection-listener\").catch((e=>{}));return(await i(this,e,\"f\")).onDisconnection((e=>{const{uuid:n}=e;t({type:\"interop-broker\",topic:\"disconnected\",brokerName:n})}))}getFDC3Sync(e){switch(e){case\"1.2\":return new c.Fdc3Module((()=>this),this.wire);case\"2.0\":return new h.Fdc3Module2((()=>this),this.wire);default:throw new Error(`Invalid FDC3 version provided: ${e}. Must be '1.2' or '2.0'`)}}async getFDC3(e){return this.getFDC3Sync(e)}static async ferryFdc3Call(t,n,r){return(await i(t,e,\"f\")).dispatch(n,r||null)}};return Ki.InteropClient=u,e=new WeakMap,t=new WeakMap,Ki}var yr,fr,gr,mr={};function vr(){if(yr)return mr;yr=1,Object.defineProperty(mr,\"__esModule\",{value:!0}),mr.overrideCheck=mr.checkFDC32Overrides=mr.getDefaultViewFdc3VersionFromAppInfo=void 0;const e=Vi();function t(t){return[\"fdc3HandleFindInstances\",\"handleInfoForIntent\",\"handleInfoForIntentsByContext\",\"fdc3HandleGetAppMetadata\",\"fdc3HandleGetInfo\",\"fdc3HandleOpen\",\"handleFiredIntent\",\"handleFiredIntentForContext\"].filter((n=>t[n]===e.InteropBroker.prototype[n]))}return mr.getDefaultViewFdc3VersionFromAppInfo=function({manifest:e,initialOptions:t}){const n=e?.platform?.defaultViewOptions?.fdc3InteropApi??t.defaultViewOptions?.fdc3InteropApi;return[\"1.2\",\"2.0\"].includes(n??\"\")?n:void 0},mr.checkFDC32Overrides=t,mr.overrideCheck=function(e,n){if(n&&\"2.0\"===n){const n=t(e);n.length>0&&console.warn(`WARNING: FDC3 2.0 has been set as a default option for Views in this Platform, but the required InteropBroker APIs for FDC3 2.0 compliance have not all been overridden.\\nThe following APIs need to be overridden:\\n${n.join(\"\\n\")}`)}},mr}function Cr(){return gr||(gr=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),i=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),i(function(){if(fr)return Ti;fr=1;var e=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ti,\"__esModule\",{value:!0}),Ti.InteropModule=void 0;const t=e(n),i=$i,r=d,o=Vi(),a=wr(),c=vr(),h=Tn,l=e=>new e,u=\"You have attempted to use or modify InteropBroker parameters, which is not allowed. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.\";class p extends r.Base{async init(e,n=l){this.wire.sendAction(\"interop-init\").catch((()=>{}));const r=await this.wire.environment.getInteropInfo(this.wire.getFin()),s=(0,i.createUnusableObject)(u),a=(0,i.createWarningObject)(u,(0,t.default)(r)),d=async()=>{throw new Error(u)},p=o.InteropBroker.createClosedConstructor(this.wire,(()=>this.fin.InterApplicationBus.Channel.create(`interop-broker-${e}`)),r);let w;return w=Array.isArray(n)?new((0,h.overrideFromComposables)(...n)(p))(s,d,a):await n(p,s,d,a),(0,c.overrideCheck)(w,r.fdc3Version),w}connectSync(e,t){return this.wire.sendAction(\"interop-connect-sync\").catch((()=>{})),new a.InteropClient(this.wire,this.wire.environment.whenReady().then((()=>this.fin.InterApplicationBus.Channel.connect(`interop-broker-${e}`,{payload:t}))))}}return Ti.InteropModule=p,Ti}(),e),i(wr(),e),i(Vi(),e)}(Li)),Li}var br={},Ir={},Er={},xr={};Object.defineProperty(xr,\"__esModule\",{value:!0}),xr.getSnapshotSourceChannelName=void 0;xr.getSnapshotSourceChannelName=e=>`snapshot-source-provider-${e.uuid}`;var Ar,Pr,Mr,_r,Or,Sr=s&&s.__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},Rr=s&&s.__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)};Object.defineProperty(Er,\"__esModule\",{value:!0}),Er.SnapshotSource=void 0;const Fr=d,jr=xr,kr=new Map;class Lr extends Fr.Base{constructor(e,t){super(e),Ar.set(this,void 0),Pr.set(this,(()=>(kr.has(this.identity.uuid)||kr.set(this.identity.uuid,{eventFired:null,clientPromise:null}),kr.get(this.identity.uuid)))),Mr.set(this,(()=>(Rr(this,Pr,\"f\").call(this).clientPromise||(Rr(this,Pr,\"f\").call(this).clientPromise=Rr(this,_r,\"f\").call(this)),Rr(this,Pr,\"f\").call(this).clientPromise))),_r.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);try{Rr(this,Pr,\"f\").call(this).eventFired||await Rr(this,Or,\"f\").call(this);const t=await this.fin.InterApplicationBus.Channel.connect(e,{wait:!1});return t.onDisconnection((()=>{Rr(this,Pr,\"f\").call(this).clientPromise=null,Rr(this,Pr,\"f\").call(this).eventFired=null})),t}catch(e){throw Rr(this,Pr,\"f\").call(this).clientPromise=null,new Error(\"The targeted SnapshotSource is not currently initialized. Await this object's ready() method.\")}})),Or.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);let t,n;const i=new Promise(((e,i)=>{t=e,n=i}));Rr(this,Pr,\"f\").call(this).eventFired=i;const r=async i=>{try{i.channelName===e&&(t(),await this.fin.InterApplicationBus.Channel.removeListener(\"connected\",r))}catch(e){n(e)}};await this.fin.InterApplicationBus.Channel.on(\"connected\",r)})),Sr(this,Ar,t,\"f\")}get identity(){return Rr(this,Ar,\"f\")}async ready(){this.wire.sendAction(\"snapshot-source-ready\").catch((e=>{}));try{await Rr(this,Mr,\"f\").call(this)}catch(e){await Rr(this,Pr,\"f\").call(this).eventFired}}async getSnapshot(){this.wire.sendAction(\"snapshot-source-get-snapshot\").catch((e=>{}));const e=await Rr(this,Mr,\"f\").call(this),t=await e.dispatch(\"get-snapshot\");return(await t).snapshot}async applySnapshot(e){this.wire.sendAction(\"snapshot-source-apply-snapshot\").catch((e=>{}));return(await Rr(this,Mr,\"f\").call(this)).dispatch(\"apply-snapshot\",{snapshot:e})}}Er.SnapshotSource=Lr,Ar=new WeakMap,Pr=new WeakMap,Mr=new WeakMap,_r=new WeakMap,Or=new WeakMap,Object.defineProperty(Ir,\"__esModule\",{value:!0}),Ir.SnapshotSourceModule=void 0;const Tr=d,$r=Er,Br=xr;class Gr extends Tr.Base{async init(e){if(this.wire.sendAction(\"snapshot-source-init\").catch((e=>{})),\"object\"!=typeof e||\"function\"!=typeof e.getSnapshot||\"function\"!=typeof e.applySnapshot)throw new Error(\"you must pass in a valid SnapshotProvider\");const t=await this.fin.InterApplicationBus.Channel.create((0,Br.getSnapshotSourceChannelName)(this.fin.me));t.register(\"get-snapshot\",(async()=>({snapshot:await e.getSnapshot()}))),t.register(\"apply-snapshot\",(({snapshot:t})=>e.applySnapshot(t)))}wrapSync(e){return this.wire.sendAction(\"snapshot-source-wrap-sync\").catch((e=>{})),new $r.SnapshotSource(this.wire,e)}async wrap(e){return this.wire.sendAction(\"snapshot-source-wrap\").catch((e=>{})),this.wrapSync(e)}}Ir.SnapshotSourceModule=Gr,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Ir,e),n(Er,e)}(br),Object.defineProperty(a,\"__esModule\",{value:!0});var Wr=a.Fin=void 0;const Hr=t,Nr=c,Dr=ie(),Ur=Z(),Vr=de,zr=en,Kr=rn,qr=un,Jr=bn,Yr=J(),Zr=An,Qr=ki,Xr=Cr(),eo=br;class to extends Hr.EventEmitter{constructor(e){super(),this.wire=e,this.System=new Nr.System(e),this.Window=new Dr._WindowModule(e),this.Application=new Ur.ApplicationModule(e),this.InterApplicationBus=new Vr.InterApplicationBus(e),this.Clipboard=new zr.Clipboard(e),this.ExternalApplication=new Kr.ExternalApplicationModule(e),this.Frame=new qr._FrameModule(e),this.GlobalHotkey=new Jr.GlobalHotkey(e),this.Platform=new Zr.PlatformModule(e,this.InterApplicationBus.Channel),this.View=new Yr.ViewModule(e),this.Interop=new Xr.InteropModule(e),this.SnapshotSource=new eo.SnapshotSourceModule(e),e.registerFin(this),this.me=(0,Qr.getMe)(e),e.on(\"disconnected\",(()=>{this.emit(\"disconnected\")}))}}Wr=a.Fin=to;var no={},io={};function ro(e){return\"string\"==typeof e.manifestUrl}function oo(e){return ao(e)&&\"string\"==typeof e.address}function so(e){return oo(e)&&\"string\"==typeof e.token}function ao(e){return\"string\"==typeof e.uuid}function co(e){return e.runtime&&\"string\"==typeof e.runtime.version}function ho(e){return ao(e)&&co(e)}Object.defineProperty(io,\"__esModule\",{value:!0}),io.isInternalConnectConfig=io.isPortDiscoveryConfig=io.isNewConnectConfig=io.isConfigWithReceiver=io.isRemoteConfig=io.isExistingConnectConfig=io.isExternalConfig=void 0,io.isExternalConfig=ro,io.isExistingConnectConfig=oo,io.isRemoteConfig=so,io.isConfigWithReceiver=function(e){return\"object\"==typeof e.receiver&&so({...e,address:\"\"})},io.isNewConnectConfig=ho,io.isPortDiscoveryConfig=function(e){return ro(e)&&co(e)||ho(e)},io.isInternalConnectConfig=function(e){return oo(e)||ho(e)};var lo={},uo={};Object.defineProperty(uo,\"__esModule\",{value:!0}),uo.EmitterMap=void 0;const po=t;function wo(e){return Buffer.from(e).toString(\"base64\")}uo.EmitterMap=class{constructor(){this.storage=new Map}hashKeys(e){return e.map(wo).join(\"/\")}getOrCreate(e){const t=this.hashKeys(e);return this.storage.has(t)||this.storage.set(t,new po.EventEmitter),this.storage.get(t)}has(e){return this.storage.has(this.hashKeys(e))}delete(e){const t=this.hashKeys(e);return this.storage.delete(t)}},Object.defineProperty(lo,\"__esModule\",{value:!0});const yo=uo;class fo extends yo.EmitterMap{constructor(){super(...arguments),this.dispatchEvent=e=>{if(function(e){return\"process-desktop-event\"===e.action}(e)){const{payload:t}=e,n=function(e){const{topic:t}=e;if(\"frame\"===t||\"window\"===t||\"view\"===t){const{uuid:n,name:i}=e;return[t,n,i]}if(\"application\"===t){const{uuid:n}=e;return[t,n]}return[t]}(t);if(this.has(n))return this.getOrCreate(n).emit(t.type,t),!0}return!1}}}lo.default=fo;var go,mo,vo=s&&s.__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},Co=s&&s.__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)},bo=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(no,\"__esModule\",{value:!0});var Io=no.Transport=void 0;const Eo=t,xo=io,Ao=g,Po=bo(lo),Mo=ki,_o=ke;class Oo extends Eo.EventEmitter{constructor(e,t,n){super(),this.wireListeners=new Map,this.topicRefMap=new Map,this.eventAggregator=new Po.default,this.messageHandlers=[this.eventAggregator.dispatchEvent],go.set(this,void 0),mo.set(this,void 0),this.connectSync=()=>{Co(this,go,\"f\").connectSync()},this.getPort=()=>Co(this,go,\"f\").getPort(),vo(this,go,new e(this.onmessage.bind(this)),\"f\"),this.environment=t,this.sendRaw=Co(this,go,\"f\").send.bind(Co(this,go,\"f\")),this.registerMessageHandler(this.handleMessage.bind(this)),Co(this,go,\"f\").on(\"disconnected\",(()=>{for(const[,{handleNack:e}]of this.wireListeners)e({reason:\"Remote connection has closed\"});this.wireListeners.clear(),this.emit(\"disconnected\")}));const{uuid:i,name:r}=n,o=this.environment.getCurrentEntityType();this.me=(0,Mo.getBaseMe)(o,i,r)}getFin(){if(!Co(this,mo,\"f\"))throw new Error(\"No Fin object registered for this transport\");return Co(this,mo,\"f\")}registerFin(e){if(Co(this,mo,\"f\"))throw new Error(\"Fin object has already been registered for this transport\");vo(this,mo,e,\"f\")}shutdown(){return Co(this,go,\"f\").shutdown()}async connect(e){if((0,xo.isConfigWithReceiver)(e))return await Co(this,go,\"f\").connect(e.receiver),this.authorize(e);if((0,xo.isRemoteConfig)(e))return this.connectRemote(e);if((0,xo.isExistingConnectConfig)(e))return this.connectByPort(e);if((0,xo.isNewConnectConfig)(e)){const t=await this.environment.retrievePort(e);return this.connectByPort({...e,address:`ws://localhost:${t}`})}}async connectRemote(e){return await Co(this,go,\"f\").connect(new(this.environment.getWsConstructor())(e.address)),this.authorize(e)}async connectByPort(e){const{address:t,uuid:n}=e,i={...e,type:\"file-token\"},r=Co(this,go,\"f\");await r.connect(new(this.environment.getWsConstructor())(e.address));const o=await this.sendAction(\"request-external-authorization\",{uuid:n,type:\"file-token\"},!0);if(\"external-authorization-response\"!==o.action)throw new Ao.UnexpectedActionError(o.action);return await this.environment.writeToken(o.payload.file,o.payload.token),this.authorize(i)}async authorize(e){const t=await this.sendAction(\"request-authorization\",e,!0);if(\"authorization-response\"!==t.action)throw new Ao.UnexpectedActionError(t.action);if(!0!==t.payload.success)throw new Ao.RuntimeError(t.payload)}sendAction(e,t={},n=!1){let i=()=>{};const r=Ao.RuntimeError.getCallSite(1),o=this.environment.getNextMessageId(),s=new Promise(((s,a)=>{i=a;const c={action:e,payload:t,messageId:o},d=Co(this,go,\"f\");return this.addWireListener(o,s,(e=>this.nackHandler(e,a,r)),n),d.send(c).catch(a)}));return Object.assign(s,{cancel:i,messageId:o})}nackHandler(e,t,n){t(\"string\"==typeof e?e:new Ao.RuntimeError(e,n))}ferryAction(e){return new Promise(((t,n)=>{const i=this.environment.getNextMessageId();e.messageId=i;const r=e=>{t(e.payload)};return Co(this,go,\"f\").send(e).then((()=>this.addWireListener(i,r,(e=>this.nackHandler(e,n)),!1))).catch(n)}))}registerMessageHandler(e){this.messageHandlers.push(e)}addWireListener(e,t,n,i){i?this.uncorrelatedListener=t:this.wireListeners.has(e)?n({reason:\"Duplicate handler id\",error:(0,_o.errorToPOJO)(new Ao.DuplicateCorrelationError(String(e)))}):this.wireListeners.set(e,{resolve:t,handleNack:n})}onmessage(e){for(const t of this.messageHandlers)t.call(null,e)}handleMessage(e){const t=e.correlationId||NaN;if(\"correlationId\"in e){if(!this.wireListeners.has(t))return!1;{const{resolve:n,handleNack:i}=this.wireListeners.get(t);\"ack\"!==e.action?i({reason:\"Did not receive ack action\",error:(0,_o.errorToPOJO)(new Ao.NoAckError(e.action))}):\"payload\"in e?e.payload.success?n.call(null,e):i(e.payload):\"string\"==typeof e.reason?i(e):(console.warn(\"Received invalid response from core\",e),i({reason:\"invalid response shape\"})),this.wireListeners.delete(t)}}else this.uncorrelatedListener&&this.uncorrelatedListener.call(null,e),this.uncorrelatedListener=()=>{};return!0}}Io=no.Transport=Oo,go=new WeakMap,mo=new WeakMap;const So=(...e)=>({log:(...t)=>console.debug(`[${(new Date).toISOString()}]`,...(e=>e.map((e=>`[${e}]`)))(e),...t),getLogger:(...t)=>So(...e,...t)}),Ro=So(\"@openfin/core-web/client\");function Fo(e,t){if(!function(e){return\"string\"==typeof e}(e))throw new Error(`Property ${t} has invalid type. Expected string, got ${typeof e}.`)}const jo=\"web-broker-ports-ready\",ko=Ro.getLogger(\"get-web-interop-ports\");function Lo(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)}function To(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}\"function\"==typeof SuppressedError&&SuppressedError;const $o=e=>{var n,i,r;return r=class extends t.EventEmitter{constructor(t){super(),n.set(this,void 0),i.set(this,!1),this.connectSync=()=>{Lo(this,i,\"f\")||(e.addEventListener(\"message\",(e=>{e.data?.topic?.startsWith(\"wire-message\")&&e.data.message&&Lo(this,n,\"f\").call(this,{...JSON.parse(e.data.message),ports:e.ports})})),e.start())},this.connect=async()=>{this.connectSync()},this.send=t=>(e.postMessage({topic:\"wire-message\",message:JSON.stringify(t)}),Promise.resolve()),this.shutdown=async()=>{e.close()},To(this,n,t,\"f\")}getPort(){return e}},n=new WeakMap,i=new WeakMap,r};var Bo={},Go={};Object.defineProperty(Go,\"__esModule\",{value:!0}),Go.BaseEnvironment=void 0;const Wo=vr();Go.BaseEnvironment=class{async getViewWindowIdentity(e,t){const{identity:n}=await e.View.wrapSync(t).getCurrentWindow();return n}async getInteropInfo(e){const t=await e.Application.getCurrentSync().getInfo().catch((()=>null)),n=t?.initialOptions?.interopBrokerConfiguration??{};return{fdc3Version:t?(0,Wo.getDefaultViewFdc3VersionFromAppInfo)(t):void 0,...n,fdc3Info:{providerVersion:await e.System.getVersion(),provider:\"OpenFin\"}}}},Object.defineProperty(Bo,\"__esModule\",{value:!0});var Ho=Bo.BrowserEnvironment=void 0;const No=Go;class Do extends No.BaseEnvironment{constructor(){super(...arguments),this.type=\"other\",this.getRandomId=()=>{const e=new Uint32Array(1);return window.crypto.getRandomValues(e)[0].toString(32)}}getAdapterVersionSync(){return\"\"}observeBounds(e,t){throw new Error(\"Method not implemented.\")}layoutAllowedInContext(e){return!1}initLayoutManager(e,t,n){throw new Error(\"Method not implemented.\")}applyLayoutSnapshot(e,t,n){throw new Error(\"Method not implemented.\")}createLayout(e,t){throw new Error(\"Method not implemented.\")}destroyLayout(e,t){throw new Error(\"Method not implemented.\")}resolveLayout(e,t){throw new Error(\"Method not implemented.\")}initPlatform(...e){throw new Error(\"Method not implemented.\")}writeToken(e,t){return Promise.resolve(\"\")}retrievePort(e){throw new Error(\"Method not implemented.\")}getNextMessageId(){return this.getRandomId()}createChildContent(e){throw new Error(\"Method not implemented.\")}getWebWindow(e){throw new Error(\"Method not implemented.\")}getCurrentEntityIdentity(){throw new Error(\"Method not implemented.\")}getCurrentEntityType(){return\"external connection\"}raiseEvent(e,t){throw new Error(\"Method not implemented.\")}getUrl(){return location.href}getDefaultChannelOptions(){return{create:{},connect:{}}}getRtcPeer(){return new RTCPeerConnection}getWsConstructor(){return WebSocket}whenReady(){return Promise.resolve()}}Ho=Bo.BrowserEnvironment=Do;const Uo=e=>\"platform\"in e&&void 0!==e.platform;var Vo,zo;class Ko extends Ho{constructor(e){super(),this.connectConfig=e,Vo.set(this,void 0),zo.set(this,new W((async()=>Promise.resolve().then((function(){return require(\"./main-b14f67c9.js\")}))))),Uo(e)&&this.validatePlatformOptions(e)}getAdapterVersionSync(){return\"0.39.21\"}validatePlatformOptions({platform:e}){if(!(\"layoutSnapshot\"in e))throw new Error(\"Platform options are missing layoutSnapshot. Please provide a layoutSnapshot in the platform options.\");if(\"windows\"in e||\"windows\"in e.layoutSnapshot)throw new Error(\"It appears you tried to call connect() with a snapshot object from an OpenFin desktop environment. Note that connect() expects to be called with a platform property with this structure: { platform: { layoutSnapshot } }. To get a layoutSnapshot of the expected structure, use fin.Platform.Layout.getCurrentLayoutManagerSync().getLayoutSnapshot() in v34+ in your desktop environment.\");const{layouts:t}=e.layoutSnapshot;Object.entries(t).map((([e,t])=>{if(\"object\"!=typeof t||null===t)throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must be an object.`);if(!(\"content\"in t))throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must contain a 'content' property.`)}))}async getInteropInfo(e){return{...{contextGroups:void 0,logging:{beforeAction:{enabled:!1},afterAction:{enabled:!1}}},fdc3Version:void 0,fdc3Info:{providerVersion:\"0.39.21\",provider:\"OpenFin Web\"}}}layoutAllowedInContext(e){return!0}async initLayoutManager(e,t,n){if(Lo(this,Vo,\"f\"))throw new Error(\"Layout already initialized.\");if(!Uo(this.connectConfig))throw new Error(\"Platform options are missing from connection config.\");const{WebLayoutEntryPoint:i}=await Lo(this,zo,\"f\").getValue();return To(this,Vo,new i(this.connectConfig),\"f\"),await Lo(this,Vo,\"f\").initLayoutManager(e,t,n)}async applyLayoutSnapshot(e,t,n){Lo(this,Vo,\"f\")?.applyLayoutSnapshot(e,t,n)}async createLayout(e,t){return Lo(this,Vo,\"f\")?.createLayout(e,t)}async destroyLayout(e,t){return Lo(this,Vo,\"f\")?.destroyLayout(e,t)}async getViewWindowIdentity(e,t){return Promise.resolve({uuid:t.uuid,name:t.uuid})}}Vo=new WeakMap,zo=new WeakMap;const qo=()=>{const e=((e,t)=>{const n=new RegExp(`^${t}<(?.*)>$`).exec(e)?.groups?.meta;if(n)try{return JSON.parse(atob(n))}catch(e){throw new Error(`Failed to decode JSON from ${n}.`)}})(window.name,\"of-frame\");if(e)try{const{name:t,uuid:n,brokerUrl:i,providerId:r,contextGroup:o}=e;return Fo(i,\"brokerUrl\"),Fo(n,\"uuid\"),Fo(t,\"name\"),{identity:{name:t,uuid:n},brokerUrl:i,interopConfig:{providerId:r,currentContextGroup:o}}}catch(e){throw new Error(`Unexpected error occurred when inferring platform information: ${e.stack}`)}},Jo=()=>{const e=r.v4();return{uuid:e,name:e}},Yo=async e=>{if(\"enabled\"===e.connectionInheritance){const t=await(async e=>{const t=qo();if(t){const{validateOptions:n=(()=>!0)}=e,{identity:i,...r}=t;if(!await n(r))throw new Error(\"Parent options were rejected by validateOptions.\");return t}})(e);if(t)return t}if(!e.options){const t=\"enabled\"===e.connectionInheritance?\"Broker URL was not specified nor provided by a platform container.\":\"Connection inheritance is disabled but no options were provided.\";throw new Error(t)}return{...e.options,identity:Jo()}};exports.__classPrivateFieldGet=Lo,exports.__classPrivateFieldSet=To,exports.apiExposer=Gn,exports.commonjsGlobal=s,exports.connect=async t=>{try{Ro.log(\"Establishing connection\",t);const{brokerUrl:n,identity:i,timeout:r,interopConfig:s}=await Yo(t),{workerPort:a,iframeBrokerPort:c}=await(async(e,t,n)=>{const{origin:i}=new URL(e),r=document.createElement(\"IFRAME\");let s;r.style.display=\"none\";try{return await new Promise(((a,c)=>{const d=e=>{if(e.source===r.contentWindow&&e.data?.topic===`ack-${jo}`){if(e.origin!==i)c(new Error(`Broker redirected to unexpected origin ${e.origin}, expected ${i}.`));else if(e.data.success){const[t,n]=e.ports;a({iframeBrokerPort:t,workerPort:n})}else c(new m(e.data));window.removeEventListener(\"message\",d),clearTimeout(s)}};window.addEventListener(\"message\",d),ko.log(`Connecting to broker ${e}`),r.setAttribute(\"src\",e),r.setAttribute(\"name\",o(t,\"of-broker\")),document.body.appendChild(r),ko.log(\"Iframe loaded, awaiting init message from iframe\"),n&&(s=setTimeout((()=>{window.removeEventListener(\"message\",d),document.body.removeChild(r),c(new Error(\"Worker did not initialize in time\"))}),n))}))}catch(e){throw new Error(`Failed to initialise Fin Web Client. ${e.message}`,{cause:e})}})(n,i,r);Ro.log(\"Successfully established connection to shared worker\");const d={entityType:\"external connection\",...i};a.start(),c.start();const h=((t,n,i)=>{const r=$o(n),o=new Ko(t),s=new Io(r,o,i);return s.connectSync(),window.Buffer=e.Buffer,new Wr(s)})(t,a,d);return s?.providerId&&(h.me.interop=h.Interop.connectSync(s.providerId),s?.currentContextGroup&&h.me.interop.joinContextGroup(s.currentContextGroup).catch((e=>{console.warn(`Error joining specified context group: ${s?.currentContextGroup}, continuing`,e)}))),{...h,me:{...h.me,identity:{uuid:h.me.uuid,name:h.me.name}}}}catch(e){throw new Error(`An error occured during web-interop connection: ${e.message}`)}},exports.decorators=Nn,exports.encodeOptions=o,exports.layout_constants=ai,exports.lazy=G;\n","\"use strict\";var t=require(\"./main-8cad4070.js\"),e=require(\"uuid\");require(\"buffer/\"),require(\"events\"),require(\"lodash/cloneDeep\"),require(\"lodash/isEqual\");var i={},n={};Object.defineProperty(n,\"__esModule\",{value:!0}),n.mapValuesAsync=n.mapEntriesAsync=void 0;const o=(t,[e,i])=>({...t,[e]:i});async function s(t,e){return(await Promise.all(e.map((async([e,i])=>[e,await t(i,e)])))).reduce(o,{})}n.mapEntriesAsync=s,n.mapValuesAsync=async function(t,e){let i;return i=e instanceof Map?[...e.entries()]:Object.entries(e),s(t,i)};var r,a,l,h,d=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldSet||function(t,e,i,n,o){if(\"m\"===n)throw new TypeError(\"Private method is not writable\");if(\"a\"===n&&!o)throw new TypeError(\"Private accessor was defined without a setter\");if(\"function\"==typeof e?t!==e||!o:!e.has(t))throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");return\"a\"===n?o.call(t,i):o?o.value=i:e.set(t,i),i},c=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldGet||function(t,e,i,n){if(\"a\"===i&&!n)throw new TypeError(\"Private accessor was defined without a getter\");if(\"function\"==typeof e?t!==e||!n:!e.has(t))throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");return\"m\"===i?n:\"a\"===i?n.call(t):n?n.value:e.get(t)};Object.defineProperty(i,\"__esModule\",{value:!0});var m=i.DefaultLayoutManager=void 0;const u=n;class p{constructor(t){a.set(this,void 0),l.set(this,new Map),d(this,a,t,\"f\")}size(){return c(this,l,\"f\").size}async applyLayoutSnapshot({layouts:t}){if(Object.keys(t).length>1)throw new Error(\"[LayoutManager] Tried to call applyLayoutSnapshot with more than 1 layout. When implementing multiple layouts via overridden LayoutManager class, you must override and fully implement the applyLayoutSnapshot method without calling super.applyLayoutSnapshot().\");const[[e,i]]=Object.entries(t);await p.createLayout(this,{layoutName:e,layout:i})}async showLayout({layoutName:t}){}async getLayoutSnapshot(){return{layouts:await(0,u.mapValuesAsync)((t=>t.getFrameSnapshot()),c(this,l,\"f\"))}}async removeLayout({layoutName:t}){}getLayoutIdentityForView(t){const e=[...c(this,l,\"f\").values()].find((e=>e.getCurrentViews().some((e=>e.name===t.name&&e.uuid===t.uuid))));return e?.identity??void 0}isLayoutVisible({layoutName:t}){return c(p,r,\"m\",h).call(p,this,t).isVisible()}resolveLayoutIdentity(t){if(t&&\"layoutName\"in t)return t;const e=[...c(this,l,\"f\").values()];if(1===e.length)return e[0].identity;const i=e.find((t=>t.isVisible()));return i?.identity??void 0}static async resolveLayout(t,e){const i=t.resolveLayoutIdentity(e);if(void 0===i||!(\"layoutName\"in i))throw new Error(\"[layout-manager] resolveLayout: Could not resolve the layout identity. Make sure you include 'layoutName' in the identity object.\");return c(p,r,\"m\",h).call(p,t,i.layoutName)}static async handleSharedView(t,e,i){await(0,u.mapValuesAsync)((async t=>{if(t.identity.layoutName!==e.layoutName){const e=t.getCurrentViews().find((t=>t.name===i.name));e&&await t.onViewDetached({viewIdentity:e,target:null}).catch(console.error)}}),c(t,l,\"f\"))}static async handleLastViewRemoved(t,e){await t.removeLayout(e),await c(t,a,\"f\").handleLastViewRemoved(t)}static async destroyLayout(t,{layoutName:e}){await c(p,r,\"m\",h).call(p,t,e).destroy(),c(t,l,\"f\").delete(e)}static async createLayout(t,e){const{layoutName:i}=e;if(c(t,l,\"f\").has(i))throw new Error(`Layout name ${i} already exists`);await c(t,a,\"f\").createLayout(e,t)}static registerLayout(t,e,i){c(t,l,\"f\").set(e,i)}static getAllLayouts(t){return[...c(t,l,\"f\").values()]}static setInitialSnapshot(t,e){c(t,a,\"f\").setInitialSnapshot(e)}static createClosedConstructor(...t){return class extends p{constructor(){super(...t)}}}}m=i.DefaultLayoutManager=p,r=p,a=new WeakMap,l=new WeakMap,h=function(t,e){const i=c(t,l,\"f\").get(e);if(!i)throw new Error(`[layout-manager] getLayoutByName: Could not locate layout with name '${e}'`);return i};var g={},f={},v={};Object.defineProperty(v,\"__esModule\",{value:!0}),v.ReversibleMap=void 0;v.ReversibleMap=class{constructor(){this.valueToKey=new Map,this.keyToValue=new Map,this.setUnique=(t,e)=>{if(this.hasKey(t)||this.hasValue(e))throw new Error(\"Key or value already in the map.\");this.keyToValue.set(t,e),this.valueToKey.set(e,t)},this.getKey=t=>{const e=this.valueToKey.get(t);if(!e)throw new Error(\"Value not found in the map.\");return e},this.deleteKey=t=>{const e=this.getValue(t);return this.keyToValue.delete(t),this.valueToKey.delete(e),e},this.deleteValue=t=>{const e=this.getKey(t);return this.keyToValue.delete(e),this.valueToKey.delete(t),e},this.hasKey=t=>this.keyToValue.has(t),this.hasValue=t=>this.valueToKey.has(t)}getValue(t){const e=this.keyToValue.get(t);if(!e)throw new Error(\"Key not found in the map.\");return e}},Object.defineProperty(f,\"__esModule\",{value:!0});var _=f.LayoutContentCache=void 0;const y=t.lazy,C=v;class w{constructor(){this.contentItemCache=new C.ReversibleMap,this.contentItemCacheId=0,this.createCacheKey=()=>{const t=`entity-${this.contentItemCacheId.toString()}`;return this.contentItemCacheId+=1,t},this.hasKey=t=>this.contentItemCache.hasKey(t),this.getItemOrUndefined=t=>{try{return this.getContentItemOrThrow(t)}catch(t){return}},this.getContentItemOrThrow=(t,e)=>{if(!this.contentItemCache.hasKey(t))throw new Error(\"Layout component has been destroyed or detached from the current layout.\");const i=this.contentItemCache.getValue(t);if(e&&!e.includes(i.type))throw new Error(`Layout item is not the expected type. Expected ${e.join(\", \")}, got ${i.type}.`);return i},this.getOrCreateEntityId=t=>{if(this.contentItemCache.hasValue(t))return this.contentItemCache.getKey(t);t.onDestroyed((()=>{this.contentItemCache.deleteValue(t)}));const e=this.createCacheKey();return this.contentItemCache.setUnique(e,t),e}}static getSingleInstance(){return w.singleton.getValue()}}_=f.LayoutContentCache=w,w.singleton=new y.Lazy((()=>new w));var I={},b={};!function(t){Object.defineProperty(t,\"__esModule\",{value:!0}),t.getAdjacentStacks=t.doShareEdge=t.getAdjacentItem=void 0;t.getAdjacentItem=(e,i)=>{const{parent:n}=e;if(e.isRoot()||!n)return;const o=[\"top\",\"bottom\"].includes(i)?\"column\":\"row\",s=[\"top\",\"left\"].includes(i)?-1:1;if(n.type===o){const t=n.contentItems.indexOf(e)+s;if(t>=0&&t{const n=t.getBounds(),o=e.getBounds();if(!n||!o)return!1;if([\"top\",\"bottom\"].includes(i)){return!(n.righto.right)}return!(n.bottomo.bottom)};t.getAdjacentStacks=(e,i)=>{const n=[\"top\",\"bottom\"].includes(i)?\"row\":\"column\",o=s=>\"stack\"===s.type?(0,t.doShareEdge)(e,s,i)?[s]:[]:\"root\"===s.type||\"ground\"===s.type?[]:s.type===n?s.contentItems.map((t=>o(t))).flat():s.type!==n?[\"top\",\"right\"].includes(i)?o(s.contentItems[s.contentItems.length-1]):o(s.contentItems[0]):[],s=(0,t.getAdjacentItem)(e,i);return s?o(s):[]}}(b);var S=t.commonjsGlobal&&t.commonjsGlobal.__decorate||function(t,e,i,n){var o,s=arguments.length,r=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if(\"object\"==typeof Reflect&&\"function\"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(s<3?o(r):s>3?o(e,i,r):o(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};Object.defineProperty(I,\"__esModule\",{value:!0}),I.LayoutEntitiesController=void 0;const E=t.decorators,x=b,L=i;class z{constructor(t,e,i){this.wire=t,this.layoutManager=e,this.layoutContentCache=i,this.analytics=t=>{this.wire.sendAction(`layout-controller-${t}`).catch((()=>{}))},this.getLayoutIdentityForViewOrThrow=async t=>{const e=this.layoutManager.getLayoutIdentityForView(t);if(!e)throw new Error(`View identity ${t.name} is not attached to any layouts.`);return e},this.getRoot=async t=>{this.analytics(\"get-root\");const e=(await this.getLayout(t)).getRoot();return{type:e.type,entityId:this.layoutContentCache.getOrCreateEntityId(e)}},this.getStackByView=async t=>{this.analytics(\"get-stack-by-view\");const e=await this.getLayoutIdentityForViewOrThrow(t),i=(await this.getLayout(e)).getStackByView(t);if(\"stack\"===i?.type)return{entityId:this.layoutContentCache.getOrCreateEntityId(i),type:\"stack\"}},this.getStackViews=t=>{this.analytics(\"get-stack-views\");return this.layoutContentCache.getContentItemOrThrow(t,[\"stack\"]).contentItems.map((t=>({name:t.viewName,uuid:this.wire.me.uuid})))},this.isRoot=t=>{this.analytics(\"is-root\");return this.layoutContentCache.getContentItemOrThrow(t).isRoot()},this.exists=t=>(this.analytics(\"exists\"),this.layoutContentCache.hasKey(t)),this.addViewToStack=async(t,e,{index:i}={index:0})=>{this.analytics(\"add-view-to-stack\");const n=this.layoutContentCache.getContentItemOrThrow(t);if(i&&i>n.contentItems.length+1)throw new Error(`Index '${i}' out of range, please exclude the index or specify a number between 0 and ${n.contentItems.length}`);const o={id:t,index:i},{identity:s}=await n.layout.platformCreateView(e,{location:o});return s},this.findViewInStack=(t,e)=>t.contentItems.find((t=>t.viewName===e.name)),this.removeViewFromStack=async(t,e)=>{this.analytics(\"remove-view-from-stack\");const i=this.layoutContentCache.getContentItemOrThrow(t,[\"stack\"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to remove a view ('${e.name}') which does not belong to the stack.`);await n.layout.platformCloseView(e)},this.createAdjacentStack=async(t,e,{position:i=\"right\"}={})=>{if(this.analytics(\"create-adjacent-stack\"),!Array.isArray(e)||0===e.length)throw new Error('The parameter \"views\" must be an array with at least 1 element.');if(![\"top\",\"bottom\",\"left\",\"right\"].includes(i))throw new Error(`Invalid position '${i}' specified.`);const n=this.layoutContentCache.getContentItemOrThrow(t).createAdjacentStack({position:i}),o=this.layoutContentCache.getOrCreateEntityId(n);return await Promise.all(e.reverse().map((t=>this.addViewToStack(o,t)))),o},this.getAdjacentStacks=async({targetId:t,edge:e})=>{this.analytics(\"get-adjacent-stacks\");const i=this.layoutContentCache.getContentItemOrThrow(t);return(0,x.getAdjacentStacks)(i,e).map((t=>({entityId:this.layoutContentCache.getOrCreateEntityId(t)})))},this.setStackActiveView=async(t,e)=>{this.analytics(\"set-stack-active-view\");const i=this.layoutContentCache.getContentItemOrThrow(t,[\"stack\"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to set a view ('${e.name}') as active when it does not belong to the stack.`);i.setActiveContentItem(n,!0)}}async getLayout(t){const e=await L.DefaultLayoutManager.resolveLayout(this.layoutManager,t);if(!e)throw new Error(`Could not resolve target layout identity ${JSON.stringify(t)}`);return e}getContent(t){this.analytics(\"get-content\");return this.layoutContentCache.getContentItemOrThrow(t,[\"column\",\"row\"]).contentItems.map((t=>({type:t.type,entityId:this.layoutContentCache.getOrCreateEntityId(t)})))}getParent(t){this.analytics(\"get-parent\");const e=this.layoutContentCache.getContentItemOrThrow(t);if(!e.isRoot())return e.parent?.contentItems.includes(e)?{type:e.parent.type,entityId:this.layoutContentCache.getOrCreateEntityId(e.parent)}:void 0}}S([(0,E.expose)()],z.prototype,\"getLayoutIdentityForViewOrThrow\",void 0),S([(0,E.expose)()],z.prototype,\"getRoot\",void 0),S([(0,E.expose)()],z.prototype,\"getStackByView\",void 0),S([(0,E.expose)()],z.prototype,\"getStackViews\",void 0),S([(0,E.expose)()],z.prototype,\"getContent\",null),S([(0,E.expose)()],z.prototype,\"getParent\",null),S([(0,E.expose)()],z.prototype,\"isRoot\",void 0),S([(0,E.expose)()],z.prototype,\"exists\",void 0),S([(0,E.expose)()],z.prototype,\"addViewToStack\",void 0),S([(0,E.expose)()],z.prototype,\"removeViewFromStack\",void 0),S([(0,E.expose)()],z.prototype,\"createAdjacentStack\",void 0),S([(0,E.expose)()],z.prototype,\"getAdjacentStacks\",void 0),S([(0,E.expose)()],z.prototype,\"setStackActiveView\",void 0),I.LayoutEntitiesController=z,Object.defineProperty(g,\"__esModule\",{value:!0});var M=g.initLayoutEndpoints=void 0;const P=t.apiExposer,T=t.layout_constants,A=f,k=I,D=i;M=g.initLayoutEndpoints=async function(t,e){const i=t.getFin(),n=await i.Platform.getCurrentSync().getClient(),o=new P.ChannelsExposer(n);await new P.ApiExposer(o).exposeInstance(new k.LayoutEntitiesController(t,e,A.LayoutContentCache.getSingleInstance()),{id:T.LAYOUT_CONTROLLER_ID}),await async function(t,e){const i=t=>async i=>{const n=await D.DefaultLayoutManager.resolveLayout(e,i.target);if(!n)throw new Error(`Could not resolve the layout target from payload ${JSON.stringify(i)}`);return t(n,i)},n=(e,n)=>{t.register(e,i(n))},o=(t,e)=>{n(t,e)};n(\"replace-view\",((t,e)=>t.replaceView(e))),n(\"replace-layout\",((t,{layout:e})=>t.replaceLayout(e))),n(\"add-view\",((t,e)=>t.insertView(e))),o(\"layout-add-view\",((t,{viewOptions:e,location:i,targetView:n})=>t.platformCreateView(e,{location:i,targetView:n}))),n(\"close-view\",((t,e)=>t.cleanupView(e.viewIdentity))),o(\"layout-close-view\",((t,e)=>t.platformCloseView(e.viewIdentity))),n(\"apply-preset-layout\",((t,e)=>t.applyPreset(e))),n(\"get-layout-views\",(t=>t.getCurrentViews())),n(\"get-frame-snapshot\",(t=>t.getFrameSnapshot())),n(\"is-visible\",(t=>t.isVisible())),n(\"destroy\",(t=>t.destroy())),t.register(\"get-layout-snapshot\",(()=>e.getLayoutSnapshot()))}(n,e)};var R={};Object.defineProperty(R,\"__esModule\",{value:!0});var U=R.BaseLayout=void 0;U=R.BaseLayout=class{};var O={};Object.defineProperty(O,\"__esModule\",{value:!0});var V=O.DOMEmitter=void 0;V=O.DOMEmitter=class{constructor(t){this.container=t}dispatchLocalEvent(t,e){const i={...e,type:t,tabSelector:`tab-${e.name}`,containerSelector:`container-${e.name}`,topic:\"openfin-DOM-event\"};this.container.dispatchEvent(new CustomEvent(t,{detail:i}))}};var B={};Object.defineProperty(B,\"__esModule\",{value:!0});var H=B.mapLayoutContentItemsImmutableSync=B.mapLayoutContentItemsImmutable=W=B.isVisible=void 0;var W=B.isVisible=t=>(0!==t.offsetWidth||0!==t.offsetHeight)&&\"hidden\"!==window.getComputedStyle(t).visibility&&t.offsetTop>=0&&t.offsetLeft>=0&&t.offsetTop<=window.innerHeight&&t.offsetLeft<=window.innerWidth;const F=t=>\"type\"in t&&\"component\"===t.type;B.mapLayoutContentItemsImmutable=async function t(e,i){return F(i)?e(i):{...i,content:await Promise.all(i.content?.map((i=>t(e,i))))}},H=B.mapLayoutContentItemsImmutableSync=function t(e,i){return F(i)?e(i):{...i,content:i.content?.map((i=>t(e,i)))}};class N extends Error{constructor(t,e){super(e),this.type=t}}class G extends N{constructor(t,e){super(\"Configuration\",t),this.node=e}}class j extends N{constructor(t){super(\"PopoutBlocked\",t)}}class $ extends N{constructor(t){super(\"API\",t)}}class Z extends N{constructor(t){super(\"Bind\",t)}}class q extends Error{constructor(t,e,i){super(`${t}: ${e}${void 0===i?\"\":\": \"+i}`)}}class X extends q{constructor(t,e){super(\"Assert\",t,e)}}class Y extends q{constructor(t,e,i){super(\"UnreachableCase\",t,`${e}${void 0===i?\"\":\": \"+i}`)}}class K extends q{constructor(t,e){super(\"UnexpectedNull\",t,e)}}class J extends q{constructor(t,e){super(\"UnexpectedUndefined\",t,e)}}var Q;!function(t){let e=!1;const i={PopoutCannotBeCreatedWithGroundItemConfig:{id:0,default:\"Popout cannot be created with ground ItemConfig\"},PleaseRegisterAConstructorFunction:{id:1,default:\"Please register a constructor function\"},ComponentTypeNotRegisteredAndBindComponentEventHandlerNotAssigned:{id:2,default:\"Component type not registered and BindComponentEvent handler not assigned\"},ComponentIsAlreadyRegistered:{id:3,default:\"Component is already registered\"},ComponentIsNotVirtuable:{id:4,default:\"Component is not virtuable. Requires rootHtmlElement field/getter\"},VirtualComponentDoesNotHaveRootHtmlElement:{id:5,default:'Virtual component does not have getter \"rootHtmlElement\"'},ItemConfigIsNotTypeComponent:{id:6,default:\"ItemConfig is not of type component\"},InvalidNumberPartInSizeString:{id:7,default:\"Invalid number part in size string\"},UnknownUnitInSizeString:{id:8,default:\"Unknown unit in size string\"},UnsupportedUnitInSizeString:{id:9,default:\"Unsupported unit in size string\"}};t.idCount=Object.keys(i).length;const n=Object.values(i);t.checkInitialise=function(){if(!e)for(let e=0;e=\"0\"&&t<=\"9\"}function Tt(t,e){const i=zt(e);t.style.width=i}function At(t,e){const i=zt(e);t.style.height=i}function kt(t){return{width:t.offsetWidth,height:t.offsetHeight}}function Dt(t,e){t.style.display=e?\"\":\"none\"}function Rt(t,e){if(void 0!==e)for(const i in e)if(e.hasOwnProperty(i)){const n=e[i],o=t[i];t[i]=Ut(o,n)}return t}function Ut(t,e){if(\"object\"!=typeof e)return e;if(Array.isArray(e)){const t=e.length,i=new Array(t);for(let n=0;n36)throw new Error(\"Too many keys in config minifier map\")},t.translateObject=n}(dt||(dt={})),function(t){t.defaults={type:at.ground,content:[],size:1,sizeUnit:ht.Fractional,minSize:void 0,minSizeUnit:ht.Pixel,id:\"\",isClosable:!0},t.createCopy=function(t,e){switch(t.type){case at.ground:case at.row:case at.column:return gt.createCopy(t,e);case at.stack:return ut.createCopy(t,e);case at.component:return pt.createCopy(t);default:throw new Y(\"CICC91354\",t.type,\"Invalid Config Item type specified\")}},t.createDefault=function(t){switch(t){case at.ground:throw new X(\"CICCDR91562\");case at.row:case at.column:return gt.createDefault(t);case at.stack:return ut.createDefault();case at.component:return pt.createDefault();default:throw new Y(\"CICCDD91563\",t,\"Invalid Config Item type specified\")}},t.isComponentItem=function(t){return t.type===at.component},t.isStackItem=function(t){return t.type===at.stack},t.isGroundItem=function(t){return t.type===at.ground}}(ct||(ct={})),function(t){t.defaultMaximised=!1,function(t){t.createCopy=function(t,e){return void 0===t?void 0:{show:null!=e?e:t.show,popout:t.popout,close:t.close,maximise:t.maximise,minimise:t.minimise,tabDropdown:t.tabDropdown}}}(t.Header||(t.Header={}))}(mt||(mt={})),function(t){function e(t){const e=t.length,i=new Array(e);for(let n=0;n\"__glMaximised\"===t));t>0&&(o=!0,n=n.splice(t,1)),e=n.length>0?n[0]:ct.defaults.id}else e=n;return i=void 0!==t.maximised?t.maximised:o,{id:e,maximised:i}}}(wt||(wt={})),function(t){function e(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0;return{resolved:!0,root:Et.resolve(i),openPopouts:t.resolveOpenPopouts(e.openPopouts),dimensions:t.Dimensions.resolve(e.dimensions),settings:t.Settings.resolve(e.settings),header:t.Header.resolve(e.header,e.settings,e.labels)}}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:Lt.fromResolvedArray(e.openPopouts),settings:_t.Settings.createCopy(e.settings),dimensions:t.Dimensions.fromResolved(e.dimensions),header:_t.Header.createCopy(e.header)}},t.isResolved=function(t){const e=t;return void 0!==e.resolved&&!0===e.resolved},t.resolveOpenPopouts=function(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0,{root:Et.resolve(o),openPopouts:xt.resolveOpenPopouts(e.openPopouts),dimensions:xt.Dimensions.resolve(e.dimensions),settings:xt.Settings.resolve(e.settings),header:xt.Header.resolve(e.header,e.settings,e.labels),parentId:null!==(i=e.parentId)&&void 0!==i?i:null,indexInParent:null!==(n=e.indexInParent)&&void 0!==n?n:null,window:t.Window.resolve(e.window,e.dimensions),resolved:!0}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:i(e.openPopouts),dimensions:xt.Dimensions.fromResolved(e.dimensions),settings:_t.Settings.createCopy(e.settings),header:_t.Header.createCopy(e.header),parentId:e.parentId,indexInParent:e.indexInParent,window:t.Window.fromResolved(e.window)}},t.fromResolvedArray=i}(Lt||(Lt={}));class Wt{constructor(){this._allEventSubscriptions=[],this._subscriptionsMap=new Map,this.unbind=this.removeEventListener,this.trigger=this.emit}tryBubbleEvent(t,e){}emit(t,...e){let i=this._subscriptionsMap.get(t);if(void 0!==i){i=i.slice();for(let t=0;t0){const n=e.slice();n.unshift(t);const o=this._allEventSubscriptions.slice();for(let t=0;t0?n.contentItems[0]:n,e=0);const o=this._layoutManager.createAndInitContentItem(i,t);t.addChild(o,e),this._layoutManager.layoutConfig.settings.popInOnClose?this._onClose():this.close()}createWindow(){const t=this.createUrl(),e=Math.floor(1e6*Math.random()).toString(36),i=this.serializeWindowFeatures({width:this._initialWindowSize.width,height:this._initialWindowSize.height,innerWidth:this._initialWindowSize.width,innerHeight:this._initialWindowSize.height,menubar:\"no\",toolbar:\"no\",location:\"no\",personalbar:\"no\",resizable:\"yes\",scrollbars:\"no\",status:\"no\"});if(this._popoutWindow=globalThis.open(t,e,i),this._popoutWindow)this._popoutWindow.addEventListener(\"load\",(()=>this.positionWindow()),{passive:!0}),this._popoutWindow.addEventListener(\"beforeunload\",(()=>{this._layoutManager.layoutConfig.settings.popInOnClose?this.popIn():this._onClose()}),{passive:!0}),this._checkReadyInterval=setInterval((()=>this.checkReady()),10);else if(!0===this._layoutManager.layoutConfig.settings.blockedPopoutsThrowError){throw new j(\"Popout blocked\")}}checkReady(){if(null===this._popoutWindow)throw new K(\"BPCR01844\");this._popoutWindow.__glInstance&&this._popoutWindow.__glInstance.isInitialised&&(this.onInitialised(),void 0!==this._checkReadyInterval&&(clearInterval(this._checkReadyInterval),this._checkReadyInterval=void 0))}serializeWindowFeatures(t){const e=[];for(const i in t)e.push(i+\"=\"+t[i].toString());return e.join(\",\")}createUrl(){const t=\"gl-window-config-\"+Ot(),e=_t.minifyConfig(this._config);try{localStorage.setItem(t,JSON.stringify(e))}catch(t){throw new Error(\"Error while writing to localStorage \"+function(t){return t instanceof Error?t.message:\"string\"==typeof t?t:\"Unknown Error\"}(t))}const i=new URL(location.href);return i.searchParams.set(\"gl-window\",t),i.toString()}positionWindow(){if(null===this._popoutWindow)throw new Error(\"BrowserPopout.positionWindow: null popoutWindow\");this._popoutWindow.moveTo(this._initialWindowSize.left,this._initialWindowSize.top),this._popoutWindow.focus()}onInitialised(){this._isInitialised=!0,this.getGlInstance().on(\"popIn\",(()=>this.popIn())),this.emit(\"initialised\")}_onClose(){setTimeout((()=>this.emit(\"closed\")),50)}}class Gt extends Wt{constructor(t,e,i,n){super(),this.layoutManager=t,this._parent=i,this._element=n,this._popInParentIds=[],this._type=e.type,this._id=e.id,this._isInitialised=!1,this.isGround=!1,this.isRow=!1,this.isColumn=!1,this.isStack=!1,this.isComponent=!1,this.size=e.size,this.sizeUnit=e.sizeUnit,this.minSize=e.minSize,this.minSizeUnit=e.minSizeUnit,this._isClosable=e.isClosable,this._pendingEventPropagations={},this._throttledEvents=[\"stateChanged\"],this._contentItems=this.createContentItems(e.content)}get type(){return this._type}get id(){return this._id}set id(t){this._id=t}get popInParentIds(){return this._popInParentIds}get parent(){return this._parent}get contentItems(){return this._contentItems}get isClosable(){return this._isClosable}get element(){return this._element}get isInitialised(){return this._isInitialised}static isStack(t){return t.isStack}static isComponentItem(t){return t.isComponent}static isComponentParentableItem(t){return t.isStack||t.isGround}removeChild(t,e=!1){const i=this._contentItems.indexOf(t);if(-1===i)throw new Error(\"Can't remove child item. Unknown content item\");if(e||this._contentItems[i].destroy(),this._contentItems.splice(i,1),this._contentItems.length>0)this.updateSize(!1);else if(!this.isGround&&!0===this._isClosable){if(null===this._parent)throw new K(\"CIUC00874\");this._parent.removeChild(this)}}addChild(t,e,i){return null!=e||(e=this._contentItems.length),this._contentItems.splice(e,0,t),t.setParent(this),!0===this._isInitialised&&!1===t._isInitialised&&t.init(),e}replaceChild(t,e,i=!1){const n=this._contentItems.indexOf(t),o=t._element.parentNode;if(-1===n)throw new X(\"CIRCI23232\",\"Can't replace child. oldChild is not child of this\");if(null===o)throw new K(\"CIRCP23232\");if(o.replaceChild(e._element,t._element),!0===i&&(t._parent=null,t.destroy()),this._contentItems[n]=e,e.setParent(this),e.size=t.size,e.sizeUnit=t.sizeUnit,e.minSize=t.minSize,e.minSizeUnit=t.minSizeUnit,null===e._parent)throw new K(\"CIRCNC45699\");!0===e._parent._isInitialised&&!1===e._isInitialised&&e.init(),this.updateSize(!1)}remove(){if(null===this._parent)throw new K(\"CIR11110\");this._parent.removeChild(this)}popout(){const t=Ot(),e=this.layoutManager.createPopoutFromContentItem(this,void 0,t,void 0);return this.emitBaseBubblingEvent(\"stateChanged\"),e}calculateConfigContent(){const t=this._contentItems,e=t.length,i=new Array(e);for(let n=0;nthis.propagateEventToLayoutManager(t,e))))}propagateEventToLayoutManager(t,e){this._pendingEventPropagations[t]=!1,this.layoutManager.emitUnknown(t,e)}}class jt extends Gt{constructor(t,e,i){super(t,e,i,document.createElement(\"div\")),this._parentItem=i,this._focused=!1,this.isComponent=!0,this._reorderEnabled=e.reorderEnabled,this.applyUpdatableConfig(e),this._initialWantMaximise=e.maximised;const n=document.createElement(\"div\");n.classList.add(\"lm_content\"),this.element.appendChild(n),this._container=new Ft(e,this,t,n,(t=>this.handleUpdateItemConfigEvent(t)),(()=>this.show()),(()=>this.hide()),(t=>this.focus(t)),(t=>this.blur(t)))}get componentName(){return this._container.componentType}get componentType(){return this._container.componentType}get reorderEnabled(){return this._reorderEnabled}get initialWantMaximise(){return this._initialWantMaximise}get component(){return this._container.component}get container(){return this._container}get parentItem(){return this._parentItem}get headerConfig(){return this._headerConfig}get title(){return this._title}get tab(){return this._tab}get focused(){return this._focused}destroy(){this._container.destroy(),super.destroy()}applyUpdatableConfig(t){this.setTitle(t.title),this._headerConfig=t.header}toConfig(){const t=this._container.stateRequestEvent,e=void 0===t?this._container.state:t();return{type:at.component,content:[],size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,maximised:!1,isClosable:this.isClosable,reorderEnabled:this._reorderEnabled,title:this._title,header:mt.Header.createCopy(this._headerConfig),componentType:pt.copyComponentType(this.componentType),componentState:e}}close(){if(null===this.parent)throw new K(\"CIC68883\");this.parent.removeChild(this,!1)}enterDragMode(t,e){Tt(this.element,t),At(this.element,e),this._container.enterDragMode(t,e)}exitDragMode(){this._container.exitDragMode()}enterStackMaximised(){this._container.enterStackMaximised()}exitStackMaximised(){this._container.exitStackMaximised()}drag(){this._container.drag()}updateSize(t){this.updateNodeSize(t)}init(){this.updateNodeSize(!1),super.init(),this._container.emit(\"open\"),this.initContentItems()}setTitle(t){this._title=t,this.emit(\"titleChanged\",t),this.emit(\"stateChanged\")}setTab(t){this._tab=t,this.emit(\"tab\",t),this._container.setTab(t)}hide(){super.hide(),this._container.setVisibility(!1)}show(){super.show(),this._container.setVisibility(!0)}focus(t=!1){this.parentItem.setActiveComponentItem(this,!0,t)}setFocused(t){this._focused=!0,this.tab.setFocused(),t||this.emitBaseBubblingEvent(\"focus\")}blur(t=!1){this._focused&&this.layoutManager.setFocusedComponentItem(void 0,t)}setBlurred(t){this._focused=!1,this.tab.setBlurred(),t||this.emitBaseBubblingEvent(\"blur\")}setParent(t){this._parentItem=t,super.setParent(t)}handleUpdateItemConfigEvent(t){this.applyUpdatableConfig(t)}updateNodeSize(t){if(\"none\"!==this.element.style.display){const{width:e,height:i}=kt(this.element);this._container.setSizeToNodeSize(e,i,t)}}}class $t extends Gt{constructor(){super(...arguments),this._focused=!1}get focused(){return this._focused}setFocusedValue(t){this._focused=t}}class Zt extends Wt{constructor(t,e){super(),this._eElement=t,this._pointerTracking=!1,this._pointerDownEventListener=t=>this.onPointerDown(t),this._pointerMoveEventListener=t=>this.onPointerMove(t),this._pointerUpEventListener=t=>this.onPointerUp(t),this._timeout=void 0,this._allowableTargets=[t,...e],this._oDocument=document,this._eBody=document.body,this._nDelay=1800,this._nDistance=10,this._nX=0,this._nY=0,this._nOriginalX=0,this._nOriginalY=0,this._dragging=!1,this._eElement.addEventListener(\"pointerdown\",this._pointerDownEventListener,{passive:!0})}destroy(){this.checkRemovePointerTrackingEventListeners(),this._eElement.removeEventListener(\"pointerdown\",this._pointerDownEventListener)}cancelDrag(){this.processDragStop(void 0)}onPointerDown(t){if(this._allowableTargets.includes(t.target)&&t.isPrimary){const e=this.getPointerCoordinates(t);this.processPointerDown(e)}}processPointerDown(t){this._nOriginalX=t.x,this._nOriginalY=t.y,this._oDocument.addEventListener(\"pointermove\",this._pointerMoveEventListener),this._oDocument.addEventListener(\"pointerup\",this._pointerUpEventListener,{passive:!0}),this._pointerTracking=!0,this._timeout=setTimeout((()=>{try{this.startDrag()}catch(t){throw console.error(t),t}}),this._nDelay)}onPointerMove(t){this._pointerTracking&&(this.processDragMove(t),t.preventDefault())}processDragMove(t){this._nX=t.pageX-this._nOriginalX,this._nY=t.pageY-this._nOriginalY,!1===this._dragging&&(Math.abs(this._nX)>this._nDistance||Math.abs(this._nY)>this._nDistance)&&this.startDrag(),this._dragging&&this.emit(\"drag\",this._nX,this._nY,t)}onPointerUp(t){this.processDragStop(t)}processDragStop(t){var e;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this.checkRemovePointerTrackingEventListeners(),!0===this._dragging&&(this._eBody.classList.remove(\"lm_dragging\"),this._eElement.classList.remove(\"lm_dragging\"),null===(e=this._oDocument.querySelector(\"iframe\"))||void 0===e||e.style.setProperty(\"pointer-events\",\"\"),this._dragging=!1,this.emit(\"dragStop\",t))}checkRemovePointerTrackingEventListeners(){this._pointerTracking&&(this._oDocument.removeEventListener(\"pointermove\",this._pointerMoveEventListener),this._oDocument.removeEventListener(\"pointerup\",this._pointerUpEventListener),this._pointerTracking=!1)}startDrag(){var t;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this._dragging=!0,this._eBody.classList.add(\"lm_dragging\"),this._eElement.classList.add(\"lm_dragging\"),null===(t=this._oDocument.querySelector(\"iframe\"))||void 0===t||t.style.setProperty(\"pointer-events\",\"none\"),this.emit(\"dragStart\",this._nOriginalX,this._nOriginalY)}getPointerCoordinates(t){return{x:t.pageX,y:t.pageY}}}class qt{constructor(t,e,i){this._isVertical=t,this._size=e,this._grabSize=i0){const i=this.createSplitter(Math.max(0,e-1)).element;e>0?(this.contentItems[e-1].element.insertAdjacentElement(\"afterend\",i),i.insertAdjacentElement(\"afterend\",t.element)):(this.contentItems[0].element.insertAdjacentElement(\"beforebegin\",i),i.insertAdjacentElement(\"beforebegin\",t.element))}else this._childElementContainer.appendChild(t.element);super.addChild(t,e);const n=1/this.contentItems.length*100;if(!0===i)return this.emitBaseBubblingEvent(\"stateChanged\"),e;for(let e=0;e0&&(this.calculateRelativeSizes(),this.setAbsoluteSizes()),this.emitBaseBubblingEvent(\"stateChanged\"),this.emit(\"resize\")}setAbsoluteSizes(){const t=this.calculateAbsoluteSizes();for(let e=0;e0&&t.itemSizes[e]++,this._isColumn?(Tt(this.contentItems[e].element,t.crossAxisSize),At(this.contentItems[e].element,t.itemSizes[e])):(Tt(this.contentItems[e].element,t.itemSizes[e]),At(this.contentItems[e].element,t.crossAxisSize))}calculateAbsoluteSizes(){const t=(this.contentItems.length-1)*this._splitterSize,{width:e,height:i}=kt(this.element);let n,o;this._isColumn?(n=i-t,o=e):(n=e-t,o=i);let s=0;const r=[];for(let t=0;t0){const n=100-t;for(let t=0;t100&&e.length>0){for(let t=0;te)return;{const r=i/e;let a=i;for(let e=0;ethis.onSplitterDrag(e,t,i))),e.on(\"dragStop\",(()=>this.onSplitterDragStop(e))),e.on(\"dragStart\",(()=>this.onSplitterDragStart(e))),this._splitter.splice(t,0,e),e}getSplitItems(t){const e=this._splitter.indexOf(t);return{before:this.contentItems[e],after:this.contentItems[e+1]}}calculateContentItemMinSize(t){const e=t.minSize;if(void 0!==e){if(t.minSizeUnit===ht.Pixel)return e;throw new X(\"ROCGMD98831\",JSON.stringify(t))}{const t=this.layoutManager.layoutConfig.dimensions;return this._isColumn?t.defaultMinItemHeight:t.defaultMinItemWidth}}calculateContentItemsTotalMinSize(t){let e=0;for(const i of t)e+=this.calculateContentItemMinSize(i);return e}onSplitterDragStart(t){const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=this.calculateContentItemsTotalMinSize(e.before.contentItems),s=this.calculateContentItemsTotalMinSize(e.after.contentItems);this._splitterPosition=0,this._splitterMinPosition=-1*(i-o),this._splitterMaxPosition=n-s}onSplitterDrag(t,e,i){let n=this._isColumn?i:e;if(null===this._splitterMinPosition||null===this._splitterMaxPosition)throw new K(\"ROCOSD59226\");n=Math.max(n,this._splitterMinPosition),n=Math.min(n,this._splitterMaxPosition),this._splitterPosition=n;const o=zt(n);this._isColumn?t.element.style.top=o:t.element.style.left=o}onSplitterDragStop(t){if(null===this._splitterPosition)throw new K(\"ROCOSDS66932\");{const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=(this._splitterPosition+i)/(i+n),s=e.before.size+e.after.size;e.before.size=o*s,e.after.size=(1-o)*s,t.element.style.top=zt(0),t.element.style.left=zt(0),globalThis.requestAnimationFrame((()=>this.updateSize(!1)))}}}!function(t){t.getElementDimensionSize=function(t,e){return\"width\"===e?function(t){return t.offsetWidth}(t):function(t){return t.offsetHeight}(t)},t.setElementDimensionSize=function(t,e,i){return\"width\"===e?Tt(t,i):At(t,i)},t.createElement=function(t,e){const i=t.createElement(\"div\");return i.classList.add(\"lm_item\"),e?i.classList.add(\"lm_column\"):i.classList.add(\"lm_row\"),i}}(Xt||(Xt={}));class Yt extends $t{constructor(t,e,i){super(t,vt.create(e),null,Yt.createElement(document)),this.isGround=!0,this._childElementContainer=this.element,this._containerElement=i;let n=null;for(;;){const t=n?n.previousSibling:this._containerElement.lastChild;if(!(t instanceof Element&&t.classList.contains(\"lm_content\")))break;n=t}this._containerElement.insertBefore(this.element,n)}init(){if(!0!==this.isInitialised){this.updateNodeSize();for(let t=0;t0?this.contentItems[0]:this,n.isComponent)throw new Error(\"Cannot add item as child to ComponentItem\");{const t=this.layoutManager.createAndInitContentItem(i,n);return e=n.addChild(t,e),n===this?-1:e}}loadComponentAsRoot(t){this.clearRoot();const e=Ct.resolve(t,!1);if(e.maximised)throw new Error(\"Root Component cannot be maximised\");{const t=new jt(this.layoutManager,e,this);t.init(),this.addChild(t,0)}}addChild(t,e){if(this.contentItems.length>0)throw new Error(\"Ground node can only have a single child\");return this._childElementContainer.appendChild(t.element),e=super.addChild(t,e),this.updateSize(!1),this.emitBaseBubblingEvent(\"stateChanged\"),e}calculateConfigContent(){const t=this.contentItems,e=t.length,i=new Array(e);for(let n=0;n0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e)),this.updateContentItemsSize(!1))}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}createSideAreas(){const t=Yt.Area.oppositeSides,e=new Array(Object.keys(t).length);let i=0;for(const n in t){const o=n,s=this.getElementArea();if(null===s)throw new K(\"RCSA77553\");s.side=o,\"2\"===t[o][1]?s[o]=s[t[o]]-50:s[o]=s[t[o]]+50,s.surface=(s.x2-s.x1)*(s.y2-s.y1),e[i++]=s}return e}highlightDropZone(t,e,i){this.layoutManager.tabDropPlaceholder.remove(),super.highlightDropZone(t,e,i)}onDrop(t,e){if(t.isComponent){const e=ut.createDefault(),i=t;e.header=mt.Header.createCopy(i.headerConfig);const n=this.layoutManager.createAndInitContentItem(e,this);n.addChild(t),t=n}if(0===this.contentItems.length)this.addChild(t);else{if(t.type===at.row||t.type===at.column){const e=ut.createDefault(),i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}const i=\"x\"==e.side[0]?at.row:at.column,n=\"2\"==e.side[1],o=this.contentItems[0];if(o instanceof Xt&&o.type===i){const e=o.contentItems[n?0:o.contentItems.length-1];o.addChild(t,n?0:void 0,!0),e.size*=.5,t.size=e.size,t.sizeUnit=ht.Percent,o.updateSize(!1)}else{const e=ct.createDefault(i),s=this.layoutManager.createContentItem(e,this);this.replaceChild(o,s),s.addChild(t,n?0:void 0,!0),s.addChild(o,n?void 0:0,!0),o.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}}dock(){throw new X(\"GID87731\")}validateDocking(){throw new X(\"GIVD87732\")}getAllContentItems(){const t=[this];return this.deepGetAllContentItems(this.contentItems,t),t}getConfigMaximisedItems(){const t=[];return this.deepFilterContentItems(this.contentItems,t,(t=>!(!Gt.isStack(t)||!t.initialWantMaximise)||!(!Gt.isComponentItem(t)||!t.initialWantMaximise))),t}getItemsByPopInParentId(t){const e=[];return this.deepFilterContentItems(this.contentItems,e,(e=>e.popInParentIds.includes(t))),e}toConfig(){throw new Error(\"Cannot generate GroundItem config\")}setActiveComponentItem(t,e,i){}updateNodeSize(){const{width:t,height:e}=kt(this._containerElement);Tt(this.element,t),At(this.element,e),this.contentItems.length>0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e))}deepGetAllContentItems(t,e){for(let i=0;ithis.onClick(t),this._touchStartEventListener=t=>this.onTouchStart(t),this._element=document.createElement(\"div\"),this._element.classList.add(i),this._element.title=e,this._header.on(\"destroy\",(()=>this.destroy())),this._element.addEventListener(\"click\",this._clickEventListener,{passive:!0}),this._element.addEventListener(\"touchstart\",this._touchStartEventListener,{passive:!0}),this._header.controlsContainerElement.appendChild(this._element)}get element(){return this._element}destroy(){var t;this._element.removeEventListener(\"click\",this._clickEventListener),this._element.removeEventListener(\"touchstart\",this._touchStartEventListener),null===(t=this._element.parentNode)||void 0===t||t.removeChild(this._element)}onClick(t){this._pushEvent(t)}onTouchStart(t){this._pushEvent(t)}}class Jt{constructor(t,e,i,n,o){var s;this._layoutManager=t,this._componentItem=e,this._closeEvent=i,this._focusEvent=n,this._dragStartEvent=o,this._isActive=!1,this._tabClickListener=t=>this.onTabClickDown(t),this._tabTouchStartListener=t=>this.onTabTouchStart(t),this._closeClickListener=()=>this.onCloseClick(),this._closeTouchStartListener=()=>this.onCloseTouchStart(),this._dragStartListener=(t,e)=>this.onDragStart(t,e),this._contentItemDestroyListener=()=>this.onContentItemDestroy(),this._tabTitleChangedListener=t=>this.setTitle(t),this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_tab\"),this._titleElement=document.createElement(\"span\"),this._titleElement.classList.add(\"lm_title\"),this._closeElement=document.createElement(\"div\"),this._closeElement.classList.add(\"lm_close_tab\"),this._element.appendChild(this._titleElement),this._element.appendChild(this._closeElement),e.isClosable?this._closeElement.style.display=\"\":this._closeElement.style.display=\"none\",this.setTitle(e.title),this._componentItem.on(\"titleChanged\",this._tabTitleChangedListener);(null!==(s=e.reorderEnabled)&&void 0!==s?s:this._layoutManager.layoutConfig.settings.reorderEnabled)&&this.enableReorder(),this._element.addEventListener(\"click\",this._tabClickListener,{passive:!0}),this._element.addEventListener(\"touchstart\",this._tabTouchStartListener,{passive:!0}),this._componentItem.isClosable?(this._closeElement.addEventListener(\"click\",this._closeClickListener,{passive:!0}),this._closeElement.addEventListener(\"touchstart\",this._closeTouchStartListener,{passive:!0})):(this._closeElement.remove(),this._closeElement=void 0),this._componentItem.setTab(this),this._layoutManager.emit(\"tabCreated\",this)}get isActive(){return this._isActive}get componentItem(){return this._componentItem}get contentItem(){return this._componentItem}get element(){return this._element}get titleElement(){return this._titleElement}get closeElement(){return this._closeElement}get reorderEnabled(){return void 0!==this._dragListener}set reorderEnabled(t){t!==this.reorderEnabled&&(t?this.enableReorder():this.disableReorder())}setTitle(t){this._titleElement.innerText=t,this._element.title=t}setActive(t){t!==this._isActive&&(this._isActive=t,t?this._element.classList.add(\"lm_active\"):this._element.classList.remove(\"lm_active\"))}destroy(){var t,e;this._closeEvent=void 0,this._focusEvent=void 0,this._dragStartEvent=void 0,this._element.removeEventListener(\"click\",this._tabClickListener),this._element.removeEventListener(\"touchstart\",this._tabTouchStartListener),null===(t=this._closeElement)||void 0===t||t.removeEventListener(\"click\",this._closeClickListener),null===(e=this._closeElement)||void 0===e||e.removeEventListener(\"touchstart\",this._closeTouchStartListener),this._componentItem.off(\"titleChanged\",this._tabTitleChangedListener),this.reorderEnabled&&this.disableReorder(),this._element.remove()}setBlurred(){this._element.classList.remove(\"lm_focused\"),this._titleElement.classList.remove(\"lm_focused\")}setFocused(){this._element.classList.add(\"lm_focused\"),this._titleElement.classList.add(\"lm_focused\")}onDragStart(t,e){if(void 0===this._dragListener)throw new J(\"TODSDLU10093\");if(void 0===this._dragStartEvent)throw new J(\"TODS23309\");this._dragStartEvent(t,e,this._dragListener,this.componentItem)}onContentItemDestroy(){void 0!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=void 0)}onTabClickDown(t){const e=t.target;e!==this._element&&e!==this._titleElement||(0===t.button?this.notifyFocus():1===t.button&&this._componentItem.isClosable&&this.notifyClose())}onTabTouchStart(t){t.target===this._element&&this.notifyFocus()}onCloseClick(){this.notifyClose()}onCloseTouchStart(){this.notifyClose()}notifyClose(){if(void 0===this._closeEvent)throw new J(\"TNC15007\");this._closeEvent(this._componentItem)}notifyFocus(){if(void 0===this._focusEvent)throw new J(\"TNA15007\");this._focusEvent(this._componentItem)}enableReorder(){this._dragListener=new Zt(this._element,[this._titleElement]),this._dragListener.on(\"dragStart\",this._dragStartListener),this._componentItem.on(\"destroy\",this._contentItemDestroyListener)}disableReorder(){if(void 0===this._dragListener)throw new J(\"TDR87745\");this._componentItem.off(\"destroy\",this._contentItemDestroyListener),this._dragListener.off(\"dragStart\",this._dragStartListener),this._dragListener=void 0}}class Qt{constructor(t,e,i,n,o){this._layoutManager=t,this._componentRemoveEvent=e,this._componentFocusEvent=i,this._componentDragStartEvent=n,this._dropdownActiveChangedEvent=o,this._tabs=[],this._lastVisibleTabIndex=-1,this._dropdownActive=!1,this._element=document.createElement(\"section\"),this._element.classList.add(\"lm_tabs\"),this._dropdownElement=document.createElement(\"section\"),this._dropdownElement.classList.add(\"lm_tabdropdown_list\"),this._dropdownElement.style.display=\"none\"}get tabs(){return this._tabs}get tabCount(){return this._tabs.length}get lastVisibleTabIndex(){return this._lastVisibleTabIndex}get element(){return this._element}get dropdownElement(){return this._dropdownElement}get dropdownActive(){return this._dropdownActive}destroy(){for(let t=0;tthis.handleTabCloseEvent(t)),(t=>this.handleTabFocusEvent(t)),((t,e,i,n)=>this.handleTabDragStartEvent(t,e,i,n)));void 0===e&&(e=this._tabs.length),this._tabs.splice(e,0,i),ethis._lastVisibleTabIndex){const t=this._tabs[e];for(let t=e;t>0;t--)this._tabs[t]=this._tabs[t-1];this._tabs[0]=t}}updateTabSizes(t,e){let i=!1;this.tryUpdateTabSizes(i,t,e)||(i=!0,this.tryUpdateTabSizes(i,t,e)),i!==this._dropdownActive&&(this._dropdownActive=i,this._dropdownActiveChangedEvent())}tryUpdateTabSizes(t,e,i){if(this._tabs.length>0){if(void 0===i)throw new Error(\"non-empty tabs must have active component item\");let n=0,o=!1;const s=this._layoutManager.layoutConfig.settings.tabOverlapAllowance,r=this._tabs.indexOf(i.tab),a=this._tabs[r];this._lastVisibleTabIndex=-1;for(let i=0;ie){if(o)i===r&&(l.style.zIndex=\"auto\",l.style.marginLeft=\"\",l.parentElement!==this._element&&this._element.appendChild(l));else{let t;if(t=r>0&&r<=i?(d-e)/(i-1):(d-e)/i,tthis.onClick(t),this._touchStartListener=t=>this.onTouchStart(t),this._rowColumnClosable=!0,this._closeButton=null,this._popoutButton=null,this._tabsContainer=new Qt(this._layoutManager,(t=>this.handleTabInitiatedComponentRemoveEvent(t)),(t=>this.handleTabInitiatedComponentFocusEvent(t)),((t,e,i,n)=>this.handleTabInitiatedDragStartEvent(t,e,i,n)),(()=>this.processTabDropdownActiveChanged())),this._show=i.show,this._popoutEnabled=i.popoutEnabled,this._popoutLabel=i.popoutLabel,this._maximiseEnabled=i.maximiseEnabled,this._maximiseLabel=i.maximiseLabel,this._minimiseEnabled=i.minimiseEnabled,this._minimiseLabel=i.minimiseLabel,this._closeEnabled=i.closeEnabled,this._closeLabel=i.closeLabel,this._tabDropdownEnabled=i.tabDropdownEnabled,this._tabDropdownLabel=i.tabDropdownLabel,this.setSide(i.side),this._canRemoveComponent=this._configClosable,this._element=document.createElement(\"section\"),this._element.classList.add(\"lm_header\"),this._controlsContainerElement=document.createElement(\"section\"),this._controlsContainerElement.classList.add(\"lm_controls\"),this._element.appendChild(this._tabsContainer.element),this._element.appendChild(this._controlsContainerElement),this._element.appendChild(this._tabsContainer.dropdownElement),this._element.addEventListener(\"click\",this._clickListener,{passive:!0}),this._element.addEventListener(\"touchstart\",this._touchStartListener,{passive:!0}),this._documentMouseUpListener=()=>this._tabsContainer.hideAdditionalTabsDropdown(),globalThis.document.addEventListener(\"mouseup\",this._documentMouseUpListener,{passive:!0}),this._tabControlOffset=this._layoutManager.layoutConfig.settings.tabControlOffset,this._tabDropdownEnabled&&(this._tabDropdownButton=new Kt(this,this._tabDropdownLabel,\"lm_tabdropdown\",(()=>this._tabsContainer.showAdditionalTabsDropdown()))),this._popoutEnabled&&(this._popoutButton=new Kt(this,this._popoutLabel,\"lm_popout\",(()=>this.handleButtonPopoutEvent()))),this._maximiseEnabled&&(this._maximiseButton=new Kt(this,this._maximiseLabel,\"lm_maximise\",(t=>this.handleButtonMaximiseToggleEvent(t)))),this._configClosable&&(this._closeButton=new Kt(this,this._closeLabel,\"lm_close\",(()=>s()))),this.processTabDropdownActiveChanged()}get show(){return this._show}get side(){return this._side}get leftRightSided(){return this._leftRightSided}get layoutManager(){return this._layoutManager}get parent(){return this._parent}get tabs(){return this._tabsContainer.tabs}get lastVisibleTabIndex(){return this._tabsContainer.lastVisibleTabIndex}get element(){return this._element}get tabsContainerElement(){return this._tabsContainer.element}get controlsContainerElement(){return this._controlsContainerElement}destroy(){this.emit(\"destroy\"),this._popoutEvent=void 0,this._maximiseToggleEvent=void 0,this._clickEvent=void 0,this._touchStartEvent=void 0,this._componentRemoveEvent=void 0,this._componentFocusEvent=void 0,this._componentDragStartEvent=void 0,this._tabsContainer.destroy(),globalThis.document.removeEventListener(\"mouseup\",this._documentMouseUpListener),this._element.remove()}createTab(t,e){this._tabsContainer.createTab(t,e)}removeTab(t){this._tabsContainer.removeTab(t)}processActiveComponentChanged(t){this._tabsContainer.processActiveComponentChanged(t),this.updateTabSizes()}setSide(t){this._side=t,this._leftRightSided=[nt.right,nt.left].includes(this._side)}setRowColumnClosable(t){this._rowColumnClosable=t,this.updateClosability()}updateClosability(){let t;if(this._configClosable)if(this._rowColumnClosable){t=!0;const e=this.tabs.length;for(let i=0;i1}applyFocusedValue(t){t?this._element.classList.add(\"lm_focused\"):this._element.classList.remove(\"lm_focused\")}processMaximised(){if(void 0===this._maximiseButton)throw new J(\"HPMAX16997\");this._maximiseButton.element.setAttribute(\"title\",this._minimiseLabel)}processMinimised(){if(void 0===this._maximiseButton)throw new J(\"HPMIN16997\");this._maximiseButton.element.setAttribute(\"title\",this._maximiseLabel)}updateTabSizes(){if(this._tabsContainer.tabCount>0){const t=this._show?this._layoutManager.layoutConfig.dimensions.headerHeight:0;let e;this._leftRightSided?(this._element.style.height=\"\",this._element.style.width=zt(t)):(this._element.style.width=\"\",this._element.style.height=zt(t)),e=this._leftRightSided?this._element.offsetHeight-this._controlsContainerElement.offsetHeight-this._tabControlOffset:this._element.offsetWidth-this._controlsContainerElement.offsetWidth-this._tabControlOffset,this._tabsContainer.updateTabSizes(e,this._getActiveComponentItemEvent())}}handleTabInitiatedComponentRemoveEvent(t){if(this._canRemoveComponent){if(void 0===this._componentRemoveEvent)throw new J(\"HHTCE22294\");this._componentRemoveEvent(t)}}handleTabInitiatedComponentFocusEvent(t){if(void 0===this._componentFocusEvent)throw new J(\"HHTAE22294\");this._componentFocusEvent(t)}handleTabInitiatedDragStartEvent(t,e,i,n){if(this._canRemoveComponent){if(void 0===this._componentDragStartEvent)throw new J(\"HHTDSE22294\");this._componentDragStartEvent(t,e,i,n)}else i.cancelDrag()}processTabDropdownActiveChanged(){void 0!==this._tabDropdownButton&&Dt(this._tabDropdownButton.element,this._tabsContainer.dropdownActive)}handleButtonPopoutEvent(){if(this._layoutManager.layoutConfig.settings.popoutWholeStack){if(void 0===this._popoutEvent)throw new J(\"HHBPOE17834\");this._popoutEvent()}else{const t=this._getActiveComponentItemEvent();t&&t.popout()}}handleButtonMaximiseToggleEvent(t){if(void 0===this._maximiseToggleEvent)throw new J(\"HHBMTE16834\");this._maximiseToggleEvent()}onClick(t){t.target===this._element&&this.notifyClick(t)}onTouchStart(t){t.target===this._element&&this.notifyTouchStart(t)}notifyClick(t){if(void 0===this._clickEvent)throw new J(\"HNHC46834\");this._clickEvent(t)}notifyTouchStart(t){if(void 0===this._touchStartEvent)throw new J(\"HNHTS46834\");this._touchStartEvent(t)}}class ee extends $t{constructor(t,e,i){var n,o,s,r,a,l,h,d,c,m,u,p,g,f,v,_,y,C,w;super(t,e,i,ee.createElement(document)),this._headerSideChanged=!1,this._resizeListener=()=>this.handleResize(),this._maximisedListener=()=>this.handleMaximised(),this._minimisedListener=()=>this.handleMinimised(),this._headerConfig=e.header;const I=t.layoutConfig.header,b=e.content;let S;if(1!==b.length)S=void 0;else{S=b[0].header}this._initialWantMaximise=e.maximised,this._initialActiveItemIndex=null!==(n=e.activeItemIndex)&&void 0!==n?n:0;const E=null!==(r=null!==(s=null===(o=this._headerConfig)||void 0===o?void 0:o.show)&&void 0!==s?s:null==S?void 0:S.show)&&void 0!==r?r:I.show,x=null!==(h=null!==(l=null===(a=this._headerConfig)||void 0===a?void 0:a.popout)&&void 0!==l?l:null==S?void 0:S.popout)&&void 0!==h?h:I.popout,L=null!==(m=null!==(c=null===(d=this._headerConfig)||void 0===d?void 0:d.maximise)&&void 0!==c?c:null==S?void 0:S.maximise)&&void 0!==m?m:I.maximise,z=null!==(g=null!==(p=null===(u=this._headerConfig)||void 0===u?void 0:u.close)&&void 0!==p?p:null==S?void 0:S.close)&&void 0!==g?g:I.close,M=null!==(_=null!==(v=null===(f=this._headerConfig)||void 0===f?void 0:f.minimise)&&void 0!==v?v:null==S?void 0:S.minimise)&&void 0!==_?_:I.minimise,P=null!==(w=null!==(C=null===(y=this._headerConfig)||void 0===y?void 0:y.tabDropdown)&&void 0!==C?C:null==S?void 0:S.tabDropdown)&&void 0!==w?w:I.tabDropdown;this._maximisedEnabled=!1!==L;const T={show:!1!==E,side:!1===E?nt.top:E,popoutEnabled:!1!==x,popoutLabel:!1===x?\"\":x,maximiseEnabled:this._maximisedEnabled,maximiseLabel:!1===L?\"\":L,closeEnabled:!1!==z,closeLabel:!1===z?\"\":z,minimiseEnabled:!0,minimiseLabel:M,tabDropdownEnabled:!1!==P,tabDropdownLabel:!1===P?\"\":P};this._header=new te(t,this,T,e.isClosable&&!1!==z,(()=>this.getActiveComponentItem()),(()=>this.remove()),(()=>this.handlePopoutEvent()),(()=>this.toggleMaximise()),(t=>this.handleHeaderClickEvent(t)),(t=>this.handleHeaderTouchStartEvent(t)),(t=>this.handleHeaderComponentRemoveEvent(t)),(t=>this.handleHeaderComponentFocusEvent(t)),((t,e,i,n)=>this.handleHeaderComponentStartDragEvent(t,e,i,n))),this.isStack=!0,this._childElementContainer=document.createElement(\"section\"),this._childElementContainer.classList.add(\"lm_items\"),this.on(\"resize\",this._resizeListener),this._maximisedEnabled&&(this.on(\"maximised\",this._maximisedListener),this.on(\"minimised\",this._minimisedListener)),this.element.appendChild(this._header.element),this.element.appendChild(this._childElementContainer),this.setupHeaderPosition(),this._header.updateClosability()}get childElementContainer(){return this._childElementContainer}get header(){return this._header}get headerShow(){return this._header.show}get headerSide(){return this._header.side}get headerLeftRightSided(){return this._header.leftRightSided}get contentAreaDimensions(){return this._contentAreaDimensions}get initialWantMaximise(){return this._initialWantMaximise}get isMaximised(){return this===this.layoutManager.maximisedStack}get stackParent(){if(!this.parent)throw new Error(\"Stack should always have a parent\");return this.parent}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}init(){if(!0===this.isInitialised)return;this.updateNodeSize();for(let t=0;t0){if(this._initialActiveItemIndex<0||this._initialActiveItemIndex>=e)throw new Error(`ActiveItemIndex out of range: ${this._initialActiveItemIndex} id: ${this.id}`);for(let i=0;ithis.contentItems.length)throw e-=1,new X(\"SAC99728\");if(t instanceof jt)return e=super.addChild(t,e),this._childElementContainer.appendChild(t.element),this._header.createTab(t,e),this.setActiveComponentItem(t,i),this._header.updateTabSizes(),this.updateSize(!1),t.container.setBaseLogicalZIndex(),this._header.updateClosability(),this.emitStateChangedEvent(),e;throw new X(\"SACC88532\")}removeChild(t,e){const i=t,n=this.contentItems.indexOf(i),o=1===this.contentItems.length;if(this._activeComponentItem===i&&(i.focused&&i.blur(),!o)){const t=0===n?1:n-1;this.setActiveComponentItem(this.contentItems[t],!1)}this._header.removeTab(i),super.removeChild(i,e),o||this._header.updateClosability(),this.emitStateChangedEvent()}toggleMaximise(){this.isMaximised?this.minimise():this.maximise()}maximise(){if(!this.isMaximised){this.layoutManager.setMaximisedStack(this);const t=this.contentItems,e=t.length;for(let i=0;i0&&void 0===t)throw new Error(\"expected non-empty stack to have an active component item\");return{type:\"stack\",content:this.calculateConfigContent(),size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,isClosable:this.isClosable,maximised:this.isMaximised,header:this.createHeaderConfig(),activeItemIndex:t}}onDrop(t,e){if(\"header\"===this._dropSegment){if(this.resetHeaderDropZone(),void 0===this._dropIndex)throw new J(\"SODDI68990\");return void this.addChild(t,this._dropIndex)}if(\"body\"===this._dropSegment)return void this.addChild(t,0,!0);const i=\"top\"===this._dropSegment||\"bottom\"===this._dropSegment,n=\"left\"===this._dropSegment||\"right\"===this._dropSegment,o=\"top\"===this._dropSegment||\"left\"===this._dropSegment,s=i&&this.stackParent.isColumn||n&&this.stackParent.isRow;if(t.isComponent){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createAndInitContentItem(e,this);i.addChild(t),t=i}if(t.type===at.row||t.type===at.column){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}if(s){const e=this.stackParent.contentItems.indexOf(this);this.stackParent.addChild(t,o?e:e+1,!0),this.size*=.5,t.size=this.size,t.sizeUnit=this.sizeUnit,this.stackParent.updateSize(!1)}else{const e=i?at.column:at.row,n=ct.createDefault(e),s=this.layoutManager.createContentItem(n,this);this.stackParent.replaceChild(this,s),s.addChild(t,o?0:void 0,!0),s.addChild(this,o?void 0:0,!0),this.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}highlightDropZone(t,e){for(const i in this._contentAreaDimensions){const n=i,o=this._contentAreaDimensions[n].hoverArea;if(o.x1t&&o.y1e)return void(\"header\"===n?(this._dropSegment=\"header\",this.highlightHeaderDropZone(this._header.leftRightSided?e:t)):(this.resetHeaderDropZone(),this.highlightBodyDropZone(n)))}}getArea(){if(\"none\"===this.element.style.display)return null;const t=super.getElementArea(this._header.element),e=super.getElementArea(this._childElementContainer);if(null===t||null===e)throw new K(\"SGAHC13086\");const i=e.x2-e.x1,n=e.y2-e.y1;return this._contentAreaDimensions={header:{hoverArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2},highlightArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2}}},0===this.contentItems.length?(this._contentAreaDimensions.body={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2}},super.getElementArea(this.element)):(this._contentAreaDimensions.left={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x1+.25*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x1+.5*i,y2:e.y2}},this._contentAreaDimensions.top={hoverArea:{x1:e.x1+.25*i,y1:e.y1,x2:e.x1+.75*i,y2:e.y1+.5*n},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y1+.5*n}},this._contentAreaDimensions.right={hoverArea:{x1:e.x1+.75*i,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1+.5*i,y1:e.y1,x2:e.x2,y2:e.y2}},this._contentAreaDimensions.bottom={hoverArea:{x1:e.x1+.25*i,y1:e.y1+.5*n,x2:e.x1+.75*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1+.5*n,x2:e.x2,y2:e.y2}},super.getElementArea(this.element))}positionHeader(t){this._header.side!==t&&(this._header.setSide(t),this._headerSideChanged=!0,this.setupHeaderPosition())}updateNodeSize(){if(\"none\"!==this.element.style.display){const t=kt(this.element);if(this._header.show){t[this._header.leftRightSided?it.width:it.height]-=this.layoutManager.layoutConfig.dimensions.headerHeight}this._childElementContainer.style.width=zt(t.width),this._childElementContainer.style.height=zt(t.height);for(let e=0;e=o&&tthis.onDrag(t,e,i))),this._dragListener.on(\"dragStop\",(()=>this.onDrop())),this.createDragProxyElements(t,e),null===this._componentItem.parent)throw new K(\"DPC10097\");this._componentItemFocused=this._componentItem.focused,this._componentItemFocused&&this._componentItem.blur(),this._componentItem.parent.removeChild(this._componentItem,!0),this.setDimensions(),document.body.appendChild(this._element),this.determineMinMaxXY(),this._layoutManager.calculateItemAreas(),this.setDropPosition(t,e)}get element(){return this._element}createDragProxyElements(t,e){this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_dragProxy\");const i=document.createElement(\"div\");i.classList.add(\"lm_header\");const n=document.createElement(\"div\");n.classList.add(\"lm_tabs\");const o=document.createElement(\"div\");o.classList.add(\"lm_tab\");const s=document.createElement(\"span\");s.classList.add(\"lm_title\"),o.appendChild(s),n.appendChild(o),i.appendChild(n),this._proxyContainerElement=document.createElement(\"div\"),this._proxyContainerElement.classList.add(\"lm_content\"),this._element.appendChild(i),this._element.appendChild(this._proxyContainerElement),this._originalParent instanceof ee&&this._originalParent.headerShow&&(this._sided=this._originalParent.headerLeftRightSided,this._element.classList.add(\"lm_\"+this._originalParent.headerSide),[nt.right,nt.bottom].indexOf(this._originalParent.headerSide)>=0&&this._proxyContainerElement.insertAdjacentElement(\"afterend\",i)),this._element.style.left=zt(t),this._element.style.top=zt(e),o.setAttribute(\"title\",this._componentItem.title),s.insertAdjacentText(\"afterbegin\",this._componentItem.title),this._proxyContainerElement.appendChild(this._componentItem.element)}determineMinMaxXY(){const t=this._layoutManager.groundItem;if(void 0===t)throw new J(\"DPDMMXY73109\");{const e=t.element.getBoundingClientRect();this._minX=e.left+document.body.scrollLeft,this._minY=e.top+document.body.scrollTop,this._maxX=this._minX+e.width,this._maxY=this._minY+e.height}}onDrag(t,e,i){const n=i.pageX,o=i.pageY;this.setDropPosition(n,o),this._componentItem.drag()}setDropPosition(t,e){this._layoutManager.layoutConfig.settings.constrainDragToContainer&&(t<=this._minX?t=Math.ceil(this._minX):t>=this._maxX&&(t=Math.floor(this._maxX)),e<=this._minY?e=Math.ceil(this._minY):e>=this._maxY&&(e=Math.floor(this._maxY))),this._element.style.left=zt(t),this._element.style.top=zt(e),this._area=this._layoutManager.getArea(t,e),null!==this._area&&(this._lastValidArea=this._area,this._area.contentItem.highlightDropZone(t,e,this._area))}onDrop(){const t=this._layoutManager.dropTargetIndicator;if(null===t)throw new K(\"DPOD30011\");let e;if(t.hide(),this._componentItem.exitDragMode(),null!==this._area)e=this._componentItem,this._area.contentItem.onDrop(e,this._area);else if(null!==this._lastValidArea){e=this._componentItem;this._lastValidArea.contentItem.onDrop(e,this._lastValidArea)}else this._originalParent?(e=this._componentItem,this._originalParent.addChild(e)):this._componentItem.destroy();this._element.remove(),this._layoutManager.emit(\"itemDropped\",this._componentItem),this._componentItemFocused&&void 0!==e&&e.focus()}setDimensions(){const t=this._layoutManager.layoutConfig.dimensions;if(void 0===t)throw new Error(\"DragProxy.setDimensions: dimensions undefined\");let e=t.dragProxyWidth,i=t.dragProxyHeight;if(void 0===e||void 0===i)throw new Error(\"DragProxy.setDimensions: width and/or height undefined\");const n=!1===this._layoutManager.layoutConfig.header.show?0:t.headerHeight;this._element.style.width=zt(e),this._element.style.height=zt(i),e-=this._sided?n:0,i-=this._sided?0:n,this._proxyContainerElement.style.width=zt(e),this._proxyContainerElement.style.height=zt(i),this._componentItem.enterDragMode(e,i),this._componentItem.show()}}class ne{constructor(t,e,i,n,o,s,r){this._layoutManager=t,this._element=e,this._extraAllowableChildTargets=i,this._componentTypeOrFtn=n,this._componentState=o,this._title=s,this._id=r,this._dragListener=null,this._dummyGroundContainer=document.createElement(\"div\");const a=gt.createDefault(\"row\");this._dummyGroundContentItem=new Yt(this._layoutManager,a,this._dummyGroundContainer),this.createDragListener()}destroy(){this.removeDragListener()}createDragListener(){this.removeDragListener(),this._dragListener=new Zt(this._element,this._extraAllowableChildTargets),this._dragListener.on(\"dragStart\",((t,e)=>this.onDragStart(t,e))),this._dragListener.on(\"dragStop\",(()=>this.onDragStop()))}onDragStart(t,e){var i;const n=\"component\";let o;if(\"function\"==typeof this._componentTypeOrFtn){const t=this._componentTypeOrFtn();o=ne.isDragSourceComponentItemConfig(t)?{type:n,componentState:t.state,componentType:t.type,title:null!==(i=t.title)&&void 0!==i?i:this._title}:t}else o={type:n,componentState:this._componentState,componentType:this._componentTypeOrFtn,title:this._title,id:this._id};const s=bt.resolve(o,!1),r=new jt(this._layoutManager,s,this._dummyGroundContentItem);if(this._dummyGroundContentItem.contentItems.push(r),null===this._dragListener)throw new K(\"DSODSD66746\");{const i=new ie(t,e,this._dragListener,this._layoutManager,r,this._dummyGroundContentItem),n=this._layoutManager.transitionIndicator;if(null===n)throw new K(\"DSODST66746\");n.transitionElements(this._element,i.element)}}onDragStop(){this.createDragListener()}removeDragListener(){null!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=null)}}!function(t){t.isDragSourceComponentItemConfig=function(t){return!(\"componentType\"in t)}}(ne||(ne={}));class oe{constructor(){this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_dropTargetIndicator\");const t=document.createElement(\"div\");t.classList.add(\"lm_inner\"),this._element.appendChild(t),document.body.appendChild(this._element)}destroy(){this._element.remove()}highlightArea(t,e){this._element.style.left=zt(t.x1+e),this._element.style.top=zt(t.y1+e),this._element.style.width=zt(t.x2-t.x1-e),this._element.style.height=zt(t.y2-t.y1-e),this._element.style.display=\"block\"}hide(){Dt(this._element,!1)}}class se{constructor(){this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_transition_indicator\"),document.body.appendChild(this._element),this._toElement=null,this._fromDimensions=null,this._totalAnimationDuration=200,this._animationStartTime=null}destroy(){this._element.remove()}transitionElements(t,e){}nextAnimationFrame(){}measure(t){const e=t.getBoundingClientRect();return{left:e.left,top:e.top,width:t.offsetWidth,height:t.offsetHeight}}}class re extends Wt{constructor(t){super(),this._layoutManager=t,this._childEventListener=t=>this.onEventFromChild(t),globalThis.addEventListener(re.ChildEventName,this._childEventListener,{passive:!0})}emit(t,...e){\"userBroadcast\"===t?this.emitUserBroadcast(...e):super.emit(t,...e)}emitUserBroadcast(...t){this.handleUserBroadcastEvent(\"userBroadcast\",t)}destroy(){globalThis.removeEventListener(re.ChildEventName,this._childEventListener)}handleUserBroadcastEvent(t,e){this._layoutManager.isSubWindow?this.propagateToParent(t,e):this.propagateToThisAndSubtree(t,e)}onEventFromChild(t){const e=t.detail;this.handleUserBroadcastEvent(e.eventName,e.args)}propagateToParent(t,e){const i={bubbles:!0,cancelable:!0,detail:{layoutManager:this._layoutManager,eventName:t,args:e}},n=new CustomEvent(re.ChildEventName,i),o=globalThis.opener;if(null===o)throw new K(\"EHPTP15778\");o.dispatchEvent(n)}propagateToThisAndSubtree(t,e){this.emitUnknown(t,...e);for(let i=0;ithis.handleContainerResize())),this._windowBeforeUnloadListener=()=>this.onBeforeUnload(),this._windowBeforeUnloadListening=!1,this._maximisedStackBeforeDestroyedListener=t=>this.cleanupBeforeMaximisedStackDestroyed(t),this.isSubWindow=t.isSubWindow,this._constructorOrSubWindowLayoutConfig=t.constructorOrSubWindowLayoutConfig,Q.checkInitialise(),dt.checkInitialise(),void 0!==t.containerElement&&(this._containerElement=t.containerElement)}get container(){return this._containerElement}get isInitialised(){return this._isInitialised}get groundItem(){return this._groundItem}get root(){return this._groundItem}get openPopouts(){return this._openPopouts}get dropTargetIndicator(){return this._dropTargetIndicator}get transitionIndicator(){return this._transitionIndicator}get width(){return this._width}get height(){return this._height}get eventHub(){return this._eventHub}get rootItem(){if(void 0===this._groundItem)throw new Error(\"Cannot access rootItem before init\");return 0===this._groundItem.contentItems.length?void 0:this._groundItem.contentItems[0]}get focusedComponentItem(){return this._focusedComponentItem}get tabDropPlaceholder(){return this._tabDropPlaceholder}get maximisedStack(){return this._maximisedStack}get deprecatedConstructor(){return!this.isSubWindow&&void 0!==this._constructorOrSubWindowLayoutConfig}destroy(){if(this._isInitialised){this._windowBeforeUnloadListening&&(globalThis.removeEventListener(\"beforeunload\",this._windowBeforeUnloadListener),this._windowBeforeUnloadListening=!1),!0===this.layoutConfig.settings.closePopoutsOnUnload&&this.closeAllOpenPopouts(),this._resizeObserver.disconnect(),this.checkClearResizeTimeout(),void 0!==this._groundItem&&this._groundItem.destroy(),this._tabDropPlaceholder.remove(),null!==this._dropTargetIndicator&&this._dropTargetIndicator.destroy(),null!==this._transitionIndicator&&this._transitionIndicator.destroy(),this._eventHub.destroy();for(const t of this._dragSources)t.destroy();this._dragSources=[],this._isInitialised=!1}}minifyConfig(t){return _t.minifyConfig(t)}unminifyConfig(t){return _t.unminifyConfig(t)}init(){let t;if(this.setContainer(),this._dropTargetIndicator=new oe,this._transitionIndicator=new se,this.updateSizeFromContainer(),this.isSubWindow){if(void 0===this._constructorOrSubWindowLayoutConfig)throw new J(\"LMIU07155\");{const e=this._constructorOrSubWindowLayoutConfig.root;if(void 0===e)throw new X(\"LMIC07156\");if(!Ct.isComponent(e))throw new X(\"LMIC07157\");t=e;const i=xt.resolve(this._constructorOrSubWindowLayoutConfig);this.layoutConfig=Object.assign(Object.assign({},i),{root:void 0})}}else void 0===this._constructorOrSubWindowLayoutConfig?this.layoutConfig=_t.createDefault():this.layoutConfig=xt.resolve(this._constructorOrSubWindowLayoutConfig);const e=this.layoutConfig;this._groundItem=new Yt(this,e.root,this._containerElement),this._groundItem.init(),this.checkLoadedLayoutMaximiseItem(),this._resizeObserver.observe(this._containerElement),this._isInitialised=!0,this.adjustColumnsResponsive(),this.emit(\"initialised\"),void 0!==t&&this.loadComponentAsRoot(t)}loadLayout(t){if(!this.isInitialised)throw new Error(\"GoldenLayout: Need to call init() if LayoutConfig with defined root passed to constructor\");if(void 0===this._groundItem)throw new J(\"LMLL11119\");this.createSubWindows(),this.layoutConfig=xt.resolve(t),this._groundItem.loadRoot(this.layoutConfig.root),this.checkLoadedLayoutMaximiseItem(),this.adjustColumnsResponsive()}saveLayout(){if(!1===this._isInitialised)throw new Error(\"Can't create config, layout not yet initialised\");if(void 0===this._groundItem)throw new J(\"LMTC18244\");{const t=this._groundItem.calculateConfigContent();let e;e=1!==t.length?void 0:t[0],this.reconcilePopoutWindows();const i=[];for(let t=0;t=0?n=this._groundItem.contentItems[0]:e=0;break;case at.row:case at.column:e=n.addItem(t,i.index);break;case at.stack:if(Ct.isComponent(t)){e=n.addItem(t,i.index);break}throw Error(tt[6]);case at.component:throw new X(\"LMAIALC87444602\");default:throw new Y(\"LMAIALU98881733\",n.type)}if(Ct.isComponent(t)){const t=n.contentItems[e];Gt.isStack(t)&&(n=t,e=0)}return i.parentItem=n,i.index=e,i}}}loadComponentAsRoot(t){if(void 0===this._groundItem)throw new Error(\"Cannot add item before init\");this._groundItem.loadComponentAsRoot(t)}updateSize(t,e){this.setSize(t,e)}setSize(t,e){if(this._width=t,this._height=e,!0===this._isInitialised){if(void 0===this._groundItem)throw new J(\"LMUS18881\");if(this._groundItem.setSize(this._width,this._height),this._maximisedStack){const{width:t,height:e}=kt(this._containerElement);Tt(this._maximisedStack.element,t),At(this._maximisedStack.element,e),this._maximisedStack.updateSize(!1)}this.adjustColumnsResponsive()}}beginSizeInvalidation(){this._sizeInvalidationBeginCount++}endSizeInvalidation(){0==--this._sizeInvalidationBeginCount&&this.updateSizeFromContainer()}updateSizeFromContainer(){const{width:t,height:e}=kt(this._containerElement);this.setSize(t,e)}updateRootSize(t=!1){if(void 0===this._groundItem)throw new J(\"LMURS28881\");this._groundItem.updateSize(t)}createAndInitContentItem(t,e){const i=this.createContentItem(t,e);return i.init(),i}createContentItem(t,e){if(\"string\"!=typeof t.type)throw new G(\"Missing parameter 'type'\",JSON.stringify(t));if(ct.isComponentItem(t)&&!(e instanceof ee)&&e&&!(!0===this.isSubWindow&&e instanceof Yt)){t={type:at.stack,content:[t],size:t.size,sizeUnit:t.sizeUnit,minSize:t.minSize,minSizeUnit:t.minSizeUnit,id:t.id,maximised:t.maximised,isClosable:t.isClosable,activeItemIndex:0,header:void 0}}return this.createContentItemFromConfig(t,e)}findFirstComponentItemById(t){if(void 0===this._groundItem)throw new J(\"LMFFCIBI82446\");return this.findFirstContentItemTypeByIdRecursive(at.component,t,this._groundItem)}createPopout(t,e,i,n){return t instanceof Gt?this.createPopoutFromContentItem(t,e,i,n):this.createPopoutFromItemConfig(t,e,i,n)}createPopoutFromContentItem(t,e,i,n){let o=t.parent,s=t;for(;null!==o&&1===o.contentItems.length&&!o.isGround;)s=o,o=o.parent;if(null===o)throw new K(\"LMCPFCI00834\");{if(void 0===n&&(n=o.contentItems.indexOf(s)),null!==i&&o.addPopInParentId(i),void 0===e){const i=globalThis.screenX||globalThis.screenLeft,n=globalThis.screenY||globalThis.screenTop,o=t.element.offsetLeft,s=t.element.offsetTop,{width:r,height:a}=kt(t.element);e={left:i+o,top:n+s,width:r,height:a}}const r=t.toConfig();if(t.remove(),ft.isRootItemConfig(r))return this.createPopoutFromItemConfig(r,e,i,n);throw new Error(`${tt[0]}`)}}beginVirtualSizedContainerAdding(){0==++this._virtualSizedContainerAddingBeginCount&&(this._virtualSizedContainers.length=0)}addVirtualSizedContainer(t){this._virtualSizedContainers.push(t)}endVirtualSizedContainerAdding(){if(0==--this._virtualSizedContainerAddingBeginCount){const t=this._virtualSizedContainers.length;if(t>0){this.fireBeforeVirtualRectingEvent(t);for(let e=0;ethis.emit(\"windowOpened\",a))),a.on(\"closed\",(()=>this.reconcilePopoutWindows())),this._openPopouts.push(a),this.layoutConfig.settings.closePopoutsOnUnload&&!this._windowBeforeUnloadListening&&(globalThis.addEventListener(\"beforeunload\",this._windowBeforeUnloadListener,{passive:!0}),this._windowBeforeUnloadListening=!0),a}closeAllOpenPopouts(){for(let t=0;tglobalThis.close()),1)}getArea(t,e){let i=null,n=1/0;for(let o=0;o=s.x1&&t=s.y1&&es.surface&&(n=s.surface,i=s)}return i}calculateItemAreas(){const t=this.getAllContentItems(),e=this._groundItem;if(void 0===e)throw new J(\"LMCIAR44365\");if(1!==t.length){e.contentItems[0].isStack?this._itemAreas=[]:this._itemAreas=e.createSideAreas();for(let e=0;e0){let e=t[0];if(Gt.isComponentItem(e)){const t=e.parent;if(null===t)throw new K(\"LMXLLMI69999\");e=t}if(!Gt.isStack(e))throw new X(\"LMCLLMI19993\");e.maximise()}}}processMaximiseStack(t){if(this._maximisedStack=t,t.on(\"beforeItemDestroyed\",this._maximisedStackBeforeDestroyedListener),t.element.classList.add(\"lm_maximised\"),t.element.insertAdjacentElement(\"afterend\",this._maximisePlaceholder),void 0===this._groundItem)throw new J(\"LMMXI19993\");{this._groundItem.element.prepend(t.element);const{width:e,height:i}=kt(this._containerElement);Tt(t.element,e),At(t.element,i),t.updateSize(!0),t.focusActiveContentItem(),this._maximisedStack.emit(\"maximised\"),this.emit(\"stateChanged\")}}processMinimiseMaximisedStack(){if(void 0===this._maximisedStack)throw new X(\"LMMMS74422\");{const t=this._maximisedStack;if(null===t.parent)throw new K(\"LMMI13668\");t.element.classList.remove(\"lm_maximised\"),this._maximisePlaceholder.insertAdjacentElement(\"afterend\",t.element),this._maximisePlaceholder.remove(),this.updateRootSize(!0),this._maximisedStack=void 0,t.off(\"beforeItemDestroyed\",this._maximisedStackBeforeDestroyedListener),t.emit(\"minimised\"),this.emit(\"stateChanged\")}}reconcilePopoutWindows(){const t=[];for(let e=0;e{this._resizeTimeoutId=void 0,this.beginSizeInvalidation(),this.endSizeInvalidation()}),this.resizeDebounceInterval))}checkClearResizeTimeout(){void 0!==this._resizeTimeoutId&&(clearTimeout(this._resizeTimeoutId),this._resizeTimeoutId=void 0)}setContainer(){var t;const e=document.body,i=null!==(t=this._containerElement)&&void 0!==t?t:e;if(i===e){this.resizeWithContainerAutomatically=!0;const t=document.documentElement;t.style.height=\"100%\",t.style.margin=\"0\",t.style.padding=\"0\",t.style.overflow=\"clip\",e.style.height=\"100%\",e.style.margin=\"0\",e.style.padding=\"0\",e.style.overflow=\"clip\"}this._containerElement=i}onBeforeUnload(){this.destroy()}adjustColumnsResponsive(){if(void 0===this._groundItem)throw new J(\"LMACR20883\");if(this._firstLoad=!1,this.useResponsiveLayout()&&!this._updatingColumnsResponsive&&this._groundItem.contentItems.length>0&&this._groundItem.contentItems[0].isRow){if(void 0===this._groundItem||null===this._width)throw new J(\"LMACR77412\");{const t=this._groundItem.contentItems[0].contentItems.length;if(t<=1)return;{const e=this.layoutConfig.dimensions.defaultMinItemWidth;if(t*e<=this._width)return;{this._updatingColumnsResponsive=!0;const i=t-Math.max(Math.floor(this._width/e),1),n=this._groundItem.contentItems[0],o=this.getAllStacks();if(0===o.length)throw new X(\"LMACRS77413\");{const t=o[0];for(let e=0;en?void 0:{parentItem:t,index:o}}}case 1:if(void 0===this._focusedComponentItem)return;{const t=this._focusedComponentItem.parentItem;return this.tryCreateLocationFromParentItem(t,e)}case 2:{const t=this.findFirstContentItemType(at.stack);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 3:{let t=this.findFirstContentItemType(at.row);return void 0!==t?this.tryCreateLocationFromParentItem(t,e):(t=this.findFirstContentItemType(at.column),void 0!==t?this.tryCreateLocationFromParentItem(t,e):void 0)}case 4:{const t=this.findFirstContentItemType(at.row);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 5:{const t=this.findFirstContentItemType(at.column);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 6:if(void 0===this._groundItem)throw new J(\"LMFLRIF18244\");return void 0!==this.rootItem?void 0:void 0===e||0===e?{parentItem:this._groundItem,index:0}:void 0;case 7:if(void 0===this._groundItem)throw new J(\"LMFLF18244\");{const t=this._groundItem.contentItems;if(0===t.length)return void 0===e||0===e?{parentItem:this._groundItem,index:0}:void 0;{const i=t[0];return this.tryCreateLocationFromParentItem(i,e)}}}}tryCreateLocationFromParentItem(t,e){const i=t.contentItems.length;return void 0===e?{parentItem:t,index:i}:e<0||e>i?void 0:{parentItem:t,index:e}}}!function(t){t.createMaximisePlaceElement=function(t){const e=t.createElement(\"div\");return e.classList.add(\"lm_maximise_place\"),e},t.createTabDropPlaceholderElement=function(t){const e=t.createElement(\"div\");return e.classList.add(\"lm_drop_tab_placeholder\"),e},t.defaultLocationSelectors=[{typeId:1,index:void 0},{typeId:2,index:void 0},{typeId:3,index:void 0},{typeId:7,index:void 0}],t.afterFocusedItemIfPossibleLocationSelectors=[{typeId:0,index:1},{typeId:2,index:void 0},{typeId:3,index:void 0},{typeId:7,index:void 0}]}(ae||(ae={}));class le extends ae{constructor(t,e,i,n){if(super(le.createLayoutManagerConstructorParameters(t,e)),this._bindComponentEventHanlderPassedInConstructor=!1,this._creationTimeoutPassed=!1,void 0!==e&&\"function\"==typeof e&&(this.bindComponentEvent=e,this._bindComponentEventHanlderPassedInConstructor=!0,void 0!==i&&(this.unbindComponentEvent=i)),!this._bindComponentEventHanlderPassedInConstructor&&this.isSubWindow){if(void 0===this._constructorOrSubWindowLayoutConfig)throw new J(\"VLC98823\");{const t=xt.resolve(this._constructorOrSubWindowLayoutConfig);this.layoutConfig=Object.assign(Object.assign({},t),{root:void 0})}}!0!==n&&(this.deprecatedConstructor||this.init())}destroy(){this.bindComponentEvent=void 0,this.unbindComponentEvent=void 0,super.destroy()}init(){if(this._bindComponentEventHanlderPassedInConstructor||\"loading\"!==document.readyState&&null!==document.body){if(!this._bindComponentEventHanlderPassedInConstructor&&!0===this.isSubWindow&&!this._creationTimeoutPassed)return setTimeout((()=>this.init()),7),void(this._creationTimeoutPassed=!0);!0===this.isSubWindow&&(this._bindComponentEventHanlderPassedInConstructor||this.clearHtmlAndAdjustStylesForSubWindow(),window.__glInstance=this),super.init()}else document.addEventListener(\"DOMContentLoaded\",(()=>this.init()),{passive:!0})}clearHtmlAndAdjustStylesForSubWindow(){const t=document.head,e=new Array(4);e[0]=document.querySelectorAll(\"body link\"),e[1]=document.querySelectorAll(\"body style\"),e[2]=document.querySelectorAll(\"template\"),e[3]=document.querySelectorAll(\".gl_keep\");for(let i=0;ithis.emit(\"popIn\"))),document.body.appendChild(t),!0}}bindComponent(t,e){if(void 0!==this.bindComponentEvent){return this.bindComponentEvent(t,e)}if(void 0!==this.getComponentEvent)return{virtual:!1,component:this.getComponentEvent(t,e)};{const t=`${tt[2]}: ${JSON.stringify(e)}`;throw new Z(t)}}unbindComponent(t,e,i){if(void 0!==this.unbindComponentEvent)this.unbindComponentEvent(t);else if(!e&&void 0!==this.releaseComponentEvent){if(void 0===i)throw new J(\"VCUCRCU333998\");this.releaseComponentEvent(t,i)}}}!function(t){let e=!1;t.createLayoutManagerConstructorParameters=function(t,i){const n=e?null:new URL(document.location.href).searchParams.get(\"gl-window\");e=!0;const o=null!==n;let s,r;if(null!==n){const e=localStorage.getItem(n);if(null===e)throw new Error(\"Null gl-window Config\");localStorage.removeItem(n);const i=JSON.parse(e),o=_t.unminifyConfig(i);r=xt.fromResolved(o),t instanceof HTMLElement&&(s=t)}else void 0===t?r=void 0:t instanceof HTMLElement?(r=void 0,s=t):r=t,void 0===s&&i instanceof HTMLElement&&(s=i);return{constructorOrSubWindowLayoutConfig:r,isSubWindow:o,containerElement:s}}}(le||(le={}));class he extends le{constructor(t,e,i){super(t,e,i,!0),this._componentTypesMap=new Map,this._registeredComponentMap=new Map,this._virtuableComponentMap=new Map,this._containerVirtualRectingRequiredEventListener=(t,e,i)=>this.handleContainerVirtualRectingRequiredEvent(t,e,i),this._containerVirtualVisibilityChangeRequiredEventListener=(t,e)=>this.handleContainerVirtualVisibilityChangeRequiredEvent(t,e),this._containerVirtualZIndexChangeRequiredEventListener=(t,e,i)=>this.handleContainerVirtualZIndexChangeRequiredEvent(t,e,i),this.deprecatedConstructor||this.init()}registerComponent(t,e,i=!1){if(\"function\"!=typeof e)throw new $(\"registerComponent() componentConstructorOrFactoryFtn parameter is not a function\");if(e.hasOwnProperty(\"prototype\")){const n=e;this.registerComponentConstructor(t,n,i)}else{const n=e;this.registerComponentFactoryFunction(t,n,i)}}registerComponentConstructor(t,e,i=!1){if(\"function\"!=typeof e)throw new Error(tt[1]);if(void 0!==this._componentTypesMap.get(t))throw new Z(`${tt[3]}: ${t}`);this._componentTypesMap.set(t,{constructor:e,factoryFunction:void 0,virtual:i})}registerComponentFactoryFunction(t,e,i=!1){if(\"function\"!=typeof e)throw new Z(\"Please register a constructor function\");if(void 0!==this._componentTypesMap.get(t))throw new Z(`${tt[3]}: ${t}`);this._componentTypesMap.set(t,{constructor:void 0,factoryFunction:e,virtual:i})}registerComponentFunction(t){this.registerGetComponentConstructorCallback(t)}registerGetComponentConstructorCallback(t){if(\"function\"!=typeof t)throw new Error(\"Please register a callback function\");void 0!==this._getComponentConstructorFtn&&console.warn(\"Multiple component functions are being registered. Only the final registered function will be used.\"),this._getComponentConstructorFtn=t}getRegisteredComponentTypeNames(){const t=this._componentTypesMap.keys();return Array.from(t)}getComponentInstantiator(t){let e;const i=pt.resolveComponentTypeName(t);return void 0!==i&&(e=this._componentTypesMap.get(i)),void 0===e&&void 0!==this._getComponentConstructorFtn&&(e={constructor:this._getComponentConstructorFtn(t),factoryFunction:void 0,virtual:!1}),e}bindComponent(t,e){let i;const n=pt.resolveComponentTypeName(e);let o;if(void 0!==n&&(i=this._componentTypesMap.get(n)),void 0===i&&void 0!==this._getComponentConstructorFtn&&(i={constructor:this._getComponentConstructorFtn(e),factoryFunction:void 0,virtual:!1}),void 0!==i){const s=i.virtual;let r,a;r=void 0===e.componentState?void 0:Ut({},e.componentState);const l=i.constructor;if(void 0!==l)a=new l(t,r,s);else{const e=i.factoryFunction;if(void 0===e)throw new X(\"LMBCFFU10008\");a=e(t,r,s)}if(s){if(void 0===a)throw new J(\"GLBCVCU988774\");{const e=a,i=e.rootHtmlElement;if(void 0===i)throw new Z(`${tt[5]}: ${n}`);!function(t){const e=\"absolute\";t.style.position!==e&&(t.style.position=e)}(i),this.container.appendChild(i),this._virtuableComponentMap.set(t,e),t.virtualRectingRequiredEvent=this._containerVirtualRectingRequiredEventListener,t.virtualVisibilityChangeRequiredEvent=this._containerVirtualVisibilityChangeRequiredEventListener,t.virtualZIndexChangeRequiredEvent=this._containerVirtualZIndexChangeRequiredEventListener}}this._registeredComponentMap.set(t,a),o={virtual:i.virtual,component:a}}else o=super.bindComponent(t,e);return o}unbindComponent(t,e,i){if(void 0===this._registeredComponentMap.get(t))super.unbindComponent(t,e,i);else{const e=this._virtuableComponentMap.get(t);if(void 0!==e){const i=e.rootHtmlElement;if(void 0===i)throw new X(\"GLUC77743\",t.title);this.container.removeChild(i),this._virtuableComponentMap.delete(t)}}}fireBeforeVirtualRectingEvent(t){this._goldenLayoutBoundingClientRect=this.container.getBoundingClientRect(),super.fireBeforeVirtualRectingEvent(t)}handleContainerVirtualRectingRequiredEvent(t,e,i){const n=this._virtuableComponentMap.get(t);if(void 0===n)throw new J(\"GLHCSCE55933\");{const o=n.rootHtmlElement;if(void 0===o)throw new Z(tt[4]+\" \"+t.title);{const n=t.element.getBoundingClientRect(),s=n.left-this._goldenLayoutBoundingClientRect.left;o.style.left=zt(s);const r=n.top-this._goldenLayoutBoundingClientRect.top;o.style.top=zt(r),Tt(o,e),At(o,i)}}}handleContainerVirtualVisibilityChangeRequiredEvent(t,e){const i=this._virtuableComponentMap.get(t);if(void 0===i)throw new J(\"GLHCVVCRE55934\");{const n=i.rootHtmlElement;if(void 0===n)throw new Z(tt[4]+\" \"+t.title);Dt(n,e)}}handleContainerVirtualZIndexChangeRequiredEvent(t,e,i){const n=this._virtuableComponentMap.get(t);if(void 0===n)throw new J(\"GLHCVZICRE55935\");{const e=n.rootHtmlElement;if(void 0===e)throw new Z(tt[4]+\" \"+t.title);e.style.zIndex=i}}}const de=\"initial_\",ce={show:\"top\",popout:!1,maximise:!1,close:\"close-tab-unused\"},me={headerHeight:31},ue={hasHeaders:!0,reorderEnabled:!0},pe={popoutWholeStack:!1,constrainDragToContainer:!1,constrainDragToHeaders:!1,preventDragout:!1,showMaximiseIcon:!1,showPopoutIcon:!1,showCloseIcon:!1,blockedPopoutsThrowError:!0,closePopoutsOnUnload:!0,selectionEnabled:!1};var ge,fe;class ve{constructor(e){this.layout=e,ge.set(this,void 0),fe.set(this,void 0),this.handleResize=t=>{t.forEach((t=>this.resizeElement(t.target)))},this.handleMutation=()=>{this.layout.viewComponentsByContainerElement.forEach((t=>{this.resizeElement(t.container.element)}))},t.__classPrivateFieldSet(this,ge,new ResizeObserver(this.handleResize),\"f\"),t.__classPrivateFieldSet(this,fe,new MutationObserver(this.handleMutation),\"f\")}observeMutations(e){t.__classPrivateFieldGet(this,fe,\"f\")?.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[\"class\"]})}destroy(){t.__classPrivateFieldGet(this,ge,\"f\").disconnect(),t.__classPrivateFieldGet(this,fe,\"f\").disconnect()}observeContainer(e){t.__classPrivateFieldGet(this,ge,\"f\").observe(e)}unobserveContainer(e){t.__classPrivateFieldGet(this,ge,\"f\").unobserve(e)}resizeElement(t){const e=this.layout.viewComponentsByContainerElement.get(t);e&&e.resize()}}ge=new WeakMap,fe=new WeakMap;var _e={};Object.defineProperty(_e,\"__esModule\",{value:!0});var ye=_e.BaseItem=void 0;class Ce{constructor(t,e,i){this._item=t,this._layout=e,this._wrap=i}get raw(){return this._item}get layout(){return this._layout}get type(){return this._item.type}get contentItems(){return(this._item.contentItems??[]).map((t=>this._wrap(t)))}get parent(){const t=this._item.parent;return t?this._wrap(t):null}setActiveContentItem(t,e){if(\"stack\"!==this.type)throw new Error(`Cannot call setActiveContentItem from a non-stack item: ${this.type}`);this._item.setActiveContentItem(t.raw,e)}static wrapInternal(t,e,i){const n=Ce.wrapCache.get(e);if(n)return n;const o=new t(e,i,(e=>Ce.wrapInternal(t,e,i)));return Ce.wrapCache.set(e,o),o}}ye=_e.BaseItem=Ce,Ce.wrapCache=new WeakMap;const we=t=>!!t&&\"contentItems\"in t&&(t.isRow||t.isColumn);class Ie extends ye{isRoot(){return!!this._item.parent?.isGround}getBounds(){return this._item.element.getBoundingClientRect()}get viewName(){if(this._item.isComponent){const{component:t}=this._item;return t.identity.name}throw new Error(\"View name not found\")}onDestroyed(t){const e=({target:i})=>{i===this._item&&(t(),this._item.off(\"itemDestroyed\",e))};this._item.on(\"itemDestroyed\",e)}createAdjacentStack({position:t=\"right\"}={}){const e=this.raw;if(ee.isStack(e)&&e.parent){const i=[\"top\",\"bottom\"].includes(t)?\"column\":\"row\",n=[\"left\",\"top\"].includes(t)?1:0,o=we(e.parent)?e.parent:e.layoutManager,s=o,r=e.parent.contentItems.indexOf(e);e.parent.isGround&&e.parent.removeChild(e,!0);const a=o.newItem({type:i,content:[{type:\"stack\",content:[]}]},r);if(!a)throw new Error(\"createAdjacentStack: Failed to create new container\");const l=a.contentItems[0];return a.addChild(this.raw,n),we(s)&&s.removeChild(e,!0),this._wrap(l)}throw new Error(`Cannot creat adjacent stacks for type: ${e.type}, must be type 'stack'`)}setActiveContentItem(t,e=!0){if(!ee.isStack(this._item))throw new Error(`Cannot call setActiveContentItem from a non-stack item: ${this.type}`);this._item.setActiveComponentItem(t.raw,!e)}static wrap(t,e){return ye.wrapInternal(Ie,t,e)}}function be(t=[],e){for(const i of t)\"component\"===i.type?Object.keys(e).forEach((t=>{t in i&&(i.componentState={[`${de}${t}`]:i[t],...i.componentState}),i[t]=e[t]})):be(i.content,e)}function Se(t=[],e,i){for(const n of t)if(\"component\"===n.type)Object.keys(e).forEach((t=>{if(`${de}${t}`in n.componentState)return n[t]=n.componentState[`${de}${t}`],void delete n.componentState[`${de}${t}`];n[t]=e[t]}));else{if(n.size&&(\"row\"===i||\"column\"===i)){n[\"row\"===i?\"width\":\"height\"]=n.size?.includes(\".\")?parseFloat(n.size):parseInt(n.size)}Se(n.content,e,n.type)}}function Ee(t){if(t.root){t.root.content&&Se([t.root],{componentName:\"view\",isClosable:!0});const e=t.root;t.content=[e],delete t.root}return t}const xe=e=>class extends e{connectedCallback(){if(!this.name||!this.uuid)throw new Error(\" Name or uuid attribute missing\");if(!this.src)throw new Error(\" missing 'src' attribute.\");this.#t||(this.#t=document.createElement(\"iframe\"),this.#t.src=this.src,this.#t.style.height=\"100%\",this.#t.style.width=\"100%\",this.#t.style.border=\"none\",this.forceFrameName?this.#t.setAttribute(\"name\",this.forceFrameName):this.#t.setAttribute(\"name\",t.encodeOptions({brokerUrl:this.brokerUrl,name:this.name,uuid:this.uuid,providerId:this.providerId,contextGroup:this.contextGroup},\"of-frame\")),this.#t.setAttribute(\"id\",this.name),this.appendChild(this.#t))}#t;get brokerUrl(){return this.getAttribute(\"of-broker\")}set brokerUrl(t){t&&this.setAttribute(\"of-broker\",t)}get name(){return this.getAttribute(\"of-name\")}set name(t){t&&this.setAttribute(\"of-name\",t)}get forceFrameName(){return this.getAttribute(\"forceFrameName\")}set forceFrameName(t){t&&this.setAttribute(\"forceFrameName\",t)}get uuid(){return this.getAttribute(\"of-uuid\")}set uuid(t){t&&this.setAttribute(\"of-uuid\",t)}get src(){return this.getAttribute(\"src\")}set src(t){t&&this.setAttribute(\"src\",t)}get providerId(){return this.getAttribute(\"of-provider-id\")}set providerId(t){t&&this.setAttribute(\"of-provider-id\",t)}get contextGroup(){return this.getAttribute(\"of-context-group\")}set contextGroup(t){t&&this.setAttribute(\"of-context-group\",t)}static get observedAttributes(){return[\"name\"]}};class Le{static create(t){const e=document.createElement(\"of-view\");return Object.entries(t).forEach((([t,i])=>{e.setAttribute(t,i)})),e}}customElements.define(\"of-view\",xe(HTMLElement));class ze{constructor(t,i,n,{brokerUrl:o,interopConfig:s},r){this.container=t,this.config=i,this.ofView=null,this.isDragging=()=>this.container.tab.element?.className.includes(\"lm_dragging\")??!1;const{url:a,web:l,interop:h,name:d}=i||{},c=d??`internal-generated-view-${e.v4()}`;if(this.identity={uuid:n,name:c},this.container.element.setAttribute(\"of-name\",c),this.container.element.id=`container-${c}`,this.container.parent.id=c,void 0===a)return void this.handleUrlMissing();const m=this.updateTitleIfNotSet(a),u={\"of-broker\":o,\"of-uuid\":n,\"of-name\":c,src:a};l?.frameName&&(u.forceFrameName=l.frameName);const p=h?.currentContextGroup??s?.currentContextGroup;p&&(u[\"of-context-group\"]=p),s?.providerId&&(u[\"of-provider-id\"]=s?.providerId),this.ofView=Le.create(u),this.ofView.title=m??`Iframe: ${a}`,r.appendChild(this.ofView),this.ofView.style.position=\"absolute\"}updateTitleIfNotSet(t){return\"view\"===this.container.parent.title&&this.container.parent.setTitle(t),this.container.parent.title}handleUrlMissing(){const t=document.createElement(\"div\");t.setAttribute(\"style\",\"padding: 20px\");t.innerText=\"No URL provided\",this.container.element.appendChild(t)}destroy(){this.ofView?.remove(),this.ofView=null}closeView(){this.container.close()}resize(){if(this.ofView){if(this.isDragging())return void(this.ofView.style.display=\"none\");const t=this.container.element.getBoundingClientRect();this.ofView.style.position=\"absolute\",this.ofView.style.height=`${t.height}px`,this.ofView.style.width=`${t.width}px`,this.ofView.style.inset=`${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`,this.ofView.style.display=\"block\"}}}class Me extends U{static overrideConfig(t){const e={...ue,...t.settings,...pe};return e.reorderEnabled?be(t.content,{isClosable:!0}):be(t.content,{reorderEnabled:!1}),{dimensions:me,...t,settings:e,header:{...ce,show:!1!==t.settings?.hasHeaders&&ce.show}}}constructor(t,e,i,{options:n},o,s){super(),this.identity=t,this.container=e,this.initialConfig=i,this.layoutManager=o,this.platformProvider=s,this.viewComponentsByContainerElement=new Map,this.layoutContentCache=_.getSingleInstance(),this.reparentingViews=new Set,this.goldenLayoutDestroyed=!1,this.createViewComponent=(t,e)=>{m.handleSharedView(this.layoutManager,this.identity,e);const i=new ze(t,e,this.identity.uuid,this.options,this.iframeContainer);return e&&!1===e[`${de}isClosable`]&&this.stylesheet.insertRule(`#tab-${i.identity.name} .lm_close_tab { display: none; }`),this.viewComponentsByContainerElement.set(t.element,i),this.resizeController.observeContainer(t.element),i},this.iframeContainer=document.createElement(\"div\"),this.iframeContainer.id=`openfin-layout-iframe-container-${this.identity.layoutName}`,this.domEmitter=new V(e),this.setupStylesheets(),this.layout=new he(this.container),this.layout.resizeWithContainerAutomatically=!0,this.options=n,this.layout.registerComponent(\"view\",this.createViewComponent),this.setupListeners(),this.resizeController=new ve(this),this.layout.loadLayout(Me.overrideConfig(i));const r=document.createElement(\"div\");r.id=`openfin-layout-shadow-container-${this.identity.layoutName}`,r.attachShadow({mode:\"open\",delegatesFocus:!1}).appendChild(this.iframeContainer),this.container.appendChild(r),this.resizeController.observeMutations(this.container)}getStackByView({name:t}){const e=this.layout.findFirstComponentItemById(t);if(e?.parent&&e?.parent?.isStack)return Ie.wrap(e.parent,this)}getRoot(){return Ie.wrap(this.layout.rootItem,this)}async platformCloseView(t){const e=[...this.viewComponentsByContainerElement.values()].find((e=>e.identity.name===t.name));if(!e)throw new Error(`View with name: ${t.name} not found in layout.`);e.closeView()}async platformCreateView(t,{location:e,targetView:i}={}){if(i)throw new Error(\"TargetView not supported in web\");const n={options:this.platformProvider.normalizeOptions(t),target:this.identity,location:e};return this.insertView(n)}setupStylesheets(){if(this.container.setAttribute(\"data-openfin-layout-name\",this.identity.layoutName),this.stylesheet=new CSSStyleSheet,this.stylesheet.insertRule(\".lm_close { display: none; }\"),document.adoptedStyleSheets.push(this.stylesheet),this.initialConfig.settings?.preventSplitterResize){const t=`\\n [data-openfin-layout-name='${this.identity.layoutName}'] .lm_splitter {\\n pointer-events: none;\\n }`;this.stylesheet.insertRule(t)}}insertView({options:t,location:e,targetView:i}){const n=e?this.layoutContentCache.getItemOrUndefined(e.id):void 0,o=i?this.layoutContentCache.getItemOrUndefined(i.name):void 0,s=n??o??Ie.wrap(this.layout.rootItem,this);let r;if(ee.isStack(s.raw))r=s.raw;else{if(!we(s.raw))throw new Error(\"Cannot add a view at the requested location\");r=s.raw.newItem({type:\"stack\",content:[]})}const a=Math.min(r.contentItems.length,e?.index??r.contentItems.length);let l=this.layout.findFirstComponentItemById(t.name);l?(l.parent&&l.parent.removeChild(l,!0),r.addChild(l,a)):l=r.newComponent(\"view\",t,t.title??t.url??\"Default Title\",a);const h=l.component.identity;return Promise.resolve({identity:h})}replaceView({viewToReplace:t,newView:e}){throw new Error(\"Method not implemented.\")}replaceLayout(t){throw new Error(\"Method not implemented.\")}async cleanupView(t){}applyPreset(t){throw new Error(\"Method not implemented.\")}getCurrentViews(){return[...this.viewComponentsByContainerElement.values()].map((t=>t.identity))}async getFrameSnapshot(){return Ee(xt.fromResolved(this.layout.toConfig()))}isVisible(){return W(this.container)}async onViewDetached({viewIdentity:t}){this.reparentingViews.add(t.name),this.platformCloseView(t)}async destroy(){this.goldenLayoutDestroyed||(this.goldenLayoutDestroyed=!0,this.layout.destroy()),this.iframeContainer.remove(),this.resizeController.destroy(),document.adoptedStyleSheets=document.adoptedStyleSheets.filter((t=>t!==this.stylesheet)),this.viewComponentsByContainerElement.clear()}setupListeners(){this.container.addEventListener(\"pointerdown\",(t=>{if(t.target instanceof HTMLElement){const e=t.target.classList;[\"lm_tab\",\"lm_title\",\"lm_splitter\",\"lm_drag_handle\"].some((t=>e.contains(t)))&&(this.handleDragStart(),2===t.button&&t.stopPropagation())}}),!0),document.addEventListener(\"pointerup\",(()=>this.handleDragEnd()),!0),this.layout.on(\"tabCreated\",(t=>{const e=t.componentItem.component;t.element.id=`tab-${e.identity.name}`,this.domEmitter.dispatchLocalEvent(\"tab-created\",e.identity)})),this.layout.on(\"itemCreated\",(({target:t})=>{const e=t;if(Gt.isComponentItem(e)){const t=e.component;this.domEmitter.dispatchLocalEvent(\"container-created\",t.identity)}})),this.layout.on(\"itemDestroyed\",(t=>{const e=t.target;if(Gt.isComponentItem(e)){const t=e.component;this.removeViewComponent(t)}})),this.layout.on(\"itemDropped\",(()=>{this.handleDragEnd()}))}handleDragStart(){this.iframeContainer.style.pointerEvents=\"none\"}handleDragEnd(){this.iframeContainer.style.pointerEvents=\"\"}removeViewComponent(t){if(t.config&&!1===t.config[`${de}isClosable`]){const e=[...this.stylesheet.cssRules].findIndex((e=>e.cssText.includes(`#tab-${t.identity.name}`)));this.stylesheet.deleteRule(e)}t.destroy(),this.viewComponentsByContainerElement.delete(t.container.element),this.resizeController.unobserveContainer(t.container.element),this.reparentingViews.has(t.identity.name)?this.reparentingViews.delete(t.identity.name):this.platformProvider.closeView(t.identity.name);0===this.getCurrentViews().length&&(this.goldenLayoutDestroyed||(this.goldenLayoutDestroyed=!0,m.handleLastViewRemoved(this.layoutManager,this.identity)))}}class Pe{constructor(t,e,i,n){this.windowIdentity=t,this.connectConfig=e,this.provider=i,this.fallbackContainer=n}async createLayout(t,e){if(!(\"container\"in t)&&!this.fallbackContainer)throw new Error(\"Container property is not optional in web\");const{layoutName:i}=t,n=t,o=this.provider.initLayoutViews(n),s=n.container??this.fallbackContainer,r={...this.windowIdentity,layoutName:i},a=new Me(r,s,o,this.connectConfig,e,this.provider);m.registerLayout(e,i,a),this.fallbackContainer=null}async getLayoutSnapshot(t){return t.getLayoutSnapshot()}async handleLastViewRemoved(t){}}class Te{static async init(e){const i=e.getFin().InterApplicationBus.Channel,n=await i.create(`custom-frame-${e.me.uuid}`);return n.setDefaultAction((async(t,{target:e,opts:i},o)=>{const s=n.connections.find((t=>t.name===e.name));if(s)return n.dispatch(s,t,{...i,target:e});throw new Error(`Client with name ${e.name} not found`)})),await t.relayChannelClientApi_1(n,\"layout-relay\"),new Te(e)}constructor(t){this.wire=t,this.viewNames=new Set}normalizeOptions(t,i=\"default\"){const n=this.wire.me.uuid;let{name:o=`internal-generated-view-${e.v4()}`}=t;return o.match(/^internal-generated-view-/)&&this.viewNames.has(o)&&\"duplicate\"===i&&(o=`internal-generated-view-${e.v4()}`),this.viewNames.add(o),{...t,name:o,uuid:n}}closeView(t){this.viewNames.delete(t)}initLayoutViews({layout:t,multiInstanceViewBehavior:e}){return H((t=>{if(\"component\"===t.type&&t.componentState){const i=this.normalizeOptions(t.componentState,e);return{...t,componentState:i}}return t}),t)}}var Ae;const ke=t=>t;Ae=new WeakMap,exports.WebLayoutEntryPoint=class{constructor(e){Ae.set(this,void 0),this.initLayoutManager=async(e,i,{container:n,layoutManagerOverride:o})=>{const s=await Te.init(i),r=o??ke,a=new Pe(i.me,t.__classPrivateFieldGet(this,Ae,\"f\"),s,n),l=new(r(m.createClosedConstructor(a)));return await M(i,l),l},this.applyLayoutSnapshot=async(e,i,n)=>{await i.applyLayoutSnapshot(t.__classPrivateFieldGet(this,Ae,\"f\").platform.layoutSnapshot)},this.createLayout=async(t,e)=>m.createLayout(t,e),this.destroyLayout=async(t,e)=>m.destroyLayout(t,e),t.__classPrivateFieldSet(this,Ae,e,\"f\")}};\n","'use strict'\n\nexports.byteLength = byteLength\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\nfor (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i]\n revLookup[code.charCodeAt(i)] = i\n}\n\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction getLens (b64) {\n var len = b64.length\n\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // Trim off extra bytes after placeholder bytes are found\n // See: https://github.com/beatgammit/base64-js/issues/42\n var validLen = b64.indexOf('=')\n if (validLen === -1) validLen = len\n\n var placeHoldersLen = validLen === len\n ? 0\n : 4 - (validLen % 4)\n\n return [validLen, placeHoldersLen]\n}\n\n// base64 is 4/3 + up to two characters of the original data\nfunction byteLength (b64) {\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction _byteLength (b64, validLen, placeHoldersLen) {\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction toByteArray (b64) {\n var tmp\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n\n var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))\n\n var curByte = 0\n\n // if there are placeholders, only get up to the last complete 4 chars\n var len = placeHoldersLen > 0\n ? validLen - 4\n : validLen\n\n var i\n for (i = 0; i < len; i += 4) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 18) |\n (revLookup[b64.charCodeAt(i + 1)] << 12) |\n (revLookup[b64.charCodeAt(i + 2)] << 6) |\n revLookup[b64.charCodeAt(i + 3)]\n arr[curByte++] = (tmp >> 16) & 0xFF\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 2) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 2) |\n (revLookup[b64.charCodeAt(i + 1)] >> 4)\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 1) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 10) |\n (revLookup[b64.charCodeAt(i + 1)] << 4) |\n (revLookup[b64.charCodeAt(i + 2)] >> 2)\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] +\n lookup[num >> 12 & 0x3F] +\n lookup[num >> 6 & 0x3F] +\n lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n var tmp\n var output = []\n for (var i = start; i < end; i += 3) {\n tmp =\n ((uint8[i] << 16) & 0xFF0000) +\n ((uint8[i + 1] << 8) & 0xFF00) +\n (uint8[i + 2] & 0xFF)\n output.push(tripletToBase64(tmp))\n }\n return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n var tmp\n var len = uint8.length\n var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n var parts = []\n var maxChunkLength = 16383 // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1]\n parts.push(\n lookup[tmp >> 2] +\n lookup[(tmp << 4) & 0x3F] +\n '=='\n )\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + uint8[len - 1]\n parts.push(\n lookup[tmp >> 10] +\n lookup[(tmp >> 4) & 0x3F] +\n lookup[(tmp << 2) & 0x3F] +\n '='\n )\n }\n\n return parts.join('')\n}\n","/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n/* eslint-disable no-proto */\n\n'use strict'\n\nconst base64 = require('base64-js')\nconst ieee754 = require('ieee754')\nconst customInspectSymbol =\n (typeof Symbol === 'function' && typeof Symbol['for'] === 'function') // eslint-disable-line dot-notation\n ? Symbol['for']('nodejs.util.inspect.custom') // eslint-disable-line dot-notation\n : null\n\nexports.Buffer = Buffer\nexports.SlowBuffer = SlowBuffer\nexports.INSPECT_MAX_BYTES = 50\n\nconst K_MAX_LENGTH = 0x7fffffff\nexports.kMaxLength = K_MAX_LENGTH\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Print warning and recommend using `buffer` v4.x which has an Object\n * implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * We report that the browser does not support typed arrays if the are not subclassable\n * using __proto__. Firefox 4-29 lacks support for adding new properties to `Uint8Array`\n * (See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438). IE 10 lacks support\n * for __proto__ and has a buggy typed array implementation.\n */\nBuffer.TYPED_ARRAY_SUPPORT = typedArraySupport()\n\nif (!Buffer.TYPED_ARRAY_SUPPORT && typeof console !== 'undefined' &&\n typeof console.error === 'function') {\n console.error(\n 'This browser lacks typed array (Uint8Array) support which is required by ' +\n '`buffer` v5.x. Use `buffer` v4.x if you require old browser support.'\n )\n}\n\nfunction typedArraySupport () {\n // Can typed array instances can be augmented?\n try {\n const arr = new Uint8Array(1)\n const proto = { foo: function () { return 42 } }\n Object.setPrototypeOf(proto, Uint8Array.prototype)\n Object.setPrototypeOf(arr, proto)\n return arr.foo() === 42\n } catch (e) {\n return false\n }\n}\n\nObject.defineProperty(Buffer.prototype, 'parent', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.buffer\n }\n})\n\nObject.defineProperty(Buffer.prototype, 'offset', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.byteOffset\n }\n})\n\nfunction createBuffer (length) {\n if (length > K_MAX_LENGTH) {\n throw new RangeError('The value \"' + length + '\" is invalid for option \"size\"')\n }\n // Return an augmented `Uint8Array` instance\n const buf = new Uint8Array(length)\n Object.setPrototypeOf(buf, Buffer.prototype)\n return buf\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new TypeError(\n 'The \"string\" argument must be of type string. Received type number'\n )\n }\n return allocUnsafe(arg)\n }\n return from(arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\nfunction from (value, encodingOrOffset, length) {\n if (typeof value === 'string') {\n return fromString(value, encodingOrOffset)\n }\n\n if (ArrayBuffer.isView(value)) {\n return fromArrayView(value)\n }\n\n if (value == null) {\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n }\n\n if (isInstance(value, ArrayBuffer) ||\n (value && isInstance(value.buffer, ArrayBuffer))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof SharedArrayBuffer !== 'undefined' &&\n (isInstance(value, SharedArrayBuffer) ||\n (value && isInstance(value.buffer, SharedArrayBuffer)))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof value === 'number') {\n throw new TypeError(\n 'The \"value\" argument must not be of type number. Received type number'\n )\n }\n\n const valueOf = value.valueOf && value.valueOf()\n if (valueOf != null && valueOf !== value) {\n return Buffer.from(valueOf, encodingOrOffset, length)\n }\n\n const b = fromObject(value)\n if (b) return b\n\n if (typeof Symbol !== 'undefined' && Symbol.toPrimitive != null &&\n typeof value[Symbol.toPrimitive] === 'function') {\n return Buffer.from(value[Symbol.toPrimitive]('string'), encodingOrOffset, length)\n }\n\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n return from(value, encodingOrOffset, length)\n}\n\n// Note: Change prototype *after* Buffer.from is defined to workaround Chrome bug:\n// https://github.com/feross/buffer/pull/148\nObject.setPrototypeOf(Buffer.prototype, Uint8Array.prototype)\nObject.setPrototypeOf(Buffer, Uint8Array)\n\nfunction assertSize (size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be of type number')\n } else if (size < 0) {\n throw new RangeError('The value \"' + size + '\" is invalid for option \"size\"')\n }\n}\n\nfunction alloc (size, fill, encoding) {\n assertSize(size)\n if (size <= 0) {\n return createBuffer(size)\n }\n if (fill !== undefined) {\n // Only pay attention to encoding if it's a string. This\n // prevents accidentally sending in a number that would\n // be interpreted as a start offset.\n return typeof encoding === 'string'\n ? createBuffer(size).fill(fill, encoding)\n : createBuffer(size).fill(fill)\n }\n return createBuffer(size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n return alloc(size, fill, encoding)\n}\n\nfunction allocUnsafe (size) {\n assertSize(size)\n return createBuffer(size < 0 ? 0 : checked(size) | 0)\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n return allocUnsafe(size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n return allocUnsafe(size)\n}\n\nfunction fromString (string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8'\n }\n\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n\n const length = byteLength(string, encoding) | 0\n let buf = createBuffer(length)\n\n const actual = buf.write(string, encoding)\n\n if (actual !== length) {\n // Writing a hex string, for example, that contains invalid characters will\n // cause everything after the first invalid character to be ignored. (e.g.\n // 'abxxcd' will be treated as 'ab')\n buf = buf.slice(0, actual)\n }\n\n return buf\n}\n\nfunction fromArrayLike (array) {\n const length = array.length < 0 ? 0 : checked(array.length) | 0\n const buf = createBuffer(length)\n for (let i = 0; i < length; i += 1) {\n buf[i] = array[i] & 255\n }\n return buf\n}\n\nfunction fromArrayView (arrayView) {\n if (isInstance(arrayView, Uint8Array)) {\n const copy = new Uint8Array(arrayView)\n return fromArrayBuffer(copy.buffer, copy.byteOffset, copy.byteLength)\n }\n return fromArrayLike(arrayView)\n}\n\nfunction fromArrayBuffer (array, byteOffset, length) {\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\"offset\" is outside of buffer bounds')\n }\n\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\"length\" is outside of buffer bounds')\n }\n\n let buf\n if (byteOffset === undefined && length === undefined) {\n buf = new Uint8Array(array)\n } else if (length === undefined) {\n buf = new Uint8Array(array, byteOffset)\n } else {\n buf = new Uint8Array(array, byteOffset, length)\n }\n\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(buf, Buffer.prototype)\n\n return buf\n}\n\nfunction fromObject (obj) {\n if (Buffer.isBuffer(obj)) {\n const len = checked(obj.length) | 0\n const buf = createBuffer(len)\n\n if (buf.length === 0) {\n return buf\n }\n\n obj.copy(buf, 0, 0, len)\n return buf\n }\n\n if (obj.length !== undefined) {\n if (typeof obj.length !== 'number' || numberIsNaN(obj.length)) {\n return createBuffer(0)\n }\n return fromArrayLike(obj)\n }\n\n if (obj.type === 'Buffer' && Array.isArray(obj.data)) {\n return fromArrayLike(obj.data)\n }\n}\n\nfunction checked (length) {\n // Note: cannot use `length < K_MAX_LENGTH` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= K_MAX_LENGTH) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + K_MAX_LENGTH.toString(16) + ' bytes')\n }\n return length | 0\n}\n\nfunction SlowBuffer (length) {\n if (+length != length) { // eslint-disable-line eqeqeq\n length = 0\n }\n return Buffer.alloc(+length)\n}\n\nBuffer.isBuffer = function isBuffer (b) {\n return b != null && b._isBuffer === true &&\n b !== Buffer.prototype // so Buffer.isBuffer(Buffer.prototype) will be false\n}\n\nBuffer.compare = function compare (a, b) {\n if (isInstance(a, Uint8Array)) a = Buffer.from(a, a.offset, a.byteLength)\n if (isInstance(b, Uint8Array)) b = Buffer.from(b, b.offset, b.byteLength)\n if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n throw new TypeError(\n 'The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array'\n )\n }\n\n if (a === b) return 0\n\n let x = a.length\n let y = b.length\n\n for (let i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i]\n y = b[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n switch (String(encoding).toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'latin1':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return true\n default:\n return false\n }\n}\n\nBuffer.concat = function concat (list, length) {\n if (!Array.isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n\n if (list.length === 0) {\n return Buffer.alloc(0)\n }\n\n let i\n if (length === undefined) {\n length = 0\n for (i = 0; i < list.length; ++i) {\n length += list[i].length\n }\n }\n\n const buffer = Buffer.allocUnsafe(length)\n let pos = 0\n for (i = 0; i < list.length; ++i) {\n let buf = list[i]\n if (isInstance(buf, Uint8Array)) {\n if (pos + buf.length > buffer.length) {\n if (!Buffer.isBuffer(buf)) buf = Buffer.from(buf)\n buf.copy(buffer, pos)\n } else {\n Uint8Array.prototype.set.call(\n buffer,\n buf,\n pos\n )\n }\n } else if (!Buffer.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n } else {\n buf.copy(buffer, pos)\n }\n pos += buf.length\n }\n return buffer\n}\n\nfunction byteLength (string, encoding) {\n if (Buffer.isBuffer(string)) {\n return string.length\n }\n if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) {\n return string.byteLength\n }\n if (typeof string !== 'string') {\n throw new TypeError(\n 'The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. ' +\n 'Received type ' + typeof string\n )\n }\n\n const len = string.length\n const mustMatch = (arguments.length > 2 && arguments[2] === true)\n if (!mustMatch && len === 0) return 0\n\n // Use a for loop to avoid recursion\n let loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'ascii':\n case 'latin1':\n case 'binary':\n return len\n case 'utf8':\n case 'utf-8':\n return utf8ToBytes(string).length\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return len * 2\n case 'hex':\n return len >>> 1\n case 'base64':\n return base64ToBytes(string).length\n default:\n if (loweredCase) {\n return mustMatch ? -1 : utf8ToBytes(string).length // assume utf8\n }\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n let loweredCase = false\n\n // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n // property of a typed array.\n\n // This behaves neither like String nor Uint8Array in that we set start/end\n // to their upper/lower bounds if the value passed is out of range.\n // undefined is handled specially as per ECMA-262 6th Edition,\n // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n if (start === undefined || start < 0) {\n start = 0\n }\n // Return early if start > this.length. Done here to prevent potential uint32\n // coercion fail below.\n if (start > this.length) {\n return ''\n }\n\n if (end === undefined || end > this.length) {\n end = this.length\n }\n\n if (end <= 0) {\n return ''\n }\n\n // Force coercion to uint32. This will also coerce falsey/NaN values to 0.\n end >>>= 0\n start >>>= 0\n\n if (end <= start) {\n return ''\n }\n\n if (!encoding) encoding = 'utf8'\n\n while (true) {\n switch (encoding) {\n case 'hex':\n return hexSlice(this, start, end)\n\n case 'utf8':\n case 'utf-8':\n return utf8Slice(this, start, end)\n\n case 'ascii':\n return asciiSlice(this, start, end)\n\n case 'latin1':\n case 'binary':\n return latin1Slice(this, start, end)\n\n case 'base64':\n return base64Slice(this, start, end)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return utf16leSlice(this, start, end)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = (encoding + '').toLowerCase()\n loweredCase = true\n }\n }\n}\n\n// This property is used by `Buffer.isBuffer` (and the `is-buffer` npm package)\n// to detect a Buffer instance. It's not possible to use `instanceof Buffer`\n// reliably in a browserify context because there could be multiple different\n// copies of the 'buffer' package in use. This method works even for Buffer\n// instances that were created from another copy of the `buffer` package.\n// See: https://github.com/feross/buffer/issues/154\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n const i = b[n]\n b[n] = b[m]\n b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n const len = this.length\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits')\n }\n for (let i = 0; i < len; i += 2) {\n swap(this, i, i + 1)\n }\n return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n const len = this.length\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits')\n }\n for (let i = 0; i < len; i += 4) {\n swap(this, i, i + 3)\n swap(this, i + 1, i + 2)\n }\n return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n const len = this.length\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits')\n }\n for (let i = 0; i < len; i += 8) {\n swap(this, i, i + 7)\n swap(this, i + 1, i + 6)\n swap(this, i + 2, i + 5)\n swap(this, i + 3, i + 4)\n }\n return this\n}\n\nBuffer.prototype.toString = function toString () {\n const length = this.length\n if (length === 0) return ''\n if (arguments.length === 0) return utf8Slice(this, 0, length)\n return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.toLocaleString = Buffer.prototype.toString\n\nBuffer.prototype.equals = function equals (b) {\n if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n if (this === b) return true\n return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n let str = ''\n const max = exports.INSPECT_MAX_BYTES\n str = this.toString('hex', 0, max).replace(/(.{2})/g, '$1 ').trim()\n if (this.length > max) str += ' ... '\n return ''\n}\nif (customInspectSymbol) {\n Buffer.prototype[customInspectSymbol] = Buffer.prototype.inspect\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n if (isInstance(target, Uint8Array)) {\n target = Buffer.from(target, target.offset, target.byteLength)\n }\n if (!Buffer.isBuffer(target)) {\n throw new TypeError(\n 'The \"target\" argument must be one of type Buffer or Uint8Array. ' +\n 'Received type ' + (typeof target)\n )\n }\n\n if (start === undefined) {\n start = 0\n }\n if (end === undefined) {\n end = target ? target.length : 0\n }\n if (thisStart === undefined) {\n thisStart = 0\n }\n if (thisEnd === undefined) {\n thisEnd = this.length\n }\n\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError('out of range index')\n }\n\n if (thisStart >= thisEnd && start >= end) {\n return 0\n }\n if (thisStart >= thisEnd) {\n return -1\n }\n if (start >= end) {\n return 1\n }\n\n start >>>= 0\n end >>>= 0\n thisStart >>>= 0\n thisEnd >>>= 0\n\n if (this === target) return 0\n\n let x = thisEnd - thisStart\n let y = end - start\n const len = Math.min(x, y)\n\n const thisCopy = this.slice(thisStart, thisEnd)\n const targetCopy = target.slice(start, end)\n\n for (let i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i]\n y = targetCopy[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (numberIsNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [val], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n let indexSize = 1\n let arrLength = arr.length\n let valLength = val.length\n\n if (encoding !== undefined) {\n encoding = String(encoding).toLowerCase()\n if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n encoding === 'utf16le' || encoding === 'utf-16le') {\n if (arr.length < 2 || val.length < 2) {\n return -1\n }\n indexSize = 2\n arrLength /= 2\n valLength /= 2\n byteOffset /= 2\n }\n }\n\n function read (buf, i) {\n if (indexSize === 1) {\n return buf[i]\n } else {\n return buf.readUInt16BE(i * indexSize)\n }\n }\n\n let i\n if (dir) {\n let foundIndex = -1\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1) foundIndex = i\n if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n } else {\n if (foundIndex !== -1) i -= i - foundIndex\n foundIndex = -1\n }\n }\n } else {\n if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n for (i = byteOffset; i >= 0; i--) {\n let found = true\n for (let j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false\n break\n }\n }\n if (found) return i\n }\n }\n\n return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n offset = Number(offset) || 0\n const remaining = buf.length - offset\n if (!length) {\n length = remaining\n } else {\n length = Number(length)\n if (length > remaining) {\n length = remaining\n }\n }\n\n const strLen = string.length\n\n if (length > strLen / 2) {\n length = strLen / 2\n }\n let i\n for (i = 0; i < length; ++i) {\n const parsed = parseInt(string.substr(i * 2, 2), 16)\n if (numberIsNaN(parsed)) return i\n buf[offset + i] = parsed\n }\n return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n // Buffer#write(string)\n if (offset === undefined) {\n encoding = 'utf8'\n length = this.length\n offset = 0\n // Buffer#write(string, encoding)\n } else if (length === undefined && typeof offset === 'string') {\n encoding = offset\n length = this.length\n offset = 0\n // Buffer#write(string, offset[, length][, encoding])\n } else if (isFinite(offset)) {\n offset = offset >>> 0\n if (isFinite(length)) {\n length = length >>> 0\n if (encoding === undefined) encoding = 'utf8'\n } else {\n encoding = length\n length = undefined\n }\n } else {\n throw new Error(\n 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n )\n }\n\n const remaining = this.length - offset\n if (length === undefined || length > remaining) length = remaining\n\n if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n throw new RangeError('Attempt to write outside buffer bounds')\n }\n\n if (!encoding) encoding = 'utf8'\n\n let loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'hex':\n return hexWrite(this, string, offset, length)\n\n case 'utf8':\n case 'utf-8':\n return utf8Write(this, string, offset, length)\n\n case 'ascii':\n case 'latin1':\n case 'binary':\n return asciiWrite(this, string, offset, length)\n\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return base64Write(this, string, offset, length)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return ucs2Write(this, string, offset, length)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0)\n }\n}\n\nfunction base64Slice (buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf)\n } else {\n return base64.fromByteArray(buf.slice(start, end))\n }\n}\n\nfunction utf8Slice (buf, start, end) {\n end = Math.min(buf.length, end)\n const res = []\n\n let i = start\n while (i < end) {\n const firstByte = buf[i]\n let codePoint = null\n let bytesPerSequence = (firstByte > 0xEF)\n ? 4\n : (firstByte > 0xDF)\n ? 3\n : (firstByte > 0xBF)\n ? 2\n : 1\n\n if (i + bytesPerSequence <= end) {\n let secondByte, thirdByte, fourthByte, tempCodePoint\n\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 0x80) {\n codePoint = firstByte\n }\n break\n case 2:\n secondByte = buf[i + 1]\n if ((secondByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n if (tempCodePoint > 0x7F) {\n codePoint = tempCodePoint\n }\n }\n break\n case 3:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n codePoint = tempCodePoint\n }\n }\n break\n case 4:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n fourthByte = buf[i + 3]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n codePoint = tempCodePoint\n }\n }\n }\n }\n\n if (codePoint === null) {\n // we did not generate a valid codePoint so insert a\n // replacement char (U+FFFD) and advance only 1 byte\n codePoint = 0xFFFD\n bytesPerSequence = 1\n } else if (codePoint > 0xFFFF) {\n // encode to utf16 (surrogate pair dance)\n codePoint -= 0x10000\n res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n codePoint = 0xDC00 | codePoint & 0x3FF\n }\n\n res.push(codePoint)\n i += bytesPerSequence\n }\n\n return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nconst MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n const len = codePoints.length\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n }\n\n // Decode in chunks to avoid \"call stack size exceeded\".\n let res = ''\n let i = 0\n while (i < len) {\n res += String.fromCharCode.apply(\n String,\n codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n )\n }\n return res\n}\n\nfunction asciiSlice (buf, start, end) {\n let ret = ''\n end = Math.min(buf.length, end)\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F)\n }\n return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n let ret = ''\n end = Math.min(buf.length, end)\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i])\n }\n return ret\n}\n\nfunction hexSlice (buf, start, end) {\n const len = buf.length\n\n if (!start || start < 0) start = 0\n if (!end || end < 0 || end > len) end = len\n\n let out = ''\n for (let i = start; i < end; ++i) {\n out += hexSliceLookupTable[buf[i]]\n }\n return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n const bytes = buf.slice(start, end)\n let res = ''\n // If bytes.length is odd, the last 8 bits must be ignored (same as node.js)\n for (let i = 0; i < bytes.length - 1; i += 2) {\n res += String.fromCharCode(bytes[i] + (bytes[i + 1] * 256))\n }\n return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n const len = this.length\n start = ~~start\n end = end === undefined ? len : ~~end\n\n if (start < 0) {\n start += len\n if (start < 0) start = 0\n } else if (start > len) {\n start = len\n }\n\n if (end < 0) {\n end += len\n if (end < 0) end = 0\n } else if (end > len) {\n end = len\n }\n\n if (end < start) end = start\n\n const newBuf = this.subarray(start, end)\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(newBuf, Buffer.prototype)\n\n return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUintLE =\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let val = this[offset]\n let mul = 1\n let i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUintBE =\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n checkOffset(offset, byteLength, this.length)\n }\n\n let val = this[offset + --byteLength]\n let mul = 1\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUint8 =\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n return this[offset]\n}\n\nBuffer.prototype.readUint16LE =\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUint16BE =\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUint32LE =\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return ((this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16)) +\n (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUint32BE =\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] * 0x1000000) +\n ((this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n this[offset + 3])\n}\n\nBuffer.prototype.readBigUInt64LE = defineBigIntMethod(function readBigUInt64LE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const lo = first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24\n\n const hi = this[++offset] +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n last * 2 ** 24\n\n return BigInt(lo) + (BigInt(hi) << BigInt(32))\n})\n\nBuffer.prototype.readBigUInt64BE = defineBigIntMethod(function readBigUInt64BE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const hi = first * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset]\n\n const lo = this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last\n\n return (BigInt(hi) << BigInt(32)) + BigInt(lo)\n})\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let val = this[offset]\n let mul = 1\n let i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let i = byteLength\n let mul = 1\n let val = this[offset + --i]\n while (i > 0 && (mul *= 0x100)) {\n val += this[offset + --i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n if (!(this[offset] & 0x80)) return (this[offset])\n return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n const val = this[offset] | (this[offset + 1] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n const val = this[offset + 1] | (this[offset] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16) |\n (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] << 24) |\n (this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n (this[offset + 3])\n}\n\nBuffer.prototype.readBigInt64LE = defineBigIntMethod(function readBigInt64LE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const val = this[offset + 4] +\n this[offset + 5] * 2 ** 8 +\n this[offset + 6] * 2 ** 16 +\n (last << 24) // Overflow\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24)\n})\n\nBuffer.prototype.readBigInt64BE = defineBigIntMethod(function readBigInt64BE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const val = (first << 24) + // Overflow\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset]\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last)\n})\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUintLE =\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n let mul = 1\n let i = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUintBE =\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n let i = byteLength - 1\n let mul = 1\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUint8 =\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeUint16LE =\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeUint16BE =\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeUint32LE =\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset + 3] = (value >>> 24)\n this[offset + 2] = (value >>> 16)\n this[offset + 1] = (value >>> 8)\n this[offset] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeUint32BE =\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nfunction wrtBigUInt64LE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7)\n\n let lo = Number(value & BigInt(0xffffffff))\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n return offset\n}\n\nfunction wrtBigUInt64BE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7)\n\n let lo = Number(value & BigInt(0xffffffff))\n buf[offset + 7] = lo\n lo = lo >> 8\n buf[offset + 6] = lo\n lo = lo >> 8\n buf[offset + 5] = lo\n lo = lo >> 8\n buf[offset + 4] = lo\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n buf[offset + 3] = hi\n hi = hi >> 8\n buf[offset + 2] = hi\n hi = hi >> 8\n buf[offset + 1] = hi\n hi = hi >> 8\n buf[offset] = hi\n return offset + 8\n}\n\nBuffer.prototype.writeBigUInt64LE = defineBigIntMethod(function writeBigUInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeBigUInt64BE = defineBigIntMethod(function writeBigUInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n let i = 0\n let mul = 1\n let sub = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n let i = byteLength - 1\n let mul = 1\n let sub = 0\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n if (value < 0) value = 0xff + value + 1\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n this[offset + 2] = (value >>> 16)\n this[offset + 3] = (value >>> 24)\n return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (value < 0) value = 0xffffffff + value + 1\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeBigInt64LE = defineBigIntMethod(function writeBigInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nBuffer.prototype.writeBigInt64BE = defineBigIntMethod(function writeBigInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n }\n ieee754.write(buf, value, offset, littleEndian, 23, 4)\n return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n }\n ieee754.write(buf, value, offset, littleEndian, 52, 8)\n return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n if (!Buffer.isBuffer(target)) throw new TypeError('argument should be a Buffer')\n if (!start) start = 0\n if (!end && end !== 0) end = this.length\n if (targetStart >= target.length) targetStart = target.length\n if (!targetStart) targetStart = 0\n if (end > 0 && end < start) end = start\n\n // Copy 0 bytes; we're done\n if (end === start) return 0\n if (target.length === 0 || this.length === 0) return 0\n\n // Fatal error conditions\n if (targetStart < 0) {\n throw new RangeError('targetStart out of bounds')\n }\n if (start < 0 || start >= this.length) throw new RangeError('Index out of range')\n if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n // Are we oob?\n if (end > this.length) end = this.length\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start\n }\n\n const len = end - start\n\n if (this === target && typeof Uint8Array.prototype.copyWithin === 'function') {\n // Use built-in when available, missing from IE11\n this.copyWithin(targetStart, start, end)\n } else {\n Uint8Array.prototype.set.call(\n target,\n this.subarray(start, end),\n targetStart\n )\n }\n\n return len\n}\n\n// Usage:\n// buffer.fill(number[, offset[, end]])\n// buffer.fill(buffer[, offset[, end]])\n// buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n // Handle string cases:\n if (typeof val === 'string') {\n if (typeof start === 'string') {\n encoding = start\n start = 0\n end = this.length\n } else if (typeof end === 'string') {\n encoding = end\n end = this.length\n }\n if (encoding !== undefined && typeof encoding !== 'string') {\n throw new TypeError('encoding must be a string')\n }\n if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n if (val.length === 1) {\n const code = val.charCodeAt(0)\n if ((encoding === 'utf8' && code < 128) ||\n encoding === 'latin1') {\n // Fast path: If `val` fits into a single byte, use that numeric value.\n val = code\n }\n }\n } else if (typeof val === 'number') {\n val = val & 255\n } else if (typeof val === 'boolean') {\n val = Number(val)\n }\n\n // Invalid ranges are not set to a default, so can range check early.\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError('Out of range index')\n }\n\n if (end <= start) {\n return this\n }\n\n start = start >>> 0\n end = end === undefined ? this.length : end >>> 0\n\n if (!val) val = 0\n\n let i\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val\n }\n } else {\n const bytes = Buffer.isBuffer(val)\n ? val\n : Buffer.from(val, encoding)\n const len = bytes.length\n if (len === 0) {\n throw new TypeError('The value \"' + val +\n '\" is invalid for argument \"value\"')\n }\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len]\n }\n }\n\n return this\n}\n\n// CUSTOM ERRORS\n// =============\n\n// Simplified versions from Node, changed for Buffer-only usage\nconst errors = {}\nfunction E (sym, getMessage, Base) {\n errors[sym] = class NodeError extends Base {\n constructor () {\n super()\n\n Object.defineProperty(this, 'message', {\n value: getMessage.apply(this, arguments),\n writable: true,\n configurable: true\n })\n\n // Add the error code to the name to include it in the stack trace.\n this.name = `${this.name} [${sym}]`\n // Access the stack to generate the error message including the error code\n // from the name.\n this.stack // eslint-disable-line no-unused-expressions\n // Reset the name to the actual name.\n delete this.name\n }\n\n get code () {\n return sym\n }\n\n set code (value) {\n Object.defineProperty(this, 'code', {\n configurable: true,\n enumerable: true,\n value,\n writable: true\n })\n }\n\n toString () {\n return `${this.name} [${sym}]: ${this.message}`\n }\n }\n}\n\nE('ERR_BUFFER_OUT_OF_BOUNDS',\n function (name) {\n if (name) {\n return `${name} is outside of buffer bounds`\n }\n\n return 'Attempt to access memory outside buffer bounds'\n }, RangeError)\nE('ERR_INVALID_ARG_TYPE',\n function (name, actual) {\n return `The \"${name}\" argument must be of type number. Received type ${typeof actual}`\n }, TypeError)\nE('ERR_OUT_OF_RANGE',\n function (str, range, input) {\n let msg = `The value of \"${str}\" is out of range.`\n let received = input\n if (Number.isInteger(input) && Math.abs(input) > 2 ** 32) {\n received = addNumericalSeparator(String(input))\n } else if (typeof input === 'bigint') {\n received = String(input)\n if (input > BigInt(2) ** BigInt(32) || input < -(BigInt(2) ** BigInt(32))) {\n received = addNumericalSeparator(received)\n }\n received += 'n'\n }\n msg += ` It must be ${range}. Received ${received}`\n return msg\n }, RangeError)\n\nfunction addNumericalSeparator (val) {\n let res = ''\n let i = val.length\n const start = val[0] === '-' ? 1 : 0\n for (; i >= start + 4; i -= 3) {\n res = `_${val.slice(i - 3, i)}${res}`\n }\n return `${val.slice(0, i)}${res}`\n}\n\n// CHECK FUNCTIONS\n// ===============\n\nfunction checkBounds (buf, offset, byteLength) {\n validateNumber(offset, 'offset')\n if (buf[offset] === undefined || buf[offset + byteLength] === undefined) {\n boundsError(offset, buf.length - (byteLength + 1))\n }\n}\n\nfunction checkIntBI (value, min, max, buf, offset, byteLength) {\n if (value > max || value < min) {\n const n = typeof min === 'bigint' ? 'n' : ''\n let range\n if (byteLength > 3) {\n if (min === 0 || min === BigInt(0)) {\n range = `>= 0${n} and < 2${n} ** ${(byteLength + 1) * 8}${n}`\n } else {\n range = `>= -(2${n} ** ${(byteLength + 1) * 8 - 1}${n}) and < 2 ** ` +\n `${(byteLength + 1) * 8 - 1}${n}`\n }\n } else {\n range = `>= ${min}${n} and <= ${max}${n}`\n }\n throw new errors.ERR_OUT_OF_RANGE('value', range, value)\n }\n checkBounds(buf, offset, byteLength)\n}\n\nfunction validateNumber (value, name) {\n if (typeof value !== 'number') {\n throw new errors.ERR_INVALID_ARG_TYPE(name, 'number', value)\n }\n}\n\nfunction boundsError (value, length, type) {\n if (Math.floor(value) !== value) {\n validateNumber(value, type)\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset', 'an integer', value)\n }\n\n if (length < 0) {\n throw new errors.ERR_BUFFER_OUT_OF_BOUNDS()\n }\n\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset',\n `>= ${type ? 1 : 0} and <= ${length}`,\n value)\n}\n\n// HELPER FUNCTIONS\n// ================\n\nconst INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n // Node takes equal signs as end of the Base64 encoding\n str = str.split('=')[0]\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = str.trim().replace(INVALID_BASE64_RE, '')\n // Node converts strings with length < 2 to ''\n if (str.length < 2) return ''\n // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n while (str.length % 4 !== 0) {\n str = str + '='\n }\n return str\n}\n\nfunction utf8ToBytes (string, units) {\n units = units || Infinity\n let codePoint\n const length = string.length\n let leadSurrogate = null\n const bytes = []\n\n for (let i = 0; i < length; ++i) {\n codePoint = string.charCodeAt(i)\n\n // is surrogate component\n if (codePoint > 0xD7FF && codePoint < 0xE000) {\n // last char was a lead\n if (!leadSurrogate) {\n // no lead yet\n if (codePoint > 0xDBFF) {\n // unexpected trail\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n } else if (i + 1 === length) {\n // unpaired lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n }\n\n // valid lead\n leadSurrogate = codePoint\n\n continue\n }\n\n // 2 leads in a row\n if (codePoint < 0xDC00) {\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n leadSurrogate = codePoint\n continue\n }\n\n // valid surrogate pair\n codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n } else if (leadSurrogate) {\n // valid bmp char, but last char was a lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n }\n\n leadSurrogate = null\n\n // encode utf8\n if (codePoint < 0x80) {\n if ((units -= 1) < 0) break\n bytes.push(codePoint)\n } else if (codePoint < 0x800) {\n if ((units -= 2) < 0) break\n bytes.push(\n codePoint >> 0x6 | 0xC0,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x10000) {\n if ((units -= 3) < 0) break\n bytes.push(\n codePoint >> 0xC | 0xE0,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x110000) {\n if ((units -= 4) < 0) break\n bytes.push(\n codePoint >> 0x12 | 0xF0,\n codePoint >> 0xC & 0x3F | 0x80,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else {\n throw new Error('Invalid code point')\n }\n }\n\n return bytes\n}\n\nfunction asciiToBytes (str) {\n const byteArray = []\n for (let i = 0; i < str.length; ++i) {\n // Node's code seems to be doing this and not & 0x7F..\n byteArray.push(str.charCodeAt(i) & 0xFF)\n }\n return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n let c, hi, lo\n const byteArray = []\n for (let i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0) break\n\n c = str.charCodeAt(i)\n hi = c >> 8\n lo = c % 256\n byteArray.push(lo)\n byteArray.push(hi)\n }\n\n return byteArray\n}\n\nfunction base64ToBytes (str) {\n return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n let i\n for (i = 0; i < length; ++i) {\n if ((i + offset >= dst.length) || (i >= src.length)) break\n dst[i + offset] = src[i]\n }\n return i\n}\n\n// ArrayBuffer or Uint8Array objects from other contexts (i.e. iframes) do not pass\n// the `instanceof` check but they should be treated as of that type.\n// See: https://github.com/feross/buffer/issues/166\nfunction isInstance (obj, type) {\n return obj instanceof type ||\n (obj != null && obj.constructor != null && obj.constructor.name != null &&\n obj.constructor.name === type.name)\n}\nfunction numberIsNaN (obj) {\n // For IE11 support\n return obj !== obj // eslint-disable-line no-self-compare\n}\n\n// Create lookup table for `toString('hex')`\n// See: https://github.com/feross/buffer/issues/219\nconst hexSliceLookupTable = (function () {\n const alphabet = '0123456789abcdef'\n const table = new Array(256)\n for (let i = 0; i < 16; ++i) {\n const i16 = i * 16\n for (let j = 0; j < 16; ++j) {\n table[i16 + j] = alphabet[i] + alphabet[j]\n }\n }\n return table\n})()\n\n// Return not function with Error if BigInt not supported\nfunction defineBigIntMethod (fn) {\n return typeof BigInt === 'undefined' ? BufferBigIntNotDefined : fn\n}\n\nfunction BufferBigIntNotDefined () {\n throw new Error('BigInt not supported')\n}\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\nvar R = typeof Reflect === 'object' ? Reflect : null\nvar ReflectApply = R && typeof R.apply === 'function'\n ? R.apply\n : function ReflectApply(target, receiver, args) {\n return Function.prototype.apply.call(target, receiver, args);\n }\n\nvar ReflectOwnKeys\nif (R && typeof R.ownKeys === 'function') {\n ReflectOwnKeys = R.ownKeys\n} else if (Object.getOwnPropertySymbols) {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target)\n .concat(Object.getOwnPropertySymbols(target));\n };\n} else {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target);\n };\n}\n\nfunction ProcessEmitWarning(warning) {\n if (console && console.warn) console.warn(warning);\n}\n\nvar NumberIsNaN = Number.isNaN || function NumberIsNaN(value) {\n return value !== value;\n}\n\nfunction EventEmitter() {\n EventEmitter.init.call(this);\n}\nmodule.exports = EventEmitter;\nmodule.exports.once = once;\n\n// Backwards-compat with node 0.10.x\nEventEmitter.EventEmitter = EventEmitter;\n\nEventEmitter.prototype._events = undefined;\nEventEmitter.prototype._eventsCount = 0;\nEventEmitter.prototype._maxListeners = undefined;\n\n// By default EventEmitters will print a warning if more than 10 listeners are\n// added to it. This is a useful default which helps finding memory leaks.\nvar defaultMaxListeners = 10;\n\nfunction checkListener(listener) {\n if (typeof listener !== 'function') {\n throw new TypeError('The \"listener\" argument must be of type Function. Received type ' + typeof listener);\n }\n}\n\nObject.defineProperty(EventEmitter, 'defaultMaxListeners', {\n enumerable: true,\n get: function() {\n return defaultMaxListeners;\n },\n set: function(arg) {\n if (typeof arg !== 'number' || arg < 0 || NumberIsNaN(arg)) {\n throw new RangeError('The value of \"defaultMaxListeners\" is out of range. It must be a non-negative number. Received ' + arg + '.');\n }\n defaultMaxListeners = arg;\n }\n});\n\nEventEmitter.init = function() {\n\n if (this._events === undefined ||\n this._events === Object.getPrototypeOf(this)._events) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n }\n\n this._maxListeners = this._maxListeners || undefined;\n};\n\n// Obviously not all Emitters should be limited to 10. This function allows\n// that to be increased. Set to zero for unlimited.\nEventEmitter.prototype.setMaxListeners = function setMaxListeners(n) {\n if (typeof n !== 'number' || n < 0 || NumberIsNaN(n)) {\n throw new RangeError('The value of \"n\" is out of range. It must be a non-negative number. Received ' + n + '.');\n }\n this._maxListeners = n;\n return this;\n};\n\nfunction _getMaxListeners(that) {\n if (that._maxListeners === undefined)\n return EventEmitter.defaultMaxListeners;\n return that._maxListeners;\n}\n\nEventEmitter.prototype.getMaxListeners = function getMaxListeners() {\n return _getMaxListeners(this);\n};\n\nEventEmitter.prototype.emit = function emit(type) {\n var args = [];\n for (var i = 1; i < arguments.length; i++) args.push(arguments[i]);\n var doError = (type === 'error');\n\n var events = this._events;\n if (events !== undefined)\n doError = (doError && events.error === undefined);\n else if (!doError)\n return false;\n\n // If there is no 'error' event listener then throw.\n if (doError) {\n var er;\n if (args.length > 0)\n er = args[0];\n if (er instanceof Error) {\n // Note: The comments on the `throw` lines are intentional, they show\n // up in Node's output if this results in an unhandled exception.\n throw er; // Unhandled 'error' event\n }\n // At least give some kind of context to the user\n var err = new Error('Unhandled error.' + (er ? ' (' + er.message + ')' : ''));\n err.context = er;\n throw err; // Unhandled 'error' event\n }\n\n var handler = events[type];\n\n if (handler === undefined)\n return false;\n\n if (typeof handler === 'function') {\n ReflectApply(handler, this, args);\n } else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n ReflectApply(listeners[i], this, args);\n }\n\n return true;\n};\n\nfunction _addListener(target, type, listener, prepend) {\n var m;\n var events;\n var existing;\n\n checkListener(listener);\n\n events = target._events;\n if (events === undefined) {\n events = target._events = Object.create(null);\n target._eventsCount = 0;\n } else {\n // To avoid recursion in the case that type === \"newListener\"! Before\n // adding it to the listeners, first emit \"newListener\".\n if (events.newListener !== undefined) {\n target.emit('newListener', type,\n listener.listener ? listener.listener : listener);\n\n // Re-assign `events` because a newListener handler could have caused the\n // this._events to be assigned to a new object\n events = target._events;\n }\n existing = events[type];\n }\n\n if (existing === undefined) {\n // Optimize the case of one listener. Don't need the extra array object.\n existing = events[type] = listener;\n ++target._eventsCount;\n } else {\n if (typeof existing === 'function') {\n // Adding the second element, need to change to array.\n existing = events[type] =\n prepend ? [listener, existing] : [existing, listener];\n // If we've already got an array, just append.\n } else if (prepend) {\n existing.unshift(listener);\n } else {\n existing.push(listener);\n }\n\n // Check for listener leak\n m = _getMaxListeners(target);\n if (m > 0 && existing.length > m && !existing.warned) {\n existing.warned = true;\n // No error code for this since it is a Warning\n // eslint-disable-next-line no-restricted-syntax\n var w = new Error('Possible EventEmitter memory leak detected. ' +\n existing.length + ' ' + String(type) + ' listeners ' +\n 'added. Use emitter.setMaxListeners() to ' +\n 'increase limit');\n w.name = 'MaxListenersExceededWarning';\n w.emitter = target;\n w.type = type;\n w.count = existing.length;\n ProcessEmitWarning(w);\n }\n }\n\n return target;\n}\n\nEventEmitter.prototype.addListener = function addListener(type, listener) {\n return _addListener(this, type, listener, false);\n};\n\nEventEmitter.prototype.on = EventEmitter.prototype.addListener;\n\nEventEmitter.prototype.prependListener =\n function prependListener(type, listener) {\n return _addListener(this, type, listener, true);\n };\n\nfunction onceWrapper() {\n if (!this.fired) {\n this.target.removeListener(this.type, this.wrapFn);\n this.fired = true;\n if (arguments.length === 0)\n return this.listener.call(this.target);\n return this.listener.apply(this.target, arguments);\n }\n}\n\nfunction _onceWrap(target, type, listener) {\n var state = { fired: false, wrapFn: undefined, target: target, type: type, listener: listener };\n var wrapped = onceWrapper.bind(state);\n wrapped.listener = listener;\n state.wrapFn = wrapped;\n return wrapped;\n}\n\nEventEmitter.prototype.once = function once(type, listener) {\n checkListener(listener);\n this.on(type, _onceWrap(this, type, listener));\n return this;\n};\n\nEventEmitter.prototype.prependOnceListener =\n function prependOnceListener(type, listener) {\n checkListener(listener);\n this.prependListener(type, _onceWrap(this, type, listener));\n return this;\n };\n\n// Emits a 'removeListener' event if and only if the listener was removed.\nEventEmitter.prototype.removeListener =\n function removeListener(type, listener) {\n var list, events, position, i, originalListener;\n\n checkListener(listener);\n\n events = this._events;\n if (events === undefined)\n return this;\n\n list = events[type];\n if (list === undefined)\n return this;\n\n if (list === listener || list.listener === listener) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else {\n delete events[type];\n if (events.removeListener)\n this.emit('removeListener', type, list.listener || listener);\n }\n } else if (typeof list !== 'function') {\n position = -1;\n\n for (i = list.length - 1; i >= 0; i--) {\n if (list[i] === listener || list[i].listener === listener) {\n originalListener = list[i].listener;\n position = i;\n break;\n }\n }\n\n if (position < 0)\n return this;\n\n if (position === 0)\n list.shift();\n else {\n spliceOne(list, position);\n }\n\n if (list.length === 1)\n events[type] = list[0];\n\n if (events.removeListener !== undefined)\n this.emit('removeListener', type, originalListener || listener);\n }\n\n return this;\n };\n\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\n\nEventEmitter.prototype.removeAllListeners =\n function removeAllListeners(type) {\n var listeners, events, i;\n\n events = this._events;\n if (events === undefined)\n return this;\n\n // not listening for removeListener, no need to emit\n if (events.removeListener === undefined) {\n if (arguments.length === 0) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n } else if (events[type] !== undefined) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else\n delete events[type];\n }\n return this;\n }\n\n // emit removeListener for all listeners on all events\n if (arguments.length === 0) {\n var keys = Object.keys(events);\n var key;\n for (i = 0; i < keys.length; ++i) {\n key = keys[i];\n if (key === 'removeListener') continue;\n this.removeAllListeners(key);\n }\n this.removeAllListeners('removeListener');\n this._events = Object.create(null);\n this._eventsCount = 0;\n return this;\n }\n\n listeners = events[type];\n\n if (typeof listeners === 'function') {\n this.removeListener(type, listeners);\n } else if (listeners !== undefined) {\n // LIFO order\n for (i = listeners.length - 1; i >= 0; i--) {\n this.removeListener(type, listeners[i]);\n }\n }\n\n return this;\n };\n\nfunction _listeners(target, type, unwrap) {\n var events = target._events;\n\n if (events === undefined)\n return [];\n\n var evlistener = events[type];\n if (evlistener === undefined)\n return [];\n\n if (typeof evlistener === 'function')\n return unwrap ? [evlistener.listener || evlistener] : [evlistener];\n\n return unwrap ?\n unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length);\n}\n\nEventEmitter.prototype.listeners = function listeners(type) {\n return _listeners(this, type, true);\n};\n\nEventEmitter.prototype.rawListeners = function rawListeners(type) {\n return _listeners(this, type, false);\n};\n\nEventEmitter.listenerCount = function(emitter, type) {\n if (typeof emitter.listenerCount === 'function') {\n return emitter.listenerCount(type);\n } else {\n return listenerCount.call(emitter, type);\n }\n};\n\nEventEmitter.prototype.listenerCount = listenerCount;\nfunction listenerCount(type) {\n var events = this._events;\n\n if (events !== undefined) {\n var evlistener = events[type];\n\n if (typeof evlistener === 'function') {\n return 1;\n } else if (evlistener !== undefined) {\n return evlistener.length;\n }\n }\n\n return 0;\n}\n\nEventEmitter.prototype.eventNames = function eventNames() {\n return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : [];\n};\n\nfunction arrayClone(arr, n) {\n var copy = new Array(n);\n for (var i = 0; i < n; ++i)\n copy[i] = arr[i];\n return copy;\n}\n\nfunction spliceOne(list, index) {\n for (; index + 1 < list.length; index++)\n list[index] = list[index + 1];\n list.pop();\n}\n\nfunction unwrapListeners(arr) {\n var ret = new Array(arr.length);\n for (var i = 0; i < ret.length; ++i) {\n ret[i] = arr[i].listener || arr[i];\n }\n return ret;\n}\n\nfunction once(emitter, name) {\n return new Promise(function (resolve, reject) {\n function errorListener(err) {\n emitter.removeListener(name, resolver);\n reject(err);\n }\n\n function resolver() {\n if (typeof emitter.removeListener === 'function') {\n emitter.removeListener('error', errorListener);\n }\n resolve([].slice.call(arguments));\n };\n\n eventTargetAgnosticAddListener(emitter, name, resolver, { once: true });\n if (name !== 'error') {\n addErrorHandlerIfEventEmitter(emitter, errorListener, { once: true });\n }\n });\n}\n\nfunction addErrorHandlerIfEventEmitter(emitter, handler, flags) {\n if (typeof emitter.on === 'function') {\n eventTargetAgnosticAddListener(emitter, 'error', handler, flags);\n }\n}\n\nfunction eventTargetAgnosticAddListener(emitter, name, listener, flags) {\n if (typeof emitter.on === 'function') {\n if (flags.once) {\n emitter.once(name, listener);\n } else {\n emitter.on(name, listener);\n }\n } else if (typeof emitter.addEventListener === 'function') {\n // EventTarget does not have `error` event semantics like Node\n // EventEmitters, we do not listen for `error` events here.\n emitter.addEventListener(name, function wrapListener(arg) {\n // IE does not have builtin `{ once: true }` support so we\n // have to do it manually.\n if (flags.once) {\n emitter.removeEventListener(name, wrapListener);\n }\n listener(arg);\n });\n } else {\n throw new TypeError('The \"emitter\" argument must be of type EventEmitter. Received type ' + typeof emitter);\n }\n}\n","/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */\nexports.read = function (buffer, offset, isLE, mLen, nBytes) {\n var e, m\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var nBits = -7\n var i = isLE ? (nBytes - 1) : 0\n var d = isLE ? -1 : 1\n var s = buffer[offset + i]\n\n i += d\n\n e = s & ((1 << (-nBits)) - 1)\n s >>= (-nBits)\n nBits += eLen\n for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & ((1 << (-nBits)) - 1)\n e >>= (-nBits)\n nBits += mLen\n for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias\n } else if (e === eMax) {\n return m ? NaN : ((s ? -1 : 1) * Infinity)\n } else {\n m = m + Math.pow(2, mLen)\n e = e - eBias\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n var i = isLE ? 0 : (nBytes - 1)\n var d = isLE ? 1 : -1\n var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n value = Math.abs(value)\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0\n e = eMax\n } else {\n e = Math.floor(Math.log(value) / Math.LN2)\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--\n c *= 2\n }\n if (e + eBias >= 1) {\n value += rt / c\n } else {\n value += rt * Math.pow(2, 1 - eBias)\n }\n if (value * c >= 2) {\n e++\n c /= 2\n }\n\n if (e + eBias >= eMax) {\n m = 0\n e = eMax\n } else if (e + eBias >= 1) {\n m = ((value * c) - 1) * Math.pow(2, mLen)\n e = e + eBias\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n e = 0\n }\n }\n\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n e = (e << mLen) | m\n eLen += mLen\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128\n}\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView');\n\nmodule.exports = DataView;\n","var hashClear = require('./_hashClear'),\n hashDelete = require('./_hashDelete'),\n hashGet = require('./_hashGet'),\n hashHas = require('./_hashHas'),\n hashSet = require('./_hashSet');\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\nmodule.exports = Hash;\n","var listCacheClear = require('./_listCacheClear'),\n listCacheDelete = require('./_listCacheDelete'),\n listCacheGet = require('./_listCacheGet'),\n listCacheHas = require('./_listCacheHas'),\n listCacheSet = require('./_listCacheSet');\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\nmodule.exports = ListCache;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map');\n\nmodule.exports = Map;\n","var mapCacheClear = require('./_mapCacheClear'),\n mapCacheDelete = require('./_mapCacheDelete'),\n mapCacheGet = require('./_mapCacheGet'),\n mapCacheHas = require('./_mapCacheHas'),\n mapCacheSet = require('./_mapCacheSet');\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\nmodule.exports = MapCache;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Promise = getNative(root, 'Promise');\n\nmodule.exports = Promise;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Set = getNative(root, 'Set');\n\nmodule.exports = Set;\n","var MapCache = require('./_MapCache'),\n setCacheAdd = require('./_setCacheAdd'),\n setCacheHas = require('./_setCacheHas');\n\n/**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\nfunction SetCache(values) {\n var index = -1,\n length = values == null ? 0 : values.length;\n\n this.__data__ = new MapCache;\n while (++index < length) {\n this.add(values[index]);\n }\n}\n\n// Add methods to `SetCache`.\nSetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\nSetCache.prototype.has = setCacheHas;\n\nmodule.exports = SetCache;\n","var ListCache = require('./_ListCache'),\n stackClear = require('./_stackClear'),\n stackDelete = require('./_stackDelete'),\n stackGet = require('./_stackGet'),\n stackHas = require('./_stackHas'),\n stackSet = require('./_stackSet');\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\nmodule.exports = Stack;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Uint8Array = root.Uint8Array;\n\nmodule.exports = Uint8Array;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar WeakMap = getNative(root, 'WeakMap');\n\nmodule.exports = WeakMap;\n","/**\n * A specialized version of `_.forEach` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\nfunction arrayEach(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (iteratee(array[index], index, array) === false) {\n break;\n }\n }\n return array;\n}\n\nmodule.exports = arrayEach;\n","/**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\nfunction arrayFilter(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result[resIndex++] = value;\n }\n }\n return result;\n}\n\nmodule.exports = arrayFilter;\n","var baseTimes = require('./_baseTimes'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isIndex = require('./_isIndex'),\n isTypedArray = require('./isTypedArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = arrayLikeKeys;\n","/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n}\n\nmodule.exports = arrayPush;\n","/**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\nfunction arraySome(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (predicate(array[index], index, array)) {\n return true;\n }\n }\n return false;\n}\n\nmodule.exports = arraySome;\n","var baseAssignValue = require('./_baseAssignValue'),\n eq = require('./eq');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\nmodule.exports = assignValue;\n","var eq = require('./eq');\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\nmodule.exports = assocIndexOf;\n","var copyObject = require('./_copyObject'),\n keys = require('./keys');\n\n/**\n * The base implementation of `_.assign` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssign(object, source) {\n return object && copyObject(source, keys(source), object);\n}\n\nmodule.exports = baseAssign;\n","var copyObject = require('./_copyObject'),\n keysIn = require('./keysIn');\n\n/**\n * The base implementation of `_.assignIn` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssignIn(object, source) {\n return object && copyObject(source, keysIn(source), object);\n}\n\nmodule.exports = baseAssignIn;\n","var defineProperty = require('./_defineProperty');\n\n/**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction baseAssignValue(object, key, value) {\n if (key == '__proto__' && defineProperty) {\n defineProperty(object, key, {\n 'configurable': true,\n 'enumerable': true,\n 'value': value,\n 'writable': true\n });\n } else {\n object[key] = value;\n }\n}\n\nmodule.exports = baseAssignValue;\n","var Stack = require('./_Stack'),\n arrayEach = require('./_arrayEach'),\n assignValue = require('./_assignValue'),\n baseAssign = require('./_baseAssign'),\n baseAssignIn = require('./_baseAssignIn'),\n cloneBuffer = require('./_cloneBuffer'),\n copyArray = require('./_copyArray'),\n copySymbols = require('./_copySymbols'),\n copySymbolsIn = require('./_copySymbolsIn'),\n getAllKeys = require('./_getAllKeys'),\n getAllKeysIn = require('./_getAllKeysIn'),\n getTag = require('./_getTag'),\n initCloneArray = require('./_initCloneArray'),\n initCloneByTag = require('./_initCloneByTag'),\n initCloneObject = require('./_initCloneObject'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isMap = require('./isMap'),\n isObject = require('./isObject'),\n isSet = require('./isSet'),\n keys = require('./keys'),\n keysIn = require('./keysIn');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_FLAT_FLAG = 2,\n CLONE_SYMBOLS_FLAG = 4;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values supported by `_.clone`. */\nvar cloneableTags = {};\ncloneableTags[argsTag] = cloneableTags[arrayTag] =\ncloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =\ncloneableTags[boolTag] = cloneableTags[dateTag] =\ncloneableTags[float32Tag] = cloneableTags[float64Tag] =\ncloneableTags[int8Tag] = cloneableTags[int16Tag] =\ncloneableTags[int32Tag] = cloneableTags[mapTag] =\ncloneableTags[numberTag] = cloneableTags[objectTag] =\ncloneableTags[regexpTag] = cloneableTags[setTag] =\ncloneableTags[stringTag] = cloneableTags[symbolTag] =\ncloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =\ncloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;\ncloneableTags[errorTag] = cloneableTags[funcTag] =\ncloneableTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.clone` and `_.cloneDeep` which tracks\n * traversed objects.\n *\n * @private\n * @param {*} value The value to clone.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Deep clone\n * 2 - Flatten inherited properties\n * 4 - Clone symbols\n * @param {Function} [customizer] The function to customize cloning.\n * @param {string} [key] The key of `value`.\n * @param {Object} [object] The parent object of `value`.\n * @param {Object} [stack] Tracks traversed objects and their clone counterparts.\n * @returns {*} Returns the cloned value.\n */\nfunction baseClone(value, bitmask, customizer, key, object, stack) {\n var result,\n isDeep = bitmask & CLONE_DEEP_FLAG,\n isFlat = bitmask & CLONE_FLAT_FLAG,\n isFull = bitmask & CLONE_SYMBOLS_FLAG;\n\n if (customizer) {\n result = object ? customizer(value, key, object, stack) : customizer(value);\n }\n if (result !== undefined) {\n return result;\n }\n if (!isObject(value)) {\n return value;\n }\n var isArr = isArray(value);\n if (isArr) {\n result = initCloneArray(value);\n if (!isDeep) {\n return copyArray(value, result);\n }\n } else {\n var tag = getTag(value),\n isFunc = tag == funcTag || tag == genTag;\n\n if (isBuffer(value)) {\n return cloneBuffer(value, isDeep);\n }\n if (tag == objectTag || tag == argsTag || (isFunc && !object)) {\n result = (isFlat || isFunc) ? {} : initCloneObject(value);\n if (!isDeep) {\n return isFlat\n ? copySymbolsIn(value, baseAssignIn(result, value))\n : copySymbols(value, baseAssign(result, value));\n }\n } else {\n if (!cloneableTags[tag]) {\n return object ? value : {};\n }\n result = initCloneByTag(value, tag, isDeep);\n }\n }\n // Check for circular references and return its corresponding clone.\n stack || (stack = new Stack);\n var stacked = stack.get(value);\n if (stacked) {\n return stacked;\n }\n stack.set(value, result);\n\n if (isSet(value)) {\n value.forEach(function(subValue) {\n result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));\n });\n } else if (isMap(value)) {\n value.forEach(function(subValue, key) {\n result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n }\n\n var keysFunc = isFull\n ? (isFlat ? getAllKeysIn : getAllKeys)\n : (isFlat ? keysIn : keys);\n\n var props = isArr ? undefined : keysFunc(value);\n arrayEach(props || value, function(subValue, key) {\n if (props) {\n key = subValue;\n subValue = value[key];\n }\n // Recursively populate clone (susceptible to call stack limits).\n assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n return result;\n}\n\nmodule.exports = baseClone;\n","var isObject = require('./isObject');\n\n/** Built-in value references. */\nvar objectCreate = Object.create;\n\n/**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} proto The object to inherit from.\n * @returns {Object} Returns the new object.\n */\nvar baseCreate = (function() {\n function object() {}\n return function(proto) {\n if (!isObject(proto)) {\n return {};\n }\n if (objectCreate) {\n return objectCreate(proto);\n }\n object.prototype = proto;\n var result = new object;\n object.prototype = undefined;\n return result;\n };\n}());\n\nmodule.exports = baseCreate;\n","var arrayPush = require('./_arrayPush'),\n isArray = require('./isArray');\n\n/**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction baseGetAllKeys(object, keysFunc, symbolsFunc) {\n var result = keysFunc(object);\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n}\n\nmodule.exports = baseGetAllKeys;\n","var Symbol = require('./_Symbol'),\n getRawTag = require('./_getRawTag'),\n objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]';\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\nmodule.exports = baseIsArguments;\n","var baseIsEqualDeep = require('./_baseIsEqualDeep'),\n isObjectLike = require('./isObjectLike');\n\n/**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Unordered comparison\n * 2 - Partial comparison\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\nfunction baseIsEqual(value, other, bitmask, customizer, stack) {\n if (value === other) {\n return true;\n }\n if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\n return value !== value && other !== other;\n }\n return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n}\n\nmodule.exports = baseIsEqual;\n","var Stack = require('./_Stack'),\n equalArrays = require('./_equalArrays'),\n equalByTag = require('./_equalByTag'),\n equalObjects = require('./_equalObjects'),\n getTag = require('./_getTag'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isTypedArray = require('./isTypedArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n var objIsArr = isArray(object),\n othIsArr = isArray(other),\n objTag = objIsArr ? arrayTag : getTag(object),\n othTag = othIsArr ? arrayTag : getTag(other);\n\n objTag = objTag == argsTag ? objectTag : objTag;\n othTag = othTag == argsTag ? objectTag : othTag;\n\n var objIsObj = objTag == objectTag,\n othIsObj = othTag == objectTag,\n isSameTag = objTag == othTag;\n\n if (isSameTag && isBuffer(object)) {\n if (!isBuffer(other)) {\n return false;\n }\n objIsArr = true;\n objIsObj = false;\n }\n if (isSameTag && !objIsObj) {\n stack || (stack = new Stack);\n return (objIsArr || isTypedArray(object))\n ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n }\n if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n if (objIsWrapped || othIsWrapped) {\n var objUnwrapped = objIsWrapped ? object.value() : object,\n othUnwrapped = othIsWrapped ? other.value() : other;\n\n stack || (stack = new Stack);\n return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n }\n }\n if (!isSameTag) {\n return false;\n }\n stack || (stack = new Stack);\n return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n}\n\nmodule.exports = baseIsEqualDeep;\n","var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]';\n\n/**\n * The base implementation of `_.isMap` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n */\nfunction baseIsMap(value) {\n return isObjectLike(value) && getTag(value) == mapTag;\n}\n\nmodule.exports = baseIsMap;\n","var isFunction = require('./isFunction'),\n isMasked = require('./_isMasked'),\n isObject = require('./isObject'),\n toSource = require('./_toSource');\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\nmodule.exports = baseIsNative;\n","var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar setTag = '[object Set]';\n\n/**\n * The base implementation of `_.isSet` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n */\nfunction baseIsSet(value) {\n return isObjectLike(value) && getTag(value) == setTag;\n}\n\nmodule.exports = baseIsSet;\n","var baseGetTag = require('./_baseGetTag'),\n isLength = require('./isLength'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n\nmodule.exports = baseIsTypedArray;\n","var isPrototype = require('./_isPrototype'),\n nativeKeys = require('./_nativeKeys');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeys;\n","var isObject = require('./isObject'),\n isPrototype = require('./_isPrototype'),\n nativeKeysIn = require('./_nativeKeysIn');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeysIn(object) {\n if (!isObject(object)) {\n return nativeKeysIn(object);\n }\n var isProto = isPrototype(object),\n result = [];\n\n for (var key in object) {\n if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeysIn;\n","/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\nmodule.exports = baseTimes;\n","/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n return function(value) {\n return func(value);\n };\n}\n\nmodule.exports = baseUnary;\n","/**\n * Checks if a `cache` value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction cacheHas(cache, key) {\n return cache.has(key);\n}\n\nmodule.exports = cacheHas;\n","var Uint8Array = require('./_Uint8Array');\n\n/**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\nfunction cloneArrayBuffer(arrayBuffer) {\n var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n return result;\n}\n\nmodule.exports = cloneArrayBuffer;\n","var root = require('./_root');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined,\n allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;\n\n/**\n * Creates a clone of `buffer`.\n *\n * @private\n * @param {Buffer} buffer The buffer to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Buffer} Returns the cloned buffer.\n */\nfunction cloneBuffer(buffer, isDeep) {\n if (isDeep) {\n return buffer.slice();\n }\n var length = buffer.length,\n result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\n\n buffer.copy(result);\n return result;\n}\n\nmodule.exports = cloneBuffer;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer');\n\n/**\n * Creates a clone of `dataView`.\n *\n * @private\n * @param {Object} dataView The data view to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned data view.\n */\nfunction cloneDataView(dataView, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;\n return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);\n}\n\nmodule.exports = cloneDataView;\n","/** Used to match `RegExp` flags from their coerced string values. */\nvar reFlags = /\\w*$/;\n\n/**\n * Creates a clone of `regexp`.\n *\n * @private\n * @param {Object} regexp The regexp to clone.\n * @returns {Object} Returns the cloned regexp.\n */\nfunction cloneRegExp(regexp) {\n var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));\n result.lastIndex = regexp.lastIndex;\n return result;\n}\n\nmodule.exports = cloneRegExp;\n","var Symbol = require('./_Symbol');\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * Creates a clone of the `symbol` object.\n *\n * @private\n * @param {Object} symbol The symbol object to clone.\n * @returns {Object} Returns the cloned symbol object.\n */\nfunction cloneSymbol(symbol) {\n return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};\n}\n\nmodule.exports = cloneSymbol;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer');\n\n/**\n * Creates a clone of `typedArray`.\n *\n * @private\n * @param {Object} typedArray The typed array to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned typed array.\n */\nfunction cloneTypedArray(typedArray, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n}\n\nmodule.exports = cloneTypedArray;\n","/**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\nfunction copyArray(source, array) {\n var index = -1,\n length = source.length;\n\n array || (array = Array(length));\n while (++index < length) {\n array[index] = source[index];\n }\n return array;\n}\n\nmodule.exports = copyArray;\n","var assignValue = require('./_assignValue'),\n baseAssignValue = require('./_baseAssignValue');\n\n/**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\nfunction copyObject(source, props, object, customizer) {\n var isNew = !object;\n object || (object = {});\n\n var index = -1,\n length = props.length;\n\n while (++index < length) {\n var key = props[index];\n\n var newValue = customizer\n ? customizer(object[key], source[key], key, object, source)\n : undefined;\n\n if (newValue === undefined) {\n newValue = source[key];\n }\n if (isNew) {\n baseAssignValue(object, key, newValue);\n } else {\n assignValue(object, key, newValue);\n }\n }\n return object;\n}\n\nmodule.exports = copyObject;\n","var copyObject = require('./_copyObject'),\n getSymbols = require('./_getSymbols');\n\n/**\n * Copies own symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbols(source, object) {\n return copyObject(source, getSymbols(source), object);\n}\n\nmodule.exports = copySymbols;\n","var copyObject = require('./_copyObject'),\n getSymbolsIn = require('./_getSymbolsIn');\n\n/**\n * Copies own and inherited symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbolsIn(source, object) {\n return copyObject(source, getSymbolsIn(source), object);\n}\n\nmodule.exports = copySymbolsIn;\n","var root = require('./_root');\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\nmodule.exports = coreJsData;\n","var getNative = require('./_getNative');\n\nvar defineProperty = (function() {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n}());\n\nmodule.exports = defineProperty;\n","var SetCache = require('./_SetCache'),\n arraySome = require('./_arraySome'),\n cacheHas = require('./_cacheHas');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\nfunction equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n arrLength = array.length,\n othLength = other.length;\n\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n return false;\n }\n // Check that cyclic values are equal.\n var arrStacked = stack.get(array);\n var othStacked = stack.get(other);\n if (arrStacked && othStacked) {\n return arrStacked == other && othStacked == array;\n }\n var index = -1,\n result = true,\n seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n stack.set(array, other);\n stack.set(other, array);\n\n // Ignore non-index properties.\n while (++index < arrLength) {\n var arrValue = array[index],\n othValue = other[index];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, arrValue, index, other, array, stack)\n : customizer(arrValue, othValue, index, array, other, stack);\n }\n if (compared !== undefined) {\n if (compared) {\n continue;\n }\n result = false;\n break;\n }\n // Recursively compare arrays (susceptible to call stack limits).\n if (seen) {\n if (!arraySome(other, function(othValue, othIndex) {\n if (!cacheHas(seen, othIndex) &&\n (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n return seen.push(othIndex);\n }\n })) {\n result = false;\n break;\n }\n } else if (!(\n arrValue === othValue ||\n equalFunc(arrValue, othValue, bitmask, customizer, stack)\n )) {\n result = false;\n break;\n }\n }\n stack['delete'](array);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalArrays;\n","var Symbol = require('./_Symbol'),\n Uint8Array = require('./_Uint8Array'),\n eq = require('./eq'),\n equalArrays = require('./_equalArrays'),\n mapToArray = require('./_mapToArray'),\n setToArray = require('./_setToArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]';\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n switch (tag) {\n case dataViewTag:\n if ((object.byteLength != other.byteLength) ||\n (object.byteOffset != other.byteOffset)) {\n return false;\n }\n object = object.buffer;\n other = other.buffer;\n\n case arrayBufferTag:\n if ((object.byteLength != other.byteLength) ||\n !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n return false;\n }\n return true;\n\n case boolTag:\n case dateTag:\n case numberTag:\n // Coerce booleans to `1` or `0` and dates to milliseconds.\n // Invalid dates are coerced to `NaN`.\n return eq(+object, +other);\n\n case errorTag:\n return object.name == other.name && object.message == other.message;\n\n case regexpTag:\n case stringTag:\n // Coerce regexes to strings and treat strings, primitives and objects,\n // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n // for more details.\n return object == (other + '');\n\n case mapTag:\n var convert = mapToArray;\n\n case setTag:\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n convert || (convert = setToArray);\n\n if (object.size != other.size && !isPartial) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked) {\n return stacked == other;\n }\n bitmask |= COMPARE_UNORDERED_FLAG;\n\n // Recursively compare objects (susceptible to call stack limits).\n stack.set(object, other);\n var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n stack['delete'](object);\n return result;\n\n case symbolTag:\n if (symbolValueOf) {\n return symbolValueOf.call(object) == symbolValueOf.call(other);\n }\n }\n return false;\n}\n\nmodule.exports = equalByTag;\n","var getAllKeys = require('./_getAllKeys');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n objProps = getAllKeys(object),\n objLength = objProps.length,\n othProps = getAllKeys(other),\n othLength = othProps.length;\n\n if (objLength != othLength && !isPartial) {\n return false;\n }\n var index = objLength;\n while (index--) {\n var key = objProps[index];\n if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n return false;\n }\n }\n // Check that cyclic values are equal.\n var objStacked = stack.get(object);\n var othStacked = stack.get(other);\n if (objStacked && othStacked) {\n return objStacked == other && othStacked == object;\n }\n var result = true;\n stack.set(object, other);\n stack.set(other, object);\n\n var skipCtor = isPartial;\n while (++index < objLength) {\n key = objProps[index];\n var objValue = object[key],\n othValue = other[key];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, objValue, key, other, object, stack)\n : customizer(objValue, othValue, key, object, other, stack);\n }\n // Recursively compare objects (susceptible to call stack limits).\n if (!(compared === undefined\n ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n : compared\n )) {\n result = false;\n break;\n }\n skipCtor || (skipCtor = key == 'constructor');\n }\n if (result && !skipCtor) {\n var objCtor = object.constructor,\n othCtor = other.constructor;\n\n // Non `Object` object instances with different constructors are not equal.\n if (objCtor != othCtor &&\n ('constructor' in object && 'constructor' in other) &&\n !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n result = false;\n }\n }\n stack['delete'](object);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalObjects;\n","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n","var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbols = require('./_getSymbols'),\n keys = require('./keys');\n\n/**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeys(object) {\n return baseGetAllKeys(object, keys, getSymbols);\n}\n\nmodule.exports = getAllKeys;\n","var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbolsIn = require('./_getSymbolsIn'),\n keysIn = require('./keysIn');\n\n/**\n * Creates an array of own and inherited enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeysIn(object) {\n return baseGetAllKeys(object, keysIn, getSymbolsIn);\n}\n\nmodule.exports = getAllKeysIn;\n","var isKeyable = require('./_isKeyable');\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\nmodule.exports = getMapData;\n","var baseIsNative = require('./_baseIsNative'),\n getValue = require('./_getValue');\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\nmodule.exports = getNative;\n","var overArg = require('./_overArg');\n\n/** Built-in value references. */\nvar getPrototype = overArg(Object.getPrototypeOf, Object);\n\nmodule.exports = getPrototype;\n","var Symbol = require('./_Symbol');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nmodule.exports = getRawTag;\n","var arrayFilter = require('./_arrayFilter'),\n stubArray = require('./stubArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n if (object == null) {\n return [];\n }\n object = Object(object);\n return arrayFilter(nativeGetSymbols(object), function(symbol) {\n return propertyIsEnumerable.call(object, symbol);\n });\n};\n\nmodule.exports = getSymbols;\n","var arrayPush = require('./_arrayPush'),\n getPrototype = require('./_getPrototype'),\n getSymbols = require('./_getSymbols'),\n stubArray = require('./stubArray');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own and inherited enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {\n var result = [];\n while (object) {\n arrayPush(result, getSymbols(object));\n object = getPrototype(object);\n }\n return result;\n};\n\nmodule.exports = getSymbolsIn;\n","var DataView = require('./_DataView'),\n Map = require('./_Map'),\n Promise = require('./_Promise'),\n Set = require('./_Set'),\n WeakMap = require('./_WeakMap'),\n baseGetTag = require('./_baseGetTag'),\n toSource = require('./_toSource');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n setTag = '[object Set]',\n weakMapTag = '[object WeakMap]';\n\nvar dataViewTag = '[object DataView]';\n\n/** Used to detect maps, sets, and weakmaps. */\nvar dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nvar getTag = baseGetTag;\n\n// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\nif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = baseGetTag(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : '';\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n}\n\nmodule.exports = getTag;\n","/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\nmodule.exports = getValue;\n","var nativeCreate = require('./_nativeCreate');\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n}\n\nmodule.exports = hashClear;\n","/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = hashDelete;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\nmodule.exports = hashGet;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\nmodule.exports = hashHas;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\nmodule.exports = hashSet;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Initializes an array clone.\n *\n * @private\n * @param {Array} array The array to clone.\n * @returns {Array} Returns the initialized clone.\n */\nfunction initCloneArray(array) {\n var length = array.length,\n result = new array.constructor(length);\n\n // Add properties assigned by `RegExp#exec`.\n if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {\n result.index = array.index;\n result.input = array.input;\n }\n return result;\n}\n\nmodule.exports = initCloneArray;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer'),\n cloneDataView = require('./_cloneDataView'),\n cloneRegExp = require('./_cloneRegExp'),\n cloneSymbol = require('./_cloneSymbol'),\n cloneTypedArray = require('./_cloneTypedArray');\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/**\n * Initializes an object clone based on its `toStringTag`.\n *\n * **Note:** This function only supports cloning values with tags of\n * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.\n *\n * @private\n * @param {Object} object The object to clone.\n * @param {string} tag The `toStringTag` of the object to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneByTag(object, tag, isDeep) {\n var Ctor = object.constructor;\n switch (tag) {\n case arrayBufferTag:\n return cloneArrayBuffer(object);\n\n case boolTag:\n case dateTag:\n return new Ctor(+object);\n\n case dataViewTag:\n return cloneDataView(object, isDeep);\n\n case float32Tag: case float64Tag:\n case int8Tag: case int16Tag: case int32Tag:\n case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:\n return cloneTypedArray(object, isDeep);\n\n case mapTag:\n return new Ctor;\n\n case numberTag:\n case stringTag:\n return new Ctor(object);\n\n case regexpTag:\n return cloneRegExp(object);\n\n case setTag:\n return new Ctor;\n\n case symbolTag:\n return cloneSymbol(object);\n }\n}\n\nmodule.exports = initCloneByTag;\n","var baseCreate = require('./_baseCreate'),\n getPrototype = require('./_getPrototype'),\n isPrototype = require('./_isPrototype');\n\n/**\n * Initializes an object clone.\n *\n * @private\n * @param {Object} object The object to clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneObject(object) {\n return (typeof object.constructor == 'function' && !isPrototype(object))\n ? baseCreate(getPrototype(object))\n : {};\n}\n\nmodule.exports = initCloneObject;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n var type = typeof value;\n length = length == null ? MAX_SAFE_INTEGER : length;\n\n return !!length &&\n (type == 'number' ||\n (type != 'symbol' && reIsUint.test(value))) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\nmodule.exports = isIndex;\n","/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\nmodule.exports = isKeyable;\n","var coreJsData = require('./_coreJsData');\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\nmodule.exports = isMasked;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\nmodule.exports = isPrototype;\n","/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n}\n\nmodule.exports = listCacheClear;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype;\n\n/** Built-in value references. */\nvar splice = arrayProto.splice;\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n}\n\nmodule.exports = listCacheDelete;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\nmodule.exports = listCacheGet;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\nmodule.exports = listCacheHas;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\nmodule.exports = listCacheSet;\n","var Hash = require('./_Hash'),\n ListCache = require('./_ListCache'),\n Map = require('./_Map');\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\nmodule.exports = mapCacheClear;\n","var getMapData = require('./_getMapData');\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = mapCacheDelete;\n","var getMapData = require('./_getMapData');\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\nmodule.exports = mapCacheGet;\n","var getMapData = require('./_getMapData');\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\nmodule.exports = mapCacheHas;\n","var getMapData = require('./_getMapData');\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n}\n\nmodule.exports = mapCacheSet;\n","/**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\nfunction mapToArray(map) {\n var index = -1,\n result = Array(map.size);\n\n map.forEach(function(value, key) {\n result[++index] = [key, value];\n });\n return result;\n}\n\nmodule.exports = mapToArray;\n","var getNative = require('./_getNative');\n\n/* Built-in method references that are verified to be native. */\nvar nativeCreate = getNative(Object, 'create');\n\nmodule.exports = nativeCreate;\n","var overArg = require('./_overArg');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeKeys = overArg(Object.keys, Object);\n\nmodule.exports = nativeKeys;\n","/**\n * This function is like\n * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * except that it includes inherited enumerable properties.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction nativeKeysIn(object) {\n var result = [];\n if (object != null) {\n for (var key in Object(object)) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = nativeKeysIn;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n try {\n // Use `util.types` for Node.js 10+.\n var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n if (types) {\n return types;\n }\n\n // Legacy `process.binding('util')` for Node.js < 10.\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n}());\n\nmodule.exports = nodeUtil;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n","/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\nmodule.exports = overArg;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n","/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\nfunction setCacheAdd(value) {\n this.__data__.set(value, HASH_UNDEFINED);\n return this;\n}\n\nmodule.exports = setCacheAdd;\n","/**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\nfunction setCacheHas(value) {\n return this.__data__.has(value);\n}\n\nmodule.exports = setCacheHas;\n","/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\nfunction setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n}\n\nmodule.exports = setToArray;\n","var ListCache = require('./_ListCache');\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}\n\nmodule.exports = stackClear;\n","/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n var data = this.__data__,\n result = data['delete'](key);\n\n this.size = data.size;\n return result;\n}\n\nmodule.exports = stackDelete;\n","/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n return this.__data__.get(key);\n}\n\nmodule.exports = stackGet;\n","/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n return this.__data__.has(key);\n}\n\nmodule.exports = stackHas;\n","var ListCache = require('./_ListCache'),\n Map = require('./_Map'),\n MapCache = require('./_MapCache');\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n var data = this.__data__;\n if (data instanceof ListCache) {\n var pairs = data.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n this.size = ++data.size;\n return this;\n }\n data = this.__data__ = new MapCache(pairs);\n }\n data.set(key, value);\n this.size = data.size;\n return this;\n}\n\nmodule.exports = stackSet;\n","/** Used for built-in method references. */\nvar funcProto = Function.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\nmodule.exports = toSource;\n","var baseClone = require('./_baseClone');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_SYMBOLS_FLAG = 4;\n\n/**\n * This method is like `_.clone` except that it recursively clones `value`.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Lang\n * @param {*} value The value to recursively clone.\n * @returns {*} Returns the deep cloned value.\n * @see _.clone\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var deep = _.cloneDeep(objects);\n * console.log(deep[0] === objects[0]);\n * // => false\n */\nfunction cloneDeep(value) {\n return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);\n}\n\nmodule.exports = cloneDeep;\n","/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\nmodule.exports = eq;\n","var baseIsArguments = require('./_baseIsArguments'),\n isObjectLike = require('./isObjectLike');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n};\n\nmodule.exports = isArguments;\n","/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\nmodule.exports = isArray;\n","var isFunction = require('./isFunction'),\n isLength = require('./isLength');\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\nmodule.exports = isArrayLike;\n","var root = require('./_root'),\n stubFalse = require('./stubFalse');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\nmodule.exports = isBuffer;\n","var baseIsEqual = require('./_baseIsEqual');\n\n/**\n * Performs a deep comparison between two values to determine if they are\n * equivalent.\n *\n * **Note:** This method supports comparing arrays, array buffers, booleans,\n * date objects, error objects, maps, numbers, `Object` objects, regexes,\n * sets, strings, symbols, and typed arrays. `Object` objects are compared\n * by their own, not inherited, enumerable properties. Functions and DOM\n * nodes are compared by strict equality, i.e. `===`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.isEqual(object, other);\n * // => true\n *\n * object === other;\n * // => false\n */\nfunction isEqual(value, other) {\n return baseIsEqual(value, other);\n}\n\nmodule.exports = isEqual;\n","var baseGetTag = require('./_baseGetTag'),\n isObject = require('./isObject');\n\n/** `Object#toString` result references. */\nvar asyncTag = '[object AsyncFunction]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n proxyTag = '[object Proxy]';\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\nmodule.exports = isFunction;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\nmodule.exports = isLength;\n","var baseIsMap = require('./_baseIsMap'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsMap = nodeUtil && nodeUtil.isMap;\n\n/**\n * Checks if `value` is classified as a `Map` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n * @example\n *\n * _.isMap(new Map);\n * // => true\n *\n * _.isMap(new WeakMap);\n * // => false\n */\nvar isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;\n\nmodule.exports = isMap;\n","/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n","var baseIsSet = require('./_baseIsSet'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsSet = nodeUtil && nodeUtil.isSet;\n\n/**\n * Checks if `value` is classified as a `Set` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n * @example\n *\n * _.isSet(new Set);\n * // => true\n *\n * _.isSet(new WeakSet);\n * // => false\n */\nvar isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;\n\nmodule.exports = isSet;\n","var baseIsTypedArray = require('./_baseIsTypedArray'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\nmodule.exports = isTypedArray;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeys = require('./_baseKeys'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\nmodule.exports = keys;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeysIn = require('./_baseKeysIn'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\nfunction keysIn(object) {\n return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n}\n\nmodule.exports = keysIn;\n","/**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\nfunction stubArray() {\n return [];\n}\n\nmodule.exports = stubArray;\n","/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n return false;\n}\n\nmodule.exports = stubFalse;\n","import { connect, type BaseConnectionOptions } from \"@openfin/core-web\";\nimport { getSettings } from \"./settings\";\n\n/**\n * Initializes the OpenFin Web Broker connection.\n * @param inherit Should we inherit settings from the host (available in the OpenFin layout system) or use settings? Default is true.\n */\nexport async function init(inherit: boolean = true): Promise {\n\t// Set window.fin to the `fin` object.\n\tlet options: BaseConnectionOptions | undefined;\n\tif (window.fin === undefined) {\n\t\tif (!inherit) {\n\t\t\tconst settings = await getSettings();\n\t\t\tif (settings === undefined) {\n\t\t\t\tconsole.error(\n\t\t\t\t\t\"Unable to run the sample as we have been unable to load the web manifest and it's settings from the currently running html page. Please ensure that the web manifest is being served and that it contains the custom_settings section.\"\n\t\t\t\t);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\toptions = {\n\t\t\t\tbrokerUrl: settings.platform.interop.brokerUrl,\n\t\t\t\tinteropConfig: {\n\t\t\t\t\tproviderId: settings.platform.interop.providerId,\n\t\t\t\t\tcurrentContextGroup: settings.platform.interop.defaultContextGroup\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t\t// Specify an interopConfig with a specific provider ID and a context group to initialize the `fin.me.interop` client on connection.\n\t\tif (options) {\n\t\t\twindow.fin = await connect({\n\t\t\t\toptions\n\t\t\t});\n\t\t} else {\n\t\t\twindow.fin = await connect({\n\t\t\t\tconnectionInheritance: \"enabled\"\n\t\t\t});\n\t\t}\n\t\tconsole.log(\"Finished initializing the fin API.\");\n\t\t// Create and dispatch the finReady event\n\t\tconst event = new CustomEvent(\"finReady\");\n\t\twindow.dispatchEvent(event);\n\t}\n\n\tif (window.fdc3 === undefined && window?.fin?.me.interop?.getFDC3Sync !== undefined) {\n\t\twindow.fdc3 = fin.me.interop.getFDC3Sync(\"2.0\");\n\t\tconsole.log(\"Finished initializing the fdc3 API.\");\n\t\t// Create and dispatch the FDC3Ready event\n\t\tconst event = new CustomEvent(\"fdc3Ready\");\n\t\twindow.dispatchEvent(event);\n\t}\n}\n","import type { WebLayoutSnapshot } from \"@openfin/core-web\";\nimport type { Settings } from \"../shapes/setting-shapes\";\n\n/**\n * Fetches the settings for the application.\n * @returns The settings for the application.\n */\nexport async function getSettings(): Promise {\n\tconst settings = await getManifestSettings();\n\tif (settings === undefined) {\n\t\tconsole.error(\n\t\t\t\"Unable to run the example as settings are required and we fetch them from the link web manifest from the html page that is being served. It should exist in the customSettings section of the web manifest.\"\n\t\t);\n\t}\n\treturn settings;\n}\n\n/**\n * Returns a default layout from the settings if provided.\n * @returns The default layout from the settings.\n */\nexport async function getDefaultLayout(): Promise {\n\tconst settings = await getSettings();\n\tif (settings?.platform?.layout?.defaultLayout === undefined) {\n\t\tconsole.error(\n\t\t\t\"Unable to run the example as without a layout being defined. Please ensure that settings have been provided in the web manifest.\"\n\t\t);\n\t\treturn;\n\t}\n\tif (typeof settings.platform.layout.defaultLayout === \"string\") {\n\t\tconst layoutResponse = await fetch(settings.platform.layout.defaultLayout);\n\t\tconst layoutJson = (await layoutResponse.json()) as WebLayoutSnapshot;\n\t\treturn layoutJson;\n\t}\n\treturn settings.platform.layout.defaultLayout;\n}\n\n/**\n * Returns the settings from the manifest file.\n * @returns customSettings for this example\n */\nasync function getManifestSettings(): Promise {\n\t// Get the manifest link\n\tconst link = document.querySelector('link[rel=\"manifest\"]');\n\tif (link !== null) {\n\t\tconst manifestResponse = await fetch(link.href);\n\t\tconst manifestJson = (await manifestResponse.json()) as { custom_settings: Settings };\n\t\treturn manifestJson.custom_settings;\n\t}\n}\n","export { default as v1 } from './v1.js';\nexport { default as v3 } from './v3.js';\nexport { default as v4 } from './v4.js';\nexport { default as v5 } from './v5.js';\nexport { default as NIL } from './nil.js';\nexport { default as version } from './version.js';\nexport { default as validate } from './validate.js';\nexport { default as stringify } from './stringify.js';\nexport { default as parse } from './parse.js';","/*\n * Browser-compatible JavaScript MD5\n *\n * Modification of JavaScript MD5\n * https://github.com/blueimp/JavaScript-MD5\n *\n * Copyright 2011, Sebastian Tschan\n * https://blueimp.net\n *\n * Licensed under the MIT license:\n * https://opensource.org/licenses/MIT\n *\n * Based on\n * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message\n * Digest Algorithm, as defined in RFC 1321.\n * Version 2.2 Copyright (C) Paul Johnston 1999 - 2009\n * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet\n * Distributed under the BSD License\n * See http://pajhome.org.uk/crypt/md5 for more info.\n */\nfunction md5(bytes) {\n if (typeof bytes === 'string') {\n var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape\n\n bytes = new Uint8Array(msg.length);\n\n for (var i = 0; i < msg.length; ++i) {\n bytes[i] = msg.charCodeAt(i);\n }\n }\n\n return md5ToHexEncodedArray(wordsToMd5(bytesToWords(bytes), bytes.length * 8));\n}\n/*\n * Convert an array of little-endian words to an array of bytes\n */\n\n\nfunction md5ToHexEncodedArray(input) {\n var output = [];\n var length32 = input.length * 32;\n var hexTab = '0123456789abcdef';\n\n for (var i = 0; i < length32; i += 8) {\n var x = input[i >> 5] >>> i % 32 & 0xff;\n var hex = parseInt(hexTab.charAt(x >>> 4 & 0x0f) + hexTab.charAt(x & 0x0f), 16);\n output.push(hex);\n }\n\n return output;\n}\n/**\n * Calculate output length with padding and bit length\n */\n\n\nfunction getOutputLength(inputLength8) {\n return (inputLength8 + 64 >>> 9 << 4) + 14 + 1;\n}\n/*\n * Calculate the MD5 of an array of little-endian words, and a bit length.\n */\n\n\nfunction wordsToMd5(x, len) {\n /* append padding */\n x[len >> 5] |= 0x80 << len % 32;\n x[getOutputLength(len) - 1] = len;\n var a = 1732584193;\n var b = -271733879;\n var c = -1732584194;\n var d = 271733878;\n\n for (var i = 0; i < x.length; i += 16) {\n var olda = a;\n var oldb = b;\n var oldc = c;\n var oldd = d;\n a = md5ff(a, b, c, d, x[i], 7, -680876936);\n d = md5ff(d, a, b, c, x[i + 1], 12, -389564586);\n c = md5ff(c, d, a, b, x[i + 2], 17, 606105819);\n b = md5ff(b, c, d, a, x[i + 3], 22, -1044525330);\n a = md5ff(a, b, c, d, x[i + 4], 7, -176418897);\n d = md5ff(d, a, b, c, x[i + 5], 12, 1200080426);\n c = md5ff(c, d, a, b, x[i + 6], 17, -1473231341);\n b = md5ff(b, c, d, a, x[i + 7], 22, -45705983);\n a = md5ff(a, b, c, d, x[i + 8], 7, 1770035416);\n d = md5ff(d, a, b, c, x[i + 9], 12, -1958414417);\n c = md5ff(c, d, a, b, x[i + 10], 17, -42063);\n b = md5ff(b, c, d, a, x[i + 11], 22, -1990404162);\n a = md5ff(a, b, c, d, x[i + 12], 7, 1804603682);\n d = md5ff(d, a, b, c, x[i + 13], 12, -40341101);\n c = md5ff(c, d, a, b, x[i + 14], 17, -1502002290);\n b = md5ff(b, c, d, a, x[i + 15], 22, 1236535329);\n a = md5gg(a, b, c, d, x[i + 1], 5, -165796510);\n d = md5gg(d, a, b, c, x[i + 6], 9, -1069501632);\n c = md5gg(c, d, a, b, x[i + 11], 14, 643717713);\n b = md5gg(b, c, d, a, x[i], 20, -373897302);\n a = md5gg(a, b, c, d, x[i + 5], 5, -701558691);\n d = md5gg(d, a, b, c, x[i + 10], 9, 38016083);\n c = md5gg(c, d, a, b, x[i + 15], 14, -660478335);\n b = md5gg(b, c, d, a, x[i + 4], 20, -405537848);\n a = md5gg(a, b, c, d, x[i + 9], 5, 568446438);\n d = md5gg(d, a, b, c, x[i + 14], 9, -1019803690);\n c = md5gg(c, d, a, b, x[i + 3], 14, -187363961);\n b = md5gg(b, c, d, a, x[i + 8], 20, 1163531501);\n a = md5gg(a, b, c, d, x[i + 13], 5, -1444681467);\n d = md5gg(d, a, b, c, x[i + 2], 9, -51403784);\n c = md5gg(c, d, a, b, x[i + 7], 14, 1735328473);\n b = md5gg(b, c, d, a, x[i + 12], 20, -1926607734);\n a = md5hh(a, b, c, d, x[i + 5], 4, -378558);\n d = md5hh(d, a, b, c, x[i + 8], 11, -2022574463);\n c = md5hh(c, d, a, b, x[i + 11], 16, 1839030562);\n b = md5hh(b, c, d, a, x[i + 14], 23, -35309556);\n a = md5hh(a, b, c, d, x[i + 1], 4, -1530992060);\n d = md5hh(d, a, b, c, x[i + 4], 11, 1272893353);\n c = md5hh(c, d, a, b, x[i + 7], 16, -155497632);\n b = md5hh(b, c, d, a, x[i + 10], 23, -1094730640);\n a = md5hh(a, b, c, d, x[i + 13], 4, 681279174);\n d = md5hh(d, a, b, c, x[i], 11, -358537222);\n c = md5hh(c, d, a, b, x[i + 3], 16, -722521979);\n b = md5hh(b, c, d, a, x[i + 6], 23, 76029189);\n a = md5hh(a, b, c, d, x[i + 9], 4, -640364487);\n d = md5hh(d, a, b, c, x[i + 12], 11, -421815835);\n c = md5hh(c, d, a, b, x[i + 15], 16, 530742520);\n b = md5hh(b, c, d, a, x[i + 2], 23, -995338651);\n a = md5ii(a, b, c, d, x[i], 6, -198630844);\n d = md5ii(d, a, b, c, x[i + 7], 10, 1126891415);\n c = md5ii(c, d, a, b, x[i + 14], 15, -1416354905);\n b = md5ii(b, c, d, a, x[i + 5], 21, -57434055);\n a = md5ii(a, b, c, d, x[i + 12], 6, 1700485571);\n d = md5ii(d, a, b, c, x[i + 3], 10, -1894986606);\n c = md5ii(c, d, a, b, x[i + 10], 15, -1051523);\n b = md5ii(b, c, d, a, x[i + 1], 21, -2054922799);\n a = md5ii(a, b, c, d, x[i + 8], 6, 1873313359);\n d = md5ii(d, a, b, c, x[i + 15], 10, -30611744);\n c = md5ii(c, d, a, b, x[i + 6], 15, -1560198380);\n b = md5ii(b, c, d, a, x[i + 13], 21, 1309151649);\n a = md5ii(a, b, c, d, x[i + 4], 6, -145523070);\n d = md5ii(d, a, b, c, x[i + 11], 10, -1120210379);\n c = md5ii(c, d, a, b, x[i + 2], 15, 718787259);\n b = md5ii(b, c, d, a, x[i + 9], 21, -343485551);\n a = safeAdd(a, olda);\n b = safeAdd(b, oldb);\n c = safeAdd(c, oldc);\n d = safeAdd(d, oldd);\n }\n\n return [a, b, c, d];\n}\n/*\n * Convert an array bytes to an array of little-endian words\n * Characters >255 have their high-byte silently ignored.\n */\n\n\nfunction bytesToWords(input) {\n if (input.length === 0) {\n return [];\n }\n\n var length8 = input.length * 8;\n var output = new Uint32Array(getOutputLength(length8));\n\n for (var i = 0; i < length8; i += 8) {\n output[i >> 5] |= (input[i / 8] & 0xff) << i % 32;\n }\n\n return output;\n}\n/*\n * Add integers, wrapping at 2^32. This uses 16-bit operations internally\n * to work around bugs in some JS interpreters.\n */\n\n\nfunction safeAdd(x, y) {\n var lsw = (x & 0xffff) + (y & 0xffff);\n var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n return msw << 16 | lsw & 0xffff;\n}\n/*\n * Bitwise rotate a 32-bit number to the left.\n */\n\n\nfunction bitRotateLeft(num, cnt) {\n return num << cnt | num >>> 32 - cnt;\n}\n/*\n * These functions implement the four basic operations the algorithm uses.\n */\n\n\nfunction md5cmn(q, a, b, x, s, t) {\n return safeAdd(bitRotateLeft(safeAdd(safeAdd(a, q), safeAdd(x, t)), s), b);\n}\n\nfunction md5ff(a, b, c, d, x, s, t) {\n return md5cmn(b & c | ~b & d, a, b, x, s, t);\n}\n\nfunction md5gg(a, b, c, d, x, s, t) {\n return md5cmn(b & d | c & ~d, a, b, x, s, t);\n}\n\nfunction md5hh(a, b, c, d, x, s, t) {\n return md5cmn(b ^ c ^ d, a, b, x, s, t);\n}\n\nfunction md5ii(a, b, c, d, x, s, t) {\n return md5cmn(c ^ (b | ~d), a, b, x, s, t);\n}\n\nexport default md5;","export default '00000000-0000-0000-0000-000000000000';","import validate from './validate.js';\n\nfunction parse(uuid) {\n if (!validate(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n var v;\n var arr = new Uint8Array(16); // Parse ########-....-....-....-............\n\n arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24;\n arr[1] = v >>> 16 & 0xff;\n arr[2] = v >>> 8 & 0xff;\n arr[3] = v & 0xff; // Parse ........-####-....-....-............\n\n arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8;\n arr[5] = v & 0xff; // Parse ........-....-####-....-............\n\n arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8;\n arr[7] = v & 0xff; // Parse ........-....-....-####-............\n\n arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8;\n arr[9] = v & 0xff; // Parse ........-....-....-....-############\n // (Use \"/\" to avoid 32-bit truncation when bit-shifting high-order bytes)\n\n arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff;\n arr[11] = v / 0x100000000 & 0xff;\n arr[12] = v >>> 24 & 0xff;\n arr[13] = v >>> 16 & 0xff;\n arr[14] = v >>> 8 & 0xff;\n arr[15] = v & 0xff;\n return arr;\n}\n\nexport default parse;","export default /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;","// Unique ID creation requires a high quality random # generator. In the browser we therefore\n// require the crypto API and do not support built-in fallback to lower quality random number\n// generators (like Math.random()).\nvar getRandomValues;\nvar rnds8 = new Uint8Array(16);\nexport default function rng() {\n // lazy load so that environments that need to polyfill have a chance to do so\n if (!getRandomValues) {\n // getRandomValues needs to be invoked in a context where \"this\" is a Crypto implementation. Also,\n // find the complete implementation of crypto (msCrypto) on IE11.\n getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto !== 'undefined' && typeof msCrypto.getRandomValues === 'function' && msCrypto.getRandomValues.bind(msCrypto);\n\n if (!getRandomValues) {\n throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');\n }\n }\n\n return getRandomValues(rnds8);\n}","// Adapted from Chris Veness' SHA1 code at\n// http://www.movable-type.co.uk/scripts/sha1.html\nfunction f(s, x, y, z) {\n switch (s) {\n case 0:\n return x & y ^ ~x & z;\n\n case 1:\n return x ^ y ^ z;\n\n case 2:\n return x & y ^ x & z ^ y & z;\n\n case 3:\n return x ^ y ^ z;\n }\n}\n\nfunction ROTL(x, n) {\n return x << n | x >>> 32 - n;\n}\n\nfunction sha1(bytes) {\n var K = [0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xca62c1d6];\n var H = [0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0];\n\n if (typeof bytes === 'string') {\n var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape\n\n bytes = [];\n\n for (var i = 0; i < msg.length; ++i) {\n bytes.push(msg.charCodeAt(i));\n }\n } else if (!Array.isArray(bytes)) {\n // Convert Array-like to Array\n bytes = Array.prototype.slice.call(bytes);\n }\n\n bytes.push(0x80);\n var l = bytes.length / 4 + 2;\n var N = Math.ceil(l / 16);\n var M = new Array(N);\n\n for (var _i = 0; _i < N; ++_i) {\n var arr = new Uint32Array(16);\n\n for (var j = 0; j < 16; ++j) {\n arr[j] = bytes[_i * 64 + j * 4] << 24 | bytes[_i * 64 + j * 4 + 1] << 16 | bytes[_i * 64 + j * 4 + 2] << 8 | bytes[_i * 64 + j * 4 + 3];\n }\n\n M[_i] = arr;\n }\n\n M[N - 1][14] = (bytes.length - 1) * 8 / Math.pow(2, 32);\n M[N - 1][14] = Math.floor(M[N - 1][14]);\n M[N - 1][15] = (bytes.length - 1) * 8 & 0xffffffff;\n\n for (var _i2 = 0; _i2 < N; ++_i2) {\n var W = new Uint32Array(80);\n\n for (var t = 0; t < 16; ++t) {\n W[t] = M[_i2][t];\n }\n\n for (var _t = 16; _t < 80; ++_t) {\n W[_t] = ROTL(W[_t - 3] ^ W[_t - 8] ^ W[_t - 14] ^ W[_t - 16], 1);\n }\n\n var a = H[0];\n var b = H[1];\n var c = H[2];\n var d = H[3];\n var e = H[4];\n\n for (var _t2 = 0; _t2 < 80; ++_t2) {\n var s = Math.floor(_t2 / 20);\n var T = ROTL(a, 5) + f(s, b, c, d) + e + K[s] + W[_t2] >>> 0;\n e = d;\n d = c;\n c = ROTL(b, 30) >>> 0;\n b = a;\n a = T;\n }\n\n H[0] = H[0] + a >>> 0;\n H[1] = H[1] + b >>> 0;\n H[2] = H[2] + c >>> 0;\n H[3] = H[3] + d >>> 0;\n H[4] = H[4] + e >>> 0;\n }\n\n return [H[0] >> 24 & 0xff, H[0] >> 16 & 0xff, H[0] >> 8 & 0xff, H[0] & 0xff, H[1] >> 24 & 0xff, H[1] >> 16 & 0xff, H[1] >> 8 & 0xff, H[1] & 0xff, H[2] >> 24 & 0xff, H[2] >> 16 & 0xff, H[2] >> 8 & 0xff, H[2] & 0xff, H[3] >> 24 & 0xff, H[3] >> 16 & 0xff, H[3] >> 8 & 0xff, H[3] & 0xff, H[4] >> 24 & 0xff, H[4] >> 16 & 0xff, H[4] >> 8 & 0xff, H[4] & 0xff];\n}\n\nexport default sha1;","import validate from './validate.js';\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\n\nvar byteToHex = [];\n\nfor (var i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).substr(1));\n}\n\nfunction stringify(arr) {\n var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n var uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!validate(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n\n return uuid;\n}\n\nexport default stringify;","import rng from './rng.js';\nimport stringify from './stringify.js'; // **`v1()` - Generate time-based UUID**\n//\n// Inspired by https://github.com/LiosK/UUID.js\n// and http://docs.python.org/library/uuid.html\n\nvar _nodeId;\n\nvar _clockseq; // Previous uuid creation time\n\n\nvar _lastMSecs = 0;\nvar _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details\n\nfunction v1(options, buf, offset) {\n var i = buf && offset || 0;\n var b = buf || new Array(16);\n options = options || {};\n var node = options.node || _nodeId;\n var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not\n // specified. We do this lazily to minimize issues related to insufficient\n // system entropy. See #189\n\n if (node == null || clockseq == null) {\n var seedBytes = options.random || (options.rng || rng)();\n\n if (node == null) {\n // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)\n node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]];\n }\n\n if (clockseq == null) {\n // Per 4.2.2, randomize (14 bit) clockseq\n clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;\n }\n } // UUID timestamps are 100 nano-second units since the Gregorian epoch,\n // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so\n // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'\n // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.\n\n\n var msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock\n // cycle to simulate higher resolution clock\n\n var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs)\n\n var dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression\n\n if (dt < 0 && options.clockseq === undefined) {\n clockseq = clockseq + 1 & 0x3fff;\n } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new\n // time interval\n\n\n if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {\n nsecs = 0;\n } // Per 4.2.1.2 Throw error if too many uuids are requested\n\n\n if (nsecs >= 10000) {\n throw new Error(\"uuid.v1(): Can't create more than 10M uuids/sec\");\n }\n\n _lastMSecs = msecs;\n _lastNSecs = nsecs;\n _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch\n\n msecs += 12219292800000; // `time_low`\n\n var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;\n b[i++] = tl >>> 24 & 0xff;\n b[i++] = tl >>> 16 & 0xff;\n b[i++] = tl >>> 8 & 0xff;\n b[i++] = tl & 0xff; // `time_mid`\n\n var tmh = msecs / 0x100000000 * 10000 & 0xfffffff;\n b[i++] = tmh >>> 8 & 0xff;\n b[i++] = tmh & 0xff; // `time_high_and_version`\n\n b[i++] = tmh >>> 24 & 0xf | 0x10; // include version\n\n b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)\n\n b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low`\n\n b[i++] = clockseq & 0xff; // `node`\n\n for (var n = 0; n < 6; ++n) {\n b[i + n] = node[n];\n }\n\n return buf || stringify(b);\n}\n\nexport default v1;","import v35 from './v35.js';\nimport md5 from './md5.js';\nvar v3 = v35('v3', 0x30, md5);\nexport default v3;","import stringify from './stringify.js';\nimport parse from './parse.js';\n\nfunction stringToBytes(str) {\n str = unescape(encodeURIComponent(str)); // UTF8 escape\n\n var bytes = [];\n\n for (var i = 0; i < str.length; ++i) {\n bytes.push(str.charCodeAt(i));\n }\n\n return bytes;\n}\n\nexport var DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8';\nexport var URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8';\nexport default function (name, version, hashfunc) {\n function generateUUID(value, namespace, buf, offset) {\n if (typeof value === 'string') {\n value = stringToBytes(value);\n }\n\n if (typeof namespace === 'string') {\n namespace = parse(namespace);\n }\n\n if (namespace.length !== 16) {\n throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)');\n } // Compute hash of namespace and value, Per 4.3\n // Future: Use spread syntax when supported on all platforms, e.g. `bytes =\n // hashfunc([...namespace, ... value])`\n\n\n var bytes = new Uint8Array(16 + value.length);\n bytes.set(namespace);\n bytes.set(value, namespace.length);\n bytes = hashfunc(bytes);\n bytes[6] = bytes[6] & 0x0f | version;\n bytes[8] = bytes[8] & 0x3f | 0x80;\n\n if (buf) {\n offset = offset || 0;\n\n for (var i = 0; i < 16; ++i) {\n buf[offset + i] = bytes[i];\n }\n\n return buf;\n }\n\n return stringify(bytes);\n } // Function#name is not settable on some platforms (#270)\n\n\n try {\n generateUUID.name = name; // eslint-disable-next-line no-empty\n } catch (err) {} // For CommonJS default export support\n\n\n generateUUID.DNS = DNS;\n generateUUID.URL = URL;\n return generateUUID;\n}","import rng from './rng.js';\nimport stringify from './stringify.js';\n\nfunction v4(options, buf, offset) {\n options = options || {};\n var rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n offset = offset || 0;\n\n for (var i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n\n return buf;\n }\n\n return stringify(rnds);\n}\n\nexport default v4;","import v35 from './v35.js';\nimport sha1 from './sha1.js';\nvar v5 = v35('v5', 0x50, sha1);\nexport default v5;","import REGEX from './regex.js';\n\nfunction validate(uuid) {\n return typeof uuid === 'string' && REGEX.test(uuid);\n}\n\nexport default validate;","import validate from './validate.js';\n\nfunction version(uuid) {\n if (!validate(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n return parseInt(uuid.substr(14, 1), 16);\n}\n\nexport default version;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = (module) => {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","import type { Context } from \"@finos/fdc3\";\nimport { init } from \"../platform/api\";\n\nwindow.addEventListener(\"DOMContentLoaded\", async () => {\n\tawait init(true);\n\tawait initializeDOM();\n});\n\n/**\n * Broadcasts a context using FDC3.\n */\nasync function setContext(): Promise {\n\tconst contextType = \"fdc3.instrument\";\n\tconst contextName = \"Tesla Inc.\";\n\tconst idData = {\n\t\tticker: \"TSLA\"\n\t};\n\tconst context = {\n\t\ttype: contextType,\n\t\tname: contextName,\n\t\tid: idData\n\t};\n\tif (window.fin) {\n\t\tawait window.fin.me.interop.setContext(context);\n\t\tconsole.log(`Set context: ${contextType} - ${contextName}`);\n\t} else {\n\t\twindow.addEventListener(\"finReady\", async () => {\n\t\t\tif (window.fin) {\n\t\t\t\tawait window.fin.me.interop.setContext(context);\n\t\t\t\tconsole.log(`Set context: ${contextType} - ${contextName}`);\n\t\t\t}\n\t\t});\n\t}\n}\n\n/**\n * Adds an interop context listener to the window.\n */\nasync function addContextListener(): Promise {\n\tif (window.fin) {\n\t\tawait window.fin.me.interop.addContextHandler((context: Context) => {\n\t\t\tupdateDOMElements(context);\n\t\t});\n\t} else {\n\t\twindow.addEventListener(\"finReady\", async () => {\n\t\t\tif (window.fin) {\n\t\t\t\tawait window.fin.me.interop.addContextHandler((context: Context) => {\n\t\t\t\t\tupdateDOMElements(context);\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t}\n}\n\n/**\n * Updates the DOM elements with the provided context.\n * @param context The context to update the DOM elements with.\n */\nfunction updateDOMElements(context: Context): void {\n\tconst contextTypeSpan = document.querySelector(\"#contextType\");\n\tconst contextNameSpan = document.querySelector(\"#contextName\");\n\tconst contextBodyPre = document.querySelector(\"#contextBody\");\n\n\tif (contextTypeSpan !== null && contextNameSpan !== null && contextBodyPre !== null) {\n\t\tcontextTypeSpan.textContent = context.type;\n\t\tcontextNameSpan.textContent = context.name ?? \"No name provided.\";\n\t\tcontextBodyPre.textContent = JSON.stringify(context, null, 2);\n\t}\n}\n\n/**\n * Initialize the DOM elements.\n */\nasync function initializeDOM(): Promise {\n\tconst setContextButton = document.querySelector(\"#setContext\");\n\n\tif (setContextButton !== null) {\n\t\tsetContextButton.addEventListener(\"click\", async () => {\n\t\t\tawait setContext();\n\t\t});\n\t}\n\n\tawait addContextListener();\n}\n"],"names":[],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"interop-view.bundle.js","mappings":";;;;;;;;;;AAAa,MAAM,mBAAO,CAAC,qFAAoB,EAAE,mBAAO,CAAC,mDAAS,EAAE,mBAAO,CAAC,+DAAM,EAAE,mBAAO,CAAC,mDAAQ,EAAE,mBAAO,CAAC,gEAAkB,EAAE,mBAAO,CAAC,4DAAgB,EAAE,eAAe;;;;;;;;;;;;ACA9J,MAAM,mBAAO,CAAC,mDAAS,IAAI,mBAAO,CAAC,mDAAQ,IAAI,mBAAO,CAAC,gEAAkB,IAAI,mB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AmH,OAAO,0BAA0B,oBAAoB,aAAa,yBAAyB,iBAAiB,qCAAqC,EAAE,cAAc,2CAA2C,kDAAkD,OAAO,uBAAuB,SAAS,MAAM,OAAO,cAAc,eAAe,2BAA2B,OAAO,eAAe,sDAAsD,oCAAoC,IAAI,iIAAiI,sBAAsB,yCAAyC,2FAA2F;;;;;;;;;;;;ACFv6nD;;AAEZ,kBAAkB;AAClB,mBAAmB;AACnB,qBAAqB;;AAErB;AACA;AACA;;AAEA;AACA,mCAAmC,SAAS;AAC5C;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,cAAc,SAAS;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,2CAA2C,UAAU;AACrD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;ACrJA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEY;;AAEZ,eAAe,mBAAO,CAAC,wDAAW;AAClC,gBAAgB,mBAAO,CAAC,oDAAS;AACjC;AACA;AACA;AACA;;AAEA,cAAc;AACd,kBAAkB;AAClB,yBAAyB;;AAEzB;AACA,kBAAkB;;AAElB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,kBAAkB,YAAY;AAC9B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA,wCAAwC,SAAS;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;;AAEA;AACA;AACA,cAAc,iBAAiB;AAC/B;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,iDAAiD,EAAE;AACnD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C;AAC1C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA,yBAAyB,eAAe;AACxC;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,yBAAyB,QAAQ;AACjC;AACA,sBAAsB,eAAe;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc,YAAY;AAC1B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB,sBAAsB;AACxC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,mBAAmB;AACnB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA,oBAAoB,SAAS;AAC7B;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA,qBAAqB,WAAW,GAAG,IAAI;AACvC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA,gBAAgB,WAAW,GAAG,IAAI,KAAK,aAAa;AACpD;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;;AAEA;AACA,GAAG;AACH;AACA;AACA,mBAAmB,KAAK,mDAAmD,cAAc;AACzF,GAAG;AACH;AACA;AACA,+BAA+B,IAAI;AACnC;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,MAAM,aAAa,SAAS;AACtD;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,SAAS,gBAAgB;AACzB,cAAc,oBAAoB,EAAE,IAAI;AACxC;AACA,YAAY,gBAAgB,EAAE,IAAI;AAClC;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,GAAG,SAAS,GAAG,KAAK,qBAAqB,EAAE,EAAE;AACpE,QAAQ;AACR,yBAAyB,GAAG,KAAK,yBAAyB,EAAE,EAAE;AAC9D,mBAAmB,yBAAyB,EAAE,EAAE;AAChD;AACA,MAAM;AACN,oBAAoB,IAAI,EAAE,GAAG,SAAS,IAAI,EAAE,EAAE;AAC9C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,0CAA0C,cAAc,SAAS,OAAO;AACxE;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,kBAAkB,YAAY;AAC9B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,kBAAkB,gBAAgB;AAClC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,kBAAkB,gBAAgB;AAClC;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,cAAc,YAAY;AAC1B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,QAAQ;AAC1B;AACA,oBAAoB,QAAQ;AAC5B;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;;;;;ACzjEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEa;;AAEb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB;;AAEnB;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,sBAAsB;AACxC;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA,eAAe;AACf;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA,oBAAoB,SAAS;AAC7B;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;;AAEA,kCAAkC,QAAQ;AAC1C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oBAAoB,iBAAiB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,QAAQ;AACR;AACA,uCAAuC,QAAQ;AAC/C;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,OAAO;AACzB;AACA;AACA;;AAEA;AACA,SAAS,yBAAyB;AAClC;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,gBAAgB;AAClC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,8DAA8D,YAAY;AAC1E;AACA,8DAA8D,YAAY;AAC1E;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,qCAAqC,YAAY;AACjD;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;AACA;;;;;;;;;;;AChfA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,SAAS,WAAW;;AAEpB;AACA;AACA;AACA,SAAS,WAAW;;AAEpB;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;A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B,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACxBA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,kBAAkB,mBAAO,CAAC,+DAAe;AACzC,cAAc,mBAAO,CAAC,uDAAW;AACjC,eAAe,mBAAO,CAAC,yDAAY;AACnC,cAAc,mBAAO,CAAC,yDAAY;AAClC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,SAAS;AACpB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AChDA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACnBA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,UAAU;AACrB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACtBA,sBAAsB,mBAAO,CAAC,yEAAoB;AAClD,SAAS,mBAAO,CAAC,6CAAM;;AAEvB;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC3BA,SAAS,mBAAO,CAAC,6CAAM;;AAEvB;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AAC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AO,CAAC,yDAAY;AACnC,YAAY,mBAAO,CAAC,mDAAS;AAC7B,eAAe,mBAAO,CAAC,yDAAY;AACnC,YAAY,mBAAO,CAAC,mDAAS;AAC7B,WAAW,mBAAO,CAAC,iDAAQ;AAC3B,aAAa,mBAAO,CAAC,qDAAU;;AAE/B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,SAAS;AACpB;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa,GAAG;AAChB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;AACA,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;;;;;;;;;;ACrKA,eAAe,mBAAO,CAAC,yDAAY;;AAEnC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;;;;;;;;;;AC7BA,gBAA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CAAC,iEAAgB;;AAE3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC3DA,kBAAkB,mBAAO,CAAC,iEAAgB;AAC1C,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC7BA,eAAe,mBAAO,CAAC,yDAAY;AACnC,kBAAkB,mBAAO,CAAC,iEAAgB;AAC1C,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AChCA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACnBA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,aAAa,UAAU;AACvB;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACbA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACZA,iBAAiB,mBAAO,CAAC,+DA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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACnFA,aAAa,mBAAO,CAAC,uDAAW;AAChC,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,SAAS,mBAAO,CAAC,6CAAM;AACvB,kBAAkB,mBAAO,CAAC,iEAAgB;AAC1C,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC/GA,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;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AAkB,mBAAO,CAAC,iEAAgB;AAC1C,kBAAkB,mBAAO,CAAC,iEAAgB;AAC1C,sBAAsB,mBAAO,CAAC,yEAAoB;;AAElD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC5EA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,mBAAmB,mBAAO,CAAC,mEAAiB;AAC5C,kBAAkB,mBAAO,CAAC,iEAAgB;;AAE1C;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACxBA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACdA,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACnBA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;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B,WAAW,UAAU;AACrB,aAAa,UAAU;AACvB;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACdA,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;ACRA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACbA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;;;;;;;;;;ACjBA,gBAAgB,mBAAO,CAAC,6DAAc;;AAEtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACdA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,GAAG;AAChB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACbA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACbA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,UAAU,mBAAO,CAAC,iDAAQ;AAC1B,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjCA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;;;;;;;;;;;ACzBA,gBAAgB,mBAAO,CAAC,6DAAc;;AAEtC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,GAAG;AAChB;AACA;AACA;AACA,oBAAoB,QAAQ,IAAI,QAAQ;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,kBAAkB;AAClB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpCA,sBAAsB,mBAAO,CAAC,yEAAoB;AAClD,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA,8BAA8B,mBAAmB;AACjD;AACA;AACA;AACA;AACA;AACA,+CAA+C,mBAAmB;AAClE;AACA;AACA;;AAEA;;;;;;;;;;;ACnCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACzBA,iBAAiB,mBAAO,CAAC,6DAAc;AACvC,eAAe,mBAAO,CAAC,yDAAY;;AAEnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AChCA,WAAW,mBAAO,CAAC,mDAAS;AAC5B,gBAAgB,mBAAO,CAAC,2DAAa;;AAErC;AACA,kBAAkB,KAA0B;;AAE5C;AACA,gCAAgC,QAAa;;AAE7C;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACrCA,kBAAkB,mBAAO,CAAC,iEAAgB;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,kBAAkB;AAClB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClCA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,eAAe,mBAAO,CAAC,yDAAY;;AAEnC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpCA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClCA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC1BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC9BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC5BA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC1BA,uBAAuB,mBAAO,CAAC,2EAAqB;AACpD,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC1BA,oBAAoB,mBAAO,CAAC,qEAAkB;AAC9C,eAAe,mBAAO,CAAC,2DAAa;AACpC,kBAAkB,mBAAO,CAAC,+DAAe;;AAEzC;AACA;AACA;AACA;AACA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A;AACA;AACA;AACA,mDAAmD;;AAEnD;;AAEA,oBAAoB,gBAAgB;AACpC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA,kBAAkB,cAAc;AAChC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,kBAAkB,cAAc;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,kBAAkB,aAAa;AAC/B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,iEAAe,GAAG;;;;;;;;;;;;;;;ACtNlB,iEAAe,sCAAsC;;;;;;;;;;;;;;;;ACAhB;;AAErC;AACA,OAAO,wDAAQ;AACf;AACA;;AAEA;AACA,gCAAgC;;AAEhC;AACA;AACA;AACA,qBAAqB;;AAErB;AACA,qBAAqB;;AAErB;AACA,qBAAqB;;AAErB;AACA,qBAAqB;AACrB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,iEAAe,KAA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AAe,CAAC,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;QAC3C,eAAe,CAAC,WAAW,GAAG,OAAO,CAAC,IAAI,IAAI,mBAAmB,CAAC;QAClE,cAAc,CAAC,WAAW,GAAG,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;IAC/D,CAAC;AACF,CAAC;AAED;;GAEG;AACH,KAAK,UAAU,aAAa;IAC3B,MAAM,gBAAgB,GAAG,QAAQ,CAAC,aAAa,CAAoB,aAAa,CAAC,CAAC;IAElF,IAAI,gBAAgB,KAAK,IAAI,EAAE,CAAC;QAC/B,gBAAgB,CAAC,gBAAgB,CAAC,OAAO,EAAE,KAAK,IAAI,EAAE;YACrD,MAAM,UAAU,EAAE,CAAC;QACpB,CAAC,CAAC,CAAC;IACJ,CAAC;IAED,MAAM,kBAAkB,EAAE,CAAC;AAC5B,CAAC","sources":["webpack://openfin-web--web-interop/../../node_modules/@openfin/core-web/out/api-client.js","webpack://openfin-web--web-interop/../../node_modules/@openfin/core-web/out/main-8cad4070.js","webpack://openfin-web--web-interop/../../node_modules/@openfin/core-web/out/main-b14f67c9.js","webpack://openfin-web--web-interop/../../node_modules/base64-js/index.js","webpack://openfin-web--web-interop/../../node_modules/buffer/index.js","webpack://openfin-web--web-interop/../../node_modules/events/events.js","webpack://openfin-web--web-interop/../../node_modules/ieee754/index.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_DataView.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_Hash.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_ListCache.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_Map.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_MapCache.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_Promise.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_Set.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_SetCache.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_Stack.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_Symbol.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_Uint8Array.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_WeakMap.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_arrayEach.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_arrayFilter.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_arrayLikeKeys.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_arrayPush.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_arraySome.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_assignValue.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_assocIndexOf.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseAssign.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseAssignIn.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseAssignValue.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseClone.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseCreate.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseGetAllKeys.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseGetTag.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseIsArguments.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseIsEqual.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseIsEqualDeep.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseIsMap.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseIsNative.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseIsSet.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseIsTypedArray.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseKeys.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseKeysIn.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseTimes.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseUnary.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_cacheHas.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_cloneArrayBuffer.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_cloneBuffer.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_cloneDataView.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_cloneRegExp.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_cloneSymbol.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_cloneTypedArray.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_copyArray.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_copyObject.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_copySymbols.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_copySymbolsIn.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_coreJsData.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_defineProperty.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_equalArrays.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_equalByTag.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_equalObjects.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_freeGlobal.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_getAllKeys.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_getAllKeysIn.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_getMapData.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_getNative.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_getPrototype.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_getRawTag.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_getSymbols.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_getSymbolsIn.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_getTag.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_getValue.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_hashClear.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_hashDelete.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_hashGet.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_hashHas.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_hashSet.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_initCloneArray.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_initCloneByTag.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_initCloneObject.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_isIndex.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_isKeyable.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_isMasked.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_isPrototype.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_listCacheClear.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_listCacheDelete.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_listCacheGet.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_listCacheHas.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_listCacheSet.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_mapCacheClear.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_mapCacheDelete.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_mapCacheGet.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_mapCacheHas.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_mapCacheSet.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_mapToArray.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_nativeCreate.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_nativeKeys.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_nativeKeysIn.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_nodeUtil.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_objectToString.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_overArg.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_root.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_setCacheAdd.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_setCacheHas.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_setToArray.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_stackClear.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_stackDelete.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_stackGet.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_stackHas.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_stackSet.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_toSource.js","webpack://openfin-web--web-interop/../../node_modules/lodash/cloneDeep.js","webpack://openfin-web--web-interop/../../node_modules/lodash/eq.js","webpack://openfin-web--web-interop/../../node_modules/lodash/isArguments.js","webpack://openfin-web--web-interop/../../node_modules/lodash/isArray.js","webpack://openfin-web--web-interop/../../node_modules/lodash/isArrayLike.js","webpack://openfin-web--web-interop/../../node_modules/lodash/isBuffer.js","webpack://openfin-web--web-interop/../../node_modules/lodash/isEqual.js","webpack://openfin-web--web-interop/../../node_modules/lodash/isFunction.js","webpack://openfin-web--web-interop/../../node_modules/lodash/isLength.js","webpack://openfin-web--web-interop/../../node_modules/lodash/isMap.js","webpack://openfin-web--web-interop/../../node_modules/lodash/isObject.js","webpack://openfin-web--web-interop/../../node_modules/lodash/isObjectLike.js","webpack://openfin-web--web-interop/../../node_modules/lodash/isSet.js","webpack://openfin-web--web-interop/../../node_modules/lodash/isTypedArray.js","webpack://openfin-web--web-interop/../../node_modules/lodash/keys.js","webpack://openfin-web--web-interop/../../node_modules/lodash/keysIn.js","webpack://openfin-web--web-interop/../../node_modules/lodash/stubArray.js","webpack://openfin-web--web-interop/../../node_modules/lodash/stubFalse.js","webpack://openfin-web--web-interop/./client/src/platform/api.ts","webpack://openfin-web--web-interop/./client/src/platform/settings.ts","webpack://openfin-web--web-interop/../../node_modules/uuid/dist/esm-browser/index.js","webpack://openfin-web--web-interop/../../node_modules/uuid/dist/esm-browser/md5.js","webpack://openfin-web--web-interop/../../node_modules/uuid/dist/esm-browser/nil.js","webpack://openfin-web--web-interop/../../node_modules/uuid/dist/esm-browser/parse.js","webpack://openfin-web--web-interop/../../node_modules/uuid/dist/esm-browser/regex.js","webpack://openfin-web--web-interop/../../node_modules/uuid/dist/esm-browser/rng.js","webpack://openfin-web--web-interop/../../node_modules/uuid/dist/esm-browser/sha1.js","webpack://openfin-web--web-interop/../../node_modules/uuid/dist/esm-browser/stringify.js","webpack://openfin-web--web-interop/../../node_modules/uuid/dist/esm-browser/v1.js","webpack://openfin-web--web-interop/../../node_modules/uuid/dist/esm-browser/v3.js","webpack://openfin-web--web-interop/../../node_modules/uuid/dist/esm-browser/v35.js","webpack://openfin-web--web-interop/../../node_modules/uuid/dist/esm-browser/v4.js","webpack://openfin-web--web-interop/../../node_modules/uuid/dist/esm-browser/v5.js","webpack://openfin-web--web-interop/../../node_modules/uuid/dist/esm-browser/validate.js","webpack://openfin-web--web-interop/../../node_modules/uuid/dist/esm-browser/version.js","webpack://openfin-web--web-interop/webpack/bootstrap","webpack://openfin-web--web-interop/webpack/runtime/define property getters","webpack://openfin-web--web-interop/webpack/runtime/global","webpack://openfin-web--web-interop/webpack/runtime/hasOwnProperty shorthand","webpack://openfin-web--web-interop/webpack/runtime/make namespace object","webpack://openfin-web--web-interop/webpack/runtime/node module decorator","webpack://openfin-web--web-interop/./client/src/content/interop-view.ts"],"sourcesContent":["\"use strict\";var e=require(\"./main-8cad4070.js\");require(\"buffer/\"),require(\"uuid\"),require(\"events\"),require(\"lodash/cloneDeep\"),require(\"lodash/isEqual\"),exports.connect=e.connect;\n","\"use strict\";var e=require(\"buffer/\"),t=require(\"events\"),n=require(\"lodash/cloneDeep\"),i=require(\"lodash/isEqual\"),r=require(\"uuid\");const o=(e,t)=>`${t}<${btoa(JSON.stringify(e))}>`;var s=\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof window?window:\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:{},a={},c={},d={},h={};async function l(e){const t=[];for(const n of e){const e=await n();t.push(e)}return t}Object.defineProperty(h,\"__esModule\",{value:!0}),h.promiseMapSerial=h.serial=h.promiseMap=h.promisify=void 0,h.promisify=function(e){return(...t)=>new Promise(((n,i)=>{e(...t,((e,t)=>e?i(e):n(t)))}))},h.promiseMap=async function(e,t){return Promise.all(e.map(t))},h.serial=l,h.promiseMapSerial=async function(e,t){return l(e.map(((e,n,i)=>()=>t(e,n,i))))};var u,p=s&&s.__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},w=s&&s.__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)};Object.defineProperty(d,\"__esModule\",{value:!0}),d.Reply=d.EmitterBase=d.Base=void 0;const y=h;class f{constructor(e){this.isNodeEnvironment=()=>\"node\"===this.wire.environment.type,this.isOpenFinEnvironment=()=>\"openfin\"===this.wire.environment.type,this.isBrowserEnvironment=()=>\"other\"===this.wire.environment.type,this.wire=e}get fin(){return this.wire.getFin()}get me(){return this.wire.me}}d.Base=f;d.EmitterBase=class extends f{constructor(e,t,...n){super(e),this.topic=t,u.set(this,void 0),this.eventNames=()=>this.hasEmitter()?this.getOrCreateEmitter().eventNames():[],this.emit=(e,t,...n)=>!!this.hasEmitter()&&this.getOrCreateEmitter().emit(e,t,...n),this.hasEmitter=()=>this.wire.eventAggregator.has(w(this,u,\"f\")),this.getOrCreateEmitter=()=>this.wire.eventAggregator.getOrCreate(w(this,u,\"f\")),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[],this.listenerCount=e=>this.hasEmitter()?this.getOrCreateEmitter().listenerCount(e):0,this.registerEventListener=async(e,t={},n,i)=>{const r={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e},o=this.getOrCreateEmitter();n(o);try{await this.wire.sendAction(\"subscribe-to-desktop-event\",r)}catch(e){throw i(o),this.deleteEmitterIfNothingRegistered(o),e}},this.deregisterEventListener=async(e,t={})=>{if(this.hasEmitter()){const n={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e};await this.wire.sendAction(\"unsubscribe-to-desktop-event\",n).catch((()=>null));return this.getOrCreateEmitter()}return Promise.resolve()},p(this,u,[t,...n],\"f\"),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[]}async on(e,t,n){return await this.registerEventListener(e,n,(n=>{n.on(e,t)}),(n=>{n.removeListener(e,t)})),this}async addListener(e,t,n){return this.on(e,t,n)}async once(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.once(e,i),n.once(e,t)}),(n=>{n.removeListener(e,i),n.removeListener(e,t)})),this}async prependListener(e,t,n){return await this.registerEventListener(e,n,(n=>{n.prependListener(e,t)}),(n=>{n.removeListener(e,t)})),this}async prependOnceListener(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.prependOnceListener(e,t),n.once(e,i)}),(n=>{n.removeListener(e,t),n.removeListener(e,i)})),this}async removeListener(e,t,n){const i=await this.deregisterEventListener(e,n);return i&&(i.removeListener(e,t),this.deleteEmitterIfNothingRegistered(i)),this}async deregisterAllListeners(e){const t={...this.identity,type:e,topic:this.topic};if(this.hasEmitter()){const e=this.getOrCreateEmitter(),n=e.listenerCount(t.type),i=[];for(let e=0;enull)));return await Promise.all(i),e}}async removeAllListeners(e){const t=async e=>{const t=await this.deregisterAllListeners(e);t&&(t.removeAllListeners(e),this.deleteEmitterIfNothingRegistered(t))};if(e)await t(e);else if(this.hasEmitter()){const e=this.getOrCreateEmitter().eventNames();await(0,y.promiseMap)(e,t)}return this}deleteEmitterIfNothingRegistered(e){0===e.eventNames().length&&this.wire.eventAggregator.delete(w(this,u,\"f\"))}},u=new WeakMap;d.Reply=class{};var g={};Object.defineProperty(g,\"__esModule\",{value:!0});var m=g.RuntimeError=g.NotSupportedError=g.NotImplementedError=g.NoAckError=g.DuplicateCorrelationError=g.UnexpectedActionError=g.DisconnectedError=void 0;class v extends Error{constructor(e){super(`Expected websocket state OPEN but found ${e}`),this.readyState=e}}g.DisconnectedError=v;class C extends Error{}g.UnexpectedActionError=C;class b extends Error{}g.DuplicateCorrelationError=b;class I extends Error{}g.NoAckError=I;class E extends Error{}g.NotImplementedError=E;class x extends Error{}g.NotSupportedError=x;class A extends Error{constructor(e){const{message:t,name:n,stack:i,...r}=e;super(t),this.name=n||\"Error\",this.stack=i??this.toString(),Object.keys(r).forEach((e=>{this[e]=r[e]}))}}class P extends Error{static getCallSite(e=0){const t=Error.stackTraceLimit,n=e+1;Error.stackTraceLimit=t+n;const i=Error.prepareStackTrace;Error.prepareStackTrace=(e,t)=>t;const r=(new Error).stack?.slice(n)??[];return Error.prepareStackTrace=i,Error.stackTraceLimit=t,r}static prepareStackTrace(e,t){if(\"function\"==typeof Error.prepareStackTrace)return Error.prepareStackTrace(e,t);let n=\"\";n+=e.name||\"Error\",n+=`: ${e.message||\"\"}`;for(const e of t)n+=`\\n at ${e.toString()}`;return n}constructor(e,t){const{reason:n,error:i}=e;super(n),this.name=\"RuntimeError\",i?.stack&&(this.cause=new A(i)),t&&(this.stack=P.prepareStackTrace(this,t))}}m=g.RuntimeError=P;var M={},_={},O={};Object.defineProperty(O,\"__esModule\",{value:!0}),O.validateIdentity=void 0,O.validateIdentity=function(e){let t;return\"object\"==typeof e&&\"string\"==typeof e.uuid||(t=\"Not a valid identity object\"),t};var S={},R={},F={},j={},k={},L={},T={};Object.defineProperty(T,\"__esModule\",{value:!0}),T.handleDeprecatedWarnings=void 0;var $;T.handleDeprecatedWarnings=e=>{(e.contentNavigation?.whitelist||e.contentNavigation?.blacklist||e.contentRedirect?.whitelist||e.contentRedirect?.blacklist)&&console.warn(\"The properties 'whitelist' and 'blacklist' have been marked as deprecated and will be removed in a future version. Please use 'allowlist' and 'denylist'.\")};var B={},G={};Object.defineProperty(G,\"__esModule\",{value:!0}),G.AsyncRetryableLazy=W=G.Lazy=void 0;var W=G.Lazy=class{constructor(e){this.producerFn=e}getValue(){return this.value||(this.value=this.producerFn()),this.value}};G.AsyncRetryableLazy=class{constructor(e){this.producerFn=e}async getValue(){return this.promise||(this.promise=this.producerFn().catch((e=>{throw delete this.promise,e}))),this.promise}};var H={};Object.defineProperty(H,\"__esModule\",{value:!0}),H.WebContents=void 0;const N=d;class D extends N.EmitterBase{constructor(e,t,n){super(e,n,t.uuid,t.name),this.identity=t,this.entityType=n}capturePage(e){return this.wire.sendAction(\"capture-page\",{options:e,...this.identity}).then((({payload:e})=>e.data))}executeJavaScript(e){return this.wire.sendAction(\"execute-javascript-in-window\",{...this.identity,code:e}).then((({payload:e})=>e.data))}getZoomLevel(){return this.wire.sendAction(\"get-zoom-level\",this.identity).then((({payload:e})=>e.data))}setZoomLevel(e){return this.wire.sendAction(\"set-zoom-level\",{...this.identity,level:e}).then((()=>{}))}navigate(e){return this.wire.sendAction(\"navigate-window\",{...this.identity,url:e}).then((()=>{}))}navigateBack(){return this.wire.sendAction(\"navigate-window-back\",{...this.identity}).then((()=>{}))}async navigateForward(){await this.wire.sendAction(\"navigate-window-forward\",{...this.identity})}stopNavigation(){return this.wire.sendAction(\"stop-window-navigation\",{...this.identity}).then((()=>{}))}reload(e=!1){return this.wire.sendAction(\"reload-window\",{ignoreCache:e,...this.identity}).then((()=>{}))}print(e={}){return this.wire.sendAction(\"print\",{...this.identity,options:e}).then((()=>{}))}findInPage(e,t){return this.wire.sendAction(\"find-in-page\",{...this.identity,searchTerm:e,options:t}).then((({payload:e})=>e.data))}stopFindInPage(e){return this.wire.sendAction(\"stop-find-in-page\",{...this.identity,action:e}).then((()=>{}))}getPrinters(){return this.wire.sendAction(\"get-printers\",{...this.identity}).then((({payload:e})=>e.data))}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){await this.wire.sendAction(\"focus-window\",{emitSynthFocused:e,...this.identity})}async showDeveloperTools(){await this.wire.sendAction(\"show-developer-tools\",this.identity)}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction(\"get-process-info\",this.identity);return e}async getSharedWorkers(){return this.wire.sendAction(\"get-shared-workers\",this.identity).then((({payload:e})=>e.data))}async inspectSharedWorker(){await this.wire.sendAction(\"inspect-shared-worker\",{...this.identity})}async inspectSharedWorkerById(e){await this.wire.sendAction(\"inspect-shared-worker-by-id\",{...this.identity,workerId:e})}async inspectServiceWorker(){await this.wire.sendAction(\"inspect-service-worker\",{...this.identity})}async showPopupWindow(e){if(this.wire.sendAction(`${this.entityType}-show-popup-window`,this.identity).catch((()=>{})),e?.onPopupReady){const t=async({popupName:t})=>{try{const n=this.fin.Window.wrapSync({uuid:this.fin.me.uuid,name:t});await e.onPopupReady(n)}catch(e){throw new Error(`Something went wrong during onPopupReady execution: ${e}`)}};await this.once(\"popup-ready\",t)}const{payload:t}=await this.wire.sendAction(\"try-create-popup-window\",{options:{...e,hasResultCallback:!!e?.onPopupResult,hasReadyCallback:!!e?.onPopupReady},...this.identity}),{data:{willOpen:n,options:i}}=t;n&&await this.fin.Window.create(i.initialOptions);if(e?.onPopupResult){const t=async t=>{await e.onPopupResult((e=>{const{name:t,uuid:n,result:i,data:r}=e,o={identity:{name:t,uuid:n},result:i};return r&&(o.data=r),o})(t))},n=async()=>{await this.removeListener(\"popup-result\",t)};await this.on(\"popup-result\",t),await this.once(\"popup-teardown\",n)}const{payload:r}=await this.wire.sendAction(\"show-popup-window\",{options:i,...this.identity});return r.data}}var U,V,z,K,q;function J(){return V||(V=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(function(){if($)return L;$=1,Object.defineProperty(L,\"__esModule\",{value:!0}),L.ViewModule=void 0;const e=d,t=O,n=J(),i=T;class r extends e.Base{async create(e){const{uuid:t}=this.wire.me;if(!e.name||\"string\"!=typeof e.name)throw new Error(\"Please provide a name property as a string in order to create a View.\");return(0,i.handleDeprecatedWarnings)(e),this.wire.environment.childViews?await this.wire.environment.createChildContent({entityType:\"view\",options:{...e,uuid:t}}):await this.wire.sendAction(\"create-view\",{...e,uuid:t}),this.wrapSync({uuid:t,name:e.name})}async wrap(e){this.wire.sendAction(\"view-wrap\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}wrapSync(e){this.wire.sendAction(\"view-wrap-sync\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}getCurrent(){if(this.wire.sendAction(\"view-get-current\").catch((e=>{})),!this.wire.me.isView)throw new Error(\"You are not in a View context\");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction(\"view-get-current-sync\").catch((e=>{})),!this.wire.me.isView)throw new Error(\"You are not in a View context\");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return L.ViewModule=r,L}(),e),n(function(){if(U)return B;var e;U=1,Object.defineProperty(B,\"__esModule\",{value:!0}),B.View=void 0;const t=g,n=G,i=H,r=ie();class o extends i.WebContents{constructor(i,o){super(i,o,\"view\"),this.identity=o,e.set(this,new n.Lazy((()=>this.fin.Platform.wrapSync(this.identity).getClient()))),this.attach=async e=>{await this.wire.sendAction(\"attach-view\",{target:e,...this.identity})},this.destroy=async()=>{await this.wire.sendAction(\"destroy-view\",{...this.identity})},this.show=async()=>{await this.wire.sendAction(\"show-view\",{...this.identity})},this.showAt=async(e,t={})=>{await this.wire.sendAction(\"show-view-at\",{bounds:e,...this.identity,options:t})},this.bringToFront=async()=>{await this.wire.sendAction(\"bring-view-to-front\",{...this.identity})},this.hide=async()=>{await this.wire.sendAction(\"hide-view\",{...this.identity})},this.setBounds=async e=>{await this.wire.sendAction(\"set-view-bounds\",{bounds:e,...this.identity})},this.getBounds=async()=>(await this.wire.sendAction(\"get-view-bounds\",{...this.identity})).payload.data,this.getInfo=async()=>(await this.wire.sendAction(\"get-view-info\",{...this.identity})).payload.data,this.getParentLayout=async()=>(this.wire.sendAction(\"view-get-parent-layout\",{...this.identity}).catch((()=>{})),this.fin.Platform.Layout.getLayoutByViewIdentity(this.identity)),this.getOptions=async()=>this.wire.sendAction(\"get-view-options\",{...this.identity}).then((({payload:e})=>e.data)),this.updateOptions=async e=>this.wire.sendAction(\"update-view-options\",{options:e,...this.identity}).then((()=>{})),this.getCurrentWindow=async()=>{const{payload:{data:e}}=await this.wire.sendAction(\"get-view-window\",{...this.identity});return new r._Window(this.wire,e)},this.getCurrentStack=async()=>{this.wire.sendAction(\"view-get-current-stack\").catch((()=>{}));try{return(await this.getParentLayout()).getStackByViewIdentity(this.identity)}catch(e){throw new t.RuntimeError({reason:\"This view does not belong to a stack.\",error:e})}},this.triggerBeforeUnload=async()=>(await this.wire.sendAction(\"trigger-before-unload\",{...this.identity})).payload.data,this.bindToElement=async e=>{if(!e)throw new Error(\"Element not found.\");return this.wire.environment.observeBounds(e,(async e=>this.setBounds(e)))}}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){const t=await this.getCurrentWindow();await t.focusedWebViewWasChanged(),await super.focus({emitSynthFocused:e})}}return B.View=o,e=new WeakMap,B}(),e)}(k)),k}function Y(){if(z)return j;z=1,Object.defineProperty(j,\"__esModule\",{value:!0}),j.Application=void 0;const e=d,t=ie(),n=J();class i extends e.EmitterBase{constructor(e,n){super(e,\"application\",n.uuid),this.identity=n,this.window=new t._Window(this.wire,{uuid:this.identity.uuid,name:this.identity.uuid})}windowListFromIdentityList(e){const n=[];return e.forEach((e=>{n.push(new t._Window(this.wire,{uuid:e.uuid,name:e.name}))})),n}isRunning(){return this.wire.sendAction(\"is-application-running\",this.identity).then((({payload:e})=>e.data))}async quit(e=!1){try{await this._close(e),await this.wire.sendAction(\"destroy-application\",{force:e,...this.identity})}catch(e){if(![\"Remote connection has closed\",\"Could not locate the requested application\"].some((t=>e.message.includes(t))))throw e}}async _close(e=!1){try{await this.wire.sendAction(\"close-application\",{force:e,...this.identity})}catch(e){if(!e.message.includes(\"Remote connection has closed\"))throw e}}close(e=!1){return console.warn(\"Deprecation Warning: Application.close is deprecated Please use Application.quit\"),this.wire.sendAction(\"application-close\",this.identity).catch((e=>{})),this._close(e)}getChildWindows(){return this.wire.sendAction(\"get-child-windows\",this.identity).then((({payload:e})=>{const t=[];return e.data.forEach((e=>{t.push({uuid:this.identity.uuid,name:e})})),this.windowListFromIdentityList(t)}))}getManifest(){return this.wire.sendAction(\"get-application-manifest\",this.identity).then((({payload:e})=>e.data))}getParentUuid(){return this.wire.sendAction(\"get-parent-application\",this.identity).then((({payload:e})=>e.data))}getShortcuts(){return this.wire.sendAction(\"get-shortcuts\",this.identity).then((({payload:e})=>e.data))}async getViews(){const{payload:e}=await this.wire.sendAction(\"application-get-views\",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}getZoomLevel(){return this.wire.sendAction(\"get-application-zoom-level\",this.identity).then((({payload:e})=>e.data))}getWindow(){return this.wire.sendAction(\"application-get-window\",this.identity).catch((e=>{})),Promise.resolve(this.window)}registerUser(e,t){return this.wire.sendAction(\"register-user\",{userName:e,appName:t,...this.identity}).then((()=>{}))}removeTrayIcon(){return this.wire.sendAction(\"remove-tray-icon\",this.identity).then((()=>{}))}restart(){return this.wire.sendAction(\"restart-application\",this.identity).then((()=>{}))}run(){return console.warn(\"Deprecation Warning: Application.run is deprecated Please use fin.Application.start\"),this.wire.sendAction(\"application-run\",this.identity).catch((e=>{})),this._run()}_run(e={}){return this.wire.sendAction(\"run-application\",{manifestUrl:this._manifestUrl,opts:e,...this.identity}).then((()=>{}))}scheduleRestart(){return this.wire.sendAction(\"relaunch-on-close\",this.identity).then((()=>{}))}async sendApplicationLog(){const{payload:e}=await this.wire.sendAction(\"send-application-log\",this.identity);return e.data}async setJumpList(e){await this.wire.sendAction(\"set-jump-list\",{config:e,...this.identity})}setTrayIcon(e){return this.wire.sendAction(\"set-tray-icon\",{enabledIcon:e,...this.identity}).then((()=>{}))}setShortcuts(e){return this.wire.sendAction(\"set-shortcuts\",{data:e,...this.identity}).then((()=>{}))}async setShortcutQueryParams(e){await this.wire.sendAction(\"set-shortcut-query-args\",{data:e,...this.identity})}setZoomLevel(e){return this.wire.sendAction(\"set-application-zoom-level\",{level:e,...this.identity}).then((()=>{}))}async setAppLogUsername(e){await this.wire.sendAction(\"set-app-log-username\",{data:e,...this.identity})}getTrayIconInfo(){return this.wire.sendAction(\"get-tray-icon-info\",this.identity).then((({payload:e})=>e.data))}hasTrayIcon(){return this.wire.sendAction(\"has-tray-icon\",this.identity).then((({payload:e})=>e.data))}terminate(){return this.wire.sendAction(\"terminate-application\",this.identity).then((()=>{}))}wait(){return this.wire.sendAction(\"wait-for-hung-application\",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction(\"get-info\",this.identity).then((({payload:e})=>e.data))}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction(\"application-get-process-info\",this.identity);return e}async setFileDownloadLocation(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t};await this.wire.sendAction(\"set-file-download-location\",{...n,downloadLocation:e})}async getFileDownloadLocation(){const{payload:{data:e}}=await this.wire.sendAction(\"get-file-download-location\",this.identity);return e}async showTrayIconPopupMenu(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t},{payload:i}=await this.wire.sendAction(\"show-tray-icon-popup-menu\",{...n,options:e});return i.data}async closeTrayIconPopupMenu(){const{name:e}=this.wire.me,t={uuid:this.identity.uuid,name:e};await this.wire.sendAction(\"close-tray-icon-popup-menu\",{...t})}}return j.Application=i,j}function Z(){return q||(q=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(function(){if(K)return F;K=1,Object.defineProperty(F,\"__esModule\",{value:!0}),F.ApplicationModule=void 0;const e=d,t=O,n=Y();class i extends e.Base{async wrap(e){this.wire.sendAction(\"wrap-application\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}wrapSync(e){this.wire.sendAction(\"wrap-application-sync\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}async _create(e){return void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&void 0===e.isPlatformController&&(e.autoShow=!0),await this.wire.sendAction(\"create-application\",e),this.wrap({uuid:e.uuid})}create(e){return console.warn(\"Deprecation Warning: fin.Application.create is deprecated. Please use fin.Application.start\"),this.wire.sendAction(\"application-create\").catch((e=>{})),this._create(e)}async start(e){this.wire.sendAction(\"start-application\").catch((e=>{}));const t=await this._create(e);return await this.wire.sendAction(\"run-application\",{uuid:e.uuid}),t}async startManyManifests(e,t){return this.wire.sendAction(\"run-applications\",{applications:e,opts:t}).then((()=>{}))}getCurrent(){return this.wire.sendAction(\"get-current-application\").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction(\"get-current-application-sync\").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}async startFromManifest(e,t){this.wire.sendAction(\"application-start-from-manifest\").catch((e=>{}));const n=await this._createFromManifest(e);return await n._run(t),n}createFromManifest(e){return console.warn(\"Deprecation Warning: fin.Application.createFromManifest is deprecated. Please use fin.Application.startFromManifest\"),this.wire.sendAction(\"application-create-from-manifest\").catch((e=>{})),this._createFromManifest(e)}_createFromManifest(e){return this.wire.sendAction(\"get-application-manifest\",{manifestUrl:e}).then((({payload:e})=>{const t=e.data.platform?e.data.platform.uuid:e.data.startup_app.uuid;return this.wrap({uuid:t})})).then((t=>(t._manifestUrl=e,t)))}}return F.ApplicationModule=i,F}(),e),n(Y(),e)}(R)),R}H.WebContents=D;var Q={};Object.defineProperty(Q,\"__esModule\",{value:!0}),Q.promisifySubscription=void 0;var X,ee,te;function ne(){if(X)return S;X=1,Object.defineProperty(S,\"__esModule\",{value:!0}),S._Window=void 0;const e=Z(),t=H,n=J(),i=T,r=Q;class o extends t.WebContents{constructor(e,t){super(e,t,\"window\")}async createWindow(e){this.wire.sendAction(\"window-create-window\",this.identity).catch((e=>{}));const t=await(0,r.promisifySubscription)(this,\"fire-constructor-callback\");void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&(e.autoShow=!0),(0,i.handleDeprecatedWarnings)(e);const n=this.wire.environment.createChildContent({entityType:\"window\",options:e}),[o]=await Promise.all([t.getValue(),n]);let s;const{success:a}=o,c=o.data,{message:d}=c;s=a?{httpResponseCode:c.httpResponseCode,apiInjected:c.apiInjected}:{message:c.message,networkErrorCode:c.networkErrorCode,stack:c.stack};const h={message:d,cbPayload:s,success:a};try{this.getWebWindow().fin.__internal_.openerSuccessCBCalled()}catch(e){}return h.success?this:Promise.reject(h)}getAllFrames(){return this.wire.sendAction(\"get-all-frames\",this.identity).then((({payload:e})=>e.data))}getBounds(){return this.wire.sendAction(\"get-window-bounds\",this.identity).then((({payload:e})=>e.data))}center(){return this.wire.sendAction(\"center-window\",this.identity).then((()=>{}))}blur(){return this.wire.sendAction(\"blur-window\",this.identity).then((()=>{}))}bringToFront(){return this.wire.sendAction(\"bring-window-to-front\",this.identity).then((()=>{}))}animate(e,t){return this.wire.sendAction(\"animate-window\",{transitions:e,options:t,...this.identity}).then((()=>{}))}hide(){return this.wire.sendAction(\"hide-window\",this.identity).then((()=>{}))}close(e=!1){return this.wire.sendAction(\"close-window\",{force:e,...this.identity}).then((()=>{Object.setPrototypeOf(this,null)}))}focusedWebViewWasChanged(){return this.wire.sendAction(\"focused-webview-changed\",this.identity).then((()=>{}))}getNativeId(){return this.wire.sendAction(\"get-window-native-id\",this.identity).then((({payload:e})=>e.data))}async getCurrentViews(){const{payload:e}=await this.wire.sendAction(\"window-get-views\",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}disableFrame(){return console.warn(\"Function is deprecated; use disableUserMovement instead.\"),this.wire.sendAction(\"disable-window-frame\",this.identity).then((()=>{}))}disableUserMovement(){return this.wire.sendAction(\"disable-window-frame\",this.identity).then((()=>{}))}enableFrame(){return console.warn(\"Function is deprecated; use enableUserMovement instead.\"),this.wire.sendAction(\"enable-window-frame\",this.identity).then((()=>{}))}enableUserMovement(){return this.wire.sendAction(\"enable-window-frame\",this.identity).then((()=>{}))}flash(){return this.wire.sendAction(\"flash-window\",this.identity).then((()=>{}))}stopFlashing(){return this.wire.sendAction(\"stop-flash-window\",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction(\"get-window-info\",this.identity).then((({payload:e})=>e.data))}async getLayout(e){this.wire.sendAction(\"window-get-layout\",this.identity).catch((e=>{}));const t=await this.getOptions();if(!t.layout&&!t.layoutSnapshot)throw new Error(\"Window does not have a Layout\");return this.fin.Platform.Layout.wrap(e??this.identity)}getOptions(){return this.wire.sendAction(\"get-window-options\",this.identity).then((({payload:e})=>e.data))}getParentApplication(){return this.wire.sendAction(\"window-get-parent-application\",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity))}getParentWindow(){return this.wire.sendAction(\"window-get-parent-window\",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity)).then((e=>e.getWindow()))}async getSnapshot(e){const t={area:e,...this.identity};console.warn(\"Window.getSnapshot has been deprecated, please use Window.capturePage\");return(await this.wire.sendAction(\"get-window-snapshot\",t)).payload.data}getState(){return this.wire.sendAction(\"get-window-state\",this.identity).then((({payload:e})=>e.data))}getWebWindow(){return this.wire.sendAction(\"window-get-web-window\",this.identity).catch((e=>{})),this.wire.environment.getWebWindow(this.identity)}isMainWindow(){return this.wire.sendAction(\"window-is-main-window\",this.identity).catch((e=>{})),this.me.uuid===this.me.name}isShowing(){return this.wire.sendAction(\"is-window-showing\",this.identity).then((({payload:e})=>e.data))}maximize(){return this.wire.sendAction(\"maximize-window\",this.identity).then((()=>{}))}minimize(){return this.wire.sendAction(\"minimize-window\",this.identity).then((()=>{}))}moveBy(e,t,n){return this.wire.sendAction(\"move-window-by\",{deltaLeft:e,deltaTop:t,positioningOptions:n,...this.identity}).then((()=>{}))}moveTo(e,t,n){return this.wire.sendAction(\"move-window\",{left:e,top:t,positioningOptions:n,...this.identity}).then((()=>{}))}resizeBy(e,t,n,i){return this.wire.sendAction(\"resize-window-by\",{deltaWidth:Math.floor(e),deltaHeight:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}resizeTo(e,t,n,i){return this.wire.sendAction(\"resize-window\",{width:Math.floor(e),height:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}restore(){return this.wire.sendAction(\"restore-window\",this.identity).then((()=>{}))}setAsForeground(){return this.wire.sendAction(\"set-foreground-window\",this.identity).then((()=>{}))}setBounds(e,t){return this.wire.sendAction(\"set-window-bounds\",{...e,...this.identity,positioningOptions:t}).then((()=>{}))}show(e=!1){return this.wire.sendAction(\"show-window\",{force:e,...this.identity}).then((()=>{}))}showAt(e,t,n=!1){return this.wire.sendAction(\"show-at-window\",{force:n,left:Math.floor(e),top:Math.floor(t),...this.identity}).then((()=>{}))}updateOptions(e){return this.wire.sendAction(\"update-window-options\",{options:e,...this.identity}).then((()=>{}))}authenticate(e,t){return this.wire.sendAction(\"window-authenticate\",{userName:e,password:t,...this.identity}).then((()=>{}))}async showPopupMenu(e){const{payload:t}=await this.wire.sendAction(\"show-popup-menu\",{options:e,...this.identity});return t.data}async closePopupMenu(){return this.wire.sendAction(\"close-popup-menu\",{...this.identity}).then((()=>{}))}async dispatchPopupResult(e){this.wire.sendAction(\"window-dispatch-popup-result\",this.identity).catch((e=>{})),await this.wire.sendAction(\"dispatch-popup-result\",{data:e,...this.identity})}async print(e={content:\"self\"}){switch(e.content){case void 0:case\"self\":return super.print(e);case\"screenshot\":return this.wire.sendAction(\"print-screenshot\",this.identity).then((()=>{}));case\"views\":return this.wire.sendAction(\"print-views\",{...this.identity,options:e}).then((()=>{}));default:return}}}return S._Window=o,S}function ie(){return te||(te=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(function(){if(ee)return _;ee=1,Object.defineProperty(_,\"__esModule\",{value:!0}),_._WindowModule=void 0;const e=d,t=O,n=ne();class i extends e.Base{async wrap(e){this.wire.sendAction(\"window-wrap\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}wrapSync(e){this.wire.sendAction(\"window-wrap-sync\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}create(e){return this.wire.sendAction(\"create-window\").catch((e=>{})),new n._Window(this.wire,{uuid:this.me.uuid,name:e.name}).createWindow(e)}getCurrent(){if(this.wire.sendAction(\"get-current-window\").catch((e=>{})),!this.wire.me.isWindow)throw new Error(\"You are not in a Window context\");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction(\"get-current-window-sync\").catch((e=>{})),!this.wire.me.isWindow)throw new Error(\"You are not in a Window context\");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return _._WindowModule=i,_}(),e),n(ne(),e)}(M)),M}Q.promisifySubscription=async(e,t,n=(()=>!0),i)=>{let r,o,s;const a=new Promise(((e,t)=>{r=e,o=t})),c=e=>{n(e)&&(clearTimeout(s),r(e))};return await e.on(t,c),i&&(s=setTimeout((()=>o(new Error(\"event timed out\"))),i)),a.finally((()=>{e.removeListener(t,c).catch((()=>null))})),{getValue:()=>a}},Object.defineProperty(c,\"__esModule\",{value:!0}),c.System=void 0;const re=d,oe=g,se=ie(),ae=t;class ce extends re.EmitterBase{constructor(e){super(e,\"system\")}sendExternalProcessRequest(e,t){return new Promise(((n,i)=>{const r=\"external-process-exited\";let o,s,a,c;\"function\"==typeof t.listener&&(a=e=>{const n=e||{};s={topic:\"exited\",uuid:n.processUuid||\"\",exitCode:n.exitCode||0},o===e.processUuid&&(t.listener(s),c.removeListener(r,a))},this.wire.me.name||(this.wire.me.name=this.wire.me.uuid),c=new se._Window(this.wire,this.wire.me),c.on(r,a)),this.wire.sendAction(e,t).then((({payload:e})=>{o=e.data.uuid,n(e.data),s&&o===s.uuid&&(t.listener(s),c.removeListener(r,a))})).catch((e=>{c&&c.removeListener(r,a),i(e)}))}))}getVersion(){return this.wire.sendAction(\"get-version\").then((({payload:e})=>e.data))}clearCache(e){return this.wire.sendAction(\"clear-cache\",e).then((()=>{}))}deleteCacheOnExit(){return this.wire.sendAction(\"delete-cache-request\").then((()=>{}))}exit(){return this.wire.sendAction(\"exit-desktop\").then((()=>{}))}async fetchManifest(e){const{payload:{data:t}}=await this.wire.sendAction(\"fetch-manifest\",{manifestUrl:e});return t}flushCookieStore(){return this.wire.sendAction(\"flush-cookie-store\").then((()=>{}))}getAllWindows(){return this.wire.sendAction(\"get-all-windows\").then((({payload:e})=>e.data))}getAllApplications(){return this.wire.sendAction(\"get-all-applications\").then((({payload:e})=>e.data))}getCommandLineArguments(){return this.wire.sendAction(\"get-command-line-arguments\").then((({payload:e})=>e.data))}async getCrashReporterState(){const{payload:{data:{diagnosticMode:e,isRunning:t}}}=await this.wire.sendAction(\"get-crash-reporter-state\");return console.warn(\"diagnosticMode property is deprecated. It will be removed in a future version\"),{diagnosticMode:e,diagnosticsMode:e,isRunning:t}}async startCrashReporter(e){const t=e,n={...t,diagnosticMode:t.diagnosticsMode||t.diagnosticMode},{payload:{data:{diagnosticMode:i,isRunning:r}}}=await this.wire.sendAction(\"start-crash-reporter\",n);return{diagnosticMode:i,diagnosticsMode:i,isRunning:r}}getUniqueUserId(){return this.wire.sendAction(\"get-unique-user-id\").then((({payload:e})=>e.data))}getEntityInfo(e,t){return this.wire.sendAction(\"get-entity-info\",{uuid:e,name:t}).then((({payload:e})=>e.data))}getEnvironmentVariable(e){return this.wire.sendAction(\"get-environment-variable\",{environmentVariables:e}).then((({payload:e})=>e.data))}getFocusedWindow(){return this.wire.sendAction(\"get-focused-window\").then((({payload:e})=>e.data))}async isAppCertified(e){const{payload:{data:{certifiedInfo:t}}}=await this.wire.sendAction(\"is-app-certified\",{manifestUrl:e});return t}getInstalledRuntimes(){return this.wire.sendAction(\"get-installed-runtimes\").then((({payload:e})=>e.data.runtimes))}async getInstalledApps(){const{payload:{data:{installedApps:e}}}=await this.wire.sendAction(\"get-installed-apps\");return e}getLog(e){return this.wire.sendAction(\"view-log\",e).then((({payload:e})=>e.data))}getMachineId(){return this.wire.sendAction(\"get-machine-id\").then((({payload:e})=>e.data))}getMinLogLevel(){return this.wire.sendAction(\"get-min-log-level\").then((({payload:e})=>e.data))}getLogList(){return this.wire.sendAction(\"list-logs\").then((({payload:e})=>e.data))}getMonitorInfo(){return this.wire.sendAction(\"get-monitor-info\").then((({payload:e})=>e.data))}getMousePosition(){return this.wire.sendAction(\"get-mouse-position\").then((({payload:e})=>e.data))}getProcessList(){return console.warn(\"System.getProcessList has been deprecated. Please consider using our new process APIs: Window.getProcessInfo, View.getProcessInfo, Application.getProcessInfo, System.getAllProcessInfo\"),this.wire.sendAction(\"process-snapshot\").then((({payload:e})=>e.data))}async getAllProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction(\"get-all-process-info\",this.identity);return e}getProxySettings(){return this.wire.sendAction(\"get-proxy-settings\").then((({payload:e})=>e.data))}getRuntimeInfo(){return this.wire.sendAction(\"get-runtime-info\").then((({payload:e})=>e.data))}getRvmInfo(){return this.wire.sendAction(\"get-rvm-info\").then((({payload:e})=>e.data))}getHostSpecs(){return this.wire.sendAction(\"get-host-specs\").then((({payload:e})=>e.data))}getOSInfo(){return this.wire.sendAction(\"get-os-info\").then((({payload:e})=>e.data))}launchExternalProcess(e){return this.sendExternalProcessRequest(\"launch-external-process\",e)}monitorExternalProcess(e){return this.sendExternalProcessRequest(\"monitor-external-process\",e)}log(e,t){return this.wire.sendAction(\"write-to-log\",{level:e,message:t}).then((()=>{}))}openUrlWithBrowser(e){return this.wire.sendAction(\"open-url-with-browser\",{url:e}).then((()=>{}))}async registerCustomProtocol(e){if(\"object\"!=typeof e)throw new Error(\"Must provide an object with a `protocolName` property having a string value.\");await this.wire.sendAction(\"register-custom-protocol\",e)}async unregisterCustomProtocol(e){await this.wire.sendAction(\"unregister-custom-protocol\",{protocolName:e})}async getCustomProtocolState(e){return this.wire.sendAction(\"get-custom-protocol-state\",{protocolName:e}).then((({payload:e})=>e.data))}releaseExternalProcess(e){return this.wire.sendAction(\"release-external-process\",{uuid:e}).then((()=>{}))}showDeveloperTools(e){return this.wire.sendAction(\"show-developer-tools\",e).then((()=>{}))}terminateExternalProcess(e){return this.wire.sendAction(\"terminate-external-process\",e).then((()=>{}))}updateProxySettings(e){return this.wire.sendAction(\"update-proxy\",e).then((()=>{}))}async downloadAsset(e,t){const n=()=>{};let i=n,r=n;const o=new Promise(((e,t)=>{i=e,r=t}));if(\"openfin\"!==this.wire.environment.type)throw new oe.NotSupportedError(\"downloadAsset only supported in an OpenFin Render process\");const s=oe.RuntimeError.getCallSite(),a=this.wire.environment.getNextMessageId().toString(),c=`asset-download-progress-${a}`,d=`asset-download-error-${a}`,h=`asset-download-complete-${a}`,l=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},u=()=>{this.removeListener(c,l)};await Promise.all([this.on(c,l),this.once(d,(e=>{u();const{reason:t,err:n}=e;r(new oe.RuntimeError({reason:t,error:n},s))})),this.once(h,(()=>{u(),i()}))]);const p=Object.assign(e,{downloadId:a});return await this.wire.sendAction(\"download-asset\",p).catch((e=>{throw u(),e})),o}downloadRuntime(e,t){const n=oe.RuntimeError.getCallSite();return new Promise(((i,r)=>{if(\"openfin\"!==this.wire.environment.type)return void r(new oe.NotSupportedError(\"downloadRuntime only supported in an OpenFin Render process\"));const o=this.wire.environment.getNextMessageId().toString(),s=`runtime-download-progress-${o}`,a=`runtime-download-error-${o}`,c=`runtime-download-complete-${o}`,d=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},h=()=>{this.removeListener(s,d)};this.on(s,d),this.once(a,(e=>{h();const{reason:t,err:i}=e;r(new oe.RuntimeError({reason:t,error:i},n))})),this.once(c,(()=>{h(),i()}));const l=Object.assign(e,{downloadId:o});this.wire.sendAction(\"download-runtime\",l).catch((e=>{h(),r(e)}))}))}downloadPreloadScripts(e){return this.wire.sendAction(\"download-preload-scripts\",{scripts:e}).then((({payload:e})=>e.data))}getAllExternalApplications(){return this.wire.sendAction(\"get-all-external-applications\").then((({payload:e})=>e.data))}getAppAssetInfo(e){return this.wire.sendAction(\"get-app-asset-info\",e).then((({payload:e})=>e.data))}getCookies(e){const t=this.wire.environment.getUrl(),n=Object.assign(e,{url:t});return this.wire.sendAction(\"get-cookies\",n).then((({payload:e})=>e.data))}setMinLogLevel(e){return this.wire.sendAction(\"set-min-log-level\",{level:e}).then((()=>{}))}resolveUuid(e){return this.wire.sendAction(\"resolve-uuid\",{entityKey:e}).then((({payload:e})=>e.data))}executeOnRemote(e,t){return t.requestingIdentity=e,this.wire.ferryAction(t)}readRegistryValue(e,t,n){return this.wire.sendAction(\"read-registry-value\",{rootKey:e,subkey:t,value:n}).then((({payload:e})=>e.data))}registerExternalConnection(e){return this.wire.sendAction(\"register-external-connection\",{uuid:e}).then((({payload:e})=>e.data))}async getServiceConfiguration(e){if(\"string\"!=typeof e.name)throw new Error(\"Must provide an object with a `name` property having a string value\");const{name:t}=e;return this.wire.sendAction(\"get-service-configuration\",{name:t}).then((({payload:e})=>e.data))}async getSystemAppConfig(e){if(\"string\"!=typeof e)throw new Error(\"Must provide a string value for name of system app\");return this.wire.sendAction(\"get-system-app-configuration\",{name:e}).then((({payload:e})=>e.data))}async registerShutdownHandler(e){this.wire.sendAction(\"system-register-shutdown-handler\").catch((e=>{}));const{uuid:t,name:n}=this.wire.me;this.on(\"system-shutdown\",(i=>{e({proceed:()=>{this.wire.environment.raiseEvent(\"application/system-shutdown-handled\",{uuid:t,name:n,topic:\"application\"})}})}))}runRvmHealthCheck(){return this.wire.sendAction(\"run-rvm-health-check\").then((({payload:e})=>e.data))}async launchManifest(e,t={}){const{subscribe:n,...i}=t,r=i;if(n){const e=new ae.EventEmitter;n(e);const t=\"app-version-progress\",i=\"runtime-status\",o=\"app-version-complete\",s=\"app-version-error\",a=this.wire.environment.getNextMessageId().toString();r.appVersionId=a;const c=[o,t,i,s],d=e=>{const{appVersionId:t,topic:n,type:i,...r}=e;return{...r,type:c.find((e=>i.includes(e)))}},h=t=>{const n=d(t);e.emit(n.type,n)},l=()=>{this.removeListener(`${t}.${a}`,h),this.removeListener(`${i}.${a}`,h),this.removeListener(`${o}.${a}`,h),this.removeListener(`${s}.${a}`,h),this.removeListener(`${o}.${a}`,l),this.removeListener(`${s}.${a}`,l)};await Promise.all([this.on(`${t}.${a}`,h),this.on(`${i}.${a}`,h),this.once(`${o}.${a}`,h),this.once(`${s}.${a}`,h),this.once(`${o}.${a}`,l),this.once(`${s}.${a}`,l)])}return(await this.wire.sendAction(\"launch-manifest\",{manifestUrl:e,opts:r})).payload.data.manifest}async queryPermissionForCurrentContext(e){const t={uuid:this.wire.me.uuid,name:this.wire.me.name};return(await this.wire.sendAction(\"query-permission-for-current-context\",{apiName:e,identity:t})).payload.data}async enableNativeWindowIntegrationProvider(e){const{payload:t}=await this.wire.sendAction(\"enable-native-window-integration-provider\",{permissions:e});return t.data}async registerUsage({data:e,type:t}){await this.wire.sendAction(\"register-usage\",{data:e,type:t})}async getPrinters(){const{payload:e}=await this.wire.sendAction(\"system-get-printers\");return e.data}async updateProcessLoggingOptions(e){await this.wire.sendAction(\"system-update-process-logging-options\",{options:e})}async getDomainSettings(){const{payload:{data:e}}=await this.wire.sendAction(\"get-domain-settings\",this.identity);return e}async setDomainSettings(e){await this.wire.sendAction(\"set-domain-settings\",{domainSettings:e,...this.identity})}async refreshExtensions(){const{payload:e}=await this.wire.sendAction(\"refresh-extensions\");return e.data}async getInstalledExtensions(){const{payload:e}=await this.wire.sendAction(\"get-installed-extensions\");return e.data}}c.System=ce;var de={},he={};Object.defineProperty(he,\"__esModule\",{value:!0}),he.RefCounter=void 0;he.RefCounter=class{constructor(){this.topicRefMap=new Map}incRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t+1;n=i,this.topicRefMap.set(e,i)}else this.topicRefMap.set(e,1),n=1;return n}decRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t-1;this.topicRefMap.set(e,i),n=i}else n=-1;return n}actOnFirst(e,t,n){return 1===this.incRefCount(e)?t():n()}actOnLast(e,t,n){return 0===this.decRefCount(e)?t():n()}};var le={},ue={},pe={};Object.defineProperty(pe,\"__esModule\",{value:!0}),pe.ChannelBase=pe.ProtectedItems=void 0;const we=e=>async(t,n,i)=>{const r=await e(t,n,i);return void 0===r?n:r};pe.ProtectedItems=class{constructor(e,t){this.providerIdentity=e,this.close=t}};class ye{static defaultAction(e){throw new Error(`No action registered at target for ${e}`)}constructor(){this.subscriptions=new Map}async processAction(e,t,n){try{const i=this.subscriptions.has(e)?this.subscriptions.get(e):(t,n)=>(this.defaultAction??ye.defaultAction)(e,t,n),r=this.preAction?await this.preAction(e,t,n):t,o=await i(r,n);return this.postAction?await this.postAction(e,o,n):o}catch(t){if(this.errorMiddleware)return this.errorMiddleware(e,t,n);throw t}}beforeAction(e){if(this.preAction)throw new Error(\"Already registered beforeAction middleware\");this.preAction=we(e)}onError(e){if(this.errorMiddleware)throw new Error(\"Already registered error middleware\");this.errorMiddleware=e}afterAction(e){if(this.postAction)throw new Error(\"Already registered afterAction middleware\");this.postAction=we(e)}remove(e){this.subscriptions.delete(e)}setDefaultAction(e){if(this.defaultAction)throw new Error(\"default action can only be set once\");this.defaultAction=e}register(e,t){if(this.subscriptions.has(e))throw new Error(`Subscription already registered for action: ${e}. Unsubscribe before adding new subscription`);return this.subscriptions.set(e,t),!0}}pe.ChannelBase=ye;var fe,ge,me,ve=s&&s.__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)},Ce=s&&s.__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};Object.defineProperty(ue,\"__esModule\",{value:!0}),ue.ChannelClient=void 0;const be=pe,Ie=new Map;class Ee extends be.ChannelBase{static closeChannelByEndpointId(e){const t=Ie.get(e);t&&ve(t,me,\"f\").call(t)}static handleProviderDisconnect(e){for(const t of Ie.values())t.providerIdentity.channelId===e.channelId&&(t.disconnectListener(e),ve(t,me,\"f\").call(t))}constructor(e,t,n){super(),fe.set(this,void 0),ge.set(this,void 0),this.processAction=(e,t,n)=>super.processAction(e,t,n),me.set(this,(()=>{Ie.delete(this.endpointId),ve(this,ge,\"f\").close()})),Ce(this,fe,new be.ProtectedItems(e,t),\"f\"),this.disconnectListener=()=>{},this.endpointId=e.endpointId,Ce(this,ge,n,\"f\"),Ie.set(this.endpointId,this),n.receive(this.processAction)}get providerIdentity(){return ve(this,fe,\"f\").providerIdentity}async dispatch(e,t){if(ve(this,ge,\"f\").isEndpointConnected(this.providerIdentity.channelId))return ve(this,ge,\"f\").send(this.providerIdentity.channelId,e,t);throw new Error(\"The client you are trying to dispatch from is disconnected from the target provider.\")}onDisconnection(e){this.disconnectListener=t=>{try{e(t)}catch(e){throw new Error(`Error while calling the onDisconnection callback: ${e.message}`)}finally{this.disconnectListener=()=>{}}}}async disconnect(){await this.sendDisconnectAction(),ve(this,me,\"f\").call(this)}async sendDisconnectAction(){const e=ve(this,fe,\"f\");await e.close()}static async wireClose(e,t,n){const{channelName:i,uuid:r,name:o}=t;await e.sendAction(\"disconnect-from-channel\",{channelName:i,uuid:r,name:o,endpointId:n})}}ue.ChannelClient=Ee,fe=new WeakMap,ge=new WeakMap,me=new WeakMap;var xe={},Ae={};Object.defineProperty(Ae,\"__esModule\",{value:!0}),Ae.exhaustiveCheck=void 0,Ae.exhaustiveCheck=function(e,t){throw new Error(`Unsupported value: ${e}${t?`\\n Supported values are: ${t.join(\"\")}`:\"\"}`)};var Pe,Me,_e,Oe={},Se=s&&s.__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},Re=s&&s.__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)};Object.defineProperty(Oe,\"__esModule\",{value:!0}),Oe.ClassicInfo=Oe.ClassicStrategy=void 0;Oe.ClassicStrategy=class{constructor(e,t,n,i){this.messageReceiver=t,this.endpointId=n,this.providerIdentity=i,Pe.set(this,void 0),Me.set(this,new Map),_e.set(this,new Map),this.send=async(e,t,n)=>{const i=Re(this,Me,\"f\").get(e);if(!i)throw new Error(`Could not locate routing info for endpoint ${e}`);const r={...i};r.isLocalEndpointId&&delete r.endpointId,delete r.isLocalEndpointId;const o=Re(this,Pe,\"f\").sendAction(\"send-channel-message\",{...r,providerIdentity:this.providerIdentity,action:t,payload:n});Re(this,_e,\"f\").get(e)?.add(o);return(await o.catch((e=>{throw new Error(e.message)})).finally((()=>{Re(this,_e,\"f\").get(e)?.delete(o)}))).payload.data.result},this.close=async()=>{this.messageReceiver.removeEndpoint(this.providerIdentity.channelId,this.endpointId),[...Re(this,Me,\"f\").keys()].forEach((e=>this.closeEndpoint(e))),Se(this,Me,new Map,\"f\")},Se(this,Pe,e,\"f\")}onEndpointDisconnect(e,t){}receive(e){this.messageReceiver.addEndpoint(e,this.providerIdentity.channelId,this.endpointId)}async closeEndpoint(e){const t=Re(this,Me,\"f\").get(e);Re(this,Me,\"f\").delete(e);const n=Re(this,_e,\"f\").get(e);n?.forEach((n=>{const i=`Channel connection with identity uuid: ${t?.uuid} / name: ${t?.name} / endpointId: ${e} no longer connected.`;n.cancel(new Error(i))}))}isEndpointConnected(e){return Re(this,Me,\"f\").has(e)}addEndpoint(e,t){Re(this,Me,\"f\").set(e,t.endpointIdentity),Re(this,_e,\"f\").set(e,new Set)}isValidEndpointPayload(e){return\"string\"==typeof e?.endpointIdentity?.endpointId||\"string\"==typeof e?.endpointIdentity?.channelId}},Pe=new WeakMap,Me=new WeakMap,_e=new WeakMap,Oe.ClassicInfo={version:5,minimumVersion:0,type:\"classic\"};var Fe={},je={},ke={};Object.defineProperty(ke,\"__esModule\",{value:!0}),ke.errorToPOJO=void 0,ke.errorToPOJO=function(e){return{stack:e.stack,name:e.name,message:e.message,toString:()=>e.stack||e.toString()}};var Le,Te,$e=s&&s.__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)},Be=s&&s.__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};Object.defineProperty(je,\"__esModule\",{value:!0}),je.RTCEndpoint=void 0;const Ge=ke;je.RTCEndpoint=class{static isValidEndpointPayload(e){const t=e=>\"object\"==typeof e&&null!==e;return t(e)&&t(e.endpointIdentity)&&t(e.rtc)&&\"string\"==typeof e.endpointIdentity.endpointId}constructor({rtc:e,endpointIdentity:t}){this.responseMap=new Map,Le.set(this,null),Te.set(this,void 0),this.connectionStateChangeHandler=e=>{\"connected\"!==this.rtc.rtcClient.connectionState&&(this.rtc.rtcClient.removeEventListener(\"connectionstatechange\",this.connectionStateChangeHandler),this.close(),$e(this,Te,\"f\")&&$e(this,Te,\"f\").call(this))},this.send=async(e,t)=>{const n=`message-${Math.random()}`,i=new Promise(((e,t)=>{this.responseMap.set(n,{resolve:e,reject:t})}));return this.rtc.channels.request.send(JSON.stringify({action:e,payload:t,messageId:n})),i},this.close=()=>{this.responseMap.forEach((e=>e.reject(\"Connection has closed.\"))),this.responseMap=new Map,this.rtc.channels.request.close(),this.rtc.channels.response.close(),this.rtc.rtcClient.close()},this.rtc=e,this.endpointIdentity=t,this.rtc.channels.response.addEventListener(\"message\",(e=>{let{data:t}=e;e.data instanceof ArrayBuffer&&(t=(new TextDecoder).decode(e.data));const{messageId:n,payload:i,success:r,error:o}=JSON.parse(t),{resolve:s,reject:a}=this.responseMap.get(n)??{};s&&a?(this.responseMap.delete(n),r?s(i):a(o)):(console.log(\"Could not find id in responseMap.\"),console.log(e))})),this.rtc.channels.request.addEventListener(\"message\",(async e=>{let{data:n}=e;e.data instanceof ArrayBuffer&&(n=(new TextDecoder).decode(e.data));const{messageId:i,action:r,payload:o}=JSON.parse(n);if($e(this,Le,\"f\"))try{const e=await $e(this,Le,\"f\").call(this,r,o,t);this.rtc.channels.response.send(JSON.stringify({messageId:i,payload:e,success:!0}))}catch(e){\"open\"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,error:(0,Ge.errorToPOJO)(e),success:!1}))}else\"open\"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,success:!1,error:\"Connection not ready.\"}))})),this.rtc.rtcClient.addEventListener(\"connectionstatechange\",this.connectionStateChangeHandler),Object.values(this.rtc.channels).forEach((e=>{e.onclose=e=>{[...this.responseMap.values()].forEach((e=>e.reject(new Error(\"RTCDataChannel closed unexpectedly, this is most commonly caused by message size. Note: RTC Channels have a message size limit of ~255kB.\")))),this.close(),$e(this,Te,\"f\")&&$e(this,Te,\"f\").call(this)}}))}onDisconnect(e){if($e(this,Te,\"f\"))throw new Error(\"RTCEndpoint disconnectListener cannot be set twice.\");Be(this,Te,e,\"f\")}receive(e){if($e(this,Le,\"f\"))throw new Error(\"You have already set a listener for this RTC Endpoint.\");Be(this,Le,e,\"f\")}get connected(){return\"connected\"===this.rtc.rtcClient.connectionState}},Le=new WeakMap,Te=new WeakMap;var We,He,Ne,De={},Ue=s&&s.__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)},Ve=s&&s.__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};Object.defineProperty(De,\"__esModule\",{value:!0}),De.EndpointStrategy=void 0;De.EndpointStrategy=class{constructor(e,t,n){this.EndpointType=e,this.StrategyName=n,We.set(this,null),He.set(this,new Map),Ne.set(this,!0),this.send=async(e,t,n)=>this.getEndpointById(e).send(t,n),this.close=async()=>{Ue(this,Ne,\"f\")&&(Ue(this,He,\"f\").forEach((e=>e.close())),Ve(this,He,new Map,\"f\")),Ve(this,Ne,!1,\"f\")},this.isValidEndpointPayload=t}onEndpointDisconnect(e,t){this.getEndpointById(e).onDisconnect(t)}receive(e){if(Ue(this,We,\"f\"))throw new Error(`You have already set a listener for this ${this.StrategyName} Strategy`);Ve(this,We,e,\"f\"),Ue(this,He,\"f\").forEach((e=>e.receive(Ue(this,We,\"f\"))))}getEndpointById(e){const t=Ue(this,He,\"f\").get(e);if(!t)throw new Error(`Client with endpoint id ${e} is not connected`);return t}get connected(){return Ue(this,Ne,\"f\")}isEndpointConnected(e){return Ue(this,He,\"f\").has(e)}addEndpoint(e,t){if(!Ue(this,Ne,\"f\"))return void console.warn(`Adding endpoint to disconnected ${this.StrategyName} Strategy`);const n=new this.EndpointType(t);Ue(this,We,\"f\")&&n.receive(Ue(this,We,\"f\")),Ue(this,He,\"f\").set(e,n)}async closeEndpoint(e){Ue(this,He,\"f\").delete(e)}},We=new WeakMap,He=new WeakMap,Ne=new WeakMap,Object.defineProperty(Fe,\"__esModule\",{value:!0}),Fe.RTCInfo=Fe.RTCStrategy=void 0;const ze=je,Ke=De;class qe extends Ke.EndpointStrategy{constructor(){super(ze.RTCEndpoint,ze.RTCEndpoint.isValidEndpointPayload,\"RTC\")}}Fe.RTCStrategy=qe,Fe.RTCInfo={version:2,minimumVersion:0,type:\"rtc\"};var Je={};Object.defineProperty(Je,\"__esModule\",{value:!0}),Je.RTCICEManager=void 0;const Ye=d;class Ze extends Ye.EmitterBase{constructor(e){super(e,\"channel\"),this.ensureChannelOpened=e=>new Promise(((t,n)=>{if(\"open\"===e.readyState)t();else if(\"connecting\"===e.readyState){const n=()=>{e.removeEventListener(\"open\",n),t()};e.addEventListener(\"open\",n)}else n(new Error(\"This Channel has already closed\"))}))}static createDataChannelPromise(e,t){let n;const i=new Promise((e=>{n=e})),r=i=>{const o=()=>{i.channel.removeEventListener(\"open\",o),n(i.channel)};i.channel.label===e&&(i.channel.addEventListener(\"open\",o),t.removeEventListener(\"datachannel\",r))};return t.addEventListener(\"datachannel\",r),i}async listenForProviderIce(e,t){await this.on(this.createProviderEventName(e),t,{timestamp:Date.now()})}async raiseProviderIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createProviderEventName(e)),t)}async listenForClientIce(e,t){await this.on(this.createClientEventName(e),t,{timestamp:Date.now()})}async raiseClientIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createClientEventName(e)),t)}cleanupIceListeners(e){this.removeAllListeners(this.createClientEventName(e)),this.removeAllListeners(this.createProviderEventName(e))}createClientEventName(e){return`ice-client-${e}`}createProviderEventName(e){return`ice-provider-${e}`}createRouteString(e){return`channel/${e}`}createRtcPeer(){return this.wire.environment.getRtcPeer()}async startClientOffer(){const e=Math.random().toString(),t=this.createRtcPeer();t.addEventListener(\"icecandidate\",(async t=>{t.candidate&&await this.raiseClientIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForProviderIce(e,(async e=>{await t.addIceCandidate(e.candidate)}));const n={request:t.createDataChannel(\"request\"),response:t.createDataChannel(\"response\")},i=await t.createOffer();await t.setLocalDescription(i);const r=Promise.all([n.request,n.response].map(this.ensureChannelOpened)).then((()=>{}));return{rtcClient:t,channels:n,offer:i,rtcConnectionId:e,channelsOpened:r}}async finishClientOffer(e,t,n){return await e.setRemoteDescription(t),await n,!0}async createProviderAnswer(e,t){const n=this.createRtcPeer(),i=Ze.createDataChannelPromise(\"request\",n),r=Ze.createDataChannelPromise(\"response\",n);n.addEventListener(\"icecandidate\",(async t=>{t.candidate&&await this.raiseProviderIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForClientIce(e,(async e=>{await n.addIceCandidate(e.candidate)})),await n.setRemoteDescription(t);const o=await n.createAnswer();await n.setLocalDescription(o);const s=Promise.all([i,r]).then((([t,n])=>(this.cleanupIceListeners(e),{request:t,response:n})));return{rtcClient:n,answer:o,channels:s}}}Je.RTCICEManager=Ze;var Qe={},Xe={};function et(e){return[...e.split(\".\").reverse().entries()].reduce(((e,[t,n])=>e+ +n*1e4**t),0)}function tt(e,t){return et(e)>=et(t)}function nt(e){return e.split(\"/\")[0]}Object.defineProperty(Xe,\"__esModule\",{value:!0}),Xe.runtimeUuidMeetsMinimumRuntimeVersion=Xe.parseRuntimeUuid=Xe.meetsMinimumRuntimeVersion=void 0,Xe.meetsMinimumRuntimeVersion=tt,Xe.parseRuntimeUuid=nt,Xe.runtimeUuidMeetsMinimumRuntimeVersion=function(e,t){return tt(nt(e),t)};var it,rt,ot,st,at,ct=s&&s.__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)},dt=s&&s.__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};Object.defineProperty(Qe,\"__esModule\",{value:!0}),Qe.ChannelProvider=void 0;const ht=pe,lt=Xe;class ut extends ht.ChannelBase{get connections(){return[...ct(this,it,\"f\")]}static handleClientDisconnection(e,t){const n=e.connections.find((e=>e.endpointId===t.endpointId));if(n)ct(e,st,\"f\").call(e,n);else{e.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name)).forEach(ct(e,st,\"f\"))}e.disconnectListener(t)}static setProviderRemoval(e,t){ut.removalMap.set(e,t)}constructor(e,t,n){super(),it.set(this,void 0),rt.set(this,void 0),ot.set(this,void 0),st.set(this,(e=>{const t=this.connections.filter((t=>t.endpointId!==e.endpointId));ct(this,ot,\"f\").closeEndpoint(e.endpointId),dt(this,it,t,\"f\")})),this.processAction=async(e,t,n)=>(ut.clientIsMultiRuntime(n)&&!(0,lt.runtimeUuidMeetsMinimumRuntimeVersion)(n.runtimeUuid,\"18.87.56.0\")?this.handleMultiRuntimeLegacyClient(n):this.checkForClientConnection(n),super.processAction(e,t,n)),at.set(this,(()=>{ct(this,ot,\"f\").close();const e=ut.removalMap.get(this);e&&e()})),dt(this,rt,new ht.ProtectedItems(e,t),\"f\"),this.connectListener=()=>{},this.disconnectListener=()=>{},dt(this,it,[],\"f\"),dt(this,ot,n,\"f\"),n.receive(this.processAction)}dispatch(e,t,n){const i=e.endpointId??this.getEndpointIdForOpenFinId(e,t);return i&&ct(this,ot,\"f\").isEndpointConnected(i)?ct(this,ot,\"f\").send(i,t,n):Promise.reject(new Error(`Client connection with identity uuid: ${e.uuid} / name: ${e.name} / endpointId: ${i} no longer connected.`))}async processConnection(e,t){return ct(this,it,\"f\").push(e),this.connectListener(e,t)}publish(e,t){return this.connections.map((n=>ct(this,ot,\"f\").send(n.endpointId,e,t)))}onConnection(e){this.connectListener=e}onDisconnection(e){this.disconnectListener=e}async destroy(){const e=ct(this,rt,\"f\");e.providerIdentity,dt(this,it,[],\"f\"),await e.close(),ct(this,at,\"f\").call(this)}async getAllClientInfo(){return this.connections.map((e=>{const{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}=e;return{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}}))}checkForClientConnection(e){if(!this.isClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider.\\n Client Identity: {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}isClientConnected(e){return ut.clientIdentityIncludesEndpointId(e)?this.connections.some((t=>t.endpointId===e.endpointId&&t.uuid===e.uuid&&t.name===e.name)):this.isLegacyClientConnected(e)}isLegacyClientConnected(e){return this.connections.some((t=>t.uuid===e.uuid&&t.name===e.name))}handleMultiRuntimeLegacyClient(e){if(!this.isLegacyClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider. Client Identity:\\n {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}getEndpointIdForOpenFinId(e,t){const n=this.connections.filter((t=>t.name===e.name&&t.uuid===e.uuid));if(n.length>=2){const n=ct(this,rt,\"f\"),{uuid:i,name:r}=e,o=n?.providerIdentity.uuid,s=n?.providerIdentity.name;console.warn(`WARNING: Dispatch call may have unintended results. The \"to\" argument of your dispatch call is missing the\\n \"endpointId\" parameter. The identity you are dispatching to ({uuid: ${i}, name: ${r}})\\n has multiple channelClients for this channel. Your dispatched action: (${t}) from the provider:\\n ({uuid: ${o}, name: ${s}}) will only be processed by the most recently-created client.`)}return n.pop()?.endpointId}static clientIdentityIncludesEndpointId(e){return void 0!==e.endpointId}static clientIsMultiRuntime(e){return void 0!==e.runtimeUuid}static async wireClose(e,t){await e.sendAction(\"destroy-channel\",{channelName:t})}}Qe.ChannelProvider=ut,it=new WeakMap,rt=new WeakMap,ot=new WeakMap,st=new WeakMap,at=new WeakMap,ut.removalMap=new WeakMap;var pt={};Object.defineProperty(pt,\"__esModule\",{value:!0}),pt.MessageReceiver=void 0;const wt=ue,yt=d;class ft extends yt.Base{constructor(e){super(e),this.onmessage=e=>\"process-channel-message\"===e.action&&(this.processChannelMessage(e),!0),this.endpointMap=new Map,this.latestEndpointIdByChannelId=new Map,e.registerMessageHandler(this.onmessage.bind(this))}async processChannelMessage(e){const{senderIdentity:t,providerIdentity:n,action:i,ackToSender:r,payload:o,intendedTargetIdentity:s}=e.payload,a=s.channelId??s.endpointId??this.latestEndpointIdByChannelId.get(n.channelId),c=this.endpointMap.get(a);if(!c)return r.payload.success=!1,r.payload.reason=`Client connection with identity uuid: ${this.wire.me.uuid} / name: ${this.wire.me.name} / endpointId: ${a} no longer connected.`,this.wire.sendRaw(r);try{const e=await c(i,o,t);return r.payload.payload=r.payload.payload||{},r.payload.payload.result=e,this.wire.sendRaw(r)}catch(e){return r.payload.success=!1,r.payload.reason=e.message,this.wire.sendRaw(r)}}addEndpoint(e,t,n){this.endpointMap.set(n,e),t!==n&&this.latestEndpointIdByChannelId.set(t,n)}removeEndpoint(e,t){this.endpointMap.delete(t),this.latestEndpointIdByChannelId.get(e)===t&&this.latestEndpointIdByChannelId.delete(e)}checkForPreviousClientConnection(e){const t=this.latestEndpointIdByChannelId.get(e);t&&(wt.ChannelClient.closeChannelByEndpointId(t),console.warn(\"You have created a second connection to an older provider. First connection has been removed from the clientMap\"),console.warn(\"If the provider calls publish(), you may receive multiple messages.\"))}}pt.MessageReceiver=ft;var gt={};Object.defineProperty(gt,\"__esModule\",{value:!0}),gt.ProtocolManager=void 0;gt.ProtocolManager=class{constructor(e){this.ProtocolsInPreferenceOrder=e,this.DefaultClientProtocols=[\"classic\"],this.DefaultProviderProtocols=[\"classic\"],this.getClientProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultClientProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(\", \")}.`);return t},this.getProviderProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultProviderProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(\", \")}.`);return t},this.getCompatibleProtocols=(e,t)=>t.supportedProtocols.filter((t=>e.some((e=>e.type===t.type&&t.version>=e.minimumVersion&&e.version>=(t.minimumVersion??0))))).slice(0,t.maxProtocols)}};var mt={};Object.defineProperty(mt,\"__esModule\",{value:!0});class vt{static combine(e,t){return new vt(e,t)}constructor(e,t){this.primary=e,this.secondary=t}onEndpointDisconnect(e,t){this.primary.onEndpointDisconnect(e,(()=>{this.secondary.isEndpointConnected(e)||t()})),this.secondary.onEndpointDisconnect(e,(()=>{this.primary.isEndpointConnected(e)||t()}))}isValidEndpointPayload(e){return this.primary.isValidEndpointPayload(e)||this.secondary.isValidEndpointPayload(e)}async closeEndpoint(e){await this.primary.closeEndpoint(e),await this.secondary.closeEndpoint(e)}isEndpointConnected(e){return this.primary.isEndpointConnected(e)||this.secondary.isEndpointConnected(e)}async addEndpoint(e,t){this.primary.isValidEndpointPayload(t)&&await this.primary.addEndpoint(e,t),this.secondary.isValidEndpointPayload(t)&&await this.secondary.addEndpoint(e,t)}receive(e){this.primary.receive(e),this.secondary.receive(e)}send(e,t,n){return this.primary.isEndpointConnected(e)?this.primary.send(e,t,n):this.secondary.send(e,t,n)}async close(){await Promise.all([this.primary.close(),this.secondary.close()])}}mt.default=vt;var Ct,bt,It=s&&s.__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},Et=s&&s.__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)},xt=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(xe,\"__esModule\",{value:!0}),xe.ConnectionManager=void 0;const At=Ae,Pt=d,Mt=Oe,_t=Fe,Ot=Je,St=Qe,Rt=pt,Ft=gt,jt=xt(mt);class kt extends Pt.Base{static getProtocolOptionsFromStrings(e){return e.map((e=>{switch(e){case\"rtc\":return _t.RTCInfo;case\"classic\":return Mt.ClassicInfo;default:return(0,At.exhaustiveCheck)(e,[\"rtc\",\"classic\"])}}))}constructor(e){super(e),Ct.set(this,void 0),bt.set(this,void 0),this.removeChannelFromProviderMap=e=>{this.providerMap.delete(e)},this.onmessage=e=>\"process-channel-connection\"===e.action&&(this.processChannelConnection(e),!0),this.providerMap=new Map,this.protocolManager=new Ft.ProtocolManager(\"node\"===this.wire.environment.type?[\"classic\"]:[\"rtc\",\"classic\"]),It(this,Ct,new Rt.MessageReceiver(e),\"f\"),It(this,bt,new Ot.RTCICEManager(e),\"f\"),e.registerMessageHandler(this.onmessage.bind(this))}createProvider(e,t){const n=Object.assign(this.wire.environment.getDefaultChannelOptions().create,e||{}),i=this.protocolManager.getProviderProtocols(n?.protocols),r=i.map((e=>{switch(e){case\"rtc\":return new _t.RTCStrategy;case\"classic\":return new Mt.ClassicStrategy(this.wire,Et(this,Ct,\"f\"),t.channelId,t);default:return(0,At.exhaustiveCheck)(e,[\"rtc\",\"classic\"])}}));let o;if(2===r.length){const[e,t]=r;o=jt.default.combine(e,t)}else{if(1!==r.length)throw new Error(\"failed to combine strategies\");[o]=r}const s=new St.ChannelProvider(t,(()=>St.ChannelProvider.wireClose(this.wire,t.channelName)),o),a=t.channelId;return this.providerMap.set(a,{provider:s,strategy:o,supportedProtocols:kt.getProtocolOptionsFromStrings(i)}),St.ChannelProvider.setProviderRemoval(s,this.removeChannelFromProviderMap.bind(this)),s}async createClientOffer(e){const t=this.protocolManager.getClientProtocols(e?.protocols);let n;return{offer:{supportedProtocols:await Promise.all(t.map((async e=>{switch(e){case\"rtc\":{const{rtcClient:e,channels:t,offer:i,rtcConnectionId:r,channelsOpened:o}=await Et(this,bt,\"f\").startClientOffer();return n={rtcClient:e,channels:t,channelsOpened:o},{type:\"rtc\",version:_t.RTCInfo.version,payload:{offer:i,rtcConnectionId:r}}}case\"classic\":return{type:\"classic\",version:Mt.ClassicInfo.version};default:return(0,At.exhaustiveCheck)(e,[\"rtc\",\"classic\"])}}))),maxProtocols:2},rtc:n}}async createClientStrategy(e,t){t.endpointId||(t.endpointId=this.wire.environment.getNextMessageId(),Et(this,Ct,\"f\").checkForPreviousClientConnection(t.channelId));const n=t.answer??{supportedProtocols:[{type:\"classic\",version:1}]},i=(await Promise.all(n.supportedProtocols.map((async n=>\"rtc\"===n.type&&e?(await Et(this,bt,\"f\").finishClientOffer(e.rtcClient,n.payload.answer,e.channelsOpened),new _t.RTCStrategy):\"classic\"===n.type?new Mt.ClassicStrategy(this.wire,Et(this,Ct,\"f\"),t.endpointId,t):null)))).filter((e=>null!==e));let r;if(e&&!i.some((e=>e instanceof _t.RTCStrategy))&&e&&e.rtcClient.close(),i.length>=2)r=jt.default.combine(i[0],i[1]);else{if(!i.length)throw new Error(\"No compatible protocols\");[r]=i}const o={endpointIdentity:t,rtc:e};return r.addEndpoint(t.channelId,o),r}async processChannelConnection(e){const{clientIdentity:t,providerIdentity:n,ackToSender:i,payload:r,offer:o}=e.payload;t.endpointId?t.isLocalEndpointId=!1:(t.endpointId=this.wire.environment.getNextMessageId(),t.isLocalEndpointId=!0);const s=n.channelId,a=this.providerMap.get(s);if(!a)return i.payload.success=!1,i.payload.reason=`Channel \"${n.channelName}\" has been destroyed.`,this.wire.sendRaw(i);const{provider:c,strategy:d,supportedProtocols:h}=a;try{if(!(c instanceof St.ChannelProvider))throw Error(\"Cannot connect to a channel client\");const e=o??{supportedProtocols:[{type:\"classic\",version:1}],maxProtocols:1},n=this.protocolManager.getCompatibleProtocols(h,e);if(!n.length)throw new Error(\"This provider does not support any of the offered protocols.\");const s=await c.processConnection(t,r);i.payload.payload=i.payload.payload||{};let a={supportedProtocols:[],endpointPayloadPromise:Promise.resolve({endpointIdentity:t})};return a=await n.reduce((async(e,t)=>{const n=await e;if(\"rtc\"===t.type){const{answer:e,rtcClient:i,channels:r}=await Et(this,bt,\"f\").createProviderAnswer(t.payload.rtcConnectionId,t.payload.offer);n.supportedProtocols.push({type:\"rtc\",version:_t.RTCInfo.version,payload:{answer:e}}),n.endpointPayloadPromise=n.endpointPayloadPromise.then((e=>r.then((t=>({...e,rtc:{rtcClient:i,channels:t}})))))}else n.supportedProtocols.push({type:\"classic\",version:Mt.ClassicInfo.version});return n}),Promise.resolve(a)),a.endpointPayloadPromise.then((e=>d.addEndpoint(t.endpointId,e))),i.payload.payload.result=s,i.payload.payload.answer=a,this.wire.sendRaw(i)}catch(e){return i.payload.success=!1,i.payload.reason=e.message,this.wire.sendRaw(i)}}}xe.ConnectionManager=kt,Ct=new WeakMap,bt=new WeakMap;var Lt,Tt,$t,Bt=s&&s.__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},Gt=s&&s.__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)};Object.defineProperty(le,\"__esModule\",{value:!0}),le.Channel=void 0;const Wt=t,Ht=G,Nt=d,Dt=ue,Ut=xe,Vt=Qe;function zt(e){const t=Math.floor(e/10),n=Math.min(3e4,500*2**t);return new Promise((e=>{setTimeout((()=>{e(!1)}),n)}))}class Kt extends Nt.EmitterBase{constructor(e){super(e,\"channel\"),Lt.set(this,void 0),Tt.set(this,new Wt.EventEmitter),$t.set(this,new Ht.AsyncRetryableLazy((async()=>{await Promise.all([this.on(\"disconnected\",(e=>{Dt.ChannelClient.handleProviderDisconnect(e)})),this.on(\"connected\",((...e)=>{Gt(this,Tt,\"f\").emit(\"connected\",...e)}))]).catch((()=>new Error(\"error setting up channel connection listeners\")))}))),Bt(this,Lt,new Ut.ConnectionManager(e),\"f\")}async getAllChannels(){return this.wire.sendAction(\"get-all-channels\").then((({payload:e})=>e.data))}async onChannelConnect(e){await this.on(\"connected\",e)}async onChannelDisconnect(e){await this.on(\"disconnected\",e)}async safeConnect(e,t,n){const i={count:0};do{let r=()=>{};const o=new Promise((t=>{r=n=>{e===n.channelName&&t(!0)},Gt(this,Tt,\"f\").on(\"connected\",r)}));try{if(i.count>0){i.gotConnectedEvent=await Promise.race([zt(i.count),o]);const t=await this.wire.sendAction(\"connect-to-channel\",{...n,retryInfo:i});return console.log(`Successfully connected to channelName: ${e}`),t.payload.data}const t=this.wire.sendAction(\"connect-to-channel\",n);i.originalMessageId=t.messageId;return(await t).payload.data}catch(n){if(!n.message.includes(\"internal-nack\"))throw n;t&&0===i.count&&console.warn(`No channel found for channelName: ${e}. Waiting for connection...`)}finally{i.count+=1,Gt(this,Tt,\"f\").removeListener(\"connected\",r)}}while(t);throw new Error(`No channel found for channelName: ${e}.`)}async connect(e,t={}){if(await Gt(this,$t,\"f\").getValue(),!e||\"string\"!=typeof e)throw new Error(\"Please provide a channelName string to connect to a channel.\");const n={wait:!0,...this.wire.environment.getDefaultChannelOptions().connect,...t},{offer:i,rtc:r}=await Gt(this,Lt,\"f\").createClientOffer(n);let o;(this.fin.me.isFrame||this.fin.me.isView||this.fin.me.isWindow)&&(o=(await this.fin.me.getInfo()).url);const s={channelName:e,...n,offer:i,connectionUrl:o},a=await this.safeConnect(e,n.wait,s),c=await Gt(this,Lt,\"f\").createClientStrategy(r,a),d=new Dt.ChannelClient(a,(()=>Dt.ChannelClient.wireClose(this.wire,a,a.endpointId)),c);return c.onEndpointDisconnect(a.channelId,(async()=>{try{await d.sendDisconnectAction()}catch(e){console.warn(`Something went wrong during disconnect for client with uuid: ${a.uuid} / name: ${a.name} / endpointId: ${a.endpointId}.`)}finally{Dt.ChannelClient.handleProviderDisconnect(a)}})),d}async create(e,t){if(!e)throw new Error(\"Please provide a channelName to create a channel\");const{payload:{data:n}}=await this.wire.sendAction(\"create-channel\",{channelName:e}),i=Gt(this,Lt,\"f\").createProvider(t,n);return this.on(\"client-disconnected\",(t=>{t.channelName===e&&Vt.ChannelProvider.handleClientDisconnection(i,t)})),i}}le.Channel=Kt,Lt=new WeakMap,Tt=new WeakMap,$t=new WeakMap,Object.defineProperty(de,\"__esModule\",{value:!0}),de.InterAppPayload=de.InterApplicationBus=void 0;const qt=t,Jt=d,Yt=he,Zt=le,Qt=O;class Xt extends Jt.Base{constructor(e){super(e),this.events={subscriberAdded:\"subscriber-added\",subscriberRemoved:\"subscriber-removed\"},this.refCounter=new Yt.RefCounter,this.Channel=new Zt.Channel(e),this.emitter=new qt.EventEmitter,e.registerMessageHandler(this.onmessage.bind(this)),this.on=this.emitter.on.bind(this.emitter),this.removeAllListeners=this.emitter.removeAllListeners.bind(this.emitter)}async publish(e,t){await this.wire.sendAction(\"publish-message\",{topic:e,message:t,sourceWindowName:this.me.name})}async send(e,t,n){const i=(0,Qt.validateIdentity)(e);if(i)throw new Error(i);await this.wire.sendAction(\"send-message\",{destinationUuid:e.uuid,destinationWindowName:e.name,topic:t,message:n,sourceWindowName:this.me.name})}subscribe(e,t,n){const i=this.createSubscriptionKey(e.uuid,e.name||\"*\",t);return this.emitter.on(i,n),this.refCounter.actOnFirst(i,(async()=>{await this.wire.sendAction(\"subscribe\",{sourceUuid:e.uuid,sourceWindowName:e.name||\"*\",topic:t,destinationWindowName:this.me.name})}),(()=>Promise.resolve()))}unsubscribe(e,t,n){const i=e.name||\"*\",r=this.createSubscriptionKey(e.uuid,i,t);return this.emitter.removeListener(r,n),this.refCounter.actOnLast(r,(async()=>{await this.wire.sendAction(\"unsubscribe\",{sourceUuid:e.uuid,sourceWindowName:i,topic:t,destinationWindowName:this.me.name})}),(()=>new Promise((e=>e)).then((()=>{}))))}processMessage(e){const{payload:{message:t,sourceWindowName:n,sourceUuid:i,topic:r}}=e,o=[this.createSubscriptionKey(i,n,r),this.createSubscriptionKey(i,\"*\",r),this.createSubscriptionKey(\"*\",\"*\",r)],s={uuid:i,name:n};o.forEach((e=>{this.emitter.emit(e,t,s)}))}emitSubscriverEvent(e,t){const{payload:{targetName:n,uuid:i,topic:r}}=t,o={name:n,uuid:i,topic:r};this.emitter.emit(e,o)}createSubscriptionKey(e,t,n){const i=t||\"*\";if(!(e&&i&&n))throw new Error(\"Missing uuid, name, or topic string\");return function(...e){return e.map((e=>Buffer.from(`${e}`).toString(\"base64\"))).join(\"/\")}(e,i,n)}onmessage(e){const{action:t}=e;switch(t){case\"process-message\":this.processMessage(e);break;case this.events.subscriberAdded:this.emitSubscriverEvent(this.events.subscriberAdded,e);break;case this.events.subscriberRemoved:this.emitSubscriverEvent(this.events.subscriberRemoved,e)}return!0}}de.InterApplicationBus=Xt;de.InterAppPayload=class{};var en={};Object.defineProperty(en,\"__esModule\",{value:!0}),en.Clipboard=void 0;const tn=d;class nn extends tn.Base{async writeText(e){await this.wire.sendAction(\"clipboard-write-text\",e)}async readText(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-text\",{type:e});return t.data}async writeImage(e){await this.wire.sendAction(\"clipboard-write-image\",e)}async readImage(e={format:\"dataURL\"}){const{payload:t}=await this.wire.sendAction(\"clipboard-read-image\",e);return t.data}async writeHtml(e){await this.wire.sendAction(\"clipboard-write-html\",e)}async readHtml(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-html\",{type:e});return t.data}async writeRtf(e){await this.wire.sendAction(\"clipboard-write-rtf\",e)}async readRtf(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-rtf\",{type:e});return t.data}async write(e){await this.wire.sendAction(\"clipboard-write\",e)}async getAvailableFormats(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-formats\",{type:e});return t.data}}en.Clipboard=nn;var rn={},on={},sn={};Object.defineProperty(sn,\"__esModule\",{value:!0}),sn.ExternalApplication=void 0;const an=d;class cn extends an.EmitterBase{constructor(e,t){super(e,\"external-application\",t.uuid),this.identity=t}getInfo(){return this.wire.sendAction(\"get-external-application-info\",this.identity).then((({payload:e})=>e.data))}}sn.ExternalApplication=cn,Object.defineProperty(on,\"__esModule\",{value:!0}),on.ExternalApplicationModule=void 0;const dn=d,hn=sn;class ln extends dn.Base{wrap(e){return this.wire.sendAction(\"external-application-wrap\").catch((e=>{})),Promise.resolve(new hn.ExternalApplication(this.wire,{uuid:e}))}wrapSync(e){return this.wire.sendAction(\"external-application-wrap-sync\").catch((e=>{})),new hn.ExternalApplication(this.wire,{uuid:e})}}on.ExternalApplicationModule=ln,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(on,e),n(sn,e)}(rn);var un={},pn={},wn={};Object.defineProperty(wn,\"__esModule\",{value:!0}),wn._Frame=void 0;const yn=d;class fn extends yn.EmitterBase{constructor(e,t){super(e,\"frame\",t.uuid,t.name),this.identity=t}getInfo(){return this.wire.sendAction(\"get-frame-info\",this.identity).then((({payload:e})=>e.data))}getParentWindow(){return this.wire.sendAction(\"get-parent-window\",this.identity).then((({payload:e})=>e.data))}}wn._Frame=fn,Object.defineProperty(pn,\"__esModule\",{value:!0}),pn._FrameModule=void 0;const gn=d,mn=O,vn=wn;class Cn extends gn.Base{async wrap(e){this.wire.sendAction(\"frame-wrap\").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}wrapSync(e){this.wire.sendAction(\"frame-wrap-sync\").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}getCurrent(){return this.wire.sendAction(\"frame-get-current\").catch((e=>{})),Promise.resolve(new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity()))}getCurrentSync(){return this.wire.sendAction(\"frame-get-current-sync\").catch((e=>{})),new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity())}}pn._FrameModule=Cn,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(pn,e),n(wn,e)}(un);var bn={};Object.defineProperty(bn,\"__esModule\",{value:!0}),bn.GlobalHotkey=void 0;const In=d;class En extends In.EmitterBase{constructor(e){super(e,\"global-hotkey\")}async register(e,t){await this.on(e,t),await this.wire.sendAction(\"global-hotkey-register\",{hotkey:e})}async unregister(e){await this.removeAllListeners(e),await this.wire.sendAction(\"global-hotkey-unregister\",{hotkey:e})}async unregisterAll(){await Promise.all(this.eventNames().filter((e=>!(\"registered\"===e||\"unregistered\"===e))).map((e=>this.removeAllListeners(e)))),await this.wire.sendAction(\"global-hotkey-unregister-all\",{})}async isRegistered(e){const{payload:{data:t}}=await this.wire.sendAction(\"global-hotkey-is-registered\",{hotkey:e});return t}}bn.GlobalHotkey=En;var xn,An={},Pn={},Mn={},_n=s&&s.__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)};Object.defineProperty(Mn,\"__esModule\",{value:!0}),Mn.Platform=void 0;const On=d,Sn=O,Rn=new Map;class Fn extends On.EmitterBase{constructor(e,t){super(t.wire,\"application\",e.uuid),this.getClient=e=>{this.wire.sendAction(\"platform-get-client\",this.identity).catch((e=>{}));const t=e||this.identity,{uuid:n}=t;if(!Rn.has(n)){const e=_n(this,xn,\"f\").call(this,n);Rn.set(n,e)}return Rn.get(n)},xn.set(this,(async e=>{try{const t=`custom-frame-${e}`,n=await this._channel.connect(t,{wait:!1});return n.onDisconnection((()=>{Rn.delete(e)})),n}catch(t){throw Rn.delete(e),new Error(\"The targeted Platform is not currently running. Listen for application-started event for the given Uuid.\")}})),this.launchLegacyManifest=this.launchContentManifest;const n=(0,Sn.validateIdentity)(e);if(n)throw new Error(n);this._channel=t,this.identity={uuid:e.uuid},this.Layout=this.fin.Platform.Layout,this.Application=this.fin.Application.wrapSync(this.identity)}async createView(e,t,n){this.wire.sendAction(\"platform-create-view\",this.identity).catch((e=>{}));const i=await this.getClient(),r=await i.dispatch(\"create-view\",{target:t,opts:e,targetView:n});if(!r||(0,Sn.validateIdentity)(r.identity))throw new Error(`When overwriting the createView call, please return an object that has a valid 'identity' property: ${JSON.stringify(r)}`);return this.fin.View.wrapSync(r.identity)}async createWindow(e){this.wire.sendAction(\"platform-create-window\",this.identity).catch((e=>{}));const t=await this.getClient();e.reason||(e.reason=\"api-call\");const n=await t.dispatch(\"create-view-container\",e);if(!n||(0,Sn.validateIdentity)(n.identity))throw new Error(`When overwriting the createWindow call, please return an object that has a valid 'identity' property: ${JSON.stringify(n)}`);const{identity:i}=n,r=this.fin.Window.wrapSync(i);return r.name=i.name,r.uuid=i.uuid,r}async quit(){this.wire.sendAction(\"platform-quit\",this.identity).catch((e=>{}));return(await this.getClient()).dispatch(\"quit\")}async closeView(e){this.wire.sendAction(\"platform-close-view\",this.identity).catch((e=>{}));const t=await this.getClient();await t.dispatch(\"close-view\",{view:e})}async reparentView(e,t){console.warn(\"Platform.reparentView has been deprecated, please use Platform.createView\"),this.wire.sendAction(\"platform-reparent-view\",this.identity).catch((e=>{}));const n={...e,uuid:e.uuid??this.identity.uuid},i=await this.fin.View.wrap(n),r=await i.getOptions();return this.createView(r,t)}async getSnapshot(){this.wire.sendAction(\"platform-get-snapshot\",this.identity).catch((e=>{}));return(await this.getClient()).dispatch(\"get-snapshot\")}async getViewSnapshot(e){return(await this.getClient()).dispatch(\"get-view-snapshot\",{viewIdentity:e})}async applySnapshot(e,t){this.wire.sendAction(\"platform-apply-snapshot\",this.identity).catch((e=>{}));const n=\"Requested snapshot must be a valid Snapshot object, or a url or filepath to such an object.\";let i;if(\"string\"==typeof e)try{i=(await this._channel.wire.sendAction(\"get-application-manifest\",{manifestUrl:e})).payload.data}catch(e){throw new Error(`${n}: ${e}`)}else i=e;if(!i.windows)throw new Error(n);const r=await this.getClient();return await r.dispatch(\"apply-snapshot\",{snapshot:i,options:t}),this}async fetchManifest(e){return(await this.getClient()).dispatch(\"platform-fetch-manifest\",{manifestUrl:e})}async launchContentManifest(e){this.wire.sendAction(\"platform-launch-content-manifest\",this.identity).catch((()=>{}));const t=await this.getClient(),n=await this.fetchManifest(e);return t.dispatch(\"launch-into-platform\",{manifest:n,manifestUrl:e}),this}async setWindowContext(e={},t){if(this.wire.sendAction(\"platform-set-window-context\",this.identity).catch((e=>{})),!e)throw new Error(\"Please provide a serializable object or string to set the context.\");const n=await this.getClient(),{entityType:i}=t?await this.fin.System.getEntityInfo(t.uuid,t.name):this.fin.me;await n.dispatch(\"set-window-context\",{context:e,entityType:i,target:t||{uuid:this.fin.me.uuid,name:this.fin.me.name}})}async getWindowContext(e){this.wire.sendAction(\"platform-get-window-context\",this.identity).catch((e=>{}));const t=await this.getClient(),{entityType:n}=e?await this.fin.System.getEntityInfo(e.uuid,e.name):this.fin.me;return t.dispatch(\"get-window-context\",{target:e||{uuid:this.fin.me.uuid,name:this.fin.me.name},entityType:n})}async closeWindow(e,t={skipBeforeUnload:!1}){this.wire.sendAction(\"platform-close-window\",this.identity).catch((e=>{}));return(await this.getClient()).dispatch(\"close-window\",{windowId:e,options:t})}}Mn.Platform=Fn,xn=new WeakMap;var jn={},kn={},Ln={},Tn={};function $n(e){switch(e){case\"columns\":case\"grid\":case\"rows\":case\"tabs\":return!0;default:return!1}}Object.defineProperty(Tn,\"__esModule\",{value:!0}),Tn.overrideFromComposables=Tn.isValidPresetType=void 0,Tn.isValidPresetType=$n,Tn.overrideFromComposables=function(...e){return t=>e.reduceRight(((e,t)=>n=>t(e(n))),(e=>e))(t)},Tn.default={isValidPresetType:$n};var Bn={},Gn={},Wn={};Object.defineProperty(Wn,\"__esModule\",{value:!0}),Wn.ApiConsumer=void 0;Wn.ApiConsumer=class{constructor(e){this.strategy=e,this.consume=async e=>(await this.strategy.getExposedFunctions(e)).reduce(((t,n)=>({...t,[n.key]:this.strategy.createFunction(n,e)})),{})}};var Hn={},Nn={};Object.defineProperty(Nn,\"__esModule\",{value:!0}),Nn.expose=Nn.getExposedProperties=void 0;const Dn=Symbol(\"exposedProperties\");Nn.getExposedProperties=e=>e[Dn]||e.prototype[Dn]||[];Nn.expose=e=>(t,n,i)=>{t[Dn]=t[Dn]||[],t[Dn].push({key:n,descriptor:i,options:e})},Object.defineProperty(Hn,\"__esModule\",{value:!0}),Hn.ApiExposer=void 0;const Un=Nn;Hn.ApiExposer=class{constructor(e){this.strategy=e,this.exposeInstance=async(e,t)=>{const n=(0,Un.getExposedProperties)(e),i=await Promise.all(n.map((async({key:n,options:i})=>({key:n,options:await this.strategy.exposeFunction(e[n].bind(e),{key:n,options:i,meta:t})}))));await this.strategy.exposeMeta(t,i)}}};var Vn={},zn={},Kn={};Object.defineProperty(Kn,\"__esModule\",{value:!0}),Kn.ChannelsConsumer=void 0;Kn.ChannelsConsumer=class{constructor(e){this.channel=e,this.getExposedFunctions=async e=>{const{id:t}=e,{props:n}=await this.channel.dispatch(`api-meta:${t}`);return n},this.createFunction=e=>(...t)=>{const{action:n}=e.options;return this.channel.dispatch(n,{args:t})}}};var qn={};Object.defineProperty(qn,\"__esModule\",{value:!0}),qn.ChannelsExposer=void 0;qn.ChannelsExposer=class{constructor(e){this.channelProviderOrClient=e,this.exposeFunction=async(e,t)=>{const{key:n,options:i,meta:r}=t,{id:o}=r,s=`${o}.${i?.action||n}`;return await this.channelProviderOrClient.register(s,(async({args:t})=>e(...t))),{action:s}},this.exposeMeta=async({id:e},t)=>{const n=`api-meta:${e}`;await this.channelProviderOrClient.register(n,(()=>({props:t})))}}},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Kn,e),n(qn,e)}(zn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(zn,e)}(Vn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Wn,e),n(Hn,e),n(Vn,e),n(Nn,e)}(Gn);var Jn={};Object.defineProperty(Jn,\"__esModule\",{value:!0}),Jn.createRelayedDispatch=exports.relayChannelClientApi_1=Jn.relayChannelClientApi=void 0;const Yn=[\"no longer connected\",\"RTCDataChannel closed unexpectedly\",\"The client you are trying to dispatch from is disconnected from the target provider\"];exports.relayChannelClientApi_1=Jn.relayChannelClientApi=async(e,t)=>{e.register(`relay:${t}`,(({action:t,target:n,payload:i})=>e.dispatch(n,t,i))),await Promise.resolve()};Jn.createRelayedDispatch=(e,t,n,i)=>async(r,o)=>{try{return await e.dispatch(`relay:${n}`,{action:r,payload:o,target:t})}catch(e){if(s=e.message,Yn.some((e=>s.includes(e)))&&i)throw new Error(i);throw e}var s};var Zn,Qn,Xn,ei=s&&s.__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},ti=s&&s.__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)};Object.defineProperty(Bn,\"__esModule\",{value:!0}),Bn.ColumnOrRow=Bn.TabStack=Bn.LayoutNode=void 0;const ni=Gn,ii=Jn;class ri{constructor(e,t){Zn.set(this,void 0),this.isRoot=()=>ti(this,Zn,\"f\").isRoot(this.entityId),this.exists=()=>ti(this,Zn,\"f\").exists(this.entityId),this.getParent=async()=>{const e=await ti(this,Zn,\"f\").getParent(this.entityId);if(e)return ri.getEntity(e,ti(this,Zn,\"f\"))},this.createAdjacentStack=async(e,t)=>{const n=await ti(this,Zn,\"f\").createAdjacentStack(this.entityId,e,t);return ri.getEntity({entityId:n,type:\"stack\"},ti(this,Zn,\"f\"))},this.getAdjacentStacks=async e=>(await ti(this,Zn,\"f\").getAdjacentStacks({targetId:this.entityId,edge:e})).map((e=>ri.getEntity({type:\"stack\",entityId:e.entityId},ti(this,Zn,\"f\")))),ei(this,Zn,e,\"f\"),this.entityId=t}}Bn.LayoutNode=ri,Zn=new WeakMap,ri.newLayoutEntitiesClient=async(e,t,n)=>{const i=(0,ii.createRelayedDispatch)(e,n,\"layout-relay\",\"You are trying to interact with a layout component on a window that does not exist or has been destroyed.\");return new ni.ApiConsumer(new ni.ChannelsConsumer({dispatch:i})).consume({id:t})},ri.getEntity=(e,t)=>{const{entityId:n,type:i}=e;switch(i){case\"column\":case\"row\":return new si(t,n,i);case\"stack\":return new oi(t,n);default:throw new Error(`Unrecognised Layout Entity encountered ('${JSON.stringify(e)})`)}};class oi extends ri{constructor(e,t){super(e,t),Qn.set(this,void 0),this.type=\"stack\",this.getViews=()=>ti(this,Qn,\"f\").getStackViews(this.entityId),this.addView=async(e,t={index:0})=>ti(this,Qn,\"f\").addViewToStack(this.entityId,e,t),this.removeView=async e=>{await ti(this,Qn,\"f\").removeViewFromStack(this.entityId,e)},this.setActiveView=async e=>{await ti(this,Qn,\"f\").setStackActiveView(this.entityId,e)},ei(this,Qn,e,\"f\")}}Bn.TabStack=oi,Qn=new WeakMap;class si extends ri{constructor(e,t,n){super(e,t),Xn.set(this,void 0),this.getContent=async()=>(await ti(this,Xn,\"f\").getContent(this.entityId)).map((e=>ri.getEntity(e,ti(this,Xn,\"f\")))),ei(this,Xn,e,\"f\"),this.type=n}}Bn.ColumnOrRow=si,Xn=new WeakMap;var ai={};Object.defineProperty(ai,\"__esModule\",{value:!0}),ai.DEFAULT_LAYOUT_KEY=ai.LAYOUT_CONTROLLER_ID=void 0,ai.LAYOUT_CONTROLLER_ID=\"layout-entities\",ai.DEFAULT_LAYOUT_KEY=\"__default__\";var ci,di,hi,li=s&&s.__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)};Object.defineProperty(Ln,\"__esModule\",{value:!0}),Ln.Layout=void 0;const ui=G,pi=O,wi=d,yi=Tn,fi=Bn,gi=ai;class mi extends wi.Base{static getClient(e){return li(e,di,\"f\").getValue()}constructor(e,t){super(t),ci.add(this),di.set(this,new ui.Lazy((async()=>fi.LayoutNode.newLayoutEntitiesClient(await this.platform.getClient(),gi.LAYOUT_CONTROLLER_ID,this.identity)))),this.replace=async e=>{this.wire.sendAction(\"layout-replace\").catch((e=>{}));const t=await this.platform.getClient();await t.dispatch(\"replace-layout\",{target:this.identity,opts:{layout:e}})},this.replaceView=async(e,t)=>{this.wire.sendAction(\"layout-replace-view\").catch((e=>{}));const n=await this.platform.getClient();await n.dispatch(\"replace-view\",{target:this.identity,opts:{viewToReplace:e,newView:t}})},this.applyPreset=async e=>{this.wire.sendAction(\"layout-apply-preset\").catch((e=>{}));const t=await this.platform.getClient(),{presetType:n}=e;if(!n||!(0,yi.isValidPresetType)(n))throw new Error(\"Cannot apply preset layout, please include an applicable presetType property in the PresetLayoutOptions.\");await t.dispatch(\"apply-preset-layout\",{target:this.identity,opts:{presetType:n}})};const n=(0,pi.validateIdentity)(e);if(n)throw new Error(n);this.identity=e,this.platform=this.fin.Platform.wrapSync({uuid:e.uuid}),e.uuid===this.fin.me.uuid&&e.name===this.fin.me.name&&(this.init=this.fin.Platform.Layout.init)}async getConfig(){this.wire.sendAction(\"layout-get-config\").catch((e=>{}));return(await this.platform.getClient()).dispatch(\"get-frame-snapshot\",{target:this.identity})}async getCurrentViews(){this.wire.sendAction(\"layout-get-views\").catch((e=>{}));const e=await this.platform.getClient();return(await e.dispatch(\"get-layout-views\",{target:this.identity})).map((e=>this.fin.View.wrapSync(e)))}async getRootItem(){this.wire.sendAction(\"layout-get-root-item\").catch((()=>{}));const e=await li(this,di,\"f\").getValue(),t=await e.getRoot(\"layoutName\"in this.identity?this.identity:void 0);return fi.LayoutNode.getEntity(t,e)}async getStackByViewIdentity(e){this.wire.sendAction(\"layout-get-stack-by-view\").catch((()=>{}));const t=await li(this,di,\"f\").getValue(),n=await t.getStackByView(e);if(!n)throw new Error(`No stack found for view: ${e.uuid}/${e.name}`);return fi.LayoutNode.getEntity(n,t)}async addView(e,{location:t,targetView:n}={}){this.wire.sendAction(\"layout-add-view\").catch((e=>{}));const{identity:i}=await li(this,ci,\"m\",hi).call(this,\"layout-add-view\",{viewOptions:e,location:t,targetView:n});return{identity:i}}async closeView(e){this.wire.sendAction(\"layout-close-view\").catch((e=>{})),await li(this,ci,\"m\",hi).call(this,\"layout-close-view\",{viewIdentity:e})}}Ln.Layout=mi,di=new WeakMap,ci=new WeakSet,hi=async function(e,t){return(await this.platform.getClient()).dispatch(e,{target:this.identity,opts:t})};var vi,Ci,bi,Ii,Ei,xi=s&&s.__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)},Ai=s&&s.__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};Object.defineProperty(kn,\"__esModule\",{value:!0}),kn.LayoutModule=void 0;const Pi=d,Mi=Ln,_i=ai;class Oi extends Pi.Base{constructor(){super(...arguments),vi.add(this),Ci.set(this,!1),bi.set(this,null),this.init=async(e={})=>{if(this.wire.sendAction(\"layout-init\").catch((e=>{})),!this.wire.environment.layoutAllowedInContext(this.fin))throw new Error(\"Layout.init can only be called from a Window context.\");if(xi(this,Ci,\"f\"))throw new Error(\"Layout.init was already called, please use Layout.create to add additional layouts.\");\"openfin\"===this.wire.environment.type&&await this.fin.Platform.getCurrentSync().getClient(),Ai(this,Ci,!0,\"f\"),Ai(this,bi,await this.wire.environment.initLayoutManager(this.fin,this.wire,e),\"f\"),await this.wire.environment.applyLayoutSnapshot(this.fin,xi(this,bi,\"f\"),e);const t={name:this.fin.me.name,uuid:this.fin.me.uuid};if(!e.layoutManagerOverride){const e={layoutName:_i.DEFAULT_LAYOUT_KEY,...t};return xi(this,Ii,\"f\").call(this,e)}return this.wrapSync(t)},Ii.set(this,(e=>{const t=\"[Layout] You are using a deprecated property `layoutManager` - it will throw if you access it starting in v37.\",n=new Proxy({},{get(e,n){throw console.warn(`[Layout-mgr-proxy] accessing ${n.toString()}`),new Error(t)}}),i=Object.assign(this.wrapSync(e),{layoutManager:n});return new Proxy(i,{get(e,n){if(\"layoutManager\"===n)throw console.warn(`[Layout-proxy] accessing ${n.toString()}`),new Error(t);return e[n]}})})),this.getCurrentLayoutManagerSync=()=>xi(this,vi,\"m\",Ei).call(this,\"fin.Platform.Layout.getCurrentLayoutManagerSync()\"),this.create=async e=>this.wire.environment.createLayout(xi(this,vi,\"m\",Ei).call(this,\"fin.Platform.Layout.create()\"),e),this.destroy=async e=>this.wire.environment.destroyLayout(xi(this,vi,\"m\",Ei).call(this,\"fin.Platform.Layout.destroy()\"),e)}async wrap(e){return this.wire.sendAction(\"layout-wrap\").catch((e=>{})),new Mi.Layout(e,this.wire)}wrapSync(e){return this.wire.sendAction(\"layout-wrap-sync\").catch((e=>{})),new Mi.Layout(e,this.wire)}async getCurrent(){if(this.wire.sendAction(\"layout-get-current\").catch((e=>{})),\"openfin\"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error(\"You are not in a Window context. Only Windows can have a Layout.\");const{uuid:e,name:t}=this.fin.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction(\"layout-get-current-sync\").catch((e=>{})),\"openfin\"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error(\"You are not in a Window context. Only Windows can have a Layout.\");const{uuid:e,name:t}=this.fin.me;return this.wrapSync({uuid:e,name:t})}async getLayoutByViewIdentity(e){this.wire.sendAction(\"layout-get-by-view-identity\").catch((()=>{}));let t=await this.wire.environment.getViewWindowIdentity(this.fin,e);t.identity&&(t=t.identity);try{const n=this.wrapSync(t),i=await Mi.Layout.getClient(n),r=await i.getLayoutIdentityForViewOrThrow(e);return this.wrapSync(r)}catch(n){if(![\"No action registered at target for\",\"getLayoutIdentityForViewOrThrow is not a function\"].some((e=>n.message.includes(e))))throw n;if(t.uuid===t.name)throw new Error(`View identity ${JSON.stringify(e)} is not attached to any layout in provider window ${JSON.stringify(t)}.`);return this.wrapSync(t)}}}kn.LayoutModule=Oi,Ci=new WeakMap,bi=new WeakMap,Ii=new WeakMap,vi=new WeakSet,Ei=function(e){if(!xi(this,bi,\"f\"))throw new Error(`You must call init before using the API ${e}`);return xi(this,bi,\"f\")},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(kn,e),n(Ln,e)}(jn),Object.defineProperty(Pn,\"__esModule\",{value:!0}),Pn.PlatformModule=void 0;const Si=d,Ri=Mn,Fi=jn;class ji extends Si.Base{constructor(e,t){super(e),this._channel=t,this.Layout=new Fi.LayoutModule(this.wire)}async init(e){if(!fin.__internal_.isPlatform||fin.me.name!==fin.me.uuid)throw new Error(\"fin.Platform.init should only be called from a custom platform provider running in the main window of the application.\");return this.wire.environment.initPlatform(this.fin,e)}async wrap(e){return this.wire.sendAction(\"platform-wrap\").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}wrapSync(e){return this.wire.sendAction(\"platform-wrap-sync\").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}async getCurrent(){return this.wire.sendAction(\"platform-get-current\").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction(\"platform-get-current-sync\").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}start(e){return this.wire.sendAction(\"platform-start\").catch((e=>{})),new Promise((async(t,n)=>{try{const{uuid:n}=e,i=await this.fin.Application._create({...e,isPlatformController:!0});i.once(\"platform-api-ready\",(()=>t(this.wrapSync({uuid:n})))),i._run({uuid:n})}catch(e){n(e)}}))}startFromManifest(e,t){return this.wire.sendAction(\"platform-start-from-manifest\").catch((e=>{})),new Promise((async(n,i)=>{try{const i=await this.fin.Application._createFromManifest(e);i.once(\"platform-api-ready\",(()=>n(this.wrapSync({uuid:i.identity.uuid})))),i._run(t)}catch(e){i(e)}}))}}Pn.PlatformModule=ji,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Pn,e),n(Mn,e)}(An);var ki={};!function(e){Object.defineProperty(e,\"__esModule\",{value:!0}),e.getMe=e.getBaseMe=e.environmentUnsupportedMessage=void 0;const t=J(),n=un,i=ie(),r=rn;function o(e,t,n){return{...{isView:\"view\"===e,isWindow:\"window\"===e,isFrame:\"iframe\"===e,isExternal:\"external connection\"===e},uuid:t,name:n,entityType:e}}e.environmentUnsupportedMessage=\"You are not running in OpenFin.\",e.getBaseMe=o,e.getMe=function(s){const{uuid:a,name:c,entityType:d}=s.me,h={setContext(){throw new Error(e.environmentUnsupportedMessage)},addContextHandler(){throw new Error(e.environmentUnsupportedMessage)},getContextGroups(){throw new Error(e.environmentUnsupportedMessage)},joinContextGroup(){throw new Error(e.environmentUnsupportedMessage)},removeFromContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getAllClientsInContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getInfoForContextGroup(){throw new Error(e.environmentUnsupportedMessage)}},l=\"Interop API has not been instantiated. Either connection has failed or you have not declared interop in your config.\",u={setContext(){throw new Error(l)},addContextHandler(){throw new Error(l)},getContextGroups(){throw new Error(l)},joinContextGroup(){throw new Error(l)},removeFromContextGroup(){throw new Error(l)},getAllClientsInContextGroup(){throw new Error(l)},getInfoForContextGroup(){throw new Error(l)}},p={eventNames:()=>{throw new Error(e.environmentUnsupportedMessage)},emit:()=>{throw new Error(e.environmentUnsupportedMessage)},listeners:()=>{throw new Error(e.environmentUnsupportedMessage)},listenerCount:()=>{throw new Error(e.environmentUnsupportedMessage)},on:()=>{throw new Error(e.environmentUnsupportedMessage)},addListener:()=>{throw new Error(e.environmentUnsupportedMessage)},once:()=>{throw new Error(e.environmentUnsupportedMessage)},prependListener:()=>{throw new Error(e.environmentUnsupportedMessage)},prependOnceListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeAllListeners:()=>{throw new Error(e.environmentUnsupportedMessage)}};switch(d){case\"view\":return Object.assign(new t.View(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case\"window\":return Object.assign(new i._Window(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case\"iframe\":return Object.assign(new n._Frame(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case\"external connection\":return Object.assign(new r.ExternalApplication(s,{uuid:a}),o(d,a,c),{interop:u,isOpenFin:!1});default:return{...o(d,a,c),...p,interop:h,isOpenFin:!1}}}}(ki);var Li={},Ti={},$i={};Object.defineProperty($i,\"__esModule\",{value:!0}),$i.createWarningObject=$i.createUnusableObject=void 0,$i.createUnusableObject=function(e){const t=()=>{throw new Error(e)};return new Proxy({},{apply:t,construct:t,defineProperty:t,deleteProperty:t,get:t,getOwnPropertyDescriptor:t,getPrototypeOf:t,has:t,isExtensible:t,ownKeys:t,preventExtensions:t,set:t,setPrototypeOf:t})},$i.createWarningObject=function(e,t){return new Proxy(t,{get:(...t)=>(console.warn(e),Reflect.get(...t)),set:(...t)=>(console.warn(e),Reflect.set(...t)),getOwnPropertyDescriptor:(...t)=>(console.warn(e),Reflect.getOwnPropertyDescriptor(...t)),ownKeys:(...t)=>(console.warn(e),Reflect.ownKeys(...t))})};var Bi,Gi={},Wi={};var Hi={};!function(e){Object.defineProperty(e,\"__esModule\",{value:!0}),e.wrapIntentHandler=e.BROKER_ERRORS=e.generateOverrideWarning=e.generateOverrideError=e.wrapContextHandler=e.wrapInTryCatch=e.generateId=void 0;e.generateId=()=>`${Math.random()}${Date.now()}`;e.wrapInTryCatch=(e,t)=>(...n)=>{try{return e(...n)}catch(e){throw new Error((t||\"\")+e)}};e.wrapContextHandler=(e,t)=>async n=>{try{await e(n)}catch(e){throw console.error(`Error thrown by handler ${t} for context type ${n.type}: ${e}`),e}};e.generateOverrideError=(e,t)=>`You have tried to to use ${e} but ${t} has not been overridden in the Interop Broker. Please override this function. Refer to our documentation for more info.`;e.generateOverrideWarning=(e,t,n,i)=>{const{uuid:r,name:o}=n;return i?`Entity with identity: ${r}/${o} has called ${i} or ${e} but ${t} has not been overridden.`:`Entity with identity: ${r}/${o} has called ${e} but ${t} has not been overridden.`},e.BROKER_ERRORS={fireIntent:(0,e.generateOverrideError)(\"fireIntent\",\"handleFiredIntent\"),fireIntentForContext:(0,e.generateOverrideError)(\"fireIntentForContext\",\"handleFiredIntentForContext\"),getInfoForIntent:(0,e.generateOverrideError)(\"getInfoForIntent\",\"handleInfoForIntent\"),getInfoForIntentsByContext:(0,e.generateOverrideError)(\"getInfoForIntentsByContext\",\"handleInfoForIntentsByContext\"),joinSessionContextGroupWithJoinContextGroup:\"The Context Group you have tried to join is a Session Context Group. Custom Context Groups can only be defined by the Interop Broker through code or manifest configuration. Please use joinSessionContextGroup.\",fdc3Open:(0,e.generateOverrideError)(\"fdc3.open\",\"fdc3HandleOpen\"),fdc3FindInstances:(0,e.generateOverrideError)(\"fdc3.findInstances\",\"fdc3HandleFindInstances\"),fdc3GetAppMetadata:(0,e.generateOverrideError)(\"fdc3.getAppMetadata\",\"fdc3HandleGetAppMetadata\"),fdc3GetInfo:(0,e.generateOverrideError)(\"fdc3.getInfo\",\"fdc3HandleGetInfo\")};e.wrapIntentHandler=(e,t)=>async n=>{try{return e(n)}catch(e){throw console.error(`Error thrown by handler ${t}: ${e}`),e}}}(Hi);var Ni,Di,Ui={};function Vi(){if(Di)return Gi;Di=1;var e,t,n,r=s&&s.__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},o=s&&s.__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)},a=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Gi,\"__esModule\",{value:!0}),Gi.InteropBroker=void 0;const c=d,h=a(function(){if(Bi)return Wi;Bi=1,Object.defineProperty(Wi,\"__esModule\",{value:!0});const e=Cr();return Wi.default=class{constructor(e,t){this.provider=e,this.id=t,this.lastContext=void 0,this.contextGroupMap=new Map,this.clients=new Map,this.registerListeners()}registerListeners(){this.provider.register(`sessionContextGroup:getContext-${this.id}`,this.getCurrentContext.bind(this)),this.provider.register(`sessionContextGroup:setContext-${this.id}`,this.setContext.bind(this)),this.provider.register(`sessionContextGroup:handlerAdded-${this.id}`,this.handlerAdded.bind(this)),this.provider.register(`sessionContextGroup:handlerRemoved-${this.id}`,this.handlerRemoved.bind(this))}getCurrentContext(e){return e.type?this.contextGroupMap.get(e.type):this.lastContext}setContext(t,n){const{context:i}=t,r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name} not in Session Client State Map`);this.contextGroupMap.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{e.contextHandlers.get(i.type)?.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getClientState(e){return this.clients.get(e.endpointId)}async handlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(i){const e=r.contextHandlers.get(i)||[];r.contextHandlers.set(i,[...e,n]);const o=this.contextGroupMap.get(i);o&&await this.provider.dispatch(t,n,o)}else{r.globalHandler=n;const e=[...this.contextGroupMap.keys()].map((async e=>{const i=this.contextGroupMap.get(e);i&&await this.provider.dispatch(t,n,i)}));await Promise.all(e)}}handlerRemoved(e,t){const{handlerId:n}=e,i=this.clients.get(t.endpointId);i?(Array.from(i.contextHandlers).forEach((([,e])=>{const t=e.indexOf(n);t>-1&&e.splice(t,1)})),i.globalHandler===n&&(i.globalHandler=void 0)):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={contextHandlers:new Map,clientIdentity:e,globalHandler:void 0};this.clients.set(e.endpointId,t)}}onDisconnection(e){this.clients.delete(e.endpointId)}},Wi}()),l=Hi,u=a(i),p=function(){if(Ni)return Ui;Ni=1,Object.defineProperty(Ui,\"__esModule\",{value:!0}),Ui.PrivateChannelProvider=void 0;const e=Vi();return Ui.PrivateChannelProvider=class t{constructor(e,t){this.provider=e,this.id=t,this.clients=new Map,this.registerListeners(),this.contextByContextType=new Map,this.lastContext=void 0,this.provider.onConnection((e=>this.registerNewClient(e))),this.provider.onDisconnection((async e=>{const{endpointId:t}=e;this.clients.has(t)&&await this.handleClientDisconnecting(e),0===(await this.provider.getAllClientInfo()).length&&this.provider.destroy()}))}getClientState(e){return this.clients.get(e.endpointId)}registerListeners(){this.provider.register(\"broadcast\",this.broadcast.bind(this)),this.provider.register(\"getCurrentContext\",this.getCurrentContext.bind(this)),this.provider.register(\"contextHandlerAdded\",this.contextHandlerAdded.bind(this)),this.provider.register(\"contextHandlerRemoved\",this.contextHandlerRemoved.bind(this)),this.provider.register(\"nonStandardHandlerRemoved\",this.nonStandardHandlerRemoved.bind(this)),this.provider.register(\"onAddContextHandlerAdded\",this.onAddContextHandlerAdded.bind(this)),this.provider.register(\"onDisconnectHandlerAdded\",this.onDisconnectHandlerAdded.bind(this)),this.provider.register(\"onUnsubscribeHandlerAdded\",this.onUnsubscribeHandlerAdded.bind(this)),this.provider.register(\"clientDisconnecting\",((e,t)=>{this.handleClientDisconnecting(t)}))}broadcast(t,n){const{context:i}=t;if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name}, tried to call broadcast, is not connected to this Private Channel`);const r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to broadcast - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);this.contextByContextType.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{const t=e.handlerIdsByContextTypes.get(i.type);t&&t.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getCurrentContext(e,t){const{contextType:n}=e;if(!this.getClientState(t))throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call getCurrentContext, is not connected to this Private Channel`);if(void 0!==n){return this.contextByContextType.get(n)||null}return this.lastContext?this.lastContext:null}contextHandlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call addContextListener, is not connected to this Private Channel`);if(i){const e=r.handlerIdsByContextTypes.get(i)||[];r.handlerIdsByContextTypes.set(i,[...e,n])}else r.globalHandler=n;Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&e.onAddContextListenerHandlerId&&this.provider.dispatch(e.clientIdentity,e.onAddContextListenerHandlerId,i)}))}async contextHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);if(i){let e;if(i.globalHandler===n)i.globalHandler=void 0;else for(const[t,r]of i.handlerIdsByContextTypes){const i=r.indexOf(n);i>-1&&(r.splice(i,1),e=t)}const r=(await this.getConnectedClients()).map((async n=>{const{clientIdentity:i,clientIdentity:{endpointId:r},onUnsubscribeHandlerId:o}=n;r!==t.endpointId&&o&&await this.provider.dispatch(i,o,e)}));try{await Promise.all(r)}catch(e){throw console.error(`Problem when attempting to dispatch to onUnsubscribeHandlers. Error: ${e} Removing Client: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}`),new Error(e)}}else console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}.`)}nonStandardHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);i?i.onDisconnectHandlerId===n?i.onDisconnectHandlerId=void 0:i.onAddContextListenerHandlerId===n?i.onAddContextListenerHandlerId=void 0:i.onUnsubscribeHandlerId===n&&(i.onUnsubscribeHandlerId=void 0):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}onAddContextHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onAddContextListener, is not connected to this Private Channel`);n.onAddContextListenerHandlerId=i,Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&Array.from(e.handlerIdsByContextTypes.keys()).forEach((e=>{this.provider.dispatch(t,i,e)}))}))}onDisconnectHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onDisconnect, is not connected to this Private Channel`);n.onDisconnectHandlerId=i}onUnsubscribeHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onUnsubscribe, is not connected to this Private Channel`);n.onUnsubscribeHandlerId=i}removeClient(e){const t=this.getClientState(e);if(!t)throw new Error(`Client with Identity: ${e.uuid} ${e.name}, tried to call disconnect, is not connected to this Private Channel`);t.handlerIdsByContextTypes.clear(),this.clients.delete(e.endpointId)}async fireOnDisconnectForOtherClients(e){const{endpointId:t}=e,n=(await this.getConnectedClients()).map((async e=>{const{clientIdentity:{endpointId:n},onDisconnectHandlerId:i}=e;n!==t&&i&&await this.provider.dispatch(e.clientIdentity,i)}));try{await Promise.all(n)}catch(t){throw console.error(`Problem when attempting to dispatch to onDisconnectHandlers. Error: ${t} Disconnecting Client: uuid: ${e.uuid}. name: ${e.name}. endpointId: ${e.endpointId}`),new Error(t)}}async unsubscribeAll(e){const{endpointId:t}=e,n=this.clients.get(t);if(n){const t=Array.from(n.handlerIdsByContextTypes.values()).flat(),i=n.globalHandler;if(t.length>0){const n=t.map((async t=>this.contextHandlerRemoved({handlerId:t},e)));try{await Promise.all(n)}catch(e){console.error(e.message)}}if(i)try{await this.contextHandlerRemoved({handlerId:i},e)}catch(e){console.error(e.message)}}}async handleClientDisconnecting(e){await this.unsubscribeAll(e),this.removeClient(e),await this.fireOnDisconnectForOtherClients(e)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={clientIdentity:e,handlerIdsByContextTypes:new Map,globalHandler:void 0,onAddContextListenerHandlerId:void 0,onUnsubscribeHandlerId:void 0,onDisconnectHandlerId:void 0};this.clients.set(e.endpointId,t)}}async getConnectedClients(){const e=await this.provider.getAllClientInfo();return Array.from(this.clients.values()).filter((t=>{const{uuid:n,name:i}=t.clientIdentity;return e.some((e=>i===e.name&&n===e.uuid))}))}static init(e,n){return new t(e,n)}},Ui}(),w=G,y=[{id:\"green\",displayMetadata:{color:\"#00CC88\",name:\"green\"}},{id:\"purple\",displayMetadata:{color:\"#8C61FF\",name:\"purple\"}},{id:\"orange\",displayMetadata:{color:\"#FF8C4C\",name:\"orange\"}},{id:\"red\",displayMetadata:{color:\"#FF5E60\",name:\"red\"}},{id:\"pink\",displayMetadata:{color:\"#FF8FB8\",name:\"pink\"}},{id:\"yellow\",displayMetadata:{color:\"#E9FF8F\",name:\"yellow\"}}];let f=class i extends c.Base{constructor(i,s,a){super(i),e.set(this,void 0),t.set(this,void 0),n.set(this,void 0),this.getProvider=()=>o(this,n,\"f\").getValue(),this.interopClients=new Map,this.contextGroupsById=new Map,r(this,t,a.contextGroups??[...y],\"f\"),r(this,e,a.fdc3Info,\"f\"),a?.logging&&(this.logging=a.logging),this.intentClientMap=new Map,this.lastContextMap=new Map,this.sessionContextGroupMap=new Map,r(this,n,new w.Lazy(s),\"f\"),this.setContextGroupMap(),this.setupChannelProvider()}static createClosedConstructor(...e){return class extends i{constructor(...t){if(t.length){const[n,i,r]=t;if(r&&\"object\"==typeof r&&!(0,u.default)(r,e[2]))return console.warn(\"You have modified the parameters of the InteropOverride constructor. This behavior is deprecated and will be removed in a future version. You can modify these options in your manifest. Please consult our Interop docs for guidance on migrating to the new override scheme.\"),void super(e[0],e[1],r);console.warn(\"You are attempting to pass arguments to the InteropOverride constructor. This is not necessary, and these passed arguments will be ignored. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.\")}super(...e)}}}setContext({context:e},t){this.wire.sendAction(\"interop-broker-set-context\").catch((e=>{}));const n=this.getClientState(t);if(!n||!n.contextGroupId)throw n?new Error(\"You must join a context group before you can set context.\"):new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);{const{contextGroupId:t}=n;this.setContextForGroup({context:e},t)}}setContextForGroup({context:e},t){this.wire.sendAction(\"interop-broker-set-context-for-group\").catch((e=>{}));const n=this.contextGroupsById.get(t);if(!n)throw new Error(`Unable to set context for context group that isn't in the context group mapping: ${t}.`);const r=i.checkContextIntegrity(e);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(e)}`);const o=e.type;n.set(o,e),this.lastContextMap.set(t,o);Array.from(this.interopClients.values()).filter((e=>e.contextGroupId===t)).forEach((t=>{for(const[,n]of t.contextHandlers)i.isContextTypeCompatible(o,n.contextType)&&this.invokeContextHandler(t.clientIdentity,n.handlerId,e)}))}getCurrentContext(e,t){this.wire.sendAction(\"interop-broker-get-current-context\").catch((e=>{}));const n=this.getClientState(t);if(!n?.contextGroupId)throw new Error(\"You must be a member of a context group to call getCurrentContext\");const{contextGroupId:i}=n,r=this.contextGroupsById.get(i),o=this.lastContextMap.get(i),s=e?.contextType??o;return r&&s?r.get(s):void 0}async joinContextGroup({contextGroupId:e,target:t},n){if(this.wire.sendAction(\"interop-broker-join-context-group\").catch((e=>{})),this.sessionContextGroupMap.has(e))throw new Error(l.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup);if(t){i.hasEndpointId(t)&&await this.addClientToContextGroup({contextGroupId:e},t);try{const n=this.channel.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name));if(!n.length)throw new Error(`Given Identity ${t.uuid} ${t.name} is not connected to the Interop Broker.`);n.length>1&&console.warn(`More than one connection found for identity ${t.uuid} ${t.name}`);const i=[];for(const t of n)i.push(this.addClientToContextGroup({contextGroupId:e},t));await Promise.all(i)}catch(e){throw new Error(e)}}else await this.addClientToContextGroup({contextGroupId:e},n)}async addClientToContextGroup({contextGroupId:e},t){this.wire.sendAction(\"interop-broker-add-client-to-context-group\").catch((e=>{}));const n=this.getClientState(t);if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(!this.getContextGroups().find((t=>t.id===e)))throw new Error(`Attempting to join a context group that does not exist: ${e}. You may only join existing context groups.`);if(n.contextGroupId!==e){n.contextGroupId=e,await this.setCurrentContextGroupInClientOptions(t,e);const i=this.contextGroupsById.get(e);for(const[,e]of n.contextHandlers){const{contextType:n,handlerId:r}=e;if(void 0===n)i.forEach(((e,n)=>{this.invokeContextHandler(t,r,e)}));else if(i.has(n)){const e=i.get(n);e&&this.invokeContextHandler(t,r,e)}}}}async removeFromContextGroup({target:e},t){if(this.wire.sendAction(\"interop-broker-remove-from-context-group\").catch((e=>{})),e){i.hasEndpointId(e)&&await this.removeClientFromContextGroup(e);try{const t=this.channel.connections.filter((t=>t.uuid===e.uuid&&t.name===e.name));if(!t.length)throw new Error(`No connection found for given Identity ${e.uuid} ${e.name}`);t.length>1&&console.warn(`More than one connection found for identity ${e.uuid} ${e.name}`);const n=[];for(const e of t)n.push(this.removeClientFromContextGroup(e));await Promise.all(n)}catch(e){throw new Error(e)}}else await this.removeClientFromContextGroup(t)}async removeClientFromContextGroup(e){this.wire.sendAction(\"interop-broker-remove-client-from-context-group\").catch((e=>{}));const t=this.getClientState(e);t&&(t.contextGroupId=void 0),await this.setCurrentContextGroupInClientOptions(e,null)}getContextGroups(){return this.wire.sendAction(\"interop-broker-get-context-groups\").catch((e=>{})),o(this,t,\"f\").map((e=>({...e})))}getInfoForContextGroup({contextGroupId:e}){return this.wire.sendAction(\"interop-broker-get-info-for-context-group\").catch((e=>{})),this.getContextGroups().find((t=>t.id===e))}getAllClientsInContextGroup({contextGroupId:e}){this.wire.sendAction(\"interop-broker-get-all-clients-in-context-group\").catch((e=>{}));return Array.from(this.interopClients.values()).filter((t=>t.contextGroupId===e)).map((e=>e.clientIdentity))}async handleFiredIntent(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.raiseIntent\",\"InteropBroker.handleFiredIntent\",t,\"interopClient.fireIntent\");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntent)}async setIntentTarget(e,t){this.wire.sendAction(\"interop-broker-set-intent-target\").catch((e=>{}));const n=this.intentClientMap.get(t.name),i=`intent-handler-${e.name}`;if(n){const t=n.get(i);if(t){if(t.pendingIntents.push(e),t.clientIdentity&&t.isReady){const{clientIdentity:e,pendingIntents:n}=t;try{const r=n[n.length-1];await this.invokeIntentHandler(e,i,r),t.pendingIntents=[]}catch(n){console.error(`Error invoking intent handler for client ${e.uuid}/${e.name}/${e.endpointId}`),t.isReady=!1}}}else n.set(i,{isReady:!1,pendingIntents:[e]})}else{this.intentClientMap.set(t.name,new Map);const n=this.intentClientMap.get(t.name);n&&n.set(i,{isReady:!1,pendingIntents:[e]})}}async handleInfoForIntent(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.findIntent\",\"InteropBroker.handleInfoForIntent\",t,\"interopClient.getInfoForIntent\");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntent)}async handleInfoForIntentsByContext(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.findIntentsByContext\",\"InteropBroker.handleInfoForIntentsByContext\",t,\"interopClient.getInfoForIntentsByContext\");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntentsByContext)}async handleFiredIntentForContext(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.raiseIntentForContext\",\"InteropBroker.handleFiredIntentForContext\",t,\"interopClient.fireIntentForContext\");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntentForContext)}async clientDisconnected(e){}async fdc3HandleOpen({app:e,context:t},n){const i=(0,l.generateOverrideWarning)(\"fdc3.open\",\"InteropBroker.fdc3HandleOpen\",n);throw console.warn(i),new Error(l.BROKER_ERRORS.fdc3Open)}async fdc3HandleFindInstances(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.open\",\"InteropBroker.fdc3HandleFindInstances\",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3FindInstances)}async fdc3HandleGetAppMetadata(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.getAppMetadata\",\"InteropBroker.fdc3HandleGetAppMetadata\",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3GetAppMetadata)}async invokeContextHandler(e,t,n){const i=await this.getProvider();try{await i.dispatch(e,t,n)}catch(i){console.error(`Error invoking context handler ${t} for context type ${n.type} in client ${e.uuid}/${e.name}/${e.endpointId}`,i)}}async invokeIntentHandler(e,t,n){const i=await this.getProvider();await i.dispatch(e,t,n)}async fdc3HandleGetInfo(t,n){const{fdc3Version:i}=t;return{fdc3Version:i,...o(this,e,\"f\"),optionalFeatures:{OriginatingAppMetadata:!1,UserChannelMembershipAPIs:!0},appMetadata:{appId:\"\",instanceId:\"\"}}}async getAllClientInfo(){return(await this.getProvider()).getAllClientInfo()}decorateSnapshot(e){return{...e,interopSnapshotDetails:{contextGroupStates:this.getContextGroupStates()}}}applySnapshot(e,t){const n=e?.interopSnapshotDetails?.contextGroupStates;n&&(t?.closeExistingWindows||this.updateExistingClients(n),this.rehydrateContextGroupStates(n))}updateExistingClients(e){this.interopClients.forEach((t=>{const{clientIdentity:n,contextGroupId:r,contextHandlers:o}=t;if(r){const t=e[r];for(const[,e]of Object.entries(t))o.forEach((t=>{const{handlerId:r,contextType:o}=t;i.isContextTypeCompatible(e.type,o)&&this.invokeContextHandler(n,r,e)}))}}))}getContextGroupStates(){return i.toObject(this.contextGroupsById)}rehydrateContextGroupStates(e){const t=Object.entries(e);for(const[e,n]of t){const t=Object.entries(n);for(const[n,i]of t)if(this.contextGroupsById.has(e)){this.contextGroupsById.get(e).set(n,i)}else console.warn(`Attempting to set a context group that isn't in the context group mapping. Skipping context group rehydration for: ${e}`)}}contextHandlerRegistered({contextType:e,handlerId:t},n){const i={contextType:e,handlerId:t},r=this.getClientState(n);if(r?.contextHandlers.set(t,i),r&&r.contextGroupId){const{contextGroupId:i}=r,o=this.contextGroupsById.get(i);if(void 0===e)o.forEach(((e,i)=>{this.invokeContextHandler(n,t,e)}));else if(o.has(e)){const i=o.get(e);i&&this.invokeContextHandler(n,t,i)}}}async intentHandlerRegistered(e,t){const{handlerId:n}=e,i=this.intentClientMap.get(t.name),r=i?.get(n);if(i)if(r){const{pendingIntents:e}=r;r.clientIdentity=t,r.isReady=!0;try{if(e.length>0){const i=e[e.length-1];await this.invokeIntentHandler(t,n,i),r.pendingIntents=[]}}catch(e){console.error(`Error invoking intent handler: ${n} for client ${t.uuid}/${t.name}/${t.endpointId}`)}}else i.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t});else{this.intentClientMap.set(t.name,new Map);const e=this.intentClientMap.get(t.name);e&&e.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t})}}removeContextHandler({handlerId:e},t){const n=this.getClientState(t);n&&n.contextHandlers.delete(e)}handleJoinSessionContextGroup({sessionContextGroupId:e},t){try{if(!e)throw new Error(\"Failed to join session context group: must specify group id.\");const n=this.sessionContextGroupMap.get(e);if(n)n.registerNewClient(t);else{const n=new h.default(this.channel,e);n.registerNewClient(t),this.sessionContextGroupMap.set(e,n)}return{hasConflict:this.contextGroupsById.has(e)}}catch(e){throw new Error(e)}}getClientState(e){return this.interopClients.get(e.endpointId)}static toObject(e){const t=Object.fromEntries(e),n={};return Object.entries(t).forEach((([e,t])=>{const i=Object.fromEntries(t);n[e]=i})),n}static checkContextIntegrity(e){if(!e)return{isValid:!1,reason:\"No context supplied\"};if(\"object\"!=typeof e)return{isValid:!1,reason:\"Context must be an Object\"};if(!e.type)return{isValid:!1,reason:\"Context must have a type property\"};if(e.id&&\"object\"!=typeof e.id)return{isValid:!1,reason:\"Context id must be an Object populated with key-value identifiers (if set)\"};if(e.id){const{id:t}=e,n=Object.keys(t);let i=!1;if(!n.length)return{isValid:!1,reason:\"Context id must have at least one key-value identifier\"};if(n.forEach((e=>{\"string\"==typeof e&&\"string\"==typeof t[e]||(i=!0)})),i)return{isValid:!1,reason:\"Context id key-value identifiers must be of type string\"}}return e.name&&\"string\"!=typeof e.name?{isValid:!1,reason:\"Context name must be of string type (if set)\"}:{isValid:!0}}static hasEndpointId(e){return void 0!==e.endpointId}static isContextTypeCompatible(e,t){return void 0===t||e===t}setContextGroupMap(){for(const e of this.getContextGroups())this.contextGroupsById.set(e.id,new Map)}async setCurrentContextGroupInClientOptions(e,t){try{const n=await this.fin.System.getEntityInfo(e.uuid,e.name);let i;\"view\"===n.entityType?i=await this.fin.View.wrap(e):\"window\"===n.entityType&&(i=await this.fin.Window.wrap(e)),i&&await i.updateOptions({interop:{currentContextGroup:t}})}catch(e){}}async setupChannelProvider(){try{const e=await this.getProvider();this.channel=e,this.wireChannel(e)}catch(e){throw new Error(`Error setting up Interop Broker Channel Provider: ${e}`)}}wireChannel(e){e.onConnection((async(e,t)=>{if(!await this.isConnectionAuthorized(e,t))throw new Error(`Connection not authorized for ${e.uuid}, ${e.name}`);if(!e.endpointId)throw new Error(\"Version too old to be compatible with Interop. Please upgrade your runtime to a more recent version.\");const n={contextGroupId:void 0,contextHandlers:new Map,clientIdentity:e};t?.currentContextGroup&&this.contextGroupsById.has(t.currentContextGroup)&&(n.contextGroupId=t?.currentContextGroup),this.interopClients.set(e.endpointId,n)})),e.onDisconnection((e=>{this.interopClients.delete(e.endpointId);const t=this.intentClientMap.get(e.name);t&&e.uuid===this.fin.me.uuid&&t.forEach((e=>{e.isReady=!1})),this.sessionContextGroupMap.forEach((t=>{t.onDisconnection(e)})),this.clientDisconnected(e)})),e.beforeAction((async(e,t,n)=>{if(!await this.isActionAuthorized(e,t,n))throw new Error(`Action (${e}) not authorized for ${n.uuid}, ${n.name}`);this.logging?.beforeAction?.enabled&&console.log(e,t,n)})),e.afterAction(((e,t,n)=>{this.logging?.afterAction?.enabled&&console.log(e,t,n)})),e.register(\"setContext\",this.setContext.bind(this)),e.register(\"fireIntent\",this.handleFiredIntent.bind(this)),e.register(\"getCurrentContext\",this.getCurrentContext.bind(this)),e.register(\"getInfoForIntent\",this.handleInfoForIntent.bind(this)),e.register(\"getInfoForIntentsByContext\",this.handleInfoForIntentsByContext.bind(this)),e.register(\"fireIntentForContext\",this.handleFiredIntentForContext.bind(this)),e.register(\"getContextGroups\",this.getContextGroups.bind(this)),e.register(\"joinContextGroup\",this.joinContextGroup.bind(this)),e.register(\"removeFromContextGroup\",this.removeFromContextGroup.bind(this)),e.register(\"getAllClientsInContextGroup\",this.getAllClientsInContextGroup.bind(this)),e.register(\"getInfoForContextGroup\",this.getInfoForContextGroup.bind(this)),e.register(\"contextHandlerRegistered\",this.contextHandlerRegistered.bind(this)),e.register(\"intentHandlerRegistered\",this.intentHandlerRegistered.bind(this)),e.register(\"removeContextHandler\",this.removeContextHandler.bind(this)),e.register(\"sessionContextGroup:createIfNeeded\",this.handleJoinSessionContextGroup.bind(this)),e.register(\"fdc3Open\",this.fdc3HandleOpen.bind(this)),e.register(\"fdc3v2FindIntentsByContext\",this.handleInfoForIntentsByContext.bind(this)),e.register(\"fdc3FindInstances\",this.fdc3HandleFindInstances.bind(this)),e.register(\"fdc3GetAppMetadata\",this.fdc3HandleGetAppMetadata.bind(this)),e.register(\"fdc3v2GetInfo\",(async(e,t)=>this.fdc3HandleGetInfo.bind(this)(e,t))),e.register(\"createPrivateChannelProvider\",(async e=>{const{channelId:t}=e,n=await this.fin.InterApplicationBus.Channel.create(t);p.PrivateChannelProvider.init(n,t)}))}isConnectionAuthorized(e,t){return this.wire.sendAction(\"interop-broker-is-connection-authorized\").catch((e=>{})),Promise.resolve(!0)}isActionAuthorized(e,t,n){return this.wire.sendAction(\"interop-broker-is-action-authorized\").catch((e=>{})),Promise.resolve(!0)}};return Gi.InteropBroker=f,e=new WeakMap,t=new WeakMap,n=new WeakMap,Gi}var zi,Ki={},qi={},Ji=s&&s.__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},Yi=s&&s.__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)};Object.defineProperty(qi,\"__esModule\",{value:!0});const Zi=d,Qi=Hi;class Xi extends Zi.Base{constructor(e,t,n){super(e),zi.set(this,void 0),this.id=n,Ji(this,zi,t,\"f\")}async setContext(e){this.wire.sendAction(\"interop-session-context-group-set-context\").catch((e=>{}));return(await Yi(this,zi,\"f\")).dispatch(`sessionContextGroup:setContext-${this.id}`,{sessionContextGroupId:this.id,context:e})}async getCurrentContext(e){this.wire.sendAction(\"interop-session-context-group-get-context\").catch((e=>{}));return(await Yi(this,zi,\"f\")).dispatch(`sessionContextGroup:getContext-${this.id}`,{sessionContextGroupId:this.id,type:e})}async addContextHandler(e,t){if(this.wire.sendAction(\"interop-session-context-group-add-handler\").catch((e=>{})),\"function\"!=typeof e)throw new Error(\"Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.\");const n=await Yi(this,zi,\"f\");let i;return i=t?`sessionContextHandler:invoke-${this.id}-${t}-${(0,Qi.generateId)()}`:`sessionContextHandler:invoke-${this.id}`,n.register(i,(0,Qi.wrapContextHandler)(e,i)),await n.dispatch(`sessionContextGroup:handlerAdded-${this.id}`,{handlerId:i,contextType:t}),{unsubscribe:await this.createUnsubscribeCb(i)}}async createUnsubscribeCb(e){const t=await Yi(this,zi,\"f\");return async()=>{t.remove(e),await t.dispatch(`sessionContextGroup:handlerRemoved-${this.id}`,{handlerId:e})}}getUserInstance(){return{id:this.id,setContext:(0,Qi.wrapInTryCatch)(this.setContext.bind(this),\"Failed to set context: \"),getCurrentContext:(0,Qi.wrapInTryCatch)(this.getCurrentContext.bind(this),\"Failed to get context: \"),addContextHandler:(0,Qi.wrapInTryCatch)(this.addContextHandler.bind(this),\"Failed to add context handler: \")}}}qi.default=Xi,zi=new WeakMap;var er={},tr={},nr={},ir={},rr=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),or=s&&s.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,\"default\",{enumerable:!0,value:t})}:function(e,t){e.default=t}),sr=s&&s.__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)&&rr(t,e,n);return or(t,e),t};Object.defineProperty(ir,\"__esModule\",{value:!0}),ir.PrivateChannelClient=void 0;const ar=sr(Hi);var cr,dr;function hr(){if(cr)return tr;cr=1;var e,t=s&&s.__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)},n=s&&s.__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},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(tr,\"__esModule\",{value:!0}),tr.FDC3ModuleBase=void 0;const o=nr,a=Hi,c=wr(),d=r(i);return tr.FDC3ModuleBase=class{get client(){return t(this,e,\"f\").call(this)}get fin(){return this.wire.getFin()}constructor(t,i){this.wire=i,e.set(this,void 0),n(this,e,t,\"f\")}async broadcast(e){return this.wire.sendAction(\"fdc3-broadcast\").catch((e=>{})),this.client.setContext(e)}async _open(e,t){this.wire.sendAction(\"fdc3-open\").catch((e=>{}));try{return await c.InteropClient.ferryFdc3Call(this.client,\"fdc3Open\",{app:e,context:t})}catch(e){const t=e.message===a.BROKER_ERRORS.fdc3Open?\"ResolverUnavailable\":e.message;throw new Error(t)}}async _getChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:\"system\",...(0,o.getUnsupportedChannelApis)()})))}async getOrCreateChannel(e){this.wire.sendAction(\"fdc3-get-or-create-channel\").catch((e=>{}));const t=(await this._getChannels()).find((t=>t.id===e));if(t)return{...t,type:\"system\",...(0,o.getUnsupportedChannelApis)()};try{const t=await this.client.joinSessionContextGroup(e);return(0,o.buildAppChannelObject)(t)}catch(e){throw console.error(e.message),new Error(o.ChannelError.CreationFailed)}}async getSystemChannels(){return this.wire.sendAction(\"fdc3-get-system-channels\").catch((e=>{})),this._getChannels()}async joinChannel(e){this.wire.sendAction(\"fdc3-join-channel\").catch((e=>{}));try{return await this.client.joinContextGroup(e)}catch(e){if(e.message===a.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup?console.error(\"The Channel you have tried to join is an App Channel. Custom Channels can only be defined by the Interop Broker through code or manifest configuration. Please use getOrCreateChannel.\"):console.error(e.message),e.message.startsWith(\"Attempting to join a context group that does not exist\"))throw new Error(o.ChannelError.NoChannelFound);throw new Error(o.ChannelError.AccessDenied)}}async getCurrentChannel(){this.wire.sendAction(\"fdc3-get-current-channel\").catch((e=>{}));const e=await this.getCurrentContextGroupInfo();return e?this.buildChannelObject(e):null}async leaveCurrentChannel(){return this.wire.sendAction(\"fdc3-leave-current-channel\").catch((e=>{})),this.client.removeFromContextGroup()}async getCurrentContextGroupInfo(){const e=await this.client.getContextGroups(),t=e.map((async e=>this.client.getAllClientsInContextGroup(e.id))),n=(await Promise.all(t)).findIndex((e=>e.some((e=>{const{uuid:t,name:n}=e;return this.wire.me.uuid===t&&this.wire.me.name===n}))));return e[n]}async buildChannelObject(e){return{...e,type:\"system\",addContextListener:(...[e,t])=>{let n,i;\"function\"==typeof e?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),n=e):(n=t,\"string\"==typeof e&&(i=e));const r=(async()=>{let e=!0;const t=await this.client.getCurrentContext(i);return this.client.addContextHandler(((i,r)=>{if(!e||(e=!1,!(0,d.default)(t,i)))return n(i,r)}),i)})();return{...r,unsubscribe:()=>r.then((e=>e.unsubscribe()))}},broadcast:this.broadcast.bind(this),getCurrentContext:async e=>{const t=await this.client.getCurrentContext(e);return void 0===t?null:t}}}},e=new WeakMap,tr}ir.PrivateChannelClient=class{constructor(e,t){this.id=t,this.client=e,this.listeners=new Map}async broadcast(e){return this.client.dispatch(\"broadcast\",{context:e})}async getCurrentContext(e){return this.client.dispatch(\"getCurrentContext\",{contextType:e})}async addContextListener(e,t){if(\"function\"!=typeof t)throw new Error(\"Non-function argument passed to the second parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.\");let n;n=e?`contextHandler:invoke-${this.id}-${e}-${ar.generateId()}`:`contextHandler:invoke-${this.id}-${ar.generateId()}`,this.client.register(n,ar.wrapContextHandler(t,n));const i={unsubscribe:await this.createContextUnsubscribeCb(n)};return this.listeners.set(n,i),await this.client.dispatch(\"contextHandlerAdded\",{handlerId:n,contextType:e}),i}createNonStandardUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch(\"nonStandardHandlerRemoved\",{handlerId:e})}}createContextUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch(\"contextHandlerRemoved\",{handlerId:e})}}onAddContextListener(e){const t=`onContextHandlerAdded:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch(\"onAddContextHandlerAdded\",{handlerId:t}),n}onDisconnect(e){const t=`onDisconnect:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch(\"onDisconnectHandlerAdded\",{handlerId:t}),n}onUnsubscribe(e){const t=`onUnsubscribe:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch(\"onUnsubscribeHandlerAdded\",{handlerId:t}),n}async cleanUpAllSubs(){Array.from(this.listeners.keys()).forEach((e=>{this.client.remove(e),this.listeners.delete(e)}))}async disconnect(){try{await this.client.dispatch(\"clientDisconnecting\"),await this.cleanUpAllSubs(),await this.client.disconnect()}catch(e){throw new Error(e.message)}}},function(e){var t=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,\"__esModule\",{value:!0}),e.getIntentResolution=e.isChannel=e.isContext=e.connectPrivateChannel=e.buildAppChannelObject=e.buildPrivateChannelObject=e.ChannelError=e.ResultError=e.UnsupportedChannelApiError=e.getUnsupportedChannelApis=void 0;const n=Hi,r=ir,o=t(i);e.getUnsupportedChannelApis=e=>({addContextListener:()=>{throw new a(\"Channel.addContextListener\",e)},broadcast:()=>{throw new a(\"Channel.broadcast\",e)},getCurrentContext:()=>{throw new a(\"Channel.getCurrentContext\",e)}});class a extends Error{constructor(e,t=\"System\"){super(e),this.message=`Calling ${e} on an instance of a ${t} Channel returned by fdc3.get${t}Channels is not supported. If you would like to use a ${t} Channel, please use fdc3.joinChannel, fdc3.addContextListener, and fdc3.broadcast instead.`}}var c,d;e.UnsupportedChannelApiError=a,function(e){e.NoResultReturned=\"NoResultReturned\",e.IntentHandlerRejected=\"IntentHandlerRejected\"}(c=e.ResultError||(e.ResultError={})),(d=e.ChannelError||(e.ChannelError={})).NoChannelFound=\"NoChannelFound\",d.AccessDenied=\"AccessDenied\",d.CreationFailed=\"CreationFailed\";e.buildPrivateChannelObject=e=>{let t=!1;const n=()=>{if(t)throw new Error(\"Private Channel Client has been disconnected from the Private Channel\")};return{id:e.id,type:\"private\",broadcast:async t=>(n(),e.broadcast(t)),getCurrentContext:async t=>(n(),e.getCurrentContext(t)),addContextListener:async(t,i)=>{n();let r=i,o=t;\"function\"==typeof t&&(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),r=t,o=null);return e.addContextListener(o,r)},onAddContextListener:t=>(n(),e.onAddContextListener(t)),disconnect:async()=>(n(),t=!0,e.disconnect()),onDisconnect:t=>(n(),e.onDisconnect(t)),onUnsubscribe:t=>(n(),e.onUnsubscribe(t))}};e.buildAppChannelObject=e=>({id:e.id,type:\"app\",broadcast:e.setContext,getCurrentContext:async t=>{const n=await e.getCurrentContext(t);return void 0===n?null:n},addContextListener:(t,n)=>{let i,r;\"function\"==typeof t?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),i=t):(i=n,\"string\"==typeof t&&(r=t));const s=(async()=>{let t=!0;const n=await e.getCurrentContext(r);return e.addContextHandler(((e,r)=>{if(!t||(t=!1,!(0,o.default)(n,e)))return i(e,r)}),r)})();return{...s,unsubscribe:()=>s.then((e=>e.unsubscribe()))}}});e.connectPrivateChannel=async t=>{try{const n=await fin.InterApplicationBus.Channel.connect(t),i=new r.PrivateChannelClient(n,t);return(0,e.buildPrivateChannelObject)(i)}catch(e){throw new Error(`Private Channel with id: ${t} doesn't exist`)}};e.isContext=e=>{if(e&&\"object\"==typeof e&&\"type\"in e){const{type:t}=e;return\"string\"==typeof t}return!1};e.isChannel=e=>{if(e&&\"object\"==typeof e&&\"type\"in e&&\"id\"in e){const{type:t,id:n}=e;return\"string\"==typeof t&&\"string\"==typeof n&&(\"app\"===t||\"private\"===t)}return!1};e.getIntentResolution=async(t,i,r,o)=>{const s=(0,n.generateId)(),a=new Promise(((e,t)=>{fin.InterApplicationBus.subscribe({uuid:\"*\"},s,(t=>{e(t)})).catch((()=>t(new Error(\"getResult is not supported in this environment\"))))})),d=r?{target:r,intentResolutionResultId:s}:{intentResolutionResultId:s},h=o?{name:o,context:i,metadata:d}:{...i,metadata:d},l=async()=>{let n=await a;if(!n||\"object\"!=typeof n)throw new Error(c.NoResultReturned);const{error:i}=n;if(i)throw new Error(c.IntentHandlerRejected);if((0,e.isChannel)(n)){const{id:i,type:r}=n;switch(r){case\"private\":n=await(0,e.connectPrivateChannel)(i);break;case\"app\":{const r=await t.joinSessionContextGroup(i);n=(0,e.buildAppChannelObject)(r);break}}}else if(!(0,e.isContext)(n))throw new Error(c.NoResultReturned);return n},u=o?await t.fireIntent(h):await t.fireIntentForContext(h);return\"object\"!=typeof u?{source:{appId:\"\",instanceId:\"\"},intent:\"\",version:\"2.0\",getResult:l}:{...u,getResult:l}}}(nr);var lr,ur,pr={};function wr(){if(ur)return Ki;ur=1;var e,t,n=s&&s.__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},i=s&&s.__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)},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ki,\"__esModule\",{value:!0}),Ki.InteropClient=void 0;const o=d,a=r(qi),c=function(){if(dr)return er;dr=1,Object.defineProperty(er,\"__esModule\",{value:!0}),er.Fdc3Module=void 0;const e=Hi,t=hr();class n extends t.FDC3ModuleBase{async open(e,t){await super._open(e,t)}addContextListener(e,t){let n;return this.wire.sendAction(\"fdc3-add-context-listener\").catch((e=>{})),\"function\"==typeof e?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),n=this.client.addContextHandler(e)):n=this.client.addContextHandler(t,null===e?void 0:e),{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}addIntentListener(e,t){this.wire.sendAction(\"fdc3-add-intent-listener\").catch((e=>{}));const n=this.client.registerIntentHandler((e=>{const{context:n,metadata:i}=e,{metadata:r}=n,o=i?.intentResolutionResultId||r?.intentResolutionResultId;o&&this.fin.InterApplicationBus.publish(o,null).catch((()=>null)),t(e.context)}),e,{fdc3Version:\"1.2\"});return{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}async raiseIntent(t,n,i){this.wire.sendAction(\"fdc3-raise-intent\").catch((e=>{}));const r=i?{name:t,context:n,metadata:{target:i}}:{name:t,context:n};try{return await this.client.fireIntent(r)}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntent?\"ResolverUnavailable\":t.message;throw new Error(n)}}async findIntent(t,n){this.wire.sendAction(\"fdc3-find-intent\").catch((e=>{}));try{return await this.client.getInfoForIntent({name:t,context:n})}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntent?\"ResolverUnavailable\":t.message;throw new Error(n)}}async findIntentsByContext(t){this.wire.sendAction(\"fdc3-find-intents-by-context\").catch((e=>{}));try{return await this.client.getInfoForIntentsByContext(t)}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntentsByContext?\"ResolverUnavailable\":t.message;throw new Error(n)}}async raiseIntentForContext(t,n){this.wire.sendAction(\"fdc3-raise-intent-for-context\").catch((e=>{}));try{return await this.client.fireIntentForContext({...t,metadata:{target:n}})}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntentForContext?\"ResolverUnavailable\":t.message;throw new Error(n)}}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}getInfo(){return this.wire.sendAction(\"fdc3-get-info\").catch((e=>{})),{providerVersion:this.wire.environment.getAdapterVersionSync(),provider:`openfin-${this.wire.me.uuid}`,fdc3Version:\"1.2\"}}}return er.Fdc3Module=n,er}(),h=function(){if(lr)return pr;lr=1,Object.defineProperty(pr,\"__esModule\",{value:!0}),pr.Fdc3Module2=void 0;const e=hr(),t=Hi,n=wr(),i=nr,r=ir;class o extends e.FDC3ModuleBase{async open(e,t){return\"string\"==typeof e&&console.warn(\"Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).\"),super._open(e,t)}async findInstances(e){this.wire.sendAction(\"fdc3-find-instances\").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,\"fdc3FindInstances\",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3FindInstances?\"ResolverUnavailable\":e.message;throw new Error(n)}}async getAppMetadata(e){this.wire.sendAction(\"fdc3-get-app-metadata\").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,\"fdc3GetAppMetadata\",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3GetAppMetadata?\"ResolverUnavailable\":e.message;throw new Error(n)}}async addContextListener(e,t){this.wire.sendAction(\"fdc3-add-context-listener\").catch((e=>{}));const n=e=>t=>{const{contextMetadata:n,...i}=t,r=n?[{...i},n]:[t,null];e(...r)};let i=t,r=n(i);return\"function\"==typeof e?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),i=e,r=n(i),this.client.addContextHandler(r)):this.client.addContextHandler(r,null===e?void 0:e)}async findIntent(e,n,i){this.wire.sendAction(\"fdc3-find-intent\").catch((e=>{}));try{return await this.client.getInfoForIntent({name:e,context:n,metadata:{resultType:i}})}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntent?\"ResolverUnavailable\":e.message;throw new Error(n)}}async findIntentsByContext(e,i){this.wire.sendAction(\"fdc3-find-intents-by-context\").catch((e=>{}));const r=i?{context:e,metadata:{resultType:i}}:e;try{return await n.InteropClient.ferryFdc3Call(this.client,\"fdc3v2FindIntentsByContext\",r)}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntentsByContext?\"ResolverUnavailable\":e.message;throw new Error(n)}}async raiseIntent(e,n,r){this.wire.sendAction(\"fdc3-raise-intent\").catch((e=>{}));try{return\"string\"==typeof r&&console.warn(\"Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).\"),(0,i.getIntentResolution)(this.client,n,r,e)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?\"ResolverUnavailable\":e.message;throw new Error(n)}}async raiseIntentForContext(e,n){this.wire.sendAction(\"fdc3-raise-intent-for-context\").catch((e=>{}));try{return\"string\"==typeof n&&console.warn(\"Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).\"),(0,i.getIntentResolution)(this.client,e,n)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?\"ResolverUnavailable\":e.message;throw new Error(n)}}async addIntentListener(e,t){if(this.wire.sendAction(\"fdc3-add-intent-listener\").catch((e=>{})),\"string\"!=typeof e)throw new Error(\"First argument must be an Intent name\");return this.client.registerIntentHandler((async e=>{let n,i;const{context:r,metadata:o}=e,{contextMetadata:s,metadata:a,...c}=r,d=o?.intentResolutionResultId||a?.intentResolutionResultId;try{const e=a?{metadata:a,...c}:{...c};n=await t(e,s),i=n}catch(e){n=e,i={error:!0}}if(d&&this.fin.InterApplicationBus.publish(d,i).catch((()=>null)),n instanceof Error)throw new Error(n.message);return n}),e,{fdc3Version:\"2.0\"})}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}async createPrivateChannel(){const e=(0,t.generateId)();await n.InteropClient.ferryFdc3Call(this.client,\"createPrivateChannelProvider\",{channelId:e});const o=await this.fin.InterApplicationBus.Channel.connect(e),s=new r.PrivateChannelClient(o,e);return(0,i.buildPrivateChannelObject)(s)}async getUserChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:\"user\",...(0,i.getUnsupportedChannelApis)(\"User\")})))}async getSystemChannels(){return console.warn(\"This API has been deprecated. Please use fdc3.getUserChannels instead.\"),super.getSystemChannels()}async joinUserChannel(e){return super.joinChannel(e)}async joinChannel(e){return console.warn(\"This API has been deprecated. Please use fdc3.joinUserChannel instead.\"),super.joinChannel(e)}async getCurrentChannel(){const e=await super.getCurrentChannel();return e?{...e,type:\"user\",broadcast:this.broadcast.bind(this)}:null}async getInfo(){return n.InteropClient.ferryFdc3Call(this.client,\"fdc3v2GetInfo\",{fdc3Version:\"2.0\"})}}return pr.Fdc3Module2=o,pr}(),l=Hi;let u=class extends o.Base{constructor(i,r){super(i),e.set(this,void 0),t.set(this,void 0),n(this,t,new Map,\"f\"),n(this,e,r,\"f\")}async setContext(t){this.wire.sendAction(\"interop-client-set-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"setContext\",{context:t})}async addContextHandler(t,n){if(this.wire.sendAction(\"interop-client-add-context-handler\").catch((e=>{})),\"function\"!=typeof t)throw new Error(\"Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.\");const r=await i(this,e,\"f\");let o;o=n?`invokeContextHandler-${n}-${(0,l.generateId)()}`:\"invokeContextHandler\";const s=(0,l.wrapContextHandler)(t,o);return r.register(o,s),await r.dispatch(\"contextHandlerRegistered\",{handlerId:o,contextType:n}),{unsubscribe:async()=>{r.remove(o),await r.dispatch(\"removeContextHandler\",{handlerId:o})}}}async getContextGroups(){this.wire.sendAction(\"interop-client-get-context-groups\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getContextGroups\")}async joinContextGroup(t,n){this.wire.sendAction(\"interop-client-join-context-group\").catch((e=>{}));const r=await i(this,e,\"f\");if(!t)throw new Error(\"No contextGroupId specified for joinContextGroup.\");return r.dispatch(\"joinContextGroup\",{contextGroupId:t,target:n})}async removeFromContextGroup(t){this.wire.sendAction(\"interop-client-remove-from-context-group\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"removeFromContextGroup\",{target:t})}async getAllClientsInContextGroup(t){this.wire.sendAction(\"interop-client-get-all-clients-in-context-group\").catch((e=>{}));const n=await i(this,e,\"f\");if(!t)throw new Error(\"No contextGroupId specified for getAllClientsInContextGroup.\");return n.dispatch(\"getAllClientsInContextGroup\",{contextGroupId:t})}async getInfoForContextGroup(t){this.wire.sendAction(\"interop-client-get-info-for-context-group\").catch((e=>{}));const n=await i(this,e,\"f\");if(!t)throw new Error(\"No contextGroupId specified for getInfoForContextGroup.\");return n.dispatch(\"getInfoForContextGroup\",{contextGroupId:t})}async fireIntent(t){this.wire.sendAction(\"interop-client-fire-intent\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"fireIntent\",t)}async registerIntentHandler(t,n,r){this.wire.sendAction(\"interop-client-register-intent-handler\").catch((e=>{}));const o=await i(this,e,\"f\"),s=`intent-handler-${n}`,a=(0,l.wrapIntentHandler)(t,s);try{await o.register(s,a),await o.dispatch(\"intentHandlerRegistered\",{handlerId:s,...r})}catch(e){throw new Error(\"Unable to register intent handler\")}return{unsubscribe:async()=>{o.remove(s)}}}async getCurrentContext(t){this.wire.sendAction(\"interop-client-get-current-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getCurrentContext\",{contextType:t})}async getInfoForIntent(t){this.wire.sendAction(\"interop-client-get-info-for-intent\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getInfoForIntent\",t)}async getInfoForIntentsByContext(t){this.wire.sendAction(\"interop-client-get-info-for-intents-by-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getInfoForIntentsByContext\",t)}async fireIntentForContext(t){this.wire.sendAction(\"interop-client-fire-intent-for-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"fireIntentForContext\",t)}async joinSessionContextGroup(n){try{const r=i(this,t,\"f\").get(n);if(r)return r.getUserInstance();const o=await i(this,e,\"f\"),{hasConflict:s}=await o.dispatch(\"sessionContextGroup:createIfNeeded\",{sessionContextGroupId:n});s&&console.warn(`A (non-session) context group with the name \"${n}\" already exists. If you are trying to join a Context Group, call joinContextGroup instead.`);const c=new a.default(this.wire,i(this,e,\"f\"),n);return i(this,t,\"f\").set(n,c),c.getUserInstance()}catch(e){throw console.error(`Error thrown trying to create Session Context Group with id \"${n}\": ${e}`),e}}async onDisconnection(t){this.wire.sendAction(\"interop-client-add-ondisconnection-listener\").catch((e=>{}));return(await i(this,e,\"f\")).onDisconnection((e=>{const{uuid:n}=e;t({type:\"interop-broker\",topic:\"disconnected\",brokerName:n})}))}getFDC3Sync(e){switch(e){case\"1.2\":return new c.Fdc3Module((()=>this),this.wire);case\"2.0\":return new h.Fdc3Module2((()=>this),this.wire);default:throw new Error(`Invalid FDC3 version provided: ${e}. Must be '1.2' or '2.0'`)}}async getFDC3(e){return this.getFDC3Sync(e)}static async ferryFdc3Call(t,n,r){return(await i(t,e,\"f\")).dispatch(n,r||null)}};return Ki.InteropClient=u,e=new WeakMap,t=new WeakMap,Ki}var yr,fr,gr,mr={};function vr(){if(yr)return mr;yr=1,Object.defineProperty(mr,\"__esModule\",{value:!0}),mr.overrideCheck=mr.checkFDC32Overrides=mr.getDefaultViewFdc3VersionFromAppInfo=void 0;const e=Vi();function t(t){return[\"fdc3HandleFindInstances\",\"handleInfoForIntent\",\"handleInfoForIntentsByContext\",\"fdc3HandleGetAppMetadata\",\"fdc3HandleGetInfo\",\"fdc3HandleOpen\",\"handleFiredIntent\",\"handleFiredIntentForContext\"].filter((n=>t[n]===e.InteropBroker.prototype[n]))}return mr.getDefaultViewFdc3VersionFromAppInfo=function({manifest:e,initialOptions:t}){const n=e?.platform?.defaultViewOptions?.fdc3InteropApi??t.defaultViewOptions?.fdc3InteropApi;return[\"1.2\",\"2.0\"].includes(n??\"\")?n:void 0},mr.checkFDC32Overrides=t,mr.overrideCheck=function(e,n){if(n&&\"2.0\"===n){const n=t(e);n.length>0&&console.warn(`WARNING: FDC3 2.0 has been set as a default option for Views in this Platform, but the required InteropBroker APIs for FDC3 2.0 compliance have not all been overridden.\\nThe following APIs need to be overridden:\\n${n.join(\"\\n\")}`)}},mr}function Cr(){return gr||(gr=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),i=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),i(function(){if(fr)return Ti;fr=1;var e=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ti,\"__esModule\",{value:!0}),Ti.InteropModule=void 0;const t=e(n),i=$i,r=d,o=Vi(),a=wr(),c=vr(),h=Tn,l=e=>new e,u=\"You have attempted to use or modify InteropBroker parameters, which is not allowed. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.\";class p extends r.Base{async init(e,n=l){this.wire.sendAction(\"interop-init\").catch((()=>{}));const r=await this.wire.environment.getInteropInfo(this.wire.getFin()),s=(0,i.createUnusableObject)(u),a=(0,i.createWarningObject)(u,(0,t.default)(r)),d=async()=>{throw new Error(u)},p=o.InteropBroker.createClosedConstructor(this.wire,(()=>this.fin.InterApplicationBus.Channel.create(`interop-broker-${e}`)),r);let w;return w=Array.isArray(n)?new((0,h.overrideFromComposables)(...n)(p))(s,d,a):await n(p,s,d,a),(0,c.overrideCheck)(w,r.fdc3Version),w}connectSync(e,t){return this.wire.sendAction(\"interop-connect-sync\").catch((()=>{})),new a.InteropClient(this.wire,this.wire.environment.whenReady().then((()=>this.fin.InterApplicationBus.Channel.connect(`interop-broker-${e}`,{payload:t}))))}}return Ti.InteropModule=p,Ti}(),e),i(wr(),e),i(Vi(),e)}(Li)),Li}var br={},Ir={},Er={},xr={};Object.defineProperty(xr,\"__esModule\",{value:!0}),xr.getSnapshotSourceChannelName=void 0;xr.getSnapshotSourceChannelName=e=>`snapshot-source-provider-${e.uuid}`;var Ar,Pr,Mr,_r,Or,Sr=s&&s.__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},Rr=s&&s.__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)};Object.defineProperty(Er,\"__esModule\",{value:!0}),Er.SnapshotSource=void 0;const Fr=d,jr=xr,kr=new Map;class Lr extends Fr.Base{constructor(e,t){super(e),Ar.set(this,void 0),Pr.set(this,(()=>(kr.has(this.identity.uuid)||kr.set(this.identity.uuid,{eventFired:null,clientPromise:null}),kr.get(this.identity.uuid)))),Mr.set(this,(()=>(Rr(this,Pr,\"f\").call(this).clientPromise||(Rr(this,Pr,\"f\").call(this).clientPromise=Rr(this,_r,\"f\").call(this)),Rr(this,Pr,\"f\").call(this).clientPromise))),_r.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);try{Rr(this,Pr,\"f\").call(this).eventFired||await Rr(this,Or,\"f\").call(this);const t=await this.fin.InterApplicationBus.Channel.connect(e,{wait:!1});return t.onDisconnection((()=>{Rr(this,Pr,\"f\").call(this).clientPromise=null,Rr(this,Pr,\"f\").call(this).eventFired=null})),t}catch(e){throw Rr(this,Pr,\"f\").call(this).clientPromise=null,new Error(\"The targeted SnapshotSource is not currently initialized. Await this object's ready() method.\")}})),Or.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);let t,n;const i=new Promise(((e,i)=>{t=e,n=i}));Rr(this,Pr,\"f\").call(this).eventFired=i;const r=async i=>{try{i.channelName===e&&(t(),await this.fin.InterApplicationBus.Channel.removeListener(\"connected\",r))}catch(e){n(e)}};await this.fin.InterApplicationBus.Channel.on(\"connected\",r)})),Sr(this,Ar,t,\"f\")}get identity(){return Rr(this,Ar,\"f\")}async ready(){this.wire.sendAction(\"snapshot-source-ready\").catch((e=>{}));try{await Rr(this,Mr,\"f\").call(this)}catch(e){await Rr(this,Pr,\"f\").call(this).eventFired}}async getSnapshot(){this.wire.sendAction(\"snapshot-source-get-snapshot\").catch((e=>{}));const e=await Rr(this,Mr,\"f\").call(this),t=await e.dispatch(\"get-snapshot\");return(await t).snapshot}async applySnapshot(e){this.wire.sendAction(\"snapshot-source-apply-snapshot\").catch((e=>{}));return(await Rr(this,Mr,\"f\").call(this)).dispatch(\"apply-snapshot\",{snapshot:e})}}Er.SnapshotSource=Lr,Ar=new WeakMap,Pr=new WeakMap,Mr=new WeakMap,_r=new WeakMap,Or=new WeakMap,Object.defineProperty(Ir,\"__esModule\",{value:!0}),Ir.SnapshotSourceModule=void 0;const Tr=d,$r=Er,Br=xr;class Gr extends Tr.Base{async init(e){if(this.wire.sendAction(\"snapshot-source-init\").catch((e=>{})),\"object\"!=typeof e||\"function\"!=typeof e.getSnapshot||\"function\"!=typeof e.applySnapshot)throw new Error(\"you must pass in a valid SnapshotProvider\");const t=await this.fin.InterApplicationBus.Channel.create((0,Br.getSnapshotSourceChannelName)(this.fin.me));t.register(\"get-snapshot\",(async()=>({snapshot:await e.getSnapshot()}))),t.register(\"apply-snapshot\",(({snapshot:t})=>e.applySnapshot(t)))}wrapSync(e){return this.wire.sendAction(\"snapshot-source-wrap-sync\").catch((e=>{})),new $r.SnapshotSource(this.wire,e)}async wrap(e){return this.wire.sendAction(\"snapshot-source-wrap\").catch((e=>{})),this.wrapSync(e)}}Ir.SnapshotSourceModule=Gr,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Ir,e),n(Er,e)}(br),Object.defineProperty(a,\"__esModule\",{value:!0});var Wr=a.Fin=void 0;const Hr=t,Nr=c,Dr=ie(),Ur=Z(),Vr=de,zr=en,Kr=rn,qr=un,Jr=bn,Yr=J(),Zr=An,Qr=ki,Xr=Cr(),eo=br;class to extends Hr.EventEmitter{constructor(e){super(),this.wire=e,this.System=new Nr.System(e),this.Window=new Dr._WindowModule(e),this.Application=new Ur.ApplicationModule(e),this.InterApplicationBus=new Vr.InterApplicationBus(e),this.Clipboard=new zr.Clipboard(e),this.ExternalApplication=new Kr.ExternalApplicationModule(e),this.Frame=new qr._FrameModule(e),this.GlobalHotkey=new Jr.GlobalHotkey(e),this.Platform=new Zr.PlatformModule(e,this.InterApplicationBus.Channel),this.View=new Yr.ViewModule(e),this.Interop=new Xr.InteropModule(e),this.SnapshotSource=new eo.SnapshotSourceModule(e),e.registerFin(this),this.me=(0,Qr.getMe)(e),e.on(\"disconnected\",(()=>{this.emit(\"disconnected\")}))}}Wr=a.Fin=to;var no={},io={};function ro(e){return\"string\"==typeof e.manifestUrl}function oo(e){return ao(e)&&\"string\"==typeof e.address}function so(e){return oo(e)&&\"string\"==typeof e.token}function ao(e){return\"string\"==typeof e.uuid}function co(e){return e.runtime&&\"string\"==typeof e.runtime.version}function ho(e){return ao(e)&&co(e)}Object.defineProperty(io,\"__esModule\",{value:!0}),io.isInternalConnectConfig=io.isPortDiscoveryConfig=io.isNewConnectConfig=io.isConfigWithReceiver=io.isRemoteConfig=io.isExistingConnectConfig=io.isExternalConfig=void 0,io.isExternalConfig=ro,io.isExistingConnectConfig=oo,io.isRemoteConfig=so,io.isConfigWithReceiver=function(e){return\"object\"==typeof e.receiver&&so({...e,address:\"\"})},io.isNewConnectConfig=ho,io.isPortDiscoveryConfig=function(e){return ro(e)&&co(e)||ho(e)},io.isInternalConnectConfig=function(e){return oo(e)||ho(e)};var lo={},uo={};Object.defineProperty(uo,\"__esModule\",{value:!0}),uo.EmitterMap=void 0;const po=t;function wo(e){return Buffer.from(e).toString(\"base64\")}uo.EmitterMap=class{constructor(){this.storage=new Map}hashKeys(e){return e.map(wo).join(\"/\")}getOrCreate(e){const t=this.hashKeys(e);return this.storage.has(t)||this.storage.set(t,new po.EventEmitter),this.storage.get(t)}has(e){return this.storage.has(this.hashKeys(e))}delete(e){const t=this.hashKeys(e);return this.storage.delete(t)}},Object.defineProperty(lo,\"__esModule\",{value:!0});const yo=uo;class fo extends yo.EmitterMap{constructor(){super(...arguments),this.dispatchEvent=e=>{if(function(e){return\"process-desktop-event\"===e.action}(e)){const{payload:t}=e,n=function(e){const{topic:t}=e;if(\"frame\"===t||\"window\"===t||\"view\"===t){const{uuid:n,name:i}=e;return[t,n,i]}if(\"application\"===t){const{uuid:n}=e;return[t,n]}return[t]}(t);if(this.has(n))return this.getOrCreate(n).emit(t.type,t),!0}return!1}}}lo.default=fo;var go,mo,vo=s&&s.__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},Co=s&&s.__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)},bo=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(no,\"__esModule\",{value:!0});var Io=no.Transport=void 0;const Eo=t,xo=io,Ao=g,Po=bo(lo),Mo=ki,_o=ke;class Oo extends Eo.EventEmitter{constructor(e,t,n){super(),this.wireListeners=new Map,this.topicRefMap=new Map,this.eventAggregator=new Po.default,this.messageHandlers=[this.eventAggregator.dispatchEvent],go.set(this,void 0),mo.set(this,void 0),this.connectSync=()=>{Co(this,go,\"f\").connectSync()},this.getPort=()=>Co(this,go,\"f\").getPort(),vo(this,go,new e(this.onmessage.bind(this)),\"f\"),this.environment=t,this.sendRaw=Co(this,go,\"f\").send.bind(Co(this,go,\"f\")),this.registerMessageHandler(this.handleMessage.bind(this)),Co(this,go,\"f\").on(\"disconnected\",(()=>{for(const[,{handleNack:e}]of this.wireListeners)e({reason:\"Remote connection has closed\"});this.wireListeners.clear(),this.emit(\"disconnected\")}));const{uuid:i,name:r}=n,o=this.environment.getCurrentEntityType();this.me=(0,Mo.getBaseMe)(o,i,r)}getFin(){if(!Co(this,mo,\"f\"))throw new Error(\"No Fin object registered for this transport\");return Co(this,mo,\"f\")}registerFin(e){if(Co(this,mo,\"f\"))throw new Error(\"Fin object has already been registered for this transport\");vo(this,mo,e,\"f\")}shutdown(){return Co(this,go,\"f\").shutdown()}async connect(e){if((0,xo.isConfigWithReceiver)(e))return await Co(this,go,\"f\").connect(e.receiver),this.authorize(e);if((0,xo.isRemoteConfig)(e))return this.connectRemote(e);if((0,xo.isExistingConnectConfig)(e))return this.connectByPort(e);if((0,xo.isNewConnectConfig)(e)){const t=await this.environment.retrievePort(e);return this.connectByPort({...e,address:`ws://localhost:${t}`})}}async connectRemote(e){return await Co(this,go,\"f\").connect(new(this.environment.getWsConstructor())(e.address)),this.authorize(e)}async connectByPort(e){const{address:t,uuid:n}=e,i={...e,type:\"file-token\"},r=Co(this,go,\"f\");await r.connect(new(this.environment.getWsConstructor())(e.address));const o=await this.sendAction(\"request-external-authorization\",{uuid:n,type:\"file-token\"},!0);if(\"external-authorization-response\"!==o.action)throw new Ao.UnexpectedActionError(o.action);return await this.environment.writeToken(o.payload.file,o.payload.token),this.authorize(i)}async authorize(e){const t=await this.sendAction(\"request-authorization\",e,!0);if(\"authorization-response\"!==t.action)throw new Ao.UnexpectedActionError(t.action);if(!0!==t.payload.success)throw new Ao.RuntimeError(t.payload)}sendAction(e,t={},n=!1){let i=()=>{};const r=Ao.RuntimeError.getCallSite(1),o=this.environment.getNextMessageId(),s=new Promise(((s,a)=>{i=a;const c={action:e,payload:t,messageId:o},d=Co(this,go,\"f\");return this.addWireListener(o,s,(e=>this.nackHandler(e,a,r)),n),d.send(c).catch(a)}));return Object.assign(s,{cancel:i,messageId:o})}nackHandler(e,t,n){t(\"string\"==typeof e?e:new Ao.RuntimeError(e,n))}ferryAction(e){return new Promise(((t,n)=>{const i=this.environment.getNextMessageId();e.messageId=i;const r=e=>{t(e.payload)};return Co(this,go,\"f\").send(e).then((()=>this.addWireListener(i,r,(e=>this.nackHandler(e,n)),!1))).catch(n)}))}registerMessageHandler(e){this.messageHandlers.push(e)}addWireListener(e,t,n,i){i?this.uncorrelatedListener=t:this.wireListeners.has(e)?n({reason:\"Duplicate handler id\",error:(0,_o.errorToPOJO)(new Ao.DuplicateCorrelationError(String(e)))}):this.wireListeners.set(e,{resolve:t,handleNack:n})}onmessage(e){for(const t of this.messageHandlers)t.call(null,e)}handleMessage(e){const t=e.correlationId||NaN;if(\"correlationId\"in e){if(!this.wireListeners.has(t))return!1;{const{resolve:n,handleNack:i}=this.wireListeners.get(t);\"ack\"!==e.action?i({reason:\"Did not receive ack action\",error:(0,_o.errorToPOJO)(new Ao.NoAckError(e.action))}):\"payload\"in e?e.payload.success?n.call(null,e):i(e.payload):\"string\"==typeof e.reason?i(e):(console.warn(\"Received invalid response from core\",e),i({reason:\"invalid response shape\"})),this.wireListeners.delete(t)}}else this.uncorrelatedListener&&this.uncorrelatedListener.call(null,e),this.uncorrelatedListener=()=>{};return!0}}Io=no.Transport=Oo,go=new WeakMap,mo=new WeakMap;const So=(...e)=>({log:(...t)=>console.debug(`[${(new Date).toISOString()}]`,...(e=>e.map((e=>`[${e}]`)))(e),...t),getLogger:(...t)=>So(...e,...t)}),Ro=So(\"@openfin/core-web/client\");function Fo(e,t){if(!function(e){return\"string\"==typeof e}(e))throw new Error(`Property ${t} has invalid type. Expected string, got ${typeof e}.`)}const jo=\"web-broker-ports-ready\",ko=Ro.getLogger(\"get-web-interop-ports\");function Lo(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)}function To(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}\"function\"==typeof SuppressedError&&SuppressedError;const $o=e=>{var n,i,r;return r=class extends t.EventEmitter{constructor(t){super(),n.set(this,void 0),i.set(this,!1),this.connectSync=()=>{Lo(this,i,\"f\")||(e.addEventListener(\"message\",(e=>{e.data?.topic?.startsWith(\"wire-message\")&&e.data.message&&Lo(this,n,\"f\").call(this,{...JSON.parse(e.data.message),ports:e.ports})})),e.start())},this.connect=async()=>{this.connectSync()},this.send=t=>(e.postMessage({topic:\"wire-message\",message:JSON.stringify(t)}),Promise.resolve()),this.shutdown=async()=>{e.close()},To(this,n,t,\"f\")}getPort(){return e}},n=new WeakMap,i=new WeakMap,r};var Bo={},Go={};Object.defineProperty(Go,\"__esModule\",{value:!0}),Go.BaseEnvironment=void 0;const Wo=vr();Go.BaseEnvironment=class{async getViewWindowIdentity(e,t){const{identity:n}=await e.View.wrapSync(t).getCurrentWindow();return n}async getInteropInfo(e){const t=await e.Application.getCurrentSync().getInfo().catch((()=>null)),n=t?.initialOptions?.interopBrokerConfiguration??{};return{fdc3Version:t?(0,Wo.getDefaultViewFdc3VersionFromAppInfo)(t):void 0,...n,fdc3Info:{providerVersion:await e.System.getVersion(),provider:\"OpenFin\"}}}},Object.defineProperty(Bo,\"__esModule\",{value:!0});var Ho=Bo.BrowserEnvironment=void 0;const No=Go;class Do extends No.BaseEnvironment{constructor(){super(...arguments),this.type=\"other\",this.getRandomId=()=>{const e=new Uint32Array(1);return window.crypto.getRandomValues(e)[0].toString(32)}}getAdapterVersionSync(){return\"\"}observeBounds(e,t){throw new Error(\"Method not implemented.\")}layoutAllowedInContext(e){return!1}initLayoutManager(e,t,n){throw new Error(\"Method not implemented.\")}applyLayoutSnapshot(e,t,n){throw new Error(\"Method not implemented.\")}createLayout(e,t){throw new Error(\"Method not implemented.\")}destroyLayout(e,t){throw new Error(\"Method not implemented.\")}resolveLayout(e,t){throw new Error(\"Method not implemented.\")}initPlatform(...e){throw new Error(\"Method not implemented.\")}writeToken(e,t){return Promise.resolve(\"\")}retrievePort(e){throw new Error(\"Method not implemented.\")}getNextMessageId(){return this.getRandomId()}createChildContent(e){throw new Error(\"Method not implemented.\")}getWebWindow(e){throw new Error(\"Method not implemented.\")}getCurrentEntityIdentity(){throw new Error(\"Method not implemented.\")}getCurrentEntityType(){return\"external connection\"}raiseEvent(e,t){throw new Error(\"Method not implemented.\")}getUrl(){return location.href}getDefaultChannelOptions(){return{create:{},connect:{}}}getRtcPeer(){return new RTCPeerConnection}getWsConstructor(){return WebSocket}whenReady(){return Promise.resolve()}}Ho=Bo.BrowserEnvironment=Do;const Uo=e=>\"platform\"in e&&void 0!==e.platform;var Vo,zo;class Ko extends Ho{constructor(e){super(),this.connectConfig=e,Vo.set(this,void 0),zo.set(this,new W((async()=>Promise.resolve().then((function(){return require(\"./main-b14f67c9.js\")}))))),Uo(e)&&this.validatePlatformOptions(e)}getAdapterVersionSync(){return\"0.39.21\"}validatePlatformOptions({platform:e}){if(!(\"layoutSnapshot\"in e))throw new Error(\"Platform options are missing layoutSnapshot. Please provide a layoutSnapshot in the platform options.\");if(\"windows\"in e||\"windows\"in e.layoutSnapshot)throw new Error(\"It appears you tried to call connect() with a snapshot object from an OpenFin desktop environment. Note that connect() expects to be called with a platform property with this structure: { platform: { layoutSnapshot } }. To get a layoutSnapshot of the expected structure, use fin.Platform.Layout.getCurrentLayoutManagerSync().getLayoutSnapshot() in v34+ in your desktop environment.\");const{layouts:t}=e.layoutSnapshot;Object.entries(t).map((([e,t])=>{if(\"object\"!=typeof t||null===t)throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must be an object.`);if(!(\"content\"in t))throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must contain a 'content' property.`)}))}async getInteropInfo(e){return{...{contextGroups:void 0,logging:{beforeAction:{enabled:!1},afterAction:{enabled:!1}}},fdc3Version:void 0,fdc3Info:{providerVersion:\"0.39.21\",provider:\"OpenFin Web\"}}}layoutAllowedInContext(e){return!0}async initLayoutManager(e,t,n){if(Lo(this,Vo,\"f\"))throw new Error(\"Layout already initialized.\");if(!Uo(this.connectConfig))throw new Error(\"Platform options are missing from connection config.\");const{WebLayoutEntryPoint:i}=await Lo(this,zo,\"f\").getValue();return To(this,Vo,new i(this.connectConfig),\"f\"),await Lo(this,Vo,\"f\").initLayoutManager(e,t,n)}async applyLayoutSnapshot(e,t,n){Lo(this,Vo,\"f\")?.applyLayoutSnapshot(e,t,n)}async createLayout(e,t){return Lo(this,Vo,\"f\")?.createLayout(e,t)}async destroyLayout(e,t){return Lo(this,Vo,\"f\")?.destroyLayout(e,t)}async getViewWindowIdentity(e,t){return Promise.resolve({uuid:t.uuid,name:t.uuid})}}Vo=new WeakMap,zo=new WeakMap;const qo=()=>{const e=((e,t)=>{const n=new RegExp(`^${t}<(?.*)>$`).exec(e)?.groups?.meta;if(n)try{return JSON.parse(atob(n))}catch(e){throw new Error(`Failed to decode JSON from ${n}.`)}})(window.name,\"of-frame\");if(e)try{const{name:t,uuid:n,brokerUrl:i,providerId:r,contextGroup:o}=e;return Fo(i,\"brokerUrl\"),Fo(n,\"uuid\"),Fo(t,\"name\"),{identity:{name:t,uuid:n},brokerUrl:i,interopConfig:{providerId:r,currentContextGroup:o}}}catch(e){throw new Error(`Unexpected error occurred when inferring platform information: ${e.stack}`)}},Jo=()=>{const e=r.v4();return{uuid:e,name:e}},Yo=async e=>{if(\"enabled\"===e.connectionInheritance){const t=await(async e=>{const t=qo();if(t){const{validateOptions:n=(()=>!0)}=e,{identity:i,...r}=t;if(!await n(r))throw new Error(\"Parent options were rejected by validateOptions.\");return t}})(e);if(t)return t}if(!e.options){const t=\"enabled\"===e.connectionInheritance?\"Broker URL was not specified nor provided by a platform container.\":\"Connection inheritance is disabled but no options were provided.\";throw new Error(t)}return{...e.options,identity:Jo()}};exports.__classPrivateFieldGet=Lo,exports.__classPrivateFieldSet=To,exports.apiExposer=Gn,exports.commonjsGlobal=s,exports.connect=async t=>{try{Ro.log(\"Establishing connection\",t);const{brokerUrl:n,identity:i,timeout:r,interopConfig:s}=await Yo(t),{workerPort:a,iframeBrokerPort:c}=await(async(e,t,n)=>{const{origin:i}=new URL(e),r=document.createElement(\"IFRAME\");let s;r.style.display=\"none\";try{return await new Promise(((a,c)=>{const d=e=>{if(e.source===r.contentWindow&&e.data?.topic===`ack-${jo}`){if(e.origin!==i)c(new Error(`Broker redirected to unexpected origin ${e.origin}, expected ${i}.`));else if(e.data.success){const[t,n]=e.ports;a({iframeBrokerPort:t,workerPort:n})}else c(new m(e.data));window.removeEventListener(\"message\",d),clearTimeout(s)}};window.addEventListener(\"message\",d),ko.log(`Connecting to broker ${e}`),r.setAttribute(\"src\",e),r.setAttribute(\"name\",o(t,\"of-broker\")),document.body.appendChild(r),ko.log(\"Iframe loaded, awaiting init message from iframe\"),n&&(s=setTimeout((()=>{window.removeEventListener(\"message\",d),document.body.removeChild(r),c(new Error(\"Worker did not initialize in time\"))}),n))}))}catch(e){throw new Error(`Failed to initialise Fin Web Client. ${e.message}`,{cause:e})}})(n,i,r);Ro.log(\"Successfully established connection to shared worker\");const d={entityType:\"external connection\",...i};a.start(),c.start();const h=((t,n,i)=>{const r=$o(n),o=new Ko(t),s=new Io(r,o,i);return s.connectSync(),window.Buffer=e.Buffer,new Wr(s)})(t,a,d);return s?.providerId&&(h.me.interop=h.Interop.connectSync(s.providerId),s?.currentContextGroup&&h.me.interop.joinContextGroup(s.currentContextGroup).catch((e=>{console.warn(`Error joining specified context group: ${s?.currentContextGroup}, continuing`,e)}))),{...h,me:{...h.me,identity:{uuid:h.me.uuid,name:h.me.name}}}}catch(e){throw new Error(`An error occured during web-interop connection: ${e.message}`)}},exports.decorators=Nn,exports.encodeOptions=o,exports.layout_constants=ai,exports.lazy=G;\n","\"use strict\";var t=require(\"./main-8cad4070.js\"),e=require(\"uuid\");require(\"buffer/\"),require(\"events\"),require(\"lodash/cloneDeep\"),require(\"lodash/isEqual\");var i={},n={};Object.defineProperty(n,\"__esModule\",{value:!0}),n.mapValuesAsync=n.mapEntriesAsync=void 0;const o=(t,[e,i])=>({...t,[e]:i});async function s(t,e){return(await Promise.all(e.map((async([e,i])=>[e,await t(i,e)])))).reduce(o,{})}n.mapEntriesAsync=s,n.mapValuesAsync=async function(t,e){let i;return i=e instanceof Map?[...e.entries()]:Object.entries(e),s(t,i)};var r,a,l,h,d=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldSet||function(t,e,i,n,o){if(\"m\"===n)throw new TypeError(\"Private method is not writable\");if(\"a\"===n&&!o)throw new TypeError(\"Private accessor was defined without a setter\");if(\"function\"==typeof e?t!==e||!o:!e.has(t))throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");return\"a\"===n?o.call(t,i):o?o.value=i:e.set(t,i),i},c=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldGet||function(t,e,i,n){if(\"a\"===i&&!n)throw new TypeError(\"Private accessor was defined without a getter\");if(\"function\"==typeof e?t!==e||!n:!e.has(t))throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");return\"m\"===i?n:\"a\"===i?n.call(t):n?n.value:e.get(t)};Object.defineProperty(i,\"__esModule\",{value:!0});var m=i.DefaultLayoutManager=void 0;const u=n;class p{constructor(t){a.set(this,void 0),l.set(this,new Map),d(this,a,t,\"f\")}size(){return c(this,l,\"f\").size}async applyLayoutSnapshot({layouts:t}){if(Object.keys(t).length>1)throw new Error(\"[LayoutManager] Tried to call applyLayoutSnapshot with more than 1 layout. When implementing multiple layouts via overridden LayoutManager class, you must override and fully implement the applyLayoutSnapshot method without calling super.applyLayoutSnapshot().\");const[[e,i]]=Object.entries(t);await p.createLayout(this,{layoutName:e,layout:i})}async showLayout({layoutName:t}){}async getLayoutSnapshot(){return{layouts:await(0,u.mapValuesAsync)((t=>t.getFrameSnapshot()),c(this,l,\"f\"))}}async removeLayout({layoutName:t}){}getLayoutIdentityForView(t){const e=[...c(this,l,\"f\").values()].find((e=>e.getCurrentViews().some((e=>e.name===t.name&&e.uuid===t.uuid))));return e?.identity??void 0}isLayoutVisible({layoutName:t}){return c(p,r,\"m\",h).call(p,this,t).isVisible()}resolveLayoutIdentity(t){if(t&&\"layoutName\"in t)return t;const e=[...c(this,l,\"f\").values()];if(1===e.length)return e[0].identity;const i=e.find((t=>t.isVisible()));return i?.identity??void 0}static async resolveLayout(t,e){const i=t.resolveLayoutIdentity(e);if(void 0===i||!(\"layoutName\"in i))throw new Error(\"[layout-manager] resolveLayout: Could not resolve the layout identity. Make sure you include 'layoutName' in the identity object.\");return c(p,r,\"m\",h).call(p,t,i.layoutName)}static async handleSharedView(t,e,i){await(0,u.mapValuesAsync)((async t=>{if(t.identity.layoutName!==e.layoutName){const e=t.getCurrentViews().find((t=>t.name===i.name));e&&await t.onViewDetached({viewIdentity:e,target:null}).catch(console.error)}}),c(t,l,\"f\"))}static async handleLastViewRemoved(t,e){await t.removeLayout(e),await c(t,a,\"f\").handleLastViewRemoved(t)}static async destroyLayout(t,{layoutName:e}){await c(p,r,\"m\",h).call(p,t,e).destroy(),c(t,l,\"f\").delete(e)}static async createLayout(t,e){const{layoutName:i}=e;if(c(t,l,\"f\").has(i))throw new Error(`Layout name ${i} already exists`);await c(t,a,\"f\").createLayout(e,t)}static registerLayout(t,e,i){c(t,l,\"f\").set(e,i)}static getAllLayouts(t){return[...c(t,l,\"f\").values()]}static setInitialSnapshot(t,e){c(t,a,\"f\").setInitialSnapshot(e)}static createClosedConstructor(...t){return class extends p{constructor(){super(...t)}}}}m=i.DefaultLayoutManager=p,r=p,a=new WeakMap,l=new WeakMap,h=function(t,e){const i=c(t,l,\"f\").get(e);if(!i)throw new Error(`[layout-manager] getLayoutByName: Could not locate layout with name '${e}'`);return i};var g={},f={},v={};Object.defineProperty(v,\"__esModule\",{value:!0}),v.ReversibleMap=void 0;v.ReversibleMap=class{constructor(){this.valueToKey=new Map,this.keyToValue=new Map,this.setUnique=(t,e)=>{if(this.hasKey(t)||this.hasValue(e))throw new Error(\"Key or value already in the map.\");this.keyToValue.set(t,e),this.valueToKey.set(e,t)},this.getKey=t=>{const e=this.valueToKey.get(t);if(!e)throw new Error(\"Value not found in the map.\");return e},this.deleteKey=t=>{const e=this.getValue(t);return this.keyToValue.delete(t),this.valueToKey.delete(e),e},this.deleteValue=t=>{const e=this.getKey(t);return this.keyToValue.delete(e),this.valueToKey.delete(t),e},this.hasKey=t=>this.keyToValue.has(t),this.hasValue=t=>this.valueToKey.has(t)}getValue(t){const e=this.keyToValue.get(t);if(!e)throw new Error(\"Key not found in the map.\");return e}},Object.defineProperty(f,\"__esModule\",{value:!0});var _=f.LayoutContentCache=void 0;const y=t.lazy,C=v;class w{constructor(){this.contentItemCache=new C.ReversibleMap,this.contentItemCacheId=0,this.createCacheKey=()=>{const t=`entity-${this.contentItemCacheId.toString()}`;return this.contentItemCacheId+=1,t},this.hasKey=t=>this.contentItemCache.hasKey(t),this.getItemOrUndefined=t=>{try{return this.getContentItemOrThrow(t)}catch(t){return}},this.getContentItemOrThrow=(t,e)=>{if(!this.contentItemCache.hasKey(t))throw new Error(\"Layout component has been destroyed or detached from the current layout.\");const i=this.contentItemCache.getValue(t);if(e&&!e.includes(i.type))throw new Error(`Layout item is not the expected type. Expected ${e.join(\", \")}, got ${i.type}.`);return i},this.getOrCreateEntityId=t=>{if(this.contentItemCache.hasValue(t))return this.contentItemCache.getKey(t);t.onDestroyed((()=>{this.contentItemCache.deleteValue(t)}));const e=this.createCacheKey();return this.contentItemCache.setUnique(e,t),e}}static getSingleInstance(){return w.singleton.getValue()}}_=f.LayoutContentCache=w,w.singleton=new y.Lazy((()=>new w));var I={},b={};!function(t){Object.defineProperty(t,\"__esModule\",{value:!0}),t.getAdjacentStacks=t.doShareEdge=t.getAdjacentItem=void 0;t.getAdjacentItem=(e,i)=>{const{parent:n}=e;if(e.isRoot()||!n)return;const o=[\"top\",\"bottom\"].includes(i)?\"column\":\"row\",s=[\"top\",\"left\"].includes(i)?-1:1;if(n.type===o){const t=n.contentItems.indexOf(e)+s;if(t>=0&&t{const n=t.getBounds(),o=e.getBounds();if(!n||!o)return!1;if([\"top\",\"bottom\"].includes(i)){return!(n.righto.right)}return!(n.bottomo.bottom)};t.getAdjacentStacks=(e,i)=>{const n=[\"top\",\"bottom\"].includes(i)?\"row\":\"column\",o=s=>\"stack\"===s.type?(0,t.doShareEdge)(e,s,i)?[s]:[]:\"root\"===s.type||\"ground\"===s.type?[]:s.type===n?s.contentItems.map((t=>o(t))).flat():s.type!==n?[\"top\",\"right\"].includes(i)?o(s.contentItems[s.contentItems.length-1]):o(s.contentItems[0]):[],s=(0,t.getAdjacentItem)(e,i);return s?o(s):[]}}(b);var S=t.commonjsGlobal&&t.commonjsGlobal.__decorate||function(t,e,i,n){var o,s=arguments.length,r=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if(\"object\"==typeof Reflect&&\"function\"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(s<3?o(r):s>3?o(e,i,r):o(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};Object.defineProperty(I,\"__esModule\",{value:!0}),I.LayoutEntitiesController=void 0;const E=t.decorators,x=b,L=i;class z{constructor(t,e,i){this.wire=t,this.layoutManager=e,this.layoutContentCache=i,this.analytics=t=>{this.wire.sendAction(`layout-controller-${t}`).catch((()=>{}))},this.getLayoutIdentityForViewOrThrow=async t=>{const e=this.layoutManager.getLayoutIdentityForView(t);if(!e)throw new Error(`View identity ${t.name} is not attached to any layouts.`);return e},this.getRoot=async t=>{this.analytics(\"get-root\");const e=(await this.getLayout(t)).getRoot();return{type:e.type,entityId:this.layoutContentCache.getOrCreateEntityId(e)}},this.getStackByView=async t=>{this.analytics(\"get-stack-by-view\");const e=await this.getLayoutIdentityForViewOrThrow(t),i=(await this.getLayout(e)).getStackByView(t);if(\"stack\"===i?.type)return{entityId:this.layoutContentCache.getOrCreateEntityId(i),type:\"stack\"}},this.getStackViews=t=>{this.analytics(\"get-stack-views\");return this.layoutContentCache.getContentItemOrThrow(t,[\"stack\"]).contentItems.map((t=>({name:t.viewName,uuid:this.wire.me.uuid})))},this.isRoot=t=>{this.analytics(\"is-root\");return this.layoutContentCache.getContentItemOrThrow(t).isRoot()},this.exists=t=>(this.analytics(\"exists\"),this.layoutContentCache.hasKey(t)),this.addViewToStack=async(t,e,{index:i}={index:0})=>{this.analytics(\"add-view-to-stack\");const n=this.layoutContentCache.getContentItemOrThrow(t);if(i&&i>n.contentItems.length+1)throw new Error(`Index '${i}' out of range, please exclude the index or specify a number between 0 and ${n.contentItems.length}`);const o={id:t,index:i},{identity:s}=await n.layout.platformCreateView(e,{location:o});return s},this.findViewInStack=(t,e)=>t.contentItems.find((t=>t.viewName===e.name)),this.removeViewFromStack=async(t,e)=>{this.analytics(\"remove-view-from-stack\");const i=this.layoutContentCache.getContentItemOrThrow(t,[\"stack\"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to remove a view ('${e.name}') which does not belong to the stack.`);await n.layout.platformCloseView(e)},this.createAdjacentStack=async(t,e,{position:i=\"right\"}={})=>{if(this.analytics(\"create-adjacent-stack\"),!Array.isArray(e)||0===e.length)throw new Error('The parameter \"views\" must be an array with at least 1 element.');if(![\"top\",\"bottom\",\"left\",\"right\"].includes(i))throw new Error(`Invalid position '${i}' specified.`);const n=this.layoutContentCache.getContentItemOrThrow(t).createAdjacentStack({position:i}),o=this.layoutContentCache.getOrCreateEntityId(n);return await Promise.all(e.reverse().map((t=>this.addViewToStack(o,t)))),o},this.getAdjacentStacks=async({targetId:t,edge:e})=>{this.analytics(\"get-adjacent-stacks\");const i=this.layoutContentCache.getContentItemOrThrow(t);return(0,x.getAdjacentStacks)(i,e).map((t=>({entityId:this.layoutContentCache.getOrCreateEntityId(t)})))},this.setStackActiveView=async(t,e)=>{this.analytics(\"set-stack-active-view\");const i=this.layoutContentCache.getContentItemOrThrow(t,[\"stack\"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to set a view ('${e.name}') as active when it does not belong to the stack.`);i.setActiveContentItem(n,!0)}}async getLayout(t){const e=await L.DefaultLayoutManager.resolveLayout(this.layoutManager,t);if(!e)throw new Error(`Could not resolve target layout identity ${JSON.stringify(t)}`);return e}getContent(t){this.analytics(\"get-content\");return this.layoutContentCache.getContentItemOrThrow(t,[\"column\",\"row\"]).contentItems.map((t=>({type:t.type,entityId:this.layoutContentCache.getOrCreateEntityId(t)})))}getParent(t){this.analytics(\"get-parent\");const e=this.layoutContentCache.getContentItemOrThrow(t);if(!e.isRoot())return e.parent?.contentItems.includes(e)?{type:e.parent.type,entityId:this.layoutContentCache.getOrCreateEntityId(e.parent)}:void 0}}S([(0,E.expose)()],z.prototype,\"getLayoutIdentityForViewOrThrow\",void 0),S([(0,E.expose)()],z.prototype,\"getRoot\",void 0),S([(0,E.expose)()],z.prototype,\"getStackByView\",void 0),S([(0,E.expose)()],z.prototype,\"getStackViews\",void 0),S([(0,E.expose)()],z.prototype,\"getContent\",null),S([(0,E.expose)()],z.prototype,\"getParent\",null),S([(0,E.expose)()],z.prototype,\"isRoot\",void 0),S([(0,E.expose)()],z.prototype,\"exists\",void 0),S([(0,E.expose)()],z.prototype,\"addViewToStack\",void 0),S([(0,E.expose)()],z.prototype,\"removeViewFromStack\",void 0),S([(0,E.expose)()],z.prototype,\"createAdjacentStack\",void 0),S([(0,E.expose)()],z.prototype,\"getAdjacentStacks\",void 0),S([(0,E.expose)()],z.prototype,\"setStackActiveView\",void 0),I.LayoutEntitiesController=z,Object.defineProperty(g,\"__esModule\",{value:!0});var M=g.initLayoutEndpoints=void 0;const P=t.apiExposer,T=t.layout_constants,A=f,k=I,D=i;M=g.initLayoutEndpoints=async function(t,e){const i=t.getFin(),n=await i.Platform.getCurrentSync().getClient(),o=new P.ChannelsExposer(n);await new P.ApiExposer(o).exposeInstance(new k.LayoutEntitiesController(t,e,A.LayoutContentCache.getSingleInstance()),{id:T.LAYOUT_CONTROLLER_ID}),await async function(t,e){const i=t=>async i=>{const n=await D.DefaultLayoutManager.resolveLayout(e,i.target);if(!n)throw new Error(`Could not resolve the layout target from payload ${JSON.stringify(i)}`);return t(n,i)},n=(e,n)=>{t.register(e,i(n))},o=(t,e)=>{n(t,e)};n(\"replace-view\",((t,e)=>t.replaceView(e))),n(\"replace-layout\",((t,{layout:e})=>t.replaceLayout(e))),n(\"add-view\",((t,e)=>t.insertView(e))),o(\"layout-add-view\",((t,{viewOptions:e,location:i,targetView:n})=>t.platformCreateView(e,{location:i,targetView:n}))),n(\"close-view\",((t,e)=>t.cleanupView(e.viewIdentity))),o(\"layout-close-view\",((t,e)=>t.platformCloseView(e.viewIdentity))),n(\"apply-preset-layout\",((t,e)=>t.applyPreset(e))),n(\"get-layout-views\",(t=>t.getCurrentViews())),n(\"get-frame-snapshot\",(t=>t.getFrameSnapshot())),n(\"is-visible\",(t=>t.isVisible())),n(\"destroy\",(t=>t.destroy())),t.register(\"get-layout-snapshot\",(()=>e.getLayoutSnapshot()))}(n,e)};var R={};Object.defineProperty(R,\"__esModule\",{value:!0});var U=R.BaseLayout=void 0;U=R.BaseLayout=class{};var O={};Object.defineProperty(O,\"__esModule\",{value:!0});var V=O.DOMEmitter=void 0;V=O.DOMEmitter=class{constructor(t){this.container=t}dispatchLocalEvent(t,e){const i={...e,type:t,tabSelector:`tab-${e.name}`,containerSelector:`container-${e.name}`,topic:\"openfin-DOM-event\"};this.container.dispatchEvent(new CustomEvent(t,{detail:i}))}};var B={};Object.defineProperty(B,\"__esModule\",{value:!0});var H=B.mapLayoutContentItemsImmutableSync=B.mapLayoutContentItemsImmutable=W=B.isVisible=void 0;var W=B.isVisible=t=>(0!==t.offsetWidth||0!==t.offsetHeight)&&\"hidden\"!==window.getComputedStyle(t).visibility&&t.offsetTop>=0&&t.offsetLeft>=0&&t.offsetTop<=window.innerHeight&&t.offsetLeft<=window.innerWidth;const F=t=>\"type\"in t&&\"component\"===t.type;B.mapLayoutContentItemsImmutable=async function t(e,i){return F(i)?e(i):{...i,content:await Promise.all(i.content?.map((i=>t(e,i))))}},H=B.mapLayoutContentItemsImmutableSync=function t(e,i){return F(i)?e(i):{...i,content:i.content?.map((i=>t(e,i)))}};class N extends Error{constructor(t,e){super(e),this.type=t}}class G extends N{constructor(t,e){super(\"Configuration\",t),this.node=e}}class j extends N{constructor(t){super(\"PopoutBlocked\",t)}}class $ extends N{constructor(t){super(\"API\",t)}}class Z extends N{constructor(t){super(\"Bind\",t)}}class q extends Error{constructor(t,e,i){super(`${t}: ${e}${void 0===i?\"\":\": \"+i}`)}}class X extends q{constructor(t,e){super(\"Assert\",t,e)}}class Y extends q{constructor(t,e,i){super(\"UnreachableCase\",t,`${e}${void 0===i?\"\":\": \"+i}`)}}class K extends q{constructor(t,e){super(\"UnexpectedNull\",t,e)}}class J extends q{constructor(t,e){super(\"UnexpectedUndefined\",t,e)}}var Q;!function(t){let e=!1;const i={PopoutCannotBeCreatedWithGroundItemConfig:{id:0,default:\"Popout cannot be created with ground ItemConfig\"},PleaseRegisterAConstructorFunction:{id:1,default:\"Please register a constructor function\"},ComponentTypeNotRegisteredAndBindComponentEventHandlerNotAssigned:{id:2,default:\"Component type not registered and BindComponentEvent handler not assigned\"},ComponentIsAlreadyRegistered:{id:3,default:\"Component is already registered\"},ComponentIsNotVirtuable:{id:4,default:\"Component is not virtuable. Requires rootHtmlElement field/getter\"},VirtualComponentDoesNotHaveRootHtmlElement:{id:5,default:'Virtual component does not have getter \"rootHtmlElement\"'},ItemConfigIsNotTypeComponent:{id:6,default:\"ItemConfig is not of type component\"},InvalidNumberPartInSizeString:{id:7,default:\"Invalid number part in size string\"},UnknownUnitInSizeString:{id:8,default:\"Unknown unit in size string\"},UnsupportedUnitInSizeString:{id:9,default:\"Unsupported unit in size string\"}};t.idCount=Object.keys(i).length;const n=Object.values(i);t.checkInitialise=function(){if(!e)for(let e=0;e=\"0\"&&t<=\"9\"}function Tt(t,e){const i=zt(e);t.style.width=i}function At(t,e){const i=zt(e);t.style.height=i}function kt(t){return{width:t.offsetWidth,height:t.offsetHeight}}function Dt(t,e){t.style.display=e?\"\":\"none\"}function Rt(t,e){if(void 0!==e)for(const i in e)if(e.hasOwnProperty(i)){const n=e[i],o=t[i];t[i]=Ut(o,n)}return t}function Ut(t,e){if(\"object\"!=typeof e)return e;if(Array.isArray(e)){const t=e.length,i=new Array(t);for(let n=0;n36)throw new Error(\"Too many keys in config minifier map\")},t.translateObject=n}(dt||(dt={})),function(t){t.defaults={type:at.ground,content:[],size:1,sizeUnit:ht.Fractional,minSize:void 0,minSizeUnit:ht.Pixel,id:\"\",isClosable:!0},t.createCopy=function(t,e){switch(t.type){case at.ground:case at.row:case at.column:return gt.createCopy(t,e);case at.stack:return ut.createCopy(t,e);case at.component:return pt.createCopy(t);default:throw new Y(\"CICC91354\",t.type,\"Invalid Config Item type specified\")}},t.createDefault=function(t){switch(t){case at.ground:throw new X(\"CICCDR91562\");case at.row:case at.column:return gt.createDefault(t);case at.stack:return ut.createDefault();case at.component:return pt.createDefault();default:throw new Y(\"CICCDD91563\",t,\"Invalid Config Item type specified\")}},t.isComponentItem=function(t){return t.type===at.component},t.isStackItem=function(t){return t.type===at.stack},t.isGroundItem=function(t){return t.type===at.ground}}(ct||(ct={})),function(t){t.defaultMaximised=!1,function(t){t.createCopy=function(t,e){return void 0===t?void 0:{show:null!=e?e:t.show,popout:t.popout,close:t.close,maximise:t.maximise,minimise:t.minimise,tabDropdown:t.tabDropdown}}}(t.Header||(t.Header={}))}(mt||(mt={})),function(t){function e(t){const e=t.length,i=new Array(e);for(let n=0;n\"__glMaximised\"===t));t>0&&(o=!0,n=n.splice(t,1)),e=n.length>0?n[0]:ct.defaults.id}else e=n;return i=void 0!==t.maximised?t.maximised:o,{id:e,maximised:i}}}(wt||(wt={})),function(t){function e(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0;return{resolved:!0,root:Et.resolve(i),openPopouts:t.resolveOpenPopouts(e.openPopouts),dimensions:t.Dimensions.resolve(e.dimensions),settings:t.Settings.resolve(e.settings),header:t.Header.resolve(e.header,e.settings,e.labels)}}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:Lt.fromResolvedArray(e.openPopouts),settings:_t.Settings.createCopy(e.settings),dimensions:t.Dimensions.fromResolved(e.dimensions),header:_t.Header.createCopy(e.header)}},t.isResolved=function(t){const e=t;return void 0!==e.resolved&&!0===e.resolved},t.resolveOpenPopouts=function(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0,{root:Et.resolve(o),openPopouts:xt.resolveOpenPopouts(e.openPopouts),dimensions:xt.Dimensions.resolve(e.dimensions),settings:xt.Settings.resolve(e.settings),header:xt.Header.resolve(e.header,e.settings,e.labels),parentId:null!==(i=e.parentId)&&void 0!==i?i:null,indexInParent:null!==(n=e.indexInParent)&&void 0!==n?n:null,window:t.Window.resolve(e.window,e.dimensions),resolved:!0}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:i(e.openPopouts),dimensions:xt.Dimensions.fromResolved(e.dimensions),settings:_t.Settings.createCopy(e.settings),header:_t.Header.createCopy(e.header),parentId:e.parentId,indexInParent:e.indexInParent,window:t.Window.fromResolved(e.window)}},t.fromResolvedArray=i}(Lt||(Lt={}));class Wt{constructor(){this._allEventSubscriptions=[],this._subscriptionsMap=new Map,this.unbind=this.removeEventListener,this.trigger=this.emit}tryBubbleEvent(t,e){}emit(t,...e){let i=this._subscriptionsMap.get(t);if(void 0!==i){i=i.slice();for(let t=0;t0){const n=e.slice();n.unshift(t);const o=this._allEventSubscriptions.slice();for(let t=0;t0?n.contentItems[0]:n,e=0);const o=this._layoutManager.createAndInitContentItem(i,t);t.addChild(o,e),this._layoutManager.layoutConfig.settings.popInOnClose?this._onClose():this.close()}createWindow(){const t=this.createUrl(),e=Math.floor(1e6*Math.random()).toString(36),i=this.serializeWindowFeatures({width:this._initialWindowSize.width,height:this._initialWindowSize.height,innerWidth:this._initialWindowSize.width,innerHeight:this._initialWindowSize.height,menubar:\"no\",toolbar:\"no\",location:\"no\",personalbar:\"no\",resizable:\"yes\",scrollbars:\"no\",status:\"no\"});if(this._popoutWindow=globalThis.open(t,e,i),this._popoutWindow)this._popoutWindow.addEventListener(\"load\",(()=>this.positionWindow()),{passive:!0}),this._popoutWindow.addEventListener(\"beforeunload\",(()=>{this._layoutManager.layoutConfig.settings.popInOnClose?this.popIn():this._onClose()}),{passive:!0}),this._checkReadyInterval=setInterval((()=>this.checkReady()),10);else if(!0===this._layoutManager.layoutConfig.settings.blockedPopoutsThrowError){throw new j(\"Popout blocked\")}}checkReady(){if(null===this._popoutWindow)throw new K(\"BPCR01844\");this._popoutWindow.__glInstance&&this._popoutWindow.__glInstance.isInitialised&&(this.onInitialised(),void 0!==this._checkReadyInterval&&(clearInterval(this._checkReadyInterval),this._checkReadyInterval=void 0))}serializeWindowFeatures(t){const e=[];for(const i in t)e.push(i+\"=\"+t[i].toString());return e.join(\",\")}createUrl(){const t=\"gl-window-config-\"+Ot(),e=_t.minifyConfig(this._config);try{localStorage.setItem(t,JSON.stringify(e))}catch(t){throw new Error(\"Error while writing to localStorage \"+function(t){return t instanceof Error?t.message:\"string\"==typeof t?t:\"Unknown Error\"}(t))}const i=new URL(location.href);return i.searchParams.set(\"gl-window\",t),i.toString()}positionWindow(){if(null===this._popoutWindow)throw new Error(\"BrowserPopout.positionWindow: null popoutWindow\");this._popoutWindow.moveTo(this._initialWindowSize.left,this._initialWindowSize.top),this._popoutWindow.focus()}onInitialised(){this._isInitialised=!0,this.getGlInstance().on(\"popIn\",(()=>this.popIn())),this.emit(\"initialised\")}_onClose(){setTimeout((()=>this.emit(\"closed\")),50)}}class Gt extends Wt{constructor(t,e,i,n){super(),this.layoutManager=t,this._parent=i,this._element=n,this._popInParentIds=[],this._type=e.type,this._id=e.id,this._isInitialised=!1,this.isGround=!1,this.isRow=!1,this.isColumn=!1,this.isStack=!1,this.isComponent=!1,this.size=e.size,this.sizeUnit=e.sizeUnit,this.minSize=e.minSize,this.minSizeUnit=e.minSizeUnit,this._isClosable=e.isClosable,this._pendingEventPropagations={},this._throttledEvents=[\"stateChanged\"],this._contentItems=this.createContentItems(e.content)}get type(){return this._type}get id(){return this._id}set id(t){this._id=t}get popInParentIds(){return this._popInParentIds}get parent(){return this._parent}get contentItems(){return this._contentItems}get isClosable(){return this._isClosable}get element(){return this._element}get isInitialised(){return this._isInitialised}static isStack(t){return t.isStack}static isComponentItem(t){return t.isComponent}static isComponentParentableItem(t){return t.isStack||t.isGround}removeChild(t,e=!1){const i=this._contentItems.indexOf(t);if(-1===i)throw new Error(\"Can't remove child item. Unknown content item\");if(e||this._contentItems[i].destroy(),this._contentItems.splice(i,1),this._contentItems.length>0)this.updateSize(!1);else if(!this.isGround&&!0===this._isClosable){if(null===this._parent)throw new K(\"CIUC00874\");this._parent.removeChild(this)}}addChild(t,e,i){return null!=e||(e=this._contentItems.length),this._contentItems.splice(e,0,t),t.setParent(this),!0===this._isInitialised&&!1===t._isInitialised&&t.init(),e}replaceChild(t,e,i=!1){const n=this._contentItems.indexOf(t),o=t._element.parentNode;if(-1===n)throw new X(\"CIRCI23232\",\"Can't replace child. oldChild is not child of this\");if(null===o)throw new K(\"CIRCP23232\");if(o.replaceChild(e._element,t._element),!0===i&&(t._parent=null,t.destroy()),this._contentItems[n]=e,e.setParent(this),e.size=t.size,e.sizeUnit=t.sizeUnit,e.minSize=t.minSize,e.minSizeUnit=t.minSizeUnit,null===e._parent)throw new K(\"CIRCNC45699\");!0===e._parent._isInitialised&&!1===e._isInitialised&&e.init(),this.updateSize(!1)}remove(){if(null===this._parent)throw new K(\"CIR11110\");this._parent.removeChild(this)}popout(){const t=Ot(),e=this.layoutManager.createPopoutFromContentItem(this,void 0,t,void 0);return this.emitBaseBubblingEvent(\"stateChanged\"),e}calculateConfigContent(){const t=this._contentItems,e=t.length,i=new Array(e);for(let n=0;nthis.propagateEventToLayoutManager(t,e))))}propagateEventToLayoutManager(t,e){this._pendingEventPropagations[t]=!1,this.layoutManager.emitUnknown(t,e)}}class jt extends Gt{constructor(t,e,i){super(t,e,i,document.createElement(\"div\")),this._parentItem=i,this._focused=!1,this.isComponent=!0,this._reorderEnabled=e.reorderEnabled,this.applyUpdatableConfig(e),this._initialWantMaximise=e.maximised;const n=document.createElement(\"div\");n.classList.add(\"lm_content\"),this.element.appendChild(n),this._container=new Ft(e,this,t,n,(t=>this.handleUpdateItemConfigEvent(t)),(()=>this.show()),(()=>this.hide()),(t=>this.focus(t)),(t=>this.blur(t)))}get componentName(){return this._container.componentType}get componentType(){return this._container.componentType}get reorderEnabled(){return this._reorderEnabled}get initialWantMaximise(){return this._initialWantMaximise}get component(){return this._container.component}get container(){return this._container}get parentItem(){return this._parentItem}get headerConfig(){return this._headerConfig}get title(){return this._title}get tab(){return this._tab}get focused(){return this._focused}destroy(){this._container.destroy(),super.destroy()}applyUpdatableConfig(t){this.setTitle(t.title),this._headerConfig=t.header}toConfig(){const t=this._container.stateRequestEvent,e=void 0===t?this._container.state:t();return{type:at.component,content:[],size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,maximised:!1,isClosable:this.isClosable,reorderEnabled:this._reorderEnabled,title:this._title,header:mt.Header.createCopy(this._headerConfig),componentType:pt.copyComponentType(this.componentType),componentState:e}}close(){if(null===this.parent)throw new K(\"CIC68883\");this.parent.removeChild(this,!1)}enterDragMode(t,e){Tt(this.element,t),At(this.element,e),this._container.enterDragMode(t,e)}exitDragMode(){this._container.exitDragMode()}enterStackMaximised(){this._container.enterStackMaximised()}exitStackMaximised(){this._container.exitStackMaximised()}drag(){this._container.drag()}updateSize(t){this.updateNodeSize(t)}init(){this.updateNodeSize(!1),super.init(),this._container.emit(\"open\"),this.initContentItems()}setTitle(t){this._title=t,this.emit(\"titleChanged\",t),this.emit(\"stateChanged\")}setTab(t){this._tab=t,this.emit(\"tab\",t),this._container.setTab(t)}hide(){super.hide(),this._container.setVisibility(!1)}show(){super.show(),this._container.setVisibility(!0)}focus(t=!1){this.parentItem.setActiveComponentItem(this,!0,t)}setFocused(t){this._focused=!0,this.tab.setFocused(),t||this.emitBaseBubblingEvent(\"focus\")}blur(t=!1){this._focused&&this.layoutManager.setFocusedComponentItem(void 0,t)}setBlurred(t){this._focused=!1,this.tab.setBlurred(),t||this.emitBaseBubblingEvent(\"blur\")}setParent(t){this._parentItem=t,super.setParent(t)}handleUpdateItemConfigEvent(t){this.applyUpdatableConfig(t)}updateNodeSize(t){if(\"none\"!==this.element.style.display){const{width:e,height:i}=kt(this.element);this._container.setSizeToNodeSize(e,i,t)}}}class $t extends Gt{constructor(){super(...arguments),this._focused=!1}get focused(){return this._focused}setFocusedValue(t){this._focused=t}}class Zt extends Wt{constructor(t,e){super(),this._eElement=t,this._pointerTracking=!1,this._pointerDownEventListener=t=>this.onPointerDown(t),this._pointerMoveEventListener=t=>this.onPointerMove(t),this._pointerUpEventListener=t=>this.onPointerUp(t),this._timeout=void 0,this._allowableTargets=[t,...e],this._oDocument=document,this._eBody=document.body,this._nDelay=1800,this._nDistance=10,this._nX=0,this._nY=0,this._nOriginalX=0,this._nOriginalY=0,this._dragging=!1,this._eElement.addEventListener(\"pointerdown\",this._pointerDownEventListener,{passive:!0})}destroy(){this.checkRemovePointerTrackingEventListeners(),this._eElement.removeEventListener(\"pointerdown\",this._pointerDownEventListener)}cancelDrag(){this.processDragStop(void 0)}onPointerDown(t){if(this._allowableTargets.includes(t.target)&&t.isPrimary){const e=this.getPointerCoordinates(t);this.processPointerDown(e)}}processPointerDown(t){this._nOriginalX=t.x,this._nOriginalY=t.y,this._oDocument.addEventListener(\"pointermove\",this._pointerMoveEventListener),this._oDocument.addEventListener(\"pointerup\",this._pointerUpEventListener,{passive:!0}),this._pointerTracking=!0,this._timeout=setTimeout((()=>{try{this.startDrag()}catch(t){throw console.error(t),t}}),this._nDelay)}onPointerMove(t){this._pointerTracking&&(this.processDragMove(t),t.preventDefault())}processDragMove(t){this._nX=t.pageX-this._nOriginalX,this._nY=t.pageY-this._nOriginalY,!1===this._dragging&&(Math.abs(this._nX)>this._nDistance||Math.abs(this._nY)>this._nDistance)&&this.startDrag(),this._dragging&&this.emit(\"drag\",this._nX,this._nY,t)}onPointerUp(t){this.processDragStop(t)}processDragStop(t){var e;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this.checkRemovePointerTrackingEventListeners(),!0===this._dragging&&(this._eBody.classList.remove(\"lm_dragging\"),this._eElement.classList.remove(\"lm_dragging\"),null===(e=this._oDocument.querySelector(\"iframe\"))||void 0===e||e.style.setProperty(\"pointer-events\",\"\"),this._dragging=!1,this.emit(\"dragStop\",t))}checkRemovePointerTrackingEventListeners(){this._pointerTracking&&(this._oDocument.removeEventListener(\"pointermove\",this._pointerMoveEventListener),this._oDocument.removeEventListener(\"pointerup\",this._pointerUpEventListener),this._pointerTracking=!1)}startDrag(){var t;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this._dragging=!0,this._eBody.classList.add(\"lm_dragging\"),this._eElement.classList.add(\"lm_dragging\"),null===(t=this._oDocument.querySelector(\"iframe\"))||void 0===t||t.style.setProperty(\"pointer-events\",\"none\"),this.emit(\"dragStart\",this._nOriginalX,this._nOriginalY)}getPointerCoordinates(t){return{x:t.pageX,y:t.pageY}}}class qt{constructor(t,e,i){this._isVertical=t,this._size=e,this._grabSize=i0){const i=this.createSplitter(Math.max(0,e-1)).element;e>0?(this.contentItems[e-1].element.insertAdjacentElement(\"afterend\",i),i.insertAdjacentElement(\"afterend\",t.element)):(this.contentItems[0].element.insertAdjacentElement(\"beforebegin\",i),i.insertAdjacentElement(\"beforebegin\",t.element))}else this._childElementContainer.appendChild(t.element);super.addChild(t,e);const n=1/this.contentItems.length*100;if(!0===i)return this.emitBaseBubblingEvent(\"stateChanged\"),e;for(let e=0;e0&&(this.calculateRelativeSizes(),this.setAbsoluteSizes()),this.emitBaseBubblingEvent(\"stateChanged\"),this.emit(\"resize\")}setAbsoluteSizes(){const t=this.calculateAbsoluteSizes();for(let e=0;e0&&t.itemSizes[e]++,this._isColumn?(Tt(this.contentItems[e].element,t.crossAxisSize),At(this.contentItems[e].element,t.itemSizes[e])):(Tt(this.contentItems[e].element,t.itemSizes[e]),At(this.contentItems[e].element,t.crossAxisSize))}calculateAbsoluteSizes(){const t=(this.contentItems.length-1)*this._splitterSize,{width:e,height:i}=kt(this.element);let n,o;this._isColumn?(n=i-t,o=e):(n=e-t,o=i);let s=0;const r=[];for(let t=0;t0){const n=100-t;for(let t=0;t100&&e.length>0){for(let t=0;te)return;{const r=i/e;let a=i;for(let e=0;ethis.onSplitterDrag(e,t,i))),e.on(\"dragStop\",(()=>this.onSplitterDragStop(e))),e.on(\"dragStart\",(()=>this.onSplitterDragStart(e))),this._splitter.splice(t,0,e),e}getSplitItems(t){const e=this._splitter.indexOf(t);return{before:this.contentItems[e],after:this.contentItems[e+1]}}calculateContentItemMinSize(t){const e=t.minSize;if(void 0!==e){if(t.minSizeUnit===ht.Pixel)return e;throw new X(\"ROCGMD98831\",JSON.stringify(t))}{const t=this.layoutManager.layoutConfig.dimensions;return this._isColumn?t.defaultMinItemHeight:t.defaultMinItemWidth}}calculateContentItemsTotalMinSize(t){let e=0;for(const i of t)e+=this.calculateContentItemMinSize(i);return e}onSplitterDragStart(t){const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=this.calculateContentItemsTotalMinSize(e.before.contentItems),s=this.calculateContentItemsTotalMinSize(e.after.contentItems);this._splitterPosition=0,this._splitterMinPosition=-1*(i-o),this._splitterMaxPosition=n-s}onSplitterDrag(t,e,i){let n=this._isColumn?i:e;if(null===this._splitterMinPosition||null===this._splitterMaxPosition)throw new K(\"ROCOSD59226\");n=Math.max(n,this._splitterMinPosition),n=Math.min(n,this._splitterMaxPosition),this._splitterPosition=n;const o=zt(n);this._isColumn?t.element.style.top=o:t.element.style.left=o}onSplitterDragStop(t){if(null===this._splitterPosition)throw new K(\"ROCOSDS66932\");{const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=(this._splitterPosition+i)/(i+n),s=e.before.size+e.after.size;e.before.size=o*s,e.after.size=(1-o)*s,t.element.style.top=zt(0),t.element.style.left=zt(0),globalThis.requestAnimationFrame((()=>this.updateSize(!1)))}}}!function(t){t.getElementDimensionSize=function(t,e){return\"width\"===e?function(t){return t.offsetWidth}(t):function(t){return t.offsetHeight}(t)},t.setElementDimensionSize=function(t,e,i){return\"width\"===e?Tt(t,i):At(t,i)},t.createElement=function(t,e){const i=t.createElement(\"div\");return i.classList.add(\"lm_item\"),e?i.classList.add(\"lm_column\"):i.classList.add(\"lm_row\"),i}}(Xt||(Xt={}));class Yt extends $t{constructor(t,e,i){super(t,vt.create(e),null,Yt.createElement(document)),this.isGround=!0,this._childElementContainer=this.element,this._containerElement=i;let n=null;for(;;){const t=n?n.previousSibling:this._containerElement.lastChild;if(!(t instanceof Element&&t.classList.contains(\"lm_content\")))break;n=t}this._containerElement.insertBefore(this.element,n)}init(){if(!0!==this.isInitialised){this.updateNodeSize();for(let t=0;t0?this.contentItems[0]:this,n.isComponent)throw new Error(\"Cannot add item as child to ComponentItem\");{const t=this.layoutManager.createAndInitContentItem(i,n);return e=n.addChild(t,e),n===this?-1:e}}loadComponentAsRoot(t){this.clearRoot();const e=Ct.resolve(t,!1);if(e.maximised)throw new Error(\"Root Component cannot be maximised\");{const t=new jt(this.layoutManager,e,this);t.init(),this.addChild(t,0)}}addChild(t,e){if(this.contentItems.length>0)throw new Error(\"Ground node can only have a single child\");return this._childElementContainer.appendChild(t.element),e=super.addChild(t,e),this.updateSize(!1),this.emitBaseBubblingEvent(\"stateChanged\"),e}calculateConfigContent(){const t=this.contentItems,e=t.length,i=new Array(e);for(let n=0;n0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e)),this.updateContentItemsSize(!1))}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}createSideAreas(){const t=Yt.Area.oppositeSides,e=new Array(Object.keys(t).length);let i=0;for(const n in t){const o=n,s=this.getElementArea();if(null===s)throw new K(\"RCSA77553\");s.side=o,\"2\"===t[o][1]?s[o]=s[t[o]]-50:s[o]=s[t[o]]+50,s.surface=(s.x2-s.x1)*(s.y2-s.y1),e[i++]=s}return e}highlightDropZone(t,e,i){this.layoutManager.tabDropPlaceholder.remove(),super.highlightDropZone(t,e,i)}onDrop(t,e){if(t.isComponent){const e=ut.createDefault(),i=t;e.header=mt.Header.createCopy(i.headerConfig);const n=this.layoutManager.createAndInitContentItem(e,this);n.addChild(t),t=n}if(0===this.contentItems.length)this.addChild(t);else{if(t.type===at.row||t.type===at.column){const e=ut.createDefault(),i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}const i=\"x\"==e.side[0]?at.row:at.column,n=\"2\"==e.side[1],o=this.contentItems[0];if(o instanceof Xt&&o.type===i){const e=o.contentItems[n?0:o.contentItems.length-1];o.addChild(t,n?0:void 0,!0),e.size*=.5,t.size=e.size,t.sizeUnit=ht.Percent,o.updateSize(!1)}else{const e=ct.createDefault(i),s=this.layoutManager.createContentItem(e,this);this.replaceChild(o,s),s.addChild(t,n?0:void 0,!0),s.addChild(o,n?void 0:0,!0),o.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}}dock(){throw new X(\"GID87731\")}validateDocking(){throw new X(\"GIVD87732\")}getAllContentItems(){const t=[this];return this.deepGetAllContentItems(this.contentItems,t),t}getConfigMaximisedItems(){const t=[];return this.deepFilterContentItems(this.contentItems,t,(t=>!(!Gt.isStack(t)||!t.initialWantMaximise)||!(!Gt.isComponentItem(t)||!t.initialWantMaximise))),t}getItemsByPopInParentId(t){const e=[];return this.deepFilterContentItems(this.contentItems,e,(e=>e.popInParentIds.includes(t))),e}toConfig(){throw new Error(\"Cannot generate GroundItem config\")}setActiveComponentItem(t,e,i){}updateNodeSize(){const{width:t,height:e}=kt(this._containerElement);Tt(this.element,t),At(this.element,e),this.contentItems.length>0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e))}deepGetAllContentItems(t,e){for(let i=0;ithis.onClick(t),this._touchStartEventListener=t=>this.onTouchStart(t),this._element=document.createElement(\"div\"),this._element.classList.add(i),this._element.title=e,this._header.on(\"destroy\",(()=>this.destroy())),this._element.addEventListener(\"click\",this._clickEventListener,{passive:!0}),this._element.addEventListener(\"touchstart\",this._touchStartEventListener,{passive:!0}),this._header.controlsContainerElement.appendChild(this._element)}get element(){return this._element}destroy(){var t;this._element.removeEventListener(\"click\",this._clickEventListener),this._element.removeEventListener(\"touchstart\",this._touchStartEventListener),null===(t=this._element.parentNode)||void 0===t||t.removeChild(this._element)}onClick(t){this._pushEvent(t)}onTouchStart(t){this._pushEvent(t)}}class Jt{constructor(t,e,i,n,o){var s;this._layoutManager=t,this._componentItem=e,this._closeEvent=i,this._focusEvent=n,this._dragStartEvent=o,this._isActive=!1,this._tabClickListener=t=>this.onTabClickDown(t),this._tabTouchStartListener=t=>this.onTabTouchStart(t),this._closeClickListener=()=>this.onCloseClick(),this._closeTouchStartListener=()=>this.onCloseTouchStart(),this._dragStartListener=(t,e)=>this.onDragStart(t,e),this._contentItemDestroyListener=()=>this.onContentItemDestroy(),this._tabTitleChangedListener=t=>this.setTitle(t),this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_tab\"),this._titleElement=document.createElement(\"span\"),this._titleElement.classList.add(\"lm_title\"),this._closeElement=document.createElement(\"div\"),this._closeElement.classList.add(\"lm_close_tab\"),this._element.appendChild(this._titleElement),this._element.appendChild(this._closeElement),e.isClosable?this._closeElement.style.display=\"\":this._closeElement.style.display=\"none\",this.setTitle(e.title),this._componentItem.on(\"titleChanged\",this._tabTitleChangedListener);(null!==(s=e.reorderEnabled)&&void 0!==s?s:this._layoutManager.layoutConfig.settings.reorderEnabled)&&this.enableReorder(),this._element.addEventListener(\"click\",this._tabClickListener,{passive:!0}),this._element.addEventListener(\"touchstart\",this._tabTouchStartListener,{passive:!0}),this._componentItem.isClosable?(this._closeElement.addEventListener(\"click\",this._closeClickListener,{passive:!0}),this._closeElement.addEventListener(\"touchstart\",this._closeTouchStartListener,{passive:!0})):(this._closeElement.remove(),this._closeElement=void 0),this._componentItem.setTab(this),this._layoutManager.emit(\"tabCreated\",this)}get isActive(){return this._isActive}get componentItem(){return this._componentItem}get contentItem(){return this._componentItem}get element(){return this._element}get titleElement(){return this._titleElement}get closeElement(){return this._closeElement}get reorderEnabled(){return void 0!==this._dragListener}set reorderEnabled(t){t!==this.reorderEnabled&&(t?this.enableReorder():this.disableReorder())}setTitle(t){this._titleElement.innerText=t,this._element.title=t}setActive(t){t!==this._isActive&&(this._isActive=t,t?this._element.classList.add(\"lm_active\"):this._element.classList.remove(\"lm_active\"))}destroy(){var t,e;this._closeEvent=void 0,this._focusEvent=void 0,this._dragStartEvent=void 0,this._element.removeEventListener(\"click\",this._tabClickListener),this._element.removeEventListener(\"touchstart\",this._tabTouchStartListener),null===(t=this._closeElement)||void 0===t||t.removeEventListener(\"click\",this._closeClickListener),null===(e=this._closeElement)||void 0===e||e.removeEventListener(\"touchstart\",this._closeTouchStartListener),this._componentItem.off(\"titleChanged\",this._tabTitleChangedListener),this.reorderEnabled&&this.disableReorder(),this._element.remove()}setBlurred(){this._element.classList.remove(\"lm_focused\"),this._titleElement.classList.remove(\"lm_focused\")}setFocused(){this._element.classList.add(\"lm_focused\"),this._titleElement.classList.add(\"lm_focused\")}onDragStart(t,e){if(void 0===this._dragListener)throw new J(\"TODSDLU10093\");if(void 0===this._dragStartEvent)throw new J(\"TODS23309\");this._dragStartEvent(t,e,this._dragListener,this.componentItem)}onContentItemDestroy(){void 0!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=void 0)}onTabClickDown(t){const e=t.target;e!==this._element&&e!==this._titleElement||(0===t.button?this.notifyFocus():1===t.button&&this._componentItem.isClosable&&this.notifyClose())}onTabTouchStart(t){t.target===this._element&&this.notifyFocus()}onCloseClick(){this.notifyClose()}onCloseTouchStart(){this.notifyClose()}notifyClose(){if(void 0===this._closeEvent)throw new J(\"TNC15007\");this._closeEvent(this._componentItem)}notifyFocus(){if(void 0===this._focusEvent)throw new J(\"TNA15007\");this._focusEvent(this._componentItem)}enableReorder(){this._dragListener=new Zt(this._element,[this._titleElement]),this._dragListener.on(\"dragStart\",this._dragStartListener),this._componentItem.on(\"destroy\",this._contentItemDestroyListener)}disableReorder(){if(void 0===this._dragListener)throw new J(\"TDR87745\");this._componentItem.off(\"destroy\",this._contentItemDestroyListener),this._dragListener.off(\"dragStart\",this._dragStartListener),this._dragListener=void 0}}class Qt{constructor(t,e,i,n,o){this._layoutManager=t,this._componentRemoveEvent=e,this._componentFocusEvent=i,this._componentDragStartEvent=n,this._dropdownActiveChangedEvent=o,this._tabs=[],this._lastVisibleTabIndex=-1,this._dropdownActive=!1,this._element=document.createElement(\"section\"),this._element.classList.add(\"lm_tabs\"),this._dropdownElement=document.createElement(\"section\"),this._dropdownElement.classList.add(\"lm_tabdropdown_list\"),this._dropdownElement.style.display=\"none\"}get tabs(){return this._tabs}get tabCount(){return this._tabs.length}get lastVisibleTabIndex(){return this._lastVisibleTabIndex}get element(){return this._element}get dropdownElement(){return this._dropdownElement}get dropdownActive(){return this._dropdownActive}destroy(){for(let t=0;tthis.handleTabCloseEvent(t)),(t=>this.handleTabFocusEvent(t)),((t,e,i,n)=>this.handleTabDragStartEvent(t,e,i,n)));void 0===e&&(e=this._tabs.length),this._tabs.splice(e,0,i),ethis._lastVisibleTabIndex){const t=this._tabs[e];for(let t=e;t>0;t--)this._tabs[t]=this._tabs[t-1];this._tabs[0]=t}}updateTabSizes(t,e){let i=!1;this.tryUpdateTabSizes(i,t,e)||(i=!0,this.tryUpdateTabSizes(i,t,e)),i!==this._dropdownActive&&(this._dropdownActive=i,this._dropdownActiveChangedEvent())}tryUpdateTabSizes(t,e,i){if(this._tabs.length>0){if(void 0===i)throw new Error(\"non-empty tabs must have active component item\");let n=0,o=!1;const s=this._layoutManager.layoutConfig.settings.tabOverlapAllowance,r=this._tabs.indexOf(i.tab),a=this._tabs[r];this._lastVisibleTabIndex=-1;for(let i=0;ie){if(o)i===r&&(l.style.zIndex=\"auto\",l.style.marginLeft=\"\",l.parentElement!==this._element&&this._element.appendChild(l));else{let t;if(t=r>0&&r<=i?(d-e)/(i-1):(d-e)/i,tthis.onClick(t),this._touchStartListener=t=>this.onTouchStart(t),this._rowColumnClosable=!0,this._closeButton=null,this._popoutButton=null,this._tabsContainer=new Qt(this._layoutManager,(t=>this.handleTabInitiatedComponentRemoveEvent(t)),(t=>this.handleTabInitiatedComponentFocusEvent(t)),((t,e,i,n)=>this.handleTabInitiatedDragStartEvent(t,e,i,n)),(()=>this.processTabDropdownActiveChanged())),this._show=i.show,this._popoutEnabled=i.popoutEnabled,this._popoutLabel=i.popoutLabel,this._maximiseEnabled=i.maximiseEnabled,this._maximiseLabel=i.maximiseLabel,this._minimiseEnabled=i.minimiseEnabled,this._minimiseLabel=i.minimiseLabel,this._closeEnabled=i.closeEnabled,this._closeLabel=i.closeLabel,this._tabDropdownEnabled=i.tabDropdownEnabled,this._tabDropdownLabel=i.tabDropdownLabel,this.setSide(i.side),this._canRemoveComponent=this._configClosable,this._element=document.createElement(\"section\"),this._element.classList.add(\"lm_header\"),this._controlsContainerElement=document.createElement(\"section\"),this._controlsContainerElement.classList.add(\"lm_controls\"),this._element.appendChild(this._tabsContainer.element),this._element.appendChild(this._controlsContainerElement),this._element.appendChild(this._tabsContainer.dropdownElement),this._element.addEventListener(\"click\",this._clickListener,{passive:!0}),this._element.addEventListener(\"touchstart\",this._touchStartListener,{passive:!0}),this._documentMouseUpListener=()=>this._tabsContainer.hideAdditionalTabsDropdown(),globalThis.document.addEventListener(\"mouseup\",this._documentMouseUpListener,{passive:!0}),this._tabControlOffset=this._layoutManager.layoutConfig.settings.tabControlOffset,this._tabDropdownEnabled&&(this._tabDropdownButton=new Kt(this,this._tabDropdownLabel,\"lm_tabdropdown\",(()=>this._tabsContainer.showAdditionalTabsDropdown()))),this._popoutEnabled&&(this._popoutButton=new Kt(this,this._popoutLabel,\"lm_popout\",(()=>this.handleButtonPopoutEvent()))),this._maximiseEnabled&&(this._maximiseButton=new Kt(this,this._maximiseLabel,\"lm_maximise\",(t=>this.handleButtonMaximiseToggleEvent(t)))),this._configClosable&&(this._closeButton=new Kt(this,this._closeLabel,\"lm_close\",(()=>s()))),this.processTabDropdownActiveChanged()}get show(){return this._show}get side(){return this._side}get leftRightSided(){return this._leftRightSided}get layoutManager(){return this._layoutManager}get parent(){return this._parent}get tabs(){return this._tabsContainer.tabs}get lastVisibleTabIndex(){return this._tabsContainer.lastVisibleTabIndex}get element(){return this._element}get tabsContainerElement(){return this._tabsContainer.element}get controlsContainerElement(){return this._controlsContainerElement}destroy(){this.emit(\"destroy\"),this._popoutEvent=void 0,this._maximiseToggleEvent=void 0,this._clickEvent=void 0,this._touchStartEvent=void 0,this._componentRemoveEvent=void 0,this._componentFocusEvent=void 0,this._componentDragStartEvent=void 0,this._tabsContainer.destroy(),globalThis.document.removeEventListener(\"mouseup\",this._documentMouseUpListener),this._element.remove()}createTab(t,e){this._tabsContainer.createTab(t,e)}removeTab(t){this._tabsContainer.removeTab(t)}processActiveComponentChanged(t){this._tabsContainer.processActiveComponentChanged(t),this.updateTabSizes()}setSide(t){this._side=t,this._leftRightSided=[nt.right,nt.left].includes(this._side)}setRowColumnClosable(t){this._rowColumnClosable=t,this.updateClosability()}updateClosability(){let t;if(this._configClosable)if(this._rowColumnClosable){t=!0;const e=this.tabs.length;for(let i=0;i1}applyFocusedValue(t){t?this._element.classList.add(\"lm_focused\"):this._element.classList.remove(\"lm_focused\")}processMaximised(){if(void 0===this._maximiseButton)throw new J(\"HPMAX16997\");this._maximiseButton.element.setAttribute(\"title\",this._minimiseLabel)}processMinimised(){if(void 0===this._maximiseButton)throw new J(\"HPMIN16997\");this._maximiseButton.element.setAttribute(\"title\",this._maximiseLabel)}updateTabSizes(){if(this._tabsContainer.tabCount>0){const t=this._show?this._layoutManager.layoutConfig.dimensions.headerHeight:0;let e;this._leftRightSided?(this._element.style.height=\"\",this._element.style.width=zt(t)):(this._element.style.width=\"\",this._element.style.height=zt(t)),e=this._leftRightSided?this._element.offsetHeight-this._controlsContainerElement.offsetHeight-this._tabControlOffset:this._element.offsetWidth-this._controlsContainerElement.offsetWidth-this._tabControlOffset,this._tabsContainer.updateTabSizes(e,this._getActiveComponentItemEvent())}}handleTabInitiatedComponentRemoveEvent(t){if(this._canRemoveComponent){if(void 0===this._componentRemoveEvent)throw new J(\"HHTCE22294\");this._componentRemoveEvent(t)}}handleTabInitiatedComponentFocusEvent(t){if(void 0===this._componentFocusEvent)throw new J(\"HHTAE22294\");this._componentFocusEvent(t)}handleTabInitiatedDragStartEvent(t,e,i,n){if(this._canRemoveComponent){if(void 0===this._componentDragStartEvent)throw new J(\"HHTDSE22294\");this._componentDragStartEvent(t,e,i,n)}else i.cancelDrag()}processTabDropdownActiveChanged(){void 0!==this._tabDropdownButton&&Dt(this._tabDropdownButton.element,this._tabsContainer.dropdownActive)}handleButtonPopoutEvent(){if(this._layoutManager.layoutConfig.settings.popoutWholeStack){if(void 0===this._popoutEvent)throw new J(\"HHBPOE17834\");this._popoutEvent()}else{const t=this._getActiveComponentItemEvent();t&&t.popout()}}handleButtonMaximiseToggleEvent(t){if(void 0===this._maximiseToggleEvent)throw new J(\"HHBMTE16834\");this._maximiseToggleEvent()}onClick(t){t.target===this._element&&this.notifyClick(t)}onTouchStart(t){t.target===this._element&&this.notifyTouchStart(t)}notifyClick(t){if(void 0===this._clickEvent)throw new J(\"HNHC46834\");this._clickEvent(t)}notifyTouchStart(t){if(void 0===this._touchStartEvent)throw new J(\"HNHTS46834\");this._touchStartEvent(t)}}class ee extends $t{constructor(t,e,i){var n,o,s,r,a,l,h,d,c,m,u,p,g,f,v,_,y,C,w;super(t,e,i,ee.createElement(document)),this._headerSideChanged=!1,this._resizeListener=()=>this.handleResize(),this._maximisedListener=()=>this.handleMaximised(),this._minimisedListener=()=>this.handleMinimised(),this._headerConfig=e.header;const I=t.layoutConfig.header,b=e.content;let S;if(1!==b.length)S=void 0;else{S=b[0].header}this._initialWantMaximise=e.maximised,this._initialActiveItemIndex=null!==(n=e.activeItemIndex)&&void 0!==n?n:0;const E=null!==(r=null!==(s=null===(o=this._headerConfig)||void 0===o?void 0:o.show)&&void 0!==s?s:null==S?void 0:S.show)&&void 0!==r?r:I.show,x=null!==(h=null!==(l=null===(a=this._headerConfig)||void 0===a?void 0:a.popout)&&void 0!==l?l:null==S?void 0:S.popout)&&void 0!==h?h:I.popout,L=null!==(m=null!==(c=null===(d=this._headerConfig)||void 0===d?void 0:d.maximise)&&void 0!==c?c:null==S?void 0:S.maximise)&&void 0!==m?m:I.maximise,z=null!==(g=null!==(p=null===(u=this._headerConfig)||void 0===u?void 0:u.close)&&void 0!==p?p:null==S?void 0:S.close)&&void 0!==g?g:I.close,M=null!==(_=null!==(v=null===(f=this._headerConfig)||void 0===f?void 0:f.minimise)&&void 0!==v?v:null==S?void 0:S.minimise)&&void 0!==_?_:I.minimise,P=null!==(w=null!==(C=null===(y=this._headerConfig)||void 0===y?void 0:y.tabDropdown)&&void 0!==C?C:null==S?void 0:S.tabDropdown)&&void 0!==w?w:I.tabDropdown;this._maximisedEnabled=!1!==L;const T={show:!1!==E,side:!1===E?nt.top:E,popoutEnabled:!1!==x,popoutLabel:!1===x?\"\":x,maximiseEnabled:this._maximisedEnabled,maximiseLabel:!1===L?\"\":L,closeEnabled:!1!==z,closeLabel:!1===z?\"\":z,minimiseEnabled:!0,minimiseLabel:M,tabDropdownEnabled:!1!==P,tabDropdownLabel:!1===P?\"\":P};this._header=new te(t,this,T,e.isClosable&&!1!==z,(()=>this.getActiveComponentItem()),(()=>this.remove()),(()=>this.handlePopoutEvent()),(()=>this.toggleMaximise()),(t=>this.handleHeaderClickEvent(t)),(t=>this.handleHeaderTouchStartEvent(t)),(t=>this.handleHeaderComponentRemoveEvent(t)),(t=>this.handleHeaderComponentFocusEvent(t)),((t,e,i,n)=>this.handleHeaderComponentStartDragEvent(t,e,i,n))),this.isStack=!0,this._childElementContainer=document.createElement(\"section\"),this._childElementContainer.classList.add(\"lm_items\"),this.on(\"resize\",this._resizeListener),this._maximisedEnabled&&(this.on(\"maximised\",this._maximisedListener),this.on(\"minimised\",this._minimisedListener)),this.element.appendChild(this._header.element),this.element.appendChild(this._childElementContainer),this.setupHeaderPosition(),this._header.updateClosability()}get childElementContainer(){return this._childElementContainer}get header(){return this._header}get headerShow(){return this._header.show}get headerSide(){return this._header.side}get headerLeftRightSided(){return this._header.leftRightSided}get contentAreaDimensions(){return this._contentAreaDimensions}get initialWantMaximise(){return this._initialWantMaximise}get isMaximised(){return this===this.layoutManager.maximisedStack}get stackParent(){if(!this.parent)throw new Error(\"Stack should always have a parent\");return this.parent}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}init(){if(!0===this.isInitialised)return;this.updateNodeSize();for(let t=0;t0){if(this._initialActiveItemIndex<0||this._initialActiveItemIndex>=e)throw new Error(`ActiveItemIndex out of range: ${this._initialActiveItemIndex} id: ${this.id}`);for(let i=0;ithis.contentItems.length)throw e-=1,new X(\"SAC99728\");if(t instanceof jt)return e=super.addChild(t,e),this._childElementContainer.appendChild(t.element),this._header.createTab(t,e),this.setActiveComponentItem(t,i),this._header.updateTabSizes(),this.updateSize(!1),t.container.setBaseLogicalZIndex(),this._header.updateClosability(),this.emitStateChangedEvent(),e;throw new X(\"SACC88532\")}removeChild(t,e){const i=t,n=this.contentItems.indexOf(i),o=1===this.contentItems.length;if(this._activeComponentItem===i&&(i.focused&&i.blur(),!o)){const t=0===n?1:n-1;this.setActiveComponentItem(this.contentItems[t],!1)}this._header.removeTab(i),super.removeChild(i,e),o||this._header.updateClosability(),this.emitStateChangedEvent()}toggleMaximise(){this.isMaximised?this.minimise():this.maximise()}maximise(){if(!this.isMaximised){this.layoutManager.setMaximisedStack(this);const t=this.contentItems,e=t.length;for(let i=0;i0&&void 0===t)throw new Error(\"expected non-empty stack to have an active component item\");return{type:\"stack\",content:this.calculateConfigContent(),size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,isClosable:this.isClosable,maximised:this.isMaximised,header:this.createHeaderConfig(),activeItemIndex:t}}onDrop(t,e){if(\"header\"===this._dropSegment){if(this.resetHeaderDropZone(),void 0===this._dropIndex)throw new J(\"SODDI68990\");return void this.addChild(t,this._dropIndex)}if(\"body\"===this._dropSegment)return void this.addChild(t,0,!0);const i=\"top\"===this._dropSegment||\"bottom\"===this._dropSegment,n=\"left\"===this._dropSegment||\"right\"===this._dropSegment,o=\"top\"===this._dropSegment||\"left\"===this._dropSegment,s=i&&this.stackParent.isColumn||n&&this.stackParent.isRow;if(t.isComponent){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createAndInitContentItem(e,this);i.addChild(t),t=i}if(t.type===at.row||t.type===at.column){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}if(s){const e=this.stackParent.contentItems.indexOf(this);this.stackParent.addChild(t,o?e:e+1,!0),this.size*=.5,t.size=this.size,t.sizeUnit=this.sizeUnit,this.stackParent.updateSize(!1)}else{const e=i?at.column:at.row,n=ct.createDefault(e),s=this.layoutManager.createContentItem(n,this);this.stackParent.replaceChild(this,s),s.addChild(t,o?0:void 0,!0),s.addChild(this,o?void 0:0,!0),this.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}highlightDropZone(t,e){for(const i in this._contentAreaDimensions){const n=i,o=this._contentAreaDimensions[n].hoverArea;if(o.x1t&&o.y1e)return void(\"header\"===n?(this._dropSegment=\"header\",this.highlightHeaderDropZone(this._header.leftRightSided?e:t)):(this.resetHeaderDropZone(),this.highlightBodyDropZone(n)))}}getArea(){if(\"none\"===this.element.style.display)return null;const t=super.getElementArea(this._header.element),e=super.getElementArea(this._childElementContainer);if(null===t||null===e)throw new K(\"SGAHC13086\");const i=e.x2-e.x1,n=e.y2-e.y1;return this._contentAreaDimensions={header:{hoverArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2},highlightArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2}}},0===this.contentItems.length?(this._contentAreaDimensions.body={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2}},super.getElementArea(this.element)):(this._contentAreaDimensions.left={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x1+.25*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x1+.5*i,y2:e.y2}},this._contentAreaDimensions.top={hoverArea:{x1:e.x1+.25*i,y1:e.y1,x2:e.x1+.75*i,y2:e.y1+.5*n},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y1+.5*n}},this._contentAreaDimensions.right={hoverArea:{x1:e.x1+.75*i,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1+.5*i,y1:e.y1,x2:e.x2,y2:e.y2}},this._contentAreaDimensions.bottom={hoverArea:{x1:e.x1+.25*i,y1:e.y1+.5*n,x2:e.x1+.75*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1+.5*n,x2:e.x2,y2:e.y2}},super.getElementArea(this.element))}positionHeader(t){this._header.side!==t&&(this._header.setSide(t),this._headerSideChanged=!0,this.setupHeaderPosition())}updateNodeSize(){if(\"none\"!==this.element.style.display){const t=kt(this.element);if(this._header.show){t[this._header.leftRightSided?it.width:it.height]-=this.layoutManager.layoutConfig.dimensions.headerHeight}this._childElementContainer.style.width=zt(t.width),this._childElementContainer.style.height=zt(t.height);for(let e=0;e=o&&tthis.onDrag(t,e,i))),this._dragListener.on(\"dragStop\",(()=>this.onDrop())),this.createDragProxyElements(t,e),null===this._componentItem.parent)throw new K(\"DPC10097\");this._componentItemFocused=this._componentItem.focused,this._componentItemFocused&&this._componentItem.blur(),this._componentItem.parent.removeChild(this._componentItem,!0),this.setDimensions(),document.body.appendChild(this._element),this.determineMinMaxXY(),this._layoutManager.calculateItemAreas(),this.setDropPosition(t,e)}get element(){return this._element}createDragProxyElements(t,e){this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_dragProxy\");const i=document.createElement(\"div\");i.classList.add(\"lm_header\");const n=document.createElement(\"div\");n.classList.add(\"lm_tabs\");const o=document.createElement(\"div\");o.classList.add(\"lm_tab\");const s=document.createElement(\"span\");s.classList.add(\"lm_title\"),o.appendChild(s),n.appendChild(o),i.appendChild(n),this._proxyContainerElement=document.createElement(\"div\"),this._proxyContainerElement.classList.add(\"lm_content\"),this._element.appendChild(i),this._element.appendChild(this._proxyContainerElement),this._originalParent instanceof ee&&this._originalParent.headerShow&&(this._sided=this._originalParent.headerLeftRightSided,this._element.classList.add(\"lm_\"+this._originalParent.headerSide),[nt.right,nt.bottom].indexOf(this._originalParent.headerSide)>=0&&this._proxyContainerElement.insertAdjacentElement(\"afterend\",i)),this._element.style.left=zt(t),this._element.style.top=zt(e),o.setAttribute(\"title\",this._componentItem.title),s.insertAdjacentText(\"afterbegin\",this._componentItem.title),this._proxyContainerElement.appendChild(this._componentItem.element)}determineMinMaxXY(){const t=this._layoutManager.groundItem;if(void 0===t)throw new J(\"DPDMMXY73109\");{const e=t.element.getBoundingClientRect();this._minX=e.left+document.body.scrollLeft,this._minY=e.top+document.body.scrollTop,this._maxX=this._minX+e.width,this._maxY=this._minY+e.height}}onDrag(t,e,i){const n=i.pageX,o=i.pageY;this.setDropPosition(n,o),this._componentItem.drag()}setDropPosition(t,e){this._layoutManager.layoutConfig.settings.constrainDragToContainer&&(t<=this._minX?t=Math.ceil(this._minX):t>=this._maxX&&(t=Math.floor(this._maxX)),e<=this._minY?e=Math.ceil(this._minY):e>=this._maxY&&(e=Math.floor(this._maxY))),this._element.style.left=zt(t),this._element.style.top=zt(e),this._area=this._layoutManager.getArea(t,e),null!==this._area&&(this._lastValidArea=this._area,this._area.contentItem.highlightDropZone(t,e,this._area))}onDrop(){const t=this._layoutManager.dropTargetIndicator;if(null===t)throw new K(\"DPOD30011\");let e;if(t.hide(),this._componentItem.exitDragMode(),null!==this._area)e=this._componentItem,this._area.contentItem.onDrop(e,this._area);else if(null!==this._lastValidArea){e=this._componentItem;this._lastValidArea.contentItem.onDrop(e,this._lastValidArea)}else this._originalParent?(e=this._componentItem,this._originalParent.addChild(e)):this._componentItem.destroy();this._element.remove(),this._layoutManager.emit(\"itemDropped\",this._componentItem),this._componentItemFocused&&void 0!==e&&e.focus()}setDimensions(){const t=this._layoutManager.layoutConfig.dimensions;if(void 0===t)throw new Error(\"DragProxy.setDimensions: dimensions undefined\");let e=t.dragProxyWidth,i=t.dragProxyHeight;if(void 0===e||void 0===i)throw new Error(\"DragProxy.setDimensions: width and/or height undefined\");const n=!1===this._layoutManager.layoutConfig.header.show?0:t.headerHeight;this._element.style.width=zt(e),this._element.style.height=zt(i),e-=this._sided?n:0,i-=this._sided?0:n,this._proxyContainerElement.style.width=zt(e),this._proxyContainerElement.style.height=zt(i),this._componentItem.enterDragMode(e,i),this._componentItem.show()}}class ne{constructor(t,e,i,n,o,s,r){this._layoutManager=t,this._element=e,this._extraAllowableChildTargets=i,this._componentTypeOrFtn=n,this._componentState=o,this._title=s,this._id=r,this._dragListener=null,this._dummyGroundContainer=document.createElement(\"div\");const a=gt.createDefault(\"row\");this._dummyGroundContentItem=new Yt(this._layoutManager,a,this._dummyGroundContainer),this.createDragListener()}destroy(){this.removeDragListener()}createDragListener(){this.removeDragListener(),this._dragListener=new Zt(this._element,this._extraAllowableChildTargets),this._dragListener.on(\"dragStart\",((t,e)=>this.onDragStart(t,e))),this._dragListener.on(\"dragStop\",(()=>this.onDragStop()))}onDragStart(t,e){var i;const n=\"component\";let o;if(\"function\"==typeof this._componentTypeOrFtn){const t=this._componentTypeOrFtn();o=ne.isDragSourceComponentItemConfig(t)?{type:n,componentState:t.state,componentType:t.type,title:null!==(i=t.title)&&void 0!==i?i:this._title}:t}else o={type:n,componentState:this._componentState,componentType:this._componentTypeOrFtn,title:this._title,id:this._id};const s=bt.resolve(o,!1),r=new jt(this._layoutManager,s,this._dummyGroundContentItem);if(this._dummyGroundContentItem.contentItems.push(r),null===this._dragListener)throw new K(\"DSODSD66746\");{const i=new ie(t,e,this._dragListener,this._layoutManager,r,this._dummyGroundContentItem),n=this._layoutManager.transitionIndicator;if(null===n)throw new K(\"DSODST66746\");n.transitionElements(this._element,i.element)}}onDragStop(){this.createDragListener()}removeDragListener(){null!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=null)}}!function(t){t.isDragSourceComponentItemConfig=function(t){return!(\"componentType\"in t)}}(ne||(ne={}));class oe{constructor(){this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_dropTargetIndicator\");const t=document.createElement(\"div\");t.classList.add(\"lm_inner\"),this._element.appendChild(t),document.body.appendChild(this._element)}destroy(){this._element.remove()}highlightArea(t,e){this._element.style.left=zt(t.x1+e),this._element.style.top=zt(t.y1+e),this._element.style.width=zt(t.x2-t.x1-e),this._element.style.height=zt(t.y2-t.y1-e),this._element.style.display=\"block\"}hide(){Dt(this._element,!1)}}class se{constructor(){this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_transition_indicator\"),document.body.appendChild(this._element),this._toElement=null,this._fromDimensions=null,this._totalAnimationDuration=200,this._animationStartTime=null}destroy(){this._element.remove()}transitionElements(t,e){}nextAnimationFrame(){}measure(t){const e=t.getBoundingClientRect();return{left:e.left,top:e.top,width:t.offsetWidth,height:t.offsetHeight}}}class re extends Wt{constructor(t){super(),this._layoutManager=t,this._childEventListener=t=>this.onEventFromChild(t),globalThis.addEventListener(re.ChildEventName,this._childEventListener,{passive:!0})}emit(t,...e){\"userBroadcast\"===t?this.emitUserBroadcast(...e):super.emit(t,...e)}emitUserBroadcast(...t){this.handleUserBroadcastEvent(\"userBroadcast\",t)}destroy(){globalThis.removeEventListener(re.ChildEventName,this._childEventListener)}handleUserBroadcastEvent(t,e){this._layoutManager.isSubWindow?this.propagateToParent(t,e):this.propagateToThisAndSubtree(t,e)}onEventFromChild(t){const e=t.detail;this.handleUserBroadcastEvent(e.eventName,e.args)}propagateToParent(t,e){const i={bubbles:!0,cancelable:!0,detail:{layoutManager:this._layoutManager,eventName:t,args:e}},n=new CustomEvent(re.ChildEventName,i),o=globalThis.opener;if(null===o)throw new K(\"EHPTP15778\");o.dispatchEvent(n)}propagateToThisAndSubtree(t,e){this.emitUnknown(t,...e);for(let i=0;ithis.handleContainerResize())),this._windowBeforeUnloadListener=()=>this.onBeforeUnload(),this._windowBeforeUnloadListening=!1,this._maximisedStackBeforeDestroyedListener=t=>this.cleanupBeforeMaximisedStackDestroyed(t),this.isSubWindow=t.isSubWindow,this._constructorOrSubWindowLayoutConfig=t.constructorOrSubWindowLayoutConfig,Q.checkInitialise(),dt.checkInitialise(),void 0!==t.containerElement&&(this._containerElement=t.containerElement)}get container(){return this._containerElement}get isInitialised(){return this._isInitialised}get groundItem(){return this._groundItem}get root(){return this._groundItem}get openPopouts(){return this._openPopouts}get dropTargetIndicator(){return this._dropTargetIndicator}get transitionIndicator(){return this._transitionIndicator}get width(){return this._width}get height(){return this._height}get eventHub(){return this._eventHub}get rootItem(){if(void 0===this._groundItem)throw new Error(\"Cannot access rootItem before init\");return 0===this._groundItem.contentItems.length?void 0:this._groundItem.contentItems[0]}get focusedComponentItem(){return this._focusedComponentItem}get tabDropPlaceholder(){return this._tabDropPlaceholder}get maximisedStack(){return this._maximisedStack}get deprecatedConstructor(){return!this.isSubWindow&&void 0!==this._constructorOrSubWindowLayoutConfig}destroy(){if(this._isInitialised){this._windowBeforeUnloadListening&&(globalThis.removeEventListener(\"beforeunload\",this._windowBeforeUnloadListener),this._windowBeforeUnloadListening=!1),!0===this.layoutConfig.settings.closePopoutsOnUnload&&this.closeAllOpenPopouts(),this._resizeObserver.disconnect(),this.checkClearResizeTimeout(),void 0!==this._groundItem&&this._groundItem.destroy(),this._tabDropPlaceholder.remove(),null!==this._dropTargetIndicator&&this._dropTargetIndicator.destroy(),null!==this._transitionIndicator&&this._transitionIndicator.destroy(),this._eventHub.destroy();for(const t of this._dragSources)t.destroy();this._dragSources=[],this._isInitialised=!1}}minifyConfig(t){return _t.minifyConfig(t)}unminifyConfig(t){return _t.unminifyConfig(t)}init(){let t;if(this.setContainer(),this._dropTargetIndicator=new oe,this._transitionIndicator=new se,this.updateSizeFromContainer(),this.isSubWindow){if(void 0===this._constructorOrSubWindowLayoutConfig)throw new J(\"LMIU07155\");{const e=this._constructorOrSubWindowLayoutConfig.root;if(void 0===e)throw new X(\"LMIC07156\");if(!Ct.isComponent(e))throw new X(\"LMIC07157\");t=e;const i=xt.resolve(this._constructorOrSubWindowLayoutConfig);this.layoutConfig=Object.assign(Object.assign({},i),{root:void 0})}}else void 0===this._constructorOrSubWindowLayoutConfig?this.layoutConfig=_t.createDefault():this.layoutConfig=xt.resolve(this._constructorOrSubWindowLayoutConfig);const e=this.layoutConfig;this._groundItem=new Yt(this,e.root,this._containerElement),this._groundItem.init(),this.checkLoadedLayoutMaximiseItem(),this._resizeObserver.observe(this._containerElement),this._isInitialised=!0,this.adjustColumnsResponsive(),this.emit(\"initialised\"),void 0!==t&&this.loadComponentAsRoot(t)}loadLayout(t){if(!this.isInitialised)throw new Error(\"GoldenLayout: Need to call init() if LayoutConfig with defined root passed to constructor\");if(void 0===this._groundItem)throw new J(\"LMLL11119\");this.createSubWindows(),this.layoutConfig=xt.resolve(t),this._groundItem.loadRoot(this.layoutConfig.root),this.checkLoadedLayoutMaximiseItem(),this.adjustColumnsResponsive()}saveLayout(){if(!1===this._isInitialised)throw new Error(\"Can't create config, layout not yet initialised\");if(void 0===this._groundItem)throw new J(\"LMTC18244\");{const t=this._groundItem.calculateConfigContent();let e;e=1!==t.length?void 0:t[0],this.reconcilePopoutWindows();const i=[];for(let t=0;t=0?n=this._groundItem.contentItems[0]:e=0;break;case at.row:case at.column:e=n.addItem(t,i.index);break;case at.stack:if(Ct.isComponent(t)){e=n.addItem(t,i.index);break}throw Error(tt[6]);case at.component:throw new X(\"LMAIALC87444602\");default:throw new Y(\"LMAIALU98881733\",n.type)}if(Ct.isComponent(t)){const t=n.contentItems[e];Gt.isStack(t)&&(n=t,e=0)}return i.parentItem=n,i.index=e,i}}}loadComponentAsRoot(t){if(void 0===this._groundItem)throw new Error(\"Cannot add item before init\");this._groundItem.loadComponentAsRoot(t)}updateSize(t,e){this.setSize(t,e)}setSize(t,e){if(this._width=t,this._height=e,!0===this._isInitialised){if(void 0===this._groundItem)throw new J(\"LMUS18881\");if(this._groundItem.setSize(this._width,this._height),this._maximisedStack){const{width:t,height:e}=kt(this._containerElement);Tt(this._maximisedStack.element,t),At(this._maximisedStack.element,e),this._maximisedStack.updateSize(!1)}this.adjustColumnsResponsive()}}beginSizeInvalidation(){this._sizeInvalidationBeginCount++}endSizeInvalidation(){0==--this._sizeInvalidationBeginCount&&this.updateSizeFromContainer()}updateSizeFromContainer(){const{width:t,height:e}=kt(this._containerElement);this.setSize(t,e)}updateRootSize(t=!1){if(void 0===this._groundItem)throw new J(\"LMURS28881\");this._groundItem.updateSize(t)}createAndInitContentItem(t,e){const i=this.createContentItem(t,e);return i.init(),i}createContentItem(t,e){if(\"string\"!=typeof t.type)throw new G(\"Missing parameter 'type'\",JSON.stringify(t));if(ct.isComponentItem(t)&&!(e instanceof ee)&&e&&!(!0===this.isSubWindow&&e instanceof Yt)){t={type:at.stack,content:[t],size:t.size,sizeUnit:t.sizeUnit,minSize:t.minSize,minSizeUnit:t.minSizeUnit,id:t.id,maximised:t.maximised,isClosable:t.isClosable,activeItemIndex:0,header:void 0}}return this.createContentItemFromConfig(t,e)}findFirstComponentItemById(t){if(void 0===this._groundItem)throw new J(\"LMFFCIBI82446\");return this.findFirstContentItemTypeByIdRecursive(at.component,t,this._groundItem)}createPopout(t,e,i,n){return t instanceof Gt?this.createPopoutFromContentItem(t,e,i,n):this.createPopoutFromItemConfig(t,e,i,n)}createPopoutFromContentItem(t,e,i,n){let o=t.parent,s=t;for(;null!==o&&1===o.contentItems.length&&!o.isGround;)s=o,o=o.parent;if(null===o)throw new K(\"LMCPFCI00834\");{if(void 0===n&&(n=o.contentItems.indexOf(s)),null!==i&&o.addPopInParentId(i),void 0===e){const i=globalThis.screenX||globalThis.screenLeft,n=globalThis.screenY||globalThis.screenTop,o=t.element.offsetLeft,s=t.element.offsetTop,{width:r,height:a}=kt(t.element);e={left:i+o,top:n+s,width:r,height:a}}const r=t.toConfig();if(t.remove(),ft.isRootItemConfig(r))return this.createPopoutFromItemConfig(r,e,i,n);throw new Error(`${tt[0]}`)}}beginVirtualSizedContainerAdding(){0==++this._virtualSizedContainerAddingBeginCount&&(this._virtualSizedContainers.length=0)}addVirtualSizedContainer(t){this._virtualSizedContainers.push(t)}endVirtualSizedContainerAdding(){if(0==--this._virtualSizedContainerAddingBeginCount){const t=this._virtualSizedContainers.length;if(t>0){this.fireBeforeVirtualRectingEvent(t);for(let e=0;ethis.emit(\"windowOpened\",a))),a.on(\"closed\",(()=>this.reconcilePopoutWindows())),this._openPopouts.push(a),this.layoutConfig.settings.closePopoutsOnUnload&&!this._windowBeforeUnloadListening&&(globalThis.addEventListener(\"beforeunload\",this._windowBeforeUnloadListener,{passive:!0}),this._windowBeforeUnloadListening=!0),a}closeAllOpenPopouts(){for(let t=0;tglobalThis.close()),1)}getArea(t,e){let i=null,n=1/0;for(let o=0;o=s.x1&&t=s.y1&&es.surface&&(n=s.surface,i=s)}return i}calculateItemAreas(){const t=this.getAllContentItems(),e=this._groundItem;if(void 0===e)throw new J(\"LMCIAR44365\");if(1!==t.length){e.contentItems[0].isStack?this._itemAreas=[]:this._itemAreas=e.createSideAreas();for(let e=0;e0){let e=t[0];if(Gt.isComponentItem(e)){const t=e.parent;if(null===t)throw new K(\"LMXLLMI69999\");e=t}if(!Gt.isStack(e))throw new X(\"LMCLLMI19993\");e.maximise()}}}processMaximiseStack(t){if(this._maximisedStack=t,t.on(\"beforeItemDestroyed\",this._maximisedStackBeforeDestroyedListener),t.element.classList.add(\"lm_maximised\"),t.element.insertAdjacentElement(\"afterend\",this._maximisePlaceholder),void 0===this._groundItem)throw new J(\"LMMXI19993\");{this._groundItem.element.prepend(t.element);const{width:e,height:i}=kt(this._containerElement);Tt(t.element,e),At(t.element,i),t.updateSize(!0),t.focusActiveContentItem(),this._maximisedStack.emit(\"maximised\"),this.emit(\"stateChanged\")}}processMinimiseMaximisedStack(){if(void 0===this._maximisedStack)throw new X(\"LMMMS74422\");{const t=this._maximisedStack;if(null===t.parent)throw new K(\"LMMI13668\");t.element.classList.remove(\"lm_maximised\"),this._maximisePlaceholder.insertAdjacentElement(\"afterend\",t.element),this._maximisePlaceholder.remove(),this.updateRootSize(!0),this._maximisedStack=void 0,t.off(\"beforeItemDestroyed\",this._maximisedStackBeforeDestroyedListener),t.emit(\"minimised\"),this.emit(\"stateChanged\")}}reconcilePopoutWindows(){const t=[];for(let e=0;e{this._resizeTimeoutId=void 0,this.beginSizeInvalidation(),this.endSizeInvalidation()}),this.resizeDebounceInterval))}checkClearResizeTimeout(){void 0!==this._resizeTimeoutId&&(clearTimeout(this._resizeTimeoutId),this._resizeTimeoutId=void 0)}setContainer(){var t;const e=document.body,i=null!==(t=this._containerElement)&&void 0!==t?t:e;if(i===e){this.resizeWithContainerAutomatically=!0;const t=document.documentElement;t.style.height=\"100%\",t.style.margin=\"0\",t.style.padding=\"0\",t.style.overflow=\"clip\",e.style.height=\"100%\",e.style.margin=\"0\",e.style.padding=\"0\",e.style.overflow=\"clip\"}this._containerElement=i}onBeforeUnload(){this.destroy()}adjustColumnsResponsive(){if(void 0===this._groundItem)throw new J(\"LMACR20883\");if(this._firstLoad=!1,this.useResponsiveLayout()&&!this._updatingColumnsResponsive&&this._groundItem.contentItems.length>0&&this._groundItem.contentItems[0].isRow){if(void 0===this._groundItem||null===this._width)throw new J(\"LMACR77412\");{const t=this._groundItem.contentItems[0].contentItems.length;if(t<=1)return;{const e=this.layoutConfig.dimensions.defaultMinItemWidth;if(t*e<=this._width)return;{this._updatingColumnsResponsive=!0;const i=t-Math.max(Math.floor(this._width/e),1),n=this._groundItem.contentItems[0],o=this.getAllStacks();if(0===o.length)throw new X(\"LMACRS77413\");{const t=o[0];for(let e=0;en?void 0:{parentItem:t,index:o}}}case 1:if(void 0===this._focusedComponentItem)return;{const t=this._focusedComponentItem.parentItem;return this.tryCreateLocationFromParentItem(t,e)}case 2:{const t=this.findFirstContentItemType(at.stack);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 3:{let t=this.findFirstContentItemType(at.row);return void 0!==t?this.tryCreateLocationFromParentItem(t,e):(t=this.findFirstContentItemType(at.column),void 0!==t?this.tryCreateLocationFromParentItem(t,e):void 0)}case 4:{const t=this.findFirstContentItemType(at.row);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 5:{const t=this.findFirstContentItemType(at.column);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 6:if(void 0===this._groundItem)throw new J(\"LMFLRIF18244\");return void 0!==this.rootItem?void 0:void 0===e||0===e?{parentItem:this._groundItem,index:0}:void 0;case 7:if(void 0===this._groundItem)throw new J(\"LMFLF18244\");{const t=this._groundItem.contentItems;if(0===t.length)return void 0===e||0===e?{parentItem:this._groundItem,index:0}:void 0;{const i=t[0];return this.tryCreateLocationFromParentItem(i,e)}}}}tryCreateLocationFromParentItem(t,e){const i=t.contentItems.length;return void 0===e?{parentItem:t,index:i}:e<0||e>i?void 0:{parentItem:t,index:e}}}!function(t){t.createMaximisePlaceElement=function(t){const e=t.createElement(\"div\");return e.classList.add(\"lm_maximise_place\"),e},t.createTabDropPlaceholderElement=function(t){const e=t.createElement(\"div\");return e.classList.add(\"lm_drop_tab_placeholder\"),e},t.defaultLocationSelectors=[{typeId:1,index:void 0},{typeId:2,index:void 0},{typeId:3,index:void 0},{typeId:7,index:void 0}],t.afterFocusedItemIfPossibleLocationSelectors=[{typeId:0,index:1},{typeId:2,index:void 0},{typeId:3,index:void 0},{typeId:7,index:void 0}]}(ae||(ae={}));class le extends ae{constructor(t,e,i,n){if(super(le.createLayoutManagerConstructorParameters(t,e)),this._bindComponentEventHanlderPassedInConstructor=!1,this._creationTimeoutPassed=!1,void 0!==e&&\"function\"==typeof e&&(this.bindComponentEvent=e,this._bindComponentEventHanlderPassedInConstructor=!0,void 0!==i&&(this.unbindComponentEvent=i)),!this._bindComponentEventHanlderPassedInConstructor&&this.isSubWindow){if(void 0===this._constructorOrSubWindowLayoutConfig)throw new J(\"VLC98823\");{const t=xt.resolve(this._constructorOrSubWindowLayoutConfig);this.layoutConfig=Object.assign(Object.assign({},t),{root:void 0})}}!0!==n&&(this.deprecatedConstructor||this.init())}destroy(){this.bindComponentEvent=void 0,this.unbindComponentEvent=void 0,super.destroy()}init(){if(this._bindComponentEventHanlderPassedInConstructor||\"loading\"!==document.readyState&&null!==document.body){if(!this._bindComponentEventHanlderPassedInConstructor&&!0===this.isSubWindow&&!this._creationTimeoutPassed)return setTimeout((()=>this.init()),7),void(this._creationTimeoutPassed=!0);!0===this.isSubWindow&&(this._bindComponentEventHanlderPassedInConstructor||this.clearHtmlAndAdjustStylesForSubWindow(),window.__glInstance=this),super.init()}else document.addEventListener(\"DOMContentLoaded\",(()=>this.init()),{passive:!0})}clearHtmlAndAdjustStylesForSubWindow(){const t=document.head,e=new Array(4);e[0]=document.querySelectorAll(\"body link\"),e[1]=document.querySelectorAll(\"body style\"),e[2]=document.querySelectorAll(\"template\"),e[3]=document.querySelectorAll(\".gl_keep\");for(let i=0;ithis.emit(\"popIn\"))),document.body.appendChild(t),!0}}bindComponent(t,e){if(void 0!==this.bindComponentEvent){return this.bindComponentEvent(t,e)}if(void 0!==this.getComponentEvent)return{virtual:!1,component:this.getComponentEvent(t,e)};{const t=`${tt[2]}: ${JSON.stringify(e)}`;throw new Z(t)}}unbindComponent(t,e,i){if(void 0!==this.unbindComponentEvent)this.unbindComponentEvent(t);else if(!e&&void 0!==this.releaseComponentEvent){if(void 0===i)throw new J(\"VCUCRCU333998\");this.releaseComponentEvent(t,i)}}}!function(t){let e=!1;t.createLayoutManagerConstructorParameters=function(t,i){const n=e?null:new URL(document.location.href).searchParams.get(\"gl-window\");e=!0;const o=null!==n;let s,r;if(null!==n){const e=localStorage.getItem(n);if(null===e)throw new Error(\"Null gl-window Config\");localStorage.removeItem(n);const i=JSON.parse(e),o=_t.unminifyConfig(i);r=xt.fromResolved(o),t instanceof HTMLElement&&(s=t)}else void 0===t?r=void 0:t instanceof HTMLElement?(r=void 0,s=t):r=t,void 0===s&&i instanceof HTMLElement&&(s=i);return{constructorOrSubWindowLayoutConfig:r,isSubWindow:o,containerElement:s}}}(le||(le={}));class he extends le{constructor(t,e,i){super(t,e,i,!0),this._componentTypesMap=new Map,this._registeredComponentMap=new Map,this._virtuableComponentMap=new Map,this._containerVirtualRectingRequiredEventListener=(t,e,i)=>this.handleContainerVirtualRectingRequiredEvent(t,e,i),this._containerVirtualVisibilityChangeRequiredEventListener=(t,e)=>this.handleContainerVirtualVisibilityChangeRequiredEvent(t,e),this._containerVirtualZIndexChangeRequiredEventListener=(t,e,i)=>this.handleContainerVirtualZIndexChangeRequiredEvent(t,e,i),this.deprecatedConstructor||this.init()}registerComponent(t,e,i=!1){if(\"function\"!=typeof e)throw new $(\"registerComponent() componentConstructorOrFactoryFtn parameter is not a function\");if(e.hasOwnProperty(\"prototype\")){const n=e;this.registerComponentConstructor(t,n,i)}else{const n=e;this.registerComponentFactoryFunction(t,n,i)}}registerComponentConstructor(t,e,i=!1){if(\"function\"!=typeof e)throw new Error(tt[1]);if(void 0!==this._componentTypesMap.get(t))throw new Z(`${tt[3]}: ${t}`);this._componentTypesMap.set(t,{constructor:e,factoryFunction:void 0,virtual:i})}registerComponentFactoryFunction(t,e,i=!1){if(\"function\"!=typeof e)throw new Z(\"Please register a constructor function\");if(void 0!==this._componentTypesMap.get(t))throw new Z(`${tt[3]}: ${t}`);this._componentTypesMap.set(t,{constructor:void 0,factoryFunction:e,virtual:i})}registerComponentFunction(t){this.registerGetComponentConstructorCallback(t)}registerGetComponentConstructorCallback(t){if(\"function\"!=typeof t)throw new Error(\"Please register a callback function\");void 0!==this._getComponentConstructorFtn&&console.warn(\"Multiple component functions are being registered. Only the final registered function will be used.\"),this._getComponentConstructorFtn=t}getRegisteredComponentTypeNames(){const t=this._componentTypesMap.keys();return Array.from(t)}getComponentInstantiator(t){let e;const i=pt.resolveComponentTypeName(t);return void 0!==i&&(e=this._componentTypesMap.get(i)),void 0===e&&void 0!==this._getComponentConstructorFtn&&(e={constructor:this._getComponentConstructorFtn(t),factoryFunction:void 0,virtual:!1}),e}bindComponent(t,e){let i;const n=pt.resolveComponentTypeName(e);let o;if(void 0!==n&&(i=this._componentTypesMap.get(n)),void 0===i&&void 0!==this._getComponentConstructorFtn&&(i={constructor:this._getComponentConstructorFtn(e),factoryFunction:void 0,virtual:!1}),void 0!==i){const s=i.virtual;let r,a;r=void 0===e.componentState?void 0:Ut({},e.componentState);const l=i.constructor;if(void 0!==l)a=new l(t,r,s);else{const e=i.factoryFunction;if(void 0===e)throw new X(\"LMBCFFU10008\");a=e(t,r,s)}if(s){if(void 0===a)throw new J(\"GLBCVCU988774\");{const e=a,i=e.rootHtmlElement;if(void 0===i)throw new Z(`${tt[5]}: ${n}`);!function(t){const e=\"absolute\";t.style.position!==e&&(t.style.position=e)}(i),this.container.appendChild(i),this._virtuableComponentMap.set(t,e),t.virtualRectingRequiredEvent=this._containerVirtualRectingRequiredEventListener,t.virtualVisibilityChangeRequiredEvent=this._containerVirtualVisibilityChangeRequiredEventListener,t.virtualZIndexChangeRequiredEvent=this._containerVirtualZIndexChangeRequiredEventListener}}this._registeredComponentMap.set(t,a),o={virtual:i.virtual,component:a}}else o=super.bindComponent(t,e);return o}unbindComponent(t,e,i){if(void 0===this._registeredComponentMap.get(t))super.unbindComponent(t,e,i);else{const e=this._virtuableComponentMap.get(t);if(void 0!==e){const i=e.rootHtmlElement;if(void 0===i)throw new X(\"GLUC77743\",t.title);this.container.removeChild(i),this._virtuableComponentMap.delete(t)}}}fireBeforeVirtualRectingEvent(t){this._goldenLayoutBoundingClientRect=this.container.getBoundingClientRect(),super.fireBeforeVirtualRectingEvent(t)}handleContainerVirtualRectingRequiredEvent(t,e,i){const n=this._virtuableComponentMap.get(t);if(void 0===n)throw new J(\"GLHCSCE55933\");{const o=n.rootHtmlElement;if(void 0===o)throw new Z(tt[4]+\" \"+t.title);{const n=t.element.getBoundingClientRect(),s=n.left-this._goldenLayoutBoundingClientRect.left;o.style.left=zt(s);const r=n.top-this._goldenLayoutBoundingClientRect.top;o.style.top=zt(r),Tt(o,e),At(o,i)}}}handleContainerVirtualVisibilityChangeRequiredEvent(t,e){const i=this._virtuableComponentMap.get(t);if(void 0===i)throw new J(\"GLHCVVCRE55934\");{const n=i.rootHtmlElement;if(void 0===n)throw new Z(tt[4]+\" \"+t.title);Dt(n,e)}}handleContainerVirtualZIndexChangeRequiredEvent(t,e,i){const n=this._virtuableComponentMap.get(t);if(void 0===n)throw new J(\"GLHCVZICRE55935\");{const e=n.rootHtmlElement;if(void 0===e)throw new Z(tt[4]+\" \"+t.title);e.style.zIndex=i}}}const de=\"initial_\",ce={show:\"top\",popout:!1,maximise:!1,close:\"close-tab-unused\"},me={headerHeight:31},ue={hasHeaders:!0,reorderEnabled:!0},pe={popoutWholeStack:!1,constrainDragToContainer:!1,constrainDragToHeaders:!1,preventDragout:!1,showMaximiseIcon:!1,showPopoutIcon:!1,showCloseIcon:!1,blockedPopoutsThrowError:!0,closePopoutsOnUnload:!0,selectionEnabled:!1};var ge,fe;class ve{constructor(e){this.layout=e,ge.set(this,void 0),fe.set(this,void 0),this.handleResize=t=>{t.forEach((t=>this.resizeElement(t.target)))},this.handleMutation=()=>{this.layout.viewComponentsByContainerElement.forEach((t=>{this.resizeElement(t.container.element)}))},t.__classPrivateFieldSet(this,ge,new ResizeObserver(this.handleResize),\"f\"),t.__classPrivateFieldSet(this,fe,new MutationObserver(this.handleMutation),\"f\")}observeMutations(e){t.__classPrivateFieldGet(this,fe,\"f\")?.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[\"class\"]})}destroy(){t.__classPrivateFieldGet(this,ge,\"f\").disconnect(),t.__classPrivateFieldGet(this,fe,\"f\").disconnect()}observeContainer(e){t.__classPrivateFieldGet(this,ge,\"f\").observe(e)}unobserveContainer(e){t.__classPrivateFieldGet(this,ge,\"f\").unobserve(e)}resizeElement(t){const e=this.layout.viewComponentsByContainerElement.get(t);e&&e.resize()}}ge=new WeakMap,fe=new WeakMap;var _e={};Object.defineProperty(_e,\"__esModule\",{value:!0});var ye=_e.BaseItem=void 0;class Ce{constructor(t,e,i){this._item=t,this._layout=e,this._wrap=i}get raw(){return this._item}get layout(){return this._layout}get type(){return this._item.type}get contentItems(){return(this._item.contentItems??[]).map((t=>this._wrap(t)))}get parent(){const t=this._item.parent;return t?this._wrap(t):null}setActiveContentItem(t,e){if(\"stack\"!==this.type)throw new Error(`Cannot call setActiveContentItem from a non-stack item: ${this.type}`);this._item.setActiveContentItem(t.raw,e)}static wrapInternal(t,e,i){const n=Ce.wrapCache.get(e);if(n)return n;const o=new t(e,i,(e=>Ce.wrapInternal(t,e,i)));return Ce.wrapCache.set(e,o),o}}ye=_e.BaseItem=Ce,Ce.wrapCache=new WeakMap;const we=t=>!!t&&\"contentItems\"in t&&(t.isRow||t.isColumn);class Ie extends ye{isRoot(){return!!this._item.parent?.isGround}getBounds(){return this._item.element.getBoundingClientRect()}get viewName(){if(this._item.isComponent){const{component:t}=this._item;return t.identity.name}throw new Error(\"View name not found\")}onDestroyed(t){const e=({target:i})=>{i===this._item&&(t(),this._item.off(\"itemDestroyed\",e))};this._item.on(\"itemDestroyed\",e)}createAdjacentStack({position:t=\"right\"}={}){const e=this.raw;if(ee.isStack(e)&&e.parent){const i=[\"top\",\"bottom\"].includes(t)?\"column\":\"row\",n=[\"left\",\"top\"].includes(t)?1:0,o=we(e.parent)?e.parent:e.layoutManager,s=o,r=e.parent.contentItems.indexOf(e);e.parent.isGround&&e.parent.removeChild(e,!0);const a=o.newItem({type:i,content:[{type:\"stack\",content:[]}]},r);if(!a)throw new Error(\"createAdjacentStack: Failed to create new container\");const l=a.contentItems[0];return a.addChild(this.raw,n),we(s)&&s.removeChild(e,!0),this._wrap(l)}throw new Error(`Cannot creat adjacent stacks for type: ${e.type}, must be type 'stack'`)}setActiveContentItem(t,e=!0){if(!ee.isStack(this._item))throw new Error(`Cannot call setActiveContentItem from a non-stack item: ${this.type}`);this._item.setActiveComponentItem(t.raw,!e)}static wrap(t,e){return ye.wrapInternal(Ie,t,e)}}function be(t=[],e){for(const i of t)\"component\"===i.type?Object.keys(e).forEach((t=>{t in i&&(i.componentState={[`${de}${t}`]:i[t],...i.componentState}),i[t]=e[t]})):be(i.content,e)}function Se(t=[],e,i){for(const n of t)if(\"component\"===n.type)Object.keys(e).forEach((t=>{if(`${de}${t}`in n.componentState)return n[t]=n.componentState[`${de}${t}`],void delete n.componentState[`${de}${t}`];n[t]=e[t]}));else{if(n.size&&(\"row\"===i||\"column\"===i)){n[\"row\"===i?\"width\":\"height\"]=n.size?.includes(\".\")?parseFloat(n.size):parseInt(n.size)}Se(n.content,e,n.type)}}function Ee(t){if(t.root){t.root.content&&Se([t.root],{componentName:\"view\",isClosable:!0});const e=t.root;t.content=[e],delete t.root}return t}const xe=e=>class extends e{connectedCallback(){if(!this.name||!this.uuid)throw new Error(\" Name or uuid attribute missing\");if(!this.src)throw new Error(\" missing 'src' attribute.\");this.#t||(this.#t=document.createElement(\"iframe\"),this.#t.src=this.src,this.#t.style.height=\"100%\",this.#t.style.width=\"100%\",this.#t.style.border=\"none\",this.forceFrameName?this.#t.setAttribute(\"name\",this.forceFrameName):this.#t.setAttribute(\"name\",t.encodeOptions({brokerUrl:this.brokerUrl,name:this.name,uuid:this.uuid,providerId:this.providerId,contextGroup:this.contextGroup},\"of-frame\")),this.#t.setAttribute(\"id\",this.name),this.appendChild(this.#t))}#t;get brokerUrl(){return this.getAttribute(\"of-broker\")}set brokerUrl(t){t&&this.setAttribute(\"of-broker\",t)}get name(){return this.getAttribute(\"of-name\")}set name(t){t&&this.setAttribute(\"of-name\",t)}get forceFrameName(){return this.getAttribute(\"forceFrameName\")}set forceFrameName(t){t&&this.setAttribute(\"forceFrameName\",t)}get uuid(){return this.getAttribute(\"of-uuid\")}set uuid(t){t&&this.setAttribute(\"of-uuid\",t)}get src(){return this.getAttribute(\"src\")}set src(t){t&&this.setAttribute(\"src\",t)}get providerId(){return this.getAttribute(\"of-provider-id\")}set providerId(t){t&&this.setAttribute(\"of-provider-id\",t)}get contextGroup(){return this.getAttribute(\"of-context-group\")}set contextGroup(t){t&&this.setAttribute(\"of-context-group\",t)}static get observedAttributes(){return[\"name\"]}};class Le{static create(t){const e=document.createElement(\"of-view\");return Object.entries(t).forEach((([t,i])=>{e.setAttribute(t,i)})),e}}customElements.define(\"of-view\",xe(HTMLElement));class ze{constructor(t,i,n,{brokerUrl:o,interopConfig:s},r){this.container=t,this.config=i,this.ofView=null,this.isDragging=()=>this.container.tab.element?.className.includes(\"lm_dragging\")??!1;const{url:a,web:l,interop:h,name:d}=i||{},c=d??`internal-generated-view-${e.v4()}`;if(this.identity={uuid:n,name:c},this.container.element.setAttribute(\"of-name\",c),this.container.element.id=`container-${c}`,this.container.parent.id=c,void 0===a)return void this.handleUrlMissing();const m=this.updateTitleIfNotSet(a),u={\"of-broker\":o,\"of-uuid\":n,\"of-name\":c,src:a};l?.frameName&&(u.forceFrameName=l.frameName);const p=h?.currentContextGroup??s?.currentContextGroup;p&&(u[\"of-context-group\"]=p),s?.providerId&&(u[\"of-provider-id\"]=s?.providerId),this.ofView=Le.create(u),this.ofView.title=m??`Iframe: ${a}`,r.appendChild(this.ofView),this.ofView.style.position=\"absolute\"}updateTitleIfNotSet(t){return\"view\"===this.container.parent.title&&this.container.parent.setTitle(t),this.container.parent.title}handleUrlMissing(){const t=document.createElement(\"div\");t.setAttribute(\"style\",\"padding: 20px\");t.innerText=\"No URL provided\",this.container.element.appendChild(t)}destroy(){this.ofView?.remove(),this.ofView=null}closeView(){this.container.close()}resize(){if(this.ofView){if(this.isDragging())return void(this.ofView.style.display=\"none\");const t=this.container.element.getBoundingClientRect();this.ofView.style.position=\"absolute\",this.ofView.style.height=`${t.height}px`,this.ofView.style.width=`${t.width}px`,this.ofView.style.inset=`${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`,this.ofView.style.display=\"block\"}}}class Me extends U{static overrideConfig(t){const e={...ue,...t.settings,...pe};return e.reorderEnabled?be(t.content,{isClosable:!0}):be(t.content,{reorderEnabled:!1}),{dimensions:me,...t,settings:e,header:{...ce,show:!1!==t.settings?.hasHeaders&&ce.show}}}constructor(t,e,i,{options:n},o,s){super(),this.identity=t,this.container=e,this.initialConfig=i,this.layoutManager=o,this.platformProvider=s,this.viewComponentsByContainerElement=new Map,this.layoutContentCache=_.getSingleInstance(),this.reparentingViews=new Set,this.goldenLayoutDestroyed=!1,this.createViewComponent=(t,e)=>{m.handleSharedView(this.layoutManager,this.identity,e);const i=new ze(t,e,this.identity.uuid,this.options,this.iframeContainer);return e&&!1===e[`${de}isClosable`]&&this.stylesheet.insertRule(`#tab-${i.identity.name} .lm_close_tab { display: none; }`),this.viewComponentsByContainerElement.set(t.element,i),this.resizeController.observeContainer(t.element),i},this.iframeContainer=document.createElement(\"div\"),this.iframeContainer.id=`openfin-layout-iframe-container-${this.identity.layoutName}`,this.domEmitter=new V(e),this.setupStylesheets(),this.layout=new he(this.container),this.layout.resizeWithContainerAutomatically=!0,this.options=n,this.layout.registerComponent(\"view\",this.createViewComponent),this.setupListeners(),this.resizeController=new ve(this),this.layout.loadLayout(Me.overrideConfig(i));const r=document.createElement(\"div\");r.id=`openfin-layout-shadow-container-${this.identity.layoutName}`,r.attachShadow({mode:\"open\",delegatesFocus:!1}).appendChild(this.iframeContainer),this.container.appendChild(r),this.resizeController.observeMutations(this.container)}getStackByView({name:t}){const e=this.layout.findFirstComponentItemById(t);if(e?.parent&&e?.parent?.isStack)return Ie.wrap(e.parent,this)}getRoot(){return Ie.wrap(this.layout.rootItem,this)}async platformCloseView(t){const e=[...this.viewComponentsByContainerElement.values()].find((e=>e.identity.name===t.name));if(!e)throw new Error(`View with name: ${t.name} not found in layout.`);e.closeView()}async platformCreateView(t,{location:e,targetView:i}={}){if(i)throw new Error(\"TargetView not supported in web\");const n={options:this.platformProvider.normalizeOptions(t),target:this.identity,location:e};return this.insertView(n)}setupStylesheets(){if(this.container.setAttribute(\"data-openfin-layout-name\",this.identity.layoutName),this.stylesheet=new CSSStyleSheet,this.stylesheet.insertRule(\".lm_close { display: none; }\"),document.adoptedStyleSheets.push(this.stylesheet),this.initialConfig.settings?.preventSplitterResize){const t=`\\n [data-openfin-layout-name='${this.identity.layoutName}'] .lm_splitter {\\n pointer-events: none;\\n }`;this.stylesheet.insertRule(t)}}insertView({options:t,location:e,targetView:i}){const n=e?this.layoutContentCache.getItemOrUndefined(e.id):void 0,o=i?this.layoutContentCache.getItemOrUndefined(i.name):void 0,s=n??o??Ie.wrap(this.layout.rootItem,this);let r;if(ee.isStack(s.raw))r=s.raw;else{if(!we(s.raw))throw new Error(\"Cannot add a view at the requested location\");r=s.raw.newItem({type:\"stack\",content:[]})}const a=Math.min(r.contentItems.length,e?.index??r.contentItems.length);let l=this.layout.findFirstComponentItemById(t.name);l?(l.parent&&l.parent.removeChild(l,!0),r.addChild(l,a)):l=r.newComponent(\"view\",t,t.title??t.url??\"Default Title\",a);const h=l.component.identity;return Promise.resolve({identity:h})}replaceView({viewToReplace:t,newView:e}){throw new Error(\"Method not implemented.\")}replaceLayout(t){throw new Error(\"Method not implemented.\")}async cleanupView(t){}applyPreset(t){throw new Error(\"Method not implemented.\")}getCurrentViews(){return[...this.viewComponentsByContainerElement.values()].map((t=>t.identity))}async getFrameSnapshot(){return Ee(xt.fromResolved(this.layout.toConfig()))}isVisible(){return W(this.container)}async onViewDetached({viewIdentity:t}){this.reparentingViews.add(t.name),this.platformCloseView(t)}async destroy(){this.goldenLayoutDestroyed||(this.goldenLayoutDestroyed=!0,this.layout.destroy()),this.iframeContainer.remove(),this.resizeController.destroy(),document.adoptedStyleSheets=document.adoptedStyleSheets.filter((t=>t!==this.stylesheet)),this.viewComponentsByContainerElement.clear()}setupListeners(){this.container.addEventListener(\"pointerdown\",(t=>{if(t.target instanceof HTMLElement){const e=t.target.classList;[\"lm_tab\",\"lm_title\",\"lm_splitter\",\"lm_drag_handle\"].some((t=>e.contains(t)))&&(this.handleDragStart(),2===t.button&&t.stopPropagation())}}),!0),document.addEventListener(\"pointerup\",(()=>this.handleDragEnd()),!0),this.layout.on(\"tabCreated\",(t=>{const e=t.componentItem.component;t.element.id=`tab-${e.identity.name}`,this.domEmitter.dispatchLocalEvent(\"tab-created\",e.identity)})),this.layout.on(\"itemCreated\",(({target:t})=>{const e=t;if(Gt.isComponentItem(e)){const t=e.component;this.domEmitter.dispatchLocalEvent(\"container-created\",t.identity)}})),this.layout.on(\"itemDestroyed\",(t=>{const e=t.target;if(Gt.isComponentItem(e)){const t=e.component;this.removeViewComponent(t)}})),this.layout.on(\"itemDropped\",(()=>{this.handleDragEnd()}))}handleDragStart(){this.iframeContainer.style.pointerEvents=\"none\"}handleDragEnd(){this.iframeContainer.style.pointerEvents=\"\"}removeViewComponent(t){if(t.config&&!1===t.config[`${de}isClosable`]){const e=[...this.stylesheet.cssRules].findIndex((e=>e.cssText.includes(`#tab-${t.identity.name}`)));this.stylesheet.deleteRule(e)}t.destroy(),this.viewComponentsByContainerElement.delete(t.container.element),this.resizeController.unobserveContainer(t.container.element),this.reparentingViews.has(t.identity.name)?this.reparentingViews.delete(t.identity.name):this.platformProvider.closeView(t.identity.name);0===this.getCurrentViews().length&&(this.goldenLayoutDestroyed||(this.goldenLayoutDestroyed=!0,m.handleLastViewRemoved(this.layoutManager,this.identity)))}}class Pe{constructor(t,e,i,n){this.windowIdentity=t,this.connectConfig=e,this.provider=i,this.fallbackContainer=n}async createLayout(t,e){if(!(\"container\"in t)&&!this.fallbackContainer)throw new Error(\"Container property is not optional in web\");const{layoutName:i}=t,n=t,o=this.provider.initLayoutViews(n),s=n.container??this.fallbackContainer,r={...this.windowIdentity,layoutName:i},a=new Me(r,s,o,this.connectConfig,e,this.provider);m.registerLayout(e,i,a),this.fallbackContainer=null}async getLayoutSnapshot(t){return t.getLayoutSnapshot()}async handleLastViewRemoved(t){}}class Te{static async init(e){const i=e.getFin().InterApplicationBus.Channel,n=await i.create(`custom-frame-${e.me.uuid}`);return n.setDefaultAction((async(t,{target:e,opts:i},o)=>{const s=n.connections.find((t=>t.name===e.name));if(s)return n.dispatch(s,t,{...i,target:e});throw new Error(`Client with name ${e.name} not found`)})),await t.relayChannelClientApi_1(n,\"layout-relay\"),new Te(e)}constructor(t){this.wire=t,this.viewNames=new Set}normalizeOptions(t,i=\"default\"){const n=this.wire.me.uuid;let{name:o=`internal-generated-view-${e.v4()}`}=t;return o.match(/^internal-generated-view-/)&&this.viewNames.has(o)&&\"duplicate\"===i&&(o=`internal-generated-view-${e.v4()}`),this.viewNames.add(o),{...t,name:o,uuid:n}}closeView(t){this.viewNames.delete(t)}initLayoutViews({layout:t,multiInstanceViewBehavior:e}){return H((t=>{if(\"component\"===t.type&&t.componentState){const i=this.normalizeOptions(t.componentState,e);return{...t,componentState:i}}return t}),t)}}var Ae;const ke=t=>t;Ae=new WeakMap,exports.WebLayoutEntryPoint=class{constructor(e){Ae.set(this,void 0),this.initLayoutManager=async(e,i,{container:n,layoutManagerOverride:o})=>{const s=await Te.init(i),r=o??ke,a=new Pe(i.me,t.__classPrivateFieldGet(this,Ae,\"f\"),s,n),l=new(r(m.createClosedConstructor(a)));return await M(i,l),l},this.applyLayoutSnapshot=async(e,i,n)=>{await i.applyLayoutSnapshot(t.__classPrivateFieldGet(this,Ae,\"f\").platform.layoutSnapshot)},this.createLayout=async(t,e)=>m.createLayout(t,e),this.destroyLayout=async(t,e)=>m.destroyLayout(t,e),t.__classPrivateFieldSet(this,Ae,e,\"f\")}};\n","'use strict'\n\nexports.byteLength = byteLength\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\nfor (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i]\n revLookup[code.charCodeAt(i)] = i\n}\n\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction getLens (b64) {\n var len = b64.length\n\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // Trim off extra bytes after placeholder bytes are found\n // See: https://github.com/beatgammit/base64-js/issues/42\n var validLen = b64.indexOf('=')\n if (validLen === -1) validLen = len\n\n var placeHoldersLen = validLen === len\n ? 0\n : 4 - (validLen % 4)\n\n return [validLen, placeHoldersLen]\n}\n\n// base64 is 4/3 + up to two characters of the original data\nfunction byteLength (b64) {\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction _byteLength (b64, validLen, placeHoldersLen) {\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction toByteArray (b64) {\n var tmp\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n\n var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))\n\n var curByte = 0\n\n // if there are placeholders, only get up to the last complete 4 chars\n var len = placeHoldersLen > 0\n ? validLen - 4\n : validLen\n\n var i\n for (i = 0; i < len; i += 4) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 18) |\n (revLookup[b64.charCodeAt(i + 1)] << 12) |\n (revLookup[b64.charCodeAt(i + 2)] << 6) |\n revLookup[b64.charCodeAt(i + 3)]\n arr[curByte++] = (tmp >> 16) & 0xFF\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 2) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 2) |\n (revLookup[b64.charCodeAt(i + 1)] >> 4)\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 1) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 10) |\n (revLookup[b64.charCodeAt(i + 1)] << 4) |\n (revLookup[b64.charCodeAt(i + 2)] >> 2)\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] +\n lookup[num >> 12 & 0x3F] +\n lookup[num >> 6 & 0x3F] +\n lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n var tmp\n var output = []\n for (var i = start; i < end; i += 3) {\n tmp =\n ((uint8[i] << 16) & 0xFF0000) +\n ((uint8[i + 1] << 8) & 0xFF00) +\n (uint8[i + 2] & 0xFF)\n output.push(tripletToBase64(tmp))\n }\n return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n var tmp\n var len = uint8.length\n var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n var parts = []\n var maxChunkLength = 16383 // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1]\n parts.push(\n lookup[tmp >> 2] +\n lookup[(tmp << 4) & 0x3F] +\n '=='\n )\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + uint8[len - 1]\n parts.push(\n lookup[tmp >> 10] +\n lookup[(tmp >> 4) & 0x3F] +\n lookup[(tmp << 2) & 0x3F] +\n '='\n )\n }\n\n return parts.join('')\n}\n","/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n/* eslint-disable no-proto */\n\n'use strict'\n\nconst base64 = require('base64-js')\nconst ieee754 = require('ieee754')\nconst customInspectSymbol =\n (typeof Symbol === 'function' && typeof Symbol['for'] === 'function') // eslint-disable-line dot-notation\n ? Symbol['for']('nodejs.util.inspect.custom') // eslint-disable-line dot-notation\n : null\n\nexports.Buffer = Buffer\nexports.SlowBuffer = SlowBuffer\nexports.INSPECT_MAX_BYTES = 50\n\nconst K_MAX_LENGTH = 0x7fffffff\nexports.kMaxLength = K_MAX_LENGTH\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Print warning and recommend using `buffer` v4.x which has an Object\n * implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * We report that the browser does not support typed arrays if the are not subclassable\n * using __proto__. Firefox 4-29 lacks support for adding new properties to `Uint8Array`\n * (See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438). IE 10 lacks support\n * for __proto__ and has a buggy typed array implementation.\n */\nBuffer.TYPED_ARRAY_SUPPORT = typedArraySupport()\n\nif (!Buffer.TYPED_ARRAY_SUPPORT && typeof console !== 'undefined' &&\n typeof console.error === 'function') {\n console.error(\n 'This browser lacks typed array (Uint8Array) support which is required by ' +\n '`buffer` v5.x. Use `buffer` v4.x if you require old browser support.'\n )\n}\n\nfunction typedArraySupport () {\n // Can typed array instances can be augmented?\n try {\n const arr = new Uint8Array(1)\n const proto = { foo: function () { return 42 } }\n Object.setPrototypeOf(proto, Uint8Array.prototype)\n Object.setPrototypeOf(arr, proto)\n return arr.foo() === 42\n } catch (e) {\n return false\n }\n}\n\nObject.defineProperty(Buffer.prototype, 'parent', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.buffer\n }\n})\n\nObject.defineProperty(Buffer.prototype, 'offset', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.byteOffset\n }\n})\n\nfunction createBuffer (length) {\n if (length > K_MAX_LENGTH) {\n throw new RangeError('The value \"' + length + '\" is invalid for option \"size\"')\n }\n // Return an augmented `Uint8Array` instance\n const buf = new Uint8Array(length)\n Object.setPrototypeOf(buf, Buffer.prototype)\n return buf\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new TypeError(\n 'The \"string\" argument must be of type string. Received type number'\n )\n }\n return allocUnsafe(arg)\n }\n return from(arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\nfunction from (value, encodingOrOffset, length) {\n if (typeof value === 'string') {\n return fromString(value, encodingOrOffset)\n }\n\n if (ArrayBuffer.isView(value)) {\n return fromArrayView(value)\n }\n\n if (value == null) {\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n }\n\n if (isInstance(value, ArrayBuffer) ||\n (value && isInstance(value.buffer, ArrayBuffer))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof SharedArrayBuffer !== 'undefined' &&\n (isInstance(value, SharedArrayBuffer) ||\n (value && isInstance(value.buffer, SharedArrayBuffer)))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof value === 'number') {\n throw new TypeError(\n 'The \"value\" argument must not be of type number. Received type number'\n )\n }\n\n const valueOf = value.valueOf && value.valueOf()\n if (valueOf != null && valueOf !== value) {\n return Buffer.from(valueOf, encodingOrOffset, length)\n }\n\n const b = fromObject(value)\n if (b) return b\n\n if (typeof Symbol !== 'undefined' && Symbol.toPrimitive != null &&\n typeof value[Symbol.toPrimitive] === 'function') {\n return Buffer.from(value[Symbol.toPrimitive]('string'), encodingOrOffset, length)\n }\n\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n return from(value, encodingOrOffset, length)\n}\n\n// Note: Change prototype *after* Buffer.from is defined to workaround Chrome bug:\n// https://github.com/feross/buffer/pull/148\nObject.setPrototypeOf(Buffer.prototype, Uint8Array.prototype)\nObject.setPrototypeOf(Buffer, Uint8Array)\n\nfunction assertSize (size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be of type number')\n } else if (size < 0) {\n throw new RangeError('The value \"' + size + '\" is invalid for option \"size\"')\n }\n}\n\nfunction alloc (size, fill, encoding) {\n assertSize(size)\n if (size <= 0) {\n return createBuffer(size)\n }\n if (fill !== undefined) {\n // Only pay attention to encoding if it's a string. This\n // prevents accidentally sending in a number that would\n // be interpreted as a start offset.\n return typeof encoding === 'string'\n ? createBuffer(size).fill(fill, encoding)\n : createBuffer(size).fill(fill)\n }\n return createBuffer(size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n return alloc(size, fill, encoding)\n}\n\nfunction allocUnsafe (size) {\n assertSize(size)\n return createBuffer(size < 0 ? 0 : checked(size) | 0)\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n return allocUnsafe(size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n return allocUnsafe(size)\n}\n\nfunction fromString (string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8'\n }\n\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n\n const length = byteLength(string, encoding) | 0\n let buf = createBuffer(length)\n\n const actual = buf.write(string, encoding)\n\n if (actual !== length) {\n // Writing a hex string, for example, that contains invalid characters will\n // cause everything after the first invalid character to be ignored. (e.g.\n // 'abxxcd' will be treated as 'ab')\n buf = buf.slice(0, actual)\n }\n\n return buf\n}\n\nfunction fromArrayLike (array) {\n const length = array.length < 0 ? 0 : checked(array.length) | 0\n const buf = createBuffer(length)\n for (let i = 0; i < length; i += 1) {\n buf[i] = array[i] & 255\n }\n return buf\n}\n\nfunction fromArrayView (arrayView) {\n if (isInstance(arrayView, Uint8Array)) {\n const copy = new Uint8Array(arrayView)\n return fromArrayBuffer(copy.buffer, copy.byteOffset, copy.byteLength)\n }\n return fromArrayLike(arrayView)\n}\n\nfunction fromArrayBuffer (array, byteOffset, length) {\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\"offset\" is outside of buffer bounds')\n }\n\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\"length\" is outside of buffer bounds')\n }\n\n let buf\n if (byteOffset === undefined && length === undefined) {\n buf = new Uint8Array(array)\n } else if (length === undefined) {\n buf = new Uint8Array(array, byteOffset)\n } else {\n buf = new Uint8Array(array, byteOffset, length)\n }\n\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(buf, Buffer.prototype)\n\n return buf\n}\n\nfunction fromObject (obj) {\n if (Buffer.isBuffer(obj)) {\n const len = checked(obj.length) | 0\n const buf = createBuffer(len)\n\n if (buf.length === 0) {\n return buf\n }\n\n obj.copy(buf, 0, 0, len)\n return buf\n }\n\n if (obj.length !== undefined) {\n if (typeof obj.length !== 'number' || numberIsNaN(obj.length)) {\n return createBuffer(0)\n }\n return fromArrayLike(obj)\n }\n\n if (obj.type === 'Buffer' && Array.isArray(obj.data)) {\n return fromArrayLike(obj.data)\n }\n}\n\nfunction checked (length) {\n // Note: cannot use `length < K_MAX_LENGTH` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= K_MAX_LENGTH) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + K_MAX_LENGTH.toString(16) + ' bytes')\n }\n return length | 0\n}\n\nfunction SlowBuffer (length) {\n if (+length != length) { // eslint-disable-line eqeqeq\n length = 0\n }\n return Buffer.alloc(+length)\n}\n\nBuffer.isBuffer = function isBuffer (b) {\n return b != null && b._isBuffer === true &&\n b !== Buffer.prototype // so Buffer.isBuffer(Buffer.prototype) will be false\n}\n\nBuffer.compare = function compare (a, b) {\n if (isInstance(a, Uint8Array)) a = Buffer.from(a, a.offset, a.byteLength)\n if (isInstance(b, Uint8Array)) b = Buffer.from(b, b.offset, b.byteLength)\n if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n throw new TypeError(\n 'The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array'\n )\n }\n\n if (a === b) return 0\n\n let x = a.length\n let y = b.length\n\n for (let i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i]\n y = b[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n switch (String(encoding).toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'latin1':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return true\n default:\n return false\n }\n}\n\nBuffer.concat = function concat (list, length) {\n if (!Array.isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n\n if (list.length === 0) {\n return Buffer.alloc(0)\n }\n\n let i\n if (length === undefined) {\n length = 0\n for (i = 0; i < list.length; ++i) {\n length += list[i].length\n }\n }\n\n const buffer = Buffer.allocUnsafe(length)\n let pos = 0\n for (i = 0; i < list.length; ++i) {\n let buf = list[i]\n if (isInstance(buf, Uint8Array)) {\n if (pos + buf.length > buffer.length) {\n if (!Buffer.isBuffer(buf)) buf = Buffer.from(buf)\n buf.copy(buffer, pos)\n } else {\n Uint8Array.prototype.set.call(\n buffer,\n buf,\n pos\n )\n }\n } else if (!Buffer.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n } else {\n buf.copy(buffer, pos)\n }\n pos += buf.length\n }\n return buffer\n}\n\nfunction byteLength (string, encoding) {\n if (Buffer.isBuffer(string)) {\n return string.length\n }\n if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) {\n return string.byteLength\n }\n if (typeof string !== 'string') {\n throw new TypeError(\n 'The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. ' +\n 'Received type ' + typeof string\n )\n }\n\n const len = string.length\n const mustMatch = (arguments.length > 2 && arguments[2] === true)\n if (!mustMatch && len === 0) return 0\n\n // Use a for loop to avoid recursion\n let loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'ascii':\n case 'latin1':\n case 'binary':\n return len\n case 'utf8':\n case 'utf-8':\n return utf8ToBytes(string).length\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return len * 2\n case 'hex':\n return len >>> 1\n case 'base64':\n return base64ToBytes(string).length\n default:\n if (loweredCase) {\n return mustMatch ? -1 : utf8ToBytes(string).length // assume utf8\n }\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n let loweredCase = false\n\n // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n // property of a typed array.\n\n // This behaves neither like String nor Uint8Array in that we set start/end\n // to their upper/lower bounds if the value passed is out of range.\n // undefined is handled specially as per ECMA-262 6th Edition,\n // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n if (start === undefined || start < 0) {\n start = 0\n }\n // Return early if start > this.length. Done here to prevent potential uint32\n // coercion fail below.\n if (start > this.length) {\n return ''\n }\n\n if (end === undefined || end > this.length) {\n end = this.length\n }\n\n if (end <= 0) {\n return ''\n }\n\n // Force coercion to uint32. This will also coerce falsey/NaN values to 0.\n end >>>= 0\n start >>>= 0\n\n if (end <= start) {\n return ''\n }\n\n if (!encoding) encoding = 'utf8'\n\n while (true) {\n switch (encoding) {\n case 'hex':\n return hexSlice(this, start, end)\n\n case 'utf8':\n case 'utf-8':\n return utf8Slice(this, start, end)\n\n case 'ascii':\n return asciiSlice(this, start, end)\n\n case 'latin1':\n case 'binary':\n return latin1Slice(this, start, end)\n\n case 'base64':\n return base64Slice(this, start, end)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return utf16leSlice(this, start, end)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = (encoding + '').toLowerCase()\n loweredCase = true\n }\n }\n}\n\n// This property is used by `Buffer.isBuffer` (and the `is-buffer` npm package)\n// to detect a Buffer instance. It's not possible to use `instanceof Buffer`\n// reliably in a browserify context because there could be multiple different\n// copies of the 'buffer' package in use. This method works even for Buffer\n// instances that were created from another copy of the `buffer` package.\n// See: https://github.com/feross/buffer/issues/154\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n const i = b[n]\n b[n] = b[m]\n b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n const len = this.length\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits')\n }\n for (let i = 0; i < len; i += 2) {\n swap(this, i, i + 1)\n }\n return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n const len = this.length\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits')\n }\n for (let i = 0; i < len; i += 4) {\n swap(this, i, i + 3)\n swap(this, i + 1, i + 2)\n }\n return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n const len = this.length\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits')\n }\n for (let i = 0; i < len; i += 8) {\n swap(this, i, i + 7)\n swap(this, i + 1, i + 6)\n swap(this, i + 2, i + 5)\n swap(this, i + 3, i + 4)\n }\n return this\n}\n\nBuffer.prototype.toString = function toString () {\n const length = this.length\n if (length === 0) return ''\n if (arguments.length === 0) return utf8Slice(this, 0, length)\n return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.toLocaleString = Buffer.prototype.toString\n\nBuffer.prototype.equals = function equals (b) {\n if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n if (this === b) return true\n return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n let str = ''\n const max = exports.INSPECT_MAX_BYTES\n str = this.toString('hex', 0, max).replace(/(.{2})/g, '$1 ').trim()\n if (this.length > max) str += ' ... '\n return ''\n}\nif (customInspectSymbol) {\n Buffer.prototype[customInspectSymbol] = Buffer.prototype.inspect\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n if (isInstance(target, Uint8Array)) {\n target = Buffer.from(target, target.offset, target.byteLength)\n }\n if (!Buffer.isBuffer(target)) {\n throw new TypeError(\n 'The \"target\" argument must be one of type Buffer or Uint8Array. ' +\n 'Received type ' + (typeof target)\n )\n }\n\n if (start === undefined) {\n start = 0\n }\n if (end === undefined) {\n end = target ? target.length : 0\n }\n if (thisStart === undefined) {\n thisStart = 0\n }\n if (thisEnd === undefined) {\n thisEnd = this.length\n }\n\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError('out of range index')\n }\n\n if (thisStart >= thisEnd && start >= end) {\n return 0\n }\n if (thisStart >= thisEnd) {\n return -1\n }\n if (start >= end) {\n return 1\n }\n\n start >>>= 0\n end >>>= 0\n thisStart >>>= 0\n thisEnd >>>= 0\n\n if (this === target) return 0\n\n let x = thisEnd - thisStart\n let y = end - start\n const len = Math.min(x, y)\n\n const thisCopy = this.slice(thisStart, thisEnd)\n const targetCopy = target.slice(start, end)\n\n for (let i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i]\n y = targetCopy[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (numberIsNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [val], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n let indexSize = 1\n let arrLength = arr.length\n let valLength = val.length\n\n if (encoding !== undefined) {\n encoding = String(encoding).toLowerCase()\n if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n encoding === 'utf16le' || encoding === 'utf-16le') {\n if (arr.length < 2 || val.length < 2) {\n return -1\n }\n indexSize = 2\n arrLength /= 2\n valLength /= 2\n byteOffset /= 2\n }\n }\n\n function read (buf, i) {\n if (indexSize === 1) {\n return buf[i]\n } else {\n return buf.readUInt16BE(i * indexSize)\n }\n }\n\n let i\n if (dir) {\n let foundIndex = -1\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1) foundIndex = i\n if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n } else {\n if (foundIndex !== -1) i -= i - foundIndex\n foundIndex = -1\n }\n }\n } else {\n if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n for (i = byteOffset; i >= 0; i--) {\n let found = true\n for (let j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false\n break\n }\n }\n if (found) return i\n }\n }\n\n return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n offset = Number(offset) || 0\n const remaining = buf.length - offset\n if (!length) {\n length = remaining\n } else {\n length = Number(length)\n if (length > remaining) {\n length = remaining\n }\n }\n\n const strLen = string.length\n\n if (length > strLen / 2) {\n length = strLen / 2\n }\n let i\n for (i = 0; i < length; ++i) {\n const parsed = parseInt(string.substr(i * 2, 2), 16)\n if (numberIsNaN(parsed)) return i\n buf[offset + i] = parsed\n }\n return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n // Buffer#write(string)\n if (offset === undefined) {\n encoding = 'utf8'\n length = this.length\n offset = 0\n // Buffer#write(string, encoding)\n } else if (length === undefined && typeof offset === 'string') {\n encoding = offset\n length = this.length\n offset = 0\n // Buffer#write(string, offset[, length][, encoding])\n } else if (isFinite(offset)) {\n offset = offset >>> 0\n if (isFinite(length)) {\n length = length >>> 0\n if (encoding === undefined) encoding = 'utf8'\n } else {\n encoding = length\n length = undefined\n }\n } else {\n throw new Error(\n 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n )\n }\n\n const remaining = this.length - offset\n if (length === undefined || length > remaining) length = remaining\n\n if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n throw new RangeError('Attempt to write outside buffer bounds')\n }\n\n if (!encoding) encoding = 'utf8'\n\n let loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'hex':\n return hexWrite(this, string, offset, length)\n\n case 'utf8':\n case 'utf-8':\n return utf8Write(this, string, offset, length)\n\n case 'ascii':\n case 'latin1':\n case 'binary':\n return asciiWrite(this, string, offset, length)\n\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return base64Write(this, string, offset, length)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return ucs2Write(this, string, offset, length)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0)\n }\n}\n\nfunction base64Slice (buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf)\n } else {\n return base64.fromByteArray(buf.slice(start, end))\n }\n}\n\nfunction utf8Slice (buf, start, end) {\n end = Math.min(buf.length, end)\n const res = []\n\n let i = start\n while (i < end) {\n const firstByte = buf[i]\n let codePoint = null\n let bytesPerSequence = (firstByte > 0xEF)\n ? 4\n : (firstByte > 0xDF)\n ? 3\n : (firstByte > 0xBF)\n ? 2\n : 1\n\n if (i + bytesPerSequence <= end) {\n let secondByte, thirdByte, fourthByte, tempCodePoint\n\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 0x80) {\n codePoint = firstByte\n }\n break\n case 2:\n secondByte = buf[i + 1]\n if ((secondByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n if (tempCodePoint > 0x7F) {\n codePoint = tempCodePoint\n }\n }\n break\n case 3:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n codePoint = tempCodePoint\n }\n }\n break\n case 4:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n fourthByte = buf[i + 3]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n codePoint = tempCodePoint\n }\n }\n }\n }\n\n if (codePoint === null) {\n // we did not generate a valid codePoint so insert a\n // replacement char (U+FFFD) and advance only 1 byte\n codePoint = 0xFFFD\n bytesPerSequence = 1\n } else if (codePoint > 0xFFFF) {\n // encode to utf16 (surrogate pair dance)\n codePoint -= 0x10000\n res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n codePoint = 0xDC00 | codePoint & 0x3FF\n }\n\n res.push(codePoint)\n i += bytesPerSequence\n }\n\n return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nconst MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n const len = codePoints.length\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n }\n\n // Decode in chunks to avoid \"call stack size exceeded\".\n let res = ''\n let i = 0\n while (i < len) {\n res += String.fromCharCode.apply(\n String,\n codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n )\n }\n return res\n}\n\nfunction asciiSlice (buf, start, end) {\n let ret = ''\n end = Math.min(buf.length, end)\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F)\n }\n return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n let ret = ''\n end = Math.min(buf.length, end)\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i])\n }\n return ret\n}\n\nfunction hexSlice (buf, start, end) {\n const len = buf.length\n\n if (!start || start < 0) start = 0\n if (!end || end < 0 || end > len) end = len\n\n let out = ''\n for (let i = start; i < end; ++i) {\n out += hexSliceLookupTable[buf[i]]\n }\n return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n const bytes = buf.slice(start, end)\n let res = ''\n // If bytes.length is odd, the last 8 bits must be ignored (same as node.js)\n for (let i = 0; i < bytes.length - 1; i += 2) {\n res += String.fromCharCode(bytes[i] + (bytes[i + 1] * 256))\n }\n return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n const len = this.length\n start = ~~start\n end = end === undefined ? len : ~~end\n\n if (start < 0) {\n start += len\n if (start < 0) start = 0\n } else if (start > len) {\n start = len\n }\n\n if (end < 0) {\n end += len\n if (end < 0) end = 0\n } else if (end > len) {\n end = len\n }\n\n if (end < start) end = start\n\n const newBuf = this.subarray(start, end)\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(newBuf, Buffer.prototype)\n\n return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUintLE =\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let val = this[offset]\n let mul = 1\n let i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUintBE =\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n checkOffset(offset, byteLength, this.length)\n }\n\n let val = this[offset + --byteLength]\n let mul = 1\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUint8 =\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n return this[offset]\n}\n\nBuffer.prototype.readUint16LE =\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUint16BE =\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUint32LE =\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return ((this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16)) +\n (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUint32BE =\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] * 0x1000000) +\n ((this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n this[offset + 3])\n}\n\nBuffer.prototype.readBigUInt64LE = defineBigIntMethod(function readBigUInt64LE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const lo = first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24\n\n const hi = this[++offset] +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n last * 2 ** 24\n\n return BigInt(lo) + (BigInt(hi) << BigInt(32))\n})\n\nBuffer.prototype.readBigUInt64BE = defineBigIntMethod(function readBigUInt64BE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const hi = first * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset]\n\n const lo = this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last\n\n return (BigInt(hi) << BigInt(32)) + BigInt(lo)\n})\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let val = this[offset]\n let mul = 1\n let i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let i = byteLength\n let mul = 1\n let val = this[offset + --i]\n while (i > 0 && (mul *= 0x100)) {\n val += this[offset + --i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n if (!(this[offset] & 0x80)) return (this[offset])\n return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n const val = this[offset] | (this[offset + 1] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n const val = this[offset + 1] | (this[offset] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16) |\n (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] << 24) |\n (this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n (this[offset + 3])\n}\n\nBuffer.prototype.readBigInt64LE = defineBigIntMethod(function readBigInt64LE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const val = this[offset + 4] +\n this[offset + 5] * 2 ** 8 +\n this[offset + 6] * 2 ** 16 +\n (last << 24) // Overflow\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24)\n})\n\nBuffer.prototype.readBigInt64BE = defineBigIntMethod(function readBigInt64BE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const val = (first << 24) + // Overflow\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset]\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last)\n})\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUintLE =\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n let mul = 1\n let i = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUintBE =\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n let i = byteLength - 1\n let mul = 1\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUint8 =\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeUint16LE =\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeUint16BE =\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeUint32LE =\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset + 3] = (value >>> 24)\n this[offset + 2] = (value >>> 16)\n this[offset + 1] = (value >>> 8)\n this[offset] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeUint32BE =\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nfunction wrtBigUInt64LE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7)\n\n let lo = Number(value & BigInt(0xffffffff))\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n return offset\n}\n\nfunction wrtBigUInt64BE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7)\n\n let lo = Number(value & BigInt(0xffffffff))\n buf[offset + 7] = lo\n lo = lo >> 8\n buf[offset + 6] = lo\n lo = lo >> 8\n buf[offset + 5] = lo\n lo = lo >> 8\n buf[offset + 4] = lo\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n buf[offset + 3] = hi\n hi = hi >> 8\n buf[offset + 2] = hi\n hi = hi >> 8\n buf[offset + 1] = hi\n hi = hi >> 8\n buf[offset] = hi\n return offset + 8\n}\n\nBuffer.prototype.writeBigUInt64LE = defineBigIntMethod(function writeBigUInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeBigUInt64BE = defineBigIntMethod(function writeBigUInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n let i = 0\n let mul = 1\n let sub = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n let i = byteLength - 1\n let mul = 1\n let sub = 0\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n if (value < 0) value = 0xff + value + 1\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n this[offset + 2] = (value >>> 16)\n this[offset + 3] = (value >>> 24)\n return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (value < 0) value = 0xffffffff + value + 1\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeBigInt64LE = defineBigIntMethod(function writeBigInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nBuffer.prototype.writeBigInt64BE = defineBigIntMethod(function writeBigInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n }\n ieee754.write(buf, value, offset, littleEndian, 23, 4)\n return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n }\n ieee754.write(buf, value, offset, littleEndian, 52, 8)\n return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n if (!Buffer.isBuffer(target)) throw new TypeError('argument should be a Buffer')\n if (!start) start = 0\n if (!end && end !== 0) end = this.length\n if (targetStart >= target.length) targetStart = target.length\n if (!targetStart) targetStart = 0\n if (end > 0 && end < start) end = start\n\n // Copy 0 bytes; we're done\n if (end === start) return 0\n if (target.length === 0 || this.length === 0) return 0\n\n // Fatal error conditions\n if (targetStart < 0) {\n throw new RangeError('targetStart out of bounds')\n }\n if (start < 0 || start >= this.length) throw new RangeError('Index out of range')\n if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n // Are we oob?\n if (end > this.length) end = this.length\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start\n }\n\n const len = end - start\n\n if (this === target && typeof Uint8Array.prototype.copyWithin === 'function') {\n // Use built-in when available, missing from IE11\n this.copyWithin(targetStart, start, end)\n } else {\n Uint8Array.prototype.set.call(\n target,\n this.subarray(start, end),\n targetStart\n )\n }\n\n return len\n}\n\n// Usage:\n// buffer.fill(number[, offset[, end]])\n// buffer.fill(buffer[, offset[, end]])\n// buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n // Handle string cases:\n if (typeof val === 'string') {\n if (typeof start === 'string') {\n encoding = start\n start = 0\n end = this.length\n } else if (typeof end === 'string') {\n encoding = end\n end = this.length\n }\n if (encoding !== undefined && typeof encoding !== 'string') {\n throw new TypeError('encoding must be a string')\n }\n if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n if (val.length === 1) {\n const code = val.charCodeAt(0)\n if ((encoding === 'utf8' && code < 128) ||\n encoding === 'latin1') {\n // Fast path: If `val` fits into a single byte, use that numeric value.\n val = code\n }\n }\n } else if (typeof val === 'number') {\n val = val & 255\n } else if (typeof val === 'boolean') {\n val = Number(val)\n }\n\n // Invalid ranges are not set to a default, so can range check early.\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError('Out of range index')\n }\n\n if (end <= start) {\n return this\n }\n\n start = start >>> 0\n end = end === undefined ? this.length : end >>> 0\n\n if (!val) val = 0\n\n let i\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val\n }\n } else {\n const bytes = Buffer.isBuffer(val)\n ? val\n : Buffer.from(val, encoding)\n const len = bytes.length\n if (len === 0) {\n throw new TypeError('The value \"' + val +\n '\" is invalid for argument \"value\"')\n }\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len]\n }\n }\n\n return this\n}\n\n// CUSTOM ERRORS\n// =============\n\n// Simplified versions from Node, changed for Buffer-only usage\nconst errors = {}\nfunction E (sym, getMessage, Base) {\n errors[sym] = class NodeError extends Base {\n constructor () {\n super()\n\n Object.defineProperty(this, 'message', {\n value: getMessage.apply(this, arguments),\n writable: true,\n configurable: true\n })\n\n // Add the error code to the name to include it in the stack trace.\n this.name = `${this.name} [${sym}]`\n // Access the stack to generate the error message including the error code\n // from the name.\n this.stack // eslint-disable-line no-unused-expressions\n // Reset the name to the actual name.\n delete this.name\n }\n\n get code () {\n return sym\n }\n\n set code (value) {\n Object.defineProperty(this, 'code', {\n configurable: true,\n enumerable: true,\n value,\n writable: true\n })\n }\n\n toString () {\n return `${this.name} [${sym}]: ${this.message}`\n }\n }\n}\n\nE('ERR_BUFFER_OUT_OF_BOUNDS',\n function (name) {\n if (name) {\n return `${name} is outside of buffer bounds`\n }\n\n return 'Attempt to access memory outside buffer bounds'\n }, RangeError)\nE('ERR_INVALID_ARG_TYPE',\n function (name, actual) {\n return `The \"${name}\" argument must be of type number. Received type ${typeof actual}`\n }, TypeError)\nE('ERR_OUT_OF_RANGE',\n function (str, range, input) {\n let msg = `The value of \"${str}\" is out of range.`\n let received = input\n if (Number.isInteger(input) && Math.abs(input) > 2 ** 32) {\n received = addNumericalSeparator(String(input))\n } else if (typeof input === 'bigint') {\n received = String(input)\n if (input > BigInt(2) ** BigInt(32) || input < -(BigInt(2) ** BigInt(32))) {\n received = addNumericalSeparator(received)\n }\n received += 'n'\n }\n msg += ` It must be ${range}. Received ${received}`\n return msg\n }, RangeError)\n\nfunction addNumericalSeparator (val) {\n let res = ''\n let i = val.length\n const start = val[0] === '-' ? 1 : 0\n for (; i >= start + 4; i -= 3) {\n res = `_${val.slice(i - 3, i)}${res}`\n }\n return `${val.slice(0, i)}${res}`\n}\n\n// CHECK FUNCTIONS\n// ===============\n\nfunction checkBounds (buf, offset, byteLength) {\n validateNumber(offset, 'offset')\n if (buf[offset] === undefined || buf[offset + byteLength] === undefined) {\n boundsError(offset, buf.length - (byteLength + 1))\n }\n}\n\nfunction checkIntBI (value, min, max, buf, offset, byteLength) {\n if (value > max || value < min) {\n const n = typeof min === 'bigint' ? 'n' : ''\n let range\n if (byteLength > 3) {\n if (min === 0 || min === BigInt(0)) {\n range = `>= 0${n} and < 2${n} ** ${(byteLength + 1) * 8}${n}`\n } else {\n range = `>= -(2${n} ** ${(byteLength + 1) * 8 - 1}${n}) and < 2 ** ` +\n `${(byteLength + 1) * 8 - 1}${n}`\n }\n } else {\n range = `>= ${min}${n} and <= ${max}${n}`\n }\n throw new errors.ERR_OUT_OF_RANGE('value', range, value)\n }\n checkBounds(buf, offset, byteLength)\n}\n\nfunction validateNumber (value, name) {\n if (typeof value !== 'number') {\n throw new errors.ERR_INVALID_ARG_TYPE(name, 'number', value)\n }\n}\n\nfunction boundsError (value, length, type) {\n if (Math.floor(value) !== value) {\n validateNumber(value, type)\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset', 'an integer', value)\n }\n\n if (length < 0) {\n throw new errors.ERR_BUFFER_OUT_OF_BOUNDS()\n }\n\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset',\n `>= ${type ? 1 : 0} and <= ${length}`,\n value)\n}\n\n// HELPER FUNCTIONS\n// ================\n\nconst INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n // Node takes equal signs as end of the Base64 encoding\n str = str.split('=')[0]\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = str.trim().replace(INVALID_BASE64_RE, '')\n // Node converts strings with length < 2 to ''\n if (str.length < 2) return ''\n // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n while (str.length % 4 !== 0) {\n str = str + '='\n }\n return str\n}\n\nfunction utf8ToBytes (string, units) {\n units = units || Infinity\n let codePoint\n const length = string.length\n let leadSurrogate = null\n const bytes = []\n\n for (let i = 0; i < length; ++i) {\n codePoint = string.charCodeAt(i)\n\n // is surrogate component\n if (codePoint > 0xD7FF && codePoint < 0xE000) {\n // last char was a lead\n if (!leadSurrogate) {\n // no lead yet\n if (codePoint > 0xDBFF) {\n // unexpected trail\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n } else if (i + 1 === length) {\n // unpaired lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n }\n\n // valid lead\n leadSurrogate = codePoint\n\n continue\n }\n\n // 2 leads in a row\n if (codePoint < 0xDC00) {\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n leadSurrogate = codePoint\n continue\n }\n\n // valid surrogate pair\n codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n } else if (leadSurrogate) {\n // valid bmp char, but last char was a lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n }\n\n leadSurrogate = null\n\n // encode utf8\n if (codePoint < 0x80) {\n if ((units -= 1) < 0) break\n bytes.push(codePoint)\n } else if (codePoint < 0x800) {\n if ((units -= 2) < 0) break\n bytes.push(\n codePoint >> 0x6 | 0xC0,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x10000) {\n if ((units -= 3) < 0) break\n bytes.push(\n codePoint >> 0xC | 0xE0,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x110000) {\n if ((units -= 4) < 0) break\n bytes.push(\n codePoint >> 0x12 | 0xF0,\n codePoint >> 0xC & 0x3F | 0x80,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else {\n throw new Error('Invalid code point')\n }\n }\n\n return bytes\n}\n\nfunction asciiToBytes (str) {\n const byteArray = []\n for (let i = 0; i < str.length; ++i) {\n // Node's code seems to be doing this and not & 0x7F..\n byteArray.push(str.charCodeAt(i) & 0xFF)\n }\n return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n let c, hi, lo\n const byteArray = []\n for (let i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0) break\n\n c = str.charCodeAt(i)\n hi = c >> 8\n lo = c % 256\n byteArray.push(lo)\n byteArray.push(hi)\n }\n\n return byteArray\n}\n\nfunction base64ToBytes (str) {\n return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n let i\n for (i = 0; i < length; ++i) {\n if ((i + offset >= dst.length) || (i >= src.length)) break\n dst[i + offset] = src[i]\n }\n return i\n}\n\n// ArrayBuffer or Uint8Array objects from other contexts (i.e. iframes) do not pass\n// the `instanceof` check but they should be treated as of that type.\n// See: https://github.com/feross/buffer/issues/166\nfunction isInstance (obj, type) {\n return obj instanceof type ||\n (obj != null && obj.constructor != null && obj.constructor.name != null &&\n obj.constructor.name === type.name)\n}\nfunction numberIsNaN (obj) {\n // For IE11 support\n return obj !== obj // eslint-disable-line no-self-compare\n}\n\n// Create lookup table for `toString('hex')`\n// See: https://github.com/feross/buffer/issues/219\nconst hexSliceLookupTable = (function () {\n const alphabet = '0123456789abcdef'\n const table = new Array(256)\n for (let i = 0; i < 16; ++i) {\n const i16 = i * 16\n for (let j = 0; j < 16; ++j) {\n table[i16 + j] = alphabet[i] + alphabet[j]\n }\n }\n return table\n})()\n\n// Return not function with Error if BigInt not supported\nfunction defineBigIntMethod (fn) {\n return typeof BigInt === 'undefined' ? BufferBigIntNotDefined : fn\n}\n\nfunction BufferBigIntNotDefined () {\n throw new Error('BigInt not supported')\n}\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\nvar R = typeof Reflect === 'object' ? Reflect : null\nvar ReflectApply = R && typeof R.apply === 'function'\n ? R.apply\n : function ReflectApply(target, receiver, args) {\n return Function.prototype.apply.call(target, receiver, args);\n }\n\nvar ReflectOwnKeys\nif (R && typeof R.ownKeys === 'function') {\n ReflectOwnKeys = R.ownKeys\n} else if (Object.getOwnPropertySymbols) {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target)\n .concat(Object.getOwnPropertySymbols(target));\n };\n} else {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target);\n };\n}\n\nfunction ProcessEmitWarning(warning) {\n if (console && console.warn) console.warn(warning);\n}\n\nvar NumberIsNaN = Number.isNaN || function NumberIsNaN(value) {\n return value !== value;\n}\n\nfunction EventEmitter() {\n EventEmitter.init.call(this);\n}\nmodule.exports = EventEmitter;\nmodule.exports.once = once;\n\n// Backwards-compat with node 0.10.x\nEventEmitter.EventEmitter = EventEmitter;\n\nEventEmitter.prototype._events = undefined;\nEventEmitter.prototype._eventsCount = 0;\nEventEmitter.prototype._maxListeners = undefined;\n\n// By default EventEmitters will print a warning if more than 10 listeners are\n// added to it. This is a useful default which helps finding memory leaks.\nvar defaultMaxListeners = 10;\n\nfunction checkListener(listener) {\n if (typeof listener !== 'function') {\n throw new TypeError('The \"listener\" argument must be of type Function. Received type ' + typeof listener);\n }\n}\n\nObject.defineProperty(EventEmitter, 'defaultMaxListeners', {\n enumerable: true,\n get: function() {\n return defaultMaxListeners;\n },\n set: function(arg) {\n if (typeof arg !== 'number' || arg < 0 || NumberIsNaN(arg)) {\n throw new RangeError('The value of \"defaultMaxListeners\" is out of range. It must be a non-negative number. Received ' + arg + '.');\n }\n defaultMaxListeners = arg;\n }\n});\n\nEventEmitter.init = function() {\n\n if (this._events === undefined ||\n this._events === Object.getPrototypeOf(this)._events) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n }\n\n this._maxListeners = this._maxListeners || undefined;\n};\n\n// Obviously not all Emitters should be limited to 10. This function allows\n// that to be increased. Set to zero for unlimited.\nEventEmitter.prototype.setMaxListeners = function setMaxListeners(n) {\n if (typeof n !== 'number' || n < 0 || NumberIsNaN(n)) {\n throw new RangeError('The value of \"n\" is out of range. It must be a non-negative number. Received ' + n + '.');\n }\n this._maxListeners = n;\n return this;\n};\n\nfunction _getMaxListeners(that) {\n if (that._maxListeners === undefined)\n return EventEmitter.defaultMaxListeners;\n return that._maxListeners;\n}\n\nEventEmitter.prototype.getMaxListeners = function getMaxListeners() {\n return _getMaxListeners(this);\n};\n\nEventEmitter.prototype.emit = function emit(type) {\n var args = [];\n for (var i = 1; i < arguments.length; i++) args.push(arguments[i]);\n var doError = (type === 'error');\n\n var events = this._events;\n if (events !== undefined)\n doError = (doError && events.error === undefined);\n else if (!doError)\n return false;\n\n // If there is no 'error' event listener then throw.\n if (doError) {\n var er;\n if (args.length > 0)\n er = args[0];\n if (er instanceof Error) {\n // Note: The comments on the `throw` lines are intentional, they show\n // up in Node's output if this results in an unhandled exception.\n throw er; // Unhandled 'error' event\n }\n // At least give some kind of context to the user\n var err = new Error('Unhandled error.' + (er ? ' (' + er.message + ')' : ''));\n err.context = er;\n throw err; // Unhandled 'error' event\n }\n\n var handler = events[type];\n\n if (handler === undefined)\n return false;\n\n if (typeof handler === 'function') {\n ReflectApply(handler, this, args);\n } else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n ReflectApply(listeners[i], this, args);\n }\n\n return true;\n};\n\nfunction _addListener(target, type, listener, prepend) {\n var m;\n var events;\n var existing;\n\n checkListener(listener);\n\n events = target._events;\n if (events === undefined) {\n events = target._events = Object.create(null);\n target._eventsCount = 0;\n } else {\n // To avoid recursion in the case that type === \"newListener\"! Before\n // adding it to the listeners, first emit \"newListener\".\n if (events.newListener !== undefined) {\n target.emit('newListener', type,\n listener.listener ? listener.listener : listener);\n\n // Re-assign `events` because a newListener handler could have caused the\n // this._events to be assigned to a new object\n events = target._events;\n }\n existing = events[type];\n }\n\n if (existing === undefined) {\n // Optimize the case of one listener. Don't need the extra array object.\n existing = events[type] = listener;\n ++target._eventsCount;\n } else {\n if (typeof existing === 'function') {\n // Adding the second element, need to change to array.\n existing = events[type] =\n prepend ? [listener, existing] : [existing, listener];\n // If we've already got an array, just append.\n } else if (prepend) {\n existing.unshift(listener);\n } else {\n existing.push(listener);\n }\n\n // Check for listener leak\n m = _getMaxListeners(target);\n if (m > 0 && existing.length > m && !existing.warned) {\n existing.warned = true;\n // No error code for this since it is a Warning\n // eslint-disable-next-line no-restricted-syntax\n var w = new Error('Possible EventEmitter memory leak detected. ' +\n existing.length + ' ' + String(type) + ' listeners ' +\n 'added. Use emitter.setMaxListeners() to ' +\n 'increase limit');\n w.name = 'MaxListenersExceededWarning';\n w.emitter = target;\n w.type = type;\n w.count = existing.length;\n ProcessEmitWarning(w);\n }\n }\n\n return target;\n}\n\nEventEmitter.prototype.addListener = function addListener(type, listener) {\n return _addListener(this, type, listener, false);\n};\n\nEventEmitter.prototype.on = EventEmitter.prototype.addListener;\n\nEventEmitter.prototype.prependListener =\n function prependListener(type, listener) {\n return _addListener(this, type, listener, true);\n };\n\nfunction onceWrapper() {\n if (!this.fired) {\n this.target.removeListener(this.type, this.wrapFn);\n this.fired = true;\n if (arguments.length === 0)\n return this.listener.call(this.target);\n return this.listener.apply(this.target, arguments);\n }\n}\n\nfunction _onceWrap(target, type, listener) {\n var state = { fired: false, wrapFn: undefined, target: target, type: type, listener: listener };\n var wrapped = onceWrapper.bind(state);\n wrapped.listener = listener;\n state.wrapFn = wrapped;\n return wrapped;\n}\n\nEventEmitter.prototype.once = function once(type, listener) {\n checkListener(listener);\n this.on(type, _onceWrap(this, type, listener));\n return this;\n};\n\nEventEmitter.prototype.prependOnceListener =\n function prependOnceListener(type, listener) {\n checkListener(listener);\n this.prependListener(type, _onceWrap(this, type, listener));\n return this;\n };\n\n// Emits a 'removeListener' event if and only if the listener was removed.\nEventEmitter.prototype.removeListener =\n function removeListener(type, listener) {\n var list, events, position, i, originalListener;\n\n checkListener(listener);\n\n events = this._events;\n if (events === undefined)\n return this;\n\n list = events[type];\n if (list === undefined)\n return this;\n\n if (list === listener || list.listener === listener) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else {\n delete events[type];\n if (events.removeListener)\n this.emit('removeListener', type, list.listener || listener);\n }\n } else if (typeof list !== 'function') {\n position = -1;\n\n for (i = list.length - 1; i >= 0; i--) {\n if (list[i] === listener || list[i].listener === listener) {\n originalListener = list[i].listener;\n position = i;\n break;\n }\n }\n\n if (position < 0)\n return this;\n\n if (position === 0)\n list.shift();\n else {\n spliceOne(list, position);\n }\n\n if (list.length === 1)\n events[type] = list[0];\n\n if (events.removeListener !== undefined)\n this.emit('removeListener', type, originalListener || listener);\n }\n\n return this;\n };\n\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\n\nEventEmitter.prototype.removeAllListeners =\n function removeAllListeners(type) {\n var listeners, events, i;\n\n events = this._events;\n if (events === undefined)\n return this;\n\n // not listening for removeListener, no need to emit\n if (events.removeListener === undefined) {\n if (arguments.length === 0) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n } else if (events[type] !== undefined) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else\n delete events[type];\n }\n return this;\n }\n\n // emit removeListener for all listeners on all events\n if (arguments.length === 0) {\n var keys = Object.keys(events);\n var key;\n for (i = 0; i < keys.length; ++i) {\n key = keys[i];\n if (key === 'removeListener') continue;\n this.removeAllListeners(key);\n }\n this.removeAllListeners('removeListener');\n this._events = Object.create(null);\n this._eventsCount = 0;\n return this;\n }\n\n listeners = events[type];\n\n if (typeof listeners === 'function') {\n this.removeListener(type, listeners);\n } else if (listeners !== undefined) {\n // LIFO order\n for (i = listeners.length - 1; i >= 0; i--) {\n this.removeListener(type, listeners[i]);\n }\n }\n\n return this;\n };\n\nfunction _listeners(target, type, unwrap) {\n var events = target._events;\n\n if (events === undefined)\n return [];\n\n var evlistener = events[type];\n if (evlistener === undefined)\n return [];\n\n if (typeof evlistener === 'function')\n return unwrap ? [evlistener.listener || evlistener] : [evlistener];\n\n return unwrap ?\n unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length);\n}\n\nEventEmitter.prototype.listeners = function listeners(type) {\n return _listeners(this, type, true);\n};\n\nEventEmitter.prototype.rawListeners = function rawListeners(type) {\n return _listeners(this, type, false);\n};\n\nEventEmitter.listenerCount = function(emitter, type) {\n if (typeof emitter.listenerCount === 'function') {\n return emitter.listenerCount(type);\n } else {\n return listenerCount.call(emitter, type);\n }\n};\n\nEventEmitter.prototype.listenerCount = listenerCount;\nfunction listenerCount(type) {\n var events = this._events;\n\n if (events !== undefined) {\n var evlistener = events[type];\n\n if (typeof evlistener === 'function') {\n return 1;\n } else if (evlistener !== undefined) {\n return evlistener.length;\n }\n }\n\n return 0;\n}\n\nEventEmitter.prototype.eventNames = function eventNames() {\n return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : [];\n};\n\nfunction arrayClone(arr, n) {\n var copy = new Array(n);\n for (var i = 0; i < n; ++i)\n copy[i] = arr[i];\n return copy;\n}\n\nfunction spliceOne(list, index) {\n for (; index + 1 < list.length; index++)\n list[index] = list[index + 1];\n list.pop();\n}\n\nfunction unwrapListeners(arr) {\n var ret = new Array(arr.length);\n for (var i = 0; i < ret.length; ++i) {\n ret[i] = arr[i].listener || arr[i];\n }\n return ret;\n}\n\nfunction once(emitter, name) {\n return new Promise(function (resolve, reject) {\n function errorListener(err) {\n emitter.removeListener(name, resolver);\n reject(err);\n }\n\n function resolver() {\n if (typeof emitter.removeListener === 'function') {\n emitter.removeListener('error', errorListener);\n }\n resolve([].slice.call(arguments));\n };\n\n eventTargetAgnosticAddListener(emitter, name, resolver, { once: true });\n if (name !== 'error') {\n addErrorHandlerIfEventEmitter(emitter, errorListener, { once: true });\n }\n });\n}\n\nfunction addErrorHandlerIfEventEmitter(emitter, handler, flags) {\n if (typeof emitter.on === 'function') {\n eventTargetAgnosticAddListener(emitter, 'error', handler, flags);\n }\n}\n\nfunction eventTargetAgnosticAddListener(emitter, name, listener, flags) {\n if (typeof emitter.on === 'function') {\n if (flags.once) {\n emitter.once(name, listener);\n } else {\n emitter.on(name, listener);\n }\n } else if (typeof emitter.addEventListener === 'function') {\n // EventTarget does not have `error` event semantics like Node\n // EventEmitters, we do not listen for `error` events here.\n emitter.addEventListener(name, function wrapListener(arg) {\n // IE does not have builtin `{ once: true }` support so we\n // have to do it manually.\n if (flags.once) {\n emitter.removeEventListener(name, wrapListener);\n }\n listener(arg);\n });\n } else {\n throw new TypeError('The \"emitter\" argument must be of type EventEmitter. Received type ' + typeof emitter);\n }\n}\n","/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */\nexports.read = function (buffer, offset, isLE, mLen, nBytes) {\n var e, m\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var nBits = -7\n var i = isLE ? (nBytes - 1) : 0\n var d = isLE ? -1 : 1\n var s = buffer[offset + i]\n\n i += d\n\n e = s & ((1 << (-nBits)) - 1)\n s >>= (-nBits)\n nBits += eLen\n for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & ((1 << (-nBits)) - 1)\n e >>= (-nBits)\n nBits += mLen\n for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias\n } else if (e === eMax) {\n return m ? NaN : ((s ? -1 : 1) * Infinity)\n } else {\n m = m + Math.pow(2, mLen)\n e = e - eBias\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n var i = isLE ? 0 : (nBytes - 1)\n var d = isLE ? 1 : -1\n var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n value = Math.abs(value)\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0\n e = eMax\n } else {\n e = Math.floor(Math.log(value) / Math.LN2)\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--\n c *= 2\n }\n if (e + eBias >= 1) {\n value += rt / c\n } else {\n value += rt * Math.pow(2, 1 - eBias)\n }\n if (value * c >= 2) {\n e++\n c /= 2\n }\n\n if (e + eBias >= eMax) {\n m = 0\n e = eMax\n } else if (e + eBias >= 1) {\n m = ((value * c) - 1) * Math.pow(2, mLen)\n e = e + eBias\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n e = 0\n }\n }\n\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n e = (e << mLen) | m\n eLen += mLen\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128\n}\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView');\n\nmodule.exports = DataView;\n","var hashClear = require('./_hashClear'),\n hashDelete = require('./_hashDelete'),\n hashGet = require('./_hashGet'),\n hashHas = require('./_hashHas'),\n hashSet = require('./_hashSet');\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\nmodule.exports = Hash;\n","var listCacheClear = require('./_listCacheClear'),\n listCacheDelete = require('./_listCacheDelete'),\n listCacheGet = require('./_listCacheGet'),\n listCacheHas = require('./_listCacheHas'),\n listCacheSet = require('./_listCacheSet');\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\nmodule.exports = ListCache;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map');\n\nmodule.exports = Map;\n","var mapCacheClear = require('./_mapCacheClear'),\n mapCacheDelete = require('./_mapCacheDelete'),\n mapCacheGet = require('./_mapCacheGet'),\n mapCacheHas = require('./_mapCacheHas'),\n mapCacheSet = require('./_mapCacheSet');\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\nmodule.exports = MapCache;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Promise = getNative(root, 'Promise');\n\nmodule.exports = Promise;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Set = getNative(root, 'Set');\n\nmodule.exports = Set;\n","var MapCache = require('./_MapCache'),\n setCacheAdd = require('./_setCacheAdd'),\n setCacheHas = require('./_setCacheHas');\n\n/**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\nfunction SetCache(values) {\n var index = -1,\n length = values == null ? 0 : values.length;\n\n this.__data__ = new MapCache;\n while (++index < length) {\n this.add(values[index]);\n }\n}\n\n// Add methods to `SetCache`.\nSetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\nSetCache.prototype.has = setCacheHas;\n\nmodule.exports = SetCache;\n","var ListCache = require('./_ListCache'),\n stackClear = require('./_stackClear'),\n stackDelete = require('./_stackDelete'),\n stackGet = require('./_stackGet'),\n stackHas = require('./_stackHas'),\n stackSet = require('./_stackSet');\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\nmodule.exports = Stack;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Uint8Array = root.Uint8Array;\n\nmodule.exports = Uint8Array;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar WeakMap = getNative(root, 'WeakMap');\n\nmodule.exports = WeakMap;\n","/**\n * A specialized version of `_.forEach` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\nfunction arrayEach(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (iteratee(array[index], index, array) === false) {\n break;\n }\n }\n return array;\n}\n\nmodule.exports = arrayEach;\n","/**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\nfunction arrayFilter(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result[resIndex++] = value;\n }\n }\n return result;\n}\n\nmodule.exports = arrayFilter;\n","var baseTimes = require('./_baseTimes'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isIndex = require('./_isIndex'),\n isTypedArray = require('./isTypedArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = arrayLikeKeys;\n","/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n}\n\nmodule.exports = arrayPush;\n","/**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\nfunction arraySome(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (predicate(array[index], index, array)) {\n return true;\n }\n }\n return false;\n}\n\nmodule.exports = arraySome;\n","var baseAssignValue = require('./_baseAssignValue'),\n eq = require('./eq');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\nmodule.exports = assignValue;\n","var eq = require('./eq');\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\nmodule.exports = assocIndexOf;\n","var copyObject = require('./_copyObject'),\n keys = require('./keys');\n\n/**\n * The base implementation of `_.assign` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssign(object, source) {\n return object && copyObject(source, keys(source), object);\n}\n\nmodule.exports = baseAssign;\n","var copyObject = require('./_copyObject'),\n keysIn = require('./keysIn');\n\n/**\n * The base implementation of `_.assignIn` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssignIn(object, source) {\n return object && copyObject(source, keysIn(source), object);\n}\n\nmodule.exports = baseAssignIn;\n","var defineProperty = require('./_defineProperty');\n\n/**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction baseAssignValue(object, key, value) {\n if (key == '__proto__' && defineProperty) {\n defineProperty(object, key, {\n 'configurable': true,\n 'enumerable': true,\n 'value': value,\n 'writable': true\n });\n } else {\n object[key] = value;\n }\n}\n\nmodule.exports = baseAssignValue;\n","var Stack = require('./_Stack'),\n arrayEach = require('./_arrayEach'),\n assignValue = require('./_assignValue'),\n baseAssign = require('./_baseAssign'),\n baseAssignIn = require('./_baseAssignIn'),\n cloneBuffer = require('./_cloneBuffer'),\n copyArray = require('./_copyArray'),\n copySymbols = require('./_copySymbols'),\n copySymbolsIn = require('./_copySymbolsIn'),\n getAllKeys = require('./_getAllKeys'),\n getAllKeysIn = require('./_getAllKeysIn'),\n getTag = require('./_getTag'),\n initCloneArray = require('./_initCloneArray'),\n initCloneByTag = require('./_initCloneByTag'),\n initCloneObject = require('./_initCloneObject'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isMap = require('./isMap'),\n isObject = require('./isObject'),\n isSet = require('./isSet'),\n keys = require('./keys'),\n keysIn = require('./keysIn');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_FLAT_FLAG = 2,\n CLONE_SYMBOLS_FLAG = 4;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values supported by `_.clone`. */\nvar cloneableTags = {};\ncloneableTags[argsTag] = cloneableTags[arrayTag] =\ncloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =\ncloneableTags[boolTag] = cloneableTags[dateTag] =\ncloneableTags[float32Tag] = cloneableTags[float64Tag] =\ncloneableTags[int8Tag] = cloneableTags[int16Tag] =\ncloneableTags[int32Tag] = cloneableTags[mapTag] =\ncloneableTags[numberTag] = cloneableTags[objectTag] =\ncloneableTags[regexpTag] = cloneableTags[setTag] =\ncloneableTags[stringTag] = cloneableTags[symbolTag] =\ncloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =\ncloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;\ncloneableTags[errorTag] = cloneableTags[funcTag] =\ncloneableTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.clone` and `_.cloneDeep` which tracks\n * traversed objects.\n *\n * @private\n * @param {*} value The value to clone.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Deep clone\n * 2 - Flatten inherited properties\n * 4 - Clone symbols\n * @param {Function} [customizer] The function to customize cloning.\n * @param {string} [key] The key of `value`.\n * @param {Object} [object] The parent object of `value`.\n * @param {Object} [stack] Tracks traversed objects and their clone counterparts.\n * @returns {*} Returns the cloned value.\n */\nfunction baseClone(value, bitmask, customizer, key, object, stack) {\n var result,\n isDeep = bitmask & CLONE_DEEP_FLAG,\n isFlat = bitmask & CLONE_FLAT_FLAG,\n isFull = bitmask & CLONE_SYMBOLS_FLAG;\n\n if (customizer) {\n result = object ? customizer(value, key, object, stack) : customizer(value);\n }\n if (result !== undefined) {\n return result;\n }\n if (!isObject(value)) {\n return value;\n }\n var isArr = isArray(value);\n if (isArr) {\n result = initCloneArray(value);\n if (!isDeep) {\n return copyArray(value, result);\n }\n } else {\n var tag = getTag(value),\n isFunc = tag == funcTag || tag == genTag;\n\n if (isBuffer(value)) {\n return cloneBuffer(value, isDeep);\n }\n if (tag == objectTag || tag == argsTag || (isFunc && !object)) {\n result = (isFlat || isFunc) ? {} : initCloneObject(value);\n if (!isDeep) {\n return isFlat\n ? copySymbolsIn(value, baseAssignIn(result, value))\n : copySymbols(value, baseAssign(result, value));\n }\n } else {\n if (!cloneableTags[tag]) {\n return object ? value : {};\n }\n result = initCloneByTag(value, tag, isDeep);\n }\n }\n // Check for circular references and return its corresponding clone.\n stack || (stack = new Stack);\n var stacked = stack.get(value);\n if (stacked) {\n return stacked;\n }\n stack.set(value, result);\n\n if (isSet(value)) {\n value.forEach(function(subValue) {\n result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));\n });\n } else if (isMap(value)) {\n value.forEach(function(subValue, key) {\n result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n }\n\n var keysFunc = isFull\n ? (isFlat ? getAllKeysIn : getAllKeys)\n : (isFlat ? keysIn : keys);\n\n var props = isArr ? undefined : keysFunc(value);\n arrayEach(props || value, function(subValue, key) {\n if (props) {\n key = subValue;\n subValue = value[key];\n }\n // Recursively populate clone (susceptible to call stack limits).\n assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n return result;\n}\n\nmodule.exports = baseClone;\n","var isObject = require('./isObject');\n\n/** Built-in value references. */\nvar objectCreate = Object.create;\n\n/**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} proto The object to inherit from.\n * @returns {Object} Returns the new object.\n */\nvar baseCreate = (function() {\n function object() {}\n return function(proto) {\n if (!isObject(proto)) {\n return {};\n }\n if (objectCreate) {\n return objectCreate(proto);\n }\n object.prototype = proto;\n var result = new object;\n object.prototype = undefined;\n return result;\n };\n}());\n\nmodule.exports = baseCreate;\n","var arrayPush = require('./_arrayPush'),\n isArray = require('./isArray');\n\n/**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction baseGetAllKeys(object, keysFunc, symbolsFunc) {\n var result = keysFunc(object);\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n}\n\nmodule.exports = baseGetAllKeys;\n","var Symbol = require('./_Symbol'),\n getRawTag = require('./_getRawTag'),\n objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]';\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\nmodule.exports = baseIsArguments;\n","var baseIsEqualDeep = require('./_baseIsEqualDeep'),\n isObjectLike = require('./isObjectLike');\n\n/**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Unordered comparison\n * 2 - Partial comparison\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\nfunction baseIsEqual(value, other, bitmask, customizer, stack) {\n if (value === other) {\n return true;\n }\n if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\n return value !== value && other !== other;\n }\n return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n}\n\nmodule.exports = baseIsEqual;\n","var Stack = require('./_Stack'),\n equalArrays = require('./_equalArrays'),\n equalByTag = require('./_equalByTag'),\n equalObjects = require('./_equalObjects'),\n getTag = require('./_getTag'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isTypedArray = require('./isTypedArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n var objIsArr = isArray(object),\n othIsArr = isArray(other),\n objTag = objIsArr ? arrayTag : getTag(object),\n othTag = othIsArr ? arrayTag : getTag(other);\n\n objTag = objTag == argsTag ? objectTag : objTag;\n othTag = othTag == argsTag ? objectTag : othTag;\n\n var objIsObj = objTag == objectTag,\n othIsObj = othTag == objectTag,\n isSameTag = objTag == othTag;\n\n if (isSameTag && isBuffer(object)) {\n if (!isBuffer(other)) {\n return false;\n }\n objIsArr = true;\n objIsObj = false;\n }\n if (isSameTag && !objIsObj) {\n stack || (stack = new Stack);\n return (objIsArr || isTypedArray(object))\n ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n }\n if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n if (objIsWrapped || othIsWrapped) {\n var objUnwrapped = objIsWrapped ? object.value() : object,\n othUnwrapped = othIsWrapped ? other.value() : other;\n\n stack || (stack = new Stack);\n return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n }\n }\n if (!isSameTag) {\n return false;\n }\n stack || (stack = new Stack);\n return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n}\n\nmodule.exports = baseIsEqualDeep;\n","var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]';\n\n/**\n * The base implementation of `_.isMap` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n */\nfunction baseIsMap(value) {\n return isObjectLike(value) && getTag(value) == mapTag;\n}\n\nmodule.exports = baseIsMap;\n","var isFunction = require('./isFunction'),\n isMasked = require('./_isMasked'),\n isObject = require('./isObject'),\n toSource = require('./_toSource');\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\nmodule.exports = baseIsNative;\n","var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar setTag = '[object Set]';\n\n/**\n * The base implementation of `_.isSet` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n */\nfunction baseIsSet(value) {\n return isObjectLike(value) && getTag(value) == setTag;\n}\n\nmodule.exports = baseIsSet;\n","var baseGetTag = require('./_baseGetTag'),\n isLength = require('./isLength'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n\nmodule.exports = baseIsTypedArray;\n","var isPrototype = require('./_isPrototype'),\n nativeKeys = require('./_nativeKeys');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeys;\n","var isObject = require('./isObject'),\n isPrototype = require('./_isPrototype'),\n nativeKeysIn = require('./_nativeKeysIn');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeysIn(object) {\n if (!isObject(object)) {\n return nativeKeysIn(object);\n }\n var isProto = isPrototype(object),\n result = [];\n\n for (var key in object) {\n if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeysIn;\n","/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\nmodule.exports = baseTimes;\n","/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n return function(value) {\n return func(value);\n };\n}\n\nmodule.exports = baseUnary;\n","/**\n * Checks if a `cache` value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction cacheHas(cache, key) {\n return cache.has(key);\n}\n\nmodule.exports = cacheHas;\n","var Uint8Array = require('./_Uint8Array');\n\n/**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\nfunction cloneArrayBuffer(arrayBuffer) {\n var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n return result;\n}\n\nmodule.exports = cloneArrayBuffer;\n","var root = require('./_root');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined,\n allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;\n\n/**\n * Creates a clone of `buffer`.\n *\n * @private\n * @param {Buffer} buffer The buffer to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Buffer} Returns the cloned buffer.\n */\nfunction cloneBuffer(buffer, isDeep) {\n if (isDeep) {\n return buffer.slice();\n }\n var length = buffer.length,\n result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\n\n buffer.copy(result);\n return result;\n}\n\nmodule.exports = cloneBuffer;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer');\n\n/**\n * Creates a clone of `dataView`.\n *\n * @private\n * @param {Object} dataView The data view to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned data view.\n */\nfunction cloneDataView(dataView, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;\n return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);\n}\n\nmodule.exports = cloneDataView;\n","/** Used to match `RegExp` flags from their coerced string values. */\nvar reFlags = /\\w*$/;\n\n/**\n * Creates a clone of `regexp`.\n *\n * @private\n * @param {Object} regexp The regexp to clone.\n * @returns {Object} Returns the cloned regexp.\n */\nfunction cloneRegExp(regexp) {\n var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));\n result.lastIndex = regexp.lastIndex;\n return result;\n}\n\nmodule.exports = cloneRegExp;\n","var Symbol = require('./_Symbol');\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * Creates a clone of the `symbol` object.\n *\n * @private\n * @param {Object} symbol The symbol object to clone.\n * @returns {Object} Returns the cloned symbol object.\n */\nfunction cloneSymbol(symbol) {\n return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};\n}\n\nmodule.exports = cloneSymbol;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer');\n\n/**\n * Creates a clone of `typedArray`.\n *\n * @private\n * @param {Object} typedArray The typed array to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned typed array.\n */\nfunction cloneTypedArray(typedArray, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n}\n\nmodule.exports = cloneTypedArray;\n","/**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\nfunction copyArray(source, array) {\n var index = -1,\n length = source.length;\n\n array || (array = Array(length));\n while (++index < length) {\n array[index] = source[index];\n }\n return array;\n}\n\nmodule.exports = copyArray;\n","var assignValue = require('./_assignValue'),\n baseAssignValue = require('./_baseAssignValue');\n\n/**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\nfunction copyObject(source, props, object, customizer) {\n var isNew = !object;\n object || (object = {});\n\n var index = -1,\n length = props.length;\n\n while (++index < length) {\n var key = props[index];\n\n var newValue = customizer\n ? customizer(object[key], source[key], key, object, source)\n : undefined;\n\n if (newValue === undefined) {\n newValue = source[key];\n }\n if (isNew) {\n baseAssignValue(object, key, newValue);\n } else {\n assignValue(object, key, newValue);\n }\n }\n return object;\n}\n\nmodule.exports = copyObject;\n","var copyObject = require('./_copyObject'),\n getSymbols = require('./_getSymbols');\n\n/**\n * Copies own symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbols(source, object) {\n return copyObject(source, getSymbols(source), object);\n}\n\nmodule.exports = copySymbols;\n","var copyObject = require('./_copyObject'),\n getSymbolsIn = require('./_getSymbolsIn');\n\n/**\n * Copies own and inherited symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbolsIn(source, object) {\n return copyObject(source, getSymbolsIn(source), object);\n}\n\nmodule.exports = copySymbolsIn;\n","var root = require('./_root');\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\nmodule.exports = coreJsData;\n","var getNative = require('./_getNative');\n\nvar defineProperty = (function() {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n}());\n\nmodule.exports = defineProperty;\n","var SetCache = require('./_SetCache'),\n arraySome = require('./_arraySome'),\n cacheHas = require('./_cacheHas');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\nfunction equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n arrLength = array.length,\n othLength = other.length;\n\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n return false;\n }\n // Check that cyclic values are equal.\n var arrStacked = stack.get(array);\n var othStacked = stack.get(other);\n if (arrStacked && othStacked) {\n return arrStacked == other && othStacked == array;\n }\n var index = -1,\n result = true,\n seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n stack.set(array, other);\n stack.set(other, array);\n\n // Ignore non-index properties.\n while (++index < arrLength) {\n var arrValue = array[index],\n othValue = other[index];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, arrValue, index, other, array, stack)\n : customizer(arrValue, othValue, index, array, other, stack);\n }\n if (compared !== undefined) {\n if (compared) {\n continue;\n }\n result = false;\n break;\n }\n // Recursively compare arrays (susceptible to call stack limits).\n if (seen) {\n if (!arraySome(other, function(othValue, othIndex) {\n if (!cacheHas(seen, othIndex) &&\n (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n return seen.push(othIndex);\n }\n })) {\n result = false;\n break;\n }\n } else if (!(\n arrValue === othValue ||\n equalFunc(arrValue, othValue, bitmask, customizer, stack)\n )) {\n result = false;\n break;\n }\n }\n stack['delete'](array);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalArrays;\n","var Symbol = require('./_Symbol'),\n Uint8Array = require('./_Uint8Array'),\n eq = require('./eq'),\n equalArrays = require('./_equalArrays'),\n mapToArray = require('./_mapToArray'),\n setToArray = require('./_setToArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]';\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n switch (tag) {\n case dataViewTag:\n if ((object.byteLength != other.byteLength) ||\n (object.byteOffset != other.byteOffset)) {\n return false;\n }\n object = object.buffer;\n other = other.buffer;\n\n case arrayBufferTag:\n if ((object.byteLength != other.byteLength) ||\n !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n return false;\n }\n return true;\n\n case boolTag:\n case dateTag:\n case numberTag:\n // Coerce booleans to `1` or `0` and dates to milliseconds.\n // Invalid dates are coerced to `NaN`.\n return eq(+object, +other);\n\n case errorTag:\n return object.name == other.name && object.message == other.message;\n\n case regexpTag:\n case stringTag:\n // Coerce regexes to strings and treat strings, primitives and objects,\n // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n // for more details.\n return object == (other + '');\n\n case mapTag:\n var convert = mapToArray;\n\n case setTag:\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n convert || (convert = setToArray);\n\n if (object.size != other.size && !isPartial) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked) {\n return stacked == other;\n }\n bitmask |= COMPARE_UNORDERED_FLAG;\n\n // Recursively compare objects (susceptible to call stack limits).\n stack.set(object, other);\n var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n stack['delete'](object);\n return result;\n\n case symbolTag:\n if (symbolValueOf) {\n return symbolValueOf.call(object) == symbolValueOf.call(other);\n }\n }\n return false;\n}\n\nmodule.exports = equalByTag;\n","var getAllKeys = require('./_getAllKeys');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n objProps = getAllKeys(object),\n objLength = objProps.length,\n othProps = getAllKeys(other),\n othLength = othProps.length;\n\n if (objLength != othLength && !isPartial) {\n return false;\n }\n var index = objLength;\n while (index--) {\n var key = objProps[index];\n if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n return false;\n }\n }\n // Check that cyclic values are equal.\n var objStacked = stack.get(object);\n var othStacked = stack.get(other);\n if (objStacked && othStacked) {\n return objStacked == other && othStacked == object;\n }\n var result = true;\n stack.set(object, other);\n stack.set(other, object);\n\n var skipCtor = isPartial;\n while (++index < objLength) {\n key = objProps[index];\n var objValue = object[key],\n othValue = other[key];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, objValue, key, other, object, stack)\n : customizer(objValue, othValue, key, object, other, stack);\n }\n // Recursively compare objects (susceptible to call stack limits).\n if (!(compared === undefined\n ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n : compared\n )) {\n result = false;\n break;\n }\n skipCtor || (skipCtor = key == 'constructor');\n }\n if (result && !skipCtor) {\n var objCtor = object.constructor,\n othCtor = other.constructor;\n\n // Non `Object` object instances with different constructors are not equal.\n if (objCtor != othCtor &&\n ('constructor' in object && 'constructor' in other) &&\n !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n result = false;\n }\n }\n stack['delete'](object);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalObjects;\n","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n","var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbols = require('./_getSymbols'),\n keys = require('./keys');\n\n/**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeys(object) {\n return baseGetAllKeys(object, keys, getSymbols);\n}\n\nmodule.exports = getAllKeys;\n","var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbolsIn = require('./_getSymbolsIn'),\n keysIn = require('./keysIn');\n\n/**\n * Creates an array of own and inherited enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeysIn(object) {\n return baseGetAllKeys(object, keysIn, getSymbolsIn);\n}\n\nmodule.exports = getAllKeysIn;\n","var isKeyable = require('./_isKeyable');\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\nmodule.exports = getMapData;\n","var baseIsNative = require('./_baseIsNative'),\n getValue = require('./_getValue');\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\nmodule.exports = getNative;\n","var overArg = require('./_overArg');\n\n/** Built-in value references. */\nvar getPrototype = overArg(Object.getPrototypeOf, Object);\n\nmodule.exports = getPrototype;\n","var Symbol = require('./_Symbol');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nmodule.exports = getRawTag;\n","var arrayFilter = require('./_arrayFilter'),\n stubArray = require('./stubArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n if (object == null) {\n return [];\n }\n object = Object(object);\n return arrayFilter(nativeGetSymbols(object), function(symbol) {\n return propertyIsEnumerable.call(object, symbol);\n });\n};\n\nmodule.exports = getSymbols;\n","var arrayPush = require('./_arrayPush'),\n getPrototype = require('./_getPrototype'),\n getSymbols = require('./_getSymbols'),\n stubArray = require('./stubArray');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own and inherited enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {\n var result = [];\n while (object) {\n arrayPush(result, getSymbols(object));\n object = getPrototype(object);\n }\n return result;\n};\n\nmodule.exports = getSymbolsIn;\n","var DataView = require('./_DataView'),\n Map = require('./_Map'),\n Promise = require('./_Promise'),\n Set = require('./_Set'),\n WeakMap = require('./_WeakMap'),\n baseGetTag = require('./_baseGetTag'),\n toSource = require('./_toSource');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n setTag = '[object Set]',\n weakMapTag = '[object WeakMap]';\n\nvar dataViewTag = '[object DataView]';\n\n/** Used to detect maps, sets, and weakmaps. */\nvar dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nvar getTag = baseGetTag;\n\n// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\nif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = baseGetTag(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : '';\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n}\n\nmodule.exports = getTag;\n","/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\nmodule.exports = getValue;\n","var nativeCreate = require('./_nativeCreate');\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n}\n\nmodule.exports = hashClear;\n","/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = hashDelete;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\nmodule.exports = hashGet;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\nmodule.exports = hashHas;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\nmodule.exports = hashSet;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Initializes an array clone.\n *\n * @private\n * @param {Array} array The array to clone.\n * @returns {Array} Returns the initialized clone.\n */\nfunction initCloneArray(array) {\n var length = array.length,\n result = new array.constructor(length);\n\n // Add properties assigned by `RegExp#exec`.\n if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {\n result.index = array.index;\n result.input = array.input;\n }\n return result;\n}\n\nmodule.exports = initCloneArray;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer'),\n cloneDataView = require('./_cloneDataView'),\n cloneRegExp = require('./_cloneRegExp'),\n cloneSymbol = require('./_cloneSymbol'),\n cloneTypedArray = require('./_cloneTypedArray');\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/**\n * Initializes an object clone based on its `toStringTag`.\n *\n * **Note:** This function only supports cloning values with tags of\n * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.\n *\n * @private\n * @param {Object} object The object to clone.\n * @param {string} tag The `toStringTag` of the object to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneByTag(object, tag, isDeep) {\n var Ctor = object.constructor;\n switch (tag) {\n case arrayBufferTag:\n return cloneArrayBuffer(object);\n\n case boolTag:\n case dateTag:\n return new Ctor(+object);\n\n case dataViewTag:\n return cloneDataView(object, isDeep);\n\n case float32Tag: case float64Tag:\n case int8Tag: case int16Tag: case int32Tag:\n case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:\n return cloneTypedArray(object, isDeep);\n\n case mapTag:\n return new Ctor;\n\n case numberTag:\n case stringTag:\n return new Ctor(object);\n\n case regexpTag:\n return cloneRegExp(object);\n\n case setTag:\n return new Ctor;\n\n case symbolTag:\n return cloneSymbol(object);\n }\n}\n\nmodule.exports = initCloneByTag;\n","var baseCreate = require('./_baseCreate'),\n getPrototype = require('./_getPrototype'),\n isPrototype = require('./_isPrototype');\n\n/**\n * Initializes an object clone.\n *\n * @private\n * @param {Object} object The object to clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneObject(object) {\n return (typeof object.constructor == 'function' && !isPrototype(object))\n ? baseCreate(getPrototype(object))\n : {};\n}\n\nmodule.exports = initCloneObject;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n var type = typeof value;\n length = length == null ? MAX_SAFE_INTEGER : length;\n\n return !!length &&\n (type == 'number' ||\n (type != 'symbol' && reIsUint.test(value))) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\nmodule.exports = isIndex;\n","/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\nmodule.exports = isKeyable;\n","var coreJsData = require('./_coreJsData');\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\nmodule.exports = isMasked;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\nmodule.exports = isPrototype;\n","/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n}\n\nmodule.exports = listCacheClear;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype;\n\n/** Built-in value references. */\nvar splice = arrayProto.splice;\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n}\n\nmodule.exports = listCacheDelete;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\nmodule.exports = listCacheGet;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\nmodule.exports = listCacheHas;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\nmodule.exports = listCacheSet;\n","var Hash = require('./_Hash'),\n ListCache = require('./_ListCache'),\n Map = require('./_Map');\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\nmodule.exports = mapCacheClear;\n","var getMapData = require('./_getMapData');\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = mapCacheDelete;\n","var getMapData = require('./_getMapData');\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\nmodule.exports = mapCacheGet;\n","var getMapData = require('./_getMapData');\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\nmodule.exports = mapCacheHas;\n","var getMapData = require('./_getMapData');\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n}\n\nmodule.exports = mapCacheSet;\n","/**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\nfunction mapToArray(map) {\n var index = -1,\n result = Array(map.size);\n\n map.forEach(function(value, key) {\n result[++index] = [key, value];\n });\n return result;\n}\n\nmodule.exports = mapToArray;\n","var getNative = require('./_getNative');\n\n/* Built-in method references that are verified to be native. */\nvar nativeCreate = getNative(Object, 'create');\n\nmodule.exports = nativeCreate;\n","var overArg = require('./_overArg');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeKeys = overArg(Object.keys, Object);\n\nmodule.exports = nativeKeys;\n","/**\n * This function is like\n * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * except that it includes inherited enumerable properties.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction nativeKeysIn(object) {\n var result = [];\n if (object != null) {\n for (var key in Object(object)) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = nativeKeysIn;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n try {\n // Use `util.types` for Node.js 10+.\n var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n if (types) {\n return types;\n }\n\n // Legacy `process.binding('util')` for Node.js < 10.\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n}());\n\nmodule.exports = nodeUtil;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n","/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\nmodule.exports = overArg;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n","/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\nfunction setCacheAdd(value) {\n this.__data__.set(value, HASH_UNDEFINED);\n return this;\n}\n\nmodule.exports = setCacheAdd;\n","/**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\nfunction setCacheHas(value) {\n return this.__data__.has(value);\n}\n\nmodule.exports = setCacheHas;\n","/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\nfunction setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n}\n\nmodule.exports = setToArray;\n","var ListCache = require('./_ListCache');\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}\n\nmodule.exports = stackClear;\n","/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n var data = this.__data__,\n result = data['delete'](key);\n\n this.size = data.size;\n return result;\n}\n\nmodule.exports = stackDelete;\n","/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n return this.__data__.get(key);\n}\n\nmodule.exports = stackGet;\n","/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n return this.__data__.has(key);\n}\n\nmodule.exports = stackHas;\n","var ListCache = require('./_ListCache'),\n Map = require('./_Map'),\n MapCache = require('./_MapCache');\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n var data = this.__data__;\n if (data instanceof ListCache) {\n var pairs = data.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n this.size = ++data.size;\n return this;\n }\n data = this.__data__ = new MapCache(pairs);\n }\n data.set(key, value);\n this.size = data.size;\n return this;\n}\n\nmodule.exports = stackSet;\n","/** Used for built-in method references. */\nvar funcProto = Function.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\nmodule.exports = toSource;\n","var baseClone = require('./_baseClone');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_SYMBOLS_FLAG = 4;\n\n/**\n * This method is like `_.clone` except that it recursively clones `value`.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Lang\n * @param {*} value The value to recursively clone.\n * @returns {*} Returns the deep cloned value.\n * @see _.clone\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var deep = _.cloneDeep(objects);\n * console.log(deep[0] === objects[0]);\n * // => false\n */\nfunction cloneDeep(value) {\n return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);\n}\n\nmodule.exports = cloneDeep;\n","/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\nmodule.exports = eq;\n","var baseIsArguments = require('./_baseIsArguments'),\n isObjectLike = require('./isObjectLike');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n};\n\nmodule.exports = isArguments;\n","/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\nmodule.exports = isArray;\n","var isFunction = require('./isFunction'),\n isLength = require('./isLength');\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\nmodule.exports = isArrayLike;\n","var root = require('./_root'),\n stubFalse = require('./stubFalse');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\nmodule.exports = isBuffer;\n","var baseIsEqual = require('./_baseIsEqual');\n\n/**\n * Performs a deep comparison between two values to determine if they are\n * equivalent.\n *\n * **Note:** This method supports comparing arrays, array buffers, booleans,\n * date objects, error objects, maps, numbers, `Object` objects, regexes,\n * sets, strings, symbols, and typed arrays. `Object` objects are compared\n * by their own, not inherited, enumerable properties. Functions and DOM\n * nodes are compared by strict equality, i.e. `===`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.isEqual(object, other);\n * // => true\n *\n * object === other;\n * // => false\n */\nfunction isEqual(value, other) {\n return baseIsEqual(value, other);\n}\n\nmodule.exports = isEqual;\n","var baseGetTag = require('./_baseGetTag'),\n isObject = require('./isObject');\n\n/** `Object#toString` result references. */\nvar asyncTag = '[object AsyncFunction]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n proxyTag = '[object Proxy]';\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\nmodule.exports = isFunction;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\nmodule.exports = isLength;\n","var baseIsMap = require('./_baseIsMap'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsMap = nodeUtil && nodeUtil.isMap;\n\n/**\n * Checks if `value` is classified as a `Map` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n * @example\n *\n * _.isMap(new Map);\n * // => true\n *\n * _.isMap(new WeakMap);\n * // => false\n */\nvar isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;\n\nmodule.exports = isMap;\n","/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n","var baseIsSet = require('./_baseIsSet'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsSet = nodeUtil && nodeUtil.isSet;\n\n/**\n * Checks if `value` is classified as a `Set` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n * @example\n *\n * _.isSet(new Set);\n * // => true\n *\n * _.isSet(new WeakSet);\n * // => false\n */\nvar isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;\n\nmodule.exports = isSet;\n","var baseIsTypedArray = require('./_baseIsTypedArray'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\nmodule.exports = isTypedArray;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeys = require('./_baseKeys'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\nmodule.exports = keys;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeysIn = require('./_baseKeysIn'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\nfunction keysIn(object) {\n return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n}\n\nmodule.exports = keysIn;\n","/**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\nfunction stubArray() {\n return [];\n}\n\nmodule.exports = stubArray;\n","/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n return false;\n}\n\nmodule.exports = stubFalse;\n","import { connect, type BaseConnectionOptions } from \"@openfin/core-web\";\nimport { getSettings } from \"./settings\";\n\n/**\n * Initializes the OpenFin Web Broker connection.\n * @param inherit Should we inherit settings from the host (available in the OpenFin layout system) or use settings? Default is true.\n */\nexport async function init(inherit: boolean = true): Promise {\n\t// Set window.fin to the `fin` object.\n\tlet options: BaseConnectionOptions | undefined;\n\tif (window.fin === undefined) {\n\t\tif (!inherit) {\n\t\t\tconst settings = await getSettings();\n\t\t\tif (settings === undefined) {\n\t\t\t\tconsole.error(\n\t\t\t\t\t\"Unable to run the sample as we have been unable to load the web manifest and it's settings from the currently running html page. Please ensure that the web manifest is being served and that it contains the custom_settings section.\"\n\t\t\t\t);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\toptions = {\n\t\t\t\tbrokerUrl: settings.platform.interop.brokerUrl,\n\t\t\t\tinteropConfig: {\n\t\t\t\t\tproviderId: settings.platform.interop.providerId,\n\t\t\t\t\tcurrentContextGroup: settings.platform.interop.defaultContextGroup\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t\t// Specify an interopConfig with a specific provider ID and a context group to initialize the `fin.me.interop` client on connection.\n\t\tif (options) {\n\t\t\twindow.fin = await connect({\n\t\t\t\toptions\n\t\t\t});\n\t\t} else {\n\t\t\twindow.fin = await connect({\n\t\t\t\tconnectionInheritance: \"enabled\"\n\t\t\t});\n\t\t}\n\t\tconsole.log(\"Finished initializing the fin API.\");\n\t\t// Create and dispatch the finReady event\n\t\tconst event = new CustomEvent(\"finReady\");\n\t\twindow.dispatchEvent(event);\n\t}\n\n\tif (window.fdc3 === undefined && window?.fin?.me.interop?.getFDC3Sync !== undefined) {\n\t\twindow.fdc3 = fin.me.interop.getFDC3Sync(\"2.0\");\n\t\tconsole.log(\"Finished initializing the fdc3 API.\");\n\t\t// Create and dispatch the FDC3Ready event\n\t\tconst event = new CustomEvent(\"fdc3Ready\");\n\t\twindow.dispatchEvent(event);\n\t}\n}\n","import type { WebLayoutSnapshot } from \"@openfin/core-web\";\nimport type { Settings } from \"../shapes/setting-shapes\";\n\n/**\n * Fetches the settings for the application.\n * @returns The settings for the application.\n */\nexport async function getSettings(): Promise {\n\tconst settings = await getManifestSettings();\n\tif (settings === undefined) {\n\t\tconsole.error(\n\t\t\t\"Unable to run the example as settings are required and we fetch them from the link web manifest from the html page that is being served. It should exist in the customSettings section of the web manifest.\"\n\t\t);\n\t}\n\treturn settings;\n}\n\n/**\n * Returns a default layout from the settings if provided.\n * @returns The default layout from the settings.\n */\nexport async function getDefaultLayout(): Promise {\n\tconst settings = await getSettings();\n\tif (settings?.platform?.layout?.defaultLayout === undefined) {\n\t\tconsole.error(\n\t\t\t\"Unable to run the example as without a layout being defined. Please ensure that settings have been provided in the web manifest.\"\n\t\t);\n\t\treturn;\n\t}\n\tif (typeof settings.platform.layout.defaultLayout === \"string\") {\n\t\tconst layoutResponse = await fetch(settings.platform.layout.defaultLayout);\n\t\tconst layoutJson = (await layoutResponse.json()) as WebLayoutSnapshot;\n\t\treturn layoutJson;\n\t}\n\treturn settings.platform.layout.defaultLayout;\n}\n\n/**\n * Returns the settings from the manifest file.\n * @returns customSettings for this example\n */\nasync function getManifestSettings(): Promise {\n\t// Get the manifest link\n\tconst link = document.querySelector('link[rel=\"manifest\"]');\n\tif (link !== null) {\n\t\tconst manifestResponse = await fetch(link.href);\n\t\tconst manifestJson = (await manifestResponse.json()) as { custom_settings: Settings };\n\t\treturn manifestJson.custom_settings;\n\t}\n}\n","export { default as v1 } from './v1.js';\nexport { default as v3 } from './v3.js';\nexport { default as v4 } from './v4.js';\nexport { default as v5 } from './v5.js';\nexport { default as NIL } from './nil.js';\nexport { default as version } from './version.js';\nexport { default as validate } from './validate.js';\nexport { default as stringify } from './stringify.js';\nexport { default as parse } from './parse.js';","/*\n * Browser-compatible JavaScript MD5\n *\n * Modification of JavaScript MD5\n * https://github.com/blueimp/JavaScript-MD5\n *\n * Copyright 2011, Sebastian Tschan\n * https://blueimp.net\n *\n * Licensed under the MIT license:\n * https://opensource.org/licenses/MIT\n *\n * Based on\n * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message\n * Digest Algorithm, as defined in RFC 1321.\n * Version 2.2 Copyright (C) Paul Johnston 1999 - 2009\n * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet\n * Distributed under the BSD License\n * See http://pajhome.org.uk/crypt/md5 for more info.\n */\nfunction md5(bytes) {\n if (typeof bytes === 'string') {\n var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape\n\n bytes = new Uint8Array(msg.length);\n\n for (var i = 0; i < msg.length; ++i) {\n bytes[i] = msg.charCodeAt(i);\n }\n }\n\n return md5ToHexEncodedArray(wordsToMd5(bytesToWords(bytes), bytes.length * 8));\n}\n/*\n * Convert an array of little-endian words to an array of bytes\n */\n\n\nfunction md5ToHexEncodedArray(input) {\n var output = [];\n var length32 = input.length * 32;\n var hexTab = '0123456789abcdef';\n\n for (var i = 0; i < length32; i += 8) {\n var x = input[i >> 5] >>> i % 32 & 0xff;\n var hex = parseInt(hexTab.charAt(x >>> 4 & 0x0f) + hexTab.charAt(x & 0x0f), 16);\n output.push(hex);\n }\n\n return output;\n}\n/**\n * Calculate output length with padding and bit length\n */\n\n\nfunction getOutputLength(inputLength8) {\n return (inputLength8 + 64 >>> 9 << 4) + 14 + 1;\n}\n/*\n * Calculate the MD5 of an array of little-endian words, and a bit length.\n */\n\n\nfunction wordsToMd5(x, len) {\n /* append padding */\n x[len >> 5] |= 0x80 << len % 32;\n x[getOutputLength(len) - 1] = len;\n var a = 1732584193;\n var b = -271733879;\n var c = -1732584194;\n var d = 271733878;\n\n for (var i = 0; i < x.length; i += 16) {\n var olda = a;\n var oldb = b;\n var oldc = c;\n var oldd = d;\n a = md5ff(a, b, c, d, x[i], 7, -680876936);\n d = md5ff(d, a, b, c, x[i + 1], 12, -389564586);\n c = md5ff(c, d, a, b, x[i + 2], 17, 606105819);\n b = md5ff(b, c, d, a, x[i + 3], 22, -1044525330);\n a = md5ff(a, b, c, d, x[i + 4], 7, -176418897);\n d = md5ff(d, a, b, c, x[i + 5], 12, 1200080426);\n c = md5ff(c, d, a, b, x[i + 6], 17, -1473231341);\n b = md5ff(b, c, d, a, x[i + 7], 22, -45705983);\n a = md5ff(a, b, c, d, x[i + 8], 7, 1770035416);\n d = md5ff(d, a, b, c, x[i + 9], 12, -1958414417);\n c = md5ff(c, d, a, b, x[i + 10], 17, -42063);\n b = md5ff(b, c, d, a, x[i + 11], 22, -1990404162);\n a = md5ff(a, b, c, d, x[i + 12], 7, 1804603682);\n d = md5ff(d, a, b, c, x[i + 13], 12, -40341101);\n c = md5ff(c, d, a, b, x[i + 14], 17, -1502002290);\n b = md5ff(b, c, d, a, x[i + 15], 22, 1236535329);\n a = md5gg(a, b, c, d, x[i + 1], 5, -165796510);\n d = md5gg(d, a, b, c, x[i + 6], 9, -1069501632);\n c = md5gg(c, d, a, b, x[i + 11], 14, 643717713);\n b = md5gg(b, c, d, a, x[i], 20, -373897302);\n a = md5gg(a, b, c, d, x[i + 5], 5, -701558691);\n d = md5gg(d, a, b, c, x[i + 10], 9, 38016083);\n c = md5gg(c, d, a, b, x[i + 15], 14, -660478335);\n b = md5gg(b, c, d, a, x[i + 4], 20, -405537848);\n a = md5gg(a, b, c, d, x[i + 9], 5, 568446438);\n d = md5gg(d, a, b, c, x[i + 14], 9, -1019803690);\n c = md5gg(c, d, a, b, x[i + 3], 14, -187363961);\n b = md5gg(b, c, d, a, x[i + 8], 20, 1163531501);\n a = md5gg(a, b, c, d, x[i + 13], 5, -1444681467);\n d = md5gg(d, a, b, c, x[i + 2], 9, -51403784);\n c = md5gg(c, d, a, b, x[i + 7], 14, 1735328473);\n b = md5gg(b, c, d, a, x[i + 12], 20, -1926607734);\n a = md5hh(a, b, c, d, x[i + 5], 4, -378558);\n d = md5hh(d, a, b, c, x[i + 8], 11, -2022574463);\n c = md5hh(c, d, a, b, x[i + 11], 16, 1839030562);\n b = md5hh(b, c, d, a, x[i + 14], 23, -35309556);\n a = md5hh(a, b, c, d, x[i + 1], 4, -1530992060);\n d = md5hh(d, a, b, c, x[i + 4], 11, 1272893353);\n c = md5hh(c, d, a, b, x[i + 7], 16, -155497632);\n b = md5hh(b, c, d, a, x[i + 10], 23, -1094730640);\n a = md5hh(a, b, c, d, x[i + 13], 4, 681279174);\n d = md5hh(d, a, b, c, x[i], 11, -358537222);\n c = md5hh(c, d, a, b, x[i + 3], 16, -722521979);\n b = md5hh(b, c, d, a, x[i + 6], 23, 76029189);\n a = md5hh(a, b, c, d, x[i + 9], 4, -640364487);\n d = md5hh(d, a, b, c, x[i + 12], 11, -421815835);\n c = md5hh(c, d, a, b, x[i + 15], 16, 530742520);\n b = md5hh(b, c, d, a, x[i + 2], 23, -995338651);\n a = md5ii(a, b, c, d, x[i], 6, -198630844);\n d = md5ii(d, a, b, c, x[i + 7], 10, 1126891415);\n c = md5ii(c, d, a, b, x[i + 14], 15, -1416354905);\n b = md5ii(b, c, d, a, x[i + 5], 21, -57434055);\n a = md5ii(a, b, c, d, x[i + 12], 6, 1700485571);\n d = md5ii(d, a, b, c, x[i + 3], 10, -1894986606);\n c = md5ii(c, d, a, b, x[i + 10], 15, -1051523);\n b = md5ii(b, c, d, a, x[i + 1], 21, -2054922799);\n a = md5ii(a, b, c, d, x[i + 8], 6, 1873313359);\n d = md5ii(d, a, b, c, x[i + 15], 10, -30611744);\n c = md5ii(c, d, a, b, x[i + 6], 15, -1560198380);\n b = md5ii(b, c, d, a, x[i + 13], 21, 1309151649);\n a = md5ii(a, b, c, d, x[i + 4], 6, -145523070);\n d = md5ii(d, a, b, c, x[i + 11], 10, -1120210379);\n c = md5ii(c, d, a, b, x[i + 2], 15, 718787259);\n b = md5ii(b, c, d, a, x[i + 9], 21, -343485551);\n a = safeAdd(a, olda);\n b = safeAdd(b, oldb);\n c = safeAdd(c, oldc);\n d = safeAdd(d, oldd);\n }\n\n return [a, b, c, d];\n}\n/*\n * Convert an array bytes to an array of little-endian words\n * Characters >255 have their high-byte silently ignored.\n */\n\n\nfunction bytesToWords(input) {\n if (input.length === 0) {\n return [];\n }\n\n var length8 = input.length * 8;\n var output = new Uint32Array(getOutputLength(length8));\n\n for (var i = 0; i < length8; i += 8) {\n output[i >> 5] |= (input[i / 8] & 0xff) << i % 32;\n }\n\n return output;\n}\n/*\n * Add integers, wrapping at 2^32. This uses 16-bit operations internally\n * to work around bugs in some JS interpreters.\n */\n\n\nfunction safeAdd(x, y) {\n var lsw = (x & 0xffff) + (y & 0xffff);\n var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n return msw << 16 | lsw & 0xffff;\n}\n/*\n * Bitwise rotate a 32-bit number to the left.\n */\n\n\nfunction bitRotateLeft(num, cnt) {\n return num << cnt | num >>> 32 - cnt;\n}\n/*\n * These functions implement the four basic operations the algorithm uses.\n */\n\n\nfunction md5cmn(q, a, b, x, s, t) {\n return safeAdd(bitRotateLeft(safeAdd(safeAdd(a, q), safeAdd(x, t)), s), b);\n}\n\nfunction md5ff(a, b, c, d, x, s, t) {\n return md5cmn(b & c | ~b & d, a, b, x, s, t);\n}\n\nfunction md5gg(a, b, c, d, x, s, t) {\n return md5cmn(b & d | c & ~d, a, b, x, s, t);\n}\n\nfunction md5hh(a, b, c, d, x, s, t) {\n return md5cmn(b ^ c ^ d, a, b, x, s, t);\n}\n\nfunction md5ii(a, b, c, d, x, s, t) {\n return md5cmn(c ^ (b | ~d), a, b, x, s, t);\n}\n\nexport default md5;","export default '00000000-0000-0000-0000-000000000000';","import validate from './validate.js';\n\nfunction parse(uuid) {\n if (!validate(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n var v;\n var arr = new Uint8Array(16); // Parse ########-....-....-....-............\n\n arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24;\n arr[1] = v >>> 16 & 0xff;\n arr[2] = v >>> 8 & 0xff;\n arr[3] = v & 0xff; // Parse ........-####-....-....-............\n\n arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8;\n arr[5] = v & 0xff; // Parse ........-....-####-....-............\n\n arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8;\n arr[7] = v & 0xff; // Parse ........-....-....-####-............\n\n arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8;\n arr[9] = v & 0xff; // Parse ........-....-....-....-############\n // (Use \"/\" to avoid 32-bit truncation when bit-shifting high-order bytes)\n\n arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff;\n arr[11] = v / 0x100000000 & 0xff;\n arr[12] = v >>> 24 & 0xff;\n arr[13] = v >>> 16 & 0xff;\n arr[14] = v >>> 8 & 0xff;\n arr[15] = v & 0xff;\n return arr;\n}\n\nexport default parse;","export default /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;","// Unique ID creation requires a high quality random # generator. In the browser we therefore\n// require the crypto API and do not support built-in fallback to lower quality random number\n// generators (like Math.random()).\nvar getRandomValues;\nvar rnds8 = new Uint8Array(16);\nexport default function rng() {\n // lazy load so that environments that need to polyfill have a chance to do so\n if (!getRandomValues) {\n // getRandomValues needs to be invoked in a context where \"this\" is a Crypto implementation. Also,\n // find the complete implementation of crypto (msCrypto) on IE11.\n getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto !== 'undefined' && typeof msCrypto.getRandomValues === 'function' && msCrypto.getRandomValues.bind(msCrypto);\n\n if (!getRandomValues) {\n throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');\n }\n }\n\n return getRandomValues(rnds8);\n}","// Adapted from Chris Veness' SHA1 code at\n// http://www.movable-type.co.uk/scripts/sha1.html\nfunction f(s, x, y, z) {\n switch (s) {\n case 0:\n return x & y ^ ~x & z;\n\n case 1:\n return x ^ y ^ z;\n\n case 2:\n return x & y ^ x & z ^ y & z;\n\n case 3:\n return x ^ y ^ z;\n }\n}\n\nfunction ROTL(x, n) {\n return x << n | x >>> 32 - n;\n}\n\nfunction sha1(bytes) {\n var K = [0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xca62c1d6];\n var H = [0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0];\n\n if (typeof bytes === 'string') {\n var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape\n\n bytes = [];\n\n for (var i = 0; i < msg.length; ++i) {\n bytes.push(msg.charCodeAt(i));\n }\n } else if (!Array.isArray(bytes)) {\n // Convert Array-like to Array\n bytes = Array.prototype.slice.call(bytes);\n }\n\n bytes.push(0x80);\n var l = bytes.length / 4 + 2;\n var N = Math.ceil(l / 16);\n var M = new Array(N);\n\n for (var _i = 0; _i < N; ++_i) {\n var arr = new Uint32Array(16);\n\n for (var j = 0; j < 16; ++j) {\n arr[j] = bytes[_i * 64 + j * 4] << 24 | bytes[_i * 64 + j * 4 + 1] << 16 | bytes[_i * 64 + j * 4 + 2] << 8 | bytes[_i * 64 + j * 4 + 3];\n }\n\n M[_i] = arr;\n }\n\n M[N - 1][14] = (bytes.length - 1) * 8 / Math.pow(2, 32);\n M[N - 1][14] = Math.floor(M[N - 1][14]);\n M[N - 1][15] = (bytes.length - 1) * 8 & 0xffffffff;\n\n for (var _i2 = 0; _i2 < N; ++_i2) {\n var W = new Uint32Array(80);\n\n for (var t = 0; t < 16; ++t) {\n W[t] = M[_i2][t];\n }\n\n for (var _t = 16; _t < 80; ++_t) {\n W[_t] = ROTL(W[_t - 3] ^ W[_t - 8] ^ W[_t - 14] ^ W[_t - 16], 1);\n }\n\n var a = H[0];\n var b = H[1];\n var c = H[2];\n var d = H[3];\n var e = H[4];\n\n for (var _t2 = 0; _t2 < 80; ++_t2) {\n var s = Math.floor(_t2 / 20);\n var T = ROTL(a, 5) + f(s, b, c, d) + e + K[s] + W[_t2] >>> 0;\n e = d;\n d = c;\n c = ROTL(b, 30) >>> 0;\n b = a;\n a = T;\n }\n\n H[0] = H[0] + a >>> 0;\n H[1] = H[1] + b >>> 0;\n H[2] = H[2] + c >>> 0;\n H[3] = H[3] + d >>> 0;\n H[4] = H[4] + e >>> 0;\n }\n\n return [H[0] >> 24 & 0xff, H[0] >> 16 & 0xff, H[0] >> 8 & 0xff, H[0] & 0xff, H[1] >> 24 & 0xff, H[1] >> 16 & 0xff, H[1] >> 8 & 0xff, H[1] & 0xff, H[2] >> 24 & 0xff, H[2] >> 16 & 0xff, H[2] >> 8 & 0xff, H[2] & 0xff, H[3] >> 24 & 0xff, H[3] >> 16 & 0xff, H[3] >> 8 & 0xff, H[3] & 0xff, H[4] >> 24 & 0xff, H[4] >> 16 & 0xff, H[4] >> 8 & 0xff, H[4] & 0xff];\n}\n\nexport default sha1;","import validate from './validate.js';\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\n\nvar byteToHex = [];\n\nfor (var i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).substr(1));\n}\n\nfunction stringify(arr) {\n var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n var uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!validate(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n\n return uuid;\n}\n\nexport default stringify;","import rng from './rng.js';\nimport stringify from './stringify.js'; // **`v1()` - Generate time-based UUID**\n//\n// Inspired by https://github.com/LiosK/UUID.js\n// and http://docs.python.org/library/uuid.html\n\nvar _nodeId;\n\nvar _clockseq; // Previous uuid creation time\n\n\nvar _lastMSecs = 0;\nvar _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details\n\nfunction v1(options, buf, offset) {\n var i = buf && offset || 0;\n var b = buf || new Array(16);\n options = options || {};\n var node = options.node || _nodeId;\n var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not\n // specified. We do this lazily to minimize issues related to insufficient\n // system entropy. See #189\n\n if (node == null || clockseq == null) {\n var seedBytes = options.random || (options.rng || rng)();\n\n if (node == null) {\n // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)\n node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]];\n }\n\n if (clockseq == null) {\n // Per 4.2.2, randomize (14 bit) clockseq\n clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;\n }\n } // UUID timestamps are 100 nano-second units since the Gregorian epoch,\n // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so\n // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'\n // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.\n\n\n var msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock\n // cycle to simulate higher resolution clock\n\n var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs)\n\n var dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression\n\n if (dt < 0 && options.clockseq === undefined) {\n clockseq = clockseq + 1 & 0x3fff;\n } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new\n // time interval\n\n\n if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {\n nsecs = 0;\n } // Per 4.2.1.2 Throw error if too many uuids are requested\n\n\n if (nsecs >= 10000) {\n throw new Error(\"uuid.v1(): Can't create more than 10M uuids/sec\");\n }\n\n _lastMSecs = msecs;\n _lastNSecs = nsecs;\n _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch\n\n msecs += 12219292800000; // `time_low`\n\n var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;\n b[i++] = tl >>> 24 & 0xff;\n b[i++] = tl >>> 16 & 0xff;\n b[i++] = tl >>> 8 & 0xff;\n b[i++] = tl & 0xff; // `time_mid`\n\n var tmh = msecs / 0x100000000 * 10000 & 0xfffffff;\n b[i++] = tmh >>> 8 & 0xff;\n b[i++] = tmh & 0xff; // `time_high_and_version`\n\n b[i++] = tmh >>> 24 & 0xf | 0x10; // include version\n\n b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)\n\n b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low`\n\n b[i++] = clockseq & 0xff; // `node`\n\n for (var n = 0; n < 6; ++n) {\n b[i + n] = node[n];\n }\n\n return buf || stringify(b);\n}\n\nexport default v1;","import v35 from './v35.js';\nimport md5 from './md5.js';\nvar v3 = v35('v3', 0x30, md5);\nexport default v3;","import stringify from './stringify.js';\nimport parse from './parse.js';\n\nfunction stringToBytes(str) {\n str = unescape(encodeURIComponent(str)); // UTF8 escape\n\n var bytes = [];\n\n for (var i = 0; i < str.length; ++i) {\n bytes.push(str.charCodeAt(i));\n }\n\n return bytes;\n}\n\nexport var DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8';\nexport var URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8';\nexport default function (name, version, hashfunc) {\n function generateUUID(value, namespace, buf, offset) {\n if (typeof value === 'string') {\n value = stringToBytes(value);\n }\n\n if (typeof namespace === 'string') {\n namespace = parse(namespace);\n }\n\n if (namespace.length !== 16) {\n throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)');\n } // Compute hash of namespace and value, Per 4.3\n // Future: Use spread syntax when supported on all platforms, e.g. `bytes =\n // hashfunc([...namespace, ... value])`\n\n\n var bytes = new Uint8Array(16 + value.length);\n bytes.set(namespace);\n bytes.set(value, namespace.length);\n bytes = hashfunc(bytes);\n bytes[6] = bytes[6] & 0x0f | version;\n bytes[8] = bytes[8] & 0x3f | 0x80;\n\n if (buf) {\n offset = offset || 0;\n\n for (var i = 0; i < 16; ++i) {\n buf[offset + i] = bytes[i];\n }\n\n return buf;\n }\n\n return stringify(bytes);\n } // Function#name is not settable on some platforms (#270)\n\n\n try {\n generateUUID.name = name; // eslint-disable-next-line no-empty\n } catch (err) {} // For CommonJS default export support\n\n\n generateUUID.DNS = DNS;\n generateUUID.URL = URL;\n return generateUUID;\n}","import rng from './rng.js';\nimport stringify from './stringify.js';\n\nfunction v4(options, buf, offset) {\n options = options || {};\n var rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n offset = offset || 0;\n\n for (var i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n\n return buf;\n }\n\n return stringify(rnds);\n}\n\nexport default v4;","import v35 from './v35.js';\nimport sha1 from './sha1.js';\nvar v5 = v35('v5', 0x50, sha1);\nexport default v5;","import REGEX from './regex.js';\n\nfunction validate(uuid) {\n return typeof uuid === 'string' && REGEX.test(uuid);\n}\n\nexport default validate;","import validate from './validate.js';\n\nfunction version(uuid) {\n if (!validate(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n return parseInt(uuid.substr(14, 1), 16);\n}\n\nexport default version;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = (module) => {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","import type { Context } from \"@finos/fdc3\";\nimport { init } from \"../platform/api\";\n\nwindow.addEventListener(\"DOMContentLoaded\", async () => {\n\tawait init(true);\n\tawait initializeDOM();\n});\n\n/**\n * Broadcasts a context using FDC3.\n */\nasync function setContext(): Promise {\n\tconst contextType = \"fdc3.instrument\";\n\tconst contextName = \"Tesla Inc.\";\n\tconst idData = {\n\t\tticker: \"TSLA\"\n\t};\n\tconst context = {\n\t\ttype: contextType,\n\t\tname: contextName,\n\t\tid: idData\n\t};\n\tif (window.fin) {\n\t\tawait window.fin.me.interop.setContext(context);\n\t\tconsole.log(`Set context: ${contextType} - ${contextName}`);\n\t} else {\n\t\twindow.addEventListener(\"finReady\", async () => {\n\t\t\tif (window.fin) {\n\t\t\t\tawait window.fin.me.interop.setContext(context);\n\t\t\t\tconsole.log(`Set context: ${contextType} - ${contextName}`);\n\t\t\t}\n\t\t});\n\t}\n}\n\n/**\n * Adds an interop context listener to the window.\n */\nasync function addContextListener(): Promise {\n\tif (window.fin) {\n\t\tawait window.fin.me.interop.addContextHandler((context: Context) => {\n\t\t\tupdateDOMElements(context);\n\t\t});\n\t} else {\n\t\twindow.addEventListener(\"finReady\", async () => {\n\t\t\tif (window.fin) {\n\t\t\t\tawait window.fin.me.interop.addContextHandler((context: Context) => {\n\t\t\t\t\tupdateDOMElements(context);\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t}\n}\n\n/**\n * Updates the DOM elements with the provided context.\n * @param context The context to update the DOM elements with.\n */\nfunction updateDOMElements(context: Context): void {\n\tconst contextTypeSpan = document.querySelector(\"#contextType\");\n\tconst contextNameSpan = document.querySelector(\"#contextName\");\n\tconst contextBodyPre = document.querySelector(\"#contextBody\");\n\n\tif (contextTypeSpan !== null && contextNameSpan !== null && contextBodyPre !== null) {\n\t\tcontextTypeSpan.textContent = context.type;\n\t\tcontextNameSpan.textContent = context.name ?? \"No name provided.\";\n\t\tcontextBodyPre.textContent = JSON.stringify(context, null, 2);\n\t}\n}\n\n/**\n * Initialize the DOM elements.\n */\nasync function initializeDOM(): Promise {\n\tconst setContextButton = document.querySelector(\"#setContext\");\n\n\tif (setContextButton !== null) {\n\t\tsetContextButton.addEventListener(\"click\", async () => {\n\t\t\tawait setContext();\n\t\t});\n\t}\n\n\tawait addContextListener();\n}\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/web/v19.2.0/web-interop/js/provider.bundle.js b/web/v19.2.0/web-interop/js/provider.bundle.js index be675cf..b40478c 100644 --- a/web/v19.2.0/web-interop/js/provider.bundle.js +++ b/web/v19.2.0/web-interop/js/provider.bundle.js @@ -1,38 +1,38 @@ /******/ (() => { // webpackBootstrap /******/ var __webpack_modules__ = ({ -/***/ "./node_modules/@openfin/core-web/out/api-client.js": -/*!**********************************************************!*\ - !*** ./node_modules/@openfin/core-web/out/api-client.js ***! - \**********************************************************/ +/***/ "../../node_modules/@openfin/core-web/out/api-client.js": +/*!**************************************************************!*\ + !*** ../../node_modules/@openfin/core-web/out/api-client.js ***! + \**************************************************************/ /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; -var e=__webpack_require__(/*! ./main-8cad4070.js */ "./node_modules/@openfin/core-web/out/main-8cad4070.js");__webpack_require__(/*! buffer/ */ "../../node_modules/buffer/index.js"),__webpack_require__(/*! uuid */ "../../node_modules/uuid/dist/esm-browser/index.js"),__webpack_require__(/*! events */ "../../node_modules/events/events.js"),__webpack_require__(/*! lodash/cloneDeep */ "../../node_modules/lodash/cloneDeep.js"),__webpack_require__(/*! lodash/isEqual */ "../../node_modules/lodash/isEqual.js"),exports.connect=e.connect; +var e=__webpack_require__(/*! ./main-8cad4070.js */ "../../node_modules/@openfin/core-web/out/main-8cad4070.js");__webpack_require__(/*! buffer/ */ "../../node_modules/buffer/index.js"),__webpack_require__(/*! uuid */ "../../node_modules/uuid/dist/esm-browser/index.js"),__webpack_require__(/*! events */ "../../node_modules/events/events.js"),__webpack_require__(/*! lodash/cloneDeep */ "../../node_modules/lodash/cloneDeep.js"),__webpack_require__(/*! lodash/isEqual */ "../../node_modules/lodash/isEqual.js"),exports.connect=e.connect; /***/ }), -/***/ "./node_modules/@openfin/core-web/out/main-8cad4070.js": -/*!*************************************************************!*\ - !*** ./node_modules/@openfin/core-web/out/main-8cad4070.js ***! - \*************************************************************/ +/***/ "../../node_modules/@openfin/core-web/out/main-8cad4070.js": +/*!*****************************************************************!*\ + !*** ../../node_modules/@openfin/core-web/out/main-8cad4070.js ***! + \*****************************************************************/ /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; -var e=__webpack_require__(/*! buffer/ */ "../../node_modules/buffer/index.js"),t=__webpack_require__(/*! events */ "../../node_modules/events/events.js"),n=__webpack_require__(/*! lodash/cloneDeep */ "../../node_modules/lodash/cloneDeep.js"),i=__webpack_require__(/*! lodash/isEqual */ "../../node_modules/lodash/isEqual.js"),r=__webpack_require__(/*! uuid */ "../../node_modules/uuid/dist/esm-browser/index.js");const o=(e,t)=>`${t}<${btoa(JSON.stringify(e))}>`;var s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof __webpack_require__.g?__webpack_require__.g:"undefined"!=typeof self?self:{},a={},c={},d={},h={};async function l(e){const t=[];for(const n of e){const e=await n();t.push(e)}return t}Object.defineProperty(h,"__esModule",{value:!0}),h.promiseMapSerial=h.serial=h.promiseMap=h.promisify=void 0,h.promisify=function(e){return(...t)=>new Promise(((n,i)=>{e(...t,((e,t)=>e?i(e):n(t)))}))},h.promiseMap=async function(e,t){return Promise.all(e.map(t))},h.serial=l,h.promiseMapSerial=async function(e,t){return l(e.map(((e,n,i)=>()=>t(e,n,i))))};var u,p=s&&s.__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},w=s&&s.__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)};Object.defineProperty(d,"__esModule",{value:!0}),d.Reply=d.EmitterBase=d.Base=void 0;const y=h;class f{constructor(e){this.isNodeEnvironment=()=>"node"===this.wire.environment.type,this.isOpenFinEnvironment=()=>"openfin"===this.wire.environment.type,this.isBrowserEnvironment=()=>"other"===this.wire.environment.type,this.wire=e}get fin(){return this.wire.getFin()}get me(){return this.wire.me}}d.Base=f;d.EmitterBase=class extends f{constructor(e,t,...n){super(e),this.topic=t,u.set(this,void 0),this.eventNames=()=>this.hasEmitter()?this.getOrCreateEmitter().eventNames():[],this.emit=(e,t,...n)=>!!this.hasEmitter()&&this.getOrCreateEmitter().emit(e,t,...n),this.hasEmitter=()=>this.wire.eventAggregator.has(w(this,u,"f")),this.getOrCreateEmitter=()=>this.wire.eventAggregator.getOrCreate(w(this,u,"f")),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[],this.listenerCount=e=>this.hasEmitter()?this.getOrCreateEmitter().listenerCount(e):0,this.registerEventListener=async(e,t={},n,i)=>{const r={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e},o=this.getOrCreateEmitter();n(o);try{await this.wire.sendAction("subscribe-to-desktop-event",r)}catch(e){throw i(o),this.deleteEmitterIfNothingRegistered(o),e}},this.deregisterEventListener=async(e,t={})=>{if(this.hasEmitter()){const n={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e};await this.wire.sendAction("unsubscribe-to-desktop-event",n).catch((()=>null));return this.getOrCreateEmitter()}return Promise.resolve()},p(this,u,[t,...n],"f"),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[]}async on(e,t,n){return await this.registerEventListener(e,n,(n=>{n.on(e,t)}),(n=>{n.removeListener(e,t)})),this}async addListener(e,t,n){return this.on(e,t,n)}async once(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.once(e,i),n.once(e,t)}),(n=>{n.removeListener(e,i),n.removeListener(e,t)})),this}async prependListener(e,t,n){return await this.registerEventListener(e,n,(n=>{n.prependListener(e,t)}),(n=>{n.removeListener(e,t)})),this}async prependOnceListener(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.prependOnceListener(e,t),n.once(e,i)}),(n=>{n.removeListener(e,t),n.removeListener(e,i)})),this}async removeListener(e,t,n){const i=await this.deregisterEventListener(e,n);return i&&(i.removeListener(e,t),this.deleteEmitterIfNothingRegistered(i)),this}async deregisterAllListeners(e){const t={...this.identity,type:e,topic:this.topic};if(this.hasEmitter()){const e=this.getOrCreateEmitter(),n=e.listenerCount(t.type),i=[];for(let e=0;enull)));return await Promise.all(i),e}}async removeAllListeners(e){const t=async e=>{const t=await this.deregisterAllListeners(e);t&&(t.removeAllListeners(e),this.deleteEmitterIfNothingRegistered(t))};if(e)await t(e);else if(this.hasEmitter()){const e=this.getOrCreateEmitter().eventNames();await(0,y.promiseMap)(e,t)}return this}deleteEmitterIfNothingRegistered(e){0===e.eventNames().length&&this.wire.eventAggregator.delete(w(this,u,"f"))}},u=new WeakMap;d.Reply=class{};var g={};Object.defineProperty(g,"__esModule",{value:!0});var m=g.RuntimeError=g.NotSupportedError=g.NotImplementedError=g.NoAckError=g.DuplicateCorrelationError=g.UnexpectedActionError=g.DisconnectedError=void 0;class v extends Error{constructor(e){super(`Expected websocket state OPEN but found ${e}`),this.readyState=e}}g.DisconnectedError=v;class C extends Error{}g.UnexpectedActionError=C;class b extends Error{}g.DuplicateCorrelationError=b;class I extends Error{}g.NoAckError=I;class E extends Error{}g.NotImplementedError=E;class x extends Error{}g.NotSupportedError=x;class A extends Error{constructor(e){const{message:t,name:n,stack:i,...r}=e;super(t),this.name=n||"Error",this.stack=i??this.toString(),Object.keys(r).forEach((e=>{this[e]=r[e]}))}}class P extends Error{static getCallSite(e=0){const t=Error.stackTraceLimit,n=e+1;Error.stackTraceLimit=t+n;const i=Error.prepareStackTrace;Error.prepareStackTrace=(e,t)=>t;const r=(new Error).stack?.slice(n)??[];return Error.prepareStackTrace=i,Error.stackTraceLimit=t,r}static prepareStackTrace(e,t){if("function"==typeof Error.prepareStackTrace)return Error.prepareStackTrace(e,t);let n="";n+=e.name||"Error",n+=`: ${e.message||""}`;for(const e of t)n+=`\n at ${e.toString()}`;return n}constructor(e,t){const{reason:n,error:i}=e;super(n),this.name="RuntimeError",i?.stack&&(this.cause=new A(i)),t&&(this.stack=P.prepareStackTrace(this,t))}}m=g.RuntimeError=P;var M={},_={},O={};Object.defineProperty(O,"__esModule",{value:!0}),O.validateIdentity=void 0,O.validateIdentity=function(e){let t;return"object"==typeof e&&"string"==typeof e.uuid||(t="Not a valid identity object"),t};var S={},R={},F={},j={},k={},L={},T={};Object.defineProperty(T,"__esModule",{value:!0}),T.handleDeprecatedWarnings=void 0;var $;T.handleDeprecatedWarnings=e=>{(e.contentNavigation?.whitelist||e.contentNavigation?.blacklist||e.contentRedirect?.whitelist||e.contentRedirect?.blacklist)&&console.warn("The properties 'whitelist' and 'blacklist' have been marked as deprecated and will be removed in a future version. Please use 'allowlist' and 'denylist'.")};var B={},G={};Object.defineProperty(G,"__esModule",{value:!0}),G.AsyncRetryableLazy=W=G.Lazy=void 0;var W=G.Lazy=class{constructor(e){this.producerFn=e}getValue(){return this.value||(this.value=this.producerFn()),this.value}};G.AsyncRetryableLazy=class{constructor(e){this.producerFn=e}async getValue(){return this.promise||(this.promise=this.producerFn().catch((e=>{throw delete this.promise,e}))),this.promise}};var H={};Object.defineProperty(H,"__esModule",{value:!0}),H.WebContents=void 0;const N=d;class D extends N.EmitterBase{constructor(e,t,n){super(e,n,t.uuid,t.name),this.identity=t,this.entityType=n}capturePage(e){return this.wire.sendAction("capture-page",{options:e,...this.identity}).then((({payload:e})=>e.data))}executeJavaScript(e){return this.wire.sendAction("execute-javascript-in-window",{...this.identity,code:e}).then((({payload:e})=>e.data))}getZoomLevel(){return this.wire.sendAction("get-zoom-level",this.identity).then((({payload:e})=>e.data))}setZoomLevel(e){return this.wire.sendAction("set-zoom-level",{...this.identity,level:e}).then((()=>{}))}navigate(e){return this.wire.sendAction("navigate-window",{...this.identity,url:e}).then((()=>{}))}navigateBack(){return this.wire.sendAction("navigate-window-back",{...this.identity}).then((()=>{}))}async navigateForward(){await this.wire.sendAction("navigate-window-forward",{...this.identity})}stopNavigation(){return this.wire.sendAction("stop-window-navigation",{...this.identity}).then((()=>{}))}reload(e=!1){return this.wire.sendAction("reload-window",{ignoreCache:e,...this.identity}).then((()=>{}))}print(e={}){return this.wire.sendAction("print",{...this.identity,options:e}).then((()=>{}))}findInPage(e,t){return this.wire.sendAction("find-in-page",{...this.identity,searchTerm:e,options:t}).then((({payload:e})=>e.data))}stopFindInPage(e){return this.wire.sendAction("stop-find-in-page",{...this.identity,action:e}).then((()=>{}))}getPrinters(){return this.wire.sendAction("get-printers",{...this.identity}).then((({payload:e})=>e.data))}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){await this.wire.sendAction("focus-window",{emitSynthFocused:e,...this.identity})}async showDeveloperTools(){await this.wire.sendAction("show-developer-tools",this.identity)}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction("get-process-info",this.identity);return e}async getSharedWorkers(){return this.wire.sendAction("get-shared-workers",this.identity).then((({payload:e})=>e.data))}async inspectSharedWorker(){await this.wire.sendAction("inspect-shared-worker",{...this.identity})}async inspectSharedWorkerById(e){await this.wire.sendAction("inspect-shared-worker-by-id",{...this.identity,workerId:e})}async inspectServiceWorker(){await this.wire.sendAction("inspect-service-worker",{...this.identity})}async showPopupWindow(e){if(this.wire.sendAction(`${this.entityType}-show-popup-window`,this.identity).catch((()=>{})),e?.onPopupReady){const t=async({popupName:t})=>{try{const n=this.fin.Window.wrapSync({uuid:this.fin.me.uuid,name:t});await e.onPopupReady(n)}catch(e){throw new Error(`Something went wrong during onPopupReady execution: ${e}`)}};await this.once("popup-ready",t)}const{payload:t}=await this.wire.sendAction("try-create-popup-window",{options:{...e,hasResultCallback:!!e?.onPopupResult,hasReadyCallback:!!e?.onPopupReady},...this.identity}),{data:{willOpen:n,options:i}}=t;n&&await this.fin.Window.create(i.initialOptions);if(e?.onPopupResult){const t=async t=>{await e.onPopupResult((e=>{const{name:t,uuid:n,result:i,data:r}=e,o={identity:{name:t,uuid:n},result:i};return r&&(o.data=r),o})(t))},n=async()=>{await this.removeListener("popup-result",t)};await this.on("popup-result",t),await this.once("popup-teardown",n)}const{payload:r}=await this.wire.sendAction("show-popup-window",{options:i,...this.identity});return r.data}}var U,V,z,K,q;function J(){return V||(V=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(function(){if($)return L;$=1,Object.defineProperty(L,"__esModule",{value:!0}),L.ViewModule=void 0;const e=d,t=O,n=J(),i=T;class r extends e.Base{async create(e){const{uuid:t}=this.wire.me;if(!e.name||"string"!=typeof e.name)throw new Error("Please provide a name property as a string in order to create a View.");return(0,i.handleDeprecatedWarnings)(e),this.wire.environment.childViews?await this.wire.environment.createChildContent({entityType:"view",options:{...e,uuid:t}}):await this.wire.sendAction("create-view",{...e,uuid:t}),this.wrapSync({uuid:t,name:e.name})}async wrap(e){this.wire.sendAction("view-wrap").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}wrapSync(e){this.wire.sendAction("view-wrap-sync").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}getCurrent(){if(this.wire.sendAction("view-get-current").catch((e=>{})),!this.wire.me.isView)throw new Error("You are not in a View context");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction("view-get-current-sync").catch((e=>{})),!this.wire.me.isView)throw new Error("You are not in a View context");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return L.ViewModule=r,L}(),e),n(function(){if(U)return B;var e;U=1,Object.defineProperty(B,"__esModule",{value:!0}),B.View=void 0;const t=g,n=G,i=H,r=ie();class o extends i.WebContents{constructor(i,o){super(i,o,"view"),this.identity=o,e.set(this,new n.Lazy((()=>this.fin.Platform.wrapSync(this.identity).getClient()))),this.attach=async e=>{await this.wire.sendAction("attach-view",{target:e,...this.identity})},this.destroy=async()=>{await this.wire.sendAction("destroy-view",{...this.identity})},this.show=async()=>{await this.wire.sendAction("show-view",{...this.identity})},this.showAt=async(e,t={})=>{await this.wire.sendAction("show-view-at",{bounds:e,...this.identity,options:t})},this.bringToFront=async()=>{await this.wire.sendAction("bring-view-to-front",{...this.identity})},this.hide=async()=>{await this.wire.sendAction("hide-view",{...this.identity})},this.setBounds=async e=>{await this.wire.sendAction("set-view-bounds",{bounds:e,...this.identity})},this.getBounds=async()=>(await this.wire.sendAction("get-view-bounds",{...this.identity})).payload.data,this.getInfo=async()=>(await this.wire.sendAction("get-view-info",{...this.identity})).payload.data,this.getParentLayout=async()=>(this.wire.sendAction("view-get-parent-layout",{...this.identity}).catch((()=>{})),this.fin.Platform.Layout.getLayoutByViewIdentity(this.identity)),this.getOptions=async()=>this.wire.sendAction("get-view-options",{...this.identity}).then((({payload:e})=>e.data)),this.updateOptions=async e=>this.wire.sendAction("update-view-options",{options:e,...this.identity}).then((()=>{})),this.getCurrentWindow=async()=>{const{payload:{data:e}}=await this.wire.sendAction("get-view-window",{...this.identity});return new r._Window(this.wire,e)},this.getCurrentStack=async()=>{this.wire.sendAction("view-get-current-stack").catch((()=>{}));try{return(await this.getParentLayout()).getStackByViewIdentity(this.identity)}catch(e){throw new t.RuntimeError({reason:"This view does not belong to a stack.",error:e})}},this.triggerBeforeUnload=async()=>(await this.wire.sendAction("trigger-before-unload",{...this.identity})).payload.data,this.bindToElement=async e=>{if(!e)throw new Error("Element not found.");return this.wire.environment.observeBounds(e,(async e=>this.setBounds(e)))}}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){const t=await this.getCurrentWindow();await t.focusedWebViewWasChanged(),await super.focus({emitSynthFocused:e})}}return B.View=o,e=new WeakMap,B}(),e)}(k)),k}function Y(){if(z)return j;z=1,Object.defineProperty(j,"__esModule",{value:!0}),j.Application=void 0;const e=d,t=ie(),n=J();class i extends e.EmitterBase{constructor(e,n){super(e,"application",n.uuid),this.identity=n,this.window=new t._Window(this.wire,{uuid:this.identity.uuid,name:this.identity.uuid})}windowListFromIdentityList(e){const n=[];return e.forEach((e=>{n.push(new t._Window(this.wire,{uuid:e.uuid,name:e.name}))})),n}isRunning(){return this.wire.sendAction("is-application-running",this.identity).then((({payload:e})=>e.data))}async quit(e=!1){try{await this._close(e),await this.wire.sendAction("destroy-application",{force:e,...this.identity})}catch(e){if(!["Remote connection has closed","Could not locate the requested application"].some((t=>e.message.includes(t))))throw e}}async _close(e=!1){try{await this.wire.sendAction("close-application",{force:e,...this.identity})}catch(e){if(!e.message.includes("Remote connection has closed"))throw e}}close(e=!1){return console.warn("Deprecation Warning: Application.close is deprecated Please use Application.quit"),this.wire.sendAction("application-close",this.identity).catch((e=>{})),this._close(e)}getChildWindows(){return this.wire.sendAction("get-child-windows",this.identity).then((({payload:e})=>{const t=[];return e.data.forEach((e=>{t.push({uuid:this.identity.uuid,name:e})})),this.windowListFromIdentityList(t)}))}getManifest(){return this.wire.sendAction("get-application-manifest",this.identity).then((({payload:e})=>e.data))}getParentUuid(){return this.wire.sendAction("get-parent-application",this.identity).then((({payload:e})=>e.data))}getShortcuts(){return this.wire.sendAction("get-shortcuts",this.identity).then((({payload:e})=>e.data))}async getViews(){const{payload:e}=await this.wire.sendAction("application-get-views",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}getZoomLevel(){return this.wire.sendAction("get-application-zoom-level",this.identity).then((({payload:e})=>e.data))}getWindow(){return this.wire.sendAction("application-get-window",this.identity).catch((e=>{})),Promise.resolve(this.window)}registerUser(e,t){return this.wire.sendAction("register-user",{userName:e,appName:t,...this.identity}).then((()=>{}))}removeTrayIcon(){return this.wire.sendAction("remove-tray-icon",this.identity).then((()=>{}))}restart(){return this.wire.sendAction("restart-application",this.identity).then((()=>{}))}run(){return console.warn("Deprecation Warning: Application.run is deprecated Please use fin.Application.start"),this.wire.sendAction("application-run",this.identity).catch((e=>{})),this._run()}_run(e={}){return this.wire.sendAction("run-application",{manifestUrl:this._manifestUrl,opts:e,...this.identity}).then((()=>{}))}scheduleRestart(){return this.wire.sendAction("relaunch-on-close",this.identity).then((()=>{}))}async sendApplicationLog(){const{payload:e}=await this.wire.sendAction("send-application-log",this.identity);return e.data}async setJumpList(e){await this.wire.sendAction("set-jump-list",{config:e,...this.identity})}setTrayIcon(e){return this.wire.sendAction("set-tray-icon",{enabledIcon:e,...this.identity}).then((()=>{}))}setShortcuts(e){return this.wire.sendAction("set-shortcuts",{data:e,...this.identity}).then((()=>{}))}async setShortcutQueryParams(e){await this.wire.sendAction("set-shortcut-query-args",{data:e,...this.identity})}setZoomLevel(e){return this.wire.sendAction("set-application-zoom-level",{level:e,...this.identity}).then((()=>{}))}async setAppLogUsername(e){await this.wire.sendAction("set-app-log-username",{data:e,...this.identity})}getTrayIconInfo(){return this.wire.sendAction("get-tray-icon-info",this.identity).then((({payload:e})=>e.data))}hasTrayIcon(){return this.wire.sendAction("has-tray-icon",this.identity).then((({payload:e})=>e.data))}terminate(){return this.wire.sendAction("terminate-application",this.identity).then((()=>{}))}wait(){return this.wire.sendAction("wait-for-hung-application",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction("get-info",this.identity).then((({payload:e})=>e.data))}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction("application-get-process-info",this.identity);return e}async setFileDownloadLocation(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t};await this.wire.sendAction("set-file-download-location",{...n,downloadLocation:e})}async getFileDownloadLocation(){const{payload:{data:e}}=await this.wire.sendAction("get-file-download-location",this.identity);return e}async showTrayIconPopupMenu(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t},{payload:i}=await this.wire.sendAction("show-tray-icon-popup-menu",{...n,options:e});return i.data}async closeTrayIconPopupMenu(){const{name:e}=this.wire.me,t={uuid:this.identity.uuid,name:e};await this.wire.sendAction("close-tray-icon-popup-menu",{...t})}}return j.Application=i,j}function Z(){return q||(q=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(function(){if(K)return F;K=1,Object.defineProperty(F,"__esModule",{value:!0}),F.ApplicationModule=void 0;const e=d,t=O,n=Y();class i extends e.Base{async wrap(e){this.wire.sendAction("wrap-application").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}wrapSync(e){this.wire.sendAction("wrap-application-sync").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}async _create(e){return void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&void 0===e.isPlatformController&&(e.autoShow=!0),await this.wire.sendAction("create-application",e),this.wrap({uuid:e.uuid})}create(e){return console.warn("Deprecation Warning: fin.Application.create is deprecated. Please use fin.Application.start"),this.wire.sendAction("application-create").catch((e=>{})),this._create(e)}async start(e){this.wire.sendAction("start-application").catch((e=>{}));const t=await this._create(e);return await this.wire.sendAction("run-application",{uuid:e.uuid}),t}async startManyManifests(e,t){return this.wire.sendAction("run-applications",{applications:e,opts:t}).then((()=>{}))}getCurrent(){return this.wire.sendAction("get-current-application").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction("get-current-application-sync").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}async startFromManifest(e,t){this.wire.sendAction("application-start-from-manifest").catch((e=>{}));const n=await this._createFromManifest(e);return await n._run(t),n}createFromManifest(e){return console.warn("Deprecation Warning: fin.Application.createFromManifest is deprecated. Please use fin.Application.startFromManifest"),this.wire.sendAction("application-create-from-manifest").catch((e=>{})),this._createFromManifest(e)}_createFromManifest(e){return this.wire.sendAction("get-application-manifest",{manifestUrl:e}).then((({payload:e})=>{const t=e.data.platform?e.data.platform.uuid:e.data.startup_app.uuid;return this.wrap({uuid:t})})).then((t=>(t._manifestUrl=e,t)))}}return F.ApplicationModule=i,F}(),e),n(Y(),e)}(R)),R}H.WebContents=D;var Q={};Object.defineProperty(Q,"__esModule",{value:!0}),Q.promisifySubscription=void 0;var X,ee,te;function ne(){if(X)return S;X=1,Object.defineProperty(S,"__esModule",{value:!0}),S._Window=void 0;const e=Z(),t=H,n=J(),i=T,r=Q;class o extends t.WebContents{constructor(e,t){super(e,t,"window")}async createWindow(e){this.wire.sendAction("window-create-window",this.identity).catch((e=>{}));const t=await(0,r.promisifySubscription)(this,"fire-constructor-callback");void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&(e.autoShow=!0),(0,i.handleDeprecatedWarnings)(e);const n=this.wire.environment.createChildContent({entityType:"window",options:e}),[o]=await Promise.all([t.getValue(),n]);let s;const{success:a}=o,c=o.data,{message:d}=c;s=a?{httpResponseCode:c.httpResponseCode,apiInjected:c.apiInjected}:{message:c.message,networkErrorCode:c.networkErrorCode,stack:c.stack};const h={message:d,cbPayload:s,success:a};try{this.getWebWindow().fin.__internal_.openerSuccessCBCalled()}catch(e){}return h.success?this:Promise.reject(h)}getAllFrames(){return this.wire.sendAction("get-all-frames",this.identity).then((({payload:e})=>e.data))}getBounds(){return this.wire.sendAction("get-window-bounds",this.identity).then((({payload:e})=>e.data))}center(){return this.wire.sendAction("center-window",this.identity).then((()=>{}))}blur(){return this.wire.sendAction("blur-window",this.identity).then((()=>{}))}bringToFront(){return this.wire.sendAction("bring-window-to-front",this.identity).then((()=>{}))}animate(e,t){return this.wire.sendAction("animate-window",{transitions:e,options:t,...this.identity}).then((()=>{}))}hide(){return this.wire.sendAction("hide-window",this.identity).then((()=>{}))}close(e=!1){return this.wire.sendAction("close-window",{force:e,...this.identity}).then((()=>{Object.setPrototypeOf(this,null)}))}focusedWebViewWasChanged(){return this.wire.sendAction("focused-webview-changed",this.identity).then((()=>{}))}getNativeId(){return this.wire.sendAction("get-window-native-id",this.identity).then((({payload:e})=>e.data))}async getCurrentViews(){const{payload:e}=await this.wire.sendAction("window-get-views",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}disableFrame(){return console.warn("Function is deprecated; use disableUserMovement instead."),this.wire.sendAction("disable-window-frame",this.identity).then((()=>{}))}disableUserMovement(){return this.wire.sendAction("disable-window-frame",this.identity).then((()=>{}))}enableFrame(){return console.warn("Function is deprecated; use enableUserMovement instead."),this.wire.sendAction("enable-window-frame",this.identity).then((()=>{}))}enableUserMovement(){return this.wire.sendAction("enable-window-frame",this.identity).then((()=>{}))}flash(){return this.wire.sendAction("flash-window",this.identity).then((()=>{}))}stopFlashing(){return this.wire.sendAction("stop-flash-window",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction("get-window-info",this.identity).then((({payload:e})=>e.data))}async getLayout(e){this.wire.sendAction("window-get-layout",this.identity).catch((e=>{}));const t=await this.getOptions();if(!t.layout&&!t.layoutSnapshot)throw new Error("Window does not have a Layout");return this.fin.Platform.Layout.wrap(e??this.identity)}getOptions(){return this.wire.sendAction("get-window-options",this.identity).then((({payload:e})=>e.data))}getParentApplication(){return this.wire.sendAction("window-get-parent-application",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity))}getParentWindow(){return this.wire.sendAction("window-get-parent-window",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity)).then((e=>e.getWindow()))}async getSnapshot(e){const t={area:e,...this.identity};console.warn("Window.getSnapshot has been deprecated, please use Window.capturePage");return(await this.wire.sendAction("get-window-snapshot",t)).payload.data}getState(){return this.wire.sendAction("get-window-state",this.identity).then((({payload:e})=>e.data))}getWebWindow(){return this.wire.sendAction("window-get-web-window",this.identity).catch((e=>{})),this.wire.environment.getWebWindow(this.identity)}isMainWindow(){return this.wire.sendAction("window-is-main-window",this.identity).catch((e=>{})),this.me.uuid===this.me.name}isShowing(){return this.wire.sendAction("is-window-showing",this.identity).then((({payload:e})=>e.data))}maximize(){return this.wire.sendAction("maximize-window",this.identity).then((()=>{}))}minimize(){return this.wire.sendAction("minimize-window",this.identity).then((()=>{}))}moveBy(e,t,n){return this.wire.sendAction("move-window-by",{deltaLeft:e,deltaTop:t,positioningOptions:n,...this.identity}).then((()=>{}))}moveTo(e,t,n){return this.wire.sendAction("move-window",{left:e,top:t,positioningOptions:n,...this.identity}).then((()=>{}))}resizeBy(e,t,n,i){return this.wire.sendAction("resize-window-by",{deltaWidth:Math.floor(e),deltaHeight:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}resizeTo(e,t,n,i){return this.wire.sendAction("resize-window",{width:Math.floor(e),height:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}restore(){return this.wire.sendAction("restore-window",this.identity).then((()=>{}))}setAsForeground(){return this.wire.sendAction("set-foreground-window",this.identity).then((()=>{}))}setBounds(e,t){return this.wire.sendAction("set-window-bounds",{...e,...this.identity,positioningOptions:t}).then((()=>{}))}show(e=!1){return this.wire.sendAction("show-window",{force:e,...this.identity}).then((()=>{}))}showAt(e,t,n=!1){return this.wire.sendAction("show-at-window",{force:n,left:Math.floor(e),top:Math.floor(t),...this.identity}).then((()=>{}))}updateOptions(e){return this.wire.sendAction("update-window-options",{options:e,...this.identity}).then((()=>{}))}authenticate(e,t){return this.wire.sendAction("window-authenticate",{userName:e,password:t,...this.identity}).then((()=>{}))}async showPopupMenu(e){const{payload:t}=await this.wire.sendAction("show-popup-menu",{options:e,...this.identity});return t.data}async closePopupMenu(){return this.wire.sendAction("close-popup-menu",{...this.identity}).then((()=>{}))}async dispatchPopupResult(e){this.wire.sendAction("window-dispatch-popup-result",this.identity).catch((e=>{})),await this.wire.sendAction("dispatch-popup-result",{data:e,...this.identity})}async print(e={content:"self"}){switch(e.content){case void 0:case"self":return super.print(e);case"screenshot":return this.wire.sendAction("print-screenshot",this.identity).then((()=>{}));case"views":return this.wire.sendAction("print-views",{...this.identity,options:e}).then((()=>{}));default:return}}}return S._Window=o,S}function ie(){return te||(te=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(function(){if(ee)return _;ee=1,Object.defineProperty(_,"__esModule",{value:!0}),_._WindowModule=void 0;const e=d,t=O,n=ne();class i extends e.Base{async wrap(e){this.wire.sendAction("window-wrap").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}wrapSync(e){this.wire.sendAction("window-wrap-sync").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}create(e){return this.wire.sendAction("create-window").catch((e=>{})),new n._Window(this.wire,{uuid:this.me.uuid,name:e.name}).createWindow(e)}getCurrent(){if(this.wire.sendAction("get-current-window").catch((e=>{})),!this.wire.me.isWindow)throw new Error("You are not in a Window context");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction("get-current-window-sync").catch((e=>{})),!this.wire.me.isWindow)throw new Error("You are not in a Window context");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return _._WindowModule=i,_}(),e),n(ne(),e)}(M)),M}Q.promisifySubscription=async(e,t,n=(()=>!0),i)=>{let r,o,s;const a=new Promise(((e,t)=>{r=e,o=t})),c=e=>{n(e)&&(clearTimeout(s),r(e))};return await e.on(t,c),i&&(s=setTimeout((()=>o(new Error("event timed out"))),i)),a.finally((()=>{e.removeListener(t,c).catch((()=>null))})),{getValue:()=>a}},Object.defineProperty(c,"__esModule",{value:!0}),c.System=void 0;const re=d,oe=g,se=ie(),ae=t;class ce extends re.EmitterBase{constructor(e){super(e,"system")}sendExternalProcessRequest(e,t){return new Promise(((n,i)=>{const r="external-process-exited";let o,s,a,c;"function"==typeof t.listener&&(a=e=>{const n=e||{};s={topic:"exited",uuid:n.processUuid||"",exitCode:n.exitCode||0},o===e.processUuid&&(t.listener(s),c.removeListener(r,a))},this.wire.me.name||(this.wire.me.name=this.wire.me.uuid),c=new se._Window(this.wire,this.wire.me),c.on(r,a)),this.wire.sendAction(e,t).then((({payload:e})=>{o=e.data.uuid,n(e.data),s&&o===s.uuid&&(t.listener(s),c.removeListener(r,a))})).catch((e=>{c&&c.removeListener(r,a),i(e)}))}))}getVersion(){return this.wire.sendAction("get-version").then((({payload:e})=>e.data))}clearCache(e){return this.wire.sendAction("clear-cache",e).then((()=>{}))}deleteCacheOnExit(){return this.wire.sendAction("delete-cache-request").then((()=>{}))}exit(){return this.wire.sendAction("exit-desktop").then((()=>{}))}async fetchManifest(e){const{payload:{data:t}}=await this.wire.sendAction("fetch-manifest",{manifestUrl:e});return t}flushCookieStore(){return this.wire.sendAction("flush-cookie-store").then((()=>{}))}getAllWindows(){return this.wire.sendAction("get-all-windows").then((({payload:e})=>e.data))}getAllApplications(){return this.wire.sendAction("get-all-applications").then((({payload:e})=>e.data))}getCommandLineArguments(){return this.wire.sendAction("get-command-line-arguments").then((({payload:e})=>e.data))}async getCrashReporterState(){const{payload:{data:{diagnosticMode:e,isRunning:t}}}=await this.wire.sendAction("get-crash-reporter-state");return console.warn("diagnosticMode property is deprecated. It will be removed in a future version"),{diagnosticMode:e,diagnosticsMode:e,isRunning:t}}async startCrashReporter(e){const t=e,n={...t,diagnosticMode:t.diagnosticsMode||t.diagnosticMode},{payload:{data:{diagnosticMode:i,isRunning:r}}}=await this.wire.sendAction("start-crash-reporter",n);return{diagnosticMode:i,diagnosticsMode:i,isRunning:r}}getUniqueUserId(){return this.wire.sendAction("get-unique-user-id").then((({payload:e})=>e.data))}getEntityInfo(e,t){return this.wire.sendAction("get-entity-info",{uuid:e,name:t}).then((({payload:e})=>e.data))}getEnvironmentVariable(e){return this.wire.sendAction("get-environment-variable",{environmentVariables:e}).then((({payload:e})=>e.data))}getFocusedWindow(){return this.wire.sendAction("get-focused-window").then((({payload:e})=>e.data))}async isAppCertified(e){const{payload:{data:{certifiedInfo:t}}}=await this.wire.sendAction("is-app-certified",{manifestUrl:e});return t}getInstalledRuntimes(){return this.wire.sendAction("get-installed-runtimes").then((({payload:e})=>e.data.runtimes))}async getInstalledApps(){const{payload:{data:{installedApps:e}}}=await this.wire.sendAction("get-installed-apps");return e}getLog(e){return this.wire.sendAction("view-log",e).then((({payload:e})=>e.data))}getMachineId(){return this.wire.sendAction("get-machine-id").then((({payload:e})=>e.data))}getMinLogLevel(){return this.wire.sendAction("get-min-log-level").then((({payload:e})=>e.data))}getLogList(){return this.wire.sendAction("list-logs").then((({payload:e})=>e.data))}getMonitorInfo(){return this.wire.sendAction("get-monitor-info").then((({payload:e})=>e.data))}getMousePosition(){return this.wire.sendAction("get-mouse-position").then((({payload:e})=>e.data))}getProcessList(){return console.warn("System.getProcessList has been deprecated. Please consider using our new process APIs: Window.getProcessInfo, View.getProcessInfo, Application.getProcessInfo, System.getAllProcessInfo"),this.wire.sendAction("process-snapshot").then((({payload:e})=>e.data))}async getAllProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction("get-all-process-info",this.identity);return e}getProxySettings(){return this.wire.sendAction("get-proxy-settings").then((({payload:e})=>e.data))}getRuntimeInfo(){return this.wire.sendAction("get-runtime-info").then((({payload:e})=>e.data))}getRvmInfo(){return this.wire.sendAction("get-rvm-info").then((({payload:e})=>e.data))}getHostSpecs(){return this.wire.sendAction("get-host-specs").then((({payload:e})=>e.data))}getOSInfo(){return this.wire.sendAction("get-os-info").then((({payload:e})=>e.data))}launchExternalProcess(e){return this.sendExternalProcessRequest("launch-external-process",e)}monitorExternalProcess(e){return this.sendExternalProcessRequest("monitor-external-process",e)}log(e,t){return this.wire.sendAction("write-to-log",{level:e,message:t}).then((()=>{}))}openUrlWithBrowser(e){return this.wire.sendAction("open-url-with-browser",{url:e}).then((()=>{}))}async registerCustomProtocol(e){if("object"!=typeof e)throw new Error("Must provide an object with a `protocolName` property having a string value.");await this.wire.sendAction("register-custom-protocol",e)}async unregisterCustomProtocol(e){await this.wire.sendAction("unregister-custom-protocol",{protocolName:e})}async getCustomProtocolState(e){return this.wire.sendAction("get-custom-protocol-state",{protocolName:e}).then((({payload:e})=>e.data))}releaseExternalProcess(e){return this.wire.sendAction("release-external-process",{uuid:e}).then((()=>{}))}showDeveloperTools(e){return this.wire.sendAction("show-developer-tools",e).then((()=>{}))}terminateExternalProcess(e){return this.wire.sendAction("terminate-external-process",e).then((()=>{}))}updateProxySettings(e){return this.wire.sendAction("update-proxy",e).then((()=>{}))}async downloadAsset(e,t){const n=()=>{};let i=n,r=n;const o=new Promise(((e,t)=>{i=e,r=t}));if("openfin"!==this.wire.environment.type)throw new oe.NotSupportedError("downloadAsset only supported in an OpenFin Render process");const s=oe.RuntimeError.getCallSite(),a=this.wire.environment.getNextMessageId().toString(),c=`asset-download-progress-${a}`,d=`asset-download-error-${a}`,h=`asset-download-complete-${a}`,l=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},u=()=>{this.removeListener(c,l)};await Promise.all([this.on(c,l),this.once(d,(e=>{u();const{reason:t,err:n}=e;r(new oe.RuntimeError({reason:t,error:n},s))})),this.once(h,(()=>{u(),i()}))]);const p=Object.assign(e,{downloadId:a});return await this.wire.sendAction("download-asset",p).catch((e=>{throw u(),e})),o}downloadRuntime(e,t){const n=oe.RuntimeError.getCallSite();return new Promise(((i,r)=>{if("openfin"!==this.wire.environment.type)return void r(new oe.NotSupportedError("downloadRuntime only supported in an OpenFin Render process"));const o=this.wire.environment.getNextMessageId().toString(),s=`runtime-download-progress-${o}`,a=`runtime-download-error-${o}`,c=`runtime-download-complete-${o}`,d=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},h=()=>{this.removeListener(s,d)};this.on(s,d),this.once(a,(e=>{h();const{reason:t,err:i}=e;r(new oe.RuntimeError({reason:t,error:i},n))})),this.once(c,(()=>{h(),i()}));const l=Object.assign(e,{downloadId:o});this.wire.sendAction("download-runtime",l).catch((e=>{h(),r(e)}))}))}downloadPreloadScripts(e){return this.wire.sendAction("download-preload-scripts",{scripts:e}).then((({payload:e})=>e.data))}getAllExternalApplications(){return this.wire.sendAction("get-all-external-applications").then((({payload:e})=>e.data))}getAppAssetInfo(e){return this.wire.sendAction("get-app-asset-info",e).then((({payload:e})=>e.data))}getCookies(e){const t=this.wire.environment.getUrl(),n=Object.assign(e,{url:t});return this.wire.sendAction("get-cookies",n).then((({payload:e})=>e.data))}setMinLogLevel(e){return this.wire.sendAction("set-min-log-level",{level:e}).then((()=>{}))}resolveUuid(e){return this.wire.sendAction("resolve-uuid",{entityKey:e}).then((({payload:e})=>e.data))}executeOnRemote(e,t){return t.requestingIdentity=e,this.wire.ferryAction(t)}readRegistryValue(e,t,n){return this.wire.sendAction("read-registry-value",{rootKey:e,subkey:t,value:n}).then((({payload:e})=>e.data))}registerExternalConnection(e){return this.wire.sendAction("register-external-connection",{uuid:e}).then((({payload:e})=>e.data))}async getServiceConfiguration(e){if("string"!=typeof e.name)throw new Error("Must provide an object with a `name` property having a string value");const{name:t}=e;return this.wire.sendAction("get-service-configuration",{name:t}).then((({payload:e})=>e.data))}async getSystemAppConfig(e){if("string"!=typeof e)throw new Error("Must provide a string value for name of system app");return this.wire.sendAction("get-system-app-configuration",{name:e}).then((({payload:e})=>e.data))}async registerShutdownHandler(e){this.wire.sendAction("system-register-shutdown-handler").catch((e=>{}));const{uuid:t,name:n}=this.wire.me;this.on("system-shutdown",(i=>{e({proceed:()=>{this.wire.environment.raiseEvent("application/system-shutdown-handled",{uuid:t,name:n,topic:"application"})}})}))}runRvmHealthCheck(){return this.wire.sendAction("run-rvm-health-check").then((({payload:e})=>e.data))}async launchManifest(e,t={}){const{subscribe:n,...i}=t,r=i;if(n){const e=new ae.EventEmitter;n(e);const t="app-version-progress",i="runtime-status",o="app-version-complete",s="app-version-error",a=this.wire.environment.getNextMessageId().toString();r.appVersionId=a;const c=[o,t,i,s],d=e=>{const{appVersionId:t,topic:n,type:i,...r}=e;return{...r,type:c.find((e=>i.includes(e)))}},h=t=>{const n=d(t);e.emit(n.type,n)},l=()=>{this.removeListener(`${t}.${a}`,h),this.removeListener(`${i}.${a}`,h),this.removeListener(`${o}.${a}`,h),this.removeListener(`${s}.${a}`,h),this.removeListener(`${o}.${a}`,l),this.removeListener(`${s}.${a}`,l)};await Promise.all([this.on(`${t}.${a}`,h),this.on(`${i}.${a}`,h),this.once(`${o}.${a}`,h),this.once(`${s}.${a}`,h),this.once(`${o}.${a}`,l),this.once(`${s}.${a}`,l)])}return(await this.wire.sendAction("launch-manifest",{manifestUrl:e,opts:r})).payload.data.manifest}async queryPermissionForCurrentContext(e){const t={uuid:this.wire.me.uuid,name:this.wire.me.name};return(await this.wire.sendAction("query-permission-for-current-context",{apiName:e,identity:t})).payload.data}async enableNativeWindowIntegrationProvider(e){const{payload:t}=await this.wire.sendAction("enable-native-window-integration-provider",{permissions:e});return t.data}async registerUsage({data:e,type:t}){await this.wire.sendAction("register-usage",{data:e,type:t})}async getPrinters(){const{payload:e}=await this.wire.sendAction("system-get-printers");return e.data}async updateProcessLoggingOptions(e){await this.wire.sendAction("system-update-process-logging-options",{options:e})}async getDomainSettings(){const{payload:{data:e}}=await this.wire.sendAction("get-domain-settings",this.identity);return e}async setDomainSettings(e){await this.wire.sendAction("set-domain-settings",{domainSettings:e,...this.identity})}async refreshExtensions(){const{payload:e}=await this.wire.sendAction("refresh-extensions");return e.data}async getInstalledExtensions(){const{payload:e}=await this.wire.sendAction("get-installed-extensions");return e.data}}c.System=ce;var de={},he={};Object.defineProperty(he,"__esModule",{value:!0}),he.RefCounter=void 0;he.RefCounter=class{constructor(){this.topicRefMap=new Map}incRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t+1;n=i,this.topicRefMap.set(e,i)}else this.topicRefMap.set(e,1),n=1;return n}decRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t-1;this.topicRefMap.set(e,i),n=i}else n=-1;return n}actOnFirst(e,t,n){return 1===this.incRefCount(e)?t():n()}actOnLast(e,t,n){return 0===this.decRefCount(e)?t():n()}};var le={},ue={},pe={};Object.defineProperty(pe,"__esModule",{value:!0}),pe.ChannelBase=pe.ProtectedItems=void 0;const we=e=>async(t,n,i)=>{const r=await e(t,n,i);return void 0===r?n:r};pe.ProtectedItems=class{constructor(e,t){this.providerIdentity=e,this.close=t}};class ye{static defaultAction(e){throw new Error(`No action registered at target for ${e}`)}constructor(){this.subscriptions=new Map}async processAction(e,t,n){try{const i=this.subscriptions.has(e)?this.subscriptions.get(e):(t,n)=>(this.defaultAction??ye.defaultAction)(e,t,n),r=this.preAction?await this.preAction(e,t,n):t,o=await i(r,n);return this.postAction?await this.postAction(e,o,n):o}catch(t){if(this.errorMiddleware)return this.errorMiddleware(e,t,n);throw t}}beforeAction(e){if(this.preAction)throw new Error("Already registered beforeAction middleware");this.preAction=we(e)}onError(e){if(this.errorMiddleware)throw new Error("Already registered error middleware");this.errorMiddleware=e}afterAction(e){if(this.postAction)throw new Error("Already registered afterAction middleware");this.postAction=we(e)}remove(e){this.subscriptions.delete(e)}setDefaultAction(e){if(this.defaultAction)throw new Error("default action can only be set once");this.defaultAction=e}register(e,t){if(this.subscriptions.has(e))throw new Error(`Subscription already registered for action: ${e}. Unsubscribe before adding new subscription`);return this.subscriptions.set(e,t),!0}}pe.ChannelBase=ye;var fe,ge,me,ve=s&&s.__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)},Ce=s&&s.__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};Object.defineProperty(ue,"__esModule",{value:!0}),ue.ChannelClient=void 0;const be=pe,Ie=new Map;class Ee extends be.ChannelBase{static closeChannelByEndpointId(e){const t=Ie.get(e);t&&ve(t,me,"f").call(t)}static handleProviderDisconnect(e){for(const t of Ie.values())t.providerIdentity.channelId===e.channelId&&(t.disconnectListener(e),ve(t,me,"f").call(t))}constructor(e,t,n){super(),fe.set(this,void 0),ge.set(this,void 0),this.processAction=(e,t,n)=>super.processAction(e,t,n),me.set(this,(()=>{Ie.delete(this.endpointId),ve(this,ge,"f").close()})),Ce(this,fe,new be.ProtectedItems(e,t),"f"),this.disconnectListener=()=>{},this.endpointId=e.endpointId,Ce(this,ge,n,"f"),Ie.set(this.endpointId,this),n.receive(this.processAction)}get providerIdentity(){return ve(this,fe,"f").providerIdentity}async dispatch(e,t){if(ve(this,ge,"f").isEndpointConnected(this.providerIdentity.channelId))return ve(this,ge,"f").send(this.providerIdentity.channelId,e,t);throw new Error("The client you are trying to dispatch from is disconnected from the target provider.")}onDisconnection(e){this.disconnectListener=t=>{try{e(t)}catch(e){throw new Error(`Error while calling the onDisconnection callback: ${e.message}`)}finally{this.disconnectListener=()=>{}}}}async disconnect(){await this.sendDisconnectAction(),ve(this,me,"f").call(this)}async sendDisconnectAction(){const e=ve(this,fe,"f");await e.close()}static async wireClose(e,t,n){const{channelName:i,uuid:r,name:o}=t;await e.sendAction("disconnect-from-channel",{channelName:i,uuid:r,name:o,endpointId:n})}}ue.ChannelClient=Ee,fe=new WeakMap,ge=new WeakMap,me=new WeakMap;var xe={},Ae={};Object.defineProperty(Ae,"__esModule",{value:!0}),Ae.exhaustiveCheck=void 0,Ae.exhaustiveCheck=function(e,t){throw new Error(`Unsupported value: ${e}${t?`\n Supported values are: ${t.join("")}`:""}`)};var Pe,Me,_e,Oe={},Se=s&&s.__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},Re=s&&s.__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)};Object.defineProperty(Oe,"__esModule",{value:!0}),Oe.ClassicInfo=Oe.ClassicStrategy=void 0;Oe.ClassicStrategy=class{constructor(e,t,n,i){this.messageReceiver=t,this.endpointId=n,this.providerIdentity=i,Pe.set(this,void 0),Me.set(this,new Map),_e.set(this,new Map),this.send=async(e,t,n)=>{const i=Re(this,Me,"f").get(e);if(!i)throw new Error(`Could not locate routing info for endpoint ${e}`);const r={...i};r.isLocalEndpointId&&delete r.endpointId,delete r.isLocalEndpointId;const o=Re(this,Pe,"f").sendAction("send-channel-message",{...r,providerIdentity:this.providerIdentity,action:t,payload:n});Re(this,_e,"f").get(e)?.add(o);return(await o.catch((e=>{throw new Error(e.message)})).finally((()=>{Re(this,_e,"f").get(e)?.delete(o)}))).payload.data.result},this.close=async()=>{this.messageReceiver.removeEndpoint(this.providerIdentity.channelId,this.endpointId),[...Re(this,Me,"f").keys()].forEach((e=>this.closeEndpoint(e))),Se(this,Me,new Map,"f")},Se(this,Pe,e,"f")}onEndpointDisconnect(e,t){}receive(e){this.messageReceiver.addEndpoint(e,this.providerIdentity.channelId,this.endpointId)}async closeEndpoint(e){const t=Re(this,Me,"f").get(e);Re(this,Me,"f").delete(e);const n=Re(this,_e,"f").get(e);n?.forEach((n=>{const i=`Channel connection with identity uuid: ${t?.uuid} / name: ${t?.name} / endpointId: ${e} no longer connected.`;n.cancel(new Error(i))}))}isEndpointConnected(e){return Re(this,Me,"f").has(e)}addEndpoint(e,t){Re(this,Me,"f").set(e,t.endpointIdentity),Re(this,_e,"f").set(e,new Set)}isValidEndpointPayload(e){return"string"==typeof e?.endpointIdentity?.endpointId||"string"==typeof e?.endpointIdentity?.channelId}},Pe=new WeakMap,Me=new WeakMap,_e=new WeakMap,Oe.ClassicInfo={version:5,minimumVersion:0,type:"classic"};var Fe={},je={},ke={};Object.defineProperty(ke,"__esModule",{value:!0}),ke.errorToPOJO=void 0,ke.errorToPOJO=function(e){return{stack:e.stack,name:e.name,message:e.message,toString:()=>e.stack||e.toString()}};var Le,Te,$e=s&&s.__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)},Be=s&&s.__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};Object.defineProperty(je,"__esModule",{value:!0}),je.RTCEndpoint=void 0;const Ge=ke;je.RTCEndpoint=class{static isValidEndpointPayload(e){const t=e=>"object"==typeof e&&null!==e;return t(e)&&t(e.endpointIdentity)&&t(e.rtc)&&"string"==typeof e.endpointIdentity.endpointId}constructor({rtc:e,endpointIdentity:t}){this.responseMap=new Map,Le.set(this,null),Te.set(this,void 0),this.connectionStateChangeHandler=e=>{"connected"!==this.rtc.rtcClient.connectionState&&(this.rtc.rtcClient.removeEventListener("connectionstatechange",this.connectionStateChangeHandler),this.close(),$e(this,Te,"f")&&$e(this,Te,"f").call(this))},this.send=async(e,t)=>{const n=`message-${Math.random()}`,i=new Promise(((e,t)=>{this.responseMap.set(n,{resolve:e,reject:t})}));return this.rtc.channels.request.send(JSON.stringify({action:e,payload:t,messageId:n})),i},this.close=()=>{this.responseMap.forEach((e=>e.reject("Connection has closed."))),this.responseMap=new Map,this.rtc.channels.request.close(),this.rtc.channels.response.close(),this.rtc.rtcClient.close()},this.rtc=e,this.endpointIdentity=t,this.rtc.channels.response.addEventListener("message",(e=>{let{data:t}=e;e.data instanceof ArrayBuffer&&(t=(new TextDecoder).decode(e.data));const{messageId:n,payload:i,success:r,error:o}=JSON.parse(t),{resolve:s,reject:a}=this.responseMap.get(n)??{};s&&a?(this.responseMap.delete(n),r?s(i):a(o)):(console.log("Could not find id in responseMap."),console.log(e))})),this.rtc.channels.request.addEventListener("message",(async e=>{let{data:n}=e;e.data instanceof ArrayBuffer&&(n=(new TextDecoder).decode(e.data));const{messageId:i,action:r,payload:o}=JSON.parse(n);if($e(this,Le,"f"))try{const e=await $e(this,Le,"f").call(this,r,o,t);this.rtc.channels.response.send(JSON.stringify({messageId:i,payload:e,success:!0}))}catch(e){"open"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,error:(0,Ge.errorToPOJO)(e),success:!1}))}else"open"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,success:!1,error:"Connection not ready."}))})),this.rtc.rtcClient.addEventListener("connectionstatechange",this.connectionStateChangeHandler),Object.values(this.rtc.channels).forEach((e=>{e.onclose=e=>{[...this.responseMap.values()].forEach((e=>e.reject(new Error("RTCDataChannel closed unexpectedly, this is most commonly caused by message size. Note: RTC Channels have a message size limit of ~255kB.")))),this.close(),$e(this,Te,"f")&&$e(this,Te,"f").call(this)}}))}onDisconnect(e){if($e(this,Te,"f"))throw new Error("RTCEndpoint disconnectListener cannot be set twice.");Be(this,Te,e,"f")}receive(e){if($e(this,Le,"f"))throw new Error("You have already set a listener for this RTC Endpoint.");Be(this,Le,e,"f")}get connected(){return"connected"===this.rtc.rtcClient.connectionState}},Le=new WeakMap,Te=new WeakMap;var We,He,Ne,De={},Ue=s&&s.__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)},Ve=s&&s.__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};Object.defineProperty(De,"__esModule",{value:!0}),De.EndpointStrategy=void 0;De.EndpointStrategy=class{constructor(e,t,n){this.EndpointType=e,this.StrategyName=n,We.set(this,null),He.set(this,new Map),Ne.set(this,!0),this.send=async(e,t,n)=>this.getEndpointById(e).send(t,n),this.close=async()=>{Ue(this,Ne,"f")&&(Ue(this,He,"f").forEach((e=>e.close())),Ve(this,He,new Map,"f")),Ve(this,Ne,!1,"f")},this.isValidEndpointPayload=t}onEndpointDisconnect(e,t){this.getEndpointById(e).onDisconnect(t)}receive(e){if(Ue(this,We,"f"))throw new Error(`You have already set a listener for this ${this.StrategyName} Strategy`);Ve(this,We,e,"f"),Ue(this,He,"f").forEach((e=>e.receive(Ue(this,We,"f"))))}getEndpointById(e){const t=Ue(this,He,"f").get(e);if(!t)throw new Error(`Client with endpoint id ${e} is not connected`);return t}get connected(){return Ue(this,Ne,"f")}isEndpointConnected(e){return Ue(this,He,"f").has(e)}addEndpoint(e,t){if(!Ue(this,Ne,"f"))return void console.warn(`Adding endpoint to disconnected ${this.StrategyName} Strategy`);const n=new this.EndpointType(t);Ue(this,We,"f")&&n.receive(Ue(this,We,"f")),Ue(this,He,"f").set(e,n)}async closeEndpoint(e){Ue(this,He,"f").delete(e)}},We=new WeakMap,He=new WeakMap,Ne=new WeakMap,Object.defineProperty(Fe,"__esModule",{value:!0}),Fe.RTCInfo=Fe.RTCStrategy=void 0;const ze=je,Ke=De;class qe extends Ke.EndpointStrategy{constructor(){super(ze.RTCEndpoint,ze.RTCEndpoint.isValidEndpointPayload,"RTC")}}Fe.RTCStrategy=qe,Fe.RTCInfo={version:2,minimumVersion:0,type:"rtc"};var Je={};Object.defineProperty(Je,"__esModule",{value:!0}),Je.RTCICEManager=void 0;const Ye=d;class Ze extends Ye.EmitterBase{constructor(e){super(e,"channel"),this.ensureChannelOpened=e=>new Promise(((t,n)=>{if("open"===e.readyState)t();else if("connecting"===e.readyState){const n=()=>{e.removeEventListener("open",n),t()};e.addEventListener("open",n)}else n(new Error("This Channel has already closed"))}))}static createDataChannelPromise(e,t){let n;const i=new Promise((e=>{n=e})),r=i=>{const o=()=>{i.channel.removeEventListener("open",o),n(i.channel)};i.channel.label===e&&(i.channel.addEventListener("open",o),t.removeEventListener("datachannel",r))};return t.addEventListener("datachannel",r),i}async listenForProviderIce(e,t){await this.on(this.createProviderEventName(e),t,{timestamp:Date.now()})}async raiseProviderIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createProviderEventName(e)),t)}async listenForClientIce(e,t){await this.on(this.createClientEventName(e),t,{timestamp:Date.now()})}async raiseClientIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createClientEventName(e)),t)}cleanupIceListeners(e){this.removeAllListeners(this.createClientEventName(e)),this.removeAllListeners(this.createProviderEventName(e))}createClientEventName(e){return`ice-client-${e}`}createProviderEventName(e){return`ice-provider-${e}`}createRouteString(e){return`channel/${e}`}createRtcPeer(){return this.wire.environment.getRtcPeer()}async startClientOffer(){const e=Math.random().toString(),t=this.createRtcPeer();t.addEventListener("icecandidate",(async t=>{t.candidate&&await this.raiseClientIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForProviderIce(e,(async e=>{await t.addIceCandidate(e.candidate)}));const n={request:t.createDataChannel("request"),response:t.createDataChannel("response")},i=await t.createOffer();await t.setLocalDescription(i);const r=Promise.all([n.request,n.response].map(this.ensureChannelOpened)).then((()=>{}));return{rtcClient:t,channels:n,offer:i,rtcConnectionId:e,channelsOpened:r}}async finishClientOffer(e,t,n){return await e.setRemoteDescription(t),await n,!0}async createProviderAnswer(e,t){const n=this.createRtcPeer(),i=Ze.createDataChannelPromise("request",n),r=Ze.createDataChannelPromise("response",n);n.addEventListener("icecandidate",(async t=>{t.candidate&&await this.raiseProviderIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForClientIce(e,(async e=>{await n.addIceCandidate(e.candidate)})),await n.setRemoteDescription(t);const o=await n.createAnswer();await n.setLocalDescription(o);const s=Promise.all([i,r]).then((([t,n])=>(this.cleanupIceListeners(e),{request:t,response:n})));return{rtcClient:n,answer:o,channels:s}}}Je.RTCICEManager=Ze;var Qe={},Xe={};function et(e){return[...e.split(".").reverse().entries()].reduce(((e,[t,n])=>e+ +n*1e4**t),0)}function tt(e,t){return et(e)>=et(t)}function nt(e){return e.split("/")[0]}Object.defineProperty(Xe,"__esModule",{value:!0}),Xe.runtimeUuidMeetsMinimumRuntimeVersion=Xe.parseRuntimeUuid=Xe.meetsMinimumRuntimeVersion=void 0,Xe.meetsMinimumRuntimeVersion=tt,Xe.parseRuntimeUuid=nt,Xe.runtimeUuidMeetsMinimumRuntimeVersion=function(e,t){return tt(nt(e),t)};var it,rt,ot,st,at,ct=s&&s.__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)},dt=s&&s.__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};Object.defineProperty(Qe,"__esModule",{value:!0}),Qe.ChannelProvider=void 0;const ht=pe,lt=Xe;class ut extends ht.ChannelBase{get connections(){return[...ct(this,it,"f")]}static handleClientDisconnection(e,t){const n=e.connections.find((e=>e.endpointId===t.endpointId));if(n)ct(e,st,"f").call(e,n);else{e.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name)).forEach(ct(e,st,"f"))}e.disconnectListener(t)}static setProviderRemoval(e,t){ut.removalMap.set(e,t)}constructor(e,t,n){super(),it.set(this,void 0),rt.set(this,void 0),ot.set(this,void 0),st.set(this,(e=>{const t=this.connections.filter((t=>t.endpointId!==e.endpointId));ct(this,ot,"f").closeEndpoint(e.endpointId),dt(this,it,t,"f")})),this.processAction=async(e,t,n)=>(ut.clientIsMultiRuntime(n)&&!(0,lt.runtimeUuidMeetsMinimumRuntimeVersion)(n.runtimeUuid,"18.87.56.0")?this.handleMultiRuntimeLegacyClient(n):this.checkForClientConnection(n),super.processAction(e,t,n)),at.set(this,(()=>{ct(this,ot,"f").close();const e=ut.removalMap.get(this);e&&e()})),dt(this,rt,new ht.ProtectedItems(e,t),"f"),this.connectListener=()=>{},this.disconnectListener=()=>{},dt(this,it,[],"f"),dt(this,ot,n,"f"),n.receive(this.processAction)}dispatch(e,t,n){const i=e.endpointId??this.getEndpointIdForOpenFinId(e,t);return i&&ct(this,ot,"f").isEndpointConnected(i)?ct(this,ot,"f").send(i,t,n):Promise.reject(new Error(`Client connection with identity uuid: ${e.uuid} / name: ${e.name} / endpointId: ${i} no longer connected.`))}async processConnection(e,t){return ct(this,it,"f").push(e),this.connectListener(e,t)}publish(e,t){return this.connections.map((n=>ct(this,ot,"f").send(n.endpointId,e,t)))}onConnection(e){this.connectListener=e}onDisconnection(e){this.disconnectListener=e}async destroy(){const e=ct(this,rt,"f");e.providerIdentity,dt(this,it,[],"f"),await e.close(),ct(this,at,"f").call(this)}async getAllClientInfo(){return this.connections.map((e=>{const{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}=e;return{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}}))}checkForClientConnection(e){if(!this.isClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider.\n Client Identity: {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}isClientConnected(e){return ut.clientIdentityIncludesEndpointId(e)?this.connections.some((t=>t.endpointId===e.endpointId&&t.uuid===e.uuid&&t.name===e.name)):this.isLegacyClientConnected(e)}isLegacyClientConnected(e){return this.connections.some((t=>t.uuid===e.uuid&&t.name===e.name))}handleMultiRuntimeLegacyClient(e){if(!this.isLegacyClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider. Client Identity:\n {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}getEndpointIdForOpenFinId(e,t){const n=this.connections.filter((t=>t.name===e.name&&t.uuid===e.uuid));if(n.length>=2){const n=ct(this,rt,"f"),{uuid:i,name:r}=e,o=n?.providerIdentity.uuid,s=n?.providerIdentity.name;console.warn(`WARNING: Dispatch call may have unintended results. The "to" argument of your dispatch call is missing the\n "endpointId" parameter. The identity you are dispatching to ({uuid: ${i}, name: ${r}})\n has multiple channelClients for this channel. Your dispatched action: (${t}) from the provider:\n ({uuid: ${o}, name: ${s}}) will only be processed by the most recently-created client.`)}return n.pop()?.endpointId}static clientIdentityIncludesEndpointId(e){return void 0!==e.endpointId}static clientIsMultiRuntime(e){return void 0!==e.runtimeUuid}static async wireClose(e,t){await e.sendAction("destroy-channel",{channelName:t})}}Qe.ChannelProvider=ut,it=new WeakMap,rt=new WeakMap,ot=new WeakMap,st=new WeakMap,at=new WeakMap,ut.removalMap=new WeakMap;var pt={};Object.defineProperty(pt,"__esModule",{value:!0}),pt.MessageReceiver=void 0;const wt=ue,yt=d;class ft extends yt.Base{constructor(e){super(e),this.onmessage=e=>"process-channel-message"===e.action&&(this.processChannelMessage(e),!0),this.endpointMap=new Map,this.latestEndpointIdByChannelId=new Map,e.registerMessageHandler(this.onmessage.bind(this))}async processChannelMessage(e){const{senderIdentity:t,providerIdentity:n,action:i,ackToSender:r,payload:o,intendedTargetIdentity:s}=e.payload,a=s.channelId??s.endpointId??this.latestEndpointIdByChannelId.get(n.channelId),c=this.endpointMap.get(a);if(!c)return r.payload.success=!1,r.payload.reason=`Client connection with identity uuid: ${this.wire.me.uuid} / name: ${this.wire.me.name} / endpointId: ${a} no longer connected.`,this.wire.sendRaw(r);try{const e=await c(i,o,t);return r.payload.payload=r.payload.payload||{},r.payload.payload.result=e,this.wire.sendRaw(r)}catch(e){return r.payload.success=!1,r.payload.reason=e.message,this.wire.sendRaw(r)}}addEndpoint(e,t,n){this.endpointMap.set(n,e),t!==n&&this.latestEndpointIdByChannelId.set(t,n)}removeEndpoint(e,t){this.endpointMap.delete(t),this.latestEndpointIdByChannelId.get(e)===t&&this.latestEndpointIdByChannelId.delete(e)}checkForPreviousClientConnection(e){const t=this.latestEndpointIdByChannelId.get(e);t&&(wt.ChannelClient.closeChannelByEndpointId(t),console.warn("You have created a second connection to an older provider. First connection has been removed from the clientMap"),console.warn("If the provider calls publish(), you may receive multiple messages."))}}pt.MessageReceiver=ft;var gt={};Object.defineProperty(gt,"__esModule",{value:!0}),gt.ProtocolManager=void 0;gt.ProtocolManager=class{constructor(e){this.ProtocolsInPreferenceOrder=e,this.DefaultClientProtocols=["classic"],this.DefaultProviderProtocols=["classic"],this.getClientProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultClientProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(", ")}.`);return t},this.getProviderProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultProviderProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(", ")}.`);return t},this.getCompatibleProtocols=(e,t)=>t.supportedProtocols.filter((t=>e.some((e=>e.type===t.type&&t.version>=e.minimumVersion&&e.version>=(t.minimumVersion??0))))).slice(0,t.maxProtocols)}};var mt={};Object.defineProperty(mt,"__esModule",{value:!0});class vt{static combine(e,t){return new vt(e,t)}constructor(e,t){this.primary=e,this.secondary=t}onEndpointDisconnect(e,t){this.primary.onEndpointDisconnect(e,(()=>{this.secondary.isEndpointConnected(e)||t()})),this.secondary.onEndpointDisconnect(e,(()=>{this.primary.isEndpointConnected(e)||t()}))}isValidEndpointPayload(e){return this.primary.isValidEndpointPayload(e)||this.secondary.isValidEndpointPayload(e)}async closeEndpoint(e){await this.primary.closeEndpoint(e),await this.secondary.closeEndpoint(e)}isEndpointConnected(e){return this.primary.isEndpointConnected(e)||this.secondary.isEndpointConnected(e)}async addEndpoint(e,t){this.primary.isValidEndpointPayload(t)&&await this.primary.addEndpoint(e,t),this.secondary.isValidEndpointPayload(t)&&await this.secondary.addEndpoint(e,t)}receive(e){this.primary.receive(e),this.secondary.receive(e)}send(e,t,n){return this.primary.isEndpointConnected(e)?this.primary.send(e,t,n):this.secondary.send(e,t,n)}async close(){await Promise.all([this.primary.close(),this.secondary.close()])}}mt.default=vt;var Ct,bt,It=s&&s.__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},Et=s&&s.__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)},xt=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(xe,"__esModule",{value:!0}),xe.ConnectionManager=void 0;const At=Ae,Pt=d,Mt=Oe,_t=Fe,Ot=Je,St=Qe,Rt=pt,Ft=gt,jt=xt(mt);class kt extends Pt.Base{static getProtocolOptionsFromStrings(e){return e.map((e=>{switch(e){case"rtc":return _t.RTCInfo;case"classic":return Mt.ClassicInfo;default:return(0,At.exhaustiveCheck)(e,["rtc","classic"])}}))}constructor(e){super(e),Ct.set(this,void 0),bt.set(this,void 0),this.removeChannelFromProviderMap=e=>{this.providerMap.delete(e)},this.onmessage=e=>"process-channel-connection"===e.action&&(this.processChannelConnection(e),!0),this.providerMap=new Map,this.protocolManager=new Ft.ProtocolManager("node"===this.wire.environment.type?["classic"]:["rtc","classic"]),It(this,Ct,new Rt.MessageReceiver(e),"f"),It(this,bt,new Ot.RTCICEManager(e),"f"),e.registerMessageHandler(this.onmessage.bind(this))}createProvider(e,t){const n=Object.assign(this.wire.environment.getDefaultChannelOptions().create,e||{}),i=this.protocolManager.getProviderProtocols(n?.protocols),r=i.map((e=>{switch(e){case"rtc":return new _t.RTCStrategy;case"classic":return new Mt.ClassicStrategy(this.wire,Et(this,Ct,"f"),t.channelId,t);default:return(0,At.exhaustiveCheck)(e,["rtc","classic"])}}));let o;if(2===r.length){const[e,t]=r;o=jt.default.combine(e,t)}else{if(1!==r.length)throw new Error("failed to combine strategies");[o]=r}const s=new St.ChannelProvider(t,(()=>St.ChannelProvider.wireClose(this.wire,t.channelName)),o),a=t.channelId;return this.providerMap.set(a,{provider:s,strategy:o,supportedProtocols:kt.getProtocolOptionsFromStrings(i)}),St.ChannelProvider.setProviderRemoval(s,this.removeChannelFromProviderMap.bind(this)),s}async createClientOffer(e){const t=this.protocolManager.getClientProtocols(e?.protocols);let n;return{offer:{supportedProtocols:await Promise.all(t.map((async e=>{switch(e){case"rtc":{const{rtcClient:e,channels:t,offer:i,rtcConnectionId:r,channelsOpened:o}=await Et(this,bt,"f").startClientOffer();return n={rtcClient:e,channels:t,channelsOpened:o},{type:"rtc",version:_t.RTCInfo.version,payload:{offer:i,rtcConnectionId:r}}}case"classic":return{type:"classic",version:Mt.ClassicInfo.version};default:return(0,At.exhaustiveCheck)(e,["rtc","classic"])}}))),maxProtocols:2},rtc:n}}async createClientStrategy(e,t){t.endpointId||(t.endpointId=this.wire.environment.getNextMessageId(),Et(this,Ct,"f").checkForPreviousClientConnection(t.channelId));const n=t.answer??{supportedProtocols:[{type:"classic",version:1}]},i=(await Promise.all(n.supportedProtocols.map((async n=>"rtc"===n.type&&e?(await Et(this,bt,"f").finishClientOffer(e.rtcClient,n.payload.answer,e.channelsOpened),new _t.RTCStrategy):"classic"===n.type?new Mt.ClassicStrategy(this.wire,Et(this,Ct,"f"),t.endpointId,t):null)))).filter((e=>null!==e));let r;if(e&&!i.some((e=>e instanceof _t.RTCStrategy))&&e&&e.rtcClient.close(),i.length>=2)r=jt.default.combine(i[0],i[1]);else{if(!i.length)throw new Error("No compatible protocols");[r]=i}const o={endpointIdentity:t,rtc:e};return r.addEndpoint(t.channelId,o),r}async processChannelConnection(e){const{clientIdentity:t,providerIdentity:n,ackToSender:i,payload:r,offer:o}=e.payload;t.endpointId?t.isLocalEndpointId=!1:(t.endpointId=this.wire.environment.getNextMessageId(),t.isLocalEndpointId=!0);const s=n.channelId,a=this.providerMap.get(s);if(!a)return i.payload.success=!1,i.payload.reason=`Channel "${n.channelName}" has been destroyed.`,this.wire.sendRaw(i);const{provider:c,strategy:d,supportedProtocols:h}=a;try{if(!(c instanceof St.ChannelProvider))throw Error("Cannot connect to a channel client");const e=o??{supportedProtocols:[{type:"classic",version:1}],maxProtocols:1},n=this.protocolManager.getCompatibleProtocols(h,e);if(!n.length)throw new Error("This provider does not support any of the offered protocols.");const s=await c.processConnection(t,r);i.payload.payload=i.payload.payload||{};let a={supportedProtocols:[],endpointPayloadPromise:Promise.resolve({endpointIdentity:t})};return a=await n.reduce((async(e,t)=>{const n=await e;if("rtc"===t.type){const{answer:e,rtcClient:i,channels:r}=await Et(this,bt,"f").createProviderAnswer(t.payload.rtcConnectionId,t.payload.offer);n.supportedProtocols.push({type:"rtc",version:_t.RTCInfo.version,payload:{answer:e}}),n.endpointPayloadPromise=n.endpointPayloadPromise.then((e=>r.then((t=>({...e,rtc:{rtcClient:i,channels:t}})))))}else n.supportedProtocols.push({type:"classic",version:Mt.ClassicInfo.version});return n}),Promise.resolve(a)),a.endpointPayloadPromise.then((e=>d.addEndpoint(t.endpointId,e))),i.payload.payload.result=s,i.payload.payload.answer=a,this.wire.sendRaw(i)}catch(e){return i.payload.success=!1,i.payload.reason=e.message,this.wire.sendRaw(i)}}}xe.ConnectionManager=kt,Ct=new WeakMap,bt=new WeakMap;var Lt,Tt,$t,Bt=s&&s.__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},Gt=s&&s.__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)};Object.defineProperty(le,"__esModule",{value:!0}),le.Channel=void 0;const Wt=t,Ht=G,Nt=d,Dt=ue,Ut=xe,Vt=Qe;function zt(e){const t=Math.floor(e/10),n=Math.min(3e4,500*2**t);return new Promise((e=>{setTimeout((()=>{e(!1)}),n)}))}class Kt extends Nt.EmitterBase{constructor(e){super(e,"channel"),Lt.set(this,void 0),Tt.set(this,new Wt.EventEmitter),$t.set(this,new Ht.AsyncRetryableLazy((async()=>{await Promise.all([this.on("disconnected",(e=>{Dt.ChannelClient.handleProviderDisconnect(e)})),this.on("connected",((...e)=>{Gt(this,Tt,"f").emit("connected",...e)}))]).catch((()=>new Error("error setting up channel connection listeners")))}))),Bt(this,Lt,new Ut.ConnectionManager(e),"f")}async getAllChannels(){return this.wire.sendAction("get-all-channels").then((({payload:e})=>e.data))}async onChannelConnect(e){await this.on("connected",e)}async onChannelDisconnect(e){await this.on("disconnected",e)}async safeConnect(e,t,n){const i={count:0};do{let r=()=>{};const o=new Promise((t=>{r=n=>{e===n.channelName&&t(!0)},Gt(this,Tt,"f").on("connected",r)}));try{if(i.count>0){i.gotConnectedEvent=await Promise.race([zt(i.count),o]);const t=await this.wire.sendAction("connect-to-channel",{...n,retryInfo:i});return console.log(`Successfully connected to channelName: ${e}`),t.payload.data}const t=this.wire.sendAction("connect-to-channel",n);i.originalMessageId=t.messageId;return(await t).payload.data}catch(n){if(!n.message.includes("internal-nack"))throw n;t&&0===i.count&&console.warn(`No channel found for channelName: ${e}. Waiting for connection...`)}finally{i.count+=1,Gt(this,Tt,"f").removeListener("connected",r)}}while(t);throw new Error(`No channel found for channelName: ${e}.`)}async connect(e,t={}){if(await Gt(this,$t,"f").getValue(),!e||"string"!=typeof e)throw new Error("Please provide a channelName string to connect to a channel.");const n={wait:!0,...this.wire.environment.getDefaultChannelOptions().connect,...t},{offer:i,rtc:r}=await Gt(this,Lt,"f").createClientOffer(n);let o;(this.fin.me.isFrame||this.fin.me.isView||this.fin.me.isWindow)&&(o=(await this.fin.me.getInfo()).url);const s={channelName:e,...n,offer:i,connectionUrl:o},a=await this.safeConnect(e,n.wait,s),c=await Gt(this,Lt,"f").createClientStrategy(r,a),d=new Dt.ChannelClient(a,(()=>Dt.ChannelClient.wireClose(this.wire,a,a.endpointId)),c);return c.onEndpointDisconnect(a.channelId,(async()=>{try{await d.sendDisconnectAction()}catch(e){console.warn(`Something went wrong during disconnect for client with uuid: ${a.uuid} / name: ${a.name} / endpointId: ${a.endpointId}.`)}finally{Dt.ChannelClient.handleProviderDisconnect(a)}})),d}async create(e,t){if(!e)throw new Error("Please provide a channelName to create a channel");const{payload:{data:n}}=await this.wire.sendAction("create-channel",{channelName:e}),i=Gt(this,Lt,"f").createProvider(t,n);return this.on("client-disconnected",(t=>{t.channelName===e&&Vt.ChannelProvider.handleClientDisconnection(i,t)})),i}}le.Channel=Kt,Lt=new WeakMap,Tt=new WeakMap,$t=new WeakMap,Object.defineProperty(de,"__esModule",{value:!0}),de.InterAppPayload=de.InterApplicationBus=void 0;const qt=t,Jt=d,Yt=he,Zt=le,Qt=O;class Xt extends Jt.Base{constructor(e){super(e),this.events={subscriberAdded:"subscriber-added",subscriberRemoved:"subscriber-removed"},this.refCounter=new Yt.RefCounter,this.Channel=new Zt.Channel(e),this.emitter=new qt.EventEmitter,e.registerMessageHandler(this.onmessage.bind(this)),this.on=this.emitter.on.bind(this.emitter),this.removeAllListeners=this.emitter.removeAllListeners.bind(this.emitter)}async publish(e,t){await this.wire.sendAction("publish-message",{topic:e,message:t,sourceWindowName:this.me.name})}async send(e,t,n){const i=(0,Qt.validateIdentity)(e);if(i)throw new Error(i);await this.wire.sendAction("send-message",{destinationUuid:e.uuid,destinationWindowName:e.name,topic:t,message:n,sourceWindowName:this.me.name})}subscribe(e,t,n){const i=this.createSubscriptionKey(e.uuid,e.name||"*",t);return this.emitter.on(i,n),this.refCounter.actOnFirst(i,(async()=>{await this.wire.sendAction("subscribe",{sourceUuid:e.uuid,sourceWindowName:e.name||"*",topic:t,destinationWindowName:this.me.name})}),(()=>Promise.resolve()))}unsubscribe(e,t,n){const i=e.name||"*",r=this.createSubscriptionKey(e.uuid,i,t);return this.emitter.removeListener(r,n),this.refCounter.actOnLast(r,(async()=>{await this.wire.sendAction("unsubscribe",{sourceUuid:e.uuid,sourceWindowName:i,topic:t,destinationWindowName:this.me.name})}),(()=>new Promise((e=>e)).then((()=>{}))))}processMessage(e){const{payload:{message:t,sourceWindowName:n,sourceUuid:i,topic:r}}=e,o=[this.createSubscriptionKey(i,n,r),this.createSubscriptionKey(i,"*",r),this.createSubscriptionKey("*","*",r)],s={uuid:i,name:n};o.forEach((e=>{this.emitter.emit(e,t,s)}))}emitSubscriverEvent(e,t){const{payload:{targetName:n,uuid:i,topic:r}}=t,o={name:n,uuid:i,topic:r};this.emitter.emit(e,o)}createSubscriptionKey(e,t,n){const i=t||"*";if(!(e&&i&&n))throw new Error("Missing uuid, name, or topic string");return function(...e){return e.map((e=>Buffer.from(`${e}`).toString("base64"))).join("/")}(e,i,n)}onmessage(e){const{action:t}=e;switch(t){case"process-message":this.processMessage(e);break;case this.events.subscriberAdded:this.emitSubscriverEvent(this.events.subscriberAdded,e);break;case this.events.subscriberRemoved:this.emitSubscriverEvent(this.events.subscriberRemoved,e)}return!0}}de.InterApplicationBus=Xt;de.InterAppPayload=class{};var en={};Object.defineProperty(en,"__esModule",{value:!0}),en.Clipboard=void 0;const tn=d;class nn extends tn.Base{async writeText(e){await this.wire.sendAction("clipboard-write-text",e)}async readText(e){const{payload:t}=await this.wire.sendAction("clipboard-read-text",{type:e});return t.data}async writeImage(e){await this.wire.sendAction("clipboard-write-image",e)}async readImage(e={format:"dataURL"}){const{payload:t}=await this.wire.sendAction("clipboard-read-image",e);return t.data}async writeHtml(e){await this.wire.sendAction("clipboard-write-html",e)}async readHtml(e){const{payload:t}=await this.wire.sendAction("clipboard-read-html",{type:e});return t.data}async writeRtf(e){await this.wire.sendAction("clipboard-write-rtf",e)}async readRtf(e){const{payload:t}=await this.wire.sendAction("clipboard-read-rtf",{type:e});return t.data}async write(e){await this.wire.sendAction("clipboard-write",e)}async getAvailableFormats(e){const{payload:t}=await this.wire.sendAction("clipboard-read-formats",{type:e});return t.data}}en.Clipboard=nn;var rn={},on={},sn={};Object.defineProperty(sn,"__esModule",{value:!0}),sn.ExternalApplication=void 0;const an=d;class cn extends an.EmitterBase{constructor(e,t){super(e,"external-application",t.uuid),this.identity=t}getInfo(){return this.wire.sendAction("get-external-application-info",this.identity).then((({payload:e})=>e.data))}}sn.ExternalApplication=cn,Object.defineProperty(on,"__esModule",{value:!0}),on.ExternalApplicationModule=void 0;const dn=d,hn=sn;class ln extends dn.Base{wrap(e){return this.wire.sendAction("external-application-wrap").catch((e=>{})),Promise.resolve(new hn.ExternalApplication(this.wire,{uuid:e}))}wrapSync(e){return this.wire.sendAction("external-application-wrap-sync").catch((e=>{})),new hn.ExternalApplication(this.wire,{uuid:e})}}on.ExternalApplicationModule=ln,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(on,e),n(sn,e)}(rn);var un={},pn={},wn={};Object.defineProperty(wn,"__esModule",{value:!0}),wn._Frame=void 0;const yn=d;class fn extends yn.EmitterBase{constructor(e,t){super(e,"frame",t.uuid,t.name),this.identity=t}getInfo(){return this.wire.sendAction("get-frame-info",this.identity).then((({payload:e})=>e.data))}getParentWindow(){return this.wire.sendAction("get-parent-window",this.identity).then((({payload:e})=>e.data))}}wn._Frame=fn,Object.defineProperty(pn,"__esModule",{value:!0}),pn._FrameModule=void 0;const gn=d,mn=O,vn=wn;class Cn extends gn.Base{async wrap(e){this.wire.sendAction("frame-wrap").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}wrapSync(e){this.wire.sendAction("frame-wrap-sync").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}getCurrent(){return this.wire.sendAction("frame-get-current").catch((e=>{})),Promise.resolve(new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity()))}getCurrentSync(){return this.wire.sendAction("frame-get-current-sync").catch((e=>{})),new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity())}}pn._FrameModule=Cn,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(pn,e),n(wn,e)}(un);var bn={};Object.defineProperty(bn,"__esModule",{value:!0}),bn.GlobalHotkey=void 0;const In=d;class En extends In.EmitterBase{constructor(e){super(e,"global-hotkey")}async register(e,t){await this.on(e,t),await this.wire.sendAction("global-hotkey-register",{hotkey:e})}async unregister(e){await this.removeAllListeners(e),await this.wire.sendAction("global-hotkey-unregister",{hotkey:e})}async unregisterAll(){await Promise.all(this.eventNames().filter((e=>!("registered"===e||"unregistered"===e))).map((e=>this.removeAllListeners(e)))),await this.wire.sendAction("global-hotkey-unregister-all",{})}async isRegistered(e){const{payload:{data:t}}=await this.wire.sendAction("global-hotkey-is-registered",{hotkey:e});return t}}bn.GlobalHotkey=En;var xn,An={},Pn={},Mn={},_n=s&&s.__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)};Object.defineProperty(Mn,"__esModule",{value:!0}),Mn.Platform=void 0;const On=d,Sn=O,Rn=new Map;class Fn extends On.EmitterBase{constructor(e,t){super(t.wire,"application",e.uuid),this.getClient=e=>{this.wire.sendAction("platform-get-client",this.identity).catch((e=>{}));const t=e||this.identity,{uuid:n}=t;if(!Rn.has(n)){const e=_n(this,xn,"f").call(this,n);Rn.set(n,e)}return Rn.get(n)},xn.set(this,(async e=>{try{const t=`custom-frame-${e}`,n=await this._channel.connect(t,{wait:!1});return n.onDisconnection((()=>{Rn.delete(e)})),n}catch(t){throw Rn.delete(e),new Error("The targeted Platform is not currently running. Listen for application-started event for the given Uuid.")}})),this.launchLegacyManifest=this.launchContentManifest;const n=(0,Sn.validateIdentity)(e);if(n)throw new Error(n);this._channel=t,this.identity={uuid:e.uuid},this.Layout=this.fin.Platform.Layout,this.Application=this.fin.Application.wrapSync(this.identity)}async createView(e,t,n){this.wire.sendAction("platform-create-view",this.identity).catch((e=>{}));const i=await this.getClient(),r=await i.dispatch("create-view",{target:t,opts:e,targetView:n});if(!r||(0,Sn.validateIdentity)(r.identity))throw new Error(`When overwriting the createView call, please return an object that has a valid 'identity' property: ${JSON.stringify(r)}`);return this.fin.View.wrapSync(r.identity)}async createWindow(e){this.wire.sendAction("platform-create-window",this.identity).catch((e=>{}));const t=await this.getClient();e.reason||(e.reason="api-call");const n=await t.dispatch("create-view-container",e);if(!n||(0,Sn.validateIdentity)(n.identity))throw new Error(`When overwriting the createWindow call, please return an object that has a valid 'identity' property: ${JSON.stringify(n)}`);const{identity:i}=n,r=this.fin.Window.wrapSync(i);return r.name=i.name,r.uuid=i.uuid,r}async quit(){this.wire.sendAction("platform-quit",this.identity).catch((e=>{}));return(await this.getClient()).dispatch("quit")}async closeView(e){this.wire.sendAction("platform-close-view",this.identity).catch((e=>{}));const t=await this.getClient();await t.dispatch("close-view",{view:e})}async reparentView(e,t){console.warn("Platform.reparentView has been deprecated, please use Platform.createView"),this.wire.sendAction("platform-reparent-view",this.identity).catch((e=>{}));const n={...e,uuid:e.uuid??this.identity.uuid},i=await this.fin.View.wrap(n),r=await i.getOptions();return this.createView(r,t)}async getSnapshot(){this.wire.sendAction("platform-get-snapshot",this.identity).catch((e=>{}));return(await this.getClient()).dispatch("get-snapshot")}async getViewSnapshot(e){return(await this.getClient()).dispatch("get-view-snapshot",{viewIdentity:e})}async applySnapshot(e,t){this.wire.sendAction("platform-apply-snapshot",this.identity).catch((e=>{}));const n="Requested snapshot must be a valid Snapshot object, or a url or filepath to such an object.";let i;if("string"==typeof e)try{i=(await this._channel.wire.sendAction("get-application-manifest",{manifestUrl:e})).payload.data}catch(e){throw new Error(`${n}: ${e}`)}else i=e;if(!i.windows)throw new Error(n);const r=await this.getClient();return await r.dispatch("apply-snapshot",{snapshot:i,options:t}),this}async fetchManifest(e){return(await this.getClient()).dispatch("platform-fetch-manifest",{manifestUrl:e})}async launchContentManifest(e){this.wire.sendAction("platform-launch-content-manifest",this.identity).catch((()=>{}));const t=await this.getClient(),n=await this.fetchManifest(e);return t.dispatch("launch-into-platform",{manifest:n,manifestUrl:e}),this}async setWindowContext(e={},t){if(this.wire.sendAction("platform-set-window-context",this.identity).catch((e=>{})),!e)throw new Error("Please provide a serializable object or string to set the context.");const n=await this.getClient(),{entityType:i}=t?await this.fin.System.getEntityInfo(t.uuid,t.name):this.fin.me;await n.dispatch("set-window-context",{context:e,entityType:i,target:t||{uuid:this.fin.me.uuid,name:this.fin.me.name}})}async getWindowContext(e){this.wire.sendAction("platform-get-window-context",this.identity).catch((e=>{}));const t=await this.getClient(),{entityType:n}=e?await this.fin.System.getEntityInfo(e.uuid,e.name):this.fin.me;return t.dispatch("get-window-context",{target:e||{uuid:this.fin.me.uuid,name:this.fin.me.name},entityType:n})}async closeWindow(e,t={skipBeforeUnload:!1}){this.wire.sendAction("platform-close-window",this.identity).catch((e=>{}));return(await this.getClient()).dispatch("close-window",{windowId:e,options:t})}}Mn.Platform=Fn,xn=new WeakMap;var jn={},kn={},Ln={},Tn={};function $n(e){switch(e){case"columns":case"grid":case"rows":case"tabs":return!0;default:return!1}}Object.defineProperty(Tn,"__esModule",{value:!0}),Tn.overrideFromComposables=Tn.isValidPresetType=void 0,Tn.isValidPresetType=$n,Tn.overrideFromComposables=function(...e){return t=>e.reduceRight(((e,t)=>n=>t(e(n))),(e=>e))(t)},Tn.default={isValidPresetType:$n};var Bn={},Gn={},Wn={};Object.defineProperty(Wn,"__esModule",{value:!0}),Wn.ApiConsumer=void 0;Wn.ApiConsumer=class{constructor(e){this.strategy=e,this.consume=async e=>(await this.strategy.getExposedFunctions(e)).reduce(((t,n)=>({...t,[n.key]:this.strategy.createFunction(n,e)})),{})}};var Hn={},Nn={};Object.defineProperty(Nn,"__esModule",{value:!0}),Nn.expose=Nn.getExposedProperties=void 0;const Dn=Symbol("exposedProperties");Nn.getExposedProperties=e=>e[Dn]||e.prototype[Dn]||[];Nn.expose=e=>(t,n,i)=>{t[Dn]=t[Dn]||[],t[Dn].push({key:n,descriptor:i,options:e})},Object.defineProperty(Hn,"__esModule",{value:!0}),Hn.ApiExposer=void 0;const Un=Nn;Hn.ApiExposer=class{constructor(e){this.strategy=e,this.exposeInstance=async(e,t)=>{const n=(0,Un.getExposedProperties)(e),i=await Promise.all(n.map((async({key:n,options:i})=>({key:n,options:await this.strategy.exposeFunction(e[n].bind(e),{key:n,options:i,meta:t})}))));await this.strategy.exposeMeta(t,i)}}};var Vn={},zn={},Kn={};Object.defineProperty(Kn,"__esModule",{value:!0}),Kn.ChannelsConsumer=void 0;Kn.ChannelsConsumer=class{constructor(e){this.channel=e,this.getExposedFunctions=async e=>{const{id:t}=e,{props:n}=await this.channel.dispatch(`api-meta:${t}`);return n},this.createFunction=e=>(...t)=>{const{action:n}=e.options;return this.channel.dispatch(n,{args:t})}}};var qn={};Object.defineProperty(qn,"__esModule",{value:!0}),qn.ChannelsExposer=void 0;qn.ChannelsExposer=class{constructor(e){this.channelProviderOrClient=e,this.exposeFunction=async(e,t)=>{const{key:n,options:i,meta:r}=t,{id:o}=r,s=`${o}.${i?.action||n}`;return await this.channelProviderOrClient.register(s,(async({args:t})=>e(...t))),{action:s}},this.exposeMeta=async({id:e},t)=>{const n=`api-meta:${e}`;await this.channelProviderOrClient.register(n,(()=>({props:t})))}}},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Kn,e),n(qn,e)}(zn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(zn,e)}(Vn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Wn,e),n(Hn,e),n(Vn,e),n(Nn,e)}(Gn);var Jn={};Object.defineProperty(Jn,"__esModule",{value:!0}),Jn.createRelayedDispatch=exports.relayChannelClientApi_1=Jn.relayChannelClientApi=void 0;const Yn=["no longer connected","RTCDataChannel closed unexpectedly","The client you are trying to dispatch from is disconnected from the target provider"];exports.relayChannelClientApi_1=Jn.relayChannelClientApi=async(e,t)=>{e.register(`relay:${t}`,(({action:t,target:n,payload:i})=>e.dispatch(n,t,i))),await Promise.resolve()};Jn.createRelayedDispatch=(e,t,n,i)=>async(r,o)=>{try{return await e.dispatch(`relay:${n}`,{action:r,payload:o,target:t})}catch(e){if(s=e.message,Yn.some((e=>s.includes(e)))&&i)throw new Error(i);throw e}var s};var Zn,Qn,Xn,ei=s&&s.__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},ti=s&&s.__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)};Object.defineProperty(Bn,"__esModule",{value:!0}),Bn.ColumnOrRow=Bn.TabStack=Bn.LayoutNode=void 0;const ni=Gn,ii=Jn;class ri{constructor(e,t){Zn.set(this,void 0),this.isRoot=()=>ti(this,Zn,"f").isRoot(this.entityId),this.exists=()=>ti(this,Zn,"f").exists(this.entityId),this.getParent=async()=>{const e=await ti(this,Zn,"f").getParent(this.entityId);if(e)return ri.getEntity(e,ti(this,Zn,"f"))},this.createAdjacentStack=async(e,t)=>{const n=await ti(this,Zn,"f").createAdjacentStack(this.entityId,e,t);return ri.getEntity({entityId:n,type:"stack"},ti(this,Zn,"f"))},this.getAdjacentStacks=async e=>(await ti(this,Zn,"f").getAdjacentStacks({targetId:this.entityId,edge:e})).map((e=>ri.getEntity({type:"stack",entityId:e.entityId},ti(this,Zn,"f")))),ei(this,Zn,e,"f"),this.entityId=t}}Bn.LayoutNode=ri,Zn=new WeakMap,ri.newLayoutEntitiesClient=async(e,t,n)=>{const i=(0,ii.createRelayedDispatch)(e,n,"layout-relay","You are trying to interact with a layout component on a window that does not exist or has been destroyed.");return new ni.ApiConsumer(new ni.ChannelsConsumer({dispatch:i})).consume({id:t})},ri.getEntity=(e,t)=>{const{entityId:n,type:i}=e;switch(i){case"column":case"row":return new si(t,n,i);case"stack":return new oi(t,n);default:throw new Error(`Unrecognised Layout Entity encountered ('${JSON.stringify(e)})`)}};class oi extends ri{constructor(e,t){super(e,t),Qn.set(this,void 0),this.type="stack",this.getViews=()=>ti(this,Qn,"f").getStackViews(this.entityId),this.addView=async(e,t={index:0})=>ti(this,Qn,"f").addViewToStack(this.entityId,e,t),this.removeView=async e=>{await ti(this,Qn,"f").removeViewFromStack(this.entityId,e)},this.setActiveView=async e=>{await ti(this,Qn,"f").setStackActiveView(this.entityId,e)},ei(this,Qn,e,"f")}}Bn.TabStack=oi,Qn=new WeakMap;class si extends ri{constructor(e,t,n){super(e,t),Xn.set(this,void 0),this.getContent=async()=>(await ti(this,Xn,"f").getContent(this.entityId)).map((e=>ri.getEntity(e,ti(this,Xn,"f")))),ei(this,Xn,e,"f"),this.type=n}}Bn.ColumnOrRow=si,Xn=new WeakMap;var ai={};Object.defineProperty(ai,"__esModule",{value:!0}),ai.DEFAULT_LAYOUT_KEY=ai.LAYOUT_CONTROLLER_ID=void 0,ai.LAYOUT_CONTROLLER_ID="layout-entities",ai.DEFAULT_LAYOUT_KEY="__default__";var ci,di,hi,li=s&&s.__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)};Object.defineProperty(Ln,"__esModule",{value:!0}),Ln.Layout=void 0;const ui=G,pi=O,wi=d,yi=Tn,fi=Bn,gi=ai;class mi extends wi.Base{static getClient(e){return li(e,di,"f").getValue()}constructor(e,t){super(t),ci.add(this),di.set(this,new ui.Lazy((async()=>fi.LayoutNode.newLayoutEntitiesClient(await this.platform.getClient(),gi.LAYOUT_CONTROLLER_ID,this.identity)))),this.replace=async e=>{this.wire.sendAction("layout-replace").catch((e=>{}));const t=await this.platform.getClient();await t.dispatch("replace-layout",{target:this.identity,opts:{layout:e}})},this.replaceView=async(e,t)=>{this.wire.sendAction("layout-replace-view").catch((e=>{}));const n=await this.platform.getClient();await n.dispatch("replace-view",{target:this.identity,opts:{viewToReplace:e,newView:t}})},this.applyPreset=async e=>{this.wire.sendAction("layout-apply-preset").catch((e=>{}));const t=await this.platform.getClient(),{presetType:n}=e;if(!n||!(0,yi.isValidPresetType)(n))throw new Error("Cannot apply preset layout, please include an applicable presetType property in the PresetLayoutOptions.");await t.dispatch("apply-preset-layout",{target:this.identity,opts:{presetType:n}})};const n=(0,pi.validateIdentity)(e);if(n)throw new Error(n);this.identity=e,this.platform=this.fin.Platform.wrapSync({uuid:e.uuid}),e.uuid===this.fin.me.uuid&&e.name===this.fin.me.name&&(this.init=this.fin.Platform.Layout.init)}async getConfig(){this.wire.sendAction("layout-get-config").catch((e=>{}));return(await this.platform.getClient()).dispatch("get-frame-snapshot",{target:this.identity})}async getCurrentViews(){this.wire.sendAction("layout-get-views").catch((e=>{}));const e=await this.platform.getClient();return(await e.dispatch("get-layout-views",{target:this.identity})).map((e=>this.fin.View.wrapSync(e)))}async getRootItem(){this.wire.sendAction("layout-get-root-item").catch((()=>{}));const e=await li(this,di,"f").getValue(),t=await e.getRoot("layoutName"in this.identity?this.identity:void 0);return fi.LayoutNode.getEntity(t,e)}async getStackByViewIdentity(e){this.wire.sendAction("layout-get-stack-by-view").catch((()=>{}));const t=await li(this,di,"f").getValue(),n=await t.getStackByView(e);if(!n)throw new Error(`No stack found for view: ${e.uuid}/${e.name}`);return fi.LayoutNode.getEntity(n,t)}async addView(e,{location:t,targetView:n}={}){this.wire.sendAction("layout-add-view").catch((e=>{}));const{identity:i}=await li(this,ci,"m",hi).call(this,"layout-add-view",{viewOptions:e,location:t,targetView:n});return{identity:i}}async closeView(e){this.wire.sendAction("layout-close-view").catch((e=>{})),await li(this,ci,"m",hi).call(this,"layout-close-view",{viewIdentity:e})}}Ln.Layout=mi,di=new WeakMap,ci=new WeakSet,hi=async function(e,t){return(await this.platform.getClient()).dispatch(e,{target:this.identity,opts:t})};var vi,Ci,bi,Ii,Ei,xi=s&&s.__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)},Ai=s&&s.__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};Object.defineProperty(kn,"__esModule",{value:!0}),kn.LayoutModule=void 0;const Pi=d,Mi=Ln,_i=ai;class Oi extends Pi.Base{constructor(){super(...arguments),vi.add(this),Ci.set(this,!1),bi.set(this,null),this.init=async(e={})=>{if(this.wire.sendAction("layout-init").catch((e=>{})),!this.wire.environment.layoutAllowedInContext(this.fin))throw new Error("Layout.init can only be called from a Window context.");if(xi(this,Ci,"f"))throw new Error("Layout.init was already called, please use Layout.create to add additional layouts.");"openfin"===this.wire.environment.type&&await this.fin.Platform.getCurrentSync().getClient(),Ai(this,Ci,!0,"f"),Ai(this,bi,await this.wire.environment.initLayoutManager(this.fin,this.wire,e),"f"),await this.wire.environment.applyLayoutSnapshot(this.fin,xi(this,bi,"f"),e);const t={name:this.fin.me.name,uuid:this.fin.me.uuid};if(!e.layoutManagerOverride){const e={layoutName:_i.DEFAULT_LAYOUT_KEY,...t};return xi(this,Ii,"f").call(this,e)}return this.wrapSync(t)},Ii.set(this,(e=>{const t="[Layout] You are using a deprecated property `layoutManager` - it will throw if you access it starting in v37.",n=new Proxy({},{get(e,n){throw console.warn(`[Layout-mgr-proxy] accessing ${n.toString()}`),new Error(t)}}),i=Object.assign(this.wrapSync(e),{layoutManager:n});return new Proxy(i,{get(e,n){if("layoutManager"===n)throw console.warn(`[Layout-proxy] accessing ${n.toString()}`),new Error(t);return e[n]}})})),this.getCurrentLayoutManagerSync=()=>xi(this,vi,"m",Ei).call(this,"fin.Platform.Layout.getCurrentLayoutManagerSync()"),this.create=async e=>this.wire.environment.createLayout(xi(this,vi,"m",Ei).call(this,"fin.Platform.Layout.create()"),e),this.destroy=async e=>this.wire.environment.destroyLayout(xi(this,vi,"m",Ei).call(this,"fin.Platform.Layout.destroy()"),e)}async wrap(e){return this.wire.sendAction("layout-wrap").catch((e=>{})),new Mi.Layout(e,this.wire)}wrapSync(e){return this.wire.sendAction("layout-wrap-sync").catch((e=>{})),new Mi.Layout(e,this.wire)}async getCurrent(){if(this.wire.sendAction("layout-get-current").catch((e=>{})),"openfin"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error("You are not in a Window context. Only Windows can have a Layout.");const{uuid:e,name:t}=this.fin.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction("layout-get-current-sync").catch((e=>{})),"openfin"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error("You are not in a Window context. Only Windows can have a Layout.");const{uuid:e,name:t}=this.fin.me;return this.wrapSync({uuid:e,name:t})}async getLayoutByViewIdentity(e){this.wire.sendAction("layout-get-by-view-identity").catch((()=>{}));let t=await this.wire.environment.getViewWindowIdentity(this.fin,e);t.identity&&(t=t.identity);try{const n=this.wrapSync(t),i=await Mi.Layout.getClient(n),r=await i.getLayoutIdentityForViewOrThrow(e);return this.wrapSync(r)}catch(n){if(!["No action registered at target for","getLayoutIdentityForViewOrThrow is not a function"].some((e=>n.message.includes(e))))throw n;if(t.uuid===t.name)throw new Error(`View identity ${JSON.stringify(e)} is not attached to any layout in provider window ${JSON.stringify(t)}.`);return this.wrapSync(t)}}}kn.LayoutModule=Oi,Ci=new WeakMap,bi=new WeakMap,Ii=new WeakMap,vi=new WeakSet,Ei=function(e){if(!xi(this,bi,"f"))throw new Error(`You must call init before using the API ${e}`);return xi(this,bi,"f")},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(kn,e),n(Ln,e)}(jn),Object.defineProperty(Pn,"__esModule",{value:!0}),Pn.PlatformModule=void 0;const Si=d,Ri=Mn,Fi=jn;class ji extends Si.Base{constructor(e,t){super(e),this._channel=t,this.Layout=new Fi.LayoutModule(this.wire)}async init(e){if(!fin.__internal_.isPlatform||fin.me.name!==fin.me.uuid)throw new Error("fin.Platform.init should only be called from a custom platform provider running in the main window of the application.");return this.wire.environment.initPlatform(this.fin,e)}async wrap(e){return this.wire.sendAction("platform-wrap").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}wrapSync(e){return this.wire.sendAction("platform-wrap-sync").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}async getCurrent(){return this.wire.sendAction("platform-get-current").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction("platform-get-current-sync").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}start(e){return this.wire.sendAction("platform-start").catch((e=>{})),new Promise((async(t,n)=>{try{const{uuid:n}=e,i=await this.fin.Application._create({...e,isPlatformController:!0});i.once("platform-api-ready",(()=>t(this.wrapSync({uuid:n})))),i._run({uuid:n})}catch(e){n(e)}}))}startFromManifest(e,t){return this.wire.sendAction("platform-start-from-manifest").catch((e=>{})),new Promise((async(n,i)=>{try{const i=await this.fin.Application._createFromManifest(e);i.once("platform-api-ready",(()=>n(this.wrapSync({uuid:i.identity.uuid})))),i._run(t)}catch(e){i(e)}}))}}Pn.PlatformModule=ji,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Pn,e),n(Mn,e)}(An);var ki={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getMe=e.getBaseMe=e.environmentUnsupportedMessage=void 0;const t=J(),n=un,i=ie(),r=rn;function o(e,t,n){return{...{isView:"view"===e,isWindow:"window"===e,isFrame:"iframe"===e,isExternal:"external connection"===e},uuid:t,name:n,entityType:e}}e.environmentUnsupportedMessage="You are not running in OpenFin.",e.getBaseMe=o,e.getMe=function(s){const{uuid:a,name:c,entityType:d}=s.me,h={setContext(){throw new Error(e.environmentUnsupportedMessage)},addContextHandler(){throw new Error(e.environmentUnsupportedMessage)},getContextGroups(){throw new Error(e.environmentUnsupportedMessage)},joinContextGroup(){throw new Error(e.environmentUnsupportedMessage)},removeFromContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getAllClientsInContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getInfoForContextGroup(){throw new Error(e.environmentUnsupportedMessage)}},l="Interop API has not been instantiated. Either connection has failed or you have not declared interop in your config.",u={setContext(){throw new Error(l)},addContextHandler(){throw new Error(l)},getContextGroups(){throw new Error(l)},joinContextGroup(){throw new Error(l)},removeFromContextGroup(){throw new Error(l)},getAllClientsInContextGroup(){throw new Error(l)},getInfoForContextGroup(){throw new Error(l)}},p={eventNames:()=>{throw new Error(e.environmentUnsupportedMessage)},emit:()=>{throw new Error(e.environmentUnsupportedMessage)},listeners:()=>{throw new Error(e.environmentUnsupportedMessage)},listenerCount:()=>{throw new Error(e.environmentUnsupportedMessage)},on:()=>{throw new Error(e.environmentUnsupportedMessage)},addListener:()=>{throw new Error(e.environmentUnsupportedMessage)},once:()=>{throw new Error(e.environmentUnsupportedMessage)},prependListener:()=>{throw new Error(e.environmentUnsupportedMessage)},prependOnceListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeAllListeners:()=>{throw new Error(e.environmentUnsupportedMessage)}};switch(d){case"view":return Object.assign(new t.View(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case"window":return Object.assign(new i._Window(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case"iframe":return Object.assign(new n._Frame(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case"external connection":return Object.assign(new r.ExternalApplication(s,{uuid:a}),o(d,a,c),{interop:u,isOpenFin:!1});default:return{...o(d,a,c),...p,interop:h,isOpenFin:!1}}}}(ki);var Li={},Ti={},$i={};Object.defineProperty($i,"__esModule",{value:!0}),$i.createWarningObject=$i.createUnusableObject=void 0,$i.createUnusableObject=function(e){const t=()=>{throw new Error(e)};return new Proxy({},{apply:t,construct:t,defineProperty:t,deleteProperty:t,get:t,getOwnPropertyDescriptor:t,getPrototypeOf:t,has:t,isExtensible:t,ownKeys:t,preventExtensions:t,set:t,setPrototypeOf:t})},$i.createWarningObject=function(e,t){return new Proxy(t,{get:(...t)=>(console.warn(e),Reflect.get(...t)),set:(...t)=>(console.warn(e),Reflect.set(...t)),getOwnPropertyDescriptor:(...t)=>(console.warn(e),Reflect.getOwnPropertyDescriptor(...t)),ownKeys:(...t)=>(console.warn(e),Reflect.ownKeys(...t))})};var Bi,Gi={},Wi={};var Hi={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.wrapIntentHandler=e.BROKER_ERRORS=e.generateOverrideWarning=e.generateOverrideError=e.wrapContextHandler=e.wrapInTryCatch=e.generateId=void 0;e.generateId=()=>`${Math.random()}${Date.now()}`;e.wrapInTryCatch=(e,t)=>(...n)=>{try{return e(...n)}catch(e){throw new Error((t||"")+e)}};e.wrapContextHandler=(e,t)=>async n=>{try{await e(n)}catch(e){throw console.error(`Error thrown by handler ${t} for context type ${n.type}: ${e}`),e}};e.generateOverrideError=(e,t)=>`You have tried to to use ${e} but ${t} has not been overridden in the Interop Broker. Please override this function. Refer to our documentation for more info.`;e.generateOverrideWarning=(e,t,n,i)=>{const{uuid:r,name:o}=n;return i?`Entity with identity: ${r}/${o} has called ${i} or ${e} but ${t} has not been overridden.`:`Entity with identity: ${r}/${o} has called ${e} but ${t} has not been overridden.`},e.BROKER_ERRORS={fireIntent:(0,e.generateOverrideError)("fireIntent","handleFiredIntent"),fireIntentForContext:(0,e.generateOverrideError)("fireIntentForContext","handleFiredIntentForContext"),getInfoForIntent:(0,e.generateOverrideError)("getInfoForIntent","handleInfoForIntent"),getInfoForIntentsByContext:(0,e.generateOverrideError)("getInfoForIntentsByContext","handleInfoForIntentsByContext"),joinSessionContextGroupWithJoinContextGroup:"The Context Group you have tried to join is a Session Context Group. Custom Context Groups can only be defined by the Interop Broker through code or manifest configuration. Please use joinSessionContextGroup.",fdc3Open:(0,e.generateOverrideError)("fdc3.open","fdc3HandleOpen"),fdc3FindInstances:(0,e.generateOverrideError)("fdc3.findInstances","fdc3HandleFindInstances"),fdc3GetAppMetadata:(0,e.generateOverrideError)("fdc3.getAppMetadata","fdc3HandleGetAppMetadata"),fdc3GetInfo:(0,e.generateOverrideError)("fdc3.getInfo","fdc3HandleGetInfo")};e.wrapIntentHandler=(e,t)=>async n=>{try{return e(n)}catch(e){throw console.error(`Error thrown by handler ${t}: ${e}`),e}}}(Hi);var Ni,Di,Ui={};function Vi(){if(Di)return Gi;Di=1;var e,t,n,r=s&&s.__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},o=s&&s.__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)},a=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Gi,"__esModule",{value:!0}),Gi.InteropBroker=void 0;const c=d,h=a(function(){if(Bi)return Wi;Bi=1,Object.defineProperty(Wi,"__esModule",{value:!0});const e=Cr();return Wi.default=class{constructor(e,t){this.provider=e,this.id=t,this.lastContext=void 0,this.contextGroupMap=new Map,this.clients=new Map,this.registerListeners()}registerListeners(){this.provider.register(`sessionContextGroup:getContext-${this.id}`,this.getCurrentContext.bind(this)),this.provider.register(`sessionContextGroup:setContext-${this.id}`,this.setContext.bind(this)),this.provider.register(`sessionContextGroup:handlerAdded-${this.id}`,this.handlerAdded.bind(this)),this.provider.register(`sessionContextGroup:handlerRemoved-${this.id}`,this.handlerRemoved.bind(this))}getCurrentContext(e){return e.type?this.contextGroupMap.get(e.type):this.lastContext}setContext(t,n){const{context:i}=t,r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name} not in Session Client State Map`);this.contextGroupMap.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{e.contextHandlers.get(i.type)?.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getClientState(e){return this.clients.get(e.endpointId)}async handlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(i){const e=r.contextHandlers.get(i)||[];r.contextHandlers.set(i,[...e,n]);const o=this.contextGroupMap.get(i);o&&await this.provider.dispatch(t,n,o)}else{r.globalHandler=n;const e=[...this.contextGroupMap.keys()].map((async e=>{const i=this.contextGroupMap.get(e);i&&await this.provider.dispatch(t,n,i)}));await Promise.all(e)}}handlerRemoved(e,t){const{handlerId:n}=e,i=this.clients.get(t.endpointId);i?(Array.from(i.contextHandlers).forEach((([,e])=>{const t=e.indexOf(n);t>-1&&e.splice(t,1)})),i.globalHandler===n&&(i.globalHandler=void 0)):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={contextHandlers:new Map,clientIdentity:e,globalHandler:void 0};this.clients.set(e.endpointId,t)}}onDisconnection(e){this.clients.delete(e.endpointId)}},Wi}()),l=Hi,u=a(i),p=function(){if(Ni)return Ui;Ni=1,Object.defineProperty(Ui,"__esModule",{value:!0}),Ui.PrivateChannelProvider=void 0;const e=Vi();return Ui.PrivateChannelProvider=class t{constructor(e,t){this.provider=e,this.id=t,this.clients=new Map,this.registerListeners(),this.contextByContextType=new Map,this.lastContext=void 0,this.provider.onConnection((e=>this.registerNewClient(e))),this.provider.onDisconnection((async e=>{const{endpointId:t}=e;this.clients.has(t)&&await this.handleClientDisconnecting(e),0===(await this.provider.getAllClientInfo()).length&&this.provider.destroy()}))}getClientState(e){return this.clients.get(e.endpointId)}registerListeners(){this.provider.register("broadcast",this.broadcast.bind(this)),this.provider.register("getCurrentContext",this.getCurrentContext.bind(this)),this.provider.register("contextHandlerAdded",this.contextHandlerAdded.bind(this)),this.provider.register("contextHandlerRemoved",this.contextHandlerRemoved.bind(this)),this.provider.register("nonStandardHandlerRemoved",this.nonStandardHandlerRemoved.bind(this)),this.provider.register("onAddContextHandlerAdded",this.onAddContextHandlerAdded.bind(this)),this.provider.register("onDisconnectHandlerAdded",this.onDisconnectHandlerAdded.bind(this)),this.provider.register("onUnsubscribeHandlerAdded",this.onUnsubscribeHandlerAdded.bind(this)),this.provider.register("clientDisconnecting",((e,t)=>{this.handleClientDisconnecting(t)}))}broadcast(t,n){const{context:i}=t;if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name}, tried to call broadcast, is not connected to this Private Channel`);const r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to broadcast - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);this.contextByContextType.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{const t=e.handlerIdsByContextTypes.get(i.type);t&&t.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getCurrentContext(e,t){const{contextType:n}=e;if(!this.getClientState(t))throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call getCurrentContext, is not connected to this Private Channel`);if(void 0!==n){return this.contextByContextType.get(n)||null}return this.lastContext?this.lastContext:null}contextHandlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call addContextListener, is not connected to this Private Channel`);if(i){const e=r.handlerIdsByContextTypes.get(i)||[];r.handlerIdsByContextTypes.set(i,[...e,n])}else r.globalHandler=n;Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&e.onAddContextListenerHandlerId&&this.provider.dispatch(e.clientIdentity,e.onAddContextListenerHandlerId,i)}))}async contextHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);if(i){let e;if(i.globalHandler===n)i.globalHandler=void 0;else for(const[t,r]of i.handlerIdsByContextTypes){const i=r.indexOf(n);i>-1&&(r.splice(i,1),e=t)}const r=(await this.getConnectedClients()).map((async n=>{const{clientIdentity:i,clientIdentity:{endpointId:r},onUnsubscribeHandlerId:o}=n;r!==t.endpointId&&o&&await this.provider.dispatch(i,o,e)}));try{await Promise.all(r)}catch(e){throw console.error(`Problem when attempting to dispatch to onUnsubscribeHandlers. Error: ${e} Removing Client: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}`),new Error(e)}}else console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}.`)}nonStandardHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);i?i.onDisconnectHandlerId===n?i.onDisconnectHandlerId=void 0:i.onAddContextListenerHandlerId===n?i.onAddContextListenerHandlerId=void 0:i.onUnsubscribeHandlerId===n&&(i.onUnsubscribeHandlerId=void 0):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}onAddContextHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onAddContextListener, is not connected to this Private Channel`);n.onAddContextListenerHandlerId=i,Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&Array.from(e.handlerIdsByContextTypes.keys()).forEach((e=>{this.provider.dispatch(t,i,e)}))}))}onDisconnectHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onDisconnect, is not connected to this Private Channel`);n.onDisconnectHandlerId=i}onUnsubscribeHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onUnsubscribe, is not connected to this Private Channel`);n.onUnsubscribeHandlerId=i}removeClient(e){const t=this.getClientState(e);if(!t)throw new Error(`Client with Identity: ${e.uuid} ${e.name}, tried to call disconnect, is not connected to this Private Channel`);t.handlerIdsByContextTypes.clear(),this.clients.delete(e.endpointId)}async fireOnDisconnectForOtherClients(e){const{endpointId:t}=e,n=(await this.getConnectedClients()).map((async e=>{const{clientIdentity:{endpointId:n},onDisconnectHandlerId:i}=e;n!==t&&i&&await this.provider.dispatch(e.clientIdentity,i)}));try{await Promise.all(n)}catch(t){throw console.error(`Problem when attempting to dispatch to onDisconnectHandlers. Error: ${t} Disconnecting Client: uuid: ${e.uuid}. name: ${e.name}. endpointId: ${e.endpointId}`),new Error(t)}}async unsubscribeAll(e){const{endpointId:t}=e,n=this.clients.get(t);if(n){const t=Array.from(n.handlerIdsByContextTypes.values()).flat(),i=n.globalHandler;if(t.length>0){const n=t.map((async t=>this.contextHandlerRemoved({handlerId:t},e)));try{await Promise.all(n)}catch(e){console.error(e.message)}}if(i)try{await this.contextHandlerRemoved({handlerId:i},e)}catch(e){console.error(e.message)}}}async handleClientDisconnecting(e){await this.unsubscribeAll(e),this.removeClient(e),await this.fireOnDisconnectForOtherClients(e)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={clientIdentity:e,handlerIdsByContextTypes:new Map,globalHandler:void 0,onAddContextListenerHandlerId:void 0,onUnsubscribeHandlerId:void 0,onDisconnectHandlerId:void 0};this.clients.set(e.endpointId,t)}}async getConnectedClients(){const e=await this.provider.getAllClientInfo();return Array.from(this.clients.values()).filter((t=>{const{uuid:n,name:i}=t.clientIdentity;return e.some((e=>i===e.name&&n===e.uuid))}))}static init(e,n){return new t(e,n)}},Ui}(),w=G,y=[{id:"green",displayMetadata:{color:"#00CC88",name:"green"}},{id:"purple",displayMetadata:{color:"#8C61FF",name:"purple"}},{id:"orange",displayMetadata:{color:"#FF8C4C",name:"orange"}},{id:"red",displayMetadata:{color:"#FF5E60",name:"red"}},{id:"pink",displayMetadata:{color:"#FF8FB8",name:"pink"}},{id:"yellow",displayMetadata:{color:"#E9FF8F",name:"yellow"}}];let f=class i extends c.Base{constructor(i,s,a){super(i),e.set(this,void 0),t.set(this,void 0),n.set(this,void 0),this.getProvider=()=>o(this,n,"f").getValue(),this.interopClients=new Map,this.contextGroupsById=new Map,r(this,t,a.contextGroups??[...y],"f"),r(this,e,a.fdc3Info,"f"),a?.logging&&(this.logging=a.logging),this.intentClientMap=new Map,this.lastContextMap=new Map,this.sessionContextGroupMap=new Map,r(this,n,new w.Lazy(s),"f"),this.setContextGroupMap(),this.setupChannelProvider()}static createClosedConstructor(...e){return class extends i{constructor(...t){if(t.length){const[n,i,r]=t;if(r&&"object"==typeof r&&!(0,u.default)(r,e[2]))return console.warn("You have modified the parameters of the InteropOverride constructor. This behavior is deprecated and will be removed in a future version. You can modify these options in your manifest. Please consult our Interop docs for guidance on migrating to the new override scheme."),void super(e[0],e[1],r);console.warn("You are attempting to pass arguments to the InteropOverride constructor. This is not necessary, and these passed arguments will be ignored. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.")}super(...e)}}}setContext({context:e},t){this.wire.sendAction("interop-broker-set-context").catch((e=>{}));const n=this.getClientState(t);if(!n||!n.contextGroupId)throw n?new Error("You must join a context group before you can set context."):new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);{const{contextGroupId:t}=n;this.setContextForGroup({context:e},t)}}setContextForGroup({context:e},t){this.wire.sendAction("interop-broker-set-context-for-group").catch((e=>{}));const n=this.contextGroupsById.get(t);if(!n)throw new Error(`Unable to set context for context group that isn't in the context group mapping: ${t}.`);const r=i.checkContextIntegrity(e);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(e)}`);const o=e.type;n.set(o,e),this.lastContextMap.set(t,o);Array.from(this.interopClients.values()).filter((e=>e.contextGroupId===t)).forEach((t=>{for(const[,n]of t.contextHandlers)i.isContextTypeCompatible(o,n.contextType)&&this.invokeContextHandler(t.clientIdentity,n.handlerId,e)}))}getCurrentContext(e,t){this.wire.sendAction("interop-broker-get-current-context").catch((e=>{}));const n=this.getClientState(t);if(!n?.contextGroupId)throw new Error("You must be a member of a context group to call getCurrentContext");const{contextGroupId:i}=n,r=this.contextGroupsById.get(i),o=this.lastContextMap.get(i),s=e?.contextType??o;return r&&s?r.get(s):void 0}async joinContextGroup({contextGroupId:e,target:t},n){if(this.wire.sendAction("interop-broker-join-context-group").catch((e=>{})),this.sessionContextGroupMap.has(e))throw new Error(l.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup);if(t){i.hasEndpointId(t)&&await this.addClientToContextGroup({contextGroupId:e},t);try{const n=this.channel.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name));if(!n.length)throw new Error(`Given Identity ${t.uuid} ${t.name} is not connected to the Interop Broker.`);n.length>1&&console.warn(`More than one connection found for identity ${t.uuid} ${t.name}`);const i=[];for(const t of n)i.push(this.addClientToContextGroup({contextGroupId:e},t));await Promise.all(i)}catch(e){throw new Error(e)}}else await this.addClientToContextGroup({contextGroupId:e},n)}async addClientToContextGroup({contextGroupId:e},t){this.wire.sendAction("interop-broker-add-client-to-context-group").catch((e=>{}));const n=this.getClientState(t);if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(!this.getContextGroups().find((t=>t.id===e)))throw new Error(`Attempting to join a context group that does not exist: ${e}. You may only join existing context groups.`);if(n.contextGroupId!==e){n.contextGroupId=e,await this.setCurrentContextGroupInClientOptions(t,e);const i=this.contextGroupsById.get(e);for(const[,e]of n.contextHandlers){const{contextType:n,handlerId:r}=e;if(void 0===n)i.forEach(((e,n)=>{this.invokeContextHandler(t,r,e)}));else if(i.has(n)){const e=i.get(n);e&&this.invokeContextHandler(t,r,e)}}}}async removeFromContextGroup({target:e},t){if(this.wire.sendAction("interop-broker-remove-from-context-group").catch((e=>{})),e){i.hasEndpointId(e)&&await this.removeClientFromContextGroup(e);try{const t=this.channel.connections.filter((t=>t.uuid===e.uuid&&t.name===e.name));if(!t.length)throw new Error(`No connection found for given Identity ${e.uuid} ${e.name}`);t.length>1&&console.warn(`More than one connection found for identity ${e.uuid} ${e.name}`);const n=[];for(const e of t)n.push(this.removeClientFromContextGroup(e));await Promise.all(n)}catch(e){throw new Error(e)}}else await this.removeClientFromContextGroup(t)}async removeClientFromContextGroup(e){this.wire.sendAction("interop-broker-remove-client-from-context-group").catch((e=>{}));const t=this.getClientState(e);t&&(t.contextGroupId=void 0),await this.setCurrentContextGroupInClientOptions(e,null)}getContextGroups(){return this.wire.sendAction("interop-broker-get-context-groups").catch((e=>{})),o(this,t,"f").map((e=>({...e})))}getInfoForContextGroup({contextGroupId:e}){return this.wire.sendAction("interop-broker-get-info-for-context-group").catch((e=>{})),this.getContextGroups().find((t=>t.id===e))}getAllClientsInContextGroup({contextGroupId:e}){this.wire.sendAction("interop-broker-get-all-clients-in-context-group").catch((e=>{}));return Array.from(this.interopClients.values()).filter((t=>t.contextGroupId===e)).map((e=>e.clientIdentity))}async handleFiredIntent(e,t){const n=(0,l.generateOverrideWarning)("fdc3.raiseIntent","InteropBroker.handleFiredIntent",t,"interopClient.fireIntent");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntent)}async setIntentTarget(e,t){this.wire.sendAction("interop-broker-set-intent-target").catch((e=>{}));const n=this.intentClientMap.get(t.name),i=`intent-handler-${e.name}`;if(n){const t=n.get(i);if(t){if(t.pendingIntents.push(e),t.clientIdentity&&t.isReady){const{clientIdentity:e,pendingIntents:n}=t;try{const r=n[n.length-1];await this.invokeIntentHandler(e,i,r),t.pendingIntents=[]}catch(n){console.error(`Error invoking intent handler for client ${e.uuid}/${e.name}/${e.endpointId}`),t.isReady=!1}}}else n.set(i,{isReady:!1,pendingIntents:[e]})}else{this.intentClientMap.set(t.name,new Map);const n=this.intentClientMap.get(t.name);n&&n.set(i,{isReady:!1,pendingIntents:[e]})}}async handleInfoForIntent(e,t){const n=(0,l.generateOverrideWarning)("fdc3.findIntent","InteropBroker.handleInfoForIntent",t,"interopClient.getInfoForIntent");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntent)}async handleInfoForIntentsByContext(e,t){const n=(0,l.generateOverrideWarning)("fdc3.findIntentsByContext","InteropBroker.handleInfoForIntentsByContext",t,"interopClient.getInfoForIntentsByContext");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntentsByContext)}async handleFiredIntentForContext(e,t){const n=(0,l.generateOverrideWarning)("fdc3.raiseIntentForContext","InteropBroker.handleFiredIntentForContext",t,"interopClient.fireIntentForContext");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntentForContext)}async clientDisconnected(e){}async fdc3HandleOpen({app:e,context:t},n){const i=(0,l.generateOverrideWarning)("fdc3.open","InteropBroker.fdc3HandleOpen",n);throw console.warn(i),new Error(l.BROKER_ERRORS.fdc3Open)}async fdc3HandleFindInstances(e,t){const n=(0,l.generateOverrideWarning)("fdc3.open","InteropBroker.fdc3HandleFindInstances",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3FindInstances)}async fdc3HandleGetAppMetadata(e,t){const n=(0,l.generateOverrideWarning)("fdc3.getAppMetadata","InteropBroker.fdc3HandleGetAppMetadata",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3GetAppMetadata)}async invokeContextHandler(e,t,n){const i=await this.getProvider();try{await i.dispatch(e,t,n)}catch(i){console.error(`Error invoking context handler ${t} for context type ${n.type} in client ${e.uuid}/${e.name}/${e.endpointId}`,i)}}async invokeIntentHandler(e,t,n){const i=await this.getProvider();await i.dispatch(e,t,n)}async fdc3HandleGetInfo(t,n){const{fdc3Version:i}=t;return{fdc3Version:i,...o(this,e,"f"),optionalFeatures:{OriginatingAppMetadata:!1,UserChannelMembershipAPIs:!0},appMetadata:{appId:"",instanceId:""}}}async getAllClientInfo(){return(await this.getProvider()).getAllClientInfo()}decorateSnapshot(e){return{...e,interopSnapshotDetails:{contextGroupStates:this.getContextGroupStates()}}}applySnapshot(e,t){const n=e?.interopSnapshotDetails?.contextGroupStates;n&&(t?.closeExistingWindows||this.updateExistingClients(n),this.rehydrateContextGroupStates(n))}updateExistingClients(e){this.interopClients.forEach((t=>{const{clientIdentity:n,contextGroupId:r,contextHandlers:o}=t;if(r){const t=e[r];for(const[,e]of Object.entries(t))o.forEach((t=>{const{handlerId:r,contextType:o}=t;i.isContextTypeCompatible(e.type,o)&&this.invokeContextHandler(n,r,e)}))}}))}getContextGroupStates(){return i.toObject(this.contextGroupsById)}rehydrateContextGroupStates(e){const t=Object.entries(e);for(const[e,n]of t){const t=Object.entries(n);for(const[n,i]of t)if(this.contextGroupsById.has(e)){this.contextGroupsById.get(e).set(n,i)}else console.warn(`Attempting to set a context group that isn't in the context group mapping. Skipping context group rehydration for: ${e}`)}}contextHandlerRegistered({contextType:e,handlerId:t},n){const i={contextType:e,handlerId:t},r=this.getClientState(n);if(r?.contextHandlers.set(t,i),r&&r.contextGroupId){const{contextGroupId:i}=r,o=this.contextGroupsById.get(i);if(void 0===e)o.forEach(((e,i)=>{this.invokeContextHandler(n,t,e)}));else if(o.has(e)){const i=o.get(e);i&&this.invokeContextHandler(n,t,i)}}}async intentHandlerRegistered(e,t){const{handlerId:n}=e,i=this.intentClientMap.get(t.name),r=i?.get(n);if(i)if(r){const{pendingIntents:e}=r;r.clientIdentity=t,r.isReady=!0;try{if(e.length>0){const i=e[e.length-1];await this.invokeIntentHandler(t,n,i),r.pendingIntents=[]}}catch(e){console.error(`Error invoking intent handler: ${n} for client ${t.uuid}/${t.name}/${t.endpointId}`)}}else i.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t});else{this.intentClientMap.set(t.name,new Map);const e=this.intentClientMap.get(t.name);e&&e.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t})}}removeContextHandler({handlerId:e},t){const n=this.getClientState(t);n&&n.contextHandlers.delete(e)}handleJoinSessionContextGroup({sessionContextGroupId:e},t){try{if(!e)throw new Error("Failed to join session context group: must specify group id.");const n=this.sessionContextGroupMap.get(e);if(n)n.registerNewClient(t);else{const n=new h.default(this.channel,e);n.registerNewClient(t),this.sessionContextGroupMap.set(e,n)}return{hasConflict:this.contextGroupsById.has(e)}}catch(e){throw new Error(e)}}getClientState(e){return this.interopClients.get(e.endpointId)}static toObject(e){const t=Object.fromEntries(e),n={};return Object.entries(t).forEach((([e,t])=>{const i=Object.fromEntries(t);n[e]=i})),n}static checkContextIntegrity(e){if(!e)return{isValid:!1,reason:"No context supplied"};if("object"!=typeof e)return{isValid:!1,reason:"Context must be an Object"};if(!e.type)return{isValid:!1,reason:"Context must have a type property"};if(e.id&&"object"!=typeof e.id)return{isValid:!1,reason:"Context id must be an Object populated with key-value identifiers (if set)"};if(e.id){const{id:t}=e,n=Object.keys(t);let i=!1;if(!n.length)return{isValid:!1,reason:"Context id must have at least one key-value identifier"};if(n.forEach((e=>{"string"==typeof e&&"string"==typeof t[e]||(i=!0)})),i)return{isValid:!1,reason:"Context id key-value identifiers must be of type string"}}return e.name&&"string"!=typeof e.name?{isValid:!1,reason:"Context name must be of string type (if set)"}:{isValid:!0}}static hasEndpointId(e){return void 0!==e.endpointId}static isContextTypeCompatible(e,t){return void 0===t||e===t}setContextGroupMap(){for(const e of this.getContextGroups())this.contextGroupsById.set(e.id,new Map)}async setCurrentContextGroupInClientOptions(e,t){try{const n=await this.fin.System.getEntityInfo(e.uuid,e.name);let i;"view"===n.entityType?i=await this.fin.View.wrap(e):"window"===n.entityType&&(i=await this.fin.Window.wrap(e)),i&&await i.updateOptions({interop:{currentContextGroup:t}})}catch(e){}}async setupChannelProvider(){try{const e=await this.getProvider();this.channel=e,this.wireChannel(e)}catch(e){throw new Error(`Error setting up Interop Broker Channel Provider: ${e}`)}}wireChannel(e){e.onConnection((async(e,t)=>{if(!await this.isConnectionAuthorized(e,t))throw new Error(`Connection not authorized for ${e.uuid}, ${e.name}`);if(!e.endpointId)throw new Error("Version too old to be compatible with Interop. Please upgrade your runtime to a more recent version.");const n={contextGroupId:void 0,contextHandlers:new Map,clientIdentity:e};t?.currentContextGroup&&this.contextGroupsById.has(t.currentContextGroup)&&(n.contextGroupId=t?.currentContextGroup),this.interopClients.set(e.endpointId,n)})),e.onDisconnection((e=>{this.interopClients.delete(e.endpointId);const t=this.intentClientMap.get(e.name);t&&e.uuid===this.fin.me.uuid&&t.forEach((e=>{e.isReady=!1})),this.sessionContextGroupMap.forEach((t=>{t.onDisconnection(e)})),this.clientDisconnected(e)})),e.beforeAction((async(e,t,n)=>{if(!await this.isActionAuthorized(e,t,n))throw new Error(`Action (${e}) not authorized for ${n.uuid}, ${n.name}`);this.logging?.beforeAction?.enabled&&console.log(e,t,n)})),e.afterAction(((e,t,n)=>{this.logging?.afterAction?.enabled&&console.log(e,t,n)})),e.register("setContext",this.setContext.bind(this)),e.register("fireIntent",this.handleFiredIntent.bind(this)),e.register("getCurrentContext",this.getCurrentContext.bind(this)),e.register("getInfoForIntent",this.handleInfoForIntent.bind(this)),e.register("getInfoForIntentsByContext",this.handleInfoForIntentsByContext.bind(this)),e.register("fireIntentForContext",this.handleFiredIntentForContext.bind(this)),e.register("getContextGroups",this.getContextGroups.bind(this)),e.register("joinContextGroup",this.joinContextGroup.bind(this)),e.register("removeFromContextGroup",this.removeFromContextGroup.bind(this)),e.register("getAllClientsInContextGroup",this.getAllClientsInContextGroup.bind(this)),e.register("getInfoForContextGroup",this.getInfoForContextGroup.bind(this)),e.register("contextHandlerRegistered",this.contextHandlerRegistered.bind(this)),e.register("intentHandlerRegistered",this.intentHandlerRegistered.bind(this)),e.register("removeContextHandler",this.removeContextHandler.bind(this)),e.register("sessionContextGroup:createIfNeeded",this.handleJoinSessionContextGroup.bind(this)),e.register("fdc3Open",this.fdc3HandleOpen.bind(this)),e.register("fdc3v2FindIntentsByContext",this.handleInfoForIntentsByContext.bind(this)),e.register("fdc3FindInstances",this.fdc3HandleFindInstances.bind(this)),e.register("fdc3GetAppMetadata",this.fdc3HandleGetAppMetadata.bind(this)),e.register("fdc3v2GetInfo",(async(e,t)=>this.fdc3HandleGetInfo.bind(this)(e,t))),e.register("createPrivateChannelProvider",(async e=>{const{channelId:t}=e,n=await this.fin.InterApplicationBus.Channel.create(t);p.PrivateChannelProvider.init(n,t)}))}isConnectionAuthorized(e,t){return this.wire.sendAction("interop-broker-is-connection-authorized").catch((e=>{})),Promise.resolve(!0)}isActionAuthorized(e,t,n){return this.wire.sendAction("interop-broker-is-action-authorized").catch((e=>{})),Promise.resolve(!0)}};return Gi.InteropBroker=f,e=new WeakMap,t=new WeakMap,n=new WeakMap,Gi}var zi,Ki={},qi={},Ji=s&&s.__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},Yi=s&&s.__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)};Object.defineProperty(qi,"__esModule",{value:!0});const Zi=d,Qi=Hi;class Xi extends Zi.Base{constructor(e,t,n){super(e),zi.set(this,void 0),this.id=n,Ji(this,zi,t,"f")}async setContext(e){this.wire.sendAction("interop-session-context-group-set-context").catch((e=>{}));return(await Yi(this,zi,"f")).dispatch(`sessionContextGroup:setContext-${this.id}`,{sessionContextGroupId:this.id,context:e})}async getCurrentContext(e){this.wire.sendAction("interop-session-context-group-get-context").catch((e=>{}));return(await Yi(this,zi,"f")).dispatch(`sessionContextGroup:getContext-${this.id}`,{sessionContextGroupId:this.id,type:e})}async addContextHandler(e,t){if(this.wire.sendAction("interop-session-context-group-add-handler").catch((e=>{})),"function"!=typeof e)throw new Error("Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");const n=await Yi(this,zi,"f");let i;return i=t?`sessionContextHandler:invoke-${this.id}-${t}-${(0,Qi.generateId)()}`:`sessionContextHandler:invoke-${this.id}`,n.register(i,(0,Qi.wrapContextHandler)(e,i)),await n.dispatch(`sessionContextGroup:handlerAdded-${this.id}`,{handlerId:i,contextType:t}),{unsubscribe:await this.createUnsubscribeCb(i)}}async createUnsubscribeCb(e){const t=await Yi(this,zi,"f");return async()=>{t.remove(e),await t.dispatch(`sessionContextGroup:handlerRemoved-${this.id}`,{handlerId:e})}}getUserInstance(){return{id:this.id,setContext:(0,Qi.wrapInTryCatch)(this.setContext.bind(this),"Failed to set context: "),getCurrentContext:(0,Qi.wrapInTryCatch)(this.getCurrentContext.bind(this),"Failed to get context: "),addContextHandler:(0,Qi.wrapInTryCatch)(this.addContextHandler.bind(this),"Failed to add context handler: ")}}}qi.default=Xi,zi=new WeakMap;var er={},tr={},nr={},ir={},rr=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),or=s&&s.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),sr=s&&s.__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)&&rr(t,e,n);return or(t,e),t};Object.defineProperty(ir,"__esModule",{value:!0}),ir.PrivateChannelClient=void 0;const ar=sr(Hi);var cr,dr;function hr(){if(cr)return tr;cr=1;var e,t=s&&s.__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)},n=s&&s.__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},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(tr,"__esModule",{value:!0}),tr.FDC3ModuleBase=void 0;const o=nr,a=Hi,c=wr(),d=r(i);return tr.FDC3ModuleBase=class{get client(){return t(this,e,"f").call(this)}get fin(){return this.wire.getFin()}constructor(t,i){this.wire=i,e.set(this,void 0),n(this,e,t,"f")}async broadcast(e){return this.wire.sendAction("fdc3-broadcast").catch((e=>{})),this.client.setContext(e)}async _open(e,t){this.wire.sendAction("fdc3-open").catch((e=>{}));try{return await c.InteropClient.ferryFdc3Call(this.client,"fdc3Open",{app:e,context:t})}catch(e){const t=e.message===a.BROKER_ERRORS.fdc3Open?"ResolverUnavailable":e.message;throw new Error(t)}}async _getChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:"system",...(0,o.getUnsupportedChannelApis)()})))}async getOrCreateChannel(e){this.wire.sendAction("fdc3-get-or-create-channel").catch((e=>{}));const t=(await this._getChannels()).find((t=>t.id===e));if(t)return{...t,type:"system",...(0,o.getUnsupportedChannelApis)()};try{const t=await this.client.joinSessionContextGroup(e);return(0,o.buildAppChannelObject)(t)}catch(e){throw console.error(e.message),new Error(o.ChannelError.CreationFailed)}}async getSystemChannels(){return this.wire.sendAction("fdc3-get-system-channels").catch((e=>{})),this._getChannels()}async joinChannel(e){this.wire.sendAction("fdc3-join-channel").catch((e=>{}));try{return await this.client.joinContextGroup(e)}catch(e){if(e.message===a.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup?console.error("The Channel you have tried to join is an App Channel. Custom Channels can only be defined by the Interop Broker through code or manifest configuration. Please use getOrCreateChannel."):console.error(e.message),e.message.startsWith("Attempting to join a context group that does not exist"))throw new Error(o.ChannelError.NoChannelFound);throw new Error(o.ChannelError.AccessDenied)}}async getCurrentChannel(){this.wire.sendAction("fdc3-get-current-channel").catch((e=>{}));const e=await this.getCurrentContextGroupInfo();return e?this.buildChannelObject(e):null}async leaveCurrentChannel(){return this.wire.sendAction("fdc3-leave-current-channel").catch((e=>{})),this.client.removeFromContextGroup()}async getCurrentContextGroupInfo(){const e=await this.client.getContextGroups(),t=e.map((async e=>this.client.getAllClientsInContextGroup(e.id))),n=(await Promise.all(t)).findIndex((e=>e.some((e=>{const{uuid:t,name:n}=e;return this.wire.me.uuid===t&&this.wire.me.name===n}))));return e[n]}async buildChannelObject(e){return{...e,type:"system",addContextListener:(...[e,t])=>{let n,i;"function"==typeof e?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),n=e):(n=t,"string"==typeof e&&(i=e));const r=(async()=>{let e=!0;const t=await this.client.getCurrentContext(i);return this.client.addContextHandler(((i,r)=>{if(!e||(e=!1,!(0,d.default)(t,i)))return n(i,r)}),i)})();return{...r,unsubscribe:()=>r.then((e=>e.unsubscribe()))}},broadcast:this.broadcast.bind(this),getCurrentContext:async e=>{const t=await this.client.getCurrentContext(e);return void 0===t?null:t}}}},e=new WeakMap,tr}ir.PrivateChannelClient=class{constructor(e,t){this.id=t,this.client=e,this.listeners=new Map}async broadcast(e){return this.client.dispatch("broadcast",{context:e})}async getCurrentContext(e){return this.client.dispatch("getCurrentContext",{contextType:e})}async addContextListener(e,t){if("function"!=typeof t)throw new Error("Non-function argument passed to the second parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");let n;n=e?`contextHandler:invoke-${this.id}-${e}-${ar.generateId()}`:`contextHandler:invoke-${this.id}-${ar.generateId()}`,this.client.register(n,ar.wrapContextHandler(t,n));const i={unsubscribe:await this.createContextUnsubscribeCb(n)};return this.listeners.set(n,i),await this.client.dispatch("contextHandlerAdded",{handlerId:n,contextType:e}),i}createNonStandardUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch("nonStandardHandlerRemoved",{handlerId:e})}}createContextUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch("contextHandlerRemoved",{handlerId:e})}}onAddContextListener(e){const t=`onContextHandlerAdded:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch("onAddContextHandlerAdded",{handlerId:t}),n}onDisconnect(e){const t=`onDisconnect:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch("onDisconnectHandlerAdded",{handlerId:t}),n}onUnsubscribe(e){const t=`onUnsubscribe:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch("onUnsubscribeHandlerAdded",{handlerId:t}),n}async cleanUpAllSubs(){Array.from(this.listeners.keys()).forEach((e=>{this.client.remove(e),this.listeners.delete(e)}))}async disconnect(){try{await this.client.dispatch("clientDisconnecting"),await this.cleanUpAllSubs(),await this.client.disconnect()}catch(e){throw new Error(e.message)}}},function(e){var t=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.getIntentResolution=e.isChannel=e.isContext=e.connectPrivateChannel=e.buildAppChannelObject=e.buildPrivateChannelObject=e.ChannelError=e.ResultError=e.UnsupportedChannelApiError=e.getUnsupportedChannelApis=void 0;const n=Hi,r=ir,o=t(i);e.getUnsupportedChannelApis=e=>({addContextListener:()=>{throw new a("Channel.addContextListener",e)},broadcast:()=>{throw new a("Channel.broadcast",e)},getCurrentContext:()=>{throw new a("Channel.getCurrentContext",e)}});class a extends Error{constructor(e,t="System"){super(e),this.message=`Calling ${e} on an instance of a ${t} Channel returned by fdc3.get${t}Channels is not supported. If you would like to use a ${t} Channel, please use fdc3.joinChannel, fdc3.addContextListener, and fdc3.broadcast instead.`}}var c,d;e.UnsupportedChannelApiError=a,function(e){e.NoResultReturned="NoResultReturned",e.IntentHandlerRejected="IntentHandlerRejected"}(c=e.ResultError||(e.ResultError={})),(d=e.ChannelError||(e.ChannelError={})).NoChannelFound="NoChannelFound",d.AccessDenied="AccessDenied",d.CreationFailed="CreationFailed";e.buildPrivateChannelObject=e=>{let t=!1;const n=()=>{if(t)throw new Error("Private Channel Client has been disconnected from the Private Channel")};return{id:e.id,type:"private",broadcast:async t=>(n(),e.broadcast(t)),getCurrentContext:async t=>(n(),e.getCurrentContext(t)),addContextListener:async(t,i)=>{n();let r=i,o=t;"function"==typeof t&&(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),r=t,o=null);return e.addContextListener(o,r)},onAddContextListener:t=>(n(),e.onAddContextListener(t)),disconnect:async()=>(n(),t=!0,e.disconnect()),onDisconnect:t=>(n(),e.onDisconnect(t)),onUnsubscribe:t=>(n(),e.onUnsubscribe(t))}};e.buildAppChannelObject=e=>({id:e.id,type:"app",broadcast:e.setContext,getCurrentContext:async t=>{const n=await e.getCurrentContext(t);return void 0===n?null:n},addContextListener:(t,n)=>{let i,r;"function"==typeof t?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),i=t):(i=n,"string"==typeof t&&(r=t));const s=(async()=>{let t=!0;const n=await e.getCurrentContext(r);return e.addContextHandler(((e,r)=>{if(!t||(t=!1,!(0,o.default)(n,e)))return i(e,r)}),r)})();return{...s,unsubscribe:()=>s.then((e=>e.unsubscribe()))}}});e.connectPrivateChannel=async t=>{try{const n=await fin.InterApplicationBus.Channel.connect(t),i=new r.PrivateChannelClient(n,t);return(0,e.buildPrivateChannelObject)(i)}catch(e){throw new Error(`Private Channel with id: ${t} doesn't exist`)}};e.isContext=e=>{if(e&&"object"==typeof e&&"type"in e){const{type:t}=e;return"string"==typeof t}return!1};e.isChannel=e=>{if(e&&"object"==typeof e&&"type"in e&&"id"in e){const{type:t,id:n}=e;return"string"==typeof t&&"string"==typeof n&&("app"===t||"private"===t)}return!1};e.getIntentResolution=async(t,i,r,o)=>{const s=(0,n.generateId)(),a=new Promise(((e,t)=>{fin.InterApplicationBus.subscribe({uuid:"*"},s,(t=>{e(t)})).catch((()=>t(new Error("getResult is not supported in this environment"))))})),d=r?{target:r,intentResolutionResultId:s}:{intentResolutionResultId:s},h=o?{name:o,context:i,metadata:d}:{...i,metadata:d},l=async()=>{let n=await a;if(!n||"object"!=typeof n)throw new Error(c.NoResultReturned);const{error:i}=n;if(i)throw new Error(c.IntentHandlerRejected);if((0,e.isChannel)(n)){const{id:i,type:r}=n;switch(r){case"private":n=await(0,e.connectPrivateChannel)(i);break;case"app":{const r=await t.joinSessionContextGroup(i);n=(0,e.buildAppChannelObject)(r);break}}}else if(!(0,e.isContext)(n))throw new Error(c.NoResultReturned);return n},u=o?await t.fireIntent(h):await t.fireIntentForContext(h);return"object"!=typeof u?{source:{appId:"",instanceId:""},intent:"",version:"2.0",getResult:l}:{...u,getResult:l}}}(nr);var lr,ur,pr={};function wr(){if(ur)return Ki;ur=1;var e,t,n=s&&s.__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},i=s&&s.__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)},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ki,"__esModule",{value:!0}),Ki.InteropClient=void 0;const o=d,a=r(qi),c=function(){if(dr)return er;dr=1,Object.defineProperty(er,"__esModule",{value:!0}),er.Fdc3Module=void 0;const e=Hi,t=hr();class n extends t.FDC3ModuleBase{async open(e,t){await super._open(e,t)}addContextListener(e,t){let n;return this.wire.sendAction("fdc3-add-context-listener").catch((e=>{})),"function"==typeof e?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),n=this.client.addContextHandler(e)):n=this.client.addContextHandler(t,null===e?void 0:e),{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}addIntentListener(e,t){this.wire.sendAction("fdc3-add-intent-listener").catch((e=>{}));const n=this.client.registerIntentHandler((e=>{const{context:n,metadata:i}=e,{metadata:r}=n,o=i?.intentResolutionResultId||r?.intentResolutionResultId;o&&this.fin.InterApplicationBus.publish(o,null).catch((()=>null)),t(e.context)}),e,{fdc3Version:"1.2"});return{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}async raiseIntent(t,n,i){this.wire.sendAction("fdc3-raise-intent").catch((e=>{}));const r=i?{name:t,context:n,metadata:{target:i}}:{name:t,context:n};try{return await this.client.fireIntent(r)}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntent?"ResolverUnavailable":t.message;throw new Error(n)}}async findIntent(t,n){this.wire.sendAction("fdc3-find-intent").catch((e=>{}));try{return await this.client.getInfoForIntent({name:t,context:n})}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntent?"ResolverUnavailable":t.message;throw new Error(n)}}async findIntentsByContext(t){this.wire.sendAction("fdc3-find-intents-by-context").catch((e=>{}));try{return await this.client.getInfoForIntentsByContext(t)}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntentsByContext?"ResolverUnavailable":t.message;throw new Error(n)}}async raiseIntentForContext(t,n){this.wire.sendAction("fdc3-raise-intent-for-context").catch((e=>{}));try{return await this.client.fireIntentForContext({...t,metadata:{target:n}})}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntentForContext?"ResolverUnavailable":t.message;throw new Error(n)}}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}getInfo(){return this.wire.sendAction("fdc3-get-info").catch((e=>{})),{providerVersion:this.wire.environment.getAdapterVersionSync(),provider:`openfin-${this.wire.me.uuid}`,fdc3Version:"1.2"}}}return er.Fdc3Module=n,er}(),h=function(){if(lr)return pr;lr=1,Object.defineProperty(pr,"__esModule",{value:!0}),pr.Fdc3Module2=void 0;const e=hr(),t=Hi,n=wr(),i=nr,r=ir;class o extends e.FDC3ModuleBase{async open(e,t){return"string"==typeof e&&console.warn("Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string })."),super._open(e,t)}async findInstances(e){this.wire.sendAction("fdc3-find-instances").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,"fdc3FindInstances",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3FindInstances?"ResolverUnavailable":e.message;throw new Error(n)}}async getAppMetadata(e){this.wire.sendAction("fdc3-get-app-metadata").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,"fdc3GetAppMetadata",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3GetAppMetadata?"ResolverUnavailable":e.message;throw new Error(n)}}async addContextListener(e,t){this.wire.sendAction("fdc3-add-context-listener").catch((e=>{}));const n=e=>t=>{const{contextMetadata:n,...i}=t,r=n?[{...i},n]:[t,null];e(...r)};let i=t,r=n(i);return"function"==typeof e?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),i=e,r=n(i),this.client.addContextHandler(r)):this.client.addContextHandler(r,null===e?void 0:e)}async findIntent(e,n,i){this.wire.sendAction("fdc3-find-intent").catch((e=>{}));try{return await this.client.getInfoForIntent({name:e,context:n,metadata:{resultType:i}})}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntent?"ResolverUnavailable":e.message;throw new Error(n)}}async findIntentsByContext(e,i){this.wire.sendAction("fdc3-find-intents-by-context").catch((e=>{}));const r=i?{context:e,metadata:{resultType:i}}:e;try{return await n.InteropClient.ferryFdc3Call(this.client,"fdc3v2FindIntentsByContext",r)}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntentsByContext?"ResolverUnavailable":e.message;throw new Error(n)}}async raiseIntent(e,n,r){this.wire.sendAction("fdc3-raise-intent").catch((e=>{}));try{return"string"==typeof r&&console.warn("Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string })."),(0,i.getIntentResolution)(this.client,n,r,e)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?"ResolverUnavailable":e.message;throw new Error(n)}}async raiseIntentForContext(e,n){this.wire.sendAction("fdc3-raise-intent-for-context").catch((e=>{}));try{return"string"==typeof n&&console.warn("Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string })."),(0,i.getIntentResolution)(this.client,e,n)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?"ResolverUnavailable":e.message;throw new Error(n)}}async addIntentListener(e,t){if(this.wire.sendAction("fdc3-add-intent-listener").catch((e=>{})),"string"!=typeof e)throw new Error("First argument must be an Intent name");return this.client.registerIntentHandler((async e=>{let n,i;const{context:r,metadata:o}=e,{contextMetadata:s,metadata:a,...c}=r,d=o?.intentResolutionResultId||a?.intentResolutionResultId;try{const e=a?{metadata:a,...c}:{...c};n=await t(e,s),i=n}catch(e){n=e,i={error:!0}}if(d&&this.fin.InterApplicationBus.publish(d,i).catch((()=>null)),n instanceof Error)throw new Error(n.message);return n}),e,{fdc3Version:"2.0"})}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}async createPrivateChannel(){const e=(0,t.generateId)();await n.InteropClient.ferryFdc3Call(this.client,"createPrivateChannelProvider",{channelId:e});const o=await this.fin.InterApplicationBus.Channel.connect(e),s=new r.PrivateChannelClient(o,e);return(0,i.buildPrivateChannelObject)(s)}async getUserChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:"user",...(0,i.getUnsupportedChannelApis)("User")})))}async getSystemChannels(){return console.warn("This API has been deprecated. Please use fdc3.getUserChannels instead."),super.getSystemChannels()}async joinUserChannel(e){return super.joinChannel(e)}async joinChannel(e){return console.warn("This API has been deprecated. Please use fdc3.joinUserChannel instead."),super.joinChannel(e)}async getCurrentChannel(){const e=await super.getCurrentChannel();return e?{...e,type:"user",broadcast:this.broadcast.bind(this)}:null}async getInfo(){return n.InteropClient.ferryFdc3Call(this.client,"fdc3v2GetInfo",{fdc3Version:"2.0"})}}return pr.Fdc3Module2=o,pr}(),l=Hi;let u=class extends o.Base{constructor(i,r){super(i),e.set(this,void 0),t.set(this,void 0),n(this,t,new Map,"f"),n(this,e,r,"f")}async setContext(t){this.wire.sendAction("interop-client-set-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("setContext",{context:t})}async addContextHandler(t,n){if(this.wire.sendAction("interop-client-add-context-handler").catch((e=>{})),"function"!=typeof t)throw new Error("Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");const r=await i(this,e,"f");let o;o=n?`invokeContextHandler-${n}-${(0,l.generateId)()}`:"invokeContextHandler";const s=(0,l.wrapContextHandler)(t,o);return r.register(o,s),await r.dispatch("contextHandlerRegistered",{handlerId:o,contextType:n}),{unsubscribe:async()=>{r.remove(o),await r.dispatch("removeContextHandler",{handlerId:o})}}}async getContextGroups(){this.wire.sendAction("interop-client-get-context-groups").catch((e=>{}));return(await i(this,e,"f")).dispatch("getContextGroups")}async joinContextGroup(t,n){this.wire.sendAction("interop-client-join-context-group").catch((e=>{}));const r=await i(this,e,"f");if(!t)throw new Error("No contextGroupId specified for joinContextGroup.");return r.dispatch("joinContextGroup",{contextGroupId:t,target:n})}async removeFromContextGroup(t){this.wire.sendAction("interop-client-remove-from-context-group").catch((e=>{}));return(await i(this,e,"f")).dispatch("removeFromContextGroup",{target:t})}async getAllClientsInContextGroup(t){this.wire.sendAction("interop-client-get-all-clients-in-context-group").catch((e=>{}));const n=await i(this,e,"f");if(!t)throw new Error("No contextGroupId specified for getAllClientsInContextGroup.");return n.dispatch("getAllClientsInContextGroup",{contextGroupId:t})}async getInfoForContextGroup(t){this.wire.sendAction("interop-client-get-info-for-context-group").catch((e=>{}));const n=await i(this,e,"f");if(!t)throw new Error("No contextGroupId specified for getInfoForContextGroup.");return n.dispatch("getInfoForContextGroup",{contextGroupId:t})}async fireIntent(t){this.wire.sendAction("interop-client-fire-intent").catch((e=>{}));return(await i(this,e,"f")).dispatch("fireIntent",t)}async registerIntentHandler(t,n,r){this.wire.sendAction("interop-client-register-intent-handler").catch((e=>{}));const o=await i(this,e,"f"),s=`intent-handler-${n}`,a=(0,l.wrapIntentHandler)(t,s);try{await o.register(s,a),await o.dispatch("intentHandlerRegistered",{handlerId:s,...r})}catch(e){throw new Error("Unable to register intent handler")}return{unsubscribe:async()=>{o.remove(s)}}}async getCurrentContext(t){this.wire.sendAction("interop-client-get-current-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("getCurrentContext",{contextType:t})}async getInfoForIntent(t){this.wire.sendAction("interop-client-get-info-for-intent").catch((e=>{}));return(await i(this,e,"f")).dispatch("getInfoForIntent",t)}async getInfoForIntentsByContext(t){this.wire.sendAction("interop-client-get-info-for-intents-by-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("getInfoForIntentsByContext",t)}async fireIntentForContext(t){this.wire.sendAction("interop-client-fire-intent-for-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("fireIntentForContext",t)}async joinSessionContextGroup(n){try{const r=i(this,t,"f").get(n);if(r)return r.getUserInstance();const o=await i(this,e,"f"),{hasConflict:s}=await o.dispatch("sessionContextGroup:createIfNeeded",{sessionContextGroupId:n});s&&console.warn(`A (non-session) context group with the name "${n}" already exists. If you are trying to join a Context Group, call joinContextGroup instead.`);const c=new a.default(this.wire,i(this,e,"f"),n);return i(this,t,"f").set(n,c),c.getUserInstance()}catch(e){throw console.error(`Error thrown trying to create Session Context Group with id "${n}": ${e}`),e}}async onDisconnection(t){this.wire.sendAction("interop-client-add-ondisconnection-listener").catch((e=>{}));return(await i(this,e,"f")).onDisconnection((e=>{const{uuid:n}=e;t({type:"interop-broker",topic:"disconnected",brokerName:n})}))}getFDC3Sync(e){switch(e){case"1.2":return new c.Fdc3Module((()=>this),this.wire);case"2.0":return new h.Fdc3Module2((()=>this),this.wire);default:throw new Error(`Invalid FDC3 version provided: ${e}. Must be '1.2' or '2.0'`)}}async getFDC3(e){return this.getFDC3Sync(e)}static async ferryFdc3Call(t,n,r){return(await i(t,e,"f")).dispatch(n,r||null)}};return Ki.InteropClient=u,e=new WeakMap,t=new WeakMap,Ki}var yr,fr,gr,mr={};function vr(){if(yr)return mr;yr=1,Object.defineProperty(mr,"__esModule",{value:!0}),mr.overrideCheck=mr.checkFDC32Overrides=mr.getDefaultViewFdc3VersionFromAppInfo=void 0;const e=Vi();function t(t){return["fdc3HandleFindInstances","handleInfoForIntent","handleInfoForIntentsByContext","fdc3HandleGetAppMetadata","fdc3HandleGetInfo","fdc3HandleOpen","handleFiredIntent","handleFiredIntentForContext"].filter((n=>t[n]===e.InteropBroker.prototype[n]))}return mr.getDefaultViewFdc3VersionFromAppInfo=function({manifest:e,initialOptions:t}){const n=e?.platform?.defaultViewOptions?.fdc3InteropApi??t.defaultViewOptions?.fdc3InteropApi;return["1.2","2.0"].includes(n??"")?n:void 0},mr.checkFDC32Overrides=t,mr.overrideCheck=function(e,n){if(n&&"2.0"===n){const n=t(e);n.length>0&&console.warn(`WARNING: FDC3 2.0 has been set as a default option for Views in this Platform, but the required InteropBroker APIs for FDC3 2.0 compliance have not all been overridden.\nThe following APIs need to be overridden:\n${n.join("\n")}`)}},mr}function Cr(){return gr||(gr=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),i=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),i(function(){if(fr)return Ti;fr=1;var e=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ti,"__esModule",{value:!0}),Ti.InteropModule=void 0;const t=e(n),i=$i,r=d,o=Vi(),a=wr(),c=vr(),h=Tn,l=e=>new e,u="You have attempted to use or modify InteropBroker parameters, which is not allowed. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.";class p extends r.Base{async init(e,n=l){this.wire.sendAction("interop-init").catch((()=>{}));const r=await this.wire.environment.getInteropInfo(this.wire.getFin()),s=(0,i.createUnusableObject)(u),a=(0,i.createWarningObject)(u,(0,t.default)(r)),d=async()=>{throw new Error(u)},p=o.InteropBroker.createClosedConstructor(this.wire,(()=>this.fin.InterApplicationBus.Channel.create(`interop-broker-${e}`)),r);let w;return w=Array.isArray(n)?new((0,h.overrideFromComposables)(...n)(p))(s,d,a):await n(p,s,d,a),(0,c.overrideCheck)(w,r.fdc3Version),w}connectSync(e,t){return this.wire.sendAction("interop-connect-sync").catch((()=>{})),new a.InteropClient(this.wire,this.wire.environment.whenReady().then((()=>this.fin.InterApplicationBus.Channel.connect(`interop-broker-${e}`,{payload:t}))))}}return Ti.InteropModule=p,Ti}(),e),i(wr(),e),i(Vi(),e)}(Li)),Li}var br={},Ir={},Er={},xr={};Object.defineProperty(xr,"__esModule",{value:!0}),xr.getSnapshotSourceChannelName=void 0;xr.getSnapshotSourceChannelName=e=>`snapshot-source-provider-${e.uuid}`;var Ar,Pr,Mr,_r,Or,Sr=s&&s.__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},Rr=s&&s.__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)};Object.defineProperty(Er,"__esModule",{value:!0}),Er.SnapshotSource=void 0;const Fr=d,jr=xr,kr=new Map;class Lr extends Fr.Base{constructor(e,t){super(e),Ar.set(this,void 0),Pr.set(this,(()=>(kr.has(this.identity.uuid)||kr.set(this.identity.uuid,{eventFired:null,clientPromise:null}),kr.get(this.identity.uuid)))),Mr.set(this,(()=>(Rr(this,Pr,"f").call(this).clientPromise||(Rr(this,Pr,"f").call(this).clientPromise=Rr(this,_r,"f").call(this)),Rr(this,Pr,"f").call(this).clientPromise))),_r.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);try{Rr(this,Pr,"f").call(this).eventFired||await Rr(this,Or,"f").call(this);const t=await this.fin.InterApplicationBus.Channel.connect(e,{wait:!1});return t.onDisconnection((()=>{Rr(this,Pr,"f").call(this).clientPromise=null,Rr(this,Pr,"f").call(this).eventFired=null})),t}catch(e){throw Rr(this,Pr,"f").call(this).clientPromise=null,new Error("The targeted SnapshotSource is not currently initialized. Await this object's ready() method.")}})),Or.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);let t,n;const i=new Promise(((e,i)=>{t=e,n=i}));Rr(this,Pr,"f").call(this).eventFired=i;const r=async i=>{try{i.channelName===e&&(t(),await this.fin.InterApplicationBus.Channel.removeListener("connected",r))}catch(e){n(e)}};await this.fin.InterApplicationBus.Channel.on("connected",r)})),Sr(this,Ar,t,"f")}get identity(){return Rr(this,Ar,"f")}async ready(){this.wire.sendAction("snapshot-source-ready").catch((e=>{}));try{await Rr(this,Mr,"f").call(this)}catch(e){await Rr(this,Pr,"f").call(this).eventFired}}async getSnapshot(){this.wire.sendAction("snapshot-source-get-snapshot").catch((e=>{}));const e=await Rr(this,Mr,"f").call(this),t=await e.dispatch("get-snapshot");return(await t).snapshot}async applySnapshot(e){this.wire.sendAction("snapshot-source-apply-snapshot").catch((e=>{}));return(await Rr(this,Mr,"f").call(this)).dispatch("apply-snapshot",{snapshot:e})}}Er.SnapshotSource=Lr,Ar=new WeakMap,Pr=new WeakMap,Mr=new WeakMap,_r=new WeakMap,Or=new WeakMap,Object.defineProperty(Ir,"__esModule",{value:!0}),Ir.SnapshotSourceModule=void 0;const Tr=d,$r=Er,Br=xr;class Gr extends Tr.Base{async init(e){if(this.wire.sendAction("snapshot-source-init").catch((e=>{})),"object"!=typeof e||"function"!=typeof e.getSnapshot||"function"!=typeof e.applySnapshot)throw new Error("you must pass in a valid SnapshotProvider");const t=await this.fin.InterApplicationBus.Channel.create((0,Br.getSnapshotSourceChannelName)(this.fin.me));t.register("get-snapshot",(async()=>({snapshot:await e.getSnapshot()}))),t.register("apply-snapshot",(({snapshot:t})=>e.applySnapshot(t)))}wrapSync(e){return this.wire.sendAction("snapshot-source-wrap-sync").catch((e=>{})),new $r.SnapshotSource(this.wire,e)}async wrap(e){return this.wire.sendAction("snapshot-source-wrap").catch((e=>{})),this.wrapSync(e)}}Ir.SnapshotSourceModule=Gr,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Ir,e),n(Er,e)}(br),Object.defineProperty(a,"__esModule",{value:!0});var Wr=a.Fin=void 0;const Hr=t,Nr=c,Dr=ie(),Ur=Z(),Vr=de,zr=en,Kr=rn,qr=un,Jr=bn,Yr=J(),Zr=An,Qr=ki,Xr=Cr(),eo=br;class to extends Hr.EventEmitter{constructor(e){super(),this.wire=e,this.System=new Nr.System(e),this.Window=new Dr._WindowModule(e),this.Application=new Ur.ApplicationModule(e),this.InterApplicationBus=new Vr.InterApplicationBus(e),this.Clipboard=new zr.Clipboard(e),this.ExternalApplication=new Kr.ExternalApplicationModule(e),this.Frame=new qr._FrameModule(e),this.GlobalHotkey=new Jr.GlobalHotkey(e),this.Platform=new Zr.PlatformModule(e,this.InterApplicationBus.Channel),this.View=new Yr.ViewModule(e),this.Interop=new Xr.InteropModule(e),this.SnapshotSource=new eo.SnapshotSourceModule(e),e.registerFin(this),this.me=(0,Qr.getMe)(e),e.on("disconnected",(()=>{this.emit("disconnected")}))}}Wr=a.Fin=to;var no={},io={};function ro(e){return"string"==typeof e.manifestUrl}function oo(e){return ao(e)&&"string"==typeof e.address}function so(e){return oo(e)&&"string"==typeof e.token}function ao(e){return"string"==typeof e.uuid}function co(e){return e.runtime&&"string"==typeof e.runtime.version}function ho(e){return ao(e)&&co(e)}Object.defineProperty(io,"__esModule",{value:!0}),io.isInternalConnectConfig=io.isPortDiscoveryConfig=io.isNewConnectConfig=io.isConfigWithReceiver=io.isRemoteConfig=io.isExistingConnectConfig=io.isExternalConfig=void 0,io.isExternalConfig=ro,io.isExistingConnectConfig=oo,io.isRemoteConfig=so,io.isConfigWithReceiver=function(e){return"object"==typeof e.receiver&&so({...e,address:""})},io.isNewConnectConfig=ho,io.isPortDiscoveryConfig=function(e){return ro(e)&&co(e)||ho(e)},io.isInternalConnectConfig=function(e){return oo(e)||ho(e)};var lo={},uo={};Object.defineProperty(uo,"__esModule",{value:!0}),uo.EmitterMap=void 0;const po=t;function wo(e){return Buffer.from(e).toString("base64")}uo.EmitterMap=class{constructor(){this.storage=new Map}hashKeys(e){return e.map(wo).join("/")}getOrCreate(e){const t=this.hashKeys(e);return this.storage.has(t)||this.storage.set(t,new po.EventEmitter),this.storage.get(t)}has(e){return this.storage.has(this.hashKeys(e))}delete(e){const t=this.hashKeys(e);return this.storage.delete(t)}},Object.defineProperty(lo,"__esModule",{value:!0});const yo=uo;class fo extends yo.EmitterMap{constructor(){super(...arguments),this.dispatchEvent=e=>{if(function(e){return"process-desktop-event"===e.action}(e)){const{payload:t}=e,n=function(e){const{topic:t}=e;if("frame"===t||"window"===t||"view"===t){const{uuid:n,name:i}=e;return[t,n,i]}if("application"===t){const{uuid:n}=e;return[t,n]}return[t]}(t);if(this.has(n))return this.getOrCreate(n).emit(t.type,t),!0}return!1}}}lo.default=fo;var go,mo,vo=s&&s.__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},Co=s&&s.__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)},bo=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(no,"__esModule",{value:!0});var Io=no.Transport=void 0;const Eo=t,xo=io,Ao=g,Po=bo(lo),Mo=ki,_o=ke;class Oo extends Eo.EventEmitter{constructor(e,t,n){super(),this.wireListeners=new Map,this.topicRefMap=new Map,this.eventAggregator=new Po.default,this.messageHandlers=[this.eventAggregator.dispatchEvent],go.set(this,void 0),mo.set(this,void 0),this.connectSync=()=>{Co(this,go,"f").connectSync()},this.getPort=()=>Co(this,go,"f").getPort(),vo(this,go,new e(this.onmessage.bind(this)),"f"),this.environment=t,this.sendRaw=Co(this,go,"f").send.bind(Co(this,go,"f")),this.registerMessageHandler(this.handleMessage.bind(this)),Co(this,go,"f").on("disconnected",(()=>{for(const[,{handleNack:e}]of this.wireListeners)e({reason:"Remote connection has closed"});this.wireListeners.clear(),this.emit("disconnected")}));const{uuid:i,name:r}=n,o=this.environment.getCurrentEntityType();this.me=(0,Mo.getBaseMe)(o,i,r)}getFin(){if(!Co(this,mo,"f"))throw new Error("No Fin object registered for this transport");return Co(this,mo,"f")}registerFin(e){if(Co(this,mo,"f"))throw new Error("Fin object has already been registered for this transport");vo(this,mo,e,"f")}shutdown(){return Co(this,go,"f").shutdown()}async connect(e){if((0,xo.isConfigWithReceiver)(e))return await Co(this,go,"f").connect(e.receiver),this.authorize(e);if((0,xo.isRemoteConfig)(e))return this.connectRemote(e);if((0,xo.isExistingConnectConfig)(e))return this.connectByPort(e);if((0,xo.isNewConnectConfig)(e)){const t=await this.environment.retrievePort(e);return this.connectByPort({...e,address:`ws://localhost:${t}`})}}async connectRemote(e){return await Co(this,go,"f").connect(new(this.environment.getWsConstructor())(e.address)),this.authorize(e)}async connectByPort(e){const{address:t,uuid:n}=e,i={...e,type:"file-token"},r=Co(this,go,"f");await r.connect(new(this.environment.getWsConstructor())(e.address));const o=await this.sendAction("request-external-authorization",{uuid:n,type:"file-token"},!0);if("external-authorization-response"!==o.action)throw new Ao.UnexpectedActionError(o.action);return await this.environment.writeToken(o.payload.file,o.payload.token),this.authorize(i)}async authorize(e){const t=await this.sendAction("request-authorization",e,!0);if("authorization-response"!==t.action)throw new Ao.UnexpectedActionError(t.action);if(!0!==t.payload.success)throw new Ao.RuntimeError(t.payload)}sendAction(e,t={},n=!1){let i=()=>{};const r=Ao.RuntimeError.getCallSite(1),o=this.environment.getNextMessageId(),s=new Promise(((s,a)=>{i=a;const c={action:e,payload:t,messageId:o},d=Co(this,go,"f");return this.addWireListener(o,s,(e=>this.nackHandler(e,a,r)),n),d.send(c).catch(a)}));return Object.assign(s,{cancel:i,messageId:o})}nackHandler(e,t,n){t("string"==typeof e?e:new Ao.RuntimeError(e,n))}ferryAction(e){return new Promise(((t,n)=>{const i=this.environment.getNextMessageId();e.messageId=i;const r=e=>{t(e.payload)};return Co(this,go,"f").send(e).then((()=>this.addWireListener(i,r,(e=>this.nackHandler(e,n)),!1))).catch(n)}))}registerMessageHandler(e){this.messageHandlers.push(e)}addWireListener(e,t,n,i){i?this.uncorrelatedListener=t:this.wireListeners.has(e)?n({reason:"Duplicate handler id",error:(0,_o.errorToPOJO)(new Ao.DuplicateCorrelationError(String(e)))}):this.wireListeners.set(e,{resolve:t,handleNack:n})}onmessage(e){for(const t of this.messageHandlers)t.call(null,e)}handleMessage(e){const t=e.correlationId||NaN;if("correlationId"in e){if(!this.wireListeners.has(t))return!1;{const{resolve:n,handleNack:i}=this.wireListeners.get(t);"ack"!==e.action?i({reason:"Did not receive ack action",error:(0,_o.errorToPOJO)(new Ao.NoAckError(e.action))}):"payload"in e?e.payload.success?n.call(null,e):i(e.payload):"string"==typeof e.reason?i(e):(console.warn("Received invalid response from core",e),i({reason:"invalid response shape"})),this.wireListeners.delete(t)}}else this.uncorrelatedListener&&this.uncorrelatedListener.call(null,e),this.uncorrelatedListener=()=>{};return!0}}Io=no.Transport=Oo,go=new WeakMap,mo=new WeakMap;const So=(...e)=>({log:(...t)=>console.debug(`[${(new Date).toISOString()}]`,...(e=>e.map((e=>`[${e}]`)))(e),...t),getLogger:(...t)=>So(...e,...t)}),Ro=So("@openfin/core-web/client");function Fo(e,t){if(!function(e){return"string"==typeof e}(e))throw new Error(`Property ${t} has invalid type. Expected string, got ${typeof e}.`)}const jo="web-broker-ports-ready",ko=Ro.getLogger("get-web-interop-ports");function Lo(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)}function To(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}"function"==typeof SuppressedError&&SuppressedError;const $o=e=>{var n,i,r;return r=class extends t.EventEmitter{constructor(t){super(),n.set(this,void 0),i.set(this,!1),this.connectSync=()=>{Lo(this,i,"f")||(e.addEventListener("message",(e=>{e.data?.topic?.startsWith("wire-message")&&e.data.message&&Lo(this,n,"f").call(this,{...JSON.parse(e.data.message),ports:e.ports})})),e.start())},this.connect=async()=>{this.connectSync()},this.send=t=>(e.postMessage({topic:"wire-message",message:JSON.stringify(t)}),Promise.resolve()),this.shutdown=async()=>{e.close()},To(this,n,t,"f")}getPort(){return e}},n=new WeakMap,i=new WeakMap,r};var Bo={},Go={};Object.defineProperty(Go,"__esModule",{value:!0}),Go.BaseEnvironment=void 0;const Wo=vr();Go.BaseEnvironment=class{async getViewWindowIdentity(e,t){const{identity:n}=await e.View.wrapSync(t).getCurrentWindow();return n}async getInteropInfo(e){const t=await e.Application.getCurrentSync().getInfo().catch((()=>null)),n=t?.initialOptions?.interopBrokerConfiguration??{};return{fdc3Version:t?(0,Wo.getDefaultViewFdc3VersionFromAppInfo)(t):void 0,...n,fdc3Info:{providerVersion:await e.System.getVersion(),provider:"OpenFin"}}}},Object.defineProperty(Bo,"__esModule",{value:!0});var Ho=Bo.BrowserEnvironment=void 0;const No=Go;class Do extends No.BaseEnvironment{constructor(){super(...arguments),this.type="other",this.getRandomId=()=>{const e=new Uint32Array(1);return window.crypto.getRandomValues(e)[0].toString(32)}}getAdapterVersionSync(){return""}observeBounds(e,t){throw new Error("Method not implemented.")}layoutAllowedInContext(e){return!1}initLayoutManager(e,t,n){throw new Error("Method not implemented.")}applyLayoutSnapshot(e,t,n){throw new Error("Method not implemented.")}createLayout(e,t){throw new Error("Method not implemented.")}destroyLayout(e,t){throw new Error("Method not implemented.")}resolveLayout(e,t){throw new Error("Method not implemented.")}initPlatform(...e){throw new Error("Method not implemented.")}writeToken(e,t){return Promise.resolve("")}retrievePort(e){throw new Error("Method not implemented.")}getNextMessageId(){return this.getRandomId()}createChildContent(e){throw new Error("Method not implemented.")}getWebWindow(e){throw new Error("Method not implemented.")}getCurrentEntityIdentity(){throw new Error("Method not implemented.")}getCurrentEntityType(){return"external connection"}raiseEvent(e,t){throw new Error("Method not implemented.")}getUrl(){return location.href}getDefaultChannelOptions(){return{create:{},connect:{}}}getRtcPeer(){return new RTCPeerConnection}getWsConstructor(){return WebSocket}whenReady(){return Promise.resolve()}}Ho=Bo.BrowserEnvironment=Do;const Uo=e=>"platform"in e&&void 0!==e.platform;var Vo,zo;class Ko extends Ho{constructor(e){super(),this.connectConfig=e,Vo.set(this,void 0),zo.set(this,new W((async()=>Promise.resolve().then((function(){return __webpack_require__(/*! ./main-b14f67c9.js */ "./node_modules/@openfin/core-web/out/main-b14f67c9.js")}))))),Uo(e)&&this.validatePlatformOptions(e)}getAdapterVersionSync(){return"0.39.21"}validatePlatformOptions({platform:e}){if(!("layoutSnapshot"in e))throw new Error("Platform options are missing layoutSnapshot. Please provide a layoutSnapshot in the platform options.");if("windows"in e||"windows"in e.layoutSnapshot)throw new Error("It appears you tried to call connect() with a snapshot object from an OpenFin desktop environment. Note that connect() expects to be called with a platform property with this structure: { platform: { layoutSnapshot } }. To get a layoutSnapshot of the expected structure, use fin.Platform.Layout.getCurrentLayoutManagerSync().getLayoutSnapshot() in v34+ in your desktop environment.");const{layouts:t}=e.layoutSnapshot;Object.entries(t).map((([e,t])=>{if("object"!=typeof t||null===t)throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must be an object.`);if(!("content"in t))throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must contain a 'content' property.`)}))}async getInteropInfo(e){return{...{contextGroups:void 0,logging:{beforeAction:{enabled:!1},afterAction:{enabled:!1}}},fdc3Version:void 0,fdc3Info:{providerVersion:"0.39.21",provider:"OpenFin Web"}}}layoutAllowedInContext(e){return!0}async initLayoutManager(e,t,n){if(Lo(this,Vo,"f"))throw new Error("Layout already initialized.");if(!Uo(this.connectConfig))throw new Error("Platform options are missing from connection config.");const{WebLayoutEntryPoint:i}=await Lo(this,zo,"f").getValue();return To(this,Vo,new i(this.connectConfig),"f"),await Lo(this,Vo,"f").initLayoutManager(e,t,n)}async applyLayoutSnapshot(e,t,n){Lo(this,Vo,"f")?.applyLayoutSnapshot(e,t,n)}async createLayout(e,t){return Lo(this,Vo,"f")?.createLayout(e,t)}async destroyLayout(e,t){return Lo(this,Vo,"f")?.destroyLayout(e,t)}async getViewWindowIdentity(e,t){return Promise.resolve({uuid:t.uuid,name:t.uuid})}}Vo=new WeakMap,zo=new WeakMap;const qo=()=>{const e=((e,t)=>{const n=new RegExp(`^${t}<(?.*)>$`).exec(e)?.groups?.meta;if(n)try{return JSON.parse(atob(n))}catch(e){throw new Error(`Failed to decode JSON from ${n}.`)}})(window.name,"of-frame");if(e)try{const{name:t,uuid:n,brokerUrl:i,providerId:r,contextGroup:o}=e;return Fo(i,"brokerUrl"),Fo(n,"uuid"),Fo(t,"name"),{identity:{name:t,uuid:n},brokerUrl:i,interopConfig:{providerId:r,currentContextGroup:o}}}catch(e){throw new Error(`Unexpected error occurred when inferring platform information: ${e.stack}`)}},Jo=()=>{const e=r.v4();return{uuid:e,name:e}},Yo=async e=>{if("enabled"===e.connectionInheritance){const t=await(async e=>{const t=qo();if(t){const{validateOptions:n=(()=>!0)}=e,{identity:i,...r}=t;if(!await n(r))throw new Error("Parent options were rejected by validateOptions.");return t}})(e);if(t)return t}if(!e.options){const t="enabled"===e.connectionInheritance?"Broker URL was not specified nor provided by a platform container.":"Connection inheritance is disabled but no options were provided.";throw new Error(t)}return{...e.options,identity:Jo()}};exports.__classPrivateFieldGet=Lo,exports.__classPrivateFieldSet=To,exports.apiExposer=Gn,exports.commonjsGlobal=s,exports.connect=async t=>{try{Ro.log("Establishing connection",t);const{brokerUrl:n,identity:i,timeout:r,interopConfig:s}=await Yo(t),{workerPort:a,iframeBrokerPort:c}=await(async(e,t,n)=>{const{origin:i}=new URL(e),r=document.createElement("IFRAME");let s;r.style.display="none";try{return await new Promise(((a,c)=>{const d=e=>{if(e.source===r.contentWindow&&e.data?.topic===`ack-${jo}`){if(e.origin!==i)c(new Error(`Broker redirected to unexpected origin ${e.origin}, expected ${i}.`));else if(e.data.success){const[t,n]=e.ports;a({iframeBrokerPort:t,workerPort:n})}else c(new m(e.data));window.removeEventListener("message",d),clearTimeout(s)}};window.addEventListener("message",d),ko.log(`Connecting to broker ${e}`),r.setAttribute("src",e),r.setAttribute("name",o(t,"of-broker")),document.body.appendChild(r),ko.log("Iframe loaded, awaiting init message from iframe"),n&&(s=setTimeout((()=>{window.removeEventListener("message",d),document.body.removeChild(r),c(new Error("Worker did not initialize in time"))}),n))}))}catch(e){throw new Error(`Failed to initialise Fin Web Client. ${e.message}`,{cause:e})}})(n,i,r);Ro.log("Successfully established connection to shared worker");const d={entityType:"external connection",...i};a.start(),c.start();const h=((t,n,i)=>{const r=$o(n),o=new Ko(t),s=new Io(r,o,i);return s.connectSync(),window.Buffer=e.Buffer,new Wr(s)})(t,a,d);return s?.providerId&&(h.me.interop=h.Interop.connectSync(s.providerId),s?.currentContextGroup&&h.me.interop.joinContextGroup(s.currentContextGroup).catch((e=>{console.warn(`Error joining specified context group: ${s?.currentContextGroup}, continuing`,e)}))),{...h,me:{...h.me,identity:{uuid:h.me.uuid,name:h.me.name}}}}catch(e){throw new Error(`An error occured during web-interop connection: ${e.message}`)}},exports.decorators=Nn,exports.encodeOptions=o,exports.layout_constants=ai,exports.lazy=G; +var e=__webpack_require__(/*! buffer/ */ "../../node_modules/buffer/index.js"),t=__webpack_require__(/*! events */ "../../node_modules/events/events.js"),n=__webpack_require__(/*! lodash/cloneDeep */ "../../node_modules/lodash/cloneDeep.js"),i=__webpack_require__(/*! lodash/isEqual */ "../../node_modules/lodash/isEqual.js"),r=__webpack_require__(/*! uuid */ "../../node_modules/uuid/dist/esm-browser/index.js");const o=(e,t)=>`${t}<${btoa(JSON.stringify(e))}>`;var s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof __webpack_require__.g?__webpack_require__.g:"undefined"!=typeof self?self:{},a={},c={},d={},h={};async function l(e){const t=[];for(const n of e){const e=await n();t.push(e)}return t}Object.defineProperty(h,"__esModule",{value:!0}),h.promiseMapSerial=h.serial=h.promiseMap=h.promisify=void 0,h.promisify=function(e){return(...t)=>new Promise(((n,i)=>{e(...t,((e,t)=>e?i(e):n(t)))}))},h.promiseMap=async function(e,t){return Promise.all(e.map(t))},h.serial=l,h.promiseMapSerial=async function(e,t){return l(e.map(((e,n,i)=>()=>t(e,n,i))))};var u,p=s&&s.__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},w=s&&s.__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)};Object.defineProperty(d,"__esModule",{value:!0}),d.Reply=d.EmitterBase=d.Base=void 0;const y=h;class f{constructor(e){this.isNodeEnvironment=()=>"node"===this.wire.environment.type,this.isOpenFinEnvironment=()=>"openfin"===this.wire.environment.type,this.isBrowserEnvironment=()=>"other"===this.wire.environment.type,this.wire=e}get fin(){return this.wire.getFin()}get me(){return this.wire.me}}d.Base=f;d.EmitterBase=class extends f{constructor(e,t,...n){super(e),this.topic=t,u.set(this,void 0),this.eventNames=()=>this.hasEmitter()?this.getOrCreateEmitter().eventNames():[],this.emit=(e,t,...n)=>!!this.hasEmitter()&&this.getOrCreateEmitter().emit(e,t,...n),this.hasEmitter=()=>this.wire.eventAggregator.has(w(this,u,"f")),this.getOrCreateEmitter=()=>this.wire.eventAggregator.getOrCreate(w(this,u,"f")),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[],this.listenerCount=e=>this.hasEmitter()?this.getOrCreateEmitter().listenerCount(e):0,this.registerEventListener=async(e,t={},n,i)=>{const r={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e},o=this.getOrCreateEmitter();n(o);try{await this.wire.sendAction("subscribe-to-desktop-event",r)}catch(e){throw i(o),this.deleteEmitterIfNothingRegistered(o),e}},this.deregisterEventListener=async(e,t={})=>{if(this.hasEmitter()){const n={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e};await this.wire.sendAction("unsubscribe-to-desktop-event",n).catch((()=>null));return this.getOrCreateEmitter()}return Promise.resolve()},p(this,u,[t,...n],"f"),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[]}async on(e,t,n){return await this.registerEventListener(e,n,(n=>{n.on(e,t)}),(n=>{n.removeListener(e,t)})),this}async addListener(e,t,n){return this.on(e,t,n)}async once(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.once(e,i),n.once(e,t)}),(n=>{n.removeListener(e,i),n.removeListener(e,t)})),this}async prependListener(e,t,n){return await this.registerEventListener(e,n,(n=>{n.prependListener(e,t)}),(n=>{n.removeListener(e,t)})),this}async prependOnceListener(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.prependOnceListener(e,t),n.once(e,i)}),(n=>{n.removeListener(e,t),n.removeListener(e,i)})),this}async removeListener(e,t,n){const i=await this.deregisterEventListener(e,n);return i&&(i.removeListener(e,t),this.deleteEmitterIfNothingRegistered(i)),this}async deregisterAllListeners(e){const t={...this.identity,type:e,topic:this.topic};if(this.hasEmitter()){const e=this.getOrCreateEmitter(),n=e.listenerCount(t.type),i=[];for(let e=0;enull)));return await Promise.all(i),e}}async removeAllListeners(e){const t=async e=>{const t=await this.deregisterAllListeners(e);t&&(t.removeAllListeners(e),this.deleteEmitterIfNothingRegistered(t))};if(e)await t(e);else if(this.hasEmitter()){const e=this.getOrCreateEmitter().eventNames();await(0,y.promiseMap)(e,t)}return this}deleteEmitterIfNothingRegistered(e){0===e.eventNames().length&&this.wire.eventAggregator.delete(w(this,u,"f"))}},u=new WeakMap;d.Reply=class{};var g={};Object.defineProperty(g,"__esModule",{value:!0});var m=g.RuntimeError=g.NotSupportedError=g.NotImplementedError=g.NoAckError=g.DuplicateCorrelationError=g.UnexpectedActionError=g.DisconnectedError=void 0;class v extends Error{constructor(e){super(`Expected websocket state OPEN but found ${e}`),this.readyState=e}}g.DisconnectedError=v;class C extends Error{}g.UnexpectedActionError=C;class b extends Error{}g.DuplicateCorrelationError=b;class I extends Error{}g.NoAckError=I;class E extends Error{}g.NotImplementedError=E;class x extends Error{}g.NotSupportedError=x;class A extends Error{constructor(e){const{message:t,name:n,stack:i,...r}=e;super(t),this.name=n||"Error",this.stack=i??this.toString(),Object.keys(r).forEach((e=>{this[e]=r[e]}))}}class P extends Error{static getCallSite(e=0){const t=Error.stackTraceLimit,n=e+1;Error.stackTraceLimit=t+n;const i=Error.prepareStackTrace;Error.prepareStackTrace=(e,t)=>t;const r=(new Error).stack?.slice(n)??[];return Error.prepareStackTrace=i,Error.stackTraceLimit=t,r}static prepareStackTrace(e,t){if("function"==typeof Error.prepareStackTrace)return Error.prepareStackTrace(e,t);let n="";n+=e.name||"Error",n+=`: ${e.message||""}`;for(const e of t)n+=`\n at ${e.toString()}`;return n}constructor(e,t){const{reason:n,error:i}=e;super(n),this.name="RuntimeError",i?.stack&&(this.cause=new A(i)),t&&(this.stack=P.prepareStackTrace(this,t))}}m=g.RuntimeError=P;var M={},_={},O={};Object.defineProperty(O,"__esModule",{value:!0}),O.validateIdentity=void 0,O.validateIdentity=function(e){let t;return"object"==typeof e&&"string"==typeof e.uuid||(t="Not a valid identity object"),t};var S={},R={},F={},j={},k={},L={},T={};Object.defineProperty(T,"__esModule",{value:!0}),T.handleDeprecatedWarnings=void 0;var $;T.handleDeprecatedWarnings=e=>{(e.contentNavigation?.whitelist||e.contentNavigation?.blacklist||e.contentRedirect?.whitelist||e.contentRedirect?.blacklist)&&console.warn("The properties 'whitelist' and 'blacklist' have been marked as deprecated and will be removed in a future version. Please use 'allowlist' and 'denylist'.")};var B={},G={};Object.defineProperty(G,"__esModule",{value:!0}),G.AsyncRetryableLazy=W=G.Lazy=void 0;var W=G.Lazy=class{constructor(e){this.producerFn=e}getValue(){return this.value||(this.value=this.producerFn()),this.value}};G.AsyncRetryableLazy=class{constructor(e){this.producerFn=e}async getValue(){return this.promise||(this.promise=this.producerFn().catch((e=>{throw delete this.promise,e}))),this.promise}};var H={};Object.defineProperty(H,"__esModule",{value:!0}),H.WebContents=void 0;const N=d;class D extends N.EmitterBase{constructor(e,t,n){super(e,n,t.uuid,t.name),this.identity=t,this.entityType=n}capturePage(e){return this.wire.sendAction("capture-page",{options:e,...this.identity}).then((({payload:e})=>e.data))}executeJavaScript(e){return this.wire.sendAction("execute-javascript-in-window",{...this.identity,code:e}).then((({payload:e})=>e.data))}getZoomLevel(){return this.wire.sendAction("get-zoom-level",this.identity).then((({payload:e})=>e.data))}setZoomLevel(e){return this.wire.sendAction("set-zoom-level",{...this.identity,level:e}).then((()=>{}))}navigate(e){return this.wire.sendAction("navigate-window",{...this.identity,url:e}).then((()=>{}))}navigateBack(){return this.wire.sendAction("navigate-window-back",{...this.identity}).then((()=>{}))}async navigateForward(){await this.wire.sendAction("navigate-window-forward",{...this.identity})}stopNavigation(){return this.wire.sendAction("stop-window-navigation",{...this.identity}).then((()=>{}))}reload(e=!1){return this.wire.sendAction("reload-window",{ignoreCache:e,...this.identity}).then((()=>{}))}print(e={}){return this.wire.sendAction("print",{...this.identity,options:e}).then((()=>{}))}findInPage(e,t){return this.wire.sendAction("find-in-page",{...this.identity,searchTerm:e,options:t}).then((({payload:e})=>e.data))}stopFindInPage(e){return this.wire.sendAction("stop-find-in-page",{...this.identity,action:e}).then((()=>{}))}getPrinters(){return this.wire.sendAction("get-printers",{...this.identity}).then((({payload:e})=>e.data))}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){await this.wire.sendAction("focus-window",{emitSynthFocused:e,...this.identity})}async showDeveloperTools(){await this.wire.sendAction("show-developer-tools",this.identity)}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction("get-process-info",this.identity);return e}async getSharedWorkers(){return this.wire.sendAction("get-shared-workers",this.identity).then((({payload:e})=>e.data))}async inspectSharedWorker(){await this.wire.sendAction("inspect-shared-worker",{...this.identity})}async inspectSharedWorkerById(e){await this.wire.sendAction("inspect-shared-worker-by-id",{...this.identity,workerId:e})}async inspectServiceWorker(){await this.wire.sendAction("inspect-service-worker",{...this.identity})}async showPopupWindow(e){if(this.wire.sendAction(`${this.entityType}-show-popup-window`,this.identity).catch((()=>{})),e?.onPopupReady){const t=async({popupName:t})=>{try{const n=this.fin.Window.wrapSync({uuid:this.fin.me.uuid,name:t});await e.onPopupReady(n)}catch(e){throw new Error(`Something went wrong during onPopupReady execution: ${e}`)}};await this.once("popup-ready",t)}const{payload:t}=await this.wire.sendAction("try-create-popup-window",{options:{...e,hasResultCallback:!!e?.onPopupResult,hasReadyCallback:!!e?.onPopupReady},...this.identity}),{data:{willOpen:n,options:i}}=t;n&&await this.fin.Window.create(i.initialOptions);if(e?.onPopupResult){const t=async t=>{await e.onPopupResult((e=>{const{name:t,uuid:n,result:i,data:r}=e,o={identity:{name:t,uuid:n},result:i};return r&&(o.data=r),o})(t))},n=async()=>{await this.removeListener("popup-result",t)};await this.on("popup-result",t),await this.once("popup-teardown",n)}const{payload:r}=await this.wire.sendAction("show-popup-window",{options:i,...this.identity});return r.data}}var U,V,z,K,q;function J(){return V||(V=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(function(){if($)return L;$=1,Object.defineProperty(L,"__esModule",{value:!0}),L.ViewModule=void 0;const e=d,t=O,n=J(),i=T;class r extends e.Base{async create(e){const{uuid:t}=this.wire.me;if(!e.name||"string"!=typeof e.name)throw new Error("Please provide a name property as a string in order to create a View.");return(0,i.handleDeprecatedWarnings)(e),this.wire.environment.childViews?await this.wire.environment.createChildContent({entityType:"view",options:{...e,uuid:t}}):await this.wire.sendAction("create-view",{...e,uuid:t}),this.wrapSync({uuid:t,name:e.name})}async wrap(e){this.wire.sendAction("view-wrap").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}wrapSync(e){this.wire.sendAction("view-wrap-sync").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}getCurrent(){if(this.wire.sendAction("view-get-current").catch((e=>{})),!this.wire.me.isView)throw new Error("You are not in a View context");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction("view-get-current-sync").catch((e=>{})),!this.wire.me.isView)throw new Error("You are not in a View context");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return L.ViewModule=r,L}(),e),n(function(){if(U)return B;var e;U=1,Object.defineProperty(B,"__esModule",{value:!0}),B.View=void 0;const t=g,n=G,i=H,r=ie();class o extends i.WebContents{constructor(i,o){super(i,o,"view"),this.identity=o,e.set(this,new n.Lazy((()=>this.fin.Platform.wrapSync(this.identity).getClient()))),this.attach=async e=>{await this.wire.sendAction("attach-view",{target:e,...this.identity})},this.destroy=async()=>{await this.wire.sendAction("destroy-view",{...this.identity})},this.show=async()=>{await this.wire.sendAction("show-view",{...this.identity})},this.showAt=async(e,t={})=>{await this.wire.sendAction("show-view-at",{bounds:e,...this.identity,options:t})},this.bringToFront=async()=>{await this.wire.sendAction("bring-view-to-front",{...this.identity})},this.hide=async()=>{await this.wire.sendAction("hide-view",{...this.identity})},this.setBounds=async e=>{await this.wire.sendAction("set-view-bounds",{bounds:e,...this.identity})},this.getBounds=async()=>(await this.wire.sendAction("get-view-bounds",{...this.identity})).payload.data,this.getInfo=async()=>(await this.wire.sendAction("get-view-info",{...this.identity})).payload.data,this.getParentLayout=async()=>(this.wire.sendAction("view-get-parent-layout",{...this.identity}).catch((()=>{})),this.fin.Platform.Layout.getLayoutByViewIdentity(this.identity)),this.getOptions=async()=>this.wire.sendAction("get-view-options",{...this.identity}).then((({payload:e})=>e.data)),this.updateOptions=async e=>this.wire.sendAction("update-view-options",{options:e,...this.identity}).then((()=>{})),this.getCurrentWindow=async()=>{const{payload:{data:e}}=await this.wire.sendAction("get-view-window",{...this.identity});return new r._Window(this.wire,e)},this.getCurrentStack=async()=>{this.wire.sendAction("view-get-current-stack").catch((()=>{}));try{return(await this.getParentLayout()).getStackByViewIdentity(this.identity)}catch(e){throw new t.RuntimeError({reason:"This view does not belong to a stack.",error:e})}},this.triggerBeforeUnload=async()=>(await this.wire.sendAction("trigger-before-unload",{...this.identity})).payload.data,this.bindToElement=async e=>{if(!e)throw new Error("Element not found.");return this.wire.environment.observeBounds(e,(async e=>this.setBounds(e)))}}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){const t=await this.getCurrentWindow();await t.focusedWebViewWasChanged(),await super.focus({emitSynthFocused:e})}}return B.View=o,e=new WeakMap,B}(),e)}(k)),k}function Y(){if(z)return j;z=1,Object.defineProperty(j,"__esModule",{value:!0}),j.Application=void 0;const e=d,t=ie(),n=J();class i extends e.EmitterBase{constructor(e,n){super(e,"application",n.uuid),this.identity=n,this.window=new t._Window(this.wire,{uuid:this.identity.uuid,name:this.identity.uuid})}windowListFromIdentityList(e){const n=[];return e.forEach((e=>{n.push(new t._Window(this.wire,{uuid:e.uuid,name:e.name}))})),n}isRunning(){return this.wire.sendAction("is-application-running",this.identity).then((({payload:e})=>e.data))}async quit(e=!1){try{await this._close(e),await this.wire.sendAction("destroy-application",{force:e,...this.identity})}catch(e){if(!["Remote connection has closed","Could not locate the requested application"].some((t=>e.message.includes(t))))throw e}}async _close(e=!1){try{await this.wire.sendAction("close-application",{force:e,...this.identity})}catch(e){if(!e.message.includes("Remote connection has closed"))throw e}}close(e=!1){return console.warn("Deprecation Warning: Application.close is deprecated Please use Application.quit"),this.wire.sendAction("application-close",this.identity).catch((e=>{})),this._close(e)}getChildWindows(){return this.wire.sendAction("get-child-windows",this.identity).then((({payload:e})=>{const t=[];return e.data.forEach((e=>{t.push({uuid:this.identity.uuid,name:e})})),this.windowListFromIdentityList(t)}))}getManifest(){return this.wire.sendAction("get-application-manifest",this.identity).then((({payload:e})=>e.data))}getParentUuid(){return this.wire.sendAction("get-parent-application",this.identity).then((({payload:e})=>e.data))}getShortcuts(){return this.wire.sendAction("get-shortcuts",this.identity).then((({payload:e})=>e.data))}async getViews(){const{payload:e}=await this.wire.sendAction("application-get-views",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}getZoomLevel(){return this.wire.sendAction("get-application-zoom-level",this.identity).then((({payload:e})=>e.data))}getWindow(){return this.wire.sendAction("application-get-window",this.identity).catch((e=>{})),Promise.resolve(this.window)}registerUser(e,t){return this.wire.sendAction("register-user",{userName:e,appName:t,...this.identity}).then((()=>{}))}removeTrayIcon(){return this.wire.sendAction("remove-tray-icon",this.identity).then((()=>{}))}restart(){return this.wire.sendAction("restart-application",this.identity).then((()=>{}))}run(){return console.warn("Deprecation Warning: Application.run is deprecated Please use fin.Application.start"),this.wire.sendAction("application-run",this.identity).catch((e=>{})),this._run()}_run(e={}){return this.wire.sendAction("run-application",{manifestUrl:this._manifestUrl,opts:e,...this.identity}).then((()=>{}))}scheduleRestart(){return this.wire.sendAction("relaunch-on-close",this.identity).then((()=>{}))}async sendApplicationLog(){const{payload:e}=await this.wire.sendAction("send-application-log",this.identity);return e.data}async setJumpList(e){await this.wire.sendAction("set-jump-list",{config:e,...this.identity})}setTrayIcon(e){return this.wire.sendAction("set-tray-icon",{enabledIcon:e,...this.identity}).then((()=>{}))}setShortcuts(e){return this.wire.sendAction("set-shortcuts",{data:e,...this.identity}).then((()=>{}))}async setShortcutQueryParams(e){await this.wire.sendAction("set-shortcut-query-args",{data:e,...this.identity})}setZoomLevel(e){return this.wire.sendAction("set-application-zoom-level",{level:e,...this.identity}).then((()=>{}))}async setAppLogUsername(e){await this.wire.sendAction("set-app-log-username",{data:e,...this.identity})}getTrayIconInfo(){return this.wire.sendAction("get-tray-icon-info",this.identity).then((({payload:e})=>e.data))}hasTrayIcon(){return this.wire.sendAction("has-tray-icon",this.identity).then((({payload:e})=>e.data))}terminate(){return this.wire.sendAction("terminate-application",this.identity).then((()=>{}))}wait(){return this.wire.sendAction("wait-for-hung-application",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction("get-info",this.identity).then((({payload:e})=>e.data))}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction("application-get-process-info",this.identity);return e}async setFileDownloadLocation(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t};await this.wire.sendAction("set-file-download-location",{...n,downloadLocation:e})}async getFileDownloadLocation(){const{payload:{data:e}}=await this.wire.sendAction("get-file-download-location",this.identity);return e}async showTrayIconPopupMenu(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t},{payload:i}=await this.wire.sendAction("show-tray-icon-popup-menu",{...n,options:e});return i.data}async closeTrayIconPopupMenu(){const{name:e}=this.wire.me,t={uuid:this.identity.uuid,name:e};await this.wire.sendAction("close-tray-icon-popup-menu",{...t})}}return j.Application=i,j}function Z(){return q||(q=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(function(){if(K)return F;K=1,Object.defineProperty(F,"__esModule",{value:!0}),F.ApplicationModule=void 0;const e=d,t=O,n=Y();class i extends e.Base{async wrap(e){this.wire.sendAction("wrap-application").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}wrapSync(e){this.wire.sendAction("wrap-application-sync").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}async _create(e){return void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&void 0===e.isPlatformController&&(e.autoShow=!0),await this.wire.sendAction("create-application",e),this.wrap({uuid:e.uuid})}create(e){return console.warn("Deprecation Warning: fin.Application.create is deprecated. Please use fin.Application.start"),this.wire.sendAction("application-create").catch((e=>{})),this._create(e)}async start(e){this.wire.sendAction("start-application").catch((e=>{}));const t=await this._create(e);return await this.wire.sendAction("run-application",{uuid:e.uuid}),t}async startManyManifests(e,t){return this.wire.sendAction("run-applications",{applications:e,opts:t}).then((()=>{}))}getCurrent(){return this.wire.sendAction("get-current-application").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction("get-current-application-sync").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}async startFromManifest(e,t){this.wire.sendAction("application-start-from-manifest").catch((e=>{}));const n=await this._createFromManifest(e);return await n._run(t),n}createFromManifest(e){return console.warn("Deprecation Warning: fin.Application.createFromManifest is deprecated. Please use fin.Application.startFromManifest"),this.wire.sendAction("application-create-from-manifest").catch((e=>{})),this._createFromManifest(e)}_createFromManifest(e){return this.wire.sendAction("get-application-manifest",{manifestUrl:e}).then((({payload:e})=>{const t=e.data.platform?e.data.platform.uuid:e.data.startup_app.uuid;return this.wrap({uuid:t})})).then((t=>(t._manifestUrl=e,t)))}}return F.ApplicationModule=i,F}(),e),n(Y(),e)}(R)),R}H.WebContents=D;var Q={};Object.defineProperty(Q,"__esModule",{value:!0}),Q.promisifySubscription=void 0;var X,ee,te;function ne(){if(X)return S;X=1,Object.defineProperty(S,"__esModule",{value:!0}),S._Window=void 0;const e=Z(),t=H,n=J(),i=T,r=Q;class o extends t.WebContents{constructor(e,t){super(e,t,"window")}async createWindow(e){this.wire.sendAction("window-create-window",this.identity).catch((e=>{}));const t=await(0,r.promisifySubscription)(this,"fire-constructor-callback");void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&(e.autoShow=!0),(0,i.handleDeprecatedWarnings)(e);const n=this.wire.environment.createChildContent({entityType:"window",options:e}),[o]=await Promise.all([t.getValue(),n]);let s;const{success:a}=o,c=o.data,{message:d}=c;s=a?{httpResponseCode:c.httpResponseCode,apiInjected:c.apiInjected}:{message:c.message,networkErrorCode:c.networkErrorCode,stack:c.stack};const h={message:d,cbPayload:s,success:a};try{this.getWebWindow().fin.__internal_.openerSuccessCBCalled()}catch(e){}return h.success?this:Promise.reject(h)}getAllFrames(){return this.wire.sendAction("get-all-frames",this.identity).then((({payload:e})=>e.data))}getBounds(){return this.wire.sendAction("get-window-bounds",this.identity).then((({payload:e})=>e.data))}center(){return this.wire.sendAction("center-window",this.identity).then((()=>{}))}blur(){return this.wire.sendAction("blur-window",this.identity).then((()=>{}))}bringToFront(){return this.wire.sendAction("bring-window-to-front",this.identity).then((()=>{}))}animate(e,t){return this.wire.sendAction("animate-window",{transitions:e,options:t,...this.identity}).then((()=>{}))}hide(){return this.wire.sendAction("hide-window",this.identity).then((()=>{}))}close(e=!1){return this.wire.sendAction("close-window",{force:e,...this.identity}).then((()=>{Object.setPrototypeOf(this,null)}))}focusedWebViewWasChanged(){return this.wire.sendAction("focused-webview-changed",this.identity).then((()=>{}))}getNativeId(){return this.wire.sendAction("get-window-native-id",this.identity).then((({payload:e})=>e.data))}async getCurrentViews(){const{payload:e}=await this.wire.sendAction("window-get-views",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}disableFrame(){return console.warn("Function is deprecated; use disableUserMovement instead."),this.wire.sendAction("disable-window-frame",this.identity).then((()=>{}))}disableUserMovement(){return this.wire.sendAction("disable-window-frame",this.identity).then((()=>{}))}enableFrame(){return console.warn("Function is deprecated; use enableUserMovement instead."),this.wire.sendAction("enable-window-frame",this.identity).then((()=>{}))}enableUserMovement(){return this.wire.sendAction("enable-window-frame",this.identity).then((()=>{}))}flash(){return this.wire.sendAction("flash-window",this.identity).then((()=>{}))}stopFlashing(){return this.wire.sendAction("stop-flash-window",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction("get-window-info",this.identity).then((({payload:e})=>e.data))}async getLayout(e){this.wire.sendAction("window-get-layout",this.identity).catch((e=>{}));const t=await this.getOptions();if(!t.layout&&!t.layoutSnapshot)throw new Error("Window does not have a Layout");return this.fin.Platform.Layout.wrap(e??this.identity)}getOptions(){return this.wire.sendAction("get-window-options",this.identity).then((({payload:e})=>e.data))}getParentApplication(){return this.wire.sendAction("window-get-parent-application",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity))}getParentWindow(){return this.wire.sendAction("window-get-parent-window",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity)).then((e=>e.getWindow()))}async getSnapshot(e){const t={area:e,...this.identity};console.warn("Window.getSnapshot has been deprecated, please use Window.capturePage");return(await this.wire.sendAction("get-window-snapshot",t)).payload.data}getState(){return this.wire.sendAction("get-window-state",this.identity).then((({payload:e})=>e.data))}getWebWindow(){return this.wire.sendAction("window-get-web-window",this.identity).catch((e=>{})),this.wire.environment.getWebWindow(this.identity)}isMainWindow(){return this.wire.sendAction("window-is-main-window",this.identity).catch((e=>{})),this.me.uuid===this.me.name}isShowing(){return this.wire.sendAction("is-window-showing",this.identity).then((({payload:e})=>e.data))}maximize(){return this.wire.sendAction("maximize-window",this.identity).then((()=>{}))}minimize(){return this.wire.sendAction("minimize-window",this.identity).then((()=>{}))}moveBy(e,t,n){return this.wire.sendAction("move-window-by",{deltaLeft:e,deltaTop:t,positioningOptions:n,...this.identity}).then((()=>{}))}moveTo(e,t,n){return this.wire.sendAction("move-window",{left:e,top:t,positioningOptions:n,...this.identity}).then((()=>{}))}resizeBy(e,t,n,i){return this.wire.sendAction("resize-window-by",{deltaWidth:Math.floor(e),deltaHeight:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}resizeTo(e,t,n,i){return this.wire.sendAction("resize-window",{width:Math.floor(e),height:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}restore(){return this.wire.sendAction("restore-window",this.identity).then((()=>{}))}setAsForeground(){return this.wire.sendAction("set-foreground-window",this.identity).then((()=>{}))}setBounds(e,t){return this.wire.sendAction("set-window-bounds",{...e,...this.identity,positioningOptions:t}).then((()=>{}))}show(e=!1){return this.wire.sendAction("show-window",{force:e,...this.identity}).then((()=>{}))}showAt(e,t,n=!1){return this.wire.sendAction("show-at-window",{force:n,left:Math.floor(e),top:Math.floor(t),...this.identity}).then((()=>{}))}updateOptions(e){return this.wire.sendAction("update-window-options",{options:e,...this.identity}).then((()=>{}))}authenticate(e,t){return this.wire.sendAction("window-authenticate",{userName:e,password:t,...this.identity}).then((()=>{}))}async showPopupMenu(e){const{payload:t}=await this.wire.sendAction("show-popup-menu",{options:e,...this.identity});return t.data}async closePopupMenu(){return this.wire.sendAction("close-popup-menu",{...this.identity}).then((()=>{}))}async dispatchPopupResult(e){this.wire.sendAction("window-dispatch-popup-result",this.identity).catch((e=>{})),await this.wire.sendAction("dispatch-popup-result",{data:e,...this.identity})}async print(e={content:"self"}){switch(e.content){case void 0:case"self":return super.print(e);case"screenshot":return this.wire.sendAction("print-screenshot",this.identity).then((()=>{}));case"views":return this.wire.sendAction("print-views",{...this.identity,options:e}).then((()=>{}));default:return}}}return S._Window=o,S}function ie(){return te||(te=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(function(){if(ee)return _;ee=1,Object.defineProperty(_,"__esModule",{value:!0}),_._WindowModule=void 0;const e=d,t=O,n=ne();class i extends e.Base{async wrap(e){this.wire.sendAction("window-wrap").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}wrapSync(e){this.wire.sendAction("window-wrap-sync").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}create(e){return this.wire.sendAction("create-window").catch((e=>{})),new n._Window(this.wire,{uuid:this.me.uuid,name:e.name}).createWindow(e)}getCurrent(){if(this.wire.sendAction("get-current-window").catch((e=>{})),!this.wire.me.isWindow)throw new Error("You are not in a Window context");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction("get-current-window-sync").catch((e=>{})),!this.wire.me.isWindow)throw new Error("You are not in a Window context");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return _._WindowModule=i,_}(),e),n(ne(),e)}(M)),M}Q.promisifySubscription=async(e,t,n=(()=>!0),i)=>{let r,o,s;const a=new Promise(((e,t)=>{r=e,o=t})),c=e=>{n(e)&&(clearTimeout(s),r(e))};return await e.on(t,c),i&&(s=setTimeout((()=>o(new Error("event timed out"))),i)),a.finally((()=>{e.removeListener(t,c).catch((()=>null))})),{getValue:()=>a}},Object.defineProperty(c,"__esModule",{value:!0}),c.System=void 0;const re=d,oe=g,se=ie(),ae=t;class ce extends re.EmitterBase{constructor(e){super(e,"system")}sendExternalProcessRequest(e,t){return new Promise(((n,i)=>{const r="external-process-exited";let o,s,a,c;"function"==typeof t.listener&&(a=e=>{const n=e||{};s={topic:"exited",uuid:n.processUuid||"",exitCode:n.exitCode||0},o===e.processUuid&&(t.listener(s),c.removeListener(r,a))},this.wire.me.name||(this.wire.me.name=this.wire.me.uuid),c=new se._Window(this.wire,this.wire.me),c.on(r,a)),this.wire.sendAction(e,t).then((({payload:e})=>{o=e.data.uuid,n(e.data),s&&o===s.uuid&&(t.listener(s),c.removeListener(r,a))})).catch((e=>{c&&c.removeListener(r,a),i(e)}))}))}getVersion(){return this.wire.sendAction("get-version").then((({payload:e})=>e.data))}clearCache(e){return this.wire.sendAction("clear-cache",e).then((()=>{}))}deleteCacheOnExit(){return this.wire.sendAction("delete-cache-request").then((()=>{}))}exit(){return this.wire.sendAction("exit-desktop").then((()=>{}))}async fetchManifest(e){const{payload:{data:t}}=await this.wire.sendAction("fetch-manifest",{manifestUrl:e});return t}flushCookieStore(){return this.wire.sendAction("flush-cookie-store").then((()=>{}))}getAllWindows(){return this.wire.sendAction("get-all-windows").then((({payload:e})=>e.data))}getAllApplications(){return this.wire.sendAction("get-all-applications").then((({payload:e})=>e.data))}getCommandLineArguments(){return this.wire.sendAction("get-command-line-arguments").then((({payload:e})=>e.data))}async getCrashReporterState(){const{payload:{data:{diagnosticMode:e,isRunning:t}}}=await this.wire.sendAction("get-crash-reporter-state");return console.warn("diagnosticMode property is deprecated. It will be removed in a future version"),{diagnosticMode:e,diagnosticsMode:e,isRunning:t}}async startCrashReporter(e){const t=e,n={...t,diagnosticMode:t.diagnosticsMode||t.diagnosticMode},{payload:{data:{diagnosticMode:i,isRunning:r}}}=await this.wire.sendAction("start-crash-reporter",n);return{diagnosticMode:i,diagnosticsMode:i,isRunning:r}}getUniqueUserId(){return this.wire.sendAction("get-unique-user-id").then((({payload:e})=>e.data))}getEntityInfo(e,t){return this.wire.sendAction("get-entity-info",{uuid:e,name:t}).then((({payload:e})=>e.data))}getEnvironmentVariable(e){return this.wire.sendAction("get-environment-variable",{environmentVariables:e}).then((({payload:e})=>e.data))}getFocusedWindow(){return this.wire.sendAction("get-focused-window").then((({payload:e})=>e.data))}async isAppCertified(e){const{payload:{data:{certifiedInfo:t}}}=await this.wire.sendAction("is-app-certified",{manifestUrl:e});return t}getInstalledRuntimes(){return this.wire.sendAction("get-installed-runtimes").then((({payload:e})=>e.data.runtimes))}async getInstalledApps(){const{payload:{data:{installedApps:e}}}=await this.wire.sendAction("get-installed-apps");return e}getLog(e){return this.wire.sendAction("view-log",e).then((({payload:e})=>e.data))}getMachineId(){return this.wire.sendAction("get-machine-id").then((({payload:e})=>e.data))}getMinLogLevel(){return this.wire.sendAction("get-min-log-level").then((({payload:e})=>e.data))}getLogList(){return this.wire.sendAction("list-logs").then((({payload:e})=>e.data))}getMonitorInfo(){return this.wire.sendAction("get-monitor-info").then((({payload:e})=>e.data))}getMousePosition(){return this.wire.sendAction("get-mouse-position").then((({payload:e})=>e.data))}getProcessList(){return console.warn("System.getProcessList has been deprecated. Please consider using our new process APIs: Window.getProcessInfo, View.getProcessInfo, Application.getProcessInfo, System.getAllProcessInfo"),this.wire.sendAction("process-snapshot").then((({payload:e})=>e.data))}async getAllProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction("get-all-process-info",this.identity);return e}getProxySettings(){return this.wire.sendAction("get-proxy-settings").then((({payload:e})=>e.data))}getRuntimeInfo(){return this.wire.sendAction("get-runtime-info").then((({payload:e})=>e.data))}getRvmInfo(){return this.wire.sendAction("get-rvm-info").then((({payload:e})=>e.data))}getHostSpecs(){return this.wire.sendAction("get-host-specs").then((({payload:e})=>e.data))}getOSInfo(){return this.wire.sendAction("get-os-info").then((({payload:e})=>e.data))}launchExternalProcess(e){return this.sendExternalProcessRequest("launch-external-process",e)}monitorExternalProcess(e){return this.sendExternalProcessRequest("monitor-external-process",e)}log(e,t){return this.wire.sendAction("write-to-log",{level:e,message:t}).then((()=>{}))}openUrlWithBrowser(e){return this.wire.sendAction("open-url-with-browser",{url:e}).then((()=>{}))}async registerCustomProtocol(e){if("object"!=typeof e)throw new Error("Must provide an object with a `protocolName` property having a string value.");await this.wire.sendAction("register-custom-protocol",e)}async unregisterCustomProtocol(e){await this.wire.sendAction("unregister-custom-protocol",{protocolName:e})}async getCustomProtocolState(e){return this.wire.sendAction("get-custom-protocol-state",{protocolName:e}).then((({payload:e})=>e.data))}releaseExternalProcess(e){return this.wire.sendAction("release-external-process",{uuid:e}).then((()=>{}))}showDeveloperTools(e){return this.wire.sendAction("show-developer-tools",e).then((()=>{}))}terminateExternalProcess(e){return this.wire.sendAction("terminate-external-process",e).then((()=>{}))}updateProxySettings(e){return this.wire.sendAction("update-proxy",e).then((()=>{}))}async downloadAsset(e,t){const n=()=>{};let i=n,r=n;const o=new Promise(((e,t)=>{i=e,r=t}));if("openfin"!==this.wire.environment.type)throw new oe.NotSupportedError("downloadAsset only supported in an OpenFin Render process");const s=oe.RuntimeError.getCallSite(),a=this.wire.environment.getNextMessageId().toString(),c=`asset-download-progress-${a}`,d=`asset-download-error-${a}`,h=`asset-download-complete-${a}`,l=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},u=()=>{this.removeListener(c,l)};await Promise.all([this.on(c,l),this.once(d,(e=>{u();const{reason:t,err:n}=e;r(new oe.RuntimeError({reason:t,error:n},s))})),this.once(h,(()=>{u(),i()}))]);const p=Object.assign(e,{downloadId:a});return await this.wire.sendAction("download-asset",p).catch((e=>{throw u(),e})),o}downloadRuntime(e,t){const n=oe.RuntimeError.getCallSite();return new Promise(((i,r)=>{if("openfin"!==this.wire.environment.type)return void r(new oe.NotSupportedError("downloadRuntime only supported in an OpenFin Render process"));const o=this.wire.environment.getNextMessageId().toString(),s=`runtime-download-progress-${o}`,a=`runtime-download-error-${o}`,c=`runtime-download-complete-${o}`,d=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},h=()=>{this.removeListener(s,d)};this.on(s,d),this.once(a,(e=>{h();const{reason:t,err:i}=e;r(new oe.RuntimeError({reason:t,error:i},n))})),this.once(c,(()=>{h(),i()}));const l=Object.assign(e,{downloadId:o});this.wire.sendAction("download-runtime",l).catch((e=>{h(),r(e)}))}))}downloadPreloadScripts(e){return this.wire.sendAction("download-preload-scripts",{scripts:e}).then((({payload:e})=>e.data))}getAllExternalApplications(){return this.wire.sendAction("get-all-external-applications").then((({payload:e})=>e.data))}getAppAssetInfo(e){return this.wire.sendAction("get-app-asset-info",e).then((({payload:e})=>e.data))}getCookies(e){const t=this.wire.environment.getUrl(),n=Object.assign(e,{url:t});return this.wire.sendAction("get-cookies",n).then((({payload:e})=>e.data))}setMinLogLevel(e){return this.wire.sendAction("set-min-log-level",{level:e}).then((()=>{}))}resolveUuid(e){return this.wire.sendAction("resolve-uuid",{entityKey:e}).then((({payload:e})=>e.data))}executeOnRemote(e,t){return t.requestingIdentity=e,this.wire.ferryAction(t)}readRegistryValue(e,t,n){return this.wire.sendAction("read-registry-value",{rootKey:e,subkey:t,value:n}).then((({payload:e})=>e.data))}registerExternalConnection(e){return this.wire.sendAction("register-external-connection",{uuid:e}).then((({payload:e})=>e.data))}async getServiceConfiguration(e){if("string"!=typeof e.name)throw new Error("Must provide an object with a `name` property having a string value");const{name:t}=e;return this.wire.sendAction("get-service-configuration",{name:t}).then((({payload:e})=>e.data))}async getSystemAppConfig(e){if("string"!=typeof e)throw new Error("Must provide a string value for name of system app");return this.wire.sendAction("get-system-app-configuration",{name:e}).then((({payload:e})=>e.data))}async registerShutdownHandler(e){this.wire.sendAction("system-register-shutdown-handler").catch((e=>{}));const{uuid:t,name:n}=this.wire.me;this.on("system-shutdown",(i=>{e({proceed:()=>{this.wire.environment.raiseEvent("application/system-shutdown-handled",{uuid:t,name:n,topic:"application"})}})}))}runRvmHealthCheck(){return this.wire.sendAction("run-rvm-health-check").then((({payload:e})=>e.data))}async launchManifest(e,t={}){const{subscribe:n,...i}=t,r=i;if(n){const e=new ae.EventEmitter;n(e);const t="app-version-progress",i="runtime-status",o="app-version-complete",s="app-version-error",a=this.wire.environment.getNextMessageId().toString();r.appVersionId=a;const c=[o,t,i,s],d=e=>{const{appVersionId:t,topic:n,type:i,...r}=e;return{...r,type:c.find((e=>i.includes(e)))}},h=t=>{const n=d(t);e.emit(n.type,n)},l=()=>{this.removeListener(`${t}.${a}`,h),this.removeListener(`${i}.${a}`,h),this.removeListener(`${o}.${a}`,h),this.removeListener(`${s}.${a}`,h),this.removeListener(`${o}.${a}`,l),this.removeListener(`${s}.${a}`,l)};await Promise.all([this.on(`${t}.${a}`,h),this.on(`${i}.${a}`,h),this.once(`${o}.${a}`,h),this.once(`${s}.${a}`,h),this.once(`${o}.${a}`,l),this.once(`${s}.${a}`,l)])}return(await this.wire.sendAction("launch-manifest",{manifestUrl:e,opts:r})).payload.data.manifest}async queryPermissionForCurrentContext(e){const t={uuid:this.wire.me.uuid,name:this.wire.me.name};return(await this.wire.sendAction("query-permission-for-current-context",{apiName:e,identity:t})).payload.data}async enableNativeWindowIntegrationProvider(e){const{payload:t}=await this.wire.sendAction("enable-native-window-integration-provider",{permissions:e});return t.data}async registerUsage({data:e,type:t}){await this.wire.sendAction("register-usage",{data:e,type:t})}async getPrinters(){const{payload:e}=await this.wire.sendAction("system-get-printers");return e.data}async updateProcessLoggingOptions(e){await this.wire.sendAction("system-update-process-logging-options",{options:e})}async getDomainSettings(){const{payload:{data:e}}=await this.wire.sendAction("get-domain-settings",this.identity);return e}async setDomainSettings(e){await this.wire.sendAction("set-domain-settings",{domainSettings:e,...this.identity})}async refreshExtensions(){const{payload:e}=await this.wire.sendAction("refresh-extensions");return e.data}async getInstalledExtensions(){const{payload:e}=await this.wire.sendAction("get-installed-extensions");return e.data}}c.System=ce;var de={},he={};Object.defineProperty(he,"__esModule",{value:!0}),he.RefCounter=void 0;he.RefCounter=class{constructor(){this.topicRefMap=new Map}incRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t+1;n=i,this.topicRefMap.set(e,i)}else this.topicRefMap.set(e,1),n=1;return n}decRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t-1;this.topicRefMap.set(e,i),n=i}else n=-1;return n}actOnFirst(e,t,n){return 1===this.incRefCount(e)?t():n()}actOnLast(e,t,n){return 0===this.decRefCount(e)?t():n()}};var le={},ue={},pe={};Object.defineProperty(pe,"__esModule",{value:!0}),pe.ChannelBase=pe.ProtectedItems=void 0;const we=e=>async(t,n,i)=>{const r=await e(t,n,i);return void 0===r?n:r};pe.ProtectedItems=class{constructor(e,t){this.providerIdentity=e,this.close=t}};class ye{static defaultAction(e){throw new Error(`No action registered at target for ${e}`)}constructor(){this.subscriptions=new Map}async processAction(e,t,n){try{const i=this.subscriptions.has(e)?this.subscriptions.get(e):(t,n)=>(this.defaultAction??ye.defaultAction)(e,t,n),r=this.preAction?await this.preAction(e,t,n):t,o=await i(r,n);return this.postAction?await this.postAction(e,o,n):o}catch(t){if(this.errorMiddleware)return this.errorMiddleware(e,t,n);throw t}}beforeAction(e){if(this.preAction)throw new Error("Already registered beforeAction middleware");this.preAction=we(e)}onError(e){if(this.errorMiddleware)throw new Error("Already registered error middleware");this.errorMiddleware=e}afterAction(e){if(this.postAction)throw new Error("Already registered afterAction middleware");this.postAction=we(e)}remove(e){this.subscriptions.delete(e)}setDefaultAction(e){if(this.defaultAction)throw new Error("default action can only be set once");this.defaultAction=e}register(e,t){if(this.subscriptions.has(e))throw new Error(`Subscription already registered for action: ${e}. Unsubscribe before adding new subscription`);return this.subscriptions.set(e,t),!0}}pe.ChannelBase=ye;var fe,ge,me,ve=s&&s.__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)},Ce=s&&s.__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};Object.defineProperty(ue,"__esModule",{value:!0}),ue.ChannelClient=void 0;const be=pe,Ie=new Map;class Ee extends be.ChannelBase{static closeChannelByEndpointId(e){const t=Ie.get(e);t&&ve(t,me,"f").call(t)}static handleProviderDisconnect(e){for(const t of Ie.values())t.providerIdentity.channelId===e.channelId&&(t.disconnectListener(e),ve(t,me,"f").call(t))}constructor(e,t,n){super(),fe.set(this,void 0),ge.set(this,void 0),this.processAction=(e,t,n)=>super.processAction(e,t,n),me.set(this,(()=>{Ie.delete(this.endpointId),ve(this,ge,"f").close()})),Ce(this,fe,new be.ProtectedItems(e,t),"f"),this.disconnectListener=()=>{},this.endpointId=e.endpointId,Ce(this,ge,n,"f"),Ie.set(this.endpointId,this),n.receive(this.processAction)}get providerIdentity(){return ve(this,fe,"f").providerIdentity}async dispatch(e,t){if(ve(this,ge,"f").isEndpointConnected(this.providerIdentity.channelId))return ve(this,ge,"f").send(this.providerIdentity.channelId,e,t);throw new Error("The client you are trying to dispatch from is disconnected from the target provider.")}onDisconnection(e){this.disconnectListener=t=>{try{e(t)}catch(e){throw new Error(`Error while calling the onDisconnection callback: ${e.message}`)}finally{this.disconnectListener=()=>{}}}}async disconnect(){await this.sendDisconnectAction(),ve(this,me,"f").call(this)}async sendDisconnectAction(){const e=ve(this,fe,"f");await e.close()}static async wireClose(e,t,n){const{channelName:i,uuid:r,name:o}=t;await e.sendAction("disconnect-from-channel",{channelName:i,uuid:r,name:o,endpointId:n})}}ue.ChannelClient=Ee,fe=new WeakMap,ge=new WeakMap,me=new WeakMap;var xe={},Ae={};Object.defineProperty(Ae,"__esModule",{value:!0}),Ae.exhaustiveCheck=void 0,Ae.exhaustiveCheck=function(e,t){throw new Error(`Unsupported value: ${e}${t?`\n Supported values are: ${t.join("")}`:""}`)};var Pe,Me,_e,Oe={},Se=s&&s.__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},Re=s&&s.__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)};Object.defineProperty(Oe,"__esModule",{value:!0}),Oe.ClassicInfo=Oe.ClassicStrategy=void 0;Oe.ClassicStrategy=class{constructor(e,t,n,i){this.messageReceiver=t,this.endpointId=n,this.providerIdentity=i,Pe.set(this,void 0),Me.set(this,new Map),_e.set(this,new Map),this.send=async(e,t,n)=>{const i=Re(this,Me,"f").get(e);if(!i)throw new Error(`Could not locate routing info for endpoint ${e}`);const r={...i};r.isLocalEndpointId&&delete r.endpointId,delete r.isLocalEndpointId;const o=Re(this,Pe,"f").sendAction("send-channel-message",{...r,providerIdentity:this.providerIdentity,action:t,payload:n});Re(this,_e,"f").get(e)?.add(o);return(await o.catch((e=>{throw new Error(e.message)})).finally((()=>{Re(this,_e,"f").get(e)?.delete(o)}))).payload.data.result},this.close=async()=>{this.messageReceiver.removeEndpoint(this.providerIdentity.channelId,this.endpointId),[...Re(this,Me,"f").keys()].forEach((e=>this.closeEndpoint(e))),Se(this,Me,new Map,"f")},Se(this,Pe,e,"f")}onEndpointDisconnect(e,t){}receive(e){this.messageReceiver.addEndpoint(e,this.providerIdentity.channelId,this.endpointId)}async closeEndpoint(e){const t=Re(this,Me,"f").get(e);Re(this,Me,"f").delete(e);const n=Re(this,_e,"f").get(e);n?.forEach((n=>{const i=`Channel connection with identity uuid: ${t?.uuid} / name: ${t?.name} / endpointId: ${e} no longer connected.`;n.cancel(new Error(i))}))}isEndpointConnected(e){return Re(this,Me,"f").has(e)}addEndpoint(e,t){Re(this,Me,"f").set(e,t.endpointIdentity),Re(this,_e,"f").set(e,new Set)}isValidEndpointPayload(e){return"string"==typeof e?.endpointIdentity?.endpointId||"string"==typeof e?.endpointIdentity?.channelId}},Pe=new WeakMap,Me=new WeakMap,_e=new WeakMap,Oe.ClassicInfo={version:5,minimumVersion:0,type:"classic"};var Fe={},je={},ke={};Object.defineProperty(ke,"__esModule",{value:!0}),ke.errorToPOJO=void 0,ke.errorToPOJO=function(e){return{stack:e.stack,name:e.name,message:e.message,toString:()=>e.stack||e.toString()}};var Le,Te,$e=s&&s.__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)},Be=s&&s.__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};Object.defineProperty(je,"__esModule",{value:!0}),je.RTCEndpoint=void 0;const Ge=ke;je.RTCEndpoint=class{static isValidEndpointPayload(e){const t=e=>"object"==typeof e&&null!==e;return t(e)&&t(e.endpointIdentity)&&t(e.rtc)&&"string"==typeof e.endpointIdentity.endpointId}constructor({rtc:e,endpointIdentity:t}){this.responseMap=new Map,Le.set(this,null),Te.set(this,void 0),this.connectionStateChangeHandler=e=>{"connected"!==this.rtc.rtcClient.connectionState&&(this.rtc.rtcClient.removeEventListener("connectionstatechange",this.connectionStateChangeHandler),this.close(),$e(this,Te,"f")&&$e(this,Te,"f").call(this))},this.send=async(e,t)=>{const n=`message-${Math.random()}`,i=new Promise(((e,t)=>{this.responseMap.set(n,{resolve:e,reject:t})}));return this.rtc.channels.request.send(JSON.stringify({action:e,payload:t,messageId:n})),i},this.close=()=>{this.responseMap.forEach((e=>e.reject("Connection has closed."))),this.responseMap=new Map,this.rtc.channels.request.close(),this.rtc.channels.response.close(),this.rtc.rtcClient.close()},this.rtc=e,this.endpointIdentity=t,this.rtc.channels.response.addEventListener("message",(e=>{let{data:t}=e;e.data instanceof ArrayBuffer&&(t=(new TextDecoder).decode(e.data));const{messageId:n,payload:i,success:r,error:o}=JSON.parse(t),{resolve:s,reject:a}=this.responseMap.get(n)??{};s&&a?(this.responseMap.delete(n),r?s(i):a(o)):(console.log("Could not find id in responseMap."),console.log(e))})),this.rtc.channels.request.addEventListener("message",(async e=>{let{data:n}=e;e.data instanceof ArrayBuffer&&(n=(new TextDecoder).decode(e.data));const{messageId:i,action:r,payload:o}=JSON.parse(n);if($e(this,Le,"f"))try{const e=await $e(this,Le,"f").call(this,r,o,t);this.rtc.channels.response.send(JSON.stringify({messageId:i,payload:e,success:!0}))}catch(e){"open"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,error:(0,Ge.errorToPOJO)(e),success:!1}))}else"open"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,success:!1,error:"Connection not ready."}))})),this.rtc.rtcClient.addEventListener("connectionstatechange",this.connectionStateChangeHandler),Object.values(this.rtc.channels).forEach((e=>{e.onclose=e=>{[...this.responseMap.values()].forEach((e=>e.reject(new Error("RTCDataChannel closed unexpectedly, this is most commonly caused by message size. Note: RTC Channels have a message size limit of ~255kB.")))),this.close(),$e(this,Te,"f")&&$e(this,Te,"f").call(this)}}))}onDisconnect(e){if($e(this,Te,"f"))throw new Error("RTCEndpoint disconnectListener cannot be set twice.");Be(this,Te,e,"f")}receive(e){if($e(this,Le,"f"))throw new Error("You have already set a listener for this RTC Endpoint.");Be(this,Le,e,"f")}get connected(){return"connected"===this.rtc.rtcClient.connectionState}},Le=new WeakMap,Te=new WeakMap;var We,He,Ne,De={},Ue=s&&s.__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)},Ve=s&&s.__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};Object.defineProperty(De,"__esModule",{value:!0}),De.EndpointStrategy=void 0;De.EndpointStrategy=class{constructor(e,t,n){this.EndpointType=e,this.StrategyName=n,We.set(this,null),He.set(this,new Map),Ne.set(this,!0),this.send=async(e,t,n)=>this.getEndpointById(e).send(t,n),this.close=async()=>{Ue(this,Ne,"f")&&(Ue(this,He,"f").forEach((e=>e.close())),Ve(this,He,new Map,"f")),Ve(this,Ne,!1,"f")},this.isValidEndpointPayload=t}onEndpointDisconnect(e,t){this.getEndpointById(e).onDisconnect(t)}receive(e){if(Ue(this,We,"f"))throw new Error(`You have already set a listener for this ${this.StrategyName} Strategy`);Ve(this,We,e,"f"),Ue(this,He,"f").forEach((e=>e.receive(Ue(this,We,"f"))))}getEndpointById(e){const t=Ue(this,He,"f").get(e);if(!t)throw new Error(`Client with endpoint id ${e} is not connected`);return t}get connected(){return Ue(this,Ne,"f")}isEndpointConnected(e){return Ue(this,He,"f").has(e)}addEndpoint(e,t){if(!Ue(this,Ne,"f"))return void console.warn(`Adding endpoint to disconnected ${this.StrategyName} Strategy`);const n=new this.EndpointType(t);Ue(this,We,"f")&&n.receive(Ue(this,We,"f")),Ue(this,He,"f").set(e,n)}async closeEndpoint(e){Ue(this,He,"f").delete(e)}},We=new WeakMap,He=new WeakMap,Ne=new WeakMap,Object.defineProperty(Fe,"__esModule",{value:!0}),Fe.RTCInfo=Fe.RTCStrategy=void 0;const ze=je,Ke=De;class qe extends Ke.EndpointStrategy{constructor(){super(ze.RTCEndpoint,ze.RTCEndpoint.isValidEndpointPayload,"RTC")}}Fe.RTCStrategy=qe,Fe.RTCInfo={version:2,minimumVersion:0,type:"rtc"};var Je={};Object.defineProperty(Je,"__esModule",{value:!0}),Je.RTCICEManager=void 0;const Ye=d;class Ze extends Ye.EmitterBase{constructor(e){super(e,"channel"),this.ensureChannelOpened=e=>new Promise(((t,n)=>{if("open"===e.readyState)t();else if("connecting"===e.readyState){const n=()=>{e.removeEventListener("open",n),t()};e.addEventListener("open",n)}else n(new Error("This Channel has already closed"))}))}static createDataChannelPromise(e,t){let n;const i=new Promise((e=>{n=e})),r=i=>{const o=()=>{i.channel.removeEventListener("open",o),n(i.channel)};i.channel.label===e&&(i.channel.addEventListener("open",o),t.removeEventListener("datachannel",r))};return t.addEventListener("datachannel",r),i}async listenForProviderIce(e,t){await this.on(this.createProviderEventName(e),t,{timestamp:Date.now()})}async raiseProviderIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createProviderEventName(e)),t)}async listenForClientIce(e,t){await this.on(this.createClientEventName(e),t,{timestamp:Date.now()})}async raiseClientIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createClientEventName(e)),t)}cleanupIceListeners(e){this.removeAllListeners(this.createClientEventName(e)),this.removeAllListeners(this.createProviderEventName(e))}createClientEventName(e){return`ice-client-${e}`}createProviderEventName(e){return`ice-provider-${e}`}createRouteString(e){return`channel/${e}`}createRtcPeer(){return this.wire.environment.getRtcPeer()}async startClientOffer(){const e=Math.random().toString(),t=this.createRtcPeer();t.addEventListener("icecandidate",(async t=>{t.candidate&&await this.raiseClientIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForProviderIce(e,(async e=>{await t.addIceCandidate(e.candidate)}));const n={request:t.createDataChannel("request"),response:t.createDataChannel("response")},i=await t.createOffer();await t.setLocalDescription(i);const r=Promise.all([n.request,n.response].map(this.ensureChannelOpened)).then((()=>{}));return{rtcClient:t,channels:n,offer:i,rtcConnectionId:e,channelsOpened:r}}async finishClientOffer(e,t,n){return await e.setRemoteDescription(t),await n,!0}async createProviderAnswer(e,t){const n=this.createRtcPeer(),i=Ze.createDataChannelPromise("request",n),r=Ze.createDataChannelPromise("response",n);n.addEventListener("icecandidate",(async t=>{t.candidate&&await this.raiseProviderIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForClientIce(e,(async e=>{await n.addIceCandidate(e.candidate)})),await n.setRemoteDescription(t);const o=await n.createAnswer();await n.setLocalDescription(o);const s=Promise.all([i,r]).then((([t,n])=>(this.cleanupIceListeners(e),{request:t,response:n})));return{rtcClient:n,answer:o,channels:s}}}Je.RTCICEManager=Ze;var Qe={},Xe={};function et(e){return[...e.split(".").reverse().entries()].reduce(((e,[t,n])=>e+ +n*1e4**t),0)}function tt(e,t){return et(e)>=et(t)}function nt(e){return e.split("/")[0]}Object.defineProperty(Xe,"__esModule",{value:!0}),Xe.runtimeUuidMeetsMinimumRuntimeVersion=Xe.parseRuntimeUuid=Xe.meetsMinimumRuntimeVersion=void 0,Xe.meetsMinimumRuntimeVersion=tt,Xe.parseRuntimeUuid=nt,Xe.runtimeUuidMeetsMinimumRuntimeVersion=function(e,t){return tt(nt(e),t)};var it,rt,ot,st,at,ct=s&&s.__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)},dt=s&&s.__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};Object.defineProperty(Qe,"__esModule",{value:!0}),Qe.ChannelProvider=void 0;const ht=pe,lt=Xe;class ut extends ht.ChannelBase{get connections(){return[...ct(this,it,"f")]}static handleClientDisconnection(e,t){const n=e.connections.find((e=>e.endpointId===t.endpointId));if(n)ct(e,st,"f").call(e,n);else{e.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name)).forEach(ct(e,st,"f"))}e.disconnectListener(t)}static setProviderRemoval(e,t){ut.removalMap.set(e,t)}constructor(e,t,n){super(),it.set(this,void 0),rt.set(this,void 0),ot.set(this,void 0),st.set(this,(e=>{const t=this.connections.filter((t=>t.endpointId!==e.endpointId));ct(this,ot,"f").closeEndpoint(e.endpointId),dt(this,it,t,"f")})),this.processAction=async(e,t,n)=>(ut.clientIsMultiRuntime(n)&&!(0,lt.runtimeUuidMeetsMinimumRuntimeVersion)(n.runtimeUuid,"18.87.56.0")?this.handleMultiRuntimeLegacyClient(n):this.checkForClientConnection(n),super.processAction(e,t,n)),at.set(this,(()=>{ct(this,ot,"f").close();const e=ut.removalMap.get(this);e&&e()})),dt(this,rt,new ht.ProtectedItems(e,t),"f"),this.connectListener=()=>{},this.disconnectListener=()=>{},dt(this,it,[],"f"),dt(this,ot,n,"f"),n.receive(this.processAction)}dispatch(e,t,n){const i=e.endpointId??this.getEndpointIdForOpenFinId(e,t);return i&&ct(this,ot,"f").isEndpointConnected(i)?ct(this,ot,"f").send(i,t,n):Promise.reject(new Error(`Client connection with identity uuid: ${e.uuid} / name: ${e.name} / endpointId: ${i} no longer connected.`))}async processConnection(e,t){return ct(this,it,"f").push(e),this.connectListener(e,t)}publish(e,t){return this.connections.map((n=>ct(this,ot,"f").send(n.endpointId,e,t)))}onConnection(e){this.connectListener=e}onDisconnection(e){this.disconnectListener=e}async destroy(){const e=ct(this,rt,"f");e.providerIdentity,dt(this,it,[],"f"),await e.close(),ct(this,at,"f").call(this)}async getAllClientInfo(){return this.connections.map((e=>{const{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}=e;return{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}}))}checkForClientConnection(e){if(!this.isClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider.\n Client Identity: {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}isClientConnected(e){return ut.clientIdentityIncludesEndpointId(e)?this.connections.some((t=>t.endpointId===e.endpointId&&t.uuid===e.uuid&&t.name===e.name)):this.isLegacyClientConnected(e)}isLegacyClientConnected(e){return this.connections.some((t=>t.uuid===e.uuid&&t.name===e.name))}handleMultiRuntimeLegacyClient(e){if(!this.isLegacyClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider. Client Identity:\n {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}getEndpointIdForOpenFinId(e,t){const n=this.connections.filter((t=>t.name===e.name&&t.uuid===e.uuid));if(n.length>=2){const n=ct(this,rt,"f"),{uuid:i,name:r}=e,o=n?.providerIdentity.uuid,s=n?.providerIdentity.name;console.warn(`WARNING: Dispatch call may have unintended results. The "to" argument of your dispatch call is missing the\n "endpointId" parameter. The identity you are dispatching to ({uuid: ${i}, name: ${r}})\n has multiple channelClients for this channel. Your dispatched action: (${t}) from the provider:\n ({uuid: ${o}, name: ${s}}) will only be processed by the most recently-created client.`)}return n.pop()?.endpointId}static clientIdentityIncludesEndpointId(e){return void 0!==e.endpointId}static clientIsMultiRuntime(e){return void 0!==e.runtimeUuid}static async wireClose(e,t){await e.sendAction("destroy-channel",{channelName:t})}}Qe.ChannelProvider=ut,it=new WeakMap,rt=new WeakMap,ot=new WeakMap,st=new WeakMap,at=new WeakMap,ut.removalMap=new WeakMap;var pt={};Object.defineProperty(pt,"__esModule",{value:!0}),pt.MessageReceiver=void 0;const wt=ue,yt=d;class ft extends yt.Base{constructor(e){super(e),this.onmessage=e=>"process-channel-message"===e.action&&(this.processChannelMessage(e),!0),this.endpointMap=new Map,this.latestEndpointIdByChannelId=new Map,e.registerMessageHandler(this.onmessage.bind(this))}async processChannelMessage(e){const{senderIdentity:t,providerIdentity:n,action:i,ackToSender:r,payload:o,intendedTargetIdentity:s}=e.payload,a=s.channelId??s.endpointId??this.latestEndpointIdByChannelId.get(n.channelId),c=this.endpointMap.get(a);if(!c)return r.payload.success=!1,r.payload.reason=`Client connection with identity uuid: ${this.wire.me.uuid} / name: ${this.wire.me.name} / endpointId: ${a} no longer connected.`,this.wire.sendRaw(r);try{const e=await c(i,o,t);return r.payload.payload=r.payload.payload||{},r.payload.payload.result=e,this.wire.sendRaw(r)}catch(e){return r.payload.success=!1,r.payload.reason=e.message,this.wire.sendRaw(r)}}addEndpoint(e,t,n){this.endpointMap.set(n,e),t!==n&&this.latestEndpointIdByChannelId.set(t,n)}removeEndpoint(e,t){this.endpointMap.delete(t),this.latestEndpointIdByChannelId.get(e)===t&&this.latestEndpointIdByChannelId.delete(e)}checkForPreviousClientConnection(e){const t=this.latestEndpointIdByChannelId.get(e);t&&(wt.ChannelClient.closeChannelByEndpointId(t),console.warn("You have created a second connection to an older provider. First connection has been removed from the clientMap"),console.warn("If the provider calls publish(), you may receive multiple messages."))}}pt.MessageReceiver=ft;var gt={};Object.defineProperty(gt,"__esModule",{value:!0}),gt.ProtocolManager=void 0;gt.ProtocolManager=class{constructor(e){this.ProtocolsInPreferenceOrder=e,this.DefaultClientProtocols=["classic"],this.DefaultProviderProtocols=["classic"],this.getClientProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultClientProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(", ")}.`);return t},this.getProviderProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultProviderProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(", ")}.`);return t},this.getCompatibleProtocols=(e,t)=>t.supportedProtocols.filter((t=>e.some((e=>e.type===t.type&&t.version>=e.minimumVersion&&e.version>=(t.minimumVersion??0))))).slice(0,t.maxProtocols)}};var mt={};Object.defineProperty(mt,"__esModule",{value:!0});class vt{static combine(e,t){return new vt(e,t)}constructor(e,t){this.primary=e,this.secondary=t}onEndpointDisconnect(e,t){this.primary.onEndpointDisconnect(e,(()=>{this.secondary.isEndpointConnected(e)||t()})),this.secondary.onEndpointDisconnect(e,(()=>{this.primary.isEndpointConnected(e)||t()}))}isValidEndpointPayload(e){return this.primary.isValidEndpointPayload(e)||this.secondary.isValidEndpointPayload(e)}async closeEndpoint(e){await this.primary.closeEndpoint(e),await this.secondary.closeEndpoint(e)}isEndpointConnected(e){return this.primary.isEndpointConnected(e)||this.secondary.isEndpointConnected(e)}async addEndpoint(e,t){this.primary.isValidEndpointPayload(t)&&await this.primary.addEndpoint(e,t),this.secondary.isValidEndpointPayload(t)&&await this.secondary.addEndpoint(e,t)}receive(e){this.primary.receive(e),this.secondary.receive(e)}send(e,t,n){return this.primary.isEndpointConnected(e)?this.primary.send(e,t,n):this.secondary.send(e,t,n)}async close(){await Promise.all([this.primary.close(),this.secondary.close()])}}mt.default=vt;var Ct,bt,It=s&&s.__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},Et=s&&s.__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)},xt=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(xe,"__esModule",{value:!0}),xe.ConnectionManager=void 0;const At=Ae,Pt=d,Mt=Oe,_t=Fe,Ot=Je,St=Qe,Rt=pt,Ft=gt,jt=xt(mt);class kt extends Pt.Base{static getProtocolOptionsFromStrings(e){return e.map((e=>{switch(e){case"rtc":return _t.RTCInfo;case"classic":return Mt.ClassicInfo;default:return(0,At.exhaustiveCheck)(e,["rtc","classic"])}}))}constructor(e){super(e),Ct.set(this,void 0),bt.set(this,void 0),this.removeChannelFromProviderMap=e=>{this.providerMap.delete(e)},this.onmessage=e=>"process-channel-connection"===e.action&&(this.processChannelConnection(e),!0),this.providerMap=new Map,this.protocolManager=new Ft.ProtocolManager("node"===this.wire.environment.type?["classic"]:["rtc","classic"]),It(this,Ct,new Rt.MessageReceiver(e),"f"),It(this,bt,new Ot.RTCICEManager(e),"f"),e.registerMessageHandler(this.onmessage.bind(this))}createProvider(e,t){const n=Object.assign(this.wire.environment.getDefaultChannelOptions().create,e||{}),i=this.protocolManager.getProviderProtocols(n?.protocols),r=i.map((e=>{switch(e){case"rtc":return new _t.RTCStrategy;case"classic":return new Mt.ClassicStrategy(this.wire,Et(this,Ct,"f"),t.channelId,t);default:return(0,At.exhaustiveCheck)(e,["rtc","classic"])}}));let o;if(2===r.length){const[e,t]=r;o=jt.default.combine(e,t)}else{if(1!==r.length)throw new Error("failed to combine strategies");[o]=r}const s=new St.ChannelProvider(t,(()=>St.ChannelProvider.wireClose(this.wire,t.channelName)),o),a=t.channelId;return this.providerMap.set(a,{provider:s,strategy:o,supportedProtocols:kt.getProtocolOptionsFromStrings(i)}),St.ChannelProvider.setProviderRemoval(s,this.removeChannelFromProviderMap.bind(this)),s}async createClientOffer(e){const t=this.protocolManager.getClientProtocols(e?.protocols);let n;return{offer:{supportedProtocols:await Promise.all(t.map((async e=>{switch(e){case"rtc":{const{rtcClient:e,channels:t,offer:i,rtcConnectionId:r,channelsOpened:o}=await Et(this,bt,"f").startClientOffer();return n={rtcClient:e,channels:t,channelsOpened:o},{type:"rtc",version:_t.RTCInfo.version,payload:{offer:i,rtcConnectionId:r}}}case"classic":return{type:"classic",version:Mt.ClassicInfo.version};default:return(0,At.exhaustiveCheck)(e,["rtc","classic"])}}))),maxProtocols:2},rtc:n}}async createClientStrategy(e,t){t.endpointId||(t.endpointId=this.wire.environment.getNextMessageId(),Et(this,Ct,"f").checkForPreviousClientConnection(t.channelId));const n=t.answer??{supportedProtocols:[{type:"classic",version:1}]},i=(await Promise.all(n.supportedProtocols.map((async n=>"rtc"===n.type&&e?(await Et(this,bt,"f").finishClientOffer(e.rtcClient,n.payload.answer,e.channelsOpened),new _t.RTCStrategy):"classic"===n.type?new Mt.ClassicStrategy(this.wire,Et(this,Ct,"f"),t.endpointId,t):null)))).filter((e=>null!==e));let r;if(e&&!i.some((e=>e instanceof _t.RTCStrategy))&&e&&e.rtcClient.close(),i.length>=2)r=jt.default.combine(i[0],i[1]);else{if(!i.length)throw new Error("No compatible protocols");[r]=i}const o={endpointIdentity:t,rtc:e};return r.addEndpoint(t.channelId,o),r}async processChannelConnection(e){const{clientIdentity:t,providerIdentity:n,ackToSender:i,payload:r,offer:o}=e.payload;t.endpointId?t.isLocalEndpointId=!1:(t.endpointId=this.wire.environment.getNextMessageId(),t.isLocalEndpointId=!0);const s=n.channelId,a=this.providerMap.get(s);if(!a)return i.payload.success=!1,i.payload.reason=`Channel "${n.channelName}" has been destroyed.`,this.wire.sendRaw(i);const{provider:c,strategy:d,supportedProtocols:h}=a;try{if(!(c instanceof St.ChannelProvider))throw Error("Cannot connect to a channel client");const e=o??{supportedProtocols:[{type:"classic",version:1}],maxProtocols:1},n=this.protocolManager.getCompatibleProtocols(h,e);if(!n.length)throw new Error("This provider does not support any of the offered protocols.");const s=await c.processConnection(t,r);i.payload.payload=i.payload.payload||{};let a={supportedProtocols:[],endpointPayloadPromise:Promise.resolve({endpointIdentity:t})};return a=await n.reduce((async(e,t)=>{const n=await e;if("rtc"===t.type){const{answer:e,rtcClient:i,channels:r}=await Et(this,bt,"f").createProviderAnswer(t.payload.rtcConnectionId,t.payload.offer);n.supportedProtocols.push({type:"rtc",version:_t.RTCInfo.version,payload:{answer:e}}),n.endpointPayloadPromise=n.endpointPayloadPromise.then((e=>r.then((t=>({...e,rtc:{rtcClient:i,channels:t}})))))}else n.supportedProtocols.push({type:"classic",version:Mt.ClassicInfo.version});return n}),Promise.resolve(a)),a.endpointPayloadPromise.then((e=>d.addEndpoint(t.endpointId,e))),i.payload.payload.result=s,i.payload.payload.answer=a,this.wire.sendRaw(i)}catch(e){return i.payload.success=!1,i.payload.reason=e.message,this.wire.sendRaw(i)}}}xe.ConnectionManager=kt,Ct=new WeakMap,bt=new WeakMap;var Lt,Tt,$t,Bt=s&&s.__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},Gt=s&&s.__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)};Object.defineProperty(le,"__esModule",{value:!0}),le.Channel=void 0;const Wt=t,Ht=G,Nt=d,Dt=ue,Ut=xe,Vt=Qe;function zt(e){const t=Math.floor(e/10),n=Math.min(3e4,500*2**t);return new Promise((e=>{setTimeout((()=>{e(!1)}),n)}))}class Kt extends Nt.EmitterBase{constructor(e){super(e,"channel"),Lt.set(this,void 0),Tt.set(this,new Wt.EventEmitter),$t.set(this,new Ht.AsyncRetryableLazy((async()=>{await Promise.all([this.on("disconnected",(e=>{Dt.ChannelClient.handleProviderDisconnect(e)})),this.on("connected",((...e)=>{Gt(this,Tt,"f").emit("connected",...e)}))]).catch((()=>new Error("error setting up channel connection listeners")))}))),Bt(this,Lt,new Ut.ConnectionManager(e),"f")}async getAllChannels(){return this.wire.sendAction("get-all-channels").then((({payload:e})=>e.data))}async onChannelConnect(e){await this.on("connected",e)}async onChannelDisconnect(e){await this.on("disconnected",e)}async safeConnect(e,t,n){const i={count:0};do{let r=()=>{};const o=new Promise((t=>{r=n=>{e===n.channelName&&t(!0)},Gt(this,Tt,"f").on("connected",r)}));try{if(i.count>0){i.gotConnectedEvent=await Promise.race([zt(i.count),o]);const t=await this.wire.sendAction("connect-to-channel",{...n,retryInfo:i});return console.log(`Successfully connected to channelName: ${e}`),t.payload.data}const t=this.wire.sendAction("connect-to-channel",n);i.originalMessageId=t.messageId;return(await t).payload.data}catch(n){if(!n.message.includes("internal-nack"))throw n;t&&0===i.count&&console.warn(`No channel found for channelName: ${e}. Waiting for connection...`)}finally{i.count+=1,Gt(this,Tt,"f").removeListener("connected",r)}}while(t);throw new Error(`No channel found for channelName: ${e}.`)}async connect(e,t={}){if(await Gt(this,$t,"f").getValue(),!e||"string"!=typeof e)throw new Error("Please provide a channelName string to connect to a channel.");const n={wait:!0,...this.wire.environment.getDefaultChannelOptions().connect,...t},{offer:i,rtc:r}=await Gt(this,Lt,"f").createClientOffer(n);let o;(this.fin.me.isFrame||this.fin.me.isView||this.fin.me.isWindow)&&(o=(await this.fin.me.getInfo()).url);const s={channelName:e,...n,offer:i,connectionUrl:o},a=await this.safeConnect(e,n.wait,s),c=await Gt(this,Lt,"f").createClientStrategy(r,a),d=new Dt.ChannelClient(a,(()=>Dt.ChannelClient.wireClose(this.wire,a,a.endpointId)),c);return c.onEndpointDisconnect(a.channelId,(async()=>{try{await d.sendDisconnectAction()}catch(e){console.warn(`Something went wrong during disconnect for client with uuid: ${a.uuid} / name: ${a.name} / endpointId: ${a.endpointId}.`)}finally{Dt.ChannelClient.handleProviderDisconnect(a)}})),d}async create(e,t){if(!e)throw new Error("Please provide a channelName to create a channel");const{payload:{data:n}}=await this.wire.sendAction("create-channel",{channelName:e}),i=Gt(this,Lt,"f").createProvider(t,n);return this.on("client-disconnected",(t=>{t.channelName===e&&Vt.ChannelProvider.handleClientDisconnection(i,t)})),i}}le.Channel=Kt,Lt=new WeakMap,Tt=new WeakMap,$t=new WeakMap,Object.defineProperty(de,"__esModule",{value:!0}),de.InterAppPayload=de.InterApplicationBus=void 0;const qt=t,Jt=d,Yt=he,Zt=le,Qt=O;class Xt extends Jt.Base{constructor(e){super(e),this.events={subscriberAdded:"subscriber-added",subscriberRemoved:"subscriber-removed"},this.refCounter=new Yt.RefCounter,this.Channel=new Zt.Channel(e),this.emitter=new qt.EventEmitter,e.registerMessageHandler(this.onmessage.bind(this)),this.on=this.emitter.on.bind(this.emitter),this.removeAllListeners=this.emitter.removeAllListeners.bind(this.emitter)}async publish(e,t){await this.wire.sendAction("publish-message",{topic:e,message:t,sourceWindowName:this.me.name})}async send(e,t,n){const i=(0,Qt.validateIdentity)(e);if(i)throw new Error(i);await this.wire.sendAction("send-message",{destinationUuid:e.uuid,destinationWindowName:e.name,topic:t,message:n,sourceWindowName:this.me.name})}subscribe(e,t,n){const i=this.createSubscriptionKey(e.uuid,e.name||"*",t);return this.emitter.on(i,n),this.refCounter.actOnFirst(i,(async()=>{await this.wire.sendAction("subscribe",{sourceUuid:e.uuid,sourceWindowName:e.name||"*",topic:t,destinationWindowName:this.me.name})}),(()=>Promise.resolve()))}unsubscribe(e,t,n){const i=e.name||"*",r=this.createSubscriptionKey(e.uuid,i,t);return this.emitter.removeListener(r,n),this.refCounter.actOnLast(r,(async()=>{await this.wire.sendAction("unsubscribe",{sourceUuid:e.uuid,sourceWindowName:i,topic:t,destinationWindowName:this.me.name})}),(()=>new Promise((e=>e)).then((()=>{}))))}processMessage(e){const{payload:{message:t,sourceWindowName:n,sourceUuid:i,topic:r}}=e,o=[this.createSubscriptionKey(i,n,r),this.createSubscriptionKey(i,"*",r),this.createSubscriptionKey("*","*",r)],s={uuid:i,name:n};o.forEach((e=>{this.emitter.emit(e,t,s)}))}emitSubscriverEvent(e,t){const{payload:{targetName:n,uuid:i,topic:r}}=t,o={name:n,uuid:i,topic:r};this.emitter.emit(e,o)}createSubscriptionKey(e,t,n){const i=t||"*";if(!(e&&i&&n))throw new Error("Missing uuid, name, or topic string");return function(...e){return e.map((e=>Buffer.from(`${e}`).toString("base64"))).join("/")}(e,i,n)}onmessage(e){const{action:t}=e;switch(t){case"process-message":this.processMessage(e);break;case this.events.subscriberAdded:this.emitSubscriverEvent(this.events.subscriberAdded,e);break;case this.events.subscriberRemoved:this.emitSubscriverEvent(this.events.subscriberRemoved,e)}return!0}}de.InterApplicationBus=Xt;de.InterAppPayload=class{};var en={};Object.defineProperty(en,"__esModule",{value:!0}),en.Clipboard=void 0;const tn=d;class nn extends tn.Base{async writeText(e){await this.wire.sendAction("clipboard-write-text",e)}async readText(e){const{payload:t}=await this.wire.sendAction("clipboard-read-text",{type:e});return t.data}async writeImage(e){await this.wire.sendAction("clipboard-write-image",e)}async readImage(e={format:"dataURL"}){const{payload:t}=await this.wire.sendAction("clipboard-read-image",e);return t.data}async writeHtml(e){await this.wire.sendAction("clipboard-write-html",e)}async readHtml(e){const{payload:t}=await this.wire.sendAction("clipboard-read-html",{type:e});return t.data}async writeRtf(e){await this.wire.sendAction("clipboard-write-rtf",e)}async readRtf(e){const{payload:t}=await this.wire.sendAction("clipboard-read-rtf",{type:e});return t.data}async write(e){await this.wire.sendAction("clipboard-write",e)}async getAvailableFormats(e){const{payload:t}=await this.wire.sendAction("clipboard-read-formats",{type:e});return t.data}}en.Clipboard=nn;var rn={},on={},sn={};Object.defineProperty(sn,"__esModule",{value:!0}),sn.ExternalApplication=void 0;const an=d;class cn extends an.EmitterBase{constructor(e,t){super(e,"external-application",t.uuid),this.identity=t}getInfo(){return this.wire.sendAction("get-external-application-info",this.identity).then((({payload:e})=>e.data))}}sn.ExternalApplication=cn,Object.defineProperty(on,"__esModule",{value:!0}),on.ExternalApplicationModule=void 0;const dn=d,hn=sn;class ln extends dn.Base{wrap(e){return this.wire.sendAction("external-application-wrap").catch((e=>{})),Promise.resolve(new hn.ExternalApplication(this.wire,{uuid:e}))}wrapSync(e){return this.wire.sendAction("external-application-wrap-sync").catch((e=>{})),new hn.ExternalApplication(this.wire,{uuid:e})}}on.ExternalApplicationModule=ln,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(on,e),n(sn,e)}(rn);var un={},pn={},wn={};Object.defineProperty(wn,"__esModule",{value:!0}),wn._Frame=void 0;const yn=d;class fn extends yn.EmitterBase{constructor(e,t){super(e,"frame",t.uuid,t.name),this.identity=t}getInfo(){return this.wire.sendAction("get-frame-info",this.identity).then((({payload:e})=>e.data))}getParentWindow(){return this.wire.sendAction("get-parent-window",this.identity).then((({payload:e})=>e.data))}}wn._Frame=fn,Object.defineProperty(pn,"__esModule",{value:!0}),pn._FrameModule=void 0;const gn=d,mn=O,vn=wn;class Cn extends gn.Base{async wrap(e){this.wire.sendAction("frame-wrap").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}wrapSync(e){this.wire.sendAction("frame-wrap-sync").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}getCurrent(){return this.wire.sendAction("frame-get-current").catch((e=>{})),Promise.resolve(new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity()))}getCurrentSync(){return this.wire.sendAction("frame-get-current-sync").catch((e=>{})),new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity())}}pn._FrameModule=Cn,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(pn,e),n(wn,e)}(un);var bn={};Object.defineProperty(bn,"__esModule",{value:!0}),bn.GlobalHotkey=void 0;const In=d;class En extends In.EmitterBase{constructor(e){super(e,"global-hotkey")}async register(e,t){await this.on(e,t),await this.wire.sendAction("global-hotkey-register",{hotkey:e})}async unregister(e){await this.removeAllListeners(e),await this.wire.sendAction("global-hotkey-unregister",{hotkey:e})}async unregisterAll(){await Promise.all(this.eventNames().filter((e=>!("registered"===e||"unregistered"===e))).map((e=>this.removeAllListeners(e)))),await this.wire.sendAction("global-hotkey-unregister-all",{})}async isRegistered(e){const{payload:{data:t}}=await this.wire.sendAction("global-hotkey-is-registered",{hotkey:e});return t}}bn.GlobalHotkey=En;var xn,An={},Pn={},Mn={},_n=s&&s.__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)};Object.defineProperty(Mn,"__esModule",{value:!0}),Mn.Platform=void 0;const On=d,Sn=O,Rn=new Map;class Fn extends On.EmitterBase{constructor(e,t){super(t.wire,"application",e.uuid),this.getClient=e=>{this.wire.sendAction("platform-get-client",this.identity).catch((e=>{}));const t=e||this.identity,{uuid:n}=t;if(!Rn.has(n)){const e=_n(this,xn,"f").call(this,n);Rn.set(n,e)}return Rn.get(n)},xn.set(this,(async e=>{try{const t=`custom-frame-${e}`,n=await this._channel.connect(t,{wait:!1});return n.onDisconnection((()=>{Rn.delete(e)})),n}catch(t){throw Rn.delete(e),new Error("The targeted Platform is not currently running. Listen for application-started event for the given Uuid.")}})),this.launchLegacyManifest=this.launchContentManifest;const n=(0,Sn.validateIdentity)(e);if(n)throw new Error(n);this._channel=t,this.identity={uuid:e.uuid},this.Layout=this.fin.Platform.Layout,this.Application=this.fin.Application.wrapSync(this.identity)}async createView(e,t,n){this.wire.sendAction("platform-create-view",this.identity).catch((e=>{}));const i=await this.getClient(),r=await i.dispatch("create-view",{target:t,opts:e,targetView:n});if(!r||(0,Sn.validateIdentity)(r.identity))throw new Error(`When overwriting the createView call, please return an object that has a valid 'identity' property: ${JSON.stringify(r)}`);return this.fin.View.wrapSync(r.identity)}async createWindow(e){this.wire.sendAction("platform-create-window",this.identity).catch((e=>{}));const t=await this.getClient();e.reason||(e.reason="api-call");const n=await t.dispatch("create-view-container",e);if(!n||(0,Sn.validateIdentity)(n.identity))throw new Error(`When overwriting the createWindow call, please return an object that has a valid 'identity' property: ${JSON.stringify(n)}`);const{identity:i}=n,r=this.fin.Window.wrapSync(i);return r.name=i.name,r.uuid=i.uuid,r}async quit(){this.wire.sendAction("platform-quit",this.identity).catch((e=>{}));return(await this.getClient()).dispatch("quit")}async closeView(e){this.wire.sendAction("platform-close-view",this.identity).catch((e=>{}));const t=await this.getClient();await t.dispatch("close-view",{view:e})}async reparentView(e,t){console.warn("Platform.reparentView has been deprecated, please use Platform.createView"),this.wire.sendAction("platform-reparent-view",this.identity).catch((e=>{}));const n={...e,uuid:e.uuid??this.identity.uuid},i=await this.fin.View.wrap(n),r=await i.getOptions();return this.createView(r,t)}async getSnapshot(){this.wire.sendAction("platform-get-snapshot",this.identity).catch((e=>{}));return(await this.getClient()).dispatch("get-snapshot")}async getViewSnapshot(e){return(await this.getClient()).dispatch("get-view-snapshot",{viewIdentity:e})}async applySnapshot(e,t){this.wire.sendAction("platform-apply-snapshot",this.identity).catch((e=>{}));const n="Requested snapshot must be a valid Snapshot object, or a url or filepath to such an object.";let i;if("string"==typeof e)try{i=(await this._channel.wire.sendAction("get-application-manifest",{manifestUrl:e})).payload.data}catch(e){throw new Error(`${n}: ${e}`)}else i=e;if(!i.windows)throw new Error(n);const r=await this.getClient();return await r.dispatch("apply-snapshot",{snapshot:i,options:t}),this}async fetchManifest(e){return(await this.getClient()).dispatch("platform-fetch-manifest",{manifestUrl:e})}async launchContentManifest(e){this.wire.sendAction("platform-launch-content-manifest",this.identity).catch((()=>{}));const t=await this.getClient(),n=await this.fetchManifest(e);return t.dispatch("launch-into-platform",{manifest:n,manifestUrl:e}),this}async setWindowContext(e={},t){if(this.wire.sendAction("platform-set-window-context",this.identity).catch((e=>{})),!e)throw new Error("Please provide a serializable object or string to set the context.");const n=await this.getClient(),{entityType:i}=t?await this.fin.System.getEntityInfo(t.uuid,t.name):this.fin.me;await n.dispatch("set-window-context",{context:e,entityType:i,target:t||{uuid:this.fin.me.uuid,name:this.fin.me.name}})}async getWindowContext(e){this.wire.sendAction("platform-get-window-context",this.identity).catch((e=>{}));const t=await this.getClient(),{entityType:n}=e?await this.fin.System.getEntityInfo(e.uuid,e.name):this.fin.me;return t.dispatch("get-window-context",{target:e||{uuid:this.fin.me.uuid,name:this.fin.me.name},entityType:n})}async closeWindow(e,t={skipBeforeUnload:!1}){this.wire.sendAction("platform-close-window",this.identity).catch((e=>{}));return(await this.getClient()).dispatch("close-window",{windowId:e,options:t})}}Mn.Platform=Fn,xn=new WeakMap;var jn={},kn={},Ln={},Tn={};function $n(e){switch(e){case"columns":case"grid":case"rows":case"tabs":return!0;default:return!1}}Object.defineProperty(Tn,"__esModule",{value:!0}),Tn.overrideFromComposables=Tn.isValidPresetType=void 0,Tn.isValidPresetType=$n,Tn.overrideFromComposables=function(...e){return t=>e.reduceRight(((e,t)=>n=>t(e(n))),(e=>e))(t)},Tn.default={isValidPresetType:$n};var Bn={},Gn={},Wn={};Object.defineProperty(Wn,"__esModule",{value:!0}),Wn.ApiConsumer=void 0;Wn.ApiConsumer=class{constructor(e){this.strategy=e,this.consume=async e=>(await this.strategy.getExposedFunctions(e)).reduce(((t,n)=>({...t,[n.key]:this.strategy.createFunction(n,e)})),{})}};var Hn={},Nn={};Object.defineProperty(Nn,"__esModule",{value:!0}),Nn.expose=Nn.getExposedProperties=void 0;const Dn=Symbol("exposedProperties");Nn.getExposedProperties=e=>e[Dn]||e.prototype[Dn]||[];Nn.expose=e=>(t,n,i)=>{t[Dn]=t[Dn]||[],t[Dn].push({key:n,descriptor:i,options:e})},Object.defineProperty(Hn,"__esModule",{value:!0}),Hn.ApiExposer=void 0;const Un=Nn;Hn.ApiExposer=class{constructor(e){this.strategy=e,this.exposeInstance=async(e,t)=>{const n=(0,Un.getExposedProperties)(e),i=await Promise.all(n.map((async({key:n,options:i})=>({key:n,options:await this.strategy.exposeFunction(e[n].bind(e),{key:n,options:i,meta:t})}))));await this.strategy.exposeMeta(t,i)}}};var Vn={},zn={},Kn={};Object.defineProperty(Kn,"__esModule",{value:!0}),Kn.ChannelsConsumer=void 0;Kn.ChannelsConsumer=class{constructor(e){this.channel=e,this.getExposedFunctions=async e=>{const{id:t}=e,{props:n}=await this.channel.dispatch(`api-meta:${t}`);return n},this.createFunction=e=>(...t)=>{const{action:n}=e.options;return this.channel.dispatch(n,{args:t})}}};var qn={};Object.defineProperty(qn,"__esModule",{value:!0}),qn.ChannelsExposer=void 0;qn.ChannelsExposer=class{constructor(e){this.channelProviderOrClient=e,this.exposeFunction=async(e,t)=>{const{key:n,options:i,meta:r}=t,{id:o}=r,s=`${o}.${i?.action||n}`;return await this.channelProviderOrClient.register(s,(async({args:t})=>e(...t))),{action:s}},this.exposeMeta=async({id:e},t)=>{const n=`api-meta:${e}`;await this.channelProviderOrClient.register(n,(()=>({props:t})))}}},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Kn,e),n(qn,e)}(zn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(zn,e)}(Vn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Wn,e),n(Hn,e),n(Vn,e),n(Nn,e)}(Gn);var Jn={};Object.defineProperty(Jn,"__esModule",{value:!0}),Jn.createRelayedDispatch=exports.relayChannelClientApi_1=Jn.relayChannelClientApi=void 0;const Yn=["no longer connected","RTCDataChannel closed unexpectedly","The client you are trying to dispatch from is disconnected from the target provider"];exports.relayChannelClientApi_1=Jn.relayChannelClientApi=async(e,t)=>{e.register(`relay:${t}`,(({action:t,target:n,payload:i})=>e.dispatch(n,t,i))),await Promise.resolve()};Jn.createRelayedDispatch=(e,t,n,i)=>async(r,o)=>{try{return await e.dispatch(`relay:${n}`,{action:r,payload:o,target:t})}catch(e){if(s=e.message,Yn.some((e=>s.includes(e)))&&i)throw new Error(i);throw e}var s};var Zn,Qn,Xn,ei=s&&s.__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},ti=s&&s.__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)};Object.defineProperty(Bn,"__esModule",{value:!0}),Bn.ColumnOrRow=Bn.TabStack=Bn.LayoutNode=void 0;const ni=Gn,ii=Jn;class ri{constructor(e,t){Zn.set(this,void 0),this.isRoot=()=>ti(this,Zn,"f").isRoot(this.entityId),this.exists=()=>ti(this,Zn,"f").exists(this.entityId),this.getParent=async()=>{const e=await ti(this,Zn,"f").getParent(this.entityId);if(e)return ri.getEntity(e,ti(this,Zn,"f"))},this.createAdjacentStack=async(e,t)=>{const n=await ti(this,Zn,"f").createAdjacentStack(this.entityId,e,t);return ri.getEntity({entityId:n,type:"stack"},ti(this,Zn,"f"))},this.getAdjacentStacks=async e=>(await ti(this,Zn,"f").getAdjacentStacks({targetId:this.entityId,edge:e})).map((e=>ri.getEntity({type:"stack",entityId:e.entityId},ti(this,Zn,"f")))),ei(this,Zn,e,"f"),this.entityId=t}}Bn.LayoutNode=ri,Zn=new WeakMap,ri.newLayoutEntitiesClient=async(e,t,n)=>{const i=(0,ii.createRelayedDispatch)(e,n,"layout-relay","You are trying to interact with a layout component on a window that does not exist or has been destroyed.");return new ni.ApiConsumer(new ni.ChannelsConsumer({dispatch:i})).consume({id:t})},ri.getEntity=(e,t)=>{const{entityId:n,type:i}=e;switch(i){case"column":case"row":return new si(t,n,i);case"stack":return new oi(t,n);default:throw new Error(`Unrecognised Layout Entity encountered ('${JSON.stringify(e)})`)}};class oi extends ri{constructor(e,t){super(e,t),Qn.set(this,void 0),this.type="stack",this.getViews=()=>ti(this,Qn,"f").getStackViews(this.entityId),this.addView=async(e,t={index:0})=>ti(this,Qn,"f").addViewToStack(this.entityId,e,t),this.removeView=async e=>{await ti(this,Qn,"f").removeViewFromStack(this.entityId,e)},this.setActiveView=async e=>{await ti(this,Qn,"f").setStackActiveView(this.entityId,e)},ei(this,Qn,e,"f")}}Bn.TabStack=oi,Qn=new WeakMap;class si extends ri{constructor(e,t,n){super(e,t),Xn.set(this,void 0),this.getContent=async()=>(await ti(this,Xn,"f").getContent(this.entityId)).map((e=>ri.getEntity(e,ti(this,Xn,"f")))),ei(this,Xn,e,"f"),this.type=n}}Bn.ColumnOrRow=si,Xn=new WeakMap;var ai={};Object.defineProperty(ai,"__esModule",{value:!0}),ai.DEFAULT_LAYOUT_KEY=ai.LAYOUT_CONTROLLER_ID=void 0,ai.LAYOUT_CONTROLLER_ID="layout-entities",ai.DEFAULT_LAYOUT_KEY="__default__";var ci,di,hi,li=s&&s.__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)};Object.defineProperty(Ln,"__esModule",{value:!0}),Ln.Layout=void 0;const ui=G,pi=O,wi=d,yi=Tn,fi=Bn,gi=ai;class mi extends wi.Base{static getClient(e){return li(e,di,"f").getValue()}constructor(e,t){super(t),ci.add(this),di.set(this,new ui.Lazy((async()=>fi.LayoutNode.newLayoutEntitiesClient(await this.platform.getClient(),gi.LAYOUT_CONTROLLER_ID,this.identity)))),this.replace=async e=>{this.wire.sendAction("layout-replace").catch((e=>{}));const t=await this.platform.getClient();await t.dispatch("replace-layout",{target:this.identity,opts:{layout:e}})},this.replaceView=async(e,t)=>{this.wire.sendAction("layout-replace-view").catch((e=>{}));const n=await this.platform.getClient();await n.dispatch("replace-view",{target:this.identity,opts:{viewToReplace:e,newView:t}})},this.applyPreset=async e=>{this.wire.sendAction("layout-apply-preset").catch((e=>{}));const t=await this.platform.getClient(),{presetType:n}=e;if(!n||!(0,yi.isValidPresetType)(n))throw new Error("Cannot apply preset layout, please include an applicable presetType property in the PresetLayoutOptions.");await t.dispatch("apply-preset-layout",{target:this.identity,opts:{presetType:n}})};const n=(0,pi.validateIdentity)(e);if(n)throw new Error(n);this.identity=e,this.platform=this.fin.Platform.wrapSync({uuid:e.uuid}),e.uuid===this.fin.me.uuid&&e.name===this.fin.me.name&&(this.init=this.fin.Platform.Layout.init)}async getConfig(){this.wire.sendAction("layout-get-config").catch((e=>{}));return(await this.platform.getClient()).dispatch("get-frame-snapshot",{target:this.identity})}async getCurrentViews(){this.wire.sendAction("layout-get-views").catch((e=>{}));const e=await this.platform.getClient();return(await e.dispatch("get-layout-views",{target:this.identity})).map((e=>this.fin.View.wrapSync(e)))}async getRootItem(){this.wire.sendAction("layout-get-root-item").catch((()=>{}));const e=await li(this,di,"f").getValue(),t=await e.getRoot("layoutName"in this.identity?this.identity:void 0);return fi.LayoutNode.getEntity(t,e)}async getStackByViewIdentity(e){this.wire.sendAction("layout-get-stack-by-view").catch((()=>{}));const t=await li(this,di,"f").getValue(),n=await t.getStackByView(e);if(!n)throw new Error(`No stack found for view: ${e.uuid}/${e.name}`);return fi.LayoutNode.getEntity(n,t)}async addView(e,{location:t,targetView:n}={}){this.wire.sendAction("layout-add-view").catch((e=>{}));const{identity:i}=await li(this,ci,"m",hi).call(this,"layout-add-view",{viewOptions:e,location:t,targetView:n});return{identity:i}}async closeView(e){this.wire.sendAction("layout-close-view").catch((e=>{})),await li(this,ci,"m",hi).call(this,"layout-close-view",{viewIdentity:e})}}Ln.Layout=mi,di=new WeakMap,ci=new WeakSet,hi=async function(e,t){return(await this.platform.getClient()).dispatch(e,{target:this.identity,opts:t})};var vi,Ci,bi,Ii,Ei,xi=s&&s.__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)},Ai=s&&s.__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};Object.defineProperty(kn,"__esModule",{value:!0}),kn.LayoutModule=void 0;const Pi=d,Mi=Ln,_i=ai;class Oi extends Pi.Base{constructor(){super(...arguments),vi.add(this),Ci.set(this,!1),bi.set(this,null),this.init=async(e={})=>{if(this.wire.sendAction("layout-init").catch((e=>{})),!this.wire.environment.layoutAllowedInContext(this.fin))throw new Error("Layout.init can only be called from a Window context.");if(xi(this,Ci,"f"))throw new Error("Layout.init was already called, please use Layout.create to add additional layouts.");"openfin"===this.wire.environment.type&&await this.fin.Platform.getCurrentSync().getClient(),Ai(this,Ci,!0,"f"),Ai(this,bi,await this.wire.environment.initLayoutManager(this.fin,this.wire,e),"f"),await this.wire.environment.applyLayoutSnapshot(this.fin,xi(this,bi,"f"),e);const t={name:this.fin.me.name,uuid:this.fin.me.uuid};if(!e.layoutManagerOverride){const e={layoutName:_i.DEFAULT_LAYOUT_KEY,...t};return xi(this,Ii,"f").call(this,e)}return this.wrapSync(t)},Ii.set(this,(e=>{const t="[Layout] You are using a deprecated property `layoutManager` - it will throw if you access it starting in v37.",n=new Proxy({},{get(e,n){throw console.warn(`[Layout-mgr-proxy] accessing ${n.toString()}`),new Error(t)}}),i=Object.assign(this.wrapSync(e),{layoutManager:n});return new Proxy(i,{get(e,n){if("layoutManager"===n)throw console.warn(`[Layout-proxy] accessing ${n.toString()}`),new Error(t);return e[n]}})})),this.getCurrentLayoutManagerSync=()=>xi(this,vi,"m",Ei).call(this,"fin.Platform.Layout.getCurrentLayoutManagerSync()"),this.create=async e=>this.wire.environment.createLayout(xi(this,vi,"m",Ei).call(this,"fin.Platform.Layout.create()"),e),this.destroy=async e=>this.wire.environment.destroyLayout(xi(this,vi,"m",Ei).call(this,"fin.Platform.Layout.destroy()"),e)}async wrap(e){return this.wire.sendAction("layout-wrap").catch((e=>{})),new Mi.Layout(e,this.wire)}wrapSync(e){return this.wire.sendAction("layout-wrap-sync").catch((e=>{})),new Mi.Layout(e,this.wire)}async getCurrent(){if(this.wire.sendAction("layout-get-current").catch((e=>{})),"openfin"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error("You are not in a Window context. Only Windows can have a Layout.");const{uuid:e,name:t}=this.fin.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction("layout-get-current-sync").catch((e=>{})),"openfin"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error("You are not in a Window context. Only Windows can have a Layout.");const{uuid:e,name:t}=this.fin.me;return this.wrapSync({uuid:e,name:t})}async getLayoutByViewIdentity(e){this.wire.sendAction("layout-get-by-view-identity").catch((()=>{}));let t=await this.wire.environment.getViewWindowIdentity(this.fin,e);t.identity&&(t=t.identity);try{const n=this.wrapSync(t),i=await Mi.Layout.getClient(n),r=await i.getLayoutIdentityForViewOrThrow(e);return this.wrapSync(r)}catch(n){if(!["No action registered at target for","getLayoutIdentityForViewOrThrow is not a function"].some((e=>n.message.includes(e))))throw n;if(t.uuid===t.name)throw new Error(`View identity ${JSON.stringify(e)} is not attached to any layout in provider window ${JSON.stringify(t)}.`);return this.wrapSync(t)}}}kn.LayoutModule=Oi,Ci=new WeakMap,bi=new WeakMap,Ii=new WeakMap,vi=new WeakSet,Ei=function(e){if(!xi(this,bi,"f"))throw new Error(`You must call init before using the API ${e}`);return xi(this,bi,"f")},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(kn,e),n(Ln,e)}(jn),Object.defineProperty(Pn,"__esModule",{value:!0}),Pn.PlatformModule=void 0;const Si=d,Ri=Mn,Fi=jn;class ji extends Si.Base{constructor(e,t){super(e),this._channel=t,this.Layout=new Fi.LayoutModule(this.wire)}async init(e){if(!fin.__internal_.isPlatform||fin.me.name!==fin.me.uuid)throw new Error("fin.Platform.init should only be called from a custom platform provider running in the main window of the application.");return this.wire.environment.initPlatform(this.fin,e)}async wrap(e){return this.wire.sendAction("platform-wrap").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}wrapSync(e){return this.wire.sendAction("platform-wrap-sync").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}async getCurrent(){return this.wire.sendAction("platform-get-current").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction("platform-get-current-sync").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}start(e){return this.wire.sendAction("platform-start").catch((e=>{})),new Promise((async(t,n)=>{try{const{uuid:n}=e,i=await this.fin.Application._create({...e,isPlatformController:!0});i.once("platform-api-ready",(()=>t(this.wrapSync({uuid:n})))),i._run({uuid:n})}catch(e){n(e)}}))}startFromManifest(e,t){return this.wire.sendAction("platform-start-from-manifest").catch((e=>{})),new Promise((async(n,i)=>{try{const i=await this.fin.Application._createFromManifest(e);i.once("platform-api-ready",(()=>n(this.wrapSync({uuid:i.identity.uuid})))),i._run(t)}catch(e){i(e)}}))}}Pn.PlatformModule=ji,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Pn,e),n(Mn,e)}(An);var ki={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getMe=e.getBaseMe=e.environmentUnsupportedMessage=void 0;const t=J(),n=un,i=ie(),r=rn;function o(e,t,n){return{...{isView:"view"===e,isWindow:"window"===e,isFrame:"iframe"===e,isExternal:"external connection"===e},uuid:t,name:n,entityType:e}}e.environmentUnsupportedMessage="You are not running in OpenFin.",e.getBaseMe=o,e.getMe=function(s){const{uuid:a,name:c,entityType:d}=s.me,h={setContext(){throw new Error(e.environmentUnsupportedMessage)},addContextHandler(){throw new Error(e.environmentUnsupportedMessage)},getContextGroups(){throw new Error(e.environmentUnsupportedMessage)},joinContextGroup(){throw new Error(e.environmentUnsupportedMessage)},removeFromContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getAllClientsInContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getInfoForContextGroup(){throw new Error(e.environmentUnsupportedMessage)}},l="Interop API has not been instantiated. Either connection has failed or you have not declared interop in your config.",u={setContext(){throw new Error(l)},addContextHandler(){throw new Error(l)},getContextGroups(){throw new Error(l)},joinContextGroup(){throw new Error(l)},removeFromContextGroup(){throw new Error(l)},getAllClientsInContextGroup(){throw new Error(l)},getInfoForContextGroup(){throw new Error(l)}},p={eventNames:()=>{throw new Error(e.environmentUnsupportedMessage)},emit:()=>{throw new Error(e.environmentUnsupportedMessage)},listeners:()=>{throw new Error(e.environmentUnsupportedMessage)},listenerCount:()=>{throw new Error(e.environmentUnsupportedMessage)},on:()=>{throw new Error(e.environmentUnsupportedMessage)},addListener:()=>{throw new Error(e.environmentUnsupportedMessage)},once:()=>{throw new Error(e.environmentUnsupportedMessage)},prependListener:()=>{throw new Error(e.environmentUnsupportedMessage)},prependOnceListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeAllListeners:()=>{throw new Error(e.environmentUnsupportedMessage)}};switch(d){case"view":return Object.assign(new t.View(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case"window":return Object.assign(new i._Window(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case"iframe":return Object.assign(new n._Frame(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case"external connection":return Object.assign(new r.ExternalApplication(s,{uuid:a}),o(d,a,c),{interop:u,isOpenFin:!1});default:return{...o(d,a,c),...p,interop:h,isOpenFin:!1}}}}(ki);var Li={},Ti={},$i={};Object.defineProperty($i,"__esModule",{value:!0}),$i.createWarningObject=$i.createUnusableObject=void 0,$i.createUnusableObject=function(e){const t=()=>{throw new Error(e)};return new Proxy({},{apply:t,construct:t,defineProperty:t,deleteProperty:t,get:t,getOwnPropertyDescriptor:t,getPrototypeOf:t,has:t,isExtensible:t,ownKeys:t,preventExtensions:t,set:t,setPrototypeOf:t})},$i.createWarningObject=function(e,t){return new Proxy(t,{get:(...t)=>(console.warn(e),Reflect.get(...t)),set:(...t)=>(console.warn(e),Reflect.set(...t)),getOwnPropertyDescriptor:(...t)=>(console.warn(e),Reflect.getOwnPropertyDescriptor(...t)),ownKeys:(...t)=>(console.warn(e),Reflect.ownKeys(...t))})};var Bi,Gi={},Wi={};var Hi={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.wrapIntentHandler=e.BROKER_ERRORS=e.generateOverrideWarning=e.generateOverrideError=e.wrapContextHandler=e.wrapInTryCatch=e.generateId=void 0;e.generateId=()=>`${Math.random()}${Date.now()}`;e.wrapInTryCatch=(e,t)=>(...n)=>{try{return e(...n)}catch(e){throw new Error((t||"")+e)}};e.wrapContextHandler=(e,t)=>async n=>{try{await e(n)}catch(e){throw console.error(`Error thrown by handler ${t} for context type ${n.type}: ${e}`),e}};e.generateOverrideError=(e,t)=>`You have tried to to use ${e} but ${t} has not been overridden in the Interop Broker. Please override this function. Refer to our documentation for more info.`;e.generateOverrideWarning=(e,t,n,i)=>{const{uuid:r,name:o}=n;return i?`Entity with identity: ${r}/${o} has called ${i} or ${e} but ${t} has not been overridden.`:`Entity with identity: ${r}/${o} has called ${e} but ${t} has not been overridden.`},e.BROKER_ERRORS={fireIntent:(0,e.generateOverrideError)("fireIntent","handleFiredIntent"),fireIntentForContext:(0,e.generateOverrideError)("fireIntentForContext","handleFiredIntentForContext"),getInfoForIntent:(0,e.generateOverrideError)("getInfoForIntent","handleInfoForIntent"),getInfoForIntentsByContext:(0,e.generateOverrideError)("getInfoForIntentsByContext","handleInfoForIntentsByContext"),joinSessionContextGroupWithJoinContextGroup:"The Context Group you have tried to join is a Session Context Group. Custom Context Groups can only be defined by the Interop Broker through code or manifest configuration. Please use joinSessionContextGroup.",fdc3Open:(0,e.generateOverrideError)("fdc3.open","fdc3HandleOpen"),fdc3FindInstances:(0,e.generateOverrideError)("fdc3.findInstances","fdc3HandleFindInstances"),fdc3GetAppMetadata:(0,e.generateOverrideError)("fdc3.getAppMetadata","fdc3HandleGetAppMetadata"),fdc3GetInfo:(0,e.generateOverrideError)("fdc3.getInfo","fdc3HandleGetInfo")};e.wrapIntentHandler=(e,t)=>async n=>{try{return e(n)}catch(e){throw console.error(`Error thrown by handler ${t}: ${e}`),e}}}(Hi);var Ni,Di,Ui={};function Vi(){if(Di)return Gi;Di=1;var e,t,n,r=s&&s.__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},o=s&&s.__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)},a=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Gi,"__esModule",{value:!0}),Gi.InteropBroker=void 0;const c=d,h=a(function(){if(Bi)return Wi;Bi=1,Object.defineProperty(Wi,"__esModule",{value:!0});const e=Cr();return Wi.default=class{constructor(e,t){this.provider=e,this.id=t,this.lastContext=void 0,this.contextGroupMap=new Map,this.clients=new Map,this.registerListeners()}registerListeners(){this.provider.register(`sessionContextGroup:getContext-${this.id}`,this.getCurrentContext.bind(this)),this.provider.register(`sessionContextGroup:setContext-${this.id}`,this.setContext.bind(this)),this.provider.register(`sessionContextGroup:handlerAdded-${this.id}`,this.handlerAdded.bind(this)),this.provider.register(`sessionContextGroup:handlerRemoved-${this.id}`,this.handlerRemoved.bind(this))}getCurrentContext(e){return e.type?this.contextGroupMap.get(e.type):this.lastContext}setContext(t,n){const{context:i}=t,r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name} not in Session Client State Map`);this.contextGroupMap.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{e.contextHandlers.get(i.type)?.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getClientState(e){return this.clients.get(e.endpointId)}async handlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(i){const e=r.contextHandlers.get(i)||[];r.contextHandlers.set(i,[...e,n]);const o=this.contextGroupMap.get(i);o&&await this.provider.dispatch(t,n,o)}else{r.globalHandler=n;const e=[...this.contextGroupMap.keys()].map((async e=>{const i=this.contextGroupMap.get(e);i&&await this.provider.dispatch(t,n,i)}));await Promise.all(e)}}handlerRemoved(e,t){const{handlerId:n}=e,i=this.clients.get(t.endpointId);i?(Array.from(i.contextHandlers).forEach((([,e])=>{const t=e.indexOf(n);t>-1&&e.splice(t,1)})),i.globalHandler===n&&(i.globalHandler=void 0)):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={contextHandlers:new Map,clientIdentity:e,globalHandler:void 0};this.clients.set(e.endpointId,t)}}onDisconnection(e){this.clients.delete(e.endpointId)}},Wi}()),l=Hi,u=a(i),p=function(){if(Ni)return Ui;Ni=1,Object.defineProperty(Ui,"__esModule",{value:!0}),Ui.PrivateChannelProvider=void 0;const e=Vi();return Ui.PrivateChannelProvider=class t{constructor(e,t){this.provider=e,this.id=t,this.clients=new Map,this.registerListeners(),this.contextByContextType=new Map,this.lastContext=void 0,this.provider.onConnection((e=>this.registerNewClient(e))),this.provider.onDisconnection((async e=>{const{endpointId:t}=e;this.clients.has(t)&&await this.handleClientDisconnecting(e),0===(await this.provider.getAllClientInfo()).length&&this.provider.destroy()}))}getClientState(e){return this.clients.get(e.endpointId)}registerListeners(){this.provider.register("broadcast",this.broadcast.bind(this)),this.provider.register("getCurrentContext",this.getCurrentContext.bind(this)),this.provider.register("contextHandlerAdded",this.contextHandlerAdded.bind(this)),this.provider.register("contextHandlerRemoved",this.contextHandlerRemoved.bind(this)),this.provider.register("nonStandardHandlerRemoved",this.nonStandardHandlerRemoved.bind(this)),this.provider.register("onAddContextHandlerAdded",this.onAddContextHandlerAdded.bind(this)),this.provider.register("onDisconnectHandlerAdded",this.onDisconnectHandlerAdded.bind(this)),this.provider.register("onUnsubscribeHandlerAdded",this.onUnsubscribeHandlerAdded.bind(this)),this.provider.register("clientDisconnecting",((e,t)=>{this.handleClientDisconnecting(t)}))}broadcast(t,n){const{context:i}=t;if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name}, tried to call broadcast, is not connected to this Private Channel`);const r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to broadcast - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);this.contextByContextType.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{const t=e.handlerIdsByContextTypes.get(i.type);t&&t.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getCurrentContext(e,t){const{contextType:n}=e;if(!this.getClientState(t))throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call getCurrentContext, is not connected to this Private Channel`);if(void 0!==n){return this.contextByContextType.get(n)||null}return this.lastContext?this.lastContext:null}contextHandlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call addContextListener, is not connected to this Private Channel`);if(i){const e=r.handlerIdsByContextTypes.get(i)||[];r.handlerIdsByContextTypes.set(i,[...e,n])}else r.globalHandler=n;Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&e.onAddContextListenerHandlerId&&this.provider.dispatch(e.clientIdentity,e.onAddContextListenerHandlerId,i)}))}async contextHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);if(i){let e;if(i.globalHandler===n)i.globalHandler=void 0;else for(const[t,r]of i.handlerIdsByContextTypes){const i=r.indexOf(n);i>-1&&(r.splice(i,1),e=t)}const r=(await this.getConnectedClients()).map((async n=>{const{clientIdentity:i,clientIdentity:{endpointId:r},onUnsubscribeHandlerId:o}=n;r!==t.endpointId&&o&&await this.provider.dispatch(i,o,e)}));try{await Promise.all(r)}catch(e){throw console.error(`Problem when attempting to dispatch to onUnsubscribeHandlers. Error: ${e} Removing Client: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}`),new Error(e)}}else console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}.`)}nonStandardHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);i?i.onDisconnectHandlerId===n?i.onDisconnectHandlerId=void 0:i.onAddContextListenerHandlerId===n?i.onAddContextListenerHandlerId=void 0:i.onUnsubscribeHandlerId===n&&(i.onUnsubscribeHandlerId=void 0):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}onAddContextHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onAddContextListener, is not connected to this Private Channel`);n.onAddContextListenerHandlerId=i,Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&Array.from(e.handlerIdsByContextTypes.keys()).forEach((e=>{this.provider.dispatch(t,i,e)}))}))}onDisconnectHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onDisconnect, is not connected to this Private Channel`);n.onDisconnectHandlerId=i}onUnsubscribeHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onUnsubscribe, is not connected to this Private Channel`);n.onUnsubscribeHandlerId=i}removeClient(e){const t=this.getClientState(e);if(!t)throw new Error(`Client with Identity: ${e.uuid} ${e.name}, tried to call disconnect, is not connected to this Private Channel`);t.handlerIdsByContextTypes.clear(),this.clients.delete(e.endpointId)}async fireOnDisconnectForOtherClients(e){const{endpointId:t}=e,n=(await this.getConnectedClients()).map((async e=>{const{clientIdentity:{endpointId:n},onDisconnectHandlerId:i}=e;n!==t&&i&&await this.provider.dispatch(e.clientIdentity,i)}));try{await Promise.all(n)}catch(t){throw console.error(`Problem when attempting to dispatch to onDisconnectHandlers. Error: ${t} Disconnecting Client: uuid: ${e.uuid}. name: ${e.name}. endpointId: ${e.endpointId}`),new Error(t)}}async unsubscribeAll(e){const{endpointId:t}=e,n=this.clients.get(t);if(n){const t=Array.from(n.handlerIdsByContextTypes.values()).flat(),i=n.globalHandler;if(t.length>0){const n=t.map((async t=>this.contextHandlerRemoved({handlerId:t},e)));try{await Promise.all(n)}catch(e){console.error(e.message)}}if(i)try{await this.contextHandlerRemoved({handlerId:i},e)}catch(e){console.error(e.message)}}}async handleClientDisconnecting(e){await this.unsubscribeAll(e),this.removeClient(e),await this.fireOnDisconnectForOtherClients(e)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={clientIdentity:e,handlerIdsByContextTypes:new Map,globalHandler:void 0,onAddContextListenerHandlerId:void 0,onUnsubscribeHandlerId:void 0,onDisconnectHandlerId:void 0};this.clients.set(e.endpointId,t)}}async getConnectedClients(){const e=await this.provider.getAllClientInfo();return Array.from(this.clients.values()).filter((t=>{const{uuid:n,name:i}=t.clientIdentity;return e.some((e=>i===e.name&&n===e.uuid))}))}static init(e,n){return new t(e,n)}},Ui}(),w=G,y=[{id:"green",displayMetadata:{color:"#00CC88",name:"green"}},{id:"purple",displayMetadata:{color:"#8C61FF",name:"purple"}},{id:"orange",displayMetadata:{color:"#FF8C4C",name:"orange"}},{id:"red",displayMetadata:{color:"#FF5E60",name:"red"}},{id:"pink",displayMetadata:{color:"#FF8FB8",name:"pink"}},{id:"yellow",displayMetadata:{color:"#E9FF8F",name:"yellow"}}];let f=class i extends c.Base{constructor(i,s,a){super(i),e.set(this,void 0),t.set(this,void 0),n.set(this,void 0),this.getProvider=()=>o(this,n,"f").getValue(),this.interopClients=new Map,this.contextGroupsById=new Map,r(this,t,a.contextGroups??[...y],"f"),r(this,e,a.fdc3Info,"f"),a?.logging&&(this.logging=a.logging),this.intentClientMap=new Map,this.lastContextMap=new Map,this.sessionContextGroupMap=new Map,r(this,n,new w.Lazy(s),"f"),this.setContextGroupMap(),this.setupChannelProvider()}static createClosedConstructor(...e){return class extends i{constructor(...t){if(t.length){const[n,i,r]=t;if(r&&"object"==typeof r&&!(0,u.default)(r,e[2]))return console.warn("You have modified the parameters of the InteropOverride constructor. This behavior is deprecated and will be removed in a future version. You can modify these options in your manifest. Please consult our Interop docs for guidance on migrating to the new override scheme."),void super(e[0],e[1],r);console.warn("You are attempting to pass arguments to the InteropOverride constructor. This is not necessary, and these passed arguments will be ignored. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.")}super(...e)}}}setContext({context:e},t){this.wire.sendAction("interop-broker-set-context").catch((e=>{}));const n=this.getClientState(t);if(!n||!n.contextGroupId)throw n?new Error("You must join a context group before you can set context."):new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);{const{contextGroupId:t}=n;this.setContextForGroup({context:e},t)}}setContextForGroup({context:e},t){this.wire.sendAction("interop-broker-set-context-for-group").catch((e=>{}));const n=this.contextGroupsById.get(t);if(!n)throw new Error(`Unable to set context for context group that isn't in the context group mapping: ${t}.`);const r=i.checkContextIntegrity(e);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(e)}`);const o=e.type;n.set(o,e),this.lastContextMap.set(t,o);Array.from(this.interopClients.values()).filter((e=>e.contextGroupId===t)).forEach((t=>{for(const[,n]of t.contextHandlers)i.isContextTypeCompatible(o,n.contextType)&&this.invokeContextHandler(t.clientIdentity,n.handlerId,e)}))}getCurrentContext(e,t){this.wire.sendAction("interop-broker-get-current-context").catch((e=>{}));const n=this.getClientState(t);if(!n?.contextGroupId)throw new Error("You must be a member of a context group to call getCurrentContext");const{contextGroupId:i}=n,r=this.contextGroupsById.get(i),o=this.lastContextMap.get(i),s=e?.contextType??o;return r&&s?r.get(s):void 0}async joinContextGroup({contextGroupId:e,target:t},n){if(this.wire.sendAction("interop-broker-join-context-group").catch((e=>{})),this.sessionContextGroupMap.has(e))throw new Error(l.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup);if(t){i.hasEndpointId(t)&&await this.addClientToContextGroup({contextGroupId:e},t);try{const n=this.channel.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name));if(!n.length)throw new Error(`Given Identity ${t.uuid} ${t.name} is not connected to the Interop Broker.`);n.length>1&&console.warn(`More than one connection found for identity ${t.uuid} ${t.name}`);const i=[];for(const t of n)i.push(this.addClientToContextGroup({contextGroupId:e},t));await Promise.all(i)}catch(e){throw new Error(e)}}else await this.addClientToContextGroup({contextGroupId:e},n)}async addClientToContextGroup({contextGroupId:e},t){this.wire.sendAction("interop-broker-add-client-to-context-group").catch((e=>{}));const n=this.getClientState(t);if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(!this.getContextGroups().find((t=>t.id===e)))throw new Error(`Attempting to join a context group that does not exist: ${e}. You may only join existing context groups.`);if(n.contextGroupId!==e){n.contextGroupId=e,await this.setCurrentContextGroupInClientOptions(t,e);const i=this.contextGroupsById.get(e);for(const[,e]of n.contextHandlers){const{contextType:n,handlerId:r}=e;if(void 0===n)i.forEach(((e,n)=>{this.invokeContextHandler(t,r,e)}));else if(i.has(n)){const e=i.get(n);e&&this.invokeContextHandler(t,r,e)}}}}async removeFromContextGroup({target:e},t){if(this.wire.sendAction("interop-broker-remove-from-context-group").catch((e=>{})),e){i.hasEndpointId(e)&&await this.removeClientFromContextGroup(e);try{const t=this.channel.connections.filter((t=>t.uuid===e.uuid&&t.name===e.name));if(!t.length)throw new Error(`No connection found for given Identity ${e.uuid} ${e.name}`);t.length>1&&console.warn(`More than one connection found for identity ${e.uuid} ${e.name}`);const n=[];for(const e of t)n.push(this.removeClientFromContextGroup(e));await Promise.all(n)}catch(e){throw new Error(e)}}else await this.removeClientFromContextGroup(t)}async removeClientFromContextGroup(e){this.wire.sendAction("interop-broker-remove-client-from-context-group").catch((e=>{}));const t=this.getClientState(e);t&&(t.contextGroupId=void 0),await this.setCurrentContextGroupInClientOptions(e,null)}getContextGroups(){return this.wire.sendAction("interop-broker-get-context-groups").catch((e=>{})),o(this,t,"f").map((e=>({...e})))}getInfoForContextGroup({contextGroupId:e}){return this.wire.sendAction("interop-broker-get-info-for-context-group").catch((e=>{})),this.getContextGroups().find((t=>t.id===e))}getAllClientsInContextGroup({contextGroupId:e}){this.wire.sendAction("interop-broker-get-all-clients-in-context-group").catch((e=>{}));return Array.from(this.interopClients.values()).filter((t=>t.contextGroupId===e)).map((e=>e.clientIdentity))}async handleFiredIntent(e,t){const n=(0,l.generateOverrideWarning)("fdc3.raiseIntent","InteropBroker.handleFiredIntent",t,"interopClient.fireIntent");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntent)}async setIntentTarget(e,t){this.wire.sendAction("interop-broker-set-intent-target").catch((e=>{}));const n=this.intentClientMap.get(t.name),i=`intent-handler-${e.name}`;if(n){const t=n.get(i);if(t){if(t.pendingIntents.push(e),t.clientIdentity&&t.isReady){const{clientIdentity:e,pendingIntents:n}=t;try{const r=n[n.length-1];await this.invokeIntentHandler(e,i,r),t.pendingIntents=[]}catch(n){console.error(`Error invoking intent handler for client ${e.uuid}/${e.name}/${e.endpointId}`),t.isReady=!1}}}else n.set(i,{isReady:!1,pendingIntents:[e]})}else{this.intentClientMap.set(t.name,new Map);const n=this.intentClientMap.get(t.name);n&&n.set(i,{isReady:!1,pendingIntents:[e]})}}async handleInfoForIntent(e,t){const n=(0,l.generateOverrideWarning)("fdc3.findIntent","InteropBroker.handleInfoForIntent",t,"interopClient.getInfoForIntent");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntent)}async handleInfoForIntentsByContext(e,t){const n=(0,l.generateOverrideWarning)("fdc3.findIntentsByContext","InteropBroker.handleInfoForIntentsByContext",t,"interopClient.getInfoForIntentsByContext");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntentsByContext)}async handleFiredIntentForContext(e,t){const n=(0,l.generateOverrideWarning)("fdc3.raiseIntentForContext","InteropBroker.handleFiredIntentForContext",t,"interopClient.fireIntentForContext");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntentForContext)}async clientDisconnected(e){}async fdc3HandleOpen({app:e,context:t},n){const i=(0,l.generateOverrideWarning)("fdc3.open","InteropBroker.fdc3HandleOpen",n);throw console.warn(i),new Error(l.BROKER_ERRORS.fdc3Open)}async fdc3HandleFindInstances(e,t){const n=(0,l.generateOverrideWarning)("fdc3.open","InteropBroker.fdc3HandleFindInstances",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3FindInstances)}async fdc3HandleGetAppMetadata(e,t){const n=(0,l.generateOverrideWarning)("fdc3.getAppMetadata","InteropBroker.fdc3HandleGetAppMetadata",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3GetAppMetadata)}async invokeContextHandler(e,t,n){const i=await this.getProvider();try{await i.dispatch(e,t,n)}catch(i){console.error(`Error invoking context handler ${t} for context type ${n.type} in client ${e.uuid}/${e.name}/${e.endpointId}`,i)}}async invokeIntentHandler(e,t,n){const i=await this.getProvider();await i.dispatch(e,t,n)}async fdc3HandleGetInfo(t,n){const{fdc3Version:i}=t;return{fdc3Version:i,...o(this,e,"f"),optionalFeatures:{OriginatingAppMetadata:!1,UserChannelMembershipAPIs:!0},appMetadata:{appId:"",instanceId:""}}}async getAllClientInfo(){return(await this.getProvider()).getAllClientInfo()}decorateSnapshot(e){return{...e,interopSnapshotDetails:{contextGroupStates:this.getContextGroupStates()}}}applySnapshot(e,t){const n=e?.interopSnapshotDetails?.contextGroupStates;n&&(t?.closeExistingWindows||this.updateExistingClients(n),this.rehydrateContextGroupStates(n))}updateExistingClients(e){this.interopClients.forEach((t=>{const{clientIdentity:n,contextGroupId:r,contextHandlers:o}=t;if(r){const t=e[r];for(const[,e]of Object.entries(t))o.forEach((t=>{const{handlerId:r,contextType:o}=t;i.isContextTypeCompatible(e.type,o)&&this.invokeContextHandler(n,r,e)}))}}))}getContextGroupStates(){return i.toObject(this.contextGroupsById)}rehydrateContextGroupStates(e){const t=Object.entries(e);for(const[e,n]of t){const t=Object.entries(n);for(const[n,i]of t)if(this.contextGroupsById.has(e)){this.contextGroupsById.get(e).set(n,i)}else console.warn(`Attempting to set a context group that isn't in the context group mapping. Skipping context group rehydration for: ${e}`)}}contextHandlerRegistered({contextType:e,handlerId:t},n){const i={contextType:e,handlerId:t},r=this.getClientState(n);if(r?.contextHandlers.set(t,i),r&&r.contextGroupId){const{contextGroupId:i}=r,o=this.contextGroupsById.get(i);if(void 0===e)o.forEach(((e,i)=>{this.invokeContextHandler(n,t,e)}));else if(o.has(e)){const i=o.get(e);i&&this.invokeContextHandler(n,t,i)}}}async intentHandlerRegistered(e,t){const{handlerId:n}=e,i=this.intentClientMap.get(t.name),r=i?.get(n);if(i)if(r){const{pendingIntents:e}=r;r.clientIdentity=t,r.isReady=!0;try{if(e.length>0){const i=e[e.length-1];await this.invokeIntentHandler(t,n,i),r.pendingIntents=[]}}catch(e){console.error(`Error invoking intent handler: ${n} for client ${t.uuid}/${t.name}/${t.endpointId}`)}}else i.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t});else{this.intentClientMap.set(t.name,new Map);const e=this.intentClientMap.get(t.name);e&&e.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t})}}removeContextHandler({handlerId:e},t){const n=this.getClientState(t);n&&n.contextHandlers.delete(e)}handleJoinSessionContextGroup({sessionContextGroupId:e},t){try{if(!e)throw new Error("Failed to join session context group: must specify group id.");const n=this.sessionContextGroupMap.get(e);if(n)n.registerNewClient(t);else{const n=new h.default(this.channel,e);n.registerNewClient(t),this.sessionContextGroupMap.set(e,n)}return{hasConflict:this.contextGroupsById.has(e)}}catch(e){throw new Error(e)}}getClientState(e){return this.interopClients.get(e.endpointId)}static toObject(e){const t=Object.fromEntries(e),n={};return Object.entries(t).forEach((([e,t])=>{const i=Object.fromEntries(t);n[e]=i})),n}static checkContextIntegrity(e){if(!e)return{isValid:!1,reason:"No context supplied"};if("object"!=typeof e)return{isValid:!1,reason:"Context must be an Object"};if(!e.type)return{isValid:!1,reason:"Context must have a type property"};if(e.id&&"object"!=typeof e.id)return{isValid:!1,reason:"Context id must be an Object populated with key-value identifiers (if set)"};if(e.id){const{id:t}=e,n=Object.keys(t);let i=!1;if(!n.length)return{isValid:!1,reason:"Context id must have at least one key-value identifier"};if(n.forEach((e=>{"string"==typeof e&&"string"==typeof t[e]||(i=!0)})),i)return{isValid:!1,reason:"Context id key-value identifiers must be of type string"}}return e.name&&"string"!=typeof e.name?{isValid:!1,reason:"Context name must be of string type (if set)"}:{isValid:!0}}static hasEndpointId(e){return void 0!==e.endpointId}static isContextTypeCompatible(e,t){return void 0===t||e===t}setContextGroupMap(){for(const e of this.getContextGroups())this.contextGroupsById.set(e.id,new Map)}async setCurrentContextGroupInClientOptions(e,t){try{const n=await this.fin.System.getEntityInfo(e.uuid,e.name);let i;"view"===n.entityType?i=await this.fin.View.wrap(e):"window"===n.entityType&&(i=await this.fin.Window.wrap(e)),i&&await i.updateOptions({interop:{currentContextGroup:t}})}catch(e){}}async setupChannelProvider(){try{const e=await this.getProvider();this.channel=e,this.wireChannel(e)}catch(e){throw new Error(`Error setting up Interop Broker Channel Provider: ${e}`)}}wireChannel(e){e.onConnection((async(e,t)=>{if(!await this.isConnectionAuthorized(e,t))throw new Error(`Connection not authorized for ${e.uuid}, ${e.name}`);if(!e.endpointId)throw new Error("Version too old to be compatible with Interop. Please upgrade your runtime to a more recent version.");const n={contextGroupId:void 0,contextHandlers:new Map,clientIdentity:e};t?.currentContextGroup&&this.contextGroupsById.has(t.currentContextGroup)&&(n.contextGroupId=t?.currentContextGroup),this.interopClients.set(e.endpointId,n)})),e.onDisconnection((e=>{this.interopClients.delete(e.endpointId);const t=this.intentClientMap.get(e.name);t&&e.uuid===this.fin.me.uuid&&t.forEach((e=>{e.isReady=!1})),this.sessionContextGroupMap.forEach((t=>{t.onDisconnection(e)})),this.clientDisconnected(e)})),e.beforeAction((async(e,t,n)=>{if(!await this.isActionAuthorized(e,t,n))throw new Error(`Action (${e}) not authorized for ${n.uuid}, ${n.name}`);this.logging?.beforeAction?.enabled&&console.log(e,t,n)})),e.afterAction(((e,t,n)=>{this.logging?.afterAction?.enabled&&console.log(e,t,n)})),e.register("setContext",this.setContext.bind(this)),e.register("fireIntent",this.handleFiredIntent.bind(this)),e.register("getCurrentContext",this.getCurrentContext.bind(this)),e.register("getInfoForIntent",this.handleInfoForIntent.bind(this)),e.register("getInfoForIntentsByContext",this.handleInfoForIntentsByContext.bind(this)),e.register("fireIntentForContext",this.handleFiredIntentForContext.bind(this)),e.register("getContextGroups",this.getContextGroups.bind(this)),e.register("joinContextGroup",this.joinContextGroup.bind(this)),e.register("removeFromContextGroup",this.removeFromContextGroup.bind(this)),e.register("getAllClientsInContextGroup",this.getAllClientsInContextGroup.bind(this)),e.register("getInfoForContextGroup",this.getInfoForContextGroup.bind(this)),e.register("contextHandlerRegistered",this.contextHandlerRegistered.bind(this)),e.register("intentHandlerRegistered",this.intentHandlerRegistered.bind(this)),e.register("removeContextHandler",this.removeContextHandler.bind(this)),e.register("sessionContextGroup:createIfNeeded",this.handleJoinSessionContextGroup.bind(this)),e.register("fdc3Open",this.fdc3HandleOpen.bind(this)),e.register("fdc3v2FindIntentsByContext",this.handleInfoForIntentsByContext.bind(this)),e.register("fdc3FindInstances",this.fdc3HandleFindInstances.bind(this)),e.register("fdc3GetAppMetadata",this.fdc3HandleGetAppMetadata.bind(this)),e.register("fdc3v2GetInfo",(async(e,t)=>this.fdc3HandleGetInfo.bind(this)(e,t))),e.register("createPrivateChannelProvider",(async e=>{const{channelId:t}=e,n=await this.fin.InterApplicationBus.Channel.create(t);p.PrivateChannelProvider.init(n,t)}))}isConnectionAuthorized(e,t){return this.wire.sendAction("interop-broker-is-connection-authorized").catch((e=>{})),Promise.resolve(!0)}isActionAuthorized(e,t,n){return this.wire.sendAction("interop-broker-is-action-authorized").catch((e=>{})),Promise.resolve(!0)}};return Gi.InteropBroker=f,e=new WeakMap,t=new WeakMap,n=new WeakMap,Gi}var zi,Ki={},qi={},Ji=s&&s.__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},Yi=s&&s.__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)};Object.defineProperty(qi,"__esModule",{value:!0});const Zi=d,Qi=Hi;class Xi extends Zi.Base{constructor(e,t,n){super(e),zi.set(this,void 0),this.id=n,Ji(this,zi,t,"f")}async setContext(e){this.wire.sendAction("interop-session-context-group-set-context").catch((e=>{}));return(await Yi(this,zi,"f")).dispatch(`sessionContextGroup:setContext-${this.id}`,{sessionContextGroupId:this.id,context:e})}async getCurrentContext(e){this.wire.sendAction("interop-session-context-group-get-context").catch((e=>{}));return(await Yi(this,zi,"f")).dispatch(`sessionContextGroup:getContext-${this.id}`,{sessionContextGroupId:this.id,type:e})}async addContextHandler(e,t){if(this.wire.sendAction("interop-session-context-group-add-handler").catch((e=>{})),"function"!=typeof e)throw new Error("Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");const n=await Yi(this,zi,"f");let i;return i=t?`sessionContextHandler:invoke-${this.id}-${t}-${(0,Qi.generateId)()}`:`sessionContextHandler:invoke-${this.id}`,n.register(i,(0,Qi.wrapContextHandler)(e,i)),await n.dispatch(`sessionContextGroup:handlerAdded-${this.id}`,{handlerId:i,contextType:t}),{unsubscribe:await this.createUnsubscribeCb(i)}}async createUnsubscribeCb(e){const t=await Yi(this,zi,"f");return async()=>{t.remove(e),await t.dispatch(`sessionContextGroup:handlerRemoved-${this.id}`,{handlerId:e})}}getUserInstance(){return{id:this.id,setContext:(0,Qi.wrapInTryCatch)(this.setContext.bind(this),"Failed to set context: "),getCurrentContext:(0,Qi.wrapInTryCatch)(this.getCurrentContext.bind(this),"Failed to get context: "),addContextHandler:(0,Qi.wrapInTryCatch)(this.addContextHandler.bind(this),"Failed to add context handler: ")}}}qi.default=Xi,zi=new WeakMap;var er={},tr={},nr={},ir={},rr=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),or=s&&s.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),sr=s&&s.__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)&&rr(t,e,n);return or(t,e),t};Object.defineProperty(ir,"__esModule",{value:!0}),ir.PrivateChannelClient=void 0;const ar=sr(Hi);var cr,dr;function hr(){if(cr)return tr;cr=1;var e,t=s&&s.__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)},n=s&&s.__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},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(tr,"__esModule",{value:!0}),tr.FDC3ModuleBase=void 0;const o=nr,a=Hi,c=wr(),d=r(i);return tr.FDC3ModuleBase=class{get client(){return t(this,e,"f").call(this)}get fin(){return this.wire.getFin()}constructor(t,i){this.wire=i,e.set(this,void 0),n(this,e,t,"f")}async broadcast(e){return this.wire.sendAction("fdc3-broadcast").catch((e=>{})),this.client.setContext(e)}async _open(e,t){this.wire.sendAction("fdc3-open").catch((e=>{}));try{return await c.InteropClient.ferryFdc3Call(this.client,"fdc3Open",{app:e,context:t})}catch(e){const t=e.message===a.BROKER_ERRORS.fdc3Open?"ResolverUnavailable":e.message;throw new Error(t)}}async _getChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:"system",...(0,o.getUnsupportedChannelApis)()})))}async getOrCreateChannel(e){this.wire.sendAction("fdc3-get-or-create-channel").catch((e=>{}));const t=(await this._getChannels()).find((t=>t.id===e));if(t)return{...t,type:"system",...(0,o.getUnsupportedChannelApis)()};try{const t=await this.client.joinSessionContextGroup(e);return(0,o.buildAppChannelObject)(t)}catch(e){throw console.error(e.message),new Error(o.ChannelError.CreationFailed)}}async getSystemChannels(){return this.wire.sendAction("fdc3-get-system-channels").catch((e=>{})),this._getChannels()}async joinChannel(e){this.wire.sendAction("fdc3-join-channel").catch((e=>{}));try{return await this.client.joinContextGroup(e)}catch(e){if(e.message===a.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup?console.error("The Channel you have tried to join is an App Channel. Custom Channels can only be defined by the Interop Broker through code or manifest configuration. Please use getOrCreateChannel."):console.error(e.message),e.message.startsWith("Attempting to join a context group that does not exist"))throw new Error(o.ChannelError.NoChannelFound);throw new Error(o.ChannelError.AccessDenied)}}async getCurrentChannel(){this.wire.sendAction("fdc3-get-current-channel").catch((e=>{}));const e=await this.getCurrentContextGroupInfo();return e?this.buildChannelObject(e):null}async leaveCurrentChannel(){return this.wire.sendAction("fdc3-leave-current-channel").catch((e=>{})),this.client.removeFromContextGroup()}async getCurrentContextGroupInfo(){const e=await this.client.getContextGroups(),t=e.map((async e=>this.client.getAllClientsInContextGroup(e.id))),n=(await Promise.all(t)).findIndex((e=>e.some((e=>{const{uuid:t,name:n}=e;return this.wire.me.uuid===t&&this.wire.me.name===n}))));return e[n]}async buildChannelObject(e){return{...e,type:"system",addContextListener:(...[e,t])=>{let n,i;"function"==typeof e?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),n=e):(n=t,"string"==typeof e&&(i=e));const r=(async()=>{let e=!0;const t=await this.client.getCurrentContext(i);return this.client.addContextHandler(((i,r)=>{if(!e||(e=!1,!(0,d.default)(t,i)))return n(i,r)}),i)})();return{...r,unsubscribe:()=>r.then((e=>e.unsubscribe()))}},broadcast:this.broadcast.bind(this),getCurrentContext:async e=>{const t=await this.client.getCurrentContext(e);return void 0===t?null:t}}}},e=new WeakMap,tr}ir.PrivateChannelClient=class{constructor(e,t){this.id=t,this.client=e,this.listeners=new Map}async broadcast(e){return this.client.dispatch("broadcast",{context:e})}async getCurrentContext(e){return this.client.dispatch("getCurrentContext",{contextType:e})}async addContextListener(e,t){if("function"!=typeof t)throw new Error("Non-function argument passed to the second parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");let n;n=e?`contextHandler:invoke-${this.id}-${e}-${ar.generateId()}`:`contextHandler:invoke-${this.id}-${ar.generateId()}`,this.client.register(n,ar.wrapContextHandler(t,n));const i={unsubscribe:await this.createContextUnsubscribeCb(n)};return this.listeners.set(n,i),await this.client.dispatch("contextHandlerAdded",{handlerId:n,contextType:e}),i}createNonStandardUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch("nonStandardHandlerRemoved",{handlerId:e})}}createContextUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch("contextHandlerRemoved",{handlerId:e})}}onAddContextListener(e){const t=`onContextHandlerAdded:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch("onAddContextHandlerAdded",{handlerId:t}),n}onDisconnect(e){const t=`onDisconnect:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch("onDisconnectHandlerAdded",{handlerId:t}),n}onUnsubscribe(e){const t=`onUnsubscribe:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch("onUnsubscribeHandlerAdded",{handlerId:t}),n}async cleanUpAllSubs(){Array.from(this.listeners.keys()).forEach((e=>{this.client.remove(e),this.listeners.delete(e)}))}async disconnect(){try{await this.client.dispatch("clientDisconnecting"),await this.cleanUpAllSubs(),await this.client.disconnect()}catch(e){throw new Error(e.message)}}},function(e){var t=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.getIntentResolution=e.isChannel=e.isContext=e.connectPrivateChannel=e.buildAppChannelObject=e.buildPrivateChannelObject=e.ChannelError=e.ResultError=e.UnsupportedChannelApiError=e.getUnsupportedChannelApis=void 0;const n=Hi,r=ir,o=t(i);e.getUnsupportedChannelApis=e=>({addContextListener:()=>{throw new a("Channel.addContextListener",e)},broadcast:()=>{throw new a("Channel.broadcast",e)},getCurrentContext:()=>{throw new a("Channel.getCurrentContext",e)}});class a extends Error{constructor(e,t="System"){super(e),this.message=`Calling ${e} on an instance of a ${t} Channel returned by fdc3.get${t}Channels is not supported. If you would like to use a ${t} Channel, please use fdc3.joinChannel, fdc3.addContextListener, and fdc3.broadcast instead.`}}var c,d;e.UnsupportedChannelApiError=a,function(e){e.NoResultReturned="NoResultReturned",e.IntentHandlerRejected="IntentHandlerRejected"}(c=e.ResultError||(e.ResultError={})),(d=e.ChannelError||(e.ChannelError={})).NoChannelFound="NoChannelFound",d.AccessDenied="AccessDenied",d.CreationFailed="CreationFailed";e.buildPrivateChannelObject=e=>{let t=!1;const n=()=>{if(t)throw new Error("Private Channel Client has been disconnected from the Private Channel")};return{id:e.id,type:"private",broadcast:async t=>(n(),e.broadcast(t)),getCurrentContext:async t=>(n(),e.getCurrentContext(t)),addContextListener:async(t,i)=>{n();let r=i,o=t;"function"==typeof t&&(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),r=t,o=null);return e.addContextListener(o,r)},onAddContextListener:t=>(n(),e.onAddContextListener(t)),disconnect:async()=>(n(),t=!0,e.disconnect()),onDisconnect:t=>(n(),e.onDisconnect(t)),onUnsubscribe:t=>(n(),e.onUnsubscribe(t))}};e.buildAppChannelObject=e=>({id:e.id,type:"app",broadcast:e.setContext,getCurrentContext:async t=>{const n=await e.getCurrentContext(t);return void 0===n?null:n},addContextListener:(t,n)=>{let i,r;"function"==typeof t?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),i=t):(i=n,"string"==typeof t&&(r=t));const s=(async()=>{let t=!0;const n=await e.getCurrentContext(r);return e.addContextHandler(((e,r)=>{if(!t||(t=!1,!(0,o.default)(n,e)))return i(e,r)}),r)})();return{...s,unsubscribe:()=>s.then((e=>e.unsubscribe()))}}});e.connectPrivateChannel=async t=>{try{const n=await fin.InterApplicationBus.Channel.connect(t),i=new r.PrivateChannelClient(n,t);return(0,e.buildPrivateChannelObject)(i)}catch(e){throw new Error(`Private Channel with id: ${t} doesn't exist`)}};e.isContext=e=>{if(e&&"object"==typeof e&&"type"in e){const{type:t}=e;return"string"==typeof t}return!1};e.isChannel=e=>{if(e&&"object"==typeof e&&"type"in e&&"id"in e){const{type:t,id:n}=e;return"string"==typeof t&&"string"==typeof n&&("app"===t||"private"===t)}return!1};e.getIntentResolution=async(t,i,r,o)=>{const s=(0,n.generateId)(),a=new Promise(((e,t)=>{fin.InterApplicationBus.subscribe({uuid:"*"},s,(t=>{e(t)})).catch((()=>t(new Error("getResult is not supported in this environment"))))})),d=r?{target:r,intentResolutionResultId:s}:{intentResolutionResultId:s},h=o?{name:o,context:i,metadata:d}:{...i,metadata:d},l=async()=>{let n=await a;if(!n||"object"!=typeof n)throw new Error(c.NoResultReturned);const{error:i}=n;if(i)throw new Error(c.IntentHandlerRejected);if((0,e.isChannel)(n)){const{id:i,type:r}=n;switch(r){case"private":n=await(0,e.connectPrivateChannel)(i);break;case"app":{const r=await t.joinSessionContextGroup(i);n=(0,e.buildAppChannelObject)(r);break}}}else if(!(0,e.isContext)(n))throw new Error(c.NoResultReturned);return n},u=o?await t.fireIntent(h):await t.fireIntentForContext(h);return"object"!=typeof u?{source:{appId:"",instanceId:""},intent:"",version:"2.0",getResult:l}:{...u,getResult:l}}}(nr);var lr,ur,pr={};function wr(){if(ur)return Ki;ur=1;var e,t,n=s&&s.__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},i=s&&s.__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)},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ki,"__esModule",{value:!0}),Ki.InteropClient=void 0;const o=d,a=r(qi),c=function(){if(dr)return er;dr=1,Object.defineProperty(er,"__esModule",{value:!0}),er.Fdc3Module=void 0;const e=Hi,t=hr();class n extends t.FDC3ModuleBase{async open(e,t){await super._open(e,t)}addContextListener(e,t){let n;return this.wire.sendAction("fdc3-add-context-listener").catch((e=>{})),"function"==typeof e?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),n=this.client.addContextHandler(e)):n=this.client.addContextHandler(t,null===e?void 0:e),{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}addIntentListener(e,t){this.wire.sendAction("fdc3-add-intent-listener").catch((e=>{}));const n=this.client.registerIntentHandler((e=>{const{context:n,metadata:i}=e,{metadata:r}=n,o=i?.intentResolutionResultId||r?.intentResolutionResultId;o&&this.fin.InterApplicationBus.publish(o,null).catch((()=>null)),t(e.context)}),e,{fdc3Version:"1.2"});return{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}async raiseIntent(t,n,i){this.wire.sendAction("fdc3-raise-intent").catch((e=>{}));const r=i?{name:t,context:n,metadata:{target:i}}:{name:t,context:n};try{return await this.client.fireIntent(r)}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntent?"ResolverUnavailable":t.message;throw new Error(n)}}async findIntent(t,n){this.wire.sendAction("fdc3-find-intent").catch((e=>{}));try{return await this.client.getInfoForIntent({name:t,context:n})}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntent?"ResolverUnavailable":t.message;throw new Error(n)}}async findIntentsByContext(t){this.wire.sendAction("fdc3-find-intents-by-context").catch((e=>{}));try{return await this.client.getInfoForIntentsByContext(t)}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntentsByContext?"ResolverUnavailable":t.message;throw new Error(n)}}async raiseIntentForContext(t,n){this.wire.sendAction("fdc3-raise-intent-for-context").catch((e=>{}));try{return await this.client.fireIntentForContext({...t,metadata:{target:n}})}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntentForContext?"ResolverUnavailable":t.message;throw new Error(n)}}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}getInfo(){return this.wire.sendAction("fdc3-get-info").catch((e=>{})),{providerVersion:this.wire.environment.getAdapterVersionSync(),provider:`openfin-${this.wire.me.uuid}`,fdc3Version:"1.2"}}}return er.Fdc3Module=n,er}(),h=function(){if(lr)return pr;lr=1,Object.defineProperty(pr,"__esModule",{value:!0}),pr.Fdc3Module2=void 0;const e=hr(),t=Hi,n=wr(),i=nr,r=ir;class o extends e.FDC3ModuleBase{async open(e,t){return"string"==typeof e&&console.warn("Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string })."),super._open(e,t)}async findInstances(e){this.wire.sendAction("fdc3-find-instances").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,"fdc3FindInstances",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3FindInstances?"ResolverUnavailable":e.message;throw new Error(n)}}async getAppMetadata(e){this.wire.sendAction("fdc3-get-app-metadata").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,"fdc3GetAppMetadata",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3GetAppMetadata?"ResolverUnavailable":e.message;throw new Error(n)}}async addContextListener(e,t){this.wire.sendAction("fdc3-add-context-listener").catch((e=>{}));const n=e=>t=>{const{contextMetadata:n,...i}=t,r=n?[{...i},n]:[t,null];e(...r)};let i=t,r=n(i);return"function"==typeof e?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),i=e,r=n(i),this.client.addContextHandler(r)):this.client.addContextHandler(r,null===e?void 0:e)}async findIntent(e,n,i){this.wire.sendAction("fdc3-find-intent").catch((e=>{}));try{return await this.client.getInfoForIntent({name:e,context:n,metadata:{resultType:i}})}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntent?"ResolverUnavailable":e.message;throw new Error(n)}}async findIntentsByContext(e,i){this.wire.sendAction("fdc3-find-intents-by-context").catch((e=>{}));const r=i?{context:e,metadata:{resultType:i}}:e;try{return await n.InteropClient.ferryFdc3Call(this.client,"fdc3v2FindIntentsByContext",r)}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntentsByContext?"ResolverUnavailable":e.message;throw new Error(n)}}async raiseIntent(e,n,r){this.wire.sendAction("fdc3-raise-intent").catch((e=>{}));try{return"string"==typeof r&&console.warn("Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string })."),(0,i.getIntentResolution)(this.client,n,r,e)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?"ResolverUnavailable":e.message;throw new Error(n)}}async raiseIntentForContext(e,n){this.wire.sendAction("fdc3-raise-intent-for-context").catch((e=>{}));try{return"string"==typeof n&&console.warn("Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string })."),(0,i.getIntentResolution)(this.client,e,n)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?"ResolverUnavailable":e.message;throw new Error(n)}}async addIntentListener(e,t){if(this.wire.sendAction("fdc3-add-intent-listener").catch((e=>{})),"string"!=typeof e)throw new Error("First argument must be an Intent name");return this.client.registerIntentHandler((async e=>{let n,i;const{context:r,metadata:o}=e,{contextMetadata:s,metadata:a,...c}=r,d=o?.intentResolutionResultId||a?.intentResolutionResultId;try{const e=a?{metadata:a,...c}:{...c};n=await t(e,s),i=n}catch(e){n=e,i={error:!0}}if(d&&this.fin.InterApplicationBus.publish(d,i).catch((()=>null)),n instanceof Error)throw new Error(n.message);return n}),e,{fdc3Version:"2.0"})}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}async createPrivateChannel(){const e=(0,t.generateId)();await n.InteropClient.ferryFdc3Call(this.client,"createPrivateChannelProvider",{channelId:e});const o=await this.fin.InterApplicationBus.Channel.connect(e),s=new r.PrivateChannelClient(o,e);return(0,i.buildPrivateChannelObject)(s)}async getUserChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:"user",...(0,i.getUnsupportedChannelApis)("User")})))}async getSystemChannels(){return console.warn("This API has been deprecated. Please use fdc3.getUserChannels instead."),super.getSystemChannels()}async joinUserChannel(e){return super.joinChannel(e)}async joinChannel(e){return console.warn("This API has been deprecated. Please use fdc3.joinUserChannel instead."),super.joinChannel(e)}async getCurrentChannel(){const e=await super.getCurrentChannel();return e?{...e,type:"user",broadcast:this.broadcast.bind(this)}:null}async getInfo(){return n.InteropClient.ferryFdc3Call(this.client,"fdc3v2GetInfo",{fdc3Version:"2.0"})}}return pr.Fdc3Module2=o,pr}(),l=Hi;let u=class extends o.Base{constructor(i,r){super(i),e.set(this,void 0),t.set(this,void 0),n(this,t,new Map,"f"),n(this,e,r,"f")}async setContext(t){this.wire.sendAction("interop-client-set-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("setContext",{context:t})}async addContextHandler(t,n){if(this.wire.sendAction("interop-client-add-context-handler").catch((e=>{})),"function"!=typeof t)throw new Error("Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");const r=await i(this,e,"f");let o;o=n?`invokeContextHandler-${n}-${(0,l.generateId)()}`:"invokeContextHandler";const s=(0,l.wrapContextHandler)(t,o);return r.register(o,s),await r.dispatch("contextHandlerRegistered",{handlerId:o,contextType:n}),{unsubscribe:async()=>{r.remove(o),await r.dispatch("removeContextHandler",{handlerId:o})}}}async getContextGroups(){this.wire.sendAction("interop-client-get-context-groups").catch((e=>{}));return(await i(this,e,"f")).dispatch("getContextGroups")}async joinContextGroup(t,n){this.wire.sendAction("interop-client-join-context-group").catch((e=>{}));const r=await i(this,e,"f");if(!t)throw new Error("No contextGroupId specified for joinContextGroup.");return r.dispatch("joinContextGroup",{contextGroupId:t,target:n})}async removeFromContextGroup(t){this.wire.sendAction("interop-client-remove-from-context-group").catch((e=>{}));return(await i(this,e,"f")).dispatch("removeFromContextGroup",{target:t})}async getAllClientsInContextGroup(t){this.wire.sendAction("interop-client-get-all-clients-in-context-group").catch((e=>{}));const n=await i(this,e,"f");if(!t)throw new Error("No contextGroupId specified for getAllClientsInContextGroup.");return n.dispatch("getAllClientsInContextGroup",{contextGroupId:t})}async getInfoForContextGroup(t){this.wire.sendAction("interop-client-get-info-for-context-group").catch((e=>{}));const n=await i(this,e,"f");if(!t)throw new Error("No contextGroupId specified for getInfoForContextGroup.");return n.dispatch("getInfoForContextGroup",{contextGroupId:t})}async fireIntent(t){this.wire.sendAction("interop-client-fire-intent").catch((e=>{}));return(await i(this,e,"f")).dispatch("fireIntent",t)}async registerIntentHandler(t,n,r){this.wire.sendAction("interop-client-register-intent-handler").catch((e=>{}));const o=await i(this,e,"f"),s=`intent-handler-${n}`,a=(0,l.wrapIntentHandler)(t,s);try{await o.register(s,a),await o.dispatch("intentHandlerRegistered",{handlerId:s,...r})}catch(e){throw new Error("Unable to register intent handler")}return{unsubscribe:async()=>{o.remove(s)}}}async getCurrentContext(t){this.wire.sendAction("interop-client-get-current-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("getCurrentContext",{contextType:t})}async getInfoForIntent(t){this.wire.sendAction("interop-client-get-info-for-intent").catch((e=>{}));return(await i(this,e,"f")).dispatch("getInfoForIntent",t)}async getInfoForIntentsByContext(t){this.wire.sendAction("interop-client-get-info-for-intents-by-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("getInfoForIntentsByContext",t)}async fireIntentForContext(t){this.wire.sendAction("interop-client-fire-intent-for-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("fireIntentForContext",t)}async joinSessionContextGroup(n){try{const r=i(this,t,"f").get(n);if(r)return r.getUserInstance();const o=await i(this,e,"f"),{hasConflict:s}=await o.dispatch("sessionContextGroup:createIfNeeded",{sessionContextGroupId:n});s&&console.warn(`A (non-session) context group with the name "${n}" already exists. If you are trying to join a Context Group, call joinContextGroup instead.`);const c=new a.default(this.wire,i(this,e,"f"),n);return i(this,t,"f").set(n,c),c.getUserInstance()}catch(e){throw console.error(`Error thrown trying to create Session Context Group with id "${n}": ${e}`),e}}async onDisconnection(t){this.wire.sendAction("interop-client-add-ondisconnection-listener").catch((e=>{}));return(await i(this,e,"f")).onDisconnection((e=>{const{uuid:n}=e;t({type:"interop-broker",topic:"disconnected",brokerName:n})}))}getFDC3Sync(e){switch(e){case"1.2":return new c.Fdc3Module((()=>this),this.wire);case"2.0":return new h.Fdc3Module2((()=>this),this.wire);default:throw new Error(`Invalid FDC3 version provided: ${e}. Must be '1.2' or '2.0'`)}}async getFDC3(e){return this.getFDC3Sync(e)}static async ferryFdc3Call(t,n,r){return(await i(t,e,"f")).dispatch(n,r||null)}};return Ki.InteropClient=u,e=new WeakMap,t=new WeakMap,Ki}var yr,fr,gr,mr={};function vr(){if(yr)return mr;yr=1,Object.defineProperty(mr,"__esModule",{value:!0}),mr.overrideCheck=mr.checkFDC32Overrides=mr.getDefaultViewFdc3VersionFromAppInfo=void 0;const e=Vi();function t(t){return["fdc3HandleFindInstances","handleInfoForIntent","handleInfoForIntentsByContext","fdc3HandleGetAppMetadata","fdc3HandleGetInfo","fdc3HandleOpen","handleFiredIntent","handleFiredIntentForContext"].filter((n=>t[n]===e.InteropBroker.prototype[n]))}return mr.getDefaultViewFdc3VersionFromAppInfo=function({manifest:e,initialOptions:t}){const n=e?.platform?.defaultViewOptions?.fdc3InteropApi??t.defaultViewOptions?.fdc3InteropApi;return["1.2","2.0"].includes(n??"")?n:void 0},mr.checkFDC32Overrides=t,mr.overrideCheck=function(e,n){if(n&&"2.0"===n){const n=t(e);n.length>0&&console.warn(`WARNING: FDC3 2.0 has been set as a default option for Views in this Platform, but the required InteropBroker APIs for FDC3 2.0 compliance have not all been overridden.\nThe following APIs need to be overridden:\n${n.join("\n")}`)}},mr}function Cr(){return gr||(gr=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),i=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),i(function(){if(fr)return Ti;fr=1;var e=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ti,"__esModule",{value:!0}),Ti.InteropModule=void 0;const t=e(n),i=$i,r=d,o=Vi(),a=wr(),c=vr(),h=Tn,l=e=>new e,u="You have attempted to use or modify InteropBroker parameters, which is not allowed. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.";class p extends r.Base{async init(e,n=l){this.wire.sendAction("interop-init").catch((()=>{}));const r=await this.wire.environment.getInteropInfo(this.wire.getFin()),s=(0,i.createUnusableObject)(u),a=(0,i.createWarningObject)(u,(0,t.default)(r)),d=async()=>{throw new Error(u)},p=o.InteropBroker.createClosedConstructor(this.wire,(()=>this.fin.InterApplicationBus.Channel.create(`interop-broker-${e}`)),r);let w;return w=Array.isArray(n)?new((0,h.overrideFromComposables)(...n)(p))(s,d,a):await n(p,s,d,a),(0,c.overrideCheck)(w,r.fdc3Version),w}connectSync(e,t){return this.wire.sendAction("interop-connect-sync").catch((()=>{})),new a.InteropClient(this.wire,this.wire.environment.whenReady().then((()=>this.fin.InterApplicationBus.Channel.connect(`interop-broker-${e}`,{payload:t}))))}}return Ti.InteropModule=p,Ti}(),e),i(wr(),e),i(Vi(),e)}(Li)),Li}var br={},Ir={},Er={},xr={};Object.defineProperty(xr,"__esModule",{value:!0}),xr.getSnapshotSourceChannelName=void 0;xr.getSnapshotSourceChannelName=e=>`snapshot-source-provider-${e.uuid}`;var Ar,Pr,Mr,_r,Or,Sr=s&&s.__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},Rr=s&&s.__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)};Object.defineProperty(Er,"__esModule",{value:!0}),Er.SnapshotSource=void 0;const Fr=d,jr=xr,kr=new Map;class Lr extends Fr.Base{constructor(e,t){super(e),Ar.set(this,void 0),Pr.set(this,(()=>(kr.has(this.identity.uuid)||kr.set(this.identity.uuid,{eventFired:null,clientPromise:null}),kr.get(this.identity.uuid)))),Mr.set(this,(()=>(Rr(this,Pr,"f").call(this).clientPromise||(Rr(this,Pr,"f").call(this).clientPromise=Rr(this,_r,"f").call(this)),Rr(this,Pr,"f").call(this).clientPromise))),_r.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);try{Rr(this,Pr,"f").call(this).eventFired||await Rr(this,Or,"f").call(this);const t=await this.fin.InterApplicationBus.Channel.connect(e,{wait:!1});return t.onDisconnection((()=>{Rr(this,Pr,"f").call(this).clientPromise=null,Rr(this,Pr,"f").call(this).eventFired=null})),t}catch(e){throw Rr(this,Pr,"f").call(this).clientPromise=null,new Error("The targeted SnapshotSource is not currently initialized. Await this object's ready() method.")}})),Or.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);let t,n;const i=new Promise(((e,i)=>{t=e,n=i}));Rr(this,Pr,"f").call(this).eventFired=i;const r=async i=>{try{i.channelName===e&&(t(),await this.fin.InterApplicationBus.Channel.removeListener("connected",r))}catch(e){n(e)}};await this.fin.InterApplicationBus.Channel.on("connected",r)})),Sr(this,Ar,t,"f")}get identity(){return Rr(this,Ar,"f")}async ready(){this.wire.sendAction("snapshot-source-ready").catch((e=>{}));try{await Rr(this,Mr,"f").call(this)}catch(e){await Rr(this,Pr,"f").call(this).eventFired}}async getSnapshot(){this.wire.sendAction("snapshot-source-get-snapshot").catch((e=>{}));const e=await Rr(this,Mr,"f").call(this),t=await e.dispatch("get-snapshot");return(await t).snapshot}async applySnapshot(e){this.wire.sendAction("snapshot-source-apply-snapshot").catch((e=>{}));return(await Rr(this,Mr,"f").call(this)).dispatch("apply-snapshot",{snapshot:e})}}Er.SnapshotSource=Lr,Ar=new WeakMap,Pr=new WeakMap,Mr=new WeakMap,_r=new WeakMap,Or=new WeakMap,Object.defineProperty(Ir,"__esModule",{value:!0}),Ir.SnapshotSourceModule=void 0;const Tr=d,$r=Er,Br=xr;class Gr extends Tr.Base{async init(e){if(this.wire.sendAction("snapshot-source-init").catch((e=>{})),"object"!=typeof e||"function"!=typeof e.getSnapshot||"function"!=typeof e.applySnapshot)throw new Error("you must pass in a valid SnapshotProvider");const t=await this.fin.InterApplicationBus.Channel.create((0,Br.getSnapshotSourceChannelName)(this.fin.me));t.register("get-snapshot",(async()=>({snapshot:await e.getSnapshot()}))),t.register("apply-snapshot",(({snapshot:t})=>e.applySnapshot(t)))}wrapSync(e){return this.wire.sendAction("snapshot-source-wrap-sync").catch((e=>{})),new $r.SnapshotSource(this.wire,e)}async wrap(e){return this.wire.sendAction("snapshot-source-wrap").catch((e=>{})),this.wrapSync(e)}}Ir.SnapshotSourceModule=Gr,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Ir,e),n(Er,e)}(br),Object.defineProperty(a,"__esModule",{value:!0});var Wr=a.Fin=void 0;const Hr=t,Nr=c,Dr=ie(),Ur=Z(),Vr=de,zr=en,Kr=rn,qr=un,Jr=bn,Yr=J(),Zr=An,Qr=ki,Xr=Cr(),eo=br;class to extends Hr.EventEmitter{constructor(e){super(),this.wire=e,this.System=new Nr.System(e),this.Window=new Dr._WindowModule(e),this.Application=new Ur.ApplicationModule(e),this.InterApplicationBus=new Vr.InterApplicationBus(e),this.Clipboard=new zr.Clipboard(e),this.ExternalApplication=new Kr.ExternalApplicationModule(e),this.Frame=new qr._FrameModule(e),this.GlobalHotkey=new Jr.GlobalHotkey(e),this.Platform=new Zr.PlatformModule(e,this.InterApplicationBus.Channel),this.View=new Yr.ViewModule(e),this.Interop=new Xr.InteropModule(e),this.SnapshotSource=new eo.SnapshotSourceModule(e),e.registerFin(this),this.me=(0,Qr.getMe)(e),e.on("disconnected",(()=>{this.emit("disconnected")}))}}Wr=a.Fin=to;var no={},io={};function ro(e){return"string"==typeof e.manifestUrl}function oo(e){return ao(e)&&"string"==typeof e.address}function so(e){return oo(e)&&"string"==typeof e.token}function ao(e){return"string"==typeof e.uuid}function co(e){return e.runtime&&"string"==typeof e.runtime.version}function ho(e){return ao(e)&&co(e)}Object.defineProperty(io,"__esModule",{value:!0}),io.isInternalConnectConfig=io.isPortDiscoveryConfig=io.isNewConnectConfig=io.isConfigWithReceiver=io.isRemoteConfig=io.isExistingConnectConfig=io.isExternalConfig=void 0,io.isExternalConfig=ro,io.isExistingConnectConfig=oo,io.isRemoteConfig=so,io.isConfigWithReceiver=function(e){return"object"==typeof e.receiver&&so({...e,address:""})},io.isNewConnectConfig=ho,io.isPortDiscoveryConfig=function(e){return ro(e)&&co(e)||ho(e)},io.isInternalConnectConfig=function(e){return oo(e)||ho(e)};var lo={},uo={};Object.defineProperty(uo,"__esModule",{value:!0}),uo.EmitterMap=void 0;const po=t;function wo(e){return Buffer.from(e).toString("base64")}uo.EmitterMap=class{constructor(){this.storage=new Map}hashKeys(e){return e.map(wo).join("/")}getOrCreate(e){const t=this.hashKeys(e);return this.storage.has(t)||this.storage.set(t,new po.EventEmitter),this.storage.get(t)}has(e){return this.storage.has(this.hashKeys(e))}delete(e){const t=this.hashKeys(e);return this.storage.delete(t)}},Object.defineProperty(lo,"__esModule",{value:!0});const yo=uo;class fo extends yo.EmitterMap{constructor(){super(...arguments),this.dispatchEvent=e=>{if(function(e){return"process-desktop-event"===e.action}(e)){const{payload:t}=e,n=function(e){const{topic:t}=e;if("frame"===t||"window"===t||"view"===t){const{uuid:n,name:i}=e;return[t,n,i]}if("application"===t){const{uuid:n}=e;return[t,n]}return[t]}(t);if(this.has(n))return this.getOrCreate(n).emit(t.type,t),!0}return!1}}}lo.default=fo;var go,mo,vo=s&&s.__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},Co=s&&s.__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)},bo=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(no,"__esModule",{value:!0});var Io=no.Transport=void 0;const Eo=t,xo=io,Ao=g,Po=bo(lo),Mo=ki,_o=ke;class Oo extends Eo.EventEmitter{constructor(e,t,n){super(),this.wireListeners=new Map,this.topicRefMap=new Map,this.eventAggregator=new Po.default,this.messageHandlers=[this.eventAggregator.dispatchEvent],go.set(this,void 0),mo.set(this,void 0),this.connectSync=()=>{Co(this,go,"f").connectSync()},this.getPort=()=>Co(this,go,"f").getPort(),vo(this,go,new e(this.onmessage.bind(this)),"f"),this.environment=t,this.sendRaw=Co(this,go,"f").send.bind(Co(this,go,"f")),this.registerMessageHandler(this.handleMessage.bind(this)),Co(this,go,"f").on("disconnected",(()=>{for(const[,{handleNack:e}]of this.wireListeners)e({reason:"Remote connection has closed"});this.wireListeners.clear(),this.emit("disconnected")}));const{uuid:i,name:r}=n,o=this.environment.getCurrentEntityType();this.me=(0,Mo.getBaseMe)(o,i,r)}getFin(){if(!Co(this,mo,"f"))throw new Error("No Fin object registered for this transport");return Co(this,mo,"f")}registerFin(e){if(Co(this,mo,"f"))throw new Error("Fin object has already been registered for this transport");vo(this,mo,e,"f")}shutdown(){return Co(this,go,"f").shutdown()}async connect(e){if((0,xo.isConfigWithReceiver)(e))return await Co(this,go,"f").connect(e.receiver),this.authorize(e);if((0,xo.isRemoteConfig)(e))return this.connectRemote(e);if((0,xo.isExistingConnectConfig)(e))return this.connectByPort(e);if((0,xo.isNewConnectConfig)(e)){const t=await this.environment.retrievePort(e);return this.connectByPort({...e,address:`ws://localhost:${t}`})}}async connectRemote(e){return await Co(this,go,"f").connect(new(this.environment.getWsConstructor())(e.address)),this.authorize(e)}async connectByPort(e){const{address:t,uuid:n}=e,i={...e,type:"file-token"},r=Co(this,go,"f");await r.connect(new(this.environment.getWsConstructor())(e.address));const o=await this.sendAction("request-external-authorization",{uuid:n,type:"file-token"},!0);if("external-authorization-response"!==o.action)throw new Ao.UnexpectedActionError(o.action);return await this.environment.writeToken(o.payload.file,o.payload.token),this.authorize(i)}async authorize(e){const t=await this.sendAction("request-authorization",e,!0);if("authorization-response"!==t.action)throw new Ao.UnexpectedActionError(t.action);if(!0!==t.payload.success)throw new Ao.RuntimeError(t.payload)}sendAction(e,t={},n=!1){let i=()=>{};const r=Ao.RuntimeError.getCallSite(1),o=this.environment.getNextMessageId(),s=new Promise(((s,a)=>{i=a;const c={action:e,payload:t,messageId:o},d=Co(this,go,"f");return this.addWireListener(o,s,(e=>this.nackHandler(e,a,r)),n),d.send(c).catch(a)}));return Object.assign(s,{cancel:i,messageId:o})}nackHandler(e,t,n){t("string"==typeof e?e:new Ao.RuntimeError(e,n))}ferryAction(e){return new Promise(((t,n)=>{const i=this.environment.getNextMessageId();e.messageId=i;const r=e=>{t(e.payload)};return Co(this,go,"f").send(e).then((()=>this.addWireListener(i,r,(e=>this.nackHandler(e,n)),!1))).catch(n)}))}registerMessageHandler(e){this.messageHandlers.push(e)}addWireListener(e,t,n,i){i?this.uncorrelatedListener=t:this.wireListeners.has(e)?n({reason:"Duplicate handler id",error:(0,_o.errorToPOJO)(new Ao.DuplicateCorrelationError(String(e)))}):this.wireListeners.set(e,{resolve:t,handleNack:n})}onmessage(e){for(const t of this.messageHandlers)t.call(null,e)}handleMessage(e){const t=e.correlationId||NaN;if("correlationId"in e){if(!this.wireListeners.has(t))return!1;{const{resolve:n,handleNack:i}=this.wireListeners.get(t);"ack"!==e.action?i({reason:"Did not receive ack action",error:(0,_o.errorToPOJO)(new Ao.NoAckError(e.action))}):"payload"in e?e.payload.success?n.call(null,e):i(e.payload):"string"==typeof e.reason?i(e):(console.warn("Received invalid response from core",e),i({reason:"invalid response shape"})),this.wireListeners.delete(t)}}else this.uncorrelatedListener&&this.uncorrelatedListener.call(null,e),this.uncorrelatedListener=()=>{};return!0}}Io=no.Transport=Oo,go=new WeakMap,mo=new WeakMap;const So=(...e)=>({log:(...t)=>console.debug(`[${(new Date).toISOString()}]`,...(e=>e.map((e=>`[${e}]`)))(e),...t),getLogger:(...t)=>So(...e,...t)}),Ro=So("@openfin/core-web/client");function Fo(e,t){if(!function(e){return"string"==typeof e}(e))throw new Error(`Property ${t} has invalid type. Expected string, got ${typeof e}.`)}const jo="web-broker-ports-ready",ko=Ro.getLogger("get-web-interop-ports");function Lo(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)}function To(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}"function"==typeof SuppressedError&&SuppressedError;const $o=e=>{var n,i,r;return r=class extends t.EventEmitter{constructor(t){super(),n.set(this,void 0),i.set(this,!1),this.connectSync=()=>{Lo(this,i,"f")||(e.addEventListener("message",(e=>{e.data?.topic?.startsWith("wire-message")&&e.data.message&&Lo(this,n,"f").call(this,{...JSON.parse(e.data.message),ports:e.ports})})),e.start())},this.connect=async()=>{this.connectSync()},this.send=t=>(e.postMessage({topic:"wire-message",message:JSON.stringify(t)}),Promise.resolve()),this.shutdown=async()=>{e.close()},To(this,n,t,"f")}getPort(){return e}},n=new WeakMap,i=new WeakMap,r};var Bo={},Go={};Object.defineProperty(Go,"__esModule",{value:!0}),Go.BaseEnvironment=void 0;const Wo=vr();Go.BaseEnvironment=class{async getViewWindowIdentity(e,t){const{identity:n}=await e.View.wrapSync(t).getCurrentWindow();return n}async getInteropInfo(e){const t=await e.Application.getCurrentSync().getInfo().catch((()=>null)),n=t?.initialOptions?.interopBrokerConfiguration??{};return{fdc3Version:t?(0,Wo.getDefaultViewFdc3VersionFromAppInfo)(t):void 0,...n,fdc3Info:{providerVersion:await e.System.getVersion(),provider:"OpenFin"}}}},Object.defineProperty(Bo,"__esModule",{value:!0});var Ho=Bo.BrowserEnvironment=void 0;const No=Go;class Do extends No.BaseEnvironment{constructor(){super(...arguments),this.type="other",this.getRandomId=()=>{const e=new Uint32Array(1);return window.crypto.getRandomValues(e)[0].toString(32)}}getAdapterVersionSync(){return""}observeBounds(e,t){throw new Error("Method not implemented.")}layoutAllowedInContext(e){return!1}initLayoutManager(e,t,n){throw new Error("Method not implemented.")}applyLayoutSnapshot(e,t,n){throw new Error("Method not implemented.")}createLayout(e,t){throw new Error("Method not implemented.")}destroyLayout(e,t){throw new Error("Method not implemented.")}resolveLayout(e,t){throw new Error("Method not implemented.")}initPlatform(...e){throw new Error("Method not implemented.")}writeToken(e,t){return Promise.resolve("")}retrievePort(e){throw new Error("Method not implemented.")}getNextMessageId(){return this.getRandomId()}createChildContent(e){throw new Error("Method not implemented.")}getWebWindow(e){throw new Error("Method not implemented.")}getCurrentEntityIdentity(){throw new Error("Method not implemented.")}getCurrentEntityType(){return"external connection"}raiseEvent(e,t){throw new Error("Method not implemented.")}getUrl(){return location.href}getDefaultChannelOptions(){return{create:{},connect:{}}}getRtcPeer(){return new RTCPeerConnection}getWsConstructor(){return WebSocket}whenReady(){return Promise.resolve()}}Ho=Bo.BrowserEnvironment=Do;const Uo=e=>"platform"in e&&void 0!==e.platform;var Vo,zo;class Ko extends Ho{constructor(e){super(),this.connectConfig=e,Vo.set(this,void 0),zo.set(this,new W((async()=>Promise.resolve().then((function(){return __webpack_require__(/*! ./main-b14f67c9.js */ "../../node_modules/@openfin/core-web/out/main-b14f67c9.js")}))))),Uo(e)&&this.validatePlatformOptions(e)}getAdapterVersionSync(){return"0.39.21"}validatePlatformOptions({platform:e}){if(!("layoutSnapshot"in e))throw new Error("Platform options are missing layoutSnapshot. Please provide a layoutSnapshot in the platform options.");if("windows"in e||"windows"in e.layoutSnapshot)throw new Error("It appears you tried to call connect() with a snapshot object from an OpenFin desktop environment. Note that connect() expects to be called with a platform property with this structure: { platform: { layoutSnapshot } }. To get a layoutSnapshot of the expected structure, use fin.Platform.Layout.getCurrentLayoutManagerSync().getLayoutSnapshot() in v34+ in your desktop environment.");const{layouts:t}=e.layoutSnapshot;Object.entries(t).map((([e,t])=>{if("object"!=typeof t||null===t)throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must be an object.`);if(!("content"in t))throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must contain a 'content' property.`)}))}async getInteropInfo(e){return{...{contextGroups:void 0,logging:{beforeAction:{enabled:!1},afterAction:{enabled:!1}}},fdc3Version:void 0,fdc3Info:{providerVersion:"0.39.21",provider:"OpenFin Web"}}}layoutAllowedInContext(e){return!0}async initLayoutManager(e,t,n){if(Lo(this,Vo,"f"))throw new Error("Layout already initialized.");if(!Uo(this.connectConfig))throw new Error("Platform options are missing from connection config.");const{WebLayoutEntryPoint:i}=await Lo(this,zo,"f").getValue();return To(this,Vo,new i(this.connectConfig),"f"),await Lo(this,Vo,"f").initLayoutManager(e,t,n)}async applyLayoutSnapshot(e,t,n){Lo(this,Vo,"f")?.applyLayoutSnapshot(e,t,n)}async createLayout(e,t){return Lo(this,Vo,"f")?.createLayout(e,t)}async destroyLayout(e,t){return Lo(this,Vo,"f")?.destroyLayout(e,t)}async getViewWindowIdentity(e,t){return Promise.resolve({uuid:t.uuid,name:t.uuid})}}Vo=new WeakMap,zo=new WeakMap;const qo=()=>{const e=((e,t)=>{const n=new RegExp(`^${t}<(?.*)>$`).exec(e)?.groups?.meta;if(n)try{return JSON.parse(atob(n))}catch(e){throw new Error(`Failed to decode JSON from ${n}.`)}})(window.name,"of-frame");if(e)try{const{name:t,uuid:n,brokerUrl:i,providerId:r,contextGroup:o}=e;return Fo(i,"brokerUrl"),Fo(n,"uuid"),Fo(t,"name"),{identity:{name:t,uuid:n},brokerUrl:i,interopConfig:{providerId:r,currentContextGroup:o}}}catch(e){throw new Error(`Unexpected error occurred when inferring platform information: ${e.stack}`)}},Jo=()=>{const e=r.v4();return{uuid:e,name:e}},Yo=async e=>{if("enabled"===e.connectionInheritance){const t=await(async e=>{const t=qo();if(t){const{validateOptions:n=(()=>!0)}=e,{identity:i,...r}=t;if(!await n(r))throw new Error("Parent options were rejected by validateOptions.");return t}})(e);if(t)return t}if(!e.options){const t="enabled"===e.connectionInheritance?"Broker URL was not specified nor provided by a platform container.":"Connection inheritance is disabled but no options were provided.";throw new Error(t)}return{...e.options,identity:Jo()}};exports.__classPrivateFieldGet=Lo,exports.__classPrivateFieldSet=To,exports.apiExposer=Gn,exports.commonjsGlobal=s,exports.connect=async t=>{try{Ro.log("Establishing connection",t);const{brokerUrl:n,identity:i,timeout:r,interopConfig:s}=await Yo(t),{workerPort:a,iframeBrokerPort:c}=await(async(e,t,n)=>{const{origin:i}=new URL(e),r=document.createElement("IFRAME");let s;r.style.display="none";try{return await new Promise(((a,c)=>{const d=e=>{if(e.source===r.contentWindow&&e.data?.topic===`ack-${jo}`){if(e.origin!==i)c(new Error(`Broker redirected to unexpected origin ${e.origin}, expected ${i}.`));else if(e.data.success){const[t,n]=e.ports;a({iframeBrokerPort:t,workerPort:n})}else c(new m(e.data));window.removeEventListener("message",d),clearTimeout(s)}};window.addEventListener("message",d),ko.log(`Connecting to broker ${e}`),r.setAttribute("src",e),r.setAttribute("name",o(t,"of-broker")),document.body.appendChild(r),ko.log("Iframe loaded, awaiting init message from iframe"),n&&(s=setTimeout((()=>{window.removeEventListener("message",d),document.body.removeChild(r),c(new Error("Worker did not initialize in time"))}),n))}))}catch(e){throw new Error(`Failed to initialise Fin Web Client. ${e.message}`,{cause:e})}})(n,i,r);Ro.log("Successfully established connection to shared worker");const d={entityType:"external connection",...i};a.start(),c.start();const h=((t,n,i)=>{const r=$o(n),o=new Ko(t),s=new Io(r,o,i);return s.connectSync(),window.Buffer=e.Buffer,new Wr(s)})(t,a,d);return s?.providerId&&(h.me.interop=h.Interop.connectSync(s.providerId),s?.currentContextGroup&&h.me.interop.joinContextGroup(s.currentContextGroup).catch((e=>{console.warn(`Error joining specified context group: ${s?.currentContextGroup}, continuing`,e)}))),{...h,me:{...h.me,identity:{uuid:h.me.uuid,name:h.me.name}}}}catch(e){throw new Error(`An error occured during web-interop connection: ${e.message}`)}},exports.decorators=Nn,exports.encodeOptions=o,exports.layout_constants=ai,exports.lazy=G; /***/ }), -/***/ "./node_modules/@openfin/core-web/out/main-b14f67c9.js": -/*!*************************************************************!*\ - !*** ./node_modules/@openfin/core-web/out/main-b14f67c9.js ***! - \*************************************************************/ +/***/ "../../node_modules/@openfin/core-web/out/main-b14f67c9.js": +/*!*****************************************************************!*\ + !*** ../../node_modules/@openfin/core-web/out/main-b14f67c9.js ***! + \*****************************************************************/ /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; -var t=__webpack_require__(/*! ./main-8cad4070.js */ "./node_modules/@openfin/core-web/out/main-8cad4070.js"),e=__webpack_require__(/*! uuid */ "../../node_modules/uuid/dist/esm-browser/index.js");__webpack_require__(/*! buffer/ */ "../../node_modules/buffer/index.js"),__webpack_require__(/*! events */ "../../node_modules/events/events.js"),__webpack_require__(/*! lodash/cloneDeep */ "../../node_modules/lodash/cloneDeep.js"),__webpack_require__(/*! lodash/isEqual */ "../../node_modules/lodash/isEqual.js");var i={},n={};Object.defineProperty(n,"__esModule",{value:!0}),n.mapValuesAsync=n.mapEntriesAsync=void 0;const o=(t,[e,i])=>({...t,[e]:i});async function s(t,e){return(await Promise.all(e.map((async([e,i])=>[e,await t(i,e)])))).reduce(o,{})}n.mapEntriesAsync=s,n.mapValuesAsync=async function(t,e){let i;return i=e instanceof Map?[...e.entries()]:Object.entries(e),s(t,i)};var r,a,l,h,d=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldSet||function(t,e,i,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(t,i):o?o.value=i:e.set(t,i),i},c=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldGet||function(t,e,i,n){if("a"===i&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?n:"a"===i?n.call(t):n?n.value:e.get(t)};Object.defineProperty(i,"__esModule",{value:!0});var m=i.DefaultLayoutManager=void 0;const u=n;class p{constructor(t){a.set(this,void 0),l.set(this,new Map),d(this,a,t,"f")}size(){return c(this,l,"f").size}async applyLayoutSnapshot({layouts:t}){if(Object.keys(t).length>1)throw new Error("[LayoutManager] Tried to call applyLayoutSnapshot with more than 1 layout. When implementing multiple layouts via overridden LayoutManager class, you must override and fully implement the applyLayoutSnapshot method without calling super.applyLayoutSnapshot().");const[[e,i]]=Object.entries(t);await p.createLayout(this,{layoutName:e,layout:i})}async showLayout({layoutName:t}){}async getLayoutSnapshot(){return{layouts:await(0,u.mapValuesAsync)((t=>t.getFrameSnapshot()),c(this,l,"f"))}}async removeLayout({layoutName:t}){}getLayoutIdentityForView(t){const e=[...c(this,l,"f").values()].find((e=>e.getCurrentViews().some((e=>e.name===t.name&&e.uuid===t.uuid))));return e?.identity??void 0}isLayoutVisible({layoutName:t}){return c(p,r,"m",h).call(p,this,t).isVisible()}resolveLayoutIdentity(t){if(t&&"layoutName"in t)return t;const e=[...c(this,l,"f").values()];if(1===e.length)return e[0].identity;const i=e.find((t=>t.isVisible()));return i?.identity??void 0}static async resolveLayout(t,e){const i=t.resolveLayoutIdentity(e);if(void 0===i||!("layoutName"in i))throw new Error("[layout-manager] resolveLayout: Could not resolve the layout identity. Make sure you include 'layoutName' in the identity object.");return c(p,r,"m",h).call(p,t,i.layoutName)}static async handleSharedView(t,e,i){await(0,u.mapValuesAsync)((async t=>{if(t.identity.layoutName!==e.layoutName){const e=t.getCurrentViews().find((t=>t.name===i.name));e&&await t.onViewDetached({viewIdentity:e,target:null}).catch(console.error)}}),c(t,l,"f"))}static async handleLastViewRemoved(t,e){await t.removeLayout(e),await c(t,a,"f").handleLastViewRemoved(t)}static async destroyLayout(t,{layoutName:e}){await c(p,r,"m",h).call(p,t,e).destroy(),c(t,l,"f").delete(e)}static async createLayout(t,e){const{layoutName:i}=e;if(c(t,l,"f").has(i))throw new Error(`Layout name ${i} already exists`);await c(t,a,"f").createLayout(e,t)}static registerLayout(t,e,i){c(t,l,"f").set(e,i)}static getAllLayouts(t){return[...c(t,l,"f").values()]}static setInitialSnapshot(t,e){c(t,a,"f").setInitialSnapshot(e)}static createClosedConstructor(...t){return class extends p{constructor(){super(...t)}}}}m=i.DefaultLayoutManager=p,r=p,a=new WeakMap,l=new WeakMap,h=function(t,e){const i=c(t,l,"f").get(e);if(!i)throw new Error(`[layout-manager] getLayoutByName: Could not locate layout with name '${e}'`);return i};var g={},f={},v={};Object.defineProperty(v,"__esModule",{value:!0}),v.ReversibleMap=void 0;v.ReversibleMap=class{constructor(){this.valueToKey=new Map,this.keyToValue=new Map,this.setUnique=(t,e)=>{if(this.hasKey(t)||this.hasValue(e))throw new Error("Key or value already in the map.");this.keyToValue.set(t,e),this.valueToKey.set(e,t)},this.getKey=t=>{const e=this.valueToKey.get(t);if(!e)throw new Error("Value not found in the map.");return e},this.deleteKey=t=>{const e=this.getValue(t);return this.keyToValue.delete(t),this.valueToKey.delete(e),e},this.deleteValue=t=>{const e=this.getKey(t);return this.keyToValue.delete(e),this.valueToKey.delete(t),e},this.hasKey=t=>this.keyToValue.has(t),this.hasValue=t=>this.valueToKey.has(t)}getValue(t){const e=this.keyToValue.get(t);if(!e)throw new Error("Key not found in the map.");return e}},Object.defineProperty(f,"__esModule",{value:!0});var _=f.LayoutContentCache=void 0;const y=t.lazy,C=v;class w{constructor(){this.contentItemCache=new C.ReversibleMap,this.contentItemCacheId=0,this.createCacheKey=()=>{const t=`entity-${this.contentItemCacheId.toString()}`;return this.contentItemCacheId+=1,t},this.hasKey=t=>this.contentItemCache.hasKey(t),this.getItemOrUndefined=t=>{try{return this.getContentItemOrThrow(t)}catch(t){return}},this.getContentItemOrThrow=(t,e)=>{if(!this.contentItemCache.hasKey(t))throw new Error("Layout component has been destroyed or detached from the current layout.");const i=this.contentItemCache.getValue(t);if(e&&!e.includes(i.type))throw new Error(`Layout item is not the expected type. Expected ${e.join(", ")}, got ${i.type}.`);return i},this.getOrCreateEntityId=t=>{if(this.contentItemCache.hasValue(t))return this.contentItemCache.getKey(t);t.onDestroyed((()=>{this.contentItemCache.deleteValue(t)}));const e=this.createCacheKey();return this.contentItemCache.setUnique(e,t),e}}static getSingleInstance(){return w.singleton.getValue()}}_=f.LayoutContentCache=w,w.singleton=new y.Lazy((()=>new w));var I={},b={};!function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.getAdjacentStacks=t.doShareEdge=t.getAdjacentItem=void 0;t.getAdjacentItem=(e,i)=>{const{parent:n}=e;if(e.isRoot()||!n)return;const o=["top","bottom"].includes(i)?"column":"row",s=["top","left"].includes(i)?-1:1;if(n.type===o){const t=n.contentItems.indexOf(e)+s;if(t>=0&&t{const n=t.getBounds(),o=e.getBounds();if(!n||!o)return!1;if(["top","bottom"].includes(i)){return!(n.righto.right)}return!(n.bottomo.bottom)};t.getAdjacentStacks=(e,i)=>{const n=["top","bottom"].includes(i)?"row":"column",o=s=>"stack"===s.type?(0,t.doShareEdge)(e,s,i)?[s]:[]:"root"===s.type||"ground"===s.type?[]:s.type===n?s.contentItems.map((t=>o(t))).flat():s.type!==n?["top","right"].includes(i)?o(s.contentItems[s.contentItems.length-1]):o(s.contentItems[0]):[],s=(0,t.getAdjacentItem)(e,i);return s?o(s):[]}}(b);var S=t.commonjsGlobal&&t.commonjsGlobal.__decorate||function(t,e,i,n){var o,s=arguments.length,r=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(s<3?o(r):s>3?o(e,i,r):o(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};Object.defineProperty(I,"__esModule",{value:!0}),I.LayoutEntitiesController=void 0;const E=t.decorators,x=b,L=i;class z{constructor(t,e,i){this.wire=t,this.layoutManager=e,this.layoutContentCache=i,this.analytics=t=>{this.wire.sendAction(`layout-controller-${t}`).catch((()=>{}))},this.getLayoutIdentityForViewOrThrow=async t=>{const e=this.layoutManager.getLayoutIdentityForView(t);if(!e)throw new Error(`View identity ${t.name} is not attached to any layouts.`);return e},this.getRoot=async t=>{this.analytics("get-root");const e=(await this.getLayout(t)).getRoot();return{type:e.type,entityId:this.layoutContentCache.getOrCreateEntityId(e)}},this.getStackByView=async t=>{this.analytics("get-stack-by-view");const e=await this.getLayoutIdentityForViewOrThrow(t),i=(await this.getLayout(e)).getStackByView(t);if("stack"===i?.type)return{entityId:this.layoutContentCache.getOrCreateEntityId(i),type:"stack"}},this.getStackViews=t=>{this.analytics("get-stack-views");return this.layoutContentCache.getContentItemOrThrow(t,["stack"]).contentItems.map((t=>({name:t.viewName,uuid:this.wire.me.uuid})))},this.isRoot=t=>{this.analytics("is-root");return this.layoutContentCache.getContentItemOrThrow(t).isRoot()},this.exists=t=>(this.analytics("exists"),this.layoutContentCache.hasKey(t)),this.addViewToStack=async(t,e,{index:i}={index:0})=>{this.analytics("add-view-to-stack");const n=this.layoutContentCache.getContentItemOrThrow(t);if(i&&i>n.contentItems.length+1)throw new Error(`Index '${i}' out of range, please exclude the index or specify a number between 0 and ${n.contentItems.length}`);const o={id:t,index:i},{identity:s}=await n.layout.platformCreateView(e,{location:o});return s},this.findViewInStack=(t,e)=>t.contentItems.find((t=>t.viewName===e.name)),this.removeViewFromStack=async(t,e)=>{this.analytics("remove-view-from-stack");const i=this.layoutContentCache.getContentItemOrThrow(t,["stack"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to remove a view ('${e.name}') which does not belong to the stack.`);await n.layout.platformCloseView(e)},this.createAdjacentStack=async(t,e,{position:i="right"}={})=>{if(this.analytics("create-adjacent-stack"),!Array.isArray(e)||0===e.length)throw new Error('The parameter "views" must be an array with at least 1 element.');if(!["top","bottom","left","right"].includes(i))throw new Error(`Invalid position '${i}' specified.`);const n=this.layoutContentCache.getContentItemOrThrow(t).createAdjacentStack({position:i}),o=this.layoutContentCache.getOrCreateEntityId(n);return await Promise.all(e.reverse().map((t=>this.addViewToStack(o,t)))),o},this.getAdjacentStacks=async({targetId:t,edge:e})=>{this.analytics("get-adjacent-stacks");const i=this.layoutContentCache.getContentItemOrThrow(t);return(0,x.getAdjacentStacks)(i,e).map((t=>({entityId:this.layoutContentCache.getOrCreateEntityId(t)})))},this.setStackActiveView=async(t,e)=>{this.analytics("set-stack-active-view");const i=this.layoutContentCache.getContentItemOrThrow(t,["stack"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to set a view ('${e.name}') as active when it does not belong to the stack.`);i.setActiveContentItem(n,!0)}}async getLayout(t){const e=await L.DefaultLayoutManager.resolveLayout(this.layoutManager,t);if(!e)throw new Error(`Could not resolve target layout identity ${JSON.stringify(t)}`);return e}getContent(t){this.analytics("get-content");return this.layoutContentCache.getContentItemOrThrow(t,["column","row"]).contentItems.map((t=>({type:t.type,entityId:this.layoutContentCache.getOrCreateEntityId(t)})))}getParent(t){this.analytics("get-parent");const e=this.layoutContentCache.getContentItemOrThrow(t);if(!e.isRoot())return e.parent?.contentItems.includes(e)?{type:e.parent.type,entityId:this.layoutContentCache.getOrCreateEntityId(e.parent)}:void 0}}S([(0,E.expose)()],z.prototype,"getLayoutIdentityForViewOrThrow",void 0),S([(0,E.expose)()],z.prototype,"getRoot",void 0),S([(0,E.expose)()],z.prototype,"getStackByView",void 0),S([(0,E.expose)()],z.prototype,"getStackViews",void 0),S([(0,E.expose)()],z.prototype,"getContent",null),S([(0,E.expose)()],z.prototype,"getParent",null),S([(0,E.expose)()],z.prototype,"isRoot",void 0),S([(0,E.expose)()],z.prototype,"exists",void 0),S([(0,E.expose)()],z.prototype,"addViewToStack",void 0),S([(0,E.expose)()],z.prototype,"removeViewFromStack",void 0),S([(0,E.expose)()],z.prototype,"createAdjacentStack",void 0),S([(0,E.expose)()],z.prototype,"getAdjacentStacks",void 0),S([(0,E.expose)()],z.prototype,"setStackActiveView",void 0),I.LayoutEntitiesController=z,Object.defineProperty(g,"__esModule",{value:!0});var M=g.initLayoutEndpoints=void 0;const P=t.apiExposer,T=t.layout_constants,A=f,k=I,D=i;M=g.initLayoutEndpoints=async function(t,e){const i=t.getFin(),n=await i.Platform.getCurrentSync().getClient(),o=new P.ChannelsExposer(n);await new P.ApiExposer(o).exposeInstance(new k.LayoutEntitiesController(t,e,A.LayoutContentCache.getSingleInstance()),{id:T.LAYOUT_CONTROLLER_ID}),await async function(t,e){const i=t=>async i=>{const n=await D.DefaultLayoutManager.resolveLayout(e,i.target);if(!n)throw new Error(`Could not resolve the layout target from payload ${JSON.stringify(i)}`);return t(n,i)},n=(e,n)=>{t.register(e,i(n))},o=(t,e)=>{n(t,e)};n("replace-view",((t,e)=>t.replaceView(e))),n("replace-layout",((t,{layout:e})=>t.replaceLayout(e))),n("add-view",((t,e)=>t.insertView(e))),o("layout-add-view",((t,{viewOptions:e,location:i,targetView:n})=>t.platformCreateView(e,{location:i,targetView:n}))),n("close-view",((t,e)=>t.cleanupView(e.viewIdentity))),o("layout-close-view",((t,e)=>t.platformCloseView(e.viewIdentity))),n("apply-preset-layout",((t,e)=>t.applyPreset(e))),n("get-layout-views",(t=>t.getCurrentViews())),n("get-frame-snapshot",(t=>t.getFrameSnapshot())),n("is-visible",(t=>t.isVisible())),n("destroy",(t=>t.destroy())),t.register("get-layout-snapshot",(()=>e.getLayoutSnapshot()))}(n,e)};var R={};Object.defineProperty(R,"__esModule",{value:!0});var U=R.BaseLayout=void 0;U=R.BaseLayout=class{};var O={};Object.defineProperty(O,"__esModule",{value:!0});var V=O.DOMEmitter=void 0;V=O.DOMEmitter=class{constructor(t){this.container=t}dispatchLocalEvent(t,e){const i={...e,type:t,tabSelector:`tab-${e.name}`,containerSelector:`container-${e.name}`,topic:"openfin-DOM-event"};this.container.dispatchEvent(new CustomEvent(t,{detail:i}))}};var B={};Object.defineProperty(B,"__esModule",{value:!0});var H=B.mapLayoutContentItemsImmutableSync=B.mapLayoutContentItemsImmutable=W=B.isVisible=void 0;var W=B.isVisible=t=>(0!==t.offsetWidth||0!==t.offsetHeight)&&"hidden"!==window.getComputedStyle(t).visibility&&t.offsetTop>=0&&t.offsetLeft>=0&&t.offsetTop<=window.innerHeight&&t.offsetLeft<=window.innerWidth;const F=t=>"type"in t&&"component"===t.type;B.mapLayoutContentItemsImmutable=async function t(e,i){return F(i)?e(i):{...i,content:await Promise.all(i.content?.map((i=>t(e,i))))}},H=B.mapLayoutContentItemsImmutableSync=function t(e,i){return F(i)?e(i):{...i,content:i.content?.map((i=>t(e,i)))}};class N extends Error{constructor(t,e){super(e),this.type=t}}class G extends N{constructor(t,e){super("Configuration",t),this.node=e}}class j extends N{constructor(t){super("PopoutBlocked",t)}}class $ extends N{constructor(t){super("API",t)}}class Z extends N{constructor(t){super("Bind",t)}}class q extends Error{constructor(t,e,i){super(`${t}: ${e}${void 0===i?"":": "+i}`)}}class X extends q{constructor(t,e){super("Assert",t,e)}}class Y extends q{constructor(t,e,i){super("UnreachableCase",t,`${e}${void 0===i?"":": "+i}`)}}class K extends q{constructor(t,e){super("UnexpectedNull",t,e)}}class J extends q{constructor(t,e){super("UnexpectedUndefined",t,e)}}var Q;!function(t){let e=!1;const i={PopoutCannotBeCreatedWithGroundItemConfig:{id:0,default:"Popout cannot be created with ground ItemConfig"},PleaseRegisterAConstructorFunction:{id:1,default:"Please register a constructor function"},ComponentTypeNotRegisteredAndBindComponentEventHandlerNotAssigned:{id:2,default:"Component type not registered and BindComponentEvent handler not assigned"},ComponentIsAlreadyRegistered:{id:3,default:"Component is already registered"},ComponentIsNotVirtuable:{id:4,default:"Component is not virtuable. Requires rootHtmlElement field/getter"},VirtualComponentDoesNotHaveRootHtmlElement:{id:5,default:'Virtual component does not have getter "rootHtmlElement"'},ItemConfigIsNotTypeComponent:{id:6,default:"ItemConfig is not of type component"},InvalidNumberPartInSizeString:{id:7,default:"Invalid number part in size string"},UnknownUnitInSizeString:{id:8,default:"Unknown unit in size string"},UnsupportedUnitInSizeString:{id:9,default:"Unsupported unit in size string"}};t.idCount=Object.keys(i).length;const n=Object.values(i);t.checkInitialise=function(){if(!e)for(let e=0;e="0"&&t<="9"}function Tt(t,e){const i=zt(e);t.style.width=i}function At(t,e){const i=zt(e);t.style.height=i}function kt(t){return{width:t.offsetWidth,height:t.offsetHeight}}function Dt(t,e){t.style.display=e?"":"none"}function Rt(t,e){if(void 0!==e)for(const i in e)if(e.hasOwnProperty(i)){const n=e[i],o=t[i];t[i]=Ut(o,n)}return t}function Ut(t,e){if("object"!=typeof e)return e;if(Array.isArray(e)){const t=e.length,i=new Array(t);for(let n=0;n36)throw new Error("Too many keys in config minifier map")},t.translateObject=n}(dt||(dt={})),function(t){t.defaults={type:at.ground,content:[],size:1,sizeUnit:ht.Fractional,minSize:void 0,minSizeUnit:ht.Pixel,id:"",isClosable:!0},t.createCopy=function(t,e){switch(t.type){case at.ground:case at.row:case at.column:return gt.createCopy(t,e);case at.stack:return ut.createCopy(t,e);case at.component:return pt.createCopy(t);default:throw new Y("CICC91354",t.type,"Invalid Config Item type specified")}},t.createDefault=function(t){switch(t){case at.ground:throw new X("CICCDR91562");case at.row:case at.column:return gt.createDefault(t);case at.stack:return ut.createDefault();case at.component:return pt.createDefault();default:throw new Y("CICCDD91563",t,"Invalid Config Item type specified")}},t.isComponentItem=function(t){return t.type===at.component},t.isStackItem=function(t){return t.type===at.stack},t.isGroundItem=function(t){return t.type===at.ground}}(ct||(ct={})),function(t){t.defaultMaximised=!1,function(t){t.createCopy=function(t,e){return void 0===t?void 0:{show:null!=e?e:t.show,popout:t.popout,close:t.close,maximise:t.maximise,minimise:t.minimise,tabDropdown:t.tabDropdown}}}(t.Header||(t.Header={}))}(mt||(mt={})),function(t){function e(t){const e=t.length,i=new Array(e);for(let n=0;n"__glMaximised"===t));t>0&&(o=!0,n=n.splice(t,1)),e=n.length>0?n[0]:ct.defaults.id}else e=n;return i=void 0!==t.maximised?t.maximised:o,{id:e,maximised:i}}}(wt||(wt={})),function(t){function e(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0;return{resolved:!0,root:Et.resolve(i),openPopouts:t.resolveOpenPopouts(e.openPopouts),dimensions:t.Dimensions.resolve(e.dimensions),settings:t.Settings.resolve(e.settings),header:t.Header.resolve(e.header,e.settings,e.labels)}}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:Lt.fromResolvedArray(e.openPopouts),settings:_t.Settings.createCopy(e.settings),dimensions:t.Dimensions.fromResolved(e.dimensions),header:_t.Header.createCopy(e.header)}},t.isResolved=function(t){const e=t;return void 0!==e.resolved&&!0===e.resolved},t.resolveOpenPopouts=function(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0,{root:Et.resolve(o),openPopouts:xt.resolveOpenPopouts(e.openPopouts),dimensions:xt.Dimensions.resolve(e.dimensions),settings:xt.Settings.resolve(e.settings),header:xt.Header.resolve(e.header,e.settings,e.labels),parentId:null!==(i=e.parentId)&&void 0!==i?i:null,indexInParent:null!==(n=e.indexInParent)&&void 0!==n?n:null,window:t.Window.resolve(e.window,e.dimensions),resolved:!0}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:i(e.openPopouts),dimensions:xt.Dimensions.fromResolved(e.dimensions),settings:_t.Settings.createCopy(e.settings),header:_t.Header.createCopy(e.header),parentId:e.parentId,indexInParent:e.indexInParent,window:t.Window.fromResolved(e.window)}},t.fromResolvedArray=i}(Lt||(Lt={}));class Wt{constructor(){this._allEventSubscriptions=[],this._subscriptionsMap=new Map,this.unbind=this.removeEventListener,this.trigger=this.emit}tryBubbleEvent(t,e){}emit(t,...e){let i=this._subscriptionsMap.get(t);if(void 0!==i){i=i.slice();for(let t=0;t0){const n=e.slice();n.unshift(t);const o=this._allEventSubscriptions.slice();for(let t=0;t0?n.contentItems[0]:n,e=0);const o=this._layoutManager.createAndInitContentItem(i,t);t.addChild(o,e),this._layoutManager.layoutConfig.settings.popInOnClose?this._onClose():this.close()}createWindow(){const t=this.createUrl(),e=Math.floor(1e6*Math.random()).toString(36),i=this.serializeWindowFeatures({width:this._initialWindowSize.width,height:this._initialWindowSize.height,innerWidth:this._initialWindowSize.width,innerHeight:this._initialWindowSize.height,menubar:"no",toolbar:"no",location:"no",personalbar:"no",resizable:"yes",scrollbars:"no",status:"no"});if(this._popoutWindow=globalThis.open(t,e,i),this._popoutWindow)this._popoutWindow.addEventListener("load",(()=>this.positionWindow()),{passive:!0}),this._popoutWindow.addEventListener("beforeunload",(()=>{this._layoutManager.layoutConfig.settings.popInOnClose?this.popIn():this._onClose()}),{passive:!0}),this._checkReadyInterval=setInterval((()=>this.checkReady()),10);else if(!0===this._layoutManager.layoutConfig.settings.blockedPopoutsThrowError){throw new j("Popout blocked")}}checkReady(){if(null===this._popoutWindow)throw new K("BPCR01844");this._popoutWindow.__glInstance&&this._popoutWindow.__glInstance.isInitialised&&(this.onInitialised(),void 0!==this._checkReadyInterval&&(clearInterval(this._checkReadyInterval),this._checkReadyInterval=void 0))}serializeWindowFeatures(t){const e=[];for(const i in t)e.push(i+"="+t[i].toString());return e.join(",")}createUrl(){const t="gl-window-config-"+Ot(),e=_t.minifyConfig(this._config);try{localStorage.setItem(t,JSON.stringify(e))}catch(t){throw new Error("Error while writing to localStorage "+function(t){return t instanceof Error?t.message:"string"==typeof t?t:"Unknown Error"}(t))}const i=new URL(location.href);return i.searchParams.set("gl-window",t),i.toString()}positionWindow(){if(null===this._popoutWindow)throw new Error("BrowserPopout.positionWindow: null popoutWindow");this._popoutWindow.moveTo(this._initialWindowSize.left,this._initialWindowSize.top),this._popoutWindow.focus()}onInitialised(){this._isInitialised=!0,this.getGlInstance().on("popIn",(()=>this.popIn())),this.emit("initialised")}_onClose(){setTimeout((()=>this.emit("closed")),50)}}class Gt extends Wt{constructor(t,e,i,n){super(),this.layoutManager=t,this._parent=i,this._element=n,this._popInParentIds=[],this._type=e.type,this._id=e.id,this._isInitialised=!1,this.isGround=!1,this.isRow=!1,this.isColumn=!1,this.isStack=!1,this.isComponent=!1,this.size=e.size,this.sizeUnit=e.sizeUnit,this.minSize=e.minSize,this.minSizeUnit=e.minSizeUnit,this._isClosable=e.isClosable,this._pendingEventPropagations={},this._throttledEvents=["stateChanged"],this._contentItems=this.createContentItems(e.content)}get type(){return this._type}get id(){return this._id}set id(t){this._id=t}get popInParentIds(){return this._popInParentIds}get parent(){return this._parent}get contentItems(){return this._contentItems}get isClosable(){return this._isClosable}get element(){return this._element}get isInitialised(){return this._isInitialised}static isStack(t){return t.isStack}static isComponentItem(t){return t.isComponent}static isComponentParentableItem(t){return t.isStack||t.isGround}removeChild(t,e=!1){const i=this._contentItems.indexOf(t);if(-1===i)throw new Error("Can't remove child item. Unknown content item");if(e||this._contentItems[i].destroy(),this._contentItems.splice(i,1),this._contentItems.length>0)this.updateSize(!1);else if(!this.isGround&&!0===this._isClosable){if(null===this._parent)throw new K("CIUC00874");this._parent.removeChild(this)}}addChild(t,e,i){return null!=e||(e=this._contentItems.length),this._contentItems.splice(e,0,t),t.setParent(this),!0===this._isInitialised&&!1===t._isInitialised&&t.init(),e}replaceChild(t,e,i=!1){const n=this._contentItems.indexOf(t),o=t._element.parentNode;if(-1===n)throw new X("CIRCI23232","Can't replace child. oldChild is not child of this");if(null===o)throw new K("CIRCP23232");if(o.replaceChild(e._element,t._element),!0===i&&(t._parent=null,t.destroy()),this._contentItems[n]=e,e.setParent(this),e.size=t.size,e.sizeUnit=t.sizeUnit,e.minSize=t.minSize,e.minSizeUnit=t.minSizeUnit,null===e._parent)throw new K("CIRCNC45699");!0===e._parent._isInitialised&&!1===e._isInitialised&&e.init(),this.updateSize(!1)}remove(){if(null===this._parent)throw new K("CIR11110");this._parent.removeChild(this)}popout(){const t=Ot(),e=this.layoutManager.createPopoutFromContentItem(this,void 0,t,void 0);return this.emitBaseBubblingEvent("stateChanged"),e}calculateConfigContent(){const t=this._contentItems,e=t.length,i=new Array(e);for(let n=0;nthis.propagateEventToLayoutManager(t,e))))}propagateEventToLayoutManager(t,e){this._pendingEventPropagations[t]=!1,this.layoutManager.emitUnknown(t,e)}}class jt extends Gt{constructor(t,e,i){super(t,e,i,document.createElement("div")),this._parentItem=i,this._focused=!1,this.isComponent=!0,this._reorderEnabled=e.reorderEnabled,this.applyUpdatableConfig(e),this._initialWantMaximise=e.maximised;const n=document.createElement("div");n.classList.add("lm_content"),this.element.appendChild(n),this._container=new Ft(e,this,t,n,(t=>this.handleUpdateItemConfigEvent(t)),(()=>this.show()),(()=>this.hide()),(t=>this.focus(t)),(t=>this.blur(t)))}get componentName(){return this._container.componentType}get componentType(){return this._container.componentType}get reorderEnabled(){return this._reorderEnabled}get initialWantMaximise(){return this._initialWantMaximise}get component(){return this._container.component}get container(){return this._container}get parentItem(){return this._parentItem}get headerConfig(){return this._headerConfig}get title(){return this._title}get tab(){return this._tab}get focused(){return this._focused}destroy(){this._container.destroy(),super.destroy()}applyUpdatableConfig(t){this.setTitle(t.title),this._headerConfig=t.header}toConfig(){const t=this._container.stateRequestEvent,e=void 0===t?this._container.state:t();return{type:at.component,content:[],size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,maximised:!1,isClosable:this.isClosable,reorderEnabled:this._reorderEnabled,title:this._title,header:mt.Header.createCopy(this._headerConfig),componentType:pt.copyComponentType(this.componentType),componentState:e}}close(){if(null===this.parent)throw new K("CIC68883");this.parent.removeChild(this,!1)}enterDragMode(t,e){Tt(this.element,t),At(this.element,e),this._container.enterDragMode(t,e)}exitDragMode(){this._container.exitDragMode()}enterStackMaximised(){this._container.enterStackMaximised()}exitStackMaximised(){this._container.exitStackMaximised()}drag(){this._container.drag()}updateSize(t){this.updateNodeSize(t)}init(){this.updateNodeSize(!1),super.init(),this._container.emit("open"),this.initContentItems()}setTitle(t){this._title=t,this.emit("titleChanged",t),this.emit("stateChanged")}setTab(t){this._tab=t,this.emit("tab",t),this._container.setTab(t)}hide(){super.hide(),this._container.setVisibility(!1)}show(){super.show(),this._container.setVisibility(!0)}focus(t=!1){this.parentItem.setActiveComponentItem(this,!0,t)}setFocused(t){this._focused=!0,this.tab.setFocused(),t||this.emitBaseBubblingEvent("focus")}blur(t=!1){this._focused&&this.layoutManager.setFocusedComponentItem(void 0,t)}setBlurred(t){this._focused=!1,this.tab.setBlurred(),t||this.emitBaseBubblingEvent("blur")}setParent(t){this._parentItem=t,super.setParent(t)}handleUpdateItemConfigEvent(t){this.applyUpdatableConfig(t)}updateNodeSize(t){if("none"!==this.element.style.display){const{width:e,height:i}=kt(this.element);this._container.setSizeToNodeSize(e,i,t)}}}class $t extends Gt{constructor(){super(...arguments),this._focused=!1}get focused(){return this._focused}setFocusedValue(t){this._focused=t}}class Zt extends Wt{constructor(t,e){super(),this._eElement=t,this._pointerTracking=!1,this._pointerDownEventListener=t=>this.onPointerDown(t),this._pointerMoveEventListener=t=>this.onPointerMove(t),this._pointerUpEventListener=t=>this.onPointerUp(t),this._timeout=void 0,this._allowableTargets=[t,...e],this._oDocument=document,this._eBody=document.body,this._nDelay=1800,this._nDistance=10,this._nX=0,this._nY=0,this._nOriginalX=0,this._nOriginalY=0,this._dragging=!1,this._eElement.addEventListener("pointerdown",this._pointerDownEventListener,{passive:!0})}destroy(){this.checkRemovePointerTrackingEventListeners(),this._eElement.removeEventListener("pointerdown",this._pointerDownEventListener)}cancelDrag(){this.processDragStop(void 0)}onPointerDown(t){if(this._allowableTargets.includes(t.target)&&t.isPrimary){const e=this.getPointerCoordinates(t);this.processPointerDown(e)}}processPointerDown(t){this._nOriginalX=t.x,this._nOriginalY=t.y,this._oDocument.addEventListener("pointermove",this._pointerMoveEventListener),this._oDocument.addEventListener("pointerup",this._pointerUpEventListener,{passive:!0}),this._pointerTracking=!0,this._timeout=setTimeout((()=>{try{this.startDrag()}catch(t){throw console.error(t),t}}),this._nDelay)}onPointerMove(t){this._pointerTracking&&(this.processDragMove(t),t.preventDefault())}processDragMove(t){this._nX=t.pageX-this._nOriginalX,this._nY=t.pageY-this._nOriginalY,!1===this._dragging&&(Math.abs(this._nX)>this._nDistance||Math.abs(this._nY)>this._nDistance)&&this.startDrag(),this._dragging&&this.emit("drag",this._nX,this._nY,t)}onPointerUp(t){this.processDragStop(t)}processDragStop(t){var e;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this.checkRemovePointerTrackingEventListeners(),!0===this._dragging&&(this._eBody.classList.remove("lm_dragging"),this._eElement.classList.remove("lm_dragging"),null===(e=this._oDocument.querySelector("iframe"))||void 0===e||e.style.setProperty("pointer-events",""),this._dragging=!1,this.emit("dragStop",t))}checkRemovePointerTrackingEventListeners(){this._pointerTracking&&(this._oDocument.removeEventListener("pointermove",this._pointerMoveEventListener),this._oDocument.removeEventListener("pointerup",this._pointerUpEventListener),this._pointerTracking=!1)}startDrag(){var t;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this._dragging=!0,this._eBody.classList.add("lm_dragging"),this._eElement.classList.add("lm_dragging"),null===(t=this._oDocument.querySelector("iframe"))||void 0===t||t.style.setProperty("pointer-events","none"),this.emit("dragStart",this._nOriginalX,this._nOriginalY)}getPointerCoordinates(t){return{x:t.pageX,y:t.pageY}}}class qt{constructor(t,e,i){this._isVertical=t,this._size=e,this._grabSize=i0){const i=this.createSplitter(Math.max(0,e-1)).element;e>0?(this.contentItems[e-1].element.insertAdjacentElement("afterend",i),i.insertAdjacentElement("afterend",t.element)):(this.contentItems[0].element.insertAdjacentElement("beforebegin",i),i.insertAdjacentElement("beforebegin",t.element))}else this._childElementContainer.appendChild(t.element);super.addChild(t,e);const n=1/this.contentItems.length*100;if(!0===i)return this.emitBaseBubblingEvent("stateChanged"),e;for(let e=0;e0&&(this.calculateRelativeSizes(),this.setAbsoluteSizes()),this.emitBaseBubblingEvent("stateChanged"),this.emit("resize")}setAbsoluteSizes(){const t=this.calculateAbsoluteSizes();for(let e=0;e0&&t.itemSizes[e]++,this._isColumn?(Tt(this.contentItems[e].element,t.crossAxisSize),At(this.contentItems[e].element,t.itemSizes[e])):(Tt(this.contentItems[e].element,t.itemSizes[e]),At(this.contentItems[e].element,t.crossAxisSize))}calculateAbsoluteSizes(){const t=(this.contentItems.length-1)*this._splitterSize,{width:e,height:i}=kt(this.element);let n,o;this._isColumn?(n=i-t,o=e):(n=e-t,o=i);let s=0;const r=[];for(let t=0;t0){const n=100-t;for(let t=0;t100&&e.length>0){for(let t=0;te)return;{const r=i/e;let a=i;for(let e=0;ethis.onSplitterDrag(e,t,i))),e.on("dragStop",(()=>this.onSplitterDragStop(e))),e.on("dragStart",(()=>this.onSplitterDragStart(e))),this._splitter.splice(t,0,e),e}getSplitItems(t){const e=this._splitter.indexOf(t);return{before:this.contentItems[e],after:this.contentItems[e+1]}}calculateContentItemMinSize(t){const e=t.minSize;if(void 0!==e){if(t.minSizeUnit===ht.Pixel)return e;throw new X("ROCGMD98831",JSON.stringify(t))}{const t=this.layoutManager.layoutConfig.dimensions;return this._isColumn?t.defaultMinItemHeight:t.defaultMinItemWidth}}calculateContentItemsTotalMinSize(t){let e=0;for(const i of t)e+=this.calculateContentItemMinSize(i);return e}onSplitterDragStart(t){const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=this.calculateContentItemsTotalMinSize(e.before.contentItems),s=this.calculateContentItemsTotalMinSize(e.after.contentItems);this._splitterPosition=0,this._splitterMinPosition=-1*(i-o),this._splitterMaxPosition=n-s}onSplitterDrag(t,e,i){let n=this._isColumn?i:e;if(null===this._splitterMinPosition||null===this._splitterMaxPosition)throw new K("ROCOSD59226");n=Math.max(n,this._splitterMinPosition),n=Math.min(n,this._splitterMaxPosition),this._splitterPosition=n;const o=zt(n);this._isColumn?t.element.style.top=o:t.element.style.left=o}onSplitterDragStop(t){if(null===this._splitterPosition)throw new K("ROCOSDS66932");{const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=(this._splitterPosition+i)/(i+n),s=e.before.size+e.after.size;e.before.size=o*s,e.after.size=(1-o)*s,t.element.style.top=zt(0),t.element.style.left=zt(0),globalThis.requestAnimationFrame((()=>this.updateSize(!1)))}}}!function(t){t.getElementDimensionSize=function(t,e){return"width"===e?function(t){return t.offsetWidth}(t):function(t){return t.offsetHeight}(t)},t.setElementDimensionSize=function(t,e,i){return"width"===e?Tt(t,i):At(t,i)},t.createElement=function(t,e){const i=t.createElement("div");return i.classList.add("lm_item"),e?i.classList.add("lm_column"):i.classList.add("lm_row"),i}}(Xt||(Xt={}));class Yt extends $t{constructor(t,e,i){super(t,vt.create(e),null,Yt.createElement(document)),this.isGround=!0,this._childElementContainer=this.element,this._containerElement=i;let n=null;for(;;){const t=n?n.previousSibling:this._containerElement.lastChild;if(!(t instanceof Element&&t.classList.contains("lm_content")))break;n=t}this._containerElement.insertBefore(this.element,n)}init(){if(!0!==this.isInitialised){this.updateNodeSize();for(let t=0;t0?this.contentItems[0]:this,n.isComponent)throw new Error("Cannot add item as child to ComponentItem");{const t=this.layoutManager.createAndInitContentItem(i,n);return e=n.addChild(t,e),n===this?-1:e}}loadComponentAsRoot(t){this.clearRoot();const e=Ct.resolve(t,!1);if(e.maximised)throw new Error("Root Component cannot be maximised");{const t=new jt(this.layoutManager,e,this);t.init(),this.addChild(t,0)}}addChild(t,e){if(this.contentItems.length>0)throw new Error("Ground node can only have a single child");return this._childElementContainer.appendChild(t.element),e=super.addChild(t,e),this.updateSize(!1),this.emitBaseBubblingEvent("stateChanged"),e}calculateConfigContent(){const t=this.contentItems,e=t.length,i=new Array(e);for(let n=0;n0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e)),this.updateContentItemsSize(!1))}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}createSideAreas(){const t=Yt.Area.oppositeSides,e=new Array(Object.keys(t).length);let i=0;for(const n in t){const o=n,s=this.getElementArea();if(null===s)throw new K("RCSA77553");s.side=o,"2"===t[o][1]?s[o]=s[t[o]]-50:s[o]=s[t[o]]+50,s.surface=(s.x2-s.x1)*(s.y2-s.y1),e[i++]=s}return e}highlightDropZone(t,e,i){this.layoutManager.tabDropPlaceholder.remove(),super.highlightDropZone(t,e,i)}onDrop(t,e){if(t.isComponent){const e=ut.createDefault(),i=t;e.header=mt.Header.createCopy(i.headerConfig);const n=this.layoutManager.createAndInitContentItem(e,this);n.addChild(t),t=n}if(0===this.contentItems.length)this.addChild(t);else{if(t.type===at.row||t.type===at.column){const e=ut.createDefault(),i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}const i="x"==e.side[0]?at.row:at.column,n="2"==e.side[1],o=this.contentItems[0];if(o instanceof Xt&&o.type===i){const e=o.contentItems[n?0:o.contentItems.length-1];o.addChild(t,n?0:void 0,!0),e.size*=.5,t.size=e.size,t.sizeUnit=ht.Percent,o.updateSize(!1)}else{const e=ct.createDefault(i),s=this.layoutManager.createContentItem(e,this);this.replaceChild(o,s),s.addChild(t,n?0:void 0,!0),s.addChild(o,n?void 0:0,!0),o.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}}dock(){throw new X("GID87731")}validateDocking(){throw new X("GIVD87732")}getAllContentItems(){const t=[this];return this.deepGetAllContentItems(this.contentItems,t),t}getConfigMaximisedItems(){const t=[];return this.deepFilterContentItems(this.contentItems,t,(t=>!(!Gt.isStack(t)||!t.initialWantMaximise)||!(!Gt.isComponentItem(t)||!t.initialWantMaximise))),t}getItemsByPopInParentId(t){const e=[];return this.deepFilterContentItems(this.contentItems,e,(e=>e.popInParentIds.includes(t))),e}toConfig(){throw new Error("Cannot generate GroundItem config")}setActiveComponentItem(t,e,i){}updateNodeSize(){const{width:t,height:e}=kt(this._containerElement);Tt(this.element,t),At(this.element,e),this.contentItems.length>0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e))}deepGetAllContentItems(t,e){for(let i=0;ithis.onClick(t),this._touchStartEventListener=t=>this.onTouchStart(t),this._element=document.createElement("div"),this._element.classList.add(i),this._element.title=e,this._header.on("destroy",(()=>this.destroy())),this._element.addEventListener("click",this._clickEventListener,{passive:!0}),this._element.addEventListener("touchstart",this._touchStartEventListener,{passive:!0}),this._header.controlsContainerElement.appendChild(this._element)}get element(){return this._element}destroy(){var t;this._element.removeEventListener("click",this._clickEventListener),this._element.removeEventListener("touchstart",this._touchStartEventListener),null===(t=this._element.parentNode)||void 0===t||t.removeChild(this._element)}onClick(t){this._pushEvent(t)}onTouchStart(t){this._pushEvent(t)}}class Jt{constructor(t,e,i,n,o){var s;this._layoutManager=t,this._componentItem=e,this._closeEvent=i,this._focusEvent=n,this._dragStartEvent=o,this._isActive=!1,this._tabClickListener=t=>this.onTabClickDown(t),this._tabTouchStartListener=t=>this.onTabTouchStart(t),this._closeClickListener=()=>this.onCloseClick(),this._closeTouchStartListener=()=>this.onCloseTouchStart(),this._dragStartListener=(t,e)=>this.onDragStart(t,e),this._contentItemDestroyListener=()=>this.onContentItemDestroy(),this._tabTitleChangedListener=t=>this.setTitle(t),this._element=document.createElement("div"),this._element.classList.add("lm_tab"),this._titleElement=document.createElement("span"),this._titleElement.classList.add("lm_title"),this._closeElement=document.createElement("div"),this._closeElement.classList.add("lm_close_tab"),this._element.appendChild(this._titleElement),this._element.appendChild(this._closeElement),e.isClosable?this._closeElement.style.display="":this._closeElement.style.display="none",this.setTitle(e.title),this._componentItem.on("titleChanged",this._tabTitleChangedListener);(null!==(s=e.reorderEnabled)&&void 0!==s?s:this._layoutManager.layoutConfig.settings.reorderEnabled)&&this.enableReorder(),this._element.addEventListener("click",this._tabClickListener,{passive:!0}),this._element.addEventListener("touchstart",this._tabTouchStartListener,{passive:!0}),this._componentItem.isClosable?(this._closeElement.addEventListener("click",this._closeClickListener,{passive:!0}),this._closeElement.addEventListener("touchstart",this._closeTouchStartListener,{passive:!0})):(this._closeElement.remove(),this._closeElement=void 0),this._componentItem.setTab(this),this._layoutManager.emit("tabCreated",this)}get isActive(){return this._isActive}get componentItem(){return this._componentItem}get contentItem(){return this._componentItem}get element(){return this._element}get titleElement(){return this._titleElement}get closeElement(){return this._closeElement}get reorderEnabled(){return void 0!==this._dragListener}set reorderEnabled(t){t!==this.reorderEnabled&&(t?this.enableReorder():this.disableReorder())}setTitle(t){this._titleElement.innerText=t,this._element.title=t}setActive(t){t!==this._isActive&&(this._isActive=t,t?this._element.classList.add("lm_active"):this._element.classList.remove("lm_active"))}destroy(){var t,e;this._closeEvent=void 0,this._focusEvent=void 0,this._dragStartEvent=void 0,this._element.removeEventListener("click",this._tabClickListener),this._element.removeEventListener("touchstart",this._tabTouchStartListener),null===(t=this._closeElement)||void 0===t||t.removeEventListener("click",this._closeClickListener),null===(e=this._closeElement)||void 0===e||e.removeEventListener("touchstart",this._closeTouchStartListener),this._componentItem.off("titleChanged",this._tabTitleChangedListener),this.reorderEnabled&&this.disableReorder(),this._element.remove()}setBlurred(){this._element.classList.remove("lm_focused"),this._titleElement.classList.remove("lm_focused")}setFocused(){this._element.classList.add("lm_focused"),this._titleElement.classList.add("lm_focused")}onDragStart(t,e){if(void 0===this._dragListener)throw new J("TODSDLU10093");if(void 0===this._dragStartEvent)throw new J("TODS23309");this._dragStartEvent(t,e,this._dragListener,this.componentItem)}onContentItemDestroy(){void 0!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=void 0)}onTabClickDown(t){const e=t.target;e!==this._element&&e!==this._titleElement||(0===t.button?this.notifyFocus():1===t.button&&this._componentItem.isClosable&&this.notifyClose())}onTabTouchStart(t){t.target===this._element&&this.notifyFocus()}onCloseClick(){this.notifyClose()}onCloseTouchStart(){this.notifyClose()}notifyClose(){if(void 0===this._closeEvent)throw new J("TNC15007");this._closeEvent(this._componentItem)}notifyFocus(){if(void 0===this._focusEvent)throw new J("TNA15007");this._focusEvent(this._componentItem)}enableReorder(){this._dragListener=new Zt(this._element,[this._titleElement]),this._dragListener.on("dragStart",this._dragStartListener),this._componentItem.on("destroy",this._contentItemDestroyListener)}disableReorder(){if(void 0===this._dragListener)throw new J("TDR87745");this._componentItem.off("destroy",this._contentItemDestroyListener),this._dragListener.off("dragStart",this._dragStartListener),this._dragListener=void 0}}class Qt{constructor(t,e,i,n,o){this._layoutManager=t,this._componentRemoveEvent=e,this._componentFocusEvent=i,this._componentDragStartEvent=n,this._dropdownActiveChangedEvent=o,this._tabs=[],this._lastVisibleTabIndex=-1,this._dropdownActive=!1,this._element=document.createElement("section"),this._element.classList.add("lm_tabs"),this._dropdownElement=document.createElement("section"),this._dropdownElement.classList.add("lm_tabdropdown_list"),this._dropdownElement.style.display="none"}get tabs(){return this._tabs}get tabCount(){return this._tabs.length}get lastVisibleTabIndex(){return this._lastVisibleTabIndex}get element(){return this._element}get dropdownElement(){return this._dropdownElement}get dropdownActive(){return this._dropdownActive}destroy(){for(let t=0;tthis.handleTabCloseEvent(t)),(t=>this.handleTabFocusEvent(t)),((t,e,i,n)=>this.handleTabDragStartEvent(t,e,i,n)));void 0===e&&(e=this._tabs.length),this._tabs.splice(e,0,i),ethis._lastVisibleTabIndex){const t=this._tabs[e];for(let t=e;t>0;t--)this._tabs[t]=this._tabs[t-1];this._tabs[0]=t}}updateTabSizes(t,e){let i=!1;this.tryUpdateTabSizes(i,t,e)||(i=!0,this.tryUpdateTabSizes(i,t,e)),i!==this._dropdownActive&&(this._dropdownActive=i,this._dropdownActiveChangedEvent())}tryUpdateTabSizes(t,e,i){if(this._tabs.length>0){if(void 0===i)throw new Error("non-empty tabs must have active component item");let n=0,o=!1;const s=this._layoutManager.layoutConfig.settings.tabOverlapAllowance,r=this._tabs.indexOf(i.tab),a=this._tabs[r];this._lastVisibleTabIndex=-1;for(let i=0;ie){if(o)i===r&&(l.style.zIndex="auto",l.style.marginLeft="",l.parentElement!==this._element&&this._element.appendChild(l));else{let t;if(t=r>0&&r<=i?(d-e)/(i-1):(d-e)/i,tthis.onClick(t),this._touchStartListener=t=>this.onTouchStart(t),this._rowColumnClosable=!0,this._closeButton=null,this._popoutButton=null,this._tabsContainer=new Qt(this._layoutManager,(t=>this.handleTabInitiatedComponentRemoveEvent(t)),(t=>this.handleTabInitiatedComponentFocusEvent(t)),((t,e,i,n)=>this.handleTabInitiatedDragStartEvent(t,e,i,n)),(()=>this.processTabDropdownActiveChanged())),this._show=i.show,this._popoutEnabled=i.popoutEnabled,this._popoutLabel=i.popoutLabel,this._maximiseEnabled=i.maximiseEnabled,this._maximiseLabel=i.maximiseLabel,this._minimiseEnabled=i.minimiseEnabled,this._minimiseLabel=i.minimiseLabel,this._closeEnabled=i.closeEnabled,this._closeLabel=i.closeLabel,this._tabDropdownEnabled=i.tabDropdownEnabled,this._tabDropdownLabel=i.tabDropdownLabel,this.setSide(i.side),this._canRemoveComponent=this._configClosable,this._element=document.createElement("section"),this._element.classList.add("lm_header"),this._controlsContainerElement=document.createElement("section"),this._controlsContainerElement.classList.add("lm_controls"),this._element.appendChild(this._tabsContainer.element),this._element.appendChild(this._controlsContainerElement),this._element.appendChild(this._tabsContainer.dropdownElement),this._element.addEventListener("click",this._clickListener,{passive:!0}),this._element.addEventListener("touchstart",this._touchStartListener,{passive:!0}),this._documentMouseUpListener=()=>this._tabsContainer.hideAdditionalTabsDropdown(),globalThis.document.addEventListener("mouseup",this._documentMouseUpListener,{passive:!0}),this._tabControlOffset=this._layoutManager.layoutConfig.settings.tabControlOffset,this._tabDropdownEnabled&&(this._tabDropdownButton=new Kt(this,this._tabDropdownLabel,"lm_tabdropdown",(()=>this._tabsContainer.showAdditionalTabsDropdown()))),this._popoutEnabled&&(this._popoutButton=new Kt(this,this._popoutLabel,"lm_popout",(()=>this.handleButtonPopoutEvent()))),this._maximiseEnabled&&(this._maximiseButton=new Kt(this,this._maximiseLabel,"lm_maximise",(t=>this.handleButtonMaximiseToggleEvent(t)))),this._configClosable&&(this._closeButton=new Kt(this,this._closeLabel,"lm_close",(()=>s()))),this.processTabDropdownActiveChanged()}get show(){return this._show}get side(){return this._side}get leftRightSided(){return this._leftRightSided}get layoutManager(){return this._layoutManager}get parent(){return this._parent}get tabs(){return this._tabsContainer.tabs}get lastVisibleTabIndex(){return this._tabsContainer.lastVisibleTabIndex}get element(){return this._element}get tabsContainerElement(){return this._tabsContainer.element}get controlsContainerElement(){return this._controlsContainerElement}destroy(){this.emit("destroy"),this._popoutEvent=void 0,this._maximiseToggleEvent=void 0,this._clickEvent=void 0,this._touchStartEvent=void 0,this._componentRemoveEvent=void 0,this._componentFocusEvent=void 0,this._componentDragStartEvent=void 0,this._tabsContainer.destroy(),globalThis.document.removeEventListener("mouseup",this._documentMouseUpListener),this._element.remove()}createTab(t,e){this._tabsContainer.createTab(t,e)}removeTab(t){this._tabsContainer.removeTab(t)}processActiveComponentChanged(t){this._tabsContainer.processActiveComponentChanged(t),this.updateTabSizes()}setSide(t){this._side=t,this._leftRightSided=[nt.right,nt.left].includes(this._side)}setRowColumnClosable(t){this._rowColumnClosable=t,this.updateClosability()}updateClosability(){let t;if(this._configClosable)if(this._rowColumnClosable){t=!0;const e=this.tabs.length;for(let i=0;i1}applyFocusedValue(t){t?this._element.classList.add("lm_focused"):this._element.classList.remove("lm_focused")}processMaximised(){if(void 0===this._maximiseButton)throw new J("HPMAX16997");this._maximiseButton.element.setAttribute("title",this._minimiseLabel)}processMinimised(){if(void 0===this._maximiseButton)throw new J("HPMIN16997");this._maximiseButton.element.setAttribute("title",this._maximiseLabel)}updateTabSizes(){if(this._tabsContainer.tabCount>0){const t=this._show?this._layoutManager.layoutConfig.dimensions.headerHeight:0;let e;this._leftRightSided?(this._element.style.height="",this._element.style.width=zt(t)):(this._element.style.width="",this._element.style.height=zt(t)),e=this._leftRightSided?this._element.offsetHeight-this._controlsContainerElement.offsetHeight-this._tabControlOffset:this._element.offsetWidth-this._controlsContainerElement.offsetWidth-this._tabControlOffset,this._tabsContainer.updateTabSizes(e,this._getActiveComponentItemEvent())}}handleTabInitiatedComponentRemoveEvent(t){if(this._canRemoveComponent){if(void 0===this._componentRemoveEvent)throw new J("HHTCE22294");this._componentRemoveEvent(t)}}handleTabInitiatedComponentFocusEvent(t){if(void 0===this._componentFocusEvent)throw new J("HHTAE22294");this._componentFocusEvent(t)}handleTabInitiatedDragStartEvent(t,e,i,n){if(this._canRemoveComponent){if(void 0===this._componentDragStartEvent)throw new J("HHTDSE22294");this._componentDragStartEvent(t,e,i,n)}else i.cancelDrag()}processTabDropdownActiveChanged(){void 0!==this._tabDropdownButton&&Dt(this._tabDropdownButton.element,this._tabsContainer.dropdownActive)}handleButtonPopoutEvent(){if(this._layoutManager.layoutConfig.settings.popoutWholeStack){if(void 0===this._popoutEvent)throw new J("HHBPOE17834");this._popoutEvent()}else{const t=this._getActiveComponentItemEvent();t&&t.popout()}}handleButtonMaximiseToggleEvent(t){if(void 0===this._maximiseToggleEvent)throw new J("HHBMTE16834");this._maximiseToggleEvent()}onClick(t){t.target===this._element&&this.notifyClick(t)}onTouchStart(t){t.target===this._element&&this.notifyTouchStart(t)}notifyClick(t){if(void 0===this._clickEvent)throw new J("HNHC46834");this._clickEvent(t)}notifyTouchStart(t){if(void 0===this._touchStartEvent)throw new J("HNHTS46834");this._touchStartEvent(t)}}class ee extends $t{constructor(t,e,i){var n,o,s,r,a,l,h,d,c,m,u,p,g,f,v,_,y,C,w;super(t,e,i,ee.createElement(document)),this._headerSideChanged=!1,this._resizeListener=()=>this.handleResize(),this._maximisedListener=()=>this.handleMaximised(),this._minimisedListener=()=>this.handleMinimised(),this._headerConfig=e.header;const I=t.layoutConfig.header,b=e.content;let S;if(1!==b.length)S=void 0;else{S=b[0].header}this._initialWantMaximise=e.maximised,this._initialActiveItemIndex=null!==(n=e.activeItemIndex)&&void 0!==n?n:0;const E=null!==(r=null!==(s=null===(o=this._headerConfig)||void 0===o?void 0:o.show)&&void 0!==s?s:null==S?void 0:S.show)&&void 0!==r?r:I.show,x=null!==(h=null!==(l=null===(a=this._headerConfig)||void 0===a?void 0:a.popout)&&void 0!==l?l:null==S?void 0:S.popout)&&void 0!==h?h:I.popout,L=null!==(m=null!==(c=null===(d=this._headerConfig)||void 0===d?void 0:d.maximise)&&void 0!==c?c:null==S?void 0:S.maximise)&&void 0!==m?m:I.maximise,z=null!==(g=null!==(p=null===(u=this._headerConfig)||void 0===u?void 0:u.close)&&void 0!==p?p:null==S?void 0:S.close)&&void 0!==g?g:I.close,M=null!==(_=null!==(v=null===(f=this._headerConfig)||void 0===f?void 0:f.minimise)&&void 0!==v?v:null==S?void 0:S.minimise)&&void 0!==_?_:I.minimise,P=null!==(w=null!==(C=null===(y=this._headerConfig)||void 0===y?void 0:y.tabDropdown)&&void 0!==C?C:null==S?void 0:S.tabDropdown)&&void 0!==w?w:I.tabDropdown;this._maximisedEnabled=!1!==L;const T={show:!1!==E,side:!1===E?nt.top:E,popoutEnabled:!1!==x,popoutLabel:!1===x?"":x,maximiseEnabled:this._maximisedEnabled,maximiseLabel:!1===L?"":L,closeEnabled:!1!==z,closeLabel:!1===z?"":z,minimiseEnabled:!0,minimiseLabel:M,tabDropdownEnabled:!1!==P,tabDropdownLabel:!1===P?"":P};this._header=new te(t,this,T,e.isClosable&&!1!==z,(()=>this.getActiveComponentItem()),(()=>this.remove()),(()=>this.handlePopoutEvent()),(()=>this.toggleMaximise()),(t=>this.handleHeaderClickEvent(t)),(t=>this.handleHeaderTouchStartEvent(t)),(t=>this.handleHeaderComponentRemoveEvent(t)),(t=>this.handleHeaderComponentFocusEvent(t)),((t,e,i,n)=>this.handleHeaderComponentStartDragEvent(t,e,i,n))),this.isStack=!0,this._childElementContainer=document.createElement("section"),this._childElementContainer.classList.add("lm_items"),this.on("resize",this._resizeListener),this._maximisedEnabled&&(this.on("maximised",this._maximisedListener),this.on("minimised",this._minimisedListener)),this.element.appendChild(this._header.element),this.element.appendChild(this._childElementContainer),this.setupHeaderPosition(),this._header.updateClosability()}get childElementContainer(){return this._childElementContainer}get header(){return this._header}get headerShow(){return this._header.show}get headerSide(){return this._header.side}get headerLeftRightSided(){return this._header.leftRightSided}get contentAreaDimensions(){return this._contentAreaDimensions}get initialWantMaximise(){return this._initialWantMaximise}get isMaximised(){return this===this.layoutManager.maximisedStack}get stackParent(){if(!this.parent)throw new Error("Stack should always have a parent");return this.parent}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}init(){if(!0===this.isInitialised)return;this.updateNodeSize();for(let t=0;t0){if(this._initialActiveItemIndex<0||this._initialActiveItemIndex>=e)throw new Error(`ActiveItemIndex out of range: ${this._initialActiveItemIndex} id: ${this.id}`);for(let i=0;ithis.contentItems.length)throw e-=1,new X("SAC99728");if(t instanceof jt)return e=super.addChild(t,e),this._childElementContainer.appendChild(t.element),this._header.createTab(t,e),this.setActiveComponentItem(t,i),this._header.updateTabSizes(),this.updateSize(!1),t.container.setBaseLogicalZIndex(),this._header.updateClosability(),this.emitStateChangedEvent(),e;throw new X("SACC88532")}removeChild(t,e){const i=t,n=this.contentItems.indexOf(i),o=1===this.contentItems.length;if(this._activeComponentItem===i&&(i.focused&&i.blur(),!o)){const t=0===n?1:n-1;this.setActiveComponentItem(this.contentItems[t],!1)}this._header.removeTab(i),super.removeChild(i,e),o||this._header.updateClosability(),this.emitStateChangedEvent()}toggleMaximise(){this.isMaximised?this.minimise():this.maximise()}maximise(){if(!this.isMaximised){this.layoutManager.setMaximisedStack(this);const t=this.contentItems,e=t.length;for(let i=0;i0&&void 0===t)throw new Error("expected non-empty stack to have an active component item");return{type:"stack",content:this.calculateConfigContent(),size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,isClosable:this.isClosable,maximised:this.isMaximised,header:this.createHeaderConfig(),activeItemIndex:t}}onDrop(t,e){if("header"===this._dropSegment){if(this.resetHeaderDropZone(),void 0===this._dropIndex)throw new J("SODDI68990");return void this.addChild(t,this._dropIndex)}if("body"===this._dropSegment)return void this.addChild(t,0,!0);const i="top"===this._dropSegment||"bottom"===this._dropSegment,n="left"===this._dropSegment||"right"===this._dropSegment,o="top"===this._dropSegment||"left"===this._dropSegment,s=i&&this.stackParent.isColumn||n&&this.stackParent.isRow;if(t.isComponent){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createAndInitContentItem(e,this);i.addChild(t),t=i}if(t.type===at.row||t.type===at.column){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}if(s){const e=this.stackParent.contentItems.indexOf(this);this.stackParent.addChild(t,o?e:e+1,!0),this.size*=.5,t.size=this.size,t.sizeUnit=this.sizeUnit,this.stackParent.updateSize(!1)}else{const e=i?at.column:at.row,n=ct.createDefault(e),s=this.layoutManager.createContentItem(n,this);this.stackParent.replaceChild(this,s),s.addChild(t,o?0:void 0,!0),s.addChild(this,o?void 0:0,!0),this.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}highlightDropZone(t,e){for(const i in this._contentAreaDimensions){const n=i,o=this._contentAreaDimensions[n].hoverArea;if(o.x1t&&o.y1e)return void("header"===n?(this._dropSegment="header",this.highlightHeaderDropZone(this._header.leftRightSided?e:t)):(this.resetHeaderDropZone(),this.highlightBodyDropZone(n)))}}getArea(){if("none"===this.element.style.display)return null;const t=super.getElementArea(this._header.element),e=super.getElementArea(this._childElementContainer);if(null===t||null===e)throw new K("SGAHC13086");const i=e.x2-e.x1,n=e.y2-e.y1;return this._contentAreaDimensions={header:{hoverArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2},highlightArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2}}},0===this.contentItems.length?(this._contentAreaDimensions.body={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2}},super.getElementArea(this.element)):(this._contentAreaDimensions.left={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x1+.25*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x1+.5*i,y2:e.y2}},this._contentAreaDimensions.top={hoverArea:{x1:e.x1+.25*i,y1:e.y1,x2:e.x1+.75*i,y2:e.y1+.5*n},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y1+.5*n}},this._contentAreaDimensions.right={hoverArea:{x1:e.x1+.75*i,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1+.5*i,y1:e.y1,x2:e.x2,y2:e.y2}},this._contentAreaDimensions.bottom={hoverArea:{x1:e.x1+.25*i,y1:e.y1+.5*n,x2:e.x1+.75*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1+.5*n,x2:e.x2,y2:e.y2}},super.getElementArea(this.element))}positionHeader(t){this._header.side!==t&&(this._header.setSide(t),this._headerSideChanged=!0,this.setupHeaderPosition())}updateNodeSize(){if("none"!==this.element.style.display){const t=kt(this.element);if(this._header.show){t[this._header.leftRightSided?it.width:it.height]-=this.layoutManager.layoutConfig.dimensions.headerHeight}this._childElementContainer.style.width=zt(t.width),this._childElementContainer.style.height=zt(t.height);for(let e=0;e=o&&t({...t,[e]:i});async function s(t,e){return(await Promise.all(e.map((async([e,i])=>[e,await t(i,e)])))).reduce(o,{})}n.mapEntriesAsync=s,n.mapValuesAsync=async function(t,e){let i;return i=e instanceof Map?[...e.entries()]:Object.entries(e),s(t,i)};var r,a,l,h,d=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldSet||function(t,e,i,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(t,i):o?o.value=i:e.set(t,i),i},c=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldGet||function(t,e,i,n){if("a"===i&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?n:"a"===i?n.call(t):n?n.value:e.get(t)};Object.defineProperty(i,"__esModule",{value:!0});var m=i.DefaultLayoutManager=void 0;const u=n;class p{constructor(t){a.set(this,void 0),l.set(this,new Map),d(this,a,t,"f")}size(){return c(this,l,"f").size}async applyLayoutSnapshot({layouts:t}){if(Object.keys(t).length>1)throw new Error("[LayoutManager] Tried to call applyLayoutSnapshot with more than 1 layout. When implementing multiple layouts via overridden LayoutManager class, you must override and fully implement the applyLayoutSnapshot method without calling super.applyLayoutSnapshot().");const[[e,i]]=Object.entries(t);await p.createLayout(this,{layoutName:e,layout:i})}async showLayout({layoutName:t}){}async getLayoutSnapshot(){return{layouts:await(0,u.mapValuesAsync)((t=>t.getFrameSnapshot()),c(this,l,"f"))}}async removeLayout({layoutName:t}){}getLayoutIdentityForView(t){const e=[...c(this,l,"f").values()].find((e=>e.getCurrentViews().some((e=>e.name===t.name&&e.uuid===t.uuid))));return e?.identity??void 0}isLayoutVisible({layoutName:t}){return c(p,r,"m",h).call(p,this,t).isVisible()}resolveLayoutIdentity(t){if(t&&"layoutName"in t)return t;const e=[...c(this,l,"f").values()];if(1===e.length)return e[0].identity;const i=e.find((t=>t.isVisible()));return i?.identity??void 0}static async resolveLayout(t,e){const i=t.resolveLayoutIdentity(e);if(void 0===i||!("layoutName"in i))throw new Error("[layout-manager] resolveLayout: Could not resolve the layout identity. Make sure you include 'layoutName' in the identity object.");return c(p,r,"m",h).call(p,t,i.layoutName)}static async handleSharedView(t,e,i){await(0,u.mapValuesAsync)((async t=>{if(t.identity.layoutName!==e.layoutName){const e=t.getCurrentViews().find((t=>t.name===i.name));e&&await t.onViewDetached({viewIdentity:e,target:null}).catch(console.error)}}),c(t,l,"f"))}static async handleLastViewRemoved(t,e){await t.removeLayout(e),await c(t,a,"f").handleLastViewRemoved(t)}static async destroyLayout(t,{layoutName:e}){await c(p,r,"m",h).call(p,t,e).destroy(),c(t,l,"f").delete(e)}static async createLayout(t,e){const{layoutName:i}=e;if(c(t,l,"f").has(i))throw new Error(`Layout name ${i} already exists`);await c(t,a,"f").createLayout(e,t)}static registerLayout(t,e,i){c(t,l,"f").set(e,i)}static getAllLayouts(t){return[...c(t,l,"f").values()]}static setInitialSnapshot(t,e){c(t,a,"f").setInitialSnapshot(e)}static createClosedConstructor(...t){return class extends p{constructor(){super(...t)}}}}m=i.DefaultLayoutManager=p,r=p,a=new WeakMap,l=new WeakMap,h=function(t,e){const i=c(t,l,"f").get(e);if(!i)throw new Error(`[layout-manager] getLayoutByName: Could not locate layout with name '${e}'`);return i};var g={},f={},v={};Object.defineProperty(v,"__esModule",{value:!0}),v.ReversibleMap=void 0;v.ReversibleMap=class{constructor(){this.valueToKey=new Map,this.keyToValue=new Map,this.setUnique=(t,e)=>{if(this.hasKey(t)||this.hasValue(e))throw new Error("Key or value already in the map.");this.keyToValue.set(t,e),this.valueToKey.set(e,t)},this.getKey=t=>{const e=this.valueToKey.get(t);if(!e)throw new Error("Value not found in the map.");return e},this.deleteKey=t=>{const e=this.getValue(t);return this.keyToValue.delete(t),this.valueToKey.delete(e),e},this.deleteValue=t=>{const e=this.getKey(t);return this.keyToValue.delete(e),this.valueToKey.delete(t),e},this.hasKey=t=>this.keyToValue.has(t),this.hasValue=t=>this.valueToKey.has(t)}getValue(t){const e=this.keyToValue.get(t);if(!e)throw new Error("Key not found in the map.");return e}},Object.defineProperty(f,"__esModule",{value:!0});var _=f.LayoutContentCache=void 0;const y=t.lazy,C=v;class w{constructor(){this.contentItemCache=new C.ReversibleMap,this.contentItemCacheId=0,this.createCacheKey=()=>{const t=`entity-${this.contentItemCacheId.toString()}`;return this.contentItemCacheId+=1,t},this.hasKey=t=>this.contentItemCache.hasKey(t),this.getItemOrUndefined=t=>{try{return this.getContentItemOrThrow(t)}catch(t){return}},this.getContentItemOrThrow=(t,e)=>{if(!this.contentItemCache.hasKey(t))throw new Error("Layout component has been destroyed or detached from the current layout.");const i=this.contentItemCache.getValue(t);if(e&&!e.includes(i.type))throw new Error(`Layout item is not the expected type. Expected ${e.join(", ")}, got ${i.type}.`);return i},this.getOrCreateEntityId=t=>{if(this.contentItemCache.hasValue(t))return this.contentItemCache.getKey(t);t.onDestroyed((()=>{this.contentItemCache.deleteValue(t)}));const e=this.createCacheKey();return this.contentItemCache.setUnique(e,t),e}}static getSingleInstance(){return w.singleton.getValue()}}_=f.LayoutContentCache=w,w.singleton=new y.Lazy((()=>new w));var I={},b={};!function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.getAdjacentStacks=t.doShareEdge=t.getAdjacentItem=void 0;t.getAdjacentItem=(e,i)=>{const{parent:n}=e;if(e.isRoot()||!n)return;const o=["top","bottom"].includes(i)?"column":"row",s=["top","left"].includes(i)?-1:1;if(n.type===o){const t=n.contentItems.indexOf(e)+s;if(t>=0&&t{const n=t.getBounds(),o=e.getBounds();if(!n||!o)return!1;if(["top","bottom"].includes(i)){return!(n.righto.right)}return!(n.bottomo.bottom)};t.getAdjacentStacks=(e,i)=>{const n=["top","bottom"].includes(i)?"row":"column",o=s=>"stack"===s.type?(0,t.doShareEdge)(e,s,i)?[s]:[]:"root"===s.type||"ground"===s.type?[]:s.type===n?s.contentItems.map((t=>o(t))).flat():s.type!==n?["top","right"].includes(i)?o(s.contentItems[s.contentItems.length-1]):o(s.contentItems[0]):[],s=(0,t.getAdjacentItem)(e,i);return s?o(s):[]}}(b);var S=t.commonjsGlobal&&t.commonjsGlobal.__decorate||function(t,e,i,n){var o,s=arguments.length,r=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(s<3?o(r):s>3?o(e,i,r):o(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};Object.defineProperty(I,"__esModule",{value:!0}),I.LayoutEntitiesController=void 0;const E=t.decorators,x=b,L=i;class z{constructor(t,e,i){this.wire=t,this.layoutManager=e,this.layoutContentCache=i,this.analytics=t=>{this.wire.sendAction(`layout-controller-${t}`).catch((()=>{}))},this.getLayoutIdentityForViewOrThrow=async t=>{const e=this.layoutManager.getLayoutIdentityForView(t);if(!e)throw new Error(`View identity ${t.name} is not attached to any layouts.`);return e},this.getRoot=async t=>{this.analytics("get-root");const e=(await this.getLayout(t)).getRoot();return{type:e.type,entityId:this.layoutContentCache.getOrCreateEntityId(e)}},this.getStackByView=async t=>{this.analytics("get-stack-by-view");const e=await this.getLayoutIdentityForViewOrThrow(t),i=(await this.getLayout(e)).getStackByView(t);if("stack"===i?.type)return{entityId:this.layoutContentCache.getOrCreateEntityId(i),type:"stack"}},this.getStackViews=t=>{this.analytics("get-stack-views");return this.layoutContentCache.getContentItemOrThrow(t,["stack"]).contentItems.map((t=>({name:t.viewName,uuid:this.wire.me.uuid})))},this.isRoot=t=>{this.analytics("is-root");return this.layoutContentCache.getContentItemOrThrow(t).isRoot()},this.exists=t=>(this.analytics("exists"),this.layoutContentCache.hasKey(t)),this.addViewToStack=async(t,e,{index:i}={index:0})=>{this.analytics("add-view-to-stack");const n=this.layoutContentCache.getContentItemOrThrow(t);if(i&&i>n.contentItems.length+1)throw new Error(`Index '${i}' out of range, please exclude the index or specify a number between 0 and ${n.contentItems.length}`);const o={id:t,index:i},{identity:s}=await n.layout.platformCreateView(e,{location:o});return s},this.findViewInStack=(t,e)=>t.contentItems.find((t=>t.viewName===e.name)),this.removeViewFromStack=async(t,e)=>{this.analytics("remove-view-from-stack");const i=this.layoutContentCache.getContentItemOrThrow(t,["stack"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to remove a view ('${e.name}') which does not belong to the stack.`);await n.layout.platformCloseView(e)},this.createAdjacentStack=async(t,e,{position:i="right"}={})=>{if(this.analytics("create-adjacent-stack"),!Array.isArray(e)||0===e.length)throw new Error('The parameter "views" must be an array with at least 1 element.');if(!["top","bottom","left","right"].includes(i))throw new Error(`Invalid position '${i}' specified.`);const n=this.layoutContentCache.getContentItemOrThrow(t).createAdjacentStack({position:i}),o=this.layoutContentCache.getOrCreateEntityId(n);return await Promise.all(e.reverse().map((t=>this.addViewToStack(o,t)))),o},this.getAdjacentStacks=async({targetId:t,edge:e})=>{this.analytics("get-adjacent-stacks");const i=this.layoutContentCache.getContentItemOrThrow(t);return(0,x.getAdjacentStacks)(i,e).map((t=>({entityId:this.layoutContentCache.getOrCreateEntityId(t)})))},this.setStackActiveView=async(t,e)=>{this.analytics("set-stack-active-view");const i=this.layoutContentCache.getContentItemOrThrow(t,["stack"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to set a view ('${e.name}') as active when it does not belong to the stack.`);i.setActiveContentItem(n,!0)}}async getLayout(t){const e=await L.DefaultLayoutManager.resolveLayout(this.layoutManager,t);if(!e)throw new Error(`Could not resolve target layout identity ${JSON.stringify(t)}`);return e}getContent(t){this.analytics("get-content");return this.layoutContentCache.getContentItemOrThrow(t,["column","row"]).contentItems.map((t=>({type:t.type,entityId:this.layoutContentCache.getOrCreateEntityId(t)})))}getParent(t){this.analytics("get-parent");const e=this.layoutContentCache.getContentItemOrThrow(t);if(!e.isRoot())return e.parent?.contentItems.includes(e)?{type:e.parent.type,entityId:this.layoutContentCache.getOrCreateEntityId(e.parent)}:void 0}}S([(0,E.expose)()],z.prototype,"getLayoutIdentityForViewOrThrow",void 0),S([(0,E.expose)()],z.prototype,"getRoot",void 0),S([(0,E.expose)()],z.prototype,"getStackByView",void 0),S([(0,E.expose)()],z.prototype,"getStackViews",void 0),S([(0,E.expose)()],z.prototype,"getContent",null),S([(0,E.expose)()],z.prototype,"getParent",null),S([(0,E.expose)()],z.prototype,"isRoot",void 0),S([(0,E.expose)()],z.prototype,"exists",void 0),S([(0,E.expose)()],z.prototype,"addViewToStack",void 0),S([(0,E.expose)()],z.prototype,"removeViewFromStack",void 0),S([(0,E.expose)()],z.prototype,"createAdjacentStack",void 0),S([(0,E.expose)()],z.prototype,"getAdjacentStacks",void 0),S([(0,E.expose)()],z.prototype,"setStackActiveView",void 0),I.LayoutEntitiesController=z,Object.defineProperty(g,"__esModule",{value:!0});var M=g.initLayoutEndpoints=void 0;const P=t.apiExposer,T=t.layout_constants,A=f,k=I,D=i;M=g.initLayoutEndpoints=async function(t,e){const i=t.getFin(),n=await i.Platform.getCurrentSync().getClient(),o=new P.ChannelsExposer(n);await new P.ApiExposer(o).exposeInstance(new k.LayoutEntitiesController(t,e,A.LayoutContentCache.getSingleInstance()),{id:T.LAYOUT_CONTROLLER_ID}),await async function(t,e){const i=t=>async i=>{const n=await D.DefaultLayoutManager.resolveLayout(e,i.target);if(!n)throw new Error(`Could not resolve the layout target from payload ${JSON.stringify(i)}`);return t(n,i)},n=(e,n)=>{t.register(e,i(n))},o=(t,e)=>{n(t,e)};n("replace-view",((t,e)=>t.replaceView(e))),n("replace-layout",((t,{layout:e})=>t.replaceLayout(e))),n("add-view",((t,e)=>t.insertView(e))),o("layout-add-view",((t,{viewOptions:e,location:i,targetView:n})=>t.platformCreateView(e,{location:i,targetView:n}))),n("close-view",((t,e)=>t.cleanupView(e.viewIdentity))),o("layout-close-view",((t,e)=>t.platformCloseView(e.viewIdentity))),n("apply-preset-layout",((t,e)=>t.applyPreset(e))),n("get-layout-views",(t=>t.getCurrentViews())),n("get-frame-snapshot",(t=>t.getFrameSnapshot())),n("is-visible",(t=>t.isVisible())),n("destroy",(t=>t.destroy())),t.register("get-layout-snapshot",(()=>e.getLayoutSnapshot()))}(n,e)};var R={};Object.defineProperty(R,"__esModule",{value:!0});var U=R.BaseLayout=void 0;U=R.BaseLayout=class{};var O={};Object.defineProperty(O,"__esModule",{value:!0});var V=O.DOMEmitter=void 0;V=O.DOMEmitter=class{constructor(t){this.container=t}dispatchLocalEvent(t,e){const i={...e,type:t,tabSelector:`tab-${e.name}`,containerSelector:`container-${e.name}`,topic:"openfin-DOM-event"};this.container.dispatchEvent(new CustomEvent(t,{detail:i}))}};var B={};Object.defineProperty(B,"__esModule",{value:!0});var H=B.mapLayoutContentItemsImmutableSync=B.mapLayoutContentItemsImmutable=W=B.isVisible=void 0;var W=B.isVisible=t=>(0!==t.offsetWidth||0!==t.offsetHeight)&&"hidden"!==window.getComputedStyle(t).visibility&&t.offsetTop>=0&&t.offsetLeft>=0&&t.offsetTop<=window.innerHeight&&t.offsetLeft<=window.innerWidth;const F=t=>"type"in t&&"component"===t.type;B.mapLayoutContentItemsImmutable=async function t(e,i){return F(i)?e(i):{...i,content:await Promise.all(i.content?.map((i=>t(e,i))))}},H=B.mapLayoutContentItemsImmutableSync=function t(e,i){return F(i)?e(i):{...i,content:i.content?.map((i=>t(e,i)))}};class N extends Error{constructor(t,e){super(e),this.type=t}}class G extends N{constructor(t,e){super("Configuration",t),this.node=e}}class j extends N{constructor(t){super("PopoutBlocked",t)}}class $ extends N{constructor(t){super("API",t)}}class Z extends N{constructor(t){super("Bind",t)}}class q extends Error{constructor(t,e,i){super(`${t}: ${e}${void 0===i?"":": "+i}`)}}class X extends q{constructor(t,e){super("Assert",t,e)}}class Y extends q{constructor(t,e,i){super("UnreachableCase",t,`${e}${void 0===i?"":": "+i}`)}}class K extends q{constructor(t,e){super("UnexpectedNull",t,e)}}class J extends q{constructor(t,e){super("UnexpectedUndefined",t,e)}}var Q;!function(t){let e=!1;const i={PopoutCannotBeCreatedWithGroundItemConfig:{id:0,default:"Popout cannot be created with ground ItemConfig"},PleaseRegisterAConstructorFunction:{id:1,default:"Please register a constructor function"},ComponentTypeNotRegisteredAndBindComponentEventHandlerNotAssigned:{id:2,default:"Component type not registered and BindComponentEvent handler not assigned"},ComponentIsAlreadyRegistered:{id:3,default:"Component is already registered"},ComponentIsNotVirtuable:{id:4,default:"Component is not virtuable. Requires rootHtmlElement field/getter"},VirtualComponentDoesNotHaveRootHtmlElement:{id:5,default:'Virtual component does not have getter "rootHtmlElement"'},ItemConfigIsNotTypeComponent:{id:6,default:"ItemConfig is not of type component"},InvalidNumberPartInSizeString:{id:7,default:"Invalid number part in size string"},UnknownUnitInSizeString:{id:8,default:"Unknown unit in size string"},UnsupportedUnitInSizeString:{id:9,default:"Unsupported unit in size string"}};t.idCount=Object.keys(i).length;const n=Object.values(i);t.checkInitialise=function(){if(!e)for(let e=0;e="0"&&t<="9"}function Tt(t,e){const i=zt(e);t.style.width=i}function At(t,e){const i=zt(e);t.style.height=i}function kt(t){return{width:t.offsetWidth,height:t.offsetHeight}}function Dt(t,e){t.style.display=e?"":"none"}function Rt(t,e){if(void 0!==e)for(const i in e)if(e.hasOwnProperty(i)){const n=e[i],o=t[i];t[i]=Ut(o,n)}return t}function Ut(t,e){if("object"!=typeof e)return e;if(Array.isArray(e)){const t=e.length,i=new Array(t);for(let n=0;n36)throw new Error("Too many keys in config minifier map")},t.translateObject=n}(dt||(dt={})),function(t){t.defaults={type:at.ground,content:[],size:1,sizeUnit:ht.Fractional,minSize:void 0,minSizeUnit:ht.Pixel,id:"",isClosable:!0},t.createCopy=function(t,e){switch(t.type){case at.ground:case at.row:case at.column:return gt.createCopy(t,e);case at.stack:return ut.createCopy(t,e);case at.component:return pt.createCopy(t);default:throw new Y("CICC91354",t.type,"Invalid Config Item type specified")}},t.createDefault=function(t){switch(t){case at.ground:throw new X("CICCDR91562");case at.row:case at.column:return gt.createDefault(t);case at.stack:return ut.createDefault();case at.component:return pt.createDefault();default:throw new Y("CICCDD91563",t,"Invalid Config Item type specified")}},t.isComponentItem=function(t){return t.type===at.component},t.isStackItem=function(t){return t.type===at.stack},t.isGroundItem=function(t){return t.type===at.ground}}(ct||(ct={})),function(t){t.defaultMaximised=!1,function(t){t.createCopy=function(t,e){return void 0===t?void 0:{show:null!=e?e:t.show,popout:t.popout,close:t.close,maximise:t.maximise,minimise:t.minimise,tabDropdown:t.tabDropdown}}}(t.Header||(t.Header={}))}(mt||(mt={})),function(t){function e(t){const e=t.length,i=new Array(e);for(let n=0;n"__glMaximised"===t));t>0&&(o=!0,n=n.splice(t,1)),e=n.length>0?n[0]:ct.defaults.id}else e=n;return i=void 0!==t.maximised?t.maximised:o,{id:e,maximised:i}}}(wt||(wt={})),function(t){function e(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0;return{resolved:!0,root:Et.resolve(i),openPopouts:t.resolveOpenPopouts(e.openPopouts),dimensions:t.Dimensions.resolve(e.dimensions),settings:t.Settings.resolve(e.settings),header:t.Header.resolve(e.header,e.settings,e.labels)}}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:Lt.fromResolvedArray(e.openPopouts),settings:_t.Settings.createCopy(e.settings),dimensions:t.Dimensions.fromResolved(e.dimensions),header:_t.Header.createCopy(e.header)}},t.isResolved=function(t){const e=t;return void 0!==e.resolved&&!0===e.resolved},t.resolveOpenPopouts=function(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0,{root:Et.resolve(o),openPopouts:xt.resolveOpenPopouts(e.openPopouts),dimensions:xt.Dimensions.resolve(e.dimensions),settings:xt.Settings.resolve(e.settings),header:xt.Header.resolve(e.header,e.settings,e.labels),parentId:null!==(i=e.parentId)&&void 0!==i?i:null,indexInParent:null!==(n=e.indexInParent)&&void 0!==n?n:null,window:t.Window.resolve(e.window,e.dimensions),resolved:!0}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:i(e.openPopouts),dimensions:xt.Dimensions.fromResolved(e.dimensions),settings:_t.Settings.createCopy(e.settings),header:_t.Header.createCopy(e.header),parentId:e.parentId,indexInParent:e.indexInParent,window:t.Window.fromResolved(e.window)}},t.fromResolvedArray=i}(Lt||(Lt={}));class Wt{constructor(){this._allEventSubscriptions=[],this._subscriptionsMap=new Map,this.unbind=this.removeEventListener,this.trigger=this.emit}tryBubbleEvent(t,e){}emit(t,...e){let i=this._subscriptionsMap.get(t);if(void 0!==i){i=i.slice();for(let t=0;t0){const n=e.slice();n.unshift(t);const o=this._allEventSubscriptions.slice();for(let t=0;t0?n.contentItems[0]:n,e=0);const o=this._layoutManager.createAndInitContentItem(i,t);t.addChild(o,e),this._layoutManager.layoutConfig.settings.popInOnClose?this._onClose():this.close()}createWindow(){const t=this.createUrl(),e=Math.floor(1e6*Math.random()).toString(36),i=this.serializeWindowFeatures({width:this._initialWindowSize.width,height:this._initialWindowSize.height,innerWidth:this._initialWindowSize.width,innerHeight:this._initialWindowSize.height,menubar:"no",toolbar:"no",location:"no",personalbar:"no",resizable:"yes",scrollbars:"no",status:"no"});if(this._popoutWindow=globalThis.open(t,e,i),this._popoutWindow)this._popoutWindow.addEventListener("load",(()=>this.positionWindow()),{passive:!0}),this._popoutWindow.addEventListener("beforeunload",(()=>{this._layoutManager.layoutConfig.settings.popInOnClose?this.popIn():this._onClose()}),{passive:!0}),this._checkReadyInterval=setInterval((()=>this.checkReady()),10);else if(!0===this._layoutManager.layoutConfig.settings.blockedPopoutsThrowError){throw new j("Popout blocked")}}checkReady(){if(null===this._popoutWindow)throw new K("BPCR01844");this._popoutWindow.__glInstance&&this._popoutWindow.__glInstance.isInitialised&&(this.onInitialised(),void 0!==this._checkReadyInterval&&(clearInterval(this._checkReadyInterval),this._checkReadyInterval=void 0))}serializeWindowFeatures(t){const e=[];for(const i in t)e.push(i+"="+t[i].toString());return e.join(",")}createUrl(){const t="gl-window-config-"+Ot(),e=_t.minifyConfig(this._config);try{localStorage.setItem(t,JSON.stringify(e))}catch(t){throw new Error("Error while writing to localStorage "+function(t){return t instanceof Error?t.message:"string"==typeof t?t:"Unknown Error"}(t))}const i=new URL(location.href);return i.searchParams.set("gl-window",t),i.toString()}positionWindow(){if(null===this._popoutWindow)throw new Error("BrowserPopout.positionWindow: null popoutWindow");this._popoutWindow.moveTo(this._initialWindowSize.left,this._initialWindowSize.top),this._popoutWindow.focus()}onInitialised(){this._isInitialised=!0,this.getGlInstance().on("popIn",(()=>this.popIn())),this.emit("initialised")}_onClose(){setTimeout((()=>this.emit("closed")),50)}}class Gt extends Wt{constructor(t,e,i,n){super(),this.layoutManager=t,this._parent=i,this._element=n,this._popInParentIds=[],this._type=e.type,this._id=e.id,this._isInitialised=!1,this.isGround=!1,this.isRow=!1,this.isColumn=!1,this.isStack=!1,this.isComponent=!1,this.size=e.size,this.sizeUnit=e.sizeUnit,this.minSize=e.minSize,this.minSizeUnit=e.minSizeUnit,this._isClosable=e.isClosable,this._pendingEventPropagations={},this._throttledEvents=["stateChanged"],this._contentItems=this.createContentItems(e.content)}get type(){return this._type}get id(){return this._id}set id(t){this._id=t}get popInParentIds(){return this._popInParentIds}get parent(){return this._parent}get contentItems(){return this._contentItems}get isClosable(){return this._isClosable}get element(){return this._element}get isInitialised(){return this._isInitialised}static isStack(t){return t.isStack}static isComponentItem(t){return t.isComponent}static isComponentParentableItem(t){return t.isStack||t.isGround}removeChild(t,e=!1){const i=this._contentItems.indexOf(t);if(-1===i)throw new Error("Can't remove child item. Unknown content item");if(e||this._contentItems[i].destroy(),this._contentItems.splice(i,1),this._contentItems.length>0)this.updateSize(!1);else if(!this.isGround&&!0===this._isClosable){if(null===this._parent)throw new K("CIUC00874");this._parent.removeChild(this)}}addChild(t,e,i){return null!=e||(e=this._contentItems.length),this._contentItems.splice(e,0,t),t.setParent(this),!0===this._isInitialised&&!1===t._isInitialised&&t.init(),e}replaceChild(t,e,i=!1){const n=this._contentItems.indexOf(t),o=t._element.parentNode;if(-1===n)throw new X("CIRCI23232","Can't replace child. oldChild is not child of this");if(null===o)throw new K("CIRCP23232");if(o.replaceChild(e._element,t._element),!0===i&&(t._parent=null,t.destroy()),this._contentItems[n]=e,e.setParent(this),e.size=t.size,e.sizeUnit=t.sizeUnit,e.minSize=t.minSize,e.minSizeUnit=t.minSizeUnit,null===e._parent)throw new K("CIRCNC45699");!0===e._parent._isInitialised&&!1===e._isInitialised&&e.init(),this.updateSize(!1)}remove(){if(null===this._parent)throw new K("CIR11110");this._parent.removeChild(this)}popout(){const t=Ot(),e=this.layoutManager.createPopoutFromContentItem(this,void 0,t,void 0);return this.emitBaseBubblingEvent("stateChanged"),e}calculateConfigContent(){const t=this._contentItems,e=t.length,i=new Array(e);for(let n=0;nthis.propagateEventToLayoutManager(t,e))))}propagateEventToLayoutManager(t,e){this._pendingEventPropagations[t]=!1,this.layoutManager.emitUnknown(t,e)}}class jt extends Gt{constructor(t,e,i){super(t,e,i,document.createElement("div")),this._parentItem=i,this._focused=!1,this.isComponent=!0,this._reorderEnabled=e.reorderEnabled,this.applyUpdatableConfig(e),this._initialWantMaximise=e.maximised;const n=document.createElement("div");n.classList.add("lm_content"),this.element.appendChild(n),this._container=new Ft(e,this,t,n,(t=>this.handleUpdateItemConfigEvent(t)),(()=>this.show()),(()=>this.hide()),(t=>this.focus(t)),(t=>this.blur(t)))}get componentName(){return this._container.componentType}get componentType(){return this._container.componentType}get reorderEnabled(){return this._reorderEnabled}get initialWantMaximise(){return this._initialWantMaximise}get component(){return this._container.component}get container(){return this._container}get parentItem(){return this._parentItem}get headerConfig(){return this._headerConfig}get title(){return this._title}get tab(){return this._tab}get focused(){return this._focused}destroy(){this._container.destroy(),super.destroy()}applyUpdatableConfig(t){this.setTitle(t.title),this._headerConfig=t.header}toConfig(){const t=this._container.stateRequestEvent,e=void 0===t?this._container.state:t();return{type:at.component,content:[],size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,maximised:!1,isClosable:this.isClosable,reorderEnabled:this._reorderEnabled,title:this._title,header:mt.Header.createCopy(this._headerConfig),componentType:pt.copyComponentType(this.componentType),componentState:e}}close(){if(null===this.parent)throw new K("CIC68883");this.parent.removeChild(this,!1)}enterDragMode(t,e){Tt(this.element,t),At(this.element,e),this._container.enterDragMode(t,e)}exitDragMode(){this._container.exitDragMode()}enterStackMaximised(){this._container.enterStackMaximised()}exitStackMaximised(){this._container.exitStackMaximised()}drag(){this._container.drag()}updateSize(t){this.updateNodeSize(t)}init(){this.updateNodeSize(!1),super.init(),this._container.emit("open"),this.initContentItems()}setTitle(t){this._title=t,this.emit("titleChanged",t),this.emit("stateChanged")}setTab(t){this._tab=t,this.emit("tab",t),this._container.setTab(t)}hide(){super.hide(),this._container.setVisibility(!1)}show(){super.show(),this._container.setVisibility(!0)}focus(t=!1){this.parentItem.setActiveComponentItem(this,!0,t)}setFocused(t){this._focused=!0,this.tab.setFocused(),t||this.emitBaseBubblingEvent("focus")}blur(t=!1){this._focused&&this.layoutManager.setFocusedComponentItem(void 0,t)}setBlurred(t){this._focused=!1,this.tab.setBlurred(),t||this.emitBaseBubblingEvent("blur")}setParent(t){this._parentItem=t,super.setParent(t)}handleUpdateItemConfigEvent(t){this.applyUpdatableConfig(t)}updateNodeSize(t){if("none"!==this.element.style.display){const{width:e,height:i}=kt(this.element);this._container.setSizeToNodeSize(e,i,t)}}}class $t extends Gt{constructor(){super(...arguments),this._focused=!1}get focused(){return this._focused}setFocusedValue(t){this._focused=t}}class Zt extends Wt{constructor(t,e){super(),this._eElement=t,this._pointerTracking=!1,this._pointerDownEventListener=t=>this.onPointerDown(t),this._pointerMoveEventListener=t=>this.onPointerMove(t),this._pointerUpEventListener=t=>this.onPointerUp(t),this._timeout=void 0,this._allowableTargets=[t,...e],this._oDocument=document,this._eBody=document.body,this._nDelay=1800,this._nDistance=10,this._nX=0,this._nY=0,this._nOriginalX=0,this._nOriginalY=0,this._dragging=!1,this._eElement.addEventListener("pointerdown",this._pointerDownEventListener,{passive:!0})}destroy(){this.checkRemovePointerTrackingEventListeners(),this._eElement.removeEventListener("pointerdown",this._pointerDownEventListener)}cancelDrag(){this.processDragStop(void 0)}onPointerDown(t){if(this._allowableTargets.includes(t.target)&&t.isPrimary){const e=this.getPointerCoordinates(t);this.processPointerDown(e)}}processPointerDown(t){this._nOriginalX=t.x,this._nOriginalY=t.y,this._oDocument.addEventListener("pointermove",this._pointerMoveEventListener),this._oDocument.addEventListener("pointerup",this._pointerUpEventListener,{passive:!0}),this._pointerTracking=!0,this._timeout=setTimeout((()=>{try{this.startDrag()}catch(t){throw console.error(t),t}}),this._nDelay)}onPointerMove(t){this._pointerTracking&&(this.processDragMove(t),t.preventDefault())}processDragMove(t){this._nX=t.pageX-this._nOriginalX,this._nY=t.pageY-this._nOriginalY,!1===this._dragging&&(Math.abs(this._nX)>this._nDistance||Math.abs(this._nY)>this._nDistance)&&this.startDrag(),this._dragging&&this.emit("drag",this._nX,this._nY,t)}onPointerUp(t){this.processDragStop(t)}processDragStop(t){var e;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this.checkRemovePointerTrackingEventListeners(),!0===this._dragging&&(this._eBody.classList.remove("lm_dragging"),this._eElement.classList.remove("lm_dragging"),null===(e=this._oDocument.querySelector("iframe"))||void 0===e||e.style.setProperty("pointer-events",""),this._dragging=!1,this.emit("dragStop",t))}checkRemovePointerTrackingEventListeners(){this._pointerTracking&&(this._oDocument.removeEventListener("pointermove",this._pointerMoveEventListener),this._oDocument.removeEventListener("pointerup",this._pointerUpEventListener),this._pointerTracking=!1)}startDrag(){var t;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this._dragging=!0,this._eBody.classList.add("lm_dragging"),this._eElement.classList.add("lm_dragging"),null===(t=this._oDocument.querySelector("iframe"))||void 0===t||t.style.setProperty("pointer-events","none"),this.emit("dragStart",this._nOriginalX,this._nOriginalY)}getPointerCoordinates(t){return{x:t.pageX,y:t.pageY}}}class qt{constructor(t,e,i){this._isVertical=t,this._size=e,this._grabSize=i0){const i=this.createSplitter(Math.max(0,e-1)).element;e>0?(this.contentItems[e-1].element.insertAdjacentElement("afterend",i),i.insertAdjacentElement("afterend",t.element)):(this.contentItems[0].element.insertAdjacentElement("beforebegin",i),i.insertAdjacentElement("beforebegin",t.element))}else this._childElementContainer.appendChild(t.element);super.addChild(t,e);const n=1/this.contentItems.length*100;if(!0===i)return this.emitBaseBubblingEvent("stateChanged"),e;for(let e=0;e0&&(this.calculateRelativeSizes(),this.setAbsoluteSizes()),this.emitBaseBubblingEvent("stateChanged"),this.emit("resize")}setAbsoluteSizes(){const t=this.calculateAbsoluteSizes();for(let e=0;e0&&t.itemSizes[e]++,this._isColumn?(Tt(this.contentItems[e].element,t.crossAxisSize),At(this.contentItems[e].element,t.itemSizes[e])):(Tt(this.contentItems[e].element,t.itemSizes[e]),At(this.contentItems[e].element,t.crossAxisSize))}calculateAbsoluteSizes(){const t=(this.contentItems.length-1)*this._splitterSize,{width:e,height:i}=kt(this.element);let n,o;this._isColumn?(n=i-t,o=e):(n=e-t,o=i);let s=0;const r=[];for(let t=0;t0){const n=100-t;for(let t=0;t100&&e.length>0){for(let t=0;te)return;{const r=i/e;let a=i;for(let e=0;ethis.onSplitterDrag(e,t,i))),e.on("dragStop",(()=>this.onSplitterDragStop(e))),e.on("dragStart",(()=>this.onSplitterDragStart(e))),this._splitter.splice(t,0,e),e}getSplitItems(t){const e=this._splitter.indexOf(t);return{before:this.contentItems[e],after:this.contentItems[e+1]}}calculateContentItemMinSize(t){const e=t.minSize;if(void 0!==e){if(t.minSizeUnit===ht.Pixel)return e;throw new X("ROCGMD98831",JSON.stringify(t))}{const t=this.layoutManager.layoutConfig.dimensions;return this._isColumn?t.defaultMinItemHeight:t.defaultMinItemWidth}}calculateContentItemsTotalMinSize(t){let e=0;for(const i of t)e+=this.calculateContentItemMinSize(i);return e}onSplitterDragStart(t){const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=this.calculateContentItemsTotalMinSize(e.before.contentItems),s=this.calculateContentItemsTotalMinSize(e.after.contentItems);this._splitterPosition=0,this._splitterMinPosition=-1*(i-o),this._splitterMaxPosition=n-s}onSplitterDrag(t,e,i){let n=this._isColumn?i:e;if(null===this._splitterMinPosition||null===this._splitterMaxPosition)throw new K("ROCOSD59226");n=Math.max(n,this._splitterMinPosition),n=Math.min(n,this._splitterMaxPosition),this._splitterPosition=n;const o=zt(n);this._isColumn?t.element.style.top=o:t.element.style.left=o}onSplitterDragStop(t){if(null===this._splitterPosition)throw new K("ROCOSDS66932");{const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=(this._splitterPosition+i)/(i+n),s=e.before.size+e.after.size;e.before.size=o*s,e.after.size=(1-o)*s,t.element.style.top=zt(0),t.element.style.left=zt(0),globalThis.requestAnimationFrame((()=>this.updateSize(!1)))}}}!function(t){t.getElementDimensionSize=function(t,e){return"width"===e?function(t){return t.offsetWidth}(t):function(t){return t.offsetHeight}(t)},t.setElementDimensionSize=function(t,e,i){return"width"===e?Tt(t,i):At(t,i)},t.createElement=function(t,e){const i=t.createElement("div");return i.classList.add("lm_item"),e?i.classList.add("lm_column"):i.classList.add("lm_row"),i}}(Xt||(Xt={}));class Yt extends $t{constructor(t,e,i){super(t,vt.create(e),null,Yt.createElement(document)),this.isGround=!0,this._childElementContainer=this.element,this._containerElement=i;let n=null;for(;;){const t=n?n.previousSibling:this._containerElement.lastChild;if(!(t instanceof Element&&t.classList.contains("lm_content")))break;n=t}this._containerElement.insertBefore(this.element,n)}init(){if(!0!==this.isInitialised){this.updateNodeSize();for(let t=0;t0?this.contentItems[0]:this,n.isComponent)throw new Error("Cannot add item as child to ComponentItem");{const t=this.layoutManager.createAndInitContentItem(i,n);return e=n.addChild(t,e),n===this?-1:e}}loadComponentAsRoot(t){this.clearRoot();const e=Ct.resolve(t,!1);if(e.maximised)throw new Error("Root Component cannot be maximised");{const t=new jt(this.layoutManager,e,this);t.init(),this.addChild(t,0)}}addChild(t,e){if(this.contentItems.length>0)throw new Error("Ground node can only have a single child");return this._childElementContainer.appendChild(t.element),e=super.addChild(t,e),this.updateSize(!1),this.emitBaseBubblingEvent("stateChanged"),e}calculateConfigContent(){const t=this.contentItems,e=t.length,i=new Array(e);for(let n=0;n0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e)),this.updateContentItemsSize(!1))}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}createSideAreas(){const t=Yt.Area.oppositeSides,e=new Array(Object.keys(t).length);let i=0;for(const n in t){const o=n,s=this.getElementArea();if(null===s)throw new K("RCSA77553");s.side=o,"2"===t[o][1]?s[o]=s[t[o]]-50:s[o]=s[t[o]]+50,s.surface=(s.x2-s.x1)*(s.y2-s.y1),e[i++]=s}return e}highlightDropZone(t,e,i){this.layoutManager.tabDropPlaceholder.remove(),super.highlightDropZone(t,e,i)}onDrop(t,e){if(t.isComponent){const e=ut.createDefault(),i=t;e.header=mt.Header.createCopy(i.headerConfig);const n=this.layoutManager.createAndInitContentItem(e,this);n.addChild(t),t=n}if(0===this.contentItems.length)this.addChild(t);else{if(t.type===at.row||t.type===at.column){const e=ut.createDefault(),i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}const i="x"==e.side[0]?at.row:at.column,n="2"==e.side[1],o=this.contentItems[0];if(o instanceof Xt&&o.type===i){const e=o.contentItems[n?0:o.contentItems.length-1];o.addChild(t,n?0:void 0,!0),e.size*=.5,t.size=e.size,t.sizeUnit=ht.Percent,o.updateSize(!1)}else{const e=ct.createDefault(i),s=this.layoutManager.createContentItem(e,this);this.replaceChild(o,s),s.addChild(t,n?0:void 0,!0),s.addChild(o,n?void 0:0,!0),o.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}}dock(){throw new X("GID87731")}validateDocking(){throw new X("GIVD87732")}getAllContentItems(){const t=[this];return this.deepGetAllContentItems(this.contentItems,t),t}getConfigMaximisedItems(){const t=[];return this.deepFilterContentItems(this.contentItems,t,(t=>!(!Gt.isStack(t)||!t.initialWantMaximise)||!(!Gt.isComponentItem(t)||!t.initialWantMaximise))),t}getItemsByPopInParentId(t){const e=[];return this.deepFilterContentItems(this.contentItems,e,(e=>e.popInParentIds.includes(t))),e}toConfig(){throw new Error("Cannot generate GroundItem config")}setActiveComponentItem(t,e,i){}updateNodeSize(){const{width:t,height:e}=kt(this._containerElement);Tt(this.element,t),At(this.element,e),this.contentItems.length>0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e))}deepGetAllContentItems(t,e){for(let i=0;ithis.onClick(t),this._touchStartEventListener=t=>this.onTouchStart(t),this._element=document.createElement("div"),this._element.classList.add(i),this._element.title=e,this._header.on("destroy",(()=>this.destroy())),this._element.addEventListener("click",this._clickEventListener,{passive:!0}),this._element.addEventListener("touchstart",this._touchStartEventListener,{passive:!0}),this._header.controlsContainerElement.appendChild(this._element)}get element(){return this._element}destroy(){var t;this._element.removeEventListener("click",this._clickEventListener),this._element.removeEventListener("touchstart",this._touchStartEventListener),null===(t=this._element.parentNode)||void 0===t||t.removeChild(this._element)}onClick(t){this._pushEvent(t)}onTouchStart(t){this._pushEvent(t)}}class Jt{constructor(t,e,i,n,o){var s;this._layoutManager=t,this._componentItem=e,this._closeEvent=i,this._focusEvent=n,this._dragStartEvent=o,this._isActive=!1,this._tabClickListener=t=>this.onTabClickDown(t),this._tabTouchStartListener=t=>this.onTabTouchStart(t),this._closeClickListener=()=>this.onCloseClick(),this._closeTouchStartListener=()=>this.onCloseTouchStart(),this._dragStartListener=(t,e)=>this.onDragStart(t,e),this._contentItemDestroyListener=()=>this.onContentItemDestroy(),this._tabTitleChangedListener=t=>this.setTitle(t),this._element=document.createElement("div"),this._element.classList.add("lm_tab"),this._titleElement=document.createElement("span"),this._titleElement.classList.add("lm_title"),this._closeElement=document.createElement("div"),this._closeElement.classList.add("lm_close_tab"),this._element.appendChild(this._titleElement),this._element.appendChild(this._closeElement),e.isClosable?this._closeElement.style.display="":this._closeElement.style.display="none",this.setTitle(e.title),this._componentItem.on("titleChanged",this._tabTitleChangedListener);(null!==(s=e.reorderEnabled)&&void 0!==s?s:this._layoutManager.layoutConfig.settings.reorderEnabled)&&this.enableReorder(),this._element.addEventListener("click",this._tabClickListener,{passive:!0}),this._element.addEventListener("touchstart",this._tabTouchStartListener,{passive:!0}),this._componentItem.isClosable?(this._closeElement.addEventListener("click",this._closeClickListener,{passive:!0}),this._closeElement.addEventListener("touchstart",this._closeTouchStartListener,{passive:!0})):(this._closeElement.remove(),this._closeElement=void 0),this._componentItem.setTab(this),this._layoutManager.emit("tabCreated",this)}get isActive(){return this._isActive}get componentItem(){return this._componentItem}get contentItem(){return this._componentItem}get element(){return this._element}get titleElement(){return this._titleElement}get closeElement(){return this._closeElement}get reorderEnabled(){return void 0!==this._dragListener}set reorderEnabled(t){t!==this.reorderEnabled&&(t?this.enableReorder():this.disableReorder())}setTitle(t){this._titleElement.innerText=t,this._element.title=t}setActive(t){t!==this._isActive&&(this._isActive=t,t?this._element.classList.add("lm_active"):this._element.classList.remove("lm_active"))}destroy(){var t,e;this._closeEvent=void 0,this._focusEvent=void 0,this._dragStartEvent=void 0,this._element.removeEventListener("click",this._tabClickListener),this._element.removeEventListener("touchstart",this._tabTouchStartListener),null===(t=this._closeElement)||void 0===t||t.removeEventListener("click",this._closeClickListener),null===(e=this._closeElement)||void 0===e||e.removeEventListener("touchstart",this._closeTouchStartListener),this._componentItem.off("titleChanged",this._tabTitleChangedListener),this.reorderEnabled&&this.disableReorder(),this._element.remove()}setBlurred(){this._element.classList.remove("lm_focused"),this._titleElement.classList.remove("lm_focused")}setFocused(){this._element.classList.add("lm_focused"),this._titleElement.classList.add("lm_focused")}onDragStart(t,e){if(void 0===this._dragListener)throw new J("TODSDLU10093");if(void 0===this._dragStartEvent)throw new J("TODS23309");this._dragStartEvent(t,e,this._dragListener,this.componentItem)}onContentItemDestroy(){void 0!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=void 0)}onTabClickDown(t){const e=t.target;e!==this._element&&e!==this._titleElement||(0===t.button?this.notifyFocus():1===t.button&&this._componentItem.isClosable&&this.notifyClose())}onTabTouchStart(t){t.target===this._element&&this.notifyFocus()}onCloseClick(){this.notifyClose()}onCloseTouchStart(){this.notifyClose()}notifyClose(){if(void 0===this._closeEvent)throw new J("TNC15007");this._closeEvent(this._componentItem)}notifyFocus(){if(void 0===this._focusEvent)throw new J("TNA15007");this._focusEvent(this._componentItem)}enableReorder(){this._dragListener=new Zt(this._element,[this._titleElement]),this._dragListener.on("dragStart",this._dragStartListener),this._componentItem.on("destroy",this._contentItemDestroyListener)}disableReorder(){if(void 0===this._dragListener)throw new J("TDR87745");this._componentItem.off("destroy",this._contentItemDestroyListener),this._dragListener.off("dragStart",this._dragStartListener),this._dragListener=void 0}}class Qt{constructor(t,e,i,n,o){this._layoutManager=t,this._componentRemoveEvent=e,this._componentFocusEvent=i,this._componentDragStartEvent=n,this._dropdownActiveChangedEvent=o,this._tabs=[],this._lastVisibleTabIndex=-1,this._dropdownActive=!1,this._element=document.createElement("section"),this._element.classList.add("lm_tabs"),this._dropdownElement=document.createElement("section"),this._dropdownElement.classList.add("lm_tabdropdown_list"),this._dropdownElement.style.display="none"}get tabs(){return this._tabs}get tabCount(){return this._tabs.length}get lastVisibleTabIndex(){return this._lastVisibleTabIndex}get element(){return this._element}get dropdownElement(){return this._dropdownElement}get dropdownActive(){return this._dropdownActive}destroy(){for(let t=0;tthis.handleTabCloseEvent(t)),(t=>this.handleTabFocusEvent(t)),((t,e,i,n)=>this.handleTabDragStartEvent(t,e,i,n)));void 0===e&&(e=this._tabs.length),this._tabs.splice(e,0,i),ethis._lastVisibleTabIndex){const t=this._tabs[e];for(let t=e;t>0;t--)this._tabs[t]=this._tabs[t-1];this._tabs[0]=t}}updateTabSizes(t,e){let i=!1;this.tryUpdateTabSizes(i,t,e)||(i=!0,this.tryUpdateTabSizes(i,t,e)),i!==this._dropdownActive&&(this._dropdownActive=i,this._dropdownActiveChangedEvent())}tryUpdateTabSizes(t,e,i){if(this._tabs.length>0){if(void 0===i)throw new Error("non-empty tabs must have active component item");let n=0,o=!1;const s=this._layoutManager.layoutConfig.settings.tabOverlapAllowance,r=this._tabs.indexOf(i.tab),a=this._tabs[r];this._lastVisibleTabIndex=-1;for(let i=0;ie){if(o)i===r&&(l.style.zIndex="auto",l.style.marginLeft="",l.parentElement!==this._element&&this._element.appendChild(l));else{let t;if(t=r>0&&r<=i?(d-e)/(i-1):(d-e)/i,tthis.onClick(t),this._touchStartListener=t=>this.onTouchStart(t),this._rowColumnClosable=!0,this._closeButton=null,this._popoutButton=null,this._tabsContainer=new Qt(this._layoutManager,(t=>this.handleTabInitiatedComponentRemoveEvent(t)),(t=>this.handleTabInitiatedComponentFocusEvent(t)),((t,e,i,n)=>this.handleTabInitiatedDragStartEvent(t,e,i,n)),(()=>this.processTabDropdownActiveChanged())),this._show=i.show,this._popoutEnabled=i.popoutEnabled,this._popoutLabel=i.popoutLabel,this._maximiseEnabled=i.maximiseEnabled,this._maximiseLabel=i.maximiseLabel,this._minimiseEnabled=i.minimiseEnabled,this._minimiseLabel=i.minimiseLabel,this._closeEnabled=i.closeEnabled,this._closeLabel=i.closeLabel,this._tabDropdownEnabled=i.tabDropdownEnabled,this._tabDropdownLabel=i.tabDropdownLabel,this.setSide(i.side),this._canRemoveComponent=this._configClosable,this._element=document.createElement("section"),this._element.classList.add("lm_header"),this._controlsContainerElement=document.createElement("section"),this._controlsContainerElement.classList.add("lm_controls"),this._element.appendChild(this._tabsContainer.element),this._element.appendChild(this._controlsContainerElement),this._element.appendChild(this._tabsContainer.dropdownElement),this._element.addEventListener("click",this._clickListener,{passive:!0}),this._element.addEventListener("touchstart",this._touchStartListener,{passive:!0}),this._documentMouseUpListener=()=>this._tabsContainer.hideAdditionalTabsDropdown(),globalThis.document.addEventListener("mouseup",this._documentMouseUpListener,{passive:!0}),this._tabControlOffset=this._layoutManager.layoutConfig.settings.tabControlOffset,this._tabDropdownEnabled&&(this._tabDropdownButton=new Kt(this,this._tabDropdownLabel,"lm_tabdropdown",(()=>this._tabsContainer.showAdditionalTabsDropdown()))),this._popoutEnabled&&(this._popoutButton=new Kt(this,this._popoutLabel,"lm_popout",(()=>this.handleButtonPopoutEvent()))),this._maximiseEnabled&&(this._maximiseButton=new Kt(this,this._maximiseLabel,"lm_maximise",(t=>this.handleButtonMaximiseToggleEvent(t)))),this._configClosable&&(this._closeButton=new Kt(this,this._closeLabel,"lm_close",(()=>s()))),this.processTabDropdownActiveChanged()}get show(){return this._show}get side(){return this._side}get leftRightSided(){return this._leftRightSided}get layoutManager(){return this._layoutManager}get parent(){return this._parent}get tabs(){return this._tabsContainer.tabs}get lastVisibleTabIndex(){return this._tabsContainer.lastVisibleTabIndex}get element(){return this._element}get tabsContainerElement(){return this._tabsContainer.element}get controlsContainerElement(){return this._controlsContainerElement}destroy(){this.emit("destroy"),this._popoutEvent=void 0,this._maximiseToggleEvent=void 0,this._clickEvent=void 0,this._touchStartEvent=void 0,this._componentRemoveEvent=void 0,this._componentFocusEvent=void 0,this._componentDragStartEvent=void 0,this._tabsContainer.destroy(),globalThis.document.removeEventListener("mouseup",this._documentMouseUpListener),this._element.remove()}createTab(t,e){this._tabsContainer.createTab(t,e)}removeTab(t){this._tabsContainer.removeTab(t)}processActiveComponentChanged(t){this._tabsContainer.processActiveComponentChanged(t),this.updateTabSizes()}setSide(t){this._side=t,this._leftRightSided=[nt.right,nt.left].includes(this._side)}setRowColumnClosable(t){this._rowColumnClosable=t,this.updateClosability()}updateClosability(){let t;if(this._configClosable)if(this._rowColumnClosable){t=!0;const e=this.tabs.length;for(let i=0;i1}applyFocusedValue(t){t?this._element.classList.add("lm_focused"):this._element.classList.remove("lm_focused")}processMaximised(){if(void 0===this._maximiseButton)throw new J("HPMAX16997");this._maximiseButton.element.setAttribute("title",this._minimiseLabel)}processMinimised(){if(void 0===this._maximiseButton)throw new J("HPMIN16997");this._maximiseButton.element.setAttribute("title",this._maximiseLabel)}updateTabSizes(){if(this._tabsContainer.tabCount>0){const t=this._show?this._layoutManager.layoutConfig.dimensions.headerHeight:0;let e;this._leftRightSided?(this._element.style.height="",this._element.style.width=zt(t)):(this._element.style.width="",this._element.style.height=zt(t)),e=this._leftRightSided?this._element.offsetHeight-this._controlsContainerElement.offsetHeight-this._tabControlOffset:this._element.offsetWidth-this._controlsContainerElement.offsetWidth-this._tabControlOffset,this._tabsContainer.updateTabSizes(e,this._getActiveComponentItemEvent())}}handleTabInitiatedComponentRemoveEvent(t){if(this._canRemoveComponent){if(void 0===this._componentRemoveEvent)throw new J("HHTCE22294");this._componentRemoveEvent(t)}}handleTabInitiatedComponentFocusEvent(t){if(void 0===this._componentFocusEvent)throw new J("HHTAE22294");this._componentFocusEvent(t)}handleTabInitiatedDragStartEvent(t,e,i,n){if(this._canRemoveComponent){if(void 0===this._componentDragStartEvent)throw new J("HHTDSE22294");this._componentDragStartEvent(t,e,i,n)}else i.cancelDrag()}processTabDropdownActiveChanged(){void 0!==this._tabDropdownButton&&Dt(this._tabDropdownButton.element,this._tabsContainer.dropdownActive)}handleButtonPopoutEvent(){if(this._layoutManager.layoutConfig.settings.popoutWholeStack){if(void 0===this._popoutEvent)throw new J("HHBPOE17834");this._popoutEvent()}else{const t=this._getActiveComponentItemEvent();t&&t.popout()}}handleButtonMaximiseToggleEvent(t){if(void 0===this._maximiseToggleEvent)throw new J("HHBMTE16834");this._maximiseToggleEvent()}onClick(t){t.target===this._element&&this.notifyClick(t)}onTouchStart(t){t.target===this._element&&this.notifyTouchStart(t)}notifyClick(t){if(void 0===this._clickEvent)throw new J("HNHC46834");this._clickEvent(t)}notifyTouchStart(t){if(void 0===this._touchStartEvent)throw new J("HNHTS46834");this._touchStartEvent(t)}}class ee extends $t{constructor(t,e,i){var n,o,s,r,a,l,h,d,c,m,u,p,g,f,v,_,y,C,w;super(t,e,i,ee.createElement(document)),this._headerSideChanged=!1,this._resizeListener=()=>this.handleResize(),this._maximisedListener=()=>this.handleMaximised(),this._minimisedListener=()=>this.handleMinimised(),this._headerConfig=e.header;const I=t.layoutConfig.header,b=e.content;let S;if(1!==b.length)S=void 0;else{S=b[0].header}this._initialWantMaximise=e.maximised,this._initialActiveItemIndex=null!==(n=e.activeItemIndex)&&void 0!==n?n:0;const E=null!==(r=null!==(s=null===(o=this._headerConfig)||void 0===o?void 0:o.show)&&void 0!==s?s:null==S?void 0:S.show)&&void 0!==r?r:I.show,x=null!==(h=null!==(l=null===(a=this._headerConfig)||void 0===a?void 0:a.popout)&&void 0!==l?l:null==S?void 0:S.popout)&&void 0!==h?h:I.popout,L=null!==(m=null!==(c=null===(d=this._headerConfig)||void 0===d?void 0:d.maximise)&&void 0!==c?c:null==S?void 0:S.maximise)&&void 0!==m?m:I.maximise,z=null!==(g=null!==(p=null===(u=this._headerConfig)||void 0===u?void 0:u.close)&&void 0!==p?p:null==S?void 0:S.close)&&void 0!==g?g:I.close,M=null!==(_=null!==(v=null===(f=this._headerConfig)||void 0===f?void 0:f.minimise)&&void 0!==v?v:null==S?void 0:S.minimise)&&void 0!==_?_:I.minimise,P=null!==(w=null!==(C=null===(y=this._headerConfig)||void 0===y?void 0:y.tabDropdown)&&void 0!==C?C:null==S?void 0:S.tabDropdown)&&void 0!==w?w:I.tabDropdown;this._maximisedEnabled=!1!==L;const T={show:!1!==E,side:!1===E?nt.top:E,popoutEnabled:!1!==x,popoutLabel:!1===x?"":x,maximiseEnabled:this._maximisedEnabled,maximiseLabel:!1===L?"":L,closeEnabled:!1!==z,closeLabel:!1===z?"":z,minimiseEnabled:!0,minimiseLabel:M,tabDropdownEnabled:!1!==P,tabDropdownLabel:!1===P?"":P};this._header=new te(t,this,T,e.isClosable&&!1!==z,(()=>this.getActiveComponentItem()),(()=>this.remove()),(()=>this.handlePopoutEvent()),(()=>this.toggleMaximise()),(t=>this.handleHeaderClickEvent(t)),(t=>this.handleHeaderTouchStartEvent(t)),(t=>this.handleHeaderComponentRemoveEvent(t)),(t=>this.handleHeaderComponentFocusEvent(t)),((t,e,i,n)=>this.handleHeaderComponentStartDragEvent(t,e,i,n))),this.isStack=!0,this._childElementContainer=document.createElement("section"),this._childElementContainer.classList.add("lm_items"),this.on("resize",this._resizeListener),this._maximisedEnabled&&(this.on("maximised",this._maximisedListener),this.on("minimised",this._minimisedListener)),this.element.appendChild(this._header.element),this.element.appendChild(this._childElementContainer),this.setupHeaderPosition(),this._header.updateClosability()}get childElementContainer(){return this._childElementContainer}get header(){return this._header}get headerShow(){return this._header.show}get headerSide(){return this._header.side}get headerLeftRightSided(){return this._header.leftRightSided}get contentAreaDimensions(){return this._contentAreaDimensions}get initialWantMaximise(){return this._initialWantMaximise}get isMaximised(){return this===this.layoutManager.maximisedStack}get stackParent(){if(!this.parent)throw new Error("Stack should always have a parent");return this.parent}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}init(){if(!0===this.isInitialised)return;this.updateNodeSize();for(let t=0;t0){if(this._initialActiveItemIndex<0||this._initialActiveItemIndex>=e)throw new Error(`ActiveItemIndex out of range: ${this._initialActiveItemIndex} id: ${this.id}`);for(let i=0;ithis.contentItems.length)throw e-=1,new X("SAC99728");if(t instanceof jt)return e=super.addChild(t,e),this._childElementContainer.appendChild(t.element),this._header.createTab(t,e),this.setActiveComponentItem(t,i),this._header.updateTabSizes(),this.updateSize(!1),t.container.setBaseLogicalZIndex(),this._header.updateClosability(),this.emitStateChangedEvent(),e;throw new X("SACC88532")}removeChild(t,e){const i=t,n=this.contentItems.indexOf(i),o=1===this.contentItems.length;if(this._activeComponentItem===i&&(i.focused&&i.blur(),!o)){const t=0===n?1:n-1;this.setActiveComponentItem(this.contentItems[t],!1)}this._header.removeTab(i),super.removeChild(i,e),o||this._header.updateClosability(),this.emitStateChangedEvent()}toggleMaximise(){this.isMaximised?this.minimise():this.maximise()}maximise(){if(!this.isMaximised){this.layoutManager.setMaximisedStack(this);const t=this.contentItems,e=t.length;for(let i=0;i0&&void 0===t)throw new Error("expected non-empty stack to have an active component item");return{type:"stack",content:this.calculateConfigContent(),size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,isClosable:this.isClosable,maximised:this.isMaximised,header:this.createHeaderConfig(),activeItemIndex:t}}onDrop(t,e){if("header"===this._dropSegment){if(this.resetHeaderDropZone(),void 0===this._dropIndex)throw new J("SODDI68990");return void this.addChild(t,this._dropIndex)}if("body"===this._dropSegment)return void this.addChild(t,0,!0);const i="top"===this._dropSegment||"bottom"===this._dropSegment,n="left"===this._dropSegment||"right"===this._dropSegment,o="top"===this._dropSegment||"left"===this._dropSegment,s=i&&this.stackParent.isColumn||n&&this.stackParent.isRow;if(t.isComponent){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createAndInitContentItem(e,this);i.addChild(t),t=i}if(t.type===at.row||t.type===at.column){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}if(s){const e=this.stackParent.contentItems.indexOf(this);this.stackParent.addChild(t,o?e:e+1,!0),this.size*=.5,t.size=this.size,t.sizeUnit=this.sizeUnit,this.stackParent.updateSize(!1)}else{const e=i?at.column:at.row,n=ct.createDefault(e),s=this.layoutManager.createContentItem(n,this);this.stackParent.replaceChild(this,s),s.addChild(t,o?0:void 0,!0),s.addChild(this,o?void 0:0,!0),this.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}highlightDropZone(t,e){for(const i in this._contentAreaDimensions){const n=i,o=this._contentAreaDimensions[n].hoverArea;if(o.x1t&&o.y1e)return void("header"===n?(this._dropSegment="header",this.highlightHeaderDropZone(this._header.leftRightSided?e:t)):(this.resetHeaderDropZone(),this.highlightBodyDropZone(n)))}}getArea(){if("none"===this.element.style.display)return null;const t=super.getElementArea(this._header.element),e=super.getElementArea(this._childElementContainer);if(null===t||null===e)throw new K("SGAHC13086");const i=e.x2-e.x1,n=e.y2-e.y1;return this._contentAreaDimensions={header:{hoverArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2},highlightArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2}}},0===this.contentItems.length?(this._contentAreaDimensions.body={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2}},super.getElementArea(this.element)):(this._contentAreaDimensions.left={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x1+.25*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x1+.5*i,y2:e.y2}},this._contentAreaDimensions.top={hoverArea:{x1:e.x1+.25*i,y1:e.y1,x2:e.x1+.75*i,y2:e.y1+.5*n},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y1+.5*n}},this._contentAreaDimensions.right={hoverArea:{x1:e.x1+.75*i,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1+.5*i,y1:e.y1,x2:e.x2,y2:e.y2}},this._contentAreaDimensions.bottom={hoverArea:{x1:e.x1+.25*i,y1:e.y1+.5*n,x2:e.x1+.75*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1+.5*n,x2:e.x2,y2:e.y2}},super.getElementArea(this.element))}positionHeader(t){this._header.side!==t&&(this._header.setSide(t),this._headerSideChanged=!0,this.setupHeaderPosition())}updateNodeSize(){if("none"!==this.element.style.display){const t=kt(this.element);if(this._header.show){t[this._header.leftRightSided?it.width:it.height]-=this.layoutManager.layoutConfig.dimensions.headerHeight}this._childElementContainer.style.width=zt(t.width),this._childElementContainer.style.height=zt(t.height);for(let e=0;e=o&&tthis.onDrag(t,e,i))),this._dragListener.on("dragStop",(()=>this.onDrop())),this.createDragProxyElements(t,e),null===this._componentItem.parent)throw new K("DPC10097");this._componentItemFocused=this._componentItem.focused,this._componentItemFocused&&this._componentItem.blur(),this._componentItem.parent.removeChild(this._componentItem,!0),this.setDimensions(),document.body.appendChild(this._element),this.determineMinMaxXY(),this._layoutManager.calculateItemAreas(),this.setDropPosition(t,e)}get element(){return this._element}createDragProxyElements(t,e){this._element=document.createElement("div"),this._element.classList.add("lm_dragProxy");const i=document.createElement("div");i.classList.add("lm_header");const n=document.createElement("div");n.classList.add("lm_tabs");const o=document.createElement("div");o.classList.add("lm_tab");const s=document.createElement("span");s.classList.add("lm_title"),o.appendChild(s),n.appendChild(o),i.appendChild(n),this._proxyContainerElement=document.createElement("div"),this._proxyContainerElement.classList.add("lm_content"),this._element.appendChild(i),this._element.appendChild(this._proxyContainerElement),this._originalParent instanceof ee&&this._originalParent.headerShow&&(this._sided=this._originalParent.headerLeftRightSided,this._element.classList.add("lm_"+this._originalParent.headerSide),[nt.right,nt.bottom].indexOf(this._originalParent.headerSide)>=0&&this._proxyContainerElement.insertAdjacentElement("afterend",i)),this._element.style.left=zt(t),this._element.style.top=zt(e),o.setAttribute("title",this._componentItem.title),s.insertAdjacentText("afterbegin",this._componentItem.title),this._proxyContainerElement.appendChild(this._componentItem.element)}determineMinMaxXY(){const t=this._layoutManager.groundItem;if(void 0===t)throw new J("DPDMMXY73109");{const e=t.element.getBoundingClientRect();this._minX=e.left+document.body.scrollLeft,this._minY=e.top+document.body.scrollTop,this._maxX=this._minX+e.width,this._maxY=this._minY+e.height}}onDrag(t,e,i){const n=i.pageX,o=i.pageY;this.setDropPosition(n,o),this._componentItem.drag()}setDropPosition(t,e){this._layoutManager.layoutConfig.settings.constrainDragToContainer&&(t<=this._minX?t=Math.ceil(this._minX):t>=this._maxX&&(t=Math.floor(this._maxX)),e<=this._minY?e=Math.ceil(this._minY):e>=this._maxY&&(e=Math.floor(this._maxY))),this._element.style.left=zt(t),this._element.style.top=zt(e),this._area=this._layoutManager.getArea(t,e),null!==this._area&&(this._lastValidArea=this._area,this._area.contentItem.highlightDropZone(t,e,this._area))}onDrop(){const t=this._layoutManager.dropTargetIndicator;if(null===t)throw new K("DPOD30011");let e;if(t.hide(),this._componentItem.exitDragMode(),null!==this._area)e=this._componentItem,this._area.contentItem.onDrop(e,this._area);else if(null!==this._lastValidArea){e=this._componentItem;this._lastValidArea.contentItem.onDrop(e,this._lastValidArea)}else this._originalParent?(e=this._componentItem,this._originalParent.addChild(e)):this._componentItem.destroy();this._element.remove(),this._layoutManager.emit("itemDropped",this._componentItem),this._componentItemFocused&&void 0!==e&&e.focus()}setDimensions(){const t=this._layoutManager.layoutConfig.dimensions;if(void 0===t)throw new Error("DragProxy.setDimensions: dimensions undefined");let e=t.dragProxyWidth,i=t.dragProxyHeight;if(void 0===e||void 0===i)throw new Error("DragProxy.setDimensions: width and/or height undefined");const n=!1===this._layoutManager.layoutConfig.header.show?0:t.headerHeight;this._element.style.width=zt(e),this._element.style.height=zt(i),e-=this._sided?n:0,i-=this._sided?0:n,this._proxyContainerElement.style.width=zt(e),this._proxyContainerElement.style.height=zt(i),this._componentItem.enterDragMode(e,i),this._componentItem.show()}}class ne{constructor(t,e,i,n,o,s,r){this._layoutManager=t,this._element=e,this._extraAllowableChildTargets=i,this._componentTypeOrFtn=n,this._componentState=o,this._title=s,this._id=r,this._dragListener=null,this._dummyGroundContainer=document.createElement("div");const a=gt.createDefault("row");this._dummyGroundContentItem=new Yt(this._layoutManager,a,this._dummyGroundContainer),this.createDragListener()}destroy(){this.removeDragListener()}createDragListener(){this.removeDragListener(),this._dragListener=new Zt(this._element,this._extraAllowableChildTargets),this._dragListener.on("dragStart",((t,e)=>this.onDragStart(t,e))),this._dragListener.on("dragStop",(()=>this.onDragStop()))}onDragStart(t,e){var i;const n="component";let o;if("function"==typeof this._componentTypeOrFtn){const t=this._componentTypeOrFtn();o=ne.isDragSourceComponentItemConfig(t)?{type:n,componentState:t.state,componentType:t.type,title:null!==(i=t.title)&&void 0!==i?i:this._title}:t}else o={type:n,componentState:this._componentState,componentType:this._componentTypeOrFtn,title:this._title,id:this._id};const s=bt.resolve(o,!1),r=new jt(this._layoutManager,s,this._dummyGroundContentItem);if(this._dummyGroundContentItem.contentItems.push(r),null===this._dragListener)throw new K("DSODSD66746");{const i=new ie(t,e,this._dragListener,this._layoutManager,r,this._dummyGroundContentItem),n=this._layoutManager.transitionIndicator;if(null===n)throw new K("DSODST66746");n.transitionElements(this._element,i.element)}}onDragStop(){this.createDragListener()}removeDragListener(){null!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=null)}}!function(t){t.isDragSourceComponentItemConfig=function(t){return!("componentType"in t)}}(ne||(ne={}));class oe{constructor(){this._element=document.createElement("div"),this._element.classList.add("lm_dropTargetIndicator");const t=document.createElement("div");t.classList.add("lm_inner"),this._element.appendChild(t),document.body.appendChild(this._element)}destroy(){this._element.remove()}highlightArea(t,e){this._element.style.left=zt(t.x1+e),this._element.style.top=zt(t.y1+e),this._element.style.width=zt(t.x2-t.x1-e),this._element.style.height=zt(t.y2-t.y1-e),this._element.style.display="block"}hide(){Dt(this._element,!1)}}class se{constructor(){this._element=document.createElement("div"),this._element.classList.add("lm_transition_indicator"),document.body.appendChild(this._element),this._toElement=null,this._fromDimensions=null,this._totalAnimationDuration=200,this._animationStartTime=null}destroy(){this._element.remove()}transitionElements(t,e){}nextAnimationFrame(){}measure(t){const e=t.getBoundingClientRect();return{left:e.left,top:e.top,width:t.offsetWidth,height:t.offsetHeight}}}class re extends Wt{constructor(t){super(),this._layoutManager=t,this._childEventListener=t=>this.onEventFromChild(t),globalThis.addEventListener(re.ChildEventName,this._childEventListener,{passive:!0})}emit(t,...e){"userBroadcast"===t?this.emitUserBroadcast(...e):super.emit(t,...e)}emitUserBroadcast(...t){this.handleUserBroadcastEvent("userBroadcast",t)}destroy(){globalThis.removeEventListener(re.ChildEventName,this._childEventListener)}handleUserBroadcastEvent(t,e){this._layoutManager.isSubWindow?this.propagateToParent(t,e):this.propagateToThisAndSubtree(t,e)}onEventFromChild(t){const e=t.detail;this.handleUserBroadcastEvent(e.eventName,e.args)}propagateToParent(t,e){const i={bubbles:!0,cancelable:!0,detail:{layoutManager:this._layoutManager,eventName:t,args:e}},n=new CustomEvent(re.ChildEventName,i),o=globalThis.opener;if(null===o)throw new K("EHPTP15778");o.dispatchEvent(n)}propagateToThisAndSubtree(t,e){this.emitUnknown(t,...e);for(let i=0;ithis.handleContainerResize())),this._windowBeforeUnloadListener=()=>this.onBeforeUnload(),this._windowBeforeUnloadListening=!1,this._maximisedStackBeforeDestroyedListener=t=>this.cleanupBeforeMaximisedStackDestroyed(t),this.isSubWindow=t.isSubWindow,this._constructorOrSubWindowLayoutConfig=t.constructorOrSubWindowLayoutConfig,Q.checkInitialise(),dt.checkInitialise(),void 0!==t.containerElement&&(this._containerElement=t.containerElement)}get container(){return this._containerElement}get isInitialised(){return this._isInitialised}get groundItem(){return this._groundItem}get root(){return this._groundItem}get openPopouts(){return this._openPopouts}get dropTargetIndicator(){return this._dropTargetIndicator}get transitionIndicator(){return this._transitionIndicator}get width(){return this._width}get height(){return this._height}get eventHub(){return this._eventHub}get rootItem(){if(void 0===this._groundItem)throw new Error("Cannot access rootItem before init");return 0===this._groundItem.contentItems.length?void 0:this._groundItem.contentItems[0]}get focusedComponentItem(){return this._focusedComponentItem}get tabDropPlaceholder(){return this._tabDropPlaceholder}get maximisedStack(){return this._maximisedStack}get deprecatedConstructor(){return!this.isSubWindow&&void 0!==this._constructorOrSubWindowLayoutConfig}destroy(){if(this._isInitialised){this._windowBeforeUnloadListening&&(globalThis.removeEventListener("beforeunload",this._windowBeforeUnloadListener),this._windowBeforeUnloadListening=!1),!0===this.layoutConfig.settings.closePopoutsOnUnload&&this.closeAllOpenPopouts(),this._resizeObserver.disconnect(),this.checkClearResizeTimeout(),void 0!==this._groundItem&&this._groundItem.destroy(),this._tabDropPlaceholder.remove(),null!==this._dropTargetIndicator&&this._dropTargetIndicator.destroy(),null!==this._transitionIndicator&&this._transitionIndicator.destroy(),this._eventHub.destroy();for(const t of this._dragSources)t.destroy();this._dragSources=[],this._isInitialised=!1}}minifyConfig(t){return _t.minifyConfig(t)}unminifyConfig(t){return _t.unminifyConfig(t)}init(){let t;if(this.setContainer(),this._dropTargetIndicator=new oe,this._transitionIndicator=new se,this.updateSizeFromContainer(),this.isSubWindow){if(void 0===this._constructorOrSubWindowLayoutConfig)throw new J("LMIU07155");{const e=this._constructorOrSubWindowLayoutConfig.root;if(void 0===e)throw new X("LMIC07156");if(!Ct.isComponent(e))throw new X("LMIC07157");t=e;const i=xt.resolve(this._constructorOrSubWindowLayoutConfig);this.layoutConfig=Object.assign(Object.assign({},i),{root:void 0})}}else void 0===this._constructorOrSubWindowLayoutConfig?this.layoutConfig=_t.createDefault():this.layoutConfig=xt.resolve(this._constructorOrSubWindowLayoutConfig);const e=this.layoutConfig;this._groundItem=new Yt(this,e.root,this._containerElement),this._groundItem.init(),this.checkLoadedLayoutMaximiseItem(),this._resizeObserver.observe(this._containerElement),this._isInitialised=!0,this.adjustColumnsResponsive(),this.emit("initialised"),void 0!==t&&this.loadComponentAsRoot(t)}loadLayout(t){if(!this.isInitialised)throw new Error("GoldenLayout: Need to call init() if LayoutConfig with defined root passed to constructor");if(void 0===this._groundItem)throw new J("LMLL11119");this.createSubWindows(),this.layoutConfig=xt.resolve(t),this._groundItem.loadRoot(this.layoutConfig.root),this.checkLoadedLayoutMaximiseItem(),this.adjustColumnsResponsive()}saveLayout(){if(!1===this._isInitialised)throw new Error("Can't create config, layout not yet initialised");if(void 0===this._groundItem)throw new J("LMTC18244");{const t=this._groundItem.calculateConfigContent();let e;e=1!==t.length?void 0:t[0],this.reconcilePopoutWindows();const i=[];for(let t=0;t=0?n=this._groundItem.contentItems[0]:e=0;break;case at.row:case at.column:e=n.addItem(t,i.index);break;case at.stack:if(Ct.isComponent(t)){e=n.addItem(t,i.index);break}throw Error(tt[6]);case at.component:throw new X("LMAIALC87444602");default:throw new Y("LMAIALU98881733",n.type)}if(Ct.isComponent(t)){const t=n.contentItems[e];Gt.isStack(t)&&(n=t,e=0)}return i.parentItem=n,i.index=e,i}}}loadComponentAsRoot(t){if(void 0===this._groundItem)throw new Error("Cannot add item before init");this._groundItem.loadComponentAsRoot(t)}updateSize(t,e){this.setSize(t,e)}setSize(t,e){if(this._width=t,this._height=e,!0===this._isInitialised){if(void 0===this._groundItem)throw new J("LMUS18881");if(this._groundItem.setSize(this._width,this._height),this._maximisedStack){const{width:t,height:e}=kt(this._containerElement);Tt(this._maximisedStack.element,t),At(this._maximisedStack.element,e),this._maximisedStack.updateSize(!1)}this.adjustColumnsResponsive()}}beginSizeInvalidation(){this._sizeInvalidationBeginCount++}endSizeInvalidation(){0==--this._sizeInvalidationBeginCount&&this.updateSizeFromContainer()}updateSizeFromContainer(){const{width:t,height:e}=kt(this._containerElement);this.setSize(t,e)}updateRootSize(t=!1){if(void 0===this._groundItem)throw new J("LMURS28881");this._groundItem.updateSize(t)}createAndInitContentItem(t,e){const i=this.createContentItem(t,e);return i.init(),i}createContentItem(t,e){if("string"!=typeof t.type)throw new G("Missing parameter 'type'",JSON.stringify(t));if(ct.isComponentItem(t)&&!(e instanceof ee)&&e&&!(!0===this.isSubWindow&&e instanceof Yt)){t={type:at.stack,content:[t],size:t.size,sizeUnit:t.sizeUnit,minSize:t.minSize,minSizeUnit:t.minSizeUnit,id:t.id,maximised:t.maximised,isClosable:t.isClosable,activeItemIndex:0,header:void 0}}return this.createContentItemFromConfig(t,e)}findFirstComponentItemById(t){if(void 0===this._groundItem)throw new J("LMFFCIBI82446");return this.findFirstContentItemTypeByIdRecursive(at.component,t,this._groundItem)}createPopout(t,e,i,n){return t instanceof Gt?this.createPopoutFromContentItem(t,e,i,n):this.createPopoutFromItemConfig(t,e,i,n)}createPopoutFromContentItem(t,e,i,n){let o=t.parent,s=t;for(;null!==o&&1===o.contentItems.length&&!o.isGround;)s=o,o=o.parent;if(null===o)throw new K("LMCPFCI00834");{if(void 0===n&&(n=o.contentItems.indexOf(s)),null!==i&&o.addPopInParentId(i),void 0===e){const i=globalThis.screenX||globalThis.screenLeft,n=globalThis.screenY||globalThis.screenTop,o=t.element.offsetLeft,s=t.element.offsetTop,{width:r,height:a}=kt(t.element);e={left:i+o,top:n+s,width:r,height:a}}const r=t.toConfig();if(t.remove(),ft.isRootItemConfig(r))return this.createPopoutFromItemConfig(r,e,i,n);throw new Error(`${tt[0]}`)}}beginVirtualSizedContainerAdding(){0==++this._virtualSizedContainerAddingBeginCount&&(this._virtualSizedContainers.length=0)}addVirtualSizedContainer(t){this._virtualSizedContainers.push(t)}endVirtualSizedContainerAdding(){if(0==--this._virtualSizedContainerAddingBeginCount){const t=this._virtualSizedContainers.length;if(t>0){this.fireBeforeVirtualRectingEvent(t);for(let e=0;ethis.emit("windowOpened",a))),a.on("closed",(()=>this.reconcilePopoutWindows())),this._openPopouts.push(a),this.layoutConfig.settings.closePopoutsOnUnload&&!this._windowBeforeUnloadListening&&(globalThis.addEventListener("beforeunload",this._windowBeforeUnloadListener,{passive:!0}),this._windowBeforeUnloadListening=!0),a}closeAllOpenPopouts(){for(let t=0;tglobalThis.close()),1)}getArea(t,e){let i=null,n=1/0;for(let o=0;o=s.x1&&t=s.y1&&es.surface&&(n=s.surface,i=s)}return i}calculateItemAreas(){const t=this.getAllContentItems(),e=this._groundItem;if(void 0===e)throw new J("LMCIAR44365");if(1!==t.length){e.contentItems[0].isStack?this._itemAreas=[]:this._itemAreas=e.createSideAreas();for(let e=0;e0){let e=t[0];if(Gt.isComponentItem(e)){const t=e.parent;if(null===t)throw new K("LMXLLMI69999");e=t}if(!Gt.isStack(e))throw new X("LMCLLMI19993");e.maximise()}}}processMaximiseStack(t){if(this._maximisedStack=t,t.on("beforeItemDestroyed",this._maximisedStackBeforeDestroyedListener),t.element.classList.add("lm_maximised"),t.element.insertAdjacentElement("afterend",this._maximisePlaceholder),void 0===this._groundItem)throw new J("LMMXI19993");{this._groundItem.element.prepend(t.element);const{width:e,height:i}=kt(this._containerElement);Tt(t.element,e),At(t.element,i),t.updateSize(!0),t.focusActiveContentItem(),this._maximisedStack.emit("maximised"),this.emit("stateChanged")}}processMinimiseMaximisedStack(){if(void 0===this._maximisedStack)throw new X("LMMMS74422");{const t=this._maximisedStack;if(null===t.parent)throw new K("LMMI13668");t.element.classList.remove("lm_maximised"),this._maximisePlaceholder.insertAdjacentElement("afterend",t.element),this._maximisePlaceholder.remove(),this.updateRootSize(!0),this._maximisedStack=void 0,t.off("beforeItemDestroyed",this._maximisedStackBeforeDestroyedListener),t.emit("minimised"),this.emit("stateChanged")}}reconcilePopoutWindows(){const t=[];for(let e=0;e{this._resizeTimeoutId=void 0,this.beginSizeInvalidation(),this.endSizeInvalidation()}),this.resizeDebounceInterval))}checkClearResizeTimeout(){void 0!==this._resizeTimeoutId&&(clearTimeout(this._resizeTimeoutId),this._resizeTimeoutId=void 0)}setContainer(){var t;const e=document.body,i=null!==(t=this._containerElement)&&void 0!==t?t:e;if(i===e){this.resizeWithContainerAutomatically=!0;const t=document.documentElement;t.style.height="100%",t.style.margin="0",t.style.padding="0",t.style.overflow="clip",e.style.height="100%",e.style.margin="0",e.style.padding="0",e.style.overflow="clip"}this._containerElement=i}onBeforeUnload(){this.destroy()}adjustColumnsResponsive(){if(void 0===this._groundItem)throw new J("LMACR20883");if(this._firstLoad=!1,this.useResponsiveLayout()&&!this._updatingColumnsResponsive&&this._groundItem.contentItems.length>0&&this._groundItem.contentItems[0].isRow){if(void 0===this._groundItem||null===this._width)throw new J("LMACR77412");{const t=this._groundItem.contentItems[0].contentItems.length;if(t<=1)return;{const e=this.layoutConfig.dimensions.defaultMinItemWidth;if(t*e<=this._width)return;{this._updatingColumnsResponsive=!0;const i=t-Math.max(Math.floor(this._width/e),1),n=this._groundItem.contentItems[0],o=this.getAllStacks();if(0===o.length)throw new X("LMACRS77413");{const t=o[0];for(let e=0;en?void 0:{parentItem:t,index:o}}}case 1:if(void 0===this._focusedComponentItem)return;{const t=this._focusedComponentItem.parentItem;return this.tryCreateLocationFromParentItem(t,e)}case 2:{const t=this.findFirstContentItemType(at.stack);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 3:{let t=this.findFirstContentItemType(at.row);return void 0!==t?this.tryCreateLocationFromParentItem(t,e):(t=this.findFirstContentItemType(at.column),void 0!==t?this.tryCreateLocationFromParentItem(t,e):void 0)}case 4:{const t=this.findFirstContentItemType(at.row);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 5:{const t=this.findFirstContentItemType(at.column);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 6:if(void 0===this._groundItem)throw new J("LMFLRIF18244");return void 0!==this.rootItem?void 0:void 0===e||0===e?{parentItem:this._groundItem,index:0}:void 0;case 7:if(void 0===this._groundItem)throw new J("LMFLF18244");{const t=this._groundItem.contentItems;if(0===t.length)return void 0===e||0===e?{parentItem:this._groundItem,index:0}:void 0;{const i=t[0];return this.tryCreateLocationFromParentItem(i,e)}}}}tryCreateLocationFromParentItem(t,e){const i=t.contentItems.length;return void 0===e?{parentItem:t,index:i}:e<0||e>i?void 0:{parentItem:t,index:e}}}!function(t){t.createMaximisePlaceElement=function(t){const e=t.createElement("div");return e.classList.add("lm_maximise_place"),e},t.createTabDropPlaceholderElement=function(t){const e=t.createElement("div");return e.classList.add("lm_drop_tab_placeholder"),e},t.defaultLocationSelectors=[{typeId:1,index:void 0},{typeId:2,index:void 0},{typeId:3,index:void 0},{typeId:7,index:void 0}],t.afterFocusedItemIfPossibleLocationSelectors=[{typeId:0,index:1},{typeId:2,index:void 0},{typeId:3,index:void 0},{typeId:7,index:void 0}]}(ae||(ae={}));class le extends ae{constructor(t,e,i,n){if(super(le.createLayoutManagerConstructorParameters(t,e)),this._bindComponentEventHanlderPassedInConstructor=!1,this._creationTimeoutPassed=!1,void 0!==e&&"function"==typeof e&&(this.bindComponentEvent=e,this._bindComponentEventHanlderPassedInConstructor=!0,void 0!==i&&(this.unbindComponentEvent=i)),!this._bindComponentEventHanlderPassedInConstructor&&this.isSubWindow){if(void 0===this._constructorOrSubWindowLayoutConfig)throw new J("VLC98823");{const t=xt.resolve(this._constructorOrSubWindowLayoutConfig);this.layoutConfig=Object.assign(Object.assign({},t),{root:void 0})}}!0!==n&&(this.deprecatedConstructor||this.init())}destroy(){this.bindComponentEvent=void 0,this.unbindComponentEvent=void 0,super.destroy()}init(){if(this._bindComponentEventHanlderPassedInConstructor||"loading"!==document.readyState&&null!==document.body){if(!this._bindComponentEventHanlderPassedInConstructor&&!0===this.isSubWindow&&!this._creationTimeoutPassed)return setTimeout((()=>this.init()),7),void(this._creationTimeoutPassed=!0);!0===this.isSubWindow&&(this._bindComponentEventHanlderPassedInConstructor||this.clearHtmlAndAdjustStylesForSubWindow(),window.__glInstance=this),super.init()}else document.addEventListener("DOMContentLoaded",(()=>this.init()),{passive:!0})}clearHtmlAndAdjustStylesForSubWindow(){const t=document.head,e=new Array(4);e[0]=document.querySelectorAll("body link"),e[1]=document.querySelectorAll("body style"),e[2]=document.querySelectorAll("template"),e[3]=document.querySelectorAll(".gl_keep");for(let i=0;ithis.emit("popIn"))),document.body.appendChild(t),!0}}bindComponent(t,e){if(void 0!==this.bindComponentEvent){return this.bindComponentEvent(t,e)}if(void 0!==this.getComponentEvent)return{virtual:!1,component:this.getComponentEvent(t,e)};{const t=`${tt[2]}: ${JSON.stringify(e)}`;throw new Z(t)}}unbindComponent(t,e,i){if(void 0!==this.unbindComponentEvent)this.unbindComponentEvent(t);else if(!e&&void 0!==this.releaseComponentEvent){if(void 0===i)throw new J("VCUCRCU333998");this.releaseComponentEvent(t,i)}}}!function(t){let e=!1;t.createLayoutManagerConstructorParameters=function(t,i){const n=e?null:new URL(document.location.href).searchParams.get("gl-window");e=!0;const o=null!==n;let s,r;if(null!==n){const e=localStorage.getItem(n);if(null===e)throw new Error("Null gl-window Config");localStorage.removeItem(n);const i=JSON.parse(e),o=_t.unminifyConfig(i);r=xt.fromResolved(o),t instanceof HTMLElement&&(s=t)}else void 0===t?r=void 0:t instanceof HTMLElement?(r=void 0,s=t):r=t,void 0===s&&i instanceof HTMLElement&&(s=i);return{constructorOrSubWindowLayoutConfig:r,isSubWindow:o,containerElement:s}}}(le||(le={}));class he extends le{constructor(t,e,i){super(t,e,i,!0),this._componentTypesMap=new Map,this._registeredComponentMap=new Map,this._virtuableComponentMap=new Map,this._containerVirtualRectingRequiredEventListener=(t,e,i)=>this.handleContainerVirtualRectingRequiredEvent(t,e,i),this._containerVirtualVisibilityChangeRequiredEventListener=(t,e)=>this.handleContainerVirtualVisibilityChangeRequiredEvent(t,e),this._containerVirtualZIndexChangeRequiredEventListener=(t,e,i)=>this.handleContainerVirtualZIndexChangeRequiredEvent(t,e,i),this.deprecatedConstructor||this.init()}registerComponent(t,e,i=!1){if("function"!=typeof e)throw new $("registerComponent() componentConstructorOrFactoryFtn parameter is not a function");if(e.hasOwnProperty("prototype")){const n=e;this.registerComponentConstructor(t,n,i)}else{const n=e;this.registerComponentFactoryFunction(t,n,i)}}registerComponentConstructor(t,e,i=!1){if("function"!=typeof e)throw new Error(tt[1]);if(void 0!==this._componentTypesMap.get(t))throw new Z(`${tt[3]}: ${t}`);this._componentTypesMap.set(t,{constructor:e,factoryFunction:void 0,virtual:i})}registerComponentFactoryFunction(t,e,i=!1){if("function"!=typeof e)throw new Z("Please register a constructor function");if(void 0!==this._componentTypesMap.get(t))throw new Z(`${tt[3]}: ${t}`);this._componentTypesMap.set(t,{constructor:void 0,factoryFunction:e,virtual:i})}registerComponentFunction(t){this.registerGetComponentConstructorCallback(t)}registerGetComponentConstructorCallback(t){if("function"!=typeof t)throw new Error("Please register a callback function");void 0!==this._getComponentConstructorFtn&&console.warn("Multiple component functions are being registered. Only the final registered function will be used."),this._getComponentConstructorFtn=t}getRegisteredComponentTypeNames(){const t=this._componentTypesMap.keys();return Array.from(t)}getComponentInstantiator(t){let e;const i=pt.resolveComponentTypeName(t);return void 0!==i&&(e=this._componentTypesMap.get(i)),void 0===e&&void 0!==this._getComponentConstructorFtn&&(e={constructor:this._getComponentConstructorFtn(t),factoryFunction:void 0,virtual:!1}),e}bindComponent(t,e){let i;const n=pt.resolveComponentTypeName(e);let o;if(void 0!==n&&(i=this._componentTypesMap.get(n)),void 0===i&&void 0!==this._getComponentConstructorFtn&&(i={constructor:this._getComponentConstructorFtn(e),factoryFunction:void 0,virtual:!1}),void 0!==i){const s=i.virtual;let r,a;r=void 0===e.componentState?void 0:Ut({},e.componentState);const l=i.constructor;if(void 0!==l)a=new l(t,r,s);else{const e=i.factoryFunction;if(void 0===e)throw new X("LMBCFFU10008");a=e(t,r,s)}if(s){if(void 0===a)throw new J("GLBCVCU988774");{const e=a,i=e.rootHtmlElement;if(void 0===i)throw new Z(`${tt[5]}: ${n}`);!function(t){const e="absolute";t.style.position!==e&&(t.style.position=e)}(i),this.container.appendChild(i),this._virtuableComponentMap.set(t,e),t.virtualRectingRequiredEvent=this._containerVirtualRectingRequiredEventListener,t.virtualVisibilityChangeRequiredEvent=this._containerVirtualVisibilityChangeRequiredEventListener,t.virtualZIndexChangeRequiredEvent=this._containerVirtualZIndexChangeRequiredEventListener}}this._registeredComponentMap.set(t,a),o={virtual:i.virtual,component:a}}else o=super.bindComponent(t,e);return o}unbindComponent(t,e,i){if(void 0===this._registeredComponentMap.get(t))super.unbindComponent(t,e,i);else{const e=this._virtuableComponentMap.get(t);if(void 0!==e){const i=e.rootHtmlElement;if(void 0===i)throw new X("GLUC77743",t.title);this.container.removeChild(i),this._virtuableComponentMap.delete(t)}}}fireBeforeVirtualRectingEvent(t){this._goldenLayoutBoundingClientRect=this.container.getBoundingClientRect(),super.fireBeforeVirtualRectingEvent(t)}handleContainerVirtualRectingRequiredEvent(t,e,i){const n=this._virtuableComponentMap.get(t);if(void 0===n)throw new J("GLHCSCE55933");{const o=n.rootHtmlElement;if(void 0===o)throw new Z(tt[4]+" "+t.title);{const n=t.element.getBoundingClientRect(),s=n.left-this._goldenLayoutBoundingClientRect.left;o.style.left=zt(s);const r=n.top-this._goldenLayoutBoundingClientRect.top;o.style.top=zt(r),Tt(o,e),At(o,i)}}}handleContainerVirtualVisibilityChangeRequiredEvent(t,e){const i=this._virtuableComponentMap.get(t);if(void 0===i)throw new J("GLHCVVCRE55934");{const n=i.rootHtmlElement;if(void 0===n)throw new Z(tt[4]+" "+t.title);Dt(n,e)}}handleContainerVirtualZIndexChangeRequiredEvent(t,e,i){const n=this._virtuableComponentMap.get(t);if(void 0===n)throw new J("GLHCVZICRE55935");{const e=n.rootHtmlElement;if(void 0===e)throw new Z(tt[4]+" "+t.title);e.style.zIndex=i}}}const de="initial_",ce={show:"top",popout:!1,maximise:!1,close:"close-tab-unused"},me={headerHeight:31},ue={hasHeaders:!0,reorderEnabled:!0},pe={popoutWholeStack:!1,constrainDragToContainer:!1,constrainDragToHeaders:!1,preventDragout:!1,showMaximiseIcon:!1,showPopoutIcon:!1,showCloseIcon:!1,blockedPopoutsThrowError:!0,closePopoutsOnUnload:!0,selectionEnabled:!1};var ge,fe;class ve{constructor(e){this.layout=e,ge.set(this,void 0),fe.set(this,void 0),this.handleResize=t=>{t.forEach((t=>this.resizeElement(t.target)))},this.handleMutation=()=>{this.layout.viewComponentsByContainerElement.forEach((t=>{this.resizeElement(t.container.element)}))},t.__classPrivateFieldSet(this,ge,new ResizeObserver(this.handleResize),"f"),t.__classPrivateFieldSet(this,fe,new MutationObserver(this.handleMutation),"f")}observeMutations(e){t.__classPrivateFieldGet(this,fe,"f")?.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["class"]})}destroy(){t.__classPrivateFieldGet(this,ge,"f").disconnect(),t.__classPrivateFieldGet(this,fe,"f").disconnect()}observeContainer(e){t.__classPrivateFieldGet(this,ge,"f").observe(e)}unobserveContainer(e){t.__classPrivateFieldGet(this,ge,"f").unobserve(e)}resizeElement(t){const e=this.layout.viewComponentsByContainerElement.get(t);e&&e.resize()}}ge=new WeakMap,fe=new WeakMap;var _e={};Object.defineProperty(_e,"__esModule",{value:!0});var ye=_e.BaseItem=void 0;class Ce{constructor(t,e,i){this._item=t,this._layout=e,this._wrap=i}get raw(){return this._item}get layout(){return this._layout}get type(){return this._item.type}get contentItems(){return(this._item.contentItems??[]).map((t=>this._wrap(t)))}get parent(){const t=this._item.parent;return t?this._wrap(t):null}setActiveContentItem(t,e){if("stack"!==this.type)throw new Error(`Cannot call setActiveContentItem from a non-stack item: ${this.type}`);this._item.setActiveContentItem(t.raw,e)}static wrapInternal(t,e,i){const n=Ce.wrapCache.get(e);if(n)return n;const o=new t(e,i,(e=>Ce.wrapInternal(t,e,i)));return Ce.wrapCache.set(e,o),o}}ye=_e.BaseItem=Ce,Ce.wrapCache=new WeakMap;const we=t=>!!t&&"contentItems"in t&&(t.isRow||t.isColumn);class Ie extends ye{isRoot(){return!!this._item.parent?.isGround}getBounds(){return this._item.element.getBoundingClientRect()}get viewName(){if(this._item.isComponent){const{component:t}=this._item;return t.identity.name}throw new Error("View name not found")}onDestroyed(t){const e=({target:i})=>{i===this._item&&(t(),this._item.off("itemDestroyed",e))};this._item.on("itemDestroyed",e)}createAdjacentStack({position:t="right"}={}){const e=this.raw;if(ee.isStack(e)&&e.parent){const i=["top","bottom"].includes(t)?"column":"row",n=["left","top"].includes(t)?1:0,o=we(e.parent)?e.parent:e.layoutManager,s=o,r=e.parent.contentItems.indexOf(e);e.parent.isGround&&e.parent.removeChild(e,!0);const a=o.newItem({type:i,content:[{type:"stack",content:[]}]},r);if(!a)throw new Error("createAdjacentStack: Failed to create new container");const l=a.contentItems[0];return a.addChild(this.raw,n),we(s)&&s.removeChild(e,!0),this._wrap(l)}throw new Error(`Cannot creat adjacent stacks for type: ${e.type}, must be type 'stack'`)}setActiveContentItem(t,e=!0){if(!ee.isStack(this._item))throw new Error(`Cannot call setActiveContentItem from a non-stack item: ${this.type}`);this._item.setActiveComponentItem(t.raw,!e)}static wrap(t,e){return ye.wrapInternal(Ie,t,e)}}function be(t=[],e){for(const i of t)"component"===i.type?Object.keys(e).forEach((t=>{t in i&&(i.componentState={[`${de}${t}`]:i[t],...i.componentState}),i[t]=e[t]})):be(i.content,e)}function Se(t=[],e,i){for(const n of t)if("component"===n.type)Object.keys(e).forEach((t=>{if(`${de}${t}`in n.componentState)return n[t]=n.componentState[`${de}${t}`],void delete n.componentState[`${de}${t}`];n[t]=e[t]}));else{if(n.size&&("row"===i||"column"===i)){n["row"===i?"width":"height"]=n.size?.includes(".")?parseFloat(n.size):parseInt(n.size)}Se(n.content,e,n.type)}}function Ee(t){if(t.root){t.root.content&&Se([t.root],{componentName:"view",isClosable:!0});const e=t.root;t.content=[e],delete t.root}return t}const xe=e=>class extends e{connectedCallback(){if(!this.name||!this.uuid)throw new Error(" Name or uuid attribute missing");if(!this.src)throw new Error(" missing 'src' attribute.");this.#t||(this.#t=document.createElement("iframe"),this.#t.src=this.src,this.#t.style.height="100%",this.#t.style.width="100%",this.#t.style.border="none",this.forceFrameName?this.#t.setAttribute("name",this.forceFrameName):this.#t.setAttribute("name",t.encodeOptions({brokerUrl:this.brokerUrl,name:this.name,uuid:this.uuid,providerId:this.providerId,contextGroup:this.contextGroup},"of-frame")),this.#t.setAttribute("id",this.name),this.appendChild(this.#t))}#t;get brokerUrl(){return this.getAttribute("of-broker")}set brokerUrl(t){t&&this.setAttribute("of-broker",t)}get name(){return this.getAttribute("of-name")}set name(t){t&&this.setAttribute("of-name",t)}get forceFrameName(){return this.getAttribute("forceFrameName")}set forceFrameName(t){t&&this.setAttribute("forceFrameName",t)}get uuid(){return this.getAttribute("of-uuid")}set uuid(t){t&&this.setAttribute("of-uuid",t)}get src(){return this.getAttribute("src")}set src(t){t&&this.setAttribute("src",t)}get providerId(){return this.getAttribute("of-provider-id")}set providerId(t){t&&this.setAttribute("of-provider-id",t)}get contextGroup(){return this.getAttribute("of-context-group")}set contextGroup(t){t&&this.setAttribute("of-context-group",t)}static get observedAttributes(){return["name"]}};class Le{static create(t){const e=document.createElement("of-view");return Object.entries(t).forEach((([t,i])=>{e.setAttribute(t,i)})),e}}customElements.define("of-view",xe(HTMLElement));class ze{constructor(t,i,n,{brokerUrl:o,interopConfig:s},r){this.container=t,this.config=i,this.ofView=null,this.isDragging=()=>this.container.tab.element?.className.includes("lm_dragging")??!1;const{url:a,web:l,interop:h,name:d}=i||{},c=d??`internal-generated-view-${e.v4()}`;if(this.identity={uuid:n,name:c},this.container.element.setAttribute("of-name",c),this.container.element.id=`container-${c}`,this.container.parent.id=c,void 0===a)return void this.handleUrlMissing();const m=this.updateTitleIfNotSet(a),u={"of-broker":o,"of-uuid":n,"of-name":c,src:a};l?.frameName&&(u.forceFrameName=l.frameName);const p=h?.currentContextGroup??s?.currentContextGroup;p&&(u["of-context-group"]=p),s?.providerId&&(u["of-provider-id"]=s?.providerId),this.ofView=Le.create(u),this.ofView.title=m??`Iframe: ${a}`,r.appendChild(this.ofView),this.ofView.style.position="absolute"}updateTitleIfNotSet(t){return"view"===this.container.parent.title&&this.container.parent.setTitle(t),this.container.parent.title}handleUrlMissing(){const t=document.createElement("div");t.setAttribute("style","padding: 20px");t.innerText="No URL provided",this.container.element.appendChild(t)}destroy(){this.ofView?.remove(),this.ofView=null}closeView(){this.container.close()}resize(){if(this.ofView){if(this.isDragging())return void(this.ofView.style.display="none");const t=this.container.element.getBoundingClientRect();this.ofView.style.position="absolute",this.ofView.style.height=`${t.height}px`,this.ofView.style.width=`${t.width}px`,this.ofView.style.inset=`${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`,this.ofView.style.display="block"}}}class Me extends U{static overrideConfig(t){const e={...ue,...t.settings,...pe};return e.reorderEnabled?be(t.content,{isClosable:!0}):be(t.content,{reorderEnabled:!1}),{dimensions:me,...t,settings:e,header:{...ce,show:!1!==t.settings?.hasHeaders&&ce.show}}}constructor(t,e,i,{options:n},o,s){super(),this.identity=t,this.container=e,this.initialConfig=i,this.layoutManager=o,this.platformProvider=s,this.viewComponentsByContainerElement=new Map,this.layoutContentCache=_.getSingleInstance(),this.reparentingViews=new Set,this.goldenLayoutDestroyed=!1,this.createViewComponent=(t,e)=>{m.handleSharedView(this.layoutManager,this.identity,e);const i=new ze(t,e,this.identity.uuid,this.options,this.iframeContainer);return e&&!1===e[`${de}isClosable`]&&this.stylesheet.insertRule(`#tab-${i.identity.name} .lm_close_tab { display: none; }`),this.viewComponentsByContainerElement.set(t.element,i),this.resizeController.observeContainer(t.element),i},this.iframeContainer=document.createElement("div"),this.iframeContainer.id=`openfin-layout-iframe-container-${this.identity.layoutName}`,this.domEmitter=new V(e),this.setupStylesheets(),this.layout=new he(this.container),this.layout.resizeWithContainerAutomatically=!0,this.options=n,this.layout.registerComponent("view",this.createViewComponent),this.setupListeners(),this.resizeController=new ve(this),this.layout.loadLayout(Me.overrideConfig(i));const r=document.createElement("div");r.id=`openfin-layout-shadow-container-${this.identity.layoutName}`,r.attachShadow({mode:"open",delegatesFocus:!1}).appendChild(this.iframeContainer),this.container.appendChild(r),this.resizeController.observeMutations(this.container)}getStackByView({name:t}){const e=this.layout.findFirstComponentItemById(t);if(e?.parent&&e?.parent?.isStack)return Ie.wrap(e.parent,this)}getRoot(){return Ie.wrap(this.layout.rootItem,this)}async platformCloseView(t){const e=[...this.viewComponentsByContainerElement.values()].find((e=>e.identity.name===t.name));if(!e)throw new Error(`View with name: ${t.name} not found in layout.`);e.closeView()}async platformCreateView(t,{location:e,targetView:i}={}){if(i)throw new Error("TargetView not supported in web");const n={options:this.platformProvider.normalizeOptions(t),target:this.identity,location:e};return this.insertView(n)}setupStylesheets(){if(this.container.setAttribute("data-openfin-layout-name",this.identity.layoutName),this.stylesheet=new CSSStyleSheet,this.stylesheet.insertRule(".lm_close { display: none; }"),document.adoptedStyleSheets.push(this.stylesheet),this.initialConfig.settings?.preventSplitterResize){const t=`\n [data-openfin-layout-name='${this.identity.layoutName}'] .lm_splitter {\n pointer-events: none;\n }`;this.stylesheet.insertRule(t)}}insertView({options:t,location:e,targetView:i}){const n=e?this.layoutContentCache.getItemOrUndefined(e.id):void 0,o=i?this.layoutContentCache.getItemOrUndefined(i.name):void 0,s=n??o??Ie.wrap(this.layout.rootItem,this);let r;if(ee.isStack(s.raw))r=s.raw;else{if(!we(s.raw))throw new Error("Cannot add a view at the requested location");r=s.raw.newItem({type:"stack",content:[]})}const a=Math.min(r.contentItems.length,e?.index??r.contentItems.length);let l=this.layout.findFirstComponentItemById(t.name);l?(l.parent&&l.parent.removeChild(l,!0),r.addChild(l,a)):l=r.newComponent("view",t,t.title??t.url??"Default Title",a);const h=l.component.identity;return Promise.resolve({identity:h})}replaceView({viewToReplace:t,newView:e}){throw new Error("Method not implemented.")}replaceLayout(t){throw new Error("Method not implemented.")}async cleanupView(t){}applyPreset(t){throw new Error("Method not implemented.")}getCurrentViews(){return[...this.viewComponentsByContainerElement.values()].map((t=>t.identity))}async getFrameSnapshot(){return Ee(xt.fromResolved(this.layout.toConfig()))}isVisible(){return W(this.container)}async onViewDetached({viewIdentity:t}){this.reparentingViews.add(t.name),this.platformCloseView(t)}async destroy(){this.goldenLayoutDestroyed||(this.goldenLayoutDestroyed=!0,this.layout.destroy()),this.iframeContainer.remove(),this.resizeController.destroy(),document.adoptedStyleSheets=document.adoptedStyleSheets.filter((t=>t!==this.stylesheet)),this.viewComponentsByContainerElement.clear()}setupListeners(){this.container.addEventListener("pointerdown",(t=>{if(t.target instanceof HTMLElement){const e=t.target.classList;["lm_tab","lm_title","lm_splitter","lm_drag_handle"].some((t=>e.contains(t)))&&(this.handleDragStart(),2===t.button&&t.stopPropagation())}}),!0),document.addEventListener("pointerup",(()=>this.handleDragEnd()),!0),this.layout.on("tabCreated",(t=>{const e=t.componentItem.component;t.element.id=`tab-${e.identity.name}`,this.domEmitter.dispatchLocalEvent("tab-created",e.identity)})),this.layout.on("itemCreated",(({target:t})=>{const e=t;if(Gt.isComponentItem(e)){const t=e.component;this.domEmitter.dispatchLocalEvent("container-created",t.identity)}})),this.layout.on("itemDestroyed",(t=>{const e=t.target;if(Gt.isComponentItem(e)){const t=e.component;this.removeViewComponent(t)}})),this.layout.on("itemDropped",(()=>{this.handleDragEnd()}))}handleDragStart(){this.iframeContainer.style.pointerEvents="none"}handleDragEnd(){this.iframeContainer.style.pointerEvents=""}removeViewComponent(t){if(t.config&&!1===t.config[`${de}isClosable`]){const e=[...this.stylesheet.cssRules].findIndex((e=>e.cssText.includes(`#tab-${t.identity.name}`)));this.stylesheet.deleteRule(e)}t.destroy(),this.viewComponentsByContainerElement.delete(t.container.element),this.resizeController.unobserveContainer(t.container.element),this.reparentingViews.has(t.identity.name)?this.reparentingViews.delete(t.identity.name):this.platformProvider.closeView(t.identity.name);0===this.getCurrentViews().length&&(this.goldenLayoutDestroyed||(this.goldenLayoutDestroyed=!0,m.handleLastViewRemoved(this.layoutManager,this.identity)))}}class Pe{constructor(t,e,i,n){this.windowIdentity=t,this.connectConfig=e,this.provider=i,this.fallbackContainer=n}async createLayout(t,e){if(!("container"in t)&&!this.fallbackContainer)throw new Error("Container property is not optional in web");const{layoutName:i}=t,n=t,o=this.provider.initLayoutViews(n),s=n.container??this.fallbackContainer,r={...this.windowIdentity,layoutName:i},a=new Me(r,s,o,this.connectConfig,e,this.provider);m.registerLayout(e,i,a),this.fallbackContainer=null}async getLayoutSnapshot(t){return t.getLayoutSnapshot()}async handleLastViewRemoved(t){}}class Te{static async init(e){const i=e.getFin().InterApplicationBus.Channel,n=await i.create(`custom-frame-${e.me.uuid}`);return n.setDefaultAction((async(t,{target:e,opts:i},o)=>{const s=n.connections.find((t=>t.name===e.name));if(s)return n.dispatch(s,t,{...i,target:e});throw new Error(`Client with name ${e.name} not found`)})),await t.relayChannelClientApi_1(n,"layout-relay"),new Te(e)}constructor(t){this.wire=t,this.viewNames=new Set}normalizeOptions(t,i="default"){const n=this.wire.me.uuid;let{name:o=`internal-generated-view-${e.v4()}`}=t;return o.match(/^internal-generated-view-/)&&this.viewNames.has(o)&&"duplicate"===i&&(o=`internal-generated-view-${e.v4()}`),this.viewNames.add(o),{...t,name:o,uuid:n}}closeView(t){this.viewNames.delete(t)}initLayoutViews({layout:t,multiInstanceViewBehavior:e}){return H((t=>{if("component"===t.type&&t.componentState){const i=this.normalizeOptions(t.componentState,e);return{...t,componentState:i}}return t}),t)}}var Ae;const ke=t=>t;Ae=new WeakMap,exports.WebLayoutEntryPoint=class{constructor(e){Ae.set(this,void 0),this.initLayoutManager=async(e,i,{container:n,layoutManagerOverride:o})=>{const s=await Te.init(i),r=o??ke,a=new Pe(i.me,t.__classPrivateFieldGet(this,Ae,"f"),s,n),l=new(r(m.createClosedConstructor(a)));return await M(i,l),l},this.applyLayoutSnapshot=async(e,i,n)=>{await i.applyLayoutSnapshot(t.__classPrivateFieldGet(this,Ae,"f").platform.layoutSnapshot)},this.createLayout=async(t,e)=>m.createLayout(t,e),this.destroyLayout=async(t,e)=>m.destroyLayout(t,e),t.__classPrivateFieldSet(this,Ae,e,"f")}}; @@ -8325,7 +8325,7 @@ function version(uuid) { /******/ /************************************************************************/ var __webpack_exports__ = {}; -// This entry need to be wrapped in an IIFE because it need to be in strict mode. +// This entry needs to be wrapped in an IIFE because it needs to be in strict mode. (() => { "use strict"; var exports = __webpack_exports__; @@ -8334,7 +8334,7 @@ var exports = __webpack_exports__; \********************************/ Object.defineProperty(exports, "__esModule", ({ value: true })); -const core_web_1 = __webpack_require__(/*! @openfin/core-web */ "./node_modules/@openfin/core-web/out/api-client.js"); +const core_web_1 = __webpack_require__(/*! @openfin/core-web */ "../../node_modules/@openfin/core-web/out/api-client.js"); const settings_1 = __webpack_require__(/*! ./platform/settings */ "./client/src/platform/settings.ts"); /** * Sets up panels if supported. diff --git a/web/v19.2.0/web-interop/js/provider.bundle.js.map b/web/v19.2.0/web-interop/js/provider.bundle.js.map index 8033361..da84cf2 100644 --- a/web/v19.2.0/web-interop/js/provider.bundle.js.map +++ b/web/v19.2.0/web-interop/js/provider.bundle.js.map @@ -1 +1 @@ -{"version":3,"file":"provider.bundle.js","mappings":";;;;;;;;;;AAAa,MAAM,mBAAO,CAAC,iFAAoB,EAAE,mBAAO,CAAC,mDAAS,EAAE,mBAAO,CAAC,+DAAM,EAAE,mBAAO,CAAC,mDAAQ,EAAE,mBAAO,CAAC,gEAAkB,EAAE,mBAAO,CAAC,4DAAgB,EAAE,eAAe;;;;;;;;;;;;ACA9J,MAAM,mBAAO,CAAC,mDAAS,IAAI,mBAAO,CAAC,mDAAQ,IAAI,mBAAO,CAAC,gEAAkB,IAAI,mBAAO,CAAC,4DAAgB,IAAI,mBAAO,CAAC,+DAAM,EAAE,kBAAkB,EAAE,GAAG,wBAAwB,GAAG,sGAAsG,qBAAM,CAAC,qBAAM,iCAAiC,KAAK,KAAK,KAAK,MAAM,oBAAoB,WAAW,kBAAkB,kBAAkB,UAAU,SAAS,sCAAsC,SAAS,sFAAsF,mCAAmC,6BAA6B,GAAG,kCAAkC,6BAA6B,mDAAmD,0CAA0C,yDAAyD,iEAAiE,oFAAoF,2IAA2I,mDAAmD,kDAAkD,oFAAoF,4IAA4I,sDAAsD,sCAAsC,SAAS,sCAAsC,UAAU,QAAQ,eAAe,mNAAmN,UAAU,0BAA0B,SAAS,qBAAqB,SAAS,8BA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ACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,cAAc,SAAS;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,2CAA2C,UAAU;AACrD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;ACrJA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEY;;AAEZ,eAAe,mBAAO,CAAC,wDAAW;AAClC,gBAAgB,mBAAO,CAAC,oDAAS;AACjC;AACA;AACA;AACA;;AAEA,cAAc;AACd,kBAAkB;AAClB,yBAAyB;;AAEzB;AACA,kBAAkB;;AAElB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,kBAAkB,YAAY;AAC9B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA,wCAAwC,SAAS;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;;AAEA;AACA;AACA,cAAc,iBAAiB;AAC/B;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,iDAAiD,EAAE;AACnD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C;AAC1C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA,yBAAyB,eAAe;AACxC;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,yBAAyB,QAAQ;AACjC;AACA,sBAAsB,eAAe;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc,YAAY;AAC1B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB,sBAAsB;AACxC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,mBAAmB;AACnB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA,oBAAoB,SAAS;AAC7B;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA,qBAAqB,WAAW,GAAG,IAAI;AACvC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA,gBAAgB,WAAW,GAAG,IAAI,KAAK,aAAa;AACpD;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;;AAEA;AACA,GAAG;AACH;AACA;AACA,mBAAmB,KAAK,mDAAmD,cAAc;AACzF,GAAG;AACH;AACA;AACA,+BAA+B,IAAI;AACnC;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,MAAM,aAAa,SAAS;AACtD;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,SAAS,gBAAgB;AACzB,cAAc,oBAAoB,EAAE,IAAI;AACxC;AACA,YAAY,gBAAgB,EAAE,IAAI;AAClC;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,GAAG,SAAS,GAAG,KAAK,qBAAqB,EAAE,EAAE;AACpE,QAAQ;AACR,yBAAyB,GAAG,KAAK,yBAAyB,EAAE,EAAE;AAC9D,mBAAmB,yBAAyB,EAAE,EAAE;AAChD;AACA,MAAM;AACN,oBAAoB,IAAI,EAAE,GAAG,SAAS,IAAI,EAAE,EAAE;AAC9C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,0CAA0C,cAAc,SAAS,OAAO;AACxE;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,kBAAkB,YAAY;AAC9B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,kBAAkB,gBAAgB;AAClC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,kBAAkB,gBAAgB;AAClC;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,cAAc,YAAY;AAC1B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,QAAQ;AAC1B;AACA,oBAAoB,QAAQ;AAC5B;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;;;;;ACzjEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEa;;AAEb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB;;AAEnB;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,sBAAsB;AACxC;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA,eAAe;AACf;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA,oBAAoB,SAAS;AAC7B;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;;AAEA,kCAAkC,QAAQ;AAC1C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oBAAoB,iBAAiB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,QAAQ;AACR;AACA,uCAAuC,QAAQ;AAC/C;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,OAAO;AACzB;AACA;AACA;;AAEA;AACA,SAAS,yBAAyB;AAClC;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,gBAAgB;AAClC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,8DAA8D,YAAY;AAC1E;AACA,8DAA8D,YAAY;AAC1E;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,qCAAqC,YAAY;AACjD;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;AACA;;;;;;;;;;;AChfA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,SAAS,WAAW;;AAEpB;AACA;AACA;AACA,SAAS,WAAW;;AAEpB;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA,SAAS,WAAW;;AAEpB;AACA;AACA,SAAS,UAAU;;AAEnB;AACA;;;;;;;;;;;ACpFA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,WAAW,mBAAO,CAAC,mDAAS;;AAE5B;AACA;;AAEA;;;;;;;;;;;ACNA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,cAAc,mBAAO,CAAC,yDAAY;AAClC,cAAc,mBAAO,CAAC,yDAAY;AAClC,cAAc,mBAAO,CAAC,yDAAY;;AAElC;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;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A;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AChDA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACnBA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,UAAU;AACrB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACtBA,sBAAsB,mBAAO,CAAC,yEAAoB;AAClD,SAAS,mBAAO,CAAC,6CAAM;;AAEvB;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC3BA,SAAS,mBAAO,CAAC,6CAAM;;AAEvB;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpBA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,WAAW,mBAAO,CAAC,iDAAQ;;AAE3B;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AChBA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,aAAa,mBAAO,CAAC,qDAAU;;AAE/B;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AChBA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A;AACA;AACA,WAAW,GAAG;AACd,WAAW,SAAS;AACpB;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa,GAAG;AAChB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;AACA,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;;;;;;;;;;ACrKA,eAAe,mBAAO,CAAC,yDAAY;;AAEnC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;;;;;;;;;;AC7BA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,cAAc,mBAAO,CAAC,uDAAW;;AAEjC;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACnBA,aAAa,mBAAO,CAAC,uDAAW;AAChC,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,qBAAqB,mBAAO,CAAC,uEAAmB;;AAEhD;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA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,CAAC,uDAAW;AAChC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA,iBAAiB,mBAAO,CAAC,6DAAc;AACvC,eAAe,mBAAO,CAAC,2DAAa;AACpC,eAAe,mBAAO,CAAC,yDAAY;AACnC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;AACA;AACA;AACA,oCAAoC;;AAEpC;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC9CA,aAAa,mBAAO,CAAC,uDAAW;AAChC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,eAAe,mBAAO,CAAC,yDAAY;AACnC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC3DA,kBAAkB,mBAAO,CAAC,iEAAgB;AAC1C,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;A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A;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC/GA,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACzFA;AACA,wBAAwB,qBAAM,gBAAgB,qBAAM,IAAI,qBAAM,sBAAsB,qBAAM;;AAE1F;;;;;;;;;;;ACHA,qBAAqB,mBAAO,CAAC,uEAAmB;AAChD,iBAAiB,mBA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B,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,GAAG;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC7BA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACtBA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACtBA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACzBA,uBAAuB,mBAAO,CAAC,2EAAqB;AACpD,oBAAoB,mBAAO,CAAC,qEAAkB;AAC9C,kBAAkB,mBAAO,CAAC,iEAAgB;AAC1C,kBAAkB,mBAAO,CAAC,iEAAgB;AAC1C,sBAAsB,mBAAO,CAAC,yEAAoB;;AAElD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC5EA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,mBAAmB,mBAAO,CAAC,mEAAiB;AAC5C,kBAAkB,mBAAO,CAAC,iEAAgB;;AAE1C;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACxBA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACdA,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACnBA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACZA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClCA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,a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aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;;;;;;;;;;ACjBA,gBAAgB,mBAAO,CAAC,6DAAc;;AAEtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACdA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,GAAG;AAChB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACbA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACbA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,UAAU,mBAAO,CAAC,iDAAQ;AAC1B,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjCA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;;;;;;;;;;;ACzBA,gBAAgB,mBAAO,CAAC,6DAAc;;AAEtC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,GAAG;AAChB;AACA;AACA;AACA,oBAAoB,QAAQ,IAAI,QAAQ;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,kBAAkB;AAClB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpCA,sBAAsB,mBAAO,CAAC,yEAAoB;AAClD,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA,8BAA8B,mBAAmB;AACjD;AACA;AACA;AACA;AACA;AACA,+CAA+C,mBAAmB;AAClE;AACA;AACA;;AAEA;;;;;;;;;;;ACnCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACzBA,iBAAiB,mBAAO,CAAC,6DAAc;AACvC,eAAe,mBAAO,CAAC,yDAAY;;AAEnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AChCA,WAAW,mBAAO,CAAC,mDAAS;AAC5B,gBAAgB,mBAAO,CAAC,2DAAa;;AAErC;AACA,kBAAkB,KAA0B;;AAE5C;AACA,gCAAgC,QAAa;;AAE7C;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACrCA,kBAAkB,mBAAO,CAAC,iEAAgB;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,kBAAkB;AAClB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClCA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,eAAe,mBAAO,CAAC,yDAAY;;AAEnC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpCA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClCA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC1BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC9BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC5BA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC1BA,uBAAuB,mBAAO,CAAC,2EAAqB;AACpD,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC1BA,oBAAoB,mBAAO,CAAC,qEAAkB;AAC9C,eAAe,mBAAO,CAAC,2DAAa;AACpC,kBAAkB,mBAAO,CAAC,+DAAe;;AAEzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpCA,oBAAoB,mBAAO,CAAC,qEAAkB;AAC9C,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,kBAAkB,mBAAO,CAAC,+DAAe;;AAEzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC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AAC,aAAa,CAAkB,sBAAsB,CAAC,CAAC;IAC7E,IAAI,IAAI,KAAK,IAAI,EAAE,CAAC;QACnB,MAAM,gBAAgB,GAAG,MAAM,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAChD,MAAM,YAAY,GAAG,CAAC,MAAM,gBAAgB,CAAC,IAAI,EAAE,CAAkC,CAAC;QACtF,OAAO,YAAY,CAAC,eAAe,CAAC;IACrC,CAAC;AACF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACjDuC;AACA;AACA;AACA;AACE;AACQ;AACE;AACE;;;;;;;;;;;;;;;;ACPtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD;;AAEnD;;AAEA,oBAAoB,gBAAgB;AACpC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA,kBAAkB,cAAc;AAChC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,kBAAkB,cAAc;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,kBAAkB,aAAa;AAC/B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,iEAAe,GAAG;;;;;;;;;;;;;;;ACtNlB,iEAAe,sCAAsC;;;;;;;;;;;;;;;;ACAhB;;AAErC;AACA,OAAO,wDAAQ;AACf;AACA;;AAEA;AACA,gCAAgC;;AAEhC;AACA;AACA;AACA,qBAAqB;;AAErB;AACA,qBAAqB;;AAErB;AACA,qBAAqB;;AAErB;AACA,qBAAqB;AACrB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,iEAAe,KAAK;;;;;;;;;;;;;;;AClCpB,iEAAe,cAAc,EAAE,UAAU,EAAE,eAAe,EAAE,gBAAgB,EAAE,UAAU,GAAG,yCAAyC;;;;;;;;;;;;;;;ACApI;AACA;AACA;AACA;AACA;AACe;AACf;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;AClBA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,mDAAmD;;AAEnD;;AAEA,oBAAoB,gBAAgB;AACpC;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,mBAAmB,QAAQ;AAC3B;;AAEA,oBAAoB,QAAQ;AAC5B;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,oBAAoB,SAAS;AAC7B;;AAEA,oBAAoB,QAAQ;AAC5B;AACA;;AAEA,sBAAsB,SAAS;AAC/B;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,sBAAsB,UAAU;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;A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EAAE,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,SAAS;YAC9C,aAAa,EAAE;gBACd,UAAU,EAAE,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,UAAU;gBAChD,mBAAmB,EAAE,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,mBAAmB;aAClE;SACD;QACD,qBAAqB,EAAE,SAAS;QAChC,QAAQ,EAAE,EAAE,cAAc,EAAE;KAC5B,CAAC,CAAC;IAEH,4EAA4E;IAC5E,MAAM,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;IAE7D,+DAA+D;IAC/D,MAAM,GAAG,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC;QAC9B,SAAS,EAAE,eAAe;KAC1B,CAAC,CAAC;IACH,wDAAwD;IACxD,WAAW,CAAC,QAAQ,CAAC,CAAC;AACvB,CAAC;AAED,IAAI,EAAE;KACJ,IAAI,CAAC,GAAG,EAAE;IACV,OAAO,CAAC,GAAG,CAAC,sCAAsC,CAAC,CAAC;IACpD,OAAO,IAAI,CAAC;AACb,CAAC,CAAC;KACD,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC","sources":["webpack://openfin-web--web-interop/./node_modules/@openfin/core-web/out/api-client.js","webpack://openfin-web--web-interop/./node_modules/@openfin/core-web/out/main-8cad4070.js","webpack://openfin-web--web-interop/./node_modules/@openfin/core-web/out/main-b14f67c9.js","webpack://openfin-web--web-interop/../../node_modules/base64-js/index.js","webpack://openfin-web--web-interop/../../node_modules/buffer/index.js","webpack://openfin-web--web-interop/../../node_modules/events/events.js","webpack://openfin-web--web-interop/../../node_modules/ieee754/index.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_DataView.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_Hash.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_ListCache.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_Map.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_MapCache.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_Promise.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_Set.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_SetCache.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_Stack.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_Symbol.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_Uint8Array.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_WeakMap.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_arrayEach.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_arrayFilter.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_arrayLikeKeys.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_arrayPush.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_arraySome.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_assignValue.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_assocIndexOf.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseAssign.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseAssignIn.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseAssignValue.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseClone.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseCreate.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseGetAllKeys.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseGetTag.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseIsArguments.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseIsEqual.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseIsEqualDeep.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseIsMap.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseIsNative.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseIsSet.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseIsTypedArray.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseKeys.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseKeysIn.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseTimes.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseUnary.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_cacheHas.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_cloneArrayBuffer.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_cloneBuffer.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_cloneDataView.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_cloneRegExp.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_cloneSymbol.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_cloneTypedArray.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_copyArray.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_copyObject.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_copySymbols.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_copySymbolsIn.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_coreJsData.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_defineProperty.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_equalArrays.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_equalByTag.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_equalObjects.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_freeGlobal.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_getAllKeys.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_getAllKeysIn.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_getMapData.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_getNative.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_getPrototype.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_getRawTag.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_getSymbols.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_getSymbolsIn.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_getTag.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_getValue.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_hashClear.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_hashDelete.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_hashGet.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_hashHas.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_hashSet.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_initCloneArray.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_initCloneByTag.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_initCloneObject.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_isIndex.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_isKeyable.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_isMasked.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_isPrototype.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_listCacheClear.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_listCacheDelete.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_listCacheGet.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_listCacheHas.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_listCacheSet.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_mapCacheClear.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_mapCacheDelete.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_mapCacheGet.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_mapCacheHas.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_mapCacheSet.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_mapToArray.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_nativeCreate.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_nativeKeys.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_nativeKeysIn.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_nodeUtil.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_objectToString.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_overArg.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_root.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_setCacheAdd.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_setCacheHas.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_setToArray.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_stackClear.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_stackDelete.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_stackGet.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_stackHas.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_stackSet.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_toSource.js","webpack://openfin-web--web-interop/../../node_modules/lodash/cloneDeep.js","webpack://openfin-web--web-interop/../../node_modules/lodash/eq.js","webpack://openfin-web--web-interop/../../node_modules/lodash/isArguments.js","webpack://openfin-web--web-interop/../../node_modules/lodash/isArray.js","webpack://openfin-web--web-interop/../../node_modules/lodash/isArrayLike.js","webpack://openfin-web--web-interop/../../node_modules/lodash/isBuffer.js","webpack://openfin-web--web-interop/../../node_modules/lodash/isEqual.js","webpack://openfin-web--web-interop/../../node_modules/lodash/isFunction.js","webpack://openfin-web--web-interop/../../node_modules/lodash/isLength.js","webpack://openfin-web--web-interop/../../node_modules/lodash/isMap.js","webpack://openfin-web--web-interop/../../node_modules/lodash/isObject.js","webpack://openfin-web--web-interop/../../node_modules/lodash/isObjectLike.js","webpack://openfin-web--web-interop/../../node_modules/lodash/isSet.js","webpack://openfin-web--web-interop/../../node_modules/lodash/isTypedArray.js","webpack://openfin-web--web-interop/../../node_modules/lodash/keys.js","webpack://openfin-web--web-interop/../../node_modules/lodash/keysIn.js","webpack://openfin-web--web-interop/../../node_modules/lodash/stubArray.js","webpack://openfin-web--web-interop/../../node_modules/lodash/stubFalse.js","webpack://openfin-web--web-interop/./client/src/platform/settings.ts","webpack://openfin-web--web-interop/../../node_modules/uuid/dist/esm-browser/index.js","webpack://openfin-web--web-interop/../../node_modules/uuid/dist/esm-browser/md5.js","webpack://openfin-web--web-interop/../../node_modules/uuid/dist/esm-browser/nil.js","webpack://openfin-web--web-interop/../../node_modules/uuid/dist/esm-browser/parse.js","webpack://openfin-web--web-interop/../../node_modules/uuid/dist/esm-browser/regex.js","webpack://openfin-web--web-interop/../../node_modules/uuid/dist/esm-browser/rng.js","webpack://openfin-web--web-interop/../../node_modules/uuid/dist/esm-browser/sha1.js","webpack://openfin-web--web-interop/../../node_modules/uuid/dist/esm-browser/stringify.js","webpack://openfin-web--web-interop/../../node_modules/uuid/dist/esm-browser/v1.js","webpack://openfin-web--web-interop/../../node_modules/uuid/dist/esm-browser/v3.js","webpack://openfin-web--web-interop/../../node_modules/uuid/dist/esm-browser/v35.js","webpack://openfin-web--web-interop/../../node_modules/uuid/dist/esm-browser/v4.js","webpack://openfin-web--web-interop/../../node_modules/uuid/dist/esm-browser/v5.js","webpack://openfin-web--web-interop/../../node_modules/uuid/dist/esm-browser/validate.js","webpack://openfin-web--web-interop/../../node_modules/uuid/dist/esm-browser/version.js","webpack://openfin-web--web-interop/webpack/bootstrap","webpack://openfin-web--web-interop/webpack/runtime/define property getters","webpack://openfin-web--web-interop/webpack/runtime/global","webpack://openfin-web--web-interop/webpack/runtime/hasOwnProperty shorthand","webpack://openfin-web--web-interop/webpack/runtime/make namespace object","webpack://openfin-web--web-interop/webpack/runtime/node module decorator","webpack://openfin-web--web-interop/./client/src/provider.ts"],"sourcesContent":["\"use strict\";var e=require(\"./main-8cad4070.js\");require(\"buffer/\"),require(\"uuid\"),require(\"events\"),require(\"lodash/cloneDeep\"),require(\"lodash/isEqual\"),exports.connect=e.connect;\n","\"use strict\";var e=require(\"buffer/\"),t=require(\"events\"),n=require(\"lodash/cloneDeep\"),i=require(\"lodash/isEqual\"),r=require(\"uuid\");const o=(e,t)=>`${t}<${btoa(JSON.stringify(e))}>`;var s=\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof window?window:\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:{},a={},c={},d={},h={};async function l(e){const t=[];for(const n of e){const e=await n();t.push(e)}return t}Object.defineProperty(h,\"__esModule\",{value:!0}),h.promiseMapSerial=h.serial=h.promiseMap=h.promisify=void 0,h.promisify=function(e){return(...t)=>new Promise(((n,i)=>{e(...t,((e,t)=>e?i(e):n(t)))}))},h.promiseMap=async function(e,t){return Promise.all(e.map(t))},h.serial=l,h.promiseMapSerial=async function(e,t){return l(e.map(((e,n,i)=>()=>t(e,n,i))))};var u,p=s&&s.__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},w=s&&s.__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)};Object.defineProperty(d,\"__esModule\",{value:!0}),d.Reply=d.EmitterBase=d.Base=void 0;const y=h;class f{constructor(e){this.isNodeEnvironment=()=>\"node\"===this.wire.environment.type,this.isOpenFinEnvironment=()=>\"openfin\"===this.wire.environment.type,this.isBrowserEnvironment=()=>\"other\"===this.wire.environment.type,this.wire=e}get fin(){return this.wire.getFin()}get me(){return this.wire.me}}d.Base=f;d.EmitterBase=class extends f{constructor(e,t,...n){super(e),this.topic=t,u.set(this,void 0),this.eventNames=()=>this.hasEmitter()?this.getOrCreateEmitter().eventNames():[],this.emit=(e,t,...n)=>!!this.hasEmitter()&&this.getOrCreateEmitter().emit(e,t,...n),this.hasEmitter=()=>this.wire.eventAggregator.has(w(this,u,\"f\")),this.getOrCreateEmitter=()=>this.wire.eventAggregator.getOrCreate(w(this,u,\"f\")),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[],this.listenerCount=e=>this.hasEmitter()?this.getOrCreateEmitter().listenerCount(e):0,this.registerEventListener=async(e,t={},n,i)=>{const r={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e},o=this.getOrCreateEmitter();n(o);try{await this.wire.sendAction(\"subscribe-to-desktop-event\",r)}catch(e){throw i(o),this.deleteEmitterIfNothingRegistered(o),e}},this.deregisterEventListener=async(e,t={})=>{if(this.hasEmitter()){const n={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e};await this.wire.sendAction(\"unsubscribe-to-desktop-event\",n).catch((()=>null));return this.getOrCreateEmitter()}return Promise.resolve()},p(this,u,[t,...n],\"f\"),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[]}async on(e,t,n){return await this.registerEventListener(e,n,(n=>{n.on(e,t)}),(n=>{n.removeListener(e,t)})),this}async addListener(e,t,n){return this.on(e,t,n)}async once(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.once(e,i),n.once(e,t)}),(n=>{n.removeListener(e,i),n.removeListener(e,t)})),this}async prependListener(e,t,n){return await this.registerEventListener(e,n,(n=>{n.prependListener(e,t)}),(n=>{n.removeListener(e,t)})),this}async prependOnceListener(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.prependOnceListener(e,t),n.once(e,i)}),(n=>{n.removeListener(e,t),n.removeListener(e,i)})),this}async removeListener(e,t,n){const i=await this.deregisterEventListener(e,n);return i&&(i.removeListener(e,t),this.deleteEmitterIfNothingRegistered(i)),this}async deregisterAllListeners(e){const t={...this.identity,type:e,topic:this.topic};if(this.hasEmitter()){const e=this.getOrCreateEmitter(),n=e.listenerCount(t.type),i=[];for(let e=0;enull)));return await Promise.all(i),e}}async removeAllListeners(e){const t=async e=>{const t=await this.deregisterAllListeners(e);t&&(t.removeAllListeners(e),this.deleteEmitterIfNothingRegistered(t))};if(e)await t(e);else if(this.hasEmitter()){const e=this.getOrCreateEmitter().eventNames();await(0,y.promiseMap)(e,t)}return this}deleteEmitterIfNothingRegistered(e){0===e.eventNames().length&&this.wire.eventAggregator.delete(w(this,u,\"f\"))}},u=new WeakMap;d.Reply=class{};var g={};Object.defineProperty(g,\"__esModule\",{value:!0});var m=g.RuntimeError=g.NotSupportedError=g.NotImplementedError=g.NoAckError=g.DuplicateCorrelationError=g.UnexpectedActionError=g.DisconnectedError=void 0;class v extends Error{constructor(e){super(`Expected websocket state OPEN but found ${e}`),this.readyState=e}}g.DisconnectedError=v;class C extends Error{}g.UnexpectedActionError=C;class b extends Error{}g.DuplicateCorrelationError=b;class I extends Error{}g.NoAckError=I;class E extends Error{}g.NotImplementedError=E;class x extends Error{}g.NotSupportedError=x;class A extends Error{constructor(e){const{message:t,name:n,stack:i,...r}=e;super(t),this.name=n||\"Error\",this.stack=i??this.toString(),Object.keys(r).forEach((e=>{this[e]=r[e]}))}}class P extends Error{static getCallSite(e=0){const t=Error.stackTraceLimit,n=e+1;Error.stackTraceLimit=t+n;const i=Error.prepareStackTrace;Error.prepareStackTrace=(e,t)=>t;const r=(new Error).stack?.slice(n)??[];return Error.prepareStackTrace=i,Error.stackTraceLimit=t,r}static prepareStackTrace(e,t){if(\"function\"==typeof Error.prepareStackTrace)return Error.prepareStackTrace(e,t);let n=\"\";n+=e.name||\"Error\",n+=`: ${e.message||\"\"}`;for(const e of t)n+=`\\n at ${e.toString()}`;return n}constructor(e,t){const{reason:n,error:i}=e;super(n),this.name=\"RuntimeError\",i?.stack&&(this.cause=new A(i)),t&&(this.stack=P.prepareStackTrace(this,t))}}m=g.RuntimeError=P;var M={},_={},O={};Object.defineProperty(O,\"__esModule\",{value:!0}),O.validateIdentity=void 0,O.validateIdentity=function(e){let t;return\"object\"==typeof e&&\"string\"==typeof e.uuid||(t=\"Not a valid identity object\"),t};var S={},R={},F={},j={},k={},L={},T={};Object.defineProperty(T,\"__esModule\",{value:!0}),T.handleDeprecatedWarnings=void 0;var $;T.handleDeprecatedWarnings=e=>{(e.contentNavigation?.whitelist||e.contentNavigation?.blacklist||e.contentRedirect?.whitelist||e.contentRedirect?.blacklist)&&console.warn(\"The properties 'whitelist' and 'blacklist' have been marked as deprecated and will be removed in a future version. Please use 'allowlist' and 'denylist'.\")};var B={},G={};Object.defineProperty(G,\"__esModule\",{value:!0}),G.AsyncRetryableLazy=W=G.Lazy=void 0;var W=G.Lazy=class{constructor(e){this.producerFn=e}getValue(){return this.value||(this.value=this.producerFn()),this.value}};G.AsyncRetryableLazy=class{constructor(e){this.producerFn=e}async getValue(){return this.promise||(this.promise=this.producerFn().catch((e=>{throw delete this.promise,e}))),this.promise}};var H={};Object.defineProperty(H,\"__esModule\",{value:!0}),H.WebContents=void 0;const N=d;class D extends N.EmitterBase{constructor(e,t,n){super(e,n,t.uuid,t.name),this.identity=t,this.entityType=n}capturePage(e){return this.wire.sendAction(\"capture-page\",{options:e,...this.identity}).then((({payload:e})=>e.data))}executeJavaScript(e){return this.wire.sendAction(\"execute-javascript-in-window\",{...this.identity,code:e}).then((({payload:e})=>e.data))}getZoomLevel(){return this.wire.sendAction(\"get-zoom-level\",this.identity).then((({payload:e})=>e.data))}setZoomLevel(e){return this.wire.sendAction(\"set-zoom-level\",{...this.identity,level:e}).then((()=>{}))}navigate(e){return this.wire.sendAction(\"navigate-window\",{...this.identity,url:e}).then((()=>{}))}navigateBack(){return this.wire.sendAction(\"navigate-window-back\",{...this.identity}).then((()=>{}))}async navigateForward(){await this.wire.sendAction(\"navigate-window-forward\",{...this.identity})}stopNavigation(){return this.wire.sendAction(\"stop-window-navigation\",{...this.identity}).then((()=>{}))}reload(e=!1){return this.wire.sendAction(\"reload-window\",{ignoreCache:e,...this.identity}).then((()=>{}))}print(e={}){return this.wire.sendAction(\"print\",{...this.identity,options:e}).then((()=>{}))}findInPage(e,t){return this.wire.sendAction(\"find-in-page\",{...this.identity,searchTerm:e,options:t}).then((({payload:e})=>e.data))}stopFindInPage(e){return this.wire.sendAction(\"stop-find-in-page\",{...this.identity,action:e}).then((()=>{}))}getPrinters(){return this.wire.sendAction(\"get-printers\",{...this.identity}).then((({payload:e})=>e.data))}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){await this.wire.sendAction(\"focus-window\",{emitSynthFocused:e,...this.identity})}async showDeveloperTools(){await this.wire.sendAction(\"show-developer-tools\",this.identity)}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction(\"get-process-info\",this.identity);return e}async getSharedWorkers(){return this.wire.sendAction(\"get-shared-workers\",this.identity).then((({payload:e})=>e.data))}async inspectSharedWorker(){await this.wire.sendAction(\"inspect-shared-worker\",{...this.identity})}async inspectSharedWorkerById(e){await this.wire.sendAction(\"inspect-shared-worker-by-id\",{...this.identity,workerId:e})}async inspectServiceWorker(){await this.wire.sendAction(\"inspect-service-worker\",{...this.identity})}async showPopupWindow(e){if(this.wire.sendAction(`${this.entityType}-show-popup-window`,this.identity).catch((()=>{})),e?.onPopupReady){const t=async({popupName:t})=>{try{const n=this.fin.Window.wrapSync({uuid:this.fin.me.uuid,name:t});await e.onPopupReady(n)}catch(e){throw new Error(`Something went wrong during onPopupReady execution: ${e}`)}};await this.once(\"popup-ready\",t)}const{payload:t}=await this.wire.sendAction(\"try-create-popup-window\",{options:{...e,hasResultCallback:!!e?.onPopupResult,hasReadyCallback:!!e?.onPopupReady},...this.identity}),{data:{willOpen:n,options:i}}=t;n&&await this.fin.Window.create(i.initialOptions);if(e?.onPopupResult){const t=async t=>{await e.onPopupResult((e=>{const{name:t,uuid:n,result:i,data:r}=e,o={identity:{name:t,uuid:n},result:i};return r&&(o.data=r),o})(t))},n=async()=>{await this.removeListener(\"popup-result\",t)};await this.on(\"popup-result\",t),await this.once(\"popup-teardown\",n)}const{payload:r}=await this.wire.sendAction(\"show-popup-window\",{options:i,...this.identity});return r.data}}var U,V,z,K,q;function J(){return V||(V=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(function(){if($)return L;$=1,Object.defineProperty(L,\"__esModule\",{value:!0}),L.ViewModule=void 0;const e=d,t=O,n=J(),i=T;class r extends e.Base{async create(e){const{uuid:t}=this.wire.me;if(!e.name||\"string\"!=typeof e.name)throw new Error(\"Please provide a name property as a string in order to create a View.\");return(0,i.handleDeprecatedWarnings)(e),this.wire.environment.childViews?await this.wire.environment.createChildContent({entityType:\"view\",options:{...e,uuid:t}}):await this.wire.sendAction(\"create-view\",{...e,uuid:t}),this.wrapSync({uuid:t,name:e.name})}async wrap(e){this.wire.sendAction(\"view-wrap\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}wrapSync(e){this.wire.sendAction(\"view-wrap-sync\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}getCurrent(){if(this.wire.sendAction(\"view-get-current\").catch((e=>{})),!this.wire.me.isView)throw new Error(\"You are not in a View context\");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction(\"view-get-current-sync\").catch((e=>{})),!this.wire.me.isView)throw new Error(\"You are not in a View context\");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return L.ViewModule=r,L}(),e),n(function(){if(U)return B;var e;U=1,Object.defineProperty(B,\"__esModule\",{value:!0}),B.View=void 0;const t=g,n=G,i=H,r=ie();class o extends i.WebContents{constructor(i,o){super(i,o,\"view\"),this.identity=o,e.set(this,new n.Lazy((()=>this.fin.Platform.wrapSync(this.identity).getClient()))),this.attach=async e=>{await this.wire.sendAction(\"attach-view\",{target:e,...this.identity})},this.destroy=async()=>{await this.wire.sendAction(\"destroy-view\",{...this.identity})},this.show=async()=>{await this.wire.sendAction(\"show-view\",{...this.identity})},this.showAt=async(e,t={})=>{await this.wire.sendAction(\"show-view-at\",{bounds:e,...this.identity,options:t})},this.bringToFront=async()=>{await this.wire.sendAction(\"bring-view-to-front\",{...this.identity})},this.hide=async()=>{await this.wire.sendAction(\"hide-view\",{...this.identity})},this.setBounds=async e=>{await this.wire.sendAction(\"set-view-bounds\",{bounds:e,...this.identity})},this.getBounds=async()=>(await this.wire.sendAction(\"get-view-bounds\",{...this.identity})).payload.data,this.getInfo=async()=>(await this.wire.sendAction(\"get-view-info\",{...this.identity})).payload.data,this.getParentLayout=async()=>(this.wire.sendAction(\"view-get-parent-layout\",{...this.identity}).catch((()=>{})),this.fin.Platform.Layout.getLayoutByViewIdentity(this.identity)),this.getOptions=async()=>this.wire.sendAction(\"get-view-options\",{...this.identity}).then((({payload:e})=>e.data)),this.updateOptions=async e=>this.wire.sendAction(\"update-view-options\",{options:e,...this.identity}).then((()=>{})),this.getCurrentWindow=async()=>{const{payload:{data:e}}=await this.wire.sendAction(\"get-view-window\",{...this.identity});return new r._Window(this.wire,e)},this.getCurrentStack=async()=>{this.wire.sendAction(\"view-get-current-stack\").catch((()=>{}));try{return(await this.getParentLayout()).getStackByViewIdentity(this.identity)}catch(e){throw new t.RuntimeError({reason:\"This view does not belong to a stack.\",error:e})}},this.triggerBeforeUnload=async()=>(await this.wire.sendAction(\"trigger-before-unload\",{...this.identity})).payload.data,this.bindToElement=async e=>{if(!e)throw new Error(\"Element not found.\");return this.wire.environment.observeBounds(e,(async e=>this.setBounds(e)))}}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){const t=await this.getCurrentWindow();await t.focusedWebViewWasChanged(),await super.focus({emitSynthFocused:e})}}return B.View=o,e=new WeakMap,B}(),e)}(k)),k}function Y(){if(z)return j;z=1,Object.defineProperty(j,\"__esModule\",{value:!0}),j.Application=void 0;const e=d,t=ie(),n=J();class i extends e.EmitterBase{constructor(e,n){super(e,\"application\",n.uuid),this.identity=n,this.window=new t._Window(this.wire,{uuid:this.identity.uuid,name:this.identity.uuid})}windowListFromIdentityList(e){const n=[];return e.forEach((e=>{n.push(new t._Window(this.wire,{uuid:e.uuid,name:e.name}))})),n}isRunning(){return this.wire.sendAction(\"is-application-running\",this.identity).then((({payload:e})=>e.data))}async quit(e=!1){try{await this._close(e),await this.wire.sendAction(\"destroy-application\",{force:e,...this.identity})}catch(e){if(![\"Remote connection has closed\",\"Could not locate the requested application\"].some((t=>e.message.includes(t))))throw e}}async _close(e=!1){try{await this.wire.sendAction(\"close-application\",{force:e,...this.identity})}catch(e){if(!e.message.includes(\"Remote connection has closed\"))throw e}}close(e=!1){return console.warn(\"Deprecation Warning: Application.close is deprecated Please use Application.quit\"),this.wire.sendAction(\"application-close\",this.identity).catch((e=>{})),this._close(e)}getChildWindows(){return this.wire.sendAction(\"get-child-windows\",this.identity).then((({payload:e})=>{const t=[];return e.data.forEach((e=>{t.push({uuid:this.identity.uuid,name:e})})),this.windowListFromIdentityList(t)}))}getManifest(){return this.wire.sendAction(\"get-application-manifest\",this.identity).then((({payload:e})=>e.data))}getParentUuid(){return this.wire.sendAction(\"get-parent-application\",this.identity).then((({payload:e})=>e.data))}getShortcuts(){return this.wire.sendAction(\"get-shortcuts\",this.identity).then((({payload:e})=>e.data))}async getViews(){const{payload:e}=await this.wire.sendAction(\"application-get-views\",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}getZoomLevel(){return this.wire.sendAction(\"get-application-zoom-level\",this.identity).then((({payload:e})=>e.data))}getWindow(){return this.wire.sendAction(\"application-get-window\",this.identity).catch((e=>{})),Promise.resolve(this.window)}registerUser(e,t){return this.wire.sendAction(\"register-user\",{userName:e,appName:t,...this.identity}).then((()=>{}))}removeTrayIcon(){return this.wire.sendAction(\"remove-tray-icon\",this.identity).then((()=>{}))}restart(){return this.wire.sendAction(\"restart-application\",this.identity).then((()=>{}))}run(){return console.warn(\"Deprecation Warning: Application.run is deprecated Please use fin.Application.start\"),this.wire.sendAction(\"application-run\",this.identity).catch((e=>{})),this._run()}_run(e={}){return this.wire.sendAction(\"run-application\",{manifestUrl:this._manifestUrl,opts:e,...this.identity}).then((()=>{}))}scheduleRestart(){return this.wire.sendAction(\"relaunch-on-close\",this.identity).then((()=>{}))}async sendApplicationLog(){const{payload:e}=await this.wire.sendAction(\"send-application-log\",this.identity);return e.data}async setJumpList(e){await this.wire.sendAction(\"set-jump-list\",{config:e,...this.identity})}setTrayIcon(e){return this.wire.sendAction(\"set-tray-icon\",{enabledIcon:e,...this.identity}).then((()=>{}))}setShortcuts(e){return this.wire.sendAction(\"set-shortcuts\",{data:e,...this.identity}).then((()=>{}))}async setShortcutQueryParams(e){await this.wire.sendAction(\"set-shortcut-query-args\",{data:e,...this.identity})}setZoomLevel(e){return this.wire.sendAction(\"set-application-zoom-level\",{level:e,...this.identity}).then((()=>{}))}async setAppLogUsername(e){await this.wire.sendAction(\"set-app-log-username\",{data:e,...this.identity})}getTrayIconInfo(){return this.wire.sendAction(\"get-tray-icon-info\",this.identity).then((({payload:e})=>e.data))}hasTrayIcon(){return this.wire.sendAction(\"has-tray-icon\",this.identity).then((({payload:e})=>e.data))}terminate(){return this.wire.sendAction(\"terminate-application\",this.identity).then((()=>{}))}wait(){return this.wire.sendAction(\"wait-for-hung-application\",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction(\"get-info\",this.identity).then((({payload:e})=>e.data))}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction(\"application-get-process-info\",this.identity);return e}async setFileDownloadLocation(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t};await this.wire.sendAction(\"set-file-download-location\",{...n,downloadLocation:e})}async getFileDownloadLocation(){const{payload:{data:e}}=await this.wire.sendAction(\"get-file-download-location\",this.identity);return e}async showTrayIconPopupMenu(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t},{payload:i}=await this.wire.sendAction(\"show-tray-icon-popup-menu\",{...n,options:e});return i.data}async closeTrayIconPopupMenu(){const{name:e}=this.wire.me,t={uuid:this.identity.uuid,name:e};await this.wire.sendAction(\"close-tray-icon-popup-menu\",{...t})}}return j.Application=i,j}function Z(){return q||(q=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(function(){if(K)return F;K=1,Object.defineProperty(F,\"__esModule\",{value:!0}),F.ApplicationModule=void 0;const e=d,t=O,n=Y();class i extends e.Base{async wrap(e){this.wire.sendAction(\"wrap-application\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}wrapSync(e){this.wire.sendAction(\"wrap-application-sync\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}async _create(e){return void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&void 0===e.isPlatformController&&(e.autoShow=!0),await this.wire.sendAction(\"create-application\",e),this.wrap({uuid:e.uuid})}create(e){return console.warn(\"Deprecation Warning: fin.Application.create is deprecated. Please use fin.Application.start\"),this.wire.sendAction(\"application-create\").catch((e=>{})),this._create(e)}async start(e){this.wire.sendAction(\"start-application\").catch((e=>{}));const t=await this._create(e);return await this.wire.sendAction(\"run-application\",{uuid:e.uuid}),t}async startManyManifests(e,t){return this.wire.sendAction(\"run-applications\",{applications:e,opts:t}).then((()=>{}))}getCurrent(){return this.wire.sendAction(\"get-current-application\").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction(\"get-current-application-sync\").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}async startFromManifest(e,t){this.wire.sendAction(\"application-start-from-manifest\").catch((e=>{}));const n=await this._createFromManifest(e);return await n._run(t),n}createFromManifest(e){return console.warn(\"Deprecation Warning: fin.Application.createFromManifest is deprecated. Please use fin.Application.startFromManifest\"),this.wire.sendAction(\"application-create-from-manifest\").catch((e=>{})),this._createFromManifest(e)}_createFromManifest(e){return this.wire.sendAction(\"get-application-manifest\",{manifestUrl:e}).then((({payload:e})=>{const t=e.data.platform?e.data.platform.uuid:e.data.startup_app.uuid;return this.wrap({uuid:t})})).then((t=>(t._manifestUrl=e,t)))}}return F.ApplicationModule=i,F}(),e),n(Y(),e)}(R)),R}H.WebContents=D;var Q={};Object.defineProperty(Q,\"__esModule\",{value:!0}),Q.promisifySubscription=void 0;var X,ee,te;function ne(){if(X)return S;X=1,Object.defineProperty(S,\"__esModule\",{value:!0}),S._Window=void 0;const e=Z(),t=H,n=J(),i=T,r=Q;class o extends t.WebContents{constructor(e,t){super(e,t,\"window\")}async createWindow(e){this.wire.sendAction(\"window-create-window\",this.identity).catch((e=>{}));const t=await(0,r.promisifySubscription)(this,\"fire-constructor-callback\");void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&(e.autoShow=!0),(0,i.handleDeprecatedWarnings)(e);const n=this.wire.environment.createChildContent({entityType:\"window\",options:e}),[o]=await Promise.all([t.getValue(),n]);let s;const{success:a}=o,c=o.data,{message:d}=c;s=a?{httpResponseCode:c.httpResponseCode,apiInjected:c.apiInjected}:{message:c.message,networkErrorCode:c.networkErrorCode,stack:c.stack};const h={message:d,cbPayload:s,success:a};try{this.getWebWindow().fin.__internal_.openerSuccessCBCalled()}catch(e){}return h.success?this:Promise.reject(h)}getAllFrames(){return this.wire.sendAction(\"get-all-frames\",this.identity).then((({payload:e})=>e.data))}getBounds(){return this.wire.sendAction(\"get-window-bounds\",this.identity).then((({payload:e})=>e.data))}center(){return this.wire.sendAction(\"center-window\",this.identity).then((()=>{}))}blur(){return this.wire.sendAction(\"blur-window\",this.identity).then((()=>{}))}bringToFront(){return this.wire.sendAction(\"bring-window-to-front\",this.identity).then((()=>{}))}animate(e,t){return this.wire.sendAction(\"animate-window\",{transitions:e,options:t,...this.identity}).then((()=>{}))}hide(){return this.wire.sendAction(\"hide-window\",this.identity).then((()=>{}))}close(e=!1){return this.wire.sendAction(\"close-window\",{force:e,...this.identity}).then((()=>{Object.setPrototypeOf(this,null)}))}focusedWebViewWasChanged(){return this.wire.sendAction(\"focused-webview-changed\",this.identity).then((()=>{}))}getNativeId(){return this.wire.sendAction(\"get-window-native-id\",this.identity).then((({payload:e})=>e.data))}async getCurrentViews(){const{payload:e}=await this.wire.sendAction(\"window-get-views\",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}disableFrame(){return console.warn(\"Function is deprecated; use disableUserMovement instead.\"),this.wire.sendAction(\"disable-window-frame\",this.identity).then((()=>{}))}disableUserMovement(){return this.wire.sendAction(\"disable-window-frame\",this.identity).then((()=>{}))}enableFrame(){return console.warn(\"Function is deprecated; use enableUserMovement instead.\"),this.wire.sendAction(\"enable-window-frame\",this.identity).then((()=>{}))}enableUserMovement(){return this.wire.sendAction(\"enable-window-frame\",this.identity).then((()=>{}))}flash(){return this.wire.sendAction(\"flash-window\",this.identity).then((()=>{}))}stopFlashing(){return this.wire.sendAction(\"stop-flash-window\",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction(\"get-window-info\",this.identity).then((({payload:e})=>e.data))}async getLayout(e){this.wire.sendAction(\"window-get-layout\",this.identity).catch((e=>{}));const t=await this.getOptions();if(!t.layout&&!t.layoutSnapshot)throw new Error(\"Window does not have a Layout\");return this.fin.Platform.Layout.wrap(e??this.identity)}getOptions(){return this.wire.sendAction(\"get-window-options\",this.identity).then((({payload:e})=>e.data))}getParentApplication(){return this.wire.sendAction(\"window-get-parent-application\",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity))}getParentWindow(){return this.wire.sendAction(\"window-get-parent-window\",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity)).then((e=>e.getWindow()))}async getSnapshot(e){const t={area:e,...this.identity};console.warn(\"Window.getSnapshot has been deprecated, please use Window.capturePage\");return(await this.wire.sendAction(\"get-window-snapshot\",t)).payload.data}getState(){return this.wire.sendAction(\"get-window-state\",this.identity).then((({payload:e})=>e.data))}getWebWindow(){return this.wire.sendAction(\"window-get-web-window\",this.identity).catch((e=>{})),this.wire.environment.getWebWindow(this.identity)}isMainWindow(){return this.wire.sendAction(\"window-is-main-window\",this.identity).catch((e=>{})),this.me.uuid===this.me.name}isShowing(){return this.wire.sendAction(\"is-window-showing\",this.identity).then((({payload:e})=>e.data))}maximize(){return this.wire.sendAction(\"maximize-window\",this.identity).then((()=>{}))}minimize(){return this.wire.sendAction(\"minimize-window\",this.identity).then((()=>{}))}moveBy(e,t,n){return this.wire.sendAction(\"move-window-by\",{deltaLeft:e,deltaTop:t,positioningOptions:n,...this.identity}).then((()=>{}))}moveTo(e,t,n){return this.wire.sendAction(\"move-window\",{left:e,top:t,positioningOptions:n,...this.identity}).then((()=>{}))}resizeBy(e,t,n,i){return this.wire.sendAction(\"resize-window-by\",{deltaWidth:Math.floor(e),deltaHeight:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}resizeTo(e,t,n,i){return this.wire.sendAction(\"resize-window\",{width:Math.floor(e),height:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}restore(){return this.wire.sendAction(\"restore-window\",this.identity).then((()=>{}))}setAsForeground(){return this.wire.sendAction(\"set-foreground-window\",this.identity).then((()=>{}))}setBounds(e,t){return this.wire.sendAction(\"set-window-bounds\",{...e,...this.identity,positioningOptions:t}).then((()=>{}))}show(e=!1){return this.wire.sendAction(\"show-window\",{force:e,...this.identity}).then((()=>{}))}showAt(e,t,n=!1){return this.wire.sendAction(\"show-at-window\",{force:n,left:Math.floor(e),top:Math.floor(t),...this.identity}).then((()=>{}))}updateOptions(e){return this.wire.sendAction(\"update-window-options\",{options:e,...this.identity}).then((()=>{}))}authenticate(e,t){return this.wire.sendAction(\"window-authenticate\",{userName:e,password:t,...this.identity}).then((()=>{}))}async showPopupMenu(e){const{payload:t}=await this.wire.sendAction(\"show-popup-menu\",{options:e,...this.identity});return t.data}async closePopupMenu(){return this.wire.sendAction(\"close-popup-menu\",{...this.identity}).then((()=>{}))}async dispatchPopupResult(e){this.wire.sendAction(\"window-dispatch-popup-result\",this.identity).catch((e=>{})),await this.wire.sendAction(\"dispatch-popup-result\",{data:e,...this.identity})}async print(e={content:\"self\"}){switch(e.content){case void 0:case\"self\":return super.print(e);case\"screenshot\":return this.wire.sendAction(\"print-screenshot\",this.identity).then((()=>{}));case\"views\":return this.wire.sendAction(\"print-views\",{...this.identity,options:e}).then((()=>{}));default:return}}}return S._Window=o,S}function ie(){return te||(te=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(function(){if(ee)return _;ee=1,Object.defineProperty(_,\"__esModule\",{value:!0}),_._WindowModule=void 0;const e=d,t=O,n=ne();class i extends e.Base{async wrap(e){this.wire.sendAction(\"window-wrap\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}wrapSync(e){this.wire.sendAction(\"window-wrap-sync\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}create(e){return this.wire.sendAction(\"create-window\").catch((e=>{})),new n._Window(this.wire,{uuid:this.me.uuid,name:e.name}).createWindow(e)}getCurrent(){if(this.wire.sendAction(\"get-current-window\").catch((e=>{})),!this.wire.me.isWindow)throw new Error(\"You are not in a Window context\");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction(\"get-current-window-sync\").catch((e=>{})),!this.wire.me.isWindow)throw new Error(\"You are not in a Window context\");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return _._WindowModule=i,_}(),e),n(ne(),e)}(M)),M}Q.promisifySubscription=async(e,t,n=(()=>!0),i)=>{let r,o,s;const a=new Promise(((e,t)=>{r=e,o=t})),c=e=>{n(e)&&(clearTimeout(s),r(e))};return await e.on(t,c),i&&(s=setTimeout((()=>o(new Error(\"event timed out\"))),i)),a.finally((()=>{e.removeListener(t,c).catch((()=>null))})),{getValue:()=>a}},Object.defineProperty(c,\"__esModule\",{value:!0}),c.System=void 0;const re=d,oe=g,se=ie(),ae=t;class ce extends re.EmitterBase{constructor(e){super(e,\"system\")}sendExternalProcessRequest(e,t){return new Promise(((n,i)=>{const r=\"external-process-exited\";let o,s,a,c;\"function\"==typeof t.listener&&(a=e=>{const n=e||{};s={topic:\"exited\",uuid:n.processUuid||\"\",exitCode:n.exitCode||0},o===e.processUuid&&(t.listener(s),c.removeListener(r,a))},this.wire.me.name||(this.wire.me.name=this.wire.me.uuid),c=new se._Window(this.wire,this.wire.me),c.on(r,a)),this.wire.sendAction(e,t).then((({payload:e})=>{o=e.data.uuid,n(e.data),s&&o===s.uuid&&(t.listener(s),c.removeListener(r,a))})).catch((e=>{c&&c.removeListener(r,a),i(e)}))}))}getVersion(){return this.wire.sendAction(\"get-version\").then((({payload:e})=>e.data))}clearCache(e){return this.wire.sendAction(\"clear-cache\",e).then((()=>{}))}deleteCacheOnExit(){return this.wire.sendAction(\"delete-cache-request\").then((()=>{}))}exit(){return this.wire.sendAction(\"exit-desktop\").then((()=>{}))}async fetchManifest(e){const{payload:{data:t}}=await this.wire.sendAction(\"fetch-manifest\",{manifestUrl:e});return t}flushCookieStore(){return this.wire.sendAction(\"flush-cookie-store\").then((()=>{}))}getAllWindows(){return this.wire.sendAction(\"get-all-windows\").then((({payload:e})=>e.data))}getAllApplications(){return this.wire.sendAction(\"get-all-applications\").then((({payload:e})=>e.data))}getCommandLineArguments(){return this.wire.sendAction(\"get-command-line-arguments\").then((({payload:e})=>e.data))}async getCrashReporterState(){const{payload:{data:{diagnosticMode:e,isRunning:t}}}=await this.wire.sendAction(\"get-crash-reporter-state\");return console.warn(\"diagnosticMode property is deprecated. It will be removed in a future version\"),{diagnosticMode:e,diagnosticsMode:e,isRunning:t}}async startCrashReporter(e){const t=e,n={...t,diagnosticMode:t.diagnosticsMode||t.diagnosticMode},{payload:{data:{diagnosticMode:i,isRunning:r}}}=await this.wire.sendAction(\"start-crash-reporter\",n);return{diagnosticMode:i,diagnosticsMode:i,isRunning:r}}getUniqueUserId(){return this.wire.sendAction(\"get-unique-user-id\").then((({payload:e})=>e.data))}getEntityInfo(e,t){return this.wire.sendAction(\"get-entity-info\",{uuid:e,name:t}).then((({payload:e})=>e.data))}getEnvironmentVariable(e){return this.wire.sendAction(\"get-environment-variable\",{environmentVariables:e}).then((({payload:e})=>e.data))}getFocusedWindow(){return this.wire.sendAction(\"get-focused-window\").then((({payload:e})=>e.data))}async isAppCertified(e){const{payload:{data:{certifiedInfo:t}}}=await this.wire.sendAction(\"is-app-certified\",{manifestUrl:e});return t}getInstalledRuntimes(){return this.wire.sendAction(\"get-installed-runtimes\").then((({payload:e})=>e.data.runtimes))}async getInstalledApps(){const{payload:{data:{installedApps:e}}}=await this.wire.sendAction(\"get-installed-apps\");return e}getLog(e){return this.wire.sendAction(\"view-log\",e).then((({payload:e})=>e.data))}getMachineId(){return this.wire.sendAction(\"get-machine-id\").then((({payload:e})=>e.data))}getMinLogLevel(){return this.wire.sendAction(\"get-min-log-level\").then((({payload:e})=>e.data))}getLogList(){return this.wire.sendAction(\"list-logs\").then((({payload:e})=>e.data))}getMonitorInfo(){return this.wire.sendAction(\"get-monitor-info\").then((({payload:e})=>e.data))}getMousePosition(){return this.wire.sendAction(\"get-mouse-position\").then((({payload:e})=>e.data))}getProcessList(){return console.warn(\"System.getProcessList has been deprecated. Please consider using our new process APIs: Window.getProcessInfo, View.getProcessInfo, Application.getProcessInfo, System.getAllProcessInfo\"),this.wire.sendAction(\"process-snapshot\").then((({payload:e})=>e.data))}async getAllProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction(\"get-all-process-info\",this.identity);return e}getProxySettings(){return this.wire.sendAction(\"get-proxy-settings\").then((({payload:e})=>e.data))}getRuntimeInfo(){return this.wire.sendAction(\"get-runtime-info\").then((({payload:e})=>e.data))}getRvmInfo(){return this.wire.sendAction(\"get-rvm-info\").then((({payload:e})=>e.data))}getHostSpecs(){return this.wire.sendAction(\"get-host-specs\").then((({payload:e})=>e.data))}getOSInfo(){return this.wire.sendAction(\"get-os-info\").then((({payload:e})=>e.data))}launchExternalProcess(e){return this.sendExternalProcessRequest(\"launch-external-process\",e)}monitorExternalProcess(e){return this.sendExternalProcessRequest(\"monitor-external-process\",e)}log(e,t){return this.wire.sendAction(\"write-to-log\",{level:e,message:t}).then((()=>{}))}openUrlWithBrowser(e){return this.wire.sendAction(\"open-url-with-browser\",{url:e}).then((()=>{}))}async registerCustomProtocol(e){if(\"object\"!=typeof e)throw new Error(\"Must provide an object with a `protocolName` property having a string value.\");await this.wire.sendAction(\"register-custom-protocol\",e)}async unregisterCustomProtocol(e){await this.wire.sendAction(\"unregister-custom-protocol\",{protocolName:e})}async getCustomProtocolState(e){return this.wire.sendAction(\"get-custom-protocol-state\",{protocolName:e}).then((({payload:e})=>e.data))}releaseExternalProcess(e){return this.wire.sendAction(\"release-external-process\",{uuid:e}).then((()=>{}))}showDeveloperTools(e){return this.wire.sendAction(\"show-developer-tools\",e).then((()=>{}))}terminateExternalProcess(e){return this.wire.sendAction(\"terminate-external-process\",e).then((()=>{}))}updateProxySettings(e){return this.wire.sendAction(\"update-proxy\",e).then((()=>{}))}async downloadAsset(e,t){const n=()=>{};let i=n,r=n;const o=new Promise(((e,t)=>{i=e,r=t}));if(\"openfin\"!==this.wire.environment.type)throw new oe.NotSupportedError(\"downloadAsset only supported in an OpenFin Render process\");const s=oe.RuntimeError.getCallSite(),a=this.wire.environment.getNextMessageId().toString(),c=`asset-download-progress-${a}`,d=`asset-download-error-${a}`,h=`asset-download-complete-${a}`,l=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},u=()=>{this.removeListener(c,l)};await Promise.all([this.on(c,l),this.once(d,(e=>{u();const{reason:t,err:n}=e;r(new oe.RuntimeError({reason:t,error:n},s))})),this.once(h,(()=>{u(),i()}))]);const p=Object.assign(e,{downloadId:a});return await this.wire.sendAction(\"download-asset\",p).catch((e=>{throw u(),e})),o}downloadRuntime(e,t){const n=oe.RuntimeError.getCallSite();return new Promise(((i,r)=>{if(\"openfin\"!==this.wire.environment.type)return void r(new oe.NotSupportedError(\"downloadRuntime only supported in an OpenFin Render process\"));const o=this.wire.environment.getNextMessageId().toString(),s=`runtime-download-progress-${o}`,a=`runtime-download-error-${o}`,c=`runtime-download-complete-${o}`,d=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},h=()=>{this.removeListener(s,d)};this.on(s,d),this.once(a,(e=>{h();const{reason:t,err:i}=e;r(new oe.RuntimeError({reason:t,error:i},n))})),this.once(c,(()=>{h(),i()}));const l=Object.assign(e,{downloadId:o});this.wire.sendAction(\"download-runtime\",l).catch((e=>{h(),r(e)}))}))}downloadPreloadScripts(e){return this.wire.sendAction(\"download-preload-scripts\",{scripts:e}).then((({payload:e})=>e.data))}getAllExternalApplications(){return this.wire.sendAction(\"get-all-external-applications\").then((({payload:e})=>e.data))}getAppAssetInfo(e){return this.wire.sendAction(\"get-app-asset-info\",e).then((({payload:e})=>e.data))}getCookies(e){const t=this.wire.environment.getUrl(),n=Object.assign(e,{url:t});return this.wire.sendAction(\"get-cookies\",n).then((({payload:e})=>e.data))}setMinLogLevel(e){return this.wire.sendAction(\"set-min-log-level\",{level:e}).then((()=>{}))}resolveUuid(e){return this.wire.sendAction(\"resolve-uuid\",{entityKey:e}).then((({payload:e})=>e.data))}executeOnRemote(e,t){return t.requestingIdentity=e,this.wire.ferryAction(t)}readRegistryValue(e,t,n){return this.wire.sendAction(\"read-registry-value\",{rootKey:e,subkey:t,value:n}).then((({payload:e})=>e.data))}registerExternalConnection(e){return this.wire.sendAction(\"register-external-connection\",{uuid:e}).then((({payload:e})=>e.data))}async getServiceConfiguration(e){if(\"string\"!=typeof e.name)throw new Error(\"Must provide an object with a `name` property having a string value\");const{name:t}=e;return this.wire.sendAction(\"get-service-configuration\",{name:t}).then((({payload:e})=>e.data))}async getSystemAppConfig(e){if(\"string\"!=typeof e)throw new Error(\"Must provide a string value for name of system app\");return this.wire.sendAction(\"get-system-app-configuration\",{name:e}).then((({payload:e})=>e.data))}async registerShutdownHandler(e){this.wire.sendAction(\"system-register-shutdown-handler\").catch((e=>{}));const{uuid:t,name:n}=this.wire.me;this.on(\"system-shutdown\",(i=>{e({proceed:()=>{this.wire.environment.raiseEvent(\"application/system-shutdown-handled\",{uuid:t,name:n,topic:\"application\"})}})}))}runRvmHealthCheck(){return this.wire.sendAction(\"run-rvm-health-check\").then((({payload:e})=>e.data))}async launchManifest(e,t={}){const{subscribe:n,...i}=t,r=i;if(n){const e=new ae.EventEmitter;n(e);const t=\"app-version-progress\",i=\"runtime-status\",o=\"app-version-complete\",s=\"app-version-error\",a=this.wire.environment.getNextMessageId().toString();r.appVersionId=a;const c=[o,t,i,s],d=e=>{const{appVersionId:t,topic:n,type:i,...r}=e;return{...r,type:c.find((e=>i.includes(e)))}},h=t=>{const n=d(t);e.emit(n.type,n)},l=()=>{this.removeListener(`${t}.${a}`,h),this.removeListener(`${i}.${a}`,h),this.removeListener(`${o}.${a}`,h),this.removeListener(`${s}.${a}`,h),this.removeListener(`${o}.${a}`,l),this.removeListener(`${s}.${a}`,l)};await Promise.all([this.on(`${t}.${a}`,h),this.on(`${i}.${a}`,h),this.once(`${o}.${a}`,h),this.once(`${s}.${a}`,h),this.once(`${o}.${a}`,l),this.once(`${s}.${a}`,l)])}return(await this.wire.sendAction(\"launch-manifest\",{manifestUrl:e,opts:r})).payload.data.manifest}async queryPermissionForCurrentContext(e){const t={uuid:this.wire.me.uuid,name:this.wire.me.name};return(await this.wire.sendAction(\"query-permission-for-current-context\",{apiName:e,identity:t})).payload.data}async enableNativeWindowIntegrationProvider(e){const{payload:t}=await this.wire.sendAction(\"enable-native-window-integration-provider\",{permissions:e});return t.data}async registerUsage({data:e,type:t}){await this.wire.sendAction(\"register-usage\",{data:e,type:t})}async getPrinters(){const{payload:e}=await this.wire.sendAction(\"system-get-printers\");return e.data}async updateProcessLoggingOptions(e){await this.wire.sendAction(\"system-update-process-logging-options\",{options:e})}async getDomainSettings(){const{payload:{data:e}}=await this.wire.sendAction(\"get-domain-settings\",this.identity);return e}async setDomainSettings(e){await this.wire.sendAction(\"set-domain-settings\",{domainSettings:e,...this.identity})}async refreshExtensions(){const{payload:e}=await this.wire.sendAction(\"refresh-extensions\");return e.data}async getInstalledExtensions(){const{payload:e}=await this.wire.sendAction(\"get-installed-extensions\");return e.data}}c.System=ce;var de={},he={};Object.defineProperty(he,\"__esModule\",{value:!0}),he.RefCounter=void 0;he.RefCounter=class{constructor(){this.topicRefMap=new Map}incRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t+1;n=i,this.topicRefMap.set(e,i)}else this.topicRefMap.set(e,1),n=1;return n}decRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t-1;this.topicRefMap.set(e,i),n=i}else n=-1;return n}actOnFirst(e,t,n){return 1===this.incRefCount(e)?t():n()}actOnLast(e,t,n){return 0===this.decRefCount(e)?t():n()}};var le={},ue={},pe={};Object.defineProperty(pe,\"__esModule\",{value:!0}),pe.ChannelBase=pe.ProtectedItems=void 0;const we=e=>async(t,n,i)=>{const r=await e(t,n,i);return void 0===r?n:r};pe.ProtectedItems=class{constructor(e,t){this.providerIdentity=e,this.close=t}};class ye{static defaultAction(e){throw new Error(`No action registered at target for ${e}`)}constructor(){this.subscriptions=new Map}async processAction(e,t,n){try{const i=this.subscriptions.has(e)?this.subscriptions.get(e):(t,n)=>(this.defaultAction??ye.defaultAction)(e,t,n),r=this.preAction?await this.preAction(e,t,n):t,o=await i(r,n);return this.postAction?await this.postAction(e,o,n):o}catch(t){if(this.errorMiddleware)return this.errorMiddleware(e,t,n);throw t}}beforeAction(e){if(this.preAction)throw new Error(\"Already registered beforeAction middleware\");this.preAction=we(e)}onError(e){if(this.errorMiddleware)throw new Error(\"Already registered error middleware\");this.errorMiddleware=e}afterAction(e){if(this.postAction)throw new Error(\"Already registered afterAction middleware\");this.postAction=we(e)}remove(e){this.subscriptions.delete(e)}setDefaultAction(e){if(this.defaultAction)throw new Error(\"default action can only be set once\");this.defaultAction=e}register(e,t){if(this.subscriptions.has(e))throw new Error(`Subscription already registered for action: ${e}. Unsubscribe before adding new subscription`);return this.subscriptions.set(e,t),!0}}pe.ChannelBase=ye;var fe,ge,me,ve=s&&s.__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)},Ce=s&&s.__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};Object.defineProperty(ue,\"__esModule\",{value:!0}),ue.ChannelClient=void 0;const be=pe,Ie=new Map;class Ee extends be.ChannelBase{static closeChannelByEndpointId(e){const t=Ie.get(e);t&&ve(t,me,\"f\").call(t)}static handleProviderDisconnect(e){for(const t of Ie.values())t.providerIdentity.channelId===e.channelId&&(t.disconnectListener(e),ve(t,me,\"f\").call(t))}constructor(e,t,n){super(),fe.set(this,void 0),ge.set(this,void 0),this.processAction=(e,t,n)=>super.processAction(e,t,n),me.set(this,(()=>{Ie.delete(this.endpointId),ve(this,ge,\"f\").close()})),Ce(this,fe,new be.ProtectedItems(e,t),\"f\"),this.disconnectListener=()=>{},this.endpointId=e.endpointId,Ce(this,ge,n,\"f\"),Ie.set(this.endpointId,this),n.receive(this.processAction)}get providerIdentity(){return ve(this,fe,\"f\").providerIdentity}async dispatch(e,t){if(ve(this,ge,\"f\").isEndpointConnected(this.providerIdentity.channelId))return ve(this,ge,\"f\").send(this.providerIdentity.channelId,e,t);throw new Error(\"The client you are trying to dispatch from is disconnected from the target provider.\")}onDisconnection(e){this.disconnectListener=t=>{try{e(t)}catch(e){throw new Error(`Error while calling the onDisconnection callback: ${e.message}`)}finally{this.disconnectListener=()=>{}}}}async disconnect(){await this.sendDisconnectAction(),ve(this,me,\"f\").call(this)}async sendDisconnectAction(){const e=ve(this,fe,\"f\");await e.close()}static async wireClose(e,t,n){const{channelName:i,uuid:r,name:o}=t;await e.sendAction(\"disconnect-from-channel\",{channelName:i,uuid:r,name:o,endpointId:n})}}ue.ChannelClient=Ee,fe=new WeakMap,ge=new WeakMap,me=new WeakMap;var xe={},Ae={};Object.defineProperty(Ae,\"__esModule\",{value:!0}),Ae.exhaustiveCheck=void 0,Ae.exhaustiveCheck=function(e,t){throw new Error(`Unsupported value: ${e}${t?`\\n Supported values are: ${t.join(\"\")}`:\"\"}`)};var Pe,Me,_e,Oe={},Se=s&&s.__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},Re=s&&s.__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)};Object.defineProperty(Oe,\"__esModule\",{value:!0}),Oe.ClassicInfo=Oe.ClassicStrategy=void 0;Oe.ClassicStrategy=class{constructor(e,t,n,i){this.messageReceiver=t,this.endpointId=n,this.providerIdentity=i,Pe.set(this,void 0),Me.set(this,new Map),_e.set(this,new Map),this.send=async(e,t,n)=>{const i=Re(this,Me,\"f\").get(e);if(!i)throw new Error(`Could not locate routing info for endpoint ${e}`);const r={...i};r.isLocalEndpointId&&delete r.endpointId,delete r.isLocalEndpointId;const o=Re(this,Pe,\"f\").sendAction(\"send-channel-message\",{...r,providerIdentity:this.providerIdentity,action:t,payload:n});Re(this,_e,\"f\").get(e)?.add(o);return(await o.catch((e=>{throw new Error(e.message)})).finally((()=>{Re(this,_e,\"f\").get(e)?.delete(o)}))).payload.data.result},this.close=async()=>{this.messageReceiver.removeEndpoint(this.providerIdentity.channelId,this.endpointId),[...Re(this,Me,\"f\").keys()].forEach((e=>this.closeEndpoint(e))),Se(this,Me,new Map,\"f\")},Se(this,Pe,e,\"f\")}onEndpointDisconnect(e,t){}receive(e){this.messageReceiver.addEndpoint(e,this.providerIdentity.channelId,this.endpointId)}async closeEndpoint(e){const t=Re(this,Me,\"f\").get(e);Re(this,Me,\"f\").delete(e);const n=Re(this,_e,\"f\").get(e);n?.forEach((n=>{const i=`Channel connection with identity uuid: ${t?.uuid} / name: ${t?.name} / endpointId: ${e} no longer connected.`;n.cancel(new Error(i))}))}isEndpointConnected(e){return Re(this,Me,\"f\").has(e)}addEndpoint(e,t){Re(this,Me,\"f\").set(e,t.endpointIdentity),Re(this,_e,\"f\").set(e,new Set)}isValidEndpointPayload(e){return\"string\"==typeof e?.endpointIdentity?.endpointId||\"string\"==typeof e?.endpointIdentity?.channelId}},Pe=new WeakMap,Me=new WeakMap,_e=new WeakMap,Oe.ClassicInfo={version:5,minimumVersion:0,type:\"classic\"};var Fe={},je={},ke={};Object.defineProperty(ke,\"__esModule\",{value:!0}),ke.errorToPOJO=void 0,ke.errorToPOJO=function(e){return{stack:e.stack,name:e.name,message:e.message,toString:()=>e.stack||e.toString()}};var Le,Te,$e=s&&s.__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)},Be=s&&s.__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};Object.defineProperty(je,\"__esModule\",{value:!0}),je.RTCEndpoint=void 0;const Ge=ke;je.RTCEndpoint=class{static isValidEndpointPayload(e){const t=e=>\"object\"==typeof e&&null!==e;return t(e)&&t(e.endpointIdentity)&&t(e.rtc)&&\"string\"==typeof e.endpointIdentity.endpointId}constructor({rtc:e,endpointIdentity:t}){this.responseMap=new Map,Le.set(this,null),Te.set(this,void 0),this.connectionStateChangeHandler=e=>{\"connected\"!==this.rtc.rtcClient.connectionState&&(this.rtc.rtcClient.removeEventListener(\"connectionstatechange\",this.connectionStateChangeHandler),this.close(),$e(this,Te,\"f\")&&$e(this,Te,\"f\").call(this))},this.send=async(e,t)=>{const n=`message-${Math.random()}`,i=new Promise(((e,t)=>{this.responseMap.set(n,{resolve:e,reject:t})}));return this.rtc.channels.request.send(JSON.stringify({action:e,payload:t,messageId:n})),i},this.close=()=>{this.responseMap.forEach((e=>e.reject(\"Connection has closed.\"))),this.responseMap=new Map,this.rtc.channels.request.close(),this.rtc.channels.response.close(),this.rtc.rtcClient.close()},this.rtc=e,this.endpointIdentity=t,this.rtc.channels.response.addEventListener(\"message\",(e=>{let{data:t}=e;e.data instanceof ArrayBuffer&&(t=(new TextDecoder).decode(e.data));const{messageId:n,payload:i,success:r,error:o}=JSON.parse(t),{resolve:s,reject:a}=this.responseMap.get(n)??{};s&&a?(this.responseMap.delete(n),r?s(i):a(o)):(console.log(\"Could not find id in responseMap.\"),console.log(e))})),this.rtc.channels.request.addEventListener(\"message\",(async e=>{let{data:n}=e;e.data instanceof ArrayBuffer&&(n=(new TextDecoder).decode(e.data));const{messageId:i,action:r,payload:o}=JSON.parse(n);if($e(this,Le,\"f\"))try{const e=await $e(this,Le,\"f\").call(this,r,o,t);this.rtc.channels.response.send(JSON.stringify({messageId:i,payload:e,success:!0}))}catch(e){\"open\"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,error:(0,Ge.errorToPOJO)(e),success:!1}))}else\"open\"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,success:!1,error:\"Connection not ready.\"}))})),this.rtc.rtcClient.addEventListener(\"connectionstatechange\",this.connectionStateChangeHandler),Object.values(this.rtc.channels).forEach((e=>{e.onclose=e=>{[...this.responseMap.values()].forEach((e=>e.reject(new Error(\"RTCDataChannel closed unexpectedly, this is most commonly caused by message size. Note: RTC Channels have a message size limit of ~255kB.\")))),this.close(),$e(this,Te,\"f\")&&$e(this,Te,\"f\").call(this)}}))}onDisconnect(e){if($e(this,Te,\"f\"))throw new Error(\"RTCEndpoint disconnectListener cannot be set twice.\");Be(this,Te,e,\"f\")}receive(e){if($e(this,Le,\"f\"))throw new Error(\"You have already set a listener for this RTC Endpoint.\");Be(this,Le,e,\"f\")}get connected(){return\"connected\"===this.rtc.rtcClient.connectionState}},Le=new WeakMap,Te=new WeakMap;var We,He,Ne,De={},Ue=s&&s.__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)},Ve=s&&s.__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};Object.defineProperty(De,\"__esModule\",{value:!0}),De.EndpointStrategy=void 0;De.EndpointStrategy=class{constructor(e,t,n){this.EndpointType=e,this.StrategyName=n,We.set(this,null),He.set(this,new Map),Ne.set(this,!0),this.send=async(e,t,n)=>this.getEndpointById(e).send(t,n),this.close=async()=>{Ue(this,Ne,\"f\")&&(Ue(this,He,\"f\").forEach((e=>e.close())),Ve(this,He,new Map,\"f\")),Ve(this,Ne,!1,\"f\")},this.isValidEndpointPayload=t}onEndpointDisconnect(e,t){this.getEndpointById(e).onDisconnect(t)}receive(e){if(Ue(this,We,\"f\"))throw new Error(`You have already set a listener for this ${this.StrategyName} Strategy`);Ve(this,We,e,\"f\"),Ue(this,He,\"f\").forEach((e=>e.receive(Ue(this,We,\"f\"))))}getEndpointById(e){const t=Ue(this,He,\"f\").get(e);if(!t)throw new Error(`Client with endpoint id ${e} is not connected`);return t}get connected(){return Ue(this,Ne,\"f\")}isEndpointConnected(e){return Ue(this,He,\"f\").has(e)}addEndpoint(e,t){if(!Ue(this,Ne,\"f\"))return void console.warn(`Adding endpoint to disconnected ${this.StrategyName} Strategy`);const n=new this.EndpointType(t);Ue(this,We,\"f\")&&n.receive(Ue(this,We,\"f\")),Ue(this,He,\"f\").set(e,n)}async closeEndpoint(e){Ue(this,He,\"f\").delete(e)}},We=new WeakMap,He=new WeakMap,Ne=new WeakMap,Object.defineProperty(Fe,\"__esModule\",{value:!0}),Fe.RTCInfo=Fe.RTCStrategy=void 0;const ze=je,Ke=De;class qe extends Ke.EndpointStrategy{constructor(){super(ze.RTCEndpoint,ze.RTCEndpoint.isValidEndpointPayload,\"RTC\")}}Fe.RTCStrategy=qe,Fe.RTCInfo={version:2,minimumVersion:0,type:\"rtc\"};var Je={};Object.defineProperty(Je,\"__esModule\",{value:!0}),Je.RTCICEManager=void 0;const Ye=d;class Ze extends Ye.EmitterBase{constructor(e){super(e,\"channel\"),this.ensureChannelOpened=e=>new Promise(((t,n)=>{if(\"open\"===e.readyState)t();else if(\"connecting\"===e.readyState){const n=()=>{e.removeEventListener(\"open\",n),t()};e.addEventListener(\"open\",n)}else n(new Error(\"This Channel has already closed\"))}))}static createDataChannelPromise(e,t){let n;const i=new Promise((e=>{n=e})),r=i=>{const o=()=>{i.channel.removeEventListener(\"open\",o),n(i.channel)};i.channel.label===e&&(i.channel.addEventListener(\"open\",o),t.removeEventListener(\"datachannel\",r))};return t.addEventListener(\"datachannel\",r),i}async listenForProviderIce(e,t){await this.on(this.createProviderEventName(e),t,{timestamp:Date.now()})}async raiseProviderIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createProviderEventName(e)),t)}async listenForClientIce(e,t){await this.on(this.createClientEventName(e),t,{timestamp:Date.now()})}async raiseClientIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createClientEventName(e)),t)}cleanupIceListeners(e){this.removeAllListeners(this.createClientEventName(e)),this.removeAllListeners(this.createProviderEventName(e))}createClientEventName(e){return`ice-client-${e}`}createProviderEventName(e){return`ice-provider-${e}`}createRouteString(e){return`channel/${e}`}createRtcPeer(){return this.wire.environment.getRtcPeer()}async startClientOffer(){const e=Math.random().toString(),t=this.createRtcPeer();t.addEventListener(\"icecandidate\",(async t=>{t.candidate&&await this.raiseClientIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForProviderIce(e,(async e=>{await t.addIceCandidate(e.candidate)}));const n={request:t.createDataChannel(\"request\"),response:t.createDataChannel(\"response\")},i=await t.createOffer();await t.setLocalDescription(i);const r=Promise.all([n.request,n.response].map(this.ensureChannelOpened)).then((()=>{}));return{rtcClient:t,channels:n,offer:i,rtcConnectionId:e,channelsOpened:r}}async finishClientOffer(e,t,n){return await e.setRemoteDescription(t),await n,!0}async createProviderAnswer(e,t){const n=this.createRtcPeer(),i=Ze.createDataChannelPromise(\"request\",n),r=Ze.createDataChannelPromise(\"response\",n);n.addEventListener(\"icecandidate\",(async t=>{t.candidate&&await this.raiseProviderIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForClientIce(e,(async e=>{await n.addIceCandidate(e.candidate)})),await n.setRemoteDescription(t);const o=await n.createAnswer();await n.setLocalDescription(o);const s=Promise.all([i,r]).then((([t,n])=>(this.cleanupIceListeners(e),{request:t,response:n})));return{rtcClient:n,answer:o,channels:s}}}Je.RTCICEManager=Ze;var Qe={},Xe={};function et(e){return[...e.split(\".\").reverse().entries()].reduce(((e,[t,n])=>e+ +n*1e4**t),0)}function tt(e,t){return et(e)>=et(t)}function nt(e){return e.split(\"/\")[0]}Object.defineProperty(Xe,\"__esModule\",{value:!0}),Xe.runtimeUuidMeetsMinimumRuntimeVersion=Xe.parseRuntimeUuid=Xe.meetsMinimumRuntimeVersion=void 0,Xe.meetsMinimumRuntimeVersion=tt,Xe.parseRuntimeUuid=nt,Xe.runtimeUuidMeetsMinimumRuntimeVersion=function(e,t){return tt(nt(e),t)};var it,rt,ot,st,at,ct=s&&s.__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)},dt=s&&s.__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};Object.defineProperty(Qe,\"__esModule\",{value:!0}),Qe.ChannelProvider=void 0;const ht=pe,lt=Xe;class ut extends ht.ChannelBase{get connections(){return[...ct(this,it,\"f\")]}static handleClientDisconnection(e,t){const n=e.connections.find((e=>e.endpointId===t.endpointId));if(n)ct(e,st,\"f\").call(e,n);else{e.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name)).forEach(ct(e,st,\"f\"))}e.disconnectListener(t)}static setProviderRemoval(e,t){ut.removalMap.set(e,t)}constructor(e,t,n){super(),it.set(this,void 0),rt.set(this,void 0),ot.set(this,void 0),st.set(this,(e=>{const t=this.connections.filter((t=>t.endpointId!==e.endpointId));ct(this,ot,\"f\").closeEndpoint(e.endpointId),dt(this,it,t,\"f\")})),this.processAction=async(e,t,n)=>(ut.clientIsMultiRuntime(n)&&!(0,lt.runtimeUuidMeetsMinimumRuntimeVersion)(n.runtimeUuid,\"18.87.56.0\")?this.handleMultiRuntimeLegacyClient(n):this.checkForClientConnection(n),super.processAction(e,t,n)),at.set(this,(()=>{ct(this,ot,\"f\").close();const e=ut.removalMap.get(this);e&&e()})),dt(this,rt,new ht.ProtectedItems(e,t),\"f\"),this.connectListener=()=>{},this.disconnectListener=()=>{},dt(this,it,[],\"f\"),dt(this,ot,n,\"f\"),n.receive(this.processAction)}dispatch(e,t,n){const i=e.endpointId??this.getEndpointIdForOpenFinId(e,t);return i&&ct(this,ot,\"f\").isEndpointConnected(i)?ct(this,ot,\"f\").send(i,t,n):Promise.reject(new Error(`Client connection with identity uuid: ${e.uuid} / name: ${e.name} / endpointId: ${i} no longer connected.`))}async processConnection(e,t){return ct(this,it,\"f\").push(e),this.connectListener(e,t)}publish(e,t){return this.connections.map((n=>ct(this,ot,\"f\").send(n.endpointId,e,t)))}onConnection(e){this.connectListener=e}onDisconnection(e){this.disconnectListener=e}async destroy(){const e=ct(this,rt,\"f\");e.providerIdentity,dt(this,it,[],\"f\"),await e.close(),ct(this,at,\"f\").call(this)}async getAllClientInfo(){return this.connections.map((e=>{const{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}=e;return{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}}))}checkForClientConnection(e){if(!this.isClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider.\\n Client Identity: {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}isClientConnected(e){return ut.clientIdentityIncludesEndpointId(e)?this.connections.some((t=>t.endpointId===e.endpointId&&t.uuid===e.uuid&&t.name===e.name)):this.isLegacyClientConnected(e)}isLegacyClientConnected(e){return this.connections.some((t=>t.uuid===e.uuid&&t.name===e.name))}handleMultiRuntimeLegacyClient(e){if(!this.isLegacyClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider. Client Identity:\\n {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}getEndpointIdForOpenFinId(e,t){const n=this.connections.filter((t=>t.name===e.name&&t.uuid===e.uuid));if(n.length>=2){const n=ct(this,rt,\"f\"),{uuid:i,name:r}=e,o=n?.providerIdentity.uuid,s=n?.providerIdentity.name;console.warn(`WARNING: Dispatch call may have unintended results. The \"to\" argument of your dispatch call is missing the\\n \"endpointId\" parameter. The identity you are dispatching to ({uuid: ${i}, name: ${r}})\\n has multiple channelClients for this channel. Your dispatched action: (${t}) from the provider:\\n ({uuid: ${o}, name: ${s}}) will only be processed by the most recently-created client.`)}return n.pop()?.endpointId}static clientIdentityIncludesEndpointId(e){return void 0!==e.endpointId}static clientIsMultiRuntime(e){return void 0!==e.runtimeUuid}static async wireClose(e,t){await e.sendAction(\"destroy-channel\",{channelName:t})}}Qe.ChannelProvider=ut,it=new WeakMap,rt=new WeakMap,ot=new WeakMap,st=new WeakMap,at=new WeakMap,ut.removalMap=new WeakMap;var pt={};Object.defineProperty(pt,\"__esModule\",{value:!0}),pt.MessageReceiver=void 0;const wt=ue,yt=d;class ft extends yt.Base{constructor(e){super(e),this.onmessage=e=>\"process-channel-message\"===e.action&&(this.processChannelMessage(e),!0),this.endpointMap=new Map,this.latestEndpointIdByChannelId=new Map,e.registerMessageHandler(this.onmessage.bind(this))}async processChannelMessage(e){const{senderIdentity:t,providerIdentity:n,action:i,ackToSender:r,payload:o,intendedTargetIdentity:s}=e.payload,a=s.channelId??s.endpointId??this.latestEndpointIdByChannelId.get(n.channelId),c=this.endpointMap.get(a);if(!c)return r.payload.success=!1,r.payload.reason=`Client connection with identity uuid: ${this.wire.me.uuid} / name: ${this.wire.me.name} / endpointId: ${a} no longer connected.`,this.wire.sendRaw(r);try{const e=await c(i,o,t);return r.payload.payload=r.payload.payload||{},r.payload.payload.result=e,this.wire.sendRaw(r)}catch(e){return r.payload.success=!1,r.payload.reason=e.message,this.wire.sendRaw(r)}}addEndpoint(e,t,n){this.endpointMap.set(n,e),t!==n&&this.latestEndpointIdByChannelId.set(t,n)}removeEndpoint(e,t){this.endpointMap.delete(t),this.latestEndpointIdByChannelId.get(e)===t&&this.latestEndpointIdByChannelId.delete(e)}checkForPreviousClientConnection(e){const t=this.latestEndpointIdByChannelId.get(e);t&&(wt.ChannelClient.closeChannelByEndpointId(t),console.warn(\"You have created a second connection to an older provider. First connection has been removed from the clientMap\"),console.warn(\"If the provider calls publish(), you may receive multiple messages.\"))}}pt.MessageReceiver=ft;var gt={};Object.defineProperty(gt,\"__esModule\",{value:!0}),gt.ProtocolManager=void 0;gt.ProtocolManager=class{constructor(e){this.ProtocolsInPreferenceOrder=e,this.DefaultClientProtocols=[\"classic\"],this.DefaultProviderProtocols=[\"classic\"],this.getClientProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultClientProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(\", \")}.`);return t},this.getProviderProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultProviderProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(\", \")}.`);return t},this.getCompatibleProtocols=(e,t)=>t.supportedProtocols.filter((t=>e.some((e=>e.type===t.type&&t.version>=e.minimumVersion&&e.version>=(t.minimumVersion??0))))).slice(0,t.maxProtocols)}};var mt={};Object.defineProperty(mt,\"__esModule\",{value:!0});class vt{static combine(e,t){return new vt(e,t)}constructor(e,t){this.primary=e,this.secondary=t}onEndpointDisconnect(e,t){this.primary.onEndpointDisconnect(e,(()=>{this.secondary.isEndpointConnected(e)||t()})),this.secondary.onEndpointDisconnect(e,(()=>{this.primary.isEndpointConnected(e)||t()}))}isValidEndpointPayload(e){return this.primary.isValidEndpointPayload(e)||this.secondary.isValidEndpointPayload(e)}async closeEndpoint(e){await this.primary.closeEndpoint(e),await this.secondary.closeEndpoint(e)}isEndpointConnected(e){return this.primary.isEndpointConnected(e)||this.secondary.isEndpointConnected(e)}async addEndpoint(e,t){this.primary.isValidEndpointPayload(t)&&await this.primary.addEndpoint(e,t),this.secondary.isValidEndpointPayload(t)&&await this.secondary.addEndpoint(e,t)}receive(e){this.primary.receive(e),this.secondary.receive(e)}send(e,t,n){return this.primary.isEndpointConnected(e)?this.primary.send(e,t,n):this.secondary.send(e,t,n)}async close(){await Promise.all([this.primary.close(),this.secondary.close()])}}mt.default=vt;var Ct,bt,It=s&&s.__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},Et=s&&s.__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)},xt=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(xe,\"__esModule\",{value:!0}),xe.ConnectionManager=void 0;const At=Ae,Pt=d,Mt=Oe,_t=Fe,Ot=Je,St=Qe,Rt=pt,Ft=gt,jt=xt(mt);class kt extends Pt.Base{static getProtocolOptionsFromStrings(e){return e.map((e=>{switch(e){case\"rtc\":return _t.RTCInfo;case\"classic\":return Mt.ClassicInfo;default:return(0,At.exhaustiveCheck)(e,[\"rtc\",\"classic\"])}}))}constructor(e){super(e),Ct.set(this,void 0),bt.set(this,void 0),this.removeChannelFromProviderMap=e=>{this.providerMap.delete(e)},this.onmessage=e=>\"process-channel-connection\"===e.action&&(this.processChannelConnection(e),!0),this.providerMap=new Map,this.protocolManager=new Ft.ProtocolManager(\"node\"===this.wire.environment.type?[\"classic\"]:[\"rtc\",\"classic\"]),It(this,Ct,new Rt.MessageReceiver(e),\"f\"),It(this,bt,new Ot.RTCICEManager(e),\"f\"),e.registerMessageHandler(this.onmessage.bind(this))}createProvider(e,t){const n=Object.assign(this.wire.environment.getDefaultChannelOptions().create,e||{}),i=this.protocolManager.getProviderProtocols(n?.protocols),r=i.map((e=>{switch(e){case\"rtc\":return new _t.RTCStrategy;case\"classic\":return new Mt.ClassicStrategy(this.wire,Et(this,Ct,\"f\"),t.channelId,t);default:return(0,At.exhaustiveCheck)(e,[\"rtc\",\"classic\"])}}));let o;if(2===r.length){const[e,t]=r;o=jt.default.combine(e,t)}else{if(1!==r.length)throw new Error(\"failed to combine strategies\");[o]=r}const s=new St.ChannelProvider(t,(()=>St.ChannelProvider.wireClose(this.wire,t.channelName)),o),a=t.channelId;return this.providerMap.set(a,{provider:s,strategy:o,supportedProtocols:kt.getProtocolOptionsFromStrings(i)}),St.ChannelProvider.setProviderRemoval(s,this.removeChannelFromProviderMap.bind(this)),s}async createClientOffer(e){const t=this.protocolManager.getClientProtocols(e?.protocols);let n;return{offer:{supportedProtocols:await Promise.all(t.map((async e=>{switch(e){case\"rtc\":{const{rtcClient:e,channels:t,offer:i,rtcConnectionId:r,channelsOpened:o}=await Et(this,bt,\"f\").startClientOffer();return n={rtcClient:e,channels:t,channelsOpened:o},{type:\"rtc\",version:_t.RTCInfo.version,payload:{offer:i,rtcConnectionId:r}}}case\"classic\":return{type:\"classic\",version:Mt.ClassicInfo.version};default:return(0,At.exhaustiveCheck)(e,[\"rtc\",\"classic\"])}}))),maxProtocols:2},rtc:n}}async createClientStrategy(e,t){t.endpointId||(t.endpointId=this.wire.environment.getNextMessageId(),Et(this,Ct,\"f\").checkForPreviousClientConnection(t.channelId));const n=t.answer??{supportedProtocols:[{type:\"classic\",version:1}]},i=(await Promise.all(n.supportedProtocols.map((async n=>\"rtc\"===n.type&&e?(await Et(this,bt,\"f\").finishClientOffer(e.rtcClient,n.payload.answer,e.channelsOpened),new _t.RTCStrategy):\"classic\"===n.type?new Mt.ClassicStrategy(this.wire,Et(this,Ct,\"f\"),t.endpointId,t):null)))).filter((e=>null!==e));let r;if(e&&!i.some((e=>e instanceof _t.RTCStrategy))&&e&&e.rtcClient.close(),i.length>=2)r=jt.default.combine(i[0],i[1]);else{if(!i.length)throw new Error(\"No compatible protocols\");[r]=i}const o={endpointIdentity:t,rtc:e};return r.addEndpoint(t.channelId,o),r}async processChannelConnection(e){const{clientIdentity:t,providerIdentity:n,ackToSender:i,payload:r,offer:o}=e.payload;t.endpointId?t.isLocalEndpointId=!1:(t.endpointId=this.wire.environment.getNextMessageId(),t.isLocalEndpointId=!0);const s=n.channelId,a=this.providerMap.get(s);if(!a)return i.payload.success=!1,i.payload.reason=`Channel \"${n.channelName}\" has been destroyed.`,this.wire.sendRaw(i);const{provider:c,strategy:d,supportedProtocols:h}=a;try{if(!(c instanceof St.ChannelProvider))throw Error(\"Cannot connect to a channel client\");const e=o??{supportedProtocols:[{type:\"classic\",version:1}],maxProtocols:1},n=this.protocolManager.getCompatibleProtocols(h,e);if(!n.length)throw new Error(\"This provider does not support any of the offered protocols.\");const s=await c.processConnection(t,r);i.payload.payload=i.payload.payload||{};let a={supportedProtocols:[],endpointPayloadPromise:Promise.resolve({endpointIdentity:t})};return a=await n.reduce((async(e,t)=>{const n=await e;if(\"rtc\"===t.type){const{answer:e,rtcClient:i,channels:r}=await Et(this,bt,\"f\").createProviderAnswer(t.payload.rtcConnectionId,t.payload.offer);n.supportedProtocols.push({type:\"rtc\",version:_t.RTCInfo.version,payload:{answer:e}}),n.endpointPayloadPromise=n.endpointPayloadPromise.then((e=>r.then((t=>({...e,rtc:{rtcClient:i,channels:t}})))))}else n.supportedProtocols.push({type:\"classic\",version:Mt.ClassicInfo.version});return n}),Promise.resolve(a)),a.endpointPayloadPromise.then((e=>d.addEndpoint(t.endpointId,e))),i.payload.payload.result=s,i.payload.payload.answer=a,this.wire.sendRaw(i)}catch(e){return i.payload.success=!1,i.payload.reason=e.message,this.wire.sendRaw(i)}}}xe.ConnectionManager=kt,Ct=new WeakMap,bt=new WeakMap;var Lt,Tt,$t,Bt=s&&s.__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},Gt=s&&s.__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)};Object.defineProperty(le,\"__esModule\",{value:!0}),le.Channel=void 0;const Wt=t,Ht=G,Nt=d,Dt=ue,Ut=xe,Vt=Qe;function zt(e){const t=Math.floor(e/10),n=Math.min(3e4,500*2**t);return new Promise((e=>{setTimeout((()=>{e(!1)}),n)}))}class Kt extends Nt.EmitterBase{constructor(e){super(e,\"channel\"),Lt.set(this,void 0),Tt.set(this,new Wt.EventEmitter),$t.set(this,new Ht.AsyncRetryableLazy((async()=>{await Promise.all([this.on(\"disconnected\",(e=>{Dt.ChannelClient.handleProviderDisconnect(e)})),this.on(\"connected\",((...e)=>{Gt(this,Tt,\"f\").emit(\"connected\",...e)}))]).catch((()=>new Error(\"error setting up channel connection listeners\")))}))),Bt(this,Lt,new Ut.ConnectionManager(e),\"f\")}async getAllChannels(){return this.wire.sendAction(\"get-all-channels\").then((({payload:e})=>e.data))}async onChannelConnect(e){await this.on(\"connected\",e)}async onChannelDisconnect(e){await this.on(\"disconnected\",e)}async safeConnect(e,t,n){const i={count:0};do{let r=()=>{};const o=new Promise((t=>{r=n=>{e===n.channelName&&t(!0)},Gt(this,Tt,\"f\").on(\"connected\",r)}));try{if(i.count>0){i.gotConnectedEvent=await Promise.race([zt(i.count),o]);const t=await this.wire.sendAction(\"connect-to-channel\",{...n,retryInfo:i});return console.log(`Successfully connected to channelName: ${e}`),t.payload.data}const t=this.wire.sendAction(\"connect-to-channel\",n);i.originalMessageId=t.messageId;return(await t).payload.data}catch(n){if(!n.message.includes(\"internal-nack\"))throw n;t&&0===i.count&&console.warn(`No channel found for channelName: ${e}. Waiting for connection...`)}finally{i.count+=1,Gt(this,Tt,\"f\").removeListener(\"connected\",r)}}while(t);throw new Error(`No channel found for channelName: ${e}.`)}async connect(e,t={}){if(await Gt(this,$t,\"f\").getValue(),!e||\"string\"!=typeof e)throw new Error(\"Please provide a channelName string to connect to a channel.\");const n={wait:!0,...this.wire.environment.getDefaultChannelOptions().connect,...t},{offer:i,rtc:r}=await Gt(this,Lt,\"f\").createClientOffer(n);let o;(this.fin.me.isFrame||this.fin.me.isView||this.fin.me.isWindow)&&(o=(await this.fin.me.getInfo()).url);const s={channelName:e,...n,offer:i,connectionUrl:o},a=await this.safeConnect(e,n.wait,s),c=await Gt(this,Lt,\"f\").createClientStrategy(r,a),d=new Dt.ChannelClient(a,(()=>Dt.ChannelClient.wireClose(this.wire,a,a.endpointId)),c);return c.onEndpointDisconnect(a.channelId,(async()=>{try{await d.sendDisconnectAction()}catch(e){console.warn(`Something went wrong during disconnect for client with uuid: ${a.uuid} / name: ${a.name} / endpointId: ${a.endpointId}.`)}finally{Dt.ChannelClient.handleProviderDisconnect(a)}})),d}async create(e,t){if(!e)throw new Error(\"Please provide a channelName to create a channel\");const{payload:{data:n}}=await this.wire.sendAction(\"create-channel\",{channelName:e}),i=Gt(this,Lt,\"f\").createProvider(t,n);return this.on(\"client-disconnected\",(t=>{t.channelName===e&&Vt.ChannelProvider.handleClientDisconnection(i,t)})),i}}le.Channel=Kt,Lt=new WeakMap,Tt=new WeakMap,$t=new WeakMap,Object.defineProperty(de,\"__esModule\",{value:!0}),de.InterAppPayload=de.InterApplicationBus=void 0;const qt=t,Jt=d,Yt=he,Zt=le,Qt=O;class Xt extends Jt.Base{constructor(e){super(e),this.events={subscriberAdded:\"subscriber-added\",subscriberRemoved:\"subscriber-removed\"},this.refCounter=new Yt.RefCounter,this.Channel=new Zt.Channel(e),this.emitter=new qt.EventEmitter,e.registerMessageHandler(this.onmessage.bind(this)),this.on=this.emitter.on.bind(this.emitter),this.removeAllListeners=this.emitter.removeAllListeners.bind(this.emitter)}async publish(e,t){await this.wire.sendAction(\"publish-message\",{topic:e,message:t,sourceWindowName:this.me.name})}async send(e,t,n){const i=(0,Qt.validateIdentity)(e);if(i)throw new Error(i);await this.wire.sendAction(\"send-message\",{destinationUuid:e.uuid,destinationWindowName:e.name,topic:t,message:n,sourceWindowName:this.me.name})}subscribe(e,t,n){const i=this.createSubscriptionKey(e.uuid,e.name||\"*\",t);return this.emitter.on(i,n),this.refCounter.actOnFirst(i,(async()=>{await this.wire.sendAction(\"subscribe\",{sourceUuid:e.uuid,sourceWindowName:e.name||\"*\",topic:t,destinationWindowName:this.me.name})}),(()=>Promise.resolve()))}unsubscribe(e,t,n){const i=e.name||\"*\",r=this.createSubscriptionKey(e.uuid,i,t);return this.emitter.removeListener(r,n),this.refCounter.actOnLast(r,(async()=>{await this.wire.sendAction(\"unsubscribe\",{sourceUuid:e.uuid,sourceWindowName:i,topic:t,destinationWindowName:this.me.name})}),(()=>new Promise((e=>e)).then((()=>{}))))}processMessage(e){const{payload:{message:t,sourceWindowName:n,sourceUuid:i,topic:r}}=e,o=[this.createSubscriptionKey(i,n,r),this.createSubscriptionKey(i,\"*\",r),this.createSubscriptionKey(\"*\",\"*\",r)],s={uuid:i,name:n};o.forEach((e=>{this.emitter.emit(e,t,s)}))}emitSubscriverEvent(e,t){const{payload:{targetName:n,uuid:i,topic:r}}=t,o={name:n,uuid:i,topic:r};this.emitter.emit(e,o)}createSubscriptionKey(e,t,n){const i=t||\"*\";if(!(e&&i&&n))throw new Error(\"Missing uuid, name, or topic string\");return function(...e){return e.map((e=>Buffer.from(`${e}`).toString(\"base64\"))).join(\"/\")}(e,i,n)}onmessage(e){const{action:t}=e;switch(t){case\"process-message\":this.processMessage(e);break;case this.events.subscriberAdded:this.emitSubscriverEvent(this.events.subscriberAdded,e);break;case this.events.subscriberRemoved:this.emitSubscriverEvent(this.events.subscriberRemoved,e)}return!0}}de.InterApplicationBus=Xt;de.InterAppPayload=class{};var en={};Object.defineProperty(en,\"__esModule\",{value:!0}),en.Clipboard=void 0;const tn=d;class nn extends tn.Base{async writeText(e){await this.wire.sendAction(\"clipboard-write-text\",e)}async readText(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-text\",{type:e});return t.data}async writeImage(e){await this.wire.sendAction(\"clipboard-write-image\",e)}async readImage(e={format:\"dataURL\"}){const{payload:t}=await this.wire.sendAction(\"clipboard-read-image\",e);return t.data}async writeHtml(e){await this.wire.sendAction(\"clipboard-write-html\",e)}async readHtml(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-html\",{type:e});return t.data}async writeRtf(e){await this.wire.sendAction(\"clipboard-write-rtf\",e)}async readRtf(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-rtf\",{type:e});return t.data}async write(e){await this.wire.sendAction(\"clipboard-write\",e)}async getAvailableFormats(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-formats\",{type:e});return t.data}}en.Clipboard=nn;var rn={},on={},sn={};Object.defineProperty(sn,\"__esModule\",{value:!0}),sn.ExternalApplication=void 0;const an=d;class cn extends an.EmitterBase{constructor(e,t){super(e,\"external-application\",t.uuid),this.identity=t}getInfo(){return this.wire.sendAction(\"get-external-application-info\",this.identity).then((({payload:e})=>e.data))}}sn.ExternalApplication=cn,Object.defineProperty(on,\"__esModule\",{value:!0}),on.ExternalApplicationModule=void 0;const dn=d,hn=sn;class ln extends dn.Base{wrap(e){return this.wire.sendAction(\"external-application-wrap\").catch((e=>{})),Promise.resolve(new hn.ExternalApplication(this.wire,{uuid:e}))}wrapSync(e){return this.wire.sendAction(\"external-application-wrap-sync\").catch((e=>{})),new hn.ExternalApplication(this.wire,{uuid:e})}}on.ExternalApplicationModule=ln,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(on,e),n(sn,e)}(rn);var un={},pn={},wn={};Object.defineProperty(wn,\"__esModule\",{value:!0}),wn._Frame=void 0;const yn=d;class fn extends yn.EmitterBase{constructor(e,t){super(e,\"frame\",t.uuid,t.name),this.identity=t}getInfo(){return this.wire.sendAction(\"get-frame-info\",this.identity).then((({payload:e})=>e.data))}getParentWindow(){return this.wire.sendAction(\"get-parent-window\",this.identity).then((({payload:e})=>e.data))}}wn._Frame=fn,Object.defineProperty(pn,\"__esModule\",{value:!0}),pn._FrameModule=void 0;const gn=d,mn=O,vn=wn;class Cn extends gn.Base{async wrap(e){this.wire.sendAction(\"frame-wrap\").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}wrapSync(e){this.wire.sendAction(\"frame-wrap-sync\").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}getCurrent(){return this.wire.sendAction(\"frame-get-current\").catch((e=>{})),Promise.resolve(new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity()))}getCurrentSync(){return this.wire.sendAction(\"frame-get-current-sync\").catch((e=>{})),new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity())}}pn._FrameModule=Cn,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(pn,e),n(wn,e)}(un);var bn={};Object.defineProperty(bn,\"__esModule\",{value:!0}),bn.GlobalHotkey=void 0;const In=d;class En extends In.EmitterBase{constructor(e){super(e,\"global-hotkey\")}async register(e,t){await this.on(e,t),await this.wire.sendAction(\"global-hotkey-register\",{hotkey:e})}async unregister(e){await this.removeAllListeners(e),await this.wire.sendAction(\"global-hotkey-unregister\",{hotkey:e})}async unregisterAll(){await Promise.all(this.eventNames().filter((e=>!(\"registered\"===e||\"unregistered\"===e))).map((e=>this.removeAllListeners(e)))),await this.wire.sendAction(\"global-hotkey-unregister-all\",{})}async isRegistered(e){const{payload:{data:t}}=await this.wire.sendAction(\"global-hotkey-is-registered\",{hotkey:e});return t}}bn.GlobalHotkey=En;var xn,An={},Pn={},Mn={},_n=s&&s.__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)};Object.defineProperty(Mn,\"__esModule\",{value:!0}),Mn.Platform=void 0;const On=d,Sn=O,Rn=new Map;class Fn extends On.EmitterBase{constructor(e,t){super(t.wire,\"application\",e.uuid),this.getClient=e=>{this.wire.sendAction(\"platform-get-client\",this.identity).catch((e=>{}));const t=e||this.identity,{uuid:n}=t;if(!Rn.has(n)){const e=_n(this,xn,\"f\").call(this,n);Rn.set(n,e)}return Rn.get(n)},xn.set(this,(async e=>{try{const t=`custom-frame-${e}`,n=await this._channel.connect(t,{wait:!1});return n.onDisconnection((()=>{Rn.delete(e)})),n}catch(t){throw Rn.delete(e),new Error(\"The targeted Platform is not currently running. Listen for application-started event for the given Uuid.\")}})),this.launchLegacyManifest=this.launchContentManifest;const n=(0,Sn.validateIdentity)(e);if(n)throw new Error(n);this._channel=t,this.identity={uuid:e.uuid},this.Layout=this.fin.Platform.Layout,this.Application=this.fin.Application.wrapSync(this.identity)}async createView(e,t,n){this.wire.sendAction(\"platform-create-view\",this.identity).catch((e=>{}));const i=await this.getClient(),r=await i.dispatch(\"create-view\",{target:t,opts:e,targetView:n});if(!r||(0,Sn.validateIdentity)(r.identity))throw new Error(`When overwriting the createView call, please return an object that has a valid 'identity' property: ${JSON.stringify(r)}`);return this.fin.View.wrapSync(r.identity)}async createWindow(e){this.wire.sendAction(\"platform-create-window\",this.identity).catch((e=>{}));const t=await this.getClient();e.reason||(e.reason=\"api-call\");const n=await t.dispatch(\"create-view-container\",e);if(!n||(0,Sn.validateIdentity)(n.identity))throw new Error(`When overwriting the createWindow call, please return an object that has a valid 'identity' property: ${JSON.stringify(n)}`);const{identity:i}=n,r=this.fin.Window.wrapSync(i);return r.name=i.name,r.uuid=i.uuid,r}async quit(){this.wire.sendAction(\"platform-quit\",this.identity).catch((e=>{}));return(await this.getClient()).dispatch(\"quit\")}async closeView(e){this.wire.sendAction(\"platform-close-view\",this.identity).catch((e=>{}));const t=await this.getClient();await t.dispatch(\"close-view\",{view:e})}async reparentView(e,t){console.warn(\"Platform.reparentView has been deprecated, please use Platform.createView\"),this.wire.sendAction(\"platform-reparent-view\",this.identity).catch((e=>{}));const n={...e,uuid:e.uuid??this.identity.uuid},i=await this.fin.View.wrap(n),r=await i.getOptions();return this.createView(r,t)}async getSnapshot(){this.wire.sendAction(\"platform-get-snapshot\",this.identity).catch((e=>{}));return(await this.getClient()).dispatch(\"get-snapshot\")}async getViewSnapshot(e){return(await this.getClient()).dispatch(\"get-view-snapshot\",{viewIdentity:e})}async applySnapshot(e,t){this.wire.sendAction(\"platform-apply-snapshot\",this.identity).catch((e=>{}));const n=\"Requested snapshot must be a valid Snapshot object, or a url or filepath to such an object.\";let i;if(\"string\"==typeof e)try{i=(await this._channel.wire.sendAction(\"get-application-manifest\",{manifestUrl:e})).payload.data}catch(e){throw new Error(`${n}: ${e}`)}else i=e;if(!i.windows)throw new Error(n);const r=await this.getClient();return await r.dispatch(\"apply-snapshot\",{snapshot:i,options:t}),this}async fetchManifest(e){return(await this.getClient()).dispatch(\"platform-fetch-manifest\",{manifestUrl:e})}async launchContentManifest(e){this.wire.sendAction(\"platform-launch-content-manifest\",this.identity).catch((()=>{}));const t=await this.getClient(),n=await this.fetchManifest(e);return t.dispatch(\"launch-into-platform\",{manifest:n,manifestUrl:e}),this}async setWindowContext(e={},t){if(this.wire.sendAction(\"platform-set-window-context\",this.identity).catch((e=>{})),!e)throw new Error(\"Please provide a serializable object or string to set the context.\");const n=await this.getClient(),{entityType:i}=t?await this.fin.System.getEntityInfo(t.uuid,t.name):this.fin.me;await n.dispatch(\"set-window-context\",{context:e,entityType:i,target:t||{uuid:this.fin.me.uuid,name:this.fin.me.name}})}async getWindowContext(e){this.wire.sendAction(\"platform-get-window-context\",this.identity).catch((e=>{}));const t=await this.getClient(),{entityType:n}=e?await this.fin.System.getEntityInfo(e.uuid,e.name):this.fin.me;return t.dispatch(\"get-window-context\",{target:e||{uuid:this.fin.me.uuid,name:this.fin.me.name},entityType:n})}async closeWindow(e,t={skipBeforeUnload:!1}){this.wire.sendAction(\"platform-close-window\",this.identity).catch((e=>{}));return(await this.getClient()).dispatch(\"close-window\",{windowId:e,options:t})}}Mn.Platform=Fn,xn=new WeakMap;var jn={},kn={},Ln={},Tn={};function $n(e){switch(e){case\"columns\":case\"grid\":case\"rows\":case\"tabs\":return!0;default:return!1}}Object.defineProperty(Tn,\"__esModule\",{value:!0}),Tn.overrideFromComposables=Tn.isValidPresetType=void 0,Tn.isValidPresetType=$n,Tn.overrideFromComposables=function(...e){return t=>e.reduceRight(((e,t)=>n=>t(e(n))),(e=>e))(t)},Tn.default={isValidPresetType:$n};var Bn={},Gn={},Wn={};Object.defineProperty(Wn,\"__esModule\",{value:!0}),Wn.ApiConsumer=void 0;Wn.ApiConsumer=class{constructor(e){this.strategy=e,this.consume=async e=>(await this.strategy.getExposedFunctions(e)).reduce(((t,n)=>({...t,[n.key]:this.strategy.createFunction(n,e)})),{})}};var Hn={},Nn={};Object.defineProperty(Nn,\"__esModule\",{value:!0}),Nn.expose=Nn.getExposedProperties=void 0;const Dn=Symbol(\"exposedProperties\");Nn.getExposedProperties=e=>e[Dn]||e.prototype[Dn]||[];Nn.expose=e=>(t,n,i)=>{t[Dn]=t[Dn]||[],t[Dn].push({key:n,descriptor:i,options:e})},Object.defineProperty(Hn,\"__esModule\",{value:!0}),Hn.ApiExposer=void 0;const Un=Nn;Hn.ApiExposer=class{constructor(e){this.strategy=e,this.exposeInstance=async(e,t)=>{const n=(0,Un.getExposedProperties)(e),i=await Promise.all(n.map((async({key:n,options:i})=>({key:n,options:await this.strategy.exposeFunction(e[n].bind(e),{key:n,options:i,meta:t})}))));await this.strategy.exposeMeta(t,i)}}};var Vn={},zn={},Kn={};Object.defineProperty(Kn,\"__esModule\",{value:!0}),Kn.ChannelsConsumer=void 0;Kn.ChannelsConsumer=class{constructor(e){this.channel=e,this.getExposedFunctions=async e=>{const{id:t}=e,{props:n}=await this.channel.dispatch(`api-meta:${t}`);return n},this.createFunction=e=>(...t)=>{const{action:n}=e.options;return this.channel.dispatch(n,{args:t})}}};var qn={};Object.defineProperty(qn,\"__esModule\",{value:!0}),qn.ChannelsExposer=void 0;qn.ChannelsExposer=class{constructor(e){this.channelProviderOrClient=e,this.exposeFunction=async(e,t)=>{const{key:n,options:i,meta:r}=t,{id:o}=r,s=`${o}.${i?.action||n}`;return await this.channelProviderOrClient.register(s,(async({args:t})=>e(...t))),{action:s}},this.exposeMeta=async({id:e},t)=>{const n=`api-meta:${e}`;await this.channelProviderOrClient.register(n,(()=>({props:t})))}}},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Kn,e),n(qn,e)}(zn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(zn,e)}(Vn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Wn,e),n(Hn,e),n(Vn,e),n(Nn,e)}(Gn);var Jn={};Object.defineProperty(Jn,\"__esModule\",{value:!0}),Jn.createRelayedDispatch=exports.relayChannelClientApi_1=Jn.relayChannelClientApi=void 0;const Yn=[\"no longer connected\",\"RTCDataChannel closed unexpectedly\",\"The client you are trying to dispatch from is disconnected from the target provider\"];exports.relayChannelClientApi_1=Jn.relayChannelClientApi=async(e,t)=>{e.register(`relay:${t}`,(({action:t,target:n,payload:i})=>e.dispatch(n,t,i))),await Promise.resolve()};Jn.createRelayedDispatch=(e,t,n,i)=>async(r,o)=>{try{return await e.dispatch(`relay:${n}`,{action:r,payload:o,target:t})}catch(e){if(s=e.message,Yn.some((e=>s.includes(e)))&&i)throw new Error(i);throw e}var s};var Zn,Qn,Xn,ei=s&&s.__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},ti=s&&s.__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)};Object.defineProperty(Bn,\"__esModule\",{value:!0}),Bn.ColumnOrRow=Bn.TabStack=Bn.LayoutNode=void 0;const ni=Gn,ii=Jn;class ri{constructor(e,t){Zn.set(this,void 0),this.isRoot=()=>ti(this,Zn,\"f\").isRoot(this.entityId),this.exists=()=>ti(this,Zn,\"f\").exists(this.entityId),this.getParent=async()=>{const e=await ti(this,Zn,\"f\").getParent(this.entityId);if(e)return ri.getEntity(e,ti(this,Zn,\"f\"))},this.createAdjacentStack=async(e,t)=>{const n=await ti(this,Zn,\"f\").createAdjacentStack(this.entityId,e,t);return ri.getEntity({entityId:n,type:\"stack\"},ti(this,Zn,\"f\"))},this.getAdjacentStacks=async e=>(await ti(this,Zn,\"f\").getAdjacentStacks({targetId:this.entityId,edge:e})).map((e=>ri.getEntity({type:\"stack\",entityId:e.entityId},ti(this,Zn,\"f\")))),ei(this,Zn,e,\"f\"),this.entityId=t}}Bn.LayoutNode=ri,Zn=new WeakMap,ri.newLayoutEntitiesClient=async(e,t,n)=>{const i=(0,ii.createRelayedDispatch)(e,n,\"layout-relay\",\"You are trying to interact with a layout component on a window that does not exist or has been destroyed.\");return new ni.ApiConsumer(new ni.ChannelsConsumer({dispatch:i})).consume({id:t})},ri.getEntity=(e,t)=>{const{entityId:n,type:i}=e;switch(i){case\"column\":case\"row\":return new si(t,n,i);case\"stack\":return new oi(t,n);default:throw new Error(`Unrecognised Layout Entity encountered ('${JSON.stringify(e)})`)}};class oi extends ri{constructor(e,t){super(e,t),Qn.set(this,void 0),this.type=\"stack\",this.getViews=()=>ti(this,Qn,\"f\").getStackViews(this.entityId),this.addView=async(e,t={index:0})=>ti(this,Qn,\"f\").addViewToStack(this.entityId,e,t),this.removeView=async e=>{await ti(this,Qn,\"f\").removeViewFromStack(this.entityId,e)},this.setActiveView=async e=>{await ti(this,Qn,\"f\").setStackActiveView(this.entityId,e)},ei(this,Qn,e,\"f\")}}Bn.TabStack=oi,Qn=new WeakMap;class si extends ri{constructor(e,t,n){super(e,t),Xn.set(this,void 0),this.getContent=async()=>(await ti(this,Xn,\"f\").getContent(this.entityId)).map((e=>ri.getEntity(e,ti(this,Xn,\"f\")))),ei(this,Xn,e,\"f\"),this.type=n}}Bn.ColumnOrRow=si,Xn=new WeakMap;var ai={};Object.defineProperty(ai,\"__esModule\",{value:!0}),ai.DEFAULT_LAYOUT_KEY=ai.LAYOUT_CONTROLLER_ID=void 0,ai.LAYOUT_CONTROLLER_ID=\"layout-entities\",ai.DEFAULT_LAYOUT_KEY=\"__default__\";var ci,di,hi,li=s&&s.__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)};Object.defineProperty(Ln,\"__esModule\",{value:!0}),Ln.Layout=void 0;const ui=G,pi=O,wi=d,yi=Tn,fi=Bn,gi=ai;class mi extends wi.Base{static getClient(e){return li(e,di,\"f\").getValue()}constructor(e,t){super(t),ci.add(this),di.set(this,new ui.Lazy((async()=>fi.LayoutNode.newLayoutEntitiesClient(await this.platform.getClient(),gi.LAYOUT_CONTROLLER_ID,this.identity)))),this.replace=async e=>{this.wire.sendAction(\"layout-replace\").catch((e=>{}));const t=await this.platform.getClient();await t.dispatch(\"replace-layout\",{target:this.identity,opts:{layout:e}})},this.replaceView=async(e,t)=>{this.wire.sendAction(\"layout-replace-view\").catch((e=>{}));const n=await this.platform.getClient();await n.dispatch(\"replace-view\",{target:this.identity,opts:{viewToReplace:e,newView:t}})},this.applyPreset=async e=>{this.wire.sendAction(\"layout-apply-preset\").catch((e=>{}));const t=await this.platform.getClient(),{presetType:n}=e;if(!n||!(0,yi.isValidPresetType)(n))throw new Error(\"Cannot apply preset layout, please include an applicable presetType property in the PresetLayoutOptions.\");await t.dispatch(\"apply-preset-layout\",{target:this.identity,opts:{presetType:n}})};const n=(0,pi.validateIdentity)(e);if(n)throw new Error(n);this.identity=e,this.platform=this.fin.Platform.wrapSync({uuid:e.uuid}),e.uuid===this.fin.me.uuid&&e.name===this.fin.me.name&&(this.init=this.fin.Platform.Layout.init)}async getConfig(){this.wire.sendAction(\"layout-get-config\").catch((e=>{}));return(await this.platform.getClient()).dispatch(\"get-frame-snapshot\",{target:this.identity})}async getCurrentViews(){this.wire.sendAction(\"layout-get-views\").catch((e=>{}));const e=await this.platform.getClient();return(await e.dispatch(\"get-layout-views\",{target:this.identity})).map((e=>this.fin.View.wrapSync(e)))}async getRootItem(){this.wire.sendAction(\"layout-get-root-item\").catch((()=>{}));const e=await li(this,di,\"f\").getValue(),t=await e.getRoot(\"layoutName\"in this.identity?this.identity:void 0);return fi.LayoutNode.getEntity(t,e)}async getStackByViewIdentity(e){this.wire.sendAction(\"layout-get-stack-by-view\").catch((()=>{}));const t=await li(this,di,\"f\").getValue(),n=await t.getStackByView(e);if(!n)throw new Error(`No stack found for view: ${e.uuid}/${e.name}`);return fi.LayoutNode.getEntity(n,t)}async addView(e,{location:t,targetView:n}={}){this.wire.sendAction(\"layout-add-view\").catch((e=>{}));const{identity:i}=await li(this,ci,\"m\",hi).call(this,\"layout-add-view\",{viewOptions:e,location:t,targetView:n});return{identity:i}}async closeView(e){this.wire.sendAction(\"layout-close-view\").catch((e=>{})),await li(this,ci,\"m\",hi).call(this,\"layout-close-view\",{viewIdentity:e})}}Ln.Layout=mi,di=new WeakMap,ci=new WeakSet,hi=async function(e,t){return(await this.platform.getClient()).dispatch(e,{target:this.identity,opts:t})};var vi,Ci,bi,Ii,Ei,xi=s&&s.__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)},Ai=s&&s.__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};Object.defineProperty(kn,\"__esModule\",{value:!0}),kn.LayoutModule=void 0;const Pi=d,Mi=Ln,_i=ai;class Oi extends Pi.Base{constructor(){super(...arguments),vi.add(this),Ci.set(this,!1),bi.set(this,null),this.init=async(e={})=>{if(this.wire.sendAction(\"layout-init\").catch((e=>{})),!this.wire.environment.layoutAllowedInContext(this.fin))throw new Error(\"Layout.init can only be called from a Window context.\");if(xi(this,Ci,\"f\"))throw new Error(\"Layout.init was already called, please use Layout.create to add additional layouts.\");\"openfin\"===this.wire.environment.type&&await this.fin.Platform.getCurrentSync().getClient(),Ai(this,Ci,!0,\"f\"),Ai(this,bi,await this.wire.environment.initLayoutManager(this.fin,this.wire,e),\"f\"),await this.wire.environment.applyLayoutSnapshot(this.fin,xi(this,bi,\"f\"),e);const t={name:this.fin.me.name,uuid:this.fin.me.uuid};if(!e.layoutManagerOverride){const e={layoutName:_i.DEFAULT_LAYOUT_KEY,...t};return xi(this,Ii,\"f\").call(this,e)}return this.wrapSync(t)},Ii.set(this,(e=>{const t=\"[Layout] You are using a deprecated property `layoutManager` - it will throw if you access it starting in v37.\",n=new Proxy({},{get(e,n){throw console.warn(`[Layout-mgr-proxy] accessing ${n.toString()}`),new Error(t)}}),i=Object.assign(this.wrapSync(e),{layoutManager:n});return new Proxy(i,{get(e,n){if(\"layoutManager\"===n)throw console.warn(`[Layout-proxy] accessing ${n.toString()}`),new Error(t);return e[n]}})})),this.getCurrentLayoutManagerSync=()=>xi(this,vi,\"m\",Ei).call(this,\"fin.Platform.Layout.getCurrentLayoutManagerSync()\"),this.create=async e=>this.wire.environment.createLayout(xi(this,vi,\"m\",Ei).call(this,\"fin.Platform.Layout.create()\"),e),this.destroy=async e=>this.wire.environment.destroyLayout(xi(this,vi,\"m\",Ei).call(this,\"fin.Platform.Layout.destroy()\"),e)}async wrap(e){return this.wire.sendAction(\"layout-wrap\").catch((e=>{})),new Mi.Layout(e,this.wire)}wrapSync(e){return this.wire.sendAction(\"layout-wrap-sync\").catch((e=>{})),new Mi.Layout(e,this.wire)}async getCurrent(){if(this.wire.sendAction(\"layout-get-current\").catch((e=>{})),\"openfin\"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error(\"You are not in a Window context. Only Windows can have a Layout.\");const{uuid:e,name:t}=this.fin.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction(\"layout-get-current-sync\").catch((e=>{})),\"openfin\"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error(\"You are not in a Window context. Only Windows can have a Layout.\");const{uuid:e,name:t}=this.fin.me;return this.wrapSync({uuid:e,name:t})}async getLayoutByViewIdentity(e){this.wire.sendAction(\"layout-get-by-view-identity\").catch((()=>{}));let t=await this.wire.environment.getViewWindowIdentity(this.fin,e);t.identity&&(t=t.identity);try{const n=this.wrapSync(t),i=await Mi.Layout.getClient(n),r=await i.getLayoutIdentityForViewOrThrow(e);return this.wrapSync(r)}catch(n){if(![\"No action registered at target for\",\"getLayoutIdentityForViewOrThrow is not a function\"].some((e=>n.message.includes(e))))throw n;if(t.uuid===t.name)throw new Error(`View identity ${JSON.stringify(e)} is not attached to any layout in provider window ${JSON.stringify(t)}.`);return this.wrapSync(t)}}}kn.LayoutModule=Oi,Ci=new WeakMap,bi=new WeakMap,Ii=new WeakMap,vi=new WeakSet,Ei=function(e){if(!xi(this,bi,\"f\"))throw new Error(`You must call init before using the API ${e}`);return xi(this,bi,\"f\")},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(kn,e),n(Ln,e)}(jn),Object.defineProperty(Pn,\"__esModule\",{value:!0}),Pn.PlatformModule=void 0;const Si=d,Ri=Mn,Fi=jn;class ji extends Si.Base{constructor(e,t){super(e),this._channel=t,this.Layout=new Fi.LayoutModule(this.wire)}async init(e){if(!fin.__internal_.isPlatform||fin.me.name!==fin.me.uuid)throw new Error(\"fin.Platform.init should only be called from a custom platform provider running in the main window of the application.\");return this.wire.environment.initPlatform(this.fin,e)}async wrap(e){return this.wire.sendAction(\"platform-wrap\").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}wrapSync(e){return this.wire.sendAction(\"platform-wrap-sync\").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}async getCurrent(){return this.wire.sendAction(\"platform-get-current\").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction(\"platform-get-current-sync\").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}start(e){return this.wire.sendAction(\"platform-start\").catch((e=>{})),new Promise((async(t,n)=>{try{const{uuid:n}=e,i=await this.fin.Application._create({...e,isPlatformController:!0});i.once(\"platform-api-ready\",(()=>t(this.wrapSync({uuid:n})))),i._run({uuid:n})}catch(e){n(e)}}))}startFromManifest(e,t){return this.wire.sendAction(\"platform-start-from-manifest\").catch((e=>{})),new Promise((async(n,i)=>{try{const i=await this.fin.Application._createFromManifest(e);i.once(\"platform-api-ready\",(()=>n(this.wrapSync({uuid:i.identity.uuid})))),i._run(t)}catch(e){i(e)}}))}}Pn.PlatformModule=ji,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Pn,e),n(Mn,e)}(An);var ki={};!function(e){Object.defineProperty(e,\"__esModule\",{value:!0}),e.getMe=e.getBaseMe=e.environmentUnsupportedMessage=void 0;const t=J(),n=un,i=ie(),r=rn;function o(e,t,n){return{...{isView:\"view\"===e,isWindow:\"window\"===e,isFrame:\"iframe\"===e,isExternal:\"external connection\"===e},uuid:t,name:n,entityType:e}}e.environmentUnsupportedMessage=\"You are not running in OpenFin.\",e.getBaseMe=o,e.getMe=function(s){const{uuid:a,name:c,entityType:d}=s.me,h={setContext(){throw new Error(e.environmentUnsupportedMessage)},addContextHandler(){throw new Error(e.environmentUnsupportedMessage)},getContextGroups(){throw new Error(e.environmentUnsupportedMessage)},joinContextGroup(){throw new Error(e.environmentUnsupportedMessage)},removeFromContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getAllClientsInContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getInfoForContextGroup(){throw new Error(e.environmentUnsupportedMessage)}},l=\"Interop API has not been instantiated. Either connection has failed or you have not declared interop in your config.\",u={setContext(){throw new Error(l)},addContextHandler(){throw new Error(l)},getContextGroups(){throw new Error(l)},joinContextGroup(){throw new Error(l)},removeFromContextGroup(){throw new Error(l)},getAllClientsInContextGroup(){throw new Error(l)},getInfoForContextGroup(){throw new Error(l)}},p={eventNames:()=>{throw new Error(e.environmentUnsupportedMessage)},emit:()=>{throw new Error(e.environmentUnsupportedMessage)},listeners:()=>{throw new Error(e.environmentUnsupportedMessage)},listenerCount:()=>{throw new Error(e.environmentUnsupportedMessage)},on:()=>{throw new Error(e.environmentUnsupportedMessage)},addListener:()=>{throw new Error(e.environmentUnsupportedMessage)},once:()=>{throw new Error(e.environmentUnsupportedMessage)},prependListener:()=>{throw new Error(e.environmentUnsupportedMessage)},prependOnceListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeAllListeners:()=>{throw new Error(e.environmentUnsupportedMessage)}};switch(d){case\"view\":return Object.assign(new t.View(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case\"window\":return Object.assign(new i._Window(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case\"iframe\":return Object.assign(new n._Frame(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case\"external connection\":return Object.assign(new r.ExternalApplication(s,{uuid:a}),o(d,a,c),{interop:u,isOpenFin:!1});default:return{...o(d,a,c),...p,interop:h,isOpenFin:!1}}}}(ki);var Li={},Ti={},$i={};Object.defineProperty($i,\"__esModule\",{value:!0}),$i.createWarningObject=$i.createUnusableObject=void 0,$i.createUnusableObject=function(e){const t=()=>{throw new Error(e)};return new Proxy({},{apply:t,construct:t,defineProperty:t,deleteProperty:t,get:t,getOwnPropertyDescriptor:t,getPrototypeOf:t,has:t,isExtensible:t,ownKeys:t,preventExtensions:t,set:t,setPrototypeOf:t})},$i.createWarningObject=function(e,t){return new Proxy(t,{get:(...t)=>(console.warn(e),Reflect.get(...t)),set:(...t)=>(console.warn(e),Reflect.set(...t)),getOwnPropertyDescriptor:(...t)=>(console.warn(e),Reflect.getOwnPropertyDescriptor(...t)),ownKeys:(...t)=>(console.warn(e),Reflect.ownKeys(...t))})};var Bi,Gi={},Wi={};var Hi={};!function(e){Object.defineProperty(e,\"__esModule\",{value:!0}),e.wrapIntentHandler=e.BROKER_ERRORS=e.generateOverrideWarning=e.generateOverrideError=e.wrapContextHandler=e.wrapInTryCatch=e.generateId=void 0;e.generateId=()=>`${Math.random()}${Date.now()}`;e.wrapInTryCatch=(e,t)=>(...n)=>{try{return e(...n)}catch(e){throw new Error((t||\"\")+e)}};e.wrapContextHandler=(e,t)=>async n=>{try{await e(n)}catch(e){throw console.error(`Error thrown by handler ${t} for context type ${n.type}: ${e}`),e}};e.generateOverrideError=(e,t)=>`You have tried to to use ${e} but ${t} has not been overridden in the Interop Broker. Please override this function. Refer to our documentation for more info.`;e.generateOverrideWarning=(e,t,n,i)=>{const{uuid:r,name:o}=n;return i?`Entity with identity: ${r}/${o} has called ${i} or ${e} but ${t} has not been overridden.`:`Entity with identity: ${r}/${o} has called ${e} but ${t} has not been overridden.`},e.BROKER_ERRORS={fireIntent:(0,e.generateOverrideError)(\"fireIntent\",\"handleFiredIntent\"),fireIntentForContext:(0,e.generateOverrideError)(\"fireIntentForContext\",\"handleFiredIntentForContext\"),getInfoForIntent:(0,e.generateOverrideError)(\"getInfoForIntent\",\"handleInfoForIntent\"),getInfoForIntentsByContext:(0,e.generateOverrideError)(\"getInfoForIntentsByContext\",\"handleInfoForIntentsByContext\"),joinSessionContextGroupWithJoinContextGroup:\"The Context Group you have tried to join is a Session Context Group. Custom Context Groups can only be defined by the Interop Broker through code or manifest configuration. Please use joinSessionContextGroup.\",fdc3Open:(0,e.generateOverrideError)(\"fdc3.open\",\"fdc3HandleOpen\"),fdc3FindInstances:(0,e.generateOverrideError)(\"fdc3.findInstances\",\"fdc3HandleFindInstances\"),fdc3GetAppMetadata:(0,e.generateOverrideError)(\"fdc3.getAppMetadata\",\"fdc3HandleGetAppMetadata\"),fdc3GetInfo:(0,e.generateOverrideError)(\"fdc3.getInfo\",\"fdc3HandleGetInfo\")};e.wrapIntentHandler=(e,t)=>async n=>{try{return e(n)}catch(e){throw console.error(`Error thrown by handler ${t}: ${e}`),e}}}(Hi);var Ni,Di,Ui={};function Vi(){if(Di)return Gi;Di=1;var e,t,n,r=s&&s.__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},o=s&&s.__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)},a=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Gi,\"__esModule\",{value:!0}),Gi.InteropBroker=void 0;const c=d,h=a(function(){if(Bi)return Wi;Bi=1,Object.defineProperty(Wi,\"__esModule\",{value:!0});const e=Cr();return Wi.default=class{constructor(e,t){this.provider=e,this.id=t,this.lastContext=void 0,this.contextGroupMap=new Map,this.clients=new Map,this.registerListeners()}registerListeners(){this.provider.register(`sessionContextGroup:getContext-${this.id}`,this.getCurrentContext.bind(this)),this.provider.register(`sessionContextGroup:setContext-${this.id}`,this.setContext.bind(this)),this.provider.register(`sessionContextGroup:handlerAdded-${this.id}`,this.handlerAdded.bind(this)),this.provider.register(`sessionContextGroup:handlerRemoved-${this.id}`,this.handlerRemoved.bind(this))}getCurrentContext(e){return e.type?this.contextGroupMap.get(e.type):this.lastContext}setContext(t,n){const{context:i}=t,r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name} not in Session Client State Map`);this.contextGroupMap.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{e.contextHandlers.get(i.type)?.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getClientState(e){return this.clients.get(e.endpointId)}async handlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(i){const e=r.contextHandlers.get(i)||[];r.contextHandlers.set(i,[...e,n]);const o=this.contextGroupMap.get(i);o&&await this.provider.dispatch(t,n,o)}else{r.globalHandler=n;const e=[...this.contextGroupMap.keys()].map((async e=>{const i=this.contextGroupMap.get(e);i&&await this.provider.dispatch(t,n,i)}));await Promise.all(e)}}handlerRemoved(e,t){const{handlerId:n}=e,i=this.clients.get(t.endpointId);i?(Array.from(i.contextHandlers).forEach((([,e])=>{const t=e.indexOf(n);t>-1&&e.splice(t,1)})),i.globalHandler===n&&(i.globalHandler=void 0)):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={contextHandlers:new Map,clientIdentity:e,globalHandler:void 0};this.clients.set(e.endpointId,t)}}onDisconnection(e){this.clients.delete(e.endpointId)}},Wi}()),l=Hi,u=a(i),p=function(){if(Ni)return Ui;Ni=1,Object.defineProperty(Ui,\"__esModule\",{value:!0}),Ui.PrivateChannelProvider=void 0;const e=Vi();return Ui.PrivateChannelProvider=class t{constructor(e,t){this.provider=e,this.id=t,this.clients=new Map,this.registerListeners(),this.contextByContextType=new Map,this.lastContext=void 0,this.provider.onConnection((e=>this.registerNewClient(e))),this.provider.onDisconnection((async e=>{const{endpointId:t}=e;this.clients.has(t)&&await this.handleClientDisconnecting(e),0===(await this.provider.getAllClientInfo()).length&&this.provider.destroy()}))}getClientState(e){return this.clients.get(e.endpointId)}registerListeners(){this.provider.register(\"broadcast\",this.broadcast.bind(this)),this.provider.register(\"getCurrentContext\",this.getCurrentContext.bind(this)),this.provider.register(\"contextHandlerAdded\",this.contextHandlerAdded.bind(this)),this.provider.register(\"contextHandlerRemoved\",this.contextHandlerRemoved.bind(this)),this.provider.register(\"nonStandardHandlerRemoved\",this.nonStandardHandlerRemoved.bind(this)),this.provider.register(\"onAddContextHandlerAdded\",this.onAddContextHandlerAdded.bind(this)),this.provider.register(\"onDisconnectHandlerAdded\",this.onDisconnectHandlerAdded.bind(this)),this.provider.register(\"onUnsubscribeHandlerAdded\",this.onUnsubscribeHandlerAdded.bind(this)),this.provider.register(\"clientDisconnecting\",((e,t)=>{this.handleClientDisconnecting(t)}))}broadcast(t,n){const{context:i}=t;if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name}, tried to call broadcast, is not connected to this Private Channel`);const r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to broadcast - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);this.contextByContextType.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{const t=e.handlerIdsByContextTypes.get(i.type);t&&t.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getCurrentContext(e,t){const{contextType:n}=e;if(!this.getClientState(t))throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call getCurrentContext, is not connected to this Private Channel`);if(void 0!==n){return this.contextByContextType.get(n)||null}return this.lastContext?this.lastContext:null}contextHandlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call addContextListener, is not connected to this Private Channel`);if(i){const e=r.handlerIdsByContextTypes.get(i)||[];r.handlerIdsByContextTypes.set(i,[...e,n])}else r.globalHandler=n;Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&e.onAddContextListenerHandlerId&&this.provider.dispatch(e.clientIdentity,e.onAddContextListenerHandlerId,i)}))}async contextHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);if(i){let e;if(i.globalHandler===n)i.globalHandler=void 0;else for(const[t,r]of i.handlerIdsByContextTypes){const i=r.indexOf(n);i>-1&&(r.splice(i,1),e=t)}const r=(await this.getConnectedClients()).map((async n=>{const{clientIdentity:i,clientIdentity:{endpointId:r},onUnsubscribeHandlerId:o}=n;r!==t.endpointId&&o&&await this.provider.dispatch(i,o,e)}));try{await Promise.all(r)}catch(e){throw console.error(`Problem when attempting to dispatch to onUnsubscribeHandlers. Error: ${e} Removing Client: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}`),new Error(e)}}else console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}.`)}nonStandardHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);i?i.onDisconnectHandlerId===n?i.onDisconnectHandlerId=void 0:i.onAddContextListenerHandlerId===n?i.onAddContextListenerHandlerId=void 0:i.onUnsubscribeHandlerId===n&&(i.onUnsubscribeHandlerId=void 0):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}onAddContextHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onAddContextListener, is not connected to this Private Channel`);n.onAddContextListenerHandlerId=i,Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&Array.from(e.handlerIdsByContextTypes.keys()).forEach((e=>{this.provider.dispatch(t,i,e)}))}))}onDisconnectHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onDisconnect, is not connected to this Private Channel`);n.onDisconnectHandlerId=i}onUnsubscribeHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onUnsubscribe, is not connected to this Private Channel`);n.onUnsubscribeHandlerId=i}removeClient(e){const t=this.getClientState(e);if(!t)throw new Error(`Client with Identity: ${e.uuid} ${e.name}, tried to call disconnect, is not connected to this Private Channel`);t.handlerIdsByContextTypes.clear(),this.clients.delete(e.endpointId)}async fireOnDisconnectForOtherClients(e){const{endpointId:t}=e,n=(await this.getConnectedClients()).map((async e=>{const{clientIdentity:{endpointId:n},onDisconnectHandlerId:i}=e;n!==t&&i&&await this.provider.dispatch(e.clientIdentity,i)}));try{await Promise.all(n)}catch(t){throw console.error(`Problem when attempting to dispatch to onDisconnectHandlers. Error: ${t} Disconnecting Client: uuid: ${e.uuid}. name: ${e.name}. endpointId: ${e.endpointId}`),new Error(t)}}async unsubscribeAll(e){const{endpointId:t}=e,n=this.clients.get(t);if(n){const t=Array.from(n.handlerIdsByContextTypes.values()).flat(),i=n.globalHandler;if(t.length>0){const n=t.map((async t=>this.contextHandlerRemoved({handlerId:t},e)));try{await Promise.all(n)}catch(e){console.error(e.message)}}if(i)try{await this.contextHandlerRemoved({handlerId:i},e)}catch(e){console.error(e.message)}}}async handleClientDisconnecting(e){await this.unsubscribeAll(e),this.removeClient(e),await this.fireOnDisconnectForOtherClients(e)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={clientIdentity:e,handlerIdsByContextTypes:new Map,globalHandler:void 0,onAddContextListenerHandlerId:void 0,onUnsubscribeHandlerId:void 0,onDisconnectHandlerId:void 0};this.clients.set(e.endpointId,t)}}async getConnectedClients(){const e=await this.provider.getAllClientInfo();return Array.from(this.clients.values()).filter((t=>{const{uuid:n,name:i}=t.clientIdentity;return e.some((e=>i===e.name&&n===e.uuid))}))}static init(e,n){return new t(e,n)}},Ui}(),w=G,y=[{id:\"green\",displayMetadata:{color:\"#00CC88\",name:\"green\"}},{id:\"purple\",displayMetadata:{color:\"#8C61FF\",name:\"purple\"}},{id:\"orange\",displayMetadata:{color:\"#FF8C4C\",name:\"orange\"}},{id:\"red\",displayMetadata:{color:\"#FF5E60\",name:\"red\"}},{id:\"pink\",displayMetadata:{color:\"#FF8FB8\",name:\"pink\"}},{id:\"yellow\",displayMetadata:{color:\"#E9FF8F\",name:\"yellow\"}}];let f=class i extends c.Base{constructor(i,s,a){super(i),e.set(this,void 0),t.set(this,void 0),n.set(this,void 0),this.getProvider=()=>o(this,n,\"f\").getValue(),this.interopClients=new Map,this.contextGroupsById=new Map,r(this,t,a.contextGroups??[...y],\"f\"),r(this,e,a.fdc3Info,\"f\"),a?.logging&&(this.logging=a.logging),this.intentClientMap=new Map,this.lastContextMap=new Map,this.sessionContextGroupMap=new Map,r(this,n,new w.Lazy(s),\"f\"),this.setContextGroupMap(),this.setupChannelProvider()}static createClosedConstructor(...e){return class extends i{constructor(...t){if(t.length){const[n,i,r]=t;if(r&&\"object\"==typeof r&&!(0,u.default)(r,e[2]))return console.warn(\"You have modified the parameters of the InteropOverride constructor. This behavior is deprecated and will be removed in a future version. You can modify these options in your manifest. Please consult our Interop docs for guidance on migrating to the new override scheme.\"),void super(e[0],e[1],r);console.warn(\"You are attempting to pass arguments to the InteropOverride constructor. This is not necessary, and these passed arguments will be ignored. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.\")}super(...e)}}}setContext({context:e},t){this.wire.sendAction(\"interop-broker-set-context\").catch((e=>{}));const n=this.getClientState(t);if(!n||!n.contextGroupId)throw n?new Error(\"You must join a context group before you can set context.\"):new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);{const{contextGroupId:t}=n;this.setContextForGroup({context:e},t)}}setContextForGroup({context:e},t){this.wire.sendAction(\"interop-broker-set-context-for-group\").catch((e=>{}));const n=this.contextGroupsById.get(t);if(!n)throw new Error(`Unable to set context for context group that isn't in the context group mapping: ${t}.`);const r=i.checkContextIntegrity(e);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(e)}`);const o=e.type;n.set(o,e),this.lastContextMap.set(t,o);Array.from(this.interopClients.values()).filter((e=>e.contextGroupId===t)).forEach((t=>{for(const[,n]of t.contextHandlers)i.isContextTypeCompatible(o,n.contextType)&&this.invokeContextHandler(t.clientIdentity,n.handlerId,e)}))}getCurrentContext(e,t){this.wire.sendAction(\"interop-broker-get-current-context\").catch((e=>{}));const n=this.getClientState(t);if(!n?.contextGroupId)throw new Error(\"You must be a member of a context group to call getCurrentContext\");const{contextGroupId:i}=n,r=this.contextGroupsById.get(i),o=this.lastContextMap.get(i),s=e?.contextType??o;return r&&s?r.get(s):void 0}async joinContextGroup({contextGroupId:e,target:t},n){if(this.wire.sendAction(\"interop-broker-join-context-group\").catch((e=>{})),this.sessionContextGroupMap.has(e))throw new Error(l.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup);if(t){i.hasEndpointId(t)&&await this.addClientToContextGroup({contextGroupId:e},t);try{const n=this.channel.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name));if(!n.length)throw new Error(`Given Identity ${t.uuid} ${t.name} is not connected to the Interop Broker.`);n.length>1&&console.warn(`More than one connection found for identity ${t.uuid} ${t.name}`);const i=[];for(const t of n)i.push(this.addClientToContextGroup({contextGroupId:e},t));await Promise.all(i)}catch(e){throw new Error(e)}}else await this.addClientToContextGroup({contextGroupId:e},n)}async addClientToContextGroup({contextGroupId:e},t){this.wire.sendAction(\"interop-broker-add-client-to-context-group\").catch((e=>{}));const n=this.getClientState(t);if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(!this.getContextGroups().find((t=>t.id===e)))throw new Error(`Attempting to join a context group that does not exist: ${e}. You may only join existing context groups.`);if(n.contextGroupId!==e){n.contextGroupId=e,await this.setCurrentContextGroupInClientOptions(t,e);const i=this.contextGroupsById.get(e);for(const[,e]of n.contextHandlers){const{contextType:n,handlerId:r}=e;if(void 0===n)i.forEach(((e,n)=>{this.invokeContextHandler(t,r,e)}));else if(i.has(n)){const e=i.get(n);e&&this.invokeContextHandler(t,r,e)}}}}async removeFromContextGroup({target:e},t){if(this.wire.sendAction(\"interop-broker-remove-from-context-group\").catch((e=>{})),e){i.hasEndpointId(e)&&await this.removeClientFromContextGroup(e);try{const t=this.channel.connections.filter((t=>t.uuid===e.uuid&&t.name===e.name));if(!t.length)throw new Error(`No connection found for given Identity ${e.uuid} ${e.name}`);t.length>1&&console.warn(`More than one connection found for identity ${e.uuid} ${e.name}`);const n=[];for(const e of t)n.push(this.removeClientFromContextGroup(e));await Promise.all(n)}catch(e){throw new Error(e)}}else await this.removeClientFromContextGroup(t)}async removeClientFromContextGroup(e){this.wire.sendAction(\"interop-broker-remove-client-from-context-group\").catch((e=>{}));const t=this.getClientState(e);t&&(t.contextGroupId=void 0),await this.setCurrentContextGroupInClientOptions(e,null)}getContextGroups(){return this.wire.sendAction(\"interop-broker-get-context-groups\").catch((e=>{})),o(this,t,\"f\").map((e=>({...e})))}getInfoForContextGroup({contextGroupId:e}){return this.wire.sendAction(\"interop-broker-get-info-for-context-group\").catch((e=>{})),this.getContextGroups().find((t=>t.id===e))}getAllClientsInContextGroup({contextGroupId:e}){this.wire.sendAction(\"interop-broker-get-all-clients-in-context-group\").catch((e=>{}));return Array.from(this.interopClients.values()).filter((t=>t.contextGroupId===e)).map((e=>e.clientIdentity))}async handleFiredIntent(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.raiseIntent\",\"InteropBroker.handleFiredIntent\",t,\"interopClient.fireIntent\");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntent)}async setIntentTarget(e,t){this.wire.sendAction(\"interop-broker-set-intent-target\").catch((e=>{}));const n=this.intentClientMap.get(t.name),i=`intent-handler-${e.name}`;if(n){const t=n.get(i);if(t){if(t.pendingIntents.push(e),t.clientIdentity&&t.isReady){const{clientIdentity:e,pendingIntents:n}=t;try{const r=n[n.length-1];await this.invokeIntentHandler(e,i,r),t.pendingIntents=[]}catch(n){console.error(`Error invoking intent handler for client ${e.uuid}/${e.name}/${e.endpointId}`),t.isReady=!1}}}else n.set(i,{isReady:!1,pendingIntents:[e]})}else{this.intentClientMap.set(t.name,new Map);const n=this.intentClientMap.get(t.name);n&&n.set(i,{isReady:!1,pendingIntents:[e]})}}async handleInfoForIntent(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.findIntent\",\"InteropBroker.handleInfoForIntent\",t,\"interopClient.getInfoForIntent\");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntent)}async handleInfoForIntentsByContext(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.findIntentsByContext\",\"InteropBroker.handleInfoForIntentsByContext\",t,\"interopClient.getInfoForIntentsByContext\");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntentsByContext)}async handleFiredIntentForContext(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.raiseIntentForContext\",\"InteropBroker.handleFiredIntentForContext\",t,\"interopClient.fireIntentForContext\");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntentForContext)}async clientDisconnected(e){}async fdc3HandleOpen({app:e,context:t},n){const i=(0,l.generateOverrideWarning)(\"fdc3.open\",\"InteropBroker.fdc3HandleOpen\",n);throw console.warn(i),new Error(l.BROKER_ERRORS.fdc3Open)}async fdc3HandleFindInstances(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.open\",\"InteropBroker.fdc3HandleFindInstances\",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3FindInstances)}async fdc3HandleGetAppMetadata(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.getAppMetadata\",\"InteropBroker.fdc3HandleGetAppMetadata\",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3GetAppMetadata)}async invokeContextHandler(e,t,n){const i=await this.getProvider();try{await i.dispatch(e,t,n)}catch(i){console.error(`Error invoking context handler ${t} for context type ${n.type} in client ${e.uuid}/${e.name}/${e.endpointId}`,i)}}async invokeIntentHandler(e,t,n){const i=await this.getProvider();await i.dispatch(e,t,n)}async fdc3HandleGetInfo(t,n){const{fdc3Version:i}=t;return{fdc3Version:i,...o(this,e,\"f\"),optionalFeatures:{OriginatingAppMetadata:!1,UserChannelMembershipAPIs:!0},appMetadata:{appId:\"\",instanceId:\"\"}}}async getAllClientInfo(){return(await this.getProvider()).getAllClientInfo()}decorateSnapshot(e){return{...e,interopSnapshotDetails:{contextGroupStates:this.getContextGroupStates()}}}applySnapshot(e,t){const n=e?.interopSnapshotDetails?.contextGroupStates;n&&(t?.closeExistingWindows||this.updateExistingClients(n),this.rehydrateContextGroupStates(n))}updateExistingClients(e){this.interopClients.forEach((t=>{const{clientIdentity:n,contextGroupId:r,contextHandlers:o}=t;if(r){const t=e[r];for(const[,e]of Object.entries(t))o.forEach((t=>{const{handlerId:r,contextType:o}=t;i.isContextTypeCompatible(e.type,o)&&this.invokeContextHandler(n,r,e)}))}}))}getContextGroupStates(){return i.toObject(this.contextGroupsById)}rehydrateContextGroupStates(e){const t=Object.entries(e);for(const[e,n]of t){const t=Object.entries(n);for(const[n,i]of t)if(this.contextGroupsById.has(e)){this.contextGroupsById.get(e).set(n,i)}else console.warn(`Attempting to set a context group that isn't in the context group mapping. Skipping context group rehydration for: ${e}`)}}contextHandlerRegistered({contextType:e,handlerId:t},n){const i={contextType:e,handlerId:t},r=this.getClientState(n);if(r?.contextHandlers.set(t,i),r&&r.contextGroupId){const{contextGroupId:i}=r,o=this.contextGroupsById.get(i);if(void 0===e)o.forEach(((e,i)=>{this.invokeContextHandler(n,t,e)}));else if(o.has(e)){const i=o.get(e);i&&this.invokeContextHandler(n,t,i)}}}async intentHandlerRegistered(e,t){const{handlerId:n}=e,i=this.intentClientMap.get(t.name),r=i?.get(n);if(i)if(r){const{pendingIntents:e}=r;r.clientIdentity=t,r.isReady=!0;try{if(e.length>0){const i=e[e.length-1];await this.invokeIntentHandler(t,n,i),r.pendingIntents=[]}}catch(e){console.error(`Error invoking intent handler: ${n} for client ${t.uuid}/${t.name}/${t.endpointId}`)}}else i.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t});else{this.intentClientMap.set(t.name,new Map);const e=this.intentClientMap.get(t.name);e&&e.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t})}}removeContextHandler({handlerId:e},t){const n=this.getClientState(t);n&&n.contextHandlers.delete(e)}handleJoinSessionContextGroup({sessionContextGroupId:e},t){try{if(!e)throw new Error(\"Failed to join session context group: must specify group id.\");const n=this.sessionContextGroupMap.get(e);if(n)n.registerNewClient(t);else{const n=new h.default(this.channel,e);n.registerNewClient(t),this.sessionContextGroupMap.set(e,n)}return{hasConflict:this.contextGroupsById.has(e)}}catch(e){throw new Error(e)}}getClientState(e){return this.interopClients.get(e.endpointId)}static toObject(e){const t=Object.fromEntries(e),n={};return Object.entries(t).forEach((([e,t])=>{const i=Object.fromEntries(t);n[e]=i})),n}static checkContextIntegrity(e){if(!e)return{isValid:!1,reason:\"No context supplied\"};if(\"object\"!=typeof e)return{isValid:!1,reason:\"Context must be an Object\"};if(!e.type)return{isValid:!1,reason:\"Context must have a type property\"};if(e.id&&\"object\"!=typeof e.id)return{isValid:!1,reason:\"Context id must be an Object populated with key-value identifiers (if set)\"};if(e.id){const{id:t}=e,n=Object.keys(t);let i=!1;if(!n.length)return{isValid:!1,reason:\"Context id must have at least one key-value identifier\"};if(n.forEach((e=>{\"string\"==typeof e&&\"string\"==typeof t[e]||(i=!0)})),i)return{isValid:!1,reason:\"Context id key-value identifiers must be of type string\"}}return e.name&&\"string\"!=typeof e.name?{isValid:!1,reason:\"Context name must be of string type (if set)\"}:{isValid:!0}}static hasEndpointId(e){return void 0!==e.endpointId}static isContextTypeCompatible(e,t){return void 0===t||e===t}setContextGroupMap(){for(const e of this.getContextGroups())this.contextGroupsById.set(e.id,new Map)}async setCurrentContextGroupInClientOptions(e,t){try{const n=await this.fin.System.getEntityInfo(e.uuid,e.name);let i;\"view\"===n.entityType?i=await this.fin.View.wrap(e):\"window\"===n.entityType&&(i=await this.fin.Window.wrap(e)),i&&await i.updateOptions({interop:{currentContextGroup:t}})}catch(e){}}async setupChannelProvider(){try{const e=await this.getProvider();this.channel=e,this.wireChannel(e)}catch(e){throw new Error(`Error setting up Interop Broker Channel Provider: ${e}`)}}wireChannel(e){e.onConnection((async(e,t)=>{if(!await this.isConnectionAuthorized(e,t))throw new Error(`Connection not authorized for ${e.uuid}, ${e.name}`);if(!e.endpointId)throw new Error(\"Version too old to be compatible with Interop. Please upgrade your runtime to a more recent version.\");const n={contextGroupId:void 0,contextHandlers:new Map,clientIdentity:e};t?.currentContextGroup&&this.contextGroupsById.has(t.currentContextGroup)&&(n.contextGroupId=t?.currentContextGroup),this.interopClients.set(e.endpointId,n)})),e.onDisconnection((e=>{this.interopClients.delete(e.endpointId);const t=this.intentClientMap.get(e.name);t&&e.uuid===this.fin.me.uuid&&t.forEach((e=>{e.isReady=!1})),this.sessionContextGroupMap.forEach((t=>{t.onDisconnection(e)})),this.clientDisconnected(e)})),e.beforeAction((async(e,t,n)=>{if(!await this.isActionAuthorized(e,t,n))throw new Error(`Action (${e}) not authorized for ${n.uuid}, ${n.name}`);this.logging?.beforeAction?.enabled&&console.log(e,t,n)})),e.afterAction(((e,t,n)=>{this.logging?.afterAction?.enabled&&console.log(e,t,n)})),e.register(\"setContext\",this.setContext.bind(this)),e.register(\"fireIntent\",this.handleFiredIntent.bind(this)),e.register(\"getCurrentContext\",this.getCurrentContext.bind(this)),e.register(\"getInfoForIntent\",this.handleInfoForIntent.bind(this)),e.register(\"getInfoForIntentsByContext\",this.handleInfoForIntentsByContext.bind(this)),e.register(\"fireIntentForContext\",this.handleFiredIntentForContext.bind(this)),e.register(\"getContextGroups\",this.getContextGroups.bind(this)),e.register(\"joinContextGroup\",this.joinContextGroup.bind(this)),e.register(\"removeFromContextGroup\",this.removeFromContextGroup.bind(this)),e.register(\"getAllClientsInContextGroup\",this.getAllClientsInContextGroup.bind(this)),e.register(\"getInfoForContextGroup\",this.getInfoForContextGroup.bind(this)),e.register(\"contextHandlerRegistered\",this.contextHandlerRegistered.bind(this)),e.register(\"intentHandlerRegistered\",this.intentHandlerRegistered.bind(this)),e.register(\"removeContextHandler\",this.removeContextHandler.bind(this)),e.register(\"sessionContextGroup:createIfNeeded\",this.handleJoinSessionContextGroup.bind(this)),e.register(\"fdc3Open\",this.fdc3HandleOpen.bind(this)),e.register(\"fdc3v2FindIntentsByContext\",this.handleInfoForIntentsByContext.bind(this)),e.register(\"fdc3FindInstances\",this.fdc3HandleFindInstances.bind(this)),e.register(\"fdc3GetAppMetadata\",this.fdc3HandleGetAppMetadata.bind(this)),e.register(\"fdc3v2GetInfo\",(async(e,t)=>this.fdc3HandleGetInfo.bind(this)(e,t))),e.register(\"createPrivateChannelProvider\",(async e=>{const{channelId:t}=e,n=await this.fin.InterApplicationBus.Channel.create(t);p.PrivateChannelProvider.init(n,t)}))}isConnectionAuthorized(e,t){return this.wire.sendAction(\"interop-broker-is-connection-authorized\").catch((e=>{})),Promise.resolve(!0)}isActionAuthorized(e,t,n){return this.wire.sendAction(\"interop-broker-is-action-authorized\").catch((e=>{})),Promise.resolve(!0)}};return Gi.InteropBroker=f,e=new WeakMap,t=new WeakMap,n=new WeakMap,Gi}var zi,Ki={},qi={},Ji=s&&s.__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},Yi=s&&s.__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)};Object.defineProperty(qi,\"__esModule\",{value:!0});const Zi=d,Qi=Hi;class Xi extends Zi.Base{constructor(e,t,n){super(e),zi.set(this,void 0),this.id=n,Ji(this,zi,t,\"f\")}async setContext(e){this.wire.sendAction(\"interop-session-context-group-set-context\").catch((e=>{}));return(await Yi(this,zi,\"f\")).dispatch(`sessionContextGroup:setContext-${this.id}`,{sessionContextGroupId:this.id,context:e})}async getCurrentContext(e){this.wire.sendAction(\"interop-session-context-group-get-context\").catch((e=>{}));return(await Yi(this,zi,\"f\")).dispatch(`sessionContextGroup:getContext-${this.id}`,{sessionContextGroupId:this.id,type:e})}async addContextHandler(e,t){if(this.wire.sendAction(\"interop-session-context-group-add-handler\").catch((e=>{})),\"function\"!=typeof e)throw new Error(\"Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.\");const n=await Yi(this,zi,\"f\");let i;return i=t?`sessionContextHandler:invoke-${this.id}-${t}-${(0,Qi.generateId)()}`:`sessionContextHandler:invoke-${this.id}`,n.register(i,(0,Qi.wrapContextHandler)(e,i)),await n.dispatch(`sessionContextGroup:handlerAdded-${this.id}`,{handlerId:i,contextType:t}),{unsubscribe:await this.createUnsubscribeCb(i)}}async createUnsubscribeCb(e){const t=await Yi(this,zi,\"f\");return async()=>{t.remove(e),await t.dispatch(`sessionContextGroup:handlerRemoved-${this.id}`,{handlerId:e})}}getUserInstance(){return{id:this.id,setContext:(0,Qi.wrapInTryCatch)(this.setContext.bind(this),\"Failed to set context: \"),getCurrentContext:(0,Qi.wrapInTryCatch)(this.getCurrentContext.bind(this),\"Failed to get context: \"),addContextHandler:(0,Qi.wrapInTryCatch)(this.addContextHandler.bind(this),\"Failed to add context handler: \")}}}qi.default=Xi,zi=new WeakMap;var er={},tr={},nr={},ir={},rr=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),or=s&&s.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,\"default\",{enumerable:!0,value:t})}:function(e,t){e.default=t}),sr=s&&s.__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)&&rr(t,e,n);return or(t,e),t};Object.defineProperty(ir,\"__esModule\",{value:!0}),ir.PrivateChannelClient=void 0;const ar=sr(Hi);var cr,dr;function hr(){if(cr)return tr;cr=1;var e,t=s&&s.__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)},n=s&&s.__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},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(tr,\"__esModule\",{value:!0}),tr.FDC3ModuleBase=void 0;const o=nr,a=Hi,c=wr(),d=r(i);return tr.FDC3ModuleBase=class{get client(){return t(this,e,\"f\").call(this)}get fin(){return this.wire.getFin()}constructor(t,i){this.wire=i,e.set(this,void 0),n(this,e,t,\"f\")}async broadcast(e){return this.wire.sendAction(\"fdc3-broadcast\").catch((e=>{})),this.client.setContext(e)}async _open(e,t){this.wire.sendAction(\"fdc3-open\").catch((e=>{}));try{return await c.InteropClient.ferryFdc3Call(this.client,\"fdc3Open\",{app:e,context:t})}catch(e){const t=e.message===a.BROKER_ERRORS.fdc3Open?\"ResolverUnavailable\":e.message;throw new Error(t)}}async _getChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:\"system\",...(0,o.getUnsupportedChannelApis)()})))}async getOrCreateChannel(e){this.wire.sendAction(\"fdc3-get-or-create-channel\").catch((e=>{}));const t=(await this._getChannels()).find((t=>t.id===e));if(t)return{...t,type:\"system\",...(0,o.getUnsupportedChannelApis)()};try{const t=await this.client.joinSessionContextGroup(e);return(0,o.buildAppChannelObject)(t)}catch(e){throw console.error(e.message),new Error(o.ChannelError.CreationFailed)}}async getSystemChannels(){return this.wire.sendAction(\"fdc3-get-system-channels\").catch((e=>{})),this._getChannels()}async joinChannel(e){this.wire.sendAction(\"fdc3-join-channel\").catch((e=>{}));try{return await this.client.joinContextGroup(e)}catch(e){if(e.message===a.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup?console.error(\"The Channel you have tried to join is an App Channel. Custom Channels can only be defined by the Interop Broker through code or manifest configuration. Please use getOrCreateChannel.\"):console.error(e.message),e.message.startsWith(\"Attempting to join a context group that does not exist\"))throw new Error(o.ChannelError.NoChannelFound);throw new Error(o.ChannelError.AccessDenied)}}async getCurrentChannel(){this.wire.sendAction(\"fdc3-get-current-channel\").catch((e=>{}));const e=await this.getCurrentContextGroupInfo();return e?this.buildChannelObject(e):null}async leaveCurrentChannel(){return this.wire.sendAction(\"fdc3-leave-current-channel\").catch((e=>{})),this.client.removeFromContextGroup()}async getCurrentContextGroupInfo(){const e=await this.client.getContextGroups(),t=e.map((async e=>this.client.getAllClientsInContextGroup(e.id))),n=(await Promise.all(t)).findIndex((e=>e.some((e=>{const{uuid:t,name:n}=e;return this.wire.me.uuid===t&&this.wire.me.name===n}))));return e[n]}async buildChannelObject(e){return{...e,type:\"system\",addContextListener:(...[e,t])=>{let n,i;\"function\"==typeof e?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),n=e):(n=t,\"string\"==typeof e&&(i=e));const r=(async()=>{let e=!0;const t=await this.client.getCurrentContext(i);return this.client.addContextHandler(((i,r)=>{if(!e||(e=!1,!(0,d.default)(t,i)))return n(i,r)}),i)})();return{...r,unsubscribe:()=>r.then((e=>e.unsubscribe()))}},broadcast:this.broadcast.bind(this),getCurrentContext:async e=>{const t=await this.client.getCurrentContext(e);return void 0===t?null:t}}}},e=new WeakMap,tr}ir.PrivateChannelClient=class{constructor(e,t){this.id=t,this.client=e,this.listeners=new Map}async broadcast(e){return this.client.dispatch(\"broadcast\",{context:e})}async getCurrentContext(e){return this.client.dispatch(\"getCurrentContext\",{contextType:e})}async addContextListener(e,t){if(\"function\"!=typeof t)throw new Error(\"Non-function argument passed to the second parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.\");let n;n=e?`contextHandler:invoke-${this.id}-${e}-${ar.generateId()}`:`contextHandler:invoke-${this.id}-${ar.generateId()}`,this.client.register(n,ar.wrapContextHandler(t,n));const i={unsubscribe:await this.createContextUnsubscribeCb(n)};return this.listeners.set(n,i),await this.client.dispatch(\"contextHandlerAdded\",{handlerId:n,contextType:e}),i}createNonStandardUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch(\"nonStandardHandlerRemoved\",{handlerId:e})}}createContextUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch(\"contextHandlerRemoved\",{handlerId:e})}}onAddContextListener(e){const t=`onContextHandlerAdded:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch(\"onAddContextHandlerAdded\",{handlerId:t}),n}onDisconnect(e){const t=`onDisconnect:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch(\"onDisconnectHandlerAdded\",{handlerId:t}),n}onUnsubscribe(e){const t=`onUnsubscribe:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch(\"onUnsubscribeHandlerAdded\",{handlerId:t}),n}async cleanUpAllSubs(){Array.from(this.listeners.keys()).forEach((e=>{this.client.remove(e),this.listeners.delete(e)}))}async disconnect(){try{await this.client.dispatch(\"clientDisconnecting\"),await this.cleanUpAllSubs(),await this.client.disconnect()}catch(e){throw new Error(e.message)}}},function(e){var t=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,\"__esModule\",{value:!0}),e.getIntentResolution=e.isChannel=e.isContext=e.connectPrivateChannel=e.buildAppChannelObject=e.buildPrivateChannelObject=e.ChannelError=e.ResultError=e.UnsupportedChannelApiError=e.getUnsupportedChannelApis=void 0;const n=Hi,r=ir,o=t(i);e.getUnsupportedChannelApis=e=>({addContextListener:()=>{throw new a(\"Channel.addContextListener\",e)},broadcast:()=>{throw new a(\"Channel.broadcast\",e)},getCurrentContext:()=>{throw new a(\"Channel.getCurrentContext\",e)}});class a extends Error{constructor(e,t=\"System\"){super(e),this.message=`Calling ${e} on an instance of a ${t} Channel returned by fdc3.get${t}Channels is not supported. If you would like to use a ${t} Channel, please use fdc3.joinChannel, fdc3.addContextListener, and fdc3.broadcast instead.`}}var c,d;e.UnsupportedChannelApiError=a,function(e){e.NoResultReturned=\"NoResultReturned\",e.IntentHandlerRejected=\"IntentHandlerRejected\"}(c=e.ResultError||(e.ResultError={})),(d=e.ChannelError||(e.ChannelError={})).NoChannelFound=\"NoChannelFound\",d.AccessDenied=\"AccessDenied\",d.CreationFailed=\"CreationFailed\";e.buildPrivateChannelObject=e=>{let t=!1;const n=()=>{if(t)throw new Error(\"Private Channel Client has been disconnected from the Private Channel\")};return{id:e.id,type:\"private\",broadcast:async t=>(n(),e.broadcast(t)),getCurrentContext:async t=>(n(),e.getCurrentContext(t)),addContextListener:async(t,i)=>{n();let r=i,o=t;\"function\"==typeof t&&(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),r=t,o=null);return e.addContextListener(o,r)},onAddContextListener:t=>(n(),e.onAddContextListener(t)),disconnect:async()=>(n(),t=!0,e.disconnect()),onDisconnect:t=>(n(),e.onDisconnect(t)),onUnsubscribe:t=>(n(),e.onUnsubscribe(t))}};e.buildAppChannelObject=e=>({id:e.id,type:\"app\",broadcast:e.setContext,getCurrentContext:async t=>{const n=await e.getCurrentContext(t);return void 0===n?null:n},addContextListener:(t,n)=>{let i,r;\"function\"==typeof t?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),i=t):(i=n,\"string\"==typeof t&&(r=t));const s=(async()=>{let t=!0;const n=await e.getCurrentContext(r);return e.addContextHandler(((e,r)=>{if(!t||(t=!1,!(0,o.default)(n,e)))return i(e,r)}),r)})();return{...s,unsubscribe:()=>s.then((e=>e.unsubscribe()))}}});e.connectPrivateChannel=async t=>{try{const n=await fin.InterApplicationBus.Channel.connect(t),i=new r.PrivateChannelClient(n,t);return(0,e.buildPrivateChannelObject)(i)}catch(e){throw new Error(`Private Channel with id: ${t} doesn't exist`)}};e.isContext=e=>{if(e&&\"object\"==typeof e&&\"type\"in e){const{type:t}=e;return\"string\"==typeof t}return!1};e.isChannel=e=>{if(e&&\"object\"==typeof e&&\"type\"in e&&\"id\"in e){const{type:t,id:n}=e;return\"string\"==typeof t&&\"string\"==typeof n&&(\"app\"===t||\"private\"===t)}return!1};e.getIntentResolution=async(t,i,r,o)=>{const s=(0,n.generateId)(),a=new Promise(((e,t)=>{fin.InterApplicationBus.subscribe({uuid:\"*\"},s,(t=>{e(t)})).catch((()=>t(new Error(\"getResult is not supported in this environment\"))))})),d=r?{target:r,intentResolutionResultId:s}:{intentResolutionResultId:s},h=o?{name:o,context:i,metadata:d}:{...i,metadata:d},l=async()=>{let n=await a;if(!n||\"object\"!=typeof n)throw new Error(c.NoResultReturned);const{error:i}=n;if(i)throw new Error(c.IntentHandlerRejected);if((0,e.isChannel)(n)){const{id:i,type:r}=n;switch(r){case\"private\":n=await(0,e.connectPrivateChannel)(i);break;case\"app\":{const r=await t.joinSessionContextGroup(i);n=(0,e.buildAppChannelObject)(r);break}}}else if(!(0,e.isContext)(n))throw new Error(c.NoResultReturned);return n},u=o?await t.fireIntent(h):await t.fireIntentForContext(h);return\"object\"!=typeof u?{source:{appId:\"\",instanceId:\"\"},intent:\"\",version:\"2.0\",getResult:l}:{...u,getResult:l}}}(nr);var lr,ur,pr={};function wr(){if(ur)return Ki;ur=1;var e,t,n=s&&s.__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},i=s&&s.__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)},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ki,\"__esModule\",{value:!0}),Ki.InteropClient=void 0;const o=d,a=r(qi),c=function(){if(dr)return er;dr=1,Object.defineProperty(er,\"__esModule\",{value:!0}),er.Fdc3Module=void 0;const e=Hi,t=hr();class n extends t.FDC3ModuleBase{async open(e,t){await super._open(e,t)}addContextListener(e,t){let n;return this.wire.sendAction(\"fdc3-add-context-listener\").catch((e=>{})),\"function\"==typeof e?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),n=this.client.addContextHandler(e)):n=this.client.addContextHandler(t,null===e?void 0:e),{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}addIntentListener(e,t){this.wire.sendAction(\"fdc3-add-intent-listener\").catch((e=>{}));const n=this.client.registerIntentHandler((e=>{const{context:n,metadata:i}=e,{metadata:r}=n,o=i?.intentResolutionResultId||r?.intentResolutionResultId;o&&this.fin.InterApplicationBus.publish(o,null).catch((()=>null)),t(e.context)}),e,{fdc3Version:\"1.2\"});return{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}async raiseIntent(t,n,i){this.wire.sendAction(\"fdc3-raise-intent\").catch((e=>{}));const r=i?{name:t,context:n,metadata:{target:i}}:{name:t,context:n};try{return await this.client.fireIntent(r)}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntent?\"ResolverUnavailable\":t.message;throw new Error(n)}}async findIntent(t,n){this.wire.sendAction(\"fdc3-find-intent\").catch((e=>{}));try{return await this.client.getInfoForIntent({name:t,context:n})}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntent?\"ResolverUnavailable\":t.message;throw new Error(n)}}async findIntentsByContext(t){this.wire.sendAction(\"fdc3-find-intents-by-context\").catch((e=>{}));try{return await this.client.getInfoForIntentsByContext(t)}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntentsByContext?\"ResolverUnavailable\":t.message;throw new Error(n)}}async raiseIntentForContext(t,n){this.wire.sendAction(\"fdc3-raise-intent-for-context\").catch((e=>{}));try{return await this.client.fireIntentForContext({...t,metadata:{target:n}})}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntentForContext?\"ResolverUnavailable\":t.message;throw new Error(n)}}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}getInfo(){return this.wire.sendAction(\"fdc3-get-info\").catch((e=>{})),{providerVersion:this.wire.environment.getAdapterVersionSync(),provider:`openfin-${this.wire.me.uuid}`,fdc3Version:\"1.2\"}}}return er.Fdc3Module=n,er}(),h=function(){if(lr)return pr;lr=1,Object.defineProperty(pr,\"__esModule\",{value:!0}),pr.Fdc3Module2=void 0;const e=hr(),t=Hi,n=wr(),i=nr,r=ir;class o extends e.FDC3ModuleBase{async open(e,t){return\"string\"==typeof e&&console.warn(\"Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).\"),super._open(e,t)}async findInstances(e){this.wire.sendAction(\"fdc3-find-instances\").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,\"fdc3FindInstances\",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3FindInstances?\"ResolverUnavailable\":e.message;throw new Error(n)}}async getAppMetadata(e){this.wire.sendAction(\"fdc3-get-app-metadata\").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,\"fdc3GetAppMetadata\",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3GetAppMetadata?\"ResolverUnavailable\":e.message;throw new Error(n)}}async addContextListener(e,t){this.wire.sendAction(\"fdc3-add-context-listener\").catch((e=>{}));const n=e=>t=>{const{contextMetadata:n,...i}=t,r=n?[{...i},n]:[t,null];e(...r)};let i=t,r=n(i);return\"function\"==typeof e?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),i=e,r=n(i),this.client.addContextHandler(r)):this.client.addContextHandler(r,null===e?void 0:e)}async findIntent(e,n,i){this.wire.sendAction(\"fdc3-find-intent\").catch((e=>{}));try{return await this.client.getInfoForIntent({name:e,context:n,metadata:{resultType:i}})}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntent?\"ResolverUnavailable\":e.message;throw new Error(n)}}async findIntentsByContext(e,i){this.wire.sendAction(\"fdc3-find-intents-by-context\").catch((e=>{}));const r=i?{context:e,metadata:{resultType:i}}:e;try{return await n.InteropClient.ferryFdc3Call(this.client,\"fdc3v2FindIntentsByContext\",r)}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntentsByContext?\"ResolverUnavailable\":e.message;throw new Error(n)}}async raiseIntent(e,n,r){this.wire.sendAction(\"fdc3-raise-intent\").catch((e=>{}));try{return\"string\"==typeof r&&console.warn(\"Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).\"),(0,i.getIntentResolution)(this.client,n,r,e)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?\"ResolverUnavailable\":e.message;throw new Error(n)}}async raiseIntentForContext(e,n){this.wire.sendAction(\"fdc3-raise-intent-for-context\").catch((e=>{}));try{return\"string\"==typeof n&&console.warn(\"Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).\"),(0,i.getIntentResolution)(this.client,e,n)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?\"ResolverUnavailable\":e.message;throw new Error(n)}}async addIntentListener(e,t){if(this.wire.sendAction(\"fdc3-add-intent-listener\").catch((e=>{})),\"string\"!=typeof e)throw new Error(\"First argument must be an Intent name\");return this.client.registerIntentHandler((async e=>{let n,i;const{context:r,metadata:o}=e,{contextMetadata:s,metadata:a,...c}=r,d=o?.intentResolutionResultId||a?.intentResolutionResultId;try{const e=a?{metadata:a,...c}:{...c};n=await t(e,s),i=n}catch(e){n=e,i={error:!0}}if(d&&this.fin.InterApplicationBus.publish(d,i).catch((()=>null)),n instanceof Error)throw new Error(n.message);return n}),e,{fdc3Version:\"2.0\"})}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}async createPrivateChannel(){const e=(0,t.generateId)();await n.InteropClient.ferryFdc3Call(this.client,\"createPrivateChannelProvider\",{channelId:e});const o=await this.fin.InterApplicationBus.Channel.connect(e),s=new r.PrivateChannelClient(o,e);return(0,i.buildPrivateChannelObject)(s)}async getUserChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:\"user\",...(0,i.getUnsupportedChannelApis)(\"User\")})))}async getSystemChannels(){return console.warn(\"This API has been deprecated. Please use fdc3.getUserChannels instead.\"),super.getSystemChannels()}async joinUserChannel(e){return super.joinChannel(e)}async joinChannel(e){return console.warn(\"This API has been deprecated. Please use fdc3.joinUserChannel instead.\"),super.joinChannel(e)}async getCurrentChannel(){const e=await super.getCurrentChannel();return e?{...e,type:\"user\",broadcast:this.broadcast.bind(this)}:null}async getInfo(){return n.InteropClient.ferryFdc3Call(this.client,\"fdc3v2GetInfo\",{fdc3Version:\"2.0\"})}}return pr.Fdc3Module2=o,pr}(),l=Hi;let u=class extends o.Base{constructor(i,r){super(i),e.set(this,void 0),t.set(this,void 0),n(this,t,new Map,\"f\"),n(this,e,r,\"f\")}async setContext(t){this.wire.sendAction(\"interop-client-set-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"setContext\",{context:t})}async addContextHandler(t,n){if(this.wire.sendAction(\"interop-client-add-context-handler\").catch((e=>{})),\"function\"!=typeof t)throw new Error(\"Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.\");const r=await i(this,e,\"f\");let o;o=n?`invokeContextHandler-${n}-${(0,l.generateId)()}`:\"invokeContextHandler\";const s=(0,l.wrapContextHandler)(t,o);return r.register(o,s),await r.dispatch(\"contextHandlerRegistered\",{handlerId:o,contextType:n}),{unsubscribe:async()=>{r.remove(o),await r.dispatch(\"removeContextHandler\",{handlerId:o})}}}async getContextGroups(){this.wire.sendAction(\"interop-client-get-context-groups\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getContextGroups\")}async joinContextGroup(t,n){this.wire.sendAction(\"interop-client-join-context-group\").catch((e=>{}));const r=await i(this,e,\"f\");if(!t)throw new Error(\"No contextGroupId specified for joinContextGroup.\");return r.dispatch(\"joinContextGroup\",{contextGroupId:t,target:n})}async removeFromContextGroup(t){this.wire.sendAction(\"interop-client-remove-from-context-group\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"removeFromContextGroup\",{target:t})}async getAllClientsInContextGroup(t){this.wire.sendAction(\"interop-client-get-all-clients-in-context-group\").catch((e=>{}));const n=await i(this,e,\"f\");if(!t)throw new Error(\"No contextGroupId specified for getAllClientsInContextGroup.\");return n.dispatch(\"getAllClientsInContextGroup\",{contextGroupId:t})}async getInfoForContextGroup(t){this.wire.sendAction(\"interop-client-get-info-for-context-group\").catch((e=>{}));const n=await i(this,e,\"f\");if(!t)throw new Error(\"No contextGroupId specified for getInfoForContextGroup.\");return n.dispatch(\"getInfoForContextGroup\",{contextGroupId:t})}async fireIntent(t){this.wire.sendAction(\"interop-client-fire-intent\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"fireIntent\",t)}async registerIntentHandler(t,n,r){this.wire.sendAction(\"interop-client-register-intent-handler\").catch((e=>{}));const o=await i(this,e,\"f\"),s=`intent-handler-${n}`,a=(0,l.wrapIntentHandler)(t,s);try{await o.register(s,a),await o.dispatch(\"intentHandlerRegistered\",{handlerId:s,...r})}catch(e){throw new Error(\"Unable to register intent handler\")}return{unsubscribe:async()=>{o.remove(s)}}}async getCurrentContext(t){this.wire.sendAction(\"interop-client-get-current-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getCurrentContext\",{contextType:t})}async getInfoForIntent(t){this.wire.sendAction(\"interop-client-get-info-for-intent\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getInfoForIntent\",t)}async getInfoForIntentsByContext(t){this.wire.sendAction(\"interop-client-get-info-for-intents-by-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getInfoForIntentsByContext\",t)}async fireIntentForContext(t){this.wire.sendAction(\"interop-client-fire-intent-for-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"fireIntentForContext\",t)}async joinSessionContextGroup(n){try{const r=i(this,t,\"f\").get(n);if(r)return r.getUserInstance();const o=await i(this,e,\"f\"),{hasConflict:s}=await o.dispatch(\"sessionContextGroup:createIfNeeded\",{sessionContextGroupId:n});s&&console.warn(`A (non-session) context group with the name \"${n}\" already exists. If you are trying to join a Context Group, call joinContextGroup instead.`);const c=new a.default(this.wire,i(this,e,\"f\"),n);return i(this,t,\"f\").set(n,c),c.getUserInstance()}catch(e){throw console.error(`Error thrown trying to create Session Context Group with id \"${n}\": ${e}`),e}}async onDisconnection(t){this.wire.sendAction(\"interop-client-add-ondisconnection-listener\").catch((e=>{}));return(await i(this,e,\"f\")).onDisconnection((e=>{const{uuid:n}=e;t({type:\"interop-broker\",topic:\"disconnected\",brokerName:n})}))}getFDC3Sync(e){switch(e){case\"1.2\":return new c.Fdc3Module((()=>this),this.wire);case\"2.0\":return new h.Fdc3Module2((()=>this),this.wire);default:throw new Error(`Invalid FDC3 version provided: ${e}. Must be '1.2' or '2.0'`)}}async getFDC3(e){return this.getFDC3Sync(e)}static async ferryFdc3Call(t,n,r){return(await i(t,e,\"f\")).dispatch(n,r||null)}};return Ki.InteropClient=u,e=new WeakMap,t=new WeakMap,Ki}var yr,fr,gr,mr={};function vr(){if(yr)return mr;yr=1,Object.defineProperty(mr,\"__esModule\",{value:!0}),mr.overrideCheck=mr.checkFDC32Overrides=mr.getDefaultViewFdc3VersionFromAppInfo=void 0;const e=Vi();function t(t){return[\"fdc3HandleFindInstances\",\"handleInfoForIntent\",\"handleInfoForIntentsByContext\",\"fdc3HandleGetAppMetadata\",\"fdc3HandleGetInfo\",\"fdc3HandleOpen\",\"handleFiredIntent\",\"handleFiredIntentForContext\"].filter((n=>t[n]===e.InteropBroker.prototype[n]))}return mr.getDefaultViewFdc3VersionFromAppInfo=function({manifest:e,initialOptions:t}){const n=e?.platform?.defaultViewOptions?.fdc3InteropApi??t.defaultViewOptions?.fdc3InteropApi;return[\"1.2\",\"2.0\"].includes(n??\"\")?n:void 0},mr.checkFDC32Overrides=t,mr.overrideCheck=function(e,n){if(n&&\"2.0\"===n){const n=t(e);n.length>0&&console.warn(`WARNING: FDC3 2.0 has been set as a default option for Views in this Platform, but the required InteropBroker APIs for FDC3 2.0 compliance have not all been overridden.\\nThe following APIs need to be overridden:\\n${n.join(\"\\n\")}`)}},mr}function Cr(){return gr||(gr=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),i=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),i(function(){if(fr)return Ti;fr=1;var e=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ti,\"__esModule\",{value:!0}),Ti.InteropModule=void 0;const t=e(n),i=$i,r=d,o=Vi(),a=wr(),c=vr(),h=Tn,l=e=>new e,u=\"You have attempted to use or modify InteropBroker parameters, which is not allowed. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.\";class p extends r.Base{async init(e,n=l){this.wire.sendAction(\"interop-init\").catch((()=>{}));const r=await this.wire.environment.getInteropInfo(this.wire.getFin()),s=(0,i.createUnusableObject)(u),a=(0,i.createWarningObject)(u,(0,t.default)(r)),d=async()=>{throw new Error(u)},p=o.InteropBroker.createClosedConstructor(this.wire,(()=>this.fin.InterApplicationBus.Channel.create(`interop-broker-${e}`)),r);let w;return w=Array.isArray(n)?new((0,h.overrideFromComposables)(...n)(p))(s,d,a):await n(p,s,d,a),(0,c.overrideCheck)(w,r.fdc3Version),w}connectSync(e,t){return this.wire.sendAction(\"interop-connect-sync\").catch((()=>{})),new a.InteropClient(this.wire,this.wire.environment.whenReady().then((()=>this.fin.InterApplicationBus.Channel.connect(`interop-broker-${e}`,{payload:t}))))}}return Ti.InteropModule=p,Ti}(),e),i(wr(),e),i(Vi(),e)}(Li)),Li}var br={},Ir={},Er={},xr={};Object.defineProperty(xr,\"__esModule\",{value:!0}),xr.getSnapshotSourceChannelName=void 0;xr.getSnapshotSourceChannelName=e=>`snapshot-source-provider-${e.uuid}`;var Ar,Pr,Mr,_r,Or,Sr=s&&s.__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},Rr=s&&s.__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)};Object.defineProperty(Er,\"__esModule\",{value:!0}),Er.SnapshotSource=void 0;const Fr=d,jr=xr,kr=new Map;class Lr extends Fr.Base{constructor(e,t){super(e),Ar.set(this,void 0),Pr.set(this,(()=>(kr.has(this.identity.uuid)||kr.set(this.identity.uuid,{eventFired:null,clientPromise:null}),kr.get(this.identity.uuid)))),Mr.set(this,(()=>(Rr(this,Pr,\"f\").call(this).clientPromise||(Rr(this,Pr,\"f\").call(this).clientPromise=Rr(this,_r,\"f\").call(this)),Rr(this,Pr,\"f\").call(this).clientPromise))),_r.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);try{Rr(this,Pr,\"f\").call(this).eventFired||await Rr(this,Or,\"f\").call(this);const t=await this.fin.InterApplicationBus.Channel.connect(e,{wait:!1});return t.onDisconnection((()=>{Rr(this,Pr,\"f\").call(this).clientPromise=null,Rr(this,Pr,\"f\").call(this).eventFired=null})),t}catch(e){throw Rr(this,Pr,\"f\").call(this).clientPromise=null,new Error(\"The targeted SnapshotSource is not currently initialized. Await this object's ready() method.\")}})),Or.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);let t,n;const i=new Promise(((e,i)=>{t=e,n=i}));Rr(this,Pr,\"f\").call(this).eventFired=i;const r=async i=>{try{i.channelName===e&&(t(),await this.fin.InterApplicationBus.Channel.removeListener(\"connected\",r))}catch(e){n(e)}};await this.fin.InterApplicationBus.Channel.on(\"connected\",r)})),Sr(this,Ar,t,\"f\")}get identity(){return Rr(this,Ar,\"f\")}async ready(){this.wire.sendAction(\"snapshot-source-ready\").catch((e=>{}));try{await Rr(this,Mr,\"f\").call(this)}catch(e){await Rr(this,Pr,\"f\").call(this).eventFired}}async getSnapshot(){this.wire.sendAction(\"snapshot-source-get-snapshot\").catch((e=>{}));const e=await Rr(this,Mr,\"f\").call(this),t=await e.dispatch(\"get-snapshot\");return(await t).snapshot}async applySnapshot(e){this.wire.sendAction(\"snapshot-source-apply-snapshot\").catch((e=>{}));return(await Rr(this,Mr,\"f\").call(this)).dispatch(\"apply-snapshot\",{snapshot:e})}}Er.SnapshotSource=Lr,Ar=new WeakMap,Pr=new WeakMap,Mr=new WeakMap,_r=new WeakMap,Or=new WeakMap,Object.defineProperty(Ir,\"__esModule\",{value:!0}),Ir.SnapshotSourceModule=void 0;const Tr=d,$r=Er,Br=xr;class Gr extends Tr.Base{async init(e){if(this.wire.sendAction(\"snapshot-source-init\").catch((e=>{})),\"object\"!=typeof e||\"function\"!=typeof e.getSnapshot||\"function\"!=typeof e.applySnapshot)throw new Error(\"you must pass in a valid SnapshotProvider\");const t=await this.fin.InterApplicationBus.Channel.create((0,Br.getSnapshotSourceChannelName)(this.fin.me));t.register(\"get-snapshot\",(async()=>({snapshot:await e.getSnapshot()}))),t.register(\"apply-snapshot\",(({snapshot:t})=>e.applySnapshot(t)))}wrapSync(e){return this.wire.sendAction(\"snapshot-source-wrap-sync\").catch((e=>{})),new $r.SnapshotSource(this.wire,e)}async wrap(e){return this.wire.sendAction(\"snapshot-source-wrap\").catch((e=>{})),this.wrapSync(e)}}Ir.SnapshotSourceModule=Gr,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Ir,e),n(Er,e)}(br),Object.defineProperty(a,\"__esModule\",{value:!0});var Wr=a.Fin=void 0;const Hr=t,Nr=c,Dr=ie(),Ur=Z(),Vr=de,zr=en,Kr=rn,qr=un,Jr=bn,Yr=J(),Zr=An,Qr=ki,Xr=Cr(),eo=br;class to extends Hr.EventEmitter{constructor(e){super(),this.wire=e,this.System=new Nr.System(e),this.Window=new Dr._WindowModule(e),this.Application=new Ur.ApplicationModule(e),this.InterApplicationBus=new Vr.InterApplicationBus(e),this.Clipboard=new zr.Clipboard(e),this.ExternalApplication=new Kr.ExternalApplicationModule(e),this.Frame=new qr._FrameModule(e),this.GlobalHotkey=new Jr.GlobalHotkey(e),this.Platform=new Zr.PlatformModule(e,this.InterApplicationBus.Channel),this.View=new Yr.ViewModule(e),this.Interop=new Xr.InteropModule(e),this.SnapshotSource=new eo.SnapshotSourceModule(e),e.registerFin(this),this.me=(0,Qr.getMe)(e),e.on(\"disconnected\",(()=>{this.emit(\"disconnected\")}))}}Wr=a.Fin=to;var no={},io={};function ro(e){return\"string\"==typeof e.manifestUrl}function oo(e){return ao(e)&&\"string\"==typeof e.address}function so(e){return oo(e)&&\"string\"==typeof e.token}function ao(e){return\"string\"==typeof e.uuid}function co(e){return e.runtime&&\"string\"==typeof e.runtime.version}function ho(e){return ao(e)&&co(e)}Object.defineProperty(io,\"__esModule\",{value:!0}),io.isInternalConnectConfig=io.isPortDiscoveryConfig=io.isNewConnectConfig=io.isConfigWithReceiver=io.isRemoteConfig=io.isExistingConnectConfig=io.isExternalConfig=void 0,io.isExternalConfig=ro,io.isExistingConnectConfig=oo,io.isRemoteConfig=so,io.isConfigWithReceiver=function(e){return\"object\"==typeof e.receiver&&so({...e,address:\"\"})},io.isNewConnectConfig=ho,io.isPortDiscoveryConfig=function(e){return ro(e)&&co(e)||ho(e)},io.isInternalConnectConfig=function(e){return oo(e)||ho(e)};var lo={},uo={};Object.defineProperty(uo,\"__esModule\",{value:!0}),uo.EmitterMap=void 0;const po=t;function wo(e){return Buffer.from(e).toString(\"base64\")}uo.EmitterMap=class{constructor(){this.storage=new Map}hashKeys(e){return e.map(wo).join(\"/\")}getOrCreate(e){const t=this.hashKeys(e);return this.storage.has(t)||this.storage.set(t,new po.EventEmitter),this.storage.get(t)}has(e){return this.storage.has(this.hashKeys(e))}delete(e){const t=this.hashKeys(e);return this.storage.delete(t)}},Object.defineProperty(lo,\"__esModule\",{value:!0});const yo=uo;class fo extends yo.EmitterMap{constructor(){super(...arguments),this.dispatchEvent=e=>{if(function(e){return\"process-desktop-event\"===e.action}(e)){const{payload:t}=e,n=function(e){const{topic:t}=e;if(\"frame\"===t||\"window\"===t||\"view\"===t){const{uuid:n,name:i}=e;return[t,n,i]}if(\"application\"===t){const{uuid:n}=e;return[t,n]}return[t]}(t);if(this.has(n))return this.getOrCreate(n).emit(t.type,t),!0}return!1}}}lo.default=fo;var go,mo,vo=s&&s.__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},Co=s&&s.__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)},bo=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(no,\"__esModule\",{value:!0});var Io=no.Transport=void 0;const Eo=t,xo=io,Ao=g,Po=bo(lo),Mo=ki,_o=ke;class Oo extends Eo.EventEmitter{constructor(e,t,n){super(),this.wireListeners=new Map,this.topicRefMap=new Map,this.eventAggregator=new Po.default,this.messageHandlers=[this.eventAggregator.dispatchEvent],go.set(this,void 0),mo.set(this,void 0),this.connectSync=()=>{Co(this,go,\"f\").connectSync()},this.getPort=()=>Co(this,go,\"f\").getPort(),vo(this,go,new e(this.onmessage.bind(this)),\"f\"),this.environment=t,this.sendRaw=Co(this,go,\"f\").send.bind(Co(this,go,\"f\")),this.registerMessageHandler(this.handleMessage.bind(this)),Co(this,go,\"f\").on(\"disconnected\",(()=>{for(const[,{handleNack:e}]of this.wireListeners)e({reason:\"Remote connection has closed\"});this.wireListeners.clear(),this.emit(\"disconnected\")}));const{uuid:i,name:r}=n,o=this.environment.getCurrentEntityType();this.me=(0,Mo.getBaseMe)(o,i,r)}getFin(){if(!Co(this,mo,\"f\"))throw new Error(\"No Fin object registered for this transport\");return Co(this,mo,\"f\")}registerFin(e){if(Co(this,mo,\"f\"))throw new Error(\"Fin object has already been registered for this transport\");vo(this,mo,e,\"f\")}shutdown(){return Co(this,go,\"f\").shutdown()}async connect(e){if((0,xo.isConfigWithReceiver)(e))return await Co(this,go,\"f\").connect(e.receiver),this.authorize(e);if((0,xo.isRemoteConfig)(e))return this.connectRemote(e);if((0,xo.isExistingConnectConfig)(e))return this.connectByPort(e);if((0,xo.isNewConnectConfig)(e)){const t=await this.environment.retrievePort(e);return this.connectByPort({...e,address:`ws://localhost:${t}`})}}async connectRemote(e){return await Co(this,go,\"f\").connect(new(this.environment.getWsConstructor())(e.address)),this.authorize(e)}async connectByPort(e){const{address:t,uuid:n}=e,i={...e,type:\"file-token\"},r=Co(this,go,\"f\");await r.connect(new(this.environment.getWsConstructor())(e.address));const o=await this.sendAction(\"request-external-authorization\",{uuid:n,type:\"file-token\"},!0);if(\"external-authorization-response\"!==o.action)throw new Ao.UnexpectedActionError(o.action);return await this.environment.writeToken(o.payload.file,o.payload.token),this.authorize(i)}async authorize(e){const t=await this.sendAction(\"request-authorization\",e,!0);if(\"authorization-response\"!==t.action)throw new Ao.UnexpectedActionError(t.action);if(!0!==t.payload.success)throw new Ao.RuntimeError(t.payload)}sendAction(e,t={},n=!1){let i=()=>{};const r=Ao.RuntimeError.getCallSite(1),o=this.environment.getNextMessageId(),s=new Promise(((s,a)=>{i=a;const c={action:e,payload:t,messageId:o},d=Co(this,go,\"f\");return this.addWireListener(o,s,(e=>this.nackHandler(e,a,r)),n),d.send(c).catch(a)}));return Object.assign(s,{cancel:i,messageId:o})}nackHandler(e,t,n){t(\"string\"==typeof e?e:new Ao.RuntimeError(e,n))}ferryAction(e){return new Promise(((t,n)=>{const i=this.environment.getNextMessageId();e.messageId=i;const r=e=>{t(e.payload)};return Co(this,go,\"f\").send(e).then((()=>this.addWireListener(i,r,(e=>this.nackHandler(e,n)),!1))).catch(n)}))}registerMessageHandler(e){this.messageHandlers.push(e)}addWireListener(e,t,n,i){i?this.uncorrelatedListener=t:this.wireListeners.has(e)?n({reason:\"Duplicate handler id\",error:(0,_o.errorToPOJO)(new Ao.DuplicateCorrelationError(String(e)))}):this.wireListeners.set(e,{resolve:t,handleNack:n})}onmessage(e){for(const t of this.messageHandlers)t.call(null,e)}handleMessage(e){const t=e.correlationId||NaN;if(\"correlationId\"in e){if(!this.wireListeners.has(t))return!1;{const{resolve:n,handleNack:i}=this.wireListeners.get(t);\"ack\"!==e.action?i({reason:\"Did not receive ack action\",error:(0,_o.errorToPOJO)(new Ao.NoAckError(e.action))}):\"payload\"in e?e.payload.success?n.call(null,e):i(e.payload):\"string\"==typeof e.reason?i(e):(console.warn(\"Received invalid response from core\",e),i({reason:\"invalid response shape\"})),this.wireListeners.delete(t)}}else this.uncorrelatedListener&&this.uncorrelatedListener.call(null,e),this.uncorrelatedListener=()=>{};return!0}}Io=no.Transport=Oo,go=new WeakMap,mo=new WeakMap;const So=(...e)=>({log:(...t)=>console.debug(`[${(new Date).toISOString()}]`,...(e=>e.map((e=>`[${e}]`)))(e),...t),getLogger:(...t)=>So(...e,...t)}),Ro=So(\"@openfin/core-web/client\");function Fo(e,t){if(!function(e){return\"string\"==typeof e}(e))throw new Error(`Property ${t} has invalid type. Expected string, got ${typeof e}.`)}const jo=\"web-broker-ports-ready\",ko=Ro.getLogger(\"get-web-interop-ports\");function Lo(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)}function To(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}\"function\"==typeof SuppressedError&&SuppressedError;const $o=e=>{var n,i,r;return r=class extends t.EventEmitter{constructor(t){super(),n.set(this,void 0),i.set(this,!1),this.connectSync=()=>{Lo(this,i,\"f\")||(e.addEventListener(\"message\",(e=>{e.data?.topic?.startsWith(\"wire-message\")&&e.data.message&&Lo(this,n,\"f\").call(this,{...JSON.parse(e.data.message),ports:e.ports})})),e.start())},this.connect=async()=>{this.connectSync()},this.send=t=>(e.postMessage({topic:\"wire-message\",message:JSON.stringify(t)}),Promise.resolve()),this.shutdown=async()=>{e.close()},To(this,n,t,\"f\")}getPort(){return e}},n=new WeakMap,i=new WeakMap,r};var Bo={},Go={};Object.defineProperty(Go,\"__esModule\",{value:!0}),Go.BaseEnvironment=void 0;const Wo=vr();Go.BaseEnvironment=class{async getViewWindowIdentity(e,t){const{identity:n}=await e.View.wrapSync(t).getCurrentWindow();return n}async getInteropInfo(e){const t=await e.Application.getCurrentSync().getInfo().catch((()=>null)),n=t?.initialOptions?.interopBrokerConfiguration??{};return{fdc3Version:t?(0,Wo.getDefaultViewFdc3VersionFromAppInfo)(t):void 0,...n,fdc3Info:{providerVersion:await e.System.getVersion(),provider:\"OpenFin\"}}}},Object.defineProperty(Bo,\"__esModule\",{value:!0});var Ho=Bo.BrowserEnvironment=void 0;const No=Go;class Do extends No.BaseEnvironment{constructor(){super(...arguments),this.type=\"other\",this.getRandomId=()=>{const e=new Uint32Array(1);return window.crypto.getRandomValues(e)[0].toString(32)}}getAdapterVersionSync(){return\"\"}observeBounds(e,t){throw new Error(\"Method not implemented.\")}layoutAllowedInContext(e){return!1}initLayoutManager(e,t,n){throw new Error(\"Method not implemented.\")}applyLayoutSnapshot(e,t,n){throw new Error(\"Method not implemented.\")}createLayout(e,t){throw new Error(\"Method not implemented.\")}destroyLayout(e,t){throw new Error(\"Method not implemented.\")}resolveLayout(e,t){throw new Error(\"Method not implemented.\")}initPlatform(...e){throw new Error(\"Method not implemented.\")}writeToken(e,t){return Promise.resolve(\"\")}retrievePort(e){throw new Error(\"Method not implemented.\")}getNextMessageId(){return this.getRandomId()}createChildContent(e){throw new Error(\"Method not implemented.\")}getWebWindow(e){throw new Error(\"Method not implemented.\")}getCurrentEntityIdentity(){throw new Error(\"Method not implemented.\")}getCurrentEntityType(){return\"external connection\"}raiseEvent(e,t){throw new Error(\"Method not implemented.\")}getUrl(){return location.href}getDefaultChannelOptions(){return{create:{},connect:{}}}getRtcPeer(){return new RTCPeerConnection}getWsConstructor(){return WebSocket}whenReady(){return Promise.resolve()}}Ho=Bo.BrowserEnvironment=Do;const Uo=e=>\"platform\"in e&&void 0!==e.platform;var Vo,zo;class Ko extends Ho{constructor(e){super(),this.connectConfig=e,Vo.set(this,void 0),zo.set(this,new W((async()=>Promise.resolve().then((function(){return require(\"./main-b14f67c9.js\")}))))),Uo(e)&&this.validatePlatformOptions(e)}getAdapterVersionSync(){return\"0.39.21\"}validatePlatformOptions({platform:e}){if(!(\"layoutSnapshot\"in e))throw new Error(\"Platform options are missing layoutSnapshot. Please provide a layoutSnapshot in the platform options.\");if(\"windows\"in e||\"windows\"in e.layoutSnapshot)throw new Error(\"It appears you tried to call connect() with a snapshot object from an OpenFin desktop environment. Note that connect() expects to be called with a platform property with this structure: { platform: { layoutSnapshot } }. To get a layoutSnapshot of the expected structure, use fin.Platform.Layout.getCurrentLayoutManagerSync().getLayoutSnapshot() in v34+ in your desktop environment.\");const{layouts:t}=e.layoutSnapshot;Object.entries(t).map((([e,t])=>{if(\"object\"!=typeof t||null===t)throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must be an object.`);if(!(\"content\"in t))throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must contain a 'content' property.`)}))}async getInteropInfo(e){return{...{contextGroups:void 0,logging:{beforeAction:{enabled:!1},afterAction:{enabled:!1}}},fdc3Version:void 0,fdc3Info:{providerVersion:\"0.39.21\",provider:\"OpenFin Web\"}}}layoutAllowedInContext(e){return!0}async initLayoutManager(e,t,n){if(Lo(this,Vo,\"f\"))throw new Error(\"Layout already initialized.\");if(!Uo(this.connectConfig))throw new Error(\"Platform options are missing from connection config.\");const{WebLayoutEntryPoint:i}=await Lo(this,zo,\"f\").getValue();return To(this,Vo,new i(this.connectConfig),\"f\"),await Lo(this,Vo,\"f\").initLayoutManager(e,t,n)}async applyLayoutSnapshot(e,t,n){Lo(this,Vo,\"f\")?.applyLayoutSnapshot(e,t,n)}async createLayout(e,t){return Lo(this,Vo,\"f\")?.createLayout(e,t)}async destroyLayout(e,t){return Lo(this,Vo,\"f\")?.destroyLayout(e,t)}async getViewWindowIdentity(e,t){return Promise.resolve({uuid:t.uuid,name:t.uuid})}}Vo=new WeakMap,zo=new WeakMap;const qo=()=>{const e=((e,t)=>{const n=new RegExp(`^${t}<(?.*)>$`).exec(e)?.groups?.meta;if(n)try{return JSON.parse(atob(n))}catch(e){throw new Error(`Failed to decode JSON from ${n}.`)}})(window.name,\"of-frame\");if(e)try{const{name:t,uuid:n,brokerUrl:i,providerId:r,contextGroup:o}=e;return Fo(i,\"brokerUrl\"),Fo(n,\"uuid\"),Fo(t,\"name\"),{identity:{name:t,uuid:n},brokerUrl:i,interopConfig:{providerId:r,currentContextGroup:o}}}catch(e){throw new Error(`Unexpected error occurred when inferring platform information: ${e.stack}`)}},Jo=()=>{const e=r.v4();return{uuid:e,name:e}},Yo=async e=>{if(\"enabled\"===e.connectionInheritance){const t=await(async e=>{const t=qo();if(t){const{validateOptions:n=(()=>!0)}=e,{identity:i,...r}=t;if(!await n(r))throw new Error(\"Parent options were rejected by validateOptions.\");return t}})(e);if(t)return t}if(!e.options){const t=\"enabled\"===e.connectionInheritance?\"Broker URL was not specified nor provided by a platform container.\":\"Connection inheritance is disabled but no options were provided.\";throw new Error(t)}return{...e.options,identity:Jo()}};exports.__classPrivateFieldGet=Lo,exports.__classPrivateFieldSet=To,exports.apiExposer=Gn,exports.commonjsGlobal=s,exports.connect=async t=>{try{Ro.log(\"Establishing connection\",t);const{brokerUrl:n,identity:i,timeout:r,interopConfig:s}=await Yo(t),{workerPort:a,iframeBrokerPort:c}=await(async(e,t,n)=>{const{origin:i}=new URL(e),r=document.createElement(\"IFRAME\");let s;r.style.display=\"none\";try{return await new Promise(((a,c)=>{const d=e=>{if(e.source===r.contentWindow&&e.data?.topic===`ack-${jo}`){if(e.origin!==i)c(new Error(`Broker redirected to unexpected origin ${e.origin}, expected ${i}.`));else if(e.data.success){const[t,n]=e.ports;a({iframeBrokerPort:t,workerPort:n})}else c(new m(e.data));window.removeEventListener(\"message\",d),clearTimeout(s)}};window.addEventListener(\"message\",d),ko.log(`Connecting to broker ${e}`),r.setAttribute(\"src\",e),r.setAttribute(\"name\",o(t,\"of-broker\")),document.body.appendChild(r),ko.log(\"Iframe loaded, awaiting init message from iframe\"),n&&(s=setTimeout((()=>{window.removeEventListener(\"message\",d),document.body.removeChild(r),c(new Error(\"Worker did not initialize in time\"))}),n))}))}catch(e){throw new Error(`Failed to initialise Fin Web Client. ${e.message}`,{cause:e})}})(n,i,r);Ro.log(\"Successfully established connection to shared worker\");const d={entityType:\"external connection\",...i};a.start(),c.start();const h=((t,n,i)=>{const r=$o(n),o=new Ko(t),s=new Io(r,o,i);return s.connectSync(),window.Buffer=e.Buffer,new Wr(s)})(t,a,d);return s?.providerId&&(h.me.interop=h.Interop.connectSync(s.providerId),s?.currentContextGroup&&h.me.interop.joinContextGroup(s.currentContextGroup).catch((e=>{console.warn(`Error joining specified context group: ${s?.currentContextGroup}, continuing`,e)}))),{...h,me:{...h.me,identity:{uuid:h.me.uuid,name:h.me.name}}}}catch(e){throw new Error(`An error occured during web-interop connection: ${e.message}`)}},exports.decorators=Nn,exports.encodeOptions=o,exports.layout_constants=ai,exports.lazy=G;\n","\"use strict\";var t=require(\"./main-8cad4070.js\"),e=require(\"uuid\");require(\"buffer/\"),require(\"events\"),require(\"lodash/cloneDeep\"),require(\"lodash/isEqual\");var i={},n={};Object.defineProperty(n,\"__esModule\",{value:!0}),n.mapValuesAsync=n.mapEntriesAsync=void 0;const o=(t,[e,i])=>({...t,[e]:i});async function s(t,e){return(await Promise.all(e.map((async([e,i])=>[e,await t(i,e)])))).reduce(o,{})}n.mapEntriesAsync=s,n.mapValuesAsync=async function(t,e){let i;return i=e instanceof Map?[...e.entries()]:Object.entries(e),s(t,i)};var r,a,l,h,d=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldSet||function(t,e,i,n,o){if(\"m\"===n)throw new TypeError(\"Private method is not writable\");if(\"a\"===n&&!o)throw new TypeError(\"Private accessor was defined without a setter\");if(\"function\"==typeof e?t!==e||!o:!e.has(t))throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");return\"a\"===n?o.call(t,i):o?o.value=i:e.set(t,i),i},c=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldGet||function(t,e,i,n){if(\"a\"===i&&!n)throw new TypeError(\"Private accessor was defined without a getter\");if(\"function\"==typeof e?t!==e||!n:!e.has(t))throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");return\"m\"===i?n:\"a\"===i?n.call(t):n?n.value:e.get(t)};Object.defineProperty(i,\"__esModule\",{value:!0});var m=i.DefaultLayoutManager=void 0;const u=n;class p{constructor(t){a.set(this,void 0),l.set(this,new Map),d(this,a,t,\"f\")}size(){return c(this,l,\"f\").size}async applyLayoutSnapshot({layouts:t}){if(Object.keys(t).length>1)throw new Error(\"[LayoutManager] Tried to call applyLayoutSnapshot with more than 1 layout. When implementing multiple layouts via overridden LayoutManager class, you must override and fully implement the applyLayoutSnapshot method without calling super.applyLayoutSnapshot().\");const[[e,i]]=Object.entries(t);await p.createLayout(this,{layoutName:e,layout:i})}async showLayout({layoutName:t}){}async getLayoutSnapshot(){return{layouts:await(0,u.mapValuesAsync)((t=>t.getFrameSnapshot()),c(this,l,\"f\"))}}async removeLayout({layoutName:t}){}getLayoutIdentityForView(t){const e=[...c(this,l,\"f\").values()].find((e=>e.getCurrentViews().some((e=>e.name===t.name&&e.uuid===t.uuid))));return e?.identity??void 0}isLayoutVisible({layoutName:t}){return c(p,r,\"m\",h).call(p,this,t).isVisible()}resolveLayoutIdentity(t){if(t&&\"layoutName\"in t)return t;const e=[...c(this,l,\"f\").values()];if(1===e.length)return e[0].identity;const i=e.find((t=>t.isVisible()));return i?.identity??void 0}static async resolveLayout(t,e){const i=t.resolveLayoutIdentity(e);if(void 0===i||!(\"layoutName\"in i))throw new Error(\"[layout-manager] resolveLayout: Could not resolve the layout identity. Make sure you include 'layoutName' in the identity object.\");return c(p,r,\"m\",h).call(p,t,i.layoutName)}static async handleSharedView(t,e,i){await(0,u.mapValuesAsync)((async t=>{if(t.identity.layoutName!==e.layoutName){const e=t.getCurrentViews().find((t=>t.name===i.name));e&&await t.onViewDetached({viewIdentity:e,target:null}).catch(console.error)}}),c(t,l,\"f\"))}static async handleLastViewRemoved(t,e){await t.removeLayout(e),await c(t,a,\"f\").handleLastViewRemoved(t)}static async destroyLayout(t,{layoutName:e}){await c(p,r,\"m\",h).call(p,t,e).destroy(),c(t,l,\"f\").delete(e)}static async createLayout(t,e){const{layoutName:i}=e;if(c(t,l,\"f\").has(i))throw new Error(`Layout name ${i} already exists`);await c(t,a,\"f\").createLayout(e,t)}static registerLayout(t,e,i){c(t,l,\"f\").set(e,i)}static getAllLayouts(t){return[...c(t,l,\"f\").values()]}static setInitialSnapshot(t,e){c(t,a,\"f\").setInitialSnapshot(e)}static createClosedConstructor(...t){return class extends p{constructor(){super(...t)}}}}m=i.DefaultLayoutManager=p,r=p,a=new WeakMap,l=new WeakMap,h=function(t,e){const i=c(t,l,\"f\").get(e);if(!i)throw new Error(`[layout-manager] getLayoutByName: Could not locate layout with name '${e}'`);return i};var g={},f={},v={};Object.defineProperty(v,\"__esModule\",{value:!0}),v.ReversibleMap=void 0;v.ReversibleMap=class{constructor(){this.valueToKey=new Map,this.keyToValue=new Map,this.setUnique=(t,e)=>{if(this.hasKey(t)||this.hasValue(e))throw new Error(\"Key or value already in the map.\");this.keyToValue.set(t,e),this.valueToKey.set(e,t)},this.getKey=t=>{const e=this.valueToKey.get(t);if(!e)throw new Error(\"Value not found in the map.\");return e},this.deleteKey=t=>{const e=this.getValue(t);return this.keyToValue.delete(t),this.valueToKey.delete(e),e},this.deleteValue=t=>{const e=this.getKey(t);return this.keyToValue.delete(e),this.valueToKey.delete(t),e},this.hasKey=t=>this.keyToValue.has(t),this.hasValue=t=>this.valueToKey.has(t)}getValue(t){const e=this.keyToValue.get(t);if(!e)throw new Error(\"Key not found in the map.\");return e}},Object.defineProperty(f,\"__esModule\",{value:!0});var _=f.LayoutContentCache=void 0;const y=t.lazy,C=v;class w{constructor(){this.contentItemCache=new C.ReversibleMap,this.contentItemCacheId=0,this.createCacheKey=()=>{const t=`entity-${this.contentItemCacheId.toString()}`;return this.contentItemCacheId+=1,t},this.hasKey=t=>this.contentItemCache.hasKey(t),this.getItemOrUndefined=t=>{try{return this.getContentItemOrThrow(t)}catch(t){return}},this.getContentItemOrThrow=(t,e)=>{if(!this.contentItemCache.hasKey(t))throw new Error(\"Layout component has been destroyed or detached from the current layout.\");const i=this.contentItemCache.getValue(t);if(e&&!e.includes(i.type))throw new Error(`Layout item is not the expected type. Expected ${e.join(\", \")}, got ${i.type}.`);return i},this.getOrCreateEntityId=t=>{if(this.contentItemCache.hasValue(t))return this.contentItemCache.getKey(t);t.onDestroyed((()=>{this.contentItemCache.deleteValue(t)}));const e=this.createCacheKey();return this.contentItemCache.setUnique(e,t),e}}static getSingleInstance(){return w.singleton.getValue()}}_=f.LayoutContentCache=w,w.singleton=new y.Lazy((()=>new w));var I={},b={};!function(t){Object.defineProperty(t,\"__esModule\",{value:!0}),t.getAdjacentStacks=t.doShareEdge=t.getAdjacentItem=void 0;t.getAdjacentItem=(e,i)=>{const{parent:n}=e;if(e.isRoot()||!n)return;const o=[\"top\",\"bottom\"].includes(i)?\"column\":\"row\",s=[\"top\",\"left\"].includes(i)?-1:1;if(n.type===o){const t=n.contentItems.indexOf(e)+s;if(t>=0&&t{const n=t.getBounds(),o=e.getBounds();if(!n||!o)return!1;if([\"top\",\"bottom\"].includes(i)){return!(n.righto.right)}return!(n.bottomo.bottom)};t.getAdjacentStacks=(e,i)=>{const n=[\"top\",\"bottom\"].includes(i)?\"row\":\"column\",o=s=>\"stack\"===s.type?(0,t.doShareEdge)(e,s,i)?[s]:[]:\"root\"===s.type||\"ground\"===s.type?[]:s.type===n?s.contentItems.map((t=>o(t))).flat():s.type!==n?[\"top\",\"right\"].includes(i)?o(s.contentItems[s.contentItems.length-1]):o(s.contentItems[0]):[],s=(0,t.getAdjacentItem)(e,i);return s?o(s):[]}}(b);var S=t.commonjsGlobal&&t.commonjsGlobal.__decorate||function(t,e,i,n){var o,s=arguments.length,r=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if(\"object\"==typeof Reflect&&\"function\"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(s<3?o(r):s>3?o(e,i,r):o(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};Object.defineProperty(I,\"__esModule\",{value:!0}),I.LayoutEntitiesController=void 0;const E=t.decorators,x=b,L=i;class z{constructor(t,e,i){this.wire=t,this.layoutManager=e,this.layoutContentCache=i,this.analytics=t=>{this.wire.sendAction(`layout-controller-${t}`).catch((()=>{}))},this.getLayoutIdentityForViewOrThrow=async t=>{const e=this.layoutManager.getLayoutIdentityForView(t);if(!e)throw new Error(`View identity ${t.name} is not attached to any layouts.`);return e},this.getRoot=async t=>{this.analytics(\"get-root\");const e=(await this.getLayout(t)).getRoot();return{type:e.type,entityId:this.layoutContentCache.getOrCreateEntityId(e)}},this.getStackByView=async t=>{this.analytics(\"get-stack-by-view\");const e=await this.getLayoutIdentityForViewOrThrow(t),i=(await this.getLayout(e)).getStackByView(t);if(\"stack\"===i?.type)return{entityId:this.layoutContentCache.getOrCreateEntityId(i),type:\"stack\"}},this.getStackViews=t=>{this.analytics(\"get-stack-views\");return this.layoutContentCache.getContentItemOrThrow(t,[\"stack\"]).contentItems.map((t=>({name:t.viewName,uuid:this.wire.me.uuid})))},this.isRoot=t=>{this.analytics(\"is-root\");return this.layoutContentCache.getContentItemOrThrow(t).isRoot()},this.exists=t=>(this.analytics(\"exists\"),this.layoutContentCache.hasKey(t)),this.addViewToStack=async(t,e,{index:i}={index:0})=>{this.analytics(\"add-view-to-stack\");const n=this.layoutContentCache.getContentItemOrThrow(t);if(i&&i>n.contentItems.length+1)throw new Error(`Index '${i}' out of range, please exclude the index or specify a number between 0 and ${n.contentItems.length}`);const o={id:t,index:i},{identity:s}=await n.layout.platformCreateView(e,{location:o});return s},this.findViewInStack=(t,e)=>t.contentItems.find((t=>t.viewName===e.name)),this.removeViewFromStack=async(t,e)=>{this.analytics(\"remove-view-from-stack\");const i=this.layoutContentCache.getContentItemOrThrow(t,[\"stack\"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to remove a view ('${e.name}') which does not belong to the stack.`);await n.layout.platformCloseView(e)},this.createAdjacentStack=async(t,e,{position:i=\"right\"}={})=>{if(this.analytics(\"create-adjacent-stack\"),!Array.isArray(e)||0===e.length)throw new Error('The parameter \"views\" must be an array with at least 1 element.');if(![\"top\",\"bottom\",\"left\",\"right\"].includes(i))throw new Error(`Invalid position '${i}' specified.`);const n=this.layoutContentCache.getContentItemOrThrow(t).createAdjacentStack({position:i}),o=this.layoutContentCache.getOrCreateEntityId(n);return await Promise.all(e.reverse().map((t=>this.addViewToStack(o,t)))),o},this.getAdjacentStacks=async({targetId:t,edge:e})=>{this.analytics(\"get-adjacent-stacks\");const i=this.layoutContentCache.getContentItemOrThrow(t);return(0,x.getAdjacentStacks)(i,e).map((t=>({entityId:this.layoutContentCache.getOrCreateEntityId(t)})))},this.setStackActiveView=async(t,e)=>{this.analytics(\"set-stack-active-view\");const i=this.layoutContentCache.getContentItemOrThrow(t,[\"stack\"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to set a view ('${e.name}') as active when it does not belong to the stack.`);i.setActiveContentItem(n,!0)}}async getLayout(t){const e=await L.DefaultLayoutManager.resolveLayout(this.layoutManager,t);if(!e)throw new Error(`Could not resolve target layout identity ${JSON.stringify(t)}`);return e}getContent(t){this.analytics(\"get-content\");return this.layoutContentCache.getContentItemOrThrow(t,[\"column\",\"row\"]).contentItems.map((t=>({type:t.type,entityId:this.layoutContentCache.getOrCreateEntityId(t)})))}getParent(t){this.analytics(\"get-parent\");const e=this.layoutContentCache.getContentItemOrThrow(t);if(!e.isRoot())return e.parent?.contentItems.includes(e)?{type:e.parent.type,entityId:this.layoutContentCache.getOrCreateEntityId(e.parent)}:void 0}}S([(0,E.expose)()],z.prototype,\"getLayoutIdentityForViewOrThrow\",void 0),S([(0,E.expose)()],z.prototype,\"getRoot\",void 0),S([(0,E.expose)()],z.prototype,\"getStackByView\",void 0),S([(0,E.expose)()],z.prototype,\"getStackViews\",void 0),S([(0,E.expose)()],z.prototype,\"getContent\",null),S([(0,E.expose)()],z.prototype,\"getParent\",null),S([(0,E.expose)()],z.prototype,\"isRoot\",void 0),S([(0,E.expose)()],z.prototype,\"exists\",void 0),S([(0,E.expose)()],z.prototype,\"addViewToStack\",void 0),S([(0,E.expose)()],z.prototype,\"removeViewFromStack\",void 0),S([(0,E.expose)()],z.prototype,\"createAdjacentStack\",void 0),S([(0,E.expose)()],z.prototype,\"getAdjacentStacks\",void 0),S([(0,E.expose)()],z.prototype,\"setStackActiveView\",void 0),I.LayoutEntitiesController=z,Object.defineProperty(g,\"__esModule\",{value:!0});var M=g.initLayoutEndpoints=void 0;const P=t.apiExposer,T=t.layout_constants,A=f,k=I,D=i;M=g.initLayoutEndpoints=async function(t,e){const i=t.getFin(),n=await i.Platform.getCurrentSync().getClient(),o=new P.ChannelsExposer(n);await new P.ApiExposer(o).exposeInstance(new k.LayoutEntitiesController(t,e,A.LayoutContentCache.getSingleInstance()),{id:T.LAYOUT_CONTROLLER_ID}),await async function(t,e){const i=t=>async i=>{const n=await D.DefaultLayoutManager.resolveLayout(e,i.target);if(!n)throw new Error(`Could not resolve the layout target from payload ${JSON.stringify(i)}`);return t(n,i)},n=(e,n)=>{t.register(e,i(n))},o=(t,e)=>{n(t,e)};n(\"replace-view\",((t,e)=>t.replaceView(e))),n(\"replace-layout\",((t,{layout:e})=>t.replaceLayout(e))),n(\"add-view\",((t,e)=>t.insertView(e))),o(\"layout-add-view\",((t,{viewOptions:e,location:i,targetView:n})=>t.platformCreateView(e,{location:i,targetView:n}))),n(\"close-view\",((t,e)=>t.cleanupView(e.viewIdentity))),o(\"layout-close-view\",((t,e)=>t.platformCloseView(e.viewIdentity))),n(\"apply-preset-layout\",((t,e)=>t.applyPreset(e))),n(\"get-layout-views\",(t=>t.getCurrentViews())),n(\"get-frame-snapshot\",(t=>t.getFrameSnapshot())),n(\"is-visible\",(t=>t.isVisible())),n(\"destroy\",(t=>t.destroy())),t.register(\"get-layout-snapshot\",(()=>e.getLayoutSnapshot()))}(n,e)};var R={};Object.defineProperty(R,\"__esModule\",{value:!0});var U=R.BaseLayout=void 0;U=R.BaseLayout=class{};var O={};Object.defineProperty(O,\"__esModule\",{value:!0});var V=O.DOMEmitter=void 0;V=O.DOMEmitter=class{constructor(t){this.container=t}dispatchLocalEvent(t,e){const i={...e,type:t,tabSelector:`tab-${e.name}`,containerSelector:`container-${e.name}`,topic:\"openfin-DOM-event\"};this.container.dispatchEvent(new CustomEvent(t,{detail:i}))}};var B={};Object.defineProperty(B,\"__esModule\",{value:!0});var H=B.mapLayoutContentItemsImmutableSync=B.mapLayoutContentItemsImmutable=W=B.isVisible=void 0;var W=B.isVisible=t=>(0!==t.offsetWidth||0!==t.offsetHeight)&&\"hidden\"!==window.getComputedStyle(t).visibility&&t.offsetTop>=0&&t.offsetLeft>=0&&t.offsetTop<=window.innerHeight&&t.offsetLeft<=window.innerWidth;const F=t=>\"type\"in t&&\"component\"===t.type;B.mapLayoutContentItemsImmutable=async function t(e,i){return F(i)?e(i):{...i,content:await Promise.all(i.content?.map((i=>t(e,i))))}},H=B.mapLayoutContentItemsImmutableSync=function t(e,i){return F(i)?e(i):{...i,content:i.content?.map((i=>t(e,i)))}};class N extends Error{constructor(t,e){super(e),this.type=t}}class G extends N{constructor(t,e){super(\"Configuration\",t),this.node=e}}class j extends N{constructor(t){super(\"PopoutBlocked\",t)}}class $ extends N{constructor(t){super(\"API\",t)}}class Z extends N{constructor(t){super(\"Bind\",t)}}class q extends Error{constructor(t,e,i){super(`${t}: ${e}${void 0===i?\"\":\": \"+i}`)}}class X extends q{constructor(t,e){super(\"Assert\",t,e)}}class Y extends q{constructor(t,e,i){super(\"UnreachableCase\",t,`${e}${void 0===i?\"\":\": \"+i}`)}}class K extends q{constructor(t,e){super(\"UnexpectedNull\",t,e)}}class J extends q{constructor(t,e){super(\"UnexpectedUndefined\",t,e)}}var Q;!function(t){let e=!1;const i={PopoutCannotBeCreatedWithGroundItemConfig:{id:0,default:\"Popout cannot be created with ground ItemConfig\"},PleaseRegisterAConstructorFunction:{id:1,default:\"Please register a constructor function\"},ComponentTypeNotRegisteredAndBindComponentEventHandlerNotAssigned:{id:2,default:\"Component type not registered and BindComponentEvent handler not assigned\"},ComponentIsAlreadyRegistered:{id:3,default:\"Component is already registered\"},ComponentIsNotVirtuable:{id:4,default:\"Component is not virtuable. Requires rootHtmlElement field/getter\"},VirtualComponentDoesNotHaveRootHtmlElement:{id:5,default:'Virtual component does not have getter \"rootHtmlElement\"'},ItemConfigIsNotTypeComponent:{id:6,default:\"ItemConfig is not of type component\"},InvalidNumberPartInSizeString:{id:7,default:\"Invalid number part in size string\"},UnknownUnitInSizeString:{id:8,default:\"Unknown unit in size string\"},UnsupportedUnitInSizeString:{id:9,default:\"Unsupported unit in size string\"}};t.idCount=Object.keys(i).length;const n=Object.values(i);t.checkInitialise=function(){if(!e)for(let e=0;e=\"0\"&&t<=\"9\"}function Tt(t,e){const i=zt(e);t.style.width=i}function At(t,e){const i=zt(e);t.style.height=i}function kt(t){return{width:t.offsetWidth,height:t.offsetHeight}}function Dt(t,e){t.style.display=e?\"\":\"none\"}function Rt(t,e){if(void 0!==e)for(const i in e)if(e.hasOwnProperty(i)){const n=e[i],o=t[i];t[i]=Ut(o,n)}return t}function Ut(t,e){if(\"object\"!=typeof e)return e;if(Array.isArray(e)){const t=e.length,i=new Array(t);for(let n=0;n36)throw new Error(\"Too many keys in config minifier map\")},t.translateObject=n}(dt||(dt={})),function(t){t.defaults={type:at.ground,content:[],size:1,sizeUnit:ht.Fractional,minSize:void 0,minSizeUnit:ht.Pixel,id:\"\",isClosable:!0},t.createCopy=function(t,e){switch(t.type){case at.ground:case at.row:case at.column:return gt.createCopy(t,e);case at.stack:return ut.createCopy(t,e);case at.component:return pt.createCopy(t);default:throw new Y(\"CICC91354\",t.type,\"Invalid Config Item type specified\")}},t.createDefault=function(t){switch(t){case at.ground:throw new X(\"CICCDR91562\");case at.row:case at.column:return gt.createDefault(t);case at.stack:return ut.createDefault();case at.component:return pt.createDefault();default:throw new Y(\"CICCDD91563\",t,\"Invalid Config Item type specified\")}},t.isComponentItem=function(t){return t.type===at.component},t.isStackItem=function(t){return t.type===at.stack},t.isGroundItem=function(t){return t.type===at.ground}}(ct||(ct={})),function(t){t.defaultMaximised=!1,function(t){t.createCopy=function(t,e){return void 0===t?void 0:{show:null!=e?e:t.show,popout:t.popout,close:t.close,maximise:t.maximise,minimise:t.minimise,tabDropdown:t.tabDropdown}}}(t.Header||(t.Header={}))}(mt||(mt={})),function(t){function e(t){const e=t.length,i=new Array(e);for(let n=0;n\"__glMaximised\"===t));t>0&&(o=!0,n=n.splice(t,1)),e=n.length>0?n[0]:ct.defaults.id}else e=n;return i=void 0!==t.maximised?t.maximised:o,{id:e,maximised:i}}}(wt||(wt={})),function(t){function e(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0;return{resolved:!0,root:Et.resolve(i),openPopouts:t.resolveOpenPopouts(e.openPopouts),dimensions:t.Dimensions.resolve(e.dimensions),settings:t.Settings.resolve(e.settings),header:t.Header.resolve(e.header,e.settings,e.labels)}}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:Lt.fromResolvedArray(e.openPopouts),settings:_t.Settings.createCopy(e.settings),dimensions:t.Dimensions.fromResolved(e.dimensions),header:_t.Header.createCopy(e.header)}},t.isResolved=function(t){const e=t;return void 0!==e.resolved&&!0===e.resolved},t.resolveOpenPopouts=function(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0,{root:Et.resolve(o),openPopouts:xt.resolveOpenPopouts(e.openPopouts),dimensions:xt.Dimensions.resolve(e.dimensions),settings:xt.Settings.resolve(e.settings),header:xt.Header.resolve(e.header,e.settings,e.labels),parentId:null!==(i=e.parentId)&&void 0!==i?i:null,indexInParent:null!==(n=e.indexInParent)&&void 0!==n?n:null,window:t.Window.resolve(e.window,e.dimensions),resolved:!0}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:i(e.openPopouts),dimensions:xt.Dimensions.fromResolved(e.dimensions),settings:_t.Settings.createCopy(e.settings),header:_t.Header.createCopy(e.header),parentId:e.parentId,indexInParent:e.indexInParent,window:t.Window.fromResolved(e.window)}},t.fromResolvedArray=i}(Lt||(Lt={}));class Wt{constructor(){this._allEventSubscriptions=[],this._subscriptionsMap=new Map,this.unbind=this.removeEventListener,this.trigger=this.emit}tryBubbleEvent(t,e){}emit(t,...e){let i=this._subscriptionsMap.get(t);if(void 0!==i){i=i.slice();for(let t=0;t0){const n=e.slice();n.unshift(t);const o=this._allEventSubscriptions.slice();for(let t=0;t0?n.contentItems[0]:n,e=0);const o=this._layoutManager.createAndInitContentItem(i,t);t.addChild(o,e),this._layoutManager.layoutConfig.settings.popInOnClose?this._onClose():this.close()}createWindow(){const t=this.createUrl(),e=Math.floor(1e6*Math.random()).toString(36),i=this.serializeWindowFeatures({width:this._initialWindowSize.width,height:this._initialWindowSize.height,innerWidth:this._initialWindowSize.width,innerHeight:this._initialWindowSize.height,menubar:\"no\",toolbar:\"no\",location:\"no\",personalbar:\"no\",resizable:\"yes\",scrollbars:\"no\",status:\"no\"});if(this._popoutWindow=globalThis.open(t,e,i),this._popoutWindow)this._popoutWindow.addEventListener(\"load\",(()=>this.positionWindow()),{passive:!0}),this._popoutWindow.addEventListener(\"beforeunload\",(()=>{this._layoutManager.layoutConfig.settings.popInOnClose?this.popIn():this._onClose()}),{passive:!0}),this._checkReadyInterval=setInterval((()=>this.checkReady()),10);else if(!0===this._layoutManager.layoutConfig.settings.blockedPopoutsThrowError){throw new j(\"Popout blocked\")}}checkReady(){if(null===this._popoutWindow)throw new K(\"BPCR01844\");this._popoutWindow.__glInstance&&this._popoutWindow.__glInstance.isInitialised&&(this.onInitialised(),void 0!==this._checkReadyInterval&&(clearInterval(this._checkReadyInterval),this._checkReadyInterval=void 0))}serializeWindowFeatures(t){const e=[];for(const i in t)e.push(i+\"=\"+t[i].toString());return e.join(\",\")}createUrl(){const t=\"gl-window-config-\"+Ot(),e=_t.minifyConfig(this._config);try{localStorage.setItem(t,JSON.stringify(e))}catch(t){throw new Error(\"Error while writing to localStorage \"+function(t){return t instanceof Error?t.message:\"string\"==typeof t?t:\"Unknown Error\"}(t))}const i=new URL(location.href);return i.searchParams.set(\"gl-window\",t),i.toString()}positionWindow(){if(null===this._popoutWindow)throw new Error(\"BrowserPopout.positionWindow: null popoutWindow\");this._popoutWindow.moveTo(this._initialWindowSize.left,this._initialWindowSize.top),this._popoutWindow.focus()}onInitialised(){this._isInitialised=!0,this.getGlInstance().on(\"popIn\",(()=>this.popIn())),this.emit(\"initialised\")}_onClose(){setTimeout((()=>this.emit(\"closed\")),50)}}class Gt extends Wt{constructor(t,e,i,n){super(),this.layoutManager=t,this._parent=i,this._element=n,this._popInParentIds=[],this._type=e.type,this._id=e.id,this._isInitialised=!1,this.isGround=!1,this.isRow=!1,this.isColumn=!1,this.isStack=!1,this.isComponent=!1,this.size=e.size,this.sizeUnit=e.sizeUnit,this.minSize=e.minSize,this.minSizeUnit=e.minSizeUnit,this._isClosable=e.isClosable,this._pendingEventPropagations={},this._throttledEvents=[\"stateChanged\"],this._contentItems=this.createContentItems(e.content)}get type(){return this._type}get id(){return this._id}set id(t){this._id=t}get popInParentIds(){return this._popInParentIds}get parent(){return this._parent}get contentItems(){return this._contentItems}get isClosable(){return this._isClosable}get element(){return this._element}get isInitialised(){return this._isInitialised}static isStack(t){return t.isStack}static isComponentItem(t){return t.isComponent}static isComponentParentableItem(t){return t.isStack||t.isGround}removeChild(t,e=!1){const i=this._contentItems.indexOf(t);if(-1===i)throw new Error(\"Can't remove child item. Unknown content item\");if(e||this._contentItems[i].destroy(),this._contentItems.splice(i,1),this._contentItems.length>0)this.updateSize(!1);else if(!this.isGround&&!0===this._isClosable){if(null===this._parent)throw new K(\"CIUC00874\");this._parent.removeChild(this)}}addChild(t,e,i){return null!=e||(e=this._contentItems.length),this._contentItems.splice(e,0,t),t.setParent(this),!0===this._isInitialised&&!1===t._isInitialised&&t.init(),e}replaceChild(t,e,i=!1){const n=this._contentItems.indexOf(t),o=t._element.parentNode;if(-1===n)throw new X(\"CIRCI23232\",\"Can't replace child. oldChild is not child of this\");if(null===o)throw new K(\"CIRCP23232\");if(o.replaceChild(e._element,t._element),!0===i&&(t._parent=null,t.destroy()),this._contentItems[n]=e,e.setParent(this),e.size=t.size,e.sizeUnit=t.sizeUnit,e.minSize=t.minSize,e.minSizeUnit=t.minSizeUnit,null===e._parent)throw new K(\"CIRCNC45699\");!0===e._parent._isInitialised&&!1===e._isInitialised&&e.init(),this.updateSize(!1)}remove(){if(null===this._parent)throw new K(\"CIR11110\");this._parent.removeChild(this)}popout(){const t=Ot(),e=this.layoutManager.createPopoutFromContentItem(this,void 0,t,void 0);return this.emitBaseBubblingEvent(\"stateChanged\"),e}calculateConfigContent(){const t=this._contentItems,e=t.length,i=new Array(e);for(let n=0;nthis.propagateEventToLayoutManager(t,e))))}propagateEventToLayoutManager(t,e){this._pendingEventPropagations[t]=!1,this.layoutManager.emitUnknown(t,e)}}class jt extends Gt{constructor(t,e,i){super(t,e,i,document.createElement(\"div\")),this._parentItem=i,this._focused=!1,this.isComponent=!0,this._reorderEnabled=e.reorderEnabled,this.applyUpdatableConfig(e),this._initialWantMaximise=e.maximised;const n=document.createElement(\"div\");n.classList.add(\"lm_content\"),this.element.appendChild(n),this._container=new Ft(e,this,t,n,(t=>this.handleUpdateItemConfigEvent(t)),(()=>this.show()),(()=>this.hide()),(t=>this.focus(t)),(t=>this.blur(t)))}get componentName(){return this._container.componentType}get componentType(){return this._container.componentType}get reorderEnabled(){return this._reorderEnabled}get initialWantMaximise(){return this._initialWantMaximise}get component(){return this._container.component}get container(){return this._container}get parentItem(){return this._parentItem}get headerConfig(){return this._headerConfig}get title(){return this._title}get tab(){return this._tab}get focused(){return this._focused}destroy(){this._container.destroy(),super.destroy()}applyUpdatableConfig(t){this.setTitle(t.title),this._headerConfig=t.header}toConfig(){const t=this._container.stateRequestEvent,e=void 0===t?this._container.state:t();return{type:at.component,content:[],size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,maximised:!1,isClosable:this.isClosable,reorderEnabled:this._reorderEnabled,title:this._title,header:mt.Header.createCopy(this._headerConfig),componentType:pt.copyComponentType(this.componentType),componentState:e}}close(){if(null===this.parent)throw new K(\"CIC68883\");this.parent.removeChild(this,!1)}enterDragMode(t,e){Tt(this.element,t),At(this.element,e),this._container.enterDragMode(t,e)}exitDragMode(){this._container.exitDragMode()}enterStackMaximised(){this._container.enterStackMaximised()}exitStackMaximised(){this._container.exitStackMaximised()}drag(){this._container.drag()}updateSize(t){this.updateNodeSize(t)}init(){this.updateNodeSize(!1),super.init(),this._container.emit(\"open\"),this.initContentItems()}setTitle(t){this._title=t,this.emit(\"titleChanged\",t),this.emit(\"stateChanged\")}setTab(t){this._tab=t,this.emit(\"tab\",t),this._container.setTab(t)}hide(){super.hide(),this._container.setVisibility(!1)}show(){super.show(),this._container.setVisibility(!0)}focus(t=!1){this.parentItem.setActiveComponentItem(this,!0,t)}setFocused(t){this._focused=!0,this.tab.setFocused(),t||this.emitBaseBubblingEvent(\"focus\")}blur(t=!1){this._focused&&this.layoutManager.setFocusedComponentItem(void 0,t)}setBlurred(t){this._focused=!1,this.tab.setBlurred(),t||this.emitBaseBubblingEvent(\"blur\")}setParent(t){this._parentItem=t,super.setParent(t)}handleUpdateItemConfigEvent(t){this.applyUpdatableConfig(t)}updateNodeSize(t){if(\"none\"!==this.element.style.display){const{width:e,height:i}=kt(this.element);this._container.setSizeToNodeSize(e,i,t)}}}class $t extends Gt{constructor(){super(...arguments),this._focused=!1}get focused(){return this._focused}setFocusedValue(t){this._focused=t}}class Zt extends Wt{constructor(t,e){super(),this._eElement=t,this._pointerTracking=!1,this._pointerDownEventListener=t=>this.onPointerDown(t),this._pointerMoveEventListener=t=>this.onPointerMove(t),this._pointerUpEventListener=t=>this.onPointerUp(t),this._timeout=void 0,this._allowableTargets=[t,...e],this._oDocument=document,this._eBody=document.body,this._nDelay=1800,this._nDistance=10,this._nX=0,this._nY=0,this._nOriginalX=0,this._nOriginalY=0,this._dragging=!1,this._eElement.addEventListener(\"pointerdown\",this._pointerDownEventListener,{passive:!0})}destroy(){this.checkRemovePointerTrackingEventListeners(),this._eElement.removeEventListener(\"pointerdown\",this._pointerDownEventListener)}cancelDrag(){this.processDragStop(void 0)}onPointerDown(t){if(this._allowableTargets.includes(t.target)&&t.isPrimary){const e=this.getPointerCoordinates(t);this.processPointerDown(e)}}processPointerDown(t){this._nOriginalX=t.x,this._nOriginalY=t.y,this._oDocument.addEventListener(\"pointermove\",this._pointerMoveEventListener),this._oDocument.addEventListener(\"pointerup\",this._pointerUpEventListener,{passive:!0}),this._pointerTracking=!0,this._timeout=setTimeout((()=>{try{this.startDrag()}catch(t){throw console.error(t),t}}),this._nDelay)}onPointerMove(t){this._pointerTracking&&(this.processDragMove(t),t.preventDefault())}processDragMove(t){this._nX=t.pageX-this._nOriginalX,this._nY=t.pageY-this._nOriginalY,!1===this._dragging&&(Math.abs(this._nX)>this._nDistance||Math.abs(this._nY)>this._nDistance)&&this.startDrag(),this._dragging&&this.emit(\"drag\",this._nX,this._nY,t)}onPointerUp(t){this.processDragStop(t)}processDragStop(t){var e;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this.checkRemovePointerTrackingEventListeners(),!0===this._dragging&&(this._eBody.classList.remove(\"lm_dragging\"),this._eElement.classList.remove(\"lm_dragging\"),null===(e=this._oDocument.querySelector(\"iframe\"))||void 0===e||e.style.setProperty(\"pointer-events\",\"\"),this._dragging=!1,this.emit(\"dragStop\",t))}checkRemovePointerTrackingEventListeners(){this._pointerTracking&&(this._oDocument.removeEventListener(\"pointermove\",this._pointerMoveEventListener),this._oDocument.removeEventListener(\"pointerup\",this._pointerUpEventListener),this._pointerTracking=!1)}startDrag(){var t;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this._dragging=!0,this._eBody.classList.add(\"lm_dragging\"),this._eElement.classList.add(\"lm_dragging\"),null===(t=this._oDocument.querySelector(\"iframe\"))||void 0===t||t.style.setProperty(\"pointer-events\",\"none\"),this.emit(\"dragStart\",this._nOriginalX,this._nOriginalY)}getPointerCoordinates(t){return{x:t.pageX,y:t.pageY}}}class qt{constructor(t,e,i){this._isVertical=t,this._size=e,this._grabSize=i0){const i=this.createSplitter(Math.max(0,e-1)).element;e>0?(this.contentItems[e-1].element.insertAdjacentElement(\"afterend\",i),i.insertAdjacentElement(\"afterend\",t.element)):(this.contentItems[0].element.insertAdjacentElement(\"beforebegin\",i),i.insertAdjacentElement(\"beforebegin\",t.element))}else this._childElementContainer.appendChild(t.element);super.addChild(t,e);const n=1/this.contentItems.length*100;if(!0===i)return this.emitBaseBubblingEvent(\"stateChanged\"),e;for(let e=0;e0&&(this.calculateRelativeSizes(),this.setAbsoluteSizes()),this.emitBaseBubblingEvent(\"stateChanged\"),this.emit(\"resize\")}setAbsoluteSizes(){const t=this.calculateAbsoluteSizes();for(let e=0;e0&&t.itemSizes[e]++,this._isColumn?(Tt(this.contentItems[e].element,t.crossAxisSize),At(this.contentItems[e].element,t.itemSizes[e])):(Tt(this.contentItems[e].element,t.itemSizes[e]),At(this.contentItems[e].element,t.crossAxisSize))}calculateAbsoluteSizes(){const t=(this.contentItems.length-1)*this._splitterSize,{width:e,height:i}=kt(this.element);let n,o;this._isColumn?(n=i-t,o=e):(n=e-t,o=i);let s=0;const r=[];for(let t=0;t0){const n=100-t;for(let t=0;t100&&e.length>0){for(let t=0;te)return;{const r=i/e;let a=i;for(let e=0;ethis.onSplitterDrag(e,t,i))),e.on(\"dragStop\",(()=>this.onSplitterDragStop(e))),e.on(\"dragStart\",(()=>this.onSplitterDragStart(e))),this._splitter.splice(t,0,e),e}getSplitItems(t){const e=this._splitter.indexOf(t);return{before:this.contentItems[e],after:this.contentItems[e+1]}}calculateContentItemMinSize(t){const e=t.minSize;if(void 0!==e){if(t.minSizeUnit===ht.Pixel)return e;throw new X(\"ROCGMD98831\",JSON.stringify(t))}{const t=this.layoutManager.layoutConfig.dimensions;return this._isColumn?t.defaultMinItemHeight:t.defaultMinItemWidth}}calculateContentItemsTotalMinSize(t){let e=0;for(const i of t)e+=this.calculateContentItemMinSize(i);return e}onSplitterDragStart(t){const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=this.calculateContentItemsTotalMinSize(e.before.contentItems),s=this.calculateContentItemsTotalMinSize(e.after.contentItems);this._splitterPosition=0,this._splitterMinPosition=-1*(i-o),this._splitterMaxPosition=n-s}onSplitterDrag(t,e,i){let n=this._isColumn?i:e;if(null===this._splitterMinPosition||null===this._splitterMaxPosition)throw new K(\"ROCOSD59226\");n=Math.max(n,this._splitterMinPosition),n=Math.min(n,this._splitterMaxPosition),this._splitterPosition=n;const o=zt(n);this._isColumn?t.element.style.top=o:t.element.style.left=o}onSplitterDragStop(t){if(null===this._splitterPosition)throw new K(\"ROCOSDS66932\");{const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=(this._splitterPosition+i)/(i+n),s=e.before.size+e.after.size;e.before.size=o*s,e.after.size=(1-o)*s,t.element.style.top=zt(0),t.element.style.left=zt(0),globalThis.requestAnimationFrame((()=>this.updateSize(!1)))}}}!function(t){t.getElementDimensionSize=function(t,e){return\"width\"===e?function(t){return t.offsetWidth}(t):function(t){return t.offsetHeight}(t)},t.setElementDimensionSize=function(t,e,i){return\"width\"===e?Tt(t,i):At(t,i)},t.createElement=function(t,e){const i=t.createElement(\"div\");return i.classList.add(\"lm_item\"),e?i.classList.add(\"lm_column\"):i.classList.add(\"lm_row\"),i}}(Xt||(Xt={}));class Yt extends $t{constructor(t,e,i){super(t,vt.create(e),null,Yt.createElement(document)),this.isGround=!0,this._childElementContainer=this.element,this._containerElement=i;let n=null;for(;;){const t=n?n.previousSibling:this._containerElement.lastChild;if(!(t instanceof Element&&t.classList.contains(\"lm_content\")))break;n=t}this._containerElement.insertBefore(this.element,n)}init(){if(!0!==this.isInitialised){this.updateNodeSize();for(let t=0;t0?this.contentItems[0]:this,n.isComponent)throw new Error(\"Cannot add item as child to ComponentItem\");{const t=this.layoutManager.createAndInitContentItem(i,n);return e=n.addChild(t,e),n===this?-1:e}}loadComponentAsRoot(t){this.clearRoot();const e=Ct.resolve(t,!1);if(e.maximised)throw new Error(\"Root Component cannot be maximised\");{const t=new jt(this.layoutManager,e,this);t.init(),this.addChild(t,0)}}addChild(t,e){if(this.contentItems.length>0)throw new Error(\"Ground node can only have a single child\");return this._childElementContainer.appendChild(t.element),e=super.addChild(t,e),this.updateSize(!1),this.emitBaseBubblingEvent(\"stateChanged\"),e}calculateConfigContent(){const t=this.contentItems,e=t.length,i=new Array(e);for(let n=0;n0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e)),this.updateContentItemsSize(!1))}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}createSideAreas(){const t=Yt.Area.oppositeSides,e=new Array(Object.keys(t).length);let i=0;for(const n in t){const o=n,s=this.getElementArea();if(null===s)throw new K(\"RCSA77553\");s.side=o,\"2\"===t[o][1]?s[o]=s[t[o]]-50:s[o]=s[t[o]]+50,s.surface=(s.x2-s.x1)*(s.y2-s.y1),e[i++]=s}return e}highlightDropZone(t,e,i){this.layoutManager.tabDropPlaceholder.remove(),super.highlightDropZone(t,e,i)}onDrop(t,e){if(t.isComponent){const e=ut.createDefault(),i=t;e.header=mt.Header.createCopy(i.headerConfig);const n=this.layoutManager.createAndInitContentItem(e,this);n.addChild(t),t=n}if(0===this.contentItems.length)this.addChild(t);else{if(t.type===at.row||t.type===at.column){const e=ut.createDefault(),i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}const i=\"x\"==e.side[0]?at.row:at.column,n=\"2\"==e.side[1],o=this.contentItems[0];if(o instanceof Xt&&o.type===i){const e=o.contentItems[n?0:o.contentItems.length-1];o.addChild(t,n?0:void 0,!0),e.size*=.5,t.size=e.size,t.sizeUnit=ht.Percent,o.updateSize(!1)}else{const e=ct.createDefault(i),s=this.layoutManager.createContentItem(e,this);this.replaceChild(o,s),s.addChild(t,n?0:void 0,!0),s.addChild(o,n?void 0:0,!0),o.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}}dock(){throw new X(\"GID87731\")}validateDocking(){throw new X(\"GIVD87732\")}getAllContentItems(){const t=[this];return this.deepGetAllContentItems(this.contentItems,t),t}getConfigMaximisedItems(){const t=[];return this.deepFilterContentItems(this.contentItems,t,(t=>!(!Gt.isStack(t)||!t.initialWantMaximise)||!(!Gt.isComponentItem(t)||!t.initialWantMaximise))),t}getItemsByPopInParentId(t){const e=[];return this.deepFilterContentItems(this.contentItems,e,(e=>e.popInParentIds.includes(t))),e}toConfig(){throw new Error(\"Cannot generate GroundItem config\")}setActiveComponentItem(t,e,i){}updateNodeSize(){const{width:t,height:e}=kt(this._containerElement);Tt(this.element,t),At(this.element,e),this.contentItems.length>0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e))}deepGetAllContentItems(t,e){for(let i=0;ithis.onClick(t),this._touchStartEventListener=t=>this.onTouchStart(t),this._element=document.createElement(\"div\"),this._element.classList.add(i),this._element.title=e,this._header.on(\"destroy\",(()=>this.destroy())),this._element.addEventListener(\"click\",this._clickEventListener,{passive:!0}),this._element.addEventListener(\"touchstart\",this._touchStartEventListener,{passive:!0}),this._header.controlsContainerElement.appendChild(this._element)}get element(){return this._element}destroy(){var t;this._element.removeEventListener(\"click\",this._clickEventListener),this._element.removeEventListener(\"touchstart\",this._touchStartEventListener),null===(t=this._element.parentNode)||void 0===t||t.removeChild(this._element)}onClick(t){this._pushEvent(t)}onTouchStart(t){this._pushEvent(t)}}class Jt{constructor(t,e,i,n,o){var s;this._layoutManager=t,this._componentItem=e,this._closeEvent=i,this._focusEvent=n,this._dragStartEvent=o,this._isActive=!1,this._tabClickListener=t=>this.onTabClickDown(t),this._tabTouchStartListener=t=>this.onTabTouchStart(t),this._closeClickListener=()=>this.onCloseClick(),this._closeTouchStartListener=()=>this.onCloseTouchStart(),this._dragStartListener=(t,e)=>this.onDragStart(t,e),this._contentItemDestroyListener=()=>this.onContentItemDestroy(),this._tabTitleChangedListener=t=>this.setTitle(t),this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_tab\"),this._titleElement=document.createElement(\"span\"),this._titleElement.classList.add(\"lm_title\"),this._closeElement=document.createElement(\"div\"),this._closeElement.classList.add(\"lm_close_tab\"),this._element.appendChild(this._titleElement),this._element.appendChild(this._closeElement),e.isClosable?this._closeElement.style.display=\"\":this._closeElement.style.display=\"none\",this.setTitle(e.title),this._componentItem.on(\"titleChanged\",this._tabTitleChangedListener);(null!==(s=e.reorderEnabled)&&void 0!==s?s:this._layoutManager.layoutConfig.settings.reorderEnabled)&&this.enableReorder(),this._element.addEventListener(\"click\",this._tabClickListener,{passive:!0}),this._element.addEventListener(\"touchstart\",this._tabTouchStartListener,{passive:!0}),this._componentItem.isClosable?(this._closeElement.addEventListener(\"click\",this._closeClickListener,{passive:!0}),this._closeElement.addEventListener(\"touchstart\",this._closeTouchStartListener,{passive:!0})):(this._closeElement.remove(),this._closeElement=void 0),this._componentItem.setTab(this),this._layoutManager.emit(\"tabCreated\",this)}get isActive(){return this._isActive}get componentItem(){return this._componentItem}get contentItem(){return this._componentItem}get element(){return this._element}get titleElement(){return this._titleElement}get closeElement(){return this._closeElement}get reorderEnabled(){return void 0!==this._dragListener}set reorderEnabled(t){t!==this.reorderEnabled&&(t?this.enableReorder():this.disableReorder())}setTitle(t){this._titleElement.innerText=t,this._element.title=t}setActive(t){t!==this._isActive&&(this._isActive=t,t?this._element.classList.add(\"lm_active\"):this._element.classList.remove(\"lm_active\"))}destroy(){var t,e;this._closeEvent=void 0,this._focusEvent=void 0,this._dragStartEvent=void 0,this._element.removeEventListener(\"click\",this._tabClickListener),this._element.removeEventListener(\"touchstart\",this._tabTouchStartListener),null===(t=this._closeElement)||void 0===t||t.removeEventListener(\"click\",this._closeClickListener),null===(e=this._closeElement)||void 0===e||e.removeEventListener(\"touchstart\",this._closeTouchStartListener),this._componentItem.off(\"titleChanged\",this._tabTitleChangedListener),this.reorderEnabled&&this.disableReorder(),this._element.remove()}setBlurred(){this._element.classList.remove(\"lm_focused\"),this._titleElement.classList.remove(\"lm_focused\")}setFocused(){this._element.classList.add(\"lm_focused\"),this._titleElement.classList.add(\"lm_focused\")}onDragStart(t,e){if(void 0===this._dragListener)throw new J(\"TODSDLU10093\");if(void 0===this._dragStartEvent)throw new J(\"TODS23309\");this._dragStartEvent(t,e,this._dragListener,this.componentItem)}onContentItemDestroy(){void 0!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=void 0)}onTabClickDown(t){const e=t.target;e!==this._element&&e!==this._titleElement||(0===t.button?this.notifyFocus():1===t.button&&this._componentItem.isClosable&&this.notifyClose())}onTabTouchStart(t){t.target===this._element&&this.notifyFocus()}onCloseClick(){this.notifyClose()}onCloseTouchStart(){this.notifyClose()}notifyClose(){if(void 0===this._closeEvent)throw new J(\"TNC15007\");this._closeEvent(this._componentItem)}notifyFocus(){if(void 0===this._focusEvent)throw new J(\"TNA15007\");this._focusEvent(this._componentItem)}enableReorder(){this._dragListener=new Zt(this._element,[this._titleElement]),this._dragListener.on(\"dragStart\",this._dragStartListener),this._componentItem.on(\"destroy\",this._contentItemDestroyListener)}disableReorder(){if(void 0===this._dragListener)throw new J(\"TDR87745\");this._componentItem.off(\"destroy\",this._contentItemDestroyListener),this._dragListener.off(\"dragStart\",this._dragStartListener),this._dragListener=void 0}}class Qt{constructor(t,e,i,n,o){this._layoutManager=t,this._componentRemoveEvent=e,this._componentFocusEvent=i,this._componentDragStartEvent=n,this._dropdownActiveChangedEvent=o,this._tabs=[],this._lastVisibleTabIndex=-1,this._dropdownActive=!1,this._element=document.createElement(\"section\"),this._element.classList.add(\"lm_tabs\"),this._dropdownElement=document.createElement(\"section\"),this._dropdownElement.classList.add(\"lm_tabdropdown_list\"),this._dropdownElement.style.display=\"none\"}get tabs(){return this._tabs}get tabCount(){return this._tabs.length}get lastVisibleTabIndex(){return this._lastVisibleTabIndex}get element(){return this._element}get dropdownElement(){return this._dropdownElement}get dropdownActive(){return this._dropdownActive}destroy(){for(let t=0;tthis.handleTabCloseEvent(t)),(t=>this.handleTabFocusEvent(t)),((t,e,i,n)=>this.handleTabDragStartEvent(t,e,i,n)));void 0===e&&(e=this._tabs.length),this._tabs.splice(e,0,i),ethis._lastVisibleTabIndex){const t=this._tabs[e];for(let t=e;t>0;t--)this._tabs[t]=this._tabs[t-1];this._tabs[0]=t}}updateTabSizes(t,e){let i=!1;this.tryUpdateTabSizes(i,t,e)||(i=!0,this.tryUpdateTabSizes(i,t,e)),i!==this._dropdownActive&&(this._dropdownActive=i,this._dropdownActiveChangedEvent())}tryUpdateTabSizes(t,e,i){if(this._tabs.length>0){if(void 0===i)throw new Error(\"non-empty tabs must have active component item\");let n=0,o=!1;const s=this._layoutManager.layoutConfig.settings.tabOverlapAllowance,r=this._tabs.indexOf(i.tab),a=this._tabs[r];this._lastVisibleTabIndex=-1;for(let i=0;ie){if(o)i===r&&(l.style.zIndex=\"auto\",l.style.marginLeft=\"\",l.parentElement!==this._element&&this._element.appendChild(l));else{let t;if(t=r>0&&r<=i?(d-e)/(i-1):(d-e)/i,tthis.onClick(t),this._touchStartListener=t=>this.onTouchStart(t),this._rowColumnClosable=!0,this._closeButton=null,this._popoutButton=null,this._tabsContainer=new Qt(this._layoutManager,(t=>this.handleTabInitiatedComponentRemoveEvent(t)),(t=>this.handleTabInitiatedComponentFocusEvent(t)),((t,e,i,n)=>this.handleTabInitiatedDragStartEvent(t,e,i,n)),(()=>this.processTabDropdownActiveChanged())),this._show=i.show,this._popoutEnabled=i.popoutEnabled,this._popoutLabel=i.popoutLabel,this._maximiseEnabled=i.maximiseEnabled,this._maximiseLabel=i.maximiseLabel,this._minimiseEnabled=i.minimiseEnabled,this._minimiseLabel=i.minimiseLabel,this._closeEnabled=i.closeEnabled,this._closeLabel=i.closeLabel,this._tabDropdownEnabled=i.tabDropdownEnabled,this._tabDropdownLabel=i.tabDropdownLabel,this.setSide(i.side),this._canRemoveComponent=this._configClosable,this._element=document.createElement(\"section\"),this._element.classList.add(\"lm_header\"),this._controlsContainerElement=document.createElement(\"section\"),this._controlsContainerElement.classList.add(\"lm_controls\"),this._element.appendChild(this._tabsContainer.element),this._element.appendChild(this._controlsContainerElement),this._element.appendChild(this._tabsContainer.dropdownElement),this._element.addEventListener(\"click\",this._clickListener,{passive:!0}),this._element.addEventListener(\"touchstart\",this._touchStartListener,{passive:!0}),this._documentMouseUpListener=()=>this._tabsContainer.hideAdditionalTabsDropdown(),globalThis.document.addEventListener(\"mouseup\",this._documentMouseUpListener,{passive:!0}),this._tabControlOffset=this._layoutManager.layoutConfig.settings.tabControlOffset,this._tabDropdownEnabled&&(this._tabDropdownButton=new Kt(this,this._tabDropdownLabel,\"lm_tabdropdown\",(()=>this._tabsContainer.showAdditionalTabsDropdown()))),this._popoutEnabled&&(this._popoutButton=new Kt(this,this._popoutLabel,\"lm_popout\",(()=>this.handleButtonPopoutEvent()))),this._maximiseEnabled&&(this._maximiseButton=new Kt(this,this._maximiseLabel,\"lm_maximise\",(t=>this.handleButtonMaximiseToggleEvent(t)))),this._configClosable&&(this._closeButton=new Kt(this,this._closeLabel,\"lm_close\",(()=>s()))),this.processTabDropdownActiveChanged()}get show(){return this._show}get side(){return this._side}get leftRightSided(){return this._leftRightSided}get layoutManager(){return this._layoutManager}get parent(){return this._parent}get tabs(){return this._tabsContainer.tabs}get lastVisibleTabIndex(){return this._tabsContainer.lastVisibleTabIndex}get element(){return this._element}get tabsContainerElement(){return this._tabsContainer.element}get controlsContainerElement(){return this._controlsContainerElement}destroy(){this.emit(\"destroy\"),this._popoutEvent=void 0,this._maximiseToggleEvent=void 0,this._clickEvent=void 0,this._touchStartEvent=void 0,this._componentRemoveEvent=void 0,this._componentFocusEvent=void 0,this._componentDragStartEvent=void 0,this._tabsContainer.destroy(),globalThis.document.removeEventListener(\"mouseup\",this._documentMouseUpListener),this._element.remove()}createTab(t,e){this._tabsContainer.createTab(t,e)}removeTab(t){this._tabsContainer.removeTab(t)}processActiveComponentChanged(t){this._tabsContainer.processActiveComponentChanged(t),this.updateTabSizes()}setSide(t){this._side=t,this._leftRightSided=[nt.right,nt.left].includes(this._side)}setRowColumnClosable(t){this._rowColumnClosable=t,this.updateClosability()}updateClosability(){let t;if(this._configClosable)if(this._rowColumnClosable){t=!0;const e=this.tabs.length;for(let i=0;i1}applyFocusedValue(t){t?this._element.classList.add(\"lm_focused\"):this._element.classList.remove(\"lm_focused\")}processMaximised(){if(void 0===this._maximiseButton)throw new J(\"HPMAX16997\");this._maximiseButton.element.setAttribute(\"title\",this._minimiseLabel)}processMinimised(){if(void 0===this._maximiseButton)throw new J(\"HPMIN16997\");this._maximiseButton.element.setAttribute(\"title\",this._maximiseLabel)}updateTabSizes(){if(this._tabsContainer.tabCount>0){const t=this._show?this._layoutManager.layoutConfig.dimensions.headerHeight:0;let e;this._leftRightSided?(this._element.style.height=\"\",this._element.style.width=zt(t)):(this._element.style.width=\"\",this._element.style.height=zt(t)),e=this._leftRightSided?this._element.offsetHeight-this._controlsContainerElement.offsetHeight-this._tabControlOffset:this._element.offsetWidth-this._controlsContainerElement.offsetWidth-this._tabControlOffset,this._tabsContainer.updateTabSizes(e,this._getActiveComponentItemEvent())}}handleTabInitiatedComponentRemoveEvent(t){if(this._canRemoveComponent){if(void 0===this._componentRemoveEvent)throw new J(\"HHTCE22294\");this._componentRemoveEvent(t)}}handleTabInitiatedComponentFocusEvent(t){if(void 0===this._componentFocusEvent)throw new J(\"HHTAE22294\");this._componentFocusEvent(t)}handleTabInitiatedDragStartEvent(t,e,i,n){if(this._canRemoveComponent){if(void 0===this._componentDragStartEvent)throw new J(\"HHTDSE22294\");this._componentDragStartEvent(t,e,i,n)}else i.cancelDrag()}processTabDropdownActiveChanged(){void 0!==this._tabDropdownButton&&Dt(this._tabDropdownButton.element,this._tabsContainer.dropdownActive)}handleButtonPopoutEvent(){if(this._layoutManager.layoutConfig.settings.popoutWholeStack){if(void 0===this._popoutEvent)throw new J(\"HHBPOE17834\");this._popoutEvent()}else{const t=this._getActiveComponentItemEvent();t&&t.popout()}}handleButtonMaximiseToggleEvent(t){if(void 0===this._maximiseToggleEvent)throw new J(\"HHBMTE16834\");this._maximiseToggleEvent()}onClick(t){t.target===this._element&&this.notifyClick(t)}onTouchStart(t){t.target===this._element&&this.notifyTouchStart(t)}notifyClick(t){if(void 0===this._clickEvent)throw new J(\"HNHC46834\");this._clickEvent(t)}notifyTouchStart(t){if(void 0===this._touchStartEvent)throw new J(\"HNHTS46834\");this._touchStartEvent(t)}}class ee extends $t{constructor(t,e,i){var n,o,s,r,a,l,h,d,c,m,u,p,g,f,v,_,y,C,w;super(t,e,i,ee.createElement(document)),this._headerSideChanged=!1,this._resizeListener=()=>this.handleResize(),this._maximisedListener=()=>this.handleMaximised(),this._minimisedListener=()=>this.handleMinimised(),this._headerConfig=e.header;const I=t.layoutConfig.header,b=e.content;let S;if(1!==b.length)S=void 0;else{S=b[0].header}this._initialWantMaximise=e.maximised,this._initialActiveItemIndex=null!==(n=e.activeItemIndex)&&void 0!==n?n:0;const E=null!==(r=null!==(s=null===(o=this._headerConfig)||void 0===o?void 0:o.show)&&void 0!==s?s:null==S?void 0:S.show)&&void 0!==r?r:I.show,x=null!==(h=null!==(l=null===(a=this._headerConfig)||void 0===a?void 0:a.popout)&&void 0!==l?l:null==S?void 0:S.popout)&&void 0!==h?h:I.popout,L=null!==(m=null!==(c=null===(d=this._headerConfig)||void 0===d?void 0:d.maximise)&&void 0!==c?c:null==S?void 0:S.maximise)&&void 0!==m?m:I.maximise,z=null!==(g=null!==(p=null===(u=this._headerConfig)||void 0===u?void 0:u.close)&&void 0!==p?p:null==S?void 0:S.close)&&void 0!==g?g:I.close,M=null!==(_=null!==(v=null===(f=this._headerConfig)||void 0===f?void 0:f.minimise)&&void 0!==v?v:null==S?void 0:S.minimise)&&void 0!==_?_:I.minimise,P=null!==(w=null!==(C=null===(y=this._headerConfig)||void 0===y?void 0:y.tabDropdown)&&void 0!==C?C:null==S?void 0:S.tabDropdown)&&void 0!==w?w:I.tabDropdown;this._maximisedEnabled=!1!==L;const T={show:!1!==E,side:!1===E?nt.top:E,popoutEnabled:!1!==x,popoutLabel:!1===x?\"\":x,maximiseEnabled:this._maximisedEnabled,maximiseLabel:!1===L?\"\":L,closeEnabled:!1!==z,closeLabel:!1===z?\"\":z,minimiseEnabled:!0,minimiseLabel:M,tabDropdownEnabled:!1!==P,tabDropdownLabel:!1===P?\"\":P};this._header=new te(t,this,T,e.isClosable&&!1!==z,(()=>this.getActiveComponentItem()),(()=>this.remove()),(()=>this.handlePopoutEvent()),(()=>this.toggleMaximise()),(t=>this.handleHeaderClickEvent(t)),(t=>this.handleHeaderTouchStartEvent(t)),(t=>this.handleHeaderComponentRemoveEvent(t)),(t=>this.handleHeaderComponentFocusEvent(t)),((t,e,i,n)=>this.handleHeaderComponentStartDragEvent(t,e,i,n))),this.isStack=!0,this._childElementContainer=document.createElement(\"section\"),this._childElementContainer.classList.add(\"lm_items\"),this.on(\"resize\",this._resizeListener),this._maximisedEnabled&&(this.on(\"maximised\",this._maximisedListener),this.on(\"minimised\",this._minimisedListener)),this.element.appendChild(this._header.element),this.element.appendChild(this._childElementContainer),this.setupHeaderPosition(),this._header.updateClosability()}get childElementContainer(){return this._childElementContainer}get header(){return this._header}get headerShow(){return this._header.show}get headerSide(){return this._header.side}get headerLeftRightSided(){return this._header.leftRightSided}get contentAreaDimensions(){return this._contentAreaDimensions}get initialWantMaximise(){return this._initialWantMaximise}get isMaximised(){return this===this.layoutManager.maximisedStack}get stackParent(){if(!this.parent)throw new Error(\"Stack should always have a parent\");return this.parent}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}init(){if(!0===this.isInitialised)return;this.updateNodeSize();for(let t=0;t0){if(this._initialActiveItemIndex<0||this._initialActiveItemIndex>=e)throw new Error(`ActiveItemIndex out of range: ${this._initialActiveItemIndex} id: ${this.id}`);for(let i=0;ithis.contentItems.length)throw e-=1,new X(\"SAC99728\");if(t instanceof jt)return e=super.addChild(t,e),this._childElementContainer.appendChild(t.element),this._header.createTab(t,e),this.setActiveComponentItem(t,i),this._header.updateTabSizes(),this.updateSize(!1),t.container.setBaseLogicalZIndex(),this._header.updateClosability(),this.emitStateChangedEvent(),e;throw new X(\"SACC88532\")}removeChild(t,e){const i=t,n=this.contentItems.indexOf(i),o=1===this.contentItems.length;if(this._activeComponentItem===i&&(i.focused&&i.blur(),!o)){const t=0===n?1:n-1;this.setActiveComponentItem(this.contentItems[t],!1)}this._header.removeTab(i),super.removeChild(i,e),o||this._header.updateClosability(),this.emitStateChangedEvent()}toggleMaximise(){this.isMaximised?this.minimise():this.maximise()}maximise(){if(!this.isMaximised){this.layoutManager.setMaximisedStack(this);const t=this.contentItems,e=t.length;for(let i=0;i0&&void 0===t)throw new Error(\"expected non-empty stack to have an active component item\");return{type:\"stack\",content:this.calculateConfigContent(),size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,isClosable:this.isClosable,maximised:this.isMaximised,header:this.createHeaderConfig(),activeItemIndex:t}}onDrop(t,e){if(\"header\"===this._dropSegment){if(this.resetHeaderDropZone(),void 0===this._dropIndex)throw new J(\"SODDI68990\");return void this.addChild(t,this._dropIndex)}if(\"body\"===this._dropSegment)return void this.addChild(t,0,!0);const i=\"top\"===this._dropSegment||\"bottom\"===this._dropSegment,n=\"left\"===this._dropSegment||\"right\"===this._dropSegment,o=\"top\"===this._dropSegment||\"left\"===this._dropSegment,s=i&&this.stackParent.isColumn||n&&this.stackParent.isRow;if(t.isComponent){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createAndInitContentItem(e,this);i.addChild(t),t=i}if(t.type===at.row||t.type===at.column){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}if(s){const e=this.stackParent.contentItems.indexOf(this);this.stackParent.addChild(t,o?e:e+1,!0),this.size*=.5,t.size=this.size,t.sizeUnit=this.sizeUnit,this.stackParent.updateSize(!1)}else{const e=i?at.column:at.row,n=ct.createDefault(e),s=this.layoutManager.createContentItem(n,this);this.stackParent.replaceChild(this,s),s.addChild(t,o?0:void 0,!0),s.addChild(this,o?void 0:0,!0),this.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}highlightDropZone(t,e){for(const i in this._contentAreaDimensions){const n=i,o=this._contentAreaDimensions[n].hoverArea;if(o.x1t&&o.y1e)return void(\"header\"===n?(this._dropSegment=\"header\",this.highlightHeaderDropZone(this._header.leftRightSided?e:t)):(this.resetHeaderDropZone(),this.highlightBodyDropZone(n)))}}getArea(){if(\"none\"===this.element.style.display)return null;const t=super.getElementArea(this._header.element),e=super.getElementArea(this._childElementContainer);if(null===t||null===e)throw new K(\"SGAHC13086\");const i=e.x2-e.x1,n=e.y2-e.y1;return this._contentAreaDimensions={header:{hoverArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2},highlightArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2}}},0===this.contentItems.length?(this._contentAreaDimensions.body={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2}},super.getElementArea(this.element)):(this._contentAreaDimensions.left={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x1+.25*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x1+.5*i,y2:e.y2}},this._contentAreaDimensions.top={hoverArea:{x1:e.x1+.25*i,y1:e.y1,x2:e.x1+.75*i,y2:e.y1+.5*n},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y1+.5*n}},this._contentAreaDimensions.right={hoverArea:{x1:e.x1+.75*i,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1+.5*i,y1:e.y1,x2:e.x2,y2:e.y2}},this._contentAreaDimensions.bottom={hoverArea:{x1:e.x1+.25*i,y1:e.y1+.5*n,x2:e.x1+.75*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1+.5*n,x2:e.x2,y2:e.y2}},super.getElementArea(this.element))}positionHeader(t){this._header.side!==t&&(this._header.setSide(t),this._headerSideChanged=!0,this.setupHeaderPosition())}updateNodeSize(){if(\"none\"!==this.element.style.display){const t=kt(this.element);if(this._header.show){t[this._header.leftRightSided?it.width:it.height]-=this.layoutManager.layoutConfig.dimensions.headerHeight}this._childElementContainer.style.width=zt(t.width),this._childElementContainer.style.height=zt(t.height);for(let e=0;e=o&&tthis.onDrag(t,e,i))),this._dragListener.on(\"dragStop\",(()=>this.onDrop())),this.createDragProxyElements(t,e),null===this._componentItem.parent)throw new K(\"DPC10097\");this._componentItemFocused=this._componentItem.focused,this._componentItemFocused&&this._componentItem.blur(),this._componentItem.parent.removeChild(this._componentItem,!0),this.setDimensions(),document.body.appendChild(this._element),this.determineMinMaxXY(),this._layoutManager.calculateItemAreas(),this.setDropPosition(t,e)}get element(){return this._element}createDragProxyElements(t,e){this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_dragProxy\");const i=document.createElement(\"div\");i.classList.add(\"lm_header\");const n=document.createElement(\"div\");n.classList.add(\"lm_tabs\");const o=document.createElement(\"div\");o.classList.add(\"lm_tab\");const s=document.createElement(\"span\");s.classList.add(\"lm_title\"),o.appendChild(s),n.appendChild(o),i.appendChild(n),this._proxyContainerElement=document.createElement(\"div\"),this._proxyContainerElement.classList.add(\"lm_content\"),this._element.appendChild(i),this._element.appendChild(this._proxyContainerElement),this._originalParent instanceof ee&&this._originalParent.headerShow&&(this._sided=this._originalParent.headerLeftRightSided,this._element.classList.add(\"lm_\"+this._originalParent.headerSide),[nt.right,nt.bottom].indexOf(this._originalParent.headerSide)>=0&&this._proxyContainerElement.insertAdjacentElement(\"afterend\",i)),this._element.style.left=zt(t),this._element.style.top=zt(e),o.setAttribute(\"title\",this._componentItem.title),s.insertAdjacentText(\"afterbegin\",this._componentItem.title),this._proxyContainerElement.appendChild(this._componentItem.element)}determineMinMaxXY(){const t=this._layoutManager.groundItem;if(void 0===t)throw new J(\"DPDMMXY73109\");{const e=t.element.getBoundingClientRect();this._minX=e.left+document.body.scrollLeft,this._minY=e.top+document.body.scrollTop,this._maxX=this._minX+e.width,this._maxY=this._minY+e.height}}onDrag(t,e,i){const n=i.pageX,o=i.pageY;this.setDropPosition(n,o),this._componentItem.drag()}setDropPosition(t,e){this._layoutManager.layoutConfig.settings.constrainDragToContainer&&(t<=this._minX?t=Math.ceil(this._minX):t>=this._maxX&&(t=Math.floor(this._maxX)),e<=this._minY?e=Math.ceil(this._minY):e>=this._maxY&&(e=Math.floor(this._maxY))),this._element.style.left=zt(t),this._element.style.top=zt(e),this._area=this._layoutManager.getArea(t,e),null!==this._area&&(this._lastValidArea=this._area,this._area.contentItem.highlightDropZone(t,e,this._area))}onDrop(){const t=this._layoutManager.dropTargetIndicator;if(null===t)throw new K(\"DPOD30011\");let e;if(t.hide(),this._componentItem.exitDragMode(),null!==this._area)e=this._componentItem,this._area.contentItem.onDrop(e,this._area);else if(null!==this._lastValidArea){e=this._componentItem;this._lastValidArea.contentItem.onDrop(e,this._lastValidArea)}else this._originalParent?(e=this._componentItem,this._originalParent.addChild(e)):this._componentItem.destroy();this._element.remove(),this._layoutManager.emit(\"itemDropped\",this._componentItem),this._componentItemFocused&&void 0!==e&&e.focus()}setDimensions(){const t=this._layoutManager.layoutConfig.dimensions;if(void 0===t)throw new Error(\"DragProxy.setDimensions: dimensions undefined\");let e=t.dragProxyWidth,i=t.dragProxyHeight;if(void 0===e||void 0===i)throw new Error(\"DragProxy.setDimensions: width and/or height undefined\");const n=!1===this._layoutManager.layoutConfig.header.show?0:t.headerHeight;this._element.style.width=zt(e),this._element.style.height=zt(i),e-=this._sided?n:0,i-=this._sided?0:n,this._proxyContainerElement.style.width=zt(e),this._proxyContainerElement.style.height=zt(i),this._componentItem.enterDragMode(e,i),this._componentItem.show()}}class ne{constructor(t,e,i,n,o,s,r){this._layoutManager=t,this._element=e,this._extraAllowableChildTargets=i,this._componentTypeOrFtn=n,this._componentState=o,this._title=s,this._id=r,this._dragListener=null,this._dummyGroundContainer=document.createElement(\"div\");const a=gt.createDefault(\"row\");this._dummyGroundContentItem=new Yt(this._layoutManager,a,this._dummyGroundContainer),this.createDragListener()}destroy(){this.removeDragListener()}createDragListener(){this.removeDragListener(),this._dragListener=new Zt(this._element,this._extraAllowableChildTargets),this._dragListener.on(\"dragStart\",((t,e)=>this.onDragStart(t,e))),this._dragListener.on(\"dragStop\",(()=>this.onDragStop()))}onDragStart(t,e){var i;const n=\"component\";let o;if(\"function\"==typeof this._componentTypeOrFtn){const t=this._componentTypeOrFtn();o=ne.isDragSourceComponentItemConfig(t)?{type:n,componentState:t.state,componentType:t.type,title:null!==(i=t.title)&&void 0!==i?i:this._title}:t}else o={type:n,componentState:this._componentState,componentType:this._componentTypeOrFtn,title:this._title,id:this._id};const s=bt.resolve(o,!1),r=new jt(this._layoutManager,s,this._dummyGroundContentItem);if(this._dummyGroundContentItem.contentItems.push(r),null===this._dragListener)throw new K(\"DSODSD66746\");{const i=new ie(t,e,this._dragListener,this._layoutManager,r,this._dummyGroundContentItem),n=this._layoutManager.transitionIndicator;if(null===n)throw new K(\"DSODST66746\");n.transitionElements(this._element,i.element)}}onDragStop(){this.createDragListener()}removeDragListener(){null!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=null)}}!function(t){t.isDragSourceComponentItemConfig=function(t){return!(\"componentType\"in t)}}(ne||(ne={}));class oe{constructor(){this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_dropTargetIndicator\");const t=document.createElement(\"div\");t.classList.add(\"lm_inner\"),this._element.appendChild(t),document.body.appendChild(this._element)}destroy(){this._element.remove()}highlightArea(t,e){this._element.style.left=zt(t.x1+e),this._element.style.top=zt(t.y1+e),this._element.style.width=zt(t.x2-t.x1-e),this._element.style.height=zt(t.y2-t.y1-e),this._element.style.display=\"block\"}hide(){Dt(this._element,!1)}}class se{constructor(){this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_transition_indicator\"),document.body.appendChild(this._element),this._toElement=null,this._fromDimensions=null,this._totalAnimationDuration=200,this._animationStartTime=null}destroy(){this._element.remove()}transitionElements(t,e){}nextAnimationFrame(){}measure(t){const e=t.getBoundingClientRect();return{left:e.left,top:e.top,width:t.offsetWidth,height:t.offsetHeight}}}class re extends Wt{constructor(t){super(),this._layoutManager=t,this._childEventListener=t=>this.onEventFromChild(t),globalThis.addEventListener(re.ChildEventName,this._childEventListener,{passive:!0})}emit(t,...e){\"userBroadcast\"===t?this.emitUserBroadcast(...e):super.emit(t,...e)}emitUserBroadcast(...t){this.handleUserBroadcastEvent(\"userBroadcast\",t)}destroy(){globalThis.removeEventListener(re.ChildEventName,this._childEventListener)}handleUserBroadcastEvent(t,e){this._layoutManager.isSubWindow?this.propagateToParent(t,e):this.propagateToThisAndSubtree(t,e)}onEventFromChild(t){const e=t.detail;this.handleUserBroadcastEvent(e.eventName,e.args)}propagateToParent(t,e){const i={bubbles:!0,cancelable:!0,detail:{layoutManager:this._layoutManager,eventName:t,args:e}},n=new CustomEvent(re.ChildEventName,i),o=globalThis.opener;if(null===o)throw new K(\"EHPTP15778\");o.dispatchEvent(n)}propagateToThisAndSubtree(t,e){this.emitUnknown(t,...e);for(let i=0;ithis.handleContainerResize())),this._windowBeforeUnloadListener=()=>this.onBeforeUnload(),this._windowBeforeUnloadListening=!1,this._maximisedStackBeforeDestroyedListener=t=>this.cleanupBeforeMaximisedStackDestroyed(t),this.isSubWindow=t.isSubWindow,this._constructorOrSubWindowLayoutConfig=t.constructorOrSubWindowLayoutConfig,Q.checkInitialise(),dt.checkInitialise(),void 0!==t.containerElement&&(this._containerElement=t.containerElement)}get container(){return this._containerElement}get isInitialised(){return this._isInitialised}get groundItem(){return this._groundItem}get root(){return this._groundItem}get openPopouts(){return this._openPopouts}get dropTargetIndicator(){return this._dropTargetIndicator}get transitionIndicator(){return this._transitionIndicator}get width(){return this._width}get height(){return this._height}get eventHub(){return this._eventHub}get rootItem(){if(void 0===this._groundItem)throw new Error(\"Cannot access rootItem before init\");return 0===this._groundItem.contentItems.length?void 0:this._groundItem.contentItems[0]}get focusedComponentItem(){return this._focusedComponentItem}get tabDropPlaceholder(){return this._tabDropPlaceholder}get maximisedStack(){return this._maximisedStack}get deprecatedConstructor(){return!this.isSubWindow&&void 0!==this._constructorOrSubWindowLayoutConfig}destroy(){if(this._isInitialised){this._windowBeforeUnloadListening&&(globalThis.removeEventListener(\"beforeunload\",this._windowBeforeUnloadListener),this._windowBeforeUnloadListening=!1),!0===this.layoutConfig.settings.closePopoutsOnUnload&&this.closeAllOpenPopouts(),this._resizeObserver.disconnect(),this.checkClearResizeTimeout(),void 0!==this._groundItem&&this._groundItem.destroy(),this._tabDropPlaceholder.remove(),null!==this._dropTargetIndicator&&this._dropTargetIndicator.destroy(),null!==this._transitionIndicator&&this._transitionIndicator.destroy(),this._eventHub.destroy();for(const t of this._dragSources)t.destroy();this._dragSources=[],this._isInitialised=!1}}minifyConfig(t){return _t.minifyConfig(t)}unminifyConfig(t){return _t.unminifyConfig(t)}init(){let t;if(this.setContainer(),this._dropTargetIndicator=new oe,this._transitionIndicator=new se,this.updateSizeFromContainer(),this.isSubWindow){if(void 0===this._constructorOrSubWindowLayoutConfig)throw new J(\"LMIU07155\");{const e=this._constructorOrSubWindowLayoutConfig.root;if(void 0===e)throw new X(\"LMIC07156\");if(!Ct.isComponent(e))throw new X(\"LMIC07157\");t=e;const i=xt.resolve(this._constructorOrSubWindowLayoutConfig);this.layoutConfig=Object.assign(Object.assign({},i),{root:void 0})}}else void 0===this._constructorOrSubWindowLayoutConfig?this.layoutConfig=_t.createDefault():this.layoutConfig=xt.resolve(this._constructorOrSubWindowLayoutConfig);const e=this.layoutConfig;this._groundItem=new Yt(this,e.root,this._containerElement),this._groundItem.init(),this.checkLoadedLayoutMaximiseItem(),this._resizeObserver.observe(this._containerElement),this._isInitialised=!0,this.adjustColumnsResponsive(),this.emit(\"initialised\"),void 0!==t&&this.loadComponentAsRoot(t)}loadLayout(t){if(!this.isInitialised)throw new Error(\"GoldenLayout: Need to call init() if LayoutConfig with defined root passed to constructor\");if(void 0===this._groundItem)throw new J(\"LMLL11119\");this.createSubWindows(),this.layoutConfig=xt.resolve(t),this._groundItem.loadRoot(this.layoutConfig.root),this.checkLoadedLayoutMaximiseItem(),this.adjustColumnsResponsive()}saveLayout(){if(!1===this._isInitialised)throw new Error(\"Can't create config, layout not yet initialised\");if(void 0===this._groundItem)throw new J(\"LMTC18244\");{const t=this._groundItem.calculateConfigContent();let e;e=1!==t.length?void 0:t[0],this.reconcilePopoutWindows();const i=[];for(let t=0;t=0?n=this._groundItem.contentItems[0]:e=0;break;case at.row:case at.column:e=n.addItem(t,i.index);break;case at.stack:if(Ct.isComponent(t)){e=n.addItem(t,i.index);break}throw Error(tt[6]);case at.component:throw new X(\"LMAIALC87444602\");default:throw new Y(\"LMAIALU98881733\",n.type)}if(Ct.isComponent(t)){const t=n.contentItems[e];Gt.isStack(t)&&(n=t,e=0)}return i.parentItem=n,i.index=e,i}}}loadComponentAsRoot(t){if(void 0===this._groundItem)throw new Error(\"Cannot add item before init\");this._groundItem.loadComponentAsRoot(t)}updateSize(t,e){this.setSize(t,e)}setSize(t,e){if(this._width=t,this._height=e,!0===this._isInitialised){if(void 0===this._groundItem)throw new J(\"LMUS18881\");if(this._groundItem.setSize(this._width,this._height),this._maximisedStack){const{width:t,height:e}=kt(this._containerElement);Tt(this._maximisedStack.element,t),At(this._maximisedStack.element,e),this._maximisedStack.updateSize(!1)}this.adjustColumnsResponsive()}}beginSizeInvalidation(){this._sizeInvalidationBeginCount++}endSizeInvalidation(){0==--this._sizeInvalidationBeginCount&&this.updateSizeFromContainer()}updateSizeFromContainer(){const{width:t,height:e}=kt(this._containerElement);this.setSize(t,e)}updateRootSize(t=!1){if(void 0===this._groundItem)throw new J(\"LMURS28881\");this._groundItem.updateSize(t)}createAndInitContentItem(t,e){const i=this.createContentItem(t,e);return i.init(),i}createContentItem(t,e){if(\"string\"!=typeof t.type)throw new G(\"Missing parameter 'type'\",JSON.stringify(t));if(ct.isComponentItem(t)&&!(e instanceof ee)&&e&&!(!0===this.isSubWindow&&e instanceof Yt)){t={type:at.stack,content:[t],size:t.size,sizeUnit:t.sizeUnit,minSize:t.minSize,minSizeUnit:t.minSizeUnit,id:t.id,maximised:t.maximised,isClosable:t.isClosable,activeItemIndex:0,header:void 0}}return this.createContentItemFromConfig(t,e)}findFirstComponentItemById(t){if(void 0===this._groundItem)throw new J(\"LMFFCIBI82446\");return this.findFirstContentItemTypeByIdRecursive(at.component,t,this._groundItem)}createPopout(t,e,i,n){return t instanceof Gt?this.createPopoutFromContentItem(t,e,i,n):this.createPopoutFromItemConfig(t,e,i,n)}createPopoutFromContentItem(t,e,i,n){let o=t.parent,s=t;for(;null!==o&&1===o.contentItems.length&&!o.isGround;)s=o,o=o.parent;if(null===o)throw new K(\"LMCPFCI00834\");{if(void 0===n&&(n=o.contentItems.indexOf(s)),null!==i&&o.addPopInParentId(i),void 0===e){const i=globalThis.screenX||globalThis.screenLeft,n=globalThis.screenY||globalThis.screenTop,o=t.element.offsetLeft,s=t.element.offsetTop,{width:r,height:a}=kt(t.element);e={left:i+o,top:n+s,width:r,height:a}}const r=t.toConfig();if(t.remove(),ft.isRootItemConfig(r))return this.createPopoutFromItemConfig(r,e,i,n);throw new Error(`${tt[0]}`)}}beginVirtualSizedContainerAdding(){0==++this._virtualSizedContainerAddingBeginCount&&(this._virtualSizedContainers.length=0)}addVirtualSizedContainer(t){this._virtualSizedContainers.push(t)}endVirtualSizedContainerAdding(){if(0==--this._virtualSizedContainerAddingBeginCount){const t=this._virtualSizedContainers.length;if(t>0){this.fireBeforeVirtualRectingEvent(t);for(let e=0;ethis.emit(\"windowOpened\",a))),a.on(\"closed\",(()=>this.reconcilePopoutWindows())),this._openPopouts.push(a),this.layoutConfig.settings.closePopoutsOnUnload&&!this._windowBeforeUnloadListening&&(globalThis.addEventListener(\"beforeunload\",this._windowBeforeUnloadListener,{passive:!0}),this._windowBeforeUnloadListening=!0),a}closeAllOpenPopouts(){for(let t=0;tglobalThis.close()),1)}getArea(t,e){let i=null,n=1/0;for(let o=0;o=s.x1&&t=s.y1&&es.surface&&(n=s.surface,i=s)}return i}calculateItemAreas(){const t=this.getAllContentItems(),e=this._groundItem;if(void 0===e)throw new J(\"LMCIAR44365\");if(1!==t.length){e.contentItems[0].isStack?this._itemAreas=[]:this._itemAreas=e.createSideAreas();for(let e=0;e0){let e=t[0];if(Gt.isComponentItem(e)){const t=e.parent;if(null===t)throw new K(\"LMXLLMI69999\");e=t}if(!Gt.isStack(e))throw new X(\"LMCLLMI19993\");e.maximise()}}}processMaximiseStack(t){if(this._maximisedStack=t,t.on(\"beforeItemDestroyed\",this._maximisedStackBeforeDestroyedListener),t.element.classList.add(\"lm_maximised\"),t.element.insertAdjacentElement(\"afterend\",this._maximisePlaceholder),void 0===this._groundItem)throw new J(\"LMMXI19993\");{this._groundItem.element.prepend(t.element);const{width:e,height:i}=kt(this._containerElement);Tt(t.element,e),At(t.element,i),t.updateSize(!0),t.focusActiveContentItem(),this._maximisedStack.emit(\"maximised\"),this.emit(\"stateChanged\")}}processMinimiseMaximisedStack(){if(void 0===this._maximisedStack)throw new X(\"LMMMS74422\");{const t=this._maximisedStack;if(null===t.parent)throw new K(\"LMMI13668\");t.element.classList.remove(\"lm_maximised\"),this._maximisePlaceholder.insertAdjacentElement(\"afterend\",t.element),this._maximisePlaceholder.remove(),this.updateRootSize(!0),this._maximisedStack=void 0,t.off(\"beforeItemDestroyed\",this._maximisedStackBeforeDestroyedListener),t.emit(\"minimised\"),this.emit(\"stateChanged\")}}reconcilePopoutWindows(){const t=[];for(let e=0;e{this._resizeTimeoutId=void 0,this.beginSizeInvalidation(),this.endSizeInvalidation()}),this.resizeDebounceInterval))}checkClearResizeTimeout(){void 0!==this._resizeTimeoutId&&(clearTimeout(this._resizeTimeoutId),this._resizeTimeoutId=void 0)}setContainer(){var t;const e=document.body,i=null!==(t=this._containerElement)&&void 0!==t?t:e;if(i===e){this.resizeWithContainerAutomatically=!0;const t=document.documentElement;t.style.height=\"100%\",t.style.margin=\"0\",t.style.padding=\"0\",t.style.overflow=\"clip\",e.style.height=\"100%\",e.style.margin=\"0\",e.style.padding=\"0\",e.style.overflow=\"clip\"}this._containerElement=i}onBeforeUnload(){this.destroy()}adjustColumnsResponsive(){if(void 0===this._groundItem)throw new J(\"LMACR20883\");if(this._firstLoad=!1,this.useResponsiveLayout()&&!this._updatingColumnsResponsive&&this._groundItem.contentItems.length>0&&this._groundItem.contentItems[0].isRow){if(void 0===this._groundItem||null===this._width)throw new J(\"LMACR77412\");{const t=this._groundItem.contentItems[0].contentItems.length;if(t<=1)return;{const e=this.layoutConfig.dimensions.defaultMinItemWidth;if(t*e<=this._width)return;{this._updatingColumnsResponsive=!0;const i=t-Math.max(Math.floor(this._width/e),1),n=this._groundItem.contentItems[0],o=this.getAllStacks();if(0===o.length)throw new X(\"LMACRS77413\");{const t=o[0];for(let e=0;en?void 0:{parentItem:t,index:o}}}case 1:if(void 0===this._focusedComponentItem)return;{const t=this._focusedComponentItem.parentItem;return this.tryCreateLocationFromParentItem(t,e)}case 2:{const t=this.findFirstContentItemType(at.stack);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 3:{let t=this.findFirstContentItemType(at.row);return void 0!==t?this.tryCreateLocationFromParentItem(t,e):(t=this.findFirstContentItemType(at.column),void 0!==t?this.tryCreateLocationFromParentItem(t,e):void 0)}case 4:{const t=this.findFirstContentItemType(at.row);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 5:{const t=this.findFirstContentItemType(at.column);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 6:if(void 0===this._groundItem)throw new J(\"LMFLRIF18244\");return void 0!==this.rootItem?void 0:void 0===e||0===e?{parentItem:this._groundItem,index:0}:void 0;case 7:if(void 0===this._groundItem)throw new J(\"LMFLF18244\");{const t=this._groundItem.contentItems;if(0===t.length)return void 0===e||0===e?{parentItem:this._groundItem,index:0}:void 0;{const i=t[0];return this.tryCreateLocationFromParentItem(i,e)}}}}tryCreateLocationFromParentItem(t,e){const i=t.contentItems.length;return void 0===e?{parentItem:t,index:i}:e<0||e>i?void 0:{parentItem:t,index:e}}}!function(t){t.createMaximisePlaceElement=function(t){const e=t.createElement(\"div\");return e.classList.add(\"lm_maximise_place\"),e},t.createTabDropPlaceholderElement=function(t){const e=t.createElement(\"div\");return e.classList.add(\"lm_drop_tab_placeholder\"),e},t.defaultLocationSelectors=[{typeId:1,index:void 0},{typeId:2,index:void 0},{typeId:3,index:void 0},{typeId:7,index:void 0}],t.afterFocusedItemIfPossibleLocationSelectors=[{typeId:0,index:1},{typeId:2,index:void 0},{typeId:3,index:void 0},{typeId:7,index:void 0}]}(ae||(ae={}));class le extends ae{constructor(t,e,i,n){if(super(le.createLayoutManagerConstructorParameters(t,e)),this._bindComponentEventHanlderPassedInConstructor=!1,this._creationTimeoutPassed=!1,void 0!==e&&\"function\"==typeof e&&(this.bindComponentEvent=e,this._bindComponentEventHanlderPassedInConstructor=!0,void 0!==i&&(this.unbindComponentEvent=i)),!this._bindComponentEventHanlderPassedInConstructor&&this.isSubWindow){if(void 0===this._constructorOrSubWindowLayoutConfig)throw new J(\"VLC98823\");{const t=xt.resolve(this._constructorOrSubWindowLayoutConfig);this.layoutConfig=Object.assign(Object.assign({},t),{root:void 0})}}!0!==n&&(this.deprecatedConstructor||this.init())}destroy(){this.bindComponentEvent=void 0,this.unbindComponentEvent=void 0,super.destroy()}init(){if(this._bindComponentEventHanlderPassedInConstructor||\"loading\"!==document.readyState&&null!==document.body){if(!this._bindComponentEventHanlderPassedInConstructor&&!0===this.isSubWindow&&!this._creationTimeoutPassed)return setTimeout((()=>this.init()),7),void(this._creationTimeoutPassed=!0);!0===this.isSubWindow&&(this._bindComponentEventHanlderPassedInConstructor||this.clearHtmlAndAdjustStylesForSubWindow(),window.__glInstance=this),super.init()}else document.addEventListener(\"DOMContentLoaded\",(()=>this.init()),{passive:!0})}clearHtmlAndAdjustStylesForSubWindow(){const t=document.head,e=new Array(4);e[0]=document.querySelectorAll(\"body link\"),e[1]=document.querySelectorAll(\"body style\"),e[2]=document.querySelectorAll(\"template\"),e[3]=document.querySelectorAll(\".gl_keep\");for(let i=0;ithis.emit(\"popIn\"))),document.body.appendChild(t),!0}}bindComponent(t,e){if(void 0!==this.bindComponentEvent){return this.bindComponentEvent(t,e)}if(void 0!==this.getComponentEvent)return{virtual:!1,component:this.getComponentEvent(t,e)};{const t=`${tt[2]}: ${JSON.stringify(e)}`;throw new Z(t)}}unbindComponent(t,e,i){if(void 0!==this.unbindComponentEvent)this.unbindComponentEvent(t);else if(!e&&void 0!==this.releaseComponentEvent){if(void 0===i)throw new J(\"VCUCRCU333998\");this.releaseComponentEvent(t,i)}}}!function(t){let e=!1;t.createLayoutManagerConstructorParameters=function(t,i){const n=e?null:new URL(document.location.href).searchParams.get(\"gl-window\");e=!0;const o=null!==n;let s,r;if(null!==n){const e=localStorage.getItem(n);if(null===e)throw new Error(\"Null gl-window Config\");localStorage.removeItem(n);const i=JSON.parse(e),o=_t.unminifyConfig(i);r=xt.fromResolved(o),t instanceof HTMLElement&&(s=t)}else void 0===t?r=void 0:t instanceof HTMLElement?(r=void 0,s=t):r=t,void 0===s&&i instanceof HTMLElement&&(s=i);return{constructorOrSubWindowLayoutConfig:r,isSubWindow:o,containerElement:s}}}(le||(le={}));class he extends le{constructor(t,e,i){super(t,e,i,!0),this._componentTypesMap=new Map,this._registeredComponentMap=new Map,this._virtuableComponentMap=new Map,this._containerVirtualRectingRequiredEventListener=(t,e,i)=>this.handleContainerVirtualRectingRequiredEvent(t,e,i),this._containerVirtualVisibilityChangeRequiredEventListener=(t,e)=>this.handleContainerVirtualVisibilityChangeRequiredEvent(t,e),this._containerVirtualZIndexChangeRequiredEventListener=(t,e,i)=>this.handleContainerVirtualZIndexChangeRequiredEvent(t,e,i),this.deprecatedConstructor||this.init()}registerComponent(t,e,i=!1){if(\"function\"!=typeof e)throw new $(\"registerComponent() componentConstructorOrFactoryFtn parameter is not a function\");if(e.hasOwnProperty(\"prototype\")){const n=e;this.registerComponentConstructor(t,n,i)}else{const n=e;this.registerComponentFactoryFunction(t,n,i)}}registerComponentConstructor(t,e,i=!1){if(\"function\"!=typeof e)throw new Error(tt[1]);if(void 0!==this._componentTypesMap.get(t))throw new Z(`${tt[3]}: ${t}`);this._componentTypesMap.set(t,{constructor:e,factoryFunction:void 0,virtual:i})}registerComponentFactoryFunction(t,e,i=!1){if(\"function\"!=typeof e)throw new Z(\"Please register a constructor function\");if(void 0!==this._componentTypesMap.get(t))throw new Z(`${tt[3]}: ${t}`);this._componentTypesMap.set(t,{constructor:void 0,factoryFunction:e,virtual:i})}registerComponentFunction(t){this.registerGetComponentConstructorCallback(t)}registerGetComponentConstructorCallback(t){if(\"function\"!=typeof t)throw new Error(\"Please register a callback function\");void 0!==this._getComponentConstructorFtn&&console.warn(\"Multiple component functions are being registered. Only the final registered function will be used.\"),this._getComponentConstructorFtn=t}getRegisteredComponentTypeNames(){const t=this._componentTypesMap.keys();return Array.from(t)}getComponentInstantiator(t){let e;const i=pt.resolveComponentTypeName(t);return void 0!==i&&(e=this._componentTypesMap.get(i)),void 0===e&&void 0!==this._getComponentConstructorFtn&&(e={constructor:this._getComponentConstructorFtn(t),factoryFunction:void 0,virtual:!1}),e}bindComponent(t,e){let i;const n=pt.resolveComponentTypeName(e);let o;if(void 0!==n&&(i=this._componentTypesMap.get(n)),void 0===i&&void 0!==this._getComponentConstructorFtn&&(i={constructor:this._getComponentConstructorFtn(e),factoryFunction:void 0,virtual:!1}),void 0!==i){const s=i.virtual;let r,a;r=void 0===e.componentState?void 0:Ut({},e.componentState);const l=i.constructor;if(void 0!==l)a=new l(t,r,s);else{const e=i.factoryFunction;if(void 0===e)throw new X(\"LMBCFFU10008\");a=e(t,r,s)}if(s){if(void 0===a)throw new J(\"GLBCVCU988774\");{const e=a,i=e.rootHtmlElement;if(void 0===i)throw new Z(`${tt[5]}: ${n}`);!function(t){const e=\"absolute\";t.style.position!==e&&(t.style.position=e)}(i),this.container.appendChild(i),this._virtuableComponentMap.set(t,e),t.virtualRectingRequiredEvent=this._containerVirtualRectingRequiredEventListener,t.virtualVisibilityChangeRequiredEvent=this._containerVirtualVisibilityChangeRequiredEventListener,t.virtualZIndexChangeRequiredEvent=this._containerVirtualZIndexChangeRequiredEventListener}}this._registeredComponentMap.set(t,a),o={virtual:i.virtual,component:a}}else o=super.bindComponent(t,e);return o}unbindComponent(t,e,i){if(void 0===this._registeredComponentMap.get(t))super.unbindComponent(t,e,i);else{const e=this._virtuableComponentMap.get(t);if(void 0!==e){const i=e.rootHtmlElement;if(void 0===i)throw new X(\"GLUC77743\",t.title);this.container.removeChild(i),this._virtuableComponentMap.delete(t)}}}fireBeforeVirtualRectingEvent(t){this._goldenLayoutBoundingClientRect=this.container.getBoundingClientRect(),super.fireBeforeVirtualRectingEvent(t)}handleContainerVirtualRectingRequiredEvent(t,e,i){const n=this._virtuableComponentMap.get(t);if(void 0===n)throw new J(\"GLHCSCE55933\");{const o=n.rootHtmlElement;if(void 0===o)throw new Z(tt[4]+\" \"+t.title);{const n=t.element.getBoundingClientRect(),s=n.left-this._goldenLayoutBoundingClientRect.left;o.style.left=zt(s);const r=n.top-this._goldenLayoutBoundingClientRect.top;o.style.top=zt(r),Tt(o,e),At(o,i)}}}handleContainerVirtualVisibilityChangeRequiredEvent(t,e){const i=this._virtuableComponentMap.get(t);if(void 0===i)throw new J(\"GLHCVVCRE55934\");{const n=i.rootHtmlElement;if(void 0===n)throw new Z(tt[4]+\" \"+t.title);Dt(n,e)}}handleContainerVirtualZIndexChangeRequiredEvent(t,e,i){const n=this._virtuableComponentMap.get(t);if(void 0===n)throw new J(\"GLHCVZICRE55935\");{const e=n.rootHtmlElement;if(void 0===e)throw new Z(tt[4]+\" \"+t.title);e.style.zIndex=i}}}const de=\"initial_\",ce={show:\"top\",popout:!1,maximise:!1,close:\"close-tab-unused\"},me={headerHeight:31},ue={hasHeaders:!0,reorderEnabled:!0},pe={popoutWholeStack:!1,constrainDragToContainer:!1,constrainDragToHeaders:!1,preventDragout:!1,showMaximiseIcon:!1,showPopoutIcon:!1,showCloseIcon:!1,blockedPopoutsThrowError:!0,closePopoutsOnUnload:!0,selectionEnabled:!1};var ge,fe;class ve{constructor(e){this.layout=e,ge.set(this,void 0),fe.set(this,void 0),this.handleResize=t=>{t.forEach((t=>this.resizeElement(t.target)))},this.handleMutation=()=>{this.layout.viewComponentsByContainerElement.forEach((t=>{this.resizeElement(t.container.element)}))},t.__classPrivateFieldSet(this,ge,new ResizeObserver(this.handleResize),\"f\"),t.__classPrivateFieldSet(this,fe,new MutationObserver(this.handleMutation),\"f\")}observeMutations(e){t.__classPrivateFieldGet(this,fe,\"f\")?.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[\"class\"]})}destroy(){t.__classPrivateFieldGet(this,ge,\"f\").disconnect(),t.__classPrivateFieldGet(this,fe,\"f\").disconnect()}observeContainer(e){t.__classPrivateFieldGet(this,ge,\"f\").observe(e)}unobserveContainer(e){t.__classPrivateFieldGet(this,ge,\"f\").unobserve(e)}resizeElement(t){const e=this.layout.viewComponentsByContainerElement.get(t);e&&e.resize()}}ge=new WeakMap,fe=new WeakMap;var _e={};Object.defineProperty(_e,\"__esModule\",{value:!0});var ye=_e.BaseItem=void 0;class Ce{constructor(t,e,i){this._item=t,this._layout=e,this._wrap=i}get raw(){return this._item}get layout(){return this._layout}get type(){return this._item.type}get contentItems(){return(this._item.contentItems??[]).map((t=>this._wrap(t)))}get parent(){const t=this._item.parent;return t?this._wrap(t):null}setActiveContentItem(t,e){if(\"stack\"!==this.type)throw new Error(`Cannot call setActiveContentItem from a non-stack item: ${this.type}`);this._item.setActiveContentItem(t.raw,e)}static wrapInternal(t,e,i){const n=Ce.wrapCache.get(e);if(n)return n;const o=new t(e,i,(e=>Ce.wrapInternal(t,e,i)));return Ce.wrapCache.set(e,o),o}}ye=_e.BaseItem=Ce,Ce.wrapCache=new WeakMap;const we=t=>!!t&&\"contentItems\"in t&&(t.isRow||t.isColumn);class Ie extends ye{isRoot(){return!!this._item.parent?.isGround}getBounds(){return this._item.element.getBoundingClientRect()}get viewName(){if(this._item.isComponent){const{component:t}=this._item;return t.identity.name}throw new Error(\"View name not found\")}onDestroyed(t){const e=({target:i})=>{i===this._item&&(t(),this._item.off(\"itemDestroyed\",e))};this._item.on(\"itemDestroyed\",e)}createAdjacentStack({position:t=\"right\"}={}){const e=this.raw;if(ee.isStack(e)&&e.parent){const i=[\"top\",\"bottom\"].includes(t)?\"column\":\"row\",n=[\"left\",\"top\"].includes(t)?1:0,o=we(e.parent)?e.parent:e.layoutManager,s=o,r=e.parent.contentItems.indexOf(e);e.parent.isGround&&e.parent.removeChild(e,!0);const a=o.newItem({type:i,content:[{type:\"stack\",content:[]}]},r);if(!a)throw new Error(\"createAdjacentStack: Failed to create new container\");const l=a.contentItems[0];return a.addChild(this.raw,n),we(s)&&s.removeChild(e,!0),this._wrap(l)}throw new Error(`Cannot creat adjacent stacks for type: ${e.type}, must be type 'stack'`)}setActiveContentItem(t,e=!0){if(!ee.isStack(this._item))throw new Error(`Cannot call setActiveContentItem from a non-stack item: ${this.type}`);this._item.setActiveComponentItem(t.raw,!e)}static wrap(t,e){return ye.wrapInternal(Ie,t,e)}}function be(t=[],e){for(const i of t)\"component\"===i.type?Object.keys(e).forEach((t=>{t in i&&(i.componentState={[`${de}${t}`]:i[t],...i.componentState}),i[t]=e[t]})):be(i.content,e)}function Se(t=[],e,i){for(const n of t)if(\"component\"===n.type)Object.keys(e).forEach((t=>{if(`${de}${t}`in n.componentState)return n[t]=n.componentState[`${de}${t}`],void delete n.componentState[`${de}${t}`];n[t]=e[t]}));else{if(n.size&&(\"row\"===i||\"column\"===i)){n[\"row\"===i?\"width\":\"height\"]=n.size?.includes(\".\")?parseFloat(n.size):parseInt(n.size)}Se(n.content,e,n.type)}}function Ee(t){if(t.root){t.root.content&&Se([t.root],{componentName:\"view\",isClosable:!0});const e=t.root;t.content=[e],delete t.root}return t}const xe=e=>class extends e{connectedCallback(){if(!this.name||!this.uuid)throw new Error(\" Name or uuid attribute missing\");if(!this.src)throw new Error(\" missing 'src' attribute.\");this.#t||(this.#t=document.createElement(\"iframe\"),this.#t.src=this.src,this.#t.style.height=\"100%\",this.#t.style.width=\"100%\",this.#t.style.border=\"none\",this.forceFrameName?this.#t.setAttribute(\"name\",this.forceFrameName):this.#t.setAttribute(\"name\",t.encodeOptions({brokerUrl:this.brokerUrl,name:this.name,uuid:this.uuid,providerId:this.providerId,contextGroup:this.contextGroup},\"of-frame\")),this.#t.setAttribute(\"id\",this.name),this.appendChild(this.#t))}#t;get brokerUrl(){return this.getAttribute(\"of-broker\")}set brokerUrl(t){t&&this.setAttribute(\"of-broker\",t)}get name(){return this.getAttribute(\"of-name\")}set name(t){t&&this.setAttribute(\"of-name\",t)}get forceFrameName(){return this.getAttribute(\"forceFrameName\")}set forceFrameName(t){t&&this.setAttribute(\"forceFrameName\",t)}get uuid(){return this.getAttribute(\"of-uuid\")}set uuid(t){t&&this.setAttribute(\"of-uuid\",t)}get src(){return this.getAttribute(\"src\")}set src(t){t&&this.setAttribute(\"src\",t)}get providerId(){return this.getAttribute(\"of-provider-id\")}set providerId(t){t&&this.setAttribute(\"of-provider-id\",t)}get contextGroup(){return this.getAttribute(\"of-context-group\")}set contextGroup(t){t&&this.setAttribute(\"of-context-group\",t)}static get observedAttributes(){return[\"name\"]}};class Le{static create(t){const e=document.createElement(\"of-view\");return Object.entries(t).forEach((([t,i])=>{e.setAttribute(t,i)})),e}}customElements.define(\"of-view\",xe(HTMLElement));class ze{constructor(t,i,n,{brokerUrl:o,interopConfig:s},r){this.container=t,this.config=i,this.ofView=null,this.isDragging=()=>this.container.tab.element?.className.includes(\"lm_dragging\")??!1;const{url:a,web:l,interop:h,name:d}=i||{},c=d??`internal-generated-view-${e.v4()}`;if(this.identity={uuid:n,name:c},this.container.element.setAttribute(\"of-name\",c),this.container.element.id=`container-${c}`,this.container.parent.id=c,void 0===a)return void this.handleUrlMissing();const m=this.updateTitleIfNotSet(a),u={\"of-broker\":o,\"of-uuid\":n,\"of-name\":c,src:a};l?.frameName&&(u.forceFrameName=l.frameName);const p=h?.currentContextGroup??s?.currentContextGroup;p&&(u[\"of-context-group\"]=p),s?.providerId&&(u[\"of-provider-id\"]=s?.providerId),this.ofView=Le.create(u),this.ofView.title=m??`Iframe: ${a}`,r.appendChild(this.ofView),this.ofView.style.position=\"absolute\"}updateTitleIfNotSet(t){return\"view\"===this.container.parent.title&&this.container.parent.setTitle(t),this.container.parent.title}handleUrlMissing(){const t=document.createElement(\"div\");t.setAttribute(\"style\",\"padding: 20px\");t.innerText=\"No URL provided\",this.container.element.appendChild(t)}destroy(){this.ofView?.remove(),this.ofView=null}closeView(){this.container.close()}resize(){if(this.ofView){if(this.isDragging())return void(this.ofView.style.display=\"none\");const t=this.container.element.getBoundingClientRect();this.ofView.style.position=\"absolute\",this.ofView.style.height=`${t.height}px`,this.ofView.style.width=`${t.width}px`,this.ofView.style.inset=`${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`,this.ofView.style.display=\"block\"}}}class Me extends U{static overrideConfig(t){const e={...ue,...t.settings,...pe};return e.reorderEnabled?be(t.content,{isClosable:!0}):be(t.content,{reorderEnabled:!1}),{dimensions:me,...t,settings:e,header:{...ce,show:!1!==t.settings?.hasHeaders&&ce.show}}}constructor(t,e,i,{options:n},o,s){super(),this.identity=t,this.container=e,this.initialConfig=i,this.layoutManager=o,this.platformProvider=s,this.viewComponentsByContainerElement=new Map,this.layoutContentCache=_.getSingleInstance(),this.reparentingViews=new Set,this.goldenLayoutDestroyed=!1,this.createViewComponent=(t,e)=>{m.handleSharedView(this.layoutManager,this.identity,e);const i=new ze(t,e,this.identity.uuid,this.options,this.iframeContainer);return e&&!1===e[`${de}isClosable`]&&this.stylesheet.insertRule(`#tab-${i.identity.name} .lm_close_tab { display: none; }`),this.viewComponentsByContainerElement.set(t.element,i),this.resizeController.observeContainer(t.element),i},this.iframeContainer=document.createElement(\"div\"),this.iframeContainer.id=`openfin-layout-iframe-container-${this.identity.layoutName}`,this.domEmitter=new V(e),this.setupStylesheets(),this.layout=new he(this.container),this.layout.resizeWithContainerAutomatically=!0,this.options=n,this.layout.registerComponent(\"view\",this.createViewComponent),this.setupListeners(),this.resizeController=new ve(this),this.layout.loadLayout(Me.overrideConfig(i));const r=document.createElement(\"div\");r.id=`openfin-layout-shadow-container-${this.identity.layoutName}`,r.attachShadow({mode:\"open\",delegatesFocus:!1}).appendChild(this.iframeContainer),this.container.appendChild(r),this.resizeController.observeMutations(this.container)}getStackByView({name:t}){const e=this.layout.findFirstComponentItemById(t);if(e?.parent&&e?.parent?.isStack)return Ie.wrap(e.parent,this)}getRoot(){return Ie.wrap(this.layout.rootItem,this)}async platformCloseView(t){const e=[...this.viewComponentsByContainerElement.values()].find((e=>e.identity.name===t.name));if(!e)throw new Error(`View with name: ${t.name} not found in layout.`);e.closeView()}async platformCreateView(t,{location:e,targetView:i}={}){if(i)throw new Error(\"TargetView not supported in web\");const n={options:this.platformProvider.normalizeOptions(t),target:this.identity,location:e};return this.insertView(n)}setupStylesheets(){if(this.container.setAttribute(\"data-openfin-layout-name\",this.identity.layoutName),this.stylesheet=new CSSStyleSheet,this.stylesheet.insertRule(\".lm_close { display: none; }\"),document.adoptedStyleSheets.push(this.stylesheet),this.initialConfig.settings?.preventSplitterResize){const t=`\\n [data-openfin-layout-name='${this.identity.layoutName}'] .lm_splitter {\\n pointer-events: none;\\n }`;this.stylesheet.insertRule(t)}}insertView({options:t,location:e,targetView:i}){const n=e?this.layoutContentCache.getItemOrUndefined(e.id):void 0,o=i?this.layoutContentCache.getItemOrUndefined(i.name):void 0,s=n??o??Ie.wrap(this.layout.rootItem,this);let r;if(ee.isStack(s.raw))r=s.raw;else{if(!we(s.raw))throw new Error(\"Cannot add a view at the requested location\");r=s.raw.newItem({type:\"stack\",content:[]})}const a=Math.min(r.contentItems.length,e?.index??r.contentItems.length);let l=this.layout.findFirstComponentItemById(t.name);l?(l.parent&&l.parent.removeChild(l,!0),r.addChild(l,a)):l=r.newComponent(\"view\",t,t.title??t.url??\"Default Title\",a);const h=l.component.identity;return Promise.resolve({identity:h})}replaceView({viewToReplace:t,newView:e}){throw new Error(\"Method not implemented.\")}replaceLayout(t){throw new Error(\"Method not implemented.\")}async cleanupView(t){}applyPreset(t){throw new Error(\"Method not implemented.\")}getCurrentViews(){return[...this.viewComponentsByContainerElement.values()].map((t=>t.identity))}async getFrameSnapshot(){return Ee(xt.fromResolved(this.layout.toConfig()))}isVisible(){return W(this.container)}async onViewDetached({viewIdentity:t}){this.reparentingViews.add(t.name),this.platformCloseView(t)}async destroy(){this.goldenLayoutDestroyed||(this.goldenLayoutDestroyed=!0,this.layout.destroy()),this.iframeContainer.remove(),this.resizeController.destroy(),document.adoptedStyleSheets=document.adoptedStyleSheets.filter((t=>t!==this.stylesheet)),this.viewComponentsByContainerElement.clear()}setupListeners(){this.container.addEventListener(\"pointerdown\",(t=>{if(t.target instanceof HTMLElement){const e=t.target.classList;[\"lm_tab\",\"lm_title\",\"lm_splitter\",\"lm_drag_handle\"].some((t=>e.contains(t)))&&(this.handleDragStart(),2===t.button&&t.stopPropagation())}}),!0),document.addEventListener(\"pointerup\",(()=>this.handleDragEnd()),!0),this.layout.on(\"tabCreated\",(t=>{const e=t.componentItem.component;t.element.id=`tab-${e.identity.name}`,this.domEmitter.dispatchLocalEvent(\"tab-created\",e.identity)})),this.layout.on(\"itemCreated\",(({target:t})=>{const e=t;if(Gt.isComponentItem(e)){const t=e.component;this.domEmitter.dispatchLocalEvent(\"container-created\",t.identity)}})),this.layout.on(\"itemDestroyed\",(t=>{const e=t.target;if(Gt.isComponentItem(e)){const t=e.component;this.removeViewComponent(t)}})),this.layout.on(\"itemDropped\",(()=>{this.handleDragEnd()}))}handleDragStart(){this.iframeContainer.style.pointerEvents=\"none\"}handleDragEnd(){this.iframeContainer.style.pointerEvents=\"\"}removeViewComponent(t){if(t.config&&!1===t.config[`${de}isClosable`]){const e=[...this.stylesheet.cssRules].findIndex((e=>e.cssText.includes(`#tab-${t.identity.name}`)));this.stylesheet.deleteRule(e)}t.destroy(),this.viewComponentsByContainerElement.delete(t.container.element),this.resizeController.unobserveContainer(t.container.element),this.reparentingViews.has(t.identity.name)?this.reparentingViews.delete(t.identity.name):this.platformProvider.closeView(t.identity.name);0===this.getCurrentViews().length&&(this.goldenLayoutDestroyed||(this.goldenLayoutDestroyed=!0,m.handleLastViewRemoved(this.layoutManager,this.identity)))}}class Pe{constructor(t,e,i,n){this.windowIdentity=t,this.connectConfig=e,this.provider=i,this.fallbackContainer=n}async createLayout(t,e){if(!(\"container\"in t)&&!this.fallbackContainer)throw new Error(\"Container property is not optional in web\");const{layoutName:i}=t,n=t,o=this.provider.initLayoutViews(n),s=n.container??this.fallbackContainer,r={...this.windowIdentity,layoutName:i},a=new Me(r,s,o,this.connectConfig,e,this.provider);m.registerLayout(e,i,a),this.fallbackContainer=null}async getLayoutSnapshot(t){return t.getLayoutSnapshot()}async handleLastViewRemoved(t){}}class Te{static async init(e){const i=e.getFin().InterApplicationBus.Channel,n=await i.create(`custom-frame-${e.me.uuid}`);return n.setDefaultAction((async(t,{target:e,opts:i},o)=>{const s=n.connections.find((t=>t.name===e.name));if(s)return n.dispatch(s,t,{...i,target:e});throw new Error(`Client with name ${e.name} not found`)})),await t.relayChannelClientApi_1(n,\"layout-relay\"),new Te(e)}constructor(t){this.wire=t,this.viewNames=new Set}normalizeOptions(t,i=\"default\"){const n=this.wire.me.uuid;let{name:o=`internal-generated-view-${e.v4()}`}=t;return o.match(/^internal-generated-view-/)&&this.viewNames.has(o)&&\"duplicate\"===i&&(o=`internal-generated-view-${e.v4()}`),this.viewNames.add(o),{...t,name:o,uuid:n}}closeView(t){this.viewNames.delete(t)}initLayoutViews({layout:t,multiInstanceViewBehavior:e}){return H((t=>{if(\"component\"===t.type&&t.componentState){const i=this.normalizeOptions(t.componentState,e);return{...t,componentState:i}}return t}),t)}}var Ae;const ke=t=>t;Ae=new WeakMap,exports.WebLayoutEntryPoint=class{constructor(e){Ae.set(this,void 0),this.initLayoutManager=async(e,i,{container:n,layoutManagerOverride:o})=>{const s=await Te.init(i),r=o??ke,a=new Pe(i.me,t.__classPrivateFieldGet(this,Ae,\"f\"),s,n),l=new(r(m.createClosedConstructor(a)));return await M(i,l),l},this.applyLayoutSnapshot=async(e,i,n)=>{await i.applyLayoutSnapshot(t.__classPrivateFieldGet(this,Ae,\"f\").platform.layoutSnapshot)},this.createLayout=async(t,e)=>m.createLayout(t,e),this.destroyLayout=async(t,e)=>m.destroyLayout(t,e),t.__classPrivateFieldSet(this,Ae,e,\"f\")}};\n","'use strict'\n\nexports.byteLength = byteLength\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\nfor (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i]\n revLookup[code.charCodeAt(i)] = i\n}\n\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction getLens (b64) {\n var len = b64.length\n\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // Trim off extra bytes after placeholder bytes are found\n // See: https://github.com/beatgammit/base64-js/issues/42\n var validLen = b64.indexOf('=')\n if (validLen === -1) validLen = len\n\n var placeHoldersLen = validLen === len\n ? 0\n : 4 - (validLen % 4)\n\n return [validLen, placeHoldersLen]\n}\n\n// base64 is 4/3 + up to two characters of the original data\nfunction byteLength (b64) {\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction _byteLength (b64, validLen, placeHoldersLen) {\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction toByteArray (b64) {\n var tmp\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n\n var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))\n\n var curByte = 0\n\n // if there are placeholders, only get up to the last complete 4 chars\n var len = placeHoldersLen > 0\n ? validLen - 4\n : validLen\n\n var i\n for (i = 0; i < len; i += 4) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 18) |\n (revLookup[b64.charCodeAt(i + 1)] << 12) |\n (revLookup[b64.charCodeAt(i + 2)] << 6) |\n revLookup[b64.charCodeAt(i + 3)]\n arr[curByte++] = (tmp >> 16) & 0xFF\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 2) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 2) |\n (revLookup[b64.charCodeAt(i + 1)] >> 4)\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 1) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 10) |\n (revLookup[b64.charCodeAt(i + 1)] << 4) |\n (revLookup[b64.charCodeAt(i + 2)] >> 2)\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] +\n lookup[num >> 12 & 0x3F] +\n lookup[num >> 6 & 0x3F] +\n lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n var tmp\n var output = []\n for (var i = start; i < end; i += 3) {\n tmp =\n ((uint8[i] << 16) & 0xFF0000) +\n ((uint8[i + 1] << 8) & 0xFF00) +\n (uint8[i + 2] & 0xFF)\n output.push(tripletToBase64(tmp))\n }\n return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n var tmp\n var len = uint8.length\n var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n var parts = []\n var maxChunkLength = 16383 // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1]\n parts.push(\n lookup[tmp >> 2] +\n lookup[(tmp << 4) & 0x3F] +\n '=='\n )\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + uint8[len - 1]\n parts.push(\n lookup[tmp >> 10] +\n lookup[(tmp >> 4) & 0x3F] +\n lookup[(tmp << 2) & 0x3F] +\n '='\n )\n }\n\n return parts.join('')\n}\n","/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n/* eslint-disable no-proto */\n\n'use strict'\n\nconst base64 = require('base64-js')\nconst ieee754 = require('ieee754')\nconst customInspectSymbol =\n (typeof Symbol === 'function' && typeof Symbol['for'] === 'function') // eslint-disable-line dot-notation\n ? Symbol['for']('nodejs.util.inspect.custom') // eslint-disable-line dot-notation\n : null\n\nexports.Buffer = Buffer\nexports.SlowBuffer = SlowBuffer\nexports.INSPECT_MAX_BYTES = 50\n\nconst K_MAX_LENGTH = 0x7fffffff\nexports.kMaxLength = K_MAX_LENGTH\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Print warning and recommend using `buffer` v4.x which has an Object\n * implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * We report that the browser does not support typed arrays if the are not subclassable\n * using __proto__. Firefox 4-29 lacks support for adding new properties to `Uint8Array`\n * (See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438). IE 10 lacks support\n * for __proto__ and has a buggy typed array implementation.\n */\nBuffer.TYPED_ARRAY_SUPPORT = typedArraySupport()\n\nif (!Buffer.TYPED_ARRAY_SUPPORT && typeof console !== 'undefined' &&\n typeof console.error === 'function') {\n console.error(\n 'This browser lacks typed array (Uint8Array) support which is required by ' +\n '`buffer` v5.x. Use `buffer` v4.x if you require old browser support.'\n )\n}\n\nfunction typedArraySupport () {\n // Can typed array instances can be augmented?\n try {\n const arr = new Uint8Array(1)\n const proto = { foo: function () { return 42 } }\n Object.setPrototypeOf(proto, Uint8Array.prototype)\n Object.setPrototypeOf(arr, proto)\n return arr.foo() === 42\n } catch (e) {\n return false\n }\n}\n\nObject.defineProperty(Buffer.prototype, 'parent', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.buffer\n }\n})\n\nObject.defineProperty(Buffer.prototype, 'offset', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.byteOffset\n }\n})\n\nfunction createBuffer (length) {\n if (length > K_MAX_LENGTH) {\n throw new RangeError('The value \"' + length + '\" is invalid for option \"size\"')\n }\n // Return an augmented `Uint8Array` instance\n const buf = new Uint8Array(length)\n Object.setPrototypeOf(buf, Buffer.prototype)\n return buf\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new TypeError(\n 'The \"string\" argument must be of type string. Received type number'\n )\n }\n return allocUnsafe(arg)\n }\n return from(arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\nfunction from (value, encodingOrOffset, length) {\n if (typeof value === 'string') {\n return fromString(value, encodingOrOffset)\n }\n\n if (ArrayBuffer.isView(value)) {\n return fromArrayView(value)\n }\n\n if (value == null) {\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n }\n\n if (isInstance(value, ArrayBuffer) ||\n (value && isInstance(value.buffer, ArrayBuffer))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof SharedArrayBuffer !== 'undefined' &&\n (isInstance(value, SharedArrayBuffer) ||\n (value && isInstance(value.buffer, SharedArrayBuffer)))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof value === 'number') {\n throw new TypeError(\n 'The \"value\" argument must not be of type number. Received type number'\n )\n }\n\n const valueOf = value.valueOf && value.valueOf()\n if (valueOf != null && valueOf !== value) {\n return Buffer.from(valueOf, encodingOrOffset, length)\n }\n\n const b = fromObject(value)\n if (b) return b\n\n if (typeof Symbol !== 'undefined' && Symbol.toPrimitive != null &&\n typeof value[Symbol.toPrimitive] === 'function') {\n return Buffer.from(value[Symbol.toPrimitive]('string'), encodingOrOffset, length)\n }\n\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n return from(value, encodingOrOffset, length)\n}\n\n// Note: Change prototype *after* Buffer.from is defined to workaround Chrome bug:\n// https://github.com/feross/buffer/pull/148\nObject.setPrototypeOf(Buffer.prototype, Uint8Array.prototype)\nObject.setPrototypeOf(Buffer, Uint8Array)\n\nfunction assertSize (size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be of type number')\n } else if (size < 0) {\n throw new RangeError('The value \"' + size + '\" is invalid for option \"size\"')\n }\n}\n\nfunction alloc (size, fill, encoding) {\n assertSize(size)\n if (size <= 0) {\n return createBuffer(size)\n }\n if (fill !== undefined) {\n // Only pay attention to encoding if it's a string. This\n // prevents accidentally sending in a number that would\n // be interpreted as a start offset.\n return typeof encoding === 'string'\n ? createBuffer(size).fill(fill, encoding)\n : createBuffer(size).fill(fill)\n }\n return createBuffer(size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n return alloc(size, fill, encoding)\n}\n\nfunction allocUnsafe (size) {\n assertSize(size)\n return createBuffer(size < 0 ? 0 : checked(size) | 0)\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n return allocUnsafe(size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n return allocUnsafe(size)\n}\n\nfunction fromString (string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8'\n }\n\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n\n const length = byteLength(string, encoding) | 0\n let buf = createBuffer(length)\n\n const actual = buf.write(string, encoding)\n\n if (actual !== length) {\n // Writing a hex string, for example, that contains invalid characters will\n // cause everything after the first invalid character to be ignored. (e.g.\n // 'abxxcd' will be treated as 'ab')\n buf = buf.slice(0, actual)\n }\n\n return buf\n}\n\nfunction fromArrayLike (array) {\n const length = array.length < 0 ? 0 : checked(array.length) | 0\n const buf = createBuffer(length)\n for (let i = 0; i < length; i += 1) {\n buf[i] = array[i] & 255\n }\n return buf\n}\n\nfunction fromArrayView (arrayView) {\n if (isInstance(arrayView, Uint8Array)) {\n const copy = new Uint8Array(arrayView)\n return fromArrayBuffer(copy.buffer, copy.byteOffset, copy.byteLength)\n }\n return fromArrayLike(arrayView)\n}\n\nfunction fromArrayBuffer (array, byteOffset, length) {\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\"offset\" is outside of buffer bounds')\n }\n\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\"length\" is outside of buffer bounds')\n }\n\n let buf\n if (byteOffset === undefined && length === undefined) {\n buf = new Uint8Array(array)\n } else if (length === undefined) {\n buf = new Uint8Array(array, byteOffset)\n } else {\n buf = new Uint8Array(array, byteOffset, length)\n }\n\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(buf, Buffer.prototype)\n\n return buf\n}\n\nfunction fromObject (obj) {\n if (Buffer.isBuffer(obj)) {\n const len = checked(obj.length) | 0\n const buf = createBuffer(len)\n\n if (buf.length === 0) {\n return buf\n }\n\n obj.copy(buf, 0, 0, len)\n return buf\n }\n\n if (obj.length !== undefined) {\n if (typeof obj.length !== 'number' || numberIsNaN(obj.length)) {\n return createBuffer(0)\n }\n return fromArrayLike(obj)\n }\n\n if (obj.type === 'Buffer' && Array.isArray(obj.data)) {\n return fromArrayLike(obj.data)\n }\n}\n\nfunction checked (length) {\n // Note: cannot use `length < K_MAX_LENGTH` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= K_MAX_LENGTH) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + K_MAX_LENGTH.toString(16) + ' bytes')\n }\n return length | 0\n}\n\nfunction SlowBuffer (length) {\n if (+length != length) { // eslint-disable-line eqeqeq\n length = 0\n }\n return Buffer.alloc(+length)\n}\n\nBuffer.isBuffer = function isBuffer (b) {\n return b != null && b._isBuffer === true &&\n b !== Buffer.prototype // so Buffer.isBuffer(Buffer.prototype) will be false\n}\n\nBuffer.compare = function compare (a, b) {\n if (isInstance(a, Uint8Array)) a = Buffer.from(a, a.offset, a.byteLength)\n if (isInstance(b, Uint8Array)) b = Buffer.from(b, b.offset, b.byteLength)\n if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n throw new TypeError(\n 'The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array'\n )\n }\n\n if (a === b) return 0\n\n let x = a.length\n let y = b.length\n\n for (let i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i]\n y = b[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n switch (String(encoding).toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'latin1':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return true\n default:\n return false\n }\n}\n\nBuffer.concat = function concat (list, length) {\n if (!Array.isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n\n if (list.length === 0) {\n return Buffer.alloc(0)\n }\n\n let i\n if (length === undefined) {\n length = 0\n for (i = 0; i < list.length; ++i) {\n length += list[i].length\n }\n }\n\n const buffer = Buffer.allocUnsafe(length)\n let pos = 0\n for (i = 0; i < list.length; ++i) {\n let buf = list[i]\n if (isInstance(buf, Uint8Array)) {\n if (pos + buf.length > buffer.length) {\n if (!Buffer.isBuffer(buf)) buf = Buffer.from(buf)\n buf.copy(buffer, pos)\n } else {\n Uint8Array.prototype.set.call(\n buffer,\n buf,\n pos\n )\n }\n } else if (!Buffer.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n } else {\n buf.copy(buffer, pos)\n }\n pos += buf.length\n }\n return buffer\n}\n\nfunction byteLength (string, encoding) {\n if (Buffer.isBuffer(string)) {\n return string.length\n }\n if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) {\n return string.byteLength\n }\n if (typeof string !== 'string') {\n throw new TypeError(\n 'The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. ' +\n 'Received type ' + typeof string\n )\n }\n\n const len = string.length\n const mustMatch = (arguments.length > 2 && arguments[2] === true)\n if (!mustMatch && len === 0) return 0\n\n // Use a for loop to avoid recursion\n let loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'ascii':\n case 'latin1':\n case 'binary':\n return len\n case 'utf8':\n case 'utf-8':\n return utf8ToBytes(string).length\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return len * 2\n case 'hex':\n return len >>> 1\n case 'base64':\n return base64ToBytes(string).length\n default:\n if (loweredCase) {\n return mustMatch ? -1 : utf8ToBytes(string).length // assume utf8\n }\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n let loweredCase = false\n\n // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n // property of a typed array.\n\n // This behaves neither like String nor Uint8Array in that we set start/end\n // to their upper/lower bounds if the value passed is out of range.\n // undefined is handled specially as per ECMA-262 6th Edition,\n // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n if (start === undefined || start < 0) {\n start = 0\n }\n // Return early if start > this.length. Done here to prevent potential uint32\n // coercion fail below.\n if (start > this.length) {\n return ''\n }\n\n if (end === undefined || end > this.length) {\n end = this.length\n }\n\n if (end <= 0) {\n return ''\n }\n\n // Force coercion to uint32. This will also coerce falsey/NaN values to 0.\n end >>>= 0\n start >>>= 0\n\n if (end <= start) {\n return ''\n }\n\n if (!encoding) encoding = 'utf8'\n\n while (true) {\n switch (encoding) {\n case 'hex':\n return hexSlice(this, start, end)\n\n case 'utf8':\n case 'utf-8':\n return utf8Slice(this, start, end)\n\n case 'ascii':\n return asciiSlice(this, start, end)\n\n case 'latin1':\n case 'binary':\n return latin1Slice(this, start, end)\n\n case 'base64':\n return base64Slice(this, start, end)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return utf16leSlice(this, start, end)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = (encoding + '').toLowerCase()\n loweredCase = true\n }\n }\n}\n\n// This property is used by `Buffer.isBuffer` (and the `is-buffer` npm package)\n// to detect a Buffer instance. It's not possible to use `instanceof Buffer`\n// reliably in a browserify context because there could be multiple different\n// copies of the 'buffer' package in use. This method works even for Buffer\n// instances that were created from another copy of the `buffer` package.\n// See: https://github.com/feross/buffer/issues/154\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n const i = b[n]\n b[n] = b[m]\n b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n const len = this.length\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits')\n }\n for (let i = 0; i < len; i += 2) {\n swap(this, i, i + 1)\n }\n return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n const len = this.length\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits')\n }\n for (let i = 0; i < len; i += 4) {\n swap(this, i, i + 3)\n swap(this, i + 1, i + 2)\n }\n return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n const len = this.length\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits')\n }\n for (let i = 0; i < len; i += 8) {\n swap(this, i, i + 7)\n swap(this, i + 1, i + 6)\n swap(this, i + 2, i + 5)\n swap(this, i + 3, i + 4)\n }\n return this\n}\n\nBuffer.prototype.toString = function toString () {\n const length = this.length\n if (length === 0) return ''\n if (arguments.length === 0) return utf8Slice(this, 0, length)\n return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.toLocaleString = Buffer.prototype.toString\n\nBuffer.prototype.equals = function equals (b) {\n if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n if (this === b) return true\n return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n let str = ''\n const max = exports.INSPECT_MAX_BYTES\n str = this.toString('hex', 0, max).replace(/(.{2})/g, '$1 ').trim()\n if (this.length > max) str += ' ... '\n return ''\n}\nif (customInspectSymbol) {\n Buffer.prototype[customInspectSymbol] = Buffer.prototype.inspect\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n if (isInstance(target, Uint8Array)) {\n target = Buffer.from(target, target.offset, target.byteLength)\n }\n if (!Buffer.isBuffer(target)) {\n throw new TypeError(\n 'The \"target\" argument must be one of type Buffer or Uint8Array. ' +\n 'Received type ' + (typeof target)\n )\n }\n\n if (start === undefined) {\n start = 0\n }\n if (end === undefined) {\n end = target ? target.length : 0\n }\n if (thisStart === undefined) {\n thisStart = 0\n }\n if (thisEnd === undefined) {\n thisEnd = this.length\n }\n\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError('out of range index')\n }\n\n if (thisStart >= thisEnd && start >= end) {\n return 0\n }\n if (thisStart >= thisEnd) {\n return -1\n }\n if (start >= end) {\n return 1\n }\n\n start >>>= 0\n end >>>= 0\n thisStart >>>= 0\n thisEnd >>>= 0\n\n if (this === target) return 0\n\n let x = thisEnd - thisStart\n let y = end - start\n const len = Math.min(x, y)\n\n const thisCopy = this.slice(thisStart, thisEnd)\n const targetCopy = target.slice(start, end)\n\n for (let i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i]\n y = targetCopy[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (numberIsNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [val], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n let indexSize = 1\n let arrLength = arr.length\n let valLength = val.length\n\n if (encoding !== undefined) {\n encoding = String(encoding).toLowerCase()\n if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n encoding === 'utf16le' || encoding === 'utf-16le') {\n if (arr.length < 2 || val.length < 2) {\n return -1\n }\n indexSize = 2\n arrLength /= 2\n valLength /= 2\n byteOffset /= 2\n }\n }\n\n function read (buf, i) {\n if (indexSize === 1) {\n return buf[i]\n } else {\n return buf.readUInt16BE(i * indexSize)\n }\n }\n\n let i\n if (dir) {\n let foundIndex = -1\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1) foundIndex = i\n if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n } else {\n if (foundIndex !== -1) i -= i - foundIndex\n foundIndex = -1\n }\n }\n } else {\n if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n for (i = byteOffset; i >= 0; i--) {\n let found = true\n for (let j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false\n break\n }\n }\n if (found) return i\n }\n }\n\n return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n offset = Number(offset) || 0\n const remaining = buf.length - offset\n if (!length) {\n length = remaining\n } else {\n length = Number(length)\n if (length > remaining) {\n length = remaining\n }\n }\n\n const strLen = string.length\n\n if (length > strLen / 2) {\n length = strLen / 2\n }\n let i\n for (i = 0; i < length; ++i) {\n const parsed = parseInt(string.substr(i * 2, 2), 16)\n if (numberIsNaN(parsed)) return i\n buf[offset + i] = parsed\n }\n return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n // Buffer#write(string)\n if (offset === undefined) {\n encoding = 'utf8'\n length = this.length\n offset = 0\n // Buffer#write(string, encoding)\n } else if (length === undefined && typeof offset === 'string') {\n encoding = offset\n length = this.length\n offset = 0\n // Buffer#write(string, offset[, length][, encoding])\n } else if (isFinite(offset)) {\n offset = offset >>> 0\n if (isFinite(length)) {\n length = length >>> 0\n if (encoding === undefined) encoding = 'utf8'\n } else {\n encoding = length\n length = undefined\n }\n } else {\n throw new Error(\n 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n )\n }\n\n const remaining = this.length - offset\n if (length === undefined || length > remaining) length = remaining\n\n if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n throw new RangeError('Attempt to write outside buffer bounds')\n }\n\n if (!encoding) encoding = 'utf8'\n\n let loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'hex':\n return hexWrite(this, string, offset, length)\n\n case 'utf8':\n case 'utf-8':\n return utf8Write(this, string, offset, length)\n\n case 'ascii':\n case 'latin1':\n case 'binary':\n return asciiWrite(this, string, offset, length)\n\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return base64Write(this, string, offset, length)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return ucs2Write(this, string, offset, length)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0)\n }\n}\n\nfunction base64Slice (buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf)\n } else {\n return base64.fromByteArray(buf.slice(start, end))\n }\n}\n\nfunction utf8Slice (buf, start, end) {\n end = Math.min(buf.length, end)\n const res = []\n\n let i = start\n while (i < end) {\n const firstByte = buf[i]\n let codePoint = null\n let bytesPerSequence = (firstByte > 0xEF)\n ? 4\n : (firstByte > 0xDF)\n ? 3\n : (firstByte > 0xBF)\n ? 2\n : 1\n\n if (i + bytesPerSequence <= end) {\n let secondByte, thirdByte, fourthByte, tempCodePoint\n\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 0x80) {\n codePoint = firstByte\n }\n break\n case 2:\n secondByte = buf[i + 1]\n if ((secondByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n if (tempCodePoint > 0x7F) {\n codePoint = tempCodePoint\n }\n }\n break\n case 3:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n codePoint = tempCodePoint\n }\n }\n break\n case 4:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n fourthByte = buf[i + 3]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n codePoint = tempCodePoint\n }\n }\n }\n }\n\n if (codePoint === null) {\n // we did not generate a valid codePoint so insert a\n // replacement char (U+FFFD) and advance only 1 byte\n codePoint = 0xFFFD\n bytesPerSequence = 1\n } else if (codePoint > 0xFFFF) {\n // encode to utf16 (surrogate pair dance)\n codePoint -= 0x10000\n res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n codePoint = 0xDC00 | codePoint & 0x3FF\n }\n\n res.push(codePoint)\n i += bytesPerSequence\n }\n\n return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nconst MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n const len = codePoints.length\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n }\n\n // Decode in chunks to avoid \"call stack size exceeded\".\n let res = ''\n let i = 0\n while (i < len) {\n res += String.fromCharCode.apply(\n String,\n codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n )\n }\n return res\n}\n\nfunction asciiSlice (buf, start, end) {\n let ret = ''\n end = Math.min(buf.length, end)\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F)\n }\n return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n let ret = ''\n end = Math.min(buf.length, end)\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i])\n }\n return ret\n}\n\nfunction hexSlice (buf, start, end) {\n const len = buf.length\n\n if (!start || start < 0) start = 0\n if (!end || end < 0 || end > len) end = len\n\n let out = ''\n for (let i = start; i < end; ++i) {\n out += hexSliceLookupTable[buf[i]]\n }\n return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n const bytes = buf.slice(start, end)\n let res = ''\n // If bytes.length is odd, the last 8 bits must be ignored (same as node.js)\n for (let i = 0; i < bytes.length - 1; i += 2) {\n res += String.fromCharCode(bytes[i] + (bytes[i + 1] * 256))\n }\n return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n const len = this.length\n start = ~~start\n end = end === undefined ? len : ~~end\n\n if (start < 0) {\n start += len\n if (start < 0) start = 0\n } else if (start > len) {\n start = len\n }\n\n if (end < 0) {\n end += len\n if (end < 0) end = 0\n } else if (end > len) {\n end = len\n }\n\n if (end < start) end = start\n\n const newBuf = this.subarray(start, end)\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(newBuf, Buffer.prototype)\n\n return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUintLE =\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let val = this[offset]\n let mul = 1\n let i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUintBE =\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n checkOffset(offset, byteLength, this.length)\n }\n\n let val = this[offset + --byteLength]\n let mul = 1\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUint8 =\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n return this[offset]\n}\n\nBuffer.prototype.readUint16LE =\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUint16BE =\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUint32LE =\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return ((this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16)) +\n (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUint32BE =\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] * 0x1000000) +\n ((this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n this[offset + 3])\n}\n\nBuffer.prototype.readBigUInt64LE = defineBigIntMethod(function readBigUInt64LE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const lo = first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24\n\n const hi = this[++offset] +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n last * 2 ** 24\n\n return BigInt(lo) + (BigInt(hi) << BigInt(32))\n})\n\nBuffer.prototype.readBigUInt64BE = defineBigIntMethod(function readBigUInt64BE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const hi = first * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset]\n\n const lo = this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last\n\n return (BigInt(hi) << BigInt(32)) + BigInt(lo)\n})\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let val = this[offset]\n let mul = 1\n let i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let i = byteLength\n let mul = 1\n let val = this[offset + --i]\n while (i > 0 && (mul *= 0x100)) {\n val += this[offset + --i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n if (!(this[offset] & 0x80)) return (this[offset])\n return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n const val = this[offset] | (this[offset + 1] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n const val = this[offset + 1] | (this[offset] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16) |\n (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] << 24) |\n (this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n (this[offset + 3])\n}\n\nBuffer.prototype.readBigInt64LE = defineBigIntMethod(function readBigInt64LE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const val = this[offset + 4] +\n this[offset + 5] * 2 ** 8 +\n this[offset + 6] * 2 ** 16 +\n (last << 24) // Overflow\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24)\n})\n\nBuffer.prototype.readBigInt64BE = defineBigIntMethod(function readBigInt64BE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const val = (first << 24) + // Overflow\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset]\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last)\n})\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUintLE =\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n let mul = 1\n let i = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUintBE =\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n let i = byteLength - 1\n let mul = 1\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUint8 =\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeUint16LE =\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeUint16BE =\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeUint32LE =\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset + 3] = (value >>> 24)\n this[offset + 2] = (value >>> 16)\n this[offset + 1] = (value >>> 8)\n this[offset] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeUint32BE =\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nfunction wrtBigUInt64LE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7)\n\n let lo = Number(value & BigInt(0xffffffff))\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n return offset\n}\n\nfunction wrtBigUInt64BE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7)\n\n let lo = Number(value & BigInt(0xffffffff))\n buf[offset + 7] = lo\n lo = lo >> 8\n buf[offset + 6] = lo\n lo = lo >> 8\n buf[offset + 5] = lo\n lo = lo >> 8\n buf[offset + 4] = lo\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n buf[offset + 3] = hi\n hi = hi >> 8\n buf[offset + 2] = hi\n hi = hi >> 8\n buf[offset + 1] = hi\n hi = hi >> 8\n buf[offset] = hi\n return offset + 8\n}\n\nBuffer.prototype.writeBigUInt64LE = defineBigIntMethod(function writeBigUInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeBigUInt64BE = defineBigIntMethod(function writeBigUInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n let i = 0\n let mul = 1\n let sub = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n let i = byteLength - 1\n let mul = 1\n let sub = 0\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n if (value < 0) value = 0xff + value + 1\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n this[offset + 2] = (value >>> 16)\n this[offset + 3] = (value >>> 24)\n return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (value < 0) value = 0xffffffff + value + 1\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeBigInt64LE = defineBigIntMethod(function writeBigInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nBuffer.prototype.writeBigInt64BE = defineBigIntMethod(function writeBigInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n }\n ieee754.write(buf, value, offset, littleEndian, 23, 4)\n return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n }\n ieee754.write(buf, value, offset, littleEndian, 52, 8)\n return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n if (!Buffer.isBuffer(target)) throw new TypeError('argument should be a Buffer')\n if (!start) start = 0\n if (!end && end !== 0) end = this.length\n if (targetStart >= target.length) targetStart = target.length\n if (!targetStart) targetStart = 0\n if (end > 0 && end < start) end = start\n\n // Copy 0 bytes; we're done\n if (end === start) return 0\n if (target.length === 0 || this.length === 0) return 0\n\n // Fatal error conditions\n if (targetStart < 0) {\n throw new RangeError('targetStart out of bounds')\n }\n if (start < 0 || start >= this.length) throw new RangeError('Index out of range')\n if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n // Are we oob?\n if (end > this.length) end = this.length\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start\n }\n\n const len = end - start\n\n if (this === target && typeof Uint8Array.prototype.copyWithin === 'function') {\n // Use built-in when available, missing from IE11\n this.copyWithin(targetStart, start, end)\n } else {\n Uint8Array.prototype.set.call(\n target,\n this.subarray(start, end),\n targetStart\n )\n }\n\n return len\n}\n\n// Usage:\n// buffer.fill(number[, offset[, end]])\n// buffer.fill(buffer[, offset[, end]])\n// buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n // Handle string cases:\n if (typeof val === 'string') {\n if (typeof start === 'string') {\n encoding = start\n start = 0\n end = this.length\n } else if (typeof end === 'string') {\n encoding = end\n end = this.length\n }\n if (encoding !== undefined && typeof encoding !== 'string') {\n throw new TypeError('encoding must be a string')\n }\n if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n if (val.length === 1) {\n const code = val.charCodeAt(0)\n if ((encoding === 'utf8' && code < 128) ||\n encoding === 'latin1') {\n // Fast path: If `val` fits into a single byte, use that numeric value.\n val = code\n }\n }\n } else if (typeof val === 'number') {\n val = val & 255\n } else if (typeof val === 'boolean') {\n val = Number(val)\n }\n\n // Invalid ranges are not set to a default, so can range check early.\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError('Out of range index')\n }\n\n if (end <= start) {\n return this\n }\n\n start = start >>> 0\n end = end === undefined ? this.length : end >>> 0\n\n if (!val) val = 0\n\n let i\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val\n }\n } else {\n const bytes = Buffer.isBuffer(val)\n ? val\n : Buffer.from(val, encoding)\n const len = bytes.length\n if (len === 0) {\n throw new TypeError('The value \"' + val +\n '\" is invalid for argument \"value\"')\n }\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len]\n }\n }\n\n return this\n}\n\n// CUSTOM ERRORS\n// =============\n\n// Simplified versions from Node, changed for Buffer-only usage\nconst errors = {}\nfunction E (sym, getMessage, Base) {\n errors[sym] = class NodeError extends Base {\n constructor () {\n super()\n\n Object.defineProperty(this, 'message', {\n value: getMessage.apply(this, arguments),\n writable: true,\n configurable: true\n })\n\n // Add the error code to the name to include it in the stack trace.\n this.name = `${this.name} [${sym}]`\n // Access the stack to generate the error message including the error code\n // from the name.\n this.stack // eslint-disable-line no-unused-expressions\n // Reset the name to the actual name.\n delete this.name\n }\n\n get code () {\n return sym\n }\n\n set code (value) {\n Object.defineProperty(this, 'code', {\n configurable: true,\n enumerable: true,\n value,\n writable: true\n })\n }\n\n toString () {\n return `${this.name} [${sym}]: ${this.message}`\n }\n }\n}\n\nE('ERR_BUFFER_OUT_OF_BOUNDS',\n function (name) {\n if (name) {\n return `${name} is outside of buffer bounds`\n }\n\n return 'Attempt to access memory outside buffer bounds'\n }, RangeError)\nE('ERR_INVALID_ARG_TYPE',\n function (name, actual) {\n return `The \"${name}\" argument must be of type number. Received type ${typeof actual}`\n }, TypeError)\nE('ERR_OUT_OF_RANGE',\n function (str, range, input) {\n let msg = `The value of \"${str}\" is out of range.`\n let received = input\n if (Number.isInteger(input) && Math.abs(input) > 2 ** 32) {\n received = addNumericalSeparator(String(input))\n } else if (typeof input === 'bigint') {\n received = String(input)\n if (input > BigInt(2) ** BigInt(32) || input < -(BigInt(2) ** BigInt(32))) {\n received = addNumericalSeparator(received)\n }\n received += 'n'\n }\n msg += ` It must be ${range}. Received ${received}`\n return msg\n }, RangeError)\n\nfunction addNumericalSeparator (val) {\n let res = ''\n let i = val.length\n const start = val[0] === '-' ? 1 : 0\n for (; i >= start + 4; i -= 3) {\n res = `_${val.slice(i - 3, i)}${res}`\n }\n return `${val.slice(0, i)}${res}`\n}\n\n// CHECK FUNCTIONS\n// ===============\n\nfunction checkBounds (buf, offset, byteLength) {\n validateNumber(offset, 'offset')\n if (buf[offset] === undefined || buf[offset + byteLength] === undefined) {\n boundsError(offset, buf.length - (byteLength + 1))\n }\n}\n\nfunction checkIntBI (value, min, max, buf, offset, byteLength) {\n if (value > max || value < min) {\n const n = typeof min === 'bigint' ? 'n' : ''\n let range\n if (byteLength > 3) {\n if (min === 0 || min === BigInt(0)) {\n range = `>= 0${n} and < 2${n} ** ${(byteLength + 1) * 8}${n}`\n } else {\n range = `>= -(2${n} ** ${(byteLength + 1) * 8 - 1}${n}) and < 2 ** ` +\n `${(byteLength + 1) * 8 - 1}${n}`\n }\n } else {\n range = `>= ${min}${n} and <= ${max}${n}`\n }\n throw new errors.ERR_OUT_OF_RANGE('value', range, value)\n }\n checkBounds(buf, offset, byteLength)\n}\n\nfunction validateNumber (value, name) {\n if (typeof value !== 'number') {\n throw new errors.ERR_INVALID_ARG_TYPE(name, 'number', value)\n }\n}\n\nfunction boundsError (value, length, type) {\n if (Math.floor(value) !== value) {\n validateNumber(value, type)\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset', 'an integer', value)\n }\n\n if (length < 0) {\n throw new errors.ERR_BUFFER_OUT_OF_BOUNDS()\n }\n\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset',\n `>= ${type ? 1 : 0} and <= ${length}`,\n value)\n}\n\n// HELPER FUNCTIONS\n// ================\n\nconst INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n // Node takes equal signs as end of the Base64 encoding\n str = str.split('=')[0]\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = str.trim().replace(INVALID_BASE64_RE, '')\n // Node converts strings with length < 2 to ''\n if (str.length < 2) return ''\n // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n while (str.length % 4 !== 0) {\n str = str + '='\n }\n return str\n}\n\nfunction utf8ToBytes (string, units) {\n units = units || Infinity\n let codePoint\n const length = string.length\n let leadSurrogate = null\n const bytes = []\n\n for (let i = 0; i < length; ++i) {\n codePoint = string.charCodeAt(i)\n\n // is surrogate component\n if (codePoint > 0xD7FF && codePoint < 0xE000) {\n // last char was a lead\n if (!leadSurrogate) {\n // no lead yet\n if (codePoint > 0xDBFF) {\n // unexpected trail\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n } else if (i + 1 === length) {\n // unpaired lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n }\n\n // valid lead\n leadSurrogate = codePoint\n\n continue\n }\n\n // 2 leads in a row\n if (codePoint < 0xDC00) {\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n leadSurrogate = codePoint\n continue\n }\n\n // valid surrogate pair\n codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n } else if (leadSurrogate) {\n // valid bmp char, but last char was a lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n }\n\n leadSurrogate = null\n\n // encode utf8\n if (codePoint < 0x80) {\n if ((units -= 1) < 0) break\n bytes.push(codePoint)\n } else if (codePoint < 0x800) {\n if ((units -= 2) < 0) break\n bytes.push(\n codePoint >> 0x6 | 0xC0,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x10000) {\n if ((units -= 3) < 0) break\n bytes.push(\n codePoint >> 0xC | 0xE0,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x110000) {\n if ((units -= 4) < 0) break\n bytes.push(\n codePoint >> 0x12 | 0xF0,\n codePoint >> 0xC & 0x3F | 0x80,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else {\n throw new Error('Invalid code point')\n }\n }\n\n return bytes\n}\n\nfunction asciiToBytes (str) {\n const byteArray = []\n for (let i = 0; i < str.length; ++i) {\n // Node's code seems to be doing this and not & 0x7F..\n byteArray.push(str.charCodeAt(i) & 0xFF)\n }\n return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n let c, hi, lo\n const byteArray = []\n for (let i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0) break\n\n c = str.charCodeAt(i)\n hi = c >> 8\n lo = c % 256\n byteArray.push(lo)\n byteArray.push(hi)\n }\n\n return byteArray\n}\n\nfunction base64ToBytes (str) {\n return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n let i\n for (i = 0; i < length; ++i) {\n if ((i + offset >= dst.length) || (i >= src.length)) break\n dst[i + offset] = src[i]\n }\n return i\n}\n\n// ArrayBuffer or Uint8Array objects from other contexts (i.e. iframes) do not pass\n// the `instanceof` check but they should be treated as of that type.\n// See: https://github.com/feross/buffer/issues/166\nfunction isInstance (obj, type) {\n return obj instanceof type ||\n (obj != null && obj.constructor != null && obj.constructor.name != null &&\n obj.constructor.name === type.name)\n}\nfunction numberIsNaN (obj) {\n // For IE11 support\n return obj !== obj // eslint-disable-line no-self-compare\n}\n\n// Create lookup table for `toString('hex')`\n// See: https://github.com/feross/buffer/issues/219\nconst hexSliceLookupTable = (function () {\n const alphabet = '0123456789abcdef'\n const table = new Array(256)\n for (let i = 0; i < 16; ++i) {\n const i16 = i * 16\n for (let j = 0; j < 16; ++j) {\n table[i16 + j] = alphabet[i] + alphabet[j]\n }\n }\n return table\n})()\n\n// Return not function with Error if BigInt not supported\nfunction defineBigIntMethod (fn) {\n return typeof BigInt === 'undefined' ? BufferBigIntNotDefined : fn\n}\n\nfunction BufferBigIntNotDefined () {\n throw new Error('BigInt not supported')\n}\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\nvar R = typeof Reflect === 'object' ? Reflect : null\nvar ReflectApply = R && typeof R.apply === 'function'\n ? R.apply\n : function ReflectApply(target, receiver, args) {\n return Function.prototype.apply.call(target, receiver, args);\n }\n\nvar ReflectOwnKeys\nif (R && typeof R.ownKeys === 'function') {\n ReflectOwnKeys = R.ownKeys\n} else if (Object.getOwnPropertySymbols) {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target)\n .concat(Object.getOwnPropertySymbols(target));\n };\n} else {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target);\n };\n}\n\nfunction ProcessEmitWarning(warning) {\n if (console && console.warn) console.warn(warning);\n}\n\nvar NumberIsNaN = Number.isNaN || function NumberIsNaN(value) {\n return value !== value;\n}\n\nfunction EventEmitter() {\n EventEmitter.init.call(this);\n}\nmodule.exports = EventEmitter;\nmodule.exports.once = once;\n\n// Backwards-compat with node 0.10.x\nEventEmitter.EventEmitter = EventEmitter;\n\nEventEmitter.prototype._events = undefined;\nEventEmitter.prototype._eventsCount = 0;\nEventEmitter.prototype._maxListeners = undefined;\n\n// By default EventEmitters will print a warning if more than 10 listeners are\n// added to it. This is a useful default which helps finding memory leaks.\nvar defaultMaxListeners = 10;\n\nfunction checkListener(listener) {\n if (typeof listener !== 'function') {\n throw new TypeError('The \"listener\" argument must be of type Function. Received type ' + typeof listener);\n }\n}\n\nObject.defineProperty(EventEmitter, 'defaultMaxListeners', {\n enumerable: true,\n get: function() {\n return defaultMaxListeners;\n },\n set: function(arg) {\n if (typeof arg !== 'number' || arg < 0 || NumberIsNaN(arg)) {\n throw new RangeError('The value of \"defaultMaxListeners\" is out of range. It must be a non-negative number. Received ' + arg + '.');\n }\n defaultMaxListeners = arg;\n }\n});\n\nEventEmitter.init = function() {\n\n if (this._events === undefined ||\n this._events === Object.getPrototypeOf(this)._events) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n }\n\n this._maxListeners = this._maxListeners || undefined;\n};\n\n// Obviously not all Emitters should be limited to 10. This function allows\n// that to be increased. Set to zero for unlimited.\nEventEmitter.prototype.setMaxListeners = function setMaxListeners(n) {\n if (typeof n !== 'number' || n < 0 || NumberIsNaN(n)) {\n throw new RangeError('The value of \"n\" is out of range. It must be a non-negative number. Received ' + n + '.');\n }\n this._maxListeners = n;\n return this;\n};\n\nfunction _getMaxListeners(that) {\n if (that._maxListeners === undefined)\n return EventEmitter.defaultMaxListeners;\n return that._maxListeners;\n}\n\nEventEmitter.prototype.getMaxListeners = function getMaxListeners() {\n return _getMaxListeners(this);\n};\n\nEventEmitter.prototype.emit = function emit(type) {\n var args = [];\n for (var i = 1; i < arguments.length; i++) args.push(arguments[i]);\n var doError = (type === 'error');\n\n var events = this._events;\n if (events !== undefined)\n doError = (doError && events.error === undefined);\n else if (!doError)\n return false;\n\n // If there is no 'error' event listener then throw.\n if (doError) {\n var er;\n if (args.length > 0)\n er = args[0];\n if (er instanceof Error) {\n // Note: The comments on the `throw` lines are intentional, they show\n // up in Node's output if this results in an unhandled exception.\n throw er; // Unhandled 'error' event\n }\n // At least give some kind of context to the user\n var err = new Error('Unhandled error.' + (er ? ' (' + er.message + ')' : ''));\n err.context = er;\n throw err; // Unhandled 'error' event\n }\n\n var handler = events[type];\n\n if (handler === undefined)\n return false;\n\n if (typeof handler === 'function') {\n ReflectApply(handler, this, args);\n } else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n ReflectApply(listeners[i], this, args);\n }\n\n return true;\n};\n\nfunction _addListener(target, type, listener, prepend) {\n var m;\n var events;\n var existing;\n\n checkListener(listener);\n\n events = target._events;\n if (events === undefined) {\n events = target._events = Object.create(null);\n target._eventsCount = 0;\n } else {\n // To avoid recursion in the case that type === \"newListener\"! Before\n // adding it to the listeners, first emit \"newListener\".\n if (events.newListener !== undefined) {\n target.emit('newListener', type,\n listener.listener ? listener.listener : listener);\n\n // Re-assign `events` because a newListener handler could have caused the\n // this._events to be assigned to a new object\n events = target._events;\n }\n existing = events[type];\n }\n\n if (existing === undefined) {\n // Optimize the case of one listener. Don't need the extra array object.\n existing = events[type] = listener;\n ++target._eventsCount;\n } else {\n if (typeof existing === 'function') {\n // Adding the second element, need to change to array.\n existing = events[type] =\n prepend ? [listener, existing] : [existing, listener];\n // If we've already got an array, just append.\n } else if (prepend) {\n existing.unshift(listener);\n } else {\n existing.push(listener);\n }\n\n // Check for listener leak\n m = _getMaxListeners(target);\n if (m > 0 && existing.length > m && !existing.warned) {\n existing.warned = true;\n // No error code for this since it is a Warning\n // eslint-disable-next-line no-restricted-syntax\n var w = new Error('Possible EventEmitter memory leak detected. ' +\n existing.length + ' ' + String(type) + ' listeners ' +\n 'added. Use emitter.setMaxListeners() to ' +\n 'increase limit');\n w.name = 'MaxListenersExceededWarning';\n w.emitter = target;\n w.type = type;\n w.count = existing.length;\n ProcessEmitWarning(w);\n }\n }\n\n return target;\n}\n\nEventEmitter.prototype.addListener = function addListener(type, listener) {\n return _addListener(this, type, listener, false);\n};\n\nEventEmitter.prototype.on = EventEmitter.prototype.addListener;\n\nEventEmitter.prototype.prependListener =\n function prependListener(type, listener) {\n return _addListener(this, type, listener, true);\n };\n\nfunction onceWrapper() {\n if (!this.fired) {\n this.target.removeListener(this.type, this.wrapFn);\n this.fired = true;\n if (arguments.length === 0)\n return this.listener.call(this.target);\n return this.listener.apply(this.target, arguments);\n }\n}\n\nfunction _onceWrap(target, type, listener) {\n var state = { fired: false, wrapFn: undefined, target: target, type: type, listener: listener };\n var wrapped = onceWrapper.bind(state);\n wrapped.listener = listener;\n state.wrapFn = wrapped;\n return wrapped;\n}\n\nEventEmitter.prototype.once = function once(type, listener) {\n checkListener(listener);\n this.on(type, _onceWrap(this, type, listener));\n return this;\n};\n\nEventEmitter.prototype.prependOnceListener =\n function prependOnceListener(type, listener) {\n checkListener(listener);\n this.prependListener(type, _onceWrap(this, type, listener));\n return this;\n };\n\n// Emits a 'removeListener' event if and only if the listener was removed.\nEventEmitter.prototype.removeListener =\n function removeListener(type, listener) {\n var list, events, position, i, originalListener;\n\n checkListener(listener);\n\n events = this._events;\n if (events === undefined)\n return this;\n\n list = events[type];\n if (list === undefined)\n return this;\n\n if (list === listener || list.listener === listener) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else {\n delete events[type];\n if (events.removeListener)\n this.emit('removeListener', type, list.listener || listener);\n }\n } else if (typeof list !== 'function') {\n position = -1;\n\n for (i = list.length - 1; i >= 0; i--) {\n if (list[i] === listener || list[i].listener === listener) {\n originalListener = list[i].listener;\n position = i;\n break;\n }\n }\n\n if (position < 0)\n return this;\n\n if (position === 0)\n list.shift();\n else {\n spliceOne(list, position);\n }\n\n if (list.length === 1)\n events[type] = list[0];\n\n if (events.removeListener !== undefined)\n this.emit('removeListener', type, originalListener || listener);\n }\n\n return this;\n };\n\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\n\nEventEmitter.prototype.removeAllListeners =\n function removeAllListeners(type) {\n var listeners, events, i;\n\n events = this._events;\n if (events === undefined)\n return this;\n\n // not listening for removeListener, no need to emit\n if (events.removeListener === undefined) {\n if (arguments.length === 0) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n } else if (events[type] !== undefined) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else\n delete events[type];\n }\n return this;\n }\n\n // emit removeListener for all listeners on all events\n if (arguments.length === 0) {\n var keys = Object.keys(events);\n var key;\n for (i = 0; i < keys.length; ++i) {\n key = keys[i];\n if (key === 'removeListener') continue;\n this.removeAllListeners(key);\n }\n this.removeAllListeners('removeListener');\n this._events = Object.create(null);\n this._eventsCount = 0;\n return this;\n }\n\n listeners = events[type];\n\n if (typeof listeners === 'function') {\n this.removeListener(type, listeners);\n } else if (listeners !== undefined) {\n // LIFO order\n for (i = listeners.length - 1; i >= 0; i--) {\n this.removeListener(type, listeners[i]);\n }\n }\n\n return this;\n };\n\nfunction _listeners(target, type, unwrap) {\n var events = target._events;\n\n if (events === undefined)\n return [];\n\n var evlistener = events[type];\n if (evlistener === undefined)\n return [];\n\n if (typeof evlistener === 'function')\n return unwrap ? [evlistener.listener || evlistener] : [evlistener];\n\n return unwrap ?\n unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length);\n}\n\nEventEmitter.prototype.listeners = function listeners(type) {\n return _listeners(this, type, true);\n};\n\nEventEmitter.prototype.rawListeners = function rawListeners(type) {\n return _listeners(this, type, false);\n};\n\nEventEmitter.listenerCount = function(emitter, type) {\n if (typeof emitter.listenerCount === 'function') {\n return emitter.listenerCount(type);\n } else {\n return listenerCount.call(emitter, type);\n }\n};\n\nEventEmitter.prototype.listenerCount = listenerCount;\nfunction listenerCount(type) {\n var events = this._events;\n\n if (events !== undefined) {\n var evlistener = events[type];\n\n if (typeof evlistener === 'function') {\n return 1;\n } else if (evlistener !== undefined) {\n return evlistener.length;\n }\n }\n\n return 0;\n}\n\nEventEmitter.prototype.eventNames = function eventNames() {\n return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : [];\n};\n\nfunction arrayClone(arr, n) {\n var copy = new Array(n);\n for (var i = 0; i < n; ++i)\n copy[i] = arr[i];\n return copy;\n}\n\nfunction spliceOne(list, index) {\n for (; index + 1 < list.length; index++)\n list[index] = list[index + 1];\n list.pop();\n}\n\nfunction unwrapListeners(arr) {\n var ret = new Array(arr.length);\n for (var i = 0; i < ret.length; ++i) {\n ret[i] = arr[i].listener || arr[i];\n }\n return ret;\n}\n\nfunction once(emitter, name) {\n return new Promise(function (resolve, reject) {\n function errorListener(err) {\n emitter.removeListener(name, resolver);\n reject(err);\n }\n\n function resolver() {\n if (typeof emitter.removeListener === 'function') {\n emitter.removeListener('error', errorListener);\n }\n resolve([].slice.call(arguments));\n };\n\n eventTargetAgnosticAddListener(emitter, name, resolver, { once: true });\n if (name !== 'error') {\n addErrorHandlerIfEventEmitter(emitter, errorListener, { once: true });\n }\n });\n}\n\nfunction addErrorHandlerIfEventEmitter(emitter, handler, flags) {\n if (typeof emitter.on === 'function') {\n eventTargetAgnosticAddListener(emitter, 'error', handler, flags);\n }\n}\n\nfunction eventTargetAgnosticAddListener(emitter, name, listener, flags) {\n if (typeof emitter.on === 'function') {\n if (flags.once) {\n emitter.once(name, listener);\n } else {\n emitter.on(name, listener);\n }\n } else if (typeof emitter.addEventListener === 'function') {\n // EventTarget does not have `error` event semantics like Node\n // EventEmitters, we do not listen for `error` events here.\n emitter.addEventListener(name, function wrapListener(arg) {\n // IE does not have builtin `{ once: true }` support so we\n // have to do it manually.\n if (flags.once) {\n emitter.removeEventListener(name, wrapListener);\n }\n listener(arg);\n });\n } else {\n throw new TypeError('The \"emitter\" argument must be of type EventEmitter. Received type ' + typeof emitter);\n }\n}\n","/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */\nexports.read = function (buffer, offset, isLE, mLen, nBytes) {\n var e, m\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var nBits = -7\n var i = isLE ? (nBytes - 1) : 0\n var d = isLE ? -1 : 1\n var s = buffer[offset + i]\n\n i += d\n\n e = s & ((1 << (-nBits)) - 1)\n s >>= (-nBits)\n nBits += eLen\n for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & ((1 << (-nBits)) - 1)\n e >>= (-nBits)\n nBits += mLen\n for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias\n } else if (e === eMax) {\n return m ? NaN : ((s ? -1 : 1) * Infinity)\n } else {\n m = m + Math.pow(2, mLen)\n e = e - eBias\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n var i = isLE ? 0 : (nBytes - 1)\n var d = isLE ? 1 : -1\n var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n value = Math.abs(value)\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0\n e = eMax\n } else {\n e = Math.floor(Math.log(value) / Math.LN2)\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--\n c *= 2\n }\n if (e + eBias >= 1) {\n value += rt / c\n } else {\n value += rt * Math.pow(2, 1 - eBias)\n }\n if (value * c >= 2) {\n e++\n c /= 2\n }\n\n if (e + eBias >= eMax) {\n m = 0\n e = eMax\n } else if (e + eBias >= 1) {\n m = ((value * c) - 1) * Math.pow(2, mLen)\n e = e + eBias\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n e = 0\n }\n }\n\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n e = (e << mLen) | m\n eLen += mLen\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128\n}\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView');\n\nmodule.exports = DataView;\n","var hashClear = require('./_hashClear'),\n hashDelete = require('./_hashDelete'),\n hashGet = require('./_hashGet'),\n hashHas = require('./_hashHas'),\n hashSet = require('./_hashSet');\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\nmodule.exports = Hash;\n","var listCacheClear = require('./_listCacheClear'),\n listCacheDelete = require('./_listCacheDelete'),\n listCacheGet = require('./_listCacheGet'),\n listCacheHas = require('./_listCacheHas'),\n listCacheSet = require('./_listCacheSet');\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\nmodule.exports = ListCache;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map');\n\nmodule.exports = Map;\n","var mapCacheClear = require('./_mapCacheClear'),\n mapCacheDelete = require('./_mapCacheDelete'),\n mapCacheGet = require('./_mapCacheGet'),\n mapCacheHas = require('./_mapCacheHas'),\n mapCacheSet = require('./_mapCacheSet');\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\nmodule.exports = MapCache;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Promise = getNative(root, 'Promise');\n\nmodule.exports = Promise;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Set = getNative(root, 'Set');\n\nmodule.exports = Set;\n","var MapCache = require('./_MapCache'),\n setCacheAdd = require('./_setCacheAdd'),\n setCacheHas = require('./_setCacheHas');\n\n/**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\nfunction SetCache(values) {\n var index = -1,\n length = values == null ? 0 : values.length;\n\n this.__data__ = new MapCache;\n while (++index < length) {\n this.add(values[index]);\n }\n}\n\n// Add methods to `SetCache`.\nSetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\nSetCache.prototype.has = setCacheHas;\n\nmodule.exports = SetCache;\n","var ListCache = require('./_ListCache'),\n stackClear = require('./_stackClear'),\n stackDelete = require('./_stackDelete'),\n stackGet = require('./_stackGet'),\n stackHas = require('./_stackHas'),\n stackSet = require('./_stackSet');\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\nmodule.exports = Stack;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Uint8Array = root.Uint8Array;\n\nmodule.exports = Uint8Array;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar WeakMap = getNative(root, 'WeakMap');\n\nmodule.exports = WeakMap;\n","/**\n * A specialized version of `_.forEach` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\nfunction arrayEach(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (iteratee(array[index], index, array) === false) {\n break;\n }\n }\n return array;\n}\n\nmodule.exports = arrayEach;\n","/**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\nfunction arrayFilter(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result[resIndex++] = value;\n }\n }\n return result;\n}\n\nmodule.exports = arrayFilter;\n","var baseTimes = require('./_baseTimes'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isIndex = require('./_isIndex'),\n isTypedArray = require('./isTypedArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = arrayLikeKeys;\n","/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n}\n\nmodule.exports = arrayPush;\n","/**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\nfunction arraySome(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (predicate(array[index], index, array)) {\n return true;\n }\n }\n return false;\n}\n\nmodule.exports = arraySome;\n","var baseAssignValue = require('./_baseAssignValue'),\n eq = require('./eq');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\nmodule.exports = assignValue;\n","var eq = require('./eq');\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\nmodule.exports = assocIndexOf;\n","var copyObject = require('./_copyObject'),\n keys = require('./keys');\n\n/**\n * The base implementation of `_.assign` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssign(object, source) {\n return object && copyObject(source, keys(source), object);\n}\n\nmodule.exports = baseAssign;\n","var copyObject = require('./_copyObject'),\n keysIn = require('./keysIn');\n\n/**\n * The base implementation of `_.assignIn` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssignIn(object, source) {\n return object && copyObject(source, keysIn(source), object);\n}\n\nmodule.exports = baseAssignIn;\n","var defineProperty = require('./_defineProperty');\n\n/**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction baseAssignValue(object, key, value) {\n if (key == '__proto__' && defineProperty) {\n defineProperty(object, key, {\n 'configurable': true,\n 'enumerable': true,\n 'value': value,\n 'writable': true\n });\n } else {\n object[key] = value;\n }\n}\n\nmodule.exports = baseAssignValue;\n","var Stack = require('./_Stack'),\n arrayEach = require('./_arrayEach'),\n assignValue = require('./_assignValue'),\n baseAssign = require('./_baseAssign'),\n baseAssignIn = require('./_baseAssignIn'),\n cloneBuffer = require('./_cloneBuffer'),\n copyArray = require('./_copyArray'),\n copySymbols = require('./_copySymbols'),\n copySymbolsIn = require('./_copySymbolsIn'),\n getAllKeys = require('./_getAllKeys'),\n getAllKeysIn = require('./_getAllKeysIn'),\n getTag = require('./_getTag'),\n initCloneArray = require('./_initCloneArray'),\n initCloneByTag = require('./_initCloneByTag'),\n initCloneObject = require('./_initCloneObject'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isMap = require('./isMap'),\n isObject = require('./isObject'),\n isSet = require('./isSet'),\n keys = require('./keys'),\n keysIn = require('./keysIn');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_FLAT_FLAG = 2,\n CLONE_SYMBOLS_FLAG = 4;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values supported by `_.clone`. */\nvar cloneableTags = {};\ncloneableTags[argsTag] = cloneableTags[arrayTag] =\ncloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =\ncloneableTags[boolTag] = cloneableTags[dateTag] =\ncloneableTags[float32Tag] = cloneableTags[float64Tag] =\ncloneableTags[int8Tag] = cloneableTags[int16Tag] =\ncloneableTags[int32Tag] = cloneableTags[mapTag] =\ncloneableTags[numberTag] = cloneableTags[objectTag] =\ncloneableTags[regexpTag] = cloneableTags[setTag] =\ncloneableTags[stringTag] = cloneableTags[symbolTag] =\ncloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =\ncloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;\ncloneableTags[errorTag] = cloneableTags[funcTag] =\ncloneableTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.clone` and `_.cloneDeep` which tracks\n * traversed objects.\n *\n * @private\n * @param {*} value The value to clone.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Deep clone\n * 2 - Flatten inherited properties\n * 4 - Clone symbols\n * @param {Function} [customizer] The function to customize cloning.\n * @param {string} [key] The key of `value`.\n * @param {Object} [object] The parent object of `value`.\n * @param {Object} [stack] Tracks traversed objects and their clone counterparts.\n * @returns {*} Returns the cloned value.\n */\nfunction baseClone(value, bitmask, customizer, key, object, stack) {\n var result,\n isDeep = bitmask & CLONE_DEEP_FLAG,\n isFlat = bitmask & CLONE_FLAT_FLAG,\n isFull = bitmask & CLONE_SYMBOLS_FLAG;\n\n if (customizer) {\n result = object ? customizer(value, key, object, stack) : customizer(value);\n }\n if (result !== undefined) {\n return result;\n }\n if (!isObject(value)) {\n return value;\n }\n var isArr = isArray(value);\n if (isArr) {\n result = initCloneArray(value);\n if (!isDeep) {\n return copyArray(value, result);\n }\n } else {\n var tag = getTag(value),\n isFunc = tag == funcTag || tag == genTag;\n\n if (isBuffer(value)) {\n return cloneBuffer(value, isDeep);\n }\n if (tag == objectTag || tag == argsTag || (isFunc && !object)) {\n result = (isFlat || isFunc) ? {} : initCloneObject(value);\n if (!isDeep) {\n return isFlat\n ? copySymbolsIn(value, baseAssignIn(result, value))\n : copySymbols(value, baseAssign(result, value));\n }\n } else {\n if (!cloneableTags[tag]) {\n return object ? value : {};\n }\n result = initCloneByTag(value, tag, isDeep);\n }\n }\n // Check for circular references and return its corresponding clone.\n stack || (stack = new Stack);\n var stacked = stack.get(value);\n if (stacked) {\n return stacked;\n }\n stack.set(value, result);\n\n if (isSet(value)) {\n value.forEach(function(subValue) {\n result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));\n });\n } else if (isMap(value)) {\n value.forEach(function(subValue, key) {\n result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n }\n\n var keysFunc = isFull\n ? (isFlat ? getAllKeysIn : getAllKeys)\n : (isFlat ? keysIn : keys);\n\n var props = isArr ? undefined : keysFunc(value);\n arrayEach(props || value, function(subValue, key) {\n if (props) {\n key = subValue;\n subValue = value[key];\n }\n // Recursively populate clone (susceptible to call stack limits).\n assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n return result;\n}\n\nmodule.exports = baseClone;\n","var isObject = require('./isObject');\n\n/** Built-in value references. */\nvar objectCreate = Object.create;\n\n/**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} proto The object to inherit from.\n * @returns {Object} Returns the new object.\n */\nvar baseCreate = (function() {\n function object() {}\n return function(proto) {\n if (!isObject(proto)) {\n return {};\n }\n if (objectCreate) {\n return objectCreate(proto);\n }\n object.prototype = proto;\n var result = new object;\n object.prototype = undefined;\n return result;\n };\n}());\n\nmodule.exports = baseCreate;\n","var arrayPush = require('./_arrayPush'),\n isArray = require('./isArray');\n\n/**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction baseGetAllKeys(object, keysFunc, symbolsFunc) {\n var result = keysFunc(object);\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n}\n\nmodule.exports = baseGetAllKeys;\n","var Symbol = require('./_Symbol'),\n getRawTag = require('./_getRawTag'),\n objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]';\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\nmodule.exports = baseIsArguments;\n","var baseIsEqualDeep = require('./_baseIsEqualDeep'),\n isObjectLike = require('./isObjectLike');\n\n/**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Unordered comparison\n * 2 - Partial comparison\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\nfunction baseIsEqual(value, other, bitmask, customizer, stack) {\n if (value === other) {\n return true;\n }\n if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\n return value !== value && other !== other;\n }\n return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n}\n\nmodule.exports = baseIsEqual;\n","var Stack = require('./_Stack'),\n equalArrays = require('./_equalArrays'),\n equalByTag = require('./_equalByTag'),\n equalObjects = require('./_equalObjects'),\n getTag = require('./_getTag'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isTypedArray = require('./isTypedArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n var objIsArr = isArray(object),\n othIsArr = isArray(other),\n objTag = objIsArr ? arrayTag : getTag(object),\n othTag = othIsArr ? arrayTag : getTag(other);\n\n objTag = objTag == argsTag ? objectTag : objTag;\n othTag = othTag == argsTag ? objectTag : othTag;\n\n var objIsObj = objTag == objectTag,\n othIsObj = othTag == objectTag,\n isSameTag = objTag == othTag;\n\n if (isSameTag && isBuffer(object)) {\n if (!isBuffer(other)) {\n return false;\n }\n objIsArr = true;\n objIsObj = false;\n }\n if (isSameTag && !objIsObj) {\n stack || (stack = new Stack);\n return (objIsArr || isTypedArray(object))\n ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n }\n if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n if (objIsWrapped || othIsWrapped) {\n var objUnwrapped = objIsWrapped ? object.value() : object,\n othUnwrapped = othIsWrapped ? other.value() : other;\n\n stack || (stack = new Stack);\n return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n }\n }\n if (!isSameTag) {\n return false;\n }\n stack || (stack = new Stack);\n return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n}\n\nmodule.exports = baseIsEqualDeep;\n","var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]';\n\n/**\n * The base implementation of `_.isMap` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n */\nfunction baseIsMap(value) {\n return isObjectLike(value) && getTag(value) == mapTag;\n}\n\nmodule.exports = baseIsMap;\n","var isFunction = require('./isFunction'),\n isMasked = require('./_isMasked'),\n isObject = require('./isObject'),\n toSource = require('./_toSource');\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\nmodule.exports = baseIsNative;\n","var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar setTag = '[object Set]';\n\n/**\n * The base implementation of `_.isSet` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n */\nfunction baseIsSet(value) {\n return isObjectLike(value) && getTag(value) == setTag;\n}\n\nmodule.exports = baseIsSet;\n","var baseGetTag = require('./_baseGetTag'),\n isLength = require('./isLength'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n\nmodule.exports = baseIsTypedArray;\n","var isPrototype = require('./_isPrototype'),\n nativeKeys = require('./_nativeKeys');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeys;\n","var isObject = require('./isObject'),\n isPrototype = require('./_isPrototype'),\n nativeKeysIn = require('./_nativeKeysIn');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeysIn(object) {\n if (!isObject(object)) {\n return nativeKeysIn(object);\n }\n var isProto = isPrototype(object),\n result = [];\n\n for (var key in object) {\n if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeysIn;\n","/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\nmodule.exports = baseTimes;\n","/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n return function(value) {\n return func(value);\n };\n}\n\nmodule.exports = baseUnary;\n","/**\n * Checks if a `cache` value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction cacheHas(cache, key) {\n return cache.has(key);\n}\n\nmodule.exports = cacheHas;\n","var Uint8Array = require('./_Uint8Array');\n\n/**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\nfunction cloneArrayBuffer(arrayBuffer) {\n var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n return result;\n}\n\nmodule.exports = cloneArrayBuffer;\n","var root = require('./_root');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined,\n allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;\n\n/**\n * Creates a clone of `buffer`.\n *\n * @private\n * @param {Buffer} buffer The buffer to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Buffer} Returns the cloned buffer.\n */\nfunction cloneBuffer(buffer, isDeep) {\n if (isDeep) {\n return buffer.slice();\n }\n var length = buffer.length,\n result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\n\n buffer.copy(result);\n return result;\n}\n\nmodule.exports = cloneBuffer;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer');\n\n/**\n * Creates a clone of `dataView`.\n *\n * @private\n * @param {Object} dataView The data view to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned data view.\n */\nfunction cloneDataView(dataView, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;\n return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);\n}\n\nmodule.exports = cloneDataView;\n","/** Used to match `RegExp` flags from their coerced string values. */\nvar reFlags = /\\w*$/;\n\n/**\n * Creates a clone of `regexp`.\n *\n * @private\n * @param {Object} regexp The regexp to clone.\n * @returns {Object} Returns the cloned regexp.\n */\nfunction cloneRegExp(regexp) {\n var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));\n result.lastIndex = regexp.lastIndex;\n return result;\n}\n\nmodule.exports = cloneRegExp;\n","var Symbol = require('./_Symbol');\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * Creates a clone of the `symbol` object.\n *\n * @private\n * @param {Object} symbol The symbol object to clone.\n * @returns {Object} Returns the cloned symbol object.\n */\nfunction cloneSymbol(symbol) {\n return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};\n}\n\nmodule.exports = cloneSymbol;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer');\n\n/**\n * Creates a clone of `typedArray`.\n *\n * @private\n * @param {Object} typedArray The typed array to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned typed array.\n */\nfunction cloneTypedArray(typedArray, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n}\n\nmodule.exports = cloneTypedArray;\n","/**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\nfunction copyArray(source, array) {\n var index = -1,\n length = source.length;\n\n array || (array = Array(length));\n while (++index < length) {\n array[index] = source[index];\n }\n return array;\n}\n\nmodule.exports = copyArray;\n","var assignValue = require('./_assignValue'),\n baseAssignValue = require('./_baseAssignValue');\n\n/**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\nfunction copyObject(source, props, object, customizer) {\n var isNew = !object;\n object || (object = {});\n\n var index = -1,\n length = props.length;\n\n while (++index < length) {\n var key = props[index];\n\n var newValue = customizer\n ? customizer(object[key], source[key], key, object, source)\n : undefined;\n\n if (newValue === undefined) {\n newValue = source[key];\n }\n if (isNew) {\n baseAssignValue(object, key, newValue);\n } else {\n assignValue(object, key, newValue);\n }\n }\n return object;\n}\n\nmodule.exports = copyObject;\n","var copyObject = require('./_copyObject'),\n getSymbols = require('./_getSymbols');\n\n/**\n * Copies own symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbols(source, object) {\n return copyObject(source, getSymbols(source), object);\n}\n\nmodule.exports = copySymbols;\n","var copyObject = require('./_copyObject'),\n getSymbolsIn = require('./_getSymbolsIn');\n\n/**\n * Copies own and inherited symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbolsIn(source, object) {\n return copyObject(source, getSymbolsIn(source), object);\n}\n\nmodule.exports = copySymbolsIn;\n","var root = require('./_root');\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\nmodule.exports = coreJsData;\n","var getNative = require('./_getNative');\n\nvar defineProperty = (function() {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n}());\n\nmodule.exports = defineProperty;\n","var SetCache = require('./_SetCache'),\n arraySome = require('./_arraySome'),\n cacheHas = require('./_cacheHas');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\nfunction equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n arrLength = array.length,\n othLength = other.length;\n\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n return false;\n }\n // Check that cyclic values are equal.\n var arrStacked = stack.get(array);\n var othStacked = stack.get(other);\n if (arrStacked && othStacked) {\n return arrStacked == other && othStacked == array;\n }\n var index = -1,\n result = true,\n seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n stack.set(array, other);\n stack.set(other, array);\n\n // Ignore non-index properties.\n while (++index < arrLength) {\n var arrValue = array[index],\n othValue = other[index];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, arrValue, index, other, array, stack)\n : customizer(arrValue, othValue, index, array, other, stack);\n }\n if (compared !== undefined) {\n if (compared) {\n continue;\n }\n result = false;\n break;\n }\n // Recursively compare arrays (susceptible to call stack limits).\n if (seen) {\n if (!arraySome(other, function(othValue, othIndex) {\n if (!cacheHas(seen, othIndex) &&\n (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n return seen.push(othIndex);\n }\n })) {\n result = false;\n break;\n }\n } else if (!(\n arrValue === othValue ||\n equalFunc(arrValue, othValue, bitmask, customizer, stack)\n )) {\n result = false;\n break;\n }\n }\n stack['delete'](array);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalArrays;\n","var Symbol = require('./_Symbol'),\n Uint8Array = require('./_Uint8Array'),\n eq = require('./eq'),\n equalArrays = require('./_equalArrays'),\n mapToArray = require('./_mapToArray'),\n setToArray = require('./_setToArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]';\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n switch (tag) {\n case dataViewTag:\n if ((object.byteLength != other.byteLength) ||\n (object.byteOffset != other.byteOffset)) {\n return false;\n }\n object = object.buffer;\n other = other.buffer;\n\n case arrayBufferTag:\n if ((object.byteLength != other.byteLength) ||\n !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n return false;\n }\n return true;\n\n case boolTag:\n case dateTag:\n case numberTag:\n // Coerce booleans to `1` or `0` and dates to milliseconds.\n // Invalid dates are coerced to `NaN`.\n return eq(+object, +other);\n\n case errorTag:\n return object.name == other.name && object.message == other.message;\n\n case regexpTag:\n case stringTag:\n // Coerce regexes to strings and treat strings, primitives and objects,\n // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n // for more details.\n return object == (other + '');\n\n case mapTag:\n var convert = mapToArray;\n\n case setTag:\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n convert || (convert = setToArray);\n\n if (object.size != other.size && !isPartial) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked) {\n return stacked == other;\n }\n bitmask |= COMPARE_UNORDERED_FLAG;\n\n // Recursively compare objects (susceptible to call stack limits).\n stack.set(object, other);\n var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n stack['delete'](object);\n return result;\n\n case symbolTag:\n if (symbolValueOf) {\n return symbolValueOf.call(object) == symbolValueOf.call(other);\n }\n }\n return false;\n}\n\nmodule.exports = equalByTag;\n","var getAllKeys = require('./_getAllKeys');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n objProps = getAllKeys(object),\n objLength = objProps.length,\n othProps = getAllKeys(other),\n othLength = othProps.length;\n\n if (objLength != othLength && !isPartial) {\n return false;\n }\n var index = objLength;\n while (index--) {\n var key = objProps[index];\n if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n return false;\n }\n }\n // Check that cyclic values are equal.\n var objStacked = stack.get(object);\n var othStacked = stack.get(other);\n if (objStacked && othStacked) {\n return objStacked == other && othStacked == object;\n }\n var result = true;\n stack.set(object, other);\n stack.set(other, object);\n\n var skipCtor = isPartial;\n while (++index < objLength) {\n key = objProps[index];\n var objValue = object[key],\n othValue = other[key];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, objValue, key, other, object, stack)\n : customizer(objValue, othValue, key, object, other, stack);\n }\n // Recursively compare objects (susceptible to call stack limits).\n if (!(compared === undefined\n ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n : compared\n )) {\n result = false;\n break;\n }\n skipCtor || (skipCtor = key == 'constructor');\n }\n if (result && !skipCtor) {\n var objCtor = object.constructor,\n othCtor = other.constructor;\n\n // Non `Object` object instances with different constructors are not equal.\n if (objCtor != othCtor &&\n ('constructor' in object && 'constructor' in other) &&\n !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n result = false;\n }\n }\n stack['delete'](object);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalObjects;\n","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n","var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbols = require('./_getSymbols'),\n keys = require('./keys');\n\n/**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeys(object) {\n return baseGetAllKeys(object, keys, getSymbols);\n}\n\nmodule.exports = getAllKeys;\n","var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbolsIn = require('./_getSymbolsIn'),\n keysIn = require('./keysIn');\n\n/**\n * Creates an array of own and inherited enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeysIn(object) {\n return baseGetAllKeys(object, keysIn, getSymbolsIn);\n}\n\nmodule.exports = getAllKeysIn;\n","var isKeyable = require('./_isKeyable');\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\nmodule.exports = getMapData;\n","var baseIsNative = require('./_baseIsNative'),\n getValue = require('./_getValue');\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\nmodule.exports = getNative;\n","var overArg = require('./_overArg');\n\n/** Built-in value references. */\nvar getPrototype = overArg(Object.getPrototypeOf, Object);\n\nmodule.exports = getPrototype;\n","var Symbol = require('./_Symbol');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nmodule.exports = getRawTag;\n","var arrayFilter = require('./_arrayFilter'),\n stubArray = require('./stubArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n if (object == null) {\n return [];\n }\n object = Object(object);\n return arrayFilter(nativeGetSymbols(object), function(symbol) {\n return propertyIsEnumerable.call(object, symbol);\n });\n};\n\nmodule.exports = getSymbols;\n","var arrayPush = require('./_arrayPush'),\n getPrototype = require('./_getPrototype'),\n getSymbols = require('./_getSymbols'),\n stubArray = require('./stubArray');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own and inherited enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {\n var result = [];\n while (object) {\n arrayPush(result, getSymbols(object));\n object = getPrototype(object);\n }\n return result;\n};\n\nmodule.exports = getSymbolsIn;\n","var DataView = require('./_DataView'),\n Map = require('./_Map'),\n Promise = require('./_Promise'),\n Set = require('./_Set'),\n WeakMap = require('./_WeakMap'),\n baseGetTag = require('./_baseGetTag'),\n toSource = require('./_toSource');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n setTag = '[object Set]',\n weakMapTag = '[object WeakMap]';\n\nvar dataViewTag = '[object DataView]';\n\n/** Used to detect maps, sets, and weakmaps. */\nvar dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nvar getTag = baseGetTag;\n\n// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\nif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = baseGetTag(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : '';\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n}\n\nmodule.exports = getTag;\n","/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\nmodule.exports = getValue;\n","var nativeCreate = require('./_nativeCreate');\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n}\n\nmodule.exports = hashClear;\n","/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = hashDelete;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\nmodule.exports = hashGet;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\nmodule.exports = hashHas;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\nmodule.exports = hashSet;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Initializes an array clone.\n *\n * @private\n * @param {Array} array The array to clone.\n * @returns {Array} Returns the initialized clone.\n */\nfunction initCloneArray(array) {\n var length = array.length,\n result = new array.constructor(length);\n\n // Add properties assigned by `RegExp#exec`.\n if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {\n result.index = array.index;\n result.input = array.input;\n }\n return result;\n}\n\nmodule.exports = initCloneArray;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer'),\n cloneDataView = require('./_cloneDataView'),\n cloneRegExp = require('./_cloneRegExp'),\n cloneSymbol = require('./_cloneSymbol'),\n cloneTypedArray = require('./_cloneTypedArray');\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/**\n * Initializes an object clone based on its `toStringTag`.\n *\n * **Note:** This function only supports cloning values with tags of\n * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.\n *\n * @private\n * @param {Object} object The object to clone.\n * @param {string} tag The `toStringTag` of the object to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneByTag(object, tag, isDeep) {\n var Ctor = object.constructor;\n switch (tag) {\n case arrayBufferTag:\n return cloneArrayBuffer(object);\n\n case boolTag:\n case dateTag:\n return new Ctor(+object);\n\n case dataViewTag:\n return cloneDataView(object, isDeep);\n\n case float32Tag: case float64Tag:\n case int8Tag: case int16Tag: case int32Tag:\n case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:\n return cloneTypedArray(object, isDeep);\n\n case mapTag:\n return new Ctor;\n\n case numberTag:\n case stringTag:\n return new Ctor(object);\n\n case regexpTag:\n return cloneRegExp(object);\n\n case setTag:\n return new Ctor;\n\n case symbolTag:\n return cloneSymbol(object);\n }\n}\n\nmodule.exports = initCloneByTag;\n","var baseCreate = require('./_baseCreate'),\n getPrototype = require('./_getPrototype'),\n isPrototype = require('./_isPrototype');\n\n/**\n * Initializes an object clone.\n *\n * @private\n * @param {Object} object The object to clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneObject(object) {\n return (typeof object.constructor == 'function' && !isPrototype(object))\n ? baseCreate(getPrototype(object))\n : {};\n}\n\nmodule.exports = initCloneObject;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n var type = typeof value;\n length = length == null ? MAX_SAFE_INTEGER : length;\n\n return !!length &&\n (type == 'number' ||\n (type != 'symbol' && reIsUint.test(value))) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\nmodule.exports = isIndex;\n","/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\nmodule.exports = isKeyable;\n","var coreJsData = require('./_coreJsData');\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\nmodule.exports = isMasked;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\nmodule.exports = isPrototype;\n","/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n}\n\nmodule.exports = listCacheClear;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype;\n\n/** Built-in value references. */\nvar splice = arrayProto.splice;\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n}\n\nmodule.exports = listCacheDelete;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\nmodule.exports = listCacheGet;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\nmodule.exports = listCacheHas;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\nmodule.exports = listCacheSet;\n","var Hash = require('./_Hash'),\n ListCache = require('./_ListCache'),\n Map = require('./_Map');\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\nmodule.exports = mapCacheClear;\n","var getMapData = require('./_getMapData');\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = mapCacheDelete;\n","var getMapData = require('./_getMapData');\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\nmodule.exports = mapCacheGet;\n","var getMapData = require('./_getMapData');\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\nmodule.exports = mapCacheHas;\n","var getMapData = require('./_getMapData');\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n}\n\nmodule.exports = mapCacheSet;\n","/**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\nfunction mapToArray(map) {\n var index = -1,\n result = Array(map.size);\n\n map.forEach(function(value, key) {\n result[++index] = [key, value];\n });\n return result;\n}\n\nmodule.exports = mapToArray;\n","var getNative = require('./_getNative');\n\n/* Built-in method references that are verified to be native. */\nvar nativeCreate = getNative(Object, 'create');\n\nmodule.exports = nativeCreate;\n","var overArg = require('./_overArg');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeKeys = overArg(Object.keys, Object);\n\nmodule.exports = nativeKeys;\n","/**\n * This function is like\n * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * except that it includes inherited enumerable properties.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction nativeKeysIn(object) {\n var result = [];\n if (object != null) {\n for (var key in Object(object)) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = nativeKeysIn;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n try {\n // Use `util.types` for Node.js 10+.\n var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n if (types) {\n return types;\n }\n\n // Legacy `process.binding('util')` for Node.js < 10.\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n}());\n\nmodule.exports = nodeUtil;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n","/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\nmodule.exports = overArg;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n","/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\nfunction setCacheAdd(value) {\n this.__data__.set(value, HASH_UNDEFINED);\n return this;\n}\n\nmodule.exports = setCacheAdd;\n","/**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\nfunction setCacheHas(value) {\n return this.__data__.has(value);\n}\n\nmodule.exports = setCacheHas;\n","/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\nfunction setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n}\n\nmodule.exports = setToArray;\n","var ListCache = require('./_ListCache');\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}\n\nmodule.exports = stackClear;\n","/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n var data = this.__data__,\n result = data['delete'](key);\n\n this.size = data.size;\n return result;\n}\n\nmodule.exports = stackDelete;\n","/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n return this.__data__.get(key);\n}\n\nmodule.exports = stackGet;\n","/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n return this.__data__.has(key);\n}\n\nmodule.exports = stackHas;\n","var ListCache = require('./_ListCache'),\n Map = require('./_Map'),\n MapCache = require('./_MapCache');\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n var data = this.__data__;\n if (data instanceof ListCache) {\n var pairs = data.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n this.size = ++data.size;\n return this;\n }\n data = this.__data__ = new MapCache(pairs);\n }\n data.set(key, value);\n this.size = data.size;\n return this;\n}\n\nmodule.exports = stackSet;\n","/** Used for built-in method references. */\nvar funcProto = Function.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\nmodule.exports = toSource;\n","var baseClone = require('./_baseClone');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_SYMBOLS_FLAG = 4;\n\n/**\n * This method is like `_.clone` except that it recursively clones `value`.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Lang\n * @param {*} value The value to recursively clone.\n * @returns {*} Returns the deep cloned value.\n * @see _.clone\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var deep = _.cloneDeep(objects);\n * console.log(deep[0] === objects[0]);\n * // => false\n */\nfunction cloneDeep(value) {\n return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);\n}\n\nmodule.exports = cloneDeep;\n","/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\nmodule.exports = eq;\n","var baseIsArguments = require('./_baseIsArguments'),\n isObjectLike = require('./isObjectLike');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n};\n\nmodule.exports = isArguments;\n","/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\nmodule.exports = isArray;\n","var isFunction = require('./isFunction'),\n isLength = require('./isLength');\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\nmodule.exports = isArrayLike;\n","var root = require('./_root'),\n stubFalse = require('./stubFalse');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\nmodule.exports = isBuffer;\n","var baseIsEqual = require('./_baseIsEqual');\n\n/**\n * Performs a deep comparison between two values to determine if they are\n * equivalent.\n *\n * **Note:** This method supports comparing arrays, array buffers, booleans,\n * date objects, error objects, maps, numbers, `Object` objects, regexes,\n * sets, strings, symbols, and typed arrays. `Object` objects are compared\n * by their own, not inherited, enumerable properties. Functions and DOM\n * nodes are compared by strict equality, i.e. `===`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.isEqual(object, other);\n * // => true\n *\n * object === other;\n * // => false\n */\nfunction isEqual(value, other) {\n return baseIsEqual(value, other);\n}\n\nmodule.exports = isEqual;\n","var baseGetTag = require('./_baseGetTag'),\n isObject = require('./isObject');\n\n/** `Object#toString` result references. */\nvar asyncTag = '[object AsyncFunction]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n proxyTag = '[object Proxy]';\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\nmodule.exports = isFunction;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\nmodule.exports = isLength;\n","var baseIsMap = require('./_baseIsMap'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsMap = nodeUtil && nodeUtil.isMap;\n\n/**\n * Checks if `value` is classified as a `Map` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n * @example\n *\n * _.isMap(new Map);\n * // => true\n *\n * _.isMap(new WeakMap);\n * // => false\n */\nvar isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;\n\nmodule.exports = isMap;\n","/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n","var baseIsSet = require('./_baseIsSet'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsSet = nodeUtil && nodeUtil.isSet;\n\n/**\n * Checks if `value` is classified as a `Set` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n * @example\n *\n * _.isSet(new Set);\n * // => true\n *\n * _.isSet(new WeakSet);\n * // => false\n */\nvar isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;\n\nmodule.exports = isSet;\n","var baseIsTypedArray = require('./_baseIsTypedArray'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\nmodule.exports = isTypedArray;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeys = require('./_baseKeys'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\nmodule.exports = keys;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeysIn = require('./_baseKeysIn'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\nfunction keysIn(object) {\n return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n}\n\nmodule.exports = keysIn;\n","/**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\nfunction stubArray() {\n return [];\n}\n\nmodule.exports = stubArray;\n","/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n return false;\n}\n\nmodule.exports = stubFalse;\n","import type { WebLayoutSnapshot } from \"@openfin/core-web\";\nimport type { Settings } from \"../shapes/setting-shapes\";\n\n/**\n * Fetches the settings for the application.\n * @returns The settings for the application.\n */\nexport async function getSettings(): Promise {\n\tconst settings = await getManifestSettings();\n\tif (settings === undefined) {\n\t\tconsole.error(\n\t\t\t\"Unable to run the example as settings are required and we fetch them from the link web manifest from the html page that is being served. It should exist in the customSettings section of the web manifest.\"\n\t\t);\n\t}\n\treturn settings;\n}\n\n/**\n * Returns a default layout from the settings if provided.\n * @returns The default layout from the settings.\n */\nexport async function getDefaultLayout(): Promise {\n\tconst settings = await getSettings();\n\tif (settings?.platform?.layout?.defaultLayout === undefined) {\n\t\tconsole.error(\n\t\t\t\"Unable to run the example as without a layout being defined. Please ensure that settings have been provided in the web manifest.\"\n\t\t);\n\t\treturn;\n\t}\n\tif (typeof settings.platform.layout.defaultLayout === \"string\") {\n\t\tconst layoutResponse = await fetch(settings.platform.layout.defaultLayout);\n\t\tconst layoutJson = (await layoutResponse.json()) as WebLayoutSnapshot;\n\t\treturn layoutJson;\n\t}\n\treturn settings.platform.layout.defaultLayout;\n}\n\n/**\n * Returns the settings from the manifest file.\n * @returns customSettings for this example\n */\nasync function getManifestSettings(): Promise {\n\t// Get the manifest link\n\tconst link = document.querySelector('link[rel=\"manifest\"]');\n\tif (link !== null) {\n\t\tconst manifestResponse = await fetch(link.href);\n\t\tconst manifestJson = (await manifestResponse.json()) as { custom_settings: Settings };\n\t\treturn manifestJson.custom_settings;\n\t}\n}\n","export { default as v1 } from './v1.js';\nexport { default as v3 } from './v3.js';\nexport { default as v4 } from './v4.js';\nexport { default as v5 } from './v5.js';\nexport { default as NIL } from './nil.js';\nexport { default as version } from './version.js';\nexport { default as validate } from './validate.js';\nexport { default as stringify } from './stringify.js';\nexport { default as parse } from './parse.js';","/*\n * Browser-compatible JavaScript MD5\n *\n * Modification of JavaScript MD5\n * https://github.com/blueimp/JavaScript-MD5\n *\n * Copyright 2011, Sebastian Tschan\n * https://blueimp.net\n *\n * Licensed under the MIT license:\n * https://opensource.org/licenses/MIT\n *\n * Based on\n * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message\n * Digest Algorithm, as defined in RFC 1321.\n * Version 2.2 Copyright (C) Paul Johnston 1999 - 2009\n * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet\n * Distributed under the BSD License\n * See http://pajhome.org.uk/crypt/md5 for more info.\n */\nfunction md5(bytes) {\n if (typeof bytes === 'string') {\n var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape\n\n bytes = new Uint8Array(msg.length);\n\n for (var i = 0; i < msg.length; ++i) {\n bytes[i] = msg.charCodeAt(i);\n }\n }\n\n return md5ToHexEncodedArray(wordsToMd5(bytesToWords(bytes), bytes.length * 8));\n}\n/*\n * Convert an array of little-endian words to an array of bytes\n */\n\n\nfunction md5ToHexEncodedArray(input) {\n var output = [];\n var length32 = input.length * 32;\n var hexTab = '0123456789abcdef';\n\n for (var i = 0; i < length32; i += 8) {\n var x = input[i >> 5] >>> i % 32 & 0xff;\n var hex = parseInt(hexTab.charAt(x >>> 4 & 0x0f) + hexTab.charAt(x & 0x0f), 16);\n output.push(hex);\n }\n\n return output;\n}\n/**\n * Calculate output length with padding and bit length\n */\n\n\nfunction getOutputLength(inputLength8) {\n return (inputLength8 + 64 >>> 9 << 4) + 14 + 1;\n}\n/*\n * Calculate the MD5 of an array of little-endian words, and a bit length.\n */\n\n\nfunction wordsToMd5(x, len) {\n /* append padding */\n x[len >> 5] |= 0x80 << len % 32;\n x[getOutputLength(len) - 1] = len;\n var a = 1732584193;\n var b = -271733879;\n var c = -1732584194;\n var d = 271733878;\n\n for (var i = 0; i < x.length; i += 16) {\n var olda = a;\n var oldb = b;\n var oldc = c;\n var oldd = d;\n a = md5ff(a, b, c, d, x[i], 7, -680876936);\n d = md5ff(d, a, b, c, x[i + 1], 12, -389564586);\n c = md5ff(c, d, a, b, x[i + 2], 17, 606105819);\n b = md5ff(b, c, d, a, x[i + 3], 22, -1044525330);\n a = md5ff(a, b, c, d, x[i + 4], 7, -176418897);\n d = md5ff(d, a, b, c, x[i + 5], 12, 1200080426);\n c = md5ff(c, d, a, b, x[i + 6], 17, -1473231341);\n b = md5ff(b, c, d, a, x[i + 7], 22, -45705983);\n a = md5ff(a, b, c, d, x[i + 8], 7, 1770035416);\n d = md5ff(d, a, b, c, x[i + 9], 12, -1958414417);\n c = md5ff(c, d, a, b, x[i + 10], 17, -42063);\n b = md5ff(b, c, d, a, x[i + 11], 22, -1990404162);\n a = md5ff(a, b, c, d, x[i + 12], 7, 1804603682);\n d = md5ff(d, a, b, c, x[i + 13], 12, -40341101);\n c = md5ff(c, d, a, b, x[i + 14], 17, -1502002290);\n b = md5ff(b, c, d, a, x[i + 15], 22, 1236535329);\n a = md5gg(a, b, c, d, x[i + 1], 5, -165796510);\n d = md5gg(d, a, b, c, x[i + 6], 9, -1069501632);\n c = md5gg(c, d, a, b, x[i + 11], 14, 643717713);\n b = md5gg(b, c, d, a, x[i], 20, -373897302);\n a = md5gg(a, b, c, d, x[i + 5], 5, -701558691);\n d = md5gg(d, a, b, c, x[i + 10], 9, 38016083);\n c = md5gg(c, d, a, b, x[i + 15], 14, -660478335);\n b = md5gg(b, c, d, a, x[i + 4], 20, -405537848);\n a = md5gg(a, b, c, d, x[i + 9], 5, 568446438);\n d = md5gg(d, a, b, c, x[i + 14], 9, -1019803690);\n c = md5gg(c, d, a, b, x[i + 3], 14, -187363961);\n b = md5gg(b, c, d, a, x[i + 8], 20, 1163531501);\n a = md5gg(a, b, c, d, x[i + 13], 5, -1444681467);\n d = md5gg(d, a, b, c, x[i + 2], 9, -51403784);\n c = md5gg(c, d, a, b, x[i + 7], 14, 1735328473);\n b = md5gg(b, c, d, a, x[i + 12], 20, -1926607734);\n a = md5hh(a, b, c, d, x[i + 5], 4, -378558);\n d = md5hh(d, a, b, c, x[i + 8], 11, -2022574463);\n c = md5hh(c, d, a, b, x[i + 11], 16, 1839030562);\n b = md5hh(b, c, d, a, x[i + 14], 23, -35309556);\n a = md5hh(a, b, c, d, x[i + 1], 4, -1530992060);\n d = md5hh(d, a, b, c, x[i + 4], 11, 1272893353);\n c = md5hh(c, d, a, b, x[i + 7], 16, -155497632);\n b = md5hh(b, c, d, a, x[i + 10], 23, -1094730640);\n a = md5hh(a, b, c, d, x[i + 13], 4, 681279174);\n d = md5hh(d, a, b, c, x[i], 11, -358537222);\n c = md5hh(c, d, a, b, x[i + 3], 16, -722521979);\n b = md5hh(b, c, d, a, x[i + 6], 23, 76029189);\n a = md5hh(a, b, c, d, x[i + 9], 4, -640364487);\n d = md5hh(d, a, b, c, x[i + 12], 11, -421815835);\n c = md5hh(c, d, a, b, x[i + 15], 16, 530742520);\n b = md5hh(b, c, d, a, x[i + 2], 23, -995338651);\n a = md5ii(a, b, c, d, x[i], 6, -198630844);\n d = md5ii(d, a, b, c, x[i + 7], 10, 1126891415);\n c = md5ii(c, d, a, b, x[i + 14], 15, -1416354905);\n b = md5ii(b, c, d, a, x[i + 5], 21, -57434055);\n a = md5ii(a, b, c, d, x[i + 12], 6, 1700485571);\n d = md5ii(d, a, b, c, x[i + 3], 10, -1894986606);\n c = md5ii(c, d, a, b, x[i + 10], 15, -1051523);\n b = md5ii(b, c, d, a, x[i + 1], 21, -2054922799);\n a = md5ii(a, b, c, d, x[i + 8], 6, 1873313359);\n d = md5ii(d, a, b, c, x[i + 15], 10, -30611744);\n c = md5ii(c, d, a, b, x[i + 6], 15, -1560198380);\n b = md5ii(b, c, d, a, x[i + 13], 21, 1309151649);\n a = md5ii(a, b, c, d, x[i + 4], 6, -145523070);\n d = md5ii(d, a, b, c, x[i + 11], 10, -1120210379);\n c = md5ii(c, d, a, b, x[i + 2], 15, 718787259);\n b = md5ii(b, c, d, a, x[i + 9], 21, -343485551);\n a = safeAdd(a, olda);\n b = safeAdd(b, oldb);\n c = safeAdd(c, oldc);\n d = safeAdd(d, oldd);\n }\n\n return [a, b, c, d];\n}\n/*\n * Convert an array bytes to an array of little-endian words\n * Characters >255 have their high-byte silently ignored.\n */\n\n\nfunction bytesToWords(input) {\n if (input.length === 0) {\n return [];\n }\n\n var length8 = input.length * 8;\n var output = new Uint32Array(getOutputLength(length8));\n\n for (var i = 0; i < length8; i += 8) {\n output[i >> 5] |= (input[i / 8] & 0xff) << i % 32;\n }\n\n return output;\n}\n/*\n * Add integers, wrapping at 2^32. This uses 16-bit operations internally\n * to work around bugs in some JS interpreters.\n */\n\n\nfunction safeAdd(x, y) {\n var lsw = (x & 0xffff) + (y & 0xffff);\n var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n return msw << 16 | lsw & 0xffff;\n}\n/*\n * Bitwise rotate a 32-bit number to the left.\n */\n\n\nfunction bitRotateLeft(num, cnt) {\n return num << cnt | num >>> 32 - cnt;\n}\n/*\n * These functions implement the four basic operations the algorithm uses.\n */\n\n\nfunction md5cmn(q, a, b, x, s, t) {\n return safeAdd(bitRotateLeft(safeAdd(safeAdd(a, q), safeAdd(x, t)), s), b);\n}\n\nfunction md5ff(a, b, c, d, x, s, t) {\n return md5cmn(b & c | ~b & d, a, b, x, s, t);\n}\n\nfunction md5gg(a, b, c, d, x, s, t) {\n return md5cmn(b & d | c & ~d, a, b, x, s, t);\n}\n\nfunction md5hh(a, b, c, d, x, s, t) {\n return md5cmn(b ^ c ^ d, a, b, x, s, t);\n}\n\nfunction md5ii(a, b, c, d, x, s, t) {\n return md5cmn(c ^ (b | ~d), a, b, x, s, t);\n}\n\nexport default md5;","export default '00000000-0000-0000-0000-000000000000';","import validate from './validate.js';\n\nfunction parse(uuid) {\n if (!validate(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n var v;\n var arr = new Uint8Array(16); // Parse ########-....-....-....-............\n\n arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24;\n arr[1] = v >>> 16 & 0xff;\n arr[2] = v >>> 8 & 0xff;\n arr[3] = v & 0xff; // Parse ........-####-....-....-............\n\n arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8;\n arr[5] = v & 0xff; // Parse ........-....-####-....-............\n\n arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8;\n arr[7] = v & 0xff; // Parse ........-....-....-####-............\n\n arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8;\n arr[9] = v & 0xff; // Parse ........-....-....-....-############\n // (Use \"/\" to avoid 32-bit truncation when bit-shifting high-order bytes)\n\n arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff;\n arr[11] = v / 0x100000000 & 0xff;\n arr[12] = v >>> 24 & 0xff;\n arr[13] = v >>> 16 & 0xff;\n arr[14] = v >>> 8 & 0xff;\n arr[15] = v & 0xff;\n return arr;\n}\n\nexport default parse;","export default /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;","// Unique ID creation requires a high quality random # generator. In the browser we therefore\n// require the crypto API and do not support built-in fallback to lower quality random number\n// generators (like Math.random()).\nvar getRandomValues;\nvar rnds8 = new Uint8Array(16);\nexport default function rng() {\n // lazy load so that environments that need to polyfill have a chance to do so\n if (!getRandomValues) {\n // getRandomValues needs to be invoked in a context where \"this\" is a Crypto implementation. Also,\n // find the complete implementation of crypto (msCrypto) on IE11.\n getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto !== 'undefined' && typeof msCrypto.getRandomValues === 'function' && msCrypto.getRandomValues.bind(msCrypto);\n\n if (!getRandomValues) {\n throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');\n }\n }\n\n return getRandomValues(rnds8);\n}","// Adapted from Chris Veness' SHA1 code at\n// http://www.movable-type.co.uk/scripts/sha1.html\nfunction f(s, x, y, z) {\n switch (s) {\n case 0:\n return x & y ^ ~x & z;\n\n case 1:\n return x ^ y ^ z;\n\n case 2:\n return x & y ^ x & z ^ y & z;\n\n case 3:\n return x ^ y ^ z;\n }\n}\n\nfunction ROTL(x, n) {\n return x << n | x >>> 32 - n;\n}\n\nfunction sha1(bytes) {\n var K = [0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xca62c1d6];\n var H = [0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0];\n\n if (typeof bytes === 'string') {\n var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape\n\n bytes = [];\n\n for (var i = 0; i < msg.length; ++i) {\n bytes.push(msg.charCodeAt(i));\n }\n } else if (!Array.isArray(bytes)) {\n // Convert Array-like to Array\n bytes = Array.prototype.slice.call(bytes);\n }\n\n bytes.push(0x80);\n var l = bytes.length / 4 + 2;\n var N = Math.ceil(l / 16);\n var M = new Array(N);\n\n for (var _i = 0; _i < N; ++_i) {\n var arr = new Uint32Array(16);\n\n for (var j = 0; j < 16; ++j) {\n arr[j] = bytes[_i * 64 + j * 4] << 24 | bytes[_i * 64 + j * 4 + 1] << 16 | bytes[_i * 64 + j * 4 + 2] << 8 | bytes[_i * 64 + j * 4 + 3];\n }\n\n M[_i] = arr;\n }\n\n M[N - 1][14] = (bytes.length - 1) * 8 / Math.pow(2, 32);\n M[N - 1][14] = Math.floor(M[N - 1][14]);\n M[N - 1][15] = (bytes.length - 1) * 8 & 0xffffffff;\n\n for (var _i2 = 0; _i2 < N; ++_i2) {\n var W = new Uint32Array(80);\n\n for (var t = 0; t < 16; ++t) {\n W[t] = M[_i2][t];\n }\n\n for (var _t = 16; _t < 80; ++_t) {\n W[_t] = ROTL(W[_t - 3] ^ W[_t - 8] ^ W[_t - 14] ^ W[_t - 16], 1);\n }\n\n var a = H[0];\n var b = H[1];\n var c = H[2];\n var d = H[3];\n var e = H[4];\n\n for (var _t2 = 0; _t2 < 80; ++_t2) {\n var s = Math.floor(_t2 / 20);\n var T = ROTL(a, 5) + f(s, b, c, d) + e + K[s] + W[_t2] >>> 0;\n e = d;\n d = c;\n c = ROTL(b, 30) >>> 0;\n b = a;\n a = T;\n }\n\n H[0] = H[0] + a >>> 0;\n H[1] = H[1] + b >>> 0;\n H[2] = H[2] + c >>> 0;\n H[3] = H[3] + d >>> 0;\n H[4] = H[4] + e >>> 0;\n }\n\n return [H[0] >> 24 & 0xff, H[0] >> 16 & 0xff, H[0] >> 8 & 0xff, H[0] & 0xff, H[1] >> 24 & 0xff, H[1] >> 16 & 0xff, H[1] >> 8 & 0xff, H[1] & 0xff, H[2] >> 24 & 0xff, H[2] >> 16 & 0xff, H[2] >> 8 & 0xff, H[2] & 0xff, H[3] >> 24 & 0xff, H[3] >> 16 & 0xff, H[3] >> 8 & 0xff, H[3] & 0xff, H[4] >> 24 & 0xff, H[4] >> 16 & 0xff, H[4] >> 8 & 0xff, H[4] & 0xff];\n}\n\nexport default sha1;","import validate from './validate.js';\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\n\nvar byteToHex = [];\n\nfor (var i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).substr(1));\n}\n\nfunction stringify(arr) {\n var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n var uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!validate(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n\n return uuid;\n}\n\nexport default stringify;","import rng from './rng.js';\nimport stringify from './stringify.js'; // **`v1()` - Generate time-based UUID**\n//\n// Inspired by https://github.com/LiosK/UUID.js\n// and http://docs.python.org/library/uuid.html\n\nvar _nodeId;\n\nvar _clockseq; // Previous uuid creation time\n\n\nvar _lastMSecs = 0;\nvar _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details\n\nfunction v1(options, buf, offset) {\n var i = buf && offset || 0;\n var b = buf || new Array(16);\n options = options || {};\n var node = options.node || _nodeId;\n var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not\n // specified. We do this lazily to minimize issues related to insufficient\n // system entropy. See #189\n\n if (node == null || clockseq == null) {\n var seedBytes = options.random || (options.rng || rng)();\n\n if (node == null) {\n // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)\n node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]];\n }\n\n if (clockseq == null) {\n // Per 4.2.2, randomize (14 bit) clockseq\n clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;\n }\n } // UUID timestamps are 100 nano-second units since the Gregorian epoch,\n // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so\n // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'\n // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.\n\n\n var msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock\n // cycle to simulate higher resolution clock\n\n var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs)\n\n var dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression\n\n if (dt < 0 && options.clockseq === undefined) {\n clockseq = clockseq + 1 & 0x3fff;\n } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new\n // time interval\n\n\n if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {\n nsecs = 0;\n } // Per 4.2.1.2 Throw error if too many uuids are requested\n\n\n if (nsecs >= 10000) {\n throw new Error(\"uuid.v1(): Can't create more than 10M uuids/sec\");\n }\n\n _lastMSecs = msecs;\n _lastNSecs = nsecs;\n _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch\n\n msecs += 12219292800000; // `time_low`\n\n var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;\n b[i++] = tl >>> 24 & 0xff;\n b[i++] = tl >>> 16 & 0xff;\n b[i++] = tl >>> 8 & 0xff;\n b[i++] = tl & 0xff; // `time_mid`\n\n var tmh = msecs / 0x100000000 * 10000 & 0xfffffff;\n b[i++] = tmh >>> 8 & 0xff;\n b[i++] = tmh & 0xff; // `time_high_and_version`\n\n b[i++] = tmh >>> 24 & 0xf | 0x10; // include version\n\n b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)\n\n b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low`\n\n b[i++] = clockseq & 0xff; // `node`\n\n for (var n = 0; n < 6; ++n) {\n b[i + n] = node[n];\n }\n\n return buf || stringify(b);\n}\n\nexport default v1;","import v35 from './v35.js';\nimport md5 from './md5.js';\nvar v3 = v35('v3', 0x30, md5);\nexport default v3;","import stringify from './stringify.js';\nimport parse from './parse.js';\n\nfunction stringToBytes(str) {\n str = unescape(encodeURIComponent(str)); // UTF8 escape\n\n var bytes = [];\n\n for (var i = 0; i < str.length; ++i) {\n bytes.push(str.charCodeAt(i));\n }\n\n return bytes;\n}\n\nexport var DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8';\nexport var URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8';\nexport default function (name, version, hashfunc) {\n function generateUUID(value, namespace, buf, offset) {\n if (typeof value === 'string') {\n value = stringToBytes(value);\n }\n\n if (typeof namespace === 'string') {\n namespace = parse(namespace);\n }\n\n if (namespace.length !== 16) {\n throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)');\n } // Compute hash of namespace and value, Per 4.3\n // Future: Use spread syntax when supported on all platforms, e.g. `bytes =\n // hashfunc([...namespace, ... value])`\n\n\n var bytes = new Uint8Array(16 + value.length);\n bytes.set(namespace);\n bytes.set(value, namespace.length);\n bytes = hashfunc(bytes);\n bytes[6] = bytes[6] & 0x0f | version;\n bytes[8] = bytes[8] & 0x3f | 0x80;\n\n if (buf) {\n offset = offset || 0;\n\n for (var i = 0; i < 16; ++i) {\n buf[offset + i] = bytes[i];\n }\n\n return buf;\n }\n\n return stringify(bytes);\n } // Function#name is not settable on some platforms (#270)\n\n\n try {\n generateUUID.name = name; // eslint-disable-next-line no-empty\n } catch (err) {} // For CommonJS default export support\n\n\n generateUUID.DNS = DNS;\n generateUUID.URL = URL;\n return generateUUID;\n}","import rng from './rng.js';\nimport stringify from './stringify.js';\n\nfunction v4(options, buf, offset) {\n options = options || {};\n var rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n offset = offset || 0;\n\n for (var i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n\n return buf;\n }\n\n return stringify(rnds);\n}\n\nexport default v4;","import v35 from './v35.js';\nimport sha1 from './sha1.js';\nvar v5 = v35('v5', 0x50, sha1);\nexport default v5;","import REGEX from './regex.js';\n\nfunction validate(uuid) {\n return typeof uuid === 'string' && REGEX.test(uuid);\n}\n\nexport default validate;","import validate from './validate.js';\n\nfunction version(uuid) {\n if (!validate(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n return parseInt(uuid.substr(14, 1), 16);\n}\n\nexport default version;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = (module) => {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","import { connect } from \"@openfin/core-web\";\nimport { getDefaultLayout, getSettings } from \"./platform/settings\";\nimport type { Settings } from \"./shapes/setting-shapes\";\n\n/**\n * Sets up panels if supported.\n * @param settings The settings to use.\n */\nfunction setupPanels(settings: Settings): void {\n\tif (settings?.platform?.layout?.panels?.left) {\n\t\tconst leftPanel = settings.platform.layout.panels.left;\n\t\tconst leftPanelFrame = document.querySelector(`#${leftPanel.frameId}`);\n\t\tif (leftPanelFrame === null) {\n\t\t\tconsole.error(\n\t\t\t\t`Please ensure the document has an element with the following id #${leftPanel.frameContainerId} so that the web-layout can be applied.`\n\t\t\t);\n\t\t\treturn;\n\t\t}\n\t\tleftPanelFrame.src = leftPanel.url;\n\t\tconsole.log(`Panel ${leftPanel.frameId} has been setup with the url ${leftPanel.url}`);\n\t} else {\n\t\tconsole.log(\"No panels require setup.\");\n\t}\n}\n\n/**\n * Initializes the OpenFin Web Broker connection.\n */\nasync function init(): Promise {\n\t// Get the required settings\n\tconst settings = await getSettings();\n\t// Get the default layout\n\tconst layoutSnapshot = await getDefaultLayout();\n\n\tif (settings === undefined || layoutSnapshot === undefined) {\n\t\tconsole.error(\n\t\t\t\"Unable to run the sample as we have been unable to load the web manifest and it's settings from the currently running html page. Please ensure that the web manifest is being served and that it contains the custom_settings section.\"\n\t\t);\n\t\treturn;\n\t}\n\t// Get the dom element that should host the layout\n\tconst layoutContainer = document.querySelector(\n\t\t`#${settings.platform.layout.layoutContainerId}`\n\t);\n\tif (layoutContainer === null) {\n\t\tconsole.error(\n\t\t\t`Please ensure the document has an element with the following id #${settings.platform.layout.layoutContainerId} so that the web-layout can be applied.`\n\t\t);\n\t\treturn;\n\t}\n\t// Connect to the OpenFin Web Broker and pass the default layout.\n\t// It is good practice to specify providerId even if content is explicitly specifying it for cases where\n\t// this provider uses our layout system and content uses inheritance. currentContextGroup\n\t// is useful for defaulting any client that uses inheritance through our layout system.\n\tconst fin = await connect({\n\t\toptions: {\n\t\t\tbrokerUrl: settings.platform.interop.brokerUrl,\n\t\t\tinteropConfig: {\n\t\t\t\tproviderId: settings.platform.interop.providerId,\n\t\t\t\tcurrentContextGroup: settings.platform.interop.defaultContextGroup\n\t\t\t}\n\t\t},\n\t\tconnectionInheritance: \"enabled\",\n\t\tplatform: { layoutSnapshot }\n\t});\n\n\t// You may now use the `fin` object to initialize the broker and the layout.\n\tawait fin.Interop.init(settings.platform.interop.providerId);\n\n\t// initialize the layout and pass it the dom element to bind to\n\tawait fin.Platform.Layout.init({\n\t\tcontainer: layoutContainer\n\t});\n\t// setup panels not that everything has been initialized\n\tsetupPanels(settings);\n}\n\ninit()\n\t.then(() => {\n\t\tconsole.log(\"Connected to the OpenFin Web Broker.\");\n\t\treturn true;\n\t})\n\t.catch((err) => console.error(err));\n"],"names":[],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"provider.bundle.js","mappings":";;;;;;;;;;AAAa,MAAM,mBAAO,CAAC,qFAAoB,EAAE,mBAAO,CAAC,mDAAS,EAAE,mBAAO,CAAC,+DAAM,EAAE,mBAAO,CAAC,mDAAQ,EAAE,mBAAO,CAAC,gEAAkB,EAAE,mBAAO,CAAC,4DAAgB,EAAE,eAAe;;;;;;;;;;;;ACA9J,MAAM,mBAAO,CAAC,mDAAS,IAAI,mBAAO,CAAC,mDAAQ,IAAI,mBAAO,CAAC,gEAAkB,IAAI,mBAAO,CAAC,4DAAgB,IAAI,mBAAO,CAAC,+DAAM,EAAE,kBAAkB,EAAE,GAAG,wBAAwB,GAAG,sGAAsG,qBAAM,CAAC,qBAAM,iCAAiC,KAAK,KAAK,KAAK,MAAM,oBAAoB,WAAW,kBAAkB,kBAAkB,UAAU,SAAS,sCAAsC,SAAS,sFAAsF,mCAAmC,6BAA6B,GAAG,kCAAkC,6BAA6B,mDAAmD,0CAA0C,yDAAyD,iEAAiE,oFAAoF,2IAA2I,mDAAmD,kDAAkD,oFAAoF,4IAA4I,sDAAsD,sCAAsC,SAAS,sCAAsC,UAAU,QAAQ,eAAe,mNAAmN,UAAU,0BAA0B,SAAS,qBAAqB,SAAS,8BAA8B,sBAAsB,yiBAAyiB,QAAQ,SAAS,2EAA2E,6BAA6B,KAAK,IAAI,2DAA2D,SAAS,uDAAuD,0CAA0C,IAAI,sBAAsB,SAAS,4EAA4E,+EAA+E,iCAAiC,yBAAyB,sGAAsG,gBAAgB,iDA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;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,2CAA2C,UAAU;AACrD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;ACrJA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEY;;AAEZ,eAAe,mBAAO,CAAC,wDAAW;AAClC,gBAAgB,mBAAO,CAAC,oDAAS;AACjC;AACA;AACA;AACA;;AAEA,cAAc;AACd,kBAAkB;AAClB,yBAAyB;;AAEzB;AACA,kBAAkB;;AAElB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,kBAAkB,YAAY;AAC9B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA,wCAAwC,SAAS;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;;AAEA;AACA;AACA,cAAc,iBAAiB;AAC/B;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,iDAAiD,EAAE;AACnD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C;AAC1C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA,yBAAyB,eAAe;AACxC;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,yBAAyB,QAAQ;AACjC;AACA,sBAAsB,eAAe;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc,YAAY;AAC1B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB,sBAAsB;AACxC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,mBAAmB;AACnB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA,oBAAoB,SAAS;AAC7B;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA,qBAAqB,WAAW,GAAG,IAAI;AACvC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA,gBAAgB,WAAW,GAAG,IAAI,KAAK,aAAa;AACpD;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;;AAEA;AACA,GAAG;AACH;AACA;AACA,mBAAmB,KAAK,mDAAmD,cAAc;AACzF,GAAG;AACH;AACA;AACA,+BAA+B,IAAI;AACnC;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,MAAM,aAAa,SAAS;AACtD;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,SAAS,gBAAgB;AACzB,cAAc,oBAAoB,EAAE,IAAI;AACxC;AACA,YAAY,gBAAgB,EAAE,IAAI;AAClC;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,GAAG,SAAS,GAAG,KAAK,qBAAqB,EAAE,EAAE;AACpE,QAAQ;AACR,yBAAyB,GAAG,KAAK,yBAAyB,EAAE,EAAE;AAC9D,mBAAmB,yBAAyB,EAAE,EAAE;AAChD;AACA,MAAM;AACN,oBAAoB,IAAI,EAAE,GAAG,SAAS,IAAI,EAAE,EAAE;AAC9C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,0CAA0C,cAAc,SAAS,OAAO;AACxE;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,kBAAkB,YAAY;AAC9B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,kBAAkB,gBAAgB;AAClC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,kBAAkB,gBAAgB;AAClC;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,cAAc,YAAY;AAC1B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,QAAQ;AAC1B;AACA,oBAAoB,QAAQ;AAC5B;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;;;;;ACzjEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEa;;AAEb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB;;AAEnB;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,sBAAsB;AACxC;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA,eAAe;AACf;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA,oBAAoB,SAAS;AAC7B;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;;AAEA,kCAAkC,QAAQ;AAC1C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oBAAoB,iBAAiB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,QAAQ;AACR;AACA,uCAAuC,QAAQ;AAC/C;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,OAAO;AACzB;AACA;AACA;;AAEA;AACA,SAAS,yBAAyB;AAClC;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,gBAAgB;AAClC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,8DAA8D,YAAY;AAC1E;AACA,8DAA8D,YAAY;AAC1E;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,qCAAqC,YAAY;AACjD;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;AACA;;;;;;;;;;;AChfA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,SAAS,WAAW;;AAEpB;AACA;AACA;AACA,SAAS,WAAW;;AAEpB;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA,SAAS,WAAW;;AAEpB;AACA;AACA,SAAS,UAAU;;AAEnB;AACA;;;;;;;;;;;ACpFA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,WAAW,mBAAO,CAAC,mDAAS;;AAE5B;AACA;;AAEA;;;;;;;;;;;ACNA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,cAAc,mBAAO,CAAC,yDAAY;AAClC,cAAc,mBAAO,CAAC,yDAAY;AAClC,cAAc,mBAAO,CAAC,yDAAY;;AAElC;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC/BA,qBAAqB,mBAAO,CAAC,uEAAmB;AAChD,sBAAsB,mBAAO,CAAC,yEAAoB;AAClD,mBAAmB,mBAAO,CAAC,mEAAiB;AAC5C,mBAA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A;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;AACA,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;;;;;;;;;;ACrKA,eAAe,mBAAO,CAAC,yDAAY;;AAEnC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;;;;;;;;;;AC7BA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,cAAc,mBAAO,CAAC,uDAAW;;AAEjC;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACnBA,aAAa,mBAAO,CAAC,uDAAW;AAChC,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,qBAAqB,mBAAO,CAAC,uEAAmB;;AAEhD;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC3BA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;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B,mBAAO,CAAC,6DAAc;AACvC,eAAe,mBAAO,CAAC,2DAAa;AACpC,eAAe,mBAAO,CAAC,yDAAY;AACnC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;AACA;AACA;AACA,oCAAoC;;AAEpC;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC9CA,aAAa,mBAAO,CAAC,uDAAW;AAChC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,eAAe,mBAAO,CAAC,yDAAY;AACnC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC3DA,kBAAkB,mBAAO,CAAC,iEAAgB;AAC1C,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC7BA,eAAe,mBAAO,CAAC,yDAAY;AACnC,kBAAkB,mBAAO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WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC/GA,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACzFA;AACA,wBAAwB,qBAAM,gBAAgB,qBAAM,IAAI,qBAAM,sBAAsB,qBAAM;;AAE1F;;;;;;;;;;;ACHA,qBAAqB,mBAAO,CAAC,uEAAmB;AAChD,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,WAAW,mBAAO,CAAC,iDAAQ;;AAE3B;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACfA,qBAAqB,mBAAO,C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AAC,+DAAe;AACxC,gBAAgB,mBAAO,CAAC,2DAAa;;AAErC;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACxBA,eAAe,mBAAO,CAAC,2DAAa;AACpC,UAAU,mBAAO,CAAC,iDAAQ;AAC1B,cAAc,mBAAO,CAAC,yDAAY;AAClC,UAAU,mBAAO,CAAC,iDAAQ;AAC1B,cAAc,mBAAO,CAAC,yDAAY;AAClC,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACzDA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa,GAAG;AAChB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACZA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACdA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AChBA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,GAAG;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA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ACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACxBA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACdA,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACnBA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACZA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClCA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,GAAG;AAChB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;AClBA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB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AEtC;AACA;;AAEA;;;;;;;;;;;ACLA,cAAc,mBAAO,CAAC,yDAAY;;AAElC;AACA;;AAEA;;;;;;;;;;;ACLA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACnBA,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA,kBAAkB,KAA0B;;AAE5C;AACA,gCAAgC,QAAa;;AAE7C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ,CAAC;;AAED;;;;;;;;;;;AC7BA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACrBA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,aAAa,UAAU;AACvB;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACdA,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;ACRA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACbA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;;;;;;;;;;ACjBA,gBAAgB,mBAAO,CAAC,6DAAc;;AAEtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACdA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,GAAG;AAChB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACbA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACbA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,UAAU,mBAAO,CAAC,iDAAQ;AAC1B,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjCA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;;;;;;;;;;;ACzBA,gBAAgB,mBAAO,CAAC,6DAAc;;AAEtC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,GAAG;AAChB;AACA;AACA;AACA,oBAAoB,QAAQ,IAAI,QAAQ;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,kBAAkB;AAClB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpCA,sBAAsB,mBAAO,CAAC,yEAAoB;AAClD,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA,8BAA8B,mBAAmB;AACjD;AACA;AACA;AACA;AACA;AACA,+CAA+C,mBAAmB;AAClE;AACA;AACA;;AAEA;;;;;;;;;;;ACnCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACzBA,iBAAiB,mBAAO,CAAC,6DAAc;AACvC,eAAe,mBAAO,CAAC,yDAAY;;AAEnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AChCA,WAAW,mBAAO,CAAC,mDAAS;AAC5B,gBAAgB,mBAAO,CAAC,2DAAa;;AAErC;AACA,kBAAkB,KAA0B;;AAE5C;AACA,gCAAgC,QAAa;;AAE7C;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACrCA,kBAAkB,mBAAO,CAAC,iEAAgB;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,kBAAkB;AAClB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClCA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,eAAe,mBAAO,CAAC,yDAAY;;AAEnC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpCA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClCA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC1BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC9BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC5BA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC1BA,uBAAuB,mBAAO,CAAC,2EAAqB;AACpD,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC1BA,oBAAoB,mBAAO,CAAC,qEAAkB;AAC9C,eAAe,mBAAO,CAAC,2DAAa;AACpC,kBAAkB,mBAAO,CAAC,+DAAe;;AAEzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpCA,oBAAoB,mBAAO,CAAC,qEAAkB;AAC9C,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,kBAAkB,mBAAO,CAAC,+DAAe;;AAEzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC/BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACtBA;AACA;AAC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Y,GAAG,CAAC,MAAM,gBAAgB,CAAC,IAAI,EAAE,CAAkC,CAAC;QACtF,OAAO,YAAY,CAAC,eAAe,CAAC;IACrC,CAAC;AACF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACjDuC;AACA;AACA;AACA;AACE;AACQ;AACE;AACE;;;;;;;;;;;;;;;;ACPtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD;;AAEnD;;AAEA,oBAAoB,gBAAgB;AACpC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA,kBAAkB,cAAc;AAChC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,kBAAkB,cAAc;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,kBAAkB,aAAa;AAC/B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;A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,CAAC,OAAO,CAAC,mBAAmB;aAClE;SACD;QACD,qBAAqB,EAAE,SAAS;QAChC,QAAQ,EAAE,EAAE,cAAc,EAAE;KAC5B,CAAC,CAAC;IAEH,4EAA4E;IAC5E,MAAM,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;IAE7D,+DAA+D;IAC/D,MAAM,GAAG,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC;QAC9B,SAAS,EAAE,eAAe;KAC1B,CAAC,CAAC;IACH,wDAAwD;IACxD,WAAW,CAAC,QAAQ,CAAC,CAAC;AACvB,CAAC;AAED,IAAI,EAAE;KACJ,IAAI,CAAC,GAAG,EAAE;IACV,OAAO,CAAC,GAAG,CAAC,sCAAsC,CAAC,CAAC;IACpD,OAAO,IAAI,CAAC;AACb,CAAC,CAAC;KACD,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC","sources":["webpack://openfin-web--web-interop/../../node_modules/@openfin/core-web/out/api-client.js","webpack://openfin-web--web-interop/../../node_modules/@openfin/core-web/out/main-8cad4070.js","webpack://openfin-web--web-interop/../../node_modules/@openfin/core-web/out/main-b14f67c9.js","webpack://openfin-web--web-interop/../../node_modules/base64-js/index.js","webpack://openfin-web--web-interop/../../node_modules/buffer/index.js","webpack://openfin-web--web-interop/../../node_modules/events/events.js","webpack://openfin-web--web-interop/../../node_modules/ieee754/index.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_DataView.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_Hash.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_ListCache.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_Map.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_MapCache.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_Promise.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_Set.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_SetCache.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_Stack.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_Symbol.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_Uint8Array.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_WeakMap.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_arrayEach.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_arrayFilter.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_arrayLikeKeys.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_arrayPush.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_arraySome.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_assignValue.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_assocIndexOf.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseAssign.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseAssignIn.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseAssignValue.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseClone.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseCreate.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseGetAllKeys.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseGetTag.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseIsArguments.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseIsEqual.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseIsEqualDeep.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseIsMap.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseIsNative.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseIsSet.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseIsTypedArray.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseKeys.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseKeysIn.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseTimes.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_baseUnary.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_cacheHas.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_cloneArrayBuffer.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_cloneBuffer.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_cloneDataView.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_cloneRegExp.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_cloneSymbol.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_cloneTypedArray.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_copyArray.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_copyObject.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_copySymbols.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_copySymbolsIn.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_coreJsData.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_defineProperty.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_equalArrays.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_equalByTag.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_equalObjects.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_freeGlobal.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_getAllKeys.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_getAllKeysIn.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_getMapData.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_getNative.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_getPrototype.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_getRawTag.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_getSymbols.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_getSymbolsIn.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_getTag.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_getValue.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_hashClear.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_hashDelete.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_hashGet.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_hashHas.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_hashSet.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_initCloneArray.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_initCloneByTag.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_initCloneObject.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_isIndex.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_isKeyable.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_isMasked.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_isPrototype.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_listCacheClear.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_listCacheDelete.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_listCacheGet.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_listCacheHas.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_listCacheSet.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_mapCacheClear.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_mapCacheDelete.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_mapCacheGet.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_mapCacheHas.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_mapCacheSet.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_mapToArray.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_nativeCreate.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_nativeKeys.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_nativeKeysIn.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_nodeUtil.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_objectToString.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_overArg.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_root.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_setCacheAdd.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_setCacheHas.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_setToArray.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_stackClear.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_stackDelete.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_stackGet.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_stackHas.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_stackSet.js","webpack://openfin-web--web-interop/../../node_modules/lodash/_toSource.js","webpack://openfin-web--web-interop/../../node_modules/lodash/cloneDeep.js","webpack://openfin-web--web-interop/../../node_modules/lodash/eq.js","webpack://openfin-web--web-interop/../../node_modules/lodash/isArguments.js","webpack://openfin-web--web-interop/../../node_modules/lodash/isArray.js","webpack://openfin-web--web-interop/../../node_modules/lodash/isArrayLike.js","webpack://openfin-web--web-interop/../../node_modules/lodash/isBuffer.js","webpack://openfin-web--web-interop/../../node_modules/lodash/isEqual.js","webpack://openfin-web--web-interop/../../node_modules/lodash/isFunction.js","webpack://openfin-web--web-interop/../../node_modules/lodash/isLength.js","webpack://openfin-web--web-interop/../../node_modules/lodash/isMap.js","webpack://openfin-web--web-interop/../../node_modules/lodash/isObject.js","webpack://openfin-web--web-interop/../../node_modules/lodash/isObjectLike.js","webpack://openfin-web--web-interop/../../node_modules/lodash/isSet.js","webpack://openfin-web--web-interop/../../node_modules/lodash/isTypedArray.js","webpack://openfin-web--web-interop/../../node_modules/lodash/keys.js","webpack://openfin-web--web-interop/../../node_modules/lodash/keysIn.js","webpack://openfin-web--web-interop/../../node_modules/lodash/stubArray.js","webpack://openfin-web--web-interop/../../node_modules/lodash/stubFalse.js","webpack://openfin-web--web-interop/./client/src/platform/settings.ts","webpack://openfin-web--web-interop/../../node_modules/uuid/dist/esm-browser/index.js","webpack://openfin-web--web-interop/../../node_modules/uuid/dist/esm-browser/md5.js","webpack://openfin-web--web-interop/../../node_modules/uuid/dist/esm-browser/nil.js","webpack://openfin-web--web-interop/../../node_modules/uuid/dist/esm-browser/parse.js","webpack://openfin-web--web-interop/../../node_modules/uuid/dist/esm-browser/regex.js","webpack://openfin-web--web-interop/../../node_modules/uuid/dist/esm-browser/rng.js","webpack://openfin-web--web-interop/../../node_modules/uuid/dist/esm-browser/sha1.js","webpack://openfin-web--web-interop/../../node_modules/uuid/dist/esm-browser/stringify.js","webpack://openfin-web--web-interop/../../node_modules/uuid/dist/esm-browser/v1.js","webpack://openfin-web--web-interop/../../node_modules/uuid/dist/esm-browser/v3.js","webpack://openfin-web--web-interop/../../node_modules/uuid/dist/esm-browser/v35.js","webpack://openfin-web--web-interop/../../node_modules/uuid/dist/esm-browser/v4.js","webpack://openfin-web--web-interop/../../node_modules/uuid/dist/esm-browser/v5.js","webpack://openfin-web--web-interop/../../node_modules/uuid/dist/esm-browser/validate.js","webpack://openfin-web--web-interop/../../node_modules/uuid/dist/esm-browser/version.js","webpack://openfin-web--web-interop/webpack/bootstrap","webpack://openfin-web--web-interop/webpack/runtime/define property getters","webpack://openfin-web--web-interop/webpack/runtime/global","webpack://openfin-web--web-interop/webpack/runtime/hasOwnProperty shorthand","webpack://openfin-web--web-interop/webpack/runtime/make namespace object","webpack://openfin-web--web-interop/webpack/runtime/node module decorator","webpack://openfin-web--web-interop/./client/src/provider.ts"],"sourcesContent":["\"use strict\";var e=require(\"./main-8cad4070.js\");require(\"buffer/\"),require(\"uuid\"),require(\"events\"),require(\"lodash/cloneDeep\"),require(\"lodash/isEqual\"),exports.connect=e.connect;\n","\"use strict\";var e=require(\"buffer/\"),t=require(\"events\"),n=require(\"lodash/cloneDeep\"),i=require(\"lodash/isEqual\"),r=require(\"uuid\");const o=(e,t)=>`${t}<${btoa(JSON.stringify(e))}>`;var s=\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof window?window:\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:{},a={},c={},d={},h={};async function l(e){const t=[];for(const n of e){const e=await n();t.push(e)}return t}Object.defineProperty(h,\"__esModule\",{value:!0}),h.promiseMapSerial=h.serial=h.promiseMap=h.promisify=void 0,h.promisify=function(e){return(...t)=>new Promise(((n,i)=>{e(...t,((e,t)=>e?i(e):n(t)))}))},h.promiseMap=async function(e,t){return Promise.all(e.map(t))},h.serial=l,h.promiseMapSerial=async function(e,t){return l(e.map(((e,n,i)=>()=>t(e,n,i))))};var u,p=s&&s.__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},w=s&&s.__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)};Object.defineProperty(d,\"__esModule\",{value:!0}),d.Reply=d.EmitterBase=d.Base=void 0;const y=h;class f{constructor(e){this.isNodeEnvironment=()=>\"node\"===this.wire.environment.type,this.isOpenFinEnvironment=()=>\"openfin\"===this.wire.environment.type,this.isBrowserEnvironment=()=>\"other\"===this.wire.environment.type,this.wire=e}get fin(){return this.wire.getFin()}get me(){return this.wire.me}}d.Base=f;d.EmitterBase=class extends f{constructor(e,t,...n){super(e),this.topic=t,u.set(this,void 0),this.eventNames=()=>this.hasEmitter()?this.getOrCreateEmitter().eventNames():[],this.emit=(e,t,...n)=>!!this.hasEmitter()&&this.getOrCreateEmitter().emit(e,t,...n),this.hasEmitter=()=>this.wire.eventAggregator.has(w(this,u,\"f\")),this.getOrCreateEmitter=()=>this.wire.eventAggregator.getOrCreate(w(this,u,\"f\")),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[],this.listenerCount=e=>this.hasEmitter()?this.getOrCreateEmitter().listenerCount(e):0,this.registerEventListener=async(e,t={},n,i)=>{const r={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e},o=this.getOrCreateEmitter();n(o);try{await this.wire.sendAction(\"subscribe-to-desktop-event\",r)}catch(e){throw i(o),this.deleteEmitterIfNothingRegistered(o),e}},this.deregisterEventListener=async(e,t={})=>{if(this.hasEmitter()){const n={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e};await this.wire.sendAction(\"unsubscribe-to-desktop-event\",n).catch((()=>null));return this.getOrCreateEmitter()}return Promise.resolve()},p(this,u,[t,...n],\"f\"),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[]}async on(e,t,n){return await this.registerEventListener(e,n,(n=>{n.on(e,t)}),(n=>{n.removeListener(e,t)})),this}async addListener(e,t,n){return this.on(e,t,n)}async once(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.once(e,i),n.once(e,t)}),(n=>{n.removeListener(e,i),n.removeListener(e,t)})),this}async prependListener(e,t,n){return await this.registerEventListener(e,n,(n=>{n.prependListener(e,t)}),(n=>{n.removeListener(e,t)})),this}async prependOnceListener(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.prependOnceListener(e,t),n.once(e,i)}),(n=>{n.removeListener(e,t),n.removeListener(e,i)})),this}async removeListener(e,t,n){const i=await this.deregisterEventListener(e,n);return i&&(i.removeListener(e,t),this.deleteEmitterIfNothingRegistered(i)),this}async deregisterAllListeners(e){const t={...this.identity,type:e,topic:this.topic};if(this.hasEmitter()){const e=this.getOrCreateEmitter(),n=e.listenerCount(t.type),i=[];for(let e=0;enull)));return await Promise.all(i),e}}async removeAllListeners(e){const t=async e=>{const t=await this.deregisterAllListeners(e);t&&(t.removeAllListeners(e),this.deleteEmitterIfNothingRegistered(t))};if(e)await t(e);else if(this.hasEmitter()){const e=this.getOrCreateEmitter().eventNames();await(0,y.promiseMap)(e,t)}return this}deleteEmitterIfNothingRegistered(e){0===e.eventNames().length&&this.wire.eventAggregator.delete(w(this,u,\"f\"))}},u=new WeakMap;d.Reply=class{};var g={};Object.defineProperty(g,\"__esModule\",{value:!0});var m=g.RuntimeError=g.NotSupportedError=g.NotImplementedError=g.NoAckError=g.DuplicateCorrelationError=g.UnexpectedActionError=g.DisconnectedError=void 0;class v extends Error{constructor(e){super(`Expected websocket state OPEN but found ${e}`),this.readyState=e}}g.DisconnectedError=v;class C extends Error{}g.UnexpectedActionError=C;class b extends Error{}g.DuplicateCorrelationError=b;class I extends Error{}g.NoAckError=I;class E extends Error{}g.NotImplementedError=E;class x extends Error{}g.NotSupportedError=x;class A extends Error{constructor(e){const{message:t,name:n,stack:i,...r}=e;super(t),this.name=n||\"Error\",this.stack=i??this.toString(),Object.keys(r).forEach((e=>{this[e]=r[e]}))}}class P extends Error{static getCallSite(e=0){const t=Error.stackTraceLimit,n=e+1;Error.stackTraceLimit=t+n;const i=Error.prepareStackTrace;Error.prepareStackTrace=(e,t)=>t;const r=(new Error).stack?.slice(n)??[];return Error.prepareStackTrace=i,Error.stackTraceLimit=t,r}static prepareStackTrace(e,t){if(\"function\"==typeof Error.prepareStackTrace)return Error.prepareStackTrace(e,t);let n=\"\";n+=e.name||\"Error\",n+=`: ${e.message||\"\"}`;for(const e of t)n+=`\\n at ${e.toString()}`;return n}constructor(e,t){const{reason:n,error:i}=e;super(n),this.name=\"RuntimeError\",i?.stack&&(this.cause=new A(i)),t&&(this.stack=P.prepareStackTrace(this,t))}}m=g.RuntimeError=P;var M={},_={},O={};Object.defineProperty(O,\"__esModule\",{value:!0}),O.validateIdentity=void 0,O.validateIdentity=function(e){let t;return\"object\"==typeof e&&\"string\"==typeof e.uuid||(t=\"Not a valid identity object\"),t};var S={},R={},F={},j={},k={},L={},T={};Object.defineProperty(T,\"__esModule\",{value:!0}),T.handleDeprecatedWarnings=void 0;var $;T.handleDeprecatedWarnings=e=>{(e.contentNavigation?.whitelist||e.contentNavigation?.blacklist||e.contentRedirect?.whitelist||e.contentRedirect?.blacklist)&&console.warn(\"The properties 'whitelist' and 'blacklist' have been marked as deprecated and will be removed in a future version. Please use 'allowlist' and 'denylist'.\")};var B={},G={};Object.defineProperty(G,\"__esModule\",{value:!0}),G.AsyncRetryableLazy=W=G.Lazy=void 0;var W=G.Lazy=class{constructor(e){this.producerFn=e}getValue(){return this.value||(this.value=this.producerFn()),this.value}};G.AsyncRetryableLazy=class{constructor(e){this.producerFn=e}async getValue(){return this.promise||(this.promise=this.producerFn().catch((e=>{throw delete this.promise,e}))),this.promise}};var H={};Object.defineProperty(H,\"__esModule\",{value:!0}),H.WebContents=void 0;const N=d;class D extends N.EmitterBase{constructor(e,t,n){super(e,n,t.uuid,t.name),this.identity=t,this.entityType=n}capturePage(e){return this.wire.sendAction(\"capture-page\",{options:e,...this.identity}).then((({payload:e})=>e.data))}executeJavaScript(e){return this.wire.sendAction(\"execute-javascript-in-window\",{...this.identity,code:e}).then((({payload:e})=>e.data))}getZoomLevel(){return this.wire.sendAction(\"get-zoom-level\",this.identity).then((({payload:e})=>e.data))}setZoomLevel(e){return this.wire.sendAction(\"set-zoom-level\",{...this.identity,level:e}).then((()=>{}))}navigate(e){return this.wire.sendAction(\"navigate-window\",{...this.identity,url:e}).then((()=>{}))}navigateBack(){return this.wire.sendAction(\"navigate-window-back\",{...this.identity}).then((()=>{}))}async navigateForward(){await this.wire.sendAction(\"navigate-window-forward\",{...this.identity})}stopNavigation(){return this.wire.sendAction(\"stop-window-navigation\",{...this.identity}).then((()=>{}))}reload(e=!1){return this.wire.sendAction(\"reload-window\",{ignoreCache:e,...this.identity}).then((()=>{}))}print(e={}){return this.wire.sendAction(\"print\",{...this.identity,options:e}).then((()=>{}))}findInPage(e,t){return this.wire.sendAction(\"find-in-page\",{...this.identity,searchTerm:e,options:t}).then((({payload:e})=>e.data))}stopFindInPage(e){return this.wire.sendAction(\"stop-find-in-page\",{...this.identity,action:e}).then((()=>{}))}getPrinters(){return this.wire.sendAction(\"get-printers\",{...this.identity}).then((({payload:e})=>e.data))}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){await this.wire.sendAction(\"focus-window\",{emitSynthFocused:e,...this.identity})}async showDeveloperTools(){await this.wire.sendAction(\"show-developer-tools\",this.identity)}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction(\"get-process-info\",this.identity);return e}async getSharedWorkers(){return this.wire.sendAction(\"get-shared-workers\",this.identity).then((({payload:e})=>e.data))}async inspectSharedWorker(){await this.wire.sendAction(\"inspect-shared-worker\",{...this.identity})}async inspectSharedWorkerById(e){await this.wire.sendAction(\"inspect-shared-worker-by-id\",{...this.identity,workerId:e})}async inspectServiceWorker(){await this.wire.sendAction(\"inspect-service-worker\",{...this.identity})}async showPopupWindow(e){if(this.wire.sendAction(`${this.entityType}-show-popup-window`,this.identity).catch((()=>{})),e?.onPopupReady){const t=async({popupName:t})=>{try{const n=this.fin.Window.wrapSync({uuid:this.fin.me.uuid,name:t});await e.onPopupReady(n)}catch(e){throw new Error(`Something went wrong during onPopupReady execution: ${e}`)}};await this.once(\"popup-ready\",t)}const{payload:t}=await this.wire.sendAction(\"try-create-popup-window\",{options:{...e,hasResultCallback:!!e?.onPopupResult,hasReadyCallback:!!e?.onPopupReady},...this.identity}),{data:{willOpen:n,options:i}}=t;n&&await this.fin.Window.create(i.initialOptions);if(e?.onPopupResult){const t=async t=>{await e.onPopupResult((e=>{const{name:t,uuid:n,result:i,data:r}=e,o={identity:{name:t,uuid:n},result:i};return r&&(o.data=r),o})(t))},n=async()=>{await this.removeListener(\"popup-result\",t)};await this.on(\"popup-result\",t),await this.once(\"popup-teardown\",n)}const{payload:r}=await this.wire.sendAction(\"show-popup-window\",{options:i,...this.identity});return r.data}}var U,V,z,K,q;function J(){return V||(V=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(function(){if($)return L;$=1,Object.defineProperty(L,\"__esModule\",{value:!0}),L.ViewModule=void 0;const e=d,t=O,n=J(),i=T;class r extends e.Base{async create(e){const{uuid:t}=this.wire.me;if(!e.name||\"string\"!=typeof e.name)throw new Error(\"Please provide a name property as a string in order to create a View.\");return(0,i.handleDeprecatedWarnings)(e),this.wire.environment.childViews?await this.wire.environment.createChildContent({entityType:\"view\",options:{...e,uuid:t}}):await this.wire.sendAction(\"create-view\",{...e,uuid:t}),this.wrapSync({uuid:t,name:e.name})}async wrap(e){this.wire.sendAction(\"view-wrap\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}wrapSync(e){this.wire.sendAction(\"view-wrap-sync\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}getCurrent(){if(this.wire.sendAction(\"view-get-current\").catch((e=>{})),!this.wire.me.isView)throw new Error(\"You are not in a View context\");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction(\"view-get-current-sync\").catch((e=>{})),!this.wire.me.isView)throw new Error(\"You are not in a View context\");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return L.ViewModule=r,L}(),e),n(function(){if(U)return B;var e;U=1,Object.defineProperty(B,\"__esModule\",{value:!0}),B.View=void 0;const t=g,n=G,i=H,r=ie();class o extends i.WebContents{constructor(i,o){super(i,o,\"view\"),this.identity=o,e.set(this,new n.Lazy((()=>this.fin.Platform.wrapSync(this.identity).getClient()))),this.attach=async e=>{await this.wire.sendAction(\"attach-view\",{target:e,...this.identity})},this.destroy=async()=>{await this.wire.sendAction(\"destroy-view\",{...this.identity})},this.show=async()=>{await this.wire.sendAction(\"show-view\",{...this.identity})},this.showAt=async(e,t={})=>{await this.wire.sendAction(\"show-view-at\",{bounds:e,...this.identity,options:t})},this.bringToFront=async()=>{await this.wire.sendAction(\"bring-view-to-front\",{...this.identity})},this.hide=async()=>{await this.wire.sendAction(\"hide-view\",{...this.identity})},this.setBounds=async e=>{await this.wire.sendAction(\"set-view-bounds\",{bounds:e,...this.identity})},this.getBounds=async()=>(await this.wire.sendAction(\"get-view-bounds\",{...this.identity})).payload.data,this.getInfo=async()=>(await this.wire.sendAction(\"get-view-info\",{...this.identity})).payload.data,this.getParentLayout=async()=>(this.wire.sendAction(\"view-get-parent-layout\",{...this.identity}).catch((()=>{})),this.fin.Platform.Layout.getLayoutByViewIdentity(this.identity)),this.getOptions=async()=>this.wire.sendAction(\"get-view-options\",{...this.identity}).then((({payload:e})=>e.data)),this.updateOptions=async e=>this.wire.sendAction(\"update-view-options\",{options:e,...this.identity}).then((()=>{})),this.getCurrentWindow=async()=>{const{payload:{data:e}}=await this.wire.sendAction(\"get-view-window\",{...this.identity});return new r._Window(this.wire,e)},this.getCurrentStack=async()=>{this.wire.sendAction(\"view-get-current-stack\").catch((()=>{}));try{return(await this.getParentLayout()).getStackByViewIdentity(this.identity)}catch(e){throw new t.RuntimeError({reason:\"This view does not belong to a stack.\",error:e})}},this.triggerBeforeUnload=async()=>(await this.wire.sendAction(\"trigger-before-unload\",{...this.identity})).payload.data,this.bindToElement=async e=>{if(!e)throw new Error(\"Element not found.\");return this.wire.environment.observeBounds(e,(async e=>this.setBounds(e)))}}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){const t=await this.getCurrentWindow();await t.focusedWebViewWasChanged(),await super.focus({emitSynthFocused:e})}}return B.View=o,e=new WeakMap,B}(),e)}(k)),k}function Y(){if(z)return j;z=1,Object.defineProperty(j,\"__esModule\",{value:!0}),j.Application=void 0;const e=d,t=ie(),n=J();class i extends e.EmitterBase{constructor(e,n){super(e,\"application\",n.uuid),this.identity=n,this.window=new t._Window(this.wire,{uuid:this.identity.uuid,name:this.identity.uuid})}windowListFromIdentityList(e){const n=[];return e.forEach((e=>{n.push(new t._Window(this.wire,{uuid:e.uuid,name:e.name}))})),n}isRunning(){return this.wire.sendAction(\"is-application-running\",this.identity).then((({payload:e})=>e.data))}async quit(e=!1){try{await this._close(e),await this.wire.sendAction(\"destroy-application\",{force:e,...this.identity})}catch(e){if(![\"Remote connection has closed\",\"Could not locate the requested application\"].some((t=>e.message.includes(t))))throw e}}async _close(e=!1){try{await this.wire.sendAction(\"close-application\",{force:e,...this.identity})}catch(e){if(!e.message.includes(\"Remote connection has closed\"))throw e}}close(e=!1){return console.warn(\"Deprecation Warning: Application.close is deprecated Please use Application.quit\"),this.wire.sendAction(\"application-close\",this.identity).catch((e=>{})),this._close(e)}getChildWindows(){return this.wire.sendAction(\"get-child-windows\",this.identity).then((({payload:e})=>{const t=[];return e.data.forEach((e=>{t.push({uuid:this.identity.uuid,name:e})})),this.windowListFromIdentityList(t)}))}getManifest(){return this.wire.sendAction(\"get-application-manifest\",this.identity).then((({payload:e})=>e.data))}getParentUuid(){return this.wire.sendAction(\"get-parent-application\",this.identity).then((({payload:e})=>e.data))}getShortcuts(){return this.wire.sendAction(\"get-shortcuts\",this.identity).then((({payload:e})=>e.data))}async getViews(){const{payload:e}=await this.wire.sendAction(\"application-get-views\",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}getZoomLevel(){return this.wire.sendAction(\"get-application-zoom-level\",this.identity).then((({payload:e})=>e.data))}getWindow(){return this.wire.sendAction(\"application-get-window\",this.identity).catch((e=>{})),Promise.resolve(this.window)}registerUser(e,t){return this.wire.sendAction(\"register-user\",{userName:e,appName:t,...this.identity}).then((()=>{}))}removeTrayIcon(){return this.wire.sendAction(\"remove-tray-icon\",this.identity).then((()=>{}))}restart(){return this.wire.sendAction(\"restart-application\",this.identity).then((()=>{}))}run(){return console.warn(\"Deprecation Warning: Application.run is deprecated Please use fin.Application.start\"),this.wire.sendAction(\"application-run\",this.identity).catch((e=>{})),this._run()}_run(e={}){return this.wire.sendAction(\"run-application\",{manifestUrl:this._manifestUrl,opts:e,...this.identity}).then((()=>{}))}scheduleRestart(){return this.wire.sendAction(\"relaunch-on-close\",this.identity).then((()=>{}))}async sendApplicationLog(){const{payload:e}=await this.wire.sendAction(\"send-application-log\",this.identity);return e.data}async setJumpList(e){await this.wire.sendAction(\"set-jump-list\",{config:e,...this.identity})}setTrayIcon(e){return this.wire.sendAction(\"set-tray-icon\",{enabledIcon:e,...this.identity}).then((()=>{}))}setShortcuts(e){return this.wire.sendAction(\"set-shortcuts\",{data:e,...this.identity}).then((()=>{}))}async setShortcutQueryParams(e){await this.wire.sendAction(\"set-shortcut-query-args\",{data:e,...this.identity})}setZoomLevel(e){return this.wire.sendAction(\"set-application-zoom-level\",{level:e,...this.identity}).then((()=>{}))}async setAppLogUsername(e){await this.wire.sendAction(\"set-app-log-username\",{data:e,...this.identity})}getTrayIconInfo(){return this.wire.sendAction(\"get-tray-icon-info\",this.identity).then((({payload:e})=>e.data))}hasTrayIcon(){return this.wire.sendAction(\"has-tray-icon\",this.identity).then((({payload:e})=>e.data))}terminate(){return this.wire.sendAction(\"terminate-application\",this.identity).then((()=>{}))}wait(){return this.wire.sendAction(\"wait-for-hung-application\",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction(\"get-info\",this.identity).then((({payload:e})=>e.data))}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction(\"application-get-process-info\",this.identity);return e}async setFileDownloadLocation(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t};await this.wire.sendAction(\"set-file-download-location\",{...n,downloadLocation:e})}async getFileDownloadLocation(){const{payload:{data:e}}=await this.wire.sendAction(\"get-file-download-location\",this.identity);return e}async showTrayIconPopupMenu(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t},{payload:i}=await this.wire.sendAction(\"show-tray-icon-popup-menu\",{...n,options:e});return i.data}async closeTrayIconPopupMenu(){const{name:e}=this.wire.me,t={uuid:this.identity.uuid,name:e};await this.wire.sendAction(\"close-tray-icon-popup-menu\",{...t})}}return j.Application=i,j}function Z(){return q||(q=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(function(){if(K)return F;K=1,Object.defineProperty(F,\"__esModule\",{value:!0}),F.ApplicationModule=void 0;const e=d,t=O,n=Y();class i extends e.Base{async wrap(e){this.wire.sendAction(\"wrap-application\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}wrapSync(e){this.wire.sendAction(\"wrap-application-sync\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}async _create(e){return void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&void 0===e.isPlatformController&&(e.autoShow=!0),await this.wire.sendAction(\"create-application\",e),this.wrap({uuid:e.uuid})}create(e){return console.warn(\"Deprecation Warning: fin.Application.create is deprecated. Please use fin.Application.start\"),this.wire.sendAction(\"application-create\").catch((e=>{})),this._create(e)}async start(e){this.wire.sendAction(\"start-application\").catch((e=>{}));const t=await this._create(e);return await this.wire.sendAction(\"run-application\",{uuid:e.uuid}),t}async startManyManifests(e,t){return this.wire.sendAction(\"run-applications\",{applications:e,opts:t}).then((()=>{}))}getCurrent(){return this.wire.sendAction(\"get-current-application\").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction(\"get-current-application-sync\").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}async startFromManifest(e,t){this.wire.sendAction(\"application-start-from-manifest\").catch((e=>{}));const n=await this._createFromManifest(e);return await n._run(t),n}createFromManifest(e){return console.warn(\"Deprecation Warning: fin.Application.createFromManifest is deprecated. Please use fin.Application.startFromManifest\"),this.wire.sendAction(\"application-create-from-manifest\").catch((e=>{})),this._createFromManifest(e)}_createFromManifest(e){return this.wire.sendAction(\"get-application-manifest\",{manifestUrl:e}).then((({payload:e})=>{const t=e.data.platform?e.data.platform.uuid:e.data.startup_app.uuid;return this.wrap({uuid:t})})).then((t=>(t._manifestUrl=e,t)))}}return F.ApplicationModule=i,F}(),e),n(Y(),e)}(R)),R}H.WebContents=D;var Q={};Object.defineProperty(Q,\"__esModule\",{value:!0}),Q.promisifySubscription=void 0;var X,ee,te;function ne(){if(X)return S;X=1,Object.defineProperty(S,\"__esModule\",{value:!0}),S._Window=void 0;const e=Z(),t=H,n=J(),i=T,r=Q;class o extends t.WebContents{constructor(e,t){super(e,t,\"window\")}async createWindow(e){this.wire.sendAction(\"window-create-window\",this.identity).catch((e=>{}));const t=await(0,r.promisifySubscription)(this,\"fire-constructor-callback\");void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&(e.autoShow=!0),(0,i.handleDeprecatedWarnings)(e);const n=this.wire.environment.createChildContent({entityType:\"window\",options:e}),[o]=await Promise.all([t.getValue(),n]);let s;const{success:a}=o,c=o.data,{message:d}=c;s=a?{httpResponseCode:c.httpResponseCode,apiInjected:c.apiInjected}:{message:c.message,networkErrorCode:c.networkErrorCode,stack:c.stack};const h={message:d,cbPayload:s,success:a};try{this.getWebWindow().fin.__internal_.openerSuccessCBCalled()}catch(e){}return h.success?this:Promise.reject(h)}getAllFrames(){return this.wire.sendAction(\"get-all-frames\",this.identity).then((({payload:e})=>e.data))}getBounds(){return this.wire.sendAction(\"get-window-bounds\",this.identity).then((({payload:e})=>e.data))}center(){return this.wire.sendAction(\"center-window\",this.identity).then((()=>{}))}blur(){return this.wire.sendAction(\"blur-window\",this.identity).then((()=>{}))}bringToFront(){return this.wire.sendAction(\"bring-window-to-front\",this.identity).then((()=>{}))}animate(e,t){return this.wire.sendAction(\"animate-window\",{transitions:e,options:t,...this.identity}).then((()=>{}))}hide(){return this.wire.sendAction(\"hide-window\",this.identity).then((()=>{}))}close(e=!1){return this.wire.sendAction(\"close-window\",{force:e,...this.identity}).then((()=>{Object.setPrototypeOf(this,null)}))}focusedWebViewWasChanged(){return this.wire.sendAction(\"focused-webview-changed\",this.identity).then((()=>{}))}getNativeId(){return this.wire.sendAction(\"get-window-native-id\",this.identity).then((({payload:e})=>e.data))}async getCurrentViews(){const{payload:e}=await this.wire.sendAction(\"window-get-views\",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}disableFrame(){return console.warn(\"Function is deprecated; use disableUserMovement instead.\"),this.wire.sendAction(\"disable-window-frame\",this.identity).then((()=>{}))}disableUserMovement(){return this.wire.sendAction(\"disable-window-frame\",this.identity).then((()=>{}))}enableFrame(){return console.warn(\"Function is deprecated; use enableUserMovement instead.\"),this.wire.sendAction(\"enable-window-frame\",this.identity).then((()=>{}))}enableUserMovement(){return this.wire.sendAction(\"enable-window-frame\",this.identity).then((()=>{}))}flash(){return this.wire.sendAction(\"flash-window\",this.identity).then((()=>{}))}stopFlashing(){return this.wire.sendAction(\"stop-flash-window\",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction(\"get-window-info\",this.identity).then((({payload:e})=>e.data))}async getLayout(e){this.wire.sendAction(\"window-get-layout\",this.identity).catch((e=>{}));const t=await this.getOptions();if(!t.layout&&!t.layoutSnapshot)throw new Error(\"Window does not have a Layout\");return this.fin.Platform.Layout.wrap(e??this.identity)}getOptions(){return this.wire.sendAction(\"get-window-options\",this.identity).then((({payload:e})=>e.data))}getParentApplication(){return this.wire.sendAction(\"window-get-parent-application\",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity))}getParentWindow(){return this.wire.sendAction(\"window-get-parent-window\",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity)).then((e=>e.getWindow()))}async getSnapshot(e){const t={area:e,...this.identity};console.warn(\"Window.getSnapshot has been deprecated, please use Window.capturePage\");return(await this.wire.sendAction(\"get-window-snapshot\",t)).payload.data}getState(){return this.wire.sendAction(\"get-window-state\",this.identity).then((({payload:e})=>e.data))}getWebWindow(){return this.wire.sendAction(\"window-get-web-window\",this.identity).catch((e=>{})),this.wire.environment.getWebWindow(this.identity)}isMainWindow(){return this.wire.sendAction(\"window-is-main-window\",this.identity).catch((e=>{})),this.me.uuid===this.me.name}isShowing(){return this.wire.sendAction(\"is-window-showing\",this.identity).then((({payload:e})=>e.data))}maximize(){return this.wire.sendAction(\"maximize-window\",this.identity).then((()=>{}))}minimize(){return this.wire.sendAction(\"minimize-window\",this.identity).then((()=>{}))}moveBy(e,t,n){return this.wire.sendAction(\"move-window-by\",{deltaLeft:e,deltaTop:t,positioningOptions:n,...this.identity}).then((()=>{}))}moveTo(e,t,n){return this.wire.sendAction(\"move-window\",{left:e,top:t,positioningOptions:n,...this.identity}).then((()=>{}))}resizeBy(e,t,n,i){return this.wire.sendAction(\"resize-window-by\",{deltaWidth:Math.floor(e),deltaHeight:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}resizeTo(e,t,n,i){return this.wire.sendAction(\"resize-window\",{width:Math.floor(e),height:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}restore(){return this.wire.sendAction(\"restore-window\",this.identity).then((()=>{}))}setAsForeground(){return this.wire.sendAction(\"set-foreground-window\",this.identity).then((()=>{}))}setBounds(e,t){return this.wire.sendAction(\"set-window-bounds\",{...e,...this.identity,positioningOptions:t}).then((()=>{}))}show(e=!1){return this.wire.sendAction(\"show-window\",{force:e,...this.identity}).then((()=>{}))}showAt(e,t,n=!1){return this.wire.sendAction(\"show-at-window\",{force:n,left:Math.floor(e),top:Math.floor(t),...this.identity}).then((()=>{}))}updateOptions(e){return this.wire.sendAction(\"update-window-options\",{options:e,...this.identity}).then((()=>{}))}authenticate(e,t){return this.wire.sendAction(\"window-authenticate\",{userName:e,password:t,...this.identity}).then((()=>{}))}async showPopupMenu(e){const{payload:t}=await this.wire.sendAction(\"show-popup-menu\",{options:e,...this.identity});return t.data}async closePopupMenu(){return this.wire.sendAction(\"close-popup-menu\",{...this.identity}).then((()=>{}))}async dispatchPopupResult(e){this.wire.sendAction(\"window-dispatch-popup-result\",this.identity).catch((e=>{})),await this.wire.sendAction(\"dispatch-popup-result\",{data:e,...this.identity})}async print(e={content:\"self\"}){switch(e.content){case void 0:case\"self\":return super.print(e);case\"screenshot\":return this.wire.sendAction(\"print-screenshot\",this.identity).then((()=>{}));case\"views\":return this.wire.sendAction(\"print-views\",{...this.identity,options:e}).then((()=>{}));default:return}}}return S._Window=o,S}function ie(){return te||(te=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(function(){if(ee)return _;ee=1,Object.defineProperty(_,\"__esModule\",{value:!0}),_._WindowModule=void 0;const e=d,t=O,n=ne();class i extends e.Base{async wrap(e){this.wire.sendAction(\"window-wrap\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}wrapSync(e){this.wire.sendAction(\"window-wrap-sync\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}create(e){return this.wire.sendAction(\"create-window\").catch((e=>{})),new n._Window(this.wire,{uuid:this.me.uuid,name:e.name}).createWindow(e)}getCurrent(){if(this.wire.sendAction(\"get-current-window\").catch((e=>{})),!this.wire.me.isWindow)throw new Error(\"You are not in a Window context\");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction(\"get-current-window-sync\").catch((e=>{})),!this.wire.me.isWindow)throw new Error(\"You are not in a Window context\");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return _._WindowModule=i,_}(),e),n(ne(),e)}(M)),M}Q.promisifySubscription=async(e,t,n=(()=>!0),i)=>{let r,o,s;const a=new Promise(((e,t)=>{r=e,o=t})),c=e=>{n(e)&&(clearTimeout(s),r(e))};return await e.on(t,c),i&&(s=setTimeout((()=>o(new Error(\"event timed out\"))),i)),a.finally((()=>{e.removeListener(t,c).catch((()=>null))})),{getValue:()=>a}},Object.defineProperty(c,\"__esModule\",{value:!0}),c.System=void 0;const re=d,oe=g,se=ie(),ae=t;class ce extends re.EmitterBase{constructor(e){super(e,\"system\")}sendExternalProcessRequest(e,t){return new Promise(((n,i)=>{const r=\"external-process-exited\";let o,s,a,c;\"function\"==typeof t.listener&&(a=e=>{const n=e||{};s={topic:\"exited\",uuid:n.processUuid||\"\",exitCode:n.exitCode||0},o===e.processUuid&&(t.listener(s),c.removeListener(r,a))},this.wire.me.name||(this.wire.me.name=this.wire.me.uuid),c=new se._Window(this.wire,this.wire.me),c.on(r,a)),this.wire.sendAction(e,t).then((({payload:e})=>{o=e.data.uuid,n(e.data),s&&o===s.uuid&&(t.listener(s),c.removeListener(r,a))})).catch((e=>{c&&c.removeListener(r,a),i(e)}))}))}getVersion(){return this.wire.sendAction(\"get-version\").then((({payload:e})=>e.data))}clearCache(e){return this.wire.sendAction(\"clear-cache\",e).then((()=>{}))}deleteCacheOnExit(){return this.wire.sendAction(\"delete-cache-request\").then((()=>{}))}exit(){return this.wire.sendAction(\"exit-desktop\").then((()=>{}))}async fetchManifest(e){const{payload:{data:t}}=await this.wire.sendAction(\"fetch-manifest\",{manifestUrl:e});return t}flushCookieStore(){return this.wire.sendAction(\"flush-cookie-store\").then((()=>{}))}getAllWindows(){return this.wire.sendAction(\"get-all-windows\").then((({payload:e})=>e.data))}getAllApplications(){return this.wire.sendAction(\"get-all-applications\").then((({payload:e})=>e.data))}getCommandLineArguments(){return this.wire.sendAction(\"get-command-line-arguments\").then((({payload:e})=>e.data))}async getCrashReporterState(){const{payload:{data:{diagnosticMode:e,isRunning:t}}}=await this.wire.sendAction(\"get-crash-reporter-state\");return console.warn(\"diagnosticMode property is deprecated. It will be removed in a future version\"),{diagnosticMode:e,diagnosticsMode:e,isRunning:t}}async startCrashReporter(e){const t=e,n={...t,diagnosticMode:t.diagnosticsMode||t.diagnosticMode},{payload:{data:{diagnosticMode:i,isRunning:r}}}=await this.wire.sendAction(\"start-crash-reporter\",n);return{diagnosticMode:i,diagnosticsMode:i,isRunning:r}}getUniqueUserId(){return this.wire.sendAction(\"get-unique-user-id\").then((({payload:e})=>e.data))}getEntityInfo(e,t){return this.wire.sendAction(\"get-entity-info\",{uuid:e,name:t}).then((({payload:e})=>e.data))}getEnvironmentVariable(e){return this.wire.sendAction(\"get-environment-variable\",{environmentVariables:e}).then((({payload:e})=>e.data))}getFocusedWindow(){return this.wire.sendAction(\"get-focused-window\").then((({payload:e})=>e.data))}async isAppCertified(e){const{payload:{data:{certifiedInfo:t}}}=await this.wire.sendAction(\"is-app-certified\",{manifestUrl:e});return t}getInstalledRuntimes(){return this.wire.sendAction(\"get-installed-runtimes\").then((({payload:e})=>e.data.runtimes))}async getInstalledApps(){const{payload:{data:{installedApps:e}}}=await this.wire.sendAction(\"get-installed-apps\");return e}getLog(e){return this.wire.sendAction(\"view-log\",e).then((({payload:e})=>e.data))}getMachineId(){return this.wire.sendAction(\"get-machine-id\").then((({payload:e})=>e.data))}getMinLogLevel(){return this.wire.sendAction(\"get-min-log-level\").then((({payload:e})=>e.data))}getLogList(){return this.wire.sendAction(\"list-logs\").then((({payload:e})=>e.data))}getMonitorInfo(){return this.wire.sendAction(\"get-monitor-info\").then((({payload:e})=>e.data))}getMousePosition(){return this.wire.sendAction(\"get-mouse-position\").then((({payload:e})=>e.data))}getProcessList(){return console.warn(\"System.getProcessList has been deprecated. Please consider using our new process APIs: Window.getProcessInfo, View.getProcessInfo, Application.getProcessInfo, System.getAllProcessInfo\"),this.wire.sendAction(\"process-snapshot\").then((({payload:e})=>e.data))}async getAllProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction(\"get-all-process-info\",this.identity);return e}getProxySettings(){return this.wire.sendAction(\"get-proxy-settings\").then((({payload:e})=>e.data))}getRuntimeInfo(){return this.wire.sendAction(\"get-runtime-info\").then((({payload:e})=>e.data))}getRvmInfo(){return this.wire.sendAction(\"get-rvm-info\").then((({payload:e})=>e.data))}getHostSpecs(){return this.wire.sendAction(\"get-host-specs\").then((({payload:e})=>e.data))}getOSInfo(){return this.wire.sendAction(\"get-os-info\").then((({payload:e})=>e.data))}launchExternalProcess(e){return this.sendExternalProcessRequest(\"launch-external-process\",e)}monitorExternalProcess(e){return this.sendExternalProcessRequest(\"monitor-external-process\",e)}log(e,t){return this.wire.sendAction(\"write-to-log\",{level:e,message:t}).then((()=>{}))}openUrlWithBrowser(e){return this.wire.sendAction(\"open-url-with-browser\",{url:e}).then((()=>{}))}async registerCustomProtocol(e){if(\"object\"!=typeof e)throw new Error(\"Must provide an object with a `protocolName` property having a string value.\");await this.wire.sendAction(\"register-custom-protocol\",e)}async unregisterCustomProtocol(e){await this.wire.sendAction(\"unregister-custom-protocol\",{protocolName:e})}async getCustomProtocolState(e){return this.wire.sendAction(\"get-custom-protocol-state\",{protocolName:e}).then((({payload:e})=>e.data))}releaseExternalProcess(e){return this.wire.sendAction(\"release-external-process\",{uuid:e}).then((()=>{}))}showDeveloperTools(e){return this.wire.sendAction(\"show-developer-tools\",e).then((()=>{}))}terminateExternalProcess(e){return this.wire.sendAction(\"terminate-external-process\",e).then((()=>{}))}updateProxySettings(e){return this.wire.sendAction(\"update-proxy\",e).then((()=>{}))}async downloadAsset(e,t){const n=()=>{};let i=n,r=n;const o=new Promise(((e,t)=>{i=e,r=t}));if(\"openfin\"!==this.wire.environment.type)throw new oe.NotSupportedError(\"downloadAsset only supported in an OpenFin Render process\");const s=oe.RuntimeError.getCallSite(),a=this.wire.environment.getNextMessageId().toString(),c=`asset-download-progress-${a}`,d=`asset-download-error-${a}`,h=`asset-download-complete-${a}`,l=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},u=()=>{this.removeListener(c,l)};await Promise.all([this.on(c,l),this.once(d,(e=>{u();const{reason:t,err:n}=e;r(new oe.RuntimeError({reason:t,error:n},s))})),this.once(h,(()=>{u(),i()}))]);const p=Object.assign(e,{downloadId:a});return await this.wire.sendAction(\"download-asset\",p).catch((e=>{throw u(),e})),o}downloadRuntime(e,t){const n=oe.RuntimeError.getCallSite();return new Promise(((i,r)=>{if(\"openfin\"!==this.wire.environment.type)return void r(new oe.NotSupportedError(\"downloadRuntime only supported in an OpenFin Render process\"));const o=this.wire.environment.getNextMessageId().toString(),s=`runtime-download-progress-${o}`,a=`runtime-download-error-${o}`,c=`runtime-download-complete-${o}`,d=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},h=()=>{this.removeListener(s,d)};this.on(s,d),this.once(a,(e=>{h();const{reason:t,err:i}=e;r(new oe.RuntimeError({reason:t,error:i},n))})),this.once(c,(()=>{h(),i()}));const l=Object.assign(e,{downloadId:o});this.wire.sendAction(\"download-runtime\",l).catch((e=>{h(),r(e)}))}))}downloadPreloadScripts(e){return this.wire.sendAction(\"download-preload-scripts\",{scripts:e}).then((({payload:e})=>e.data))}getAllExternalApplications(){return this.wire.sendAction(\"get-all-external-applications\").then((({payload:e})=>e.data))}getAppAssetInfo(e){return this.wire.sendAction(\"get-app-asset-info\",e).then((({payload:e})=>e.data))}getCookies(e){const t=this.wire.environment.getUrl(),n=Object.assign(e,{url:t});return this.wire.sendAction(\"get-cookies\",n).then((({payload:e})=>e.data))}setMinLogLevel(e){return this.wire.sendAction(\"set-min-log-level\",{level:e}).then((()=>{}))}resolveUuid(e){return this.wire.sendAction(\"resolve-uuid\",{entityKey:e}).then((({payload:e})=>e.data))}executeOnRemote(e,t){return t.requestingIdentity=e,this.wire.ferryAction(t)}readRegistryValue(e,t,n){return this.wire.sendAction(\"read-registry-value\",{rootKey:e,subkey:t,value:n}).then((({payload:e})=>e.data))}registerExternalConnection(e){return this.wire.sendAction(\"register-external-connection\",{uuid:e}).then((({payload:e})=>e.data))}async getServiceConfiguration(e){if(\"string\"!=typeof e.name)throw new Error(\"Must provide an object with a `name` property having a string value\");const{name:t}=e;return this.wire.sendAction(\"get-service-configuration\",{name:t}).then((({payload:e})=>e.data))}async getSystemAppConfig(e){if(\"string\"!=typeof e)throw new Error(\"Must provide a string value for name of system app\");return this.wire.sendAction(\"get-system-app-configuration\",{name:e}).then((({payload:e})=>e.data))}async registerShutdownHandler(e){this.wire.sendAction(\"system-register-shutdown-handler\").catch((e=>{}));const{uuid:t,name:n}=this.wire.me;this.on(\"system-shutdown\",(i=>{e({proceed:()=>{this.wire.environment.raiseEvent(\"application/system-shutdown-handled\",{uuid:t,name:n,topic:\"application\"})}})}))}runRvmHealthCheck(){return this.wire.sendAction(\"run-rvm-health-check\").then((({payload:e})=>e.data))}async launchManifest(e,t={}){const{subscribe:n,...i}=t,r=i;if(n){const e=new ae.EventEmitter;n(e);const t=\"app-version-progress\",i=\"runtime-status\",o=\"app-version-complete\",s=\"app-version-error\",a=this.wire.environment.getNextMessageId().toString();r.appVersionId=a;const c=[o,t,i,s],d=e=>{const{appVersionId:t,topic:n,type:i,...r}=e;return{...r,type:c.find((e=>i.includes(e)))}},h=t=>{const n=d(t);e.emit(n.type,n)},l=()=>{this.removeListener(`${t}.${a}`,h),this.removeListener(`${i}.${a}`,h),this.removeListener(`${o}.${a}`,h),this.removeListener(`${s}.${a}`,h),this.removeListener(`${o}.${a}`,l),this.removeListener(`${s}.${a}`,l)};await Promise.all([this.on(`${t}.${a}`,h),this.on(`${i}.${a}`,h),this.once(`${o}.${a}`,h),this.once(`${s}.${a}`,h),this.once(`${o}.${a}`,l),this.once(`${s}.${a}`,l)])}return(await this.wire.sendAction(\"launch-manifest\",{manifestUrl:e,opts:r})).payload.data.manifest}async queryPermissionForCurrentContext(e){const t={uuid:this.wire.me.uuid,name:this.wire.me.name};return(await this.wire.sendAction(\"query-permission-for-current-context\",{apiName:e,identity:t})).payload.data}async enableNativeWindowIntegrationProvider(e){const{payload:t}=await this.wire.sendAction(\"enable-native-window-integration-provider\",{permissions:e});return t.data}async registerUsage({data:e,type:t}){await this.wire.sendAction(\"register-usage\",{data:e,type:t})}async getPrinters(){const{payload:e}=await this.wire.sendAction(\"system-get-printers\");return e.data}async updateProcessLoggingOptions(e){await this.wire.sendAction(\"system-update-process-logging-options\",{options:e})}async getDomainSettings(){const{payload:{data:e}}=await this.wire.sendAction(\"get-domain-settings\",this.identity);return e}async setDomainSettings(e){await this.wire.sendAction(\"set-domain-settings\",{domainSettings:e,...this.identity})}async refreshExtensions(){const{payload:e}=await this.wire.sendAction(\"refresh-extensions\");return e.data}async getInstalledExtensions(){const{payload:e}=await this.wire.sendAction(\"get-installed-extensions\");return e.data}}c.System=ce;var de={},he={};Object.defineProperty(he,\"__esModule\",{value:!0}),he.RefCounter=void 0;he.RefCounter=class{constructor(){this.topicRefMap=new Map}incRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t+1;n=i,this.topicRefMap.set(e,i)}else this.topicRefMap.set(e,1),n=1;return n}decRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t-1;this.topicRefMap.set(e,i),n=i}else n=-1;return n}actOnFirst(e,t,n){return 1===this.incRefCount(e)?t():n()}actOnLast(e,t,n){return 0===this.decRefCount(e)?t():n()}};var le={},ue={},pe={};Object.defineProperty(pe,\"__esModule\",{value:!0}),pe.ChannelBase=pe.ProtectedItems=void 0;const we=e=>async(t,n,i)=>{const r=await e(t,n,i);return void 0===r?n:r};pe.ProtectedItems=class{constructor(e,t){this.providerIdentity=e,this.close=t}};class ye{static defaultAction(e){throw new Error(`No action registered at target for ${e}`)}constructor(){this.subscriptions=new Map}async processAction(e,t,n){try{const i=this.subscriptions.has(e)?this.subscriptions.get(e):(t,n)=>(this.defaultAction??ye.defaultAction)(e,t,n),r=this.preAction?await this.preAction(e,t,n):t,o=await i(r,n);return this.postAction?await this.postAction(e,o,n):o}catch(t){if(this.errorMiddleware)return this.errorMiddleware(e,t,n);throw t}}beforeAction(e){if(this.preAction)throw new Error(\"Already registered beforeAction middleware\");this.preAction=we(e)}onError(e){if(this.errorMiddleware)throw new Error(\"Already registered error middleware\");this.errorMiddleware=e}afterAction(e){if(this.postAction)throw new Error(\"Already registered afterAction middleware\");this.postAction=we(e)}remove(e){this.subscriptions.delete(e)}setDefaultAction(e){if(this.defaultAction)throw new Error(\"default action can only be set once\");this.defaultAction=e}register(e,t){if(this.subscriptions.has(e))throw new Error(`Subscription already registered for action: ${e}. Unsubscribe before adding new subscription`);return this.subscriptions.set(e,t),!0}}pe.ChannelBase=ye;var fe,ge,me,ve=s&&s.__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)},Ce=s&&s.__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};Object.defineProperty(ue,\"__esModule\",{value:!0}),ue.ChannelClient=void 0;const be=pe,Ie=new Map;class Ee extends be.ChannelBase{static closeChannelByEndpointId(e){const t=Ie.get(e);t&&ve(t,me,\"f\").call(t)}static handleProviderDisconnect(e){for(const t of Ie.values())t.providerIdentity.channelId===e.channelId&&(t.disconnectListener(e),ve(t,me,\"f\").call(t))}constructor(e,t,n){super(),fe.set(this,void 0),ge.set(this,void 0),this.processAction=(e,t,n)=>super.processAction(e,t,n),me.set(this,(()=>{Ie.delete(this.endpointId),ve(this,ge,\"f\").close()})),Ce(this,fe,new be.ProtectedItems(e,t),\"f\"),this.disconnectListener=()=>{},this.endpointId=e.endpointId,Ce(this,ge,n,\"f\"),Ie.set(this.endpointId,this),n.receive(this.processAction)}get providerIdentity(){return ve(this,fe,\"f\").providerIdentity}async dispatch(e,t){if(ve(this,ge,\"f\").isEndpointConnected(this.providerIdentity.channelId))return ve(this,ge,\"f\").send(this.providerIdentity.channelId,e,t);throw new Error(\"The client you are trying to dispatch from is disconnected from the target provider.\")}onDisconnection(e){this.disconnectListener=t=>{try{e(t)}catch(e){throw new Error(`Error while calling the onDisconnection callback: ${e.message}`)}finally{this.disconnectListener=()=>{}}}}async disconnect(){await this.sendDisconnectAction(),ve(this,me,\"f\").call(this)}async sendDisconnectAction(){const e=ve(this,fe,\"f\");await e.close()}static async wireClose(e,t,n){const{channelName:i,uuid:r,name:o}=t;await e.sendAction(\"disconnect-from-channel\",{channelName:i,uuid:r,name:o,endpointId:n})}}ue.ChannelClient=Ee,fe=new WeakMap,ge=new WeakMap,me=new WeakMap;var xe={},Ae={};Object.defineProperty(Ae,\"__esModule\",{value:!0}),Ae.exhaustiveCheck=void 0,Ae.exhaustiveCheck=function(e,t){throw new Error(`Unsupported value: ${e}${t?`\\n Supported values are: ${t.join(\"\")}`:\"\"}`)};var Pe,Me,_e,Oe={},Se=s&&s.__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},Re=s&&s.__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)};Object.defineProperty(Oe,\"__esModule\",{value:!0}),Oe.ClassicInfo=Oe.ClassicStrategy=void 0;Oe.ClassicStrategy=class{constructor(e,t,n,i){this.messageReceiver=t,this.endpointId=n,this.providerIdentity=i,Pe.set(this,void 0),Me.set(this,new Map),_e.set(this,new Map),this.send=async(e,t,n)=>{const i=Re(this,Me,\"f\").get(e);if(!i)throw new Error(`Could not locate routing info for endpoint ${e}`);const r={...i};r.isLocalEndpointId&&delete r.endpointId,delete r.isLocalEndpointId;const o=Re(this,Pe,\"f\").sendAction(\"send-channel-message\",{...r,providerIdentity:this.providerIdentity,action:t,payload:n});Re(this,_e,\"f\").get(e)?.add(o);return(await o.catch((e=>{throw new Error(e.message)})).finally((()=>{Re(this,_e,\"f\").get(e)?.delete(o)}))).payload.data.result},this.close=async()=>{this.messageReceiver.removeEndpoint(this.providerIdentity.channelId,this.endpointId),[...Re(this,Me,\"f\").keys()].forEach((e=>this.closeEndpoint(e))),Se(this,Me,new Map,\"f\")},Se(this,Pe,e,\"f\")}onEndpointDisconnect(e,t){}receive(e){this.messageReceiver.addEndpoint(e,this.providerIdentity.channelId,this.endpointId)}async closeEndpoint(e){const t=Re(this,Me,\"f\").get(e);Re(this,Me,\"f\").delete(e);const n=Re(this,_e,\"f\").get(e);n?.forEach((n=>{const i=`Channel connection with identity uuid: ${t?.uuid} / name: ${t?.name} / endpointId: ${e} no longer connected.`;n.cancel(new Error(i))}))}isEndpointConnected(e){return Re(this,Me,\"f\").has(e)}addEndpoint(e,t){Re(this,Me,\"f\").set(e,t.endpointIdentity),Re(this,_e,\"f\").set(e,new Set)}isValidEndpointPayload(e){return\"string\"==typeof e?.endpointIdentity?.endpointId||\"string\"==typeof e?.endpointIdentity?.channelId}},Pe=new WeakMap,Me=new WeakMap,_e=new WeakMap,Oe.ClassicInfo={version:5,minimumVersion:0,type:\"classic\"};var Fe={},je={},ke={};Object.defineProperty(ke,\"__esModule\",{value:!0}),ke.errorToPOJO=void 0,ke.errorToPOJO=function(e){return{stack:e.stack,name:e.name,message:e.message,toString:()=>e.stack||e.toString()}};var Le,Te,$e=s&&s.__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)},Be=s&&s.__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};Object.defineProperty(je,\"__esModule\",{value:!0}),je.RTCEndpoint=void 0;const Ge=ke;je.RTCEndpoint=class{static isValidEndpointPayload(e){const t=e=>\"object\"==typeof e&&null!==e;return t(e)&&t(e.endpointIdentity)&&t(e.rtc)&&\"string\"==typeof e.endpointIdentity.endpointId}constructor({rtc:e,endpointIdentity:t}){this.responseMap=new Map,Le.set(this,null),Te.set(this,void 0),this.connectionStateChangeHandler=e=>{\"connected\"!==this.rtc.rtcClient.connectionState&&(this.rtc.rtcClient.removeEventListener(\"connectionstatechange\",this.connectionStateChangeHandler),this.close(),$e(this,Te,\"f\")&&$e(this,Te,\"f\").call(this))},this.send=async(e,t)=>{const n=`message-${Math.random()}`,i=new Promise(((e,t)=>{this.responseMap.set(n,{resolve:e,reject:t})}));return this.rtc.channels.request.send(JSON.stringify({action:e,payload:t,messageId:n})),i},this.close=()=>{this.responseMap.forEach((e=>e.reject(\"Connection has closed.\"))),this.responseMap=new Map,this.rtc.channels.request.close(),this.rtc.channels.response.close(),this.rtc.rtcClient.close()},this.rtc=e,this.endpointIdentity=t,this.rtc.channels.response.addEventListener(\"message\",(e=>{let{data:t}=e;e.data instanceof ArrayBuffer&&(t=(new TextDecoder).decode(e.data));const{messageId:n,payload:i,success:r,error:o}=JSON.parse(t),{resolve:s,reject:a}=this.responseMap.get(n)??{};s&&a?(this.responseMap.delete(n),r?s(i):a(o)):(console.log(\"Could not find id in responseMap.\"),console.log(e))})),this.rtc.channels.request.addEventListener(\"message\",(async e=>{let{data:n}=e;e.data instanceof ArrayBuffer&&(n=(new TextDecoder).decode(e.data));const{messageId:i,action:r,payload:o}=JSON.parse(n);if($e(this,Le,\"f\"))try{const e=await $e(this,Le,\"f\").call(this,r,o,t);this.rtc.channels.response.send(JSON.stringify({messageId:i,payload:e,success:!0}))}catch(e){\"open\"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,error:(0,Ge.errorToPOJO)(e),success:!1}))}else\"open\"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,success:!1,error:\"Connection not ready.\"}))})),this.rtc.rtcClient.addEventListener(\"connectionstatechange\",this.connectionStateChangeHandler),Object.values(this.rtc.channels).forEach((e=>{e.onclose=e=>{[...this.responseMap.values()].forEach((e=>e.reject(new Error(\"RTCDataChannel closed unexpectedly, this is most commonly caused by message size. Note: RTC Channels have a message size limit of ~255kB.\")))),this.close(),$e(this,Te,\"f\")&&$e(this,Te,\"f\").call(this)}}))}onDisconnect(e){if($e(this,Te,\"f\"))throw new Error(\"RTCEndpoint disconnectListener cannot be set twice.\");Be(this,Te,e,\"f\")}receive(e){if($e(this,Le,\"f\"))throw new Error(\"You have already set a listener for this RTC Endpoint.\");Be(this,Le,e,\"f\")}get connected(){return\"connected\"===this.rtc.rtcClient.connectionState}},Le=new WeakMap,Te=new WeakMap;var We,He,Ne,De={},Ue=s&&s.__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)},Ve=s&&s.__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};Object.defineProperty(De,\"__esModule\",{value:!0}),De.EndpointStrategy=void 0;De.EndpointStrategy=class{constructor(e,t,n){this.EndpointType=e,this.StrategyName=n,We.set(this,null),He.set(this,new Map),Ne.set(this,!0),this.send=async(e,t,n)=>this.getEndpointById(e).send(t,n),this.close=async()=>{Ue(this,Ne,\"f\")&&(Ue(this,He,\"f\").forEach((e=>e.close())),Ve(this,He,new Map,\"f\")),Ve(this,Ne,!1,\"f\")},this.isValidEndpointPayload=t}onEndpointDisconnect(e,t){this.getEndpointById(e).onDisconnect(t)}receive(e){if(Ue(this,We,\"f\"))throw new Error(`You have already set a listener for this ${this.StrategyName} Strategy`);Ve(this,We,e,\"f\"),Ue(this,He,\"f\").forEach((e=>e.receive(Ue(this,We,\"f\"))))}getEndpointById(e){const t=Ue(this,He,\"f\").get(e);if(!t)throw new Error(`Client with endpoint id ${e} is not connected`);return t}get connected(){return Ue(this,Ne,\"f\")}isEndpointConnected(e){return Ue(this,He,\"f\").has(e)}addEndpoint(e,t){if(!Ue(this,Ne,\"f\"))return void console.warn(`Adding endpoint to disconnected ${this.StrategyName} Strategy`);const n=new this.EndpointType(t);Ue(this,We,\"f\")&&n.receive(Ue(this,We,\"f\")),Ue(this,He,\"f\").set(e,n)}async closeEndpoint(e){Ue(this,He,\"f\").delete(e)}},We=new WeakMap,He=new WeakMap,Ne=new WeakMap,Object.defineProperty(Fe,\"__esModule\",{value:!0}),Fe.RTCInfo=Fe.RTCStrategy=void 0;const ze=je,Ke=De;class qe extends Ke.EndpointStrategy{constructor(){super(ze.RTCEndpoint,ze.RTCEndpoint.isValidEndpointPayload,\"RTC\")}}Fe.RTCStrategy=qe,Fe.RTCInfo={version:2,minimumVersion:0,type:\"rtc\"};var Je={};Object.defineProperty(Je,\"__esModule\",{value:!0}),Je.RTCICEManager=void 0;const Ye=d;class Ze extends Ye.EmitterBase{constructor(e){super(e,\"channel\"),this.ensureChannelOpened=e=>new Promise(((t,n)=>{if(\"open\"===e.readyState)t();else if(\"connecting\"===e.readyState){const n=()=>{e.removeEventListener(\"open\",n),t()};e.addEventListener(\"open\",n)}else n(new Error(\"This Channel has already closed\"))}))}static createDataChannelPromise(e,t){let n;const i=new Promise((e=>{n=e})),r=i=>{const o=()=>{i.channel.removeEventListener(\"open\",o),n(i.channel)};i.channel.label===e&&(i.channel.addEventListener(\"open\",o),t.removeEventListener(\"datachannel\",r))};return t.addEventListener(\"datachannel\",r),i}async listenForProviderIce(e,t){await this.on(this.createProviderEventName(e),t,{timestamp:Date.now()})}async raiseProviderIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createProviderEventName(e)),t)}async listenForClientIce(e,t){await this.on(this.createClientEventName(e),t,{timestamp:Date.now()})}async raiseClientIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createClientEventName(e)),t)}cleanupIceListeners(e){this.removeAllListeners(this.createClientEventName(e)),this.removeAllListeners(this.createProviderEventName(e))}createClientEventName(e){return`ice-client-${e}`}createProviderEventName(e){return`ice-provider-${e}`}createRouteString(e){return`channel/${e}`}createRtcPeer(){return this.wire.environment.getRtcPeer()}async startClientOffer(){const e=Math.random().toString(),t=this.createRtcPeer();t.addEventListener(\"icecandidate\",(async t=>{t.candidate&&await this.raiseClientIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForProviderIce(e,(async e=>{await t.addIceCandidate(e.candidate)}));const n={request:t.createDataChannel(\"request\"),response:t.createDataChannel(\"response\")},i=await t.createOffer();await t.setLocalDescription(i);const r=Promise.all([n.request,n.response].map(this.ensureChannelOpened)).then((()=>{}));return{rtcClient:t,channels:n,offer:i,rtcConnectionId:e,channelsOpened:r}}async finishClientOffer(e,t,n){return await e.setRemoteDescription(t),await n,!0}async createProviderAnswer(e,t){const n=this.createRtcPeer(),i=Ze.createDataChannelPromise(\"request\",n),r=Ze.createDataChannelPromise(\"response\",n);n.addEventListener(\"icecandidate\",(async t=>{t.candidate&&await this.raiseProviderIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForClientIce(e,(async e=>{await n.addIceCandidate(e.candidate)})),await n.setRemoteDescription(t);const o=await n.createAnswer();await n.setLocalDescription(o);const s=Promise.all([i,r]).then((([t,n])=>(this.cleanupIceListeners(e),{request:t,response:n})));return{rtcClient:n,answer:o,channels:s}}}Je.RTCICEManager=Ze;var Qe={},Xe={};function et(e){return[...e.split(\".\").reverse().entries()].reduce(((e,[t,n])=>e+ +n*1e4**t),0)}function tt(e,t){return et(e)>=et(t)}function nt(e){return e.split(\"/\")[0]}Object.defineProperty(Xe,\"__esModule\",{value:!0}),Xe.runtimeUuidMeetsMinimumRuntimeVersion=Xe.parseRuntimeUuid=Xe.meetsMinimumRuntimeVersion=void 0,Xe.meetsMinimumRuntimeVersion=tt,Xe.parseRuntimeUuid=nt,Xe.runtimeUuidMeetsMinimumRuntimeVersion=function(e,t){return tt(nt(e),t)};var it,rt,ot,st,at,ct=s&&s.__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)},dt=s&&s.__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};Object.defineProperty(Qe,\"__esModule\",{value:!0}),Qe.ChannelProvider=void 0;const ht=pe,lt=Xe;class ut extends ht.ChannelBase{get connections(){return[...ct(this,it,\"f\")]}static handleClientDisconnection(e,t){const n=e.connections.find((e=>e.endpointId===t.endpointId));if(n)ct(e,st,\"f\").call(e,n);else{e.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name)).forEach(ct(e,st,\"f\"))}e.disconnectListener(t)}static setProviderRemoval(e,t){ut.removalMap.set(e,t)}constructor(e,t,n){super(),it.set(this,void 0),rt.set(this,void 0),ot.set(this,void 0),st.set(this,(e=>{const t=this.connections.filter((t=>t.endpointId!==e.endpointId));ct(this,ot,\"f\").closeEndpoint(e.endpointId),dt(this,it,t,\"f\")})),this.processAction=async(e,t,n)=>(ut.clientIsMultiRuntime(n)&&!(0,lt.runtimeUuidMeetsMinimumRuntimeVersion)(n.runtimeUuid,\"18.87.56.0\")?this.handleMultiRuntimeLegacyClient(n):this.checkForClientConnection(n),super.processAction(e,t,n)),at.set(this,(()=>{ct(this,ot,\"f\").close();const e=ut.removalMap.get(this);e&&e()})),dt(this,rt,new ht.ProtectedItems(e,t),\"f\"),this.connectListener=()=>{},this.disconnectListener=()=>{},dt(this,it,[],\"f\"),dt(this,ot,n,\"f\"),n.receive(this.processAction)}dispatch(e,t,n){const i=e.endpointId??this.getEndpointIdForOpenFinId(e,t);return i&&ct(this,ot,\"f\").isEndpointConnected(i)?ct(this,ot,\"f\").send(i,t,n):Promise.reject(new Error(`Client connection with identity uuid: ${e.uuid} / name: ${e.name} / endpointId: ${i} no longer connected.`))}async processConnection(e,t){return ct(this,it,\"f\").push(e),this.connectListener(e,t)}publish(e,t){return this.connections.map((n=>ct(this,ot,\"f\").send(n.endpointId,e,t)))}onConnection(e){this.connectListener=e}onDisconnection(e){this.disconnectListener=e}async destroy(){const e=ct(this,rt,\"f\");e.providerIdentity,dt(this,it,[],\"f\"),await e.close(),ct(this,at,\"f\").call(this)}async getAllClientInfo(){return this.connections.map((e=>{const{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}=e;return{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}}))}checkForClientConnection(e){if(!this.isClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider.\\n Client Identity: {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}isClientConnected(e){return ut.clientIdentityIncludesEndpointId(e)?this.connections.some((t=>t.endpointId===e.endpointId&&t.uuid===e.uuid&&t.name===e.name)):this.isLegacyClientConnected(e)}isLegacyClientConnected(e){return this.connections.some((t=>t.uuid===e.uuid&&t.name===e.name))}handleMultiRuntimeLegacyClient(e){if(!this.isLegacyClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider. Client Identity:\\n {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}getEndpointIdForOpenFinId(e,t){const n=this.connections.filter((t=>t.name===e.name&&t.uuid===e.uuid));if(n.length>=2){const n=ct(this,rt,\"f\"),{uuid:i,name:r}=e,o=n?.providerIdentity.uuid,s=n?.providerIdentity.name;console.warn(`WARNING: Dispatch call may have unintended results. The \"to\" argument of your dispatch call is missing the\\n \"endpointId\" parameter. The identity you are dispatching to ({uuid: ${i}, name: ${r}})\\n has multiple channelClients for this channel. Your dispatched action: (${t}) from the provider:\\n ({uuid: ${o}, name: ${s}}) will only be processed by the most recently-created client.`)}return n.pop()?.endpointId}static clientIdentityIncludesEndpointId(e){return void 0!==e.endpointId}static clientIsMultiRuntime(e){return void 0!==e.runtimeUuid}static async wireClose(e,t){await e.sendAction(\"destroy-channel\",{channelName:t})}}Qe.ChannelProvider=ut,it=new WeakMap,rt=new WeakMap,ot=new WeakMap,st=new WeakMap,at=new WeakMap,ut.removalMap=new WeakMap;var pt={};Object.defineProperty(pt,\"__esModule\",{value:!0}),pt.MessageReceiver=void 0;const wt=ue,yt=d;class ft extends yt.Base{constructor(e){super(e),this.onmessage=e=>\"process-channel-message\"===e.action&&(this.processChannelMessage(e),!0),this.endpointMap=new Map,this.latestEndpointIdByChannelId=new Map,e.registerMessageHandler(this.onmessage.bind(this))}async processChannelMessage(e){const{senderIdentity:t,providerIdentity:n,action:i,ackToSender:r,payload:o,intendedTargetIdentity:s}=e.payload,a=s.channelId??s.endpointId??this.latestEndpointIdByChannelId.get(n.channelId),c=this.endpointMap.get(a);if(!c)return r.payload.success=!1,r.payload.reason=`Client connection with identity uuid: ${this.wire.me.uuid} / name: ${this.wire.me.name} / endpointId: ${a} no longer connected.`,this.wire.sendRaw(r);try{const e=await c(i,o,t);return r.payload.payload=r.payload.payload||{},r.payload.payload.result=e,this.wire.sendRaw(r)}catch(e){return r.payload.success=!1,r.payload.reason=e.message,this.wire.sendRaw(r)}}addEndpoint(e,t,n){this.endpointMap.set(n,e),t!==n&&this.latestEndpointIdByChannelId.set(t,n)}removeEndpoint(e,t){this.endpointMap.delete(t),this.latestEndpointIdByChannelId.get(e)===t&&this.latestEndpointIdByChannelId.delete(e)}checkForPreviousClientConnection(e){const t=this.latestEndpointIdByChannelId.get(e);t&&(wt.ChannelClient.closeChannelByEndpointId(t),console.warn(\"You have created a second connection to an older provider. First connection has been removed from the clientMap\"),console.warn(\"If the provider calls publish(), you may receive multiple messages.\"))}}pt.MessageReceiver=ft;var gt={};Object.defineProperty(gt,\"__esModule\",{value:!0}),gt.ProtocolManager=void 0;gt.ProtocolManager=class{constructor(e){this.ProtocolsInPreferenceOrder=e,this.DefaultClientProtocols=[\"classic\"],this.DefaultProviderProtocols=[\"classic\"],this.getClientProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultClientProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(\", \")}.`);return t},this.getProviderProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultProviderProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(\", \")}.`);return t},this.getCompatibleProtocols=(e,t)=>t.supportedProtocols.filter((t=>e.some((e=>e.type===t.type&&t.version>=e.minimumVersion&&e.version>=(t.minimumVersion??0))))).slice(0,t.maxProtocols)}};var mt={};Object.defineProperty(mt,\"__esModule\",{value:!0});class vt{static combine(e,t){return new vt(e,t)}constructor(e,t){this.primary=e,this.secondary=t}onEndpointDisconnect(e,t){this.primary.onEndpointDisconnect(e,(()=>{this.secondary.isEndpointConnected(e)||t()})),this.secondary.onEndpointDisconnect(e,(()=>{this.primary.isEndpointConnected(e)||t()}))}isValidEndpointPayload(e){return this.primary.isValidEndpointPayload(e)||this.secondary.isValidEndpointPayload(e)}async closeEndpoint(e){await this.primary.closeEndpoint(e),await this.secondary.closeEndpoint(e)}isEndpointConnected(e){return this.primary.isEndpointConnected(e)||this.secondary.isEndpointConnected(e)}async addEndpoint(e,t){this.primary.isValidEndpointPayload(t)&&await this.primary.addEndpoint(e,t),this.secondary.isValidEndpointPayload(t)&&await this.secondary.addEndpoint(e,t)}receive(e){this.primary.receive(e),this.secondary.receive(e)}send(e,t,n){return this.primary.isEndpointConnected(e)?this.primary.send(e,t,n):this.secondary.send(e,t,n)}async close(){await Promise.all([this.primary.close(),this.secondary.close()])}}mt.default=vt;var Ct,bt,It=s&&s.__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},Et=s&&s.__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)},xt=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(xe,\"__esModule\",{value:!0}),xe.ConnectionManager=void 0;const At=Ae,Pt=d,Mt=Oe,_t=Fe,Ot=Je,St=Qe,Rt=pt,Ft=gt,jt=xt(mt);class kt extends Pt.Base{static getProtocolOptionsFromStrings(e){return e.map((e=>{switch(e){case\"rtc\":return _t.RTCInfo;case\"classic\":return Mt.ClassicInfo;default:return(0,At.exhaustiveCheck)(e,[\"rtc\",\"classic\"])}}))}constructor(e){super(e),Ct.set(this,void 0),bt.set(this,void 0),this.removeChannelFromProviderMap=e=>{this.providerMap.delete(e)},this.onmessage=e=>\"process-channel-connection\"===e.action&&(this.processChannelConnection(e),!0),this.providerMap=new Map,this.protocolManager=new Ft.ProtocolManager(\"node\"===this.wire.environment.type?[\"classic\"]:[\"rtc\",\"classic\"]),It(this,Ct,new Rt.MessageReceiver(e),\"f\"),It(this,bt,new Ot.RTCICEManager(e),\"f\"),e.registerMessageHandler(this.onmessage.bind(this))}createProvider(e,t){const n=Object.assign(this.wire.environment.getDefaultChannelOptions().create,e||{}),i=this.protocolManager.getProviderProtocols(n?.protocols),r=i.map((e=>{switch(e){case\"rtc\":return new _t.RTCStrategy;case\"classic\":return new Mt.ClassicStrategy(this.wire,Et(this,Ct,\"f\"),t.channelId,t);default:return(0,At.exhaustiveCheck)(e,[\"rtc\",\"classic\"])}}));let o;if(2===r.length){const[e,t]=r;o=jt.default.combine(e,t)}else{if(1!==r.length)throw new Error(\"failed to combine strategies\");[o]=r}const s=new St.ChannelProvider(t,(()=>St.ChannelProvider.wireClose(this.wire,t.channelName)),o),a=t.channelId;return this.providerMap.set(a,{provider:s,strategy:o,supportedProtocols:kt.getProtocolOptionsFromStrings(i)}),St.ChannelProvider.setProviderRemoval(s,this.removeChannelFromProviderMap.bind(this)),s}async createClientOffer(e){const t=this.protocolManager.getClientProtocols(e?.protocols);let n;return{offer:{supportedProtocols:await Promise.all(t.map((async e=>{switch(e){case\"rtc\":{const{rtcClient:e,channels:t,offer:i,rtcConnectionId:r,channelsOpened:o}=await Et(this,bt,\"f\").startClientOffer();return n={rtcClient:e,channels:t,channelsOpened:o},{type:\"rtc\",version:_t.RTCInfo.version,payload:{offer:i,rtcConnectionId:r}}}case\"classic\":return{type:\"classic\",version:Mt.ClassicInfo.version};default:return(0,At.exhaustiveCheck)(e,[\"rtc\",\"classic\"])}}))),maxProtocols:2},rtc:n}}async createClientStrategy(e,t){t.endpointId||(t.endpointId=this.wire.environment.getNextMessageId(),Et(this,Ct,\"f\").checkForPreviousClientConnection(t.channelId));const n=t.answer??{supportedProtocols:[{type:\"classic\",version:1}]},i=(await Promise.all(n.supportedProtocols.map((async n=>\"rtc\"===n.type&&e?(await Et(this,bt,\"f\").finishClientOffer(e.rtcClient,n.payload.answer,e.channelsOpened),new _t.RTCStrategy):\"classic\"===n.type?new Mt.ClassicStrategy(this.wire,Et(this,Ct,\"f\"),t.endpointId,t):null)))).filter((e=>null!==e));let r;if(e&&!i.some((e=>e instanceof _t.RTCStrategy))&&e&&e.rtcClient.close(),i.length>=2)r=jt.default.combine(i[0],i[1]);else{if(!i.length)throw new Error(\"No compatible protocols\");[r]=i}const o={endpointIdentity:t,rtc:e};return r.addEndpoint(t.channelId,o),r}async processChannelConnection(e){const{clientIdentity:t,providerIdentity:n,ackToSender:i,payload:r,offer:o}=e.payload;t.endpointId?t.isLocalEndpointId=!1:(t.endpointId=this.wire.environment.getNextMessageId(),t.isLocalEndpointId=!0);const s=n.channelId,a=this.providerMap.get(s);if(!a)return i.payload.success=!1,i.payload.reason=`Channel \"${n.channelName}\" has been destroyed.`,this.wire.sendRaw(i);const{provider:c,strategy:d,supportedProtocols:h}=a;try{if(!(c instanceof St.ChannelProvider))throw Error(\"Cannot connect to a channel client\");const e=o??{supportedProtocols:[{type:\"classic\",version:1}],maxProtocols:1},n=this.protocolManager.getCompatibleProtocols(h,e);if(!n.length)throw new Error(\"This provider does not support any of the offered protocols.\");const s=await c.processConnection(t,r);i.payload.payload=i.payload.payload||{};let a={supportedProtocols:[],endpointPayloadPromise:Promise.resolve({endpointIdentity:t})};return a=await n.reduce((async(e,t)=>{const n=await e;if(\"rtc\"===t.type){const{answer:e,rtcClient:i,channels:r}=await Et(this,bt,\"f\").createProviderAnswer(t.payload.rtcConnectionId,t.payload.offer);n.supportedProtocols.push({type:\"rtc\",version:_t.RTCInfo.version,payload:{answer:e}}),n.endpointPayloadPromise=n.endpointPayloadPromise.then((e=>r.then((t=>({...e,rtc:{rtcClient:i,channels:t}})))))}else n.supportedProtocols.push({type:\"classic\",version:Mt.ClassicInfo.version});return n}),Promise.resolve(a)),a.endpointPayloadPromise.then((e=>d.addEndpoint(t.endpointId,e))),i.payload.payload.result=s,i.payload.payload.answer=a,this.wire.sendRaw(i)}catch(e){return i.payload.success=!1,i.payload.reason=e.message,this.wire.sendRaw(i)}}}xe.ConnectionManager=kt,Ct=new WeakMap,bt=new WeakMap;var Lt,Tt,$t,Bt=s&&s.__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},Gt=s&&s.__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)};Object.defineProperty(le,\"__esModule\",{value:!0}),le.Channel=void 0;const Wt=t,Ht=G,Nt=d,Dt=ue,Ut=xe,Vt=Qe;function zt(e){const t=Math.floor(e/10),n=Math.min(3e4,500*2**t);return new Promise((e=>{setTimeout((()=>{e(!1)}),n)}))}class Kt extends Nt.EmitterBase{constructor(e){super(e,\"channel\"),Lt.set(this,void 0),Tt.set(this,new Wt.EventEmitter),$t.set(this,new Ht.AsyncRetryableLazy((async()=>{await Promise.all([this.on(\"disconnected\",(e=>{Dt.ChannelClient.handleProviderDisconnect(e)})),this.on(\"connected\",((...e)=>{Gt(this,Tt,\"f\").emit(\"connected\",...e)}))]).catch((()=>new Error(\"error setting up channel connection listeners\")))}))),Bt(this,Lt,new Ut.ConnectionManager(e),\"f\")}async getAllChannels(){return this.wire.sendAction(\"get-all-channels\").then((({payload:e})=>e.data))}async onChannelConnect(e){await this.on(\"connected\",e)}async onChannelDisconnect(e){await this.on(\"disconnected\",e)}async safeConnect(e,t,n){const i={count:0};do{let r=()=>{};const o=new Promise((t=>{r=n=>{e===n.channelName&&t(!0)},Gt(this,Tt,\"f\").on(\"connected\",r)}));try{if(i.count>0){i.gotConnectedEvent=await Promise.race([zt(i.count),o]);const t=await this.wire.sendAction(\"connect-to-channel\",{...n,retryInfo:i});return console.log(`Successfully connected to channelName: ${e}`),t.payload.data}const t=this.wire.sendAction(\"connect-to-channel\",n);i.originalMessageId=t.messageId;return(await t).payload.data}catch(n){if(!n.message.includes(\"internal-nack\"))throw n;t&&0===i.count&&console.warn(`No channel found for channelName: ${e}. Waiting for connection...`)}finally{i.count+=1,Gt(this,Tt,\"f\").removeListener(\"connected\",r)}}while(t);throw new Error(`No channel found for channelName: ${e}.`)}async connect(e,t={}){if(await Gt(this,$t,\"f\").getValue(),!e||\"string\"!=typeof e)throw new Error(\"Please provide a channelName string to connect to a channel.\");const n={wait:!0,...this.wire.environment.getDefaultChannelOptions().connect,...t},{offer:i,rtc:r}=await Gt(this,Lt,\"f\").createClientOffer(n);let o;(this.fin.me.isFrame||this.fin.me.isView||this.fin.me.isWindow)&&(o=(await this.fin.me.getInfo()).url);const s={channelName:e,...n,offer:i,connectionUrl:o},a=await this.safeConnect(e,n.wait,s),c=await Gt(this,Lt,\"f\").createClientStrategy(r,a),d=new Dt.ChannelClient(a,(()=>Dt.ChannelClient.wireClose(this.wire,a,a.endpointId)),c);return c.onEndpointDisconnect(a.channelId,(async()=>{try{await d.sendDisconnectAction()}catch(e){console.warn(`Something went wrong during disconnect for client with uuid: ${a.uuid} / name: ${a.name} / endpointId: ${a.endpointId}.`)}finally{Dt.ChannelClient.handleProviderDisconnect(a)}})),d}async create(e,t){if(!e)throw new Error(\"Please provide a channelName to create a channel\");const{payload:{data:n}}=await this.wire.sendAction(\"create-channel\",{channelName:e}),i=Gt(this,Lt,\"f\").createProvider(t,n);return this.on(\"client-disconnected\",(t=>{t.channelName===e&&Vt.ChannelProvider.handleClientDisconnection(i,t)})),i}}le.Channel=Kt,Lt=new WeakMap,Tt=new WeakMap,$t=new WeakMap,Object.defineProperty(de,\"__esModule\",{value:!0}),de.InterAppPayload=de.InterApplicationBus=void 0;const qt=t,Jt=d,Yt=he,Zt=le,Qt=O;class Xt extends Jt.Base{constructor(e){super(e),this.events={subscriberAdded:\"subscriber-added\",subscriberRemoved:\"subscriber-removed\"},this.refCounter=new Yt.RefCounter,this.Channel=new Zt.Channel(e),this.emitter=new qt.EventEmitter,e.registerMessageHandler(this.onmessage.bind(this)),this.on=this.emitter.on.bind(this.emitter),this.removeAllListeners=this.emitter.removeAllListeners.bind(this.emitter)}async publish(e,t){await this.wire.sendAction(\"publish-message\",{topic:e,message:t,sourceWindowName:this.me.name})}async send(e,t,n){const i=(0,Qt.validateIdentity)(e);if(i)throw new Error(i);await this.wire.sendAction(\"send-message\",{destinationUuid:e.uuid,destinationWindowName:e.name,topic:t,message:n,sourceWindowName:this.me.name})}subscribe(e,t,n){const i=this.createSubscriptionKey(e.uuid,e.name||\"*\",t);return this.emitter.on(i,n),this.refCounter.actOnFirst(i,(async()=>{await this.wire.sendAction(\"subscribe\",{sourceUuid:e.uuid,sourceWindowName:e.name||\"*\",topic:t,destinationWindowName:this.me.name})}),(()=>Promise.resolve()))}unsubscribe(e,t,n){const i=e.name||\"*\",r=this.createSubscriptionKey(e.uuid,i,t);return this.emitter.removeListener(r,n),this.refCounter.actOnLast(r,(async()=>{await this.wire.sendAction(\"unsubscribe\",{sourceUuid:e.uuid,sourceWindowName:i,topic:t,destinationWindowName:this.me.name})}),(()=>new Promise((e=>e)).then((()=>{}))))}processMessage(e){const{payload:{message:t,sourceWindowName:n,sourceUuid:i,topic:r}}=e,o=[this.createSubscriptionKey(i,n,r),this.createSubscriptionKey(i,\"*\",r),this.createSubscriptionKey(\"*\",\"*\",r)],s={uuid:i,name:n};o.forEach((e=>{this.emitter.emit(e,t,s)}))}emitSubscriverEvent(e,t){const{payload:{targetName:n,uuid:i,topic:r}}=t,o={name:n,uuid:i,topic:r};this.emitter.emit(e,o)}createSubscriptionKey(e,t,n){const i=t||\"*\";if(!(e&&i&&n))throw new Error(\"Missing uuid, name, or topic string\");return function(...e){return e.map((e=>Buffer.from(`${e}`).toString(\"base64\"))).join(\"/\")}(e,i,n)}onmessage(e){const{action:t}=e;switch(t){case\"process-message\":this.processMessage(e);break;case this.events.subscriberAdded:this.emitSubscriverEvent(this.events.subscriberAdded,e);break;case this.events.subscriberRemoved:this.emitSubscriverEvent(this.events.subscriberRemoved,e)}return!0}}de.InterApplicationBus=Xt;de.InterAppPayload=class{};var en={};Object.defineProperty(en,\"__esModule\",{value:!0}),en.Clipboard=void 0;const tn=d;class nn extends tn.Base{async writeText(e){await this.wire.sendAction(\"clipboard-write-text\",e)}async readText(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-text\",{type:e});return t.data}async writeImage(e){await this.wire.sendAction(\"clipboard-write-image\",e)}async readImage(e={format:\"dataURL\"}){const{payload:t}=await this.wire.sendAction(\"clipboard-read-image\",e);return t.data}async writeHtml(e){await this.wire.sendAction(\"clipboard-write-html\",e)}async readHtml(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-html\",{type:e});return t.data}async writeRtf(e){await this.wire.sendAction(\"clipboard-write-rtf\",e)}async readRtf(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-rtf\",{type:e});return t.data}async write(e){await this.wire.sendAction(\"clipboard-write\",e)}async getAvailableFormats(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-formats\",{type:e});return t.data}}en.Clipboard=nn;var rn={},on={},sn={};Object.defineProperty(sn,\"__esModule\",{value:!0}),sn.ExternalApplication=void 0;const an=d;class cn extends an.EmitterBase{constructor(e,t){super(e,\"external-application\",t.uuid),this.identity=t}getInfo(){return this.wire.sendAction(\"get-external-application-info\",this.identity).then((({payload:e})=>e.data))}}sn.ExternalApplication=cn,Object.defineProperty(on,\"__esModule\",{value:!0}),on.ExternalApplicationModule=void 0;const dn=d,hn=sn;class ln extends dn.Base{wrap(e){return this.wire.sendAction(\"external-application-wrap\").catch((e=>{})),Promise.resolve(new hn.ExternalApplication(this.wire,{uuid:e}))}wrapSync(e){return this.wire.sendAction(\"external-application-wrap-sync\").catch((e=>{})),new hn.ExternalApplication(this.wire,{uuid:e})}}on.ExternalApplicationModule=ln,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(on,e),n(sn,e)}(rn);var un={},pn={},wn={};Object.defineProperty(wn,\"__esModule\",{value:!0}),wn._Frame=void 0;const yn=d;class fn extends yn.EmitterBase{constructor(e,t){super(e,\"frame\",t.uuid,t.name),this.identity=t}getInfo(){return this.wire.sendAction(\"get-frame-info\",this.identity).then((({payload:e})=>e.data))}getParentWindow(){return this.wire.sendAction(\"get-parent-window\",this.identity).then((({payload:e})=>e.data))}}wn._Frame=fn,Object.defineProperty(pn,\"__esModule\",{value:!0}),pn._FrameModule=void 0;const gn=d,mn=O,vn=wn;class Cn extends gn.Base{async wrap(e){this.wire.sendAction(\"frame-wrap\").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}wrapSync(e){this.wire.sendAction(\"frame-wrap-sync\").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}getCurrent(){return this.wire.sendAction(\"frame-get-current\").catch((e=>{})),Promise.resolve(new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity()))}getCurrentSync(){return this.wire.sendAction(\"frame-get-current-sync\").catch((e=>{})),new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity())}}pn._FrameModule=Cn,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(pn,e),n(wn,e)}(un);var bn={};Object.defineProperty(bn,\"__esModule\",{value:!0}),bn.GlobalHotkey=void 0;const In=d;class En extends In.EmitterBase{constructor(e){super(e,\"global-hotkey\")}async register(e,t){await this.on(e,t),await this.wire.sendAction(\"global-hotkey-register\",{hotkey:e})}async unregister(e){await this.removeAllListeners(e),await this.wire.sendAction(\"global-hotkey-unregister\",{hotkey:e})}async unregisterAll(){await Promise.all(this.eventNames().filter((e=>!(\"registered\"===e||\"unregistered\"===e))).map((e=>this.removeAllListeners(e)))),await this.wire.sendAction(\"global-hotkey-unregister-all\",{})}async isRegistered(e){const{payload:{data:t}}=await this.wire.sendAction(\"global-hotkey-is-registered\",{hotkey:e});return t}}bn.GlobalHotkey=En;var xn,An={},Pn={},Mn={},_n=s&&s.__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)};Object.defineProperty(Mn,\"__esModule\",{value:!0}),Mn.Platform=void 0;const On=d,Sn=O,Rn=new Map;class Fn extends On.EmitterBase{constructor(e,t){super(t.wire,\"application\",e.uuid),this.getClient=e=>{this.wire.sendAction(\"platform-get-client\",this.identity).catch((e=>{}));const t=e||this.identity,{uuid:n}=t;if(!Rn.has(n)){const e=_n(this,xn,\"f\").call(this,n);Rn.set(n,e)}return Rn.get(n)},xn.set(this,(async e=>{try{const t=`custom-frame-${e}`,n=await this._channel.connect(t,{wait:!1});return n.onDisconnection((()=>{Rn.delete(e)})),n}catch(t){throw Rn.delete(e),new Error(\"The targeted Platform is not currently running. Listen for application-started event for the given Uuid.\")}})),this.launchLegacyManifest=this.launchContentManifest;const n=(0,Sn.validateIdentity)(e);if(n)throw new Error(n);this._channel=t,this.identity={uuid:e.uuid},this.Layout=this.fin.Platform.Layout,this.Application=this.fin.Application.wrapSync(this.identity)}async createView(e,t,n){this.wire.sendAction(\"platform-create-view\",this.identity).catch((e=>{}));const i=await this.getClient(),r=await i.dispatch(\"create-view\",{target:t,opts:e,targetView:n});if(!r||(0,Sn.validateIdentity)(r.identity))throw new Error(`When overwriting the createView call, please return an object that has a valid 'identity' property: ${JSON.stringify(r)}`);return this.fin.View.wrapSync(r.identity)}async createWindow(e){this.wire.sendAction(\"platform-create-window\",this.identity).catch((e=>{}));const t=await this.getClient();e.reason||(e.reason=\"api-call\");const n=await t.dispatch(\"create-view-container\",e);if(!n||(0,Sn.validateIdentity)(n.identity))throw new Error(`When overwriting the createWindow call, please return an object that has a valid 'identity' property: ${JSON.stringify(n)}`);const{identity:i}=n,r=this.fin.Window.wrapSync(i);return r.name=i.name,r.uuid=i.uuid,r}async quit(){this.wire.sendAction(\"platform-quit\",this.identity).catch((e=>{}));return(await this.getClient()).dispatch(\"quit\")}async closeView(e){this.wire.sendAction(\"platform-close-view\",this.identity).catch((e=>{}));const t=await this.getClient();await t.dispatch(\"close-view\",{view:e})}async reparentView(e,t){console.warn(\"Platform.reparentView has been deprecated, please use Platform.createView\"),this.wire.sendAction(\"platform-reparent-view\",this.identity).catch((e=>{}));const n={...e,uuid:e.uuid??this.identity.uuid},i=await this.fin.View.wrap(n),r=await i.getOptions();return this.createView(r,t)}async getSnapshot(){this.wire.sendAction(\"platform-get-snapshot\",this.identity).catch((e=>{}));return(await this.getClient()).dispatch(\"get-snapshot\")}async getViewSnapshot(e){return(await this.getClient()).dispatch(\"get-view-snapshot\",{viewIdentity:e})}async applySnapshot(e,t){this.wire.sendAction(\"platform-apply-snapshot\",this.identity).catch((e=>{}));const n=\"Requested snapshot must be a valid Snapshot object, or a url or filepath to such an object.\";let i;if(\"string\"==typeof e)try{i=(await this._channel.wire.sendAction(\"get-application-manifest\",{manifestUrl:e})).payload.data}catch(e){throw new Error(`${n}: ${e}`)}else i=e;if(!i.windows)throw new Error(n);const r=await this.getClient();return await r.dispatch(\"apply-snapshot\",{snapshot:i,options:t}),this}async fetchManifest(e){return(await this.getClient()).dispatch(\"platform-fetch-manifest\",{manifestUrl:e})}async launchContentManifest(e){this.wire.sendAction(\"platform-launch-content-manifest\",this.identity).catch((()=>{}));const t=await this.getClient(),n=await this.fetchManifest(e);return t.dispatch(\"launch-into-platform\",{manifest:n,manifestUrl:e}),this}async setWindowContext(e={},t){if(this.wire.sendAction(\"platform-set-window-context\",this.identity).catch((e=>{})),!e)throw new Error(\"Please provide a serializable object or string to set the context.\");const n=await this.getClient(),{entityType:i}=t?await this.fin.System.getEntityInfo(t.uuid,t.name):this.fin.me;await n.dispatch(\"set-window-context\",{context:e,entityType:i,target:t||{uuid:this.fin.me.uuid,name:this.fin.me.name}})}async getWindowContext(e){this.wire.sendAction(\"platform-get-window-context\",this.identity).catch((e=>{}));const t=await this.getClient(),{entityType:n}=e?await this.fin.System.getEntityInfo(e.uuid,e.name):this.fin.me;return t.dispatch(\"get-window-context\",{target:e||{uuid:this.fin.me.uuid,name:this.fin.me.name},entityType:n})}async closeWindow(e,t={skipBeforeUnload:!1}){this.wire.sendAction(\"platform-close-window\",this.identity).catch((e=>{}));return(await this.getClient()).dispatch(\"close-window\",{windowId:e,options:t})}}Mn.Platform=Fn,xn=new WeakMap;var jn={},kn={},Ln={},Tn={};function $n(e){switch(e){case\"columns\":case\"grid\":case\"rows\":case\"tabs\":return!0;default:return!1}}Object.defineProperty(Tn,\"__esModule\",{value:!0}),Tn.overrideFromComposables=Tn.isValidPresetType=void 0,Tn.isValidPresetType=$n,Tn.overrideFromComposables=function(...e){return t=>e.reduceRight(((e,t)=>n=>t(e(n))),(e=>e))(t)},Tn.default={isValidPresetType:$n};var Bn={},Gn={},Wn={};Object.defineProperty(Wn,\"__esModule\",{value:!0}),Wn.ApiConsumer=void 0;Wn.ApiConsumer=class{constructor(e){this.strategy=e,this.consume=async e=>(await this.strategy.getExposedFunctions(e)).reduce(((t,n)=>({...t,[n.key]:this.strategy.createFunction(n,e)})),{})}};var Hn={},Nn={};Object.defineProperty(Nn,\"__esModule\",{value:!0}),Nn.expose=Nn.getExposedProperties=void 0;const Dn=Symbol(\"exposedProperties\");Nn.getExposedProperties=e=>e[Dn]||e.prototype[Dn]||[];Nn.expose=e=>(t,n,i)=>{t[Dn]=t[Dn]||[],t[Dn].push({key:n,descriptor:i,options:e})},Object.defineProperty(Hn,\"__esModule\",{value:!0}),Hn.ApiExposer=void 0;const Un=Nn;Hn.ApiExposer=class{constructor(e){this.strategy=e,this.exposeInstance=async(e,t)=>{const n=(0,Un.getExposedProperties)(e),i=await Promise.all(n.map((async({key:n,options:i})=>({key:n,options:await this.strategy.exposeFunction(e[n].bind(e),{key:n,options:i,meta:t})}))));await this.strategy.exposeMeta(t,i)}}};var Vn={},zn={},Kn={};Object.defineProperty(Kn,\"__esModule\",{value:!0}),Kn.ChannelsConsumer=void 0;Kn.ChannelsConsumer=class{constructor(e){this.channel=e,this.getExposedFunctions=async e=>{const{id:t}=e,{props:n}=await this.channel.dispatch(`api-meta:${t}`);return n},this.createFunction=e=>(...t)=>{const{action:n}=e.options;return this.channel.dispatch(n,{args:t})}}};var qn={};Object.defineProperty(qn,\"__esModule\",{value:!0}),qn.ChannelsExposer=void 0;qn.ChannelsExposer=class{constructor(e){this.channelProviderOrClient=e,this.exposeFunction=async(e,t)=>{const{key:n,options:i,meta:r}=t,{id:o}=r,s=`${o}.${i?.action||n}`;return await this.channelProviderOrClient.register(s,(async({args:t})=>e(...t))),{action:s}},this.exposeMeta=async({id:e},t)=>{const n=`api-meta:${e}`;await this.channelProviderOrClient.register(n,(()=>({props:t})))}}},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Kn,e),n(qn,e)}(zn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(zn,e)}(Vn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Wn,e),n(Hn,e),n(Vn,e),n(Nn,e)}(Gn);var Jn={};Object.defineProperty(Jn,\"__esModule\",{value:!0}),Jn.createRelayedDispatch=exports.relayChannelClientApi_1=Jn.relayChannelClientApi=void 0;const Yn=[\"no longer connected\",\"RTCDataChannel closed unexpectedly\",\"The client you are trying to dispatch from is disconnected from the target provider\"];exports.relayChannelClientApi_1=Jn.relayChannelClientApi=async(e,t)=>{e.register(`relay:${t}`,(({action:t,target:n,payload:i})=>e.dispatch(n,t,i))),await Promise.resolve()};Jn.createRelayedDispatch=(e,t,n,i)=>async(r,o)=>{try{return await e.dispatch(`relay:${n}`,{action:r,payload:o,target:t})}catch(e){if(s=e.message,Yn.some((e=>s.includes(e)))&&i)throw new Error(i);throw e}var s};var Zn,Qn,Xn,ei=s&&s.__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},ti=s&&s.__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)};Object.defineProperty(Bn,\"__esModule\",{value:!0}),Bn.ColumnOrRow=Bn.TabStack=Bn.LayoutNode=void 0;const ni=Gn,ii=Jn;class ri{constructor(e,t){Zn.set(this,void 0),this.isRoot=()=>ti(this,Zn,\"f\").isRoot(this.entityId),this.exists=()=>ti(this,Zn,\"f\").exists(this.entityId),this.getParent=async()=>{const e=await ti(this,Zn,\"f\").getParent(this.entityId);if(e)return ri.getEntity(e,ti(this,Zn,\"f\"))},this.createAdjacentStack=async(e,t)=>{const n=await ti(this,Zn,\"f\").createAdjacentStack(this.entityId,e,t);return ri.getEntity({entityId:n,type:\"stack\"},ti(this,Zn,\"f\"))},this.getAdjacentStacks=async e=>(await ti(this,Zn,\"f\").getAdjacentStacks({targetId:this.entityId,edge:e})).map((e=>ri.getEntity({type:\"stack\",entityId:e.entityId},ti(this,Zn,\"f\")))),ei(this,Zn,e,\"f\"),this.entityId=t}}Bn.LayoutNode=ri,Zn=new WeakMap,ri.newLayoutEntitiesClient=async(e,t,n)=>{const i=(0,ii.createRelayedDispatch)(e,n,\"layout-relay\",\"You are trying to interact with a layout component on a window that does not exist or has been destroyed.\");return new ni.ApiConsumer(new ni.ChannelsConsumer({dispatch:i})).consume({id:t})},ri.getEntity=(e,t)=>{const{entityId:n,type:i}=e;switch(i){case\"column\":case\"row\":return new si(t,n,i);case\"stack\":return new oi(t,n);default:throw new Error(`Unrecognised Layout Entity encountered ('${JSON.stringify(e)})`)}};class oi extends ri{constructor(e,t){super(e,t),Qn.set(this,void 0),this.type=\"stack\",this.getViews=()=>ti(this,Qn,\"f\").getStackViews(this.entityId),this.addView=async(e,t={index:0})=>ti(this,Qn,\"f\").addViewToStack(this.entityId,e,t),this.removeView=async e=>{await ti(this,Qn,\"f\").removeViewFromStack(this.entityId,e)},this.setActiveView=async e=>{await ti(this,Qn,\"f\").setStackActiveView(this.entityId,e)},ei(this,Qn,e,\"f\")}}Bn.TabStack=oi,Qn=new WeakMap;class si extends ri{constructor(e,t,n){super(e,t),Xn.set(this,void 0),this.getContent=async()=>(await ti(this,Xn,\"f\").getContent(this.entityId)).map((e=>ri.getEntity(e,ti(this,Xn,\"f\")))),ei(this,Xn,e,\"f\"),this.type=n}}Bn.ColumnOrRow=si,Xn=new WeakMap;var ai={};Object.defineProperty(ai,\"__esModule\",{value:!0}),ai.DEFAULT_LAYOUT_KEY=ai.LAYOUT_CONTROLLER_ID=void 0,ai.LAYOUT_CONTROLLER_ID=\"layout-entities\",ai.DEFAULT_LAYOUT_KEY=\"__default__\";var ci,di,hi,li=s&&s.__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)};Object.defineProperty(Ln,\"__esModule\",{value:!0}),Ln.Layout=void 0;const ui=G,pi=O,wi=d,yi=Tn,fi=Bn,gi=ai;class mi extends wi.Base{static getClient(e){return li(e,di,\"f\").getValue()}constructor(e,t){super(t),ci.add(this),di.set(this,new ui.Lazy((async()=>fi.LayoutNode.newLayoutEntitiesClient(await this.platform.getClient(),gi.LAYOUT_CONTROLLER_ID,this.identity)))),this.replace=async e=>{this.wire.sendAction(\"layout-replace\").catch((e=>{}));const t=await this.platform.getClient();await t.dispatch(\"replace-layout\",{target:this.identity,opts:{layout:e}})},this.replaceView=async(e,t)=>{this.wire.sendAction(\"layout-replace-view\").catch((e=>{}));const n=await this.platform.getClient();await n.dispatch(\"replace-view\",{target:this.identity,opts:{viewToReplace:e,newView:t}})},this.applyPreset=async e=>{this.wire.sendAction(\"layout-apply-preset\").catch((e=>{}));const t=await this.platform.getClient(),{presetType:n}=e;if(!n||!(0,yi.isValidPresetType)(n))throw new Error(\"Cannot apply preset layout, please include an applicable presetType property in the PresetLayoutOptions.\");await t.dispatch(\"apply-preset-layout\",{target:this.identity,opts:{presetType:n}})};const n=(0,pi.validateIdentity)(e);if(n)throw new Error(n);this.identity=e,this.platform=this.fin.Platform.wrapSync({uuid:e.uuid}),e.uuid===this.fin.me.uuid&&e.name===this.fin.me.name&&(this.init=this.fin.Platform.Layout.init)}async getConfig(){this.wire.sendAction(\"layout-get-config\").catch((e=>{}));return(await this.platform.getClient()).dispatch(\"get-frame-snapshot\",{target:this.identity})}async getCurrentViews(){this.wire.sendAction(\"layout-get-views\").catch((e=>{}));const e=await this.platform.getClient();return(await e.dispatch(\"get-layout-views\",{target:this.identity})).map((e=>this.fin.View.wrapSync(e)))}async getRootItem(){this.wire.sendAction(\"layout-get-root-item\").catch((()=>{}));const e=await li(this,di,\"f\").getValue(),t=await e.getRoot(\"layoutName\"in this.identity?this.identity:void 0);return fi.LayoutNode.getEntity(t,e)}async getStackByViewIdentity(e){this.wire.sendAction(\"layout-get-stack-by-view\").catch((()=>{}));const t=await li(this,di,\"f\").getValue(),n=await t.getStackByView(e);if(!n)throw new Error(`No stack found for view: ${e.uuid}/${e.name}`);return fi.LayoutNode.getEntity(n,t)}async addView(e,{location:t,targetView:n}={}){this.wire.sendAction(\"layout-add-view\").catch((e=>{}));const{identity:i}=await li(this,ci,\"m\",hi).call(this,\"layout-add-view\",{viewOptions:e,location:t,targetView:n});return{identity:i}}async closeView(e){this.wire.sendAction(\"layout-close-view\").catch((e=>{})),await li(this,ci,\"m\",hi).call(this,\"layout-close-view\",{viewIdentity:e})}}Ln.Layout=mi,di=new WeakMap,ci=new WeakSet,hi=async function(e,t){return(await this.platform.getClient()).dispatch(e,{target:this.identity,opts:t})};var vi,Ci,bi,Ii,Ei,xi=s&&s.__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)},Ai=s&&s.__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};Object.defineProperty(kn,\"__esModule\",{value:!0}),kn.LayoutModule=void 0;const Pi=d,Mi=Ln,_i=ai;class Oi extends Pi.Base{constructor(){super(...arguments),vi.add(this),Ci.set(this,!1),bi.set(this,null),this.init=async(e={})=>{if(this.wire.sendAction(\"layout-init\").catch((e=>{})),!this.wire.environment.layoutAllowedInContext(this.fin))throw new Error(\"Layout.init can only be called from a Window context.\");if(xi(this,Ci,\"f\"))throw new Error(\"Layout.init was already called, please use Layout.create to add additional layouts.\");\"openfin\"===this.wire.environment.type&&await this.fin.Platform.getCurrentSync().getClient(),Ai(this,Ci,!0,\"f\"),Ai(this,bi,await this.wire.environment.initLayoutManager(this.fin,this.wire,e),\"f\"),await this.wire.environment.applyLayoutSnapshot(this.fin,xi(this,bi,\"f\"),e);const t={name:this.fin.me.name,uuid:this.fin.me.uuid};if(!e.layoutManagerOverride){const e={layoutName:_i.DEFAULT_LAYOUT_KEY,...t};return xi(this,Ii,\"f\").call(this,e)}return this.wrapSync(t)},Ii.set(this,(e=>{const t=\"[Layout] You are using a deprecated property `layoutManager` - it will throw if you access it starting in v37.\",n=new Proxy({},{get(e,n){throw console.warn(`[Layout-mgr-proxy] accessing ${n.toString()}`),new Error(t)}}),i=Object.assign(this.wrapSync(e),{layoutManager:n});return new Proxy(i,{get(e,n){if(\"layoutManager\"===n)throw console.warn(`[Layout-proxy] accessing ${n.toString()}`),new Error(t);return e[n]}})})),this.getCurrentLayoutManagerSync=()=>xi(this,vi,\"m\",Ei).call(this,\"fin.Platform.Layout.getCurrentLayoutManagerSync()\"),this.create=async e=>this.wire.environment.createLayout(xi(this,vi,\"m\",Ei).call(this,\"fin.Platform.Layout.create()\"),e),this.destroy=async e=>this.wire.environment.destroyLayout(xi(this,vi,\"m\",Ei).call(this,\"fin.Platform.Layout.destroy()\"),e)}async wrap(e){return this.wire.sendAction(\"layout-wrap\").catch((e=>{})),new Mi.Layout(e,this.wire)}wrapSync(e){return this.wire.sendAction(\"layout-wrap-sync\").catch((e=>{})),new Mi.Layout(e,this.wire)}async getCurrent(){if(this.wire.sendAction(\"layout-get-current\").catch((e=>{})),\"openfin\"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error(\"You are not in a Window context. Only Windows can have a Layout.\");const{uuid:e,name:t}=this.fin.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction(\"layout-get-current-sync\").catch((e=>{})),\"openfin\"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error(\"You are not in a Window context. Only Windows can have a Layout.\");const{uuid:e,name:t}=this.fin.me;return this.wrapSync({uuid:e,name:t})}async getLayoutByViewIdentity(e){this.wire.sendAction(\"layout-get-by-view-identity\").catch((()=>{}));let t=await this.wire.environment.getViewWindowIdentity(this.fin,e);t.identity&&(t=t.identity);try{const n=this.wrapSync(t),i=await Mi.Layout.getClient(n),r=await i.getLayoutIdentityForViewOrThrow(e);return this.wrapSync(r)}catch(n){if(![\"No action registered at target for\",\"getLayoutIdentityForViewOrThrow is not a function\"].some((e=>n.message.includes(e))))throw n;if(t.uuid===t.name)throw new Error(`View identity ${JSON.stringify(e)} is not attached to any layout in provider window ${JSON.stringify(t)}.`);return this.wrapSync(t)}}}kn.LayoutModule=Oi,Ci=new WeakMap,bi=new WeakMap,Ii=new WeakMap,vi=new WeakSet,Ei=function(e){if(!xi(this,bi,\"f\"))throw new Error(`You must call init before using the API ${e}`);return xi(this,bi,\"f\")},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(kn,e),n(Ln,e)}(jn),Object.defineProperty(Pn,\"__esModule\",{value:!0}),Pn.PlatformModule=void 0;const Si=d,Ri=Mn,Fi=jn;class ji extends Si.Base{constructor(e,t){super(e),this._channel=t,this.Layout=new Fi.LayoutModule(this.wire)}async init(e){if(!fin.__internal_.isPlatform||fin.me.name!==fin.me.uuid)throw new Error(\"fin.Platform.init should only be called from a custom platform provider running in the main window of the application.\");return this.wire.environment.initPlatform(this.fin,e)}async wrap(e){return this.wire.sendAction(\"platform-wrap\").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}wrapSync(e){return this.wire.sendAction(\"platform-wrap-sync\").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}async getCurrent(){return this.wire.sendAction(\"platform-get-current\").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction(\"platform-get-current-sync\").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}start(e){return this.wire.sendAction(\"platform-start\").catch((e=>{})),new Promise((async(t,n)=>{try{const{uuid:n}=e,i=await this.fin.Application._create({...e,isPlatformController:!0});i.once(\"platform-api-ready\",(()=>t(this.wrapSync({uuid:n})))),i._run({uuid:n})}catch(e){n(e)}}))}startFromManifest(e,t){return this.wire.sendAction(\"platform-start-from-manifest\").catch((e=>{})),new Promise((async(n,i)=>{try{const i=await this.fin.Application._createFromManifest(e);i.once(\"platform-api-ready\",(()=>n(this.wrapSync({uuid:i.identity.uuid})))),i._run(t)}catch(e){i(e)}}))}}Pn.PlatformModule=ji,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Pn,e),n(Mn,e)}(An);var ki={};!function(e){Object.defineProperty(e,\"__esModule\",{value:!0}),e.getMe=e.getBaseMe=e.environmentUnsupportedMessage=void 0;const t=J(),n=un,i=ie(),r=rn;function o(e,t,n){return{...{isView:\"view\"===e,isWindow:\"window\"===e,isFrame:\"iframe\"===e,isExternal:\"external connection\"===e},uuid:t,name:n,entityType:e}}e.environmentUnsupportedMessage=\"You are not running in OpenFin.\",e.getBaseMe=o,e.getMe=function(s){const{uuid:a,name:c,entityType:d}=s.me,h={setContext(){throw new Error(e.environmentUnsupportedMessage)},addContextHandler(){throw new Error(e.environmentUnsupportedMessage)},getContextGroups(){throw new Error(e.environmentUnsupportedMessage)},joinContextGroup(){throw new Error(e.environmentUnsupportedMessage)},removeFromContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getAllClientsInContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getInfoForContextGroup(){throw new Error(e.environmentUnsupportedMessage)}},l=\"Interop API has not been instantiated. Either connection has failed or you have not declared interop in your config.\",u={setContext(){throw new Error(l)},addContextHandler(){throw new Error(l)},getContextGroups(){throw new Error(l)},joinContextGroup(){throw new Error(l)},removeFromContextGroup(){throw new Error(l)},getAllClientsInContextGroup(){throw new Error(l)},getInfoForContextGroup(){throw new Error(l)}},p={eventNames:()=>{throw new Error(e.environmentUnsupportedMessage)},emit:()=>{throw new Error(e.environmentUnsupportedMessage)},listeners:()=>{throw new Error(e.environmentUnsupportedMessage)},listenerCount:()=>{throw new Error(e.environmentUnsupportedMessage)},on:()=>{throw new Error(e.environmentUnsupportedMessage)},addListener:()=>{throw new Error(e.environmentUnsupportedMessage)},once:()=>{throw new Error(e.environmentUnsupportedMessage)},prependListener:()=>{throw new Error(e.environmentUnsupportedMessage)},prependOnceListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeAllListeners:()=>{throw new Error(e.environmentUnsupportedMessage)}};switch(d){case\"view\":return Object.assign(new t.View(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case\"window\":return Object.assign(new i._Window(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case\"iframe\":return Object.assign(new n._Frame(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case\"external connection\":return Object.assign(new r.ExternalApplication(s,{uuid:a}),o(d,a,c),{interop:u,isOpenFin:!1});default:return{...o(d,a,c),...p,interop:h,isOpenFin:!1}}}}(ki);var Li={},Ti={},$i={};Object.defineProperty($i,\"__esModule\",{value:!0}),$i.createWarningObject=$i.createUnusableObject=void 0,$i.createUnusableObject=function(e){const t=()=>{throw new Error(e)};return new Proxy({},{apply:t,construct:t,defineProperty:t,deleteProperty:t,get:t,getOwnPropertyDescriptor:t,getPrototypeOf:t,has:t,isExtensible:t,ownKeys:t,preventExtensions:t,set:t,setPrototypeOf:t})},$i.createWarningObject=function(e,t){return new Proxy(t,{get:(...t)=>(console.warn(e),Reflect.get(...t)),set:(...t)=>(console.warn(e),Reflect.set(...t)),getOwnPropertyDescriptor:(...t)=>(console.warn(e),Reflect.getOwnPropertyDescriptor(...t)),ownKeys:(...t)=>(console.warn(e),Reflect.ownKeys(...t))})};var Bi,Gi={},Wi={};var Hi={};!function(e){Object.defineProperty(e,\"__esModule\",{value:!0}),e.wrapIntentHandler=e.BROKER_ERRORS=e.generateOverrideWarning=e.generateOverrideError=e.wrapContextHandler=e.wrapInTryCatch=e.generateId=void 0;e.generateId=()=>`${Math.random()}${Date.now()}`;e.wrapInTryCatch=(e,t)=>(...n)=>{try{return e(...n)}catch(e){throw new Error((t||\"\")+e)}};e.wrapContextHandler=(e,t)=>async n=>{try{await e(n)}catch(e){throw console.error(`Error thrown by handler ${t} for context type ${n.type}: ${e}`),e}};e.generateOverrideError=(e,t)=>`You have tried to to use ${e} but ${t} has not been overridden in the Interop Broker. Please override this function. Refer to our documentation for more info.`;e.generateOverrideWarning=(e,t,n,i)=>{const{uuid:r,name:o}=n;return i?`Entity with identity: ${r}/${o} has called ${i} or ${e} but ${t} has not been overridden.`:`Entity with identity: ${r}/${o} has called ${e} but ${t} has not been overridden.`},e.BROKER_ERRORS={fireIntent:(0,e.generateOverrideError)(\"fireIntent\",\"handleFiredIntent\"),fireIntentForContext:(0,e.generateOverrideError)(\"fireIntentForContext\",\"handleFiredIntentForContext\"),getInfoForIntent:(0,e.generateOverrideError)(\"getInfoForIntent\",\"handleInfoForIntent\"),getInfoForIntentsByContext:(0,e.generateOverrideError)(\"getInfoForIntentsByContext\",\"handleInfoForIntentsByContext\"),joinSessionContextGroupWithJoinContextGroup:\"The Context Group you have tried to join is a Session Context Group. Custom Context Groups can only be defined by the Interop Broker through code or manifest configuration. Please use joinSessionContextGroup.\",fdc3Open:(0,e.generateOverrideError)(\"fdc3.open\",\"fdc3HandleOpen\"),fdc3FindInstances:(0,e.generateOverrideError)(\"fdc3.findInstances\",\"fdc3HandleFindInstances\"),fdc3GetAppMetadata:(0,e.generateOverrideError)(\"fdc3.getAppMetadata\",\"fdc3HandleGetAppMetadata\"),fdc3GetInfo:(0,e.generateOverrideError)(\"fdc3.getInfo\",\"fdc3HandleGetInfo\")};e.wrapIntentHandler=(e,t)=>async n=>{try{return e(n)}catch(e){throw console.error(`Error thrown by handler ${t}: ${e}`),e}}}(Hi);var Ni,Di,Ui={};function Vi(){if(Di)return Gi;Di=1;var e,t,n,r=s&&s.__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},o=s&&s.__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)},a=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Gi,\"__esModule\",{value:!0}),Gi.InteropBroker=void 0;const c=d,h=a(function(){if(Bi)return Wi;Bi=1,Object.defineProperty(Wi,\"__esModule\",{value:!0});const e=Cr();return Wi.default=class{constructor(e,t){this.provider=e,this.id=t,this.lastContext=void 0,this.contextGroupMap=new Map,this.clients=new Map,this.registerListeners()}registerListeners(){this.provider.register(`sessionContextGroup:getContext-${this.id}`,this.getCurrentContext.bind(this)),this.provider.register(`sessionContextGroup:setContext-${this.id}`,this.setContext.bind(this)),this.provider.register(`sessionContextGroup:handlerAdded-${this.id}`,this.handlerAdded.bind(this)),this.provider.register(`sessionContextGroup:handlerRemoved-${this.id}`,this.handlerRemoved.bind(this))}getCurrentContext(e){return e.type?this.contextGroupMap.get(e.type):this.lastContext}setContext(t,n){const{context:i}=t,r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name} not in Session Client State Map`);this.contextGroupMap.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{e.contextHandlers.get(i.type)?.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getClientState(e){return this.clients.get(e.endpointId)}async handlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(i){const e=r.contextHandlers.get(i)||[];r.contextHandlers.set(i,[...e,n]);const o=this.contextGroupMap.get(i);o&&await this.provider.dispatch(t,n,o)}else{r.globalHandler=n;const e=[...this.contextGroupMap.keys()].map((async e=>{const i=this.contextGroupMap.get(e);i&&await this.provider.dispatch(t,n,i)}));await Promise.all(e)}}handlerRemoved(e,t){const{handlerId:n}=e,i=this.clients.get(t.endpointId);i?(Array.from(i.contextHandlers).forEach((([,e])=>{const t=e.indexOf(n);t>-1&&e.splice(t,1)})),i.globalHandler===n&&(i.globalHandler=void 0)):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={contextHandlers:new Map,clientIdentity:e,globalHandler:void 0};this.clients.set(e.endpointId,t)}}onDisconnection(e){this.clients.delete(e.endpointId)}},Wi}()),l=Hi,u=a(i),p=function(){if(Ni)return Ui;Ni=1,Object.defineProperty(Ui,\"__esModule\",{value:!0}),Ui.PrivateChannelProvider=void 0;const e=Vi();return Ui.PrivateChannelProvider=class t{constructor(e,t){this.provider=e,this.id=t,this.clients=new Map,this.registerListeners(),this.contextByContextType=new Map,this.lastContext=void 0,this.provider.onConnection((e=>this.registerNewClient(e))),this.provider.onDisconnection((async e=>{const{endpointId:t}=e;this.clients.has(t)&&await this.handleClientDisconnecting(e),0===(await this.provider.getAllClientInfo()).length&&this.provider.destroy()}))}getClientState(e){return this.clients.get(e.endpointId)}registerListeners(){this.provider.register(\"broadcast\",this.broadcast.bind(this)),this.provider.register(\"getCurrentContext\",this.getCurrentContext.bind(this)),this.provider.register(\"contextHandlerAdded\",this.contextHandlerAdded.bind(this)),this.provider.register(\"contextHandlerRemoved\",this.contextHandlerRemoved.bind(this)),this.provider.register(\"nonStandardHandlerRemoved\",this.nonStandardHandlerRemoved.bind(this)),this.provider.register(\"onAddContextHandlerAdded\",this.onAddContextHandlerAdded.bind(this)),this.provider.register(\"onDisconnectHandlerAdded\",this.onDisconnectHandlerAdded.bind(this)),this.provider.register(\"onUnsubscribeHandlerAdded\",this.onUnsubscribeHandlerAdded.bind(this)),this.provider.register(\"clientDisconnecting\",((e,t)=>{this.handleClientDisconnecting(t)}))}broadcast(t,n){const{context:i}=t;if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name}, tried to call broadcast, is not connected to this Private Channel`);const r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to broadcast - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);this.contextByContextType.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{const t=e.handlerIdsByContextTypes.get(i.type);t&&t.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getCurrentContext(e,t){const{contextType:n}=e;if(!this.getClientState(t))throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call getCurrentContext, is not connected to this Private Channel`);if(void 0!==n){return this.contextByContextType.get(n)||null}return this.lastContext?this.lastContext:null}contextHandlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call addContextListener, is not connected to this Private Channel`);if(i){const e=r.handlerIdsByContextTypes.get(i)||[];r.handlerIdsByContextTypes.set(i,[...e,n])}else r.globalHandler=n;Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&e.onAddContextListenerHandlerId&&this.provider.dispatch(e.clientIdentity,e.onAddContextListenerHandlerId,i)}))}async contextHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);if(i){let e;if(i.globalHandler===n)i.globalHandler=void 0;else for(const[t,r]of i.handlerIdsByContextTypes){const i=r.indexOf(n);i>-1&&(r.splice(i,1),e=t)}const r=(await this.getConnectedClients()).map((async n=>{const{clientIdentity:i,clientIdentity:{endpointId:r},onUnsubscribeHandlerId:o}=n;r!==t.endpointId&&o&&await this.provider.dispatch(i,o,e)}));try{await Promise.all(r)}catch(e){throw console.error(`Problem when attempting to dispatch to onUnsubscribeHandlers. Error: ${e} Removing Client: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}`),new Error(e)}}else console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}.`)}nonStandardHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);i?i.onDisconnectHandlerId===n?i.onDisconnectHandlerId=void 0:i.onAddContextListenerHandlerId===n?i.onAddContextListenerHandlerId=void 0:i.onUnsubscribeHandlerId===n&&(i.onUnsubscribeHandlerId=void 0):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}onAddContextHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onAddContextListener, is not connected to this Private Channel`);n.onAddContextListenerHandlerId=i,Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&Array.from(e.handlerIdsByContextTypes.keys()).forEach((e=>{this.provider.dispatch(t,i,e)}))}))}onDisconnectHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onDisconnect, is not connected to this Private Channel`);n.onDisconnectHandlerId=i}onUnsubscribeHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onUnsubscribe, is not connected to this Private Channel`);n.onUnsubscribeHandlerId=i}removeClient(e){const t=this.getClientState(e);if(!t)throw new Error(`Client with Identity: ${e.uuid} ${e.name}, tried to call disconnect, is not connected to this Private Channel`);t.handlerIdsByContextTypes.clear(),this.clients.delete(e.endpointId)}async fireOnDisconnectForOtherClients(e){const{endpointId:t}=e,n=(await this.getConnectedClients()).map((async e=>{const{clientIdentity:{endpointId:n},onDisconnectHandlerId:i}=e;n!==t&&i&&await this.provider.dispatch(e.clientIdentity,i)}));try{await Promise.all(n)}catch(t){throw console.error(`Problem when attempting to dispatch to onDisconnectHandlers. Error: ${t} Disconnecting Client: uuid: ${e.uuid}. name: ${e.name}. endpointId: ${e.endpointId}`),new Error(t)}}async unsubscribeAll(e){const{endpointId:t}=e,n=this.clients.get(t);if(n){const t=Array.from(n.handlerIdsByContextTypes.values()).flat(),i=n.globalHandler;if(t.length>0){const n=t.map((async t=>this.contextHandlerRemoved({handlerId:t},e)));try{await Promise.all(n)}catch(e){console.error(e.message)}}if(i)try{await this.contextHandlerRemoved({handlerId:i},e)}catch(e){console.error(e.message)}}}async handleClientDisconnecting(e){await this.unsubscribeAll(e),this.removeClient(e),await this.fireOnDisconnectForOtherClients(e)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={clientIdentity:e,handlerIdsByContextTypes:new Map,globalHandler:void 0,onAddContextListenerHandlerId:void 0,onUnsubscribeHandlerId:void 0,onDisconnectHandlerId:void 0};this.clients.set(e.endpointId,t)}}async getConnectedClients(){const e=await this.provider.getAllClientInfo();return Array.from(this.clients.values()).filter((t=>{const{uuid:n,name:i}=t.clientIdentity;return e.some((e=>i===e.name&&n===e.uuid))}))}static init(e,n){return new t(e,n)}},Ui}(),w=G,y=[{id:\"green\",displayMetadata:{color:\"#00CC88\",name:\"green\"}},{id:\"purple\",displayMetadata:{color:\"#8C61FF\",name:\"purple\"}},{id:\"orange\",displayMetadata:{color:\"#FF8C4C\",name:\"orange\"}},{id:\"red\",displayMetadata:{color:\"#FF5E60\",name:\"red\"}},{id:\"pink\",displayMetadata:{color:\"#FF8FB8\",name:\"pink\"}},{id:\"yellow\",displayMetadata:{color:\"#E9FF8F\",name:\"yellow\"}}];let f=class i extends c.Base{constructor(i,s,a){super(i),e.set(this,void 0),t.set(this,void 0),n.set(this,void 0),this.getProvider=()=>o(this,n,\"f\").getValue(),this.interopClients=new Map,this.contextGroupsById=new Map,r(this,t,a.contextGroups??[...y],\"f\"),r(this,e,a.fdc3Info,\"f\"),a?.logging&&(this.logging=a.logging),this.intentClientMap=new Map,this.lastContextMap=new Map,this.sessionContextGroupMap=new Map,r(this,n,new w.Lazy(s),\"f\"),this.setContextGroupMap(),this.setupChannelProvider()}static createClosedConstructor(...e){return class extends i{constructor(...t){if(t.length){const[n,i,r]=t;if(r&&\"object\"==typeof r&&!(0,u.default)(r,e[2]))return console.warn(\"You have modified the parameters of the InteropOverride constructor. This behavior is deprecated and will be removed in a future version. You can modify these options in your manifest. Please consult our Interop docs for guidance on migrating to the new override scheme.\"),void super(e[0],e[1],r);console.warn(\"You are attempting to pass arguments to the InteropOverride constructor. This is not necessary, and these passed arguments will be ignored. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.\")}super(...e)}}}setContext({context:e},t){this.wire.sendAction(\"interop-broker-set-context\").catch((e=>{}));const n=this.getClientState(t);if(!n||!n.contextGroupId)throw n?new Error(\"You must join a context group before you can set context.\"):new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);{const{contextGroupId:t}=n;this.setContextForGroup({context:e},t)}}setContextForGroup({context:e},t){this.wire.sendAction(\"interop-broker-set-context-for-group\").catch((e=>{}));const n=this.contextGroupsById.get(t);if(!n)throw new Error(`Unable to set context for context group that isn't in the context group mapping: ${t}.`);const r=i.checkContextIntegrity(e);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(e)}`);const o=e.type;n.set(o,e),this.lastContextMap.set(t,o);Array.from(this.interopClients.values()).filter((e=>e.contextGroupId===t)).forEach((t=>{for(const[,n]of t.contextHandlers)i.isContextTypeCompatible(o,n.contextType)&&this.invokeContextHandler(t.clientIdentity,n.handlerId,e)}))}getCurrentContext(e,t){this.wire.sendAction(\"interop-broker-get-current-context\").catch((e=>{}));const n=this.getClientState(t);if(!n?.contextGroupId)throw new Error(\"You must be a member of a context group to call getCurrentContext\");const{contextGroupId:i}=n,r=this.contextGroupsById.get(i),o=this.lastContextMap.get(i),s=e?.contextType??o;return r&&s?r.get(s):void 0}async joinContextGroup({contextGroupId:e,target:t},n){if(this.wire.sendAction(\"interop-broker-join-context-group\").catch((e=>{})),this.sessionContextGroupMap.has(e))throw new Error(l.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup);if(t){i.hasEndpointId(t)&&await this.addClientToContextGroup({contextGroupId:e},t);try{const n=this.channel.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name));if(!n.length)throw new Error(`Given Identity ${t.uuid} ${t.name} is not connected to the Interop Broker.`);n.length>1&&console.warn(`More than one connection found for identity ${t.uuid} ${t.name}`);const i=[];for(const t of n)i.push(this.addClientToContextGroup({contextGroupId:e},t));await Promise.all(i)}catch(e){throw new Error(e)}}else await this.addClientToContextGroup({contextGroupId:e},n)}async addClientToContextGroup({contextGroupId:e},t){this.wire.sendAction(\"interop-broker-add-client-to-context-group\").catch((e=>{}));const n=this.getClientState(t);if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(!this.getContextGroups().find((t=>t.id===e)))throw new Error(`Attempting to join a context group that does not exist: ${e}. You may only join existing context groups.`);if(n.contextGroupId!==e){n.contextGroupId=e,await this.setCurrentContextGroupInClientOptions(t,e);const i=this.contextGroupsById.get(e);for(const[,e]of n.contextHandlers){const{contextType:n,handlerId:r}=e;if(void 0===n)i.forEach(((e,n)=>{this.invokeContextHandler(t,r,e)}));else if(i.has(n)){const e=i.get(n);e&&this.invokeContextHandler(t,r,e)}}}}async removeFromContextGroup({target:e},t){if(this.wire.sendAction(\"interop-broker-remove-from-context-group\").catch((e=>{})),e){i.hasEndpointId(e)&&await this.removeClientFromContextGroup(e);try{const t=this.channel.connections.filter((t=>t.uuid===e.uuid&&t.name===e.name));if(!t.length)throw new Error(`No connection found for given Identity ${e.uuid} ${e.name}`);t.length>1&&console.warn(`More than one connection found for identity ${e.uuid} ${e.name}`);const n=[];for(const e of t)n.push(this.removeClientFromContextGroup(e));await Promise.all(n)}catch(e){throw new Error(e)}}else await this.removeClientFromContextGroup(t)}async removeClientFromContextGroup(e){this.wire.sendAction(\"interop-broker-remove-client-from-context-group\").catch((e=>{}));const t=this.getClientState(e);t&&(t.contextGroupId=void 0),await this.setCurrentContextGroupInClientOptions(e,null)}getContextGroups(){return this.wire.sendAction(\"interop-broker-get-context-groups\").catch((e=>{})),o(this,t,\"f\").map((e=>({...e})))}getInfoForContextGroup({contextGroupId:e}){return this.wire.sendAction(\"interop-broker-get-info-for-context-group\").catch((e=>{})),this.getContextGroups().find((t=>t.id===e))}getAllClientsInContextGroup({contextGroupId:e}){this.wire.sendAction(\"interop-broker-get-all-clients-in-context-group\").catch((e=>{}));return Array.from(this.interopClients.values()).filter((t=>t.contextGroupId===e)).map((e=>e.clientIdentity))}async handleFiredIntent(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.raiseIntent\",\"InteropBroker.handleFiredIntent\",t,\"interopClient.fireIntent\");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntent)}async setIntentTarget(e,t){this.wire.sendAction(\"interop-broker-set-intent-target\").catch((e=>{}));const n=this.intentClientMap.get(t.name),i=`intent-handler-${e.name}`;if(n){const t=n.get(i);if(t){if(t.pendingIntents.push(e),t.clientIdentity&&t.isReady){const{clientIdentity:e,pendingIntents:n}=t;try{const r=n[n.length-1];await this.invokeIntentHandler(e,i,r),t.pendingIntents=[]}catch(n){console.error(`Error invoking intent handler for client ${e.uuid}/${e.name}/${e.endpointId}`),t.isReady=!1}}}else n.set(i,{isReady:!1,pendingIntents:[e]})}else{this.intentClientMap.set(t.name,new Map);const n=this.intentClientMap.get(t.name);n&&n.set(i,{isReady:!1,pendingIntents:[e]})}}async handleInfoForIntent(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.findIntent\",\"InteropBroker.handleInfoForIntent\",t,\"interopClient.getInfoForIntent\");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntent)}async handleInfoForIntentsByContext(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.findIntentsByContext\",\"InteropBroker.handleInfoForIntentsByContext\",t,\"interopClient.getInfoForIntentsByContext\");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntentsByContext)}async handleFiredIntentForContext(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.raiseIntentForContext\",\"InteropBroker.handleFiredIntentForContext\",t,\"interopClient.fireIntentForContext\");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntentForContext)}async clientDisconnected(e){}async fdc3HandleOpen({app:e,context:t},n){const i=(0,l.generateOverrideWarning)(\"fdc3.open\",\"InteropBroker.fdc3HandleOpen\",n);throw console.warn(i),new Error(l.BROKER_ERRORS.fdc3Open)}async fdc3HandleFindInstances(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.open\",\"InteropBroker.fdc3HandleFindInstances\",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3FindInstances)}async fdc3HandleGetAppMetadata(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.getAppMetadata\",\"InteropBroker.fdc3HandleGetAppMetadata\",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3GetAppMetadata)}async invokeContextHandler(e,t,n){const i=await this.getProvider();try{await i.dispatch(e,t,n)}catch(i){console.error(`Error invoking context handler ${t} for context type ${n.type} in client ${e.uuid}/${e.name}/${e.endpointId}`,i)}}async invokeIntentHandler(e,t,n){const i=await this.getProvider();await i.dispatch(e,t,n)}async fdc3HandleGetInfo(t,n){const{fdc3Version:i}=t;return{fdc3Version:i,...o(this,e,\"f\"),optionalFeatures:{OriginatingAppMetadata:!1,UserChannelMembershipAPIs:!0},appMetadata:{appId:\"\",instanceId:\"\"}}}async getAllClientInfo(){return(await this.getProvider()).getAllClientInfo()}decorateSnapshot(e){return{...e,interopSnapshotDetails:{contextGroupStates:this.getContextGroupStates()}}}applySnapshot(e,t){const n=e?.interopSnapshotDetails?.contextGroupStates;n&&(t?.closeExistingWindows||this.updateExistingClients(n),this.rehydrateContextGroupStates(n))}updateExistingClients(e){this.interopClients.forEach((t=>{const{clientIdentity:n,contextGroupId:r,contextHandlers:o}=t;if(r){const t=e[r];for(const[,e]of Object.entries(t))o.forEach((t=>{const{handlerId:r,contextType:o}=t;i.isContextTypeCompatible(e.type,o)&&this.invokeContextHandler(n,r,e)}))}}))}getContextGroupStates(){return i.toObject(this.contextGroupsById)}rehydrateContextGroupStates(e){const t=Object.entries(e);for(const[e,n]of t){const t=Object.entries(n);for(const[n,i]of t)if(this.contextGroupsById.has(e)){this.contextGroupsById.get(e).set(n,i)}else console.warn(`Attempting to set a context group that isn't in the context group mapping. Skipping context group rehydration for: ${e}`)}}contextHandlerRegistered({contextType:e,handlerId:t},n){const i={contextType:e,handlerId:t},r=this.getClientState(n);if(r?.contextHandlers.set(t,i),r&&r.contextGroupId){const{contextGroupId:i}=r,o=this.contextGroupsById.get(i);if(void 0===e)o.forEach(((e,i)=>{this.invokeContextHandler(n,t,e)}));else if(o.has(e)){const i=o.get(e);i&&this.invokeContextHandler(n,t,i)}}}async intentHandlerRegistered(e,t){const{handlerId:n}=e,i=this.intentClientMap.get(t.name),r=i?.get(n);if(i)if(r){const{pendingIntents:e}=r;r.clientIdentity=t,r.isReady=!0;try{if(e.length>0){const i=e[e.length-1];await this.invokeIntentHandler(t,n,i),r.pendingIntents=[]}}catch(e){console.error(`Error invoking intent handler: ${n} for client ${t.uuid}/${t.name}/${t.endpointId}`)}}else i.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t});else{this.intentClientMap.set(t.name,new Map);const e=this.intentClientMap.get(t.name);e&&e.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t})}}removeContextHandler({handlerId:e},t){const n=this.getClientState(t);n&&n.contextHandlers.delete(e)}handleJoinSessionContextGroup({sessionContextGroupId:e},t){try{if(!e)throw new Error(\"Failed to join session context group: must specify group id.\");const n=this.sessionContextGroupMap.get(e);if(n)n.registerNewClient(t);else{const n=new h.default(this.channel,e);n.registerNewClient(t),this.sessionContextGroupMap.set(e,n)}return{hasConflict:this.contextGroupsById.has(e)}}catch(e){throw new Error(e)}}getClientState(e){return this.interopClients.get(e.endpointId)}static toObject(e){const t=Object.fromEntries(e),n={};return Object.entries(t).forEach((([e,t])=>{const i=Object.fromEntries(t);n[e]=i})),n}static checkContextIntegrity(e){if(!e)return{isValid:!1,reason:\"No context supplied\"};if(\"object\"!=typeof e)return{isValid:!1,reason:\"Context must be an Object\"};if(!e.type)return{isValid:!1,reason:\"Context must have a type property\"};if(e.id&&\"object\"!=typeof e.id)return{isValid:!1,reason:\"Context id must be an Object populated with key-value identifiers (if set)\"};if(e.id){const{id:t}=e,n=Object.keys(t);let i=!1;if(!n.length)return{isValid:!1,reason:\"Context id must have at least one key-value identifier\"};if(n.forEach((e=>{\"string\"==typeof e&&\"string\"==typeof t[e]||(i=!0)})),i)return{isValid:!1,reason:\"Context id key-value identifiers must be of type string\"}}return e.name&&\"string\"!=typeof e.name?{isValid:!1,reason:\"Context name must be of string type (if set)\"}:{isValid:!0}}static hasEndpointId(e){return void 0!==e.endpointId}static isContextTypeCompatible(e,t){return void 0===t||e===t}setContextGroupMap(){for(const e of this.getContextGroups())this.contextGroupsById.set(e.id,new Map)}async setCurrentContextGroupInClientOptions(e,t){try{const n=await this.fin.System.getEntityInfo(e.uuid,e.name);let i;\"view\"===n.entityType?i=await this.fin.View.wrap(e):\"window\"===n.entityType&&(i=await this.fin.Window.wrap(e)),i&&await i.updateOptions({interop:{currentContextGroup:t}})}catch(e){}}async setupChannelProvider(){try{const e=await this.getProvider();this.channel=e,this.wireChannel(e)}catch(e){throw new Error(`Error setting up Interop Broker Channel Provider: ${e}`)}}wireChannel(e){e.onConnection((async(e,t)=>{if(!await this.isConnectionAuthorized(e,t))throw new Error(`Connection not authorized for ${e.uuid}, ${e.name}`);if(!e.endpointId)throw new Error(\"Version too old to be compatible with Interop. Please upgrade your runtime to a more recent version.\");const n={contextGroupId:void 0,contextHandlers:new Map,clientIdentity:e};t?.currentContextGroup&&this.contextGroupsById.has(t.currentContextGroup)&&(n.contextGroupId=t?.currentContextGroup),this.interopClients.set(e.endpointId,n)})),e.onDisconnection((e=>{this.interopClients.delete(e.endpointId);const t=this.intentClientMap.get(e.name);t&&e.uuid===this.fin.me.uuid&&t.forEach((e=>{e.isReady=!1})),this.sessionContextGroupMap.forEach((t=>{t.onDisconnection(e)})),this.clientDisconnected(e)})),e.beforeAction((async(e,t,n)=>{if(!await this.isActionAuthorized(e,t,n))throw new Error(`Action (${e}) not authorized for ${n.uuid}, ${n.name}`);this.logging?.beforeAction?.enabled&&console.log(e,t,n)})),e.afterAction(((e,t,n)=>{this.logging?.afterAction?.enabled&&console.log(e,t,n)})),e.register(\"setContext\",this.setContext.bind(this)),e.register(\"fireIntent\",this.handleFiredIntent.bind(this)),e.register(\"getCurrentContext\",this.getCurrentContext.bind(this)),e.register(\"getInfoForIntent\",this.handleInfoForIntent.bind(this)),e.register(\"getInfoForIntentsByContext\",this.handleInfoForIntentsByContext.bind(this)),e.register(\"fireIntentForContext\",this.handleFiredIntentForContext.bind(this)),e.register(\"getContextGroups\",this.getContextGroups.bind(this)),e.register(\"joinContextGroup\",this.joinContextGroup.bind(this)),e.register(\"removeFromContextGroup\",this.removeFromContextGroup.bind(this)),e.register(\"getAllClientsInContextGroup\",this.getAllClientsInContextGroup.bind(this)),e.register(\"getInfoForContextGroup\",this.getInfoForContextGroup.bind(this)),e.register(\"contextHandlerRegistered\",this.contextHandlerRegistered.bind(this)),e.register(\"intentHandlerRegistered\",this.intentHandlerRegistered.bind(this)),e.register(\"removeContextHandler\",this.removeContextHandler.bind(this)),e.register(\"sessionContextGroup:createIfNeeded\",this.handleJoinSessionContextGroup.bind(this)),e.register(\"fdc3Open\",this.fdc3HandleOpen.bind(this)),e.register(\"fdc3v2FindIntentsByContext\",this.handleInfoForIntentsByContext.bind(this)),e.register(\"fdc3FindInstances\",this.fdc3HandleFindInstances.bind(this)),e.register(\"fdc3GetAppMetadata\",this.fdc3HandleGetAppMetadata.bind(this)),e.register(\"fdc3v2GetInfo\",(async(e,t)=>this.fdc3HandleGetInfo.bind(this)(e,t))),e.register(\"createPrivateChannelProvider\",(async e=>{const{channelId:t}=e,n=await this.fin.InterApplicationBus.Channel.create(t);p.PrivateChannelProvider.init(n,t)}))}isConnectionAuthorized(e,t){return this.wire.sendAction(\"interop-broker-is-connection-authorized\").catch((e=>{})),Promise.resolve(!0)}isActionAuthorized(e,t,n){return this.wire.sendAction(\"interop-broker-is-action-authorized\").catch((e=>{})),Promise.resolve(!0)}};return Gi.InteropBroker=f,e=new WeakMap,t=new WeakMap,n=new WeakMap,Gi}var zi,Ki={},qi={},Ji=s&&s.__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},Yi=s&&s.__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)};Object.defineProperty(qi,\"__esModule\",{value:!0});const Zi=d,Qi=Hi;class Xi extends Zi.Base{constructor(e,t,n){super(e),zi.set(this,void 0),this.id=n,Ji(this,zi,t,\"f\")}async setContext(e){this.wire.sendAction(\"interop-session-context-group-set-context\").catch((e=>{}));return(await Yi(this,zi,\"f\")).dispatch(`sessionContextGroup:setContext-${this.id}`,{sessionContextGroupId:this.id,context:e})}async getCurrentContext(e){this.wire.sendAction(\"interop-session-context-group-get-context\").catch((e=>{}));return(await Yi(this,zi,\"f\")).dispatch(`sessionContextGroup:getContext-${this.id}`,{sessionContextGroupId:this.id,type:e})}async addContextHandler(e,t){if(this.wire.sendAction(\"interop-session-context-group-add-handler\").catch((e=>{})),\"function\"!=typeof e)throw new Error(\"Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.\");const n=await Yi(this,zi,\"f\");let i;return i=t?`sessionContextHandler:invoke-${this.id}-${t}-${(0,Qi.generateId)()}`:`sessionContextHandler:invoke-${this.id}`,n.register(i,(0,Qi.wrapContextHandler)(e,i)),await n.dispatch(`sessionContextGroup:handlerAdded-${this.id}`,{handlerId:i,contextType:t}),{unsubscribe:await this.createUnsubscribeCb(i)}}async createUnsubscribeCb(e){const t=await Yi(this,zi,\"f\");return async()=>{t.remove(e),await t.dispatch(`sessionContextGroup:handlerRemoved-${this.id}`,{handlerId:e})}}getUserInstance(){return{id:this.id,setContext:(0,Qi.wrapInTryCatch)(this.setContext.bind(this),\"Failed to set context: \"),getCurrentContext:(0,Qi.wrapInTryCatch)(this.getCurrentContext.bind(this),\"Failed to get context: \"),addContextHandler:(0,Qi.wrapInTryCatch)(this.addContextHandler.bind(this),\"Failed to add context handler: \")}}}qi.default=Xi,zi=new WeakMap;var er={},tr={},nr={},ir={},rr=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),or=s&&s.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,\"default\",{enumerable:!0,value:t})}:function(e,t){e.default=t}),sr=s&&s.__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)&&rr(t,e,n);return or(t,e),t};Object.defineProperty(ir,\"__esModule\",{value:!0}),ir.PrivateChannelClient=void 0;const ar=sr(Hi);var cr,dr;function hr(){if(cr)return tr;cr=1;var e,t=s&&s.__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)},n=s&&s.__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},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(tr,\"__esModule\",{value:!0}),tr.FDC3ModuleBase=void 0;const o=nr,a=Hi,c=wr(),d=r(i);return tr.FDC3ModuleBase=class{get client(){return t(this,e,\"f\").call(this)}get fin(){return this.wire.getFin()}constructor(t,i){this.wire=i,e.set(this,void 0),n(this,e,t,\"f\")}async broadcast(e){return this.wire.sendAction(\"fdc3-broadcast\").catch((e=>{})),this.client.setContext(e)}async _open(e,t){this.wire.sendAction(\"fdc3-open\").catch((e=>{}));try{return await c.InteropClient.ferryFdc3Call(this.client,\"fdc3Open\",{app:e,context:t})}catch(e){const t=e.message===a.BROKER_ERRORS.fdc3Open?\"ResolverUnavailable\":e.message;throw new Error(t)}}async _getChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:\"system\",...(0,o.getUnsupportedChannelApis)()})))}async getOrCreateChannel(e){this.wire.sendAction(\"fdc3-get-or-create-channel\").catch((e=>{}));const t=(await this._getChannels()).find((t=>t.id===e));if(t)return{...t,type:\"system\",...(0,o.getUnsupportedChannelApis)()};try{const t=await this.client.joinSessionContextGroup(e);return(0,o.buildAppChannelObject)(t)}catch(e){throw console.error(e.message),new Error(o.ChannelError.CreationFailed)}}async getSystemChannels(){return this.wire.sendAction(\"fdc3-get-system-channels\").catch((e=>{})),this._getChannels()}async joinChannel(e){this.wire.sendAction(\"fdc3-join-channel\").catch((e=>{}));try{return await this.client.joinContextGroup(e)}catch(e){if(e.message===a.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup?console.error(\"The Channel you have tried to join is an App Channel. Custom Channels can only be defined by the Interop Broker through code or manifest configuration. Please use getOrCreateChannel.\"):console.error(e.message),e.message.startsWith(\"Attempting to join a context group that does not exist\"))throw new Error(o.ChannelError.NoChannelFound);throw new Error(o.ChannelError.AccessDenied)}}async getCurrentChannel(){this.wire.sendAction(\"fdc3-get-current-channel\").catch((e=>{}));const e=await this.getCurrentContextGroupInfo();return e?this.buildChannelObject(e):null}async leaveCurrentChannel(){return this.wire.sendAction(\"fdc3-leave-current-channel\").catch((e=>{})),this.client.removeFromContextGroup()}async getCurrentContextGroupInfo(){const e=await this.client.getContextGroups(),t=e.map((async e=>this.client.getAllClientsInContextGroup(e.id))),n=(await Promise.all(t)).findIndex((e=>e.some((e=>{const{uuid:t,name:n}=e;return this.wire.me.uuid===t&&this.wire.me.name===n}))));return e[n]}async buildChannelObject(e){return{...e,type:\"system\",addContextListener:(...[e,t])=>{let n,i;\"function\"==typeof e?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),n=e):(n=t,\"string\"==typeof e&&(i=e));const r=(async()=>{let e=!0;const t=await this.client.getCurrentContext(i);return this.client.addContextHandler(((i,r)=>{if(!e||(e=!1,!(0,d.default)(t,i)))return n(i,r)}),i)})();return{...r,unsubscribe:()=>r.then((e=>e.unsubscribe()))}},broadcast:this.broadcast.bind(this),getCurrentContext:async e=>{const t=await this.client.getCurrentContext(e);return void 0===t?null:t}}}},e=new WeakMap,tr}ir.PrivateChannelClient=class{constructor(e,t){this.id=t,this.client=e,this.listeners=new Map}async broadcast(e){return this.client.dispatch(\"broadcast\",{context:e})}async getCurrentContext(e){return this.client.dispatch(\"getCurrentContext\",{contextType:e})}async addContextListener(e,t){if(\"function\"!=typeof t)throw new Error(\"Non-function argument passed to the second parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.\");let n;n=e?`contextHandler:invoke-${this.id}-${e}-${ar.generateId()}`:`contextHandler:invoke-${this.id}-${ar.generateId()}`,this.client.register(n,ar.wrapContextHandler(t,n));const i={unsubscribe:await this.createContextUnsubscribeCb(n)};return this.listeners.set(n,i),await this.client.dispatch(\"contextHandlerAdded\",{handlerId:n,contextType:e}),i}createNonStandardUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch(\"nonStandardHandlerRemoved\",{handlerId:e})}}createContextUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch(\"contextHandlerRemoved\",{handlerId:e})}}onAddContextListener(e){const t=`onContextHandlerAdded:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch(\"onAddContextHandlerAdded\",{handlerId:t}),n}onDisconnect(e){const t=`onDisconnect:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch(\"onDisconnectHandlerAdded\",{handlerId:t}),n}onUnsubscribe(e){const t=`onUnsubscribe:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch(\"onUnsubscribeHandlerAdded\",{handlerId:t}),n}async cleanUpAllSubs(){Array.from(this.listeners.keys()).forEach((e=>{this.client.remove(e),this.listeners.delete(e)}))}async disconnect(){try{await this.client.dispatch(\"clientDisconnecting\"),await this.cleanUpAllSubs(),await this.client.disconnect()}catch(e){throw new Error(e.message)}}},function(e){var t=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,\"__esModule\",{value:!0}),e.getIntentResolution=e.isChannel=e.isContext=e.connectPrivateChannel=e.buildAppChannelObject=e.buildPrivateChannelObject=e.ChannelError=e.ResultError=e.UnsupportedChannelApiError=e.getUnsupportedChannelApis=void 0;const n=Hi,r=ir,o=t(i);e.getUnsupportedChannelApis=e=>({addContextListener:()=>{throw new a(\"Channel.addContextListener\",e)},broadcast:()=>{throw new a(\"Channel.broadcast\",e)},getCurrentContext:()=>{throw new a(\"Channel.getCurrentContext\",e)}});class a extends Error{constructor(e,t=\"System\"){super(e),this.message=`Calling ${e} on an instance of a ${t} Channel returned by fdc3.get${t}Channels is not supported. If you would like to use a ${t} Channel, please use fdc3.joinChannel, fdc3.addContextListener, and fdc3.broadcast instead.`}}var c,d;e.UnsupportedChannelApiError=a,function(e){e.NoResultReturned=\"NoResultReturned\",e.IntentHandlerRejected=\"IntentHandlerRejected\"}(c=e.ResultError||(e.ResultError={})),(d=e.ChannelError||(e.ChannelError={})).NoChannelFound=\"NoChannelFound\",d.AccessDenied=\"AccessDenied\",d.CreationFailed=\"CreationFailed\";e.buildPrivateChannelObject=e=>{let t=!1;const n=()=>{if(t)throw new Error(\"Private Channel Client has been disconnected from the Private Channel\")};return{id:e.id,type:\"private\",broadcast:async t=>(n(),e.broadcast(t)),getCurrentContext:async t=>(n(),e.getCurrentContext(t)),addContextListener:async(t,i)=>{n();let r=i,o=t;\"function\"==typeof t&&(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),r=t,o=null);return e.addContextListener(o,r)},onAddContextListener:t=>(n(),e.onAddContextListener(t)),disconnect:async()=>(n(),t=!0,e.disconnect()),onDisconnect:t=>(n(),e.onDisconnect(t)),onUnsubscribe:t=>(n(),e.onUnsubscribe(t))}};e.buildAppChannelObject=e=>({id:e.id,type:\"app\",broadcast:e.setContext,getCurrentContext:async t=>{const n=await e.getCurrentContext(t);return void 0===n?null:n},addContextListener:(t,n)=>{let i,r;\"function\"==typeof t?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),i=t):(i=n,\"string\"==typeof t&&(r=t));const s=(async()=>{let t=!0;const n=await e.getCurrentContext(r);return e.addContextHandler(((e,r)=>{if(!t||(t=!1,!(0,o.default)(n,e)))return i(e,r)}),r)})();return{...s,unsubscribe:()=>s.then((e=>e.unsubscribe()))}}});e.connectPrivateChannel=async t=>{try{const n=await fin.InterApplicationBus.Channel.connect(t),i=new r.PrivateChannelClient(n,t);return(0,e.buildPrivateChannelObject)(i)}catch(e){throw new Error(`Private Channel with id: ${t} doesn't exist`)}};e.isContext=e=>{if(e&&\"object\"==typeof e&&\"type\"in e){const{type:t}=e;return\"string\"==typeof t}return!1};e.isChannel=e=>{if(e&&\"object\"==typeof e&&\"type\"in e&&\"id\"in e){const{type:t,id:n}=e;return\"string\"==typeof t&&\"string\"==typeof n&&(\"app\"===t||\"private\"===t)}return!1};e.getIntentResolution=async(t,i,r,o)=>{const s=(0,n.generateId)(),a=new Promise(((e,t)=>{fin.InterApplicationBus.subscribe({uuid:\"*\"},s,(t=>{e(t)})).catch((()=>t(new Error(\"getResult is not supported in this environment\"))))})),d=r?{target:r,intentResolutionResultId:s}:{intentResolutionResultId:s},h=o?{name:o,context:i,metadata:d}:{...i,metadata:d},l=async()=>{let n=await a;if(!n||\"object\"!=typeof n)throw new Error(c.NoResultReturned);const{error:i}=n;if(i)throw new Error(c.IntentHandlerRejected);if((0,e.isChannel)(n)){const{id:i,type:r}=n;switch(r){case\"private\":n=await(0,e.connectPrivateChannel)(i);break;case\"app\":{const r=await t.joinSessionContextGroup(i);n=(0,e.buildAppChannelObject)(r);break}}}else if(!(0,e.isContext)(n))throw new Error(c.NoResultReturned);return n},u=o?await t.fireIntent(h):await t.fireIntentForContext(h);return\"object\"!=typeof u?{source:{appId:\"\",instanceId:\"\"},intent:\"\",version:\"2.0\",getResult:l}:{...u,getResult:l}}}(nr);var lr,ur,pr={};function wr(){if(ur)return Ki;ur=1;var e,t,n=s&&s.__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},i=s&&s.__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)},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ki,\"__esModule\",{value:!0}),Ki.InteropClient=void 0;const o=d,a=r(qi),c=function(){if(dr)return er;dr=1,Object.defineProperty(er,\"__esModule\",{value:!0}),er.Fdc3Module=void 0;const e=Hi,t=hr();class n extends t.FDC3ModuleBase{async open(e,t){await super._open(e,t)}addContextListener(e,t){let n;return this.wire.sendAction(\"fdc3-add-context-listener\").catch((e=>{})),\"function\"==typeof e?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),n=this.client.addContextHandler(e)):n=this.client.addContextHandler(t,null===e?void 0:e),{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}addIntentListener(e,t){this.wire.sendAction(\"fdc3-add-intent-listener\").catch((e=>{}));const n=this.client.registerIntentHandler((e=>{const{context:n,metadata:i}=e,{metadata:r}=n,o=i?.intentResolutionResultId||r?.intentResolutionResultId;o&&this.fin.InterApplicationBus.publish(o,null).catch((()=>null)),t(e.context)}),e,{fdc3Version:\"1.2\"});return{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}async raiseIntent(t,n,i){this.wire.sendAction(\"fdc3-raise-intent\").catch((e=>{}));const r=i?{name:t,context:n,metadata:{target:i}}:{name:t,context:n};try{return await this.client.fireIntent(r)}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntent?\"ResolverUnavailable\":t.message;throw new Error(n)}}async findIntent(t,n){this.wire.sendAction(\"fdc3-find-intent\").catch((e=>{}));try{return await this.client.getInfoForIntent({name:t,context:n})}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntent?\"ResolverUnavailable\":t.message;throw new Error(n)}}async findIntentsByContext(t){this.wire.sendAction(\"fdc3-find-intents-by-context\").catch((e=>{}));try{return await this.client.getInfoForIntentsByContext(t)}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntentsByContext?\"ResolverUnavailable\":t.message;throw new Error(n)}}async raiseIntentForContext(t,n){this.wire.sendAction(\"fdc3-raise-intent-for-context\").catch((e=>{}));try{return await this.client.fireIntentForContext({...t,metadata:{target:n}})}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntentForContext?\"ResolverUnavailable\":t.message;throw new Error(n)}}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}getInfo(){return this.wire.sendAction(\"fdc3-get-info\").catch((e=>{})),{providerVersion:this.wire.environment.getAdapterVersionSync(),provider:`openfin-${this.wire.me.uuid}`,fdc3Version:\"1.2\"}}}return er.Fdc3Module=n,er}(),h=function(){if(lr)return pr;lr=1,Object.defineProperty(pr,\"__esModule\",{value:!0}),pr.Fdc3Module2=void 0;const e=hr(),t=Hi,n=wr(),i=nr,r=ir;class o extends e.FDC3ModuleBase{async open(e,t){return\"string\"==typeof e&&console.warn(\"Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).\"),super._open(e,t)}async findInstances(e){this.wire.sendAction(\"fdc3-find-instances\").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,\"fdc3FindInstances\",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3FindInstances?\"ResolverUnavailable\":e.message;throw new Error(n)}}async getAppMetadata(e){this.wire.sendAction(\"fdc3-get-app-metadata\").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,\"fdc3GetAppMetadata\",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3GetAppMetadata?\"ResolverUnavailable\":e.message;throw new Error(n)}}async addContextListener(e,t){this.wire.sendAction(\"fdc3-add-context-listener\").catch((e=>{}));const n=e=>t=>{const{contextMetadata:n,...i}=t,r=n?[{...i},n]:[t,null];e(...r)};let i=t,r=n(i);return\"function\"==typeof e?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),i=e,r=n(i),this.client.addContextHandler(r)):this.client.addContextHandler(r,null===e?void 0:e)}async findIntent(e,n,i){this.wire.sendAction(\"fdc3-find-intent\").catch((e=>{}));try{return await this.client.getInfoForIntent({name:e,context:n,metadata:{resultType:i}})}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntent?\"ResolverUnavailable\":e.message;throw new Error(n)}}async findIntentsByContext(e,i){this.wire.sendAction(\"fdc3-find-intents-by-context\").catch((e=>{}));const r=i?{context:e,metadata:{resultType:i}}:e;try{return await n.InteropClient.ferryFdc3Call(this.client,\"fdc3v2FindIntentsByContext\",r)}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntentsByContext?\"ResolverUnavailable\":e.message;throw new Error(n)}}async raiseIntent(e,n,r){this.wire.sendAction(\"fdc3-raise-intent\").catch((e=>{}));try{return\"string\"==typeof r&&console.warn(\"Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).\"),(0,i.getIntentResolution)(this.client,n,r,e)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?\"ResolverUnavailable\":e.message;throw new Error(n)}}async raiseIntentForContext(e,n){this.wire.sendAction(\"fdc3-raise-intent-for-context\").catch((e=>{}));try{return\"string\"==typeof n&&console.warn(\"Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).\"),(0,i.getIntentResolution)(this.client,e,n)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?\"ResolverUnavailable\":e.message;throw new Error(n)}}async addIntentListener(e,t){if(this.wire.sendAction(\"fdc3-add-intent-listener\").catch((e=>{})),\"string\"!=typeof e)throw new Error(\"First argument must be an Intent name\");return this.client.registerIntentHandler((async e=>{let n,i;const{context:r,metadata:o}=e,{contextMetadata:s,metadata:a,...c}=r,d=o?.intentResolutionResultId||a?.intentResolutionResultId;try{const e=a?{metadata:a,...c}:{...c};n=await t(e,s),i=n}catch(e){n=e,i={error:!0}}if(d&&this.fin.InterApplicationBus.publish(d,i).catch((()=>null)),n instanceof Error)throw new Error(n.message);return n}),e,{fdc3Version:\"2.0\"})}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}async createPrivateChannel(){const e=(0,t.generateId)();await n.InteropClient.ferryFdc3Call(this.client,\"createPrivateChannelProvider\",{channelId:e});const o=await this.fin.InterApplicationBus.Channel.connect(e),s=new r.PrivateChannelClient(o,e);return(0,i.buildPrivateChannelObject)(s)}async getUserChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:\"user\",...(0,i.getUnsupportedChannelApis)(\"User\")})))}async getSystemChannels(){return console.warn(\"This API has been deprecated. Please use fdc3.getUserChannels instead.\"),super.getSystemChannels()}async joinUserChannel(e){return super.joinChannel(e)}async joinChannel(e){return console.warn(\"This API has been deprecated. Please use fdc3.joinUserChannel instead.\"),super.joinChannel(e)}async getCurrentChannel(){const e=await super.getCurrentChannel();return e?{...e,type:\"user\",broadcast:this.broadcast.bind(this)}:null}async getInfo(){return n.InteropClient.ferryFdc3Call(this.client,\"fdc3v2GetInfo\",{fdc3Version:\"2.0\"})}}return pr.Fdc3Module2=o,pr}(),l=Hi;let u=class extends o.Base{constructor(i,r){super(i),e.set(this,void 0),t.set(this,void 0),n(this,t,new Map,\"f\"),n(this,e,r,\"f\")}async setContext(t){this.wire.sendAction(\"interop-client-set-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"setContext\",{context:t})}async addContextHandler(t,n){if(this.wire.sendAction(\"interop-client-add-context-handler\").catch((e=>{})),\"function\"!=typeof t)throw new Error(\"Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.\");const r=await i(this,e,\"f\");let o;o=n?`invokeContextHandler-${n}-${(0,l.generateId)()}`:\"invokeContextHandler\";const s=(0,l.wrapContextHandler)(t,o);return r.register(o,s),await r.dispatch(\"contextHandlerRegistered\",{handlerId:o,contextType:n}),{unsubscribe:async()=>{r.remove(o),await r.dispatch(\"removeContextHandler\",{handlerId:o})}}}async getContextGroups(){this.wire.sendAction(\"interop-client-get-context-groups\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getContextGroups\")}async joinContextGroup(t,n){this.wire.sendAction(\"interop-client-join-context-group\").catch((e=>{}));const r=await i(this,e,\"f\");if(!t)throw new Error(\"No contextGroupId specified for joinContextGroup.\");return r.dispatch(\"joinContextGroup\",{contextGroupId:t,target:n})}async removeFromContextGroup(t){this.wire.sendAction(\"interop-client-remove-from-context-group\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"removeFromContextGroup\",{target:t})}async getAllClientsInContextGroup(t){this.wire.sendAction(\"interop-client-get-all-clients-in-context-group\").catch((e=>{}));const n=await i(this,e,\"f\");if(!t)throw new Error(\"No contextGroupId specified for getAllClientsInContextGroup.\");return n.dispatch(\"getAllClientsInContextGroup\",{contextGroupId:t})}async getInfoForContextGroup(t){this.wire.sendAction(\"interop-client-get-info-for-context-group\").catch((e=>{}));const n=await i(this,e,\"f\");if(!t)throw new Error(\"No contextGroupId specified for getInfoForContextGroup.\");return n.dispatch(\"getInfoForContextGroup\",{contextGroupId:t})}async fireIntent(t){this.wire.sendAction(\"interop-client-fire-intent\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"fireIntent\",t)}async registerIntentHandler(t,n,r){this.wire.sendAction(\"interop-client-register-intent-handler\").catch((e=>{}));const o=await i(this,e,\"f\"),s=`intent-handler-${n}`,a=(0,l.wrapIntentHandler)(t,s);try{await o.register(s,a),await o.dispatch(\"intentHandlerRegistered\",{handlerId:s,...r})}catch(e){throw new Error(\"Unable to register intent handler\")}return{unsubscribe:async()=>{o.remove(s)}}}async getCurrentContext(t){this.wire.sendAction(\"interop-client-get-current-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getCurrentContext\",{contextType:t})}async getInfoForIntent(t){this.wire.sendAction(\"interop-client-get-info-for-intent\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getInfoForIntent\",t)}async getInfoForIntentsByContext(t){this.wire.sendAction(\"interop-client-get-info-for-intents-by-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getInfoForIntentsByContext\",t)}async fireIntentForContext(t){this.wire.sendAction(\"interop-client-fire-intent-for-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"fireIntentForContext\",t)}async joinSessionContextGroup(n){try{const r=i(this,t,\"f\").get(n);if(r)return r.getUserInstance();const o=await i(this,e,\"f\"),{hasConflict:s}=await o.dispatch(\"sessionContextGroup:createIfNeeded\",{sessionContextGroupId:n});s&&console.warn(`A (non-session) context group with the name \"${n}\" already exists. If you are trying to join a Context Group, call joinContextGroup instead.`);const c=new a.default(this.wire,i(this,e,\"f\"),n);return i(this,t,\"f\").set(n,c),c.getUserInstance()}catch(e){throw console.error(`Error thrown trying to create Session Context Group with id \"${n}\": ${e}`),e}}async onDisconnection(t){this.wire.sendAction(\"interop-client-add-ondisconnection-listener\").catch((e=>{}));return(await i(this,e,\"f\")).onDisconnection((e=>{const{uuid:n}=e;t({type:\"interop-broker\",topic:\"disconnected\",brokerName:n})}))}getFDC3Sync(e){switch(e){case\"1.2\":return new c.Fdc3Module((()=>this),this.wire);case\"2.0\":return new h.Fdc3Module2((()=>this),this.wire);default:throw new Error(`Invalid FDC3 version provided: ${e}. Must be '1.2' or '2.0'`)}}async getFDC3(e){return this.getFDC3Sync(e)}static async ferryFdc3Call(t,n,r){return(await i(t,e,\"f\")).dispatch(n,r||null)}};return Ki.InteropClient=u,e=new WeakMap,t=new WeakMap,Ki}var yr,fr,gr,mr={};function vr(){if(yr)return mr;yr=1,Object.defineProperty(mr,\"__esModule\",{value:!0}),mr.overrideCheck=mr.checkFDC32Overrides=mr.getDefaultViewFdc3VersionFromAppInfo=void 0;const e=Vi();function t(t){return[\"fdc3HandleFindInstances\",\"handleInfoForIntent\",\"handleInfoForIntentsByContext\",\"fdc3HandleGetAppMetadata\",\"fdc3HandleGetInfo\",\"fdc3HandleOpen\",\"handleFiredIntent\",\"handleFiredIntentForContext\"].filter((n=>t[n]===e.InteropBroker.prototype[n]))}return mr.getDefaultViewFdc3VersionFromAppInfo=function({manifest:e,initialOptions:t}){const n=e?.platform?.defaultViewOptions?.fdc3InteropApi??t.defaultViewOptions?.fdc3InteropApi;return[\"1.2\",\"2.0\"].includes(n??\"\")?n:void 0},mr.checkFDC32Overrides=t,mr.overrideCheck=function(e,n){if(n&&\"2.0\"===n){const n=t(e);n.length>0&&console.warn(`WARNING: FDC3 2.0 has been set as a default option for Views in this Platform, but the required InteropBroker APIs for FDC3 2.0 compliance have not all been overridden.\\nThe following APIs need to be overridden:\\n${n.join(\"\\n\")}`)}},mr}function Cr(){return gr||(gr=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),i=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),i(function(){if(fr)return Ti;fr=1;var e=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ti,\"__esModule\",{value:!0}),Ti.InteropModule=void 0;const t=e(n),i=$i,r=d,o=Vi(),a=wr(),c=vr(),h=Tn,l=e=>new e,u=\"You have attempted to use or modify InteropBroker parameters, which is not allowed. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.\";class p extends r.Base{async init(e,n=l){this.wire.sendAction(\"interop-init\").catch((()=>{}));const r=await this.wire.environment.getInteropInfo(this.wire.getFin()),s=(0,i.createUnusableObject)(u),a=(0,i.createWarningObject)(u,(0,t.default)(r)),d=async()=>{throw new Error(u)},p=o.InteropBroker.createClosedConstructor(this.wire,(()=>this.fin.InterApplicationBus.Channel.create(`interop-broker-${e}`)),r);let w;return w=Array.isArray(n)?new((0,h.overrideFromComposables)(...n)(p))(s,d,a):await n(p,s,d,a),(0,c.overrideCheck)(w,r.fdc3Version),w}connectSync(e,t){return this.wire.sendAction(\"interop-connect-sync\").catch((()=>{})),new a.InteropClient(this.wire,this.wire.environment.whenReady().then((()=>this.fin.InterApplicationBus.Channel.connect(`interop-broker-${e}`,{payload:t}))))}}return Ti.InteropModule=p,Ti}(),e),i(wr(),e),i(Vi(),e)}(Li)),Li}var br={},Ir={},Er={},xr={};Object.defineProperty(xr,\"__esModule\",{value:!0}),xr.getSnapshotSourceChannelName=void 0;xr.getSnapshotSourceChannelName=e=>`snapshot-source-provider-${e.uuid}`;var Ar,Pr,Mr,_r,Or,Sr=s&&s.__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},Rr=s&&s.__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)};Object.defineProperty(Er,\"__esModule\",{value:!0}),Er.SnapshotSource=void 0;const Fr=d,jr=xr,kr=new Map;class Lr extends Fr.Base{constructor(e,t){super(e),Ar.set(this,void 0),Pr.set(this,(()=>(kr.has(this.identity.uuid)||kr.set(this.identity.uuid,{eventFired:null,clientPromise:null}),kr.get(this.identity.uuid)))),Mr.set(this,(()=>(Rr(this,Pr,\"f\").call(this).clientPromise||(Rr(this,Pr,\"f\").call(this).clientPromise=Rr(this,_r,\"f\").call(this)),Rr(this,Pr,\"f\").call(this).clientPromise))),_r.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);try{Rr(this,Pr,\"f\").call(this).eventFired||await Rr(this,Or,\"f\").call(this);const t=await this.fin.InterApplicationBus.Channel.connect(e,{wait:!1});return t.onDisconnection((()=>{Rr(this,Pr,\"f\").call(this).clientPromise=null,Rr(this,Pr,\"f\").call(this).eventFired=null})),t}catch(e){throw Rr(this,Pr,\"f\").call(this).clientPromise=null,new Error(\"The targeted SnapshotSource is not currently initialized. Await this object's ready() method.\")}})),Or.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);let t,n;const i=new Promise(((e,i)=>{t=e,n=i}));Rr(this,Pr,\"f\").call(this).eventFired=i;const r=async i=>{try{i.channelName===e&&(t(),await this.fin.InterApplicationBus.Channel.removeListener(\"connected\",r))}catch(e){n(e)}};await this.fin.InterApplicationBus.Channel.on(\"connected\",r)})),Sr(this,Ar,t,\"f\")}get identity(){return Rr(this,Ar,\"f\")}async ready(){this.wire.sendAction(\"snapshot-source-ready\").catch((e=>{}));try{await Rr(this,Mr,\"f\").call(this)}catch(e){await Rr(this,Pr,\"f\").call(this).eventFired}}async getSnapshot(){this.wire.sendAction(\"snapshot-source-get-snapshot\").catch((e=>{}));const e=await Rr(this,Mr,\"f\").call(this),t=await e.dispatch(\"get-snapshot\");return(await t).snapshot}async applySnapshot(e){this.wire.sendAction(\"snapshot-source-apply-snapshot\").catch((e=>{}));return(await Rr(this,Mr,\"f\").call(this)).dispatch(\"apply-snapshot\",{snapshot:e})}}Er.SnapshotSource=Lr,Ar=new WeakMap,Pr=new WeakMap,Mr=new WeakMap,_r=new WeakMap,Or=new WeakMap,Object.defineProperty(Ir,\"__esModule\",{value:!0}),Ir.SnapshotSourceModule=void 0;const Tr=d,$r=Er,Br=xr;class Gr extends Tr.Base{async init(e){if(this.wire.sendAction(\"snapshot-source-init\").catch((e=>{})),\"object\"!=typeof e||\"function\"!=typeof e.getSnapshot||\"function\"!=typeof e.applySnapshot)throw new Error(\"you must pass in a valid SnapshotProvider\");const t=await this.fin.InterApplicationBus.Channel.create((0,Br.getSnapshotSourceChannelName)(this.fin.me));t.register(\"get-snapshot\",(async()=>({snapshot:await e.getSnapshot()}))),t.register(\"apply-snapshot\",(({snapshot:t})=>e.applySnapshot(t)))}wrapSync(e){return this.wire.sendAction(\"snapshot-source-wrap-sync\").catch((e=>{})),new $r.SnapshotSource(this.wire,e)}async wrap(e){return this.wire.sendAction(\"snapshot-source-wrap\").catch((e=>{})),this.wrapSync(e)}}Ir.SnapshotSourceModule=Gr,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Ir,e),n(Er,e)}(br),Object.defineProperty(a,\"__esModule\",{value:!0});var Wr=a.Fin=void 0;const Hr=t,Nr=c,Dr=ie(),Ur=Z(),Vr=de,zr=en,Kr=rn,qr=un,Jr=bn,Yr=J(),Zr=An,Qr=ki,Xr=Cr(),eo=br;class to extends Hr.EventEmitter{constructor(e){super(),this.wire=e,this.System=new Nr.System(e),this.Window=new Dr._WindowModule(e),this.Application=new Ur.ApplicationModule(e),this.InterApplicationBus=new Vr.InterApplicationBus(e),this.Clipboard=new zr.Clipboard(e),this.ExternalApplication=new Kr.ExternalApplicationModule(e),this.Frame=new qr._FrameModule(e),this.GlobalHotkey=new Jr.GlobalHotkey(e),this.Platform=new Zr.PlatformModule(e,this.InterApplicationBus.Channel),this.View=new Yr.ViewModule(e),this.Interop=new Xr.InteropModule(e),this.SnapshotSource=new eo.SnapshotSourceModule(e),e.registerFin(this),this.me=(0,Qr.getMe)(e),e.on(\"disconnected\",(()=>{this.emit(\"disconnected\")}))}}Wr=a.Fin=to;var no={},io={};function ro(e){return\"string\"==typeof e.manifestUrl}function oo(e){return ao(e)&&\"string\"==typeof e.address}function so(e){return oo(e)&&\"string\"==typeof e.token}function ao(e){return\"string\"==typeof e.uuid}function co(e){return e.runtime&&\"string\"==typeof e.runtime.version}function ho(e){return ao(e)&&co(e)}Object.defineProperty(io,\"__esModule\",{value:!0}),io.isInternalConnectConfig=io.isPortDiscoveryConfig=io.isNewConnectConfig=io.isConfigWithReceiver=io.isRemoteConfig=io.isExistingConnectConfig=io.isExternalConfig=void 0,io.isExternalConfig=ro,io.isExistingConnectConfig=oo,io.isRemoteConfig=so,io.isConfigWithReceiver=function(e){return\"object\"==typeof e.receiver&&so({...e,address:\"\"})},io.isNewConnectConfig=ho,io.isPortDiscoveryConfig=function(e){return ro(e)&&co(e)||ho(e)},io.isInternalConnectConfig=function(e){return oo(e)||ho(e)};var lo={},uo={};Object.defineProperty(uo,\"__esModule\",{value:!0}),uo.EmitterMap=void 0;const po=t;function wo(e){return Buffer.from(e).toString(\"base64\")}uo.EmitterMap=class{constructor(){this.storage=new Map}hashKeys(e){return e.map(wo).join(\"/\")}getOrCreate(e){const t=this.hashKeys(e);return this.storage.has(t)||this.storage.set(t,new po.EventEmitter),this.storage.get(t)}has(e){return this.storage.has(this.hashKeys(e))}delete(e){const t=this.hashKeys(e);return this.storage.delete(t)}},Object.defineProperty(lo,\"__esModule\",{value:!0});const yo=uo;class fo extends yo.EmitterMap{constructor(){super(...arguments),this.dispatchEvent=e=>{if(function(e){return\"process-desktop-event\"===e.action}(e)){const{payload:t}=e,n=function(e){const{topic:t}=e;if(\"frame\"===t||\"window\"===t||\"view\"===t){const{uuid:n,name:i}=e;return[t,n,i]}if(\"application\"===t){const{uuid:n}=e;return[t,n]}return[t]}(t);if(this.has(n))return this.getOrCreate(n).emit(t.type,t),!0}return!1}}}lo.default=fo;var go,mo,vo=s&&s.__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},Co=s&&s.__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)},bo=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(no,\"__esModule\",{value:!0});var Io=no.Transport=void 0;const Eo=t,xo=io,Ao=g,Po=bo(lo),Mo=ki,_o=ke;class Oo extends Eo.EventEmitter{constructor(e,t,n){super(),this.wireListeners=new Map,this.topicRefMap=new Map,this.eventAggregator=new Po.default,this.messageHandlers=[this.eventAggregator.dispatchEvent],go.set(this,void 0),mo.set(this,void 0),this.connectSync=()=>{Co(this,go,\"f\").connectSync()},this.getPort=()=>Co(this,go,\"f\").getPort(),vo(this,go,new e(this.onmessage.bind(this)),\"f\"),this.environment=t,this.sendRaw=Co(this,go,\"f\").send.bind(Co(this,go,\"f\")),this.registerMessageHandler(this.handleMessage.bind(this)),Co(this,go,\"f\").on(\"disconnected\",(()=>{for(const[,{handleNack:e}]of this.wireListeners)e({reason:\"Remote connection has closed\"});this.wireListeners.clear(),this.emit(\"disconnected\")}));const{uuid:i,name:r}=n,o=this.environment.getCurrentEntityType();this.me=(0,Mo.getBaseMe)(o,i,r)}getFin(){if(!Co(this,mo,\"f\"))throw new Error(\"No Fin object registered for this transport\");return Co(this,mo,\"f\")}registerFin(e){if(Co(this,mo,\"f\"))throw new Error(\"Fin object has already been registered for this transport\");vo(this,mo,e,\"f\")}shutdown(){return Co(this,go,\"f\").shutdown()}async connect(e){if((0,xo.isConfigWithReceiver)(e))return await Co(this,go,\"f\").connect(e.receiver),this.authorize(e);if((0,xo.isRemoteConfig)(e))return this.connectRemote(e);if((0,xo.isExistingConnectConfig)(e))return this.connectByPort(e);if((0,xo.isNewConnectConfig)(e)){const t=await this.environment.retrievePort(e);return this.connectByPort({...e,address:`ws://localhost:${t}`})}}async connectRemote(e){return await Co(this,go,\"f\").connect(new(this.environment.getWsConstructor())(e.address)),this.authorize(e)}async connectByPort(e){const{address:t,uuid:n}=e,i={...e,type:\"file-token\"},r=Co(this,go,\"f\");await r.connect(new(this.environment.getWsConstructor())(e.address));const o=await this.sendAction(\"request-external-authorization\",{uuid:n,type:\"file-token\"},!0);if(\"external-authorization-response\"!==o.action)throw new Ao.UnexpectedActionError(o.action);return await this.environment.writeToken(o.payload.file,o.payload.token),this.authorize(i)}async authorize(e){const t=await this.sendAction(\"request-authorization\",e,!0);if(\"authorization-response\"!==t.action)throw new Ao.UnexpectedActionError(t.action);if(!0!==t.payload.success)throw new Ao.RuntimeError(t.payload)}sendAction(e,t={},n=!1){let i=()=>{};const r=Ao.RuntimeError.getCallSite(1),o=this.environment.getNextMessageId(),s=new Promise(((s,a)=>{i=a;const c={action:e,payload:t,messageId:o},d=Co(this,go,\"f\");return this.addWireListener(o,s,(e=>this.nackHandler(e,a,r)),n),d.send(c).catch(a)}));return Object.assign(s,{cancel:i,messageId:o})}nackHandler(e,t,n){t(\"string\"==typeof e?e:new Ao.RuntimeError(e,n))}ferryAction(e){return new Promise(((t,n)=>{const i=this.environment.getNextMessageId();e.messageId=i;const r=e=>{t(e.payload)};return Co(this,go,\"f\").send(e).then((()=>this.addWireListener(i,r,(e=>this.nackHandler(e,n)),!1))).catch(n)}))}registerMessageHandler(e){this.messageHandlers.push(e)}addWireListener(e,t,n,i){i?this.uncorrelatedListener=t:this.wireListeners.has(e)?n({reason:\"Duplicate handler id\",error:(0,_o.errorToPOJO)(new Ao.DuplicateCorrelationError(String(e)))}):this.wireListeners.set(e,{resolve:t,handleNack:n})}onmessage(e){for(const t of this.messageHandlers)t.call(null,e)}handleMessage(e){const t=e.correlationId||NaN;if(\"correlationId\"in e){if(!this.wireListeners.has(t))return!1;{const{resolve:n,handleNack:i}=this.wireListeners.get(t);\"ack\"!==e.action?i({reason:\"Did not receive ack action\",error:(0,_o.errorToPOJO)(new Ao.NoAckError(e.action))}):\"payload\"in e?e.payload.success?n.call(null,e):i(e.payload):\"string\"==typeof e.reason?i(e):(console.warn(\"Received invalid response from core\",e),i({reason:\"invalid response shape\"})),this.wireListeners.delete(t)}}else this.uncorrelatedListener&&this.uncorrelatedListener.call(null,e),this.uncorrelatedListener=()=>{};return!0}}Io=no.Transport=Oo,go=new WeakMap,mo=new WeakMap;const So=(...e)=>({log:(...t)=>console.debug(`[${(new Date).toISOString()}]`,...(e=>e.map((e=>`[${e}]`)))(e),...t),getLogger:(...t)=>So(...e,...t)}),Ro=So(\"@openfin/core-web/client\");function Fo(e,t){if(!function(e){return\"string\"==typeof e}(e))throw new Error(`Property ${t} has invalid type. Expected string, got ${typeof e}.`)}const jo=\"web-broker-ports-ready\",ko=Ro.getLogger(\"get-web-interop-ports\");function Lo(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)}function To(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}\"function\"==typeof SuppressedError&&SuppressedError;const $o=e=>{var n,i,r;return r=class extends t.EventEmitter{constructor(t){super(),n.set(this,void 0),i.set(this,!1),this.connectSync=()=>{Lo(this,i,\"f\")||(e.addEventListener(\"message\",(e=>{e.data?.topic?.startsWith(\"wire-message\")&&e.data.message&&Lo(this,n,\"f\").call(this,{...JSON.parse(e.data.message),ports:e.ports})})),e.start())},this.connect=async()=>{this.connectSync()},this.send=t=>(e.postMessage({topic:\"wire-message\",message:JSON.stringify(t)}),Promise.resolve()),this.shutdown=async()=>{e.close()},To(this,n,t,\"f\")}getPort(){return e}},n=new WeakMap,i=new WeakMap,r};var Bo={},Go={};Object.defineProperty(Go,\"__esModule\",{value:!0}),Go.BaseEnvironment=void 0;const Wo=vr();Go.BaseEnvironment=class{async getViewWindowIdentity(e,t){const{identity:n}=await e.View.wrapSync(t).getCurrentWindow();return n}async getInteropInfo(e){const t=await e.Application.getCurrentSync().getInfo().catch((()=>null)),n=t?.initialOptions?.interopBrokerConfiguration??{};return{fdc3Version:t?(0,Wo.getDefaultViewFdc3VersionFromAppInfo)(t):void 0,...n,fdc3Info:{providerVersion:await e.System.getVersion(),provider:\"OpenFin\"}}}},Object.defineProperty(Bo,\"__esModule\",{value:!0});var Ho=Bo.BrowserEnvironment=void 0;const No=Go;class Do extends No.BaseEnvironment{constructor(){super(...arguments),this.type=\"other\",this.getRandomId=()=>{const e=new Uint32Array(1);return window.crypto.getRandomValues(e)[0].toString(32)}}getAdapterVersionSync(){return\"\"}observeBounds(e,t){throw new Error(\"Method not implemented.\")}layoutAllowedInContext(e){return!1}initLayoutManager(e,t,n){throw new Error(\"Method not implemented.\")}applyLayoutSnapshot(e,t,n){throw new Error(\"Method not implemented.\")}createLayout(e,t){throw new Error(\"Method not implemented.\")}destroyLayout(e,t){throw new Error(\"Method not implemented.\")}resolveLayout(e,t){throw new Error(\"Method not implemented.\")}initPlatform(...e){throw new Error(\"Method not implemented.\")}writeToken(e,t){return Promise.resolve(\"\")}retrievePort(e){throw new Error(\"Method not implemented.\")}getNextMessageId(){return this.getRandomId()}createChildContent(e){throw new Error(\"Method not implemented.\")}getWebWindow(e){throw new Error(\"Method not implemented.\")}getCurrentEntityIdentity(){throw new Error(\"Method not implemented.\")}getCurrentEntityType(){return\"external connection\"}raiseEvent(e,t){throw new Error(\"Method not implemented.\")}getUrl(){return location.href}getDefaultChannelOptions(){return{create:{},connect:{}}}getRtcPeer(){return new RTCPeerConnection}getWsConstructor(){return WebSocket}whenReady(){return Promise.resolve()}}Ho=Bo.BrowserEnvironment=Do;const Uo=e=>\"platform\"in e&&void 0!==e.platform;var Vo,zo;class Ko extends Ho{constructor(e){super(),this.connectConfig=e,Vo.set(this,void 0),zo.set(this,new W((async()=>Promise.resolve().then((function(){return require(\"./main-b14f67c9.js\")}))))),Uo(e)&&this.validatePlatformOptions(e)}getAdapterVersionSync(){return\"0.39.21\"}validatePlatformOptions({platform:e}){if(!(\"layoutSnapshot\"in e))throw new Error(\"Platform options are missing layoutSnapshot. Please provide a layoutSnapshot in the platform options.\");if(\"windows\"in e||\"windows\"in e.layoutSnapshot)throw new Error(\"It appears you tried to call connect() with a snapshot object from an OpenFin desktop environment. Note that connect() expects to be called with a platform property with this structure: { platform: { layoutSnapshot } }. To get a layoutSnapshot of the expected structure, use fin.Platform.Layout.getCurrentLayoutManagerSync().getLayoutSnapshot() in v34+ in your desktop environment.\");const{layouts:t}=e.layoutSnapshot;Object.entries(t).map((([e,t])=>{if(\"object\"!=typeof t||null===t)throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must be an object.`);if(!(\"content\"in t))throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must contain a 'content' property.`)}))}async getInteropInfo(e){return{...{contextGroups:void 0,logging:{beforeAction:{enabled:!1},afterAction:{enabled:!1}}},fdc3Version:void 0,fdc3Info:{providerVersion:\"0.39.21\",provider:\"OpenFin Web\"}}}layoutAllowedInContext(e){return!0}async initLayoutManager(e,t,n){if(Lo(this,Vo,\"f\"))throw new Error(\"Layout already initialized.\");if(!Uo(this.connectConfig))throw new Error(\"Platform options are missing from connection config.\");const{WebLayoutEntryPoint:i}=await Lo(this,zo,\"f\").getValue();return To(this,Vo,new i(this.connectConfig),\"f\"),await Lo(this,Vo,\"f\").initLayoutManager(e,t,n)}async applyLayoutSnapshot(e,t,n){Lo(this,Vo,\"f\")?.applyLayoutSnapshot(e,t,n)}async createLayout(e,t){return Lo(this,Vo,\"f\")?.createLayout(e,t)}async destroyLayout(e,t){return Lo(this,Vo,\"f\")?.destroyLayout(e,t)}async getViewWindowIdentity(e,t){return Promise.resolve({uuid:t.uuid,name:t.uuid})}}Vo=new WeakMap,zo=new WeakMap;const qo=()=>{const e=((e,t)=>{const n=new RegExp(`^${t}<(?.*)>$`).exec(e)?.groups?.meta;if(n)try{return JSON.parse(atob(n))}catch(e){throw new Error(`Failed to decode JSON from ${n}.`)}})(window.name,\"of-frame\");if(e)try{const{name:t,uuid:n,brokerUrl:i,providerId:r,contextGroup:o}=e;return Fo(i,\"brokerUrl\"),Fo(n,\"uuid\"),Fo(t,\"name\"),{identity:{name:t,uuid:n},brokerUrl:i,interopConfig:{providerId:r,currentContextGroup:o}}}catch(e){throw new Error(`Unexpected error occurred when inferring platform information: ${e.stack}`)}},Jo=()=>{const e=r.v4();return{uuid:e,name:e}},Yo=async e=>{if(\"enabled\"===e.connectionInheritance){const t=await(async e=>{const t=qo();if(t){const{validateOptions:n=(()=>!0)}=e,{identity:i,...r}=t;if(!await n(r))throw new Error(\"Parent options were rejected by validateOptions.\");return t}})(e);if(t)return t}if(!e.options){const t=\"enabled\"===e.connectionInheritance?\"Broker URL was not specified nor provided by a platform container.\":\"Connection inheritance is disabled but no options were provided.\";throw new Error(t)}return{...e.options,identity:Jo()}};exports.__classPrivateFieldGet=Lo,exports.__classPrivateFieldSet=To,exports.apiExposer=Gn,exports.commonjsGlobal=s,exports.connect=async t=>{try{Ro.log(\"Establishing connection\",t);const{brokerUrl:n,identity:i,timeout:r,interopConfig:s}=await Yo(t),{workerPort:a,iframeBrokerPort:c}=await(async(e,t,n)=>{const{origin:i}=new URL(e),r=document.createElement(\"IFRAME\");let s;r.style.display=\"none\";try{return await new Promise(((a,c)=>{const d=e=>{if(e.source===r.contentWindow&&e.data?.topic===`ack-${jo}`){if(e.origin!==i)c(new Error(`Broker redirected to unexpected origin ${e.origin}, expected ${i}.`));else if(e.data.success){const[t,n]=e.ports;a({iframeBrokerPort:t,workerPort:n})}else c(new m(e.data));window.removeEventListener(\"message\",d),clearTimeout(s)}};window.addEventListener(\"message\",d),ko.log(`Connecting to broker ${e}`),r.setAttribute(\"src\",e),r.setAttribute(\"name\",o(t,\"of-broker\")),document.body.appendChild(r),ko.log(\"Iframe loaded, awaiting init message from iframe\"),n&&(s=setTimeout((()=>{window.removeEventListener(\"message\",d),document.body.removeChild(r),c(new Error(\"Worker did not initialize in time\"))}),n))}))}catch(e){throw new Error(`Failed to initialise Fin Web Client. ${e.message}`,{cause:e})}})(n,i,r);Ro.log(\"Successfully established connection to shared worker\");const d={entityType:\"external connection\",...i};a.start(),c.start();const h=((t,n,i)=>{const r=$o(n),o=new Ko(t),s=new Io(r,o,i);return s.connectSync(),window.Buffer=e.Buffer,new Wr(s)})(t,a,d);return s?.providerId&&(h.me.interop=h.Interop.connectSync(s.providerId),s?.currentContextGroup&&h.me.interop.joinContextGroup(s.currentContextGroup).catch((e=>{console.warn(`Error joining specified context group: ${s?.currentContextGroup}, continuing`,e)}))),{...h,me:{...h.me,identity:{uuid:h.me.uuid,name:h.me.name}}}}catch(e){throw new Error(`An error occured during web-interop connection: ${e.message}`)}},exports.decorators=Nn,exports.encodeOptions=o,exports.layout_constants=ai,exports.lazy=G;\n","\"use strict\";var t=require(\"./main-8cad4070.js\"),e=require(\"uuid\");require(\"buffer/\"),require(\"events\"),require(\"lodash/cloneDeep\"),require(\"lodash/isEqual\");var i={},n={};Object.defineProperty(n,\"__esModule\",{value:!0}),n.mapValuesAsync=n.mapEntriesAsync=void 0;const o=(t,[e,i])=>({...t,[e]:i});async function s(t,e){return(await Promise.all(e.map((async([e,i])=>[e,await t(i,e)])))).reduce(o,{})}n.mapEntriesAsync=s,n.mapValuesAsync=async function(t,e){let i;return i=e instanceof Map?[...e.entries()]:Object.entries(e),s(t,i)};var r,a,l,h,d=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldSet||function(t,e,i,n,o){if(\"m\"===n)throw new TypeError(\"Private method is not writable\");if(\"a\"===n&&!o)throw new TypeError(\"Private accessor was defined without a setter\");if(\"function\"==typeof e?t!==e||!o:!e.has(t))throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");return\"a\"===n?o.call(t,i):o?o.value=i:e.set(t,i),i},c=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldGet||function(t,e,i,n){if(\"a\"===i&&!n)throw new TypeError(\"Private accessor was defined without a getter\");if(\"function\"==typeof e?t!==e||!n:!e.has(t))throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");return\"m\"===i?n:\"a\"===i?n.call(t):n?n.value:e.get(t)};Object.defineProperty(i,\"__esModule\",{value:!0});var m=i.DefaultLayoutManager=void 0;const u=n;class p{constructor(t){a.set(this,void 0),l.set(this,new Map),d(this,a,t,\"f\")}size(){return c(this,l,\"f\").size}async applyLayoutSnapshot({layouts:t}){if(Object.keys(t).length>1)throw new Error(\"[LayoutManager] Tried to call applyLayoutSnapshot with more than 1 layout. When implementing multiple layouts via overridden LayoutManager class, you must override and fully implement the applyLayoutSnapshot method without calling super.applyLayoutSnapshot().\");const[[e,i]]=Object.entries(t);await p.createLayout(this,{layoutName:e,layout:i})}async showLayout({layoutName:t}){}async getLayoutSnapshot(){return{layouts:await(0,u.mapValuesAsync)((t=>t.getFrameSnapshot()),c(this,l,\"f\"))}}async removeLayout({layoutName:t}){}getLayoutIdentityForView(t){const e=[...c(this,l,\"f\").values()].find((e=>e.getCurrentViews().some((e=>e.name===t.name&&e.uuid===t.uuid))));return e?.identity??void 0}isLayoutVisible({layoutName:t}){return c(p,r,\"m\",h).call(p,this,t).isVisible()}resolveLayoutIdentity(t){if(t&&\"layoutName\"in t)return t;const e=[...c(this,l,\"f\").values()];if(1===e.length)return e[0].identity;const i=e.find((t=>t.isVisible()));return i?.identity??void 0}static async resolveLayout(t,e){const i=t.resolveLayoutIdentity(e);if(void 0===i||!(\"layoutName\"in i))throw new Error(\"[layout-manager] resolveLayout: Could not resolve the layout identity. Make sure you include 'layoutName' in the identity object.\");return c(p,r,\"m\",h).call(p,t,i.layoutName)}static async handleSharedView(t,e,i){await(0,u.mapValuesAsync)((async t=>{if(t.identity.layoutName!==e.layoutName){const e=t.getCurrentViews().find((t=>t.name===i.name));e&&await t.onViewDetached({viewIdentity:e,target:null}).catch(console.error)}}),c(t,l,\"f\"))}static async handleLastViewRemoved(t,e){await t.removeLayout(e),await c(t,a,\"f\").handleLastViewRemoved(t)}static async destroyLayout(t,{layoutName:e}){await c(p,r,\"m\",h).call(p,t,e).destroy(),c(t,l,\"f\").delete(e)}static async createLayout(t,e){const{layoutName:i}=e;if(c(t,l,\"f\").has(i))throw new Error(`Layout name ${i} already exists`);await c(t,a,\"f\").createLayout(e,t)}static registerLayout(t,e,i){c(t,l,\"f\").set(e,i)}static getAllLayouts(t){return[...c(t,l,\"f\").values()]}static setInitialSnapshot(t,e){c(t,a,\"f\").setInitialSnapshot(e)}static createClosedConstructor(...t){return class extends p{constructor(){super(...t)}}}}m=i.DefaultLayoutManager=p,r=p,a=new WeakMap,l=new WeakMap,h=function(t,e){const i=c(t,l,\"f\").get(e);if(!i)throw new Error(`[layout-manager] getLayoutByName: Could not locate layout with name '${e}'`);return i};var g={},f={},v={};Object.defineProperty(v,\"__esModule\",{value:!0}),v.ReversibleMap=void 0;v.ReversibleMap=class{constructor(){this.valueToKey=new Map,this.keyToValue=new Map,this.setUnique=(t,e)=>{if(this.hasKey(t)||this.hasValue(e))throw new Error(\"Key or value already in the map.\");this.keyToValue.set(t,e),this.valueToKey.set(e,t)},this.getKey=t=>{const e=this.valueToKey.get(t);if(!e)throw new Error(\"Value not found in the map.\");return e},this.deleteKey=t=>{const e=this.getValue(t);return this.keyToValue.delete(t),this.valueToKey.delete(e),e},this.deleteValue=t=>{const e=this.getKey(t);return this.keyToValue.delete(e),this.valueToKey.delete(t),e},this.hasKey=t=>this.keyToValue.has(t),this.hasValue=t=>this.valueToKey.has(t)}getValue(t){const e=this.keyToValue.get(t);if(!e)throw new Error(\"Key not found in the map.\");return e}},Object.defineProperty(f,\"__esModule\",{value:!0});var _=f.LayoutContentCache=void 0;const y=t.lazy,C=v;class w{constructor(){this.contentItemCache=new C.ReversibleMap,this.contentItemCacheId=0,this.createCacheKey=()=>{const t=`entity-${this.contentItemCacheId.toString()}`;return this.contentItemCacheId+=1,t},this.hasKey=t=>this.contentItemCache.hasKey(t),this.getItemOrUndefined=t=>{try{return this.getContentItemOrThrow(t)}catch(t){return}},this.getContentItemOrThrow=(t,e)=>{if(!this.contentItemCache.hasKey(t))throw new Error(\"Layout component has been destroyed or detached from the current layout.\");const i=this.contentItemCache.getValue(t);if(e&&!e.includes(i.type))throw new Error(`Layout item is not the expected type. Expected ${e.join(\", \")}, got ${i.type}.`);return i},this.getOrCreateEntityId=t=>{if(this.contentItemCache.hasValue(t))return this.contentItemCache.getKey(t);t.onDestroyed((()=>{this.contentItemCache.deleteValue(t)}));const e=this.createCacheKey();return this.contentItemCache.setUnique(e,t),e}}static getSingleInstance(){return w.singleton.getValue()}}_=f.LayoutContentCache=w,w.singleton=new y.Lazy((()=>new w));var I={},b={};!function(t){Object.defineProperty(t,\"__esModule\",{value:!0}),t.getAdjacentStacks=t.doShareEdge=t.getAdjacentItem=void 0;t.getAdjacentItem=(e,i)=>{const{parent:n}=e;if(e.isRoot()||!n)return;const o=[\"top\",\"bottom\"].includes(i)?\"column\":\"row\",s=[\"top\",\"left\"].includes(i)?-1:1;if(n.type===o){const t=n.contentItems.indexOf(e)+s;if(t>=0&&t{const n=t.getBounds(),o=e.getBounds();if(!n||!o)return!1;if([\"top\",\"bottom\"].includes(i)){return!(n.righto.right)}return!(n.bottomo.bottom)};t.getAdjacentStacks=(e,i)=>{const n=[\"top\",\"bottom\"].includes(i)?\"row\":\"column\",o=s=>\"stack\"===s.type?(0,t.doShareEdge)(e,s,i)?[s]:[]:\"root\"===s.type||\"ground\"===s.type?[]:s.type===n?s.contentItems.map((t=>o(t))).flat():s.type!==n?[\"top\",\"right\"].includes(i)?o(s.contentItems[s.contentItems.length-1]):o(s.contentItems[0]):[],s=(0,t.getAdjacentItem)(e,i);return s?o(s):[]}}(b);var S=t.commonjsGlobal&&t.commonjsGlobal.__decorate||function(t,e,i,n){var o,s=arguments.length,r=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if(\"object\"==typeof Reflect&&\"function\"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(s<3?o(r):s>3?o(e,i,r):o(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};Object.defineProperty(I,\"__esModule\",{value:!0}),I.LayoutEntitiesController=void 0;const E=t.decorators,x=b,L=i;class z{constructor(t,e,i){this.wire=t,this.layoutManager=e,this.layoutContentCache=i,this.analytics=t=>{this.wire.sendAction(`layout-controller-${t}`).catch((()=>{}))},this.getLayoutIdentityForViewOrThrow=async t=>{const e=this.layoutManager.getLayoutIdentityForView(t);if(!e)throw new Error(`View identity ${t.name} is not attached to any layouts.`);return e},this.getRoot=async t=>{this.analytics(\"get-root\");const e=(await this.getLayout(t)).getRoot();return{type:e.type,entityId:this.layoutContentCache.getOrCreateEntityId(e)}},this.getStackByView=async t=>{this.analytics(\"get-stack-by-view\");const e=await this.getLayoutIdentityForViewOrThrow(t),i=(await this.getLayout(e)).getStackByView(t);if(\"stack\"===i?.type)return{entityId:this.layoutContentCache.getOrCreateEntityId(i),type:\"stack\"}},this.getStackViews=t=>{this.analytics(\"get-stack-views\");return this.layoutContentCache.getContentItemOrThrow(t,[\"stack\"]).contentItems.map((t=>({name:t.viewName,uuid:this.wire.me.uuid})))},this.isRoot=t=>{this.analytics(\"is-root\");return this.layoutContentCache.getContentItemOrThrow(t).isRoot()},this.exists=t=>(this.analytics(\"exists\"),this.layoutContentCache.hasKey(t)),this.addViewToStack=async(t,e,{index:i}={index:0})=>{this.analytics(\"add-view-to-stack\");const n=this.layoutContentCache.getContentItemOrThrow(t);if(i&&i>n.contentItems.length+1)throw new Error(`Index '${i}' out of range, please exclude the index or specify a number between 0 and ${n.contentItems.length}`);const o={id:t,index:i},{identity:s}=await n.layout.platformCreateView(e,{location:o});return s},this.findViewInStack=(t,e)=>t.contentItems.find((t=>t.viewName===e.name)),this.removeViewFromStack=async(t,e)=>{this.analytics(\"remove-view-from-stack\");const i=this.layoutContentCache.getContentItemOrThrow(t,[\"stack\"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to remove a view ('${e.name}') which does not belong to the stack.`);await n.layout.platformCloseView(e)},this.createAdjacentStack=async(t,e,{position:i=\"right\"}={})=>{if(this.analytics(\"create-adjacent-stack\"),!Array.isArray(e)||0===e.length)throw new Error('The parameter \"views\" must be an array with at least 1 element.');if(![\"top\",\"bottom\",\"left\",\"right\"].includes(i))throw new Error(`Invalid position '${i}' specified.`);const n=this.layoutContentCache.getContentItemOrThrow(t).createAdjacentStack({position:i}),o=this.layoutContentCache.getOrCreateEntityId(n);return await Promise.all(e.reverse().map((t=>this.addViewToStack(o,t)))),o},this.getAdjacentStacks=async({targetId:t,edge:e})=>{this.analytics(\"get-adjacent-stacks\");const i=this.layoutContentCache.getContentItemOrThrow(t);return(0,x.getAdjacentStacks)(i,e).map((t=>({entityId:this.layoutContentCache.getOrCreateEntityId(t)})))},this.setStackActiveView=async(t,e)=>{this.analytics(\"set-stack-active-view\");const i=this.layoutContentCache.getContentItemOrThrow(t,[\"stack\"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to set a view ('${e.name}') as active when it does not belong to the stack.`);i.setActiveContentItem(n,!0)}}async getLayout(t){const e=await L.DefaultLayoutManager.resolveLayout(this.layoutManager,t);if(!e)throw new Error(`Could not resolve target layout identity ${JSON.stringify(t)}`);return e}getContent(t){this.analytics(\"get-content\");return this.layoutContentCache.getContentItemOrThrow(t,[\"column\",\"row\"]).contentItems.map((t=>({type:t.type,entityId:this.layoutContentCache.getOrCreateEntityId(t)})))}getParent(t){this.analytics(\"get-parent\");const e=this.layoutContentCache.getContentItemOrThrow(t);if(!e.isRoot())return e.parent?.contentItems.includes(e)?{type:e.parent.type,entityId:this.layoutContentCache.getOrCreateEntityId(e.parent)}:void 0}}S([(0,E.expose)()],z.prototype,\"getLayoutIdentityForViewOrThrow\",void 0),S([(0,E.expose)()],z.prototype,\"getRoot\",void 0),S([(0,E.expose)()],z.prototype,\"getStackByView\",void 0),S([(0,E.expose)()],z.prototype,\"getStackViews\",void 0),S([(0,E.expose)()],z.prototype,\"getContent\",null),S([(0,E.expose)()],z.prototype,\"getParent\",null),S([(0,E.expose)()],z.prototype,\"isRoot\",void 0),S([(0,E.expose)()],z.prototype,\"exists\",void 0),S([(0,E.expose)()],z.prototype,\"addViewToStack\",void 0),S([(0,E.expose)()],z.prototype,\"removeViewFromStack\",void 0),S([(0,E.expose)()],z.prototype,\"createAdjacentStack\",void 0),S([(0,E.expose)()],z.prototype,\"getAdjacentStacks\",void 0),S([(0,E.expose)()],z.prototype,\"setStackActiveView\",void 0),I.LayoutEntitiesController=z,Object.defineProperty(g,\"__esModule\",{value:!0});var M=g.initLayoutEndpoints=void 0;const P=t.apiExposer,T=t.layout_constants,A=f,k=I,D=i;M=g.initLayoutEndpoints=async function(t,e){const i=t.getFin(),n=await i.Platform.getCurrentSync().getClient(),o=new P.ChannelsExposer(n);await new P.ApiExposer(o).exposeInstance(new k.LayoutEntitiesController(t,e,A.LayoutContentCache.getSingleInstance()),{id:T.LAYOUT_CONTROLLER_ID}),await async function(t,e){const i=t=>async i=>{const n=await D.DefaultLayoutManager.resolveLayout(e,i.target);if(!n)throw new Error(`Could not resolve the layout target from payload ${JSON.stringify(i)}`);return t(n,i)},n=(e,n)=>{t.register(e,i(n))},o=(t,e)=>{n(t,e)};n(\"replace-view\",((t,e)=>t.replaceView(e))),n(\"replace-layout\",((t,{layout:e})=>t.replaceLayout(e))),n(\"add-view\",((t,e)=>t.insertView(e))),o(\"layout-add-view\",((t,{viewOptions:e,location:i,targetView:n})=>t.platformCreateView(e,{location:i,targetView:n}))),n(\"close-view\",((t,e)=>t.cleanupView(e.viewIdentity))),o(\"layout-close-view\",((t,e)=>t.platformCloseView(e.viewIdentity))),n(\"apply-preset-layout\",((t,e)=>t.applyPreset(e))),n(\"get-layout-views\",(t=>t.getCurrentViews())),n(\"get-frame-snapshot\",(t=>t.getFrameSnapshot())),n(\"is-visible\",(t=>t.isVisible())),n(\"destroy\",(t=>t.destroy())),t.register(\"get-layout-snapshot\",(()=>e.getLayoutSnapshot()))}(n,e)};var R={};Object.defineProperty(R,\"__esModule\",{value:!0});var U=R.BaseLayout=void 0;U=R.BaseLayout=class{};var O={};Object.defineProperty(O,\"__esModule\",{value:!0});var V=O.DOMEmitter=void 0;V=O.DOMEmitter=class{constructor(t){this.container=t}dispatchLocalEvent(t,e){const i={...e,type:t,tabSelector:`tab-${e.name}`,containerSelector:`container-${e.name}`,topic:\"openfin-DOM-event\"};this.container.dispatchEvent(new CustomEvent(t,{detail:i}))}};var B={};Object.defineProperty(B,\"__esModule\",{value:!0});var H=B.mapLayoutContentItemsImmutableSync=B.mapLayoutContentItemsImmutable=W=B.isVisible=void 0;var W=B.isVisible=t=>(0!==t.offsetWidth||0!==t.offsetHeight)&&\"hidden\"!==window.getComputedStyle(t).visibility&&t.offsetTop>=0&&t.offsetLeft>=0&&t.offsetTop<=window.innerHeight&&t.offsetLeft<=window.innerWidth;const F=t=>\"type\"in t&&\"component\"===t.type;B.mapLayoutContentItemsImmutable=async function t(e,i){return F(i)?e(i):{...i,content:await Promise.all(i.content?.map((i=>t(e,i))))}},H=B.mapLayoutContentItemsImmutableSync=function t(e,i){return F(i)?e(i):{...i,content:i.content?.map((i=>t(e,i)))}};class N extends Error{constructor(t,e){super(e),this.type=t}}class G extends N{constructor(t,e){super(\"Configuration\",t),this.node=e}}class j extends N{constructor(t){super(\"PopoutBlocked\",t)}}class $ extends N{constructor(t){super(\"API\",t)}}class Z extends N{constructor(t){super(\"Bind\",t)}}class q extends Error{constructor(t,e,i){super(`${t}: ${e}${void 0===i?\"\":\": \"+i}`)}}class X extends q{constructor(t,e){super(\"Assert\",t,e)}}class Y extends q{constructor(t,e,i){super(\"UnreachableCase\",t,`${e}${void 0===i?\"\":\": \"+i}`)}}class K extends q{constructor(t,e){super(\"UnexpectedNull\",t,e)}}class J extends q{constructor(t,e){super(\"UnexpectedUndefined\",t,e)}}var Q;!function(t){let e=!1;const i={PopoutCannotBeCreatedWithGroundItemConfig:{id:0,default:\"Popout cannot be created with ground ItemConfig\"},PleaseRegisterAConstructorFunction:{id:1,default:\"Please register a constructor function\"},ComponentTypeNotRegisteredAndBindComponentEventHandlerNotAssigned:{id:2,default:\"Component type not registered and BindComponentEvent handler not assigned\"},ComponentIsAlreadyRegistered:{id:3,default:\"Component is already registered\"},ComponentIsNotVirtuable:{id:4,default:\"Component is not virtuable. Requires rootHtmlElement field/getter\"},VirtualComponentDoesNotHaveRootHtmlElement:{id:5,default:'Virtual component does not have getter \"rootHtmlElement\"'},ItemConfigIsNotTypeComponent:{id:6,default:\"ItemConfig is not of type component\"},InvalidNumberPartInSizeString:{id:7,default:\"Invalid number part in size string\"},UnknownUnitInSizeString:{id:8,default:\"Unknown unit in size string\"},UnsupportedUnitInSizeString:{id:9,default:\"Unsupported unit in size string\"}};t.idCount=Object.keys(i).length;const n=Object.values(i);t.checkInitialise=function(){if(!e)for(let e=0;e=\"0\"&&t<=\"9\"}function Tt(t,e){const i=zt(e);t.style.width=i}function At(t,e){const i=zt(e);t.style.height=i}function kt(t){return{width:t.offsetWidth,height:t.offsetHeight}}function Dt(t,e){t.style.display=e?\"\":\"none\"}function Rt(t,e){if(void 0!==e)for(const i in e)if(e.hasOwnProperty(i)){const n=e[i],o=t[i];t[i]=Ut(o,n)}return t}function Ut(t,e){if(\"object\"!=typeof e)return e;if(Array.isArray(e)){const t=e.length,i=new Array(t);for(let n=0;n36)throw new Error(\"Too many keys in config minifier map\")},t.translateObject=n}(dt||(dt={})),function(t){t.defaults={type:at.ground,content:[],size:1,sizeUnit:ht.Fractional,minSize:void 0,minSizeUnit:ht.Pixel,id:\"\",isClosable:!0},t.createCopy=function(t,e){switch(t.type){case at.ground:case at.row:case at.column:return gt.createCopy(t,e);case at.stack:return ut.createCopy(t,e);case at.component:return pt.createCopy(t);default:throw new Y(\"CICC91354\",t.type,\"Invalid Config Item type specified\")}},t.createDefault=function(t){switch(t){case at.ground:throw new X(\"CICCDR91562\");case at.row:case at.column:return gt.createDefault(t);case at.stack:return ut.createDefault();case at.component:return pt.createDefault();default:throw new Y(\"CICCDD91563\",t,\"Invalid Config Item type specified\")}},t.isComponentItem=function(t){return t.type===at.component},t.isStackItem=function(t){return t.type===at.stack},t.isGroundItem=function(t){return t.type===at.ground}}(ct||(ct={})),function(t){t.defaultMaximised=!1,function(t){t.createCopy=function(t,e){return void 0===t?void 0:{show:null!=e?e:t.show,popout:t.popout,close:t.close,maximise:t.maximise,minimise:t.minimise,tabDropdown:t.tabDropdown}}}(t.Header||(t.Header={}))}(mt||(mt={})),function(t){function e(t){const e=t.length,i=new Array(e);for(let n=0;n\"__glMaximised\"===t));t>0&&(o=!0,n=n.splice(t,1)),e=n.length>0?n[0]:ct.defaults.id}else e=n;return i=void 0!==t.maximised?t.maximised:o,{id:e,maximised:i}}}(wt||(wt={})),function(t){function e(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0;return{resolved:!0,root:Et.resolve(i),openPopouts:t.resolveOpenPopouts(e.openPopouts),dimensions:t.Dimensions.resolve(e.dimensions),settings:t.Settings.resolve(e.settings),header:t.Header.resolve(e.header,e.settings,e.labels)}}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:Lt.fromResolvedArray(e.openPopouts),settings:_t.Settings.createCopy(e.settings),dimensions:t.Dimensions.fromResolved(e.dimensions),header:_t.Header.createCopy(e.header)}},t.isResolved=function(t){const e=t;return void 0!==e.resolved&&!0===e.resolved},t.resolveOpenPopouts=function(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0,{root:Et.resolve(o),openPopouts:xt.resolveOpenPopouts(e.openPopouts),dimensions:xt.Dimensions.resolve(e.dimensions),settings:xt.Settings.resolve(e.settings),header:xt.Header.resolve(e.header,e.settings,e.labels),parentId:null!==(i=e.parentId)&&void 0!==i?i:null,indexInParent:null!==(n=e.indexInParent)&&void 0!==n?n:null,window:t.Window.resolve(e.window,e.dimensions),resolved:!0}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:i(e.openPopouts),dimensions:xt.Dimensions.fromResolved(e.dimensions),settings:_t.Settings.createCopy(e.settings),header:_t.Header.createCopy(e.header),parentId:e.parentId,indexInParent:e.indexInParent,window:t.Window.fromResolved(e.window)}},t.fromResolvedArray=i}(Lt||(Lt={}));class Wt{constructor(){this._allEventSubscriptions=[],this._subscriptionsMap=new Map,this.unbind=this.removeEventListener,this.trigger=this.emit}tryBubbleEvent(t,e){}emit(t,...e){let i=this._subscriptionsMap.get(t);if(void 0!==i){i=i.slice();for(let t=0;t0){const n=e.slice();n.unshift(t);const o=this._allEventSubscriptions.slice();for(let t=0;t0?n.contentItems[0]:n,e=0);const o=this._layoutManager.createAndInitContentItem(i,t);t.addChild(o,e),this._layoutManager.layoutConfig.settings.popInOnClose?this._onClose():this.close()}createWindow(){const t=this.createUrl(),e=Math.floor(1e6*Math.random()).toString(36),i=this.serializeWindowFeatures({width:this._initialWindowSize.width,height:this._initialWindowSize.height,innerWidth:this._initialWindowSize.width,innerHeight:this._initialWindowSize.height,menubar:\"no\",toolbar:\"no\",location:\"no\",personalbar:\"no\",resizable:\"yes\",scrollbars:\"no\",status:\"no\"});if(this._popoutWindow=globalThis.open(t,e,i),this._popoutWindow)this._popoutWindow.addEventListener(\"load\",(()=>this.positionWindow()),{passive:!0}),this._popoutWindow.addEventListener(\"beforeunload\",(()=>{this._layoutManager.layoutConfig.settings.popInOnClose?this.popIn():this._onClose()}),{passive:!0}),this._checkReadyInterval=setInterval((()=>this.checkReady()),10);else if(!0===this._layoutManager.layoutConfig.settings.blockedPopoutsThrowError){throw new j(\"Popout blocked\")}}checkReady(){if(null===this._popoutWindow)throw new K(\"BPCR01844\");this._popoutWindow.__glInstance&&this._popoutWindow.__glInstance.isInitialised&&(this.onInitialised(),void 0!==this._checkReadyInterval&&(clearInterval(this._checkReadyInterval),this._checkReadyInterval=void 0))}serializeWindowFeatures(t){const e=[];for(const i in t)e.push(i+\"=\"+t[i].toString());return e.join(\",\")}createUrl(){const t=\"gl-window-config-\"+Ot(),e=_t.minifyConfig(this._config);try{localStorage.setItem(t,JSON.stringify(e))}catch(t){throw new Error(\"Error while writing to localStorage \"+function(t){return t instanceof Error?t.message:\"string\"==typeof t?t:\"Unknown Error\"}(t))}const i=new URL(location.href);return i.searchParams.set(\"gl-window\",t),i.toString()}positionWindow(){if(null===this._popoutWindow)throw new Error(\"BrowserPopout.positionWindow: null popoutWindow\");this._popoutWindow.moveTo(this._initialWindowSize.left,this._initialWindowSize.top),this._popoutWindow.focus()}onInitialised(){this._isInitialised=!0,this.getGlInstance().on(\"popIn\",(()=>this.popIn())),this.emit(\"initialised\")}_onClose(){setTimeout((()=>this.emit(\"closed\")),50)}}class Gt extends Wt{constructor(t,e,i,n){super(),this.layoutManager=t,this._parent=i,this._element=n,this._popInParentIds=[],this._type=e.type,this._id=e.id,this._isInitialised=!1,this.isGround=!1,this.isRow=!1,this.isColumn=!1,this.isStack=!1,this.isComponent=!1,this.size=e.size,this.sizeUnit=e.sizeUnit,this.minSize=e.minSize,this.minSizeUnit=e.minSizeUnit,this._isClosable=e.isClosable,this._pendingEventPropagations={},this._throttledEvents=[\"stateChanged\"],this._contentItems=this.createContentItems(e.content)}get type(){return this._type}get id(){return this._id}set id(t){this._id=t}get popInParentIds(){return this._popInParentIds}get parent(){return this._parent}get contentItems(){return this._contentItems}get isClosable(){return this._isClosable}get element(){return this._element}get isInitialised(){return this._isInitialised}static isStack(t){return t.isStack}static isComponentItem(t){return t.isComponent}static isComponentParentableItem(t){return t.isStack||t.isGround}removeChild(t,e=!1){const i=this._contentItems.indexOf(t);if(-1===i)throw new Error(\"Can't remove child item. Unknown content item\");if(e||this._contentItems[i].destroy(),this._contentItems.splice(i,1),this._contentItems.length>0)this.updateSize(!1);else if(!this.isGround&&!0===this._isClosable){if(null===this._parent)throw new K(\"CIUC00874\");this._parent.removeChild(this)}}addChild(t,e,i){return null!=e||(e=this._contentItems.length),this._contentItems.splice(e,0,t),t.setParent(this),!0===this._isInitialised&&!1===t._isInitialised&&t.init(),e}replaceChild(t,e,i=!1){const n=this._contentItems.indexOf(t),o=t._element.parentNode;if(-1===n)throw new X(\"CIRCI23232\",\"Can't replace child. oldChild is not child of this\");if(null===o)throw new K(\"CIRCP23232\");if(o.replaceChild(e._element,t._element),!0===i&&(t._parent=null,t.destroy()),this._contentItems[n]=e,e.setParent(this),e.size=t.size,e.sizeUnit=t.sizeUnit,e.minSize=t.minSize,e.minSizeUnit=t.minSizeUnit,null===e._parent)throw new K(\"CIRCNC45699\");!0===e._parent._isInitialised&&!1===e._isInitialised&&e.init(),this.updateSize(!1)}remove(){if(null===this._parent)throw new K(\"CIR11110\");this._parent.removeChild(this)}popout(){const t=Ot(),e=this.layoutManager.createPopoutFromContentItem(this,void 0,t,void 0);return this.emitBaseBubblingEvent(\"stateChanged\"),e}calculateConfigContent(){const t=this._contentItems,e=t.length,i=new Array(e);for(let n=0;nthis.propagateEventToLayoutManager(t,e))))}propagateEventToLayoutManager(t,e){this._pendingEventPropagations[t]=!1,this.layoutManager.emitUnknown(t,e)}}class jt extends Gt{constructor(t,e,i){super(t,e,i,document.createElement(\"div\")),this._parentItem=i,this._focused=!1,this.isComponent=!0,this._reorderEnabled=e.reorderEnabled,this.applyUpdatableConfig(e),this._initialWantMaximise=e.maximised;const n=document.createElement(\"div\");n.classList.add(\"lm_content\"),this.element.appendChild(n),this._container=new Ft(e,this,t,n,(t=>this.handleUpdateItemConfigEvent(t)),(()=>this.show()),(()=>this.hide()),(t=>this.focus(t)),(t=>this.blur(t)))}get componentName(){return this._container.componentType}get componentType(){return this._container.componentType}get reorderEnabled(){return this._reorderEnabled}get initialWantMaximise(){return this._initialWantMaximise}get component(){return this._container.component}get container(){return this._container}get parentItem(){return this._parentItem}get headerConfig(){return this._headerConfig}get title(){return this._title}get tab(){return this._tab}get focused(){return this._focused}destroy(){this._container.destroy(),super.destroy()}applyUpdatableConfig(t){this.setTitle(t.title),this._headerConfig=t.header}toConfig(){const t=this._container.stateRequestEvent,e=void 0===t?this._container.state:t();return{type:at.component,content:[],size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,maximised:!1,isClosable:this.isClosable,reorderEnabled:this._reorderEnabled,title:this._title,header:mt.Header.createCopy(this._headerConfig),componentType:pt.copyComponentType(this.componentType),componentState:e}}close(){if(null===this.parent)throw new K(\"CIC68883\");this.parent.removeChild(this,!1)}enterDragMode(t,e){Tt(this.element,t),At(this.element,e),this._container.enterDragMode(t,e)}exitDragMode(){this._container.exitDragMode()}enterStackMaximised(){this._container.enterStackMaximised()}exitStackMaximised(){this._container.exitStackMaximised()}drag(){this._container.drag()}updateSize(t){this.updateNodeSize(t)}init(){this.updateNodeSize(!1),super.init(),this._container.emit(\"open\"),this.initContentItems()}setTitle(t){this._title=t,this.emit(\"titleChanged\",t),this.emit(\"stateChanged\")}setTab(t){this._tab=t,this.emit(\"tab\",t),this._container.setTab(t)}hide(){super.hide(),this._container.setVisibility(!1)}show(){super.show(),this._container.setVisibility(!0)}focus(t=!1){this.parentItem.setActiveComponentItem(this,!0,t)}setFocused(t){this._focused=!0,this.tab.setFocused(),t||this.emitBaseBubblingEvent(\"focus\")}blur(t=!1){this._focused&&this.layoutManager.setFocusedComponentItem(void 0,t)}setBlurred(t){this._focused=!1,this.tab.setBlurred(),t||this.emitBaseBubblingEvent(\"blur\")}setParent(t){this._parentItem=t,super.setParent(t)}handleUpdateItemConfigEvent(t){this.applyUpdatableConfig(t)}updateNodeSize(t){if(\"none\"!==this.element.style.display){const{width:e,height:i}=kt(this.element);this._container.setSizeToNodeSize(e,i,t)}}}class $t extends Gt{constructor(){super(...arguments),this._focused=!1}get focused(){return this._focused}setFocusedValue(t){this._focused=t}}class Zt extends Wt{constructor(t,e){super(),this._eElement=t,this._pointerTracking=!1,this._pointerDownEventListener=t=>this.onPointerDown(t),this._pointerMoveEventListener=t=>this.onPointerMove(t),this._pointerUpEventListener=t=>this.onPointerUp(t),this._timeout=void 0,this._allowableTargets=[t,...e],this._oDocument=document,this._eBody=document.body,this._nDelay=1800,this._nDistance=10,this._nX=0,this._nY=0,this._nOriginalX=0,this._nOriginalY=0,this._dragging=!1,this._eElement.addEventListener(\"pointerdown\",this._pointerDownEventListener,{passive:!0})}destroy(){this.checkRemovePointerTrackingEventListeners(),this._eElement.removeEventListener(\"pointerdown\",this._pointerDownEventListener)}cancelDrag(){this.processDragStop(void 0)}onPointerDown(t){if(this._allowableTargets.includes(t.target)&&t.isPrimary){const e=this.getPointerCoordinates(t);this.processPointerDown(e)}}processPointerDown(t){this._nOriginalX=t.x,this._nOriginalY=t.y,this._oDocument.addEventListener(\"pointermove\",this._pointerMoveEventListener),this._oDocument.addEventListener(\"pointerup\",this._pointerUpEventListener,{passive:!0}),this._pointerTracking=!0,this._timeout=setTimeout((()=>{try{this.startDrag()}catch(t){throw console.error(t),t}}),this._nDelay)}onPointerMove(t){this._pointerTracking&&(this.processDragMove(t),t.preventDefault())}processDragMove(t){this._nX=t.pageX-this._nOriginalX,this._nY=t.pageY-this._nOriginalY,!1===this._dragging&&(Math.abs(this._nX)>this._nDistance||Math.abs(this._nY)>this._nDistance)&&this.startDrag(),this._dragging&&this.emit(\"drag\",this._nX,this._nY,t)}onPointerUp(t){this.processDragStop(t)}processDragStop(t){var e;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this.checkRemovePointerTrackingEventListeners(),!0===this._dragging&&(this._eBody.classList.remove(\"lm_dragging\"),this._eElement.classList.remove(\"lm_dragging\"),null===(e=this._oDocument.querySelector(\"iframe\"))||void 0===e||e.style.setProperty(\"pointer-events\",\"\"),this._dragging=!1,this.emit(\"dragStop\",t))}checkRemovePointerTrackingEventListeners(){this._pointerTracking&&(this._oDocument.removeEventListener(\"pointermove\",this._pointerMoveEventListener),this._oDocument.removeEventListener(\"pointerup\",this._pointerUpEventListener),this._pointerTracking=!1)}startDrag(){var t;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this._dragging=!0,this._eBody.classList.add(\"lm_dragging\"),this._eElement.classList.add(\"lm_dragging\"),null===(t=this._oDocument.querySelector(\"iframe\"))||void 0===t||t.style.setProperty(\"pointer-events\",\"none\"),this.emit(\"dragStart\",this._nOriginalX,this._nOriginalY)}getPointerCoordinates(t){return{x:t.pageX,y:t.pageY}}}class qt{constructor(t,e,i){this._isVertical=t,this._size=e,this._grabSize=i0){const i=this.createSplitter(Math.max(0,e-1)).element;e>0?(this.contentItems[e-1].element.insertAdjacentElement(\"afterend\",i),i.insertAdjacentElement(\"afterend\",t.element)):(this.contentItems[0].element.insertAdjacentElement(\"beforebegin\",i),i.insertAdjacentElement(\"beforebegin\",t.element))}else this._childElementContainer.appendChild(t.element);super.addChild(t,e);const n=1/this.contentItems.length*100;if(!0===i)return this.emitBaseBubblingEvent(\"stateChanged\"),e;for(let e=0;e0&&(this.calculateRelativeSizes(),this.setAbsoluteSizes()),this.emitBaseBubblingEvent(\"stateChanged\"),this.emit(\"resize\")}setAbsoluteSizes(){const t=this.calculateAbsoluteSizes();for(let e=0;e0&&t.itemSizes[e]++,this._isColumn?(Tt(this.contentItems[e].element,t.crossAxisSize),At(this.contentItems[e].element,t.itemSizes[e])):(Tt(this.contentItems[e].element,t.itemSizes[e]),At(this.contentItems[e].element,t.crossAxisSize))}calculateAbsoluteSizes(){const t=(this.contentItems.length-1)*this._splitterSize,{width:e,height:i}=kt(this.element);let n,o;this._isColumn?(n=i-t,o=e):(n=e-t,o=i);let s=0;const r=[];for(let t=0;t0){const n=100-t;for(let t=0;t100&&e.length>0){for(let t=0;te)return;{const r=i/e;let a=i;for(let e=0;ethis.onSplitterDrag(e,t,i))),e.on(\"dragStop\",(()=>this.onSplitterDragStop(e))),e.on(\"dragStart\",(()=>this.onSplitterDragStart(e))),this._splitter.splice(t,0,e),e}getSplitItems(t){const e=this._splitter.indexOf(t);return{before:this.contentItems[e],after:this.contentItems[e+1]}}calculateContentItemMinSize(t){const e=t.minSize;if(void 0!==e){if(t.minSizeUnit===ht.Pixel)return e;throw new X(\"ROCGMD98831\",JSON.stringify(t))}{const t=this.layoutManager.layoutConfig.dimensions;return this._isColumn?t.defaultMinItemHeight:t.defaultMinItemWidth}}calculateContentItemsTotalMinSize(t){let e=0;for(const i of t)e+=this.calculateContentItemMinSize(i);return e}onSplitterDragStart(t){const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=this.calculateContentItemsTotalMinSize(e.before.contentItems),s=this.calculateContentItemsTotalMinSize(e.after.contentItems);this._splitterPosition=0,this._splitterMinPosition=-1*(i-o),this._splitterMaxPosition=n-s}onSplitterDrag(t,e,i){let n=this._isColumn?i:e;if(null===this._splitterMinPosition||null===this._splitterMaxPosition)throw new K(\"ROCOSD59226\");n=Math.max(n,this._splitterMinPosition),n=Math.min(n,this._splitterMaxPosition),this._splitterPosition=n;const o=zt(n);this._isColumn?t.element.style.top=o:t.element.style.left=o}onSplitterDragStop(t){if(null===this._splitterPosition)throw new K(\"ROCOSDS66932\");{const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=(this._splitterPosition+i)/(i+n),s=e.before.size+e.after.size;e.before.size=o*s,e.after.size=(1-o)*s,t.element.style.top=zt(0),t.element.style.left=zt(0),globalThis.requestAnimationFrame((()=>this.updateSize(!1)))}}}!function(t){t.getElementDimensionSize=function(t,e){return\"width\"===e?function(t){return t.offsetWidth}(t):function(t){return t.offsetHeight}(t)},t.setElementDimensionSize=function(t,e,i){return\"width\"===e?Tt(t,i):At(t,i)},t.createElement=function(t,e){const i=t.createElement(\"div\");return i.classList.add(\"lm_item\"),e?i.classList.add(\"lm_column\"):i.classList.add(\"lm_row\"),i}}(Xt||(Xt={}));class Yt extends $t{constructor(t,e,i){super(t,vt.create(e),null,Yt.createElement(document)),this.isGround=!0,this._childElementContainer=this.element,this._containerElement=i;let n=null;for(;;){const t=n?n.previousSibling:this._containerElement.lastChild;if(!(t instanceof Element&&t.classList.contains(\"lm_content\")))break;n=t}this._containerElement.insertBefore(this.element,n)}init(){if(!0!==this.isInitialised){this.updateNodeSize();for(let t=0;t0?this.contentItems[0]:this,n.isComponent)throw new Error(\"Cannot add item as child to ComponentItem\");{const t=this.layoutManager.createAndInitContentItem(i,n);return e=n.addChild(t,e),n===this?-1:e}}loadComponentAsRoot(t){this.clearRoot();const e=Ct.resolve(t,!1);if(e.maximised)throw new Error(\"Root Component cannot be maximised\");{const t=new jt(this.layoutManager,e,this);t.init(),this.addChild(t,0)}}addChild(t,e){if(this.contentItems.length>0)throw new Error(\"Ground node can only have a single child\");return this._childElementContainer.appendChild(t.element),e=super.addChild(t,e),this.updateSize(!1),this.emitBaseBubblingEvent(\"stateChanged\"),e}calculateConfigContent(){const t=this.contentItems,e=t.length,i=new Array(e);for(let n=0;n0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e)),this.updateContentItemsSize(!1))}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}createSideAreas(){const t=Yt.Area.oppositeSides,e=new Array(Object.keys(t).length);let i=0;for(const n in t){const o=n,s=this.getElementArea();if(null===s)throw new K(\"RCSA77553\");s.side=o,\"2\"===t[o][1]?s[o]=s[t[o]]-50:s[o]=s[t[o]]+50,s.surface=(s.x2-s.x1)*(s.y2-s.y1),e[i++]=s}return e}highlightDropZone(t,e,i){this.layoutManager.tabDropPlaceholder.remove(),super.highlightDropZone(t,e,i)}onDrop(t,e){if(t.isComponent){const e=ut.createDefault(),i=t;e.header=mt.Header.createCopy(i.headerConfig);const n=this.layoutManager.createAndInitContentItem(e,this);n.addChild(t),t=n}if(0===this.contentItems.length)this.addChild(t);else{if(t.type===at.row||t.type===at.column){const e=ut.createDefault(),i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}const i=\"x\"==e.side[0]?at.row:at.column,n=\"2\"==e.side[1],o=this.contentItems[0];if(o instanceof Xt&&o.type===i){const e=o.contentItems[n?0:o.contentItems.length-1];o.addChild(t,n?0:void 0,!0),e.size*=.5,t.size=e.size,t.sizeUnit=ht.Percent,o.updateSize(!1)}else{const e=ct.createDefault(i),s=this.layoutManager.createContentItem(e,this);this.replaceChild(o,s),s.addChild(t,n?0:void 0,!0),s.addChild(o,n?void 0:0,!0),o.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}}dock(){throw new X(\"GID87731\")}validateDocking(){throw new X(\"GIVD87732\")}getAllContentItems(){const t=[this];return this.deepGetAllContentItems(this.contentItems,t),t}getConfigMaximisedItems(){const t=[];return this.deepFilterContentItems(this.contentItems,t,(t=>!(!Gt.isStack(t)||!t.initialWantMaximise)||!(!Gt.isComponentItem(t)||!t.initialWantMaximise))),t}getItemsByPopInParentId(t){const e=[];return this.deepFilterContentItems(this.contentItems,e,(e=>e.popInParentIds.includes(t))),e}toConfig(){throw new Error(\"Cannot generate GroundItem config\")}setActiveComponentItem(t,e,i){}updateNodeSize(){const{width:t,height:e}=kt(this._containerElement);Tt(this.element,t),At(this.element,e),this.contentItems.length>0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e))}deepGetAllContentItems(t,e){for(let i=0;ithis.onClick(t),this._touchStartEventListener=t=>this.onTouchStart(t),this._element=document.createElement(\"div\"),this._element.classList.add(i),this._element.title=e,this._header.on(\"destroy\",(()=>this.destroy())),this._element.addEventListener(\"click\",this._clickEventListener,{passive:!0}),this._element.addEventListener(\"touchstart\",this._touchStartEventListener,{passive:!0}),this._header.controlsContainerElement.appendChild(this._element)}get element(){return this._element}destroy(){var t;this._element.removeEventListener(\"click\",this._clickEventListener),this._element.removeEventListener(\"touchstart\",this._touchStartEventListener),null===(t=this._element.parentNode)||void 0===t||t.removeChild(this._element)}onClick(t){this._pushEvent(t)}onTouchStart(t){this._pushEvent(t)}}class Jt{constructor(t,e,i,n,o){var s;this._layoutManager=t,this._componentItem=e,this._closeEvent=i,this._focusEvent=n,this._dragStartEvent=o,this._isActive=!1,this._tabClickListener=t=>this.onTabClickDown(t),this._tabTouchStartListener=t=>this.onTabTouchStart(t),this._closeClickListener=()=>this.onCloseClick(),this._closeTouchStartListener=()=>this.onCloseTouchStart(),this._dragStartListener=(t,e)=>this.onDragStart(t,e),this._contentItemDestroyListener=()=>this.onContentItemDestroy(),this._tabTitleChangedListener=t=>this.setTitle(t),this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_tab\"),this._titleElement=document.createElement(\"span\"),this._titleElement.classList.add(\"lm_title\"),this._closeElement=document.createElement(\"div\"),this._closeElement.classList.add(\"lm_close_tab\"),this._element.appendChild(this._titleElement),this._element.appendChild(this._closeElement),e.isClosable?this._closeElement.style.display=\"\":this._closeElement.style.display=\"none\",this.setTitle(e.title),this._componentItem.on(\"titleChanged\",this._tabTitleChangedListener);(null!==(s=e.reorderEnabled)&&void 0!==s?s:this._layoutManager.layoutConfig.settings.reorderEnabled)&&this.enableReorder(),this._element.addEventListener(\"click\",this._tabClickListener,{passive:!0}),this._element.addEventListener(\"touchstart\",this._tabTouchStartListener,{passive:!0}),this._componentItem.isClosable?(this._closeElement.addEventListener(\"click\",this._closeClickListener,{passive:!0}),this._closeElement.addEventListener(\"touchstart\",this._closeTouchStartListener,{passive:!0})):(this._closeElement.remove(),this._closeElement=void 0),this._componentItem.setTab(this),this._layoutManager.emit(\"tabCreated\",this)}get isActive(){return this._isActive}get componentItem(){return this._componentItem}get contentItem(){return this._componentItem}get element(){return this._element}get titleElement(){return this._titleElement}get closeElement(){return this._closeElement}get reorderEnabled(){return void 0!==this._dragListener}set reorderEnabled(t){t!==this.reorderEnabled&&(t?this.enableReorder():this.disableReorder())}setTitle(t){this._titleElement.innerText=t,this._element.title=t}setActive(t){t!==this._isActive&&(this._isActive=t,t?this._element.classList.add(\"lm_active\"):this._element.classList.remove(\"lm_active\"))}destroy(){var t,e;this._closeEvent=void 0,this._focusEvent=void 0,this._dragStartEvent=void 0,this._element.removeEventListener(\"click\",this._tabClickListener),this._element.removeEventListener(\"touchstart\",this._tabTouchStartListener),null===(t=this._closeElement)||void 0===t||t.removeEventListener(\"click\",this._closeClickListener),null===(e=this._closeElement)||void 0===e||e.removeEventListener(\"touchstart\",this._closeTouchStartListener),this._componentItem.off(\"titleChanged\",this._tabTitleChangedListener),this.reorderEnabled&&this.disableReorder(),this._element.remove()}setBlurred(){this._element.classList.remove(\"lm_focused\"),this._titleElement.classList.remove(\"lm_focused\")}setFocused(){this._element.classList.add(\"lm_focused\"),this._titleElement.classList.add(\"lm_focused\")}onDragStart(t,e){if(void 0===this._dragListener)throw new J(\"TODSDLU10093\");if(void 0===this._dragStartEvent)throw new J(\"TODS23309\");this._dragStartEvent(t,e,this._dragListener,this.componentItem)}onContentItemDestroy(){void 0!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=void 0)}onTabClickDown(t){const e=t.target;e!==this._element&&e!==this._titleElement||(0===t.button?this.notifyFocus():1===t.button&&this._componentItem.isClosable&&this.notifyClose())}onTabTouchStart(t){t.target===this._element&&this.notifyFocus()}onCloseClick(){this.notifyClose()}onCloseTouchStart(){this.notifyClose()}notifyClose(){if(void 0===this._closeEvent)throw new J(\"TNC15007\");this._closeEvent(this._componentItem)}notifyFocus(){if(void 0===this._focusEvent)throw new J(\"TNA15007\");this._focusEvent(this._componentItem)}enableReorder(){this._dragListener=new Zt(this._element,[this._titleElement]),this._dragListener.on(\"dragStart\",this._dragStartListener),this._componentItem.on(\"destroy\",this._contentItemDestroyListener)}disableReorder(){if(void 0===this._dragListener)throw new J(\"TDR87745\");this._componentItem.off(\"destroy\",this._contentItemDestroyListener),this._dragListener.off(\"dragStart\",this._dragStartListener),this._dragListener=void 0}}class Qt{constructor(t,e,i,n,o){this._layoutManager=t,this._componentRemoveEvent=e,this._componentFocusEvent=i,this._componentDragStartEvent=n,this._dropdownActiveChangedEvent=o,this._tabs=[],this._lastVisibleTabIndex=-1,this._dropdownActive=!1,this._element=document.createElement(\"section\"),this._element.classList.add(\"lm_tabs\"),this._dropdownElement=document.createElement(\"section\"),this._dropdownElement.classList.add(\"lm_tabdropdown_list\"),this._dropdownElement.style.display=\"none\"}get tabs(){return this._tabs}get tabCount(){return this._tabs.length}get lastVisibleTabIndex(){return this._lastVisibleTabIndex}get element(){return this._element}get dropdownElement(){return this._dropdownElement}get dropdownActive(){return this._dropdownActive}destroy(){for(let t=0;tthis.handleTabCloseEvent(t)),(t=>this.handleTabFocusEvent(t)),((t,e,i,n)=>this.handleTabDragStartEvent(t,e,i,n)));void 0===e&&(e=this._tabs.length),this._tabs.splice(e,0,i),ethis._lastVisibleTabIndex){const t=this._tabs[e];for(let t=e;t>0;t--)this._tabs[t]=this._tabs[t-1];this._tabs[0]=t}}updateTabSizes(t,e){let i=!1;this.tryUpdateTabSizes(i,t,e)||(i=!0,this.tryUpdateTabSizes(i,t,e)),i!==this._dropdownActive&&(this._dropdownActive=i,this._dropdownActiveChangedEvent())}tryUpdateTabSizes(t,e,i){if(this._tabs.length>0){if(void 0===i)throw new Error(\"non-empty tabs must have active component item\");let n=0,o=!1;const s=this._layoutManager.layoutConfig.settings.tabOverlapAllowance,r=this._tabs.indexOf(i.tab),a=this._tabs[r];this._lastVisibleTabIndex=-1;for(let i=0;ie){if(o)i===r&&(l.style.zIndex=\"auto\",l.style.marginLeft=\"\",l.parentElement!==this._element&&this._element.appendChild(l));else{let t;if(t=r>0&&r<=i?(d-e)/(i-1):(d-e)/i,tthis.onClick(t),this._touchStartListener=t=>this.onTouchStart(t),this._rowColumnClosable=!0,this._closeButton=null,this._popoutButton=null,this._tabsContainer=new Qt(this._layoutManager,(t=>this.handleTabInitiatedComponentRemoveEvent(t)),(t=>this.handleTabInitiatedComponentFocusEvent(t)),((t,e,i,n)=>this.handleTabInitiatedDragStartEvent(t,e,i,n)),(()=>this.processTabDropdownActiveChanged())),this._show=i.show,this._popoutEnabled=i.popoutEnabled,this._popoutLabel=i.popoutLabel,this._maximiseEnabled=i.maximiseEnabled,this._maximiseLabel=i.maximiseLabel,this._minimiseEnabled=i.minimiseEnabled,this._minimiseLabel=i.minimiseLabel,this._closeEnabled=i.closeEnabled,this._closeLabel=i.closeLabel,this._tabDropdownEnabled=i.tabDropdownEnabled,this._tabDropdownLabel=i.tabDropdownLabel,this.setSide(i.side),this._canRemoveComponent=this._configClosable,this._element=document.createElement(\"section\"),this._element.classList.add(\"lm_header\"),this._controlsContainerElement=document.createElement(\"section\"),this._controlsContainerElement.classList.add(\"lm_controls\"),this._element.appendChild(this._tabsContainer.element),this._element.appendChild(this._controlsContainerElement),this._element.appendChild(this._tabsContainer.dropdownElement),this._element.addEventListener(\"click\",this._clickListener,{passive:!0}),this._element.addEventListener(\"touchstart\",this._touchStartListener,{passive:!0}),this._documentMouseUpListener=()=>this._tabsContainer.hideAdditionalTabsDropdown(),globalThis.document.addEventListener(\"mouseup\",this._documentMouseUpListener,{passive:!0}),this._tabControlOffset=this._layoutManager.layoutConfig.settings.tabControlOffset,this._tabDropdownEnabled&&(this._tabDropdownButton=new Kt(this,this._tabDropdownLabel,\"lm_tabdropdown\",(()=>this._tabsContainer.showAdditionalTabsDropdown()))),this._popoutEnabled&&(this._popoutButton=new Kt(this,this._popoutLabel,\"lm_popout\",(()=>this.handleButtonPopoutEvent()))),this._maximiseEnabled&&(this._maximiseButton=new Kt(this,this._maximiseLabel,\"lm_maximise\",(t=>this.handleButtonMaximiseToggleEvent(t)))),this._configClosable&&(this._closeButton=new Kt(this,this._closeLabel,\"lm_close\",(()=>s()))),this.processTabDropdownActiveChanged()}get show(){return this._show}get side(){return this._side}get leftRightSided(){return this._leftRightSided}get layoutManager(){return this._layoutManager}get parent(){return this._parent}get tabs(){return this._tabsContainer.tabs}get lastVisibleTabIndex(){return this._tabsContainer.lastVisibleTabIndex}get element(){return this._element}get tabsContainerElement(){return this._tabsContainer.element}get controlsContainerElement(){return this._controlsContainerElement}destroy(){this.emit(\"destroy\"),this._popoutEvent=void 0,this._maximiseToggleEvent=void 0,this._clickEvent=void 0,this._touchStartEvent=void 0,this._componentRemoveEvent=void 0,this._componentFocusEvent=void 0,this._componentDragStartEvent=void 0,this._tabsContainer.destroy(),globalThis.document.removeEventListener(\"mouseup\",this._documentMouseUpListener),this._element.remove()}createTab(t,e){this._tabsContainer.createTab(t,e)}removeTab(t){this._tabsContainer.removeTab(t)}processActiveComponentChanged(t){this._tabsContainer.processActiveComponentChanged(t),this.updateTabSizes()}setSide(t){this._side=t,this._leftRightSided=[nt.right,nt.left].includes(this._side)}setRowColumnClosable(t){this._rowColumnClosable=t,this.updateClosability()}updateClosability(){let t;if(this._configClosable)if(this._rowColumnClosable){t=!0;const e=this.tabs.length;for(let i=0;i1}applyFocusedValue(t){t?this._element.classList.add(\"lm_focused\"):this._element.classList.remove(\"lm_focused\")}processMaximised(){if(void 0===this._maximiseButton)throw new J(\"HPMAX16997\");this._maximiseButton.element.setAttribute(\"title\",this._minimiseLabel)}processMinimised(){if(void 0===this._maximiseButton)throw new J(\"HPMIN16997\");this._maximiseButton.element.setAttribute(\"title\",this._maximiseLabel)}updateTabSizes(){if(this._tabsContainer.tabCount>0){const t=this._show?this._layoutManager.layoutConfig.dimensions.headerHeight:0;let e;this._leftRightSided?(this._element.style.height=\"\",this._element.style.width=zt(t)):(this._element.style.width=\"\",this._element.style.height=zt(t)),e=this._leftRightSided?this._element.offsetHeight-this._controlsContainerElement.offsetHeight-this._tabControlOffset:this._element.offsetWidth-this._controlsContainerElement.offsetWidth-this._tabControlOffset,this._tabsContainer.updateTabSizes(e,this._getActiveComponentItemEvent())}}handleTabInitiatedComponentRemoveEvent(t){if(this._canRemoveComponent){if(void 0===this._componentRemoveEvent)throw new J(\"HHTCE22294\");this._componentRemoveEvent(t)}}handleTabInitiatedComponentFocusEvent(t){if(void 0===this._componentFocusEvent)throw new J(\"HHTAE22294\");this._componentFocusEvent(t)}handleTabInitiatedDragStartEvent(t,e,i,n){if(this._canRemoveComponent){if(void 0===this._componentDragStartEvent)throw new J(\"HHTDSE22294\");this._componentDragStartEvent(t,e,i,n)}else i.cancelDrag()}processTabDropdownActiveChanged(){void 0!==this._tabDropdownButton&&Dt(this._tabDropdownButton.element,this._tabsContainer.dropdownActive)}handleButtonPopoutEvent(){if(this._layoutManager.layoutConfig.settings.popoutWholeStack){if(void 0===this._popoutEvent)throw new J(\"HHBPOE17834\");this._popoutEvent()}else{const t=this._getActiveComponentItemEvent();t&&t.popout()}}handleButtonMaximiseToggleEvent(t){if(void 0===this._maximiseToggleEvent)throw new J(\"HHBMTE16834\");this._maximiseToggleEvent()}onClick(t){t.target===this._element&&this.notifyClick(t)}onTouchStart(t){t.target===this._element&&this.notifyTouchStart(t)}notifyClick(t){if(void 0===this._clickEvent)throw new J(\"HNHC46834\");this._clickEvent(t)}notifyTouchStart(t){if(void 0===this._touchStartEvent)throw new J(\"HNHTS46834\");this._touchStartEvent(t)}}class ee extends $t{constructor(t,e,i){var n,o,s,r,a,l,h,d,c,m,u,p,g,f,v,_,y,C,w;super(t,e,i,ee.createElement(document)),this._headerSideChanged=!1,this._resizeListener=()=>this.handleResize(),this._maximisedListener=()=>this.handleMaximised(),this._minimisedListener=()=>this.handleMinimised(),this._headerConfig=e.header;const I=t.layoutConfig.header,b=e.content;let S;if(1!==b.length)S=void 0;else{S=b[0].header}this._initialWantMaximise=e.maximised,this._initialActiveItemIndex=null!==(n=e.activeItemIndex)&&void 0!==n?n:0;const E=null!==(r=null!==(s=null===(o=this._headerConfig)||void 0===o?void 0:o.show)&&void 0!==s?s:null==S?void 0:S.show)&&void 0!==r?r:I.show,x=null!==(h=null!==(l=null===(a=this._headerConfig)||void 0===a?void 0:a.popout)&&void 0!==l?l:null==S?void 0:S.popout)&&void 0!==h?h:I.popout,L=null!==(m=null!==(c=null===(d=this._headerConfig)||void 0===d?void 0:d.maximise)&&void 0!==c?c:null==S?void 0:S.maximise)&&void 0!==m?m:I.maximise,z=null!==(g=null!==(p=null===(u=this._headerConfig)||void 0===u?void 0:u.close)&&void 0!==p?p:null==S?void 0:S.close)&&void 0!==g?g:I.close,M=null!==(_=null!==(v=null===(f=this._headerConfig)||void 0===f?void 0:f.minimise)&&void 0!==v?v:null==S?void 0:S.minimise)&&void 0!==_?_:I.minimise,P=null!==(w=null!==(C=null===(y=this._headerConfig)||void 0===y?void 0:y.tabDropdown)&&void 0!==C?C:null==S?void 0:S.tabDropdown)&&void 0!==w?w:I.tabDropdown;this._maximisedEnabled=!1!==L;const T={show:!1!==E,side:!1===E?nt.top:E,popoutEnabled:!1!==x,popoutLabel:!1===x?\"\":x,maximiseEnabled:this._maximisedEnabled,maximiseLabel:!1===L?\"\":L,closeEnabled:!1!==z,closeLabel:!1===z?\"\":z,minimiseEnabled:!0,minimiseLabel:M,tabDropdownEnabled:!1!==P,tabDropdownLabel:!1===P?\"\":P};this._header=new te(t,this,T,e.isClosable&&!1!==z,(()=>this.getActiveComponentItem()),(()=>this.remove()),(()=>this.handlePopoutEvent()),(()=>this.toggleMaximise()),(t=>this.handleHeaderClickEvent(t)),(t=>this.handleHeaderTouchStartEvent(t)),(t=>this.handleHeaderComponentRemoveEvent(t)),(t=>this.handleHeaderComponentFocusEvent(t)),((t,e,i,n)=>this.handleHeaderComponentStartDragEvent(t,e,i,n))),this.isStack=!0,this._childElementContainer=document.createElement(\"section\"),this._childElementContainer.classList.add(\"lm_items\"),this.on(\"resize\",this._resizeListener),this._maximisedEnabled&&(this.on(\"maximised\",this._maximisedListener),this.on(\"minimised\",this._minimisedListener)),this.element.appendChild(this._header.element),this.element.appendChild(this._childElementContainer),this.setupHeaderPosition(),this._header.updateClosability()}get childElementContainer(){return this._childElementContainer}get header(){return this._header}get headerShow(){return this._header.show}get headerSide(){return this._header.side}get headerLeftRightSided(){return this._header.leftRightSided}get contentAreaDimensions(){return this._contentAreaDimensions}get initialWantMaximise(){return this._initialWantMaximise}get isMaximised(){return this===this.layoutManager.maximisedStack}get stackParent(){if(!this.parent)throw new Error(\"Stack should always have a parent\");return this.parent}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}init(){if(!0===this.isInitialised)return;this.updateNodeSize();for(let t=0;t0){if(this._initialActiveItemIndex<0||this._initialActiveItemIndex>=e)throw new Error(`ActiveItemIndex out of range: ${this._initialActiveItemIndex} id: ${this.id}`);for(let i=0;ithis.contentItems.length)throw e-=1,new X(\"SAC99728\");if(t instanceof jt)return e=super.addChild(t,e),this._childElementContainer.appendChild(t.element),this._header.createTab(t,e),this.setActiveComponentItem(t,i),this._header.updateTabSizes(),this.updateSize(!1),t.container.setBaseLogicalZIndex(),this._header.updateClosability(),this.emitStateChangedEvent(),e;throw new X(\"SACC88532\")}removeChild(t,e){const i=t,n=this.contentItems.indexOf(i),o=1===this.contentItems.length;if(this._activeComponentItem===i&&(i.focused&&i.blur(),!o)){const t=0===n?1:n-1;this.setActiveComponentItem(this.contentItems[t],!1)}this._header.removeTab(i),super.removeChild(i,e),o||this._header.updateClosability(),this.emitStateChangedEvent()}toggleMaximise(){this.isMaximised?this.minimise():this.maximise()}maximise(){if(!this.isMaximised){this.layoutManager.setMaximisedStack(this);const t=this.contentItems,e=t.length;for(let i=0;i0&&void 0===t)throw new Error(\"expected non-empty stack to have an active component item\");return{type:\"stack\",content:this.calculateConfigContent(),size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,isClosable:this.isClosable,maximised:this.isMaximised,header:this.createHeaderConfig(),activeItemIndex:t}}onDrop(t,e){if(\"header\"===this._dropSegment){if(this.resetHeaderDropZone(),void 0===this._dropIndex)throw new J(\"SODDI68990\");return void this.addChild(t,this._dropIndex)}if(\"body\"===this._dropSegment)return void this.addChild(t,0,!0);const i=\"top\"===this._dropSegment||\"bottom\"===this._dropSegment,n=\"left\"===this._dropSegment||\"right\"===this._dropSegment,o=\"top\"===this._dropSegment||\"left\"===this._dropSegment,s=i&&this.stackParent.isColumn||n&&this.stackParent.isRow;if(t.isComponent){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createAndInitContentItem(e,this);i.addChild(t),t=i}if(t.type===at.row||t.type===at.column){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}if(s){const e=this.stackParent.contentItems.indexOf(this);this.stackParent.addChild(t,o?e:e+1,!0),this.size*=.5,t.size=this.size,t.sizeUnit=this.sizeUnit,this.stackParent.updateSize(!1)}else{const e=i?at.column:at.row,n=ct.createDefault(e),s=this.layoutManager.createContentItem(n,this);this.stackParent.replaceChild(this,s),s.addChild(t,o?0:void 0,!0),s.addChild(this,o?void 0:0,!0),this.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}highlightDropZone(t,e){for(const i in this._contentAreaDimensions){const n=i,o=this._contentAreaDimensions[n].hoverArea;if(o.x1t&&o.y1e)return void(\"header\"===n?(this._dropSegment=\"header\",this.highlightHeaderDropZone(this._header.leftRightSided?e:t)):(this.resetHeaderDropZone(),this.highlightBodyDropZone(n)))}}getArea(){if(\"none\"===this.element.style.display)return null;const t=super.getElementArea(this._header.element),e=super.getElementArea(this._childElementContainer);if(null===t||null===e)throw new K(\"SGAHC13086\");const i=e.x2-e.x1,n=e.y2-e.y1;return this._contentAreaDimensions={header:{hoverArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2},highlightArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2}}},0===this.contentItems.length?(this._contentAreaDimensions.body={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2}},super.getElementArea(this.element)):(this._contentAreaDimensions.left={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x1+.25*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x1+.5*i,y2:e.y2}},this._contentAreaDimensions.top={hoverArea:{x1:e.x1+.25*i,y1:e.y1,x2:e.x1+.75*i,y2:e.y1+.5*n},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y1+.5*n}},this._contentAreaDimensions.right={hoverArea:{x1:e.x1+.75*i,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1+.5*i,y1:e.y1,x2:e.x2,y2:e.y2}},this._contentAreaDimensions.bottom={hoverArea:{x1:e.x1+.25*i,y1:e.y1+.5*n,x2:e.x1+.75*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1+.5*n,x2:e.x2,y2:e.y2}},super.getElementArea(this.element))}positionHeader(t){this._header.side!==t&&(this._header.setSide(t),this._headerSideChanged=!0,this.setupHeaderPosition())}updateNodeSize(){if(\"none\"!==this.element.style.display){const t=kt(this.element);if(this._header.show){t[this._header.leftRightSided?it.width:it.height]-=this.layoutManager.layoutConfig.dimensions.headerHeight}this._childElementContainer.style.width=zt(t.width),this._childElementContainer.style.height=zt(t.height);for(let e=0;e=o&&tthis.onDrag(t,e,i))),this._dragListener.on(\"dragStop\",(()=>this.onDrop())),this.createDragProxyElements(t,e),null===this._componentItem.parent)throw new K(\"DPC10097\");this._componentItemFocused=this._componentItem.focused,this._componentItemFocused&&this._componentItem.blur(),this._componentItem.parent.removeChild(this._componentItem,!0),this.setDimensions(),document.body.appendChild(this._element),this.determineMinMaxXY(),this._layoutManager.calculateItemAreas(),this.setDropPosition(t,e)}get element(){return this._element}createDragProxyElements(t,e){this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_dragProxy\");const i=document.createElement(\"div\");i.classList.add(\"lm_header\");const n=document.createElement(\"div\");n.classList.add(\"lm_tabs\");const o=document.createElement(\"div\");o.classList.add(\"lm_tab\");const s=document.createElement(\"span\");s.classList.add(\"lm_title\"),o.appendChild(s),n.appendChild(o),i.appendChild(n),this._proxyContainerElement=document.createElement(\"div\"),this._proxyContainerElement.classList.add(\"lm_content\"),this._element.appendChild(i),this._element.appendChild(this._proxyContainerElement),this._originalParent instanceof ee&&this._originalParent.headerShow&&(this._sided=this._originalParent.headerLeftRightSided,this._element.classList.add(\"lm_\"+this._originalParent.headerSide),[nt.right,nt.bottom].indexOf(this._originalParent.headerSide)>=0&&this._proxyContainerElement.insertAdjacentElement(\"afterend\",i)),this._element.style.left=zt(t),this._element.style.top=zt(e),o.setAttribute(\"title\",this._componentItem.title),s.insertAdjacentText(\"afterbegin\",this._componentItem.title),this._proxyContainerElement.appendChild(this._componentItem.element)}determineMinMaxXY(){const t=this._layoutManager.groundItem;if(void 0===t)throw new J(\"DPDMMXY73109\");{const e=t.element.getBoundingClientRect();this._minX=e.left+document.body.scrollLeft,this._minY=e.top+document.body.scrollTop,this._maxX=this._minX+e.width,this._maxY=this._minY+e.height}}onDrag(t,e,i){const n=i.pageX,o=i.pageY;this.setDropPosition(n,o),this._componentItem.drag()}setDropPosition(t,e){this._layoutManager.layoutConfig.settings.constrainDragToContainer&&(t<=this._minX?t=Math.ceil(this._minX):t>=this._maxX&&(t=Math.floor(this._maxX)),e<=this._minY?e=Math.ceil(this._minY):e>=this._maxY&&(e=Math.floor(this._maxY))),this._element.style.left=zt(t),this._element.style.top=zt(e),this._area=this._layoutManager.getArea(t,e),null!==this._area&&(this._lastValidArea=this._area,this._area.contentItem.highlightDropZone(t,e,this._area))}onDrop(){const t=this._layoutManager.dropTargetIndicator;if(null===t)throw new K(\"DPOD30011\");let e;if(t.hide(),this._componentItem.exitDragMode(),null!==this._area)e=this._componentItem,this._area.contentItem.onDrop(e,this._area);else if(null!==this._lastValidArea){e=this._componentItem;this._lastValidArea.contentItem.onDrop(e,this._lastValidArea)}else this._originalParent?(e=this._componentItem,this._originalParent.addChild(e)):this._componentItem.destroy();this._element.remove(),this._layoutManager.emit(\"itemDropped\",this._componentItem),this._componentItemFocused&&void 0!==e&&e.focus()}setDimensions(){const t=this._layoutManager.layoutConfig.dimensions;if(void 0===t)throw new Error(\"DragProxy.setDimensions: dimensions undefined\");let e=t.dragProxyWidth,i=t.dragProxyHeight;if(void 0===e||void 0===i)throw new Error(\"DragProxy.setDimensions: width and/or height undefined\");const n=!1===this._layoutManager.layoutConfig.header.show?0:t.headerHeight;this._element.style.width=zt(e),this._element.style.height=zt(i),e-=this._sided?n:0,i-=this._sided?0:n,this._proxyContainerElement.style.width=zt(e),this._proxyContainerElement.style.height=zt(i),this._componentItem.enterDragMode(e,i),this._componentItem.show()}}class ne{constructor(t,e,i,n,o,s,r){this._layoutManager=t,this._element=e,this._extraAllowableChildTargets=i,this._componentTypeOrFtn=n,this._componentState=o,this._title=s,this._id=r,this._dragListener=null,this._dummyGroundContainer=document.createElement(\"div\");const a=gt.createDefault(\"row\");this._dummyGroundContentItem=new Yt(this._layoutManager,a,this._dummyGroundContainer),this.createDragListener()}destroy(){this.removeDragListener()}createDragListener(){this.removeDragListener(),this._dragListener=new Zt(this._element,this._extraAllowableChildTargets),this._dragListener.on(\"dragStart\",((t,e)=>this.onDragStart(t,e))),this._dragListener.on(\"dragStop\",(()=>this.onDragStop()))}onDragStart(t,e){var i;const n=\"component\";let o;if(\"function\"==typeof this._componentTypeOrFtn){const t=this._componentTypeOrFtn();o=ne.isDragSourceComponentItemConfig(t)?{type:n,componentState:t.state,componentType:t.type,title:null!==(i=t.title)&&void 0!==i?i:this._title}:t}else o={type:n,componentState:this._componentState,componentType:this._componentTypeOrFtn,title:this._title,id:this._id};const s=bt.resolve(o,!1),r=new jt(this._layoutManager,s,this._dummyGroundContentItem);if(this._dummyGroundContentItem.contentItems.push(r),null===this._dragListener)throw new K(\"DSODSD66746\");{const i=new ie(t,e,this._dragListener,this._layoutManager,r,this._dummyGroundContentItem),n=this._layoutManager.transitionIndicator;if(null===n)throw new K(\"DSODST66746\");n.transitionElements(this._element,i.element)}}onDragStop(){this.createDragListener()}removeDragListener(){null!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=null)}}!function(t){t.isDragSourceComponentItemConfig=function(t){return!(\"componentType\"in t)}}(ne||(ne={}));class oe{constructor(){this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_dropTargetIndicator\");const t=document.createElement(\"div\");t.classList.add(\"lm_inner\"),this._element.appendChild(t),document.body.appendChild(this._element)}destroy(){this._element.remove()}highlightArea(t,e){this._element.style.left=zt(t.x1+e),this._element.style.top=zt(t.y1+e),this._element.style.width=zt(t.x2-t.x1-e),this._element.style.height=zt(t.y2-t.y1-e),this._element.style.display=\"block\"}hide(){Dt(this._element,!1)}}class se{constructor(){this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_transition_indicator\"),document.body.appendChild(this._element),this._toElement=null,this._fromDimensions=null,this._totalAnimationDuration=200,this._animationStartTime=null}destroy(){this._element.remove()}transitionElements(t,e){}nextAnimationFrame(){}measure(t){const e=t.getBoundingClientRect();return{left:e.left,top:e.top,width:t.offsetWidth,height:t.offsetHeight}}}class re extends Wt{constructor(t){super(),this._layoutManager=t,this._childEventListener=t=>this.onEventFromChild(t),globalThis.addEventListener(re.ChildEventName,this._childEventListener,{passive:!0})}emit(t,...e){\"userBroadcast\"===t?this.emitUserBroadcast(...e):super.emit(t,...e)}emitUserBroadcast(...t){this.handleUserBroadcastEvent(\"userBroadcast\",t)}destroy(){globalThis.removeEventListener(re.ChildEventName,this._childEventListener)}handleUserBroadcastEvent(t,e){this._layoutManager.isSubWindow?this.propagateToParent(t,e):this.propagateToThisAndSubtree(t,e)}onEventFromChild(t){const e=t.detail;this.handleUserBroadcastEvent(e.eventName,e.args)}propagateToParent(t,e){const i={bubbles:!0,cancelable:!0,detail:{layoutManager:this._layoutManager,eventName:t,args:e}},n=new CustomEvent(re.ChildEventName,i),o=globalThis.opener;if(null===o)throw new K(\"EHPTP15778\");o.dispatchEvent(n)}propagateToThisAndSubtree(t,e){this.emitUnknown(t,...e);for(let i=0;ithis.handleContainerResize())),this._windowBeforeUnloadListener=()=>this.onBeforeUnload(),this._windowBeforeUnloadListening=!1,this._maximisedStackBeforeDestroyedListener=t=>this.cleanupBeforeMaximisedStackDestroyed(t),this.isSubWindow=t.isSubWindow,this._constructorOrSubWindowLayoutConfig=t.constructorOrSubWindowLayoutConfig,Q.checkInitialise(),dt.checkInitialise(),void 0!==t.containerElement&&(this._containerElement=t.containerElement)}get container(){return this._containerElement}get isInitialised(){return this._isInitialised}get groundItem(){return this._groundItem}get root(){return this._groundItem}get openPopouts(){return this._openPopouts}get dropTargetIndicator(){return this._dropTargetIndicator}get transitionIndicator(){return this._transitionIndicator}get width(){return this._width}get height(){return this._height}get eventHub(){return this._eventHub}get rootItem(){if(void 0===this._groundItem)throw new Error(\"Cannot access rootItem before init\");return 0===this._groundItem.contentItems.length?void 0:this._groundItem.contentItems[0]}get focusedComponentItem(){return this._focusedComponentItem}get tabDropPlaceholder(){return this._tabDropPlaceholder}get maximisedStack(){return this._maximisedStack}get deprecatedConstructor(){return!this.isSubWindow&&void 0!==this._constructorOrSubWindowLayoutConfig}destroy(){if(this._isInitialised){this._windowBeforeUnloadListening&&(globalThis.removeEventListener(\"beforeunload\",this._windowBeforeUnloadListener),this._windowBeforeUnloadListening=!1),!0===this.layoutConfig.settings.closePopoutsOnUnload&&this.closeAllOpenPopouts(),this._resizeObserver.disconnect(),this.checkClearResizeTimeout(),void 0!==this._groundItem&&this._groundItem.destroy(),this._tabDropPlaceholder.remove(),null!==this._dropTargetIndicator&&this._dropTargetIndicator.destroy(),null!==this._transitionIndicator&&this._transitionIndicator.destroy(),this._eventHub.destroy();for(const t of this._dragSources)t.destroy();this._dragSources=[],this._isInitialised=!1}}minifyConfig(t){return _t.minifyConfig(t)}unminifyConfig(t){return _t.unminifyConfig(t)}init(){let t;if(this.setContainer(),this._dropTargetIndicator=new oe,this._transitionIndicator=new se,this.updateSizeFromContainer(),this.isSubWindow){if(void 0===this._constructorOrSubWindowLayoutConfig)throw new J(\"LMIU07155\");{const e=this._constructorOrSubWindowLayoutConfig.root;if(void 0===e)throw new X(\"LMIC07156\");if(!Ct.isComponent(e))throw new X(\"LMIC07157\");t=e;const i=xt.resolve(this._constructorOrSubWindowLayoutConfig);this.layoutConfig=Object.assign(Object.assign({},i),{root:void 0})}}else void 0===this._constructorOrSubWindowLayoutConfig?this.layoutConfig=_t.createDefault():this.layoutConfig=xt.resolve(this._constructorOrSubWindowLayoutConfig);const e=this.layoutConfig;this._groundItem=new Yt(this,e.root,this._containerElement),this._groundItem.init(),this.checkLoadedLayoutMaximiseItem(),this._resizeObserver.observe(this._containerElement),this._isInitialised=!0,this.adjustColumnsResponsive(),this.emit(\"initialised\"),void 0!==t&&this.loadComponentAsRoot(t)}loadLayout(t){if(!this.isInitialised)throw new Error(\"GoldenLayout: Need to call init() if LayoutConfig with defined root passed to constructor\");if(void 0===this._groundItem)throw new J(\"LMLL11119\");this.createSubWindows(),this.layoutConfig=xt.resolve(t),this._groundItem.loadRoot(this.layoutConfig.root),this.checkLoadedLayoutMaximiseItem(),this.adjustColumnsResponsive()}saveLayout(){if(!1===this._isInitialised)throw new Error(\"Can't create config, layout not yet initialised\");if(void 0===this._groundItem)throw new J(\"LMTC18244\");{const t=this._groundItem.calculateConfigContent();let e;e=1!==t.length?void 0:t[0],this.reconcilePopoutWindows();const i=[];for(let t=0;t=0?n=this._groundItem.contentItems[0]:e=0;break;case at.row:case at.column:e=n.addItem(t,i.index);break;case at.stack:if(Ct.isComponent(t)){e=n.addItem(t,i.index);break}throw Error(tt[6]);case at.component:throw new X(\"LMAIALC87444602\");default:throw new Y(\"LMAIALU98881733\",n.type)}if(Ct.isComponent(t)){const t=n.contentItems[e];Gt.isStack(t)&&(n=t,e=0)}return i.parentItem=n,i.index=e,i}}}loadComponentAsRoot(t){if(void 0===this._groundItem)throw new Error(\"Cannot add item before init\");this._groundItem.loadComponentAsRoot(t)}updateSize(t,e){this.setSize(t,e)}setSize(t,e){if(this._width=t,this._height=e,!0===this._isInitialised){if(void 0===this._groundItem)throw new J(\"LMUS18881\");if(this._groundItem.setSize(this._width,this._height),this._maximisedStack){const{width:t,height:e}=kt(this._containerElement);Tt(this._maximisedStack.element,t),At(this._maximisedStack.element,e),this._maximisedStack.updateSize(!1)}this.adjustColumnsResponsive()}}beginSizeInvalidation(){this._sizeInvalidationBeginCount++}endSizeInvalidation(){0==--this._sizeInvalidationBeginCount&&this.updateSizeFromContainer()}updateSizeFromContainer(){const{width:t,height:e}=kt(this._containerElement);this.setSize(t,e)}updateRootSize(t=!1){if(void 0===this._groundItem)throw new J(\"LMURS28881\");this._groundItem.updateSize(t)}createAndInitContentItem(t,e){const i=this.createContentItem(t,e);return i.init(),i}createContentItem(t,e){if(\"string\"!=typeof t.type)throw new G(\"Missing parameter 'type'\",JSON.stringify(t));if(ct.isComponentItem(t)&&!(e instanceof ee)&&e&&!(!0===this.isSubWindow&&e instanceof Yt)){t={type:at.stack,content:[t],size:t.size,sizeUnit:t.sizeUnit,minSize:t.minSize,minSizeUnit:t.minSizeUnit,id:t.id,maximised:t.maximised,isClosable:t.isClosable,activeItemIndex:0,header:void 0}}return this.createContentItemFromConfig(t,e)}findFirstComponentItemById(t){if(void 0===this._groundItem)throw new J(\"LMFFCIBI82446\");return this.findFirstContentItemTypeByIdRecursive(at.component,t,this._groundItem)}createPopout(t,e,i,n){return t instanceof Gt?this.createPopoutFromContentItem(t,e,i,n):this.createPopoutFromItemConfig(t,e,i,n)}createPopoutFromContentItem(t,e,i,n){let o=t.parent,s=t;for(;null!==o&&1===o.contentItems.length&&!o.isGround;)s=o,o=o.parent;if(null===o)throw new K(\"LMCPFCI00834\");{if(void 0===n&&(n=o.contentItems.indexOf(s)),null!==i&&o.addPopInParentId(i),void 0===e){const i=globalThis.screenX||globalThis.screenLeft,n=globalThis.screenY||globalThis.screenTop,o=t.element.offsetLeft,s=t.element.offsetTop,{width:r,height:a}=kt(t.element);e={left:i+o,top:n+s,width:r,height:a}}const r=t.toConfig();if(t.remove(),ft.isRootItemConfig(r))return this.createPopoutFromItemConfig(r,e,i,n);throw new Error(`${tt[0]}`)}}beginVirtualSizedContainerAdding(){0==++this._virtualSizedContainerAddingBeginCount&&(this._virtualSizedContainers.length=0)}addVirtualSizedContainer(t){this._virtualSizedContainers.push(t)}endVirtualSizedContainerAdding(){if(0==--this._virtualSizedContainerAddingBeginCount){const t=this._virtualSizedContainers.length;if(t>0){this.fireBeforeVirtualRectingEvent(t);for(let e=0;ethis.emit(\"windowOpened\",a))),a.on(\"closed\",(()=>this.reconcilePopoutWindows())),this._openPopouts.push(a),this.layoutConfig.settings.closePopoutsOnUnload&&!this._windowBeforeUnloadListening&&(globalThis.addEventListener(\"beforeunload\",this._windowBeforeUnloadListener,{passive:!0}),this._windowBeforeUnloadListening=!0),a}closeAllOpenPopouts(){for(let t=0;tglobalThis.close()),1)}getArea(t,e){let i=null,n=1/0;for(let o=0;o=s.x1&&t=s.y1&&es.surface&&(n=s.surface,i=s)}return i}calculateItemAreas(){const t=this.getAllContentItems(),e=this._groundItem;if(void 0===e)throw new J(\"LMCIAR44365\");if(1!==t.length){e.contentItems[0].isStack?this._itemAreas=[]:this._itemAreas=e.createSideAreas();for(let e=0;e0){let e=t[0];if(Gt.isComponentItem(e)){const t=e.parent;if(null===t)throw new K(\"LMXLLMI69999\");e=t}if(!Gt.isStack(e))throw new X(\"LMCLLMI19993\");e.maximise()}}}processMaximiseStack(t){if(this._maximisedStack=t,t.on(\"beforeItemDestroyed\",this._maximisedStackBeforeDestroyedListener),t.element.classList.add(\"lm_maximised\"),t.element.insertAdjacentElement(\"afterend\",this._maximisePlaceholder),void 0===this._groundItem)throw new J(\"LMMXI19993\");{this._groundItem.element.prepend(t.element);const{width:e,height:i}=kt(this._containerElement);Tt(t.element,e),At(t.element,i),t.updateSize(!0),t.focusActiveContentItem(),this._maximisedStack.emit(\"maximised\"),this.emit(\"stateChanged\")}}processMinimiseMaximisedStack(){if(void 0===this._maximisedStack)throw new X(\"LMMMS74422\");{const t=this._maximisedStack;if(null===t.parent)throw new K(\"LMMI13668\");t.element.classList.remove(\"lm_maximised\"),this._maximisePlaceholder.insertAdjacentElement(\"afterend\",t.element),this._maximisePlaceholder.remove(),this.updateRootSize(!0),this._maximisedStack=void 0,t.off(\"beforeItemDestroyed\",this._maximisedStackBeforeDestroyedListener),t.emit(\"minimised\"),this.emit(\"stateChanged\")}}reconcilePopoutWindows(){const t=[];for(let e=0;e{this._resizeTimeoutId=void 0,this.beginSizeInvalidation(),this.endSizeInvalidation()}),this.resizeDebounceInterval))}checkClearResizeTimeout(){void 0!==this._resizeTimeoutId&&(clearTimeout(this._resizeTimeoutId),this._resizeTimeoutId=void 0)}setContainer(){var t;const e=document.body,i=null!==(t=this._containerElement)&&void 0!==t?t:e;if(i===e){this.resizeWithContainerAutomatically=!0;const t=document.documentElement;t.style.height=\"100%\",t.style.margin=\"0\",t.style.padding=\"0\",t.style.overflow=\"clip\",e.style.height=\"100%\",e.style.margin=\"0\",e.style.padding=\"0\",e.style.overflow=\"clip\"}this._containerElement=i}onBeforeUnload(){this.destroy()}adjustColumnsResponsive(){if(void 0===this._groundItem)throw new J(\"LMACR20883\");if(this._firstLoad=!1,this.useResponsiveLayout()&&!this._updatingColumnsResponsive&&this._groundItem.contentItems.length>0&&this._groundItem.contentItems[0].isRow){if(void 0===this._groundItem||null===this._width)throw new J(\"LMACR77412\");{const t=this._groundItem.contentItems[0].contentItems.length;if(t<=1)return;{const e=this.layoutConfig.dimensions.defaultMinItemWidth;if(t*e<=this._width)return;{this._updatingColumnsResponsive=!0;const i=t-Math.max(Math.floor(this._width/e),1),n=this._groundItem.contentItems[0],o=this.getAllStacks();if(0===o.length)throw new X(\"LMACRS77413\");{const t=o[0];for(let e=0;en?void 0:{parentItem:t,index:o}}}case 1:if(void 0===this._focusedComponentItem)return;{const t=this._focusedComponentItem.parentItem;return this.tryCreateLocationFromParentItem(t,e)}case 2:{const t=this.findFirstContentItemType(at.stack);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 3:{let t=this.findFirstContentItemType(at.row);return void 0!==t?this.tryCreateLocationFromParentItem(t,e):(t=this.findFirstContentItemType(at.column),void 0!==t?this.tryCreateLocationFromParentItem(t,e):void 0)}case 4:{const t=this.findFirstContentItemType(at.row);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 5:{const t=this.findFirstContentItemType(at.column);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 6:if(void 0===this._groundItem)throw new J(\"LMFLRIF18244\");return void 0!==this.rootItem?void 0:void 0===e||0===e?{parentItem:this._groundItem,index:0}:void 0;case 7:if(void 0===this._groundItem)throw new J(\"LMFLF18244\");{const t=this._groundItem.contentItems;if(0===t.length)return void 0===e||0===e?{parentItem:this._groundItem,index:0}:void 0;{const i=t[0];return this.tryCreateLocationFromParentItem(i,e)}}}}tryCreateLocationFromParentItem(t,e){const i=t.contentItems.length;return void 0===e?{parentItem:t,index:i}:e<0||e>i?void 0:{parentItem:t,index:e}}}!function(t){t.createMaximisePlaceElement=function(t){const e=t.createElement(\"div\");return e.classList.add(\"lm_maximise_place\"),e},t.createTabDropPlaceholderElement=function(t){const e=t.createElement(\"div\");return e.classList.add(\"lm_drop_tab_placeholder\"),e},t.defaultLocationSelectors=[{typeId:1,index:void 0},{typeId:2,index:void 0},{typeId:3,index:void 0},{typeId:7,index:void 0}],t.afterFocusedItemIfPossibleLocationSelectors=[{typeId:0,index:1},{typeId:2,index:void 0},{typeId:3,index:void 0},{typeId:7,index:void 0}]}(ae||(ae={}));class le extends ae{constructor(t,e,i,n){if(super(le.createLayoutManagerConstructorParameters(t,e)),this._bindComponentEventHanlderPassedInConstructor=!1,this._creationTimeoutPassed=!1,void 0!==e&&\"function\"==typeof e&&(this.bindComponentEvent=e,this._bindComponentEventHanlderPassedInConstructor=!0,void 0!==i&&(this.unbindComponentEvent=i)),!this._bindComponentEventHanlderPassedInConstructor&&this.isSubWindow){if(void 0===this._constructorOrSubWindowLayoutConfig)throw new J(\"VLC98823\");{const t=xt.resolve(this._constructorOrSubWindowLayoutConfig);this.layoutConfig=Object.assign(Object.assign({},t),{root:void 0})}}!0!==n&&(this.deprecatedConstructor||this.init())}destroy(){this.bindComponentEvent=void 0,this.unbindComponentEvent=void 0,super.destroy()}init(){if(this._bindComponentEventHanlderPassedInConstructor||\"loading\"!==document.readyState&&null!==document.body){if(!this._bindComponentEventHanlderPassedInConstructor&&!0===this.isSubWindow&&!this._creationTimeoutPassed)return setTimeout((()=>this.init()),7),void(this._creationTimeoutPassed=!0);!0===this.isSubWindow&&(this._bindComponentEventHanlderPassedInConstructor||this.clearHtmlAndAdjustStylesForSubWindow(),window.__glInstance=this),super.init()}else document.addEventListener(\"DOMContentLoaded\",(()=>this.init()),{passive:!0})}clearHtmlAndAdjustStylesForSubWindow(){const t=document.head,e=new Array(4);e[0]=document.querySelectorAll(\"body link\"),e[1]=document.querySelectorAll(\"body style\"),e[2]=document.querySelectorAll(\"template\"),e[3]=document.querySelectorAll(\".gl_keep\");for(let i=0;ithis.emit(\"popIn\"))),document.body.appendChild(t),!0}}bindComponent(t,e){if(void 0!==this.bindComponentEvent){return this.bindComponentEvent(t,e)}if(void 0!==this.getComponentEvent)return{virtual:!1,component:this.getComponentEvent(t,e)};{const t=`${tt[2]}: ${JSON.stringify(e)}`;throw new Z(t)}}unbindComponent(t,e,i){if(void 0!==this.unbindComponentEvent)this.unbindComponentEvent(t);else if(!e&&void 0!==this.releaseComponentEvent){if(void 0===i)throw new J(\"VCUCRCU333998\");this.releaseComponentEvent(t,i)}}}!function(t){let e=!1;t.createLayoutManagerConstructorParameters=function(t,i){const n=e?null:new URL(document.location.href).searchParams.get(\"gl-window\");e=!0;const o=null!==n;let s,r;if(null!==n){const e=localStorage.getItem(n);if(null===e)throw new Error(\"Null gl-window Config\");localStorage.removeItem(n);const i=JSON.parse(e),o=_t.unminifyConfig(i);r=xt.fromResolved(o),t instanceof HTMLElement&&(s=t)}else void 0===t?r=void 0:t instanceof HTMLElement?(r=void 0,s=t):r=t,void 0===s&&i instanceof HTMLElement&&(s=i);return{constructorOrSubWindowLayoutConfig:r,isSubWindow:o,containerElement:s}}}(le||(le={}));class he extends le{constructor(t,e,i){super(t,e,i,!0),this._componentTypesMap=new Map,this._registeredComponentMap=new Map,this._virtuableComponentMap=new Map,this._containerVirtualRectingRequiredEventListener=(t,e,i)=>this.handleContainerVirtualRectingRequiredEvent(t,e,i),this._containerVirtualVisibilityChangeRequiredEventListener=(t,e)=>this.handleContainerVirtualVisibilityChangeRequiredEvent(t,e),this._containerVirtualZIndexChangeRequiredEventListener=(t,e,i)=>this.handleContainerVirtualZIndexChangeRequiredEvent(t,e,i),this.deprecatedConstructor||this.init()}registerComponent(t,e,i=!1){if(\"function\"!=typeof e)throw new $(\"registerComponent() componentConstructorOrFactoryFtn parameter is not a function\");if(e.hasOwnProperty(\"prototype\")){const n=e;this.registerComponentConstructor(t,n,i)}else{const n=e;this.registerComponentFactoryFunction(t,n,i)}}registerComponentConstructor(t,e,i=!1){if(\"function\"!=typeof e)throw new Error(tt[1]);if(void 0!==this._componentTypesMap.get(t))throw new Z(`${tt[3]}: ${t}`);this._componentTypesMap.set(t,{constructor:e,factoryFunction:void 0,virtual:i})}registerComponentFactoryFunction(t,e,i=!1){if(\"function\"!=typeof e)throw new Z(\"Please register a constructor function\");if(void 0!==this._componentTypesMap.get(t))throw new Z(`${tt[3]}: ${t}`);this._componentTypesMap.set(t,{constructor:void 0,factoryFunction:e,virtual:i})}registerComponentFunction(t){this.registerGetComponentConstructorCallback(t)}registerGetComponentConstructorCallback(t){if(\"function\"!=typeof t)throw new Error(\"Please register a callback function\");void 0!==this._getComponentConstructorFtn&&console.warn(\"Multiple component functions are being registered. Only the final registered function will be used.\"),this._getComponentConstructorFtn=t}getRegisteredComponentTypeNames(){const t=this._componentTypesMap.keys();return Array.from(t)}getComponentInstantiator(t){let e;const i=pt.resolveComponentTypeName(t);return void 0!==i&&(e=this._componentTypesMap.get(i)),void 0===e&&void 0!==this._getComponentConstructorFtn&&(e={constructor:this._getComponentConstructorFtn(t),factoryFunction:void 0,virtual:!1}),e}bindComponent(t,e){let i;const n=pt.resolveComponentTypeName(e);let o;if(void 0!==n&&(i=this._componentTypesMap.get(n)),void 0===i&&void 0!==this._getComponentConstructorFtn&&(i={constructor:this._getComponentConstructorFtn(e),factoryFunction:void 0,virtual:!1}),void 0!==i){const s=i.virtual;let r,a;r=void 0===e.componentState?void 0:Ut({},e.componentState);const l=i.constructor;if(void 0!==l)a=new l(t,r,s);else{const e=i.factoryFunction;if(void 0===e)throw new X(\"LMBCFFU10008\");a=e(t,r,s)}if(s){if(void 0===a)throw new J(\"GLBCVCU988774\");{const e=a,i=e.rootHtmlElement;if(void 0===i)throw new Z(`${tt[5]}: ${n}`);!function(t){const e=\"absolute\";t.style.position!==e&&(t.style.position=e)}(i),this.container.appendChild(i),this._virtuableComponentMap.set(t,e),t.virtualRectingRequiredEvent=this._containerVirtualRectingRequiredEventListener,t.virtualVisibilityChangeRequiredEvent=this._containerVirtualVisibilityChangeRequiredEventListener,t.virtualZIndexChangeRequiredEvent=this._containerVirtualZIndexChangeRequiredEventListener}}this._registeredComponentMap.set(t,a),o={virtual:i.virtual,component:a}}else o=super.bindComponent(t,e);return o}unbindComponent(t,e,i){if(void 0===this._registeredComponentMap.get(t))super.unbindComponent(t,e,i);else{const e=this._virtuableComponentMap.get(t);if(void 0!==e){const i=e.rootHtmlElement;if(void 0===i)throw new X(\"GLUC77743\",t.title);this.container.removeChild(i),this._virtuableComponentMap.delete(t)}}}fireBeforeVirtualRectingEvent(t){this._goldenLayoutBoundingClientRect=this.container.getBoundingClientRect(),super.fireBeforeVirtualRectingEvent(t)}handleContainerVirtualRectingRequiredEvent(t,e,i){const n=this._virtuableComponentMap.get(t);if(void 0===n)throw new J(\"GLHCSCE55933\");{const o=n.rootHtmlElement;if(void 0===o)throw new Z(tt[4]+\" \"+t.title);{const n=t.element.getBoundingClientRect(),s=n.left-this._goldenLayoutBoundingClientRect.left;o.style.left=zt(s);const r=n.top-this._goldenLayoutBoundingClientRect.top;o.style.top=zt(r),Tt(o,e),At(o,i)}}}handleContainerVirtualVisibilityChangeRequiredEvent(t,e){const i=this._virtuableComponentMap.get(t);if(void 0===i)throw new J(\"GLHCVVCRE55934\");{const n=i.rootHtmlElement;if(void 0===n)throw new Z(tt[4]+\" \"+t.title);Dt(n,e)}}handleContainerVirtualZIndexChangeRequiredEvent(t,e,i){const n=this._virtuableComponentMap.get(t);if(void 0===n)throw new J(\"GLHCVZICRE55935\");{const e=n.rootHtmlElement;if(void 0===e)throw new Z(tt[4]+\" \"+t.title);e.style.zIndex=i}}}const de=\"initial_\",ce={show:\"top\",popout:!1,maximise:!1,close:\"close-tab-unused\"},me={headerHeight:31},ue={hasHeaders:!0,reorderEnabled:!0},pe={popoutWholeStack:!1,constrainDragToContainer:!1,constrainDragToHeaders:!1,preventDragout:!1,showMaximiseIcon:!1,showPopoutIcon:!1,showCloseIcon:!1,blockedPopoutsThrowError:!0,closePopoutsOnUnload:!0,selectionEnabled:!1};var ge,fe;class ve{constructor(e){this.layout=e,ge.set(this,void 0),fe.set(this,void 0),this.handleResize=t=>{t.forEach((t=>this.resizeElement(t.target)))},this.handleMutation=()=>{this.layout.viewComponentsByContainerElement.forEach((t=>{this.resizeElement(t.container.element)}))},t.__classPrivateFieldSet(this,ge,new ResizeObserver(this.handleResize),\"f\"),t.__classPrivateFieldSet(this,fe,new MutationObserver(this.handleMutation),\"f\")}observeMutations(e){t.__classPrivateFieldGet(this,fe,\"f\")?.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[\"class\"]})}destroy(){t.__classPrivateFieldGet(this,ge,\"f\").disconnect(),t.__classPrivateFieldGet(this,fe,\"f\").disconnect()}observeContainer(e){t.__classPrivateFieldGet(this,ge,\"f\").observe(e)}unobserveContainer(e){t.__classPrivateFieldGet(this,ge,\"f\").unobserve(e)}resizeElement(t){const e=this.layout.viewComponentsByContainerElement.get(t);e&&e.resize()}}ge=new WeakMap,fe=new WeakMap;var _e={};Object.defineProperty(_e,\"__esModule\",{value:!0});var ye=_e.BaseItem=void 0;class Ce{constructor(t,e,i){this._item=t,this._layout=e,this._wrap=i}get raw(){return this._item}get layout(){return this._layout}get type(){return this._item.type}get contentItems(){return(this._item.contentItems??[]).map((t=>this._wrap(t)))}get parent(){const t=this._item.parent;return t?this._wrap(t):null}setActiveContentItem(t,e){if(\"stack\"!==this.type)throw new Error(`Cannot call setActiveContentItem from a non-stack item: ${this.type}`);this._item.setActiveContentItem(t.raw,e)}static wrapInternal(t,e,i){const n=Ce.wrapCache.get(e);if(n)return n;const o=new t(e,i,(e=>Ce.wrapInternal(t,e,i)));return Ce.wrapCache.set(e,o),o}}ye=_e.BaseItem=Ce,Ce.wrapCache=new WeakMap;const we=t=>!!t&&\"contentItems\"in t&&(t.isRow||t.isColumn);class Ie extends ye{isRoot(){return!!this._item.parent?.isGround}getBounds(){return this._item.element.getBoundingClientRect()}get viewName(){if(this._item.isComponent){const{component:t}=this._item;return t.identity.name}throw new Error(\"View name not found\")}onDestroyed(t){const e=({target:i})=>{i===this._item&&(t(),this._item.off(\"itemDestroyed\",e))};this._item.on(\"itemDestroyed\",e)}createAdjacentStack({position:t=\"right\"}={}){const e=this.raw;if(ee.isStack(e)&&e.parent){const i=[\"top\",\"bottom\"].includes(t)?\"column\":\"row\",n=[\"left\",\"top\"].includes(t)?1:0,o=we(e.parent)?e.parent:e.layoutManager,s=o,r=e.parent.contentItems.indexOf(e);e.parent.isGround&&e.parent.removeChild(e,!0);const a=o.newItem({type:i,content:[{type:\"stack\",content:[]}]},r);if(!a)throw new Error(\"createAdjacentStack: Failed to create new container\");const l=a.contentItems[0];return a.addChild(this.raw,n),we(s)&&s.removeChild(e,!0),this._wrap(l)}throw new Error(`Cannot creat adjacent stacks for type: ${e.type}, must be type 'stack'`)}setActiveContentItem(t,e=!0){if(!ee.isStack(this._item))throw new Error(`Cannot call setActiveContentItem from a non-stack item: ${this.type}`);this._item.setActiveComponentItem(t.raw,!e)}static wrap(t,e){return ye.wrapInternal(Ie,t,e)}}function be(t=[],e){for(const i of t)\"component\"===i.type?Object.keys(e).forEach((t=>{t in i&&(i.componentState={[`${de}${t}`]:i[t],...i.componentState}),i[t]=e[t]})):be(i.content,e)}function Se(t=[],e,i){for(const n of t)if(\"component\"===n.type)Object.keys(e).forEach((t=>{if(`${de}${t}`in n.componentState)return n[t]=n.componentState[`${de}${t}`],void delete n.componentState[`${de}${t}`];n[t]=e[t]}));else{if(n.size&&(\"row\"===i||\"column\"===i)){n[\"row\"===i?\"width\":\"height\"]=n.size?.includes(\".\")?parseFloat(n.size):parseInt(n.size)}Se(n.content,e,n.type)}}function Ee(t){if(t.root){t.root.content&&Se([t.root],{componentName:\"view\",isClosable:!0});const e=t.root;t.content=[e],delete t.root}return t}const xe=e=>class extends e{connectedCallback(){if(!this.name||!this.uuid)throw new Error(\" Name or uuid attribute missing\");if(!this.src)throw new Error(\" missing 'src' attribute.\");this.#t||(this.#t=document.createElement(\"iframe\"),this.#t.src=this.src,this.#t.style.height=\"100%\",this.#t.style.width=\"100%\",this.#t.style.border=\"none\",this.forceFrameName?this.#t.setAttribute(\"name\",this.forceFrameName):this.#t.setAttribute(\"name\",t.encodeOptions({brokerUrl:this.brokerUrl,name:this.name,uuid:this.uuid,providerId:this.providerId,contextGroup:this.contextGroup},\"of-frame\")),this.#t.setAttribute(\"id\",this.name),this.appendChild(this.#t))}#t;get brokerUrl(){return this.getAttribute(\"of-broker\")}set brokerUrl(t){t&&this.setAttribute(\"of-broker\",t)}get name(){return this.getAttribute(\"of-name\")}set name(t){t&&this.setAttribute(\"of-name\",t)}get forceFrameName(){return this.getAttribute(\"forceFrameName\")}set forceFrameName(t){t&&this.setAttribute(\"forceFrameName\",t)}get uuid(){return this.getAttribute(\"of-uuid\")}set uuid(t){t&&this.setAttribute(\"of-uuid\",t)}get src(){return this.getAttribute(\"src\")}set src(t){t&&this.setAttribute(\"src\",t)}get providerId(){return this.getAttribute(\"of-provider-id\")}set providerId(t){t&&this.setAttribute(\"of-provider-id\",t)}get contextGroup(){return this.getAttribute(\"of-context-group\")}set contextGroup(t){t&&this.setAttribute(\"of-context-group\",t)}static get observedAttributes(){return[\"name\"]}};class Le{static create(t){const e=document.createElement(\"of-view\");return Object.entries(t).forEach((([t,i])=>{e.setAttribute(t,i)})),e}}customElements.define(\"of-view\",xe(HTMLElement));class ze{constructor(t,i,n,{brokerUrl:o,interopConfig:s},r){this.container=t,this.config=i,this.ofView=null,this.isDragging=()=>this.container.tab.element?.className.includes(\"lm_dragging\")??!1;const{url:a,web:l,interop:h,name:d}=i||{},c=d??`internal-generated-view-${e.v4()}`;if(this.identity={uuid:n,name:c},this.container.element.setAttribute(\"of-name\",c),this.container.element.id=`container-${c}`,this.container.parent.id=c,void 0===a)return void this.handleUrlMissing();const m=this.updateTitleIfNotSet(a),u={\"of-broker\":o,\"of-uuid\":n,\"of-name\":c,src:a};l?.frameName&&(u.forceFrameName=l.frameName);const p=h?.currentContextGroup??s?.currentContextGroup;p&&(u[\"of-context-group\"]=p),s?.providerId&&(u[\"of-provider-id\"]=s?.providerId),this.ofView=Le.create(u),this.ofView.title=m??`Iframe: ${a}`,r.appendChild(this.ofView),this.ofView.style.position=\"absolute\"}updateTitleIfNotSet(t){return\"view\"===this.container.parent.title&&this.container.parent.setTitle(t),this.container.parent.title}handleUrlMissing(){const t=document.createElement(\"div\");t.setAttribute(\"style\",\"padding: 20px\");t.innerText=\"No URL provided\",this.container.element.appendChild(t)}destroy(){this.ofView?.remove(),this.ofView=null}closeView(){this.container.close()}resize(){if(this.ofView){if(this.isDragging())return void(this.ofView.style.display=\"none\");const t=this.container.element.getBoundingClientRect();this.ofView.style.position=\"absolute\",this.ofView.style.height=`${t.height}px`,this.ofView.style.width=`${t.width}px`,this.ofView.style.inset=`${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`,this.ofView.style.display=\"block\"}}}class Me extends U{static overrideConfig(t){const e={...ue,...t.settings,...pe};return e.reorderEnabled?be(t.content,{isClosable:!0}):be(t.content,{reorderEnabled:!1}),{dimensions:me,...t,settings:e,header:{...ce,show:!1!==t.settings?.hasHeaders&&ce.show}}}constructor(t,e,i,{options:n},o,s){super(),this.identity=t,this.container=e,this.initialConfig=i,this.layoutManager=o,this.platformProvider=s,this.viewComponentsByContainerElement=new Map,this.layoutContentCache=_.getSingleInstance(),this.reparentingViews=new Set,this.goldenLayoutDestroyed=!1,this.createViewComponent=(t,e)=>{m.handleSharedView(this.layoutManager,this.identity,e);const i=new ze(t,e,this.identity.uuid,this.options,this.iframeContainer);return e&&!1===e[`${de}isClosable`]&&this.stylesheet.insertRule(`#tab-${i.identity.name} .lm_close_tab { display: none; }`),this.viewComponentsByContainerElement.set(t.element,i),this.resizeController.observeContainer(t.element),i},this.iframeContainer=document.createElement(\"div\"),this.iframeContainer.id=`openfin-layout-iframe-container-${this.identity.layoutName}`,this.domEmitter=new V(e),this.setupStylesheets(),this.layout=new he(this.container),this.layout.resizeWithContainerAutomatically=!0,this.options=n,this.layout.registerComponent(\"view\",this.createViewComponent),this.setupListeners(),this.resizeController=new ve(this),this.layout.loadLayout(Me.overrideConfig(i));const r=document.createElement(\"div\");r.id=`openfin-layout-shadow-container-${this.identity.layoutName}`,r.attachShadow({mode:\"open\",delegatesFocus:!1}).appendChild(this.iframeContainer),this.container.appendChild(r),this.resizeController.observeMutations(this.container)}getStackByView({name:t}){const e=this.layout.findFirstComponentItemById(t);if(e?.parent&&e?.parent?.isStack)return Ie.wrap(e.parent,this)}getRoot(){return Ie.wrap(this.layout.rootItem,this)}async platformCloseView(t){const e=[...this.viewComponentsByContainerElement.values()].find((e=>e.identity.name===t.name));if(!e)throw new Error(`View with name: ${t.name} not found in layout.`);e.closeView()}async platformCreateView(t,{location:e,targetView:i}={}){if(i)throw new Error(\"TargetView not supported in web\");const n={options:this.platformProvider.normalizeOptions(t),target:this.identity,location:e};return this.insertView(n)}setupStylesheets(){if(this.container.setAttribute(\"data-openfin-layout-name\",this.identity.layoutName),this.stylesheet=new CSSStyleSheet,this.stylesheet.insertRule(\".lm_close { display: none; }\"),document.adoptedStyleSheets.push(this.stylesheet),this.initialConfig.settings?.preventSplitterResize){const t=`\\n [data-openfin-layout-name='${this.identity.layoutName}'] .lm_splitter {\\n pointer-events: none;\\n }`;this.stylesheet.insertRule(t)}}insertView({options:t,location:e,targetView:i}){const n=e?this.layoutContentCache.getItemOrUndefined(e.id):void 0,o=i?this.layoutContentCache.getItemOrUndefined(i.name):void 0,s=n??o??Ie.wrap(this.layout.rootItem,this);let r;if(ee.isStack(s.raw))r=s.raw;else{if(!we(s.raw))throw new Error(\"Cannot add a view at the requested location\");r=s.raw.newItem({type:\"stack\",content:[]})}const a=Math.min(r.contentItems.length,e?.index??r.contentItems.length);let l=this.layout.findFirstComponentItemById(t.name);l?(l.parent&&l.parent.removeChild(l,!0),r.addChild(l,a)):l=r.newComponent(\"view\",t,t.title??t.url??\"Default Title\",a);const h=l.component.identity;return Promise.resolve({identity:h})}replaceView({viewToReplace:t,newView:e}){throw new Error(\"Method not implemented.\")}replaceLayout(t){throw new Error(\"Method not implemented.\")}async cleanupView(t){}applyPreset(t){throw new Error(\"Method not implemented.\")}getCurrentViews(){return[...this.viewComponentsByContainerElement.values()].map((t=>t.identity))}async getFrameSnapshot(){return Ee(xt.fromResolved(this.layout.toConfig()))}isVisible(){return W(this.container)}async onViewDetached({viewIdentity:t}){this.reparentingViews.add(t.name),this.platformCloseView(t)}async destroy(){this.goldenLayoutDestroyed||(this.goldenLayoutDestroyed=!0,this.layout.destroy()),this.iframeContainer.remove(),this.resizeController.destroy(),document.adoptedStyleSheets=document.adoptedStyleSheets.filter((t=>t!==this.stylesheet)),this.viewComponentsByContainerElement.clear()}setupListeners(){this.container.addEventListener(\"pointerdown\",(t=>{if(t.target instanceof HTMLElement){const e=t.target.classList;[\"lm_tab\",\"lm_title\",\"lm_splitter\",\"lm_drag_handle\"].some((t=>e.contains(t)))&&(this.handleDragStart(),2===t.button&&t.stopPropagation())}}),!0),document.addEventListener(\"pointerup\",(()=>this.handleDragEnd()),!0),this.layout.on(\"tabCreated\",(t=>{const e=t.componentItem.component;t.element.id=`tab-${e.identity.name}`,this.domEmitter.dispatchLocalEvent(\"tab-created\",e.identity)})),this.layout.on(\"itemCreated\",(({target:t})=>{const e=t;if(Gt.isComponentItem(e)){const t=e.component;this.domEmitter.dispatchLocalEvent(\"container-created\",t.identity)}})),this.layout.on(\"itemDestroyed\",(t=>{const e=t.target;if(Gt.isComponentItem(e)){const t=e.component;this.removeViewComponent(t)}})),this.layout.on(\"itemDropped\",(()=>{this.handleDragEnd()}))}handleDragStart(){this.iframeContainer.style.pointerEvents=\"none\"}handleDragEnd(){this.iframeContainer.style.pointerEvents=\"\"}removeViewComponent(t){if(t.config&&!1===t.config[`${de}isClosable`]){const e=[...this.stylesheet.cssRules].findIndex((e=>e.cssText.includes(`#tab-${t.identity.name}`)));this.stylesheet.deleteRule(e)}t.destroy(),this.viewComponentsByContainerElement.delete(t.container.element),this.resizeController.unobserveContainer(t.container.element),this.reparentingViews.has(t.identity.name)?this.reparentingViews.delete(t.identity.name):this.platformProvider.closeView(t.identity.name);0===this.getCurrentViews().length&&(this.goldenLayoutDestroyed||(this.goldenLayoutDestroyed=!0,m.handleLastViewRemoved(this.layoutManager,this.identity)))}}class Pe{constructor(t,e,i,n){this.windowIdentity=t,this.connectConfig=e,this.provider=i,this.fallbackContainer=n}async createLayout(t,e){if(!(\"container\"in t)&&!this.fallbackContainer)throw new Error(\"Container property is not optional in web\");const{layoutName:i}=t,n=t,o=this.provider.initLayoutViews(n),s=n.container??this.fallbackContainer,r={...this.windowIdentity,layoutName:i},a=new Me(r,s,o,this.connectConfig,e,this.provider);m.registerLayout(e,i,a),this.fallbackContainer=null}async getLayoutSnapshot(t){return t.getLayoutSnapshot()}async handleLastViewRemoved(t){}}class Te{static async init(e){const i=e.getFin().InterApplicationBus.Channel,n=await i.create(`custom-frame-${e.me.uuid}`);return n.setDefaultAction((async(t,{target:e,opts:i},o)=>{const s=n.connections.find((t=>t.name===e.name));if(s)return n.dispatch(s,t,{...i,target:e});throw new Error(`Client with name ${e.name} not found`)})),await t.relayChannelClientApi_1(n,\"layout-relay\"),new Te(e)}constructor(t){this.wire=t,this.viewNames=new Set}normalizeOptions(t,i=\"default\"){const n=this.wire.me.uuid;let{name:o=`internal-generated-view-${e.v4()}`}=t;return o.match(/^internal-generated-view-/)&&this.viewNames.has(o)&&\"duplicate\"===i&&(o=`internal-generated-view-${e.v4()}`),this.viewNames.add(o),{...t,name:o,uuid:n}}closeView(t){this.viewNames.delete(t)}initLayoutViews({layout:t,multiInstanceViewBehavior:e}){return H((t=>{if(\"component\"===t.type&&t.componentState){const i=this.normalizeOptions(t.componentState,e);return{...t,componentState:i}}return t}),t)}}var Ae;const ke=t=>t;Ae=new WeakMap,exports.WebLayoutEntryPoint=class{constructor(e){Ae.set(this,void 0),this.initLayoutManager=async(e,i,{container:n,layoutManagerOverride:o})=>{const s=await Te.init(i),r=o??ke,a=new Pe(i.me,t.__classPrivateFieldGet(this,Ae,\"f\"),s,n),l=new(r(m.createClosedConstructor(a)));return await M(i,l),l},this.applyLayoutSnapshot=async(e,i,n)=>{await i.applyLayoutSnapshot(t.__classPrivateFieldGet(this,Ae,\"f\").platform.layoutSnapshot)},this.createLayout=async(t,e)=>m.createLayout(t,e),this.destroyLayout=async(t,e)=>m.destroyLayout(t,e),t.__classPrivateFieldSet(this,Ae,e,\"f\")}};\n","'use strict'\n\nexports.byteLength = byteLength\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\nfor (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i]\n revLookup[code.charCodeAt(i)] = i\n}\n\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction getLens (b64) {\n var len = b64.length\n\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // Trim off extra bytes after placeholder bytes are found\n // See: https://github.com/beatgammit/base64-js/issues/42\n var validLen = b64.indexOf('=')\n if (validLen === -1) validLen = len\n\n var placeHoldersLen = validLen === len\n ? 0\n : 4 - (validLen % 4)\n\n return [validLen, placeHoldersLen]\n}\n\n// base64 is 4/3 + up to two characters of the original data\nfunction byteLength (b64) {\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction _byteLength (b64, validLen, placeHoldersLen) {\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction toByteArray (b64) {\n var tmp\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n\n var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))\n\n var curByte = 0\n\n // if there are placeholders, only get up to the last complete 4 chars\n var len = placeHoldersLen > 0\n ? validLen - 4\n : validLen\n\n var i\n for (i = 0; i < len; i += 4) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 18) |\n (revLookup[b64.charCodeAt(i + 1)] << 12) |\n (revLookup[b64.charCodeAt(i + 2)] << 6) |\n revLookup[b64.charCodeAt(i + 3)]\n arr[curByte++] = (tmp >> 16) & 0xFF\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 2) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 2) |\n (revLookup[b64.charCodeAt(i + 1)] >> 4)\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 1) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 10) |\n (revLookup[b64.charCodeAt(i + 1)] << 4) |\n (revLookup[b64.charCodeAt(i + 2)] >> 2)\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] +\n lookup[num >> 12 & 0x3F] +\n lookup[num >> 6 & 0x3F] +\n lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n var tmp\n var output = []\n for (var i = start; i < end; i += 3) {\n tmp =\n ((uint8[i] << 16) & 0xFF0000) +\n ((uint8[i + 1] << 8) & 0xFF00) +\n (uint8[i + 2] & 0xFF)\n output.push(tripletToBase64(tmp))\n }\n return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n var tmp\n var len = uint8.length\n var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n var parts = []\n var maxChunkLength = 16383 // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1]\n parts.push(\n lookup[tmp >> 2] +\n lookup[(tmp << 4) & 0x3F] +\n '=='\n )\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + uint8[len - 1]\n parts.push(\n lookup[tmp >> 10] +\n lookup[(tmp >> 4) & 0x3F] +\n lookup[(tmp << 2) & 0x3F] +\n '='\n )\n }\n\n return parts.join('')\n}\n","/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n/* eslint-disable no-proto */\n\n'use strict'\n\nconst base64 = require('base64-js')\nconst ieee754 = require('ieee754')\nconst customInspectSymbol =\n (typeof Symbol === 'function' && typeof Symbol['for'] === 'function') // eslint-disable-line dot-notation\n ? Symbol['for']('nodejs.util.inspect.custom') // eslint-disable-line dot-notation\n : null\n\nexports.Buffer = Buffer\nexports.SlowBuffer = SlowBuffer\nexports.INSPECT_MAX_BYTES = 50\n\nconst K_MAX_LENGTH = 0x7fffffff\nexports.kMaxLength = K_MAX_LENGTH\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Print warning and recommend using `buffer` v4.x which has an Object\n * implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * We report that the browser does not support typed arrays if the are not subclassable\n * using __proto__. Firefox 4-29 lacks support for adding new properties to `Uint8Array`\n * (See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438). IE 10 lacks support\n * for __proto__ and has a buggy typed array implementation.\n */\nBuffer.TYPED_ARRAY_SUPPORT = typedArraySupport()\n\nif (!Buffer.TYPED_ARRAY_SUPPORT && typeof console !== 'undefined' &&\n typeof console.error === 'function') {\n console.error(\n 'This browser lacks typed array (Uint8Array) support which is required by ' +\n '`buffer` v5.x. Use `buffer` v4.x if you require old browser support.'\n )\n}\n\nfunction typedArraySupport () {\n // Can typed array instances can be augmented?\n try {\n const arr = new Uint8Array(1)\n const proto = { foo: function () { return 42 } }\n Object.setPrototypeOf(proto, Uint8Array.prototype)\n Object.setPrototypeOf(arr, proto)\n return arr.foo() === 42\n } catch (e) {\n return false\n }\n}\n\nObject.defineProperty(Buffer.prototype, 'parent', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.buffer\n }\n})\n\nObject.defineProperty(Buffer.prototype, 'offset', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.byteOffset\n }\n})\n\nfunction createBuffer (length) {\n if (length > K_MAX_LENGTH) {\n throw new RangeError('The value \"' + length + '\" is invalid for option \"size\"')\n }\n // Return an augmented `Uint8Array` instance\n const buf = new Uint8Array(length)\n Object.setPrototypeOf(buf, Buffer.prototype)\n return buf\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new TypeError(\n 'The \"string\" argument must be of type string. Received type number'\n )\n }\n return allocUnsafe(arg)\n }\n return from(arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\nfunction from (value, encodingOrOffset, length) {\n if (typeof value === 'string') {\n return fromString(value, encodingOrOffset)\n }\n\n if (ArrayBuffer.isView(value)) {\n return fromArrayView(value)\n }\n\n if (value == null) {\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n }\n\n if (isInstance(value, ArrayBuffer) ||\n (value && isInstance(value.buffer, ArrayBuffer))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof SharedArrayBuffer !== 'undefined' &&\n (isInstance(value, SharedArrayBuffer) ||\n (value && isInstance(value.buffer, SharedArrayBuffer)))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof value === 'number') {\n throw new TypeError(\n 'The \"value\" argument must not be of type number. Received type number'\n )\n }\n\n const valueOf = value.valueOf && value.valueOf()\n if (valueOf != null && valueOf !== value) {\n return Buffer.from(valueOf, encodingOrOffset, length)\n }\n\n const b = fromObject(value)\n if (b) return b\n\n if (typeof Symbol !== 'undefined' && Symbol.toPrimitive != null &&\n typeof value[Symbol.toPrimitive] === 'function') {\n return Buffer.from(value[Symbol.toPrimitive]('string'), encodingOrOffset, length)\n }\n\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n return from(value, encodingOrOffset, length)\n}\n\n// Note: Change prototype *after* Buffer.from is defined to workaround Chrome bug:\n// https://github.com/feross/buffer/pull/148\nObject.setPrototypeOf(Buffer.prototype, Uint8Array.prototype)\nObject.setPrototypeOf(Buffer, Uint8Array)\n\nfunction assertSize (size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be of type number')\n } else if (size < 0) {\n throw new RangeError('The value \"' + size + '\" is invalid for option \"size\"')\n }\n}\n\nfunction alloc (size, fill, encoding) {\n assertSize(size)\n if (size <= 0) {\n return createBuffer(size)\n }\n if (fill !== undefined) {\n // Only pay attention to encoding if it's a string. This\n // prevents accidentally sending in a number that would\n // be interpreted as a start offset.\n return typeof encoding === 'string'\n ? createBuffer(size).fill(fill, encoding)\n : createBuffer(size).fill(fill)\n }\n return createBuffer(size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n return alloc(size, fill, encoding)\n}\n\nfunction allocUnsafe (size) {\n assertSize(size)\n return createBuffer(size < 0 ? 0 : checked(size) | 0)\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n return allocUnsafe(size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n return allocUnsafe(size)\n}\n\nfunction fromString (string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8'\n }\n\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n\n const length = byteLength(string, encoding) | 0\n let buf = createBuffer(length)\n\n const actual = buf.write(string, encoding)\n\n if (actual !== length) {\n // Writing a hex string, for example, that contains invalid characters will\n // cause everything after the first invalid character to be ignored. (e.g.\n // 'abxxcd' will be treated as 'ab')\n buf = buf.slice(0, actual)\n }\n\n return buf\n}\n\nfunction fromArrayLike (array) {\n const length = array.length < 0 ? 0 : checked(array.length) | 0\n const buf = createBuffer(length)\n for (let i = 0; i < length; i += 1) {\n buf[i] = array[i] & 255\n }\n return buf\n}\n\nfunction fromArrayView (arrayView) {\n if (isInstance(arrayView, Uint8Array)) {\n const copy = new Uint8Array(arrayView)\n return fromArrayBuffer(copy.buffer, copy.byteOffset, copy.byteLength)\n }\n return fromArrayLike(arrayView)\n}\n\nfunction fromArrayBuffer (array, byteOffset, length) {\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\"offset\" is outside of buffer bounds')\n }\n\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\"length\" is outside of buffer bounds')\n }\n\n let buf\n if (byteOffset === undefined && length === undefined) {\n buf = new Uint8Array(array)\n } else if (length === undefined) {\n buf = new Uint8Array(array, byteOffset)\n } else {\n buf = new Uint8Array(array, byteOffset, length)\n }\n\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(buf, Buffer.prototype)\n\n return buf\n}\n\nfunction fromObject (obj) {\n if (Buffer.isBuffer(obj)) {\n const len = checked(obj.length) | 0\n const buf = createBuffer(len)\n\n if (buf.length === 0) {\n return buf\n }\n\n obj.copy(buf, 0, 0, len)\n return buf\n }\n\n if (obj.length !== undefined) {\n if (typeof obj.length !== 'number' || numberIsNaN(obj.length)) {\n return createBuffer(0)\n }\n return fromArrayLike(obj)\n }\n\n if (obj.type === 'Buffer' && Array.isArray(obj.data)) {\n return fromArrayLike(obj.data)\n }\n}\n\nfunction checked (length) {\n // Note: cannot use `length < K_MAX_LENGTH` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= K_MAX_LENGTH) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + K_MAX_LENGTH.toString(16) + ' bytes')\n }\n return length | 0\n}\n\nfunction SlowBuffer (length) {\n if (+length != length) { // eslint-disable-line eqeqeq\n length = 0\n }\n return Buffer.alloc(+length)\n}\n\nBuffer.isBuffer = function isBuffer (b) {\n return b != null && b._isBuffer === true &&\n b !== Buffer.prototype // so Buffer.isBuffer(Buffer.prototype) will be false\n}\n\nBuffer.compare = function compare (a, b) {\n if (isInstance(a, Uint8Array)) a = Buffer.from(a, a.offset, a.byteLength)\n if (isInstance(b, Uint8Array)) b = Buffer.from(b, b.offset, b.byteLength)\n if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n throw new TypeError(\n 'The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array'\n )\n }\n\n if (a === b) return 0\n\n let x = a.length\n let y = b.length\n\n for (let i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i]\n y = b[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n switch (String(encoding).toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'latin1':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return true\n default:\n return false\n }\n}\n\nBuffer.concat = function concat (list, length) {\n if (!Array.isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n\n if (list.length === 0) {\n return Buffer.alloc(0)\n }\n\n let i\n if (length === undefined) {\n length = 0\n for (i = 0; i < list.length; ++i) {\n length += list[i].length\n }\n }\n\n const buffer = Buffer.allocUnsafe(length)\n let pos = 0\n for (i = 0; i < list.length; ++i) {\n let buf = list[i]\n if (isInstance(buf, Uint8Array)) {\n if (pos + buf.length > buffer.length) {\n if (!Buffer.isBuffer(buf)) buf = Buffer.from(buf)\n buf.copy(buffer, pos)\n } else {\n Uint8Array.prototype.set.call(\n buffer,\n buf,\n pos\n )\n }\n } else if (!Buffer.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n } else {\n buf.copy(buffer, pos)\n }\n pos += buf.length\n }\n return buffer\n}\n\nfunction byteLength (string, encoding) {\n if (Buffer.isBuffer(string)) {\n return string.length\n }\n if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) {\n return string.byteLength\n }\n if (typeof string !== 'string') {\n throw new TypeError(\n 'The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. ' +\n 'Received type ' + typeof string\n )\n }\n\n const len = string.length\n const mustMatch = (arguments.length > 2 && arguments[2] === true)\n if (!mustMatch && len === 0) return 0\n\n // Use a for loop to avoid recursion\n let loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'ascii':\n case 'latin1':\n case 'binary':\n return len\n case 'utf8':\n case 'utf-8':\n return utf8ToBytes(string).length\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return len * 2\n case 'hex':\n return len >>> 1\n case 'base64':\n return base64ToBytes(string).length\n default:\n if (loweredCase) {\n return mustMatch ? -1 : utf8ToBytes(string).length // assume utf8\n }\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n let loweredCase = false\n\n // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n // property of a typed array.\n\n // This behaves neither like String nor Uint8Array in that we set start/end\n // to their upper/lower bounds if the value passed is out of range.\n // undefined is handled specially as per ECMA-262 6th Edition,\n // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n if (start === undefined || start < 0) {\n start = 0\n }\n // Return early if start > this.length. Done here to prevent potential uint32\n // coercion fail below.\n if (start > this.length) {\n return ''\n }\n\n if (end === undefined || end > this.length) {\n end = this.length\n }\n\n if (end <= 0) {\n return ''\n }\n\n // Force coercion to uint32. This will also coerce falsey/NaN values to 0.\n end >>>= 0\n start >>>= 0\n\n if (end <= start) {\n return ''\n }\n\n if (!encoding) encoding = 'utf8'\n\n while (true) {\n switch (encoding) {\n case 'hex':\n return hexSlice(this, start, end)\n\n case 'utf8':\n case 'utf-8':\n return utf8Slice(this, start, end)\n\n case 'ascii':\n return asciiSlice(this, start, end)\n\n case 'latin1':\n case 'binary':\n return latin1Slice(this, start, end)\n\n case 'base64':\n return base64Slice(this, start, end)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return utf16leSlice(this, start, end)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = (encoding + '').toLowerCase()\n loweredCase = true\n }\n }\n}\n\n// This property is used by `Buffer.isBuffer` (and the `is-buffer` npm package)\n// to detect a Buffer instance. It's not possible to use `instanceof Buffer`\n// reliably in a browserify context because there could be multiple different\n// copies of the 'buffer' package in use. This method works even for Buffer\n// instances that were created from another copy of the `buffer` package.\n// See: https://github.com/feross/buffer/issues/154\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n const i = b[n]\n b[n] = b[m]\n b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n const len = this.length\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits')\n }\n for (let i = 0; i < len; i += 2) {\n swap(this, i, i + 1)\n }\n return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n const len = this.length\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits')\n }\n for (let i = 0; i < len; i += 4) {\n swap(this, i, i + 3)\n swap(this, i + 1, i + 2)\n }\n return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n const len = this.length\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits')\n }\n for (let i = 0; i < len; i += 8) {\n swap(this, i, i + 7)\n swap(this, i + 1, i + 6)\n swap(this, i + 2, i + 5)\n swap(this, i + 3, i + 4)\n }\n return this\n}\n\nBuffer.prototype.toString = function toString () {\n const length = this.length\n if (length === 0) return ''\n if (arguments.length === 0) return utf8Slice(this, 0, length)\n return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.toLocaleString = Buffer.prototype.toString\n\nBuffer.prototype.equals = function equals (b) {\n if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n if (this === b) return true\n return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n let str = ''\n const max = exports.INSPECT_MAX_BYTES\n str = this.toString('hex', 0, max).replace(/(.{2})/g, '$1 ').trim()\n if (this.length > max) str += ' ... '\n return ''\n}\nif (customInspectSymbol) {\n Buffer.prototype[customInspectSymbol] = Buffer.prototype.inspect\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n if (isInstance(target, Uint8Array)) {\n target = Buffer.from(target, target.offset, target.byteLength)\n }\n if (!Buffer.isBuffer(target)) {\n throw new TypeError(\n 'The \"target\" argument must be one of type Buffer or Uint8Array. ' +\n 'Received type ' + (typeof target)\n )\n }\n\n if (start === undefined) {\n start = 0\n }\n if (end === undefined) {\n end = target ? target.length : 0\n }\n if (thisStart === undefined) {\n thisStart = 0\n }\n if (thisEnd === undefined) {\n thisEnd = this.length\n }\n\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError('out of range index')\n }\n\n if (thisStart >= thisEnd && start >= end) {\n return 0\n }\n if (thisStart >= thisEnd) {\n return -1\n }\n if (start >= end) {\n return 1\n }\n\n start >>>= 0\n end >>>= 0\n thisStart >>>= 0\n thisEnd >>>= 0\n\n if (this === target) return 0\n\n let x = thisEnd - thisStart\n let y = end - start\n const len = Math.min(x, y)\n\n const thisCopy = this.slice(thisStart, thisEnd)\n const targetCopy = target.slice(start, end)\n\n for (let i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i]\n y = targetCopy[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (numberIsNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [val], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n let indexSize = 1\n let arrLength = arr.length\n let valLength = val.length\n\n if (encoding !== undefined) {\n encoding = String(encoding).toLowerCase()\n if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n encoding === 'utf16le' || encoding === 'utf-16le') {\n if (arr.length < 2 || val.length < 2) {\n return -1\n }\n indexSize = 2\n arrLength /= 2\n valLength /= 2\n byteOffset /= 2\n }\n }\n\n function read (buf, i) {\n if (indexSize === 1) {\n return buf[i]\n } else {\n return buf.readUInt16BE(i * indexSize)\n }\n }\n\n let i\n if (dir) {\n let foundIndex = -1\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1) foundIndex = i\n if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n } else {\n if (foundIndex !== -1) i -= i - foundIndex\n foundIndex = -1\n }\n }\n } else {\n if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n for (i = byteOffset; i >= 0; i--) {\n let found = true\n for (let j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false\n break\n }\n }\n if (found) return i\n }\n }\n\n return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n offset = Number(offset) || 0\n const remaining = buf.length - offset\n if (!length) {\n length = remaining\n } else {\n length = Number(length)\n if (length > remaining) {\n length = remaining\n }\n }\n\n const strLen = string.length\n\n if (length > strLen / 2) {\n length = strLen / 2\n }\n let i\n for (i = 0; i < length; ++i) {\n const parsed = parseInt(string.substr(i * 2, 2), 16)\n if (numberIsNaN(parsed)) return i\n buf[offset + i] = parsed\n }\n return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n // Buffer#write(string)\n if (offset === undefined) {\n encoding = 'utf8'\n length = this.length\n offset = 0\n // Buffer#write(string, encoding)\n } else if (length === undefined && typeof offset === 'string') {\n encoding = offset\n length = this.length\n offset = 0\n // Buffer#write(string, offset[, length][, encoding])\n } else if (isFinite(offset)) {\n offset = offset >>> 0\n if (isFinite(length)) {\n length = length >>> 0\n if (encoding === undefined) encoding = 'utf8'\n } else {\n encoding = length\n length = undefined\n }\n } else {\n throw new Error(\n 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n )\n }\n\n const remaining = this.length - offset\n if (length === undefined || length > remaining) length = remaining\n\n if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n throw new RangeError('Attempt to write outside buffer bounds')\n }\n\n if (!encoding) encoding = 'utf8'\n\n let loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'hex':\n return hexWrite(this, string, offset, length)\n\n case 'utf8':\n case 'utf-8':\n return utf8Write(this, string, offset, length)\n\n case 'ascii':\n case 'latin1':\n case 'binary':\n return asciiWrite(this, string, offset, length)\n\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return base64Write(this, string, offset, length)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return ucs2Write(this, string, offset, length)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0)\n }\n}\n\nfunction base64Slice (buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf)\n } else {\n return base64.fromByteArray(buf.slice(start, end))\n }\n}\n\nfunction utf8Slice (buf, start, end) {\n end = Math.min(buf.length, end)\n const res = []\n\n let i = start\n while (i < end) {\n const firstByte = buf[i]\n let codePoint = null\n let bytesPerSequence = (firstByte > 0xEF)\n ? 4\n : (firstByte > 0xDF)\n ? 3\n : (firstByte > 0xBF)\n ? 2\n : 1\n\n if (i + bytesPerSequence <= end) {\n let secondByte, thirdByte, fourthByte, tempCodePoint\n\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 0x80) {\n codePoint = firstByte\n }\n break\n case 2:\n secondByte = buf[i + 1]\n if ((secondByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n if (tempCodePoint > 0x7F) {\n codePoint = tempCodePoint\n }\n }\n break\n case 3:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n codePoint = tempCodePoint\n }\n }\n break\n case 4:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n fourthByte = buf[i + 3]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n codePoint = tempCodePoint\n }\n }\n }\n }\n\n if (codePoint === null) {\n // we did not generate a valid codePoint so insert a\n // replacement char (U+FFFD) and advance only 1 byte\n codePoint = 0xFFFD\n bytesPerSequence = 1\n } else if (codePoint > 0xFFFF) {\n // encode to utf16 (surrogate pair dance)\n codePoint -= 0x10000\n res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n codePoint = 0xDC00 | codePoint & 0x3FF\n }\n\n res.push(codePoint)\n i += bytesPerSequence\n }\n\n return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nconst MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n const len = codePoints.length\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n }\n\n // Decode in chunks to avoid \"call stack size exceeded\".\n let res = ''\n let i = 0\n while (i < len) {\n res += String.fromCharCode.apply(\n String,\n codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n )\n }\n return res\n}\n\nfunction asciiSlice (buf, start, end) {\n let ret = ''\n end = Math.min(buf.length, end)\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F)\n }\n return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n let ret = ''\n end = Math.min(buf.length, end)\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i])\n }\n return ret\n}\n\nfunction hexSlice (buf, start, end) {\n const len = buf.length\n\n if (!start || start < 0) start = 0\n if (!end || end < 0 || end > len) end = len\n\n let out = ''\n for (let i = start; i < end; ++i) {\n out += hexSliceLookupTable[buf[i]]\n }\n return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n const bytes = buf.slice(start, end)\n let res = ''\n // If bytes.length is odd, the last 8 bits must be ignored (same as node.js)\n for (let i = 0; i < bytes.length - 1; i += 2) {\n res += String.fromCharCode(bytes[i] + (bytes[i + 1] * 256))\n }\n return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n const len = this.length\n start = ~~start\n end = end === undefined ? len : ~~end\n\n if (start < 0) {\n start += len\n if (start < 0) start = 0\n } else if (start > len) {\n start = len\n }\n\n if (end < 0) {\n end += len\n if (end < 0) end = 0\n } else if (end > len) {\n end = len\n }\n\n if (end < start) end = start\n\n const newBuf = this.subarray(start, end)\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(newBuf, Buffer.prototype)\n\n return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUintLE =\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let val = this[offset]\n let mul = 1\n let i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUintBE =\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n checkOffset(offset, byteLength, this.length)\n }\n\n let val = this[offset + --byteLength]\n let mul = 1\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUint8 =\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n return this[offset]\n}\n\nBuffer.prototype.readUint16LE =\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUint16BE =\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUint32LE =\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return ((this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16)) +\n (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUint32BE =\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] * 0x1000000) +\n ((this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n this[offset + 3])\n}\n\nBuffer.prototype.readBigUInt64LE = defineBigIntMethod(function readBigUInt64LE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const lo = first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24\n\n const hi = this[++offset] +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n last * 2 ** 24\n\n return BigInt(lo) + (BigInt(hi) << BigInt(32))\n})\n\nBuffer.prototype.readBigUInt64BE = defineBigIntMethod(function readBigUInt64BE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const hi = first * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset]\n\n const lo = this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last\n\n return (BigInt(hi) << BigInt(32)) + BigInt(lo)\n})\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let val = this[offset]\n let mul = 1\n let i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let i = byteLength\n let mul = 1\n let val = this[offset + --i]\n while (i > 0 && (mul *= 0x100)) {\n val += this[offset + --i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n if (!(this[offset] & 0x80)) return (this[offset])\n return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n const val = this[offset] | (this[offset + 1] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n const val = this[offset + 1] | (this[offset] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16) |\n (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] << 24) |\n (this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n (this[offset + 3])\n}\n\nBuffer.prototype.readBigInt64LE = defineBigIntMethod(function readBigInt64LE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const val = this[offset + 4] +\n this[offset + 5] * 2 ** 8 +\n this[offset + 6] * 2 ** 16 +\n (last << 24) // Overflow\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24)\n})\n\nBuffer.prototype.readBigInt64BE = defineBigIntMethod(function readBigInt64BE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const val = (first << 24) + // Overflow\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset]\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last)\n})\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUintLE =\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n let mul = 1\n let i = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUintBE =\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n let i = byteLength - 1\n let mul = 1\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUint8 =\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeUint16LE =\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeUint16BE =\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeUint32LE =\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset + 3] = (value >>> 24)\n this[offset + 2] = (value >>> 16)\n this[offset + 1] = (value >>> 8)\n this[offset] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeUint32BE =\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nfunction wrtBigUInt64LE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7)\n\n let lo = Number(value & BigInt(0xffffffff))\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n return offset\n}\n\nfunction wrtBigUInt64BE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7)\n\n let lo = Number(value & BigInt(0xffffffff))\n buf[offset + 7] = lo\n lo = lo >> 8\n buf[offset + 6] = lo\n lo = lo >> 8\n buf[offset + 5] = lo\n lo = lo >> 8\n buf[offset + 4] = lo\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n buf[offset + 3] = hi\n hi = hi >> 8\n buf[offset + 2] = hi\n hi = hi >> 8\n buf[offset + 1] = hi\n hi = hi >> 8\n buf[offset] = hi\n return offset + 8\n}\n\nBuffer.prototype.writeBigUInt64LE = defineBigIntMethod(function writeBigUInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeBigUInt64BE = defineBigIntMethod(function writeBigUInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n let i = 0\n let mul = 1\n let sub = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n let i = byteLength - 1\n let mul = 1\n let sub = 0\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n if (value < 0) value = 0xff + value + 1\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n this[offset + 2] = (value >>> 16)\n this[offset + 3] = (value >>> 24)\n return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (value < 0) value = 0xffffffff + value + 1\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeBigInt64LE = defineBigIntMethod(function writeBigInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nBuffer.prototype.writeBigInt64BE = defineBigIntMethod(function writeBigInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n }\n ieee754.write(buf, value, offset, littleEndian, 23, 4)\n return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n }\n ieee754.write(buf, value, offset, littleEndian, 52, 8)\n return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n if (!Buffer.isBuffer(target)) throw new TypeError('argument should be a Buffer')\n if (!start) start = 0\n if (!end && end !== 0) end = this.length\n if (targetStart >= target.length) targetStart = target.length\n if (!targetStart) targetStart = 0\n if (end > 0 && end < start) end = start\n\n // Copy 0 bytes; we're done\n if (end === start) return 0\n if (target.length === 0 || this.length === 0) return 0\n\n // Fatal error conditions\n if (targetStart < 0) {\n throw new RangeError('targetStart out of bounds')\n }\n if (start < 0 || start >= this.length) throw new RangeError('Index out of range')\n if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n // Are we oob?\n if (end > this.length) end = this.length\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start\n }\n\n const len = end - start\n\n if (this === target && typeof Uint8Array.prototype.copyWithin === 'function') {\n // Use built-in when available, missing from IE11\n this.copyWithin(targetStart, start, end)\n } else {\n Uint8Array.prototype.set.call(\n target,\n this.subarray(start, end),\n targetStart\n )\n }\n\n return len\n}\n\n// Usage:\n// buffer.fill(number[, offset[, end]])\n// buffer.fill(buffer[, offset[, end]])\n// buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n // Handle string cases:\n if (typeof val === 'string') {\n if (typeof start === 'string') {\n encoding = start\n start = 0\n end = this.length\n } else if (typeof end === 'string') {\n encoding = end\n end = this.length\n }\n if (encoding !== undefined && typeof encoding !== 'string') {\n throw new TypeError('encoding must be a string')\n }\n if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n if (val.length === 1) {\n const code = val.charCodeAt(0)\n if ((encoding === 'utf8' && code < 128) ||\n encoding === 'latin1') {\n // Fast path: If `val` fits into a single byte, use that numeric value.\n val = code\n }\n }\n } else if (typeof val === 'number') {\n val = val & 255\n } else if (typeof val === 'boolean') {\n val = Number(val)\n }\n\n // Invalid ranges are not set to a default, so can range check early.\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError('Out of range index')\n }\n\n if (end <= start) {\n return this\n }\n\n start = start >>> 0\n end = end === undefined ? this.length : end >>> 0\n\n if (!val) val = 0\n\n let i\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val\n }\n } else {\n const bytes = Buffer.isBuffer(val)\n ? val\n : Buffer.from(val, encoding)\n const len = bytes.length\n if (len === 0) {\n throw new TypeError('The value \"' + val +\n '\" is invalid for argument \"value\"')\n }\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len]\n }\n }\n\n return this\n}\n\n// CUSTOM ERRORS\n// =============\n\n// Simplified versions from Node, changed for Buffer-only usage\nconst errors = {}\nfunction E (sym, getMessage, Base) {\n errors[sym] = class NodeError extends Base {\n constructor () {\n super()\n\n Object.defineProperty(this, 'message', {\n value: getMessage.apply(this, arguments),\n writable: true,\n configurable: true\n })\n\n // Add the error code to the name to include it in the stack trace.\n this.name = `${this.name} [${sym}]`\n // Access the stack to generate the error message including the error code\n // from the name.\n this.stack // eslint-disable-line no-unused-expressions\n // Reset the name to the actual name.\n delete this.name\n }\n\n get code () {\n return sym\n }\n\n set code (value) {\n Object.defineProperty(this, 'code', {\n configurable: true,\n enumerable: true,\n value,\n writable: true\n })\n }\n\n toString () {\n return `${this.name} [${sym}]: ${this.message}`\n }\n }\n}\n\nE('ERR_BUFFER_OUT_OF_BOUNDS',\n function (name) {\n if (name) {\n return `${name} is outside of buffer bounds`\n }\n\n return 'Attempt to access memory outside buffer bounds'\n }, RangeError)\nE('ERR_INVALID_ARG_TYPE',\n function (name, actual) {\n return `The \"${name}\" argument must be of type number. Received type ${typeof actual}`\n }, TypeError)\nE('ERR_OUT_OF_RANGE',\n function (str, range, input) {\n let msg = `The value of \"${str}\" is out of range.`\n let received = input\n if (Number.isInteger(input) && Math.abs(input) > 2 ** 32) {\n received = addNumericalSeparator(String(input))\n } else if (typeof input === 'bigint') {\n received = String(input)\n if (input > BigInt(2) ** BigInt(32) || input < -(BigInt(2) ** BigInt(32))) {\n received = addNumericalSeparator(received)\n }\n received += 'n'\n }\n msg += ` It must be ${range}. Received ${received}`\n return msg\n }, RangeError)\n\nfunction addNumericalSeparator (val) {\n let res = ''\n let i = val.length\n const start = val[0] === '-' ? 1 : 0\n for (; i >= start + 4; i -= 3) {\n res = `_${val.slice(i - 3, i)}${res}`\n }\n return `${val.slice(0, i)}${res}`\n}\n\n// CHECK FUNCTIONS\n// ===============\n\nfunction checkBounds (buf, offset, byteLength) {\n validateNumber(offset, 'offset')\n if (buf[offset] === undefined || buf[offset + byteLength] === undefined) {\n boundsError(offset, buf.length - (byteLength + 1))\n }\n}\n\nfunction checkIntBI (value, min, max, buf, offset, byteLength) {\n if (value > max || value < min) {\n const n = typeof min === 'bigint' ? 'n' : ''\n let range\n if (byteLength > 3) {\n if (min === 0 || min === BigInt(0)) {\n range = `>= 0${n} and < 2${n} ** ${(byteLength + 1) * 8}${n}`\n } else {\n range = `>= -(2${n} ** ${(byteLength + 1) * 8 - 1}${n}) and < 2 ** ` +\n `${(byteLength + 1) * 8 - 1}${n}`\n }\n } else {\n range = `>= ${min}${n} and <= ${max}${n}`\n }\n throw new errors.ERR_OUT_OF_RANGE('value', range, value)\n }\n checkBounds(buf, offset, byteLength)\n}\n\nfunction validateNumber (value, name) {\n if (typeof value !== 'number') {\n throw new errors.ERR_INVALID_ARG_TYPE(name, 'number', value)\n }\n}\n\nfunction boundsError (value, length, type) {\n if (Math.floor(value) !== value) {\n validateNumber(value, type)\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset', 'an integer', value)\n }\n\n if (length < 0) {\n throw new errors.ERR_BUFFER_OUT_OF_BOUNDS()\n }\n\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset',\n `>= ${type ? 1 : 0} and <= ${length}`,\n value)\n}\n\n// HELPER FUNCTIONS\n// ================\n\nconst INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n // Node takes equal signs as end of the Base64 encoding\n str = str.split('=')[0]\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = str.trim().replace(INVALID_BASE64_RE, '')\n // Node converts strings with length < 2 to ''\n if (str.length < 2) return ''\n // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n while (str.length % 4 !== 0) {\n str = str + '='\n }\n return str\n}\n\nfunction utf8ToBytes (string, units) {\n units = units || Infinity\n let codePoint\n const length = string.length\n let leadSurrogate = null\n const bytes = []\n\n for (let i = 0; i < length; ++i) {\n codePoint = string.charCodeAt(i)\n\n // is surrogate component\n if (codePoint > 0xD7FF && codePoint < 0xE000) {\n // last char was a lead\n if (!leadSurrogate) {\n // no lead yet\n if (codePoint > 0xDBFF) {\n // unexpected trail\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n } else if (i + 1 === length) {\n // unpaired lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n }\n\n // valid lead\n leadSurrogate = codePoint\n\n continue\n }\n\n // 2 leads in a row\n if (codePoint < 0xDC00) {\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n leadSurrogate = codePoint\n continue\n }\n\n // valid surrogate pair\n codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n } else if (leadSurrogate) {\n // valid bmp char, but last char was a lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n }\n\n leadSurrogate = null\n\n // encode utf8\n if (codePoint < 0x80) {\n if ((units -= 1) < 0) break\n bytes.push(codePoint)\n } else if (codePoint < 0x800) {\n if ((units -= 2) < 0) break\n bytes.push(\n codePoint >> 0x6 | 0xC0,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x10000) {\n if ((units -= 3) < 0) break\n bytes.push(\n codePoint >> 0xC | 0xE0,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x110000) {\n if ((units -= 4) < 0) break\n bytes.push(\n codePoint >> 0x12 | 0xF0,\n codePoint >> 0xC & 0x3F | 0x80,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else {\n throw new Error('Invalid code point')\n }\n }\n\n return bytes\n}\n\nfunction asciiToBytes (str) {\n const byteArray = []\n for (let i = 0; i < str.length; ++i) {\n // Node's code seems to be doing this and not & 0x7F..\n byteArray.push(str.charCodeAt(i) & 0xFF)\n }\n return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n let c, hi, lo\n const byteArray = []\n for (let i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0) break\n\n c = str.charCodeAt(i)\n hi = c >> 8\n lo = c % 256\n byteArray.push(lo)\n byteArray.push(hi)\n }\n\n return byteArray\n}\n\nfunction base64ToBytes (str) {\n return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n let i\n for (i = 0; i < length; ++i) {\n if ((i + offset >= dst.length) || (i >= src.length)) break\n dst[i + offset] = src[i]\n }\n return i\n}\n\n// ArrayBuffer or Uint8Array objects from other contexts (i.e. iframes) do not pass\n// the `instanceof` check but they should be treated as of that type.\n// See: https://github.com/feross/buffer/issues/166\nfunction isInstance (obj, type) {\n return obj instanceof type ||\n (obj != null && obj.constructor != null && obj.constructor.name != null &&\n obj.constructor.name === type.name)\n}\nfunction numberIsNaN (obj) {\n // For IE11 support\n return obj !== obj // eslint-disable-line no-self-compare\n}\n\n// Create lookup table for `toString('hex')`\n// See: https://github.com/feross/buffer/issues/219\nconst hexSliceLookupTable = (function () {\n const alphabet = '0123456789abcdef'\n const table = new Array(256)\n for (let i = 0; i < 16; ++i) {\n const i16 = i * 16\n for (let j = 0; j < 16; ++j) {\n table[i16 + j] = alphabet[i] + alphabet[j]\n }\n }\n return table\n})()\n\n// Return not function with Error if BigInt not supported\nfunction defineBigIntMethod (fn) {\n return typeof BigInt === 'undefined' ? BufferBigIntNotDefined : fn\n}\n\nfunction BufferBigIntNotDefined () {\n throw new Error('BigInt not supported')\n}\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\nvar R = typeof Reflect === 'object' ? Reflect : null\nvar ReflectApply = R && typeof R.apply === 'function'\n ? R.apply\n : function ReflectApply(target, receiver, args) {\n return Function.prototype.apply.call(target, receiver, args);\n }\n\nvar ReflectOwnKeys\nif (R && typeof R.ownKeys === 'function') {\n ReflectOwnKeys = R.ownKeys\n} else if (Object.getOwnPropertySymbols) {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target)\n .concat(Object.getOwnPropertySymbols(target));\n };\n} else {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target);\n };\n}\n\nfunction ProcessEmitWarning(warning) {\n if (console && console.warn) console.warn(warning);\n}\n\nvar NumberIsNaN = Number.isNaN || function NumberIsNaN(value) {\n return value !== value;\n}\n\nfunction EventEmitter() {\n EventEmitter.init.call(this);\n}\nmodule.exports = EventEmitter;\nmodule.exports.once = once;\n\n// Backwards-compat with node 0.10.x\nEventEmitter.EventEmitter = EventEmitter;\n\nEventEmitter.prototype._events = undefined;\nEventEmitter.prototype._eventsCount = 0;\nEventEmitter.prototype._maxListeners = undefined;\n\n// By default EventEmitters will print a warning if more than 10 listeners are\n// added to it. This is a useful default which helps finding memory leaks.\nvar defaultMaxListeners = 10;\n\nfunction checkListener(listener) {\n if (typeof listener !== 'function') {\n throw new TypeError('The \"listener\" argument must be of type Function. Received type ' + typeof listener);\n }\n}\n\nObject.defineProperty(EventEmitter, 'defaultMaxListeners', {\n enumerable: true,\n get: function() {\n return defaultMaxListeners;\n },\n set: function(arg) {\n if (typeof arg !== 'number' || arg < 0 || NumberIsNaN(arg)) {\n throw new RangeError('The value of \"defaultMaxListeners\" is out of range. It must be a non-negative number. Received ' + arg + '.');\n }\n defaultMaxListeners = arg;\n }\n});\n\nEventEmitter.init = function() {\n\n if (this._events === undefined ||\n this._events === Object.getPrototypeOf(this)._events) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n }\n\n this._maxListeners = this._maxListeners || undefined;\n};\n\n// Obviously not all Emitters should be limited to 10. This function allows\n// that to be increased. Set to zero for unlimited.\nEventEmitter.prototype.setMaxListeners = function setMaxListeners(n) {\n if (typeof n !== 'number' || n < 0 || NumberIsNaN(n)) {\n throw new RangeError('The value of \"n\" is out of range. It must be a non-negative number. Received ' + n + '.');\n }\n this._maxListeners = n;\n return this;\n};\n\nfunction _getMaxListeners(that) {\n if (that._maxListeners === undefined)\n return EventEmitter.defaultMaxListeners;\n return that._maxListeners;\n}\n\nEventEmitter.prototype.getMaxListeners = function getMaxListeners() {\n return _getMaxListeners(this);\n};\n\nEventEmitter.prototype.emit = function emit(type) {\n var args = [];\n for (var i = 1; i < arguments.length; i++) args.push(arguments[i]);\n var doError = (type === 'error');\n\n var events = this._events;\n if (events !== undefined)\n doError = (doError && events.error === undefined);\n else if (!doError)\n return false;\n\n // If there is no 'error' event listener then throw.\n if (doError) {\n var er;\n if (args.length > 0)\n er = args[0];\n if (er instanceof Error) {\n // Note: The comments on the `throw` lines are intentional, they show\n // up in Node's output if this results in an unhandled exception.\n throw er; // Unhandled 'error' event\n }\n // At least give some kind of context to the user\n var err = new Error('Unhandled error.' + (er ? ' (' + er.message + ')' : ''));\n err.context = er;\n throw err; // Unhandled 'error' event\n }\n\n var handler = events[type];\n\n if (handler === undefined)\n return false;\n\n if (typeof handler === 'function') {\n ReflectApply(handler, this, args);\n } else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n ReflectApply(listeners[i], this, args);\n }\n\n return true;\n};\n\nfunction _addListener(target, type, listener, prepend) {\n var m;\n var events;\n var existing;\n\n checkListener(listener);\n\n events = target._events;\n if (events === undefined) {\n events = target._events = Object.create(null);\n target._eventsCount = 0;\n } else {\n // To avoid recursion in the case that type === \"newListener\"! Before\n // adding it to the listeners, first emit \"newListener\".\n if (events.newListener !== undefined) {\n target.emit('newListener', type,\n listener.listener ? listener.listener : listener);\n\n // Re-assign `events` because a newListener handler could have caused the\n // this._events to be assigned to a new object\n events = target._events;\n }\n existing = events[type];\n }\n\n if (existing === undefined) {\n // Optimize the case of one listener. Don't need the extra array object.\n existing = events[type] = listener;\n ++target._eventsCount;\n } else {\n if (typeof existing === 'function') {\n // Adding the second element, need to change to array.\n existing = events[type] =\n prepend ? [listener, existing] : [existing, listener];\n // If we've already got an array, just append.\n } else if (prepend) {\n existing.unshift(listener);\n } else {\n existing.push(listener);\n }\n\n // Check for listener leak\n m = _getMaxListeners(target);\n if (m > 0 && existing.length > m && !existing.warned) {\n existing.warned = true;\n // No error code for this since it is a Warning\n // eslint-disable-next-line no-restricted-syntax\n var w = new Error('Possible EventEmitter memory leak detected. ' +\n existing.length + ' ' + String(type) + ' listeners ' +\n 'added. Use emitter.setMaxListeners() to ' +\n 'increase limit');\n w.name = 'MaxListenersExceededWarning';\n w.emitter = target;\n w.type = type;\n w.count = existing.length;\n ProcessEmitWarning(w);\n }\n }\n\n return target;\n}\n\nEventEmitter.prototype.addListener = function addListener(type, listener) {\n return _addListener(this, type, listener, false);\n};\n\nEventEmitter.prototype.on = EventEmitter.prototype.addListener;\n\nEventEmitter.prototype.prependListener =\n function prependListener(type, listener) {\n return _addListener(this, type, listener, true);\n };\n\nfunction onceWrapper() {\n if (!this.fired) {\n this.target.removeListener(this.type, this.wrapFn);\n this.fired = true;\n if (arguments.length === 0)\n return this.listener.call(this.target);\n return this.listener.apply(this.target, arguments);\n }\n}\n\nfunction _onceWrap(target, type, listener) {\n var state = { fired: false, wrapFn: undefined, target: target, type: type, listener: listener };\n var wrapped = onceWrapper.bind(state);\n wrapped.listener = listener;\n state.wrapFn = wrapped;\n return wrapped;\n}\n\nEventEmitter.prototype.once = function once(type, listener) {\n checkListener(listener);\n this.on(type, _onceWrap(this, type, listener));\n return this;\n};\n\nEventEmitter.prototype.prependOnceListener =\n function prependOnceListener(type, listener) {\n checkListener(listener);\n this.prependListener(type, _onceWrap(this, type, listener));\n return this;\n };\n\n// Emits a 'removeListener' event if and only if the listener was removed.\nEventEmitter.prototype.removeListener =\n function removeListener(type, listener) {\n var list, events, position, i, originalListener;\n\n checkListener(listener);\n\n events = this._events;\n if (events === undefined)\n return this;\n\n list = events[type];\n if (list === undefined)\n return this;\n\n if (list === listener || list.listener === listener) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else {\n delete events[type];\n if (events.removeListener)\n this.emit('removeListener', type, list.listener || listener);\n }\n } else if (typeof list !== 'function') {\n position = -1;\n\n for (i = list.length - 1; i >= 0; i--) {\n if (list[i] === listener || list[i].listener === listener) {\n originalListener = list[i].listener;\n position = i;\n break;\n }\n }\n\n if (position < 0)\n return this;\n\n if (position === 0)\n list.shift();\n else {\n spliceOne(list, position);\n }\n\n if (list.length === 1)\n events[type] = list[0];\n\n if (events.removeListener !== undefined)\n this.emit('removeListener', type, originalListener || listener);\n }\n\n return this;\n };\n\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\n\nEventEmitter.prototype.removeAllListeners =\n function removeAllListeners(type) {\n var listeners, events, i;\n\n events = this._events;\n if (events === undefined)\n return this;\n\n // not listening for removeListener, no need to emit\n if (events.removeListener === undefined) {\n if (arguments.length === 0) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n } else if (events[type] !== undefined) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else\n delete events[type];\n }\n return this;\n }\n\n // emit removeListener for all listeners on all events\n if (arguments.length === 0) {\n var keys = Object.keys(events);\n var key;\n for (i = 0; i < keys.length; ++i) {\n key = keys[i];\n if (key === 'removeListener') continue;\n this.removeAllListeners(key);\n }\n this.removeAllListeners('removeListener');\n this._events = Object.create(null);\n this._eventsCount = 0;\n return this;\n }\n\n listeners = events[type];\n\n if (typeof listeners === 'function') {\n this.removeListener(type, listeners);\n } else if (listeners !== undefined) {\n // LIFO order\n for (i = listeners.length - 1; i >= 0; i--) {\n this.removeListener(type, listeners[i]);\n }\n }\n\n return this;\n };\n\nfunction _listeners(target, type, unwrap) {\n var events = target._events;\n\n if (events === undefined)\n return [];\n\n var evlistener = events[type];\n if (evlistener === undefined)\n return [];\n\n if (typeof evlistener === 'function')\n return unwrap ? [evlistener.listener || evlistener] : [evlistener];\n\n return unwrap ?\n unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length);\n}\n\nEventEmitter.prototype.listeners = function listeners(type) {\n return _listeners(this, type, true);\n};\n\nEventEmitter.prototype.rawListeners = function rawListeners(type) {\n return _listeners(this, type, false);\n};\n\nEventEmitter.listenerCount = function(emitter, type) {\n if (typeof emitter.listenerCount === 'function') {\n return emitter.listenerCount(type);\n } else {\n return listenerCount.call(emitter, type);\n }\n};\n\nEventEmitter.prototype.listenerCount = listenerCount;\nfunction listenerCount(type) {\n var events = this._events;\n\n if (events !== undefined) {\n var evlistener = events[type];\n\n if (typeof evlistener === 'function') {\n return 1;\n } else if (evlistener !== undefined) {\n return evlistener.length;\n }\n }\n\n return 0;\n}\n\nEventEmitter.prototype.eventNames = function eventNames() {\n return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : [];\n};\n\nfunction arrayClone(arr, n) {\n var copy = new Array(n);\n for (var i = 0; i < n; ++i)\n copy[i] = arr[i];\n return copy;\n}\n\nfunction spliceOne(list, index) {\n for (; index + 1 < list.length; index++)\n list[index] = list[index + 1];\n list.pop();\n}\n\nfunction unwrapListeners(arr) {\n var ret = new Array(arr.length);\n for (var i = 0; i < ret.length; ++i) {\n ret[i] = arr[i].listener || arr[i];\n }\n return ret;\n}\n\nfunction once(emitter, name) {\n return new Promise(function (resolve, reject) {\n function errorListener(err) {\n emitter.removeListener(name, resolver);\n reject(err);\n }\n\n function resolver() {\n if (typeof emitter.removeListener === 'function') {\n emitter.removeListener('error', errorListener);\n }\n resolve([].slice.call(arguments));\n };\n\n eventTargetAgnosticAddListener(emitter, name, resolver, { once: true });\n if (name !== 'error') {\n addErrorHandlerIfEventEmitter(emitter, errorListener, { once: true });\n }\n });\n}\n\nfunction addErrorHandlerIfEventEmitter(emitter, handler, flags) {\n if (typeof emitter.on === 'function') {\n eventTargetAgnosticAddListener(emitter, 'error', handler, flags);\n }\n}\n\nfunction eventTargetAgnosticAddListener(emitter, name, listener, flags) {\n if (typeof emitter.on === 'function') {\n if (flags.once) {\n emitter.once(name, listener);\n } else {\n emitter.on(name, listener);\n }\n } else if (typeof emitter.addEventListener === 'function') {\n // EventTarget does not have `error` event semantics like Node\n // EventEmitters, we do not listen for `error` events here.\n emitter.addEventListener(name, function wrapListener(arg) {\n // IE does not have builtin `{ once: true }` support so we\n // have to do it manually.\n if (flags.once) {\n emitter.removeEventListener(name, wrapListener);\n }\n listener(arg);\n });\n } else {\n throw new TypeError('The \"emitter\" argument must be of type EventEmitter. Received type ' + typeof emitter);\n }\n}\n","/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */\nexports.read = function (buffer, offset, isLE, mLen, nBytes) {\n var e, m\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var nBits = -7\n var i = isLE ? (nBytes - 1) : 0\n var d = isLE ? -1 : 1\n var s = buffer[offset + i]\n\n i += d\n\n e = s & ((1 << (-nBits)) - 1)\n s >>= (-nBits)\n nBits += eLen\n for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & ((1 << (-nBits)) - 1)\n e >>= (-nBits)\n nBits += mLen\n for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias\n } else if (e === eMax) {\n return m ? NaN : ((s ? -1 : 1) * Infinity)\n } else {\n m = m + Math.pow(2, mLen)\n e = e - eBias\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n var i = isLE ? 0 : (nBytes - 1)\n var d = isLE ? 1 : -1\n var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n value = Math.abs(value)\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0\n e = eMax\n } else {\n e = Math.floor(Math.log(value) / Math.LN2)\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--\n c *= 2\n }\n if (e + eBias >= 1) {\n value += rt / c\n } else {\n value += rt * Math.pow(2, 1 - eBias)\n }\n if (value * c >= 2) {\n e++\n c /= 2\n }\n\n if (e + eBias >= eMax) {\n m = 0\n e = eMax\n } else if (e + eBias >= 1) {\n m = ((value * c) - 1) * Math.pow(2, mLen)\n e = e + eBias\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n e = 0\n }\n }\n\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n e = (e << mLen) | m\n eLen += mLen\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128\n}\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView');\n\nmodule.exports = DataView;\n","var hashClear = require('./_hashClear'),\n hashDelete = require('./_hashDelete'),\n hashGet = require('./_hashGet'),\n hashHas = require('./_hashHas'),\n hashSet = require('./_hashSet');\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\nmodule.exports = Hash;\n","var listCacheClear = require('./_listCacheClear'),\n listCacheDelete = require('./_listCacheDelete'),\n listCacheGet = require('./_listCacheGet'),\n listCacheHas = require('./_listCacheHas'),\n listCacheSet = require('./_listCacheSet');\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\nmodule.exports = ListCache;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map');\n\nmodule.exports = Map;\n","var mapCacheClear = require('./_mapCacheClear'),\n mapCacheDelete = require('./_mapCacheDelete'),\n mapCacheGet = require('./_mapCacheGet'),\n mapCacheHas = require('./_mapCacheHas'),\n mapCacheSet = require('./_mapCacheSet');\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\nmodule.exports = MapCache;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Promise = getNative(root, 'Promise');\n\nmodule.exports = Promise;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Set = getNative(root, 'Set');\n\nmodule.exports = Set;\n","var MapCache = require('./_MapCache'),\n setCacheAdd = require('./_setCacheAdd'),\n setCacheHas = require('./_setCacheHas');\n\n/**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\nfunction SetCache(values) {\n var index = -1,\n length = values == null ? 0 : values.length;\n\n this.__data__ = new MapCache;\n while (++index < length) {\n this.add(values[index]);\n }\n}\n\n// Add methods to `SetCache`.\nSetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\nSetCache.prototype.has = setCacheHas;\n\nmodule.exports = SetCache;\n","var ListCache = require('./_ListCache'),\n stackClear = require('./_stackClear'),\n stackDelete = require('./_stackDelete'),\n stackGet = require('./_stackGet'),\n stackHas = require('./_stackHas'),\n stackSet = require('./_stackSet');\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\nmodule.exports = Stack;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Uint8Array = root.Uint8Array;\n\nmodule.exports = Uint8Array;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar WeakMap = getNative(root, 'WeakMap');\n\nmodule.exports = WeakMap;\n","/**\n * A specialized version of `_.forEach` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\nfunction arrayEach(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (iteratee(array[index], index, array) === false) {\n break;\n }\n }\n return array;\n}\n\nmodule.exports = arrayEach;\n","/**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\nfunction arrayFilter(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result[resIndex++] = value;\n }\n }\n return result;\n}\n\nmodule.exports = arrayFilter;\n","var baseTimes = require('./_baseTimes'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isIndex = require('./_isIndex'),\n isTypedArray = require('./isTypedArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = arrayLikeKeys;\n","/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n}\n\nmodule.exports = arrayPush;\n","/**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\nfunction arraySome(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (predicate(array[index], index, array)) {\n return true;\n }\n }\n return false;\n}\n\nmodule.exports = arraySome;\n","var baseAssignValue = require('./_baseAssignValue'),\n eq = require('./eq');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\nmodule.exports = assignValue;\n","var eq = require('./eq');\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\nmodule.exports = assocIndexOf;\n","var copyObject = require('./_copyObject'),\n keys = require('./keys');\n\n/**\n * The base implementation of `_.assign` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssign(object, source) {\n return object && copyObject(source, keys(source), object);\n}\n\nmodule.exports = baseAssign;\n","var copyObject = require('./_copyObject'),\n keysIn = require('./keysIn');\n\n/**\n * The base implementation of `_.assignIn` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssignIn(object, source) {\n return object && copyObject(source, keysIn(source), object);\n}\n\nmodule.exports = baseAssignIn;\n","var defineProperty = require('./_defineProperty');\n\n/**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction baseAssignValue(object, key, value) {\n if (key == '__proto__' && defineProperty) {\n defineProperty(object, key, {\n 'configurable': true,\n 'enumerable': true,\n 'value': value,\n 'writable': true\n });\n } else {\n object[key] = value;\n }\n}\n\nmodule.exports = baseAssignValue;\n","var Stack = require('./_Stack'),\n arrayEach = require('./_arrayEach'),\n assignValue = require('./_assignValue'),\n baseAssign = require('./_baseAssign'),\n baseAssignIn = require('./_baseAssignIn'),\n cloneBuffer = require('./_cloneBuffer'),\n copyArray = require('./_copyArray'),\n copySymbols = require('./_copySymbols'),\n copySymbolsIn = require('./_copySymbolsIn'),\n getAllKeys = require('./_getAllKeys'),\n getAllKeysIn = require('./_getAllKeysIn'),\n getTag = require('./_getTag'),\n initCloneArray = require('./_initCloneArray'),\n initCloneByTag = require('./_initCloneByTag'),\n initCloneObject = require('./_initCloneObject'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isMap = require('./isMap'),\n isObject = require('./isObject'),\n isSet = require('./isSet'),\n keys = require('./keys'),\n keysIn = require('./keysIn');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_FLAT_FLAG = 2,\n CLONE_SYMBOLS_FLAG = 4;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values supported by `_.clone`. */\nvar cloneableTags = {};\ncloneableTags[argsTag] = cloneableTags[arrayTag] =\ncloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =\ncloneableTags[boolTag] = cloneableTags[dateTag] =\ncloneableTags[float32Tag] = cloneableTags[float64Tag] =\ncloneableTags[int8Tag] = cloneableTags[int16Tag] =\ncloneableTags[int32Tag] = cloneableTags[mapTag] =\ncloneableTags[numberTag] = cloneableTags[objectTag] =\ncloneableTags[regexpTag] = cloneableTags[setTag] =\ncloneableTags[stringTag] = cloneableTags[symbolTag] =\ncloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =\ncloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;\ncloneableTags[errorTag] = cloneableTags[funcTag] =\ncloneableTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.clone` and `_.cloneDeep` which tracks\n * traversed objects.\n *\n * @private\n * @param {*} value The value to clone.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Deep clone\n * 2 - Flatten inherited properties\n * 4 - Clone symbols\n * @param {Function} [customizer] The function to customize cloning.\n * @param {string} [key] The key of `value`.\n * @param {Object} [object] The parent object of `value`.\n * @param {Object} [stack] Tracks traversed objects and their clone counterparts.\n * @returns {*} Returns the cloned value.\n */\nfunction baseClone(value, bitmask, customizer, key, object, stack) {\n var result,\n isDeep = bitmask & CLONE_DEEP_FLAG,\n isFlat = bitmask & CLONE_FLAT_FLAG,\n isFull = bitmask & CLONE_SYMBOLS_FLAG;\n\n if (customizer) {\n result = object ? customizer(value, key, object, stack) : customizer(value);\n }\n if (result !== undefined) {\n return result;\n }\n if (!isObject(value)) {\n return value;\n }\n var isArr = isArray(value);\n if (isArr) {\n result = initCloneArray(value);\n if (!isDeep) {\n return copyArray(value, result);\n }\n } else {\n var tag = getTag(value),\n isFunc = tag == funcTag || tag == genTag;\n\n if (isBuffer(value)) {\n return cloneBuffer(value, isDeep);\n }\n if (tag == objectTag || tag == argsTag || (isFunc && !object)) {\n result = (isFlat || isFunc) ? {} : initCloneObject(value);\n if (!isDeep) {\n return isFlat\n ? copySymbolsIn(value, baseAssignIn(result, value))\n : copySymbols(value, baseAssign(result, value));\n }\n } else {\n if (!cloneableTags[tag]) {\n return object ? value : {};\n }\n result = initCloneByTag(value, tag, isDeep);\n }\n }\n // Check for circular references and return its corresponding clone.\n stack || (stack = new Stack);\n var stacked = stack.get(value);\n if (stacked) {\n return stacked;\n }\n stack.set(value, result);\n\n if (isSet(value)) {\n value.forEach(function(subValue) {\n result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));\n });\n } else if (isMap(value)) {\n value.forEach(function(subValue, key) {\n result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n }\n\n var keysFunc = isFull\n ? (isFlat ? getAllKeysIn : getAllKeys)\n : (isFlat ? keysIn : keys);\n\n var props = isArr ? undefined : keysFunc(value);\n arrayEach(props || value, function(subValue, key) {\n if (props) {\n key = subValue;\n subValue = value[key];\n }\n // Recursively populate clone (susceptible to call stack limits).\n assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n return result;\n}\n\nmodule.exports = baseClone;\n","var isObject = require('./isObject');\n\n/** Built-in value references. */\nvar objectCreate = Object.create;\n\n/**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} proto The object to inherit from.\n * @returns {Object} Returns the new object.\n */\nvar baseCreate = (function() {\n function object() {}\n return function(proto) {\n if (!isObject(proto)) {\n return {};\n }\n if (objectCreate) {\n return objectCreate(proto);\n }\n object.prototype = proto;\n var result = new object;\n object.prototype = undefined;\n return result;\n };\n}());\n\nmodule.exports = baseCreate;\n","var arrayPush = require('./_arrayPush'),\n isArray = require('./isArray');\n\n/**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction baseGetAllKeys(object, keysFunc, symbolsFunc) {\n var result = keysFunc(object);\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n}\n\nmodule.exports = baseGetAllKeys;\n","var Symbol = require('./_Symbol'),\n getRawTag = require('./_getRawTag'),\n objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]';\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\nmodule.exports = baseIsArguments;\n","var baseIsEqualDeep = require('./_baseIsEqualDeep'),\n isObjectLike = require('./isObjectLike');\n\n/**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Unordered comparison\n * 2 - Partial comparison\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\nfunction baseIsEqual(value, other, bitmask, customizer, stack) {\n if (value === other) {\n return true;\n }\n if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\n return value !== value && other !== other;\n }\n return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n}\n\nmodule.exports = baseIsEqual;\n","var Stack = require('./_Stack'),\n equalArrays = require('./_equalArrays'),\n equalByTag = require('./_equalByTag'),\n equalObjects = require('./_equalObjects'),\n getTag = require('./_getTag'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isTypedArray = require('./isTypedArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n var objIsArr = isArray(object),\n othIsArr = isArray(other),\n objTag = objIsArr ? arrayTag : getTag(object),\n othTag = othIsArr ? arrayTag : getTag(other);\n\n objTag = objTag == argsTag ? objectTag : objTag;\n othTag = othTag == argsTag ? objectTag : othTag;\n\n var objIsObj = objTag == objectTag,\n othIsObj = othTag == objectTag,\n isSameTag = objTag == othTag;\n\n if (isSameTag && isBuffer(object)) {\n if (!isBuffer(other)) {\n return false;\n }\n objIsArr = true;\n objIsObj = false;\n }\n if (isSameTag && !objIsObj) {\n stack || (stack = new Stack);\n return (objIsArr || isTypedArray(object))\n ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n }\n if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n if (objIsWrapped || othIsWrapped) {\n var objUnwrapped = objIsWrapped ? object.value() : object,\n othUnwrapped = othIsWrapped ? other.value() : other;\n\n stack || (stack = new Stack);\n return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n }\n }\n if (!isSameTag) {\n return false;\n }\n stack || (stack = new Stack);\n return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n}\n\nmodule.exports = baseIsEqualDeep;\n","var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]';\n\n/**\n * The base implementation of `_.isMap` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n */\nfunction baseIsMap(value) {\n return isObjectLike(value) && getTag(value) == mapTag;\n}\n\nmodule.exports = baseIsMap;\n","var isFunction = require('./isFunction'),\n isMasked = require('./_isMasked'),\n isObject = require('./isObject'),\n toSource = require('./_toSource');\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\nmodule.exports = baseIsNative;\n","var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar setTag = '[object Set]';\n\n/**\n * The base implementation of `_.isSet` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n */\nfunction baseIsSet(value) {\n return isObjectLike(value) && getTag(value) == setTag;\n}\n\nmodule.exports = baseIsSet;\n","var baseGetTag = require('./_baseGetTag'),\n isLength = require('./isLength'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n\nmodule.exports = baseIsTypedArray;\n","var isPrototype = require('./_isPrototype'),\n nativeKeys = require('./_nativeKeys');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeys;\n","var isObject = require('./isObject'),\n isPrototype = require('./_isPrototype'),\n nativeKeysIn = require('./_nativeKeysIn');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeysIn(object) {\n if (!isObject(object)) {\n return nativeKeysIn(object);\n }\n var isProto = isPrototype(object),\n result = [];\n\n for (var key in object) {\n if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeysIn;\n","/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\nmodule.exports = baseTimes;\n","/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n return function(value) {\n return func(value);\n };\n}\n\nmodule.exports = baseUnary;\n","/**\n * Checks if a `cache` value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction cacheHas(cache, key) {\n return cache.has(key);\n}\n\nmodule.exports = cacheHas;\n","var Uint8Array = require('./_Uint8Array');\n\n/**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\nfunction cloneArrayBuffer(arrayBuffer) {\n var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n return result;\n}\n\nmodule.exports = cloneArrayBuffer;\n","var root = require('./_root');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined,\n allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;\n\n/**\n * Creates a clone of `buffer`.\n *\n * @private\n * @param {Buffer} buffer The buffer to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Buffer} Returns the cloned buffer.\n */\nfunction cloneBuffer(buffer, isDeep) {\n if (isDeep) {\n return buffer.slice();\n }\n var length = buffer.length,\n result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\n\n buffer.copy(result);\n return result;\n}\n\nmodule.exports = cloneBuffer;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer');\n\n/**\n * Creates a clone of `dataView`.\n *\n * @private\n * @param {Object} dataView The data view to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned data view.\n */\nfunction cloneDataView(dataView, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;\n return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);\n}\n\nmodule.exports = cloneDataView;\n","/** Used to match `RegExp` flags from their coerced string values. */\nvar reFlags = /\\w*$/;\n\n/**\n * Creates a clone of `regexp`.\n *\n * @private\n * @param {Object} regexp The regexp to clone.\n * @returns {Object} Returns the cloned regexp.\n */\nfunction cloneRegExp(regexp) {\n var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));\n result.lastIndex = regexp.lastIndex;\n return result;\n}\n\nmodule.exports = cloneRegExp;\n","var Symbol = require('./_Symbol');\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * Creates a clone of the `symbol` object.\n *\n * @private\n * @param {Object} symbol The symbol object to clone.\n * @returns {Object} Returns the cloned symbol object.\n */\nfunction cloneSymbol(symbol) {\n return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};\n}\n\nmodule.exports = cloneSymbol;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer');\n\n/**\n * Creates a clone of `typedArray`.\n *\n * @private\n * @param {Object} typedArray The typed array to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned typed array.\n */\nfunction cloneTypedArray(typedArray, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n}\n\nmodule.exports = cloneTypedArray;\n","/**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\nfunction copyArray(source, array) {\n var index = -1,\n length = source.length;\n\n array || (array = Array(length));\n while (++index < length) {\n array[index] = source[index];\n }\n return array;\n}\n\nmodule.exports = copyArray;\n","var assignValue = require('./_assignValue'),\n baseAssignValue = require('./_baseAssignValue');\n\n/**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\nfunction copyObject(source, props, object, customizer) {\n var isNew = !object;\n object || (object = {});\n\n var index = -1,\n length = props.length;\n\n while (++index < length) {\n var key = props[index];\n\n var newValue = customizer\n ? customizer(object[key], source[key], key, object, source)\n : undefined;\n\n if (newValue === undefined) {\n newValue = source[key];\n }\n if (isNew) {\n baseAssignValue(object, key, newValue);\n } else {\n assignValue(object, key, newValue);\n }\n }\n return object;\n}\n\nmodule.exports = copyObject;\n","var copyObject = require('./_copyObject'),\n getSymbols = require('./_getSymbols');\n\n/**\n * Copies own symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbols(source, object) {\n return copyObject(source, getSymbols(source), object);\n}\n\nmodule.exports = copySymbols;\n","var copyObject = require('./_copyObject'),\n getSymbolsIn = require('./_getSymbolsIn');\n\n/**\n * Copies own and inherited symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbolsIn(source, object) {\n return copyObject(source, getSymbolsIn(source), object);\n}\n\nmodule.exports = copySymbolsIn;\n","var root = require('./_root');\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\nmodule.exports = coreJsData;\n","var getNative = require('./_getNative');\n\nvar defineProperty = (function() {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n}());\n\nmodule.exports = defineProperty;\n","var SetCache = require('./_SetCache'),\n arraySome = require('./_arraySome'),\n cacheHas = require('./_cacheHas');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\nfunction equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n arrLength = array.length,\n othLength = other.length;\n\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n return false;\n }\n // Check that cyclic values are equal.\n var arrStacked = stack.get(array);\n var othStacked = stack.get(other);\n if (arrStacked && othStacked) {\n return arrStacked == other && othStacked == array;\n }\n var index = -1,\n result = true,\n seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n stack.set(array, other);\n stack.set(other, array);\n\n // Ignore non-index properties.\n while (++index < arrLength) {\n var arrValue = array[index],\n othValue = other[index];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, arrValue, index, other, array, stack)\n : customizer(arrValue, othValue, index, array, other, stack);\n }\n if (compared !== undefined) {\n if (compared) {\n continue;\n }\n result = false;\n break;\n }\n // Recursively compare arrays (susceptible to call stack limits).\n if (seen) {\n if (!arraySome(other, function(othValue, othIndex) {\n if (!cacheHas(seen, othIndex) &&\n (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n return seen.push(othIndex);\n }\n })) {\n result = false;\n break;\n }\n } else if (!(\n arrValue === othValue ||\n equalFunc(arrValue, othValue, bitmask, customizer, stack)\n )) {\n result = false;\n break;\n }\n }\n stack['delete'](array);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalArrays;\n","var Symbol = require('./_Symbol'),\n Uint8Array = require('./_Uint8Array'),\n eq = require('./eq'),\n equalArrays = require('./_equalArrays'),\n mapToArray = require('./_mapToArray'),\n setToArray = require('./_setToArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]';\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n switch (tag) {\n case dataViewTag:\n if ((object.byteLength != other.byteLength) ||\n (object.byteOffset != other.byteOffset)) {\n return false;\n }\n object = object.buffer;\n other = other.buffer;\n\n case arrayBufferTag:\n if ((object.byteLength != other.byteLength) ||\n !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n return false;\n }\n return true;\n\n case boolTag:\n case dateTag:\n case numberTag:\n // Coerce booleans to `1` or `0` and dates to milliseconds.\n // Invalid dates are coerced to `NaN`.\n return eq(+object, +other);\n\n case errorTag:\n return object.name == other.name && object.message == other.message;\n\n case regexpTag:\n case stringTag:\n // Coerce regexes to strings and treat strings, primitives and objects,\n // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n // for more details.\n return object == (other + '');\n\n case mapTag:\n var convert = mapToArray;\n\n case setTag:\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n convert || (convert = setToArray);\n\n if (object.size != other.size && !isPartial) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked) {\n return stacked == other;\n }\n bitmask |= COMPARE_UNORDERED_FLAG;\n\n // Recursively compare objects (susceptible to call stack limits).\n stack.set(object, other);\n var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n stack['delete'](object);\n return result;\n\n case symbolTag:\n if (symbolValueOf) {\n return symbolValueOf.call(object) == symbolValueOf.call(other);\n }\n }\n return false;\n}\n\nmodule.exports = equalByTag;\n","var getAllKeys = require('./_getAllKeys');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n objProps = getAllKeys(object),\n objLength = objProps.length,\n othProps = getAllKeys(other),\n othLength = othProps.length;\n\n if (objLength != othLength && !isPartial) {\n return false;\n }\n var index = objLength;\n while (index--) {\n var key = objProps[index];\n if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n return false;\n }\n }\n // Check that cyclic values are equal.\n var objStacked = stack.get(object);\n var othStacked = stack.get(other);\n if (objStacked && othStacked) {\n return objStacked == other && othStacked == object;\n }\n var result = true;\n stack.set(object, other);\n stack.set(other, object);\n\n var skipCtor = isPartial;\n while (++index < objLength) {\n key = objProps[index];\n var objValue = object[key],\n othValue = other[key];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, objValue, key, other, object, stack)\n : customizer(objValue, othValue, key, object, other, stack);\n }\n // Recursively compare objects (susceptible to call stack limits).\n if (!(compared === undefined\n ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n : compared\n )) {\n result = false;\n break;\n }\n skipCtor || (skipCtor = key == 'constructor');\n }\n if (result && !skipCtor) {\n var objCtor = object.constructor,\n othCtor = other.constructor;\n\n // Non `Object` object instances with different constructors are not equal.\n if (objCtor != othCtor &&\n ('constructor' in object && 'constructor' in other) &&\n !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n result = false;\n }\n }\n stack['delete'](object);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalObjects;\n","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n","var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbols = require('./_getSymbols'),\n keys = require('./keys');\n\n/**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeys(object) {\n return baseGetAllKeys(object, keys, getSymbols);\n}\n\nmodule.exports = getAllKeys;\n","var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbolsIn = require('./_getSymbolsIn'),\n keysIn = require('./keysIn');\n\n/**\n * Creates an array of own and inherited enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeysIn(object) {\n return baseGetAllKeys(object, keysIn, getSymbolsIn);\n}\n\nmodule.exports = getAllKeysIn;\n","var isKeyable = require('./_isKeyable');\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\nmodule.exports = getMapData;\n","var baseIsNative = require('./_baseIsNative'),\n getValue = require('./_getValue');\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\nmodule.exports = getNative;\n","var overArg = require('./_overArg');\n\n/** Built-in value references. */\nvar getPrototype = overArg(Object.getPrototypeOf, Object);\n\nmodule.exports = getPrototype;\n","var Symbol = require('./_Symbol');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nmodule.exports = getRawTag;\n","var arrayFilter = require('./_arrayFilter'),\n stubArray = require('./stubArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n if (object == null) {\n return [];\n }\n object = Object(object);\n return arrayFilter(nativeGetSymbols(object), function(symbol) {\n return propertyIsEnumerable.call(object, symbol);\n });\n};\n\nmodule.exports = getSymbols;\n","var arrayPush = require('./_arrayPush'),\n getPrototype = require('./_getPrototype'),\n getSymbols = require('./_getSymbols'),\n stubArray = require('./stubArray');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own and inherited enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {\n var result = [];\n while (object) {\n arrayPush(result, getSymbols(object));\n object = getPrototype(object);\n }\n return result;\n};\n\nmodule.exports = getSymbolsIn;\n","var DataView = require('./_DataView'),\n Map = require('./_Map'),\n Promise = require('./_Promise'),\n Set = require('./_Set'),\n WeakMap = require('./_WeakMap'),\n baseGetTag = require('./_baseGetTag'),\n toSource = require('./_toSource');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n setTag = '[object Set]',\n weakMapTag = '[object WeakMap]';\n\nvar dataViewTag = '[object DataView]';\n\n/** Used to detect maps, sets, and weakmaps. */\nvar dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nvar getTag = baseGetTag;\n\n// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\nif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = baseGetTag(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : '';\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n}\n\nmodule.exports = getTag;\n","/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\nmodule.exports = getValue;\n","var nativeCreate = require('./_nativeCreate');\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n}\n\nmodule.exports = hashClear;\n","/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = hashDelete;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\nmodule.exports = hashGet;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\nmodule.exports = hashHas;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\nmodule.exports = hashSet;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Initializes an array clone.\n *\n * @private\n * @param {Array} array The array to clone.\n * @returns {Array} Returns the initialized clone.\n */\nfunction initCloneArray(array) {\n var length = array.length,\n result = new array.constructor(length);\n\n // Add properties assigned by `RegExp#exec`.\n if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {\n result.index = array.index;\n result.input = array.input;\n }\n return result;\n}\n\nmodule.exports = initCloneArray;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer'),\n cloneDataView = require('./_cloneDataView'),\n cloneRegExp = require('./_cloneRegExp'),\n cloneSymbol = require('./_cloneSymbol'),\n cloneTypedArray = require('./_cloneTypedArray');\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/**\n * Initializes an object clone based on its `toStringTag`.\n *\n * **Note:** This function only supports cloning values with tags of\n * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.\n *\n * @private\n * @param {Object} object The object to clone.\n * @param {string} tag The `toStringTag` of the object to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneByTag(object, tag, isDeep) {\n var Ctor = object.constructor;\n switch (tag) {\n case arrayBufferTag:\n return cloneArrayBuffer(object);\n\n case boolTag:\n case dateTag:\n return new Ctor(+object);\n\n case dataViewTag:\n return cloneDataView(object, isDeep);\n\n case float32Tag: case float64Tag:\n case int8Tag: case int16Tag: case int32Tag:\n case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:\n return cloneTypedArray(object, isDeep);\n\n case mapTag:\n return new Ctor;\n\n case numberTag:\n case stringTag:\n return new Ctor(object);\n\n case regexpTag:\n return cloneRegExp(object);\n\n case setTag:\n return new Ctor;\n\n case symbolTag:\n return cloneSymbol(object);\n }\n}\n\nmodule.exports = initCloneByTag;\n","var baseCreate = require('./_baseCreate'),\n getPrototype = require('./_getPrototype'),\n isPrototype = require('./_isPrototype');\n\n/**\n * Initializes an object clone.\n *\n * @private\n * @param {Object} object The object to clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneObject(object) {\n return (typeof object.constructor == 'function' && !isPrototype(object))\n ? baseCreate(getPrototype(object))\n : {};\n}\n\nmodule.exports = initCloneObject;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n var type = typeof value;\n length = length == null ? MAX_SAFE_INTEGER : length;\n\n return !!length &&\n (type == 'number' ||\n (type != 'symbol' && reIsUint.test(value))) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\nmodule.exports = isIndex;\n","/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\nmodule.exports = isKeyable;\n","var coreJsData = require('./_coreJsData');\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\nmodule.exports = isMasked;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\nmodule.exports = isPrototype;\n","/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n}\n\nmodule.exports = listCacheClear;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype;\n\n/** Built-in value references. */\nvar splice = arrayProto.splice;\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n}\n\nmodule.exports = listCacheDelete;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\nmodule.exports = listCacheGet;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\nmodule.exports = listCacheHas;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\nmodule.exports = listCacheSet;\n","var Hash = require('./_Hash'),\n ListCache = require('./_ListCache'),\n Map = require('./_Map');\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\nmodule.exports = mapCacheClear;\n","var getMapData = require('./_getMapData');\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = mapCacheDelete;\n","var getMapData = require('./_getMapData');\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\nmodule.exports = mapCacheGet;\n","var getMapData = require('./_getMapData');\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\nmodule.exports = mapCacheHas;\n","var getMapData = require('./_getMapData');\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n}\n\nmodule.exports = mapCacheSet;\n","/**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\nfunction mapToArray(map) {\n var index = -1,\n result = Array(map.size);\n\n map.forEach(function(value, key) {\n result[++index] = [key, value];\n });\n return result;\n}\n\nmodule.exports = mapToArray;\n","var getNative = require('./_getNative');\n\n/* Built-in method references that are verified to be native. */\nvar nativeCreate = getNative(Object, 'create');\n\nmodule.exports = nativeCreate;\n","var overArg = require('./_overArg');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeKeys = overArg(Object.keys, Object);\n\nmodule.exports = nativeKeys;\n","/**\n * This function is like\n * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * except that it includes inherited enumerable properties.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction nativeKeysIn(object) {\n var result = [];\n if (object != null) {\n for (var key in Object(object)) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = nativeKeysIn;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n try {\n // Use `util.types` for Node.js 10+.\n var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n if (types) {\n return types;\n }\n\n // Legacy `process.binding('util')` for Node.js < 10.\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n}());\n\nmodule.exports = nodeUtil;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n","/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\nmodule.exports = overArg;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n","/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\nfunction setCacheAdd(value) {\n this.__data__.set(value, HASH_UNDEFINED);\n return this;\n}\n\nmodule.exports = setCacheAdd;\n","/**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\nfunction setCacheHas(value) {\n return this.__data__.has(value);\n}\n\nmodule.exports = setCacheHas;\n","/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\nfunction setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n}\n\nmodule.exports = setToArray;\n","var ListCache = require('./_ListCache');\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}\n\nmodule.exports = stackClear;\n","/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n var data = this.__data__,\n result = data['delete'](key);\n\n this.size = data.size;\n return result;\n}\n\nmodule.exports = stackDelete;\n","/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n return this.__data__.get(key);\n}\n\nmodule.exports = stackGet;\n","/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n return this.__data__.has(key);\n}\n\nmodule.exports = stackHas;\n","var ListCache = require('./_ListCache'),\n Map = require('./_Map'),\n MapCache = require('./_MapCache');\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n var data = this.__data__;\n if (data instanceof ListCache) {\n var pairs = data.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n this.size = ++data.size;\n return this;\n }\n data = this.__data__ = new MapCache(pairs);\n }\n data.set(key, value);\n this.size = data.size;\n return this;\n}\n\nmodule.exports = stackSet;\n","/** Used for built-in method references. */\nvar funcProto = Function.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\nmodule.exports = toSource;\n","var baseClone = require('./_baseClone');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_SYMBOLS_FLAG = 4;\n\n/**\n * This method is like `_.clone` except that it recursively clones `value`.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Lang\n * @param {*} value The value to recursively clone.\n * @returns {*} Returns the deep cloned value.\n * @see _.clone\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var deep = _.cloneDeep(objects);\n * console.log(deep[0] === objects[0]);\n * // => false\n */\nfunction cloneDeep(value) {\n return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);\n}\n\nmodule.exports = cloneDeep;\n","/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\nmodule.exports = eq;\n","var baseIsArguments = require('./_baseIsArguments'),\n isObjectLike = require('./isObjectLike');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n};\n\nmodule.exports = isArguments;\n","/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\nmodule.exports = isArray;\n","var isFunction = require('./isFunction'),\n isLength = require('./isLength');\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\nmodule.exports = isArrayLike;\n","var root = require('./_root'),\n stubFalse = require('./stubFalse');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\nmodule.exports = isBuffer;\n","var baseIsEqual = require('./_baseIsEqual');\n\n/**\n * Performs a deep comparison between two values to determine if they are\n * equivalent.\n *\n * **Note:** This method supports comparing arrays, array buffers, booleans,\n * date objects, error objects, maps, numbers, `Object` objects, regexes,\n * sets, strings, symbols, and typed arrays. `Object` objects are compared\n * by their own, not inherited, enumerable properties. Functions and DOM\n * nodes are compared by strict equality, i.e. `===`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.isEqual(object, other);\n * // => true\n *\n * object === other;\n * // => false\n */\nfunction isEqual(value, other) {\n return baseIsEqual(value, other);\n}\n\nmodule.exports = isEqual;\n","var baseGetTag = require('./_baseGetTag'),\n isObject = require('./isObject');\n\n/** `Object#toString` result references. */\nvar asyncTag = '[object AsyncFunction]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n proxyTag = '[object Proxy]';\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\nmodule.exports = isFunction;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\nmodule.exports = isLength;\n","var baseIsMap = require('./_baseIsMap'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsMap = nodeUtil && nodeUtil.isMap;\n\n/**\n * Checks if `value` is classified as a `Map` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n * @example\n *\n * _.isMap(new Map);\n * // => true\n *\n * _.isMap(new WeakMap);\n * // => false\n */\nvar isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;\n\nmodule.exports = isMap;\n","/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n","var baseIsSet = require('./_baseIsSet'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsSet = nodeUtil && nodeUtil.isSet;\n\n/**\n * Checks if `value` is classified as a `Set` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n * @example\n *\n * _.isSet(new Set);\n * // => true\n *\n * _.isSet(new WeakSet);\n * // => false\n */\nvar isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;\n\nmodule.exports = isSet;\n","var baseIsTypedArray = require('./_baseIsTypedArray'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\nmodule.exports = isTypedArray;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeys = require('./_baseKeys'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\nmodule.exports = keys;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeysIn = require('./_baseKeysIn'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\nfunction keysIn(object) {\n return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n}\n\nmodule.exports = keysIn;\n","/**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\nfunction stubArray() {\n return [];\n}\n\nmodule.exports = stubArray;\n","/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n return false;\n}\n\nmodule.exports = stubFalse;\n","import type { WebLayoutSnapshot } from \"@openfin/core-web\";\nimport type { Settings } from \"../shapes/setting-shapes\";\n\n/**\n * Fetches the settings for the application.\n * @returns The settings for the application.\n */\nexport async function getSettings(): Promise {\n\tconst settings = await getManifestSettings();\n\tif (settings === undefined) {\n\t\tconsole.error(\n\t\t\t\"Unable to run the example as settings are required and we fetch them from the link web manifest from the html page that is being served. It should exist in the customSettings section of the web manifest.\"\n\t\t);\n\t}\n\treturn settings;\n}\n\n/**\n * Returns a default layout from the settings if provided.\n * @returns The default layout from the settings.\n */\nexport async function getDefaultLayout(): Promise {\n\tconst settings = await getSettings();\n\tif (settings?.platform?.layout?.defaultLayout === undefined) {\n\t\tconsole.error(\n\t\t\t\"Unable to run the example as without a layout being defined. Please ensure that settings have been provided in the web manifest.\"\n\t\t);\n\t\treturn;\n\t}\n\tif (typeof settings.platform.layout.defaultLayout === \"string\") {\n\t\tconst layoutResponse = await fetch(settings.platform.layout.defaultLayout);\n\t\tconst layoutJson = (await layoutResponse.json()) as WebLayoutSnapshot;\n\t\treturn layoutJson;\n\t}\n\treturn settings.platform.layout.defaultLayout;\n}\n\n/**\n * Returns the settings from the manifest file.\n * @returns customSettings for this example\n */\nasync function getManifestSettings(): Promise {\n\t// Get the manifest link\n\tconst link = document.querySelector('link[rel=\"manifest\"]');\n\tif (link !== null) {\n\t\tconst manifestResponse = await fetch(link.href);\n\t\tconst manifestJson = (await manifestResponse.json()) as { custom_settings: Settings };\n\t\treturn manifestJson.custom_settings;\n\t}\n}\n","export { default as v1 } from './v1.js';\nexport { default as v3 } from './v3.js';\nexport { default as v4 } from './v4.js';\nexport { default as v5 } from './v5.js';\nexport { default as NIL } from './nil.js';\nexport { default as version } from './version.js';\nexport { default as validate } from './validate.js';\nexport { default as stringify } from './stringify.js';\nexport { default as parse } from './parse.js';","/*\n * Browser-compatible JavaScript MD5\n *\n * Modification of JavaScript MD5\n * https://github.com/blueimp/JavaScript-MD5\n *\n * Copyright 2011, Sebastian Tschan\n * https://blueimp.net\n *\n * Licensed under the MIT license:\n * https://opensource.org/licenses/MIT\n *\n * Based on\n * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message\n * Digest Algorithm, as defined in RFC 1321.\n * Version 2.2 Copyright (C) Paul Johnston 1999 - 2009\n * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet\n * Distributed under the BSD License\n * See http://pajhome.org.uk/crypt/md5 for more info.\n */\nfunction md5(bytes) {\n if (typeof bytes === 'string') {\n var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape\n\n bytes = new Uint8Array(msg.length);\n\n for (var i = 0; i < msg.length; ++i) {\n bytes[i] = msg.charCodeAt(i);\n }\n }\n\n return md5ToHexEncodedArray(wordsToMd5(bytesToWords(bytes), bytes.length * 8));\n}\n/*\n * Convert an array of little-endian words to an array of bytes\n */\n\n\nfunction md5ToHexEncodedArray(input) {\n var output = [];\n var length32 = input.length * 32;\n var hexTab = '0123456789abcdef';\n\n for (var i = 0; i < length32; i += 8) {\n var x = input[i >> 5] >>> i % 32 & 0xff;\n var hex = parseInt(hexTab.charAt(x >>> 4 & 0x0f) + hexTab.charAt(x & 0x0f), 16);\n output.push(hex);\n }\n\n return output;\n}\n/**\n * Calculate output length with padding and bit length\n */\n\n\nfunction getOutputLength(inputLength8) {\n return (inputLength8 + 64 >>> 9 << 4) + 14 + 1;\n}\n/*\n * Calculate the MD5 of an array of little-endian words, and a bit length.\n */\n\n\nfunction wordsToMd5(x, len) {\n /* append padding */\n x[len >> 5] |= 0x80 << len % 32;\n x[getOutputLength(len) - 1] = len;\n var a = 1732584193;\n var b = -271733879;\n var c = -1732584194;\n var d = 271733878;\n\n for (var i = 0; i < x.length; i += 16) {\n var olda = a;\n var oldb = b;\n var oldc = c;\n var oldd = d;\n a = md5ff(a, b, c, d, x[i], 7, -680876936);\n d = md5ff(d, a, b, c, x[i + 1], 12, -389564586);\n c = md5ff(c, d, a, b, x[i + 2], 17, 606105819);\n b = md5ff(b, c, d, a, x[i + 3], 22, -1044525330);\n a = md5ff(a, b, c, d, x[i + 4], 7, -176418897);\n d = md5ff(d, a, b, c, x[i + 5], 12, 1200080426);\n c = md5ff(c, d, a, b, x[i + 6], 17, -1473231341);\n b = md5ff(b, c, d, a, x[i + 7], 22, -45705983);\n a = md5ff(a, b, c, d, x[i + 8], 7, 1770035416);\n d = md5ff(d, a, b, c, x[i + 9], 12, -1958414417);\n c = md5ff(c, d, a, b, x[i + 10], 17, -42063);\n b = md5ff(b, c, d, a, x[i + 11], 22, -1990404162);\n a = md5ff(a, b, c, d, x[i + 12], 7, 1804603682);\n d = md5ff(d, a, b, c, x[i + 13], 12, -40341101);\n c = md5ff(c, d, a, b, x[i + 14], 17, -1502002290);\n b = md5ff(b, c, d, a, x[i + 15], 22, 1236535329);\n a = md5gg(a, b, c, d, x[i + 1], 5, -165796510);\n d = md5gg(d, a, b, c, x[i + 6], 9, -1069501632);\n c = md5gg(c, d, a, b, x[i + 11], 14, 643717713);\n b = md5gg(b, c, d, a, x[i], 20, -373897302);\n a = md5gg(a, b, c, d, x[i + 5], 5, -701558691);\n d = md5gg(d, a, b, c, x[i + 10], 9, 38016083);\n c = md5gg(c, d, a, b, x[i + 15], 14, -660478335);\n b = md5gg(b, c, d, a, x[i + 4], 20, -405537848);\n a = md5gg(a, b, c, d, x[i + 9], 5, 568446438);\n d = md5gg(d, a, b, c, x[i + 14], 9, -1019803690);\n c = md5gg(c, d, a, b, x[i + 3], 14, -187363961);\n b = md5gg(b, c, d, a, x[i + 8], 20, 1163531501);\n a = md5gg(a, b, c, d, x[i + 13], 5, -1444681467);\n d = md5gg(d, a, b, c, x[i + 2], 9, -51403784);\n c = md5gg(c, d, a, b, x[i + 7], 14, 1735328473);\n b = md5gg(b, c, d, a, x[i + 12], 20, -1926607734);\n a = md5hh(a, b, c, d, x[i + 5], 4, -378558);\n d = md5hh(d, a, b, c, x[i + 8], 11, -2022574463);\n c = md5hh(c, d, a, b, x[i + 11], 16, 1839030562);\n b = md5hh(b, c, d, a, x[i + 14], 23, -35309556);\n a = md5hh(a, b, c, d, x[i + 1], 4, -1530992060);\n d = md5hh(d, a, b, c, x[i + 4], 11, 1272893353);\n c = md5hh(c, d, a, b, x[i + 7], 16, -155497632);\n b = md5hh(b, c, d, a, x[i + 10], 23, -1094730640);\n a = md5hh(a, b, c, d, x[i + 13], 4, 681279174);\n d = md5hh(d, a, b, c, x[i], 11, -358537222);\n c = md5hh(c, d, a, b, x[i + 3], 16, -722521979);\n b = md5hh(b, c, d, a, x[i + 6], 23, 76029189);\n a = md5hh(a, b, c, d, x[i + 9], 4, -640364487);\n d = md5hh(d, a, b, c, x[i + 12], 11, -421815835);\n c = md5hh(c, d, a, b, x[i + 15], 16, 530742520);\n b = md5hh(b, c, d, a, x[i + 2], 23, -995338651);\n a = md5ii(a, b, c, d, x[i], 6, -198630844);\n d = md5ii(d, a, b, c, x[i + 7], 10, 1126891415);\n c = md5ii(c, d, a, b, x[i + 14], 15, -1416354905);\n b = md5ii(b, c, d, a, x[i + 5], 21, -57434055);\n a = md5ii(a, b, c, d, x[i + 12], 6, 1700485571);\n d = md5ii(d, a, b, c, x[i + 3], 10, -1894986606);\n c = md5ii(c, d, a, b, x[i + 10], 15, -1051523);\n b = md5ii(b, c, d, a, x[i + 1], 21, -2054922799);\n a = md5ii(a, b, c, d, x[i + 8], 6, 1873313359);\n d = md5ii(d, a, b, c, x[i + 15], 10, -30611744);\n c = md5ii(c, d, a, b, x[i + 6], 15, -1560198380);\n b = md5ii(b, c, d, a, x[i + 13], 21, 1309151649);\n a = md5ii(a, b, c, d, x[i + 4], 6, -145523070);\n d = md5ii(d, a, b, c, x[i + 11], 10, -1120210379);\n c = md5ii(c, d, a, b, x[i + 2], 15, 718787259);\n b = md5ii(b, c, d, a, x[i + 9], 21, -343485551);\n a = safeAdd(a, olda);\n b = safeAdd(b, oldb);\n c = safeAdd(c, oldc);\n d = safeAdd(d, oldd);\n }\n\n return [a, b, c, d];\n}\n/*\n * Convert an array bytes to an array of little-endian words\n * Characters >255 have their high-byte silently ignored.\n */\n\n\nfunction bytesToWords(input) {\n if (input.length === 0) {\n return [];\n }\n\n var length8 = input.length * 8;\n var output = new Uint32Array(getOutputLength(length8));\n\n for (var i = 0; i < length8; i += 8) {\n output[i >> 5] |= (input[i / 8] & 0xff) << i % 32;\n }\n\n return output;\n}\n/*\n * Add integers, wrapping at 2^32. This uses 16-bit operations internally\n * to work around bugs in some JS interpreters.\n */\n\n\nfunction safeAdd(x, y) {\n var lsw = (x & 0xffff) + (y & 0xffff);\n var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n return msw << 16 | lsw & 0xffff;\n}\n/*\n * Bitwise rotate a 32-bit number to the left.\n */\n\n\nfunction bitRotateLeft(num, cnt) {\n return num << cnt | num >>> 32 - cnt;\n}\n/*\n * These functions implement the four basic operations the algorithm uses.\n */\n\n\nfunction md5cmn(q, a, b, x, s, t) {\n return safeAdd(bitRotateLeft(safeAdd(safeAdd(a, q), safeAdd(x, t)), s), b);\n}\n\nfunction md5ff(a, b, c, d, x, s, t) {\n return md5cmn(b & c | ~b & d, a, b, x, s, t);\n}\n\nfunction md5gg(a, b, c, d, x, s, t) {\n return md5cmn(b & d | c & ~d, a, b, x, s, t);\n}\n\nfunction md5hh(a, b, c, d, x, s, t) {\n return md5cmn(b ^ c ^ d, a, b, x, s, t);\n}\n\nfunction md5ii(a, b, c, d, x, s, t) {\n return md5cmn(c ^ (b | ~d), a, b, x, s, t);\n}\n\nexport default md5;","export default '00000000-0000-0000-0000-000000000000';","import validate from './validate.js';\n\nfunction parse(uuid) {\n if (!validate(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n var v;\n var arr = new Uint8Array(16); // Parse ########-....-....-....-............\n\n arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24;\n arr[1] = v >>> 16 & 0xff;\n arr[2] = v >>> 8 & 0xff;\n arr[3] = v & 0xff; // Parse ........-####-....-....-............\n\n arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8;\n arr[5] = v & 0xff; // Parse ........-....-####-....-............\n\n arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8;\n arr[7] = v & 0xff; // Parse ........-....-....-####-............\n\n arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8;\n arr[9] = v & 0xff; // Parse ........-....-....-....-############\n // (Use \"/\" to avoid 32-bit truncation when bit-shifting high-order bytes)\n\n arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff;\n arr[11] = v / 0x100000000 & 0xff;\n arr[12] = v >>> 24 & 0xff;\n arr[13] = v >>> 16 & 0xff;\n arr[14] = v >>> 8 & 0xff;\n arr[15] = v & 0xff;\n return arr;\n}\n\nexport default parse;","export default /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;","// Unique ID creation requires a high quality random # generator. In the browser we therefore\n// require the crypto API and do not support built-in fallback to lower quality random number\n// generators (like Math.random()).\nvar getRandomValues;\nvar rnds8 = new Uint8Array(16);\nexport default function rng() {\n // lazy load so that environments that need to polyfill have a chance to do so\n if (!getRandomValues) {\n // getRandomValues needs to be invoked in a context where \"this\" is a Crypto implementation. Also,\n // find the complete implementation of crypto (msCrypto) on IE11.\n getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto !== 'undefined' && typeof msCrypto.getRandomValues === 'function' && msCrypto.getRandomValues.bind(msCrypto);\n\n if (!getRandomValues) {\n throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');\n }\n }\n\n return getRandomValues(rnds8);\n}","// Adapted from Chris Veness' SHA1 code at\n// http://www.movable-type.co.uk/scripts/sha1.html\nfunction f(s, x, y, z) {\n switch (s) {\n case 0:\n return x & y ^ ~x & z;\n\n case 1:\n return x ^ y ^ z;\n\n case 2:\n return x & y ^ x & z ^ y & z;\n\n case 3:\n return x ^ y ^ z;\n }\n}\n\nfunction ROTL(x, n) {\n return x << n | x >>> 32 - n;\n}\n\nfunction sha1(bytes) {\n var K = [0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xca62c1d6];\n var H = [0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0];\n\n if (typeof bytes === 'string') {\n var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape\n\n bytes = [];\n\n for (var i = 0; i < msg.length; ++i) {\n bytes.push(msg.charCodeAt(i));\n }\n } else if (!Array.isArray(bytes)) {\n // Convert Array-like to Array\n bytes = Array.prototype.slice.call(bytes);\n }\n\n bytes.push(0x80);\n var l = bytes.length / 4 + 2;\n var N = Math.ceil(l / 16);\n var M = new Array(N);\n\n for (var _i = 0; _i < N; ++_i) {\n var arr = new Uint32Array(16);\n\n for (var j = 0; j < 16; ++j) {\n arr[j] = bytes[_i * 64 + j * 4] << 24 | bytes[_i * 64 + j * 4 + 1] << 16 | bytes[_i * 64 + j * 4 + 2] << 8 | bytes[_i * 64 + j * 4 + 3];\n }\n\n M[_i] = arr;\n }\n\n M[N - 1][14] = (bytes.length - 1) * 8 / Math.pow(2, 32);\n M[N - 1][14] = Math.floor(M[N - 1][14]);\n M[N - 1][15] = (bytes.length - 1) * 8 & 0xffffffff;\n\n for (var _i2 = 0; _i2 < N; ++_i2) {\n var W = new Uint32Array(80);\n\n for (var t = 0; t < 16; ++t) {\n W[t] = M[_i2][t];\n }\n\n for (var _t = 16; _t < 80; ++_t) {\n W[_t] = ROTL(W[_t - 3] ^ W[_t - 8] ^ W[_t - 14] ^ W[_t - 16], 1);\n }\n\n var a = H[0];\n var b = H[1];\n var c = H[2];\n var d = H[3];\n var e = H[4];\n\n for (var _t2 = 0; _t2 < 80; ++_t2) {\n var s = Math.floor(_t2 / 20);\n var T = ROTL(a, 5) + f(s, b, c, d) + e + K[s] + W[_t2] >>> 0;\n e = d;\n d = c;\n c = ROTL(b, 30) >>> 0;\n b = a;\n a = T;\n }\n\n H[0] = H[0] + a >>> 0;\n H[1] = H[1] + b >>> 0;\n H[2] = H[2] + c >>> 0;\n H[3] = H[3] + d >>> 0;\n H[4] = H[4] + e >>> 0;\n }\n\n return [H[0] >> 24 & 0xff, H[0] >> 16 & 0xff, H[0] >> 8 & 0xff, H[0] & 0xff, H[1] >> 24 & 0xff, H[1] >> 16 & 0xff, H[1] >> 8 & 0xff, H[1] & 0xff, H[2] >> 24 & 0xff, H[2] >> 16 & 0xff, H[2] >> 8 & 0xff, H[2] & 0xff, H[3] >> 24 & 0xff, H[3] >> 16 & 0xff, H[3] >> 8 & 0xff, H[3] & 0xff, H[4] >> 24 & 0xff, H[4] >> 16 & 0xff, H[4] >> 8 & 0xff, H[4] & 0xff];\n}\n\nexport default sha1;","import validate from './validate.js';\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\n\nvar byteToHex = [];\n\nfor (var i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).substr(1));\n}\n\nfunction stringify(arr) {\n var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n var uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!validate(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n\n return uuid;\n}\n\nexport default stringify;","import rng from './rng.js';\nimport stringify from './stringify.js'; // **`v1()` - Generate time-based UUID**\n//\n// Inspired by https://github.com/LiosK/UUID.js\n// and http://docs.python.org/library/uuid.html\n\nvar _nodeId;\n\nvar _clockseq; // Previous uuid creation time\n\n\nvar _lastMSecs = 0;\nvar _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details\n\nfunction v1(options, buf, offset) {\n var i = buf && offset || 0;\n var b = buf || new Array(16);\n options = options || {};\n var node = options.node || _nodeId;\n var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not\n // specified. We do this lazily to minimize issues related to insufficient\n // system entropy. See #189\n\n if (node == null || clockseq == null) {\n var seedBytes = options.random || (options.rng || rng)();\n\n if (node == null) {\n // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)\n node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]];\n }\n\n if (clockseq == null) {\n // Per 4.2.2, randomize (14 bit) clockseq\n clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;\n }\n } // UUID timestamps are 100 nano-second units since the Gregorian epoch,\n // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so\n // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'\n // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.\n\n\n var msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock\n // cycle to simulate higher resolution clock\n\n var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs)\n\n var dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression\n\n if (dt < 0 && options.clockseq === undefined) {\n clockseq = clockseq + 1 & 0x3fff;\n } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new\n // time interval\n\n\n if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {\n nsecs = 0;\n } // Per 4.2.1.2 Throw error if too many uuids are requested\n\n\n if (nsecs >= 10000) {\n throw new Error(\"uuid.v1(): Can't create more than 10M uuids/sec\");\n }\n\n _lastMSecs = msecs;\n _lastNSecs = nsecs;\n _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch\n\n msecs += 12219292800000; // `time_low`\n\n var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;\n b[i++] = tl >>> 24 & 0xff;\n b[i++] = tl >>> 16 & 0xff;\n b[i++] = tl >>> 8 & 0xff;\n b[i++] = tl & 0xff; // `time_mid`\n\n var tmh = msecs / 0x100000000 * 10000 & 0xfffffff;\n b[i++] = tmh >>> 8 & 0xff;\n b[i++] = tmh & 0xff; // `time_high_and_version`\n\n b[i++] = tmh >>> 24 & 0xf | 0x10; // include version\n\n b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)\n\n b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low`\n\n b[i++] = clockseq & 0xff; // `node`\n\n for (var n = 0; n < 6; ++n) {\n b[i + n] = node[n];\n }\n\n return buf || stringify(b);\n}\n\nexport default v1;","import v35 from './v35.js';\nimport md5 from './md5.js';\nvar v3 = v35('v3', 0x30, md5);\nexport default v3;","import stringify from './stringify.js';\nimport parse from './parse.js';\n\nfunction stringToBytes(str) {\n str = unescape(encodeURIComponent(str)); // UTF8 escape\n\n var bytes = [];\n\n for (var i = 0; i < str.length; ++i) {\n bytes.push(str.charCodeAt(i));\n }\n\n return bytes;\n}\n\nexport var DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8';\nexport var URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8';\nexport default function (name, version, hashfunc) {\n function generateUUID(value, namespace, buf, offset) {\n if (typeof value === 'string') {\n value = stringToBytes(value);\n }\n\n if (typeof namespace === 'string') {\n namespace = parse(namespace);\n }\n\n if (namespace.length !== 16) {\n throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)');\n } // Compute hash of namespace and value, Per 4.3\n // Future: Use spread syntax when supported on all platforms, e.g. `bytes =\n // hashfunc([...namespace, ... value])`\n\n\n var bytes = new Uint8Array(16 + value.length);\n bytes.set(namespace);\n bytes.set(value, namespace.length);\n bytes = hashfunc(bytes);\n bytes[6] = bytes[6] & 0x0f | version;\n bytes[8] = bytes[8] & 0x3f | 0x80;\n\n if (buf) {\n offset = offset || 0;\n\n for (var i = 0; i < 16; ++i) {\n buf[offset + i] = bytes[i];\n }\n\n return buf;\n }\n\n return stringify(bytes);\n } // Function#name is not settable on some platforms (#270)\n\n\n try {\n generateUUID.name = name; // eslint-disable-next-line no-empty\n } catch (err) {} // For CommonJS default export support\n\n\n generateUUID.DNS = DNS;\n generateUUID.URL = URL;\n return generateUUID;\n}","import rng from './rng.js';\nimport stringify from './stringify.js';\n\nfunction v4(options, buf, offset) {\n options = options || {};\n var rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n offset = offset || 0;\n\n for (var i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n\n return buf;\n }\n\n return stringify(rnds);\n}\n\nexport default v4;","import v35 from './v35.js';\nimport sha1 from './sha1.js';\nvar v5 = v35('v5', 0x50, sha1);\nexport default v5;","import REGEX from './regex.js';\n\nfunction validate(uuid) {\n return typeof uuid === 'string' && REGEX.test(uuid);\n}\n\nexport default validate;","import validate from './validate.js';\n\nfunction version(uuid) {\n if (!validate(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n return parseInt(uuid.substr(14, 1), 16);\n}\n\nexport default version;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = (module) => {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","import { connect } from \"@openfin/core-web\";\nimport { getDefaultLayout, getSettings } from \"./platform/settings\";\nimport type { Settings } from \"./shapes/setting-shapes\";\n\n/**\n * Sets up panels if supported.\n * @param settings The settings to use.\n */\nfunction setupPanels(settings: Settings): void {\n\tif (settings?.platform?.layout?.panels?.left) {\n\t\tconst leftPanel = settings.platform.layout.panels.left;\n\t\tconst leftPanelFrame = document.querySelector(`#${leftPanel.frameId}`);\n\t\tif (leftPanelFrame === null) {\n\t\t\tconsole.error(\n\t\t\t\t`Please ensure the document has an element with the following id #${leftPanel.frameContainerId} so that the web-layout can be applied.`\n\t\t\t);\n\t\t\treturn;\n\t\t}\n\t\tleftPanelFrame.src = leftPanel.url;\n\t\tconsole.log(`Panel ${leftPanel.frameId} has been setup with the url ${leftPanel.url}`);\n\t} else {\n\t\tconsole.log(\"No panels require setup.\");\n\t}\n}\n\n/**\n * Initializes the OpenFin Web Broker connection.\n */\nasync function init(): Promise {\n\t// Get the required settings\n\tconst settings = await getSettings();\n\t// Get the default layout\n\tconst layoutSnapshot = await getDefaultLayout();\n\n\tif (settings === undefined || layoutSnapshot === undefined) {\n\t\tconsole.error(\n\t\t\t\"Unable to run the sample as we have been unable to load the web manifest and it's settings from the currently running html page. Please ensure that the web manifest is being served and that it contains the custom_settings section.\"\n\t\t);\n\t\treturn;\n\t}\n\t// Get the dom element that should host the layout\n\tconst layoutContainer = document.querySelector(\n\t\t`#${settings.platform.layout.layoutContainerId}`\n\t);\n\tif (layoutContainer === null) {\n\t\tconsole.error(\n\t\t\t`Please ensure the document has an element with the following id #${settings.platform.layout.layoutContainerId} so that the web-layout can be applied.`\n\t\t);\n\t\treturn;\n\t}\n\t// Connect to the OpenFin Web Broker and pass the default layout.\n\t// It is good practice to specify providerId even if content is explicitly specifying it for cases where\n\t// this provider uses our layout system and content uses inheritance. currentContextGroup\n\t// is useful for defaulting any client that uses inheritance through our layout system.\n\tconst fin = await connect({\n\t\toptions: {\n\t\t\tbrokerUrl: settings.platform.interop.brokerUrl,\n\t\t\tinteropConfig: {\n\t\t\t\tproviderId: settings.platform.interop.providerId,\n\t\t\t\tcurrentContextGroup: settings.platform.interop.defaultContextGroup\n\t\t\t}\n\t\t},\n\t\tconnectionInheritance: \"enabled\",\n\t\tplatform: { layoutSnapshot }\n\t});\n\n\t// You may now use the `fin` object to initialize the broker and the layout.\n\tawait fin.Interop.init(settings.platform.interop.providerId);\n\n\t// initialize the layout and pass it the dom element to bind to\n\tawait fin.Platform.Layout.init({\n\t\tcontainer: layoutContainer\n\t});\n\t// setup panels not that everything has been initialized\n\tsetupPanels(settings);\n}\n\ninit()\n\t.then(() => {\n\t\tconsole.log(\"Connected to the OpenFin Web Broker.\");\n\t\treturn true;\n\t})\n\t.catch((err) => console.error(err));\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/web/v19.2.0/web-interop/layouts/default.layout.fin.json b/web/v19.2.0/web-interop/layouts/default.layout.fin.json index 0ec0323..13421ca 100644 --- a/web/v19.2.0/web-interop/layouts/default.layout.fin.json +++ b/web/v19.2.0/web-interop/layouts/default.layout.fin.json @@ -33,7 +33,7 @@ "type": "component", "componentName": "view", "componentState": { - "url": "https://built-on-openfin.github.io/dev-extensions/extensions/v19.1.0/interop/fdc3/context/2-0/fdc3-broadcast-view.html", + "url": "https://built-on-openfin.github.io/dev-extensions/extensions/v19.2.0/interop/fdc3/context/2-0/fdc3-broadcast-view.html", "name": "internal-generated-view-54a8ef85-a885-4234-be46-9d52e88fcb74" }, "title": "FDC3 Different Domain" @@ -70,7 +70,7 @@ "type": "component", "componentName": "view", "componentState": { - "url": "https://built-on-openfin.github.io/dev-extensions/extensions/v19.1.0/interop/interop-api/context/interop-broadcast-view.html", + "url": "https://built-on-openfin.github.io/dev-extensions/extensions/v19.2.0/interop/interop-api/context/interop-broadcast-view.html", "name": "internal-generated-view-2d9a3624-fd0e-4e0a-b681-a79a9616b871" }, "title": "Interop External Domain" diff --git a/web/v19.2.0/web-layout-basic/js/iframe-broker.bundle.js b/web/v19.2.0/web-layout-basic/js/iframe-broker.bundle.js index 02bacca..094ad51 100644 --- a/web/v19.2.0/web-layout-basic/js/iframe-broker.bundle.js +++ b/web/v19.2.0/web-layout-basic/js/iframe-broker.bundle.js @@ -2,10 +2,10 @@ /******/ "use strict"; /******/ var __webpack_modules__ = ({ -/***/ "./node_modules/@openfin/core-web/out/iframe-broker.js": -/*!*************************************************************!*\ - !*** ./node_modules/@openfin/core-web/out/iframe-broker.js ***! - \*************************************************************/ +/***/ "../../node_modules/@openfin/core-web/out/iframe-broker.js": +/*!*****************************************************************!*\ + !*** ../../node_modules/@openfin/core-web/out/iframe-broker.js ***! + \*****************************************************************/ /***/ ((__unused_webpack_module, exports) => { const e="web-broker-ports-ready",t="worker-initialize-connection",i="create-fallback-connection",r="request-fallback-connection",n=e=>`ack-${e}`,o=(...e)=>({log:(...t)=>console.debug(`[${(new Date).toISOString()}]`,...(e=>e.map((e=>`[${e}]`)))(e),...t),getLogger:(...t)=>o(...e,...t)}),s=e=>window.top===e,a=(e,t)=>{try{return e.origin===t.origin}catch(e){return!1}},c="openfin/web-shared-worker";class d{static get lockApi(){return navigator.locks}constructor(e){this.name=e,this.releaseCallback=null,d.pending.add(this),this.lockAcquiredPromise=new Promise(((e,t)=>{this.lockReleasedPromise=d.lockApi.request(this.name,(()=>(d.pending.delete(this),e(),new Promise((e=>{d.held.add(this),this.releaseCallback=e}))))).catch((e=>{throw t(e),e}))}))}async acquired(){await this.lockAcquiredPromise}async release(){if(!this.releaseCallback)throw new Error(`Lock ${this.name} not acquired.`);this.releaseCallback(),this.releaseCallback=null,await this.lockReleasedPromise,d.held.delete(this)}async onReleased(e){if(!this.lockReleasedPromise)throw new Error(`Lock ${this.name} not queued.`);return this.lockReleasedPromise.then(e)}autoRelease(){this.acquired().then((()=>this.release()))}static async releaseAll(){const e=Promise.all([...this.pending].map((async e=>{await e.acquired(),await e.release()})));await Promise.all([...this.held].map((async e=>{await e.release()}))),await e}}d.pending=new Set,d.held=new Set;class l{constructor(e=100,t=2){this.pingIntervalMs=e,this.allowedMissedPings=t,this.lockSelf=async e=>{const t=new d((e=>`__OPENFIN__${e.uuid}_${e.name}`)(e));return await t.acquired(),t}}async lockProxiedConnection(e,t){let i=0;t.addEventListener("message",(e=>{"pong"===e.data.topic&&i--}));const r=await this.lockSelf(e);let n=setInterval((()=>{i>=this.allowedMissedPings?(r.release(),clearInterval(n)):(i++,t.postMessage({topic:"ping"}))}),this.pingIntervalMs);t.start()}registerProxiedConnection(e){e.addEventListener("message",(t=>{"ping"===t.data.topic&&e.postMessage({topic:"pong"})})),e.start()}}class h{constructor(e,t,o){this.workerUrl=e,this.iframeWindow=t,this.forceWorker=o,this.identityDisconnectionController=new l,this.isSharedWorkerSupported=()=>!this.forceWorker&&!!window.SharedWorker,this.state="ready",this.establishWorkerConnectionViaWindow=async(e,t)=>{if(a(this.iframeWindow,e)){const o=new MessageChannel,s=new MessageChannel;return this.identityDisconnectionController.registerProxiedConnection(s.port1),new Promise(((a,c)=>{o.port1.addEventListener("message",(e=>{e.data.topic===n(i)&&(e.data.success?a(o.port1):c(e.data.reason))})),o.port1.start();const d={topic:r,payload:{identity:t}};e.postMessage(d,location.origin,[o.port2,s.port2])}))}throw new Error("Could not connect via top level browsing context as its origin does not much the web interop broker.")},this.listenForNestedConnections=e=>{"top-window"===this.state&&a(this.iframeWindow,this.iframeWindow.parent)&&this.iframeWindow.parent.addEventListener("message",(async t=>{const{data:n}=t;if(t.origin===location.origin&&n.topic===r){const[r,...o]=t.ports;if(o.length>0&&n.payload?.identity){const[e]=o;await this.identityDisconnectionController.lockProxiedConnection(n.payload.identity,e)}const s={topic:i};e.postMessage(s,[r])}}))},this.initialize=async e=>{if("ready"!==this.state)throw new Error("Worker connection already initialized");return(e=>{const t=i=>!(!(e=>{try{return!e.origin}catch(e){return!0}})(i)&&i.origin===e.origin)||!s(i)&&t(i.parent);return!s(e)&&t(e.parent)})(this.iframeWindow)&&a(this.iframeWindow,this.iframeWindow.top)?this.state="partitioned-frame":s(this.iframeWindow.parent)?this.state="top-window":this.state="frame",this.connect(e)}}async connect(e){if("ready"===this.state)throw new Error("Must call initialize before connect");switch(this.state){case"partitioned-frame":return this.establishWorkerConnectionViaWindow(this.iframeWindow.top,e);case"top-window":{let t;return t=this.isSharedWorkerSupported()?new SharedWorker(this.workerUrl,c).port:new Worker(this.workerUrl),await this.identityDisconnectionController.lockSelf(e),this.listenForNestedConnections(t),t}case"frame":{if(!this.isSharedWorkerSupported())try{return await this.establishWorkerConnectionViaWindow(this.iframeWindow.top,e)}catch(e){throw new Error(`SharedWorker is not supported and an unexpected error occured when trying to connect via fallback mechanism: ${e.message}`,{cause:e})}await this.identityDisconnectionController.lockSelf(e);const{port:t}=new SharedWorker(this.workerUrl,c);return t}default:throw this.state,new Error(`Invalid state: ${this.state}`)}}}const w=o("@openfin/core-web/iframe-broker"),p=()=>{const e=((e,t)=>{const i=new RegExp(`^${t}<(?.*)>$`).exec(e)?.groups?.meta;if(i)try{return JSON.parse(atob(i))}catch(e){throw new Error(`Failed to decode JSON from ${i}.`)}})(window.name,"of-broker");if(!e)throw new Error("Invalid or missing identity string in iframe context. Ensure that this iframe is being renderered via the @openfin/core-web library.");return e};function g(t){const i={topic:n(e),success:!1,reason:t?.reason??"Connection Rejected"};window.parent.postMessage(i,"*")}exports.init=async i=>{try{const{sharedWorkerUrl:r}=i;await("loading"===document.readyState?new Promise((e=>{const t=()=>{e(),window.removeEventListener("DOMContentLoaded",t)};window.addEventListener("DOMContentLoaded",t)})):Promise.resolve());const o=p(),s=new h(r,window,"same-site"!==i.experimental?.crossTab),a=await s.initialize(o);w.log(`Loading ${r} in ${s.state} mode...`);const c=await(async(i,r,o)=>{const s=new MessageChannel,a=new MessageChannel,c={topic:t,payload:{identity:o}};await new Promise(((e,i)=>{r.addEventListener("message",(r=>{r.data.topic===n(t)&&(r.data.success?e():i(new Error(r.data.reason)))})),r.start?.(),r.postMessage(c,[a.port2])}));const d={topic:n(e),success:!0,payload:{identity:o}};return i.postMessage(d,"*",[s.port2,a.port1]),s.port1})(window.parent,a,o);c.start(),a.start?.(),w.log(`Port transfer complete in ${s.state} mode. Connection established with identity ${JSON.stringify(o)}. SharedWorker support=${s.isSharedWorkerSupported()}`)}catch(e){const t=new Error(`An unexpected error occured during initialization. ${e.message}`);g({reason:t.message}),console.error(t)}},exports.rejectConnections=g; @@ -41,7 +41,7 @@ const e="web-broker-ports-ready",t="worker-initialize-connection",i="create-fall /******/ /************************************************************************/ var __webpack_exports__ = {}; -// This entry need to be wrapped in an IIFE because it uses a non-standard name for the exports (exports). +// This entry needs to be wrapped in an IIFE because it needs to be isolated against other modules in the chunk. (() => { var exports = __webpack_exports__; /*!**********************************************!*\ @@ -49,7 +49,7 @@ var exports = __webpack_exports__; \**********************************************/ Object.defineProperty(exports, "__esModule", ({ value: true })); -const iframe_broker_1 = __webpack_require__(/*! @openfin/core-web/iframe-broker */ "./node_modules/@openfin/core-web/out/iframe-broker.js"); +const iframe_broker_1 = __webpack_require__(/*! @openfin/core-web/iframe-broker */ "../../node_modules/@openfin/core-web/out/iframe-broker.js"); /** * Initializes the OpenFin Web Broker connection. * @returns A promise that resolves when the connection is established. diff --git a/web/v19.2.0/web-layout-basic/js/iframe-broker.bundle.js.map b/web/v19.2.0/web-layout-basic/js/iframe-broker.bundle.js.map index 96e3a54..1f5d85b 100644 --- a/web/v19.2.0/web-layout-basic/js/iframe-broker.bundle.js.map +++ b/web/v19.2.0/web-layout-basic/js/iframe-broker.bundle.js.map @@ -1 +1 @@ -{"version":3,"file":"iframe-broker.bundle.js","mappings":";;;;;;;;;;AAAa,6IAA6I,EAAE,cAAc,8BAA8B,yBAAyB,wBAAwB,EAAE,8CAA8C,gCAAgC,IAAI,2BAA2B,SAAS,UAAU,+BAA+B,QAAQ,qBAAqB,uBAAuB,eAAe,wGAAwG,uGAAuG,wCAAwC,iBAAiB,aAAa,GAAG,GAAG,iBAAiB,+BAA+B,gBAAgB,iDAAiD,WAAW,gBAAgB,oGAAoG,oBAAoB,qDAAqD,WAAW,cAAc,wCAAwC,cAAc,2CAA2C,0BAA0B,qDAAqD,qCAAqC,IAAI,gDAAgD,kBAAkB,aAAa,iCAAiC,QAAQ,uBAAuB,wEAAwE,gCAAgC,OAAO,GAAG,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;;ACtBA,4IAA+E;AAE/E;;;GAGG;AACH,KAAK,UAAU,IAAI;IAClB,OAAO,wBAAoB,EAAC;QAC3B,eAAe,EAAE,kDAAkD;KACnE,CAAC,CAAC;AACJ,CAAC;AAED,IAAI,EAAE;KACJ,IAAI,CAAC,GAAG,EAAE;IACV,OAAO,CAAC,GAAG,CAAC,6CAA6C,CAAC,CAAC;IAC3D,OAAO,IAAI,CAAC;AACb,CAAC,CAAC;KACD,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC","sources":["webpack://openfin-web--web-layout-basic/./node_modules/@openfin/core-web/out/iframe-broker.js","webpack://openfin-web--web-layout-basic/webpack/bootstrap","webpack://openfin-web--web-layout-basic/./client/src/platform/iframe-broker.ts"],"sourcesContent":["\"use strict\";const e=\"web-broker-ports-ready\",t=\"worker-initialize-connection\",i=\"create-fallback-connection\",r=\"request-fallback-connection\",n=e=>`ack-${e}`,o=(...e)=>({log:(...t)=>console.debug(`[${(new Date).toISOString()}]`,...(e=>e.map((e=>`[${e}]`)))(e),...t),getLogger:(...t)=>o(...e,...t)}),s=e=>window.top===e,a=(e,t)=>{try{return e.origin===t.origin}catch(e){return!1}},c=\"openfin/web-shared-worker\";class d{static get lockApi(){return navigator.locks}constructor(e){this.name=e,this.releaseCallback=null,d.pending.add(this),this.lockAcquiredPromise=new Promise(((e,t)=>{this.lockReleasedPromise=d.lockApi.request(this.name,(()=>(d.pending.delete(this),e(),new Promise((e=>{d.held.add(this),this.releaseCallback=e}))))).catch((e=>{throw t(e),e}))}))}async acquired(){await this.lockAcquiredPromise}async release(){if(!this.releaseCallback)throw new Error(`Lock ${this.name} not acquired.`);this.releaseCallback(),this.releaseCallback=null,await this.lockReleasedPromise,d.held.delete(this)}async onReleased(e){if(!this.lockReleasedPromise)throw new Error(`Lock ${this.name} not queued.`);return this.lockReleasedPromise.then(e)}autoRelease(){this.acquired().then((()=>this.release()))}static async releaseAll(){const e=Promise.all([...this.pending].map((async e=>{await e.acquired(),await e.release()})));await Promise.all([...this.held].map((async e=>{await e.release()}))),await e}}d.pending=new Set,d.held=new Set;class l{constructor(e=100,t=2){this.pingIntervalMs=e,this.allowedMissedPings=t,this.lockSelf=async e=>{const t=new d((e=>`__OPENFIN__${e.uuid}_${e.name}`)(e));return await t.acquired(),t}}async lockProxiedConnection(e,t){let i=0;t.addEventListener(\"message\",(e=>{\"pong\"===e.data.topic&&i--}));const r=await this.lockSelf(e);let n=setInterval((()=>{i>=this.allowedMissedPings?(r.release(),clearInterval(n)):(i++,t.postMessage({topic:\"ping\"}))}),this.pingIntervalMs);t.start()}registerProxiedConnection(e){e.addEventListener(\"message\",(t=>{\"ping\"===t.data.topic&&e.postMessage({topic:\"pong\"})})),e.start()}}class h{constructor(e,t,o){this.workerUrl=e,this.iframeWindow=t,this.forceWorker=o,this.identityDisconnectionController=new l,this.isSharedWorkerSupported=()=>!this.forceWorker&&!!window.SharedWorker,this.state=\"ready\",this.establishWorkerConnectionViaWindow=async(e,t)=>{if(a(this.iframeWindow,e)){const o=new MessageChannel,s=new MessageChannel;return this.identityDisconnectionController.registerProxiedConnection(s.port1),new Promise(((a,c)=>{o.port1.addEventListener(\"message\",(e=>{e.data.topic===n(i)&&(e.data.success?a(o.port1):c(e.data.reason))})),o.port1.start();const d={topic:r,payload:{identity:t}};e.postMessage(d,location.origin,[o.port2,s.port2])}))}throw new Error(\"Could not connect via top level browsing context as its origin does not much the web interop broker.\")},this.listenForNestedConnections=e=>{\"top-window\"===this.state&&a(this.iframeWindow,this.iframeWindow.parent)&&this.iframeWindow.parent.addEventListener(\"message\",(async t=>{const{data:n}=t;if(t.origin===location.origin&&n.topic===r){const[r,...o]=t.ports;if(o.length>0&&n.payload?.identity){const[e]=o;await this.identityDisconnectionController.lockProxiedConnection(n.payload.identity,e)}const s={topic:i};e.postMessage(s,[r])}}))},this.initialize=async e=>{if(\"ready\"!==this.state)throw new Error(\"Worker connection already initialized\");return(e=>{const t=i=>!(!(e=>{try{return!e.origin}catch(e){return!0}})(i)&&i.origin===e.origin)||!s(i)&&t(i.parent);return!s(e)&&t(e.parent)})(this.iframeWindow)&&a(this.iframeWindow,this.iframeWindow.top)?this.state=\"partitioned-frame\":s(this.iframeWindow.parent)?this.state=\"top-window\":this.state=\"frame\",this.connect(e)}}async connect(e){if(\"ready\"===this.state)throw new Error(\"Must call initialize before connect\");switch(this.state){case\"partitioned-frame\":return this.establishWorkerConnectionViaWindow(this.iframeWindow.top,e);case\"top-window\":{let t;return t=this.isSharedWorkerSupported()?new SharedWorker(this.workerUrl,c).port:new Worker(this.workerUrl),await this.identityDisconnectionController.lockSelf(e),this.listenForNestedConnections(t),t}case\"frame\":{if(!this.isSharedWorkerSupported())try{return await this.establishWorkerConnectionViaWindow(this.iframeWindow.top,e)}catch(e){throw new Error(`SharedWorker is not supported and an unexpected error occured when trying to connect via fallback mechanism: ${e.message}`,{cause:e})}await this.identityDisconnectionController.lockSelf(e);const{port:t}=new SharedWorker(this.workerUrl,c);return t}default:throw this.state,new Error(`Invalid state: ${this.state}`)}}}const w=o(\"@openfin/core-web/iframe-broker\"),p=()=>{const e=((e,t)=>{const i=new RegExp(`^${t}<(?.*)>$`).exec(e)?.groups?.meta;if(i)try{return JSON.parse(atob(i))}catch(e){throw new Error(`Failed to decode JSON from ${i}.`)}})(window.name,\"of-broker\");if(!e)throw new Error(\"Invalid or missing identity string in iframe context. Ensure that this iframe is being renderered via the @openfin/core-web library.\");return e};function g(t){const i={topic:n(e),success:!1,reason:t?.reason??\"Connection Rejected\"};window.parent.postMessage(i,\"*\")}exports.init=async i=>{try{const{sharedWorkerUrl:r}=i;await(\"loading\"===document.readyState?new Promise((e=>{const t=()=>{e(),window.removeEventListener(\"DOMContentLoaded\",t)};window.addEventListener(\"DOMContentLoaded\",t)})):Promise.resolve());const o=p(),s=new h(r,window,\"same-site\"!==i.experimental?.crossTab),a=await s.initialize(o);w.log(`Loading ${r} in ${s.state} mode...`);const c=await(async(i,r,o)=>{const s=new MessageChannel,a=new MessageChannel,c={topic:t,payload:{identity:o}};await new Promise(((e,i)=>{r.addEventListener(\"message\",(r=>{r.data.topic===n(t)&&(r.data.success?e():i(new Error(r.data.reason)))})),r.start?.(),r.postMessage(c,[a.port2])}));const d={topic:n(e),success:!0,payload:{identity:o}};return i.postMessage(d,\"*\",[s.port2,a.port1]),s.port1})(window.parent,a,o);c.start(),a.start?.(),w.log(`Port transfer complete in ${s.state} mode. Connection established with identity ${JSON.stringify(o)}. SharedWorker support=${s.isSharedWorkerSupported()}`)}catch(e){const t=new Error(`An unexpected error occured during initialization. ${e.message}`);g({reason:t.message}),console.error(t)}},exports.rejectConnections=g;\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","import { init as initBrokerConnection } from \"@openfin/core-web/iframe-broker\";\n\n/**\n * Initializes the OpenFin Web Broker connection.\n * @returns A promise that resolves when the connection is established.\n */\nasync function init(): Promise {\n\treturn initBrokerConnection({\n\t\tsharedWorkerUrl: \"http://localhost:6060/js/shared-worker.bundle.js\"\n\t});\n}\n\ninit()\n\t.then(() => {\n\t\tconsole.log(\"Connected to the OpenFin IFrame Web Broker.\");\n\t\treturn true;\n\t})\n\t.catch((err) => console.error(err));\n"],"names":[],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"iframe-broker.bundle.js","mappings":";;;;;;;;;;AAAa,6IAA6I,EAAE,cAAc,8BAA8B,yBAAyB,wBAAwB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UAAU,6BAA6B,mDAAmD,iBAAiB,aAAa,2BAA2B,kCAAkC,sEAAsE,0CAA0C,GAAG,SAAS,+BAA+B,aAAa,sDAAsD,qBAAqB,yDAAyD,SAAS,6CAA6C,kBAAkB,yBAAyB,4BAA4B,GAAG,SAAS,wEAAwE,UAAU,GAAG,GAAG,iBAAiB,oBAAoB,CAAC,yBAAyB;;;;;;;UCAloM;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;;;;;;;;ACtBA,gJAA+E;AAE/E;;;GAGG;AACH,KAAK,UAAU,IAAI;IAClB,OAAO,wBAAoB,EAAC;QAC3B,eAAe,EAAE,kDAAkD;KACnE,CAAC,CAAC;AACJ,CAAC;AAED,IAAI,EAAE;KACJ,IAAI,CAAC,GAAG,EAAE;IACV,OAAO,CAAC,GAAG,CAAC,6CAA6C,CAAC,CAAC;IAC3D,OAAO,IAAI,CAAC;AACb,CAAC,CAAC;KACD,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC","sources":["webpack://openfin-web--web-layout-basic/../../node_modules/@openfin/core-web/out/iframe-broker.js","webpack://openfin-web--web-layout-basic/webpack/bootstrap","webpack://openfin-web--web-layout-basic/./client/src/platform/iframe-broker.ts"],"sourcesContent":["\"use strict\";const e=\"web-broker-ports-ready\",t=\"worker-initialize-connection\",i=\"create-fallback-connection\",r=\"request-fallback-connection\",n=e=>`ack-${e}`,o=(...e)=>({log:(...t)=>console.debug(`[${(new Date).toISOString()}]`,...(e=>e.map((e=>`[${e}]`)))(e),...t),getLogger:(...t)=>o(...e,...t)}),s=e=>window.top===e,a=(e,t)=>{try{return e.origin===t.origin}catch(e){return!1}},c=\"openfin/web-shared-worker\";class d{static get lockApi(){return navigator.locks}constructor(e){this.name=e,this.releaseCallback=null,d.pending.add(this),this.lockAcquiredPromise=new Promise(((e,t)=>{this.lockReleasedPromise=d.lockApi.request(this.name,(()=>(d.pending.delete(this),e(),new Promise((e=>{d.held.add(this),this.releaseCallback=e}))))).catch((e=>{throw t(e),e}))}))}async acquired(){await this.lockAcquiredPromise}async release(){if(!this.releaseCallback)throw new Error(`Lock ${this.name} not acquired.`);this.releaseCallback(),this.releaseCallback=null,await this.lockReleasedPromise,d.held.delete(this)}async onReleased(e){if(!this.lockReleasedPromise)throw new Error(`Lock ${this.name} not queued.`);return this.lockReleasedPromise.then(e)}autoRelease(){this.acquired().then((()=>this.release()))}static async releaseAll(){const e=Promise.all([...this.pending].map((async e=>{await e.acquired(),await e.release()})));await Promise.all([...this.held].map((async e=>{await e.release()}))),await e}}d.pending=new Set,d.held=new Set;class l{constructor(e=100,t=2){this.pingIntervalMs=e,this.allowedMissedPings=t,this.lockSelf=async e=>{const t=new d((e=>`__OPENFIN__${e.uuid}_${e.name}`)(e));return await t.acquired(),t}}async lockProxiedConnection(e,t){let i=0;t.addEventListener(\"message\",(e=>{\"pong\"===e.data.topic&&i--}));const r=await this.lockSelf(e);let n=setInterval((()=>{i>=this.allowedMissedPings?(r.release(),clearInterval(n)):(i++,t.postMessage({topic:\"ping\"}))}),this.pingIntervalMs);t.start()}registerProxiedConnection(e){e.addEventListener(\"message\",(t=>{\"ping\"===t.data.topic&&e.postMessage({topic:\"pong\"})})),e.start()}}class h{constructor(e,t,o){this.workerUrl=e,this.iframeWindow=t,this.forceWorker=o,this.identityDisconnectionController=new l,this.isSharedWorkerSupported=()=>!this.forceWorker&&!!window.SharedWorker,this.state=\"ready\",this.establishWorkerConnectionViaWindow=async(e,t)=>{if(a(this.iframeWindow,e)){const o=new MessageChannel,s=new MessageChannel;return this.identityDisconnectionController.registerProxiedConnection(s.port1),new Promise(((a,c)=>{o.port1.addEventListener(\"message\",(e=>{e.data.topic===n(i)&&(e.data.success?a(o.port1):c(e.data.reason))})),o.port1.start();const d={topic:r,payload:{identity:t}};e.postMessage(d,location.origin,[o.port2,s.port2])}))}throw new Error(\"Could not connect via top level browsing context as its origin does not much the web interop broker.\")},this.listenForNestedConnections=e=>{\"top-window\"===this.state&&a(this.iframeWindow,this.iframeWindow.parent)&&this.iframeWindow.parent.addEventListener(\"message\",(async t=>{const{data:n}=t;if(t.origin===location.origin&&n.topic===r){const[r,...o]=t.ports;if(o.length>0&&n.payload?.identity){const[e]=o;await this.identityDisconnectionController.lockProxiedConnection(n.payload.identity,e)}const s={topic:i};e.postMessage(s,[r])}}))},this.initialize=async e=>{if(\"ready\"!==this.state)throw new Error(\"Worker connection already initialized\");return(e=>{const t=i=>!(!(e=>{try{return!e.origin}catch(e){return!0}})(i)&&i.origin===e.origin)||!s(i)&&t(i.parent);return!s(e)&&t(e.parent)})(this.iframeWindow)&&a(this.iframeWindow,this.iframeWindow.top)?this.state=\"partitioned-frame\":s(this.iframeWindow.parent)?this.state=\"top-window\":this.state=\"frame\",this.connect(e)}}async connect(e){if(\"ready\"===this.state)throw new Error(\"Must call initialize before connect\");switch(this.state){case\"partitioned-frame\":return this.establishWorkerConnectionViaWindow(this.iframeWindow.top,e);case\"top-window\":{let t;return t=this.isSharedWorkerSupported()?new SharedWorker(this.workerUrl,c).port:new Worker(this.workerUrl),await this.identityDisconnectionController.lockSelf(e),this.listenForNestedConnections(t),t}case\"frame\":{if(!this.isSharedWorkerSupported())try{return await this.establishWorkerConnectionViaWindow(this.iframeWindow.top,e)}catch(e){throw new Error(`SharedWorker is not supported and an unexpected error occured when trying to connect via fallback mechanism: ${e.message}`,{cause:e})}await this.identityDisconnectionController.lockSelf(e);const{port:t}=new SharedWorker(this.workerUrl,c);return t}default:throw this.state,new Error(`Invalid state: ${this.state}`)}}}const w=o(\"@openfin/core-web/iframe-broker\"),p=()=>{const e=((e,t)=>{const i=new RegExp(`^${t}<(?.*)>$`).exec(e)?.groups?.meta;if(i)try{return JSON.parse(atob(i))}catch(e){throw new Error(`Failed to decode JSON from ${i}.`)}})(window.name,\"of-broker\");if(!e)throw new Error(\"Invalid or missing identity string in iframe context. Ensure that this iframe is being renderered via the @openfin/core-web library.\");return e};function g(t){const i={topic:n(e),success:!1,reason:t?.reason??\"Connection Rejected\"};window.parent.postMessage(i,\"*\")}exports.init=async i=>{try{const{sharedWorkerUrl:r}=i;await(\"loading\"===document.readyState?new Promise((e=>{const t=()=>{e(),window.removeEventListener(\"DOMContentLoaded\",t)};window.addEventListener(\"DOMContentLoaded\",t)})):Promise.resolve());const o=p(),s=new h(r,window,\"same-site\"!==i.experimental?.crossTab),a=await s.initialize(o);w.log(`Loading ${r} in ${s.state} mode...`);const c=await(async(i,r,o)=>{const s=new MessageChannel,a=new MessageChannel,c={topic:t,payload:{identity:o}};await new Promise(((e,i)=>{r.addEventListener(\"message\",(r=>{r.data.topic===n(t)&&(r.data.success?e():i(new Error(r.data.reason)))})),r.start?.(),r.postMessage(c,[a.port2])}));const d={topic:n(e),success:!0,payload:{identity:o}};return i.postMessage(d,\"*\",[s.port2,a.port1]),s.port1})(window.parent,a,o);c.start(),a.start?.(),w.log(`Port transfer complete in ${s.state} mode. Connection established with identity ${JSON.stringify(o)}. SharedWorker support=${s.isSharedWorkerSupported()}`)}catch(e){const t=new Error(`An unexpected error occured during initialization. ${e.message}`);g({reason:t.message}),console.error(t)}},exports.rejectConnections=g;\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","import { init as initBrokerConnection } from \"@openfin/core-web/iframe-broker\";\n\n/**\n * Initializes the OpenFin Web Broker connection.\n * @returns A promise that resolves when the connection is established.\n */\nasync function init(): Promise {\n\treturn initBrokerConnection({\n\t\tsharedWorkerUrl: \"http://localhost:6060/js/shared-worker.bundle.js\"\n\t});\n}\n\ninit()\n\t.then(() => {\n\t\tconsole.log(\"Connected to the OpenFin IFrame Web Broker.\");\n\t\treturn true;\n\t})\n\t.catch((err) => console.error(err));\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/web/v19.2.0/web-layout-basic/js/provider.bundle.js b/web/v19.2.0/web-layout-basic/js/provider.bundle.js index 3a7503f..55c8e3e 100644 --- a/web/v19.2.0/web-layout-basic/js/provider.bundle.js +++ b/web/v19.2.0/web-layout-basic/js/provider.bundle.js @@ -1,38 +1,38 @@ /******/ (() => { // webpackBootstrap /******/ var __webpack_modules__ = ({ -/***/ "./node_modules/@openfin/core-web/out/api-client.js": -/*!**********************************************************!*\ - !*** ./node_modules/@openfin/core-web/out/api-client.js ***! - \**********************************************************/ +/***/ "../../node_modules/@openfin/core-web/out/api-client.js": +/*!**************************************************************!*\ + !*** ../../node_modules/@openfin/core-web/out/api-client.js ***! + \**************************************************************/ /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; -var e=__webpack_require__(/*! ./main-8cad4070.js */ "./node_modules/@openfin/core-web/out/main-8cad4070.js");__webpack_require__(/*! buffer/ */ "../../node_modules/buffer/index.js"),__webpack_require__(/*! uuid */ "../../node_modules/uuid/dist/esm-browser/index.js"),__webpack_require__(/*! events */ "../../node_modules/events/events.js"),__webpack_require__(/*! lodash/cloneDeep */ "../../node_modules/lodash/cloneDeep.js"),__webpack_require__(/*! lodash/isEqual */ "../../node_modules/lodash/isEqual.js"),exports.connect=e.connect; +var e=__webpack_require__(/*! ./main-8cad4070.js */ "../../node_modules/@openfin/core-web/out/main-8cad4070.js");__webpack_require__(/*! buffer/ */ "../../node_modules/buffer/index.js"),__webpack_require__(/*! uuid */ "../../node_modules/uuid/dist/esm-browser/index.js"),__webpack_require__(/*! events */ "../../node_modules/events/events.js"),__webpack_require__(/*! lodash/cloneDeep */ "../../node_modules/lodash/cloneDeep.js"),__webpack_require__(/*! lodash/isEqual */ "../../node_modules/lodash/isEqual.js"),exports.connect=e.connect; /***/ }), -/***/ "./node_modules/@openfin/core-web/out/main-8cad4070.js": -/*!*************************************************************!*\ - !*** ./node_modules/@openfin/core-web/out/main-8cad4070.js ***! - \*************************************************************/ +/***/ "../../node_modules/@openfin/core-web/out/main-8cad4070.js": +/*!*****************************************************************!*\ + !*** ../../node_modules/@openfin/core-web/out/main-8cad4070.js ***! + \*****************************************************************/ /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; -var e=__webpack_require__(/*! buffer/ */ "../../node_modules/buffer/index.js"),t=__webpack_require__(/*! events */ "../../node_modules/events/events.js"),n=__webpack_require__(/*! lodash/cloneDeep */ "../../node_modules/lodash/cloneDeep.js"),i=__webpack_require__(/*! lodash/isEqual */ "../../node_modules/lodash/isEqual.js"),r=__webpack_require__(/*! uuid */ "../../node_modules/uuid/dist/esm-browser/index.js");const o=(e,t)=>`${t}<${btoa(JSON.stringify(e))}>`;var s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof __webpack_require__.g?__webpack_require__.g:"undefined"!=typeof self?self:{},a={},c={},d={},h={};async function l(e){const t=[];for(const n of e){const e=await n();t.push(e)}return t}Object.defineProperty(h,"__esModule",{value:!0}),h.promiseMapSerial=h.serial=h.promiseMap=h.promisify=void 0,h.promisify=function(e){return(...t)=>new Promise(((n,i)=>{e(...t,((e,t)=>e?i(e):n(t)))}))},h.promiseMap=async function(e,t){return Promise.all(e.map(t))},h.serial=l,h.promiseMapSerial=async function(e,t){return l(e.map(((e,n,i)=>()=>t(e,n,i))))};var u,p=s&&s.__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},w=s&&s.__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)};Object.defineProperty(d,"__esModule",{value:!0}),d.Reply=d.EmitterBase=d.Base=void 0;const y=h;class f{constructor(e){this.isNodeEnvironment=()=>"node"===this.wire.environment.type,this.isOpenFinEnvironment=()=>"openfin"===this.wire.environment.type,this.isBrowserEnvironment=()=>"other"===this.wire.environment.type,this.wire=e}get fin(){return this.wire.getFin()}get me(){return this.wire.me}}d.Base=f;d.EmitterBase=class extends f{constructor(e,t,...n){super(e),this.topic=t,u.set(this,void 0),this.eventNames=()=>this.hasEmitter()?this.getOrCreateEmitter().eventNames():[],this.emit=(e,t,...n)=>!!this.hasEmitter()&&this.getOrCreateEmitter().emit(e,t,...n),this.hasEmitter=()=>this.wire.eventAggregator.has(w(this,u,"f")),this.getOrCreateEmitter=()=>this.wire.eventAggregator.getOrCreate(w(this,u,"f")),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[],this.listenerCount=e=>this.hasEmitter()?this.getOrCreateEmitter().listenerCount(e):0,this.registerEventListener=async(e,t={},n,i)=>{const r={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e},o=this.getOrCreateEmitter();n(o);try{await this.wire.sendAction("subscribe-to-desktop-event",r)}catch(e){throw i(o),this.deleteEmitterIfNothingRegistered(o),e}},this.deregisterEventListener=async(e,t={})=>{if(this.hasEmitter()){const n={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e};await this.wire.sendAction("unsubscribe-to-desktop-event",n).catch((()=>null));return this.getOrCreateEmitter()}return Promise.resolve()},p(this,u,[t,...n],"f"),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[]}async on(e,t,n){return await this.registerEventListener(e,n,(n=>{n.on(e,t)}),(n=>{n.removeListener(e,t)})),this}async addListener(e,t,n){return this.on(e,t,n)}async once(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.once(e,i),n.once(e,t)}),(n=>{n.removeListener(e,i),n.removeListener(e,t)})),this}async prependListener(e,t,n){return await this.registerEventListener(e,n,(n=>{n.prependListener(e,t)}),(n=>{n.removeListener(e,t)})),this}async prependOnceListener(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.prependOnceListener(e,t),n.once(e,i)}),(n=>{n.removeListener(e,t),n.removeListener(e,i)})),this}async removeListener(e,t,n){const i=await this.deregisterEventListener(e,n);return i&&(i.removeListener(e,t),this.deleteEmitterIfNothingRegistered(i)),this}async deregisterAllListeners(e){const t={...this.identity,type:e,topic:this.topic};if(this.hasEmitter()){const e=this.getOrCreateEmitter(),n=e.listenerCount(t.type),i=[];for(let e=0;enull)));return await Promise.all(i),e}}async removeAllListeners(e){const t=async e=>{const t=await this.deregisterAllListeners(e);t&&(t.removeAllListeners(e),this.deleteEmitterIfNothingRegistered(t))};if(e)await t(e);else if(this.hasEmitter()){const e=this.getOrCreateEmitter().eventNames();await(0,y.promiseMap)(e,t)}return this}deleteEmitterIfNothingRegistered(e){0===e.eventNames().length&&this.wire.eventAggregator.delete(w(this,u,"f"))}},u=new WeakMap;d.Reply=class{};var g={};Object.defineProperty(g,"__esModule",{value:!0});var m=g.RuntimeError=g.NotSupportedError=g.NotImplementedError=g.NoAckError=g.DuplicateCorrelationError=g.UnexpectedActionError=g.DisconnectedError=void 0;class v extends Error{constructor(e){super(`Expected websocket state OPEN but found ${e}`),this.readyState=e}}g.DisconnectedError=v;class C extends Error{}g.UnexpectedActionError=C;class b extends Error{}g.DuplicateCorrelationError=b;class I extends Error{}g.NoAckError=I;class E extends Error{}g.NotImplementedError=E;class x extends Error{}g.NotSupportedError=x;class A extends Error{constructor(e){const{message:t,name:n,stack:i,...r}=e;super(t),this.name=n||"Error",this.stack=i??this.toString(),Object.keys(r).forEach((e=>{this[e]=r[e]}))}}class P extends Error{static getCallSite(e=0){const t=Error.stackTraceLimit,n=e+1;Error.stackTraceLimit=t+n;const i=Error.prepareStackTrace;Error.prepareStackTrace=(e,t)=>t;const r=(new Error).stack?.slice(n)??[];return Error.prepareStackTrace=i,Error.stackTraceLimit=t,r}static prepareStackTrace(e,t){if("function"==typeof Error.prepareStackTrace)return Error.prepareStackTrace(e,t);let n="";n+=e.name||"Error",n+=`: ${e.message||""}`;for(const e of t)n+=`\n at ${e.toString()}`;return n}constructor(e,t){const{reason:n,error:i}=e;super(n),this.name="RuntimeError",i?.stack&&(this.cause=new A(i)),t&&(this.stack=P.prepareStackTrace(this,t))}}m=g.RuntimeError=P;var M={},_={},O={};Object.defineProperty(O,"__esModule",{value:!0}),O.validateIdentity=void 0,O.validateIdentity=function(e){let t;return"object"==typeof e&&"string"==typeof e.uuid||(t="Not a valid identity object"),t};var S={},R={},F={},j={},k={},L={},T={};Object.defineProperty(T,"__esModule",{value:!0}),T.handleDeprecatedWarnings=void 0;var $;T.handleDeprecatedWarnings=e=>{(e.contentNavigation?.whitelist||e.contentNavigation?.blacklist||e.contentRedirect?.whitelist||e.contentRedirect?.blacklist)&&console.warn("The properties 'whitelist' and 'blacklist' have been marked as deprecated and will be removed in a future version. Please use 'allowlist' and 'denylist'.")};var B={},G={};Object.defineProperty(G,"__esModule",{value:!0}),G.AsyncRetryableLazy=W=G.Lazy=void 0;var W=G.Lazy=class{constructor(e){this.producerFn=e}getValue(){return this.value||(this.value=this.producerFn()),this.value}};G.AsyncRetryableLazy=class{constructor(e){this.producerFn=e}async getValue(){return this.promise||(this.promise=this.producerFn().catch((e=>{throw delete this.promise,e}))),this.promise}};var H={};Object.defineProperty(H,"__esModule",{value:!0}),H.WebContents=void 0;const N=d;class D extends N.EmitterBase{constructor(e,t,n){super(e,n,t.uuid,t.name),this.identity=t,this.entityType=n}capturePage(e){return this.wire.sendAction("capture-page",{options:e,...this.identity}).then((({payload:e})=>e.data))}executeJavaScript(e){return this.wire.sendAction("execute-javascript-in-window",{...this.identity,code:e}).then((({payload:e})=>e.data))}getZoomLevel(){return this.wire.sendAction("get-zoom-level",this.identity).then((({payload:e})=>e.data))}setZoomLevel(e){return this.wire.sendAction("set-zoom-level",{...this.identity,level:e}).then((()=>{}))}navigate(e){return this.wire.sendAction("navigate-window",{...this.identity,url:e}).then((()=>{}))}navigateBack(){return this.wire.sendAction("navigate-window-back",{...this.identity}).then((()=>{}))}async navigateForward(){await this.wire.sendAction("navigate-window-forward",{...this.identity})}stopNavigation(){return this.wire.sendAction("stop-window-navigation",{...this.identity}).then((()=>{}))}reload(e=!1){return this.wire.sendAction("reload-window",{ignoreCache:e,...this.identity}).then((()=>{}))}print(e={}){return this.wire.sendAction("print",{...this.identity,options:e}).then((()=>{}))}findInPage(e,t){return this.wire.sendAction("find-in-page",{...this.identity,searchTerm:e,options:t}).then((({payload:e})=>e.data))}stopFindInPage(e){return this.wire.sendAction("stop-find-in-page",{...this.identity,action:e}).then((()=>{}))}getPrinters(){return this.wire.sendAction("get-printers",{...this.identity}).then((({payload:e})=>e.data))}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){await this.wire.sendAction("focus-window",{emitSynthFocused:e,...this.identity})}async showDeveloperTools(){await this.wire.sendAction("show-developer-tools",this.identity)}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction("get-process-info",this.identity);return e}async getSharedWorkers(){return this.wire.sendAction("get-shared-workers",this.identity).then((({payload:e})=>e.data))}async inspectSharedWorker(){await this.wire.sendAction("inspect-shared-worker",{...this.identity})}async inspectSharedWorkerById(e){await this.wire.sendAction("inspect-shared-worker-by-id",{...this.identity,workerId:e})}async inspectServiceWorker(){await this.wire.sendAction("inspect-service-worker",{...this.identity})}async showPopupWindow(e){if(this.wire.sendAction(`${this.entityType}-show-popup-window`,this.identity).catch((()=>{})),e?.onPopupReady){const t=async({popupName:t})=>{try{const n=this.fin.Window.wrapSync({uuid:this.fin.me.uuid,name:t});await e.onPopupReady(n)}catch(e){throw new Error(`Something went wrong during onPopupReady execution: ${e}`)}};await this.once("popup-ready",t)}const{payload:t}=await this.wire.sendAction("try-create-popup-window",{options:{...e,hasResultCallback:!!e?.onPopupResult,hasReadyCallback:!!e?.onPopupReady},...this.identity}),{data:{willOpen:n,options:i}}=t;n&&await this.fin.Window.create(i.initialOptions);if(e?.onPopupResult){const t=async t=>{await e.onPopupResult((e=>{const{name:t,uuid:n,result:i,data:r}=e,o={identity:{name:t,uuid:n},result:i};return r&&(o.data=r),o})(t))},n=async()=>{await this.removeListener("popup-result",t)};await this.on("popup-result",t),await this.once("popup-teardown",n)}const{payload:r}=await this.wire.sendAction("show-popup-window",{options:i,...this.identity});return r.data}}var U,V,z,K,q;function J(){return V||(V=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(function(){if($)return L;$=1,Object.defineProperty(L,"__esModule",{value:!0}),L.ViewModule=void 0;const e=d,t=O,n=J(),i=T;class r extends e.Base{async create(e){const{uuid:t}=this.wire.me;if(!e.name||"string"!=typeof e.name)throw new Error("Please provide a name property as a string in order to create a View.");return(0,i.handleDeprecatedWarnings)(e),this.wire.environment.childViews?await this.wire.environment.createChildContent({entityType:"view",options:{...e,uuid:t}}):await this.wire.sendAction("create-view",{...e,uuid:t}),this.wrapSync({uuid:t,name:e.name})}async wrap(e){this.wire.sendAction("view-wrap").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}wrapSync(e){this.wire.sendAction("view-wrap-sync").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}getCurrent(){if(this.wire.sendAction("view-get-current").catch((e=>{})),!this.wire.me.isView)throw new Error("You are not in a View context");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction("view-get-current-sync").catch((e=>{})),!this.wire.me.isView)throw new Error("You are not in a View context");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return L.ViewModule=r,L}(),e),n(function(){if(U)return B;var e;U=1,Object.defineProperty(B,"__esModule",{value:!0}),B.View=void 0;const t=g,n=G,i=H,r=ie();class o extends i.WebContents{constructor(i,o){super(i,o,"view"),this.identity=o,e.set(this,new n.Lazy((()=>this.fin.Platform.wrapSync(this.identity).getClient()))),this.attach=async e=>{await this.wire.sendAction("attach-view",{target:e,...this.identity})},this.destroy=async()=>{await this.wire.sendAction("destroy-view",{...this.identity})},this.show=async()=>{await this.wire.sendAction("show-view",{...this.identity})},this.showAt=async(e,t={})=>{await this.wire.sendAction("show-view-at",{bounds:e,...this.identity,options:t})},this.bringToFront=async()=>{await this.wire.sendAction("bring-view-to-front",{...this.identity})},this.hide=async()=>{await this.wire.sendAction("hide-view",{...this.identity})},this.setBounds=async e=>{await this.wire.sendAction("set-view-bounds",{bounds:e,...this.identity})},this.getBounds=async()=>(await this.wire.sendAction("get-view-bounds",{...this.identity})).payload.data,this.getInfo=async()=>(await this.wire.sendAction("get-view-info",{...this.identity})).payload.data,this.getParentLayout=async()=>(this.wire.sendAction("view-get-parent-layout",{...this.identity}).catch((()=>{})),this.fin.Platform.Layout.getLayoutByViewIdentity(this.identity)),this.getOptions=async()=>this.wire.sendAction("get-view-options",{...this.identity}).then((({payload:e})=>e.data)),this.updateOptions=async e=>this.wire.sendAction("update-view-options",{options:e,...this.identity}).then((()=>{})),this.getCurrentWindow=async()=>{const{payload:{data:e}}=await this.wire.sendAction("get-view-window",{...this.identity});return new r._Window(this.wire,e)},this.getCurrentStack=async()=>{this.wire.sendAction("view-get-current-stack").catch((()=>{}));try{return(await this.getParentLayout()).getStackByViewIdentity(this.identity)}catch(e){throw new t.RuntimeError({reason:"This view does not belong to a stack.",error:e})}},this.triggerBeforeUnload=async()=>(await this.wire.sendAction("trigger-before-unload",{...this.identity})).payload.data,this.bindToElement=async e=>{if(!e)throw new Error("Element not found.");return this.wire.environment.observeBounds(e,(async e=>this.setBounds(e)))}}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){const t=await this.getCurrentWindow();await t.focusedWebViewWasChanged(),await super.focus({emitSynthFocused:e})}}return B.View=o,e=new WeakMap,B}(),e)}(k)),k}function Y(){if(z)return j;z=1,Object.defineProperty(j,"__esModule",{value:!0}),j.Application=void 0;const e=d,t=ie(),n=J();class i extends e.EmitterBase{constructor(e,n){super(e,"application",n.uuid),this.identity=n,this.window=new t._Window(this.wire,{uuid:this.identity.uuid,name:this.identity.uuid})}windowListFromIdentityList(e){const n=[];return e.forEach((e=>{n.push(new t._Window(this.wire,{uuid:e.uuid,name:e.name}))})),n}isRunning(){return this.wire.sendAction("is-application-running",this.identity).then((({payload:e})=>e.data))}async quit(e=!1){try{await this._close(e),await this.wire.sendAction("destroy-application",{force:e,...this.identity})}catch(e){if(!["Remote connection has closed","Could not locate the requested application"].some((t=>e.message.includes(t))))throw e}}async _close(e=!1){try{await this.wire.sendAction("close-application",{force:e,...this.identity})}catch(e){if(!e.message.includes("Remote connection has closed"))throw e}}close(e=!1){return console.warn("Deprecation Warning: Application.close is deprecated Please use Application.quit"),this.wire.sendAction("application-close",this.identity).catch((e=>{})),this._close(e)}getChildWindows(){return this.wire.sendAction("get-child-windows",this.identity).then((({payload:e})=>{const t=[];return e.data.forEach((e=>{t.push({uuid:this.identity.uuid,name:e})})),this.windowListFromIdentityList(t)}))}getManifest(){return this.wire.sendAction("get-application-manifest",this.identity).then((({payload:e})=>e.data))}getParentUuid(){return this.wire.sendAction("get-parent-application",this.identity).then((({payload:e})=>e.data))}getShortcuts(){return this.wire.sendAction("get-shortcuts",this.identity).then((({payload:e})=>e.data))}async getViews(){const{payload:e}=await this.wire.sendAction("application-get-views",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}getZoomLevel(){return this.wire.sendAction("get-application-zoom-level",this.identity).then((({payload:e})=>e.data))}getWindow(){return this.wire.sendAction("application-get-window",this.identity).catch((e=>{})),Promise.resolve(this.window)}registerUser(e,t){return this.wire.sendAction("register-user",{userName:e,appName:t,...this.identity}).then((()=>{}))}removeTrayIcon(){return this.wire.sendAction("remove-tray-icon",this.identity).then((()=>{}))}restart(){return this.wire.sendAction("restart-application",this.identity).then((()=>{}))}run(){return console.warn("Deprecation Warning: Application.run is deprecated Please use fin.Application.start"),this.wire.sendAction("application-run",this.identity).catch((e=>{})),this._run()}_run(e={}){return this.wire.sendAction("run-application",{manifestUrl:this._manifestUrl,opts:e,...this.identity}).then((()=>{}))}scheduleRestart(){return this.wire.sendAction("relaunch-on-close",this.identity).then((()=>{}))}async sendApplicationLog(){const{payload:e}=await this.wire.sendAction("send-application-log",this.identity);return e.data}async setJumpList(e){await this.wire.sendAction("set-jump-list",{config:e,...this.identity})}setTrayIcon(e){return this.wire.sendAction("set-tray-icon",{enabledIcon:e,...this.identity}).then((()=>{}))}setShortcuts(e){return this.wire.sendAction("set-shortcuts",{data:e,...this.identity}).then((()=>{}))}async setShortcutQueryParams(e){await this.wire.sendAction("set-shortcut-query-args",{data:e,...this.identity})}setZoomLevel(e){return this.wire.sendAction("set-application-zoom-level",{level:e,...this.identity}).then((()=>{}))}async setAppLogUsername(e){await this.wire.sendAction("set-app-log-username",{data:e,...this.identity})}getTrayIconInfo(){return this.wire.sendAction("get-tray-icon-info",this.identity).then((({payload:e})=>e.data))}hasTrayIcon(){return this.wire.sendAction("has-tray-icon",this.identity).then((({payload:e})=>e.data))}terminate(){return this.wire.sendAction("terminate-application",this.identity).then((()=>{}))}wait(){return this.wire.sendAction("wait-for-hung-application",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction("get-info",this.identity).then((({payload:e})=>e.data))}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction("application-get-process-info",this.identity);return e}async setFileDownloadLocation(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t};await this.wire.sendAction("set-file-download-location",{...n,downloadLocation:e})}async getFileDownloadLocation(){const{payload:{data:e}}=await this.wire.sendAction("get-file-download-location",this.identity);return e}async showTrayIconPopupMenu(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t},{payload:i}=await this.wire.sendAction("show-tray-icon-popup-menu",{...n,options:e});return i.data}async closeTrayIconPopupMenu(){const{name:e}=this.wire.me,t={uuid:this.identity.uuid,name:e};await this.wire.sendAction("close-tray-icon-popup-menu",{...t})}}return j.Application=i,j}function Z(){return q||(q=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(function(){if(K)return F;K=1,Object.defineProperty(F,"__esModule",{value:!0}),F.ApplicationModule=void 0;const e=d,t=O,n=Y();class i extends e.Base{async wrap(e){this.wire.sendAction("wrap-application").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}wrapSync(e){this.wire.sendAction("wrap-application-sync").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}async _create(e){return void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&void 0===e.isPlatformController&&(e.autoShow=!0),await this.wire.sendAction("create-application",e),this.wrap({uuid:e.uuid})}create(e){return console.warn("Deprecation Warning: fin.Application.create is deprecated. Please use fin.Application.start"),this.wire.sendAction("application-create").catch((e=>{})),this._create(e)}async start(e){this.wire.sendAction("start-application").catch((e=>{}));const t=await this._create(e);return await this.wire.sendAction("run-application",{uuid:e.uuid}),t}async startManyManifests(e,t){return this.wire.sendAction("run-applications",{applications:e,opts:t}).then((()=>{}))}getCurrent(){return this.wire.sendAction("get-current-application").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction("get-current-application-sync").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}async startFromManifest(e,t){this.wire.sendAction("application-start-from-manifest").catch((e=>{}));const n=await this._createFromManifest(e);return await n._run(t),n}createFromManifest(e){return console.warn("Deprecation Warning: fin.Application.createFromManifest is deprecated. Please use fin.Application.startFromManifest"),this.wire.sendAction("application-create-from-manifest").catch((e=>{})),this._createFromManifest(e)}_createFromManifest(e){return this.wire.sendAction("get-application-manifest",{manifestUrl:e}).then((({payload:e})=>{const t=e.data.platform?e.data.platform.uuid:e.data.startup_app.uuid;return this.wrap({uuid:t})})).then((t=>(t._manifestUrl=e,t)))}}return F.ApplicationModule=i,F}(),e),n(Y(),e)}(R)),R}H.WebContents=D;var Q={};Object.defineProperty(Q,"__esModule",{value:!0}),Q.promisifySubscription=void 0;var X,ee,te;function ne(){if(X)return S;X=1,Object.defineProperty(S,"__esModule",{value:!0}),S._Window=void 0;const e=Z(),t=H,n=J(),i=T,r=Q;class o extends t.WebContents{constructor(e,t){super(e,t,"window")}async createWindow(e){this.wire.sendAction("window-create-window",this.identity).catch((e=>{}));const t=await(0,r.promisifySubscription)(this,"fire-constructor-callback");void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&(e.autoShow=!0),(0,i.handleDeprecatedWarnings)(e);const n=this.wire.environment.createChildContent({entityType:"window",options:e}),[o]=await Promise.all([t.getValue(),n]);let s;const{success:a}=o,c=o.data,{message:d}=c;s=a?{httpResponseCode:c.httpResponseCode,apiInjected:c.apiInjected}:{message:c.message,networkErrorCode:c.networkErrorCode,stack:c.stack};const h={message:d,cbPayload:s,success:a};try{this.getWebWindow().fin.__internal_.openerSuccessCBCalled()}catch(e){}return h.success?this:Promise.reject(h)}getAllFrames(){return this.wire.sendAction("get-all-frames",this.identity).then((({payload:e})=>e.data))}getBounds(){return this.wire.sendAction("get-window-bounds",this.identity).then((({payload:e})=>e.data))}center(){return this.wire.sendAction("center-window",this.identity).then((()=>{}))}blur(){return this.wire.sendAction("blur-window",this.identity).then((()=>{}))}bringToFront(){return this.wire.sendAction("bring-window-to-front",this.identity).then((()=>{}))}animate(e,t){return this.wire.sendAction("animate-window",{transitions:e,options:t,...this.identity}).then((()=>{}))}hide(){return this.wire.sendAction("hide-window",this.identity).then((()=>{}))}close(e=!1){return this.wire.sendAction("close-window",{force:e,...this.identity}).then((()=>{Object.setPrototypeOf(this,null)}))}focusedWebViewWasChanged(){return this.wire.sendAction("focused-webview-changed",this.identity).then((()=>{}))}getNativeId(){return this.wire.sendAction("get-window-native-id",this.identity).then((({payload:e})=>e.data))}async getCurrentViews(){const{payload:e}=await this.wire.sendAction("window-get-views",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}disableFrame(){return console.warn("Function is deprecated; use disableUserMovement instead."),this.wire.sendAction("disable-window-frame",this.identity).then((()=>{}))}disableUserMovement(){return this.wire.sendAction("disable-window-frame",this.identity).then((()=>{}))}enableFrame(){return console.warn("Function is deprecated; use enableUserMovement instead."),this.wire.sendAction("enable-window-frame",this.identity).then((()=>{}))}enableUserMovement(){return this.wire.sendAction("enable-window-frame",this.identity).then((()=>{}))}flash(){return this.wire.sendAction("flash-window",this.identity).then((()=>{}))}stopFlashing(){return this.wire.sendAction("stop-flash-window",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction("get-window-info",this.identity).then((({payload:e})=>e.data))}async getLayout(e){this.wire.sendAction("window-get-layout",this.identity).catch((e=>{}));const t=await this.getOptions();if(!t.layout&&!t.layoutSnapshot)throw new Error("Window does not have a Layout");return this.fin.Platform.Layout.wrap(e??this.identity)}getOptions(){return this.wire.sendAction("get-window-options",this.identity).then((({payload:e})=>e.data))}getParentApplication(){return this.wire.sendAction("window-get-parent-application",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity))}getParentWindow(){return this.wire.sendAction("window-get-parent-window",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity)).then((e=>e.getWindow()))}async getSnapshot(e){const t={area:e,...this.identity};console.warn("Window.getSnapshot has been deprecated, please use Window.capturePage");return(await this.wire.sendAction("get-window-snapshot",t)).payload.data}getState(){return this.wire.sendAction("get-window-state",this.identity).then((({payload:e})=>e.data))}getWebWindow(){return this.wire.sendAction("window-get-web-window",this.identity).catch((e=>{})),this.wire.environment.getWebWindow(this.identity)}isMainWindow(){return this.wire.sendAction("window-is-main-window",this.identity).catch((e=>{})),this.me.uuid===this.me.name}isShowing(){return this.wire.sendAction("is-window-showing",this.identity).then((({payload:e})=>e.data))}maximize(){return this.wire.sendAction("maximize-window",this.identity).then((()=>{}))}minimize(){return this.wire.sendAction("minimize-window",this.identity).then((()=>{}))}moveBy(e,t,n){return this.wire.sendAction("move-window-by",{deltaLeft:e,deltaTop:t,positioningOptions:n,...this.identity}).then((()=>{}))}moveTo(e,t,n){return this.wire.sendAction("move-window",{left:e,top:t,positioningOptions:n,...this.identity}).then((()=>{}))}resizeBy(e,t,n,i){return this.wire.sendAction("resize-window-by",{deltaWidth:Math.floor(e),deltaHeight:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}resizeTo(e,t,n,i){return this.wire.sendAction("resize-window",{width:Math.floor(e),height:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}restore(){return this.wire.sendAction("restore-window",this.identity).then((()=>{}))}setAsForeground(){return this.wire.sendAction("set-foreground-window",this.identity).then((()=>{}))}setBounds(e,t){return this.wire.sendAction("set-window-bounds",{...e,...this.identity,positioningOptions:t}).then((()=>{}))}show(e=!1){return this.wire.sendAction("show-window",{force:e,...this.identity}).then((()=>{}))}showAt(e,t,n=!1){return this.wire.sendAction("show-at-window",{force:n,left:Math.floor(e),top:Math.floor(t),...this.identity}).then((()=>{}))}updateOptions(e){return this.wire.sendAction("update-window-options",{options:e,...this.identity}).then((()=>{}))}authenticate(e,t){return this.wire.sendAction("window-authenticate",{userName:e,password:t,...this.identity}).then((()=>{}))}async showPopupMenu(e){const{payload:t}=await this.wire.sendAction("show-popup-menu",{options:e,...this.identity});return t.data}async closePopupMenu(){return this.wire.sendAction("close-popup-menu",{...this.identity}).then((()=>{}))}async dispatchPopupResult(e){this.wire.sendAction("window-dispatch-popup-result",this.identity).catch((e=>{})),await this.wire.sendAction("dispatch-popup-result",{data:e,...this.identity})}async print(e={content:"self"}){switch(e.content){case void 0:case"self":return super.print(e);case"screenshot":return this.wire.sendAction("print-screenshot",this.identity).then((()=>{}));case"views":return this.wire.sendAction("print-views",{...this.identity,options:e}).then((()=>{}));default:return}}}return S._Window=o,S}function ie(){return te||(te=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(function(){if(ee)return _;ee=1,Object.defineProperty(_,"__esModule",{value:!0}),_._WindowModule=void 0;const e=d,t=O,n=ne();class i extends e.Base{async wrap(e){this.wire.sendAction("window-wrap").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}wrapSync(e){this.wire.sendAction("window-wrap-sync").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}create(e){return this.wire.sendAction("create-window").catch((e=>{})),new n._Window(this.wire,{uuid:this.me.uuid,name:e.name}).createWindow(e)}getCurrent(){if(this.wire.sendAction("get-current-window").catch((e=>{})),!this.wire.me.isWindow)throw new Error("You are not in a Window context");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction("get-current-window-sync").catch((e=>{})),!this.wire.me.isWindow)throw new Error("You are not in a Window context");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return _._WindowModule=i,_}(),e),n(ne(),e)}(M)),M}Q.promisifySubscription=async(e,t,n=(()=>!0),i)=>{let r,o,s;const a=new Promise(((e,t)=>{r=e,o=t})),c=e=>{n(e)&&(clearTimeout(s),r(e))};return await e.on(t,c),i&&(s=setTimeout((()=>o(new Error("event timed out"))),i)),a.finally((()=>{e.removeListener(t,c).catch((()=>null))})),{getValue:()=>a}},Object.defineProperty(c,"__esModule",{value:!0}),c.System=void 0;const re=d,oe=g,se=ie(),ae=t;class ce extends re.EmitterBase{constructor(e){super(e,"system")}sendExternalProcessRequest(e,t){return new Promise(((n,i)=>{const r="external-process-exited";let o,s,a,c;"function"==typeof t.listener&&(a=e=>{const n=e||{};s={topic:"exited",uuid:n.processUuid||"",exitCode:n.exitCode||0},o===e.processUuid&&(t.listener(s),c.removeListener(r,a))},this.wire.me.name||(this.wire.me.name=this.wire.me.uuid),c=new se._Window(this.wire,this.wire.me),c.on(r,a)),this.wire.sendAction(e,t).then((({payload:e})=>{o=e.data.uuid,n(e.data),s&&o===s.uuid&&(t.listener(s),c.removeListener(r,a))})).catch((e=>{c&&c.removeListener(r,a),i(e)}))}))}getVersion(){return this.wire.sendAction("get-version").then((({payload:e})=>e.data))}clearCache(e){return this.wire.sendAction("clear-cache",e).then((()=>{}))}deleteCacheOnExit(){return this.wire.sendAction("delete-cache-request").then((()=>{}))}exit(){return this.wire.sendAction("exit-desktop").then((()=>{}))}async fetchManifest(e){const{payload:{data:t}}=await this.wire.sendAction("fetch-manifest",{manifestUrl:e});return t}flushCookieStore(){return this.wire.sendAction("flush-cookie-store").then((()=>{}))}getAllWindows(){return this.wire.sendAction("get-all-windows").then((({payload:e})=>e.data))}getAllApplications(){return this.wire.sendAction("get-all-applications").then((({payload:e})=>e.data))}getCommandLineArguments(){return this.wire.sendAction("get-command-line-arguments").then((({payload:e})=>e.data))}async getCrashReporterState(){const{payload:{data:{diagnosticMode:e,isRunning:t}}}=await this.wire.sendAction("get-crash-reporter-state");return console.warn("diagnosticMode property is deprecated. It will be removed in a future version"),{diagnosticMode:e,diagnosticsMode:e,isRunning:t}}async startCrashReporter(e){const t=e,n={...t,diagnosticMode:t.diagnosticsMode||t.diagnosticMode},{payload:{data:{diagnosticMode:i,isRunning:r}}}=await this.wire.sendAction("start-crash-reporter",n);return{diagnosticMode:i,diagnosticsMode:i,isRunning:r}}getUniqueUserId(){return this.wire.sendAction("get-unique-user-id").then((({payload:e})=>e.data))}getEntityInfo(e,t){return this.wire.sendAction("get-entity-info",{uuid:e,name:t}).then((({payload:e})=>e.data))}getEnvironmentVariable(e){return this.wire.sendAction("get-environment-variable",{environmentVariables:e}).then((({payload:e})=>e.data))}getFocusedWindow(){return this.wire.sendAction("get-focused-window").then((({payload:e})=>e.data))}async isAppCertified(e){const{payload:{data:{certifiedInfo:t}}}=await this.wire.sendAction("is-app-certified",{manifestUrl:e});return t}getInstalledRuntimes(){return this.wire.sendAction("get-installed-runtimes").then((({payload:e})=>e.data.runtimes))}async getInstalledApps(){const{payload:{data:{installedApps:e}}}=await this.wire.sendAction("get-installed-apps");return e}getLog(e){return this.wire.sendAction("view-log",e).then((({payload:e})=>e.data))}getMachineId(){return this.wire.sendAction("get-machine-id").then((({payload:e})=>e.data))}getMinLogLevel(){return this.wire.sendAction("get-min-log-level").then((({payload:e})=>e.data))}getLogList(){return this.wire.sendAction("list-logs").then((({payload:e})=>e.data))}getMonitorInfo(){return this.wire.sendAction("get-monitor-info").then((({payload:e})=>e.data))}getMousePosition(){return this.wire.sendAction("get-mouse-position").then((({payload:e})=>e.data))}getProcessList(){return console.warn("System.getProcessList has been deprecated. Please consider using our new process APIs: Window.getProcessInfo, View.getProcessInfo, Application.getProcessInfo, System.getAllProcessInfo"),this.wire.sendAction("process-snapshot").then((({payload:e})=>e.data))}async getAllProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction("get-all-process-info",this.identity);return e}getProxySettings(){return this.wire.sendAction("get-proxy-settings").then((({payload:e})=>e.data))}getRuntimeInfo(){return this.wire.sendAction("get-runtime-info").then((({payload:e})=>e.data))}getRvmInfo(){return this.wire.sendAction("get-rvm-info").then((({payload:e})=>e.data))}getHostSpecs(){return this.wire.sendAction("get-host-specs").then((({payload:e})=>e.data))}getOSInfo(){return this.wire.sendAction("get-os-info").then((({payload:e})=>e.data))}launchExternalProcess(e){return this.sendExternalProcessRequest("launch-external-process",e)}monitorExternalProcess(e){return this.sendExternalProcessRequest("monitor-external-process",e)}log(e,t){return this.wire.sendAction("write-to-log",{level:e,message:t}).then((()=>{}))}openUrlWithBrowser(e){return this.wire.sendAction("open-url-with-browser",{url:e}).then((()=>{}))}async registerCustomProtocol(e){if("object"!=typeof e)throw new Error("Must provide an object with a `protocolName` property having a string value.");await this.wire.sendAction("register-custom-protocol",e)}async unregisterCustomProtocol(e){await this.wire.sendAction("unregister-custom-protocol",{protocolName:e})}async getCustomProtocolState(e){return this.wire.sendAction("get-custom-protocol-state",{protocolName:e}).then((({payload:e})=>e.data))}releaseExternalProcess(e){return this.wire.sendAction("release-external-process",{uuid:e}).then((()=>{}))}showDeveloperTools(e){return this.wire.sendAction("show-developer-tools",e).then((()=>{}))}terminateExternalProcess(e){return this.wire.sendAction("terminate-external-process",e).then((()=>{}))}updateProxySettings(e){return this.wire.sendAction("update-proxy",e).then((()=>{}))}async downloadAsset(e,t){const n=()=>{};let i=n,r=n;const o=new Promise(((e,t)=>{i=e,r=t}));if("openfin"!==this.wire.environment.type)throw new oe.NotSupportedError("downloadAsset only supported in an OpenFin Render process");const s=oe.RuntimeError.getCallSite(),a=this.wire.environment.getNextMessageId().toString(),c=`asset-download-progress-${a}`,d=`asset-download-error-${a}`,h=`asset-download-complete-${a}`,l=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},u=()=>{this.removeListener(c,l)};await Promise.all([this.on(c,l),this.once(d,(e=>{u();const{reason:t,err:n}=e;r(new oe.RuntimeError({reason:t,error:n},s))})),this.once(h,(()=>{u(),i()}))]);const p=Object.assign(e,{downloadId:a});return await this.wire.sendAction("download-asset",p).catch((e=>{throw u(),e})),o}downloadRuntime(e,t){const n=oe.RuntimeError.getCallSite();return new Promise(((i,r)=>{if("openfin"!==this.wire.environment.type)return void r(new oe.NotSupportedError("downloadRuntime only supported in an OpenFin Render process"));const o=this.wire.environment.getNextMessageId().toString(),s=`runtime-download-progress-${o}`,a=`runtime-download-error-${o}`,c=`runtime-download-complete-${o}`,d=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},h=()=>{this.removeListener(s,d)};this.on(s,d),this.once(a,(e=>{h();const{reason:t,err:i}=e;r(new oe.RuntimeError({reason:t,error:i},n))})),this.once(c,(()=>{h(),i()}));const l=Object.assign(e,{downloadId:o});this.wire.sendAction("download-runtime",l).catch((e=>{h(),r(e)}))}))}downloadPreloadScripts(e){return this.wire.sendAction("download-preload-scripts",{scripts:e}).then((({payload:e})=>e.data))}getAllExternalApplications(){return this.wire.sendAction("get-all-external-applications").then((({payload:e})=>e.data))}getAppAssetInfo(e){return this.wire.sendAction("get-app-asset-info",e).then((({payload:e})=>e.data))}getCookies(e){const t=this.wire.environment.getUrl(),n=Object.assign(e,{url:t});return this.wire.sendAction("get-cookies",n).then((({payload:e})=>e.data))}setMinLogLevel(e){return this.wire.sendAction("set-min-log-level",{level:e}).then((()=>{}))}resolveUuid(e){return this.wire.sendAction("resolve-uuid",{entityKey:e}).then((({payload:e})=>e.data))}executeOnRemote(e,t){return t.requestingIdentity=e,this.wire.ferryAction(t)}readRegistryValue(e,t,n){return this.wire.sendAction("read-registry-value",{rootKey:e,subkey:t,value:n}).then((({payload:e})=>e.data))}registerExternalConnection(e){return this.wire.sendAction("register-external-connection",{uuid:e}).then((({payload:e})=>e.data))}async getServiceConfiguration(e){if("string"!=typeof e.name)throw new Error("Must provide an object with a `name` property having a string value");const{name:t}=e;return this.wire.sendAction("get-service-configuration",{name:t}).then((({payload:e})=>e.data))}async getSystemAppConfig(e){if("string"!=typeof e)throw new Error("Must provide a string value for name of system app");return this.wire.sendAction("get-system-app-configuration",{name:e}).then((({payload:e})=>e.data))}async registerShutdownHandler(e){this.wire.sendAction("system-register-shutdown-handler").catch((e=>{}));const{uuid:t,name:n}=this.wire.me;this.on("system-shutdown",(i=>{e({proceed:()=>{this.wire.environment.raiseEvent("application/system-shutdown-handled",{uuid:t,name:n,topic:"application"})}})}))}runRvmHealthCheck(){return this.wire.sendAction("run-rvm-health-check").then((({payload:e})=>e.data))}async launchManifest(e,t={}){const{subscribe:n,...i}=t,r=i;if(n){const e=new ae.EventEmitter;n(e);const t="app-version-progress",i="runtime-status",o="app-version-complete",s="app-version-error",a=this.wire.environment.getNextMessageId().toString();r.appVersionId=a;const c=[o,t,i,s],d=e=>{const{appVersionId:t,topic:n,type:i,...r}=e;return{...r,type:c.find((e=>i.includes(e)))}},h=t=>{const n=d(t);e.emit(n.type,n)},l=()=>{this.removeListener(`${t}.${a}`,h),this.removeListener(`${i}.${a}`,h),this.removeListener(`${o}.${a}`,h),this.removeListener(`${s}.${a}`,h),this.removeListener(`${o}.${a}`,l),this.removeListener(`${s}.${a}`,l)};await Promise.all([this.on(`${t}.${a}`,h),this.on(`${i}.${a}`,h),this.once(`${o}.${a}`,h),this.once(`${s}.${a}`,h),this.once(`${o}.${a}`,l),this.once(`${s}.${a}`,l)])}return(await this.wire.sendAction("launch-manifest",{manifestUrl:e,opts:r})).payload.data.manifest}async queryPermissionForCurrentContext(e){const t={uuid:this.wire.me.uuid,name:this.wire.me.name};return(await this.wire.sendAction("query-permission-for-current-context",{apiName:e,identity:t})).payload.data}async enableNativeWindowIntegrationProvider(e){const{payload:t}=await this.wire.sendAction("enable-native-window-integration-provider",{permissions:e});return t.data}async registerUsage({data:e,type:t}){await this.wire.sendAction("register-usage",{data:e,type:t})}async getPrinters(){const{payload:e}=await this.wire.sendAction("system-get-printers");return e.data}async updateProcessLoggingOptions(e){await this.wire.sendAction("system-update-process-logging-options",{options:e})}async getDomainSettings(){const{payload:{data:e}}=await this.wire.sendAction("get-domain-settings",this.identity);return e}async setDomainSettings(e){await this.wire.sendAction("set-domain-settings",{domainSettings:e,...this.identity})}async refreshExtensions(){const{payload:e}=await this.wire.sendAction("refresh-extensions");return e.data}async getInstalledExtensions(){const{payload:e}=await this.wire.sendAction("get-installed-extensions");return e.data}}c.System=ce;var de={},he={};Object.defineProperty(he,"__esModule",{value:!0}),he.RefCounter=void 0;he.RefCounter=class{constructor(){this.topicRefMap=new Map}incRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t+1;n=i,this.topicRefMap.set(e,i)}else this.topicRefMap.set(e,1),n=1;return n}decRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t-1;this.topicRefMap.set(e,i),n=i}else n=-1;return n}actOnFirst(e,t,n){return 1===this.incRefCount(e)?t():n()}actOnLast(e,t,n){return 0===this.decRefCount(e)?t():n()}};var le={},ue={},pe={};Object.defineProperty(pe,"__esModule",{value:!0}),pe.ChannelBase=pe.ProtectedItems=void 0;const we=e=>async(t,n,i)=>{const r=await e(t,n,i);return void 0===r?n:r};pe.ProtectedItems=class{constructor(e,t){this.providerIdentity=e,this.close=t}};class ye{static defaultAction(e){throw new Error(`No action registered at target for ${e}`)}constructor(){this.subscriptions=new Map}async processAction(e,t,n){try{const i=this.subscriptions.has(e)?this.subscriptions.get(e):(t,n)=>(this.defaultAction??ye.defaultAction)(e,t,n),r=this.preAction?await this.preAction(e,t,n):t,o=await i(r,n);return this.postAction?await this.postAction(e,o,n):o}catch(t){if(this.errorMiddleware)return this.errorMiddleware(e,t,n);throw t}}beforeAction(e){if(this.preAction)throw new Error("Already registered beforeAction middleware");this.preAction=we(e)}onError(e){if(this.errorMiddleware)throw new Error("Already registered error middleware");this.errorMiddleware=e}afterAction(e){if(this.postAction)throw new Error("Already registered afterAction middleware");this.postAction=we(e)}remove(e){this.subscriptions.delete(e)}setDefaultAction(e){if(this.defaultAction)throw new Error("default action can only be set once");this.defaultAction=e}register(e,t){if(this.subscriptions.has(e))throw new Error(`Subscription already registered for action: ${e}. Unsubscribe before adding new subscription`);return this.subscriptions.set(e,t),!0}}pe.ChannelBase=ye;var fe,ge,me,ve=s&&s.__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)},Ce=s&&s.__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};Object.defineProperty(ue,"__esModule",{value:!0}),ue.ChannelClient=void 0;const be=pe,Ie=new Map;class Ee extends be.ChannelBase{static closeChannelByEndpointId(e){const t=Ie.get(e);t&&ve(t,me,"f").call(t)}static handleProviderDisconnect(e){for(const t of Ie.values())t.providerIdentity.channelId===e.channelId&&(t.disconnectListener(e),ve(t,me,"f").call(t))}constructor(e,t,n){super(),fe.set(this,void 0),ge.set(this,void 0),this.processAction=(e,t,n)=>super.processAction(e,t,n),me.set(this,(()=>{Ie.delete(this.endpointId),ve(this,ge,"f").close()})),Ce(this,fe,new be.ProtectedItems(e,t),"f"),this.disconnectListener=()=>{},this.endpointId=e.endpointId,Ce(this,ge,n,"f"),Ie.set(this.endpointId,this),n.receive(this.processAction)}get providerIdentity(){return ve(this,fe,"f").providerIdentity}async dispatch(e,t){if(ve(this,ge,"f").isEndpointConnected(this.providerIdentity.channelId))return ve(this,ge,"f").send(this.providerIdentity.channelId,e,t);throw new Error("The client you are trying to dispatch from is disconnected from the target provider.")}onDisconnection(e){this.disconnectListener=t=>{try{e(t)}catch(e){throw new Error(`Error while calling the onDisconnection callback: ${e.message}`)}finally{this.disconnectListener=()=>{}}}}async disconnect(){await this.sendDisconnectAction(),ve(this,me,"f").call(this)}async sendDisconnectAction(){const e=ve(this,fe,"f");await e.close()}static async wireClose(e,t,n){const{channelName:i,uuid:r,name:o}=t;await e.sendAction("disconnect-from-channel",{channelName:i,uuid:r,name:o,endpointId:n})}}ue.ChannelClient=Ee,fe=new WeakMap,ge=new WeakMap,me=new WeakMap;var xe={},Ae={};Object.defineProperty(Ae,"__esModule",{value:!0}),Ae.exhaustiveCheck=void 0,Ae.exhaustiveCheck=function(e,t){throw new Error(`Unsupported value: ${e}${t?`\n Supported values are: ${t.join("")}`:""}`)};var Pe,Me,_e,Oe={},Se=s&&s.__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},Re=s&&s.__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)};Object.defineProperty(Oe,"__esModule",{value:!0}),Oe.ClassicInfo=Oe.ClassicStrategy=void 0;Oe.ClassicStrategy=class{constructor(e,t,n,i){this.messageReceiver=t,this.endpointId=n,this.providerIdentity=i,Pe.set(this,void 0),Me.set(this,new Map),_e.set(this,new Map),this.send=async(e,t,n)=>{const i=Re(this,Me,"f").get(e);if(!i)throw new Error(`Could not locate routing info for endpoint ${e}`);const r={...i};r.isLocalEndpointId&&delete r.endpointId,delete r.isLocalEndpointId;const o=Re(this,Pe,"f").sendAction("send-channel-message",{...r,providerIdentity:this.providerIdentity,action:t,payload:n});Re(this,_e,"f").get(e)?.add(o);return(await o.catch((e=>{throw new Error(e.message)})).finally((()=>{Re(this,_e,"f").get(e)?.delete(o)}))).payload.data.result},this.close=async()=>{this.messageReceiver.removeEndpoint(this.providerIdentity.channelId,this.endpointId),[...Re(this,Me,"f").keys()].forEach((e=>this.closeEndpoint(e))),Se(this,Me,new Map,"f")},Se(this,Pe,e,"f")}onEndpointDisconnect(e,t){}receive(e){this.messageReceiver.addEndpoint(e,this.providerIdentity.channelId,this.endpointId)}async closeEndpoint(e){const t=Re(this,Me,"f").get(e);Re(this,Me,"f").delete(e);const n=Re(this,_e,"f").get(e);n?.forEach((n=>{const i=`Channel connection with identity uuid: ${t?.uuid} / name: ${t?.name} / endpointId: ${e} no longer connected.`;n.cancel(new Error(i))}))}isEndpointConnected(e){return Re(this,Me,"f").has(e)}addEndpoint(e,t){Re(this,Me,"f").set(e,t.endpointIdentity),Re(this,_e,"f").set(e,new Set)}isValidEndpointPayload(e){return"string"==typeof e?.endpointIdentity?.endpointId||"string"==typeof e?.endpointIdentity?.channelId}},Pe=new WeakMap,Me=new WeakMap,_e=new WeakMap,Oe.ClassicInfo={version:5,minimumVersion:0,type:"classic"};var Fe={},je={},ke={};Object.defineProperty(ke,"__esModule",{value:!0}),ke.errorToPOJO=void 0,ke.errorToPOJO=function(e){return{stack:e.stack,name:e.name,message:e.message,toString:()=>e.stack||e.toString()}};var Le,Te,$e=s&&s.__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)},Be=s&&s.__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};Object.defineProperty(je,"__esModule",{value:!0}),je.RTCEndpoint=void 0;const Ge=ke;je.RTCEndpoint=class{static isValidEndpointPayload(e){const t=e=>"object"==typeof e&&null!==e;return t(e)&&t(e.endpointIdentity)&&t(e.rtc)&&"string"==typeof e.endpointIdentity.endpointId}constructor({rtc:e,endpointIdentity:t}){this.responseMap=new Map,Le.set(this,null),Te.set(this,void 0),this.connectionStateChangeHandler=e=>{"connected"!==this.rtc.rtcClient.connectionState&&(this.rtc.rtcClient.removeEventListener("connectionstatechange",this.connectionStateChangeHandler),this.close(),$e(this,Te,"f")&&$e(this,Te,"f").call(this))},this.send=async(e,t)=>{const n=`message-${Math.random()}`,i=new Promise(((e,t)=>{this.responseMap.set(n,{resolve:e,reject:t})}));return this.rtc.channels.request.send(JSON.stringify({action:e,payload:t,messageId:n})),i},this.close=()=>{this.responseMap.forEach((e=>e.reject("Connection has closed."))),this.responseMap=new Map,this.rtc.channels.request.close(),this.rtc.channels.response.close(),this.rtc.rtcClient.close()},this.rtc=e,this.endpointIdentity=t,this.rtc.channels.response.addEventListener("message",(e=>{let{data:t}=e;e.data instanceof ArrayBuffer&&(t=(new TextDecoder).decode(e.data));const{messageId:n,payload:i,success:r,error:o}=JSON.parse(t),{resolve:s,reject:a}=this.responseMap.get(n)??{};s&&a?(this.responseMap.delete(n),r?s(i):a(o)):(console.log("Could not find id in responseMap."),console.log(e))})),this.rtc.channels.request.addEventListener("message",(async e=>{let{data:n}=e;e.data instanceof ArrayBuffer&&(n=(new TextDecoder).decode(e.data));const{messageId:i,action:r,payload:o}=JSON.parse(n);if($e(this,Le,"f"))try{const e=await $e(this,Le,"f").call(this,r,o,t);this.rtc.channels.response.send(JSON.stringify({messageId:i,payload:e,success:!0}))}catch(e){"open"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,error:(0,Ge.errorToPOJO)(e),success:!1}))}else"open"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,success:!1,error:"Connection not ready."}))})),this.rtc.rtcClient.addEventListener("connectionstatechange",this.connectionStateChangeHandler),Object.values(this.rtc.channels).forEach((e=>{e.onclose=e=>{[...this.responseMap.values()].forEach((e=>e.reject(new Error("RTCDataChannel closed unexpectedly, this is most commonly caused by message size. Note: RTC Channels have a message size limit of ~255kB.")))),this.close(),$e(this,Te,"f")&&$e(this,Te,"f").call(this)}}))}onDisconnect(e){if($e(this,Te,"f"))throw new Error("RTCEndpoint disconnectListener cannot be set twice.");Be(this,Te,e,"f")}receive(e){if($e(this,Le,"f"))throw new Error("You have already set a listener for this RTC Endpoint.");Be(this,Le,e,"f")}get connected(){return"connected"===this.rtc.rtcClient.connectionState}},Le=new WeakMap,Te=new WeakMap;var We,He,Ne,De={},Ue=s&&s.__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)},Ve=s&&s.__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};Object.defineProperty(De,"__esModule",{value:!0}),De.EndpointStrategy=void 0;De.EndpointStrategy=class{constructor(e,t,n){this.EndpointType=e,this.StrategyName=n,We.set(this,null),He.set(this,new Map),Ne.set(this,!0),this.send=async(e,t,n)=>this.getEndpointById(e).send(t,n),this.close=async()=>{Ue(this,Ne,"f")&&(Ue(this,He,"f").forEach((e=>e.close())),Ve(this,He,new Map,"f")),Ve(this,Ne,!1,"f")},this.isValidEndpointPayload=t}onEndpointDisconnect(e,t){this.getEndpointById(e).onDisconnect(t)}receive(e){if(Ue(this,We,"f"))throw new Error(`You have already set a listener for this ${this.StrategyName} Strategy`);Ve(this,We,e,"f"),Ue(this,He,"f").forEach((e=>e.receive(Ue(this,We,"f"))))}getEndpointById(e){const t=Ue(this,He,"f").get(e);if(!t)throw new Error(`Client with endpoint id ${e} is not connected`);return t}get connected(){return Ue(this,Ne,"f")}isEndpointConnected(e){return Ue(this,He,"f").has(e)}addEndpoint(e,t){if(!Ue(this,Ne,"f"))return void console.warn(`Adding endpoint to disconnected ${this.StrategyName} Strategy`);const n=new this.EndpointType(t);Ue(this,We,"f")&&n.receive(Ue(this,We,"f")),Ue(this,He,"f").set(e,n)}async closeEndpoint(e){Ue(this,He,"f").delete(e)}},We=new WeakMap,He=new WeakMap,Ne=new WeakMap,Object.defineProperty(Fe,"__esModule",{value:!0}),Fe.RTCInfo=Fe.RTCStrategy=void 0;const ze=je,Ke=De;class qe extends Ke.EndpointStrategy{constructor(){super(ze.RTCEndpoint,ze.RTCEndpoint.isValidEndpointPayload,"RTC")}}Fe.RTCStrategy=qe,Fe.RTCInfo={version:2,minimumVersion:0,type:"rtc"};var Je={};Object.defineProperty(Je,"__esModule",{value:!0}),Je.RTCICEManager=void 0;const Ye=d;class Ze extends Ye.EmitterBase{constructor(e){super(e,"channel"),this.ensureChannelOpened=e=>new Promise(((t,n)=>{if("open"===e.readyState)t();else if("connecting"===e.readyState){const n=()=>{e.removeEventListener("open",n),t()};e.addEventListener("open",n)}else n(new Error("This Channel has already closed"))}))}static createDataChannelPromise(e,t){let n;const i=new Promise((e=>{n=e})),r=i=>{const o=()=>{i.channel.removeEventListener("open",o),n(i.channel)};i.channel.label===e&&(i.channel.addEventListener("open",o),t.removeEventListener("datachannel",r))};return t.addEventListener("datachannel",r),i}async listenForProviderIce(e,t){await this.on(this.createProviderEventName(e),t,{timestamp:Date.now()})}async raiseProviderIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createProviderEventName(e)),t)}async listenForClientIce(e,t){await this.on(this.createClientEventName(e),t,{timestamp:Date.now()})}async raiseClientIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createClientEventName(e)),t)}cleanupIceListeners(e){this.removeAllListeners(this.createClientEventName(e)),this.removeAllListeners(this.createProviderEventName(e))}createClientEventName(e){return`ice-client-${e}`}createProviderEventName(e){return`ice-provider-${e}`}createRouteString(e){return`channel/${e}`}createRtcPeer(){return this.wire.environment.getRtcPeer()}async startClientOffer(){const e=Math.random().toString(),t=this.createRtcPeer();t.addEventListener("icecandidate",(async t=>{t.candidate&&await this.raiseClientIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForProviderIce(e,(async e=>{await t.addIceCandidate(e.candidate)}));const n={request:t.createDataChannel("request"),response:t.createDataChannel("response")},i=await t.createOffer();await t.setLocalDescription(i);const r=Promise.all([n.request,n.response].map(this.ensureChannelOpened)).then((()=>{}));return{rtcClient:t,channels:n,offer:i,rtcConnectionId:e,channelsOpened:r}}async finishClientOffer(e,t,n){return await e.setRemoteDescription(t),await n,!0}async createProviderAnswer(e,t){const n=this.createRtcPeer(),i=Ze.createDataChannelPromise("request",n),r=Ze.createDataChannelPromise("response",n);n.addEventListener("icecandidate",(async t=>{t.candidate&&await this.raiseProviderIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForClientIce(e,(async e=>{await n.addIceCandidate(e.candidate)})),await n.setRemoteDescription(t);const o=await n.createAnswer();await n.setLocalDescription(o);const s=Promise.all([i,r]).then((([t,n])=>(this.cleanupIceListeners(e),{request:t,response:n})));return{rtcClient:n,answer:o,channels:s}}}Je.RTCICEManager=Ze;var Qe={},Xe={};function et(e){return[...e.split(".").reverse().entries()].reduce(((e,[t,n])=>e+ +n*1e4**t),0)}function tt(e,t){return et(e)>=et(t)}function nt(e){return e.split("/")[0]}Object.defineProperty(Xe,"__esModule",{value:!0}),Xe.runtimeUuidMeetsMinimumRuntimeVersion=Xe.parseRuntimeUuid=Xe.meetsMinimumRuntimeVersion=void 0,Xe.meetsMinimumRuntimeVersion=tt,Xe.parseRuntimeUuid=nt,Xe.runtimeUuidMeetsMinimumRuntimeVersion=function(e,t){return tt(nt(e),t)};var it,rt,ot,st,at,ct=s&&s.__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)},dt=s&&s.__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};Object.defineProperty(Qe,"__esModule",{value:!0}),Qe.ChannelProvider=void 0;const ht=pe,lt=Xe;class ut extends ht.ChannelBase{get connections(){return[...ct(this,it,"f")]}static handleClientDisconnection(e,t){const n=e.connections.find((e=>e.endpointId===t.endpointId));if(n)ct(e,st,"f").call(e,n);else{e.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name)).forEach(ct(e,st,"f"))}e.disconnectListener(t)}static setProviderRemoval(e,t){ut.removalMap.set(e,t)}constructor(e,t,n){super(),it.set(this,void 0),rt.set(this,void 0),ot.set(this,void 0),st.set(this,(e=>{const t=this.connections.filter((t=>t.endpointId!==e.endpointId));ct(this,ot,"f").closeEndpoint(e.endpointId),dt(this,it,t,"f")})),this.processAction=async(e,t,n)=>(ut.clientIsMultiRuntime(n)&&!(0,lt.runtimeUuidMeetsMinimumRuntimeVersion)(n.runtimeUuid,"18.87.56.0")?this.handleMultiRuntimeLegacyClient(n):this.checkForClientConnection(n),super.processAction(e,t,n)),at.set(this,(()=>{ct(this,ot,"f").close();const e=ut.removalMap.get(this);e&&e()})),dt(this,rt,new ht.ProtectedItems(e,t),"f"),this.connectListener=()=>{},this.disconnectListener=()=>{},dt(this,it,[],"f"),dt(this,ot,n,"f"),n.receive(this.processAction)}dispatch(e,t,n){const i=e.endpointId??this.getEndpointIdForOpenFinId(e,t);return i&&ct(this,ot,"f").isEndpointConnected(i)?ct(this,ot,"f").send(i,t,n):Promise.reject(new Error(`Client connection with identity uuid: ${e.uuid} / name: ${e.name} / endpointId: ${i} no longer connected.`))}async processConnection(e,t){return ct(this,it,"f").push(e),this.connectListener(e,t)}publish(e,t){return this.connections.map((n=>ct(this,ot,"f").send(n.endpointId,e,t)))}onConnection(e){this.connectListener=e}onDisconnection(e){this.disconnectListener=e}async destroy(){const e=ct(this,rt,"f");e.providerIdentity,dt(this,it,[],"f"),await e.close(),ct(this,at,"f").call(this)}async getAllClientInfo(){return this.connections.map((e=>{const{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}=e;return{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}}))}checkForClientConnection(e){if(!this.isClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider.\n Client Identity: {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}isClientConnected(e){return ut.clientIdentityIncludesEndpointId(e)?this.connections.some((t=>t.endpointId===e.endpointId&&t.uuid===e.uuid&&t.name===e.name)):this.isLegacyClientConnected(e)}isLegacyClientConnected(e){return this.connections.some((t=>t.uuid===e.uuid&&t.name===e.name))}handleMultiRuntimeLegacyClient(e){if(!this.isLegacyClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider. Client Identity:\n {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}getEndpointIdForOpenFinId(e,t){const n=this.connections.filter((t=>t.name===e.name&&t.uuid===e.uuid));if(n.length>=2){const n=ct(this,rt,"f"),{uuid:i,name:r}=e,o=n?.providerIdentity.uuid,s=n?.providerIdentity.name;console.warn(`WARNING: Dispatch call may have unintended results. The "to" argument of your dispatch call is missing the\n "endpointId" parameter. The identity you are dispatching to ({uuid: ${i}, name: ${r}})\n has multiple channelClients for this channel. Your dispatched action: (${t}) from the provider:\n ({uuid: ${o}, name: ${s}}) will only be processed by the most recently-created client.`)}return n.pop()?.endpointId}static clientIdentityIncludesEndpointId(e){return void 0!==e.endpointId}static clientIsMultiRuntime(e){return void 0!==e.runtimeUuid}static async wireClose(e,t){await e.sendAction("destroy-channel",{channelName:t})}}Qe.ChannelProvider=ut,it=new WeakMap,rt=new WeakMap,ot=new WeakMap,st=new WeakMap,at=new WeakMap,ut.removalMap=new WeakMap;var pt={};Object.defineProperty(pt,"__esModule",{value:!0}),pt.MessageReceiver=void 0;const wt=ue,yt=d;class ft extends yt.Base{constructor(e){super(e),this.onmessage=e=>"process-channel-message"===e.action&&(this.processChannelMessage(e),!0),this.endpointMap=new Map,this.latestEndpointIdByChannelId=new Map,e.registerMessageHandler(this.onmessage.bind(this))}async processChannelMessage(e){const{senderIdentity:t,providerIdentity:n,action:i,ackToSender:r,payload:o,intendedTargetIdentity:s}=e.payload,a=s.channelId??s.endpointId??this.latestEndpointIdByChannelId.get(n.channelId),c=this.endpointMap.get(a);if(!c)return r.payload.success=!1,r.payload.reason=`Client connection with identity uuid: ${this.wire.me.uuid} / name: ${this.wire.me.name} / endpointId: ${a} no longer connected.`,this.wire.sendRaw(r);try{const e=await c(i,o,t);return r.payload.payload=r.payload.payload||{},r.payload.payload.result=e,this.wire.sendRaw(r)}catch(e){return r.payload.success=!1,r.payload.reason=e.message,this.wire.sendRaw(r)}}addEndpoint(e,t,n){this.endpointMap.set(n,e),t!==n&&this.latestEndpointIdByChannelId.set(t,n)}removeEndpoint(e,t){this.endpointMap.delete(t),this.latestEndpointIdByChannelId.get(e)===t&&this.latestEndpointIdByChannelId.delete(e)}checkForPreviousClientConnection(e){const t=this.latestEndpointIdByChannelId.get(e);t&&(wt.ChannelClient.closeChannelByEndpointId(t),console.warn("You have created a second connection to an older provider. First connection has been removed from the clientMap"),console.warn("If the provider calls publish(), you may receive multiple messages."))}}pt.MessageReceiver=ft;var gt={};Object.defineProperty(gt,"__esModule",{value:!0}),gt.ProtocolManager=void 0;gt.ProtocolManager=class{constructor(e){this.ProtocolsInPreferenceOrder=e,this.DefaultClientProtocols=["classic"],this.DefaultProviderProtocols=["classic"],this.getClientProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultClientProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(", ")}.`);return t},this.getProviderProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultProviderProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(", ")}.`);return t},this.getCompatibleProtocols=(e,t)=>t.supportedProtocols.filter((t=>e.some((e=>e.type===t.type&&t.version>=e.minimumVersion&&e.version>=(t.minimumVersion??0))))).slice(0,t.maxProtocols)}};var mt={};Object.defineProperty(mt,"__esModule",{value:!0});class vt{static combine(e,t){return new vt(e,t)}constructor(e,t){this.primary=e,this.secondary=t}onEndpointDisconnect(e,t){this.primary.onEndpointDisconnect(e,(()=>{this.secondary.isEndpointConnected(e)||t()})),this.secondary.onEndpointDisconnect(e,(()=>{this.primary.isEndpointConnected(e)||t()}))}isValidEndpointPayload(e){return this.primary.isValidEndpointPayload(e)||this.secondary.isValidEndpointPayload(e)}async closeEndpoint(e){await this.primary.closeEndpoint(e),await this.secondary.closeEndpoint(e)}isEndpointConnected(e){return this.primary.isEndpointConnected(e)||this.secondary.isEndpointConnected(e)}async addEndpoint(e,t){this.primary.isValidEndpointPayload(t)&&await this.primary.addEndpoint(e,t),this.secondary.isValidEndpointPayload(t)&&await this.secondary.addEndpoint(e,t)}receive(e){this.primary.receive(e),this.secondary.receive(e)}send(e,t,n){return this.primary.isEndpointConnected(e)?this.primary.send(e,t,n):this.secondary.send(e,t,n)}async close(){await Promise.all([this.primary.close(),this.secondary.close()])}}mt.default=vt;var Ct,bt,It=s&&s.__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},Et=s&&s.__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)},xt=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(xe,"__esModule",{value:!0}),xe.ConnectionManager=void 0;const At=Ae,Pt=d,Mt=Oe,_t=Fe,Ot=Je,St=Qe,Rt=pt,Ft=gt,jt=xt(mt);class kt extends Pt.Base{static getProtocolOptionsFromStrings(e){return e.map((e=>{switch(e){case"rtc":return _t.RTCInfo;case"classic":return Mt.ClassicInfo;default:return(0,At.exhaustiveCheck)(e,["rtc","classic"])}}))}constructor(e){super(e),Ct.set(this,void 0),bt.set(this,void 0),this.removeChannelFromProviderMap=e=>{this.providerMap.delete(e)},this.onmessage=e=>"process-channel-connection"===e.action&&(this.processChannelConnection(e),!0),this.providerMap=new Map,this.protocolManager=new Ft.ProtocolManager("node"===this.wire.environment.type?["classic"]:["rtc","classic"]),It(this,Ct,new Rt.MessageReceiver(e),"f"),It(this,bt,new Ot.RTCICEManager(e),"f"),e.registerMessageHandler(this.onmessage.bind(this))}createProvider(e,t){const n=Object.assign(this.wire.environment.getDefaultChannelOptions().create,e||{}),i=this.protocolManager.getProviderProtocols(n?.protocols),r=i.map((e=>{switch(e){case"rtc":return new _t.RTCStrategy;case"classic":return new Mt.ClassicStrategy(this.wire,Et(this,Ct,"f"),t.channelId,t);default:return(0,At.exhaustiveCheck)(e,["rtc","classic"])}}));let o;if(2===r.length){const[e,t]=r;o=jt.default.combine(e,t)}else{if(1!==r.length)throw new Error("failed to combine strategies");[o]=r}const s=new St.ChannelProvider(t,(()=>St.ChannelProvider.wireClose(this.wire,t.channelName)),o),a=t.channelId;return this.providerMap.set(a,{provider:s,strategy:o,supportedProtocols:kt.getProtocolOptionsFromStrings(i)}),St.ChannelProvider.setProviderRemoval(s,this.removeChannelFromProviderMap.bind(this)),s}async createClientOffer(e){const t=this.protocolManager.getClientProtocols(e?.protocols);let n;return{offer:{supportedProtocols:await Promise.all(t.map((async e=>{switch(e){case"rtc":{const{rtcClient:e,channels:t,offer:i,rtcConnectionId:r,channelsOpened:o}=await Et(this,bt,"f").startClientOffer();return n={rtcClient:e,channels:t,channelsOpened:o},{type:"rtc",version:_t.RTCInfo.version,payload:{offer:i,rtcConnectionId:r}}}case"classic":return{type:"classic",version:Mt.ClassicInfo.version};default:return(0,At.exhaustiveCheck)(e,["rtc","classic"])}}))),maxProtocols:2},rtc:n}}async createClientStrategy(e,t){t.endpointId||(t.endpointId=this.wire.environment.getNextMessageId(),Et(this,Ct,"f").checkForPreviousClientConnection(t.channelId));const n=t.answer??{supportedProtocols:[{type:"classic",version:1}]},i=(await Promise.all(n.supportedProtocols.map((async n=>"rtc"===n.type&&e?(await Et(this,bt,"f").finishClientOffer(e.rtcClient,n.payload.answer,e.channelsOpened),new _t.RTCStrategy):"classic"===n.type?new Mt.ClassicStrategy(this.wire,Et(this,Ct,"f"),t.endpointId,t):null)))).filter((e=>null!==e));let r;if(e&&!i.some((e=>e instanceof _t.RTCStrategy))&&e&&e.rtcClient.close(),i.length>=2)r=jt.default.combine(i[0],i[1]);else{if(!i.length)throw new Error("No compatible protocols");[r]=i}const o={endpointIdentity:t,rtc:e};return r.addEndpoint(t.channelId,o),r}async processChannelConnection(e){const{clientIdentity:t,providerIdentity:n,ackToSender:i,payload:r,offer:o}=e.payload;t.endpointId?t.isLocalEndpointId=!1:(t.endpointId=this.wire.environment.getNextMessageId(),t.isLocalEndpointId=!0);const s=n.channelId,a=this.providerMap.get(s);if(!a)return i.payload.success=!1,i.payload.reason=`Channel "${n.channelName}" has been destroyed.`,this.wire.sendRaw(i);const{provider:c,strategy:d,supportedProtocols:h}=a;try{if(!(c instanceof St.ChannelProvider))throw Error("Cannot connect to a channel client");const e=o??{supportedProtocols:[{type:"classic",version:1}],maxProtocols:1},n=this.protocolManager.getCompatibleProtocols(h,e);if(!n.length)throw new Error("This provider does not support any of the offered protocols.");const s=await c.processConnection(t,r);i.payload.payload=i.payload.payload||{};let a={supportedProtocols:[],endpointPayloadPromise:Promise.resolve({endpointIdentity:t})};return a=await n.reduce((async(e,t)=>{const n=await e;if("rtc"===t.type){const{answer:e,rtcClient:i,channels:r}=await Et(this,bt,"f").createProviderAnswer(t.payload.rtcConnectionId,t.payload.offer);n.supportedProtocols.push({type:"rtc",version:_t.RTCInfo.version,payload:{answer:e}}),n.endpointPayloadPromise=n.endpointPayloadPromise.then((e=>r.then((t=>({...e,rtc:{rtcClient:i,channels:t}})))))}else n.supportedProtocols.push({type:"classic",version:Mt.ClassicInfo.version});return n}),Promise.resolve(a)),a.endpointPayloadPromise.then((e=>d.addEndpoint(t.endpointId,e))),i.payload.payload.result=s,i.payload.payload.answer=a,this.wire.sendRaw(i)}catch(e){return i.payload.success=!1,i.payload.reason=e.message,this.wire.sendRaw(i)}}}xe.ConnectionManager=kt,Ct=new WeakMap,bt=new WeakMap;var Lt,Tt,$t,Bt=s&&s.__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},Gt=s&&s.__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)};Object.defineProperty(le,"__esModule",{value:!0}),le.Channel=void 0;const Wt=t,Ht=G,Nt=d,Dt=ue,Ut=xe,Vt=Qe;function zt(e){const t=Math.floor(e/10),n=Math.min(3e4,500*2**t);return new Promise((e=>{setTimeout((()=>{e(!1)}),n)}))}class Kt extends Nt.EmitterBase{constructor(e){super(e,"channel"),Lt.set(this,void 0),Tt.set(this,new Wt.EventEmitter),$t.set(this,new Ht.AsyncRetryableLazy((async()=>{await Promise.all([this.on("disconnected",(e=>{Dt.ChannelClient.handleProviderDisconnect(e)})),this.on("connected",((...e)=>{Gt(this,Tt,"f").emit("connected",...e)}))]).catch((()=>new Error("error setting up channel connection listeners")))}))),Bt(this,Lt,new Ut.ConnectionManager(e),"f")}async getAllChannels(){return this.wire.sendAction("get-all-channels").then((({payload:e})=>e.data))}async onChannelConnect(e){await this.on("connected",e)}async onChannelDisconnect(e){await this.on("disconnected",e)}async safeConnect(e,t,n){const i={count:0};do{let r=()=>{};const o=new Promise((t=>{r=n=>{e===n.channelName&&t(!0)},Gt(this,Tt,"f").on("connected",r)}));try{if(i.count>0){i.gotConnectedEvent=await Promise.race([zt(i.count),o]);const t=await this.wire.sendAction("connect-to-channel",{...n,retryInfo:i});return console.log(`Successfully connected to channelName: ${e}`),t.payload.data}const t=this.wire.sendAction("connect-to-channel",n);i.originalMessageId=t.messageId;return(await t).payload.data}catch(n){if(!n.message.includes("internal-nack"))throw n;t&&0===i.count&&console.warn(`No channel found for channelName: ${e}. Waiting for connection...`)}finally{i.count+=1,Gt(this,Tt,"f").removeListener("connected",r)}}while(t);throw new Error(`No channel found for channelName: ${e}.`)}async connect(e,t={}){if(await Gt(this,$t,"f").getValue(),!e||"string"!=typeof e)throw new Error("Please provide a channelName string to connect to a channel.");const n={wait:!0,...this.wire.environment.getDefaultChannelOptions().connect,...t},{offer:i,rtc:r}=await Gt(this,Lt,"f").createClientOffer(n);let o;(this.fin.me.isFrame||this.fin.me.isView||this.fin.me.isWindow)&&(o=(await this.fin.me.getInfo()).url);const s={channelName:e,...n,offer:i,connectionUrl:o},a=await this.safeConnect(e,n.wait,s),c=await Gt(this,Lt,"f").createClientStrategy(r,a),d=new Dt.ChannelClient(a,(()=>Dt.ChannelClient.wireClose(this.wire,a,a.endpointId)),c);return c.onEndpointDisconnect(a.channelId,(async()=>{try{await d.sendDisconnectAction()}catch(e){console.warn(`Something went wrong during disconnect for client with uuid: ${a.uuid} / name: ${a.name} / endpointId: ${a.endpointId}.`)}finally{Dt.ChannelClient.handleProviderDisconnect(a)}})),d}async create(e,t){if(!e)throw new Error("Please provide a channelName to create a channel");const{payload:{data:n}}=await this.wire.sendAction("create-channel",{channelName:e}),i=Gt(this,Lt,"f").createProvider(t,n);return this.on("client-disconnected",(t=>{t.channelName===e&&Vt.ChannelProvider.handleClientDisconnection(i,t)})),i}}le.Channel=Kt,Lt=new WeakMap,Tt=new WeakMap,$t=new WeakMap,Object.defineProperty(de,"__esModule",{value:!0}),de.InterAppPayload=de.InterApplicationBus=void 0;const qt=t,Jt=d,Yt=he,Zt=le,Qt=O;class Xt extends Jt.Base{constructor(e){super(e),this.events={subscriberAdded:"subscriber-added",subscriberRemoved:"subscriber-removed"},this.refCounter=new Yt.RefCounter,this.Channel=new Zt.Channel(e),this.emitter=new qt.EventEmitter,e.registerMessageHandler(this.onmessage.bind(this)),this.on=this.emitter.on.bind(this.emitter),this.removeAllListeners=this.emitter.removeAllListeners.bind(this.emitter)}async publish(e,t){await this.wire.sendAction("publish-message",{topic:e,message:t,sourceWindowName:this.me.name})}async send(e,t,n){const i=(0,Qt.validateIdentity)(e);if(i)throw new Error(i);await this.wire.sendAction("send-message",{destinationUuid:e.uuid,destinationWindowName:e.name,topic:t,message:n,sourceWindowName:this.me.name})}subscribe(e,t,n){const i=this.createSubscriptionKey(e.uuid,e.name||"*",t);return this.emitter.on(i,n),this.refCounter.actOnFirst(i,(async()=>{await this.wire.sendAction("subscribe",{sourceUuid:e.uuid,sourceWindowName:e.name||"*",topic:t,destinationWindowName:this.me.name})}),(()=>Promise.resolve()))}unsubscribe(e,t,n){const i=e.name||"*",r=this.createSubscriptionKey(e.uuid,i,t);return this.emitter.removeListener(r,n),this.refCounter.actOnLast(r,(async()=>{await this.wire.sendAction("unsubscribe",{sourceUuid:e.uuid,sourceWindowName:i,topic:t,destinationWindowName:this.me.name})}),(()=>new Promise((e=>e)).then((()=>{}))))}processMessage(e){const{payload:{message:t,sourceWindowName:n,sourceUuid:i,topic:r}}=e,o=[this.createSubscriptionKey(i,n,r),this.createSubscriptionKey(i,"*",r),this.createSubscriptionKey("*","*",r)],s={uuid:i,name:n};o.forEach((e=>{this.emitter.emit(e,t,s)}))}emitSubscriverEvent(e,t){const{payload:{targetName:n,uuid:i,topic:r}}=t,o={name:n,uuid:i,topic:r};this.emitter.emit(e,o)}createSubscriptionKey(e,t,n){const i=t||"*";if(!(e&&i&&n))throw new Error("Missing uuid, name, or topic string");return function(...e){return e.map((e=>Buffer.from(`${e}`).toString("base64"))).join("/")}(e,i,n)}onmessage(e){const{action:t}=e;switch(t){case"process-message":this.processMessage(e);break;case this.events.subscriberAdded:this.emitSubscriverEvent(this.events.subscriberAdded,e);break;case this.events.subscriberRemoved:this.emitSubscriverEvent(this.events.subscriberRemoved,e)}return!0}}de.InterApplicationBus=Xt;de.InterAppPayload=class{};var en={};Object.defineProperty(en,"__esModule",{value:!0}),en.Clipboard=void 0;const tn=d;class nn extends tn.Base{async writeText(e){await this.wire.sendAction("clipboard-write-text",e)}async readText(e){const{payload:t}=await this.wire.sendAction("clipboard-read-text",{type:e});return t.data}async writeImage(e){await this.wire.sendAction("clipboard-write-image",e)}async readImage(e={format:"dataURL"}){const{payload:t}=await this.wire.sendAction("clipboard-read-image",e);return t.data}async writeHtml(e){await this.wire.sendAction("clipboard-write-html",e)}async readHtml(e){const{payload:t}=await this.wire.sendAction("clipboard-read-html",{type:e});return t.data}async writeRtf(e){await this.wire.sendAction("clipboard-write-rtf",e)}async readRtf(e){const{payload:t}=await this.wire.sendAction("clipboard-read-rtf",{type:e});return t.data}async write(e){await this.wire.sendAction("clipboard-write",e)}async getAvailableFormats(e){const{payload:t}=await this.wire.sendAction("clipboard-read-formats",{type:e});return t.data}}en.Clipboard=nn;var rn={},on={},sn={};Object.defineProperty(sn,"__esModule",{value:!0}),sn.ExternalApplication=void 0;const an=d;class cn extends an.EmitterBase{constructor(e,t){super(e,"external-application",t.uuid),this.identity=t}getInfo(){return this.wire.sendAction("get-external-application-info",this.identity).then((({payload:e})=>e.data))}}sn.ExternalApplication=cn,Object.defineProperty(on,"__esModule",{value:!0}),on.ExternalApplicationModule=void 0;const dn=d,hn=sn;class ln extends dn.Base{wrap(e){return this.wire.sendAction("external-application-wrap").catch((e=>{})),Promise.resolve(new hn.ExternalApplication(this.wire,{uuid:e}))}wrapSync(e){return this.wire.sendAction("external-application-wrap-sync").catch((e=>{})),new hn.ExternalApplication(this.wire,{uuid:e})}}on.ExternalApplicationModule=ln,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(on,e),n(sn,e)}(rn);var un={},pn={},wn={};Object.defineProperty(wn,"__esModule",{value:!0}),wn._Frame=void 0;const yn=d;class fn extends yn.EmitterBase{constructor(e,t){super(e,"frame",t.uuid,t.name),this.identity=t}getInfo(){return this.wire.sendAction("get-frame-info",this.identity).then((({payload:e})=>e.data))}getParentWindow(){return this.wire.sendAction("get-parent-window",this.identity).then((({payload:e})=>e.data))}}wn._Frame=fn,Object.defineProperty(pn,"__esModule",{value:!0}),pn._FrameModule=void 0;const gn=d,mn=O,vn=wn;class Cn extends gn.Base{async wrap(e){this.wire.sendAction("frame-wrap").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}wrapSync(e){this.wire.sendAction("frame-wrap-sync").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}getCurrent(){return this.wire.sendAction("frame-get-current").catch((e=>{})),Promise.resolve(new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity()))}getCurrentSync(){return this.wire.sendAction("frame-get-current-sync").catch((e=>{})),new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity())}}pn._FrameModule=Cn,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(pn,e),n(wn,e)}(un);var bn={};Object.defineProperty(bn,"__esModule",{value:!0}),bn.GlobalHotkey=void 0;const In=d;class En extends In.EmitterBase{constructor(e){super(e,"global-hotkey")}async register(e,t){await this.on(e,t),await this.wire.sendAction("global-hotkey-register",{hotkey:e})}async unregister(e){await this.removeAllListeners(e),await this.wire.sendAction("global-hotkey-unregister",{hotkey:e})}async unregisterAll(){await Promise.all(this.eventNames().filter((e=>!("registered"===e||"unregistered"===e))).map((e=>this.removeAllListeners(e)))),await this.wire.sendAction("global-hotkey-unregister-all",{})}async isRegistered(e){const{payload:{data:t}}=await this.wire.sendAction("global-hotkey-is-registered",{hotkey:e});return t}}bn.GlobalHotkey=En;var xn,An={},Pn={},Mn={},_n=s&&s.__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)};Object.defineProperty(Mn,"__esModule",{value:!0}),Mn.Platform=void 0;const On=d,Sn=O,Rn=new Map;class Fn extends On.EmitterBase{constructor(e,t){super(t.wire,"application",e.uuid),this.getClient=e=>{this.wire.sendAction("platform-get-client",this.identity).catch((e=>{}));const t=e||this.identity,{uuid:n}=t;if(!Rn.has(n)){const e=_n(this,xn,"f").call(this,n);Rn.set(n,e)}return Rn.get(n)},xn.set(this,(async e=>{try{const t=`custom-frame-${e}`,n=await this._channel.connect(t,{wait:!1});return n.onDisconnection((()=>{Rn.delete(e)})),n}catch(t){throw Rn.delete(e),new Error("The targeted Platform is not currently running. Listen for application-started event for the given Uuid.")}})),this.launchLegacyManifest=this.launchContentManifest;const n=(0,Sn.validateIdentity)(e);if(n)throw new Error(n);this._channel=t,this.identity={uuid:e.uuid},this.Layout=this.fin.Platform.Layout,this.Application=this.fin.Application.wrapSync(this.identity)}async createView(e,t,n){this.wire.sendAction("platform-create-view",this.identity).catch((e=>{}));const i=await this.getClient(),r=await i.dispatch("create-view",{target:t,opts:e,targetView:n});if(!r||(0,Sn.validateIdentity)(r.identity))throw new Error(`When overwriting the createView call, please return an object that has a valid 'identity' property: ${JSON.stringify(r)}`);return this.fin.View.wrapSync(r.identity)}async createWindow(e){this.wire.sendAction("platform-create-window",this.identity).catch((e=>{}));const t=await this.getClient();e.reason||(e.reason="api-call");const n=await t.dispatch("create-view-container",e);if(!n||(0,Sn.validateIdentity)(n.identity))throw new Error(`When overwriting the createWindow call, please return an object that has a valid 'identity' property: ${JSON.stringify(n)}`);const{identity:i}=n,r=this.fin.Window.wrapSync(i);return r.name=i.name,r.uuid=i.uuid,r}async quit(){this.wire.sendAction("platform-quit",this.identity).catch((e=>{}));return(await this.getClient()).dispatch("quit")}async closeView(e){this.wire.sendAction("platform-close-view",this.identity).catch((e=>{}));const t=await this.getClient();await t.dispatch("close-view",{view:e})}async reparentView(e,t){console.warn("Platform.reparentView has been deprecated, please use Platform.createView"),this.wire.sendAction("platform-reparent-view",this.identity).catch((e=>{}));const n={...e,uuid:e.uuid??this.identity.uuid},i=await this.fin.View.wrap(n),r=await i.getOptions();return this.createView(r,t)}async getSnapshot(){this.wire.sendAction("platform-get-snapshot",this.identity).catch((e=>{}));return(await this.getClient()).dispatch("get-snapshot")}async getViewSnapshot(e){return(await this.getClient()).dispatch("get-view-snapshot",{viewIdentity:e})}async applySnapshot(e,t){this.wire.sendAction("platform-apply-snapshot",this.identity).catch((e=>{}));const n="Requested snapshot must be a valid Snapshot object, or a url or filepath to such an object.";let i;if("string"==typeof e)try{i=(await this._channel.wire.sendAction("get-application-manifest",{manifestUrl:e})).payload.data}catch(e){throw new Error(`${n}: ${e}`)}else i=e;if(!i.windows)throw new Error(n);const r=await this.getClient();return await r.dispatch("apply-snapshot",{snapshot:i,options:t}),this}async fetchManifest(e){return(await this.getClient()).dispatch("platform-fetch-manifest",{manifestUrl:e})}async launchContentManifest(e){this.wire.sendAction("platform-launch-content-manifest",this.identity).catch((()=>{}));const t=await this.getClient(),n=await this.fetchManifest(e);return t.dispatch("launch-into-platform",{manifest:n,manifestUrl:e}),this}async setWindowContext(e={},t){if(this.wire.sendAction("platform-set-window-context",this.identity).catch((e=>{})),!e)throw new Error("Please provide a serializable object or string to set the context.");const n=await this.getClient(),{entityType:i}=t?await this.fin.System.getEntityInfo(t.uuid,t.name):this.fin.me;await n.dispatch("set-window-context",{context:e,entityType:i,target:t||{uuid:this.fin.me.uuid,name:this.fin.me.name}})}async getWindowContext(e){this.wire.sendAction("platform-get-window-context",this.identity).catch((e=>{}));const t=await this.getClient(),{entityType:n}=e?await this.fin.System.getEntityInfo(e.uuid,e.name):this.fin.me;return t.dispatch("get-window-context",{target:e||{uuid:this.fin.me.uuid,name:this.fin.me.name},entityType:n})}async closeWindow(e,t={skipBeforeUnload:!1}){this.wire.sendAction("platform-close-window",this.identity).catch((e=>{}));return(await this.getClient()).dispatch("close-window",{windowId:e,options:t})}}Mn.Platform=Fn,xn=new WeakMap;var jn={},kn={},Ln={},Tn={};function $n(e){switch(e){case"columns":case"grid":case"rows":case"tabs":return!0;default:return!1}}Object.defineProperty(Tn,"__esModule",{value:!0}),Tn.overrideFromComposables=Tn.isValidPresetType=void 0,Tn.isValidPresetType=$n,Tn.overrideFromComposables=function(...e){return t=>e.reduceRight(((e,t)=>n=>t(e(n))),(e=>e))(t)},Tn.default={isValidPresetType:$n};var Bn={},Gn={},Wn={};Object.defineProperty(Wn,"__esModule",{value:!0}),Wn.ApiConsumer=void 0;Wn.ApiConsumer=class{constructor(e){this.strategy=e,this.consume=async e=>(await this.strategy.getExposedFunctions(e)).reduce(((t,n)=>({...t,[n.key]:this.strategy.createFunction(n,e)})),{})}};var Hn={},Nn={};Object.defineProperty(Nn,"__esModule",{value:!0}),Nn.expose=Nn.getExposedProperties=void 0;const Dn=Symbol("exposedProperties");Nn.getExposedProperties=e=>e[Dn]||e.prototype[Dn]||[];Nn.expose=e=>(t,n,i)=>{t[Dn]=t[Dn]||[],t[Dn].push({key:n,descriptor:i,options:e})},Object.defineProperty(Hn,"__esModule",{value:!0}),Hn.ApiExposer=void 0;const Un=Nn;Hn.ApiExposer=class{constructor(e){this.strategy=e,this.exposeInstance=async(e,t)=>{const n=(0,Un.getExposedProperties)(e),i=await Promise.all(n.map((async({key:n,options:i})=>({key:n,options:await this.strategy.exposeFunction(e[n].bind(e),{key:n,options:i,meta:t})}))));await this.strategy.exposeMeta(t,i)}}};var Vn={},zn={},Kn={};Object.defineProperty(Kn,"__esModule",{value:!0}),Kn.ChannelsConsumer=void 0;Kn.ChannelsConsumer=class{constructor(e){this.channel=e,this.getExposedFunctions=async e=>{const{id:t}=e,{props:n}=await this.channel.dispatch(`api-meta:${t}`);return n},this.createFunction=e=>(...t)=>{const{action:n}=e.options;return this.channel.dispatch(n,{args:t})}}};var qn={};Object.defineProperty(qn,"__esModule",{value:!0}),qn.ChannelsExposer=void 0;qn.ChannelsExposer=class{constructor(e){this.channelProviderOrClient=e,this.exposeFunction=async(e,t)=>{const{key:n,options:i,meta:r}=t,{id:o}=r,s=`${o}.${i?.action||n}`;return await this.channelProviderOrClient.register(s,(async({args:t})=>e(...t))),{action:s}},this.exposeMeta=async({id:e},t)=>{const n=`api-meta:${e}`;await this.channelProviderOrClient.register(n,(()=>({props:t})))}}},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Kn,e),n(qn,e)}(zn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(zn,e)}(Vn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Wn,e),n(Hn,e),n(Vn,e),n(Nn,e)}(Gn);var Jn={};Object.defineProperty(Jn,"__esModule",{value:!0}),Jn.createRelayedDispatch=exports.relayChannelClientApi_1=Jn.relayChannelClientApi=void 0;const Yn=["no longer connected","RTCDataChannel closed unexpectedly","The client you are trying to dispatch from is disconnected from the target provider"];exports.relayChannelClientApi_1=Jn.relayChannelClientApi=async(e,t)=>{e.register(`relay:${t}`,(({action:t,target:n,payload:i})=>e.dispatch(n,t,i))),await Promise.resolve()};Jn.createRelayedDispatch=(e,t,n,i)=>async(r,o)=>{try{return await e.dispatch(`relay:${n}`,{action:r,payload:o,target:t})}catch(e){if(s=e.message,Yn.some((e=>s.includes(e)))&&i)throw new Error(i);throw e}var s};var Zn,Qn,Xn,ei=s&&s.__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},ti=s&&s.__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)};Object.defineProperty(Bn,"__esModule",{value:!0}),Bn.ColumnOrRow=Bn.TabStack=Bn.LayoutNode=void 0;const ni=Gn,ii=Jn;class ri{constructor(e,t){Zn.set(this,void 0),this.isRoot=()=>ti(this,Zn,"f").isRoot(this.entityId),this.exists=()=>ti(this,Zn,"f").exists(this.entityId),this.getParent=async()=>{const e=await ti(this,Zn,"f").getParent(this.entityId);if(e)return ri.getEntity(e,ti(this,Zn,"f"))},this.createAdjacentStack=async(e,t)=>{const n=await ti(this,Zn,"f").createAdjacentStack(this.entityId,e,t);return ri.getEntity({entityId:n,type:"stack"},ti(this,Zn,"f"))},this.getAdjacentStacks=async e=>(await ti(this,Zn,"f").getAdjacentStacks({targetId:this.entityId,edge:e})).map((e=>ri.getEntity({type:"stack",entityId:e.entityId},ti(this,Zn,"f")))),ei(this,Zn,e,"f"),this.entityId=t}}Bn.LayoutNode=ri,Zn=new WeakMap,ri.newLayoutEntitiesClient=async(e,t,n)=>{const i=(0,ii.createRelayedDispatch)(e,n,"layout-relay","You are trying to interact with a layout component on a window that does not exist or has been destroyed.");return new ni.ApiConsumer(new ni.ChannelsConsumer({dispatch:i})).consume({id:t})},ri.getEntity=(e,t)=>{const{entityId:n,type:i}=e;switch(i){case"column":case"row":return new si(t,n,i);case"stack":return new oi(t,n);default:throw new Error(`Unrecognised Layout Entity encountered ('${JSON.stringify(e)})`)}};class oi extends ri{constructor(e,t){super(e,t),Qn.set(this,void 0),this.type="stack",this.getViews=()=>ti(this,Qn,"f").getStackViews(this.entityId),this.addView=async(e,t={index:0})=>ti(this,Qn,"f").addViewToStack(this.entityId,e,t),this.removeView=async e=>{await ti(this,Qn,"f").removeViewFromStack(this.entityId,e)},this.setActiveView=async e=>{await ti(this,Qn,"f").setStackActiveView(this.entityId,e)},ei(this,Qn,e,"f")}}Bn.TabStack=oi,Qn=new WeakMap;class si extends ri{constructor(e,t,n){super(e,t),Xn.set(this,void 0),this.getContent=async()=>(await ti(this,Xn,"f").getContent(this.entityId)).map((e=>ri.getEntity(e,ti(this,Xn,"f")))),ei(this,Xn,e,"f"),this.type=n}}Bn.ColumnOrRow=si,Xn=new WeakMap;var ai={};Object.defineProperty(ai,"__esModule",{value:!0}),ai.DEFAULT_LAYOUT_KEY=ai.LAYOUT_CONTROLLER_ID=void 0,ai.LAYOUT_CONTROLLER_ID="layout-entities",ai.DEFAULT_LAYOUT_KEY="__default__";var ci,di,hi,li=s&&s.__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)};Object.defineProperty(Ln,"__esModule",{value:!0}),Ln.Layout=void 0;const ui=G,pi=O,wi=d,yi=Tn,fi=Bn,gi=ai;class mi extends wi.Base{static getClient(e){return li(e,di,"f").getValue()}constructor(e,t){super(t),ci.add(this),di.set(this,new ui.Lazy((async()=>fi.LayoutNode.newLayoutEntitiesClient(await this.platform.getClient(),gi.LAYOUT_CONTROLLER_ID,this.identity)))),this.replace=async e=>{this.wire.sendAction("layout-replace").catch((e=>{}));const t=await this.platform.getClient();await t.dispatch("replace-layout",{target:this.identity,opts:{layout:e}})},this.replaceView=async(e,t)=>{this.wire.sendAction("layout-replace-view").catch((e=>{}));const n=await this.platform.getClient();await n.dispatch("replace-view",{target:this.identity,opts:{viewToReplace:e,newView:t}})},this.applyPreset=async e=>{this.wire.sendAction("layout-apply-preset").catch((e=>{}));const t=await this.platform.getClient(),{presetType:n}=e;if(!n||!(0,yi.isValidPresetType)(n))throw new Error("Cannot apply preset layout, please include an applicable presetType property in the PresetLayoutOptions.");await t.dispatch("apply-preset-layout",{target:this.identity,opts:{presetType:n}})};const n=(0,pi.validateIdentity)(e);if(n)throw new Error(n);this.identity=e,this.platform=this.fin.Platform.wrapSync({uuid:e.uuid}),e.uuid===this.fin.me.uuid&&e.name===this.fin.me.name&&(this.init=this.fin.Platform.Layout.init)}async getConfig(){this.wire.sendAction("layout-get-config").catch((e=>{}));return(await this.platform.getClient()).dispatch("get-frame-snapshot",{target:this.identity})}async getCurrentViews(){this.wire.sendAction("layout-get-views").catch((e=>{}));const e=await this.platform.getClient();return(await e.dispatch("get-layout-views",{target:this.identity})).map((e=>this.fin.View.wrapSync(e)))}async getRootItem(){this.wire.sendAction("layout-get-root-item").catch((()=>{}));const e=await li(this,di,"f").getValue(),t=await e.getRoot("layoutName"in this.identity?this.identity:void 0);return fi.LayoutNode.getEntity(t,e)}async getStackByViewIdentity(e){this.wire.sendAction("layout-get-stack-by-view").catch((()=>{}));const t=await li(this,di,"f").getValue(),n=await t.getStackByView(e);if(!n)throw new Error(`No stack found for view: ${e.uuid}/${e.name}`);return fi.LayoutNode.getEntity(n,t)}async addView(e,{location:t,targetView:n}={}){this.wire.sendAction("layout-add-view").catch((e=>{}));const{identity:i}=await li(this,ci,"m",hi).call(this,"layout-add-view",{viewOptions:e,location:t,targetView:n});return{identity:i}}async closeView(e){this.wire.sendAction("layout-close-view").catch((e=>{})),await li(this,ci,"m",hi).call(this,"layout-close-view",{viewIdentity:e})}}Ln.Layout=mi,di=new WeakMap,ci=new WeakSet,hi=async function(e,t){return(await this.platform.getClient()).dispatch(e,{target:this.identity,opts:t})};var vi,Ci,bi,Ii,Ei,xi=s&&s.__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)},Ai=s&&s.__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};Object.defineProperty(kn,"__esModule",{value:!0}),kn.LayoutModule=void 0;const Pi=d,Mi=Ln,_i=ai;class Oi extends Pi.Base{constructor(){super(...arguments),vi.add(this),Ci.set(this,!1),bi.set(this,null),this.init=async(e={})=>{if(this.wire.sendAction("layout-init").catch((e=>{})),!this.wire.environment.layoutAllowedInContext(this.fin))throw new Error("Layout.init can only be called from a Window context.");if(xi(this,Ci,"f"))throw new Error("Layout.init was already called, please use Layout.create to add additional layouts.");"openfin"===this.wire.environment.type&&await this.fin.Platform.getCurrentSync().getClient(),Ai(this,Ci,!0,"f"),Ai(this,bi,await this.wire.environment.initLayoutManager(this.fin,this.wire,e),"f"),await this.wire.environment.applyLayoutSnapshot(this.fin,xi(this,bi,"f"),e);const t={name:this.fin.me.name,uuid:this.fin.me.uuid};if(!e.layoutManagerOverride){const e={layoutName:_i.DEFAULT_LAYOUT_KEY,...t};return xi(this,Ii,"f").call(this,e)}return this.wrapSync(t)},Ii.set(this,(e=>{const t="[Layout] You are using a deprecated property `layoutManager` - it will throw if you access it starting in v37.",n=new Proxy({},{get(e,n){throw console.warn(`[Layout-mgr-proxy] accessing ${n.toString()}`),new Error(t)}}),i=Object.assign(this.wrapSync(e),{layoutManager:n});return new Proxy(i,{get(e,n){if("layoutManager"===n)throw console.warn(`[Layout-proxy] accessing ${n.toString()}`),new Error(t);return e[n]}})})),this.getCurrentLayoutManagerSync=()=>xi(this,vi,"m",Ei).call(this,"fin.Platform.Layout.getCurrentLayoutManagerSync()"),this.create=async e=>this.wire.environment.createLayout(xi(this,vi,"m",Ei).call(this,"fin.Platform.Layout.create()"),e),this.destroy=async e=>this.wire.environment.destroyLayout(xi(this,vi,"m",Ei).call(this,"fin.Platform.Layout.destroy()"),e)}async wrap(e){return this.wire.sendAction("layout-wrap").catch((e=>{})),new Mi.Layout(e,this.wire)}wrapSync(e){return this.wire.sendAction("layout-wrap-sync").catch((e=>{})),new Mi.Layout(e,this.wire)}async getCurrent(){if(this.wire.sendAction("layout-get-current").catch((e=>{})),"openfin"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error("You are not in a Window context. Only Windows can have a Layout.");const{uuid:e,name:t}=this.fin.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction("layout-get-current-sync").catch((e=>{})),"openfin"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error("You are not in a Window context. Only Windows can have a Layout.");const{uuid:e,name:t}=this.fin.me;return this.wrapSync({uuid:e,name:t})}async getLayoutByViewIdentity(e){this.wire.sendAction("layout-get-by-view-identity").catch((()=>{}));let t=await this.wire.environment.getViewWindowIdentity(this.fin,e);t.identity&&(t=t.identity);try{const n=this.wrapSync(t),i=await Mi.Layout.getClient(n),r=await i.getLayoutIdentityForViewOrThrow(e);return this.wrapSync(r)}catch(n){if(!["No action registered at target for","getLayoutIdentityForViewOrThrow is not a function"].some((e=>n.message.includes(e))))throw n;if(t.uuid===t.name)throw new Error(`View identity ${JSON.stringify(e)} is not attached to any layout in provider window ${JSON.stringify(t)}.`);return this.wrapSync(t)}}}kn.LayoutModule=Oi,Ci=new WeakMap,bi=new WeakMap,Ii=new WeakMap,vi=new WeakSet,Ei=function(e){if(!xi(this,bi,"f"))throw new Error(`You must call init before using the API ${e}`);return xi(this,bi,"f")},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(kn,e),n(Ln,e)}(jn),Object.defineProperty(Pn,"__esModule",{value:!0}),Pn.PlatformModule=void 0;const Si=d,Ri=Mn,Fi=jn;class ji extends Si.Base{constructor(e,t){super(e),this._channel=t,this.Layout=new Fi.LayoutModule(this.wire)}async init(e){if(!fin.__internal_.isPlatform||fin.me.name!==fin.me.uuid)throw new Error("fin.Platform.init should only be called from a custom platform provider running in the main window of the application.");return this.wire.environment.initPlatform(this.fin,e)}async wrap(e){return this.wire.sendAction("platform-wrap").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}wrapSync(e){return this.wire.sendAction("platform-wrap-sync").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}async getCurrent(){return this.wire.sendAction("platform-get-current").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction("platform-get-current-sync").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}start(e){return this.wire.sendAction("platform-start").catch((e=>{})),new Promise((async(t,n)=>{try{const{uuid:n}=e,i=await this.fin.Application._create({...e,isPlatformController:!0});i.once("platform-api-ready",(()=>t(this.wrapSync({uuid:n})))),i._run({uuid:n})}catch(e){n(e)}}))}startFromManifest(e,t){return this.wire.sendAction("platform-start-from-manifest").catch((e=>{})),new Promise((async(n,i)=>{try{const i=await this.fin.Application._createFromManifest(e);i.once("platform-api-ready",(()=>n(this.wrapSync({uuid:i.identity.uuid})))),i._run(t)}catch(e){i(e)}}))}}Pn.PlatformModule=ji,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Pn,e),n(Mn,e)}(An);var ki={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getMe=e.getBaseMe=e.environmentUnsupportedMessage=void 0;const t=J(),n=un,i=ie(),r=rn;function o(e,t,n){return{...{isView:"view"===e,isWindow:"window"===e,isFrame:"iframe"===e,isExternal:"external connection"===e},uuid:t,name:n,entityType:e}}e.environmentUnsupportedMessage="You are not running in OpenFin.",e.getBaseMe=o,e.getMe=function(s){const{uuid:a,name:c,entityType:d}=s.me,h={setContext(){throw new Error(e.environmentUnsupportedMessage)},addContextHandler(){throw new Error(e.environmentUnsupportedMessage)},getContextGroups(){throw new Error(e.environmentUnsupportedMessage)},joinContextGroup(){throw new Error(e.environmentUnsupportedMessage)},removeFromContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getAllClientsInContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getInfoForContextGroup(){throw new Error(e.environmentUnsupportedMessage)}},l="Interop API has not been instantiated. Either connection has failed or you have not declared interop in your config.",u={setContext(){throw new Error(l)},addContextHandler(){throw new Error(l)},getContextGroups(){throw new Error(l)},joinContextGroup(){throw new Error(l)},removeFromContextGroup(){throw new Error(l)},getAllClientsInContextGroup(){throw new Error(l)},getInfoForContextGroup(){throw new Error(l)}},p={eventNames:()=>{throw new Error(e.environmentUnsupportedMessage)},emit:()=>{throw new Error(e.environmentUnsupportedMessage)},listeners:()=>{throw new Error(e.environmentUnsupportedMessage)},listenerCount:()=>{throw new Error(e.environmentUnsupportedMessage)},on:()=>{throw new Error(e.environmentUnsupportedMessage)},addListener:()=>{throw new Error(e.environmentUnsupportedMessage)},once:()=>{throw new Error(e.environmentUnsupportedMessage)},prependListener:()=>{throw new Error(e.environmentUnsupportedMessage)},prependOnceListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeAllListeners:()=>{throw new Error(e.environmentUnsupportedMessage)}};switch(d){case"view":return Object.assign(new t.View(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case"window":return Object.assign(new i._Window(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case"iframe":return Object.assign(new n._Frame(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case"external connection":return Object.assign(new r.ExternalApplication(s,{uuid:a}),o(d,a,c),{interop:u,isOpenFin:!1});default:return{...o(d,a,c),...p,interop:h,isOpenFin:!1}}}}(ki);var Li={},Ti={},$i={};Object.defineProperty($i,"__esModule",{value:!0}),$i.createWarningObject=$i.createUnusableObject=void 0,$i.createUnusableObject=function(e){const t=()=>{throw new Error(e)};return new Proxy({},{apply:t,construct:t,defineProperty:t,deleteProperty:t,get:t,getOwnPropertyDescriptor:t,getPrototypeOf:t,has:t,isExtensible:t,ownKeys:t,preventExtensions:t,set:t,setPrototypeOf:t})},$i.createWarningObject=function(e,t){return new Proxy(t,{get:(...t)=>(console.warn(e),Reflect.get(...t)),set:(...t)=>(console.warn(e),Reflect.set(...t)),getOwnPropertyDescriptor:(...t)=>(console.warn(e),Reflect.getOwnPropertyDescriptor(...t)),ownKeys:(...t)=>(console.warn(e),Reflect.ownKeys(...t))})};var Bi,Gi={},Wi={};var Hi={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.wrapIntentHandler=e.BROKER_ERRORS=e.generateOverrideWarning=e.generateOverrideError=e.wrapContextHandler=e.wrapInTryCatch=e.generateId=void 0;e.generateId=()=>`${Math.random()}${Date.now()}`;e.wrapInTryCatch=(e,t)=>(...n)=>{try{return e(...n)}catch(e){throw new Error((t||"")+e)}};e.wrapContextHandler=(e,t)=>async n=>{try{await e(n)}catch(e){throw console.error(`Error thrown by handler ${t} for context type ${n.type}: ${e}`),e}};e.generateOverrideError=(e,t)=>`You have tried to to use ${e} but ${t} has not been overridden in the Interop Broker. Please override this function. Refer to our documentation for more info.`;e.generateOverrideWarning=(e,t,n,i)=>{const{uuid:r,name:o}=n;return i?`Entity with identity: ${r}/${o} has called ${i} or ${e} but ${t} has not been overridden.`:`Entity with identity: ${r}/${o} has called ${e} but ${t} has not been overridden.`},e.BROKER_ERRORS={fireIntent:(0,e.generateOverrideError)("fireIntent","handleFiredIntent"),fireIntentForContext:(0,e.generateOverrideError)("fireIntentForContext","handleFiredIntentForContext"),getInfoForIntent:(0,e.generateOverrideError)("getInfoForIntent","handleInfoForIntent"),getInfoForIntentsByContext:(0,e.generateOverrideError)("getInfoForIntentsByContext","handleInfoForIntentsByContext"),joinSessionContextGroupWithJoinContextGroup:"The Context Group you have tried to join is a Session Context Group. Custom Context Groups can only be defined by the Interop Broker through code or manifest configuration. Please use joinSessionContextGroup.",fdc3Open:(0,e.generateOverrideError)("fdc3.open","fdc3HandleOpen"),fdc3FindInstances:(0,e.generateOverrideError)("fdc3.findInstances","fdc3HandleFindInstances"),fdc3GetAppMetadata:(0,e.generateOverrideError)("fdc3.getAppMetadata","fdc3HandleGetAppMetadata"),fdc3GetInfo:(0,e.generateOverrideError)("fdc3.getInfo","fdc3HandleGetInfo")};e.wrapIntentHandler=(e,t)=>async n=>{try{return e(n)}catch(e){throw console.error(`Error thrown by handler ${t}: ${e}`),e}}}(Hi);var Ni,Di,Ui={};function Vi(){if(Di)return Gi;Di=1;var e,t,n,r=s&&s.__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},o=s&&s.__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)},a=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Gi,"__esModule",{value:!0}),Gi.InteropBroker=void 0;const c=d,h=a(function(){if(Bi)return Wi;Bi=1,Object.defineProperty(Wi,"__esModule",{value:!0});const e=Cr();return Wi.default=class{constructor(e,t){this.provider=e,this.id=t,this.lastContext=void 0,this.contextGroupMap=new Map,this.clients=new Map,this.registerListeners()}registerListeners(){this.provider.register(`sessionContextGroup:getContext-${this.id}`,this.getCurrentContext.bind(this)),this.provider.register(`sessionContextGroup:setContext-${this.id}`,this.setContext.bind(this)),this.provider.register(`sessionContextGroup:handlerAdded-${this.id}`,this.handlerAdded.bind(this)),this.provider.register(`sessionContextGroup:handlerRemoved-${this.id}`,this.handlerRemoved.bind(this))}getCurrentContext(e){return e.type?this.contextGroupMap.get(e.type):this.lastContext}setContext(t,n){const{context:i}=t,r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name} not in Session Client State Map`);this.contextGroupMap.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{e.contextHandlers.get(i.type)?.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getClientState(e){return this.clients.get(e.endpointId)}async handlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(i){const e=r.contextHandlers.get(i)||[];r.contextHandlers.set(i,[...e,n]);const o=this.contextGroupMap.get(i);o&&await this.provider.dispatch(t,n,o)}else{r.globalHandler=n;const e=[...this.contextGroupMap.keys()].map((async e=>{const i=this.contextGroupMap.get(e);i&&await this.provider.dispatch(t,n,i)}));await Promise.all(e)}}handlerRemoved(e,t){const{handlerId:n}=e,i=this.clients.get(t.endpointId);i?(Array.from(i.contextHandlers).forEach((([,e])=>{const t=e.indexOf(n);t>-1&&e.splice(t,1)})),i.globalHandler===n&&(i.globalHandler=void 0)):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={contextHandlers:new Map,clientIdentity:e,globalHandler:void 0};this.clients.set(e.endpointId,t)}}onDisconnection(e){this.clients.delete(e.endpointId)}},Wi}()),l=Hi,u=a(i),p=function(){if(Ni)return Ui;Ni=1,Object.defineProperty(Ui,"__esModule",{value:!0}),Ui.PrivateChannelProvider=void 0;const e=Vi();return Ui.PrivateChannelProvider=class t{constructor(e,t){this.provider=e,this.id=t,this.clients=new Map,this.registerListeners(),this.contextByContextType=new Map,this.lastContext=void 0,this.provider.onConnection((e=>this.registerNewClient(e))),this.provider.onDisconnection((async e=>{const{endpointId:t}=e;this.clients.has(t)&&await this.handleClientDisconnecting(e),0===(await this.provider.getAllClientInfo()).length&&this.provider.destroy()}))}getClientState(e){return this.clients.get(e.endpointId)}registerListeners(){this.provider.register("broadcast",this.broadcast.bind(this)),this.provider.register("getCurrentContext",this.getCurrentContext.bind(this)),this.provider.register("contextHandlerAdded",this.contextHandlerAdded.bind(this)),this.provider.register("contextHandlerRemoved",this.contextHandlerRemoved.bind(this)),this.provider.register("nonStandardHandlerRemoved",this.nonStandardHandlerRemoved.bind(this)),this.provider.register("onAddContextHandlerAdded",this.onAddContextHandlerAdded.bind(this)),this.provider.register("onDisconnectHandlerAdded",this.onDisconnectHandlerAdded.bind(this)),this.provider.register("onUnsubscribeHandlerAdded",this.onUnsubscribeHandlerAdded.bind(this)),this.provider.register("clientDisconnecting",((e,t)=>{this.handleClientDisconnecting(t)}))}broadcast(t,n){const{context:i}=t;if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name}, tried to call broadcast, is not connected to this Private Channel`);const r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to broadcast - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);this.contextByContextType.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{const t=e.handlerIdsByContextTypes.get(i.type);t&&t.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getCurrentContext(e,t){const{contextType:n}=e;if(!this.getClientState(t))throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call getCurrentContext, is not connected to this Private Channel`);if(void 0!==n){return this.contextByContextType.get(n)||null}return this.lastContext?this.lastContext:null}contextHandlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call addContextListener, is not connected to this Private Channel`);if(i){const e=r.handlerIdsByContextTypes.get(i)||[];r.handlerIdsByContextTypes.set(i,[...e,n])}else r.globalHandler=n;Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&e.onAddContextListenerHandlerId&&this.provider.dispatch(e.clientIdentity,e.onAddContextListenerHandlerId,i)}))}async contextHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);if(i){let e;if(i.globalHandler===n)i.globalHandler=void 0;else for(const[t,r]of i.handlerIdsByContextTypes){const i=r.indexOf(n);i>-1&&(r.splice(i,1),e=t)}const r=(await this.getConnectedClients()).map((async n=>{const{clientIdentity:i,clientIdentity:{endpointId:r},onUnsubscribeHandlerId:o}=n;r!==t.endpointId&&o&&await this.provider.dispatch(i,o,e)}));try{await Promise.all(r)}catch(e){throw console.error(`Problem when attempting to dispatch to onUnsubscribeHandlers. Error: ${e} Removing Client: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}`),new Error(e)}}else console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}.`)}nonStandardHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);i?i.onDisconnectHandlerId===n?i.onDisconnectHandlerId=void 0:i.onAddContextListenerHandlerId===n?i.onAddContextListenerHandlerId=void 0:i.onUnsubscribeHandlerId===n&&(i.onUnsubscribeHandlerId=void 0):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}onAddContextHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onAddContextListener, is not connected to this Private Channel`);n.onAddContextListenerHandlerId=i,Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&Array.from(e.handlerIdsByContextTypes.keys()).forEach((e=>{this.provider.dispatch(t,i,e)}))}))}onDisconnectHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onDisconnect, is not connected to this Private Channel`);n.onDisconnectHandlerId=i}onUnsubscribeHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onUnsubscribe, is not connected to this Private Channel`);n.onUnsubscribeHandlerId=i}removeClient(e){const t=this.getClientState(e);if(!t)throw new Error(`Client with Identity: ${e.uuid} ${e.name}, tried to call disconnect, is not connected to this Private Channel`);t.handlerIdsByContextTypes.clear(),this.clients.delete(e.endpointId)}async fireOnDisconnectForOtherClients(e){const{endpointId:t}=e,n=(await this.getConnectedClients()).map((async e=>{const{clientIdentity:{endpointId:n},onDisconnectHandlerId:i}=e;n!==t&&i&&await this.provider.dispatch(e.clientIdentity,i)}));try{await Promise.all(n)}catch(t){throw console.error(`Problem when attempting to dispatch to onDisconnectHandlers. Error: ${t} Disconnecting Client: uuid: ${e.uuid}. name: ${e.name}. endpointId: ${e.endpointId}`),new Error(t)}}async unsubscribeAll(e){const{endpointId:t}=e,n=this.clients.get(t);if(n){const t=Array.from(n.handlerIdsByContextTypes.values()).flat(),i=n.globalHandler;if(t.length>0){const n=t.map((async t=>this.contextHandlerRemoved({handlerId:t},e)));try{await Promise.all(n)}catch(e){console.error(e.message)}}if(i)try{await this.contextHandlerRemoved({handlerId:i},e)}catch(e){console.error(e.message)}}}async handleClientDisconnecting(e){await this.unsubscribeAll(e),this.removeClient(e),await this.fireOnDisconnectForOtherClients(e)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={clientIdentity:e,handlerIdsByContextTypes:new Map,globalHandler:void 0,onAddContextListenerHandlerId:void 0,onUnsubscribeHandlerId:void 0,onDisconnectHandlerId:void 0};this.clients.set(e.endpointId,t)}}async getConnectedClients(){const e=await this.provider.getAllClientInfo();return Array.from(this.clients.values()).filter((t=>{const{uuid:n,name:i}=t.clientIdentity;return e.some((e=>i===e.name&&n===e.uuid))}))}static init(e,n){return new t(e,n)}},Ui}(),w=G,y=[{id:"green",displayMetadata:{color:"#00CC88",name:"green"}},{id:"purple",displayMetadata:{color:"#8C61FF",name:"purple"}},{id:"orange",displayMetadata:{color:"#FF8C4C",name:"orange"}},{id:"red",displayMetadata:{color:"#FF5E60",name:"red"}},{id:"pink",displayMetadata:{color:"#FF8FB8",name:"pink"}},{id:"yellow",displayMetadata:{color:"#E9FF8F",name:"yellow"}}];let f=class i extends c.Base{constructor(i,s,a){super(i),e.set(this,void 0),t.set(this,void 0),n.set(this,void 0),this.getProvider=()=>o(this,n,"f").getValue(),this.interopClients=new Map,this.contextGroupsById=new Map,r(this,t,a.contextGroups??[...y],"f"),r(this,e,a.fdc3Info,"f"),a?.logging&&(this.logging=a.logging),this.intentClientMap=new Map,this.lastContextMap=new Map,this.sessionContextGroupMap=new Map,r(this,n,new w.Lazy(s),"f"),this.setContextGroupMap(),this.setupChannelProvider()}static createClosedConstructor(...e){return class extends i{constructor(...t){if(t.length){const[n,i,r]=t;if(r&&"object"==typeof r&&!(0,u.default)(r,e[2]))return console.warn("You have modified the parameters of the InteropOverride constructor. This behavior is deprecated and will be removed in a future version. You can modify these options in your manifest. Please consult our Interop docs for guidance on migrating to the new override scheme."),void super(e[0],e[1],r);console.warn("You are attempting to pass arguments to the InteropOverride constructor. This is not necessary, and these passed arguments will be ignored. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.")}super(...e)}}}setContext({context:e},t){this.wire.sendAction("interop-broker-set-context").catch((e=>{}));const n=this.getClientState(t);if(!n||!n.contextGroupId)throw n?new Error("You must join a context group before you can set context."):new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);{const{contextGroupId:t}=n;this.setContextForGroup({context:e},t)}}setContextForGroup({context:e},t){this.wire.sendAction("interop-broker-set-context-for-group").catch((e=>{}));const n=this.contextGroupsById.get(t);if(!n)throw new Error(`Unable to set context for context group that isn't in the context group mapping: ${t}.`);const r=i.checkContextIntegrity(e);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(e)}`);const o=e.type;n.set(o,e),this.lastContextMap.set(t,o);Array.from(this.interopClients.values()).filter((e=>e.contextGroupId===t)).forEach((t=>{for(const[,n]of t.contextHandlers)i.isContextTypeCompatible(o,n.contextType)&&this.invokeContextHandler(t.clientIdentity,n.handlerId,e)}))}getCurrentContext(e,t){this.wire.sendAction("interop-broker-get-current-context").catch((e=>{}));const n=this.getClientState(t);if(!n?.contextGroupId)throw new Error("You must be a member of a context group to call getCurrentContext");const{contextGroupId:i}=n,r=this.contextGroupsById.get(i),o=this.lastContextMap.get(i),s=e?.contextType??o;return r&&s?r.get(s):void 0}async joinContextGroup({contextGroupId:e,target:t},n){if(this.wire.sendAction("interop-broker-join-context-group").catch((e=>{})),this.sessionContextGroupMap.has(e))throw new Error(l.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup);if(t){i.hasEndpointId(t)&&await this.addClientToContextGroup({contextGroupId:e},t);try{const n=this.channel.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name));if(!n.length)throw new Error(`Given Identity ${t.uuid} ${t.name} is not connected to the Interop Broker.`);n.length>1&&console.warn(`More than one connection found for identity ${t.uuid} ${t.name}`);const i=[];for(const t of n)i.push(this.addClientToContextGroup({contextGroupId:e},t));await Promise.all(i)}catch(e){throw new Error(e)}}else await this.addClientToContextGroup({contextGroupId:e},n)}async addClientToContextGroup({contextGroupId:e},t){this.wire.sendAction("interop-broker-add-client-to-context-group").catch((e=>{}));const n=this.getClientState(t);if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(!this.getContextGroups().find((t=>t.id===e)))throw new Error(`Attempting to join a context group that does not exist: ${e}. You may only join existing context groups.`);if(n.contextGroupId!==e){n.contextGroupId=e,await this.setCurrentContextGroupInClientOptions(t,e);const i=this.contextGroupsById.get(e);for(const[,e]of n.contextHandlers){const{contextType:n,handlerId:r}=e;if(void 0===n)i.forEach(((e,n)=>{this.invokeContextHandler(t,r,e)}));else if(i.has(n)){const e=i.get(n);e&&this.invokeContextHandler(t,r,e)}}}}async removeFromContextGroup({target:e},t){if(this.wire.sendAction("interop-broker-remove-from-context-group").catch((e=>{})),e){i.hasEndpointId(e)&&await this.removeClientFromContextGroup(e);try{const t=this.channel.connections.filter((t=>t.uuid===e.uuid&&t.name===e.name));if(!t.length)throw new Error(`No connection found for given Identity ${e.uuid} ${e.name}`);t.length>1&&console.warn(`More than one connection found for identity ${e.uuid} ${e.name}`);const n=[];for(const e of t)n.push(this.removeClientFromContextGroup(e));await Promise.all(n)}catch(e){throw new Error(e)}}else await this.removeClientFromContextGroup(t)}async removeClientFromContextGroup(e){this.wire.sendAction("interop-broker-remove-client-from-context-group").catch((e=>{}));const t=this.getClientState(e);t&&(t.contextGroupId=void 0),await this.setCurrentContextGroupInClientOptions(e,null)}getContextGroups(){return this.wire.sendAction("interop-broker-get-context-groups").catch((e=>{})),o(this,t,"f").map((e=>({...e})))}getInfoForContextGroup({contextGroupId:e}){return this.wire.sendAction("interop-broker-get-info-for-context-group").catch((e=>{})),this.getContextGroups().find((t=>t.id===e))}getAllClientsInContextGroup({contextGroupId:e}){this.wire.sendAction("interop-broker-get-all-clients-in-context-group").catch((e=>{}));return Array.from(this.interopClients.values()).filter((t=>t.contextGroupId===e)).map((e=>e.clientIdentity))}async handleFiredIntent(e,t){const n=(0,l.generateOverrideWarning)("fdc3.raiseIntent","InteropBroker.handleFiredIntent",t,"interopClient.fireIntent");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntent)}async setIntentTarget(e,t){this.wire.sendAction("interop-broker-set-intent-target").catch((e=>{}));const n=this.intentClientMap.get(t.name),i=`intent-handler-${e.name}`;if(n){const t=n.get(i);if(t){if(t.pendingIntents.push(e),t.clientIdentity&&t.isReady){const{clientIdentity:e,pendingIntents:n}=t;try{const r=n[n.length-1];await this.invokeIntentHandler(e,i,r),t.pendingIntents=[]}catch(n){console.error(`Error invoking intent handler for client ${e.uuid}/${e.name}/${e.endpointId}`),t.isReady=!1}}}else n.set(i,{isReady:!1,pendingIntents:[e]})}else{this.intentClientMap.set(t.name,new Map);const n=this.intentClientMap.get(t.name);n&&n.set(i,{isReady:!1,pendingIntents:[e]})}}async handleInfoForIntent(e,t){const n=(0,l.generateOverrideWarning)("fdc3.findIntent","InteropBroker.handleInfoForIntent",t,"interopClient.getInfoForIntent");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntent)}async handleInfoForIntentsByContext(e,t){const n=(0,l.generateOverrideWarning)("fdc3.findIntentsByContext","InteropBroker.handleInfoForIntentsByContext",t,"interopClient.getInfoForIntentsByContext");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntentsByContext)}async handleFiredIntentForContext(e,t){const n=(0,l.generateOverrideWarning)("fdc3.raiseIntentForContext","InteropBroker.handleFiredIntentForContext",t,"interopClient.fireIntentForContext");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntentForContext)}async clientDisconnected(e){}async fdc3HandleOpen({app:e,context:t},n){const i=(0,l.generateOverrideWarning)("fdc3.open","InteropBroker.fdc3HandleOpen",n);throw console.warn(i),new Error(l.BROKER_ERRORS.fdc3Open)}async fdc3HandleFindInstances(e,t){const n=(0,l.generateOverrideWarning)("fdc3.open","InteropBroker.fdc3HandleFindInstances",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3FindInstances)}async fdc3HandleGetAppMetadata(e,t){const n=(0,l.generateOverrideWarning)("fdc3.getAppMetadata","InteropBroker.fdc3HandleGetAppMetadata",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3GetAppMetadata)}async invokeContextHandler(e,t,n){const i=await this.getProvider();try{await i.dispatch(e,t,n)}catch(i){console.error(`Error invoking context handler ${t} for context type ${n.type} in client ${e.uuid}/${e.name}/${e.endpointId}`,i)}}async invokeIntentHandler(e,t,n){const i=await this.getProvider();await i.dispatch(e,t,n)}async fdc3HandleGetInfo(t,n){const{fdc3Version:i}=t;return{fdc3Version:i,...o(this,e,"f"),optionalFeatures:{OriginatingAppMetadata:!1,UserChannelMembershipAPIs:!0},appMetadata:{appId:"",instanceId:""}}}async getAllClientInfo(){return(await this.getProvider()).getAllClientInfo()}decorateSnapshot(e){return{...e,interopSnapshotDetails:{contextGroupStates:this.getContextGroupStates()}}}applySnapshot(e,t){const n=e?.interopSnapshotDetails?.contextGroupStates;n&&(t?.closeExistingWindows||this.updateExistingClients(n),this.rehydrateContextGroupStates(n))}updateExistingClients(e){this.interopClients.forEach((t=>{const{clientIdentity:n,contextGroupId:r,contextHandlers:o}=t;if(r){const t=e[r];for(const[,e]of Object.entries(t))o.forEach((t=>{const{handlerId:r,contextType:o}=t;i.isContextTypeCompatible(e.type,o)&&this.invokeContextHandler(n,r,e)}))}}))}getContextGroupStates(){return i.toObject(this.contextGroupsById)}rehydrateContextGroupStates(e){const t=Object.entries(e);for(const[e,n]of t){const t=Object.entries(n);for(const[n,i]of t)if(this.contextGroupsById.has(e)){this.contextGroupsById.get(e).set(n,i)}else console.warn(`Attempting to set a context group that isn't in the context group mapping. Skipping context group rehydration for: ${e}`)}}contextHandlerRegistered({contextType:e,handlerId:t},n){const i={contextType:e,handlerId:t},r=this.getClientState(n);if(r?.contextHandlers.set(t,i),r&&r.contextGroupId){const{contextGroupId:i}=r,o=this.contextGroupsById.get(i);if(void 0===e)o.forEach(((e,i)=>{this.invokeContextHandler(n,t,e)}));else if(o.has(e)){const i=o.get(e);i&&this.invokeContextHandler(n,t,i)}}}async intentHandlerRegistered(e,t){const{handlerId:n}=e,i=this.intentClientMap.get(t.name),r=i?.get(n);if(i)if(r){const{pendingIntents:e}=r;r.clientIdentity=t,r.isReady=!0;try{if(e.length>0){const i=e[e.length-1];await this.invokeIntentHandler(t,n,i),r.pendingIntents=[]}}catch(e){console.error(`Error invoking intent handler: ${n} for client ${t.uuid}/${t.name}/${t.endpointId}`)}}else i.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t});else{this.intentClientMap.set(t.name,new Map);const e=this.intentClientMap.get(t.name);e&&e.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t})}}removeContextHandler({handlerId:e},t){const n=this.getClientState(t);n&&n.contextHandlers.delete(e)}handleJoinSessionContextGroup({sessionContextGroupId:e},t){try{if(!e)throw new Error("Failed to join session context group: must specify group id.");const n=this.sessionContextGroupMap.get(e);if(n)n.registerNewClient(t);else{const n=new h.default(this.channel,e);n.registerNewClient(t),this.sessionContextGroupMap.set(e,n)}return{hasConflict:this.contextGroupsById.has(e)}}catch(e){throw new Error(e)}}getClientState(e){return this.interopClients.get(e.endpointId)}static toObject(e){const t=Object.fromEntries(e),n={};return Object.entries(t).forEach((([e,t])=>{const i=Object.fromEntries(t);n[e]=i})),n}static checkContextIntegrity(e){if(!e)return{isValid:!1,reason:"No context supplied"};if("object"!=typeof e)return{isValid:!1,reason:"Context must be an Object"};if(!e.type)return{isValid:!1,reason:"Context must have a type property"};if(e.id&&"object"!=typeof e.id)return{isValid:!1,reason:"Context id must be an Object populated with key-value identifiers (if set)"};if(e.id){const{id:t}=e,n=Object.keys(t);let i=!1;if(!n.length)return{isValid:!1,reason:"Context id must have at least one key-value identifier"};if(n.forEach((e=>{"string"==typeof e&&"string"==typeof t[e]||(i=!0)})),i)return{isValid:!1,reason:"Context id key-value identifiers must be of type string"}}return e.name&&"string"!=typeof e.name?{isValid:!1,reason:"Context name must be of string type (if set)"}:{isValid:!0}}static hasEndpointId(e){return void 0!==e.endpointId}static isContextTypeCompatible(e,t){return void 0===t||e===t}setContextGroupMap(){for(const e of this.getContextGroups())this.contextGroupsById.set(e.id,new Map)}async setCurrentContextGroupInClientOptions(e,t){try{const n=await this.fin.System.getEntityInfo(e.uuid,e.name);let i;"view"===n.entityType?i=await this.fin.View.wrap(e):"window"===n.entityType&&(i=await this.fin.Window.wrap(e)),i&&await i.updateOptions({interop:{currentContextGroup:t}})}catch(e){}}async setupChannelProvider(){try{const e=await this.getProvider();this.channel=e,this.wireChannel(e)}catch(e){throw new Error(`Error setting up Interop Broker Channel Provider: ${e}`)}}wireChannel(e){e.onConnection((async(e,t)=>{if(!await this.isConnectionAuthorized(e,t))throw new Error(`Connection not authorized for ${e.uuid}, ${e.name}`);if(!e.endpointId)throw new Error("Version too old to be compatible with Interop. Please upgrade your runtime to a more recent version.");const n={contextGroupId:void 0,contextHandlers:new Map,clientIdentity:e};t?.currentContextGroup&&this.contextGroupsById.has(t.currentContextGroup)&&(n.contextGroupId=t?.currentContextGroup),this.interopClients.set(e.endpointId,n)})),e.onDisconnection((e=>{this.interopClients.delete(e.endpointId);const t=this.intentClientMap.get(e.name);t&&e.uuid===this.fin.me.uuid&&t.forEach((e=>{e.isReady=!1})),this.sessionContextGroupMap.forEach((t=>{t.onDisconnection(e)})),this.clientDisconnected(e)})),e.beforeAction((async(e,t,n)=>{if(!await this.isActionAuthorized(e,t,n))throw new Error(`Action (${e}) not authorized for ${n.uuid}, ${n.name}`);this.logging?.beforeAction?.enabled&&console.log(e,t,n)})),e.afterAction(((e,t,n)=>{this.logging?.afterAction?.enabled&&console.log(e,t,n)})),e.register("setContext",this.setContext.bind(this)),e.register("fireIntent",this.handleFiredIntent.bind(this)),e.register("getCurrentContext",this.getCurrentContext.bind(this)),e.register("getInfoForIntent",this.handleInfoForIntent.bind(this)),e.register("getInfoForIntentsByContext",this.handleInfoForIntentsByContext.bind(this)),e.register("fireIntentForContext",this.handleFiredIntentForContext.bind(this)),e.register("getContextGroups",this.getContextGroups.bind(this)),e.register("joinContextGroup",this.joinContextGroup.bind(this)),e.register("removeFromContextGroup",this.removeFromContextGroup.bind(this)),e.register("getAllClientsInContextGroup",this.getAllClientsInContextGroup.bind(this)),e.register("getInfoForContextGroup",this.getInfoForContextGroup.bind(this)),e.register("contextHandlerRegistered",this.contextHandlerRegistered.bind(this)),e.register("intentHandlerRegistered",this.intentHandlerRegistered.bind(this)),e.register("removeContextHandler",this.removeContextHandler.bind(this)),e.register("sessionContextGroup:createIfNeeded",this.handleJoinSessionContextGroup.bind(this)),e.register("fdc3Open",this.fdc3HandleOpen.bind(this)),e.register("fdc3v2FindIntentsByContext",this.handleInfoForIntentsByContext.bind(this)),e.register("fdc3FindInstances",this.fdc3HandleFindInstances.bind(this)),e.register("fdc3GetAppMetadata",this.fdc3HandleGetAppMetadata.bind(this)),e.register("fdc3v2GetInfo",(async(e,t)=>this.fdc3HandleGetInfo.bind(this)(e,t))),e.register("createPrivateChannelProvider",(async e=>{const{channelId:t}=e,n=await this.fin.InterApplicationBus.Channel.create(t);p.PrivateChannelProvider.init(n,t)}))}isConnectionAuthorized(e,t){return this.wire.sendAction("interop-broker-is-connection-authorized").catch((e=>{})),Promise.resolve(!0)}isActionAuthorized(e,t,n){return this.wire.sendAction("interop-broker-is-action-authorized").catch((e=>{})),Promise.resolve(!0)}};return Gi.InteropBroker=f,e=new WeakMap,t=new WeakMap,n=new WeakMap,Gi}var zi,Ki={},qi={},Ji=s&&s.__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},Yi=s&&s.__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)};Object.defineProperty(qi,"__esModule",{value:!0});const Zi=d,Qi=Hi;class Xi extends Zi.Base{constructor(e,t,n){super(e),zi.set(this,void 0),this.id=n,Ji(this,zi,t,"f")}async setContext(e){this.wire.sendAction("interop-session-context-group-set-context").catch((e=>{}));return(await Yi(this,zi,"f")).dispatch(`sessionContextGroup:setContext-${this.id}`,{sessionContextGroupId:this.id,context:e})}async getCurrentContext(e){this.wire.sendAction("interop-session-context-group-get-context").catch((e=>{}));return(await Yi(this,zi,"f")).dispatch(`sessionContextGroup:getContext-${this.id}`,{sessionContextGroupId:this.id,type:e})}async addContextHandler(e,t){if(this.wire.sendAction("interop-session-context-group-add-handler").catch((e=>{})),"function"!=typeof e)throw new Error("Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");const n=await Yi(this,zi,"f");let i;return i=t?`sessionContextHandler:invoke-${this.id}-${t}-${(0,Qi.generateId)()}`:`sessionContextHandler:invoke-${this.id}`,n.register(i,(0,Qi.wrapContextHandler)(e,i)),await n.dispatch(`sessionContextGroup:handlerAdded-${this.id}`,{handlerId:i,contextType:t}),{unsubscribe:await this.createUnsubscribeCb(i)}}async createUnsubscribeCb(e){const t=await Yi(this,zi,"f");return async()=>{t.remove(e),await t.dispatch(`sessionContextGroup:handlerRemoved-${this.id}`,{handlerId:e})}}getUserInstance(){return{id:this.id,setContext:(0,Qi.wrapInTryCatch)(this.setContext.bind(this),"Failed to set context: "),getCurrentContext:(0,Qi.wrapInTryCatch)(this.getCurrentContext.bind(this),"Failed to get context: "),addContextHandler:(0,Qi.wrapInTryCatch)(this.addContextHandler.bind(this),"Failed to add context handler: ")}}}qi.default=Xi,zi=new WeakMap;var er={},tr={},nr={},ir={},rr=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),or=s&&s.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),sr=s&&s.__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)&&rr(t,e,n);return or(t,e),t};Object.defineProperty(ir,"__esModule",{value:!0}),ir.PrivateChannelClient=void 0;const ar=sr(Hi);var cr,dr;function hr(){if(cr)return tr;cr=1;var e,t=s&&s.__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)},n=s&&s.__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},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(tr,"__esModule",{value:!0}),tr.FDC3ModuleBase=void 0;const o=nr,a=Hi,c=wr(),d=r(i);return tr.FDC3ModuleBase=class{get client(){return t(this,e,"f").call(this)}get fin(){return this.wire.getFin()}constructor(t,i){this.wire=i,e.set(this,void 0),n(this,e,t,"f")}async broadcast(e){return this.wire.sendAction("fdc3-broadcast").catch((e=>{})),this.client.setContext(e)}async _open(e,t){this.wire.sendAction("fdc3-open").catch((e=>{}));try{return await c.InteropClient.ferryFdc3Call(this.client,"fdc3Open",{app:e,context:t})}catch(e){const t=e.message===a.BROKER_ERRORS.fdc3Open?"ResolverUnavailable":e.message;throw new Error(t)}}async _getChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:"system",...(0,o.getUnsupportedChannelApis)()})))}async getOrCreateChannel(e){this.wire.sendAction("fdc3-get-or-create-channel").catch((e=>{}));const t=(await this._getChannels()).find((t=>t.id===e));if(t)return{...t,type:"system",...(0,o.getUnsupportedChannelApis)()};try{const t=await this.client.joinSessionContextGroup(e);return(0,o.buildAppChannelObject)(t)}catch(e){throw console.error(e.message),new Error(o.ChannelError.CreationFailed)}}async getSystemChannels(){return this.wire.sendAction("fdc3-get-system-channels").catch((e=>{})),this._getChannels()}async joinChannel(e){this.wire.sendAction("fdc3-join-channel").catch((e=>{}));try{return await this.client.joinContextGroup(e)}catch(e){if(e.message===a.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup?console.error("The Channel you have tried to join is an App Channel. Custom Channels can only be defined by the Interop Broker through code or manifest configuration. Please use getOrCreateChannel."):console.error(e.message),e.message.startsWith("Attempting to join a context group that does not exist"))throw new Error(o.ChannelError.NoChannelFound);throw new Error(o.ChannelError.AccessDenied)}}async getCurrentChannel(){this.wire.sendAction("fdc3-get-current-channel").catch((e=>{}));const e=await this.getCurrentContextGroupInfo();return e?this.buildChannelObject(e):null}async leaveCurrentChannel(){return this.wire.sendAction("fdc3-leave-current-channel").catch((e=>{})),this.client.removeFromContextGroup()}async getCurrentContextGroupInfo(){const e=await this.client.getContextGroups(),t=e.map((async e=>this.client.getAllClientsInContextGroup(e.id))),n=(await Promise.all(t)).findIndex((e=>e.some((e=>{const{uuid:t,name:n}=e;return this.wire.me.uuid===t&&this.wire.me.name===n}))));return e[n]}async buildChannelObject(e){return{...e,type:"system",addContextListener:(...[e,t])=>{let n,i;"function"==typeof e?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),n=e):(n=t,"string"==typeof e&&(i=e));const r=(async()=>{let e=!0;const t=await this.client.getCurrentContext(i);return this.client.addContextHandler(((i,r)=>{if(!e||(e=!1,!(0,d.default)(t,i)))return n(i,r)}),i)})();return{...r,unsubscribe:()=>r.then((e=>e.unsubscribe()))}},broadcast:this.broadcast.bind(this),getCurrentContext:async e=>{const t=await this.client.getCurrentContext(e);return void 0===t?null:t}}}},e=new WeakMap,tr}ir.PrivateChannelClient=class{constructor(e,t){this.id=t,this.client=e,this.listeners=new Map}async broadcast(e){return this.client.dispatch("broadcast",{context:e})}async getCurrentContext(e){return this.client.dispatch("getCurrentContext",{contextType:e})}async addContextListener(e,t){if("function"!=typeof t)throw new Error("Non-function argument passed to the second parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");let n;n=e?`contextHandler:invoke-${this.id}-${e}-${ar.generateId()}`:`contextHandler:invoke-${this.id}-${ar.generateId()}`,this.client.register(n,ar.wrapContextHandler(t,n));const i={unsubscribe:await this.createContextUnsubscribeCb(n)};return this.listeners.set(n,i),await this.client.dispatch("contextHandlerAdded",{handlerId:n,contextType:e}),i}createNonStandardUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch("nonStandardHandlerRemoved",{handlerId:e})}}createContextUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch("contextHandlerRemoved",{handlerId:e})}}onAddContextListener(e){const t=`onContextHandlerAdded:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch("onAddContextHandlerAdded",{handlerId:t}),n}onDisconnect(e){const t=`onDisconnect:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch("onDisconnectHandlerAdded",{handlerId:t}),n}onUnsubscribe(e){const t=`onUnsubscribe:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch("onUnsubscribeHandlerAdded",{handlerId:t}),n}async cleanUpAllSubs(){Array.from(this.listeners.keys()).forEach((e=>{this.client.remove(e),this.listeners.delete(e)}))}async disconnect(){try{await this.client.dispatch("clientDisconnecting"),await this.cleanUpAllSubs(),await this.client.disconnect()}catch(e){throw new Error(e.message)}}},function(e){var t=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.getIntentResolution=e.isChannel=e.isContext=e.connectPrivateChannel=e.buildAppChannelObject=e.buildPrivateChannelObject=e.ChannelError=e.ResultError=e.UnsupportedChannelApiError=e.getUnsupportedChannelApis=void 0;const n=Hi,r=ir,o=t(i);e.getUnsupportedChannelApis=e=>({addContextListener:()=>{throw new a("Channel.addContextListener",e)},broadcast:()=>{throw new a("Channel.broadcast",e)},getCurrentContext:()=>{throw new a("Channel.getCurrentContext",e)}});class a extends Error{constructor(e,t="System"){super(e),this.message=`Calling ${e} on an instance of a ${t} Channel returned by fdc3.get${t}Channels is not supported. If you would like to use a ${t} Channel, please use fdc3.joinChannel, fdc3.addContextListener, and fdc3.broadcast instead.`}}var c,d;e.UnsupportedChannelApiError=a,function(e){e.NoResultReturned="NoResultReturned",e.IntentHandlerRejected="IntentHandlerRejected"}(c=e.ResultError||(e.ResultError={})),(d=e.ChannelError||(e.ChannelError={})).NoChannelFound="NoChannelFound",d.AccessDenied="AccessDenied",d.CreationFailed="CreationFailed";e.buildPrivateChannelObject=e=>{let t=!1;const n=()=>{if(t)throw new Error("Private Channel Client has been disconnected from the Private Channel")};return{id:e.id,type:"private",broadcast:async t=>(n(),e.broadcast(t)),getCurrentContext:async t=>(n(),e.getCurrentContext(t)),addContextListener:async(t,i)=>{n();let r=i,o=t;"function"==typeof t&&(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),r=t,o=null);return e.addContextListener(o,r)},onAddContextListener:t=>(n(),e.onAddContextListener(t)),disconnect:async()=>(n(),t=!0,e.disconnect()),onDisconnect:t=>(n(),e.onDisconnect(t)),onUnsubscribe:t=>(n(),e.onUnsubscribe(t))}};e.buildAppChannelObject=e=>({id:e.id,type:"app",broadcast:e.setContext,getCurrentContext:async t=>{const n=await e.getCurrentContext(t);return void 0===n?null:n},addContextListener:(t,n)=>{let i,r;"function"==typeof t?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),i=t):(i=n,"string"==typeof t&&(r=t));const s=(async()=>{let t=!0;const n=await e.getCurrentContext(r);return e.addContextHandler(((e,r)=>{if(!t||(t=!1,!(0,o.default)(n,e)))return i(e,r)}),r)})();return{...s,unsubscribe:()=>s.then((e=>e.unsubscribe()))}}});e.connectPrivateChannel=async t=>{try{const n=await fin.InterApplicationBus.Channel.connect(t),i=new r.PrivateChannelClient(n,t);return(0,e.buildPrivateChannelObject)(i)}catch(e){throw new Error(`Private Channel with id: ${t} doesn't exist`)}};e.isContext=e=>{if(e&&"object"==typeof e&&"type"in e){const{type:t}=e;return"string"==typeof t}return!1};e.isChannel=e=>{if(e&&"object"==typeof e&&"type"in e&&"id"in e){const{type:t,id:n}=e;return"string"==typeof t&&"string"==typeof n&&("app"===t||"private"===t)}return!1};e.getIntentResolution=async(t,i,r,o)=>{const s=(0,n.generateId)(),a=new Promise(((e,t)=>{fin.InterApplicationBus.subscribe({uuid:"*"},s,(t=>{e(t)})).catch((()=>t(new Error("getResult is not supported in this environment"))))})),d=r?{target:r,intentResolutionResultId:s}:{intentResolutionResultId:s},h=o?{name:o,context:i,metadata:d}:{...i,metadata:d},l=async()=>{let n=await a;if(!n||"object"!=typeof n)throw new Error(c.NoResultReturned);const{error:i}=n;if(i)throw new Error(c.IntentHandlerRejected);if((0,e.isChannel)(n)){const{id:i,type:r}=n;switch(r){case"private":n=await(0,e.connectPrivateChannel)(i);break;case"app":{const r=await t.joinSessionContextGroup(i);n=(0,e.buildAppChannelObject)(r);break}}}else if(!(0,e.isContext)(n))throw new Error(c.NoResultReturned);return n},u=o?await t.fireIntent(h):await t.fireIntentForContext(h);return"object"!=typeof u?{source:{appId:"",instanceId:""},intent:"",version:"2.0",getResult:l}:{...u,getResult:l}}}(nr);var lr,ur,pr={};function wr(){if(ur)return Ki;ur=1;var e,t,n=s&&s.__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},i=s&&s.__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)},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ki,"__esModule",{value:!0}),Ki.InteropClient=void 0;const o=d,a=r(qi),c=function(){if(dr)return er;dr=1,Object.defineProperty(er,"__esModule",{value:!0}),er.Fdc3Module=void 0;const e=Hi,t=hr();class n extends t.FDC3ModuleBase{async open(e,t){await super._open(e,t)}addContextListener(e,t){let n;return this.wire.sendAction("fdc3-add-context-listener").catch((e=>{})),"function"==typeof e?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),n=this.client.addContextHandler(e)):n=this.client.addContextHandler(t,null===e?void 0:e),{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}addIntentListener(e,t){this.wire.sendAction("fdc3-add-intent-listener").catch((e=>{}));const n=this.client.registerIntentHandler((e=>{const{context:n,metadata:i}=e,{metadata:r}=n,o=i?.intentResolutionResultId||r?.intentResolutionResultId;o&&this.fin.InterApplicationBus.publish(o,null).catch((()=>null)),t(e.context)}),e,{fdc3Version:"1.2"});return{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}async raiseIntent(t,n,i){this.wire.sendAction("fdc3-raise-intent").catch((e=>{}));const r=i?{name:t,context:n,metadata:{target:i}}:{name:t,context:n};try{return await this.client.fireIntent(r)}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntent?"ResolverUnavailable":t.message;throw new Error(n)}}async findIntent(t,n){this.wire.sendAction("fdc3-find-intent").catch((e=>{}));try{return await this.client.getInfoForIntent({name:t,context:n})}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntent?"ResolverUnavailable":t.message;throw new Error(n)}}async findIntentsByContext(t){this.wire.sendAction("fdc3-find-intents-by-context").catch((e=>{}));try{return await this.client.getInfoForIntentsByContext(t)}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntentsByContext?"ResolverUnavailable":t.message;throw new Error(n)}}async raiseIntentForContext(t,n){this.wire.sendAction("fdc3-raise-intent-for-context").catch((e=>{}));try{return await this.client.fireIntentForContext({...t,metadata:{target:n}})}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntentForContext?"ResolverUnavailable":t.message;throw new Error(n)}}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}getInfo(){return this.wire.sendAction("fdc3-get-info").catch((e=>{})),{providerVersion:this.wire.environment.getAdapterVersionSync(),provider:`openfin-${this.wire.me.uuid}`,fdc3Version:"1.2"}}}return er.Fdc3Module=n,er}(),h=function(){if(lr)return pr;lr=1,Object.defineProperty(pr,"__esModule",{value:!0}),pr.Fdc3Module2=void 0;const e=hr(),t=Hi,n=wr(),i=nr,r=ir;class o extends e.FDC3ModuleBase{async open(e,t){return"string"==typeof e&&console.warn("Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string })."),super._open(e,t)}async findInstances(e){this.wire.sendAction("fdc3-find-instances").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,"fdc3FindInstances",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3FindInstances?"ResolverUnavailable":e.message;throw new Error(n)}}async getAppMetadata(e){this.wire.sendAction("fdc3-get-app-metadata").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,"fdc3GetAppMetadata",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3GetAppMetadata?"ResolverUnavailable":e.message;throw new Error(n)}}async addContextListener(e,t){this.wire.sendAction("fdc3-add-context-listener").catch((e=>{}));const n=e=>t=>{const{contextMetadata:n,...i}=t,r=n?[{...i},n]:[t,null];e(...r)};let i=t,r=n(i);return"function"==typeof e?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),i=e,r=n(i),this.client.addContextHandler(r)):this.client.addContextHandler(r,null===e?void 0:e)}async findIntent(e,n,i){this.wire.sendAction("fdc3-find-intent").catch((e=>{}));try{return await this.client.getInfoForIntent({name:e,context:n,metadata:{resultType:i}})}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntent?"ResolverUnavailable":e.message;throw new Error(n)}}async findIntentsByContext(e,i){this.wire.sendAction("fdc3-find-intents-by-context").catch((e=>{}));const r=i?{context:e,metadata:{resultType:i}}:e;try{return await n.InteropClient.ferryFdc3Call(this.client,"fdc3v2FindIntentsByContext",r)}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntentsByContext?"ResolverUnavailable":e.message;throw new Error(n)}}async raiseIntent(e,n,r){this.wire.sendAction("fdc3-raise-intent").catch((e=>{}));try{return"string"==typeof r&&console.warn("Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string })."),(0,i.getIntentResolution)(this.client,n,r,e)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?"ResolverUnavailable":e.message;throw new Error(n)}}async raiseIntentForContext(e,n){this.wire.sendAction("fdc3-raise-intent-for-context").catch((e=>{}));try{return"string"==typeof n&&console.warn("Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string })."),(0,i.getIntentResolution)(this.client,e,n)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?"ResolverUnavailable":e.message;throw new Error(n)}}async addIntentListener(e,t){if(this.wire.sendAction("fdc3-add-intent-listener").catch((e=>{})),"string"!=typeof e)throw new Error("First argument must be an Intent name");return this.client.registerIntentHandler((async e=>{let n,i;const{context:r,metadata:o}=e,{contextMetadata:s,metadata:a,...c}=r,d=o?.intentResolutionResultId||a?.intentResolutionResultId;try{const e=a?{metadata:a,...c}:{...c};n=await t(e,s),i=n}catch(e){n=e,i={error:!0}}if(d&&this.fin.InterApplicationBus.publish(d,i).catch((()=>null)),n instanceof Error)throw new Error(n.message);return n}),e,{fdc3Version:"2.0"})}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}async createPrivateChannel(){const e=(0,t.generateId)();await n.InteropClient.ferryFdc3Call(this.client,"createPrivateChannelProvider",{channelId:e});const o=await this.fin.InterApplicationBus.Channel.connect(e),s=new r.PrivateChannelClient(o,e);return(0,i.buildPrivateChannelObject)(s)}async getUserChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:"user",...(0,i.getUnsupportedChannelApis)("User")})))}async getSystemChannels(){return console.warn("This API has been deprecated. Please use fdc3.getUserChannels instead."),super.getSystemChannels()}async joinUserChannel(e){return super.joinChannel(e)}async joinChannel(e){return console.warn("This API has been deprecated. Please use fdc3.joinUserChannel instead."),super.joinChannel(e)}async getCurrentChannel(){const e=await super.getCurrentChannel();return e?{...e,type:"user",broadcast:this.broadcast.bind(this)}:null}async getInfo(){return n.InteropClient.ferryFdc3Call(this.client,"fdc3v2GetInfo",{fdc3Version:"2.0"})}}return pr.Fdc3Module2=o,pr}(),l=Hi;let u=class extends o.Base{constructor(i,r){super(i),e.set(this,void 0),t.set(this,void 0),n(this,t,new Map,"f"),n(this,e,r,"f")}async setContext(t){this.wire.sendAction("interop-client-set-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("setContext",{context:t})}async addContextHandler(t,n){if(this.wire.sendAction("interop-client-add-context-handler").catch((e=>{})),"function"!=typeof t)throw new Error("Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");const r=await i(this,e,"f");let o;o=n?`invokeContextHandler-${n}-${(0,l.generateId)()}`:"invokeContextHandler";const s=(0,l.wrapContextHandler)(t,o);return r.register(o,s),await r.dispatch("contextHandlerRegistered",{handlerId:o,contextType:n}),{unsubscribe:async()=>{r.remove(o),await r.dispatch("removeContextHandler",{handlerId:o})}}}async getContextGroups(){this.wire.sendAction("interop-client-get-context-groups").catch((e=>{}));return(await i(this,e,"f")).dispatch("getContextGroups")}async joinContextGroup(t,n){this.wire.sendAction("interop-client-join-context-group").catch((e=>{}));const r=await i(this,e,"f");if(!t)throw new Error("No contextGroupId specified for joinContextGroup.");return r.dispatch("joinContextGroup",{contextGroupId:t,target:n})}async removeFromContextGroup(t){this.wire.sendAction("interop-client-remove-from-context-group").catch((e=>{}));return(await i(this,e,"f")).dispatch("removeFromContextGroup",{target:t})}async getAllClientsInContextGroup(t){this.wire.sendAction("interop-client-get-all-clients-in-context-group").catch((e=>{}));const n=await i(this,e,"f");if(!t)throw new Error("No contextGroupId specified for getAllClientsInContextGroup.");return n.dispatch("getAllClientsInContextGroup",{contextGroupId:t})}async getInfoForContextGroup(t){this.wire.sendAction("interop-client-get-info-for-context-group").catch((e=>{}));const n=await i(this,e,"f");if(!t)throw new Error("No contextGroupId specified for getInfoForContextGroup.");return n.dispatch("getInfoForContextGroup",{contextGroupId:t})}async fireIntent(t){this.wire.sendAction("interop-client-fire-intent").catch((e=>{}));return(await i(this,e,"f")).dispatch("fireIntent",t)}async registerIntentHandler(t,n,r){this.wire.sendAction("interop-client-register-intent-handler").catch((e=>{}));const o=await i(this,e,"f"),s=`intent-handler-${n}`,a=(0,l.wrapIntentHandler)(t,s);try{await o.register(s,a),await o.dispatch("intentHandlerRegistered",{handlerId:s,...r})}catch(e){throw new Error("Unable to register intent handler")}return{unsubscribe:async()=>{o.remove(s)}}}async getCurrentContext(t){this.wire.sendAction("interop-client-get-current-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("getCurrentContext",{contextType:t})}async getInfoForIntent(t){this.wire.sendAction("interop-client-get-info-for-intent").catch((e=>{}));return(await i(this,e,"f")).dispatch("getInfoForIntent",t)}async getInfoForIntentsByContext(t){this.wire.sendAction("interop-client-get-info-for-intents-by-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("getInfoForIntentsByContext",t)}async fireIntentForContext(t){this.wire.sendAction("interop-client-fire-intent-for-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("fireIntentForContext",t)}async joinSessionContextGroup(n){try{const r=i(this,t,"f").get(n);if(r)return r.getUserInstance();const o=await i(this,e,"f"),{hasConflict:s}=await o.dispatch("sessionContextGroup:createIfNeeded",{sessionContextGroupId:n});s&&console.warn(`A (non-session) context group with the name "${n}" already exists. If you are trying to join a Context Group, call joinContextGroup instead.`);const c=new a.default(this.wire,i(this,e,"f"),n);return i(this,t,"f").set(n,c),c.getUserInstance()}catch(e){throw console.error(`Error thrown trying to create Session Context Group with id "${n}": ${e}`),e}}async onDisconnection(t){this.wire.sendAction("interop-client-add-ondisconnection-listener").catch((e=>{}));return(await i(this,e,"f")).onDisconnection((e=>{const{uuid:n}=e;t({type:"interop-broker",topic:"disconnected",brokerName:n})}))}getFDC3Sync(e){switch(e){case"1.2":return new c.Fdc3Module((()=>this),this.wire);case"2.0":return new h.Fdc3Module2((()=>this),this.wire);default:throw new Error(`Invalid FDC3 version provided: ${e}. Must be '1.2' or '2.0'`)}}async getFDC3(e){return this.getFDC3Sync(e)}static async ferryFdc3Call(t,n,r){return(await i(t,e,"f")).dispatch(n,r||null)}};return Ki.InteropClient=u,e=new WeakMap,t=new WeakMap,Ki}var yr,fr,gr,mr={};function vr(){if(yr)return mr;yr=1,Object.defineProperty(mr,"__esModule",{value:!0}),mr.overrideCheck=mr.checkFDC32Overrides=mr.getDefaultViewFdc3VersionFromAppInfo=void 0;const e=Vi();function t(t){return["fdc3HandleFindInstances","handleInfoForIntent","handleInfoForIntentsByContext","fdc3HandleGetAppMetadata","fdc3HandleGetInfo","fdc3HandleOpen","handleFiredIntent","handleFiredIntentForContext"].filter((n=>t[n]===e.InteropBroker.prototype[n]))}return mr.getDefaultViewFdc3VersionFromAppInfo=function({manifest:e,initialOptions:t}){const n=e?.platform?.defaultViewOptions?.fdc3InteropApi??t.defaultViewOptions?.fdc3InteropApi;return["1.2","2.0"].includes(n??"")?n:void 0},mr.checkFDC32Overrides=t,mr.overrideCheck=function(e,n){if(n&&"2.0"===n){const n=t(e);n.length>0&&console.warn(`WARNING: FDC3 2.0 has been set as a default option for Views in this Platform, but the required InteropBroker APIs for FDC3 2.0 compliance have not all been overridden.\nThe following APIs need to be overridden:\n${n.join("\n")}`)}},mr}function Cr(){return gr||(gr=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),i=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),i(function(){if(fr)return Ti;fr=1;var e=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ti,"__esModule",{value:!0}),Ti.InteropModule=void 0;const t=e(n),i=$i,r=d,o=Vi(),a=wr(),c=vr(),h=Tn,l=e=>new e,u="You have attempted to use or modify InteropBroker parameters, which is not allowed. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.";class p extends r.Base{async init(e,n=l){this.wire.sendAction("interop-init").catch((()=>{}));const r=await this.wire.environment.getInteropInfo(this.wire.getFin()),s=(0,i.createUnusableObject)(u),a=(0,i.createWarningObject)(u,(0,t.default)(r)),d=async()=>{throw new Error(u)},p=o.InteropBroker.createClosedConstructor(this.wire,(()=>this.fin.InterApplicationBus.Channel.create(`interop-broker-${e}`)),r);let w;return w=Array.isArray(n)?new((0,h.overrideFromComposables)(...n)(p))(s,d,a):await n(p,s,d,a),(0,c.overrideCheck)(w,r.fdc3Version),w}connectSync(e,t){return this.wire.sendAction("interop-connect-sync").catch((()=>{})),new a.InteropClient(this.wire,this.wire.environment.whenReady().then((()=>this.fin.InterApplicationBus.Channel.connect(`interop-broker-${e}`,{payload:t}))))}}return Ti.InteropModule=p,Ti}(),e),i(wr(),e),i(Vi(),e)}(Li)),Li}var br={},Ir={},Er={},xr={};Object.defineProperty(xr,"__esModule",{value:!0}),xr.getSnapshotSourceChannelName=void 0;xr.getSnapshotSourceChannelName=e=>`snapshot-source-provider-${e.uuid}`;var Ar,Pr,Mr,_r,Or,Sr=s&&s.__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},Rr=s&&s.__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)};Object.defineProperty(Er,"__esModule",{value:!0}),Er.SnapshotSource=void 0;const Fr=d,jr=xr,kr=new Map;class Lr extends Fr.Base{constructor(e,t){super(e),Ar.set(this,void 0),Pr.set(this,(()=>(kr.has(this.identity.uuid)||kr.set(this.identity.uuid,{eventFired:null,clientPromise:null}),kr.get(this.identity.uuid)))),Mr.set(this,(()=>(Rr(this,Pr,"f").call(this).clientPromise||(Rr(this,Pr,"f").call(this).clientPromise=Rr(this,_r,"f").call(this)),Rr(this,Pr,"f").call(this).clientPromise))),_r.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);try{Rr(this,Pr,"f").call(this).eventFired||await Rr(this,Or,"f").call(this);const t=await this.fin.InterApplicationBus.Channel.connect(e,{wait:!1});return t.onDisconnection((()=>{Rr(this,Pr,"f").call(this).clientPromise=null,Rr(this,Pr,"f").call(this).eventFired=null})),t}catch(e){throw Rr(this,Pr,"f").call(this).clientPromise=null,new Error("The targeted SnapshotSource is not currently initialized. Await this object's ready() method.")}})),Or.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);let t,n;const i=new Promise(((e,i)=>{t=e,n=i}));Rr(this,Pr,"f").call(this).eventFired=i;const r=async i=>{try{i.channelName===e&&(t(),await this.fin.InterApplicationBus.Channel.removeListener("connected",r))}catch(e){n(e)}};await this.fin.InterApplicationBus.Channel.on("connected",r)})),Sr(this,Ar,t,"f")}get identity(){return Rr(this,Ar,"f")}async ready(){this.wire.sendAction("snapshot-source-ready").catch((e=>{}));try{await Rr(this,Mr,"f").call(this)}catch(e){await Rr(this,Pr,"f").call(this).eventFired}}async getSnapshot(){this.wire.sendAction("snapshot-source-get-snapshot").catch((e=>{}));const e=await Rr(this,Mr,"f").call(this),t=await e.dispatch("get-snapshot");return(await t).snapshot}async applySnapshot(e){this.wire.sendAction("snapshot-source-apply-snapshot").catch((e=>{}));return(await Rr(this,Mr,"f").call(this)).dispatch("apply-snapshot",{snapshot:e})}}Er.SnapshotSource=Lr,Ar=new WeakMap,Pr=new WeakMap,Mr=new WeakMap,_r=new WeakMap,Or=new WeakMap,Object.defineProperty(Ir,"__esModule",{value:!0}),Ir.SnapshotSourceModule=void 0;const Tr=d,$r=Er,Br=xr;class Gr extends Tr.Base{async init(e){if(this.wire.sendAction("snapshot-source-init").catch((e=>{})),"object"!=typeof e||"function"!=typeof e.getSnapshot||"function"!=typeof e.applySnapshot)throw new Error("you must pass in a valid SnapshotProvider");const t=await this.fin.InterApplicationBus.Channel.create((0,Br.getSnapshotSourceChannelName)(this.fin.me));t.register("get-snapshot",(async()=>({snapshot:await e.getSnapshot()}))),t.register("apply-snapshot",(({snapshot:t})=>e.applySnapshot(t)))}wrapSync(e){return this.wire.sendAction("snapshot-source-wrap-sync").catch((e=>{})),new $r.SnapshotSource(this.wire,e)}async wrap(e){return this.wire.sendAction("snapshot-source-wrap").catch((e=>{})),this.wrapSync(e)}}Ir.SnapshotSourceModule=Gr,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Ir,e),n(Er,e)}(br),Object.defineProperty(a,"__esModule",{value:!0});var Wr=a.Fin=void 0;const Hr=t,Nr=c,Dr=ie(),Ur=Z(),Vr=de,zr=en,Kr=rn,qr=un,Jr=bn,Yr=J(),Zr=An,Qr=ki,Xr=Cr(),eo=br;class to extends Hr.EventEmitter{constructor(e){super(),this.wire=e,this.System=new Nr.System(e),this.Window=new Dr._WindowModule(e),this.Application=new Ur.ApplicationModule(e),this.InterApplicationBus=new Vr.InterApplicationBus(e),this.Clipboard=new zr.Clipboard(e),this.ExternalApplication=new Kr.ExternalApplicationModule(e),this.Frame=new qr._FrameModule(e),this.GlobalHotkey=new Jr.GlobalHotkey(e),this.Platform=new Zr.PlatformModule(e,this.InterApplicationBus.Channel),this.View=new Yr.ViewModule(e),this.Interop=new Xr.InteropModule(e),this.SnapshotSource=new eo.SnapshotSourceModule(e),e.registerFin(this),this.me=(0,Qr.getMe)(e),e.on("disconnected",(()=>{this.emit("disconnected")}))}}Wr=a.Fin=to;var no={},io={};function ro(e){return"string"==typeof e.manifestUrl}function oo(e){return ao(e)&&"string"==typeof e.address}function so(e){return oo(e)&&"string"==typeof e.token}function ao(e){return"string"==typeof e.uuid}function co(e){return e.runtime&&"string"==typeof e.runtime.version}function ho(e){return ao(e)&&co(e)}Object.defineProperty(io,"__esModule",{value:!0}),io.isInternalConnectConfig=io.isPortDiscoveryConfig=io.isNewConnectConfig=io.isConfigWithReceiver=io.isRemoteConfig=io.isExistingConnectConfig=io.isExternalConfig=void 0,io.isExternalConfig=ro,io.isExistingConnectConfig=oo,io.isRemoteConfig=so,io.isConfigWithReceiver=function(e){return"object"==typeof e.receiver&&so({...e,address:""})},io.isNewConnectConfig=ho,io.isPortDiscoveryConfig=function(e){return ro(e)&&co(e)||ho(e)},io.isInternalConnectConfig=function(e){return oo(e)||ho(e)};var lo={},uo={};Object.defineProperty(uo,"__esModule",{value:!0}),uo.EmitterMap=void 0;const po=t;function wo(e){return Buffer.from(e).toString("base64")}uo.EmitterMap=class{constructor(){this.storage=new Map}hashKeys(e){return e.map(wo).join("/")}getOrCreate(e){const t=this.hashKeys(e);return this.storage.has(t)||this.storage.set(t,new po.EventEmitter),this.storage.get(t)}has(e){return this.storage.has(this.hashKeys(e))}delete(e){const t=this.hashKeys(e);return this.storage.delete(t)}},Object.defineProperty(lo,"__esModule",{value:!0});const yo=uo;class fo extends yo.EmitterMap{constructor(){super(...arguments),this.dispatchEvent=e=>{if(function(e){return"process-desktop-event"===e.action}(e)){const{payload:t}=e,n=function(e){const{topic:t}=e;if("frame"===t||"window"===t||"view"===t){const{uuid:n,name:i}=e;return[t,n,i]}if("application"===t){const{uuid:n}=e;return[t,n]}return[t]}(t);if(this.has(n))return this.getOrCreate(n).emit(t.type,t),!0}return!1}}}lo.default=fo;var go,mo,vo=s&&s.__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},Co=s&&s.__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)},bo=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(no,"__esModule",{value:!0});var Io=no.Transport=void 0;const Eo=t,xo=io,Ao=g,Po=bo(lo),Mo=ki,_o=ke;class Oo extends Eo.EventEmitter{constructor(e,t,n){super(),this.wireListeners=new Map,this.topicRefMap=new Map,this.eventAggregator=new Po.default,this.messageHandlers=[this.eventAggregator.dispatchEvent],go.set(this,void 0),mo.set(this,void 0),this.connectSync=()=>{Co(this,go,"f").connectSync()},this.getPort=()=>Co(this,go,"f").getPort(),vo(this,go,new e(this.onmessage.bind(this)),"f"),this.environment=t,this.sendRaw=Co(this,go,"f").send.bind(Co(this,go,"f")),this.registerMessageHandler(this.handleMessage.bind(this)),Co(this,go,"f").on("disconnected",(()=>{for(const[,{handleNack:e}]of this.wireListeners)e({reason:"Remote connection has closed"});this.wireListeners.clear(),this.emit("disconnected")}));const{uuid:i,name:r}=n,o=this.environment.getCurrentEntityType();this.me=(0,Mo.getBaseMe)(o,i,r)}getFin(){if(!Co(this,mo,"f"))throw new Error("No Fin object registered for this transport");return Co(this,mo,"f")}registerFin(e){if(Co(this,mo,"f"))throw new Error("Fin object has already been registered for this transport");vo(this,mo,e,"f")}shutdown(){return Co(this,go,"f").shutdown()}async connect(e){if((0,xo.isConfigWithReceiver)(e))return await Co(this,go,"f").connect(e.receiver),this.authorize(e);if((0,xo.isRemoteConfig)(e))return this.connectRemote(e);if((0,xo.isExistingConnectConfig)(e))return this.connectByPort(e);if((0,xo.isNewConnectConfig)(e)){const t=await this.environment.retrievePort(e);return this.connectByPort({...e,address:`ws://localhost:${t}`})}}async connectRemote(e){return await Co(this,go,"f").connect(new(this.environment.getWsConstructor())(e.address)),this.authorize(e)}async connectByPort(e){const{address:t,uuid:n}=e,i={...e,type:"file-token"},r=Co(this,go,"f");await r.connect(new(this.environment.getWsConstructor())(e.address));const o=await this.sendAction("request-external-authorization",{uuid:n,type:"file-token"},!0);if("external-authorization-response"!==o.action)throw new Ao.UnexpectedActionError(o.action);return await this.environment.writeToken(o.payload.file,o.payload.token),this.authorize(i)}async authorize(e){const t=await this.sendAction("request-authorization",e,!0);if("authorization-response"!==t.action)throw new Ao.UnexpectedActionError(t.action);if(!0!==t.payload.success)throw new Ao.RuntimeError(t.payload)}sendAction(e,t={},n=!1){let i=()=>{};const r=Ao.RuntimeError.getCallSite(1),o=this.environment.getNextMessageId(),s=new Promise(((s,a)=>{i=a;const c={action:e,payload:t,messageId:o},d=Co(this,go,"f");return this.addWireListener(o,s,(e=>this.nackHandler(e,a,r)),n),d.send(c).catch(a)}));return Object.assign(s,{cancel:i,messageId:o})}nackHandler(e,t,n){t("string"==typeof e?e:new Ao.RuntimeError(e,n))}ferryAction(e){return new Promise(((t,n)=>{const i=this.environment.getNextMessageId();e.messageId=i;const r=e=>{t(e.payload)};return Co(this,go,"f").send(e).then((()=>this.addWireListener(i,r,(e=>this.nackHandler(e,n)),!1))).catch(n)}))}registerMessageHandler(e){this.messageHandlers.push(e)}addWireListener(e,t,n,i){i?this.uncorrelatedListener=t:this.wireListeners.has(e)?n({reason:"Duplicate handler id",error:(0,_o.errorToPOJO)(new Ao.DuplicateCorrelationError(String(e)))}):this.wireListeners.set(e,{resolve:t,handleNack:n})}onmessage(e){for(const t of this.messageHandlers)t.call(null,e)}handleMessage(e){const t=e.correlationId||NaN;if("correlationId"in e){if(!this.wireListeners.has(t))return!1;{const{resolve:n,handleNack:i}=this.wireListeners.get(t);"ack"!==e.action?i({reason:"Did not receive ack action",error:(0,_o.errorToPOJO)(new Ao.NoAckError(e.action))}):"payload"in e?e.payload.success?n.call(null,e):i(e.payload):"string"==typeof e.reason?i(e):(console.warn("Received invalid response from core",e),i({reason:"invalid response shape"})),this.wireListeners.delete(t)}}else this.uncorrelatedListener&&this.uncorrelatedListener.call(null,e),this.uncorrelatedListener=()=>{};return!0}}Io=no.Transport=Oo,go=new WeakMap,mo=new WeakMap;const So=(...e)=>({log:(...t)=>console.debug(`[${(new Date).toISOString()}]`,...(e=>e.map((e=>`[${e}]`)))(e),...t),getLogger:(...t)=>So(...e,...t)}),Ro=So("@openfin/core-web/client");function Fo(e,t){if(!function(e){return"string"==typeof e}(e))throw new Error(`Property ${t} has invalid type. Expected string, got ${typeof e}.`)}const jo="web-broker-ports-ready",ko=Ro.getLogger("get-web-interop-ports");function Lo(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)}function To(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}"function"==typeof SuppressedError&&SuppressedError;const $o=e=>{var n,i,r;return r=class extends t.EventEmitter{constructor(t){super(),n.set(this,void 0),i.set(this,!1),this.connectSync=()=>{Lo(this,i,"f")||(e.addEventListener("message",(e=>{e.data?.topic?.startsWith("wire-message")&&e.data.message&&Lo(this,n,"f").call(this,{...JSON.parse(e.data.message),ports:e.ports})})),e.start())},this.connect=async()=>{this.connectSync()},this.send=t=>(e.postMessage({topic:"wire-message",message:JSON.stringify(t)}),Promise.resolve()),this.shutdown=async()=>{e.close()},To(this,n,t,"f")}getPort(){return e}},n=new WeakMap,i=new WeakMap,r};var Bo={},Go={};Object.defineProperty(Go,"__esModule",{value:!0}),Go.BaseEnvironment=void 0;const Wo=vr();Go.BaseEnvironment=class{async getViewWindowIdentity(e,t){const{identity:n}=await e.View.wrapSync(t).getCurrentWindow();return n}async getInteropInfo(e){const t=await e.Application.getCurrentSync().getInfo().catch((()=>null)),n=t?.initialOptions?.interopBrokerConfiguration??{};return{fdc3Version:t?(0,Wo.getDefaultViewFdc3VersionFromAppInfo)(t):void 0,...n,fdc3Info:{providerVersion:await e.System.getVersion(),provider:"OpenFin"}}}},Object.defineProperty(Bo,"__esModule",{value:!0});var Ho=Bo.BrowserEnvironment=void 0;const No=Go;class Do extends No.BaseEnvironment{constructor(){super(...arguments),this.type="other",this.getRandomId=()=>{const e=new Uint32Array(1);return window.crypto.getRandomValues(e)[0].toString(32)}}getAdapterVersionSync(){return""}observeBounds(e,t){throw new Error("Method not implemented.")}layoutAllowedInContext(e){return!1}initLayoutManager(e,t,n){throw new Error("Method not implemented.")}applyLayoutSnapshot(e,t,n){throw new Error("Method not implemented.")}createLayout(e,t){throw new Error("Method not implemented.")}destroyLayout(e,t){throw new Error("Method not implemented.")}resolveLayout(e,t){throw new Error("Method not implemented.")}initPlatform(...e){throw new Error("Method not implemented.")}writeToken(e,t){return Promise.resolve("")}retrievePort(e){throw new Error("Method not implemented.")}getNextMessageId(){return this.getRandomId()}createChildContent(e){throw new Error("Method not implemented.")}getWebWindow(e){throw new Error("Method not implemented.")}getCurrentEntityIdentity(){throw new Error("Method not implemented.")}getCurrentEntityType(){return"external connection"}raiseEvent(e,t){throw new Error("Method not implemented.")}getUrl(){return location.href}getDefaultChannelOptions(){return{create:{},connect:{}}}getRtcPeer(){return new RTCPeerConnection}getWsConstructor(){return WebSocket}whenReady(){return Promise.resolve()}}Ho=Bo.BrowserEnvironment=Do;const Uo=e=>"platform"in e&&void 0!==e.platform;var Vo,zo;class Ko extends Ho{constructor(e){super(),this.connectConfig=e,Vo.set(this,void 0),zo.set(this,new W((async()=>Promise.resolve().then((function(){return __webpack_require__(/*! ./main-b14f67c9.js */ "./node_modules/@openfin/core-web/out/main-b14f67c9.js")}))))),Uo(e)&&this.validatePlatformOptions(e)}getAdapterVersionSync(){return"0.39.21"}validatePlatformOptions({platform:e}){if(!("layoutSnapshot"in e))throw new Error("Platform options are missing layoutSnapshot. Please provide a layoutSnapshot in the platform options.");if("windows"in e||"windows"in e.layoutSnapshot)throw new Error("It appears you tried to call connect() with a snapshot object from an OpenFin desktop environment. Note that connect() expects to be called with a platform property with this structure: { platform: { layoutSnapshot } }. To get a layoutSnapshot of the expected structure, use fin.Platform.Layout.getCurrentLayoutManagerSync().getLayoutSnapshot() in v34+ in your desktop environment.");const{layouts:t}=e.layoutSnapshot;Object.entries(t).map((([e,t])=>{if("object"!=typeof t||null===t)throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must be an object.`);if(!("content"in t))throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must contain a 'content' property.`)}))}async getInteropInfo(e){return{...{contextGroups:void 0,logging:{beforeAction:{enabled:!1},afterAction:{enabled:!1}}},fdc3Version:void 0,fdc3Info:{providerVersion:"0.39.21",provider:"OpenFin Web"}}}layoutAllowedInContext(e){return!0}async initLayoutManager(e,t,n){if(Lo(this,Vo,"f"))throw new Error("Layout already initialized.");if(!Uo(this.connectConfig))throw new Error("Platform options are missing from connection config.");const{WebLayoutEntryPoint:i}=await Lo(this,zo,"f").getValue();return To(this,Vo,new i(this.connectConfig),"f"),await Lo(this,Vo,"f").initLayoutManager(e,t,n)}async applyLayoutSnapshot(e,t,n){Lo(this,Vo,"f")?.applyLayoutSnapshot(e,t,n)}async createLayout(e,t){return Lo(this,Vo,"f")?.createLayout(e,t)}async destroyLayout(e,t){return Lo(this,Vo,"f")?.destroyLayout(e,t)}async getViewWindowIdentity(e,t){return Promise.resolve({uuid:t.uuid,name:t.uuid})}}Vo=new WeakMap,zo=new WeakMap;const qo=()=>{const e=((e,t)=>{const n=new RegExp(`^${t}<(?.*)>$`).exec(e)?.groups?.meta;if(n)try{return JSON.parse(atob(n))}catch(e){throw new Error(`Failed to decode JSON from ${n}.`)}})(window.name,"of-frame");if(e)try{const{name:t,uuid:n,brokerUrl:i,providerId:r,contextGroup:o}=e;return Fo(i,"brokerUrl"),Fo(n,"uuid"),Fo(t,"name"),{identity:{name:t,uuid:n},brokerUrl:i,interopConfig:{providerId:r,currentContextGroup:o}}}catch(e){throw new Error(`Unexpected error occurred when inferring platform information: ${e.stack}`)}},Jo=()=>{const e=r.v4();return{uuid:e,name:e}},Yo=async e=>{if("enabled"===e.connectionInheritance){const t=await(async e=>{const t=qo();if(t){const{validateOptions:n=(()=>!0)}=e,{identity:i,...r}=t;if(!await n(r))throw new Error("Parent options were rejected by validateOptions.");return t}})(e);if(t)return t}if(!e.options){const t="enabled"===e.connectionInheritance?"Broker URL was not specified nor provided by a platform container.":"Connection inheritance is disabled but no options were provided.";throw new Error(t)}return{...e.options,identity:Jo()}};exports.__classPrivateFieldGet=Lo,exports.__classPrivateFieldSet=To,exports.apiExposer=Gn,exports.commonjsGlobal=s,exports.connect=async t=>{try{Ro.log("Establishing connection",t);const{brokerUrl:n,identity:i,timeout:r,interopConfig:s}=await Yo(t),{workerPort:a,iframeBrokerPort:c}=await(async(e,t,n)=>{const{origin:i}=new URL(e),r=document.createElement("IFRAME");let s;r.style.display="none";try{return await new Promise(((a,c)=>{const d=e=>{if(e.source===r.contentWindow&&e.data?.topic===`ack-${jo}`){if(e.origin!==i)c(new Error(`Broker redirected to unexpected origin ${e.origin}, expected ${i}.`));else if(e.data.success){const[t,n]=e.ports;a({iframeBrokerPort:t,workerPort:n})}else c(new m(e.data));window.removeEventListener("message",d),clearTimeout(s)}};window.addEventListener("message",d),ko.log(`Connecting to broker ${e}`),r.setAttribute("src",e),r.setAttribute("name",o(t,"of-broker")),document.body.appendChild(r),ko.log("Iframe loaded, awaiting init message from iframe"),n&&(s=setTimeout((()=>{window.removeEventListener("message",d),document.body.removeChild(r),c(new Error("Worker did not initialize in time"))}),n))}))}catch(e){throw new Error(`Failed to initialise Fin Web Client. ${e.message}`,{cause:e})}})(n,i,r);Ro.log("Successfully established connection to shared worker");const d={entityType:"external connection",...i};a.start(),c.start();const h=((t,n,i)=>{const r=$o(n),o=new Ko(t),s=new Io(r,o,i);return s.connectSync(),window.Buffer=e.Buffer,new Wr(s)})(t,a,d);return s?.providerId&&(h.me.interop=h.Interop.connectSync(s.providerId),s?.currentContextGroup&&h.me.interop.joinContextGroup(s.currentContextGroup).catch((e=>{console.warn(`Error joining specified context group: ${s?.currentContextGroup}, continuing`,e)}))),{...h,me:{...h.me,identity:{uuid:h.me.uuid,name:h.me.name}}}}catch(e){throw new Error(`An error occured during web-interop connection: ${e.message}`)}},exports.decorators=Nn,exports.encodeOptions=o,exports.layout_constants=ai,exports.lazy=G; +var e=__webpack_require__(/*! buffer/ */ "../../node_modules/buffer/index.js"),t=__webpack_require__(/*! events */ "../../node_modules/events/events.js"),n=__webpack_require__(/*! lodash/cloneDeep */ "../../node_modules/lodash/cloneDeep.js"),i=__webpack_require__(/*! lodash/isEqual */ "../../node_modules/lodash/isEqual.js"),r=__webpack_require__(/*! uuid */ "../../node_modules/uuid/dist/esm-browser/index.js");const o=(e,t)=>`${t}<${btoa(JSON.stringify(e))}>`;var s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof __webpack_require__.g?__webpack_require__.g:"undefined"!=typeof self?self:{},a={},c={},d={},h={};async function l(e){const t=[];for(const n of e){const e=await n();t.push(e)}return t}Object.defineProperty(h,"__esModule",{value:!0}),h.promiseMapSerial=h.serial=h.promiseMap=h.promisify=void 0,h.promisify=function(e){return(...t)=>new Promise(((n,i)=>{e(...t,((e,t)=>e?i(e):n(t)))}))},h.promiseMap=async function(e,t){return Promise.all(e.map(t))},h.serial=l,h.promiseMapSerial=async function(e,t){return l(e.map(((e,n,i)=>()=>t(e,n,i))))};var u,p=s&&s.__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},w=s&&s.__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)};Object.defineProperty(d,"__esModule",{value:!0}),d.Reply=d.EmitterBase=d.Base=void 0;const y=h;class f{constructor(e){this.isNodeEnvironment=()=>"node"===this.wire.environment.type,this.isOpenFinEnvironment=()=>"openfin"===this.wire.environment.type,this.isBrowserEnvironment=()=>"other"===this.wire.environment.type,this.wire=e}get fin(){return this.wire.getFin()}get me(){return this.wire.me}}d.Base=f;d.EmitterBase=class extends f{constructor(e,t,...n){super(e),this.topic=t,u.set(this,void 0),this.eventNames=()=>this.hasEmitter()?this.getOrCreateEmitter().eventNames():[],this.emit=(e,t,...n)=>!!this.hasEmitter()&&this.getOrCreateEmitter().emit(e,t,...n),this.hasEmitter=()=>this.wire.eventAggregator.has(w(this,u,"f")),this.getOrCreateEmitter=()=>this.wire.eventAggregator.getOrCreate(w(this,u,"f")),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[],this.listenerCount=e=>this.hasEmitter()?this.getOrCreateEmitter().listenerCount(e):0,this.registerEventListener=async(e,t={},n,i)=>{const r={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e},o=this.getOrCreateEmitter();n(o);try{await this.wire.sendAction("subscribe-to-desktop-event",r)}catch(e){throw i(o),this.deleteEmitterIfNothingRegistered(o),e}},this.deregisterEventListener=async(e,t={})=>{if(this.hasEmitter()){const n={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e};await this.wire.sendAction("unsubscribe-to-desktop-event",n).catch((()=>null));return this.getOrCreateEmitter()}return Promise.resolve()},p(this,u,[t,...n],"f"),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[]}async on(e,t,n){return await this.registerEventListener(e,n,(n=>{n.on(e,t)}),(n=>{n.removeListener(e,t)})),this}async addListener(e,t,n){return this.on(e,t,n)}async once(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.once(e,i),n.once(e,t)}),(n=>{n.removeListener(e,i),n.removeListener(e,t)})),this}async prependListener(e,t,n){return await this.registerEventListener(e,n,(n=>{n.prependListener(e,t)}),(n=>{n.removeListener(e,t)})),this}async prependOnceListener(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.prependOnceListener(e,t),n.once(e,i)}),(n=>{n.removeListener(e,t),n.removeListener(e,i)})),this}async removeListener(e,t,n){const i=await this.deregisterEventListener(e,n);return i&&(i.removeListener(e,t),this.deleteEmitterIfNothingRegistered(i)),this}async deregisterAllListeners(e){const t={...this.identity,type:e,topic:this.topic};if(this.hasEmitter()){const e=this.getOrCreateEmitter(),n=e.listenerCount(t.type),i=[];for(let e=0;enull)));return await Promise.all(i),e}}async removeAllListeners(e){const t=async e=>{const t=await this.deregisterAllListeners(e);t&&(t.removeAllListeners(e),this.deleteEmitterIfNothingRegistered(t))};if(e)await t(e);else if(this.hasEmitter()){const e=this.getOrCreateEmitter().eventNames();await(0,y.promiseMap)(e,t)}return this}deleteEmitterIfNothingRegistered(e){0===e.eventNames().length&&this.wire.eventAggregator.delete(w(this,u,"f"))}},u=new WeakMap;d.Reply=class{};var g={};Object.defineProperty(g,"__esModule",{value:!0});var m=g.RuntimeError=g.NotSupportedError=g.NotImplementedError=g.NoAckError=g.DuplicateCorrelationError=g.UnexpectedActionError=g.DisconnectedError=void 0;class v extends Error{constructor(e){super(`Expected websocket state OPEN but found ${e}`),this.readyState=e}}g.DisconnectedError=v;class C extends Error{}g.UnexpectedActionError=C;class b extends Error{}g.DuplicateCorrelationError=b;class I extends Error{}g.NoAckError=I;class E extends Error{}g.NotImplementedError=E;class x extends Error{}g.NotSupportedError=x;class A extends Error{constructor(e){const{message:t,name:n,stack:i,...r}=e;super(t),this.name=n||"Error",this.stack=i??this.toString(),Object.keys(r).forEach((e=>{this[e]=r[e]}))}}class P extends Error{static getCallSite(e=0){const t=Error.stackTraceLimit,n=e+1;Error.stackTraceLimit=t+n;const i=Error.prepareStackTrace;Error.prepareStackTrace=(e,t)=>t;const r=(new Error).stack?.slice(n)??[];return Error.prepareStackTrace=i,Error.stackTraceLimit=t,r}static prepareStackTrace(e,t){if("function"==typeof Error.prepareStackTrace)return Error.prepareStackTrace(e,t);let n="";n+=e.name||"Error",n+=`: ${e.message||""}`;for(const e of t)n+=`\n at ${e.toString()}`;return n}constructor(e,t){const{reason:n,error:i}=e;super(n),this.name="RuntimeError",i?.stack&&(this.cause=new A(i)),t&&(this.stack=P.prepareStackTrace(this,t))}}m=g.RuntimeError=P;var M={},_={},O={};Object.defineProperty(O,"__esModule",{value:!0}),O.validateIdentity=void 0,O.validateIdentity=function(e){let t;return"object"==typeof e&&"string"==typeof e.uuid||(t="Not a valid identity object"),t};var S={},R={},F={},j={},k={},L={},T={};Object.defineProperty(T,"__esModule",{value:!0}),T.handleDeprecatedWarnings=void 0;var $;T.handleDeprecatedWarnings=e=>{(e.contentNavigation?.whitelist||e.contentNavigation?.blacklist||e.contentRedirect?.whitelist||e.contentRedirect?.blacklist)&&console.warn("The properties 'whitelist' and 'blacklist' have been marked as deprecated and will be removed in a future version. Please use 'allowlist' and 'denylist'.")};var B={},G={};Object.defineProperty(G,"__esModule",{value:!0}),G.AsyncRetryableLazy=W=G.Lazy=void 0;var W=G.Lazy=class{constructor(e){this.producerFn=e}getValue(){return this.value||(this.value=this.producerFn()),this.value}};G.AsyncRetryableLazy=class{constructor(e){this.producerFn=e}async getValue(){return this.promise||(this.promise=this.producerFn().catch((e=>{throw delete this.promise,e}))),this.promise}};var H={};Object.defineProperty(H,"__esModule",{value:!0}),H.WebContents=void 0;const N=d;class D extends N.EmitterBase{constructor(e,t,n){super(e,n,t.uuid,t.name),this.identity=t,this.entityType=n}capturePage(e){return this.wire.sendAction("capture-page",{options:e,...this.identity}).then((({payload:e})=>e.data))}executeJavaScript(e){return this.wire.sendAction("execute-javascript-in-window",{...this.identity,code:e}).then((({payload:e})=>e.data))}getZoomLevel(){return this.wire.sendAction("get-zoom-level",this.identity).then((({payload:e})=>e.data))}setZoomLevel(e){return this.wire.sendAction("set-zoom-level",{...this.identity,level:e}).then((()=>{}))}navigate(e){return this.wire.sendAction("navigate-window",{...this.identity,url:e}).then((()=>{}))}navigateBack(){return this.wire.sendAction("navigate-window-back",{...this.identity}).then((()=>{}))}async navigateForward(){await this.wire.sendAction("navigate-window-forward",{...this.identity})}stopNavigation(){return this.wire.sendAction("stop-window-navigation",{...this.identity}).then((()=>{}))}reload(e=!1){return this.wire.sendAction("reload-window",{ignoreCache:e,...this.identity}).then((()=>{}))}print(e={}){return this.wire.sendAction("print",{...this.identity,options:e}).then((()=>{}))}findInPage(e,t){return this.wire.sendAction("find-in-page",{...this.identity,searchTerm:e,options:t}).then((({payload:e})=>e.data))}stopFindInPage(e){return this.wire.sendAction("stop-find-in-page",{...this.identity,action:e}).then((()=>{}))}getPrinters(){return this.wire.sendAction("get-printers",{...this.identity}).then((({payload:e})=>e.data))}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){await this.wire.sendAction("focus-window",{emitSynthFocused:e,...this.identity})}async showDeveloperTools(){await this.wire.sendAction("show-developer-tools",this.identity)}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction("get-process-info",this.identity);return e}async getSharedWorkers(){return this.wire.sendAction("get-shared-workers",this.identity).then((({payload:e})=>e.data))}async inspectSharedWorker(){await this.wire.sendAction("inspect-shared-worker",{...this.identity})}async inspectSharedWorkerById(e){await this.wire.sendAction("inspect-shared-worker-by-id",{...this.identity,workerId:e})}async inspectServiceWorker(){await this.wire.sendAction("inspect-service-worker",{...this.identity})}async showPopupWindow(e){if(this.wire.sendAction(`${this.entityType}-show-popup-window`,this.identity).catch((()=>{})),e?.onPopupReady){const t=async({popupName:t})=>{try{const n=this.fin.Window.wrapSync({uuid:this.fin.me.uuid,name:t});await e.onPopupReady(n)}catch(e){throw new Error(`Something went wrong during onPopupReady execution: ${e}`)}};await this.once("popup-ready",t)}const{payload:t}=await this.wire.sendAction("try-create-popup-window",{options:{...e,hasResultCallback:!!e?.onPopupResult,hasReadyCallback:!!e?.onPopupReady},...this.identity}),{data:{willOpen:n,options:i}}=t;n&&await this.fin.Window.create(i.initialOptions);if(e?.onPopupResult){const t=async t=>{await e.onPopupResult((e=>{const{name:t,uuid:n,result:i,data:r}=e,o={identity:{name:t,uuid:n},result:i};return r&&(o.data=r),o})(t))},n=async()=>{await this.removeListener("popup-result",t)};await this.on("popup-result",t),await this.once("popup-teardown",n)}const{payload:r}=await this.wire.sendAction("show-popup-window",{options:i,...this.identity});return r.data}}var U,V,z,K,q;function J(){return V||(V=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(function(){if($)return L;$=1,Object.defineProperty(L,"__esModule",{value:!0}),L.ViewModule=void 0;const e=d,t=O,n=J(),i=T;class r extends e.Base{async create(e){const{uuid:t}=this.wire.me;if(!e.name||"string"!=typeof e.name)throw new Error("Please provide a name property as a string in order to create a View.");return(0,i.handleDeprecatedWarnings)(e),this.wire.environment.childViews?await this.wire.environment.createChildContent({entityType:"view",options:{...e,uuid:t}}):await this.wire.sendAction("create-view",{...e,uuid:t}),this.wrapSync({uuid:t,name:e.name})}async wrap(e){this.wire.sendAction("view-wrap").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}wrapSync(e){this.wire.sendAction("view-wrap-sync").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}getCurrent(){if(this.wire.sendAction("view-get-current").catch((e=>{})),!this.wire.me.isView)throw new Error("You are not in a View context");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction("view-get-current-sync").catch((e=>{})),!this.wire.me.isView)throw new Error("You are not in a View context");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return L.ViewModule=r,L}(),e),n(function(){if(U)return B;var e;U=1,Object.defineProperty(B,"__esModule",{value:!0}),B.View=void 0;const t=g,n=G,i=H,r=ie();class o extends i.WebContents{constructor(i,o){super(i,o,"view"),this.identity=o,e.set(this,new n.Lazy((()=>this.fin.Platform.wrapSync(this.identity).getClient()))),this.attach=async e=>{await this.wire.sendAction("attach-view",{target:e,...this.identity})},this.destroy=async()=>{await this.wire.sendAction("destroy-view",{...this.identity})},this.show=async()=>{await this.wire.sendAction("show-view",{...this.identity})},this.showAt=async(e,t={})=>{await this.wire.sendAction("show-view-at",{bounds:e,...this.identity,options:t})},this.bringToFront=async()=>{await this.wire.sendAction("bring-view-to-front",{...this.identity})},this.hide=async()=>{await this.wire.sendAction("hide-view",{...this.identity})},this.setBounds=async e=>{await this.wire.sendAction("set-view-bounds",{bounds:e,...this.identity})},this.getBounds=async()=>(await this.wire.sendAction("get-view-bounds",{...this.identity})).payload.data,this.getInfo=async()=>(await this.wire.sendAction("get-view-info",{...this.identity})).payload.data,this.getParentLayout=async()=>(this.wire.sendAction("view-get-parent-layout",{...this.identity}).catch((()=>{})),this.fin.Platform.Layout.getLayoutByViewIdentity(this.identity)),this.getOptions=async()=>this.wire.sendAction("get-view-options",{...this.identity}).then((({payload:e})=>e.data)),this.updateOptions=async e=>this.wire.sendAction("update-view-options",{options:e,...this.identity}).then((()=>{})),this.getCurrentWindow=async()=>{const{payload:{data:e}}=await this.wire.sendAction("get-view-window",{...this.identity});return new r._Window(this.wire,e)},this.getCurrentStack=async()=>{this.wire.sendAction("view-get-current-stack").catch((()=>{}));try{return(await this.getParentLayout()).getStackByViewIdentity(this.identity)}catch(e){throw new t.RuntimeError({reason:"This view does not belong to a stack.",error:e})}},this.triggerBeforeUnload=async()=>(await this.wire.sendAction("trigger-before-unload",{...this.identity})).payload.data,this.bindToElement=async e=>{if(!e)throw new Error("Element not found.");return this.wire.environment.observeBounds(e,(async e=>this.setBounds(e)))}}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){const t=await this.getCurrentWindow();await t.focusedWebViewWasChanged(),await super.focus({emitSynthFocused:e})}}return B.View=o,e=new WeakMap,B}(),e)}(k)),k}function Y(){if(z)return j;z=1,Object.defineProperty(j,"__esModule",{value:!0}),j.Application=void 0;const e=d,t=ie(),n=J();class i extends e.EmitterBase{constructor(e,n){super(e,"application",n.uuid),this.identity=n,this.window=new t._Window(this.wire,{uuid:this.identity.uuid,name:this.identity.uuid})}windowListFromIdentityList(e){const n=[];return e.forEach((e=>{n.push(new t._Window(this.wire,{uuid:e.uuid,name:e.name}))})),n}isRunning(){return this.wire.sendAction("is-application-running",this.identity).then((({payload:e})=>e.data))}async quit(e=!1){try{await this._close(e),await this.wire.sendAction("destroy-application",{force:e,...this.identity})}catch(e){if(!["Remote connection has closed","Could not locate the requested application"].some((t=>e.message.includes(t))))throw e}}async _close(e=!1){try{await this.wire.sendAction("close-application",{force:e,...this.identity})}catch(e){if(!e.message.includes("Remote connection has closed"))throw e}}close(e=!1){return console.warn("Deprecation Warning: Application.close is deprecated Please use Application.quit"),this.wire.sendAction("application-close",this.identity).catch((e=>{})),this._close(e)}getChildWindows(){return this.wire.sendAction("get-child-windows",this.identity).then((({payload:e})=>{const t=[];return e.data.forEach((e=>{t.push({uuid:this.identity.uuid,name:e})})),this.windowListFromIdentityList(t)}))}getManifest(){return this.wire.sendAction("get-application-manifest",this.identity).then((({payload:e})=>e.data))}getParentUuid(){return this.wire.sendAction("get-parent-application",this.identity).then((({payload:e})=>e.data))}getShortcuts(){return this.wire.sendAction("get-shortcuts",this.identity).then((({payload:e})=>e.data))}async getViews(){const{payload:e}=await this.wire.sendAction("application-get-views",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}getZoomLevel(){return this.wire.sendAction("get-application-zoom-level",this.identity).then((({payload:e})=>e.data))}getWindow(){return this.wire.sendAction("application-get-window",this.identity).catch((e=>{})),Promise.resolve(this.window)}registerUser(e,t){return this.wire.sendAction("register-user",{userName:e,appName:t,...this.identity}).then((()=>{}))}removeTrayIcon(){return this.wire.sendAction("remove-tray-icon",this.identity).then((()=>{}))}restart(){return this.wire.sendAction("restart-application",this.identity).then((()=>{}))}run(){return console.warn("Deprecation Warning: Application.run is deprecated Please use fin.Application.start"),this.wire.sendAction("application-run",this.identity).catch((e=>{})),this._run()}_run(e={}){return this.wire.sendAction("run-application",{manifestUrl:this._manifestUrl,opts:e,...this.identity}).then((()=>{}))}scheduleRestart(){return this.wire.sendAction("relaunch-on-close",this.identity).then((()=>{}))}async sendApplicationLog(){const{payload:e}=await this.wire.sendAction("send-application-log",this.identity);return e.data}async setJumpList(e){await this.wire.sendAction("set-jump-list",{config:e,...this.identity})}setTrayIcon(e){return this.wire.sendAction("set-tray-icon",{enabledIcon:e,...this.identity}).then((()=>{}))}setShortcuts(e){return this.wire.sendAction("set-shortcuts",{data:e,...this.identity}).then((()=>{}))}async setShortcutQueryParams(e){await this.wire.sendAction("set-shortcut-query-args",{data:e,...this.identity})}setZoomLevel(e){return this.wire.sendAction("set-application-zoom-level",{level:e,...this.identity}).then((()=>{}))}async setAppLogUsername(e){await this.wire.sendAction("set-app-log-username",{data:e,...this.identity})}getTrayIconInfo(){return this.wire.sendAction("get-tray-icon-info",this.identity).then((({payload:e})=>e.data))}hasTrayIcon(){return this.wire.sendAction("has-tray-icon",this.identity).then((({payload:e})=>e.data))}terminate(){return this.wire.sendAction("terminate-application",this.identity).then((()=>{}))}wait(){return this.wire.sendAction("wait-for-hung-application",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction("get-info",this.identity).then((({payload:e})=>e.data))}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction("application-get-process-info",this.identity);return e}async setFileDownloadLocation(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t};await this.wire.sendAction("set-file-download-location",{...n,downloadLocation:e})}async getFileDownloadLocation(){const{payload:{data:e}}=await this.wire.sendAction("get-file-download-location",this.identity);return e}async showTrayIconPopupMenu(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t},{payload:i}=await this.wire.sendAction("show-tray-icon-popup-menu",{...n,options:e});return i.data}async closeTrayIconPopupMenu(){const{name:e}=this.wire.me,t={uuid:this.identity.uuid,name:e};await this.wire.sendAction("close-tray-icon-popup-menu",{...t})}}return j.Application=i,j}function Z(){return q||(q=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(function(){if(K)return F;K=1,Object.defineProperty(F,"__esModule",{value:!0}),F.ApplicationModule=void 0;const e=d,t=O,n=Y();class i extends e.Base{async wrap(e){this.wire.sendAction("wrap-application").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}wrapSync(e){this.wire.sendAction("wrap-application-sync").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}async _create(e){return void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&void 0===e.isPlatformController&&(e.autoShow=!0),await this.wire.sendAction("create-application",e),this.wrap({uuid:e.uuid})}create(e){return console.warn("Deprecation Warning: fin.Application.create is deprecated. Please use fin.Application.start"),this.wire.sendAction("application-create").catch((e=>{})),this._create(e)}async start(e){this.wire.sendAction("start-application").catch((e=>{}));const t=await this._create(e);return await this.wire.sendAction("run-application",{uuid:e.uuid}),t}async startManyManifests(e,t){return this.wire.sendAction("run-applications",{applications:e,opts:t}).then((()=>{}))}getCurrent(){return this.wire.sendAction("get-current-application").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction("get-current-application-sync").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}async startFromManifest(e,t){this.wire.sendAction("application-start-from-manifest").catch((e=>{}));const n=await this._createFromManifest(e);return await n._run(t),n}createFromManifest(e){return console.warn("Deprecation Warning: fin.Application.createFromManifest is deprecated. Please use fin.Application.startFromManifest"),this.wire.sendAction("application-create-from-manifest").catch((e=>{})),this._createFromManifest(e)}_createFromManifest(e){return this.wire.sendAction("get-application-manifest",{manifestUrl:e}).then((({payload:e})=>{const t=e.data.platform?e.data.platform.uuid:e.data.startup_app.uuid;return this.wrap({uuid:t})})).then((t=>(t._manifestUrl=e,t)))}}return F.ApplicationModule=i,F}(),e),n(Y(),e)}(R)),R}H.WebContents=D;var Q={};Object.defineProperty(Q,"__esModule",{value:!0}),Q.promisifySubscription=void 0;var X,ee,te;function ne(){if(X)return S;X=1,Object.defineProperty(S,"__esModule",{value:!0}),S._Window=void 0;const e=Z(),t=H,n=J(),i=T,r=Q;class o extends t.WebContents{constructor(e,t){super(e,t,"window")}async createWindow(e){this.wire.sendAction("window-create-window",this.identity).catch((e=>{}));const t=await(0,r.promisifySubscription)(this,"fire-constructor-callback");void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&(e.autoShow=!0),(0,i.handleDeprecatedWarnings)(e);const n=this.wire.environment.createChildContent({entityType:"window",options:e}),[o]=await Promise.all([t.getValue(),n]);let s;const{success:a}=o,c=o.data,{message:d}=c;s=a?{httpResponseCode:c.httpResponseCode,apiInjected:c.apiInjected}:{message:c.message,networkErrorCode:c.networkErrorCode,stack:c.stack};const h={message:d,cbPayload:s,success:a};try{this.getWebWindow().fin.__internal_.openerSuccessCBCalled()}catch(e){}return h.success?this:Promise.reject(h)}getAllFrames(){return this.wire.sendAction("get-all-frames",this.identity).then((({payload:e})=>e.data))}getBounds(){return this.wire.sendAction("get-window-bounds",this.identity).then((({payload:e})=>e.data))}center(){return this.wire.sendAction("center-window",this.identity).then((()=>{}))}blur(){return this.wire.sendAction("blur-window",this.identity).then((()=>{}))}bringToFront(){return this.wire.sendAction("bring-window-to-front",this.identity).then((()=>{}))}animate(e,t){return this.wire.sendAction("animate-window",{transitions:e,options:t,...this.identity}).then((()=>{}))}hide(){return this.wire.sendAction("hide-window",this.identity).then((()=>{}))}close(e=!1){return this.wire.sendAction("close-window",{force:e,...this.identity}).then((()=>{Object.setPrototypeOf(this,null)}))}focusedWebViewWasChanged(){return this.wire.sendAction("focused-webview-changed",this.identity).then((()=>{}))}getNativeId(){return this.wire.sendAction("get-window-native-id",this.identity).then((({payload:e})=>e.data))}async getCurrentViews(){const{payload:e}=await this.wire.sendAction("window-get-views",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}disableFrame(){return console.warn("Function is deprecated; use disableUserMovement instead."),this.wire.sendAction("disable-window-frame",this.identity).then((()=>{}))}disableUserMovement(){return this.wire.sendAction("disable-window-frame",this.identity).then((()=>{}))}enableFrame(){return console.warn("Function is deprecated; use enableUserMovement instead."),this.wire.sendAction("enable-window-frame",this.identity).then((()=>{}))}enableUserMovement(){return this.wire.sendAction("enable-window-frame",this.identity).then((()=>{}))}flash(){return this.wire.sendAction("flash-window",this.identity).then((()=>{}))}stopFlashing(){return this.wire.sendAction("stop-flash-window",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction("get-window-info",this.identity).then((({payload:e})=>e.data))}async getLayout(e){this.wire.sendAction("window-get-layout",this.identity).catch((e=>{}));const t=await this.getOptions();if(!t.layout&&!t.layoutSnapshot)throw new Error("Window does not have a Layout");return this.fin.Platform.Layout.wrap(e??this.identity)}getOptions(){return this.wire.sendAction("get-window-options",this.identity).then((({payload:e})=>e.data))}getParentApplication(){return this.wire.sendAction("window-get-parent-application",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity))}getParentWindow(){return this.wire.sendAction("window-get-parent-window",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity)).then((e=>e.getWindow()))}async getSnapshot(e){const t={area:e,...this.identity};console.warn("Window.getSnapshot has been deprecated, please use Window.capturePage");return(await this.wire.sendAction("get-window-snapshot",t)).payload.data}getState(){return this.wire.sendAction("get-window-state",this.identity).then((({payload:e})=>e.data))}getWebWindow(){return this.wire.sendAction("window-get-web-window",this.identity).catch((e=>{})),this.wire.environment.getWebWindow(this.identity)}isMainWindow(){return this.wire.sendAction("window-is-main-window",this.identity).catch((e=>{})),this.me.uuid===this.me.name}isShowing(){return this.wire.sendAction("is-window-showing",this.identity).then((({payload:e})=>e.data))}maximize(){return this.wire.sendAction("maximize-window",this.identity).then((()=>{}))}minimize(){return this.wire.sendAction("minimize-window",this.identity).then((()=>{}))}moveBy(e,t,n){return this.wire.sendAction("move-window-by",{deltaLeft:e,deltaTop:t,positioningOptions:n,...this.identity}).then((()=>{}))}moveTo(e,t,n){return this.wire.sendAction("move-window",{left:e,top:t,positioningOptions:n,...this.identity}).then((()=>{}))}resizeBy(e,t,n,i){return this.wire.sendAction("resize-window-by",{deltaWidth:Math.floor(e),deltaHeight:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}resizeTo(e,t,n,i){return this.wire.sendAction("resize-window",{width:Math.floor(e),height:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}restore(){return this.wire.sendAction("restore-window",this.identity).then((()=>{}))}setAsForeground(){return this.wire.sendAction("set-foreground-window",this.identity).then((()=>{}))}setBounds(e,t){return this.wire.sendAction("set-window-bounds",{...e,...this.identity,positioningOptions:t}).then((()=>{}))}show(e=!1){return this.wire.sendAction("show-window",{force:e,...this.identity}).then((()=>{}))}showAt(e,t,n=!1){return this.wire.sendAction("show-at-window",{force:n,left:Math.floor(e),top:Math.floor(t),...this.identity}).then((()=>{}))}updateOptions(e){return this.wire.sendAction("update-window-options",{options:e,...this.identity}).then((()=>{}))}authenticate(e,t){return this.wire.sendAction("window-authenticate",{userName:e,password:t,...this.identity}).then((()=>{}))}async showPopupMenu(e){const{payload:t}=await this.wire.sendAction("show-popup-menu",{options:e,...this.identity});return t.data}async closePopupMenu(){return this.wire.sendAction("close-popup-menu",{...this.identity}).then((()=>{}))}async dispatchPopupResult(e){this.wire.sendAction("window-dispatch-popup-result",this.identity).catch((e=>{})),await this.wire.sendAction("dispatch-popup-result",{data:e,...this.identity})}async print(e={content:"self"}){switch(e.content){case void 0:case"self":return super.print(e);case"screenshot":return this.wire.sendAction("print-screenshot",this.identity).then((()=>{}));case"views":return this.wire.sendAction("print-views",{...this.identity,options:e}).then((()=>{}));default:return}}}return S._Window=o,S}function ie(){return te||(te=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(function(){if(ee)return _;ee=1,Object.defineProperty(_,"__esModule",{value:!0}),_._WindowModule=void 0;const e=d,t=O,n=ne();class i extends e.Base{async wrap(e){this.wire.sendAction("window-wrap").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}wrapSync(e){this.wire.sendAction("window-wrap-sync").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}create(e){return this.wire.sendAction("create-window").catch((e=>{})),new n._Window(this.wire,{uuid:this.me.uuid,name:e.name}).createWindow(e)}getCurrent(){if(this.wire.sendAction("get-current-window").catch((e=>{})),!this.wire.me.isWindow)throw new Error("You are not in a Window context");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction("get-current-window-sync").catch((e=>{})),!this.wire.me.isWindow)throw new Error("You are not in a Window context");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return _._WindowModule=i,_}(),e),n(ne(),e)}(M)),M}Q.promisifySubscription=async(e,t,n=(()=>!0),i)=>{let r,o,s;const a=new Promise(((e,t)=>{r=e,o=t})),c=e=>{n(e)&&(clearTimeout(s),r(e))};return await e.on(t,c),i&&(s=setTimeout((()=>o(new Error("event timed out"))),i)),a.finally((()=>{e.removeListener(t,c).catch((()=>null))})),{getValue:()=>a}},Object.defineProperty(c,"__esModule",{value:!0}),c.System=void 0;const re=d,oe=g,se=ie(),ae=t;class ce extends re.EmitterBase{constructor(e){super(e,"system")}sendExternalProcessRequest(e,t){return new Promise(((n,i)=>{const r="external-process-exited";let o,s,a,c;"function"==typeof t.listener&&(a=e=>{const n=e||{};s={topic:"exited",uuid:n.processUuid||"",exitCode:n.exitCode||0},o===e.processUuid&&(t.listener(s),c.removeListener(r,a))},this.wire.me.name||(this.wire.me.name=this.wire.me.uuid),c=new se._Window(this.wire,this.wire.me),c.on(r,a)),this.wire.sendAction(e,t).then((({payload:e})=>{o=e.data.uuid,n(e.data),s&&o===s.uuid&&(t.listener(s),c.removeListener(r,a))})).catch((e=>{c&&c.removeListener(r,a),i(e)}))}))}getVersion(){return this.wire.sendAction("get-version").then((({payload:e})=>e.data))}clearCache(e){return this.wire.sendAction("clear-cache",e).then((()=>{}))}deleteCacheOnExit(){return this.wire.sendAction("delete-cache-request").then((()=>{}))}exit(){return this.wire.sendAction("exit-desktop").then((()=>{}))}async fetchManifest(e){const{payload:{data:t}}=await this.wire.sendAction("fetch-manifest",{manifestUrl:e});return t}flushCookieStore(){return this.wire.sendAction("flush-cookie-store").then((()=>{}))}getAllWindows(){return this.wire.sendAction("get-all-windows").then((({payload:e})=>e.data))}getAllApplications(){return this.wire.sendAction("get-all-applications").then((({payload:e})=>e.data))}getCommandLineArguments(){return this.wire.sendAction("get-command-line-arguments").then((({payload:e})=>e.data))}async getCrashReporterState(){const{payload:{data:{diagnosticMode:e,isRunning:t}}}=await this.wire.sendAction("get-crash-reporter-state");return console.warn("diagnosticMode property is deprecated. It will be removed in a future version"),{diagnosticMode:e,diagnosticsMode:e,isRunning:t}}async startCrashReporter(e){const t=e,n={...t,diagnosticMode:t.diagnosticsMode||t.diagnosticMode},{payload:{data:{diagnosticMode:i,isRunning:r}}}=await this.wire.sendAction("start-crash-reporter",n);return{diagnosticMode:i,diagnosticsMode:i,isRunning:r}}getUniqueUserId(){return this.wire.sendAction("get-unique-user-id").then((({payload:e})=>e.data))}getEntityInfo(e,t){return this.wire.sendAction("get-entity-info",{uuid:e,name:t}).then((({payload:e})=>e.data))}getEnvironmentVariable(e){return this.wire.sendAction("get-environment-variable",{environmentVariables:e}).then((({payload:e})=>e.data))}getFocusedWindow(){return this.wire.sendAction("get-focused-window").then((({payload:e})=>e.data))}async isAppCertified(e){const{payload:{data:{certifiedInfo:t}}}=await this.wire.sendAction("is-app-certified",{manifestUrl:e});return t}getInstalledRuntimes(){return this.wire.sendAction("get-installed-runtimes").then((({payload:e})=>e.data.runtimes))}async getInstalledApps(){const{payload:{data:{installedApps:e}}}=await this.wire.sendAction("get-installed-apps");return e}getLog(e){return this.wire.sendAction("view-log",e).then((({payload:e})=>e.data))}getMachineId(){return this.wire.sendAction("get-machine-id").then((({payload:e})=>e.data))}getMinLogLevel(){return this.wire.sendAction("get-min-log-level").then((({payload:e})=>e.data))}getLogList(){return this.wire.sendAction("list-logs").then((({payload:e})=>e.data))}getMonitorInfo(){return this.wire.sendAction("get-monitor-info").then((({payload:e})=>e.data))}getMousePosition(){return this.wire.sendAction("get-mouse-position").then((({payload:e})=>e.data))}getProcessList(){return console.warn("System.getProcessList has been deprecated. Please consider using our new process APIs: Window.getProcessInfo, View.getProcessInfo, Application.getProcessInfo, System.getAllProcessInfo"),this.wire.sendAction("process-snapshot").then((({payload:e})=>e.data))}async getAllProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction("get-all-process-info",this.identity);return e}getProxySettings(){return this.wire.sendAction("get-proxy-settings").then((({payload:e})=>e.data))}getRuntimeInfo(){return this.wire.sendAction("get-runtime-info").then((({payload:e})=>e.data))}getRvmInfo(){return this.wire.sendAction("get-rvm-info").then((({payload:e})=>e.data))}getHostSpecs(){return this.wire.sendAction("get-host-specs").then((({payload:e})=>e.data))}getOSInfo(){return this.wire.sendAction("get-os-info").then((({payload:e})=>e.data))}launchExternalProcess(e){return this.sendExternalProcessRequest("launch-external-process",e)}monitorExternalProcess(e){return this.sendExternalProcessRequest("monitor-external-process",e)}log(e,t){return this.wire.sendAction("write-to-log",{level:e,message:t}).then((()=>{}))}openUrlWithBrowser(e){return this.wire.sendAction("open-url-with-browser",{url:e}).then((()=>{}))}async registerCustomProtocol(e){if("object"!=typeof e)throw new Error("Must provide an object with a `protocolName` property having a string value.");await this.wire.sendAction("register-custom-protocol",e)}async unregisterCustomProtocol(e){await this.wire.sendAction("unregister-custom-protocol",{protocolName:e})}async getCustomProtocolState(e){return this.wire.sendAction("get-custom-protocol-state",{protocolName:e}).then((({payload:e})=>e.data))}releaseExternalProcess(e){return this.wire.sendAction("release-external-process",{uuid:e}).then((()=>{}))}showDeveloperTools(e){return this.wire.sendAction("show-developer-tools",e).then((()=>{}))}terminateExternalProcess(e){return this.wire.sendAction("terminate-external-process",e).then((()=>{}))}updateProxySettings(e){return this.wire.sendAction("update-proxy",e).then((()=>{}))}async downloadAsset(e,t){const n=()=>{};let i=n,r=n;const o=new Promise(((e,t)=>{i=e,r=t}));if("openfin"!==this.wire.environment.type)throw new oe.NotSupportedError("downloadAsset only supported in an OpenFin Render process");const s=oe.RuntimeError.getCallSite(),a=this.wire.environment.getNextMessageId().toString(),c=`asset-download-progress-${a}`,d=`asset-download-error-${a}`,h=`asset-download-complete-${a}`,l=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},u=()=>{this.removeListener(c,l)};await Promise.all([this.on(c,l),this.once(d,(e=>{u();const{reason:t,err:n}=e;r(new oe.RuntimeError({reason:t,error:n},s))})),this.once(h,(()=>{u(),i()}))]);const p=Object.assign(e,{downloadId:a});return await this.wire.sendAction("download-asset",p).catch((e=>{throw u(),e})),o}downloadRuntime(e,t){const n=oe.RuntimeError.getCallSite();return new Promise(((i,r)=>{if("openfin"!==this.wire.environment.type)return void r(new oe.NotSupportedError("downloadRuntime only supported in an OpenFin Render process"));const o=this.wire.environment.getNextMessageId().toString(),s=`runtime-download-progress-${o}`,a=`runtime-download-error-${o}`,c=`runtime-download-complete-${o}`,d=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},h=()=>{this.removeListener(s,d)};this.on(s,d),this.once(a,(e=>{h();const{reason:t,err:i}=e;r(new oe.RuntimeError({reason:t,error:i},n))})),this.once(c,(()=>{h(),i()}));const l=Object.assign(e,{downloadId:o});this.wire.sendAction("download-runtime",l).catch((e=>{h(),r(e)}))}))}downloadPreloadScripts(e){return this.wire.sendAction("download-preload-scripts",{scripts:e}).then((({payload:e})=>e.data))}getAllExternalApplications(){return this.wire.sendAction("get-all-external-applications").then((({payload:e})=>e.data))}getAppAssetInfo(e){return this.wire.sendAction("get-app-asset-info",e).then((({payload:e})=>e.data))}getCookies(e){const t=this.wire.environment.getUrl(),n=Object.assign(e,{url:t});return this.wire.sendAction("get-cookies",n).then((({payload:e})=>e.data))}setMinLogLevel(e){return this.wire.sendAction("set-min-log-level",{level:e}).then((()=>{}))}resolveUuid(e){return this.wire.sendAction("resolve-uuid",{entityKey:e}).then((({payload:e})=>e.data))}executeOnRemote(e,t){return t.requestingIdentity=e,this.wire.ferryAction(t)}readRegistryValue(e,t,n){return this.wire.sendAction("read-registry-value",{rootKey:e,subkey:t,value:n}).then((({payload:e})=>e.data))}registerExternalConnection(e){return this.wire.sendAction("register-external-connection",{uuid:e}).then((({payload:e})=>e.data))}async getServiceConfiguration(e){if("string"!=typeof e.name)throw new Error("Must provide an object with a `name` property having a string value");const{name:t}=e;return this.wire.sendAction("get-service-configuration",{name:t}).then((({payload:e})=>e.data))}async getSystemAppConfig(e){if("string"!=typeof e)throw new Error("Must provide a string value for name of system app");return this.wire.sendAction("get-system-app-configuration",{name:e}).then((({payload:e})=>e.data))}async registerShutdownHandler(e){this.wire.sendAction("system-register-shutdown-handler").catch((e=>{}));const{uuid:t,name:n}=this.wire.me;this.on("system-shutdown",(i=>{e({proceed:()=>{this.wire.environment.raiseEvent("application/system-shutdown-handled",{uuid:t,name:n,topic:"application"})}})}))}runRvmHealthCheck(){return this.wire.sendAction("run-rvm-health-check").then((({payload:e})=>e.data))}async launchManifest(e,t={}){const{subscribe:n,...i}=t,r=i;if(n){const e=new ae.EventEmitter;n(e);const t="app-version-progress",i="runtime-status",o="app-version-complete",s="app-version-error",a=this.wire.environment.getNextMessageId().toString();r.appVersionId=a;const c=[o,t,i,s],d=e=>{const{appVersionId:t,topic:n,type:i,...r}=e;return{...r,type:c.find((e=>i.includes(e)))}},h=t=>{const n=d(t);e.emit(n.type,n)},l=()=>{this.removeListener(`${t}.${a}`,h),this.removeListener(`${i}.${a}`,h),this.removeListener(`${o}.${a}`,h),this.removeListener(`${s}.${a}`,h),this.removeListener(`${o}.${a}`,l),this.removeListener(`${s}.${a}`,l)};await Promise.all([this.on(`${t}.${a}`,h),this.on(`${i}.${a}`,h),this.once(`${o}.${a}`,h),this.once(`${s}.${a}`,h),this.once(`${o}.${a}`,l),this.once(`${s}.${a}`,l)])}return(await this.wire.sendAction("launch-manifest",{manifestUrl:e,opts:r})).payload.data.manifest}async queryPermissionForCurrentContext(e){const t={uuid:this.wire.me.uuid,name:this.wire.me.name};return(await this.wire.sendAction("query-permission-for-current-context",{apiName:e,identity:t})).payload.data}async enableNativeWindowIntegrationProvider(e){const{payload:t}=await this.wire.sendAction("enable-native-window-integration-provider",{permissions:e});return t.data}async registerUsage({data:e,type:t}){await this.wire.sendAction("register-usage",{data:e,type:t})}async getPrinters(){const{payload:e}=await this.wire.sendAction("system-get-printers");return e.data}async updateProcessLoggingOptions(e){await this.wire.sendAction("system-update-process-logging-options",{options:e})}async getDomainSettings(){const{payload:{data:e}}=await this.wire.sendAction("get-domain-settings",this.identity);return e}async setDomainSettings(e){await this.wire.sendAction("set-domain-settings",{domainSettings:e,...this.identity})}async refreshExtensions(){const{payload:e}=await this.wire.sendAction("refresh-extensions");return e.data}async getInstalledExtensions(){const{payload:e}=await this.wire.sendAction("get-installed-extensions");return e.data}}c.System=ce;var de={},he={};Object.defineProperty(he,"__esModule",{value:!0}),he.RefCounter=void 0;he.RefCounter=class{constructor(){this.topicRefMap=new Map}incRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t+1;n=i,this.topicRefMap.set(e,i)}else this.topicRefMap.set(e,1),n=1;return n}decRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t-1;this.topicRefMap.set(e,i),n=i}else n=-1;return n}actOnFirst(e,t,n){return 1===this.incRefCount(e)?t():n()}actOnLast(e,t,n){return 0===this.decRefCount(e)?t():n()}};var le={},ue={},pe={};Object.defineProperty(pe,"__esModule",{value:!0}),pe.ChannelBase=pe.ProtectedItems=void 0;const we=e=>async(t,n,i)=>{const r=await e(t,n,i);return void 0===r?n:r};pe.ProtectedItems=class{constructor(e,t){this.providerIdentity=e,this.close=t}};class ye{static defaultAction(e){throw new Error(`No action registered at target for ${e}`)}constructor(){this.subscriptions=new Map}async processAction(e,t,n){try{const i=this.subscriptions.has(e)?this.subscriptions.get(e):(t,n)=>(this.defaultAction??ye.defaultAction)(e,t,n),r=this.preAction?await this.preAction(e,t,n):t,o=await i(r,n);return this.postAction?await this.postAction(e,o,n):o}catch(t){if(this.errorMiddleware)return this.errorMiddleware(e,t,n);throw t}}beforeAction(e){if(this.preAction)throw new Error("Already registered beforeAction middleware");this.preAction=we(e)}onError(e){if(this.errorMiddleware)throw new Error("Already registered error middleware");this.errorMiddleware=e}afterAction(e){if(this.postAction)throw new Error("Already registered afterAction middleware");this.postAction=we(e)}remove(e){this.subscriptions.delete(e)}setDefaultAction(e){if(this.defaultAction)throw new Error("default action can only be set once");this.defaultAction=e}register(e,t){if(this.subscriptions.has(e))throw new Error(`Subscription already registered for action: ${e}. Unsubscribe before adding new subscription`);return this.subscriptions.set(e,t),!0}}pe.ChannelBase=ye;var fe,ge,me,ve=s&&s.__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)},Ce=s&&s.__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};Object.defineProperty(ue,"__esModule",{value:!0}),ue.ChannelClient=void 0;const be=pe,Ie=new Map;class Ee extends be.ChannelBase{static closeChannelByEndpointId(e){const t=Ie.get(e);t&&ve(t,me,"f").call(t)}static handleProviderDisconnect(e){for(const t of Ie.values())t.providerIdentity.channelId===e.channelId&&(t.disconnectListener(e),ve(t,me,"f").call(t))}constructor(e,t,n){super(),fe.set(this,void 0),ge.set(this,void 0),this.processAction=(e,t,n)=>super.processAction(e,t,n),me.set(this,(()=>{Ie.delete(this.endpointId),ve(this,ge,"f").close()})),Ce(this,fe,new be.ProtectedItems(e,t),"f"),this.disconnectListener=()=>{},this.endpointId=e.endpointId,Ce(this,ge,n,"f"),Ie.set(this.endpointId,this),n.receive(this.processAction)}get providerIdentity(){return ve(this,fe,"f").providerIdentity}async dispatch(e,t){if(ve(this,ge,"f").isEndpointConnected(this.providerIdentity.channelId))return ve(this,ge,"f").send(this.providerIdentity.channelId,e,t);throw new Error("The client you are trying to dispatch from is disconnected from the target provider.")}onDisconnection(e){this.disconnectListener=t=>{try{e(t)}catch(e){throw new Error(`Error while calling the onDisconnection callback: ${e.message}`)}finally{this.disconnectListener=()=>{}}}}async disconnect(){await this.sendDisconnectAction(),ve(this,me,"f").call(this)}async sendDisconnectAction(){const e=ve(this,fe,"f");await e.close()}static async wireClose(e,t,n){const{channelName:i,uuid:r,name:o}=t;await e.sendAction("disconnect-from-channel",{channelName:i,uuid:r,name:o,endpointId:n})}}ue.ChannelClient=Ee,fe=new WeakMap,ge=new WeakMap,me=new WeakMap;var xe={},Ae={};Object.defineProperty(Ae,"__esModule",{value:!0}),Ae.exhaustiveCheck=void 0,Ae.exhaustiveCheck=function(e,t){throw new Error(`Unsupported value: ${e}${t?`\n Supported values are: ${t.join("")}`:""}`)};var Pe,Me,_e,Oe={},Se=s&&s.__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},Re=s&&s.__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)};Object.defineProperty(Oe,"__esModule",{value:!0}),Oe.ClassicInfo=Oe.ClassicStrategy=void 0;Oe.ClassicStrategy=class{constructor(e,t,n,i){this.messageReceiver=t,this.endpointId=n,this.providerIdentity=i,Pe.set(this,void 0),Me.set(this,new Map),_e.set(this,new Map),this.send=async(e,t,n)=>{const i=Re(this,Me,"f").get(e);if(!i)throw new Error(`Could not locate routing info for endpoint ${e}`);const r={...i};r.isLocalEndpointId&&delete r.endpointId,delete r.isLocalEndpointId;const o=Re(this,Pe,"f").sendAction("send-channel-message",{...r,providerIdentity:this.providerIdentity,action:t,payload:n});Re(this,_e,"f").get(e)?.add(o);return(await o.catch((e=>{throw new Error(e.message)})).finally((()=>{Re(this,_e,"f").get(e)?.delete(o)}))).payload.data.result},this.close=async()=>{this.messageReceiver.removeEndpoint(this.providerIdentity.channelId,this.endpointId),[...Re(this,Me,"f").keys()].forEach((e=>this.closeEndpoint(e))),Se(this,Me,new Map,"f")},Se(this,Pe,e,"f")}onEndpointDisconnect(e,t){}receive(e){this.messageReceiver.addEndpoint(e,this.providerIdentity.channelId,this.endpointId)}async closeEndpoint(e){const t=Re(this,Me,"f").get(e);Re(this,Me,"f").delete(e);const n=Re(this,_e,"f").get(e);n?.forEach((n=>{const i=`Channel connection with identity uuid: ${t?.uuid} / name: ${t?.name} / endpointId: ${e} no longer connected.`;n.cancel(new Error(i))}))}isEndpointConnected(e){return Re(this,Me,"f").has(e)}addEndpoint(e,t){Re(this,Me,"f").set(e,t.endpointIdentity),Re(this,_e,"f").set(e,new Set)}isValidEndpointPayload(e){return"string"==typeof e?.endpointIdentity?.endpointId||"string"==typeof e?.endpointIdentity?.channelId}},Pe=new WeakMap,Me=new WeakMap,_e=new WeakMap,Oe.ClassicInfo={version:5,minimumVersion:0,type:"classic"};var Fe={},je={},ke={};Object.defineProperty(ke,"__esModule",{value:!0}),ke.errorToPOJO=void 0,ke.errorToPOJO=function(e){return{stack:e.stack,name:e.name,message:e.message,toString:()=>e.stack||e.toString()}};var Le,Te,$e=s&&s.__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)},Be=s&&s.__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};Object.defineProperty(je,"__esModule",{value:!0}),je.RTCEndpoint=void 0;const Ge=ke;je.RTCEndpoint=class{static isValidEndpointPayload(e){const t=e=>"object"==typeof e&&null!==e;return t(e)&&t(e.endpointIdentity)&&t(e.rtc)&&"string"==typeof e.endpointIdentity.endpointId}constructor({rtc:e,endpointIdentity:t}){this.responseMap=new Map,Le.set(this,null),Te.set(this,void 0),this.connectionStateChangeHandler=e=>{"connected"!==this.rtc.rtcClient.connectionState&&(this.rtc.rtcClient.removeEventListener("connectionstatechange",this.connectionStateChangeHandler),this.close(),$e(this,Te,"f")&&$e(this,Te,"f").call(this))},this.send=async(e,t)=>{const n=`message-${Math.random()}`,i=new Promise(((e,t)=>{this.responseMap.set(n,{resolve:e,reject:t})}));return this.rtc.channels.request.send(JSON.stringify({action:e,payload:t,messageId:n})),i},this.close=()=>{this.responseMap.forEach((e=>e.reject("Connection has closed."))),this.responseMap=new Map,this.rtc.channels.request.close(),this.rtc.channels.response.close(),this.rtc.rtcClient.close()},this.rtc=e,this.endpointIdentity=t,this.rtc.channels.response.addEventListener("message",(e=>{let{data:t}=e;e.data instanceof ArrayBuffer&&(t=(new TextDecoder).decode(e.data));const{messageId:n,payload:i,success:r,error:o}=JSON.parse(t),{resolve:s,reject:a}=this.responseMap.get(n)??{};s&&a?(this.responseMap.delete(n),r?s(i):a(o)):(console.log("Could not find id in responseMap."),console.log(e))})),this.rtc.channels.request.addEventListener("message",(async e=>{let{data:n}=e;e.data instanceof ArrayBuffer&&(n=(new TextDecoder).decode(e.data));const{messageId:i,action:r,payload:o}=JSON.parse(n);if($e(this,Le,"f"))try{const e=await $e(this,Le,"f").call(this,r,o,t);this.rtc.channels.response.send(JSON.stringify({messageId:i,payload:e,success:!0}))}catch(e){"open"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,error:(0,Ge.errorToPOJO)(e),success:!1}))}else"open"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,success:!1,error:"Connection not ready."}))})),this.rtc.rtcClient.addEventListener("connectionstatechange",this.connectionStateChangeHandler),Object.values(this.rtc.channels).forEach((e=>{e.onclose=e=>{[...this.responseMap.values()].forEach((e=>e.reject(new Error("RTCDataChannel closed unexpectedly, this is most commonly caused by message size. Note: RTC Channels have a message size limit of ~255kB.")))),this.close(),$e(this,Te,"f")&&$e(this,Te,"f").call(this)}}))}onDisconnect(e){if($e(this,Te,"f"))throw new Error("RTCEndpoint disconnectListener cannot be set twice.");Be(this,Te,e,"f")}receive(e){if($e(this,Le,"f"))throw new Error("You have already set a listener for this RTC Endpoint.");Be(this,Le,e,"f")}get connected(){return"connected"===this.rtc.rtcClient.connectionState}},Le=new WeakMap,Te=new WeakMap;var We,He,Ne,De={},Ue=s&&s.__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)},Ve=s&&s.__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};Object.defineProperty(De,"__esModule",{value:!0}),De.EndpointStrategy=void 0;De.EndpointStrategy=class{constructor(e,t,n){this.EndpointType=e,this.StrategyName=n,We.set(this,null),He.set(this,new Map),Ne.set(this,!0),this.send=async(e,t,n)=>this.getEndpointById(e).send(t,n),this.close=async()=>{Ue(this,Ne,"f")&&(Ue(this,He,"f").forEach((e=>e.close())),Ve(this,He,new Map,"f")),Ve(this,Ne,!1,"f")},this.isValidEndpointPayload=t}onEndpointDisconnect(e,t){this.getEndpointById(e).onDisconnect(t)}receive(e){if(Ue(this,We,"f"))throw new Error(`You have already set a listener for this ${this.StrategyName} Strategy`);Ve(this,We,e,"f"),Ue(this,He,"f").forEach((e=>e.receive(Ue(this,We,"f"))))}getEndpointById(e){const t=Ue(this,He,"f").get(e);if(!t)throw new Error(`Client with endpoint id ${e} is not connected`);return t}get connected(){return Ue(this,Ne,"f")}isEndpointConnected(e){return Ue(this,He,"f").has(e)}addEndpoint(e,t){if(!Ue(this,Ne,"f"))return void console.warn(`Adding endpoint to disconnected ${this.StrategyName} Strategy`);const n=new this.EndpointType(t);Ue(this,We,"f")&&n.receive(Ue(this,We,"f")),Ue(this,He,"f").set(e,n)}async closeEndpoint(e){Ue(this,He,"f").delete(e)}},We=new WeakMap,He=new WeakMap,Ne=new WeakMap,Object.defineProperty(Fe,"__esModule",{value:!0}),Fe.RTCInfo=Fe.RTCStrategy=void 0;const ze=je,Ke=De;class qe extends Ke.EndpointStrategy{constructor(){super(ze.RTCEndpoint,ze.RTCEndpoint.isValidEndpointPayload,"RTC")}}Fe.RTCStrategy=qe,Fe.RTCInfo={version:2,minimumVersion:0,type:"rtc"};var Je={};Object.defineProperty(Je,"__esModule",{value:!0}),Je.RTCICEManager=void 0;const Ye=d;class Ze extends Ye.EmitterBase{constructor(e){super(e,"channel"),this.ensureChannelOpened=e=>new Promise(((t,n)=>{if("open"===e.readyState)t();else if("connecting"===e.readyState){const n=()=>{e.removeEventListener("open",n),t()};e.addEventListener("open",n)}else n(new Error("This Channel has already closed"))}))}static createDataChannelPromise(e,t){let n;const i=new Promise((e=>{n=e})),r=i=>{const o=()=>{i.channel.removeEventListener("open",o),n(i.channel)};i.channel.label===e&&(i.channel.addEventListener("open",o),t.removeEventListener("datachannel",r))};return t.addEventListener("datachannel",r),i}async listenForProviderIce(e,t){await this.on(this.createProviderEventName(e),t,{timestamp:Date.now()})}async raiseProviderIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createProviderEventName(e)),t)}async listenForClientIce(e,t){await this.on(this.createClientEventName(e),t,{timestamp:Date.now()})}async raiseClientIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createClientEventName(e)),t)}cleanupIceListeners(e){this.removeAllListeners(this.createClientEventName(e)),this.removeAllListeners(this.createProviderEventName(e))}createClientEventName(e){return`ice-client-${e}`}createProviderEventName(e){return`ice-provider-${e}`}createRouteString(e){return`channel/${e}`}createRtcPeer(){return this.wire.environment.getRtcPeer()}async startClientOffer(){const e=Math.random().toString(),t=this.createRtcPeer();t.addEventListener("icecandidate",(async t=>{t.candidate&&await this.raiseClientIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForProviderIce(e,(async e=>{await t.addIceCandidate(e.candidate)}));const n={request:t.createDataChannel("request"),response:t.createDataChannel("response")},i=await t.createOffer();await t.setLocalDescription(i);const r=Promise.all([n.request,n.response].map(this.ensureChannelOpened)).then((()=>{}));return{rtcClient:t,channels:n,offer:i,rtcConnectionId:e,channelsOpened:r}}async finishClientOffer(e,t,n){return await e.setRemoteDescription(t),await n,!0}async createProviderAnswer(e,t){const n=this.createRtcPeer(),i=Ze.createDataChannelPromise("request",n),r=Ze.createDataChannelPromise("response",n);n.addEventListener("icecandidate",(async t=>{t.candidate&&await this.raiseProviderIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForClientIce(e,(async e=>{await n.addIceCandidate(e.candidate)})),await n.setRemoteDescription(t);const o=await n.createAnswer();await n.setLocalDescription(o);const s=Promise.all([i,r]).then((([t,n])=>(this.cleanupIceListeners(e),{request:t,response:n})));return{rtcClient:n,answer:o,channels:s}}}Je.RTCICEManager=Ze;var Qe={},Xe={};function et(e){return[...e.split(".").reverse().entries()].reduce(((e,[t,n])=>e+ +n*1e4**t),0)}function tt(e,t){return et(e)>=et(t)}function nt(e){return e.split("/")[0]}Object.defineProperty(Xe,"__esModule",{value:!0}),Xe.runtimeUuidMeetsMinimumRuntimeVersion=Xe.parseRuntimeUuid=Xe.meetsMinimumRuntimeVersion=void 0,Xe.meetsMinimumRuntimeVersion=tt,Xe.parseRuntimeUuid=nt,Xe.runtimeUuidMeetsMinimumRuntimeVersion=function(e,t){return tt(nt(e),t)};var it,rt,ot,st,at,ct=s&&s.__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)},dt=s&&s.__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};Object.defineProperty(Qe,"__esModule",{value:!0}),Qe.ChannelProvider=void 0;const ht=pe,lt=Xe;class ut extends ht.ChannelBase{get connections(){return[...ct(this,it,"f")]}static handleClientDisconnection(e,t){const n=e.connections.find((e=>e.endpointId===t.endpointId));if(n)ct(e,st,"f").call(e,n);else{e.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name)).forEach(ct(e,st,"f"))}e.disconnectListener(t)}static setProviderRemoval(e,t){ut.removalMap.set(e,t)}constructor(e,t,n){super(),it.set(this,void 0),rt.set(this,void 0),ot.set(this,void 0),st.set(this,(e=>{const t=this.connections.filter((t=>t.endpointId!==e.endpointId));ct(this,ot,"f").closeEndpoint(e.endpointId),dt(this,it,t,"f")})),this.processAction=async(e,t,n)=>(ut.clientIsMultiRuntime(n)&&!(0,lt.runtimeUuidMeetsMinimumRuntimeVersion)(n.runtimeUuid,"18.87.56.0")?this.handleMultiRuntimeLegacyClient(n):this.checkForClientConnection(n),super.processAction(e,t,n)),at.set(this,(()=>{ct(this,ot,"f").close();const e=ut.removalMap.get(this);e&&e()})),dt(this,rt,new ht.ProtectedItems(e,t),"f"),this.connectListener=()=>{},this.disconnectListener=()=>{},dt(this,it,[],"f"),dt(this,ot,n,"f"),n.receive(this.processAction)}dispatch(e,t,n){const i=e.endpointId??this.getEndpointIdForOpenFinId(e,t);return i&&ct(this,ot,"f").isEndpointConnected(i)?ct(this,ot,"f").send(i,t,n):Promise.reject(new Error(`Client connection with identity uuid: ${e.uuid} / name: ${e.name} / endpointId: ${i} no longer connected.`))}async processConnection(e,t){return ct(this,it,"f").push(e),this.connectListener(e,t)}publish(e,t){return this.connections.map((n=>ct(this,ot,"f").send(n.endpointId,e,t)))}onConnection(e){this.connectListener=e}onDisconnection(e){this.disconnectListener=e}async destroy(){const e=ct(this,rt,"f");e.providerIdentity,dt(this,it,[],"f"),await e.close(),ct(this,at,"f").call(this)}async getAllClientInfo(){return this.connections.map((e=>{const{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}=e;return{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}}))}checkForClientConnection(e){if(!this.isClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider.\n Client Identity: {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}isClientConnected(e){return ut.clientIdentityIncludesEndpointId(e)?this.connections.some((t=>t.endpointId===e.endpointId&&t.uuid===e.uuid&&t.name===e.name)):this.isLegacyClientConnected(e)}isLegacyClientConnected(e){return this.connections.some((t=>t.uuid===e.uuid&&t.name===e.name))}handleMultiRuntimeLegacyClient(e){if(!this.isLegacyClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider. Client Identity:\n {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}getEndpointIdForOpenFinId(e,t){const n=this.connections.filter((t=>t.name===e.name&&t.uuid===e.uuid));if(n.length>=2){const n=ct(this,rt,"f"),{uuid:i,name:r}=e,o=n?.providerIdentity.uuid,s=n?.providerIdentity.name;console.warn(`WARNING: Dispatch call may have unintended results. The "to" argument of your dispatch call is missing the\n "endpointId" parameter. The identity you are dispatching to ({uuid: ${i}, name: ${r}})\n has multiple channelClients for this channel. Your dispatched action: (${t}) from the provider:\n ({uuid: ${o}, name: ${s}}) will only be processed by the most recently-created client.`)}return n.pop()?.endpointId}static clientIdentityIncludesEndpointId(e){return void 0!==e.endpointId}static clientIsMultiRuntime(e){return void 0!==e.runtimeUuid}static async wireClose(e,t){await e.sendAction("destroy-channel",{channelName:t})}}Qe.ChannelProvider=ut,it=new WeakMap,rt=new WeakMap,ot=new WeakMap,st=new WeakMap,at=new WeakMap,ut.removalMap=new WeakMap;var pt={};Object.defineProperty(pt,"__esModule",{value:!0}),pt.MessageReceiver=void 0;const wt=ue,yt=d;class ft extends yt.Base{constructor(e){super(e),this.onmessage=e=>"process-channel-message"===e.action&&(this.processChannelMessage(e),!0),this.endpointMap=new Map,this.latestEndpointIdByChannelId=new Map,e.registerMessageHandler(this.onmessage.bind(this))}async processChannelMessage(e){const{senderIdentity:t,providerIdentity:n,action:i,ackToSender:r,payload:o,intendedTargetIdentity:s}=e.payload,a=s.channelId??s.endpointId??this.latestEndpointIdByChannelId.get(n.channelId),c=this.endpointMap.get(a);if(!c)return r.payload.success=!1,r.payload.reason=`Client connection with identity uuid: ${this.wire.me.uuid} / name: ${this.wire.me.name} / endpointId: ${a} no longer connected.`,this.wire.sendRaw(r);try{const e=await c(i,o,t);return r.payload.payload=r.payload.payload||{},r.payload.payload.result=e,this.wire.sendRaw(r)}catch(e){return r.payload.success=!1,r.payload.reason=e.message,this.wire.sendRaw(r)}}addEndpoint(e,t,n){this.endpointMap.set(n,e),t!==n&&this.latestEndpointIdByChannelId.set(t,n)}removeEndpoint(e,t){this.endpointMap.delete(t),this.latestEndpointIdByChannelId.get(e)===t&&this.latestEndpointIdByChannelId.delete(e)}checkForPreviousClientConnection(e){const t=this.latestEndpointIdByChannelId.get(e);t&&(wt.ChannelClient.closeChannelByEndpointId(t),console.warn("You have created a second connection to an older provider. First connection has been removed from the clientMap"),console.warn("If the provider calls publish(), you may receive multiple messages."))}}pt.MessageReceiver=ft;var gt={};Object.defineProperty(gt,"__esModule",{value:!0}),gt.ProtocolManager=void 0;gt.ProtocolManager=class{constructor(e){this.ProtocolsInPreferenceOrder=e,this.DefaultClientProtocols=["classic"],this.DefaultProviderProtocols=["classic"],this.getClientProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultClientProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(", ")}.`);return t},this.getProviderProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultProviderProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(", ")}.`);return t},this.getCompatibleProtocols=(e,t)=>t.supportedProtocols.filter((t=>e.some((e=>e.type===t.type&&t.version>=e.minimumVersion&&e.version>=(t.minimumVersion??0))))).slice(0,t.maxProtocols)}};var mt={};Object.defineProperty(mt,"__esModule",{value:!0});class vt{static combine(e,t){return new vt(e,t)}constructor(e,t){this.primary=e,this.secondary=t}onEndpointDisconnect(e,t){this.primary.onEndpointDisconnect(e,(()=>{this.secondary.isEndpointConnected(e)||t()})),this.secondary.onEndpointDisconnect(e,(()=>{this.primary.isEndpointConnected(e)||t()}))}isValidEndpointPayload(e){return this.primary.isValidEndpointPayload(e)||this.secondary.isValidEndpointPayload(e)}async closeEndpoint(e){await this.primary.closeEndpoint(e),await this.secondary.closeEndpoint(e)}isEndpointConnected(e){return this.primary.isEndpointConnected(e)||this.secondary.isEndpointConnected(e)}async addEndpoint(e,t){this.primary.isValidEndpointPayload(t)&&await this.primary.addEndpoint(e,t),this.secondary.isValidEndpointPayload(t)&&await this.secondary.addEndpoint(e,t)}receive(e){this.primary.receive(e),this.secondary.receive(e)}send(e,t,n){return this.primary.isEndpointConnected(e)?this.primary.send(e,t,n):this.secondary.send(e,t,n)}async close(){await Promise.all([this.primary.close(),this.secondary.close()])}}mt.default=vt;var Ct,bt,It=s&&s.__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},Et=s&&s.__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)},xt=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(xe,"__esModule",{value:!0}),xe.ConnectionManager=void 0;const At=Ae,Pt=d,Mt=Oe,_t=Fe,Ot=Je,St=Qe,Rt=pt,Ft=gt,jt=xt(mt);class kt extends Pt.Base{static getProtocolOptionsFromStrings(e){return e.map((e=>{switch(e){case"rtc":return _t.RTCInfo;case"classic":return Mt.ClassicInfo;default:return(0,At.exhaustiveCheck)(e,["rtc","classic"])}}))}constructor(e){super(e),Ct.set(this,void 0),bt.set(this,void 0),this.removeChannelFromProviderMap=e=>{this.providerMap.delete(e)},this.onmessage=e=>"process-channel-connection"===e.action&&(this.processChannelConnection(e),!0),this.providerMap=new Map,this.protocolManager=new Ft.ProtocolManager("node"===this.wire.environment.type?["classic"]:["rtc","classic"]),It(this,Ct,new Rt.MessageReceiver(e),"f"),It(this,bt,new Ot.RTCICEManager(e),"f"),e.registerMessageHandler(this.onmessage.bind(this))}createProvider(e,t){const n=Object.assign(this.wire.environment.getDefaultChannelOptions().create,e||{}),i=this.protocolManager.getProviderProtocols(n?.protocols),r=i.map((e=>{switch(e){case"rtc":return new _t.RTCStrategy;case"classic":return new Mt.ClassicStrategy(this.wire,Et(this,Ct,"f"),t.channelId,t);default:return(0,At.exhaustiveCheck)(e,["rtc","classic"])}}));let o;if(2===r.length){const[e,t]=r;o=jt.default.combine(e,t)}else{if(1!==r.length)throw new Error("failed to combine strategies");[o]=r}const s=new St.ChannelProvider(t,(()=>St.ChannelProvider.wireClose(this.wire,t.channelName)),o),a=t.channelId;return this.providerMap.set(a,{provider:s,strategy:o,supportedProtocols:kt.getProtocolOptionsFromStrings(i)}),St.ChannelProvider.setProviderRemoval(s,this.removeChannelFromProviderMap.bind(this)),s}async createClientOffer(e){const t=this.protocolManager.getClientProtocols(e?.protocols);let n;return{offer:{supportedProtocols:await Promise.all(t.map((async e=>{switch(e){case"rtc":{const{rtcClient:e,channels:t,offer:i,rtcConnectionId:r,channelsOpened:o}=await Et(this,bt,"f").startClientOffer();return n={rtcClient:e,channels:t,channelsOpened:o},{type:"rtc",version:_t.RTCInfo.version,payload:{offer:i,rtcConnectionId:r}}}case"classic":return{type:"classic",version:Mt.ClassicInfo.version};default:return(0,At.exhaustiveCheck)(e,["rtc","classic"])}}))),maxProtocols:2},rtc:n}}async createClientStrategy(e,t){t.endpointId||(t.endpointId=this.wire.environment.getNextMessageId(),Et(this,Ct,"f").checkForPreviousClientConnection(t.channelId));const n=t.answer??{supportedProtocols:[{type:"classic",version:1}]},i=(await Promise.all(n.supportedProtocols.map((async n=>"rtc"===n.type&&e?(await Et(this,bt,"f").finishClientOffer(e.rtcClient,n.payload.answer,e.channelsOpened),new _t.RTCStrategy):"classic"===n.type?new Mt.ClassicStrategy(this.wire,Et(this,Ct,"f"),t.endpointId,t):null)))).filter((e=>null!==e));let r;if(e&&!i.some((e=>e instanceof _t.RTCStrategy))&&e&&e.rtcClient.close(),i.length>=2)r=jt.default.combine(i[0],i[1]);else{if(!i.length)throw new Error("No compatible protocols");[r]=i}const o={endpointIdentity:t,rtc:e};return r.addEndpoint(t.channelId,o),r}async processChannelConnection(e){const{clientIdentity:t,providerIdentity:n,ackToSender:i,payload:r,offer:o}=e.payload;t.endpointId?t.isLocalEndpointId=!1:(t.endpointId=this.wire.environment.getNextMessageId(),t.isLocalEndpointId=!0);const s=n.channelId,a=this.providerMap.get(s);if(!a)return i.payload.success=!1,i.payload.reason=`Channel "${n.channelName}" has been destroyed.`,this.wire.sendRaw(i);const{provider:c,strategy:d,supportedProtocols:h}=a;try{if(!(c instanceof St.ChannelProvider))throw Error("Cannot connect to a channel client");const e=o??{supportedProtocols:[{type:"classic",version:1}],maxProtocols:1},n=this.protocolManager.getCompatibleProtocols(h,e);if(!n.length)throw new Error("This provider does not support any of the offered protocols.");const s=await c.processConnection(t,r);i.payload.payload=i.payload.payload||{};let a={supportedProtocols:[],endpointPayloadPromise:Promise.resolve({endpointIdentity:t})};return a=await n.reduce((async(e,t)=>{const n=await e;if("rtc"===t.type){const{answer:e,rtcClient:i,channels:r}=await Et(this,bt,"f").createProviderAnswer(t.payload.rtcConnectionId,t.payload.offer);n.supportedProtocols.push({type:"rtc",version:_t.RTCInfo.version,payload:{answer:e}}),n.endpointPayloadPromise=n.endpointPayloadPromise.then((e=>r.then((t=>({...e,rtc:{rtcClient:i,channels:t}})))))}else n.supportedProtocols.push({type:"classic",version:Mt.ClassicInfo.version});return n}),Promise.resolve(a)),a.endpointPayloadPromise.then((e=>d.addEndpoint(t.endpointId,e))),i.payload.payload.result=s,i.payload.payload.answer=a,this.wire.sendRaw(i)}catch(e){return i.payload.success=!1,i.payload.reason=e.message,this.wire.sendRaw(i)}}}xe.ConnectionManager=kt,Ct=new WeakMap,bt=new WeakMap;var Lt,Tt,$t,Bt=s&&s.__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},Gt=s&&s.__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)};Object.defineProperty(le,"__esModule",{value:!0}),le.Channel=void 0;const Wt=t,Ht=G,Nt=d,Dt=ue,Ut=xe,Vt=Qe;function zt(e){const t=Math.floor(e/10),n=Math.min(3e4,500*2**t);return new Promise((e=>{setTimeout((()=>{e(!1)}),n)}))}class Kt extends Nt.EmitterBase{constructor(e){super(e,"channel"),Lt.set(this,void 0),Tt.set(this,new Wt.EventEmitter),$t.set(this,new Ht.AsyncRetryableLazy((async()=>{await Promise.all([this.on("disconnected",(e=>{Dt.ChannelClient.handleProviderDisconnect(e)})),this.on("connected",((...e)=>{Gt(this,Tt,"f").emit("connected",...e)}))]).catch((()=>new Error("error setting up channel connection listeners")))}))),Bt(this,Lt,new Ut.ConnectionManager(e),"f")}async getAllChannels(){return this.wire.sendAction("get-all-channels").then((({payload:e})=>e.data))}async onChannelConnect(e){await this.on("connected",e)}async onChannelDisconnect(e){await this.on("disconnected",e)}async safeConnect(e,t,n){const i={count:0};do{let r=()=>{};const o=new Promise((t=>{r=n=>{e===n.channelName&&t(!0)},Gt(this,Tt,"f").on("connected",r)}));try{if(i.count>0){i.gotConnectedEvent=await Promise.race([zt(i.count),o]);const t=await this.wire.sendAction("connect-to-channel",{...n,retryInfo:i});return console.log(`Successfully connected to channelName: ${e}`),t.payload.data}const t=this.wire.sendAction("connect-to-channel",n);i.originalMessageId=t.messageId;return(await t).payload.data}catch(n){if(!n.message.includes("internal-nack"))throw n;t&&0===i.count&&console.warn(`No channel found for channelName: ${e}. Waiting for connection...`)}finally{i.count+=1,Gt(this,Tt,"f").removeListener("connected",r)}}while(t);throw new Error(`No channel found for channelName: ${e}.`)}async connect(e,t={}){if(await Gt(this,$t,"f").getValue(),!e||"string"!=typeof e)throw new Error("Please provide a channelName string to connect to a channel.");const n={wait:!0,...this.wire.environment.getDefaultChannelOptions().connect,...t},{offer:i,rtc:r}=await Gt(this,Lt,"f").createClientOffer(n);let o;(this.fin.me.isFrame||this.fin.me.isView||this.fin.me.isWindow)&&(o=(await this.fin.me.getInfo()).url);const s={channelName:e,...n,offer:i,connectionUrl:o},a=await this.safeConnect(e,n.wait,s),c=await Gt(this,Lt,"f").createClientStrategy(r,a),d=new Dt.ChannelClient(a,(()=>Dt.ChannelClient.wireClose(this.wire,a,a.endpointId)),c);return c.onEndpointDisconnect(a.channelId,(async()=>{try{await d.sendDisconnectAction()}catch(e){console.warn(`Something went wrong during disconnect for client with uuid: ${a.uuid} / name: ${a.name} / endpointId: ${a.endpointId}.`)}finally{Dt.ChannelClient.handleProviderDisconnect(a)}})),d}async create(e,t){if(!e)throw new Error("Please provide a channelName to create a channel");const{payload:{data:n}}=await this.wire.sendAction("create-channel",{channelName:e}),i=Gt(this,Lt,"f").createProvider(t,n);return this.on("client-disconnected",(t=>{t.channelName===e&&Vt.ChannelProvider.handleClientDisconnection(i,t)})),i}}le.Channel=Kt,Lt=new WeakMap,Tt=new WeakMap,$t=new WeakMap,Object.defineProperty(de,"__esModule",{value:!0}),de.InterAppPayload=de.InterApplicationBus=void 0;const qt=t,Jt=d,Yt=he,Zt=le,Qt=O;class Xt extends Jt.Base{constructor(e){super(e),this.events={subscriberAdded:"subscriber-added",subscriberRemoved:"subscriber-removed"},this.refCounter=new Yt.RefCounter,this.Channel=new Zt.Channel(e),this.emitter=new qt.EventEmitter,e.registerMessageHandler(this.onmessage.bind(this)),this.on=this.emitter.on.bind(this.emitter),this.removeAllListeners=this.emitter.removeAllListeners.bind(this.emitter)}async publish(e,t){await this.wire.sendAction("publish-message",{topic:e,message:t,sourceWindowName:this.me.name})}async send(e,t,n){const i=(0,Qt.validateIdentity)(e);if(i)throw new Error(i);await this.wire.sendAction("send-message",{destinationUuid:e.uuid,destinationWindowName:e.name,topic:t,message:n,sourceWindowName:this.me.name})}subscribe(e,t,n){const i=this.createSubscriptionKey(e.uuid,e.name||"*",t);return this.emitter.on(i,n),this.refCounter.actOnFirst(i,(async()=>{await this.wire.sendAction("subscribe",{sourceUuid:e.uuid,sourceWindowName:e.name||"*",topic:t,destinationWindowName:this.me.name})}),(()=>Promise.resolve()))}unsubscribe(e,t,n){const i=e.name||"*",r=this.createSubscriptionKey(e.uuid,i,t);return this.emitter.removeListener(r,n),this.refCounter.actOnLast(r,(async()=>{await this.wire.sendAction("unsubscribe",{sourceUuid:e.uuid,sourceWindowName:i,topic:t,destinationWindowName:this.me.name})}),(()=>new Promise((e=>e)).then((()=>{}))))}processMessage(e){const{payload:{message:t,sourceWindowName:n,sourceUuid:i,topic:r}}=e,o=[this.createSubscriptionKey(i,n,r),this.createSubscriptionKey(i,"*",r),this.createSubscriptionKey("*","*",r)],s={uuid:i,name:n};o.forEach((e=>{this.emitter.emit(e,t,s)}))}emitSubscriverEvent(e,t){const{payload:{targetName:n,uuid:i,topic:r}}=t,o={name:n,uuid:i,topic:r};this.emitter.emit(e,o)}createSubscriptionKey(e,t,n){const i=t||"*";if(!(e&&i&&n))throw new Error("Missing uuid, name, or topic string");return function(...e){return e.map((e=>Buffer.from(`${e}`).toString("base64"))).join("/")}(e,i,n)}onmessage(e){const{action:t}=e;switch(t){case"process-message":this.processMessage(e);break;case this.events.subscriberAdded:this.emitSubscriverEvent(this.events.subscriberAdded,e);break;case this.events.subscriberRemoved:this.emitSubscriverEvent(this.events.subscriberRemoved,e)}return!0}}de.InterApplicationBus=Xt;de.InterAppPayload=class{};var en={};Object.defineProperty(en,"__esModule",{value:!0}),en.Clipboard=void 0;const tn=d;class nn extends tn.Base{async writeText(e){await this.wire.sendAction("clipboard-write-text",e)}async readText(e){const{payload:t}=await this.wire.sendAction("clipboard-read-text",{type:e});return t.data}async writeImage(e){await this.wire.sendAction("clipboard-write-image",e)}async readImage(e={format:"dataURL"}){const{payload:t}=await this.wire.sendAction("clipboard-read-image",e);return t.data}async writeHtml(e){await this.wire.sendAction("clipboard-write-html",e)}async readHtml(e){const{payload:t}=await this.wire.sendAction("clipboard-read-html",{type:e});return t.data}async writeRtf(e){await this.wire.sendAction("clipboard-write-rtf",e)}async readRtf(e){const{payload:t}=await this.wire.sendAction("clipboard-read-rtf",{type:e});return t.data}async write(e){await this.wire.sendAction("clipboard-write",e)}async getAvailableFormats(e){const{payload:t}=await this.wire.sendAction("clipboard-read-formats",{type:e});return t.data}}en.Clipboard=nn;var rn={},on={},sn={};Object.defineProperty(sn,"__esModule",{value:!0}),sn.ExternalApplication=void 0;const an=d;class cn extends an.EmitterBase{constructor(e,t){super(e,"external-application",t.uuid),this.identity=t}getInfo(){return this.wire.sendAction("get-external-application-info",this.identity).then((({payload:e})=>e.data))}}sn.ExternalApplication=cn,Object.defineProperty(on,"__esModule",{value:!0}),on.ExternalApplicationModule=void 0;const dn=d,hn=sn;class ln extends dn.Base{wrap(e){return this.wire.sendAction("external-application-wrap").catch((e=>{})),Promise.resolve(new hn.ExternalApplication(this.wire,{uuid:e}))}wrapSync(e){return this.wire.sendAction("external-application-wrap-sync").catch((e=>{})),new hn.ExternalApplication(this.wire,{uuid:e})}}on.ExternalApplicationModule=ln,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(on,e),n(sn,e)}(rn);var un={},pn={},wn={};Object.defineProperty(wn,"__esModule",{value:!0}),wn._Frame=void 0;const yn=d;class fn extends yn.EmitterBase{constructor(e,t){super(e,"frame",t.uuid,t.name),this.identity=t}getInfo(){return this.wire.sendAction("get-frame-info",this.identity).then((({payload:e})=>e.data))}getParentWindow(){return this.wire.sendAction("get-parent-window",this.identity).then((({payload:e})=>e.data))}}wn._Frame=fn,Object.defineProperty(pn,"__esModule",{value:!0}),pn._FrameModule=void 0;const gn=d,mn=O,vn=wn;class Cn extends gn.Base{async wrap(e){this.wire.sendAction("frame-wrap").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}wrapSync(e){this.wire.sendAction("frame-wrap-sync").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}getCurrent(){return this.wire.sendAction("frame-get-current").catch((e=>{})),Promise.resolve(new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity()))}getCurrentSync(){return this.wire.sendAction("frame-get-current-sync").catch((e=>{})),new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity())}}pn._FrameModule=Cn,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(pn,e),n(wn,e)}(un);var bn={};Object.defineProperty(bn,"__esModule",{value:!0}),bn.GlobalHotkey=void 0;const In=d;class En extends In.EmitterBase{constructor(e){super(e,"global-hotkey")}async register(e,t){await this.on(e,t),await this.wire.sendAction("global-hotkey-register",{hotkey:e})}async unregister(e){await this.removeAllListeners(e),await this.wire.sendAction("global-hotkey-unregister",{hotkey:e})}async unregisterAll(){await Promise.all(this.eventNames().filter((e=>!("registered"===e||"unregistered"===e))).map((e=>this.removeAllListeners(e)))),await this.wire.sendAction("global-hotkey-unregister-all",{})}async isRegistered(e){const{payload:{data:t}}=await this.wire.sendAction("global-hotkey-is-registered",{hotkey:e});return t}}bn.GlobalHotkey=En;var xn,An={},Pn={},Mn={},_n=s&&s.__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)};Object.defineProperty(Mn,"__esModule",{value:!0}),Mn.Platform=void 0;const On=d,Sn=O,Rn=new Map;class Fn extends On.EmitterBase{constructor(e,t){super(t.wire,"application",e.uuid),this.getClient=e=>{this.wire.sendAction("platform-get-client",this.identity).catch((e=>{}));const t=e||this.identity,{uuid:n}=t;if(!Rn.has(n)){const e=_n(this,xn,"f").call(this,n);Rn.set(n,e)}return Rn.get(n)},xn.set(this,(async e=>{try{const t=`custom-frame-${e}`,n=await this._channel.connect(t,{wait:!1});return n.onDisconnection((()=>{Rn.delete(e)})),n}catch(t){throw Rn.delete(e),new Error("The targeted Platform is not currently running. Listen for application-started event for the given Uuid.")}})),this.launchLegacyManifest=this.launchContentManifest;const n=(0,Sn.validateIdentity)(e);if(n)throw new Error(n);this._channel=t,this.identity={uuid:e.uuid},this.Layout=this.fin.Platform.Layout,this.Application=this.fin.Application.wrapSync(this.identity)}async createView(e,t,n){this.wire.sendAction("platform-create-view",this.identity).catch((e=>{}));const i=await this.getClient(),r=await i.dispatch("create-view",{target:t,opts:e,targetView:n});if(!r||(0,Sn.validateIdentity)(r.identity))throw new Error(`When overwriting the createView call, please return an object that has a valid 'identity' property: ${JSON.stringify(r)}`);return this.fin.View.wrapSync(r.identity)}async createWindow(e){this.wire.sendAction("platform-create-window",this.identity).catch((e=>{}));const t=await this.getClient();e.reason||(e.reason="api-call");const n=await t.dispatch("create-view-container",e);if(!n||(0,Sn.validateIdentity)(n.identity))throw new Error(`When overwriting the createWindow call, please return an object that has a valid 'identity' property: ${JSON.stringify(n)}`);const{identity:i}=n,r=this.fin.Window.wrapSync(i);return r.name=i.name,r.uuid=i.uuid,r}async quit(){this.wire.sendAction("platform-quit",this.identity).catch((e=>{}));return(await this.getClient()).dispatch("quit")}async closeView(e){this.wire.sendAction("platform-close-view",this.identity).catch((e=>{}));const t=await this.getClient();await t.dispatch("close-view",{view:e})}async reparentView(e,t){console.warn("Platform.reparentView has been deprecated, please use Platform.createView"),this.wire.sendAction("platform-reparent-view",this.identity).catch((e=>{}));const n={...e,uuid:e.uuid??this.identity.uuid},i=await this.fin.View.wrap(n),r=await i.getOptions();return this.createView(r,t)}async getSnapshot(){this.wire.sendAction("platform-get-snapshot",this.identity).catch((e=>{}));return(await this.getClient()).dispatch("get-snapshot")}async getViewSnapshot(e){return(await this.getClient()).dispatch("get-view-snapshot",{viewIdentity:e})}async applySnapshot(e,t){this.wire.sendAction("platform-apply-snapshot",this.identity).catch((e=>{}));const n="Requested snapshot must be a valid Snapshot object, or a url or filepath to such an object.";let i;if("string"==typeof e)try{i=(await this._channel.wire.sendAction("get-application-manifest",{manifestUrl:e})).payload.data}catch(e){throw new Error(`${n}: ${e}`)}else i=e;if(!i.windows)throw new Error(n);const r=await this.getClient();return await r.dispatch("apply-snapshot",{snapshot:i,options:t}),this}async fetchManifest(e){return(await this.getClient()).dispatch("platform-fetch-manifest",{manifestUrl:e})}async launchContentManifest(e){this.wire.sendAction("platform-launch-content-manifest",this.identity).catch((()=>{}));const t=await this.getClient(),n=await this.fetchManifest(e);return t.dispatch("launch-into-platform",{manifest:n,manifestUrl:e}),this}async setWindowContext(e={},t){if(this.wire.sendAction("platform-set-window-context",this.identity).catch((e=>{})),!e)throw new Error("Please provide a serializable object or string to set the context.");const n=await this.getClient(),{entityType:i}=t?await this.fin.System.getEntityInfo(t.uuid,t.name):this.fin.me;await n.dispatch("set-window-context",{context:e,entityType:i,target:t||{uuid:this.fin.me.uuid,name:this.fin.me.name}})}async getWindowContext(e){this.wire.sendAction("platform-get-window-context",this.identity).catch((e=>{}));const t=await this.getClient(),{entityType:n}=e?await this.fin.System.getEntityInfo(e.uuid,e.name):this.fin.me;return t.dispatch("get-window-context",{target:e||{uuid:this.fin.me.uuid,name:this.fin.me.name},entityType:n})}async closeWindow(e,t={skipBeforeUnload:!1}){this.wire.sendAction("platform-close-window",this.identity).catch((e=>{}));return(await this.getClient()).dispatch("close-window",{windowId:e,options:t})}}Mn.Platform=Fn,xn=new WeakMap;var jn={},kn={},Ln={},Tn={};function $n(e){switch(e){case"columns":case"grid":case"rows":case"tabs":return!0;default:return!1}}Object.defineProperty(Tn,"__esModule",{value:!0}),Tn.overrideFromComposables=Tn.isValidPresetType=void 0,Tn.isValidPresetType=$n,Tn.overrideFromComposables=function(...e){return t=>e.reduceRight(((e,t)=>n=>t(e(n))),(e=>e))(t)},Tn.default={isValidPresetType:$n};var Bn={},Gn={},Wn={};Object.defineProperty(Wn,"__esModule",{value:!0}),Wn.ApiConsumer=void 0;Wn.ApiConsumer=class{constructor(e){this.strategy=e,this.consume=async e=>(await this.strategy.getExposedFunctions(e)).reduce(((t,n)=>({...t,[n.key]:this.strategy.createFunction(n,e)})),{})}};var Hn={},Nn={};Object.defineProperty(Nn,"__esModule",{value:!0}),Nn.expose=Nn.getExposedProperties=void 0;const Dn=Symbol("exposedProperties");Nn.getExposedProperties=e=>e[Dn]||e.prototype[Dn]||[];Nn.expose=e=>(t,n,i)=>{t[Dn]=t[Dn]||[],t[Dn].push({key:n,descriptor:i,options:e})},Object.defineProperty(Hn,"__esModule",{value:!0}),Hn.ApiExposer=void 0;const Un=Nn;Hn.ApiExposer=class{constructor(e){this.strategy=e,this.exposeInstance=async(e,t)=>{const n=(0,Un.getExposedProperties)(e),i=await Promise.all(n.map((async({key:n,options:i})=>({key:n,options:await this.strategy.exposeFunction(e[n].bind(e),{key:n,options:i,meta:t})}))));await this.strategy.exposeMeta(t,i)}}};var Vn={},zn={},Kn={};Object.defineProperty(Kn,"__esModule",{value:!0}),Kn.ChannelsConsumer=void 0;Kn.ChannelsConsumer=class{constructor(e){this.channel=e,this.getExposedFunctions=async e=>{const{id:t}=e,{props:n}=await this.channel.dispatch(`api-meta:${t}`);return n},this.createFunction=e=>(...t)=>{const{action:n}=e.options;return this.channel.dispatch(n,{args:t})}}};var qn={};Object.defineProperty(qn,"__esModule",{value:!0}),qn.ChannelsExposer=void 0;qn.ChannelsExposer=class{constructor(e){this.channelProviderOrClient=e,this.exposeFunction=async(e,t)=>{const{key:n,options:i,meta:r}=t,{id:o}=r,s=`${o}.${i?.action||n}`;return await this.channelProviderOrClient.register(s,(async({args:t})=>e(...t))),{action:s}},this.exposeMeta=async({id:e},t)=>{const n=`api-meta:${e}`;await this.channelProviderOrClient.register(n,(()=>({props:t})))}}},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Kn,e),n(qn,e)}(zn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(zn,e)}(Vn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Wn,e),n(Hn,e),n(Vn,e),n(Nn,e)}(Gn);var Jn={};Object.defineProperty(Jn,"__esModule",{value:!0}),Jn.createRelayedDispatch=exports.relayChannelClientApi_1=Jn.relayChannelClientApi=void 0;const Yn=["no longer connected","RTCDataChannel closed unexpectedly","The client you are trying to dispatch from is disconnected from the target provider"];exports.relayChannelClientApi_1=Jn.relayChannelClientApi=async(e,t)=>{e.register(`relay:${t}`,(({action:t,target:n,payload:i})=>e.dispatch(n,t,i))),await Promise.resolve()};Jn.createRelayedDispatch=(e,t,n,i)=>async(r,o)=>{try{return await e.dispatch(`relay:${n}`,{action:r,payload:o,target:t})}catch(e){if(s=e.message,Yn.some((e=>s.includes(e)))&&i)throw new Error(i);throw e}var s};var Zn,Qn,Xn,ei=s&&s.__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},ti=s&&s.__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)};Object.defineProperty(Bn,"__esModule",{value:!0}),Bn.ColumnOrRow=Bn.TabStack=Bn.LayoutNode=void 0;const ni=Gn,ii=Jn;class ri{constructor(e,t){Zn.set(this,void 0),this.isRoot=()=>ti(this,Zn,"f").isRoot(this.entityId),this.exists=()=>ti(this,Zn,"f").exists(this.entityId),this.getParent=async()=>{const e=await ti(this,Zn,"f").getParent(this.entityId);if(e)return ri.getEntity(e,ti(this,Zn,"f"))},this.createAdjacentStack=async(e,t)=>{const n=await ti(this,Zn,"f").createAdjacentStack(this.entityId,e,t);return ri.getEntity({entityId:n,type:"stack"},ti(this,Zn,"f"))},this.getAdjacentStacks=async e=>(await ti(this,Zn,"f").getAdjacentStacks({targetId:this.entityId,edge:e})).map((e=>ri.getEntity({type:"stack",entityId:e.entityId},ti(this,Zn,"f")))),ei(this,Zn,e,"f"),this.entityId=t}}Bn.LayoutNode=ri,Zn=new WeakMap,ri.newLayoutEntitiesClient=async(e,t,n)=>{const i=(0,ii.createRelayedDispatch)(e,n,"layout-relay","You are trying to interact with a layout component on a window that does not exist or has been destroyed.");return new ni.ApiConsumer(new ni.ChannelsConsumer({dispatch:i})).consume({id:t})},ri.getEntity=(e,t)=>{const{entityId:n,type:i}=e;switch(i){case"column":case"row":return new si(t,n,i);case"stack":return new oi(t,n);default:throw new Error(`Unrecognised Layout Entity encountered ('${JSON.stringify(e)})`)}};class oi extends ri{constructor(e,t){super(e,t),Qn.set(this,void 0),this.type="stack",this.getViews=()=>ti(this,Qn,"f").getStackViews(this.entityId),this.addView=async(e,t={index:0})=>ti(this,Qn,"f").addViewToStack(this.entityId,e,t),this.removeView=async e=>{await ti(this,Qn,"f").removeViewFromStack(this.entityId,e)},this.setActiveView=async e=>{await ti(this,Qn,"f").setStackActiveView(this.entityId,e)},ei(this,Qn,e,"f")}}Bn.TabStack=oi,Qn=new WeakMap;class si extends ri{constructor(e,t,n){super(e,t),Xn.set(this,void 0),this.getContent=async()=>(await ti(this,Xn,"f").getContent(this.entityId)).map((e=>ri.getEntity(e,ti(this,Xn,"f")))),ei(this,Xn,e,"f"),this.type=n}}Bn.ColumnOrRow=si,Xn=new WeakMap;var ai={};Object.defineProperty(ai,"__esModule",{value:!0}),ai.DEFAULT_LAYOUT_KEY=ai.LAYOUT_CONTROLLER_ID=void 0,ai.LAYOUT_CONTROLLER_ID="layout-entities",ai.DEFAULT_LAYOUT_KEY="__default__";var ci,di,hi,li=s&&s.__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)};Object.defineProperty(Ln,"__esModule",{value:!0}),Ln.Layout=void 0;const ui=G,pi=O,wi=d,yi=Tn,fi=Bn,gi=ai;class mi extends wi.Base{static getClient(e){return li(e,di,"f").getValue()}constructor(e,t){super(t),ci.add(this),di.set(this,new ui.Lazy((async()=>fi.LayoutNode.newLayoutEntitiesClient(await this.platform.getClient(),gi.LAYOUT_CONTROLLER_ID,this.identity)))),this.replace=async e=>{this.wire.sendAction("layout-replace").catch((e=>{}));const t=await this.platform.getClient();await t.dispatch("replace-layout",{target:this.identity,opts:{layout:e}})},this.replaceView=async(e,t)=>{this.wire.sendAction("layout-replace-view").catch((e=>{}));const n=await this.platform.getClient();await n.dispatch("replace-view",{target:this.identity,opts:{viewToReplace:e,newView:t}})},this.applyPreset=async e=>{this.wire.sendAction("layout-apply-preset").catch((e=>{}));const t=await this.platform.getClient(),{presetType:n}=e;if(!n||!(0,yi.isValidPresetType)(n))throw new Error("Cannot apply preset layout, please include an applicable presetType property in the PresetLayoutOptions.");await t.dispatch("apply-preset-layout",{target:this.identity,opts:{presetType:n}})};const n=(0,pi.validateIdentity)(e);if(n)throw new Error(n);this.identity=e,this.platform=this.fin.Platform.wrapSync({uuid:e.uuid}),e.uuid===this.fin.me.uuid&&e.name===this.fin.me.name&&(this.init=this.fin.Platform.Layout.init)}async getConfig(){this.wire.sendAction("layout-get-config").catch((e=>{}));return(await this.platform.getClient()).dispatch("get-frame-snapshot",{target:this.identity})}async getCurrentViews(){this.wire.sendAction("layout-get-views").catch((e=>{}));const e=await this.platform.getClient();return(await e.dispatch("get-layout-views",{target:this.identity})).map((e=>this.fin.View.wrapSync(e)))}async getRootItem(){this.wire.sendAction("layout-get-root-item").catch((()=>{}));const e=await li(this,di,"f").getValue(),t=await e.getRoot("layoutName"in this.identity?this.identity:void 0);return fi.LayoutNode.getEntity(t,e)}async getStackByViewIdentity(e){this.wire.sendAction("layout-get-stack-by-view").catch((()=>{}));const t=await li(this,di,"f").getValue(),n=await t.getStackByView(e);if(!n)throw new Error(`No stack found for view: ${e.uuid}/${e.name}`);return fi.LayoutNode.getEntity(n,t)}async addView(e,{location:t,targetView:n}={}){this.wire.sendAction("layout-add-view").catch((e=>{}));const{identity:i}=await li(this,ci,"m",hi).call(this,"layout-add-view",{viewOptions:e,location:t,targetView:n});return{identity:i}}async closeView(e){this.wire.sendAction("layout-close-view").catch((e=>{})),await li(this,ci,"m",hi).call(this,"layout-close-view",{viewIdentity:e})}}Ln.Layout=mi,di=new WeakMap,ci=new WeakSet,hi=async function(e,t){return(await this.platform.getClient()).dispatch(e,{target:this.identity,opts:t})};var vi,Ci,bi,Ii,Ei,xi=s&&s.__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)},Ai=s&&s.__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};Object.defineProperty(kn,"__esModule",{value:!0}),kn.LayoutModule=void 0;const Pi=d,Mi=Ln,_i=ai;class Oi extends Pi.Base{constructor(){super(...arguments),vi.add(this),Ci.set(this,!1),bi.set(this,null),this.init=async(e={})=>{if(this.wire.sendAction("layout-init").catch((e=>{})),!this.wire.environment.layoutAllowedInContext(this.fin))throw new Error("Layout.init can only be called from a Window context.");if(xi(this,Ci,"f"))throw new Error("Layout.init was already called, please use Layout.create to add additional layouts.");"openfin"===this.wire.environment.type&&await this.fin.Platform.getCurrentSync().getClient(),Ai(this,Ci,!0,"f"),Ai(this,bi,await this.wire.environment.initLayoutManager(this.fin,this.wire,e),"f"),await this.wire.environment.applyLayoutSnapshot(this.fin,xi(this,bi,"f"),e);const t={name:this.fin.me.name,uuid:this.fin.me.uuid};if(!e.layoutManagerOverride){const e={layoutName:_i.DEFAULT_LAYOUT_KEY,...t};return xi(this,Ii,"f").call(this,e)}return this.wrapSync(t)},Ii.set(this,(e=>{const t="[Layout] You are using a deprecated property `layoutManager` - it will throw if you access it starting in v37.",n=new Proxy({},{get(e,n){throw console.warn(`[Layout-mgr-proxy] accessing ${n.toString()}`),new Error(t)}}),i=Object.assign(this.wrapSync(e),{layoutManager:n});return new Proxy(i,{get(e,n){if("layoutManager"===n)throw console.warn(`[Layout-proxy] accessing ${n.toString()}`),new Error(t);return e[n]}})})),this.getCurrentLayoutManagerSync=()=>xi(this,vi,"m",Ei).call(this,"fin.Platform.Layout.getCurrentLayoutManagerSync()"),this.create=async e=>this.wire.environment.createLayout(xi(this,vi,"m",Ei).call(this,"fin.Platform.Layout.create()"),e),this.destroy=async e=>this.wire.environment.destroyLayout(xi(this,vi,"m",Ei).call(this,"fin.Platform.Layout.destroy()"),e)}async wrap(e){return this.wire.sendAction("layout-wrap").catch((e=>{})),new Mi.Layout(e,this.wire)}wrapSync(e){return this.wire.sendAction("layout-wrap-sync").catch((e=>{})),new Mi.Layout(e,this.wire)}async getCurrent(){if(this.wire.sendAction("layout-get-current").catch((e=>{})),"openfin"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error("You are not in a Window context. Only Windows can have a Layout.");const{uuid:e,name:t}=this.fin.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction("layout-get-current-sync").catch((e=>{})),"openfin"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error("You are not in a Window context. Only Windows can have a Layout.");const{uuid:e,name:t}=this.fin.me;return this.wrapSync({uuid:e,name:t})}async getLayoutByViewIdentity(e){this.wire.sendAction("layout-get-by-view-identity").catch((()=>{}));let t=await this.wire.environment.getViewWindowIdentity(this.fin,e);t.identity&&(t=t.identity);try{const n=this.wrapSync(t),i=await Mi.Layout.getClient(n),r=await i.getLayoutIdentityForViewOrThrow(e);return this.wrapSync(r)}catch(n){if(!["No action registered at target for","getLayoutIdentityForViewOrThrow is not a function"].some((e=>n.message.includes(e))))throw n;if(t.uuid===t.name)throw new Error(`View identity ${JSON.stringify(e)} is not attached to any layout in provider window ${JSON.stringify(t)}.`);return this.wrapSync(t)}}}kn.LayoutModule=Oi,Ci=new WeakMap,bi=new WeakMap,Ii=new WeakMap,vi=new WeakSet,Ei=function(e){if(!xi(this,bi,"f"))throw new Error(`You must call init before using the API ${e}`);return xi(this,bi,"f")},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(kn,e),n(Ln,e)}(jn),Object.defineProperty(Pn,"__esModule",{value:!0}),Pn.PlatformModule=void 0;const Si=d,Ri=Mn,Fi=jn;class ji extends Si.Base{constructor(e,t){super(e),this._channel=t,this.Layout=new Fi.LayoutModule(this.wire)}async init(e){if(!fin.__internal_.isPlatform||fin.me.name!==fin.me.uuid)throw new Error("fin.Platform.init should only be called from a custom platform provider running in the main window of the application.");return this.wire.environment.initPlatform(this.fin,e)}async wrap(e){return this.wire.sendAction("platform-wrap").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}wrapSync(e){return this.wire.sendAction("platform-wrap-sync").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}async getCurrent(){return this.wire.sendAction("platform-get-current").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction("platform-get-current-sync").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}start(e){return this.wire.sendAction("platform-start").catch((e=>{})),new Promise((async(t,n)=>{try{const{uuid:n}=e,i=await this.fin.Application._create({...e,isPlatformController:!0});i.once("platform-api-ready",(()=>t(this.wrapSync({uuid:n})))),i._run({uuid:n})}catch(e){n(e)}}))}startFromManifest(e,t){return this.wire.sendAction("platform-start-from-manifest").catch((e=>{})),new Promise((async(n,i)=>{try{const i=await this.fin.Application._createFromManifest(e);i.once("platform-api-ready",(()=>n(this.wrapSync({uuid:i.identity.uuid})))),i._run(t)}catch(e){i(e)}}))}}Pn.PlatformModule=ji,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Pn,e),n(Mn,e)}(An);var ki={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getMe=e.getBaseMe=e.environmentUnsupportedMessage=void 0;const t=J(),n=un,i=ie(),r=rn;function o(e,t,n){return{...{isView:"view"===e,isWindow:"window"===e,isFrame:"iframe"===e,isExternal:"external connection"===e},uuid:t,name:n,entityType:e}}e.environmentUnsupportedMessage="You are not running in OpenFin.",e.getBaseMe=o,e.getMe=function(s){const{uuid:a,name:c,entityType:d}=s.me,h={setContext(){throw new Error(e.environmentUnsupportedMessage)},addContextHandler(){throw new Error(e.environmentUnsupportedMessage)},getContextGroups(){throw new Error(e.environmentUnsupportedMessage)},joinContextGroup(){throw new Error(e.environmentUnsupportedMessage)},removeFromContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getAllClientsInContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getInfoForContextGroup(){throw new Error(e.environmentUnsupportedMessage)}},l="Interop API has not been instantiated. Either connection has failed or you have not declared interop in your config.",u={setContext(){throw new Error(l)},addContextHandler(){throw new Error(l)},getContextGroups(){throw new Error(l)},joinContextGroup(){throw new Error(l)},removeFromContextGroup(){throw new Error(l)},getAllClientsInContextGroup(){throw new Error(l)},getInfoForContextGroup(){throw new Error(l)}},p={eventNames:()=>{throw new Error(e.environmentUnsupportedMessage)},emit:()=>{throw new Error(e.environmentUnsupportedMessage)},listeners:()=>{throw new Error(e.environmentUnsupportedMessage)},listenerCount:()=>{throw new Error(e.environmentUnsupportedMessage)},on:()=>{throw new Error(e.environmentUnsupportedMessage)},addListener:()=>{throw new Error(e.environmentUnsupportedMessage)},once:()=>{throw new Error(e.environmentUnsupportedMessage)},prependListener:()=>{throw new Error(e.environmentUnsupportedMessage)},prependOnceListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeAllListeners:()=>{throw new Error(e.environmentUnsupportedMessage)}};switch(d){case"view":return Object.assign(new t.View(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case"window":return Object.assign(new i._Window(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case"iframe":return Object.assign(new n._Frame(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case"external connection":return Object.assign(new r.ExternalApplication(s,{uuid:a}),o(d,a,c),{interop:u,isOpenFin:!1});default:return{...o(d,a,c),...p,interop:h,isOpenFin:!1}}}}(ki);var Li={},Ti={},$i={};Object.defineProperty($i,"__esModule",{value:!0}),$i.createWarningObject=$i.createUnusableObject=void 0,$i.createUnusableObject=function(e){const t=()=>{throw new Error(e)};return new Proxy({},{apply:t,construct:t,defineProperty:t,deleteProperty:t,get:t,getOwnPropertyDescriptor:t,getPrototypeOf:t,has:t,isExtensible:t,ownKeys:t,preventExtensions:t,set:t,setPrototypeOf:t})},$i.createWarningObject=function(e,t){return new Proxy(t,{get:(...t)=>(console.warn(e),Reflect.get(...t)),set:(...t)=>(console.warn(e),Reflect.set(...t)),getOwnPropertyDescriptor:(...t)=>(console.warn(e),Reflect.getOwnPropertyDescriptor(...t)),ownKeys:(...t)=>(console.warn(e),Reflect.ownKeys(...t))})};var Bi,Gi={},Wi={};var Hi={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.wrapIntentHandler=e.BROKER_ERRORS=e.generateOverrideWarning=e.generateOverrideError=e.wrapContextHandler=e.wrapInTryCatch=e.generateId=void 0;e.generateId=()=>`${Math.random()}${Date.now()}`;e.wrapInTryCatch=(e,t)=>(...n)=>{try{return e(...n)}catch(e){throw new Error((t||"")+e)}};e.wrapContextHandler=(e,t)=>async n=>{try{await e(n)}catch(e){throw console.error(`Error thrown by handler ${t} for context type ${n.type}: ${e}`),e}};e.generateOverrideError=(e,t)=>`You have tried to to use ${e} but ${t} has not been overridden in the Interop Broker. Please override this function. Refer to our documentation for more info.`;e.generateOverrideWarning=(e,t,n,i)=>{const{uuid:r,name:o}=n;return i?`Entity with identity: ${r}/${o} has called ${i} or ${e} but ${t} has not been overridden.`:`Entity with identity: ${r}/${o} has called ${e} but ${t} has not been overridden.`},e.BROKER_ERRORS={fireIntent:(0,e.generateOverrideError)("fireIntent","handleFiredIntent"),fireIntentForContext:(0,e.generateOverrideError)("fireIntentForContext","handleFiredIntentForContext"),getInfoForIntent:(0,e.generateOverrideError)("getInfoForIntent","handleInfoForIntent"),getInfoForIntentsByContext:(0,e.generateOverrideError)("getInfoForIntentsByContext","handleInfoForIntentsByContext"),joinSessionContextGroupWithJoinContextGroup:"The Context Group you have tried to join is a Session Context Group. Custom Context Groups can only be defined by the Interop Broker through code or manifest configuration. Please use joinSessionContextGroup.",fdc3Open:(0,e.generateOverrideError)("fdc3.open","fdc3HandleOpen"),fdc3FindInstances:(0,e.generateOverrideError)("fdc3.findInstances","fdc3HandleFindInstances"),fdc3GetAppMetadata:(0,e.generateOverrideError)("fdc3.getAppMetadata","fdc3HandleGetAppMetadata"),fdc3GetInfo:(0,e.generateOverrideError)("fdc3.getInfo","fdc3HandleGetInfo")};e.wrapIntentHandler=(e,t)=>async n=>{try{return e(n)}catch(e){throw console.error(`Error thrown by handler ${t}: ${e}`),e}}}(Hi);var Ni,Di,Ui={};function Vi(){if(Di)return Gi;Di=1;var e,t,n,r=s&&s.__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},o=s&&s.__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)},a=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Gi,"__esModule",{value:!0}),Gi.InteropBroker=void 0;const c=d,h=a(function(){if(Bi)return Wi;Bi=1,Object.defineProperty(Wi,"__esModule",{value:!0});const e=Cr();return Wi.default=class{constructor(e,t){this.provider=e,this.id=t,this.lastContext=void 0,this.contextGroupMap=new Map,this.clients=new Map,this.registerListeners()}registerListeners(){this.provider.register(`sessionContextGroup:getContext-${this.id}`,this.getCurrentContext.bind(this)),this.provider.register(`sessionContextGroup:setContext-${this.id}`,this.setContext.bind(this)),this.provider.register(`sessionContextGroup:handlerAdded-${this.id}`,this.handlerAdded.bind(this)),this.provider.register(`sessionContextGroup:handlerRemoved-${this.id}`,this.handlerRemoved.bind(this))}getCurrentContext(e){return e.type?this.contextGroupMap.get(e.type):this.lastContext}setContext(t,n){const{context:i}=t,r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name} not in Session Client State Map`);this.contextGroupMap.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{e.contextHandlers.get(i.type)?.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getClientState(e){return this.clients.get(e.endpointId)}async handlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(i){const e=r.contextHandlers.get(i)||[];r.contextHandlers.set(i,[...e,n]);const o=this.contextGroupMap.get(i);o&&await this.provider.dispatch(t,n,o)}else{r.globalHandler=n;const e=[...this.contextGroupMap.keys()].map((async e=>{const i=this.contextGroupMap.get(e);i&&await this.provider.dispatch(t,n,i)}));await Promise.all(e)}}handlerRemoved(e,t){const{handlerId:n}=e,i=this.clients.get(t.endpointId);i?(Array.from(i.contextHandlers).forEach((([,e])=>{const t=e.indexOf(n);t>-1&&e.splice(t,1)})),i.globalHandler===n&&(i.globalHandler=void 0)):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={contextHandlers:new Map,clientIdentity:e,globalHandler:void 0};this.clients.set(e.endpointId,t)}}onDisconnection(e){this.clients.delete(e.endpointId)}},Wi}()),l=Hi,u=a(i),p=function(){if(Ni)return Ui;Ni=1,Object.defineProperty(Ui,"__esModule",{value:!0}),Ui.PrivateChannelProvider=void 0;const e=Vi();return Ui.PrivateChannelProvider=class t{constructor(e,t){this.provider=e,this.id=t,this.clients=new Map,this.registerListeners(),this.contextByContextType=new Map,this.lastContext=void 0,this.provider.onConnection((e=>this.registerNewClient(e))),this.provider.onDisconnection((async e=>{const{endpointId:t}=e;this.clients.has(t)&&await this.handleClientDisconnecting(e),0===(await this.provider.getAllClientInfo()).length&&this.provider.destroy()}))}getClientState(e){return this.clients.get(e.endpointId)}registerListeners(){this.provider.register("broadcast",this.broadcast.bind(this)),this.provider.register("getCurrentContext",this.getCurrentContext.bind(this)),this.provider.register("contextHandlerAdded",this.contextHandlerAdded.bind(this)),this.provider.register("contextHandlerRemoved",this.contextHandlerRemoved.bind(this)),this.provider.register("nonStandardHandlerRemoved",this.nonStandardHandlerRemoved.bind(this)),this.provider.register("onAddContextHandlerAdded",this.onAddContextHandlerAdded.bind(this)),this.provider.register("onDisconnectHandlerAdded",this.onDisconnectHandlerAdded.bind(this)),this.provider.register("onUnsubscribeHandlerAdded",this.onUnsubscribeHandlerAdded.bind(this)),this.provider.register("clientDisconnecting",((e,t)=>{this.handleClientDisconnecting(t)}))}broadcast(t,n){const{context:i}=t;if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name}, tried to call broadcast, is not connected to this Private Channel`);const r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to broadcast - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);this.contextByContextType.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{const t=e.handlerIdsByContextTypes.get(i.type);t&&t.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getCurrentContext(e,t){const{contextType:n}=e;if(!this.getClientState(t))throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call getCurrentContext, is not connected to this Private Channel`);if(void 0!==n){return this.contextByContextType.get(n)||null}return this.lastContext?this.lastContext:null}contextHandlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call addContextListener, is not connected to this Private Channel`);if(i){const e=r.handlerIdsByContextTypes.get(i)||[];r.handlerIdsByContextTypes.set(i,[...e,n])}else r.globalHandler=n;Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&e.onAddContextListenerHandlerId&&this.provider.dispatch(e.clientIdentity,e.onAddContextListenerHandlerId,i)}))}async contextHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);if(i){let e;if(i.globalHandler===n)i.globalHandler=void 0;else for(const[t,r]of i.handlerIdsByContextTypes){const i=r.indexOf(n);i>-1&&(r.splice(i,1),e=t)}const r=(await this.getConnectedClients()).map((async n=>{const{clientIdentity:i,clientIdentity:{endpointId:r},onUnsubscribeHandlerId:o}=n;r!==t.endpointId&&o&&await this.provider.dispatch(i,o,e)}));try{await Promise.all(r)}catch(e){throw console.error(`Problem when attempting to dispatch to onUnsubscribeHandlers. Error: ${e} Removing Client: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}`),new Error(e)}}else console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}.`)}nonStandardHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);i?i.onDisconnectHandlerId===n?i.onDisconnectHandlerId=void 0:i.onAddContextListenerHandlerId===n?i.onAddContextListenerHandlerId=void 0:i.onUnsubscribeHandlerId===n&&(i.onUnsubscribeHandlerId=void 0):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}onAddContextHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onAddContextListener, is not connected to this Private Channel`);n.onAddContextListenerHandlerId=i,Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&Array.from(e.handlerIdsByContextTypes.keys()).forEach((e=>{this.provider.dispatch(t,i,e)}))}))}onDisconnectHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onDisconnect, is not connected to this Private Channel`);n.onDisconnectHandlerId=i}onUnsubscribeHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onUnsubscribe, is not connected to this Private Channel`);n.onUnsubscribeHandlerId=i}removeClient(e){const t=this.getClientState(e);if(!t)throw new Error(`Client with Identity: ${e.uuid} ${e.name}, tried to call disconnect, is not connected to this Private Channel`);t.handlerIdsByContextTypes.clear(),this.clients.delete(e.endpointId)}async fireOnDisconnectForOtherClients(e){const{endpointId:t}=e,n=(await this.getConnectedClients()).map((async e=>{const{clientIdentity:{endpointId:n},onDisconnectHandlerId:i}=e;n!==t&&i&&await this.provider.dispatch(e.clientIdentity,i)}));try{await Promise.all(n)}catch(t){throw console.error(`Problem when attempting to dispatch to onDisconnectHandlers. Error: ${t} Disconnecting Client: uuid: ${e.uuid}. name: ${e.name}. endpointId: ${e.endpointId}`),new Error(t)}}async unsubscribeAll(e){const{endpointId:t}=e,n=this.clients.get(t);if(n){const t=Array.from(n.handlerIdsByContextTypes.values()).flat(),i=n.globalHandler;if(t.length>0){const n=t.map((async t=>this.contextHandlerRemoved({handlerId:t},e)));try{await Promise.all(n)}catch(e){console.error(e.message)}}if(i)try{await this.contextHandlerRemoved({handlerId:i},e)}catch(e){console.error(e.message)}}}async handleClientDisconnecting(e){await this.unsubscribeAll(e),this.removeClient(e),await this.fireOnDisconnectForOtherClients(e)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={clientIdentity:e,handlerIdsByContextTypes:new Map,globalHandler:void 0,onAddContextListenerHandlerId:void 0,onUnsubscribeHandlerId:void 0,onDisconnectHandlerId:void 0};this.clients.set(e.endpointId,t)}}async getConnectedClients(){const e=await this.provider.getAllClientInfo();return Array.from(this.clients.values()).filter((t=>{const{uuid:n,name:i}=t.clientIdentity;return e.some((e=>i===e.name&&n===e.uuid))}))}static init(e,n){return new t(e,n)}},Ui}(),w=G,y=[{id:"green",displayMetadata:{color:"#00CC88",name:"green"}},{id:"purple",displayMetadata:{color:"#8C61FF",name:"purple"}},{id:"orange",displayMetadata:{color:"#FF8C4C",name:"orange"}},{id:"red",displayMetadata:{color:"#FF5E60",name:"red"}},{id:"pink",displayMetadata:{color:"#FF8FB8",name:"pink"}},{id:"yellow",displayMetadata:{color:"#E9FF8F",name:"yellow"}}];let f=class i extends c.Base{constructor(i,s,a){super(i),e.set(this,void 0),t.set(this,void 0),n.set(this,void 0),this.getProvider=()=>o(this,n,"f").getValue(),this.interopClients=new Map,this.contextGroupsById=new Map,r(this,t,a.contextGroups??[...y],"f"),r(this,e,a.fdc3Info,"f"),a?.logging&&(this.logging=a.logging),this.intentClientMap=new Map,this.lastContextMap=new Map,this.sessionContextGroupMap=new Map,r(this,n,new w.Lazy(s),"f"),this.setContextGroupMap(),this.setupChannelProvider()}static createClosedConstructor(...e){return class extends i{constructor(...t){if(t.length){const[n,i,r]=t;if(r&&"object"==typeof r&&!(0,u.default)(r,e[2]))return console.warn("You have modified the parameters of the InteropOverride constructor. This behavior is deprecated and will be removed in a future version. You can modify these options in your manifest. Please consult our Interop docs for guidance on migrating to the new override scheme."),void super(e[0],e[1],r);console.warn("You are attempting to pass arguments to the InteropOverride constructor. This is not necessary, and these passed arguments will be ignored. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.")}super(...e)}}}setContext({context:e},t){this.wire.sendAction("interop-broker-set-context").catch((e=>{}));const n=this.getClientState(t);if(!n||!n.contextGroupId)throw n?new Error("You must join a context group before you can set context."):new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);{const{contextGroupId:t}=n;this.setContextForGroup({context:e},t)}}setContextForGroup({context:e},t){this.wire.sendAction("interop-broker-set-context-for-group").catch((e=>{}));const n=this.contextGroupsById.get(t);if(!n)throw new Error(`Unable to set context for context group that isn't in the context group mapping: ${t}.`);const r=i.checkContextIntegrity(e);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(e)}`);const o=e.type;n.set(o,e),this.lastContextMap.set(t,o);Array.from(this.interopClients.values()).filter((e=>e.contextGroupId===t)).forEach((t=>{for(const[,n]of t.contextHandlers)i.isContextTypeCompatible(o,n.contextType)&&this.invokeContextHandler(t.clientIdentity,n.handlerId,e)}))}getCurrentContext(e,t){this.wire.sendAction("interop-broker-get-current-context").catch((e=>{}));const n=this.getClientState(t);if(!n?.contextGroupId)throw new Error("You must be a member of a context group to call getCurrentContext");const{contextGroupId:i}=n,r=this.contextGroupsById.get(i),o=this.lastContextMap.get(i),s=e?.contextType??o;return r&&s?r.get(s):void 0}async joinContextGroup({contextGroupId:e,target:t},n){if(this.wire.sendAction("interop-broker-join-context-group").catch((e=>{})),this.sessionContextGroupMap.has(e))throw new Error(l.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup);if(t){i.hasEndpointId(t)&&await this.addClientToContextGroup({contextGroupId:e},t);try{const n=this.channel.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name));if(!n.length)throw new Error(`Given Identity ${t.uuid} ${t.name} is not connected to the Interop Broker.`);n.length>1&&console.warn(`More than one connection found for identity ${t.uuid} ${t.name}`);const i=[];for(const t of n)i.push(this.addClientToContextGroup({contextGroupId:e},t));await Promise.all(i)}catch(e){throw new Error(e)}}else await this.addClientToContextGroup({contextGroupId:e},n)}async addClientToContextGroup({contextGroupId:e},t){this.wire.sendAction("interop-broker-add-client-to-context-group").catch((e=>{}));const n=this.getClientState(t);if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(!this.getContextGroups().find((t=>t.id===e)))throw new Error(`Attempting to join a context group that does not exist: ${e}. You may only join existing context groups.`);if(n.contextGroupId!==e){n.contextGroupId=e,await this.setCurrentContextGroupInClientOptions(t,e);const i=this.contextGroupsById.get(e);for(const[,e]of n.contextHandlers){const{contextType:n,handlerId:r}=e;if(void 0===n)i.forEach(((e,n)=>{this.invokeContextHandler(t,r,e)}));else if(i.has(n)){const e=i.get(n);e&&this.invokeContextHandler(t,r,e)}}}}async removeFromContextGroup({target:e},t){if(this.wire.sendAction("interop-broker-remove-from-context-group").catch((e=>{})),e){i.hasEndpointId(e)&&await this.removeClientFromContextGroup(e);try{const t=this.channel.connections.filter((t=>t.uuid===e.uuid&&t.name===e.name));if(!t.length)throw new Error(`No connection found for given Identity ${e.uuid} ${e.name}`);t.length>1&&console.warn(`More than one connection found for identity ${e.uuid} ${e.name}`);const n=[];for(const e of t)n.push(this.removeClientFromContextGroup(e));await Promise.all(n)}catch(e){throw new Error(e)}}else await this.removeClientFromContextGroup(t)}async removeClientFromContextGroup(e){this.wire.sendAction("interop-broker-remove-client-from-context-group").catch((e=>{}));const t=this.getClientState(e);t&&(t.contextGroupId=void 0),await this.setCurrentContextGroupInClientOptions(e,null)}getContextGroups(){return this.wire.sendAction("interop-broker-get-context-groups").catch((e=>{})),o(this,t,"f").map((e=>({...e})))}getInfoForContextGroup({contextGroupId:e}){return this.wire.sendAction("interop-broker-get-info-for-context-group").catch((e=>{})),this.getContextGroups().find((t=>t.id===e))}getAllClientsInContextGroup({contextGroupId:e}){this.wire.sendAction("interop-broker-get-all-clients-in-context-group").catch((e=>{}));return Array.from(this.interopClients.values()).filter((t=>t.contextGroupId===e)).map((e=>e.clientIdentity))}async handleFiredIntent(e,t){const n=(0,l.generateOverrideWarning)("fdc3.raiseIntent","InteropBroker.handleFiredIntent",t,"interopClient.fireIntent");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntent)}async setIntentTarget(e,t){this.wire.sendAction("interop-broker-set-intent-target").catch((e=>{}));const n=this.intentClientMap.get(t.name),i=`intent-handler-${e.name}`;if(n){const t=n.get(i);if(t){if(t.pendingIntents.push(e),t.clientIdentity&&t.isReady){const{clientIdentity:e,pendingIntents:n}=t;try{const r=n[n.length-1];await this.invokeIntentHandler(e,i,r),t.pendingIntents=[]}catch(n){console.error(`Error invoking intent handler for client ${e.uuid}/${e.name}/${e.endpointId}`),t.isReady=!1}}}else n.set(i,{isReady:!1,pendingIntents:[e]})}else{this.intentClientMap.set(t.name,new Map);const n=this.intentClientMap.get(t.name);n&&n.set(i,{isReady:!1,pendingIntents:[e]})}}async handleInfoForIntent(e,t){const n=(0,l.generateOverrideWarning)("fdc3.findIntent","InteropBroker.handleInfoForIntent",t,"interopClient.getInfoForIntent");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntent)}async handleInfoForIntentsByContext(e,t){const n=(0,l.generateOverrideWarning)("fdc3.findIntentsByContext","InteropBroker.handleInfoForIntentsByContext",t,"interopClient.getInfoForIntentsByContext");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntentsByContext)}async handleFiredIntentForContext(e,t){const n=(0,l.generateOverrideWarning)("fdc3.raiseIntentForContext","InteropBroker.handleFiredIntentForContext",t,"interopClient.fireIntentForContext");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntentForContext)}async clientDisconnected(e){}async fdc3HandleOpen({app:e,context:t},n){const i=(0,l.generateOverrideWarning)("fdc3.open","InteropBroker.fdc3HandleOpen",n);throw console.warn(i),new Error(l.BROKER_ERRORS.fdc3Open)}async fdc3HandleFindInstances(e,t){const n=(0,l.generateOverrideWarning)("fdc3.open","InteropBroker.fdc3HandleFindInstances",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3FindInstances)}async fdc3HandleGetAppMetadata(e,t){const n=(0,l.generateOverrideWarning)("fdc3.getAppMetadata","InteropBroker.fdc3HandleGetAppMetadata",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3GetAppMetadata)}async invokeContextHandler(e,t,n){const i=await this.getProvider();try{await i.dispatch(e,t,n)}catch(i){console.error(`Error invoking context handler ${t} for context type ${n.type} in client ${e.uuid}/${e.name}/${e.endpointId}`,i)}}async invokeIntentHandler(e,t,n){const i=await this.getProvider();await i.dispatch(e,t,n)}async fdc3HandleGetInfo(t,n){const{fdc3Version:i}=t;return{fdc3Version:i,...o(this,e,"f"),optionalFeatures:{OriginatingAppMetadata:!1,UserChannelMembershipAPIs:!0},appMetadata:{appId:"",instanceId:""}}}async getAllClientInfo(){return(await this.getProvider()).getAllClientInfo()}decorateSnapshot(e){return{...e,interopSnapshotDetails:{contextGroupStates:this.getContextGroupStates()}}}applySnapshot(e,t){const n=e?.interopSnapshotDetails?.contextGroupStates;n&&(t?.closeExistingWindows||this.updateExistingClients(n),this.rehydrateContextGroupStates(n))}updateExistingClients(e){this.interopClients.forEach((t=>{const{clientIdentity:n,contextGroupId:r,contextHandlers:o}=t;if(r){const t=e[r];for(const[,e]of Object.entries(t))o.forEach((t=>{const{handlerId:r,contextType:o}=t;i.isContextTypeCompatible(e.type,o)&&this.invokeContextHandler(n,r,e)}))}}))}getContextGroupStates(){return i.toObject(this.contextGroupsById)}rehydrateContextGroupStates(e){const t=Object.entries(e);for(const[e,n]of t){const t=Object.entries(n);for(const[n,i]of t)if(this.contextGroupsById.has(e)){this.contextGroupsById.get(e).set(n,i)}else console.warn(`Attempting to set a context group that isn't in the context group mapping. Skipping context group rehydration for: ${e}`)}}contextHandlerRegistered({contextType:e,handlerId:t},n){const i={contextType:e,handlerId:t},r=this.getClientState(n);if(r?.contextHandlers.set(t,i),r&&r.contextGroupId){const{contextGroupId:i}=r,o=this.contextGroupsById.get(i);if(void 0===e)o.forEach(((e,i)=>{this.invokeContextHandler(n,t,e)}));else if(o.has(e)){const i=o.get(e);i&&this.invokeContextHandler(n,t,i)}}}async intentHandlerRegistered(e,t){const{handlerId:n}=e,i=this.intentClientMap.get(t.name),r=i?.get(n);if(i)if(r){const{pendingIntents:e}=r;r.clientIdentity=t,r.isReady=!0;try{if(e.length>0){const i=e[e.length-1];await this.invokeIntentHandler(t,n,i),r.pendingIntents=[]}}catch(e){console.error(`Error invoking intent handler: ${n} for client ${t.uuid}/${t.name}/${t.endpointId}`)}}else i.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t});else{this.intentClientMap.set(t.name,new Map);const e=this.intentClientMap.get(t.name);e&&e.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t})}}removeContextHandler({handlerId:e},t){const n=this.getClientState(t);n&&n.contextHandlers.delete(e)}handleJoinSessionContextGroup({sessionContextGroupId:e},t){try{if(!e)throw new Error("Failed to join session context group: must specify group id.");const n=this.sessionContextGroupMap.get(e);if(n)n.registerNewClient(t);else{const n=new h.default(this.channel,e);n.registerNewClient(t),this.sessionContextGroupMap.set(e,n)}return{hasConflict:this.contextGroupsById.has(e)}}catch(e){throw new Error(e)}}getClientState(e){return this.interopClients.get(e.endpointId)}static toObject(e){const t=Object.fromEntries(e),n={};return Object.entries(t).forEach((([e,t])=>{const i=Object.fromEntries(t);n[e]=i})),n}static checkContextIntegrity(e){if(!e)return{isValid:!1,reason:"No context supplied"};if("object"!=typeof e)return{isValid:!1,reason:"Context must be an Object"};if(!e.type)return{isValid:!1,reason:"Context must have a type property"};if(e.id&&"object"!=typeof e.id)return{isValid:!1,reason:"Context id must be an Object populated with key-value identifiers (if set)"};if(e.id){const{id:t}=e,n=Object.keys(t);let i=!1;if(!n.length)return{isValid:!1,reason:"Context id must have at least one key-value identifier"};if(n.forEach((e=>{"string"==typeof e&&"string"==typeof t[e]||(i=!0)})),i)return{isValid:!1,reason:"Context id key-value identifiers must be of type string"}}return e.name&&"string"!=typeof e.name?{isValid:!1,reason:"Context name must be of string type (if set)"}:{isValid:!0}}static hasEndpointId(e){return void 0!==e.endpointId}static isContextTypeCompatible(e,t){return void 0===t||e===t}setContextGroupMap(){for(const e of this.getContextGroups())this.contextGroupsById.set(e.id,new Map)}async setCurrentContextGroupInClientOptions(e,t){try{const n=await this.fin.System.getEntityInfo(e.uuid,e.name);let i;"view"===n.entityType?i=await this.fin.View.wrap(e):"window"===n.entityType&&(i=await this.fin.Window.wrap(e)),i&&await i.updateOptions({interop:{currentContextGroup:t}})}catch(e){}}async setupChannelProvider(){try{const e=await this.getProvider();this.channel=e,this.wireChannel(e)}catch(e){throw new Error(`Error setting up Interop Broker Channel Provider: ${e}`)}}wireChannel(e){e.onConnection((async(e,t)=>{if(!await this.isConnectionAuthorized(e,t))throw new Error(`Connection not authorized for ${e.uuid}, ${e.name}`);if(!e.endpointId)throw new Error("Version too old to be compatible with Interop. Please upgrade your runtime to a more recent version.");const n={contextGroupId:void 0,contextHandlers:new Map,clientIdentity:e};t?.currentContextGroup&&this.contextGroupsById.has(t.currentContextGroup)&&(n.contextGroupId=t?.currentContextGroup),this.interopClients.set(e.endpointId,n)})),e.onDisconnection((e=>{this.interopClients.delete(e.endpointId);const t=this.intentClientMap.get(e.name);t&&e.uuid===this.fin.me.uuid&&t.forEach((e=>{e.isReady=!1})),this.sessionContextGroupMap.forEach((t=>{t.onDisconnection(e)})),this.clientDisconnected(e)})),e.beforeAction((async(e,t,n)=>{if(!await this.isActionAuthorized(e,t,n))throw new Error(`Action (${e}) not authorized for ${n.uuid}, ${n.name}`);this.logging?.beforeAction?.enabled&&console.log(e,t,n)})),e.afterAction(((e,t,n)=>{this.logging?.afterAction?.enabled&&console.log(e,t,n)})),e.register("setContext",this.setContext.bind(this)),e.register("fireIntent",this.handleFiredIntent.bind(this)),e.register("getCurrentContext",this.getCurrentContext.bind(this)),e.register("getInfoForIntent",this.handleInfoForIntent.bind(this)),e.register("getInfoForIntentsByContext",this.handleInfoForIntentsByContext.bind(this)),e.register("fireIntentForContext",this.handleFiredIntentForContext.bind(this)),e.register("getContextGroups",this.getContextGroups.bind(this)),e.register("joinContextGroup",this.joinContextGroup.bind(this)),e.register("removeFromContextGroup",this.removeFromContextGroup.bind(this)),e.register("getAllClientsInContextGroup",this.getAllClientsInContextGroup.bind(this)),e.register("getInfoForContextGroup",this.getInfoForContextGroup.bind(this)),e.register("contextHandlerRegistered",this.contextHandlerRegistered.bind(this)),e.register("intentHandlerRegistered",this.intentHandlerRegistered.bind(this)),e.register("removeContextHandler",this.removeContextHandler.bind(this)),e.register("sessionContextGroup:createIfNeeded",this.handleJoinSessionContextGroup.bind(this)),e.register("fdc3Open",this.fdc3HandleOpen.bind(this)),e.register("fdc3v2FindIntentsByContext",this.handleInfoForIntentsByContext.bind(this)),e.register("fdc3FindInstances",this.fdc3HandleFindInstances.bind(this)),e.register("fdc3GetAppMetadata",this.fdc3HandleGetAppMetadata.bind(this)),e.register("fdc3v2GetInfo",(async(e,t)=>this.fdc3HandleGetInfo.bind(this)(e,t))),e.register("createPrivateChannelProvider",(async e=>{const{channelId:t}=e,n=await this.fin.InterApplicationBus.Channel.create(t);p.PrivateChannelProvider.init(n,t)}))}isConnectionAuthorized(e,t){return this.wire.sendAction("interop-broker-is-connection-authorized").catch((e=>{})),Promise.resolve(!0)}isActionAuthorized(e,t,n){return this.wire.sendAction("interop-broker-is-action-authorized").catch((e=>{})),Promise.resolve(!0)}};return Gi.InteropBroker=f,e=new WeakMap,t=new WeakMap,n=new WeakMap,Gi}var zi,Ki={},qi={},Ji=s&&s.__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},Yi=s&&s.__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)};Object.defineProperty(qi,"__esModule",{value:!0});const Zi=d,Qi=Hi;class Xi extends Zi.Base{constructor(e,t,n){super(e),zi.set(this,void 0),this.id=n,Ji(this,zi,t,"f")}async setContext(e){this.wire.sendAction("interop-session-context-group-set-context").catch((e=>{}));return(await Yi(this,zi,"f")).dispatch(`sessionContextGroup:setContext-${this.id}`,{sessionContextGroupId:this.id,context:e})}async getCurrentContext(e){this.wire.sendAction("interop-session-context-group-get-context").catch((e=>{}));return(await Yi(this,zi,"f")).dispatch(`sessionContextGroup:getContext-${this.id}`,{sessionContextGroupId:this.id,type:e})}async addContextHandler(e,t){if(this.wire.sendAction("interop-session-context-group-add-handler").catch((e=>{})),"function"!=typeof e)throw new Error("Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");const n=await Yi(this,zi,"f");let i;return i=t?`sessionContextHandler:invoke-${this.id}-${t}-${(0,Qi.generateId)()}`:`sessionContextHandler:invoke-${this.id}`,n.register(i,(0,Qi.wrapContextHandler)(e,i)),await n.dispatch(`sessionContextGroup:handlerAdded-${this.id}`,{handlerId:i,contextType:t}),{unsubscribe:await this.createUnsubscribeCb(i)}}async createUnsubscribeCb(e){const t=await Yi(this,zi,"f");return async()=>{t.remove(e),await t.dispatch(`sessionContextGroup:handlerRemoved-${this.id}`,{handlerId:e})}}getUserInstance(){return{id:this.id,setContext:(0,Qi.wrapInTryCatch)(this.setContext.bind(this),"Failed to set context: "),getCurrentContext:(0,Qi.wrapInTryCatch)(this.getCurrentContext.bind(this),"Failed to get context: "),addContextHandler:(0,Qi.wrapInTryCatch)(this.addContextHandler.bind(this),"Failed to add context handler: ")}}}qi.default=Xi,zi=new WeakMap;var er={},tr={},nr={},ir={},rr=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),or=s&&s.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),sr=s&&s.__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)&&rr(t,e,n);return or(t,e),t};Object.defineProperty(ir,"__esModule",{value:!0}),ir.PrivateChannelClient=void 0;const ar=sr(Hi);var cr,dr;function hr(){if(cr)return tr;cr=1;var e,t=s&&s.__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)},n=s&&s.__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},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(tr,"__esModule",{value:!0}),tr.FDC3ModuleBase=void 0;const o=nr,a=Hi,c=wr(),d=r(i);return tr.FDC3ModuleBase=class{get client(){return t(this,e,"f").call(this)}get fin(){return this.wire.getFin()}constructor(t,i){this.wire=i,e.set(this,void 0),n(this,e,t,"f")}async broadcast(e){return this.wire.sendAction("fdc3-broadcast").catch((e=>{})),this.client.setContext(e)}async _open(e,t){this.wire.sendAction("fdc3-open").catch((e=>{}));try{return await c.InteropClient.ferryFdc3Call(this.client,"fdc3Open",{app:e,context:t})}catch(e){const t=e.message===a.BROKER_ERRORS.fdc3Open?"ResolverUnavailable":e.message;throw new Error(t)}}async _getChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:"system",...(0,o.getUnsupportedChannelApis)()})))}async getOrCreateChannel(e){this.wire.sendAction("fdc3-get-or-create-channel").catch((e=>{}));const t=(await this._getChannels()).find((t=>t.id===e));if(t)return{...t,type:"system",...(0,o.getUnsupportedChannelApis)()};try{const t=await this.client.joinSessionContextGroup(e);return(0,o.buildAppChannelObject)(t)}catch(e){throw console.error(e.message),new Error(o.ChannelError.CreationFailed)}}async getSystemChannels(){return this.wire.sendAction("fdc3-get-system-channels").catch((e=>{})),this._getChannels()}async joinChannel(e){this.wire.sendAction("fdc3-join-channel").catch((e=>{}));try{return await this.client.joinContextGroup(e)}catch(e){if(e.message===a.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup?console.error("The Channel you have tried to join is an App Channel. Custom Channels can only be defined by the Interop Broker through code or manifest configuration. Please use getOrCreateChannel."):console.error(e.message),e.message.startsWith("Attempting to join a context group that does not exist"))throw new Error(o.ChannelError.NoChannelFound);throw new Error(o.ChannelError.AccessDenied)}}async getCurrentChannel(){this.wire.sendAction("fdc3-get-current-channel").catch((e=>{}));const e=await this.getCurrentContextGroupInfo();return e?this.buildChannelObject(e):null}async leaveCurrentChannel(){return this.wire.sendAction("fdc3-leave-current-channel").catch((e=>{})),this.client.removeFromContextGroup()}async getCurrentContextGroupInfo(){const e=await this.client.getContextGroups(),t=e.map((async e=>this.client.getAllClientsInContextGroup(e.id))),n=(await Promise.all(t)).findIndex((e=>e.some((e=>{const{uuid:t,name:n}=e;return this.wire.me.uuid===t&&this.wire.me.name===n}))));return e[n]}async buildChannelObject(e){return{...e,type:"system",addContextListener:(...[e,t])=>{let n,i;"function"==typeof e?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),n=e):(n=t,"string"==typeof e&&(i=e));const r=(async()=>{let e=!0;const t=await this.client.getCurrentContext(i);return this.client.addContextHandler(((i,r)=>{if(!e||(e=!1,!(0,d.default)(t,i)))return n(i,r)}),i)})();return{...r,unsubscribe:()=>r.then((e=>e.unsubscribe()))}},broadcast:this.broadcast.bind(this),getCurrentContext:async e=>{const t=await this.client.getCurrentContext(e);return void 0===t?null:t}}}},e=new WeakMap,tr}ir.PrivateChannelClient=class{constructor(e,t){this.id=t,this.client=e,this.listeners=new Map}async broadcast(e){return this.client.dispatch("broadcast",{context:e})}async getCurrentContext(e){return this.client.dispatch("getCurrentContext",{contextType:e})}async addContextListener(e,t){if("function"!=typeof t)throw new Error("Non-function argument passed to the second parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");let n;n=e?`contextHandler:invoke-${this.id}-${e}-${ar.generateId()}`:`contextHandler:invoke-${this.id}-${ar.generateId()}`,this.client.register(n,ar.wrapContextHandler(t,n));const i={unsubscribe:await this.createContextUnsubscribeCb(n)};return this.listeners.set(n,i),await this.client.dispatch("contextHandlerAdded",{handlerId:n,contextType:e}),i}createNonStandardUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch("nonStandardHandlerRemoved",{handlerId:e})}}createContextUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch("contextHandlerRemoved",{handlerId:e})}}onAddContextListener(e){const t=`onContextHandlerAdded:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch("onAddContextHandlerAdded",{handlerId:t}),n}onDisconnect(e){const t=`onDisconnect:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch("onDisconnectHandlerAdded",{handlerId:t}),n}onUnsubscribe(e){const t=`onUnsubscribe:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch("onUnsubscribeHandlerAdded",{handlerId:t}),n}async cleanUpAllSubs(){Array.from(this.listeners.keys()).forEach((e=>{this.client.remove(e),this.listeners.delete(e)}))}async disconnect(){try{await this.client.dispatch("clientDisconnecting"),await this.cleanUpAllSubs(),await this.client.disconnect()}catch(e){throw new Error(e.message)}}},function(e){var t=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.getIntentResolution=e.isChannel=e.isContext=e.connectPrivateChannel=e.buildAppChannelObject=e.buildPrivateChannelObject=e.ChannelError=e.ResultError=e.UnsupportedChannelApiError=e.getUnsupportedChannelApis=void 0;const n=Hi,r=ir,o=t(i);e.getUnsupportedChannelApis=e=>({addContextListener:()=>{throw new a("Channel.addContextListener",e)},broadcast:()=>{throw new a("Channel.broadcast",e)},getCurrentContext:()=>{throw new a("Channel.getCurrentContext",e)}});class a extends Error{constructor(e,t="System"){super(e),this.message=`Calling ${e} on an instance of a ${t} Channel returned by fdc3.get${t}Channels is not supported. If you would like to use a ${t} Channel, please use fdc3.joinChannel, fdc3.addContextListener, and fdc3.broadcast instead.`}}var c,d;e.UnsupportedChannelApiError=a,function(e){e.NoResultReturned="NoResultReturned",e.IntentHandlerRejected="IntentHandlerRejected"}(c=e.ResultError||(e.ResultError={})),(d=e.ChannelError||(e.ChannelError={})).NoChannelFound="NoChannelFound",d.AccessDenied="AccessDenied",d.CreationFailed="CreationFailed";e.buildPrivateChannelObject=e=>{let t=!1;const n=()=>{if(t)throw new Error("Private Channel Client has been disconnected from the Private Channel")};return{id:e.id,type:"private",broadcast:async t=>(n(),e.broadcast(t)),getCurrentContext:async t=>(n(),e.getCurrentContext(t)),addContextListener:async(t,i)=>{n();let r=i,o=t;"function"==typeof t&&(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),r=t,o=null);return e.addContextListener(o,r)},onAddContextListener:t=>(n(),e.onAddContextListener(t)),disconnect:async()=>(n(),t=!0,e.disconnect()),onDisconnect:t=>(n(),e.onDisconnect(t)),onUnsubscribe:t=>(n(),e.onUnsubscribe(t))}};e.buildAppChannelObject=e=>({id:e.id,type:"app",broadcast:e.setContext,getCurrentContext:async t=>{const n=await e.getCurrentContext(t);return void 0===n?null:n},addContextListener:(t,n)=>{let i,r;"function"==typeof t?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),i=t):(i=n,"string"==typeof t&&(r=t));const s=(async()=>{let t=!0;const n=await e.getCurrentContext(r);return e.addContextHandler(((e,r)=>{if(!t||(t=!1,!(0,o.default)(n,e)))return i(e,r)}),r)})();return{...s,unsubscribe:()=>s.then((e=>e.unsubscribe()))}}});e.connectPrivateChannel=async t=>{try{const n=await fin.InterApplicationBus.Channel.connect(t),i=new r.PrivateChannelClient(n,t);return(0,e.buildPrivateChannelObject)(i)}catch(e){throw new Error(`Private Channel with id: ${t} doesn't exist`)}};e.isContext=e=>{if(e&&"object"==typeof e&&"type"in e){const{type:t}=e;return"string"==typeof t}return!1};e.isChannel=e=>{if(e&&"object"==typeof e&&"type"in e&&"id"in e){const{type:t,id:n}=e;return"string"==typeof t&&"string"==typeof n&&("app"===t||"private"===t)}return!1};e.getIntentResolution=async(t,i,r,o)=>{const s=(0,n.generateId)(),a=new Promise(((e,t)=>{fin.InterApplicationBus.subscribe({uuid:"*"},s,(t=>{e(t)})).catch((()=>t(new Error("getResult is not supported in this environment"))))})),d=r?{target:r,intentResolutionResultId:s}:{intentResolutionResultId:s},h=o?{name:o,context:i,metadata:d}:{...i,metadata:d},l=async()=>{let n=await a;if(!n||"object"!=typeof n)throw new Error(c.NoResultReturned);const{error:i}=n;if(i)throw new Error(c.IntentHandlerRejected);if((0,e.isChannel)(n)){const{id:i,type:r}=n;switch(r){case"private":n=await(0,e.connectPrivateChannel)(i);break;case"app":{const r=await t.joinSessionContextGroup(i);n=(0,e.buildAppChannelObject)(r);break}}}else if(!(0,e.isContext)(n))throw new Error(c.NoResultReturned);return n},u=o?await t.fireIntent(h):await t.fireIntentForContext(h);return"object"!=typeof u?{source:{appId:"",instanceId:""},intent:"",version:"2.0",getResult:l}:{...u,getResult:l}}}(nr);var lr,ur,pr={};function wr(){if(ur)return Ki;ur=1;var e,t,n=s&&s.__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},i=s&&s.__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)},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ki,"__esModule",{value:!0}),Ki.InteropClient=void 0;const o=d,a=r(qi),c=function(){if(dr)return er;dr=1,Object.defineProperty(er,"__esModule",{value:!0}),er.Fdc3Module=void 0;const e=Hi,t=hr();class n extends t.FDC3ModuleBase{async open(e,t){await super._open(e,t)}addContextListener(e,t){let n;return this.wire.sendAction("fdc3-add-context-listener").catch((e=>{})),"function"==typeof e?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),n=this.client.addContextHandler(e)):n=this.client.addContextHandler(t,null===e?void 0:e),{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}addIntentListener(e,t){this.wire.sendAction("fdc3-add-intent-listener").catch((e=>{}));const n=this.client.registerIntentHandler((e=>{const{context:n,metadata:i}=e,{metadata:r}=n,o=i?.intentResolutionResultId||r?.intentResolutionResultId;o&&this.fin.InterApplicationBus.publish(o,null).catch((()=>null)),t(e.context)}),e,{fdc3Version:"1.2"});return{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}async raiseIntent(t,n,i){this.wire.sendAction("fdc3-raise-intent").catch((e=>{}));const r=i?{name:t,context:n,metadata:{target:i}}:{name:t,context:n};try{return await this.client.fireIntent(r)}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntent?"ResolverUnavailable":t.message;throw new Error(n)}}async findIntent(t,n){this.wire.sendAction("fdc3-find-intent").catch((e=>{}));try{return await this.client.getInfoForIntent({name:t,context:n})}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntent?"ResolverUnavailable":t.message;throw new Error(n)}}async findIntentsByContext(t){this.wire.sendAction("fdc3-find-intents-by-context").catch((e=>{}));try{return await this.client.getInfoForIntentsByContext(t)}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntentsByContext?"ResolverUnavailable":t.message;throw new Error(n)}}async raiseIntentForContext(t,n){this.wire.sendAction("fdc3-raise-intent-for-context").catch((e=>{}));try{return await this.client.fireIntentForContext({...t,metadata:{target:n}})}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntentForContext?"ResolverUnavailable":t.message;throw new Error(n)}}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}getInfo(){return this.wire.sendAction("fdc3-get-info").catch((e=>{})),{providerVersion:this.wire.environment.getAdapterVersionSync(),provider:`openfin-${this.wire.me.uuid}`,fdc3Version:"1.2"}}}return er.Fdc3Module=n,er}(),h=function(){if(lr)return pr;lr=1,Object.defineProperty(pr,"__esModule",{value:!0}),pr.Fdc3Module2=void 0;const e=hr(),t=Hi,n=wr(),i=nr,r=ir;class o extends e.FDC3ModuleBase{async open(e,t){return"string"==typeof e&&console.warn("Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string })."),super._open(e,t)}async findInstances(e){this.wire.sendAction("fdc3-find-instances").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,"fdc3FindInstances",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3FindInstances?"ResolverUnavailable":e.message;throw new Error(n)}}async getAppMetadata(e){this.wire.sendAction("fdc3-get-app-metadata").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,"fdc3GetAppMetadata",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3GetAppMetadata?"ResolverUnavailable":e.message;throw new Error(n)}}async addContextListener(e,t){this.wire.sendAction("fdc3-add-context-listener").catch((e=>{}));const n=e=>t=>{const{contextMetadata:n,...i}=t,r=n?[{...i},n]:[t,null];e(...r)};let i=t,r=n(i);return"function"==typeof e?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),i=e,r=n(i),this.client.addContextHandler(r)):this.client.addContextHandler(r,null===e?void 0:e)}async findIntent(e,n,i){this.wire.sendAction("fdc3-find-intent").catch((e=>{}));try{return await this.client.getInfoForIntent({name:e,context:n,metadata:{resultType:i}})}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntent?"ResolverUnavailable":e.message;throw new Error(n)}}async findIntentsByContext(e,i){this.wire.sendAction("fdc3-find-intents-by-context").catch((e=>{}));const r=i?{context:e,metadata:{resultType:i}}:e;try{return await n.InteropClient.ferryFdc3Call(this.client,"fdc3v2FindIntentsByContext",r)}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntentsByContext?"ResolverUnavailable":e.message;throw new Error(n)}}async raiseIntent(e,n,r){this.wire.sendAction("fdc3-raise-intent").catch((e=>{}));try{return"string"==typeof r&&console.warn("Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string })."),(0,i.getIntentResolution)(this.client,n,r,e)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?"ResolverUnavailable":e.message;throw new Error(n)}}async raiseIntentForContext(e,n){this.wire.sendAction("fdc3-raise-intent-for-context").catch((e=>{}));try{return"string"==typeof n&&console.warn("Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string })."),(0,i.getIntentResolution)(this.client,e,n)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?"ResolverUnavailable":e.message;throw new Error(n)}}async addIntentListener(e,t){if(this.wire.sendAction("fdc3-add-intent-listener").catch((e=>{})),"string"!=typeof e)throw new Error("First argument must be an Intent name");return this.client.registerIntentHandler((async e=>{let n,i;const{context:r,metadata:o}=e,{contextMetadata:s,metadata:a,...c}=r,d=o?.intentResolutionResultId||a?.intentResolutionResultId;try{const e=a?{metadata:a,...c}:{...c};n=await t(e,s),i=n}catch(e){n=e,i={error:!0}}if(d&&this.fin.InterApplicationBus.publish(d,i).catch((()=>null)),n instanceof Error)throw new Error(n.message);return n}),e,{fdc3Version:"2.0"})}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}async createPrivateChannel(){const e=(0,t.generateId)();await n.InteropClient.ferryFdc3Call(this.client,"createPrivateChannelProvider",{channelId:e});const o=await this.fin.InterApplicationBus.Channel.connect(e),s=new r.PrivateChannelClient(o,e);return(0,i.buildPrivateChannelObject)(s)}async getUserChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:"user",...(0,i.getUnsupportedChannelApis)("User")})))}async getSystemChannels(){return console.warn("This API has been deprecated. Please use fdc3.getUserChannels instead."),super.getSystemChannels()}async joinUserChannel(e){return super.joinChannel(e)}async joinChannel(e){return console.warn("This API has been deprecated. Please use fdc3.joinUserChannel instead."),super.joinChannel(e)}async getCurrentChannel(){const e=await super.getCurrentChannel();return e?{...e,type:"user",broadcast:this.broadcast.bind(this)}:null}async getInfo(){return n.InteropClient.ferryFdc3Call(this.client,"fdc3v2GetInfo",{fdc3Version:"2.0"})}}return pr.Fdc3Module2=o,pr}(),l=Hi;let u=class extends o.Base{constructor(i,r){super(i),e.set(this,void 0),t.set(this,void 0),n(this,t,new Map,"f"),n(this,e,r,"f")}async setContext(t){this.wire.sendAction("interop-client-set-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("setContext",{context:t})}async addContextHandler(t,n){if(this.wire.sendAction("interop-client-add-context-handler").catch((e=>{})),"function"!=typeof t)throw new Error("Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");const r=await i(this,e,"f");let o;o=n?`invokeContextHandler-${n}-${(0,l.generateId)()}`:"invokeContextHandler";const s=(0,l.wrapContextHandler)(t,o);return r.register(o,s),await r.dispatch("contextHandlerRegistered",{handlerId:o,contextType:n}),{unsubscribe:async()=>{r.remove(o),await r.dispatch("removeContextHandler",{handlerId:o})}}}async getContextGroups(){this.wire.sendAction("interop-client-get-context-groups").catch((e=>{}));return(await i(this,e,"f")).dispatch("getContextGroups")}async joinContextGroup(t,n){this.wire.sendAction("interop-client-join-context-group").catch((e=>{}));const r=await i(this,e,"f");if(!t)throw new Error("No contextGroupId specified for joinContextGroup.");return r.dispatch("joinContextGroup",{contextGroupId:t,target:n})}async removeFromContextGroup(t){this.wire.sendAction("interop-client-remove-from-context-group").catch((e=>{}));return(await i(this,e,"f")).dispatch("removeFromContextGroup",{target:t})}async getAllClientsInContextGroup(t){this.wire.sendAction("interop-client-get-all-clients-in-context-group").catch((e=>{}));const n=await i(this,e,"f");if(!t)throw new Error("No contextGroupId specified for getAllClientsInContextGroup.");return n.dispatch("getAllClientsInContextGroup",{contextGroupId:t})}async getInfoForContextGroup(t){this.wire.sendAction("interop-client-get-info-for-context-group").catch((e=>{}));const n=await i(this,e,"f");if(!t)throw new Error("No contextGroupId specified for getInfoForContextGroup.");return n.dispatch("getInfoForContextGroup",{contextGroupId:t})}async fireIntent(t){this.wire.sendAction("interop-client-fire-intent").catch((e=>{}));return(await i(this,e,"f")).dispatch("fireIntent",t)}async registerIntentHandler(t,n,r){this.wire.sendAction("interop-client-register-intent-handler").catch((e=>{}));const o=await i(this,e,"f"),s=`intent-handler-${n}`,a=(0,l.wrapIntentHandler)(t,s);try{await o.register(s,a),await o.dispatch("intentHandlerRegistered",{handlerId:s,...r})}catch(e){throw new Error("Unable to register intent handler")}return{unsubscribe:async()=>{o.remove(s)}}}async getCurrentContext(t){this.wire.sendAction("interop-client-get-current-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("getCurrentContext",{contextType:t})}async getInfoForIntent(t){this.wire.sendAction("interop-client-get-info-for-intent").catch((e=>{}));return(await i(this,e,"f")).dispatch("getInfoForIntent",t)}async getInfoForIntentsByContext(t){this.wire.sendAction("interop-client-get-info-for-intents-by-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("getInfoForIntentsByContext",t)}async fireIntentForContext(t){this.wire.sendAction("interop-client-fire-intent-for-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("fireIntentForContext",t)}async joinSessionContextGroup(n){try{const r=i(this,t,"f").get(n);if(r)return r.getUserInstance();const o=await i(this,e,"f"),{hasConflict:s}=await o.dispatch("sessionContextGroup:createIfNeeded",{sessionContextGroupId:n});s&&console.warn(`A (non-session) context group with the name "${n}" already exists. If you are trying to join a Context Group, call joinContextGroup instead.`);const c=new a.default(this.wire,i(this,e,"f"),n);return i(this,t,"f").set(n,c),c.getUserInstance()}catch(e){throw console.error(`Error thrown trying to create Session Context Group with id "${n}": ${e}`),e}}async onDisconnection(t){this.wire.sendAction("interop-client-add-ondisconnection-listener").catch((e=>{}));return(await i(this,e,"f")).onDisconnection((e=>{const{uuid:n}=e;t({type:"interop-broker",topic:"disconnected",brokerName:n})}))}getFDC3Sync(e){switch(e){case"1.2":return new c.Fdc3Module((()=>this),this.wire);case"2.0":return new h.Fdc3Module2((()=>this),this.wire);default:throw new Error(`Invalid FDC3 version provided: ${e}. Must be '1.2' or '2.0'`)}}async getFDC3(e){return this.getFDC3Sync(e)}static async ferryFdc3Call(t,n,r){return(await i(t,e,"f")).dispatch(n,r||null)}};return Ki.InteropClient=u,e=new WeakMap,t=new WeakMap,Ki}var yr,fr,gr,mr={};function vr(){if(yr)return mr;yr=1,Object.defineProperty(mr,"__esModule",{value:!0}),mr.overrideCheck=mr.checkFDC32Overrides=mr.getDefaultViewFdc3VersionFromAppInfo=void 0;const e=Vi();function t(t){return["fdc3HandleFindInstances","handleInfoForIntent","handleInfoForIntentsByContext","fdc3HandleGetAppMetadata","fdc3HandleGetInfo","fdc3HandleOpen","handleFiredIntent","handleFiredIntentForContext"].filter((n=>t[n]===e.InteropBroker.prototype[n]))}return mr.getDefaultViewFdc3VersionFromAppInfo=function({manifest:e,initialOptions:t}){const n=e?.platform?.defaultViewOptions?.fdc3InteropApi??t.defaultViewOptions?.fdc3InteropApi;return["1.2","2.0"].includes(n??"")?n:void 0},mr.checkFDC32Overrides=t,mr.overrideCheck=function(e,n){if(n&&"2.0"===n){const n=t(e);n.length>0&&console.warn(`WARNING: FDC3 2.0 has been set as a default option for Views in this Platform, but the required InteropBroker APIs for FDC3 2.0 compliance have not all been overridden.\nThe following APIs need to be overridden:\n${n.join("\n")}`)}},mr}function Cr(){return gr||(gr=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),i=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),i(function(){if(fr)return Ti;fr=1;var e=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ti,"__esModule",{value:!0}),Ti.InteropModule=void 0;const t=e(n),i=$i,r=d,o=Vi(),a=wr(),c=vr(),h=Tn,l=e=>new e,u="You have attempted to use or modify InteropBroker parameters, which is not allowed. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.";class p extends r.Base{async init(e,n=l){this.wire.sendAction("interop-init").catch((()=>{}));const r=await this.wire.environment.getInteropInfo(this.wire.getFin()),s=(0,i.createUnusableObject)(u),a=(0,i.createWarningObject)(u,(0,t.default)(r)),d=async()=>{throw new Error(u)},p=o.InteropBroker.createClosedConstructor(this.wire,(()=>this.fin.InterApplicationBus.Channel.create(`interop-broker-${e}`)),r);let w;return w=Array.isArray(n)?new((0,h.overrideFromComposables)(...n)(p))(s,d,a):await n(p,s,d,a),(0,c.overrideCheck)(w,r.fdc3Version),w}connectSync(e,t){return this.wire.sendAction("interop-connect-sync").catch((()=>{})),new a.InteropClient(this.wire,this.wire.environment.whenReady().then((()=>this.fin.InterApplicationBus.Channel.connect(`interop-broker-${e}`,{payload:t}))))}}return Ti.InteropModule=p,Ti}(),e),i(wr(),e),i(Vi(),e)}(Li)),Li}var br={},Ir={},Er={},xr={};Object.defineProperty(xr,"__esModule",{value:!0}),xr.getSnapshotSourceChannelName=void 0;xr.getSnapshotSourceChannelName=e=>`snapshot-source-provider-${e.uuid}`;var Ar,Pr,Mr,_r,Or,Sr=s&&s.__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},Rr=s&&s.__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)};Object.defineProperty(Er,"__esModule",{value:!0}),Er.SnapshotSource=void 0;const Fr=d,jr=xr,kr=new Map;class Lr extends Fr.Base{constructor(e,t){super(e),Ar.set(this,void 0),Pr.set(this,(()=>(kr.has(this.identity.uuid)||kr.set(this.identity.uuid,{eventFired:null,clientPromise:null}),kr.get(this.identity.uuid)))),Mr.set(this,(()=>(Rr(this,Pr,"f").call(this).clientPromise||(Rr(this,Pr,"f").call(this).clientPromise=Rr(this,_r,"f").call(this)),Rr(this,Pr,"f").call(this).clientPromise))),_r.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);try{Rr(this,Pr,"f").call(this).eventFired||await Rr(this,Or,"f").call(this);const t=await this.fin.InterApplicationBus.Channel.connect(e,{wait:!1});return t.onDisconnection((()=>{Rr(this,Pr,"f").call(this).clientPromise=null,Rr(this,Pr,"f").call(this).eventFired=null})),t}catch(e){throw Rr(this,Pr,"f").call(this).clientPromise=null,new Error("The targeted SnapshotSource is not currently initialized. Await this object's ready() method.")}})),Or.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);let t,n;const i=new Promise(((e,i)=>{t=e,n=i}));Rr(this,Pr,"f").call(this).eventFired=i;const r=async i=>{try{i.channelName===e&&(t(),await this.fin.InterApplicationBus.Channel.removeListener("connected",r))}catch(e){n(e)}};await this.fin.InterApplicationBus.Channel.on("connected",r)})),Sr(this,Ar,t,"f")}get identity(){return Rr(this,Ar,"f")}async ready(){this.wire.sendAction("snapshot-source-ready").catch((e=>{}));try{await Rr(this,Mr,"f").call(this)}catch(e){await Rr(this,Pr,"f").call(this).eventFired}}async getSnapshot(){this.wire.sendAction("snapshot-source-get-snapshot").catch((e=>{}));const e=await Rr(this,Mr,"f").call(this),t=await e.dispatch("get-snapshot");return(await t).snapshot}async applySnapshot(e){this.wire.sendAction("snapshot-source-apply-snapshot").catch((e=>{}));return(await Rr(this,Mr,"f").call(this)).dispatch("apply-snapshot",{snapshot:e})}}Er.SnapshotSource=Lr,Ar=new WeakMap,Pr=new WeakMap,Mr=new WeakMap,_r=new WeakMap,Or=new WeakMap,Object.defineProperty(Ir,"__esModule",{value:!0}),Ir.SnapshotSourceModule=void 0;const Tr=d,$r=Er,Br=xr;class Gr extends Tr.Base{async init(e){if(this.wire.sendAction("snapshot-source-init").catch((e=>{})),"object"!=typeof e||"function"!=typeof e.getSnapshot||"function"!=typeof e.applySnapshot)throw new Error("you must pass in a valid SnapshotProvider");const t=await this.fin.InterApplicationBus.Channel.create((0,Br.getSnapshotSourceChannelName)(this.fin.me));t.register("get-snapshot",(async()=>({snapshot:await e.getSnapshot()}))),t.register("apply-snapshot",(({snapshot:t})=>e.applySnapshot(t)))}wrapSync(e){return this.wire.sendAction("snapshot-source-wrap-sync").catch((e=>{})),new $r.SnapshotSource(this.wire,e)}async wrap(e){return this.wire.sendAction("snapshot-source-wrap").catch((e=>{})),this.wrapSync(e)}}Ir.SnapshotSourceModule=Gr,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Ir,e),n(Er,e)}(br),Object.defineProperty(a,"__esModule",{value:!0});var Wr=a.Fin=void 0;const Hr=t,Nr=c,Dr=ie(),Ur=Z(),Vr=de,zr=en,Kr=rn,qr=un,Jr=bn,Yr=J(),Zr=An,Qr=ki,Xr=Cr(),eo=br;class to extends Hr.EventEmitter{constructor(e){super(),this.wire=e,this.System=new Nr.System(e),this.Window=new Dr._WindowModule(e),this.Application=new Ur.ApplicationModule(e),this.InterApplicationBus=new Vr.InterApplicationBus(e),this.Clipboard=new zr.Clipboard(e),this.ExternalApplication=new Kr.ExternalApplicationModule(e),this.Frame=new qr._FrameModule(e),this.GlobalHotkey=new Jr.GlobalHotkey(e),this.Platform=new Zr.PlatformModule(e,this.InterApplicationBus.Channel),this.View=new Yr.ViewModule(e),this.Interop=new Xr.InteropModule(e),this.SnapshotSource=new eo.SnapshotSourceModule(e),e.registerFin(this),this.me=(0,Qr.getMe)(e),e.on("disconnected",(()=>{this.emit("disconnected")}))}}Wr=a.Fin=to;var no={},io={};function ro(e){return"string"==typeof e.manifestUrl}function oo(e){return ao(e)&&"string"==typeof e.address}function so(e){return oo(e)&&"string"==typeof e.token}function ao(e){return"string"==typeof e.uuid}function co(e){return e.runtime&&"string"==typeof e.runtime.version}function ho(e){return ao(e)&&co(e)}Object.defineProperty(io,"__esModule",{value:!0}),io.isInternalConnectConfig=io.isPortDiscoveryConfig=io.isNewConnectConfig=io.isConfigWithReceiver=io.isRemoteConfig=io.isExistingConnectConfig=io.isExternalConfig=void 0,io.isExternalConfig=ro,io.isExistingConnectConfig=oo,io.isRemoteConfig=so,io.isConfigWithReceiver=function(e){return"object"==typeof e.receiver&&so({...e,address:""})},io.isNewConnectConfig=ho,io.isPortDiscoveryConfig=function(e){return ro(e)&&co(e)||ho(e)},io.isInternalConnectConfig=function(e){return oo(e)||ho(e)};var lo={},uo={};Object.defineProperty(uo,"__esModule",{value:!0}),uo.EmitterMap=void 0;const po=t;function wo(e){return Buffer.from(e).toString("base64")}uo.EmitterMap=class{constructor(){this.storage=new Map}hashKeys(e){return e.map(wo).join("/")}getOrCreate(e){const t=this.hashKeys(e);return this.storage.has(t)||this.storage.set(t,new po.EventEmitter),this.storage.get(t)}has(e){return this.storage.has(this.hashKeys(e))}delete(e){const t=this.hashKeys(e);return this.storage.delete(t)}},Object.defineProperty(lo,"__esModule",{value:!0});const yo=uo;class fo extends yo.EmitterMap{constructor(){super(...arguments),this.dispatchEvent=e=>{if(function(e){return"process-desktop-event"===e.action}(e)){const{payload:t}=e,n=function(e){const{topic:t}=e;if("frame"===t||"window"===t||"view"===t){const{uuid:n,name:i}=e;return[t,n,i]}if("application"===t){const{uuid:n}=e;return[t,n]}return[t]}(t);if(this.has(n))return this.getOrCreate(n).emit(t.type,t),!0}return!1}}}lo.default=fo;var go,mo,vo=s&&s.__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},Co=s&&s.__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)},bo=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(no,"__esModule",{value:!0});var Io=no.Transport=void 0;const Eo=t,xo=io,Ao=g,Po=bo(lo),Mo=ki,_o=ke;class Oo extends Eo.EventEmitter{constructor(e,t,n){super(),this.wireListeners=new Map,this.topicRefMap=new Map,this.eventAggregator=new Po.default,this.messageHandlers=[this.eventAggregator.dispatchEvent],go.set(this,void 0),mo.set(this,void 0),this.connectSync=()=>{Co(this,go,"f").connectSync()},this.getPort=()=>Co(this,go,"f").getPort(),vo(this,go,new e(this.onmessage.bind(this)),"f"),this.environment=t,this.sendRaw=Co(this,go,"f").send.bind(Co(this,go,"f")),this.registerMessageHandler(this.handleMessage.bind(this)),Co(this,go,"f").on("disconnected",(()=>{for(const[,{handleNack:e}]of this.wireListeners)e({reason:"Remote connection has closed"});this.wireListeners.clear(),this.emit("disconnected")}));const{uuid:i,name:r}=n,o=this.environment.getCurrentEntityType();this.me=(0,Mo.getBaseMe)(o,i,r)}getFin(){if(!Co(this,mo,"f"))throw new Error("No Fin object registered for this transport");return Co(this,mo,"f")}registerFin(e){if(Co(this,mo,"f"))throw new Error("Fin object has already been registered for this transport");vo(this,mo,e,"f")}shutdown(){return Co(this,go,"f").shutdown()}async connect(e){if((0,xo.isConfigWithReceiver)(e))return await Co(this,go,"f").connect(e.receiver),this.authorize(e);if((0,xo.isRemoteConfig)(e))return this.connectRemote(e);if((0,xo.isExistingConnectConfig)(e))return this.connectByPort(e);if((0,xo.isNewConnectConfig)(e)){const t=await this.environment.retrievePort(e);return this.connectByPort({...e,address:`ws://localhost:${t}`})}}async connectRemote(e){return await Co(this,go,"f").connect(new(this.environment.getWsConstructor())(e.address)),this.authorize(e)}async connectByPort(e){const{address:t,uuid:n}=e,i={...e,type:"file-token"},r=Co(this,go,"f");await r.connect(new(this.environment.getWsConstructor())(e.address));const o=await this.sendAction("request-external-authorization",{uuid:n,type:"file-token"},!0);if("external-authorization-response"!==o.action)throw new Ao.UnexpectedActionError(o.action);return await this.environment.writeToken(o.payload.file,o.payload.token),this.authorize(i)}async authorize(e){const t=await this.sendAction("request-authorization",e,!0);if("authorization-response"!==t.action)throw new Ao.UnexpectedActionError(t.action);if(!0!==t.payload.success)throw new Ao.RuntimeError(t.payload)}sendAction(e,t={},n=!1){let i=()=>{};const r=Ao.RuntimeError.getCallSite(1),o=this.environment.getNextMessageId(),s=new Promise(((s,a)=>{i=a;const c={action:e,payload:t,messageId:o},d=Co(this,go,"f");return this.addWireListener(o,s,(e=>this.nackHandler(e,a,r)),n),d.send(c).catch(a)}));return Object.assign(s,{cancel:i,messageId:o})}nackHandler(e,t,n){t("string"==typeof e?e:new Ao.RuntimeError(e,n))}ferryAction(e){return new Promise(((t,n)=>{const i=this.environment.getNextMessageId();e.messageId=i;const r=e=>{t(e.payload)};return Co(this,go,"f").send(e).then((()=>this.addWireListener(i,r,(e=>this.nackHandler(e,n)),!1))).catch(n)}))}registerMessageHandler(e){this.messageHandlers.push(e)}addWireListener(e,t,n,i){i?this.uncorrelatedListener=t:this.wireListeners.has(e)?n({reason:"Duplicate handler id",error:(0,_o.errorToPOJO)(new Ao.DuplicateCorrelationError(String(e)))}):this.wireListeners.set(e,{resolve:t,handleNack:n})}onmessage(e){for(const t of this.messageHandlers)t.call(null,e)}handleMessage(e){const t=e.correlationId||NaN;if("correlationId"in e){if(!this.wireListeners.has(t))return!1;{const{resolve:n,handleNack:i}=this.wireListeners.get(t);"ack"!==e.action?i({reason:"Did not receive ack action",error:(0,_o.errorToPOJO)(new Ao.NoAckError(e.action))}):"payload"in e?e.payload.success?n.call(null,e):i(e.payload):"string"==typeof e.reason?i(e):(console.warn("Received invalid response from core",e),i({reason:"invalid response shape"})),this.wireListeners.delete(t)}}else this.uncorrelatedListener&&this.uncorrelatedListener.call(null,e),this.uncorrelatedListener=()=>{};return!0}}Io=no.Transport=Oo,go=new WeakMap,mo=new WeakMap;const So=(...e)=>({log:(...t)=>console.debug(`[${(new Date).toISOString()}]`,...(e=>e.map((e=>`[${e}]`)))(e),...t),getLogger:(...t)=>So(...e,...t)}),Ro=So("@openfin/core-web/client");function Fo(e,t){if(!function(e){return"string"==typeof e}(e))throw new Error(`Property ${t} has invalid type. Expected string, got ${typeof e}.`)}const jo="web-broker-ports-ready",ko=Ro.getLogger("get-web-interop-ports");function Lo(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)}function To(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}"function"==typeof SuppressedError&&SuppressedError;const $o=e=>{var n,i,r;return r=class extends t.EventEmitter{constructor(t){super(),n.set(this,void 0),i.set(this,!1),this.connectSync=()=>{Lo(this,i,"f")||(e.addEventListener("message",(e=>{e.data?.topic?.startsWith("wire-message")&&e.data.message&&Lo(this,n,"f").call(this,{...JSON.parse(e.data.message),ports:e.ports})})),e.start())},this.connect=async()=>{this.connectSync()},this.send=t=>(e.postMessage({topic:"wire-message",message:JSON.stringify(t)}),Promise.resolve()),this.shutdown=async()=>{e.close()},To(this,n,t,"f")}getPort(){return e}},n=new WeakMap,i=new WeakMap,r};var Bo={},Go={};Object.defineProperty(Go,"__esModule",{value:!0}),Go.BaseEnvironment=void 0;const Wo=vr();Go.BaseEnvironment=class{async getViewWindowIdentity(e,t){const{identity:n}=await e.View.wrapSync(t).getCurrentWindow();return n}async getInteropInfo(e){const t=await e.Application.getCurrentSync().getInfo().catch((()=>null)),n=t?.initialOptions?.interopBrokerConfiguration??{};return{fdc3Version:t?(0,Wo.getDefaultViewFdc3VersionFromAppInfo)(t):void 0,...n,fdc3Info:{providerVersion:await e.System.getVersion(),provider:"OpenFin"}}}},Object.defineProperty(Bo,"__esModule",{value:!0});var Ho=Bo.BrowserEnvironment=void 0;const No=Go;class Do extends No.BaseEnvironment{constructor(){super(...arguments),this.type="other",this.getRandomId=()=>{const e=new Uint32Array(1);return window.crypto.getRandomValues(e)[0].toString(32)}}getAdapterVersionSync(){return""}observeBounds(e,t){throw new Error("Method not implemented.")}layoutAllowedInContext(e){return!1}initLayoutManager(e,t,n){throw new Error("Method not implemented.")}applyLayoutSnapshot(e,t,n){throw new Error("Method not implemented.")}createLayout(e,t){throw new Error("Method not implemented.")}destroyLayout(e,t){throw new Error("Method not implemented.")}resolveLayout(e,t){throw new Error("Method not implemented.")}initPlatform(...e){throw new Error("Method not implemented.")}writeToken(e,t){return Promise.resolve("")}retrievePort(e){throw new Error("Method not implemented.")}getNextMessageId(){return this.getRandomId()}createChildContent(e){throw new Error("Method not implemented.")}getWebWindow(e){throw new Error("Method not implemented.")}getCurrentEntityIdentity(){throw new Error("Method not implemented.")}getCurrentEntityType(){return"external connection"}raiseEvent(e,t){throw new Error("Method not implemented.")}getUrl(){return location.href}getDefaultChannelOptions(){return{create:{},connect:{}}}getRtcPeer(){return new RTCPeerConnection}getWsConstructor(){return WebSocket}whenReady(){return Promise.resolve()}}Ho=Bo.BrowserEnvironment=Do;const Uo=e=>"platform"in e&&void 0!==e.platform;var Vo,zo;class Ko extends Ho{constructor(e){super(),this.connectConfig=e,Vo.set(this,void 0),zo.set(this,new W((async()=>Promise.resolve().then((function(){return __webpack_require__(/*! ./main-b14f67c9.js */ "../../node_modules/@openfin/core-web/out/main-b14f67c9.js")}))))),Uo(e)&&this.validatePlatformOptions(e)}getAdapterVersionSync(){return"0.39.21"}validatePlatformOptions({platform:e}){if(!("layoutSnapshot"in e))throw new Error("Platform options are missing layoutSnapshot. Please provide a layoutSnapshot in the platform options.");if("windows"in e||"windows"in e.layoutSnapshot)throw new Error("It appears you tried to call connect() with a snapshot object from an OpenFin desktop environment. Note that connect() expects to be called with a platform property with this structure: { platform: { layoutSnapshot } }. To get a layoutSnapshot of the expected structure, use fin.Platform.Layout.getCurrentLayoutManagerSync().getLayoutSnapshot() in v34+ in your desktop environment.");const{layouts:t}=e.layoutSnapshot;Object.entries(t).map((([e,t])=>{if("object"!=typeof t||null===t)throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must be an object.`);if(!("content"in t))throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must contain a 'content' property.`)}))}async getInteropInfo(e){return{...{contextGroups:void 0,logging:{beforeAction:{enabled:!1},afterAction:{enabled:!1}}},fdc3Version:void 0,fdc3Info:{providerVersion:"0.39.21",provider:"OpenFin Web"}}}layoutAllowedInContext(e){return!0}async initLayoutManager(e,t,n){if(Lo(this,Vo,"f"))throw new Error("Layout already initialized.");if(!Uo(this.connectConfig))throw new Error("Platform options are missing from connection config.");const{WebLayoutEntryPoint:i}=await Lo(this,zo,"f").getValue();return To(this,Vo,new i(this.connectConfig),"f"),await Lo(this,Vo,"f").initLayoutManager(e,t,n)}async applyLayoutSnapshot(e,t,n){Lo(this,Vo,"f")?.applyLayoutSnapshot(e,t,n)}async createLayout(e,t){return Lo(this,Vo,"f")?.createLayout(e,t)}async destroyLayout(e,t){return Lo(this,Vo,"f")?.destroyLayout(e,t)}async getViewWindowIdentity(e,t){return Promise.resolve({uuid:t.uuid,name:t.uuid})}}Vo=new WeakMap,zo=new WeakMap;const qo=()=>{const e=((e,t)=>{const n=new RegExp(`^${t}<(?.*)>$`).exec(e)?.groups?.meta;if(n)try{return JSON.parse(atob(n))}catch(e){throw new Error(`Failed to decode JSON from ${n}.`)}})(window.name,"of-frame");if(e)try{const{name:t,uuid:n,brokerUrl:i,providerId:r,contextGroup:o}=e;return Fo(i,"brokerUrl"),Fo(n,"uuid"),Fo(t,"name"),{identity:{name:t,uuid:n},brokerUrl:i,interopConfig:{providerId:r,currentContextGroup:o}}}catch(e){throw new Error(`Unexpected error occurred when inferring platform information: ${e.stack}`)}},Jo=()=>{const e=r.v4();return{uuid:e,name:e}},Yo=async e=>{if("enabled"===e.connectionInheritance){const t=await(async e=>{const t=qo();if(t){const{validateOptions:n=(()=>!0)}=e,{identity:i,...r}=t;if(!await n(r))throw new Error("Parent options were rejected by validateOptions.");return t}})(e);if(t)return t}if(!e.options){const t="enabled"===e.connectionInheritance?"Broker URL was not specified nor provided by a platform container.":"Connection inheritance is disabled but no options were provided.";throw new Error(t)}return{...e.options,identity:Jo()}};exports.__classPrivateFieldGet=Lo,exports.__classPrivateFieldSet=To,exports.apiExposer=Gn,exports.commonjsGlobal=s,exports.connect=async t=>{try{Ro.log("Establishing connection",t);const{brokerUrl:n,identity:i,timeout:r,interopConfig:s}=await Yo(t),{workerPort:a,iframeBrokerPort:c}=await(async(e,t,n)=>{const{origin:i}=new URL(e),r=document.createElement("IFRAME");let s;r.style.display="none";try{return await new Promise(((a,c)=>{const d=e=>{if(e.source===r.contentWindow&&e.data?.topic===`ack-${jo}`){if(e.origin!==i)c(new Error(`Broker redirected to unexpected origin ${e.origin}, expected ${i}.`));else if(e.data.success){const[t,n]=e.ports;a({iframeBrokerPort:t,workerPort:n})}else c(new m(e.data));window.removeEventListener("message",d),clearTimeout(s)}};window.addEventListener("message",d),ko.log(`Connecting to broker ${e}`),r.setAttribute("src",e),r.setAttribute("name",o(t,"of-broker")),document.body.appendChild(r),ko.log("Iframe loaded, awaiting init message from iframe"),n&&(s=setTimeout((()=>{window.removeEventListener("message",d),document.body.removeChild(r),c(new Error("Worker did not initialize in time"))}),n))}))}catch(e){throw new Error(`Failed to initialise Fin Web Client. ${e.message}`,{cause:e})}})(n,i,r);Ro.log("Successfully established connection to shared worker");const d={entityType:"external connection",...i};a.start(),c.start();const h=((t,n,i)=>{const r=$o(n),o=new Ko(t),s=new Io(r,o,i);return s.connectSync(),window.Buffer=e.Buffer,new Wr(s)})(t,a,d);return s?.providerId&&(h.me.interop=h.Interop.connectSync(s.providerId),s?.currentContextGroup&&h.me.interop.joinContextGroup(s.currentContextGroup).catch((e=>{console.warn(`Error joining specified context group: ${s?.currentContextGroup}, continuing`,e)}))),{...h,me:{...h.me,identity:{uuid:h.me.uuid,name:h.me.name}}}}catch(e){throw new Error(`An error occured during web-interop connection: ${e.message}`)}},exports.decorators=Nn,exports.encodeOptions=o,exports.layout_constants=ai,exports.lazy=G; /***/ }), -/***/ "./node_modules/@openfin/core-web/out/main-b14f67c9.js": -/*!*************************************************************!*\ - !*** ./node_modules/@openfin/core-web/out/main-b14f67c9.js ***! - \*************************************************************/ +/***/ "../../node_modules/@openfin/core-web/out/main-b14f67c9.js": +/*!*****************************************************************!*\ + !*** ../../node_modules/@openfin/core-web/out/main-b14f67c9.js ***! + \*****************************************************************/ /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; -var t=__webpack_require__(/*! ./main-8cad4070.js */ "./node_modules/@openfin/core-web/out/main-8cad4070.js"),e=__webpack_require__(/*! uuid */ "../../node_modules/uuid/dist/esm-browser/index.js");__webpack_require__(/*! buffer/ */ "../../node_modules/buffer/index.js"),__webpack_require__(/*! events */ "../../node_modules/events/events.js"),__webpack_require__(/*! lodash/cloneDeep */ "../../node_modules/lodash/cloneDeep.js"),__webpack_require__(/*! lodash/isEqual */ "../../node_modules/lodash/isEqual.js");var i={},n={};Object.defineProperty(n,"__esModule",{value:!0}),n.mapValuesAsync=n.mapEntriesAsync=void 0;const o=(t,[e,i])=>({...t,[e]:i});async function s(t,e){return(await Promise.all(e.map((async([e,i])=>[e,await t(i,e)])))).reduce(o,{})}n.mapEntriesAsync=s,n.mapValuesAsync=async function(t,e){let i;return i=e instanceof Map?[...e.entries()]:Object.entries(e),s(t,i)};var r,a,l,h,d=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldSet||function(t,e,i,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(t,i):o?o.value=i:e.set(t,i),i},c=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldGet||function(t,e,i,n){if("a"===i&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?n:"a"===i?n.call(t):n?n.value:e.get(t)};Object.defineProperty(i,"__esModule",{value:!0});var m=i.DefaultLayoutManager=void 0;const u=n;class p{constructor(t){a.set(this,void 0),l.set(this,new Map),d(this,a,t,"f")}size(){return c(this,l,"f").size}async applyLayoutSnapshot({layouts:t}){if(Object.keys(t).length>1)throw new Error("[LayoutManager] Tried to call applyLayoutSnapshot with more than 1 layout. When implementing multiple layouts via overridden LayoutManager class, you must override and fully implement the applyLayoutSnapshot method without calling super.applyLayoutSnapshot().");const[[e,i]]=Object.entries(t);await p.createLayout(this,{layoutName:e,layout:i})}async showLayout({layoutName:t}){}async getLayoutSnapshot(){return{layouts:await(0,u.mapValuesAsync)((t=>t.getFrameSnapshot()),c(this,l,"f"))}}async removeLayout({layoutName:t}){}getLayoutIdentityForView(t){const e=[...c(this,l,"f").values()].find((e=>e.getCurrentViews().some((e=>e.name===t.name&&e.uuid===t.uuid))));return e?.identity??void 0}isLayoutVisible({layoutName:t}){return c(p,r,"m",h).call(p,this,t).isVisible()}resolveLayoutIdentity(t){if(t&&"layoutName"in t)return t;const e=[...c(this,l,"f").values()];if(1===e.length)return e[0].identity;const i=e.find((t=>t.isVisible()));return i?.identity??void 0}static async resolveLayout(t,e){const i=t.resolveLayoutIdentity(e);if(void 0===i||!("layoutName"in i))throw new Error("[layout-manager] resolveLayout: Could not resolve the layout identity. Make sure you include 'layoutName' in the identity object.");return c(p,r,"m",h).call(p,t,i.layoutName)}static async handleSharedView(t,e,i){await(0,u.mapValuesAsync)((async t=>{if(t.identity.layoutName!==e.layoutName){const e=t.getCurrentViews().find((t=>t.name===i.name));e&&await t.onViewDetached({viewIdentity:e,target:null}).catch(console.error)}}),c(t,l,"f"))}static async handleLastViewRemoved(t,e){await t.removeLayout(e),await c(t,a,"f").handleLastViewRemoved(t)}static async destroyLayout(t,{layoutName:e}){await c(p,r,"m",h).call(p,t,e).destroy(),c(t,l,"f").delete(e)}static async createLayout(t,e){const{layoutName:i}=e;if(c(t,l,"f").has(i))throw new Error(`Layout name ${i} already exists`);await c(t,a,"f").createLayout(e,t)}static registerLayout(t,e,i){c(t,l,"f").set(e,i)}static getAllLayouts(t){return[...c(t,l,"f").values()]}static setInitialSnapshot(t,e){c(t,a,"f").setInitialSnapshot(e)}static createClosedConstructor(...t){return class extends p{constructor(){super(...t)}}}}m=i.DefaultLayoutManager=p,r=p,a=new WeakMap,l=new WeakMap,h=function(t,e){const i=c(t,l,"f").get(e);if(!i)throw new Error(`[layout-manager] getLayoutByName: Could not locate layout with name '${e}'`);return i};var g={},f={},v={};Object.defineProperty(v,"__esModule",{value:!0}),v.ReversibleMap=void 0;v.ReversibleMap=class{constructor(){this.valueToKey=new Map,this.keyToValue=new Map,this.setUnique=(t,e)=>{if(this.hasKey(t)||this.hasValue(e))throw new Error("Key or value already in the map.");this.keyToValue.set(t,e),this.valueToKey.set(e,t)},this.getKey=t=>{const e=this.valueToKey.get(t);if(!e)throw new Error("Value not found in the map.");return e},this.deleteKey=t=>{const e=this.getValue(t);return this.keyToValue.delete(t),this.valueToKey.delete(e),e},this.deleteValue=t=>{const e=this.getKey(t);return this.keyToValue.delete(e),this.valueToKey.delete(t),e},this.hasKey=t=>this.keyToValue.has(t),this.hasValue=t=>this.valueToKey.has(t)}getValue(t){const e=this.keyToValue.get(t);if(!e)throw new Error("Key not found in the map.");return e}},Object.defineProperty(f,"__esModule",{value:!0});var _=f.LayoutContentCache=void 0;const y=t.lazy,C=v;class w{constructor(){this.contentItemCache=new C.ReversibleMap,this.contentItemCacheId=0,this.createCacheKey=()=>{const t=`entity-${this.contentItemCacheId.toString()}`;return this.contentItemCacheId+=1,t},this.hasKey=t=>this.contentItemCache.hasKey(t),this.getItemOrUndefined=t=>{try{return this.getContentItemOrThrow(t)}catch(t){return}},this.getContentItemOrThrow=(t,e)=>{if(!this.contentItemCache.hasKey(t))throw new Error("Layout component has been destroyed or detached from the current layout.");const i=this.contentItemCache.getValue(t);if(e&&!e.includes(i.type))throw new Error(`Layout item is not the expected type. Expected ${e.join(", ")}, got ${i.type}.`);return i},this.getOrCreateEntityId=t=>{if(this.contentItemCache.hasValue(t))return this.contentItemCache.getKey(t);t.onDestroyed((()=>{this.contentItemCache.deleteValue(t)}));const e=this.createCacheKey();return this.contentItemCache.setUnique(e,t),e}}static getSingleInstance(){return w.singleton.getValue()}}_=f.LayoutContentCache=w,w.singleton=new y.Lazy((()=>new w));var I={},b={};!function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.getAdjacentStacks=t.doShareEdge=t.getAdjacentItem=void 0;t.getAdjacentItem=(e,i)=>{const{parent:n}=e;if(e.isRoot()||!n)return;const o=["top","bottom"].includes(i)?"column":"row",s=["top","left"].includes(i)?-1:1;if(n.type===o){const t=n.contentItems.indexOf(e)+s;if(t>=0&&t{const n=t.getBounds(),o=e.getBounds();if(!n||!o)return!1;if(["top","bottom"].includes(i)){return!(n.righto.right)}return!(n.bottomo.bottom)};t.getAdjacentStacks=(e,i)=>{const n=["top","bottom"].includes(i)?"row":"column",o=s=>"stack"===s.type?(0,t.doShareEdge)(e,s,i)?[s]:[]:"root"===s.type||"ground"===s.type?[]:s.type===n?s.contentItems.map((t=>o(t))).flat():s.type!==n?["top","right"].includes(i)?o(s.contentItems[s.contentItems.length-1]):o(s.contentItems[0]):[],s=(0,t.getAdjacentItem)(e,i);return s?o(s):[]}}(b);var S=t.commonjsGlobal&&t.commonjsGlobal.__decorate||function(t,e,i,n){var o,s=arguments.length,r=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(s<3?o(r):s>3?o(e,i,r):o(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};Object.defineProperty(I,"__esModule",{value:!0}),I.LayoutEntitiesController=void 0;const E=t.decorators,x=b,L=i;class z{constructor(t,e,i){this.wire=t,this.layoutManager=e,this.layoutContentCache=i,this.analytics=t=>{this.wire.sendAction(`layout-controller-${t}`).catch((()=>{}))},this.getLayoutIdentityForViewOrThrow=async t=>{const e=this.layoutManager.getLayoutIdentityForView(t);if(!e)throw new Error(`View identity ${t.name} is not attached to any layouts.`);return e},this.getRoot=async t=>{this.analytics("get-root");const e=(await this.getLayout(t)).getRoot();return{type:e.type,entityId:this.layoutContentCache.getOrCreateEntityId(e)}},this.getStackByView=async t=>{this.analytics("get-stack-by-view");const e=await this.getLayoutIdentityForViewOrThrow(t),i=(await this.getLayout(e)).getStackByView(t);if("stack"===i?.type)return{entityId:this.layoutContentCache.getOrCreateEntityId(i),type:"stack"}},this.getStackViews=t=>{this.analytics("get-stack-views");return this.layoutContentCache.getContentItemOrThrow(t,["stack"]).contentItems.map((t=>({name:t.viewName,uuid:this.wire.me.uuid})))},this.isRoot=t=>{this.analytics("is-root");return this.layoutContentCache.getContentItemOrThrow(t).isRoot()},this.exists=t=>(this.analytics("exists"),this.layoutContentCache.hasKey(t)),this.addViewToStack=async(t,e,{index:i}={index:0})=>{this.analytics("add-view-to-stack");const n=this.layoutContentCache.getContentItemOrThrow(t);if(i&&i>n.contentItems.length+1)throw new Error(`Index '${i}' out of range, please exclude the index or specify a number between 0 and ${n.contentItems.length}`);const o={id:t,index:i},{identity:s}=await n.layout.platformCreateView(e,{location:o});return s},this.findViewInStack=(t,e)=>t.contentItems.find((t=>t.viewName===e.name)),this.removeViewFromStack=async(t,e)=>{this.analytics("remove-view-from-stack");const i=this.layoutContentCache.getContentItemOrThrow(t,["stack"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to remove a view ('${e.name}') which does not belong to the stack.`);await n.layout.platformCloseView(e)},this.createAdjacentStack=async(t,e,{position:i="right"}={})=>{if(this.analytics("create-adjacent-stack"),!Array.isArray(e)||0===e.length)throw new Error('The parameter "views" must be an array with at least 1 element.');if(!["top","bottom","left","right"].includes(i))throw new Error(`Invalid position '${i}' specified.`);const n=this.layoutContentCache.getContentItemOrThrow(t).createAdjacentStack({position:i}),o=this.layoutContentCache.getOrCreateEntityId(n);return await Promise.all(e.reverse().map((t=>this.addViewToStack(o,t)))),o},this.getAdjacentStacks=async({targetId:t,edge:e})=>{this.analytics("get-adjacent-stacks");const i=this.layoutContentCache.getContentItemOrThrow(t);return(0,x.getAdjacentStacks)(i,e).map((t=>({entityId:this.layoutContentCache.getOrCreateEntityId(t)})))},this.setStackActiveView=async(t,e)=>{this.analytics("set-stack-active-view");const i=this.layoutContentCache.getContentItemOrThrow(t,["stack"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to set a view ('${e.name}') as active when it does not belong to the stack.`);i.setActiveContentItem(n,!0)}}async getLayout(t){const e=await L.DefaultLayoutManager.resolveLayout(this.layoutManager,t);if(!e)throw new Error(`Could not resolve target layout identity ${JSON.stringify(t)}`);return e}getContent(t){this.analytics("get-content");return this.layoutContentCache.getContentItemOrThrow(t,["column","row"]).contentItems.map((t=>({type:t.type,entityId:this.layoutContentCache.getOrCreateEntityId(t)})))}getParent(t){this.analytics("get-parent");const e=this.layoutContentCache.getContentItemOrThrow(t);if(!e.isRoot())return e.parent?.contentItems.includes(e)?{type:e.parent.type,entityId:this.layoutContentCache.getOrCreateEntityId(e.parent)}:void 0}}S([(0,E.expose)()],z.prototype,"getLayoutIdentityForViewOrThrow",void 0),S([(0,E.expose)()],z.prototype,"getRoot",void 0),S([(0,E.expose)()],z.prototype,"getStackByView",void 0),S([(0,E.expose)()],z.prototype,"getStackViews",void 0),S([(0,E.expose)()],z.prototype,"getContent",null),S([(0,E.expose)()],z.prototype,"getParent",null),S([(0,E.expose)()],z.prototype,"isRoot",void 0),S([(0,E.expose)()],z.prototype,"exists",void 0),S([(0,E.expose)()],z.prototype,"addViewToStack",void 0),S([(0,E.expose)()],z.prototype,"removeViewFromStack",void 0),S([(0,E.expose)()],z.prototype,"createAdjacentStack",void 0),S([(0,E.expose)()],z.prototype,"getAdjacentStacks",void 0),S([(0,E.expose)()],z.prototype,"setStackActiveView",void 0),I.LayoutEntitiesController=z,Object.defineProperty(g,"__esModule",{value:!0});var M=g.initLayoutEndpoints=void 0;const P=t.apiExposer,T=t.layout_constants,A=f,k=I,D=i;M=g.initLayoutEndpoints=async function(t,e){const i=t.getFin(),n=await i.Platform.getCurrentSync().getClient(),o=new P.ChannelsExposer(n);await new P.ApiExposer(o).exposeInstance(new k.LayoutEntitiesController(t,e,A.LayoutContentCache.getSingleInstance()),{id:T.LAYOUT_CONTROLLER_ID}),await async function(t,e){const i=t=>async i=>{const n=await D.DefaultLayoutManager.resolveLayout(e,i.target);if(!n)throw new Error(`Could not resolve the layout target from payload ${JSON.stringify(i)}`);return t(n,i)},n=(e,n)=>{t.register(e,i(n))},o=(t,e)=>{n(t,e)};n("replace-view",((t,e)=>t.replaceView(e))),n("replace-layout",((t,{layout:e})=>t.replaceLayout(e))),n("add-view",((t,e)=>t.insertView(e))),o("layout-add-view",((t,{viewOptions:e,location:i,targetView:n})=>t.platformCreateView(e,{location:i,targetView:n}))),n("close-view",((t,e)=>t.cleanupView(e.viewIdentity))),o("layout-close-view",((t,e)=>t.platformCloseView(e.viewIdentity))),n("apply-preset-layout",((t,e)=>t.applyPreset(e))),n("get-layout-views",(t=>t.getCurrentViews())),n("get-frame-snapshot",(t=>t.getFrameSnapshot())),n("is-visible",(t=>t.isVisible())),n("destroy",(t=>t.destroy())),t.register("get-layout-snapshot",(()=>e.getLayoutSnapshot()))}(n,e)};var R={};Object.defineProperty(R,"__esModule",{value:!0});var U=R.BaseLayout=void 0;U=R.BaseLayout=class{};var O={};Object.defineProperty(O,"__esModule",{value:!0});var V=O.DOMEmitter=void 0;V=O.DOMEmitter=class{constructor(t){this.container=t}dispatchLocalEvent(t,e){const i={...e,type:t,tabSelector:`tab-${e.name}`,containerSelector:`container-${e.name}`,topic:"openfin-DOM-event"};this.container.dispatchEvent(new CustomEvent(t,{detail:i}))}};var B={};Object.defineProperty(B,"__esModule",{value:!0});var H=B.mapLayoutContentItemsImmutableSync=B.mapLayoutContentItemsImmutable=W=B.isVisible=void 0;var W=B.isVisible=t=>(0!==t.offsetWidth||0!==t.offsetHeight)&&"hidden"!==window.getComputedStyle(t).visibility&&t.offsetTop>=0&&t.offsetLeft>=0&&t.offsetTop<=window.innerHeight&&t.offsetLeft<=window.innerWidth;const F=t=>"type"in t&&"component"===t.type;B.mapLayoutContentItemsImmutable=async function t(e,i){return F(i)?e(i):{...i,content:await Promise.all(i.content?.map((i=>t(e,i))))}},H=B.mapLayoutContentItemsImmutableSync=function t(e,i){return F(i)?e(i):{...i,content:i.content?.map((i=>t(e,i)))}};class N extends Error{constructor(t,e){super(e),this.type=t}}class G extends N{constructor(t,e){super("Configuration",t),this.node=e}}class j extends N{constructor(t){super("PopoutBlocked",t)}}class $ extends N{constructor(t){super("API",t)}}class Z extends N{constructor(t){super("Bind",t)}}class q extends Error{constructor(t,e,i){super(`${t}: ${e}${void 0===i?"":": "+i}`)}}class X extends q{constructor(t,e){super("Assert",t,e)}}class Y extends q{constructor(t,e,i){super("UnreachableCase",t,`${e}${void 0===i?"":": "+i}`)}}class K extends q{constructor(t,e){super("UnexpectedNull",t,e)}}class J extends q{constructor(t,e){super("UnexpectedUndefined",t,e)}}var Q;!function(t){let e=!1;const i={PopoutCannotBeCreatedWithGroundItemConfig:{id:0,default:"Popout cannot be created with ground ItemConfig"},PleaseRegisterAConstructorFunction:{id:1,default:"Please register a constructor function"},ComponentTypeNotRegisteredAndBindComponentEventHandlerNotAssigned:{id:2,default:"Component type not registered and BindComponentEvent handler not assigned"},ComponentIsAlreadyRegistered:{id:3,default:"Component is already registered"},ComponentIsNotVirtuable:{id:4,default:"Component is not virtuable. Requires rootHtmlElement field/getter"},VirtualComponentDoesNotHaveRootHtmlElement:{id:5,default:'Virtual component does not have getter "rootHtmlElement"'},ItemConfigIsNotTypeComponent:{id:6,default:"ItemConfig is not of type component"},InvalidNumberPartInSizeString:{id:7,default:"Invalid number part in size string"},UnknownUnitInSizeString:{id:8,default:"Unknown unit in size string"},UnsupportedUnitInSizeString:{id:9,default:"Unsupported unit in size string"}};t.idCount=Object.keys(i).length;const n=Object.values(i);t.checkInitialise=function(){if(!e)for(let e=0;e="0"&&t<="9"}function Tt(t,e){const i=zt(e);t.style.width=i}function At(t,e){const i=zt(e);t.style.height=i}function kt(t){return{width:t.offsetWidth,height:t.offsetHeight}}function Dt(t,e){t.style.display=e?"":"none"}function Rt(t,e){if(void 0!==e)for(const i in e)if(e.hasOwnProperty(i)){const n=e[i],o=t[i];t[i]=Ut(o,n)}return t}function Ut(t,e){if("object"!=typeof e)return e;if(Array.isArray(e)){const t=e.length,i=new Array(t);for(let n=0;n36)throw new Error("Too many keys in config minifier map")},t.translateObject=n}(dt||(dt={})),function(t){t.defaults={type:at.ground,content:[],size:1,sizeUnit:ht.Fractional,minSize:void 0,minSizeUnit:ht.Pixel,id:"",isClosable:!0},t.createCopy=function(t,e){switch(t.type){case at.ground:case at.row:case at.column:return gt.createCopy(t,e);case at.stack:return ut.createCopy(t,e);case at.component:return pt.createCopy(t);default:throw new Y("CICC91354",t.type,"Invalid Config Item type specified")}},t.createDefault=function(t){switch(t){case at.ground:throw new X("CICCDR91562");case at.row:case at.column:return gt.createDefault(t);case at.stack:return ut.createDefault();case at.component:return pt.createDefault();default:throw new Y("CICCDD91563",t,"Invalid Config Item type specified")}},t.isComponentItem=function(t){return t.type===at.component},t.isStackItem=function(t){return t.type===at.stack},t.isGroundItem=function(t){return t.type===at.ground}}(ct||(ct={})),function(t){t.defaultMaximised=!1,function(t){t.createCopy=function(t,e){return void 0===t?void 0:{show:null!=e?e:t.show,popout:t.popout,close:t.close,maximise:t.maximise,minimise:t.minimise,tabDropdown:t.tabDropdown}}}(t.Header||(t.Header={}))}(mt||(mt={})),function(t){function e(t){const e=t.length,i=new Array(e);for(let n=0;n"__glMaximised"===t));t>0&&(o=!0,n=n.splice(t,1)),e=n.length>0?n[0]:ct.defaults.id}else e=n;return i=void 0!==t.maximised?t.maximised:o,{id:e,maximised:i}}}(wt||(wt={})),function(t){function e(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0;return{resolved:!0,root:Et.resolve(i),openPopouts:t.resolveOpenPopouts(e.openPopouts),dimensions:t.Dimensions.resolve(e.dimensions),settings:t.Settings.resolve(e.settings),header:t.Header.resolve(e.header,e.settings,e.labels)}}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:Lt.fromResolvedArray(e.openPopouts),settings:_t.Settings.createCopy(e.settings),dimensions:t.Dimensions.fromResolved(e.dimensions),header:_t.Header.createCopy(e.header)}},t.isResolved=function(t){const e=t;return void 0!==e.resolved&&!0===e.resolved},t.resolveOpenPopouts=function(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0,{root:Et.resolve(o),openPopouts:xt.resolveOpenPopouts(e.openPopouts),dimensions:xt.Dimensions.resolve(e.dimensions),settings:xt.Settings.resolve(e.settings),header:xt.Header.resolve(e.header,e.settings,e.labels),parentId:null!==(i=e.parentId)&&void 0!==i?i:null,indexInParent:null!==(n=e.indexInParent)&&void 0!==n?n:null,window:t.Window.resolve(e.window,e.dimensions),resolved:!0}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:i(e.openPopouts),dimensions:xt.Dimensions.fromResolved(e.dimensions),settings:_t.Settings.createCopy(e.settings),header:_t.Header.createCopy(e.header),parentId:e.parentId,indexInParent:e.indexInParent,window:t.Window.fromResolved(e.window)}},t.fromResolvedArray=i}(Lt||(Lt={}));class Wt{constructor(){this._allEventSubscriptions=[],this._subscriptionsMap=new Map,this.unbind=this.removeEventListener,this.trigger=this.emit}tryBubbleEvent(t,e){}emit(t,...e){let i=this._subscriptionsMap.get(t);if(void 0!==i){i=i.slice();for(let t=0;t0){const n=e.slice();n.unshift(t);const o=this._allEventSubscriptions.slice();for(let t=0;t0?n.contentItems[0]:n,e=0);const o=this._layoutManager.createAndInitContentItem(i,t);t.addChild(o,e),this._layoutManager.layoutConfig.settings.popInOnClose?this._onClose():this.close()}createWindow(){const t=this.createUrl(),e=Math.floor(1e6*Math.random()).toString(36),i=this.serializeWindowFeatures({width:this._initialWindowSize.width,height:this._initialWindowSize.height,innerWidth:this._initialWindowSize.width,innerHeight:this._initialWindowSize.height,menubar:"no",toolbar:"no",location:"no",personalbar:"no",resizable:"yes",scrollbars:"no",status:"no"});if(this._popoutWindow=globalThis.open(t,e,i),this._popoutWindow)this._popoutWindow.addEventListener("load",(()=>this.positionWindow()),{passive:!0}),this._popoutWindow.addEventListener("beforeunload",(()=>{this._layoutManager.layoutConfig.settings.popInOnClose?this.popIn():this._onClose()}),{passive:!0}),this._checkReadyInterval=setInterval((()=>this.checkReady()),10);else if(!0===this._layoutManager.layoutConfig.settings.blockedPopoutsThrowError){throw new j("Popout blocked")}}checkReady(){if(null===this._popoutWindow)throw new K("BPCR01844");this._popoutWindow.__glInstance&&this._popoutWindow.__glInstance.isInitialised&&(this.onInitialised(),void 0!==this._checkReadyInterval&&(clearInterval(this._checkReadyInterval),this._checkReadyInterval=void 0))}serializeWindowFeatures(t){const e=[];for(const i in t)e.push(i+"="+t[i].toString());return e.join(",")}createUrl(){const t="gl-window-config-"+Ot(),e=_t.minifyConfig(this._config);try{localStorage.setItem(t,JSON.stringify(e))}catch(t){throw new Error("Error while writing to localStorage "+function(t){return t instanceof Error?t.message:"string"==typeof t?t:"Unknown Error"}(t))}const i=new URL(location.href);return i.searchParams.set("gl-window",t),i.toString()}positionWindow(){if(null===this._popoutWindow)throw new Error("BrowserPopout.positionWindow: null popoutWindow");this._popoutWindow.moveTo(this._initialWindowSize.left,this._initialWindowSize.top),this._popoutWindow.focus()}onInitialised(){this._isInitialised=!0,this.getGlInstance().on("popIn",(()=>this.popIn())),this.emit("initialised")}_onClose(){setTimeout((()=>this.emit("closed")),50)}}class Gt extends Wt{constructor(t,e,i,n){super(),this.layoutManager=t,this._parent=i,this._element=n,this._popInParentIds=[],this._type=e.type,this._id=e.id,this._isInitialised=!1,this.isGround=!1,this.isRow=!1,this.isColumn=!1,this.isStack=!1,this.isComponent=!1,this.size=e.size,this.sizeUnit=e.sizeUnit,this.minSize=e.minSize,this.minSizeUnit=e.minSizeUnit,this._isClosable=e.isClosable,this._pendingEventPropagations={},this._throttledEvents=["stateChanged"],this._contentItems=this.createContentItems(e.content)}get type(){return this._type}get id(){return this._id}set id(t){this._id=t}get popInParentIds(){return this._popInParentIds}get parent(){return this._parent}get contentItems(){return this._contentItems}get isClosable(){return this._isClosable}get element(){return this._element}get isInitialised(){return this._isInitialised}static isStack(t){return t.isStack}static isComponentItem(t){return t.isComponent}static isComponentParentableItem(t){return t.isStack||t.isGround}removeChild(t,e=!1){const i=this._contentItems.indexOf(t);if(-1===i)throw new Error("Can't remove child item. Unknown content item");if(e||this._contentItems[i].destroy(),this._contentItems.splice(i,1),this._contentItems.length>0)this.updateSize(!1);else if(!this.isGround&&!0===this._isClosable){if(null===this._parent)throw new K("CIUC00874");this._parent.removeChild(this)}}addChild(t,e,i){return null!=e||(e=this._contentItems.length),this._contentItems.splice(e,0,t),t.setParent(this),!0===this._isInitialised&&!1===t._isInitialised&&t.init(),e}replaceChild(t,e,i=!1){const n=this._contentItems.indexOf(t),o=t._element.parentNode;if(-1===n)throw new X("CIRCI23232","Can't replace child. oldChild is not child of this");if(null===o)throw new K("CIRCP23232");if(o.replaceChild(e._element,t._element),!0===i&&(t._parent=null,t.destroy()),this._contentItems[n]=e,e.setParent(this),e.size=t.size,e.sizeUnit=t.sizeUnit,e.minSize=t.minSize,e.minSizeUnit=t.minSizeUnit,null===e._parent)throw new K("CIRCNC45699");!0===e._parent._isInitialised&&!1===e._isInitialised&&e.init(),this.updateSize(!1)}remove(){if(null===this._parent)throw new K("CIR11110");this._parent.removeChild(this)}popout(){const t=Ot(),e=this.layoutManager.createPopoutFromContentItem(this,void 0,t,void 0);return this.emitBaseBubblingEvent("stateChanged"),e}calculateConfigContent(){const t=this._contentItems,e=t.length,i=new Array(e);for(let n=0;nthis.propagateEventToLayoutManager(t,e))))}propagateEventToLayoutManager(t,e){this._pendingEventPropagations[t]=!1,this.layoutManager.emitUnknown(t,e)}}class jt extends Gt{constructor(t,e,i){super(t,e,i,document.createElement("div")),this._parentItem=i,this._focused=!1,this.isComponent=!0,this._reorderEnabled=e.reorderEnabled,this.applyUpdatableConfig(e),this._initialWantMaximise=e.maximised;const n=document.createElement("div");n.classList.add("lm_content"),this.element.appendChild(n),this._container=new Ft(e,this,t,n,(t=>this.handleUpdateItemConfigEvent(t)),(()=>this.show()),(()=>this.hide()),(t=>this.focus(t)),(t=>this.blur(t)))}get componentName(){return this._container.componentType}get componentType(){return this._container.componentType}get reorderEnabled(){return this._reorderEnabled}get initialWantMaximise(){return this._initialWantMaximise}get component(){return this._container.component}get container(){return this._container}get parentItem(){return this._parentItem}get headerConfig(){return this._headerConfig}get title(){return this._title}get tab(){return this._tab}get focused(){return this._focused}destroy(){this._container.destroy(),super.destroy()}applyUpdatableConfig(t){this.setTitle(t.title),this._headerConfig=t.header}toConfig(){const t=this._container.stateRequestEvent,e=void 0===t?this._container.state:t();return{type:at.component,content:[],size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,maximised:!1,isClosable:this.isClosable,reorderEnabled:this._reorderEnabled,title:this._title,header:mt.Header.createCopy(this._headerConfig),componentType:pt.copyComponentType(this.componentType),componentState:e}}close(){if(null===this.parent)throw new K("CIC68883");this.parent.removeChild(this,!1)}enterDragMode(t,e){Tt(this.element,t),At(this.element,e),this._container.enterDragMode(t,e)}exitDragMode(){this._container.exitDragMode()}enterStackMaximised(){this._container.enterStackMaximised()}exitStackMaximised(){this._container.exitStackMaximised()}drag(){this._container.drag()}updateSize(t){this.updateNodeSize(t)}init(){this.updateNodeSize(!1),super.init(),this._container.emit("open"),this.initContentItems()}setTitle(t){this._title=t,this.emit("titleChanged",t),this.emit("stateChanged")}setTab(t){this._tab=t,this.emit("tab",t),this._container.setTab(t)}hide(){super.hide(),this._container.setVisibility(!1)}show(){super.show(),this._container.setVisibility(!0)}focus(t=!1){this.parentItem.setActiveComponentItem(this,!0,t)}setFocused(t){this._focused=!0,this.tab.setFocused(),t||this.emitBaseBubblingEvent("focus")}blur(t=!1){this._focused&&this.layoutManager.setFocusedComponentItem(void 0,t)}setBlurred(t){this._focused=!1,this.tab.setBlurred(),t||this.emitBaseBubblingEvent("blur")}setParent(t){this._parentItem=t,super.setParent(t)}handleUpdateItemConfigEvent(t){this.applyUpdatableConfig(t)}updateNodeSize(t){if("none"!==this.element.style.display){const{width:e,height:i}=kt(this.element);this._container.setSizeToNodeSize(e,i,t)}}}class $t extends Gt{constructor(){super(...arguments),this._focused=!1}get focused(){return this._focused}setFocusedValue(t){this._focused=t}}class Zt extends Wt{constructor(t,e){super(),this._eElement=t,this._pointerTracking=!1,this._pointerDownEventListener=t=>this.onPointerDown(t),this._pointerMoveEventListener=t=>this.onPointerMove(t),this._pointerUpEventListener=t=>this.onPointerUp(t),this._timeout=void 0,this._allowableTargets=[t,...e],this._oDocument=document,this._eBody=document.body,this._nDelay=1800,this._nDistance=10,this._nX=0,this._nY=0,this._nOriginalX=0,this._nOriginalY=0,this._dragging=!1,this._eElement.addEventListener("pointerdown",this._pointerDownEventListener,{passive:!0})}destroy(){this.checkRemovePointerTrackingEventListeners(),this._eElement.removeEventListener("pointerdown",this._pointerDownEventListener)}cancelDrag(){this.processDragStop(void 0)}onPointerDown(t){if(this._allowableTargets.includes(t.target)&&t.isPrimary){const e=this.getPointerCoordinates(t);this.processPointerDown(e)}}processPointerDown(t){this._nOriginalX=t.x,this._nOriginalY=t.y,this._oDocument.addEventListener("pointermove",this._pointerMoveEventListener),this._oDocument.addEventListener("pointerup",this._pointerUpEventListener,{passive:!0}),this._pointerTracking=!0,this._timeout=setTimeout((()=>{try{this.startDrag()}catch(t){throw console.error(t),t}}),this._nDelay)}onPointerMove(t){this._pointerTracking&&(this.processDragMove(t),t.preventDefault())}processDragMove(t){this._nX=t.pageX-this._nOriginalX,this._nY=t.pageY-this._nOriginalY,!1===this._dragging&&(Math.abs(this._nX)>this._nDistance||Math.abs(this._nY)>this._nDistance)&&this.startDrag(),this._dragging&&this.emit("drag",this._nX,this._nY,t)}onPointerUp(t){this.processDragStop(t)}processDragStop(t){var e;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this.checkRemovePointerTrackingEventListeners(),!0===this._dragging&&(this._eBody.classList.remove("lm_dragging"),this._eElement.classList.remove("lm_dragging"),null===(e=this._oDocument.querySelector("iframe"))||void 0===e||e.style.setProperty("pointer-events",""),this._dragging=!1,this.emit("dragStop",t))}checkRemovePointerTrackingEventListeners(){this._pointerTracking&&(this._oDocument.removeEventListener("pointermove",this._pointerMoveEventListener),this._oDocument.removeEventListener("pointerup",this._pointerUpEventListener),this._pointerTracking=!1)}startDrag(){var t;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this._dragging=!0,this._eBody.classList.add("lm_dragging"),this._eElement.classList.add("lm_dragging"),null===(t=this._oDocument.querySelector("iframe"))||void 0===t||t.style.setProperty("pointer-events","none"),this.emit("dragStart",this._nOriginalX,this._nOriginalY)}getPointerCoordinates(t){return{x:t.pageX,y:t.pageY}}}class qt{constructor(t,e,i){this._isVertical=t,this._size=e,this._grabSize=i0){const i=this.createSplitter(Math.max(0,e-1)).element;e>0?(this.contentItems[e-1].element.insertAdjacentElement("afterend",i),i.insertAdjacentElement("afterend",t.element)):(this.contentItems[0].element.insertAdjacentElement("beforebegin",i),i.insertAdjacentElement("beforebegin",t.element))}else this._childElementContainer.appendChild(t.element);super.addChild(t,e);const n=1/this.contentItems.length*100;if(!0===i)return this.emitBaseBubblingEvent("stateChanged"),e;for(let e=0;e0&&(this.calculateRelativeSizes(),this.setAbsoluteSizes()),this.emitBaseBubblingEvent("stateChanged"),this.emit("resize")}setAbsoluteSizes(){const t=this.calculateAbsoluteSizes();for(let e=0;e0&&t.itemSizes[e]++,this._isColumn?(Tt(this.contentItems[e].element,t.crossAxisSize),At(this.contentItems[e].element,t.itemSizes[e])):(Tt(this.contentItems[e].element,t.itemSizes[e]),At(this.contentItems[e].element,t.crossAxisSize))}calculateAbsoluteSizes(){const t=(this.contentItems.length-1)*this._splitterSize,{width:e,height:i}=kt(this.element);let n,o;this._isColumn?(n=i-t,o=e):(n=e-t,o=i);let s=0;const r=[];for(let t=0;t0){const n=100-t;for(let t=0;t100&&e.length>0){for(let t=0;te)return;{const r=i/e;let a=i;for(let e=0;ethis.onSplitterDrag(e,t,i))),e.on("dragStop",(()=>this.onSplitterDragStop(e))),e.on("dragStart",(()=>this.onSplitterDragStart(e))),this._splitter.splice(t,0,e),e}getSplitItems(t){const e=this._splitter.indexOf(t);return{before:this.contentItems[e],after:this.contentItems[e+1]}}calculateContentItemMinSize(t){const e=t.minSize;if(void 0!==e){if(t.minSizeUnit===ht.Pixel)return e;throw new X("ROCGMD98831",JSON.stringify(t))}{const t=this.layoutManager.layoutConfig.dimensions;return this._isColumn?t.defaultMinItemHeight:t.defaultMinItemWidth}}calculateContentItemsTotalMinSize(t){let e=0;for(const i of t)e+=this.calculateContentItemMinSize(i);return e}onSplitterDragStart(t){const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=this.calculateContentItemsTotalMinSize(e.before.contentItems),s=this.calculateContentItemsTotalMinSize(e.after.contentItems);this._splitterPosition=0,this._splitterMinPosition=-1*(i-o),this._splitterMaxPosition=n-s}onSplitterDrag(t,e,i){let n=this._isColumn?i:e;if(null===this._splitterMinPosition||null===this._splitterMaxPosition)throw new K("ROCOSD59226");n=Math.max(n,this._splitterMinPosition),n=Math.min(n,this._splitterMaxPosition),this._splitterPosition=n;const o=zt(n);this._isColumn?t.element.style.top=o:t.element.style.left=o}onSplitterDragStop(t){if(null===this._splitterPosition)throw new K("ROCOSDS66932");{const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=(this._splitterPosition+i)/(i+n),s=e.before.size+e.after.size;e.before.size=o*s,e.after.size=(1-o)*s,t.element.style.top=zt(0),t.element.style.left=zt(0),globalThis.requestAnimationFrame((()=>this.updateSize(!1)))}}}!function(t){t.getElementDimensionSize=function(t,e){return"width"===e?function(t){return t.offsetWidth}(t):function(t){return t.offsetHeight}(t)},t.setElementDimensionSize=function(t,e,i){return"width"===e?Tt(t,i):At(t,i)},t.createElement=function(t,e){const i=t.createElement("div");return i.classList.add("lm_item"),e?i.classList.add("lm_column"):i.classList.add("lm_row"),i}}(Xt||(Xt={}));class Yt extends $t{constructor(t,e,i){super(t,vt.create(e),null,Yt.createElement(document)),this.isGround=!0,this._childElementContainer=this.element,this._containerElement=i;let n=null;for(;;){const t=n?n.previousSibling:this._containerElement.lastChild;if(!(t instanceof Element&&t.classList.contains("lm_content")))break;n=t}this._containerElement.insertBefore(this.element,n)}init(){if(!0!==this.isInitialised){this.updateNodeSize();for(let t=0;t0?this.contentItems[0]:this,n.isComponent)throw new Error("Cannot add item as child to ComponentItem");{const t=this.layoutManager.createAndInitContentItem(i,n);return e=n.addChild(t,e),n===this?-1:e}}loadComponentAsRoot(t){this.clearRoot();const e=Ct.resolve(t,!1);if(e.maximised)throw new Error("Root Component cannot be maximised");{const t=new jt(this.layoutManager,e,this);t.init(),this.addChild(t,0)}}addChild(t,e){if(this.contentItems.length>0)throw new Error("Ground node can only have a single child");return this._childElementContainer.appendChild(t.element),e=super.addChild(t,e),this.updateSize(!1),this.emitBaseBubblingEvent("stateChanged"),e}calculateConfigContent(){const t=this.contentItems,e=t.length,i=new Array(e);for(let n=0;n0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e)),this.updateContentItemsSize(!1))}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}createSideAreas(){const t=Yt.Area.oppositeSides,e=new Array(Object.keys(t).length);let i=0;for(const n in t){const o=n,s=this.getElementArea();if(null===s)throw new K("RCSA77553");s.side=o,"2"===t[o][1]?s[o]=s[t[o]]-50:s[o]=s[t[o]]+50,s.surface=(s.x2-s.x1)*(s.y2-s.y1),e[i++]=s}return e}highlightDropZone(t,e,i){this.layoutManager.tabDropPlaceholder.remove(),super.highlightDropZone(t,e,i)}onDrop(t,e){if(t.isComponent){const e=ut.createDefault(),i=t;e.header=mt.Header.createCopy(i.headerConfig);const n=this.layoutManager.createAndInitContentItem(e,this);n.addChild(t),t=n}if(0===this.contentItems.length)this.addChild(t);else{if(t.type===at.row||t.type===at.column){const e=ut.createDefault(),i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}const i="x"==e.side[0]?at.row:at.column,n="2"==e.side[1],o=this.contentItems[0];if(o instanceof Xt&&o.type===i){const e=o.contentItems[n?0:o.contentItems.length-1];o.addChild(t,n?0:void 0,!0),e.size*=.5,t.size=e.size,t.sizeUnit=ht.Percent,o.updateSize(!1)}else{const e=ct.createDefault(i),s=this.layoutManager.createContentItem(e,this);this.replaceChild(o,s),s.addChild(t,n?0:void 0,!0),s.addChild(o,n?void 0:0,!0),o.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}}dock(){throw new X("GID87731")}validateDocking(){throw new X("GIVD87732")}getAllContentItems(){const t=[this];return this.deepGetAllContentItems(this.contentItems,t),t}getConfigMaximisedItems(){const t=[];return this.deepFilterContentItems(this.contentItems,t,(t=>!(!Gt.isStack(t)||!t.initialWantMaximise)||!(!Gt.isComponentItem(t)||!t.initialWantMaximise))),t}getItemsByPopInParentId(t){const e=[];return this.deepFilterContentItems(this.contentItems,e,(e=>e.popInParentIds.includes(t))),e}toConfig(){throw new Error("Cannot generate GroundItem config")}setActiveComponentItem(t,e,i){}updateNodeSize(){const{width:t,height:e}=kt(this._containerElement);Tt(this.element,t),At(this.element,e),this.contentItems.length>0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e))}deepGetAllContentItems(t,e){for(let i=0;ithis.onClick(t),this._touchStartEventListener=t=>this.onTouchStart(t),this._element=document.createElement("div"),this._element.classList.add(i),this._element.title=e,this._header.on("destroy",(()=>this.destroy())),this._element.addEventListener("click",this._clickEventListener,{passive:!0}),this._element.addEventListener("touchstart",this._touchStartEventListener,{passive:!0}),this._header.controlsContainerElement.appendChild(this._element)}get element(){return this._element}destroy(){var t;this._element.removeEventListener("click",this._clickEventListener),this._element.removeEventListener("touchstart",this._touchStartEventListener),null===(t=this._element.parentNode)||void 0===t||t.removeChild(this._element)}onClick(t){this._pushEvent(t)}onTouchStart(t){this._pushEvent(t)}}class Jt{constructor(t,e,i,n,o){var s;this._layoutManager=t,this._componentItem=e,this._closeEvent=i,this._focusEvent=n,this._dragStartEvent=o,this._isActive=!1,this._tabClickListener=t=>this.onTabClickDown(t),this._tabTouchStartListener=t=>this.onTabTouchStart(t),this._closeClickListener=()=>this.onCloseClick(),this._closeTouchStartListener=()=>this.onCloseTouchStart(),this._dragStartListener=(t,e)=>this.onDragStart(t,e),this._contentItemDestroyListener=()=>this.onContentItemDestroy(),this._tabTitleChangedListener=t=>this.setTitle(t),this._element=document.createElement("div"),this._element.classList.add("lm_tab"),this._titleElement=document.createElement("span"),this._titleElement.classList.add("lm_title"),this._closeElement=document.createElement("div"),this._closeElement.classList.add("lm_close_tab"),this._element.appendChild(this._titleElement),this._element.appendChild(this._closeElement),e.isClosable?this._closeElement.style.display="":this._closeElement.style.display="none",this.setTitle(e.title),this._componentItem.on("titleChanged",this._tabTitleChangedListener);(null!==(s=e.reorderEnabled)&&void 0!==s?s:this._layoutManager.layoutConfig.settings.reorderEnabled)&&this.enableReorder(),this._element.addEventListener("click",this._tabClickListener,{passive:!0}),this._element.addEventListener("touchstart",this._tabTouchStartListener,{passive:!0}),this._componentItem.isClosable?(this._closeElement.addEventListener("click",this._closeClickListener,{passive:!0}),this._closeElement.addEventListener("touchstart",this._closeTouchStartListener,{passive:!0})):(this._closeElement.remove(),this._closeElement=void 0),this._componentItem.setTab(this),this._layoutManager.emit("tabCreated",this)}get isActive(){return this._isActive}get componentItem(){return this._componentItem}get contentItem(){return this._componentItem}get element(){return this._element}get titleElement(){return this._titleElement}get closeElement(){return this._closeElement}get reorderEnabled(){return void 0!==this._dragListener}set reorderEnabled(t){t!==this.reorderEnabled&&(t?this.enableReorder():this.disableReorder())}setTitle(t){this._titleElement.innerText=t,this._element.title=t}setActive(t){t!==this._isActive&&(this._isActive=t,t?this._element.classList.add("lm_active"):this._element.classList.remove("lm_active"))}destroy(){var t,e;this._closeEvent=void 0,this._focusEvent=void 0,this._dragStartEvent=void 0,this._element.removeEventListener("click",this._tabClickListener),this._element.removeEventListener("touchstart",this._tabTouchStartListener),null===(t=this._closeElement)||void 0===t||t.removeEventListener("click",this._closeClickListener),null===(e=this._closeElement)||void 0===e||e.removeEventListener("touchstart",this._closeTouchStartListener),this._componentItem.off("titleChanged",this._tabTitleChangedListener),this.reorderEnabled&&this.disableReorder(),this._element.remove()}setBlurred(){this._element.classList.remove("lm_focused"),this._titleElement.classList.remove("lm_focused")}setFocused(){this._element.classList.add("lm_focused"),this._titleElement.classList.add("lm_focused")}onDragStart(t,e){if(void 0===this._dragListener)throw new J("TODSDLU10093");if(void 0===this._dragStartEvent)throw new J("TODS23309");this._dragStartEvent(t,e,this._dragListener,this.componentItem)}onContentItemDestroy(){void 0!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=void 0)}onTabClickDown(t){const e=t.target;e!==this._element&&e!==this._titleElement||(0===t.button?this.notifyFocus():1===t.button&&this._componentItem.isClosable&&this.notifyClose())}onTabTouchStart(t){t.target===this._element&&this.notifyFocus()}onCloseClick(){this.notifyClose()}onCloseTouchStart(){this.notifyClose()}notifyClose(){if(void 0===this._closeEvent)throw new J("TNC15007");this._closeEvent(this._componentItem)}notifyFocus(){if(void 0===this._focusEvent)throw new J("TNA15007");this._focusEvent(this._componentItem)}enableReorder(){this._dragListener=new Zt(this._element,[this._titleElement]),this._dragListener.on("dragStart",this._dragStartListener),this._componentItem.on("destroy",this._contentItemDestroyListener)}disableReorder(){if(void 0===this._dragListener)throw new J("TDR87745");this._componentItem.off("destroy",this._contentItemDestroyListener),this._dragListener.off("dragStart",this._dragStartListener),this._dragListener=void 0}}class Qt{constructor(t,e,i,n,o){this._layoutManager=t,this._componentRemoveEvent=e,this._componentFocusEvent=i,this._componentDragStartEvent=n,this._dropdownActiveChangedEvent=o,this._tabs=[],this._lastVisibleTabIndex=-1,this._dropdownActive=!1,this._element=document.createElement("section"),this._element.classList.add("lm_tabs"),this._dropdownElement=document.createElement("section"),this._dropdownElement.classList.add("lm_tabdropdown_list"),this._dropdownElement.style.display="none"}get tabs(){return this._tabs}get tabCount(){return this._tabs.length}get lastVisibleTabIndex(){return this._lastVisibleTabIndex}get element(){return this._element}get dropdownElement(){return this._dropdownElement}get dropdownActive(){return this._dropdownActive}destroy(){for(let t=0;tthis.handleTabCloseEvent(t)),(t=>this.handleTabFocusEvent(t)),((t,e,i,n)=>this.handleTabDragStartEvent(t,e,i,n)));void 0===e&&(e=this._tabs.length),this._tabs.splice(e,0,i),ethis._lastVisibleTabIndex){const t=this._tabs[e];for(let t=e;t>0;t--)this._tabs[t]=this._tabs[t-1];this._tabs[0]=t}}updateTabSizes(t,e){let i=!1;this.tryUpdateTabSizes(i,t,e)||(i=!0,this.tryUpdateTabSizes(i,t,e)),i!==this._dropdownActive&&(this._dropdownActive=i,this._dropdownActiveChangedEvent())}tryUpdateTabSizes(t,e,i){if(this._tabs.length>0){if(void 0===i)throw new Error("non-empty tabs must have active component item");let n=0,o=!1;const s=this._layoutManager.layoutConfig.settings.tabOverlapAllowance,r=this._tabs.indexOf(i.tab),a=this._tabs[r];this._lastVisibleTabIndex=-1;for(let i=0;ie){if(o)i===r&&(l.style.zIndex="auto",l.style.marginLeft="",l.parentElement!==this._element&&this._element.appendChild(l));else{let t;if(t=r>0&&r<=i?(d-e)/(i-1):(d-e)/i,tthis.onClick(t),this._touchStartListener=t=>this.onTouchStart(t),this._rowColumnClosable=!0,this._closeButton=null,this._popoutButton=null,this._tabsContainer=new Qt(this._layoutManager,(t=>this.handleTabInitiatedComponentRemoveEvent(t)),(t=>this.handleTabInitiatedComponentFocusEvent(t)),((t,e,i,n)=>this.handleTabInitiatedDragStartEvent(t,e,i,n)),(()=>this.processTabDropdownActiveChanged())),this._show=i.show,this._popoutEnabled=i.popoutEnabled,this._popoutLabel=i.popoutLabel,this._maximiseEnabled=i.maximiseEnabled,this._maximiseLabel=i.maximiseLabel,this._minimiseEnabled=i.minimiseEnabled,this._minimiseLabel=i.minimiseLabel,this._closeEnabled=i.closeEnabled,this._closeLabel=i.closeLabel,this._tabDropdownEnabled=i.tabDropdownEnabled,this._tabDropdownLabel=i.tabDropdownLabel,this.setSide(i.side),this._canRemoveComponent=this._configClosable,this._element=document.createElement("section"),this._element.classList.add("lm_header"),this._controlsContainerElement=document.createElement("section"),this._controlsContainerElement.classList.add("lm_controls"),this._element.appendChild(this._tabsContainer.element),this._element.appendChild(this._controlsContainerElement),this._element.appendChild(this._tabsContainer.dropdownElement),this._element.addEventListener("click",this._clickListener,{passive:!0}),this._element.addEventListener("touchstart",this._touchStartListener,{passive:!0}),this._documentMouseUpListener=()=>this._tabsContainer.hideAdditionalTabsDropdown(),globalThis.document.addEventListener("mouseup",this._documentMouseUpListener,{passive:!0}),this._tabControlOffset=this._layoutManager.layoutConfig.settings.tabControlOffset,this._tabDropdownEnabled&&(this._tabDropdownButton=new Kt(this,this._tabDropdownLabel,"lm_tabdropdown",(()=>this._tabsContainer.showAdditionalTabsDropdown()))),this._popoutEnabled&&(this._popoutButton=new Kt(this,this._popoutLabel,"lm_popout",(()=>this.handleButtonPopoutEvent()))),this._maximiseEnabled&&(this._maximiseButton=new Kt(this,this._maximiseLabel,"lm_maximise",(t=>this.handleButtonMaximiseToggleEvent(t)))),this._configClosable&&(this._closeButton=new Kt(this,this._closeLabel,"lm_close",(()=>s()))),this.processTabDropdownActiveChanged()}get show(){return this._show}get side(){return this._side}get leftRightSided(){return this._leftRightSided}get layoutManager(){return this._layoutManager}get parent(){return this._parent}get tabs(){return this._tabsContainer.tabs}get lastVisibleTabIndex(){return this._tabsContainer.lastVisibleTabIndex}get element(){return this._element}get tabsContainerElement(){return this._tabsContainer.element}get controlsContainerElement(){return this._controlsContainerElement}destroy(){this.emit("destroy"),this._popoutEvent=void 0,this._maximiseToggleEvent=void 0,this._clickEvent=void 0,this._touchStartEvent=void 0,this._componentRemoveEvent=void 0,this._componentFocusEvent=void 0,this._componentDragStartEvent=void 0,this._tabsContainer.destroy(),globalThis.document.removeEventListener("mouseup",this._documentMouseUpListener),this._element.remove()}createTab(t,e){this._tabsContainer.createTab(t,e)}removeTab(t){this._tabsContainer.removeTab(t)}processActiveComponentChanged(t){this._tabsContainer.processActiveComponentChanged(t),this.updateTabSizes()}setSide(t){this._side=t,this._leftRightSided=[nt.right,nt.left].includes(this._side)}setRowColumnClosable(t){this._rowColumnClosable=t,this.updateClosability()}updateClosability(){let t;if(this._configClosable)if(this._rowColumnClosable){t=!0;const e=this.tabs.length;for(let i=0;i1}applyFocusedValue(t){t?this._element.classList.add("lm_focused"):this._element.classList.remove("lm_focused")}processMaximised(){if(void 0===this._maximiseButton)throw new J("HPMAX16997");this._maximiseButton.element.setAttribute("title",this._minimiseLabel)}processMinimised(){if(void 0===this._maximiseButton)throw new J("HPMIN16997");this._maximiseButton.element.setAttribute("title",this._maximiseLabel)}updateTabSizes(){if(this._tabsContainer.tabCount>0){const t=this._show?this._layoutManager.layoutConfig.dimensions.headerHeight:0;let e;this._leftRightSided?(this._element.style.height="",this._element.style.width=zt(t)):(this._element.style.width="",this._element.style.height=zt(t)),e=this._leftRightSided?this._element.offsetHeight-this._controlsContainerElement.offsetHeight-this._tabControlOffset:this._element.offsetWidth-this._controlsContainerElement.offsetWidth-this._tabControlOffset,this._tabsContainer.updateTabSizes(e,this._getActiveComponentItemEvent())}}handleTabInitiatedComponentRemoveEvent(t){if(this._canRemoveComponent){if(void 0===this._componentRemoveEvent)throw new J("HHTCE22294");this._componentRemoveEvent(t)}}handleTabInitiatedComponentFocusEvent(t){if(void 0===this._componentFocusEvent)throw new J("HHTAE22294");this._componentFocusEvent(t)}handleTabInitiatedDragStartEvent(t,e,i,n){if(this._canRemoveComponent){if(void 0===this._componentDragStartEvent)throw new J("HHTDSE22294");this._componentDragStartEvent(t,e,i,n)}else i.cancelDrag()}processTabDropdownActiveChanged(){void 0!==this._tabDropdownButton&&Dt(this._tabDropdownButton.element,this._tabsContainer.dropdownActive)}handleButtonPopoutEvent(){if(this._layoutManager.layoutConfig.settings.popoutWholeStack){if(void 0===this._popoutEvent)throw new J("HHBPOE17834");this._popoutEvent()}else{const t=this._getActiveComponentItemEvent();t&&t.popout()}}handleButtonMaximiseToggleEvent(t){if(void 0===this._maximiseToggleEvent)throw new J("HHBMTE16834");this._maximiseToggleEvent()}onClick(t){t.target===this._element&&this.notifyClick(t)}onTouchStart(t){t.target===this._element&&this.notifyTouchStart(t)}notifyClick(t){if(void 0===this._clickEvent)throw new J("HNHC46834");this._clickEvent(t)}notifyTouchStart(t){if(void 0===this._touchStartEvent)throw new J("HNHTS46834");this._touchStartEvent(t)}}class ee extends $t{constructor(t,e,i){var n,o,s,r,a,l,h,d,c,m,u,p,g,f,v,_,y,C,w;super(t,e,i,ee.createElement(document)),this._headerSideChanged=!1,this._resizeListener=()=>this.handleResize(),this._maximisedListener=()=>this.handleMaximised(),this._minimisedListener=()=>this.handleMinimised(),this._headerConfig=e.header;const I=t.layoutConfig.header,b=e.content;let S;if(1!==b.length)S=void 0;else{S=b[0].header}this._initialWantMaximise=e.maximised,this._initialActiveItemIndex=null!==(n=e.activeItemIndex)&&void 0!==n?n:0;const E=null!==(r=null!==(s=null===(o=this._headerConfig)||void 0===o?void 0:o.show)&&void 0!==s?s:null==S?void 0:S.show)&&void 0!==r?r:I.show,x=null!==(h=null!==(l=null===(a=this._headerConfig)||void 0===a?void 0:a.popout)&&void 0!==l?l:null==S?void 0:S.popout)&&void 0!==h?h:I.popout,L=null!==(m=null!==(c=null===(d=this._headerConfig)||void 0===d?void 0:d.maximise)&&void 0!==c?c:null==S?void 0:S.maximise)&&void 0!==m?m:I.maximise,z=null!==(g=null!==(p=null===(u=this._headerConfig)||void 0===u?void 0:u.close)&&void 0!==p?p:null==S?void 0:S.close)&&void 0!==g?g:I.close,M=null!==(_=null!==(v=null===(f=this._headerConfig)||void 0===f?void 0:f.minimise)&&void 0!==v?v:null==S?void 0:S.minimise)&&void 0!==_?_:I.minimise,P=null!==(w=null!==(C=null===(y=this._headerConfig)||void 0===y?void 0:y.tabDropdown)&&void 0!==C?C:null==S?void 0:S.tabDropdown)&&void 0!==w?w:I.tabDropdown;this._maximisedEnabled=!1!==L;const T={show:!1!==E,side:!1===E?nt.top:E,popoutEnabled:!1!==x,popoutLabel:!1===x?"":x,maximiseEnabled:this._maximisedEnabled,maximiseLabel:!1===L?"":L,closeEnabled:!1!==z,closeLabel:!1===z?"":z,minimiseEnabled:!0,minimiseLabel:M,tabDropdownEnabled:!1!==P,tabDropdownLabel:!1===P?"":P};this._header=new te(t,this,T,e.isClosable&&!1!==z,(()=>this.getActiveComponentItem()),(()=>this.remove()),(()=>this.handlePopoutEvent()),(()=>this.toggleMaximise()),(t=>this.handleHeaderClickEvent(t)),(t=>this.handleHeaderTouchStartEvent(t)),(t=>this.handleHeaderComponentRemoveEvent(t)),(t=>this.handleHeaderComponentFocusEvent(t)),((t,e,i,n)=>this.handleHeaderComponentStartDragEvent(t,e,i,n))),this.isStack=!0,this._childElementContainer=document.createElement("section"),this._childElementContainer.classList.add("lm_items"),this.on("resize",this._resizeListener),this._maximisedEnabled&&(this.on("maximised",this._maximisedListener),this.on("minimised",this._minimisedListener)),this.element.appendChild(this._header.element),this.element.appendChild(this._childElementContainer),this.setupHeaderPosition(),this._header.updateClosability()}get childElementContainer(){return this._childElementContainer}get header(){return this._header}get headerShow(){return this._header.show}get headerSide(){return this._header.side}get headerLeftRightSided(){return this._header.leftRightSided}get contentAreaDimensions(){return this._contentAreaDimensions}get initialWantMaximise(){return this._initialWantMaximise}get isMaximised(){return this===this.layoutManager.maximisedStack}get stackParent(){if(!this.parent)throw new Error("Stack should always have a parent");return this.parent}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}init(){if(!0===this.isInitialised)return;this.updateNodeSize();for(let t=0;t0){if(this._initialActiveItemIndex<0||this._initialActiveItemIndex>=e)throw new Error(`ActiveItemIndex out of range: ${this._initialActiveItemIndex} id: ${this.id}`);for(let i=0;ithis.contentItems.length)throw e-=1,new X("SAC99728");if(t instanceof jt)return e=super.addChild(t,e),this._childElementContainer.appendChild(t.element),this._header.createTab(t,e),this.setActiveComponentItem(t,i),this._header.updateTabSizes(),this.updateSize(!1),t.container.setBaseLogicalZIndex(),this._header.updateClosability(),this.emitStateChangedEvent(),e;throw new X("SACC88532")}removeChild(t,e){const i=t,n=this.contentItems.indexOf(i),o=1===this.contentItems.length;if(this._activeComponentItem===i&&(i.focused&&i.blur(),!o)){const t=0===n?1:n-1;this.setActiveComponentItem(this.contentItems[t],!1)}this._header.removeTab(i),super.removeChild(i,e),o||this._header.updateClosability(),this.emitStateChangedEvent()}toggleMaximise(){this.isMaximised?this.minimise():this.maximise()}maximise(){if(!this.isMaximised){this.layoutManager.setMaximisedStack(this);const t=this.contentItems,e=t.length;for(let i=0;i0&&void 0===t)throw new Error("expected non-empty stack to have an active component item");return{type:"stack",content:this.calculateConfigContent(),size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,isClosable:this.isClosable,maximised:this.isMaximised,header:this.createHeaderConfig(),activeItemIndex:t}}onDrop(t,e){if("header"===this._dropSegment){if(this.resetHeaderDropZone(),void 0===this._dropIndex)throw new J("SODDI68990");return void this.addChild(t,this._dropIndex)}if("body"===this._dropSegment)return void this.addChild(t,0,!0);const i="top"===this._dropSegment||"bottom"===this._dropSegment,n="left"===this._dropSegment||"right"===this._dropSegment,o="top"===this._dropSegment||"left"===this._dropSegment,s=i&&this.stackParent.isColumn||n&&this.stackParent.isRow;if(t.isComponent){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createAndInitContentItem(e,this);i.addChild(t),t=i}if(t.type===at.row||t.type===at.column){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}if(s){const e=this.stackParent.contentItems.indexOf(this);this.stackParent.addChild(t,o?e:e+1,!0),this.size*=.5,t.size=this.size,t.sizeUnit=this.sizeUnit,this.stackParent.updateSize(!1)}else{const e=i?at.column:at.row,n=ct.createDefault(e),s=this.layoutManager.createContentItem(n,this);this.stackParent.replaceChild(this,s),s.addChild(t,o?0:void 0,!0),s.addChild(this,o?void 0:0,!0),this.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}highlightDropZone(t,e){for(const i in this._contentAreaDimensions){const n=i,o=this._contentAreaDimensions[n].hoverArea;if(o.x1t&&o.y1e)return void("header"===n?(this._dropSegment="header",this.highlightHeaderDropZone(this._header.leftRightSided?e:t)):(this.resetHeaderDropZone(),this.highlightBodyDropZone(n)))}}getArea(){if("none"===this.element.style.display)return null;const t=super.getElementArea(this._header.element),e=super.getElementArea(this._childElementContainer);if(null===t||null===e)throw new K("SGAHC13086");const i=e.x2-e.x1,n=e.y2-e.y1;return this._contentAreaDimensions={header:{hoverArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2},highlightArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2}}},0===this.contentItems.length?(this._contentAreaDimensions.body={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2}},super.getElementArea(this.element)):(this._contentAreaDimensions.left={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x1+.25*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x1+.5*i,y2:e.y2}},this._contentAreaDimensions.top={hoverArea:{x1:e.x1+.25*i,y1:e.y1,x2:e.x1+.75*i,y2:e.y1+.5*n},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y1+.5*n}},this._contentAreaDimensions.right={hoverArea:{x1:e.x1+.75*i,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1+.5*i,y1:e.y1,x2:e.x2,y2:e.y2}},this._contentAreaDimensions.bottom={hoverArea:{x1:e.x1+.25*i,y1:e.y1+.5*n,x2:e.x1+.75*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1+.5*n,x2:e.x2,y2:e.y2}},super.getElementArea(this.element))}positionHeader(t){this._header.side!==t&&(this._header.setSide(t),this._headerSideChanged=!0,this.setupHeaderPosition())}updateNodeSize(){if("none"!==this.element.style.display){const t=kt(this.element);if(this._header.show){t[this._header.leftRightSided?it.width:it.height]-=this.layoutManager.layoutConfig.dimensions.headerHeight}this._childElementContainer.style.width=zt(t.width),this._childElementContainer.style.height=zt(t.height);for(let e=0;e=o&&t({...t,[e]:i});async function s(t,e){return(await Promise.all(e.map((async([e,i])=>[e,await t(i,e)])))).reduce(o,{})}n.mapEntriesAsync=s,n.mapValuesAsync=async function(t,e){let i;return i=e instanceof Map?[...e.entries()]:Object.entries(e),s(t,i)};var r,a,l,h,d=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldSet||function(t,e,i,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(t,i):o?o.value=i:e.set(t,i),i},c=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldGet||function(t,e,i,n){if("a"===i&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?n:"a"===i?n.call(t):n?n.value:e.get(t)};Object.defineProperty(i,"__esModule",{value:!0});var m=i.DefaultLayoutManager=void 0;const u=n;class p{constructor(t){a.set(this,void 0),l.set(this,new Map),d(this,a,t,"f")}size(){return c(this,l,"f").size}async applyLayoutSnapshot({layouts:t}){if(Object.keys(t).length>1)throw new Error("[LayoutManager] Tried to call applyLayoutSnapshot with more than 1 layout. When implementing multiple layouts via overridden LayoutManager class, you must override and fully implement the applyLayoutSnapshot method without calling super.applyLayoutSnapshot().");const[[e,i]]=Object.entries(t);await p.createLayout(this,{layoutName:e,layout:i})}async showLayout({layoutName:t}){}async getLayoutSnapshot(){return{layouts:await(0,u.mapValuesAsync)((t=>t.getFrameSnapshot()),c(this,l,"f"))}}async removeLayout({layoutName:t}){}getLayoutIdentityForView(t){const e=[...c(this,l,"f").values()].find((e=>e.getCurrentViews().some((e=>e.name===t.name&&e.uuid===t.uuid))));return e?.identity??void 0}isLayoutVisible({layoutName:t}){return c(p,r,"m",h).call(p,this,t).isVisible()}resolveLayoutIdentity(t){if(t&&"layoutName"in t)return t;const e=[...c(this,l,"f").values()];if(1===e.length)return e[0].identity;const i=e.find((t=>t.isVisible()));return i?.identity??void 0}static async resolveLayout(t,e){const i=t.resolveLayoutIdentity(e);if(void 0===i||!("layoutName"in i))throw new Error("[layout-manager] resolveLayout: Could not resolve the layout identity. Make sure you include 'layoutName' in the identity object.");return c(p,r,"m",h).call(p,t,i.layoutName)}static async handleSharedView(t,e,i){await(0,u.mapValuesAsync)((async t=>{if(t.identity.layoutName!==e.layoutName){const e=t.getCurrentViews().find((t=>t.name===i.name));e&&await t.onViewDetached({viewIdentity:e,target:null}).catch(console.error)}}),c(t,l,"f"))}static async handleLastViewRemoved(t,e){await t.removeLayout(e),await c(t,a,"f").handleLastViewRemoved(t)}static async destroyLayout(t,{layoutName:e}){await c(p,r,"m",h).call(p,t,e).destroy(),c(t,l,"f").delete(e)}static async createLayout(t,e){const{layoutName:i}=e;if(c(t,l,"f").has(i))throw new Error(`Layout name ${i} already exists`);await c(t,a,"f").createLayout(e,t)}static registerLayout(t,e,i){c(t,l,"f").set(e,i)}static getAllLayouts(t){return[...c(t,l,"f").values()]}static setInitialSnapshot(t,e){c(t,a,"f").setInitialSnapshot(e)}static createClosedConstructor(...t){return class extends p{constructor(){super(...t)}}}}m=i.DefaultLayoutManager=p,r=p,a=new WeakMap,l=new WeakMap,h=function(t,e){const i=c(t,l,"f").get(e);if(!i)throw new Error(`[layout-manager] getLayoutByName: Could not locate layout with name '${e}'`);return i};var g={},f={},v={};Object.defineProperty(v,"__esModule",{value:!0}),v.ReversibleMap=void 0;v.ReversibleMap=class{constructor(){this.valueToKey=new Map,this.keyToValue=new Map,this.setUnique=(t,e)=>{if(this.hasKey(t)||this.hasValue(e))throw new Error("Key or value already in the map.");this.keyToValue.set(t,e),this.valueToKey.set(e,t)},this.getKey=t=>{const e=this.valueToKey.get(t);if(!e)throw new Error("Value not found in the map.");return e},this.deleteKey=t=>{const e=this.getValue(t);return this.keyToValue.delete(t),this.valueToKey.delete(e),e},this.deleteValue=t=>{const e=this.getKey(t);return this.keyToValue.delete(e),this.valueToKey.delete(t),e},this.hasKey=t=>this.keyToValue.has(t),this.hasValue=t=>this.valueToKey.has(t)}getValue(t){const e=this.keyToValue.get(t);if(!e)throw new Error("Key not found in the map.");return e}},Object.defineProperty(f,"__esModule",{value:!0});var _=f.LayoutContentCache=void 0;const y=t.lazy,C=v;class w{constructor(){this.contentItemCache=new C.ReversibleMap,this.contentItemCacheId=0,this.createCacheKey=()=>{const t=`entity-${this.contentItemCacheId.toString()}`;return this.contentItemCacheId+=1,t},this.hasKey=t=>this.contentItemCache.hasKey(t),this.getItemOrUndefined=t=>{try{return this.getContentItemOrThrow(t)}catch(t){return}},this.getContentItemOrThrow=(t,e)=>{if(!this.contentItemCache.hasKey(t))throw new Error("Layout component has been destroyed or detached from the current layout.");const i=this.contentItemCache.getValue(t);if(e&&!e.includes(i.type))throw new Error(`Layout item is not the expected type. Expected ${e.join(", ")}, got ${i.type}.`);return i},this.getOrCreateEntityId=t=>{if(this.contentItemCache.hasValue(t))return this.contentItemCache.getKey(t);t.onDestroyed((()=>{this.contentItemCache.deleteValue(t)}));const e=this.createCacheKey();return this.contentItemCache.setUnique(e,t),e}}static getSingleInstance(){return w.singleton.getValue()}}_=f.LayoutContentCache=w,w.singleton=new y.Lazy((()=>new w));var I={},b={};!function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.getAdjacentStacks=t.doShareEdge=t.getAdjacentItem=void 0;t.getAdjacentItem=(e,i)=>{const{parent:n}=e;if(e.isRoot()||!n)return;const o=["top","bottom"].includes(i)?"column":"row",s=["top","left"].includes(i)?-1:1;if(n.type===o){const t=n.contentItems.indexOf(e)+s;if(t>=0&&t{const n=t.getBounds(),o=e.getBounds();if(!n||!o)return!1;if(["top","bottom"].includes(i)){return!(n.righto.right)}return!(n.bottomo.bottom)};t.getAdjacentStacks=(e,i)=>{const n=["top","bottom"].includes(i)?"row":"column",o=s=>"stack"===s.type?(0,t.doShareEdge)(e,s,i)?[s]:[]:"root"===s.type||"ground"===s.type?[]:s.type===n?s.contentItems.map((t=>o(t))).flat():s.type!==n?["top","right"].includes(i)?o(s.contentItems[s.contentItems.length-1]):o(s.contentItems[0]):[],s=(0,t.getAdjacentItem)(e,i);return s?o(s):[]}}(b);var S=t.commonjsGlobal&&t.commonjsGlobal.__decorate||function(t,e,i,n){var o,s=arguments.length,r=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(s<3?o(r):s>3?o(e,i,r):o(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};Object.defineProperty(I,"__esModule",{value:!0}),I.LayoutEntitiesController=void 0;const E=t.decorators,x=b,L=i;class z{constructor(t,e,i){this.wire=t,this.layoutManager=e,this.layoutContentCache=i,this.analytics=t=>{this.wire.sendAction(`layout-controller-${t}`).catch((()=>{}))},this.getLayoutIdentityForViewOrThrow=async t=>{const e=this.layoutManager.getLayoutIdentityForView(t);if(!e)throw new Error(`View identity ${t.name} is not attached to any layouts.`);return e},this.getRoot=async t=>{this.analytics("get-root");const e=(await this.getLayout(t)).getRoot();return{type:e.type,entityId:this.layoutContentCache.getOrCreateEntityId(e)}},this.getStackByView=async t=>{this.analytics("get-stack-by-view");const e=await this.getLayoutIdentityForViewOrThrow(t),i=(await this.getLayout(e)).getStackByView(t);if("stack"===i?.type)return{entityId:this.layoutContentCache.getOrCreateEntityId(i),type:"stack"}},this.getStackViews=t=>{this.analytics("get-stack-views");return this.layoutContentCache.getContentItemOrThrow(t,["stack"]).contentItems.map((t=>({name:t.viewName,uuid:this.wire.me.uuid})))},this.isRoot=t=>{this.analytics("is-root");return this.layoutContentCache.getContentItemOrThrow(t).isRoot()},this.exists=t=>(this.analytics("exists"),this.layoutContentCache.hasKey(t)),this.addViewToStack=async(t,e,{index:i}={index:0})=>{this.analytics("add-view-to-stack");const n=this.layoutContentCache.getContentItemOrThrow(t);if(i&&i>n.contentItems.length+1)throw new Error(`Index '${i}' out of range, please exclude the index or specify a number between 0 and ${n.contentItems.length}`);const o={id:t,index:i},{identity:s}=await n.layout.platformCreateView(e,{location:o});return s},this.findViewInStack=(t,e)=>t.contentItems.find((t=>t.viewName===e.name)),this.removeViewFromStack=async(t,e)=>{this.analytics("remove-view-from-stack");const i=this.layoutContentCache.getContentItemOrThrow(t,["stack"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to remove a view ('${e.name}') which does not belong to the stack.`);await n.layout.platformCloseView(e)},this.createAdjacentStack=async(t,e,{position:i="right"}={})=>{if(this.analytics("create-adjacent-stack"),!Array.isArray(e)||0===e.length)throw new Error('The parameter "views" must be an array with at least 1 element.');if(!["top","bottom","left","right"].includes(i))throw new Error(`Invalid position '${i}' specified.`);const n=this.layoutContentCache.getContentItemOrThrow(t).createAdjacentStack({position:i}),o=this.layoutContentCache.getOrCreateEntityId(n);return await Promise.all(e.reverse().map((t=>this.addViewToStack(o,t)))),o},this.getAdjacentStacks=async({targetId:t,edge:e})=>{this.analytics("get-adjacent-stacks");const i=this.layoutContentCache.getContentItemOrThrow(t);return(0,x.getAdjacentStacks)(i,e).map((t=>({entityId:this.layoutContentCache.getOrCreateEntityId(t)})))},this.setStackActiveView=async(t,e)=>{this.analytics("set-stack-active-view");const i=this.layoutContentCache.getContentItemOrThrow(t,["stack"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to set a view ('${e.name}') as active when it does not belong to the stack.`);i.setActiveContentItem(n,!0)}}async getLayout(t){const e=await L.DefaultLayoutManager.resolveLayout(this.layoutManager,t);if(!e)throw new Error(`Could not resolve target layout identity ${JSON.stringify(t)}`);return e}getContent(t){this.analytics("get-content");return this.layoutContentCache.getContentItemOrThrow(t,["column","row"]).contentItems.map((t=>({type:t.type,entityId:this.layoutContentCache.getOrCreateEntityId(t)})))}getParent(t){this.analytics("get-parent");const e=this.layoutContentCache.getContentItemOrThrow(t);if(!e.isRoot())return e.parent?.contentItems.includes(e)?{type:e.parent.type,entityId:this.layoutContentCache.getOrCreateEntityId(e.parent)}:void 0}}S([(0,E.expose)()],z.prototype,"getLayoutIdentityForViewOrThrow",void 0),S([(0,E.expose)()],z.prototype,"getRoot",void 0),S([(0,E.expose)()],z.prototype,"getStackByView",void 0),S([(0,E.expose)()],z.prototype,"getStackViews",void 0),S([(0,E.expose)()],z.prototype,"getContent",null),S([(0,E.expose)()],z.prototype,"getParent",null),S([(0,E.expose)()],z.prototype,"isRoot",void 0),S([(0,E.expose)()],z.prototype,"exists",void 0),S([(0,E.expose)()],z.prototype,"addViewToStack",void 0),S([(0,E.expose)()],z.prototype,"removeViewFromStack",void 0),S([(0,E.expose)()],z.prototype,"createAdjacentStack",void 0),S([(0,E.expose)()],z.prototype,"getAdjacentStacks",void 0),S([(0,E.expose)()],z.prototype,"setStackActiveView",void 0),I.LayoutEntitiesController=z,Object.defineProperty(g,"__esModule",{value:!0});var M=g.initLayoutEndpoints=void 0;const P=t.apiExposer,T=t.layout_constants,A=f,k=I,D=i;M=g.initLayoutEndpoints=async function(t,e){const i=t.getFin(),n=await i.Platform.getCurrentSync().getClient(),o=new P.ChannelsExposer(n);await new P.ApiExposer(o).exposeInstance(new k.LayoutEntitiesController(t,e,A.LayoutContentCache.getSingleInstance()),{id:T.LAYOUT_CONTROLLER_ID}),await async function(t,e){const i=t=>async i=>{const n=await D.DefaultLayoutManager.resolveLayout(e,i.target);if(!n)throw new Error(`Could not resolve the layout target from payload ${JSON.stringify(i)}`);return t(n,i)},n=(e,n)=>{t.register(e,i(n))},o=(t,e)=>{n(t,e)};n("replace-view",((t,e)=>t.replaceView(e))),n("replace-layout",((t,{layout:e})=>t.replaceLayout(e))),n("add-view",((t,e)=>t.insertView(e))),o("layout-add-view",((t,{viewOptions:e,location:i,targetView:n})=>t.platformCreateView(e,{location:i,targetView:n}))),n("close-view",((t,e)=>t.cleanupView(e.viewIdentity))),o("layout-close-view",((t,e)=>t.platformCloseView(e.viewIdentity))),n("apply-preset-layout",((t,e)=>t.applyPreset(e))),n("get-layout-views",(t=>t.getCurrentViews())),n("get-frame-snapshot",(t=>t.getFrameSnapshot())),n("is-visible",(t=>t.isVisible())),n("destroy",(t=>t.destroy())),t.register("get-layout-snapshot",(()=>e.getLayoutSnapshot()))}(n,e)};var R={};Object.defineProperty(R,"__esModule",{value:!0});var U=R.BaseLayout=void 0;U=R.BaseLayout=class{};var O={};Object.defineProperty(O,"__esModule",{value:!0});var V=O.DOMEmitter=void 0;V=O.DOMEmitter=class{constructor(t){this.container=t}dispatchLocalEvent(t,e){const i={...e,type:t,tabSelector:`tab-${e.name}`,containerSelector:`container-${e.name}`,topic:"openfin-DOM-event"};this.container.dispatchEvent(new CustomEvent(t,{detail:i}))}};var B={};Object.defineProperty(B,"__esModule",{value:!0});var H=B.mapLayoutContentItemsImmutableSync=B.mapLayoutContentItemsImmutable=W=B.isVisible=void 0;var W=B.isVisible=t=>(0!==t.offsetWidth||0!==t.offsetHeight)&&"hidden"!==window.getComputedStyle(t).visibility&&t.offsetTop>=0&&t.offsetLeft>=0&&t.offsetTop<=window.innerHeight&&t.offsetLeft<=window.innerWidth;const F=t=>"type"in t&&"component"===t.type;B.mapLayoutContentItemsImmutable=async function t(e,i){return F(i)?e(i):{...i,content:await Promise.all(i.content?.map((i=>t(e,i))))}},H=B.mapLayoutContentItemsImmutableSync=function t(e,i){return F(i)?e(i):{...i,content:i.content?.map((i=>t(e,i)))}};class N extends Error{constructor(t,e){super(e),this.type=t}}class G extends N{constructor(t,e){super("Configuration",t),this.node=e}}class j extends N{constructor(t){super("PopoutBlocked",t)}}class $ extends N{constructor(t){super("API",t)}}class Z extends N{constructor(t){super("Bind",t)}}class q extends Error{constructor(t,e,i){super(`${t}: ${e}${void 0===i?"":": "+i}`)}}class X extends q{constructor(t,e){super("Assert",t,e)}}class Y extends q{constructor(t,e,i){super("UnreachableCase",t,`${e}${void 0===i?"":": "+i}`)}}class K extends q{constructor(t,e){super("UnexpectedNull",t,e)}}class J extends q{constructor(t,e){super("UnexpectedUndefined",t,e)}}var Q;!function(t){let e=!1;const i={PopoutCannotBeCreatedWithGroundItemConfig:{id:0,default:"Popout cannot be created with ground ItemConfig"},PleaseRegisterAConstructorFunction:{id:1,default:"Please register a constructor function"},ComponentTypeNotRegisteredAndBindComponentEventHandlerNotAssigned:{id:2,default:"Component type not registered and BindComponentEvent handler not assigned"},ComponentIsAlreadyRegistered:{id:3,default:"Component is already registered"},ComponentIsNotVirtuable:{id:4,default:"Component is not virtuable. Requires rootHtmlElement field/getter"},VirtualComponentDoesNotHaveRootHtmlElement:{id:5,default:'Virtual component does not have getter "rootHtmlElement"'},ItemConfigIsNotTypeComponent:{id:6,default:"ItemConfig is not of type component"},InvalidNumberPartInSizeString:{id:7,default:"Invalid number part in size string"},UnknownUnitInSizeString:{id:8,default:"Unknown unit in size string"},UnsupportedUnitInSizeString:{id:9,default:"Unsupported unit in size string"}};t.idCount=Object.keys(i).length;const n=Object.values(i);t.checkInitialise=function(){if(!e)for(let e=0;e="0"&&t<="9"}function Tt(t,e){const i=zt(e);t.style.width=i}function At(t,e){const i=zt(e);t.style.height=i}function kt(t){return{width:t.offsetWidth,height:t.offsetHeight}}function Dt(t,e){t.style.display=e?"":"none"}function Rt(t,e){if(void 0!==e)for(const i in e)if(e.hasOwnProperty(i)){const n=e[i],o=t[i];t[i]=Ut(o,n)}return t}function Ut(t,e){if("object"!=typeof e)return e;if(Array.isArray(e)){const t=e.length,i=new Array(t);for(let n=0;n36)throw new Error("Too many keys in config minifier map")},t.translateObject=n}(dt||(dt={})),function(t){t.defaults={type:at.ground,content:[],size:1,sizeUnit:ht.Fractional,minSize:void 0,minSizeUnit:ht.Pixel,id:"",isClosable:!0},t.createCopy=function(t,e){switch(t.type){case at.ground:case at.row:case at.column:return gt.createCopy(t,e);case at.stack:return ut.createCopy(t,e);case at.component:return pt.createCopy(t);default:throw new Y("CICC91354",t.type,"Invalid Config Item type specified")}},t.createDefault=function(t){switch(t){case at.ground:throw new X("CICCDR91562");case at.row:case at.column:return gt.createDefault(t);case at.stack:return ut.createDefault();case at.component:return pt.createDefault();default:throw new Y("CICCDD91563",t,"Invalid Config Item type specified")}},t.isComponentItem=function(t){return t.type===at.component},t.isStackItem=function(t){return t.type===at.stack},t.isGroundItem=function(t){return t.type===at.ground}}(ct||(ct={})),function(t){t.defaultMaximised=!1,function(t){t.createCopy=function(t,e){return void 0===t?void 0:{show:null!=e?e:t.show,popout:t.popout,close:t.close,maximise:t.maximise,minimise:t.minimise,tabDropdown:t.tabDropdown}}}(t.Header||(t.Header={}))}(mt||(mt={})),function(t){function e(t){const e=t.length,i=new Array(e);for(let n=0;n"__glMaximised"===t));t>0&&(o=!0,n=n.splice(t,1)),e=n.length>0?n[0]:ct.defaults.id}else e=n;return i=void 0!==t.maximised?t.maximised:o,{id:e,maximised:i}}}(wt||(wt={})),function(t){function e(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0;return{resolved:!0,root:Et.resolve(i),openPopouts:t.resolveOpenPopouts(e.openPopouts),dimensions:t.Dimensions.resolve(e.dimensions),settings:t.Settings.resolve(e.settings),header:t.Header.resolve(e.header,e.settings,e.labels)}}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:Lt.fromResolvedArray(e.openPopouts),settings:_t.Settings.createCopy(e.settings),dimensions:t.Dimensions.fromResolved(e.dimensions),header:_t.Header.createCopy(e.header)}},t.isResolved=function(t){const e=t;return void 0!==e.resolved&&!0===e.resolved},t.resolveOpenPopouts=function(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0,{root:Et.resolve(o),openPopouts:xt.resolveOpenPopouts(e.openPopouts),dimensions:xt.Dimensions.resolve(e.dimensions),settings:xt.Settings.resolve(e.settings),header:xt.Header.resolve(e.header,e.settings,e.labels),parentId:null!==(i=e.parentId)&&void 0!==i?i:null,indexInParent:null!==(n=e.indexInParent)&&void 0!==n?n:null,window:t.Window.resolve(e.window,e.dimensions),resolved:!0}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:i(e.openPopouts),dimensions:xt.Dimensions.fromResolved(e.dimensions),settings:_t.Settings.createCopy(e.settings),header:_t.Header.createCopy(e.header),parentId:e.parentId,indexInParent:e.indexInParent,window:t.Window.fromResolved(e.window)}},t.fromResolvedArray=i}(Lt||(Lt={}));class Wt{constructor(){this._allEventSubscriptions=[],this._subscriptionsMap=new Map,this.unbind=this.removeEventListener,this.trigger=this.emit}tryBubbleEvent(t,e){}emit(t,...e){let i=this._subscriptionsMap.get(t);if(void 0!==i){i=i.slice();for(let t=0;t0){const n=e.slice();n.unshift(t);const o=this._allEventSubscriptions.slice();for(let t=0;t0?n.contentItems[0]:n,e=0);const o=this._layoutManager.createAndInitContentItem(i,t);t.addChild(o,e),this._layoutManager.layoutConfig.settings.popInOnClose?this._onClose():this.close()}createWindow(){const t=this.createUrl(),e=Math.floor(1e6*Math.random()).toString(36),i=this.serializeWindowFeatures({width:this._initialWindowSize.width,height:this._initialWindowSize.height,innerWidth:this._initialWindowSize.width,innerHeight:this._initialWindowSize.height,menubar:"no",toolbar:"no",location:"no",personalbar:"no",resizable:"yes",scrollbars:"no",status:"no"});if(this._popoutWindow=globalThis.open(t,e,i),this._popoutWindow)this._popoutWindow.addEventListener("load",(()=>this.positionWindow()),{passive:!0}),this._popoutWindow.addEventListener("beforeunload",(()=>{this._layoutManager.layoutConfig.settings.popInOnClose?this.popIn():this._onClose()}),{passive:!0}),this._checkReadyInterval=setInterval((()=>this.checkReady()),10);else if(!0===this._layoutManager.layoutConfig.settings.blockedPopoutsThrowError){throw new j("Popout blocked")}}checkReady(){if(null===this._popoutWindow)throw new K("BPCR01844");this._popoutWindow.__glInstance&&this._popoutWindow.__glInstance.isInitialised&&(this.onInitialised(),void 0!==this._checkReadyInterval&&(clearInterval(this._checkReadyInterval),this._checkReadyInterval=void 0))}serializeWindowFeatures(t){const e=[];for(const i in t)e.push(i+"="+t[i].toString());return e.join(",")}createUrl(){const t="gl-window-config-"+Ot(),e=_t.minifyConfig(this._config);try{localStorage.setItem(t,JSON.stringify(e))}catch(t){throw new Error("Error while writing to localStorage "+function(t){return t instanceof Error?t.message:"string"==typeof t?t:"Unknown Error"}(t))}const i=new URL(location.href);return i.searchParams.set("gl-window",t),i.toString()}positionWindow(){if(null===this._popoutWindow)throw new Error("BrowserPopout.positionWindow: null popoutWindow");this._popoutWindow.moveTo(this._initialWindowSize.left,this._initialWindowSize.top),this._popoutWindow.focus()}onInitialised(){this._isInitialised=!0,this.getGlInstance().on("popIn",(()=>this.popIn())),this.emit("initialised")}_onClose(){setTimeout((()=>this.emit("closed")),50)}}class Gt extends Wt{constructor(t,e,i,n){super(),this.layoutManager=t,this._parent=i,this._element=n,this._popInParentIds=[],this._type=e.type,this._id=e.id,this._isInitialised=!1,this.isGround=!1,this.isRow=!1,this.isColumn=!1,this.isStack=!1,this.isComponent=!1,this.size=e.size,this.sizeUnit=e.sizeUnit,this.minSize=e.minSize,this.minSizeUnit=e.minSizeUnit,this._isClosable=e.isClosable,this._pendingEventPropagations={},this._throttledEvents=["stateChanged"],this._contentItems=this.createContentItems(e.content)}get type(){return this._type}get id(){return this._id}set id(t){this._id=t}get popInParentIds(){return this._popInParentIds}get parent(){return this._parent}get contentItems(){return this._contentItems}get isClosable(){return this._isClosable}get element(){return this._element}get isInitialised(){return this._isInitialised}static isStack(t){return t.isStack}static isComponentItem(t){return t.isComponent}static isComponentParentableItem(t){return t.isStack||t.isGround}removeChild(t,e=!1){const i=this._contentItems.indexOf(t);if(-1===i)throw new Error("Can't remove child item. Unknown content item");if(e||this._contentItems[i].destroy(),this._contentItems.splice(i,1),this._contentItems.length>0)this.updateSize(!1);else if(!this.isGround&&!0===this._isClosable){if(null===this._parent)throw new K("CIUC00874");this._parent.removeChild(this)}}addChild(t,e,i){return null!=e||(e=this._contentItems.length),this._contentItems.splice(e,0,t),t.setParent(this),!0===this._isInitialised&&!1===t._isInitialised&&t.init(),e}replaceChild(t,e,i=!1){const n=this._contentItems.indexOf(t),o=t._element.parentNode;if(-1===n)throw new X("CIRCI23232","Can't replace child. oldChild is not child of this");if(null===o)throw new K("CIRCP23232");if(o.replaceChild(e._element,t._element),!0===i&&(t._parent=null,t.destroy()),this._contentItems[n]=e,e.setParent(this),e.size=t.size,e.sizeUnit=t.sizeUnit,e.minSize=t.minSize,e.minSizeUnit=t.minSizeUnit,null===e._parent)throw new K("CIRCNC45699");!0===e._parent._isInitialised&&!1===e._isInitialised&&e.init(),this.updateSize(!1)}remove(){if(null===this._parent)throw new K("CIR11110");this._parent.removeChild(this)}popout(){const t=Ot(),e=this.layoutManager.createPopoutFromContentItem(this,void 0,t,void 0);return this.emitBaseBubblingEvent("stateChanged"),e}calculateConfigContent(){const t=this._contentItems,e=t.length,i=new Array(e);for(let n=0;nthis.propagateEventToLayoutManager(t,e))))}propagateEventToLayoutManager(t,e){this._pendingEventPropagations[t]=!1,this.layoutManager.emitUnknown(t,e)}}class jt extends Gt{constructor(t,e,i){super(t,e,i,document.createElement("div")),this._parentItem=i,this._focused=!1,this.isComponent=!0,this._reorderEnabled=e.reorderEnabled,this.applyUpdatableConfig(e),this._initialWantMaximise=e.maximised;const n=document.createElement("div");n.classList.add("lm_content"),this.element.appendChild(n),this._container=new Ft(e,this,t,n,(t=>this.handleUpdateItemConfigEvent(t)),(()=>this.show()),(()=>this.hide()),(t=>this.focus(t)),(t=>this.blur(t)))}get componentName(){return this._container.componentType}get componentType(){return this._container.componentType}get reorderEnabled(){return this._reorderEnabled}get initialWantMaximise(){return this._initialWantMaximise}get component(){return this._container.component}get container(){return this._container}get parentItem(){return this._parentItem}get headerConfig(){return this._headerConfig}get title(){return this._title}get tab(){return this._tab}get focused(){return this._focused}destroy(){this._container.destroy(),super.destroy()}applyUpdatableConfig(t){this.setTitle(t.title),this._headerConfig=t.header}toConfig(){const t=this._container.stateRequestEvent,e=void 0===t?this._container.state:t();return{type:at.component,content:[],size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,maximised:!1,isClosable:this.isClosable,reorderEnabled:this._reorderEnabled,title:this._title,header:mt.Header.createCopy(this._headerConfig),componentType:pt.copyComponentType(this.componentType),componentState:e}}close(){if(null===this.parent)throw new K("CIC68883");this.parent.removeChild(this,!1)}enterDragMode(t,e){Tt(this.element,t),At(this.element,e),this._container.enterDragMode(t,e)}exitDragMode(){this._container.exitDragMode()}enterStackMaximised(){this._container.enterStackMaximised()}exitStackMaximised(){this._container.exitStackMaximised()}drag(){this._container.drag()}updateSize(t){this.updateNodeSize(t)}init(){this.updateNodeSize(!1),super.init(),this._container.emit("open"),this.initContentItems()}setTitle(t){this._title=t,this.emit("titleChanged",t),this.emit("stateChanged")}setTab(t){this._tab=t,this.emit("tab",t),this._container.setTab(t)}hide(){super.hide(),this._container.setVisibility(!1)}show(){super.show(),this._container.setVisibility(!0)}focus(t=!1){this.parentItem.setActiveComponentItem(this,!0,t)}setFocused(t){this._focused=!0,this.tab.setFocused(),t||this.emitBaseBubblingEvent("focus")}blur(t=!1){this._focused&&this.layoutManager.setFocusedComponentItem(void 0,t)}setBlurred(t){this._focused=!1,this.tab.setBlurred(),t||this.emitBaseBubblingEvent("blur")}setParent(t){this._parentItem=t,super.setParent(t)}handleUpdateItemConfigEvent(t){this.applyUpdatableConfig(t)}updateNodeSize(t){if("none"!==this.element.style.display){const{width:e,height:i}=kt(this.element);this._container.setSizeToNodeSize(e,i,t)}}}class $t extends Gt{constructor(){super(...arguments),this._focused=!1}get focused(){return this._focused}setFocusedValue(t){this._focused=t}}class Zt extends Wt{constructor(t,e){super(),this._eElement=t,this._pointerTracking=!1,this._pointerDownEventListener=t=>this.onPointerDown(t),this._pointerMoveEventListener=t=>this.onPointerMove(t),this._pointerUpEventListener=t=>this.onPointerUp(t),this._timeout=void 0,this._allowableTargets=[t,...e],this._oDocument=document,this._eBody=document.body,this._nDelay=1800,this._nDistance=10,this._nX=0,this._nY=0,this._nOriginalX=0,this._nOriginalY=0,this._dragging=!1,this._eElement.addEventListener("pointerdown",this._pointerDownEventListener,{passive:!0})}destroy(){this.checkRemovePointerTrackingEventListeners(),this._eElement.removeEventListener("pointerdown",this._pointerDownEventListener)}cancelDrag(){this.processDragStop(void 0)}onPointerDown(t){if(this._allowableTargets.includes(t.target)&&t.isPrimary){const e=this.getPointerCoordinates(t);this.processPointerDown(e)}}processPointerDown(t){this._nOriginalX=t.x,this._nOriginalY=t.y,this._oDocument.addEventListener("pointermove",this._pointerMoveEventListener),this._oDocument.addEventListener("pointerup",this._pointerUpEventListener,{passive:!0}),this._pointerTracking=!0,this._timeout=setTimeout((()=>{try{this.startDrag()}catch(t){throw console.error(t),t}}),this._nDelay)}onPointerMove(t){this._pointerTracking&&(this.processDragMove(t),t.preventDefault())}processDragMove(t){this._nX=t.pageX-this._nOriginalX,this._nY=t.pageY-this._nOriginalY,!1===this._dragging&&(Math.abs(this._nX)>this._nDistance||Math.abs(this._nY)>this._nDistance)&&this.startDrag(),this._dragging&&this.emit("drag",this._nX,this._nY,t)}onPointerUp(t){this.processDragStop(t)}processDragStop(t){var e;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this.checkRemovePointerTrackingEventListeners(),!0===this._dragging&&(this._eBody.classList.remove("lm_dragging"),this._eElement.classList.remove("lm_dragging"),null===(e=this._oDocument.querySelector("iframe"))||void 0===e||e.style.setProperty("pointer-events",""),this._dragging=!1,this.emit("dragStop",t))}checkRemovePointerTrackingEventListeners(){this._pointerTracking&&(this._oDocument.removeEventListener("pointermove",this._pointerMoveEventListener),this._oDocument.removeEventListener("pointerup",this._pointerUpEventListener),this._pointerTracking=!1)}startDrag(){var t;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this._dragging=!0,this._eBody.classList.add("lm_dragging"),this._eElement.classList.add("lm_dragging"),null===(t=this._oDocument.querySelector("iframe"))||void 0===t||t.style.setProperty("pointer-events","none"),this.emit("dragStart",this._nOriginalX,this._nOriginalY)}getPointerCoordinates(t){return{x:t.pageX,y:t.pageY}}}class qt{constructor(t,e,i){this._isVertical=t,this._size=e,this._grabSize=i0){const i=this.createSplitter(Math.max(0,e-1)).element;e>0?(this.contentItems[e-1].element.insertAdjacentElement("afterend",i),i.insertAdjacentElement("afterend",t.element)):(this.contentItems[0].element.insertAdjacentElement("beforebegin",i),i.insertAdjacentElement("beforebegin",t.element))}else this._childElementContainer.appendChild(t.element);super.addChild(t,e);const n=1/this.contentItems.length*100;if(!0===i)return this.emitBaseBubblingEvent("stateChanged"),e;for(let e=0;e0&&(this.calculateRelativeSizes(),this.setAbsoluteSizes()),this.emitBaseBubblingEvent("stateChanged"),this.emit("resize")}setAbsoluteSizes(){const t=this.calculateAbsoluteSizes();for(let e=0;e0&&t.itemSizes[e]++,this._isColumn?(Tt(this.contentItems[e].element,t.crossAxisSize),At(this.contentItems[e].element,t.itemSizes[e])):(Tt(this.contentItems[e].element,t.itemSizes[e]),At(this.contentItems[e].element,t.crossAxisSize))}calculateAbsoluteSizes(){const t=(this.contentItems.length-1)*this._splitterSize,{width:e,height:i}=kt(this.element);let n,o;this._isColumn?(n=i-t,o=e):(n=e-t,o=i);let s=0;const r=[];for(let t=0;t0){const n=100-t;for(let t=0;t100&&e.length>0){for(let t=0;te)return;{const r=i/e;let a=i;for(let e=0;ethis.onSplitterDrag(e,t,i))),e.on("dragStop",(()=>this.onSplitterDragStop(e))),e.on("dragStart",(()=>this.onSplitterDragStart(e))),this._splitter.splice(t,0,e),e}getSplitItems(t){const e=this._splitter.indexOf(t);return{before:this.contentItems[e],after:this.contentItems[e+1]}}calculateContentItemMinSize(t){const e=t.minSize;if(void 0!==e){if(t.minSizeUnit===ht.Pixel)return e;throw new X("ROCGMD98831",JSON.stringify(t))}{const t=this.layoutManager.layoutConfig.dimensions;return this._isColumn?t.defaultMinItemHeight:t.defaultMinItemWidth}}calculateContentItemsTotalMinSize(t){let e=0;for(const i of t)e+=this.calculateContentItemMinSize(i);return e}onSplitterDragStart(t){const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=this.calculateContentItemsTotalMinSize(e.before.contentItems),s=this.calculateContentItemsTotalMinSize(e.after.contentItems);this._splitterPosition=0,this._splitterMinPosition=-1*(i-o),this._splitterMaxPosition=n-s}onSplitterDrag(t,e,i){let n=this._isColumn?i:e;if(null===this._splitterMinPosition||null===this._splitterMaxPosition)throw new K("ROCOSD59226");n=Math.max(n,this._splitterMinPosition),n=Math.min(n,this._splitterMaxPosition),this._splitterPosition=n;const o=zt(n);this._isColumn?t.element.style.top=o:t.element.style.left=o}onSplitterDragStop(t){if(null===this._splitterPosition)throw new K("ROCOSDS66932");{const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=(this._splitterPosition+i)/(i+n),s=e.before.size+e.after.size;e.before.size=o*s,e.after.size=(1-o)*s,t.element.style.top=zt(0),t.element.style.left=zt(0),globalThis.requestAnimationFrame((()=>this.updateSize(!1)))}}}!function(t){t.getElementDimensionSize=function(t,e){return"width"===e?function(t){return t.offsetWidth}(t):function(t){return t.offsetHeight}(t)},t.setElementDimensionSize=function(t,e,i){return"width"===e?Tt(t,i):At(t,i)},t.createElement=function(t,e){const i=t.createElement("div");return i.classList.add("lm_item"),e?i.classList.add("lm_column"):i.classList.add("lm_row"),i}}(Xt||(Xt={}));class Yt extends $t{constructor(t,e,i){super(t,vt.create(e),null,Yt.createElement(document)),this.isGround=!0,this._childElementContainer=this.element,this._containerElement=i;let n=null;for(;;){const t=n?n.previousSibling:this._containerElement.lastChild;if(!(t instanceof Element&&t.classList.contains("lm_content")))break;n=t}this._containerElement.insertBefore(this.element,n)}init(){if(!0!==this.isInitialised){this.updateNodeSize();for(let t=0;t0?this.contentItems[0]:this,n.isComponent)throw new Error("Cannot add item as child to ComponentItem");{const t=this.layoutManager.createAndInitContentItem(i,n);return e=n.addChild(t,e),n===this?-1:e}}loadComponentAsRoot(t){this.clearRoot();const e=Ct.resolve(t,!1);if(e.maximised)throw new Error("Root Component cannot be maximised");{const t=new jt(this.layoutManager,e,this);t.init(),this.addChild(t,0)}}addChild(t,e){if(this.contentItems.length>0)throw new Error("Ground node can only have a single child");return this._childElementContainer.appendChild(t.element),e=super.addChild(t,e),this.updateSize(!1),this.emitBaseBubblingEvent("stateChanged"),e}calculateConfigContent(){const t=this.contentItems,e=t.length,i=new Array(e);for(let n=0;n0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e)),this.updateContentItemsSize(!1))}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}createSideAreas(){const t=Yt.Area.oppositeSides,e=new Array(Object.keys(t).length);let i=0;for(const n in t){const o=n,s=this.getElementArea();if(null===s)throw new K("RCSA77553");s.side=o,"2"===t[o][1]?s[o]=s[t[o]]-50:s[o]=s[t[o]]+50,s.surface=(s.x2-s.x1)*(s.y2-s.y1),e[i++]=s}return e}highlightDropZone(t,e,i){this.layoutManager.tabDropPlaceholder.remove(),super.highlightDropZone(t,e,i)}onDrop(t,e){if(t.isComponent){const e=ut.createDefault(),i=t;e.header=mt.Header.createCopy(i.headerConfig);const n=this.layoutManager.createAndInitContentItem(e,this);n.addChild(t),t=n}if(0===this.contentItems.length)this.addChild(t);else{if(t.type===at.row||t.type===at.column){const e=ut.createDefault(),i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}const i="x"==e.side[0]?at.row:at.column,n="2"==e.side[1],o=this.contentItems[0];if(o instanceof Xt&&o.type===i){const e=o.contentItems[n?0:o.contentItems.length-1];o.addChild(t,n?0:void 0,!0),e.size*=.5,t.size=e.size,t.sizeUnit=ht.Percent,o.updateSize(!1)}else{const e=ct.createDefault(i),s=this.layoutManager.createContentItem(e,this);this.replaceChild(o,s),s.addChild(t,n?0:void 0,!0),s.addChild(o,n?void 0:0,!0),o.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}}dock(){throw new X("GID87731")}validateDocking(){throw new X("GIVD87732")}getAllContentItems(){const t=[this];return this.deepGetAllContentItems(this.contentItems,t),t}getConfigMaximisedItems(){const t=[];return this.deepFilterContentItems(this.contentItems,t,(t=>!(!Gt.isStack(t)||!t.initialWantMaximise)||!(!Gt.isComponentItem(t)||!t.initialWantMaximise))),t}getItemsByPopInParentId(t){const e=[];return this.deepFilterContentItems(this.contentItems,e,(e=>e.popInParentIds.includes(t))),e}toConfig(){throw new Error("Cannot generate GroundItem config")}setActiveComponentItem(t,e,i){}updateNodeSize(){const{width:t,height:e}=kt(this._containerElement);Tt(this.element,t),At(this.element,e),this.contentItems.length>0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e))}deepGetAllContentItems(t,e){for(let i=0;ithis.onClick(t),this._touchStartEventListener=t=>this.onTouchStart(t),this._element=document.createElement("div"),this._element.classList.add(i),this._element.title=e,this._header.on("destroy",(()=>this.destroy())),this._element.addEventListener("click",this._clickEventListener,{passive:!0}),this._element.addEventListener("touchstart",this._touchStartEventListener,{passive:!0}),this._header.controlsContainerElement.appendChild(this._element)}get element(){return this._element}destroy(){var t;this._element.removeEventListener("click",this._clickEventListener),this._element.removeEventListener("touchstart",this._touchStartEventListener),null===(t=this._element.parentNode)||void 0===t||t.removeChild(this._element)}onClick(t){this._pushEvent(t)}onTouchStart(t){this._pushEvent(t)}}class Jt{constructor(t,e,i,n,o){var s;this._layoutManager=t,this._componentItem=e,this._closeEvent=i,this._focusEvent=n,this._dragStartEvent=o,this._isActive=!1,this._tabClickListener=t=>this.onTabClickDown(t),this._tabTouchStartListener=t=>this.onTabTouchStart(t),this._closeClickListener=()=>this.onCloseClick(),this._closeTouchStartListener=()=>this.onCloseTouchStart(),this._dragStartListener=(t,e)=>this.onDragStart(t,e),this._contentItemDestroyListener=()=>this.onContentItemDestroy(),this._tabTitleChangedListener=t=>this.setTitle(t),this._element=document.createElement("div"),this._element.classList.add("lm_tab"),this._titleElement=document.createElement("span"),this._titleElement.classList.add("lm_title"),this._closeElement=document.createElement("div"),this._closeElement.classList.add("lm_close_tab"),this._element.appendChild(this._titleElement),this._element.appendChild(this._closeElement),e.isClosable?this._closeElement.style.display="":this._closeElement.style.display="none",this.setTitle(e.title),this._componentItem.on("titleChanged",this._tabTitleChangedListener);(null!==(s=e.reorderEnabled)&&void 0!==s?s:this._layoutManager.layoutConfig.settings.reorderEnabled)&&this.enableReorder(),this._element.addEventListener("click",this._tabClickListener,{passive:!0}),this._element.addEventListener("touchstart",this._tabTouchStartListener,{passive:!0}),this._componentItem.isClosable?(this._closeElement.addEventListener("click",this._closeClickListener,{passive:!0}),this._closeElement.addEventListener("touchstart",this._closeTouchStartListener,{passive:!0})):(this._closeElement.remove(),this._closeElement=void 0),this._componentItem.setTab(this),this._layoutManager.emit("tabCreated",this)}get isActive(){return this._isActive}get componentItem(){return this._componentItem}get contentItem(){return this._componentItem}get element(){return this._element}get titleElement(){return this._titleElement}get closeElement(){return this._closeElement}get reorderEnabled(){return void 0!==this._dragListener}set reorderEnabled(t){t!==this.reorderEnabled&&(t?this.enableReorder():this.disableReorder())}setTitle(t){this._titleElement.innerText=t,this._element.title=t}setActive(t){t!==this._isActive&&(this._isActive=t,t?this._element.classList.add("lm_active"):this._element.classList.remove("lm_active"))}destroy(){var t,e;this._closeEvent=void 0,this._focusEvent=void 0,this._dragStartEvent=void 0,this._element.removeEventListener("click",this._tabClickListener),this._element.removeEventListener("touchstart",this._tabTouchStartListener),null===(t=this._closeElement)||void 0===t||t.removeEventListener("click",this._closeClickListener),null===(e=this._closeElement)||void 0===e||e.removeEventListener("touchstart",this._closeTouchStartListener),this._componentItem.off("titleChanged",this._tabTitleChangedListener),this.reorderEnabled&&this.disableReorder(),this._element.remove()}setBlurred(){this._element.classList.remove("lm_focused"),this._titleElement.classList.remove("lm_focused")}setFocused(){this._element.classList.add("lm_focused"),this._titleElement.classList.add("lm_focused")}onDragStart(t,e){if(void 0===this._dragListener)throw new J("TODSDLU10093");if(void 0===this._dragStartEvent)throw new J("TODS23309");this._dragStartEvent(t,e,this._dragListener,this.componentItem)}onContentItemDestroy(){void 0!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=void 0)}onTabClickDown(t){const e=t.target;e!==this._element&&e!==this._titleElement||(0===t.button?this.notifyFocus():1===t.button&&this._componentItem.isClosable&&this.notifyClose())}onTabTouchStart(t){t.target===this._element&&this.notifyFocus()}onCloseClick(){this.notifyClose()}onCloseTouchStart(){this.notifyClose()}notifyClose(){if(void 0===this._closeEvent)throw new J("TNC15007");this._closeEvent(this._componentItem)}notifyFocus(){if(void 0===this._focusEvent)throw new J("TNA15007");this._focusEvent(this._componentItem)}enableReorder(){this._dragListener=new Zt(this._element,[this._titleElement]),this._dragListener.on("dragStart",this._dragStartListener),this._componentItem.on("destroy",this._contentItemDestroyListener)}disableReorder(){if(void 0===this._dragListener)throw new J("TDR87745");this._componentItem.off("destroy",this._contentItemDestroyListener),this._dragListener.off("dragStart",this._dragStartListener),this._dragListener=void 0}}class Qt{constructor(t,e,i,n,o){this._layoutManager=t,this._componentRemoveEvent=e,this._componentFocusEvent=i,this._componentDragStartEvent=n,this._dropdownActiveChangedEvent=o,this._tabs=[],this._lastVisibleTabIndex=-1,this._dropdownActive=!1,this._element=document.createElement("section"),this._element.classList.add("lm_tabs"),this._dropdownElement=document.createElement("section"),this._dropdownElement.classList.add("lm_tabdropdown_list"),this._dropdownElement.style.display="none"}get tabs(){return this._tabs}get tabCount(){return this._tabs.length}get lastVisibleTabIndex(){return this._lastVisibleTabIndex}get element(){return this._element}get dropdownElement(){return this._dropdownElement}get dropdownActive(){return this._dropdownActive}destroy(){for(let t=0;tthis.handleTabCloseEvent(t)),(t=>this.handleTabFocusEvent(t)),((t,e,i,n)=>this.handleTabDragStartEvent(t,e,i,n)));void 0===e&&(e=this._tabs.length),this._tabs.splice(e,0,i),ethis._lastVisibleTabIndex){const t=this._tabs[e];for(let t=e;t>0;t--)this._tabs[t]=this._tabs[t-1];this._tabs[0]=t}}updateTabSizes(t,e){let i=!1;this.tryUpdateTabSizes(i,t,e)||(i=!0,this.tryUpdateTabSizes(i,t,e)),i!==this._dropdownActive&&(this._dropdownActive=i,this._dropdownActiveChangedEvent())}tryUpdateTabSizes(t,e,i){if(this._tabs.length>0){if(void 0===i)throw new Error("non-empty tabs must have active component item");let n=0,o=!1;const s=this._layoutManager.layoutConfig.settings.tabOverlapAllowance,r=this._tabs.indexOf(i.tab),a=this._tabs[r];this._lastVisibleTabIndex=-1;for(let i=0;ie){if(o)i===r&&(l.style.zIndex="auto",l.style.marginLeft="",l.parentElement!==this._element&&this._element.appendChild(l));else{let t;if(t=r>0&&r<=i?(d-e)/(i-1):(d-e)/i,tthis.onClick(t),this._touchStartListener=t=>this.onTouchStart(t),this._rowColumnClosable=!0,this._closeButton=null,this._popoutButton=null,this._tabsContainer=new Qt(this._layoutManager,(t=>this.handleTabInitiatedComponentRemoveEvent(t)),(t=>this.handleTabInitiatedComponentFocusEvent(t)),((t,e,i,n)=>this.handleTabInitiatedDragStartEvent(t,e,i,n)),(()=>this.processTabDropdownActiveChanged())),this._show=i.show,this._popoutEnabled=i.popoutEnabled,this._popoutLabel=i.popoutLabel,this._maximiseEnabled=i.maximiseEnabled,this._maximiseLabel=i.maximiseLabel,this._minimiseEnabled=i.minimiseEnabled,this._minimiseLabel=i.minimiseLabel,this._closeEnabled=i.closeEnabled,this._closeLabel=i.closeLabel,this._tabDropdownEnabled=i.tabDropdownEnabled,this._tabDropdownLabel=i.tabDropdownLabel,this.setSide(i.side),this._canRemoveComponent=this._configClosable,this._element=document.createElement("section"),this._element.classList.add("lm_header"),this._controlsContainerElement=document.createElement("section"),this._controlsContainerElement.classList.add("lm_controls"),this._element.appendChild(this._tabsContainer.element),this._element.appendChild(this._controlsContainerElement),this._element.appendChild(this._tabsContainer.dropdownElement),this._element.addEventListener("click",this._clickListener,{passive:!0}),this._element.addEventListener("touchstart",this._touchStartListener,{passive:!0}),this._documentMouseUpListener=()=>this._tabsContainer.hideAdditionalTabsDropdown(),globalThis.document.addEventListener("mouseup",this._documentMouseUpListener,{passive:!0}),this._tabControlOffset=this._layoutManager.layoutConfig.settings.tabControlOffset,this._tabDropdownEnabled&&(this._tabDropdownButton=new Kt(this,this._tabDropdownLabel,"lm_tabdropdown",(()=>this._tabsContainer.showAdditionalTabsDropdown()))),this._popoutEnabled&&(this._popoutButton=new Kt(this,this._popoutLabel,"lm_popout",(()=>this.handleButtonPopoutEvent()))),this._maximiseEnabled&&(this._maximiseButton=new Kt(this,this._maximiseLabel,"lm_maximise",(t=>this.handleButtonMaximiseToggleEvent(t)))),this._configClosable&&(this._closeButton=new Kt(this,this._closeLabel,"lm_close",(()=>s()))),this.processTabDropdownActiveChanged()}get show(){return this._show}get side(){return this._side}get leftRightSided(){return this._leftRightSided}get layoutManager(){return this._layoutManager}get parent(){return this._parent}get tabs(){return this._tabsContainer.tabs}get lastVisibleTabIndex(){return this._tabsContainer.lastVisibleTabIndex}get element(){return this._element}get tabsContainerElement(){return this._tabsContainer.element}get controlsContainerElement(){return this._controlsContainerElement}destroy(){this.emit("destroy"),this._popoutEvent=void 0,this._maximiseToggleEvent=void 0,this._clickEvent=void 0,this._touchStartEvent=void 0,this._componentRemoveEvent=void 0,this._componentFocusEvent=void 0,this._componentDragStartEvent=void 0,this._tabsContainer.destroy(),globalThis.document.removeEventListener("mouseup",this._documentMouseUpListener),this._element.remove()}createTab(t,e){this._tabsContainer.createTab(t,e)}removeTab(t){this._tabsContainer.removeTab(t)}processActiveComponentChanged(t){this._tabsContainer.processActiveComponentChanged(t),this.updateTabSizes()}setSide(t){this._side=t,this._leftRightSided=[nt.right,nt.left].includes(this._side)}setRowColumnClosable(t){this._rowColumnClosable=t,this.updateClosability()}updateClosability(){let t;if(this._configClosable)if(this._rowColumnClosable){t=!0;const e=this.tabs.length;for(let i=0;i1}applyFocusedValue(t){t?this._element.classList.add("lm_focused"):this._element.classList.remove("lm_focused")}processMaximised(){if(void 0===this._maximiseButton)throw new J("HPMAX16997");this._maximiseButton.element.setAttribute("title",this._minimiseLabel)}processMinimised(){if(void 0===this._maximiseButton)throw new J("HPMIN16997");this._maximiseButton.element.setAttribute("title",this._maximiseLabel)}updateTabSizes(){if(this._tabsContainer.tabCount>0){const t=this._show?this._layoutManager.layoutConfig.dimensions.headerHeight:0;let e;this._leftRightSided?(this._element.style.height="",this._element.style.width=zt(t)):(this._element.style.width="",this._element.style.height=zt(t)),e=this._leftRightSided?this._element.offsetHeight-this._controlsContainerElement.offsetHeight-this._tabControlOffset:this._element.offsetWidth-this._controlsContainerElement.offsetWidth-this._tabControlOffset,this._tabsContainer.updateTabSizes(e,this._getActiveComponentItemEvent())}}handleTabInitiatedComponentRemoveEvent(t){if(this._canRemoveComponent){if(void 0===this._componentRemoveEvent)throw new J("HHTCE22294");this._componentRemoveEvent(t)}}handleTabInitiatedComponentFocusEvent(t){if(void 0===this._componentFocusEvent)throw new J("HHTAE22294");this._componentFocusEvent(t)}handleTabInitiatedDragStartEvent(t,e,i,n){if(this._canRemoveComponent){if(void 0===this._componentDragStartEvent)throw new J("HHTDSE22294");this._componentDragStartEvent(t,e,i,n)}else i.cancelDrag()}processTabDropdownActiveChanged(){void 0!==this._tabDropdownButton&&Dt(this._tabDropdownButton.element,this._tabsContainer.dropdownActive)}handleButtonPopoutEvent(){if(this._layoutManager.layoutConfig.settings.popoutWholeStack){if(void 0===this._popoutEvent)throw new J("HHBPOE17834");this._popoutEvent()}else{const t=this._getActiveComponentItemEvent();t&&t.popout()}}handleButtonMaximiseToggleEvent(t){if(void 0===this._maximiseToggleEvent)throw new J("HHBMTE16834");this._maximiseToggleEvent()}onClick(t){t.target===this._element&&this.notifyClick(t)}onTouchStart(t){t.target===this._element&&this.notifyTouchStart(t)}notifyClick(t){if(void 0===this._clickEvent)throw new J("HNHC46834");this._clickEvent(t)}notifyTouchStart(t){if(void 0===this._touchStartEvent)throw new J("HNHTS46834");this._touchStartEvent(t)}}class ee extends $t{constructor(t,e,i){var n,o,s,r,a,l,h,d,c,m,u,p,g,f,v,_,y,C,w;super(t,e,i,ee.createElement(document)),this._headerSideChanged=!1,this._resizeListener=()=>this.handleResize(),this._maximisedListener=()=>this.handleMaximised(),this._minimisedListener=()=>this.handleMinimised(),this._headerConfig=e.header;const I=t.layoutConfig.header,b=e.content;let S;if(1!==b.length)S=void 0;else{S=b[0].header}this._initialWantMaximise=e.maximised,this._initialActiveItemIndex=null!==(n=e.activeItemIndex)&&void 0!==n?n:0;const E=null!==(r=null!==(s=null===(o=this._headerConfig)||void 0===o?void 0:o.show)&&void 0!==s?s:null==S?void 0:S.show)&&void 0!==r?r:I.show,x=null!==(h=null!==(l=null===(a=this._headerConfig)||void 0===a?void 0:a.popout)&&void 0!==l?l:null==S?void 0:S.popout)&&void 0!==h?h:I.popout,L=null!==(m=null!==(c=null===(d=this._headerConfig)||void 0===d?void 0:d.maximise)&&void 0!==c?c:null==S?void 0:S.maximise)&&void 0!==m?m:I.maximise,z=null!==(g=null!==(p=null===(u=this._headerConfig)||void 0===u?void 0:u.close)&&void 0!==p?p:null==S?void 0:S.close)&&void 0!==g?g:I.close,M=null!==(_=null!==(v=null===(f=this._headerConfig)||void 0===f?void 0:f.minimise)&&void 0!==v?v:null==S?void 0:S.minimise)&&void 0!==_?_:I.minimise,P=null!==(w=null!==(C=null===(y=this._headerConfig)||void 0===y?void 0:y.tabDropdown)&&void 0!==C?C:null==S?void 0:S.tabDropdown)&&void 0!==w?w:I.tabDropdown;this._maximisedEnabled=!1!==L;const T={show:!1!==E,side:!1===E?nt.top:E,popoutEnabled:!1!==x,popoutLabel:!1===x?"":x,maximiseEnabled:this._maximisedEnabled,maximiseLabel:!1===L?"":L,closeEnabled:!1!==z,closeLabel:!1===z?"":z,minimiseEnabled:!0,minimiseLabel:M,tabDropdownEnabled:!1!==P,tabDropdownLabel:!1===P?"":P};this._header=new te(t,this,T,e.isClosable&&!1!==z,(()=>this.getActiveComponentItem()),(()=>this.remove()),(()=>this.handlePopoutEvent()),(()=>this.toggleMaximise()),(t=>this.handleHeaderClickEvent(t)),(t=>this.handleHeaderTouchStartEvent(t)),(t=>this.handleHeaderComponentRemoveEvent(t)),(t=>this.handleHeaderComponentFocusEvent(t)),((t,e,i,n)=>this.handleHeaderComponentStartDragEvent(t,e,i,n))),this.isStack=!0,this._childElementContainer=document.createElement("section"),this._childElementContainer.classList.add("lm_items"),this.on("resize",this._resizeListener),this._maximisedEnabled&&(this.on("maximised",this._maximisedListener),this.on("minimised",this._minimisedListener)),this.element.appendChild(this._header.element),this.element.appendChild(this._childElementContainer),this.setupHeaderPosition(),this._header.updateClosability()}get childElementContainer(){return this._childElementContainer}get header(){return this._header}get headerShow(){return this._header.show}get headerSide(){return this._header.side}get headerLeftRightSided(){return this._header.leftRightSided}get contentAreaDimensions(){return this._contentAreaDimensions}get initialWantMaximise(){return this._initialWantMaximise}get isMaximised(){return this===this.layoutManager.maximisedStack}get stackParent(){if(!this.parent)throw new Error("Stack should always have a parent");return this.parent}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}init(){if(!0===this.isInitialised)return;this.updateNodeSize();for(let t=0;t0){if(this._initialActiveItemIndex<0||this._initialActiveItemIndex>=e)throw new Error(`ActiveItemIndex out of range: ${this._initialActiveItemIndex} id: ${this.id}`);for(let i=0;ithis.contentItems.length)throw e-=1,new X("SAC99728");if(t instanceof jt)return e=super.addChild(t,e),this._childElementContainer.appendChild(t.element),this._header.createTab(t,e),this.setActiveComponentItem(t,i),this._header.updateTabSizes(),this.updateSize(!1),t.container.setBaseLogicalZIndex(),this._header.updateClosability(),this.emitStateChangedEvent(),e;throw new X("SACC88532")}removeChild(t,e){const i=t,n=this.contentItems.indexOf(i),o=1===this.contentItems.length;if(this._activeComponentItem===i&&(i.focused&&i.blur(),!o)){const t=0===n?1:n-1;this.setActiveComponentItem(this.contentItems[t],!1)}this._header.removeTab(i),super.removeChild(i,e),o||this._header.updateClosability(),this.emitStateChangedEvent()}toggleMaximise(){this.isMaximised?this.minimise():this.maximise()}maximise(){if(!this.isMaximised){this.layoutManager.setMaximisedStack(this);const t=this.contentItems,e=t.length;for(let i=0;i0&&void 0===t)throw new Error("expected non-empty stack to have an active component item");return{type:"stack",content:this.calculateConfigContent(),size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,isClosable:this.isClosable,maximised:this.isMaximised,header:this.createHeaderConfig(),activeItemIndex:t}}onDrop(t,e){if("header"===this._dropSegment){if(this.resetHeaderDropZone(),void 0===this._dropIndex)throw new J("SODDI68990");return void this.addChild(t,this._dropIndex)}if("body"===this._dropSegment)return void this.addChild(t,0,!0);const i="top"===this._dropSegment||"bottom"===this._dropSegment,n="left"===this._dropSegment||"right"===this._dropSegment,o="top"===this._dropSegment||"left"===this._dropSegment,s=i&&this.stackParent.isColumn||n&&this.stackParent.isRow;if(t.isComponent){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createAndInitContentItem(e,this);i.addChild(t),t=i}if(t.type===at.row||t.type===at.column){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}if(s){const e=this.stackParent.contentItems.indexOf(this);this.stackParent.addChild(t,o?e:e+1,!0),this.size*=.5,t.size=this.size,t.sizeUnit=this.sizeUnit,this.stackParent.updateSize(!1)}else{const e=i?at.column:at.row,n=ct.createDefault(e),s=this.layoutManager.createContentItem(n,this);this.stackParent.replaceChild(this,s),s.addChild(t,o?0:void 0,!0),s.addChild(this,o?void 0:0,!0),this.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}highlightDropZone(t,e){for(const i in this._contentAreaDimensions){const n=i,o=this._contentAreaDimensions[n].hoverArea;if(o.x1t&&o.y1e)return void("header"===n?(this._dropSegment="header",this.highlightHeaderDropZone(this._header.leftRightSided?e:t)):(this.resetHeaderDropZone(),this.highlightBodyDropZone(n)))}}getArea(){if("none"===this.element.style.display)return null;const t=super.getElementArea(this._header.element),e=super.getElementArea(this._childElementContainer);if(null===t||null===e)throw new K("SGAHC13086");const i=e.x2-e.x1,n=e.y2-e.y1;return this._contentAreaDimensions={header:{hoverArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2},highlightArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2}}},0===this.contentItems.length?(this._contentAreaDimensions.body={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2}},super.getElementArea(this.element)):(this._contentAreaDimensions.left={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x1+.25*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x1+.5*i,y2:e.y2}},this._contentAreaDimensions.top={hoverArea:{x1:e.x1+.25*i,y1:e.y1,x2:e.x1+.75*i,y2:e.y1+.5*n},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y1+.5*n}},this._contentAreaDimensions.right={hoverArea:{x1:e.x1+.75*i,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1+.5*i,y1:e.y1,x2:e.x2,y2:e.y2}},this._contentAreaDimensions.bottom={hoverArea:{x1:e.x1+.25*i,y1:e.y1+.5*n,x2:e.x1+.75*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1+.5*n,x2:e.x2,y2:e.y2}},super.getElementArea(this.element))}positionHeader(t){this._header.side!==t&&(this._header.setSide(t),this._headerSideChanged=!0,this.setupHeaderPosition())}updateNodeSize(){if("none"!==this.element.style.display){const t=kt(this.element);if(this._header.show){t[this._header.leftRightSided?it.width:it.height]-=this.layoutManager.layoutConfig.dimensions.headerHeight}this._childElementContainer.style.width=zt(t.width),this._childElementContainer.style.height=zt(t.height);for(let e=0;e=o&&tthis.onDrag(t,e,i))),this._dragListener.on("dragStop",(()=>this.onDrop())),this.createDragProxyElements(t,e),null===this._componentItem.parent)throw new K("DPC10097");this._componentItemFocused=this._componentItem.focused,this._componentItemFocused&&this._componentItem.blur(),this._componentItem.parent.removeChild(this._componentItem,!0),this.setDimensions(),document.body.appendChild(this._element),this.determineMinMaxXY(),this._layoutManager.calculateItemAreas(),this.setDropPosition(t,e)}get element(){return this._element}createDragProxyElements(t,e){this._element=document.createElement("div"),this._element.classList.add("lm_dragProxy");const i=document.createElement("div");i.classList.add("lm_header");const n=document.createElement("div");n.classList.add("lm_tabs");const o=document.createElement("div");o.classList.add("lm_tab");const s=document.createElement("span");s.classList.add("lm_title"),o.appendChild(s),n.appendChild(o),i.appendChild(n),this._proxyContainerElement=document.createElement("div"),this._proxyContainerElement.classList.add("lm_content"),this._element.appendChild(i),this._element.appendChild(this._proxyContainerElement),this._originalParent instanceof ee&&this._originalParent.headerShow&&(this._sided=this._originalParent.headerLeftRightSided,this._element.classList.add("lm_"+this._originalParent.headerSide),[nt.right,nt.bottom].indexOf(this._originalParent.headerSide)>=0&&this._proxyContainerElement.insertAdjacentElement("afterend",i)),this._element.style.left=zt(t),this._element.style.top=zt(e),o.setAttribute("title",this._componentItem.title),s.insertAdjacentText("afterbegin",this._componentItem.title),this._proxyContainerElement.appendChild(this._componentItem.element)}determineMinMaxXY(){const t=this._layoutManager.groundItem;if(void 0===t)throw new J("DPDMMXY73109");{const e=t.element.getBoundingClientRect();this._minX=e.left+document.body.scrollLeft,this._minY=e.top+document.body.scrollTop,this._maxX=this._minX+e.width,this._maxY=this._minY+e.height}}onDrag(t,e,i){const n=i.pageX,o=i.pageY;this.setDropPosition(n,o),this._componentItem.drag()}setDropPosition(t,e){this._layoutManager.layoutConfig.settings.constrainDragToContainer&&(t<=this._minX?t=Math.ceil(this._minX):t>=this._maxX&&(t=Math.floor(this._maxX)),e<=this._minY?e=Math.ceil(this._minY):e>=this._maxY&&(e=Math.floor(this._maxY))),this._element.style.left=zt(t),this._element.style.top=zt(e),this._area=this._layoutManager.getArea(t,e),null!==this._area&&(this._lastValidArea=this._area,this._area.contentItem.highlightDropZone(t,e,this._area))}onDrop(){const t=this._layoutManager.dropTargetIndicator;if(null===t)throw new K("DPOD30011");let e;if(t.hide(),this._componentItem.exitDragMode(),null!==this._area)e=this._componentItem,this._area.contentItem.onDrop(e,this._area);else if(null!==this._lastValidArea){e=this._componentItem;this._lastValidArea.contentItem.onDrop(e,this._lastValidArea)}else this._originalParent?(e=this._componentItem,this._originalParent.addChild(e)):this._componentItem.destroy();this._element.remove(),this._layoutManager.emit("itemDropped",this._componentItem),this._componentItemFocused&&void 0!==e&&e.focus()}setDimensions(){const t=this._layoutManager.layoutConfig.dimensions;if(void 0===t)throw new Error("DragProxy.setDimensions: dimensions undefined");let e=t.dragProxyWidth,i=t.dragProxyHeight;if(void 0===e||void 0===i)throw new Error("DragProxy.setDimensions: width and/or height undefined");const n=!1===this._layoutManager.layoutConfig.header.show?0:t.headerHeight;this._element.style.width=zt(e),this._element.style.height=zt(i),e-=this._sided?n:0,i-=this._sided?0:n,this._proxyContainerElement.style.width=zt(e),this._proxyContainerElement.style.height=zt(i),this._componentItem.enterDragMode(e,i),this._componentItem.show()}}class ne{constructor(t,e,i,n,o,s,r){this._layoutManager=t,this._element=e,this._extraAllowableChildTargets=i,this._componentTypeOrFtn=n,this._componentState=o,this._title=s,this._id=r,this._dragListener=null,this._dummyGroundContainer=document.createElement("div");const a=gt.createDefault("row");this._dummyGroundContentItem=new Yt(this._layoutManager,a,this._dummyGroundContainer),this.createDragListener()}destroy(){this.removeDragListener()}createDragListener(){this.removeDragListener(),this._dragListener=new Zt(this._element,this._extraAllowableChildTargets),this._dragListener.on("dragStart",((t,e)=>this.onDragStart(t,e))),this._dragListener.on("dragStop",(()=>this.onDragStop()))}onDragStart(t,e){var i;const n="component";let o;if("function"==typeof this._componentTypeOrFtn){const t=this._componentTypeOrFtn();o=ne.isDragSourceComponentItemConfig(t)?{type:n,componentState:t.state,componentType:t.type,title:null!==(i=t.title)&&void 0!==i?i:this._title}:t}else o={type:n,componentState:this._componentState,componentType:this._componentTypeOrFtn,title:this._title,id:this._id};const s=bt.resolve(o,!1),r=new jt(this._layoutManager,s,this._dummyGroundContentItem);if(this._dummyGroundContentItem.contentItems.push(r),null===this._dragListener)throw new K("DSODSD66746");{const i=new ie(t,e,this._dragListener,this._layoutManager,r,this._dummyGroundContentItem),n=this._layoutManager.transitionIndicator;if(null===n)throw new K("DSODST66746");n.transitionElements(this._element,i.element)}}onDragStop(){this.createDragListener()}removeDragListener(){null!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=null)}}!function(t){t.isDragSourceComponentItemConfig=function(t){return!("componentType"in t)}}(ne||(ne={}));class oe{constructor(){this._element=document.createElement("div"),this._element.classList.add("lm_dropTargetIndicator");const t=document.createElement("div");t.classList.add("lm_inner"),this._element.appendChild(t),document.body.appendChild(this._element)}destroy(){this._element.remove()}highlightArea(t,e){this._element.style.left=zt(t.x1+e),this._element.style.top=zt(t.y1+e),this._element.style.width=zt(t.x2-t.x1-e),this._element.style.height=zt(t.y2-t.y1-e),this._element.style.display="block"}hide(){Dt(this._element,!1)}}class se{constructor(){this._element=document.createElement("div"),this._element.classList.add("lm_transition_indicator"),document.body.appendChild(this._element),this._toElement=null,this._fromDimensions=null,this._totalAnimationDuration=200,this._animationStartTime=null}destroy(){this._element.remove()}transitionElements(t,e){}nextAnimationFrame(){}measure(t){const e=t.getBoundingClientRect();return{left:e.left,top:e.top,width:t.offsetWidth,height:t.offsetHeight}}}class re extends Wt{constructor(t){super(),this._layoutManager=t,this._childEventListener=t=>this.onEventFromChild(t),globalThis.addEventListener(re.ChildEventName,this._childEventListener,{passive:!0})}emit(t,...e){"userBroadcast"===t?this.emitUserBroadcast(...e):super.emit(t,...e)}emitUserBroadcast(...t){this.handleUserBroadcastEvent("userBroadcast",t)}destroy(){globalThis.removeEventListener(re.ChildEventName,this._childEventListener)}handleUserBroadcastEvent(t,e){this._layoutManager.isSubWindow?this.propagateToParent(t,e):this.propagateToThisAndSubtree(t,e)}onEventFromChild(t){const e=t.detail;this.handleUserBroadcastEvent(e.eventName,e.args)}propagateToParent(t,e){const i={bubbles:!0,cancelable:!0,detail:{layoutManager:this._layoutManager,eventName:t,args:e}},n=new CustomEvent(re.ChildEventName,i),o=globalThis.opener;if(null===o)throw new K("EHPTP15778");o.dispatchEvent(n)}propagateToThisAndSubtree(t,e){this.emitUnknown(t,...e);for(let i=0;ithis.handleContainerResize())),this._windowBeforeUnloadListener=()=>this.onBeforeUnload(),this._windowBeforeUnloadListening=!1,this._maximisedStackBeforeDestroyedListener=t=>this.cleanupBeforeMaximisedStackDestroyed(t),this.isSubWindow=t.isSubWindow,this._constructorOrSubWindowLayoutConfig=t.constructorOrSubWindowLayoutConfig,Q.checkInitialise(),dt.checkInitialise(),void 0!==t.containerElement&&(this._containerElement=t.containerElement)}get container(){return this._containerElement}get isInitialised(){return this._isInitialised}get groundItem(){return this._groundItem}get root(){return this._groundItem}get openPopouts(){return this._openPopouts}get dropTargetIndicator(){return this._dropTargetIndicator}get transitionIndicator(){return this._transitionIndicator}get width(){return this._width}get height(){return this._height}get eventHub(){return this._eventHub}get rootItem(){if(void 0===this._groundItem)throw new Error("Cannot access rootItem before init");return 0===this._groundItem.contentItems.length?void 0:this._groundItem.contentItems[0]}get focusedComponentItem(){return this._focusedComponentItem}get tabDropPlaceholder(){return this._tabDropPlaceholder}get maximisedStack(){return this._maximisedStack}get deprecatedConstructor(){return!this.isSubWindow&&void 0!==this._constructorOrSubWindowLayoutConfig}destroy(){if(this._isInitialised){this._windowBeforeUnloadListening&&(globalThis.removeEventListener("beforeunload",this._windowBeforeUnloadListener),this._windowBeforeUnloadListening=!1),!0===this.layoutConfig.settings.closePopoutsOnUnload&&this.closeAllOpenPopouts(),this._resizeObserver.disconnect(),this.checkClearResizeTimeout(),void 0!==this._groundItem&&this._groundItem.destroy(),this._tabDropPlaceholder.remove(),null!==this._dropTargetIndicator&&this._dropTargetIndicator.destroy(),null!==this._transitionIndicator&&this._transitionIndicator.destroy(),this._eventHub.destroy();for(const t of this._dragSources)t.destroy();this._dragSources=[],this._isInitialised=!1}}minifyConfig(t){return _t.minifyConfig(t)}unminifyConfig(t){return _t.unminifyConfig(t)}init(){let t;if(this.setContainer(),this._dropTargetIndicator=new oe,this._transitionIndicator=new se,this.updateSizeFromContainer(),this.isSubWindow){if(void 0===this._constructorOrSubWindowLayoutConfig)throw new J("LMIU07155");{const e=this._constructorOrSubWindowLayoutConfig.root;if(void 0===e)throw new X("LMIC07156");if(!Ct.isComponent(e))throw new X("LMIC07157");t=e;const i=xt.resolve(this._constructorOrSubWindowLayoutConfig);this.layoutConfig=Object.assign(Object.assign({},i),{root:void 0})}}else void 0===this._constructorOrSubWindowLayoutConfig?this.layoutConfig=_t.createDefault():this.layoutConfig=xt.resolve(this._constructorOrSubWindowLayoutConfig);const e=this.layoutConfig;this._groundItem=new Yt(this,e.root,this._containerElement),this._groundItem.init(),this.checkLoadedLayoutMaximiseItem(),this._resizeObserver.observe(this._containerElement),this._isInitialised=!0,this.adjustColumnsResponsive(),this.emit("initialised"),void 0!==t&&this.loadComponentAsRoot(t)}loadLayout(t){if(!this.isInitialised)throw new Error("GoldenLayout: Need to call init() if LayoutConfig with defined root passed to constructor");if(void 0===this._groundItem)throw new J("LMLL11119");this.createSubWindows(),this.layoutConfig=xt.resolve(t),this._groundItem.loadRoot(this.layoutConfig.root),this.checkLoadedLayoutMaximiseItem(),this.adjustColumnsResponsive()}saveLayout(){if(!1===this._isInitialised)throw new Error("Can't create config, layout not yet initialised");if(void 0===this._groundItem)throw new J("LMTC18244");{const t=this._groundItem.calculateConfigContent();let e;e=1!==t.length?void 0:t[0],this.reconcilePopoutWindows();const i=[];for(let t=0;t=0?n=this._groundItem.contentItems[0]:e=0;break;case at.row:case at.column:e=n.addItem(t,i.index);break;case at.stack:if(Ct.isComponent(t)){e=n.addItem(t,i.index);break}throw Error(tt[6]);case at.component:throw new X("LMAIALC87444602");default:throw new Y("LMAIALU98881733",n.type)}if(Ct.isComponent(t)){const t=n.contentItems[e];Gt.isStack(t)&&(n=t,e=0)}return i.parentItem=n,i.index=e,i}}}loadComponentAsRoot(t){if(void 0===this._groundItem)throw new Error("Cannot add item before init");this._groundItem.loadComponentAsRoot(t)}updateSize(t,e){this.setSize(t,e)}setSize(t,e){if(this._width=t,this._height=e,!0===this._isInitialised){if(void 0===this._groundItem)throw new J("LMUS18881");if(this._groundItem.setSize(this._width,this._height),this._maximisedStack){const{width:t,height:e}=kt(this._containerElement);Tt(this._maximisedStack.element,t),At(this._maximisedStack.element,e),this._maximisedStack.updateSize(!1)}this.adjustColumnsResponsive()}}beginSizeInvalidation(){this._sizeInvalidationBeginCount++}endSizeInvalidation(){0==--this._sizeInvalidationBeginCount&&this.updateSizeFromContainer()}updateSizeFromContainer(){const{width:t,height:e}=kt(this._containerElement);this.setSize(t,e)}updateRootSize(t=!1){if(void 0===this._groundItem)throw new J("LMURS28881");this._groundItem.updateSize(t)}createAndInitContentItem(t,e){const i=this.createContentItem(t,e);return i.init(),i}createContentItem(t,e){if("string"!=typeof t.type)throw new G("Missing parameter 'type'",JSON.stringify(t));if(ct.isComponentItem(t)&&!(e instanceof ee)&&e&&!(!0===this.isSubWindow&&e instanceof Yt)){t={type:at.stack,content:[t],size:t.size,sizeUnit:t.sizeUnit,minSize:t.minSize,minSizeUnit:t.minSizeUnit,id:t.id,maximised:t.maximised,isClosable:t.isClosable,activeItemIndex:0,header:void 0}}return this.createContentItemFromConfig(t,e)}findFirstComponentItemById(t){if(void 0===this._groundItem)throw new J("LMFFCIBI82446");return this.findFirstContentItemTypeByIdRecursive(at.component,t,this._groundItem)}createPopout(t,e,i,n){return t instanceof Gt?this.createPopoutFromContentItem(t,e,i,n):this.createPopoutFromItemConfig(t,e,i,n)}createPopoutFromContentItem(t,e,i,n){let o=t.parent,s=t;for(;null!==o&&1===o.contentItems.length&&!o.isGround;)s=o,o=o.parent;if(null===o)throw new K("LMCPFCI00834");{if(void 0===n&&(n=o.contentItems.indexOf(s)),null!==i&&o.addPopInParentId(i),void 0===e){const i=globalThis.screenX||globalThis.screenLeft,n=globalThis.screenY||globalThis.screenTop,o=t.element.offsetLeft,s=t.element.offsetTop,{width:r,height:a}=kt(t.element);e={left:i+o,top:n+s,width:r,height:a}}const r=t.toConfig();if(t.remove(),ft.isRootItemConfig(r))return this.createPopoutFromItemConfig(r,e,i,n);throw new Error(`${tt[0]}`)}}beginVirtualSizedContainerAdding(){0==++this._virtualSizedContainerAddingBeginCount&&(this._virtualSizedContainers.length=0)}addVirtualSizedContainer(t){this._virtualSizedContainers.push(t)}endVirtualSizedContainerAdding(){if(0==--this._virtualSizedContainerAddingBeginCount){const t=this._virtualSizedContainers.length;if(t>0){this.fireBeforeVirtualRectingEvent(t);for(let e=0;ethis.emit("windowOpened",a))),a.on("closed",(()=>this.reconcilePopoutWindows())),this._openPopouts.push(a),this.layoutConfig.settings.closePopoutsOnUnload&&!this._windowBeforeUnloadListening&&(globalThis.addEventListener("beforeunload",this._windowBeforeUnloadListener,{passive:!0}),this._windowBeforeUnloadListening=!0),a}closeAllOpenPopouts(){for(let t=0;tglobalThis.close()),1)}getArea(t,e){let i=null,n=1/0;for(let o=0;o=s.x1&&t=s.y1&&es.surface&&(n=s.surface,i=s)}return i}calculateItemAreas(){const t=this.getAllContentItems(),e=this._groundItem;if(void 0===e)throw new J("LMCIAR44365");if(1!==t.length){e.contentItems[0].isStack?this._itemAreas=[]:this._itemAreas=e.createSideAreas();for(let e=0;e0){let e=t[0];if(Gt.isComponentItem(e)){const t=e.parent;if(null===t)throw new K("LMXLLMI69999");e=t}if(!Gt.isStack(e))throw new X("LMCLLMI19993");e.maximise()}}}processMaximiseStack(t){if(this._maximisedStack=t,t.on("beforeItemDestroyed",this._maximisedStackBeforeDestroyedListener),t.element.classList.add("lm_maximised"),t.element.insertAdjacentElement("afterend",this._maximisePlaceholder),void 0===this._groundItem)throw new J("LMMXI19993");{this._groundItem.element.prepend(t.element);const{width:e,height:i}=kt(this._containerElement);Tt(t.element,e),At(t.element,i),t.updateSize(!0),t.focusActiveContentItem(),this._maximisedStack.emit("maximised"),this.emit("stateChanged")}}processMinimiseMaximisedStack(){if(void 0===this._maximisedStack)throw new X("LMMMS74422");{const t=this._maximisedStack;if(null===t.parent)throw new K("LMMI13668");t.element.classList.remove("lm_maximised"),this._maximisePlaceholder.insertAdjacentElement("afterend",t.element),this._maximisePlaceholder.remove(),this.updateRootSize(!0),this._maximisedStack=void 0,t.off("beforeItemDestroyed",this._maximisedStackBeforeDestroyedListener),t.emit("minimised"),this.emit("stateChanged")}}reconcilePopoutWindows(){const t=[];for(let e=0;e{this._resizeTimeoutId=void 0,this.beginSizeInvalidation(),this.endSizeInvalidation()}),this.resizeDebounceInterval))}checkClearResizeTimeout(){void 0!==this._resizeTimeoutId&&(clearTimeout(this._resizeTimeoutId),this._resizeTimeoutId=void 0)}setContainer(){var t;const e=document.body,i=null!==(t=this._containerElement)&&void 0!==t?t:e;if(i===e){this.resizeWithContainerAutomatically=!0;const t=document.documentElement;t.style.height="100%",t.style.margin="0",t.style.padding="0",t.style.overflow="clip",e.style.height="100%",e.style.margin="0",e.style.padding="0",e.style.overflow="clip"}this._containerElement=i}onBeforeUnload(){this.destroy()}adjustColumnsResponsive(){if(void 0===this._groundItem)throw new J("LMACR20883");if(this._firstLoad=!1,this.useResponsiveLayout()&&!this._updatingColumnsResponsive&&this._groundItem.contentItems.length>0&&this._groundItem.contentItems[0].isRow){if(void 0===this._groundItem||null===this._width)throw new J("LMACR77412");{const t=this._groundItem.contentItems[0].contentItems.length;if(t<=1)return;{const e=this.layoutConfig.dimensions.defaultMinItemWidth;if(t*e<=this._width)return;{this._updatingColumnsResponsive=!0;const i=t-Math.max(Math.floor(this._width/e),1),n=this._groundItem.contentItems[0],o=this.getAllStacks();if(0===o.length)throw new X("LMACRS77413");{const t=o[0];for(let e=0;en?void 0:{parentItem:t,index:o}}}case 1:if(void 0===this._focusedComponentItem)return;{const t=this._focusedComponentItem.parentItem;return this.tryCreateLocationFromParentItem(t,e)}case 2:{const t=this.findFirstContentItemType(at.stack);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 3:{let t=this.findFirstContentItemType(at.row);return void 0!==t?this.tryCreateLocationFromParentItem(t,e):(t=this.findFirstContentItemType(at.column),void 0!==t?this.tryCreateLocationFromParentItem(t,e):void 0)}case 4:{const t=this.findFirstContentItemType(at.row);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 5:{const t=this.findFirstContentItemType(at.column);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 6:if(void 0===this._groundItem)throw new J("LMFLRIF18244");return void 0!==this.rootItem?void 0:void 0===e||0===e?{parentItem:this._groundItem,index:0}:void 0;case 7:if(void 0===this._groundItem)throw new J("LMFLF18244");{const t=this._groundItem.contentItems;if(0===t.length)return void 0===e||0===e?{parentItem:this._groundItem,index:0}:void 0;{const i=t[0];return this.tryCreateLocationFromParentItem(i,e)}}}}tryCreateLocationFromParentItem(t,e){const i=t.contentItems.length;return void 0===e?{parentItem:t,index:i}:e<0||e>i?void 0:{parentItem:t,index:e}}}!function(t){t.createMaximisePlaceElement=function(t){const e=t.createElement("div");return e.classList.add("lm_maximise_place"),e},t.createTabDropPlaceholderElement=function(t){const e=t.createElement("div");return e.classList.add("lm_drop_tab_placeholder"),e},t.defaultLocationSelectors=[{typeId:1,index:void 0},{typeId:2,index:void 0},{typeId:3,index:void 0},{typeId:7,index:void 0}],t.afterFocusedItemIfPossibleLocationSelectors=[{typeId:0,index:1},{typeId:2,index:void 0},{typeId:3,index:void 0},{typeId:7,index:void 0}]}(ae||(ae={}));class le extends ae{constructor(t,e,i,n){if(super(le.createLayoutManagerConstructorParameters(t,e)),this._bindComponentEventHanlderPassedInConstructor=!1,this._creationTimeoutPassed=!1,void 0!==e&&"function"==typeof e&&(this.bindComponentEvent=e,this._bindComponentEventHanlderPassedInConstructor=!0,void 0!==i&&(this.unbindComponentEvent=i)),!this._bindComponentEventHanlderPassedInConstructor&&this.isSubWindow){if(void 0===this._constructorOrSubWindowLayoutConfig)throw new J("VLC98823");{const t=xt.resolve(this._constructorOrSubWindowLayoutConfig);this.layoutConfig=Object.assign(Object.assign({},t),{root:void 0})}}!0!==n&&(this.deprecatedConstructor||this.init())}destroy(){this.bindComponentEvent=void 0,this.unbindComponentEvent=void 0,super.destroy()}init(){if(this._bindComponentEventHanlderPassedInConstructor||"loading"!==document.readyState&&null!==document.body){if(!this._bindComponentEventHanlderPassedInConstructor&&!0===this.isSubWindow&&!this._creationTimeoutPassed)return setTimeout((()=>this.init()),7),void(this._creationTimeoutPassed=!0);!0===this.isSubWindow&&(this._bindComponentEventHanlderPassedInConstructor||this.clearHtmlAndAdjustStylesForSubWindow(),window.__glInstance=this),super.init()}else document.addEventListener("DOMContentLoaded",(()=>this.init()),{passive:!0})}clearHtmlAndAdjustStylesForSubWindow(){const t=document.head,e=new Array(4);e[0]=document.querySelectorAll("body link"),e[1]=document.querySelectorAll("body style"),e[2]=document.querySelectorAll("template"),e[3]=document.querySelectorAll(".gl_keep");for(let i=0;ithis.emit("popIn"))),document.body.appendChild(t),!0}}bindComponent(t,e){if(void 0!==this.bindComponentEvent){return this.bindComponentEvent(t,e)}if(void 0!==this.getComponentEvent)return{virtual:!1,component:this.getComponentEvent(t,e)};{const t=`${tt[2]}: ${JSON.stringify(e)}`;throw new Z(t)}}unbindComponent(t,e,i){if(void 0!==this.unbindComponentEvent)this.unbindComponentEvent(t);else if(!e&&void 0!==this.releaseComponentEvent){if(void 0===i)throw new J("VCUCRCU333998");this.releaseComponentEvent(t,i)}}}!function(t){let e=!1;t.createLayoutManagerConstructorParameters=function(t,i){const n=e?null:new URL(document.location.href).searchParams.get("gl-window");e=!0;const o=null!==n;let s,r;if(null!==n){const e=localStorage.getItem(n);if(null===e)throw new Error("Null gl-window Config");localStorage.removeItem(n);const i=JSON.parse(e),o=_t.unminifyConfig(i);r=xt.fromResolved(o),t instanceof HTMLElement&&(s=t)}else void 0===t?r=void 0:t instanceof HTMLElement?(r=void 0,s=t):r=t,void 0===s&&i instanceof HTMLElement&&(s=i);return{constructorOrSubWindowLayoutConfig:r,isSubWindow:o,containerElement:s}}}(le||(le={}));class he extends le{constructor(t,e,i){super(t,e,i,!0),this._componentTypesMap=new Map,this._registeredComponentMap=new Map,this._virtuableComponentMap=new Map,this._containerVirtualRectingRequiredEventListener=(t,e,i)=>this.handleContainerVirtualRectingRequiredEvent(t,e,i),this._containerVirtualVisibilityChangeRequiredEventListener=(t,e)=>this.handleContainerVirtualVisibilityChangeRequiredEvent(t,e),this._containerVirtualZIndexChangeRequiredEventListener=(t,e,i)=>this.handleContainerVirtualZIndexChangeRequiredEvent(t,e,i),this.deprecatedConstructor||this.init()}registerComponent(t,e,i=!1){if("function"!=typeof e)throw new $("registerComponent() componentConstructorOrFactoryFtn parameter is not a function");if(e.hasOwnProperty("prototype")){const n=e;this.registerComponentConstructor(t,n,i)}else{const n=e;this.registerComponentFactoryFunction(t,n,i)}}registerComponentConstructor(t,e,i=!1){if("function"!=typeof e)throw new Error(tt[1]);if(void 0!==this._componentTypesMap.get(t))throw new Z(`${tt[3]}: ${t}`);this._componentTypesMap.set(t,{constructor:e,factoryFunction:void 0,virtual:i})}registerComponentFactoryFunction(t,e,i=!1){if("function"!=typeof e)throw new Z("Please register a constructor function");if(void 0!==this._componentTypesMap.get(t))throw new Z(`${tt[3]}: ${t}`);this._componentTypesMap.set(t,{constructor:void 0,factoryFunction:e,virtual:i})}registerComponentFunction(t){this.registerGetComponentConstructorCallback(t)}registerGetComponentConstructorCallback(t){if("function"!=typeof t)throw new Error("Please register a callback function");void 0!==this._getComponentConstructorFtn&&console.warn("Multiple component functions are being registered. Only the final registered function will be used."),this._getComponentConstructorFtn=t}getRegisteredComponentTypeNames(){const t=this._componentTypesMap.keys();return Array.from(t)}getComponentInstantiator(t){let e;const i=pt.resolveComponentTypeName(t);return void 0!==i&&(e=this._componentTypesMap.get(i)),void 0===e&&void 0!==this._getComponentConstructorFtn&&(e={constructor:this._getComponentConstructorFtn(t),factoryFunction:void 0,virtual:!1}),e}bindComponent(t,e){let i;const n=pt.resolveComponentTypeName(e);let o;if(void 0!==n&&(i=this._componentTypesMap.get(n)),void 0===i&&void 0!==this._getComponentConstructorFtn&&(i={constructor:this._getComponentConstructorFtn(e),factoryFunction:void 0,virtual:!1}),void 0!==i){const s=i.virtual;let r,a;r=void 0===e.componentState?void 0:Ut({},e.componentState);const l=i.constructor;if(void 0!==l)a=new l(t,r,s);else{const e=i.factoryFunction;if(void 0===e)throw new X("LMBCFFU10008");a=e(t,r,s)}if(s){if(void 0===a)throw new J("GLBCVCU988774");{const e=a,i=e.rootHtmlElement;if(void 0===i)throw new Z(`${tt[5]}: ${n}`);!function(t){const e="absolute";t.style.position!==e&&(t.style.position=e)}(i),this.container.appendChild(i),this._virtuableComponentMap.set(t,e),t.virtualRectingRequiredEvent=this._containerVirtualRectingRequiredEventListener,t.virtualVisibilityChangeRequiredEvent=this._containerVirtualVisibilityChangeRequiredEventListener,t.virtualZIndexChangeRequiredEvent=this._containerVirtualZIndexChangeRequiredEventListener}}this._registeredComponentMap.set(t,a),o={virtual:i.virtual,component:a}}else o=super.bindComponent(t,e);return o}unbindComponent(t,e,i){if(void 0===this._registeredComponentMap.get(t))super.unbindComponent(t,e,i);else{const e=this._virtuableComponentMap.get(t);if(void 0!==e){const i=e.rootHtmlElement;if(void 0===i)throw new X("GLUC77743",t.title);this.container.removeChild(i),this._virtuableComponentMap.delete(t)}}}fireBeforeVirtualRectingEvent(t){this._goldenLayoutBoundingClientRect=this.container.getBoundingClientRect(),super.fireBeforeVirtualRectingEvent(t)}handleContainerVirtualRectingRequiredEvent(t,e,i){const n=this._virtuableComponentMap.get(t);if(void 0===n)throw new J("GLHCSCE55933");{const o=n.rootHtmlElement;if(void 0===o)throw new Z(tt[4]+" "+t.title);{const n=t.element.getBoundingClientRect(),s=n.left-this._goldenLayoutBoundingClientRect.left;o.style.left=zt(s);const r=n.top-this._goldenLayoutBoundingClientRect.top;o.style.top=zt(r),Tt(o,e),At(o,i)}}}handleContainerVirtualVisibilityChangeRequiredEvent(t,e){const i=this._virtuableComponentMap.get(t);if(void 0===i)throw new J("GLHCVVCRE55934");{const n=i.rootHtmlElement;if(void 0===n)throw new Z(tt[4]+" "+t.title);Dt(n,e)}}handleContainerVirtualZIndexChangeRequiredEvent(t,e,i){const n=this._virtuableComponentMap.get(t);if(void 0===n)throw new J("GLHCVZICRE55935");{const e=n.rootHtmlElement;if(void 0===e)throw new Z(tt[4]+" "+t.title);e.style.zIndex=i}}}const de="initial_",ce={show:"top",popout:!1,maximise:!1,close:"close-tab-unused"},me={headerHeight:31},ue={hasHeaders:!0,reorderEnabled:!0},pe={popoutWholeStack:!1,constrainDragToContainer:!1,constrainDragToHeaders:!1,preventDragout:!1,showMaximiseIcon:!1,showPopoutIcon:!1,showCloseIcon:!1,blockedPopoutsThrowError:!0,closePopoutsOnUnload:!0,selectionEnabled:!1};var ge,fe;class ve{constructor(e){this.layout=e,ge.set(this,void 0),fe.set(this,void 0),this.handleResize=t=>{t.forEach((t=>this.resizeElement(t.target)))},this.handleMutation=()=>{this.layout.viewComponentsByContainerElement.forEach((t=>{this.resizeElement(t.container.element)}))},t.__classPrivateFieldSet(this,ge,new ResizeObserver(this.handleResize),"f"),t.__classPrivateFieldSet(this,fe,new MutationObserver(this.handleMutation),"f")}observeMutations(e){t.__classPrivateFieldGet(this,fe,"f")?.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["class"]})}destroy(){t.__classPrivateFieldGet(this,ge,"f").disconnect(),t.__classPrivateFieldGet(this,fe,"f").disconnect()}observeContainer(e){t.__classPrivateFieldGet(this,ge,"f").observe(e)}unobserveContainer(e){t.__classPrivateFieldGet(this,ge,"f").unobserve(e)}resizeElement(t){const e=this.layout.viewComponentsByContainerElement.get(t);e&&e.resize()}}ge=new WeakMap,fe=new WeakMap;var _e={};Object.defineProperty(_e,"__esModule",{value:!0});var ye=_e.BaseItem=void 0;class Ce{constructor(t,e,i){this._item=t,this._layout=e,this._wrap=i}get raw(){return this._item}get layout(){return this._layout}get type(){return this._item.type}get contentItems(){return(this._item.contentItems??[]).map((t=>this._wrap(t)))}get parent(){const t=this._item.parent;return t?this._wrap(t):null}setActiveContentItem(t,e){if("stack"!==this.type)throw new Error(`Cannot call setActiveContentItem from a non-stack item: ${this.type}`);this._item.setActiveContentItem(t.raw,e)}static wrapInternal(t,e,i){const n=Ce.wrapCache.get(e);if(n)return n;const o=new t(e,i,(e=>Ce.wrapInternal(t,e,i)));return Ce.wrapCache.set(e,o),o}}ye=_e.BaseItem=Ce,Ce.wrapCache=new WeakMap;const we=t=>!!t&&"contentItems"in t&&(t.isRow||t.isColumn);class Ie extends ye{isRoot(){return!!this._item.parent?.isGround}getBounds(){return this._item.element.getBoundingClientRect()}get viewName(){if(this._item.isComponent){const{component:t}=this._item;return t.identity.name}throw new Error("View name not found")}onDestroyed(t){const e=({target:i})=>{i===this._item&&(t(),this._item.off("itemDestroyed",e))};this._item.on("itemDestroyed",e)}createAdjacentStack({position:t="right"}={}){const e=this.raw;if(ee.isStack(e)&&e.parent){const i=["top","bottom"].includes(t)?"column":"row",n=["left","top"].includes(t)?1:0,o=we(e.parent)?e.parent:e.layoutManager,s=o,r=e.parent.contentItems.indexOf(e);e.parent.isGround&&e.parent.removeChild(e,!0);const a=o.newItem({type:i,content:[{type:"stack",content:[]}]},r);if(!a)throw new Error("createAdjacentStack: Failed to create new container");const l=a.contentItems[0];return a.addChild(this.raw,n),we(s)&&s.removeChild(e,!0),this._wrap(l)}throw new Error(`Cannot creat adjacent stacks for type: ${e.type}, must be type 'stack'`)}setActiveContentItem(t,e=!0){if(!ee.isStack(this._item))throw new Error(`Cannot call setActiveContentItem from a non-stack item: ${this.type}`);this._item.setActiveComponentItem(t.raw,!e)}static wrap(t,e){return ye.wrapInternal(Ie,t,e)}}function be(t=[],e){for(const i of t)"component"===i.type?Object.keys(e).forEach((t=>{t in i&&(i.componentState={[`${de}${t}`]:i[t],...i.componentState}),i[t]=e[t]})):be(i.content,e)}function Se(t=[],e,i){for(const n of t)if("component"===n.type)Object.keys(e).forEach((t=>{if(`${de}${t}`in n.componentState)return n[t]=n.componentState[`${de}${t}`],void delete n.componentState[`${de}${t}`];n[t]=e[t]}));else{if(n.size&&("row"===i||"column"===i)){n["row"===i?"width":"height"]=n.size?.includes(".")?parseFloat(n.size):parseInt(n.size)}Se(n.content,e,n.type)}}function Ee(t){if(t.root){t.root.content&&Se([t.root],{componentName:"view",isClosable:!0});const e=t.root;t.content=[e],delete t.root}return t}const xe=e=>class extends e{connectedCallback(){if(!this.name||!this.uuid)throw new Error(" Name or uuid attribute missing");if(!this.src)throw new Error(" missing 'src' attribute.");this.#t||(this.#t=document.createElement("iframe"),this.#t.src=this.src,this.#t.style.height="100%",this.#t.style.width="100%",this.#t.style.border="none",this.forceFrameName?this.#t.setAttribute("name",this.forceFrameName):this.#t.setAttribute("name",t.encodeOptions({brokerUrl:this.brokerUrl,name:this.name,uuid:this.uuid,providerId:this.providerId,contextGroup:this.contextGroup},"of-frame")),this.#t.setAttribute("id",this.name),this.appendChild(this.#t))}#t;get brokerUrl(){return this.getAttribute("of-broker")}set brokerUrl(t){t&&this.setAttribute("of-broker",t)}get name(){return this.getAttribute("of-name")}set name(t){t&&this.setAttribute("of-name",t)}get forceFrameName(){return this.getAttribute("forceFrameName")}set forceFrameName(t){t&&this.setAttribute("forceFrameName",t)}get uuid(){return this.getAttribute("of-uuid")}set uuid(t){t&&this.setAttribute("of-uuid",t)}get src(){return this.getAttribute("src")}set src(t){t&&this.setAttribute("src",t)}get providerId(){return this.getAttribute("of-provider-id")}set providerId(t){t&&this.setAttribute("of-provider-id",t)}get contextGroup(){return this.getAttribute("of-context-group")}set contextGroup(t){t&&this.setAttribute("of-context-group",t)}static get observedAttributes(){return["name"]}};class Le{static create(t){const e=document.createElement("of-view");return Object.entries(t).forEach((([t,i])=>{e.setAttribute(t,i)})),e}}customElements.define("of-view",xe(HTMLElement));class ze{constructor(t,i,n,{brokerUrl:o,interopConfig:s},r){this.container=t,this.config=i,this.ofView=null,this.isDragging=()=>this.container.tab.element?.className.includes("lm_dragging")??!1;const{url:a,web:l,interop:h,name:d}=i||{},c=d??`internal-generated-view-${e.v4()}`;if(this.identity={uuid:n,name:c},this.container.element.setAttribute("of-name",c),this.container.element.id=`container-${c}`,this.container.parent.id=c,void 0===a)return void this.handleUrlMissing();const m=this.updateTitleIfNotSet(a),u={"of-broker":o,"of-uuid":n,"of-name":c,src:a};l?.frameName&&(u.forceFrameName=l.frameName);const p=h?.currentContextGroup??s?.currentContextGroup;p&&(u["of-context-group"]=p),s?.providerId&&(u["of-provider-id"]=s?.providerId),this.ofView=Le.create(u),this.ofView.title=m??`Iframe: ${a}`,r.appendChild(this.ofView),this.ofView.style.position="absolute"}updateTitleIfNotSet(t){return"view"===this.container.parent.title&&this.container.parent.setTitle(t),this.container.parent.title}handleUrlMissing(){const t=document.createElement("div");t.setAttribute("style","padding: 20px");t.innerText="No URL provided",this.container.element.appendChild(t)}destroy(){this.ofView?.remove(),this.ofView=null}closeView(){this.container.close()}resize(){if(this.ofView){if(this.isDragging())return void(this.ofView.style.display="none");const t=this.container.element.getBoundingClientRect();this.ofView.style.position="absolute",this.ofView.style.height=`${t.height}px`,this.ofView.style.width=`${t.width}px`,this.ofView.style.inset=`${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`,this.ofView.style.display="block"}}}class Me extends U{static overrideConfig(t){const e={...ue,...t.settings,...pe};return e.reorderEnabled?be(t.content,{isClosable:!0}):be(t.content,{reorderEnabled:!1}),{dimensions:me,...t,settings:e,header:{...ce,show:!1!==t.settings?.hasHeaders&&ce.show}}}constructor(t,e,i,{options:n},o,s){super(),this.identity=t,this.container=e,this.initialConfig=i,this.layoutManager=o,this.platformProvider=s,this.viewComponentsByContainerElement=new Map,this.layoutContentCache=_.getSingleInstance(),this.reparentingViews=new Set,this.goldenLayoutDestroyed=!1,this.createViewComponent=(t,e)=>{m.handleSharedView(this.layoutManager,this.identity,e);const i=new ze(t,e,this.identity.uuid,this.options,this.iframeContainer);return e&&!1===e[`${de}isClosable`]&&this.stylesheet.insertRule(`#tab-${i.identity.name} .lm_close_tab { display: none; }`),this.viewComponentsByContainerElement.set(t.element,i),this.resizeController.observeContainer(t.element),i},this.iframeContainer=document.createElement("div"),this.iframeContainer.id=`openfin-layout-iframe-container-${this.identity.layoutName}`,this.domEmitter=new V(e),this.setupStylesheets(),this.layout=new he(this.container),this.layout.resizeWithContainerAutomatically=!0,this.options=n,this.layout.registerComponent("view",this.createViewComponent),this.setupListeners(),this.resizeController=new ve(this),this.layout.loadLayout(Me.overrideConfig(i));const r=document.createElement("div");r.id=`openfin-layout-shadow-container-${this.identity.layoutName}`,r.attachShadow({mode:"open",delegatesFocus:!1}).appendChild(this.iframeContainer),this.container.appendChild(r),this.resizeController.observeMutations(this.container)}getStackByView({name:t}){const e=this.layout.findFirstComponentItemById(t);if(e?.parent&&e?.parent?.isStack)return Ie.wrap(e.parent,this)}getRoot(){return Ie.wrap(this.layout.rootItem,this)}async platformCloseView(t){const e=[...this.viewComponentsByContainerElement.values()].find((e=>e.identity.name===t.name));if(!e)throw new Error(`View with name: ${t.name} not found in layout.`);e.closeView()}async platformCreateView(t,{location:e,targetView:i}={}){if(i)throw new Error("TargetView not supported in web");const n={options:this.platformProvider.normalizeOptions(t),target:this.identity,location:e};return this.insertView(n)}setupStylesheets(){if(this.container.setAttribute("data-openfin-layout-name",this.identity.layoutName),this.stylesheet=new CSSStyleSheet,this.stylesheet.insertRule(".lm_close { display: none; }"),document.adoptedStyleSheets.push(this.stylesheet),this.initialConfig.settings?.preventSplitterResize){const t=`\n [data-openfin-layout-name='${this.identity.layoutName}'] .lm_splitter {\n pointer-events: none;\n }`;this.stylesheet.insertRule(t)}}insertView({options:t,location:e,targetView:i}){const n=e?this.layoutContentCache.getItemOrUndefined(e.id):void 0,o=i?this.layoutContentCache.getItemOrUndefined(i.name):void 0,s=n??o??Ie.wrap(this.layout.rootItem,this);let r;if(ee.isStack(s.raw))r=s.raw;else{if(!we(s.raw))throw new Error("Cannot add a view at the requested location");r=s.raw.newItem({type:"stack",content:[]})}const a=Math.min(r.contentItems.length,e?.index??r.contentItems.length);let l=this.layout.findFirstComponentItemById(t.name);l?(l.parent&&l.parent.removeChild(l,!0),r.addChild(l,a)):l=r.newComponent("view",t,t.title??t.url??"Default Title",a);const h=l.component.identity;return Promise.resolve({identity:h})}replaceView({viewToReplace:t,newView:e}){throw new Error("Method not implemented.")}replaceLayout(t){throw new Error("Method not implemented.")}async cleanupView(t){}applyPreset(t){throw new Error("Method not implemented.")}getCurrentViews(){return[...this.viewComponentsByContainerElement.values()].map((t=>t.identity))}async getFrameSnapshot(){return Ee(xt.fromResolved(this.layout.toConfig()))}isVisible(){return W(this.container)}async onViewDetached({viewIdentity:t}){this.reparentingViews.add(t.name),this.platformCloseView(t)}async destroy(){this.goldenLayoutDestroyed||(this.goldenLayoutDestroyed=!0,this.layout.destroy()),this.iframeContainer.remove(),this.resizeController.destroy(),document.adoptedStyleSheets=document.adoptedStyleSheets.filter((t=>t!==this.stylesheet)),this.viewComponentsByContainerElement.clear()}setupListeners(){this.container.addEventListener("pointerdown",(t=>{if(t.target instanceof HTMLElement){const e=t.target.classList;["lm_tab","lm_title","lm_splitter","lm_drag_handle"].some((t=>e.contains(t)))&&(this.handleDragStart(),2===t.button&&t.stopPropagation())}}),!0),document.addEventListener("pointerup",(()=>this.handleDragEnd()),!0),this.layout.on("tabCreated",(t=>{const e=t.componentItem.component;t.element.id=`tab-${e.identity.name}`,this.domEmitter.dispatchLocalEvent("tab-created",e.identity)})),this.layout.on("itemCreated",(({target:t})=>{const e=t;if(Gt.isComponentItem(e)){const t=e.component;this.domEmitter.dispatchLocalEvent("container-created",t.identity)}})),this.layout.on("itemDestroyed",(t=>{const e=t.target;if(Gt.isComponentItem(e)){const t=e.component;this.removeViewComponent(t)}})),this.layout.on("itemDropped",(()=>{this.handleDragEnd()}))}handleDragStart(){this.iframeContainer.style.pointerEvents="none"}handleDragEnd(){this.iframeContainer.style.pointerEvents=""}removeViewComponent(t){if(t.config&&!1===t.config[`${de}isClosable`]){const e=[...this.stylesheet.cssRules].findIndex((e=>e.cssText.includes(`#tab-${t.identity.name}`)));this.stylesheet.deleteRule(e)}t.destroy(),this.viewComponentsByContainerElement.delete(t.container.element),this.resizeController.unobserveContainer(t.container.element),this.reparentingViews.has(t.identity.name)?this.reparentingViews.delete(t.identity.name):this.platformProvider.closeView(t.identity.name);0===this.getCurrentViews().length&&(this.goldenLayoutDestroyed||(this.goldenLayoutDestroyed=!0,m.handleLastViewRemoved(this.layoutManager,this.identity)))}}class Pe{constructor(t,e,i,n){this.windowIdentity=t,this.connectConfig=e,this.provider=i,this.fallbackContainer=n}async createLayout(t,e){if(!("container"in t)&&!this.fallbackContainer)throw new Error("Container property is not optional in web");const{layoutName:i}=t,n=t,o=this.provider.initLayoutViews(n),s=n.container??this.fallbackContainer,r={...this.windowIdentity,layoutName:i},a=new Me(r,s,o,this.connectConfig,e,this.provider);m.registerLayout(e,i,a),this.fallbackContainer=null}async getLayoutSnapshot(t){return t.getLayoutSnapshot()}async handleLastViewRemoved(t){}}class Te{static async init(e){const i=e.getFin().InterApplicationBus.Channel,n=await i.create(`custom-frame-${e.me.uuid}`);return n.setDefaultAction((async(t,{target:e,opts:i},o)=>{const s=n.connections.find((t=>t.name===e.name));if(s)return n.dispatch(s,t,{...i,target:e});throw new Error(`Client with name ${e.name} not found`)})),await t.relayChannelClientApi_1(n,"layout-relay"),new Te(e)}constructor(t){this.wire=t,this.viewNames=new Set}normalizeOptions(t,i="default"){const n=this.wire.me.uuid;let{name:o=`internal-generated-view-${e.v4()}`}=t;return o.match(/^internal-generated-view-/)&&this.viewNames.has(o)&&"duplicate"===i&&(o=`internal-generated-view-${e.v4()}`),this.viewNames.add(o),{...t,name:o,uuid:n}}closeView(t){this.viewNames.delete(t)}initLayoutViews({layout:t,multiInstanceViewBehavior:e}){return H((t=>{if("component"===t.type&&t.componentState){const i=this.normalizeOptions(t.componentState,e);return{...t,componentState:i}}return t}),t)}}var Ae;const ke=t=>t;Ae=new WeakMap,exports.WebLayoutEntryPoint=class{constructor(e){Ae.set(this,void 0),this.initLayoutManager=async(e,i,{container:n,layoutManagerOverride:o})=>{const s=await Te.init(i),r=o??ke,a=new Pe(i.me,t.__classPrivateFieldGet(this,Ae,"f"),s,n),l=new(r(m.createClosedConstructor(a)));return await M(i,l),l},this.applyLayoutSnapshot=async(e,i,n)=>{await i.applyLayoutSnapshot(t.__classPrivateFieldGet(this,Ae,"f").platform.layoutSnapshot)},this.createLayout=async(t,e)=>m.createLayout(t,e),this.destroyLayout=async(t,e)=>m.destroyLayout(t,e),t.__classPrivateFieldSet(this,Ae,e,"f")}}; @@ -8269,7 +8269,7 @@ function version(uuid) { /******/ /************************************************************************/ var __webpack_exports__ = {}; -// This entry need to be wrapped in an IIFE because it need to be in strict mode. +// This entry needs to be wrapped in an IIFE because it needs to be in strict mode. (() => { "use strict"; var exports = __webpack_exports__; @@ -8278,7 +8278,7 @@ var exports = __webpack_exports__; \********************************/ Object.defineProperty(exports, "__esModule", ({ value: true })); -const core_web_1 = __webpack_require__(/*! @openfin/core-web */ "./node_modules/@openfin/core-web/out/api-client.js"); +const core_web_1 = __webpack_require__(/*! @openfin/core-web */ "../../node_modules/@openfin/core-web/out/api-client.js"); /** * Gets the default layout for this app. * @returns The default layout for this app. diff --git a/web/v19.2.0/web-layout-basic/js/provider.bundle.js.map b/web/v19.2.0/web-layout-basic/js/provider.bundle.js.map index fef4193..4507bcf 100644 --- a/web/v19.2.0/web-layout-basic/js/provider.bundle.js.map +++ b/web/v19.2.0/web-layout-basic/js/provider.bundle.js.map @@ -1 +1 @@ -{"version":3,"file":"provider.bundle.js","mappings":";;;;;;;;;;AAAa,MAAM,mBAAO,CAAC,iFAAoB,EAAE,mBAAO,CAAC,mDAAS,EAAE,mBAAO,CAAC,+DAAM,EAAE,mBAAO,CAAC,mDAAQ,EAAE,mBAAO,CAAC,gEAAkB,EAAE,mBAAO,CAAC,4DAAgB,EAAE,eAAe;;;;;;;;;;;;ACA9J,MAAM,mBAAO,CAAC,mDAAS,IAAI,mBAAO,CAAC,mDAAQ,IAAI,mBAAO,CAAC,gEAAkB,IAAI,mBAAO,CAAC,4DAAgB,IAAI,mBAAO,CAAC,+DAAM,EAAE,kBAAkB,EAAE,GAAG,wBAAwB,GAAG,sGAAsG,qBAAM,CAAC,qBAAM,iCAAiC,K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,eAAe,2BAA2B,OAAO,eAAe,sDAAsD,oCAAoC,IAAI,iIAAiI,sBAAsB,yCAAyC,2FAA2F;;;;;;;;;;;;ACFv6nD;;AAEZ,kBAAkB;AAClB,mBAAmB;AACnB,qBAAqB;;AAErB;AACA;AACA;;AAEA;AACA,mCAAmC,SAAS;AAC5C;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,cAAc,SAAS;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,2CAA2C,UAAU;AACrD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;ACrJA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEY;;AAEZ,eAAe,mBAAO,CAAC,wDAAW;AAClC,gBAAgB,mBAAO,CAAC,oDAAS;AACjC;AACA;AACA;AACA;;AAEA,cAAc;AACd,kBAAkB;AAClB,yBAAyB;;AAEzB;AACA,kBAAkB;;AAElB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,kBAAkB,YAAY;AAC9B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA,wCAAwC,SAAS;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;;AAEA;AACA;AACA,cAAc,iBAAiB;AAC/B;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,iDAAiD,EAAE;AACnD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C;AAC1C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA,yBAAyB,eAAe;AACxC;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,yBAAyB,QAAQ;AACjC;AACA,sBAAsB,eAAe;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc,YAAY;AAC1B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB,sBAAsB;AACxC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,mBAAmB;AACnB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA,oBAAoB,SAAS;AAC7B;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA,qBAAqB,WAAW,GAAG,IAAI;AACvC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA,gBAAgB,WAAW,GAAG,IAAI,KAAK,aAAa;AACpD;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;;AAEA;AACA,GAAG;AACH;AACA;AACA,mBAAmB,KAAK,mDAAmD,cAAc;AACzF,GAAG;AACH;AACA;AACA,+BAA+B,IAAI;AACnC;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,MAAM,aAAa,SAAS;AACtD;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,SAAS,gBAAgB;AACzB,cAAc,oBAAoB,EAAE,IAAI;AACxC;AACA,YAAY,gBAAgB,EAAE,IAAI;AAClC;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,GAAG,SAAS,GAAG,KAAK,qBAAqB,EAAE,EAAE;AACpE,QAAQ;AACR,yBAAyB,GAAG,KAAK,yBAAyB,EAAE,EAAE;AAC9D,mBAAmB,yBAAyB,EAAE,EAAE;AAChD;AACA,MAAM;AACN,oBAAoB,IAAI,EAAE,GAAG,SAAS,IAAI,EAAE,EAAE;AAC9C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,0CAA0C,cAAc,SAAS,OAAO;AACxE;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,kBAAkB,YAAY;AAC9B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,kBAAkB,gBAAgB;AAClC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,kBAAkB,gBAAgB;AAClC;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,cAAc,YAAY;AAC1B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,QAAQ;AAC1B;AACA,oBAAoB,QAAQ;AAC5B;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;;;;;ACzjEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEa;;AAEb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB;;AAEnB;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,sBAAsB;AACxC;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA,eAAe;AACf;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA,oBAAoB,SAAS;AAC7B;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;;AAEA,kCAAkC,QAAQ;AAC1C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oBAAoB,iBAAiB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,QAAQ;AACR;AACA,uCAAuC,QAAQ;AAC/C;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,OAAO;AACzB;AACA;AACA;;AAEA;AACA,SAAS,yBAAyB;AAClC;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,gBAAgB;AAClC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,8DAA8D,YAAY;AAC1E;AACA,8DAA8D,YAAY;AAC1E;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,qCAAqC,YAAY;AACjD;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;AACA;;;;;;;;;;;AChfA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,SAAS,WAAW;;AAEpB;AACA;AACA;AACA,SAAS,WAAW;;AAEpB;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA,SAAS,WAAW;;AAEpB;AACA;AACA,SAAS,UAAU;;AAEnB;AACA;;;;;;;;;;;ACpFA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,WAAW,mBAA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O,CAAC,6DAAc;AACtC,kBAAkB,mBAAO,CAAC,+DAAe;AACzC,cAAc,mBAAO,CAAC,uDAAW;AACjC,eAAe,mBAAO,CAAC,yDAAY;AACnC,cAAc,mBAAO,CAAC,yDAAY;AAClC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,SAAS;AACpB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AChDA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACnBA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,UAAU;AACrB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACtBA,sBAAsB,mBAAO,CAAC,yEAAoB;AAClD,SAAS,mBAAO,CAAC,6CAAM;;AAEvB;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC3BA,SAAS,mBAAO,CAAC,6CAAM;;AAEvB;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpBA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,WAAW,mBAAO,CAAC,iDAAQ;;AAE3B;A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AW,mBAAO,CAAC,iDAAQ;AAC3B,aAAa,mBAAO,CAAC,qDAAU;;AAE/B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,SAAS;AACpB;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa,GAAG;AAChB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;AACA,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;;;;;;;;;;ACrKA,eAAe,mBAAO,CAAC,yDAAY;;AAEnC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;;;;;;;;;;AC7BA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,cAAc,mBAAO,CAAC,uDAAW;;AAEjC;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,UAAU;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WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClFA,aAAa,mBAAO,CAAC,uDAAW;AAChC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA,iBAAiB,mBAAO,CAAC,6DAAc;AACvC,eAAe,mBAAO,CAAC,2DAAa;AACpC,eAAe,mBAAO,CAAC,yDAAY;AACnC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;AACA;AACA;AACA,oCAAoC;;AAEpC;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC9CA,aAAa,mBAAO,CAAC,uDAAW;AAChC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,eAAe,mBAAO,CAAC,yDAAY;AACnC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC3DA,kBAAkB,mBAAO,CAAC,iEAAgB;AAC1C,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC7BA,eAAe,mBAAO,CAAC,yDAAY;AACnC,kBAAkB,mBAAO,CAAC,iEAAgB;AAC1C,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AChCA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACnBA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,aAAa,UAAU;AACvB;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACbA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACZA,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,aAAa,aAAa;AAC1B;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACfA,WAAW,m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ACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACnFA,aAAa,mBAAO,CAAC,uDAAW;AAChC,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,SAAS,mBAAO,CAAC,6CAAM;AACvB,kBAAkB,mBAAO,CAAC,iEAAgB;AAC1C,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC/GA,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAE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ACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC5EA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,mBAAmB,mBAAO,CAAC,mEAAiB;AAC5C,kBAAkB,mBAAO,CAAC,iEAAgB;;AAE1C;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACxBA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACdA,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACnBA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACZA,mBAAmB,mBAA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ACA;;AAEA;AACA;;AAEA;;;;;;;;;;;ACRA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACbA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;;;;;;;;;;ACjBA,gBAAgB,mBAAO,CAAC,6DAAc;;AAEtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACdA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,GAAG;AAChB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACbA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACbA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,UAAU,mBAAO,CAAC,iDAAQ;AAC1B,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjCA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;;;;;;;;;;;ACzBA,gBAAgB,mBAAO,CAAC,6DAAc;;AAEtC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,GAAG;AAChB;AACA;AACA;AACA,oBAAoB,QAAQ,IAAI,QAAQ;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,kBAAkB;AAClB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpCA,sBAAsB,mBAAO,CAAC,yEAAoB;AAClD,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA,8BAA8B,mBAAmB;AACjD;AACA;AACA;AACA;AACA;AACA,+CAA+C,mBAAmB;AAClE;AACA;AACA;;AAEA;;;;;;;;;;;ACnCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACzBA,iBAAiB,mBAAO,CAAC,6DAAc;AACvC,eAAe,mBAAO,CAAC,yDAAY;;AAEnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AChCA,WAAW,mBAAO,CAAC,mDAAS;AAC5B,gBAAgB,mBAAO,CAAC,2DAAa;;AAErC;AACA,kBAAkB,KAA0B;;AAE5C;AACA,gCAAgC,QAAa;;AAE7C;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACrCA,kBAAkB,mBAAO,CAAC,iEAAgB;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,kBAAkB;AAClB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClCA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,eAAe,mBAAO,CAAC,yDAAY;;AAEnC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpCA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClCA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC1BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC9BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC5BA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC1BA,uBAAuB,mBAAO,CAAC,2EAAqB;AACpD,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC1BA,oBAAoB,mBAAO,CAAC,qEAAkB;AAC9C,eAAe,mBAAO,CAAC,2DAAa;AACpC,kBAAkB,mBAAO,CAAC,+DAAe;;AAEzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpCA,oBAAoB,mBAAO,CAAC,qEAAkB;AAC9C,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,kBAAkB,mBAAO,CAAC,+DAAe;;AAEzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC/BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACjBwC;AACA;AACA;AACA;AACE;AACQ;AACE;AACE;;;;;;;;;;;;;;;;ACPtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD;;AAEnD;;AAEA,oBAAoB,gBAAgB;AACpC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA,kBAAkB,cAAc;AAChC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,kBAAkB,cAAc;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,kBAAkB,aAAa;AAC/B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,iEAAe,GAAG;;;;;;;;;;;;;;;ACtNlB,iEAAe,sCAAsC;;;;;;;;;;;;;;;;ACAhB;;AAErC;AACA,OAAO,wDAAQ;AACf;AACA;;AAEA;AACA,gCAAgC;;AAEhC;AACA;AACA;AACA,qBAAqB;;AAErB;AACA,qBAAqB;;AAErB;AACA,qBAAqB;;AAErB;AACA,qBAAqB;AACrB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,iEAAe,KAAK;;;;;;;;;;;;;;;AClCpB,iEAAe,cAAc,EAAE,UAAU,EAAE,eAAe,EAAE,gBAAgB,EAAE,UAAU,GAAG,yCAAyC;;;;;;;;;;;;;;;ACApI;AACA;AACA;AACA;AACA;AACe;AACf;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;AClBA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,mDAAmD;;AAEnD;;AAEA,oBAAoB,gBAAgB;AACpC;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,mBAAmB,QAAQ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ACJ,IAAI,CAAC,GAAG,EAAE;IACV,OAAO,CAAC,GAAG,CAAC,iCAAiC,CAAC,CAAC;IAC/C,OAAO,IAAI,CAAC;AACb,CAAC,CAAC;KACD,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC","sources":["webpack://openfin-web--web-layout-basic/./node_modules/@openfin/core-web/out/api-client.js","webpack://openfin-web--web-layout-basic/./node_modules/@openfin/core-web/out/main-8cad4070.js","webpack://openfin-web--web-layout-basic/./node_modules/@openfin/core-web/out/main-b14f67c9.js","webpack://openfin-web--web-layout-basic/../../node_modules/base64-js/index.js","webpack://openfin-web--web-layout-basic/../../node_modules/buffer/index.js","webpack://openfin-web--web-layout-basic/../../node_modules/events/events.js","webpack://openfin-web--web-layout-basic/../../node_modules/ieee754/index.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_DataView.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_Hash.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_ListCache.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_Map.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_MapCache.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_Promise.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_Set.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_SetCache.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_Stack.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_Symbol.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_Uint8Array.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_WeakMap.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_arrayEach.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_arrayFilter.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_arrayLikeKeys.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_arrayPush.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_arraySome.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_assignValue.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_assocIndexOf.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_baseAssign.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_baseAssignIn.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_baseAssignValue.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_baseClone.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_baseCreate.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_baseGetAllKeys.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_baseGetTag.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_baseIsArguments.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_baseIsEqual.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_baseIsEqualDeep.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_baseIsMap.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_baseIsNative.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_baseIsSet.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_baseIsTypedArray.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_baseKeys.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_baseKeysIn.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_baseTimes.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_baseUnary.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_cacheHas.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_cloneArrayBuffer.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_cloneBuffer.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_cloneDataView.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_cloneRegExp.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_cloneSymbol.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_cloneTypedArray.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_copyArray.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_copyObject.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_copySymbols.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_copySymbolsIn.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_coreJsData.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_defineProperty.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_equalArrays.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_equalByTag.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_equalObjects.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_freeGlobal.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_getAllKeys.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_getAllKeysIn.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_getMapData.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_getNative.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_getPrototype.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_getRawTag.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_getSymbols.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_getSymbolsIn.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_getTag.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_getValue.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_hashClear.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_hashDelete.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_hashGet.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_hashHas.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_hashSet.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_initCloneArray.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_initCloneByTag.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_initCloneObject.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_isIndex.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_isKeyable.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_isMasked.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_isPrototype.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_listCacheClear.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_listCacheDelete.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_listCacheGet.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_listCacheHas.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_listCacheSet.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_mapCacheClear.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_mapCacheDelete.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_mapCacheGet.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_mapCacheHas.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_mapCacheSet.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_mapToArray.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_nativeCreate.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_nativeKeys.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_nativeKeysIn.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_nodeUtil.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_objectToString.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_overArg.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_root.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_setCacheAdd.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_setCacheHas.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_setToArray.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_stackClear.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_stackDelete.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_stackGet.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_stackHas.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_stackSet.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_toSource.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/cloneDeep.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/eq.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/isArguments.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/isArray.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/isArrayLike.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/isBuffer.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/isEqual.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/isFunction.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/isLength.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/isMap.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/isObject.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/isObjectLike.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/isSet.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/isTypedArray.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/keys.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/keysIn.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/stubArray.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/stubFalse.js","webpack://openfin-web--web-layout-basic/../../node_modules/uuid/dist/esm-browser/index.js","webpack://openfin-web--web-layout-basic/../../node_modules/uuid/dist/esm-browser/md5.js","webpack://openfin-web--web-layout-basic/../../node_modules/uuid/dist/esm-browser/nil.js","webpack://openfin-web--web-layout-basic/../../node_modules/uuid/dist/esm-browser/parse.js","webpack://openfin-web--web-layout-basic/../../node_modules/uuid/dist/esm-browser/regex.js","webpack://openfin-web--web-layout-basic/../../node_modules/uuid/dist/esm-browser/rng.js","webpack://openfin-web--web-layout-basic/../../node_modules/uuid/dist/esm-browser/sha1.js","webpack://openfin-web--web-layout-basic/../../node_modules/uuid/dist/esm-browser/stringify.js","webpack://openfin-web--web-layout-basic/../../node_modules/uuid/dist/esm-browser/v1.js","webpack://openfin-web--web-layout-basic/../../node_modules/uuid/dist/esm-browser/v3.js","webpack://openfin-web--web-layout-basic/../../node_modules/uuid/dist/esm-browser/v35.js","webpack://openfin-web--web-layout-basic/../../node_modules/uuid/dist/esm-browser/v4.js","webpack://openfin-web--web-layout-basic/../../node_modules/uuid/dist/esm-browser/v5.js","webpack://openfin-web--web-layout-basic/../../node_modules/uuid/dist/esm-browser/validate.js","webpack://openfin-web--web-layout-basic/../../node_modules/uuid/dist/esm-browser/version.js","webpack://openfin-web--web-layout-basic/webpack/bootstrap","webpack://openfin-web--web-layout-basic/webpack/runtime/define property getters","webpack://openfin-web--web-layout-basic/webpack/runtime/global","webpack://openfin-web--web-layout-basic/webpack/runtime/hasOwnProperty shorthand","webpack://openfin-web--web-layout-basic/webpack/runtime/make namespace object","webpack://openfin-web--web-layout-basic/webpack/runtime/node module decorator","webpack://openfin-web--web-layout-basic/./client/src/provider.ts"],"sourcesContent":["\"use strict\";var e=require(\"./main-8cad4070.js\");require(\"buffer/\"),require(\"uuid\"),require(\"events\"),require(\"lodash/cloneDeep\"),require(\"lodash/isEqual\"),exports.connect=e.connect;\n","\"use strict\";var e=require(\"buffer/\"),t=require(\"events\"),n=require(\"lodash/cloneDeep\"),i=require(\"lodash/isEqual\"),r=require(\"uuid\");const o=(e,t)=>`${t}<${btoa(JSON.stringify(e))}>`;var s=\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof window?window:\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:{},a={},c={},d={},h={};async function l(e){const t=[];for(const n of e){const e=await n();t.push(e)}return t}Object.defineProperty(h,\"__esModule\",{value:!0}),h.promiseMapSerial=h.serial=h.promiseMap=h.promisify=void 0,h.promisify=function(e){return(...t)=>new Promise(((n,i)=>{e(...t,((e,t)=>e?i(e):n(t)))}))},h.promiseMap=async function(e,t){return Promise.all(e.map(t))},h.serial=l,h.promiseMapSerial=async function(e,t){return l(e.map(((e,n,i)=>()=>t(e,n,i))))};var u,p=s&&s.__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},w=s&&s.__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)};Object.defineProperty(d,\"__esModule\",{value:!0}),d.Reply=d.EmitterBase=d.Base=void 0;const y=h;class f{constructor(e){this.isNodeEnvironment=()=>\"node\"===this.wire.environment.type,this.isOpenFinEnvironment=()=>\"openfin\"===this.wire.environment.type,this.isBrowserEnvironment=()=>\"other\"===this.wire.environment.type,this.wire=e}get fin(){return this.wire.getFin()}get me(){return this.wire.me}}d.Base=f;d.EmitterBase=class extends f{constructor(e,t,...n){super(e),this.topic=t,u.set(this,void 0),this.eventNames=()=>this.hasEmitter()?this.getOrCreateEmitter().eventNames():[],this.emit=(e,t,...n)=>!!this.hasEmitter()&&this.getOrCreateEmitter().emit(e,t,...n),this.hasEmitter=()=>this.wire.eventAggregator.has(w(this,u,\"f\")),this.getOrCreateEmitter=()=>this.wire.eventAggregator.getOrCreate(w(this,u,\"f\")),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[],this.listenerCount=e=>this.hasEmitter()?this.getOrCreateEmitter().listenerCount(e):0,this.registerEventListener=async(e,t={},n,i)=>{const r={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e},o=this.getOrCreateEmitter();n(o);try{await this.wire.sendAction(\"subscribe-to-desktop-event\",r)}catch(e){throw i(o),this.deleteEmitterIfNothingRegistered(o),e}},this.deregisterEventListener=async(e,t={})=>{if(this.hasEmitter()){const n={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e};await this.wire.sendAction(\"unsubscribe-to-desktop-event\",n).catch((()=>null));return this.getOrCreateEmitter()}return Promise.resolve()},p(this,u,[t,...n],\"f\"),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[]}async on(e,t,n){return await this.registerEventListener(e,n,(n=>{n.on(e,t)}),(n=>{n.removeListener(e,t)})),this}async addListener(e,t,n){return this.on(e,t,n)}async once(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.once(e,i),n.once(e,t)}),(n=>{n.removeListener(e,i),n.removeListener(e,t)})),this}async prependListener(e,t,n){return await this.registerEventListener(e,n,(n=>{n.prependListener(e,t)}),(n=>{n.removeListener(e,t)})),this}async prependOnceListener(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.prependOnceListener(e,t),n.once(e,i)}),(n=>{n.removeListener(e,t),n.removeListener(e,i)})),this}async removeListener(e,t,n){const i=await this.deregisterEventListener(e,n);return i&&(i.removeListener(e,t),this.deleteEmitterIfNothingRegistered(i)),this}async deregisterAllListeners(e){const t={...this.identity,type:e,topic:this.topic};if(this.hasEmitter()){const e=this.getOrCreateEmitter(),n=e.listenerCount(t.type),i=[];for(let e=0;enull)));return await Promise.all(i),e}}async removeAllListeners(e){const t=async e=>{const t=await this.deregisterAllListeners(e);t&&(t.removeAllListeners(e),this.deleteEmitterIfNothingRegistered(t))};if(e)await t(e);else if(this.hasEmitter()){const e=this.getOrCreateEmitter().eventNames();await(0,y.promiseMap)(e,t)}return this}deleteEmitterIfNothingRegistered(e){0===e.eventNames().length&&this.wire.eventAggregator.delete(w(this,u,\"f\"))}},u=new WeakMap;d.Reply=class{};var g={};Object.defineProperty(g,\"__esModule\",{value:!0});var m=g.RuntimeError=g.NotSupportedError=g.NotImplementedError=g.NoAckError=g.DuplicateCorrelationError=g.UnexpectedActionError=g.DisconnectedError=void 0;class v extends Error{constructor(e){super(`Expected websocket state OPEN but found ${e}`),this.readyState=e}}g.DisconnectedError=v;class C extends Error{}g.UnexpectedActionError=C;class b extends Error{}g.DuplicateCorrelationError=b;class I extends Error{}g.NoAckError=I;class E extends Error{}g.NotImplementedError=E;class x extends Error{}g.NotSupportedError=x;class A extends Error{constructor(e){const{message:t,name:n,stack:i,...r}=e;super(t),this.name=n||\"Error\",this.stack=i??this.toString(),Object.keys(r).forEach((e=>{this[e]=r[e]}))}}class P extends Error{static getCallSite(e=0){const t=Error.stackTraceLimit,n=e+1;Error.stackTraceLimit=t+n;const i=Error.prepareStackTrace;Error.prepareStackTrace=(e,t)=>t;const r=(new Error).stack?.slice(n)??[];return Error.prepareStackTrace=i,Error.stackTraceLimit=t,r}static prepareStackTrace(e,t){if(\"function\"==typeof Error.prepareStackTrace)return Error.prepareStackTrace(e,t);let n=\"\";n+=e.name||\"Error\",n+=`: ${e.message||\"\"}`;for(const e of t)n+=`\\n at ${e.toString()}`;return n}constructor(e,t){const{reason:n,error:i}=e;super(n),this.name=\"RuntimeError\",i?.stack&&(this.cause=new A(i)),t&&(this.stack=P.prepareStackTrace(this,t))}}m=g.RuntimeError=P;var M={},_={},O={};Object.defineProperty(O,\"__esModule\",{value:!0}),O.validateIdentity=void 0,O.validateIdentity=function(e){let t;return\"object\"==typeof e&&\"string\"==typeof e.uuid||(t=\"Not a valid identity object\"),t};var S={},R={},F={},j={},k={},L={},T={};Object.defineProperty(T,\"__esModule\",{value:!0}),T.handleDeprecatedWarnings=void 0;var $;T.handleDeprecatedWarnings=e=>{(e.contentNavigation?.whitelist||e.contentNavigation?.blacklist||e.contentRedirect?.whitelist||e.contentRedirect?.blacklist)&&console.warn(\"The properties 'whitelist' and 'blacklist' have been marked as deprecated and will be removed in a future version. Please use 'allowlist' and 'denylist'.\")};var B={},G={};Object.defineProperty(G,\"__esModule\",{value:!0}),G.AsyncRetryableLazy=W=G.Lazy=void 0;var W=G.Lazy=class{constructor(e){this.producerFn=e}getValue(){return this.value||(this.value=this.producerFn()),this.value}};G.AsyncRetryableLazy=class{constructor(e){this.producerFn=e}async getValue(){return this.promise||(this.promise=this.producerFn().catch((e=>{throw delete this.promise,e}))),this.promise}};var H={};Object.defineProperty(H,\"__esModule\",{value:!0}),H.WebContents=void 0;const N=d;class D extends N.EmitterBase{constructor(e,t,n){super(e,n,t.uuid,t.name),this.identity=t,this.entityType=n}capturePage(e){return this.wire.sendAction(\"capture-page\",{options:e,...this.identity}).then((({payload:e})=>e.data))}executeJavaScript(e){return this.wire.sendAction(\"execute-javascript-in-window\",{...this.identity,code:e}).then((({payload:e})=>e.data))}getZoomLevel(){return this.wire.sendAction(\"get-zoom-level\",this.identity).then((({payload:e})=>e.data))}setZoomLevel(e){return this.wire.sendAction(\"set-zoom-level\",{...this.identity,level:e}).then((()=>{}))}navigate(e){return this.wire.sendAction(\"navigate-window\",{...this.identity,url:e}).then((()=>{}))}navigateBack(){return this.wire.sendAction(\"navigate-window-back\",{...this.identity}).then((()=>{}))}async navigateForward(){await this.wire.sendAction(\"navigate-window-forward\",{...this.identity})}stopNavigation(){return this.wire.sendAction(\"stop-window-navigation\",{...this.identity}).then((()=>{}))}reload(e=!1){return this.wire.sendAction(\"reload-window\",{ignoreCache:e,...this.identity}).then((()=>{}))}print(e={}){return this.wire.sendAction(\"print\",{...this.identity,options:e}).then((()=>{}))}findInPage(e,t){return this.wire.sendAction(\"find-in-page\",{...this.identity,searchTerm:e,options:t}).then((({payload:e})=>e.data))}stopFindInPage(e){return this.wire.sendAction(\"stop-find-in-page\",{...this.identity,action:e}).then((()=>{}))}getPrinters(){return this.wire.sendAction(\"get-printers\",{...this.identity}).then((({payload:e})=>e.data))}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){await this.wire.sendAction(\"focus-window\",{emitSynthFocused:e,...this.identity})}async showDeveloperTools(){await this.wire.sendAction(\"show-developer-tools\",this.identity)}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction(\"get-process-info\",this.identity);return e}async getSharedWorkers(){return this.wire.sendAction(\"get-shared-workers\",this.identity).then((({payload:e})=>e.data))}async inspectSharedWorker(){await this.wire.sendAction(\"inspect-shared-worker\",{...this.identity})}async inspectSharedWorkerById(e){await this.wire.sendAction(\"inspect-shared-worker-by-id\",{...this.identity,workerId:e})}async inspectServiceWorker(){await this.wire.sendAction(\"inspect-service-worker\",{...this.identity})}async showPopupWindow(e){if(this.wire.sendAction(`${this.entityType}-show-popup-window`,this.identity).catch((()=>{})),e?.onPopupReady){const t=async({popupName:t})=>{try{const n=this.fin.Window.wrapSync({uuid:this.fin.me.uuid,name:t});await e.onPopupReady(n)}catch(e){throw new Error(`Something went wrong during onPopupReady execution: ${e}`)}};await this.once(\"popup-ready\",t)}const{payload:t}=await this.wire.sendAction(\"try-create-popup-window\",{options:{...e,hasResultCallback:!!e?.onPopupResult,hasReadyCallback:!!e?.onPopupReady},...this.identity}),{data:{willOpen:n,options:i}}=t;n&&await this.fin.Window.create(i.initialOptions);if(e?.onPopupResult){const t=async t=>{await e.onPopupResult((e=>{const{name:t,uuid:n,result:i,data:r}=e,o={identity:{name:t,uuid:n},result:i};return r&&(o.data=r),o})(t))},n=async()=>{await this.removeListener(\"popup-result\",t)};await this.on(\"popup-result\",t),await this.once(\"popup-teardown\",n)}const{payload:r}=await this.wire.sendAction(\"show-popup-window\",{options:i,...this.identity});return r.data}}var U,V,z,K,q;function J(){return V||(V=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(function(){if($)return L;$=1,Object.defineProperty(L,\"__esModule\",{value:!0}),L.ViewModule=void 0;const e=d,t=O,n=J(),i=T;class r extends e.Base{async create(e){const{uuid:t}=this.wire.me;if(!e.name||\"string\"!=typeof e.name)throw new Error(\"Please provide a name property as a string in order to create a View.\");return(0,i.handleDeprecatedWarnings)(e),this.wire.environment.childViews?await this.wire.environment.createChildContent({entityType:\"view\",options:{...e,uuid:t}}):await this.wire.sendAction(\"create-view\",{...e,uuid:t}),this.wrapSync({uuid:t,name:e.name})}async wrap(e){this.wire.sendAction(\"view-wrap\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}wrapSync(e){this.wire.sendAction(\"view-wrap-sync\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}getCurrent(){if(this.wire.sendAction(\"view-get-current\").catch((e=>{})),!this.wire.me.isView)throw new Error(\"You are not in a View context\");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction(\"view-get-current-sync\").catch((e=>{})),!this.wire.me.isView)throw new Error(\"You are not in a View context\");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return L.ViewModule=r,L}(),e),n(function(){if(U)return B;var e;U=1,Object.defineProperty(B,\"__esModule\",{value:!0}),B.View=void 0;const t=g,n=G,i=H,r=ie();class o extends i.WebContents{constructor(i,o){super(i,o,\"view\"),this.identity=o,e.set(this,new n.Lazy((()=>this.fin.Platform.wrapSync(this.identity).getClient()))),this.attach=async e=>{await this.wire.sendAction(\"attach-view\",{target:e,...this.identity})},this.destroy=async()=>{await this.wire.sendAction(\"destroy-view\",{...this.identity})},this.show=async()=>{await this.wire.sendAction(\"show-view\",{...this.identity})},this.showAt=async(e,t={})=>{await this.wire.sendAction(\"show-view-at\",{bounds:e,...this.identity,options:t})},this.bringToFront=async()=>{await this.wire.sendAction(\"bring-view-to-front\",{...this.identity})},this.hide=async()=>{await this.wire.sendAction(\"hide-view\",{...this.identity})},this.setBounds=async e=>{await this.wire.sendAction(\"set-view-bounds\",{bounds:e,...this.identity})},this.getBounds=async()=>(await this.wire.sendAction(\"get-view-bounds\",{...this.identity})).payload.data,this.getInfo=async()=>(await this.wire.sendAction(\"get-view-info\",{...this.identity})).payload.data,this.getParentLayout=async()=>(this.wire.sendAction(\"view-get-parent-layout\",{...this.identity}).catch((()=>{})),this.fin.Platform.Layout.getLayoutByViewIdentity(this.identity)),this.getOptions=async()=>this.wire.sendAction(\"get-view-options\",{...this.identity}).then((({payload:e})=>e.data)),this.updateOptions=async e=>this.wire.sendAction(\"update-view-options\",{options:e,...this.identity}).then((()=>{})),this.getCurrentWindow=async()=>{const{payload:{data:e}}=await this.wire.sendAction(\"get-view-window\",{...this.identity});return new r._Window(this.wire,e)},this.getCurrentStack=async()=>{this.wire.sendAction(\"view-get-current-stack\").catch((()=>{}));try{return(await this.getParentLayout()).getStackByViewIdentity(this.identity)}catch(e){throw new t.RuntimeError({reason:\"This view does not belong to a stack.\",error:e})}},this.triggerBeforeUnload=async()=>(await this.wire.sendAction(\"trigger-before-unload\",{...this.identity})).payload.data,this.bindToElement=async e=>{if(!e)throw new Error(\"Element not found.\");return this.wire.environment.observeBounds(e,(async e=>this.setBounds(e)))}}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){const t=await this.getCurrentWindow();await t.focusedWebViewWasChanged(),await super.focus({emitSynthFocused:e})}}return B.View=o,e=new WeakMap,B}(),e)}(k)),k}function Y(){if(z)return j;z=1,Object.defineProperty(j,\"__esModule\",{value:!0}),j.Application=void 0;const e=d,t=ie(),n=J();class i extends e.EmitterBase{constructor(e,n){super(e,\"application\",n.uuid),this.identity=n,this.window=new t._Window(this.wire,{uuid:this.identity.uuid,name:this.identity.uuid})}windowListFromIdentityList(e){const n=[];return e.forEach((e=>{n.push(new t._Window(this.wire,{uuid:e.uuid,name:e.name}))})),n}isRunning(){return this.wire.sendAction(\"is-application-running\",this.identity).then((({payload:e})=>e.data))}async quit(e=!1){try{await this._close(e),await this.wire.sendAction(\"destroy-application\",{force:e,...this.identity})}catch(e){if(![\"Remote connection has closed\",\"Could not locate the requested application\"].some((t=>e.message.includes(t))))throw e}}async _close(e=!1){try{await this.wire.sendAction(\"close-application\",{force:e,...this.identity})}catch(e){if(!e.message.includes(\"Remote connection has closed\"))throw e}}close(e=!1){return console.warn(\"Deprecation Warning: Application.close is deprecated Please use Application.quit\"),this.wire.sendAction(\"application-close\",this.identity).catch((e=>{})),this._close(e)}getChildWindows(){return this.wire.sendAction(\"get-child-windows\",this.identity).then((({payload:e})=>{const t=[];return e.data.forEach((e=>{t.push({uuid:this.identity.uuid,name:e})})),this.windowListFromIdentityList(t)}))}getManifest(){return this.wire.sendAction(\"get-application-manifest\",this.identity).then((({payload:e})=>e.data))}getParentUuid(){return this.wire.sendAction(\"get-parent-application\",this.identity).then((({payload:e})=>e.data))}getShortcuts(){return this.wire.sendAction(\"get-shortcuts\",this.identity).then((({payload:e})=>e.data))}async getViews(){const{payload:e}=await this.wire.sendAction(\"application-get-views\",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}getZoomLevel(){return this.wire.sendAction(\"get-application-zoom-level\",this.identity).then((({payload:e})=>e.data))}getWindow(){return this.wire.sendAction(\"application-get-window\",this.identity).catch((e=>{})),Promise.resolve(this.window)}registerUser(e,t){return this.wire.sendAction(\"register-user\",{userName:e,appName:t,...this.identity}).then((()=>{}))}removeTrayIcon(){return this.wire.sendAction(\"remove-tray-icon\",this.identity).then((()=>{}))}restart(){return this.wire.sendAction(\"restart-application\",this.identity).then((()=>{}))}run(){return console.warn(\"Deprecation Warning: Application.run is deprecated Please use fin.Application.start\"),this.wire.sendAction(\"application-run\",this.identity).catch((e=>{})),this._run()}_run(e={}){return this.wire.sendAction(\"run-application\",{manifestUrl:this._manifestUrl,opts:e,...this.identity}).then((()=>{}))}scheduleRestart(){return this.wire.sendAction(\"relaunch-on-close\",this.identity).then((()=>{}))}async sendApplicationLog(){const{payload:e}=await this.wire.sendAction(\"send-application-log\",this.identity);return e.data}async setJumpList(e){await this.wire.sendAction(\"set-jump-list\",{config:e,...this.identity})}setTrayIcon(e){return this.wire.sendAction(\"set-tray-icon\",{enabledIcon:e,...this.identity}).then((()=>{}))}setShortcuts(e){return this.wire.sendAction(\"set-shortcuts\",{data:e,...this.identity}).then((()=>{}))}async setShortcutQueryParams(e){await this.wire.sendAction(\"set-shortcut-query-args\",{data:e,...this.identity})}setZoomLevel(e){return this.wire.sendAction(\"set-application-zoom-level\",{level:e,...this.identity}).then((()=>{}))}async setAppLogUsername(e){await this.wire.sendAction(\"set-app-log-username\",{data:e,...this.identity})}getTrayIconInfo(){return this.wire.sendAction(\"get-tray-icon-info\",this.identity).then((({payload:e})=>e.data))}hasTrayIcon(){return this.wire.sendAction(\"has-tray-icon\",this.identity).then((({payload:e})=>e.data))}terminate(){return this.wire.sendAction(\"terminate-application\",this.identity).then((()=>{}))}wait(){return this.wire.sendAction(\"wait-for-hung-application\",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction(\"get-info\",this.identity).then((({payload:e})=>e.data))}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction(\"application-get-process-info\",this.identity);return e}async setFileDownloadLocation(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t};await this.wire.sendAction(\"set-file-download-location\",{...n,downloadLocation:e})}async getFileDownloadLocation(){const{payload:{data:e}}=await this.wire.sendAction(\"get-file-download-location\",this.identity);return e}async showTrayIconPopupMenu(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t},{payload:i}=await this.wire.sendAction(\"show-tray-icon-popup-menu\",{...n,options:e});return i.data}async closeTrayIconPopupMenu(){const{name:e}=this.wire.me,t={uuid:this.identity.uuid,name:e};await this.wire.sendAction(\"close-tray-icon-popup-menu\",{...t})}}return j.Application=i,j}function Z(){return q||(q=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(function(){if(K)return F;K=1,Object.defineProperty(F,\"__esModule\",{value:!0}),F.ApplicationModule=void 0;const e=d,t=O,n=Y();class i extends e.Base{async wrap(e){this.wire.sendAction(\"wrap-application\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}wrapSync(e){this.wire.sendAction(\"wrap-application-sync\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}async _create(e){return void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&void 0===e.isPlatformController&&(e.autoShow=!0),await this.wire.sendAction(\"create-application\",e),this.wrap({uuid:e.uuid})}create(e){return console.warn(\"Deprecation Warning: fin.Application.create is deprecated. Please use fin.Application.start\"),this.wire.sendAction(\"application-create\").catch((e=>{})),this._create(e)}async start(e){this.wire.sendAction(\"start-application\").catch((e=>{}));const t=await this._create(e);return await this.wire.sendAction(\"run-application\",{uuid:e.uuid}),t}async startManyManifests(e,t){return this.wire.sendAction(\"run-applications\",{applications:e,opts:t}).then((()=>{}))}getCurrent(){return this.wire.sendAction(\"get-current-application\").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction(\"get-current-application-sync\").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}async startFromManifest(e,t){this.wire.sendAction(\"application-start-from-manifest\").catch((e=>{}));const n=await this._createFromManifest(e);return await n._run(t),n}createFromManifest(e){return console.warn(\"Deprecation Warning: fin.Application.createFromManifest is deprecated. Please use fin.Application.startFromManifest\"),this.wire.sendAction(\"application-create-from-manifest\").catch((e=>{})),this._createFromManifest(e)}_createFromManifest(e){return this.wire.sendAction(\"get-application-manifest\",{manifestUrl:e}).then((({payload:e})=>{const t=e.data.platform?e.data.platform.uuid:e.data.startup_app.uuid;return this.wrap({uuid:t})})).then((t=>(t._manifestUrl=e,t)))}}return F.ApplicationModule=i,F}(),e),n(Y(),e)}(R)),R}H.WebContents=D;var Q={};Object.defineProperty(Q,\"__esModule\",{value:!0}),Q.promisifySubscription=void 0;var X,ee,te;function ne(){if(X)return S;X=1,Object.defineProperty(S,\"__esModule\",{value:!0}),S._Window=void 0;const e=Z(),t=H,n=J(),i=T,r=Q;class o extends t.WebContents{constructor(e,t){super(e,t,\"window\")}async createWindow(e){this.wire.sendAction(\"window-create-window\",this.identity).catch((e=>{}));const t=await(0,r.promisifySubscription)(this,\"fire-constructor-callback\");void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&(e.autoShow=!0),(0,i.handleDeprecatedWarnings)(e);const n=this.wire.environment.createChildContent({entityType:\"window\",options:e}),[o]=await Promise.all([t.getValue(),n]);let s;const{success:a}=o,c=o.data,{message:d}=c;s=a?{httpResponseCode:c.httpResponseCode,apiInjected:c.apiInjected}:{message:c.message,networkErrorCode:c.networkErrorCode,stack:c.stack};const h={message:d,cbPayload:s,success:a};try{this.getWebWindow().fin.__internal_.openerSuccessCBCalled()}catch(e){}return h.success?this:Promise.reject(h)}getAllFrames(){return this.wire.sendAction(\"get-all-frames\",this.identity).then((({payload:e})=>e.data))}getBounds(){return this.wire.sendAction(\"get-window-bounds\",this.identity).then((({payload:e})=>e.data))}center(){return this.wire.sendAction(\"center-window\",this.identity).then((()=>{}))}blur(){return this.wire.sendAction(\"blur-window\",this.identity).then((()=>{}))}bringToFront(){return this.wire.sendAction(\"bring-window-to-front\",this.identity).then((()=>{}))}animate(e,t){return this.wire.sendAction(\"animate-window\",{transitions:e,options:t,...this.identity}).then((()=>{}))}hide(){return this.wire.sendAction(\"hide-window\",this.identity).then((()=>{}))}close(e=!1){return this.wire.sendAction(\"close-window\",{force:e,...this.identity}).then((()=>{Object.setPrototypeOf(this,null)}))}focusedWebViewWasChanged(){return this.wire.sendAction(\"focused-webview-changed\",this.identity).then((()=>{}))}getNativeId(){return this.wire.sendAction(\"get-window-native-id\",this.identity).then((({payload:e})=>e.data))}async getCurrentViews(){const{payload:e}=await this.wire.sendAction(\"window-get-views\",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}disableFrame(){return console.warn(\"Function is deprecated; use disableUserMovement instead.\"),this.wire.sendAction(\"disable-window-frame\",this.identity).then((()=>{}))}disableUserMovement(){return this.wire.sendAction(\"disable-window-frame\",this.identity).then((()=>{}))}enableFrame(){return console.warn(\"Function is deprecated; use enableUserMovement instead.\"),this.wire.sendAction(\"enable-window-frame\",this.identity).then((()=>{}))}enableUserMovement(){return this.wire.sendAction(\"enable-window-frame\",this.identity).then((()=>{}))}flash(){return this.wire.sendAction(\"flash-window\",this.identity).then((()=>{}))}stopFlashing(){return this.wire.sendAction(\"stop-flash-window\",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction(\"get-window-info\",this.identity).then((({payload:e})=>e.data))}async getLayout(e){this.wire.sendAction(\"window-get-layout\",this.identity).catch((e=>{}));const t=await this.getOptions();if(!t.layout&&!t.layoutSnapshot)throw new Error(\"Window does not have a Layout\");return this.fin.Platform.Layout.wrap(e??this.identity)}getOptions(){return this.wire.sendAction(\"get-window-options\",this.identity).then((({payload:e})=>e.data))}getParentApplication(){return this.wire.sendAction(\"window-get-parent-application\",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity))}getParentWindow(){return this.wire.sendAction(\"window-get-parent-window\",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity)).then((e=>e.getWindow()))}async getSnapshot(e){const t={area:e,...this.identity};console.warn(\"Window.getSnapshot has been deprecated, please use Window.capturePage\");return(await this.wire.sendAction(\"get-window-snapshot\",t)).payload.data}getState(){return this.wire.sendAction(\"get-window-state\",this.identity).then((({payload:e})=>e.data))}getWebWindow(){return this.wire.sendAction(\"window-get-web-window\",this.identity).catch((e=>{})),this.wire.environment.getWebWindow(this.identity)}isMainWindow(){return this.wire.sendAction(\"window-is-main-window\",this.identity).catch((e=>{})),this.me.uuid===this.me.name}isShowing(){return this.wire.sendAction(\"is-window-showing\",this.identity).then((({payload:e})=>e.data))}maximize(){return this.wire.sendAction(\"maximize-window\",this.identity).then((()=>{}))}minimize(){return this.wire.sendAction(\"minimize-window\",this.identity).then((()=>{}))}moveBy(e,t,n){return this.wire.sendAction(\"move-window-by\",{deltaLeft:e,deltaTop:t,positioningOptions:n,...this.identity}).then((()=>{}))}moveTo(e,t,n){return this.wire.sendAction(\"move-window\",{left:e,top:t,positioningOptions:n,...this.identity}).then((()=>{}))}resizeBy(e,t,n,i){return this.wire.sendAction(\"resize-window-by\",{deltaWidth:Math.floor(e),deltaHeight:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}resizeTo(e,t,n,i){return this.wire.sendAction(\"resize-window\",{width:Math.floor(e),height:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}restore(){return this.wire.sendAction(\"restore-window\",this.identity).then((()=>{}))}setAsForeground(){return this.wire.sendAction(\"set-foreground-window\",this.identity).then((()=>{}))}setBounds(e,t){return this.wire.sendAction(\"set-window-bounds\",{...e,...this.identity,positioningOptions:t}).then((()=>{}))}show(e=!1){return this.wire.sendAction(\"show-window\",{force:e,...this.identity}).then((()=>{}))}showAt(e,t,n=!1){return this.wire.sendAction(\"show-at-window\",{force:n,left:Math.floor(e),top:Math.floor(t),...this.identity}).then((()=>{}))}updateOptions(e){return this.wire.sendAction(\"update-window-options\",{options:e,...this.identity}).then((()=>{}))}authenticate(e,t){return this.wire.sendAction(\"window-authenticate\",{userName:e,password:t,...this.identity}).then((()=>{}))}async showPopupMenu(e){const{payload:t}=await this.wire.sendAction(\"show-popup-menu\",{options:e,...this.identity});return t.data}async closePopupMenu(){return this.wire.sendAction(\"close-popup-menu\",{...this.identity}).then((()=>{}))}async dispatchPopupResult(e){this.wire.sendAction(\"window-dispatch-popup-result\",this.identity).catch((e=>{})),await this.wire.sendAction(\"dispatch-popup-result\",{data:e,...this.identity})}async print(e={content:\"self\"}){switch(e.content){case void 0:case\"self\":return super.print(e);case\"screenshot\":return this.wire.sendAction(\"print-screenshot\",this.identity).then((()=>{}));case\"views\":return this.wire.sendAction(\"print-views\",{...this.identity,options:e}).then((()=>{}));default:return}}}return S._Window=o,S}function ie(){return te||(te=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(function(){if(ee)return _;ee=1,Object.defineProperty(_,\"__esModule\",{value:!0}),_._WindowModule=void 0;const e=d,t=O,n=ne();class i extends e.Base{async wrap(e){this.wire.sendAction(\"window-wrap\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}wrapSync(e){this.wire.sendAction(\"window-wrap-sync\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}create(e){return this.wire.sendAction(\"create-window\").catch((e=>{})),new n._Window(this.wire,{uuid:this.me.uuid,name:e.name}).createWindow(e)}getCurrent(){if(this.wire.sendAction(\"get-current-window\").catch((e=>{})),!this.wire.me.isWindow)throw new Error(\"You are not in a Window context\");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction(\"get-current-window-sync\").catch((e=>{})),!this.wire.me.isWindow)throw new Error(\"You are not in a Window context\");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return _._WindowModule=i,_}(),e),n(ne(),e)}(M)),M}Q.promisifySubscription=async(e,t,n=(()=>!0),i)=>{let r,o,s;const a=new Promise(((e,t)=>{r=e,o=t})),c=e=>{n(e)&&(clearTimeout(s),r(e))};return await e.on(t,c),i&&(s=setTimeout((()=>o(new Error(\"event timed out\"))),i)),a.finally((()=>{e.removeListener(t,c).catch((()=>null))})),{getValue:()=>a}},Object.defineProperty(c,\"__esModule\",{value:!0}),c.System=void 0;const re=d,oe=g,se=ie(),ae=t;class ce extends re.EmitterBase{constructor(e){super(e,\"system\")}sendExternalProcessRequest(e,t){return new Promise(((n,i)=>{const r=\"external-process-exited\";let o,s,a,c;\"function\"==typeof t.listener&&(a=e=>{const n=e||{};s={topic:\"exited\",uuid:n.processUuid||\"\",exitCode:n.exitCode||0},o===e.processUuid&&(t.listener(s),c.removeListener(r,a))},this.wire.me.name||(this.wire.me.name=this.wire.me.uuid),c=new se._Window(this.wire,this.wire.me),c.on(r,a)),this.wire.sendAction(e,t).then((({payload:e})=>{o=e.data.uuid,n(e.data),s&&o===s.uuid&&(t.listener(s),c.removeListener(r,a))})).catch((e=>{c&&c.removeListener(r,a),i(e)}))}))}getVersion(){return this.wire.sendAction(\"get-version\").then((({payload:e})=>e.data))}clearCache(e){return this.wire.sendAction(\"clear-cache\",e).then((()=>{}))}deleteCacheOnExit(){return this.wire.sendAction(\"delete-cache-request\").then((()=>{}))}exit(){return this.wire.sendAction(\"exit-desktop\").then((()=>{}))}async fetchManifest(e){const{payload:{data:t}}=await this.wire.sendAction(\"fetch-manifest\",{manifestUrl:e});return t}flushCookieStore(){return this.wire.sendAction(\"flush-cookie-store\").then((()=>{}))}getAllWindows(){return this.wire.sendAction(\"get-all-windows\").then((({payload:e})=>e.data))}getAllApplications(){return this.wire.sendAction(\"get-all-applications\").then((({payload:e})=>e.data))}getCommandLineArguments(){return this.wire.sendAction(\"get-command-line-arguments\").then((({payload:e})=>e.data))}async getCrashReporterState(){const{payload:{data:{diagnosticMode:e,isRunning:t}}}=await this.wire.sendAction(\"get-crash-reporter-state\");return console.warn(\"diagnosticMode property is deprecated. It will be removed in a future version\"),{diagnosticMode:e,diagnosticsMode:e,isRunning:t}}async startCrashReporter(e){const t=e,n={...t,diagnosticMode:t.diagnosticsMode||t.diagnosticMode},{payload:{data:{diagnosticMode:i,isRunning:r}}}=await this.wire.sendAction(\"start-crash-reporter\",n);return{diagnosticMode:i,diagnosticsMode:i,isRunning:r}}getUniqueUserId(){return this.wire.sendAction(\"get-unique-user-id\").then((({payload:e})=>e.data))}getEntityInfo(e,t){return this.wire.sendAction(\"get-entity-info\",{uuid:e,name:t}).then((({payload:e})=>e.data))}getEnvironmentVariable(e){return this.wire.sendAction(\"get-environment-variable\",{environmentVariables:e}).then((({payload:e})=>e.data))}getFocusedWindow(){return this.wire.sendAction(\"get-focused-window\").then((({payload:e})=>e.data))}async isAppCertified(e){const{payload:{data:{certifiedInfo:t}}}=await this.wire.sendAction(\"is-app-certified\",{manifestUrl:e});return t}getInstalledRuntimes(){return this.wire.sendAction(\"get-installed-runtimes\").then((({payload:e})=>e.data.runtimes))}async getInstalledApps(){const{payload:{data:{installedApps:e}}}=await this.wire.sendAction(\"get-installed-apps\");return e}getLog(e){return this.wire.sendAction(\"view-log\",e).then((({payload:e})=>e.data))}getMachineId(){return this.wire.sendAction(\"get-machine-id\").then((({payload:e})=>e.data))}getMinLogLevel(){return this.wire.sendAction(\"get-min-log-level\").then((({payload:e})=>e.data))}getLogList(){return this.wire.sendAction(\"list-logs\").then((({payload:e})=>e.data))}getMonitorInfo(){return this.wire.sendAction(\"get-monitor-info\").then((({payload:e})=>e.data))}getMousePosition(){return this.wire.sendAction(\"get-mouse-position\").then((({payload:e})=>e.data))}getProcessList(){return console.warn(\"System.getProcessList has been deprecated. Please consider using our new process APIs: Window.getProcessInfo, View.getProcessInfo, Application.getProcessInfo, System.getAllProcessInfo\"),this.wire.sendAction(\"process-snapshot\").then((({payload:e})=>e.data))}async getAllProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction(\"get-all-process-info\",this.identity);return e}getProxySettings(){return this.wire.sendAction(\"get-proxy-settings\").then((({payload:e})=>e.data))}getRuntimeInfo(){return this.wire.sendAction(\"get-runtime-info\").then((({payload:e})=>e.data))}getRvmInfo(){return this.wire.sendAction(\"get-rvm-info\").then((({payload:e})=>e.data))}getHostSpecs(){return this.wire.sendAction(\"get-host-specs\").then((({payload:e})=>e.data))}getOSInfo(){return this.wire.sendAction(\"get-os-info\").then((({payload:e})=>e.data))}launchExternalProcess(e){return this.sendExternalProcessRequest(\"launch-external-process\",e)}monitorExternalProcess(e){return this.sendExternalProcessRequest(\"monitor-external-process\",e)}log(e,t){return this.wire.sendAction(\"write-to-log\",{level:e,message:t}).then((()=>{}))}openUrlWithBrowser(e){return this.wire.sendAction(\"open-url-with-browser\",{url:e}).then((()=>{}))}async registerCustomProtocol(e){if(\"object\"!=typeof e)throw new Error(\"Must provide an object with a `protocolName` property having a string value.\");await this.wire.sendAction(\"register-custom-protocol\",e)}async unregisterCustomProtocol(e){await this.wire.sendAction(\"unregister-custom-protocol\",{protocolName:e})}async getCustomProtocolState(e){return this.wire.sendAction(\"get-custom-protocol-state\",{protocolName:e}).then((({payload:e})=>e.data))}releaseExternalProcess(e){return this.wire.sendAction(\"release-external-process\",{uuid:e}).then((()=>{}))}showDeveloperTools(e){return this.wire.sendAction(\"show-developer-tools\",e).then((()=>{}))}terminateExternalProcess(e){return this.wire.sendAction(\"terminate-external-process\",e).then((()=>{}))}updateProxySettings(e){return this.wire.sendAction(\"update-proxy\",e).then((()=>{}))}async downloadAsset(e,t){const n=()=>{};let i=n,r=n;const o=new Promise(((e,t)=>{i=e,r=t}));if(\"openfin\"!==this.wire.environment.type)throw new oe.NotSupportedError(\"downloadAsset only supported in an OpenFin Render process\");const s=oe.RuntimeError.getCallSite(),a=this.wire.environment.getNextMessageId().toString(),c=`asset-download-progress-${a}`,d=`asset-download-error-${a}`,h=`asset-download-complete-${a}`,l=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},u=()=>{this.removeListener(c,l)};await Promise.all([this.on(c,l),this.once(d,(e=>{u();const{reason:t,err:n}=e;r(new oe.RuntimeError({reason:t,error:n},s))})),this.once(h,(()=>{u(),i()}))]);const p=Object.assign(e,{downloadId:a});return await this.wire.sendAction(\"download-asset\",p).catch((e=>{throw u(),e})),o}downloadRuntime(e,t){const n=oe.RuntimeError.getCallSite();return new Promise(((i,r)=>{if(\"openfin\"!==this.wire.environment.type)return void r(new oe.NotSupportedError(\"downloadRuntime only supported in an OpenFin Render process\"));const o=this.wire.environment.getNextMessageId().toString(),s=`runtime-download-progress-${o}`,a=`runtime-download-error-${o}`,c=`runtime-download-complete-${o}`,d=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},h=()=>{this.removeListener(s,d)};this.on(s,d),this.once(a,(e=>{h();const{reason:t,err:i}=e;r(new oe.RuntimeError({reason:t,error:i},n))})),this.once(c,(()=>{h(),i()}));const l=Object.assign(e,{downloadId:o});this.wire.sendAction(\"download-runtime\",l).catch((e=>{h(),r(e)}))}))}downloadPreloadScripts(e){return this.wire.sendAction(\"download-preload-scripts\",{scripts:e}).then((({payload:e})=>e.data))}getAllExternalApplications(){return this.wire.sendAction(\"get-all-external-applications\").then((({payload:e})=>e.data))}getAppAssetInfo(e){return this.wire.sendAction(\"get-app-asset-info\",e).then((({payload:e})=>e.data))}getCookies(e){const t=this.wire.environment.getUrl(),n=Object.assign(e,{url:t});return this.wire.sendAction(\"get-cookies\",n).then((({payload:e})=>e.data))}setMinLogLevel(e){return this.wire.sendAction(\"set-min-log-level\",{level:e}).then((()=>{}))}resolveUuid(e){return this.wire.sendAction(\"resolve-uuid\",{entityKey:e}).then((({payload:e})=>e.data))}executeOnRemote(e,t){return t.requestingIdentity=e,this.wire.ferryAction(t)}readRegistryValue(e,t,n){return this.wire.sendAction(\"read-registry-value\",{rootKey:e,subkey:t,value:n}).then((({payload:e})=>e.data))}registerExternalConnection(e){return this.wire.sendAction(\"register-external-connection\",{uuid:e}).then((({payload:e})=>e.data))}async getServiceConfiguration(e){if(\"string\"!=typeof e.name)throw new Error(\"Must provide an object with a `name` property having a string value\");const{name:t}=e;return this.wire.sendAction(\"get-service-configuration\",{name:t}).then((({payload:e})=>e.data))}async getSystemAppConfig(e){if(\"string\"!=typeof e)throw new Error(\"Must provide a string value for name of system app\");return this.wire.sendAction(\"get-system-app-configuration\",{name:e}).then((({payload:e})=>e.data))}async registerShutdownHandler(e){this.wire.sendAction(\"system-register-shutdown-handler\").catch((e=>{}));const{uuid:t,name:n}=this.wire.me;this.on(\"system-shutdown\",(i=>{e({proceed:()=>{this.wire.environment.raiseEvent(\"application/system-shutdown-handled\",{uuid:t,name:n,topic:\"application\"})}})}))}runRvmHealthCheck(){return this.wire.sendAction(\"run-rvm-health-check\").then((({payload:e})=>e.data))}async launchManifest(e,t={}){const{subscribe:n,...i}=t,r=i;if(n){const e=new ae.EventEmitter;n(e);const t=\"app-version-progress\",i=\"runtime-status\",o=\"app-version-complete\",s=\"app-version-error\",a=this.wire.environment.getNextMessageId().toString();r.appVersionId=a;const c=[o,t,i,s],d=e=>{const{appVersionId:t,topic:n,type:i,...r}=e;return{...r,type:c.find((e=>i.includes(e)))}},h=t=>{const n=d(t);e.emit(n.type,n)},l=()=>{this.removeListener(`${t}.${a}`,h),this.removeListener(`${i}.${a}`,h),this.removeListener(`${o}.${a}`,h),this.removeListener(`${s}.${a}`,h),this.removeListener(`${o}.${a}`,l),this.removeListener(`${s}.${a}`,l)};await Promise.all([this.on(`${t}.${a}`,h),this.on(`${i}.${a}`,h),this.once(`${o}.${a}`,h),this.once(`${s}.${a}`,h),this.once(`${o}.${a}`,l),this.once(`${s}.${a}`,l)])}return(await this.wire.sendAction(\"launch-manifest\",{manifestUrl:e,opts:r})).payload.data.manifest}async queryPermissionForCurrentContext(e){const t={uuid:this.wire.me.uuid,name:this.wire.me.name};return(await this.wire.sendAction(\"query-permission-for-current-context\",{apiName:e,identity:t})).payload.data}async enableNativeWindowIntegrationProvider(e){const{payload:t}=await this.wire.sendAction(\"enable-native-window-integration-provider\",{permissions:e});return t.data}async registerUsage({data:e,type:t}){await this.wire.sendAction(\"register-usage\",{data:e,type:t})}async getPrinters(){const{payload:e}=await this.wire.sendAction(\"system-get-printers\");return e.data}async updateProcessLoggingOptions(e){await this.wire.sendAction(\"system-update-process-logging-options\",{options:e})}async getDomainSettings(){const{payload:{data:e}}=await this.wire.sendAction(\"get-domain-settings\",this.identity);return e}async setDomainSettings(e){await this.wire.sendAction(\"set-domain-settings\",{domainSettings:e,...this.identity})}async refreshExtensions(){const{payload:e}=await this.wire.sendAction(\"refresh-extensions\");return e.data}async getInstalledExtensions(){const{payload:e}=await this.wire.sendAction(\"get-installed-extensions\");return e.data}}c.System=ce;var de={},he={};Object.defineProperty(he,\"__esModule\",{value:!0}),he.RefCounter=void 0;he.RefCounter=class{constructor(){this.topicRefMap=new Map}incRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t+1;n=i,this.topicRefMap.set(e,i)}else this.topicRefMap.set(e,1),n=1;return n}decRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t-1;this.topicRefMap.set(e,i),n=i}else n=-1;return n}actOnFirst(e,t,n){return 1===this.incRefCount(e)?t():n()}actOnLast(e,t,n){return 0===this.decRefCount(e)?t():n()}};var le={},ue={},pe={};Object.defineProperty(pe,\"__esModule\",{value:!0}),pe.ChannelBase=pe.ProtectedItems=void 0;const we=e=>async(t,n,i)=>{const r=await e(t,n,i);return void 0===r?n:r};pe.ProtectedItems=class{constructor(e,t){this.providerIdentity=e,this.close=t}};class ye{static defaultAction(e){throw new Error(`No action registered at target for ${e}`)}constructor(){this.subscriptions=new Map}async processAction(e,t,n){try{const i=this.subscriptions.has(e)?this.subscriptions.get(e):(t,n)=>(this.defaultAction??ye.defaultAction)(e,t,n),r=this.preAction?await this.preAction(e,t,n):t,o=await i(r,n);return this.postAction?await this.postAction(e,o,n):o}catch(t){if(this.errorMiddleware)return this.errorMiddleware(e,t,n);throw t}}beforeAction(e){if(this.preAction)throw new Error(\"Already registered beforeAction middleware\");this.preAction=we(e)}onError(e){if(this.errorMiddleware)throw new Error(\"Already registered error middleware\");this.errorMiddleware=e}afterAction(e){if(this.postAction)throw new Error(\"Already registered afterAction middleware\");this.postAction=we(e)}remove(e){this.subscriptions.delete(e)}setDefaultAction(e){if(this.defaultAction)throw new Error(\"default action can only be set once\");this.defaultAction=e}register(e,t){if(this.subscriptions.has(e))throw new Error(`Subscription already registered for action: ${e}. Unsubscribe before adding new subscription`);return this.subscriptions.set(e,t),!0}}pe.ChannelBase=ye;var fe,ge,me,ve=s&&s.__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)},Ce=s&&s.__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};Object.defineProperty(ue,\"__esModule\",{value:!0}),ue.ChannelClient=void 0;const be=pe,Ie=new Map;class Ee extends be.ChannelBase{static closeChannelByEndpointId(e){const t=Ie.get(e);t&&ve(t,me,\"f\").call(t)}static handleProviderDisconnect(e){for(const t of Ie.values())t.providerIdentity.channelId===e.channelId&&(t.disconnectListener(e),ve(t,me,\"f\").call(t))}constructor(e,t,n){super(),fe.set(this,void 0),ge.set(this,void 0),this.processAction=(e,t,n)=>super.processAction(e,t,n),me.set(this,(()=>{Ie.delete(this.endpointId),ve(this,ge,\"f\").close()})),Ce(this,fe,new be.ProtectedItems(e,t),\"f\"),this.disconnectListener=()=>{},this.endpointId=e.endpointId,Ce(this,ge,n,\"f\"),Ie.set(this.endpointId,this),n.receive(this.processAction)}get providerIdentity(){return ve(this,fe,\"f\").providerIdentity}async dispatch(e,t){if(ve(this,ge,\"f\").isEndpointConnected(this.providerIdentity.channelId))return ve(this,ge,\"f\").send(this.providerIdentity.channelId,e,t);throw new Error(\"The client you are trying to dispatch from is disconnected from the target provider.\")}onDisconnection(e){this.disconnectListener=t=>{try{e(t)}catch(e){throw new Error(`Error while calling the onDisconnection callback: ${e.message}`)}finally{this.disconnectListener=()=>{}}}}async disconnect(){await this.sendDisconnectAction(),ve(this,me,\"f\").call(this)}async sendDisconnectAction(){const e=ve(this,fe,\"f\");await e.close()}static async wireClose(e,t,n){const{channelName:i,uuid:r,name:o}=t;await e.sendAction(\"disconnect-from-channel\",{channelName:i,uuid:r,name:o,endpointId:n})}}ue.ChannelClient=Ee,fe=new WeakMap,ge=new WeakMap,me=new WeakMap;var xe={},Ae={};Object.defineProperty(Ae,\"__esModule\",{value:!0}),Ae.exhaustiveCheck=void 0,Ae.exhaustiveCheck=function(e,t){throw new Error(`Unsupported value: ${e}${t?`\\n Supported values are: ${t.join(\"\")}`:\"\"}`)};var Pe,Me,_e,Oe={},Se=s&&s.__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},Re=s&&s.__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)};Object.defineProperty(Oe,\"__esModule\",{value:!0}),Oe.ClassicInfo=Oe.ClassicStrategy=void 0;Oe.ClassicStrategy=class{constructor(e,t,n,i){this.messageReceiver=t,this.endpointId=n,this.providerIdentity=i,Pe.set(this,void 0),Me.set(this,new Map),_e.set(this,new Map),this.send=async(e,t,n)=>{const i=Re(this,Me,\"f\").get(e);if(!i)throw new Error(`Could not locate routing info for endpoint ${e}`);const r={...i};r.isLocalEndpointId&&delete r.endpointId,delete r.isLocalEndpointId;const o=Re(this,Pe,\"f\").sendAction(\"send-channel-message\",{...r,providerIdentity:this.providerIdentity,action:t,payload:n});Re(this,_e,\"f\").get(e)?.add(o);return(await o.catch((e=>{throw new Error(e.message)})).finally((()=>{Re(this,_e,\"f\").get(e)?.delete(o)}))).payload.data.result},this.close=async()=>{this.messageReceiver.removeEndpoint(this.providerIdentity.channelId,this.endpointId),[...Re(this,Me,\"f\").keys()].forEach((e=>this.closeEndpoint(e))),Se(this,Me,new Map,\"f\")},Se(this,Pe,e,\"f\")}onEndpointDisconnect(e,t){}receive(e){this.messageReceiver.addEndpoint(e,this.providerIdentity.channelId,this.endpointId)}async closeEndpoint(e){const t=Re(this,Me,\"f\").get(e);Re(this,Me,\"f\").delete(e);const n=Re(this,_e,\"f\").get(e);n?.forEach((n=>{const i=`Channel connection with identity uuid: ${t?.uuid} / name: ${t?.name} / endpointId: ${e} no longer connected.`;n.cancel(new Error(i))}))}isEndpointConnected(e){return Re(this,Me,\"f\").has(e)}addEndpoint(e,t){Re(this,Me,\"f\").set(e,t.endpointIdentity),Re(this,_e,\"f\").set(e,new Set)}isValidEndpointPayload(e){return\"string\"==typeof e?.endpointIdentity?.endpointId||\"string\"==typeof e?.endpointIdentity?.channelId}},Pe=new WeakMap,Me=new WeakMap,_e=new WeakMap,Oe.ClassicInfo={version:5,minimumVersion:0,type:\"classic\"};var Fe={},je={},ke={};Object.defineProperty(ke,\"__esModule\",{value:!0}),ke.errorToPOJO=void 0,ke.errorToPOJO=function(e){return{stack:e.stack,name:e.name,message:e.message,toString:()=>e.stack||e.toString()}};var Le,Te,$e=s&&s.__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)},Be=s&&s.__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};Object.defineProperty(je,\"__esModule\",{value:!0}),je.RTCEndpoint=void 0;const Ge=ke;je.RTCEndpoint=class{static isValidEndpointPayload(e){const t=e=>\"object\"==typeof e&&null!==e;return t(e)&&t(e.endpointIdentity)&&t(e.rtc)&&\"string\"==typeof e.endpointIdentity.endpointId}constructor({rtc:e,endpointIdentity:t}){this.responseMap=new Map,Le.set(this,null),Te.set(this,void 0),this.connectionStateChangeHandler=e=>{\"connected\"!==this.rtc.rtcClient.connectionState&&(this.rtc.rtcClient.removeEventListener(\"connectionstatechange\",this.connectionStateChangeHandler),this.close(),$e(this,Te,\"f\")&&$e(this,Te,\"f\").call(this))},this.send=async(e,t)=>{const n=`message-${Math.random()}`,i=new Promise(((e,t)=>{this.responseMap.set(n,{resolve:e,reject:t})}));return this.rtc.channels.request.send(JSON.stringify({action:e,payload:t,messageId:n})),i},this.close=()=>{this.responseMap.forEach((e=>e.reject(\"Connection has closed.\"))),this.responseMap=new Map,this.rtc.channels.request.close(),this.rtc.channels.response.close(),this.rtc.rtcClient.close()},this.rtc=e,this.endpointIdentity=t,this.rtc.channels.response.addEventListener(\"message\",(e=>{let{data:t}=e;e.data instanceof ArrayBuffer&&(t=(new TextDecoder).decode(e.data));const{messageId:n,payload:i,success:r,error:o}=JSON.parse(t),{resolve:s,reject:a}=this.responseMap.get(n)??{};s&&a?(this.responseMap.delete(n),r?s(i):a(o)):(console.log(\"Could not find id in responseMap.\"),console.log(e))})),this.rtc.channels.request.addEventListener(\"message\",(async e=>{let{data:n}=e;e.data instanceof ArrayBuffer&&(n=(new TextDecoder).decode(e.data));const{messageId:i,action:r,payload:o}=JSON.parse(n);if($e(this,Le,\"f\"))try{const e=await $e(this,Le,\"f\").call(this,r,o,t);this.rtc.channels.response.send(JSON.stringify({messageId:i,payload:e,success:!0}))}catch(e){\"open\"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,error:(0,Ge.errorToPOJO)(e),success:!1}))}else\"open\"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,success:!1,error:\"Connection not ready.\"}))})),this.rtc.rtcClient.addEventListener(\"connectionstatechange\",this.connectionStateChangeHandler),Object.values(this.rtc.channels).forEach((e=>{e.onclose=e=>{[...this.responseMap.values()].forEach((e=>e.reject(new Error(\"RTCDataChannel closed unexpectedly, this is most commonly caused by message size. Note: RTC Channels have a message size limit of ~255kB.\")))),this.close(),$e(this,Te,\"f\")&&$e(this,Te,\"f\").call(this)}}))}onDisconnect(e){if($e(this,Te,\"f\"))throw new Error(\"RTCEndpoint disconnectListener cannot be set twice.\");Be(this,Te,e,\"f\")}receive(e){if($e(this,Le,\"f\"))throw new Error(\"You have already set a listener for this RTC Endpoint.\");Be(this,Le,e,\"f\")}get connected(){return\"connected\"===this.rtc.rtcClient.connectionState}},Le=new WeakMap,Te=new WeakMap;var We,He,Ne,De={},Ue=s&&s.__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)},Ve=s&&s.__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};Object.defineProperty(De,\"__esModule\",{value:!0}),De.EndpointStrategy=void 0;De.EndpointStrategy=class{constructor(e,t,n){this.EndpointType=e,this.StrategyName=n,We.set(this,null),He.set(this,new Map),Ne.set(this,!0),this.send=async(e,t,n)=>this.getEndpointById(e).send(t,n),this.close=async()=>{Ue(this,Ne,\"f\")&&(Ue(this,He,\"f\").forEach((e=>e.close())),Ve(this,He,new Map,\"f\")),Ve(this,Ne,!1,\"f\")},this.isValidEndpointPayload=t}onEndpointDisconnect(e,t){this.getEndpointById(e).onDisconnect(t)}receive(e){if(Ue(this,We,\"f\"))throw new Error(`You have already set a listener for this ${this.StrategyName} Strategy`);Ve(this,We,e,\"f\"),Ue(this,He,\"f\").forEach((e=>e.receive(Ue(this,We,\"f\"))))}getEndpointById(e){const t=Ue(this,He,\"f\").get(e);if(!t)throw new Error(`Client with endpoint id ${e} is not connected`);return t}get connected(){return Ue(this,Ne,\"f\")}isEndpointConnected(e){return Ue(this,He,\"f\").has(e)}addEndpoint(e,t){if(!Ue(this,Ne,\"f\"))return void console.warn(`Adding endpoint to disconnected ${this.StrategyName} Strategy`);const n=new this.EndpointType(t);Ue(this,We,\"f\")&&n.receive(Ue(this,We,\"f\")),Ue(this,He,\"f\").set(e,n)}async closeEndpoint(e){Ue(this,He,\"f\").delete(e)}},We=new WeakMap,He=new WeakMap,Ne=new WeakMap,Object.defineProperty(Fe,\"__esModule\",{value:!0}),Fe.RTCInfo=Fe.RTCStrategy=void 0;const ze=je,Ke=De;class qe extends Ke.EndpointStrategy{constructor(){super(ze.RTCEndpoint,ze.RTCEndpoint.isValidEndpointPayload,\"RTC\")}}Fe.RTCStrategy=qe,Fe.RTCInfo={version:2,minimumVersion:0,type:\"rtc\"};var Je={};Object.defineProperty(Je,\"__esModule\",{value:!0}),Je.RTCICEManager=void 0;const Ye=d;class Ze extends Ye.EmitterBase{constructor(e){super(e,\"channel\"),this.ensureChannelOpened=e=>new Promise(((t,n)=>{if(\"open\"===e.readyState)t();else if(\"connecting\"===e.readyState){const n=()=>{e.removeEventListener(\"open\",n),t()};e.addEventListener(\"open\",n)}else n(new Error(\"This Channel has already closed\"))}))}static createDataChannelPromise(e,t){let n;const i=new Promise((e=>{n=e})),r=i=>{const o=()=>{i.channel.removeEventListener(\"open\",o),n(i.channel)};i.channel.label===e&&(i.channel.addEventListener(\"open\",o),t.removeEventListener(\"datachannel\",r))};return t.addEventListener(\"datachannel\",r),i}async listenForProviderIce(e,t){await this.on(this.createProviderEventName(e),t,{timestamp:Date.now()})}async raiseProviderIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createProviderEventName(e)),t)}async listenForClientIce(e,t){await this.on(this.createClientEventName(e),t,{timestamp:Date.now()})}async raiseClientIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createClientEventName(e)),t)}cleanupIceListeners(e){this.removeAllListeners(this.createClientEventName(e)),this.removeAllListeners(this.createProviderEventName(e))}createClientEventName(e){return`ice-client-${e}`}createProviderEventName(e){return`ice-provider-${e}`}createRouteString(e){return`channel/${e}`}createRtcPeer(){return this.wire.environment.getRtcPeer()}async startClientOffer(){const e=Math.random().toString(),t=this.createRtcPeer();t.addEventListener(\"icecandidate\",(async t=>{t.candidate&&await this.raiseClientIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForProviderIce(e,(async e=>{await t.addIceCandidate(e.candidate)}));const n={request:t.createDataChannel(\"request\"),response:t.createDataChannel(\"response\")},i=await t.createOffer();await t.setLocalDescription(i);const r=Promise.all([n.request,n.response].map(this.ensureChannelOpened)).then((()=>{}));return{rtcClient:t,channels:n,offer:i,rtcConnectionId:e,channelsOpened:r}}async finishClientOffer(e,t,n){return await e.setRemoteDescription(t),await n,!0}async createProviderAnswer(e,t){const n=this.createRtcPeer(),i=Ze.createDataChannelPromise(\"request\",n),r=Ze.createDataChannelPromise(\"response\",n);n.addEventListener(\"icecandidate\",(async t=>{t.candidate&&await this.raiseProviderIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForClientIce(e,(async e=>{await n.addIceCandidate(e.candidate)})),await n.setRemoteDescription(t);const o=await n.createAnswer();await n.setLocalDescription(o);const s=Promise.all([i,r]).then((([t,n])=>(this.cleanupIceListeners(e),{request:t,response:n})));return{rtcClient:n,answer:o,channels:s}}}Je.RTCICEManager=Ze;var Qe={},Xe={};function et(e){return[...e.split(\".\").reverse().entries()].reduce(((e,[t,n])=>e+ +n*1e4**t),0)}function tt(e,t){return et(e)>=et(t)}function nt(e){return e.split(\"/\")[0]}Object.defineProperty(Xe,\"__esModule\",{value:!0}),Xe.runtimeUuidMeetsMinimumRuntimeVersion=Xe.parseRuntimeUuid=Xe.meetsMinimumRuntimeVersion=void 0,Xe.meetsMinimumRuntimeVersion=tt,Xe.parseRuntimeUuid=nt,Xe.runtimeUuidMeetsMinimumRuntimeVersion=function(e,t){return tt(nt(e),t)};var it,rt,ot,st,at,ct=s&&s.__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)},dt=s&&s.__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};Object.defineProperty(Qe,\"__esModule\",{value:!0}),Qe.ChannelProvider=void 0;const ht=pe,lt=Xe;class ut extends ht.ChannelBase{get connections(){return[...ct(this,it,\"f\")]}static handleClientDisconnection(e,t){const n=e.connections.find((e=>e.endpointId===t.endpointId));if(n)ct(e,st,\"f\").call(e,n);else{e.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name)).forEach(ct(e,st,\"f\"))}e.disconnectListener(t)}static setProviderRemoval(e,t){ut.removalMap.set(e,t)}constructor(e,t,n){super(),it.set(this,void 0),rt.set(this,void 0),ot.set(this,void 0),st.set(this,(e=>{const t=this.connections.filter((t=>t.endpointId!==e.endpointId));ct(this,ot,\"f\").closeEndpoint(e.endpointId),dt(this,it,t,\"f\")})),this.processAction=async(e,t,n)=>(ut.clientIsMultiRuntime(n)&&!(0,lt.runtimeUuidMeetsMinimumRuntimeVersion)(n.runtimeUuid,\"18.87.56.0\")?this.handleMultiRuntimeLegacyClient(n):this.checkForClientConnection(n),super.processAction(e,t,n)),at.set(this,(()=>{ct(this,ot,\"f\").close();const e=ut.removalMap.get(this);e&&e()})),dt(this,rt,new ht.ProtectedItems(e,t),\"f\"),this.connectListener=()=>{},this.disconnectListener=()=>{},dt(this,it,[],\"f\"),dt(this,ot,n,\"f\"),n.receive(this.processAction)}dispatch(e,t,n){const i=e.endpointId??this.getEndpointIdForOpenFinId(e,t);return i&&ct(this,ot,\"f\").isEndpointConnected(i)?ct(this,ot,\"f\").send(i,t,n):Promise.reject(new Error(`Client connection with identity uuid: ${e.uuid} / name: ${e.name} / endpointId: ${i} no longer connected.`))}async processConnection(e,t){return ct(this,it,\"f\").push(e),this.connectListener(e,t)}publish(e,t){return this.connections.map((n=>ct(this,ot,\"f\").send(n.endpointId,e,t)))}onConnection(e){this.connectListener=e}onDisconnection(e){this.disconnectListener=e}async destroy(){const e=ct(this,rt,\"f\");e.providerIdentity,dt(this,it,[],\"f\"),await e.close(),ct(this,at,\"f\").call(this)}async getAllClientInfo(){return this.connections.map((e=>{const{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}=e;return{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}}))}checkForClientConnection(e){if(!this.isClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider.\\n Client Identity: {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}isClientConnected(e){return ut.clientIdentityIncludesEndpointId(e)?this.connections.some((t=>t.endpointId===e.endpointId&&t.uuid===e.uuid&&t.name===e.name)):this.isLegacyClientConnected(e)}isLegacyClientConnected(e){return this.connections.some((t=>t.uuid===e.uuid&&t.name===e.name))}handleMultiRuntimeLegacyClient(e){if(!this.isLegacyClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider. Client Identity:\\n {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}getEndpointIdForOpenFinId(e,t){const n=this.connections.filter((t=>t.name===e.name&&t.uuid===e.uuid));if(n.length>=2){const n=ct(this,rt,\"f\"),{uuid:i,name:r}=e,o=n?.providerIdentity.uuid,s=n?.providerIdentity.name;console.warn(`WARNING: Dispatch call may have unintended results. The \"to\" argument of your dispatch call is missing the\\n \"endpointId\" parameter. The identity you are dispatching to ({uuid: ${i}, name: ${r}})\\n has multiple channelClients for this channel. Your dispatched action: (${t}) from the provider:\\n ({uuid: ${o}, name: ${s}}) will only be processed by the most recently-created client.`)}return n.pop()?.endpointId}static clientIdentityIncludesEndpointId(e){return void 0!==e.endpointId}static clientIsMultiRuntime(e){return void 0!==e.runtimeUuid}static async wireClose(e,t){await e.sendAction(\"destroy-channel\",{channelName:t})}}Qe.ChannelProvider=ut,it=new WeakMap,rt=new WeakMap,ot=new WeakMap,st=new WeakMap,at=new WeakMap,ut.removalMap=new WeakMap;var pt={};Object.defineProperty(pt,\"__esModule\",{value:!0}),pt.MessageReceiver=void 0;const wt=ue,yt=d;class ft extends yt.Base{constructor(e){super(e),this.onmessage=e=>\"process-channel-message\"===e.action&&(this.processChannelMessage(e),!0),this.endpointMap=new Map,this.latestEndpointIdByChannelId=new Map,e.registerMessageHandler(this.onmessage.bind(this))}async processChannelMessage(e){const{senderIdentity:t,providerIdentity:n,action:i,ackToSender:r,payload:o,intendedTargetIdentity:s}=e.payload,a=s.channelId??s.endpointId??this.latestEndpointIdByChannelId.get(n.channelId),c=this.endpointMap.get(a);if(!c)return r.payload.success=!1,r.payload.reason=`Client connection with identity uuid: ${this.wire.me.uuid} / name: ${this.wire.me.name} / endpointId: ${a} no longer connected.`,this.wire.sendRaw(r);try{const e=await c(i,o,t);return r.payload.payload=r.payload.payload||{},r.payload.payload.result=e,this.wire.sendRaw(r)}catch(e){return r.payload.success=!1,r.payload.reason=e.message,this.wire.sendRaw(r)}}addEndpoint(e,t,n){this.endpointMap.set(n,e),t!==n&&this.latestEndpointIdByChannelId.set(t,n)}removeEndpoint(e,t){this.endpointMap.delete(t),this.latestEndpointIdByChannelId.get(e)===t&&this.latestEndpointIdByChannelId.delete(e)}checkForPreviousClientConnection(e){const t=this.latestEndpointIdByChannelId.get(e);t&&(wt.ChannelClient.closeChannelByEndpointId(t),console.warn(\"You have created a second connection to an older provider. First connection has been removed from the clientMap\"),console.warn(\"If the provider calls publish(), you may receive multiple messages.\"))}}pt.MessageReceiver=ft;var gt={};Object.defineProperty(gt,\"__esModule\",{value:!0}),gt.ProtocolManager=void 0;gt.ProtocolManager=class{constructor(e){this.ProtocolsInPreferenceOrder=e,this.DefaultClientProtocols=[\"classic\"],this.DefaultProviderProtocols=[\"classic\"],this.getClientProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultClientProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(\", \")}.`);return t},this.getProviderProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultProviderProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(\", \")}.`);return t},this.getCompatibleProtocols=(e,t)=>t.supportedProtocols.filter((t=>e.some((e=>e.type===t.type&&t.version>=e.minimumVersion&&e.version>=(t.minimumVersion??0))))).slice(0,t.maxProtocols)}};var mt={};Object.defineProperty(mt,\"__esModule\",{value:!0});class vt{static combine(e,t){return new vt(e,t)}constructor(e,t){this.primary=e,this.secondary=t}onEndpointDisconnect(e,t){this.primary.onEndpointDisconnect(e,(()=>{this.secondary.isEndpointConnected(e)||t()})),this.secondary.onEndpointDisconnect(e,(()=>{this.primary.isEndpointConnected(e)||t()}))}isValidEndpointPayload(e){return this.primary.isValidEndpointPayload(e)||this.secondary.isValidEndpointPayload(e)}async closeEndpoint(e){await this.primary.closeEndpoint(e),await this.secondary.closeEndpoint(e)}isEndpointConnected(e){return this.primary.isEndpointConnected(e)||this.secondary.isEndpointConnected(e)}async addEndpoint(e,t){this.primary.isValidEndpointPayload(t)&&await this.primary.addEndpoint(e,t),this.secondary.isValidEndpointPayload(t)&&await this.secondary.addEndpoint(e,t)}receive(e){this.primary.receive(e),this.secondary.receive(e)}send(e,t,n){return this.primary.isEndpointConnected(e)?this.primary.send(e,t,n):this.secondary.send(e,t,n)}async close(){await Promise.all([this.primary.close(),this.secondary.close()])}}mt.default=vt;var Ct,bt,It=s&&s.__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},Et=s&&s.__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)},xt=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(xe,\"__esModule\",{value:!0}),xe.ConnectionManager=void 0;const At=Ae,Pt=d,Mt=Oe,_t=Fe,Ot=Je,St=Qe,Rt=pt,Ft=gt,jt=xt(mt);class kt extends Pt.Base{static getProtocolOptionsFromStrings(e){return e.map((e=>{switch(e){case\"rtc\":return _t.RTCInfo;case\"classic\":return Mt.ClassicInfo;default:return(0,At.exhaustiveCheck)(e,[\"rtc\",\"classic\"])}}))}constructor(e){super(e),Ct.set(this,void 0),bt.set(this,void 0),this.removeChannelFromProviderMap=e=>{this.providerMap.delete(e)},this.onmessage=e=>\"process-channel-connection\"===e.action&&(this.processChannelConnection(e),!0),this.providerMap=new Map,this.protocolManager=new Ft.ProtocolManager(\"node\"===this.wire.environment.type?[\"classic\"]:[\"rtc\",\"classic\"]),It(this,Ct,new Rt.MessageReceiver(e),\"f\"),It(this,bt,new Ot.RTCICEManager(e),\"f\"),e.registerMessageHandler(this.onmessage.bind(this))}createProvider(e,t){const n=Object.assign(this.wire.environment.getDefaultChannelOptions().create,e||{}),i=this.protocolManager.getProviderProtocols(n?.protocols),r=i.map((e=>{switch(e){case\"rtc\":return new _t.RTCStrategy;case\"classic\":return new Mt.ClassicStrategy(this.wire,Et(this,Ct,\"f\"),t.channelId,t);default:return(0,At.exhaustiveCheck)(e,[\"rtc\",\"classic\"])}}));let o;if(2===r.length){const[e,t]=r;o=jt.default.combine(e,t)}else{if(1!==r.length)throw new Error(\"failed to combine strategies\");[o]=r}const s=new St.ChannelProvider(t,(()=>St.ChannelProvider.wireClose(this.wire,t.channelName)),o),a=t.channelId;return this.providerMap.set(a,{provider:s,strategy:o,supportedProtocols:kt.getProtocolOptionsFromStrings(i)}),St.ChannelProvider.setProviderRemoval(s,this.removeChannelFromProviderMap.bind(this)),s}async createClientOffer(e){const t=this.protocolManager.getClientProtocols(e?.protocols);let n;return{offer:{supportedProtocols:await Promise.all(t.map((async e=>{switch(e){case\"rtc\":{const{rtcClient:e,channels:t,offer:i,rtcConnectionId:r,channelsOpened:o}=await Et(this,bt,\"f\").startClientOffer();return n={rtcClient:e,channels:t,channelsOpened:o},{type:\"rtc\",version:_t.RTCInfo.version,payload:{offer:i,rtcConnectionId:r}}}case\"classic\":return{type:\"classic\",version:Mt.ClassicInfo.version};default:return(0,At.exhaustiveCheck)(e,[\"rtc\",\"classic\"])}}))),maxProtocols:2},rtc:n}}async createClientStrategy(e,t){t.endpointId||(t.endpointId=this.wire.environment.getNextMessageId(),Et(this,Ct,\"f\").checkForPreviousClientConnection(t.channelId));const n=t.answer??{supportedProtocols:[{type:\"classic\",version:1}]},i=(await Promise.all(n.supportedProtocols.map((async n=>\"rtc\"===n.type&&e?(await Et(this,bt,\"f\").finishClientOffer(e.rtcClient,n.payload.answer,e.channelsOpened),new _t.RTCStrategy):\"classic\"===n.type?new Mt.ClassicStrategy(this.wire,Et(this,Ct,\"f\"),t.endpointId,t):null)))).filter((e=>null!==e));let r;if(e&&!i.some((e=>e instanceof _t.RTCStrategy))&&e&&e.rtcClient.close(),i.length>=2)r=jt.default.combine(i[0],i[1]);else{if(!i.length)throw new Error(\"No compatible protocols\");[r]=i}const o={endpointIdentity:t,rtc:e};return r.addEndpoint(t.channelId,o),r}async processChannelConnection(e){const{clientIdentity:t,providerIdentity:n,ackToSender:i,payload:r,offer:o}=e.payload;t.endpointId?t.isLocalEndpointId=!1:(t.endpointId=this.wire.environment.getNextMessageId(),t.isLocalEndpointId=!0);const s=n.channelId,a=this.providerMap.get(s);if(!a)return i.payload.success=!1,i.payload.reason=`Channel \"${n.channelName}\" has been destroyed.`,this.wire.sendRaw(i);const{provider:c,strategy:d,supportedProtocols:h}=a;try{if(!(c instanceof St.ChannelProvider))throw Error(\"Cannot connect to a channel client\");const e=o??{supportedProtocols:[{type:\"classic\",version:1}],maxProtocols:1},n=this.protocolManager.getCompatibleProtocols(h,e);if(!n.length)throw new Error(\"This provider does not support any of the offered protocols.\");const s=await c.processConnection(t,r);i.payload.payload=i.payload.payload||{};let a={supportedProtocols:[],endpointPayloadPromise:Promise.resolve({endpointIdentity:t})};return a=await n.reduce((async(e,t)=>{const n=await e;if(\"rtc\"===t.type){const{answer:e,rtcClient:i,channels:r}=await Et(this,bt,\"f\").createProviderAnswer(t.payload.rtcConnectionId,t.payload.offer);n.supportedProtocols.push({type:\"rtc\",version:_t.RTCInfo.version,payload:{answer:e}}),n.endpointPayloadPromise=n.endpointPayloadPromise.then((e=>r.then((t=>({...e,rtc:{rtcClient:i,channels:t}})))))}else n.supportedProtocols.push({type:\"classic\",version:Mt.ClassicInfo.version});return n}),Promise.resolve(a)),a.endpointPayloadPromise.then((e=>d.addEndpoint(t.endpointId,e))),i.payload.payload.result=s,i.payload.payload.answer=a,this.wire.sendRaw(i)}catch(e){return i.payload.success=!1,i.payload.reason=e.message,this.wire.sendRaw(i)}}}xe.ConnectionManager=kt,Ct=new WeakMap,bt=new WeakMap;var Lt,Tt,$t,Bt=s&&s.__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},Gt=s&&s.__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)};Object.defineProperty(le,\"__esModule\",{value:!0}),le.Channel=void 0;const Wt=t,Ht=G,Nt=d,Dt=ue,Ut=xe,Vt=Qe;function zt(e){const t=Math.floor(e/10),n=Math.min(3e4,500*2**t);return new Promise((e=>{setTimeout((()=>{e(!1)}),n)}))}class Kt extends Nt.EmitterBase{constructor(e){super(e,\"channel\"),Lt.set(this,void 0),Tt.set(this,new Wt.EventEmitter),$t.set(this,new Ht.AsyncRetryableLazy((async()=>{await Promise.all([this.on(\"disconnected\",(e=>{Dt.ChannelClient.handleProviderDisconnect(e)})),this.on(\"connected\",((...e)=>{Gt(this,Tt,\"f\").emit(\"connected\",...e)}))]).catch((()=>new Error(\"error setting up channel connection listeners\")))}))),Bt(this,Lt,new Ut.ConnectionManager(e),\"f\")}async getAllChannels(){return this.wire.sendAction(\"get-all-channels\").then((({payload:e})=>e.data))}async onChannelConnect(e){await this.on(\"connected\",e)}async onChannelDisconnect(e){await this.on(\"disconnected\",e)}async safeConnect(e,t,n){const i={count:0};do{let r=()=>{};const o=new Promise((t=>{r=n=>{e===n.channelName&&t(!0)},Gt(this,Tt,\"f\").on(\"connected\",r)}));try{if(i.count>0){i.gotConnectedEvent=await Promise.race([zt(i.count),o]);const t=await this.wire.sendAction(\"connect-to-channel\",{...n,retryInfo:i});return console.log(`Successfully connected to channelName: ${e}`),t.payload.data}const t=this.wire.sendAction(\"connect-to-channel\",n);i.originalMessageId=t.messageId;return(await t).payload.data}catch(n){if(!n.message.includes(\"internal-nack\"))throw n;t&&0===i.count&&console.warn(`No channel found for channelName: ${e}. Waiting for connection...`)}finally{i.count+=1,Gt(this,Tt,\"f\").removeListener(\"connected\",r)}}while(t);throw new Error(`No channel found for channelName: ${e}.`)}async connect(e,t={}){if(await Gt(this,$t,\"f\").getValue(),!e||\"string\"!=typeof e)throw new Error(\"Please provide a channelName string to connect to a channel.\");const n={wait:!0,...this.wire.environment.getDefaultChannelOptions().connect,...t},{offer:i,rtc:r}=await Gt(this,Lt,\"f\").createClientOffer(n);let o;(this.fin.me.isFrame||this.fin.me.isView||this.fin.me.isWindow)&&(o=(await this.fin.me.getInfo()).url);const s={channelName:e,...n,offer:i,connectionUrl:o},a=await this.safeConnect(e,n.wait,s),c=await Gt(this,Lt,\"f\").createClientStrategy(r,a),d=new Dt.ChannelClient(a,(()=>Dt.ChannelClient.wireClose(this.wire,a,a.endpointId)),c);return c.onEndpointDisconnect(a.channelId,(async()=>{try{await d.sendDisconnectAction()}catch(e){console.warn(`Something went wrong during disconnect for client with uuid: ${a.uuid} / name: ${a.name} / endpointId: ${a.endpointId}.`)}finally{Dt.ChannelClient.handleProviderDisconnect(a)}})),d}async create(e,t){if(!e)throw new Error(\"Please provide a channelName to create a channel\");const{payload:{data:n}}=await this.wire.sendAction(\"create-channel\",{channelName:e}),i=Gt(this,Lt,\"f\").createProvider(t,n);return this.on(\"client-disconnected\",(t=>{t.channelName===e&&Vt.ChannelProvider.handleClientDisconnection(i,t)})),i}}le.Channel=Kt,Lt=new WeakMap,Tt=new WeakMap,$t=new WeakMap,Object.defineProperty(de,\"__esModule\",{value:!0}),de.InterAppPayload=de.InterApplicationBus=void 0;const qt=t,Jt=d,Yt=he,Zt=le,Qt=O;class Xt extends Jt.Base{constructor(e){super(e),this.events={subscriberAdded:\"subscriber-added\",subscriberRemoved:\"subscriber-removed\"},this.refCounter=new Yt.RefCounter,this.Channel=new Zt.Channel(e),this.emitter=new qt.EventEmitter,e.registerMessageHandler(this.onmessage.bind(this)),this.on=this.emitter.on.bind(this.emitter),this.removeAllListeners=this.emitter.removeAllListeners.bind(this.emitter)}async publish(e,t){await this.wire.sendAction(\"publish-message\",{topic:e,message:t,sourceWindowName:this.me.name})}async send(e,t,n){const i=(0,Qt.validateIdentity)(e);if(i)throw new Error(i);await this.wire.sendAction(\"send-message\",{destinationUuid:e.uuid,destinationWindowName:e.name,topic:t,message:n,sourceWindowName:this.me.name})}subscribe(e,t,n){const i=this.createSubscriptionKey(e.uuid,e.name||\"*\",t);return this.emitter.on(i,n),this.refCounter.actOnFirst(i,(async()=>{await this.wire.sendAction(\"subscribe\",{sourceUuid:e.uuid,sourceWindowName:e.name||\"*\",topic:t,destinationWindowName:this.me.name})}),(()=>Promise.resolve()))}unsubscribe(e,t,n){const i=e.name||\"*\",r=this.createSubscriptionKey(e.uuid,i,t);return this.emitter.removeListener(r,n),this.refCounter.actOnLast(r,(async()=>{await this.wire.sendAction(\"unsubscribe\",{sourceUuid:e.uuid,sourceWindowName:i,topic:t,destinationWindowName:this.me.name})}),(()=>new Promise((e=>e)).then((()=>{}))))}processMessage(e){const{payload:{message:t,sourceWindowName:n,sourceUuid:i,topic:r}}=e,o=[this.createSubscriptionKey(i,n,r),this.createSubscriptionKey(i,\"*\",r),this.createSubscriptionKey(\"*\",\"*\",r)],s={uuid:i,name:n};o.forEach((e=>{this.emitter.emit(e,t,s)}))}emitSubscriverEvent(e,t){const{payload:{targetName:n,uuid:i,topic:r}}=t,o={name:n,uuid:i,topic:r};this.emitter.emit(e,o)}createSubscriptionKey(e,t,n){const i=t||\"*\";if(!(e&&i&&n))throw new Error(\"Missing uuid, name, or topic string\");return function(...e){return e.map((e=>Buffer.from(`${e}`).toString(\"base64\"))).join(\"/\")}(e,i,n)}onmessage(e){const{action:t}=e;switch(t){case\"process-message\":this.processMessage(e);break;case this.events.subscriberAdded:this.emitSubscriverEvent(this.events.subscriberAdded,e);break;case this.events.subscriberRemoved:this.emitSubscriverEvent(this.events.subscriberRemoved,e)}return!0}}de.InterApplicationBus=Xt;de.InterAppPayload=class{};var en={};Object.defineProperty(en,\"__esModule\",{value:!0}),en.Clipboard=void 0;const tn=d;class nn extends tn.Base{async writeText(e){await this.wire.sendAction(\"clipboard-write-text\",e)}async readText(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-text\",{type:e});return t.data}async writeImage(e){await this.wire.sendAction(\"clipboard-write-image\",e)}async readImage(e={format:\"dataURL\"}){const{payload:t}=await this.wire.sendAction(\"clipboard-read-image\",e);return t.data}async writeHtml(e){await this.wire.sendAction(\"clipboard-write-html\",e)}async readHtml(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-html\",{type:e});return t.data}async writeRtf(e){await this.wire.sendAction(\"clipboard-write-rtf\",e)}async readRtf(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-rtf\",{type:e});return t.data}async write(e){await this.wire.sendAction(\"clipboard-write\",e)}async getAvailableFormats(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-formats\",{type:e});return t.data}}en.Clipboard=nn;var rn={},on={},sn={};Object.defineProperty(sn,\"__esModule\",{value:!0}),sn.ExternalApplication=void 0;const an=d;class cn extends an.EmitterBase{constructor(e,t){super(e,\"external-application\",t.uuid),this.identity=t}getInfo(){return this.wire.sendAction(\"get-external-application-info\",this.identity).then((({payload:e})=>e.data))}}sn.ExternalApplication=cn,Object.defineProperty(on,\"__esModule\",{value:!0}),on.ExternalApplicationModule=void 0;const dn=d,hn=sn;class ln extends dn.Base{wrap(e){return this.wire.sendAction(\"external-application-wrap\").catch((e=>{})),Promise.resolve(new hn.ExternalApplication(this.wire,{uuid:e}))}wrapSync(e){return this.wire.sendAction(\"external-application-wrap-sync\").catch((e=>{})),new hn.ExternalApplication(this.wire,{uuid:e})}}on.ExternalApplicationModule=ln,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(on,e),n(sn,e)}(rn);var un={},pn={},wn={};Object.defineProperty(wn,\"__esModule\",{value:!0}),wn._Frame=void 0;const yn=d;class fn extends yn.EmitterBase{constructor(e,t){super(e,\"frame\",t.uuid,t.name),this.identity=t}getInfo(){return this.wire.sendAction(\"get-frame-info\",this.identity).then((({payload:e})=>e.data))}getParentWindow(){return this.wire.sendAction(\"get-parent-window\",this.identity).then((({payload:e})=>e.data))}}wn._Frame=fn,Object.defineProperty(pn,\"__esModule\",{value:!0}),pn._FrameModule=void 0;const gn=d,mn=O,vn=wn;class Cn extends gn.Base{async wrap(e){this.wire.sendAction(\"frame-wrap\").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}wrapSync(e){this.wire.sendAction(\"frame-wrap-sync\").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}getCurrent(){return this.wire.sendAction(\"frame-get-current\").catch((e=>{})),Promise.resolve(new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity()))}getCurrentSync(){return this.wire.sendAction(\"frame-get-current-sync\").catch((e=>{})),new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity())}}pn._FrameModule=Cn,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(pn,e),n(wn,e)}(un);var bn={};Object.defineProperty(bn,\"__esModule\",{value:!0}),bn.GlobalHotkey=void 0;const In=d;class En extends In.EmitterBase{constructor(e){super(e,\"global-hotkey\")}async register(e,t){await this.on(e,t),await this.wire.sendAction(\"global-hotkey-register\",{hotkey:e})}async unregister(e){await this.removeAllListeners(e),await this.wire.sendAction(\"global-hotkey-unregister\",{hotkey:e})}async unregisterAll(){await Promise.all(this.eventNames().filter((e=>!(\"registered\"===e||\"unregistered\"===e))).map((e=>this.removeAllListeners(e)))),await this.wire.sendAction(\"global-hotkey-unregister-all\",{})}async isRegistered(e){const{payload:{data:t}}=await this.wire.sendAction(\"global-hotkey-is-registered\",{hotkey:e});return t}}bn.GlobalHotkey=En;var xn,An={},Pn={},Mn={},_n=s&&s.__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)};Object.defineProperty(Mn,\"__esModule\",{value:!0}),Mn.Platform=void 0;const On=d,Sn=O,Rn=new Map;class Fn extends On.EmitterBase{constructor(e,t){super(t.wire,\"application\",e.uuid),this.getClient=e=>{this.wire.sendAction(\"platform-get-client\",this.identity).catch((e=>{}));const t=e||this.identity,{uuid:n}=t;if(!Rn.has(n)){const e=_n(this,xn,\"f\").call(this,n);Rn.set(n,e)}return Rn.get(n)},xn.set(this,(async e=>{try{const t=`custom-frame-${e}`,n=await this._channel.connect(t,{wait:!1});return n.onDisconnection((()=>{Rn.delete(e)})),n}catch(t){throw Rn.delete(e),new Error(\"The targeted Platform is not currently running. Listen for application-started event for the given Uuid.\")}})),this.launchLegacyManifest=this.launchContentManifest;const n=(0,Sn.validateIdentity)(e);if(n)throw new Error(n);this._channel=t,this.identity={uuid:e.uuid},this.Layout=this.fin.Platform.Layout,this.Application=this.fin.Application.wrapSync(this.identity)}async createView(e,t,n){this.wire.sendAction(\"platform-create-view\",this.identity).catch((e=>{}));const i=await this.getClient(),r=await i.dispatch(\"create-view\",{target:t,opts:e,targetView:n});if(!r||(0,Sn.validateIdentity)(r.identity))throw new Error(`When overwriting the createView call, please return an object that has a valid 'identity' property: ${JSON.stringify(r)}`);return this.fin.View.wrapSync(r.identity)}async createWindow(e){this.wire.sendAction(\"platform-create-window\",this.identity).catch((e=>{}));const t=await this.getClient();e.reason||(e.reason=\"api-call\");const n=await t.dispatch(\"create-view-container\",e);if(!n||(0,Sn.validateIdentity)(n.identity))throw new Error(`When overwriting the createWindow call, please return an object that has a valid 'identity' property: ${JSON.stringify(n)}`);const{identity:i}=n,r=this.fin.Window.wrapSync(i);return r.name=i.name,r.uuid=i.uuid,r}async quit(){this.wire.sendAction(\"platform-quit\",this.identity).catch((e=>{}));return(await this.getClient()).dispatch(\"quit\")}async closeView(e){this.wire.sendAction(\"platform-close-view\",this.identity).catch((e=>{}));const t=await this.getClient();await t.dispatch(\"close-view\",{view:e})}async reparentView(e,t){console.warn(\"Platform.reparentView has been deprecated, please use Platform.createView\"),this.wire.sendAction(\"platform-reparent-view\",this.identity).catch((e=>{}));const n={...e,uuid:e.uuid??this.identity.uuid},i=await this.fin.View.wrap(n),r=await i.getOptions();return this.createView(r,t)}async getSnapshot(){this.wire.sendAction(\"platform-get-snapshot\",this.identity).catch((e=>{}));return(await this.getClient()).dispatch(\"get-snapshot\")}async getViewSnapshot(e){return(await this.getClient()).dispatch(\"get-view-snapshot\",{viewIdentity:e})}async applySnapshot(e,t){this.wire.sendAction(\"platform-apply-snapshot\",this.identity).catch((e=>{}));const n=\"Requested snapshot must be a valid Snapshot object, or a url or filepath to such an object.\";let i;if(\"string\"==typeof e)try{i=(await this._channel.wire.sendAction(\"get-application-manifest\",{manifestUrl:e})).payload.data}catch(e){throw new Error(`${n}: ${e}`)}else i=e;if(!i.windows)throw new Error(n);const r=await this.getClient();return await r.dispatch(\"apply-snapshot\",{snapshot:i,options:t}),this}async fetchManifest(e){return(await this.getClient()).dispatch(\"platform-fetch-manifest\",{manifestUrl:e})}async launchContentManifest(e){this.wire.sendAction(\"platform-launch-content-manifest\",this.identity).catch((()=>{}));const t=await this.getClient(),n=await this.fetchManifest(e);return t.dispatch(\"launch-into-platform\",{manifest:n,manifestUrl:e}),this}async setWindowContext(e={},t){if(this.wire.sendAction(\"platform-set-window-context\",this.identity).catch((e=>{})),!e)throw new Error(\"Please provide a serializable object or string to set the context.\");const n=await this.getClient(),{entityType:i}=t?await this.fin.System.getEntityInfo(t.uuid,t.name):this.fin.me;await n.dispatch(\"set-window-context\",{context:e,entityType:i,target:t||{uuid:this.fin.me.uuid,name:this.fin.me.name}})}async getWindowContext(e){this.wire.sendAction(\"platform-get-window-context\",this.identity).catch((e=>{}));const t=await this.getClient(),{entityType:n}=e?await this.fin.System.getEntityInfo(e.uuid,e.name):this.fin.me;return t.dispatch(\"get-window-context\",{target:e||{uuid:this.fin.me.uuid,name:this.fin.me.name},entityType:n})}async closeWindow(e,t={skipBeforeUnload:!1}){this.wire.sendAction(\"platform-close-window\",this.identity).catch((e=>{}));return(await this.getClient()).dispatch(\"close-window\",{windowId:e,options:t})}}Mn.Platform=Fn,xn=new WeakMap;var jn={},kn={},Ln={},Tn={};function $n(e){switch(e){case\"columns\":case\"grid\":case\"rows\":case\"tabs\":return!0;default:return!1}}Object.defineProperty(Tn,\"__esModule\",{value:!0}),Tn.overrideFromComposables=Tn.isValidPresetType=void 0,Tn.isValidPresetType=$n,Tn.overrideFromComposables=function(...e){return t=>e.reduceRight(((e,t)=>n=>t(e(n))),(e=>e))(t)},Tn.default={isValidPresetType:$n};var Bn={},Gn={},Wn={};Object.defineProperty(Wn,\"__esModule\",{value:!0}),Wn.ApiConsumer=void 0;Wn.ApiConsumer=class{constructor(e){this.strategy=e,this.consume=async e=>(await this.strategy.getExposedFunctions(e)).reduce(((t,n)=>({...t,[n.key]:this.strategy.createFunction(n,e)})),{})}};var Hn={},Nn={};Object.defineProperty(Nn,\"__esModule\",{value:!0}),Nn.expose=Nn.getExposedProperties=void 0;const Dn=Symbol(\"exposedProperties\");Nn.getExposedProperties=e=>e[Dn]||e.prototype[Dn]||[];Nn.expose=e=>(t,n,i)=>{t[Dn]=t[Dn]||[],t[Dn].push({key:n,descriptor:i,options:e})},Object.defineProperty(Hn,\"__esModule\",{value:!0}),Hn.ApiExposer=void 0;const Un=Nn;Hn.ApiExposer=class{constructor(e){this.strategy=e,this.exposeInstance=async(e,t)=>{const n=(0,Un.getExposedProperties)(e),i=await Promise.all(n.map((async({key:n,options:i})=>({key:n,options:await this.strategy.exposeFunction(e[n].bind(e),{key:n,options:i,meta:t})}))));await this.strategy.exposeMeta(t,i)}}};var Vn={},zn={},Kn={};Object.defineProperty(Kn,\"__esModule\",{value:!0}),Kn.ChannelsConsumer=void 0;Kn.ChannelsConsumer=class{constructor(e){this.channel=e,this.getExposedFunctions=async e=>{const{id:t}=e,{props:n}=await this.channel.dispatch(`api-meta:${t}`);return n},this.createFunction=e=>(...t)=>{const{action:n}=e.options;return this.channel.dispatch(n,{args:t})}}};var qn={};Object.defineProperty(qn,\"__esModule\",{value:!0}),qn.ChannelsExposer=void 0;qn.ChannelsExposer=class{constructor(e){this.channelProviderOrClient=e,this.exposeFunction=async(e,t)=>{const{key:n,options:i,meta:r}=t,{id:o}=r,s=`${o}.${i?.action||n}`;return await this.channelProviderOrClient.register(s,(async({args:t})=>e(...t))),{action:s}},this.exposeMeta=async({id:e},t)=>{const n=`api-meta:${e}`;await this.channelProviderOrClient.register(n,(()=>({props:t})))}}},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Kn,e),n(qn,e)}(zn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(zn,e)}(Vn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Wn,e),n(Hn,e),n(Vn,e),n(Nn,e)}(Gn);var Jn={};Object.defineProperty(Jn,\"__esModule\",{value:!0}),Jn.createRelayedDispatch=exports.relayChannelClientApi_1=Jn.relayChannelClientApi=void 0;const Yn=[\"no longer connected\",\"RTCDataChannel closed unexpectedly\",\"The client you are trying to dispatch from is disconnected from the target provider\"];exports.relayChannelClientApi_1=Jn.relayChannelClientApi=async(e,t)=>{e.register(`relay:${t}`,(({action:t,target:n,payload:i})=>e.dispatch(n,t,i))),await Promise.resolve()};Jn.createRelayedDispatch=(e,t,n,i)=>async(r,o)=>{try{return await e.dispatch(`relay:${n}`,{action:r,payload:o,target:t})}catch(e){if(s=e.message,Yn.some((e=>s.includes(e)))&&i)throw new Error(i);throw e}var s};var Zn,Qn,Xn,ei=s&&s.__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},ti=s&&s.__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)};Object.defineProperty(Bn,\"__esModule\",{value:!0}),Bn.ColumnOrRow=Bn.TabStack=Bn.LayoutNode=void 0;const ni=Gn,ii=Jn;class ri{constructor(e,t){Zn.set(this,void 0),this.isRoot=()=>ti(this,Zn,\"f\").isRoot(this.entityId),this.exists=()=>ti(this,Zn,\"f\").exists(this.entityId),this.getParent=async()=>{const e=await ti(this,Zn,\"f\").getParent(this.entityId);if(e)return ri.getEntity(e,ti(this,Zn,\"f\"))},this.createAdjacentStack=async(e,t)=>{const n=await ti(this,Zn,\"f\").createAdjacentStack(this.entityId,e,t);return ri.getEntity({entityId:n,type:\"stack\"},ti(this,Zn,\"f\"))},this.getAdjacentStacks=async e=>(await ti(this,Zn,\"f\").getAdjacentStacks({targetId:this.entityId,edge:e})).map((e=>ri.getEntity({type:\"stack\",entityId:e.entityId},ti(this,Zn,\"f\")))),ei(this,Zn,e,\"f\"),this.entityId=t}}Bn.LayoutNode=ri,Zn=new WeakMap,ri.newLayoutEntitiesClient=async(e,t,n)=>{const i=(0,ii.createRelayedDispatch)(e,n,\"layout-relay\",\"You are trying to interact with a layout component on a window that does not exist or has been destroyed.\");return new ni.ApiConsumer(new ni.ChannelsConsumer({dispatch:i})).consume({id:t})},ri.getEntity=(e,t)=>{const{entityId:n,type:i}=e;switch(i){case\"column\":case\"row\":return new si(t,n,i);case\"stack\":return new oi(t,n);default:throw new Error(`Unrecognised Layout Entity encountered ('${JSON.stringify(e)})`)}};class oi extends ri{constructor(e,t){super(e,t),Qn.set(this,void 0),this.type=\"stack\",this.getViews=()=>ti(this,Qn,\"f\").getStackViews(this.entityId),this.addView=async(e,t={index:0})=>ti(this,Qn,\"f\").addViewToStack(this.entityId,e,t),this.removeView=async e=>{await ti(this,Qn,\"f\").removeViewFromStack(this.entityId,e)},this.setActiveView=async e=>{await ti(this,Qn,\"f\").setStackActiveView(this.entityId,e)},ei(this,Qn,e,\"f\")}}Bn.TabStack=oi,Qn=new WeakMap;class si extends ri{constructor(e,t,n){super(e,t),Xn.set(this,void 0),this.getContent=async()=>(await ti(this,Xn,\"f\").getContent(this.entityId)).map((e=>ri.getEntity(e,ti(this,Xn,\"f\")))),ei(this,Xn,e,\"f\"),this.type=n}}Bn.ColumnOrRow=si,Xn=new WeakMap;var ai={};Object.defineProperty(ai,\"__esModule\",{value:!0}),ai.DEFAULT_LAYOUT_KEY=ai.LAYOUT_CONTROLLER_ID=void 0,ai.LAYOUT_CONTROLLER_ID=\"layout-entities\",ai.DEFAULT_LAYOUT_KEY=\"__default__\";var ci,di,hi,li=s&&s.__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)};Object.defineProperty(Ln,\"__esModule\",{value:!0}),Ln.Layout=void 0;const ui=G,pi=O,wi=d,yi=Tn,fi=Bn,gi=ai;class mi extends wi.Base{static getClient(e){return li(e,di,\"f\").getValue()}constructor(e,t){super(t),ci.add(this),di.set(this,new ui.Lazy((async()=>fi.LayoutNode.newLayoutEntitiesClient(await this.platform.getClient(),gi.LAYOUT_CONTROLLER_ID,this.identity)))),this.replace=async e=>{this.wire.sendAction(\"layout-replace\").catch((e=>{}));const t=await this.platform.getClient();await t.dispatch(\"replace-layout\",{target:this.identity,opts:{layout:e}})},this.replaceView=async(e,t)=>{this.wire.sendAction(\"layout-replace-view\").catch((e=>{}));const n=await this.platform.getClient();await n.dispatch(\"replace-view\",{target:this.identity,opts:{viewToReplace:e,newView:t}})},this.applyPreset=async e=>{this.wire.sendAction(\"layout-apply-preset\").catch((e=>{}));const t=await this.platform.getClient(),{presetType:n}=e;if(!n||!(0,yi.isValidPresetType)(n))throw new Error(\"Cannot apply preset layout, please include an applicable presetType property in the PresetLayoutOptions.\");await t.dispatch(\"apply-preset-layout\",{target:this.identity,opts:{presetType:n}})};const n=(0,pi.validateIdentity)(e);if(n)throw new Error(n);this.identity=e,this.platform=this.fin.Platform.wrapSync({uuid:e.uuid}),e.uuid===this.fin.me.uuid&&e.name===this.fin.me.name&&(this.init=this.fin.Platform.Layout.init)}async getConfig(){this.wire.sendAction(\"layout-get-config\").catch((e=>{}));return(await this.platform.getClient()).dispatch(\"get-frame-snapshot\",{target:this.identity})}async getCurrentViews(){this.wire.sendAction(\"layout-get-views\").catch((e=>{}));const e=await this.platform.getClient();return(await e.dispatch(\"get-layout-views\",{target:this.identity})).map((e=>this.fin.View.wrapSync(e)))}async getRootItem(){this.wire.sendAction(\"layout-get-root-item\").catch((()=>{}));const e=await li(this,di,\"f\").getValue(),t=await e.getRoot(\"layoutName\"in this.identity?this.identity:void 0);return fi.LayoutNode.getEntity(t,e)}async getStackByViewIdentity(e){this.wire.sendAction(\"layout-get-stack-by-view\").catch((()=>{}));const t=await li(this,di,\"f\").getValue(),n=await t.getStackByView(e);if(!n)throw new Error(`No stack found for view: ${e.uuid}/${e.name}`);return fi.LayoutNode.getEntity(n,t)}async addView(e,{location:t,targetView:n}={}){this.wire.sendAction(\"layout-add-view\").catch((e=>{}));const{identity:i}=await li(this,ci,\"m\",hi).call(this,\"layout-add-view\",{viewOptions:e,location:t,targetView:n});return{identity:i}}async closeView(e){this.wire.sendAction(\"layout-close-view\").catch((e=>{})),await li(this,ci,\"m\",hi).call(this,\"layout-close-view\",{viewIdentity:e})}}Ln.Layout=mi,di=new WeakMap,ci=new WeakSet,hi=async function(e,t){return(await this.platform.getClient()).dispatch(e,{target:this.identity,opts:t})};var vi,Ci,bi,Ii,Ei,xi=s&&s.__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)},Ai=s&&s.__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};Object.defineProperty(kn,\"__esModule\",{value:!0}),kn.LayoutModule=void 0;const Pi=d,Mi=Ln,_i=ai;class Oi extends Pi.Base{constructor(){super(...arguments),vi.add(this),Ci.set(this,!1),bi.set(this,null),this.init=async(e={})=>{if(this.wire.sendAction(\"layout-init\").catch((e=>{})),!this.wire.environment.layoutAllowedInContext(this.fin))throw new Error(\"Layout.init can only be called from a Window context.\");if(xi(this,Ci,\"f\"))throw new Error(\"Layout.init was already called, please use Layout.create to add additional layouts.\");\"openfin\"===this.wire.environment.type&&await this.fin.Platform.getCurrentSync().getClient(),Ai(this,Ci,!0,\"f\"),Ai(this,bi,await this.wire.environment.initLayoutManager(this.fin,this.wire,e),\"f\"),await this.wire.environment.applyLayoutSnapshot(this.fin,xi(this,bi,\"f\"),e);const t={name:this.fin.me.name,uuid:this.fin.me.uuid};if(!e.layoutManagerOverride){const e={layoutName:_i.DEFAULT_LAYOUT_KEY,...t};return xi(this,Ii,\"f\").call(this,e)}return this.wrapSync(t)},Ii.set(this,(e=>{const t=\"[Layout] You are using a deprecated property `layoutManager` - it will throw if you access it starting in v37.\",n=new Proxy({},{get(e,n){throw console.warn(`[Layout-mgr-proxy] accessing ${n.toString()}`),new Error(t)}}),i=Object.assign(this.wrapSync(e),{layoutManager:n});return new Proxy(i,{get(e,n){if(\"layoutManager\"===n)throw console.warn(`[Layout-proxy] accessing ${n.toString()}`),new Error(t);return e[n]}})})),this.getCurrentLayoutManagerSync=()=>xi(this,vi,\"m\",Ei).call(this,\"fin.Platform.Layout.getCurrentLayoutManagerSync()\"),this.create=async e=>this.wire.environment.createLayout(xi(this,vi,\"m\",Ei).call(this,\"fin.Platform.Layout.create()\"),e),this.destroy=async e=>this.wire.environment.destroyLayout(xi(this,vi,\"m\",Ei).call(this,\"fin.Platform.Layout.destroy()\"),e)}async wrap(e){return this.wire.sendAction(\"layout-wrap\").catch((e=>{})),new Mi.Layout(e,this.wire)}wrapSync(e){return this.wire.sendAction(\"layout-wrap-sync\").catch((e=>{})),new Mi.Layout(e,this.wire)}async getCurrent(){if(this.wire.sendAction(\"layout-get-current\").catch((e=>{})),\"openfin\"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error(\"You are not in a Window context. Only Windows can have a Layout.\");const{uuid:e,name:t}=this.fin.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction(\"layout-get-current-sync\").catch((e=>{})),\"openfin\"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error(\"You are not in a Window context. Only Windows can have a Layout.\");const{uuid:e,name:t}=this.fin.me;return this.wrapSync({uuid:e,name:t})}async getLayoutByViewIdentity(e){this.wire.sendAction(\"layout-get-by-view-identity\").catch((()=>{}));let t=await this.wire.environment.getViewWindowIdentity(this.fin,e);t.identity&&(t=t.identity);try{const n=this.wrapSync(t),i=await Mi.Layout.getClient(n),r=await i.getLayoutIdentityForViewOrThrow(e);return this.wrapSync(r)}catch(n){if(![\"No action registered at target for\",\"getLayoutIdentityForViewOrThrow is not a function\"].some((e=>n.message.includes(e))))throw n;if(t.uuid===t.name)throw new Error(`View identity ${JSON.stringify(e)} is not attached to any layout in provider window ${JSON.stringify(t)}.`);return this.wrapSync(t)}}}kn.LayoutModule=Oi,Ci=new WeakMap,bi=new WeakMap,Ii=new WeakMap,vi=new WeakSet,Ei=function(e){if(!xi(this,bi,\"f\"))throw new Error(`You must call init before using the API ${e}`);return xi(this,bi,\"f\")},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(kn,e),n(Ln,e)}(jn),Object.defineProperty(Pn,\"__esModule\",{value:!0}),Pn.PlatformModule=void 0;const Si=d,Ri=Mn,Fi=jn;class ji extends Si.Base{constructor(e,t){super(e),this._channel=t,this.Layout=new Fi.LayoutModule(this.wire)}async init(e){if(!fin.__internal_.isPlatform||fin.me.name!==fin.me.uuid)throw new Error(\"fin.Platform.init should only be called from a custom platform provider running in the main window of the application.\");return this.wire.environment.initPlatform(this.fin,e)}async wrap(e){return this.wire.sendAction(\"platform-wrap\").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}wrapSync(e){return this.wire.sendAction(\"platform-wrap-sync\").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}async getCurrent(){return this.wire.sendAction(\"platform-get-current\").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction(\"platform-get-current-sync\").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}start(e){return this.wire.sendAction(\"platform-start\").catch((e=>{})),new Promise((async(t,n)=>{try{const{uuid:n}=e,i=await this.fin.Application._create({...e,isPlatformController:!0});i.once(\"platform-api-ready\",(()=>t(this.wrapSync({uuid:n})))),i._run({uuid:n})}catch(e){n(e)}}))}startFromManifest(e,t){return this.wire.sendAction(\"platform-start-from-manifest\").catch((e=>{})),new Promise((async(n,i)=>{try{const i=await this.fin.Application._createFromManifest(e);i.once(\"platform-api-ready\",(()=>n(this.wrapSync({uuid:i.identity.uuid})))),i._run(t)}catch(e){i(e)}}))}}Pn.PlatformModule=ji,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Pn,e),n(Mn,e)}(An);var ki={};!function(e){Object.defineProperty(e,\"__esModule\",{value:!0}),e.getMe=e.getBaseMe=e.environmentUnsupportedMessage=void 0;const t=J(),n=un,i=ie(),r=rn;function o(e,t,n){return{...{isView:\"view\"===e,isWindow:\"window\"===e,isFrame:\"iframe\"===e,isExternal:\"external connection\"===e},uuid:t,name:n,entityType:e}}e.environmentUnsupportedMessage=\"You are not running in OpenFin.\",e.getBaseMe=o,e.getMe=function(s){const{uuid:a,name:c,entityType:d}=s.me,h={setContext(){throw new Error(e.environmentUnsupportedMessage)},addContextHandler(){throw new Error(e.environmentUnsupportedMessage)},getContextGroups(){throw new Error(e.environmentUnsupportedMessage)},joinContextGroup(){throw new Error(e.environmentUnsupportedMessage)},removeFromContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getAllClientsInContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getInfoForContextGroup(){throw new Error(e.environmentUnsupportedMessage)}},l=\"Interop API has not been instantiated. Either connection has failed or you have not declared interop in your config.\",u={setContext(){throw new Error(l)},addContextHandler(){throw new Error(l)},getContextGroups(){throw new Error(l)},joinContextGroup(){throw new Error(l)},removeFromContextGroup(){throw new Error(l)},getAllClientsInContextGroup(){throw new Error(l)},getInfoForContextGroup(){throw new Error(l)}},p={eventNames:()=>{throw new Error(e.environmentUnsupportedMessage)},emit:()=>{throw new Error(e.environmentUnsupportedMessage)},listeners:()=>{throw new Error(e.environmentUnsupportedMessage)},listenerCount:()=>{throw new Error(e.environmentUnsupportedMessage)},on:()=>{throw new Error(e.environmentUnsupportedMessage)},addListener:()=>{throw new Error(e.environmentUnsupportedMessage)},once:()=>{throw new Error(e.environmentUnsupportedMessage)},prependListener:()=>{throw new Error(e.environmentUnsupportedMessage)},prependOnceListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeAllListeners:()=>{throw new Error(e.environmentUnsupportedMessage)}};switch(d){case\"view\":return Object.assign(new t.View(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case\"window\":return Object.assign(new i._Window(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case\"iframe\":return Object.assign(new n._Frame(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case\"external connection\":return Object.assign(new r.ExternalApplication(s,{uuid:a}),o(d,a,c),{interop:u,isOpenFin:!1});default:return{...o(d,a,c),...p,interop:h,isOpenFin:!1}}}}(ki);var Li={},Ti={},$i={};Object.defineProperty($i,\"__esModule\",{value:!0}),$i.createWarningObject=$i.createUnusableObject=void 0,$i.createUnusableObject=function(e){const t=()=>{throw new Error(e)};return new Proxy({},{apply:t,construct:t,defineProperty:t,deleteProperty:t,get:t,getOwnPropertyDescriptor:t,getPrototypeOf:t,has:t,isExtensible:t,ownKeys:t,preventExtensions:t,set:t,setPrototypeOf:t})},$i.createWarningObject=function(e,t){return new Proxy(t,{get:(...t)=>(console.warn(e),Reflect.get(...t)),set:(...t)=>(console.warn(e),Reflect.set(...t)),getOwnPropertyDescriptor:(...t)=>(console.warn(e),Reflect.getOwnPropertyDescriptor(...t)),ownKeys:(...t)=>(console.warn(e),Reflect.ownKeys(...t))})};var Bi,Gi={},Wi={};var Hi={};!function(e){Object.defineProperty(e,\"__esModule\",{value:!0}),e.wrapIntentHandler=e.BROKER_ERRORS=e.generateOverrideWarning=e.generateOverrideError=e.wrapContextHandler=e.wrapInTryCatch=e.generateId=void 0;e.generateId=()=>`${Math.random()}${Date.now()}`;e.wrapInTryCatch=(e,t)=>(...n)=>{try{return e(...n)}catch(e){throw new Error((t||\"\")+e)}};e.wrapContextHandler=(e,t)=>async n=>{try{await e(n)}catch(e){throw console.error(`Error thrown by handler ${t} for context type ${n.type}: ${e}`),e}};e.generateOverrideError=(e,t)=>`You have tried to to use ${e} but ${t} has not been overridden in the Interop Broker. Please override this function. Refer to our documentation for more info.`;e.generateOverrideWarning=(e,t,n,i)=>{const{uuid:r,name:o}=n;return i?`Entity with identity: ${r}/${o} has called ${i} or ${e} but ${t} has not been overridden.`:`Entity with identity: ${r}/${o} has called ${e} but ${t} has not been overridden.`},e.BROKER_ERRORS={fireIntent:(0,e.generateOverrideError)(\"fireIntent\",\"handleFiredIntent\"),fireIntentForContext:(0,e.generateOverrideError)(\"fireIntentForContext\",\"handleFiredIntentForContext\"),getInfoForIntent:(0,e.generateOverrideError)(\"getInfoForIntent\",\"handleInfoForIntent\"),getInfoForIntentsByContext:(0,e.generateOverrideError)(\"getInfoForIntentsByContext\",\"handleInfoForIntentsByContext\"),joinSessionContextGroupWithJoinContextGroup:\"The Context Group you have tried to join is a Session Context Group. Custom Context Groups can only be defined by the Interop Broker through code or manifest configuration. Please use joinSessionContextGroup.\",fdc3Open:(0,e.generateOverrideError)(\"fdc3.open\",\"fdc3HandleOpen\"),fdc3FindInstances:(0,e.generateOverrideError)(\"fdc3.findInstances\",\"fdc3HandleFindInstances\"),fdc3GetAppMetadata:(0,e.generateOverrideError)(\"fdc3.getAppMetadata\",\"fdc3HandleGetAppMetadata\"),fdc3GetInfo:(0,e.generateOverrideError)(\"fdc3.getInfo\",\"fdc3HandleGetInfo\")};e.wrapIntentHandler=(e,t)=>async n=>{try{return e(n)}catch(e){throw console.error(`Error thrown by handler ${t}: ${e}`),e}}}(Hi);var Ni,Di,Ui={};function Vi(){if(Di)return Gi;Di=1;var e,t,n,r=s&&s.__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},o=s&&s.__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)},a=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Gi,\"__esModule\",{value:!0}),Gi.InteropBroker=void 0;const c=d,h=a(function(){if(Bi)return Wi;Bi=1,Object.defineProperty(Wi,\"__esModule\",{value:!0});const e=Cr();return Wi.default=class{constructor(e,t){this.provider=e,this.id=t,this.lastContext=void 0,this.contextGroupMap=new Map,this.clients=new Map,this.registerListeners()}registerListeners(){this.provider.register(`sessionContextGroup:getContext-${this.id}`,this.getCurrentContext.bind(this)),this.provider.register(`sessionContextGroup:setContext-${this.id}`,this.setContext.bind(this)),this.provider.register(`sessionContextGroup:handlerAdded-${this.id}`,this.handlerAdded.bind(this)),this.provider.register(`sessionContextGroup:handlerRemoved-${this.id}`,this.handlerRemoved.bind(this))}getCurrentContext(e){return e.type?this.contextGroupMap.get(e.type):this.lastContext}setContext(t,n){const{context:i}=t,r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name} not in Session Client State Map`);this.contextGroupMap.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{e.contextHandlers.get(i.type)?.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getClientState(e){return this.clients.get(e.endpointId)}async handlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(i){const e=r.contextHandlers.get(i)||[];r.contextHandlers.set(i,[...e,n]);const o=this.contextGroupMap.get(i);o&&await this.provider.dispatch(t,n,o)}else{r.globalHandler=n;const e=[...this.contextGroupMap.keys()].map((async e=>{const i=this.contextGroupMap.get(e);i&&await this.provider.dispatch(t,n,i)}));await Promise.all(e)}}handlerRemoved(e,t){const{handlerId:n}=e,i=this.clients.get(t.endpointId);i?(Array.from(i.contextHandlers).forEach((([,e])=>{const t=e.indexOf(n);t>-1&&e.splice(t,1)})),i.globalHandler===n&&(i.globalHandler=void 0)):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={contextHandlers:new Map,clientIdentity:e,globalHandler:void 0};this.clients.set(e.endpointId,t)}}onDisconnection(e){this.clients.delete(e.endpointId)}},Wi}()),l=Hi,u=a(i),p=function(){if(Ni)return Ui;Ni=1,Object.defineProperty(Ui,\"__esModule\",{value:!0}),Ui.PrivateChannelProvider=void 0;const e=Vi();return Ui.PrivateChannelProvider=class t{constructor(e,t){this.provider=e,this.id=t,this.clients=new Map,this.registerListeners(),this.contextByContextType=new Map,this.lastContext=void 0,this.provider.onConnection((e=>this.registerNewClient(e))),this.provider.onDisconnection((async e=>{const{endpointId:t}=e;this.clients.has(t)&&await this.handleClientDisconnecting(e),0===(await this.provider.getAllClientInfo()).length&&this.provider.destroy()}))}getClientState(e){return this.clients.get(e.endpointId)}registerListeners(){this.provider.register(\"broadcast\",this.broadcast.bind(this)),this.provider.register(\"getCurrentContext\",this.getCurrentContext.bind(this)),this.provider.register(\"contextHandlerAdded\",this.contextHandlerAdded.bind(this)),this.provider.register(\"contextHandlerRemoved\",this.contextHandlerRemoved.bind(this)),this.provider.register(\"nonStandardHandlerRemoved\",this.nonStandardHandlerRemoved.bind(this)),this.provider.register(\"onAddContextHandlerAdded\",this.onAddContextHandlerAdded.bind(this)),this.provider.register(\"onDisconnectHandlerAdded\",this.onDisconnectHandlerAdded.bind(this)),this.provider.register(\"onUnsubscribeHandlerAdded\",this.onUnsubscribeHandlerAdded.bind(this)),this.provider.register(\"clientDisconnecting\",((e,t)=>{this.handleClientDisconnecting(t)}))}broadcast(t,n){const{context:i}=t;if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name}, tried to call broadcast, is not connected to this Private Channel`);const r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to broadcast - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);this.contextByContextType.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{const t=e.handlerIdsByContextTypes.get(i.type);t&&t.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getCurrentContext(e,t){const{contextType:n}=e;if(!this.getClientState(t))throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call getCurrentContext, is not connected to this Private Channel`);if(void 0!==n){return this.contextByContextType.get(n)||null}return this.lastContext?this.lastContext:null}contextHandlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call addContextListener, is not connected to this Private Channel`);if(i){const e=r.handlerIdsByContextTypes.get(i)||[];r.handlerIdsByContextTypes.set(i,[...e,n])}else r.globalHandler=n;Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&e.onAddContextListenerHandlerId&&this.provider.dispatch(e.clientIdentity,e.onAddContextListenerHandlerId,i)}))}async contextHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);if(i){let e;if(i.globalHandler===n)i.globalHandler=void 0;else for(const[t,r]of i.handlerIdsByContextTypes){const i=r.indexOf(n);i>-1&&(r.splice(i,1),e=t)}const r=(await this.getConnectedClients()).map((async n=>{const{clientIdentity:i,clientIdentity:{endpointId:r},onUnsubscribeHandlerId:o}=n;r!==t.endpointId&&o&&await this.provider.dispatch(i,o,e)}));try{await Promise.all(r)}catch(e){throw console.error(`Problem when attempting to dispatch to onUnsubscribeHandlers. Error: ${e} Removing Client: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}`),new Error(e)}}else console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}.`)}nonStandardHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);i?i.onDisconnectHandlerId===n?i.onDisconnectHandlerId=void 0:i.onAddContextListenerHandlerId===n?i.onAddContextListenerHandlerId=void 0:i.onUnsubscribeHandlerId===n&&(i.onUnsubscribeHandlerId=void 0):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}onAddContextHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onAddContextListener, is not connected to this Private Channel`);n.onAddContextListenerHandlerId=i,Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&Array.from(e.handlerIdsByContextTypes.keys()).forEach((e=>{this.provider.dispatch(t,i,e)}))}))}onDisconnectHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onDisconnect, is not connected to this Private Channel`);n.onDisconnectHandlerId=i}onUnsubscribeHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onUnsubscribe, is not connected to this Private Channel`);n.onUnsubscribeHandlerId=i}removeClient(e){const t=this.getClientState(e);if(!t)throw new Error(`Client with Identity: ${e.uuid} ${e.name}, tried to call disconnect, is not connected to this Private Channel`);t.handlerIdsByContextTypes.clear(),this.clients.delete(e.endpointId)}async fireOnDisconnectForOtherClients(e){const{endpointId:t}=e,n=(await this.getConnectedClients()).map((async e=>{const{clientIdentity:{endpointId:n},onDisconnectHandlerId:i}=e;n!==t&&i&&await this.provider.dispatch(e.clientIdentity,i)}));try{await Promise.all(n)}catch(t){throw console.error(`Problem when attempting to dispatch to onDisconnectHandlers. Error: ${t} Disconnecting Client: uuid: ${e.uuid}. name: ${e.name}. endpointId: ${e.endpointId}`),new Error(t)}}async unsubscribeAll(e){const{endpointId:t}=e,n=this.clients.get(t);if(n){const t=Array.from(n.handlerIdsByContextTypes.values()).flat(),i=n.globalHandler;if(t.length>0){const n=t.map((async t=>this.contextHandlerRemoved({handlerId:t},e)));try{await Promise.all(n)}catch(e){console.error(e.message)}}if(i)try{await this.contextHandlerRemoved({handlerId:i},e)}catch(e){console.error(e.message)}}}async handleClientDisconnecting(e){await this.unsubscribeAll(e),this.removeClient(e),await this.fireOnDisconnectForOtherClients(e)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={clientIdentity:e,handlerIdsByContextTypes:new Map,globalHandler:void 0,onAddContextListenerHandlerId:void 0,onUnsubscribeHandlerId:void 0,onDisconnectHandlerId:void 0};this.clients.set(e.endpointId,t)}}async getConnectedClients(){const e=await this.provider.getAllClientInfo();return Array.from(this.clients.values()).filter((t=>{const{uuid:n,name:i}=t.clientIdentity;return e.some((e=>i===e.name&&n===e.uuid))}))}static init(e,n){return new t(e,n)}},Ui}(),w=G,y=[{id:\"green\",displayMetadata:{color:\"#00CC88\",name:\"green\"}},{id:\"purple\",displayMetadata:{color:\"#8C61FF\",name:\"purple\"}},{id:\"orange\",displayMetadata:{color:\"#FF8C4C\",name:\"orange\"}},{id:\"red\",displayMetadata:{color:\"#FF5E60\",name:\"red\"}},{id:\"pink\",displayMetadata:{color:\"#FF8FB8\",name:\"pink\"}},{id:\"yellow\",displayMetadata:{color:\"#E9FF8F\",name:\"yellow\"}}];let f=class i extends c.Base{constructor(i,s,a){super(i),e.set(this,void 0),t.set(this,void 0),n.set(this,void 0),this.getProvider=()=>o(this,n,\"f\").getValue(),this.interopClients=new Map,this.contextGroupsById=new Map,r(this,t,a.contextGroups??[...y],\"f\"),r(this,e,a.fdc3Info,\"f\"),a?.logging&&(this.logging=a.logging),this.intentClientMap=new Map,this.lastContextMap=new Map,this.sessionContextGroupMap=new Map,r(this,n,new w.Lazy(s),\"f\"),this.setContextGroupMap(),this.setupChannelProvider()}static createClosedConstructor(...e){return class extends i{constructor(...t){if(t.length){const[n,i,r]=t;if(r&&\"object\"==typeof r&&!(0,u.default)(r,e[2]))return console.warn(\"You have modified the parameters of the InteropOverride constructor. This behavior is deprecated and will be removed in a future version. You can modify these options in your manifest. Please consult our Interop docs for guidance on migrating to the new override scheme.\"),void super(e[0],e[1],r);console.warn(\"You are attempting to pass arguments to the InteropOverride constructor. This is not necessary, and these passed arguments will be ignored. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.\")}super(...e)}}}setContext({context:e},t){this.wire.sendAction(\"interop-broker-set-context\").catch((e=>{}));const n=this.getClientState(t);if(!n||!n.contextGroupId)throw n?new Error(\"You must join a context group before you can set context.\"):new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);{const{contextGroupId:t}=n;this.setContextForGroup({context:e},t)}}setContextForGroup({context:e},t){this.wire.sendAction(\"interop-broker-set-context-for-group\").catch((e=>{}));const n=this.contextGroupsById.get(t);if(!n)throw new Error(`Unable to set context for context group that isn't in the context group mapping: ${t}.`);const r=i.checkContextIntegrity(e);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(e)}`);const o=e.type;n.set(o,e),this.lastContextMap.set(t,o);Array.from(this.interopClients.values()).filter((e=>e.contextGroupId===t)).forEach((t=>{for(const[,n]of t.contextHandlers)i.isContextTypeCompatible(o,n.contextType)&&this.invokeContextHandler(t.clientIdentity,n.handlerId,e)}))}getCurrentContext(e,t){this.wire.sendAction(\"interop-broker-get-current-context\").catch((e=>{}));const n=this.getClientState(t);if(!n?.contextGroupId)throw new Error(\"You must be a member of a context group to call getCurrentContext\");const{contextGroupId:i}=n,r=this.contextGroupsById.get(i),o=this.lastContextMap.get(i),s=e?.contextType??o;return r&&s?r.get(s):void 0}async joinContextGroup({contextGroupId:e,target:t},n){if(this.wire.sendAction(\"interop-broker-join-context-group\").catch((e=>{})),this.sessionContextGroupMap.has(e))throw new Error(l.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup);if(t){i.hasEndpointId(t)&&await this.addClientToContextGroup({contextGroupId:e},t);try{const n=this.channel.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name));if(!n.length)throw new Error(`Given Identity ${t.uuid} ${t.name} is not connected to the Interop Broker.`);n.length>1&&console.warn(`More than one connection found for identity ${t.uuid} ${t.name}`);const i=[];for(const t of n)i.push(this.addClientToContextGroup({contextGroupId:e},t));await Promise.all(i)}catch(e){throw new Error(e)}}else await this.addClientToContextGroup({contextGroupId:e},n)}async addClientToContextGroup({contextGroupId:e},t){this.wire.sendAction(\"interop-broker-add-client-to-context-group\").catch((e=>{}));const n=this.getClientState(t);if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(!this.getContextGroups().find((t=>t.id===e)))throw new Error(`Attempting to join a context group that does not exist: ${e}. You may only join existing context groups.`);if(n.contextGroupId!==e){n.contextGroupId=e,await this.setCurrentContextGroupInClientOptions(t,e);const i=this.contextGroupsById.get(e);for(const[,e]of n.contextHandlers){const{contextType:n,handlerId:r}=e;if(void 0===n)i.forEach(((e,n)=>{this.invokeContextHandler(t,r,e)}));else if(i.has(n)){const e=i.get(n);e&&this.invokeContextHandler(t,r,e)}}}}async removeFromContextGroup({target:e},t){if(this.wire.sendAction(\"interop-broker-remove-from-context-group\").catch((e=>{})),e){i.hasEndpointId(e)&&await this.removeClientFromContextGroup(e);try{const t=this.channel.connections.filter((t=>t.uuid===e.uuid&&t.name===e.name));if(!t.length)throw new Error(`No connection found for given Identity ${e.uuid} ${e.name}`);t.length>1&&console.warn(`More than one connection found for identity ${e.uuid} ${e.name}`);const n=[];for(const e of t)n.push(this.removeClientFromContextGroup(e));await Promise.all(n)}catch(e){throw new Error(e)}}else await this.removeClientFromContextGroup(t)}async removeClientFromContextGroup(e){this.wire.sendAction(\"interop-broker-remove-client-from-context-group\").catch((e=>{}));const t=this.getClientState(e);t&&(t.contextGroupId=void 0),await this.setCurrentContextGroupInClientOptions(e,null)}getContextGroups(){return this.wire.sendAction(\"interop-broker-get-context-groups\").catch((e=>{})),o(this,t,\"f\").map((e=>({...e})))}getInfoForContextGroup({contextGroupId:e}){return this.wire.sendAction(\"interop-broker-get-info-for-context-group\").catch((e=>{})),this.getContextGroups().find((t=>t.id===e))}getAllClientsInContextGroup({contextGroupId:e}){this.wire.sendAction(\"interop-broker-get-all-clients-in-context-group\").catch((e=>{}));return Array.from(this.interopClients.values()).filter((t=>t.contextGroupId===e)).map((e=>e.clientIdentity))}async handleFiredIntent(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.raiseIntent\",\"InteropBroker.handleFiredIntent\",t,\"interopClient.fireIntent\");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntent)}async setIntentTarget(e,t){this.wire.sendAction(\"interop-broker-set-intent-target\").catch((e=>{}));const n=this.intentClientMap.get(t.name),i=`intent-handler-${e.name}`;if(n){const t=n.get(i);if(t){if(t.pendingIntents.push(e),t.clientIdentity&&t.isReady){const{clientIdentity:e,pendingIntents:n}=t;try{const r=n[n.length-1];await this.invokeIntentHandler(e,i,r),t.pendingIntents=[]}catch(n){console.error(`Error invoking intent handler for client ${e.uuid}/${e.name}/${e.endpointId}`),t.isReady=!1}}}else n.set(i,{isReady:!1,pendingIntents:[e]})}else{this.intentClientMap.set(t.name,new Map);const n=this.intentClientMap.get(t.name);n&&n.set(i,{isReady:!1,pendingIntents:[e]})}}async handleInfoForIntent(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.findIntent\",\"InteropBroker.handleInfoForIntent\",t,\"interopClient.getInfoForIntent\");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntent)}async handleInfoForIntentsByContext(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.findIntentsByContext\",\"InteropBroker.handleInfoForIntentsByContext\",t,\"interopClient.getInfoForIntentsByContext\");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntentsByContext)}async handleFiredIntentForContext(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.raiseIntentForContext\",\"InteropBroker.handleFiredIntentForContext\",t,\"interopClient.fireIntentForContext\");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntentForContext)}async clientDisconnected(e){}async fdc3HandleOpen({app:e,context:t},n){const i=(0,l.generateOverrideWarning)(\"fdc3.open\",\"InteropBroker.fdc3HandleOpen\",n);throw console.warn(i),new Error(l.BROKER_ERRORS.fdc3Open)}async fdc3HandleFindInstances(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.open\",\"InteropBroker.fdc3HandleFindInstances\",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3FindInstances)}async fdc3HandleGetAppMetadata(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.getAppMetadata\",\"InteropBroker.fdc3HandleGetAppMetadata\",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3GetAppMetadata)}async invokeContextHandler(e,t,n){const i=await this.getProvider();try{await i.dispatch(e,t,n)}catch(i){console.error(`Error invoking context handler ${t} for context type ${n.type} in client ${e.uuid}/${e.name}/${e.endpointId}`,i)}}async invokeIntentHandler(e,t,n){const i=await this.getProvider();await i.dispatch(e,t,n)}async fdc3HandleGetInfo(t,n){const{fdc3Version:i}=t;return{fdc3Version:i,...o(this,e,\"f\"),optionalFeatures:{OriginatingAppMetadata:!1,UserChannelMembershipAPIs:!0},appMetadata:{appId:\"\",instanceId:\"\"}}}async getAllClientInfo(){return(await this.getProvider()).getAllClientInfo()}decorateSnapshot(e){return{...e,interopSnapshotDetails:{contextGroupStates:this.getContextGroupStates()}}}applySnapshot(e,t){const n=e?.interopSnapshotDetails?.contextGroupStates;n&&(t?.closeExistingWindows||this.updateExistingClients(n),this.rehydrateContextGroupStates(n))}updateExistingClients(e){this.interopClients.forEach((t=>{const{clientIdentity:n,contextGroupId:r,contextHandlers:o}=t;if(r){const t=e[r];for(const[,e]of Object.entries(t))o.forEach((t=>{const{handlerId:r,contextType:o}=t;i.isContextTypeCompatible(e.type,o)&&this.invokeContextHandler(n,r,e)}))}}))}getContextGroupStates(){return i.toObject(this.contextGroupsById)}rehydrateContextGroupStates(e){const t=Object.entries(e);for(const[e,n]of t){const t=Object.entries(n);for(const[n,i]of t)if(this.contextGroupsById.has(e)){this.contextGroupsById.get(e).set(n,i)}else console.warn(`Attempting to set a context group that isn't in the context group mapping. Skipping context group rehydration for: ${e}`)}}contextHandlerRegistered({contextType:e,handlerId:t},n){const i={contextType:e,handlerId:t},r=this.getClientState(n);if(r?.contextHandlers.set(t,i),r&&r.contextGroupId){const{contextGroupId:i}=r,o=this.contextGroupsById.get(i);if(void 0===e)o.forEach(((e,i)=>{this.invokeContextHandler(n,t,e)}));else if(o.has(e)){const i=o.get(e);i&&this.invokeContextHandler(n,t,i)}}}async intentHandlerRegistered(e,t){const{handlerId:n}=e,i=this.intentClientMap.get(t.name),r=i?.get(n);if(i)if(r){const{pendingIntents:e}=r;r.clientIdentity=t,r.isReady=!0;try{if(e.length>0){const i=e[e.length-1];await this.invokeIntentHandler(t,n,i),r.pendingIntents=[]}}catch(e){console.error(`Error invoking intent handler: ${n} for client ${t.uuid}/${t.name}/${t.endpointId}`)}}else i.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t});else{this.intentClientMap.set(t.name,new Map);const e=this.intentClientMap.get(t.name);e&&e.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t})}}removeContextHandler({handlerId:e},t){const n=this.getClientState(t);n&&n.contextHandlers.delete(e)}handleJoinSessionContextGroup({sessionContextGroupId:e},t){try{if(!e)throw new Error(\"Failed to join session context group: must specify group id.\");const n=this.sessionContextGroupMap.get(e);if(n)n.registerNewClient(t);else{const n=new h.default(this.channel,e);n.registerNewClient(t),this.sessionContextGroupMap.set(e,n)}return{hasConflict:this.contextGroupsById.has(e)}}catch(e){throw new Error(e)}}getClientState(e){return this.interopClients.get(e.endpointId)}static toObject(e){const t=Object.fromEntries(e),n={};return Object.entries(t).forEach((([e,t])=>{const i=Object.fromEntries(t);n[e]=i})),n}static checkContextIntegrity(e){if(!e)return{isValid:!1,reason:\"No context supplied\"};if(\"object\"!=typeof e)return{isValid:!1,reason:\"Context must be an Object\"};if(!e.type)return{isValid:!1,reason:\"Context must have a type property\"};if(e.id&&\"object\"!=typeof e.id)return{isValid:!1,reason:\"Context id must be an Object populated with key-value identifiers (if set)\"};if(e.id){const{id:t}=e,n=Object.keys(t);let i=!1;if(!n.length)return{isValid:!1,reason:\"Context id must have at least one key-value identifier\"};if(n.forEach((e=>{\"string\"==typeof e&&\"string\"==typeof t[e]||(i=!0)})),i)return{isValid:!1,reason:\"Context id key-value identifiers must be of type string\"}}return e.name&&\"string\"!=typeof e.name?{isValid:!1,reason:\"Context name must be of string type (if set)\"}:{isValid:!0}}static hasEndpointId(e){return void 0!==e.endpointId}static isContextTypeCompatible(e,t){return void 0===t||e===t}setContextGroupMap(){for(const e of this.getContextGroups())this.contextGroupsById.set(e.id,new Map)}async setCurrentContextGroupInClientOptions(e,t){try{const n=await this.fin.System.getEntityInfo(e.uuid,e.name);let i;\"view\"===n.entityType?i=await this.fin.View.wrap(e):\"window\"===n.entityType&&(i=await this.fin.Window.wrap(e)),i&&await i.updateOptions({interop:{currentContextGroup:t}})}catch(e){}}async setupChannelProvider(){try{const e=await this.getProvider();this.channel=e,this.wireChannel(e)}catch(e){throw new Error(`Error setting up Interop Broker Channel Provider: ${e}`)}}wireChannel(e){e.onConnection((async(e,t)=>{if(!await this.isConnectionAuthorized(e,t))throw new Error(`Connection not authorized for ${e.uuid}, ${e.name}`);if(!e.endpointId)throw new Error(\"Version too old to be compatible with Interop. Please upgrade your runtime to a more recent version.\");const n={contextGroupId:void 0,contextHandlers:new Map,clientIdentity:e};t?.currentContextGroup&&this.contextGroupsById.has(t.currentContextGroup)&&(n.contextGroupId=t?.currentContextGroup),this.interopClients.set(e.endpointId,n)})),e.onDisconnection((e=>{this.interopClients.delete(e.endpointId);const t=this.intentClientMap.get(e.name);t&&e.uuid===this.fin.me.uuid&&t.forEach((e=>{e.isReady=!1})),this.sessionContextGroupMap.forEach((t=>{t.onDisconnection(e)})),this.clientDisconnected(e)})),e.beforeAction((async(e,t,n)=>{if(!await this.isActionAuthorized(e,t,n))throw new Error(`Action (${e}) not authorized for ${n.uuid}, ${n.name}`);this.logging?.beforeAction?.enabled&&console.log(e,t,n)})),e.afterAction(((e,t,n)=>{this.logging?.afterAction?.enabled&&console.log(e,t,n)})),e.register(\"setContext\",this.setContext.bind(this)),e.register(\"fireIntent\",this.handleFiredIntent.bind(this)),e.register(\"getCurrentContext\",this.getCurrentContext.bind(this)),e.register(\"getInfoForIntent\",this.handleInfoForIntent.bind(this)),e.register(\"getInfoForIntentsByContext\",this.handleInfoForIntentsByContext.bind(this)),e.register(\"fireIntentForContext\",this.handleFiredIntentForContext.bind(this)),e.register(\"getContextGroups\",this.getContextGroups.bind(this)),e.register(\"joinContextGroup\",this.joinContextGroup.bind(this)),e.register(\"removeFromContextGroup\",this.removeFromContextGroup.bind(this)),e.register(\"getAllClientsInContextGroup\",this.getAllClientsInContextGroup.bind(this)),e.register(\"getInfoForContextGroup\",this.getInfoForContextGroup.bind(this)),e.register(\"contextHandlerRegistered\",this.contextHandlerRegistered.bind(this)),e.register(\"intentHandlerRegistered\",this.intentHandlerRegistered.bind(this)),e.register(\"removeContextHandler\",this.removeContextHandler.bind(this)),e.register(\"sessionContextGroup:createIfNeeded\",this.handleJoinSessionContextGroup.bind(this)),e.register(\"fdc3Open\",this.fdc3HandleOpen.bind(this)),e.register(\"fdc3v2FindIntentsByContext\",this.handleInfoForIntentsByContext.bind(this)),e.register(\"fdc3FindInstances\",this.fdc3HandleFindInstances.bind(this)),e.register(\"fdc3GetAppMetadata\",this.fdc3HandleGetAppMetadata.bind(this)),e.register(\"fdc3v2GetInfo\",(async(e,t)=>this.fdc3HandleGetInfo.bind(this)(e,t))),e.register(\"createPrivateChannelProvider\",(async e=>{const{channelId:t}=e,n=await this.fin.InterApplicationBus.Channel.create(t);p.PrivateChannelProvider.init(n,t)}))}isConnectionAuthorized(e,t){return this.wire.sendAction(\"interop-broker-is-connection-authorized\").catch((e=>{})),Promise.resolve(!0)}isActionAuthorized(e,t,n){return this.wire.sendAction(\"interop-broker-is-action-authorized\").catch((e=>{})),Promise.resolve(!0)}};return Gi.InteropBroker=f,e=new WeakMap,t=new WeakMap,n=new WeakMap,Gi}var zi,Ki={},qi={},Ji=s&&s.__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},Yi=s&&s.__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)};Object.defineProperty(qi,\"__esModule\",{value:!0});const Zi=d,Qi=Hi;class Xi extends Zi.Base{constructor(e,t,n){super(e),zi.set(this,void 0),this.id=n,Ji(this,zi,t,\"f\")}async setContext(e){this.wire.sendAction(\"interop-session-context-group-set-context\").catch((e=>{}));return(await Yi(this,zi,\"f\")).dispatch(`sessionContextGroup:setContext-${this.id}`,{sessionContextGroupId:this.id,context:e})}async getCurrentContext(e){this.wire.sendAction(\"interop-session-context-group-get-context\").catch((e=>{}));return(await Yi(this,zi,\"f\")).dispatch(`sessionContextGroup:getContext-${this.id}`,{sessionContextGroupId:this.id,type:e})}async addContextHandler(e,t){if(this.wire.sendAction(\"interop-session-context-group-add-handler\").catch((e=>{})),\"function\"!=typeof e)throw new Error(\"Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.\");const n=await Yi(this,zi,\"f\");let i;return i=t?`sessionContextHandler:invoke-${this.id}-${t}-${(0,Qi.generateId)()}`:`sessionContextHandler:invoke-${this.id}`,n.register(i,(0,Qi.wrapContextHandler)(e,i)),await n.dispatch(`sessionContextGroup:handlerAdded-${this.id}`,{handlerId:i,contextType:t}),{unsubscribe:await this.createUnsubscribeCb(i)}}async createUnsubscribeCb(e){const t=await Yi(this,zi,\"f\");return async()=>{t.remove(e),await t.dispatch(`sessionContextGroup:handlerRemoved-${this.id}`,{handlerId:e})}}getUserInstance(){return{id:this.id,setContext:(0,Qi.wrapInTryCatch)(this.setContext.bind(this),\"Failed to set context: \"),getCurrentContext:(0,Qi.wrapInTryCatch)(this.getCurrentContext.bind(this),\"Failed to get context: \"),addContextHandler:(0,Qi.wrapInTryCatch)(this.addContextHandler.bind(this),\"Failed to add context handler: \")}}}qi.default=Xi,zi=new WeakMap;var er={},tr={},nr={},ir={},rr=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),or=s&&s.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,\"default\",{enumerable:!0,value:t})}:function(e,t){e.default=t}),sr=s&&s.__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)&&rr(t,e,n);return or(t,e),t};Object.defineProperty(ir,\"__esModule\",{value:!0}),ir.PrivateChannelClient=void 0;const ar=sr(Hi);var cr,dr;function hr(){if(cr)return tr;cr=1;var e,t=s&&s.__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)},n=s&&s.__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},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(tr,\"__esModule\",{value:!0}),tr.FDC3ModuleBase=void 0;const o=nr,a=Hi,c=wr(),d=r(i);return tr.FDC3ModuleBase=class{get client(){return t(this,e,\"f\").call(this)}get fin(){return this.wire.getFin()}constructor(t,i){this.wire=i,e.set(this,void 0),n(this,e,t,\"f\")}async broadcast(e){return this.wire.sendAction(\"fdc3-broadcast\").catch((e=>{})),this.client.setContext(e)}async _open(e,t){this.wire.sendAction(\"fdc3-open\").catch((e=>{}));try{return await c.InteropClient.ferryFdc3Call(this.client,\"fdc3Open\",{app:e,context:t})}catch(e){const t=e.message===a.BROKER_ERRORS.fdc3Open?\"ResolverUnavailable\":e.message;throw new Error(t)}}async _getChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:\"system\",...(0,o.getUnsupportedChannelApis)()})))}async getOrCreateChannel(e){this.wire.sendAction(\"fdc3-get-or-create-channel\").catch((e=>{}));const t=(await this._getChannels()).find((t=>t.id===e));if(t)return{...t,type:\"system\",...(0,o.getUnsupportedChannelApis)()};try{const t=await this.client.joinSessionContextGroup(e);return(0,o.buildAppChannelObject)(t)}catch(e){throw console.error(e.message),new Error(o.ChannelError.CreationFailed)}}async getSystemChannels(){return this.wire.sendAction(\"fdc3-get-system-channels\").catch((e=>{})),this._getChannels()}async joinChannel(e){this.wire.sendAction(\"fdc3-join-channel\").catch((e=>{}));try{return await this.client.joinContextGroup(e)}catch(e){if(e.message===a.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup?console.error(\"The Channel you have tried to join is an App Channel. Custom Channels can only be defined by the Interop Broker through code or manifest configuration. Please use getOrCreateChannel.\"):console.error(e.message),e.message.startsWith(\"Attempting to join a context group that does not exist\"))throw new Error(o.ChannelError.NoChannelFound);throw new Error(o.ChannelError.AccessDenied)}}async getCurrentChannel(){this.wire.sendAction(\"fdc3-get-current-channel\").catch((e=>{}));const e=await this.getCurrentContextGroupInfo();return e?this.buildChannelObject(e):null}async leaveCurrentChannel(){return this.wire.sendAction(\"fdc3-leave-current-channel\").catch((e=>{})),this.client.removeFromContextGroup()}async getCurrentContextGroupInfo(){const e=await this.client.getContextGroups(),t=e.map((async e=>this.client.getAllClientsInContextGroup(e.id))),n=(await Promise.all(t)).findIndex((e=>e.some((e=>{const{uuid:t,name:n}=e;return this.wire.me.uuid===t&&this.wire.me.name===n}))));return e[n]}async buildChannelObject(e){return{...e,type:\"system\",addContextListener:(...[e,t])=>{let n,i;\"function\"==typeof e?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),n=e):(n=t,\"string\"==typeof e&&(i=e));const r=(async()=>{let e=!0;const t=await this.client.getCurrentContext(i);return this.client.addContextHandler(((i,r)=>{if(!e||(e=!1,!(0,d.default)(t,i)))return n(i,r)}),i)})();return{...r,unsubscribe:()=>r.then((e=>e.unsubscribe()))}},broadcast:this.broadcast.bind(this),getCurrentContext:async e=>{const t=await this.client.getCurrentContext(e);return void 0===t?null:t}}}},e=new WeakMap,tr}ir.PrivateChannelClient=class{constructor(e,t){this.id=t,this.client=e,this.listeners=new Map}async broadcast(e){return this.client.dispatch(\"broadcast\",{context:e})}async getCurrentContext(e){return this.client.dispatch(\"getCurrentContext\",{contextType:e})}async addContextListener(e,t){if(\"function\"!=typeof t)throw new Error(\"Non-function argument passed to the second parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.\");let n;n=e?`contextHandler:invoke-${this.id}-${e}-${ar.generateId()}`:`contextHandler:invoke-${this.id}-${ar.generateId()}`,this.client.register(n,ar.wrapContextHandler(t,n));const i={unsubscribe:await this.createContextUnsubscribeCb(n)};return this.listeners.set(n,i),await this.client.dispatch(\"contextHandlerAdded\",{handlerId:n,contextType:e}),i}createNonStandardUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch(\"nonStandardHandlerRemoved\",{handlerId:e})}}createContextUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch(\"contextHandlerRemoved\",{handlerId:e})}}onAddContextListener(e){const t=`onContextHandlerAdded:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch(\"onAddContextHandlerAdded\",{handlerId:t}),n}onDisconnect(e){const t=`onDisconnect:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch(\"onDisconnectHandlerAdded\",{handlerId:t}),n}onUnsubscribe(e){const t=`onUnsubscribe:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch(\"onUnsubscribeHandlerAdded\",{handlerId:t}),n}async cleanUpAllSubs(){Array.from(this.listeners.keys()).forEach((e=>{this.client.remove(e),this.listeners.delete(e)}))}async disconnect(){try{await this.client.dispatch(\"clientDisconnecting\"),await this.cleanUpAllSubs(),await this.client.disconnect()}catch(e){throw new Error(e.message)}}},function(e){var t=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,\"__esModule\",{value:!0}),e.getIntentResolution=e.isChannel=e.isContext=e.connectPrivateChannel=e.buildAppChannelObject=e.buildPrivateChannelObject=e.ChannelError=e.ResultError=e.UnsupportedChannelApiError=e.getUnsupportedChannelApis=void 0;const n=Hi,r=ir,o=t(i);e.getUnsupportedChannelApis=e=>({addContextListener:()=>{throw new a(\"Channel.addContextListener\",e)},broadcast:()=>{throw new a(\"Channel.broadcast\",e)},getCurrentContext:()=>{throw new a(\"Channel.getCurrentContext\",e)}});class a extends Error{constructor(e,t=\"System\"){super(e),this.message=`Calling ${e} on an instance of a ${t} Channel returned by fdc3.get${t}Channels is not supported. If you would like to use a ${t} Channel, please use fdc3.joinChannel, fdc3.addContextListener, and fdc3.broadcast instead.`}}var c,d;e.UnsupportedChannelApiError=a,function(e){e.NoResultReturned=\"NoResultReturned\",e.IntentHandlerRejected=\"IntentHandlerRejected\"}(c=e.ResultError||(e.ResultError={})),(d=e.ChannelError||(e.ChannelError={})).NoChannelFound=\"NoChannelFound\",d.AccessDenied=\"AccessDenied\",d.CreationFailed=\"CreationFailed\";e.buildPrivateChannelObject=e=>{let t=!1;const n=()=>{if(t)throw new Error(\"Private Channel Client has been disconnected from the Private Channel\")};return{id:e.id,type:\"private\",broadcast:async t=>(n(),e.broadcast(t)),getCurrentContext:async t=>(n(),e.getCurrentContext(t)),addContextListener:async(t,i)=>{n();let r=i,o=t;\"function\"==typeof t&&(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),r=t,o=null);return e.addContextListener(o,r)},onAddContextListener:t=>(n(),e.onAddContextListener(t)),disconnect:async()=>(n(),t=!0,e.disconnect()),onDisconnect:t=>(n(),e.onDisconnect(t)),onUnsubscribe:t=>(n(),e.onUnsubscribe(t))}};e.buildAppChannelObject=e=>({id:e.id,type:\"app\",broadcast:e.setContext,getCurrentContext:async t=>{const n=await e.getCurrentContext(t);return void 0===n?null:n},addContextListener:(t,n)=>{let i,r;\"function\"==typeof t?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),i=t):(i=n,\"string\"==typeof t&&(r=t));const s=(async()=>{let t=!0;const n=await e.getCurrentContext(r);return e.addContextHandler(((e,r)=>{if(!t||(t=!1,!(0,o.default)(n,e)))return i(e,r)}),r)})();return{...s,unsubscribe:()=>s.then((e=>e.unsubscribe()))}}});e.connectPrivateChannel=async t=>{try{const n=await fin.InterApplicationBus.Channel.connect(t),i=new r.PrivateChannelClient(n,t);return(0,e.buildPrivateChannelObject)(i)}catch(e){throw new Error(`Private Channel with id: ${t} doesn't exist`)}};e.isContext=e=>{if(e&&\"object\"==typeof e&&\"type\"in e){const{type:t}=e;return\"string\"==typeof t}return!1};e.isChannel=e=>{if(e&&\"object\"==typeof e&&\"type\"in e&&\"id\"in e){const{type:t,id:n}=e;return\"string\"==typeof t&&\"string\"==typeof n&&(\"app\"===t||\"private\"===t)}return!1};e.getIntentResolution=async(t,i,r,o)=>{const s=(0,n.generateId)(),a=new Promise(((e,t)=>{fin.InterApplicationBus.subscribe({uuid:\"*\"},s,(t=>{e(t)})).catch((()=>t(new Error(\"getResult is not supported in this environment\"))))})),d=r?{target:r,intentResolutionResultId:s}:{intentResolutionResultId:s},h=o?{name:o,context:i,metadata:d}:{...i,metadata:d},l=async()=>{let n=await a;if(!n||\"object\"!=typeof n)throw new Error(c.NoResultReturned);const{error:i}=n;if(i)throw new Error(c.IntentHandlerRejected);if((0,e.isChannel)(n)){const{id:i,type:r}=n;switch(r){case\"private\":n=await(0,e.connectPrivateChannel)(i);break;case\"app\":{const r=await t.joinSessionContextGroup(i);n=(0,e.buildAppChannelObject)(r);break}}}else if(!(0,e.isContext)(n))throw new Error(c.NoResultReturned);return n},u=o?await t.fireIntent(h):await t.fireIntentForContext(h);return\"object\"!=typeof u?{source:{appId:\"\",instanceId:\"\"},intent:\"\",version:\"2.0\",getResult:l}:{...u,getResult:l}}}(nr);var lr,ur,pr={};function wr(){if(ur)return Ki;ur=1;var e,t,n=s&&s.__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},i=s&&s.__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)},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ki,\"__esModule\",{value:!0}),Ki.InteropClient=void 0;const o=d,a=r(qi),c=function(){if(dr)return er;dr=1,Object.defineProperty(er,\"__esModule\",{value:!0}),er.Fdc3Module=void 0;const e=Hi,t=hr();class n extends t.FDC3ModuleBase{async open(e,t){await super._open(e,t)}addContextListener(e,t){let n;return this.wire.sendAction(\"fdc3-add-context-listener\").catch((e=>{})),\"function\"==typeof e?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),n=this.client.addContextHandler(e)):n=this.client.addContextHandler(t,null===e?void 0:e),{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}addIntentListener(e,t){this.wire.sendAction(\"fdc3-add-intent-listener\").catch((e=>{}));const n=this.client.registerIntentHandler((e=>{const{context:n,metadata:i}=e,{metadata:r}=n,o=i?.intentResolutionResultId||r?.intentResolutionResultId;o&&this.fin.InterApplicationBus.publish(o,null).catch((()=>null)),t(e.context)}),e,{fdc3Version:\"1.2\"});return{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}async raiseIntent(t,n,i){this.wire.sendAction(\"fdc3-raise-intent\").catch((e=>{}));const r=i?{name:t,context:n,metadata:{target:i}}:{name:t,context:n};try{return await this.client.fireIntent(r)}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntent?\"ResolverUnavailable\":t.message;throw new Error(n)}}async findIntent(t,n){this.wire.sendAction(\"fdc3-find-intent\").catch((e=>{}));try{return await this.client.getInfoForIntent({name:t,context:n})}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntent?\"ResolverUnavailable\":t.message;throw new Error(n)}}async findIntentsByContext(t){this.wire.sendAction(\"fdc3-find-intents-by-context\").catch((e=>{}));try{return await this.client.getInfoForIntentsByContext(t)}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntentsByContext?\"ResolverUnavailable\":t.message;throw new Error(n)}}async raiseIntentForContext(t,n){this.wire.sendAction(\"fdc3-raise-intent-for-context\").catch((e=>{}));try{return await this.client.fireIntentForContext({...t,metadata:{target:n}})}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntentForContext?\"ResolverUnavailable\":t.message;throw new Error(n)}}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}getInfo(){return this.wire.sendAction(\"fdc3-get-info\").catch((e=>{})),{providerVersion:this.wire.environment.getAdapterVersionSync(),provider:`openfin-${this.wire.me.uuid}`,fdc3Version:\"1.2\"}}}return er.Fdc3Module=n,er}(),h=function(){if(lr)return pr;lr=1,Object.defineProperty(pr,\"__esModule\",{value:!0}),pr.Fdc3Module2=void 0;const e=hr(),t=Hi,n=wr(),i=nr,r=ir;class o extends e.FDC3ModuleBase{async open(e,t){return\"string\"==typeof e&&console.warn(\"Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).\"),super._open(e,t)}async findInstances(e){this.wire.sendAction(\"fdc3-find-instances\").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,\"fdc3FindInstances\",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3FindInstances?\"ResolverUnavailable\":e.message;throw new Error(n)}}async getAppMetadata(e){this.wire.sendAction(\"fdc3-get-app-metadata\").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,\"fdc3GetAppMetadata\",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3GetAppMetadata?\"ResolverUnavailable\":e.message;throw new Error(n)}}async addContextListener(e,t){this.wire.sendAction(\"fdc3-add-context-listener\").catch((e=>{}));const n=e=>t=>{const{contextMetadata:n,...i}=t,r=n?[{...i},n]:[t,null];e(...r)};let i=t,r=n(i);return\"function\"==typeof e?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),i=e,r=n(i),this.client.addContextHandler(r)):this.client.addContextHandler(r,null===e?void 0:e)}async findIntent(e,n,i){this.wire.sendAction(\"fdc3-find-intent\").catch((e=>{}));try{return await this.client.getInfoForIntent({name:e,context:n,metadata:{resultType:i}})}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntent?\"ResolverUnavailable\":e.message;throw new Error(n)}}async findIntentsByContext(e,i){this.wire.sendAction(\"fdc3-find-intents-by-context\").catch((e=>{}));const r=i?{context:e,metadata:{resultType:i}}:e;try{return await n.InteropClient.ferryFdc3Call(this.client,\"fdc3v2FindIntentsByContext\",r)}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntentsByContext?\"ResolverUnavailable\":e.message;throw new Error(n)}}async raiseIntent(e,n,r){this.wire.sendAction(\"fdc3-raise-intent\").catch((e=>{}));try{return\"string\"==typeof r&&console.warn(\"Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).\"),(0,i.getIntentResolution)(this.client,n,r,e)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?\"ResolverUnavailable\":e.message;throw new Error(n)}}async raiseIntentForContext(e,n){this.wire.sendAction(\"fdc3-raise-intent-for-context\").catch((e=>{}));try{return\"string\"==typeof n&&console.warn(\"Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).\"),(0,i.getIntentResolution)(this.client,e,n)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?\"ResolverUnavailable\":e.message;throw new Error(n)}}async addIntentListener(e,t){if(this.wire.sendAction(\"fdc3-add-intent-listener\").catch((e=>{})),\"string\"!=typeof e)throw new Error(\"First argument must be an Intent name\");return this.client.registerIntentHandler((async e=>{let n,i;const{context:r,metadata:o}=e,{contextMetadata:s,metadata:a,...c}=r,d=o?.intentResolutionResultId||a?.intentResolutionResultId;try{const e=a?{metadata:a,...c}:{...c};n=await t(e,s),i=n}catch(e){n=e,i={error:!0}}if(d&&this.fin.InterApplicationBus.publish(d,i).catch((()=>null)),n instanceof Error)throw new Error(n.message);return n}),e,{fdc3Version:\"2.0\"})}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}async createPrivateChannel(){const e=(0,t.generateId)();await n.InteropClient.ferryFdc3Call(this.client,\"createPrivateChannelProvider\",{channelId:e});const o=await this.fin.InterApplicationBus.Channel.connect(e),s=new r.PrivateChannelClient(o,e);return(0,i.buildPrivateChannelObject)(s)}async getUserChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:\"user\",...(0,i.getUnsupportedChannelApis)(\"User\")})))}async getSystemChannels(){return console.warn(\"This API has been deprecated. Please use fdc3.getUserChannels instead.\"),super.getSystemChannels()}async joinUserChannel(e){return super.joinChannel(e)}async joinChannel(e){return console.warn(\"This API has been deprecated. Please use fdc3.joinUserChannel instead.\"),super.joinChannel(e)}async getCurrentChannel(){const e=await super.getCurrentChannel();return e?{...e,type:\"user\",broadcast:this.broadcast.bind(this)}:null}async getInfo(){return n.InteropClient.ferryFdc3Call(this.client,\"fdc3v2GetInfo\",{fdc3Version:\"2.0\"})}}return pr.Fdc3Module2=o,pr}(),l=Hi;let u=class extends o.Base{constructor(i,r){super(i),e.set(this,void 0),t.set(this,void 0),n(this,t,new Map,\"f\"),n(this,e,r,\"f\")}async setContext(t){this.wire.sendAction(\"interop-client-set-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"setContext\",{context:t})}async addContextHandler(t,n){if(this.wire.sendAction(\"interop-client-add-context-handler\").catch((e=>{})),\"function\"!=typeof t)throw new Error(\"Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.\");const r=await i(this,e,\"f\");let o;o=n?`invokeContextHandler-${n}-${(0,l.generateId)()}`:\"invokeContextHandler\";const s=(0,l.wrapContextHandler)(t,o);return r.register(o,s),await r.dispatch(\"contextHandlerRegistered\",{handlerId:o,contextType:n}),{unsubscribe:async()=>{r.remove(o),await r.dispatch(\"removeContextHandler\",{handlerId:o})}}}async getContextGroups(){this.wire.sendAction(\"interop-client-get-context-groups\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getContextGroups\")}async joinContextGroup(t,n){this.wire.sendAction(\"interop-client-join-context-group\").catch((e=>{}));const r=await i(this,e,\"f\");if(!t)throw new Error(\"No contextGroupId specified for joinContextGroup.\");return r.dispatch(\"joinContextGroup\",{contextGroupId:t,target:n})}async removeFromContextGroup(t){this.wire.sendAction(\"interop-client-remove-from-context-group\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"removeFromContextGroup\",{target:t})}async getAllClientsInContextGroup(t){this.wire.sendAction(\"interop-client-get-all-clients-in-context-group\").catch((e=>{}));const n=await i(this,e,\"f\");if(!t)throw new Error(\"No contextGroupId specified for getAllClientsInContextGroup.\");return n.dispatch(\"getAllClientsInContextGroup\",{contextGroupId:t})}async getInfoForContextGroup(t){this.wire.sendAction(\"interop-client-get-info-for-context-group\").catch((e=>{}));const n=await i(this,e,\"f\");if(!t)throw new Error(\"No contextGroupId specified for getInfoForContextGroup.\");return n.dispatch(\"getInfoForContextGroup\",{contextGroupId:t})}async fireIntent(t){this.wire.sendAction(\"interop-client-fire-intent\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"fireIntent\",t)}async registerIntentHandler(t,n,r){this.wire.sendAction(\"interop-client-register-intent-handler\").catch((e=>{}));const o=await i(this,e,\"f\"),s=`intent-handler-${n}`,a=(0,l.wrapIntentHandler)(t,s);try{await o.register(s,a),await o.dispatch(\"intentHandlerRegistered\",{handlerId:s,...r})}catch(e){throw new Error(\"Unable to register intent handler\")}return{unsubscribe:async()=>{o.remove(s)}}}async getCurrentContext(t){this.wire.sendAction(\"interop-client-get-current-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getCurrentContext\",{contextType:t})}async getInfoForIntent(t){this.wire.sendAction(\"interop-client-get-info-for-intent\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getInfoForIntent\",t)}async getInfoForIntentsByContext(t){this.wire.sendAction(\"interop-client-get-info-for-intents-by-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getInfoForIntentsByContext\",t)}async fireIntentForContext(t){this.wire.sendAction(\"interop-client-fire-intent-for-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"fireIntentForContext\",t)}async joinSessionContextGroup(n){try{const r=i(this,t,\"f\").get(n);if(r)return r.getUserInstance();const o=await i(this,e,\"f\"),{hasConflict:s}=await o.dispatch(\"sessionContextGroup:createIfNeeded\",{sessionContextGroupId:n});s&&console.warn(`A (non-session) context group with the name \"${n}\" already exists. If you are trying to join a Context Group, call joinContextGroup instead.`);const c=new a.default(this.wire,i(this,e,\"f\"),n);return i(this,t,\"f\").set(n,c),c.getUserInstance()}catch(e){throw console.error(`Error thrown trying to create Session Context Group with id \"${n}\": ${e}`),e}}async onDisconnection(t){this.wire.sendAction(\"interop-client-add-ondisconnection-listener\").catch((e=>{}));return(await i(this,e,\"f\")).onDisconnection((e=>{const{uuid:n}=e;t({type:\"interop-broker\",topic:\"disconnected\",brokerName:n})}))}getFDC3Sync(e){switch(e){case\"1.2\":return new c.Fdc3Module((()=>this),this.wire);case\"2.0\":return new h.Fdc3Module2((()=>this),this.wire);default:throw new Error(`Invalid FDC3 version provided: ${e}. Must be '1.2' or '2.0'`)}}async getFDC3(e){return this.getFDC3Sync(e)}static async ferryFdc3Call(t,n,r){return(await i(t,e,\"f\")).dispatch(n,r||null)}};return Ki.InteropClient=u,e=new WeakMap,t=new WeakMap,Ki}var yr,fr,gr,mr={};function vr(){if(yr)return mr;yr=1,Object.defineProperty(mr,\"__esModule\",{value:!0}),mr.overrideCheck=mr.checkFDC32Overrides=mr.getDefaultViewFdc3VersionFromAppInfo=void 0;const e=Vi();function t(t){return[\"fdc3HandleFindInstances\",\"handleInfoForIntent\",\"handleInfoForIntentsByContext\",\"fdc3HandleGetAppMetadata\",\"fdc3HandleGetInfo\",\"fdc3HandleOpen\",\"handleFiredIntent\",\"handleFiredIntentForContext\"].filter((n=>t[n]===e.InteropBroker.prototype[n]))}return mr.getDefaultViewFdc3VersionFromAppInfo=function({manifest:e,initialOptions:t}){const n=e?.platform?.defaultViewOptions?.fdc3InteropApi??t.defaultViewOptions?.fdc3InteropApi;return[\"1.2\",\"2.0\"].includes(n??\"\")?n:void 0},mr.checkFDC32Overrides=t,mr.overrideCheck=function(e,n){if(n&&\"2.0\"===n){const n=t(e);n.length>0&&console.warn(`WARNING: FDC3 2.0 has been set as a default option for Views in this Platform, but the required InteropBroker APIs for FDC3 2.0 compliance have not all been overridden.\\nThe following APIs need to be overridden:\\n${n.join(\"\\n\")}`)}},mr}function Cr(){return gr||(gr=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),i=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),i(function(){if(fr)return Ti;fr=1;var e=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ti,\"__esModule\",{value:!0}),Ti.InteropModule=void 0;const t=e(n),i=$i,r=d,o=Vi(),a=wr(),c=vr(),h=Tn,l=e=>new e,u=\"You have attempted to use or modify InteropBroker parameters, which is not allowed. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.\";class p extends r.Base{async init(e,n=l){this.wire.sendAction(\"interop-init\").catch((()=>{}));const r=await this.wire.environment.getInteropInfo(this.wire.getFin()),s=(0,i.createUnusableObject)(u),a=(0,i.createWarningObject)(u,(0,t.default)(r)),d=async()=>{throw new Error(u)},p=o.InteropBroker.createClosedConstructor(this.wire,(()=>this.fin.InterApplicationBus.Channel.create(`interop-broker-${e}`)),r);let w;return w=Array.isArray(n)?new((0,h.overrideFromComposables)(...n)(p))(s,d,a):await n(p,s,d,a),(0,c.overrideCheck)(w,r.fdc3Version),w}connectSync(e,t){return this.wire.sendAction(\"interop-connect-sync\").catch((()=>{})),new a.InteropClient(this.wire,this.wire.environment.whenReady().then((()=>this.fin.InterApplicationBus.Channel.connect(`interop-broker-${e}`,{payload:t}))))}}return Ti.InteropModule=p,Ti}(),e),i(wr(),e),i(Vi(),e)}(Li)),Li}var br={},Ir={},Er={},xr={};Object.defineProperty(xr,\"__esModule\",{value:!0}),xr.getSnapshotSourceChannelName=void 0;xr.getSnapshotSourceChannelName=e=>`snapshot-source-provider-${e.uuid}`;var Ar,Pr,Mr,_r,Or,Sr=s&&s.__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},Rr=s&&s.__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)};Object.defineProperty(Er,\"__esModule\",{value:!0}),Er.SnapshotSource=void 0;const Fr=d,jr=xr,kr=new Map;class Lr extends Fr.Base{constructor(e,t){super(e),Ar.set(this,void 0),Pr.set(this,(()=>(kr.has(this.identity.uuid)||kr.set(this.identity.uuid,{eventFired:null,clientPromise:null}),kr.get(this.identity.uuid)))),Mr.set(this,(()=>(Rr(this,Pr,\"f\").call(this).clientPromise||(Rr(this,Pr,\"f\").call(this).clientPromise=Rr(this,_r,\"f\").call(this)),Rr(this,Pr,\"f\").call(this).clientPromise))),_r.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);try{Rr(this,Pr,\"f\").call(this).eventFired||await Rr(this,Or,\"f\").call(this);const t=await this.fin.InterApplicationBus.Channel.connect(e,{wait:!1});return t.onDisconnection((()=>{Rr(this,Pr,\"f\").call(this).clientPromise=null,Rr(this,Pr,\"f\").call(this).eventFired=null})),t}catch(e){throw Rr(this,Pr,\"f\").call(this).clientPromise=null,new Error(\"The targeted SnapshotSource is not currently initialized. Await this object's ready() method.\")}})),Or.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);let t,n;const i=new Promise(((e,i)=>{t=e,n=i}));Rr(this,Pr,\"f\").call(this).eventFired=i;const r=async i=>{try{i.channelName===e&&(t(),await this.fin.InterApplicationBus.Channel.removeListener(\"connected\",r))}catch(e){n(e)}};await this.fin.InterApplicationBus.Channel.on(\"connected\",r)})),Sr(this,Ar,t,\"f\")}get identity(){return Rr(this,Ar,\"f\")}async ready(){this.wire.sendAction(\"snapshot-source-ready\").catch((e=>{}));try{await Rr(this,Mr,\"f\").call(this)}catch(e){await Rr(this,Pr,\"f\").call(this).eventFired}}async getSnapshot(){this.wire.sendAction(\"snapshot-source-get-snapshot\").catch((e=>{}));const e=await Rr(this,Mr,\"f\").call(this),t=await e.dispatch(\"get-snapshot\");return(await t).snapshot}async applySnapshot(e){this.wire.sendAction(\"snapshot-source-apply-snapshot\").catch((e=>{}));return(await Rr(this,Mr,\"f\").call(this)).dispatch(\"apply-snapshot\",{snapshot:e})}}Er.SnapshotSource=Lr,Ar=new WeakMap,Pr=new WeakMap,Mr=new WeakMap,_r=new WeakMap,Or=new WeakMap,Object.defineProperty(Ir,\"__esModule\",{value:!0}),Ir.SnapshotSourceModule=void 0;const Tr=d,$r=Er,Br=xr;class Gr extends Tr.Base{async init(e){if(this.wire.sendAction(\"snapshot-source-init\").catch((e=>{})),\"object\"!=typeof e||\"function\"!=typeof e.getSnapshot||\"function\"!=typeof e.applySnapshot)throw new Error(\"you must pass in a valid SnapshotProvider\");const t=await this.fin.InterApplicationBus.Channel.create((0,Br.getSnapshotSourceChannelName)(this.fin.me));t.register(\"get-snapshot\",(async()=>({snapshot:await e.getSnapshot()}))),t.register(\"apply-snapshot\",(({snapshot:t})=>e.applySnapshot(t)))}wrapSync(e){return this.wire.sendAction(\"snapshot-source-wrap-sync\").catch((e=>{})),new $r.SnapshotSource(this.wire,e)}async wrap(e){return this.wire.sendAction(\"snapshot-source-wrap\").catch((e=>{})),this.wrapSync(e)}}Ir.SnapshotSourceModule=Gr,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Ir,e),n(Er,e)}(br),Object.defineProperty(a,\"__esModule\",{value:!0});var Wr=a.Fin=void 0;const Hr=t,Nr=c,Dr=ie(),Ur=Z(),Vr=de,zr=en,Kr=rn,qr=un,Jr=bn,Yr=J(),Zr=An,Qr=ki,Xr=Cr(),eo=br;class to extends Hr.EventEmitter{constructor(e){super(),this.wire=e,this.System=new Nr.System(e),this.Window=new Dr._WindowModule(e),this.Application=new Ur.ApplicationModule(e),this.InterApplicationBus=new Vr.InterApplicationBus(e),this.Clipboard=new zr.Clipboard(e),this.ExternalApplication=new Kr.ExternalApplicationModule(e),this.Frame=new qr._FrameModule(e),this.GlobalHotkey=new Jr.GlobalHotkey(e),this.Platform=new Zr.PlatformModule(e,this.InterApplicationBus.Channel),this.View=new Yr.ViewModule(e),this.Interop=new Xr.InteropModule(e),this.SnapshotSource=new eo.SnapshotSourceModule(e),e.registerFin(this),this.me=(0,Qr.getMe)(e),e.on(\"disconnected\",(()=>{this.emit(\"disconnected\")}))}}Wr=a.Fin=to;var no={},io={};function ro(e){return\"string\"==typeof e.manifestUrl}function oo(e){return ao(e)&&\"string\"==typeof e.address}function so(e){return oo(e)&&\"string\"==typeof e.token}function ao(e){return\"string\"==typeof e.uuid}function co(e){return e.runtime&&\"string\"==typeof e.runtime.version}function ho(e){return ao(e)&&co(e)}Object.defineProperty(io,\"__esModule\",{value:!0}),io.isInternalConnectConfig=io.isPortDiscoveryConfig=io.isNewConnectConfig=io.isConfigWithReceiver=io.isRemoteConfig=io.isExistingConnectConfig=io.isExternalConfig=void 0,io.isExternalConfig=ro,io.isExistingConnectConfig=oo,io.isRemoteConfig=so,io.isConfigWithReceiver=function(e){return\"object\"==typeof e.receiver&&so({...e,address:\"\"})},io.isNewConnectConfig=ho,io.isPortDiscoveryConfig=function(e){return ro(e)&&co(e)||ho(e)},io.isInternalConnectConfig=function(e){return oo(e)||ho(e)};var lo={},uo={};Object.defineProperty(uo,\"__esModule\",{value:!0}),uo.EmitterMap=void 0;const po=t;function wo(e){return Buffer.from(e).toString(\"base64\")}uo.EmitterMap=class{constructor(){this.storage=new Map}hashKeys(e){return e.map(wo).join(\"/\")}getOrCreate(e){const t=this.hashKeys(e);return this.storage.has(t)||this.storage.set(t,new po.EventEmitter),this.storage.get(t)}has(e){return this.storage.has(this.hashKeys(e))}delete(e){const t=this.hashKeys(e);return this.storage.delete(t)}},Object.defineProperty(lo,\"__esModule\",{value:!0});const yo=uo;class fo extends yo.EmitterMap{constructor(){super(...arguments),this.dispatchEvent=e=>{if(function(e){return\"process-desktop-event\"===e.action}(e)){const{payload:t}=e,n=function(e){const{topic:t}=e;if(\"frame\"===t||\"window\"===t||\"view\"===t){const{uuid:n,name:i}=e;return[t,n,i]}if(\"application\"===t){const{uuid:n}=e;return[t,n]}return[t]}(t);if(this.has(n))return this.getOrCreate(n).emit(t.type,t),!0}return!1}}}lo.default=fo;var go,mo,vo=s&&s.__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},Co=s&&s.__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)},bo=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(no,\"__esModule\",{value:!0});var Io=no.Transport=void 0;const Eo=t,xo=io,Ao=g,Po=bo(lo),Mo=ki,_o=ke;class Oo extends Eo.EventEmitter{constructor(e,t,n){super(),this.wireListeners=new Map,this.topicRefMap=new Map,this.eventAggregator=new Po.default,this.messageHandlers=[this.eventAggregator.dispatchEvent],go.set(this,void 0),mo.set(this,void 0),this.connectSync=()=>{Co(this,go,\"f\").connectSync()},this.getPort=()=>Co(this,go,\"f\").getPort(),vo(this,go,new e(this.onmessage.bind(this)),\"f\"),this.environment=t,this.sendRaw=Co(this,go,\"f\").send.bind(Co(this,go,\"f\")),this.registerMessageHandler(this.handleMessage.bind(this)),Co(this,go,\"f\").on(\"disconnected\",(()=>{for(const[,{handleNack:e}]of this.wireListeners)e({reason:\"Remote connection has closed\"});this.wireListeners.clear(),this.emit(\"disconnected\")}));const{uuid:i,name:r}=n,o=this.environment.getCurrentEntityType();this.me=(0,Mo.getBaseMe)(o,i,r)}getFin(){if(!Co(this,mo,\"f\"))throw new Error(\"No Fin object registered for this transport\");return Co(this,mo,\"f\")}registerFin(e){if(Co(this,mo,\"f\"))throw new Error(\"Fin object has already been registered for this transport\");vo(this,mo,e,\"f\")}shutdown(){return Co(this,go,\"f\").shutdown()}async connect(e){if((0,xo.isConfigWithReceiver)(e))return await Co(this,go,\"f\").connect(e.receiver),this.authorize(e);if((0,xo.isRemoteConfig)(e))return this.connectRemote(e);if((0,xo.isExistingConnectConfig)(e))return this.connectByPort(e);if((0,xo.isNewConnectConfig)(e)){const t=await this.environment.retrievePort(e);return this.connectByPort({...e,address:`ws://localhost:${t}`})}}async connectRemote(e){return await Co(this,go,\"f\").connect(new(this.environment.getWsConstructor())(e.address)),this.authorize(e)}async connectByPort(e){const{address:t,uuid:n}=e,i={...e,type:\"file-token\"},r=Co(this,go,\"f\");await r.connect(new(this.environment.getWsConstructor())(e.address));const o=await this.sendAction(\"request-external-authorization\",{uuid:n,type:\"file-token\"},!0);if(\"external-authorization-response\"!==o.action)throw new Ao.UnexpectedActionError(o.action);return await this.environment.writeToken(o.payload.file,o.payload.token),this.authorize(i)}async authorize(e){const t=await this.sendAction(\"request-authorization\",e,!0);if(\"authorization-response\"!==t.action)throw new Ao.UnexpectedActionError(t.action);if(!0!==t.payload.success)throw new Ao.RuntimeError(t.payload)}sendAction(e,t={},n=!1){let i=()=>{};const r=Ao.RuntimeError.getCallSite(1),o=this.environment.getNextMessageId(),s=new Promise(((s,a)=>{i=a;const c={action:e,payload:t,messageId:o},d=Co(this,go,\"f\");return this.addWireListener(o,s,(e=>this.nackHandler(e,a,r)),n),d.send(c).catch(a)}));return Object.assign(s,{cancel:i,messageId:o})}nackHandler(e,t,n){t(\"string\"==typeof e?e:new Ao.RuntimeError(e,n))}ferryAction(e){return new Promise(((t,n)=>{const i=this.environment.getNextMessageId();e.messageId=i;const r=e=>{t(e.payload)};return Co(this,go,\"f\").send(e).then((()=>this.addWireListener(i,r,(e=>this.nackHandler(e,n)),!1))).catch(n)}))}registerMessageHandler(e){this.messageHandlers.push(e)}addWireListener(e,t,n,i){i?this.uncorrelatedListener=t:this.wireListeners.has(e)?n({reason:\"Duplicate handler id\",error:(0,_o.errorToPOJO)(new Ao.DuplicateCorrelationError(String(e)))}):this.wireListeners.set(e,{resolve:t,handleNack:n})}onmessage(e){for(const t of this.messageHandlers)t.call(null,e)}handleMessage(e){const t=e.correlationId||NaN;if(\"correlationId\"in e){if(!this.wireListeners.has(t))return!1;{const{resolve:n,handleNack:i}=this.wireListeners.get(t);\"ack\"!==e.action?i({reason:\"Did not receive ack action\",error:(0,_o.errorToPOJO)(new Ao.NoAckError(e.action))}):\"payload\"in e?e.payload.success?n.call(null,e):i(e.payload):\"string\"==typeof e.reason?i(e):(console.warn(\"Received invalid response from core\",e),i({reason:\"invalid response shape\"})),this.wireListeners.delete(t)}}else this.uncorrelatedListener&&this.uncorrelatedListener.call(null,e),this.uncorrelatedListener=()=>{};return!0}}Io=no.Transport=Oo,go=new WeakMap,mo=new WeakMap;const So=(...e)=>({log:(...t)=>console.debug(`[${(new Date).toISOString()}]`,...(e=>e.map((e=>`[${e}]`)))(e),...t),getLogger:(...t)=>So(...e,...t)}),Ro=So(\"@openfin/core-web/client\");function Fo(e,t){if(!function(e){return\"string\"==typeof e}(e))throw new Error(`Property ${t} has invalid type. Expected string, got ${typeof e}.`)}const jo=\"web-broker-ports-ready\",ko=Ro.getLogger(\"get-web-interop-ports\");function Lo(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)}function To(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}\"function\"==typeof SuppressedError&&SuppressedError;const $o=e=>{var n,i,r;return r=class extends t.EventEmitter{constructor(t){super(),n.set(this,void 0),i.set(this,!1),this.connectSync=()=>{Lo(this,i,\"f\")||(e.addEventListener(\"message\",(e=>{e.data?.topic?.startsWith(\"wire-message\")&&e.data.message&&Lo(this,n,\"f\").call(this,{...JSON.parse(e.data.message),ports:e.ports})})),e.start())},this.connect=async()=>{this.connectSync()},this.send=t=>(e.postMessage({topic:\"wire-message\",message:JSON.stringify(t)}),Promise.resolve()),this.shutdown=async()=>{e.close()},To(this,n,t,\"f\")}getPort(){return e}},n=new WeakMap,i=new WeakMap,r};var Bo={},Go={};Object.defineProperty(Go,\"__esModule\",{value:!0}),Go.BaseEnvironment=void 0;const Wo=vr();Go.BaseEnvironment=class{async getViewWindowIdentity(e,t){const{identity:n}=await e.View.wrapSync(t).getCurrentWindow();return n}async getInteropInfo(e){const t=await e.Application.getCurrentSync().getInfo().catch((()=>null)),n=t?.initialOptions?.interopBrokerConfiguration??{};return{fdc3Version:t?(0,Wo.getDefaultViewFdc3VersionFromAppInfo)(t):void 0,...n,fdc3Info:{providerVersion:await e.System.getVersion(),provider:\"OpenFin\"}}}},Object.defineProperty(Bo,\"__esModule\",{value:!0});var Ho=Bo.BrowserEnvironment=void 0;const No=Go;class Do extends No.BaseEnvironment{constructor(){super(...arguments),this.type=\"other\",this.getRandomId=()=>{const e=new Uint32Array(1);return window.crypto.getRandomValues(e)[0].toString(32)}}getAdapterVersionSync(){return\"\"}observeBounds(e,t){throw new Error(\"Method not implemented.\")}layoutAllowedInContext(e){return!1}initLayoutManager(e,t,n){throw new Error(\"Method not implemented.\")}applyLayoutSnapshot(e,t,n){throw new Error(\"Method not implemented.\")}createLayout(e,t){throw new Error(\"Method not implemented.\")}destroyLayout(e,t){throw new Error(\"Method not implemented.\")}resolveLayout(e,t){throw new Error(\"Method not implemented.\")}initPlatform(...e){throw new Error(\"Method not implemented.\")}writeToken(e,t){return Promise.resolve(\"\")}retrievePort(e){throw new Error(\"Method not implemented.\")}getNextMessageId(){return this.getRandomId()}createChildContent(e){throw new Error(\"Method not implemented.\")}getWebWindow(e){throw new Error(\"Method not implemented.\")}getCurrentEntityIdentity(){throw new Error(\"Method not implemented.\")}getCurrentEntityType(){return\"external connection\"}raiseEvent(e,t){throw new Error(\"Method not implemented.\")}getUrl(){return location.href}getDefaultChannelOptions(){return{create:{},connect:{}}}getRtcPeer(){return new RTCPeerConnection}getWsConstructor(){return WebSocket}whenReady(){return Promise.resolve()}}Ho=Bo.BrowserEnvironment=Do;const Uo=e=>\"platform\"in e&&void 0!==e.platform;var Vo,zo;class Ko extends Ho{constructor(e){super(),this.connectConfig=e,Vo.set(this,void 0),zo.set(this,new W((async()=>Promise.resolve().then((function(){return require(\"./main-b14f67c9.js\")}))))),Uo(e)&&this.validatePlatformOptions(e)}getAdapterVersionSync(){return\"0.39.21\"}validatePlatformOptions({platform:e}){if(!(\"layoutSnapshot\"in e))throw new Error(\"Platform options are missing layoutSnapshot. Please provide a layoutSnapshot in the platform options.\");if(\"windows\"in e||\"windows\"in e.layoutSnapshot)throw new Error(\"It appears you tried to call connect() with a snapshot object from an OpenFin desktop environment. Note that connect() expects to be called with a platform property with this structure: { platform: { layoutSnapshot } }. To get a layoutSnapshot of the expected structure, use fin.Platform.Layout.getCurrentLayoutManagerSync().getLayoutSnapshot() in v34+ in your desktop environment.\");const{layouts:t}=e.layoutSnapshot;Object.entries(t).map((([e,t])=>{if(\"object\"!=typeof t||null===t)throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must be an object.`);if(!(\"content\"in t))throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must contain a 'content' property.`)}))}async getInteropInfo(e){return{...{contextGroups:void 0,logging:{beforeAction:{enabled:!1},afterAction:{enabled:!1}}},fdc3Version:void 0,fdc3Info:{providerVersion:\"0.39.21\",provider:\"OpenFin Web\"}}}layoutAllowedInContext(e){return!0}async initLayoutManager(e,t,n){if(Lo(this,Vo,\"f\"))throw new Error(\"Layout already initialized.\");if(!Uo(this.connectConfig))throw new Error(\"Platform options are missing from connection config.\");const{WebLayoutEntryPoint:i}=await Lo(this,zo,\"f\").getValue();return To(this,Vo,new i(this.connectConfig),\"f\"),await Lo(this,Vo,\"f\").initLayoutManager(e,t,n)}async applyLayoutSnapshot(e,t,n){Lo(this,Vo,\"f\")?.applyLayoutSnapshot(e,t,n)}async createLayout(e,t){return Lo(this,Vo,\"f\")?.createLayout(e,t)}async destroyLayout(e,t){return Lo(this,Vo,\"f\")?.destroyLayout(e,t)}async getViewWindowIdentity(e,t){return Promise.resolve({uuid:t.uuid,name:t.uuid})}}Vo=new WeakMap,zo=new WeakMap;const qo=()=>{const e=((e,t)=>{const n=new RegExp(`^${t}<(?.*)>$`).exec(e)?.groups?.meta;if(n)try{return JSON.parse(atob(n))}catch(e){throw new Error(`Failed to decode JSON from ${n}.`)}})(window.name,\"of-frame\");if(e)try{const{name:t,uuid:n,brokerUrl:i,providerId:r,contextGroup:o}=e;return Fo(i,\"brokerUrl\"),Fo(n,\"uuid\"),Fo(t,\"name\"),{identity:{name:t,uuid:n},brokerUrl:i,interopConfig:{providerId:r,currentContextGroup:o}}}catch(e){throw new Error(`Unexpected error occurred when inferring platform information: ${e.stack}`)}},Jo=()=>{const e=r.v4();return{uuid:e,name:e}},Yo=async e=>{if(\"enabled\"===e.connectionInheritance){const t=await(async e=>{const t=qo();if(t){const{validateOptions:n=(()=>!0)}=e,{identity:i,...r}=t;if(!await n(r))throw new Error(\"Parent options were rejected by validateOptions.\");return t}})(e);if(t)return t}if(!e.options){const t=\"enabled\"===e.connectionInheritance?\"Broker URL was not specified nor provided by a platform container.\":\"Connection inheritance is disabled but no options were provided.\";throw new Error(t)}return{...e.options,identity:Jo()}};exports.__classPrivateFieldGet=Lo,exports.__classPrivateFieldSet=To,exports.apiExposer=Gn,exports.commonjsGlobal=s,exports.connect=async t=>{try{Ro.log(\"Establishing connection\",t);const{brokerUrl:n,identity:i,timeout:r,interopConfig:s}=await Yo(t),{workerPort:a,iframeBrokerPort:c}=await(async(e,t,n)=>{const{origin:i}=new URL(e),r=document.createElement(\"IFRAME\");let s;r.style.display=\"none\";try{return await new Promise(((a,c)=>{const d=e=>{if(e.source===r.contentWindow&&e.data?.topic===`ack-${jo}`){if(e.origin!==i)c(new Error(`Broker redirected to unexpected origin ${e.origin}, expected ${i}.`));else if(e.data.success){const[t,n]=e.ports;a({iframeBrokerPort:t,workerPort:n})}else c(new m(e.data));window.removeEventListener(\"message\",d),clearTimeout(s)}};window.addEventListener(\"message\",d),ko.log(`Connecting to broker ${e}`),r.setAttribute(\"src\",e),r.setAttribute(\"name\",o(t,\"of-broker\")),document.body.appendChild(r),ko.log(\"Iframe loaded, awaiting init message from iframe\"),n&&(s=setTimeout((()=>{window.removeEventListener(\"message\",d),document.body.removeChild(r),c(new Error(\"Worker did not initialize in time\"))}),n))}))}catch(e){throw new Error(`Failed to initialise Fin Web Client. ${e.message}`,{cause:e})}})(n,i,r);Ro.log(\"Successfully established connection to shared worker\");const d={entityType:\"external connection\",...i};a.start(),c.start();const h=((t,n,i)=>{const r=$o(n),o=new Ko(t),s=new Io(r,o,i);return s.connectSync(),window.Buffer=e.Buffer,new Wr(s)})(t,a,d);return s?.providerId&&(h.me.interop=h.Interop.connectSync(s.providerId),s?.currentContextGroup&&h.me.interop.joinContextGroup(s.currentContextGroup).catch((e=>{console.warn(`Error joining specified context group: ${s?.currentContextGroup}, continuing`,e)}))),{...h,me:{...h.me,identity:{uuid:h.me.uuid,name:h.me.name}}}}catch(e){throw new Error(`An error occured during web-interop connection: ${e.message}`)}},exports.decorators=Nn,exports.encodeOptions=o,exports.layout_constants=ai,exports.lazy=G;\n","\"use strict\";var t=require(\"./main-8cad4070.js\"),e=require(\"uuid\");require(\"buffer/\"),require(\"events\"),require(\"lodash/cloneDeep\"),require(\"lodash/isEqual\");var i={},n={};Object.defineProperty(n,\"__esModule\",{value:!0}),n.mapValuesAsync=n.mapEntriesAsync=void 0;const o=(t,[e,i])=>({...t,[e]:i});async function s(t,e){return(await Promise.all(e.map((async([e,i])=>[e,await t(i,e)])))).reduce(o,{})}n.mapEntriesAsync=s,n.mapValuesAsync=async function(t,e){let i;return i=e instanceof Map?[...e.entries()]:Object.entries(e),s(t,i)};var r,a,l,h,d=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldSet||function(t,e,i,n,o){if(\"m\"===n)throw new TypeError(\"Private method is not writable\");if(\"a\"===n&&!o)throw new TypeError(\"Private accessor was defined without a setter\");if(\"function\"==typeof e?t!==e||!o:!e.has(t))throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");return\"a\"===n?o.call(t,i):o?o.value=i:e.set(t,i),i},c=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldGet||function(t,e,i,n){if(\"a\"===i&&!n)throw new TypeError(\"Private accessor was defined without a getter\");if(\"function\"==typeof e?t!==e||!n:!e.has(t))throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");return\"m\"===i?n:\"a\"===i?n.call(t):n?n.value:e.get(t)};Object.defineProperty(i,\"__esModule\",{value:!0});var m=i.DefaultLayoutManager=void 0;const u=n;class p{constructor(t){a.set(this,void 0),l.set(this,new Map),d(this,a,t,\"f\")}size(){return c(this,l,\"f\").size}async applyLayoutSnapshot({layouts:t}){if(Object.keys(t).length>1)throw new Error(\"[LayoutManager] Tried to call applyLayoutSnapshot with more than 1 layout. When implementing multiple layouts via overridden LayoutManager class, you must override and fully implement the applyLayoutSnapshot method without calling super.applyLayoutSnapshot().\");const[[e,i]]=Object.entries(t);await p.createLayout(this,{layoutName:e,layout:i})}async showLayout({layoutName:t}){}async getLayoutSnapshot(){return{layouts:await(0,u.mapValuesAsync)((t=>t.getFrameSnapshot()),c(this,l,\"f\"))}}async removeLayout({layoutName:t}){}getLayoutIdentityForView(t){const e=[...c(this,l,\"f\").values()].find((e=>e.getCurrentViews().some((e=>e.name===t.name&&e.uuid===t.uuid))));return e?.identity??void 0}isLayoutVisible({layoutName:t}){return c(p,r,\"m\",h).call(p,this,t).isVisible()}resolveLayoutIdentity(t){if(t&&\"layoutName\"in t)return t;const e=[...c(this,l,\"f\").values()];if(1===e.length)return e[0].identity;const i=e.find((t=>t.isVisible()));return i?.identity??void 0}static async resolveLayout(t,e){const i=t.resolveLayoutIdentity(e);if(void 0===i||!(\"layoutName\"in i))throw new Error(\"[layout-manager] resolveLayout: Could not resolve the layout identity. Make sure you include 'layoutName' in the identity object.\");return c(p,r,\"m\",h).call(p,t,i.layoutName)}static async handleSharedView(t,e,i){await(0,u.mapValuesAsync)((async t=>{if(t.identity.layoutName!==e.layoutName){const e=t.getCurrentViews().find((t=>t.name===i.name));e&&await t.onViewDetached({viewIdentity:e,target:null}).catch(console.error)}}),c(t,l,\"f\"))}static async handleLastViewRemoved(t,e){await t.removeLayout(e),await c(t,a,\"f\").handleLastViewRemoved(t)}static async destroyLayout(t,{layoutName:e}){await c(p,r,\"m\",h).call(p,t,e).destroy(),c(t,l,\"f\").delete(e)}static async createLayout(t,e){const{layoutName:i}=e;if(c(t,l,\"f\").has(i))throw new Error(`Layout name ${i} already exists`);await c(t,a,\"f\").createLayout(e,t)}static registerLayout(t,e,i){c(t,l,\"f\").set(e,i)}static getAllLayouts(t){return[...c(t,l,\"f\").values()]}static setInitialSnapshot(t,e){c(t,a,\"f\").setInitialSnapshot(e)}static createClosedConstructor(...t){return class extends p{constructor(){super(...t)}}}}m=i.DefaultLayoutManager=p,r=p,a=new WeakMap,l=new WeakMap,h=function(t,e){const i=c(t,l,\"f\").get(e);if(!i)throw new Error(`[layout-manager] getLayoutByName: Could not locate layout with name '${e}'`);return i};var g={},f={},v={};Object.defineProperty(v,\"__esModule\",{value:!0}),v.ReversibleMap=void 0;v.ReversibleMap=class{constructor(){this.valueToKey=new Map,this.keyToValue=new Map,this.setUnique=(t,e)=>{if(this.hasKey(t)||this.hasValue(e))throw new Error(\"Key or value already in the map.\");this.keyToValue.set(t,e),this.valueToKey.set(e,t)},this.getKey=t=>{const e=this.valueToKey.get(t);if(!e)throw new Error(\"Value not found in the map.\");return e},this.deleteKey=t=>{const e=this.getValue(t);return this.keyToValue.delete(t),this.valueToKey.delete(e),e},this.deleteValue=t=>{const e=this.getKey(t);return this.keyToValue.delete(e),this.valueToKey.delete(t),e},this.hasKey=t=>this.keyToValue.has(t),this.hasValue=t=>this.valueToKey.has(t)}getValue(t){const e=this.keyToValue.get(t);if(!e)throw new Error(\"Key not found in the map.\");return e}},Object.defineProperty(f,\"__esModule\",{value:!0});var _=f.LayoutContentCache=void 0;const y=t.lazy,C=v;class w{constructor(){this.contentItemCache=new C.ReversibleMap,this.contentItemCacheId=0,this.createCacheKey=()=>{const t=`entity-${this.contentItemCacheId.toString()}`;return this.contentItemCacheId+=1,t},this.hasKey=t=>this.contentItemCache.hasKey(t),this.getItemOrUndefined=t=>{try{return this.getContentItemOrThrow(t)}catch(t){return}},this.getContentItemOrThrow=(t,e)=>{if(!this.contentItemCache.hasKey(t))throw new Error(\"Layout component has been destroyed or detached from the current layout.\");const i=this.contentItemCache.getValue(t);if(e&&!e.includes(i.type))throw new Error(`Layout item is not the expected type. Expected ${e.join(\", \")}, got ${i.type}.`);return i},this.getOrCreateEntityId=t=>{if(this.contentItemCache.hasValue(t))return this.contentItemCache.getKey(t);t.onDestroyed((()=>{this.contentItemCache.deleteValue(t)}));const e=this.createCacheKey();return this.contentItemCache.setUnique(e,t),e}}static getSingleInstance(){return w.singleton.getValue()}}_=f.LayoutContentCache=w,w.singleton=new y.Lazy((()=>new w));var I={},b={};!function(t){Object.defineProperty(t,\"__esModule\",{value:!0}),t.getAdjacentStacks=t.doShareEdge=t.getAdjacentItem=void 0;t.getAdjacentItem=(e,i)=>{const{parent:n}=e;if(e.isRoot()||!n)return;const o=[\"top\",\"bottom\"].includes(i)?\"column\":\"row\",s=[\"top\",\"left\"].includes(i)?-1:1;if(n.type===o){const t=n.contentItems.indexOf(e)+s;if(t>=0&&t{const n=t.getBounds(),o=e.getBounds();if(!n||!o)return!1;if([\"top\",\"bottom\"].includes(i)){return!(n.righto.right)}return!(n.bottomo.bottom)};t.getAdjacentStacks=(e,i)=>{const n=[\"top\",\"bottom\"].includes(i)?\"row\":\"column\",o=s=>\"stack\"===s.type?(0,t.doShareEdge)(e,s,i)?[s]:[]:\"root\"===s.type||\"ground\"===s.type?[]:s.type===n?s.contentItems.map((t=>o(t))).flat():s.type!==n?[\"top\",\"right\"].includes(i)?o(s.contentItems[s.contentItems.length-1]):o(s.contentItems[0]):[],s=(0,t.getAdjacentItem)(e,i);return s?o(s):[]}}(b);var S=t.commonjsGlobal&&t.commonjsGlobal.__decorate||function(t,e,i,n){var o,s=arguments.length,r=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if(\"object\"==typeof Reflect&&\"function\"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(s<3?o(r):s>3?o(e,i,r):o(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};Object.defineProperty(I,\"__esModule\",{value:!0}),I.LayoutEntitiesController=void 0;const E=t.decorators,x=b,L=i;class z{constructor(t,e,i){this.wire=t,this.layoutManager=e,this.layoutContentCache=i,this.analytics=t=>{this.wire.sendAction(`layout-controller-${t}`).catch((()=>{}))},this.getLayoutIdentityForViewOrThrow=async t=>{const e=this.layoutManager.getLayoutIdentityForView(t);if(!e)throw new Error(`View identity ${t.name} is not attached to any layouts.`);return e},this.getRoot=async t=>{this.analytics(\"get-root\");const e=(await this.getLayout(t)).getRoot();return{type:e.type,entityId:this.layoutContentCache.getOrCreateEntityId(e)}},this.getStackByView=async t=>{this.analytics(\"get-stack-by-view\");const e=await this.getLayoutIdentityForViewOrThrow(t),i=(await this.getLayout(e)).getStackByView(t);if(\"stack\"===i?.type)return{entityId:this.layoutContentCache.getOrCreateEntityId(i),type:\"stack\"}},this.getStackViews=t=>{this.analytics(\"get-stack-views\");return this.layoutContentCache.getContentItemOrThrow(t,[\"stack\"]).contentItems.map((t=>({name:t.viewName,uuid:this.wire.me.uuid})))},this.isRoot=t=>{this.analytics(\"is-root\");return this.layoutContentCache.getContentItemOrThrow(t).isRoot()},this.exists=t=>(this.analytics(\"exists\"),this.layoutContentCache.hasKey(t)),this.addViewToStack=async(t,e,{index:i}={index:0})=>{this.analytics(\"add-view-to-stack\");const n=this.layoutContentCache.getContentItemOrThrow(t);if(i&&i>n.contentItems.length+1)throw new Error(`Index '${i}' out of range, please exclude the index or specify a number between 0 and ${n.contentItems.length}`);const o={id:t,index:i},{identity:s}=await n.layout.platformCreateView(e,{location:o});return s},this.findViewInStack=(t,e)=>t.contentItems.find((t=>t.viewName===e.name)),this.removeViewFromStack=async(t,e)=>{this.analytics(\"remove-view-from-stack\");const i=this.layoutContentCache.getContentItemOrThrow(t,[\"stack\"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to remove a view ('${e.name}') which does not belong to the stack.`);await n.layout.platformCloseView(e)},this.createAdjacentStack=async(t,e,{position:i=\"right\"}={})=>{if(this.analytics(\"create-adjacent-stack\"),!Array.isArray(e)||0===e.length)throw new Error('The parameter \"views\" must be an array with at least 1 element.');if(![\"top\",\"bottom\",\"left\",\"right\"].includes(i))throw new Error(`Invalid position '${i}' specified.`);const n=this.layoutContentCache.getContentItemOrThrow(t).createAdjacentStack({position:i}),o=this.layoutContentCache.getOrCreateEntityId(n);return await Promise.all(e.reverse().map((t=>this.addViewToStack(o,t)))),o},this.getAdjacentStacks=async({targetId:t,edge:e})=>{this.analytics(\"get-adjacent-stacks\");const i=this.layoutContentCache.getContentItemOrThrow(t);return(0,x.getAdjacentStacks)(i,e).map((t=>({entityId:this.layoutContentCache.getOrCreateEntityId(t)})))},this.setStackActiveView=async(t,e)=>{this.analytics(\"set-stack-active-view\");const i=this.layoutContentCache.getContentItemOrThrow(t,[\"stack\"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to set a view ('${e.name}') as active when it does not belong to the stack.`);i.setActiveContentItem(n,!0)}}async getLayout(t){const e=await L.DefaultLayoutManager.resolveLayout(this.layoutManager,t);if(!e)throw new Error(`Could not resolve target layout identity ${JSON.stringify(t)}`);return e}getContent(t){this.analytics(\"get-content\");return this.layoutContentCache.getContentItemOrThrow(t,[\"column\",\"row\"]).contentItems.map((t=>({type:t.type,entityId:this.layoutContentCache.getOrCreateEntityId(t)})))}getParent(t){this.analytics(\"get-parent\");const e=this.layoutContentCache.getContentItemOrThrow(t);if(!e.isRoot())return e.parent?.contentItems.includes(e)?{type:e.parent.type,entityId:this.layoutContentCache.getOrCreateEntityId(e.parent)}:void 0}}S([(0,E.expose)()],z.prototype,\"getLayoutIdentityForViewOrThrow\",void 0),S([(0,E.expose)()],z.prototype,\"getRoot\",void 0),S([(0,E.expose)()],z.prototype,\"getStackByView\",void 0),S([(0,E.expose)()],z.prototype,\"getStackViews\",void 0),S([(0,E.expose)()],z.prototype,\"getContent\",null),S([(0,E.expose)()],z.prototype,\"getParent\",null),S([(0,E.expose)()],z.prototype,\"isRoot\",void 0),S([(0,E.expose)()],z.prototype,\"exists\",void 0),S([(0,E.expose)()],z.prototype,\"addViewToStack\",void 0),S([(0,E.expose)()],z.prototype,\"removeViewFromStack\",void 0),S([(0,E.expose)()],z.prototype,\"createAdjacentStack\",void 0),S([(0,E.expose)()],z.prototype,\"getAdjacentStacks\",void 0),S([(0,E.expose)()],z.prototype,\"setStackActiveView\",void 0),I.LayoutEntitiesController=z,Object.defineProperty(g,\"__esModule\",{value:!0});var M=g.initLayoutEndpoints=void 0;const P=t.apiExposer,T=t.layout_constants,A=f,k=I,D=i;M=g.initLayoutEndpoints=async function(t,e){const i=t.getFin(),n=await i.Platform.getCurrentSync().getClient(),o=new P.ChannelsExposer(n);await new P.ApiExposer(o).exposeInstance(new k.LayoutEntitiesController(t,e,A.LayoutContentCache.getSingleInstance()),{id:T.LAYOUT_CONTROLLER_ID}),await async function(t,e){const i=t=>async i=>{const n=await D.DefaultLayoutManager.resolveLayout(e,i.target);if(!n)throw new Error(`Could not resolve the layout target from payload ${JSON.stringify(i)}`);return t(n,i)},n=(e,n)=>{t.register(e,i(n))},o=(t,e)=>{n(t,e)};n(\"replace-view\",((t,e)=>t.replaceView(e))),n(\"replace-layout\",((t,{layout:e})=>t.replaceLayout(e))),n(\"add-view\",((t,e)=>t.insertView(e))),o(\"layout-add-view\",((t,{viewOptions:e,location:i,targetView:n})=>t.platformCreateView(e,{location:i,targetView:n}))),n(\"close-view\",((t,e)=>t.cleanupView(e.viewIdentity))),o(\"layout-close-view\",((t,e)=>t.platformCloseView(e.viewIdentity))),n(\"apply-preset-layout\",((t,e)=>t.applyPreset(e))),n(\"get-layout-views\",(t=>t.getCurrentViews())),n(\"get-frame-snapshot\",(t=>t.getFrameSnapshot())),n(\"is-visible\",(t=>t.isVisible())),n(\"destroy\",(t=>t.destroy())),t.register(\"get-layout-snapshot\",(()=>e.getLayoutSnapshot()))}(n,e)};var R={};Object.defineProperty(R,\"__esModule\",{value:!0});var U=R.BaseLayout=void 0;U=R.BaseLayout=class{};var O={};Object.defineProperty(O,\"__esModule\",{value:!0});var V=O.DOMEmitter=void 0;V=O.DOMEmitter=class{constructor(t){this.container=t}dispatchLocalEvent(t,e){const i={...e,type:t,tabSelector:`tab-${e.name}`,containerSelector:`container-${e.name}`,topic:\"openfin-DOM-event\"};this.container.dispatchEvent(new CustomEvent(t,{detail:i}))}};var B={};Object.defineProperty(B,\"__esModule\",{value:!0});var H=B.mapLayoutContentItemsImmutableSync=B.mapLayoutContentItemsImmutable=W=B.isVisible=void 0;var W=B.isVisible=t=>(0!==t.offsetWidth||0!==t.offsetHeight)&&\"hidden\"!==window.getComputedStyle(t).visibility&&t.offsetTop>=0&&t.offsetLeft>=0&&t.offsetTop<=window.innerHeight&&t.offsetLeft<=window.innerWidth;const F=t=>\"type\"in t&&\"component\"===t.type;B.mapLayoutContentItemsImmutable=async function t(e,i){return F(i)?e(i):{...i,content:await Promise.all(i.content?.map((i=>t(e,i))))}},H=B.mapLayoutContentItemsImmutableSync=function t(e,i){return F(i)?e(i):{...i,content:i.content?.map((i=>t(e,i)))}};class N extends Error{constructor(t,e){super(e),this.type=t}}class G extends N{constructor(t,e){super(\"Configuration\",t),this.node=e}}class j extends N{constructor(t){super(\"PopoutBlocked\",t)}}class $ extends N{constructor(t){super(\"API\",t)}}class Z extends N{constructor(t){super(\"Bind\",t)}}class q extends Error{constructor(t,e,i){super(`${t}: ${e}${void 0===i?\"\":\": \"+i}`)}}class X extends q{constructor(t,e){super(\"Assert\",t,e)}}class Y extends q{constructor(t,e,i){super(\"UnreachableCase\",t,`${e}${void 0===i?\"\":\": \"+i}`)}}class K extends q{constructor(t,e){super(\"UnexpectedNull\",t,e)}}class J extends q{constructor(t,e){super(\"UnexpectedUndefined\",t,e)}}var Q;!function(t){let e=!1;const i={PopoutCannotBeCreatedWithGroundItemConfig:{id:0,default:\"Popout cannot be created with ground ItemConfig\"},PleaseRegisterAConstructorFunction:{id:1,default:\"Please register a constructor function\"},ComponentTypeNotRegisteredAndBindComponentEventHandlerNotAssigned:{id:2,default:\"Component type not registered and BindComponentEvent handler not assigned\"},ComponentIsAlreadyRegistered:{id:3,default:\"Component is already registered\"},ComponentIsNotVirtuable:{id:4,default:\"Component is not virtuable. Requires rootHtmlElement field/getter\"},VirtualComponentDoesNotHaveRootHtmlElement:{id:5,default:'Virtual component does not have getter \"rootHtmlElement\"'},ItemConfigIsNotTypeComponent:{id:6,default:\"ItemConfig is not of type component\"},InvalidNumberPartInSizeString:{id:7,default:\"Invalid number part in size string\"},UnknownUnitInSizeString:{id:8,default:\"Unknown unit in size string\"},UnsupportedUnitInSizeString:{id:9,default:\"Unsupported unit in size string\"}};t.idCount=Object.keys(i).length;const n=Object.values(i);t.checkInitialise=function(){if(!e)for(let e=0;e=\"0\"&&t<=\"9\"}function Tt(t,e){const i=zt(e);t.style.width=i}function At(t,e){const i=zt(e);t.style.height=i}function kt(t){return{width:t.offsetWidth,height:t.offsetHeight}}function Dt(t,e){t.style.display=e?\"\":\"none\"}function Rt(t,e){if(void 0!==e)for(const i in e)if(e.hasOwnProperty(i)){const n=e[i],o=t[i];t[i]=Ut(o,n)}return t}function Ut(t,e){if(\"object\"!=typeof e)return e;if(Array.isArray(e)){const t=e.length,i=new Array(t);for(let n=0;n36)throw new Error(\"Too many keys in config minifier map\")},t.translateObject=n}(dt||(dt={})),function(t){t.defaults={type:at.ground,content:[],size:1,sizeUnit:ht.Fractional,minSize:void 0,minSizeUnit:ht.Pixel,id:\"\",isClosable:!0},t.createCopy=function(t,e){switch(t.type){case at.ground:case at.row:case at.column:return gt.createCopy(t,e);case at.stack:return ut.createCopy(t,e);case at.component:return pt.createCopy(t);default:throw new Y(\"CICC91354\",t.type,\"Invalid Config Item type specified\")}},t.createDefault=function(t){switch(t){case at.ground:throw new X(\"CICCDR91562\");case at.row:case at.column:return gt.createDefault(t);case at.stack:return ut.createDefault();case at.component:return pt.createDefault();default:throw new Y(\"CICCDD91563\",t,\"Invalid Config Item type specified\")}},t.isComponentItem=function(t){return t.type===at.component},t.isStackItem=function(t){return t.type===at.stack},t.isGroundItem=function(t){return t.type===at.ground}}(ct||(ct={})),function(t){t.defaultMaximised=!1,function(t){t.createCopy=function(t,e){return void 0===t?void 0:{show:null!=e?e:t.show,popout:t.popout,close:t.close,maximise:t.maximise,minimise:t.minimise,tabDropdown:t.tabDropdown}}}(t.Header||(t.Header={}))}(mt||(mt={})),function(t){function e(t){const e=t.length,i=new Array(e);for(let n=0;n\"__glMaximised\"===t));t>0&&(o=!0,n=n.splice(t,1)),e=n.length>0?n[0]:ct.defaults.id}else e=n;return i=void 0!==t.maximised?t.maximised:o,{id:e,maximised:i}}}(wt||(wt={})),function(t){function e(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0;return{resolved:!0,root:Et.resolve(i),openPopouts:t.resolveOpenPopouts(e.openPopouts),dimensions:t.Dimensions.resolve(e.dimensions),settings:t.Settings.resolve(e.settings),header:t.Header.resolve(e.header,e.settings,e.labels)}}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:Lt.fromResolvedArray(e.openPopouts),settings:_t.Settings.createCopy(e.settings),dimensions:t.Dimensions.fromResolved(e.dimensions),header:_t.Header.createCopy(e.header)}},t.isResolved=function(t){const e=t;return void 0!==e.resolved&&!0===e.resolved},t.resolveOpenPopouts=function(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0,{root:Et.resolve(o),openPopouts:xt.resolveOpenPopouts(e.openPopouts),dimensions:xt.Dimensions.resolve(e.dimensions),settings:xt.Settings.resolve(e.settings),header:xt.Header.resolve(e.header,e.settings,e.labels),parentId:null!==(i=e.parentId)&&void 0!==i?i:null,indexInParent:null!==(n=e.indexInParent)&&void 0!==n?n:null,window:t.Window.resolve(e.window,e.dimensions),resolved:!0}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:i(e.openPopouts),dimensions:xt.Dimensions.fromResolved(e.dimensions),settings:_t.Settings.createCopy(e.settings),header:_t.Header.createCopy(e.header),parentId:e.parentId,indexInParent:e.indexInParent,window:t.Window.fromResolved(e.window)}},t.fromResolvedArray=i}(Lt||(Lt={}));class Wt{constructor(){this._allEventSubscriptions=[],this._subscriptionsMap=new Map,this.unbind=this.removeEventListener,this.trigger=this.emit}tryBubbleEvent(t,e){}emit(t,...e){let i=this._subscriptionsMap.get(t);if(void 0!==i){i=i.slice();for(let t=0;t0){const n=e.slice();n.unshift(t);const o=this._allEventSubscriptions.slice();for(let t=0;t0?n.contentItems[0]:n,e=0);const o=this._layoutManager.createAndInitContentItem(i,t);t.addChild(o,e),this._layoutManager.layoutConfig.settings.popInOnClose?this._onClose():this.close()}createWindow(){const t=this.createUrl(),e=Math.floor(1e6*Math.random()).toString(36),i=this.serializeWindowFeatures({width:this._initialWindowSize.width,height:this._initialWindowSize.height,innerWidth:this._initialWindowSize.width,innerHeight:this._initialWindowSize.height,menubar:\"no\",toolbar:\"no\",location:\"no\",personalbar:\"no\",resizable:\"yes\",scrollbars:\"no\",status:\"no\"});if(this._popoutWindow=globalThis.open(t,e,i),this._popoutWindow)this._popoutWindow.addEventListener(\"load\",(()=>this.positionWindow()),{passive:!0}),this._popoutWindow.addEventListener(\"beforeunload\",(()=>{this._layoutManager.layoutConfig.settings.popInOnClose?this.popIn():this._onClose()}),{passive:!0}),this._checkReadyInterval=setInterval((()=>this.checkReady()),10);else if(!0===this._layoutManager.layoutConfig.settings.blockedPopoutsThrowError){throw new j(\"Popout blocked\")}}checkReady(){if(null===this._popoutWindow)throw new K(\"BPCR01844\");this._popoutWindow.__glInstance&&this._popoutWindow.__glInstance.isInitialised&&(this.onInitialised(),void 0!==this._checkReadyInterval&&(clearInterval(this._checkReadyInterval),this._checkReadyInterval=void 0))}serializeWindowFeatures(t){const e=[];for(const i in t)e.push(i+\"=\"+t[i].toString());return e.join(\",\")}createUrl(){const t=\"gl-window-config-\"+Ot(),e=_t.minifyConfig(this._config);try{localStorage.setItem(t,JSON.stringify(e))}catch(t){throw new Error(\"Error while writing to localStorage \"+function(t){return t instanceof Error?t.message:\"string\"==typeof t?t:\"Unknown Error\"}(t))}const i=new URL(location.href);return i.searchParams.set(\"gl-window\",t),i.toString()}positionWindow(){if(null===this._popoutWindow)throw new Error(\"BrowserPopout.positionWindow: null popoutWindow\");this._popoutWindow.moveTo(this._initialWindowSize.left,this._initialWindowSize.top),this._popoutWindow.focus()}onInitialised(){this._isInitialised=!0,this.getGlInstance().on(\"popIn\",(()=>this.popIn())),this.emit(\"initialised\")}_onClose(){setTimeout((()=>this.emit(\"closed\")),50)}}class Gt extends Wt{constructor(t,e,i,n){super(),this.layoutManager=t,this._parent=i,this._element=n,this._popInParentIds=[],this._type=e.type,this._id=e.id,this._isInitialised=!1,this.isGround=!1,this.isRow=!1,this.isColumn=!1,this.isStack=!1,this.isComponent=!1,this.size=e.size,this.sizeUnit=e.sizeUnit,this.minSize=e.minSize,this.minSizeUnit=e.minSizeUnit,this._isClosable=e.isClosable,this._pendingEventPropagations={},this._throttledEvents=[\"stateChanged\"],this._contentItems=this.createContentItems(e.content)}get type(){return this._type}get id(){return this._id}set id(t){this._id=t}get popInParentIds(){return this._popInParentIds}get parent(){return this._parent}get contentItems(){return this._contentItems}get isClosable(){return this._isClosable}get element(){return this._element}get isInitialised(){return this._isInitialised}static isStack(t){return t.isStack}static isComponentItem(t){return t.isComponent}static isComponentParentableItem(t){return t.isStack||t.isGround}removeChild(t,e=!1){const i=this._contentItems.indexOf(t);if(-1===i)throw new Error(\"Can't remove child item. Unknown content item\");if(e||this._contentItems[i].destroy(),this._contentItems.splice(i,1),this._contentItems.length>0)this.updateSize(!1);else if(!this.isGround&&!0===this._isClosable){if(null===this._parent)throw new K(\"CIUC00874\");this._parent.removeChild(this)}}addChild(t,e,i){return null!=e||(e=this._contentItems.length),this._contentItems.splice(e,0,t),t.setParent(this),!0===this._isInitialised&&!1===t._isInitialised&&t.init(),e}replaceChild(t,e,i=!1){const n=this._contentItems.indexOf(t),o=t._element.parentNode;if(-1===n)throw new X(\"CIRCI23232\",\"Can't replace child. oldChild is not child of this\");if(null===o)throw new K(\"CIRCP23232\");if(o.replaceChild(e._element,t._element),!0===i&&(t._parent=null,t.destroy()),this._contentItems[n]=e,e.setParent(this),e.size=t.size,e.sizeUnit=t.sizeUnit,e.minSize=t.minSize,e.minSizeUnit=t.minSizeUnit,null===e._parent)throw new K(\"CIRCNC45699\");!0===e._parent._isInitialised&&!1===e._isInitialised&&e.init(),this.updateSize(!1)}remove(){if(null===this._parent)throw new K(\"CIR11110\");this._parent.removeChild(this)}popout(){const t=Ot(),e=this.layoutManager.createPopoutFromContentItem(this,void 0,t,void 0);return this.emitBaseBubblingEvent(\"stateChanged\"),e}calculateConfigContent(){const t=this._contentItems,e=t.length,i=new Array(e);for(let n=0;nthis.propagateEventToLayoutManager(t,e))))}propagateEventToLayoutManager(t,e){this._pendingEventPropagations[t]=!1,this.layoutManager.emitUnknown(t,e)}}class jt extends Gt{constructor(t,e,i){super(t,e,i,document.createElement(\"div\")),this._parentItem=i,this._focused=!1,this.isComponent=!0,this._reorderEnabled=e.reorderEnabled,this.applyUpdatableConfig(e),this._initialWantMaximise=e.maximised;const n=document.createElement(\"div\");n.classList.add(\"lm_content\"),this.element.appendChild(n),this._container=new Ft(e,this,t,n,(t=>this.handleUpdateItemConfigEvent(t)),(()=>this.show()),(()=>this.hide()),(t=>this.focus(t)),(t=>this.blur(t)))}get componentName(){return this._container.componentType}get componentType(){return this._container.componentType}get reorderEnabled(){return this._reorderEnabled}get initialWantMaximise(){return this._initialWantMaximise}get component(){return this._container.component}get container(){return this._container}get parentItem(){return this._parentItem}get headerConfig(){return this._headerConfig}get title(){return this._title}get tab(){return this._tab}get focused(){return this._focused}destroy(){this._container.destroy(),super.destroy()}applyUpdatableConfig(t){this.setTitle(t.title),this._headerConfig=t.header}toConfig(){const t=this._container.stateRequestEvent,e=void 0===t?this._container.state:t();return{type:at.component,content:[],size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,maximised:!1,isClosable:this.isClosable,reorderEnabled:this._reorderEnabled,title:this._title,header:mt.Header.createCopy(this._headerConfig),componentType:pt.copyComponentType(this.componentType),componentState:e}}close(){if(null===this.parent)throw new K(\"CIC68883\");this.parent.removeChild(this,!1)}enterDragMode(t,e){Tt(this.element,t),At(this.element,e),this._container.enterDragMode(t,e)}exitDragMode(){this._container.exitDragMode()}enterStackMaximised(){this._container.enterStackMaximised()}exitStackMaximised(){this._container.exitStackMaximised()}drag(){this._container.drag()}updateSize(t){this.updateNodeSize(t)}init(){this.updateNodeSize(!1),super.init(),this._container.emit(\"open\"),this.initContentItems()}setTitle(t){this._title=t,this.emit(\"titleChanged\",t),this.emit(\"stateChanged\")}setTab(t){this._tab=t,this.emit(\"tab\",t),this._container.setTab(t)}hide(){super.hide(),this._container.setVisibility(!1)}show(){super.show(),this._container.setVisibility(!0)}focus(t=!1){this.parentItem.setActiveComponentItem(this,!0,t)}setFocused(t){this._focused=!0,this.tab.setFocused(),t||this.emitBaseBubblingEvent(\"focus\")}blur(t=!1){this._focused&&this.layoutManager.setFocusedComponentItem(void 0,t)}setBlurred(t){this._focused=!1,this.tab.setBlurred(),t||this.emitBaseBubblingEvent(\"blur\")}setParent(t){this._parentItem=t,super.setParent(t)}handleUpdateItemConfigEvent(t){this.applyUpdatableConfig(t)}updateNodeSize(t){if(\"none\"!==this.element.style.display){const{width:e,height:i}=kt(this.element);this._container.setSizeToNodeSize(e,i,t)}}}class $t extends Gt{constructor(){super(...arguments),this._focused=!1}get focused(){return this._focused}setFocusedValue(t){this._focused=t}}class Zt extends Wt{constructor(t,e){super(),this._eElement=t,this._pointerTracking=!1,this._pointerDownEventListener=t=>this.onPointerDown(t),this._pointerMoveEventListener=t=>this.onPointerMove(t),this._pointerUpEventListener=t=>this.onPointerUp(t),this._timeout=void 0,this._allowableTargets=[t,...e],this._oDocument=document,this._eBody=document.body,this._nDelay=1800,this._nDistance=10,this._nX=0,this._nY=0,this._nOriginalX=0,this._nOriginalY=0,this._dragging=!1,this._eElement.addEventListener(\"pointerdown\",this._pointerDownEventListener,{passive:!0})}destroy(){this.checkRemovePointerTrackingEventListeners(),this._eElement.removeEventListener(\"pointerdown\",this._pointerDownEventListener)}cancelDrag(){this.processDragStop(void 0)}onPointerDown(t){if(this._allowableTargets.includes(t.target)&&t.isPrimary){const e=this.getPointerCoordinates(t);this.processPointerDown(e)}}processPointerDown(t){this._nOriginalX=t.x,this._nOriginalY=t.y,this._oDocument.addEventListener(\"pointermove\",this._pointerMoveEventListener),this._oDocument.addEventListener(\"pointerup\",this._pointerUpEventListener,{passive:!0}),this._pointerTracking=!0,this._timeout=setTimeout((()=>{try{this.startDrag()}catch(t){throw console.error(t),t}}),this._nDelay)}onPointerMove(t){this._pointerTracking&&(this.processDragMove(t),t.preventDefault())}processDragMove(t){this._nX=t.pageX-this._nOriginalX,this._nY=t.pageY-this._nOriginalY,!1===this._dragging&&(Math.abs(this._nX)>this._nDistance||Math.abs(this._nY)>this._nDistance)&&this.startDrag(),this._dragging&&this.emit(\"drag\",this._nX,this._nY,t)}onPointerUp(t){this.processDragStop(t)}processDragStop(t){var e;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this.checkRemovePointerTrackingEventListeners(),!0===this._dragging&&(this._eBody.classList.remove(\"lm_dragging\"),this._eElement.classList.remove(\"lm_dragging\"),null===(e=this._oDocument.querySelector(\"iframe\"))||void 0===e||e.style.setProperty(\"pointer-events\",\"\"),this._dragging=!1,this.emit(\"dragStop\",t))}checkRemovePointerTrackingEventListeners(){this._pointerTracking&&(this._oDocument.removeEventListener(\"pointermove\",this._pointerMoveEventListener),this._oDocument.removeEventListener(\"pointerup\",this._pointerUpEventListener),this._pointerTracking=!1)}startDrag(){var t;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this._dragging=!0,this._eBody.classList.add(\"lm_dragging\"),this._eElement.classList.add(\"lm_dragging\"),null===(t=this._oDocument.querySelector(\"iframe\"))||void 0===t||t.style.setProperty(\"pointer-events\",\"none\"),this.emit(\"dragStart\",this._nOriginalX,this._nOriginalY)}getPointerCoordinates(t){return{x:t.pageX,y:t.pageY}}}class qt{constructor(t,e,i){this._isVertical=t,this._size=e,this._grabSize=i0){const i=this.createSplitter(Math.max(0,e-1)).element;e>0?(this.contentItems[e-1].element.insertAdjacentElement(\"afterend\",i),i.insertAdjacentElement(\"afterend\",t.element)):(this.contentItems[0].element.insertAdjacentElement(\"beforebegin\",i),i.insertAdjacentElement(\"beforebegin\",t.element))}else this._childElementContainer.appendChild(t.element);super.addChild(t,e);const n=1/this.contentItems.length*100;if(!0===i)return this.emitBaseBubblingEvent(\"stateChanged\"),e;for(let e=0;e0&&(this.calculateRelativeSizes(),this.setAbsoluteSizes()),this.emitBaseBubblingEvent(\"stateChanged\"),this.emit(\"resize\")}setAbsoluteSizes(){const t=this.calculateAbsoluteSizes();for(let e=0;e0&&t.itemSizes[e]++,this._isColumn?(Tt(this.contentItems[e].element,t.crossAxisSize),At(this.contentItems[e].element,t.itemSizes[e])):(Tt(this.contentItems[e].element,t.itemSizes[e]),At(this.contentItems[e].element,t.crossAxisSize))}calculateAbsoluteSizes(){const t=(this.contentItems.length-1)*this._splitterSize,{width:e,height:i}=kt(this.element);let n,o;this._isColumn?(n=i-t,o=e):(n=e-t,o=i);let s=0;const r=[];for(let t=0;t0){const n=100-t;for(let t=0;t100&&e.length>0){for(let t=0;te)return;{const r=i/e;let a=i;for(let e=0;ethis.onSplitterDrag(e,t,i))),e.on(\"dragStop\",(()=>this.onSplitterDragStop(e))),e.on(\"dragStart\",(()=>this.onSplitterDragStart(e))),this._splitter.splice(t,0,e),e}getSplitItems(t){const e=this._splitter.indexOf(t);return{before:this.contentItems[e],after:this.contentItems[e+1]}}calculateContentItemMinSize(t){const e=t.minSize;if(void 0!==e){if(t.minSizeUnit===ht.Pixel)return e;throw new X(\"ROCGMD98831\",JSON.stringify(t))}{const t=this.layoutManager.layoutConfig.dimensions;return this._isColumn?t.defaultMinItemHeight:t.defaultMinItemWidth}}calculateContentItemsTotalMinSize(t){let e=0;for(const i of t)e+=this.calculateContentItemMinSize(i);return e}onSplitterDragStart(t){const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=this.calculateContentItemsTotalMinSize(e.before.contentItems),s=this.calculateContentItemsTotalMinSize(e.after.contentItems);this._splitterPosition=0,this._splitterMinPosition=-1*(i-o),this._splitterMaxPosition=n-s}onSplitterDrag(t,e,i){let n=this._isColumn?i:e;if(null===this._splitterMinPosition||null===this._splitterMaxPosition)throw new K(\"ROCOSD59226\");n=Math.max(n,this._splitterMinPosition),n=Math.min(n,this._splitterMaxPosition),this._splitterPosition=n;const o=zt(n);this._isColumn?t.element.style.top=o:t.element.style.left=o}onSplitterDragStop(t){if(null===this._splitterPosition)throw new K(\"ROCOSDS66932\");{const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=(this._splitterPosition+i)/(i+n),s=e.before.size+e.after.size;e.before.size=o*s,e.after.size=(1-o)*s,t.element.style.top=zt(0),t.element.style.left=zt(0),globalThis.requestAnimationFrame((()=>this.updateSize(!1)))}}}!function(t){t.getElementDimensionSize=function(t,e){return\"width\"===e?function(t){return t.offsetWidth}(t):function(t){return t.offsetHeight}(t)},t.setElementDimensionSize=function(t,e,i){return\"width\"===e?Tt(t,i):At(t,i)},t.createElement=function(t,e){const i=t.createElement(\"div\");return i.classList.add(\"lm_item\"),e?i.classList.add(\"lm_column\"):i.classList.add(\"lm_row\"),i}}(Xt||(Xt={}));class Yt extends $t{constructor(t,e,i){super(t,vt.create(e),null,Yt.createElement(document)),this.isGround=!0,this._childElementContainer=this.element,this._containerElement=i;let n=null;for(;;){const t=n?n.previousSibling:this._containerElement.lastChild;if(!(t instanceof Element&&t.classList.contains(\"lm_content\")))break;n=t}this._containerElement.insertBefore(this.element,n)}init(){if(!0!==this.isInitialised){this.updateNodeSize();for(let t=0;t0?this.contentItems[0]:this,n.isComponent)throw new Error(\"Cannot add item as child to ComponentItem\");{const t=this.layoutManager.createAndInitContentItem(i,n);return e=n.addChild(t,e),n===this?-1:e}}loadComponentAsRoot(t){this.clearRoot();const e=Ct.resolve(t,!1);if(e.maximised)throw new Error(\"Root Component cannot be maximised\");{const t=new jt(this.layoutManager,e,this);t.init(),this.addChild(t,0)}}addChild(t,e){if(this.contentItems.length>0)throw new Error(\"Ground node can only have a single child\");return this._childElementContainer.appendChild(t.element),e=super.addChild(t,e),this.updateSize(!1),this.emitBaseBubblingEvent(\"stateChanged\"),e}calculateConfigContent(){const t=this.contentItems,e=t.length,i=new Array(e);for(let n=0;n0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e)),this.updateContentItemsSize(!1))}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}createSideAreas(){const t=Yt.Area.oppositeSides,e=new Array(Object.keys(t).length);let i=0;for(const n in t){const o=n,s=this.getElementArea();if(null===s)throw new K(\"RCSA77553\");s.side=o,\"2\"===t[o][1]?s[o]=s[t[o]]-50:s[o]=s[t[o]]+50,s.surface=(s.x2-s.x1)*(s.y2-s.y1),e[i++]=s}return e}highlightDropZone(t,e,i){this.layoutManager.tabDropPlaceholder.remove(),super.highlightDropZone(t,e,i)}onDrop(t,e){if(t.isComponent){const e=ut.createDefault(),i=t;e.header=mt.Header.createCopy(i.headerConfig);const n=this.layoutManager.createAndInitContentItem(e,this);n.addChild(t),t=n}if(0===this.contentItems.length)this.addChild(t);else{if(t.type===at.row||t.type===at.column){const e=ut.createDefault(),i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}const i=\"x\"==e.side[0]?at.row:at.column,n=\"2\"==e.side[1],o=this.contentItems[0];if(o instanceof Xt&&o.type===i){const e=o.contentItems[n?0:o.contentItems.length-1];o.addChild(t,n?0:void 0,!0),e.size*=.5,t.size=e.size,t.sizeUnit=ht.Percent,o.updateSize(!1)}else{const e=ct.createDefault(i),s=this.layoutManager.createContentItem(e,this);this.replaceChild(o,s),s.addChild(t,n?0:void 0,!0),s.addChild(o,n?void 0:0,!0),o.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}}dock(){throw new X(\"GID87731\")}validateDocking(){throw new X(\"GIVD87732\")}getAllContentItems(){const t=[this];return this.deepGetAllContentItems(this.contentItems,t),t}getConfigMaximisedItems(){const t=[];return this.deepFilterContentItems(this.contentItems,t,(t=>!(!Gt.isStack(t)||!t.initialWantMaximise)||!(!Gt.isComponentItem(t)||!t.initialWantMaximise))),t}getItemsByPopInParentId(t){const e=[];return this.deepFilterContentItems(this.contentItems,e,(e=>e.popInParentIds.includes(t))),e}toConfig(){throw new Error(\"Cannot generate GroundItem config\")}setActiveComponentItem(t,e,i){}updateNodeSize(){const{width:t,height:e}=kt(this._containerElement);Tt(this.element,t),At(this.element,e),this.contentItems.length>0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e))}deepGetAllContentItems(t,e){for(let i=0;ithis.onClick(t),this._touchStartEventListener=t=>this.onTouchStart(t),this._element=document.createElement(\"div\"),this._element.classList.add(i),this._element.title=e,this._header.on(\"destroy\",(()=>this.destroy())),this._element.addEventListener(\"click\",this._clickEventListener,{passive:!0}),this._element.addEventListener(\"touchstart\",this._touchStartEventListener,{passive:!0}),this._header.controlsContainerElement.appendChild(this._element)}get element(){return this._element}destroy(){var t;this._element.removeEventListener(\"click\",this._clickEventListener),this._element.removeEventListener(\"touchstart\",this._touchStartEventListener),null===(t=this._element.parentNode)||void 0===t||t.removeChild(this._element)}onClick(t){this._pushEvent(t)}onTouchStart(t){this._pushEvent(t)}}class Jt{constructor(t,e,i,n,o){var s;this._layoutManager=t,this._componentItem=e,this._closeEvent=i,this._focusEvent=n,this._dragStartEvent=o,this._isActive=!1,this._tabClickListener=t=>this.onTabClickDown(t),this._tabTouchStartListener=t=>this.onTabTouchStart(t),this._closeClickListener=()=>this.onCloseClick(),this._closeTouchStartListener=()=>this.onCloseTouchStart(),this._dragStartListener=(t,e)=>this.onDragStart(t,e),this._contentItemDestroyListener=()=>this.onContentItemDestroy(),this._tabTitleChangedListener=t=>this.setTitle(t),this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_tab\"),this._titleElement=document.createElement(\"span\"),this._titleElement.classList.add(\"lm_title\"),this._closeElement=document.createElement(\"div\"),this._closeElement.classList.add(\"lm_close_tab\"),this._element.appendChild(this._titleElement),this._element.appendChild(this._closeElement),e.isClosable?this._closeElement.style.display=\"\":this._closeElement.style.display=\"none\",this.setTitle(e.title),this._componentItem.on(\"titleChanged\",this._tabTitleChangedListener);(null!==(s=e.reorderEnabled)&&void 0!==s?s:this._layoutManager.layoutConfig.settings.reorderEnabled)&&this.enableReorder(),this._element.addEventListener(\"click\",this._tabClickListener,{passive:!0}),this._element.addEventListener(\"touchstart\",this._tabTouchStartListener,{passive:!0}),this._componentItem.isClosable?(this._closeElement.addEventListener(\"click\",this._closeClickListener,{passive:!0}),this._closeElement.addEventListener(\"touchstart\",this._closeTouchStartListener,{passive:!0})):(this._closeElement.remove(),this._closeElement=void 0),this._componentItem.setTab(this),this._layoutManager.emit(\"tabCreated\",this)}get isActive(){return this._isActive}get componentItem(){return this._componentItem}get contentItem(){return this._componentItem}get element(){return this._element}get titleElement(){return this._titleElement}get closeElement(){return this._closeElement}get reorderEnabled(){return void 0!==this._dragListener}set reorderEnabled(t){t!==this.reorderEnabled&&(t?this.enableReorder():this.disableReorder())}setTitle(t){this._titleElement.innerText=t,this._element.title=t}setActive(t){t!==this._isActive&&(this._isActive=t,t?this._element.classList.add(\"lm_active\"):this._element.classList.remove(\"lm_active\"))}destroy(){var t,e;this._closeEvent=void 0,this._focusEvent=void 0,this._dragStartEvent=void 0,this._element.removeEventListener(\"click\",this._tabClickListener),this._element.removeEventListener(\"touchstart\",this._tabTouchStartListener),null===(t=this._closeElement)||void 0===t||t.removeEventListener(\"click\",this._closeClickListener),null===(e=this._closeElement)||void 0===e||e.removeEventListener(\"touchstart\",this._closeTouchStartListener),this._componentItem.off(\"titleChanged\",this._tabTitleChangedListener),this.reorderEnabled&&this.disableReorder(),this._element.remove()}setBlurred(){this._element.classList.remove(\"lm_focused\"),this._titleElement.classList.remove(\"lm_focused\")}setFocused(){this._element.classList.add(\"lm_focused\"),this._titleElement.classList.add(\"lm_focused\")}onDragStart(t,e){if(void 0===this._dragListener)throw new J(\"TODSDLU10093\");if(void 0===this._dragStartEvent)throw new J(\"TODS23309\");this._dragStartEvent(t,e,this._dragListener,this.componentItem)}onContentItemDestroy(){void 0!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=void 0)}onTabClickDown(t){const e=t.target;e!==this._element&&e!==this._titleElement||(0===t.button?this.notifyFocus():1===t.button&&this._componentItem.isClosable&&this.notifyClose())}onTabTouchStart(t){t.target===this._element&&this.notifyFocus()}onCloseClick(){this.notifyClose()}onCloseTouchStart(){this.notifyClose()}notifyClose(){if(void 0===this._closeEvent)throw new J(\"TNC15007\");this._closeEvent(this._componentItem)}notifyFocus(){if(void 0===this._focusEvent)throw new J(\"TNA15007\");this._focusEvent(this._componentItem)}enableReorder(){this._dragListener=new Zt(this._element,[this._titleElement]),this._dragListener.on(\"dragStart\",this._dragStartListener),this._componentItem.on(\"destroy\",this._contentItemDestroyListener)}disableReorder(){if(void 0===this._dragListener)throw new J(\"TDR87745\");this._componentItem.off(\"destroy\",this._contentItemDestroyListener),this._dragListener.off(\"dragStart\",this._dragStartListener),this._dragListener=void 0}}class Qt{constructor(t,e,i,n,o){this._layoutManager=t,this._componentRemoveEvent=e,this._componentFocusEvent=i,this._componentDragStartEvent=n,this._dropdownActiveChangedEvent=o,this._tabs=[],this._lastVisibleTabIndex=-1,this._dropdownActive=!1,this._element=document.createElement(\"section\"),this._element.classList.add(\"lm_tabs\"),this._dropdownElement=document.createElement(\"section\"),this._dropdownElement.classList.add(\"lm_tabdropdown_list\"),this._dropdownElement.style.display=\"none\"}get tabs(){return this._tabs}get tabCount(){return this._tabs.length}get lastVisibleTabIndex(){return this._lastVisibleTabIndex}get element(){return this._element}get dropdownElement(){return this._dropdownElement}get dropdownActive(){return this._dropdownActive}destroy(){for(let t=0;tthis.handleTabCloseEvent(t)),(t=>this.handleTabFocusEvent(t)),((t,e,i,n)=>this.handleTabDragStartEvent(t,e,i,n)));void 0===e&&(e=this._tabs.length),this._tabs.splice(e,0,i),ethis._lastVisibleTabIndex){const t=this._tabs[e];for(let t=e;t>0;t--)this._tabs[t]=this._tabs[t-1];this._tabs[0]=t}}updateTabSizes(t,e){let i=!1;this.tryUpdateTabSizes(i,t,e)||(i=!0,this.tryUpdateTabSizes(i,t,e)),i!==this._dropdownActive&&(this._dropdownActive=i,this._dropdownActiveChangedEvent())}tryUpdateTabSizes(t,e,i){if(this._tabs.length>0){if(void 0===i)throw new Error(\"non-empty tabs must have active component item\");let n=0,o=!1;const s=this._layoutManager.layoutConfig.settings.tabOverlapAllowance,r=this._tabs.indexOf(i.tab),a=this._tabs[r];this._lastVisibleTabIndex=-1;for(let i=0;ie){if(o)i===r&&(l.style.zIndex=\"auto\",l.style.marginLeft=\"\",l.parentElement!==this._element&&this._element.appendChild(l));else{let t;if(t=r>0&&r<=i?(d-e)/(i-1):(d-e)/i,tthis.onClick(t),this._touchStartListener=t=>this.onTouchStart(t),this._rowColumnClosable=!0,this._closeButton=null,this._popoutButton=null,this._tabsContainer=new Qt(this._layoutManager,(t=>this.handleTabInitiatedComponentRemoveEvent(t)),(t=>this.handleTabInitiatedComponentFocusEvent(t)),((t,e,i,n)=>this.handleTabInitiatedDragStartEvent(t,e,i,n)),(()=>this.processTabDropdownActiveChanged())),this._show=i.show,this._popoutEnabled=i.popoutEnabled,this._popoutLabel=i.popoutLabel,this._maximiseEnabled=i.maximiseEnabled,this._maximiseLabel=i.maximiseLabel,this._minimiseEnabled=i.minimiseEnabled,this._minimiseLabel=i.minimiseLabel,this._closeEnabled=i.closeEnabled,this._closeLabel=i.closeLabel,this._tabDropdownEnabled=i.tabDropdownEnabled,this._tabDropdownLabel=i.tabDropdownLabel,this.setSide(i.side),this._canRemoveComponent=this._configClosable,this._element=document.createElement(\"section\"),this._element.classList.add(\"lm_header\"),this._controlsContainerElement=document.createElement(\"section\"),this._controlsContainerElement.classList.add(\"lm_controls\"),this._element.appendChild(this._tabsContainer.element),this._element.appendChild(this._controlsContainerElement),this._element.appendChild(this._tabsContainer.dropdownElement),this._element.addEventListener(\"click\",this._clickListener,{passive:!0}),this._element.addEventListener(\"touchstart\",this._touchStartListener,{passive:!0}),this._documentMouseUpListener=()=>this._tabsContainer.hideAdditionalTabsDropdown(),globalThis.document.addEventListener(\"mouseup\",this._documentMouseUpListener,{passive:!0}),this._tabControlOffset=this._layoutManager.layoutConfig.settings.tabControlOffset,this._tabDropdownEnabled&&(this._tabDropdownButton=new Kt(this,this._tabDropdownLabel,\"lm_tabdropdown\",(()=>this._tabsContainer.showAdditionalTabsDropdown()))),this._popoutEnabled&&(this._popoutButton=new Kt(this,this._popoutLabel,\"lm_popout\",(()=>this.handleButtonPopoutEvent()))),this._maximiseEnabled&&(this._maximiseButton=new Kt(this,this._maximiseLabel,\"lm_maximise\",(t=>this.handleButtonMaximiseToggleEvent(t)))),this._configClosable&&(this._closeButton=new Kt(this,this._closeLabel,\"lm_close\",(()=>s()))),this.processTabDropdownActiveChanged()}get show(){return this._show}get side(){return this._side}get leftRightSided(){return this._leftRightSided}get layoutManager(){return this._layoutManager}get parent(){return this._parent}get tabs(){return this._tabsContainer.tabs}get lastVisibleTabIndex(){return this._tabsContainer.lastVisibleTabIndex}get element(){return this._element}get tabsContainerElement(){return this._tabsContainer.element}get controlsContainerElement(){return this._controlsContainerElement}destroy(){this.emit(\"destroy\"),this._popoutEvent=void 0,this._maximiseToggleEvent=void 0,this._clickEvent=void 0,this._touchStartEvent=void 0,this._componentRemoveEvent=void 0,this._componentFocusEvent=void 0,this._componentDragStartEvent=void 0,this._tabsContainer.destroy(),globalThis.document.removeEventListener(\"mouseup\",this._documentMouseUpListener),this._element.remove()}createTab(t,e){this._tabsContainer.createTab(t,e)}removeTab(t){this._tabsContainer.removeTab(t)}processActiveComponentChanged(t){this._tabsContainer.processActiveComponentChanged(t),this.updateTabSizes()}setSide(t){this._side=t,this._leftRightSided=[nt.right,nt.left].includes(this._side)}setRowColumnClosable(t){this._rowColumnClosable=t,this.updateClosability()}updateClosability(){let t;if(this._configClosable)if(this._rowColumnClosable){t=!0;const e=this.tabs.length;for(let i=0;i1}applyFocusedValue(t){t?this._element.classList.add(\"lm_focused\"):this._element.classList.remove(\"lm_focused\")}processMaximised(){if(void 0===this._maximiseButton)throw new J(\"HPMAX16997\");this._maximiseButton.element.setAttribute(\"title\",this._minimiseLabel)}processMinimised(){if(void 0===this._maximiseButton)throw new J(\"HPMIN16997\");this._maximiseButton.element.setAttribute(\"title\",this._maximiseLabel)}updateTabSizes(){if(this._tabsContainer.tabCount>0){const t=this._show?this._layoutManager.layoutConfig.dimensions.headerHeight:0;let e;this._leftRightSided?(this._element.style.height=\"\",this._element.style.width=zt(t)):(this._element.style.width=\"\",this._element.style.height=zt(t)),e=this._leftRightSided?this._element.offsetHeight-this._controlsContainerElement.offsetHeight-this._tabControlOffset:this._element.offsetWidth-this._controlsContainerElement.offsetWidth-this._tabControlOffset,this._tabsContainer.updateTabSizes(e,this._getActiveComponentItemEvent())}}handleTabInitiatedComponentRemoveEvent(t){if(this._canRemoveComponent){if(void 0===this._componentRemoveEvent)throw new J(\"HHTCE22294\");this._componentRemoveEvent(t)}}handleTabInitiatedComponentFocusEvent(t){if(void 0===this._componentFocusEvent)throw new J(\"HHTAE22294\");this._componentFocusEvent(t)}handleTabInitiatedDragStartEvent(t,e,i,n){if(this._canRemoveComponent){if(void 0===this._componentDragStartEvent)throw new J(\"HHTDSE22294\");this._componentDragStartEvent(t,e,i,n)}else i.cancelDrag()}processTabDropdownActiveChanged(){void 0!==this._tabDropdownButton&&Dt(this._tabDropdownButton.element,this._tabsContainer.dropdownActive)}handleButtonPopoutEvent(){if(this._layoutManager.layoutConfig.settings.popoutWholeStack){if(void 0===this._popoutEvent)throw new J(\"HHBPOE17834\");this._popoutEvent()}else{const t=this._getActiveComponentItemEvent();t&&t.popout()}}handleButtonMaximiseToggleEvent(t){if(void 0===this._maximiseToggleEvent)throw new J(\"HHBMTE16834\");this._maximiseToggleEvent()}onClick(t){t.target===this._element&&this.notifyClick(t)}onTouchStart(t){t.target===this._element&&this.notifyTouchStart(t)}notifyClick(t){if(void 0===this._clickEvent)throw new J(\"HNHC46834\");this._clickEvent(t)}notifyTouchStart(t){if(void 0===this._touchStartEvent)throw new J(\"HNHTS46834\");this._touchStartEvent(t)}}class ee extends $t{constructor(t,e,i){var n,o,s,r,a,l,h,d,c,m,u,p,g,f,v,_,y,C,w;super(t,e,i,ee.createElement(document)),this._headerSideChanged=!1,this._resizeListener=()=>this.handleResize(),this._maximisedListener=()=>this.handleMaximised(),this._minimisedListener=()=>this.handleMinimised(),this._headerConfig=e.header;const I=t.layoutConfig.header,b=e.content;let S;if(1!==b.length)S=void 0;else{S=b[0].header}this._initialWantMaximise=e.maximised,this._initialActiveItemIndex=null!==(n=e.activeItemIndex)&&void 0!==n?n:0;const E=null!==(r=null!==(s=null===(o=this._headerConfig)||void 0===o?void 0:o.show)&&void 0!==s?s:null==S?void 0:S.show)&&void 0!==r?r:I.show,x=null!==(h=null!==(l=null===(a=this._headerConfig)||void 0===a?void 0:a.popout)&&void 0!==l?l:null==S?void 0:S.popout)&&void 0!==h?h:I.popout,L=null!==(m=null!==(c=null===(d=this._headerConfig)||void 0===d?void 0:d.maximise)&&void 0!==c?c:null==S?void 0:S.maximise)&&void 0!==m?m:I.maximise,z=null!==(g=null!==(p=null===(u=this._headerConfig)||void 0===u?void 0:u.close)&&void 0!==p?p:null==S?void 0:S.close)&&void 0!==g?g:I.close,M=null!==(_=null!==(v=null===(f=this._headerConfig)||void 0===f?void 0:f.minimise)&&void 0!==v?v:null==S?void 0:S.minimise)&&void 0!==_?_:I.minimise,P=null!==(w=null!==(C=null===(y=this._headerConfig)||void 0===y?void 0:y.tabDropdown)&&void 0!==C?C:null==S?void 0:S.tabDropdown)&&void 0!==w?w:I.tabDropdown;this._maximisedEnabled=!1!==L;const T={show:!1!==E,side:!1===E?nt.top:E,popoutEnabled:!1!==x,popoutLabel:!1===x?\"\":x,maximiseEnabled:this._maximisedEnabled,maximiseLabel:!1===L?\"\":L,closeEnabled:!1!==z,closeLabel:!1===z?\"\":z,minimiseEnabled:!0,minimiseLabel:M,tabDropdownEnabled:!1!==P,tabDropdownLabel:!1===P?\"\":P};this._header=new te(t,this,T,e.isClosable&&!1!==z,(()=>this.getActiveComponentItem()),(()=>this.remove()),(()=>this.handlePopoutEvent()),(()=>this.toggleMaximise()),(t=>this.handleHeaderClickEvent(t)),(t=>this.handleHeaderTouchStartEvent(t)),(t=>this.handleHeaderComponentRemoveEvent(t)),(t=>this.handleHeaderComponentFocusEvent(t)),((t,e,i,n)=>this.handleHeaderComponentStartDragEvent(t,e,i,n))),this.isStack=!0,this._childElementContainer=document.createElement(\"section\"),this._childElementContainer.classList.add(\"lm_items\"),this.on(\"resize\",this._resizeListener),this._maximisedEnabled&&(this.on(\"maximised\",this._maximisedListener),this.on(\"minimised\",this._minimisedListener)),this.element.appendChild(this._header.element),this.element.appendChild(this._childElementContainer),this.setupHeaderPosition(),this._header.updateClosability()}get childElementContainer(){return this._childElementContainer}get header(){return this._header}get headerShow(){return this._header.show}get headerSide(){return this._header.side}get headerLeftRightSided(){return this._header.leftRightSided}get contentAreaDimensions(){return this._contentAreaDimensions}get initialWantMaximise(){return this._initialWantMaximise}get isMaximised(){return this===this.layoutManager.maximisedStack}get stackParent(){if(!this.parent)throw new Error(\"Stack should always have a parent\");return this.parent}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}init(){if(!0===this.isInitialised)return;this.updateNodeSize();for(let t=0;t0){if(this._initialActiveItemIndex<0||this._initialActiveItemIndex>=e)throw new Error(`ActiveItemIndex out of range: ${this._initialActiveItemIndex} id: ${this.id}`);for(let i=0;ithis.contentItems.length)throw e-=1,new X(\"SAC99728\");if(t instanceof jt)return e=super.addChild(t,e),this._childElementContainer.appendChild(t.element),this._header.createTab(t,e),this.setActiveComponentItem(t,i),this._header.updateTabSizes(),this.updateSize(!1),t.container.setBaseLogicalZIndex(),this._header.updateClosability(),this.emitStateChangedEvent(),e;throw new X(\"SACC88532\")}removeChild(t,e){const i=t,n=this.contentItems.indexOf(i),o=1===this.contentItems.length;if(this._activeComponentItem===i&&(i.focused&&i.blur(),!o)){const t=0===n?1:n-1;this.setActiveComponentItem(this.contentItems[t],!1)}this._header.removeTab(i),super.removeChild(i,e),o||this._header.updateClosability(),this.emitStateChangedEvent()}toggleMaximise(){this.isMaximised?this.minimise():this.maximise()}maximise(){if(!this.isMaximised){this.layoutManager.setMaximisedStack(this);const t=this.contentItems,e=t.length;for(let i=0;i0&&void 0===t)throw new Error(\"expected non-empty stack to have an active component item\");return{type:\"stack\",content:this.calculateConfigContent(),size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,isClosable:this.isClosable,maximised:this.isMaximised,header:this.createHeaderConfig(),activeItemIndex:t}}onDrop(t,e){if(\"header\"===this._dropSegment){if(this.resetHeaderDropZone(),void 0===this._dropIndex)throw new J(\"SODDI68990\");return void this.addChild(t,this._dropIndex)}if(\"body\"===this._dropSegment)return void this.addChild(t,0,!0);const i=\"top\"===this._dropSegment||\"bottom\"===this._dropSegment,n=\"left\"===this._dropSegment||\"right\"===this._dropSegment,o=\"top\"===this._dropSegment||\"left\"===this._dropSegment,s=i&&this.stackParent.isColumn||n&&this.stackParent.isRow;if(t.isComponent){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createAndInitContentItem(e,this);i.addChild(t),t=i}if(t.type===at.row||t.type===at.column){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}if(s){const e=this.stackParent.contentItems.indexOf(this);this.stackParent.addChild(t,o?e:e+1,!0),this.size*=.5,t.size=this.size,t.sizeUnit=this.sizeUnit,this.stackParent.updateSize(!1)}else{const e=i?at.column:at.row,n=ct.createDefault(e),s=this.layoutManager.createContentItem(n,this);this.stackParent.replaceChild(this,s),s.addChild(t,o?0:void 0,!0),s.addChild(this,o?void 0:0,!0),this.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}highlightDropZone(t,e){for(const i in this._contentAreaDimensions){const n=i,o=this._contentAreaDimensions[n].hoverArea;if(o.x1t&&o.y1e)return void(\"header\"===n?(this._dropSegment=\"header\",this.highlightHeaderDropZone(this._header.leftRightSided?e:t)):(this.resetHeaderDropZone(),this.highlightBodyDropZone(n)))}}getArea(){if(\"none\"===this.element.style.display)return null;const t=super.getElementArea(this._header.element),e=super.getElementArea(this._childElementContainer);if(null===t||null===e)throw new K(\"SGAHC13086\");const i=e.x2-e.x1,n=e.y2-e.y1;return this._contentAreaDimensions={header:{hoverArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2},highlightArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2}}},0===this.contentItems.length?(this._contentAreaDimensions.body={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2}},super.getElementArea(this.element)):(this._contentAreaDimensions.left={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x1+.25*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x1+.5*i,y2:e.y2}},this._contentAreaDimensions.top={hoverArea:{x1:e.x1+.25*i,y1:e.y1,x2:e.x1+.75*i,y2:e.y1+.5*n},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y1+.5*n}},this._contentAreaDimensions.right={hoverArea:{x1:e.x1+.75*i,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1+.5*i,y1:e.y1,x2:e.x2,y2:e.y2}},this._contentAreaDimensions.bottom={hoverArea:{x1:e.x1+.25*i,y1:e.y1+.5*n,x2:e.x1+.75*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1+.5*n,x2:e.x2,y2:e.y2}},super.getElementArea(this.element))}positionHeader(t){this._header.side!==t&&(this._header.setSide(t),this._headerSideChanged=!0,this.setupHeaderPosition())}updateNodeSize(){if(\"none\"!==this.element.style.display){const t=kt(this.element);if(this._header.show){t[this._header.leftRightSided?it.width:it.height]-=this.layoutManager.layoutConfig.dimensions.headerHeight}this._childElementContainer.style.width=zt(t.width),this._childElementContainer.style.height=zt(t.height);for(let e=0;e=o&&tthis.onDrag(t,e,i))),this._dragListener.on(\"dragStop\",(()=>this.onDrop())),this.createDragProxyElements(t,e),null===this._componentItem.parent)throw new K(\"DPC10097\");this._componentItemFocused=this._componentItem.focused,this._componentItemFocused&&this._componentItem.blur(),this._componentItem.parent.removeChild(this._componentItem,!0),this.setDimensions(),document.body.appendChild(this._element),this.determineMinMaxXY(),this._layoutManager.calculateItemAreas(),this.setDropPosition(t,e)}get element(){return this._element}createDragProxyElements(t,e){this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_dragProxy\");const i=document.createElement(\"div\");i.classList.add(\"lm_header\");const n=document.createElement(\"div\");n.classList.add(\"lm_tabs\");const o=document.createElement(\"div\");o.classList.add(\"lm_tab\");const s=document.createElement(\"span\");s.classList.add(\"lm_title\"),o.appendChild(s),n.appendChild(o),i.appendChild(n),this._proxyContainerElement=document.createElement(\"div\"),this._proxyContainerElement.classList.add(\"lm_content\"),this._element.appendChild(i),this._element.appendChild(this._proxyContainerElement),this._originalParent instanceof ee&&this._originalParent.headerShow&&(this._sided=this._originalParent.headerLeftRightSided,this._element.classList.add(\"lm_\"+this._originalParent.headerSide),[nt.right,nt.bottom].indexOf(this._originalParent.headerSide)>=0&&this._proxyContainerElement.insertAdjacentElement(\"afterend\",i)),this._element.style.left=zt(t),this._element.style.top=zt(e),o.setAttribute(\"title\",this._componentItem.title),s.insertAdjacentText(\"afterbegin\",this._componentItem.title),this._proxyContainerElement.appendChild(this._componentItem.element)}determineMinMaxXY(){const t=this._layoutManager.groundItem;if(void 0===t)throw new J(\"DPDMMXY73109\");{const e=t.element.getBoundingClientRect();this._minX=e.left+document.body.scrollLeft,this._minY=e.top+document.body.scrollTop,this._maxX=this._minX+e.width,this._maxY=this._minY+e.height}}onDrag(t,e,i){const n=i.pageX,o=i.pageY;this.setDropPosition(n,o),this._componentItem.drag()}setDropPosition(t,e){this._layoutManager.layoutConfig.settings.constrainDragToContainer&&(t<=this._minX?t=Math.ceil(this._minX):t>=this._maxX&&(t=Math.floor(this._maxX)),e<=this._minY?e=Math.ceil(this._minY):e>=this._maxY&&(e=Math.floor(this._maxY))),this._element.style.left=zt(t),this._element.style.top=zt(e),this._area=this._layoutManager.getArea(t,e),null!==this._area&&(this._lastValidArea=this._area,this._area.contentItem.highlightDropZone(t,e,this._area))}onDrop(){const t=this._layoutManager.dropTargetIndicator;if(null===t)throw new K(\"DPOD30011\");let e;if(t.hide(),this._componentItem.exitDragMode(),null!==this._area)e=this._componentItem,this._area.contentItem.onDrop(e,this._area);else if(null!==this._lastValidArea){e=this._componentItem;this._lastValidArea.contentItem.onDrop(e,this._lastValidArea)}else this._originalParent?(e=this._componentItem,this._originalParent.addChild(e)):this._componentItem.destroy();this._element.remove(),this._layoutManager.emit(\"itemDropped\",this._componentItem),this._componentItemFocused&&void 0!==e&&e.focus()}setDimensions(){const t=this._layoutManager.layoutConfig.dimensions;if(void 0===t)throw new Error(\"DragProxy.setDimensions: dimensions undefined\");let e=t.dragProxyWidth,i=t.dragProxyHeight;if(void 0===e||void 0===i)throw new Error(\"DragProxy.setDimensions: width and/or height undefined\");const n=!1===this._layoutManager.layoutConfig.header.show?0:t.headerHeight;this._element.style.width=zt(e),this._element.style.height=zt(i),e-=this._sided?n:0,i-=this._sided?0:n,this._proxyContainerElement.style.width=zt(e),this._proxyContainerElement.style.height=zt(i),this._componentItem.enterDragMode(e,i),this._componentItem.show()}}class ne{constructor(t,e,i,n,o,s,r){this._layoutManager=t,this._element=e,this._extraAllowableChildTargets=i,this._componentTypeOrFtn=n,this._componentState=o,this._title=s,this._id=r,this._dragListener=null,this._dummyGroundContainer=document.createElement(\"div\");const a=gt.createDefault(\"row\");this._dummyGroundContentItem=new Yt(this._layoutManager,a,this._dummyGroundContainer),this.createDragListener()}destroy(){this.removeDragListener()}createDragListener(){this.removeDragListener(),this._dragListener=new Zt(this._element,this._extraAllowableChildTargets),this._dragListener.on(\"dragStart\",((t,e)=>this.onDragStart(t,e))),this._dragListener.on(\"dragStop\",(()=>this.onDragStop()))}onDragStart(t,e){var i;const n=\"component\";let o;if(\"function\"==typeof this._componentTypeOrFtn){const t=this._componentTypeOrFtn();o=ne.isDragSourceComponentItemConfig(t)?{type:n,componentState:t.state,componentType:t.type,title:null!==(i=t.title)&&void 0!==i?i:this._title}:t}else o={type:n,componentState:this._componentState,componentType:this._componentTypeOrFtn,title:this._title,id:this._id};const s=bt.resolve(o,!1),r=new jt(this._layoutManager,s,this._dummyGroundContentItem);if(this._dummyGroundContentItem.contentItems.push(r),null===this._dragListener)throw new K(\"DSODSD66746\");{const i=new ie(t,e,this._dragListener,this._layoutManager,r,this._dummyGroundContentItem),n=this._layoutManager.transitionIndicator;if(null===n)throw new K(\"DSODST66746\");n.transitionElements(this._element,i.element)}}onDragStop(){this.createDragListener()}removeDragListener(){null!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=null)}}!function(t){t.isDragSourceComponentItemConfig=function(t){return!(\"componentType\"in t)}}(ne||(ne={}));class oe{constructor(){this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_dropTargetIndicator\");const t=document.createElement(\"div\");t.classList.add(\"lm_inner\"),this._element.appendChild(t),document.body.appendChild(this._element)}destroy(){this._element.remove()}highlightArea(t,e){this._element.style.left=zt(t.x1+e),this._element.style.top=zt(t.y1+e),this._element.style.width=zt(t.x2-t.x1-e),this._element.style.height=zt(t.y2-t.y1-e),this._element.style.display=\"block\"}hide(){Dt(this._element,!1)}}class se{constructor(){this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_transition_indicator\"),document.body.appendChild(this._element),this._toElement=null,this._fromDimensions=null,this._totalAnimationDuration=200,this._animationStartTime=null}destroy(){this._element.remove()}transitionElements(t,e){}nextAnimationFrame(){}measure(t){const e=t.getBoundingClientRect();return{left:e.left,top:e.top,width:t.offsetWidth,height:t.offsetHeight}}}class re extends Wt{constructor(t){super(),this._layoutManager=t,this._childEventListener=t=>this.onEventFromChild(t),globalThis.addEventListener(re.ChildEventName,this._childEventListener,{passive:!0})}emit(t,...e){\"userBroadcast\"===t?this.emitUserBroadcast(...e):super.emit(t,...e)}emitUserBroadcast(...t){this.handleUserBroadcastEvent(\"userBroadcast\",t)}destroy(){globalThis.removeEventListener(re.ChildEventName,this._childEventListener)}handleUserBroadcastEvent(t,e){this._layoutManager.isSubWindow?this.propagateToParent(t,e):this.propagateToThisAndSubtree(t,e)}onEventFromChild(t){const e=t.detail;this.handleUserBroadcastEvent(e.eventName,e.args)}propagateToParent(t,e){const i={bubbles:!0,cancelable:!0,detail:{layoutManager:this._layoutManager,eventName:t,args:e}},n=new CustomEvent(re.ChildEventName,i),o=globalThis.opener;if(null===o)throw new K(\"EHPTP15778\");o.dispatchEvent(n)}propagateToThisAndSubtree(t,e){this.emitUnknown(t,...e);for(let i=0;ithis.handleContainerResize())),this._windowBeforeUnloadListener=()=>this.onBeforeUnload(),this._windowBeforeUnloadListening=!1,this._maximisedStackBeforeDestroyedListener=t=>this.cleanupBeforeMaximisedStackDestroyed(t),this.isSubWindow=t.isSubWindow,this._constructorOrSubWindowLayoutConfig=t.constructorOrSubWindowLayoutConfig,Q.checkInitialise(),dt.checkInitialise(),void 0!==t.containerElement&&(this._containerElement=t.containerElement)}get container(){return this._containerElement}get isInitialised(){return this._isInitialised}get groundItem(){return this._groundItem}get root(){return this._groundItem}get openPopouts(){return this._openPopouts}get dropTargetIndicator(){return this._dropTargetIndicator}get transitionIndicator(){return this._transitionIndicator}get width(){return this._width}get height(){return this._height}get eventHub(){return this._eventHub}get rootItem(){if(void 0===this._groundItem)throw new Error(\"Cannot access rootItem before init\");return 0===this._groundItem.contentItems.length?void 0:this._groundItem.contentItems[0]}get focusedComponentItem(){return this._focusedComponentItem}get tabDropPlaceholder(){return this._tabDropPlaceholder}get maximisedStack(){return this._maximisedStack}get deprecatedConstructor(){return!this.isSubWindow&&void 0!==this._constructorOrSubWindowLayoutConfig}destroy(){if(this._isInitialised){this._windowBeforeUnloadListening&&(globalThis.removeEventListener(\"beforeunload\",this._windowBeforeUnloadListener),this._windowBeforeUnloadListening=!1),!0===this.layoutConfig.settings.closePopoutsOnUnload&&this.closeAllOpenPopouts(),this._resizeObserver.disconnect(),this.checkClearResizeTimeout(),void 0!==this._groundItem&&this._groundItem.destroy(),this._tabDropPlaceholder.remove(),null!==this._dropTargetIndicator&&this._dropTargetIndicator.destroy(),null!==this._transitionIndicator&&this._transitionIndicator.destroy(),this._eventHub.destroy();for(const t of this._dragSources)t.destroy();this._dragSources=[],this._isInitialised=!1}}minifyConfig(t){return _t.minifyConfig(t)}unminifyConfig(t){return _t.unminifyConfig(t)}init(){let t;if(this.setContainer(),this._dropTargetIndicator=new oe,this._transitionIndicator=new se,this.updateSizeFromContainer(),this.isSubWindow){if(void 0===this._constructorOrSubWindowLayoutConfig)throw new J(\"LMIU07155\");{const e=this._constructorOrSubWindowLayoutConfig.root;if(void 0===e)throw new X(\"LMIC07156\");if(!Ct.isComponent(e))throw new X(\"LMIC07157\");t=e;const i=xt.resolve(this._constructorOrSubWindowLayoutConfig);this.layoutConfig=Object.assign(Object.assign({},i),{root:void 0})}}else void 0===this._constructorOrSubWindowLayoutConfig?this.layoutConfig=_t.createDefault():this.layoutConfig=xt.resolve(this._constructorOrSubWindowLayoutConfig);const e=this.layoutConfig;this._groundItem=new Yt(this,e.root,this._containerElement),this._groundItem.init(),this.checkLoadedLayoutMaximiseItem(),this._resizeObserver.observe(this._containerElement),this._isInitialised=!0,this.adjustColumnsResponsive(),this.emit(\"initialised\"),void 0!==t&&this.loadComponentAsRoot(t)}loadLayout(t){if(!this.isInitialised)throw new Error(\"GoldenLayout: Need to call init() if LayoutConfig with defined root passed to constructor\");if(void 0===this._groundItem)throw new J(\"LMLL11119\");this.createSubWindows(),this.layoutConfig=xt.resolve(t),this._groundItem.loadRoot(this.layoutConfig.root),this.checkLoadedLayoutMaximiseItem(),this.adjustColumnsResponsive()}saveLayout(){if(!1===this._isInitialised)throw new Error(\"Can't create config, layout not yet initialised\");if(void 0===this._groundItem)throw new J(\"LMTC18244\");{const t=this._groundItem.calculateConfigContent();let e;e=1!==t.length?void 0:t[0],this.reconcilePopoutWindows();const i=[];for(let t=0;t=0?n=this._groundItem.contentItems[0]:e=0;break;case at.row:case at.column:e=n.addItem(t,i.index);break;case at.stack:if(Ct.isComponent(t)){e=n.addItem(t,i.index);break}throw Error(tt[6]);case at.component:throw new X(\"LMAIALC87444602\");default:throw new Y(\"LMAIALU98881733\",n.type)}if(Ct.isComponent(t)){const t=n.contentItems[e];Gt.isStack(t)&&(n=t,e=0)}return i.parentItem=n,i.index=e,i}}}loadComponentAsRoot(t){if(void 0===this._groundItem)throw new Error(\"Cannot add item before init\");this._groundItem.loadComponentAsRoot(t)}updateSize(t,e){this.setSize(t,e)}setSize(t,e){if(this._width=t,this._height=e,!0===this._isInitialised){if(void 0===this._groundItem)throw new J(\"LMUS18881\");if(this._groundItem.setSize(this._width,this._height),this._maximisedStack){const{width:t,height:e}=kt(this._containerElement);Tt(this._maximisedStack.element,t),At(this._maximisedStack.element,e),this._maximisedStack.updateSize(!1)}this.adjustColumnsResponsive()}}beginSizeInvalidation(){this._sizeInvalidationBeginCount++}endSizeInvalidation(){0==--this._sizeInvalidationBeginCount&&this.updateSizeFromContainer()}updateSizeFromContainer(){const{width:t,height:e}=kt(this._containerElement);this.setSize(t,e)}updateRootSize(t=!1){if(void 0===this._groundItem)throw new J(\"LMURS28881\");this._groundItem.updateSize(t)}createAndInitContentItem(t,e){const i=this.createContentItem(t,e);return i.init(),i}createContentItem(t,e){if(\"string\"!=typeof t.type)throw new G(\"Missing parameter 'type'\",JSON.stringify(t));if(ct.isComponentItem(t)&&!(e instanceof ee)&&e&&!(!0===this.isSubWindow&&e instanceof Yt)){t={type:at.stack,content:[t],size:t.size,sizeUnit:t.sizeUnit,minSize:t.minSize,minSizeUnit:t.minSizeUnit,id:t.id,maximised:t.maximised,isClosable:t.isClosable,activeItemIndex:0,header:void 0}}return this.createContentItemFromConfig(t,e)}findFirstComponentItemById(t){if(void 0===this._groundItem)throw new J(\"LMFFCIBI82446\");return this.findFirstContentItemTypeByIdRecursive(at.component,t,this._groundItem)}createPopout(t,e,i,n){return t instanceof Gt?this.createPopoutFromContentItem(t,e,i,n):this.createPopoutFromItemConfig(t,e,i,n)}createPopoutFromContentItem(t,e,i,n){let o=t.parent,s=t;for(;null!==o&&1===o.contentItems.length&&!o.isGround;)s=o,o=o.parent;if(null===o)throw new K(\"LMCPFCI00834\");{if(void 0===n&&(n=o.contentItems.indexOf(s)),null!==i&&o.addPopInParentId(i),void 0===e){const i=globalThis.screenX||globalThis.screenLeft,n=globalThis.screenY||globalThis.screenTop,o=t.element.offsetLeft,s=t.element.offsetTop,{width:r,height:a}=kt(t.element);e={left:i+o,top:n+s,width:r,height:a}}const r=t.toConfig();if(t.remove(),ft.isRootItemConfig(r))return this.createPopoutFromItemConfig(r,e,i,n);throw new Error(`${tt[0]}`)}}beginVirtualSizedContainerAdding(){0==++this._virtualSizedContainerAddingBeginCount&&(this._virtualSizedContainers.length=0)}addVirtualSizedContainer(t){this._virtualSizedContainers.push(t)}endVirtualSizedContainerAdding(){if(0==--this._virtualSizedContainerAddingBeginCount){const t=this._virtualSizedContainers.length;if(t>0){this.fireBeforeVirtualRectingEvent(t);for(let e=0;ethis.emit(\"windowOpened\",a))),a.on(\"closed\",(()=>this.reconcilePopoutWindows())),this._openPopouts.push(a),this.layoutConfig.settings.closePopoutsOnUnload&&!this._windowBeforeUnloadListening&&(globalThis.addEventListener(\"beforeunload\",this._windowBeforeUnloadListener,{passive:!0}),this._windowBeforeUnloadListening=!0),a}closeAllOpenPopouts(){for(let t=0;tglobalThis.close()),1)}getArea(t,e){let i=null,n=1/0;for(let o=0;o=s.x1&&t=s.y1&&es.surface&&(n=s.surface,i=s)}return i}calculateItemAreas(){const t=this.getAllContentItems(),e=this._groundItem;if(void 0===e)throw new J(\"LMCIAR44365\");if(1!==t.length){e.contentItems[0].isStack?this._itemAreas=[]:this._itemAreas=e.createSideAreas();for(let e=0;e0){let e=t[0];if(Gt.isComponentItem(e)){const t=e.parent;if(null===t)throw new K(\"LMXLLMI69999\");e=t}if(!Gt.isStack(e))throw new X(\"LMCLLMI19993\");e.maximise()}}}processMaximiseStack(t){if(this._maximisedStack=t,t.on(\"beforeItemDestroyed\",this._maximisedStackBeforeDestroyedListener),t.element.classList.add(\"lm_maximised\"),t.element.insertAdjacentElement(\"afterend\",this._maximisePlaceholder),void 0===this._groundItem)throw new J(\"LMMXI19993\");{this._groundItem.element.prepend(t.element);const{width:e,height:i}=kt(this._containerElement);Tt(t.element,e),At(t.element,i),t.updateSize(!0),t.focusActiveContentItem(),this._maximisedStack.emit(\"maximised\"),this.emit(\"stateChanged\")}}processMinimiseMaximisedStack(){if(void 0===this._maximisedStack)throw new X(\"LMMMS74422\");{const t=this._maximisedStack;if(null===t.parent)throw new K(\"LMMI13668\");t.element.classList.remove(\"lm_maximised\"),this._maximisePlaceholder.insertAdjacentElement(\"afterend\",t.element),this._maximisePlaceholder.remove(),this.updateRootSize(!0),this._maximisedStack=void 0,t.off(\"beforeItemDestroyed\",this._maximisedStackBeforeDestroyedListener),t.emit(\"minimised\"),this.emit(\"stateChanged\")}}reconcilePopoutWindows(){const t=[];for(let e=0;e{this._resizeTimeoutId=void 0,this.beginSizeInvalidation(),this.endSizeInvalidation()}),this.resizeDebounceInterval))}checkClearResizeTimeout(){void 0!==this._resizeTimeoutId&&(clearTimeout(this._resizeTimeoutId),this._resizeTimeoutId=void 0)}setContainer(){var t;const e=document.body,i=null!==(t=this._containerElement)&&void 0!==t?t:e;if(i===e){this.resizeWithContainerAutomatically=!0;const t=document.documentElement;t.style.height=\"100%\",t.style.margin=\"0\",t.style.padding=\"0\",t.style.overflow=\"clip\",e.style.height=\"100%\",e.style.margin=\"0\",e.style.padding=\"0\",e.style.overflow=\"clip\"}this._containerElement=i}onBeforeUnload(){this.destroy()}adjustColumnsResponsive(){if(void 0===this._groundItem)throw new J(\"LMACR20883\");if(this._firstLoad=!1,this.useResponsiveLayout()&&!this._updatingColumnsResponsive&&this._groundItem.contentItems.length>0&&this._groundItem.contentItems[0].isRow){if(void 0===this._groundItem||null===this._width)throw new J(\"LMACR77412\");{const t=this._groundItem.contentItems[0].contentItems.length;if(t<=1)return;{const e=this.layoutConfig.dimensions.defaultMinItemWidth;if(t*e<=this._width)return;{this._updatingColumnsResponsive=!0;const i=t-Math.max(Math.floor(this._width/e),1),n=this._groundItem.contentItems[0],o=this.getAllStacks();if(0===o.length)throw new X(\"LMACRS77413\");{const t=o[0];for(let e=0;en?void 0:{parentItem:t,index:o}}}case 1:if(void 0===this._focusedComponentItem)return;{const t=this._focusedComponentItem.parentItem;return this.tryCreateLocationFromParentItem(t,e)}case 2:{const t=this.findFirstContentItemType(at.stack);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 3:{let t=this.findFirstContentItemType(at.row);return void 0!==t?this.tryCreateLocationFromParentItem(t,e):(t=this.findFirstContentItemType(at.column),void 0!==t?this.tryCreateLocationFromParentItem(t,e):void 0)}case 4:{const t=this.findFirstContentItemType(at.row);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 5:{const t=this.findFirstContentItemType(at.column);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 6:if(void 0===this._groundItem)throw new J(\"LMFLRIF18244\");return void 0!==this.rootItem?void 0:void 0===e||0===e?{parentItem:this._groundItem,index:0}:void 0;case 7:if(void 0===this._groundItem)throw new J(\"LMFLF18244\");{const t=this._groundItem.contentItems;if(0===t.length)return void 0===e||0===e?{parentItem:this._groundItem,index:0}:void 0;{const i=t[0];return this.tryCreateLocationFromParentItem(i,e)}}}}tryCreateLocationFromParentItem(t,e){const i=t.contentItems.length;return void 0===e?{parentItem:t,index:i}:e<0||e>i?void 0:{parentItem:t,index:e}}}!function(t){t.createMaximisePlaceElement=function(t){const e=t.createElement(\"div\");return e.classList.add(\"lm_maximise_place\"),e},t.createTabDropPlaceholderElement=function(t){const e=t.createElement(\"div\");return e.classList.add(\"lm_drop_tab_placeholder\"),e},t.defaultLocationSelectors=[{typeId:1,index:void 0},{typeId:2,index:void 0},{typeId:3,index:void 0},{typeId:7,index:void 0}],t.afterFocusedItemIfPossibleLocationSelectors=[{typeId:0,index:1},{typeId:2,index:void 0},{typeId:3,index:void 0},{typeId:7,index:void 0}]}(ae||(ae={}));class le extends ae{constructor(t,e,i,n){if(super(le.createLayoutManagerConstructorParameters(t,e)),this._bindComponentEventHanlderPassedInConstructor=!1,this._creationTimeoutPassed=!1,void 0!==e&&\"function\"==typeof e&&(this.bindComponentEvent=e,this._bindComponentEventHanlderPassedInConstructor=!0,void 0!==i&&(this.unbindComponentEvent=i)),!this._bindComponentEventHanlderPassedInConstructor&&this.isSubWindow){if(void 0===this._constructorOrSubWindowLayoutConfig)throw new J(\"VLC98823\");{const t=xt.resolve(this._constructorOrSubWindowLayoutConfig);this.layoutConfig=Object.assign(Object.assign({},t),{root:void 0})}}!0!==n&&(this.deprecatedConstructor||this.init())}destroy(){this.bindComponentEvent=void 0,this.unbindComponentEvent=void 0,super.destroy()}init(){if(this._bindComponentEventHanlderPassedInConstructor||\"loading\"!==document.readyState&&null!==document.body){if(!this._bindComponentEventHanlderPassedInConstructor&&!0===this.isSubWindow&&!this._creationTimeoutPassed)return setTimeout((()=>this.init()),7),void(this._creationTimeoutPassed=!0);!0===this.isSubWindow&&(this._bindComponentEventHanlderPassedInConstructor||this.clearHtmlAndAdjustStylesForSubWindow(),window.__glInstance=this),super.init()}else document.addEventListener(\"DOMContentLoaded\",(()=>this.init()),{passive:!0})}clearHtmlAndAdjustStylesForSubWindow(){const t=document.head,e=new Array(4);e[0]=document.querySelectorAll(\"body link\"),e[1]=document.querySelectorAll(\"body style\"),e[2]=document.querySelectorAll(\"template\"),e[3]=document.querySelectorAll(\".gl_keep\");for(let i=0;ithis.emit(\"popIn\"))),document.body.appendChild(t),!0}}bindComponent(t,e){if(void 0!==this.bindComponentEvent){return this.bindComponentEvent(t,e)}if(void 0!==this.getComponentEvent)return{virtual:!1,component:this.getComponentEvent(t,e)};{const t=`${tt[2]}: ${JSON.stringify(e)}`;throw new Z(t)}}unbindComponent(t,e,i){if(void 0!==this.unbindComponentEvent)this.unbindComponentEvent(t);else if(!e&&void 0!==this.releaseComponentEvent){if(void 0===i)throw new J(\"VCUCRCU333998\");this.releaseComponentEvent(t,i)}}}!function(t){let e=!1;t.createLayoutManagerConstructorParameters=function(t,i){const n=e?null:new URL(document.location.href).searchParams.get(\"gl-window\");e=!0;const o=null!==n;let s,r;if(null!==n){const e=localStorage.getItem(n);if(null===e)throw new Error(\"Null gl-window Config\");localStorage.removeItem(n);const i=JSON.parse(e),o=_t.unminifyConfig(i);r=xt.fromResolved(o),t instanceof HTMLElement&&(s=t)}else void 0===t?r=void 0:t instanceof HTMLElement?(r=void 0,s=t):r=t,void 0===s&&i instanceof HTMLElement&&(s=i);return{constructorOrSubWindowLayoutConfig:r,isSubWindow:o,containerElement:s}}}(le||(le={}));class he extends le{constructor(t,e,i){super(t,e,i,!0),this._componentTypesMap=new Map,this._registeredComponentMap=new Map,this._virtuableComponentMap=new Map,this._containerVirtualRectingRequiredEventListener=(t,e,i)=>this.handleContainerVirtualRectingRequiredEvent(t,e,i),this._containerVirtualVisibilityChangeRequiredEventListener=(t,e)=>this.handleContainerVirtualVisibilityChangeRequiredEvent(t,e),this._containerVirtualZIndexChangeRequiredEventListener=(t,e,i)=>this.handleContainerVirtualZIndexChangeRequiredEvent(t,e,i),this.deprecatedConstructor||this.init()}registerComponent(t,e,i=!1){if(\"function\"!=typeof e)throw new $(\"registerComponent() componentConstructorOrFactoryFtn parameter is not a function\");if(e.hasOwnProperty(\"prototype\")){const n=e;this.registerComponentConstructor(t,n,i)}else{const n=e;this.registerComponentFactoryFunction(t,n,i)}}registerComponentConstructor(t,e,i=!1){if(\"function\"!=typeof e)throw new Error(tt[1]);if(void 0!==this._componentTypesMap.get(t))throw new Z(`${tt[3]}: ${t}`);this._componentTypesMap.set(t,{constructor:e,factoryFunction:void 0,virtual:i})}registerComponentFactoryFunction(t,e,i=!1){if(\"function\"!=typeof e)throw new Z(\"Please register a constructor function\");if(void 0!==this._componentTypesMap.get(t))throw new Z(`${tt[3]}: ${t}`);this._componentTypesMap.set(t,{constructor:void 0,factoryFunction:e,virtual:i})}registerComponentFunction(t){this.registerGetComponentConstructorCallback(t)}registerGetComponentConstructorCallback(t){if(\"function\"!=typeof t)throw new Error(\"Please register a callback function\");void 0!==this._getComponentConstructorFtn&&console.warn(\"Multiple component functions are being registered. Only the final registered function will be used.\"),this._getComponentConstructorFtn=t}getRegisteredComponentTypeNames(){const t=this._componentTypesMap.keys();return Array.from(t)}getComponentInstantiator(t){let e;const i=pt.resolveComponentTypeName(t);return void 0!==i&&(e=this._componentTypesMap.get(i)),void 0===e&&void 0!==this._getComponentConstructorFtn&&(e={constructor:this._getComponentConstructorFtn(t),factoryFunction:void 0,virtual:!1}),e}bindComponent(t,e){let i;const n=pt.resolveComponentTypeName(e);let o;if(void 0!==n&&(i=this._componentTypesMap.get(n)),void 0===i&&void 0!==this._getComponentConstructorFtn&&(i={constructor:this._getComponentConstructorFtn(e),factoryFunction:void 0,virtual:!1}),void 0!==i){const s=i.virtual;let r,a;r=void 0===e.componentState?void 0:Ut({},e.componentState);const l=i.constructor;if(void 0!==l)a=new l(t,r,s);else{const e=i.factoryFunction;if(void 0===e)throw new X(\"LMBCFFU10008\");a=e(t,r,s)}if(s){if(void 0===a)throw new J(\"GLBCVCU988774\");{const e=a,i=e.rootHtmlElement;if(void 0===i)throw new Z(`${tt[5]}: ${n}`);!function(t){const e=\"absolute\";t.style.position!==e&&(t.style.position=e)}(i),this.container.appendChild(i),this._virtuableComponentMap.set(t,e),t.virtualRectingRequiredEvent=this._containerVirtualRectingRequiredEventListener,t.virtualVisibilityChangeRequiredEvent=this._containerVirtualVisibilityChangeRequiredEventListener,t.virtualZIndexChangeRequiredEvent=this._containerVirtualZIndexChangeRequiredEventListener}}this._registeredComponentMap.set(t,a),o={virtual:i.virtual,component:a}}else o=super.bindComponent(t,e);return o}unbindComponent(t,e,i){if(void 0===this._registeredComponentMap.get(t))super.unbindComponent(t,e,i);else{const e=this._virtuableComponentMap.get(t);if(void 0!==e){const i=e.rootHtmlElement;if(void 0===i)throw new X(\"GLUC77743\",t.title);this.container.removeChild(i),this._virtuableComponentMap.delete(t)}}}fireBeforeVirtualRectingEvent(t){this._goldenLayoutBoundingClientRect=this.container.getBoundingClientRect(),super.fireBeforeVirtualRectingEvent(t)}handleContainerVirtualRectingRequiredEvent(t,e,i){const n=this._virtuableComponentMap.get(t);if(void 0===n)throw new J(\"GLHCSCE55933\");{const o=n.rootHtmlElement;if(void 0===o)throw new Z(tt[4]+\" \"+t.title);{const n=t.element.getBoundingClientRect(),s=n.left-this._goldenLayoutBoundingClientRect.left;o.style.left=zt(s);const r=n.top-this._goldenLayoutBoundingClientRect.top;o.style.top=zt(r),Tt(o,e),At(o,i)}}}handleContainerVirtualVisibilityChangeRequiredEvent(t,e){const i=this._virtuableComponentMap.get(t);if(void 0===i)throw new J(\"GLHCVVCRE55934\");{const n=i.rootHtmlElement;if(void 0===n)throw new Z(tt[4]+\" \"+t.title);Dt(n,e)}}handleContainerVirtualZIndexChangeRequiredEvent(t,e,i){const n=this._virtuableComponentMap.get(t);if(void 0===n)throw new J(\"GLHCVZICRE55935\");{const e=n.rootHtmlElement;if(void 0===e)throw new Z(tt[4]+\" \"+t.title);e.style.zIndex=i}}}const de=\"initial_\",ce={show:\"top\",popout:!1,maximise:!1,close:\"close-tab-unused\"},me={headerHeight:31},ue={hasHeaders:!0,reorderEnabled:!0},pe={popoutWholeStack:!1,constrainDragToContainer:!1,constrainDragToHeaders:!1,preventDragout:!1,showMaximiseIcon:!1,showPopoutIcon:!1,showCloseIcon:!1,blockedPopoutsThrowError:!0,closePopoutsOnUnload:!0,selectionEnabled:!1};var ge,fe;class ve{constructor(e){this.layout=e,ge.set(this,void 0),fe.set(this,void 0),this.handleResize=t=>{t.forEach((t=>this.resizeElement(t.target)))},this.handleMutation=()=>{this.layout.viewComponentsByContainerElement.forEach((t=>{this.resizeElement(t.container.element)}))},t.__classPrivateFieldSet(this,ge,new ResizeObserver(this.handleResize),\"f\"),t.__classPrivateFieldSet(this,fe,new MutationObserver(this.handleMutation),\"f\")}observeMutations(e){t.__classPrivateFieldGet(this,fe,\"f\")?.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[\"class\"]})}destroy(){t.__classPrivateFieldGet(this,ge,\"f\").disconnect(),t.__classPrivateFieldGet(this,fe,\"f\").disconnect()}observeContainer(e){t.__classPrivateFieldGet(this,ge,\"f\").observe(e)}unobserveContainer(e){t.__classPrivateFieldGet(this,ge,\"f\").unobserve(e)}resizeElement(t){const e=this.layout.viewComponentsByContainerElement.get(t);e&&e.resize()}}ge=new WeakMap,fe=new WeakMap;var _e={};Object.defineProperty(_e,\"__esModule\",{value:!0});var ye=_e.BaseItem=void 0;class Ce{constructor(t,e,i){this._item=t,this._layout=e,this._wrap=i}get raw(){return this._item}get layout(){return this._layout}get type(){return this._item.type}get contentItems(){return(this._item.contentItems??[]).map((t=>this._wrap(t)))}get parent(){const t=this._item.parent;return t?this._wrap(t):null}setActiveContentItem(t,e){if(\"stack\"!==this.type)throw new Error(`Cannot call setActiveContentItem from a non-stack item: ${this.type}`);this._item.setActiveContentItem(t.raw,e)}static wrapInternal(t,e,i){const n=Ce.wrapCache.get(e);if(n)return n;const o=new t(e,i,(e=>Ce.wrapInternal(t,e,i)));return Ce.wrapCache.set(e,o),o}}ye=_e.BaseItem=Ce,Ce.wrapCache=new WeakMap;const we=t=>!!t&&\"contentItems\"in t&&(t.isRow||t.isColumn);class Ie extends ye{isRoot(){return!!this._item.parent?.isGround}getBounds(){return this._item.element.getBoundingClientRect()}get viewName(){if(this._item.isComponent){const{component:t}=this._item;return t.identity.name}throw new Error(\"View name not found\")}onDestroyed(t){const e=({target:i})=>{i===this._item&&(t(),this._item.off(\"itemDestroyed\",e))};this._item.on(\"itemDestroyed\",e)}createAdjacentStack({position:t=\"right\"}={}){const e=this.raw;if(ee.isStack(e)&&e.parent){const i=[\"top\",\"bottom\"].includes(t)?\"column\":\"row\",n=[\"left\",\"top\"].includes(t)?1:0,o=we(e.parent)?e.parent:e.layoutManager,s=o,r=e.parent.contentItems.indexOf(e);e.parent.isGround&&e.parent.removeChild(e,!0);const a=o.newItem({type:i,content:[{type:\"stack\",content:[]}]},r);if(!a)throw new Error(\"createAdjacentStack: Failed to create new container\");const l=a.contentItems[0];return a.addChild(this.raw,n),we(s)&&s.removeChild(e,!0),this._wrap(l)}throw new Error(`Cannot creat adjacent stacks for type: ${e.type}, must be type 'stack'`)}setActiveContentItem(t,e=!0){if(!ee.isStack(this._item))throw new Error(`Cannot call setActiveContentItem from a non-stack item: ${this.type}`);this._item.setActiveComponentItem(t.raw,!e)}static wrap(t,e){return ye.wrapInternal(Ie,t,e)}}function be(t=[],e){for(const i of t)\"component\"===i.type?Object.keys(e).forEach((t=>{t in i&&(i.componentState={[`${de}${t}`]:i[t],...i.componentState}),i[t]=e[t]})):be(i.content,e)}function Se(t=[],e,i){for(const n of t)if(\"component\"===n.type)Object.keys(e).forEach((t=>{if(`${de}${t}`in n.componentState)return n[t]=n.componentState[`${de}${t}`],void delete n.componentState[`${de}${t}`];n[t]=e[t]}));else{if(n.size&&(\"row\"===i||\"column\"===i)){n[\"row\"===i?\"width\":\"height\"]=n.size?.includes(\".\")?parseFloat(n.size):parseInt(n.size)}Se(n.content,e,n.type)}}function Ee(t){if(t.root){t.root.content&&Se([t.root],{componentName:\"view\",isClosable:!0});const e=t.root;t.content=[e],delete t.root}return t}const xe=e=>class extends e{connectedCallback(){if(!this.name||!this.uuid)throw new Error(\" Name or uuid attribute missing\");if(!this.src)throw new Error(\" missing 'src' attribute.\");this.#t||(this.#t=document.createElement(\"iframe\"),this.#t.src=this.src,this.#t.style.height=\"100%\",this.#t.style.width=\"100%\",this.#t.style.border=\"none\",this.forceFrameName?this.#t.setAttribute(\"name\",this.forceFrameName):this.#t.setAttribute(\"name\",t.encodeOptions({brokerUrl:this.brokerUrl,name:this.name,uuid:this.uuid,providerId:this.providerId,contextGroup:this.contextGroup},\"of-frame\")),this.#t.setAttribute(\"id\",this.name),this.appendChild(this.#t))}#t;get brokerUrl(){return this.getAttribute(\"of-broker\")}set brokerUrl(t){t&&this.setAttribute(\"of-broker\",t)}get name(){return this.getAttribute(\"of-name\")}set name(t){t&&this.setAttribute(\"of-name\",t)}get forceFrameName(){return this.getAttribute(\"forceFrameName\")}set forceFrameName(t){t&&this.setAttribute(\"forceFrameName\",t)}get uuid(){return this.getAttribute(\"of-uuid\")}set uuid(t){t&&this.setAttribute(\"of-uuid\",t)}get src(){return this.getAttribute(\"src\")}set src(t){t&&this.setAttribute(\"src\",t)}get providerId(){return this.getAttribute(\"of-provider-id\")}set providerId(t){t&&this.setAttribute(\"of-provider-id\",t)}get contextGroup(){return this.getAttribute(\"of-context-group\")}set contextGroup(t){t&&this.setAttribute(\"of-context-group\",t)}static get observedAttributes(){return[\"name\"]}};class Le{static create(t){const e=document.createElement(\"of-view\");return Object.entries(t).forEach((([t,i])=>{e.setAttribute(t,i)})),e}}customElements.define(\"of-view\",xe(HTMLElement));class ze{constructor(t,i,n,{brokerUrl:o,interopConfig:s},r){this.container=t,this.config=i,this.ofView=null,this.isDragging=()=>this.container.tab.element?.className.includes(\"lm_dragging\")??!1;const{url:a,web:l,interop:h,name:d}=i||{},c=d??`internal-generated-view-${e.v4()}`;if(this.identity={uuid:n,name:c},this.container.element.setAttribute(\"of-name\",c),this.container.element.id=`container-${c}`,this.container.parent.id=c,void 0===a)return void this.handleUrlMissing();const m=this.updateTitleIfNotSet(a),u={\"of-broker\":o,\"of-uuid\":n,\"of-name\":c,src:a};l?.frameName&&(u.forceFrameName=l.frameName);const p=h?.currentContextGroup??s?.currentContextGroup;p&&(u[\"of-context-group\"]=p),s?.providerId&&(u[\"of-provider-id\"]=s?.providerId),this.ofView=Le.create(u),this.ofView.title=m??`Iframe: ${a}`,r.appendChild(this.ofView),this.ofView.style.position=\"absolute\"}updateTitleIfNotSet(t){return\"view\"===this.container.parent.title&&this.container.parent.setTitle(t),this.container.parent.title}handleUrlMissing(){const t=document.createElement(\"div\");t.setAttribute(\"style\",\"padding: 20px\");t.innerText=\"No URL provided\",this.container.element.appendChild(t)}destroy(){this.ofView?.remove(),this.ofView=null}closeView(){this.container.close()}resize(){if(this.ofView){if(this.isDragging())return void(this.ofView.style.display=\"none\");const t=this.container.element.getBoundingClientRect();this.ofView.style.position=\"absolute\",this.ofView.style.height=`${t.height}px`,this.ofView.style.width=`${t.width}px`,this.ofView.style.inset=`${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`,this.ofView.style.display=\"block\"}}}class Me extends U{static overrideConfig(t){const e={...ue,...t.settings,...pe};return e.reorderEnabled?be(t.content,{isClosable:!0}):be(t.content,{reorderEnabled:!1}),{dimensions:me,...t,settings:e,header:{...ce,show:!1!==t.settings?.hasHeaders&&ce.show}}}constructor(t,e,i,{options:n},o,s){super(),this.identity=t,this.container=e,this.initialConfig=i,this.layoutManager=o,this.platformProvider=s,this.viewComponentsByContainerElement=new Map,this.layoutContentCache=_.getSingleInstance(),this.reparentingViews=new Set,this.goldenLayoutDestroyed=!1,this.createViewComponent=(t,e)=>{m.handleSharedView(this.layoutManager,this.identity,e);const i=new ze(t,e,this.identity.uuid,this.options,this.iframeContainer);return e&&!1===e[`${de}isClosable`]&&this.stylesheet.insertRule(`#tab-${i.identity.name} .lm_close_tab { display: none; }`),this.viewComponentsByContainerElement.set(t.element,i),this.resizeController.observeContainer(t.element),i},this.iframeContainer=document.createElement(\"div\"),this.iframeContainer.id=`openfin-layout-iframe-container-${this.identity.layoutName}`,this.domEmitter=new V(e),this.setupStylesheets(),this.layout=new he(this.container),this.layout.resizeWithContainerAutomatically=!0,this.options=n,this.layout.registerComponent(\"view\",this.createViewComponent),this.setupListeners(),this.resizeController=new ve(this),this.layout.loadLayout(Me.overrideConfig(i));const r=document.createElement(\"div\");r.id=`openfin-layout-shadow-container-${this.identity.layoutName}`,r.attachShadow({mode:\"open\",delegatesFocus:!1}).appendChild(this.iframeContainer),this.container.appendChild(r),this.resizeController.observeMutations(this.container)}getStackByView({name:t}){const e=this.layout.findFirstComponentItemById(t);if(e?.parent&&e?.parent?.isStack)return Ie.wrap(e.parent,this)}getRoot(){return Ie.wrap(this.layout.rootItem,this)}async platformCloseView(t){const e=[...this.viewComponentsByContainerElement.values()].find((e=>e.identity.name===t.name));if(!e)throw new Error(`View with name: ${t.name} not found in layout.`);e.closeView()}async platformCreateView(t,{location:e,targetView:i}={}){if(i)throw new Error(\"TargetView not supported in web\");const n={options:this.platformProvider.normalizeOptions(t),target:this.identity,location:e};return this.insertView(n)}setupStylesheets(){if(this.container.setAttribute(\"data-openfin-layout-name\",this.identity.layoutName),this.stylesheet=new CSSStyleSheet,this.stylesheet.insertRule(\".lm_close { display: none; }\"),document.adoptedStyleSheets.push(this.stylesheet),this.initialConfig.settings?.preventSplitterResize){const t=`\\n [data-openfin-layout-name='${this.identity.layoutName}'] .lm_splitter {\\n pointer-events: none;\\n }`;this.stylesheet.insertRule(t)}}insertView({options:t,location:e,targetView:i}){const n=e?this.layoutContentCache.getItemOrUndefined(e.id):void 0,o=i?this.layoutContentCache.getItemOrUndefined(i.name):void 0,s=n??o??Ie.wrap(this.layout.rootItem,this);let r;if(ee.isStack(s.raw))r=s.raw;else{if(!we(s.raw))throw new Error(\"Cannot add a view at the requested location\");r=s.raw.newItem({type:\"stack\",content:[]})}const a=Math.min(r.contentItems.length,e?.index??r.contentItems.length);let l=this.layout.findFirstComponentItemById(t.name);l?(l.parent&&l.parent.removeChild(l,!0),r.addChild(l,a)):l=r.newComponent(\"view\",t,t.title??t.url??\"Default Title\",a);const h=l.component.identity;return Promise.resolve({identity:h})}replaceView({viewToReplace:t,newView:e}){throw new Error(\"Method not implemented.\")}replaceLayout(t){throw new Error(\"Method not implemented.\")}async cleanupView(t){}applyPreset(t){throw new Error(\"Method not implemented.\")}getCurrentViews(){return[...this.viewComponentsByContainerElement.values()].map((t=>t.identity))}async getFrameSnapshot(){return Ee(xt.fromResolved(this.layout.toConfig()))}isVisible(){return W(this.container)}async onViewDetached({viewIdentity:t}){this.reparentingViews.add(t.name),this.platformCloseView(t)}async destroy(){this.goldenLayoutDestroyed||(this.goldenLayoutDestroyed=!0,this.layout.destroy()),this.iframeContainer.remove(),this.resizeController.destroy(),document.adoptedStyleSheets=document.adoptedStyleSheets.filter((t=>t!==this.stylesheet)),this.viewComponentsByContainerElement.clear()}setupListeners(){this.container.addEventListener(\"pointerdown\",(t=>{if(t.target instanceof HTMLElement){const e=t.target.classList;[\"lm_tab\",\"lm_title\",\"lm_splitter\",\"lm_drag_handle\"].some((t=>e.contains(t)))&&(this.handleDragStart(),2===t.button&&t.stopPropagation())}}),!0),document.addEventListener(\"pointerup\",(()=>this.handleDragEnd()),!0),this.layout.on(\"tabCreated\",(t=>{const e=t.componentItem.component;t.element.id=`tab-${e.identity.name}`,this.domEmitter.dispatchLocalEvent(\"tab-created\",e.identity)})),this.layout.on(\"itemCreated\",(({target:t})=>{const e=t;if(Gt.isComponentItem(e)){const t=e.component;this.domEmitter.dispatchLocalEvent(\"container-created\",t.identity)}})),this.layout.on(\"itemDestroyed\",(t=>{const e=t.target;if(Gt.isComponentItem(e)){const t=e.component;this.removeViewComponent(t)}})),this.layout.on(\"itemDropped\",(()=>{this.handleDragEnd()}))}handleDragStart(){this.iframeContainer.style.pointerEvents=\"none\"}handleDragEnd(){this.iframeContainer.style.pointerEvents=\"\"}removeViewComponent(t){if(t.config&&!1===t.config[`${de}isClosable`]){const e=[...this.stylesheet.cssRules].findIndex((e=>e.cssText.includes(`#tab-${t.identity.name}`)));this.stylesheet.deleteRule(e)}t.destroy(),this.viewComponentsByContainerElement.delete(t.container.element),this.resizeController.unobserveContainer(t.container.element),this.reparentingViews.has(t.identity.name)?this.reparentingViews.delete(t.identity.name):this.platformProvider.closeView(t.identity.name);0===this.getCurrentViews().length&&(this.goldenLayoutDestroyed||(this.goldenLayoutDestroyed=!0,m.handleLastViewRemoved(this.layoutManager,this.identity)))}}class Pe{constructor(t,e,i,n){this.windowIdentity=t,this.connectConfig=e,this.provider=i,this.fallbackContainer=n}async createLayout(t,e){if(!(\"container\"in t)&&!this.fallbackContainer)throw new Error(\"Container property is not optional in web\");const{layoutName:i}=t,n=t,o=this.provider.initLayoutViews(n),s=n.container??this.fallbackContainer,r={...this.windowIdentity,layoutName:i},a=new Me(r,s,o,this.connectConfig,e,this.provider);m.registerLayout(e,i,a),this.fallbackContainer=null}async getLayoutSnapshot(t){return t.getLayoutSnapshot()}async handleLastViewRemoved(t){}}class Te{static async init(e){const i=e.getFin().InterApplicationBus.Channel,n=await i.create(`custom-frame-${e.me.uuid}`);return n.setDefaultAction((async(t,{target:e,opts:i},o)=>{const s=n.connections.find((t=>t.name===e.name));if(s)return n.dispatch(s,t,{...i,target:e});throw new Error(`Client with name ${e.name} not found`)})),await t.relayChannelClientApi_1(n,\"layout-relay\"),new Te(e)}constructor(t){this.wire=t,this.viewNames=new Set}normalizeOptions(t,i=\"default\"){const n=this.wire.me.uuid;let{name:o=`internal-generated-view-${e.v4()}`}=t;return o.match(/^internal-generated-view-/)&&this.viewNames.has(o)&&\"duplicate\"===i&&(o=`internal-generated-view-${e.v4()}`),this.viewNames.add(o),{...t,name:o,uuid:n}}closeView(t){this.viewNames.delete(t)}initLayoutViews({layout:t,multiInstanceViewBehavior:e}){return H((t=>{if(\"component\"===t.type&&t.componentState){const i=this.normalizeOptions(t.componentState,e);return{...t,componentState:i}}return t}),t)}}var Ae;const ke=t=>t;Ae=new WeakMap,exports.WebLayoutEntryPoint=class{constructor(e){Ae.set(this,void 0),this.initLayoutManager=async(e,i,{container:n,layoutManagerOverride:o})=>{const s=await Te.init(i),r=o??ke,a=new Pe(i.me,t.__classPrivateFieldGet(this,Ae,\"f\"),s,n),l=new(r(m.createClosedConstructor(a)));return await M(i,l),l},this.applyLayoutSnapshot=async(e,i,n)=>{await i.applyLayoutSnapshot(t.__classPrivateFieldGet(this,Ae,\"f\").platform.layoutSnapshot)},this.createLayout=async(t,e)=>m.createLayout(t,e),this.destroyLayout=async(t,e)=>m.destroyLayout(t,e),t.__classPrivateFieldSet(this,Ae,e,\"f\")}};\n","'use strict'\n\nexports.byteLength = byteLength\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\nfor (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i]\n revLookup[code.charCodeAt(i)] = i\n}\n\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction getLens (b64) {\n var len = b64.length\n\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // Trim off extra bytes after placeholder bytes are found\n // See: https://github.com/beatgammit/base64-js/issues/42\n var validLen = b64.indexOf('=')\n if (validLen === -1) validLen = len\n\n var placeHoldersLen = validLen === len\n ? 0\n : 4 - (validLen % 4)\n\n return [validLen, placeHoldersLen]\n}\n\n// base64 is 4/3 + up to two characters of the original data\nfunction byteLength (b64) {\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction _byteLength (b64, validLen, placeHoldersLen) {\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction toByteArray (b64) {\n var tmp\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n\n var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))\n\n var curByte = 0\n\n // if there are placeholders, only get up to the last complete 4 chars\n var len = placeHoldersLen > 0\n ? validLen - 4\n : validLen\n\n var i\n for (i = 0; i < len; i += 4) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 18) |\n (revLookup[b64.charCodeAt(i + 1)] << 12) |\n (revLookup[b64.charCodeAt(i + 2)] << 6) |\n revLookup[b64.charCodeAt(i + 3)]\n arr[curByte++] = (tmp >> 16) & 0xFF\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 2) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 2) |\n (revLookup[b64.charCodeAt(i + 1)] >> 4)\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 1) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 10) |\n (revLookup[b64.charCodeAt(i + 1)] << 4) |\n (revLookup[b64.charCodeAt(i + 2)] >> 2)\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] +\n lookup[num >> 12 & 0x3F] +\n lookup[num >> 6 & 0x3F] +\n lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n var tmp\n var output = []\n for (var i = start; i < end; i += 3) {\n tmp =\n ((uint8[i] << 16) & 0xFF0000) +\n ((uint8[i + 1] << 8) & 0xFF00) +\n (uint8[i + 2] & 0xFF)\n output.push(tripletToBase64(tmp))\n }\n return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n var tmp\n var len = uint8.length\n var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n var parts = []\n var maxChunkLength = 16383 // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1]\n parts.push(\n lookup[tmp >> 2] +\n lookup[(tmp << 4) & 0x3F] +\n '=='\n )\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + uint8[len - 1]\n parts.push(\n lookup[tmp >> 10] +\n lookup[(tmp >> 4) & 0x3F] +\n lookup[(tmp << 2) & 0x3F] +\n '='\n )\n }\n\n return parts.join('')\n}\n","/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n/* eslint-disable no-proto */\n\n'use strict'\n\nconst base64 = require('base64-js')\nconst ieee754 = require('ieee754')\nconst customInspectSymbol =\n (typeof Symbol === 'function' && typeof Symbol['for'] === 'function') // eslint-disable-line dot-notation\n ? Symbol['for']('nodejs.util.inspect.custom') // eslint-disable-line dot-notation\n : null\n\nexports.Buffer = Buffer\nexports.SlowBuffer = SlowBuffer\nexports.INSPECT_MAX_BYTES = 50\n\nconst K_MAX_LENGTH = 0x7fffffff\nexports.kMaxLength = K_MAX_LENGTH\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Print warning and recommend using `buffer` v4.x which has an Object\n * implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * We report that the browser does not support typed arrays if the are not subclassable\n * using __proto__. Firefox 4-29 lacks support for adding new properties to `Uint8Array`\n * (See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438). IE 10 lacks support\n * for __proto__ and has a buggy typed array implementation.\n */\nBuffer.TYPED_ARRAY_SUPPORT = typedArraySupport()\n\nif (!Buffer.TYPED_ARRAY_SUPPORT && typeof console !== 'undefined' &&\n typeof console.error === 'function') {\n console.error(\n 'This browser lacks typed array (Uint8Array) support which is required by ' +\n '`buffer` v5.x. Use `buffer` v4.x if you require old browser support.'\n )\n}\n\nfunction typedArraySupport () {\n // Can typed array instances can be augmented?\n try {\n const arr = new Uint8Array(1)\n const proto = { foo: function () { return 42 } }\n Object.setPrototypeOf(proto, Uint8Array.prototype)\n Object.setPrototypeOf(arr, proto)\n return arr.foo() === 42\n } catch (e) {\n return false\n }\n}\n\nObject.defineProperty(Buffer.prototype, 'parent', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.buffer\n }\n})\n\nObject.defineProperty(Buffer.prototype, 'offset', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.byteOffset\n }\n})\n\nfunction createBuffer (length) {\n if (length > K_MAX_LENGTH) {\n throw new RangeError('The value \"' + length + '\" is invalid for option \"size\"')\n }\n // Return an augmented `Uint8Array` instance\n const buf = new Uint8Array(length)\n Object.setPrototypeOf(buf, Buffer.prototype)\n return buf\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new TypeError(\n 'The \"string\" argument must be of type string. Received type number'\n )\n }\n return allocUnsafe(arg)\n }\n return from(arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\nfunction from (value, encodingOrOffset, length) {\n if (typeof value === 'string') {\n return fromString(value, encodingOrOffset)\n }\n\n if (ArrayBuffer.isView(value)) {\n return fromArrayView(value)\n }\n\n if (value == null) {\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n }\n\n if (isInstance(value, ArrayBuffer) ||\n (value && isInstance(value.buffer, ArrayBuffer))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof SharedArrayBuffer !== 'undefined' &&\n (isInstance(value, SharedArrayBuffer) ||\n (value && isInstance(value.buffer, SharedArrayBuffer)))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof value === 'number') {\n throw new TypeError(\n 'The \"value\" argument must not be of type number. Received type number'\n )\n }\n\n const valueOf = value.valueOf && value.valueOf()\n if (valueOf != null && valueOf !== value) {\n return Buffer.from(valueOf, encodingOrOffset, length)\n }\n\n const b = fromObject(value)\n if (b) return b\n\n if (typeof Symbol !== 'undefined' && Symbol.toPrimitive != null &&\n typeof value[Symbol.toPrimitive] === 'function') {\n return Buffer.from(value[Symbol.toPrimitive]('string'), encodingOrOffset, length)\n }\n\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n return from(value, encodingOrOffset, length)\n}\n\n// Note: Change prototype *after* Buffer.from is defined to workaround Chrome bug:\n// https://github.com/feross/buffer/pull/148\nObject.setPrototypeOf(Buffer.prototype, Uint8Array.prototype)\nObject.setPrototypeOf(Buffer, Uint8Array)\n\nfunction assertSize (size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be of type number')\n } else if (size < 0) {\n throw new RangeError('The value \"' + size + '\" is invalid for option \"size\"')\n }\n}\n\nfunction alloc (size, fill, encoding) {\n assertSize(size)\n if (size <= 0) {\n return createBuffer(size)\n }\n if (fill !== undefined) {\n // Only pay attention to encoding if it's a string. This\n // prevents accidentally sending in a number that would\n // be interpreted as a start offset.\n return typeof encoding === 'string'\n ? createBuffer(size).fill(fill, encoding)\n : createBuffer(size).fill(fill)\n }\n return createBuffer(size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n return alloc(size, fill, encoding)\n}\n\nfunction allocUnsafe (size) {\n assertSize(size)\n return createBuffer(size < 0 ? 0 : checked(size) | 0)\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n return allocUnsafe(size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n return allocUnsafe(size)\n}\n\nfunction fromString (string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8'\n }\n\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n\n const length = byteLength(string, encoding) | 0\n let buf = createBuffer(length)\n\n const actual = buf.write(string, encoding)\n\n if (actual !== length) {\n // Writing a hex string, for example, that contains invalid characters will\n // cause everything after the first invalid character to be ignored. (e.g.\n // 'abxxcd' will be treated as 'ab')\n buf = buf.slice(0, actual)\n }\n\n return buf\n}\n\nfunction fromArrayLike (array) {\n const length = array.length < 0 ? 0 : checked(array.length) | 0\n const buf = createBuffer(length)\n for (let i = 0; i < length; i += 1) {\n buf[i] = array[i] & 255\n }\n return buf\n}\n\nfunction fromArrayView (arrayView) {\n if (isInstance(arrayView, Uint8Array)) {\n const copy = new Uint8Array(arrayView)\n return fromArrayBuffer(copy.buffer, copy.byteOffset, copy.byteLength)\n }\n return fromArrayLike(arrayView)\n}\n\nfunction fromArrayBuffer (array, byteOffset, length) {\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\"offset\" is outside of buffer bounds')\n }\n\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\"length\" is outside of buffer bounds')\n }\n\n let buf\n if (byteOffset === undefined && length === undefined) {\n buf = new Uint8Array(array)\n } else if (length === undefined) {\n buf = new Uint8Array(array, byteOffset)\n } else {\n buf = new Uint8Array(array, byteOffset, length)\n }\n\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(buf, Buffer.prototype)\n\n return buf\n}\n\nfunction fromObject (obj) {\n if (Buffer.isBuffer(obj)) {\n const len = checked(obj.length) | 0\n const buf = createBuffer(len)\n\n if (buf.length === 0) {\n return buf\n }\n\n obj.copy(buf, 0, 0, len)\n return buf\n }\n\n if (obj.length !== undefined) {\n if (typeof obj.length !== 'number' || numberIsNaN(obj.length)) {\n return createBuffer(0)\n }\n return fromArrayLike(obj)\n }\n\n if (obj.type === 'Buffer' && Array.isArray(obj.data)) {\n return fromArrayLike(obj.data)\n }\n}\n\nfunction checked (length) {\n // Note: cannot use `length < K_MAX_LENGTH` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= K_MAX_LENGTH) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + K_MAX_LENGTH.toString(16) + ' bytes')\n }\n return length | 0\n}\n\nfunction SlowBuffer (length) {\n if (+length != length) { // eslint-disable-line eqeqeq\n length = 0\n }\n return Buffer.alloc(+length)\n}\n\nBuffer.isBuffer = function isBuffer (b) {\n return b != null && b._isBuffer === true &&\n b !== Buffer.prototype // so Buffer.isBuffer(Buffer.prototype) will be false\n}\n\nBuffer.compare = function compare (a, b) {\n if (isInstance(a, Uint8Array)) a = Buffer.from(a, a.offset, a.byteLength)\n if (isInstance(b, Uint8Array)) b = Buffer.from(b, b.offset, b.byteLength)\n if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n throw new TypeError(\n 'The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array'\n )\n }\n\n if (a === b) return 0\n\n let x = a.length\n let y = b.length\n\n for (let i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i]\n y = b[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n switch (String(encoding).toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'latin1':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return true\n default:\n return false\n }\n}\n\nBuffer.concat = function concat (list, length) {\n if (!Array.isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n\n if (list.length === 0) {\n return Buffer.alloc(0)\n }\n\n let i\n if (length === undefined) {\n length = 0\n for (i = 0; i < list.length; ++i) {\n length += list[i].length\n }\n }\n\n const buffer = Buffer.allocUnsafe(length)\n let pos = 0\n for (i = 0; i < list.length; ++i) {\n let buf = list[i]\n if (isInstance(buf, Uint8Array)) {\n if (pos + buf.length > buffer.length) {\n if (!Buffer.isBuffer(buf)) buf = Buffer.from(buf)\n buf.copy(buffer, pos)\n } else {\n Uint8Array.prototype.set.call(\n buffer,\n buf,\n pos\n )\n }\n } else if (!Buffer.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n } else {\n buf.copy(buffer, pos)\n }\n pos += buf.length\n }\n return buffer\n}\n\nfunction byteLength (string, encoding) {\n if (Buffer.isBuffer(string)) {\n return string.length\n }\n if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) {\n return string.byteLength\n }\n if (typeof string !== 'string') {\n throw new TypeError(\n 'The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. ' +\n 'Received type ' + typeof string\n )\n }\n\n const len = string.length\n const mustMatch = (arguments.length > 2 && arguments[2] === true)\n if (!mustMatch && len === 0) return 0\n\n // Use a for loop to avoid recursion\n let loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'ascii':\n case 'latin1':\n case 'binary':\n return len\n case 'utf8':\n case 'utf-8':\n return utf8ToBytes(string).length\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return len * 2\n case 'hex':\n return len >>> 1\n case 'base64':\n return base64ToBytes(string).length\n default:\n if (loweredCase) {\n return mustMatch ? -1 : utf8ToBytes(string).length // assume utf8\n }\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n let loweredCase = false\n\n // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n // property of a typed array.\n\n // This behaves neither like String nor Uint8Array in that we set start/end\n // to their upper/lower bounds if the value passed is out of range.\n // undefined is handled specially as per ECMA-262 6th Edition,\n // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n if (start === undefined || start < 0) {\n start = 0\n }\n // Return early if start > this.length. Done here to prevent potential uint32\n // coercion fail below.\n if (start > this.length) {\n return ''\n }\n\n if (end === undefined || end > this.length) {\n end = this.length\n }\n\n if (end <= 0) {\n return ''\n }\n\n // Force coercion to uint32. This will also coerce falsey/NaN values to 0.\n end >>>= 0\n start >>>= 0\n\n if (end <= start) {\n return ''\n }\n\n if (!encoding) encoding = 'utf8'\n\n while (true) {\n switch (encoding) {\n case 'hex':\n return hexSlice(this, start, end)\n\n case 'utf8':\n case 'utf-8':\n return utf8Slice(this, start, end)\n\n case 'ascii':\n return asciiSlice(this, start, end)\n\n case 'latin1':\n case 'binary':\n return latin1Slice(this, start, end)\n\n case 'base64':\n return base64Slice(this, start, end)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return utf16leSlice(this, start, end)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = (encoding + '').toLowerCase()\n loweredCase = true\n }\n }\n}\n\n// This property is used by `Buffer.isBuffer` (and the `is-buffer` npm package)\n// to detect a Buffer instance. It's not possible to use `instanceof Buffer`\n// reliably in a browserify context because there could be multiple different\n// copies of the 'buffer' package in use. This method works even for Buffer\n// instances that were created from another copy of the `buffer` package.\n// See: https://github.com/feross/buffer/issues/154\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n const i = b[n]\n b[n] = b[m]\n b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n const len = this.length\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits')\n }\n for (let i = 0; i < len; i += 2) {\n swap(this, i, i + 1)\n }\n return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n const len = this.length\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits')\n }\n for (let i = 0; i < len; i += 4) {\n swap(this, i, i + 3)\n swap(this, i + 1, i + 2)\n }\n return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n const len = this.length\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits')\n }\n for (let i = 0; i < len; i += 8) {\n swap(this, i, i + 7)\n swap(this, i + 1, i + 6)\n swap(this, i + 2, i + 5)\n swap(this, i + 3, i + 4)\n }\n return this\n}\n\nBuffer.prototype.toString = function toString () {\n const length = this.length\n if (length === 0) return ''\n if (arguments.length === 0) return utf8Slice(this, 0, length)\n return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.toLocaleString = Buffer.prototype.toString\n\nBuffer.prototype.equals = function equals (b) {\n if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n if (this === b) return true\n return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n let str = ''\n const max = exports.INSPECT_MAX_BYTES\n str = this.toString('hex', 0, max).replace(/(.{2})/g, '$1 ').trim()\n if (this.length > max) str += ' ... '\n return ''\n}\nif (customInspectSymbol) {\n Buffer.prototype[customInspectSymbol] = Buffer.prototype.inspect\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n if (isInstance(target, Uint8Array)) {\n target = Buffer.from(target, target.offset, target.byteLength)\n }\n if (!Buffer.isBuffer(target)) {\n throw new TypeError(\n 'The \"target\" argument must be one of type Buffer or Uint8Array. ' +\n 'Received type ' + (typeof target)\n )\n }\n\n if (start === undefined) {\n start = 0\n }\n if (end === undefined) {\n end = target ? target.length : 0\n }\n if (thisStart === undefined) {\n thisStart = 0\n }\n if (thisEnd === undefined) {\n thisEnd = this.length\n }\n\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError('out of range index')\n }\n\n if (thisStart >= thisEnd && start >= end) {\n return 0\n }\n if (thisStart >= thisEnd) {\n return -1\n }\n if (start >= end) {\n return 1\n }\n\n start >>>= 0\n end >>>= 0\n thisStart >>>= 0\n thisEnd >>>= 0\n\n if (this === target) return 0\n\n let x = thisEnd - thisStart\n let y = end - start\n const len = Math.min(x, y)\n\n const thisCopy = this.slice(thisStart, thisEnd)\n const targetCopy = target.slice(start, end)\n\n for (let i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i]\n y = targetCopy[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (numberIsNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [val], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n let indexSize = 1\n let arrLength = arr.length\n let valLength = val.length\n\n if (encoding !== undefined) {\n encoding = String(encoding).toLowerCase()\n if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n encoding === 'utf16le' || encoding === 'utf-16le') {\n if (arr.length < 2 || val.length < 2) {\n return -1\n }\n indexSize = 2\n arrLength /= 2\n valLength /= 2\n byteOffset /= 2\n }\n }\n\n function read (buf, i) {\n if (indexSize === 1) {\n return buf[i]\n } else {\n return buf.readUInt16BE(i * indexSize)\n }\n }\n\n let i\n if (dir) {\n let foundIndex = -1\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1) foundIndex = i\n if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n } else {\n if (foundIndex !== -1) i -= i - foundIndex\n foundIndex = -1\n }\n }\n } else {\n if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n for (i = byteOffset; i >= 0; i--) {\n let found = true\n for (let j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false\n break\n }\n }\n if (found) return i\n }\n }\n\n return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n offset = Number(offset) || 0\n const remaining = buf.length - offset\n if (!length) {\n length = remaining\n } else {\n length = Number(length)\n if (length > remaining) {\n length = remaining\n }\n }\n\n const strLen = string.length\n\n if (length > strLen / 2) {\n length = strLen / 2\n }\n let i\n for (i = 0; i < length; ++i) {\n const parsed = parseInt(string.substr(i * 2, 2), 16)\n if (numberIsNaN(parsed)) return i\n buf[offset + i] = parsed\n }\n return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n // Buffer#write(string)\n if (offset === undefined) {\n encoding = 'utf8'\n length = this.length\n offset = 0\n // Buffer#write(string, encoding)\n } else if (length === undefined && typeof offset === 'string') {\n encoding = offset\n length = this.length\n offset = 0\n // Buffer#write(string, offset[, length][, encoding])\n } else if (isFinite(offset)) {\n offset = offset >>> 0\n if (isFinite(length)) {\n length = length >>> 0\n if (encoding === undefined) encoding = 'utf8'\n } else {\n encoding = length\n length = undefined\n }\n } else {\n throw new Error(\n 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n )\n }\n\n const remaining = this.length - offset\n if (length === undefined || length > remaining) length = remaining\n\n if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n throw new RangeError('Attempt to write outside buffer bounds')\n }\n\n if (!encoding) encoding = 'utf8'\n\n let loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'hex':\n return hexWrite(this, string, offset, length)\n\n case 'utf8':\n case 'utf-8':\n return utf8Write(this, string, offset, length)\n\n case 'ascii':\n case 'latin1':\n case 'binary':\n return asciiWrite(this, string, offset, length)\n\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return base64Write(this, string, offset, length)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return ucs2Write(this, string, offset, length)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0)\n }\n}\n\nfunction base64Slice (buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf)\n } else {\n return base64.fromByteArray(buf.slice(start, end))\n }\n}\n\nfunction utf8Slice (buf, start, end) {\n end = Math.min(buf.length, end)\n const res = []\n\n let i = start\n while (i < end) {\n const firstByte = buf[i]\n let codePoint = null\n let bytesPerSequence = (firstByte > 0xEF)\n ? 4\n : (firstByte > 0xDF)\n ? 3\n : (firstByte > 0xBF)\n ? 2\n : 1\n\n if (i + bytesPerSequence <= end) {\n let secondByte, thirdByte, fourthByte, tempCodePoint\n\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 0x80) {\n codePoint = firstByte\n }\n break\n case 2:\n secondByte = buf[i + 1]\n if ((secondByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n if (tempCodePoint > 0x7F) {\n codePoint = tempCodePoint\n }\n }\n break\n case 3:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n codePoint = tempCodePoint\n }\n }\n break\n case 4:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n fourthByte = buf[i + 3]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n codePoint = tempCodePoint\n }\n }\n }\n }\n\n if (codePoint === null) {\n // we did not generate a valid codePoint so insert a\n // replacement char (U+FFFD) and advance only 1 byte\n codePoint = 0xFFFD\n bytesPerSequence = 1\n } else if (codePoint > 0xFFFF) {\n // encode to utf16 (surrogate pair dance)\n codePoint -= 0x10000\n res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n codePoint = 0xDC00 | codePoint & 0x3FF\n }\n\n res.push(codePoint)\n i += bytesPerSequence\n }\n\n return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nconst MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n const len = codePoints.length\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n }\n\n // Decode in chunks to avoid \"call stack size exceeded\".\n let res = ''\n let i = 0\n while (i < len) {\n res += String.fromCharCode.apply(\n String,\n codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n )\n }\n return res\n}\n\nfunction asciiSlice (buf, start, end) {\n let ret = ''\n end = Math.min(buf.length, end)\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F)\n }\n return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n let ret = ''\n end = Math.min(buf.length, end)\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i])\n }\n return ret\n}\n\nfunction hexSlice (buf, start, end) {\n const len = buf.length\n\n if (!start || start < 0) start = 0\n if (!end || end < 0 || end > len) end = len\n\n let out = ''\n for (let i = start; i < end; ++i) {\n out += hexSliceLookupTable[buf[i]]\n }\n return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n const bytes = buf.slice(start, end)\n let res = ''\n // If bytes.length is odd, the last 8 bits must be ignored (same as node.js)\n for (let i = 0; i < bytes.length - 1; i += 2) {\n res += String.fromCharCode(bytes[i] + (bytes[i + 1] * 256))\n }\n return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n const len = this.length\n start = ~~start\n end = end === undefined ? len : ~~end\n\n if (start < 0) {\n start += len\n if (start < 0) start = 0\n } else if (start > len) {\n start = len\n }\n\n if (end < 0) {\n end += len\n if (end < 0) end = 0\n } else if (end > len) {\n end = len\n }\n\n if (end < start) end = start\n\n const newBuf = this.subarray(start, end)\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(newBuf, Buffer.prototype)\n\n return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUintLE =\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let val = this[offset]\n let mul = 1\n let i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUintBE =\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n checkOffset(offset, byteLength, this.length)\n }\n\n let val = this[offset + --byteLength]\n let mul = 1\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUint8 =\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n return this[offset]\n}\n\nBuffer.prototype.readUint16LE =\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUint16BE =\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUint32LE =\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return ((this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16)) +\n (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUint32BE =\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] * 0x1000000) +\n ((this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n this[offset + 3])\n}\n\nBuffer.prototype.readBigUInt64LE = defineBigIntMethod(function readBigUInt64LE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const lo = first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24\n\n const hi = this[++offset] +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n last * 2 ** 24\n\n return BigInt(lo) + (BigInt(hi) << BigInt(32))\n})\n\nBuffer.prototype.readBigUInt64BE = defineBigIntMethod(function readBigUInt64BE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const hi = first * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset]\n\n const lo = this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last\n\n return (BigInt(hi) << BigInt(32)) + BigInt(lo)\n})\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let val = this[offset]\n let mul = 1\n let i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let i = byteLength\n let mul = 1\n let val = this[offset + --i]\n while (i > 0 && (mul *= 0x100)) {\n val += this[offset + --i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n if (!(this[offset] & 0x80)) return (this[offset])\n return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n const val = this[offset] | (this[offset + 1] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n const val = this[offset + 1] | (this[offset] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16) |\n (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] << 24) |\n (this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n (this[offset + 3])\n}\n\nBuffer.prototype.readBigInt64LE = defineBigIntMethod(function readBigInt64LE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const val = this[offset + 4] +\n this[offset + 5] * 2 ** 8 +\n this[offset + 6] * 2 ** 16 +\n (last << 24) // Overflow\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24)\n})\n\nBuffer.prototype.readBigInt64BE = defineBigIntMethod(function readBigInt64BE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const val = (first << 24) + // Overflow\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset]\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last)\n})\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUintLE =\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n let mul = 1\n let i = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUintBE =\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n let i = byteLength - 1\n let mul = 1\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUint8 =\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeUint16LE =\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeUint16BE =\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeUint32LE =\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset + 3] = (value >>> 24)\n this[offset + 2] = (value >>> 16)\n this[offset + 1] = (value >>> 8)\n this[offset] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeUint32BE =\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nfunction wrtBigUInt64LE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7)\n\n let lo = Number(value & BigInt(0xffffffff))\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n return offset\n}\n\nfunction wrtBigUInt64BE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7)\n\n let lo = Number(value & BigInt(0xffffffff))\n buf[offset + 7] = lo\n lo = lo >> 8\n buf[offset + 6] = lo\n lo = lo >> 8\n buf[offset + 5] = lo\n lo = lo >> 8\n buf[offset + 4] = lo\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n buf[offset + 3] = hi\n hi = hi >> 8\n buf[offset + 2] = hi\n hi = hi >> 8\n buf[offset + 1] = hi\n hi = hi >> 8\n buf[offset] = hi\n return offset + 8\n}\n\nBuffer.prototype.writeBigUInt64LE = defineBigIntMethod(function writeBigUInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeBigUInt64BE = defineBigIntMethod(function writeBigUInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n let i = 0\n let mul = 1\n let sub = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n let i = byteLength - 1\n let mul = 1\n let sub = 0\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n if (value < 0) value = 0xff + value + 1\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n this[offset + 2] = (value >>> 16)\n this[offset + 3] = (value >>> 24)\n return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (value < 0) value = 0xffffffff + value + 1\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeBigInt64LE = defineBigIntMethod(function writeBigInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nBuffer.prototype.writeBigInt64BE = defineBigIntMethod(function writeBigInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n }\n ieee754.write(buf, value, offset, littleEndian, 23, 4)\n return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n }\n ieee754.write(buf, value, offset, littleEndian, 52, 8)\n return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n if (!Buffer.isBuffer(target)) throw new TypeError('argument should be a Buffer')\n if (!start) start = 0\n if (!end && end !== 0) end = this.length\n if (targetStart >= target.length) targetStart = target.length\n if (!targetStart) targetStart = 0\n if (end > 0 && end < start) end = start\n\n // Copy 0 bytes; we're done\n if (end === start) return 0\n if (target.length === 0 || this.length === 0) return 0\n\n // Fatal error conditions\n if (targetStart < 0) {\n throw new RangeError('targetStart out of bounds')\n }\n if (start < 0 || start >= this.length) throw new RangeError('Index out of range')\n if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n // Are we oob?\n if (end > this.length) end = this.length\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start\n }\n\n const len = end - start\n\n if (this === target && typeof Uint8Array.prototype.copyWithin === 'function') {\n // Use built-in when available, missing from IE11\n this.copyWithin(targetStart, start, end)\n } else {\n Uint8Array.prototype.set.call(\n target,\n this.subarray(start, end),\n targetStart\n )\n }\n\n return len\n}\n\n// Usage:\n// buffer.fill(number[, offset[, end]])\n// buffer.fill(buffer[, offset[, end]])\n// buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n // Handle string cases:\n if (typeof val === 'string') {\n if (typeof start === 'string') {\n encoding = start\n start = 0\n end = this.length\n } else if (typeof end === 'string') {\n encoding = end\n end = this.length\n }\n if (encoding !== undefined && typeof encoding !== 'string') {\n throw new TypeError('encoding must be a string')\n }\n if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n if (val.length === 1) {\n const code = val.charCodeAt(0)\n if ((encoding === 'utf8' && code < 128) ||\n encoding === 'latin1') {\n // Fast path: If `val` fits into a single byte, use that numeric value.\n val = code\n }\n }\n } else if (typeof val === 'number') {\n val = val & 255\n } else if (typeof val === 'boolean') {\n val = Number(val)\n }\n\n // Invalid ranges are not set to a default, so can range check early.\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError('Out of range index')\n }\n\n if (end <= start) {\n return this\n }\n\n start = start >>> 0\n end = end === undefined ? this.length : end >>> 0\n\n if (!val) val = 0\n\n let i\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val\n }\n } else {\n const bytes = Buffer.isBuffer(val)\n ? val\n : Buffer.from(val, encoding)\n const len = bytes.length\n if (len === 0) {\n throw new TypeError('The value \"' + val +\n '\" is invalid for argument \"value\"')\n }\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len]\n }\n }\n\n return this\n}\n\n// CUSTOM ERRORS\n// =============\n\n// Simplified versions from Node, changed for Buffer-only usage\nconst errors = {}\nfunction E (sym, getMessage, Base) {\n errors[sym] = class NodeError extends Base {\n constructor () {\n super()\n\n Object.defineProperty(this, 'message', {\n value: getMessage.apply(this, arguments),\n writable: true,\n configurable: true\n })\n\n // Add the error code to the name to include it in the stack trace.\n this.name = `${this.name} [${sym}]`\n // Access the stack to generate the error message including the error code\n // from the name.\n this.stack // eslint-disable-line no-unused-expressions\n // Reset the name to the actual name.\n delete this.name\n }\n\n get code () {\n return sym\n }\n\n set code (value) {\n Object.defineProperty(this, 'code', {\n configurable: true,\n enumerable: true,\n value,\n writable: true\n })\n }\n\n toString () {\n return `${this.name} [${sym}]: ${this.message}`\n }\n }\n}\n\nE('ERR_BUFFER_OUT_OF_BOUNDS',\n function (name) {\n if (name) {\n return `${name} is outside of buffer bounds`\n }\n\n return 'Attempt to access memory outside buffer bounds'\n }, RangeError)\nE('ERR_INVALID_ARG_TYPE',\n function (name, actual) {\n return `The \"${name}\" argument must be of type number. Received type ${typeof actual}`\n }, TypeError)\nE('ERR_OUT_OF_RANGE',\n function (str, range, input) {\n let msg = `The value of \"${str}\" is out of range.`\n let received = input\n if (Number.isInteger(input) && Math.abs(input) > 2 ** 32) {\n received = addNumericalSeparator(String(input))\n } else if (typeof input === 'bigint') {\n received = String(input)\n if (input > BigInt(2) ** BigInt(32) || input < -(BigInt(2) ** BigInt(32))) {\n received = addNumericalSeparator(received)\n }\n received += 'n'\n }\n msg += ` It must be ${range}. Received ${received}`\n return msg\n }, RangeError)\n\nfunction addNumericalSeparator (val) {\n let res = ''\n let i = val.length\n const start = val[0] === '-' ? 1 : 0\n for (; i >= start + 4; i -= 3) {\n res = `_${val.slice(i - 3, i)}${res}`\n }\n return `${val.slice(0, i)}${res}`\n}\n\n// CHECK FUNCTIONS\n// ===============\n\nfunction checkBounds (buf, offset, byteLength) {\n validateNumber(offset, 'offset')\n if (buf[offset] === undefined || buf[offset + byteLength] === undefined) {\n boundsError(offset, buf.length - (byteLength + 1))\n }\n}\n\nfunction checkIntBI (value, min, max, buf, offset, byteLength) {\n if (value > max || value < min) {\n const n = typeof min === 'bigint' ? 'n' : ''\n let range\n if (byteLength > 3) {\n if (min === 0 || min === BigInt(0)) {\n range = `>= 0${n} and < 2${n} ** ${(byteLength + 1) * 8}${n}`\n } else {\n range = `>= -(2${n} ** ${(byteLength + 1) * 8 - 1}${n}) and < 2 ** ` +\n `${(byteLength + 1) * 8 - 1}${n}`\n }\n } else {\n range = `>= ${min}${n} and <= ${max}${n}`\n }\n throw new errors.ERR_OUT_OF_RANGE('value', range, value)\n }\n checkBounds(buf, offset, byteLength)\n}\n\nfunction validateNumber (value, name) {\n if (typeof value !== 'number') {\n throw new errors.ERR_INVALID_ARG_TYPE(name, 'number', value)\n }\n}\n\nfunction boundsError (value, length, type) {\n if (Math.floor(value) !== value) {\n validateNumber(value, type)\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset', 'an integer', value)\n }\n\n if (length < 0) {\n throw new errors.ERR_BUFFER_OUT_OF_BOUNDS()\n }\n\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset',\n `>= ${type ? 1 : 0} and <= ${length}`,\n value)\n}\n\n// HELPER FUNCTIONS\n// ================\n\nconst INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n // Node takes equal signs as end of the Base64 encoding\n str = str.split('=')[0]\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = str.trim().replace(INVALID_BASE64_RE, '')\n // Node converts strings with length < 2 to ''\n if (str.length < 2) return ''\n // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n while (str.length % 4 !== 0) {\n str = str + '='\n }\n return str\n}\n\nfunction utf8ToBytes (string, units) {\n units = units || Infinity\n let codePoint\n const length = string.length\n let leadSurrogate = null\n const bytes = []\n\n for (let i = 0; i < length; ++i) {\n codePoint = string.charCodeAt(i)\n\n // is surrogate component\n if (codePoint > 0xD7FF && codePoint < 0xE000) {\n // last char was a lead\n if (!leadSurrogate) {\n // no lead yet\n if (codePoint > 0xDBFF) {\n // unexpected trail\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n } else if (i + 1 === length) {\n // unpaired lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n }\n\n // valid lead\n leadSurrogate = codePoint\n\n continue\n }\n\n // 2 leads in a row\n if (codePoint < 0xDC00) {\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n leadSurrogate = codePoint\n continue\n }\n\n // valid surrogate pair\n codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n } else if (leadSurrogate) {\n // valid bmp char, but last char was a lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n }\n\n leadSurrogate = null\n\n // encode utf8\n if (codePoint < 0x80) {\n if ((units -= 1) < 0) break\n bytes.push(codePoint)\n } else if (codePoint < 0x800) {\n if ((units -= 2) < 0) break\n bytes.push(\n codePoint >> 0x6 | 0xC0,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x10000) {\n if ((units -= 3) < 0) break\n bytes.push(\n codePoint >> 0xC | 0xE0,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x110000) {\n if ((units -= 4) < 0) break\n bytes.push(\n codePoint >> 0x12 | 0xF0,\n codePoint >> 0xC & 0x3F | 0x80,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else {\n throw new Error('Invalid code point')\n }\n }\n\n return bytes\n}\n\nfunction asciiToBytes (str) {\n const byteArray = []\n for (let i = 0; i < str.length; ++i) {\n // Node's code seems to be doing this and not & 0x7F..\n byteArray.push(str.charCodeAt(i) & 0xFF)\n }\n return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n let c, hi, lo\n const byteArray = []\n for (let i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0) break\n\n c = str.charCodeAt(i)\n hi = c >> 8\n lo = c % 256\n byteArray.push(lo)\n byteArray.push(hi)\n }\n\n return byteArray\n}\n\nfunction base64ToBytes (str) {\n return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n let i\n for (i = 0; i < length; ++i) {\n if ((i + offset >= dst.length) || (i >= src.length)) break\n dst[i + offset] = src[i]\n }\n return i\n}\n\n// ArrayBuffer or Uint8Array objects from other contexts (i.e. iframes) do not pass\n// the `instanceof` check but they should be treated as of that type.\n// See: https://github.com/feross/buffer/issues/166\nfunction isInstance (obj, type) {\n return obj instanceof type ||\n (obj != null && obj.constructor != null && obj.constructor.name != null &&\n obj.constructor.name === type.name)\n}\nfunction numberIsNaN (obj) {\n // For IE11 support\n return obj !== obj // eslint-disable-line no-self-compare\n}\n\n// Create lookup table for `toString('hex')`\n// See: https://github.com/feross/buffer/issues/219\nconst hexSliceLookupTable = (function () {\n const alphabet = '0123456789abcdef'\n const table = new Array(256)\n for (let i = 0; i < 16; ++i) {\n const i16 = i * 16\n for (let j = 0; j < 16; ++j) {\n table[i16 + j] = alphabet[i] + alphabet[j]\n }\n }\n return table\n})()\n\n// Return not function with Error if BigInt not supported\nfunction defineBigIntMethod (fn) {\n return typeof BigInt === 'undefined' ? BufferBigIntNotDefined : fn\n}\n\nfunction BufferBigIntNotDefined () {\n throw new Error('BigInt not supported')\n}\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\nvar R = typeof Reflect === 'object' ? Reflect : null\nvar ReflectApply = R && typeof R.apply === 'function'\n ? R.apply\n : function ReflectApply(target, receiver, args) {\n return Function.prototype.apply.call(target, receiver, args);\n }\n\nvar ReflectOwnKeys\nif (R && typeof R.ownKeys === 'function') {\n ReflectOwnKeys = R.ownKeys\n} else if (Object.getOwnPropertySymbols) {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target)\n .concat(Object.getOwnPropertySymbols(target));\n };\n} else {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target);\n };\n}\n\nfunction ProcessEmitWarning(warning) {\n if (console && console.warn) console.warn(warning);\n}\n\nvar NumberIsNaN = Number.isNaN || function NumberIsNaN(value) {\n return value !== value;\n}\n\nfunction EventEmitter() {\n EventEmitter.init.call(this);\n}\nmodule.exports = EventEmitter;\nmodule.exports.once = once;\n\n// Backwards-compat with node 0.10.x\nEventEmitter.EventEmitter = EventEmitter;\n\nEventEmitter.prototype._events = undefined;\nEventEmitter.prototype._eventsCount = 0;\nEventEmitter.prototype._maxListeners = undefined;\n\n// By default EventEmitters will print a warning if more than 10 listeners are\n// added to it. This is a useful default which helps finding memory leaks.\nvar defaultMaxListeners = 10;\n\nfunction checkListener(listener) {\n if (typeof listener !== 'function') {\n throw new TypeError('The \"listener\" argument must be of type Function. Received type ' + typeof listener);\n }\n}\n\nObject.defineProperty(EventEmitter, 'defaultMaxListeners', {\n enumerable: true,\n get: function() {\n return defaultMaxListeners;\n },\n set: function(arg) {\n if (typeof arg !== 'number' || arg < 0 || NumberIsNaN(arg)) {\n throw new RangeError('The value of \"defaultMaxListeners\" is out of range. It must be a non-negative number. Received ' + arg + '.');\n }\n defaultMaxListeners = arg;\n }\n});\n\nEventEmitter.init = function() {\n\n if (this._events === undefined ||\n this._events === Object.getPrototypeOf(this)._events) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n }\n\n this._maxListeners = this._maxListeners || undefined;\n};\n\n// Obviously not all Emitters should be limited to 10. This function allows\n// that to be increased. Set to zero for unlimited.\nEventEmitter.prototype.setMaxListeners = function setMaxListeners(n) {\n if (typeof n !== 'number' || n < 0 || NumberIsNaN(n)) {\n throw new RangeError('The value of \"n\" is out of range. It must be a non-negative number. Received ' + n + '.');\n }\n this._maxListeners = n;\n return this;\n};\n\nfunction _getMaxListeners(that) {\n if (that._maxListeners === undefined)\n return EventEmitter.defaultMaxListeners;\n return that._maxListeners;\n}\n\nEventEmitter.prototype.getMaxListeners = function getMaxListeners() {\n return _getMaxListeners(this);\n};\n\nEventEmitter.prototype.emit = function emit(type) {\n var args = [];\n for (var i = 1; i < arguments.length; i++) args.push(arguments[i]);\n var doError = (type === 'error');\n\n var events = this._events;\n if (events !== undefined)\n doError = (doError && events.error === undefined);\n else if (!doError)\n return false;\n\n // If there is no 'error' event listener then throw.\n if (doError) {\n var er;\n if (args.length > 0)\n er = args[0];\n if (er instanceof Error) {\n // Note: The comments on the `throw` lines are intentional, they show\n // up in Node's output if this results in an unhandled exception.\n throw er; // Unhandled 'error' event\n }\n // At least give some kind of context to the user\n var err = new Error('Unhandled error.' + (er ? ' (' + er.message + ')' : ''));\n err.context = er;\n throw err; // Unhandled 'error' event\n }\n\n var handler = events[type];\n\n if (handler === undefined)\n return false;\n\n if (typeof handler === 'function') {\n ReflectApply(handler, this, args);\n } else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n ReflectApply(listeners[i], this, args);\n }\n\n return true;\n};\n\nfunction _addListener(target, type, listener, prepend) {\n var m;\n var events;\n var existing;\n\n checkListener(listener);\n\n events = target._events;\n if (events === undefined) {\n events = target._events = Object.create(null);\n target._eventsCount = 0;\n } else {\n // To avoid recursion in the case that type === \"newListener\"! Before\n // adding it to the listeners, first emit \"newListener\".\n if (events.newListener !== undefined) {\n target.emit('newListener', type,\n listener.listener ? listener.listener : listener);\n\n // Re-assign `events` because a newListener handler could have caused the\n // this._events to be assigned to a new object\n events = target._events;\n }\n existing = events[type];\n }\n\n if (existing === undefined) {\n // Optimize the case of one listener. Don't need the extra array object.\n existing = events[type] = listener;\n ++target._eventsCount;\n } else {\n if (typeof existing === 'function') {\n // Adding the second element, need to change to array.\n existing = events[type] =\n prepend ? [listener, existing] : [existing, listener];\n // If we've already got an array, just append.\n } else if (prepend) {\n existing.unshift(listener);\n } else {\n existing.push(listener);\n }\n\n // Check for listener leak\n m = _getMaxListeners(target);\n if (m > 0 && existing.length > m && !existing.warned) {\n existing.warned = true;\n // No error code for this since it is a Warning\n // eslint-disable-next-line no-restricted-syntax\n var w = new Error('Possible EventEmitter memory leak detected. ' +\n existing.length + ' ' + String(type) + ' listeners ' +\n 'added. Use emitter.setMaxListeners() to ' +\n 'increase limit');\n w.name = 'MaxListenersExceededWarning';\n w.emitter = target;\n w.type = type;\n w.count = existing.length;\n ProcessEmitWarning(w);\n }\n }\n\n return target;\n}\n\nEventEmitter.prototype.addListener = function addListener(type, listener) {\n return _addListener(this, type, listener, false);\n};\n\nEventEmitter.prototype.on = EventEmitter.prototype.addListener;\n\nEventEmitter.prototype.prependListener =\n function prependListener(type, listener) {\n return _addListener(this, type, listener, true);\n };\n\nfunction onceWrapper() {\n if (!this.fired) {\n this.target.removeListener(this.type, this.wrapFn);\n this.fired = true;\n if (arguments.length === 0)\n return this.listener.call(this.target);\n return this.listener.apply(this.target, arguments);\n }\n}\n\nfunction _onceWrap(target, type, listener) {\n var state = { fired: false, wrapFn: undefined, target: target, type: type, listener: listener };\n var wrapped = onceWrapper.bind(state);\n wrapped.listener = listener;\n state.wrapFn = wrapped;\n return wrapped;\n}\n\nEventEmitter.prototype.once = function once(type, listener) {\n checkListener(listener);\n this.on(type, _onceWrap(this, type, listener));\n return this;\n};\n\nEventEmitter.prototype.prependOnceListener =\n function prependOnceListener(type, listener) {\n checkListener(listener);\n this.prependListener(type, _onceWrap(this, type, listener));\n return this;\n };\n\n// Emits a 'removeListener' event if and only if the listener was removed.\nEventEmitter.prototype.removeListener =\n function removeListener(type, listener) {\n var list, events, position, i, originalListener;\n\n checkListener(listener);\n\n events = this._events;\n if (events === undefined)\n return this;\n\n list = events[type];\n if (list === undefined)\n return this;\n\n if (list === listener || list.listener === listener) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else {\n delete events[type];\n if (events.removeListener)\n this.emit('removeListener', type, list.listener || listener);\n }\n } else if (typeof list !== 'function') {\n position = -1;\n\n for (i = list.length - 1; i >= 0; i--) {\n if (list[i] === listener || list[i].listener === listener) {\n originalListener = list[i].listener;\n position = i;\n break;\n }\n }\n\n if (position < 0)\n return this;\n\n if (position === 0)\n list.shift();\n else {\n spliceOne(list, position);\n }\n\n if (list.length === 1)\n events[type] = list[0];\n\n if (events.removeListener !== undefined)\n this.emit('removeListener', type, originalListener || listener);\n }\n\n return this;\n };\n\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\n\nEventEmitter.prototype.removeAllListeners =\n function removeAllListeners(type) {\n var listeners, events, i;\n\n events = this._events;\n if (events === undefined)\n return this;\n\n // not listening for removeListener, no need to emit\n if (events.removeListener === undefined) {\n if (arguments.length === 0) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n } else if (events[type] !== undefined) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else\n delete events[type];\n }\n return this;\n }\n\n // emit removeListener for all listeners on all events\n if (arguments.length === 0) {\n var keys = Object.keys(events);\n var key;\n for (i = 0; i < keys.length; ++i) {\n key = keys[i];\n if (key === 'removeListener') continue;\n this.removeAllListeners(key);\n }\n this.removeAllListeners('removeListener');\n this._events = Object.create(null);\n this._eventsCount = 0;\n return this;\n }\n\n listeners = events[type];\n\n if (typeof listeners === 'function') {\n this.removeListener(type, listeners);\n } else if (listeners !== undefined) {\n // LIFO order\n for (i = listeners.length - 1; i >= 0; i--) {\n this.removeListener(type, listeners[i]);\n }\n }\n\n return this;\n };\n\nfunction _listeners(target, type, unwrap) {\n var events = target._events;\n\n if (events === undefined)\n return [];\n\n var evlistener = events[type];\n if (evlistener === undefined)\n return [];\n\n if (typeof evlistener === 'function')\n return unwrap ? [evlistener.listener || evlistener] : [evlistener];\n\n return unwrap ?\n unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length);\n}\n\nEventEmitter.prototype.listeners = function listeners(type) {\n return _listeners(this, type, true);\n};\n\nEventEmitter.prototype.rawListeners = function rawListeners(type) {\n return _listeners(this, type, false);\n};\n\nEventEmitter.listenerCount = function(emitter, type) {\n if (typeof emitter.listenerCount === 'function') {\n return emitter.listenerCount(type);\n } else {\n return listenerCount.call(emitter, type);\n }\n};\n\nEventEmitter.prototype.listenerCount = listenerCount;\nfunction listenerCount(type) {\n var events = this._events;\n\n if (events !== undefined) {\n var evlistener = events[type];\n\n if (typeof evlistener === 'function') {\n return 1;\n } else if (evlistener !== undefined) {\n return evlistener.length;\n }\n }\n\n return 0;\n}\n\nEventEmitter.prototype.eventNames = function eventNames() {\n return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : [];\n};\n\nfunction arrayClone(arr, n) {\n var copy = new Array(n);\n for (var i = 0; i < n; ++i)\n copy[i] = arr[i];\n return copy;\n}\n\nfunction spliceOne(list, index) {\n for (; index + 1 < list.length; index++)\n list[index] = list[index + 1];\n list.pop();\n}\n\nfunction unwrapListeners(arr) {\n var ret = new Array(arr.length);\n for (var i = 0; i < ret.length; ++i) {\n ret[i] = arr[i].listener || arr[i];\n }\n return ret;\n}\n\nfunction once(emitter, name) {\n return new Promise(function (resolve, reject) {\n function errorListener(err) {\n emitter.removeListener(name, resolver);\n reject(err);\n }\n\n function resolver() {\n if (typeof emitter.removeListener === 'function') {\n emitter.removeListener('error', errorListener);\n }\n resolve([].slice.call(arguments));\n };\n\n eventTargetAgnosticAddListener(emitter, name, resolver, { once: true });\n if (name !== 'error') {\n addErrorHandlerIfEventEmitter(emitter, errorListener, { once: true });\n }\n });\n}\n\nfunction addErrorHandlerIfEventEmitter(emitter, handler, flags) {\n if (typeof emitter.on === 'function') {\n eventTargetAgnosticAddListener(emitter, 'error', handler, flags);\n }\n}\n\nfunction eventTargetAgnosticAddListener(emitter, name, listener, flags) {\n if (typeof emitter.on === 'function') {\n if (flags.once) {\n emitter.once(name, listener);\n } else {\n emitter.on(name, listener);\n }\n } else if (typeof emitter.addEventListener === 'function') {\n // EventTarget does not have `error` event semantics like Node\n // EventEmitters, we do not listen for `error` events here.\n emitter.addEventListener(name, function wrapListener(arg) {\n // IE does not have builtin `{ once: true }` support so we\n // have to do it manually.\n if (flags.once) {\n emitter.removeEventListener(name, wrapListener);\n }\n listener(arg);\n });\n } else {\n throw new TypeError('The \"emitter\" argument must be of type EventEmitter. Received type ' + typeof emitter);\n }\n}\n","/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */\nexports.read = function (buffer, offset, isLE, mLen, nBytes) {\n var e, m\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var nBits = -7\n var i = isLE ? (nBytes - 1) : 0\n var d = isLE ? -1 : 1\n var s = buffer[offset + i]\n\n i += d\n\n e = s & ((1 << (-nBits)) - 1)\n s >>= (-nBits)\n nBits += eLen\n for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & ((1 << (-nBits)) - 1)\n e >>= (-nBits)\n nBits += mLen\n for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias\n } else if (e === eMax) {\n return m ? NaN : ((s ? -1 : 1) * Infinity)\n } else {\n m = m + Math.pow(2, mLen)\n e = e - eBias\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n var i = isLE ? 0 : (nBytes - 1)\n var d = isLE ? 1 : -1\n var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n value = Math.abs(value)\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0\n e = eMax\n } else {\n e = Math.floor(Math.log(value) / Math.LN2)\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--\n c *= 2\n }\n if (e + eBias >= 1) {\n value += rt / c\n } else {\n value += rt * Math.pow(2, 1 - eBias)\n }\n if (value * c >= 2) {\n e++\n c /= 2\n }\n\n if (e + eBias >= eMax) {\n m = 0\n e = eMax\n } else if (e + eBias >= 1) {\n m = ((value * c) - 1) * Math.pow(2, mLen)\n e = e + eBias\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n e = 0\n }\n }\n\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n e = (e << mLen) | m\n eLen += mLen\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128\n}\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView');\n\nmodule.exports = DataView;\n","var hashClear = require('./_hashClear'),\n hashDelete = require('./_hashDelete'),\n hashGet = require('./_hashGet'),\n hashHas = require('./_hashHas'),\n hashSet = require('./_hashSet');\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\nmodule.exports = Hash;\n","var listCacheClear = require('./_listCacheClear'),\n listCacheDelete = require('./_listCacheDelete'),\n listCacheGet = require('./_listCacheGet'),\n listCacheHas = require('./_listCacheHas'),\n listCacheSet = require('./_listCacheSet');\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\nmodule.exports = ListCache;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map');\n\nmodule.exports = Map;\n","var mapCacheClear = require('./_mapCacheClear'),\n mapCacheDelete = require('./_mapCacheDelete'),\n mapCacheGet = require('./_mapCacheGet'),\n mapCacheHas = require('./_mapCacheHas'),\n mapCacheSet = require('./_mapCacheSet');\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\nmodule.exports = MapCache;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Promise = getNative(root, 'Promise');\n\nmodule.exports = Promise;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Set = getNative(root, 'Set');\n\nmodule.exports = Set;\n","var MapCache = require('./_MapCache'),\n setCacheAdd = require('./_setCacheAdd'),\n setCacheHas = require('./_setCacheHas');\n\n/**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\nfunction SetCache(values) {\n var index = -1,\n length = values == null ? 0 : values.length;\n\n this.__data__ = new MapCache;\n while (++index < length) {\n this.add(values[index]);\n }\n}\n\n// Add methods to `SetCache`.\nSetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\nSetCache.prototype.has = setCacheHas;\n\nmodule.exports = SetCache;\n","var ListCache = require('./_ListCache'),\n stackClear = require('./_stackClear'),\n stackDelete = require('./_stackDelete'),\n stackGet = require('./_stackGet'),\n stackHas = require('./_stackHas'),\n stackSet = require('./_stackSet');\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\nmodule.exports = Stack;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Uint8Array = root.Uint8Array;\n\nmodule.exports = Uint8Array;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar WeakMap = getNative(root, 'WeakMap');\n\nmodule.exports = WeakMap;\n","/**\n * A specialized version of `_.forEach` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\nfunction arrayEach(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (iteratee(array[index], index, array) === false) {\n break;\n }\n }\n return array;\n}\n\nmodule.exports = arrayEach;\n","/**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\nfunction arrayFilter(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result[resIndex++] = value;\n }\n }\n return result;\n}\n\nmodule.exports = arrayFilter;\n","var baseTimes = require('./_baseTimes'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isIndex = require('./_isIndex'),\n isTypedArray = require('./isTypedArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = arrayLikeKeys;\n","/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n}\n\nmodule.exports = arrayPush;\n","/**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\nfunction arraySome(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (predicate(array[index], index, array)) {\n return true;\n }\n }\n return false;\n}\n\nmodule.exports = arraySome;\n","var baseAssignValue = require('./_baseAssignValue'),\n eq = require('./eq');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\nmodule.exports = assignValue;\n","var eq = require('./eq');\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\nmodule.exports = assocIndexOf;\n","var copyObject = require('./_copyObject'),\n keys = require('./keys');\n\n/**\n * The base implementation of `_.assign` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssign(object, source) {\n return object && copyObject(source, keys(source), object);\n}\n\nmodule.exports = baseAssign;\n","var copyObject = require('./_copyObject'),\n keysIn = require('./keysIn');\n\n/**\n * The base implementation of `_.assignIn` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssignIn(object, source) {\n return object && copyObject(source, keysIn(source), object);\n}\n\nmodule.exports = baseAssignIn;\n","var defineProperty = require('./_defineProperty');\n\n/**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction baseAssignValue(object, key, value) {\n if (key == '__proto__' && defineProperty) {\n defineProperty(object, key, {\n 'configurable': true,\n 'enumerable': true,\n 'value': value,\n 'writable': true\n });\n } else {\n object[key] = value;\n }\n}\n\nmodule.exports = baseAssignValue;\n","var Stack = require('./_Stack'),\n arrayEach = require('./_arrayEach'),\n assignValue = require('./_assignValue'),\n baseAssign = require('./_baseAssign'),\n baseAssignIn = require('./_baseAssignIn'),\n cloneBuffer = require('./_cloneBuffer'),\n copyArray = require('./_copyArray'),\n copySymbols = require('./_copySymbols'),\n copySymbolsIn = require('./_copySymbolsIn'),\n getAllKeys = require('./_getAllKeys'),\n getAllKeysIn = require('./_getAllKeysIn'),\n getTag = require('./_getTag'),\n initCloneArray = require('./_initCloneArray'),\n initCloneByTag = require('./_initCloneByTag'),\n initCloneObject = require('./_initCloneObject'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isMap = require('./isMap'),\n isObject = require('./isObject'),\n isSet = require('./isSet'),\n keys = require('./keys'),\n keysIn = require('./keysIn');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_FLAT_FLAG = 2,\n CLONE_SYMBOLS_FLAG = 4;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values supported by `_.clone`. */\nvar cloneableTags = {};\ncloneableTags[argsTag] = cloneableTags[arrayTag] =\ncloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =\ncloneableTags[boolTag] = cloneableTags[dateTag] =\ncloneableTags[float32Tag] = cloneableTags[float64Tag] =\ncloneableTags[int8Tag] = cloneableTags[int16Tag] =\ncloneableTags[int32Tag] = cloneableTags[mapTag] =\ncloneableTags[numberTag] = cloneableTags[objectTag] =\ncloneableTags[regexpTag] = cloneableTags[setTag] =\ncloneableTags[stringTag] = cloneableTags[symbolTag] =\ncloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =\ncloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;\ncloneableTags[errorTag] = cloneableTags[funcTag] =\ncloneableTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.clone` and `_.cloneDeep` which tracks\n * traversed objects.\n *\n * @private\n * @param {*} value The value to clone.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Deep clone\n * 2 - Flatten inherited properties\n * 4 - Clone symbols\n * @param {Function} [customizer] The function to customize cloning.\n * @param {string} [key] The key of `value`.\n * @param {Object} [object] The parent object of `value`.\n * @param {Object} [stack] Tracks traversed objects and their clone counterparts.\n * @returns {*} Returns the cloned value.\n */\nfunction baseClone(value, bitmask, customizer, key, object, stack) {\n var result,\n isDeep = bitmask & CLONE_DEEP_FLAG,\n isFlat = bitmask & CLONE_FLAT_FLAG,\n isFull = bitmask & CLONE_SYMBOLS_FLAG;\n\n if (customizer) {\n result = object ? customizer(value, key, object, stack) : customizer(value);\n }\n if (result !== undefined) {\n return result;\n }\n if (!isObject(value)) {\n return value;\n }\n var isArr = isArray(value);\n if (isArr) {\n result = initCloneArray(value);\n if (!isDeep) {\n return copyArray(value, result);\n }\n } else {\n var tag = getTag(value),\n isFunc = tag == funcTag || tag == genTag;\n\n if (isBuffer(value)) {\n return cloneBuffer(value, isDeep);\n }\n if (tag == objectTag || tag == argsTag || (isFunc && !object)) {\n result = (isFlat || isFunc) ? {} : initCloneObject(value);\n if (!isDeep) {\n return isFlat\n ? copySymbolsIn(value, baseAssignIn(result, value))\n : copySymbols(value, baseAssign(result, value));\n }\n } else {\n if (!cloneableTags[tag]) {\n return object ? value : {};\n }\n result = initCloneByTag(value, tag, isDeep);\n }\n }\n // Check for circular references and return its corresponding clone.\n stack || (stack = new Stack);\n var stacked = stack.get(value);\n if (stacked) {\n return stacked;\n }\n stack.set(value, result);\n\n if (isSet(value)) {\n value.forEach(function(subValue) {\n result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));\n });\n } else if (isMap(value)) {\n value.forEach(function(subValue, key) {\n result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n }\n\n var keysFunc = isFull\n ? (isFlat ? getAllKeysIn : getAllKeys)\n : (isFlat ? keysIn : keys);\n\n var props = isArr ? undefined : keysFunc(value);\n arrayEach(props || value, function(subValue, key) {\n if (props) {\n key = subValue;\n subValue = value[key];\n }\n // Recursively populate clone (susceptible to call stack limits).\n assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n return result;\n}\n\nmodule.exports = baseClone;\n","var isObject = require('./isObject');\n\n/** Built-in value references. */\nvar objectCreate = Object.create;\n\n/**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} proto The object to inherit from.\n * @returns {Object} Returns the new object.\n */\nvar baseCreate = (function() {\n function object() {}\n return function(proto) {\n if (!isObject(proto)) {\n return {};\n }\n if (objectCreate) {\n return objectCreate(proto);\n }\n object.prototype = proto;\n var result = new object;\n object.prototype = undefined;\n return result;\n };\n}());\n\nmodule.exports = baseCreate;\n","var arrayPush = require('./_arrayPush'),\n isArray = require('./isArray');\n\n/**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction baseGetAllKeys(object, keysFunc, symbolsFunc) {\n var result = keysFunc(object);\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n}\n\nmodule.exports = baseGetAllKeys;\n","var Symbol = require('./_Symbol'),\n getRawTag = require('./_getRawTag'),\n objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]';\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\nmodule.exports = baseIsArguments;\n","var baseIsEqualDeep = require('./_baseIsEqualDeep'),\n isObjectLike = require('./isObjectLike');\n\n/**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Unordered comparison\n * 2 - Partial comparison\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\nfunction baseIsEqual(value, other, bitmask, customizer, stack) {\n if (value === other) {\n return true;\n }\n if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\n return value !== value && other !== other;\n }\n return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n}\n\nmodule.exports = baseIsEqual;\n","var Stack = require('./_Stack'),\n equalArrays = require('./_equalArrays'),\n equalByTag = require('./_equalByTag'),\n equalObjects = require('./_equalObjects'),\n getTag = require('./_getTag'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isTypedArray = require('./isTypedArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n var objIsArr = isArray(object),\n othIsArr = isArray(other),\n objTag = objIsArr ? arrayTag : getTag(object),\n othTag = othIsArr ? arrayTag : getTag(other);\n\n objTag = objTag == argsTag ? objectTag : objTag;\n othTag = othTag == argsTag ? objectTag : othTag;\n\n var objIsObj = objTag == objectTag,\n othIsObj = othTag == objectTag,\n isSameTag = objTag == othTag;\n\n if (isSameTag && isBuffer(object)) {\n if (!isBuffer(other)) {\n return false;\n }\n objIsArr = true;\n objIsObj = false;\n }\n if (isSameTag && !objIsObj) {\n stack || (stack = new Stack);\n return (objIsArr || isTypedArray(object))\n ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n }\n if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n if (objIsWrapped || othIsWrapped) {\n var objUnwrapped = objIsWrapped ? object.value() : object,\n othUnwrapped = othIsWrapped ? other.value() : other;\n\n stack || (stack = new Stack);\n return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n }\n }\n if (!isSameTag) {\n return false;\n }\n stack || (stack = new Stack);\n return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n}\n\nmodule.exports = baseIsEqualDeep;\n","var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]';\n\n/**\n * The base implementation of `_.isMap` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n */\nfunction baseIsMap(value) {\n return isObjectLike(value) && getTag(value) == mapTag;\n}\n\nmodule.exports = baseIsMap;\n","var isFunction = require('./isFunction'),\n isMasked = require('./_isMasked'),\n isObject = require('./isObject'),\n toSource = require('./_toSource');\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\nmodule.exports = baseIsNative;\n","var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar setTag = '[object Set]';\n\n/**\n * The base implementation of `_.isSet` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n */\nfunction baseIsSet(value) {\n return isObjectLike(value) && getTag(value) == setTag;\n}\n\nmodule.exports = baseIsSet;\n","var baseGetTag = require('./_baseGetTag'),\n isLength = require('./isLength'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n\nmodule.exports = baseIsTypedArray;\n","var isPrototype = require('./_isPrototype'),\n nativeKeys = require('./_nativeKeys');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeys;\n","var isObject = require('./isObject'),\n isPrototype = require('./_isPrototype'),\n nativeKeysIn = require('./_nativeKeysIn');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeysIn(object) {\n if (!isObject(object)) {\n return nativeKeysIn(object);\n }\n var isProto = isPrototype(object),\n result = [];\n\n for (var key in object) {\n if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeysIn;\n","/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\nmodule.exports = baseTimes;\n","/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n return function(value) {\n return func(value);\n };\n}\n\nmodule.exports = baseUnary;\n","/**\n * Checks if a `cache` value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction cacheHas(cache, key) {\n return cache.has(key);\n}\n\nmodule.exports = cacheHas;\n","var Uint8Array = require('./_Uint8Array');\n\n/**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\nfunction cloneArrayBuffer(arrayBuffer) {\n var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n return result;\n}\n\nmodule.exports = cloneArrayBuffer;\n","var root = require('./_root');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined,\n allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;\n\n/**\n * Creates a clone of `buffer`.\n *\n * @private\n * @param {Buffer} buffer The buffer to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Buffer} Returns the cloned buffer.\n */\nfunction cloneBuffer(buffer, isDeep) {\n if (isDeep) {\n return buffer.slice();\n }\n var length = buffer.length,\n result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\n\n buffer.copy(result);\n return result;\n}\n\nmodule.exports = cloneBuffer;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer');\n\n/**\n * Creates a clone of `dataView`.\n *\n * @private\n * @param {Object} dataView The data view to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned data view.\n */\nfunction cloneDataView(dataView, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;\n return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);\n}\n\nmodule.exports = cloneDataView;\n","/** Used to match `RegExp` flags from their coerced string values. */\nvar reFlags = /\\w*$/;\n\n/**\n * Creates a clone of `regexp`.\n *\n * @private\n * @param {Object} regexp The regexp to clone.\n * @returns {Object} Returns the cloned regexp.\n */\nfunction cloneRegExp(regexp) {\n var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));\n result.lastIndex = regexp.lastIndex;\n return result;\n}\n\nmodule.exports = cloneRegExp;\n","var Symbol = require('./_Symbol');\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * Creates a clone of the `symbol` object.\n *\n * @private\n * @param {Object} symbol The symbol object to clone.\n * @returns {Object} Returns the cloned symbol object.\n */\nfunction cloneSymbol(symbol) {\n return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};\n}\n\nmodule.exports = cloneSymbol;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer');\n\n/**\n * Creates a clone of `typedArray`.\n *\n * @private\n * @param {Object} typedArray The typed array to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned typed array.\n */\nfunction cloneTypedArray(typedArray, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n}\n\nmodule.exports = cloneTypedArray;\n","/**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\nfunction copyArray(source, array) {\n var index = -1,\n length = source.length;\n\n array || (array = Array(length));\n while (++index < length) {\n array[index] = source[index];\n }\n return array;\n}\n\nmodule.exports = copyArray;\n","var assignValue = require('./_assignValue'),\n baseAssignValue = require('./_baseAssignValue');\n\n/**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\nfunction copyObject(source, props, object, customizer) {\n var isNew = !object;\n object || (object = {});\n\n var index = -1,\n length = props.length;\n\n while (++index < length) {\n var key = props[index];\n\n var newValue = customizer\n ? customizer(object[key], source[key], key, object, source)\n : undefined;\n\n if (newValue === undefined) {\n newValue = source[key];\n }\n if (isNew) {\n baseAssignValue(object, key, newValue);\n } else {\n assignValue(object, key, newValue);\n }\n }\n return object;\n}\n\nmodule.exports = copyObject;\n","var copyObject = require('./_copyObject'),\n getSymbols = require('./_getSymbols');\n\n/**\n * Copies own symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbols(source, object) {\n return copyObject(source, getSymbols(source), object);\n}\n\nmodule.exports = copySymbols;\n","var copyObject = require('./_copyObject'),\n getSymbolsIn = require('./_getSymbolsIn');\n\n/**\n * Copies own and inherited symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbolsIn(source, object) {\n return copyObject(source, getSymbolsIn(source), object);\n}\n\nmodule.exports = copySymbolsIn;\n","var root = require('./_root');\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\nmodule.exports = coreJsData;\n","var getNative = require('./_getNative');\n\nvar defineProperty = (function() {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n}());\n\nmodule.exports = defineProperty;\n","var SetCache = require('./_SetCache'),\n arraySome = require('./_arraySome'),\n cacheHas = require('./_cacheHas');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\nfunction equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n arrLength = array.length,\n othLength = other.length;\n\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n return false;\n }\n // Check that cyclic values are equal.\n var arrStacked = stack.get(array);\n var othStacked = stack.get(other);\n if (arrStacked && othStacked) {\n return arrStacked == other && othStacked == array;\n }\n var index = -1,\n result = true,\n seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n stack.set(array, other);\n stack.set(other, array);\n\n // Ignore non-index properties.\n while (++index < arrLength) {\n var arrValue = array[index],\n othValue = other[index];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, arrValue, index, other, array, stack)\n : customizer(arrValue, othValue, index, array, other, stack);\n }\n if (compared !== undefined) {\n if (compared) {\n continue;\n }\n result = false;\n break;\n }\n // Recursively compare arrays (susceptible to call stack limits).\n if (seen) {\n if (!arraySome(other, function(othValue, othIndex) {\n if (!cacheHas(seen, othIndex) &&\n (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n return seen.push(othIndex);\n }\n })) {\n result = false;\n break;\n }\n } else if (!(\n arrValue === othValue ||\n equalFunc(arrValue, othValue, bitmask, customizer, stack)\n )) {\n result = false;\n break;\n }\n }\n stack['delete'](array);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalArrays;\n","var Symbol = require('./_Symbol'),\n Uint8Array = require('./_Uint8Array'),\n eq = require('./eq'),\n equalArrays = require('./_equalArrays'),\n mapToArray = require('./_mapToArray'),\n setToArray = require('./_setToArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]';\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n switch (tag) {\n case dataViewTag:\n if ((object.byteLength != other.byteLength) ||\n (object.byteOffset != other.byteOffset)) {\n return false;\n }\n object = object.buffer;\n other = other.buffer;\n\n case arrayBufferTag:\n if ((object.byteLength != other.byteLength) ||\n !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n return false;\n }\n return true;\n\n case boolTag:\n case dateTag:\n case numberTag:\n // Coerce booleans to `1` or `0` and dates to milliseconds.\n // Invalid dates are coerced to `NaN`.\n return eq(+object, +other);\n\n case errorTag:\n return object.name == other.name && object.message == other.message;\n\n case regexpTag:\n case stringTag:\n // Coerce regexes to strings and treat strings, primitives and objects,\n // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n // for more details.\n return object == (other + '');\n\n case mapTag:\n var convert = mapToArray;\n\n case setTag:\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n convert || (convert = setToArray);\n\n if (object.size != other.size && !isPartial) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked) {\n return stacked == other;\n }\n bitmask |= COMPARE_UNORDERED_FLAG;\n\n // Recursively compare objects (susceptible to call stack limits).\n stack.set(object, other);\n var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n stack['delete'](object);\n return result;\n\n case symbolTag:\n if (symbolValueOf) {\n return symbolValueOf.call(object) == symbolValueOf.call(other);\n }\n }\n return false;\n}\n\nmodule.exports = equalByTag;\n","var getAllKeys = require('./_getAllKeys');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n objProps = getAllKeys(object),\n objLength = objProps.length,\n othProps = getAllKeys(other),\n othLength = othProps.length;\n\n if (objLength != othLength && !isPartial) {\n return false;\n }\n var index = objLength;\n while (index--) {\n var key = objProps[index];\n if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n return false;\n }\n }\n // Check that cyclic values are equal.\n var objStacked = stack.get(object);\n var othStacked = stack.get(other);\n if (objStacked && othStacked) {\n return objStacked == other && othStacked == object;\n }\n var result = true;\n stack.set(object, other);\n stack.set(other, object);\n\n var skipCtor = isPartial;\n while (++index < objLength) {\n key = objProps[index];\n var objValue = object[key],\n othValue = other[key];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, objValue, key, other, object, stack)\n : customizer(objValue, othValue, key, object, other, stack);\n }\n // Recursively compare objects (susceptible to call stack limits).\n if (!(compared === undefined\n ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n : compared\n )) {\n result = false;\n break;\n }\n skipCtor || (skipCtor = key == 'constructor');\n }\n if (result && !skipCtor) {\n var objCtor = object.constructor,\n othCtor = other.constructor;\n\n // Non `Object` object instances with different constructors are not equal.\n if (objCtor != othCtor &&\n ('constructor' in object && 'constructor' in other) &&\n !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n result = false;\n }\n }\n stack['delete'](object);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalObjects;\n","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n","var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbols = require('./_getSymbols'),\n keys = require('./keys');\n\n/**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeys(object) {\n return baseGetAllKeys(object, keys, getSymbols);\n}\n\nmodule.exports = getAllKeys;\n","var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbolsIn = require('./_getSymbolsIn'),\n keysIn = require('./keysIn');\n\n/**\n * Creates an array of own and inherited enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeysIn(object) {\n return baseGetAllKeys(object, keysIn, getSymbolsIn);\n}\n\nmodule.exports = getAllKeysIn;\n","var isKeyable = require('./_isKeyable');\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\nmodule.exports = getMapData;\n","var baseIsNative = require('./_baseIsNative'),\n getValue = require('./_getValue');\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\nmodule.exports = getNative;\n","var overArg = require('./_overArg');\n\n/** Built-in value references. */\nvar getPrototype = overArg(Object.getPrototypeOf, Object);\n\nmodule.exports = getPrototype;\n","var Symbol = require('./_Symbol');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nmodule.exports = getRawTag;\n","var arrayFilter = require('./_arrayFilter'),\n stubArray = require('./stubArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n if (object == null) {\n return [];\n }\n object = Object(object);\n return arrayFilter(nativeGetSymbols(object), function(symbol) {\n return propertyIsEnumerable.call(object, symbol);\n });\n};\n\nmodule.exports = getSymbols;\n","var arrayPush = require('./_arrayPush'),\n getPrototype = require('./_getPrototype'),\n getSymbols = require('./_getSymbols'),\n stubArray = require('./stubArray');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own and inherited enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {\n var result = [];\n while (object) {\n arrayPush(result, getSymbols(object));\n object = getPrototype(object);\n }\n return result;\n};\n\nmodule.exports = getSymbolsIn;\n","var DataView = require('./_DataView'),\n Map = require('./_Map'),\n Promise = require('./_Promise'),\n Set = require('./_Set'),\n WeakMap = require('./_WeakMap'),\n baseGetTag = require('./_baseGetTag'),\n toSource = require('./_toSource');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n setTag = '[object Set]',\n weakMapTag = '[object WeakMap]';\n\nvar dataViewTag = '[object DataView]';\n\n/** Used to detect maps, sets, and weakmaps. */\nvar dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nvar getTag = baseGetTag;\n\n// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\nif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = baseGetTag(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : '';\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n}\n\nmodule.exports = getTag;\n","/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\nmodule.exports = getValue;\n","var nativeCreate = require('./_nativeCreate');\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n}\n\nmodule.exports = hashClear;\n","/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = hashDelete;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\nmodule.exports = hashGet;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\nmodule.exports = hashHas;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\nmodule.exports = hashSet;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Initializes an array clone.\n *\n * @private\n * @param {Array} array The array to clone.\n * @returns {Array} Returns the initialized clone.\n */\nfunction initCloneArray(array) {\n var length = array.length,\n result = new array.constructor(length);\n\n // Add properties assigned by `RegExp#exec`.\n if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {\n result.index = array.index;\n result.input = array.input;\n }\n return result;\n}\n\nmodule.exports = initCloneArray;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer'),\n cloneDataView = require('./_cloneDataView'),\n cloneRegExp = require('./_cloneRegExp'),\n cloneSymbol = require('./_cloneSymbol'),\n cloneTypedArray = require('./_cloneTypedArray');\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/**\n * Initializes an object clone based on its `toStringTag`.\n *\n * **Note:** This function only supports cloning values with tags of\n * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.\n *\n * @private\n * @param {Object} object The object to clone.\n * @param {string} tag The `toStringTag` of the object to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneByTag(object, tag, isDeep) {\n var Ctor = object.constructor;\n switch (tag) {\n case arrayBufferTag:\n return cloneArrayBuffer(object);\n\n case boolTag:\n case dateTag:\n return new Ctor(+object);\n\n case dataViewTag:\n return cloneDataView(object, isDeep);\n\n case float32Tag: case float64Tag:\n case int8Tag: case int16Tag: case int32Tag:\n case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:\n return cloneTypedArray(object, isDeep);\n\n case mapTag:\n return new Ctor;\n\n case numberTag:\n case stringTag:\n return new Ctor(object);\n\n case regexpTag:\n return cloneRegExp(object);\n\n case setTag:\n return new Ctor;\n\n case symbolTag:\n return cloneSymbol(object);\n }\n}\n\nmodule.exports = initCloneByTag;\n","var baseCreate = require('./_baseCreate'),\n getPrototype = require('./_getPrototype'),\n isPrototype = require('./_isPrototype');\n\n/**\n * Initializes an object clone.\n *\n * @private\n * @param {Object} object The object to clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneObject(object) {\n return (typeof object.constructor == 'function' && !isPrototype(object))\n ? baseCreate(getPrototype(object))\n : {};\n}\n\nmodule.exports = initCloneObject;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n var type = typeof value;\n length = length == null ? MAX_SAFE_INTEGER : length;\n\n return !!length &&\n (type == 'number' ||\n (type != 'symbol' && reIsUint.test(value))) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\nmodule.exports = isIndex;\n","/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\nmodule.exports = isKeyable;\n","var coreJsData = require('./_coreJsData');\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\nmodule.exports = isMasked;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\nmodule.exports = isPrototype;\n","/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n}\n\nmodule.exports = listCacheClear;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype;\n\n/** Built-in value references. */\nvar splice = arrayProto.splice;\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n}\n\nmodule.exports = listCacheDelete;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\nmodule.exports = listCacheGet;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\nmodule.exports = listCacheHas;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\nmodule.exports = listCacheSet;\n","var Hash = require('./_Hash'),\n ListCache = require('./_ListCache'),\n Map = require('./_Map');\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\nmodule.exports = mapCacheClear;\n","var getMapData = require('./_getMapData');\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = mapCacheDelete;\n","var getMapData = require('./_getMapData');\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\nmodule.exports = mapCacheGet;\n","var getMapData = require('./_getMapData');\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\nmodule.exports = mapCacheHas;\n","var getMapData = require('./_getMapData');\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n}\n\nmodule.exports = mapCacheSet;\n","/**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\nfunction mapToArray(map) {\n var index = -1,\n result = Array(map.size);\n\n map.forEach(function(value, key) {\n result[++index] = [key, value];\n });\n return result;\n}\n\nmodule.exports = mapToArray;\n","var getNative = require('./_getNative');\n\n/* Built-in method references that are verified to be native. */\nvar nativeCreate = getNative(Object, 'create');\n\nmodule.exports = nativeCreate;\n","var overArg = require('./_overArg');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeKeys = overArg(Object.keys, Object);\n\nmodule.exports = nativeKeys;\n","/**\n * This function is like\n * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * except that it includes inherited enumerable properties.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction nativeKeysIn(object) {\n var result = [];\n if (object != null) {\n for (var key in Object(object)) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = nativeKeysIn;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n try {\n // Use `util.types` for Node.js 10+.\n var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n if (types) {\n return types;\n }\n\n // Legacy `process.binding('util')` for Node.js < 10.\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n}());\n\nmodule.exports = nodeUtil;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n","/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\nmodule.exports = overArg;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n","/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\nfunction setCacheAdd(value) {\n this.__data__.set(value, HASH_UNDEFINED);\n return this;\n}\n\nmodule.exports = setCacheAdd;\n","/**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\nfunction setCacheHas(value) {\n return this.__data__.has(value);\n}\n\nmodule.exports = setCacheHas;\n","/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\nfunction setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n}\n\nmodule.exports = setToArray;\n","var ListCache = require('./_ListCache');\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}\n\nmodule.exports = stackClear;\n","/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n var data = this.__data__,\n result = data['delete'](key);\n\n this.size = data.size;\n return result;\n}\n\nmodule.exports = stackDelete;\n","/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n return this.__data__.get(key);\n}\n\nmodule.exports = stackGet;\n","/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n return this.__data__.has(key);\n}\n\nmodule.exports = stackHas;\n","var ListCache = require('./_ListCache'),\n Map = require('./_Map'),\n MapCache = require('./_MapCache');\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n var data = this.__data__;\n if (data instanceof ListCache) {\n var pairs = data.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n this.size = ++data.size;\n return this;\n }\n data = this.__data__ = new MapCache(pairs);\n }\n data.set(key, value);\n this.size = data.size;\n return this;\n}\n\nmodule.exports = stackSet;\n","/** Used for built-in method references. */\nvar funcProto = Function.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\nmodule.exports = toSource;\n","var baseClone = require('./_baseClone');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_SYMBOLS_FLAG = 4;\n\n/**\n * This method is like `_.clone` except that it recursively clones `value`.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Lang\n * @param {*} value The value to recursively clone.\n * @returns {*} Returns the deep cloned value.\n * @see _.clone\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var deep = _.cloneDeep(objects);\n * console.log(deep[0] === objects[0]);\n * // => false\n */\nfunction cloneDeep(value) {\n return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);\n}\n\nmodule.exports = cloneDeep;\n","/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\nmodule.exports = eq;\n","var baseIsArguments = require('./_baseIsArguments'),\n isObjectLike = require('./isObjectLike');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n};\n\nmodule.exports = isArguments;\n","/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\nmodule.exports = isArray;\n","var isFunction = require('./isFunction'),\n isLength = require('./isLength');\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\nmodule.exports = isArrayLike;\n","var root = require('./_root'),\n stubFalse = require('./stubFalse');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\nmodule.exports = isBuffer;\n","var baseIsEqual = require('./_baseIsEqual');\n\n/**\n * Performs a deep comparison between two values to determine if they are\n * equivalent.\n *\n * **Note:** This method supports comparing arrays, array buffers, booleans,\n * date objects, error objects, maps, numbers, `Object` objects, regexes,\n * sets, strings, symbols, and typed arrays. `Object` objects are compared\n * by their own, not inherited, enumerable properties. Functions and DOM\n * nodes are compared by strict equality, i.e. `===`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.isEqual(object, other);\n * // => true\n *\n * object === other;\n * // => false\n */\nfunction isEqual(value, other) {\n return baseIsEqual(value, other);\n}\n\nmodule.exports = isEqual;\n","var baseGetTag = require('./_baseGetTag'),\n isObject = require('./isObject');\n\n/** `Object#toString` result references. */\nvar asyncTag = '[object AsyncFunction]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n proxyTag = '[object Proxy]';\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\nmodule.exports = isFunction;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\nmodule.exports = isLength;\n","var baseIsMap = require('./_baseIsMap'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsMap = nodeUtil && nodeUtil.isMap;\n\n/**\n * Checks if `value` is classified as a `Map` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n * @example\n *\n * _.isMap(new Map);\n * // => true\n *\n * _.isMap(new WeakMap);\n * // => false\n */\nvar isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;\n\nmodule.exports = isMap;\n","/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n","var baseIsSet = require('./_baseIsSet'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsSet = nodeUtil && nodeUtil.isSet;\n\n/**\n * Checks if `value` is classified as a `Set` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n * @example\n *\n * _.isSet(new Set);\n * // => true\n *\n * _.isSet(new WeakSet);\n * // => false\n */\nvar isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;\n\nmodule.exports = isSet;\n","var baseIsTypedArray = require('./_baseIsTypedArray'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\nmodule.exports = isTypedArray;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeys = require('./_baseKeys'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\nmodule.exports = keys;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeysIn = require('./_baseKeysIn'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\nfunction keysIn(object) {\n return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n}\n\nmodule.exports = keysIn;\n","/**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\nfunction stubArray() {\n return [];\n}\n\nmodule.exports = stubArray;\n","/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n return false;\n}\n\nmodule.exports = stubFalse;\n","export { default as v1 } from './v1.js';\nexport { default as v3 } from './v3.js';\nexport { default as v4 } from './v4.js';\nexport { default as v5 } from './v5.js';\nexport { default as NIL } from './nil.js';\nexport { default as version } from './version.js';\nexport { default as validate } from './validate.js';\nexport { default as stringify } from './stringify.js';\nexport { default as parse } from './parse.js';","/*\n * Browser-compatible JavaScript MD5\n *\n * Modification of JavaScript MD5\n * https://github.com/blueimp/JavaScript-MD5\n *\n * Copyright 2011, Sebastian Tschan\n * https://blueimp.net\n *\n * Licensed under the MIT license:\n * https://opensource.org/licenses/MIT\n *\n * Based on\n * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message\n * Digest Algorithm, as defined in RFC 1321.\n * Version 2.2 Copyright (C) Paul Johnston 1999 - 2009\n * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet\n * Distributed under the BSD License\n * See http://pajhome.org.uk/crypt/md5 for more info.\n */\nfunction md5(bytes) {\n if (typeof bytes === 'string') {\n var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape\n\n bytes = new Uint8Array(msg.length);\n\n for (var i = 0; i < msg.length; ++i) {\n bytes[i] = msg.charCodeAt(i);\n }\n }\n\n return md5ToHexEncodedArray(wordsToMd5(bytesToWords(bytes), bytes.length * 8));\n}\n/*\n * Convert an array of little-endian words to an array of bytes\n */\n\n\nfunction md5ToHexEncodedArray(input) {\n var output = [];\n var length32 = input.length * 32;\n var hexTab = '0123456789abcdef';\n\n for (var i = 0; i < length32; i += 8) {\n var x = input[i >> 5] >>> i % 32 & 0xff;\n var hex = parseInt(hexTab.charAt(x >>> 4 & 0x0f) + hexTab.charAt(x & 0x0f), 16);\n output.push(hex);\n }\n\n return output;\n}\n/**\n * Calculate output length with padding and bit length\n */\n\n\nfunction getOutputLength(inputLength8) {\n return (inputLength8 + 64 >>> 9 << 4) + 14 + 1;\n}\n/*\n * Calculate the MD5 of an array of little-endian words, and a bit length.\n */\n\n\nfunction wordsToMd5(x, len) {\n /* append padding */\n x[len >> 5] |= 0x80 << len % 32;\n x[getOutputLength(len) - 1] = len;\n var a = 1732584193;\n var b = -271733879;\n var c = -1732584194;\n var d = 271733878;\n\n for (var i = 0; i < x.length; i += 16) {\n var olda = a;\n var oldb = b;\n var oldc = c;\n var oldd = d;\n a = md5ff(a, b, c, d, x[i], 7, -680876936);\n d = md5ff(d, a, b, c, x[i + 1], 12, -389564586);\n c = md5ff(c, d, a, b, x[i + 2], 17, 606105819);\n b = md5ff(b, c, d, a, x[i + 3], 22, -1044525330);\n a = md5ff(a, b, c, d, x[i + 4], 7, -176418897);\n d = md5ff(d, a, b, c, x[i + 5], 12, 1200080426);\n c = md5ff(c, d, a, b, x[i + 6], 17, -1473231341);\n b = md5ff(b, c, d, a, x[i + 7], 22, -45705983);\n a = md5ff(a, b, c, d, x[i + 8], 7, 1770035416);\n d = md5ff(d, a, b, c, x[i + 9], 12, -1958414417);\n c = md5ff(c, d, a, b, x[i + 10], 17, -42063);\n b = md5ff(b, c, d, a, x[i + 11], 22, -1990404162);\n a = md5ff(a, b, c, d, x[i + 12], 7, 1804603682);\n d = md5ff(d, a, b, c, x[i + 13], 12, -40341101);\n c = md5ff(c, d, a, b, x[i + 14], 17, -1502002290);\n b = md5ff(b, c, d, a, x[i + 15], 22, 1236535329);\n a = md5gg(a, b, c, d, x[i + 1], 5, -165796510);\n d = md5gg(d, a, b, c, x[i + 6], 9, -1069501632);\n c = md5gg(c, d, a, b, x[i + 11], 14, 643717713);\n b = md5gg(b, c, d, a, x[i], 20, -373897302);\n a = md5gg(a, b, c, d, x[i + 5], 5, -701558691);\n d = md5gg(d, a, b, c, x[i + 10], 9, 38016083);\n c = md5gg(c, d, a, b, x[i + 15], 14, -660478335);\n b = md5gg(b, c, d, a, x[i + 4], 20, -405537848);\n a = md5gg(a, b, c, d, x[i + 9], 5, 568446438);\n d = md5gg(d, a, b, c, x[i + 14], 9, -1019803690);\n c = md5gg(c, d, a, b, x[i + 3], 14, -187363961);\n b = md5gg(b, c, d, a, x[i + 8], 20, 1163531501);\n a = md5gg(a, b, c, d, x[i + 13], 5, -1444681467);\n d = md5gg(d, a, b, c, x[i + 2], 9, -51403784);\n c = md5gg(c, d, a, b, x[i + 7], 14, 1735328473);\n b = md5gg(b, c, d, a, x[i + 12], 20, -1926607734);\n a = md5hh(a, b, c, d, x[i + 5], 4, -378558);\n d = md5hh(d, a, b, c, x[i + 8], 11, -2022574463);\n c = md5hh(c, d, a, b, x[i + 11], 16, 1839030562);\n b = md5hh(b, c, d, a, x[i + 14], 23, -35309556);\n a = md5hh(a, b, c, d, x[i + 1], 4, -1530992060);\n d = md5hh(d, a, b, c, x[i + 4], 11, 1272893353);\n c = md5hh(c, d, a, b, x[i + 7], 16, -155497632);\n b = md5hh(b, c, d, a, x[i + 10], 23, -1094730640);\n a = md5hh(a, b, c, d, x[i + 13], 4, 681279174);\n d = md5hh(d, a, b, c, x[i], 11, -358537222);\n c = md5hh(c, d, a, b, x[i + 3], 16, -722521979);\n b = md5hh(b, c, d, a, x[i + 6], 23, 76029189);\n a = md5hh(a, b, c, d, x[i + 9], 4, -640364487);\n d = md5hh(d, a, b, c, x[i + 12], 11, -421815835);\n c = md5hh(c, d, a, b, x[i + 15], 16, 530742520);\n b = md5hh(b, c, d, a, x[i + 2], 23, -995338651);\n a = md5ii(a, b, c, d, x[i], 6, -198630844);\n d = md5ii(d, a, b, c, x[i + 7], 10, 1126891415);\n c = md5ii(c, d, a, b, x[i + 14], 15, -1416354905);\n b = md5ii(b, c, d, a, x[i + 5], 21, -57434055);\n a = md5ii(a, b, c, d, x[i + 12], 6, 1700485571);\n d = md5ii(d, a, b, c, x[i + 3], 10, -1894986606);\n c = md5ii(c, d, a, b, x[i + 10], 15, -1051523);\n b = md5ii(b, c, d, a, x[i + 1], 21, -2054922799);\n a = md5ii(a, b, c, d, x[i + 8], 6, 1873313359);\n d = md5ii(d, a, b, c, x[i + 15], 10, -30611744);\n c = md5ii(c, d, a, b, x[i + 6], 15, -1560198380);\n b = md5ii(b, c, d, a, x[i + 13], 21, 1309151649);\n a = md5ii(a, b, c, d, x[i + 4], 6, -145523070);\n d = md5ii(d, a, b, c, x[i + 11], 10, -1120210379);\n c = md5ii(c, d, a, b, x[i + 2], 15, 718787259);\n b = md5ii(b, c, d, a, x[i + 9], 21, -343485551);\n a = safeAdd(a, olda);\n b = safeAdd(b, oldb);\n c = safeAdd(c, oldc);\n d = safeAdd(d, oldd);\n }\n\n return [a, b, c, d];\n}\n/*\n * Convert an array bytes to an array of little-endian words\n * Characters >255 have their high-byte silently ignored.\n */\n\n\nfunction bytesToWords(input) {\n if (input.length === 0) {\n return [];\n }\n\n var length8 = input.length * 8;\n var output = new Uint32Array(getOutputLength(length8));\n\n for (var i = 0; i < length8; i += 8) {\n output[i >> 5] |= (input[i / 8] & 0xff) << i % 32;\n }\n\n return output;\n}\n/*\n * Add integers, wrapping at 2^32. This uses 16-bit operations internally\n * to work around bugs in some JS interpreters.\n */\n\n\nfunction safeAdd(x, y) {\n var lsw = (x & 0xffff) + (y & 0xffff);\n var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n return msw << 16 | lsw & 0xffff;\n}\n/*\n * Bitwise rotate a 32-bit number to the left.\n */\n\n\nfunction bitRotateLeft(num, cnt) {\n return num << cnt | num >>> 32 - cnt;\n}\n/*\n * These functions implement the four basic operations the algorithm uses.\n */\n\n\nfunction md5cmn(q, a, b, x, s, t) {\n return safeAdd(bitRotateLeft(safeAdd(safeAdd(a, q), safeAdd(x, t)), s), b);\n}\n\nfunction md5ff(a, b, c, d, x, s, t) {\n return md5cmn(b & c | ~b & d, a, b, x, s, t);\n}\n\nfunction md5gg(a, b, c, d, x, s, t) {\n return md5cmn(b & d | c & ~d, a, b, x, s, t);\n}\n\nfunction md5hh(a, b, c, d, x, s, t) {\n return md5cmn(b ^ c ^ d, a, b, x, s, t);\n}\n\nfunction md5ii(a, b, c, d, x, s, t) {\n return md5cmn(c ^ (b | ~d), a, b, x, s, t);\n}\n\nexport default md5;","export default '00000000-0000-0000-0000-000000000000';","import validate from './validate.js';\n\nfunction parse(uuid) {\n if (!validate(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n var v;\n var arr = new Uint8Array(16); // Parse ########-....-....-....-............\n\n arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24;\n arr[1] = v >>> 16 & 0xff;\n arr[2] = v >>> 8 & 0xff;\n arr[3] = v & 0xff; // Parse ........-####-....-....-............\n\n arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8;\n arr[5] = v & 0xff; // Parse ........-....-####-....-............\n\n arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8;\n arr[7] = v & 0xff; // Parse ........-....-....-####-............\n\n arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8;\n arr[9] = v & 0xff; // Parse ........-....-....-....-############\n // (Use \"/\" to avoid 32-bit truncation when bit-shifting high-order bytes)\n\n arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff;\n arr[11] = v / 0x100000000 & 0xff;\n arr[12] = v >>> 24 & 0xff;\n arr[13] = v >>> 16 & 0xff;\n arr[14] = v >>> 8 & 0xff;\n arr[15] = v & 0xff;\n return arr;\n}\n\nexport default parse;","export default /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;","// Unique ID creation requires a high quality random # generator. In the browser we therefore\n// require the crypto API and do not support built-in fallback to lower quality random number\n// generators (like Math.random()).\nvar getRandomValues;\nvar rnds8 = new Uint8Array(16);\nexport default function rng() {\n // lazy load so that environments that need to polyfill have a chance to do so\n if (!getRandomValues) {\n // getRandomValues needs to be invoked in a context where \"this\" is a Crypto implementation. Also,\n // find the complete implementation of crypto (msCrypto) on IE11.\n getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto !== 'undefined' && typeof msCrypto.getRandomValues === 'function' && msCrypto.getRandomValues.bind(msCrypto);\n\n if (!getRandomValues) {\n throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');\n }\n }\n\n return getRandomValues(rnds8);\n}","// Adapted from Chris Veness' SHA1 code at\n// http://www.movable-type.co.uk/scripts/sha1.html\nfunction f(s, x, y, z) {\n switch (s) {\n case 0:\n return x & y ^ ~x & z;\n\n case 1:\n return x ^ y ^ z;\n\n case 2:\n return x & y ^ x & z ^ y & z;\n\n case 3:\n return x ^ y ^ z;\n }\n}\n\nfunction ROTL(x, n) {\n return x << n | x >>> 32 - n;\n}\n\nfunction sha1(bytes) {\n var K = [0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xca62c1d6];\n var H = [0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0];\n\n if (typeof bytes === 'string') {\n var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape\n\n bytes = [];\n\n for (var i = 0; i < msg.length; ++i) {\n bytes.push(msg.charCodeAt(i));\n }\n } else if (!Array.isArray(bytes)) {\n // Convert Array-like to Array\n bytes = Array.prototype.slice.call(bytes);\n }\n\n bytes.push(0x80);\n var l = bytes.length / 4 + 2;\n var N = Math.ceil(l / 16);\n var M = new Array(N);\n\n for (var _i = 0; _i < N; ++_i) {\n var arr = new Uint32Array(16);\n\n for (var j = 0; j < 16; ++j) {\n arr[j] = bytes[_i * 64 + j * 4] << 24 | bytes[_i * 64 + j * 4 + 1] << 16 | bytes[_i * 64 + j * 4 + 2] << 8 | bytes[_i * 64 + j * 4 + 3];\n }\n\n M[_i] = arr;\n }\n\n M[N - 1][14] = (bytes.length - 1) * 8 / Math.pow(2, 32);\n M[N - 1][14] = Math.floor(M[N - 1][14]);\n M[N - 1][15] = (bytes.length - 1) * 8 & 0xffffffff;\n\n for (var _i2 = 0; _i2 < N; ++_i2) {\n var W = new Uint32Array(80);\n\n for (var t = 0; t < 16; ++t) {\n W[t] = M[_i2][t];\n }\n\n for (var _t = 16; _t < 80; ++_t) {\n W[_t] = ROTL(W[_t - 3] ^ W[_t - 8] ^ W[_t - 14] ^ W[_t - 16], 1);\n }\n\n var a = H[0];\n var b = H[1];\n var c = H[2];\n var d = H[3];\n var e = H[4];\n\n for (var _t2 = 0; _t2 < 80; ++_t2) {\n var s = Math.floor(_t2 / 20);\n var T = ROTL(a, 5) + f(s, b, c, d) + e + K[s] + W[_t2] >>> 0;\n e = d;\n d = c;\n c = ROTL(b, 30) >>> 0;\n b = a;\n a = T;\n }\n\n H[0] = H[0] + a >>> 0;\n H[1] = H[1] + b >>> 0;\n H[2] = H[2] + c >>> 0;\n H[3] = H[3] + d >>> 0;\n H[4] = H[4] + e >>> 0;\n }\n\n return [H[0] >> 24 & 0xff, H[0] >> 16 & 0xff, H[0] >> 8 & 0xff, H[0] & 0xff, H[1] >> 24 & 0xff, H[1] >> 16 & 0xff, H[1] >> 8 & 0xff, H[1] & 0xff, H[2] >> 24 & 0xff, H[2] >> 16 & 0xff, H[2] >> 8 & 0xff, H[2] & 0xff, H[3] >> 24 & 0xff, H[3] >> 16 & 0xff, H[3] >> 8 & 0xff, H[3] & 0xff, H[4] >> 24 & 0xff, H[4] >> 16 & 0xff, H[4] >> 8 & 0xff, H[4] & 0xff];\n}\n\nexport default sha1;","import validate from './validate.js';\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\n\nvar byteToHex = [];\n\nfor (var i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).substr(1));\n}\n\nfunction stringify(arr) {\n var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n var uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!validate(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n\n return uuid;\n}\n\nexport default stringify;","import rng from './rng.js';\nimport stringify from './stringify.js'; // **`v1()` - Generate time-based UUID**\n//\n// Inspired by https://github.com/LiosK/UUID.js\n// and http://docs.python.org/library/uuid.html\n\nvar _nodeId;\n\nvar _clockseq; // Previous uuid creation time\n\n\nvar _lastMSecs = 0;\nvar _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details\n\nfunction v1(options, buf, offset) {\n var i = buf && offset || 0;\n var b = buf || new Array(16);\n options = options || {};\n var node = options.node || _nodeId;\n var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not\n // specified. We do this lazily to minimize issues related to insufficient\n // system entropy. See #189\n\n if (node == null || clockseq == null) {\n var seedBytes = options.random || (options.rng || rng)();\n\n if (node == null) {\n // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)\n node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]];\n }\n\n if (clockseq == null) {\n // Per 4.2.2, randomize (14 bit) clockseq\n clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;\n }\n } // UUID timestamps are 100 nano-second units since the Gregorian epoch,\n // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so\n // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'\n // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.\n\n\n var msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock\n // cycle to simulate higher resolution clock\n\n var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs)\n\n var dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression\n\n if (dt < 0 && options.clockseq === undefined) {\n clockseq = clockseq + 1 & 0x3fff;\n } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new\n // time interval\n\n\n if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {\n nsecs = 0;\n } // Per 4.2.1.2 Throw error if too many uuids are requested\n\n\n if (nsecs >= 10000) {\n throw new Error(\"uuid.v1(): Can't create more than 10M uuids/sec\");\n }\n\n _lastMSecs = msecs;\n _lastNSecs = nsecs;\n _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch\n\n msecs += 12219292800000; // `time_low`\n\n var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;\n b[i++] = tl >>> 24 & 0xff;\n b[i++] = tl >>> 16 & 0xff;\n b[i++] = tl >>> 8 & 0xff;\n b[i++] = tl & 0xff; // `time_mid`\n\n var tmh = msecs / 0x100000000 * 10000 & 0xfffffff;\n b[i++] = tmh >>> 8 & 0xff;\n b[i++] = tmh & 0xff; // `time_high_and_version`\n\n b[i++] = tmh >>> 24 & 0xf | 0x10; // include version\n\n b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)\n\n b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low`\n\n b[i++] = clockseq & 0xff; // `node`\n\n for (var n = 0; n < 6; ++n) {\n b[i + n] = node[n];\n }\n\n return buf || stringify(b);\n}\n\nexport default v1;","import v35 from './v35.js';\nimport md5 from './md5.js';\nvar v3 = v35('v3', 0x30, md5);\nexport default v3;","import stringify from './stringify.js';\nimport parse from './parse.js';\n\nfunction stringToBytes(str) {\n str = unescape(encodeURIComponent(str)); // UTF8 escape\n\n var bytes = [];\n\n for (var i = 0; i < str.length; ++i) {\n bytes.push(str.charCodeAt(i));\n }\n\n return bytes;\n}\n\nexport var DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8';\nexport var URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8';\nexport default function (name, version, hashfunc) {\n function generateUUID(value, namespace, buf, offset) {\n if (typeof value === 'string') {\n value = stringToBytes(value);\n }\n\n if (typeof namespace === 'string') {\n namespace = parse(namespace);\n }\n\n if (namespace.length !== 16) {\n throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)');\n } // Compute hash of namespace and value, Per 4.3\n // Future: Use spread syntax when supported on all platforms, e.g. `bytes =\n // hashfunc([...namespace, ... value])`\n\n\n var bytes = new Uint8Array(16 + value.length);\n bytes.set(namespace);\n bytes.set(value, namespace.length);\n bytes = hashfunc(bytes);\n bytes[6] = bytes[6] & 0x0f | version;\n bytes[8] = bytes[8] & 0x3f | 0x80;\n\n if (buf) {\n offset = offset || 0;\n\n for (var i = 0; i < 16; ++i) {\n buf[offset + i] = bytes[i];\n }\n\n return buf;\n }\n\n return stringify(bytes);\n } // Function#name is not settable on some platforms (#270)\n\n\n try {\n generateUUID.name = name; // eslint-disable-next-line no-empty\n } catch (err) {} // For CommonJS default export support\n\n\n generateUUID.DNS = DNS;\n generateUUID.URL = URL;\n return generateUUID;\n}","import rng from './rng.js';\nimport stringify from './stringify.js';\n\nfunction v4(options, buf, offset) {\n options = options || {};\n var rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n offset = offset || 0;\n\n for (var i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n\n return buf;\n }\n\n return stringify(rnds);\n}\n\nexport default v4;","import v35 from './v35.js';\nimport sha1 from './sha1.js';\nvar v5 = v35('v5', 0x50, sha1);\nexport default v5;","import REGEX from './regex.js';\n\nfunction validate(uuid) {\n return typeof uuid === 'string' && REGEX.test(uuid);\n}\n\nexport default validate;","import validate from './validate.js';\n\nfunction version(uuid) {\n if (!validate(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n return parseInt(uuid.substr(14, 1), 16);\n}\n\nexport default version;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = (module) => {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","import { type WebLayoutSnapshot, connect } from \"@openfin/core-web\";\n\n/**\n * Gets the default layout for this app.\n * @returns The default layout for this app.\n */\nasync function getDefaultLayout(): Promise {\n\tconst layoutResponse = await fetch(\"http://localhost:6060/layouts/default.layout.fin.json\");\n\tconst layoutJson = (await layoutResponse.json()) as WebLayoutSnapshot;\n\treturn layoutJson;\n}\n/**\n * Initializes the OpenFin Web Broker connection.\n */\nasync function init(): Promise {\n\t// Get the default layout\n\tconst layoutSnapshot = await getDefaultLayout();\n\n\tif (layoutSnapshot === undefined) {\n\t\tconsole.error(\"Unable to run the sample as we have been unable to load the default snapshot.\");\n\t\treturn;\n\t}\n\t// Get the dom element that should host the layout\n\tconst layoutContainer = document.querySelector(\"#layout_container\");\n\tif (layoutContainer === null) {\n\t\tconsole.error(\n\t\t\t\"Please ensure the document has an element with the following id #layout_container so that the web-layout can be applied.\"\n\t\t);\n\t\treturn;\n\t}\n\t// Connect to the OpenFin Web Broker and pass the default layout.\n\t// It is good practice to specify providerId even if content is explicitly specifying it for cases where\n\t// this provider uses our layout system and content uses inheritance. currentContextGroup\n\t// is useful for defaulting any client that uses inheritance through our layout system.\n\tconst fin = await connect({\n\t\tconnectionInheritance: \"enabled\",\n\t\toptions: {\n\t\t\tbrokerUrl: \"http://localhost:6060/platform/iframe-broker.html\",\n\t\t\tinteropConfig: {\n\t\t\t\tproviderId: \"web-layout-basic\",\n\t\t\t\tcurrentContextGroup: \"green\"\n\t\t\t}\n\t\t},\n\t\tplatform: { layoutSnapshot }\n\t});\n\n\t// You may now use the `fin` object to initialize the broker and the layout.\n\tawait fin.Interop.init(\"web-layout-basic\");\n\t// initialize the layout and pass it the dom element to bind to\n\tawait fin.Platform.Layout.init({\n\t\tcontainer: layoutContainer\n\t});\n}\n\ninit()\n\t.then(() => {\n\t\tconsole.log(\"Created the OpenFin Web Layout.\");\n\t\treturn true;\n\t})\n\t.catch((err) => console.error(err));\n"],"names":[],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"provider.bundle.js","mappings":";;;;;;;;;;AAAa,MAAM,mBAAO,CAAC,qFAAoB,EAAE,mBAAO,CAAC,mDAAS,EAAE,mBAAO,CAAC,+DAAM,EAAE,mBAAO,CAAC,mDAAQ,EAAE,mBAAO,CAAC,gEAAkB,EAAE,mBAAO,CAAC,4DAAgB,EAAE,eAAe;;;;;;;;;;;;ACA9J,MAAM,mBAAO,CAAC,mDAAS,IAAI,mBAAO,CAAC,mDAAQ,IAAI,mBAAO,CAAC,gEAAkB,IAAI,mBAAO,CAAC,4DAAgB,IAAI,mBAAO,CAAC,+DAAM,EAAE,kBAAkB,EAAE,GAAG,wBAAwB,GAAG,sGAAsG,qBAAM,CAAC,qBAAM,iCAAiC,KAAK,KAAK,KAAK,MAAM,oBAAoB,WAAW,kBAAkB,kBAAkB,UAAU,SAAS,sCAAsC,SAAS,sFAAsF,mCAAmC,6BAA6B,GAAG,kCAAkC,6BAA6B,mDAAmD,0CAA0C,yDAAyD,iEAAiE,oFAAoF,2IAA2I,mDAAmD,kDAAkD,oFAAoF,4IAA4I,sDAAsD,sCAAsC,SAAS,sCAAsC,UAAU,QAAQ,eAAe,mNAAmN,UAAU,0BAA0B,SAAS,qBAAqB,SAAS,8BAA8B,sBAAsB,yiBAAyiB,QAAQ,SAAS,2EAA2E,6BAA6B,KAAK,IAAI,2DAA2D,SAAS,uDAAuD,0CAA0C,IAAI,sBAAsB,SAAS,4EAA4E,+EAA+E,iCAAiC,yBAAyB,sGAAsG,gBAAgB,iDAAiD,UAAU,OAAO,sBAAsB,QAAQ,yBAAyB,sBAAsB,kBAAkB,4CAA4C,iDAAiD,wBAAwB,OAAO,4CAA4C,QAAQ,6BAA6B,iDAAiD,u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ACA;AACA;;AAEA;AACA;AACA;AACA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,2CAA2C,UAAU;AACrD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;ACrJA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEY;;AAEZ,eAAe,mBAAO,CAAC,wDAAW;AAClC,gBAAgB,mBAAO,CAAC,oDAAS;AACjC;AACA;AACA;AACA;;AAEA,cAAc;AACd,kBAAkB;AAClB,yBAAyB;;AAEzB;AACA,kBAAkB;;AAElB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,kBAAkB,YAAY;AAC9B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA,wCAAwC,SAAS;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;;AAEA;AACA;AACA,cAAc,iBAAiB;AAC/B;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,iDAAiD,EAAE;AACnD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C;AAC1C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA,yBAAyB,eAAe;AACxC;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,yBAAyB,QAAQ;AACjC;AACA,sBAAsB,eAAe;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc,YAAY;AAC1B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB,sBAAsB;AACxC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,mBAAmB;AACnB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA,oBAAoB,SAAS;AAC7B;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA,qBAAqB,WAAW,GAAG,IAAI;AACvC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA,gBAAgB,WAAW,GAAG,IAAI,KAAK,aAAa;AACpD;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;;AAEA;AACA,GAAG;AACH;AACA;AACA,mBAAmB,KAAK,mDAAmD,cAAc;AACzF,GAAG;AACH;AACA;AACA,+BAA+B,IAAI;AACnC;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,MAAM,aAAa,SAAS;AACtD;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,SAAS,gBAAgB;AACzB,cAAc,oBAAoB,EAAE,IAAI;AACxC;AACA,YAAY,gBAAgB,EAAE,IAAI;AAClC;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,GAAG,SAAS,GAAG,KAAK,qBAAqB,EAAE,EAAE;AACpE,QAAQ;AACR,yBAAyB,GAAG,KAAK,yBAAyB,EAAE,EAAE;AAC9D,mBAAmB,yBAAyB,EAAE,EAAE;AAChD;AACA,MAAM;AACN,oBAAoB,IAAI,EAAE,GAAG,SAAS,IAAI,EAAE,EAAE;AAC9C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,0CAA0C,cAAc,SAAS,OAAO;AACxE;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,kBAAkB,YAAY;AAC9B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,kBAAkB,gBAAgB;AAClC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,kBAAkB,gBAAgB;AAClC;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,cAAc,YAAY;AAC1B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,QAAQ;AAC1B;AACA,oBAAoB,QAAQ;AAC5B;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;;;;;ACzjEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEa;;AAEb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB;;AAEnB;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,sBAAsB;AACxC;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA,eAAe;AACf;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA,oBAAoB,SAAS;AAC7B;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;;AAEA,kCAAkC,QAAQ;AAC1C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oBAAoB,iBAAiB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,QAAQ;AACR;AACA,uCAAuC,QAAQ;AAC/C;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,OAAO;AACzB;AACA;AACA;;AAEA;AACA,SAAS,yBAAyB;AAClC;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,gBAAgB;AAClC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,8DAA8D,YAAY;AAC1E;AACA,8DAA8D,YAAY;AAC1E;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,qCAAqC,YAAY;AACjD;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;AACA;;;;;;;;;;;AChfA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,SAAS,WAAW;;AAEpB;AACA;AACA;AACA,SAAS,WAAW;;AAEpB;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA,SAAS,WAAW;;AAEpB;AACA;AACA,SAAS,UAAU;;AAEnB;AACA;;;;;;;;;;;ACpFA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,WAAW,mBAAO,CAAC,mDAAS;;AAE5B;AACA;;AAEA;;;;;;;;;;;ACNA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,cAAc,mBAAO,CAAC,yDAAY;AAClC,cAAc,mBAAO,CAAC,yDAAY;AAClC,cAAc,mBAAO,CAAC,yDAAY;;AAElC;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC/BA,qBAAqB,mBAAO,CAAC,uEAAmB;AAChD,sBAAsB,mBAAO,CAAC,yEAAoB;AAClD,mBAAmB,mBAAO,CAAC,mEAAiB;AAC5C,mBAAmB,mBAAO,CAAC,mEAAiB;AAC5C,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA;AACA;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;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC1BA,WAAW,mBAAO,CAAC,mDAAS;;AAE5B;AACA;;AAEA;;;;;;;;;;;ACLA,WAAW,mBAAO,CAAC,mDAAS;;AAE5B;AACA;;AAEA;;;;;;;;;;;ACLA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,WAAW,mBAAO,CAAC,mDAAS;;AAE5B;AACA;;AAEA;;;;;;;;;;;ACNA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,UAAU;AACrB,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACrBA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,UAAU;AACrB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACxBA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,kBAAkB,mBAAO,CAAC,+DAAe;AACzC,cAAc,mBAAO,CAAC,uDAAW;AACjC,eAAe,mBAAO,CAAC,yDAAY;AACnC,cAAc,mBAAO,CAAC,yDAAY;AAClC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,SAAS;AACpB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AChDA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACnBA;AACA;AACA;AACA;AACA;AACA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A;AACA,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;;;;;;;;;;ACrKA,eAAe,mBAAO,CAAC,yDAAY;;AAEnC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;;;;;;;;;;AC7BA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,cAAc,mBAAO,CAAC,uDAAW;;AAEjC;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACnBA,aAAa,mBAAO,CAAC,uDAAW;AAChC,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,qBAAqB,mBAAO,CAAC,uEAAmB;;AAEhD;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC3BA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA,sBAAsB,mBAAO,CAAC,yEAAoB;AAClD,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;AAC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AEpC;AACA;AACA;AACA;AACA,oCAAoC;;AAEpC;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC9CA,aAAa,mBAAO,CAAC,uDAAW;AAChC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,eAAe,mBAAO,CAAC,yDAAY;AACnC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC3DA,kBAAkB,mBAAO,CAAC,iEAAgB;AAC1C,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC7BA,eAAe,mBAAO,CAAC,yDAAY;AACnC,kBAAkB,mBAAO,CAAC,iEAAgB;AAC1C,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB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;AACA;AACA,WAAW,QAAQ;AACnB;AACA,IAAI;AACJ,CAAC;;AAED;;;;;;;;;;;ACVA,eAAe,mBAAO,CAAC,2DAAa;AACpC,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACnFA,aAAa,mBAAO,CAAC,uDAAW;AAChC,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,SAAS,mBAAO,CAAC,6CAAM;AACvB,kBAAkB,mBAAO,CAAC,iEAAgB;AAC1C,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC/GA,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACzFA;AACA,wBAAwB,qBAAM,gBAAgB,qBAAM,IAAI,qBAAM,sBAAsB,qBAAM;;AAE1F;;;;;;;;;;;ACHA,qBAAqB,mBAAO,CAAC,uEAAmB;AAChD,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,WAAW,mBAAO,CAAC,iDAAQ;;AAE3B;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACfA,qBAAqB,mBAAO,CAAC,uEAAmB;AAChD,mBAAmB,mBAAO,CAAC,mEAAiB;AAC5C,aAAa,mBAAO,CAAC,qDAAU;;AAE/B;AACA;AACA;AACA;AACA;AACA,WAAW,Q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AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACxBA,eAAe,mBAAO,CAAC,2DAAa;AACpC,UAAU,mBAAO,CAAC,iDAAQ;AAC1B,cAAc,mBAAO,CAAC,yDAAY;AAClC,UAAU,mBAAO,CAAC,iDAAQ;AAC1B,cAAc,mBAAO,CAAC,yDAAY;AAClC,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACzDA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa,GAAG;AAChB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACZA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACdA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AChBA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,GAAG;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC7BA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAA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;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACxBA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACdA,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACnBA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACZA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClCA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,GAAG;AAChB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;AClBA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACfA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;A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;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACnBA,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA,kBAAkB,KAA0B;;AAE5C;AACA,gCAAgC,QAAa;;AAE7C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ,CAAC;;AAED;;;;;;;;;;;AC7BA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACrBA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,aAAa,UAAU;AACvB;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACdA,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;ACRA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACbA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;;;;;;;;;;ACjBA,gBAAgB,mBAAO,CAAC,6DAAc;;AAEtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACdA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,GAAG;AAChB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACbA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACbA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,UAAU,mBAAO,CAAC,iDAAQ;AAC1B,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjCA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;;;;;;;;;;;ACzBA,gBAAgB,mBAAO,CAAC,6DAAc;;AAEtC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,GAAG;AAChB;AACA;AACA;AACA,oBAAoB,QAAQ,IAAI,QAAQ;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,kBAAkB;AAClB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpCA,sBAAsB,mBAAO,CAAC,yEAAoB;AAClD,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA,8BAA8B,mBAAmB;AACjD;AACA;AACA;AACA;AACA;AACA,+CAA+C,mBAAmB;AAClE;AACA;AACA;;AAEA;;;;;;;;;;;ACnCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACzBA,iBAAiB,mBAAO,CAAC,6DAAc;AACvC,eAAe,mBAAO,CAAC,yDAAY;;AAEnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AChCA,WAAW,mBAAO,CAAC,mDAAS;AAC5B,gBAAgB,mBAAO,CAAC,2DAAa;;AAErC;AACA,kBAAkB,KAA0B;;AAE5C;AACA,gCAAgC,QAAa;;AAE7C;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACrCA,kBAAkB,mBAAO,CAAC,iEAAgB;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,kBAAkB;AAClB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClCA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,eAAe,mBAAO,CAAC,yDAAY;;AAEnC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpCA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClCA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC1BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC9BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC5BA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC1BA,uBAAuB,mBAAO,CAAC,2EAAqB;AACpD,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC1BA,oBAAoB,mBAAO,CAAC,qEAAkB;AAC9C,eAAe,mBAAO,CAAC,2DAAa;AACpC,kBAAkB,mBAAO,CAAC,+DAAe;;AAEzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpCA,oBAAoB,mBAAO,CAAC,qEAAkB;AAC9C,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,kBAAkB,mBAAO,CAAC,+DAAe;;AAEzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC/BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACjBwC;AACA;AACA;AACA;AACE;AACQ;AACE;AACE;;;;;;;;;;;;;;;;ACPtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD;;AAEnD;;AAEA,oBAAoB,gBAAgB;AACpC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA,kBAAkB,cAAc;AAChC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,kBAAkB,cAAc;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,kBAAkB,aAAa;AAC/B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,iEAAe,GAAG;;;;;;;;;;;;;;;ACtNlB,iEAAe,sCAAsC;;;;;;;;;;;;;;;;ACAhB;;AAErC;AACA,OAAO,wDAAQ;AACf;AACA;;AAEA;AACA,gCAAgC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AC;QAC9B,OAAO,CAAC,KAAK,CACZ,0HAA0H,CAC1H,CAAC;QACF,OAAO;IACR,CAAC;IACD,iEAAiE;IACjE,wGAAwG;IACxG,yFAAyF;IACzF,uFAAuF;IACvF,MAAM,GAAG,GAAG,MAAM,sBAAO,EAAC;QACzB,qBAAqB,EAAE,SAAS;QAChC,OAAO,EAAE;YACR,SAAS,EAAE,mDAAmD;YAC9D,aAAa,EAAE;gBACd,UAAU,EAAE,kBAAkB;gBAC9B,mBAAmB,EAAE,OAAO;aAC5B;SACD;QACD,QAAQ,EAAE,EAAE,cAAc,EAAE;KAC5B,CAAC,CAAC;IAEH,4EAA4E;IAC5E,MAAM,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC;IAC3C,+DAA+D;IAC/D,MAAM,GAAG,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC;QAC9B,SAAS,EAAE,eAAe;KAC1B,CAAC,CAAC;AACJ,CAAC;AAED,IAAI,EAAE;KACJ,IAAI,CAAC,GAAG,EAAE;IACV,OAAO,CAAC,GAAG,CAAC,iCAAiC,CAAC,CAAC;IAC/C,OAAO,IAAI,CAAC;AACb,CAAC,CAAC;KACD,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC","sources":["webpack://openfin-web--web-layout-basic/../../node_modules/@openfin/core-web/out/api-client.js","webpack://openfin-web--web-layout-basic/../../node_modules/@openfin/core-web/out/main-8cad4070.js","webpack://openfin-web--web-layout-basic/../../node_modules/@openfin/core-web/out/main-b14f67c9.js","webpack://openfin-web--web-layout-basic/../../node_modules/base64-js/index.js","webpack://openfin-web--web-layout-basic/../../node_modules/buffer/index.js","webpack://openfin-web--web-layout-basic/../../node_modules/events/events.js","webpack://openfin-web--web-layout-basic/../../node_modules/ieee754/index.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_DataView.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_Hash.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_ListCache.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_Map.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_MapCache.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_Promise.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_Set.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_SetCache.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_Stack.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_Symbol.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_Uint8Array.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_WeakMap.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_arrayEach.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_arrayFilter.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_arrayLikeKeys.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_arrayPush.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_arraySome.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_assignValue.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_assocIndexOf.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_baseAssign.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_baseAssignIn.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_baseAssignValue.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_baseClone.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_baseCreate.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_baseGetAllKeys.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_baseGetTag.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_baseIsArguments.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_baseIsEqual.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_baseIsEqualDeep.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_baseIsMap.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_baseIsNative.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_baseIsSet.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_baseIsTypedArray.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_baseKeys.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_baseKeysIn.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_baseTimes.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_baseUnary.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_cacheHas.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_cloneArrayBuffer.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_cloneBuffer.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_cloneDataView.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_cloneRegExp.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_cloneSymbol.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_cloneTypedArray.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_copyArray.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_copyObject.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_copySymbols.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_copySymbolsIn.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_coreJsData.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_defineProperty.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_equalArrays.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_equalByTag.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_equalObjects.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_freeGlobal.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_getAllKeys.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_getAllKeysIn.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_getMapData.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_getNative.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_getPrototype.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_getRawTag.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_getSymbols.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_getSymbolsIn.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_getTag.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_getValue.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_hashClear.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_hashDelete.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_hashGet.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_hashHas.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_hashSet.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_initCloneArray.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_initCloneByTag.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_initCloneObject.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_isIndex.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_isKeyable.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_isMasked.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_isPrototype.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_listCacheClear.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_listCacheDelete.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_listCacheGet.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_listCacheHas.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_listCacheSet.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_mapCacheClear.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_mapCacheDelete.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_mapCacheGet.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_mapCacheHas.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_mapCacheSet.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_mapToArray.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_nativeCreate.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_nativeKeys.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_nativeKeysIn.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_nodeUtil.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_objectToString.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_overArg.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_root.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_setCacheAdd.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_setCacheHas.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_setToArray.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_stackClear.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_stackDelete.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_stackGet.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_stackHas.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_stackSet.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/_toSource.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/cloneDeep.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/eq.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/isArguments.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/isArray.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/isArrayLike.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/isBuffer.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/isEqual.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/isFunction.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/isLength.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/isMap.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/isObject.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/isObjectLike.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/isSet.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/isTypedArray.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/keys.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/keysIn.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/stubArray.js","webpack://openfin-web--web-layout-basic/../../node_modules/lodash/stubFalse.js","webpack://openfin-web--web-layout-basic/../../node_modules/uuid/dist/esm-browser/index.js","webpack://openfin-web--web-layout-basic/../../node_modules/uuid/dist/esm-browser/md5.js","webpack://openfin-web--web-layout-basic/../../node_modules/uuid/dist/esm-browser/nil.js","webpack://openfin-web--web-layout-basic/../../node_modules/uuid/dist/esm-browser/parse.js","webpack://openfin-web--web-layout-basic/../../node_modules/uuid/dist/esm-browser/regex.js","webpack://openfin-web--web-layout-basic/../../node_modules/uuid/dist/esm-browser/rng.js","webpack://openfin-web--web-layout-basic/../../node_modules/uuid/dist/esm-browser/sha1.js","webpack://openfin-web--web-layout-basic/../../node_modules/uuid/dist/esm-browser/stringify.js","webpack://openfin-web--web-layout-basic/../../node_modules/uuid/dist/esm-browser/v1.js","webpack://openfin-web--web-layout-basic/../../node_modules/uuid/dist/esm-browser/v3.js","webpack://openfin-web--web-layout-basic/../../node_modules/uuid/dist/esm-browser/v35.js","webpack://openfin-web--web-layout-basic/../../node_modules/uuid/dist/esm-browser/v4.js","webpack://openfin-web--web-layout-basic/../../node_modules/uuid/dist/esm-browser/v5.js","webpack://openfin-web--web-layout-basic/../../node_modules/uuid/dist/esm-browser/validate.js","webpack://openfin-web--web-layout-basic/../../node_modules/uuid/dist/esm-browser/version.js","webpack://openfin-web--web-layout-basic/webpack/bootstrap","webpack://openfin-web--web-layout-basic/webpack/runtime/define property getters","webpack://openfin-web--web-layout-basic/webpack/runtime/global","webpack://openfin-web--web-layout-basic/webpack/runtime/hasOwnProperty shorthand","webpack://openfin-web--web-layout-basic/webpack/runtime/make namespace object","webpack://openfin-web--web-layout-basic/webpack/runtime/node module decorator","webpack://openfin-web--web-layout-basic/./client/src/provider.ts"],"sourcesContent":["\"use strict\";var e=require(\"./main-8cad4070.js\");require(\"buffer/\"),require(\"uuid\"),require(\"events\"),require(\"lodash/cloneDeep\"),require(\"lodash/isEqual\"),exports.connect=e.connect;\n","\"use strict\";var e=require(\"buffer/\"),t=require(\"events\"),n=require(\"lodash/cloneDeep\"),i=require(\"lodash/isEqual\"),r=require(\"uuid\");const o=(e,t)=>`${t}<${btoa(JSON.stringify(e))}>`;var s=\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof window?window:\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:{},a={},c={},d={},h={};async function l(e){const t=[];for(const n of e){const e=await n();t.push(e)}return t}Object.defineProperty(h,\"__esModule\",{value:!0}),h.promiseMapSerial=h.serial=h.promiseMap=h.promisify=void 0,h.promisify=function(e){return(...t)=>new Promise(((n,i)=>{e(...t,((e,t)=>e?i(e):n(t)))}))},h.promiseMap=async function(e,t){return Promise.all(e.map(t))},h.serial=l,h.promiseMapSerial=async function(e,t){return l(e.map(((e,n,i)=>()=>t(e,n,i))))};var u,p=s&&s.__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},w=s&&s.__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)};Object.defineProperty(d,\"__esModule\",{value:!0}),d.Reply=d.EmitterBase=d.Base=void 0;const y=h;class f{constructor(e){this.isNodeEnvironment=()=>\"node\"===this.wire.environment.type,this.isOpenFinEnvironment=()=>\"openfin\"===this.wire.environment.type,this.isBrowserEnvironment=()=>\"other\"===this.wire.environment.type,this.wire=e}get fin(){return this.wire.getFin()}get me(){return this.wire.me}}d.Base=f;d.EmitterBase=class extends f{constructor(e,t,...n){super(e),this.topic=t,u.set(this,void 0),this.eventNames=()=>this.hasEmitter()?this.getOrCreateEmitter().eventNames():[],this.emit=(e,t,...n)=>!!this.hasEmitter()&&this.getOrCreateEmitter().emit(e,t,...n),this.hasEmitter=()=>this.wire.eventAggregator.has(w(this,u,\"f\")),this.getOrCreateEmitter=()=>this.wire.eventAggregator.getOrCreate(w(this,u,\"f\")),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[],this.listenerCount=e=>this.hasEmitter()?this.getOrCreateEmitter().listenerCount(e):0,this.registerEventListener=async(e,t={},n,i)=>{const r={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e},o=this.getOrCreateEmitter();n(o);try{await this.wire.sendAction(\"subscribe-to-desktop-event\",r)}catch(e){throw i(o),this.deleteEmitterIfNothingRegistered(o),e}},this.deregisterEventListener=async(e,t={})=>{if(this.hasEmitter()){const n={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e};await this.wire.sendAction(\"unsubscribe-to-desktop-event\",n).catch((()=>null));return this.getOrCreateEmitter()}return Promise.resolve()},p(this,u,[t,...n],\"f\"),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[]}async on(e,t,n){return await this.registerEventListener(e,n,(n=>{n.on(e,t)}),(n=>{n.removeListener(e,t)})),this}async addListener(e,t,n){return this.on(e,t,n)}async once(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.once(e,i),n.once(e,t)}),(n=>{n.removeListener(e,i),n.removeListener(e,t)})),this}async prependListener(e,t,n){return await this.registerEventListener(e,n,(n=>{n.prependListener(e,t)}),(n=>{n.removeListener(e,t)})),this}async prependOnceListener(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.prependOnceListener(e,t),n.once(e,i)}),(n=>{n.removeListener(e,t),n.removeListener(e,i)})),this}async removeListener(e,t,n){const i=await this.deregisterEventListener(e,n);return i&&(i.removeListener(e,t),this.deleteEmitterIfNothingRegistered(i)),this}async deregisterAllListeners(e){const t={...this.identity,type:e,topic:this.topic};if(this.hasEmitter()){const e=this.getOrCreateEmitter(),n=e.listenerCount(t.type),i=[];for(let e=0;enull)));return await Promise.all(i),e}}async removeAllListeners(e){const t=async e=>{const t=await this.deregisterAllListeners(e);t&&(t.removeAllListeners(e),this.deleteEmitterIfNothingRegistered(t))};if(e)await t(e);else if(this.hasEmitter()){const e=this.getOrCreateEmitter().eventNames();await(0,y.promiseMap)(e,t)}return this}deleteEmitterIfNothingRegistered(e){0===e.eventNames().length&&this.wire.eventAggregator.delete(w(this,u,\"f\"))}},u=new WeakMap;d.Reply=class{};var g={};Object.defineProperty(g,\"__esModule\",{value:!0});var m=g.RuntimeError=g.NotSupportedError=g.NotImplementedError=g.NoAckError=g.DuplicateCorrelationError=g.UnexpectedActionError=g.DisconnectedError=void 0;class v extends Error{constructor(e){super(`Expected websocket state OPEN but found ${e}`),this.readyState=e}}g.DisconnectedError=v;class C extends Error{}g.UnexpectedActionError=C;class b extends Error{}g.DuplicateCorrelationError=b;class I extends Error{}g.NoAckError=I;class E extends Error{}g.NotImplementedError=E;class x extends Error{}g.NotSupportedError=x;class A extends Error{constructor(e){const{message:t,name:n,stack:i,...r}=e;super(t),this.name=n||\"Error\",this.stack=i??this.toString(),Object.keys(r).forEach((e=>{this[e]=r[e]}))}}class P extends Error{static getCallSite(e=0){const t=Error.stackTraceLimit,n=e+1;Error.stackTraceLimit=t+n;const i=Error.prepareStackTrace;Error.prepareStackTrace=(e,t)=>t;const r=(new Error).stack?.slice(n)??[];return Error.prepareStackTrace=i,Error.stackTraceLimit=t,r}static prepareStackTrace(e,t){if(\"function\"==typeof Error.prepareStackTrace)return Error.prepareStackTrace(e,t);let n=\"\";n+=e.name||\"Error\",n+=`: ${e.message||\"\"}`;for(const e of t)n+=`\\n at ${e.toString()}`;return n}constructor(e,t){const{reason:n,error:i}=e;super(n),this.name=\"RuntimeError\",i?.stack&&(this.cause=new A(i)),t&&(this.stack=P.prepareStackTrace(this,t))}}m=g.RuntimeError=P;var M={},_={},O={};Object.defineProperty(O,\"__esModule\",{value:!0}),O.validateIdentity=void 0,O.validateIdentity=function(e){let t;return\"object\"==typeof e&&\"string\"==typeof e.uuid||(t=\"Not a valid identity object\"),t};var S={},R={},F={},j={},k={},L={},T={};Object.defineProperty(T,\"__esModule\",{value:!0}),T.handleDeprecatedWarnings=void 0;var $;T.handleDeprecatedWarnings=e=>{(e.contentNavigation?.whitelist||e.contentNavigation?.blacklist||e.contentRedirect?.whitelist||e.contentRedirect?.blacklist)&&console.warn(\"The properties 'whitelist' and 'blacklist' have been marked as deprecated and will be removed in a future version. Please use 'allowlist' and 'denylist'.\")};var B={},G={};Object.defineProperty(G,\"__esModule\",{value:!0}),G.AsyncRetryableLazy=W=G.Lazy=void 0;var W=G.Lazy=class{constructor(e){this.producerFn=e}getValue(){return this.value||(this.value=this.producerFn()),this.value}};G.AsyncRetryableLazy=class{constructor(e){this.producerFn=e}async getValue(){return this.promise||(this.promise=this.producerFn().catch((e=>{throw delete this.promise,e}))),this.promise}};var H={};Object.defineProperty(H,\"__esModule\",{value:!0}),H.WebContents=void 0;const N=d;class D extends N.EmitterBase{constructor(e,t,n){super(e,n,t.uuid,t.name),this.identity=t,this.entityType=n}capturePage(e){return this.wire.sendAction(\"capture-page\",{options:e,...this.identity}).then((({payload:e})=>e.data))}executeJavaScript(e){return this.wire.sendAction(\"execute-javascript-in-window\",{...this.identity,code:e}).then((({payload:e})=>e.data))}getZoomLevel(){return this.wire.sendAction(\"get-zoom-level\",this.identity).then((({payload:e})=>e.data))}setZoomLevel(e){return this.wire.sendAction(\"set-zoom-level\",{...this.identity,level:e}).then((()=>{}))}navigate(e){return this.wire.sendAction(\"navigate-window\",{...this.identity,url:e}).then((()=>{}))}navigateBack(){return this.wire.sendAction(\"navigate-window-back\",{...this.identity}).then((()=>{}))}async navigateForward(){await this.wire.sendAction(\"navigate-window-forward\",{...this.identity})}stopNavigation(){return this.wire.sendAction(\"stop-window-navigation\",{...this.identity}).then((()=>{}))}reload(e=!1){return this.wire.sendAction(\"reload-window\",{ignoreCache:e,...this.identity}).then((()=>{}))}print(e={}){return this.wire.sendAction(\"print\",{...this.identity,options:e}).then((()=>{}))}findInPage(e,t){return this.wire.sendAction(\"find-in-page\",{...this.identity,searchTerm:e,options:t}).then((({payload:e})=>e.data))}stopFindInPage(e){return this.wire.sendAction(\"stop-find-in-page\",{...this.identity,action:e}).then((()=>{}))}getPrinters(){return this.wire.sendAction(\"get-printers\",{...this.identity}).then((({payload:e})=>e.data))}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){await this.wire.sendAction(\"focus-window\",{emitSynthFocused:e,...this.identity})}async showDeveloperTools(){await this.wire.sendAction(\"show-developer-tools\",this.identity)}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction(\"get-process-info\",this.identity);return e}async getSharedWorkers(){return this.wire.sendAction(\"get-shared-workers\",this.identity).then((({payload:e})=>e.data))}async inspectSharedWorker(){await this.wire.sendAction(\"inspect-shared-worker\",{...this.identity})}async inspectSharedWorkerById(e){await this.wire.sendAction(\"inspect-shared-worker-by-id\",{...this.identity,workerId:e})}async inspectServiceWorker(){await this.wire.sendAction(\"inspect-service-worker\",{...this.identity})}async showPopupWindow(e){if(this.wire.sendAction(`${this.entityType}-show-popup-window`,this.identity).catch((()=>{})),e?.onPopupReady){const t=async({popupName:t})=>{try{const n=this.fin.Window.wrapSync({uuid:this.fin.me.uuid,name:t});await e.onPopupReady(n)}catch(e){throw new Error(`Something went wrong during onPopupReady execution: ${e}`)}};await this.once(\"popup-ready\",t)}const{payload:t}=await this.wire.sendAction(\"try-create-popup-window\",{options:{...e,hasResultCallback:!!e?.onPopupResult,hasReadyCallback:!!e?.onPopupReady},...this.identity}),{data:{willOpen:n,options:i}}=t;n&&await this.fin.Window.create(i.initialOptions);if(e?.onPopupResult){const t=async t=>{await e.onPopupResult((e=>{const{name:t,uuid:n,result:i,data:r}=e,o={identity:{name:t,uuid:n},result:i};return r&&(o.data=r),o})(t))},n=async()=>{await this.removeListener(\"popup-result\",t)};await this.on(\"popup-result\",t),await this.once(\"popup-teardown\",n)}const{payload:r}=await this.wire.sendAction(\"show-popup-window\",{options:i,...this.identity});return r.data}}var U,V,z,K,q;function J(){return V||(V=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(function(){if($)return L;$=1,Object.defineProperty(L,\"__esModule\",{value:!0}),L.ViewModule=void 0;const e=d,t=O,n=J(),i=T;class r extends e.Base{async create(e){const{uuid:t}=this.wire.me;if(!e.name||\"string\"!=typeof e.name)throw new Error(\"Please provide a name property as a string in order to create a View.\");return(0,i.handleDeprecatedWarnings)(e),this.wire.environment.childViews?await this.wire.environment.createChildContent({entityType:\"view\",options:{...e,uuid:t}}):await this.wire.sendAction(\"create-view\",{...e,uuid:t}),this.wrapSync({uuid:t,name:e.name})}async wrap(e){this.wire.sendAction(\"view-wrap\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}wrapSync(e){this.wire.sendAction(\"view-wrap-sync\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}getCurrent(){if(this.wire.sendAction(\"view-get-current\").catch((e=>{})),!this.wire.me.isView)throw new Error(\"You are not in a View context\");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction(\"view-get-current-sync\").catch((e=>{})),!this.wire.me.isView)throw new Error(\"You are not in a View context\");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return L.ViewModule=r,L}(),e),n(function(){if(U)return B;var e;U=1,Object.defineProperty(B,\"__esModule\",{value:!0}),B.View=void 0;const t=g,n=G,i=H,r=ie();class o extends i.WebContents{constructor(i,o){super(i,o,\"view\"),this.identity=o,e.set(this,new n.Lazy((()=>this.fin.Platform.wrapSync(this.identity).getClient()))),this.attach=async e=>{await this.wire.sendAction(\"attach-view\",{target:e,...this.identity})},this.destroy=async()=>{await this.wire.sendAction(\"destroy-view\",{...this.identity})},this.show=async()=>{await this.wire.sendAction(\"show-view\",{...this.identity})},this.showAt=async(e,t={})=>{await this.wire.sendAction(\"show-view-at\",{bounds:e,...this.identity,options:t})},this.bringToFront=async()=>{await this.wire.sendAction(\"bring-view-to-front\",{...this.identity})},this.hide=async()=>{await this.wire.sendAction(\"hide-view\",{...this.identity})},this.setBounds=async e=>{await this.wire.sendAction(\"set-view-bounds\",{bounds:e,...this.identity})},this.getBounds=async()=>(await this.wire.sendAction(\"get-view-bounds\",{...this.identity})).payload.data,this.getInfo=async()=>(await this.wire.sendAction(\"get-view-info\",{...this.identity})).payload.data,this.getParentLayout=async()=>(this.wire.sendAction(\"view-get-parent-layout\",{...this.identity}).catch((()=>{})),this.fin.Platform.Layout.getLayoutByViewIdentity(this.identity)),this.getOptions=async()=>this.wire.sendAction(\"get-view-options\",{...this.identity}).then((({payload:e})=>e.data)),this.updateOptions=async e=>this.wire.sendAction(\"update-view-options\",{options:e,...this.identity}).then((()=>{})),this.getCurrentWindow=async()=>{const{payload:{data:e}}=await this.wire.sendAction(\"get-view-window\",{...this.identity});return new r._Window(this.wire,e)},this.getCurrentStack=async()=>{this.wire.sendAction(\"view-get-current-stack\").catch((()=>{}));try{return(await this.getParentLayout()).getStackByViewIdentity(this.identity)}catch(e){throw new t.RuntimeError({reason:\"This view does not belong to a stack.\",error:e})}},this.triggerBeforeUnload=async()=>(await this.wire.sendAction(\"trigger-before-unload\",{...this.identity})).payload.data,this.bindToElement=async e=>{if(!e)throw new Error(\"Element not found.\");return this.wire.environment.observeBounds(e,(async e=>this.setBounds(e)))}}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){const t=await this.getCurrentWindow();await t.focusedWebViewWasChanged(),await super.focus({emitSynthFocused:e})}}return B.View=o,e=new WeakMap,B}(),e)}(k)),k}function Y(){if(z)return j;z=1,Object.defineProperty(j,\"__esModule\",{value:!0}),j.Application=void 0;const e=d,t=ie(),n=J();class i extends e.EmitterBase{constructor(e,n){super(e,\"application\",n.uuid),this.identity=n,this.window=new t._Window(this.wire,{uuid:this.identity.uuid,name:this.identity.uuid})}windowListFromIdentityList(e){const n=[];return e.forEach((e=>{n.push(new t._Window(this.wire,{uuid:e.uuid,name:e.name}))})),n}isRunning(){return this.wire.sendAction(\"is-application-running\",this.identity).then((({payload:e})=>e.data))}async quit(e=!1){try{await this._close(e),await this.wire.sendAction(\"destroy-application\",{force:e,...this.identity})}catch(e){if(![\"Remote connection has closed\",\"Could not locate the requested application\"].some((t=>e.message.includes(t))))throw e}}async _close(e=!1){try{await this.wire.sendAction(\"close-application\",{force:e,...this.identity})}catch(e){if(!e.message.includes(\"Remote connection has closed\"))throw e}}close(e=!1){return console.warn(\"Deprecation Warning: Application.close is deprecated Please use Application.quit\"),this.wire.sendAction(\"application-close\",this.identity).catch((e=>{})),this._close(e)}getChildWindows(){return this.wire.sendAction(\"get-child-windows\",this.identity).then((({payload:e})=>{const t=[];return e.data.forEach((e=>{t.push({uuid:this.identity.uuid,name:e})})),this.windowListFromIdentityList(t)}))}getManifest(){return this.wire.sendAction(\"get-application-manifest\",this.identity).then((({payload:e})=>e.data))}getParentUuid(){return this.wire.sendAction(\"get-parent-application\",this.identity).then((({payload:e})=>e.data))}getShortcuts(){return this.wire.sendAction(\"get-shortcuts\",this.identity).then((({payload:e})=>e.data))}async getViews(){const{payload:e}=await this.wire.sendAction(\"application-get-views\",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}getZoomLevel(){return this.wire.sendAction(\"get-application-zoom-level\",this.identity).then((({payload:e})=>e.data))}getWindow(){return this.wire.sendAction(\"application-get-window\",this.identity).catch((e=>{})),Promise.resolve(this.window)}registerUser(e,t){return this.wire.sendAction(\"register-user\",{userName:e,appName:t,...this.identity}).then((()=>{}))}removeTrayIcon(){return this.wire.sendAction(\"remove-tray-icon\",this.identity).then((()=>{}))}restart(){return this.wire.sendAction(\"restart-application\",this.identity).then((()=>{}))}run(){return console.warn(\"Deprecation Warning: Application.run is deprecated Please use fin.Application.start\"),this.wire.sendAction(\"application-run\",this.identity).catch((e=>{})),this._run()}_run(e={}){return this.wire.sendAction(\"run-application\",{manifestUrl:this._manifestUrl,opts:e,...this.identity}).then((()=>{}))}scheduleRestart(){return this.wire.sendAction(\"relaunch-on-close\",this.identity).then((()=>{}))}async sendApplicationLog(){const{payload:e}=await this.wire.sendAction(\"send-application-log\",this.identity);return e.data}async setJumpList(e){await this.wire.sendAction(\"set-jump-list\",{config:e,...this.identity})}setTrayIcon(e){return this.wire.sendAction(\"set-tray-icon\",{enabledIcon:e,...this.identity}).then((()=>{}))}setShortcuts(e){return this.wire.sendAction(\"set-shortcuts\",{data:e,...this.identity}).then((()=>{}))}async setShortcutQueryParams(e){await this.wire.sendAction(\"set-shortcut-query-args\",{data:e,...this.identity})}setZoomLevel(e){return this.wire.sendAction(\"set-application-zoom-level\",{level:e,...this.identity}).then((()=>{}))}async setAppLogUsername(e){await this.wire.sendAction(\"set-app-log-username\",{data:e,...this.identity})}getTrayIconInfo(){return this.wire.sendAction(\"get-tray-icon-info\",this.identity).then((({payload:e})=>e.data))}hasTrayIcon(){return this.wire.sendAction(\"has-tray-icon\",this.identity).then((({payload:e})=>e.data))}terminate(){return this.wire.sendAction(\"terminate-application\",this.identity).then((()=>{}))}wait(){return this.wire.sendAction(\"wait-for-hung-application\",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction(\"get-info\",this.identity).then((({payload:e})=>e.data))}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction(\"application-get-process-info\",this.identity);return e}async setFileDownloadLocation(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t};await this.wire.sendAction(\"set-file-download-location\",{...n,downloadLocation:e})}async getFileDownloadLocation(){const{payload:{data:e}}=await this.wire.sendAction(\"get-file-download-location\",this.identity);return e}async showTrayIconPopupMenu(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t},{payload:i}=await this.wire.sendAction(\"show-tray-icon-popup-menu\",{...n,options:e});return i.data}async closeTrayIconPopupMenu(){const{name:e}=this.wire.me,t={uuid:this.identity.uuid,name:e};await this.wire.sendAction(\"close-tray-icon-popup-menu\",{...t})}}return j.Application=i,j}function Z(){return q||(q=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(function(){if(K)return F;K=1,Object.defineProperty(F,\"__esModule\",{value:!0}),F.ApplicationModule=void 0;const e=d,t=O,n=Y();class i extends e.Base{async wrap(e){this.wire.sendAction(\"wrap-application\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}wrapSync(e){this.wire.sendAction(\"wrap-application-sync\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}async _create(e){return void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&void 0===e.isPlatformController&&(e.autoShow=!0),await this.wire.sendAction(\"create-application\",e),this.wrap({uuid:e.uuid})}create(e){return console.warn(\"Deprecation Warning: fin.Application.create is deprecated. Please use fin.Application.start\"),this.wire.sendAction(\"application-create\").catch((e=>{})),this._create(e)}async start(e){this.wire.sendAction(\"start-application\").catch((e=>{}));const t=await this._create(e);return await this.wire.sendAction(\"run-application\",{uuid:e.uuid}),t}async startManyManifests(e,t){return this.wire.sendAction(\"run-applications\",{applications:e,opts:t}).then((()=>{}))}getCurrent(){return this.wire.sendAction(\"get-current-application\").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction(\"get-current-application-sync\").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}async startFromManifest(e,t){this.wire.sendAction(\"application-start-from-manifest\").catch((e=>{}));const n=await this._createFromManifest(e);return await n._run(t),n}createFromManifest(e){return console.warn(\"Deprecation Warning: fin.Application.createFromManifest is deprecated. Please use fin.Application.startFromManifest\"),this.wire.sendAction(\"application-create-from-manifest\").catch((e=>{})),this._createFromManifest(e)}_createFromManifest(e){return this.wire.sendAction(\"get-application-manifest\",{manifestUrl:e}).then((({payload:e})=>{const t=e.data.platform?e.data.platform.uuid:e.data.startup_app.uuid;return this.wrap({uuid:t})})).then((t=>(t._manifestUrl=e,t)))}}return F.ApplicationModule=i,F}(),e),n(Y(),e)}(R)),R}H.WebContents=D;var Q={};Object.defineProperty(Q,\"__esModule\",{value:!0}),Q.promisifySubscription=void 0;var X,ee,te;function ne(){if(X)return S;X=1,Object.defineProperty(S,\"__esModule\",{value:!0}),S._Window=void 0;const e=Z(),t=H,n=J(),i=T,r=Q;class o extends t.WebContents{constructor(e,t){super(e,t,\"window\")}async createWindow(e){this.wire.sendAction(\"window-create-window\",this.identity).catch((e=>{}));const t=await(0,r.promisifySubscription)(this,\"fire-constructor-callback\");void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&(e.autoShow=!0),(0,i.handleDeprecatedWarnings)(e);const n=this.wire.environment.createChildContent({entityType:\"window\",options:e}),[o]=await Promise.all([t.getValue(),n]);let s;const{success:a}=o,c=o.data,{message:d}=c;s=a?{httpResponseCode:c.httpResponseCode,apiInjected:c.apiInjected}:{message:c.message,networkErrorCode:c.networkErrorCode,stack:c.stack};const h={message:d,cbPayload:s,success:a};try{this.getWebWindow().fin.__internal_.openerSuccessCBCalled()}catch(e){}return h.success?this:Promise.reject(h)}getAllFrames(){return this.wire.sendAction(\"get-all-frames\",this.identity).then((({payload:e})=>e.data))}getBounds(){return this.wire.sendAction(\"get-window-bounds\",this.identity).then((({payload:e})=>e.data))}center(){return this.wire.sendAction(\"center-window\",this.identity).then((()=>{}))}blur(){return this.wire.sendAction(\"blur-window\",this.identity).then((()=>{}))}bringToFront(){return this.wire.sendAction(\"bring-window-to-front\",this.identity).then((()=>{}))}animate(e,t){return this.wire.sendAction(\"animate-window\",{transitions:e,options:t,...this.identity}).then((()=>{}))}hide(){return this.wire.sendAction(\"hide-window\",this.identity).then((()=>{}))}close(e=!1){return this.wire.sendAction(\"close-window\",{force:e,...this.identity}).then((()=>{Object.setPrototypeOf(this,null)}))}focusedWebViewWasChanged(){return this.wire.sendAction(\"focused-webview-changed\",this.identity).then((()=>{}))}getNativeId(){return this.wire.sendAction(\"get-window-native-id\",this.identity).then((({payload:e})=>e.data))}async getCurrentViews(){const{payload:e}=await this.wire.sendAction(\"window-get-views\",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}disableFrame(){return console.warn(\"Function is deprecated; use disableUserMovement instead.\"),this.wire.sendAction(\"disable-window-frame\",this.identity).then((()=>{}))}disableUserMovement(){return this.wire.sendAction(\"disable-window-frame\",this.identity).then((()=>{}))}enableFrame(){return console.warn(\"Function is deprecated; use enableUserMovement instead.\"),this.wire.sendAction(\"enable-window-frame\",this.identity).then((()=>{}))}enableUserMovement(){return this.wire.sendAction(\"enable-window-frame\",this.identity).then((()=>{}))}flash(){return this.wire.sendAction(\"flash-window\",this.identity).then((()=>{}))}stopFlashing(){return this.wire.sendAction(\"stop-flash-window\",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction(\"get-window-info\",this.identity).then((({payload:e})=>e.data))}async getLayout(e){this.wire.sendAction(\"window-get-layout\",this.identity).catch((e=>{}));const t=await this.getOptions();if(!t.layout&&!t.layoutSnapshot)throw new Error(\"Window does not have a Layout\");return this.fin.Platform.Layout.wrap(e??this.identity)}getOptions(){return this.wire.sendAction(\"get-window-options\",this.identity).then((({payload:e})=>e.data))}getParentApplication(){return this.wire.sendAction(\"window-get-parent-application\",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity))}getParentWindow(){return this.wire.sendAction(\"window-get-parent-window\",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity)).then((e=>e.getWindow()))}async getSnapshot(e){const t={area:e,...this.identity};console.warn(\"Window.getSnapshot has been deprecated, please use Window.capturePage\");return(await this.wire.sendAction(\"get-window-snapshot\",t)).payload.data}getState(){return this.wire.sendAction(\"get-window-state\",this.identity).then((({payload:e})=>e.data))}getWebWindow(){return this.wire.sendAction(\"window-get-web-window\",this.identity).catch((e=>{})),this.wire.environment.getWebWindow(this.identity)}isMainWindow(){return this.wire.sendAction(\"window-is-main-window\",this.identity).catch((e=>{})),this.me.uuid===this.me.name}isShowing(){return this.wire.sendAction(\"is-window-showing\",this.identity).then((({payload:e})=>e.data))}maximize(){return this.wire.sendAction(\"maximize-window\",this.identity).then((()=>{}))}minimize(){return this.wire.sendAction(\"minimize-window\",this.identity).then((()=>{}))}moveBy(e,t,n){return this.wire.sendAction(\"move-window-by\",{deltaLeft:e,deltaTop:t,positioningOptions:n,...this.identity}).then((()=>{}))}moveTo(e,t,n){return this.wire.sendAction(\"move-window\",{left:e,top:t,positioningOptions:n,...this.identity}).then((()=>{}))}resizeBy(e,t,n,i){return this.wire.sendAction(\"resize-window-by\",{deltaWidth:Math.floor(e),deltaHeight:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}resizeTo(e,t,n,i){return this.wire.sendAction(\"resize-window\",{width:Math.floor(e),height:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}restore(){return this.wire.sendAction(\"restore-window\",this.identity).then((()=>{}))}setAsForeground(){return this.wire.sendAction(\"set-foreground-window\",this.identity).then((()=>{}))}setBounds(e,t){return this.wire.sendAction(\"set-window-bounds\",{...e,...this.identity,positioningOptions:t}).then((()=>{}))}show(e=!1){return this.wire.sendAction(\"show-window\",{force:e,...this.identity}).then((()=>{}))}showAt(e,t,n=!1){return this.wire.sendAction(\"show-at-window\",{force:n,left:Math.floor(e),top:Math.floor(t),...this.identity}).then((()=>{}))}updateOptions(e){return this.wire.sendAction(\"update-window-options\",{options:e,...this.identity}).then((()=>{}))}authenticate(e,t){return this.wire.sendAction(\"window-authenticate\",{userName:e,password:t,...this.identity}).then((()=>{}))}async showPopupMenu(e){const{payload:t}=await this.wire.sendAction(\"show-popup-menu\",{options:e,...this.identity});return t.data}async closePopupMenu(){return this.wire.sendAction(\"close-popup-menu\",{...this.identity}).then((()=>{}))}async dispatchPopupResult(e){this.wire.sendAction(\"window-dispatch-popup-result\",this.identity).catch((e=>{})),await this.wire.sendAction(\"dispatch-popup-result\",{data:e,...this.identity})}async print(e={content:\"self\"}){switch(e.content){case void 0:case\"self\":return super.print(e);case\"screenshot\":return this.wire.sendAction(\"print-screenshot\",this.identity).then((()=>{}));case\"views\":return this.wire.sendAction(\"print-views\",{...this.identity,options:e}).then((()=>{}));default:return}}}return S._Window=o,S}function ie(){return te||(te=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(function(){if(ee)return _;ee=1,Object.defineProperty(_,\"__esModule\",{value:!0}),_._WindowModule=void 0;const e=d,t=O,n=ne();class i extends e.Base{async wrap(e){this.wire.sendAction(\"window-wrap\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}wrapSync(e){this.wire.sendAction(\"window-wrap-sync\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}create(e){return this.wire.sendAction(\"create-window\").catch((e=>{})),new n._Window(this.wire,{uuid:this.me.uuid,name:e.name}).createWindow(e)}getCurrent(){if(this.wire.sendAction(\"get-current-window\").catch((e=>{})),!this.wire.me.isWindow)throw new Error(\"You are not in a Window context\");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction(\"get-current-window-sync\").catch((e=>{})),!this.wire.me.isWindow)throw new Error(\"You are not in a Window context\");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return _._WindowModule=i,_}(),e),n(ne(),e)}(M)),M}Q.promisifySubscription=async(e,t,n=(()=>!0),i)=>{let r,o,s;const a=new Promise(((e,t)=>{r=e,o=t})),c=e=>{n(e)&&(clearTimeout(s),r(e))};return await e.on(t,c),i&&(s=setTimeout((()=>o(new Error(\"event timed out\"))),i)),a.finally((()=>{e.removeListener(t,c).catch((()=>null))})),{getValue:()=>a}},Object.defineProperty(c,\"__esModule\",{value:!0}),c.System=void 0;const re=d,oe=g,se=ie(),ae=t;class ce extends re.EmitterBase{constructor(e){super(e,\"system\")}sendExternalProcessRequest(e,t){return new Promise(((n,i)=>{const r=\"external-process-exited\";let o,s,a,c;\"function\"==typeof t.listener&&(a=e=>{const n=e||{};s={topic:\"exited\",uuid:n.processUuid||\"\",exitCode:n.exitCode||0},o===e.processUuid&&(t.listener(s),c.removeListener(r,a))},this.wire.me.name||(this.wire.me.name=this.wire.me.uuid),c=new se._Window(this.wire,this.wire.me),c.on(r,a)),this.wire.sendAction(e,t).then((({payload:e})=>{o=e.data.uuid,n(e.data),s&&o===s.uuid&&(t.listener(s),c.removeListener(r,a))})).catch((e=>{c&&c.removeListener(r,a),i(e)}))}))}getVersion(){return this.wire.sendAction(\"get-version\").then((({payload:e})=>e.data))}clearCache(e){return this.wire.sendAction(\"clear-cache\",e).then((()=>{}))}deleteCacheOnExit(){return this.wire.sendAction(\"delete-cache-request\").then((()=>{}))}exit(){return this.wire.sendAction(\"exit-desktop\").then((()=>{}))}async fetchManifest(e){const{payload:{data:t}}=await this.wire.sendAction(\"fetch-manifest\",{manifestUrl:e});return t}flushCookieStore(){return this.wire.sendAction(\"flush-cookie-store\").then((()=>{}))}getAllWindows(){return this.wire.sendAction(\"get-all-windows\").then((({payload:e})=>e.data))}getAllApplications(){return this.wire.sendAction(\"get-all-applications\").then((({payload:e})=>e.data))}getCommandLineArguments(){return this.wire.sendAction(\"get-command-line-arguments\").then((({payload:e})=>e.data))}async getCrashReporterState(){const{payload:{data:{diagnosticMode:e,isRunning:t}}}=await this.wire.sendAction(\"get-crash-reporter-state\");return console.warn(\"diagnosticMode property is deprecated. It will be removed in a future version\"),{diagnosticMode:e,diagnosticsMode:e,isRunning:t}}async startCrashReporter(e){const t=e,n={...t,diagnosticMode:t.diagnosticsMode||t.diagnosticMode},{payload:{data:{diagnosticMode:i,isRunning:r}}}=await this.wire.sendAction(\"start-crash-reporter\",n);return{diagnosticMode:i,diagnosticsMode:i,isRunning:r}}getUniqueUserId(){return this.wire.sendAction(\"get-unique-user-id\").then((({payload:e})=>e.data))}getEntityInfo(e,t){return this.wire.sendAction(\"get-entity-info\",{uuid:e,name:t}).then((({payload:e})=>e.data))}getEnvironmentVariable(e){return this.wire.sendAction(\"get-environment-variable\",{environmentVariables:e}).then((({payload:e})=>e.data))}getFocusedWindow(){return this.wire.sendAction(\"get-focused-window\").then((({payload:e})=>e.data))}async isAppCertified(e){const{payload:{data:{certifiedInfo:t}}}=await this.wire.sendAction(\"is-app-certified\",{manifestUrl:e});return t}getInstalledRuntimes(){return this.wire.sendAction(\"get-installed-runtimes\").then((({payload:e})=>e.data.runtimes))}async getInstalledApps(){const{payload:{data:{installedApps:e}}}=await this.wire.sendAction(\"get-installed-apps\");return e}getLog(e){return this.wire.sendAction(\"view-log\",e).then((({payload:e})=>e.data))}getMachineId(){return this.wire.sendAction(\"get-machine-id\").then((({payload:e})=>e.data))}getMinLogLevel(){return this.wire.sendAction(\"get-min-log-level\").then((({payload:e})=>e.data))}getLogList(){return this.wire.sendAction(\"list-logs\").then((({payload:e})=>e.data))}getMonitorInfo(){return this.wire.sendAction(\"get-monitor-info\").then((({payload:e})=>e.data))}getMousePosition(){return this.wire.sendAction(\"get-mouse-position\").then((({payload:e})=>e.data))}getProcessList(){return console.warn(\"System.getProcessList has been deprecated. Please consider using our new process APIs: Window.getProcessInfo, View.getProcessInfo, Application.getProcessInfo, System.getAllProcessInfo\"),this.wire.sendAction(\"process-snapshot\").then((({payload:e})=>e.data))}async getAllProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction(\"get-all-process-info\",this.identity);return e}getProxySettings(){return this.wire.sendAction(\"get-proxy-settings\").then((({payload:e})=>e.data))}getRuntimeInfo(){return this.wire.sendAction(\"get-runtime-info\").then((({payload:e})=>e.data))}getRvmInfo(){return this.wire.sendAction(\"get-rvm-info\").then((({payload:e})=>e.data))}getHostSpecs(){return this.wire.sendAction(\"get-host-specs\").then((({payload:e})=>e.data))}getOSInfo(){return this.wire.sendAction(\"get-os-info\").then((({payload:e})=>e.data))}launchExternalProcess(e){return this.sendExternalProcessRequest(\"launch-external-process\",e)}monitorExternalProcess(e){return this.sendExternalProcessRequest(\"monitor-external-process\",e)}log(e,t){return this.wire.sendAction(\"write-to-log\",{level:e,message:t}).then((()=>{}))}openUrlWithBrowser(e){return this.wire.sendAction(\"open-url-with-browser\",{url:e}).then((()=>{}))}async registerCustomProtocol(e){if(\"object\"!=typeof e)throw new Error(\"Must provide an object with a `protocolName` property having a string value.\");await this.wire.sendAction(\"register-custom-protocol\",e)}async unregisterCustomProtocol(e){await this.wire.sendAction(\"unregister-custom-protocol\",{protocolName:e})}async getCustomProtocolState(e){return this.wire.sendAction(\"get-custom-protocol-state\",{protocolName:e}).then((({payload:e})=>e.data))}releaseExternalProcess(e){return this.wire.sendAction(\"release-external-process\",{uuid:e}).then((()=>{}))}showDeveloperTools(e){return this.wire.sendAction(\"show-developer-tools\",e).then((()=>{}))}terminateExternalProcess(e){return this.wire.sendAction(\"terminate-external-process\",e).then((()=>{}))}updateProxySettings(e){return this.wire.sendAction(\"update-proxy\",e).then((()=>{}))}async downloadAsset(e,t){const n=()=>{};let i=n,r=n;const o=new Promise(((e,t)=>{i=e,r=t}));if(\"openfin\"!==this.wire.environment.type)throw new oe.NotSupportedError(\"downloadAsset only supported in an OpenFin Render process\");const s=oe.RuntimeError.getCallSite(),a=this.wire.environment.getNextMessageId().toString(),c=`asset-download-progress-${a}`,d=`asset-download-error-${a}`,h=`asset-download-complete-${a}`,l=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},u=()=>{this.removeListener(c,l)};await Promise.all([this.on(c,l),this.once(d,(e=>{u();const{reason:t,err:n}=e;r(new oe.RuntimeError({reason:t,error:n},s))})),this.once(h,(()=>{u(),i()}))]);const p=Object.assign(e,{downloadId:a});return await this.wire.sendAction(\"download-asset\",p).catch((e=>{throw u(),e})),o}downloadRuntime(e,t){const n=oe.RuntimeError.getCallSite();return new Promise(((i,r)=>{if(\"openfin\"!==this.wire.environment.type)return void r(new oe.NotSupportedError(\"downloadRuntime only supported in an OpenFin Render process\"));const o=this.wire.environment.getNextMessageId().toString(),s=`runtime-download-progress-${o}`,a=`runtime-download-error-${o}`,c=`runtime-download-complete-${o}`,d=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},h=()=>{this.removeListener(s,d)};this.on(s,d),this.once(a,(e=>{h();const{reason:t,err:i}=e;r(new oe.RuntimeError({reason:t,error:i},n))})),this.once(c,(()=>{h(),i()}));const l=Object.assign(e,{downloadId:o});this.wire.sendAction(\"download-runtime\",l).catch((e=>{h(),r(e)}))}))}downloadPreloadScripts(e){return this.wire.sendAction(\"download-preload-scripts\",{scripts:e}).then((({payload:e})=>e.data))}getAllExternalApplications(){return this.wire.sendAction(\"get-all-external-applications\").then((({payload:e})=>e.data))}getAppAssetInfo(e){return this.wire.sendAction(\"get-app-asset-info\",e).then((({payload:e})=>e.data))}getCookies(e){const t=this.wire.environment.getUrl(),n=Object.assign(e,{url:t});return this.wire.sendAction(\"get-cookies\",n).then((({payload:e})=>e.data))}setMinLogLevel(e){return this.wire.sendAction(\"set-min-log-level\",{level:e}).then((()=>{}))}resolveUuid(e){return this.wire.sendAction(\"resolve-uuid\",{entityKey:e}).then((({payload:e})=>e.data))}executeOnRemote(e,t){return t.requestingIdentity=e,this.wire.ferryAction(t)}readRegistryValue(e,t,n){return this.wire.sendAction(\"read-registry-value\",{rootKey:e,subkey:t,value:n}).then((({payload:e})=>e.data))}registerExternalConnection(e){return this.wire.sendAction(\"register-external-connection\",{uuid:e}).then((({payload:e})=>e.data))}async getServiceConfiguration(e){if(\"string\"!=typeof e.name)throw new Error(\"Must provide an object with a `name` property having a string value\");const{name:t}=e;return this.wire.sendAction(\"get-service-configuration\",{name:t}).then((({payload:e})=>e.data))}async getSystemAppConfig(e){if(\"string\"!=typeof e)throw new Error(\"Must provide a string value for name of system app\");return this.wire.sendAction(\"get-system-app-configuration\",{name:e}).then((({payload:e})=>e.data))}async registerShutdownHandler(e){this.wire.sendAction(\"system-register-shutdown-handler\").catch((e=>{}));const{uuid:t,name:n}=this.wire.me;this.on(\"system-shutdown\",(i=>{e({proceed:()=>{this.wire.environment.raiseEvent(\"application/system-shutdown-handled\",{uuid:t,name:n,topic:\"application\"})}})}))}runRvmHealthCheck(){return this.wire.sendAction(\"run-rvm-health-check\").then((({payload:e})=>e.data))}async launchManifest(e,t={}){const{subscribe:n,...i}=t,r=i;if(n){const e=new ae.EventEmitter;n(e);const t=\"app-version-progress\",i=\"runtime-status\",o=\"app-version-complete\",s=\"app-version-error\",a=this.wire.environment.getNextMessageId().toString();r.appVersionId=a;const c=[o,t,i,s],d=e=>{const{appVersionId:t,topic:n,type:i,...r}=e;return{...r,type:c.find((e=>i.includes(e)))}},h=t=>{const n=d(t);e.emit(n.type,n)},l=()=>{this.removeListener(`${t}.${a}`,h),this.removeListener(`${i}.${a}`,h),this.removeListener(`${o}.${a}`,h),this.removeListener(`${s}.${a}`,h),this.removeListener(`${o}.${a}`,l),this.removeListener(`${s}.${a}`,l)};await Promise.all([this.on(`${t}.${a}`,h),this.on(`${i}.${a}`,h),this.once(`${o}.${a}`,h),this.once(`${s}.${a}`,h),this.once(`${o}.${a}`,l),this.once(`${s}.${a}`,l)])}return(await this.wire.sendAction(\"launch-manifest\",{manifestUrl:e,opts:r})).payload.data.manifest}async queryPermissionForCurrentContext(e){const t={uuid:this.wire.me.uuid,name:this.wire.me.name};return(await this.wire.sendAction(\"query-permission-for-current-context\",{apiName:e,identity:t})).payload.data}async enableNativeWindowIntegrationProvider(e){const{payload:t}=await this.wire.sendAction(\"enable-native-window-integration-provider\",{permissions:e});return t.data}async registerUsage({data:e,type:t}){await this.wire.sendAction(\"register-usage\",{data:e,type:t})}async getPrinters(){const{payload:e}=await this.wire.sendAction(\"system-get-printers\");return e.data}async updateProcessLoggingOptions(e){await this.wire.sendAction(\"system-update-process-logging-options\",{options:e})}async getDomainSettings(){const{payload:{data:e}}=await this.wire.sendAction(\"get-domain-settings\",this.identity);return e}async setDomainSettings(e){await this.wire.sendAction(\"set-domain-settings\",{domainSettings:e,...this.identity})}async refreshExtensions(){const{payload:e}=await this.wire.sendAction(\"refresh-extensions\");return e.data}async getInstalledExtensions(){const{payload:e}=await this.wire.sendAction(\"get-installed-extensions\");return e.data}}c.System=ce;var de={},he={};Object.defineProperty(he,\"__esModule\",{value:!0}),he.RefCounter=void 0;he.RefCounter=class{constructor(){this.topicRefMap=new Map}incRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t+1;n=i,this.topicRefMap.set(e,i)}else this.topicRefMap.set(e,1),n=1;return n}decRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t-1;this.topicRefMap.set(e,i),n=i}else n=-1;return n}actOnFirst(e,t,n){return 1===this.incRefCount(e)?t():n()}actOnLast(e,t,n){return 0===this.decRefCount(e)?t():n()}};var le={},ue={},pe={};Object.defineProperty(pe,\"__esModule\",{value:!0}),pe.ChannelBase=pe.ProtectedItems=void 0;const we=e=>async(t,n,i)=>{const r=await e(t,n,i);return void 0===r?n:r};pe.ProtectedItems=class{constructor(e,t){this.providerIdentity=e,this.close=t}};class ye{static defaultAction(e){throw new Error(`No action registered at target for ${e}`)}constructor(){this.subscriptions=new Map}async processAction(e,t,n){try{const i=this.subscriptions.has(e)?this.subscriptions.get(e):(t,n)=>(this.defaultAction??ye.defaultAction)(e,t,n),r=this.preAction?await this.preAction(e,t,n):t,o=await i(r,n);return this.postAction?await this.postAction(e,o,n):o}catch(t){if(this.errorMiddleware)return this.errorMiddleware(e,t,n);throw t}}beforeAction(e){if(this.preAction)throw new Error(\"Already registered beforeAction middleware\");this.preAction=we(e)}onError(e){if(this.errorMiddleware)throw new Error(\"Already registered error middleware\");this.errorMiddleware=e}afterAction(e){if(this.postAction)throw new Error(\"Already registered afterAction middleware\");this.postAction=we(e)}remove(e){this.subscriptions.delete(e)}setDefaultAction(e){if(this.defaultAction)throw new Error(\"default action can only be set once\");this.defaultAction=e}register(e,t){if(this.subscriptions.has(e))throw new Error(`Subscription already registered for action: ${e}. Unsubscribe before adding new subscription`);return this.subscriptions.set(e,t),!0}}pe.ChannelBase=ye;var fe,ge,me,ve=s&&s.__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)},Ce=s&&s.__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};Object.defineProperty(ue,\"__esModule\",{value:!0}),ue.ChannelClient=void 0;const be=pe,Ie=new Map;class Ee extends be.ChannelBase{static closeChannelByEndpointId(e){const t=Ie.get(e);t&&ve(t,me,\"f\").call(t)}static handleProviderDisconnect(e){for(const t of Ie.values())t.providerIdentity.channelId===e.channelId&&(t.disconnectListener(e),ve(t,me,\"f\").call(t))}constructor(e,t,n){super(),fe.set(this,void 0),ge.set(this,void 0),this.processAction=(e,t,n)=>super.processAction(e,t,n),me.set(this,(()=>{Ie.delete(this.endpointId),ve(this,ge,\"f\").close()})),Ce(this,fe,new be.ProtectedItems(e,t),\"f\"),this.disconnectListener=()=>{},this.endpointId=e.endpointId,Ce(this,ge,n,\"f\"),Ie.set(this.endpointId,this),n.receive(this.processAction)}get providerIdentity(){return ve(this,fe,\"f\").providerIdentity}async dispatch(e,t){if(ve(this,ge,\"f\").isEndpointConnected(this.providerIdentity.channelId))return ve(this,ge,\"f\").send(this.providerIdentity.channelId,e,t);throw new Error(\"The client you are trying to dispatch from is disconnected from the target provider.\")}onDisconnection(e){this.disconnectListener=t=>{try{e(t)}catch(e){throw new Error(`Error while calling the onDisconnection callback: ${e.message}`)}finally{this.disconnectListener=()=>{}}}}async disconnect(){await this.sendDisconnectAction(),ve(this,me,\"f\").call(this)}async sendDisconnectAction(){const e=ve(this,fe,\"f\");await e.close()}static async wireClose(e,t,n){const{channelName:i,uuid:r,name:o}=t;await e.sendAction(\"disconnect-from-channel\",{channelName:i,uuid:r,name:o,endpointId:n})}}ue.ChannelClient=Ee,fe=new WeakMap,ge=new WeakMap,me=new WeakMap;var xe={},Ae={};Object.defineProperty(Ae,\"__esModule\",{value:!0}),Ae.exhaustiveCheck=void 0,Ae.exhaustiveCheck=function(e,t){throw new Error(`Unsupported value: ${e}${t?`\\n Supported values are: ${t.join(\"\")}`:\"\"}`)};var Pe,Me,_e,Oe={},Se=s&&s.__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},Re=s&&s.__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)};Object.defineProperty(Oe,\"__esModule\",{value:!0}),Oe.ClassicInfo=Oe.ClassicStrategy=void 0;Oe.ClassicStrategy=class{constructor(e,t,n,i){this.messageReceiver=t,this.endpointId=n,this.providerIdentity=i,Pe.set(this,void 0),Me.set(this,new Map),_e.set(this,new Map),this.send=async(e,t,n)=>{const i=Re(this,Me,\"f\").get(e);if(!i)throw new Error(`Could not locate routing info for endpoint ${e}`);const r={...i};r.isLocalEndpointId&&delete r.endpointId,delete r.isLocalEndpointId;const o=Re(this,Pe,\"f\").sendAction(\"send-channel-message\",{...r,providerIdentity:this.providerIdentity,action:t,payload:n});Re(this,_e,\"f\").get(e)?.add(o);return(await o.catch((e=>{throw new Error(e.message)})).finally((()=>{Re(this,_e,\"f\").get(e)?.delete(o)}))).payload.data.result},this.close=async()=>{this.messageReceiver.removeEndpoint(this.providerIdentity.channelId,this.endpointId),[...Re(this,Me,\"f\").keys()].forEach((e=>this.closeEndpoint(e))),Se(this,Me,new Map,\"f\")},Se(this,Pe,e,\"f\")}onEndpointDisconnect(e,t){}receive(e){this.messageReceiver.addEndpoint(e,this.providerIdentity.channelId,this.endpointId)}async closeEndpoint(e){const t=Re(this,Me,\"f\").get(e);Re(this,Me,\"f\").delete(e);const n=Re(this,_e,\"f\").get(e);n?.forEach((n=>{const i=`Channel connection with identity uuid: ${t?.uuid} / name: ${t?.name} / endpointId: ${e} no longer connected.`;n.cancel(new Error(i))}))}isEndpointConnected(e){return Re(this,Me,\"f\").has(e)}addEndpoint(e,t){Re(this,Me,\"f\").set(e,t.endpointIdentity),Re(this,_e,\"f\").set(e,new Set)}isValidEndpointPayload(e){return\"string\"==typeof e?.endpointIdentity?.endpointId||\"string\"==typeof e?.endpointIdentity?.channelId}},Pe=new WeakMap,Me=new WeakMap,_e=new WeakMap,Oe.ClassicInfo={version:5,minimumVersion:0,type:\"classic\"};var Fe={},je={},ke={};Object.defineProperty(ke,\"__esModule\",{value:!0}),ke.errorToPOJO=void 0,ke.errorToPOJO=function(e){return{stack:e.stack,name:e.name,message:e.message,toString:()=>e.stack||e.toString()}};var Le,Te,$e=s&&s.__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)},Be=s&&s.__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};Object.defineProperty(je,\"__esModule\",{value:!0}),je.RTCEndpoint=void 0;const Ge=ke;je.RTCEndpoint=class{static isValidEndpointPayload(e){const t=e=>\"object\"==typeof e&&null!==e;return t(e)&&t(e.endpointIdentity)&&t(e.rtc)&&\"string\"==typeof e.endpointIdentity.endpointId}constructor({rtc:e,endpointIdentity:t}){this.responseMap=new Map,Le.set(this,null),Te.set(this,void 0),this.connectionStateChangeHandler=e=>{\"connected\"!==this.rtc.rtcClient.connectionState&&(this.rtc.rtcClient.removeEventListener(\"connectionstatechange\",this.connectionStateChangeHandler),this.close(),$e(this,Te,\"f\")&&$e(this,Te,\"f\").call(this))},this.send=async(e,t)=>{const n=`message-${Math.random()}`,i=new Promise(((e,t)=>{this.responseMap.set(n,{resolve:e,reject:t})}));return this.rtc.channels.request.send(JSON.stringify({action:e,payload:t,messageId:n})),i},this.close=()=>{this.responseMap.forEach((e=>e.reject(\"Connection has closed.\"))),this.responseMap=new Map,this.rtc.channels.request.close(),this.rtc.channels.response.close(),this.rtc.rtcClient.close()},this.rtc=e,this.endpointIdentity=t,this.rtc.channels.response.addEventListener(\"message\",(e=>{let{data:t}=e;e.data instanceof ArrayBuffer&&(t=(new TextDecoder).decode(e.data));const{messageId:n,payload:i,success:r,error:o}=JSON.parse(t),{resolve:s,reject:a}=this.responseMap.get(n)??{};s&&a?(this.responseMap.delete(n),r?s(i):a(o)):(console.log(\"Could not find id in responseMap.\"),console.log(e))})),this.rtc.channels.request.addEventListener(\"message\",(async e=>{let{data:n}=e;e.data instanceof ArrayBuffer&&(n=(new TextDecoder).decode(e.data));const{messageId:i,action:r,payload:o}=JSON.parse(n);if($e(this,Le,\"f\"))try{const e=await $e(this,Le,\"f\").call(this,r,o,t);this.rtc.channels.response.send(JSON.stringify({messageId:i,payload:e,success:!0}))}catch(e){\"open\"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,error:(0,Ge.errorToPOJO)(e),success:!1}))}else\"open\"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,success:!1,error:\"Connection not ready.\"}))})),this.rtc.rtcClient.addEventListener(\"connectionstatechange\",this.connectionStateChangeHandler),Object.values(this.rtc.channels).forEach((e=>{e.onclose=e=>{[...this.responseMap.values()].forEach((e=>e.reject(new Error(\"RTCDataChannel closed unexpectedly, this is most commonly caused by message size. Note: RTC Channels have a message size limit of ~255kB.\")))),this.close(),$e(this,Te,\"f\")&&$e(this,Te,\"f\").call(this)}}))}onDisconnect(e){if($e(this,Te,\"f\"))throw new Error(\"RTCEndpoint disconnectListener cannot be set twice.\");Be(this,Te,e,\"f\")}receive(e){if($e(this,Le,\"f\"))throw new Error(\"You have already set a listener for this RTC Endpoint.\");Be(this,Le,e,\"f\")}get connected(){return\"connected\"===this.rtc.rtcClient.connectionState}},Le=new WeakMap,Te=new WeakMap;var We,He,Ne,De={},Ue=s&&s.__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)},Ve=s&&s.__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};Object.defineProperty(De,\"__esModule\",{value:!0}),De.EndpointStrategy=void 0;De.EndpointStrategy=class{constructor(e,t,n){this.EndpointType=e,this.StrategyName=n,We.set(this,null),He.set(this,new Map),Ne.set(this,!0),this.send=async(e,t,n)=>this.getEndpointById(e).send(t,n),this.close=async()=>{Ue(this,Ne,\"f\")&&(Ue(this,He,\"f\").forEach((e=>e.close())),Ve(this,He,new Map,\"f\")),Ve(this,Ne,!1,\"f\")},this.isValidEndpointPayload=t}onEndpointDisconnect(e,t){this.getEndpointById(e).onDisconnect(t)}receive(e){if(Ue(this,We,\"f\"))throw new Error(`You have already set a listener for this ${this.StrategyName} Strategy`);Ve(this,We,e,\"f\"),Ue(this,He,\"f\").forEach((e=>e.receive(Ue(this,We,\"f\"))))}getEndpointById(e){const t=Ue(this,He,\"f\").get(e);if(!t)throw new Error(`Client with endpoint id ${e} is not connected`);return t}get connected(){return Ue(this,Ne,\"f\")}isEndpointConnected(e){return Ue(this,He,\"f\").has(e)}addEndpoint(e,t){if(!Ue(this,Ne,\"f\"))return void console.warn(`Adding endpoint to disconnected ${this.StrategyName} Strategy`);const n=new this.EndpointType(t);Ue(this,We,\"f\")&&n.receive(Ue(this,We,\"f\")),Ue(this,He,\"f\").set(e,n)}async closeEndpoint(e){Ue(this,He,\"f\").delete(e)}},We=new WeakMap,He=new WeakMap,Ne=new WeakMap,Object.defineProperty(Fe,\"__esModule\",{value:!0}),Fe.RTCInfo=Fe.RTCStrategy=void 0;const ze=je,Ke=De;class qe extends Ke.EndpointStrategy{constructor(){super(ze.RTCEndpoint,ze.RTCEndpoint.isValidEndpointPayload,\"RTC\")}}Fe.RTCStrategy=qe,Fe.RTCInfo={version:2,minimumVersion:0,type:\"rtc\"};var Je={};Object.defineProperty(Je,\"__esModule\",{value:!0}),Je.RTCICEManager=void 0;const Ye=d;class Ze extends Ye.EmitterBase{constructor(e){super(e,\"channel\"),this.ensureChannelOpened=e=>new Promise(((t,n)=>{if(\"open\"===e.readyState)t();else if(\"connecting\"===e.readyState){const n=()=>{e.removeEventListener(\"open\",n),t()};e.addEventListener(\"open\",n)}else n(new Error(\"This Channel has already closed\"))}))}static createDataChannelPromise(e,t){let n;const i=new Promise((e=>{n=e})),r=i=>{const o=()=>{i.channel.removeEventListener(\"open\",o),n(i.channel)};i.channel.label===e&&(i.channel.addEventListener(\"open\",o),t.removeEventListener(\"datachannel\",r))};return t.addEventListener(\"datachannel\",r),i}async listenForProviderIce(e,t){await this.on(this.createProviderEventName(e),t,{timestamp:Date.now()})}async raiseProviderIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createProviderEventName(e)),t)}async listenForClientIce(e,t){await this.on(this.createClientEventName(e),t,{timestamp:Date.now()})}async raiseClientIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createClientEventName(e)),t)}cleanupIceListeners(e){this.removeAllListeners(this.createClientEventName(e)),this.removeAllListeners(this.createProviderEventName(e))}createClientEventName(e){return`ice-client-${e}`}createProviderEventName(e){return`ice-provider-${e}`}createRouteString(e){return`channel/${e}`}createRtcPeer(){return this.wire.environment.getRtcPeer()}async startClientOffer(){const e=Math.random().toString(),t=this.createRtcPeer();t.addEventListener(\"icecandidate\",(async t=>{t.candidate&&await this.raiseClientIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForProviderIce(e,(async e=>{await t.addIceCandidate(e.candidate)}));const n={request:t.createDataChannel(\"request\"),response:t.createDataChannel(\"response\")},i=await t.createOffer();await t.setLocalDescription(i);const r=Promise.all([n.request,n.response].map(this.ensureChannelOpened)).then((()=>{}));return{rtcClient:t,channels:n,offer:i,rtcConnectionId:e,channelsOpened:r}}async finishClientOffer(e,t,n){return await e.setRemoteDescription(t),await n,!0}async createProviderAnswer(e,t){const n=this.createRtcPeer(),i=Ze.createDataChannelPromise(\"request\",n),r=Ze.createDataChannelPromise(\"response\",n);n.addEventListener(\"icecandidate\",(async t=>{t.candidate&&await this.raiseProviderIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForClientIce(e,(async e=>{await n.addIceCandidate(e.candidate)})),await n.setRemoteDescription(t);const o=await n.createAnswer();await n.setLocalDescription(o);const s=Promise.all([i,r]).then((([t,n])=>(this.cleanupIceListeners(e),{request:t,response:n})));return{rtcClient:n,answer:o,channels:s}}}Je.RTCICEManager=Ze;var Qe={},Xe={};function et(e){return[...e.split(\".\").reverse().entries()].reduce(((e,[t,n])=>e+ +n*1e4**t),0)}function tt(e,t){return et(e)>=et(t)}function nt(e){return e.split(\"/\")[0]}Object.defineProperty(Xe,\"__esModule\",{value:!0}),Xe.runtimeUuidMeetsMinimumRuntimeVersion=Xe.parseRuntimeUuid=Xe.meetsMinimumRuntimeVersion=void 0,Xe.meetsMinimumRuntimeVersion=tt,Xe.parseRuntimeUuid=nt,Xe.runtimeUuidMeetsMinimumRuntimeVersion=function(e,t){return tt(nt(e),t)};var it,rt,ot,st,at,ct=s&&s.__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)},dt=s&&s.__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};Object.defineProperty(Qe,\"__esModule\",{value:!0}),Qe.ChannelProvider=void 0;const ht=pe,lt=Xe;class ut extends ht.ChannelBase{get connections(){return[...ct(this,it,\"f\")]}static handleClientDisconnection(e,t){const n=e.connections.find((e=>e.endpointId===t.endpointId));if(n)ct(e,st,\"f\").call(e,n);else{e.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name)).forEach(ct(e,st,\"f\"))}e.disconnectListener(t)}static setProviderRemoval(e,t){ut.removalMap.set(e,t)}constructor(e,t,n){super(),it.set(this,void 0),rt.set(this,void 0),ot.set(this,void 0),st.set(this,(e=>{const t=this.connections.filter((t=>t.endpointId!==e.endpointId));ct(this,ot,\"f\").closeEndpoint(e.endpointId),dt(this,it,t,\"f\")})),this.processAction=async(e,t,n)=>(ut.clientIsMultiRuntime(n)&&!(0,lt.runtimeUuidMeetsMinimumRuntimeVersion)(n.runtimeUuid,\"18.87.56.0\")?this.handleMultiRuntimeLegacyClient(n):this.checkForClientConnection(n),super.processAction(e,t,n)),at.set(this,(()=>{ct(this,ot,\"f\").close();const e=ut.removalMap.get(this);e&&e()})),dt(this,rt,new ht.ProtectedItems(e,t),\"f\"),this.connectListener=()=>{},this.disconnectListener=()=>{},dt(this,it,[],\"f\"),dt(this,ot,n,\"f\"),n.receive(this.processAction)}dispatch(e,t,n){const i=e.endpointId??this.getEndpointIdForOpenFinId(e,t);return i&&ct(this,ot,\"f\").isEndpointConnected(i)?ct(this,ot,\"f\").send(i,t,n):Promise.reject(new Error(`Client connection with identity uuid: ${e.uuid} / name: ${e.name} / endpointId: ${i} no longer connected.`))}async processConnection(e,t){return ct(this,it,\"f\").push(e),this.connectListener(e,t)}publish(e,t){return this.connections.map((n=>ct(this,ot,\"f\").send(n.endpointId,e,t)))}onConnection(e){this.connectListener=e}onDisconnection(e){this.disconnectListener=e}async destroy(){const e=ct(this,rt,\"f\");e.providerIdentity,dt(this,it,[],\"f\"),await e.close(),ct(this,at,\"f\").call(this)}async getAllClientInfo(){return this.connections.map((e=>{const{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}=e;return{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}}))}checkForClientConnection(e){if(!this.isClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider.\\n Client Identity: {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}isClientConnected(e){return ut.clientIdentityIncludesEndpointId(e)?this.connections.some((t=>t.endpointId===e.endpointId&&t.uuid===e.uuid&&t.name===e.name)):this.isLegacyClientConnected(e)}isLegacyClientConnected(e){return this.connections.some((t=>t.uuid===e.uuid&&t.name===e.name))}handleMultiRuntimeLegacyClient(e){if(!this.isLegacyClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider. Client Identity:\\n {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}getEndpointIdForOpenFinId(e,t){const n=this.connections.filter((t=>t.name===e.name&&t.uuid===e.uuid));if(n.length>=2){const n=ct(this,rt,\"f\"),{uuid:i,name:r}=e,o=n?.providerIdentity.uuid,s=n?.providerIdentity.name;console.warn(`WARNING: Dispatch call may have unintended results. The \"to\" argument of your dispatch call is missing the\\n \"endpointId\" parameter. The identity you are dispatching to ({uuid: ${i}, name: ${r}})\\n has multiple channelClients for this channel. Your dispatched action: (${t}) from the provider:\\n ({uuid: ${o}, name: ${s}}) will only be processed by the most recently-created client.`)}return n.pop()?.endpointId}static clientIdentityIncludesEndpointId(e){return void 0!==e.endpointId}static clientIsMultiRuntime(e){return void 0!==e.runtimeUuid}static async wireClose(e,t){await e.sendAction(\"destroy-channel\",{channelName:t})}}Qe.ChannelProvider=ut,it=new WeakMap,rt=new WeakMap,ot=new WeakMap,st=new WeakMap,at=new WeakMap,ut.removalMap=new WeakMap;var pt={};Object.defineProperty(pt,\"__esModule\",{value:!0}),pt.MessageReceiver=void 0;const wt=ue,yt=d;class ft extends yt.Base{constructor(e){super(e),this.onmessage=e=>\"process-channel-message\"===e.action&&(this.processChannelMessage(e),!0),this.endpointMap=new Map,this.latestEndpointIdByChannelId=new Map,e.registerMessageHandler(this.onmessage.bind(this))}async processChannelMessage(e){const{senderIdentity:t,providerIdentity:n,action:i,ackToSender:r,payload:o,intendedTargetIdentity:s}=e.payload,a=s.channelId??s.endpointId??this.latestEndpointIdByChannelId.get(n.channelId),c=this.endpointMap.get(a);if(!c)return r.payload.success=!1,r.payload.reason=`Client connection with identity uuid: ${this.wire.me.uuid} / name: ${this.wire.me.name} / endpointId: ${a} no longer connected.`,this.wire.sendRaw(r);try{const e=await c(i,o,t);return r.payload.payload=r.payload.payload||{},r.payload.payload.result=e,this.wire.sendRaw(r)}catch(e){return r.payload.success=!1,r.payload.reason=e.message,this.wire.sendRaw(r)}}addEndpoint(e,t,n){this.endpointMap.set(n,e),t!==n&&this.latestEndpointIdByChannelId.set(t,n)}removeEndpoint(e,t){this.endpointMap.delete(t),this.latestEndpointIdByChannelId.get(e)===t&&this.latestEndpointIdByChannelId.delete(e)}checkForPreviousClientConnection(e){const t=this.latestEndpointIdByChannelId.get(e);t&&(wt.ChannelClient.closeChannelByEndpointId(t),console.warn(\"You have created a second connection to an older provider. First connection has been removed from the clientMap\"),console.warn(\"If the provider calls publish(), you may receive multiple messages.\"))}}pt.MessageReceiver=ft;var gt={};Object.defineProperty(gt,\"__esModule\",{value:!0}),gt.ProtocolManager=void 0;gt.ProtocolManager=class{constructor(e){this.ProtocolsInPreferenceOrder=e,this.DefaultClientProtocols=[\"classic\"],this.DefaultProviderProtocols=[\"classic\"],this.getClientProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultClientProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(\", \")}.`);return t},this.getProviderProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultProviderProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(\", \")}.`);return t},this.getCompatibleProtocols=(e,t)=>t.supportedProtocols.filter((t=>e.some((e=>e.type===t.type&&t.version>=e.minimumVersion&&e.version>=(t.minimumVersion??0))))).slice(0,t.maxProtocols)}};var mt={};Object.defineProperty(mt,\"__esModule\",{value:!0});class vt{static combine(e,t){return new vt(e,t)}constructor(e,t){this.primary=e,this.secondary=t}onEndpointDisconnect(e,t){this.primary.onEndpointDisconnect(e,(()=>{this.secondary.isEndpointConnected(e)||t()})),this.secondary.onEndpointDisconnect(e,(()=>{this.primary.isEndpointConnected(e)||t()}))}isValidEndpointPayload(e){return this.primary.isValidEndpointPayload(e)||this.secondary.isValidEndpointPayload(e)}async closeEndpoint(e){await this.primary.closeEndpoint(e),await this.secondary.closeEndpoint(e)}isEndpointConnected(e){return this.primary.isEndpointConnected(e)||this.secondary.isEndpointConnected(e)}async addEndpoint(e,t){this.primary.isValidEndpointPayload(t)&&await this.primary.addEndpoint(e,t),this.secondary.isValidEndpointPayload(t)&&await this.secondary.addEndpoint(e,t)}receive(e){this.primary.receive(e),this.secondary.receive(e)}send(e,t,n){return this.primary.isEndpointConnected(e)?this.primary.send(e,t,n):this.secondary.send(e,t,n)}async close(){await Promise.all([this.primary.close(),this.secondary.close()])}}mt.default=vt;var Ct,bt,It=s&&s.__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},Et=s&&s.__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)},xt=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(xe,\"__esModule\",{value:!0}),xe.ConnectionManager=void 0;const At=Ae,Pt=d,Mt=Oe,_t=Fe,Ot=Je,St=Qe,Rt=pt,Ft=gt,jt=xt(mt);class kt extends Pt.Base{static getProtocolOptionsFromStrings(e){return e.map((e=>{switch(e){case\"rtc\":return _t.RTCInfo;case\"classic\":return Mt.ClassicInfo;default:return(0,At.exhaustiveCheck)(e,[\"rtc\",\"classic\"])}}))}constructor(e){super(e),Ct.set(this,void 0),bt.set(this,void 0),this.removeChannelFromProviderMap=e=>{this.providerMap.delete(e)},this.onmessage=e=>\"process-channel-connection\"===e.action&&(this.processChannelConnection(e),!0),this.providerMap=new Map,this.protocolManager=new Ft.ProtocolManager(\"node\"===this.wire.environment.type?[\"classic\"]:[\"rtc\",\"classic\"]),It(this,Ct,new Rt.MessageReceiver(e),\"f\"),It(this,bt,new Ot.RTCICEManager(e),\"f\"),e.registerMessageHandler(this.onmessage.bind(this))}createProvider(e,t){const n=Object.assign(this.wire.environment.getDefaultChannelOptions().create,e||{}),i=this.protocolManager.getProviderProtocols(n?.protocols),r=i.map((e=>{switch(e){case\"rtc\":return new _t.RTCStrategy;case\"classic\":return new Mt.ClassicStrategy(this.wire,Et(this,Ct,\"f\"),t.channelId,t);default:return(0,At.exhaustiveCheck)(e,[\"rtc\",\"classic\"])}}));let o;if(2===r.length){const[e,t]=r;o=jt.default.combine(e,t)}else{if(1!==r.length)throw new Error(\"failed to combine strategies\");[o]=r}const s=new St.ChannelProvider(t,(()=>St.ChannelProvider.wireClose(this.wire,t.channelName)),o),a=t.channelId;return this.providerMap.set(a,{provider:s,strategy:o,supportedProtocols:kt.getProtocolOptionsFromStrings(i)}),St.ChannelProvider.setProviderRemoval(s,this.removeChannelFromProviderMap.bind(this)),s}async createClientOffer(e){const t=this.protocolManager.getClientProtocols(e?.protocols);let n;return{offer:{supportedProtocols:await Promise.all(t.map((async e=>{switch(e){case\"rtc\":{const{rtcClient:e,channels:t,offer:i,rtcConnectionId:r,channelsOpened:o}=await Et(this,bt,\"f\").startClientOffer();return n={rtcClient:e,channels:t,channelsOpened:o},{type:\"rtc\",version:_t.RTCInfo.version,payload:{offer:i,rtcConnectionId:r}}}case\"classic\":return{type:\"classic\",version:Mt.ClassicInfo.version};default:return(0,At.exhaustiveCheck)(e,[\"rtc\",\"classic\"])}}))),maxProtocols:2},rtc:n}}async createClientStrategy(e,t){t.endpointId||(t.endpointId=this.wire.environment.getNextMessageId(),Et(this,Ct,\"f\").checkForPreviousClientConnection(t.channelId));const n=t.answer??{supportedProtocols:[{type:\"classic\",version:1}]},i=(await Promise.all(n.supportedProtocols.map((async n=>\"rtc\"===n.type&&e?(await Et(this,bt,\"f\").finishClientOffer(e.rtcClient,n.payload.answer,e.channelsOpened),new _t.RTCStrategy):\"classic\"===n.type?new Mt.ClassicStrategy(this.wire,Et(this,Ct,\"f\"),t.endpointId,t):null)))).filter((e=>null!==e));let r;if(e&&!i.some((e=>e instanceof _t.RTCStrategy))&&e&&e.rtcClient.close(),i.length>=2)r=jt.default.combine(i[0],i[1]);else{if(!i.length)throw new Error(\"No compatible protocols\");[r]=i}const o={endpointIdentity:t,rtc:e};return r.addEndpoint(t.channelId,o),r}async processChannelConnection(e){const{clientIdentity:t,providerIdentity:n,ackToSender:i,payload:r,offer:o}=e.payload;t.endpointId?t.isLocalEndpointId=!1:(t.endpointId=this.wire.environment.getNextMessageId(),t.isLocalEndpointId=!0);const s=n.channelId,a=this.providerMap.get(s);if(!a)return i.payload.success=!1,i.payload.reason=`Channel \"${n.channelName}\" has been destroyed.`,this.wire.sendRaw(i);const{provider:c,strategy:d,supportedProtocols:h}=a;try{if(!(c instanceof St.ChannelProvider))throw Error(\"Cannot connect to a channel client\");const e=o??{supportedProtocols:[{type:\"classic\",version:1}],maxProtocols:1},n=this.protocolManager.getCompatibleProtocols(h,e);if(!n.length)throw new Error(\"This provider does not support any of the offered protocols.\");const s=await c.processConnection(t,r);i.payload.payload=i.payload.payload||{};let a={supportedProtocols:[],endpointPayloadPromise:Promise.resolve({endpointIdentity:t})};return a=await n.reduce((async(e,t)=>{const n=await e;if(\"rtc\"===t.type){const{answer:e,rtcClient:i,channels:r}=await Et(this,bt,\"f\").createProviderAnswer(t.payload.rtcConnectionId,t.payload.offer);n.supportedProtocols.push({type:\"rtc\",version:_t.RTCInfo.version,payload:{answer:e}}),n.endpointPayloadPromise=n.endpointPayloadPromise.then((e=>r.then((t=>({...e,rtc:{rtcClient:i,channels:t}})))))}else n.supportedProtocols.push({type:\"classic\",version:Mt.ClassicInfo.version});return n}),Promise.resolve(a)),a.endpointPayloadPromise.then((e=>d.addEndpoint(t.endpointId,e))),i.payload.payload.result=s,i.payload.payload.answer=a,this.wire.sendRaw(i)}catch(e){return i.payload.success=!1,i.payload.reason=e.message,this.wire.sendRaw(i)}}}xe.ConnectionManager=kt,Ct=new WeakMap,bt=new WeakMap;var Lt,Tt,$t,Bt=s&&s.__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},Gt=s&&s.__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)};Object.defineProperty(le,\"__esModule\",{value:!0}),le.Channel=void 0;const Wt=t,Ht=G,Nt=d,Dt=ue,Ut=xe,Vt=Qe;function zt(e){const t=Math.floor(e/10),n=Math.min(3e4,500*2**t);return new Promise((e=>{setTimeout((()=>{e(!1)}),n)}))}class Kt extends Nt.EmitterBase{constructor(e){super(e,\"channel\"),Lt.set(this,void 0),Tt.set(this,new Wt.EventEmitter),$t.set(this,new Ht.AsyncRetryableLazy((async()=>{await Promise.all([this.on(\"disconnected\",(e=>{Dt.ChannelClient.handleProviderDisconnect(e)})),this.on(\"connected\",((...e)=>{Gt(this,Tt,\"f\").emit(\"connected\",...e)}))]).catch((()=>new Error(\"error setting up channel connection listeners\")))}))),Bt(this,Lt,new Ut.ConnectionManager(e),\"f\")}async getAllChannels(){return this.wire.sendAction(\"get-all-channels\").then((({payload:e})=>e.data))}async onChannelConnect(e){await this.on(\"connected\",e)}async onChannelDisconnect(e){await this.on(\"disconnected\",e)}async safeConnect(e,t,n){const i={count:0};do{let r=()=>{};const o=new Promise((t=>{r=n=>{e===n.channelName&&t(!0)},Gt(this,Tt,\"f\").on(\"connected\",r)}));try{if(i.count>0){i.gotConnectedEvent=await Promise.race([zt(i.count),o]);const t=await this.wire.sendAction(\"connect-to-channel\",{...n,retryInfo:i});return console.log(`Successfully connected to channelName: ${e}`),t.payload.data}const t=this.wire.sendAction(\"connect-to-channel\",n);i.originalMessageId=t.messageId;return(await t).payload.data}catch(n){if(!n.message.includes(\"internal-nack\"))throw n;t&&0===i.count&&console.warn(`No channel found for channelName: ${e}. Waiting for connection...`)}finally{i.count+=1,Gt(this,Tt,\"f\").removeListener(\"connected\",r)}}while(t);throw new Error(`No channel found for channelName: ${e}.`)}async connect(e,t={}){if(await Gt(this,$t,\"f\").getValue(),!e||\"string\"!=typeof e)throw new Error(\"Please provide a channelName string to connect to a channel.\");const n={wait:!0,...this.wire.environment.getDefaultChannelOptions().connect,...t},{offer:i,rtc:r}=await Gt(this,Lt,\"f\").createClientOffer(n);let o;(this.fin.me.isFrame||this.fin.me.isView||this.fin.me.isWindow)&&(o=(await this.fin.me.getInfo()).url);const s={channelName:e,...n,offer:i,connectionUrl:o},a=await this.safeConnect(e,n.wait,s),c=await Gt(this,Lt,\"f\").createClientStrategy(r,a),d=new Dt.ChannelClient(a,(()=>Dt.ChannelClient.wireClose(this.wire,a,a.endpointId)),c);return c.onEndpointDisconnect(a.channelId,(async()=>{try{await d.sendDisconnectAction()}catch(e){console.warn(`Something went wrong during disconnect for client with uuid: ${a.uuid} / name: ${a.name} / endpointId: ${a.endpointId}.`)}finally{Dt.ChannelClient.handleProviderDisconnect(a)}})),d}async create(e,t){if(!e)throw new Error(\"Please provide a channelName to create a channel\");const{payload:{data:n}}=await this.wire.sendAction(\"create-channel\",{channelName:e}),i=Gt(this,Lt,\"f\").createProvider(t,n);return this.on(\"client-disconnected\",(t=>{t.channelName===e&&Vt.ChannelProvider.handleClientDisconnection(i,t)})),i}}le.Channel=Kt,Lt=new WeakMap,Tt=new WeakMap,$t=new WeakMap,Object.defineProperty(de,\"__esModule\",{value:!0}),de.InterAppPayload=de.InterApplicationBus=void 0;const qt=t,Jt=d,Yt=he,Zt=le,Qt=O;class Xt extends Jt.Base{constructor(e){super(e),this.events={subscriberAdded:\"subscriber-added\",subscriberRemoved:\"subscriber-removed\"},this.refCounter=new Yt.RefCounter,this.Channel=new Zt.Channel(e),this.emitter=new qt.EventEmitter,e.registerMessageHandler(this.onmessage.bind(this)),this.on=this.emitter.on.bind(this.emitter),this.removeAllListeners=this.emitter.removeAllListeners.bind(this.emitter)}async publish(e,t){await this.wire.sendAction(\"publish-message\",{topic:e,message:t,sourceWindowName:this.me.name})}async send(e,t,n){const i=(0,Qt.validateIdentity)(e);if(i)throw new Error(i);await this.wire.sendAction(\"send-message\",{destinationUuid:e.uuid,destinationWindowName:e.name,topic:t,message:n,sourceWindowName:this.me.name})}subscribe(e,t,n){const i=this.createSubscriptionKey(e.uuid,e.name||\"*\",t);return this.emitter.on(i,n),this.refCounter.actOnFirst(i,(async()=>{await this.wire.sendAction(\"subscribe\",{sourceUuid:e.uuid,sourceWindowName:e.name||\"*\",topic:t,destinationWindowName:this.me.name})}),(()=>Promise.resolve()))}unsubscribe(e,t,n){const i=e.name||\"*\",r=this.createSubscriptionKey(e.uuid,i,t);return this.emitter.removeListener(r,n),this.refCounter.actOnLast(r,(async()=>{await this.wire.sendAction(\"unsubscribe\",{sourceUuid:e.uuid,sourceWindowName:i,topic:t,destinationWindowName:this.me.name})}),(()=>new Promise((e=>e)).then((()=>{}))))}processMessage(e){const{payload:{message:t,sourceWindowName:n,sourceUuid:i,topic:r}}=e,o=[this.createSubscriptionKey(i,n,r),this.createSubscriptionKey(i,\"*\",r),this.createSubscriptionKey(\"*\",\"*\",r)],s={uuid:i,name:n};o.forEach((e=>{this.emitter.emit(e,t,s)}))}emitSubscriverEvent(e,t){const{payload:{targetName:n,uuid:i,topic:r}}=t,o={name:n,uuid:i,topic:r};this.emitter.emit(e,o)}createSubscriptionKey(e,t,n){const i=t||\"*\";if(!(e&&i&&n))throw new Error(\"Missing uuid, name, or topic string\");return function(...e){return e.map((e=>Buffer.from(`${e}`).toString(\"base64\"))).join(\"/\")}(e,i,n)}onmessage(e){const{action:t}=e;switch(t){case\"process-message\":this.processMessage(e);break;case this.events.subscriberAdded:this.emitSubscriverEvent(this.events.subscriberAdded,e);break;case this.events.subscriberRemoved:this.emitSubscriverEvent(this.events.subscriberRemoved,e)}return!0}}de.InterApplicationBus=Xt;de.InterAppPayload=class{};var en={};Object.defineProperty(en,\"__esModule\",{value:!0}),en.Clipboard=void 0;const tn=d;class nn extends tn.Base{async writeText(e){await this.wire.sendAction(\"clipboard-write-text\",e)}async readText(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-text\",{type:e});return t.data}async writeImage(e){await this.wire.sendAction(\"clipboard-write-image\",e)}async readImage(e={format:\"dataURL\"}){const{payload:t}=await this.wire.sendAction(\"clipboard-read-image\",e);return t.data}async writeHtml(e){await this.wire.sendAction(\"clipboard-write-html\",e)}async readHtml(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-html\",{type:e});return t.data}async writeRtf(e){await this.wire.sendAction(\"clipboard-write-rtf\",e)}async readRtf(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-rtf\",{type:e});return t.data}async write(e){await this.wire.sendAction(\"clipboard-write\",e)}async getAvailableFormats(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-formats\",{type:e});return t.data}}en.Clipboard=nn;var rn={},on={},sn={};Object.defineProperty(sn,\"__esModule\",{value:!0}),sn.ExternalApplication=void 0;const an=d;class cn extends an.EmitterBase{constructor(e,t){super(e,\"external-application\",t.uuid),this.identity=t}getInfo(){return this.wire.sendAction(\"get-external-application-info\",this.identity).then((({payload:e})=>e.data))}}sn.ExternalApplication=cn,Object.defineProperty(on,\"__esModule\",{value:!0}),on.ExternalApplicationModule=void 0;const dn=d,hn=sn;class ln extends dn.Base{wrap(e){return this.wire.sendAction(\"external-application-wrap\").catch((e=>{})),Promise.resolve(new hn.ExternalApplication(this.wire,{uuid:e}))}wrapSync(e){return this.wire.sendAction(\"external-application-wrap-sync\").catch((e=>{})),new hn.ExternalApplication(this.wire,{uuid:e})}}on.ExternalApplicationModule=ln,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(on,e),n(sn,e)}(rn);var un={},pn={},wn={};Object.defineProperty(wn,\"__esModule\",{value:!0}),wn._Frame=void 0;const yn=d;class fn extends yn.EmitterBase{constructor(e,t){super(e,\"frame\",t.uuid,t.name),this.identity=t}getInfo(){return this.wire.sendAction(\"get-frame-info\",this.identity).then((({payload:e})=>e.data))}getParentWindow(){return this.wire.sendAction(\"get-parent-window\",this.identity).then((({payload:e})=>e.data))}}wn._Frame=fn,Object.defineProperty(pn,\"__esModule\",{value:!0}),pn._FrameModule=void 0;const gn=d,mn=O,vn=wn;class Cn extends gn.Base{async wrap(e){this.wire.sendAction(\"frame-wrap\").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}wrapSync(e){this.wire.sendAction(\"frame-wrap-sync\").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}getCurrent(){return this.wire.sendAction(\"frame-get-current\").catch((e=>{})),Promise.resolve(new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity()))}getCurrentSync(){return this.wire.sendAction(\"frame-get-current-sync\").catch((e=>{})),new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity())}}pn._FrameModule=Cn,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(pn,e),n(wn,e)}(un);var bn={};Object.defineProperty(bn,\"__esModule\",{value:!0}),bn.GlobalHotkey=void 0;const In=d;class En extends In.EmitterBase{constructor(e){super(e,\"global-hotkey\")}async register(e,t){await this.on(e,t),await this.wire.sendAction(\"global-hotkey-register\",{hotkey:e})}async unregister(e){await this.removeAllListeners(e),await this.wire.sendAction(\"global-hotkey-unregister\",{hotkey:e})}async unregisterAll(){await Promise.all(this.eventNames().filter((e=>!(\"registered\"===e||\"unregistered\"===e))).map((e=>this.removeAllListeners(e)))),await this.wire.sendAction(\"global-hotkey-unregister-all\",{})}async isRegistered(e){const{payload:{data:t}}=await this.wire.sendAction(\"global-hotkey-is-registered\",{hotkey:e});return t}}bn.GlobalHotkey=En;var xn,An={},Pn={},Mn={},_n=s&&s.__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)};Object.defineProperty(Mn,\"__esModule\",{value:!0}),Mn.Platform=void 0;const On=d,Sn=O,Rn=new Map;class Fn extends On.EmitterBase{constructor(e,t){super(t.wire,\"application\",e.uuid),this.getClient=e=>{this.wire.sendAction(\"platform-get-client\",this.identity).catch((e=>{}));const t=e||this.identity,{uuid:n}=t;if(!Rn.has(n)){const e=_n(this,xn,\"f\").call(this,n);Rn.set(n,e)}return Rn.get(n)},xn.set(this,(async e=>{try{const t=`custom-frame-${e}`,n=await this._channel.connect(t,{wait:!1});return n.onDisconnection((()=>{Rn.delete(e)})),n}catch(t){throw Rn.delete(e),new Error(\"The targeted Platform is not currently running. Listen for application-started event for the given Uuid.\")}})),this.launchLegacyManifest=this.launchContentManifest;const n=(0,Sn.validateIdentity)(e);if(n)throw new Error(n);this._channel=t,this.identity={uuid:e.uuid},this.Layout=this.fin.Platform.Layout,this.Application=this.fin.Application.wrapSync(this.identity)}async createView(e,t,n){this.wire.sendAction(\"platform-create-view\",this.identity).catch((e=>{}));const i=await this.getClient(),r=await i.dispatch(\"create-view\",{target:t,opts:e,targetView:n});if(!r||(0,Sn.validateIdentity)(r.identity))throw new Error(`When overwriting the createView call, please return an object that has a valid 'identity' property: ${JSON.stringify(r)}`);return this.fin.View.wrapSync(r.identity)}async createWindow(e){this.wire.sendAction(\"platform-create-window\",this.identity).catch((e=>{}));const t=await this.getClient();e.reason||(e.reason=\"api-call\");const n=await t.dispatch(\"create-view-container\",e);if(!n||(0,Sn.validateIdentity)(n.identity))throw new Error(`When overwriting the createWindow call, please return an object that has a valid 'identity' property: ${JSON.stringify(n)}`);const{identity:i}=n,r=this.fin.Window.wrapSync(i);return r.name=i.name,r.uuid=i.uuid,r}async quit(){this.wire.sendAction(\"platform-quit\",this.identity).catch((e=>{}));return(await this.getClient()).dispatch(\"quit\")}async closeView(e){this.wire.sendAction(\"platform-close-view\",this.identity).catch((e=>{}));const t=await this.getClient();await t.dispatch(\"close-view\",{view:e})}async reparentView(e,t){console.warn(\"Platform.reparentView has been deprecated, please use Platform.createView\"),this.wire.sendAction(\"platform-reparent-view\",this.identity).catch((e=>{}));const n={...e,uuid:e.uuid??this.identity.uuid},i=await this.fin.View.wrap(n),r=await i.getOptions();return this.createView(r,t)}async getSnapshot(){this.wire.sendAction(\"platform-get-snapshot\",this.identity).catch((e=>{}));return(await this.getClient()).dispatch(\"get-snapshot\")}async getViewSnapshot(e){return(await this.getClient()).dispatch(\"get-view-snapshot\",{viewIdentity:e})}async applySnapshot(e,t){this.wire.sendAction(\"platform-apply-snapshot\",this.identity).catch((e=>{}));const n=\"Requested snapshot must be a valid Snapshot object, or a url or filepath to such an object.\";let i;if(\"string\"==typeof e)try{i=(await this._channel.wire.sendAction(\"get-application-manifest\",{manifestUrl:e})).payload.data}catch(e){throw new Error(`${n}: ${e}`)}else i=e;if(!i.windows)throw new Error(n);const r=await this.getClient();return await r.dispatch(\"apply-snapshot\",{snapshot:i,options:t}),this}async fetchManifest(e){return(await this.getClient()).dispatch(\"platform-fetch-manifest\",{manifestUrl:e})}async launchContentManifest(e){this.wire.sendAction(\"platform-launch-content-manifest\",this.identity).catch((()=>{}));const t=await this.getClient(),n=await this.fetchManifest(e);return t.dispatch(\"launch-into-platform\",{manifest:n,manifestUrl:e}),this}async setWindowContext(e={},t){if(this.wire.sendAction(\"platform-set-window-context\",this.identity).catch((e=>{})),!e)throw new Error(\"Please provide a serializable object or string to set the context.\");const n=await this.getClient(),{entityType:i}=t?await this.fin.System.getEntityInfo(t.uuid,t.name):this.fin.me;await n.dispatch(\"set-window-context\",{context:e,entityType:i,target:t||{uuid:this.fin.me.uuid,name:this.fin.me.name}})}async getWindowContext(e){this.wire.sendAction(\"platform-get-window-context\",this.identity).catch((e=>{}));const t=await this.getClient(),{entityType:n}=e?await this.fin.System.getEntityInfo(e.uuid,e.name):this.fin.me;return t.dispatch(\"get-window-context\",{target:e||{uuid:this.fin.me.uuid,name:this.fin.me.name},entityType:n})}async closeWindow(e,t={skipBeforeUnload:!1}){this.wire.sendAction(\"platform-close-window\",this.identity).catch((e=>{}));return(await this.getClient()).dispatch(\"close-window\",{windowId:e,options:t})}}Mn.Platform=Fn,xn=new WeakMap;var jn={},kn={},Ln={},Tn={};function $n(e){switch(e){case\"columns\":case\"grid\":case\"rows\":case\"tabs\":return!0;default:return!1}}Object.defineProperty(Tn,\"__esModule\",{value:!0}),Tn.overrideFromComposables=Tn.isValidPresetType=void 0,Tn.isValidPresetType=$n,Tn.overrideFromComposables=function(...e){return t=>e.reduceRight(((e,t)=>n=>t(e(n))),(e=>e))(t)},Tn.default={isValidPresetType:$n};var Bn={},Gn={},Wn={};Object.defineProperty(Wn,\"__esModule\",{value:!0}),Wn.ApiConsumer=void 0;Wn.ApiConsumer=class{constructor(e){this.strategy=e,this.consume=async e=>(await this.strategy.getExposedFunctions(e)).reduce(((t,n)=>({...t,[n.key]:this.strategy.createFunction(n,e)})),{})}};var Hn={},Nn={};Object.defineProperty(Nn,\"__esModule\",{value:!0}),Nn.expose=Nn.getExposedProperties=void 0;const Dn=Symbol(\"exposedProperties\");Nn.getExposedProperties=e=>e[Dn]||e.prototype[Dn]||[];Nn.expose=e=>(t,n,i)=>{t[Dn]=t[Dn]||[],t[Dn].push({key:n,descriptor:i,options:e})},Object.defineProperty(Hn,\"__esModule\",{value:!0}),Hn.ApiExposer=void 0;const Un=Nn;Hn.ApiExposer=class{constructor(e){this.strategy=e,this.exposeInstance=async(e,t)=>{const n=(0,Un.getExposedProperties)(e),i=await Promise.all(n.map((async({key:n,options:i})=>({key:n,options:await this.strategy.exposeFunction(e[n].bind(e),{key:n,options:i,meta:t})}))));await this.strategy.exposeMeta(t,i)}}};var Vn={},zn={},Kn={};Object.defineProperty(Kn,\"__esModule\",{value:!0}),Kn.ChannelsConsumer=void 0;Kn.ChannelsConsumer=class{constructor(e){this.channel=e,this.getExposedFunctions=async e=>{const{id:t}=e,{props:n}=await this.channel.dispatch(`api-meta:${t}`);return n},this.createFunction=e=>(...t)=>{const{action:n}=e.options;return this.channel.dispatch(n,{args:t})}}};var qn={};Object.defineProperty(qn,\"__esModule\",{value:!0}),qn.ChannelsExposer=void 0;qn.ChannelsExposer=class{constructor(e){this.channelProviderOrClient=e,this.exposeFunction=async(e,t)=>{const{key:n,options:i,meta:r}=t,{id:o}=r,s=`${o}.${i?.action||n}`;return await this.channelProviderOrClient.register(s,(async({args:t})=>e(...t))),{action:s}},this.exposeMeta=async({id:e},t)=>{const n=`api-meta:${e}`;await this.channelProviderOrClient.register(n,(()=>({props:t})))}}},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Kn,e),n(qn,e)}(zn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(zn,e)}(Vn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Wn,e),n(Hn,e),n(Vn,e),n(Nn,e)}(Gn);var Jn={};Object.defineProperty(Jn,\"__esModule\",{value:!0}),Jn.createRelayedDispatch=exports.relayChannelClientApi_1=Jn.relayChannelClientApi=void 0;const Yn=[\"no longer connected\",\"RTCDataChannel closed unexpectedly\",\"The client you are trying to dispatch from is disconnected from the target provider\"];exports.relayChannelClientApi_1=Jn.relayChannelClientApi=async(e,t)=>{e.register(`relay:${t}`,(({action:t,target:n,payload:i})=>e.dispatch(n,t,i))),await Promise.resolve()};Jn.createRelayedDispatch=(e,t,n,i)=>async(r,o)=>{try{return await e.dispatch(`relay:${n}`,{action:r,payload:o,target:t})}catch(e){if(s=e.message,Yn.some((e=>s.includes(e)))&&i)throw new Error(i);throw e}var s};var Zn,Qn,Xn,ei=s&&s.__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},ti=s&&s.__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)};Object.defineProperty(Bn,\"__esModule\",{value:!0}),Bn.ColumnOrRow=Bn.TabStack=Bn.LayoutNode=void 0;const ni=Gn,ii=Jn;class ri{constructor(e,t){Zn.set(this,void 0),this.isRoot=()=>ti(this,Zn,\"f\").isRoot(this.entityId),this.exists=()=>ti(this,Zn,\"f\").exists(this.entityId),this.getParent=async()=>{const e=await ti(this,Zn,\"f\").getParent(this.entityId);if(e)return ri.getEntity(e,ti(this,Zn,\"f\"))},this.createAdjacentStack=async(e,t)=>{const n=await ti(this,Zn,\"f\").createAdjacentStack(this.entityId,e,t);return ri.getEntity({entityId:n,type:\"stack\"},ti(this,Zn,\"f\"))},this.getAdjacentStacks=async e=>(await ti(this,Zn,\"f\").getAdjacentStacks({targetId:this.entityId,edge:e})).map((e=>ri.getEntity({type:\"stack\",entityId:e.entityId},ti(this,Zn,\"f\")))),ei(this,Zn,e,\"f\"),this.entityId=t}}Bn.LayoutNode=ri,Zn=new WeakMap,ri.newLayoutEntitiesClient=async(e,t,n)=>{const i=(0,ii.createRelayedDispatch)(e,n,\"layout-relay\",\"You are trying to interact with a layout component on a window that does not exist or has been destroyed.\");return new ni.ApiConsumer(new ni.ChannelsConsumer({dispatch:i})).consume({id:t})},ri.getEntity=(e,t)=>{const{entityId:n,type:i}=e;switch(i){case\"column\":case\"row\":return new si(t,n,i);case\"stack\":return new oi(t,n);default:throw new Error(`Unrecognised Layout Entity encountered ('${JSON.stringify(e)})`)}};class oi extends ri{constructor(e,t){super(e,t),Qn.set(this,void 0),this.type=\"stack\",this.getViews=()=>ti(this,Qn,\"f\").getStackViews(this.entityId),this.addView=async(e,t={index:0})=>ti(this,Qn,\"f\").addViewToStack(this.entityId,e,t),this.removeView=async e=>{await ti(this,Qn,\"f\").removeViewFromStack(this.entityId,e)},this.setActiveView=async e=>{await ti(this,Qn,\"f\").setStackActiveView(this.entityId,e)},ei(this,Qn,e,\"f\")}}Bn.TabStack=oi,Qn=new WeakMap;class si extends ri{constructor(e,t,n){super(e,t),Xn.set(this,void 0),this.getContent=async()=>(await ti(this,Xn,\"f\").getContent(this.entityId)).map((e=>ri.getEntity(e,ti(this,Xn,\"f\")))),ei(this,Xn,e,\"f\"),this.type=n}}Bn.ColumnOrRow=si,Xn=new WeakMap;var ai={};Object.defineProperty(ai,\"__esModule\",{value:!0}),ai.DEFAULT_LAYOUT_KEY=ai.LAYOUT_CONTROLLER_ID=void 0,ai.LAYOUT_CONTROLLER_ID=\"layout-entities\",ai.DEFAULT_LAYOUT_KEY=\"__default__\";var ci,di,hi,li=s&&s.__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)};Object.defineProperty(Ln,\"__esModule\",{value:!0}),Ln.Layout=void 0;const ui=G,pi=O,wi=d,yi=Tn,fi=Bn,gi=ai;class mi extends wi.Base{static getClient(e){return li(e,di,\"f\").getValue()}constructor(e,t){super(t),ci.add(this),di.set(this,new ui.Lazy((async()=>fi.LayoutNode.newLayoutEntitiesClient(await this.platform.getClient(),gi.LAYOUT_CONTROLLER_ID,this.identity)))),this.replace=async e=>{this.wire.sendAction(\"layout-replace\").catch((e=>{}));const t=await this.platform.getClient();await t.dispatch(\"replace-layout\",{target:this.identity,opts:{layout:e}})},this.replaceView=async(e,t)=>{this.wire.sendAction(\"layout-replace-view\").catch((e=>{}));const n=await this.platform.getClient();await n.dispatch(\"replace-view\",{target:this.identity,opts:{viewToReplace:e,newView:t}})},this.applyPreset=async e=>{this.wire.sendAction(\"layout-apply-preset\").catch((e=>{}));const t=await this.platform.getClient(),{presetType:n}=e;if(!n||!(0,yi.isValidPresetType)(n))throw new Error(\"Cannot apply preset layout, please include an applicable presetType property in the PresetLayoutOptions.\");await t.dispatch(\"apply-preset-layout\",{target:this.identity,opts:{presetType:n}})};const n=(0,pi.validateIdentity)(e);if(n)throw new Error(n);this.identity=e,this.platform=this.fin.Platform.wrapSync({uuid:e.uuid}),e.uuid===this.fin.me.uuid&&e.name===this.fin.me.name&&(this.init=this.fin.Platform.Layout.init)}async getConfig(){this.wire.sendAction(\"layout-get-config\").catch((e=>{}));return(await this.platform.getClient()).dispatch(\"get-frame-snapshot\",{target:this.identity})}async getCurrentViews(){this.wire.sendAction(\"layout-get-views\").catch((e=>{}));const e=await this.platform.getClient();return(await e.dispatch(\"get-layout-views\",{target:this.identity})).map((e=>this.fin.View.wrapSync(e)))}async getRootItem(){this.wire.sendAction(\"layout-get-root-item\").catch((()=>{}));const e=await li(this,di,\"f\").getValue(),t=await e.getRoot(\"layoutName\"in this.identity?this.identity:void 0);return fi.LayoutNode.getEntity(t,e)}async getStackByViewIdentity(e){this.wire.sendAction(\"layout-get-stack-by-view\").catch((()=>{}));const t=await li(this,di,\"f\").getValue(),n=await t.getStackByView(e);if(!n)throw new Error(`No stack found for view: ${e.uuid}/${e.name}`);return fi.LayoutNode.getEntity(n,t)}async addView(e,{location:t,targetView:n}={}){this.wire.sendAction(\"layout-add-view\").catch((e=>{}));const{identity:i}=await li(this,ci,\"m\",hi).call(this,\"layout-add-view\",{viewOptions:e,location:t,targetView:n});return{identity:i}}async closeView(e){this.wire.sendAction(\"layout-close-view\").catch((e=>{})),await li(this,ci,\"m\",hi).call(this,\"layout-close-view\",{viewIdentity:e})}}Ln.Layout=mi,di=new WeakMap,ci=new WeakSet,hi=async function(e,t){return(await this.platform.getClient()).dispatch(e,{target:this.identity,opts:t})};var vi,Ci,bi,Ii,Ei,xi=s&&s.__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)},Ai=s&&s.__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};Object.defineProperty(kn,\"__esModule\",{value:!0}),kn.LayoutModule=void 0;const Pi=d,Mi=Ln,_i=ai;class Oi extends Pi.Base{constructor(){super(...arguments),vi.add(this),Ci.set(this,!1),bi.set(this,null),this.init=async(e={})=>{if(this.wire.sendAction(\"layout-init\").catch((e=>{})),!this.wire.environment.layoutAllowedInContext(this.fin))throw new Error(\"Layout.init can only be called from a Window context.\");if(xi(this,Ci,\"f\"))throw new Error(\"Layout.init was already called, please use Layout.create to add additional layouts.\");\"openfin\"===this.wire.environment.type&&await this.fin.Platform.getCurrentSync().getClient(),Ai(this,Ci,!0,\"f\"),Ai(this,bi,await this.wire.environment.initLayoutManager(this.fin,this.wire,e),\"f\"),await this.wire.environment.applyLayoutSnapshot(this.fin,xi(this,bi,\"f\"),e);const t={name:this.fin.me.name,uuid:this.fin.me.uuid};if(!e.layoutManagerOverride){const e={layoutName:_i.DEFAULT_LAYOUT_KEY,...t};return xi(this,Ii,\"f\").call(this,e)}return this.wrapSync(t)},Ii.set(this,(e=>{const t=\"[Layout] You are using a deprecated property `layoutManager` - it will throw if you access it starting in v37.\",n=new Proxy({},{get(e,n){throw console.warn(`[Layout-mgr-proxy] accessing ${n.toString()}`),new Error(t)}}),i=Object.assign(this.wrapSync(e),{layoutManager:n});return new Proxy(i,{get(e,n){if(\"layoutManager\"===n)throw console.warn(`[Layout-proxy] accessing ${n.toString()}`),new Error(t);return e[n]}})})),this.getCurrentLayoutManagerSync=()=>xi(this,vi,\"m\",Ei).call(this,\"fin.Platform.Layout.getCurrentLayoutManagerSync()\"),this.create=async e=>this.wire.environment.createLayout(xi(this,vi,\"m\",Ei).call(this,\"fin.Platform.Layout.create()\"),e),this.destroy=async e=>this.wire.environment.destroyLayout(xi(this,vi,\"m\",Ei).call(this,\"fin.Platform.Layout.destroy()\"),e)}async wrap(e){return this.wire.sendAction(\"layout-wrap\").catch((e=>{})),new Mi.Layout(e,this.wire)}wrapSync(e){return this.wire.sendAction(\"layout-wrap-sync\").catch((e=>{})),new Mi.Layout(e,this.wire)}async getCurrent(){if(this.wire.sendAction(\"layout-get-current\").catch((e=>{})),\"openfin\"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error(\"You are not in a Window context. Only Windows can have a Layout.\");const{uuid:e,name:t}=this.fin.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction(\"layout-get-current-sync\").catch((e=>{})),\"openfin\"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error(\"You are not in a Window context. Only Windows can have a Layout.\");const{uuid:e,name:t}=this.fin.me;return this.wrapSync({uuid:e,name:t})}async getLayoutByViewIdentity(e){this.wire.sendAction(\"layout-get-by-view-identity\").catch((()=>{}));let t=await this.wire.environment.getViewWindowIdentity(this.fin,e);t.identity&&(t=t.identity);try{const n=this.wrapSync(t),i=await Mi.Layout.getClient(n),r=await i.getLayoutIdentityForViewOrThrow(e);return this.wrapSync(r)}catch(n){if(![\"No action registered at target for\",\"getLayoutIdentityForViewOrThrow is not a function\"].some((e=>n.message.includes(e))))throw n;if(t.uuid===t.name)throw new Error(`View identity ${JSON.stringify(e)} is not attached to any layout in provider window ${JSON.stringify(t)}.`);return this.wrapSync(t)}}}kn.LayoutModule=Oi,Ci=new WeakMap,bi=new WeakMap,Ii=new WeakMap,vi=new WeakSet,Ei=function(e){if(!xi(this,bi,\"f\"))throw new Error(`You must call init before using the API ${e}`);return xi(this,bi,\"f\")},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(kn,e),n(Ln,e)}(jn),Object.defineProperty(Pn,\"__esModule\",{value:!0}),Pn.PlatformModule=void 0;const Si=d,Ri=Mn,Fi=jn;class ji extends Si.Base{constructor(e,t){super(e),this._channel=t,this.Layout=new Fi.LayoutModule(this.wire)}async init(e){if(!fin.__internal_.isPlatform||fin.me.name!==fin.me.uuid)throw new Error(\"fin.Platform.init should only be called from a custom platform provider running in the main window of the application.\");return this.wire.environment.initPlatform(this.fin,e)}async wrap(e){return this.wire.sendAction(\"platform-wrap\").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}wrapSync(e){return this.wire.sendAction(\"platform-wrap-sync\").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}async getCurrent(){return this.wire.sendAction(\"platform-get-current\").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction(\"platform-get-current-sync\").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}start(e){return this.wire.sendAction(\"platform-start\").catch((e=>{})),new Promise((async(t,n)=>{try{const{uuid:n}=e,i=await this.fin.Application._create({...e,isPlatformController:!0});i.once(\"platform-api-ready\",(()=>t(this.wrapSync({uuid:n})))),i._run({uuid:n})}catch(e){n(e)}}))}startFromManifest(e,t){return this.wire.sendAction(\"platform-start-from-manifest\").catch((e=>{})),new Promise((async(n,i)=>{try{const i=await this.fin.Application._createFromManifest(e);i.once(\"platform-api-ready\",(()=>n(this.wrapSync({uuid:i.identity.uuid})))),i._run(t)}catch(e){i(e)}}))}}Pn.PlatformModule=ji,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Pn,e),n(Mn,e)}(An);var ki={};!function(e){Object.defineProperty(e,\"__esModule\",{value:!0}),e.getMe=e.getBaseMe=e.environmentUnsupportedMessage=void 0;const t=J(),n=un,i=ie(),r=rn;function o(e,t,n){return{...{isView:\"view\"===e,isWindow:\"window\"===e,isFrame:\"iframe\"===e,isExternal:\"external connection\"===e},uuid:t,name:n,entityType:e}}e.environmentUnsupportedMessage=\"You are not running in OpenFin.\",e.getBaseMe=o,e.getMe=function(s){const{uuid:a,name:c,entityType:d}=s.me,h={setContext(){throw new Error(e.environmentUnsupportedMessage)},addContextHandler(){throw new Error(e.environmentUnsupportedMessage)},getContextGroups(){throw new Error(e.environmentUnsupportedMessage)},joinContextGroup(){throw new Error(e.environmentUnsupportedMessage)},removeFromContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getAllClientsInContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getInfoForContextGroup(){throw new Error(e.environmentUnsupportedMessage)}},l=\"Interop API has not been instantiated. Either connection has failed or you have not declared interop in your config.\",u={setContext(){throw new Error(l)},addContextHandler(){throw new Error(l)},getContextGroups(){throw new Error(l)},joinContextGroup(){throw new Error(l)},removeFromContextGroup(){throw new Error(l)},getAllClientsInContextGroup(){throw new Error(l)},getInfoForContextGroup(){throw new Error(l)}},p={eventNames:()=>{throw new Error(e.environmentUnsupportedMessage)},emit:()=>{throw new Error(e.environmentUnsupportedMessage)},listeners:()=>{throw new Error(e.environmentUnsupportedMessage)},listenerCount:()=>{throw new Error(e.environmentUnsupportedMessage)},on:()=>{throw new Error(e.environmentUnsupportedMessage)},addListener:()=>{throw new Error(e.environmentUnsupportedMessage)},once:()=>{throw new Error(e.environmentUnsupportedMessage)},prependListener:()=>{throw new Error(e.environmentUnsupportedMessage)},prependOnceListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeAllListeners:()=>{throw new Error(e.environmentUnsupportedMessage)}};switch(d){case\"view\":return Object.assign(new t.View(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case\"window\":return Object.assign(new i._Window(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case\"iframe\":return Object.assign(new n._Frame(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case\"external connection\":return Object.assign(new r.ExternalApplication(s,{uuid:a}),o(d,a,c),{interop:u,isOpenFin:!1});default:return{...o(d,a,c),...p,interop:h,isOpenFin:!1}}}}(ki);var Li={},Ti={},$i={};Object.defineProperty($i,\"__esModule\",{value:!0}),$i.createWarningObject=$i.createUnusableObject=void 0,$i.createUnusableObject=function(e){const t=()=>{throw new Error(e)};return new Proxy({},{apply:t,construct:t,defineProperty:t,deleteProperty:t,get:t,getOwnPropertyDescriptor:t,getPrototypeOf:t,has:t,isExtensible:t,ownKeys:t,preventExtensions:t,set:t,setPrototypeOf:t})},$i.createWarningObject=function(e,t){return new Proxy(t,{get:(...t)=>(console.warn(e),Reflect.get(...t)),set:(...t)=>(console.warn(e),Reflect.set(...t)),getOwnPropertyDescriptor:(...t)=>(console.warn(e),Reflect.getOwnPropertyDescriptor(...t)),ownKeys:(...t)=>(console.warn(e),Reflect.ownKeys(...t))})};var Bi,Gi={},Wi={};var Hi={};!function(e){Object.defineProperty(e,\"__esModule\",{value:!0}),e.wrapIntentHandler=e.BROKER_ERRORS=e.generateOverrideWarning=e.generateOverrideError=e.wrapContextHandler=e.wrapInTryCatch=e.generateId=void 0;e.generateId=()=>`${Math.random()}${Date.now()}`;e.wrapInTryCatch=(e,t)=>(...n)=>{try{return e(...n)}catch(e){throw new Error((t||\"\")+e)}};e.wrapContextHandler=(e,t)=>async n=>{try{await e(n)}catch(e){throw console.error(`Error thrown by handler ${t} for context type ${n.type}: ${e}`),e}};e.generateOverrideError=(e,t)=>`You have tried to to use ${e} but ${t} has not been overridden in the Interop Broker. Please override this function. Refer to our documentation for more info.`;e.generateOverrideWarning=(e,t,n,i)=>{const{uuid:r,name:o}=n;return i?`Entity with identity: ${r}/${o} has called ${i} or ${e} but ${t} has not been overridden.`:`Entity with identity: ${r}/${o} has called ${e} but ${t} has not been overridden.`},e.BROKER_ERRORS={fireIntent:(0,e.generateOverrideError)(\"fireIntent\",\"handleFiredIntent\"),fireIntentForContext:(0,e.generateOverrideError)(\"fireIntentForContext\",\"handleFiredIntentForContext\"),getInfoForIntent:(0,e.generateOverrideError)(\"getInfoForIntent\",\"handleInfoForIntent\"),getInfoForIntentsByContext:(0,e.generateOverrideError)(\"getInfoForIntentsByContext\",\"handleInfoForIntentsByContext\"),joinSessionContextGroupWithJoinContextGroup:\"The Context Group you have tried to join is a Session Context Group. Custom Context Groups can only be defined by the Interop Broker through code or manifest configuration. Please use joinSessionContextGroup.\",fdc3Open:(0,e.generateOverrideError)(\"fdc3.open\",\"fdc3HandleOpen\"),fdc3FindInstances:(0,e.generateOverrideError)(\"fdc3.findInstances\",\"fdc3HandleFindInstances\"),fdc3GetAppMetadata:(0,e.generateOverrideError)(\"fdc3.getAppMetadata\",\"fdc3HandleGetAppMetadata\"),fdc3GetInfo:(0,e.generateOverrideError)(\"fdc3.getInfo\",\"fdc3HandleGetInfo\")};e.wrapIntentHandler=(e,t)=>async n=>{try{return e(n)}catch(e){throw console.error(`Error thrown by handler ${t}: ${e}`),e}}}(Hi);var Ni,Di,Ui={};function Vi(){if(Di)return Gi;Di=1;var e,t,n,r=s&&s.__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},o=s&&s.__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)},a=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Gi,\"__esModule\",{value:!0}),Gi.InteropBroker=void 0;const c=d,h=a(function(){if(Bi)return Wi;Bi=1,Object.defineProperty(Wi,\"__esModule\",{value:!0});const e=Cr();return Wi.default=class{constructor(e,t){this.provider=e,this.id=t,this.lastContext=void 0,this.contextGroupMap=new Map,this.clients=new Map,this.registerListeners()}registerListeners(){this.provider.register(`sessionContextGroup:getContext-${this.id}`,this.getCurrentContext.bind(this)),this.provider.register(`sessionContextGroup:setContext-${this.id}`,this.setContext.bind(this)),this.provider.register(`sessionContextGroup:handlerAdded-${this.id}`,this.handlerAdded.bind(this)),this.provider.register(`sessionContextGroup:handlerRemoved-${this.id}`,this.handlerRemoved.bind(this))}getCurrentContext(e){return e.type?this.contextGroupMap.get(e.type):this.lastContext}setContext(t,n){const{context:i}=t,r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name} not in Session Client State Map`);this.contextGroupMap.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{e.contextHandlers.get(i.type)?.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getClientState(e){return this.clients.get(e.endpointId)}async handlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(i){const e=r.contextHandlers.get(i)||[];r.contextHandlers.set(i,[...e,n]);const o=this.contextGroupMap.get(i);o&&await this.provider.dispatch(t,n,o)}else{r.globalHandler=n;const e=[...this.contextGroupMap.keys()].map((async e=>{const i=this.contextGroupMap.get(e);i&&await this.provider.dispatch(t,n,i)}));await Promise.all(e)}}handlerRemoved(e,t){const{handlerId:n}=e,i=this.clients.get(t.endpointId);i?(Array.from(i.contextHandlers).forEach((([,e])=>{const t=e.indexOf(n);t>-1&&e.splice(t,1)})),i.globalHandler===n&&(i.globalHandler=void 0)):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={contextHandlers:new Map,clientIdentity:e,globalHandler:void 0};this.clients.set(e.endpointId,t)}}onDisconnection(e){this.clients.delete(e.endpointId)}},Wi}()),l=Hi,u=a(i),p=function(){if(Ni)return Ui;Ni=1,Object.defineProperty(Ui,\"__esModule\",{value:!0}),Ui.PrivateChannelProvider=void 0;const e=Vi();return Ui.PrivateChannelProvider=class t{constructor(e,t){this.provider=e,this.id=t,this.clients=new Map,this.registerListeners(),this.contextByContextType=new Map,this.lastContext=void 0,this.provider.onConnection((e=>this.registerNewClient(e))),this.provider.onDisconnection((async e=>{const{endpointId:t}=e;this.clients.has(t)&&await this.handleClientDisconnecting(e),0===(await this.provider.getAllClientInfo()).length&&this.provider.destroy()}))}getClientState(e){return this.clients.get(e.endpointId)}registerListeners(){this.provider.register(\"broadcast\",this.broadcast.bind(this)),this.provider.register(\"getCurrentContext\",this.getCurrentContext.bind(this)),this.provider.register(\"contextHandlerAdded\",this.contextHandlerAdded.bind(this)),this.provider.register(\"contextHandlerRemoved\",this.contextHandlerRemoved.bind(this)),this.provider.register(\"nonStandardHandlerRemoved\",this.nonStandardHandlerRemoved.bind(this)),this.provider.register(\"onAddContextHandlerAdded\",this.onAddContextHandlerAdded.bind(this)),this.provider.register(\"onDisconnectHandlerAdded\",this.onDisconnectHandlerAdded.bind(this)),this.provider.register(\"onUnsubscribeHandlerAdded\",this.onUnsubscribeHandlerAdded.bind(this)),this.provider.register(\"clientDisconnecting\",((e,t)=>{this.handleClientDisconnecting(t)}))}broadcast(t,n){const{context:i}=t;if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name}, tried to call broadcast, is not connected to this Private Channel`);const r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to broadcast - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);this.contextByContextType.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{const t=e.handlerIdsByContextTypes.get(i.type);t&&t.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getCurrentContext(e,t){const{contextType:n}=e;if(!this.getClientState(t))throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call getCurrentContext, is not connected to this Private Channel`);if(void 0!==n){return this.contextByContextType.get(n)||null}return this.lastContext?this.lastContext:null}contextHandlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call addContextListener, is not connected to this Private Channel`);if(i){const e=r.handlerIdsByContextTypes.get(i)||[];r.handlerIdsByContextTypes.set(i,[...e,n])}else r.globalHandler=n;Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&e.onAddContextListenerHandlerId&&this.provider.dispatch(e.clientIdentity,e.onAddContextListenerHandlerId,i)}))}async contextHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);if(i){let e;if(i.globalHandler===n)i.globalHandler=void 0;else for(const[t,r]of i.handlerIdsByContextTypes){const i=r.indexOf(n);i>-1&&(r.splice(i,1),e=t)}const r=(await this.getConnectedClients()).map((async n=>{const{clientIdentity:i,clientIdentity:{endpointId:r},onUnsubscribeHandlerId:o}=n;r!==t.endpointId&&o&&await this.provider.dispatch(i,o,e)}));try{await Promise.all(r)}catch(e){throw console.error(`Problem when attempting to dispatch to onUnsubscribeHandlers. Error: ${e} Removing Client: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}`),new Error(e)}}else console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}.`)}nonStandardHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);i?i.onDisconnectHandlerId===n?i.onDisconnectHandlerId=void 0:i.onAddContextListenerHandlerId===n?i.onAddContextListenerHandlerId=void 0:i.onUnsubscribeHandlerId===n&&(i.onUnsubscribeHandlerId=void 0):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}onAddContextHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onAddContextListener, is not connected to this Private Channel`);n.onAddContextListenerHandlerId=i,Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&Array.from(e.handlerIdsByContextTypes.keys()).forEach((e=>{this.provider.dispatch(t,i,e)}))}))}onDisconnectHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onDisconnect, is not connected to this Private Channel`);n.onDisconnectHandlerId=i}onUnsubscribeHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onUnsubscribe, is not connected to this Private Channel`);n.onUnsubscribeHandlerId=i}removeClient(e){const t=this.getClientState(e);if(!t)throw new Error(`Client with Identity: ${e.uuid} ${e.name}, tried to call disconnect, is not connected to this Private Channel`);t.handlerIdsByContextTypes.clear(),this.clients.delete(e.endpointId)}async fireOnDisconnectForOtherClients(e){const{endpointId:t}=e,n=(await this.getConnectedClients()).map((async e=>{const{clientIdentity:{endpointId:n},onDisconnectHandlerId:i}=e;n!==t&&i&&await this.provider.dispatch(e.clientIdentity,i)}));try{await Promise.all(n)}catch(t){throw console.error(`Problem when attempting to dispatch to onDisconnectHandlers. Error: ${t} Disconnecting Client: uuid: ${e.uuid}. name: ${e.name}. endpointId: ${e.endpointId}`),new Error(t)}}async unsubscribeAll(e){const{endpointId:t}=e,n=this.clients.get(t);if(n){const t=Array.from(n.handlerIdsByContextTypes.values()).flat(),i=n.globalHandler;if(t.length>0){const n=t.map((async t=>this.contextHandlerRemoved({handlerId:t},e)));try{await Promise.all(n)}catch(e){console.error(e.message)}}if(i)try{await this.contextHandlerRemoved({handlerId:i},e)}catch(e){console.error(e.message)}}}async handleClientDisconnecting(e){await this.unsubscribeAll(e),this.removeClient(e),await this.fireOnDisconnectForOtherClients(e)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={clientIdentity:e,handlerIdsByContextTypes:new Map,globalHandler:void 0,onAddContextListenerHandlerId:void 0,onUnsubscribeHandlerId:void 0,onDisconnectHandlerId:void 0};this.clients.set(e.endpointId,t)}}async getConnectedClients(){const e=await this.provider.getAllClientInfo();return Array.from(this.clients.values()).filter((t=>{const{uuid:n,name:i}=t.clientIdentity;return e.some((e=>i===e.name&&n===e.uuid))}))}static init(e,n){return new t(e,n)}},Ui}(),w=G,y=[{id:\"green\",displayMetadata:{color:\"#00CC88\",name:\"green\"}},{id:\"purple\",displayMetadata:{color:\"#8C61FF\",name:\"purple\"}},{id:\"orange\",displayMetadata:{color:\"#FF8C4C\",name:\"orange\"}},{id:\"red\",displayMetadata:{color:\"#FF5E60\",name:\"red\"}},{id:\"pink\",displayMetadata:{color:\"#FF8FB8\",name:\"pink\"}},{id:\"yellow\",displayMetadata:{color:\"#E9FF8F\",name:\"yellow\"}}];let f=class i extends c.Base{constructor(i,s,a){super(i),e.set(this,void 0),t.set(this,void 0),n.set(this,void 0),this.getProvider=()=>o(this,n,\"f\").getValue(),this.interopClients=new Map,this.contextGroupsById=new Map,r(this,t,a.contextGroups??[...y],\"f\"),r(this,e,a.fdc3Info,\"f\"),a?.logging&&(this.logging=a.logging),this.intentClientMap=new Map,this.lastContextMap=new Map,this.sessionContextGroupMap=new Map,r(this,n,new w.Lazy(s),\"f\"),this.setContextGroupMap(),this.setupChannelProvider()}static createClosedConstructor(...e){return class extends i{constructor(...t){if(t.length){const[n,i,r]=t;if(r&&\"object\"==typeof r&&!(0,u.default)(r,e[2]))return console.warn(\"You have modified the parameters of the InteropOverride constructor. This behavior is deprecated and will be removed in a future version. You can modify these options in your manifest. Please consult our Interop docs for guidance on migrating to the new override scheme.\"),void super(e[0],e[1],r);console.warn(\"You are attempting to pass arguments to the InteropOverride constructor. This is not necessary, and these passed arguments will be ignored. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.\")}super(...e)}}}setContext({context:e},t){this.wire.sendAction(\"interop-broker-set-context\").catch((e=>{}));const n=this.getClientState(t);if(!n||!n.contextGroupId)throw n?new Error(\"You must join a context group before you can set context.\"):new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);{const{contextGroupId:t}=n;this.setContextForGroup({context:e},t)}}setContextForGroup({context:e},t){this.wire.sendAction(\"interop-broker-set-context-for-group\").catch((e=>{}));const n=this.contextGroupsById.get(t);if(!n)throw new Error(`Unable to set context for context group that isn't in the context group mapping: ${t}.`);const r=i.checkContextIntegrity(e);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(e)}`);const o=e.type;n.set(o,e),this.lastContextMap.set(t,o);Array.from(this.interopClients.values()).filter((e=>e.contextGroupId===t)).forEach((t=>{for(const[,n]of t.contextHandlers)i.isContextTypeCompatible(o,n.contextType)&&this.invokeContextHandler(t.clientIdentity,n.handlerId,e)}))}getCurrentContext(e,t){this.wire.sendAction(\"interop-broker-get-current-context\").catch((e=>{}));const n=this.getClientState(t);if(!n?.contextGroupId)throw new Error(\"You must be a member of a context group to call getCurrentContext\");const{contextGroupId:i}=n,r=this.contextGroupsById.get(i),o=this.lastContextMap.get(i),s=e?.contextType??o;return r&&s?r.get(s):void 0}async joinContextGroup({contextGroupId:e,target:t},n){if(this.wire.sendAction(\"interop-broker-join-context-group\").catch((e=>{})),this.sessionContextGroupMap.has(e))throw new Error(l.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup);if(t){i.hasEndpointId(t)&&await this.addClientToContextGroup({contextGroupId:e},t);try{const n=this.channel.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name));if(!n.length)throw new Error(`Given Identity ${t.uuid} ${t.name} is not connected to the Interop Broker.`);n.length>1&&console.warn(`More than one connection found for identity ${t.uuid} ${t.name}`);const i=[];for(const t of n)i.push(this.addClientToContextGroup({contextGroupId:e},t));await Promise.all(i)}catch(e){throw new Error(e)}}else await this.addClientToContextGroup({contextGroupId:e},n)}async addClientToContextGroup({contextGroupId:e},t){this.wire.sendAction(\"interop-broker-add-client-to-context-group\").catch((e=>{}));const n=this.getClientState(t);if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(!this.getContextGroups().find((t=>t.id===e)))throw new Error(`Attempting to join a context group that does not exist: ${e}. You may only join existing context groups.`);if(n.contextGroupId!==e){n.contextGroupId=e,await this.setCurrentContextGroupInClientOptions(t,e);const i=this.contextGroupsById.get(e);for(const[,e]of n.contextHandlers){const{contextType:n,handlerId:r}=e;if(void 0===n)i.forEach(((e,n)=>{this.invokeContextHandler(t,r,e)}));else if(i.has(n)){const e=i.get(n);e&&this.invokeContextHandler(t,r,e)}}}}async removeFromContextGroup({target:e},t){if(this.wire.sendAction(\"interop-broker-remove-from-context-group\").catch((e=>{})),e){i.hasEndpointId(e)&&await this.removeClientFromContextGroup(e);try{const t=this.channel.connections.filter((t=>t.uuid===e.uuid&&t.name===e.name));if(!t.length)throw new Error(`No connection found for given Identity ${e.uuid} ${e.name}`);t.length>1&&console.warn(`More than one connection found for identity ${e.uuid} ${e.name}`);const n=[];for(const e of t)n.push(this.removeClientFromContextGroup(e));await Promise.all(n)}catch(e){throw new Error(e)}}else await this.removeClientFromContextGroup(t)}async removeClientFromContextGroup(e){this.wire.sendAction(\"interop-broker-remove-client-from-context-group\").catch((e=>{}));const t=this.getClientState(e);t&&(t.contextGroupId=void 0),await this.setCurrentContextGroupInClientOptions(e,null)}getContextGroups(){return this.wire.sendAction(\"interop-broker-get-context-groups\").catch((e=>{})),o(this,t,\"f\").map((e=>({...e})))}getInfoForContextGroup({contextGroupId:e}){return this.wire.sendAction(\"interop-broker-get-info-for-context-group\").catch((e=>{})),this.getContextGroups().find((t=>t.id===e))}getAllClientsInContextGroup({contextGroupId:e}){this.wire.sendAction(\"interop-broker-get-all-clients-in-context-group\").catch((e=>{}));return Array.from(this.interopClients.values()).filter((t=>t.contextGroupId===e)).map((e=>e.clientIdentity))}async handleFiredIntent(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.raiseIntent\",\"InteropBroker.handleFiredIntent\",t,\"interopClient.fireIntent\");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntent)}async setIntentTarget(e,t){this.wire.sendAction(\"interop-broker-set-intent-target\").catch((e=>{}));const n=this.intentClientMap.get(t.name),i=`intent-handler-${e.name}`;if(n){const t=n.get(i);if(t){if(t.pendingIntents.push(e),t.clientIdentity&&t.isReady){const{clientIdentity:e,pendingIntents:n}=t;try{const r=n[n.length-1];await this.invokeIntentHandler(e,i,r),t.pendingIntents=[]}catch(n){console.error(`Error invoking intent handler for client ${e.uuid}/${e.name}/${e.endpointId}`),t.isReady=!1}}}else n.set(i,{isReady:!1,pendingIntents:[e]})}else{this.intentClientMap.set(t.name,new Map);const n=this.intentClientMap.get(t.name);n&&n.set(i,{isReady:!1,pendingIntents:[e]})}}async handleInfoForIntent(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.findIntent\",\"InteropBroker.handleInfoForIntent\",t,\"interopClient.getInfoForIntent\");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntent)}async handleInfoForIntentsByContext(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.findIntentsByContext\",\"InteropBroker.handleInfoForIntentsByContext\",t,\"interopClient.getInfoForIntentsByContext\");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntentsByContext)}async handleFiredIntentForContext(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.raiseIntentForContext\",\"InteropBroker.handleFiredIntentForContext\",t,\"interopClient.fireIntentForContext\");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntentForContext)}async clientDisconnected(e){}async fdc3HandleOpen({app:e,context:t},n){const i=(0,l.generateOverrideWarning)(\"fdc3.open\",\"InteropBroker.fdc3HandleOpen\",n);throw console.warn(i),new Error(l.BROKER_ERRORS.fdc3Open)}async fdc3HandleFindInstances(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.open\",\"InteropBroker.fdc3HandleFindInstances\",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3FindInstances)}async fdc3HandleGetAppMetadata(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.getAppMetadata\",\"InteropBroker.fdc3HandleGetAppMetadata\",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3GetAppMetadata)}async invokeContextHandler(e,t,n){const i=await this.getProvider();try{await i.dispatch(e,t,n)}catch(i){console.error(`Error invoking context handler ${t} for context type ${n.type} in client ${e.uuid}/${e.name}/${e.endpointId}`,i)}}async invokeIntentHandler(e,t,n){const i=await this.getProvider();await i.dispatch(e,t,n)}async fdc3HandleGetInfo(t,n){const{fdc3Version:i}=t;return{fdc3Version:i,...o(this,e,\"f\"),optionalFeatures:{OriginatingAppMetadata:!1,UserChannelMembershipAPIs:!0},appMetadata:{appId:\"\",instanceId:\"\"}}}async getAllClientInfo(){return(await this.getProvider()).getAllClientInfo()}decorateSnapshot(e){return{...e,interopSnapshotDetails:{contextGroupStates:this.getContextGroupStates()}}}applySnapshot(e,t){const n=e?.interopSnapshotDetails?.contextGroupStates;n&&(t?.closeExistingWindows||this.updateExistingClients(n),this.rehydrateContextGroupStates(n))}updateExistingClients(e){this.interopClients.forEach((t=>{const{clientIdentity:n,contextGroupId:r,contextHandlers:o}=t;if(r){const t=e[r];for(const[,e]of Object.entries(t))o.forEach((t=>{const{handlerId:r,contextType:o}=t;i.isContextTypeCompatible(e.type,o)&&this.invokeContextHandler(n,r,e)}))}}))}getContextGroupStates(){return i.toObject(this.contextGroupsById)}rehydrateContextGroupStates(e){const t=Object.entries(e);for(const[e,n]of t){const t=Object.entries(n);for(const[n,i]of t)if(this.contextGroupsById.has(e)){this.contextGroupsById.get(e).set(n,i)}else console.warn(`Attempting to set a context group that isn't in the context group mapping. Skipping context group rehydration for: ${e}`)}}contextHandlerRegistered({contextType:e,handlerId:t},n){const i={contextType:e,handlerId:t},r=this.getClientState(n);if(r?.contextHandlers.set(t,i),r&&r.contextGroupId){const{contextGroupId:i}=r,o=this.contextGroupsById.get(i);if(void 0===e)o.forEach(((e,i)=>{this.invokeContextHandler(n,t,e)}));else if(o.has(e)){const i=o.get(e);i&&this.invokeContextHandler(n,t,i)}}}async intentHandlerRegistered(e,t){const{handlerId:n}=e,i=this.intentClientMap.get(t.name),r=i?.get(n);if(i)if(r){const{pendingIntents:e}=r;r.clientIdentity=t,r.isReady=!0;try{if(e.length>0){const i=e[e.length-1];await this.invokeIntentHandler(t,n,i),r.pendingIntents=[]}}catch(e){console.error(`Error invoking intent handler: ${n} for client ${t.uuid}/${t.name}/${t.endpointId}`)}}else i.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t});else{this.intentClientMap.set(t.name,new Map);const e=this.intentClientMap.get(t.name);e&&e.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t})}}removeContextHandler({handlerId:e},t){const n=this.getClientState(t);n&&n.contextHandlers.delete(e)}handleJoinSessionContextGroup({sessionContextGroupId:e},t){try{if(!e)throw new Error(\"Failed to join session context group: must specify group id.\");const n=this.sessionContextGroupMap.get(e);if(n)n.registerNewClient(t);else{const n=new h.default(this.channel,e);n.registerNewClient(t),this.sessionContextGroupMap.set(e,n)}return{hasConflict:this.contextGroupsById.has(e)}}catch(e){throw new Error(e)}}getClientState(e){return this.interopClients.get(e.endpointId)}static toObject(e){const t=Object.fromEntries(e),n={};return Object.entries(t).forEach((([e,t])=>{const i=Object.fromEntries(t);n[e]=i})),n}static checkContextIntegrity(e){if(!e)return{isValid:!1,reason:\"No context supplied\"};if(\"object\"!=typeof e)return{isValid:!1,reason:\"Context must be an Object\"};if(!e.type)return{isValid:!1,reason:\"Context must have a type property\"};if(e.id&&\"object\"!=typeof e.id)return{isValid:!1,reason:\"Context id must be an Object populated with key-value identifiers (if set)\"};if(e.id){const{id:t}=e,n=Object.keys(t);let i=!1;if(!n.length)return{isValid:!1,reason:\"Context id must have at least one key-value identifier\"};if(n.forEach((e=>{\"string\"==typeof e&&\"string\"==typeof t[e]||(i=!0)})),i)return{isValid:!1,reason:\"Context id key-value identifiers must be of type string\"}}return e.name&&\"string\"!=typeof e.name?{isValid:!1,reason:\"Context name must be of string type (if set)\"}:{isValid:!0}}static hasEndpointId(e){return void 0!==e.endpointId}static isContextTypeCompatible(e,t){return void 0===t||e===t}setContextGroupMap(){for(const e of this.getContextGroups())this.contextGroupsById.set(e.id,new Map)}async setCurrentContextGroupInClientOptions(e,t){try{const n=await this.fin.System.getEntityInfo(e.uuid,e.name);let i;\"view\"===n.entityType?i=await this.fin.View.wrap(e):\"window\"===n.entityType&&(i=await this.fin.Window.wrap(e)),i&&await i.updateOptions({interop:{currentContextGroup:t}})}catch(e){}}async setupChannelProvider(){try{const e=await this.getProvider();this.channel=e,this.wireChannel(e)}catch(e){throw new Error(`Error setting up Interop Broker Channel Provider: ${e}`)}}wireChannel(e){e.onConnection((async(e,t)=>{if(!await this.isConnectionAuthorized(e,t))throw new Error(`Connection not authorized for ${e.uuid}, ${e.name}`);if(!e.endpointId)throw new Error(\"Version too old to be compatible with Interop. Please upgrade your runtime to a more recent version.\");const n={contextGroupId:void 0,contextHandlers:new Map,clientIdentity:e};t?.currentContextGroup&&this.contextGroupsById.has(t.currentContextGroup)&&(n.contextGroupId=t?.currentContextGroup),this.interopClients.set(e.endpointId,n)})),e.onDisconnection((e=>{this.interopClients.delete(e.endpointId);const t=this.intentClientMap.get(e.name);t&&e.uuid===this.fin.me.uuid&&t.forEach((e=>{e.isReady=!1})),this.sessionContextGroupMap.forEach((t=>{t.onDisconnection(e)})),this.clientDisconnected(e)})),e.beforeAction((async(e,t,n)=>{if(!await this.isActionAuthorized(e,t,n))throw new Error(`Action (${e}) not authorized for ${n.uuid}, ${n.name}`);this.logging?.beforeAction?.enabled&&console.log(e,t,n)})),e.afterAction(((e,t,n)=>{this.logging?.afterAction?.enabled&&console.log(e,t,n)})),e.register(\"setContext\",this.setContext.bind(this)),e.register(\"fireIntent\",this.handleFiredIntent.bind(this)),e.register(\"getCurrentContext\",this.getCurrentContext.bind(this)),e.register(\"getInfoForIntent\",this.handleInfoForIntent.bind(this)),e.register(\"getInfoForIntentsByContext\",this.handleInfoForIntentsByContext.bind(this)),e.register(\"fireIntentForContext\",this.handleFiredIntentForContext.bind(this)),e.register(\"getContextGroups\",this.getContextGroups.bind(this)),e.register(\"joinContextGroup\",this.joinContextGroup.bind(this)),e.register(\"removeFromContextGroup\",this.removeFromContextGroup.bind(this)),e.register(\"getAllClientsInContextGroup\",this.getAllClientsInContextGroup.bind(this)),e.register(\"getInfoForContextGroup\",this.getInfoForContextGroup.bind(this)),e.register(\"contextHandlerRegistered\",this.contextHandlerRegistered.bind(this)),e.register(\"intentHandlerRegistered\",this.intentHandlerRegistered.bind(this)),e.register(\"removeContextHandler\",this.removeContextHandler.bind(this)),e.register(\"sessionContextGroup:createIfNeeded\",this.handleJoinSessionContextGroup.bind(this)),e.register(\"fdc3Open\",this.fdc3HandleOpen.bind(this)),e.register(\"fdc3v2FindIntentsByContext\",this.handleInfoForIntentsByContext.bind(this)),e.register(\"fdc3FindInstances\",this.fdc3HandleFindInstances.bind(this)),e.register(\"fdc3GetAppMetadata\",this.fdc3HandleGetAppMetadata.bind(this)),e.register(\"fdc3v2GetInfo\",(async(e,t)=>this.fdc3HandleGetInfo.bind(this)(e,t))),e.register(\"createPrivateChannelProvider\",(async e=>{const{channelId:t}=e,n=await this.fin.InterApplicationBus.Channel.create(t);p.PrivateChannelProvider.init(n,t)}))}isConnectionAuthorized(e,t){return this.wire.sendAction(\"interop-broker-is-connection-authorized\").catch((e=>{})),Promise.resolve(!0)}isActionAuthorized(e,t,n){return this.wire.sendAction(\"interop-broker-is-action-authorized\").catch((e=>{})),Promise.resolve(!0)}};return Gi.InteropBroker=f,e=new WeakMap,t=new WeakMap,n=new WeakMap,Gi}var zi,Ki={},qi={},Ji=s&&s.__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},Yi=s&&s.__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)};Object.defineProperty(qi,\"__esModule\",{value:!0});const Zi=d,Qi=Hi;class Xi extends Zi.Base{constructor(e,t,n){super(e),zi.set(this,void 0),this.id=n,Ji(this,zi,t,\"f\")}async setContext(e){this.wire.sendAction(\"interop-session-context-group-set-context\").catch((e=>{}));return(await Yi(this,zi,\"f\")).dispatch(`sessionContextGroup:setContext-${this.id}`,{sessionContextGroupId:this.id,context:e})}async getCurrentContext(e){this.wire.sendAction(\"interop-session-context-group-get-context\").catch((e=>{}));return(await Yi(this,zi,\"f\")).dispatch(`sessionContextGroup:getContext-${this.id}`,{sessionContextGroupId:this.id,type:e})}async addContextHandler(e,t){if(this.wire.sendAction(\"interop-session-context-group-add-handler\").catch((e=>{})),\"function\"!=typeof e)throw new Error(\"Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.\");const n=await Yi(this,zi,\"f\");let i;return i=t?`sessionContextHandler:invoke-${this.id}-${t}-${(0,Qi.generateId)()}`:`sessionContextHandler:invoke-${this.id}`,n.register(i,(0,Qi.wrapContextHandler)(e,i)),await n.dispatch(`sessionContextGroup:handlerAdded-${this.id}`,{handlerId:i,contextType:t}),{unsubscribe:await this.createUnsubscribeCb(i)}}async createUnsubscribeCb(e){const t=await Yi(this,zi,\"f\");return async()=>{t.remove(e),await t.dispatch(`sessionContextGroup:handlerRemoved-${this.id}`,{handlerId:e})}}getUserInstance(){return{id:this.id,setContext:(0,Qi.wrapInTryCatch)(this.setContext.bind(this),\"Failed to set context: \"),getCurrentContext:(0,Qi.wrapInTryCatch)(this.getCurrentContext.bind(this),\"Failed to get context: \"),addContextHandler:(0,Qi.wrapInTryCatch)(this.addContextHandler.bind(this),\"Failed to add context handler: \")}}}qi.default=Xi,zi=new WeakMap;var er={},tr={},nr={},ir={},rr=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),or=s&&s.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,\"default\",{enumerable:!0,value:t})}:function(e,t){e.default=t}),sr=s&&s.__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)&&rr(t,e,n);return or(t,e),t};Object.defineProperty(ir,\"__esModule\",{value:!0}),ir.PrivateChannelClient=void 0;const ar=sr(Hi);var cr,dr;function hr(){if(cr)return tr;cr=1;var e,t=s&&s.__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)},n=s&&s.__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},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(tr,\"__esModule\",{value:!0}),tr.FDC3ModuleBase=void 0;const o=nr,a=Hi,c=wr(),d=r(i);return tr.FDC3ModuleBase=class{get client(){return t(this,e,\"f\").call(this)}get fin(){return this.wire.getFin()}constructor(t,i){this.wire=i,e.set(this,void 0),n(this,e,t,\"f\")}async broadcast(e){return this.wire.sendAction(\"fdc3-broadcast\").catch((e=>{})),this.client.setContext(e)}async _open(e,t){this.wire.sendAction(\"fdc3-open\").catch((e=>{}));try{return await c.InteropClient.ferryFdc3Call(this.client,\"fdc3Open\",{app:e,context:t})}catch(e){const t=e.message===a.BROKER_ERRORS.fdc3Open?\"ResolverUnavailable\":e.message;throw new Error(t)}}async _getChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:\"system\",...(0,o.getUnsupportedChannelApis)()})))}async getOrCreateChannel(e){this.wire.sendAction(\"fdc3-get-or-create-channel\").catch((e=>{}));const t=(await this._getChannels()).find((t=>t.id===e));if(t)return{...t,type:\"system\",...(0,o.getUnsupportedChannelApis)()};try{const t=await this.client.joinSessionContextGroup(e);return(0,o.buildAppChannelObject)(t)}catch(e){throw console.error(e.message),new Error(o.ChannelError.CreationFailed)}}async getSystemChannels(){return this.wire.sendAction(\"fdc3-get-system-channels\").catch((e=>{})),this._getChannels()}async joinChannel(e){this.wire.sendAction(\"fdc3-join-channel\").catch((e=>{}));try{return await this.client.joinContextGroup(e)}catch(e){if(e.message===a.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup?console.error(\"The Channel you have tried to join is an App Channel. Custom Channels can only be defined by the Interop Broker through code or manifest configuration. Please use getOrCreateChannel.\"):console.error(e.message),e.message.startsWith(\"Attempting to join a context group that does not exist\"))throw new Error(o.ChannelError.NoChannelFound);throw new Error(o.ChannelError.AccessDenied)}}async getCurrentChannel(){this.wire.sendAction(\"fdc3-get-current-channel\").catch((e=>{}));const e=await this.getCurrentContextGroupInfo();return e?this.buildChannelObject(e):null}async leaveCurrentChannel(){return this.wire.sendAction(\"fdc3-leave-current-channel\").catch((e=>{})),this.client.removeFromContextGroup()}async getCurrentContextGroupInfo(){const e=await this.client.getContextGroups(),t=e.map((async e=>this.client.getAllClientsInContextGroup(e.id))),n=(await Promise.all(t)).findIndex((e=>e.some((e=>{const{uuid:t,name:n}=e;return this.wire.me.uuid===t&&this.wire.me.name===n}))));return e[n]}async buildChannelObject(e){return{...e,type:\"system\",addContextListener:(...[e,t])=>{let n,i;\"function\"==typeof e?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),n=e):(n=t,\"string\"==typeof e&&(i=e));const r=(async()=>{let e=!0;const t=await this.client.getCurrentContext(i);return this.client.addContextHandler(((i,r)=>{if(!e||(e=!1,!(0,d.default)(t,i)))return n(i,r)}),i)})();return{...r,unsubscribe:()=>r.then((e=>e.unsubscribe()))}},broadcast:this.broadcast.bind(this),getCurrentContext:async e=>{const t=await this.client.getCurrentContext(e);return void 0===t?null:t}}}},e=new WeakMap,tr}ir.PrivateChannelClient=class{constructor(e,t){this.id=t,this.client=e,this.listeners=new Map}async broadcast(e){return this.client.dispatch(\"broadcast\",{context:e})}async getCurrentContext(e){return this.client.dispatch(\"getCurrentContext\",{contextType:e})}async addContextListener(e,t){if(\"function\"!=typeof t)throw new Error(\"Non-function argument passed to the second parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.\");let n;n=e?`contextHandler:invoke-${this.id}-${e}-${ar.generateId()}`:`contextHandler:invoke-${this.id}-${ar.generateId()}`,this.client.register(n,ar.wrapContextHandler(t,n));const i={unsubscribe:await this.createContextUnsubscribeCb(n)};return this.listeners.set(n,i),await this.client.dispatch(\"contextHandlerAdded\",{handlerId:n,contextType:e}),i}createNonStandardUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch(\"nonStandardHandlerRemoved\",{handlerId:e})}}createContextUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch(\"contextHandlerRemoved\",{handlerId:e})}}onAddContextListener(e){const t=`onContextHandlerAdded:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch(\"onAddContextHandlerAdded\",{handlerId:t}),n}onDisconnect(e){const t=`onDisconnect:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch(\"onDisconnectHandlerAdded\",{handlerId:t}),n}onUnsubscribe(e){const t=`onUnsubscribe:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch(\"onUnsubscribeHandlerAdded\",{handlerId:t}),n}async cleanUpAllSubs(){Array.from(this.listeners.keys()).forEach((e=>{this.client.remove(e),this.listeners.delete(e)}))}async disconnect(){try{await this.client.dispatch(\"clientDisconnecting\"),await this.cleanUpAllSubs(),await this.client.disconnect()}catch(e){throw new Error(e.message)}}},function(e){var t=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,\"__esModule\",{value:!0}),e.getIntentResolution=e.isChannel=e.isContext=e.connectPrivateChannel=e.buildAppChannelObject=e.buildPrivateChannelObject=e.ChannelError=e.ResultError=e.UnsupportedChannelApiError=e.getUnsupportedChannelApis=void 0;const n=Hi,r=ir,o=t(i);e.getUnsupportedChannelApis=e=>({addContextListener:()=>{throw new a(\"Channel.addContextListener\",e)},broadcast:()=>{throw new a(\"Channel.broadcast\",e)},getCurrentContext:()=>{throw new a(\"Channel.getCurrentContext\",e)}});class a extends Error{constructor(e,t=\"System\"){super(e),this.message=`Calling ${e} on an instance of a ${t} Channel returned by fdc3.get${t}Channels is not supported. If you would like to use a ${t} Channel, please use fdc3.joinChannel, fdc3.addContextListener, and fdc3.broadcast instead.`}}var c,d;e.UnsupportedChannelApiError=a,function(e){e.NoResultReturned=\"NoResultReturned\",e.IntentHandlerRejected=\"IntentHandlerRejected\"}(c=e.ResultError||(e.ResultError={})),(d=e.ChannelError||(e.ChannelError={})).NoChannelFound=\"NoChannelFound\",d.AccessDenied=\"AccessDenied\",d.CreationFailed=\"CreationFailed\";e.buildPrivateChannelObject=e=>{let t=!1;const n=()=>{if(t)throw new Error(\"Private Channel Client has been disconnected from the Private Channel\")};return{id:e.id,type:\"private\",broadcast:async t=>(n(),e.broadcast(t)),getCurrentContext:async t=>(n(),e.getCurrentContext(t)),addContextListener:async(t,i)=>{n();let r=i,o=t;\"function\"==typeof t&&(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),r=t,o=null);return e.addContextListener(o,r)},onAddContextListener:t=>(n(),e.onAddContextListener(t)),disconnect:async()=>(n(),t=!0,e.disconnect()),onDisconnect:t=>(n(),e.onDisconnect(t)),onUnsubscribe:t=>(n(),e.onUnsubscribe(t))}};e.buildAppChannelObject=e=>({id:e.id,type:\"app\",broadcast:e.setContext,getCurrentContext:async t=>{const n=await e.getCurrentContext(t);return void 0===n?null:n},addContextListener:(t,n)=>{let i,r;\"function\"==typeof t?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),i=t):(i=n,\"string\"==typeof t&&(r=t));const s=(async()=>{let t=!0;const n=await e.getCurrentContext(r);return e.addContextHandler(((e,r)=>{if(!t||(t=!1,!(0,o.default)(n,e)))return i(e,r)}),r)})();return{...s,unsubscribe:()=>s.then((e=>e.unsubscribe()))}}});e.connectPrivateChannel=async t=>{try{const n=await fin.InterApplicationBus.Channel.connect(t),i=new r.PrivateChannelClient(n,t);return(0,e.buildPrivateChannelObject)(i)}catch(e){throw new Error(`Private Channel with id: ${t} doesn't exist`)}};e.isContext=e=>{if(e&&\"object\"==typeof e&&\"type\"in e){const{type:t}=e;return\"string\"==typeof t}return!1};e.isChannel=e=>{if(e&&\"object\"==typeof e&&\"type\"in e&&\"id\"in e){const{type:t,id:n}=e;return\"string\"==typeof t&&\"string\"==typeof n&&(\"app\"===t||\"private\"===t)}return!1};e.getIntentResolution=async(t,i,r,o)=>{const s=(0,n.generateId)(),a=new Promise(((e,t)=>{fin.InterApplicationBus.subscribe({uuid:\"*\"},s,(t=>{e(t)})).catch((()=>t(new Error(\"getResult is not supported in this environment\"))))})),d=r?{target:r,intentResolutionResultId:s}:{intentResolutionResultId:s},h=o?{name:o,context:i,metadata:d}:{...i,metadata:d},l=async()=>{let n=await a;if(!n||\"object\"!=typeof n)throw new Error(c.NoResultReturned);const{error:i}=n;if(i)throw new Error(c.IntentHandlerRejected);if((0,e.isChannel)(n)){const{id:i,type:r}=n;switch(r){case\"private\":n=await(0,e.connectPrivateChannel)(i);break;case\"app\":{const r=await t.joinSessionContextGroup(i);n=(0,e.buildAppChannelObject)(r);break}}}else if(!(0,e.isContext)(n))throw new Error(c.NoResultReturned);return n},u=o?await t.fireIntent(h):await t.fireIntentForContext(h);return\"object\"!=typeof u?{source:{appId:\"\",instanceId:\"\"},intent:\"\",version:\"2.0\",getResult:l}:{...u,getResult:l}}}(nr);var lr,ur,pr={};function wr(){if(ur)return Ki;ur=1;var e,t,n=s&&s.__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},i=s&&s.__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)},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ki,\"__esModule\",{value:!0}),Ki.InteropClient=void 0;const o=d,a=r(qi),c=function(){if(dr)return er;dr=1,Object.defineProperty(er,\"__esModule\",{value:!0}),er.Fdc3Module=void 0;const e=Hi,t=hr();class n extends t.FDC3ModuleBase{async open(e,t){await super._open(e,t)}addContextListener(e,t){let n;return this.wire.sendAction(\"fdc3-add-context-listener\").catch((e=>{})),\"function\"==typeof e?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),n=this.client.addContextHandler(e)):n=this.client.addContextHandler(t,null===e?void 0:e),{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}addIntentListener(e,t){this.wire.sendAction(\"fdc3-add-intent-listener\").catch((e=>{}));const n=this.client.registerIntentHandler((e=>{const{context:n,metadata:i}=e,{metadata:r}=n,o=i?.intentResolutionResultId||r?.intentResolutionResultId;o&&this.fin.InterApplicationBus.publish(o,null).catch((()=>null)),t(e.context)}),e,{fdc3Version:\"1.2\"});return{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}async raiseIntent(t,n,i){this.wire.sendAction(\"fdc3-raise-intent\").catch((e=>{}));const r=i?{name:t,context:n,metadata:{target:i}}:{name:t,context:n};try{return await this.client.fireIntent(r)}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntent?\"ResolverUnavailable\":t.message;throw new Error(n)}}async findIntent(t,n){this.wire.sendAction(\"fdc3-find-intent\").catch((e=>{}));try{return await this.client.getInfoForIntent({name:t,context:n})}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntent?\"ResolverUnavailable\":t.message;throw new Error(n)}}async findIntentsByContext(t){this.wire.sendAction(\"fdc3-find-intents-by-context\").catch((e=>{}));try{return await this.client.getInfoForIntentsByContext(t)}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntentsByContext?\"ResolverUnavailable\":t.message;throw new Error(n)}}async raiseIntentForContext(t,n){this.wire.sendAction(\"fdc3-raise-intent-for-context\").catch((e=>{}));try{return await this.client.fireIntentForContext({...t,metadata:{target:n}})}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntentForContext?\"ResolverUnavailable\":t.message;throw new Error(n)}}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}getInfo(){return this.wire.sendAction(\"fdc3-get-info\").catch((e=>{})),{providerVersion:this.wire.environment.getAdapterVersionSync(),provider:`openfin-${this.wire.me.uuid}`,fdc3Version:\"1.2\"}}}return er.Fdc3Module=n,er}(),h=function(){if(lr)return pr;lr=1,Object.defineProperty(pr,\"__esModule\",{value:!0}),pr.Fdc3Module2=void 0;const e=hr(),t=Hi,n=wr(),i=nr,r=ir;class o extends e.FDC3ModuleBase{async open(e,t){return\"string\"==typeof e&&console.warn(\"Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).\"),super._open(e,t)}async findInstances(e){this.wire.sendAction(\"fdc3-find-instances\").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,\"fdc3FindInstances\",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3FindInstances?\"ResolverUnavailable\":e.message;throw new Error(n)}}async getAppMetadata(e){this.wire.sendAction(\"fdc3-get-app-metadata\").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,\"fdc3GetAppMetadata\",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3GetAppMetadata?\"ResolverUnavailable\":e.message;throw new Error(n)}}async addContextListener(e,t){this.wire.sendAction(\"fdc3-add-context-listener\").catch((e=>{}));const n=e=>t=>{const{contextMetadata:n,...i}=t,r=n?[{...i},n]:[t,null];e(...r)};let i=t,r=n(i);return\"function\"==typeof e?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),i=e,r=n(i),this.client.addContextHandler(r)):this.client.addContextHandler(r,null===e?void 0:e)}async findIntent(e,n,i){this.wire.sendAction(\"fdc3-find-intent\").catch((e=>{}));try{return await this.client.getInfoForIntent({name:e,context:n,metadata:{resultType:i}})}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntent?\"ResolverUnavailable\":e.message;throw new Error(n)}}async findIntentsByContext(e,i){this.wire.sendAction(\"fdc3-find-intents-by-context\").catch((e=>{}));const r=i?{context:e,metadata:{resultType:i}}:e;try{return await n.InteropClient.ferryFdc3Call(this.client,\"fdc3v2FindIntentsByContext\",r)}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntentsByContext?\"ResolverUnavailable\":e.message;throw new Error(n)}}async raiseIntent(e,n,r){this.wire.sendAction(\"fdc3-raise-intent\").catch((e=>{}));try{return\"string\"==typeof r&&console.warn(\"Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).\"),(0,i.getIntentResolution)(this.client,n,r,e)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?\"ResolverUnavailable\":e.message;throw new Error(n)}}async raiseIntentForContext(e,n){this.wire.sendAction(\"fdc3-raise-intent-for-context\").catch((e=>{}));try{return\"string\"==typeof n&&console.warn(\"Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).\"),(0,i.getIntentResolution)(this.client,e,n)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?\"ResolverUnavailable\":e.message;throw new Error(n)}}async addIntentListener(e,t){if(this.wire.sendAction(\"fdc3-add-intent-listener\").catch((e=>{})),\"string\"!=typeof e)throw new Error(\"First argument must be an Intent name\");return this.client.registerIntentHandler((async e=>{let n,i;const{context:r,metadata:o}=e,{contextMetadata:s,metadata:a,...c}=r,d=o?.intentResolutionResultId||a?.intentResolutionResultId;try{const e=a?{metadata:a,...c}:{...c};n=await t(e,s),i=n}catch(e){n=e,i={error:!0}}if(d&&this.fin.InterApplicationBus.publish(d,i).catch((()=>null)),n instanceof Error)throw new Error(n.message);return n}),e,{fdc3Version:\"2.0\"})}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}async createPrivateChannel(){const e=(0,t.generateId)();await n.InteropClient.ferryFdc3Call(this.client,\"createPrivateChannelProvider\",{channelId:e});const o=await this.fin.InterApplicationBus.Channel.connect(e),s=new r.PrivateChannelClient(o,e);return(0,i.buildPrivateChannelObject)(s)}async getUserChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:\"user\",...(0,i.getUnsupportedChannelApis)(\"User\")})))}async getSystemChannels(){return console.warn(\"This API has been deprecated. Please use fdc3.getUserChannels instead.\"),super.getSystemChannels()}async joinUserChannel(e){return super.joinChannel(e)}async joinChannel(e){return console.warn(\"This API has been deprecated. Please use fdc3.joinUserChannel instead.\"),super.joinChannel(e)}async getCurrentChannel(){const e=await super.getCurrentChannel();return e?{...e,type:\"user\",broadcast:this.broadcast.bind(this)}:null}async getInfo(){return n.InteropClient.ferryFdc3Call(this.client,\"fdc3v2GetInfo\",{fdc3Version:\"2.0\"})}}return pr.Fdc3Module2=o,pr}(),l=Hi;let u=class extends o.Base{constructor(i,r){super(i),e.set(this,void 0),t.set(this,void 0),n(this,t,new Map,\"f\"),n(this,e,r,\"f\")}async setContext(t){this.wire.sendAction(\"interop-client-set-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"setContext\",{context:t})}async addContextHandler(t,n){if(this.wire.sendAction(\"interop-client-add-context-handler\").catch((e=>{})),\"function\"!=typeof t)throw new Error(\"Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.\");const r=await i(this,e,\"f\");let o;o=n?`invokeContextHandler-${n}-${(0,l.generateId)()}`:\"invokeContextHandler\";const s=(0,l.wrapContextHandler)(t,o);return r.register(o,s),await r.dispatch(\"contextHandlerRegistered\",{handlerId:o,contextType:n}),{unsubscribe:async()=>{r.remove(o),await r.dispatch(\"removeContextHandler\",{handlerId:o})}}}async getContextGroups(){this.wire.sendAction(\"interop-client-get-context-groups\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getContextGroups\")}async joinContextGroup(t,n){this.wire.sendAction(\"interop-client-join-context-group\").catch((e=>{}));const r=await i(this,e,\"f\");if(!t)throw new Error(\"No contextGroupId specified for joinContextGroup.\");return r.dispatch(\"joinContextGroup\",{contextGroupId:t,target:n})}async removeFromContextGroup(t){this.wire.sendAction(\"interop-client-remove-from-context-group\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"removeFromContextGroup\",{target:t})}async getAllClientsInContextGroup(t){this.wire.sendAction(\"interop-client-get-all-clients-in-context-group\").catch((e=>{}));const n=await i(this,e,\"f\");if(!t)throw new Error(\"No contextGroupId specified for getAllClientsInContextGroup.\");return n.dispatch(\"getAllClientsInContextGroup\",{contextGroupId:t})}async getInfoForContextGroup(t){this.wire.sendAction(\"interop-client-get-info-for-context-group\").catch((e=>{}));const n=await i(this,e,\"f\");if(!t)throw new Error(\"No contextGroupId specified for getInfoForContextGroup.\");return n.dispatch(\"getInfoForContextGroup\",{contextGroupId:t})}async fireIntent(t){this.wire.sendAction(\"interop-client-fire-intent\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"fireIntent\",t)}async registerIntentHandler(t,n,r){this.wire.sendAction(\"interop-client-register-intent-handler\").catch((e=>{}));const o=await i(this,e,\"f\"),s=`intent-handler-${n}`,a=(0,l.wrapIntentHandler)(t,s);try{await o.register(s,a),await o.dispatch(\"intentHandlerRegistered\",{handlerId:s,...r})}catch(e){throw new Error(\"Unable to register intent handler\")}return{unsubscribe:async()=>{o.remove(s)}}}async getCurrentContext(t){this.wire.sendAction(\"interop-client-get-current-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getCurrentContext\",{contextType:t})}async getInfoForIntent(t){this.wire.sendAction(\"interop-client-get-info-for-intent\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getInfoForIntent\",t)}async getInfoForIntentsByContext(t){this.wire.sendAction(\"interop-client-get-info-for-intents-by-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getInfoForIntentsByContext\",t)}async fireIntentForContext(t){this.wire.sendAction(\"interop-client-fire-intent-for-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"fireIntentForContext\",t)}async joinSessionContextGroup(n){try{const r=i(this,t,\"f\").get(n);if(r)return r.getUserInstance();const o=await i(this,e,\"f\"),{hasConflict:s}=await o.dispatch(\"sessionContextGroup:createIfNeeded\",{sessionContextGroupId:n});s&&console.warn(`A (non-session) context group with the name \"${n}\" already exists. If you are trying to join a Context Group, call joinContextGroup instead.`);const c=new a.default(this.wire,i(this,e,\"f\"),n);return i(this,t,\"f\").set(n,c),c.getUserInstance()}catch(e){throw console.error(`Error thrown trying to create Session Context Group with id \"${n}\": ${e}`),e}}async onDisconnection(t){this.wire.sendAction(\"interop-client-add-ondisconnection-listener\").catch((e=>{}));return(await i(this,e,\"f\")).onDisconnection((e=>{const{uuid:n}=e;t({type:\"interop-broker\",topic:\"disconnected\",brokerName:n})}))}getFDC3Sync(e){switch(e){case\"1.2\":return new c.Fdc3Module((()=>this),this.wire);case\"2.0\":return new h.Fdc3Module2((()=>this),this.wire);default:throw new Error(`Invalid FDC3 version provided: ${e}. Must be '1.2' or '2.0'`)}}async getFDC3(e){return this.getFDC3Sync(e)}static async ferryFdc3Call(t,n,r){return(await i(t,e,\"f\")).dispatch(n,r||null)}};return Ki.InteropClient=u,e=new WeakMap,t=new WeakMap,Ki}var yr,fr,gr,mr={};function vr(){if(yr)return mr;yr=1,Object.defineProperty(mr,\"__esModule\",{value:!0}),mr.overrideCheck=mr.checkFDC32Overrides=mr.getDefaultViewFdc3VersionFromAppInfo=void 0;const e=Vi();function t(t){return[\"fdc3HandleFindInstances\",\"handleInfoForIntent\",\"handleInfoForIntentsByContext\",\"fdc3HandleGetAppMetadata\",\"fdc3HandleGetInfo\",\"fdc3HandleOpen\",\"handleFiredIntent\",\"handleFiredIntentForContext\"].filter((n=>t[n]===e.InteropBroker.prototype[n]))}return mr.getDefaultViewFdc3VersionFromAppInfo=function({manifest:e,initialOptions:t}){const n=e?.platform?.defaultViewOptions?.fdc3InteropApi??t.defaultViewOptions?.fdc3InteropApi;return[\"1.2\",\"2.0\"].includes(n??\"\")?n:void 0},mr.checkFDC32Overrides=t,mr.overrideCheck=function(e,n){if(n&&\"2.0\"===n){const n=t(e);n.length>0&&console.warn(`WARNING: FDC3 2.0 has been set as a default option for Views in this Platform, but the required InteropBroker APIs for FDC3 2.0 compliance have not all been overridden.\\nThe following APIs need to be overridden:\\n${n.join(\"\\n\")}`)}},mr}function Cr(){return gr||(gr=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),i=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),i(function(){if(fr)return Ti;fr=1;var e=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ti,\"__esModule\",{value:!0}),Ti.InteropModule=void 0;const t=e(n),i=$i,r=d,o=Vi(),a=wr(),c=vr(),h=Tn,l=e=>new e,u=\"You have attempted to use or modify InteropBroker parameters, which is not allowed. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.\";class p extends r.Base{async init(e,n=l){this.wire.sendAction(\"interop-init\").catch((()=>{}));const r=await this.wire.environment.getInteropInfo(this.wire.getFin()),s=(0,i.createUnusableObject)(u),a=(0,i.createWarningObject)(u,(0,t.default)(r)),d=async()=>{throw new Error(u)},p=o.InteropBroker.createClosedConstructor(this.wire,(()=>this.fin.InterApplicationBus.Channel.create(`interop-broker-${e}`)),r);let w;return w=Array.isArray(n)?new((0,h.overrideFromComposables)(...n)(p))(s,d,a):await n(p,s,d,a),(0,c.overrideCheck)(w,r.fdc3Version),w}connectSync(e,t){return this.wire.sendAction(\"interop-connect-sync\").catch((()=>{})),new a.InteropClient(this.wire,this.wire.environment.whenReady().then((()=>this.fin.InterApplicationBus.Channel.connect(`interop-broker-${e}`,{payload:t}))))}}return Ti.InteropModule=p,Ti}(),e),i(wr(),e),i(Vi(),e)}(Li)),Li}var br={},Ir={},Er={},xr={};Object.defineProperty(xr,\"__esModule\",{value:!0}),xr.getSnapshotSourceChannelName=void 0;xr.getSnapshotSourceChannelName=e=>`snapshot-source-provider-${e.uuid}`;var Ar,Pr,Mr,_r,Or,Sr=s&&s.__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},Rr=s&&s.__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)};Object.defineProperty(Er,\"__esModule\",{value:!0}),Er.SnapshotSource=void 0;const Fr=d,jr=xr,kr=new Map;class Lr extends Fr.Base{constructor(e,t){super(e),Ar.set(this,void 0),Pr.set(this,(()=>(kr.has(this.identity.uuid)||kr.set(this.identity.uuid,{eventFired:null,clientPromise:null}),kr.get(this.identity.uuid)))),Mr.set(this,(()=>(Rr(this,Pr,\"f\").call(this).clientPromise||(Rr(this,Pr,\"f\").call(this).clientPromise=Rr(this,_r,\"f\").call(this)),Rr(this,Pr,\"f\").call(this).clientPromise))),_r.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);try{Rr(this,Pr,\"f\").call(this).eventFired||await Rr(this,Or,\"f\").call(this);const t=await this.fin.InterApplicationBus.Channel.connect(e,{wait:!1});return t.onDisconnection((()=>{Rr(this,Pr,\"f\").call(this).clientPromise=null,Rr(this,Pr,\"f\").call(this).eventFired=null})),t}catch(e){throw Rr(this,Pr,\"f\").call(this).clientPromise=null,new Error(\"The targeted SnapshotSource is not currently initialized. Await this object's ready() method.\")}})),Or.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);let t,n;const i=new Promise(((e,i)=>{t=e,n=i}));Rr(this,Pr,\"f\").call(this).eventFired=i;const r=async i=>{try{i.channelName===e&&(t(),await this.fin.InterApplicationBus.Channel.removeListener(\"connected\",r))}catch(e){n(e)}};await this.fin.InterApplicationBus.Channel.on(\"connected\",r)})),Sr(this,Ar,t,\"f\")}get identity(){return Rr(this,Ar,\"f\")}async ready(){this.wire.sendAction(\"snapshot-source-ready\").catch((e=>{}));try{await Rr(this,Mr,\"f\").call(this)}catch(e){await Rr(this,Pr,\"f\").call(this).eventFired}}async getSnapshot(){this.wire.sendAction(\"snapshot-source-get-snapshot\").catch((e=>{}));const e=await Rr(this,Mr,\"f\").call(this),t=await e.dispatch(\"get-snapshot\");return(await t).snapshot}async applySnapshot(e){this.wire.sendAction(\"snapshot-source-apply-snapshot\").catch((e=>{}));return(await Rr(this,Mr,\"f\").call(this)).dispatch(\"apply-snapshot\",{snapshot:e})}}Er.SnapshotSource=Lr,Ar=new WeakMap,Pr=new WeakMap,Mr=new WeakMap,_r=new WeakMap,Or=new WeakMap,Object.defineProperty(Ir,\"__esModule\",{value:!0}),Ir.SnapshotSourceModule=void 0;const Tr=d,$r=Er,Br=xr;class Gr extends Tr.Base{async init(e){if(this.wire.sendAction(\"snapshot-source-init\").catch((e=>{})),\"object\"!=typeof e||\"function\"!=typeof e.getSnapshot||\"function\"!=typeof e.applySnapshot)throw new Error(\"you must pass in a valid SnapshotProvider\");const t=await this.fin.InterApplicationBus.Channel.create((0,Br.getSnapshotSourceChannelName)(this.fin.me));t.register(\"get-snapshot\",(async()=>({snapshot:await e.getSnapshot()}))),t.register(\"apply-snapshot\",(({snapshot:t})=>e.applySnapshot(t)))}wrapSync(e){return this.wire.sendAction(\"snapshot-source-wrap-sync\").catch((e=>{})),new $r.SnapshotSource(this.wire,e)}async wrap(e){return this.wire.sendAction(\"snapshot-source-wrap\").catch((e=>{})),this.wrapSync(e)}}Ir.SnapshotSourceModule=Gr,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Ir,e),n(Er,e)}(br),Object.defineProperty(a,\"__esModule\",{value:!0});var Wr=a.Fin=void 0;const Hr=t,Nr=c,Dr=ie(),Ur=Z(),Vr=de,zr=en,Kr=rn,qr=un,Jr=bn,Yr=J(),Zr=An,Qr=ki,Xr=Cr(),eo=br;class to extends Hr.EventEmitter{constructor(e){super(),this.wire=e,this.System=new Nr.System(e),this.Window=new Dr._WindowModule(e),this.Application=new Ur.ApplicationModule(e),this.InterApplicationBus=new Vr.InterApplicationBus(e),this.Clipboard=new zr.Clipboard(e),this.ExternalApplication=new Kr.ExternalApplicationModule(e),this.Frame=new qr._FrameModule(e),this.GlobalHotkey=new Jr.GlobalHotkey(e),this.Platform=new Zr.PlatformModule(e,this.InterApplicationBus.Channel),this.View=new Yr.ViewModule(e),this.Interop=new Xr.InteropModule(e),this.SnapshotSource=new eo.SnapshotSourceModule(e),e.registerFin(this),this.me=(0,Qr.getMe)(e),e.on(\"disconnected\",(()=>{this.emit(\"disconnected\")}))}}Wr=a.Fin=to;var no={},io={};function ro(e){return\"string\"==typeof e.manifestUrl}function oo(e){return ao(e)&&\"string\"==typeof e.address}function so(e){return oo(e)&&\"string\"==typeof e.token}function ao(e){return\"string\"==typeof e.uuid}function co(e){return e.runtime&&\"string\"==typeof e.runtime.version}function ho(e){return ao(e)&&co(e)}Object.defineProperty(io,\"__esModule\",{value:!0}),io.isInternalConnectConfig=io.isPortDiscoveryConfig=io.isNewConnectConfig=io.isConfigWithReceiver=io.isRemoteConfig=io.isExistingConnectConfig=io.isExternalConfig=void 0,io.isExternalConfig=ro,io.isExistingConnectConfig=oo,io.isRemoteConfig=so,io.isConfigWithReceiver=function(e){return\"object\"==typeof e.receiver&&so({...e,address:\"\"})},io.isNewConnectConfig=ho,io.isPortDiscoveryConfig=function(e){return ro(e)&&co(e)||ho(e)},io.isInternalConnectConfig=function(e){return oo(e)||ho(e)};var lo={},uo={};Object.defineProperty(uo,\"__esModule\",{value:!0}),uo.EmitterMap=void 0;const po=t;function wo(e){return Buffer.from(e).toString(\"base64\")}uo.EmitterMap=class{constructor(){this.storage=new Map}hashKeys(e){return e.map(wo).join(\"/\")}getOrCreate(e){const t=this.hashKeys(e);return this.storage.has(t)||this.storage.set(t,new po.EventEmitter),this.storage.get(t)}has(e){return this.storage.has(this.hashKeys(e))}delete(e){const t=this.hashKeys(e);return this.storage.delete(t)}},Object.defineProperty(lo,\"__esModule\",{value:!0});const yo=uo;class fo extends yo.EmitterMap{constructor(){super(...arguments),this.dispatchEvent=e=>{if(function(e){return\"process-desktop-event\"===e.action}(e)){const{payload:t}=e,n=function(e){const{topic:t}=e;if(\"frame\"===t||\"window\"===t||\"view\"===t){const{uuid:n,name:i}=e;return[t,n,i]}if(\"application\"===t){const{uuid:n}=e;return[t,n]}return[t]}(t);if(this.has(n))return this.getOrCreate(n).emit(t.type,t),!0}return!1}}}lo.default=fo;var go,mo,vo=s&&s.__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},Co=s&&s.__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)},bo=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(no,\"__esModule\",{value:!0});var Io=no.Transport=void 0;const Eo=t,xo=io,Ao=g,Po=bo(lo),Mo=ki,_o=ke;class Oo extends Eo.EventEmitter{constructor(e,t,n){super(),this.wireListeners=new Map,this.topicRefMap=new Map,this.eventAggregator=new Po.default,this.messageHandlers=[this.eventAggregator.dispatchEvent],go.set(this,void 0),mo.set(this,void 0),this.connectSync=()=>{Co(this,go,\"f\").connectSync()},this.getPort=()=>Co(this,go,\"f\").getPort(),vo(this,go,new e(this.onmessage.bind(this)),\"f\"),this.environment=t,this.sendRaw=Co(this,go,\"f\").send.bind(Co(this,go,\"f\")),this.registerMessageHandler(this.handleMessage.bind(this)),Co(this,go,\"f\").on(\"disconnected\",(()=>{for(const[,{handleNack:e}]of this.wireListeners)e({reason:\"Remote connection has closed\"});this.wireListeners.clear(),this.emit(\"disconnected\")}));const{uuid:i,name:r}=n,o=this.environment.getCurrentEntityType();this.me=(0,Mo.getBaseMe)(o,i,r)}getFin(){if(!Co(this,mo,\"f\"))throw new Error(\"No Fin object registered for this transport\");return Co(this,mo,\"f\")}registerFin(e){if(Co(this,mo,\"f\"))throw new Error(\"Fin object has already been registered for this transport\");vo(this,mo,e,\"f\")}shutdown(){return Co(this,go,\"f\").shutdown()}async connect(e){if((0,xo.isConfigWithReceiver)(e))return await Co(this,go,\"f\").connect(e.receiver),this.authorize(e);if((0,xo.isRemoteConfig)(e))return this.connectRemote(e);if((0,xo.isExistingConnectConfig)(e))return this.connectByPort(e);if((0,xo.isNewConnectConfig)(e)){const t=await this.environment.retrievePort(e);return this.connectByPort({...e,address:`ws://localhost:${t}`})}}async connectRemote(e){return await Co(this,go,\"f\").connect(new(this.environment.getWsConstructor())(e.address)),this.authorize(e)}async connectByPort(e){const{address:t,uuid:n}=e,i={...e,type:\"file-token\"},r=Co(this,go,\"f\");await r.connect(new(this.environment.getWsConstructor())(e.address));const o=await this.sendAction(\"request-external-authorization\",{uuid:n,type:\"file-token\"},!0);if(\"external-authorization-response\"!==o.action)throw new Ao.UnexpectedActionError(o.action);return await this.environment.writeToken(o.payload.file,o.payload.token),this.authorize(i)}async authorize(e){const t=await this.sendAction(\"request-authorization\",e,!0);if(\"authorization-response\"!==t.action)throw new Ao.UnexpectedActionError(t.action);if(!0!==t.payload.success)throw new Ao.RuntimeError(t.payload)}sendAction(e,t={},n=!1){let i=()=>{};const r=Ao.RuntimeError.getCallSite(1),o=this.environment.getNextMessageId(),s=new Promise(((s,a)=>{i=a;const c={action:e,payload:t,messageId:o},d=Co(this,go,\"f\");return this.addWireListener(o,s,(e=>this.nackHandler(e,a,r)),n),d.send(c).catch(a)}));return Object.assign(s,{cancel:i,messageId:o})}nackHandler(e,t,n){t(\"string\"==typeof e?e:new Ao.RuntimeError(e,n))}ferryAction(e){return new Promise(((t,n)=>{const i=this.environment.getNextMessageId();e.messageId=i;const r=e=>{t(e.payload)};return Co(this,go,\"f\").send(e).then((()=>this.addWireListener(i,r,(e=>this.nackHandler(e,n)),!1))).catch(n)}))}registerMessageHandler(e){this.messageHandlers.push(e)}addWireListener(e,t,n,i){i?this.uncorrelatedListener=t:this.wireListeners.has(e)?n({reason:\"Duplicate handler id\",error:(0,_o.errorToPOJO)(new Ao.DuplicateCorrelationError(String(e)))}):this.wireListeners.set(e,{resolve:t,handleNack:n})}onmessage(e){for(const t of this.messageHandlers)t.call(null,e)}handleMessage(e){const t=e.correlationId||NaN;if(\"correlationId\"in e){if(!this.wireListeners.has(t))return!1;{const{resolve:n,handleNack:i}=this.wireListeners.get(t);\"ack\"!==e.action?i({reason:\"Did not receive ack action\",error:(0,_o.errorToPOJO)(new Ao.NoAckError(e.action))}):\"payload\"in e?e.payload.success?n.call(null,e):i(e.payload):\"string\"==typeof e.reason?i(e):(console.warn(\"Received invalid response from core\",e),i({reason:\"invalid response shape\"})),this.wireListeners.delete(t)}}else this.uncorrelatedListener&&this.uncorrelatedListener.call(null,e),this.uncorrelatedListener=()=>{};return!0}}Io=no.Transport=Oo,go=new WeakMap,mo=new WeakMap;const So=(...e)=>({log:(...t)=>console.debug(`[${(new Date).toISOString()}]`,...(e=>e.map((e=>`[${e}]`)))(e),...t),getLogger:(...t)=>So(...e,...t)}),Ro=So(\"@openfin/core-web/client\");function Fo(e,t){if(!function(e){return\"string\"==typeof e}(e))throw new Error(`Property ${t} has invalid type. Expected string, got ${typeof e}.`)}const jo=\"web-broker-ports-ready\",ko=Ro.getLogger(\"get-web-interop-ports\");function Lo(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)}function To(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}\"function\"==typeof SuppressedError&&SuppressedError;const $o=e=>{var n,i,r;return r=class extends t.EventEmitter{constructor(t){super(),n.set(this,void 0),i.set(this,!1),this.connectSync=()=>{Lo(this,i,\"f\")||(e.addEventListener(\"message\",(e=>{e.data?.topic?.startsWith(\"wire-message\")&&e.data.message&&Lo(this,n,\"f\").call(this,{...JSON.parse(e.data.message),ports:e.ports})})),e.start())},this.connect=async()=>{this.connectSync()},this.send=t=>(e.postMessage({topic:\"wire-message\",message:JSON.stringify(t)}),Promise.resolve()),this.shutdown=async()=>{e.close()},To(this,n,t,\"f\")}getPort(){return e}},n=new WeakMap,i=new WeakMap,r};var Bo={},Go={};Object.defineProperty(Go,\"__esModule\",{value:!0}),Go.BaseEnvironment=void 0;const Wo=vr();Go.BaseEnvironment=class{async getViewWindowIdentity(e,t){const{identity:n}=await e.View.wrapSync(t).getCurrentWindow();return n}async getInteropInfo(e){const t=await e.Application.getCurrentSync().getInfo().catch((()=>null)),n=t?.initialOptions?.interopBrokerConfiguration??{};return{fdc3Version:t?(0,Wo.getDefaultViewFdc3VersionFromAppInfo)(t):void 0,...n,fdc3Info:{providerVersion:await e.System.getVersion(),provider:\"OpenFin\"}}}},Object.defineProperty(Bo,\"__esModule\",{value:!0});var Ho=Bo.BrowserEnvironment=void 0;const No=Go;class Do extends No.BaseEnvironment{constructor(){super(...arguments),this.type=\"other\",this.getRandomId=()=>{const e=new Uint32Array(1);return window.crypto.getRandomValues(e)[0].toString(32)}}getAdapterVersionSync(){return\"\"}observeBounds(e,t){throw new Error(\"Method not implemented.\")}layoutAllowedInContext(e){return!1}initLayoutManager(e,t,n){throw new Error(\"Method not implemented.\")}applyLayoutSnapshot(e,t,n){throw new Error(\"Method not implemented.\")}createLayout(e,t){throw new Error(\"Method not implemented.\")}destroyLayout(e,t){throw new Error(\"Method not implemented.\")}resolveLayout(e,t){throw new Error(\"Method not implemented.\")}initPlatform(...e){throw new Error(\"Method not implemented.\")}writeToken(e,t){return Promise.resolve(\"\")}retrievePort(e){throw new Error(\"Method not implemented.\")}getNextMessageId(){return this.getRandomId()}createChildContent(e){throw new Error(\"Method not implemented.\")}getWebWindow(e){throw new Error(\"Method not implemented.\")}getCurrentEntityIdentity(){throw new Error(\"Method not implemented.\")}getCurrentEntityType(){return\"external connection\"}raiseEvent(e,t){throw new Error(\"Method not implemented.\")}getUrl(){return location.href}getDefaultChannelOptions(){return{create:{},connect:{}}}getRtcPeer(){return new RTCPeerConnection}getWsConstructor(){return WebSocket}whenReady(){return Promise.resolve()}}Ho=Bo.BrowserEnvironment=Do;const Uo=e=>\"platform\"in e&&void 0!==e.platform;var Vo,zo;class Ko extends Ho{constructor(e){super(),this.connectConfig=e,Vo.set(this,void 0),zo.set(this,new W((async()=>Promise.resolve().then((function(){return require(\"./main-b14f67c9.js\")}))))),Uo(e)&&this.validatePlatformOptions(e)}getAdapterVersionSync(){return\"0.39.21\"}validatePlatformOptions({platform:e}){if(!(\"layoutSnapshot\"in e))throw new Error(\"Platform options are missing layoutSnapshot. Please provide a layoutSnapshot in the platform options.\");if(\"windows\"in e||\"windows\"in e.layoutSnapshot)throw new Error(\"It appears you tried to call connect() with a snapshot object from an OpenFin desktop environment. Note that connect() expects to be called with a platform property with this structure: { platform: { layoutSnapshot } }. To get a layoutSnapshot of the expected structure, use fin.Platform.Layout.getCurrentLayoutManagerSync().getLayoutSnapshot() in v34+ in your desktop environment.\");const{layouts:t}=e.layoutSnapshot;Object.entries(t).map((([e,t])=>{if(\"object\"!=typeof t||null===t)throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must be an object.`);if(!(\"content\"in t))throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must contain a 'content' property.`)}))}async getInteropInfo(e){return{...{contextGroups:void 0,logging:{beforeAction:{enabled:!1},afterAction:{enabled:!1}}},fdc3Version:void 0,fdc3Info:{providerVersion:\"0.39.21\",provider:\"OpenFin Web\"}}}layoutAllowedInContext(e){return!0}async initLayoutManager(e,t,n){if(Lo(this,Vo,\"f\"))throw new Error(\"Layout already initialized.\");if(!Uo(this.connectConfig))throw new Error(\"Platform options are missing from connection config.\");const{WebLayoutEntryPoint:i}=await Lo(this,zo,\"f\").getValue();return To(this,Vo,new i(this.connectConfig),\"f\"),await Lo(this,Vo,\"f\").initLayoutManager(e,t,n)}async applyLayoutSnapshot(e,t,n){Lo(this,Vo,\"f\")?.applyLayoutSnapshot(e,t,n)}async createLayout(e,t){return Lo(this,Vo,\"f\")?.createLayout(e,t)}async destroyLayout(e,t){return Lo(this,Vo,\"f\")?.destroyLayout(e,t)}async getViewWindowIdentity(e,t){return Promise.resolve({uuid:t.uuid,name:t.uuid})}}Vo=new WeakMap,zo=new WeakMap;const qo=()=>{const e=((e,t)=>{const n=new RegExp(`^${t}<(?.*)>$`).exec(e)?.groups?.meta;if(n)try{return JSON.parse(atob(n))}catch(e){throw new Error(`Failed to decode JSON from ${n}.`)}})(window.name,\"of-frame\");if(e)try{const{name:t,uuid:n,brokerUrl:i,providerId:r,contextGroup:o}=e;return Fo(i,\"brokerUrl\"),Fo(n,\"uuid\"),Fo(t,\"name\"),{identity:{name:t,uuid:n},brokerUrl:i,interopConfig:{providerId:r,currentContextGroup:o}}}catch(e){throw new Error(`Unexpected error occurred when inferring platform information: ${e.stack}`)}},Jo=()=>{const e=r.v4();return{uuid:e,name:e}},Yo=async e=>{if(\"enabled\"===e.connectionInheritance){const t=await(async e=>{const t=qo();if(t){const{validateOptions:n=(()=>!0)}=e,{identity:i,...r}=t;if(!await n(r))throw new Error(\"Parent options were rejected by validateOptions.\");return t}})(e);if(t)return t}if(!e.options){const t=\"enabled\"===e.connectionInheritance?\"Broker URL was not specified nor provided by a platform container.\":\"Connection inheritance is disabled but no options were provided.\";throw new Error(t)}return{...e.options,identity:Jo()}};exports.__classPrivateFieldGet=Lo,exports.__classPrivateFieldSet=To,exports.apiExposer=Gn,exports.commonjsGlobal=s,exports.connect=async t=>{try{Ro.log(\"Establishing connection\",t);const{brokerUrl:n,identity:i,timeout:r,interopConfig:s}=await Yo(t),{workerPort:a,iframeBrokerPort:c}=await(async(e,t,n)=>{const{origin:i}=new URL(e),r=document.createElement(\"IFRAME\");let s;r.style.display=\"none\";try{return await new Promise(((a,c)=>{const d=e=>{if(e.source===r.contentWindow&&e.data?.topic===`ack-${jo}`){if(e.origin!==i)c(new Error(`Broker redirected to unexpected origin ${e.origin}, expected ${i}.`));else if(e.data.success){const[t,n]=e.ports;a({iframeBrokerPort:t,workerPort:n})}else c(new m(e.data));window.removeEventListener(\"message\",d),clearTimeout(s)}};window.addEventListener(\"message\",d),ko.log(`Connecting to broker ${e}`),r.setAttribute(\"src\",e),r.setAttribute(\"name\",o(t,\"of-broker\")),document.body.appendChild(r),ko.log(\"Iframe loaded, awaiting init message from iframe\"),n&&(s=setTimeout((()=>{window.removeEventListener(\"message\",d),document.body.removeChild(r),c(new Error(\"Worker did not initialize in time\"))}),n))}))}catch(e){throw new Error(`Failed to initialise Fin Web Client. ${e.message}`,{cause:e})}})(n,i,r);Ro.log(\"Successfully established connection to shared worker\");const d={entityType:\"external connection\",...i};a.start(),c.start();const h=((t,n,i)=>{const r=$o(n),o=new Ko(t),s=new Io(r,o,i);return s.connectSync(),window.Buffer=e.Buffer,new Wr(s)})(t,a,d);return s?.providerId&&(h.me.interop=h.Interop.connectSync(s.providerId),s?.currentContextGroup&&h.me.interop.joinContextGroup(s.currentContextGroup).catch((e=>{console.warn(`Error joining specified context group: ${s?.currentContextGroup}, continuing`,e)}))),{...h,me:{...h.me,identity:{uuid:h.me.uuid,name:h.me.name}}}}catch(e){throw new Error(`An error occured during web-interop connection: ${e.message}`)}},exports.decorators=Nn,exports.encodeOptions=o,exports.layout_constants=ai,exports.lazy=G;\n","\"use strict\";var t=require(\"./main-8cad4070.js\"),e=require(\"uuid\");require(\"buffer/\"),require(\"events\"),require(\"lodash/cloneDeep\"),require(\"lodash/isEqual\");var i={},n={};Object.defineProperty(n,\"__esModule\",{value:!0}),n.mapValuesAsync=n.mapEntriesAsync=void 0;const o=(t,[e,i])=>({...t,[e]:i});async function s(t,e){return(await Promise.all(e.map((async([e,i])=>[e,await t(i,e)])))).reduce(o,{})}n.mapEntriesAsync=s,n.mapValuesAsync=async function(t,e){let i;return i=e instanceof Map?[...e.entries()]:Object.entries(e),s(t,i)};var r,a,l,h,d=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldSet||function(t,e,i,n,o){if(\"m\"===n)throw new TypeError(\"Private method is not writable\");if(\"a\"===n&&!o)throw new TypeError(\"Private accessor was defined without a setter\");if(\"function\"==typeof e?t!==e||!o:!e.has(t))throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");return\"a\"===n?o.call(t,i):o?o.value=i:e.set(t,i),i},c=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldGet||function(t,e,i,n){if(\"a\"===i&&!n)throw new TypeError(\"Private accessor was defined without a getter\");if(\"function\"==typeof e?t!==e||!n:!e.has(t))throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");return\"m\"===i?n:\"a\"===i?n.call(t):n?n.value:e.get(t)};Object.defineProperty(i,\"__esModule\",{value:!0});var m=i.DefaultLayoutManager=void 0;const u=n;class p{constructor(t){a.set(this,void 0),l.set(this,new Map),d(this,a,t,\"f\")}size(){return c(this,l,\"f\").size}async applyLayoutSnapshot({layouts:t}){if(Object.keys(t).length>1)throw new Error(\"[LayoutManager] Tried to call applyLayoutSnapshot with more than 1 layout. When implementing multiple layouts via overridden LayoutManager class, you must override and fully implement the applyLayoutSnapshot method without calling super.applyLayoutSnapshot().\");const[[e,i]]=Object.entries(t);await p.createLayout(this,{layoutName:e,layout:i})}async showLayout({layoutName:t}){}async getLayoutSnapshot(){return{layouts:await(0,u.mapValuesAsync)((t=>t.getFrameSnapshot()),c(this,l,\"f\"))}}async removeLayout({layoutName:t}){}getLayoutIdentityForView(t){const e=[...c(this,l,\"f\").values()].find((e=>e.getCurrentViews().some((e=>e.name===t.name&&e.uuid===t.uuid))));return e?.identity??void 0}isLayoutVisible({layoutName:t}){return c(p,r,\"m\",h).call(p,this,t).isVisible()}resolveLayoutIdentity(t){if(t&&\"layoutName\"in t)return t;const e=[...c(this,l,\"f\").values()];if(1===e.length)return e[0].identity;const i=e.find((t=>t.isVisible()));return i?.identity??void 0}static async resolveLayout(t,e){const i=t.resolveLayoutIdentity(e);if(void 0===i||!(\"layoutName\"in i))throw new Error(\"[layout-manager] resolveLayout: Could not resolve the layout identity. Make sure you include 'layoutName' in the identity object.\");return c(p,r,\"m\",h).call(p,t,i.layoutName)}static async handleSharedView(t,e,i){await(0,u.mapValuesAsync)((async t=>{if(t.identity.layoutName!==e.layoutName){const e=t.getCurrentViews().find((t=>t.name===i.name));e&&await t.onViewDetached({viewIdentity:e,target:null}).catch(console.error)}}),c(t,l,\"f\"))}static async handleLastViewRemoved(t,e){await t.removeLayout(e),await c(t,a,\"f\").handleLastViewRemoved(t)}static async destroyLayout(t,{layoutName:e}){await c(p,r,\"m\",h).call(p,t,e).destroy(),c(t,l,\"f\").delete(e)}static async createLayout(t,e){const{layoutName:i}=e;if(c(t,l,\"f\").has(i))throw new Error(`Layout name ${i} already exists`);await c(t,a,\"f\").createLayout(e,t)}static registerLayout(t,e,i){c(t,l,\"f\").set(e,i)}static getAllLayouts(t){return[...c(t,l,\"f\").values()]}static setInitialSnapshot(t,e){c(t,a,\"f\").setInitialSnapshot(e)}static createClosedConstructor(...t){return class extends p{constructor(){super(...t)}}}}m=i.DefaultLayoutManager=p,r=p,a=new WeakMap,l=new WeakMap,h=function(t,e){const i=c(t,l,\"f\").get(e);if(!i)throw new Error(`[layout-manager] getLayoutByName: Could not locate layout with name '${e}'`);return i};var g={},f={},v={};Object.defineProperty(v,\"__esModule\",{value:!0}),v.ReversibleMap=void 0;v.ReversibleMap=class{constructor(){this.valueToKey=new Map,this.keyToValue=new Map,this.setUnique=(t,e)=>{if(this.hasKey(t)||this.hasValue(e))throw new Error(\"Key or value already in the map.\");this.keyToValue.set(t,e),this.valueToKey.set(e,t)},this.getKey=t=>{const e=this.valueToKey.get(t);if(!e)throw new Error(\"Value not found in the map.\");return e},this.deleteKey=t=>{const e=this.getValue(t);return this.keyToValue.delete(t),this.valueToKey.delete(e),e},this.deleteValue=t=>{const e=this.getKey(t);return this.keyToValue.delete(e),this.valueToKey.delete(t),e},this.hasKey=t=>this.keyToValue.has(t),this.hasValue=t=>this.valueToKey.has(t)}getValue(t){const e=this.keyToValue.get(t);if(!e)throw new Error(\"Key not found in the map.\");return e}},Object.defineProperty(f,\"__esModule\",{value:!0});var _=f.LayoutContentCache=void 0;const y=t.lazy,C=v;class w{constructor(){this.contentItemCache=new C.ReversibleMap,this.contentItemCacheId=0,this.createCacheKey=()=>{const t=`entity-${this.contentItemCacheId.toString()}`;return this.contentItemCacheId+=1,t},this.hasKey=t=>this.contentItemCache.hasKey(t),this.getItemOrUndefined=t=>{try{return this.getContentItemOrThrow(t)}catch(t){return}},this.getContentItemOrThrow=(t,e)=>{if(!this.contentItemCache.hasKey(t))throw new Error(\"Layout component has been destroyed or detached from the current layout.\");const i=this.contentItemCache.getValue(t);if(e&&!e.includes(i.type))throw new Error(`Layout item is not the expected type. Expected ${e.join(\", \")}, got ${i.type}.`);return i},this.getOrCreateEntityId=t=>{if(this.contentItemCache.hasValue(t))return this.contentItemCache.getKey(t);t.onDestroyed((()=>{this.contentItemCache.deleteValue(t)}));const e=this.createCacheKey();return this.contentItemCache.setUnique(e,t),e}}static getSingleInstance(){return w.singleton.getValue()}}_=f.LayoutContentCache=w,w.singleton=new y.Lazy((()=>new w));var I={},b={};!function(t){Object.defineProperty(t,\"__esModule\",{value:!0}),t.getAdjacentStacks=t.doShareEdge=t.getAdjacentItem=void 0;t.getAdjacentItem=(e,i)=>{const{parent:n}=e;if(e.isRoot()||!n)return;const o=[\"top\",\"bottom\"].includes(i)?\"column\":\"row\",s=[\"top\",\"left\"].includes(i)?-1:1;if(n.type===o){const t=n.contentItems.indexOf(e)+s;if(t>=0&&t{const n=t.getBounds(),o=e.getBounds();if(!n||!o)return!1;if([\"top\",\"bottom\"].includes(i)){return!(n.righto.right)}return!(n.bottomo.bottom)};t.getAdjacentStacks=(e,i)=>{const n=[\"top\",\"bottom\"].includes(i)?\"row\":\"column\",o=s=>\"stack\"===s.type?(0,t.doShareEdge)(e,s,i)?[s]:[]:\"root\"===s.type||\"ground\"===s.type?[]:s.type===n?s.contentItems.map((t=>o(t))).flat():s.type!==n?[\"top\",\"right\"].includes(i)?o(s.contentItems[s.contentItems.length-1]):o(s.contentItems[0]):[],s=(0,t.getAdjacentItem)(e,i);return s?o(s):[]}}(b);var S=t.commonjsGlobal&&t.commonjsGlobal.__decorate||function(t,e,i,n){var o,s=arguments.length,r=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if(\"object\"==typeof Reflect&&\"function\"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(s<3?o(r):s>3?o(e,i,r):o(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};Object.defineProperty(I,\"__esModule\",{value:!0}),I.LayoutEntitiesController=void 0;const E=t.decorators,x=b,L=i;class z{constructor(t,e,i){this.wire=t,this.layoutManager=e,this.layoutContentCache=i,this.analytics=t=>{this.wire.sendAction(`layout-controller-${t}`).catch((()=>{}))},this.getLayoutIdentityForViewOrThrow=async t=>{const e=this.layoutManager.getLayoutIdentityForView(t);if(!e)throw new Error(`View identity ${t.name} is not attached to any layouts.`);return e},this.getRoot=async t=>{this.analytics(\"get-root\");const e=(await this.getLayout(t)).getRoot();return{type:e.type,entityId:this.layoutContentCache.getOrCreateEntityId(e)}},this.getStackByView=async t=>{this.analytics(\"get-stack-by-view\");const e=await this.getLayoutIdentityForViewOrThrow(t),i=(await this.getLayout(e)).getStackByView(t);if(\"stack\"===i?.type)return{entityId:this.layoutContentCache.getOrCreateEntityId(i),type:\"stack\"}},this.getStackViews=t=>{this.analytics(\"get-stack-views\");return this.layoutContentCache.getContentItemOrThrow(t,[\"stack\"]).contentItems.map((t=>({name:t.viewName,uuid:this.wire.me.uuid})))},this.isRoot=t=>{this.analytics(\"is-root\");return this.layoutContentCache.getContentItemOrThrow(t).isRoot()},this.exists=t=>(this.analytics(\"exists\"),this.layoutContentCache.hasKey(t)),this.addViewToStack=async(t,e,{index:i}={index:0})=>{this.analytics(\"add-view-to-stack\");const n=this.layoutContentCache.getContentItemOrThrow(t);if(i&&i>n.contentItems.length+1)throw new Error(`Index '${i}' out of range, please exclude the index or specify a number between 0 and ${n.contentItems.length}`);const o={id:t,index:i},{identity:s}=await n.layout.platformCreateView(e,{location:o});return s},this.findViewInStack=(t,e)=>t.contentItems.find((t=>t.viewName===e.name)),this.removeViewFromStack=async(t,e)=>{this.analytics(\"remove-view-from-stack\");const i=this.layoutContentCache.getContentItemOrThrow(t,[\"stack\"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to remove a view ('${e.name}') which does not belong to the stack.`);await n.layout.platformCloseView(e)},this.createAdjacentStack=async(t,e,{position:i=\"right\"}={})=>{if(this.analytics(\"create-adjacent-stack\"),!Array.isArray(e)||0===e.length)throw new Error('The parameter \"views\" must be an array with at least 1 element.');if(![\"top\",\"bottom\",\"left\",\"right\"].includes(i))throw new Error(`Invalid position '${i}' specified.`);const n=this.layoutContentCache.getContentItemOrThrow(t).createAdjacentStack({position:i}),o=this.layoutContentCache.getOrCreateEntityId(n);return await Promise.all(e.reverse().map((t=>this.addViewToStack(o,t)))),o},this.getAdjacentStacks=async({targetId:t,edge:e})=>{this.analytics(\"get-adjacent-stacks\");const i=this.layoutContentCache.getContentItemOrThrow(t);return(0,x.getAdjacentStacks)(i,e).map((t=>({entityId:this.layoutContentCache.getOrCreateEntityId(t)})))},this.setStackActiveView=async(t,e)=>{this.analytics(\"set-stack-active-view\");const i=this.layoutContentCache.getContentItemOrThrow(t,[\"stack\"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to set a view ('${e.name}') as active when it does not belong to the stack.`);i.setActiveContentItem(n,!0)}}async getLayout(t){const e=await L.DefaultLayoutManager.resolveLayout(this.layoutManager,t);if(!e)throw new Error(`Could not resolve target layout identity ${JSON.stringify(t)}`);return e}getContent(t){this.analytics(\"get-content\");return this.layoutContentCache.getContentItemOrThrow(t,[\"column\",\"row\"]).contentItems.map((t=>({type:t.type,entityId:this.layoutContentCache.getOrCreateEntityId(t)})))}getParent(t){this.analytics(\"get-parent\");const e=this.layoutContentCache.getContentItemOrThrow(t);if(!e.isRoot())return e.parent?.contentItems.includes(e)?{type:e.parent.type,entityId:this.layoutContentCache.getOrCreateEntityId(e.parent)}:void 0}}S([(0,E.expose)()],z.prototype,\"getLayoutIdentityForViewOrThrow\",void 0),S([(0,E.expose)()],z.prototype,\"getRoot\",void 0),S([(0,E.expose)()],z.prototype,\"getStackByView\",void 0),S([(0,E.expose)()],z.prototype,\"getStackViews\",void 0),S([(0,E.expose)()],z.prototype,\"getContent\",null),S([(0,E.expose)()],z.prototype,\"getParent\",null),S([(0,E.expose)()],z.prototype,\"isRoot\",void 0),S([(0,E.expose)()],z.prototype,\"exists\",void 0),S([(0,E.expose)()],z.prototype,\"addViewToStack\",void 0),S([(0,E.expose)()],z.prototype,\"removeViewFromStack\",void 0),S([(0,E.expose)()],z.prototype,\"createAdjacentStack\",void 0),S([(0,E.expose)()],z.prototype,\"getAdjacentStacks\",void 0),S([(0,E.expose)()],z.prototype,\"setStackActiveView\",void 0),I.LayoutEntitiesController=z,Object.defineProperty(g,\"__esModule\",{value:!0});var M=g.initLayoutEndpoints=void 0;const P=t.apiExposer,T=t.layout_constants,A=f,k=I,D=i;M=g.initLayoutEndpoints=async function(t,e){const i=t.getFin(),n=await i.Platform.getCurrentSync().getClient(),o=new P.ChannelsExposer(n);await new P.ApiExposer(o).exposeInstance(new k.LayoutEntitiesController(t,e,A.LayoutContentCache.getSingleInstance()),{id:T.LAYOUT_CONTROLLER_ID}),await async function(t,e){const i=t=>async i=>{const n=await D.DefaultLayoutManager.resolveLayout(e,i.target);if(!n)throw new Error(`Could not resolve the layout target from payload ${JSON.stringify(i)}`);return t(n,i)},n=(e,n)=>{t.register(e,i(n))},o=(t,e)=>{n(t,e)};n(\"replace-view\",((t,e)=>t.replaceView(e))),n(\"replace-layout\",((t,{layout:e})=>t.replaceLayout(e))),n(\"add-view\",((t,e)=>t.insertView(e))),o(\"layout-add-view\",((t,{viewOptions:e,location:i,targetView:n})=>t.platformCreateView(e,{location:i,targetView:n}))),n(\"close-view\",((t,e)=>t.cleanupView(e.viewIdentity))),o(\"layout-close-view\",((t,e)=>t.platformCloseView(e.viewIdentity))),n(\"apply-preset-layout\",((t,e)=>t.applyPreset(e))),n(\"get-layout-views\",(t=>t.getCurrentViews())),n(\"get-frame-snapshot\",(t=>t.getFrameSnapshot())),n(\"is-visible\",(t=>t.isVisible())),n(\"destroy\",(t=>t.destroy())),t.register(\"get-layout-snapshot\",(()=>e.getLayoutSnapshot()))}(n,e)};var R={};Object.defineProperty(R,\"__esModule\",{value:!0});var U=R.BaseLayout=void 0;U=R.BaseLayout=class{};var O={};Object.defineProperty(O,\"__esModule\",{value:!0});var V=O.DOMEmitter=void 0;V=O.DOMEmitter=class{constructor(t){this.container=t}dispatchLocalEvent(t,e){const i={...e,type:t,tabSelector:`tab-${e.name}`,containerSelector:`container-${e.name}`,topic:\"openfin-DOM-event\"};this.container.dispatchEvent(new CustomEvent(t,{detail:i}))}};var B={};Object.defineProperty(B,\"__esModule\",{value:!0});var H=B.mapLayoutContentItemsImmutableSync=B.mapLayoutContentItemsImmutable=W=B.isVisible=void 0;var W=B.isVisible=t=>(0!==t.offsetWidth||0!==t.offsetHeight)&&\"hidden\"!==window.getComputedStyle(t).visibility&&t.offsetTop>=0&&t.offsetLeft>=0&&t.offsetTop<=window.innerHeight&&t.offsetLeft<=window.innerWidth;const F=t=>\"type\"in t&&\"component\"===t.type;B.mapLayoutContentItemsImmutable=async function t(e,i){return F(i)?e(i):{...i,content:await Promise.all(i.content?.map((i=>t(e,i))))}},H=B.mapLayoutContentItemsImmutableSync=function t(e,i){return F(i)?e(i):{...i,content:i.content?.map((i=>t(e,i)))}};class N extends Error{constructor(t,e){super(e),this.type=t}}class G extends N{constructor(t,e){super(\"Configuration\",t),this.node=e}}class j extends N{constructor(t){super(\"PopoutBlocked\",t)}}class $ extends N{constructor(t){super(\"API\",t)}}class Z extends N{constructor(t){super(\"Bind\",t)}}class q extends Error{constructor(t,e,i){super(`${t}: ${e}${void 0===i?\"\":\": \"+i}`)}}class X extends q{constructor(t,e){super(\"Assert\",t,e)}}class Y extends q{constructor(t,e,i){super(\"UnreachableCase\",t,`${e}${void 0===i?\"\":\": \"+i}`)}}class K extends q{constructor(t,e){super(\"UnexpectedNull\",t,e)}}class J extends q{constructor(t,e){super(\"UnexpectedUndefined\",t,e)}}var Q;!function(t){let e=!1;const i={PopoutCannotBeCreatedWithGroundItemConfig:{id:0,default:\"Popout cannot be created with ground ItemConfig\"},PleaseRegisterAConstructorFunction:{id:1,default:\"Please register a constructor function\"},ComponentTypeNotRegisteredAndBindComponentEventHandlerNotAssigned:{id:2,default:\"Component type not registered and BindComponentEvent handler not assigned\"},ComponentIsAlreadyRegistered:{id:3,default:\"Component is already registered\"},ComponentIsNotVirtuable:{id:4,default:\"Component is not virtuable. Requires rootHtmlElement field/getter\"},VirtualComponentDoesNotHaveRootHtmlElement:{id:5,default:'Virtual component does not have getter \"rootHtmlElement\"'},ItemConfigIsNotTypeComponent:{id:6,default:\"ItemConfig is not of type component\"},InvalidNumberPartInSizeString:{id:7,default:\"Invalid number part in size string\"},UnknownUnitInSizeString:{id:8,default:\"Unknown unit in size string\"},UnsupportedUnitInSizeString:{id:9,default:\"Unsupported unit in size string\"}};t.idCount=Object.keys(i).length;const n=Object.values(i);t.checkInitialise=function(){if(!e)for(let e=0;e=\"0\"&&t<=\"9\"}function Tt(t,e){const i=zt(e);t.style.width=i}function At(t,e){const i=zt(e);t.style.height=i}function kt(t){return{width:t.offsetWidth,height:t.offsetHeight}}function Dt(t,e){t.style.display=e?\"\":\"none\"}function Rt(t,e){if(void 0!==e)for(const i in e)if(e.hasOwnProperty(i)){const n=e[i],o=t[i];t[i]=Ut(o,n)}return t}function Ut(t,e){if(\"object\"!=typeof e)return e;if(Array.isArray(e)){const t=e.length,i=new Array(t);for(let n=0;n36)throw new Error(\"Too many keys in config minifier map\")},t.translateObject=n}(dt||(dt={})),function(t){t.defaults={type:at.ground,content:[],size:1,sizeUnit:ht.Fractional,minSize:void 0,minSizeUnit:ht.Pixel,id:\"\",isClosable:!0},t.createCopy=function(t,e){switch(t.type){case at.ground:case at.row:case at.column:return gt.createCopy(t,e);case at.stack:return ut.createCopy(t,e);case at.component:return pt.createCopy(t);default:throw new Y(\"CICC91354\",t.type,\"Invalid Config Item type specified\")}},t.createDefault=function(t){switch(t){case at.ground:throw new X(\"CICCDR91562\");case at.row:case at.column:return gt.createDefault(t);case at.stack:return ut.createDefault();case at.component:return pt.createDefault();default:throw new Y(\"CICCDD91563\",t,\"Invalid Config Item type specified\")}},t.isComponentItem=function(t){return t.type===at.component},t.isStackItem=function(t){return t.type===at.stack},t.isGroundItem=function(t){return t.type===at.ground}}(ct||(ct={})),function(t){t.defaultMaximised=!1,function(t){t.createCopy=function(t,e){return void 0===t?void 0:{show:null!=e?e:t.show,popout:t.popout,close:t.close,maximise:t.maximise,minimise:t.minimise,tabDropdown:t.tabDropdown}}}(t.Header||(t.Header={}))}(mt||(mt={})),function(t){function e(t){const e=t.length,i=new Array(e);for(let n=0;n\"__glMaximised\"===t));t>0&&(o=!0,n=n.splice(t,1)),e=n.length>0?n[0]:ct.defaults.id}else e=n;return i=void 0!==t.maximised?t.maximised:o,{id:e,maximised:i}}}(wt||(wt={})),function(t){function e(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0;return{resolved:!0,root:Et.resolve(i),openPopouts:t.resolveOpenPopouts(e.openPopouts),dimensions:t.Dimensions.resolve(e.dimensions),settings:t.Settings.resolve(e.settings),header:t.Header.resolve(e.header,e.settings,e.labels)}}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:Lt.fromResolvedArray(e.openPopouts),settings:_t.Settings.createCopy(e.settings),dimensions:t.Dimensions.fromResolved(e.dimensions),header:_t.Header.createCopy(e.header)}},t.isResolved=function(t){const e=t;return void 0!==e.resolved&&!0===e.resolved},t.resolveOpenPopouts=function(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0,{root:Et.resolve(o),openPopouts:xt.resolveOpenPopouts(e.openPopouts),dimensions:xt.Dimensions.resolve(e.dimensions),settings:xt.Settings.resolve(e.settings),header:xt.Header.resolve(e.header,e.settings,e.labels),parentId:null!==(i=e.parentId)&&void 0!==i?i:null,indexInParent:null!==(n=e.indexInParent)&&void 0!==n?n:null,window:t.Window.resolve(e.window,e.dimensions),resolved:!0}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:i(e.openPopouts),dimensions:xt.Dimensions.fromResolved(e.dimensions),settings:_t.Settings.createCopy(e.settings),header:_t.Header.createCopy(e.header),parentId:e.parentId,indexInParent:e.indexInParent,window:t.Window.fromResolved(e.window)}},t.fromResolvedArray=i}(Lt||(Lt={}));class Wt{constructor(){this._allEventSubscriptions=[],this._subscriptionsMap=new Map,this.unbind=this.removeEventListener,this.trigger=this.emit}tryBubbleEvent(t,e){}emit(t,...e){let i=this._subscriptionsMap.get(t);if(void 0!==i){i=i.slice();for(let t=0;t0){const n=e.slice();n.unshift(t);const o=this._allEventSubscriptions.slice();for(let t=0;t0?n.contentItems[0]:n,e=0);const o=this._layoutManager.createAndInitContentItem(i,t);t.addChild(o,e),this._layoutManager.layoutConfig.settings.popInOnClose?this._onClose():this.close()}createWindow(){const t=this.createUrl(),e=Math.floor(1e6*Math.random()).toString(36),i=this.serializeWindowFeatures({width:this._initialWindowSize.width,height:this._initialWindowSize.height,innerWidth:this._initialWindowSize.width,innerHeight:this._initialWindowSize.height,menubar:\"no\",toolbar:\"no\",location:\"no\",personalbar:\"no\",resizable:\"yes\",scrollbars:\"no\",status:\"no\"});if(this._popoutWindow=globalThis.open(t,e,i),this._popoutWindow)this._popoutWindow.addEventListener(\"load\",(()=>this.positionWindow()),{passive:!0}),this._popoutWindow.addEventListener(\"beforeunload\",(()=>{this._layoutManager.layoutConfig.settings.popInOnClose?this.popIn():this._onClose()}),{passive:!0}),this._checkReadyInterval=setInterval((()=>this.checkReady()),10);else if(!0===this._layoutManager.layoutConfig.settings.blockedPopoutsThrowError){throw new j(\"Popout blocked\")}}checkReady(){if(null===this._popoutWindow)throw new K(\"BPCR01844\");this._popoutWindow.__glInstance&&this._popoutWindow.__glInstance.isInitialised&&(this.onInitialised(),void 0!==this._checkReadyInterval&&(clearInterval(this._checkReadyInterval),this._checkReadyInterval=void 0))}serializeWindowFeatures(t){const e=[];for(const i in t)e.push(i+\"=\"+t[i].toString());return e.join(\",\")}createUrl(){const t=\"gl-window-config-\"+Ot(),e=_t.minifyConfig(this._config);try{localStorage.setItem(t,JSON.stringify(e))}catch(t){throw new Error(\"Error while writing to localStorage \"+function(t){return t instanceof Error?t.message:\"string\"==typeof t?t:\"Unknown Error\"}(t))}const i=new URL(location.href);return i.searchParams.set(\"gl-window\",t),i.toString()}positionWindow(){if(null===this._popoutWindow)throw new Error(\"BrowserPopout.positionWindow: null popoutWindow\");this._popoutWindow.moveTo(this._initialWindowSize.left,this._initialWindowSize.top),this._popoutWindow.focus()}onInitialised(){this._isInitialised=!0,this.getGlInstance().on(\"popIn\",(()=>this.popIn())),this.emit(\"initialised\")}_onClose(){setTimeout((()=>this.emit(\"closed\")),50)}}class Gt extends Wt{constructor(t,e,i,n){super(),this.layoutManager=t,this._parent=i,this._element=n,this._popInParentIds=[],this._type=e.type,this._id=e.id,this._isInitialised=!1,this.isGround=!1,this.isRow=!1,this.isColumn=!1,this.isStack=!1,this.isComponent=!1,this.size=e.size,this.sizeUnit=e.sizeUnit,this.minSize=e.minSize,this.minSizeUnit=e.minSizeUnit,this._isClosable=e.isClosable,this._pendingEventPropagations={},this._throttledEvents=[\"stateChanged\"],this._contentItems=this.createContentItems(e.content)}get type(){return this._type}get id(){return this._id}set id(t){this._id=t}get popInParentIds(){return this._popInParentIds}get parent(){return this._parent}get contentItems(){return this._contentItems}get isClosable(){return this._isClosable}get element(){return this._element}get isInitialised(){return this._isInitialised}static isStack(t){return t.isStack}static isComponentItem(t){return t.isComponent}static isComponentParentableItem(t){return t.isStack||t.isGround}removeChild(t,e=!1){const i=this._contentItems.indexOf(t);if(-1===i)throw new Error(\"Can't remove child item. Unknown content item\");if(e||this._contentItems[i].destroy(),this._contentItems.splice(i,1),this._contentItems.length>0)this.updateSize(!1);else if(!this.isGround&&!0===this._isClosable){if(null===this._parent)throw new K(\"CIUC00874\");this._parent.removeChild(this)}}addChild(t,e,i){return null!=e||(e=this._contentItems.length),this._contentItems.splice(e,0,t),t.setParent(this),!0===this._isInitialised&&!1===t._isInitialised&&t.init(),e}replaceChild(t,e,i=!1){const n=this._contentItems.indexOf(t),o=t._element.parentNode;if(-1===n)throw new X(\"CIRCI23232\",\"Can't replace child. oldChild is not child of this\");if(null===o)throw new K(\"CIRCP23232\");if(o.replaceChild(e._element,t._element),!0===i&&(t._parent=null,t.destroy()),this._contentItems[n]=e,e.setParent(this),e.size=t.size,e.sizeUnit=t.sizeUnit,e.minSize=t.minSize,e.minSizeUnit=t.minSizeUnit,null===e._parent)throw new K(\"CIRCNC45699\");!0===e._parent._isInitialised&&!1===e._isInitialised&&e.init(),this.updateSize(!1)}remove(){if(null===this._parent)throw new K(\"CIR11110\");this._parent.removeChild(this)}popout(){const t=Ot(),e=this.layoutManager.createPopoutFromContentItem(this,void 0,t,void 0);return this.emitBaseBubblingEvent(\"stateChanged\"),e}calculateConfigContent(){const t=this._contentItems,e=t.length,i=new Array(e);for(let n=0;nthis.propagateEventToLayoutManager(t,e))))}propagateEventToLayoutManager(t,e){this._pendingEventPropagations[t]=!1,this.layoutManager.emitUnknown(t,e)}}class jt extends Gt{constructor(t,e,i){super(t,e,i,document.createElement(\"div\")),this._parentItem=i,this._focused=!1,this.isComponent=!0,this._reorderEnabled=e.reorderEnabled,this.applyUpdatableConfig(e),this._initialWantMaximise=e.maximised;const n=document.createElement(\"div\");n.classList.add(\"lm_content\"),this.element.appendChild(n),this._container=new Ft(e,this,t,n,(t=>this.handleUpdateItemConfigEvent(t)),(()=>this.show()),(()=>this.hide()),(t=>this.focus(t)),(t=>this.blur(t)))}get componentName(){return this._container.componentType}get componentType(){return this._container.componentType}get reorderEnabled(){return this._reorderEnabled}get initialWantMaximise(){return this._initialWantMaximise}get component(){return this._container.component}get container(){return this._container}get parentItem(){return this._parentItem}get headerConfig(){return this._headerConfig}get title(){return this._title}get tab(){return this._tab}get focused(){return this._focused}destroy(){this._container.destroy(),super.destroy()}applyUpdatableConfig(t){this.setTitle(t.title),this._headerConfig=t.header}toConfig(){const t=this._container.stateRequestEvent,e=void 0===t?this._container.state:t();return{type:at.component,content:[],size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,maximised:!1,isClosable:this.isClosable,reorderEnabled:this._reorderEnabled,title:this._title,header:mt.Header.createCopy(this._headerConfig),componentType:pt.copyComponentType(this.componentType),componentState:e}}close(){if(null===this.parent)throw new K(\"CIC68883\");this.parent.removeChild(this,!1)}enterDragMode(t,e){Tt(this.element,t),At(this.element,e),this._container.enterDragMode(t,e)}exitDragMode(){this._container.exitDragMode()}enterStackMaximised(){this._container.enterStackMaximised()}exitStackMaximised(){this._container.exitStackMaximised()}drag(){this._container.drag()}updateSize(t){this.updateNodeSize(t)}init(){this.updateNodeSize(!1),super.init(),this._container.emit(\"open\"),this.initContentItems()}setTitle(t){this._title=t,this.emit(\"titleChanged\",t),this.emit(\"stateChanged\")}setTab(t){this._tab=t,this.emit(\"tab\",t),this._container.setTab(t)}hide(){super.hide(),this._container.setVisibility(!1)}show(){super.show(),this._container.setVisibility(!0)}focus(t=!1){this.parentItem.setActiveComponentItem(this,!0,t)}setFocused(t){this._focused=!0,this.tab.setFocused(),t||this.emitBaseBubblingEvent(\"focus\")}blur(t=!1){this._focused&&this.layoutManager.setFocusedComponentItem(void 0,t)}setBlurred(t){this._focused=!1,this.tab.setBlurred(),t||this.emitBaseBubblingEvent(\"blur\")}setParent(t){this._parentItem=t,super.setParent(t)}handleUpdateItemConfigEvent(t){this.applyUpdatableConfig(t)}updateNodeSize(t){if(\"none\"!==this.element.style.display){const{width:e,height:i}=kt(this.element);this._container.setSizeToNodeSize(e,i,t)}}}class $t extends Gt{constructor(){super(...arguments),this._focused=!1}get focused(){return this._focused}setFocusedValue(t){this._focused=t}}class Zt extends Wt{constructor(t,e){super(),this._eElement=t,this._pointerTracking=!1,this._pointerDownEventListener=t=>this.onPointerDown(t),this._pointerMoveEventListener=t=>this.onPointerMove(t),this._pointerUpEventListener=t=>this.onPointerUp(t),this._timeout=void 0,this._allowableTargets=[t,...e],this._oDocument=document,this._eBody=document.body,this._nDelay=1800,this._nDistance=10,this._nX=0,this._nY=0,this._nOriginalX=0,this._nOriginalY=0,this._dragging=!1,this._eElement.addEventListener(\"pointerdown\",this._pointerDownEventListener,{passive:!0})}destroy(){this.checkRemovePointerTrackingEventListeners(),this._eElement.removeEventListener(\"pointerdown\",this._pointerDownEventListener)}cancelDrag(){this.processDragStop(void 0)}onPointerDown(t){if(this._allowableTargets.includes(t.target)&&t.isPrimary){const e=this.getPointerCoordinates(t);this.processPointerDown(e)}}processPointerDown(t){this._nOriginalX=t.x,this._nOriginalY=t.y,this._oDocument.addEventListener(\"pointermove\",this._pointerMoveEventListener),this._oDocument.addEventListener(\"pointerup\",this._pointerUpEventListener,{passive:!0}),this._pointerTracking=!0,this._timeout=setTimeout((()=>{try{this.startDrag()}catch(t){throw console.error(t),t}}),this._nDelay)}onPointerMove(t){this._pointerTracking&&(this.processDragMove(t),t.preventDefault())}processDragMove(t){this._nX=t.pageX-this._nOriginalX,this._nY=t.pageY-this._nOriginalY,!1===this._dragging&&(Math.abs(this._nX)>this._nDistance||Math.abs(this._nY)>this._nDistance)&&this.startDrag(),this._dragging&&this.emit(\"drag\",this._nX,this._nY,t)}onPointerUp(t){this.processDragStop(t)}processDragStop(t){var e;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this.checkRemovePointerTrackingEventListeners(),!0===this._dragging&&(this._eBody.classList.remove(\"lm_dragging\"),this._eElement.classList.remove(\"lm_dragging\"),null===(e=this._oDocument.querySelector(\"iframe\"))||void 0===e||e.style.setProperty(\"pointer-events\",\"\"),this._dragging=!1,this.emit(\"dragStop\",t))}checkRemovePointerTrackingEventListeners(){this._pointerTracking&&(this._oDocument.removeEventListener(\"pointermove\",this._pointerMoveEventListener),this._oDocument.removeEventListener(\"pointerup\",this._pointerUpEventListener),this._pointerTracking=!1)}startDrag(){var t;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this._dragging=!0,this._eBody.classList.add(\"lm_dragging\"),this._eElement.classList.add(\"lm_dragging\"),null===(t=this._oDocument.querySelector(\"iframe\"))||void 0===t||t.style.setProperty(\"pointer-events\",\"none\"),this.emit(\"dragStart\",this._nOriginalX,this._nOriginalY)}getPointerCoordinates(t){return{x:t.pageX,y:t.pageY}}}class qt{constructor(t,e,i){this._isVertical=t,this._size=e,this._grabSize=i0){const i=this.createSplitter(Math.max(0,e-1)).element;e>0?(this.contentItems[e-1].element.insertAdjacentElement(\"afterend\",i),i.insertAdjacentElement(\"afterend\",t.element)):(this.contentItems[0].element.insertAdjacentElement(\"beforebegin\",i),i.insertAdjacentElement(\"beforebegin\",t.element))}else this._childElementContainer.appendChild(t.element);super.addChild(t,e);const n=1/this.contentItems.length*100;if(!0===i)return this.emitBaseBubblingEvent(\"stateChanged\"),e;for(let e=0;e0&&(this.calculateRelativeSizes(),this.setAbsoluteSizes()),this.emitBaseBubblingEvent(\"stateChanged\"),this.emit(\"resize\")}setAbsoluteSizes(){const t=this.calculateAbsoluteSizes();for(let e=0;e0&&t.itemSizes[e]++,this._isColumn?(Tt(this.contentItems[e].element,t.crossAxisSize),At(this.contentItems[e].element,t.itemSizes[e])):(Tt(this.contentItems[e].element,t.itemSizes[e]),At(this.contentItems[e].element,t.crossAxisSize))}calculateAbsoluteSizes(){const t=(this.contentItems.length-1)*this._splitterSize,{width:e,height:i}=kt(this.element);let n,o;this._isColumn?(n=i-t,o=e):(n=e-t,o=i);let s=0;const r=[];for(let t=0;t0){const n=100-t;for(let t=0;t100&&e.length>0){for(let t=0;te)return;{const r=i/e;let a=i;for(let e=0;ethis.onSplitterDrag(e,t,i))),e.on(\"dragStop\",(()=>this.onSplitterDragStop(e))),e.on(\"dragStart\",(()=>this.onSplitterDragStart(e))),this._splitter.splice(t,0,e),e}getSplitItems(t){const e=this._splitter.indexOf(t);return{before:this.contentItems[e],after:this.contentItems[e+1]}}calculateContentItemMinSize(t){const e=t.minSize;if(void 0!==e){if(t.minSizeUnit===ht.Pixel)return e;throw new X(\"ROCGMD98831\",JSON.stringify(t))}{const t=this.layoutManager.layoutConfig.dimensions;return this._isColumn?t.defaultMinItemHeight:t.defaultMinItemWidth}}calculateContentItemsTotalMinSize(t){let e=0;for(const i of t)e+=this.calculateContentItemMinSize(i);return e}onSplitterDragStart(t){const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=this.calculateContentItemsTotalMinSize(e.before.contentItems),s=this.calculateContentItemsTotalMinSize(e.after.contentItems);this._splitterPosition=0,this._splitterMinPosition=-1*(i-o),this._splitterMaxPosition=n-s}onSplitterDrag(t,e,i){let n=this._isColumn?i:e;if(null===this._splitterMinPosition||null===this._splitterMaxPosition)throw new K(\"ROCOSD59226\");n=Math.max(n,this._splitterMinPosition),n=Math.min(n,this._splitterMaxPosition),this._splitterPosition=n;const o=zt(n);this._isColumn?t.element.style.top=o:t.element.style.left=o}onSplitterDragStop(t){if(null===this._splitterPosition)throw new K(\"ROCOSDS66932\");{const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=(this._splitterPosition+i)/(i+n),s=e.before.size+e.after.size;e.before.size=o*s,e.after.size=(1-o)*s,t.element.style.top=zt(0),t.element.style.left=zt(0),globalThis.requestAnimationFrame((()=>this.updateSize(!1)))}}}!function(t){t.getElementDimensionSize=function(t,e){return\"width\"===e?function(t){return t.offsetWidth}(t):function(t){return t.offsetHeight}(t)},t.setElementDimensionSize=function(t,e,i){return\"width\"===e?Tt(t,i):At(t,i)},t.createElement=function(t,e){const i=t.createElement(\"div\");return i.classList.add(\"lm_item\"),e?i.classList.add(\"lm_column\"):i.classList.add(\"lm_row\"),i}}(Xt||(Xt={}));class Yt extends $t{constructor(t,e,i){super(t,vt.create(e),null,Yt.createElement(document)),this.isGround=!0,this._childElementContainer=this.element,this._containerElement=i;let n=null;for(;;){const t=n?n.previousSibling:this._containerElement.lastChild;if(!(t instanceof Element&&t.classList.contains(\"lm_content\")))break;n=t}this._containerElement.insertBefore(this.element,n)}init(){if(!0!==this.isInitialised){this.updateNodeSize();for(let t=0;t0?this.contentItems[0]:this,n.isComponent)throw new Error(\"Cannot add item as child to ComponentItem\");{const t=this.layoutManager.createAndInitContentItem(i,n);return e=n.addChild(t,e),n===this?-1:e}}loadComponentAsRoot(t){this.clearRoot();const e=Ct.resolve(t,!1);if(e.maximised)throw new Error(\"Root Component cannot be maximised\");{const t=new jt(this.layoutManager,e,this);t.init(),this.addChild(t,0)}}addChild(t,e){if(this.contentItems.length>0)throw new Error(\"Ground node can only have a single child\");return this._childElementContainer.appendChild(t.element),e=super.addChild(t,e),this.updateSize(!1),this.emitBaseBubblingEvent(\"stateChanged\"),e}calculateConfigContent(){const t=this.contentItems,e=t.length,i=new Array(e);for(let n=0;n0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e)),this.updateContentItemsSize(!1))}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}createSideAreas(){const t=Yt.Area.oppositeSides,e=new Array(Object.keys(t).length);let i=0;for(const n in t){const o=n,s=this.getElementArea();if(null===s)throw new K(\"RCSA77553\");s.side=o,\"2\"===t[o][1]?s[o]=s[t[o]]-50:s[o]=s[t[o]]+50,s.surface=(s.x2-s.x1)*(s.y2-s.y1),e[i++]=s}return e}highlightDropZone(t,e,i){this.layoutManager.tabDropPlaceholder.remove(),super.highlightDropZone(t,e,i)}onDrop(t,e){if(t.isComponent){const e=ut.createDefault(),i=t;e.header=mt.Header.createCopy(i.headerConfig);const n=this.layoutManager.createAndInitContentItem(e,this);n.addChild(t),t=n}if(0===this.contentItems.length)this.addChild(t);else{if(t.type===at.row||t.type===at.column){const e=ut.createDefault(),i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}const i=\"x\"==e.side[0]?at.row:at.column,n=\"2\"==e.side[1],o=this.contentItems[0];if(o instanceof Xt&&o.type===i){const e=o.contentItems[n?0:o.contentItems.length-1];o.addChild(t,n?0:void 0,!0),e.size*=.5,t.size=e.size,t.sizeUnit=ht.Percent,o.updateSize(!1)}else{const e=ct.createDefault(i),s=this.layoutManager.createContentItem(e,this);this.replaceChild(o,s),s.addChild(t,n?0:void 0,!0),s.addChild(o,n?void 0:0,!0),o.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}}dock(){throw new X(\"GID87731\")}validateDocking(){throw new X(\"GIVD87732\")}getAllContentItems(){const t=[this];return this.deepGetAllContentItems(this.contentItems,t),t}getConfigMaximisedItems(){const t=[];return this.deepFilterContentItems(this.contentItems,t,(t=>!(!Gt.isStack(t)||!t.initialWantMaximise)||!(!Gt.isComponentItem(t)||!t.initialWantMaximise))),t}getItemsByPopInParentId(t){const e=[];return this.deepFilterContentItems(this.contentItems,e,(e=>e.popInParentIds.includes(t))),e}toConfig(){throw new Error(\"Cannot generate GroundItem config\")}setActiveComponentItem(t,e,i){}updateNodeSize(){const{width:t,height:e}=kt(this._containerElement);Tt(this.element,t),At(this.element,e),this.contentItems.length>0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e))}deepGetAllContentItems(t,e){for(let i=0;ithis.onClick(t),this._touchStartEventListener=t=>this.onTouchStart(t),this._element=document.createElement(\"div\"),this._element.classList.add(i),this._element.title=e,this._header.on(\"destroy\",(()=>this.destroy())),this._element.addEventListener(\"click\",this._clickEventListener,{passive:!0}),this._element.addEventListener(\"touchstart\",this._touchStartEventListener,{passive:!0}),this._header.controlsContainerElement.appendChild(this._element)}get element(){return this._element}destroy(){var t;this._element.removeEventListener(\"click\",this._clickEventListener),this._element.removeEventListener(\"touchstart\",this._touchStartEventListener),null===(t=this._element.parentNode)||void 0===t||t.removeChild(this._element)}onClick(t){this._pushEvent(t)}onTouchStart(t){this._pushEvent(t)}}class Jt{constructor(t,e,i,n,o){var s;this._layoutManager=t,this._componentItem=e,this._closeEvent=i,this._focusEvent=n,this._dragStartEvent=o,this._isActive=!1,this._tabClickListener=t=>this.onTabClickDown(t),this._tabTouchStartListener=t=>this.onTabTouchStart(t),this._closeClickListener=()=>this.onCloseClick(),this._closeTouchStartListener=()=>this.onCloseTouchStart(),this._dragStartListener=(t,e)=>this.onDragStart(t,e),this._contentItemDestroyListener=()=>this.onContentItemDestroy(),this._tabTitleChangedListener=t=>this.setTitle(t),this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_tab\"),this._titleElement=document.createElement(\"span\"),this._titleElement.classList.add(\"lm_title\"),this._closeElement=document.createElement(\"div\"),this._closeElement.classList.add(\"lm_close_tab\"),this._element.appendChild(this._titleElement),this._element.appendChild(this._closeElement),e.isClosable?this._closeElement.style.display=\"\":this._closeElement.style.display=\"none\",this.setTitle(e.title),this._componentItem.on(\"titleChanged\",this._tabTitleChangedListener);(null!==(s=e.reorderEnabled)&&void 0!==s?s:this._layoutManager.layoutConfig.settings.reorderEnabled)&&this.enableReorder(),this._element.addEventListener(\"click\",this._tabClickListener,{passive:!0}),this._element.addEventListener(\"touchstart\",this._tabTouchStartListener,{passive:!0}),this._componentItem.isClosable?(this._closeElement.addEventListener(\"click\",this._closeClickListener,{passive:!0}),this._closeElement.addEventListener(\"touchstart\",this._closeTouchStartListener,{passive:!0})):(this._closeElement.remove(),this._closeElement=void 0),this._componentItem.setTab(this),this._layoutManager.emit(\"tabCreated\",this)}get isActive(){return this._isActive}get componentItem(){return this._componentItem}get contentItem(){return this._componentItem}get element(){return this._element}get titleElement(){return this._titleElement}get closeElement(){return this._closeElement}get reorderEnabled(){return void 0!==this._dragListener}set reorderEnabled(t){t!==this.reorderEnabled&&(t?this.enableReorder():this.disableReorder())}setTitle(t){this._titleElement.innerText=t,this._element.title=t}setActive(t){t!==this._isActive&&(this._isActive=t,t?this._element.classList.add(\"lm_active\"):this._element.classList.remove(\"lm_active\"))}destroy(){var t,e;this._closeEvent=void 0,this._focusEvent=void 0,this._dragStartEvent=void 0,this._element.removeEventListener(\"click\",this._tabClickListener),this._element.removeEventListener(\"touchstart\",this._tabTouchStartListener),null===(t=this._closeElement)||void 0===t||t.removeEventListener(\"click\",this._closeClickListener),null===(e=this._closeElement)||void 0===e||e.removeEventListener(\"touchstart\",this._closeTouchStartListener),this._componentItem.off(\"titleChanged\",this._tabTitleChangedListener),this.reorderEnabled&&this.disableReorder(),this._element.remove()}setBlurred(){this._element.classList.remove(\"lm_focused\"),this._titleElement.classList.remove(\"lm_focused\")}setFocused(){this._element.classList.add(\"lm_focused\"),this._titleElement.classList.add(\"lm_focused\")}onDragStart(t,e){if(void 0===this._dragListener)throw new J(\"TODSDLU10093\");if(void 0===this._dragStartEvent)throw new J(\"TODS23309\");this._dragStartEvent(t,e,this._dragListener,this.componentItem)}onContentItemDestroy(){void 0!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=void 0)}onTabClickDown(t){const e=t.target;e!==this._element&&e!==this._titleElement||(0===t.button?this.notifyFocus():1===t.button&&this._componentItem.isClosable&&this.notifyClose())}onTabTouchStart(t){t.target===this._element&&this.notifyFocus()}onCloseClick(){this.notifyClose()}onCloseTouchStart(){this.notifyClose()}notifyClose(){if(void 0===this._closeEvent)throw new J(\"TNC15007\");this._closeEvent(this._componentItem)}notifyFocus(){if(void 0===this._focusEvent)throw new J(\"TNA15007\");this._focusEvent(this._componentItem)}enableReorder(){this._dragListener=new Zt(this._element,[this._titleElement]),this._dragListener.on(\"dragStart\",this._dragStartListener),this._componentItem.on(\"destroy\",this._contentItemDestroyListener)}disableReorder(){if(void 0===this._dragListener)throw new J(\"TDR87745\");this._componentItem.off(\"destroy\",this._contentItemDestroyListener),this._dragListener.off(\"dragStart\",this._dragStartListener),this._dragListener=void 0}}class Qt{constructor(t,e,i,n,o){this._layoutManager=t,this._componentRemoveEvent=e,this._componentFocusEvent=i,this._componentDragStartEvent=n,this._dropdownActiveChangedEvent=o,this._tabs=[],this._lastVisibleTabIndex=-1,this._dropdownActive=!1,this._element=document.createElement(\"section\"),this._element.classList.add(\"lm_tabs\"),this._dropdownElement=document.createElement(\"section\"),this._dropdownElement.classList.add(\"lm_tabdropdown_list\"),this._dropdownElement.style.display=\"none\"}get tabs(){return this._tabs}get tabCount(){return this._tabs.length}get lastVisibleTabIndex(){return this._lastVisibleTabIndex}get element(){return this._element}get dropdownElement(){return this._dropdownElement}get dropdownActive(){return this._dropdownActive}destroy(){for(let t=0;tthis.handleTabCloseEvent(t)),(t=>this.handleTabFocusEvent(t)),((t,e,i,n)=>this.handleTabDragStartEvent(t,e,i,n)));void 0===e&&(e=this._tabs.length),this._tabs.splice(e,0,i),ethis._lastVisibleTabIndex){const t=this._tabs[e];for(let t=e;t>0;t--)this._tabs[t]=this._tabs[t-1];this._tabs[0]=t}}updateTabSizes(t,e){let i=!1;this.tryUpdateTabSizes(i,t,e)||(i=!0,this.tryUpdateTabSizes(i,t,e)),i!==this._dropdownActive&&(this._dropdownActive=i,this._dropdownActiveChangedEvent())}tryUpdateTabSizes(t,e,i){if(this._tabs.length>0){if(void 0===i)throw new Error(\"non-empty tabs must have active component item\");let n=0,o=!1;const s=this._layoutManager.layoutConfig.settings.tabOverlapAllowance,r=this._tabs.indexOf(i.tab),a=this._tabs[r];this._lastVisibleTabIndex=-1;for(let i=0;ie){if(o)i===r&&(l.style.zIndex=\"auto\",l.style.marginLeft=\"\",l.parentElement!==this._element&&this._element.appendChild(l));else{let t;if(t=r>0&&r<=i?(d-e)/(i-1):(d-e)/i,tthis.onClick(t),this._touchStartListener=t=>this.onTouchStart(t),this._rowColumnClosable=!0,this._closeButton=null,this._popoutButton=null,this._tabsContainer=new Qt(this._layoutManager,(t=>this.handleTabInitiatedComponentRemoveEvent(t)),(t=>this.handleTabInitiatedComponentFocusEvent(t)),((t,e,i,n)=>this.handleTabInitiatedDragStartEvent(t,e,i,n)),(()=>this.processTabDropdownActiveChanged())),this._show=i.show,this._popoutEnabled=i.popoutEnabled,this._popoutLabel=i.popoutLabel,this._maximiseEnabled=i.maximiseEnabled,this._maximiseLabel=i.maximiseLabel,this._minimiseEnabled=i.minimiseEnabled,this._minimiseLabel=i.minimiseLabel,this._closeEnabled=i.closeEnabled,this._closeLabel=i.closeLabel,this._tabDropdownEnabled=i.tabDropdownEnabled,this._tabDropdownLabel=i.tabDropdownLabel,this.setSide(i.side),this._canRemoveComponent=this._configClosable,this._element=document.createElement(\"section\"),this._element.classList.add(\"lm_header\"),this._controlsContainerElement=document.createElement(\"section\"),this._controlsContainerElement.classList.add(\"lm_controls\"),this._element.appendChild(this._tabsContainer.element),this._element.appendChild(this._controlsContainerElement),this._element.appendChild(this._tabsContainer.dropdownElement),this._element.addEventListener(\"click\",this._clickListener,{passive:!0}),this._element.addEventListener(\"touchstart\",this._touchStartListener,{passive:!0}),this._documentMouseUpListener=()=>this._tabsContainer.hideAdditionalTabsDropdown(),globalThis.document.addEventListener(\"mouseup\",this._documentMouseUpListener,{passive:!0}),this._tabControlOffset=this._layoutManager.layoutConfig.settings.tabControlOffset,this._tabDropdownEnabled&&(this._tabDropdownButton=new Kt(this,this._tabDropdownLabel,\"lm_tabdropdown\",(()=>this._tabsContainer.showAdditionalTabsDropdown()))),this._popoutEnabled&&(this._popoutButton=new Kt(this,this._popoutLabel,\"lm_popout\",(()=>this.handleButtonPopoutEvent()))),this._maximiseEnabled&&(this._maximiseButton=new Kt(this,this._maximiseLabel,\"lm_maximise\",(t=>this.handleButtonMaximiseToggleEvent(t)))),this._configClosable&&(this._closeButton=new Kt(this,this._closeLabel,\"lm_close\",(()=>s()))),this.processTabDropdownActiveChanged()}get show(){return this._show}get side(){return this._side}get leftRightSided(){return this._leftRightSided}get layoutManager(){return this._layoutManager}get parent(){return this._parent}get tabs(){return this._tabsContainer.tabs}get lastVisibleTabIndex(){return this._tabsContainer.lastVisibleTabIndex}get element(){return this._element}get tabsContainerElement(){return this._tabsContainer.element}get controlsContainerElement(){return this._controlsContainerElement}destroy(){this.emit(\"destroy\"),this._popoutEvent=void 0,this._maximiseToggleEvent=void 0,this._clickEvent=void 0,this._touchStartEvent=void 0,this._componentRemoveEvent=void 0,this._componentFocusEvent=void 0,this._componentDragStartEvent=void 0,this._tabsContainer.destroy(),globalThis.document.removeEventListener(\"mouseup\",this._documentMouseUpListener),this._element.remove()}createTab(t,e){this._tabsContainer.createTab(t,e)}removeTab(t){this._tabsContainer.removeTab(t)}processActiveComponentChanged(t){this._tabsContainer.processActiveComponentChanged(t),this.updateTabSizes()}setSide(t){this._side=t,this._leftRightSided=[nt.right,nt.left].includes(this._side)}setRowColumnClosable(t){this._rowColumnClosable=t,this.updateClosability()}updateClosability(){let t;if(this._configClosable)if(this._rowColumnClosable){t=!0;const e=this.tabs.length;for(let i=0;i1}applyFocusedValue(t){t?this._element.classList.add(\"lm_focused\"):this._element.classList.remove(\"lm_focused\")}processMaximised(){if(void 0===this._maximiseButton)throw new J(\"HPMAX16997\");this._maximiseButton.element.setAttribute(\"title\",this._minimiseLabel)}processMinimised(){if(void 0===this._maximiseButton)throw new J(\"HPMIN16997\");this._maximiseButton.element.setAttribute(\"title\",this._maximiseLabel)}updateTabSizes(){if(this._tabsContainer.tabCount>0){const t=this._show?this._layoutManager.layoutConfig.dimensions.headerHeight:0;let e;this._leftRightSided?(this._element.style.height=\"\",this._element.style.width=zt(t)):(this._element.style.width=\"\",this._element.style.height=zt(t)),e=this._leftRightSided?this._element.offsetHeight-this._controlsContainerElement.offsetHeight-this._tabControlOffset:this._element.offsetWidth-this._controlsContainerElement.offsetWidth-this._tabControlOffset,this._tabsContainer.updateTabSizes(e,this._getActiveComponentItemEvent())}}handleTabInitiatedComponentRemoveEvent(t){if(this._canRemoveComponent){if(void 0===this._componentRemoveEvent)throw new J(\"HHTCE22294\");this._componentRemoveEvent(t)}}handleTabInitiatedComponentFocusEvent(t){if(void 0===this._componentFocusEvent)throw new J(\"HHTAE22294\");this._componentFocusEvent(t)}handleTabInitiatedDragStartEvent(t,e,i,n){if(this._canRemoveComponent){if(void 0===this._componentDragStartEvent)throw new J(\"HHTDSE22294\");this._componentDragStartEvent(t,e,i,n)}else i.cancelDrag()}processTabDropdownActiveChanged(){void 0!==this._tabDropdownButton&&Dt(this._tabDropdownButton.element,this._tabsContainer.dropdownActive)}handleButtonPopoutEvent(){if(this._layoutManager.layoutConfig.settings.popoutWholeStack){if(void 0===this._popoutEvent)throw new J(\"HHBPOE17834\");this._popoutEvent()}else{const t=this._getActiveComponentItemEvent();t&&t.popout()}}handleButtonMaximiseToggleEvent(t){if(void 0===this._maximiseToggleEvent)throw new J(\"HHBMTE16834\");this._maximiseToggleEvent()}onClick(t){t.target===this._element&&this.notifyClick(t)}onTouchStart(t){t.target===this._element&&this.notifyTouchStart(t)}notifyClick(t){if(void 0===this._clickEvent)throw new J(\"HNHC46834\");this._clickEvent(t)}notifyTouchStart(t){if(void 0===this._touchStartEvent)throw new J(\"HNHTS46834\");this._touchStartEvent(t)}}class ee extends $t{constructor(t,e,i){var n,o,s,r,a,l,h,d,c,m,u,p,g,f,v,_,y,C,w;super(t,e,i,ee.createElement(document)),this._headerSideChanged=!1,this._resizeListener=()=>this.handleResize(),this._maximisedListener=()=>this.handleMaximised(),this._minimisedListener=()=>this.handleMinimised(),this._headerConfig=e.header;const I=t.layoutConfig.header,b=e.content;let S;if(1!==b.length)S=void 0;else{S=b[0].header}this._initialWantMaximise=e.maximised,this._initialActiveItemIndex=null!==(n=e.activeItemIndex)&&void 0!==n?n:0;const E=null!==(r=null!==(s=null===(o=this._headerConfig)||void 0===o?void 0:o.show)&&void 0!==s?s:null==S?void 0:S.show)&&void 0!==r?r:I.show,x=null!==(h=null!==(l=null===(a=this._headerConfig)||void 0===a?void 0:a.popout)&&void 0!==l?l:null==S?void 0:S.popout)&&void 0!==h?h:I.popout,L=null!==(m=null!==(c=null===(d=this._headerConfig)||void 0===d?void 0:d.maximise)&&void 0!==c?c:null==S?void 0:S.maximise)&&void 0!==m?m:I.maximise,z=null!==(g=null!==(p=null===(u=this._headerConfig)||void 0===u?void 0:u.close)&&void 0!==p?p:null==S?void 0:S.close)&&void 0!==g?g:I.close,M=null!==(_=null!==(v=null===(f=this._headerConfig)||void 0===f?void 0:f.minimise)&&void 0!==v?v:null==S?void 0:S.minimise)&&void 0!==_?_:I.minimise,P=null!==(w=null!==(C=null===(y=this._headerConfig)||void 0===y?void 0:y.tabDropdown)&&void 0!==C?C:null==S?void 0:S.tabDropdown)&&void 0!==w?w:I.tabDropdown;this._maximisedEnabled=!1!==L;const T={show:!1!==E,side:!1===E?nt.top:E,popoutEnabled:!1!==x,popoutLabel:!1===x?\"\":x,maximiseEnabled:this._maximisedEnabled,maximiseLabel:!1===L?\"\":L,closeEnabled:!1!==z,closeLabel:!1===z?\"\":z,minimiseEnabled:!0,minimiseLabel:M,tabDropdownEnabled:!1!==P,tabDropdownLabel:!1===P?\"\":P};this._header=new te(t,this,T,e.isClosable&&!1!==z,(()=>this.getActiveComponentItem()),(()=>this.remove()),(()=>this.handlePopoutEvent()),(()=>this.toggleMaximise()),(t=>this.handleHeaderClickEvent(t)),(t=>this.handleHeaderTouchStartEvent(t)),(t=>this.handleHeaderComponentRemoveEvent(t)),(t=>this.handleHeaderComponentFocusEvent(t)),((t,e,i,n)=>this.handleHeaderComponentStartDragEvent(t,e,i,n))),this.isStack=!0,this._childElementContainer=document.createElement(\"section\"),this._childElementContainer.classList.add(\"lm_items\"),this.on(\"resize\",this._resizeListener),this._maximisedEnabled&&(this.on(\"maximised\",this._maximisedListener),this.on(\"minimised\",this._minimisedListener)),this.element.appendChild(this._header.element),this.element.appendChild(this._childElementContainer),this.setupHeaderPosition(),this._header.updateClosability()}get childElementContainer(){return this._childElementContainer}get header(){return this._header}get headerShow(){return this._header.show}get headerSide(){return this._header.side}get headerLeftRightSided(){return this._header.leftRightSided}get contentAreaDimensions(){return this._contentAreaDimensions}get initialWantMaximise(){return this._initialWantMaximise}get isMaximised(){return this===this.layoutManager.maximisedStack}get stackParent(){if(!this.parent)throw new Error(\"Stack should always have a parent\");return this.parent}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}init(){if(!0===this.isInitialised)return;this.updateNodeSize();for(let t=0;t0){if(this._initialActiveItemIndex<0||this._initialActiveItemIndex>=e)throw new Error(`ActiveItemIndex out of range: ${this._initialActiveItemIndex} id: ${this.id}`);for(let i=0;ithis.contentItems.length)throw e-=1,new X(\"SAC99728\");if(t instanceof jt)return e=super.addChild(t,e),this._childElementContainer.appendChild(t.element),this._header.createTab(t,e),this.setActiveComponentItem(t,i),this._header.updateTabSizes(),this.updateSize(!1),t.container.setBaseLogicalZIndex(),this._header.updateClosability(),this.emitStateChangedEvent(),e;throw new X(\"SACC88532\")}removeChild(t,e){const i=t,n=this.contentItems.indexOf(i),o=1===this.contentItems.length;if(this._activeComponentItem===i&&(i.focused&&i.blur(),!o)){const t=0===n?1:n-1;this.setActiveComponentItem(this.contentItems[t],!1)}this._header.removeTab(i),super.removeChild(i,e),o||this._header.updateClosability(),this.emitStateChangedEvent()}toggleMaximise(){this.isMaximised?this.minimise():this.maximise()}maximise(){if(!this.isMaximised){this.layoutManager.setMaximisedStack(this);const t=this.contentItems,e=t.length;for(let i=0;i0&&void 0===t)throw new Error(\"expected non-empty stack to have an active component item\");return{type:\"stack\",content:this.calculateConfigContent(),size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,isClosable:this.isClosable,maximised:this.isMaximised,header:this.createHeaderConfig(),activeItemIndex:t}}onDrop(t,e){if(\"header\"===this._dropSegment){if(this.resetHeaderDropZone(),void 0===this._dropIndex)throw new J(\"SODDI68990\");return void this.addChild(t,this._dropIndex)}if(\"body\"===this._dropSegment)return void this.addChild(t,0,!0);const i=\"top\"===this._dropSegment||\"bottom\"===this._dropSegment,n=\"left\"===this._dropSegment||\"right\"===this._dropSegment,o=\"top\"===this._dropSegment||\"left\"===this._dropSegment,s=i&&this.stackParent.isColumn||n&&this.stackParent.isRow;if(t.isComponent){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createAndInitContentItem(e,this);i.addChild(t),t=i}if(t.type===at.row||t.type===at.column){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}if(s){const e=this.stackParent.contentItems.indexOf(this);this.stackParent.addChild(t,o?e:e+1,!0),this.size*=.5,t.size=this.size,t.sizeUnit=this.sizeUnit,this.stackParent.updateSize(!1)}else{const e=i?at.column:at.row,n=ct.createDefault(e),s=this.layoutManager.createContentItem(n,this);this.stackParent.replaceChild(this,s),s.addChild(t,o?0:void 0,!0),s.addChild(this,o?void 0:0,!0),this.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}highlightDropZone(t,e){for(const i in this._contentAreaDimensions){const n=i,o=this._contentAreaDimensions[n].hoverArea;if(o.x1t&&o.y1e)return void(\"header\"===n?(this._dropSegment=\"header\",this.highlightHeaderDropZone(this._header.leftRightSided?e:t)):(this.resetHeaderDropZone(),this.highlightBodyDropZone(n)))}}getArea(){if(\"none\"===this.element.style.display)return null;const t=super.getElementArea(this._header.element),e=super.getElementArea(this._childElementContainer);if(null===t||null===e)throw new K(\"SGAHC13086\");const i=e.x2-e.x1,n=e.y2-e.y1;return this._contentAreaDimensions={header:{hoverArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2},highlightArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2}}},0===this.contentItems.length?(this._contentAreaDimensions.body={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2}},super.getElementArea(this.element)):(this._contentAreaDimensions.left={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x1+.25*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x1+.5*i,y2:e.y2}},this._contentAreaDimensions.top={hoverArea:{x1:e.x1+.25*i,y1:e.y1,x2:e.x1+.75*i,y2:e.y1+.5*n},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y1+.5*n}},this._contentAreaDimensions.right={hoverArea:{x1:e.x1+.75*i,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1+.5*i,y1:e.y1,x2:e.x2,y2:e.y2}},this._contentAreaDimensions.bottom={hoverArea:{x1:e.x1+.25*i,y1:e.y1+.5*n,x2:e.x1+.75*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1+.5*n,x2:e.x2,y2:e.y2}},super.getElementArea(this.element))}positionHeader(t){this._header.side!==t&&(this._header.setSide(t),this._headerSideChanged=!0,this.setupHeaderPosition())}updateNodeSize(){if(\"none\"!==this.element.style.display){const t=kt(this.element);if(this._header.show){t[this._header.leftRightSided?it.width:it.height]-=this.layoutManager.layoutConfig.dimensions.headerHeight}this._childElementContainer.style.width=zt(t.width),this._childElementContainer.style.height=zt(t.height);for(let e=0;e=o&&tthis.onDrag(t,e,i))),this._dragListener.on(\"dragStop\",(()=>this.onDrop())),this.createDragProxyElements(t,e),null===this._componentItem.parent)throw new K(\"DPC10097\");this._componentItemFocused=this._componentItem.focused,this._componentItemFocused&&this._componentItem.blur(),this._componentItem.parent.removeChild(this._componentItem,!0),this.setDimensions(),document.body.appendChild(this._element),this.determineMinMaxXY(),this._layoutManager.calculateItemAreas(),this.setDropPosition(t,e)}get element(){return this._element}createDragProxyElements(t,e){this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_dragProxy\");const i=document.createElement(\"div\");i.classList.add(\"lm_header\");const n=document.createElement(\"div\");n.classList.add(\"lm_tabs\");const o=document.createElement(\"div\");o.classList.add(\"lm_tab\");const s=document.createElement(\"span\");s.classList.add(\"lm_title\"),o.appendChild(s),n.appendChild(o),i.appendChild(n),this._proxyContainerElement=document.createElement(\"div\"),this._proxyContainerElement.classList.add(\"lm_content\"),this._element.appendChild(i),this._element.appendChild(this._proxyContainerElement),this._originalParent instanceof ee&&this._originalParent.headerShow&&(this._sided=this._originalParent.headerLeftRightSided,this._element.classList.add(\"lm_\"+this._originalParent.headerSide),[nt.right,nt.bottom].indexOf(this._originalParent.headerSide)>=0&&this._proxyContainerElement.insertAdjacentElement(\"afterend\",i)),this._element.style.left=zt(t),this._element.style.top=zt(e),o.setAttribute(\"title\",this._componentItem.title),s.insertAdjacentText(\"afterbegin\",this._componentItem.title),this._proxyContainerElement.appendChild(this._componentItem.element)}determineMinMaxXY(){const t=this._layoutManager.groundItem;if(void 0===t)throw new J(\"DPDMMXY73109\");{const e=t.element.getBoundingClientRect();this._minX=e.left+document.body.scrollLeft,this._minY=e.top+document.body.scrollTop,this._maxX=this._minX+e.width,this._maxY=this._minY+e.height}}onDrag(t,e,i){const n=i.pageX,o=i.pageY;this.setDropPosition(n,o),this._componentItem.drag()}setDropPosition(t,e){this._layoutManager.layoutConfig.settings.constrainDragToContainer&&(t<=this._minX?t=Math.ceil(this._minX):t>=this._maxX&&(t=Math.floor(this._maxX)),e<=this._minY?e=Math.ceil(this._minY):e>=this._maxY&&(e=Math.floor(this._maxY))),this._element.style.left=zt(t),this._element.style.top=zt(e),this._area=this._layoutManager.getArea(t,e),null!==this._area&&(this._lastValidArea=this._area,this._area.contentItem.highlightDropZone(t,e,this._area))}onDrop(){const t=this._layoutManager.dropTargetIndicator;if(null===t)throw new K(\"DPOD30011\");let e;if(t.hide(),this._componentItem.exitDragMode(),null!==this._area)e=this._componentItem,this._area.contentItem.onDrop(e,this._area);else if(null!==this._lastValidArea){e=this._componentItem;this._lastValidArea.contentItem.onDrop(e,this._lastValidArea)}else this._originalParent?(e=this._componentItem,this._originalParent.addChild(e)):this._componentItem.destroy();this._element.remove(),this._layoutManager.emit(\"itemDropped\",this._componentItem),this._componentItemFocused&&void 0!==e&&e.focus()}setDimensions(){const t=this._layoutManager.layoutConfig.dimensions;if(void 0===t)throw new Error(\"DragProxy.setDimensions: dimensions undefined\");let e=t.dragProxyWidth,i=t.dragProxyHeight;if(void 0===e||void 0===i)throw new Error(\"DragProxy.setDimensions: width and/or height undefined\");const n=!1===this._layoutManager.layoutConfig.header.show?0:t.headerHeight;this._element.style.width=zt(e),this._element.style.height=zt(i),e-=this._sided?n:0,i-=this._sided?0:n,this._proxyContainerElement.style.width=zt(e),this._proxyContainerElement.style.height=zt(i),this._componentItem.enterDragMode(e,i),this._componentItem.show()}}class ne{constructor(t,e,i,n,o,s,r){this._layoutManager=t,this._element=e,this._extraAllowableChildTargets=i,this._componentTypeOrFtn=n,this._componentState=o,this._title=s,this._id=r,this._dragListener=null,this._dummyGroundContainer=document.createElement(\"div\");const a=gt.createDefault(\"row\");this._dummyGroundContentItem=new Yt(this._layoutManager,a,this._dummyGroundContainer),this.createDragListener()}destroy(){this.removeDragListener()}createDragListener(){this.removeDragListener(),this._dragListener=new Zt(this._element,this._extraAllowableChildTargets),this._dragListener.on(\"dragStart\",((t,e)=>this.onDragStart(t,e))),this._dragListener.on(\"dragStop\",(()=>this.onDragStop()))}onDragStart(t,e){var i;const n=\"component\";let o;if(\"function\"==typeof this._componentTypeOrFtn){const t=this._componentTypeOrFtn();o=ne.isDragSourceComponentItemConfig(t)?{type:n,componentState:t.state,componentType:t.type,title:null!==(i=t.title)&&void 0!==i?i:this._title}:t}else o={type:n,componentState:this._componentState,componentType:this._componentTypeOrFtn,title:this._title,id:this._id};const s=bt.resolve(o,!1),r=new jt(this._layoutManager,s,this._dummyGroundContentItem);if(this._dummyGroundContentItem.contentItems.push(r),null===this._dragListener)throw new K(\"DSODSD66746\");{const i=new ie(t,e,this._dragListener,this._layoutManager,r,this._dummyGroundContentItem),n=this._layoutManager.transitionIndicator;if(null===n)throw new K(\"DSODST66746\");n.transitionElements(this._element,i.element)}}onDragStop(){this.createDragListener()}removeDragListener(){null!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=null)}}!function(t){t.isDragSourceComponentItemConfig=function(t){return!(\"componentType\"in t)}}(ne||(ne={}));class oe{constructor(){this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_dropTargetIndicator\");const t=document.createElement(\"div\");t.classList.add(\"lm_inner\"),this._element.appendChild(t),document.body.appendChild(this._element)}destroy(){this._element.remove()}highlightArea(t,e){this._element.style.left=zt(t.x1+e),this._element.style.top=zt(t.y1+e),this._element.style.width=zt(t.x2-t.x1-e),this._element.style.height=zt(t.y2-t.y1-e),this._element.style.display=\"block\"}hide(){Dt(this._element,!1)}}class se{constructor(){this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_transition_indicator\"),document.body.appendChild(this._element),this._toElement=null,this._fromDimensions=null,this._totalAnimationDuration=200,this._animationStartTime=null}destroy(){this._element.remove()}transitionElements(t,e){}nextAnimationFrame(){}measure(t){const e=t.getBoundingClientRect();return{left:e.left,top:e.top,width:t.offsetWidth,height:t.offsetHeight}}}class re extends Wt{constructor(t){super(),this._layoutManager=t,this._childEventListener=t=>this.onEventFromChild(t),globalThis.addEventListener(re.ChildEventName,this._childEventListener,{passive:!0})}emit(t,...e){\"userBroadcast\"===t?this.emitUserBroadcast(...e):super.emit(t,...e)}emitUserBroadcast(...t){this.handleUserBroadcastEvent(\"userBroadcast\",t)}destroy(){globalThis.removeEventListener(re.ChildEventName,this._childEventListener)}handleUserBroadcastEvent(t,e){this._layoutManager.isSubWindow?this.propagateToParent(t,e):this.propagateToThisAndSubtree(t,e)}onEventFromChild(t){const e=t.detail;this.handleUserBroadcastEvent(e.eventName,e.args)}propagateToParent(t,e){const i={bubbles:!0,cancelable:!0,detail:{layoutManager:this._layoutManager,eventName:t,args:e}},n=new CustomEvent(re.ChildEventName,i),o=globalThis.opener;if(null===o)throw new K(\"EHPTP15778\");o.dispatchEvent(n)}propagateToThisAndSubtree(t,e){this.emitUnknown(t,...e);for(let i=0;ithis.handleContainerResize())),this._windowBeforeUnloadListener=()=>this.onBeforeUnload(),this._windowBeforeUnloadListening=!1,this._maximisedStackBeforeDestroyedListener=t=>this.cleanupBeforeMaximisedStackDestroyed(t),this.isSubWindow=t.isSubWindow,this._constructorOrSubWindowLayoutConfig=t.constructorOrSubWindowLayoutConfig,Q.checkInitialise(),dt.checkInitialise(),void 0!==t.containerElement&&(this._containerElement=t.containerElement)}get container(){return this._containerElement}get isInitialised(){return this._isInitialised}get groundItem(){return this._groundItem}get root(){return this._groundItem}get openPopouts(){return this._openPopouts}get dropTargetIndicator(){return this._dropTargetIndicator}get transitionIndicator(){return this._transitionIndicator}get width(){return this._width}get height(){return this._height}get eventHub(){return this._eventHub}get rootItem(){if(void 0===this._groundItem)throw new Error(\"Cannot access rootItem before init\");return 0===this._groundItem.contentItems.length?void 0:this._groundItem.contentItems[0]}get focusedComponentItem(){return this._focusedComponentItem}get tabDropPlaceholder(){return this._tabDropPlaceholder}get maximisedStack(){return this._maximisedStack}get deprecatedConstructor(){return!this.isSubWindow&&void 0!==this._constructorOrSubWindowLayoutConfig}destroy(){if(this._isInitialised){this._windowBeforeUnloadListening&&(globalThis.removeEventListener(\"beforeunload\",this._windowBeforeUnloadListener),this._windowBeforeUnloadListening=!1),!0===this.layoutConfig.settings.closePopoutsOnUnload&&this.closeAllOpenPopouts(),this._resizeObserver.disconnect(),this.checkClearResizeTimeout(),void 0!==this._groundItem&&this._groundItem.destroy(),this._tabDropPlaceholder.remove(),null!==this._dropTargetIndicator&&this._dropTargetIndicator.destroy(),null!==this._transitionIndicator&&this._transitionIndicator.destroy(),this._eventHub.destroy();for(const t of this._dragSources)t.destroy();this._dragSources=[],this._isInitialised=!1}}minifyConfig(t){return _t.minifyConfig(t)}unminifyConfig(t){return _t.unminifyConfig(t)}init(){let t;if(this.setContainer(),this._dropTargetIndicator=new oe,this._transitionIndicator=new se,this.updateSizeFromContainer(),this.isSubWindow){if(void 0===this._constructorOrSubWindowLayoutConfig)throw new J(\"LMIU07155\");{const e=this._constructorOrSubWindowLayoutConfig.root;if(void 0===e)throw new X(\"LMIC07156\");if(!Ct.isComponent(e))throw new X(\"LMIC07157\");t=e;const i=xt.resolve(this._constructorOrSubWindowLayoutConfig);this.layoutConfig=Object.assign(Object.assign({},i),{root:void 0})}}else void 0===this._constructorOrSubWindowLayoutConfig?this.layoutConfig=_t.createDefault():this.layoutConfig=xt.resolve(this._constructorOrSubWindowLayoutConfig);const e=this.layoutConfig;this._groundItem=new Yt(this,e.root,this._containerElement),this._groundItem.init(),this.checkLoadedLayoutMaximiseItem(),this._resizeObserver.observe(this._containerElement),this._isInitialised=!0,this.adjustColumnsResponsive(),this.emit(\"initialised\"),void 0!==t&&this.loadComponentAsRoot(t)}loadLayout(t){if(!this.isInitialised)throw new Error(\"GoldenLayout: Need to call init() if LayoutConfig with defined root passed to constructor\");if(void 0===this._groundItem)throw new J(\"LMLL11119\");this.createSubWindows(),this.layoutConfig=xt.resolve(t),this._groundItem.loadRoot(this.layoutConfig.root),this.checkLoadedLayoutMaximiseItem(),this.adjustColumnsResponsive()}saveLayout(){if(!1===this._isInitialised)throw new Error(\"Can't create config, layout not yet initialised\");if(void 0===this._groundItem)throw new J(\"LMTC18244\");{const t=this._groundItem.calculateConfigContent();let e;e=1!==t.length?void 0:t[0],this.reconcilePopoutWindows();const i=[];for(let t=0;t=0?n=this._groundItem.contentItems[0]:e=0;break;case at.row:case at.column:e=n.addItem(t,i.index);break;case at.stack:if(Ct.isComponent(t)){e=n.addItem(t,i.index);break}throw Error(tt[6]);case at.component:throw new X(\"LMAIALC87444602\");default:throw new Y(\"LMAIALU98881733\",n.type)}if(Ct.isComponent(t)){const t=n.contentItems[e];Gt.isStack(t)&&(n=t,e=0)}return i.parentItem=n,i.index=e,i}}}loadComponentAsRoot(t){if(void 0===this._groundItem)throw new Error(\"Cannot add item before init\");this._groundItem.loadComponentAsRoot(t)}updateSize(t,e){this.setSize(t,e)}setSize(t,e){if(this._width=t,this._height=e,!0===this._isInitialised){if(void 0===this._groundItem)throw new J(\"LMUS18881\");if(this._groundItem.setSize(this._width,this._height),this._maximisedStack){const{width:t,height:e}=kt(this._containerElement);Tt(this._maximisedStack.element,t),At(this._maximisedStack.element,e),this._maximisedStack.updateSize(!1)}this.adjustColumnsResponsive()}}beginSizeInvalidation(){this._sizeInvalidationBeginCount++}endSizeInvalidation(){0==--this._sizeInvalidationBeginCount&&this.updateSizeFromContainer()}updateSizeFromContainer(){const{width:t,height:e}=kt(this._containerElement);this.setSize(t,e)}updateRootSize(t=!1){if(void 0===this._groundItem)throw new J(\"LMURS28881\");this._groundItem.updateSize(t)}createAndInitContentItem(t,e){const i=this.createContentItem(t,e);return i.init(),i}createContentItem(t,e){if(\"string\"!=typeof t.type)throw new G(\"Missing parameter 'type'\",JSON.stringify(t));if(ct.isComponentItem(t)&&!(e instanceof ee)&&e&&!(!0===this.isSubWindow&&e instanceof Yt)){t={type:at.stack,content:[t],size:t.size,sizeUnit:t.sizeUnit,minSize:t.minSize,minSizeUnit:t.minSizeUnit,id:t.id,maximised:t.maximised,isClosable:t.isClosable,activeItemIndex:0,header:void 0}}return this.createContentItemFromConfig(t,e)}findFirstComponentItemById(t){if(void 0===this._groundItem)throw new J(\"LMFFCIBI82446\");return this.findFirstContentItemTypeByIdRecursive(at.component,t,this._groundItem)}createPopout(t,e,i,n){return t instanceof Gt?this.createPopoutFromContentItem(t,e,i,n):this.createPopoutFromItemConfig(t,e,i,n)}createPopoutFromContentItem(t,e,i,n){let o=t.parent,s=t;for(;null!==o&&1===o.contentItems.length&&!o.isGround;)s=o,o=o.parent;if(null===o)throw new K(\"LMCPFCI00834\");{if(void 0===n&&(n=o.contentItems.indexOf(s)),null!==i&&o.addPopInParentId(i),void 0===e){const i=globalThis.screenX||globalThis.screenLeft,n=globalThis.screenY||globalThis.screenTop,o=t.element.offsetLeft,s=t.element.offsetTop,{width:r,height:a}=kt(t.element);e={left:i+o,top:n+s,width:r,height:a}}const r=t.toConfig();if(t.remove(),ft.isRootItemConfig(r))return this.createPopoutFromItemConfig(r,e,i,n);throw new Error(`${tt[0]}`)}}beginVirtualSizedContainerAdding(){0==++this._virtualSizedContainerAddingBeginCount&&(this._virtualSizedContainers.length=0)}addVirtualSizedContainer(t){this._virtualSizedContainers.push(t)}endVirtualSizedContainerAdding(){if(0==--this._virtualSizedContainerAddingBeginCount){const t=this._virtualSizedContainers.length;if(t>0){this.fireBeforeVirtualRectingEvent(t);for(let e=0;ethis.emit(\"windowOpened\",a))),a.on(\"closed\",(()=>this.reconcilePopoutWindows())),this._openPopouts.push(a),this.layoutConfig.settings.closePopoutsOnUnload&&!this._windowBeforeUnloadListening&&(globalThis.addEventListener(\"beforeunload\",this._windowBeforeUnloadListener,{passive:!0}),this._windowBeforeUnloadListening=!0),a}closeAllOpenPopouts(){for(let t=0;tglobalThis.close()),1)}getArea(t,e){let i=null,n=1/0;for(let o=0;o=s.x1&&t=s.y1&&es.surface&&(n=s.surface,i=s)}return i}calculateItemAreas(){const t=this.getAllContentItems(),e=this._groundItem;if(void 0===e)throw new J(\"LMCIAR44365\");if(1!==t.length){e.contentItems[0].isStack?this._itemAreas=[]:this._itemAreas=e.createSideAreas();for(let e=0;e0){let e=t[0];if(Gt.isComponentItem(e)){const t=e.parent;if(null===t)throw new K(\"LMXLLMI69999\");e=t}if(!Gt.isStack(e))throw new X(\"LMCLLMI19993\");e.maximise()}}}processMaximiseStack(t){if(this._maximisedStack=t,t.on(\"beforeItemDestroyed\",this._maximisedStackBeforeDestroyedListener),t.element.classList.add(\"lm_maximised\"),t.element.insertAdjacentElement(\"afterend\",this._maximisePlaceholder),void 0===this._groundItem)throw new J(\"LMMXI19993\");{this._groundItem.element.prepend(t.element);const{width:e,height:i}=kt(this._containerElement);Tt(t.element,e),At(t.element,i),t.updateSize(!0),t.focusActiveContentItem(),this._maximisedStack.emit(\"maximised\"),this.emit(\"stateChanged\")}}processMinimiseMaximisedStack(){if(void 0===this._maximisedStack)throw new X(\"LMMMS74422\");{const t=this._maximisedStack;if(null===t.parent)throw new K(\"LMMI13668\");t.element.classList.remove(\"lm_maximised\"),this._maximisePlaceholder.insertAdjacentElement(\"afterend\",t.element),this._maximisePlaceholder.remove(),this.updateRootSize(!0),this._maximisedStack=void 0,t.off(\"beforeItemDestroyed\",this._maximisedStackBeforeDestroyedListener),t.emit(\"minimised\"),this.emit(\"stateChanged\")}}reconcilePopoutWindows(){const t=[];for(let e=0;e{this._resizeTimeoutId=void 0,this.beginSizeInvalidation(),this.endSizeInvalidation()}),this.resizeDebounceInterval))}checkClearResizeTimeout(){void 0!==this._resizeTimeoutId&&(clearTimeout(this._resizeTimeoutId),this._resizeTimeoutId=void 0)}setContainer(){var t;const e=document.body,i=null!==(t=this._containerElement)&&void 0!==t?t:e;if(i===e){this.resizeWithContainerAutomatically=!0;const t=document.documentElement;t.style.height=\"100%\",t.style.margin=\"0\",t.style.padding=\"0\",t.style.overflow=\"clip\",e.style.height=\"100%\",e.style.margin=\"0\",e.style.padding=\"0\",e.style.overflow=\"clip\"}this._containerElement=i}onBeforeUnload(){this.destroy()}adjustColumnsResponsive(){if(void 0===this._groundItem)throw new J(\"LMACR20883\");if(this._firstLoad=!1,this.useResponsiveLayout()&&!this._updatingColumnsResponsive&&this._groundItem.contentItems.length>0&&this._groundItem.contentItems[0].isRow){if(void 0===this._groundItem||null===this._width)throw new J(\"LMACR77412\");{const t=this._groundItem.contentItems[0].contentItems.length;if(t<=1)return;{const e=this.layoutConfig.dimensions.defaultMinItemWidth;if(t*e<=this._width)return;{this._updatingColumnsResponsive=!0;const i=t-Math.max(Math.floor(this._width/e),1),n=this._groundItem.contentItems[0],o=this.getAllStacks();if(0===o.length)throw new X(\"LMACRS77413\");{const t=o[0];for(let e=0;en?void 0:{parentItem:t,index:o}}}case 1:if(void 0===this._focusedComponentItem)return;{const t=this._focusedComponentItem.parentItem;return this.tryCreateLocationFromParentItem(t,e)}case 2:{const t=this.findFirstContentItemType(at.stack);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 3:{let t=this.findFirstContentItemType(at.row);return void 0!==t?this.tryCreateLocationFromParentItem(t,e):(t=this.findFirstContentItemType(at.column),void 0!==t?this.tryCreateLocationFromParentItem(t,e):void 0)}case 4:{const t=this.findFirstContentItemType(at.row);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 5:{const t=this.findFirstContentItemType(at.column);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 6:if(void 0===this._groundItem)throw new J(\"LMFLRIF18244\");return void 0!==this.rootItem?void 0:void 0===e||0===e?{parentItem:this._groundItem,index:0}:void 0;case 7:if(void 0===this._groundItem)throw new J(\"LMFLF18244\");{const t=this._groundItem.contentItems;if(0===t.length)return void 0===e||0===e?{parentItem:this._groundItem,index:0}:void 0;{const i=t[0];return this.tryCreateLocationFromParentItem(i,e)}}}}tryCreateLocationFromParentItem(t,e){const i=t.contentItems.length;return void 0===e?{parentItem:t,index:i}:e<0||e>i?void 0:{parentItem:t,index:e}}}!function(t){t.createMaximisePlaceElement=function(t){const e=t.createElement(\"div\");return e.classList.add(\"lm_maximise_place\"),e},t.createTabDropPlaceholderElement=function(t){const e=t.createElement(\"div\");return e.classList.add(\"lm_drop_tab_placeholder\"),e},t.defaultLocationSelectors=[{typeId:1,index:void 0},{typeId:2,index:void 0},{typeId:3,index:void 0},{typeId:7,index:void 0}],t.afterFocusedItemIfPossibleLocationSelectors=[{typeId:0,index:1},{typeId:2,index:void 0},{typeId:3,index:void 0},{typeId:7,index:void 0}]}(ae||(ae={}));class le extends ae{constructor(t,e,i,n){if(super(le.createLayoutManagerConstructorParameters(t,e)),this._bindComponentEventHanlderPassedInConstructor=!1,this._creationTimeoutPassed=!1,void 0!==e&&\"function\"==typeof e&&(this.bindComponentEvent=e,this._bindComponentEventHanlderPassedInConstructor=!0,void 0!==i&&(this.unbindComponentEvent=i)),!this._bindComponentEventHanlderPassedInConstructor&&this.isSubWindow){if(void 0===this._constructorOrSubWindowLayoutConfig)throw new J(\"VLC98823\");{const t=xt.resolve(this._constructorOrSubWindowLayoutConfig);this.layoutConfig=Object.assign(Object.assign({},t),{root:void 0})}}!0!==n&&(this.deprecatedConstructor||this.init())}destroy(){this.bindComponentEvent=void 0,this.unbindComponentEvent=void 0,super.destroy()}init(){if(this._bindComponentEventHanlderPassedInConstructor||\"loading\"!==document.readyState&&null!==document.body){if(!this._bindComponentEventHanlderPassedInConstructor&&!0===this.isSubWindow&&!this._creationTimeoutPassed)return setTimeout((()=>this.init()),7),void(this._creationTimeoutPassed=!0);!0===this.isSubWindow&&(this._bindComponentEventHanlderPassedInConstructor||this.clearHtmlAndAdjustStylesForSubWindow(),window.__glInstance=this),super.init()}else document.addEventListener(\"DOMContentLoaded\",(()=>this.init()),{passive:!0})}clearHtmlAndAdjustStylesForSubWindow(){const t=document.head,e=new Array(4);e[0]=document.querySelectorAll(\"body link\"),e[1]=document.querySelectorAll(\"body style\"),e[2]=document.querySelectorAll(\"template\"),e[3]=document.querySelectorAll(\".gl_keep\");for(let i=0;ithis.emit(\"popIn\"))),document.body.appendChild(t),!0}}bindComponent(t,e){if(void 0!==this.bindComponentEvent){return this.bindComponentEvent(t,e)}if(void 0!==this.getComponentEvent)return{virtual:!1,component:this.getComponentEvent(t,e)};{const t=`${tt[2]}: ${JSON.stringify(e)}`;throw new Z(t)}}unbindComponent(t,e,i){if(void 0!==this.unbindComponentEvent)this.unbindComponentEvent(t);else if(!e&&void 0!==this.releaseComponentEvent){if(void 0===i)throw new J(\"VCUCRCU333998\");this.releaseComponentEvent(t,i)}}}!function(t){let e=!1;t.createLayoutManagerConstructorParameters=function(t,i){const n=e?null:new URL(document.location.href).searchParams.get(\"gl-window\");e=!0;const o=null!==n;let s,r;if(null!==n){const e=localStorage.getItem(n);if(null===e)throw new Error(\"Null gl-window Config\");localStorage.removeItem(n);const i=JSON.parse(e),o=_t.unminifyConfig(i);r=xt.fromResolved(o),t instanceof HTMLElement&&(s=t)}else void 0===t?r=void 0:t instanceof HTMLElement?(r=void 0,s=t):r=t,void 0===s&&i instanceof HTMLElement&&(s=i);return{constructorOrSubWindowLayoutConfig:r,isSubWindow:o,containerElement:s}}}(le||(le={}));class he extends le{constructor(t,e,i){super(t,e,i,!0),this._componentTypesMap=new Map,this._registeredComponentMap=new Map,this._virtuableComponentMap=new Map,this._containerVirtualRectingRequiredEventListener=(t,e,i)=>this.handleContainerVirtualRectingRequiredEvent(t,e,i),this._containerVirtualVisibilityChangeRequiredEventListener=(t,e)=>this.handleContainerVirtualVisibilityChangeRequiredEvent(t,e),this._containerVirtualZIndexChangeRequiredEventListener=(t,e,i)=>this.handleContainerVirtualZIndexChangeRequiredEvent(t,e,i),this.deprecatedConstructor||this.init()}registerComponent(t,e,i=!1){if(\"function\"!=typeof e)throw new $(\"registerComponent() componentConstructorOrFactoryFtn parameter is not a function\");if(e.hasOwnProperty(\"prototype\")){const n=e;this.registerComponentConstructor(t,n,i)}else{const n=e;this.registerComponentFactoryFunction(t,n,i)}}registerComponentConstructor(t,e,i=!1){if(\"function\"!=typeof e)throw new Error(tt[1]);if(void 0!==this._componentTypesMap.get(t))throw new Z(`${tt[3]}: ${t}`);this._componentTypesMap.set(t,{constructor:e,factoryFunction:void 0,virtual:i})}registerComponentFactoryFunction(t,e,i=!1){if(\"function\"!=typeof e)throw new Z(\"Please register a constructor function\");if(void 0!==this._componentTypesMap.get(t))throw new Z(`${tt[3]}: ${t}`);this._componentTypesMap.set(t,{constructor:void 0,factoryFunction:e,virtual:i})}registerComponentFunction(t){this.registerGetComponentConstructorCallback(t)}registerGetComponentConstructorCallback(t){if(\"function\"!=typeof t)throw new Error(\"Please register a callback function\");void 0!==this._getComponentConstructorFtn&&console.warn(\"Multiple component functions are being registered. Only the final registered function will be used.\"),this._getComponentConstructorFtn=t}getRegisteredComponentTypeNames(){const t=this._componentTypesMap.keys();return Array.from(t)}getComponentInstantiator(t){let e;const i=pt.resolveComponentTypeName(t);return void 0!==i&&(e=this._componentTypesMap.get(i)),void 0===e&&void 0!==this._getComponentConstructorFtn&&(e={constructor:this._getComponentConstructorFtn(t),factoryFunction:void 0,virtual:!1}),e}bindComponent(t,e){let i;const n=pt.resolveComponentTypeName(e);let o;if(void 0!==n&&(i=this._componentTypesMap.get(n)),void 0===i&&void 0!==this._getComponentConstructorFtn&&(i={constructor:this._getComponentConstructorFtn(e),factoryFunction:void 0,virtual:!1}),void 0!==i){const s=i.virtual;let r,a;r=void 0===e.componentState?void 0:Ut({},e.componentState);const l=i.constructor;if(void 0!==l)a=new l(t,r,s);else{const e=i.factoryFunction;if(void 0===e)throw new X(\"LMBCFFU10008\");a=e(t,r,s)}if(s){if(void 0===a)throw new J(\"GLBCVCU988774\");{const e=a,i=e.rootHtmlElement;if(void 0===i)throw new Z(`${tt[5]}: ${n}`);!function(t){const e=\"absolute\";t.style.position!==e&&(t.style.position=e)}(i),this.container.appendChild(i),this._virtuableComponentMap.set(t,e),t.virtualRectingRequiredEvent=this._containerVirtualRectingRequiredEventListener,t.virtualVisibilityChangeRequiredEvent=this._containerVirtualVisibilityChangeRequiredEventListener,t.virtualZIndexChangeRequiredEvent=this._containerVirtualZIndexChangeRequiredEventListener}}this._registeredComponentMap.set(t,a),o={virtual:i.virtual,component:a}}else o=super.bindComponent(t,e);return o}unbindComponent(t,e,i){if(void 0===this._registeredComponentMap.get(t))super.unbindComponent(t,e,i);else{const e=this._virtuableComponentMap.get(t);if(void 0!==e){const i=e.rootHtmlElement;if(void 0===i)throw new X(\"GLUC77743\",t.title);this.container.removeChild(i),this._virtuableComponentMap.delete(t)}}}fireBeforeVirtualRectingEvent(t){this._goldenLayoutBoundingClientRect=this.container.getBoundingClientRect(),super.fireBeforeVirtualRectingEvent(t)}handleContainerVirtualRectingRequiredEvent(t,e,i){const n=this._virtuableComponentMap.get(t);if(void 0===n)throw new J(\"GLHCSCE55933\");{const o=n.rootHtmlElement;if(void 0===o)throw new Z(tt[4]+\" \"+t.title);{const n=t.element.getBoundingClientRect(),s=n.left-this._goldenLayoutBoundingClientRect.left;o.style.left=zt(s);const r=n.top-this._goldenLayoutBoundingClientRect.top;o.style.top=zt(r),Tt(o,e),At(o,i)}}}handleContainerVirtualVisibilityChangeRequiredEvent(t,e){const i=this._virtuableComponentMap.get(t);if(void 0===i)throw new J(\"GLHCVVCRE55934\");{const n=i.rootHtmlElement;if(void 0===n)throw new Z(tt[4]+\" \"+t.title);Dt(n,e)}}handleContainerVirtualZIndexChangeRequiredEvent(t,e,i){const n=this._virtuableComponentMap.get(t);if(void 0===n)throw new J(\"GLHCVZICRE55935\");{const e=n.rootHtmlElement;if(void 0===e)throw new Z(tt[4]+\" \"+t.title);e.style.zIndex=i}}}const de=\"initial_\",ce={show:\"top\",popout:!1,maximise:!1,close:\"close-tab-unused\"},me={headerHeight:31},ue={hasHeaders:!0,reorderEnabled:!0},pe={popoutWholeStack:!1,constrainDragToContainer:!1,constrainDragToHeaders:!1,preventDragout:!1,showMaximiseIcon:!1,showPopoutIcon:!1,showCloseIcon:!1,blockedPopoutsThrowError:!0,closePopoutsOnUnload:!0,selectionEnabled:!1};var ge,fe;class ve{constructor(e){this.layout=e,ge.set(this,void 0),fe.set(this,void 0),this.handleResize=t=>{t.forEach((t=>this.resizeElement(t.target)))},this.handleMutation=()=>{this.layout.viewComponentsByContainerElement.forEach((t=>{this.resizeElement(t.container.element)}))},t.__classPrivateFieldSet(this,ge,new ResizeObserver(this.handleResize),\"f\"),t.__classPrivateFieldSet(this,fe,new MutationObserver(this.handleMutation),\"f\")}observeMutations(e){t.__classPrivateFieldGet(this,fe,\"f\")?.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[\"class\"]})}destroy(){t.__classPrivateFieldGet(this,ge,\"f\").disconnect(),t.__classPrivateFieldGet(this,fe,\"f\").disconnect()}observeContainer(e){t.__classPrivateFieldGet(this,ge,\"f\").observe(e)}unobserveContainer(e){t.__classPrivateFieldGet(this,ge,\"f\").unobserve(e)}resizeElement(t){const e=this.layout.viewComponentsByContainerElement.get(t);e&&e.resize()}}ge=new WeakMap,fe=new WeakMap;var _e={};Object.defineProperty(_e,\"__esModule\",{value:!0});var ye=_e.BaseItem=void 0;class Ce{constructor(t,e,i){this._item=t,this._layout=e,this._wrap=i}get raw(){return this._item}get layout(){return this._layout}get type(){return this._item.type}get contentItems(){return(this._item.contentItems??[]).map((t=>this._wrap(t)))}get parent(){const t=this._item.parent;return t?this._wrap(t):null}setActiveContentItem(t,e){if(\"stack\"!==this.type)throw new Error(`Cannot call setActiveContentItem from a non-stack item: ${this.type}`);this._item.setActiveContentItem(t.raw,e)}static wrapInternal(t,e,i){const n=Ce.wrapCache.get(e);if(n)return n;const o=new t(e,i,(e=>Ce.wrapInternal(t,e,i)));return Ce.wrapCache.set(e,o),o}}ye=_e.BaseItem=Ce,Ce.wrapCache=new WeakMap;const we=t=>!!t&&\"contentItems\"in t&&(t.isRow||t.isColumn);class Ie extends ye{isRoot(){return!!this._item.parent?.isGround}getBounds(){return this._item.element.getBoundingClientRect()}get viewName(){if(this._item.isComponent){const{component:t}=this._item;return t.identity.name}throw new Error(\"View name not found\")}onDestroyed(t){const e=({target:i})=>{i===this._item&&(t(),this._item.off(\"itemDestroyed\",e))};this._item.on(\"itemDestroyed\",e)}createAdjacentStack({position:t=\"right\"}={}){const e=this.raw;if(ee.isStack(e)&&e.parent){const i=[\"top\",\"bottom\"].includes(t)?\"column\":\"row\",n=[\"left\",\"top\"].includes(t)?1:0,o=we(e.parent)?e.parent:e.layoutManager,s=o,r=e.parent.contentItems.indexOf(e);e.parent.isGround&&e.parent.removeChild(e,!0);const a=o.newItem({type:i,content:[{type:\"stack\",content:[]}]},r);if(!a)throw new Error(\"createAdjacentStack: Failed to create new container\");const l=a.contentItems[0];return a.addChild(this.raw,n),we(s)&&s.removeChild(e,!0),this._wrap(l)}throw new Error(`Cannot creat adjacent stacks for type: ${e.type}, must be type 'stack'`)}setActiveContentItem(t,e=!0){if(!ee.isStack(this._item))throw new Error(`Cannot call setActiveContentItem from a non-stack item: ${this.type}`);this._item.setActiveComponentItem(t.raw,!e)}static wrap(t,e){return ye.wrapInternal(Ie,t,e)}}function be(t=[],e){for(const i of t)\"component\"===i.type?Object.keys(e).forEach((t=>{t in i&&(i.componentState={[`${de}${t}`]:i[t],...i.componentState}),i[t]=e[t]})):be(i.content,e)}function Se(t=[],e,i){for(const n of t)if(\"component\"===n.type)Object.keys(e).forEach((t=>{if(`${de}${t}`in n.componentState)return n[t]=n.componentState[`${de}${t}`],void delete n.componentState[`${de}${t}`];n[t]=e[t]}));else{if(n.size&&(\"row\"===i||\"column\"===i)){n[\"row\"===i?\"width\":\"height\"]=n.size?.includes(\".\")?parseFloat(n.size):parseInt(n.size)}Se(n.content,e,n.type)}}function Ee(t){if(t.root){t.root.content&&Se([t.root],{componentName:\"view\",isClosable:!0});const e=t.root;t.content=[e],delete t.root}return t}const xe=e=>class extends e{connectedCallback(){if(!this.name||!this.uuid)throw new Error(\" Name or uuid attribute missing\");if(!this.src)throw new Error(\" missing 'src' attribute.\");this.#t||(this.#t=document.createElement(\"iframe\"),this.#t.src=this.src,this.#t.style.height=\"100%\",this.#t.style.width=\"100%\",this.#t.style.border=\"none\",this.forceFrameName?this.#t.setAttribute(\"name\",this.forceFrameName):this.#t.setAttribute(\"name\",t.encodeOptions({brokerUrl:this.brokerUrl,name:this.name,uuid:this.uuid,providerId:this.providerId,contextGroup:this.contextGroup},\"of-frame\")),this.#t.setAttribute(\"id\",this.name),this.appendChild(this.#t))}#t;get brokerUrl(){return this.getAttribute(\"of-broker\")}set brokerUrl(t){t&&this.setAttribute(\"of-broker\",t)}get name(){return this.getAttribute(\"of-name\")}set name(t){t&&this.setAttribute(\"of-name\",t)}get forceFrameName(){return this.getAttribute(\"forceFrameName\")}set forceFrameName(t){t&&this.setAttribute(\"forceFrameName\",t)}get uuid(){return this.getAttribute(\"of-uuid\")}set uuid(t){t&&this.setAttribute(\"of-uuid\",t)}get src(){return this.getAttribute(\"src\")}set src(t){t&&this.setAttribute(\"src\",t)}get providerId(){return this.getAttribute(\"of-provider-id\")}set providerId(t){t&&this.setAttribute(\"of-provider-id\",t)}get contextGroup(){return this.getAttribute(\"of-context-group\")}set contextGroup(t){t&&this.setAttribute(\"of-context-group\",t)}static get observedAttributes(){return[\"name\"]}};class Le{static create(t){const e=document.createElement(\"of-view\");return Object.entries(t).forEach((([t,i])=>{e.setAttribute(t,i)})),e}}customElements.define(\"of-view\",xe(HTMLElement));class ze{constructor(t,i,n,{brokerUrl:o,interopConfig:s},r){this.container=t,this.config=i,this.ofView=null,this.isDragging=()=>this.container.tab.element?.className.includes(\"lm_dragging\")??!1;const{url:a,web:l,interop:h,name:d}=i||{},c=d??`internal-generated-view-${e.v4()}`;if(this.identity={uuid:n,name:c},this.container.element.setAttribute(\"of-name\",c),this.container.element.id=`container-${c}`,this.container.parent.id=c,void 0===a)return void this.handleUrlMissing();const m=this.updateTitleIfNotSet(a),u={\"of-broker\":o,\"of-uuid\":n,\"of-name\":c,src:a};l?.frameName&&(u.forceFrameName=l.frameName);const p=h?.currentContextGroup??s?.currentContextGroup;p&&(u[\"of-context-group\"]=p),s?.providerId&&(u[\"of-provider-id\"]=s?.providerId),this.ofView=Le.create(u),this.ofView.title=m??`Iframe: ${a}`,r.appendChild(this.ofView),this.ofView.style.position=\"absolute\"}updateTitleIfNotSet(t){return\"view\"===this.container.parent.title&&this.container.parent.setTitle(t),this.container.parent.title}handleUrlMissing(){const t=document.createElement(\"div\");t.setAttribute(\"style\",\"padding: 20px\");t.innerText=\"No URL provided\",this.container.element.appendChild(t)}destroy(){this.ofView?.remove(),this.ofView=null}closeView(){this.container.close()}resize(){if(this.ofView){if(this.isDragging())return void(this.ofView.style.display=\"none\");const t=this.container.element.getBoundingClientRect();this.ofView.style.position=\"absolute\",this.ofView.style.height=`${t.height}px`,this.ofView.style.width=`${t.width}px`,this.ofView.style.inset=`${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`,this.ofView.style.display=\"block\"}}}class Me extends U{static overrideConfig(t){const e={...ue,...t.settings,...pe};return e.reorderEnabled?be(t.content,{isClosable:!0}):be(t.content,{reorderEnabled:!1}),{dimensions:me,...t,settings:e,header:{...ce,show:!1!==t.settings?.hasHeaders&&ce.show}}}constructor(t,e,i,{options:n},o,s){super(),this.identity=t,this.container=e,this.initialConfig=i,this.layoutManager=o,this.platformProvider=s,this.viewComponentsByContainerElement=new Map,this.layoutContentCache=_.getSingleInstance(),this.reparentingViews=new Set,this.goldenLayoutDestroyed=!1,this.createViewComponent=(t,e)=>{m.handleSharedView(this.layoutManager,this.identity,e);const i=new ze(t,e,this.identity.uuid,this.options,this.iframeContainer);return e&&!1===e[`${de}isClosable`]&&this.stylesheet.insertRule(`#tab-${i.identity.name} .lm_close_tab { display: none; }`),this.viewComponentsByContainerElement.set(t.element,i),this.resizeController.observeContainer(t.element),i},this.iframeContainer=document.createElement(\"div\"),this.iframeContainer.id=`openfin-layout-iframe-container-${this.identity.layoutName}`,this.domEmitter=new V(e),this.setupStylesheets(),this.layout=new he(this.container),this.layout.resizeWithContainerAutomatically=!0,this.options=n,this.layout.registerComponent(\"view\",this.createViewComponent),this.setupListeners(),this.resizeController=new ve(this),this.layout.loadLayout(Me.overrideConfig(i));const r=document.createElement(\"div\");r.id=`openfin-layout-shadow-container-${this.identity.layoutName}`,r.attachShadow({mode:\"open\",delegatesFocus:!1}).appendChild(this.iframeContainer),this.container.appendChild(r),this.resizeController.observeMutations(this.container)}getStackByView({name:t}){const e=this.layout.findFirstComponentItemById(t);if(e?.parent&&e?.parent?.isStack)return Ie.wrap(e.parent,this)}getRoot(){return Ie.wrap(this.layout.rootItem,this)}async platformCloseView(t){const e=[...this.viewComponentsByContainerElement.values()].find((e=>e.identity.name===t.name));if(!e)throw new Error(`View with name: ${t.name} not found in layout.`);e.closeView()}async platformCreateView(t,{location:e,targetView:i}={}){if(i)throw new Error(\"TargetView not supported in web\");const n={options:this.platformProvider.normalizeOptions(t),target:this.identity,location:e};return this.insertView(n)}setupStylesheets(){if(this.container.setAttribute(\"data-openfin-layout-name\",this.identity.layoutName),this.stylesheet=new CSSStyleSheet,this.stylesheet.insertRule(\".lm_close { display: none; }\"),document.adoptedStyleSheets.push(this.stylesheet),this.initialConfig.settings?.preventSplitterResize){const t=`\\n [data-openfin-layout-name='${this.identity.layoutName}'] .lm_splitter {\\n pointer-events: none;\\n }`;this.stylesheet.insertRule(t)}}insertView({options:t,location:e,targetView:i}){const n=e?this.layoutContentCache.getItemOrUndefined(e.id):void 0,o=i?this.layoutContentCache.getItemOrUndefined(i.name):void 0,s=n??o??Ie.wrap(this.layout.rootItem,this);let r;if(ee.isStack(s.raw))r=s.raw;else{if(!we(s.raw))throw new Error(\"Cannot add a view at the requested location\");r=s.raw.newItem({type:\"stack\",content:[]})}const a=Math.min(r.contentItems.length,e?.index??r.contentItems.length);let l=this.layout.findFirstComponentItemById(t.name);l?(l.parent&&l.parent.removeChild(l,!0),r.addChild(l,a)):l=r.newComponent(\"view\",t,t.title??t.url??\"Default Title\",a);const h=l.component.identity;return Promise.resolve({identity:h})}replaceView({viewToReplace:t,newView:e}){throw new Error(\"Method not implemented.\")}replaceLayout(t){throw new Error(\"Method not implemented.\")}async cleanupView(t){}applyPreset(t){throw new Error(\"Method not implemented.\")}getCurrentViews(){return[...this.viewComponentsByContainerElement.values()].map((t=>t.identity))}async getFrameSnapshot(){return Ee(xt.fromResolved(this.layout.toConfig()))}isVisible(){return W(this.container)}async onViewDetached({viewIdentity:t}){this.reparentingViews.add(t.name),this.platformCloseView(t)}async destroy(){this.goldenLayoutDestroyed||(this.goldenLayoutDestroyed=!0,this.layout.destroy()),this.iframeContainer.remove(),this.resizeController.destroy(),document.adoptedStyleSheets=document.adoptedStyleSheets.filter((t=>t!==this.stylesheet)),this.viewComponentsByContainerElement.clear()}setupListeners(){this.container.addEventListener(\"pointerdown\",(t=>{if(t.target instanceof HTMLElement){const e=t.target.classList;[\"lm_tab\",\"lm_title\",\"lm_splitter\",\"lm_drag_handle\"].some((t=>e.contains(t)))&&(this.handleDragStart(),2===t.button&&t.stopPropagation())}}),!0),document.addEventListener(\"pointerup\",(()=>this.handleDragEnd()),!0),this.layout.on(\"tabCreated\",(t=>{const e=t.componentItem.component;t.element.id=`tab-${e.identity.name}`,this.domEmitter.dispatchLocalEvent(\"tab-created\",e.identity)})),this.layout.on(\"itemCreated\",(({target:t})=>{const e=t;if(Gt.isComponentItem(e)){const t=e.component;this.domEmitter.dispatchLocalEvent(\"container-created\",t.identity)}})),this.layout.on(\"itemDestroyed\",(t=>{const e=t.target;if(Gt.isComponentItem(e)){const t=e.component;this.removeViewComponent(t)}})),this.layout.on(\"itemDropped\",(()=>{this.handleDragEnd()}))}handleDragStart(){this.iframeContainer.style.pointerEvents=\"none\"}handleDragEnd(){this.iframeContainer.style.pointerEvents=\"\"}removeViewComponent(t){if(t.config&&!1===t.config[`${de}isClosable`]){const e=[...this.stylesheet.cssRules].findIndex((e=>e.cssText.includes(`#tab-${t.identity.name}`)));this.stylesheet.deleteRule(e)}t.destroy(),this.viewComponentsByContainerElement.delete(t.container.element),this.resizeController.unobserveContainer(t.container.element),this.reparentingViews.has(t.identity.name)?this.reparentingViews.delete(t.identity.name):this.platformProvider.closeView(t.identity.name);0===this.getCurrentViews().length&&(this.goldenLayoutDestroyed||(this.goldenLayoutDestroyed=!0,m.handleLastViewRemoved(this.layoutManager,this.identity)))}}class Pe{constructor(t,e,i,n){this.windowIdentity=t,this.connectConfig=e,this.provider=i,this.fallbackContainer=n}async createLayout(t,e){if(!(\"container\"in t)&&!this.fallbackContainer)throw new Error(\"Container property is not optional in web\");const{layoutName:i}=t,n=t,o=this.provider.initLayoutViews(n),s=n.container??this.fallbackContainer,r={...this.windowIdentity,layoutName:i},a=new Me(r,s,o,this.connectConfig,e,this.provider);m.registerLayout(e,i,a),this.fallbackContainer=null}async getLayoutSnapshot(t){return t.getLayoutSnapshot()}async handleLastViewRemoved(t){}}class Te{static async init(e){const i=e.getFin().InterApplicationBus.Channel,n=await i.create(`custom-frame-${e.me.uuid}`);return n.setDefaultAction((async(t,{target:e,opts:i},o)=>{const s=n.connections.find((t=>t.name===e.name));if(s)return n.dispatch(s,t,{...i,target:e});throw new Error(`Client with name ${e.name} not found`)})),await t.relayChannelClientApi_1(n,\"layout-relay\"),new Te(e)}constructor(t){this.wire=t,this.viewNames=new Set}normalizeOptions(t,i=\"default\"){const n=this.wire.me.uuid;let{name:o=`internal-generated-view-${e.v4()}`}=t;return o.match(/^internal-generated-view-/)&&this.viewNames.has(o)&&\"duplicate\"===i&&(o=`internal-generated-view-${e.v4()}`),this.viewNames.add(o),{...t,name:o,uuid:n}}closeView(t){this.viewNames.delete(t)}initLayoutViews({layout:t,multiInstanceViewBehavior:e}){return H((t=>{if(\"component\"===t.type&&t.componentState){const i=this.normalizeOptions(t.componentState,e);return{...t,componentState:i}}return t}),t)}}var Ae;const ke=t=>t;Ae=new WeakMap,exports.WebLayoutEntryPoint=class{constructor(e){Ae.set(this,void 0),this.initLayoutManager=async(e,i,{container:n,layoutManagerOverride:o})=>{const s=await Te.init(i),r=o??ke,a=new Pe(i.me,t.__classPrivateFieldGet(this,Ae,\"f\"),s,n),l=new(r(m.createClosedConstructor(a)));return await M(i,l),l},this.applyLayoutSnapshot=async(e,i,n)=>{await i.applyLayoutSnapshot(t.__classPrivateFieldGet(this,Ae,\"f\").platform.layoutSnapshot)},this.createLayout=async(t,e)=>m.createLayout(t,e),this.destroyLayout=async(t,e)=>m.destroyLayout(t,e),t.__classPrivateFieldSet(this,Ae,e,\"f\")}};\n","'use strict'\n\nexports.byteLength = byteLength\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\nfor (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i]\n revLookup[code.charCodeAt(i)] = i\n}\n\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction getLens (b64) {\n var len = b64.length\n\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // Trim off extra bytes after placeholder bytes are found\n // See: https://github.com/beatgammit/base64-js/issues/42\n var validLen = b64.indexOf('=')\n if (validLen === -1) validLen = len\n\n var placeHoldersLen = validLen === len\n ? 0\n : 4 - (validLen % 4)\n\n return [validLen, placeHoldersLen]\n}\n\n// base64 is 4/3 + up to two characters of the original data\nfunction byteLength (b64) {\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction _byteLength (b64, validLen, placeHoldersLen) {\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction toByteArray (b64) {\n var tmp\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n\n var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))\n\n var curByte = 0\n\n // if there are placeholders, only get up to the last complete 4 chars\n var len = placeHoldersLen > 0\n ? validLen - 4\n : validLen\n\n var i\n for (i = 0; i < len; i += 4) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 18) |\n (revLookup[b64.charCodeAt(i + 1)] << 12) |\n (revLookup[b64.charCodeAt(i + 2)] << 6) |\n revLookup[b64.charCodeAt(i + 3)]\n arr[curByte++] = (tmp >> 16) & 0xFF\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 2) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 2) |\n (revLookup[b64.charCodeAt(i + 1)] >> 4)\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 1) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 10) |\n (revLookup[b64.charCodeAt(i + 1)] << 4) |\n (revLookup[b64.charCodeAt(i + 2)] >> 2)\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] +\n lookup[num >> 12 & 0x3F] +\n lookup[num >> 6 & 0x3F] +\n lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n var tmp\n var output = []\n for (var i = start; i < end; i += 3) {\n tmp =\n ((uint8[i] << 16) & 0xFF0000) +\n ((uint8[i + 1] << 8) & 0xFF00) +\n (uint8[i + 2] & 0xFF)\n output.push(tripletToBase64(tmp))\n }\n return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n var tmp\n var len = uint8.length\n var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n var parts = []\n var maxChunkLength = 16383 // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1]\n parts.push(\n lookup[tmp >> 2] +\n lookup[(tmp << 4) & 0x3F] +\n '=='\n )\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + uint8[len - 1]\n parts.push(\n lookup[tmp >> 10] +\n lookup[(tmp >> 4) & 0x3F] +\n lookup[(tmp << 2) & 0x3F] +\n '='\n )\n }\n\n return parts.join('')\n}\n","/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n/* eslint-disable no-proto */\n\n'use strict'\n\nconst base64 = require('base64-js')\nconst ieee754 = require('ieee754')\nconst customInspectSymbol =\n (typeof Symbol === 'function' && typeof Symbol['for'] === 'function') // eslint-disable-line dot-notation\n ? Symbol['for']('nodejs.util.inspect.custom') // eslint-disable-line dot-notation\n : null\n\nexports.Buffer = Buffer\nexports.SlowBuffer = SlowBuffer\nexports.INSPECT_MAX_BYTES = 50\n\nconst K_MAX_LENGTH = 0x7fffffff\nexports.kMaxLength = K_MAX_LENGTH\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Print warning and recommend using `buffer` v4.x which has an Object\n * implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * We report that the browser does not support typed arrays if the are not subclassable\n * using __proto__. Firefox 4-29 lacks support for adding new properties to `Uint8Array`\n * (See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438). IE 10 lacks support\n * for __proto__ and has a buggy typed array implementation.\n */\nBuffer.TYPED_ARRAY_SUPPORT = typedArraySupport()\n\nif (!Buffer.TYPED_ARRAY_SUPPORT && typeof console !== 'undefined' &&\n typeof console.error === 'function') {\n console.error(\n 'This browser lacks typed array (Uint8Array) support which is required by ' +\n '`buffer` v5.x. Use `buffer` v4.x if you require old browser support.'\n )\n}\n\nfunction typedArraySupport () {\n // Can typed array instances can be augmented?\n try {\n const arr = new Uint8Array(1)\n const proto = { foo: function () { return 42 } }\n Object.setPrototypeOf(proto, Uint8Array.prototype)\n Object.setPrototypeOf(arr, proto)\n return arr.foo() === 42\n } catch (e) {\n return false\n }\n}\n\nObject.defineProperty(Buffer.prototype, 'parent', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.buffer\n }\n})\n\nObject.defineProperty(Buffer.prototype, 'offset', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.byteOffset\n }\n})\n\nfunction createBuffer (length) {\n if (length > K_MAX_LENGTH) {\n throw new RangeError('The value \"' + length + '\" is invalid for option \"size\"')\n }\n // Return an augmented `Uint8Array` instance\n const buf = new Uint8Array(length)\n Object.setPrototypeOf(buf, Buffer.prototype)\n return buf\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new TypeError(\n 'The \"string\" argument must be of type string. Received type number'\n )\n }\n return allocUnsafe(arg)\n }\n return from(arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\nfunction from (value, encodingOrOffset, length) {\n if (typeof value === 'string') {\n return fromString(value, encodingOrOffset)\n }\n\n if (ArrayBuffer.isView(value)) {\n return fromArrayView(value)\n }\n\n if (value == null) {\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n }\n\n if (isInstance(value, ArrayBuffer) ||\n (value && isInstance(value.buffer, ArrayBuffer))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof SharedArrayBuffer !== 'undefined' &&\n (isInstance(value, SharedArrayBuffer) ||\n (value && isInstance(value.buffer, SharedArrayBuffer)))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof value === 'number') {\n throw new TypeError(\n 'The \"value\" argument must not be of type number. Received type number'\n )\n }\n\n const valueOf = value.valueOf && value.valueOf()\n if (valueOf != null && valueOf !== value) {\n return Buffer.from(valueOf, encodingOrOffset, length)\n }\n\n const b = fromObject(value)\n if (b) return b\n\n if (typeof Symbol !== 'undefined' && Symbol.toPrimitive != null &&\n typeof value[Symbol.toPrimitive] === 'function') {\n return Buffer.from(value[Symbol.toPrimitive]('string'), encodingOrOffset, length)\n }\n\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n return from(value, encodingOrOffset, length)\n}\n\n// Note: Change prototype *after* Buffer.from is defined to workaround Chrome bug:\n// https://github.com/feross/buffer/pull/148\nObject.setPrototypeOf(Buffer.prototype, Uint8Array.prototype)\nObject.setPrototypeOf(Buffer, Uint8Array)\n\nfunction assertSize (size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be of type number')\n } else if (size < 0) {\n throw new RangeError('The value \"' + size + '\" is invalid for option \"size\"')\n }\n}\n\nfunction alloc (size, fill, encoding) {\n assertSize(size)\n if (size <= 0) {\n return createBuffer(size)\n }\n if (fill !== undefined) {\n // Only pay attention to encoding if it's a string. This\n // prevents accidentally sending in a number that would\n // be interpreted as a start offset.\n return typeof encoding === 'string'\n ? createBuffer(size).fill(fill, encoding)\n : createBuffer(size).fill(fill)\n }\n return createBuffer(size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n return alloc(size, fill, encoding)\n}\n\nfunction allocUnsafe (size) {\n assertSize(size)\n return createBuffer(size < 0 ? 0 : checked(size) | 0)\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n return allocUnsafe(size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n return allocUnsafe(size)\n}\n\nfunction fromString (string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8'\n }\n\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n\n const length = byteLength(string, encoding) | 0\n let buf = createBuffer(length)\n\n const actual = buf.write(string, encoding)\n\n if (actual !== length) {\n // Writing a hex string, for example, that contains invalid characters will\n // cause everything after the first invalid character to be ignored. (e.g.\n // 'abxxcd' will be treated as 'ab')\n buf = buf.slice(0, actual)\n }\n\n return buf\n}\n\nfunction fromArrayLike (array) {\n const length = array.length < 0 ? 0 : checked(array.length) | 0\n const buf = createBuffer(length)\n for (let i = 0; i < length; i += 1) {\n buf[i] = array[i] & 255\n }\n return buf\n}\n\nfunction fromArrayView (arrayView) {\n if (isInstance(arrayView, Uint8Array)) {\n const copy = new Uint8Array(arrayView)\n return fromArrayBuffer(copy.buffer, copy.byteOffset, copy.byteLength)\n }\n return fromArrayLike(arrayView)\n}\n\nfunction fromArrayBuffer (array, byteOffset, length) {\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\"offset\" is outside of buffer bounds')\n }\n\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\"length\" is outside of buffer bounds')\n }\n\n let buf\n if (byteOffset === undefined && length === undefined) {\n buf = new Uint8Array(array)\n } else if (length === undefined) {\n buf = new Uint8Array(array, byteOffset)\n } else {\n buf = new Uint8Array(array, byteOffset, length)\n }\n\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(buf, Buffer.prototype)\n\n return buf\n}\n\nfunction fromObject (obj) {\n if (Buffer.isBuffer(obj)) {\n const len = checked(obj.length) | 0\n const buf = createBuffer(len)\n\n if (buf.length === 0) {\n return buf\n }\n\n obj.copy(buf, 0, 0, len)\n return buf\n }\n\n if (obj.length !== undefined) {\n if (typeof obj.length !== 'number' || numberIsNaN(obj.length)) {\n return createBuffer(0)\n }\n return fromArrayLike(obj)\n }\n\n if (obj.type === 'Buffer' && Array.isArray(obj.data)) {\n return fromArrayLike(obj.data)\n }\n}\n\nfunction checked (length) {\n // Note: cannot use `length < K_MAX_LENGTH` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= K_MAX_LENGTH) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + K_MAX_LENGTH.toString(16) + ' bytes')\n }\n return length | 0\n}\n\nfunction SlowBuffer (length) {\n if (+length != length) { // eslint-disable-line eqeqeq\n length = 0\n }\n return Buffer.alloc(+length)\n}\n\nBuffer.isBuffer = function isBuffer (b) {\n return b != null && b._isBuffer === true &&\n b !== Buffer.prototype // so Buffer.isBuffer(Buffer.prototype) will be false\n}\n\nBuffer.compare = function compare (a, b) {\n if (isInstance(a, Uint8Array)) a = Buffer.from(a, a.offset, a.byteLength)\n if (isInstance(b, Uint8Array)) b = Buffer.from(b, b.offset, b.byteLength)\n if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n throw new TypeError(\n 'The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array'\n )\n }\n\n if (a === b) return 0\n\n let x = a.length\n let y = b.length\n\n for (let i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i]\n y = b[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n switch (String(encoding).toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'latin1':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return true\n default:\n return false\n }\n}\n\nBuffer.concat = function concat (list, length) {\n if (!Array.isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n\n if (list.length === 0) {\n return Buffer.alloc(0)\n }\n\n let i\n if (length === undefined) {\n length = 0\n for (i = 0; i < list.length; ++i) {\n length += list[i].length\n }\n }\n\n const buffer = Buffer.allocUnsafe(length)\n let pos = 0\n for (i = 0; i < list.length; ++i) {\n let buf = list[i]\n if (isInstance(buf, Uint8Array)) {\n if (pos + buf.length > buffer.length) {\n if (!Buffer.isBuffer(buf)) buf = Buffer.from(buf)\n buf.copy(buffer, pos)\n } else {\n Uint8Array.prototype.set.call(\n buffer,\n buf,\n pos\n )\n }\n } else if (!Buffer.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n } else {\n buf.copy(buffer, pos)\n }\n pos += buf.length\n }\n return buffer\n}\n\nfunction byteLength (string, encoding) {\n if (Buffer.isBuffer(string)) {\n return string.length\n }\n if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) {\n return string.byteLength\n }\n if (typeof string !== 'string') {\n throw new TypeError(\n 'The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. ' +\n 'Received type ' + typeof string\n )\n }\n\n const len = string.length\n const mustMatch = (arguments.length > 2 && arguments[2] === true)\n if (!mustMatch && len === 0) return 0\n\n // Use a for loop to avoid recursion\n let loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'ascii':\n case 'latin1':\n case 'binary':\n return len\n case 'utf8':\n case 'utf-8':\n return utf8ToBytes(string).length\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return len * 2\n case 'hex':\n return len >>> 1\n case 'base64':\n return base64ToBytes(string).length\n default:\n if (loweredCase) {\n return mustMatch ? -1 : utf8ToBytes(string).length // assume utf8\n }\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n let loweredCase = false\n\n // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n // property of a typed array.\n\n // This behaves neither like String nor Uint8Array in that we set start/end\n // to their upper/lower bounds if the value passed is out of range.\n // undefined is handled specially as per ECMA-262 6th Edition,\n // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n if (start === undefined || start < 0) {\n start = 0\n }\n // Return early if start > this.length. Done here to prevent potential uint32\n // coercion fail below.\n if (start > this.length) {\n return ''\n }\n\n if (end === undefined || end > this.length) {\n end = this.length\n }\n\n if (end <= 0) {\n return ''\n }\n\n // Force coercion to uint32. This will also coerce falsey/NaN values to 0.\n end >>>= 0\n start >>>= 0\n\n if (end <= start) {\n return ''\n }\n\n if (!encoding) encoding = 'utf8'\n\n while (true) {\n switch (encoding) {\n case 'hex':\n return hexSlice(this, start, end)\n\n case 'utf8':\n case 'utf-8':\n return utf8Slice(this, start, end)\n\n case 'ascii':\n return asciiSlice(this, start, end)\n\n case 'latin1':\n case 'binary':\n return latin1Slice(this, start, end)\n\n case 'base64':\n return base64Slice(this, start, end)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return utf16leSlice(this, start, end)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = (encoding + '').toLowerCase()\n loweredCase = true\n }\n }\n}\n\n// This property is used by `Buffer.isBuffer` (and the `is-buffer` npm package)\n// to detect a Buffer instance. It's not possible to use `instanceof Buffer`\n// reliably in a browserify context because there could be multiple different\n// copies of the 'buffer' package in use. This method works even for Buffer\n// instances that were created from another copy of the `buffer` package.\n// See: https://github.com/feross/buffer/issues/154\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n const i = b[n]\n b[n] = b[m]\n b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n const len = this.length\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits')\n }\n for (let i = 0; i < len; i += 2) {\n swap(this, i, i + 1)\n }\n return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n const len = this.length\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits')\n }\n for (let i = 0; i < len; i += 4) {\n swap(this, i, i + 3)\n swap(this, i + 1, i + 2)\n }\n return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n const len = this.length\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits')\n }\n for (let i = 0; i < len; i += 8) {\n swap(this, i, i + 7)\n swap(this, i + 1, i + 6)\n swap(this, i + 2, i + 5)\n swap(this, i + 3, i + 4)\n }\n return this\n}\n\nBuffer.prototype.toString = function toString () {\n const length = this.length\n if (length === 0) return ''\n if (arguments.length === 0) return utf8Slice(this, 0, length)\n return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.toLocaleString = Buffer.prototype.toString\n\nBuffer.prototype.equals = function equals (b) {\n if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n if (this === b) return true\n return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n let str = ''\n const max = exports.INSPECT_MAX_BYTES\n str = this.toString('hex', 0, max).replace(/(.{2})/g, '$1 ').trim()\n if (this.length > max) str += ' ... '\n return ''\n}\nif (customInspectSymbol) {\n Buffer.prototype[customInspectSymbol] = Buffer.prototype.inspect\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n if (isInstance(target, Uint8Array)) {\n target = Buffer.from(target, target.offset, target.byteLength)\n }\n if (!Buffer.isBuffer(target)) {\n throw new TypeError(\n 'The \"target\" argument must be one of type Buffer or Uint8Array. ' +\n 'Received type ' + (typeof target)\n )\n }\n\n if (start === undefined) {\n start = 0\n }\n if (end === undefined) {\n end = target ? target.length : 0\n }\n if (thisStart === undefined) {\n thisStart = 0\n }\n if (thisEnd === undefined) {\n thisEnd = this.length\n }\n\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError('out of range index')\n }\n\n if (thisStart >= thisEnd && start >= end) {\n return 0\n }\n if (thisStart >= thisEnd) {\n return -1\n }\n if (start >= end) {\n return 1\n }\n\n start >>>= 0\n end >>>= 0\n thisStart >>>= 0\n thisEnd >>>= 0\n\n if (this === target) return 0\n\n let x = thisEnd - thisStart\n let y = end - start\n const len = Math.min(x, y)\n\n const thisCopy = this.slice(thisStart, thisEnd)\n const targetCopy = target.slice(start, end)\n\n for (let i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i]\n y = targetCopy[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (numberIsNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [val], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n let indexSize = 1\n let arrLength = arr.length\n let valLength = val.length\n\n if (encoding !== undefined) {\n encoding = String(encoding).toLowerCase()\n if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n encoding === 'utf16le' || encoding === 'utf-16le') {\n if (arr.length < 2 || val.length < 2) {\n return -1\n }\n indexSize = 2\n arrLength /= 2\n valLength /= 2\n byteOffset /= 2\n }\n }\n\n function read (buf, i) {\n if (indexSize === 1) {\n return buf[i]\n } else {\n return buf.readUInt16BE(i * indexSize)\n }\n }\n\n let i\n if (dir) {\n let foundIndex = -1\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1) foundIndex = i\n if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n } else {\n if (foundIndex !== -1) i -= i - foundIndex\n foundIndex = -1\n }\n }\n } else {\n if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n for (i = byteOffset; i >= 0; i--) {\n let found = true\n for (let j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false\n break\n }\n }\n if (found) return i\n }\n }\n\n return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n offset = Number(offset) || 0\n const remaining = buf.length - offset\n if (!length) {\n length = remaining\n } else {\n length = Number(length)\n if (length > remaining) {\n length = remaining\n }\n }\n\n const strLen = string.length\n\n if (length > strLen / 2) {\n length = strLen / 2\n }\n let i\n for (i = 0; i < length; ++i) {\n const parsed = parseInt(string.substr(i * 2, 2), 16)\n if (numberIsNaN(parsed)) return i\n buf[offset + i] = parsed\n }\n return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n // Buffer#write(string)\n if (offset === undefined) {\n encoding = 'utf8'\n length = this.length\n offset = 0\n // Buffer#write(string, encoding)\n } else if (length === undefined && typeof offset === 'string') {\n encoding = offset\n length = this.length\n offset = 0\n // Buffer#write(string, offset[, length][, encoding])\n } else if (isFinite(offset)) {\n offset = offset >>> 0\n if (isFinite(length)) {\n length = length >>> 0\n if (encoding === undefined) encoding = 'utf8'\n } else {\n encoding = length\n length = undefined\n }\n } else {\n throw new Error(\n 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n )\n }\n\n const remaining = this.length - offset\n if (length === undefined || length > remaining) length = remaining\n\n if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n throw new RangeError('Attempt to write outside buffer bounds')\n }\n\n if (!encoding) encoding = 'utf8'\n\n let loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'hex':\n return hexWrite(this, string, offset, length)\n\n case 'utf8':\n case 'utf-8':\n return utf8Write(this, string, offset, length)\n\n case 'ascii':\n case 'latin1':\n case 'binary':\n return asciiWrite(this, string, offset, length)\n\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return base64Write(this, string, offset, length)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return ucs2Write(this, string, offset, length)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0)\n }\n}\n\nfunction base64Slice (buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf)\n } else {\n return base64.fromByteArray(buf.slice(start, end))\n }\n}\n\nfunction utf8Slice (buf, start, end) {\n end = Math.min(buf.length, end)\n const res = []\n\n let i = start\n while (i < end) {\n const firstByte = buf[i]\n let codePoint = null\n let bytesPerSequence = (firstByte > 0xEF)\n ? 4\n : (firstByte > 0xDF)\n ? 3\n : (firstByte > 0xBF)\n ? 2\n : 1\n\n if (i + bytesPerSequence <= end) {\n let secondByte, thirdByte, fourthByte, tempCodePoint\n\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 0x80) {\n codePoint = firstByte\n }\n break\n case 2:\n secondByte = buf[i + 1]\n if ((secondByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n if (tempCodePoint > 0x7F) {\n codePoint = tempCodePoint\n }\n }\n break\n case 3:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n codePoint = tempCodePoint\n }\n }\n break\n case 4:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n fourthByte = buf[i + 3]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n codePoint = tempCodePoint\n }\n }\n }\n }\n\n if (codePoint === null) {\n // we did not generate a valid codePoint so insert a\n // replacement char (U+FFFD) and advance only 1 byte\n codePoint = 0xFFFD\n bytesPerSequence = 1\n } else if (codePoint > 0xFFFF) {\n // encode to utf16 (surrogate pair dance)\n codePoint -= 0x10000\n res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n codePoint = 0xDC00 | codePoint & 0x3FF\n }\n\n res.push(codePoint)\n i += bytesPerSequence\n }\n\n return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nconst MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n const len = codePoints.length\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n }\n\n // Decode in chunks to avoid \"call stack size exceeded\".\n let res = ''\n let i = 0\n while (i < len) {\n res += String.fromCharCode.apply(\n String,\n codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n )\n }\n return res\n}\n\nfunction asciiSlice (buf, start, end) {\n let ret = ''\n end = Math.min(buf.length, end)\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F)\n }\n return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n let ret = ''\n end = Math.min(buf.length, end)\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i])\n }\n return ret\n}\n\nfunction hexSlice (buf, start, end) {\n const len = buf.length\n\n if (!start || start < 0) start = 0\n if (!end || end < 0 || end > len) end = len\n\n let out = ''\n for (let i = start; i < end; ++i) {\n out += hexSliceLookupTable[buf[i]]\n }\n return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n const bytes = buf.slice(start, end)\n let res = ''\n // If bytes.length is odd, the last 8 bits must be ignored (same as node.js)\n for (let i = 0; i < bytes.length - 1; i += 2) {\n res += String.fromCharCode(bytes[i] + (bytes[i + 1] * 256))\n }\n return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n const len = this.length\n start = ~~start\n end = end === undefined ? len : ~~end\n\n if (start < 0) {\n start += len\n if (start < 0) start = 0\n } else if (start > len) {\n start = len\n }\n\n if (end < 0) {\n end += len\n if (end < 0) end = 0\n } else if (end > len) {\n end = len\n }\n\n if (end < start) end = start\n\n const newBuf = this.subarray(start, end)\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(newBuf, Buffer.prototype)\n\n return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUintLE =\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let val = this[offset]\n let mul = 1\n let i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUintBE =\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n checkOffset(offset, byteLength, this.length)\n }\n\n let val = this[offset + --byteLength]\n let mul = 1\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUint8 =\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n return this[offset]\n}\n\nBuffer.prototype.readUint16LE =\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUint16BE =\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUint32LE =\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return ((this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16)) +\n (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUint32BE =\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] * 0x1000000) +\n ((this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n this[offset + 3])\n}\n\nBuffer.prototype.readBigUInt64LE = defineBigIntMethod(function readBigUInt64LE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const lo = first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24\n\n const hi = this[++offset] +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n last * 2 ** 24\n\n return BigInt(lo) + (BigInt(hi) << BigInt(32))\n})\n\nBuffer.prototype.readBigUInt64BE = defineBigIntMethod(function readBigUInt64BE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const hi = first * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset]\n\n const lo = this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last\n\n return (BigInt(hi) << BigInt(32)) + BigInt(lo)\n})\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let val = this[offset]\n let mul = 1\n let i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let i = byteLength\n let mul = 1\n let val = this[offset + --i]\n while (i > 0 && (mul *= 0x100)) {\n val += this[offset + --i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n if (!(this[offset] & 0x80)) return (this[offset])\n return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n const val = this[offset] | (this[offset + 1] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n const val = this[offset + 1] | (this[offset] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16) |\n (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] << 24) |\n (this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n (this[offset + 3])\n}\n\nBuffer.prototype.readBigInt64LE = defineBigIntMethod(function readBigInt64LE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const val = this[offset + 4] +\n this[offset + 5] * 2 ** 8 +\n this[offset + 6] * 2 ** 16 +\n (last << 24) // Overflow\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24)\n})\n\nBuffer.prototype.readBigInt64BE = defineBigIntMethod(function readBigInt64BE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const val = (first << 24) + // Overflow\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset]\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last)\n})\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUintLE =\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n let mul = 1\n let i = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUintBE =\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n let i = byteLength - 1\n let mul = 1\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUint8 =\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeUint16LE =\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeUint16BE =\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeUint32LE =\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset + 3] = (value >>> 24)\n this[offset + 2] = (value >>> 16)\n this[offset + 1] = (value >>> 8)\n this[offset] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeUint32BE =\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nfunction wrtBigUInt64LE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7)\n\n let lo = Number(value & BigInt(0xffffffff))\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n return offset\n}\n\nfunction wrtBigUInt64BE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7)\n\n let lo = Number(value & BigInt(0xffffffff))\n buf[offset + 7] = lo\n lo = lo >> 8\n buf[offset + 6] = lo\n lo = lo >> 8\n buf[offset + 5] = lo\n lo = lo >> 8\n buf[offset + 4] = lo\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n buf[offset + 3] = hi\n hi = hi >> 8\n buf[offset + 2] = hi\n hi = hi >> 8\n buf[offset + 1] = hi\n hi = hi >> 8\n buf[offset] = hi\n return offset + 8\n}\n\nBuffer.prototype.writeBigUInt64LE = defineBigIntMethod(function writeBigUInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeBigUInt64BE = defineBigIntMethod(function writeBigUInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n let i = 0\n let mul = 1\n let sub = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n let i = byteLength - 1\n let mul = 1\n let sub = 0\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n if (value < 0) value = 0xff + value + 1\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n this[offset + 2] = (value >>> 16)\n this[offset + 3] = (value >>> 24)\n return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (value < 0) value = 0xffffffff + value + 1\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeBigInt64LE = defineBigIntMethod(function writeBigInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nBuffer.prototype.writeBigInt64BE = defineBigIntMethod(function writeBigInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n }\n ieee754.write(buf, value, offset, littleEndian, 23, 4)\n return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n }\n ieee754.write(buf, value, offset, littleEndian, 52, 8)\n return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n if (!Buffer.isBuffer(target)) throw new TypeError('argument should be a Buffer')\n if (!start) start = 0\n if (!end && end !== 0) end = this.length\n if (targetStart >= target.length) targetStart = target.length\n if (!targetStart) targetStart = 0\n if (end > 0 && end < start) end = start\n\n // Copy 0 bytes; we're done\n if (end === start) return 0\n if (target.length === 0 || this.length === 0) return 0\n\n // Fatal error conditions\n if (targetStart < 0) {\n throw new RangeError('targetStart out of bounds')\n }\n if (start < 0 || start >= this.length) throw new RangeError('Index out of range')\n if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n // Are we oob?\n if (end > this.length) end = this.length\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start\n }\n\n const len = end - start\n\n if (this === target && typeof Uint8Array.prototype.copyWithin === 'function') {\n // Use built-in when available, missing from IE11\n this.copyWithin(targetStart, start, end)\n } else {\n Uint8Array.prototype.set.call(\n target,\n this.subarray(start, end),\n targetStart\n )\n }\n\n return len\n}\n\n// Usage:\n// buffer.fill(number[, offset[, end]])\n// buffer.fill(buffer[, offset[, end]])\n// buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n // Handle string cases:\n if (typeof val === 'string') {\n if (typeof start === 'string') {\n encoding = start\n start = 0\n end = this.length\n } else if (typeof end === 'string') {\n encoding = end\n end = this.length\n }\n if (encoding !== undefined && typeof encoding !== 'string') {\n throw new TypeError('encoding must be a string')\n }\n if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n if (val.length === 1) {\n const code = val.charCodeAt(0)\n if ((encoding === 'utf8' && code < 128) ||\n encoding === 'latin1') {\n // Fast path: If `val` fits into a single byte, use that numeric value.\n val = code\n }\n }\n } else if (typeof val === 'number') {\n val = val & 255\n } else if (typeof val === 'boolean') {\n val = Number(val)\n }\n\n // Invalid ranges are not set to a default, so can range check early.\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError('Out of range index')\n }\n\n if (end <= start) {\n return this\n }\n\n start = start >>> 0\n end = end === undefined ? this.length : end >>> 0\n\n if (!val) val = 0\n\n let i\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val\n }\n } else {\n const bytes = Buffer.isBuffer(val)\n ? val\n : Buffer.from(val, encoding)\n const len = bytes.length\n if (len === 0) {\n throw new TypeError('The value \"' + val +\n '\" is invalid for argument \"value\"')\n }\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len]\n }\n }\n\n return this\n}\n\n// CUSTOM ERRORS\n// =============\n\n// Simplified versions from Node, changed for Buffer-only usage\nconst errors = {}\nfunction E (sym, getMessage, Base) {\n errors[sym] = class NodeError extends Base {\n constructor () {\n super()\n\n Object.defineProperty(this, 'message', {\n value: getMessage.apply(this, arguments),\n writable: true,\n configurable: true\n })\n\n // Add the error code to the name to include it in the stack trace.\n this.name = `${this.name} [${sym}]`\n // Access the stack to generate the error message including the error code\n // from the name.\n this.stack // eslint-disable-line no-unused-expressions\n // Reset the name to the actual name.\n delete this.name\n }\n\n get code () {\n return sym\n }\n\n set code (value) {\n Object.defineProperty(this, 'code', {\n configurable: true,\n enumerable: true,\n value,\n writable: true\n })\n }\n\n toString () {\n return `${this.name} [${sym}]: ${this.message}`\n }\n }\n}\n\nE('ERR_BUFFER_OUT_OF_BOUNDS',\n function (name) {\n if (name) {\n return `${name} is outside of buffer bounds`\n }\n\n return 'Attempt to access memory outside buffer bounds'\n }, RangeError)\nE('ERR_INVALID_ARG_TYPE',\n function (name, actual) {\n return `The \"${name}\" argument must be of type number. Received type ${typeof actual}`\n }, TypeError)\nE('ERR_OUT_OF_RANGE',\n function (str, range, input) {\n let msg = `The value of \"${str}\" is out of range.`\n let received = input\n if (Number.isInteger(input) && Math.abs(input) > 2 ** 32) {\n received = addNumericalSeparator(String(input))\n } else if (typeof input === 'bigint') {\n received = String(input)\n if (input > BigInt(2) ** BigInt(32) || input < -(BigInt(2) ** BigInt(32))) {\n received = addNumericalSeparator(received)\n }\n received += 'n'\n }\n msg += ` It must be ${range}. Received ${received}`\n return msg\n }, RangeError)\n\nfunction addNumericalSeparator (val) {\n let res = ''\n let i = val.length\n const start = val[0] === '-' ? 1 : 0\n for (; i >= start + 4; i -= 3) {\n res = `_${val.slice(i - 3, i)}${res}`\n }\n return `${val.slice(0, i)}${res}`\n}\n\n// CHECK FUNCTIONS\n// ===============\n\nfunction checkBounds (buf, offset, byteLength) {\n validateNumber(offset, 'offset')\n if (buf[offset] === undefined || buf[offset + byteLength] === undefined) {\n boundsError(offset, buf.length - (byteLength + 1))\n }\n}\n\nfunction checkIntBI (value, min, max, buf, offset, byteLength) {\n if (value > max || value < min) {\n const n = typeof min === 'bigint' ? 'n' : ''\n let range\n if (byteLength > 3) {\n if (min === 0 || min === BigInt(0)) {\n range = `>= 0${n} and < 2${n} ** ${(byteLength + 1) * 8}${n}`\n } else {\n range = `>= -(2${n} ** ${(byteLength + 1) * 8 - 1}${n}) and < 2 ** ` +\n `${(byteLength + 1) * 8 - 1}${n}`\n }\n } else {\n range = `>= ${min}${n} and <= ${max}${n}`\n }\n throw new errors.ERR_OUT_OF_RANGE('value', range, value)\n }\n checkBounds(buf, offset, byteLength)\n}\n\nfunction validateNumber (value, name) {\n if (typeof value !== 'number') {\n throw new errors.ERR_INVALID_ARG_TYPE(name, 'number', value)\n }\n}\n\nfunction boundsError (value, length, type) {\n if (Math.floor(value) !== value) {\n validateNumber(value, type)\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset', 'an integer', value)\n }\n\n if (length < 0) {\n throw new errors.ERR_BUFFER_OUT_OF_BOUNDS()\n }\n\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset',\n `>= ${type ? 1 : 0} and <= ${length}`,\n value)\n}\n\n// HELPER FUNCTIONS\n// ================\n\nconst INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n // Node takes equal signs as end of the Base64 encoding\n str = str.split('=')[0]\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = str.trim().replace(INVALID_BASE64_RE, '')\n // Node converts strings with length < 2 to ''\n if (str.length < 2) return ''\n // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n while (str.length % 4 !== 0) {\n str = str + '='\n }\n return str\n}\n\nfunction utf8ToBytes (string, units) {\n units = units || Infinity\n let codePoint\n const length = string.length\n let leadSurrogate = null\n const bytes = []\n\n for (let i = 0; i < length; ++i) {\n codePoint = string.charCodeAt(i)\n\n // is surrogate component\n if (codePoint > 0xD7FF && codePoint < 0xE000) {\n // last char was a lead\n if (!leadSurrogate) {\n // no lead yet\n if (codePoint > 0xDBFF) {\n // unexpected trail\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n } else if (i + 1 === length) {\n // unpaired lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n }\n\n // valid lead\n leadSurrogate = codePoint\n\n continue\n }\n\n // 2 leads in a row\n if (codePoint < 0xDC00) {\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n leadSurrogate = codePoint\n continue\n }\n\n // valid surrogate pair\n codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n } else if (leadSurrogate) {\n // valid bmp char, but last char was a lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n }\n\n leadSurrogate = null\n\n // encode utf8\n if (codePoint < 0x80) {\n if ((units -= 1) < 0) break\n bytes.push(codePoint)\n } else if (codePoint < 0x800) {\n if ((units -= 2) < 0) break\n bytes.push(\n codePoint >> 0x6 | 0xC0,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x10000) {\n if ((units -= 3) < 0) break\n bytes.push(\n codePoint >> 0xC | 0xE0,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x110000) {\n if ((units -= 4) < 0) break\n bytes.push(\n codePoint >> 0x12 | 0xF0,\n codePoint >> 0xC & 0x3F | 0x80,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else {\n throw new Error('Invalid code point')\n }\n }\n\n return bytes\n}\n\nfunction asciiToBytes (str) {\n const byteArray = []\n for (let i = 0; i < str.length; ++i) {\n // Node's code seems to be doing this and not & 0x7F..\n byteArray.push(str.charCodeAt(i) & 0xFF)\n }\n return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n let c, hi, lo\n const byteArray = []\n for (let i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0) break\n\n c = str.charCodeAt(i)\n hi = c >> 8\n lo = c % 256\n byteArray.push(lo)\n byteArray.push(hi)\n }\n\n return byteArray\n}\n\nfunction base64ToBytes (str) {\n return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n let i\n for (i = 0; i < length; ++i) {\n if ((i + offset >= dst.length) || (i >= src.length)) break\n dst[i + offset] = src[i]\n }\n return i\n}\n\n// ArrayBuffer or Uint8Array objects from other contexts (i.e. iframes) do not pass\n// the `instanceof` check but they should be treated as of that type.\n// See: https://github.com/feross/buffer/issues/166\nfunction isInstance (obj, type) {\n return obj instanceof type ||\n (obj != null && obj.constructor != null && obj.constructor.name != null &&\n obj.constructor.name === type.name)\n}\nfunction numberIsNaN (obj) {\n // For IE11 support\n return obj !== obj // eslint-disable-line no-self-compare\n}\n\n// Create lookup table for `toString('hex')`\n// See: https://github.com/feross/buffer/issues/219\nconst hexSliceLookupTable = (function () {\n const alphabet = '0123456789abcdef'\n const table = new Array(256)\n for (let i = 0; i < 16; ++i) {\n const i16 = i * 16\n for (let j = 0; j < 16; ++j) {\n table[i16 + j] = alphabet[i] + alphabet[j]\n }\n }\n return table\n})()\n\n// Return not function with Error if BigInt not supported\nfunction defineBigIntMethod (fn) {\n return typeof BigInt === 'undefined' ? BufferBigIntNotDefined : fn\n}\n\nfunction BufferBigIntNotDefined () {\n throw new Error('BigInt not supported')\n}\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\nvar R = typeof Reflect === 'object' ? Reflect : null\nvar ReflectApply = R && typeof R.apply === 'function'\n ? R.apply\n : function ReflectApply(target, receiver, args) {\n return Function.prototype.apply.call(target, receiver, args);\n }\n\nvar ReflectOwnKeys\nif (R && typeof R.ownKeys === 'function') {\n ReflectOwnKeys = R.ownKeys\n} else if (Object.getOwnPropertySymbols) {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target)\n .concat(Object.getOwnPropertySymbols(target));\n };\n} else {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target);\n };\n}\n\nfunction ProcessEmitWarning(warning) {\n if (console && console.warn) console.warn(warning);\n}\n\nvar NumberIsNaN = Number.isNaN || function NumberIsNaN(value) {\n return value !== value;\n}\n\nfunction EventEmitter() {\n EventEmitter.init.call(this);\n}\nmodule.exports = EventEmitter;\nmodule.exports.once = once;\n\n// Backwards-compat with node 0.10.x\nEventEmitter.EventEmitter = EventEmitter;\n\nEventEmitter.prototype._events = undefined;\nEventEmitter.prototype._eventsCount = 0;\nEventEmitter.prototype._maxListeners = undefined;\n\n// By default EventEmitters will print a warning if more than 10 listeners are\n// added to it. This is a useful default which helps finding memory leaks.\nvar defaultMaxListeners = 10;\n\nfunction checkListener(listener) {\n if (typeof listener !== 'function') {\n throw new TypeError('The \"listener\" argument must be of type Function. Received type ' + typeof listener);\n }\n}\n\nObject.defineProperty(EventEmitter, 'defaultMaxListeners', {\n enumerable: true,\n get: function() {\n return defaultMaxListeners;\n },\n set: function(arg) {\n if (typeof arg !== 'number' || arg < 0 || NumberIsNaN(arg)) {\n throw new RangeError('The value of \"defaultMaxListeners\" is out of range. It must be a non-negative number. Received ' + arg + '.');\n }\n defaultMaxListeners = arg;\n }\n});\n\nEventEmitter.init = function() {\n\n if (this._events === undefined ||\n this._events === Object.getPrototypeOf(this)._events) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n }\n\n this._maxListeners = this._maxListeners || undefined;\n};\n\n// Obviously not all Emitters should be limited to 10. This function allows\n// that to be increased. Set to zero for unlimited.\nEventEmitter.prototype.setMaxListeners = function setMaxListeners(n) {\n if (typeof n !== 'number' || n < 0 || NumberIsNaN(n)) {\n throw new RangeError('The value of \"n\" is out of range. It must be a non-negative number. Received ' + n + '.');\n }\n this._maxListeners = n;\n return this;\n};\n\nfunction _getMaxListeners(that) {\n if (that._maxListeners === undefined)\n return EventEmitter.defaultMaxListeners;\n return that._maxListeners;\n}\n\nEventEmitter.prototype.getMaxListeners = function getMaxListeners() {\n return _getMaxListeners(this);\n};\n\nEventEmitter.prototype.emit = function emit(type) {\n var args = [];\n for (var i = 1; i < arguments.length; i++) args.push(arguments[i]);\n var doError = (type === 'error');\n\n var events = this._events;\n if (events !== undefined)\n doError = (doError && events.error === undefined);\n else if (!doError)\n return false;\n\n // If there is no 'error' event listener then throw.\n if (doError) {\n var er;\n if (args.length > 0)\n er = args[0];\n if (er instanceof Error) {\n // Note: The comments on the `throw` lines are intentional, they show\n // up in Node's output if this results in an unhandled exception.\n throw er; // Unhandled 'error' event\n }\n // At least give some kind of context to the user\n var err = new Error('Unhandled error.' + (er ? ' (' + er.message + ')' : ''));\n err.context = er;\n throw err; // Unhandled 'error' event\n }\n\n var handler = events[type];\n\n if (handler === undefined)\n return false;\n\n if (typeof handler === 'function') {\n ReflectApply(handler, this, args);\n } else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n ReflectApply(listeners[i], this, args);\n }\n\n return true;\n};\n\nfunction _addListener(target, type, listener, prepend) {\n var m;\n var events;\n var existing;\n\n checkListener(listener);\n\n events = target._events;\n if (events === undefined) {\n events = target._events = Object.create(null);\n target._eventsCount = 0;\n } else {\n // To avoid recursion in the case that type === \"newListener\"! Before\n // adding it to the listeners, first emit \"newListener\".\n if (events.newListener !== undefined) {\n target.emit('newListener', type,\n listener.listener ? listener.listener : listener);\n\n // Re-assign `events` because a newListener handler could have caused the\n // this._events to be assigned to a new object\n events = target._events;\n }\n existing = events[type];\n }\n\n if (existing === undefined) {\n // Optimize the case of one listener. Don't need the extra array object.\n existing = events[type] = listener;\n ++target._eventsCount;\n } else {\n if (typeof existing === 'function') {\n // Adding the second element, need to change to array.\n existing = events[type] =\n prepend ? [listener, existing] : [existing, listener];\n // If we've already got an array, just append.\n } else if (prepend) {\n existing.unshift(listener);\n } else {\n existing.push(listener);\n }\n\n // Check for listener leak\n m = _getMaxListeners(target);\n if (m > 0 && existing.length > m && !existing.warned) {\n existing.warned = true;\n // No error code for this since it is a Warning\n // eslint-disable-next-line no-restricted-syntax\n var w = new Error('Possible EventEmitter memory leak detected. ' +\n existing.length + ' ' + String(type) + ' listeners ' +\n 'added. Use emitter.setMaxListeners() to ' +\n 'increase limit');\n w.name = 'MaxListenersExceededWarning';\n w.emitter = target;\n w.type = type;\n w.count = existing.length;\n ProcessEmitWarning(w);\n }\n }\n\n return target;\n}\n\nEventEmitter.prototype.addListener = function addListener(type, listener) {\n return _addListener(this, type, listener, false);\n};\n\nEventEmitter.prototype.on = EventEmitter.prototype.addListener;\n\nEventEmitter.prototype.prependListener =\n function prependListener(type, listener) {\n return _addListener(this, type, listener, true);\n };\n\nfunction onceWrapper() {\n if (!this.fired) {\n this.target.removeListener(this.type, this.wrapFn);\n this.fired = true;\n if (arguments.length === 0)\n return this.listener.call(this.target);\n return this.listener.apply(this.target, arguments);\n }\n}\n\nfunction _onceWrap(target, type, listener) {\n var state = { fired: false, wrapFn: undefined, target: target, type: type, listener: listener };\n var wrapped = onceWrapper.bind(state);\n wrapped.listener = listener;\n state.wrapFn = wrapped;\n return wrapped;\n}\n\nEventEmitter.prototype.once = function once(type, listener) {\n checkListener(listener);\n this.on(type, _onceWrap(this, type, listener));\n return this;\n};\n\nEventEmitter.prototype.prependOnceListener =\n function prependOnceListener(type, listener) {\n checkListener(listener);\n this.prependListener(type, _onceWrap(this, type, listener));\n return this;\n };\n\n// Emits a 'removeListener' event if and only if the listener was removed.\nEventEmitter.prototype.removeListener =\n function removeListener(type, listener) {\n var list, events, position, i, originalListener;\n\n checkListener(listener);\n\n events = this._events;\n if (events === undefined)\n return this;\n\n list = events[type];\n if (list === undefined)\n return this;\n\n if (list === listener || list.listener === listener) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else {\n delete events[type];\n if (events.removeListener)\n this.emit('removeListener', type, list.listener || listener);\n }\n } else if (typeof list !== 'function') {\n position = -1;\n\n for (i = list.length - 1; i >= 0; i--) {\n if (list[i] === listener || list[i].listener === listener) {\n originalListener = list[i].listener;\n position = i;\n break;\n }\n }\n\n if (position < 0)\n return this;\n\n if (position === 0)\n list.shift();\n else {\n spliceOne(list, position);\n }\n\n if (list.length === 1)\n events[type] = list[0];\n\n if (events.removeListener !== undefined)\n this.emit('removeListener', type, originalListener || listener);\n }\n\n return this;\n };\n\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\n\nEventEmitter.prototype.removeAllListeners =\n function removeAllListeners(type) {\n var listeners, events, i;\n\n events = this._events;\n if (events === undefined)\n return this;\n\n // not listening for removeListener, no need to emit\n if (events.removeListener === undefined) {\n if (arguments.length === 0) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n } else if (events[type] !== undefined) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else\n delete events[type];\n }\n return this;\n }\n\n // emit removeListener for all listeners on all events\n if (arguments.length === 0) {\n var keys = Object.keys(events);\n var key;\n for (i = 0; i < keys.length; ++i) {\n key = keys[i];\n if (key === 'removeListener') continue;\n this.removeAllListeners(key);\n }\n this.removeAllListeners('removeListener');\n this._events = Object.create(null);\n this._eventsCount = 0;\n return this;\n }\n\n listeners = events[type];\n\n if (typeof listeners === 'function') {\n this.removeListener(type, listeners);\n } else if (listeners !== undefined) {\n // LIFO order\n for (i = listeners.length - 1; i >= 0; i--) {\n this.removeListener(type, listeners[i]);\n }\n }\n\n return this;\n };\n\nfunction _listeners(target, type, unwrap) {\n var events = target._events;\n\n if (events === undefined)\n return [];\n\n var evlistener = events[type];\n if (evlistener === undefined)\n return [];\n\n if (typeof evlistener === 'function')\n return unwrap ? [evlistener.listener || evlistener] : [evlistener];\n\n return unwrap ?\n unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length);\n}\n\nEventEmitter.prototype.listeners = function listeners(type) {\n return _listeners(this, type, true);\n};\n\nEventEmitter.prototype.rawListeners = function rawListeners(type) {\n return _listeners(this, type, false);\n};\n\nEventEmitter.listenerCount = function(emitter, type) {\n if (typeof emitter.listenerCount === 'function') {\n return emitter.listenerCount(type);\n } else {\n return listenerCount.call(emitter, type);\n }\n};\n\nEventEmitter.prototype.listenerCount = listenerCount;\nfunction listenerCount(type) {\n var events = this._events;\n\n if (events !== undefined) {\n var evlistener = events[type];\n\n if (typeof evlistener === 'function') {\n return 1;\n } else if (evlistener !== undefined) {\n return evlistener.length;\n }\n }\n\n return 0;\n}\n\nEventEmitter.prototype.eventNames = function eventNames() {\n return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : [];\n};\n\nfunction arrayClone(arr, n) {\n var copy = new Array(n);\n for (var i = 0; i < n; ++i)\n copy[i] = arr[i];\n return copy;\n}\n\nfunction spliceOne(list, index) {\n for (; index + 1 < list.length; index++)\n list[index] = list[index + 1];\n list.pop();\n}\n\nfunction unwrapListeners(arr) {\n var ret = new Array(arr.length);\n for (var i = 0; i < ret.length; ++i) {\n ret[i] = arr[i].listener || arr[i];\n }\n return ret;\n}\n\nfunction once(emitter, name) {\n return new Promise(function (resolve, reject) {\n function errorListener(err) {\n emitter.removeListener(name, resolver);\n reject(err);\n }\n\n function resolver() {\n if (typeof emitter.removeListener === 'function') {\n emitter.removeListener('error', errorListener);\n }\n resolve([].slice.call(arguments));\n };\n\n eventTargetAgnosticAddListener(emitter, name, resolver, { once: true });\n if (name !== 'error') {\n addErrorHandlerIfEventEmitter(emitter, errorListener, { once: true });\n }\n });\n}\n\nfunction addErrorHandlerIfEventEmitter(emitter, handler, flags) {\n if (typeof emitter.on === 'function') {\n eventTargetAgnosticAddListener(emitter, 'error', handler, flags);\n }\n}\n\nfunction eventTargetAgnosticAddListener(emitter, name, listener, flags) {\n if (typeof emitter.on === 'function') {\n if (flags.once) {\n emitter.once(name, listener);\n } else {\n emitter.on(name, listener);\n }\n } else if (typeof emitter.addEventListener === 'function') {\n // EventTarget does not have `error` event semantics like Node\n // EventEmitters, we do not listen for `error` events here.\n emitter.addEventListener(name, function wrapListener(arg) {\n // IE does not have builtin `{ once: true }` support so we\n // have to do it manually.\n if (flags.once) {\n emitter.removeEventListener(name, wrapListener);\n }\n listener(arg);\n });\n } else {\n throw new TypeError('The \"emitter\" argument must be of type EventEmitter. Received type ' + typeof emitter);\n }\n}\n","/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */\nexports.read = function (buffer, offset, isLE, mLen, nBytes) {\n var e, m\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var nBits = -7\n var i = isLE ? (nBytes - 1) : 0\n var d = isLE ? -1 : 1\n var s = buffer[offset + i]\n\n i += d\n\n e = s & ((1 << (-nBits)) - 1)\n s >>= (-nBits)\n nBits += eLen\n for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & ((1 << (-nBits)) - 1)\n e >>= (-nBits)\n nBits += mLen\n for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias\n } else if (e === eMax) {\n return m ? NaN : ((s ? -1 : 1) * Infinity)\n } else {\n m = m + Math.pow(2, mLen)\n e = e - eBias\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n var i = isLE ? 0 : (nBytes - 1)\n var d = isLE ? 1 : -1\n var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n value = Math.abs(value)\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0\n e = eMax\n } else {\n e = Math.floor(Math.log(value) / Math.LN2)\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--\n c *= 2\n }\n if (e + eBias >= 1) {\n value += rt / c\n } else {\n value += rt * Math.pow(2, 1 - eBias)\n }\n if (value * c >= 2) {\n e++\n c /= 2\n }\n\n if (e + eBias >= eMax) {\n m = 0\n e = eMax\n } else if (e + eBias >= 1) {\n m = ((value * c) - 1) * Math.pow(2, mLen)\n e = e + eBias\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n e = 0\n }\n }\n\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n e = (e << mLen) | m\n eLen += mLen\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128\n}\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView');\n\nmodule.exports = DataView;\n","var hashClear = require('./_hashClear'),\n hashDelete = require('./_hashDelete'),\n hashGet = require('./_hashGet'),\n hashHas = require('./_hashHas'),\n hashSet = require('./_hashSet');\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\nmodule.exports = Hash;\n","var listCacheClear = require('./_listCacheClear'),\n listCacheDelete = require('./_listCacheDelete'),\n listCacheGet = require('./_listCacheGet'),\n listCacheHas = require('./_listCacheHas'),\n listCacheSet = require('./_listCacheSet');\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\nmodule.exports = ListCache;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map');\n\nmodule.exports = Map;\n","var mapCacheClear = require('./_mapCacheClear'),\n mapCacheDelete = require('./_mapCacheDelete'),\n mapCacheGet = require('./_mapCacheGet'),\n mapCacheHas = require('./_mapCacheHas'),\n mapCacheSet = require('./_mapCacheSet');\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\nmodule.exports = MapCache;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Promise = getNative(root, 'Promise');\n\nmodule.exports = Promise;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Set = getNative(root, 'Set');\n\nmodule.exports = Set;\n","var MapCache = require('./_MapCache'),\n setCacheAdd = require('./_setCacheAdd'),\n setCacheHas = require('./_setCacheHas');\n\n/**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\nfunction SetCache(values) {\n var index = -1,\n length = values == null ? 0 : values.length;\n\n this.__data__ = new MapCache;\n while (++index < length) {\n this.add(values[index]);\n }\n}\n\n// Add methods to `SetCache`.\nSetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\nSetCache.prototype.has = setCacheHas;\n\nmodule.exports = SetCache;\n","var ListCache = require('./_ListCache'),\n stackClear = require('./_stackClear'),\n stackDelete = require('./_stackDelete'),\n stackGet = require('./_stackGet'),\n stackHas = require('./_stackHas'),\n stackSet = require('./_stackSet');\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\nmodule.exports = Stack;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Uint8Array = root.Uint8Array;\n\nmodule.exports = Uint8Array;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar WeakMap = getNative(root, 'WeakMap');\n\nmodule.exports = WeakMap;\n","/**\n * A specialized version of `_.forEach` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\nfunction arrayEach(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (iteratee(array[index], index, array) === false) {\n break;\n }\n }\n return array;\n}\n\nmodule.exports = arrayEach;\n","/**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\nfunction arrayFilter(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result[resIndex++] = value;\n }\n }\n return result;\n}\n\nmodule.exports = arrayFilter;\n","var baseTimes = require('./_baseTimes'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isIndex = require('./_isIndex'),\n isTypedArray = require('./isTypedArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = arrayLikeKeys;\n","/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n}\n\nmodule.exports = arrayPush;\n","/**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\nfunction arraySome(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (predicate(array[index], index, array)) {\n return true;\n }\n }\n return false;\n}\n\nmodule.exports = arraySome;\n","var baseAssignValue = require('./_baseAssignValue'),\n eq = require('./eq');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\nmodule.exports = assignValue;\n","var eq = require('./eq');\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\nmodule.exports = assocIndexOf;\n","var copyObject = require('./_copyObject'),\n keys = require('./keys');\n\n/**\n * The base implementation of `_.assign` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssign(object, source) {\n return object && copyObject(source, keys(source), object);\n}\n\nmodule.exports = baseAssign;\n","var copyObject = require('./_copyObject'),\n keysIn = require('./keysIn');\n\n/**\n * The base implementation of `_.assignIn` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssignIn(object, source) {\n return object && copyObject(source, keysIn(source), object);\n}\n\nmodule.exports = baseAssignIn;\n","var defineProperty = require('./_defineProperty');\n\n/**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction baseAssignValue(object, key, value) {\n if (key == '__proto__' && defineProperty) {\n defineProperty(object, key, {\n 'configurable': true,\n 'enumerable': true,\n 'value': value,\n 'writable': true\n });\n } else {\n object[key] = value;\n }\n}\n\nmodule.exports = baseAssignValue;\n","var Stack = require('./_Stack'),\n arrayEach = require('./_arrayEach'),\n assignValue = require('./_assignValue'),\n baseAssign = require('./_baseAssign'),\n baseAssignIn = require('./_baseAssignIn'),\n cloneBuffer = require('./_cloneBuffer'),\n copyArray = require('./_copyArray'),\n copySymbols = require('./_copySymbols'),\n copySymbolsIn = require('./_copySymbolsIn'),\n getAllKeys = require('./_getAllKeys'),\n getAllKeysIn = require('./_getAllKeysIn'),\n getTag = require('./_getTag'),\n initCloneArray = require('./_initCloneArray'),\n initCloneByTag = require('./_initCloneByTag'),\n initCloneObject = require('./_initCloneObject'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isMap = require('./isMap'),\n isObject = require('./isObject'),\n isSet = require('./isSet'),\n keys = require('./keys'),\n keysIn = require('./keysIn');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_FLAT_FLAG = 2,\n CLONE_SYMBOLS_FLAG = 4;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values supported by `_.clone`. */\nvar cloneableTags = {};\ncloneableTags[argsTag] = cloneableTags[arrayTag] =\ncloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =\ncloneableTags[boolTag] = cloneableTags[dateTag] =\ncloneableTags[float32Tag] = cloneableTags[float64Tag] =\ncloneableTags[int8Tag] = cloneableTags[int16Tag] =\ncloneableTags[int32Tag] = cloneableTags[mapTag] =\ncloneableTags[numberTag] = cloneableTags[objectTag] =\ncloneableTags[regexpTag] = cloneableTags[setTag] =\ncloneableTags[stringTag] = cloneableTags[symbolTag] =\ncloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =\ncloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;\ncloneableTags[errorTag] = cloneableTags[funcTag] =\ncloneableTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.clone` and `_.cloneDeep` which tracks\n * traversed objects.\n *\n * @private\n * @param {*} value The value to clone.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Deep clone\n * 2 - Flatten inherited properties\n * 4 - Clone symbols\n * @param {Function} [customizer] The function to customize cloning.\n * @param {string} [key] The key of `value`.\n * @param {Object} [object] The parent object of `value`.\n * @param {Object} [stack] Tracks traversed objects and their clone counterparts.\n * @returns {*} Returns the cloned value.\n */\nfunction baseClone(value, bitmask, customizer, key, object, stack) {\n var result,\n isDeep = bitmask & CLONE_DEEP_FLAG,\n isFlat = bitmask & CLONE_FLAT_FLAG,\n isFull = bitmask & CLONE_SYMBOLS_FLAG;\n\n if (customizer) {\n result = object ? customizer(value, key, object, stack) : customizer(value);\n }\n if (result !== undefined) {\n return result;\n }\n if (!isObject(value)) {\n return value;\n }\n var isArr = isArray(value);\n if (isArr) {\n result = initCloneArray(value);\n if (!isDeep) {\n return copyArray(value, result);\n }\n } else {\n var tag = getTag(value),\n isFunc = tag == funcTag || tag == genTag;\n\n if (isBuffer(value)) {\n return cloneBuffer(value, isDeep);\n }\n if (tag == objectTag || tag == argsTag || (isFunc && !object)) {\n result = (isFlat || isFunc) ? {} : initCloneObject(value);\n if (!isDeep) {\n return isFlat\n ? copySymbolsIn(value, baseAssignIn(result, value))\n : copySymbols(value, baseAssign(result, value));\n }\n } else {\n if (!cloneableTags[tag]) {\n return object ? value : {};\n }\n result = initCloneByTag(value, tag, isDeep);\n }\n }\n // Check for circular references and return its corresponding clone.\n stack || (stack = new Stack);\n var stacked = stack.get(value);\n if (stacked) {\n return stacked;\n }\n stack.set(value, result);\n\n if (isSet(value)) {\n value.forEach(function(subValue) {\n result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));\n });\n } else if (isMap(value)) {\n value.forEach(function(subValue, key) {\n result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n }\n\n var keysFunc = isFull\n ? (isFlat ? getAllKeysIn : getAllKeys)\n : (isFlat ? keysIn : keys);\n\n var props = isArr ? undefined : keysFunc(value);\n arrayEach(props || value, function(subValue, key) {\n if (props) {\n key = subValue;\n subValue = value[key];\n }\n // Recursively populate clone (susceptible to call stack limits).\n assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n return result;\n}\n\nmodule.exports = baseClone;\n","var isObject = require('./isObject');\n\n/** Built-in value references. */\nvar objectCreate = Object.create;\n\n/**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} proto The object to inherit from.\n * @returns {Object} Returns the new object.\n */\nvar baseCreate = (function() {\n function object() {}\n return function(proto) {\n if (!isObject(proto)) {\n return {};\n }\n if (objectCreate) {\n return objectCreate(proto);\n }\n object.prototype = proto;\n var result = new object;\n object.prototype = undefined;\n return result;\n };\n}());\n\nmodule.exports = baseCreate;\n","var arrayPush = require('./_arrayPush'),\n isArray = require('./isArray');\n\n/**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction baseGetAllKeys(object, keysFunc, symbolsFunc) {\n var result = keysFunc(object);\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n}\n\nmodule.exports = baseGetAllKeys;\n","var Symbol = require('./_Symbol'),\n getRawTag = require('./_getRawTag'),\n objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]';\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\nmodule.exports = baseIsArguments;\n","var baseIsEqualDeep = require('./_baseIsEqualDeep'),\n isObjectLike = require('./isObjectLike');\n\n/**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Unordered comparison\n * 2 - Partial comparison\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\nfunction baseIsEqual(value, other, bitmask, customizer, stack) {\n if (value === other) {\n return true;\n }\n if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\n return value !== value && other !== other;\n }\n return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n}\n\nmodule.exports = baseIsEqual;\n","var Stack = require('./_Stack'),\n equalArrays = require('./_equalArrays'),\n equalByTag = require('./_equalByTag'),\n equalObjects = require('./_equalObjects'),\n getTag = require('./_getTag'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isTypedArray = require('./isTypedArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n var objIsArr = isArray(object),\n othIsArr = isArray(other),\n objTag = objIsArr ? arrayTag : getTag(object),\n othTag = othIsArr ? arrayTag : getTag(other);\n\n objTag = objTag == argsTag ? objectTag : objTag;\n othTag = othTag == argsTag ? objectTag : othTag;\n\n var objIsObj = objTag == objectTag,\n othIsObj = othTag == objectTag,\n isSameTag = objTag == othTag;\n\n if (isSameTag && isBuffer(object)) {\n if (!isBuffer(other)) {\n return false;\n }\n objIsArr = true;\n objIsObj = false;\n }\n if (isSameTag && !objIsObj) {\n stack || (stack = new Stack);\n return (objIsArr || isTypedArray(object))\n ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n }\n if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n if (objIsWrapped || othIsWrapped) {\n var objUnwrapped = objIsWrapped ? object.value() : object,\n othUnwrapped = othIsWrapped ? other.value() : other;\n\n stack || (stack = new Stack);\n return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n }\n }\n if (!isSameTag) {\n return false;\n }\n stack || (stack = new Stack);\n return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n}\n\nmodule.exports = baseIsEqualDeep;\n","var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]';\n\n/**\n * The base implementation of `_.isMap` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n */\nfunction baseIsMap(value) {\n return isObjectLike(value) && getTag(value) == mapTag;\n}\n\nmodule.exports = baseIsMap;\n","var isFunction = require('./isFunction'),\n isMasked = require('./_isMasked'),\n isObject = require('./isObject'),\n toSource = require('./_toSource');\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\nmodule.exports = baseIsNative;\n","var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar setTag = '[object Set]';\n\n/**\n * The base implementation of `_.isSet` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n */\nfunction baseIsSet(value) {\n return isObjectLike(value) && getTag(value) == setTag;\n}\n\nmodule.exports = baseIsSet;\n","var baseGetTag = require('./_baseGetTag'),\n isLength = require('./isLength'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n\nmodule.exports = baseIsTypedArray;\n","var isPrototype = require('./_isPrototype'),\n nativeKeys = require('./_nativeKeys');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeys;\n","var isObject = require('./isObject'),\n isPrototype = require('./_isPrototype'),\n nativeKeysIn = require('./_nativeKeysIn');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeysIn(object) {\n if (!isObject(object)) {\n return nativeKeysIn(object);\n }\n var isProto = isPrototype(object),\n result = [];\n\n for (var key in object) {\n if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeysIn;\n","/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\nmodule.exports = baseTimes;\n","/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n return function(value) {\n return func(value);\n };\n}\n\nmodule.exports = baseUnary;\n","/**\n * Checks if a `cache` value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction cacheHas(cache, key) {\n return cache.has(key);\n}\n\nmodule.exports = cacheHas;\n","var Uint8Array = require('./_Uint8Array');\n\n/**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\nfunction cloneArrayBuffer(arrayBuffer) {\n var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n return result;\n}\n\nmodule.exports = cloneArrayBuffer;\n","var root = require('./_root');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined,\n allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;\n\n/**\n * Creates a clone of `buffer`.\n *\n * @private\n * @param {Buffer} buffer The buffer to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Buffer} Returns the cloned buffer.\n */\nfunction cloneBuffer(buffer, isDeep) {\n if (isDeep) {\n return buffer.slice();\n }\n var length = buffer.length,\n result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\n\n buffer.copy(result);\n return result;\n}\n\nmodule.exports = cloneBuffer;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer');\n\n/**\n * Creates a clone of `dataView`.\n *\n * @private\n * @param {Object} dataView The data view to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned data view.\n */\nfunction cloneDataView(dataView, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;\n return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);\n}\n\nmodule.exports = cloneDataView;\n","/** Used to match `RegExp` flags from their coerced string values. */\nvar reFlags = /\\w*$/;\n\n/**\n * Creates a clone of `regexp`.\n *\n * @private\n * @param {Object} regexp The regexp to clone.\n * @returns {Object} Returns the cloned regexp.\n */\nfunction cloneRegExp(regexp) {\n var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));\n result.lastIndex = regexp.lastIndex;\n return result;\n}\n\nmodule.exports = cloneRegExp;\n","var Symbol = require('./_Symbol');\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * Creates a clone of the `symbol` object.\n *\n * @private\n * @param {Object} symbol The symbol object to clone.\n * @returns {Object} Returns the cloned symbol object.\n */\nfunction cloneSymbol(symbol) {\n return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};\n}\n\nmodule.exports = cloneSymbol;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer');\n\n/**\n * Creates a clone of `typedArray`.\n *\n * @private\n * @param {Object} typedArray The typed array to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned typed array.\n */\nfunction cloneTypedArray(typedArray, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n}\n\nmodule.exports = cloneTypedArray;\n","/**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\nfunction copyArray(source, array) {\n var index = -1,\n length = source.length;\n\n array || (array = Array(length));\n while (++index < length) {\n array[index] = source[index];\n }\n return array;\n}\n\nmodule.exports = copyArray;\n","var assignValue = require('./_assignValue'),\n baseAssignValue = require('./_baseAssignValue');\n\n/**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\nfunction copyObject(source, props, object, customizer) {\n var isNew = !object;\n object || (object = {});\n\n var index = -1,\n length = props.length;\n\n while (++index < length) {\n var key = props[index];\n\n var newValue = customizer\n ? customizer(object[key], source[key], key, object, source)\n : undefined;\n\n if (newValue === undefined) {\n newValue = source[key];\n }\n if (isNew) {\n baseAssignValue(object, key, newValue);\n } else {\n assignValue(object, key, newValue);\n }\n }\n return object;\n}\n\nmodule.exports = copyObject;\n","var copyObject = require('./_copyObject'),\n getSymbols = require('./_getSymbols');\n\n/**\n * Copies own symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbols(source, object) {\n return copyObject(source, getSymbols(source), object);\n}\n\nmodule.exports = copySymbols;\n","var copyObject = require('./_copyObject'),\n getSymbolsIn = require('./_getSymbolsIn');\n\n/**\n * Copies own and inherited symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbolsIn(source, object) {\n return copyObject(source, getSymbolsIn(source), object);\n}\n\nmodule.exports = copySymbolsIn;\n","var root = require('./_root');\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\nmodule.exports = coreJsData;\n","var getNative = require('./_getNative');\n\nvar defineProperty = (function() {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n}());\n\nmodule.exports = defineProperty;\n","var SetCache = require('./_SetCache'),\n arraySome = require('./_arraySome'),\n cacheHas = require('./_cacheHas');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\nfunction equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n arrLength = array.length,\n othLength = other.length;\n\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n return false;\n }\n // Check that cyclic values are equal.\n var arrStacked = stack.get(array);\n var othStacked = stack.get(other);\n if (arrStacked && othStacked) {\n return arrStacked == other && othStacked == array;\n }\n var index = -1,\n result = true,\n seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n stack.set(array, other);\n stack.set(other, array);\n\n // Ignore non-index properties.\n while (++index < arrLength) {\n var arrValue = array[index],\n othValue = other[index];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, arrValue, index, other, array, stack)\n : customizer(arrValue, othValue, index, array, other, stack);\n }\n if (compared !== undefined) {\n if (compared) {\n continue;\n }\n result = false;\n break;\n }\n // Recursively compare arrays (susceptible to call stack limits).\n if (seen) {\n if (!arraySome(other, function(othValue, othIndex) {\n if (!cacheHas(seen, othIndex) &&\n (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n return seen.push(othIndex);\n }\n })) {\n result = false;\n break;\n }\n } else if (!(\n arrValue === othValue ||\n equalFunc(arrValue, othValue, bitmask, customizer, stack)\n )) {\n result = false;\n break;\n }\n }\n stack['delete'](array);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalArrays;\n","var Symbol = require('./_Symbol'),\n Uint8Array = require('./_Uint8Array'),\n eq = require('./eq'),\n equalArrays = require('./_equalArrays'),\n mapToArray = require('./_mapToArray'),\n setToArray = require('./_setToArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]';\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n switch (tag) {\n case dataViewTag:\n if ((object.byteLength != other.byteLength) ||\n (object.byteOffset != other.byteOffset)) {\n return false;\n }\n object = object.buffer;\n other = other.buffer;\n\n case arrayBufferTag:\n if ((object.byteLength != other.byteLength) ||\n !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n return false;\n }\n return true;\n\n case boolTag:\n case dateTag:\n case numberTag:\n // Coerce booleans to `1` or `0` and dates to milliseconds.\n // Invalid dates are coerced to `NaN`.\n return eq(+object, +other);\n\n case errorTag:\n return object.name == other.name && object.message == other.message;\n\n case regexpTag:\n case stringTag:\n // Coerce regexes to strings and treat strings, primitives and objects,\n // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n // for more details.\n return object == (other + '');\n\n case mapTag:\n var convert = mapToArray;\n\n case setTag:\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n convert || (convert = setToArray);\n\n if (object.size != other.size && !isPartial) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked) {\n return stacked == other;\n }\n bitmask |= COMPARE_UNORDERED_FLAG;\n\n // Recursively compare objects (susceptible to call stack limits).\n stack.set(object, other);\n var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n stack['delete'](object);\n return result;\n\n case symbolTag:\n if (symbolValueOf) {\n return symbolValueOf.call(object) == symbolValueOf.call(other);\n }\n }\n return false;\n}\n\nmodule.exports = equalByTag;\n","var getAllKeys = require('./_getAllKeys');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n objProps = getAllKeys(object),\n objLength = objProps.length,\n othProps = getAllKeys(other),\n othLength = othProps.length;\n\n if (objLength != othLength && !isPartial) {\n return false;\n }\n var index = objLength;\n while (index--) {\n var key = objProps[index];\n if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n return false;\n }\n }\n // Check that cyclic values are equal.\n var objStacked = stack.get(object);\n var othStacked = stack.get(other);\n if (objStacked && othStacked) {\n return objStacked == other && othStacked == object;\n }\n var result = true;\n stack.set(object, other);\n stack.set(other, object);\n\n var skipCtor = isPartial;\n while (++index < objLength) {\n key = objProps[index];\n var objValue = object[key],\n othValue = other[key];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, objValue, key, other, object, stack)\n : customizer(objValue, othValue, key, object, other, stack);\n }\n // Recursively compare objects (susceptible to call stack limits).\n if (!(compared === undefined\n ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n : compared\n )) {\n result = false;\n break;\n }\n skipCtor || (skipCtor = key == 'constructor');\n }\n if (result && !skipCtor) {\n var objCtor = object.constructor,\n othCtor = other.constructor;\n\n // Non `Object` object instances with different constructors are not equal.\n if (objCtor != othCtor &&\n ('constructor' in object && 'constructor' in other) &&\n !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n result = false;\n }\n }\n stack['delete'](object);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalObjects;\n","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n","var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbols = require('./_getSymbols'),\n keys = require('./keys');\n\n/**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeys(object) {\n return baseGetAllKeys(object, keys, getSymbols);\n}\n\nmodule.exports = getAllKeys;\n","var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbolsIn = require('./_getSymbolsIn'),\n keysIn = require('./keysIn');\n\n/**\n * Creates an array of own and inherited enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeysIn(object) {\n return baseGetAllKeys(object, keysIn, getSymbolsIn);\n}\n\nmodule.exports = getAllKeysIn;\n","var isKeyable = require('./_isKeyable');\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\nmodule.exports = getMapData;\n","var baseIsNative = require('./_baseIsNative'),\n getValue = require('./_getValue');\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\nmodule.exports = getNative;\n","var overArg = require('./_overArg');\n\n/** Built-in value references. */\nvar getPrototype = overArg(Object.getPrototypeOf, Object);\n\nmodule.exports = getPrototype;\n","var Symbol = require('./_Symbol');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nmodule.exports = getRawTag;\n","var arrayFilter = require('./_arrayFilter'),\n stubArray = require('./stubArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n if (object == null) {\n return [];\n }\n object = Object(object);\n return arrayFilter(nativeGetSymbols(object), function(symbol) {\n return propertyIsEnumerable.call(object, symbol);\n });\n};\n\nmodule.exports = getSymbols;\n","var arrayPush = require('./_arrayPush'),\n getPrototype = require('./_getPrototype'),\n getSymbols = require('./_getSymbols'),\n stubArray = require('./stubArray');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own and inherited enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {\n var result = [];\n while (object) {\n arrayPush(result, getSymbols(object));\n object = getPrototype(object);\n }\n return result;\n};\n\nmodule.exports = getSymbolsIn;\n","var DataView = require('./_DataView'),\n Map = require('./_Map'),\n Promise = require('./_Promise'),\n Set = require('./_Set'),\n WeakMap = require('./_WeakMap'),\n baseGetTag = require('./_baseGetTag'),\n toSource = require('./_toSource');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n setTag = '[object Set]',\n weakMapTag = '[object WeakMap]';\n\nvar dataViewTag = '[object DataView]';\n\n/** Used to detect maps, sets, and weakmaps. */\nvar dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nvar getTag = baseGetTag;\n\n// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\nif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = baseGetTag(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : '';\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n}\n\nmodule.exports = getTag;\n","/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\nmodule.exports = getValue;\n","var nativeCreate = require('./_nativeCreate');\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n}\n\nmodule.exports = hashClear;\n","/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = hashDelete;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\nmodule.exports = hashGet;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\nmodule.exports = hashHas;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\nmodule.exports = hashSet;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Initializes an array clone.\n *\n * @private\n * @param {Array} array The array to clone.\n * @returns {Array} Returns the initialized clone.\n */\nfunction initCloneArray(array) {\n var length = array.length,\n result = new array.constructor(length);\n\n // Add properties assigned by `RegExp#exec`.\n if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {\n result.index = array.index;\n result.input = array.input;\n }\n return result;\n}\n\nmodule.exports = initCloneArray;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer'),\n cloneDataView = require('./_cloneDataView'),\n cloneRegExp = require('./_cloneRegExp'),\n cloneSymbol = require('./_cloneSymbol'),\n cloneTypedArray = require('./_cloneTypedArray');\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/**\n * Initializes an object clone based on its `toStringTag`.\n *\n * **Note:** This function only supports cloning values with tags of\n * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.\n *\n * @private\n * @param {Object} object The object to clone.\n * @param {string} tag The `toStringTag` of the object to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneByTag(object, tag, isDeep) {\n var Ctor = object.constructor;\n switch (tag) {\n case arrayBufferTag:\n return cloneArrayBuffer(object);\n\n case boolTag:\n case dateTag:\n return new Ctor(+object);\n\n case dataViewTag:\n return cloneDataView(object, isDeep);\n\n case float32Tag: case float64Tag:\n case int8Tag: case int16Tag: case int32Tag:\n case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:\n return cloneTypedArray(object, isDeep);\n\n case mapTag:\n return new Ctor;\n\n case numberTag:\n case stringTag:\n return new Ctor(object);\n\n case regexpTag:\n return cloneRegExp(object);\n\n case setTag:\n return new Ctor;\n\n case symbolTag:\n return cloneSymbol(object);\n }\n}\n\nmodule.exports = initCloneByTag;\n","var baseCreate = require('./_baseCreate'),\n getPrototype = require('./_getPrototype'),\n isPrototype = require('./_isPrototype');\n\n/**\n * Initializes an object clone.\n *\n * @private\n * @param {Object} object The object to clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneObject(object) {\n return (typeof object.constructor == 'function' && !isPrototype(object))\n ? baseCreate(getPrototype(object))\n : {};\n}\n\nmodule.exports = initCloneObject;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n var type = typeof value;\n length = length == null ? MAX_SAFE_INTEGER : length;\n\n return !!length &&\n (type == 'number' ||\n (type != 'symbol' && reIsUint.test(value))) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\nmodule.exports = isIndex;\n","/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\nmodule.exports = isKeyable;\n","var coreJsData = require('./_coreJsData');\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\nmodule.exports = isMasked;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\nmodule.exports = isPrototype;\n","/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n}\n\nmodule.exports = listCacheClear;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype;\n\n/** Built-in value references. */\nvar splice = arrayProto.splice;\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n}\n\nmodule.exports = listCacheDelete;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\nmodule.exports = listCacheGet;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\nmodule.exports = listCacheHas;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\nmodule.exports = listCacheSet;\n","var Hash = require('./_Hash'),\n ListCache = require('./_ListCache'),\n Map = require('./_Map');\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\nmodule.exports = mapCacheClear;\n","var getMapData = require('./_getMapData');\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = mapCacheDelete;\n","var getMapData = require('./_getMapData');\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\nmodule.exports = mapCacheGet;\n","var getMapData = require('./_getMapData');\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\nmodule.exports = mapCacheHas;\n","var getMapData = require('./_getMapData');\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n}\n\nmodule.exports = mapCacheSet;\n","/**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\nfunction mapToArray(map) {\n var index = -1,\n result = Array(map.size);\n\n map.forEach(function(value, key) {\n result[++index] = [key, value];\n });\n return result;\n}\n\nmodule.exports = mapToArray;\n","var getNative = require('./_getNative');\n\n/* Built-in method references that are verified to be native. */\nvar nativeCreate = getNative(Object, 'create');\n\nmodule.exports = nativeCreate;\n","var overArg = require('./_overArg');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeKeys = overArg(Object.keys, Object);\n\nmodule.exports = nativeKeys;\n","/**\n * This function is like\n * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * except that it includes inherited enumerable properties.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction nativeKeysIn(object) {\n var result = [];\n if (object != null) {\n for (var key in Object(object)) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = nativeKeysIn;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n try {\n // Use `util.types` for Node.js 10+.\n var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n if (types) {\n return types;\n }\n\n // Legacy `process.binding('util')` for Node.js < 10.\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n}());\n\nmodule.exports = nodeUtil;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n","/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\nmodule.exports = overArg;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n","/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\nfunction setCacheAdd(value) {\n this.__data__.set(value, HASH_UNDEFINED);\n return this;\n}\n\nmodule.exports = setCacheAdd;\n","/**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\nfunction setCacheHas(value) {\n return this.__data__.has(value);\n}\n\nmodule.exports = setCacheHas;\n","/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\nfunction setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n}\n\nmodule.exports = setToArray;\n","var ListCache = require('./_ListCache');\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}\n\nmodule.exports = stackClear;\n","/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n var data = this.__data__,\n result = data['delete'](key);\n\n this.size = data.size;\n return result;\n}\n\nmodule.exports = stackDelete;\n","/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n return this.__data__.get(key);\n}\n\nmodule.exports = stackGet;\n","/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n return this.__data__.has(key);\n}\n\nmodule.exports = stackHas;\n","var ListCache = require('./_ListCache'),\n Map = require('./_Map'),\n MapCache = require('./_MapCache');\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n var data = this.__data__;\n if (data instanceof ListCache) {\n var pairs = data.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n this.size = ++data.size;\n return this;\n }\n data = this.__data__ = new MapCache(pairs);\n }\n data.set(key, value);\n this.size = data.size;\n return this;\n}\n\nmodule.exports = stackSet;\n","/** Used for built-in method references. */\nvar funcProto = Function.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\nmodule.exports = toSource;\n","var baseClone = require('./_baseClone');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_SYMBOLS_FLAG = 4;\n\n/**\n * This method is like `_.clone` except that it recursively clones `value`.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Lang\n * @param {*} value The value to recursively clone.\n * @returns {*} Returns the deep cloned value.\n * @see _.clone\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var deep = _.cloneDeep(objects);\n * console.log(deep[0] === objects[0]);\n * // => false\n */\nfunction cloneDeep(value) {\n return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);\n}\n\nmodule.exports = cloneDeep;\n","/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\nmodule.exports = eq;\n","var baseIsArguments = require('./_baseIsArguments'),\n isObjectLike = require('./isObjectLike');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n};\n\nmodule.exports = isArguments;\n","/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\nmodule.exports = isArray;\n","var isFunction = require('./isFunction'),\n isLength = require('./isLength');\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\nmodule.exports = isArrayLike;\n","var root = require('./_root'),\n stubFalse = require('./stubFalse');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\nmodule.exports = isBuffer;\n","var baseIsEqual = require('./_baseIsEqual');\n\n/**\n * Performs a deep comparison between two values to determine if they are\n * equivalent.\n *\n * **Note:** This method supports comparing arrays, array buffers, booleans,\n * date objects, error objects, maps, numbers, `Object` objects, regexes,\n * sets, strings, symbols, and typed arrays. `Object` objects are compared\n * by their own, not inherited, enumerable properties. Functions and DOM\n * nodes are compared by strict equality, i.e. `===`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.isEqual(object, other);\n * // => true\n *\n * object === other;\n * // => false\n */\nfunction isEqual(value, other) {\n return baseIsEqual(value, other);\n}\n\nmodule.exports = isEqual;\n","var baseGetTag = require('./_baseGetTag'),\n isObject = require('./isObject');\n\n/** `Object#toString` result references. */\nvar asyncTag = '[object AsyncFunction]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n proxyTag = '[object Proxy]';\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\nmodule.exports = isFunction;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\nmodule.exports = isLength;\n","var baseIsMap = require('./_baseIsMap'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsMap = nodeUtil && nodeUtil.isMap;\n\n/**\n * Checks if `value` is classified as a `Map` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n * @example\n *\n * _.isMap(new Map);\n * // => true\n *\n * _.isMap(new WeakMap);\n * // => false\n */\nvar isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;\n\nmodule.exports = isMap;\n","/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n","var baseIsSet = require('./_baseIsSet'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsSet = nodeUtil && nodeUtil.isSet;\n\n/**\n * Checks if `value` is classified as a `Set` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n * @example\n *\n * _.isSet(new Set);\n * // => true\n *\n * _.isSet(new WeakSet);\n * // => false\n */\nvar isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;\n\nmodule.exports = isSet;\n","var baseIsTypedArray = require('./_baseIsTypedArray'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\nmodule.exports = isTypedArray;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeys = require('./_baseKeys'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\nmodule.exports = keys;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeysIn = require('./_baseKeysIn'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\nfunction keysIn(object) {\n return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n}\n\nmodule.exports = keysIn;\n","/**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\nfunction stubArray() {\n return [];\n}\n\nmodule.exports = stubArray;\n","/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n return false;\n}\n\nmodule.exports = stubFalse;\n","export { default as v1 } from './v1.js';\nexport { default as v3 } from './v3.js';\nexport { default as v4 } from './v4.js';\nexport { default as v5 } from './v5.js';\nexport { default as NIL } from './nil.js';\nexport { default as version } from './version.js';\nexport { default as validate } from './validate.js';\nexport { default as stringify } from './stringify.js';\nexport { default as parse } from './parse.js';","/*\n * Browser-compatible JavaScript MD5\n *\n * Modification of JavaScript MD5\n * https://github.com/blueimp/JavaScript-MD5\n *\n * Copyright 2011, Sebastian Tschan\n * https://blueimp.net\n *\n * Licensed under the MIT license:\n * https://opensource.org/licenses/MIT\n *\n * Based on\n * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message\n * Digest Algorithm, as defined in RFC 1321.\n * Version 2.2 Copyright (C) Paul Johnston 1999 - 2009\n * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet\n * Distributed under the BSD License\n * See http://pajhome.org.uk/crypt/md5 for more info.\n */\nfunction md5(bytes) {\n if (typeof bytes === 'string') {\n var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape\n\n bytes = new Uint8Array(msg.length);\n\n for (var i = 0; i < msg.length; ++i) {\n bytes[i] = msg.charCodeAt(i);\n }\n }\n\n return md5ToHexEncodedArray(wordsToMd5(bytesToWords(bytes), bytes.length * 8));\n}\n/*\n * Convert an array of little-endian words to an array of bytes\n */\n\n\nfunction md5ToHexEncodedArray(input) {\n var output = [];\n var length32 = input.length * 32;\n var hexTab = '0123456789abcdef';\n\n for (var i = 0; i < length32; i += 8) {\n var x = input[i >> 5] >>> i % 32 & 0xff;\n var hex = parseInt(hexTab.charAt(x >>> 4 & 0x0f) + hexTab.charAt(x & 0x0f), 16);\n output.push(hex);\n }\n\n return output;\n}\n/**\n * Calculate output length with padding and bit length\n */\n\n\nfunction getOutputLength(inputLength8) {\n return (inputLength8 + 64 >>> 9 << 4) + 14 + 1;\n}\n/*\n * Calculate the MD5 of an array of little-endian words, and a bit length.\n */\n\n\nfunction wordsToMd5(x, len) {\n /* append padding */\n x[len >> 5] |= 0x80 << len % 32;\n x[getOutputLength(len) - 1] = len;\n var a = 1732584193;\n var b = -271733879;\n var c = -1732584194;\n var d = 271733878;\n\n for (var i = 0; i < x.length; i += 16) {\n var olda = a;\n var oldb = b;\n var oldc = c;\n var oldd = d;\n a = md5ff(a, b, c, d, x[i], 7, -680876936);\n d = md5ff(d, a, b, c, x[i + 1], 12, -389564586);\n c = md5ff(c, d, a, b, x[i + 2], 17, 606105819);\n b = md5ff(b, c, d, a, x[i + 3], 22, -1044525330);\n a = md5ff(a, b, c, d, x[i + 4], 7, -176418897);\n d = md5ff(d, a, b, c, x[i + 5], 12, 1200080426);\n c = md5ff(c, d, a, b, x[i + 6], 17, -1473231341);\n b = md5ff(b, c, d, a, x[i + 7], 22, -45705983);\n a = md5ff(a, b, c, d, x[i + 8], 7, 1770035416);\n d = md5ff(d, a, b, c, x[i + 9], 12, -1958414417);\n c = md5ff(c, d, a, b, x[i + 10], 17, -42063);\n b = md5ff(b, c, d, a, x[i + 11], 22, -1990404162);\n a = md5ff(a, b, c, d, x[i + 12], 7, 1804603682);\n d = md5ff(d, a, b, c, x[i + 13], 12, -40341101);\n c = md5ff(c, d, a, b, x[i + 14], 17, -1502002290);\n b = md5ff(b, c, d, a, x[i + 15], 22, 1236535329);\n a = md5gg(a, b, c, d, x[i + 1], 5, -165796510);\n d = md5gg(d, a, b, c, x[i + 6], 9, -1069501632);\n c = md5gg(c, d, a, b, x[i + 11], 14, 643717713);\n b = md5gg(b, c, d, a, x[i], 20, -373897302);\n a = md5gg(a, b, c, d, x[i + 5], 5, -701558691);\n d = md5gg(d, a, b, c, x[i + 10], 9, 38016083);\n c = md5gg(c, d, a, b, x[i + 15], 14, -660478335);\n b = md5gg(b, c, d, a, x[i + 4], 20, -405537848);\n a = md5gg(a, b, c, d, x[i + 9], 5, 568446438);\n d = md5gg(d, a, b, c, x[i + 14], 9, -1019803690);\n c = md5gg(c, d, a, b, x[i + 3], 14, -187363961);\n b = md5gg(b, c, d, a, x[i + 8], 20, 1163531501);\n a = md5gg(a, b, c, d, x[i + 13], 5, -1444681467);\n d = md5gg(d, a, b, c, x[i + 2], 9, -51403784);\n c = md5gg(c, d, a, b, x[i + 7], 14, 1735328473);\n b = md5gg(b, c, d, a, x[i + 12], 20, -1926607734);\n a = md5hh(a, b, c, d, x[i + 5], 4, -378558);\n d = md5hh(d, a, b, c, x[i + 8], 11, -2022574463);\n c = md5hh(c, d, a, b, x[i + 11], 16, 1839030562);\n b = md5hh(b, c, d, a, x[i + 14], 23, -35309556);\n a = md5hh(a, b, c, d, x[i + 1], 4, -1530992060);\n d = md5hh(d, a, b, c, x[i + 4], 11, 1272893353);\n c = md5hh(c, d, a, b, x[i + 7], 16, -155497632);\n b = md5hh(b, c, d, a, x[i + 10], 23, -1094730640);\n a = md5hh(a, b, c, d, x[i + 13], 4, 681279174);\n d = md5hh(d, a, b, c, x[i], 11, -358537222);\n c = md5hh(c, d, a, b, x[i + 3], 16, -722521979);\n b = md5hh(b, c, d, a, x[i + 6], 23, 76029189);\n a = md5hh(a, b, c, d, x[i + 9], 4, -640364487);\n d = md5hh(d, a, b, c, x[i + 12], 11, -421815835);\n c = md5hh(c, d, a, b, x[i + 15], 16, 530742520);\n b = md5hh(b, c, d, a, x[i + 2], 23, -995338651);\n a = md5ii(a, b, c, d, x[i], 6, -198630844);\n d = md5ii(d, a, b, c, x[i + 7], 10, 1126891415);\n c = md5ii(c, d, a, b, x[i + 14], 15, -1416354905);\n b = md5ii(b, c, d, a, x[i + 5], 21, -57434055);\n a = md5ii(a, b, c, d, x[i + 12], 6, 1700485571);\n d = md5ii(d, a, b, c, x[i + 3], 10, -1894986606);\n c = md5ii(c, d, a, b, x[i + 10], 15, -1051523);\n b = md5ii(b, c, d, a, x[i + 1], 21, -2054922799);\n a = md5ii(a, b, c, d, x[i + 8], 6, 1873313359);\n d = md5ii(d, a, b, c, x[i + 15], 10, -30611744);\n c = md5ii(c, d, a, b, x[i + 6], 15, -1560198380);\n b = md5ii(b, c, d, a, x[i + 13], 21, 1309151649);\n a = md5ii(a, b, c, d, x[i + 4], 6, -145523070);\n d = md5ii(d, a, b, c, x[i + 11], 10, -1120210379);\n c = md5ii(c, d, a, b, x[i + 2], 15, 718787259);\n b = md5ii(b, c, d, a, x[i + 9], 21, -343485551);\n a = safeAdd(a, olda);\n b = safeAdd(b, oldb);\n c = safeAdd(c, oldc);\n d = safeAdd(d, oldd);\n }\n\n return [a, b, c, d];\n}\n/*\n * Convert an array bytes to an array of little-endian words\n * Characters >255 have their high-byte silently ignored.\n */\n\n\nfunction bytesToWords(input) {\n if (input.length === 0) {\n return [];\n }\n\n var length8 = input.length * 8;\n var output = new Uint32Array(getOutputLength(length8));\n\n for (var i = 0; i < length8; i += 8) {\n output[i >> 5] |= (input[i / 8] & 0xff) << i % 32;\n }\n\n return output;\n}\n/*\n * Add integers, wrapping at 2^32. This uses 16-bit operations internally\n * to work around bugs in some JS interpreters.\n */\n\n\nfunction safeAdd(x, y) {\n var lsw = (x & 0xffff) + (y & 0xffff);\n var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n return msw << 16 | lsw & 0xffff;\n}\n/*\n * Bitwise rotate a 32-bit number to the left.\n */\n\n\nfunction bitRotateLeft(num, cnt) {\n return num << cnt | num >>> 32 - cnt;\n}\n/*\n * These functions implement the four basic operations the algorithm uses.\n */\n\n\nfunction md5cmn(q, a, b, x, s, t) {\n return safeAdd(bitRotateLeft(safeAdd(safeAdd(a, q), safeAdd(x, t)), s), b);\n}\n\nfunction md5ff(a, b, c, d, x, s, t) {\n return md5cmn(b & c | ~b & d, a, b, x, s, t);\n}\n\nfunction md5gg(a, b, c, d, x, s, t) {\n return md5cmn(b & d | c & ~d, a, b, x, s, t);\n}\n\nfunction md5hh(a, b, c, d, x, s, t) {\n return md5cmn(b ^ c ^ d, a, b, x, s, t);\n}\n\nfunction md5ii(a, b, c, d, x, s, t) {\n return md5cmn(c ^ (b | ~d), a, b, x, s, t);\n}\n\nexport default md5;","export default '00000000-0000-0000-0000-000000000000';","import validate from './validate.js';\n\nfunction parse(uuid) {\n if (!validate(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n var v;\n var arr = new Uint8Array(16); // Parse ########-....-....-....-............\n\n arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24;\n arr[1] = v >>> 16 & 0xff;\n arr[2] = v >>> 8 & 0xff;\n arr[3] = v & 0xff; // Parse ........-####-....-....-............\n\n arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8;\n arr[5] = v & 0xff; // Parse ........-....-####-....-............\n\n arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8;\n arr[7] = v & 0xff; // Parse ........-....-....-####-............\n\n arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8;\n arr[9] = v & 0xff; // Parse ........-....-....-....-############\n // (Use \"/\" to avoid 32-bit truncation when bit-shifting high-order bytes)\n\n arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff;\n arr[11] = v / 0x100000000 & 0xff;\n arr[12] = v >>> 24 & 0xff;\n arr[13] = v >>> 16 & 0xff;\n arr[14] = v >>> 8 & 0xff;\n arr[15] = v & 0xff;\n return arr;\n}\n\nexport default parse;","export default /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;","// Unique ID creation requires a high quality random # generator. In the browser we therefore\n// require the crypto API and do not support built-in fallback to lower quality random number\n// generators (like Math.random()).\nvar getRandomValues;\nvar rnds8 = new Uint8Array(16);\nexport default function rng() {\n // lazy load so that environments that need to polyfill have a chance to do so\n if (!getRandomValues) {\n // getRandomValues needs to be invoked in a context where \"this\" is a Crypto implementation. Also,\n // find the complete implementation of crypto (msCrypto) on IE11.\n getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto !== 'undefined' && typeof msCrypto.getRandomValues === 'function' && msCrypto.getRandomValues.bind(msCrypto);\n\n if (!getRandomValues) {\n throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');\n }\n }\n\n return getRandomValues(rnds8);\n}","// Adapted from Chris Veness' SHA1 code at\n// http://www.movable-type.co.uk/scripts/sha1.html\nfunction f(s, x, y, z) {\n switch (s) {\n case 0:\n return x & y ^ ~x & z;\n\n case 1:\n return x ^ y ^ z;\n\n case 2:\n return x & y ^ x & z ^ y & z;\n\n case 3:\n return x ^ y ^ z;\n }\n}\n\nfunction ROTL(x, n) {\n return x << n | x >>> 32 - n;\n}\n\nfunction sha1(bytes) {\n var K = [0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xca62c1d6];\n var H = [0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0];\n\n if (typeof bytes === 'string') {\n var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape\n\n bytes = [];\n\n for (var i = 0; i < msg.length; ++i) {\n bytes.push(msg.charCodeAt(i));\n }\n } else if (!Array.isArray(bytes)) {\n // Convert Array-like to Array\n bytes = Array.prototype.slice.call(bytes);\n }\n\n bytes.push(0x80);\n var l = bytes.length / 4 + 2;\n var N = Math.ceil(l / 16);\n var M = new Array(N);\n\n for (var _i = 0; _i < N; ++_i) {\n var arr = new Uint32Array(16);\n\n for (var j = 0; j < 16; ++j) {\n arr[j] = bytes[_i * 64 + j * 4] << 24 | bytes[_i * 64 + j * 4 + 1] << 16 | bytes[_i * 64 + j * 4 + 2] << 8 | bytes[_i * 64 + j * 4 + 3];\n }\n\n M[_i] = arr;\n }\n\n M[N - 1][14] = (bytes.length - 1) * 8 / Math.pow(2, 32);\n M[N - 1][14] = Math.floor(M[N - 1][14]);\n M[N - 1][15] = (bytes.length - 1) * 8 & 0xffffffff;\n\n for (var _i2 = 0; _i2 < N; ++_i2) {\n var W = new Uint32Array(80);\n\n for (var t = 0; t < 16; ++t) {\n W[t] = M[_i2][t];\n }\n\n for (var _t = 16; _t < 80; ++_t) {\n W[_t] = ROTL(W[_t - 3] ^ W[_t - 8] ^ W[_t - 14] ^ W[_t - 16], 1);\n }\n\n var a = H[0];\n var b = H[1];\n var c = H[2];\n var d = H[3];\n var e = H[4];\n\n for (var _t2 = 0; _t2 < 80; ++_t2) {\n var s = Math.floor(_t2 / 20);\n var T = ROTL(a, 5) + f(s, b, c, d) + e + K[s] + W[_t2] >>> 0;\n e = d;\n d = c;\n c = ROTL(b, 30) >>> 0;\n b = a;\n a = T;\n }\n\n H[0] = H[0] + a >>> 0;\n H[1] = H[1] + b >>> 0;\n H[2] = H[2] + c >>> 0;\n H[3] = H[3] + d >>> 0;\n H[4] = H[4] + e >>> 0;\n }\n\n return [H[0] >> 24 & 0xff, H[0] >> 16 & 0xff, H[0] >> 8 & 0xff, H[0] & 0xff, H[1] >> 24 & 0xff, H[1] >> 16 & 0xff, H[1] >> 8 & 0xff, H[1] & 0xff, H[2] >> 24 & 0xff, H[2] >> 16 & 0xff, H[2] >> 8 & 0xff, H[2] & 0xff, H[3] >> 24 & 0xff, H[3] >> 16 & 0xff, H[3] >> 8 & 0xff, H[3] & 0xff, H[4] >> 24 & 0xff, H[4] >> 16 & 0xff, H[4] >> 8 & 0xff, H[4] & 0xff];\n}\n\nexport default sha1;","import validate from './validate.js';\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\n\nvar byteToHex = [];\n\nfor (var i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).substr(1));\n}\n\nfunction stringify(arr) {\n var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n var uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!validate(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n\n return uuid;\n}\n\nexport default stringify;","import rng from './rng.js';\nimport stringify from './stringify.js'; // **`v1()` - Generate time-based UUID**\n//\n// Inspired by https://github.com/LiosK/UUID.js\n// and http://docs.python.org/library/uuid.html\n\nvar _nodeId;\n\nvar _clockseq; // Previous uuid creation time\n\n\nvar _lastMSecs = 0;\nvar _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details\n\nfunction v1(options, buf, offset) {\n var i = buf && offset || 0;\n var b = buf || new Array(16);\n options = options || {};\n var node = options.node || _nodeId;\n var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not\n // specified. We do this lazily to minimize issues related to insufficient\n // system entropy. See #189\n\n if (node == null || clockseq == null) {\n var seedBytes = options.random || (options.rng || rng)();\n\n if (node == null) {\n // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)\n node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]];\n }\n\n if (clockseq == null) {\n // Per 4.2.2, randomize (14 bit) clockseq\n clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;\n }\n } // UUID timestamps are 100 nano-second units since the Gregorian epoch,\n // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so\n // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'\n // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.\n\n\n var msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock\n // cycle to simulate higher resolution clock\n\n var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs)\n\n var dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression\n\n if (dt < 0 && options.clockseq === undefined) {\n clockseq = clockseq + 1 & 0x3fff;\n } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new\n // time interval\n\n\n if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {\n nsecs = 0;\n } // Per 4.2.1.2 Throw error if too many uuids are requested\n\n\n if (nsecs >= 10000) {\n throw new Error(\"uuid.v1(): Can't create more than 10M uuids/sec\");\n }\n\n _lastMSecs = msecs;\n _lastNSecs = nsecs;\n _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch\n\n msecs += 12219292800000; // `time_low`\n\n var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;\n b[i++] = tl >>> 24 & 0xff;\n b[i++] = tl >>> 16 & 0xff;\n b[i++] = tl >>> 8 & 0xff;\n b[i++] = tl & 0xff; // `time_mid`\n\n var tmh = msecs / 0x100000000 * 10000 & 0xfffffff;\n b[i++] = tmh >>> 8 & 0xff;\n b[i++] = tmh & 0xff; // `time_high_and_version`\n\n b[i++] = tmh >>> 24 & 0xf | 0x10; // include version\n\n b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)\n\n b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low`\n\n b[i++] = clockseq & 0xff; // `node`\n\n for (var n = 0; n < 6; ++n) {\n b[i + n] = node[n];\n }\n\n return buf || stringify(b);\n}\n\nexport default v1;","import v35 from './v35.js';\nimport md5 from './md5.js';\nvar v3 = v35('v3', 0x30, md5);\nexport default v3;","import stringify from './stringify.js';\nimport parse from './parse.js';\n\nfunction stringToBytes(str) {\n str = unescape(encodeURIComponent(str)); // UTF8 escape\n\n var bytes = [];\n\n for (var i = 0; i < str.length; ++i) {\n bytes.push(str.charCodeAt(i));\n }\n\n return bytes;\n}\n\nexport var DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8';\nexport var URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8';\nexport default function (name, version, hashfunc) {\n function generateUUID(value, namespace, buf, offset) {\n if (typeof value === 'string') {\n value = stringToBytes(value);\n }\n\n if (typeof namespace === 'string') {\n namespace = parse(namespace);\n }\n\n if (namespace.length !== 16) {\n throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)');\n } // Compute hash of namespace and value, Per 4.3\n // Future: Use spread syntax when supported on all platforms, e.g. `bytes =\n // hashfunc([...namespace, ... value])`\n\n\n var bytes = new Uint8Array(16 + value.length);\n bytes.set(namespace);\n bytes.set(value, namespace.length);\n bytes = hashfunc(bytes);\n bytes[6] = bytes[6] & 0x0f | version;\n bytes[8] = bytes[8] & 0x3f | 0x80;\n\n if (buf) {\n offset = offset || 0;\n\n for (var i = 0; i < 16; ++i) {\n buf[offset + i] = bytes[i];\n }\n\n return buf;\n }\n\n return stringify(bytes);\n } // Function#name is not settable on some platforms (#270)\n\n\n try {\n generateUUID.name = name; // eslint-disable-next-line no-empty\n } catch (err) {} // For CommonJS default export support\n\n\n generateUUID.DNS = DNS;\n generateUUID.URL = URL;\n return generateUUID;\n}","import rng from './rng.js';\nimport stringify from './stringify.js';\n\nfunction v4(options, buf, offset) {\n options = options || {};\n var rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n offset = offset || 0;\n\n for (var i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n\n return buf;\n }\n\n return stringify(rnds);\n}\n\nexport default v4;","import v35 from './v35.js';\nimport sha1 from './sha1.js';\nvar v5 = v35('v5', 0x50, sha1);\nexport default v5;","import REGEX from './regex.js';\n\nfunction validate(uuid) {\n return typeof uuid === 'string' && REGEX.test(uuid);\n}\n\nexport default validate;","import validate from './validate.js';\n\nfunction version(uuid) {\n if (!validate(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n return parseInt(uuid.substr(14, 1), 16);\n}\n\nexport default version;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = (module) => {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","import { type WebLayoutSnapshot, connect } from \"@openfin/core-web\";\n\n/**\n * Gets the default layout for this app.\n * @returns The default layout for this app.\n */\nasync function getDefaultLayout(): Promise {\n\tconst layoutResponse = await fetch(\"http://localhost:6060/layouts/default.layout.fin.json\");\n\tconst layoutJson = (await layoutResponse.json()) as WebLayoutSnapshot;\n\treturn layoutJson;\n}\n/**\n * Initializes the OpenFin Web Broker connection.\n */\nasync function init(): Promise {\n\t// Get the default layout\n\tconst layoutSnapshot = await getDefaultLayout();\n\n\tif (layoutSnapshot === undefined) {\n\t\tconsole.error(\"Unable to run the sample as we have been unable to load the default snapshot.\");\n\t\treturn;\n\t}\n\t// Get the dom element that should host the layout\n\tconst layoutContainer = document.querySelector(\"#layout_container\");\n\tif (layoutContainer === null) {\n\t\tconsole.error(\n\t\t\t\"Please ensure the document has an element with the following id #layout_container so that the web-layout can be applied.\"\n\t\t);\n\t\treturn;\n\t}\n\t// Connect to the OpenFin Web Broker and pass the default layout.\n\t// It is good practice to specify providerId even if content is explicitly specifying it for cases where\n\t// this provider uses our layout system and content uses inheritance. currentContextGroup\n\t// is useful for defaulting any client that uses inheritance through our layout system.\n\tconst fin = await connect({\n\t\tconnectionInheritance: \"enabled\",\n\t\toptions: {\n\t\t\tbrokerUrl: \"http://localhost:6060/platform/iframe-broker.html\",\n\t\t\tinteropConfig: {\n\t\t\t\tproviderId: \"web-layout-basic\",\n\t\t\t\tcurrentContextGroup: \"green\"\n\t\t\t}\n\t\t},\n\t\tplatform: { layoutSnapshot }\n\t});\n\n\t// You may now use the `fin` object to initialize the broker and the layout.\n\tawait fin.Interop.init(\"web-layout-basic\");\n\t// initialize the layout and pass it the dom element to bind to\n\tawait fin.Platform.Layout.init({\n\t\tcontainer: layoutContainer\n\t});\n}\n\ninit()\n\t.then(() => {\n\t\tconsole.log(\"Created the OpenFin Web Layout.\");\n\t\treturn true;\n\t})\n\t.catch((err) => console.error(err));\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/web/v19.2.0/web-layout/js/fdc3-panel.bundle.js b/web/v19.2.0/web-layout/js/fdc3-panel.bundle.js index 5858f64..d05b18d 100644 --- a/web/v19.2.0/web-layout/js/fdc3-panel.bundle.js +++ b/web/v19.2.0/web-layout/js/fdc3-panel.bundle.js @@ -1,38 +1,38 @@ /******/ (() => { // webpackBootstrap /******/ var __webpack_modules__ = ({ -/***/ "./node_modules/@openfin/core-web/out/api-client.js": -/*!**********************************************************!*\ - !*** ./node_modules/@openfin/core-web/out/api-client.js ***! - \**********************************************************/ +/***/ "../../node_modules/@openfin/core-web/out/api-client.js": +/*!**************************************************************!*\ + !*** ../../node_modules/@openfin/core-web/out/api-client.js ***! + \**************************************************************/ /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; -var e=__webpack_require__(/*! ./main-8cad4070.js */ "./node_modules/@openfin/core-web/out/main-8cad4070.js");__webpack_require__(/*! buffer/ */ "../../node_modules/buffer/index.js"),__webpack_require__(/*! uuid */ "../../node_modules/uuid/dist/esm-browser/index.js"),__webpack_require__(/*! events */ "../../node_modules/events/events.js"),__webpack_require__(/*! lodash/cloneDeep */ "../../node_modules/lodash/cloneDeep.js"),__webpack_require__(/*! lodash/isEqual */ "../../node_modules/lodash/isEqual.js"),exports.connect=e.connect; +var e=__webpack_require__(/*! ./main-8cad4070.js */ "../../node_modules/@openfin/core-web/out/main-8cad4070.js");__webpack_require__(/*! buffer/ */ "../../node_modules/buffer/index.js"),__webpack_require__(/*! uuid */ "../../node_modules/uuid/dist/esm-browser/index.js"),__webpack_require__(/*! events */ "../../node_modules/events/events.js"),__webpack_require__(/*! lodash/cloneDeep */ "../../node_modules/lodash/cloneDeep.js"),__webpack_require__(/*! lodash/isEqual */ "../../node_modules/lodash/isEqual.js"),exports.connect=e.connect; /***/ }), -/***/ "./node_modules/@openfin/core-web/out/main-8cad4070.js": -/*!*************************************************************!*\ - !*** ./node_modules/@openfin/core-web/out/main-8cad4070.js ***! - \*************************************************************/ +/***/ "../../node_modules/@openfin/core-web/out/main-8cad4070.js": +/*!*****************************************************************!*\ + !*** ../../node_modules/@openfin/core-web/out/main-8cad4070.js ***! + \*****************************************************************/ /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; -var e=__webpack_require__(/*! buffer/ */ "../../node_modules/buffer/index.js"),t=__webpack_require__(/*! events */ "../../node_modules/events/events.js"),n=__webpack_require__(/*! lodash/cloneDeep */ "../../node_modules/lodash/cloneDeep.js"),i=__webpack_require__(/*! lodash/isEqual */ "../../node_modules/lodash/isEqual.js"),r=__webpack_require__(/*! uuid */ "../../node_modules/uuid/dist/esm-browser/index.js");const o=(e,t)=>`${t}<${btoa(JSON.stringify(e))}>`;var s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof __webpack_require__.g?__webpack_require__.g:"undefined"!=typeof self?self:{},a={},c={},d={},h={};async function l(e){const t=[];for(const n of e){const e=await n();t.push(e)}return t}Object.defineProperty(h,"__esModule",{value:!0}),h.promiseMapSerial=h.serial=h.promiseMap=h.promisify=void 0,h.promisify=function(e){return(...t)=>new Promise(((n,i)=>{e(...t,((e,t)=>e?i(e):n(t)))}))},h.promiseMap=async function(e,t){return Promise.all(e.map(t))},h.serial=l,h.promiseMapSerial=async function(e,t){return l(e.map(((e,n,i)=>()=>t(e,n,i))))};var u,p=s&&s.__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},w=s&&s.__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)};Object.defineProperty(d,"__esModule",{value:!0}),d.Reply=d.EmitterBase=d.Base=void 0;const y=h;class f{constructor(e){this.isNodeEnvironment=()=>"node"===this.wire.environment.type,this.isOpenFinEnvironment=()=>"openfin"===this.wire.environment.type,this.isBrowserEnvironment=()=>"other"===this.wire.environment.type,this.wire=e}get fin(){return this.wire.getFin()}get me(){return this.wire.me}}d.Base=f;d.EmitterBase=class extends f{constructor(e,t,...n){super(e),this.topic=t,u.set(this,void 0),this.eventNames=()=>this.hasEmitter()?this.getOrCreateEmitter().eventNames():[],this.emit=(e,t,...n)=>!!this.hasEmitter()&&this.getOrCreateEmitter().emit(e,t,...n),this.hasEmitter=()=>this.wire.eventAggregator.has(w(this,u,"f")),this.getOrCreateEmitter=()=>this.wire.eventAggregator.getOrCreate(w(this,u,"f")),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[],this.listenerCount=e=>this.hasEmitter()?this.getOrCreateEmitter().listenerCount(e):0,this.registerEventListener=async(e,t={},n,i)=>{const r={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e},o=this.getOrCreateEmitter();n(o);try{await this.wire.sendAction("subscribe-to-desktop-event",r)}catch(e){throw i(o),this.deleteEmitterIfNothingRegistered(o),e}},this.deregisterEventListener=async(e,t={})=>{if(this.hasEmitter()){const n={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e};await this.wire.sendAction("unsubscribe-to-desktop-event",n).catch((()=>null));return this.getOrCreateEmitter()}return Promise.resolve()},p(this,u,[t,...n],"f"),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[]}async on(e,t,n){return await this.registerEventListener(e,n,(n=>{n.on(e,t)}),(n=>{n.removeListener(e,t)})),this}async addListener(e,t,n){return this.on(e,t,n)}async once(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.once(e,i),n.once(e,t)}),(n=>{n.removeListener(e,i),n.removeListener(e,t)})),this}async prependListener(e,t,n){return await this.registerEventListener(e,n,(n=>{n.prependListener(e,t)}),(n=>{n.removeListener(e,t)})),this}async prependOnceListener(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.prependOnceListener(e,t),n.once(e,i)}),(n=>{n.removeListener(e,t),n.removeListener(e,i)})),this}async removeListener(e,t,n){const i=await this.deregisterEventListener(e,n);return i&&(i.removeListener(e,t),this.deleteEmitterIfNothingRegistered(i)),this}async deregisterAllListeners(e){const t={...this.identity,type:e,topic:this.topic};if(this.hasEmitter()){const e=this.getOrCreateEmitter(),n=e.listenerCount(t.type),i=[];for(let e=0;enull)));return await Promise.all(i),e}}async removeAllListeners(e){const t=async e=>{const t=await this.deregisterAllListeners(e);t&&(t.removeAllListeners(e),this.deleteEmitterIfNothingRegistered(t))};if(e)await t(e);else if(this.hasEmitter()){const e=this.getOrCreateEmitter().eventNames();await(0,y.promiseMap)(e,t)}return this}deleteEmitterIfNothingRegistered(e){0===e.eventNames().length&&this.wire.eventAggregator.delete(w(this,u,"f"))}},u=new WeakMap;d.Reply=class{};var g={};Object.defineProperty(g,"__esModule",{value:!0});var m=g.RuntimeError=g.NotSupportedError=g.NotImplementedError=g.NoAckError=g.DuplicateCorrelationError=g.UnexpectedActionError=g.DisconnectedError=void 0;class v extends Error{constructor(e){super(`Expected websocket state OPEN but found ${e}`),this.readyState=e}}g.DisconnectedError=v;class C extends Error{}g.UnexpectedActionError=C;class b extends Error{}g.DuplicateCorrelationError=b;class I extends Error{}g.NoAckError=I;class E extends Error{}g.NotImplementedError=E;class x extends Error{}g.NotSupportedError=x;class A extends Error{constructor(e){const{message:t,name:n,stack:i,...r}=e;super(t),this.name=n||"Error",this.stack=i??this.toString(),Object.keys(r).forEach((e=>{this[e]=r[e]}))}}class P extends Error{static getCallSite(e=0){const t=Error.stackTraceLimit,n=e+1;Error.stackTraceLimit=t+n;const i=Error.prepareStackTrace;Error.prepareStackTrace=(e,t)=>t;const r=(new Error).stack?.slice(n)??[];return Error.prepareStackTrace=i,Error.stackTraceLimit=t,r}static prepareStackTrace(e,t){if("function"==typeof Error.prepareStackTrace)return Error.prepareStackTrace(e,t);let n="";n+=e.name||"Error",n+=`: ${e.message||""}`;for(const e of t)n+=`\n at ${e.toString()}`;return n}constructor(e,t){const{reason:n,error:i}=e;super(n),this.name="RuntimeError",i?.stack&&(this.cause=new A(i)),t&&(this.stack=P.prepareStackTrace(this,t))}}m=g.RuntimeError=P;var M={},_={},O={};Object.defineProperty(O,"__esModule",{value:!0}),O.validateIdentity=void 0,O.validateIdentity=function(e){let t;return"object"==typeof e&&"string"==typeof e.uuid||(t="Not a valid identity object"),t};var S={},R={},F={},j={},k={},L={},T={};Object.defineProperty(T,"__esModule",{value:!0}),T.handleDeprecatedWarnings=void 0;var $;T.handleDeprecatedWarnings=e=>{(e.contentNavigation?.whitelist||e.contentNavigation?.blacklist||e.contentRedirect?.whitelist||e.contentRedirect?.blacklist)&&console.warn("The properties 'whitelist' and 'blacklist' have been marked as deprecated and will be removed in a future version. Please use 'allowlist' and 'denylist'.")};var B={},G={};Object.defineProperty(G,"__esModule",{value:!0}),G.AsyncRetryableLazy=W=G.Lazy=void 0;var W=G.Lazy=class{constructor(e){this.producerFn=e}getValue(){return this.value||(this.value=this.producerFn()),this.value}};G.AsyncRetryableLazy=class{constructor(e){this.producerFn=e}async getValue(){return this.promise||(this.promise=this.producerFn().catch((e=>{throw delete this.promise,e}))),this.promise}};var H={};Object.defineProperty(H,"__esModule",{value:!0}),H.WebContents=void 0;const N=d;class D extends N.EmitterBase{constructor(e,t,n){super(e,n,t.uuid,t.name),this.identity=t,this.entityType=n}capturePage(e){return this.wire.sendAction("capture-page",{options:e,...this.identity}).then((({payload:e})=>e.data))}executeJavaScript(e){return this.wire.sendAction("execute-javascript-in-window",{...this.identity,code:e}).then((({payload:e})=>e.data))}getZoomLevel(){return this.wire.sendAction("get-zoom-level",this.identity).then((({payload:e})=>e.data))}setZoomLevel(e){return this.wire.sendAction("set-zoom-level",{...this.identity,level:e}).then((()=>{}))}navigate(e){return this.wire.sendAction("navigate-window",{...this.identity,url:e}).then((()=>{}))}navigateBack(){return this.wire.sendAction("navigate-window-back",{...this.identity}).then((()=>{}))}async navigateForward(){await this.wire.sendAction("navigate-window-forward",{...this.identity})}stopNavigation(){return this.wire.sendAction("stop-window-navigation",{...this.identity}).then((()=>{}))}reload(e=!1){return this.wire.sendAction("reload-window",{ignoreCache:e,...this.identity}).then((()=>{}))}print(e={}){return this.wire.sendAction("print",{...this.identity,options:e}).then((()=>{}))}findInPage(e,t){return this.wire.sendAction("find-in-page",{...this.identity,searchTerm:e,options:t}).then((({payload:e})=>e.data))}stopFindInPage(e){return this.wire.sendAction("stop-find-in-page",{...this.identity,action:e}).then((()=>{}))}getPrinters(){return this.wire.sendAction("get-printers",{...this.identity}).then((({payload:e})=>e.data))}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){await this.wire.sendAction("focus-window",{emitSynthFocused:e,...this.identity})}async showDeveloperTools(){await this.wire.sendAction("show-developer-tools",this.identity)}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction("get-process-info",this.identity);return e}async getSharedWorkers(){return this.wire.sendAction("get-shared-workers",this.identity).then((({payload:e})=>e.data))}async inspectSharedWorker(){await this.wire.sendAction("inspect-shared-worker",{...this.identity})}async inspectSharedWorkerById(e){await this.wire.sendAction("inspect-shared-worker-by-id",{...this.identity,workerId:e})}async inspectServiceWorker(){await this.wire.sendAction("inspect-service-worker",{...this.identity})}async showPopupWindow(e){if(this.wire.sendAction(`${this.entityType}-show-popup-window`,this.identity).catch((()=>{})),e?.onPopupReady){const t=async({popupName:t})=>{try{const n=this.fin.Window.wrapSync({uuid:this.fin.me.uuid,name:t});await e.onPopupReady(n)}catch(e){throw new Error(`Something went wrong during onPopupReady execution: ${e}`)}};await this.once("popup-ready",t)}const{payload:t}=await this.wire.sendAction("try-create-popup-window",{options:{...e,hasResultCallback:!!e?.onPopupResult,hasReadyCallback:!!e?.onPopupReady},...this.identity}),{data:{willOpen:n,options:i}}=t;n&&await this.fin.Window.create(i.initialOptions);if(e?.onPopupResult){const t=async t=>{await e.onPopupResult((e=>{const{name:t,uuid:n,result:i,data:r}=e,o={identity:{name:t,uuid:n},result:i};return r&&(o.data=r),o})(t))},n=async()=>{await this.removeListener("popup-result",t)};await this.on("popup-result",t),await this.once("popup-teardown",n)}const{payload:r}=await this.wire.sendAction("show-popup-window",{options:i,...this.identity});return r.data}}var U,V,z,K,q;function J(){return V||(V=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(function(){if($)return L;$=1,Object.defineProperty(L,"__esModule",{value:!0}),L.ViewModule=void 0;const e=d,t=O,n=J(),i=T;class r extends e.Base{async create(e){const{uuid:t}=this.wire.me;if(!e.name||"string"!=typeof e.name)throw new Error("Please provide a name property as a string in order to create a View.");return(0,i.handleDeprecatedWarnings)(e),this.wire.environment.childViews?await this.wire.environment.createChildContent({entityType:"view",options:{...e,uuid:t}}):await this.wire.sendAction("create-view",{...e,uuid:t}),this.wrapSync({uuid:t,name:e.name})}async wrap(e){this.wire.sendAction("view-wrap").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}wrapSync(e){this.wire.sendAction("view-wrap-sync").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}getCurrent(){if(this.wire.sendAction("view-get-current").catch((e=>{})),!this.wire.me.isView)throw new Error("You are not in a View context");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction("view-get-current-sync").catch((e=>{})),!this.wire.me.isView)throw new Error("You are not in a View context");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return L.ViewModule=r,L}(),e),n(function(){if(U)return B;var e;U=1,Object.defineProperty(B,"__esModule",{value:!0}),B.View=void 0;const t=g,n=G,i=H,r=ie();class o extends i.WebContents{constructor(i,o){super(i,o,"view"),this.identity=o,e.set(this,new n.Lazy((()=>this.fin.Platform.wrapSync(this.identity).getClient()))),this.attach=async e=>{await this.wire.sendAction("attach-view",{target:e,...this.identity})},this.destroy=async()=>{await this.wire.sendAction("destroy-view",{...this.identity})},this.show=async()=>{await this.wire.sendAction("show-view",{...this.identity})},this.showAt=async(e,t={})=>{await this.wire.sendAction("show-view-at",{bounds:e,...this.identity,options:t})},this.bringToFront=async()=>{await this.wire.sendAction("bring-view-to-front",{...this.identity})},this.hide=async()=>{await this.wire.sendAction("hide-view",{...this.identity})},this.setBounds=async e=>{await this.wire.sendAction("set-view-bounds",{bounds:e,...this.identity})},this.getBounds=async()=>(await this.wire.sendAction("get-view-bounds",{...this.identity})).payload.data,this.getInfo=async()=>(await this.wire.sendAction("get-view-info",{...this.identity})).payload.data,this.getParentLayout=async()=>(this.wire.sendAction("view-get-parent-layout",{...this.identity}).catch((()=>{})),this.fin.Platform.Layout.getLayoutByViewIdentity(this.identity)),this.getOptions=async()=>this.wire.sendAction("get-view-options",{...this.identity}).then((({payload:e})=>e.data)),this.updateOptions=async e=>this.wire.sendAction("update-view-options",{options:e,...this.identity}).then((()=>{})),this.getCurrentWindow=async()=>{const{payload:{data:e}}=await this.wire.sendAction("get-view-window",{...this.identity});return new r._Window(this.wire,e)},this.getCurrentStack=async()=>{this.wire.sendAction("view-get-current-stack").catch((()=>{}));try{return(await this.getParentLayout()).getStackByViewIdentity(this.identity)}catch(e){throw new t.RuntimeError({reason:"This view does not belong to a stack.",error:e})}},this.triggerBeforeUnload=async()=>(await this.wire.sendAction("trigger-before-unload",{...this.identity})).payload.data,this.bindToElement=async e=>{if(!e)throw new Error("Element not found.");return this.wire.environment.observeBounds(e,(async e=>this.setBounds(e)))}}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){const t=await this.getCurrentWindow();await t.focusedWebViewWasChanged(),await super.focus({emitSynthFocused:e})}}return B.View=o,e=new WeakMap,B}(),e)}(k)),k}function Y(){if(z)return j;z=1,Object.defineProperty(j,"__esModule",{value:!0}),j.Application=void 0;const e=d,t=ie(),n=J();class i extends e.EmitterBase{constructor(e,n){super(e,"application",n.uuid),this.identity=n,this.window=new t._Window(this.wire,{uuid:this.identity.uuid,name:this.identity.uuid})}windowListFromIdentityList(e){const n=[];return e.forEach((e=>{n.push(new t._Window(this.wire,{uuid:e.uuid,name:e.name}))})),n}isRunning(){return this.wire.sendAction("is-application-running",this.identity).then((({payload:e})=>e.data))}async quit(e=!1){try{await this._close(e),await this.wire.sendAction("destroy-application",{force:e,...this.identity})}catch(e){if(!["Remote connection has closed","Could not locate the requested application"].some((t=>e.message.includes(t))))throw e}}async _close(e=!1){try{await this.wire.sendAction("close-application",{force:e,...this.identity})}catch(e){if(!e.message.includes("Remote connection has closed"))throw e}}close(e=!1){return console.warn("Deprecation Warning: Application.close is deprecated Please use Application.quit"),this.wire.sendAction("application-close",this.identity).catch((e=>{})),this._close(e)}getChildWindows(){return this.wire.sendAction("get-child-windows",this.identity).then((({payload:e})=>{const t=[];return e.data.forEach((e=>{t.push({uuid:this.identity.uuid,name:e})})),this.windowListFromIdentityList(t)}))}getManifest(){return this.wire.sendAction("get-application-manifest",this.identity).then((({payload:e})=>e.data))}getParentUuid(){return this.wire.sendAction("get-parent-application",this.identity).then((({payload:e})=>e.data))}getShortcuts(){return this.wire.sendAction("get-shortcuts",this.identity).then((({payload:e})=>e.data))}async getViews(){const{payload:e}=await this.wire.sendAction("application-get-views",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}getZoomLevel(){return this.wire.sendAction("get-application-zoom-level",this.identity).then((({payload:e})=>e.data))}getWindow(){return this.wire.sendAction("application-get-window",this.identity).catch((e=>{})),Promise.resolve(this.window)}registerUser(e,t){return this.wire.sendAction("register-user",{userName:e,appName:t,...this.identity}).then((()=>{}))}removeTrayIcon(){return this.wire.sendAction("remove-tray-icon",this.identity).then((()=>{}))}restart(){return this.wire.sendAction("restart-application",this.identity).then((()=>{}))}run(){return console.warn("Deprecation Warning: Application.run is deprecated Please use fin.Application.start"),this.wire.sendAction("application-run",this.identity).catch((e=>{})),this._run()}_run(e={}){return this.wire.sendAction("run-application",{manifestUrl:this._manifestUrl,opts:e,...this.identity}).then((()=>{}))}scheduleRestart(){return this.wire.sendAction("relaunch-on-close",this.identity).then((()=>{}))}async sendApplicationLog(){const{payload:e}=await this.wire.sendAction("send-application-log",this.identity);return e.data}async setJumpList(e){await this.wire.sendAction("set-jump-list",{config:e,...this.identity})}setTrayIcon(e){return this.wire.sendAction("set-tray-icon",{enabledIcon:e,...this.identity}).then((()=>{}))}setShortcuts(e){return this.wire.sendAction("set-shortcuts",{data:e,...this.identity}).then((()=>{}))}async setShortcutQueryParams(e){await this.wire.sendAction("set-shortcut-query-args",{data:e,...this.identity})}setZoomLevel(e){return this.wire.sendAction("set-application-zoom-level",{level:e,...this.identity}).then((()=>{}))}async setAppLogUsername(e){await this.wire.sendAction("set-app-log-username",{data:e,...this.identity})}getTrayIconInfo(){return this.wire.sendAction("get-tray-icon-info",this.identity).then((({payload:e})=>e.data))}hasTrayIcon(){return this.wire.sendAction("has-tray-icon",this.identity).then((({payload:e})=>e.data))}terminate(){return this.wire.sendAction("terminate-application",this.identity).then((()=>{}))}wait(){return this.wire.sendAction("wait-for-hung-application",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction("get-info",this.identity).then((({payload:e})=>e.data))}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction("application-get-process-info",this.identity);return e}async setFileDownloadLocation(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t};await this.wire.sendAction("set-file-download-location",{...n,downloadLocation:e})}async getFileDownloadLocation(){const{payload:{data:e}}=await this.wire.sendAction("get-file-download-location",this.identity);return e}async showTrayIconPopupMenu(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t},{payload:i}=await this.wire.sendAction("show-tray-icon-popup-menu",{...n,options:e});return i.data}async closeTrayIconPopupMenu(){const{name:e}=this.wire.me,t={uuid:this.identity.uuid,name:e};await this.wire.sendAction("close-tray-icon-popup-menu",{...t})}}return j.Application=i,j}function Z(){return q||(q=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(function(){if(K)return F;K=1,Object.defineProperty(F,"__esModule",{value:!0}),F.ApplicationModule=void 0;const e=d,t=O,n=Y();class i extends e.Base{async wrap(e){this.wire.sendAction("wrap-application").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}wrapSync(e){this.wire.sendAction("wrap-application-sync").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}async _create(e){return void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&void 0===e.isPlatformController&&(e.autoShow=!0),await this.wire.sendAction("create-application",e),this.wrap({uuid:e.uuid})}create(e){return console.warn("Deprecation Warning: fin.Application.create is deprecated. Please use fin.Application.start"),this.wire.sendAction("application-create").catch((e=>{})),this._create(e)}async start(e){this.wire.sendAction("start-application").catch((e=>{}));const t=await this._create(e);return await this.wire.sendAction("run-application",{uuid:e.uuid}),t}async startManyManifests(e,t){return this.wire.sendAction("run-applications",{applications:e,opts:t}).then((()=>{}))}getCurrent(){return this.wire.sendAction("get-current-application").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction("get-current-application-sync").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}async startFromManifest(e,t){this.wire.sendAction("application-start-from-manifest").catch((e=>{}));const n=await this._createFromManifest(e);return await n._run(t),n}createFromManifest(e){return console.warn("Deprecation Warning: fin.Application.createFromManifest is deprecated. Please use fin.Application.startFromManifest"),this.wire.sendAction("application-create-from-manifest").catch((e=>{})),this._createFromManifest(e)}_createFromManifest(e){return this.wire.sendAction("get-application-manifest",{manifestUrl:e}).then((({payload:e})=>{const t=e.data.platform?e.data.platform.uuid:e.data.startup_app.uuid;return this.wrap({uuid:t})})).then((t=>(t._manifestUrl=e,t)))}}return F.ApplicationModule=i,F}(),e),n(Y(),e)}(R)),R}H.WebContents=D;var Q={};Object.defineProperty(Q,"__esModule",{value:!0}),Q.promisifySubscription=void 0;var X,ee,te;function ne(){if(X)return S;X=1,Object.defineProperty(S,"__esModule",{value:!0}),S._Window=void 0;const e=Z(),t=H,n=J(),i=T,r=Q;class o extends t.WebContents{constructor(e,t){super(e,t,"window")}async createWindow(e){this.wire.sendAction("window-create-window",this.identity).catch((e=>{}));const t=await(0,r.promisifySubscription)(this,"fire-constructor-callback");void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&(e.autoShow=!0),(0,i.handleDeprecatedWarnings)(e);const n=this.wire.environment.createChildContent({entityType:"window",options:e}),[o]=await Promise.all([t.getValue(),n]);let s;const{success:a}=o,c=o.data,{message:d}=c;s=a?{httpResponseCode:c.httpResponseCode,apiInjected:c.apiInjected}:{message:c.message,networkErrorCode:c.networkErrorCode,stack:c.stack};const h={message:d,cbPayload:s,success:a};try{this.getWebWindow().fin.__internal_.openerSuccessCBCalled()}catch(e){}return h.success?this:Promise.reject(h)}getAllFrames(){return this.wire.sendAction("get-all-frames",this.identity).then((({payload:e})=>e.data))}getBounds(){return this.wire.sendAction("get-window-bounds",this.identity).then((({payload:e})=>e.data))}center(){return this.wire.sendAction("center-window",this.identity).then((()=>{}))}blur(){return this.wire.sendAction("blur-window",this.identity).then((()=>{}))}bringToFront(){return this.wire.sendAction("bring-window-to-front",this.identity).then((()=>{}))}animate(e,t){return this.wire.sendAction("animate-window",{transitions:e,options:t,...this.identity}).then((()=>{}))}hide(){return this.wire.sendAction("hide-window",this.identity).then((()=>{}))}close(e=!1){return this.wire.sendAction("close-window",{force:e,...this.identity}).then((()=>{Object.setPrototypeOf(this,null)}))}focusedWebViewWasChanged(){return this.wire.sendAction("focused-webview-changed",this.identity).then((()=>{}))}getNativeId(){return this.wire.sendAction("get-window-native-id",this.identity).then((({payload:e})=>e.data))}async getCurrentViews(){const{payload:e}=await this.wire.sendAction("window-get-views",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}disableFrame(){return console.warn("Function is deprecated; use disableUserMovement instead."),this.wire.sendAction("disable-window-frame",this.identity).then((()=>{}))}disableUserMovement(){return this.wire.sendAction("disable-window-frame",this.identity).then((()=>{}))}enableFrame(){return console.warn("Function is deprecated; use enableUserMovement instead."),this.wire.sendAction("enable-window-frame",this.identity).then((()=>{}))}enableUserMovement(){return this.wire.sendAction("enable-window-frame",this.identity).then((()=>{}))}flash(){return this.wire.sendAction("flash-window",this.identity).then((()=>{}))}stopFlashing(){return this.wire.sendAction("stop-flash-window",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction("get-window-info",this.identity).then((({payload:e})=>e.data))}async getLayout(e){this.wire.sendAction("window-get-layout",this.identity).catch((e=>{}));const t=await this.getOptions();if(!t.layout&&!t.layoutSnapshot)throw new Error("Window does not have a Layout");return this.fin.Platform.Layout.wrap(e??this.identity)}getOptions(){return this.wire.sendAction("get-window-options",this.identity).then((({payload:e})=>e.data))}getParentApplication(){return this.wire.sendAction("window-get-parent-application",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity))}getParentWindow(){return this.wire.sendAction("window-get-parent-window",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity)).then((e=>e.getWindow()))}async getSnapshot(e){const t={area:e,...this.identity};console.warn("Window.getSnapshot has been deprecated, please use Window.capturePage");return(await this.wire.sendAction("get-window-snapshot",t)).payload.data}getState(){return this.wire.sendAction("get-window-state",this.identity).then((({payload:e})=>e.data))}getWebWindow(){return this.wire.sendAction("window-get-web-window",this.identity).catch((e=>{})),this.wire.environment.getWebWindow(this.identity)}isMainWindow(){return this.wire.sendAction("window-is-main-window",this.identity).catch((e=>{})),this.me.uuid===this.me.name}isShowing(){return this.wire.sendAction("is-window-showing",this.identity).then((({payload:e})=>e.data))}maximize(){return this.wire.sendAction("maximize-window",this.identity).then((()=>{}))}minimize(){return this.wire.sendAction("minimize-window",this.identity).then((()=>{}))}moveBy(e,t,n){return this.wire.sendAction("move-window-by",{deltaLeft:e,deltaTop:t,positioningOptions:n,...this.identity}).then((()=>{}))}moveTo(e,t,n){return this.wire.sendAction("move-window",{left:e,top:t,positioningOptions:n,...this.identity}).then((()=>{}))}resizeBy(e,t,n,i){return this.wire.sendAction("resize-window-by",{deltaWidth:Math.floor(e),deltaHeight:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}resizeTo(e,t,n,i){return this.wire.sendAction("resize-window",{width:Math.floor(e),height:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}restore(){return this.wire.sendAction("restore-window",this.identity).then((()=>{}))}setAsForeground(){return this.wire.sendAction("set-foreground-window",this.identity).then((()=>{}))}setBounds(e,t){return this.wire.sendAction("set-window-bounds",{...e,...this.identity,positioningOptions:t}).then((()=>{}))}show(e=!1){return this.wire.sendAction("show-window",{force:e,...this.identity}).then((()=>{}))}showAt(e,t,n=!1){return this.wire.sendAction("show-at-window",{force:n,left:Math.floor(e),top:Math.floor(t),...this.identity}).then((()=>{}))}updateOptions(e){return this.wire.sendAction("update-window-options",{options:e,...this.identity}).then((()=>{}))}authenticate(e,t){return this.wire.sendAction("window-authenticate",{userName:e,password:t,...this.identity}).then((()=>{}))}async showPopupMenu(e){const{payload:t}=await this.wire.sendAction("show-popup-menu",{options:e,...this.identity});return t.data}async closePopupMenu(){return this.wire.sendAction("close-popup-menu",{...this.identity}).then((()=>{}))}async dispatchPopupResult(e){this.wire.sendAction("window-dispatch-popup-result",this.identity).catch((e=>{})),await this.wire.sendAction("dispatch-popup-result",{data:e,...this.identity})}async print(e={content:"self"}){switch(e.content){case void 0:case"self":return super.print(e);case"screenshot":return this.wire.sendAction("print-screenshot",this.identity).then((()=>{}));case"views":return this.wire.sendAction("print-views",{...this.identity,options:e}).then((()=>{}));default:return}}}return S._Window=o,S}function ie(){return te||(te=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(function(){if(ee)return _;ee=1,Object.defineProperty(_,"__esModule",{value:!0}),_._WindowModule=void 0;const e=d,t=O,n=ne();class i extends e.Base{async wrap(e){this.wire.sendAction("window-wrap").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}wrapSync(e){this.wire.sendAction("window-wrap-sync").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}create(e){return this.wire.sendAction("create-window").catch((e=>{})),new n._Window(this.wire,{uuid:this.me.uuid,name:e.name}).createWindow(e)}getCurrent(){if(this.wire.sendAction("get-current-window").catch((e=>{})),!this.wire.me.isWindow)throw new Error("You are not in a Window context");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction("get-current-window-sync").catch((e=>{})),!this.wire.me.isWindow)throw new Error("You are not in a Window context");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return _._WindowModule=i,_}(),e),n(ne(),e)}(M)),M}Q.promisifySubscription=async(e,t,n=(()=>!0),i)=>{let r,o,s;const a=new Promise(((e,t)=>{r=e,o=t})),c=e=>{n(e)&&(clearTimeout(s),r(e))};return await e.on(t,c),i&&(s=setTimeout((()=>o(new Error("event timed out"))),i)),a.finally((()=>{e.removeListener(t,c).catch((()=>null))})),{getValue:()=>a}},Object.defineProperty(c,"__esModule",{value:!0}),c.System=void 0;const re=d,oe=g,se=ie(),ae=t;class ce extends re.EmitterBase{constructor(e){super(e,"system")}sendExternalProcessRequest(e,t){return new Promise(((n,i)=>{const r="external-process-exited";let o,s,a,c;"function"==typeof t.listener&&(a=e=>{const n=e||{};s={topic:"exited",uuid:n.processUuid||"",exitCode:n.exitCode||0},o===e.processUuid&&(t.listener(s),c.removeListener(r,a))},this.wire.me.name||(this.wire.me.name=this.wire.me.uuid),c=new se._Window(this.wire,this.wire.me),c.on(r,a)),this.wire.sendAction(e,t).then((({payload:e})=>{o=e.data.uuid,n(e.data),s&&o===s.uuid&&(t.listener(s),c.removeListener(r,a))})).catch((e=>{c&&c.removeListener(r,a),i(e)}))}))}getVersion(){return this.wire.sendAction("get-version").then((({payload:e})=>e.data))}clearCache(e){return this.wire.sendAction("clear-cache",e).then((()=>{}))}deleteCacheOnExit(){return this.wire.sendAction("delete-cache-request").then((()=>{}))}exit(){return this.wire.sendAction("exit-desktop").then((()=>{}))}async fetchManifest(e){const{payload:{data:t}}=await this.wire.sendAction("fetch-manifest",{manifestUrl:e});return t}flushCookieStore(){return this.wire.sendAction("flush-cookie-store").then((()=>{}))}getAllWindows(){return this.wire.sendAction("get-all-windows").then((({payload:e})=>e.data))}getAllApplications(){return this.wire.sendAction("get-all-applications").then((({payload:e})=>e.data))}getCommandLineArguments(){return this.wire.sendAction("get-command-line-arguments").then((({payload:e})=>e.data))}async getCrashReporterState(){const{payload:{data:{diagnosticMode:e,isRunning:t}}}=await this.wire.sendAction("get-crash-reporter-state");return console.warn("diagnosticMode property is deprecated. It will be removed in a future version"),{diagnosticMode:e,diagnosticsMode:e,isRunning:t}}async startCrashReporter(e){const t=e,n={...t,diagnosticMode:t.diagnosticsMode||t.diagnosticMode},{payload:{data:{diagnosticMode:i,isRunning:r}}}=await this.wire.sendAction("start-crash-reporter",n);return{diagnosticMode:i,diagnosticsMode:i,isRunning:r}}getUniqueUserId(){return this.wire.sendAction("get-unique-user-id").then((({payload:e})=>e.data))}getEntityInfo(e,t){return this.wire.sendAction("get-entity-info",{uuid:e,name:t}).then((({payload:e})=>e.data))}getEnvironmentVariable(e){return this.wire.sendAction("get-environment-variable",{environmentVariables:e}).then((({payload:e})=>e.data))}getFocusedWindow(){return this.wire.sendAction("get-focused-window").then((({payload:e})=>e.data))}async isAppCertified(e){const{payload:{data:{certifiedInfo:t}}}=await this.wire.sendAction("is-app-certified",{manifestUrl:e});return t}getInstalledRuntimes(){return this.wire.sendAction("get-installed-runtimes").then((({payload:e})=>e.data.runtimes))}async getInstalledApps(){const{payload:{data:{installedApps:e}}}=await this.wire.sendAction("get-installed-apps");return e}getLog(e){return this.wire.sendAction("view-log",e).then((({payload:e})=>e.data))}getMachineId(){return this.wire.sendAction("get-machine-id").then((({payload:e})=>e.data))}getMinLogLevel(){return this.wire.sendAction("get-min-log-level").then((({payload:e})=>e.data))}getLogList(){return this.wire.sendAction("list-logs").then((({payload:e})=>e.data))}getMonitorInfo(){return this.wire.sendAction("get-monitor-info").then((({payload:e})=>e.data))}getMousePosition(){return this.wire.sendAction("get-mouse-position").then((({payload:e})=>e.data))}getProcessList(){return console.warn("System.getProcessList has been deprecated. Please consider using our new process APIs: Window.getProcessInfo, View.getProcessInfo, Application.getProcessInfo, System.getAllProcessInfo"),this.wire.sendAction("process-snapshot").then((({payload:e})=>e.data))}async getAllProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction("get-all-process-info",this.identity);return e}getProxySettings(){return this.wire.sendAction("get-proxy-settings").then((({payload:e})=>e.data))}getRuntimeInfo(){return this.wire.sendAction("get-runtime-info").then((({payload:e})=>e.data))}getRvmInfo(){return this.wire.sendAction("get-rvm-info").then((({payload:e})=>e.data))}getHostSpecs(){return this.wire.sendAction("get-host-specs").then((({payload:e})=>e.data))}getOSInfo(){return this.wire.sendAction("get-os-info").then((({payload:e})=>e.data))}launchExternalProcess(e){return this.sendExternalProcessRequest("launch-external-process",e)}monitorExternalProcess(e){return this.sendExternalProcessRequest("monitor-external-process",e)}log(e,t){return this.wire.sendAction("write-to-log",{level:e,message:t}).then((()=>{}))}openUrlWithBrowser(e){return this.wire.sendAction("open-url-with-browser",{url:e}).then((()=>{}))}async registerCustomProtocol(e){if("object"!=typeof e)throw new Error("Must provide an object with a `protocolName` property having a string value.");await this.wire.sendAction("register-custom-protocol",e)}async unregisterCustomProtocol(e){await this.wire.sendAction("unregister-custom-protocol",{protocolName:e})}async getCustomProtocolState(e){return this.wire.sendAction("get-custom-protocol-state",{protocolName:e}).then((({payload:e})=>e.data))}releaseExternalProcess(e){return this.wire.sendAction("release-external-process",{uuid:e}).then((()=>{}))}showDeveloperTools(e){return this.wire.sendAction("show-developer-tools",e).then((()=>{}))}terminateExternalProcess(e){return this.wire.sendAction("terminate-external-process",e).then((()=>{}))}updateProxySettings(e){return this.wire.sendAction("update-proxy",e).then((()=>{}))}async downloadAsset(e,t){const n=()=>{};let i=n,r=n;const o=new Promise(((e,t)=>{i=e,r=t}));if("openfin"!==this.wire.environment.type)throw new oe.NotSupportedError("downloadAsset only supported in an OpenFin Render process");const s=oe.RuntimeError.getCallSite(),a=this.wire.environment.getNextMessageId().toString(),c=`asset-download-progress-${a}`,d=`asset-download-error-${a}`,h=`asset-download-complete-${a}`,l=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},u=()=>{this.removeListener(c,l)};await Promise.all([this.on(c,l),this.once(d,(e=>{u();const{reason:t,err:n}=e;r(new oe.RuntimeError({reason:t,error:n},s))})),this.once(h,(()=>{u(),i()}))]);const p=Object.assign(e,{downloadId:a});return await this.wire.sendAction("download-asset",p).catch((e=>{throw u(),e})),o}downloadRuntime(e,t){const n=oe.RuntimeError.getCallSite();return new Promise(((i,r)=>{if("openfin"!==this.wire.environment.type)return void r(new oe.NotSupportedError("downloadRuntime only supported in an OpenFin Render process"));const o=this.wire.environment.getNextMessageId().toString(),s=`runtime-download-progress-${o}`,a=`runtime-download-error-${o}`,c=`runtime-download-complete-${o}`,d=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},h=()=>{this.removeListener(s,d)};this.on(s,d),this.once(a,(e=>{h();const{reason:t,err:i}=e;r(new oe.RuntimeError({reason:t,error:i},n))})),this.once(c,(()=>{h(),i()}));const l=Object.assign(e,{downloadId:o});this.wire.sendAction("download-runtime",l).catch((e=>{h(),r(e)}))}))}downloadPreloadScripts(e){return this.wire.sendAction("download-preload-scripts",{scripts:e}).then((({payload:e})=>e.data))}getAllExternalApplications(){return this.wire.sendAction("get-all-external-applications").then((({payload:e})=>e.data))}getAppAssetInfo(e){return this.wire.sendAction("get-app-asset-info",e).then((({payload:e})=>e.data))}getCookies(e){const t=this.wire.environment.getUrl(),n=Object.assign(e,{url:t});return this.wire.sendAction("get-cookies",n).then((({payload:e})=>e.data))}setMinLogLevel(e){return this.wire.sendAction("set-min-log-level",{level:e}).then((()=>{}))}resolveUuid(e){return this.wire.sendAction("resolve-uuid",{entityKey:e}).then((({payload:e})=>e.data))}executeOnRemote(e,t){return t.requestingIdentity=e,this.wire.ferryAction(t)}readRegistryValue(e,t,n){return this.wire.sendAction("read-registry-value",{rootKey:e,subkey:t,value:n}).then((({payload:e})=>e.data))}registerExternalConnection(e){return this.wire.sendAction("register-external-connection",{uuid:e}).then((({payload:e})=>e.data))}async getServiceConfiguration(e){if("string"!=typeof e.name)throw new Error("Must provide an object with a `name` property having a string value");const{name:t}=e;return this.wire.sendAction("get-service-configuration",{name:t}).then((({payload:e})=>e.data))}async getSystemAppConfig(e){if("string"!=typeof e)throw new Error("Must provide a string value for name of system app");return this.wire.sendAction("get-system-app-configuration",{name:e}).then((({payload:e})=>e.data))}async registerShutdownHandler(e){this.wire.sendAction("system-register-shutdown-handler").catch((e=>{}));const{uuid:t,name:n}=this.wire.me;this.on("system-shutdown",(i=>{e({proceed:()=>{this.wire.environment.raiseEvent("application/system-shutdown-handled",{uuid:t,name:n,topic:"application"})}})}))}runRvmHealthCheck(){return this.wire.sendAction("run-rvm-health-check").then((({payload:e})=>e.data))}async launchManifest(e,t={}){const{subscribe:n,...i}=t,r=i;if(n){const e=new ae.EventEmitter;n(e);const t="app-version-progress",i="runtime-status",o="app-version-complete",s="app-version-error",a=this.wire.environment.getNextMessageId().toString();r.appVersionId=a;const c=[o,t,i,s],d=e=>{const{appVersionId:t,topic:n,type:i,...r}=e;return{...r,type:c.find((e=>i.includes(e)))}},h=t=>{const n=d(t);e.emit(n.type,n)},l=()=>{this.removeListener(`${t}.${a}`,h),this.removeListener(`${i}.${a}`,h),this.removeListener(`${o}.${a}`,h),this.removeListener(`${s}.${a}`,h),this.removeListener(`${o}.${a}`,l),this.removeListener(`${s}.${a}`,l)};await Promise.all([this.on(`${t}.${a}`,h),this.on(`${i}.${a}`,h),this.once(`${o}.${a}`,h),this.once(`${s}.${a}`,h),this.once(`${o}.${a}`,l),this.once(`${s}.${a}`,l)])}return(await this.wire.sendAction("launch-manifest",{manifestUrl:e,opts:r})).payload.data.manifest}async queryPermissionForCurrentContext(e){const t={uuid:this.wire.me.uuid,name:this.wire.me.name};return(await this.wire.sendAction("query-permission-for-current-context",{apiName:e,identity:t})).payload.data}async enableNativeWindowIntegrationProvider(e){const{payload:t}=await this.wire.sendAction("enable-native-window-integration-provider",{permissions:e});return t.data}async registerUsage({data:e,type:t}){await this.wire.sendAction("register-usage",{data:e,type:t})}async getPrinters(){const{payload:e}=await this.wire.sendAction("system-get-printers");return e.data}async updateProcessLoggingOptions(e){await this.wire.sendAction("system-update-process-logging-options",{options:e})}async getDomainSettings(){const{payload:{data:e}}=await this.wire.sendAction("get-domain-settings",this.identity);return e}async setDomainSettings(e){await this.wire.sendAction("set-domain-settings",{domainSettings:e,...this.identity})}async refreshExtensions(){const{payload:e}=await this.wire.sendAction("refresh-extensions");return e.data}async getInstalledExtensions(){const{payload:e}=await this.wire.sendAction("get-installed-extensions");return e.data}}c.System=ce;var de={},he={};Object.defineProperty(he,"__esModule",{value:!0}),he.RefCounter=void 0;he.RefCounter=class{constructor(){this.topicRefMap=new Map}incRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t+1;n=i,this.topicRefMap.set(e,i)}else this.topicRefMap.set(e,1),n=1;return n}decRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t-1;this.topicRefMap.set(e,i),n=i}else n=-1;return n}actOnFirst(e,t,n){return 1===this.incRefCount(e)?t():n()}actOnLast(e,t,n){return 0===this.decRefCount(e)?t():n()}};var le={},ue={},pe={};Object.defineProperty(pe,"__esModule",{value:!0}),pe.ChannelBase=pe.ProtectedItems=void 0;const we=e=>async(t,n,i)=>{const r=await e(t,n,i);return void 0===r?n:r};pe.ProtectedItems=class{constructor(e,t){this.providerIdentity=e,this.close=t}};class ye{static defaultAction(e){throw new Error(`No action registered at target for ${e}`)}constructor(){this.subscriptions=new Map}async processAction(e,t,n){try{const i=this.subscriptions.has(e)?this.subscriptions.get(e):(t,n)=>(this.defaultAction??ye.defaultAction)(e,t,n),r=this.preAction?await this.preAction(e,t,n):t,o=await i(r,n);return this.postAction?await this.postAction(e,o,n):o}catch(t){if(this.errorMiddleware)return this.errorMiddleware(e,t,n);throw t}}beforeAction(e){if(this.preAction)throw new Error("Already registered beforeAction middleware");this.preAction=we(e)}onError(e){if(this.errorMiddleware)throw new Error("Already registered error middleware");this.errorMiddleware=e}afterAction(e){if(this.postAction)throw new Error("Already registered afterAction middleware");this.postAction=we(e)}remove(e){this.subscriptions.delete(e)}setDefaultAction(e){if(this.defaultAction)throw new Error("default action can only be set once");this.defaultAction=e}register(e,t){if(this.subscriptions.has(e))throw new Error(`Subscription already registered for action: ${e}. Unsubscribe before adding new subscription`);return this.subscriptions.set(e,t),!0}}pe.ChannelBase=ye;var fe,ge,me,ve=s&&s.__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)},Ce=s&&s.__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};Object.defineProperty(ue,"__esModule",{value:!0}),ue.ChannelClient=void 0;const be=pe,Ie=new Map;class Ee extends be.ChannelBase{static closeChannelByEndpointId(e){const t=Ie.get(e);t&&ve(t,me,"f").call(t)}static handleProviderDisconnect(e){for(const t of Ie.values())t.providerIdentity.channelId===e.channelId&&(t.disconnectListener(e),ve(t,me,"f").call(t))}constructor(e,t,n){super(),fe.set(this,void 0),ge.set(this,void 0),this.processAction=(e,t,n)=>super.processAction(e,t,n),me.set(this,(()=>{Ie.delete(this.endpointId),ve(this,ge,"f").close()})),Ce(this,fe,new be.ProtectedItems(e,t),"f"),this.disconnectListener=()=>{},this.endpointId=e.endpointId,Ce(this,ge,n,"f"),Ie.set(this.endpointId,this),n.receive(this.processAction)}get providerIdentity(){return ve(this,fe,"f").providerIdentity}async dispatch(e,t){if(ve(this,ge,"f").isEndpointConnected(this.providerIdentity.channelId))return ve(this,ge,"f").send(this.providerIdentity.channelId,e,t);throw new Error("The client you are trying to dispatch from is disconnected from the target provider.")}onDisconnection(e){this.disconnectListener=t=>{try{e(t)}catch(e){throw new Error(`Error while calling the onDisconnection callback: ${e.message}`)}finally{this.disconnectListener=()=>{}}}}async disconnect(){await this.sendDisconnectAction(),ve(this,me,"f").call(this)}async sendDisconnectAction(){const e=ve(this,fe,"f");await e.close()}static async wireClose(e,t,n){const{channelName:i,uuid:r,name:o}=t;await e.sendAction("disconnect-from-channel",{channelName:i,uuid:r,name:o,endpointId:n})}}ue.ChannelClient=Ee,fe=new WeakMap,ge=new WeakMap,me=new WeakMap;var xe={},Ae={};Object.defineProperty(Ae,"__esModule",{value:!0}),Ae.exhaustiveCheck=void 0,Ae.exhaustiveCheck=function(e,t){throw new Error(`Unsupported value: ${e}${t?`\n Supported values are: ${t.join("")}`:""}`)};var Pe,Me,_e,Oe={},Se=s&&s.__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},Re=s&&s.__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)};Object.defineProperty(Oe,"__esModule",{value:!0}),Oe.ClassicInfo=Oe.ClassicStrategy=void 0;Oe.ClassicStrategy=class{constructor(e,t,n,i){this.messageReceiver=t,this.endpointId=n,this.providerIdentity=i,Pe.set(this,void 0),Me.set(this,new Map),_e.set(this,new Map),this.send=async(e,t,n)=>{const i=Re(this,Me,"f").get(e);if(!i)throw new Error(`Could not locate routing info for endpoint ${e}`);const r={...i};r.isLocalEndpointId&&delete r.endpointId,delete r.isLocalEndpointId;const o=Re(this,Pe,"f").sendAction("send-channel-message",{...r,providerIdentity:this.providerIdentity,action:t,payload:n});Re(this,_e,"f").get(e)?.add(o);return(await o.catch((e=>{throw new Error(e.message)})).finally((()=>{Re(this,_e,"f").get(e)?.delete(o)}))).payload.data.result},this.close=async()=>{this.messageReceiver.removeEndpoint(this.providerIdentity.channelId,this.endpointId),[...Re(this,Me,"f").keys()].forEach((e=>this.closeEndpoint(e))),Se(this,Me,new Map,"f")},Se(this,Pe,e,"f")}onEndpointDisconnect(e,t){}receive(e){this.messageReceiver.addEndpoint(e,this.providerIdentity.channelId,this.endpointId)}async closeEndpoint(e){const t=Re(this,Me,"f").get(e);Re(this,Me,"f").delete(e);const n=Re(this,_e,"f").get(e);n?.forEach((n=>{const i=`Channel connection with identity uuid: ${t?.uuid} / name: ${t?.name} / endpointId: ${e} no longer connected.`;n.cancel(new Error(i))}))}isEndpointConnected(e){return Re(this,Me,"f").has(e)}addEndpoint(e,t){Re(this,Me,"f").set(e,t.endpointIdentity),Re(this,_e,"f").set(e,new Set)}isValidEndpointPayload(e){return"string"==typeof e?.endpointIdentity?.endpointId||"string"==typeof e?.endpointIdentity?.channelId}},Pe=new WeakMap,Me=new WeakMap,_e=new WeakMap,Oe.ClassicInfo={version:5,minimumVersion:0,type:"classic"};var Fe={},je={},ke={};Object.defineProperty(ke,"__esModule",{value:!0}),ke.errorToPOJO=void 0,ke.errorToPOJO=function(e){return{stack:e.stack,name:e.name,message:e.message,toString:()=>e.stack||e.toString()}};var Le,Te,$e=s&&s.__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)},Be=s&&s.__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};Object.defineProperty(je,"__esModule",{value:!0}),je.RTCEndpoint=void 0;const Ge=ke;je.RTCEndpoint=class{static isValidEndpointPayload(e){const t=e=>"object"==typeof e&&null!==e;return t(e)&&t(e.endpointIdentity)&&t(e.rtc)&&"string"==typeof e.endpointIdentity.endpointId}constructor({rtc:e,endpointIdentity:t}){this.responseMap=new Map,Le.set(this,null),Te.set(this,void 0),this.connectionStateChangeHandler=e=>{"connected"!==this.rtc.rtcClient.connectionState&&(this.rtc.rtcClient.removeEventListener("connectionstatechange",this.connectionStateChangeHandler),this.close(),$e(this,Te,"f")&&$e(this,Te,"f").call(this))},this.send=async(e,t)=>{const n=`message-${Math.random()}`,i=new Promise(((e,t)=>{this.responseMap.set(n,{resolve:e,reject:t})}));return this.rtc.channels.request.send(JSON.stringify({action:e,payload:t,messageId:n})),i},this.close=()=>{this.responseMap.forEach((e=>e.reject("Connection has closed."))),this.responseMap=new Map,this.rtc.channels.request.close(),this.rtc.channels.response.close(),this.rtc.rtcClient.close()},this.rtc=e,this.endpointIdentity=t,this.rtc.channels.response.addEventListener("message",(e=>{let{data:t}=e;e.data instanceof ArrayBuffer&&(t=(new TextDecoder).decode(e.data));const{messageId:n,payload:i,success:r,error:o}=JSON.parse(t),{resolve:s,reject:a}=this.responseMap.get(n)??{};s&&a?(this.responseMap.delete(n),r?s(i):a(o)):(console.log("Could not find id in responseMap."),console.log(e))})),this.rtc.channels.request.addEventListener("message",(async e=>{let{data:n}=e;e.data instanceof ArrayBuffer&&(n=(new TextDecoder).decode(e.data));const{messageId:i,action:r,payload:o}=JSON.parse(n);if($e(this,Le,"f"))try{const e=await $e(this,Le,"f").call(this,r,o,t);this.rtc.channels.response.send(JSON.stringify({messageId:i,payload:e,success:!0}))}catch(e){"open"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,error:(0,Ge.errorToPOJO)(e),success:!1}))}else"open"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,success:!1,error:"Connection not ready."}))})),this.rtc.rtcClient.addEventListener("connectionstatechange",this.connectionStateChangeHandler),Object.values(this.rtc.channels).forEach((e=>{e.onclose=e=>{[...this.responseMap.values()].forEach((e=>e.reject(new Error("RTCDataChannel closed unexpectedly, this is most commonly caused by message size. Note: RTC Channels have a message size limit of ~255kB.")))),this.close(),$e(this,Te,"f")&&$e(this,Te,"f").call(this)}}))}onDisconnect(e){if($e(this,Te,"f"))throw new Error("RTCEndpoint disconnectListener cannot be set twice.");Be(this,Te,e,"f")}receive(e){if($e(this,Le,"f"))throw new Error("You have already set a listener for this RTC Endpoint.");Be(this,Le,e,"f")}get connected(){return"connected"===this.rtc.rtcClient.connectionState}},Le=new WeakMap,Te=new WeakMap;var We,He,Ne,De={},Ue=s&&s.__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)},Ve=s&&s.__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};Object.defineProperty(De,"__esModule",{value:!0}),De.EndpointStrategy=void 0;De.EndpointStrategy=class{constructor(e,t,n){this.EndpointType=e,this.StrategyName=n,We.set(this,null),He.set(this,new Map),Ne.set(this,!0),this.send=async(e,t,n)=>this.getEndpointById(e).send(t,n),this.close=async()=>{Ue(this,Ne,"f")&&(Ue(this,He,"f").forEach((e=>e.close())),Ve(this,He,new Map,"f")),Ve(this,Ne,!1,"f")},this.isValidEndpointPayload=t}onEndpointDisconnect(e,t){this.getEndpointById(e).onDisconnect(t)}receive(e){if(Ue(this,We,"f"))throw new Error(`You have already set a listener for this ${this.StrategyName} Strategy`);Ve(this,We,e,"f"),Ue(this,He,"f").forEach((e=>e.receive(Ue(this,We,"f"))))}getEndpointById(e){const t=Ue(this,He,"f").get(e);if(!t)throw new Error(`Client with endpoint id ${e} is not connected`);return t}get connected(){return Ue(this,Ne,"f")}isEndpointConnected(e){return Ue(this,He,"f").has(e)}addEndpoint(e,t){if(!Ue(this,Ne,"f"))return void console.warn(`Adding endpoint to disconnected ${this.StrategyName} Strategy`);const n=new this.EndpointType(t);Ue(this,We,"f")&&n.receive(Ue(this,We,"f")),Ue(this,He,"f").set(e,n)}async closeEndpoint(e){Ue(this,He,"f").delete(e)}},We=new WeakMap,He=new WeakMap,Ne=new WeakMap,Object.defineProperty(Fe,"__esModule",{value:!0}),Fe.RTCInfo=Fe.RTCStrategy=void 0;const ze=je,Ke=De;class qe extends Ke.EndpointStrategy{constructor(){super(ze.RTCEndpoint,ze.RTCEndpoint.isValidEndpointPayload,"RTC")}}Fe.RTCStrategy=qe,Fe.RTCInfo={version:2,minimumVersion:0,type:"rtc"};var Je={};Object.defineProperty(Je,"__esModule",{value:!0}),Je.RTCICEManager=void 0;const Ye=d;class Ze extends Ye.EmitterBase{constructor(e){super(e,"channel"),this.ensureChannelOpened=e=>new Promise(((t,n)=>{if("open"===e.readyState)t();else if("connecting"===e.readyState){const n=()=>{e.removeEventListener("open",n),t()};e.addEventListener("open",n)}else n(new Error("This Channel has already closed"))}))}static createDataChannelPromise(e,t){let n;const i=new Promise((e=>{n=e})),r=i=>{const o=()=>{i.channel.removeEventListener("open",o),n(i.channel)};i.channel.label===e&&(i.channel.addEventListener("open",o),t.removeEventListener("datachannel",r))};return t.addEventListener("datachannel",r),i}async listenForProviderIce(e,t){await this.on(this.createProviderEventName(e),t,{timestamp:Date.now()})}async raiseProviderIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createProviderEventName(e)),t)}async listenForClientIce(e,t){await this.on(this.createClientEventName(e),t,{timestamp:Date.now()})}async raiseClientIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createClientEventName(e)),t)}cleanupIceListeners(e){this.removeAllListeners(this.createClientEventName(e)),this.removeAllListeners(this.createProviderEventName(e))}createClientEventName(e){return`ice-client-${e}`}createProviderEventName(e){return`ice-provider-${e}`}createRouteString(e){return`channel/${e}`}createRtcPeer(){return this.wire.environment.getRtcPeer()}async startClientOffer(){const e=Math.random().toString(),t=this.createRtcPeer();t.addEventListener("icecandidate",(async t=>{t.candidate&&await this.raiseClientIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForProviderIce(e,(async e=>{await t.addIceCandidate(e.candidate)}));const n={request:t.createDataChannel("request"),response:t.createDataChannel("response")},i=await t.createOffer();await t.setLocalDescription(i);const r=Promise.all([n.request,n.response].map(this.ensureChannelOpened)).then((()=>{}));return{rtcClient:t,channels:n,offer:i,rtcConnectionId:e,channelsOpened:r}}async finishClientOffer(e,t,n){return await e.setRemoteDescription(t),await n,!0}async createProviderAnswer(e,t){const n=this.createRtcPeer(),i=Ze.createDataChannelPromise("request",n),r=Ze.createDataChannelPromise("response",n);n.addEventListener("icecandidate",(async t=>{t.candidate&&await this.raiseProviderIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForClientIce(e,(async e=>{await n.addIceCandidate(e.candidate)})),await n.setRemoteDescription(t);const o=await n.createAnswer();await n.setLocalDescription(o);const s=Promise.all([i,r]).then((([t,n])=>(this.cleanupIceListeners(e),{request:t,response:n})));return{rtcClient:n,answer:o,channels:s}}}Je.RTCICEManager=Ze;var Qe={},Xe={};function et(e){return[...e.split(".").reverse().entries()].reduce(((e,[t,n])=>e+ +n*1e4**t),0)}function tt(e,t){return et(e)>=et(t)}function nt(e){return e.split("/")[0]}Object.defineProperty(Xe,"__esModule",{value:!0}),Xe.runtimeUuidMeetsMinimumRuntimeVersion=Xe.parseRuntimeUuid=Xe.meetsMinimumRuntimeVersion=void 0,Xe.meetsMinimumRuntimeVersion=tt,Xe.parseRuntimeUuid=nt,Xe.runtimeUuidMeetsMinimumRuntimeVersion=function(e,t){return tt(nt(e),t)};var it,rt,ot,st,at,ct=s&&s.__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)},dt=s&&s.__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};Object.defineProperty(Qe,"__esModule",{value:!0}),Qe.ChannelProvider=void 0;const ht=pe,lt=Xe;class ut extends ht.ChannelBase{get connections(){return[...ct(this,it,"f")]}static handleClientDisconnection(e,t){const n=e.connections.find((e=>e.endpointId===t.endpointId));if(n)ct(e,st,"f").call(e,n);else{e.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name)).forEach(ct(e,st,"f"))}e.disconnectListener(t)}static setProviderRemoval(e,t){ut.removalMap.set(e,t)}constructor(e,t,n){super(),it.set(this,void 0),rt.set(this,void 0),ot.set(this,void 0),st.set(this,(e=>{const t=this.connections.filter((t=>t.endpointId!==e.endpointId));ct(this,ot,"f").closeEndpoint(e.endpointId),dt(this,it,t,"f")})),this.processAction=async(e,t,n)=>(ut.clientIsMultiRuntime(n)&&!(0,lt.runtimeUuidMeetsMinimumRuntimeVersion)(n.runtimeUuid,"18.87.56.0")?this.handleMultiRuntimeLegacyClient(n):this.checkForClientConnection(n),super.processAction(e,t,n)),at.set(this,(()=>{ct(this,ot,"f").close();const e=ut.removalMap.get(this);e&&e()})),dt(this,rt,new ht.ProtectedItems(e,t),"f"),this.connectListener=()=>{},this.disconnectListener=()=>{},dt(this,it,[],"f"),dt(this,ot,n,"f"),n.receive(this.processAction)}dispatch(e,t,n){const i=e.endpointId??this.getEndpointIdForOpenFinId(e,t);return i&&ct(this,ot,"f").isEndpointConnected(i)?ct(this,ot,"f").send(i,t,n):Promise.reject(new Error(`Client connection with identity uuid: ${e.uuid} / name: ${e.name} / endpointId: ${i} no longer connected.`))}async processConnection(e,t){return ct(this,it,"f").push(e),this.connectListener(e,t)}publish(e,t){return this.connections.map((n=>ct(this,ot,"f").send(n.endpointId,e,t)))}onConnection(e){this.connectListener=e}onDisconnection(e){this.disconnectListener=e}async destroy(){const e=ct(this,rt,"f");e.providerIdentity,dt(this,it,[],"f"),await e.close(),ct(this,at,"f").call(this)}async getAllClientInfo(){return this.connections.map((e=>{const{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}=e;return{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}}))}checkForClientConnection(e){if(!this.isClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider.\n Client Identity: {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}isClientConnected(e){return ut.clientIdentityIncludesEndpointId(e)?this.connections.some((t=>t.endpointId===e.endpointId&&t.uuid===e.uuid&&t.name===e.name)):this.isLegacyClientConnected(e)}isLegacyClientConnected(e){return this.connections.some((t=>t.uuid===e.uuid&&t.name===e.name))}handleMultiRuntimeLegacyClient(e){if(!this.isLegacyClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider. Client Identity:\n {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}getEndpointIdForOpenFinId(e,t){const n=this.connections.filter((t=>t.name===e.name&&t.uuid===e.uuid));if(n.length>=2){const n=ct(this,rt,"f"),{uuid:i,name:r}=e,o=n?.providerIdentity.uuid,s=n?.providerIdentity.name;console.warn(`WARNING: Dispatch call may have unintended results. The "to" argument of your dispatch call is missing the\n "endpointId" parameter. The identity you are dispatching to ({uuid: ${i}, name: ${r}})\n has multiple channelClients for this channel. Your dispatched action: (${t}) from the provider:\n ({uuid: ${o}, name: ${s}}) will only be processed by the most recently-created client.`)}return n.pop()?.endpointId}static clientIdentityIncludesEndpointId(e){return void 0!==e.endpointId}static clientIsMultiRuntime(e){return void 0!==e.runtimeUuid}static async wireClose(e,t){await e.sendAction("destroy-channel",{channelName:t})}}Qe.ChannelProvider=ut,it=new WeakMap,rt=new WeakMap,ot=new WeakMap,st=new WeakMap,at=new WeakMap,ut.removalMap=new WeakMap;var pt={};Object.defineProperty(pt,"__esModule",{value:!0}),pt.MessageReceiver=void 0;const wt=ue,yt=d;class ft extends yt.Base{constructor(e){super(e),this.onmessage=e=>"process-channel-message"===e.action&&(this.processChannelMessage(e),!0),this.endpointMap=new Map,this.latestEndpointIdByChannelId=new Map,e.registerMessageHandler(this.onmessage.bind(this))}async processChannelMessage(e){const{senderIdentity:t,providerIdentity:n,action:i,ackToSender:r,payload:o,intendedTargetIdentity:s}=e.payload,a=s.channelId??s.endpointId??this.latestEndpointIdByChannelId.get(n.channelId),c=this.endpointMap.get(a);if(!c)return r.payload.success=!1,r.payload.reason=`Client connection with identity uuid: ${this.wire.me.uuid} / name: ${this.wire.me.name} / endpointId: ${a} no longer connected.`,this.wire.sendRaw(r);try{const e=await c(i,o,t);return r.payload.payload=r.payload.payload||{},r.payload.payload.result=e,this.wire.sendRaw(r)}catch(e){return r.payload.success=!1,r.payload.reason=e.message,this.wire.sendRaw(r)}}addEndpoint(e,t,n){this.endpointMap.set(n,e),t!==n&&this.latestEndpointIdByChannelId.set(t,n)}removeEndpoint(e,t){this.endpointMap.delete(t),this.latestEndpointIdByChannelId.get(e)===t&&this.latestEndpointIdByChannelId.delete(e)}checkForPreviousClientConnection(e){const t=this.latestEndpointIdByChannelId.get(e);t&&(wt.ChannelClient.closeChannelByEndpointId(t),console.warn("You have created a second connection to an older provider. First connection has been removed from the clientMap"),console.warn("If the provider calls publish(), you may receive multiple messages."))}}pt.MessageReceiver=ft;var gt={};Object.defineProperty(gt,"__esModule",{value:!0}),gt.ProtocolManager=void 0;gt.ProtocolManager=class{constructor(e){this.ProtocolsInPreferenceOrder=e,this.DefaultClientProtocols=["classic"],this.DefaultProviderProtocols=["classic"],this.getClientProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultClientProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(", ")}.`);return t},this.getProviderProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultProviderProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(", ")}.`);return t},this.getCompatibleProtocols=(e,t)=>t.supportedProtocols.filter((t=>e.some((e=>e.type===t.type&&t.version>=e.minimumVersion&&e.version>=(t.minimumVersion??0))))).slice(0,t.maxProtocols)}};var mt={};Object.defineProperty(mt,"__esModule",{value:!0});class vt{static combine(e,t){return new vt(e,t)}constructor(e,t){this.primary=e,this.secondary=t}onEndpointDisconnect(e,t){this.primary.onEndpointDisconnect(e,(()=>{this.secondary.isEndpointConnected(e)||t()})),this.secondary.onEndpointDisconnect(e,(()=>{this.primary.isEndpointConnected(e)||t()}))}isValidEndpointPayload(e){return this.primary.isValidEndpointPayload(e)||this.secondary.isValidEndpointPayload(e)}async closeEndpoint(e){await this.primary.closeEndpoint(e),await this.secondary.closeEndpoint(e)}isEndpointConnected(e){return this.primary.isEndpointConnected(e)||this.secondary.isEndpointConnected(e)}async addEndpoint(e,t){this.primary.isValidEndpointPayload(t)&&await this.primary.addEndpoint(e,t),this.secondary.isValidEndpointPayload(t)&&await this.secondary.addEndpoint(e,t)}receive(e){this.primary.receive(e),this.secondary.receive(e)}send(e,t,n){return this.primary.isEndpointConnected(e)?this.primary.send(e,t,n):this.secondary.send(e,t,n)}async close(){await Promise.all([this.primary.close(),this.secondary.close()])}}mt.default=vt;var Ct,bt,It=s&&s.__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},Et=s&&s.__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)},xt=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(xe,"__esModule",{value:!0}),xe.ConnectionManager=void 0;const At=Ae,Pt=d,Mt=Oe,_t=Fe,Ot=Je,St=Qe,Rt=pt,Ft=gt,jt=xt(mt);class kt extends Pt.Base{static getProtocolOptionsFromStrings(e){return e.map((e=>{switch(e){case"rtc":return _t.RTCInfo;case"classic":return Mt.ClassicInfo;default:return(0,At.exhaustiveCheck)(e,["rtc","classic"])}}))}constructor(e){super(e),Ct.set(this,void 0),bt.set(this,void 0),this.removeChannelFromProviderMap=e=>{this.providerMap.delete(e)},this.onmessage=e=>"process-channel-connection"===e.action&&(this.processChannelConnection(e),!0),this.providerMap=new Map,this.protocolManager=new Ft.ProtocolManager("node"===this.wire.environment.type?["classic"]:["rtc","classic"]),It(this,Ct,new Rt.MessageReceiver(e),"f"),It(this,bt,new Ot.RTCICEManager(e),"f"),e.registerMessageHandler(this.onmessage.bind(this))}createProvider(e,t){const n=Object.assign(this.wire.environment.getDefaultChannelOptions().create,e||{}),i=this.protocolManager.getProviderProtocols(n?.protocols),r=i.map((e=>{switch(e){case"rtc":return new _t.RTCStrategy;case"classic":return new Mt.ClassicStrategy(this.wire,Et(this,Ct,"f"),t.channelId,t);default:return(0,At.exhaustiveCheck)(e,["rtc","classic"])}}));let o;if(2===r.length){const[e,t]=r;o=jt.default.combine(e,t)}else{if(1!==r.length)throw new Error("failed to combine strategies");[o]=r}const s=new St.ChannelProvider(t,(()=>St.ChannelProvider.wireClose(this.wire,t.channelName)),o),a=t.channelId;return this.providerMap.set(a,{provider:s,strategy:o,supportedProtocols:kt.getProtocolOptionsFromStrings(i)}),St.ChannelProvider.setProviderRemoval(s,this.removeChannelFromProviderMap.bind(this)),s}async createClientOffer(e){const t=this.protocolManager.getClientProtocols(e?.protocols);let n;return{offer:{supportedProtocols:await Promise.all(t.map((async e=>{switch(e){case"rtc":{const{rtcClient:e,channels:t,offer:i,rtcConnectionId:r,channelsOpened:o}=await Et(this,bt,"f").startClientOffer();return n={rtcClient:e,channels:t,channelsOpened:o},{type:"rtc",version:_t.RTCInfo.version,payload:{offer:i,rtcConnectionId:r}}}case"classic":return{type:"classic",version:Mt.ClassicInfo.version};default:return(0,At.exhaustiveCheck)(e,["rtc","classic"])}}))),maxProtocols:2},rtc:n}}async createClientStrategy(e,t){t.endpointId||(t.endpointId=this.wire.environment.getNextMessageId(),Et(this,Ct,"f").checkForPreviousClientConnection(t.channelId));const n=t.answer??{supportedProtocols:[{type:"classic",version:1}]},i=(await Promise.all(n.supportedProtocols.map((async n=>"rtc"===n.type&&e?(await Et(this,bt,"f").finishClientOffer(e.rtcClient,n.payload.answer,e.channelsOpened),new _t.RTCStrategy):"classic"===n.type?new Mt.ClassicStrategy(this.wire,Et(this,Ct,"f"),t.endpointId,t):null)))).filter((e=>null!==e));let r;if(e&&!i.some((e=>e instanceof _t.RTCStrategy))&&e&&e.rtcClient.close(),i.length>=2)r=jt.default.combine(i[0],i[1]);else{if(!i.length)throw new Error("No compatible protocols");[r]=i}const o={endpointIdentity:t,rtc:e};return r.addEndpoint(t.channelId,o),r}async processChannelConnection(e){const{clientIdentity:t,providerIdentity:n,ackToSender:i,payload:r,offer:o}=e.payload;t.endpointId?t.isLocalEndpointId=!1:(t.endpointId=this.wire.environment.getNextMessageId(),t.isLocalEndpointId=!0);const s=n.channelId,a=this.providerMap.get(s);if(!a)return i.payload.success=!1,i.payload.reason=`Channel "${n.channelName}" has been destroyed.`,this.wire.sendRaw(i);const{provider:c,strategy:d,supportedProtocols:h}=a;try{if(!(c instanceof St.ChannelProvider))throw Error("Cannot connect to a channel client");const e=o??{supportedProtocols:[{type:"classic",version:1}],maxProtocols:1},n=this.protocolManager.getCompatibleProtocols(h,e);if(!n.length)throw new Error("This provider does not support any of the offered protocols.");const s=await c.processConnection(t,r);i.payload.payload=i.payload.payload||{};let a={supportedProtocols:[],endpointPayloadPromise:Promise.resolve({endpointIdentity:t})};return a=await n.reduce((async(e,t)=>{const n=await e;if("rtc"===t.type){const{answer:e,rtcClient:i,channels:r}=await Et(this,bt,"f").createProviderAnswer(t.payload.rtcConnectionId,t.payload.offer);n.supportedProtocols.push({type:"rtc",version:_t.RTCInfo.version,payload:{answer:e}}),n.endpointPayloadPromise=n.endpointPayloadPromise.then((e=>r.then((t=>({...e,rtc:{rtcClient:i,channels:t}})))))}else n.supportedProtocols.push({type:"classic",version:Mt.ClassicInfo.version});return n}),Promise.resolve(a)),a.endpointPayloadPromise.then((e=>d.addEndpoint(t.endpointId,e))),i.payload.payload.result=s,i.payload.payload.answer=a,this.wire.sendRaw(i)}catch(e){return i.payload.success=!1,i.payload.reason=e.message,this.wire.sendRaw(i)}}}xe.ConnectionManager=kt,Ct=new WeakMap,bt=new WeakMap;var Lt,Tt,$t,Bt=s&&s.__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},Gt=s&&s.__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)};Object.defineProperty(le,"__esModule",{value:!0}),le.Channel=void 0;const Wt=t,Ht=G,Nt=d,Dt=ue,Ut=xe,Vt=Qe;function zt(e){const t=Math.floor(e/10),n=Math.min(3e4,500*2**t);return new Promise((e=>{setTimeout((()=>{e(!1)}),n)}))}class Kt extends Nt.EmitterBase{constructor(e){super(e,"channel"),Lt.set(this,void 0),Tt.set(this,new Wt.EventEmitter),$t.set(this,new Ht.AsyncRetryableLazy((async()=>{await Promise.all([this.on("disconnected",(e=>{Dt.ChannelClient.handleProviderDisconnect(e)})),this.on("connected",((...e)=>{Gt(this,Tt,"f").emit("connected",...e)}))]).catch((()=>new Error("error setting up channel connection listeners")))}))),Bt(this,Lt,new Ut.ConnectionManager(e),"f")}async getAllChannels(){return this.wire.sendAction("get-all-channels").then((({payload:e})=>e.data))}async onChannelConnect(e){await this.on("connected",e)}async onChannelDisconnect(e){await this.on("disconnected",e)}async safeConnect(e,t,n){const i={count:0};do{let r=()=>{};const o=new Promise((t=>{r=n=>{e===n.channelName&&t(!0)},Gt(this,Tt,"f").on("connected",r)}));try{if(i.count>0){i.gotConnectedEvent=await Promise.race([zt(i.count),o]);const t=await this.wire.sendAction("connect-to-channel",{...n,retryInfo:i});return console.log(`Successfully connected to channelName: ${e}`),t.payload.data}const t=this.wire.sendAction("connect-to-channel",n);i.originalMessageId=t.messageId;return(await t).payload.data}catch(n){if(!n.message.includes("internal-nack"))throw n;t&&0===i.count&&console.warn(`No channel found for channelName: ${e}. Waiting for connection...`)}finally{i.count+=1,Gt(this,Tt,"f").removeListener("connected",r)}}while(t);throw new Error(`No channel found for channelName: ${e}.`)}async connect(e,t={}){if(await Gt(this,$t,"f").getValue(),!e||"string"!=typeof e)throw new Error("Please provide a channelName string to connect to a channel.");const n={wait:!0,...this.wire.environment.getDefaultChannelOptions().connect,...t},{offer:i,rtc:r}=await Gt(this,Lt,"f").createClientOffer(n);let o;(this.fin.me.isFrame||this.fin.me.isView||this.fin.me.isWindow)&&(o=(await this.fin.me.getInfo()).url);const s={channelName:e,...n,offer:i,connectionUrl:o},a=await this.safeConnect(e,n.wait,s),c=await Gt(this,Lt,"f").createClientStrategy(r,a),d=new Dt.ChannelClient(a,(()=>Dt.ChannelClient.wireClose(this.wire,a,a.endpointId)),c);return c.onEndpointDisconnect(a.channelId,(async()=>{try{await d.sendDisconnectAction()}catch(e){console.warn(`Something went wrong during disconnect for client with uuid: ${a.uuid} / name: ${a.name} / endpointId: ${a.endpointId}.`)}finally{Dt.ChannelClient.handleProviderDisconnect(a)}})),d}async create(e,t){if(!e)throw new Error("Please provide a channelName to create a channel");const{payload:{data:n}}=await this.wire.sendAction("create-channel",{channelName:e}),i=Gt(this,Lt,"f").createProvider(t,n);return this.on("client-disconnected",(t=>{t.channelName===e&&Vt.ChannelProvider.handleClientDisconnection(i,t)})),i}}le.Channel=Kt,Lt=new WeakMap,Tt=new WeakMap,$t=new WeakMap,Object.defineProperty(de,"__esModule",{value:!0}),de.InterAppPayload=de.InterApplicationBus=void 0;const qt=t,Jt=d,Yt=he,Zt=le,Qt=O;class Xt extends Jt.Base{constructor(e){super(e),this.events={subscriberAdded:"subscriber-added",subscriberRemoved:"subscriber-removed"},this.refCounter=new Yt.RefCounter,this.Channel=new Zt.Channel(e),this.emitter=new qt.EventEmitter,e.registerMessageHandler(this.onmessage.bind(this)),this.on=this.emitter.on.bind(this.emitter),this.removeAllListeners=this.emitter.removeAllListeners.bind(this.emitter)}async publish(e,t){await this.wire.sendAction("publish-message",{topic:e,message:t,sourceWindowName:this.me.name})}async send(e,t,n){const i=(0,Qt.validateIdentity)(e);if(i)throw new Error(i);await this.wire.sendAction("send-message",{destinationUuid:e.uuid,destinationWindowName:e.name,topic:t,message:n,sourceWindowName:this.me.name})}subscribe(e,t,n){const i=this.createSubscriptionKey(e.uuid,e.name||"*",t);return this.emitter.on(i,n),this.refCounter.actOnFirst(i,(async()=>{await this.wire.sendAction("subscribe",{sourceUuid:e.uuid,sourceWindowName:e.name||"*",topic:t,destinationWindowName:this.me.name})}),(()=>Promise.resolve()))}unsubscribe(e,t,n){const i=e.name||"*",r=this.createSubscriptionKey(e.uuid,i,t);return this.emitter.removeListener(r,n),this.refCounter.actOnLast(r,(async()=>{await this.wire.sendAction("unsubscribe",{sourceUuid:e.uuid,sourceWindowName:i,topic:t,destinationWindowName:this.me.name})}),(()=>new Promise((e=>e)).then((()=>{}))))}processMessage(e){const{payload:{message:t,sourceWindowName:n,sourceUuid:i,topic:r}}=e,o=[this.createSubscriptionKey(i,n,r),this.createSubscriptionKey(i,"*",r),this.createSubscriptionKey("*","*",r)],s={uuid:i,name:n};o.forEach((e=>{this.emitter.emit(e,t,s)}))}emitSubscriverEvent(e,t){const{payload:{targetName:n,uuid:i,topic:r}}=t,o={name:n,uuid:i,topic:r};this.emitter.emit(e,o)}createSubscriptionKey(e,t,n){const i=t||"*";if(!(e&&i&&n))throw new Error("Missing uuid, name, or topic string");return function(...e){return e.map((e=>Buffer.from(`${e}`).toString("base64"))).join("/")}(e,i,n)}onmessage(e){const{action:t}=e;switch(t){case"process-message":this.processMessage(e);break;case this.events.subscriberAdded:this.emitSubscriverEvent(this.events.subscriberAdded,e);break;case this.events.subscriberRemoved:this.emitSubscriverEvent(this.events.subscriberRemoved,e)}return!0}}de.InterApplicationBus=Xt;de.InterAppPayload=class{};var en={};Object.defineProperty(en,"__esModule",{value:!0}),en.Clipboard=void 0;const tn=d;class nn extends tn.Base{async writeText(e){await this.wire.sendAction("clipboard-write-text",e)}async readText(e){const{payload:t}=await this.wire.sendAction("clipboard-read-text",{type:e});return t.data}async writeImage(e){await this.wire.sendAction("clipboard-write-image",e)}async readImage(e={format:"dataURL"}){const{payload:t}=await this.wire.sendAction("clipboard-read-image",e);return t.data}async writeHtml(e){await this.wire.sendAction("clipboard-write-html",e)}async readHtml(e){const{payload:t}=await this.wire.sendAction("clipboard-read-html",{type:e});return t.data}async writeRtf(e){await this.wire.sendAction("clipboard-write-rtf",e)}async readRtf(e){const{payload:t}=await this.wire.sendAction("clipboard-read-rtf",{type:e});return t.data}async write(e){await this.wire.sendAction("clipboard-write",e)}async getAvailableFormats(e){const{payload:t}=await this.wire.sendAction("clipboard-read-formats",{type:e});return t.data}}en.Clipboard=nn;var rn={},on={},sn={};Object.defineProperty(sn,"__esModule",{value:!0}),sn.ExternalApplication=void 0;const an=d;class cn extends an.EmitterBase{constructor(e,t){super(e,"external-application",t.uuid),this.identity=t}getInfo(){return this.wire.sendAction("get-external-application-info",this.identity).then((({payload:e})=>e.data))}}sn.ExternalApplication=cn,Object.defineProperty(on,"__esModule",{value:!0}),on.ExternalApplicationModule=void 0;const dn=d,hn=sn;class ln extends dn.Base{wrap(e){return this.wire.sendAction("external-application-wrap").catch((e=>{})),Promise.resolve(new hn.ExternalApplication(this.wire,{uuid:e}))}wrapSync(e){return this.wire.sendAction("external-application-wrap-sync").catch((e=>{})),new hn.ExternalApplication(this.wire,{uuid:e})}}on.ExternalApplicationModule=ln,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(on,e),n(sn,e)}(rn);var un={},pn={},wn={};Object.defineProperty(wn,"__esModule",{value:!0}),wn._Frame=void 0;const yn=d;class fn extends yn.EmitterBase{constructor(e,t){super(e,"frame",t.uuid,t.name),this.identity=t}getInfo(){return this.wire.sendAction("get-frame-info",this.identity).then((({payload:e})=>e.data))}getParentWindow(){return this.wire.sendAction("get-parent-window",this.identity).then((({payload:e})=>e.data))}}wn._Frame=fn,Object.defineProperty(pn,"__esModule",{value:!0}),pn._FrameModule=void 0;const gn=d,mn=O,vn=wn;class Cn extends gn.Base{async wrap(e){this.wire.sendAction("frame-wrap").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}wrapSync(e){this.wire.sendAction("frame-wrap-sync").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}getCurrent(){return this.wire.sendAction("frame-get-current").catch((e=>{})),Promise.resolve(new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity()))}getCurrentSync(){return this.wire.sendAction("frame-get-current-sync").catch((e=>{})),new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity())}}pn._FrameModule=Cn,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(pn,e),n(wn,e)}(un);var bn={};Object.defineProperty(bn,"__esModule",{value:!0}),bn.GlobalHotkey=void 0;const In=d;class En extends In.EmitterBase{constructor(e){super(e,"global-hotkey")}async register(e,t){await this.on(e,t),await this.wire.sendAction("global-hotkey-register",{hotkey:e})}async unregister(e){await this.removeAllListeners(e),await this.wire.sendAction("global-hotkey-unregister",{hotkey:e})}async unregisterAll(){await Promise.all(this.eventNames().filter((e=>!("registered"===e||"unregistered"===e))).map((e=>this.removeAllListeners(e)))),await this.wire.sendAction("global-hotkey-unregister-all",{})}async isRegistered(e){const{payload:{data:t}}=await this.wire.sendAction("global-hotkey-is-registered",{hotkey:e});return t}}bn.GlobalHotkey=En;var xn,An={},Pn={},Mn={},_n=s&&s.__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)};Object.defineProperty(Mn,"__esModule",{value:!0}),Mn.Platform=void 0;const On=d,Sn=O,Rn=new Map;class Fn extends On.EmitterBase{constructor(e,t){super(t.wire,"application",e.uuid),this.getClient=e=>{this.wire.sendAction("platform-get-client",this.identity).catch((e=>{}));const t=e||this.identity,{uuid:n}=t;if(!Rn.has(n)){const e=_n(this,xn,"f").call(this,n);Rn.set(n,e)}return Rn.get(n)},xn.set(this,(async e=>{try{const t=`custom-frame-${e}`,n=await this._channel.connect(t,{wait:!1});return n.onDisconnection((()=>{Rn.delete(e)})),n}catch(t){throw Rn.delete(e),new Error("The targeted Platform is not currently running. Listen for application-started event for the given Uuid.")}})),this.launchLegacyManifest=this.launchContentManifest;const n=(0,Sn.validateIdentity)(e);if(n)throw new Error(n);this._channel=t,this.identity={uuid:e.uuid},this.Layout=this.fin.Platform.Layout,this.Application=this.fin.Application.wrapSync(this.identity)}async createView(e,t,n){this.wire.sendAction("platform-create-view",this.identity).catch((e=>{}));const i=await this.getClient(),r=await i.dispatch("create-view",{target:t,opts:e,targetView:n});if(!r||(0,Sn.validateIdentity)(r.identity))throw new Error(`When overwriting the createView call, please return an object that has a valid 'identity' property: ${JSON.stringify(r)}`);return this.fin.View.wrapSync(r.identity)}async createWindow(e){this.wire.sendAction("platform-create-window",this.identity).catch((e=>{}));const t=await this.getClient();e.reason||(e.reason="api-call");const n=await t.dispatch("create-view-container",e);if(!n||(0,Sn.validateIdentity)(n.identity))throw new Error(`When overwriting the createWindow call, please return an object that has a valid 'identity' property: ${JSON.stringify(n)}`);const{identity:i}=n,r=this.fin.Window.wrapSync(i);return r.name=i.name,r.uuid=i.uuid,r}async quit(){this.wire.sendAction("platform-quit",this.identity).catch((e=>{}));return(await this.getClient()).dispatch("quit")}async closeView(e){this.wire.sendAction("platform-close-view",this.identity).catch((e=>{}));const t=await this.getClient();await t.dispatch("close-view",{view:e})}async reparentView(e,t){console.warn("Platform.reparentView has been deprecated, please use Platform.createView"),this.wire.sendAction("platform-reparent-view",this.identity).catch((e=>{}));const n={...e,uuid:e.uuid??this.identity.uuid},i=await this.fin.View.wrap(n),r=await i.getOptions();return this.createView(r,t)}async getSnapshot(){this.wire.sendAction("platform-get-snapshot",this.identity).catch((e=>{}));return(await this.getClient()).dispatch("get-snapshot")}async getViewSnapshot(e){return(await this.getClient()).dispatch("get-view-snapshot",{viewIdentity:e})}async applySnapshot(e,t){this.wire.sendAction("platform-apply-snapshot",this.identity).catch((e=>{}));const n="Requested snapshot must be a valid Snapshot object, or a url or filepath to such an object.";let i;if("string"==typeof e)try{i=(await this._channel.wire.sendAction("get-application-manifest",{manifestUrl:e})).payload.data}catch(e){throw new Error(`${n}: ${e}`)}else i=e;if(!i.windows)throw new Error(n);const r=await this.getClient();return await r.dispatch("apply-snapshot",{snapshot:i,options:t}),this}async fetchManifest(e){return(await this.getClient()).dispatch("platform-fetch-manifest",{manifestUrl:e})}async launchContentManifest(e){this.wire.sendAction("platform-launch-content-manifest",this.identity).catch((()=>{}));const t=await this.getClient(),n=await this.fetchManifest(e);return t.dispatch("launch-into-platform",{manifest:n,manifestUrl:e}),this}async setWindowContext(e={},t){if(this.wire.sendAction("platform-set-window-context",this.identity).catch((e=>{})),!e)throw new Error("Please provide a serializable object or string to set the context.");const n=await this.getClient(),{entityType:i}=t?await this.fin.System.getEntityInfo(t.uuid,t.name):this.fin.me;await n.dispatch("set-window-context",{context:e,entityType:i,target:t||{uuid:this.fin.me.uuid,name:this.fin.me.name}})}async getWindowContext(e){this.wire.sendAction("platform-get-window-context",this.identity).catch((e=>{}));const t=await this.getClient(),{entityType:n}=e?await this.fin.System.getEntityInfo(e.uuid,e.name):this.fin.me;return t.dispatch("get-window-context",{target:e||{uuid:this.fin.me.uuid,name:this.fin.me.name},entityType:n})}async closeWindow(e,t={skipBeforeUnload:!1}){this.wire.sendAction("platform-close-window",this.identity).catch((e=>{}));return(await this.getClient()).dispatch("close-window",{windowId:e,options:t})}}Mn.Platform=Fn,xn=new WeakMap;var jn={},kn={},Ln={},Tn={};function $n(e){switch(e){case"columns":case"grid":case"rows":case"tabs":return!0;default:return!1}}Object.defineProperty(Tn,"__esModule",{value:!0}),Tn.overrideFromComposables=Tn.isValidPresetType=void 0,Tn.isValidPresetType=$n,Tn.overrideFromComposables=function(...e){return t=>e.reduceRight(((e,t)=>n=>t(e(n))),(e=>e))(t)},Tn.default={isValidPresetType:$n};var Bn={},Gn={},Wn={};Object.defineProperty(Wn,"__esModule",{value:!0}),Wn.ApiConsumer=void 0;Wn.ApiConsumer=class{constructor(e){this.strategy=e,this.consume=async e=>(await this.strategy.getExposedFunctions(e)).reduce(((t,n)=>({...t,[n.key]:this.strategy.createFunction(n,e)})),{})}};var Hn={},Nn={};Object.defineProperty(Nn,"__esModule",{value:!0}),Nn.expose=Nn.getExposedProperties=void 0;const Dn=Symbol("exposedProperties");Nn.getExposedProperties=e=>e[Dn]||e.prototype[Dn]||[];Nn.expose=e=>(t,n,i)=>{t[Dn]=t[Dn]||[],t[Dn].push({key:n,descriptor:i,options:e})},Object.defineProperty(Hn,"__esModule",{value:!0}),Hn.ApiExposer=void 0;const Un=Nn;Hn.ApiExposer=class{constructor(e){this.strategy=e,this.exposeInstance=async(e,t)=>{const n=(0,Un.getExposedProperties)(e),i=await Promise.all(n.map((async({key:n,options:i})=>({key:n,options:await this.strategy.exposeFunction(e[n].bind(e),{key:n,options:i,meta:t})}))));await this.strategy.exposeMeta(t,i)}}};var Vn={},zn={},Kn={};Object.defineProperty(Kn,"__esModule",{value:!0}),Kn.ChannelsConsumer=void 0;Kn.ChannelsConsumer=class{constructor(e){this.channel=e,this.getExposedFunctions=async e=>{const{id:t}=e,{props:n}=await this.channel.dispatch(`api-meta:${t}`);return n},this.createFunction=e=>(...t)=>{const{action:n}=e.options;return this.channel.dispatch(n,{args:t})}}};var qn={};Object.defineProperty(qn,"__esModule",{value:!0}),qn.ChannelsExposer=void 0;qn.ChannelsExposer=class{constructor(e){this.channelProviderOrClient=e,this.exposeFunction=async(e,t)=>{const{key:n,options:i,meta:r}=t,{id:o}=r,s=`${o}.${i?.action||n}`;return await this.channelProviderOrClient.register(s,(async({args:t})=>e(...t))),{action:s}},this.exposeMeta=async({id:e},t)=>{const n=`api-meta:${e}`;await this.channelProviderOrClient.register(n,(()=>({props:t})))}}},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Kn,e),n(qn,e)}(zn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(zn,e)}(Vn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Wn,e),n(Hn,e),n(Vn,e),n(Nn,e)}(Gn);var Jn={};Object.defineProperty(Jn,"__esModule",{value:!0}),Jn.createRelayedDispatch=exports.relayChannelClientApi_1=Jn.relayChannelClientApi=void 0;const Yn=["no longer connected","RTCDataChannel closed unexpectedly","The client you are trying to dispatch from is disconnected from the target provider"];exports.relayChannelClientApi_1=Jn.relayChannelClientApi=async(e,t)=>{e.register(`relay:${t}`,(({action:t,target:n,payload:i})=>e.dispatch(n,t,i))),await Promise.resolve()};Jn.createRelayedDispatch=(e,t,n,i)=>async(r,o)=>{try{return await e.dispatch(`relay:${n}`,{action:r,payload:o,target:t})}catch(e){if(s=e.message,Yn.some((e=>s.includes(e)))&&i)throw new Error(i);throw e}var s};var Zn,Qn,Xn,ei=s&&s.__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},ti=s&&s.__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)};Object.defineProperty(Bn,"__esModule",{value:!0}),Bn.ColumnOrRow=Bn.TabStack=Bn.LayoutNode=void 0;const ni=Gn,ii=Jn;class ri{constructor(e,t){Zn.set(this,void 0),this.isRoot=()=>ti(this,Zn,"f").isRoot(this.entityId),this.exists=()=>ti(this,Zn,"f").exists(this.entityId),this.getParent=async()=>{const e=await ti(this,Zn,"f").getParent(this.entityId);if(e)return ri.getEntity(e,ti(this,Zn,"f"))},this.createAdjacentStack=async(e,t)=>{const n=await ti(this,Zn,"f").createAdjacentStack(this.entityId,e,t);return ri.getEntity({entityId:n,type:"stack"},ti(this,Zn,"f"))},this.getAdjacentStacks=async e=>(await ti(this,Zn,"f").getAdjacentStacks({targetId:this.entityId,edge:e})).map((e=>ri.getEntity({type:"stack",entityId:e.entityId},ti(this,Zn,"f")))),ei(this,Zn,e,"f"),this.entityId=t}}Bn.LayoutNode=ri,Zn=new WeakMap,ri.newLayoutEntitiesClient=async(e,t,n)=>{const i=(0,ii.createRelayedDispatch)(e,n,"layout-relay","You are trying to interact with a layout component on a window that does not exist or has been destroyed.");return new ni.ApiConsumer(new ni.ChannelsConsumer({dispatch:i})).consume({id:t})},ri.getEntity=(e,t)=>{const{entityId:n,type:i}=e;switch(i){case"column":case"row":return new si(t,n,i);case"stack":return new oi(t,n);default:throw new Error(`Unrecognised Layout Entity encountered ('${JSON.stringify(e)})`)}};class oi extends ri{constructor(e,t){super(e,t),Qn.set(this,void 0),this.type="stack",this.getViews=()=>ti(this,Qn,"f").getStackViews(this.entityId),this.addView=async(e,t={index:0})=>ti(this,Qn,"f").addViewToStack(this.entityId,e,t),this.removeView=async e=>{await ti(this,Qn,"f").removeViewFromStack(this.entityId,e)},this.setActiveView=async e=>{await ti(this,Qn,"f").setStackActiveView(this.entityId,e)},ei(this,Qn,e,"f")}}Bn.TabStack=oi,Qn=new WeakMap;class si extends ri{constructor(e,t,n){super(e,t),Xn.set(this,void 0),this.getContent=async()=>(await ti(this,Xn,"f").getContent(this.entityId)).map((e=>ri.getEntity(e,ti(this,Xn,"f")))),ei(this,Xn,e,"f"),this.type=n}}Bn.ColumnOrRow=si,Xn=new WeakMap;var ai={};Object.defineProperty(ai,"__esModule",{value:!0}),ai.DEFAULT_LAYOUT_KEY=ai.LAYOUT_CONTROLLER_ID=void 0,ai.LAYOUT_CONTROLLER_ID="layout-entities",ai.DEFAULT_LAYOUT_KEY="__default__";var ci,di,hi,li=s&&s.__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)};Object.defineProperty(Ln,"__esModule",{value:!0}),Ln.Layout=void 0;const ui=G,pi=O,wi=d,yi=Tn,fi=Bn,gi=ai;class mi extends wi.Base{static getClient(e){return li(e,di,"f").getValue()}constructor(e,t){super(t),ci.add(this),di.set(this,new ui.Lazy((async()=>fi.LayoutNode.newLayoutEntitiesClient(await this.platform.getClient(),gi.LAYOUT_CONTROLLER_ID,this.identity)))),this.replace=async e=>{this.wire.sendAction("layout-replace").catch((e=>{}));const t=await this.platform.getClient();await t.dispatch("replace-layout",{target:this.identity,opts:{layout:e}})},this.replaceView=async(e,t)=>{this.wire.sendAction("layout-replace-view").catch((e=>{}));const n=await this.platform.getClient();await n.dispatch("replace-view",{target:this.identity,opts:{viewToReplace:e,newView:t}})},this.applyPreset=async e=>{this.wire.sendAction("layout-apply-preset").catch((e=>{}));const t=await this.platform.getClient(),{presetType:n}=e;if(!n||!(0,yi.isValidPresetType)(n))throw new Error("Cannot apply preset layout, please include an applicable presetType property in the PresetLayoutOptions.");await t.dispatch("apply-preset-layout",{target:this.identity,opts:{presetType:n}})};const n=(0,pi.validateIdentity)(e);if(n)throw new Error(n);this.identity=e,this.platform=this.fin.Platform.wrapSync({uuid:e.uuid}),e.uuid===this.fin.me.uuid&&e.name===this.fin.me.name&&(this.init=this.fin.Platform.Layout.init)}async getConfig(){this.wire.sendAction("layout-get-config").catch((e=>{}));return(await this.platform.getClient()).dispatch("get-frame-snapshot",{target:this.identity})}async getCurrentViews(){this.wire.sendAction("layout-get-views").catch((e=>{}));const e=await this.platform.getClient();return(await e.dispatch("get-layout-views",{target:this.identity})).map((e=>this.fin.View.wrapSync(e)))}async getRootItem(){this.wire.sendAction("layout-get-root-item").catch((()=>{}));const e=await li(this,di,"f").getValue(),t=await e.getRoot("layoutName"in this.identity?this.identity:void 0);return fi.LayoutNode.getEntity(t,e)}async getStackByViewIdentity(e){this.wire.sendAction("layout-get-stack-by-view").catch((()=>{}));const t=await li(this,di,"f").getValue(),n=await t.getStackByView(e);if(!n)throw new Error(`No stack found for view: ${e.uuid}/${e.name}`);return fi.LayoutNode.getEntity(n,t)}async addView(e,{location:t,targetView:n}={}){this.wire.sendAction("layout-add-view").catch((e=>{}));const{identity:i}=await li(this,ci,"m",hi).call(this,"layout-add-view",{viewOptions:e,location:t,targetView:n});return{identity:i}}async closeView(e){this.wire.sendAction("layout-close-view").catch((e=>{})),await li(this,ci,"m",hi).call(this,"layout-close-view",{viewIdentity:e})}}Ln.Layout=mi,di=new WeakMap,ci=new WeakSet,hi=async function(e,t){return(await this.platform.getClient()).dispatch(e,{target:this.identity,opts:t})};var vi,Ci,bi,Ii,Ei,xi=s&&s.__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)},Ai=s&&s.__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};Object.defineProperty(kn,"__esModule",{value:!0}),kn.LayoutModule=void 0;const Pi=d,Mi=Ln,_i=ai;class Oi extends Pi.Base{constructor(){super(...arguments),vi.add(this),Ci.set(this,!1),bi.set(this,null),this.init=async(e={})=>{if(this.wire.sendAction("layout-init").catch((e=>{})),!this.wire.environment.layoutAllowedInContext(this.fin))throw new Error("Layout.init can only be called from a Window context.");if(xi(this,Ci,"f"))throw new Error("Layout.init was already called, please use Layout.create to add additional layouts.");"openfin"===this.wire.environment.type&&await this.fin.Platform.getCurrentSync().getClient(),Ai(this,Ci,!0,"f"),Ai(this,bi,await this.wire.environment.initLayoutManager(this.fin,this.wire,e),"f"),await this.wire.environment.applyLayoutSnapshot(this.fin,xi(this,bi,"f"),e);const t={name:this.fin.me.name,uuid:this.fin.me.uuid};if(!e.layoutManagerOverride){const e={layoutName:_i.DEFAULT_LAYOUT_KEY,...t};return xi(this,Ii,"f").call(this,e)}return this.wrapSync(t)},Ii.set(this,(e=>{const t="[Layout] You are using a deprecated property `layoutManager` - it will throw if you access it starting in v37.",n=new Proxy({},{get(e,n){throw console.warn(`[Layout-mgr-proxy] accessing ${n.toString()}`),new Error(t)}}),i=Object.assign(this.wrapSync(e),{layoutManager:n});return new Proxy(i,{get(e,n){if("layoutManager"===n)throw console.warn(`[Layout-proxy] accessing ${n.toString()}`),new Error(t);return e[n]}})})),this.getCurrentLayoutManagerSync=()=>xi(this,vi,"m",Ei).call(this,"fin.Platform.Layout.getCurrentLayoutManagerSync()"),this.create=async e=>this.wire.environment.createLayout(xi(this,vi,"m",Ei).call(this,"fin.Platform.Layout.create()"),e),this.destroy=async e=>this.wire.environment.destroyLayout(xi(this,vi,"m",Ei).call(this,"fin.Platform.Layout.destroy()"),e)}async wrap(e){return this.wire.sendAction("layout-wrap").catch((e=>{})),new Mi.Layout(e,this.wire)}wrapSync(e){return this.wire.sendAction("layout-wrap-sync").catch((e=>{})),new Mi.Layout(e,this.wire)}async getCurrent(){if(this.wire.sendAction("layout-get-current").catch((e=>{})),"openfin"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error("You are not in a Window context. Only Windows can have a Layout.");const{uuid:e,name:t}=this.fin.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction("layout-get-current-sync").catch((e=>{})),"openfin"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error("You are not in a Window context. Only Windows can have a Layout.");const{uuid:e,name:t}=this.fin.me;return this.wrapSync({uuid:e,name:t})}async getLayoutByViewIdentity(e){this.wire.sendAction("layout-get-by-view-identity").catch((()=>{}));let t=await this.wire.environment.getViewWindowIdentity(this.fin,e);t.identity&&(t=t.identity);try{const n=this.wrapSync(t),i=await Mi.Layout.getClient(n),r=await i.getLayoutIdentityForViewOrThrow(e);return this.wrapSync(r)}catch(n){if(!["No action registered at target for","getLayoutIdentityForViewOrThrow is not a function"].some((e=>n.message.includes(e))))throw n;if(t.uuid===t.name)throw new Error(`View identity ${JSON.stringify(e)} is not attached to any layout in provider window ${JSON.stringify(t)}.`);return this.wrapSync(t)}}}kn.LayoutModule=Oi,Ci=new WeakMap,bi=new WeakMap,Ii=new WeakMap,vi=new WeakSet,Ei=function(e){if(!xi(this,bi,"f"))throw new Error(`You must call init before using the API ${e}`);return xi(this,bi,"f")},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(kn,e),n(Ln,e)}(jn),Object.defineProperty(Pn,"__esModule",{value:!0}),Pn.PlatformModule=void 0;const Si=d,Ri=Mn,Fi=jn;class ji extends Si.Base{constructor(e,t){super(e),this._channel=t,this.Layout=new Fi.LayoutModule(this.wire)}async init(e){if(!fin.__internal_.isPlatform||fin.me.name!==fin.me.uuid)throw new Error("fin.Platform.init should only be called from a custom platform provider running in the main window of the application.");return this.wire.environment.initPlatform(this.fin,e)}async wrap(e){return this.wire.sendAction("platform-wrap").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}wrapSync(e){return this.wire.sendAction("platform-wrap-sync").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}async getCurrent(){return this.wire.sendAction("platform-get-current").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction("platform-get-current-sync").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}start(e){return this.wire.sendAction("platform-start").catch((e=>{})),new Promise((async(t,n)=>{try{const{uuid:n}=e,i=await this.fin.Application._create({...e,isPlatformController:!0});i.once("platform-api-ready",(()=>t(this.wrapSync({uuid:n})))),i._run({uuid:n})}catch(e){n(e)}}))}startFromManifest(e,t){return this.wire.sendAction("platform-start-from-manifest").catch((e=>{})),new Promise((async(n,i)=>{try{const i=await this.fin.Application._createFromManifest(e);i.once("platform-api-ready",(()=>n(this.wrapSync({uuid:i.identity.uuid})))),i._run(t)}catch(e){i(e)}}))}}Pn.PlatformModule=ji,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Pn,e),n(Mn,e)}(An);var ki={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getMe=e.getBaseMe=e.environmentUnsupportedMessage=void 0;const t=J(),n=un,i=ie(),r=rn;function o(e,t,n){return{...{isView:"view"===e,isWindow:"window"===e,isFrame:"iframe"===e,isExternal:"external connection"===e},uuid:t,name:n,entityType:e}}e.environmentUnsupportedMessage="You are not running in OpenFin.",e.getBaseMe=o,e.getMe=function(s){const{uuid:a,name:c,entityType:d}=s.me,h={setContext(){throw new Error(e.environmentUnsupportedMessage)},addContextHandler(){throw new Error(e.environmentUnsupportedMessage)},getContextGroups(){throw new Error(e.environmentUnsupportedMessage)},joinContextGroup(){throw new Error(e.environmentUnsupportedMessage)},removeFromContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getAllClientsInContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getInfoForContextGroup(){throw new Error(e.environmentUnsupportedMessage)}},l="Interop API has not been instantiated. Either connection has failed or you have not declared interop in your config.",u={setContext(){throw new Error(l)},addContextHandler(){throw new Error(l)},getContextGroups(){throw new Error(l)},joinContextGroup(){throw new Error(l)},removeFromContextGroup(){throw new Error(l)},getAllClientsInContextGroup(){throw new Error(l)},getInfoForContextGroup(){throw new Error(l)}},p={eventNames:()=>{throw new Error(e.environmentUnsupportedMessage)},emit:()=>{throw new Error(e.environmentUnsupportedMessage)},listeners:()=>{throw new Error(e.environmentUnsupportedMessage)},listenerCount:()=>{throw new Error(e.environmentUnsupportedMessage)},on:()=>{throw new Error(e.environmentUnsupportedMessage)},addListener:()=>{throw new Error(e.environmentUnsupportedMessage)},once:()=>{throw new Error(e.environmentUnsupportedMessage)},prependListener:()=>{throw new Error(e.environmentUnsupportedMessage)},prependOnceListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeAllListeners:()=>{throw new Error(e.environmentUnsupportedMessage)}};switch(d){case"view":return Object.assign(new t.View(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case"window":return Object.assign(new i._Window(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case"iframe":return Object.assign(new n._Frame(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case"external connection":return Object.assign(new r.ExternalApplication(s,{uuid:a}),o(d,a,c),{interop:u,isOpenFin:!1});default:return{...o(d,a,c),...p,interop:h,isOpenFin:!1}}}}(ki);var Li={},Ti={},$i={};Object.defineProperty($i,"__esModule",{value:!0}),$i.createWarningObject=$i.createUnusableObject=void 0,$i.createUnusableObject=function(e){const t=()=>{throw new Error(e)};return new Proxy({},{apply:t,construct:t,defineProperty:t,deleteProperty:t,get:t,getOwnPropertyDescriptor:t,getPrototypeOf:t,has:t,isExtensible:t,ownKeys:t,preventExtensions:t,set:t,setPrototypeOf:t})},$i.createWarningObject=function(e,t){return new Proxy(t,{get:(...t)=>(console.warn(e),Reflect.get(...t)),set:(...t)=>(console.warn(e),Reflect.set(...t)),getOwnPropertyDescriptor:(...t)=>(console.warn(e),Reflect.getOwnPropertyDescriptor(...t)),ownKeys:(...t)=>(console.warn(e),Reflect.ownKeys(...t))})};var Bi,Gi={},Wi={};var Hi={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.wrapIntentHandler=e.BROKER_ERRORS=e.generateOverrideWarning=e.generateOverrideError=e.wrapContextHandler=e.wrapInTryCatch=e.generateId=void 0;e.generateId=()=>`${Math.random()}${Date.now()}`;e.wrapInTryCatch=(e,t)=>(...n)=>{try{return e(...n)}catch(e){throw new Error((t||"")+e)}};e.wrapContextHandler=(e,t)=>async n=>{try{await e(n)}catch(e){throw console.error(`Error thrown by handler ${t} for context type ${n.type}: ${e}`),e}};e.generateOverrideError=(e,t)=>`You have tried to to use ${e} but ${t} has not been overridden in the Interop Broker. Please override this function. Refer to our documentation for more info.`;e.generateOverrideWarning=(e,t,n,i)=>{const{uuid:r,name:o}=n;return i?`Entity with identity: ${r}/${o} has called ${i} or ${e} but ${t} has not been overridden.`:`Entity with identity: ${r}/${o} has called ${e} but ${t} has not been overridden.`},e.BROKER_ERRORS={fireIntent:(0,e.generateOverrideError)("fireIntent","handleFiredIntent"),fireIntentForContext:(0,e.generateOverrideError)("fireIntentForContext","handleFiredIntentForContext"),getInfoForIntent:(0,e.generateOverrideError)("getInfoForIntent","handleInfoForIntent"),getInfoForIntentsByContext:(0,e.generateOverrideError)("getInfoForIntentsByContext","handleInfoForIntentsByContext"),joinSessionContextGroupWithJoinContextGroup:"The Context Group you have tried to join is a Session Context Group. Custom Context Groups can only be defined by the Interop Broker through code or manifest configuration. Please use joinSessionContextGroup.",fdc3Open:(0,e.generateOverrideError)("fdc3.open","fdc3HandleOpen"),fdc3FindInstances:(0,e.generateOverrideError)("fdc3.findInstances","fdc3HandleFindInstances"),fdc3GetAppMetadata:(0,e.generateOverrideError)("fdc3.getAppMetadata","fdc3HandleGetAppMetadata"),fdc3GetInfo:(0,e.generateOverrideError)("fdc3.getInfo","fdc3HandleGetInfo")};e.wrapIntentHandler=(e,t)=>async n=>{try{return e(n)}catch(e){throw console.error(`Error thrown by handler ${t}: ${e}`),e}}}(Hi);var Ni,Di,Ui={};function Vi(){if(Di)return Gi;Di=1;var e,t,n,r=s&&s.__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},o=s&&s.__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)},a=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Gi,"__esModule",{value:!0}),Gi.InteropBroker=void 0;const c=d,h=a(function(){if(Bi)return Wi;Bi=1,Object.defineProperty(Wi,"__esModule",{value:!0});const e=Cr();return Wi.default=class{constructor(e,t){this.provider=e,this.id=t,this.lastContext=void 0,this.contextGroupMap=new Map,this.clients=new Map,this.registerListeners()}registerListeners(){this.provider.register(`sessionContextGroup:getContext-${this.id}`,this.getCurrentContext.bind(this)),this.provider.register(`sessionContextGroup:setContext-${this.id}`,this.setContext.bind(this)),this.provider.register(`sessionContextGroup:handlerAdded-${this.id}`,this.handlerAdded.bind(this)),this.provider.register(`sessionContextGroup:handlerRemoved-${this.id}`,this.handlerRemoved.bind(this))}getCurrentContext(e){return e.type?this.contextGroupMap.get(e.type):this.lastContext}setContext(t,n){const{context:i}=t,r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name} not in Session Client State Map`);this.contextGroupMap.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{e.contextHandlers.get(i.type)?.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getClientState(e){return this.clients.get(e.endpointId)}async handlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(i){const e=r.contextHandlers.get(i)||[];r.contextHandlers.set(i,[...e,n]);const o=this.contextGroupMap.get(i);o&&await this.provider.dispatch(t,n,o)}else{r.globalHandler=n;const e=[...this.contextGroupMap.keys()].map((async e=>{const i=this.contextGroupMap.get(e);i&&await this.provider.dispatch(t,n,i)}));await Promise.all(e)}}handlerRemoved(e,t){const{handlerId:n}=e,i=this.clients.get(t.endpointId);i?(Array.from(i.contextHandlers).forEach((([,e])=>{const t=e.indexOf(n);t>-1&&e.splice(t,1)})),i.globalHandler===n&&(i.globalHandler=void 0)):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={contextHandlers:new Map,clientIdentity:e,globalHandler:void 0};this.clients.set(e.endpointId,t)}}onDisconnection(e){this.clients.delete(e.endpointId)}},Wi}()),l=Hi,u=a(i),p=function(){if(Ni)return Ui;Ni=1,Object.defineProperty(Ui,"__esModule",{value:!0}),Ui.PrivateChannelProvider=void 0;const e=Vi();return Ui.PrivateChannelProvider=class t{constructor(e,t){this.provider=e,this.id=t,this.clients=new Map,this.registerListeners(),this.contextByContextType=new Map,this.lastContext=void 0,this.provider.onConnection((e=>this.registerNewClient(e))),this.provider.onDisconnection((async e=>{const{endpointId:t}=e;this.clients.has(t)&&await this.handleClientDisconnecting(e),0===(await this.provider.getAllClientInfo()).length&&this.provider.destroy()}))}getClientState(e){return this.clients.get(e.endpointId)}registerListeners(){this.provider.register("broadcast",this.broadcast.bind(this)),this.provider.register("getCurrentContext",this.getCurrentContext.bind(this)),this.provider.register("contextHandlerAdded",this.contextHandlerAdded.bind(this)),this.provider.register("contextHandlerRemoved",this.contextHandlerRemoved.bind(this)),this.provider.register("nonStandardHandlerRemoved",this.nonStandardHandlerRemoved.bind(this)),this.provider.register("onAddContextHandlerAdded",this.onAddContextHandlerAdded.bind(this)),this.provider.register("onDisconnectHandlerAdded",this.onDisconnectHandlerAdded.bind(this)),this.provider.register("onUnsubscribeHandlerAdded",this.onUnsubscribeHandlerAdded.bind(this)),this.provider.register("clientDisconnecting",((e,t)=>{this.handleClientDisconnecting(t)}))}broadcast(t,n){const{context:i}=t;if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name}, tried to call broadcast, is not connected to this Private Channel`);const r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to broadcast - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);this.contextByContextType.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{const t=e.handlerIdsByContextTypes.get(i.type);t&&t.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getCurrentContext(e,t){const{contextType:n}=e;if(!this.getClientState(t))throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call getCurrentContext, is not connected to this Private Channel`);if(void 0!==n){return this.contextByContextType.get(n)||null}return this.lastContext?this.lastContext:null}contextHandlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call addContextListener, is not connected to this Private Channel`);if(i){const e=r.handlerIdsByContextTypes.get(i)||[];r.handlerIdsByContextTypes.set(i,[...e,n])}else r.globalHandler=n;Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&e.onAddContextListenerHandlerId&&this.provider.dispatch(e.clientIdentity,e.onAddContextListenerHandlerId,i)}))}async contextHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);if(i){let e;if(i.globalHandler===n)i.globalHandler=void 0;else for(const[t,r]of i.handlerIdsByContextTypes){const i=r.indexOf(n);i>-1&&(r.splice(i,1),e=t)}const r=(await this.getConnectedClients()).map((async n=>{const{clientIdentity:i,clientIdentity:{endpointId:r},onUnsubscribeHandlerId:o}=n;r!==t.endpointId&&o&&await this.provider.dispatch(i,o,e)}));try{await Promise.all(r)}catch(e){throw console.error(`Problem when attempting to dispatch to onUnsubscribeHandlers. Error: ${e} Removing Client: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}`),new Error(e)}}else console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}.`)}nonStandardHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);i?i.onDisconnectHandlerId===n?i.onDisconnectHandlerId=void 0:i.onAddContextListenerHandlerId===n?i.onAddContextListenerHandlerId=void 0:i.onUnsubscribeHandlerId===n&&(i.onUnsubscribeHandlerId=void 0):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}onAddContextHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onAddContextListener, is not connected to this Private Channel`);n.onAddContextListenerHandlerId=i,Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&Array.from(e.handlerIdsByContextTypes.keys()).forEach((e=>{this.provider.dispatch(t,i,e)}))}))}onDisconnectHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onDisconnect, is not connected to this Private Channel`);n.onDisconnectHandlerId=i}onUnsubscribeHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onUnsubscribe, is not connected to this Private Channel`);n.onUnsubscribeHandlerId=i}removeClient(e){const t=this.getClientState(e);if(!t)throw new Error(`Client with Identity: ${e.uuid} ${e.name}, tried to call disconnect, is not connected to this Private Channel`);t.handlerIdsByContextTypes.clear(),this.clients.delete(e.endpointId)}async fireOnDisconnectForOtherClients(e){const{endpointId:t}=e,n=(await this.getConnectedClients()).map((async e=>{const{clientIdentity:{endpointId:n},onDisconnectHandlerId:i}=e;n!==t&&i&&await this.provider.dispatch(e.clientIdentity,i)}));try{await Promise.all(n)}catch(t){throw console.error(`Problem when attempting to dispatch to onDisconnectHandlers. Error: ${t} Disconnecting Client: uuid: ${e.uuid}. name: ${e.name}. endpointId: ${e.endpointId}`),new Error(t)}}async unsubscribeAll(e){const{endpointId:t}=e,n=this.clients.get(t);if(n){const t=Array.from(n.handlerIdsByContextTypes.values()).flat(),i=n.globalHandler;if(t.length>0){const n=t.map((async t=>this.contextHandlerRemoved({handlerId:t},e)));try{await Promise.all(n)}catch(e){console.error(e.message)}}if(i)try{await this.contextHandlerRemoved({handlerId:i},e)}catch(e){console.error(e.message)}}}async handleClientDisconnecting(e){await this.unsubscribeAll(e),this.removeClient(e),await this.fireOnDisconnectForOtherClients(e)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={clientIdentity:e,handlerIdsByContextTypes:new Map,globalHandler:void 0,onAddContextListenerHandlerId:void 0,onUnsubscribeHandlerId:void 0,onDisconnectHandlerId:void 0};this.clients.set(e.endpointId,t)}}async getConnectedClients(){const e=await this.provider.getAllClientInfo();return Array.from(this.clients.values()).filter((t=>{const{uuid:n,name:i}=t.clientIdentity;return e.some((e=>i===e.name&&n===e.uuid))}))}static init(e,n){return new t(e,n)}},Ui}(),w=G,y=[{id:"green",displayMetadata:{color:"#00CC88",name:"green"}},{id:"purple",displayMetadata:{color:"#8C61FF",name:"purple"}},{id:"orange",displayMetadata:{color:"#FF8C4C",name:"orange"}},{id:"red",displayMetadata:{color:"#FF5E60",name:"red"}},{id:"pink",displayMetadata:{color:"#FF8FB8",name:"pink"}},{id:"yellow",displayMetadata:{color:"#E9FF8F",name:"yellow"}}];let f=class i extends c.Base{constructor(i,s,a){super(i),e.set(this,void 0),t.set(this,void 0),n.set(this,void 0),this.getProvider=()=>o(this,n,"f").getValue(),this.interopClients=new Map,this.contextGroupsById=new Map,r(this,t,a.contextGroups??[...y],"f"),r(this,e,a.fdc3Info,"f"),a?.logging&&(this.logging=a.logging),this.intentClientMap=new Map,this.lastContextMap=new Map,this.sessionContextGroupMap=new Map,r(this,n,new w.Lazy(s),"f"),this.setContextGroupMap(),this.setupChannelProvider()}static createClosedConstructor(...e){return class extends i{constructor(...t){if(t.length){const[n,i,r]=t;if(r&&"object"==typeof r&&!(0,u.default)(r,e[2]))return console.warn("You have modified the parameters of the InteropOverride constructor. This behavior is deprecated and will be removed in a future version. You can modify these options in your manifest. Please consult our Interop docs for guidance on migrating to the new override scheme."),void super(e[0],e[1],r);console.warn("You are attempting to pass arguments to the InteropOverride constructor. This is not necessary, and these passed arguments will be ignored. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.")}super(...e)}}}setContext({context:e},t){this.wire.sendAction("interop-broker-set-context").catch((e=>{}));const n=this.getClientState(t);if(!n||!n.contextGroupId)throw n?new Error("You must join a context group before you can set context."):new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);{const{contextGroupId:t}=n;this.setContextForGroup({context:e},t)}}setContextForGroup({context:e},t){this.wire.sendAction("interop-broker-set-context-for-group").catch((e=>{}));const n=this.contextGroupsById.get(t);if(!n)throw new Error(`Unable to set context for context group that isn't in the context group mapping: ${t}.`);const r=i.checkContextIntegrity(e);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(e)}`);const o=e.type;n.set(o,e),this.lastContextMap.set(t,o);Array.from(this.interopClients.values()).filter((e=>e.contextGroupId===t)).forEach((t=>{for(const[,n]of t.contextHandlers)i.isContextTypeCompatible(o,n.contextType)&&this.invokeContextHandler(t.clientIdentity,n.handlerId,e)}))}getCurrentContext(e,t){this.wire.sendAction("interop-broker-get-current-context").catch((e=>{}));const n=this.getClientState(t);if(!n?.contextGroupId)throw new Error("You must be a member of a context group to call getCurrentContext");const{contextGroupId:i}=n,r=this.contextGroupsById.get(i),o=this.lastContextMap.get(i),s=e?.contextType??o;return r&&s?r.get(s):void 0}async joinContextGroup({contextGroupId:e,target:t},n){if(this.wire.sendAction("interop-broker-join-context-group").catch((e=>{})),this.sessionContextGroupMap.has(e))throw new Error(l.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup);if(t){i.hasEndpointId(t)&&await this.addClientToContextGroup({contextGroupId:e},t);try{const n=this.channel.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name));if(!n.length)throw new Error(`Given Identity ${t.uuid} ${t.name} is not connected to the Interop Broker.`);n.length>1&&console.warn(`More than one connection found for identity ${t.uuid} ${t.name}`);const i=[];for(const t of n)i.push(this.addClientToContextGroup({contextGroupId:e},t));await Promise.all(i)}catch(e){throw new Error(e)}}else await this.addClientToContextGroup({contextGroupId:e},n)}async addClientToContextGroup({contextGroupId:e},t){this.wire.sendAction("interop-broker-add-client-to-context-group").catch((e=>{}));const n=this.getClientState(t);if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(!this.getContextGroups().find((t=>t.id===e)))throw new Error(`Attempting to join a context group that does not exist: ${e}. You may only join existing context groups.`);if(n.contextGroupId!==e){n.contextGroupId=e,await this.setCurrentContextGroupInClientOptions(t,e);const i=this.contextGroupsById.get(e);for(const[,e]of n.contextHandlers){const{contextType:n,handlerId:r}=e;if(void 0===n)i.forEach(((e,n)=>{this.invokeContextHandler(t,r,e)}));else if(i.has(n)){const e=i.get(n);e&&this.invokeContextHandler(t,r,e)}}}}async removeFromContextGroup({target:e},t){if(this.wire.sendAction("interop-broker-remove-from-context-group").catch((e=>{})),e){i.hasEndpointId(e)&&await this.removeClientFromContextGroup(e);try{const t=this.channel.connections.filter((t=>t.uuid===e.uuid&&t.name===e.name));if(!t.length)throw new Error(`No connection found for given Identity ${e.uuid} ${e.name}`);t.length>1&&console.warn(`More than one connection found for identity ${e.uuid} ${e.name}`);const n=[];for(const e of t)n.push(this.removeClientFromContextGroup(e));await Promise.all(n)}catch(e){throw new Error(e)}}else await this.removeClientFromContextGroup(t)}async removeClientFromContextGroup(e){this.wire.sendAction("interop-broker-remove-client-from-context-group").catch((e=>{}));const t=this.getClientState(e);t&&(t.contextGroupId=void 0),await this.setCurrentContextGroupInClientOptions(e,null)}getContextGroups(){return this.wire.sendAction("interop-broker-get-context-groups").catch((e=>{})),o(this,t,"f").map((e=>({...e})))}getInfoForContextGroup({contextGroupId:e}){return this.wire.sendAction("interop-broker-get-info-for-context-group").catch((e=>{})),this.getContextGroups().find((t=>t.id===e))}getAllClientsInContextGroup({contextGroupId:e}){this.wire.sendAction("interop-broker-get-all-clients-in-context-group").catch((e=>{}));return Array.from(this.interopClients.values()).filter((t=>t.contextGroupId===e)).map((e=>e.clientIdentity))}async handleFiredIntent(e,t){const n=(0,l.generateOverrideWarning)("fdc3.raiseIntent","InteropBroker.handleFiredIntent",t,"interopClient.fireIntent");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntent)}async setIntentTarget(e,t){this.wire.sendAction("interop-broker-set-intent-target").catch((e=>{}));const n=this.intentClientMap.get(t.name),i=`intent-handler-${e.name}`;if(n){const t=n.get(i);if(t){if(t.pendingIntents.push(e),t.clientIdentity&&t.isReady){const{clientIdentity:e,pendingIntents:n}=t;try{const r=n[n.length-1];await this.invokeIntentHandler(e,i,r),t.pendingIntents=[]}catch(n){console.error(`Error invoking intent handler for client ${e.uuid}/${e.name}/${e.endpointId}`),t.isReady=!1}}}else n.set(i,{isReady:!1,pendingIntents:[e]})}else{this.intentClientMap.set(t.name,new Map);const n=this.intentClientMap.get(t.name);n&&n.set(i,{isReady:!1,pendingIntents:[e]})}}async handleInfoForIntent(e,t){const n=(0,l.generateOverrideWarning)("fdc3.findIntent","InteropBroker.handleInfoForIntent",t,"interopClient.getInfoForIntent");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntent)}async handleInfoForIntentsByContext(e,t){const n=(0,l.generateOverrideWarning)("fdc3.findIntentsByContext","InteropBroker.handleInfoForIntentsByContext",t,"interopClient.getInfoForIntentsByContext");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntentsByContext)}async handleFiredIntentForContext(e,t){const n=(0,l.generateOverrideWarning)("fdc3.raiseIntentForContext","InteropBroker.handleFiredIntentForContext",t,"interopClient.fireIntentForContext");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntentForContext)}async clientDisconnected(e){}async fdc3HandleOpen({app:e,context:t},n){const i=(0,l.generateOverrideWarning)("fdc3.open","InteropBroker.fdc3HandleOpen",n);throw console.warn(i),new Error(l.BROKER_ERRORS.fdc3Open)}async fdc3HandleFindInstances(e,t){const n=(0,l.generateOverrideWarning)("fdc3.open","InteropBroker.fdc3HandleFindInstances",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3FindInstances)}async fdc3HandleGetAppMetadata(e,t){const n=(0,l.generateOverrideWarning)("fdc3.getAppMetadata","InteropBroker.fdc3HandleGetAppMetadata",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3GetAppMetadata)}async invokeContextHandler(e,t,n){const i=await this.getProvider();try{await i.dispatch(e,t,n)}catch(i){console.error(`Error invoking context handler ${t} for context type ${n.type} in client ${e.uuid}/${e.name}/${e.endpointId}`,i)}}async invokeIntentHandler(e,t,n){const i=await this.getProvider();await i.dispatch(e,t,n)}async fdc3HandleGetInfo(t,n){const{fdc3Version:i}=t;return{fdc3Version:i,...o(this,e,"f"),optionalFeatures:{OriginatingAppMetadata:!1,UserChannelMembershipAPIs:!0},appMetadata:{appId:"",instanceId:""}}}async getAllClientInfo(){return(await this.getProvider()).getAllClientInfo()}decorateSnapshot(e){return{...e,interopSnapshotDetails:{contextGroupStates:this.getContextGroupStates()}}}applySnapshot(e,t){const n=e?.interopSnapshotDetails?.contextGroupStates;n&&(t?.closeExistingWindows||this.updateExistingClients(n),this.rehydrateContextGroupStates(n))}updateExistingClients(e){this.interopClients.forEach((t=>{const{clientIdentity:n,contextGroupId:r,contextHandlers:o}=t;if(r){const t=e[r];for(const[,e]of Object.entries(t))o.forEach((t=>{const{handlerId:r,contextType:o}=t;i.isContextTypeCompatible(e.type,o)&&this.invokeContextHandler(n,r,e)}))}}))}getContextGroupStates(){return i.toObject(this.contextGroupsById)}rehydrateContextGroupStates(e){const t=Object.entries(e);for(const[e,n]of t){const t=Object.entries(n);for(const[n,i]of t)if(this.contextGroupsById.has(e)){this.contextGroupsById.get(e).set(n,i)}else console.warn(`Attempting to set a context group that isn't in the context group mapping. Skipping context group rehydration for: ${e}`)}}contextHandlerRegistered({contextType:e,handlerId:t},n){const i={contextType:e,handlerId:t},r=this.getClientState(n);if(r?.contextHandlers.set(t,i),r&&r.contextGroupId){const{contextGroupId:i}=r,o=this.contextGroupsById.get(i);if(void 0===e)o.forEach(((e,i)=>{this.invokeContextHandler(n,t,e)}));else if(o.has(e)){const i=o.get(e);i&&this.invokeContextHandler(n,t,i)}}}async intentHandlerRegistered(e,t){const{handlerId:n}=e,i=this.intentClientMap.get(t.name),r=i?.get(n);if(i)if(r){const{pendingIntents:e}=r;r.clientIdentity=t,r.isReady=!0;try{if(e.length>0){const i=e[e.length-1];await this.invokeIntentHandler(t,n,i),r.pendingIntents=[]}}catch(e){console.error(`Error invoking intent handler: ${n} for client ${t.uuid}/${t.name}/${t.endpointId}`)}}else i.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t});else{this.intentClientMap.set(t.name,new Map);const e=this.intentClientMap.get(t.name);e&&e.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t})}}removeContextHandler({handlerId:e},t){const n=this.getClientState(t);n&&n.contextHandlers.delete(e)}handleJoinSessionContextGroup({sessionContextGroupId:e},t){try{if(!e)throw new Error("Failed to join session context group: must specify group id.");const n=this.sessionContextGroupMap.get(e);if(n)n.registerNewClient(t);else{const n=new h.default(this.channel,e);n.registerNewClient(t),this.sessionContextGroupMap.set(e,n)}return{hasConflict:this.contextGroupsById.has(e)}}catch(e){throw new Error(e)}}getClientState(e){return this.interopClients.get(e.endpointId)}static toObject(e){const t=Object.fromEntries(e),n={};return Object.entries(t).forEach((([e,t])=>{const i=Object.fromEntries(t);n[e]=i})),n}static checkContextIntegrity(e){if(!e)return{isValid:!1,reason:"No context supplied"};if("object"!=typeof e)return{isValid:!1,reason:"Context must be an Object"};if(!e.type)return{isValid:!1,reason:"Context must have a type property"};if(e.id&&"object"!=typeof e.id)return{isValid:!1,reason:"Context id must be an Object populated with key-value identifiers (if set)"};if(e.id){const{id:t}=e,n=Object.keys(t);let i=!1;if(!n.length)return{isValid:!1,reason:"Context id must have at least one key-value identifier"};if(n.forEach((e=>{"string"==typeof e&&"string"==typeof t[e]||(i=!0)})),i)return{isValid:!1,reason:"Context id key-value identifiers must be of type string"}}return e.name&&"string"!=typeof e.name?{isValid:!1,reason:"Context name must be of string type (if set)"}:{isValid:!0}}static hasEndpointId(e){return void 0!==e.endpointId}static isContextTypeCompatible(e,t){return void 0===t||e===t}setContextGroupMap(){for(const e of this.getContextGroups())this.contextGroupsById.set(e.id,new Map)}async setCurrentContextGroupInClientOptions(e,t){try{const n=await this.fin.System.getEntityInfo(e.uuid,e.name);let i;"view"===n.entityType?i=await this.fin.View.wrap(e):"window"===n.entityType&&(i=await this.fin.Window.wrap(e)),i&&await i.updateOptions({interop:{currentContextGroup:t}})}catch(e){}}async setupChannelProvider(){try{const e=await this.getProvider();this.channel=e,this.wireChannel(e)}catch(e){throw new Error(`Error setting up Interop Broker Channel Provider: ${e}`)}}wireChannel(e){e.onConnection((async(e,t)=>{if(!await this.isConnectionAuthorized(e,t))throw new Error(`Connection not authorized for ${e.uuid}, ${e.name}`);if(!e.endpointId)throw new Error("Version too old to be compatible with Interop. Please upgrade your runtime to a more recent version.");const n={contextGroupId:void 0,contextHandlers:new Map,clientIdentity:e};t?.currentContextGroup&&this.contextGroupsById.has(t.currentContextGroup)&&(n.contextGroupId=t?.currentContextGroup),this.interopClients.set(e.endpointId,n)})),e.onDisconnection((e=>{this.interopClients.delete(e.endpointId);const t=this.intentClientMap.get(e.name);t&&e.uuid===this.fin.me.uuid&&t.forEach((e=>{e.isReady=!1})),this.sessionContextGroupMap.forEach((t=>{t.onDisconnection(e)})),this.clientDisconnected(e)})),e.beforeAction((async(e,t,n)=>{if(!await this.isActionAuthorized(e,t,n))throw new Error(`Action (${e}) not authorized for ${n.uuid}, ${n.name}`);this.logging?.beforeAction?.enabled&&console.log(e,t,n)})),e.afterAction(((e,t,n)=>{this.logging?.afterAction?.enabled&&console.log(e,t,n)})),e.register("setContext",this.setContext.bind(this)),e.register("fireIntent",this.handleFiredIntent.bind(this)),e.register("getCurrentContext",this.getCurrentContext.bind(this)),e.register("getInfoForIntent",this.handleInfoForIntent.bind(this)),e.register("getInfoForIntentsByContext",this.handleInfoForIntentsByContext.bind(this)),e.register("fireIntentForContext",this.handleFiredIntentForContext.bind(this)),e.register("getContextGroups",this.getContextGroups.bind(this)),e.register("joinContextGroup",this.joinContextGroup.bind(this)),e.register("removeFromContextGroup",this.removeFromContextGroup.bind(this)),e.register("getAllClientsInContextGroup",this.getAllClientsInContextGroup.bind(this)),e.register("getInfoForContextGroup",this.getInfoForContextGroup.bind(this)),e.register("contextHandlerRegistered",this.contextHandlerRegistered.bind(this)),e.register("intentHandlerRegistered",this.intentHandlerRegistered.bind(this)),e.register("removeContextHandler",this.removeContextHandler.bind(this)),e.register("sessionContextGroup:createIfNeeded",this.handleJoinSessionContextGroup.bind(this)),e.register("fdc3Open",this.fdc3HandleOpen.bind(this)),e.register("fdc3v2FindIntentsByContext",this.handleInfoForIntentsByContext.bind(this)),e.register("fdc3FindInstances",this.fdc3HandleFindInstances.bind(this)),e.register("fdc3GetAppMetadata",this.fdc3HandleGetAppMetadata.bind(this)),e.register("fdc3v2GetInfo",(async(e,t)=>this.fdc3HandleGetInfo.bind(this)(e,t))),e.register("createPrivateChannelProvider",(async e=>{const{channelId:t}=e,n=await this.fin.InterApplicationBus.Channel.create(t);p.PrivateChannelProvider.init(n,t)}))}isConnectionAuthorized(e,t){return this.wire.sendAction("interop-broker-is-connection-authorized").catch((e=>{})),Promise.resolve(!0)}isActionAuthorized(e,t,n){return this.wire.sendAction("interop-broker-is-action-authorized").catch((e=>{})),Promise.resolve(!0)}};return Gi.InteropBroker=f,e=new WeakMap,t=new WeakMap,n=new WeakMap,Gi}var zi,Ki={},qi={},Ji=s&&s.__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},Yi=s&&s.__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)};Object.defineProperty(qi,"__esModule",{value:!0});const Zi=d,Qi=Hi;class Xi extends Zi.Base{constructor(e,t,n){super(e),zi.set(this,void 0),this.id=n,Ji(this,zi,t,"f")}async setContext(e){this.wire.sendAction("interop-session-context-group-set-context").catch((e=>{}));return(await Yi(this,zi,"f")).dispatch(`sessionContextGroup:setContext-${this.id}`,{sessionContextGroupId:this.id,context:e})}async getCurrentContext(e){this.wire.sendAction("interop-session-context-group-get-context").catch((e=>{}));return(await Yi(this,zi,"f")).dispatch(`sessionContextGroup:getContext-${this.id}`,{sessionContextGroupId:this.id,type:e})}async addContextHandler(e,t){if(this.wire.sendAction("interop-session-context-group-add-handler").catch((e=>{})),"function"!=typeof e)throw new Error("Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");const n=await Yi(this,zi,"f");let i;return i=t?`sessionContextHandler:invoke-${this.id}-${t}-${(0,Qi.generateId)()}`:`sessionContextHandler:invoke-${this.id}`,n.register(i,(0,Qi.wrapContextHandler)(e,i)),await n.dispatch(`sessionContextGroup:handlerAdded-${this.id}`,{handlerId:i,contextType:t}),{unsubscribe:await this.createUnsubscribeCb(i)}}async createUnsubscribeCb(e){const t=await Yi(this,zi,"f");return async()=>{t.remove(e),await t.dispatch(`sessionContextGroup:handlerRemoved-${this.id}`,{handlerId:e})}}getUserInstance(){return{id:this.id,setContext:(0,Qi.wrapInTryCatch)(this.setContext.bind(this),"Failed to set context: "),getCurrentContext:(0,Qi.wrapInTryCatch)(this.getCurrentContext.bind(this),"Failed to get context: "),addContextHandler:(0,Qi.wrapInTryCatch)(this.addContextHandler.bind(this),"Failed to add context handler: ")}}}qi.default=Xi,zi=new WeakMap;var er={},tr={},nr={},ir={},rr=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),or=s&&s.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),sr=s&&s.__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)&&rr(t,e,n);return or(t,e),t};Object.defineProperty(ir,"__esModule",{value:!0}),ir.PrivateChannelClient=void 0;const ar=sr(Hi);var cr,dr;function hr(){if(cr)return tr;cr=1;var e,t=s&&s.__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)},n=s&&s.__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},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(tr,"__esModule",{value:!0}),tr.FDC3ModuleBase=void 0;const o=nr,a=Hi,c=wr(),d=r(i);return tr.FDC3ModuleBase=class{get client(){return t(this,e,"f").call(this)}get fin(){return this.wire.getFin()}constructor(t,i){this.wire=i,e.set(this,void 0),n(this,e,t,"f")}async broadcast(e){return this.wire.sendAction("fdc3-broadcast").catch((e=>{})),this.client.setContext(e)}async _open(e,t){this.wire.sendAction("fdc3-open").catch((e=>{}));try{return await c.InteropClient.ferryFdc3Call(this.client,"fdc3Open",{app:e,context:t})}catch(e){const t=e.message===a.BROKER_ERRORS.fdc3Open?"ResolverUnavailable":e.message;throw new Error(t)}}async _getChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:"system",...(0,o.getUnsupportedChannelApis)()})))}async getOrCreateChannel(e){this.wire.sendAction("fdc3-get-or-create-channel").catch((e=>{}));const t=(await this._getChannels()).find((t=>t.id===e));if(t)return{...t,type:"system",...(0,o.getUnsupportedChannelApis)()};try{const t=await this.client.joinSessionContextGroup(e);return(0,o.buildAppChannelObject)(t)}catch(e){throw console.error(e.message),new Error(o.ChannelError.CreationFailed)}}async getSystemChannels(){return this.wire.sendAction("fdc3-get-system-channels").catch((e=>{})),this._getChannels()}async joinChannel(e){this.wire.sendAction("fdc3-join-channel").catch((e=>{}));try{return await this.client.joinContextGroup(e)}catch(e){if(e.message===a.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup?console.error("The Channel you have tried to join is an App Channel. Custom Channels can only be defined by the Interop Broker through code or manifest configuration. Please use getOrCreateChannel."):console.error(e.message),e.message.startsWith("Attempting to join a context group that does not exist"))throw new Error(o.ChannelError.NoChannelFound);throw new Error(o.ChannelError.AccessDenied)}}async getCurrentChannel(){this.wire.sendAction("fdc3-get-current-channel").catch((e=>{}));const e=await this.getCurrentContextGroupInfo();return e?this.buildChannelObject(e):null}async leaveCurrentChannel(){return this.wire.sendAction("fdc3-leave-current-channel").catch((e=>{})),this.client.removeFromContextGroup()}async getCurrentContextGroupInfo(){const e=await this.client.getContextGroups(),t=e.map((async e=>this.client.getAllClientsInContextGroup(e.id))),n=(await Promise.all(t)).findIndex((e=>e.some((e=>{const{uuid:t,name:n}=e;return this.wire.me.uuid===t&&this.wire.me.name===n}))));return e[n]}async buildChannelObject(e){return{...e,type:"system",addContextListener:(...[e,t])=>{let n,i;"function"==typeof e?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),n=e):(n=t,"string"==typeof e&&(i=e));const r=(async()=>{let e=!0;const t=await this.client.getCurrentContext(i);return this.client.addContextHandler(((i,r)=>{if(!e||(e=!1,!(0,d.default)(t,i)))return n(i,r)}),i)})();return{...r,unsubscribe:()=>r.then((e=>e.unsubscribe()))}},broadcast:this.broadcast.bind(this),getCurrentContext:async e=>{const t=await this.client.getCurrentContext(e);return void 0===t?null:t}}}},e=new WeakMap,tr}ir.PrivateChannelClient=class{constructor(e,t){this.id=t,this.client=e,this.listeners=new Map}async broadcast(e){return this.client.dispatch("broadcast",{context:e})}async getCurrentContext(e){return this.client.dispatch("getCurrentContext",{contextType:e})}async addContextListener(e,t){if("function"!=typeof t)throw new Error("Non-function argument passed to the second parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");let n;n=e?`contextHandler:invoke-${this.id}-${e}-${ar.generateId()}`:`contextHandler:invoke-${this.id}-${ar.generateId()}`,this.client.register(n,ar.wrapContextHandler(t,n));const i={unsubscribe:await this.createContextUnsubscribeCb(n)};return this.listeners.set(n,i),await this.client.dispatch("contextHandlerAdded",{handlerId:n,contextType:e}),i}createNonStandardUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch("nonStandardHandlerRemoved",{handlerId:e})}}createContextUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch("contextHandlerRemoved",{handlerId:e})}}onAddContextListener(e){const t=`onContextHandlerAdded:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch("onAddContextHandlerAdded",{handlerId:t}),n}onDisconnect(e){const t=`onDisconnect:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch("onDisconnectHandlerAdded",{handlerId:t}),n}onUnsubscribe(e){const t=`onUnsubscribe:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch("onUnsubscribeHandlerAdded",{handlerId:t}),n}async cleanUpAllSubs(){Array.from(this.listeners.keys()).forEach((e=>{this.client.remove(e),this.listeners.delete(e)}))}async disconnect(){try{await this.client.dispatch("clientDisconnecting"),await this.cleanUpAllSubs(),await this.client.disconnect()}catch(e){throw new Error(e.message)}}},function(e){var t=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.getIntentResolution=e.isChannel=e.isContext=e.connectPrivateChannel=e.buildAppChannelObject=e.buildPrivateChannelObject=e.ChannelError=e.ResultError=e.UnsupportedChannelApiError=e.getUnsupportedChannelApis=void 0;const n=Hi,r=ir,o=t(i);e.getUnsupportedChannelApis=e=>({addContextListener:()=>{throw new a("Channel.addContextListener",e)},broadcast:()=>{throw new a("Channel.broadcast",e)},getCurrentContext:()=>{throw new a("Channel.getCurrentContext",e)}});class a extends Error{constructor(e,t="System"){super(e),this.message=`Calling ${e} on an instance of a ${t} Channel returned by fdc3.get${t}Channels is not supported. If you would like to use a ${t} Channel, please use fdc3.joinChannel, fdc3.addContextListener, and fdc3.broadcast instead.`}}var c,d;e.UnsupportedChannelApiError=a,function(e){e.NoResultReturned="NoResultReturned",e.IntentHandlerRejected="IntentHandlerRejected"}(c=e.ResultError||(e.ResultError={})),(d=e.ChannelError||(e.ChannelError={})).NoChannelFound="NoChannelFound",d.AccessDenied="AccessDenied",d.CreationFailed="CreationFailed";e.buildPrivateChannelObject=e=>{let t=!1;const n=()=>{if(t)throw new Error("Private Channel Client has been disconnected from the Private Channel")};return{id:e.id,type:"private",broadcast:async t=>(n(),e.broadcast(t)),getCurrentContext:async t=>(n(),e.getCurrentContext(t)),addContextListener:async(t,i)=>{n();let r=i,o=t;"function"==typeof t&&(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),r=t,o=null);return e.addContextListener(o,r)},onAddContextListener:t=>(n(),e.onAddContextListener(t)),disconnect:async()=>(n(),t=!0,e.disconnect()),onDisconnect:t=>(n(),e.onDisconnect(t)),onUnsubscribe:t=>(n(),e.onUnsubscribe(t))}};e.buildAppChannelObject=e=>({id:e.id,type:"app",broadcast:e.setContext,getCurrentContext:async t=>{const n=await e.getCurrentContext(t);return void 0===n?null:n},addContextListener:(t,n)=>{let i,r;"function"==typeof t?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),i=t):(i=n,"string"==typeof t&&(r=t));const s=(async()=>{let t=!0;const n=await e.getCurrentContext(r);return e.addContextHandler(((e,r)=>{if(!t||(t=!1,!(0,o.default)(n,e)))return i(e,r)}),r)})();return{...s,unsubscribe:()=>s.then((e=>e.unsubscribe()))}}});e.connectPrivateChannel=async t=>{try{const n=await fin.InterApplicationBus.Channel.connect(t),i=new r.PrivateChannelClient(n,t);return(0,e.buildPrivateChannelObject)(i)}catch(e){throw new Error(`Private Channel with id: ${t} doesn't exist`)}};e.isContext=e=>{if(e&&"object"==typeof e&&"type"in e){const{type:t}=e;return"string"==typeof t}return!1};e.isChannel=e=>{if(e&&"object"==typeof e&&"type"in e&&"id"in e){const{type:t,id:n}=e;return"string"==typeof t&&"string"==typeof n&&("app"===t||"private"===t)}return!1};e.getIntentResolution=async(t,i,r,o)=>{const s=(0,n.generateId)(),a=new Promise(((e,t)=>{fin.InterApplicationBus.subscribe({uuid:"*"},s,(t=>{e(t)})).catch((()=>t(new Error("getResult is not supported in this environment"))))})),d=r?{target:r,intentResolutionResultId:s}:{intentResolutionResultId:s},h=o?{name:o,context:i,metadata:d}:{...i,metadata:d},l=async()=>{let n=await a;if(!n||"object"!=typeof n)throw new Error(c.NoResultReturned);const{error:i}=n;if(i)throw new Error(c.IntentHandlerRejected);if((0,e.isChannel)(n)){const{id:i,type:r}=n;switch(r){case"private":n=await(0,e.connectPrivateChannel)(i);break;case"app":{const r=await t.joinSessionContextGroup(i);n=(0,e.buildAppChannelObject)(r);break}}}else if(!(0,e.isContext)(n))throw new Error(c.NoResultReturned);return n},u=o?await t.fireIntent(h):await t.fireIntentForContext(h);return"object"!=typeof u?{source:{appId:"",instanceId:""},intent:"",version:"2.0",getResult:l}:{...u,getResult:l}}}(nr);var lr,ur,pr={};function wr(){if(ur)return Ki;ur=1;var e,t,n=s&&s.__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},i=s&&s.__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)},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ki,"__esModule",{value:!0}),Ki.InteropClient=void 0;const o=d,a=r(qi),c=function(){if(dr)return er;dr=1,Object.defineProperty(er,"__esModule",{value:!0}),er.Fdc3Module=void 0;const e=Hi,t=hr();class n extends t.FDC3ModuleBase{async open(e,t){await super._open(e,t)}addContextListener(e,t){let n;return this.wire.sendAction("fdc3-add-context-listener").catch((e=>{})),"function"==typeof e?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),n=this.client.addContextHandler(e)):n=this.client.addContextHandler(t,null===e?void 0:e),{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}addIntentListener(e,t){this.wire.sendAction("fdc3-add-intent-listener").catch((e=>{}));const n=this.client.registerIntentHandler((e=>{const{context:n,metadata:i}=e,{metadata:r}=n,o=i?.intentResolutionResultId||r?.intentResolutionResultId;o&&this.fin.InterApplicationBus.publish(o,null).catch((()=>null)),t(e.context)}),e,{fdc3Version:"1.2"});return{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}async raiseIntent(t,n,i){this.wire.sendAction("fdc3-raise-intent").catch((e=>{}));const r=i?{name:t,context:n,metadata:{target:i}}:{name:t,context:n};try{return await this.client.fireIntent(r)}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntent?"ResolverUnavailable":t.message;throw new Error(n)}}async findIntent(t,n){this.wire.sendAction("fdc3-find-intent").catch((e=>{}));try{return await this.client.getInfoForIntent({name:t,context:n})}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntent?"ResolverUnavailable":t.message;throw new Error(n)}}async findIntentsByContext(t){this.wire.sendAction("fdc3-find-intents-by-context").catch((e=>{}));try{return await this.client.getInfoForIntentsByContext(t)}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntentsByContext?"ResolverUnavailable":t.message;throw new Error(n)}}async raiseIntentForContext(t,n){this.wire.sendAction("fdc3-raise-intent-for-context").catch((e=>{}));try{return await this.client.fireIntentForContext({...t,metadata:{target:n}})}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntentForContext?"ResolverUnavailable":t.message;throw new Error(n)}}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}getInfo(){return this.wire.sendAction("fdc3-get-info").catch((e=>{})),{providerVersion:this.wire.environment.getAdapterVersionSync(),provider:`openfin-${this.wire.me.uuid}`,fdc3Version:"1.2"}}}return er.Fdc3Module=n,er}(),h=function(){if(lr)return pr;lr=1,Object.defineProperty(pr,"__esModule",{value:!0}),pr.Fdc3Module2=void 0;const e=hr(),t=Hi,n=wr(),i=nr,r=ir;class o extends e.FDC3ModuleBase{async open(e,t){return"string"==typeof e&&console.warn("Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string })."),super._open(e,t)}async findInstances(e){this.wire.sendAction("fdc3-find-instances").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,"fdc3FindInstances",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3FindInstances?"ResolverUnavailable":e.message;throw new Error(n)}}async getAppMetadata(e){this.wire.sendAction("fdc3-get-app-metadata").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,"fdc3GetAppMetadata",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3GetAppMetadata?"ResolverUnavailable":e.message;throw new Error(n)}}async addContextListener(e,t){this.wire.sendAction("fdc3-add-context-listener").catch((e=>{}));const n=e=>t=>{const{contextMetadata:n,...i}=t,r=n?[{...i},n]:[t,null];e(...r)};let i=t,r=n(i);return"function"==typeof e?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),i=e,r=n(i),this.client.addContextHandler(r)):this.client.addContextHandler(r,null===e?void 0:e)}async findIntent(e,n,i){this.wire.sendAction("fdc3-find-intent").catch((e=>{}));try{return await this.client.getInfoForIntent({name:e,context:n,metadata:{resultType:i}})}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntent?"ResolverUnavailable":e.message;throw new Error(n)}}async findIntentsByContext(e,i){this.wire.sendAction("fdc3-find-intents-by-context").catch((e=>{}));const r=i?{context:e,metadata:{resultType:i}}:e;try{return await n.InteropClient.ferryFdc3Call(this.client,"fdc3v2FindIntentsByContext",r)}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntentsByContext?"ResolverUnavailable":e.message;throw new Error(n)}}async raiseIntent(e,n,r){this.wire.sendAction("fdc3-raise-intent").catch((e=>{}));try{return"string"==typeof r&&console.warn("Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string })."),(0,i.getIntentResolution)(this.client,n,r,e)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?"ResolverUnavailable":e.message;throw new Error(n)}}async raiseIntentForContext(e,n){this.wire.sendAction("fdc3-raise-intent-for-context").catch((e=>{}));try{return"string"==typeof n&&console.warn("Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string })."),(0,i.getIntentResolution)(this.client,e,n)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?"ResolverUnavailable":e.message;throw new Error(n)}}async addIntentListener(e,t){if(this.wire.sendAction("fdc3-add-intent-listener").catch((e=>{})),"string"!=typeof e)throw new Error("First argument must be an Intent name");return this.client.registerIntentHandler((async e=>{let n,i;const{context:r,metadata:o}=e,{contextMetadata:s,metadata:a,...c}=r,d=o?.intentResolutionResultId||a?.intentResolutionResultId;try{const e=a?{metadata:a,...c}:{...c};n=await t(e,s),i=n}catch(e){n=e,i={error:!0}}if(d&&this.fin.InterApplicationBus.publish(d,i).catch((()=>null)),n instanceof Error)throw new Error(n.message);return n}),e,{fdc3Version:"2.0"})}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}async createPrivateChannel(){const e=(0,t.generateId)();await n.InteropClient.ferryFdc3Call(this.client,"createPrivateChannelProvider",{channelId:e});const o=await this.fin.InterApplicationBus.Channel.connect(e),s=new r.PrivateChannelClient(o,e);return(0,i.buildPrivateChannelObject)(s)}async getUserChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:"user",...(0,i.getUnsupportedChannelApis)("User")})))}async getSystemChannels(){return console.warn("This API has been deprecated. Please use fdc3.getUserChannels instead."),super.getSystemChannels()}async joinUserChannel(e){return super.joinChannel(e)}async joinChannel(e){return console.warn("This API has been deprecated. Please use fdc3.joinUserChannel instead."),super.joinChannel(e)}async getCurrentChannel(){const e=await super.getCurrentChannel();return e?{...e,type:"user",broadcast:this.broadcast.bind(this)}:null}async getInfo(){return n.InteropClient.ferryFdc3Call(this.client,"fdc3v2GetInfo",{fdc3Version:"2.0"})}}return pr.Fdc3Module2=o,pr}(),l=Hi;let u=class extends o.Base{constructor(i,r){super(i),e.set(this,void 0),t.set(this,void 0),n(this,t,new Map,"f"),n(this,e,r,"f")}async setContext(t){this.wire.sendAction("interop-client-set-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("setContext",{context:t})}async addContextHandler(t,n){if(this.wire.sendAction("interop-client-add-context-handler").catch((e=>{})),"function"!=typeof t)throw new Error("Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");const r=await i(this,e,"f");let o;o=n?`invokeContextHandler-${n}-${(0,l.generateId)()}`:"invokeContextHandler";const s=(0,l.wrapContextHandler)(t,o);return r.register(o,s),await r.dispatch("contextHandlerRegistered",{handlerId:o,contextType:n}),{unsubscribe:async()=>{r.remove(o),await r.dispatch("removeContextHandler",{handlerId:o})}}}async getContextGroups(){this.wire.sendAction("interop-client-get-context-groups").catch((e=>{}));return(await i(this,e,"f")).dispatch("getContextGroups")}async joinContextGroup(t,n){this.wire.sendAction("interop-client-join-context-group").catch((e=>{}));const r=await i(this,e,"f");if(!t)throw new Error("No contextGroupId specified for joinContextGroup.");return r.dispatch("joinContextGroup",{contextGroupId:t,target:n})}async removeFromContextGroup(t){this.wire.sendAction("interop-client-remove-from-context-group").catch((e=>{}));return(await i(this,e,"f")).dispatch("removeFromContextGroup",{target:t})}async getAllClientsInContextGroup(t){this.wire.sendAction("interop-client-get-all-clients-in-context-group").catch((e=>{}));const n=await i(this,e,"f");if(!t)throw new Error("No contextGroupId specified for getAllClientsInContextGroup.");return n.dispatch("getAllClientsInContextGroup",{contextGroupId:t})}async getInfoForContextGroup(t){this.wire.sendAction("interop-client-get-info-for-context-group").catch((e=>{}));const n=await i(this,e,"f");if(!t)throw new Error("No contextGroupId specified for getInfoForContextGroup.");return n.dispatch("getInfoForContextGroup",{contextGroupId:t})}async fireIntent(t){this.wire.sendAction("interop-client-fire-intent").catch((e=>{}));return(await i(this,e,"f")).dispatch("fireIntent",t)}async registerIntentHandler(t,n,r){this.wire.sendAction("interop-client-register-intent-handler").catch((e=>{}));const o=await i(this,e,"f"),s=`intent-handler-${n}`,a=(0,l.wrapIntentHandler)(t,s);try{await o.register(s,a),await o.dispatch("intentHandlerRegistered",{handlerId:s,...r})}catch(e){throw new Error("Unable to register intent handler")}return{unsubscribe:async()=>{o.remove(s)}}}async getCurrentContext(t){this.wire.sendAction("interop-client-get-current-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("getCurrentContext",{contextType:t})}async getInfoForIntent(t){this.wire.sendAction("interop-client-get-info-for-intent").catch((e=>{}));return(await i(this,e,"f")).dispatch("getInfoForIntent",t)}async getInfoForIntentsByContext(t){this.wire.sendAction("interop-client-get-info-for-intents-by-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("getInfoForIntentsByContext",t)}async fireIntentForContext(t){this.wire.sendAction("interop-client-fire-intent-for-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("fireIntentForContext",t)}async joinSessionContextGroup(n){try{const r=i(this,t,"f").get(n);if(r)return r.getUserInstance();const o=await i(this,e,"f"),{hasConflict:s}=await o.dispatch("sessionContextGroup:createIfNeeded",{sessionContextGroupId:n});s&&console.warn(`A (non-session) context group with the name "${n}" already exists. If you are trying to join a Context Group, call joinContextGroup instead.`);const c=new a.default(this.wire,i(this,e,"f"),n);return i(this,t,"f").set(n,c),c.getUserInstance()}catch(e){throw console.error(`Error thrown trying to create Session Context Group with id "${n}": ${e}`),e}}async onDisconnection(t){this.wire.sendAction("interop-client-add-ondisconnection-listener").catch((e=>{}));return(await i(this,e,"f")).onDisconnection((e=>{const{uuid:n}=e;t({type:"interop-broker",topic:"disconnected",brokerName:n})}))}getFDC3Sync(e){switch(e){case"1.2":return new c.Fdc3Module((()=>this),this.wire);case"2.0":return new h.Fdc3Module2((()=>this),this.wire);default:throw new Error(`Invalid FDC3 version provided: ${e}. Must be '1.2' or '2.0'`)}}async getFDC3(e){return this.getFDC3Sync(e)}static async ferryFdc3Call(t,n,r){return(await i(t,e,"f")).dispatch(n,r||null)}};return Ki.InteropClient=u,e=new WeakMap,t=new WeakMap,Ki}var yr,fr,gr,mr={};function vr(){if(yr)return mr;yr=1,Object.defineProperty(mr,"__esModule",{value:!0}),mr.overrideCheck=mr.checkFDC32Overrides=mr.getDefaultViewFdc3VersionFromAppInfo=void 0;const e=Vi();function t(t){return["fdc3HandleFindInstances","handleInfoForIntent","handleInfoForIntentsByContext","fdc3HandleGetAppMetadata","fdc3HandleGetInfo","fdc3HandleOpen","handleFiredIntent","handleFiredIntentForContext"].filter((n=>t[n]===e.InteropBroker.prototype[n]))}return mr.getDefaultViewFdc3VersionFromAppInfo=function({manifest:e,initialOptions:t}){const n=e?.platform?.defaultViewOptions?.fdc3InteropApi??t.defaultViewOptions?.fdc3InteropApi;return["1.2","2.0"].includes(n??"")?n:void 0},mr.checkFDC32Overrides=t,mr.overrideCheck=function(e,n){if(n&&"2.0"===n){const n=t(e);n.length>0&&console.warn(`WARNING: FDC3 2.0 has been set as a default option for Views in this Platform, but the required InteropBroker APIs for FDC3 2.0 compliance have not all been overridden.\nThe following APIs need to be overridden:\n${n.join("\n")}`)}},mr}function Cr(){return gr||(gr=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),i=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),i(function(){if(fr)return Ti;fr=1;var e=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ti,"__esModule",{value:!0}),Ti.InteropModule=void 0;const t=e(n),i=$i,r=d,o=Vi(),a=wr(),c=vr(),h=Tn,l=e=>new e,u="You have attempted to use or modify InteropBroker parameters, which is not allowed. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.";class p extends r.Base{async init(e,n=l){this.wire.sendAction("interop-init").catch((()=>{}));const r=await this.wire.environment.getInteropInfo(this.wire.getFin()),s=(0,i.createUnusableObject)(u),a=(0,i.createWarningObject)(u,(0,t.default)(r)),d=async()=>{throw new Error(u)},p=o.InteropBroker.createClosedConstructor(this.wire,(()=>this.fin.InterApplicationBus.Channel.create(`interop-broker-${e}`)),r);let w;return w=Array.isArray(n)?new((0,h.overrideFromComposables)(...n)(p))(s,d,a):await n(p,s,d,a),(0,c.overrideCheck)(w,r.fdc3Version),w}connectSync(e,t){return this.wire.sendAction("interop-connect-sync").catch((()=>{})),new a.InteropClient(this.wire,this.wire.environment.whenReady().then((()=>this.fin.InterApplicationBus.Channel.connect(`interop-broker-${e}`,{payload:t}))))}}return Ti.InteropModule=p,Ti}(),e),i(wr(),e),i(Vi(),e)}(Li)),Li}var br={},Ir={},Er={},xr={};Object.defineProperty(xr,"__esModule",{value:!0}),xr.getSnapshotSourceChannelName=void 0;xr.getSnapshotSourceChannelName=e=>`snapshot-source-provider-${e.uuid}`;var Ar,Pr,Mr,_r,Or,Sr=s&&s.__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},Rr=s&&s.__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)};Object.defineProperty(Er,"__esModule",{value:!0}),Er.SnapshotSource=void 0;const Fr=d,jr=xr,kr=new Map;class Lr extends Fr.Base{constructor(e,t){super(e),Ar.set(this,void 0),Pr.set(this,(()=>(kr.has(this.identity.uuid)||kr.set(this.identity.uuid,{eventFired:null,clientPromise:null}),kr.get(this.identity.uuid)))),Mr.set(this,(()=>(Rr(this,Pr,"f").call(this).clientPromise||(Rr(this,Pr,"f").call(this).clientPromise=Rr(this,_r,"f").call(this)),Rr(this,Pr,"f").call(this).clientPromise))),_r.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);try{Rr(this,Pr,"f").call(this).eventFired||await Rr(this,Or,"f").call(this);const t=await this.fin.InterApplicationBus.Channel.connect(e,{wait:!1});return t.onDisconnection((()=>{Rr(this,Pr,"f").call(this).clientPromise=null,Rr(this,Pr,"f").call(this).eventFired=null})),t}catch(e){throw Rr(this,Pr,"f").call(this).clientPromise=null,new Error("The targeted SnapshotSource is not currently initialized. Await this object's ready() method.")}})),Or.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);let t,n;const i=new Promise(((e,i)=>{t=e,n=i}));Rr(this,Pr,"f").call(this).eventFired=i;const r=async i=>{try{i.channelName===e&&(t(),await this.fin.InterApplicationBus.Channel.removeListener("connected",r))}catch(e){n(e)}};await this.fin.InterApplicationBus.Channel.on("connected",r)})),Sr(this,Ar,t,"f")}get identity(){return Rr(this,Ar,"f")}async ready(){this.wire.sendAction("snapshot-source-ready").catch((e=>{}));try{await Rr(this,Mr,"f").call(this)}catch(e){await Rr(this,Pr,"f").call(this).eventFired}}async getSnapshot(){this.wire.sendAction("snapshot-source-get-snapshot").catch((e=>{}));const e=await Rr(this,Mr,"f").call(this),t=await e.dispatch("get-snapshot");return(await t).snapshot}async applySnapshot(e){this.wire.sendAction("snapshot-source-apply-snapshot").catch((e=>{}));return(await Rr(this,Mr,"f").call(this)).dispatch("apply-snapshot",{snapshot:e})}}Er.SnapshotSource=Lr,Ar=new WeakMap,Pr=new WeakMap,Mr=new WeakMap,_r=new WeakMap,Or=new WeakMap,Object.defineProperty(Ir,"__esModule",{value:!0}),Ir.SnapshotSourceModule=void 0;const Tr=d,$r=Er,Br=xr;class Gr extends Tr.Base{async init(e){if(this.wire.sendAction("snapshot-source-init").catch((e=>{})),"object"!=typeof e||"function"!=typeof e.getSnapshot||"function"!=typeof e.applySnapshot)throw new Error("you must pass in a valid SnapshotProvider");const t=await this.fin.InterApplicationBus.Channel.create((0,Br.getSnapshotSourceChannelName)(this.fin.me));t.register("get-snapshot",(async()=>({snapshot:await e.getSnapshot()}))),t.register("apply-snapshot",(({snapshot:t})=>e.applySnapshot(t)))}wrapSync(e){return this.wire.sendAction("snapshot-source-wrap-sync").catch((e=>{})),new $r.SnapshotSource(this.wire,e)}async wrap(e){return this.wire.sendAction("snapshot-source-wrap").catch((e=>{})),this.wrapSync(e)}}Ir.SnapshotSourceModule=Gr,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Ir,e),n(Er,e)}(br),Object.defineProperty(a,"__esModule",{value:!0});var Wr=a.Fin=void 0;const Hr=t,Nr=c,Dr=ie(),Ur=Z(),Vr=de,zr=en,Kr=rn,qr=un,Jr=bn,Yr=J(),Zr=An,Qr=ki,Xr=Cr(),eo=br;class to extends Hr.EventEmitter{constructor(e){super(),this.wire=e,this.System=new Nr.System(e),this.Window=new Dr._WindowModule(e),this.Application=new Ur.ApplicationModule(e),this.InterApplicationBus=new Vr.InterApplicationBus(e),this.Clipboard=new zr.Clipboard(e),this.ExternalApplication=new Kr.ExternalApplicationModule(e),this.Frame=new qr._FrameModule(e),this.GlobalHotkey=new Jr.GlobalHotkey(e),this.Platform=new Zr.PlatformModule(e,this.InterApplicationBus.Channel),this.View=new Yr.ViewModule(e),this.Interop=new Xr.InteropModule(e),this.SnapshotSource=new eo.SnapshotSourceModule(e),e.registerFin(this),this.me=(0,Qr.getMe)(e),e.on("disconnected",(()=>{this.emit("disconnected")}))}}Wr=a.Fin=to;var no={},io={};function ro(e){return"string"==typeof e.manifestUrl}function oo(e){return ao(e)&&"string"==typeof e.address}function so(e){return oo(e)&&"string"==typeof e.token}function ao(e){return"string"==typeof e.uuid}function co(e){return e.runtime&&"string"==typeof e.runtime.version}function ho(e){return ao(e)&&co(e)}Object.defineProperty(io,"__esModule",{value:!0}),io.isInternalConnectConfig=io.isPortDiscoveryConfig=io.isNewConnectConfig=io.isConfigWithReceiver=io.isRemoteConfig=io.isExistingConnectConfig=io.isExternalConfig=void 0,io.isExternalConfig=ro,io.isExistingConnectConfig=oo,io.isRemoteConfig=so,io.isConfigWithReceiver=function(e){return"object"==typeof e.receiver&&so({...e,address:""})},io.isNewConnectConfig=ho,io.isPortDiscoveryConfig=function(e){return ro(e)&&co(e)||ho(e)},io.isInternalConnectConfig=function(e){return oo(e)||ho(e)};var lo={},uo={};Object.defineProperty(uo,"__esModule",{value:!0}),uo.EmitterMap=void 0;const po=t;function wo(e){return Buffer.from(e).toString("base64")}uo.EmitterMap=class{constructor(){this.storage=new Map}hashKeys(e){return e.map(wo).join("/")}getOrCreate(e){const t=this.hashKeys(e);return this.storage.has(t)||this.storage.set(t,new po.EventEmitter),this.storage.get(t)}has(e){return this.storage.has(this.hashKeys(e))}delete(e){const t=this.hashKeys(e);return this.storage.delete(t)}},Object.defineProperty(lo,"__esModule",{value:!0});const yo=uo;class fo extends yo.EmitterMap{constructor(){super(...arguments),this.dispatchEvent=e=>{if(function(e){return"process-desktop-event"===e.action}(e)){const{payload:t}=e,n=function(e){const{topic:t}=e;if("frame"===t||"window"===t||"view"===t){const{uuid:n,name:i}=e;return[t,n,i]}if("application"===t){const{uuid:n}=e;return[t,n]}return[t]}(t);if(this.has(n))return this.getOrCreate(n).emit(t.type,t),!0}return!1}}}lo.default=fo;var go,mo,vo=s&&s.__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},Co=s&&s.__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)},bo=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(no,"__esModule",{value:!0});var Io=no.Transport=void 0;const Eo=t,xo=io,Ao=g,Po=bo(lo),Mo=ki,_o=ke;class Oo extends Eo.EventEmitter{constructor(e,t,n){super(),this.wireListeners=new Map,this.topicRefMap=new Map,this.eventAggregator=new Po.default,this.messageHandlers=[this.eventAggregator.dispatchEvent],go.set(this,void 0),mo.set(this,void 0),this.connectSync=()=>{Co(this,go,"f").connectSync()},this.getPort=()=>Co(this,go,"f").getPort(),vo(this,go,new e(this.onmessage.bind(this)),"f"),this.environment=t,this.sendRaw=Co(this,go,"f").send.bind(Co(this,go,"f")),this.registerMessageHandler(this.handleMessage.bind(this)),Co(this,go,"f").on("disconnected",(()=>{for(const[,{handleNack:e}]of this.wireListeners)e({reason:"Remote connection has closed"});this.wireListeners.clear(),this.emit("disconnected")}));const{uuid:i,name:r}=n,o=this.environment.getCurrentEntityType();this.me=(0,Mo.getBaseMe)(o,i,r)}getFin(){if(!Co(this,mo,"f"))throw new Error("No Fin object registered for this transport");return Co(this,mo,"f")}registerFin(e){if(Co(this,mo,"f"))throw new Error("Fin object has already been registered for this transport");vo(this,mo,e,"f")}shutdown(){return Co(this,go,"f").shutdown()}async connect(e){if((0,xo.isConfigWithReceiver)(e))return await Co(this,go,"f").connect(e.receiver),this.authorize(e);if((0,xo.isRemoteConfig)(e))return this.connectRemote(e);if((0,xo.isExistingConnectConfig)(e))return this.connectByPort(e);if((0,xo.isNewConnectConfig)(e)){const t=await this.environment.retrievePort(e);return this.connectByPort({...e,address:`ws://localhost:${t}`})}}async connectRemote(e){return await Co(this,go,"f").connect(new(this.environment.getWsConstructor())(e.address)),this.authorize(e)}async connectByPort(e){const{address:t,uuid:n}=e,i={...e,type:"file-token"},r=Co(this,go,"f");await r.connect(new(this.environment.getWsConstructor())(e.address));const o=await this.sendAction("request-external-authorization",{uuid:n,type:"file-token"},!0);if("external-authorization-response"!==o.action)throw new Ao.UnexpectedActionError(o.action);return await this.environment.writeToken(o.payload.file,o.payload.token),this.authorize(i)}async authorize(e){const t=await this.sendAction("request-authorization",e,!0);if("authorization-response"!==t.action)throw new Ao.UnexpectedActionError(t.action);if(!0!==t.payload.success)throw new Ao.RuntimeError(t.payload)}sendAction(e,t={},n=!1){let i=()=>{};const r=Ao.RuntimeError.getCallSite(1),o=this.environment.getNextMessageId(),s=new Promise(((s,a)=>{i=a;const c={action:e,payload:t,messageId:o},d=Co(this,go,"f");return this.addWireListener(o,s,(e=>this.nackHandler(e,a,r)),n),d.send(c).catch(a)}));return Object.assign(s,{cancel:i,messageId:o})}nackHandler(e,t,n){t("string"==typeof e?e:new Ao.RuntimeError(e,n))}ferryAction(e){return new Promise(((t,n)=>{const i=this.environment.getNextMessageId();e.messageId=i;const r=e=>{t(e.payload)};return Co(this,go,"f").send(e).then((()=>this.addWireListener(i,r,(e=>this.nackHandler(e,n)),!1))).catch(n)}))}registerMessageHandler(e){this.messageHandlers.push(e)}addWireListener(e,t,n,i){i?this.uncorrelatedListener=t:this.wireListeners.has(e)?n({reason:"Duplicate handler id",error:(0,_o.errorToPOJO)(new Ao.DuplicateCorrelationError(String(e)))}):this.wireListeners.set(e,{resolve:t,handleNack:n})}onmessage(e){for(const t of this.messageHandlers)t.call(null,e)}handleMessage(e){const t=e.correlationId||NaN;if("correlationId"in e){if(!this.wireListeners.has(t))return!1;{const{resolve:n,handleNack:i}=this.wireListeners.get(t);"ack"!==e.action?i({reason:"Did not receive ack action",error:(0,_o.errorToPOJO)(new Ao.NoAckError(e.action))}):"payload"in e?e.payload.success?n.call(null,e):i(e.payload):"string"==typeof e.reason?i(e):(console.warn("Received invalid response from core",e),i({reason:"invalid response shape"})),this.wireListeners.delete(t)}}else this.uncorrelatedListener&&this.uncorrelatedListener.call(null,e),this.uncorrelatedListener=()=>{};return!0}}Io=no.Transport=Oo,go=new WeakMap,mo=new WeakMap;const So=(...e)=>({log:(...t)=>console.debug(`[${(new Date).toISOString()}]`,...(e=>e.map((e=>`[${e}]`)))(e),...t),getLogger:(...t)=>So(...e,...t)}),Ro=So("@openfin/core-web/client");function Fo(e,t){if(!function(e){return"string"==typeof e}(e))throw new Error(`Property ${t} has invalid type. Expected string, got ${typeof e}.`)}const jo="web-broker-ports-ready",ko=Ro.getLogger("get-web-interop-ports");function Lo(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)}function To(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}"function"==typeof SuppressedError&&SuppressedError;const $o=e=>{var n,i,r;return r=class extends t.EventEmitter{constructor(t){super(),n.set(this,void 0),i.set(this,!1),this.connectSync=()=>{Lo(this,i,"f")||(e.addEventListener("message",(e=>{e.data?.topic?.startsWith("wire-message")&&e.data.message&&Lo(this,n,"f").call(this,{...JSON.parse(e.data.message),ports:e.ports})})),e.start())},this.connect=async()=>{this.connectSync()},this.send=t=>(e.postMessage({topic:"wire-message",message:JSON.stringify(t)}),Promise.resolve()),this.shutdown=async()=>{e.close()},To(this,n,t,"f")}getPort(){return e}},n=new WeakMap,i=new WeakMap,r};var Bo={},Go={};Object.defineProperty(Go,"__esModule",{value:!0}),Go.BaseEnvironment=void 0;const Wo=vr();Go.BaseEnvironment=class{async getViewWindowIdentity(e,t){const{identity:n}=await e.View.wrapSync(t).getCurrentWindow();return n}async getInteropInfo(e){const t=await e.Application.getCurrentSync().getInfo().catch((()=>null)),n=t?.initialOptions?.interopBrokerConfiguration??{};return{fdc3Version:t?(0,Wo.getDefaultViewFdc3VersionFromAppInfo)(t):void 0,...n,fdc3Info:{providerVersion:await e.System.getVersion(),provider:"OpenFin"}}}},Object.defineProperty(Bo,"__esModule",{value:!0});var Ho=Bo.BrowserEnvironment=void 0;const No=Go;class Do extends No.BaseEnvironment{constructor(){super(...arguments),this.type="other",this.getRandomId=()=>{const e=new Uint32Array(1);return window.crypto.getRandomValues(e)[0].toString(32)}}getAdapterVersionSync(){return""}observeBounds(e,t){throw new Error("Method not implemented.")}layoutAllowedInContext(e){return!1}initLayoutManager(e,t,n){throw new Error("Method not implemented.")}applyLayoutSnapshot(e,t,n){throw new Error("Method not implemented.")}createLayout(e,t){throw new Error("Method not implemented.")}destroyLayout(e,t){throw new Error("Method not implemented.")}resolveLayout(e,t){throw new Error("Method not implemented.")}initPlatform(...e){throw new Error("Method not implemented.")}writeToken(e,t){return Promise.resolve("")}retrievePort(e){throw new Error("Method not implemented.")}getNextMessageId(){return this.getRandomId()}createChildContent(e){throw new Error("Method not implemented.")}getWebWindow(e){throw new Error("Method not implemented.")}getCurrentEntityIdentity(){throw new Error("Method not implemented.")}getCurrentEntityType(){return"external connection"}raiseEvent(e,t){throw new Error("Method not implemented.")}getUrl(){return location.href}getDefaultChannelOptions(){return{create:{},connect:{}}}getRtcPeer(){return new RTCPeerConnection}getWsConstructor(){return WebSocket}whenReady(){return Promise.resolve()}}Ho=Bo.BrowserEnvironment=Do;const Uo=e=>"platform"in e&&void 0!==e.platform;var Vo,zo;class Ko extends Ho{constructor(e){super(),this.connectConfig=e,Vo.set(this,void 0),zo.set(this,new W((async()=>Promise.resolve().then((function(){return __webpack_require__(/*! ./main-b14f67c9.js */ "./node_modules/@openfin/core-web/out/main-b14f67c9.js")}))))),Uo(e)&&this.validatePlatformOptions(e)}getAdapterVersionSync(){return"0.39.21"}validatePlatformOptions({platform:e}){if(!("layoutSnapshot"in e))throw new Error("Platform options are missing layoutSnapshot. Please provide a layoutSnapshot in the platform options.");if("windows"in e||"windows"in e.layoutSnapshot)throw new Error("It appears you tried to call connect() with a snapshot object from an OpenFin desktop environment. Note that connect() expects to be called with a platform property with this structure: { platform: { layoutSnapshot } }. To get a layoutSnapshot of the expected structure, use fin.Platform.Layout.getCurrentLayoutManagerSync().getLayoutSnapshot() in v34+ in your desktop environment.");const{layouts:t}=e.layoutSnapshot;Object.entries(t).map((([e,t])=>{if("object"!=typeof t||null===t)throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must be an object.`);if(!("content"in t))throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must contain a 'content' property.`)}))}async getInteropInfo(e){return{...{contextGroups:void 0,logging:{beforeAction:{enabled:!1},afterAction:{enabled:!1}}},fdc3Version:void 0,fdc3Info:{providerVersion:"0.39.21",provider:"OpenFin Web"}}}layoutAllowedInContext(e){return!0}async initLayoutManager(e,t,n){if(Lo(this,Vo,"f"))throw new Error("Layout already initialized.");if(!Uo(this.connectConfig))throw new Error("Platform options are missing from connection config.");const{WebLayoutEntryPoint:i}=await Lo(this,zo,"f").getValue();return To(this,Vo,new i(this.connectConfig),"f"),await Lo(this,Vo,"f").initLayoutManager(e,t,n)}async applyLayoutSnapshot(e,t,n){Lo(this,Vo,"f")?.applyLayoutSnapshot(e,t,n)}async createLayout(e,t){return Lo(this,Vo,"f")?.createLayout(e,t)}async destroyLayout(e,t){return Lo(this,Vo,"f")?.destroyLayout(e,t)}async getViewWindowIdentity(e,t){return Promise.resolve({uuid:t.uuid,name:t.uuid})}}Vo=new WeakMap,zo=new WeakMap;const qo=()=>{const e=((e,t)=>{const n=new RegExp(`^${t}<(?.*)>$`).exec(e)?.groups?.meta;if(n)try{return JSON.parse(atob(n))}catch(e){throw new Error(`Failed to decode JSON from ${n}.`)}})(window.name,"of-frame");if(e)try{const{name:t,uuid:n,brokerUrl:i,providerId:r,contextGroup:o}=e;return Fo(i,"brokerUrl"),Fo(n,"uuid"),Fo(t,"name"),{identity:{name:t,uuid:n},brokerUrl:i,interopConfig:{providerId:r,currentContextGroup:o}}}catch(e){throw new Error(`Unexpected error occurred when inferring platform information: ${e.stack}`)}},Jo=()=>{const e=r.v4();return{uuid:e,name:e}},Yo=async e=>{if("enabled"===e.connectionInheritance){const t=await(async e=>{const t=qo();if(t){const{validateOptions:n=(()=>!0)}=e,{identity:i,...r}=t;if(!await n(r))throw new Error("Parent options were rejected by validateOptions.");return t}})(e);if(t)return t}if(!e.options){const t="enabled"===e.connectionInheritance?"Broker URL was not specified nor provided by a platform container.":"Connection inheritance is disabled but no options were provided.";throw new Error(t)}return{...e.options,identity:Jo()}};exports.__classPrivateFieldGet=Lo,exports.__classPrivateFieldSet=To,exports.apiExposer=Gn,exports.commonjsGlobal=s,exports.connect=async t=>{try{Ro.log("Establishing connection",t);const{brokerUrl:n,identity:i,timeout:r,interopConfig:s}=await Yo(t),{workerPort:a,iframeBrokerPort:c}=await(async(e,t,n)=>{const{origin:i}=new URL(e),r=document.createElement("IFRAME");let s;r.style.display="none";try{return await new Promise(((a,c)=>{const d=e=>{if(e.source===r.contentWindow&&e.data?.topic===`ack-${jo}`){if(e.origin!==i)c(new Error(`Broker redirected to unexpected origin ${e.origin}, expected ${i}.`));else if(e.data.success){const[t,n]=e.ports;a({iframeBrokerPort:t,workerPort:n})}else c(new m(e.data));window.removeEventListener("message",d),clearTimeout(s)}};window.addEventListener("message",d),ko.log(`Connecting to broker ${e}`),r.setAttribute("src",e),r.setAttribute("name",o(t,"of-broker")),document.body.appendChild(r),ko.log("Iframe loaded, awaiting init message from iframe"),n&&(s=setTimeout((()=>{window.removeEventListener("message",d),document.body.removeChild(r),c(new Error("Worker did not initialize in time"))}),n))}))}catch(e){throw new Error(`Failed to initialise Fin Web Client. ${e.message}`,{cause:e})}})(n,i,r);Ro.log("Successfully established connection to shared worker");const d={entityType:"external connection",...i};a.start(),c.start();const h=((t,n,i)=>{const r=$o(n),o=new Ko(t),s=new Io(r,o,i);return s.connectSync(),window.Buffer=e.Buffer,new Wr(s)})(t,a,d);return s?.providerId&&(h.me.interop=h.Interop.connectSync(s.providerId),s?.currentContextGroup&&h.me.interop.joinContextGroup(s.currentContextGroup).catch((e=>{console.warn(`Error joining specified context group: ${s?.currentContextGroup}, continuing`,e)}))),{...h,me:{...h.me,identity:{uuid:h.me.uuid,name:h.me.name}}}}catch(e){throw new Error(`An error occured during web-interop connection: ${e.message}`)}},exports.decorators=Nn,exports.encodeOptions=o,exports.layout_constants=ai,exports.lazy=G; +var e=__webpack_require__(/*! buffer/ */ "../../node_modules/buffer/index.js"),t=__webpack_require__(/*! events */ "../../node_modules/events/events.js"),n=__webpack_require__(/*! lodash/cloneDeep */ "../../node_modules/lodash/cloneDeep.js"),i=__webpack_require__(/*! lodash/isEqual */ "../../node_modules/lodash/isEqual.js"),r=__webpack_require__(/*! uuid */ "../../node_modules/uuid/dist/esm-browser/index.js");const o=(e,t)=>`${t}<${btoa(JSON.stringify(e))}>`;var s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof __webpack_require__.g?__webpack_require__.g:"undefined"!=typeof self?self:{},a={},c={},d={},h={};async function l(e){const t=[];for(const n of e){const e=await n();t.push(e)}return t}Object.defineProperty(h,"__esModule",{value:!0}),h.promiseMapSerial=h.serial=h.promiseMap=h.promisify=void 0,h.promisify=function(e){return(...t)=>new Promise(((n,i)=>{e(...t,((e,t)=>e?i(e):n(t)))}))},h.promiseMap=async function(e,t){return Promise.all(e.map(t))},h.serial=l,h.promiseMapSerial=async function(e,t){return l(e.map(((e,n,i)=>()=>t(e,n,i))))};var u,p=s&&s.__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},w=s&&s.__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)};Object.defineProperty(d,"__esModule",{value:!0}),d.Reply=d.EmitterBase=d.Base=void 0;const y=h;class f{constructor(e){this.isNodeEnvironment=()=>"node"===this.wire.environment.type,this.isOpenFinEnvironment=()=>"openfin"===this.wire.environment.type,this.isBrowserEnvironment=()=>"other"===this.wire.environment.type,this.wire=e}get fin(){return this.wire.getFin()}get me(){return this.wire.me}}d.Base=f;d.EmitterBase=class extends f{constructor(e,t,...n){super(e),this.topic=t,u.set(this,void 0),this.eventNames=()=>this.hasEmitter()?this.getOrCreateEmitter().eventNames():[],this.emit=(e,t,...n)=>!!this.hasEmitter()&&this.getOrCreateEmitter().emit(e,t,...n),this.hasEmitter=()=>this.wire.eventAggregator.has(w(this,u,"f")),this.getOrCreateEmitter=()=>this.wire.eventAggregator.getOrCreate(w(this,u,"f")),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[],this.listenerCount=e=>this.hasEmitter()?this.getOrCreateEmitter().listenerCount(e):0,this.registerEventListener=async(e,t={},n,i)=>{const r={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e},o=this.getOrCreateEmitter();n(o);try{await this.wire.sendAction("subscribe-to-desktop-event",r)}catch(e){throw i(o),this.deleteEmitterIfNothingRegistered(o),e}},this.deregisterEventListener=async(e,t={})=>{if(this.hasEmitter()){const n={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e};await this.wire.sendAction("unsubscribe-to-desktop-event",n).catch((()=>null));return this.getOrCreateEmitter()}return Promise.resolve()},p(this,u,[t,...n],"f"),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[]}async on(e,t,n){return await this.registerEventListener(e,n,(n=>{n.on(e,t)}),(n=>{n.removeListener(e,t)})),this}async addListener(e,t,n){return this.on(e,t,n)}async once(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.once(e,i),n.once(e,t)}),(n=>{n.removeListener(e,i),n.removeListener(e,t)})),this}async prependListener(e,t,n){return await this.registerEventListener(e,n,(n=>{n.prependListener(e,t)}),(n=>{n.removeListener(e,t)})),this}async prependOnceListener(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.prependOnceListener(e,t),n.once(e,i)}),(n=>{n.removeListener(e,t),n.removeListener(e,i)})),this}async removeListener(e,t,n){const i=await this.deregisterEventListener(e,n);return i&&(i.removeListener(e,t),this.deleteEmitterIfNothingRegistered(i)),this}async deregisterAllListeners(e){const t={...this.identity,type:e,topic:this.topic};if(this.hasEmitter()){const e=this.getOrCreateEmitter(),n=e.listenerCount(t.type),i=[];for(let e=0;enull)));return await Promise.all(i),e}}async removeAllListeners(e){const t=async e=>{const t=await this.deregisterAllListeners(e);t&&(t.removeAllListeners(e),this.deleteEmitterIfNothingRegistered(t))};if(e)await t(e);else if(this.hasEmitter()){const e=this.getOrCreateEmitter().eventNames();await(0,y.promiseMap)(e,t)}return this}deleteEmitterIfNothingRegistered(e){0===e.eventNames().length&&this.wire.eventAggregator.delete(w(this,u,"f"))}},u=new WeakMap;d.Reply=class{};var g={};Object.defineProperty(g,"__esModule",{value:!0});var m=g.RuntimeError=g.NotSupportedError=g.NotImplementedError=g.NoAckError=g.DuplicateCorrelationError=g.UnexpectedActionError=g.DisconnectedError=void 0;class v extends Error{constructor(e){super(`Expected websocket state OPEN but found ${e}`),this.readyState=e}}g.DisconnectedError=v;class C extends Error{}g.UnexpectedActionError=C;class b extends Error{}g.DuplicateCorrelationError=b;class I extends Error{}g.NoAckError=I;class E extends Error{}g.NotImplementedError=E;class x extends Error{}g.NotSupportedError=x;class A extends Error{constructor(e){const{message:t,name:n,stack:i,...r}=e;super(t),this.name=n||"Error",this.stack=i??this.toString(),Object.keys(r).forEach((e=>{this[e]=r[e]}))}}class P extends Error{static getCallSite(e=0){const t=Error.stackTraceLimit,n=e+1;Error.stackTraceLimit=t+n;const i=Error.prepareStackTrace;Error.prepareStackTrace=(e,t)=>t;const r=(new Error).stack?.slice(n)??[];return Error.prepareStackTrace=i,Error.stackTraceLimit=t,r}static prepareStackTrace(e,t){if("function"==typeof Error.prepareStackTrace)return Error.prepareStackTrace(e,t);let n="";n+=e.name||"Error",n+=`: ${e.message||""}`;for(const e of t)n+=`\n at ${e.toString()}`;return n}constructor(e,t){const{reason:n,error:i}=e;super(n),this.name="RuntimeError",i?.stack&&(this.cause=new A(i)),t&&(this.stack=P.prepareStackTrace(this,t))}}m=g.RuntimeError=P;var M={},_={},O={};Object.defineProperty(O,"__esModule",{value:!0}),O.validateIdentity=void 0,O.validateIdentity=function(e){let t;return"object"==typeof e&&"string"==typeof e.uuid||(t="Not a valid identity object"),t};var S={},R={},F={},j={},k={},L={},T={};Object.defineProperty(T,"__esModule",{value:!0}),T.handleDeprecatedWarnings=void 0;var $;T.handleDeprecatedWarnings=e=>{(e.contentNavigation?.whitelist||e.contentNavigation?.blacklist||e.contentRedirect?.whitelist||e.contentRedirect?.blacklist)&&console.warn("The properties 'whitelist' and 'blacklist' have been marked as deprecated and will be removed in a future version. Please use 'allowlist' and 'denylist'.")};var B={},G={};Object.defineProperty(G,"__esModule",{value:!0}),G.AsyncRetryableLazy=W=G.Lazy=void 0;var W=G.Lazy=class{constructor(e){this.producerFn=e}getValue(){return this.value||(this.value=this.producerFn()),this.value}};G.AsyncRetryableLazy=class{constructor(e){this.producerFn=e}async getValue(){return this.promise||(this.promise=this.producerFn().catch((e=>{throw delete this.promise,e}))),this.promise}};var H={};Object.defineProperty(H,"__esModule",{value:!0}),H.WebContents=void 0;const N=d;class D extends N.EmitterBase{constructor(e,t,n){super(e,n,t.uuid,t.name),this.identity=t,this.entityType=n}capturePage(e){return this.wire.sendAction("capture-page",{options:e,...this.identity}).then((({payload:e})=>e.data))}executeJavaScript(e){return this.wire.sendAction("execute-javascript-in-window",{...this.identity,code:e}).then((({payload:e})=>e.data))}getZoomLevel(){return this.wire.sendAction("get-zoom-level",this.identity).then((({payload:e})=>e.data))}setZoomLevel(e){return this.wire.sendAction("set-zoom-level",{...this.identity,level:e}).then((()=>{}))}navigate(e){return this.wire.sendAction("navigate-window",{...this.identity,url:e}).then((()=>{}))}navigateBack(){return this.wire.sendAction("navigate-window-back",{...this.identity}).then((()=>{}))}async navigateForward(){await this.wire.sendAction("navigate-window-forward",{...this.identity})}stopNavigation(){return this.wire.sendAction("stop-window-navigation",{...this.identity}).then((()=>{}))}reload(e=!1){return this.wire.sendAction("reload-window",{ignoreCache:e,...this.identity}).then((()=>{}))}print(e={}){return this.wire.sendAction("print",{...this.identity,options:e}).then((()=>{}))}findInPage(e,t){return this.wire.sendAction("find-in-page",{...this.identity,searchTerm:e,options:t}).then((({payload:e})=>e.data))}stopFindInPage(e){return this.wire.sendAction("stop-find-in-page",{...this.identity,action:e}).then((()=>{}))}getPrinters(){return this.wire.sendAction("get-printers",{...this.identity}).then((({payload:e})=>e.data))}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){await this.wire.sendAction("focus-window",{emitSynthFocused:e,...this.identity})}async showDeveloperTools(){await this.wire.sendAction("show-developer-tools",this.identity)}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction("get-process-info",this.identity);return e}async getSharedWorkers(){return this.wire.sendAction("get-shared-workers",this.identity).then((({payload:e})=>e.data))}async inspectSharedWorker(){await this.wire.sendAction("inspect-shared-worker",{...this.identity})}async inspectSharedWorkerById(e){await this.wire.sendAction("inspect-shared-worker-by-id",{...this.identity,workerId:e})}async inspectServiceWorker(){await this.wire.sendAction("inspect-service-worker",{...this.identity})}async showPopupWindow(e){if(this.wire.sendAction(`${this.entityType}-show-popup-window`,this.identity).catch((()=>{})),e?.onPopupReady){const t=async({popupName:t})=>{try{const n=this.fin.Window.wrapSync({uuid:this.fin.me.uuid,name:t});await e.onPopupReady(n)}catch(e){throw new Error(`Something went wrong during onPopupReady execution: ${e}`)}};await this.once("popup-ready",t)}const{payload:t}=await this.wire.sendAction("try-create-popup-window",{options:{...e,hasResultCallback:!!e?.onPopupResult,hasReadyCallback:!!e?.onPopupReady},...this.identity}),{data:{willOpen:n,options:i}}=t;n&&await this.fin.Window.create(i.initialOptions);if(e?.onPopupResult){const t=async t=>{await e.onPopupResult((e=>{const{name:t,uuid:n,result:i,data:r}=e,o={identity:{name:t,uuid:n},result:i};return r&&(o.data=r),o})(t))},n=async()=>{await this.removeListener("popup-result",t)};await this.on("popup-result",t),await this.once("popup-teardown",n)}const{payload:r}=await this.wire.sendAction("show-popup-window",{options:i,...this.identity});return r.data}}var U,V,z,K,q;function J(){return V||(V=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(function(){if($)return L;$=1,Object.defineProperty(L,"__esModule",{value:!0}),L.ViewModule=void 0;const e=d,t=O,n=J(),i=T;class r extends e.Base{async create(e){const{uuid:t}=this.wire.me;if(!e.name||"string"!=typeof e.name)throw new Error("Please provide a name property as a string in order to create a View.");return(0,i.handleDeprecatedWarnings)(e),this.wire.environment.childViews?await this.wire.environment.createChildContent({entityType:"view",options:{...e,uuid:t}}):await this.wire.sendAction("create-view",{...e,uuid:t}),this.wrapSync({uuid:t,name:e.name})}async wrap(e){this.wire.sendAction("view-wrap").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}wrapSync(e){this.wire.sendAction("view-wrap-sync").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}getCurrent(){if(this.wire.sendAction("view-get-current").catch((e=>{})),!this.wire.me.isView)throw new Error("You are not in a View context");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction("view-get-current-sync").catch((e=>{})),!this.wire.me.isView)throw new Error("You are not in a View context");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return L.ViewModule=r,L}(),e),n(function(){if(U)return B;var e;U=1,Object.defineProperty(B,"__esModule",{value:!0}),B.View=void 0;const t=g,n=G,i=H,r=ie();class o extends i.WebContents{constructor(i,o){super(i,o,"view"),this.identity=o,e.set(this,new n.Lazy((()=>this.fin.Platform.wrapSync(this.identity).getClient()))),this.attach=async e=>{await this.wire.sendAction("attach-view",{target:e,...this.identity})},this.destroy=async()=>{await this.wire.sendAction("destroy-view",{...this.identity})},this.show=async()=>{await this.wire.sendAction("show-view",{...this.identity})},this.showAt=async(e,t={})=>{await this.wire.sendAction("show-view-at",{bounds:e,...this.identity,options:t})},this.bringToFront=async()=>{await this.wire.sendAction("bring-view-to-front",{...this.identity})},this.hide=async()=>{await this.wire.sendAction("hide-view",{...this.identity})},this.setBounds=async e=>{await this.wire.sendAction("set-view-bounds",{bounds:e,...this.identity})},this.getBounds=async()=>(await this.wire.sendAction("get-view-bounds",{...this.identity})).payload.data,this.getInfo=async()=>(await this.wire.sendAction("get-view-info",{...this.identity})).payload.data,this.getParentLayout=async()=>(this.wire.sendAction("view-get-parent-layout",{...this.identity}).catch((()=>{})),this.fin.Platform.Layout.getLayoutByViewIdentity(this.identity)),this.getOptions=async()=>this.wire.sendAction("get-view-options",{...this.identity}).then((({payload:e})=>e.data)),this.updateOptions=async e=>this.wire.sendAction("update-view-options",{options:e,...this.identity}).then((()=>{})),this.getCurrentWindow=async()=>{const{payload:{data:e}}=await this.wire.sendAction("get-view-window",{...this.identity});return new r._Window(this.wire,e)},this.getCurrentStack=async()=>{this.wire.sendAction("view-get-current-stack").catch((()=>{}));try{return(await this.getParentLayout()).getStackByViewIdentity(this.identity)}catch(e){throw new t.RuntimeError({reason:"This view does not belong to a stack.",error:e})}},this.triggerBeforeUnload=async()=>(await this.wire.sendAction("trigger-before-unload",{...this.identity})).payload.data,this.bindToElement=async e=>{if(!e)throw new Error("Element not found.");return this.wire.environment.observeBounds(e,(async e=>this.setBounds(e)))}}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){const t=await this.getCurrentWindow();await t.focusedWebViewWasChanged(),await super.focus({emitSynthFocused:e})}}return B.View=o,e=new WeakMap,B}(),e)}(k)),k}function Y(){if(z)return j;z=1,Object.defineProperty(j,"__esModule",{value:!0}),j.Application=void 0;const e=d,t=ie(),n=J();class i extends e.EmitterBase{constructor(e,n){super(e,"application",n.uuid),this.identity=n,this.window=new t._Window(this.wire,{uuid:this.identity.uuid,name:this.identity.uuid})}windowListFromIdentityList(e){const n=[];return e.forEach((e=>{n.push(new t._Window(this.wire,{uuid:e.uuid,name:e.name}))})),n}isRunning(){return this.wire.sendAction("is-application-running",this.identity).then((({payload:e})=>e.data))}async quit(e=!1){try{await this._close(e),await this.wire.sendAction("destroy-application",{force:e,...this.identity})}catch(e){if(!["Remote connection has closed","Could not locate the requested application"].some((t=>e.message.includes(t))))throw e}}async _close(e=!1){try{await this.wire.sendAction("close-application",{force:e,...this.identity})}catch(e){if(!e.message.includes("Remote connection has closed"))throw e}}close(e=!1){return console.warn("Deprecation Warning: Application.close is deprecated Please use Application.quit"),this.wire.sendAction("application-close",this.identity).catch((e=>{})),this._close(e)}getChildWindows(){return this.wire.sendAction("get-child-windows",this.identity).then((({payload:e})=>{const t=[];return e.data.forEach((e=>{t.push({uuid:this.identity.uuid,name:e})})),this.windowListFromIdentityList(t)}))}getManifest(){return this.wire.sendAction("get-application-manifest",this.identity).then((({payload:e})=>e.data))}getParentUuid(){return this.wire.sendAction("get-parent-application",this.identity).then((({payload:e})=>e.data))}getShortcuts(){return this.wire.sendAction("get-shortcuts",this.identity).then((({payload:e})=>e.data))}async getViews(){const{payload:e}=await this.wire.sendAction("application-get-views",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}getZoomLevel(){return this.wire.sendAction("get-application-zoom-level",this.identity).then((({payload:e})=>e.data))}getWindow(){return this.wire.sendAction("application-get-window",this.identity).catch((e=>{})),Promise.resolve(this.window)}registerUser(e,t){return this.wire.sendAction("register-user",{userName:e,appName:t,...this.identity}).then((()=>{}))}removeTrayIcon(){return this.wire.sendAction("remove-tray-icon",this.identity).then((()=>{}))}restart(){return this.wire.sendAction("restart-application",this.identity).then((()=>{}))}run(){return console.warn("Deprecation Warning: Application.run is deprecated Please use fin.Application.start"),this.wire.sendAction("application-run",this.identity).catch((e=>{})),this._run()}_run(e={}){return this.wire.sendAction("run-application",{manifestUrl:this._manifestUrl,opts:e,...this.identity}).then((()=>{}))}scheduleRestart(){return this.wire.sendAction("relaunch-on-close",this.identity).then((()=>{}))}async sendApplicationLog(){const{payload:e}=await this.wire.sendAction("send-application-log",this.identity);return e.data}async setJumpList(e){await this.wire.sendAction("set-jump-list",{config:e,...this.identity})}setTrayIcon(e){return this.wire.sendAction("set-tray-icon",{enabledIcon:e,...this.identity}).then((()=>{}))}setShortcuts(e){return this.wire.sendAction("set-shortcuts",{data:e,...this.identity}).then((()=>{}))}async setShortcutQueryParams(e){await this.wire.sendAction("set-shortcut-query-args",{data:e,...this.identity})}setZoomLevel(e){return this.wire.sendAction("set-application-zoom-level",{level:e,...this.identity}).then((()=>{}))}async setAppLogUsername(e){await this.wire.sendAction("set-app-log-username",{data:e,...this.identity})}getTrayIconInfo(){return this.wire.sendAction("get-tray-icon-info",this.identity).then((({payload:e})=>e.data))}hasTrayIcon(){return this.wire.sendAction("has-tray-icon",this.identity).then((({payload:e})=>e.data))}terminate(){return this.wire.sendAction("terminate-application",this.identity).then((()=>{}))}wait(){return this.wire.sendAction("wait-for-hung-application",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction("get-info",this.identity).then((({payload:e})=>e.data))}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction("application-get-process-info",this.identity);return e}async setFileDownloadLocation(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t};await this.wire.sendAction("set-file-download-location",{...n,downloadLocation:e})}async getFileDownloadLocation(){const{payload:{data:e}}=await this.wire.sendAction("get-file-download-location",this.identity);return e}async showTrayIconPopupMenu(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t},{payload:i}=await this.wire.sendAction("show-tray-icon-popup-menu",{...n,options:e});return i.data}async closeTrayIconPopupMenu(){const{name:e}=this.wire.me,t={uuid:this.identity.uuid,name:e};await this.wire.sendAction("close-tray-icon-popup-menu",{...t})}}return j.Application=i,j}function Z(){return q||(q=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(function(){if(K)return F;K=1,Object.defineProperty(F,"__esModule",{value:!0}),F.ApplicationModule=void 0;const e=d,t=O,n=Y();class i extends e.Base{async wrap(e){this.wire.sendAction("wrap-application").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}wrapSync(e){this.wire.sendAction("wrap-application-sync").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}async _create(e){return void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&void 0===e.isPlatformController&&(e.autoShow=!0),await this.wire.sendAction("create-application",e),this.wrap({uuid:e.uuid})}create(e){return console.warn("Deprecation Warning: fin.Application.create is deprecated. Please use fin.Application.start"),this.wire.sendAction("application-create").catch((e=>{})),this._create(e)}async start(e){this.wire.sendAction("start-application").catch((e=>{}));const t=await this._create(e);return await this.wire.sendAction("run-application",{uuid:e.uuid}),t}async startManyManifests(e,t){return this.wire.sendAction("run-applications",{applications:e,opts:t}).then((()=>{}))}getCurrent(){return this.wire.sendAction("get-current-application").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction("get-current-application-sync").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}async startFromManifest(e,t){this.wire.sendAction("application-start-from-manifest").catch((e=>{}));const n=await this._createFromManifest(e);return await n._run(t),n}createFromManifest(e){return console.warn("Deprecation Warning: fin.Application.createFromManifest is deprecated. Please use fin.Application.startFromManifest"),this.wire.sendAction("application-create-from-manifest").catch((e=>{})),this._createFromManifest(e)}_createFromManifest(e){return this.wire.sendAction("get-application-manifest",{manifestUrl:e}).then((({payload:e})=>{const t=e.data.platform?e.data.platform.uuid:e.data.startup_app.uuid;return this.wrap({uuid:t})})).then((t=>(t._manifestUrl=e,t)))}}return F.ApplicationModule=i,F}(),e),n(Y(),e)}(R)),R}H.WebContents=D;var Q={};Object.defineProperty(Q,"__esModule",{value:!0}),Q.promisifySubscription=void 0;var X,ee,te;function ne(){if(X)return S;X=1,Object.defineProperty(S,"__esModule",{value:!0}),S._Window=void 0;const e=Z(),t=H,n=J(),i=T,r=Q;class o extends t.WebContents{constructor(e,t){super(e,t,"window")}async createWindow(e){this.wire.sendAction("window-create-window",this.identity).catch((e=>{}));const t=await(0,r.promisifySubscription)(this,"fire-constructor-callback");void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&(e.autoShow=!0),(0,i.handleDeprecatedWarnings)(e);const n=this.wire.environment.createChildContent({entityType:"window",options:e}),[o]=await Promise.all([t.getValue(),n]);let s;const{success:a}=o,c=o.data,{message:d}=c;s=a?{httpResponseCode:c.httpResponseCode,apiInjected:c.apiInjected}:{message:c.message,networkErrorCode:c.networkErrorCode,stack:c.stack};const h={message:d,cbPayload:s,success:a};try{this.getWebWindow().fin.__internal_.openerSuccessCBCalled()}catch(e){}return h.success?this:Promise.reject(h)}getAllFrames(){return this.wire.sendAction("get-all-frames",this.identity).then((({payload:e})=>e.data))}getBounds(){return this.wire.sendAction("get-window-bounds",this.identity).then((({payload:e})=>e.data))}center(){return this.wire.sendAction("center-window",this.identity).then((()=>{}))}blur(){return this.wire.sendAction("blur-window",this.identity).then((()=>{}))}bringToFront(){return this.wire.sendAction("bring-window-to-front",this.identity).then((()=>{}))}animate(e,t){return this.wire.sendAction("animate-window",{transitions:e,options:t,...this.identity}).then((()=>{}))}hide(){return this.wire.sendAction("hide-window",this.identity).then((()=>{}))}close(e=!1){return this.wire.sendAction("close-window",{force:e,...this.identity}).then((()=>{Object.setPrototypeOf(this,null)}))}focusedWebViewWasChanged(){return this.wire.sendAction("focused-webview-changed",this.identity).then((()=>{}))}getNativeId(){return this.wire.sendAction("get-window-native-id",this.identity).then((({payload:e})=>e.data))}async getCurrentViews(){const{payload:e}=await this.wire.sendAction("window-get-views",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}disableFrame(){return console.warn("Function is deprecated; use disableUserMovement instead."),this.wire.sendAction("disable-window-frame",this.identity).then((()=>{}))}disableUserMovement(){return this.wire.sendAction("disable-window-frame",this.identity).then((()=>{}))}enableFrame(){return console.warn("Function is deprecated; use enableUserMovement instead."),this.wire.sendAction("enable-window-frame",this.identity).then((()=>{}))}enableUserMovement(){return this.wire.sendAction("enable-window-frame",this.identity).then((()=>{}))}flash(){return this.wire.sendAction("flash-window",this.identity).then((()=>{}))}stopFlashing(){return this.wire.sendAction("stop-flash-window",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction("get-window-info",this.identity).then((({payload:e})=>e.data))}async getLayout(e){this.wire.sendAction("window-get-layout",this.identity).catch((e=>{}));const t=await this.getOptions();if(!t.layout&&!t.layoutSnapshot)throw new Error("Window does not have a Layout");return this.fin.Platform.Layout.wrap(e??this.identity)}getOptions(){return this.wire.sendAction("get-window-options",this.identity).then((({payload:e})=>e.data))}getParentApplication(){return this.wire.sendAction("window-get-parent-application",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity))}getParentWindow(){return this.wire.sendAction("window-get-parent-window",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity)).then((e=>e.getWindow()))}async getSnapshot(e){const t={area:e,...this.identity};console.warn("Window.getSnapshot has been deprecated, please use Window.capturePage");return(await this.wire.sendAction("get-window-snapshot",t)).payload.data}getState(){return this.wire.sendAction("get-window-state",this.identity).then((({payload:e})=>e.data))}getWebWindow(){return this.wire.sendAction("window-get-web-window",this.identity).catch((e=>{})),this.wire.environment.getWebWindow(this.identity)}isMainWindow(){return this.wire.sendAction("window-is-main-window",this.identity).catch((e=>{})),this.me.uuid===this.me.name}isShowing(){return this.wire.sendAction("is-window-showing",this.identity).then((({payload:e})=>e.data))}maximize(){return this.wire.sendAction("maximize-window",this.identity).then((()=>{}))}minimize(){return this.wire.sendAction("minimize-window",this.identity).then((()=>{}))}moveBy(e,t,n){return this.wire.sendAction("move-window-by",{deltaLeft:e,deltaTop:t,positioningOptions:n,...this.identity}).then((()=>{}))}moveTo(e,t,n){return this.wire.sendAction("move-window",{left:e,top:t,positioningOptions:n,...this.identity}).then((()=>{}))}resizeBy(e,t,n,i){return this.wire.sendAction("resize-window-by",{deltaWidth:Math.floor(e),deltaHeight:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}resizeTo(e,t,n,i){return this.wire.sendAction("resize-window",{width:Math.floor(e),height:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}restore(){return this.wire.sendAction("restore-window",this.identity).then((()=>{}))}setAsForeground(){return this.wire.sendAction("set-foreground-window",this.identity).then((()=>{}))}setBounds(e,t){return this.wire.sendAction("set-window-bounds",{...e,...this.identity,positioningOptions:t}).then((()=>{}))}show(e=!1){return this.wire.sendAction("show-window",{force:e,...this.identity}).then((()=>{}))}showAt(e,t,n=!1){return this.wire.sendAction("show-at-window",{force:n,left:Math.floor(e),top:Math.floor(t),...this.identity}).then((()=>{}))}updateOptions(e){return this.wire.sendAction("update-window-options",{options:e,...this.identity}).then((()=>{}))}authenticate(e,t){return this.wire.sendAction("window-authenticate",{userName:e,password:t,...this.identity}).then((()=>{}))}async showPopupMenu(e){const{payload:t}=await this.wire.sendAction("show-popup-menu",{options:e,...this.identity});return t.data}async closePopupMenu(){return this.wire.sendAction("close-popup-menu",{...this.identity}).then((()=>{}))}async dispatchPopupResult(e){this.wire.sendAction("window-dispatch-popup-result",this.identity).catch((e=>{})),await this.wire.sendAction("dispatch-popup-result",{data:e,...this.identity})}async print(e={content:"self"}){switch(e.content){case void 0:case"self":return super.print(e);case"screenshot":return this.wire.sendAction("print-screenshot",this.identity).then((()=>{}));case"views":return this.wire.sendAction("print-views",{...this.identity,options:e}).then((()=>{}));default:return}}}return S._Window=o,S}function ie(){return te||(te=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(function(){if(ee)return _;ee=1,Object.defineProperty(_,"__esModule",{value:!0}),_._WindowModule=void 0;const e=d,t=O,n=ne();class i extends e.Base{async wrap(e){this.wire.sendAction("window-wrap").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}wrapSync(e){this.wire.sendAction("window-wrap-sync").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}create(e){return this.wire.sendAction("create-window").catch((e=>{})),new n._Window(this.wire,{uuid:this.me.uuid,name:e.name}).createWindow(e)}getCurrent(){if(this.wire.sendAction("get-current-window").catch((e=>{})),!this.wire.me.isWindow)throw new Error("You are not in a Window context");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction("get-current-window-sync").catch((e=>{})),!this.wire.me.isWindow)throw new Error("You are not in a Window context");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return _._WindowModule=i,_}(),e),n(ne(),e)}(M)),M}Q.promisifySubscription=async(e,t,n=(()=>!0),i)=>{let r,o,s;const a=new Promise(((e,t)=>{r=e,o=t})),c=e=>{n(e)&&(clearTimeout(s),r(e))};return await e.on(t,c),i&&(s=setTimeout((()=>o(new Error("event timed out"))),i)),a.finally((()=>{e.removeListener(t,c).catch((()=>null))})),{getValue:()=>a}},Object.defineProperty(c,"__esModule",{value:!0}),c.System=void 0;const re=d,oe=g,se=ie(),ae=t;class ce extends re.EmitterBase{constructor(e){super(e,"system")}sendExternalProcessRequest(e,t){return new Promise(((n,i)=>{const r="external-process-exited";let o,s,a,c;"function"==typeof t.listener&&(a=e=>{const n=e||{};s={topic:"exited",uuid:n.processUuid||"",exitCode:n.exitCode||0},o===e.processUuid&&(t.listener(s),c.removeListener(r,a))},this.wire.me.name||(this.wire.me.name=this.wire.me.uuid),c=new se._Window(this.wire,this.wire.me),c.on(r,a)),this.wire.sendAction(e,t).then((({payload:e})=>{o=e.data.uuid,n(e.data),s&&o===s.uuid&&(t.listener(s),c.removeListener(r,a))})).catch((e=>{c&&c.removeListener(r,a),i(e)}))}))}getVersion(){return this.wire.sendAction("get-version").then((({payload:e})=>e.data))}clearCache(e){return this.wire.sendAction("clear-cache",e).then((()=>{}))}deleteCacheOnExit(){return this.wire.sendAction("delete-cache-request").then((()=>{}))}exit(){return this.wire.sendAction("exit-desktop").then((()=>{}))}async fetchManifest(e){const{payload:{data:t}}=await this.wire.sendAction("fetch-manifest",{manifestUrl:e});return t}flushCookieStore(){return this.wire.sendAction("flush-cookie-store").then((()=>{}))}getAllWindows(){return this.wire.sendAction("get-all-windows").then((({payload:e})=>e.data))}getAllApplications(){return this.wire.sendAction("get-all-applications").then((({payload:e})=>e.data))}getCommandLineArguments(){return this.wire.sendAction("get-command-line-arguments").then((({payload:e})=>e.data))}async getCrashReporterState(){const{payload:{data:{diagnosticMode:e,isRunning:t}}}=await this.wire.sendAction("get-crash-reporter-state");return console.warn("diagnosticMode property is deprecated. It will be removed in a future version"),{diagnosticMode:e,diagnosticsMode:e,isRunning:t}}async startCrashReporter(e){const t=e,n={...t,diagnosticMode:t.diagnosticsMode||t.diagnosticMode},{payload:{data:{diagnosticMode:i,isRunning:r}}}=await this.wire.sendAction("start-crash-reporter",n);return{diagnosticMode:i,diagnosticsMode:i,isRunning:r}}getUniqueUserId(){return this.wire.sendAction("get-unique-user-id").then((({payload:e})=>e.data))}getEntityInfo(e,t){return this.wire.sendAction("get-entity-info",{uuid:e,name:t}).then((({payload:e})=>e.data))}getEnvironmentVariable(e){return this.wire.sendAction("get-environment-variable",{environmentVariables:e}).then((({payload:e})=>e.data))}getFocusedWindow(){return this.wire.sendAction("get-focused-window").then((({payload:e})=>e.data))}async isAppCertified(e){const{payload:{data:{certifiedInfo:t}}}=await this.wire.sendAction("is-app-certified",{manifestUrl:e});return t}getInstalledRuntimes(){return this.wire.sendAction("get-installed-runtimes").then((({payload:e})=>e.data.runtimes))}async getInstalledApps(){const{payload:{data:{installedApps:e}}}=await this.wire.sendAction("get-installed-apps");return e}getLog(e){return this.wire.sendAction("view-log",e).then((({payload:e})=>e.data))}getMachineId(){return this.wire.sendAction("get-machine-id").then((({payload:e})=>e.data))}getMinLogLevel(){return this.wire.sendAction("get-min-log-level").then((({payload:e})=>e.data))}getLogList(){return this.wire.sendAction("list-logs").then((({payload:e})=>e.data))}getMonitorInfo(){return this.wire.sendAction("get-monitor-info").then((({payload:e})=>e.data))}getMousePosition(){return this.wire.sendAction("get-mouse-position").then((({payload:e})=>e.data))}getProcessList(){return console.warn("System.getProcessList has been deprecated. Please consider using our new process APIs: Window.getProcessInfo, View.getProcessInfo, Application.getProcessInfo, System.getAllProcessInfo"),this.wire.sendAction("process-snapshot").then((({payload:e})=>e.data))}async getAllProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction("get-all-process-info",this.identity);return e}getProxySettings(){return this.wire.sendAction("get-proxy-settings").then((({payload:e})=>e.data))}getRuntimeInfo(){return this.wire.sendAction("get-runtime-info").then((({payload:e})=>e.data))}getRvmInfo(){return this.wire.sendAction("get-rvm-info").then((({payload:e})=>e.data))}getHostSpecs(){return this.wire.sendAction("get-host-specs").then((({payload:e})=>e.data))}getOSInfo(){return this.wire.sendAction("get-os-info").then((({payload:e})=>e.data))}launchExternalProcess(e){return this.sendExternalProcessRequest("launch-external-process",e)}monitorExternalProcess(e){return this.sendExternalProcessRequest("monitor-external-process",e)}log(e,t){return this.wire.sendAction("write-to-log",{level:e,message:t}).then((()=>{}))}openUrlWithBrowser(e){return this.wire.sendAction("open-url-with-browser",{url:e}).then((()=>{}))}async registerCustomProtocol(e){if("object"!=typeof e)throw new Error("Must provide an object with a `protocolName` property having a string value.");await this.wire.sendAction("register-custom-protocol",e)}async unregisterCustomProtocol(e){await this.wire.sendAction("unregister-custom-protocol",{protocolName:e})}async getCustomProtocolState(e){return this.wire.sendAction("get-custom-protocol-state",{protocolName:e}).then((({payload:e})=>e.data))}releaseExternalProcess(e){return this.wire.sendAction("release-external-process",{uuid:e}).then((()=>{}))}showDeveloperTools(e){return this.wire.sendAction("show-developer-tools",e).then((()=>{}))}terminateExternalProcess(e){return this.wire.sendAction("terminate-external-process",e).then((()=>{}))}updateProxySettings(e){return this.wire.sendAction("update-proxy",e).then((()=>{}))}async downloadAsset(e,t){const n=()=>{};let i=n,r=n;const o=new Promise(((e,t)=>{i=e,r=t}));if("openfin"!==this.wire.environment.type)throw new oe.NotSupportedError("downloadAsset only supported in an OpenFin Render process");const s=oe.RuntimeError.getCallSite(),a=this.wire.environment.getNextMessageId().toString(),c=`asset-download-progress-${a}`,d=`asset-download-error-${a}`,h=`asset-download-complete-${a}`,l=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},u=()=>{this.removeListener(c,l)};await Promise.all([this.on(c,l),this.once(d,(e=>{u();const{reason:t,err:n}=e;r(new oe.RuntimeError({reason:t,error:n},s))})),this.once(h,(()=>{u(),i()}))]);const p=Object.assign(e,{downloadId:a});return await this.wire.sendAction("download-asset",p).catch((e=>{throw u(),e})),o}downloadRuntime(e,t){const n=oe.RuntimeError.getCallSite();return new Promise(((i,r)=>{if("openfin"!==this.wire.environment.type)return void r(new oe.NotSupportedError("downloadRuntime only supported in an OpenFin Render process"));const o=this.wire.environment.getNextMessageId().toString(),s=`runtime-download-progress-${o}`,a=`runtime-download-error-${o}`,c=`runtime-download-complete-${o}`,d=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},h=()=>{this.removeListener(s,d)};this.on(s,d),this.once(a,(e=>{h();const{reason:t,err:i}=e;r(new oe.RuntimeError({reason:t,error:i},n))})),this.once(c,(()=>{h(),i()}));const l=Object.assign(e,{downloadId:o});this.wire.sendAction("download-runtime",l).catch((e=>{h(),r(e)}))}))}downloadPreloadScripts(e){return this.wire.sendAction("download-preload-scripts",{scripts:e}).then((({payload:e})=>e.data))}getAllExternalApplications(){return this.wire.sendAction("get-all-external-applications").then((({payload:e})=>e.data))}getAppAssetInfo(e){return this.wire.sendAction("get-app-asset-info",e).then((({payload:e})=>e.data))}getCookies(e){const t=this.wire.environment.getUrl(),n=Object.assign(e,{url:t});return this.wire.sendAction("get-cookies",n).then((({payload:e})=>e.data))}setMinLogLevel(e){return this.wire.sendAction("set-min-log-level",{level:e}).then((()=>{}))}resolveUuid(e){return this.wire.sendAction("resolve-uuid",{entityKey:e}).then((({payload:e})=>e.data))}executeOnRemote(e,t){return t.requestingIdentity=e,this.wire.ferryAction(t)}readRegistryValue(e,t,n){return this.wire.sendAction("read-registry-value",{rootKey:e,subkey:t,value:n}).then((({payload:e})=>e.data))}registerExternalConnection(e){return this.wire.sendAction("register-external-connection",{uuid:e}).then((({payload:e})=>e.data))}async getServiceConfiguration(e){if("string"!=typeof e.name)throw new Error("Must provide an object with a `name` property having a string value");const{name:t}=e;return this.wire.sendAction("get-service-configuration",{name:t}).then((({payload:e})=>e.data))}async getSystemAppConfig(e){if("string"!=typeof e)throw new Error("Must provide a string value for name of system app");return this.wire.sendAction("get-system-app-configuration",{name:e}).then((({payload:e})=>e.data))}async registerShutdownHandler(e){this.wire.sendAction("system-register-shutdown-handler").catch((e=>{}));const{uuid:t,name:n}=this.wire.me;this.on("system-shutdown",(i=>{e({proceed:()=>{this.wire.environment.raiseEvent("application/system-shutdown-handled",{uuid:t,name:n,topic:"application"})}})}))}runRvmHealthCheck(){return this.wire.sendAction("run-rvm-health-check").then((({payload:e})=>e.data))}async launchManifest(e,t={}){const{subscribe:n,...i}=t,r=i;if(n){const e=new ae.EventEmitter;n(e);const t="app-version-progress",i="runtime-status",o="app-version-complete",s="app-version-error",a=this.wire.environment.getNextMessageId().toString();r.appVersionId=a;const c=[o,t,i,s],d=e=>{const{appVersionId:t,topic:n,type:i,...r}=e;return{...r,type:c.find((e=>i.includes(e)))}},h=t=>{const n=d(t);e.emit(n.type,n)},l=()=>{this.removeListener(`${t}.${a}`,h),this.removeListener(`${i}.${a}`,h),this.removeListener(`${o}.${a}`,h),this.removeListener(`${s}.${a}`,h),this.removeListener(`${o}.${a}`,l),this.removeListener(`${s}.${a}`,l)};await Promise.all([this.on(`${t}.${a}`,h),this.on(`${i}.${a}`,h),this.once(`${o}.${a}`,h),this.once(`${s}.${a}`,h),this.once(`${o}.${a}`,l),this.once(`${s}.${a}`,l)])}return(await this.wire.sendAction("launch-manifest",{manifestUrl:e,opts:r})).payload.data.manifest}async queryPermissionForCurrentContext(e){const t={uuid:this.wire.me.uuid,name:this.wire.me.name};return(await this.wire.sendAction("query-permission-for-current-context",{apiName:e,identity:t})).payload.data}async enableNativeWindowIntegrationProvider(e){const{payload:t}=await this.wire.sendAction("enable-native-window-integration-provider",{permissions:e});return t.data}async registerUsage({data:e,type:t}){await this.wire.sendAction("register-usage",{data:e,type:t})}async getPrinters(){const{payload:e}=await this.wire.sendAction("system-get-printers");return e.data}async updateProcessLoggingOptions(e){await this.wire.sendAction("system-update-process-logging-options",{options:e})}async getDomainSettings(){const{payload:{data:e}}=await this.wire.sendAction("get-domain-settings",this.identity);return e}async setDomainSettings(e){await this.wire.sendAction("set-domain-settings",{domainSettings:e,...this.identity})}async refreshExtensions(){const{payload:e}=await this.wire.sendAction("refresh-extensions");return e.data}async getInstalledExtensions(){const{payload:e}=await this.wire.sendAction("get-installed-extensions");return e.data}}c.System=ce;var de={},he={};Object.defineProperty(he,"__esModule",{value:!0}),he.RefCounter=void 0;he.RefCounter=class{constructor(){this.topicRefMap=new Map}incRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t+1;n=i,this.topicRefMap.set(e,i)}else this.topicRefMap.set(e,1),n=1;return n}decRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t-1;this.topicRefMap.set(e,i),n=i}else n=-1;return n}actOnFirst(e,t,n){return 1===this.incRefCount(e)?t():n()}actOnLast(e,t,n){return 0===this.decRefCount(e)?t():n()}};var le={},ue={},pe={};Object.defineProperty(pe,"__esModule",{value:!0}),pe.ChannelBase=pe.ProtectedItems=void 0;const we=e=>async(t,n,i)=>{const r=await e(t,n,i);return void 0===r?n:r};pe.ProtectedItems=class{constructor(e,t){this.providerIdentity=e,this.close=t}};class ye{static defaultAction(e){throw new Error(`No action registered at target for ${e}`)}constructor(){this.subscriptions=new Map}async processAction(e,t,n){try{const i=this.subscriptions.has(e)?this.subscriptions.get(e):(t,n)=>(this.defaultAction??ye.defaultAction)(e,t,n),r=this.preAction?await this.preAction(e,t,n):t,o=await i(r,n);return this.postAction?await this.postAction(e,o,n):o}catch(t){if(this.errorMiddleware)return this.errorMiddleware(e,t,n);throw t}}beforeAction(e){if(this.preAction)throw new Error("Already registered beforeAction middleware");this.preAction=we(e)}onError(e){if(this.errorMiddleware)throw new Error("Already registered error middleware");this.errorMiddleware=e}afterAction(e){if(this.postAction)throw new Error("Already registered afterAction middleware");this.postAction=we(e)}remove(e){this.subscriptions.delete(e)}setDefaultAction(e){if(this.defaultAction)throw new Error("default action can only be set once");this.defaultAction=e}register(e,t){if(this.subscriptions.has(e))throw new Error(`Subscription already registered for action: ${e}. Unsubscribe before adding new subscription`);return this.subscriptions.set(e,t),!0}}pe.ChannelBase=ye;var fe,ge,me,ve=s&&s.__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)},Ce=s&&s.__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};Object.defineProperty(ue,"__esModule",{value:!0}),ue.ChannelClient=void 0;const be=pe,Ie=new Map;class Ee extends be.ChannelBase{static closeChannelByEndpointId(e){const t=Ie.get(e);t&&ve(t,me,"f").call(t)}static handleProviderDisconnect(e){for(const t of Ie.values())t.providerIdentity.channelId===e.channelId&&(t.disconnectListener(e),ve(t,me,"f").call(t))}constructor(e,t,n){super(),fe.set(this,void 0),ge.set(this,void 0),this.processAction=(e,t,n)=>super.processAction(e,t,n),me.set(this,(()=>{Ie.delete(this.endpointId),ve(this,ge,"f").close()})),Ce(this,fe,new be.ProtectedItems(e,t),"f"),this.disconnectListener=()=>{},this.endpointId=e.endpointId,Ce(this,ge,n,"f"),Ie.set(this.endpointId,this),n.receive(this.processAction)}get providerIdentity(){return ve(this,fe,"f").providerIdentity}async dispatch(e,t){if(ve(this,ge,"f").isEndpointConnected(this.providerIdentity.channelId))return ve(this,ge,"f").send(this.providerIdentity.channelId,e,t);throw new Error("The client you are trying to dispatch from is disconnected from the target provider.")}onDisconnection(e){this.disconnectListener=t=>{try{e(t)}catch(e){throw new Error(`Error while calling the onDisconnection callback: ${e.message}`)}finally{this.disconnectListener=()=>{}}}}async disconnect(){await this.sendDisconnectAction(),ve(this,me,"f").call(this)}async sendDisconnectAction(){const e=ve(this,fe,"f");await e.close()}static async wireClose(e,t,n){const{channelName:i,uuid:r,name:o}=t;await e.sendAction("disconnect-from-channel",{channelName:i,uuid:r,name:o,endpointId:n})}}ue.ChannelClient=Ee,fe=new WeakMap,ge=new WeakMap,me=new WeakMap;var xe={},Ae={};Object.defineProperty(Ae,"__esModule",{value:!0}),Ae.exhaustiveCheck=void 0,Ae.exhaustiveCheck=function(e,t){throw new Error(`Unsupported value: ${e}${t?`\n Supported values are: ${t.join("")}`:""}`)};var Pe,Me,_e,Oe={},Se=s&&s.__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},Re=s&&s.__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)};Object.defineProperty(Oe,"__esModule",{value:!0}),Oe.ClassicInfo=Oe.ClassicStrategy=void 0;Oe.ClassicStrategy=class{constructor(e,t,n,i){this.messageReceiver=t,this.endpointId=n,this.providerIdentity=i,Pe.set(this,void 0),Me.set(this,new Map),_e.set(this,new Map),this.send=async(e,t,n)=>{const i=Re(this,Me,"f").get(e);if(!i)throw new Error(`Could not locate routing info for endpoint ${e}`);const r={...i};r.isLocalEndpointId&&delete r.endpointId,delete r.isLocalEndpointId;const o=Re(this,Pe,"f").sendAction("send-channel-message",{...r,providerIdentity:this.providerIdentity,action:t,payload:n});Re(this,_e,"f").get(e)?.add(o);return(await o.catch((e=>{throw new Error(e.message)})).finally((()=>{Re(this,_e,"f").get(e)?.delete(o)}))).payload.data.result},this.close=async()=>{this.messageReceiver.removeEndpoint(this.providerIdentity.channelId,this.endpointId),[...Re(this,Me,"f").keys()].forEach((e=>this.closeEndpoint(e))),Se(this,Me,new Map,"f")},Se(this,Pe,e,"f")}onEndpointDisconnect(e,t){}receive(e){this.messageReceiver.addEndpoint(e,this.providerIdentity.channelId,this.endpointId)}async closeEndpoint(e){const t=Re(this,Me,"f").get(e);Re(this,Me,"f").delete(e);const n=Re(this,_e,"f").get(e);n?.forEach((n=>{const i=`Channel connection with identity uuid: ${t?.uuid} / name: ${t?.name} / endpointId: ${e} no longer connected.`;n.cancel(new Error(i))}))}isEndpointConnected(e){return Re(this,Me,"f").has(e)}addEndpoint(e,t){Re(this,Me,"f").set(e,t.endpointIdentity),Re(this,_e,"f").set(e,new Set)}isValidEndpointPayload(e){return"string"==typeof e?.endpointIdentity?.endpointId||"string"==typeof e?.endpointIdentity?.channelId}},Pe=new WeakMap,Me=new WeakMap,_e=new WeakMap,Oe.ClassicInfo={version:5,minimumVersion:0,type:"classic"};var Fe={},je={},ke={};Object.defineProperty(ke,"__esModule",{value:!0}),ke.errorToPOJO=void 0,ke.errorToPOJO=function(e){return{stack:e.stack,name:e.name,message:e.message,toString:()=>e.stack||e.toString()}};var Le,Te,$e=s&&s.__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)},Be=s&&s.__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};Object.defineProperty(je,"__esModule",{value:!0}),je.RTCEndpoint=void 0;const Ge=ke;je.RTCEndpoint=class{static isValidEndpointPayload(e){const t=e=>"object"==typeof e&&null!==e;return t(e)&&t(e.endpointIdentity)&&t(e.rtc)&&"string"==typeof e.endpointIdentity.endpointId}constructor({rtc:e,endpointIdentity:t}){this.responseMap=new Map,Le.set(this,null),Te.set(this,void 0),this.connectionStateChangeHandler=e=>{"connected"!==this.rtc.rtcClient.connectionState&&(this.rtc.rtcClient.removeEventListener("connectionstatechange",this.connectionStateChangeHandler),this.close(),$e(this,Te,"f")&&$e(this,Te,"f").call(this))},this.send=async(e,t)=>{const n=`message-${Math.random()}`,i=new Promise(((e,t)=>{this.responseMap.set(n,{resolve:e,reject:t})}));return this.rtc.channels.request.send(JSON.stringify({action:e,payload:t,messageId:n})),i},this.close=()=>{this.responseMap.forEach((e=>e.reject("Connection has closed."))),this.responseMap=new Map,this.rtc.channels.request.close(),this.rtc.channels.response.close(),this.rtc.rtcClient.close()},this.rtc=e,this.endpointIdentity=t,this.rtc.channels.response.addEventListener("message",(e=>{let{data:t}=e;e.data instanceof ArrayBuffer&&(t=(new TextDecoder).decode(e.data));const{messageId:n,payload:i,success:r,error:o}=JSON.parse(t),{resolve:s,reject:a}=this.responseMap.get(n)??{};s&&a?(this.responseMap.delete(n),r?s(i):a(o)):(console.log("Could not find id in responseMap."),console.log(e))})),this.rtc.channels.request.addEventListener("message",(async e=>{let{data:n}=e;e.data instanceof ArrayBuffer&&(n=(new TextDecoder).decode(e.data));const{messageId:i,action:r,payload:o}=JSON.parse(n);if($e(this,Le,"f"))try{const e=await $e(this,Le,"f").call(this,r,o,t);this.rtc.channels.response.send(JSON.stringify({messageId:i,payload:e,success:!0}))}catch(e){"open"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,error:(0,Ge.errorToPOJO)(e),success:!1}))}else"open"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,success:!1,error:"Connection not ready."}))})),this.rtc.rtcClient.addEventListener("connectionstatechange",this.connectionStateChangeHandler),Object.values(this.rtc.channels).forEach((e=>{e.onclose=e=>{[...this.responseMap.values()].forEach((e=>e.reject(new Error("RTCDataChannel closed unexpectedly, this is most commonly caused by message size. Note: RTC Channels have a message size limit of ~255kB.")))),this.close(),$e(this,Te,"f")&&$e(this,Te,"f").call(this)}}))}onDisconnect(e){if($e(this,Te,"f"))throw new Error("RTCEndpoint disconnectListener cannot be set twice.");Be(this,Te,e,"f")}receive(e){if($e(this,Le,"f"))throw new Error("You have already set a listener for this RTC Endpoint.");Be(this,Le,e,"f")}get connected(){return"connected"===this.rtc.rtcClient.connectionState}},Le=new WeakMap,Te=new WeakMap;var We,He,Ne,De={},Ue=s&&s.__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)},Ve=s&&s.__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};Object.defineProperty(De,"__esModule",{value:!0}),De.EndpointStrategy=void 0;De.EndpointStrategy=class{constructor(e,t,n){this.EndpointType=e,this.StrategyName=n,We.set(this,null),He.set(this,new Map),Ne.set(this,!0),this.send=async(e,t,n)=>this.getEndpointById(e).send(t,n),this.close=async()=>{Ue(this,Ne,"f")&&(Ue(this,He,"f").forEach((e=>e.close())),Ve(this,He,new Map,"f")),Ve(this,Ne,!1,"f")},this.isValidEndpointPayload=t}onEndpointDisconnect(e,t){this.getEndpointById(e).onDisconnect(t)}receive(e){if(Ue(this,We,"f"))throw new Error(`You have already set a listener for this ${this.StrategyName} Strategy`);Ve(this,We,e,"f"),Ue(this,He,"f").forEach((e=>e.receive(Ue(this,We,"f"))))}getEndpointById(e){const t=Ue(this,He,"f").get(e);if(!t)throw new Error(`Client with endpoint id ${e} is not connected`);return t}get connected(){return Ue(this,Ne,"f")}isEndpointConnected(e){return Ue(this,He,"f").has(e)}addEndpoint(e,t){if(!Ue(this,Ne,"f"))return void console.warn(`Adding endpoint to disconnected ${this.StrategyName} Strategy`);const n=new this.EndpointType(t);Ue(this,We,"f")&&n.receive(Ue(this,We,"f")),Ue(this,He,"f").set(e,n)}async closeEndpoint(e){Ue(this,He,"f").delete(e)}},We=new WeakMap,He=new WeakMap,Ne=new WeakMap,Object.defineProperty(Fe,"__esModule",{value:!0}),Fe.RTCInfo=Fe.RTCStrategy=void 0;const ze=je,Ke=De;class qe extends Ke.EndpointStrategy{constructor(){super(ze.RTCEndpoint,ze.RTCEndpoint.isValidEndpointPayload,"RTC")}}Fe.RTCStrategy=qe,Fe.RTCInfo={version:2,minimumVersion:0,type:"rtc"};var Je={};Object.defineProperty(Je,"__esModule",{value:!0}),Je.RTCICEManager=void 0;const Ye=d;class Ze extends Ye.EmitterBase{constructor(e){super(e,"channel"),this.ensureChannelOpened=e=>new Promise(((t,n)=>{if("open"===e.readyState)t();else if("connecting"===e.readyState){const n=()=>{e.removeEventListener("open",n),t()};e.addEventListener("open",n)}else n(new Error("This Channel has already closed"))}))}static createDataChannelPromise(e,t){let n;const i=new Promise((e=>{n=e})),r=i=>{const o=()=>{i.channel.removeEventListener("open",o),n(i.channel)};i.channel.label===e&&(i.channel.addEventListener("open",o),t.removeEventListener("datachannel",r))};return t.addEventListener("datachannel",r),i}async listenForProviderIce(e,t){await this.on(this.createProviderEventName(e),t,{timestamp:Date.now()})}async raiseProviderIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createProviderEventName(e)),t)}async listenForClientIce(e,t){await this.on(this.createClientEventName(e),t,{timestamp:Date.now()})}async raiseClientIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createClientEventName(e)),t)}cleanupIceListeners(e){this.removeAllListeners(this.createClientEventName(e)),this.removeAllListeners(this.createProviderEventName(e))}createClientEventName(e){return`ice-client-${e}`}createProviderEventName(e){return`ice-provider-${e}`}createRouteString(e){return`channel/${e}`}createRtcPeer(){return this.wire.environment.getRtcPeer()}async startClientOffer(){const e=Math.random().toString(),t=this.createRtcPeer();t.addEventListener("icecandidate",(async t=>{t.candidate&&await this.raiseClientIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForProviderIce(e,(async e=>{await t.addIceCandidate(e.candidate)}));const n={request:t.createDataChannel("request"),response:t.createDataChannel("response")},i=await t.createOffer();await t.setLocalDescription(i);const r=Promise.all([n.request,n.response].map(this.ensureChannelOpened)).then((()=>{}));return{rtcClient:t,channels:n,offer:i,rtcConnectionId:e,channelsOpened:r}}async finishClientOffer(e,t,n){return await e.setRemoteDescription(t),await n,!0}async createProviderAnswer(e,t){const n=this.createRtcPeer(),i=Ze.createDataChannelPromise("request",n),r=Ze.createDataChannelPromise("response",n);n.addEventListener("icecandidate",(async t=>{t.candidate&&await this.raiseProviderIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForClientIce(e,(async e=>{await n.addIceCandidate(e.candidate)})),await n.setRemoteDescription(t);const o=await n.createAnswer();await n.setLocalDescription(o);const s=Promise.all([i,r]).then((([t,n])=>(this.cleanupIceListeners(e),{request:t,response:n})));return{rtcClient:n,answer:o,channels:s}}}Je.RTCICEManager=Ze;var Qe={},Xe={};function et(e){return[...e.split(".").reverse().entries()].reduce(((e,[t,n])=>e+ +n*1e4**t),0)}function tt(e,t){return et(e)>=et(t)}function nt(e){return e.split("/")[0]}Object.defineProperty(Xe,"__esModule",{value:!0}),Xe.runtimeUuidMeetsMinimumRuntimeVersion=Xe.parseRuntimeUuid=Xe.meetsMinimumRuntimeVersion=void 0,Xe.meetsMinimumRuntimeVersion=tt,Xe.parseRuntimeUuid=nt,Xe.runtimeUuidMeetsMinimumRuntimeVersion=function(e,t){return tt(nt(e),t)};var it,rt,ot,st,at,ct=s&&s.__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)},dt=s&&s.__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};Object.defineProperty(Qe,"__esModule",{value:!0}),Qe.ChannelProvider=void 0;const ht=pe,lt=Xe;class ut extends ht.ChannelBase{get connections(){return[...ct(this,it,"f")]}static handleClientDisconnection(e,t){const n=e.connections.find((e=>e.endpointId===t.endpointId));if(n)ct(e,st,"f").call(e,n);else{e.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name)).forEach(ct(e,st,"f"))}e.disconnectListener(t)}static setProviderRemoval(e,t){ut.removalMap.set(e,t)}constructor(e,t,n){super(),it.set(this,void 0),rt.set(this,void 0),ot.set(this,void 0),st.set(this,(e=>{const t=this.connections.filter((t=>t.endpointId!==e.endpointId));ct(this,ot,"f").closeEndpoint(e.endpointId),dt(this,it,t,"f")})),this.processAction=async(e,t,n)=>(ut.clientIsMultiRuntime(n)&&!(0,lt.runtimeUuidMeetsMinimumRuntimeVersion)(n.runtimeUuid,"18.87.56.0")?this.handleMultiRuntimeLegacyClient(n):this.checkForClientConnection(n),super.processAction(e,t,n)),at.set(this,(()=>{ct(this,ot,"f").close();const e=ut.removalMap.get(this);e&&e()})),dt(this,rt,new ht.ProtectedItems(e,t),"f"),this.connectListener=()=>{},this.disconnectListener=()=>{},dt(this,it,[],"f"),dt(this,ot,n,"f"),n.receive(this.processAction)}dispatch(e,t,n){const i=e.endpointId??this.getEndpointIdForOpenFinId(e,t);return i&&ct(this,ot,"f").isEndpointConnected(i)?ct(this,ot,"f").send(i,t,n):Promise.reject(new Error(`Client connection with identity uuid: ${e.uuid} / name: ${e.name} / endpointId: ${i} no longer connected.`))}async processConnection(e,t){return ct(this,it,"f").push(e),this.connectListener(e,t)}publish(e,t){return this.connections.map((n=>ct(this,ot,"f").send(n.endpointId,e,t)))}onConnection(e){this.connectListener=e}onDisconnection(e){this.disconnectListener=e}async destroy(){const e=ct(this,rt,"f");e.providerIdentity,dt(this,it,[],"f"),await e.close(),ct(this,at,"f").call(this)}async getAllClientInfo(){return this.connections.map((e=>{const{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}=e;return{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}}))}checkForClientConnection(e){if(!this.isClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider.\n Client Identity: {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}isClientConnected(e){return ut.clientIdentityIncludesEndpointId(e)?this.connections.some((t=>t.endpointId===e.endpointId&&t.uuid===e.uuid&&t.name===e.name)):this.isLegacyClientConnected(e)}isLegacyClientConnected(e){return this.connections.some((t=>t.uuid===e.uuid&&t.name===e.name))}handleMultiRuntimeLegacyClient(e){if(!this.isLegacyClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider. Client Identity:\n {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}getEndpointIdForOpenFinId(e,t){const n=this.connections.filter((t=>t.name===e.name&&t.uuid===e.uuid));if(n.length>=2){const n=ct(this,rt,"f"),{uuid:i,name:r}=e,o=n?.providerIdentity.uuid,s=n?.providerIdentity.name;console.warn(`WARNING: Dispatch call may have unintended results. The "to" argument of your dispatch call is missing the\n "endpointId" parameter. The identity you are dispatching to ({uuid: ${i}, name: ${r}})\n has multiple channelClients for this channel. Your dispatched action: (${t}) from the provider:\n ({uuid: ${o}, name: ${s}}) will only be processed by the most recently-created client.`)}return n.pop()?.endpointId}static clientIdentityIncludesEndpointId(e){return void 0!==e.endpointId}static clientIsMultiRuntime(e){return void 0!==e.runtimeUuid}static async wireClose(e,t){await e.sendAction("destroy-channel",{channelName:t})}}Qe.ChannelProvider=ut,it=new WeakMap,rt=new WeakMap,ot=new WeakMap,st=new WeakMap,at=new WeakMap,ut.removalMap=new WeakMap;var pt={};Object.defineProperty(pt,"__esModule",{value:!0}),pt.MessageReceiver=void 0;const wt=ue,yt=d;class ft extends yt.Base{constructor(e){super(e),this.onmessage=e=>"process-channel-message"===e.action&&(this.processChannelMessage(e),!0),this.endpointMap=new Map,this.latestEndpointIdByChannelId=new Map,e.registerMessageHandler(this.onmessage.bind(this))}async processChannelMessage(e){const{senderIdentity:t,providerIdentity:n,action:i,ackToSender:r,payload:o,intendedTargetIdentity:s}=e.payload,a=s.channelId??s.endpointId??this.latestEndpointIdByChannelId.get(n.channelId),c=this.endpointMap.get(a);if(!c)return r.payload.success=!1,r.payload.reason=`Client connection with identity uuid: ${this.wire.me.uuid} / name: ${this.wire.me.name} / endpointId: ${a} no longer connected.`,this.wire.sendRaw(r);try{const e=await c(i,o,t);return r.payload.payload=r.payload.payload||{},r.payload.payload.result=e,this.wire.sendRaw(r)}catch(e){return r.payload.success=!1,r.payload.reason=e.message,this.wire.sendRaw(r)}}addEndpoint(e,t,n){this.endpointMap.set(n,e),t!==n&&this.latestEndpointIdByChannelId.set(t,n)}removeEndpoint(e,t){this.endpointMap.delete(t),this.latestEndpointIdByChannelId.get(e)===t&&this.latestEndpointIdByChannelId.delete(e)}checkForPreviousClientConnection(e){const t=this.latestEndpointIdByChannelId.get(e);t&&(wt.ChannelClient.closeChannelByEndpointId(t),console.warn("You have created a second connection to an older provider. First connection has been removed from the clientMap"),console.warn("If the provider calls publish(), you may receive multiple messages."))}}pt.MessageReceiver=ft;var gt={};Object.defineProperty(gt,"__esModule",{value:!0}),gt.ProtocolManager=void 0;gt.ProtocolManager=class{constructor(e){this.ProtocolsInPreferenceOrder=e,this.DefaultClientProtocols=["classic"],this.DefaultProviderProtocols=["classic"],this.getClientProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultClientProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(", ")}.`);return t},this.getProviderProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultProviderProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(", ")}.`);return t},this.getCompatibleProtocols=(e,t)=>t.supportedProtocols.filter((t=>e.some((e=>e.type===t.type&&t.version>=e.minimumVersion&&e.version>=(t.minimumVersion??0))))).slice(0,t.maxProtocols)}};var mt={};Object.defineProperty(mt,"__esModule",{value:!0});class vt{static combine(e,t){return new vt(e,t)}constructor(e,t){this.primary=e,this.secondary=t}onEndpointDisconnect(e,t){this.primary.onEndpointDisconnect(e,(()=>{this.secondary.isEndpointConnected(e)||t()})),this.secondary.onEndpointDisconnect(e,(()=>{this.primary.isEndpointConnected(e)||t()}))}isValidEndpointPayload(e){return this.primary.isValidEndpointPayload(e)||this.secondary.isValidEndpointPayload(e)}async closeEndpoint(e){await this.primary.closeEndpoint(e),await this.secondary.closeEndpoint(e)}isEndpointConnected(e){return this.primary.isEndpointConnected(e)||this.secondary.isEndpointConnected(e)}async addEndpoint(e,t){this.primary.isValidEndpointPayload(t)&&await this.primary.addEndpoint(e,t),this.secondary.isValidEndpointPayload(t)&&await this.secondary.addEndpoint(e,t)}receive(e){this.primary.receive(e),this.secondary.receive(e)}send(e,t,n){return this.primary.isEndpointConnected(e)?this.primary.send(e,t,n):this.secondary.send(e,t,n)}async close(){await Promise.all([this.primary.close(),this.secondary.close()])}}mt.default=vt;var Ct,bt,It=s&&s.__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},Et=s&&s.__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)},xt=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(xe,"__esModule",{value:!0}),xe.ConnectionManager=void 0;const At=Ae,Pt=d,Mt=Oe,_t=Fe,Ot=Je,St=Qe,Rt=pt,Ft=gt,jt=xt(mt);class kt extends Pt.Base{static getProtocolOptionsFromStrings(e){return e.map((e=>{switch(e){case"rtc":return _t.RTCInfo;case"classic":return Mt.ClassicInfo;default:return(0,At.exhaustiveCheck)(e,["rtc","classic"])}}))}constructor(e){super(e),Ct.set(this,void 0),bt.set(this,void 0),this.removeChannelFromProviderMap=e=>{this.providerMap.delete(e)},this.onmessage=e=>"process-channel-connection"===e.action&&(this.processChannelConnection(e),!0),this.providerMap=new Map,this.protocolManager=new Ft.ProtocolManager("node"===this.wire.environment.type?["classic"]:["rtc","classic"]),It(this,Ct,new Rt.MessageReceiver(e),"f"),It(this,bt,new Ot.RTCICEManager(e),"f"),e.registerMessageHandler(this.onmessage.bind(this))}createProvider(e,t){const n=Object.assign(this.wire.environment.getDefaultChannelOptions().create,e||{}),i=this.protocolManager.getProviderProtocols(n?.protocols),r=i.map((e=>{switch(e){case"rtc":return new _t.RTCStrategy;case"classic":return new Mt.ClassicStrategy(this.wire,Et(this,Ct,"f"),t.channelId,t);default:return(0,At.exhaustiveCheck)(e,["rtc","classic"])}}));let o;if(2===r.length){const[e,t]=r;o=jt.default.combine(e,t)}else{if(1!==r.length)throw new Error("failed to combine strategies");[o]=r}const s=new St.ChannelProvider(t,(()=>St.ChannelProvider.wireClose(this.wire,t.channelName)),o),a=t.channelId;return this.providerMap.set(a,{provider:s,strategy:o,supportedProtocols:kt.getProtocolOptionsFromStrings(i)}),St.ChannelProvider.setProviderRemoval(s,this.removeChannelFromProviderMap.bind(this)),s}async createClientOffer(e){const t=this.protocolManager.getClientProtocols(e?.protocols);let n;return{offer:{supportedProtocols:await Promise.all(t.map((async e=>{switch(e){case"rtc":{const{rtcClient:e,channels:t,offer:i,rtcConnectionId:r,channelsOpened:o}=await Et(this,bt,"f").startClientOffer();return n={rtcClient:e,channels:t,channelsOpened:o},{type:"rtc",version:_t.RTCInfo.version,payload:{offer:i,rtcConnectionId:r}}}case"classic":return{type:"classic",version:Mt.ClassicInfo.version};default:return(0,At.exhaustiveCheck)(e,["rtc","classic"])}}))),maxProtocols:2},rtc:n}}async createClientStrategy(e,t){t.endpointId||(t.endpointId=this.wire.environment.getNextMessageId(),Et(this,Ct,"f").checkForPreviousClientConnection(t.channelId));const n=t.answer??{supportedProtocols:[{type:"classic",version:1}]},i=(await Promise.all(n.supportedProtocols.map((async n=>"rtc"===n.type&&e?(await Et(this,bt,"f").finishClientOffer(e.rtcClient,n.payload.answer,e.channelsOpened),new _t.RTCStrategy):"classic"===n.type?new Mt.ClassicStrategy(this.wire,Et(this,Ct,"f"),t.endpointId,t):null)))).filter((e=>null!==e));let r;if(e&&!i.some((e=>e instanceof _t.RTCStrategy))&&e&&e.rtcClient.close(),i.length>=2)r=jt.default.combine(i[0],i[1]);else{if(!i.length)throw new Error("No compatible protocols");[r]=i}const o={endpointIdentity:t,rtc:e};return r.addEndpoint(t.channelId,o),r}async processChannelConnection(e){const{clientIdentity:t,providerIdentity:n,ackToSender:i,payload:r,offer:o}=e.payload;t.endpointId?t.isLocalEndpointId=!1:(t.endpointId=this.wire.environment.getNextMessageId(),t.isLocalEndpointId=!0);const s=n.channelId,a=this.providerMap.get(s);if(!a)return i.payload.success=!1,i.payload.reason=`Channel "${n.channelName}" has been destroyed.`,this.wire.sendRaw(i);const{provider:c,strategy:d,supportedProtocols:h}=a;try{if(!(c instanceof St.ChannelProvider))throw Error("Cannot connect to a channel client");const e=o??{supportedProtocols:[{type:"classic",version:1}],maxProtocols:1},n=this.protocolManager.getCompatibleProtocols(h,e);if(!n.length)throw new Error("This provider does not support any of the offered protocols.");const s=await c.processConnection(t,r);i.payload.payload=i.payload.payload||{};let a={supportedProtocols:[],endpointPayloadPromise:Promise.resolve({endpointIdentity:t})};return a=await n.reduce((async(e,t)=>{const n=await e;if("rtc"===t.type){const{answer:e,rtcClient:i,channels:r}=await Et(this,bt,"f").createProviderAnswer(t.payload.rtcConnectionId,t.payload.offer);n.supportedProtocols.push({type:"rtc",version:_t.RTCInfo.version,payload:{answer:e}}),n.endpointPayloadPromise=n.endpointPayloadPromise.then((e=>r.then((t=>({...e,rtc:{rtcClient:i,channels:t}})))))}else n.supportedProtocols.push({type:"classic",version:Mt.ClassicInfo.version});return n}),Promise.resolve(a)),a.endpointPayloadPromise.then((e=>d.addEndpoint(t.endpointId,e))),i.payload.payload.result=s,i.payload.payload.answer=a,this.wire.sendRaw(i)}catch(e){return i.payload.success=!1,i.payload.reason=e.message,this.wire.sendRaw(i)}}}xe.ConnectionManager=kt,Ct=new WeakMap,bt=new WeakMap;var Lt,Tt,$t,Bt=s&&s.__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},Gt=s&&s.__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)};Object.defineProperty(le,"__esModule",{value:!0}),le.Channel=void 0;const Wt=t,Ht=G,Nt=d,Dt=ue,Ut=xe,Vt=Qe;function zt(e){const t=Math.floor(e/10),n=Math.min(3e4,500*2**t);return new Promise((e=>{setTimeout((()=>{e(!1)}),n)}))}class Kt extends Nt.EmitterBase{constructor(e){super(e,"channel"),Lt.set(this,void 0),Tt.set(this,new Wt.EventEmitter),$t.set(this,new Ht.AsyncRetryableLazy((async()=>{await Promise.all([this.on("disconnected",(e=>{Dt.ChannelClient.handleProviderDisconnect(e)})),this.on("connected",((...e)=>{Gt(this,Tt,"f").emit("connected",...e)}))]).catch((()=>new Error("error setting up channel connection listeners")))}))),Bt(this,Lt,new Ut.ConnectionManager(e),"f")}async getAllChannels(){return this.wire.sendAction("get-all-channels").then((({payload:e})=>e.data))}async onChannelConnect(e){await this.on("connected",e)}async onChannelDisconnect(e){await this.on("disconnected",e)}async safeConnect(e,t,n){const i={count:0};do{let r=()=>{};const o=new Promise((t=>{r=n=>{e===n.channelName&&t(!0)},Gt(this,Tt,"f").on("connected",r)}));try{if(i.count>0){i.gotConnectedEvent=await Promise.race([zt(i.count),o]);const t=await this.wire.sendAction("connect-to-channel",{...n,retryInfo:i});return console.log(`Successfully connected to channelName: ${e}`),t.payload.data}const t=this.wire.sendAction("connect-to-channel",n);i.originalMessageId=t.messageId;return(await t).payload.data}catch(n){if(!n.message.includes("internal-nack"))throw n;t&&0===i.count&&console.warn(`No channel found for channelName: ${e}. Waiting for connection...`)}finally{i.count+=1,Gt(this,Tt,"f").removeListener("connected",r)}}while(t);throw new Error(`No channel found for channelName: ${e}.`)}async connect(e,t={}){if(await Gt(this,$t,"f").getValue(),!e||"string"!=typeof e)throw new Error("Please provide a channelName string to connect to a channel.");const n={wait:!0,...this.wire.environment.getDefaultChannelOptions().connect,...t},{offer:i,rtc:r}=await Gt(this,Lt,"f").createClientOffer(n);let o;(this.fin.me.isFrame||this.fin.me.isView||this.fin.me.isWindow)&&(o=(await this.fin.me.getInfo()).url);const s={channelName:e,...n,offer:i,connectionUrl:o},a=await this.safeConnect(e,n.wait,s),c=await Gt(this,Lt,"f").createClientStrategy(r,a),d=new Dt.ChannelClient(a,(()=>Dt.ChannelClient.wireClose(this.wire,a,a.endpointId)),c);return c.onEndpointDisconnect(a.channelId,(async()=>{try{await d.sendDisconnectAction()}catch(e){console.warn(`Something went wrong during disconnect for client with uuid: ${a.uuid} / name: ${a.name} / endpointId: ${a.endpointId}.`)}finally{Dt.ChannelClient.handleProviderDisconnect(a)}})),d}async create(e,t){if(!e)throw new Error("Please provide a channelName to create a channel");const{payload:{data:n}}=await this.wire.sendAction("create-channel",{channelName:e}),i=Gt(this,Lt,"f").createProvider(t,n);return this.on("client-disconnected",(t=>{t.channelName===e&&Vt.ChannelProvider.handleClientDisconnection(i,t)})),i}}le.Channel=Kt,Lt=new WeakMap,Tt=new WeakMap,$t=new WeakMap,Object.defineProperty(de,"__esModule",{value:!0}),de.InterAppPayload=de.InterApplicationBus=void 0;const qt=t,Jt=d,Yt=he,Zt=le,Qt=O;class Xt extends Jt.Base{constructor(e){super(e),this.events={subscriberAdded:"subscriber-added",subscriberRemoved:"subscriber-removed"},this.refCounter=new Yt.RefCounter,this.Channel=new Zt.Channel(e),this.emitter=new qt.EventEmitter,e.registerMessageHandler(this.onmessage.bind(this)),this.on=this.emitter.on.bind(this.emitter),this.removeAllListeners=this.emitter.removeAllListeners.bind(this.emitter)}async publish(e,t){await this.wire.sendAction("publish-message",{topic:e,message:t,sourceWindowName:this.me.name})}async send(e,t,n){const i=(0,Qt.validateIdentity)(e);if(i)throw new Error(i);await this.wire.sendAction("send-message",{destinationUuid:e.uuid,destinationWindowName:e.name,topic:t,message:n,sourceWindowName:this.me.name})}subscribe(e,t,n){const i=this.createSubscriptionKey(e.uuid,e.name||"*",t);return this.emitter.on(i,n),this.refCounter.actOnFirst(i,(async()=>{await this.wire.sendAction("subscribe",{sourceUuid:e.uuid,sourceWindowName:e.name||"*",topic:t,destinationWindowName:this.me.name})}),(()=>Promise.resolve()))}unsubscribe(e,t,n){const i=e.name||"*",r=this.createSubscriptionKey(e.uuid,i,t);return this.emitter.removeListener(r,n),this.refCounter.actOnLast(r,(async()=>{await this.wire.sendAction("unsubscribe",{sourceUuid:e.uuid,sourceWindowName:i,topic:t,destinationWindowName:this.me.name})}),(()=>new Promise((e=>e)).then((()=>{}))))}processMessage(e){const{payload:{message:t,sourceWindowName:n,sourceUuid:i,topic:r}}=e,o=[this.createSubscriptionKey(i,n,r),this.createSubscriptionKey(i,"*",r),this.createSubscriptionKey("*","*",r)],s={uuid:i,name:n};o.forEach((e=>{this.emitter.emit(e,t,s)}))}emitSubscriverEvent(e,t){const{payload:{targetName:n,uuid:i,topic:r}}=t,o={name:n,uuid:i,topic:r};this.emitter.emit(e,o)}createSubscriptionKey(e,t,n){const i=t||"*";if(!(e&&i&&n))throw new Error("Missing uuid, name, or topic string");return function(...e){return e.map((e=>Buffer.from(`${e}`).toString("base64"))).join("/")}(e,i,n)}onmessage(e){const{action:t}=e;switch(t){case"process-message":this.processMessage(e);break;case this.events.subscriberAdded:this.emitSubscriverEvent(this.events.subscriberAdded,e);break;case this.events.subscriberRemoved:this.emitSubscriverEvent(this.events.subscriberRemoved,e)}return!0}}de.InterApplicationBus=Xt;de.InterAppPayload=class{};var en={};Object.defineProperty(en,"__esModule",{value:!0}),en.Clipboard=void 0;const tn=d;class nn extends tn.Base{async writeText(e){await this.wire.sendAction("clipboard-write-text",e)}async readText(e){const{payload:t}=await this.wire.sendAction("clipboard-read-text",{type:e});return t.data}async writeImage(e){await this.wire.sendAction("clipboard-write-image",e)}async readImage(e={format:"dataURL"}){const{payload:t}=await this.wire.sendAction("clipboard-read-image",e);return t.data}async writeHtml(e){await this.wire.sendAction("clipboard-write-html",e)}async readHtml(e){const{payload:t}=await this.wire.sendAction("clipboard-read-html",{type:e});return t.data}async writeRtf(e){await this.wire.sendAction("clipboard-write-rtf",e)}async readRtf(e){const{payload:t}=await this.wire.sendAction("clipboard-read-rtf",{type:e});return t.data}async write(e){await this.wire.sendAction("clipboard-write",e)}async getAvailableFormats(e){const{payload:t}=await this.wire.sendAction("clipboard-read-formats",{type:e});return t.data}}en.Clipboard=nn;var rn={},on={},sn={};Object.defineProperty(sn,"__esModule",{value:!0}),sn.ExternalApplication=void 0;const an=d;class cn extends an.EmitterBase{constructor(e,t){super(e,"external-application",t.uuid),this.identity=t}getInfo(){return this.wire.sendAction("get-external-application-info",this.identity).then((({payload:e})=>e.data))}}sn.ExternalApplication=cn,Object.defineProperty(on,"__esModule",{value:!0}),on.ExternalApplicationModule=void 0;const dn=d,hn=sn;class ln extends dn.Base{wrap(e){return this.wire.sendAction("external-application-wrap").catch((e=>{})),Promise.resolve(new hn.ExternalApplication(this.wire,{uuid:e}))}wrapSync(e){return this.wire.sendAction("external-application-wrap-sync").catch((e=>{})),new hn.ExternalApplication(this.wire,{uuid:e})}}on.ExternalApplicationModule=ln,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(on,e),n(sn,e)}(rn);var un={},pn={},wn={};Object.defineProperty(wn,"__esModule",{value:!0}),wn._Frame=void 0;const yn=d;class fn extends yn.EmitterBase{constructor(e,t){super(e,"frame",t.uuid,t.name),this.identity=t}getInfo(){return this.wire.sendAction("get-frame-info",this.identity).then((({payload:e})=>e.data))}getParentWindow(){return this.wire.sendAction("get-parent-window",this.identity).then((({payload:e})=>e.data))}}wn._Frame=fn,Object.defineProperty(pn,"__esModule",{value:!0}),pn._FrameModule=void 0;const gn=d,mn=O,vn=wn;class Cn extends gn.Base{async wrap(e){this.wire.sendAction("frame-wrap").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}wrapSync(e){this.wire.sendAction("frame-wrap-sync").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}getCurrent(){return this.wire.sendAction("frame-get-current").catch((e=>{})),Promise.resolve(new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity()))}getCurrentSync(){return this.wire.sendAction("frame-get-current-sync").catch((e=>{})),new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity())}}pn._FrameModule=Cn,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(pn,e),n(wn,e)}(un);var bn={};Object.defineProperty(bn,"__esModule",{value:!0}),bn.GlobalHotkey=void 0;const In=d;class En extends In.EmitterBase{constructor(e){super(e,"global-hotkey")}async register(e,t){await this.on(e,t),await this.wire.sendAction("global-hotkey-register",{hotkey:e})}async unregister(e){await this.removeAllListeners(e),await this.wire.sendAction("global-hotkey-unregister",{hotkey:e})}async unregisterAll(){await Promise.all(this.eventNames().filter((e=>!("registered"===e||"unregistered"===e))).map((e=>this.removeAllListeners(e)))),await this.wire.sendAction("global-hotkey-unregister-all",{})}async isRegistered(e){const{payload:{data:t}}=await this.wire.sendAction("global-hotkey-is-registered",{hotkey:e});return t}}bn.GlobalHotkey=En;var xn,An={},Pn={},Mn={},_n=s&&s.__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)};Object.defineProperty(Mn,"__esModule",{value:!0}),Mn.Platform=void 0;const On=d,Sn=O,Rn=new Map;class Fn extends On.EmitterBase{constructor(e,t){super(t.wire,"application",e.uuid),this.getClient=e=>{this.wire.sendAction("platform-get-client",this.identity).catch((e=>{}));const t=e||this.identity,{uuid:n}=t;if(!Rn.has(n)){const e=_n(this,xn,"f").call(this,n);Rn.set(n,e)}return Rn.get(n)},xn.set(this,(async e=>{try{const t=`custom-frame-${e}`,n=await this._channel.connect(t,{wait:!1});return n.onDisconnection((()=>{Rn.delete(e)})),n}catch(t){throw Rn.delete(e),new Error("The targeted Platform is not currently running. Listen for application-started event for the given Uuid.")}})),this.launchLegacyManifest=this.launchContentManifest;const n=(0,Sn.validateIdentity)(e);if(n)throw new Error(n);this._channel=t,this.identity={uuid:e.uuid},this.Layout=this.fin.Platform.Layout,this.Application=this.fin.Application.wrapSync(this.identity)}async createView(e,t,n){this.wire.sendAction("platform-create-view",this.identity).catch((e=>{}));const i=await this.getClient(),r=await i.dispatch("create-view",{target:t,opts:e,targetView:n});if(!r||(0,Sn.validateIdentity)(r.identity))throw new Error(`When overwriting the createView call, please return an object that has a valid 'identity' property: ${JSON.stringify(r)}`);return this.fin.View.wrapSync(r.identity)}async createWindow(e){this.wire.sendAction("platform-create-window",this.identity).catch((e=>{}));const t=await this.getClient();e.reason||(e.reason="api-call");const n=await t.dispatch("create-view-container",e);if(!n||(0,Sn.validateIdentity)(n.identity))throw new Error(`When overwriting the createWindow call, please return an object that has a valid 'identity' property: ${JSON.stringify(n)}`);const{identity:i}=n,r=this.fin.Window.wrapSync(i);return r.name=i.name,r.uuid=i.uuid,r}async quit(){this.wire.sendAction("platform-quit",this.identity).catch((e=>{}));return(await this.getClient()).dispatch("quit")}async closeView(e){this.wire.sendAction("platform-close-view",this.identity).catch((e=>{}));const t=await this.getClient();await t.dispatch("close-view",{view:e})}async reparentView(e,t){console.warn("Platform.reparentView has been deprecated, please use Platform.createView"),this.wire.sendAction("platform-reparent-view",this.identity).catch((e=>{}));const n={...e,uuid:e.uuid??this.identity.uuid},i=await this.fin.View.wrap(n),r=await i.getOptions();return this.createView(r,t)}async getSnapshot(){this.wire.sendAction("platform-get-snapshot",this.identity).catch((e=>{}));return(await this.getClient()).dispatch("get-snapshot")}async getViewSnapshot(e){return(await this.getClient()).dispatch("get-view-snapshot",{viewIdentity:e})}async applySnapshot(e,t){this.wire.sendAction("platform-apply-snapshot",this.identity).catch((e=>{}));const n="Requested snapshot must be a valid Snapshot object, or a url or filepath to such an object.";let i;if("string"==typeof e)try{i=(await this._channel.wire.sendAction("get-application-manifest",{manifestUrl:e})).payload.data}catch(e){throw new Error(`${n}: ${e}`)}else i=e;if(!i.windows)throw new Error(n);const r=await this.getClient();return await r.dispatch("apply-snapshot",{snapshot:i,options:t}),this}async fetchManifest(e){return(await this.getClient()).dispatch("platform-fetch-manifest",{manifestUrl:e})}async launchContentManifest(e){this.wire.sendAction("platform-launch-content-manifest",this.identity).catch((()=>{}));const t=await this.getClient(),n=await this.fetchManifest(e);return t.dispatch("launch-into-platform",{manifest:n,manifestUrl:e}),this}async setWindowContext(e={},t){if(this.wire.sendAction("platform-set-window-context",this.identity).catch((e=>{})),!e)throw new Error("Please provide a serializable object or string to set the context.");const n=await this.getClient(),{entityType:i}=t?await this.fin.System.getEntityInfo(t.uuid,t.name):this.fin.me;await n.dispatch("set-window-context",{context:e,entityType:i,target:t||{uuid:this.fin.me.uuid,name:this.fin.me.name}})}async getWindowContext(e){this.wire.sendAction("platform-get-window-context",this.identity).catch((e=>{}));const t=await this.getClient(),{entityType:n}=e?await this.fin.System.getEntityInfo(e.uuid,e.name):this.fin.me;return t.dispatch("get-window-context",{target:e||{uuid:this.fin.me.uuid,name:this.fin.me.name},entityType:n})}async closeWindow(e,t={skipBeforeUnload:!1}){this.wire.sendAction("platform-close-window",this.identity).catch((e=>{}));return(await this.getClient()).dispatch("close-window",{windowId:e,options:t})}}Mn.Platform=Fn,xn=new WeakMap;var jn={},kn={},Ln={},Tn={};function $n(e){switch(e){case"columns":case"grid":case"rows":case"tabs":return!0;default:return!1}}Object.defineProperty(Tn,"__esModule",{value:!0}),Tn.overrideFromComposables=Tn.isValidPresetType=void 0,Tn.isValidPresetType=$n,Tn.overrideFromComposables=function(...e){return t=>e.reduceRight(((e,t)=>n=>t(e(n))),(e=>e))(t)},Tn.default={isValidPresetType:$n};var Bn={},Gn={},Wn={};Object.defineProperty(Wn,"__esModule",{value:!0}),Wn.ApiConsumer=void 0;Wn.ApiConsumer=class{constructor(e){this.strategy=e,this.consume=async e=>(await this.strategy.getExposedFunctions(e)).reduce(((t,n)=>({...t,[n.key]:this.strategy.createFunction(n,e)})),{})}};var Hn={},Nn={};Object.defineProperty(Nn,"__esModule",{value:!0}),Nn.expose=Nn.getExposedProperties=void 0;const Dn=Symbol("exposedProperties");Nn.getExposedProperties=e=>e[Dn]||e.prototype[Dn]||[];Nn.expose=e=>(t,n,i)=>{t[Dn]=t[Dn]||[],t[Dn].push({key:n,descriptor:i,options:e})},Object.defineProperty(Hn,"__esModule",{value:!0}),Hn.ApiExposer=void 0;const Un=Nn;Hn.ApiExposer=class{constructor(e){this.strategy=e,this.exposeInstance=async(e,t)=>{const n=(0,Un.getExposedProperties)(e),i=await Promise.all(n.map((async({key:n,options:i})=>({key:n,options:await this.strategy.exposeFunction(e[n].bind(e),{key:n,options:i,meta:t})}))));await this.strategy.exposeMeta(t,i)}}};var Vn={},zn={},Kn={};Object.defineProperty(Kn,"__esModule",{value:!0}),Kn.ChannelsConsumer=void 0;Kn.ChannelsConsumer=class{constructor(e){this.channel=e,this.getExposedFunctions=async e=>{const{id:t}=e,{props:n}=await this.channel.dispatch(`api-meta:${t}`);return n},this.createFunction=e=>(...t)=>{const{action:n}=e.options;return this.channel.dispatch(n,{args:t})}}};var qn={};Object.defineProperty(qn,"__esModule",{value:!0}),qn.ChannelsExposer=void 0;qn.ChannelsExposer=class{constructor(e){this.channelProviderOrClient=e,this.exposeFunction=async(e,t)=>{const{key:n,options:i,meta:r}=t,{id:o}=r,s=`${o}.${i?.action||n}`;return await this.channelProviderOrClient.register(s,(async({args:t})=>e(...t))),{action:s}},this.exposeMeta=async({id:e},t)=>{const n=`api-meta:${e}`;await this.channelProviderOrClient.register(n,(()=>({props:t})))}}},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Kn,e),n(qn,e)}(zn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(zn,e)}(Vn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Wn,e),n(Hn,e),n(Vn,e),n(Nn,e)}(Gn);var Jn={};Object.defineProperty(Jn,"__esModule",{value:!0}),Jn.createRelayedDispatch=exports.relayChannelClientApi_1=Jn.relayChannelClientApi=void 0;const Yn=["no longer connected","RTCDataChannel closed unexpectedly","The client you are trying to dispatch from is disconnected from the target provider"];exports.relayChannelClientApi_1=Jn.relayChannelClientApi=async(e,t)=>{e.register(`relay:${t}`,(({action:t,target:n,payload:i})=>e.dispatch(n,t,i))),await Promise.resolve()};Jn.createRelayedDispatch=(e,t,n,i)=>async(r,o)=>{try{return await e.dispatch(`relay:${n}`,{action:r,payload:o,target:t})}catch(e){if(s=e.message,Yn.some((e=>s.includes(e)))&&i)throw new Error(i);throw e}var s};var Zn,Qn,Xn,ei=s&&s.__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},ti=s&&s.__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)};Object.defineProperty(Bn,"__esModule",{value:!0}),Bn.ColumnOrRow=Bn.TabStack=Bn.LayoutNode=void 0;const ni=Gn,ii=Jn;class ri{constructor(e,t){Zn.set(this,void 0),this.isRoot=()=>ti(this,Zn,"f").isRoot(this.entityId),this.exists=()=>ti(this,Zn,"f").exists(this.entityId),this.getParent=async()=>{const e=await ti(this,Zn,"f").getParent(this.entityId);if(e)return ri.getEntity(e,ti(this,Zn,"f"))},this.createAdjacentStack=async(e,t)=>{const n=await ti(this,Zn,"f").createAdjacentStack(this.entityId,e,t);return ri.getEntity({entityId:n,type:"stack"},ti(this,Zn,"f"))},this.getAdjacentStacks=async e=>(await ti(this,Zn,"f").getAdjacentStacks({targetId:this.entityId,edge:e})).map((e=>ri.getEntity({type:"stack",entityId:e.entityId},ti(this,Zn,"f")))),ei(this,Zn,e,"f"),this.entityId=t}}Bn.LayoutNode=ri,Zn=new WeakMap,ri.newLayoutEntitiesClient=async(e,t,n)=>{const i=(0,ii.createRelayedDispatch)(e,n,"layout-relay","You are trying to interact with a layout component on a window that does not exist or has been destroyed.");return new ni.ApiConsumer(new ni.ChannelsConsumer({dispatch:i})).consume({id:t})},ri.getEntity=(e,t)=>{const{entityId:n,type:i}=e;switch(i){case"column":case"row":return new si(t,n,i);case"stack":return new oi(t,n);default:throw new Error(`Unrecognised Layout Entity encountered ('${JSON.stringify(e)})`)}};class oi extends ri{constructor(e,t){super(e,t),Qn.set(this,void 0),this.type="stack",this.getViews=()=>ti(this,Qn,"f").getStackViews(this.entityId),this.addView=async(e,t={index:0})=>ti(this,Qn,"f").addViewToStack(this.entityId,e,t),this.removeView=async e=>{await ti(this,Qn,"f").removeViewFromStack(this.entityId,e)},this.setActiveView=async e=>{await ti(this,Qn,"f").setStackActiveView(this.entityId,e)},ei(this,Qn,e,"f")}}Bn.TabStack=oi,Qn=new WeakMap;class si extends ri{constructor(e,t,n){super(e,t),Xn.set(this,void 0),this.getContent=async()=>(await ti(this,Xn,"f").getContent(this.entityId)).map((e=>ri.getEntity(e,ti(this,Xn,"f")))),ei(this,Xn,e,"f"),this.type=n}}Bn.ColumnOrRow=si,Xn=new WeakMap;var ai={};Object.defineProperty(ai,"__esModule",{value:!0}),ai.DEFAULT_LAYOUT_KEY=ai.LAYOUT_CONTROLLER_ID=void 0,ai.LAYOUT_CONTROLLER_ID="layout-entities",ai.DEFAULT_LAYOUT_KEY="__default__";var ci,di,hi,li=s&&s.__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)};Object.defineProperty(Ln,"__esModule",{value:!0}),Ln.Layout=void 0;const ui=G,pi=O,wi=d,yi=Tn,fi=Bn,gi=ai;class mi extends wi.Base{static getClient(e){return li(e,di,"f").getValue()}constructor(e,t){super(t),ci.add(this),di.set(this,new ui.Lazy((async()=>fi.LayoutNode.newLayoutEntitiesClient(await this.platform.getClient(),gi.LAYOUT_CONTROLLER_ID,this.identity)))),this.replace=async e=>{this.wire.sendAction("layout-replace").catch((e=>{}));const t=await this.platform.getClient();await t.dispatch("replace-layout",{target:this.identity,opts:{layout:e}})},this.replaceView=async(e,t)=>{this.wire.sendAction("layout-replace-view").catch((e=>{}));const n=await this.platform.getClient();await n.dispatch("replace-view",{target:this.identity,opts:{viewToReplace:e,newView:t}})},this.applyPreset=async e=>{this.wire.sendAction("layout-apply-preset").catch((e=>{}));const t=await this.platform.getClient(),{presetType:n}=e;if(!n||!(0,yi.isValidPresetType)(n))throw new Error("Cannot apply preset layout, please include an applicable presetType property in the PresetLayoutOptions.");await t.dispatch("apply-preset-layout",{target:this.identity,opts:{presetType:n}})};const n=(0,pi.validateIdentity)(e);if(n)throw new Error(n);this.identity=e,this.platform=this.fin.Platform.wrapSync({uuid:e.uuid}),e.uuid===this.fin.me.uuid&&e.name===this.fin.me.name&&(this.init=this.fin.Platform.Layout.init)}async getConfig(){this.wire.sendAction("layout-get-config").catch((e=>{}));return(await this.platform.getClient()).dispatch("get-frame-snapshot",{target:this.identity})}async getCurrentViews(){this.wire.sendAction("layout-get-views").catch((e=>{}));const e=await this.platform.getClient();return(await e.dispatch("get-layout-views",{target:this.identity})).map((e=>this.fin.View.wrapSync(e)))}async getRootItem(){this.wire.sendAction("layout-get-root-item").catch((()=>{}));const e=await li(this,di,"f").getValue(),t=await e.getRoot("layoutName"in this.identity?this.identity:void 0);return fi.LayoutNode.getEntity(t,e)}async getStackByViewIdentity(e){this.wire.sendAction("layout-get-stack-by-view").catch((()=>{}));const t=await li(this,di,"f").getValue(),n=await t.getStackByView(e);if(!n)throw new Error(`No stack found for view: ${e.uuid}/${e.name}`);return fi.LayoutNode.getEntity(n,t)}async addView(e,{location:t,targetView:n}={}){this.wire.sendAction("layout-add-view").catch((e=>{}));const{identity:i}=await li(this,ci,"m",hi).call(this,"layout-add-view",{viewOptions:e,location:t,targetView:n});return{identity:i}}async closeView(e){this.wire.sendAction("layout-close-view").catch((e=>{})),await li(this,ci,"m",hi).call(this,"layout-close-view",{viewIdentity:e})}}Ln.Layout=mi,di=new WeakMap,ci=new WeakSet,hi=async function(e,t){return(await this.platform.getClient()).dispatch(e,{target:this.identity,opts:t})};var vi,Ci,bi,Ii,Ei,xi=s&&s.__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)},Ai=s&&s.__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};Object.defineProperty(kn,"__esModule",{value:!0}),kn.LayoutModule=void 0;const Pi=d,Mi=Ln,_i=ai;class Oi extends Pi.Base{constructor(){super(...arguments),vi.add(this),Ci.set(this,!1),bi.set(this,null),this.init=async(e={})=>{if(this.wire.sendAction("layout-init").catch((e=>{})),!this.wire.environment.layoutAllowedInContext(this.fin))throw new Error("Layout.init can only be called from a Window context.");if(xi(this,Ci,"f"))throw new Error("Layout.init was already called, please use Layout.create to add additional layouts.");"openfin"===this.wire.environment.type&&await this.fin.Platform.getCurrentSync().getClient(),Ai(this,Ci,!0,"f"),Ai(this,bi,await this.wire.environment.initLayoutManager(this.fin,this.wire,e),"f"),await this.wire.environment.applyLayoutSnapshot(this.fin,xi(this,bi,"f"),e);const t={name:this.fin.me.name,uuid:this.fin.me.uuid};if(!e.layoutManagerOverride){const e={layoutName:_i.DEFAULT_LAYOUT_KEY,...t};return xi(this,Ii,"f").call(this,e)}return this.wrapSync(t)},Ii.set(this,(e=>{const t="[Layout] You are using a deprecated property `layoutManager` - it will throw if you access it starting in v37.",n=new Proxy({},{get(e,n){throw console.warn(`[Layout-mgr-proxy] accessing ${n.toString()}`),new Error(t)}}),i=Object.assign(this.wrapSync(e),{layoutManager:n});return new Proxy(i,{get(e,n){if("layoutManager"===n)throw console.warn(`[Layout-proxy] accessing ${n.toString()}`),new Error(t);return e[n]}})})),this.getCurrentLayoutManagerSync=()=>xi(this,vi,"m",Ei).call(this,"fin.Platform.Layout.getCurrentLayoutManagerSync()"),this.create=async e=>this.wire.environment.createLayout(xi(this,vi,"m",Ei).call(this,"fin.Platform.Layout.create()"),e),this.destroy=async e=>this.wire.environment.destroyLayout(xi(this,vi,"m",Ei).call(this,"fin.Platform.Layout.destroy()"),e)}async wrap(e){return this.wire.sendAction("layout-wrap").catch((e=>{})),new Mi.Layout(e,this.wire)}wrapSync(e){return this.wire.sendAction("layout-wrap-sync").catch((e=>{})),new Mi.Layout(e,this.wire)}async getCurrent(){if(this.wire.sendAction("layout-get-current").catch((e=>{})),"openfin"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error("You are not in a Window context. Only Windows can have a Layout.");const{uuid:e,name:t}=this.fin.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction("layout-get-current-sync").catch((e=>{})),"openfin"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error("You are not in a Window context. Only Windows can have a Layout.");const{uuid:e,name:t}=this.fin.me;return this.wrapSync({uuid:e,name:t})}async getLayoutByViewIdentity(e){this.wire.sendAction("layout-get-by-view-identity").catch((()=>{}));let t=await this.wire.environment.getViewWindowIdentity(this.fin,e);t.identity&&(t=t.identity);try{const n=this.wrapSync(t),i=await Mi.Layout.getClient(n),r=await i.getLayoutIdentityForViewOrThrow(e);return this.wrapSync(r)}catch(n){if(!["No action registered at target for","getLayoutIdentityForViewOrThrow is not a function"].some((e=>n.message.includes(e))))throw n;if(t.uuid===t.name)throw new Error(`View identity ${JSON.stringify(e)} is not attached to any layout in provider window ${JSON.stringify(t)}.`);return this.wrapSync(t)}}}kn.LayoutModule=Oi,Ci=new WeakMap,bi=new WeakMap,Ii=new WeakMap,vi=new WeakSet,Ei=function(e){if(!xi(this,bi,"f"))throw new Error(`You must call init before using the API ${e}`);return xi(this,bi,"f")},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(kn,e),n(Ln,e)}(jn),Object.defineProperty(Pn,"__esModule",{value:!0}),Pn.PlatformModule=void 0;const Si=d,Ri=Mn,Fi=jn;class ji extends Si.Base{constructor(e,t){super(e),this._channel=t,this.Layout=new Fi.LayoutModule(this.wire)}async init(e){if(!fin.__internal_.isPlatform||fin.me.name!==fin.me.uuid)throw new Error("fin.Platform.init should only be called from a custom platform provider running in the main window of the application.");return this.wire.environment.initPlatform(this.fin,e)}async wrap(e){return this.wire.sendAction("platform-wrap").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}wrapSync(e){return this.wire.sendAction("platform-wrap-sync").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}async getCurrent(){return this.wire.sendAction("platform-get-current").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction("platform-get-current-sync").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}start(e){return this.wire.sendAction("platform-start").catch((e=>{})),new Promise((async(t,n)=>{try{const{uuid:n}=e,i=await this.fin.Application._create({...e,isPlatformController:!0});i.once("platform-api-ready",(()=>t(this.wrapSync({uuid:n})))),i._run({uuid:n})}catch(e){n(e)}}))}startFromManifest(e,t){return this.wire.sendAction("platform-start-from-manifest").catch((e=>{})),new Promise((async(n,i)=>{try{const i=await this.fin.Application._createFromManifest(e);i.once("platform-api-ready",(()=>n(this.wrapSync({uuid:i.identity.uuid})))),i._run(t)}catch(e){i(e)}}))}}Pn.PlatformModule=ji,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Pn,e),n(Mn,e)}(An);var ki={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getMe=e.getBaseMe=e.environmentUnsupportedMessage=void 0;const t=J(),n=un,i=ie(),r=rn;function o(e,t,n){return{...{isView:"view"===e,isWindow:"window"===e,isFrame:"iframe"===e,isExternal:"external connection"===e},uuid:t,name:n,entityType:e}}e.environmentUnsupportedMessage="You are not running in OpenFin.",e.getBaseMe=o,e.getMe=function(s){const{uuid:a,name:c,entityType:d}=s.me,h={setContext(){throw new Error(e.environmentUnsupportedMessage)},addContextHandler(){throw new Error(e.environmentUnsupportedMessage)},getContextGroups(){throw new Error(e.environmentUnsupportedMessage)},joinContextGroup(){throw new Error(e.environmentUnsupportedMessage)},removeFromContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getAllClientsInContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getInfoForContextGroup(){throw new Error(e.environmentUnsupportedMessage)}},l="Interop API has not been instantiated. Either connection has failed or you have not declared interop in your config.",u={setContext(){throw new Error(l)},addContextHandler(){throw new Error(l)},getContextGroups(){throw new Error(l)},joinContextGroup(){throw new Error(l)},removeFromContextGroup(){throw new Error(l)},getAllClientsInContextGroup(){throw new Error(l)},getInfoForContextGroup(){throw new Error(l)}},p={eventNames:()=>{throw new Error(e.environmentUnsupportedMessage)},emit:()=>{throw new Error(e.environmentUnsupportedMessage)},listeners:()=>{throw new Error(e.environmentUnsupportedMessage)},listenerCount:()=>{throw new Error(e.environmentUnsupportedMessage)},on:()=>{throw new Error(e.environmentUnsupportedMessage)},addListener:()=>{throw new Error(e.environmentUnsupportedMessage)},once:()=>{throw new Error(e.environmentUnsupportedMessage)},prependListener:()=>{throw new Error(e.environmentUnsupportedMessage)},prependOnceListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeAllListeners:()=>{throw new Error(e.environmentUnsupportedMessage)}};switch(d){case"view":return Object.assign(new t.View(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case"window":return Object.assign(new i._Window(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case"iframe":return Object.assign(new n._Frame(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case"external connection":return Object.assign(new r.ExternalApplication(s,{uuid:a}),o(d,a,c),{interop:u,isOpenFin:!1});default:return{...o(d,a,c),...p,interop:h,isOpenFin:!1}}}}(ki);var Li={},Ti={},$i={};Object.defineProperty($i,"__esModule",{value:!0}),$i.createWarningObject=$i.createUnusableObject=void 0,$i.createUnusableObject=function(e){const t=()=>{throw new Error(e)};return new Proxy({},{apply:t,construct:t,defineProperty:t,deleteProperty:t,get:t,getOwnPropertyDescriptor:t,getPrototypeOf:t,has:t,isExtensible:t,ownKeys:t,preventExtensions:t,set:t,setPrototypeOf:t})},$i.createWarningObject=function(e,t){return new Proxy(t,{get:(...t)=>(console.warn(e),Reflect.get(...t)),set:(...t)=>(console.warn(e),Reflect.set(...t)),getOwnPropertyDescriptor:(...t)=>(console.warn(e),Reflect.getOwnPropertyDescriptor(...t)),ownKeys:(...t)=>(console.warn(e),Reflect.ownKeys(...t))})};var Bi,Gi={},Wi={};var Hi={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.wrapIntentHandler=e.BROKER_ERRORS=e.generateOverrideWarning=e.generateOverrideError=e.wrapContextHandler=e.wrapInTryCatch=e.generateId=void 0;e.generateId=()=>`${Math.random()}${Date.now()}`;e.wrapInTryCatch=(e,t)=>(...n)=>{try{return e(...n)}catch(e){throw new Error((t||"")+e)}};e.wrapContextHandler=(e,t)=>async n=>{try{await e(n)}catch(e){throw console.error(`Error thrown by handler ${t} for context type ${n.type}: ${e}`),e}};e.generateOverrideError=(e,t)=>`You have tried to to use ${e} but ${t} has not been overridden in the Interop Broker. Please override this function. Refer to our documentation for more info.`;e.generateOverrideWarning=(e,t,n,i)=>{const{uuid:r,name:o}=n;return i?`Entity with identity: ${r}/${o} has called ${i} or ${e} but ${t} has not been overridden.`:`Entity with identity: ${r}/${o} has called ${e} but ${t} has not been overridden.`},e.BROKER_ERRORS={fireIntent:(0,e.generateOverrideError)("fireIntent","handleFiredIntent"),fireIntentForContext:(0,e.generateOverrideError)("fireIntentForContext","handleFiredIntentForContext"),getInfoForIntent:(0,e.generateOverrideError)("getInfoForIntent","handleInfoForIntent"),getInfoForIntentsByContext:(0,e.generateOverrideError)("getInfoForIntentsByContext","handleInfoForIntentsByContext"),joinSessionContextGroupWithJoinContextGroup:"The Context Group you have tried to join is a Session Context Group. Custom Context Groups can only be defined by the Interop Broker through code or manifest configuration. Please use joinSessionContextGroup.",fdc3Open:(0,e.generateOverrideError)("fdc3.open","fdc3HandleOpen"),fdc3FindInstances:(0,e.generateOverrideError)("fdc3.findInstances","fdc3HandleFindInstances"),fdc3GetAppMetadata:(0,e.generateOverrideError)("fdc3.getAppMetadata","fdc3HandleGetAppMetadata"),fdc3GetInfo:(0,e.generateOverrideError)("fdc3.getInfo","fdc3HandleGetInfo")};e.wrapIntentHandler=(e,t)=>async n=>{try{return e(n)}catch(e){throw console.error(`Error thrown by handler ${t}: ${e}`),e}}}(Hi);var Ni,Di,Ui={};function Vi(){if(Di)return Gi;Di=1;var e,t,n,r=s&&s.__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},o=s&&s.__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)},a=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Gi,"__esModule",{value:!0}),Gi.InteropBroker=void 0;const c=d,h=a(function(){if(Bi)return Wi;Bi=1,Object.defineProperty(Wi,"__esModule",{value:!0});const e=Cr();return Wi.default=class{constructor(e,t){this.provider=e,this.id=t,this.lastContext=void 0,this.contextGroupMap=new Map,this.clients=new Map,this.registerListeners()}registerListeners(){this.provider.register(`sessionContextGroup:getContext-${this.id}`,this.getCurrentContext.bind(this)),this.provider.register(`sessionContextGroup:setContext-${this.id}`,this.setContext.bind(this)),this.provider.register(`sessionContextGroup:handlerAdded-${this.id}`,this.handlerAdded.bind(this)),this.provider.register(`sessionContextGroup:handlerRemoved-${this.id}`,this.handlerRemoved.bind(this))}getCurrentContext(e){return e.type?this.contextGroupMap.get(e.type):this.lastContext}setContext(t,n){const{context:i}=t,r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name} not in Session Client State Map`);this.contextGroupMap.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{e.contextHandlers.get(i.type)?.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getClientState(e){return this.clients.get(e.endpointId)}async handlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(i){const e=r.contextHandlers.get(i)||[];r.contextHandlers.set(i,[...e,n]);const o=this.contextGroupMap.get(i);o&&await this.provider.dispatch(t,n,o)}else{r.globalHandler=n;const e=[...this.contextGroupMap.keys()].map((async e=>{const i=this.contextGroupMap.get(e);i&&await this.provider.dispatch(t,n,i)}));await Promise.all(e)}}handlerRemoved(e,t){const{handlerId:n}=e,i=this.clients.get(t.endpointId);i?(Array.from(i.contextHandlers).forEach((([,e])=>{const t=e.indexOf(n);t>-1&&e.splice(t,1)})),i.globalHandler===n&&(i.globalHandler=void 0)):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={contextHandlers:new Map,clientIdentity:e,globalHandler:void 0};this.clients.set(e.endpointId,t)}}onDisconnection(e){this.clients.delete(e.endpointId)}},Wi}()),l=Hi,u=a(i),p=function(){if(Ni)return Ui;Ni=1,Object.defineProperty(Ui,"__esModule",{value:!0}),Ui.PrivateChannelProvider=void 0;const e=Vi();return Ui.PrivateChannelProvider=class t{constructor(e,t){this.provider=e,this.id=t,this.clients=new Map,this.registerListeners(),this.contextByContextType=new Map,this.lastContext=void 0,this.provider.onConnection((e=>this.registerNewClient(e))),this.provider.onDisconnection((async e=>{const{endpointId:t}=e;this.clients.has(t)&&await this.handleClientDisconnecting(e),0===(await this.provider.getAllClientInfo()).length&&this.provider.destroy()}))}getClientState(e){return this.clients.get(e.endpointId)}registerListeners(){this.provider.register("broadcast",this.broadcast.bind(this)),this.provider.register("getCurrentContext",this.getCurrentContext.bind(this)),this.provider.register("contextHandlerAdded",this.contextHandlerAdded.bind(this)),this.provider.register("contextHandlerRemoved",this.contextHandlerRemoved.bind(this)),this.provider.register("nonStandardHandlerRemoved",this.nonStandardHandlerRemoved.bind(this)),this.provider.register("onAddContextHandlerAdded",this.onAddContextHandlerAdded.bind(this)),this.provider.register("onDisconnectHandlerAdded",this.onDisconnectHandlerAdded.bind(this)),this.provider.register("onUnsubscribeHandlerAdded",this.onUnsubscribeHandlerAdded.bind(this)),this.provider.register("clientDisconnecting",((e,t)=>{this.handleClientDisconnecting(t)}))}broadcast(t,n){const{context:i}=t;if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name}, tried to call broadcast, is not connected to this Private Channel`);const r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to broadcast - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);this.contextByContextType.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{const t=e.handlerIdsByContextTypes.get(i.type);t&&t.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getCurrentContext(e,t){const{contextType:n}=e;if(!this.getClientState(t))throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call getCurrentContext, is not connected to this Private Channel`);if(void 0!==n){return this.contextByContextType.get(n)||null}return this.lastContext?this.lastContext:null}contextHandlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call addContextListener, is not connected to this Private Channel`);if(i){const e=r.handlerIdsByContextTypes.get(i)||[];r.handlerIdsByContextTypes.set(i,[...e,n])}else r.globalHandler=n;Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&e.onAddContextListenerHandlerId&&this.provider.dispatch(e.clientIdentity,e.onAddContextListenerHandlerId,i)}))}async contextHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);if(i){let e;if(i.globalHandler===n)i.globalHandler=void 0;else for(const[t,r]of i.handlerIdsByContextTypes){const i=r.indexOf(n);i>-1&&(r.splice(i,1),e=t)}const r=(await this.getConnectedClients()).map((async n=>{const{clientIdentity:i,clientIdentity:{endpointId:r},onUnsubscribeHandlerId:o}=n;r!==t.endpointId&&o&&await this.provider.dispatch(i,o,e)}));try{await Promise.all(r)}catch(e){throw console.error(`Problem when attempting to dispatch to onUnsubscribeHandlers. Error: ${e} Removing Client: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}`),new Error(e)}}else console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}.`)}nonStandardHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);i?i.onDisconnectHandlerId===n?i.onDisconnectHandlerId=void 0:i.onAddContextListenerHandlerId===n?i.onAddContextListenerHandlerId=void 0:i.onUnsubscribeHandlerId===n&&(i.onUnsubscribeHandlerId=void 0):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}onAddContextHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onAddContextListener, is not connected to this Private Channel`);n.onAddContextListenerHandlerId=i,Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&Array.from(e.handlerIdsByContextTypes.keys()).forEach((e=>{this.provider.dispatch(t,i,e)}))}))}onDisconnectHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onDisconnect, is not connected to this Private Channel`);n.onDisconnectHandlerId=i}onUnsubscribeHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onUnsubscribe, is not connected to this Private Channel`);n.onUnsubscribeHandlerId=i}removeClient(e){const t=this.getClientState(e);if(!t)throw new Error(`Client with Identity: ${e.uuid} ${e.name}, tried to call disconnect, is not connected to this Private Channel`);t.handlerIdsByContextTypes.clear(),this.clients.delete(e.endpointId)}async fireOnDisconnectForOtherClients(e){const{endpointId:t}=e,n=(await this.getConnectedClients()).map((async e=>{const{clientIdentity:{endpointId:n},onDisconnectHandlerId:i}=e;n!==t&&i&&await this.provider.dispatch(e.clientIdentity,i)}));try{await Promise.all(n)}catch(t){throw console.error(`Problem when attempting to dispatch to onDisconnectHandlers. Error: ${t} Disconnecting Client: uuid: ${e.uuid}. name: ${e.name}. endpointId: ${e.endpointId}`),new Error(t)}}async unsubscribeAll(e){const{endpointId:t}=e,n=this.clients.get(t);if(n){const t=Array.from(n.handlerIdsByContextTypes.values()).flat(),i=n.globalHandler;if(t.length>0){const n=t.map((async t=>this.contextHandlerRemoved({handlerId:t},e)));try{await Promise.all(n)}catch(e){console.error(e.message)}}if(i)try{await this.contextHandlerRemoved({handlerId:i},e)}catch(e){console.error(e.message)}}}async handleClientDisconnecting(e){await this.unsubscribeAll(e),this.removeClient(e),await this.fireOnDisconnectForOtherClients(e)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={clientIdentity:e,handlerIdsByContextTypes:new Map,globalHandler:void 0,onAddContextListenerHandlerId:void 0,onUnsubscribeHandlerId:void 0,onDisconnectHandlerId:void 0};this.clients.set(e.endpointId,t)}}async getConnectedClients(){const e=await this.provider.getAllClientInfo();return Array.from(this.clients.values()).filter((t=>{const{uuid:n,name:i}=t.clientIdentity;return e.some((e=>i===e.name&&n===e.uuid))}))}static init(e,n){return new t(e,n)}},Ui}(),w=G,y=[{id:"green",displayMetadata:{color:"#00CC88",name:"green"}},{id:"purple",displayMetadata:{color:"#8C61FF",name:"purple"}},{id:"orange",displayMetadata:{color:"#FF8C4C",name:"orange"}},{id:"red",displayMetadata:{color:"#FF5E60",name:"red"}},{id:"pink",displayMetadata:{color:"#FF8FB8",name:"pink"}},{id:"yellow",displayMetadata:{color:"#E9FF8F",name:"yellow"}}];let f=class i extends c.Base{constructor(i,s,a){super(i),e.set(this,void 0),t.set(this,void 0),n.set(this,void 0),this.getProvider=()=>o(this,n,"f").getValue(),this.interopClients=new Map,this.contextGroupsById=new Map,r(this,t,a.contextGroups??[...y],"f"),r(this,e,a.fdc3Info,"f"),a?.logging&&(this.logging=a.logging),this.intentClientMap=new Map,this.lastContextMap=new Map,this.sessionContextGroupMap=new Map,r(this,n,new w.Lazy(s),"f"),this.setContextGroupMap(),this.setupChannelProvider()}static createClosedConstructor(...e){return class extends i{constructor(...t){if(t.length){const[n,i,r]=t;if(r&&"object"==typeof r&&!(0,u.default)(r,e[2]))return console.warn("You have modified the parameters of the InteropOverride constructor. This behavior is deprecated and will be removed in a future version. You can modify these options in your manifest. Please consult our Interop docs for guidance on migrating to the new override scheme."),void super(e[0],e[1],r);console.warn("You are attempting to pass arguments to the InteropOverride constructor. This is not necessary, and these passed arguments will be ignored. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.")}super(...e)}}}setContext({context:e},t){this.wire.sendAction("interop-broker-set-context").catch((e=>{}));const n=this.getClientState(t);if(!n||!n.contextGroupId)throw n?new Error("You must join a context group before you can set context."):new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);{const{contextGroupId:t}=n;this.setContextForGroup({context:e},t)}}setContextForGroup({context:e},t){this.wire.sendAction("interop-broker-set-context-for-group").catch((e=>{}));const n=this.contextGroupsById.get(t);if(!n)throw new Error(`Unable to set context for context group that isn't in the context group mapping: ${t}.`);const r=i.checkContextIntegrity(e);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(e)}`);const o=e.type;n.set(o,e),this.lastContextMap.set(t,o);Array.from(this.interopClients.values()).filter((e=>e.contextGroupId===t)).forEach((t=>{for(const[,n]of t.contextHandlers)i.isContextTypeCompatible(o,n.contextType)&&this.invokeContextHandler(t.clientIdentity,n.handlerId,e)}))}getCurrentContext(e,t){this.wire.sendAction("interop-broker-get-current-context").catch((e=>{}));const n=this.getClientState(t);if(!n?.contextGroupId)throw new Error("You must be a member of a context group to call getCurrentContext");const{contextGroupId:i}=n,r=this.contextGroupsById.get(i),o=this.lastContextMap.get(i),s=e?.contextType??o;return r&&s?r.get(s):void 0}async joinContextGroup({contextGroupId:e,target:t},n){if(this.wire.sendAction("interop-broker-join-context-group").catch((e=>{})),this.sessionContextGroupMap.has(e))throw new Error(l.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup);if(t){i.hasEndpointId(t)&&await this.addClientToContextGroup({contextGroupId:e},t);try{const n=this.channel.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name));if(!n.length)throw new Error(`Given Identity ${t.uuid} ${t.name} is not connected to the Interop Broker.`);n.length>1&&console.warn(`More than one connection found for identity ${t.uuid} ${t.name}`);const i=[];for(const t of n)i.push(this.addClientToContextGroup({contextGroupId:e},t));await Promise.all(i)}catch(e){throw new Error(e)}}else await this.addClientToContextGroup({contextGroupId:e},n)}async addClientToContextGroup({contextGroupId:e},t){this.wire.sendAction("interop-broker-add-client-to-context-group").catch((e=>{}));const n=this.getClientState(t);if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(!this.getContextGroups().find((t=>t.id===e)))throw new Error(`Attempting to join a context group that does not exist: ${e}. You may only join existing context groups.`);if(n.contextGroupId!==e){n.contextGroupId=e,await this.setCurrentContextGroupInClientOptions(t,e);const i=this.contextGroupsById.get(e);for(const[,e]of n.contextHandlers){const{contextType:n,handlerId:r}=e;if(void 0===n)i.forEach(((e,n)=>{this.invokeContextHandler(t,r,e)}));else if(i.has(n)){const e=i.get(n);e&&this.invokeContextHandler(t,r,e)}}}}async removeFromContextGroup({target:e},t){if(this.wire.sendAction("interop-broker-remove-from-context-group").catch((e=>{})),e){i.hasEndpointId(e)&&await this.removeClientFromContextGroup(e);try{const t=this.channel.connections.filter((t=>t.uuid===e.uuid&&t.name===e.name));if(!t.length)throw new Error(`No connection found for given Identity ${e.uuid} ${e.name}`);t.length>1&&console.warn(`More than one connection found for identity ${e.uuid} ${e.name}`);const n=[];for(const e of t)n.push(this.removeClientFromContextGroup(e));await Promise.all(n)}catch(e){throw new Error(e)}}else await this.removeClientFromContextGroup(t)}async removeClientFromContextGroup(e){this.wire.sendAction("interop-broker-remove-client-from-context-group").catch((e=>{}));const t=this.getClientState(e);t&&(t.contextGroupId=void 0),await this.setCurrentContextGroupInClientOptions(e,null)}getContextGroups(){return this.wire.sendAction("interop-broker-get-context-groups").catch((e=>{})),o(this,t,"f").map((e=>({...e})))}getInfoForContextGroup({contextGroupId:e}){return this.wire.sendAction("interop-broker-get-info-for-context-group").catch((e=>{})),this.getContextGroups().find((t=>t.id===e))}getAllClientsInContextGroup({contextGroupId:e}){this.wire.sendAction("interop-broker-get-all-clients-in-context-group").catch((e=>{}));return Array.from(this.interopClients.values()).filter((t=>t.contextGroupId===e)).map((e=>e.clientIdentity))}async handleFiredIntent(e,t){const n=(0,l.generateOverrideWarning)("fdc3.raiseIntent","InteropBroker.handleFiredIntent",t,"interopClient.fireIntent");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntent)}async setIntentTarget(e,t){this.wire.sendAction("interop-broker-set-intent-target").catch((e=>{}));const n=this.intentClientMap.get(t.name),i=`intent-handler-${e.name}`;if(n){const t=n.get(i);if(t){if(t.pendingIntents.push(e),t.clientIdentity&&t.isReady){const{clientIdentity:e,pendingIntents:n}=t;try{const r=n[n.length-1];await this.invokeIntentHandler(e,i,r),t.pendingIntents=[]}catch(n){console.error(`Error invoking intent handler for client ${e.uuid}/${e.name}/${e.endpointId}`),t.isReady=!1}}}else n.set(i,{isReady:!1,pendingIntents:[e]})}else{this.intentClientMap.set(t.name,new Map);const n=this.intentClientMap.get(t.name);n&&n.set(i,{isReady:!1,pendingIntents:[e]})}}async handleInfoForIntent(e,t){const n=(0,l.generateOverrideWarning)("fdc3.findIntent","InteropBroker.handleInfoForIntent",t,"interopClient.getInfoForIntent");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntent)}async handleInfoForIntentsByContext(e,t){const n=(0,l.generateOverrideWarning)("fdc3.findIntentsByContext","InteropBroker.handleInfoForIntentsByContext",t,"interopClient.getInfoForIntentsByContext");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntentsByContext)}async handleFiredIntentForContext(e,t){const n=(0,l.generateOverrideWarning)("fdc3.raiseIntentForContext","InteropBroker.handleFiredIntentForContext",t,"interopClient.fireIntentForContext");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntentForContext)}async clientDisconnected(e){}async fdc3HandleOpen({app:e,context:t},n){const i=(0,l.generateOverrideWarning)("fdc3.open","InteropBroker.fdc3HandleOpen",n);throw console.warn(i),new Error(l.BROKER_ERRORS.fdc3Open)}async fdc3HandleFindInstances(e,t){const n=(0,l.generateOverrideWarning)("fdc3.open","InteropBroker.fdc3HandleFindInstances",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3FindInstances)}async fdc3HandleGetAppMetadata(e,t){const n=(0,l.generateOverrideWarning)("fdc3.getAppMetadata","InteropBroker.fdc3HandleGetAppMetadata",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3GetAppMetadata)}async invokeContextHandler(e,t,n){const i=await this.getProvider();try{await i.dispatch(e,t,n)}catch(i){console.error(`Error invoking context handler ${t} for context type ${n.type} in client ${e.uuid}/${e.name}/${e.endpointId}`,i)}}async invokeIntentHandler(e,t,n){const i=await this.getProvider();await i.dispatch(e,t,n)}async fdc3HandleGetInfo(t,n){const{fdc3Version:i}=t;return{fdc3Version:i,...o(this,e,"f"),optionalFeatures:{OriginatingAppMetadata:!1,UserChannelMembershipAPIs:!0},appMetadata:{appId:"",instanceId:""}}}async getAllClientInfo(){return(await this.getProvider()).getAllClientInfo()}decorateSnapshot(e){return{...e,interopSnapshotDetails:{contextGroupStates:this.getContextGroupStates()}}}applySnapshot(e,t){const n=e?.interopSnapshotDetails?.contextGroupStates;n&&(t?.closeExistingWindows||this.updateExistingClients(n),this.rehydrateContextGroupStates(n))}updateExistingClients(e){this.interopClients.forEach((t=>{const{clientIdentity:n,contextGroupId:r,contextHandlers:o}=t;if(r){const t=e[r];for(const[,e]of Object.entries(t))o.forEach((t=>{const{handlerId:r,contextType:o}=t;i.isContextTypeCompatible(e.type,o)&&this.invokeContextHandler(n,r,e)}))}}))}getContextGroupStates(){return i.toObject(this.contextGroupsById)}rehydrateContextGroupStates(e){const t=Object.entries(e);for(const[e,n]of t){const t=Object.entries(n);for(const[n,i]of t)if(this.contextGroupsById.has(e)){this.contextGroupsById.get(e).set(n,i)}else console.warn(`Attempting to set a context group that isn't in the context group mapping. Skipping context group rehydration for: ${e}`)}}contextHandlerRegistered({contextType:e,handlerId:t},n){const i={contextType:e,handlerId:t},r=this.getClientState(n);if(r?.contextHandlers.set(t,i),r&&r.contextGroupId){const{contextGroupId:i}=r,o=this.contextGroupsById.get(i);if(void 0===e)o.forEach(((e,i)=>{this.invokeContextHandler(n,t,e)}));else if(o.has(e)){const i=o.get(e);i&&this.invokeContextHandler(n,t,i)}}}async intentHandlerRegistered(e,t){const{handlerId:n}=e,i=this.intentClientMap.get(t.name),r=i?.get(n);if(i)if(r){const{pendingIntents:e}=r;r.clientIdentity=t,r.isReady=!0;try{if(e.length>0){const i=e[e.length-1];await this.invokeIntentHandler(t,n,i),r.pendingIntents=[]}}catch(e){console.error(`Error invoking intent handler: ${n} for client ${t.uuid}/${t.name}/${t.endpointId}`)}}else i.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t});else{this.intentClientMap.set(t.name,new Map);const e=this.intentClientMap.get(t.name);e&&e.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t})}}removeContextHandler({handlerId:e},t){const n=this.getClientState(t);n&&n.contextHandlers.delete(e)}handleJoinSessionContextGroup({sessionContextGroupId:e},t){try{if(!e)throw new Error("Failed to join session context group: must specify group id.");const n=this.sessionContextGroupMap.get(e);if(n)n.registerNewClient(t);else{const n=new h.default(this.channel,e);n.registerNewClient(t),this.sessionContextGroupMap.set(e,n)}return{hasConflict:this.contextGroupsById.has(e)}}catch(e){throw new Error(e)}}getClientState(e){return this.interopClients.get(e.endpointId)}static toObject(e){const t=Object.fromEntries(e),n={};return Object.entries(t).forEach((([e,t])=>{const i=Object.fromEntries(t);n[e]=i})),n}static checkContextIntegrity(e){if(!e)return{isValid:!1,reason:"No context supplied"};if("object"!=typeof e)return{isValid:!1,reason:"Context must be an Object"};if(!e.type)return{isValid:!1,reason:"Context must have a type property"};if(e.id&&"object"!=typeof e.id)return{isValid:!1,reason:"Context id must be an Object populated with key-value identifiers (if set)"};if(e.id){const{id:t}=e,n=Object.keys(t);let i=!1;if(!n.length)return{isValid:!1,reason:"Context id must have at least one key-value identifier"};if(n.forEach((e=>{"string"==typeof e&&"string"==typeof t[e]||(i=!0)})),i)return{isValid:!1,reason:"Context id key-value identifiers must be of type string"}}return e.name&&"string"!=typeof e.name?{isValid:!1,reason:"Context name must be of string type (if set)"}:{isValid:!0}}static hasEndpointId(e){return void 0!==e.endpointId}static isContextTypeCompatible(e,t){return void 0===t||e===t}setContextGroupMap(){for(const e of this.getContextGroups())this.contextGroupsById.set(e.id,new Map)}async setCurrentContextGroupInClientOptions(e,t){try{const n=await this.fin.System.getEntityInfo(e.uuid,e.name);let i;"view"===n.entityType?i=await this.fin.View.wrap(e):"window"===n.entityType&&(i=await this.fin.Window.wrap(e)),i&&await i.updateOptions({interop:{currentContextGroup:t}})}catch(e){}}async setupChannelProvider(){try{const e=await this.getProvider();this.channel=e,this.wireChannel(e)}catch(e){throw new Error(`Error setting up Interop Broker Channel Provider: ${e}`)}}wireChannel(e){e.onConnection((async(e,t)=>{if(!await this.isConnectionAuthorized(e,t))throw new Error(`Connection not authorized for ${e.uuid}, ${e.name}`);if(!e.endpointId)throw new Error("Version too old to be compatible with Interop. Please upgrade your runtime to a more recent version.");const n={contextGroupId:void 0,contextHandlers:new Map,clientIdentity:e};t?.currentContextGroup&&this.contextGroupsById.has(t.currentContextGroup)&&(n.contextGroupId=t?.currentContextGroup),this.interopClients.set(e.endpointId,n)})),e.onDisconnection((e=>{this.interopClients.delete(e.endpointId);const t=this.intentClientMap.get(e.name);t&&e.uuid===this.fin.me.uuid&&t.forEach((e=>{e.isReady=!1})),this.sessionContextGroupMap.forEach((t=>{t.onDisconnection(e)})),this.clientDisconnected(e)})),e.beforeAction((async(e,t,n)=>{if(!await this.isActionAuthorized(e,t,n))throw new Error(`Action (${e}) not authorized for ${n.uuid}, ${n.name}`);this.logging?.beforeAction?.enabled&&console.log(e,t,n)})),e.afterAction(((e,t,n)=>{this.logging?.afterAction?.enabled&&console.log(e,t,n)})),e.register("setContext",this.setContext.bind(this)),e.register("fireIntent",this.handleFiredIntent.bind(this)),e.register("getCurrentContext",this.getCurrentContext.bind(this)),e.register("getInfoForIntent",this.handleInfoForIntent.bind(this)),e.register("getInfoForIntentsByContext",this.handleInfoForIntentsByContext.bind(this)),e.register("fireIntentForContext",this.handleFiredIntentForContext.bind(this)),e.register("getContextGroups",this.getContextGroups.bind(this)),e.register("joinContextGroup",this.joinContextGroup.bind(this)),e.register("removeFromContextGroup",this.removeFromContextGroup.bind(this)),e.register("getAllClientsInContextGroup",this.getAllClientsInContextGroup.bind(this)),e.register("getInfoForContextGroup",this.getInfoForContextGroup.bind(this)),e.register("contextHandlerRegistered",this.contextHandlerRegistered.bind(this)),e.register("intentHandlerRegistered",this.intentHandlerRegistered.bind(this)),e.register("removeContextHandler",this.removeContextHandler.bind(this)),e.register("sessionContextGroup:createIfNeeded",this.handleJoinSessionContextGroup.bind(this)),e.register("fdc3Open",this.fdc3HandleOpen.bind(this)),e.register("fdc3v2FindIntentsByContext",this.handleInfoForIntentsByContext.bind(this)),e.register("fdc3FindInstances",this.fdc3HandleFindInstances.bind(this)),e.register("fdc3GetAppMetadata",this.fdc3HandleGetAppMetadata.bind(this)),e.register("fdc3v2GetInfo",(async(e,t)=>this.fdc3HandleGetInfo.bind(this)(e,t))),e.register("createPrivateChannelProvider",(async e=>{const{channelId:t}=e,n=await this.fin.InterApplicationBus.Channel.create(t);p.PrivateChannelProvider.init(n,t)}))}isConnectionAuthorized(e,t){return this.wire.sendAction("interop-broker-is-connection-authorized").catch((e=>{})),Promise.resolve(!0)}isActionAuthorized(e,t,n){return this.wire.sendAction("interop-broker-is-action-authorized").catch((e=>{})),Promise.resolve(!0)}};return Gi.InteropBroker=f,e=new WeakMap,t=new WeakMap,n=new WeakMap,Gi}var zi,Ki={},qi={},Ji=s&&s.__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},Yi=s&&s.__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)};Object.defineProperty(qi,"__esModule",{value:!0});const Zi=d,Qi=Hi;class Xi extends Zi.Base{constructor(e,t,n){super(e),zi.set(this,void 0),this.id=n,Ji(this,zi,t,"f")}async setContext(e){this.wire.sendAction("interop-session-context-group-set-context").catch((e=>{}));return(await Yi(this,zi,"f")).dispatch(`sessionContextGroup:setContext-${this.id}`,{sessionContextGroupId:this.id,context:e})}async getCurrentContext(e){this.wire.sendAction("interop-session-context-group-get-context").catch((e=>{}));return(await Yi(this,zi,"f")).dispatch(`sessionContextGroup:getContext-${this.id}`,{sessionContextGroupId:this.id,type:e})}async addContextHandler(e,t){if(this.wire.sendAction("interop-session-context-group-add-handler").catch((e=>{})),"function"!=typeof e)throw new Error("Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");const n=await Yi(this,zi,"f");let i;return i=t?`sessionContextHandler:invoke-${this.id}-${t}-${(0,Qi.generateId)()}`:`sessionContextHandler:invoke-${this.id}`,n.register(i,(0,Qi.wrapContextHandler)(e,i)),await n.dispatch(`sessionContextGroup:handlerAdded-${this.id}`,{handlerId:i,contextType:t}),{unsubscribe:await this.createUnsubscribeCb(i)}}async createUnsubscribeCb(e){const t=await Yi(this,zi,"f");return async()=>{t.remove(e),await t.dispatch(`sessionContextGroup:handlerRemoved-${this.id}`,{handlerId:e})}}getUserInstance(){return{id:this.id,setContext:(0,Qi.wrapInTryCatch)(this.setContext.bind(this),"Failed to set context: "),getCurrentContext:(0,Qi.wrapInTryCatch)(this.getCurrentContext.bind(this),"Failed to get context: "),addContextHandler:(0,Qi.wrapInTryCatch)(this.addContextHandler.bind(this),"Failed to add context handler: ")}}}qi.default=Xi,zi=new WeakMap;var er={},tr={},nr={},ir={},rr=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),or=s&&s.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),sr=s&&s.__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)&&rr(t,e,n);return or(t,e),t};Object.defineProperty(ir,"__esModule",{value:!0}),ir.PrivateChannelClient=void 0;const ar=sr(Hi);var cr,dr;function hr(){if(cr)return tr;cr=1;var e,t=s&&s.__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)},n=s&&s.__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},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(tr,"__esModule",{value:!0}),tr.FDC3ModuleBase=void 0;const o=nr,a=Hi,c=wr(),d=r(i);return tr.FDC3ModuleBase=class{get client(){return t(this,e,"f").call(this)}get fin(){return this.wire.getFin()}constructor(t,i){this.wire=i,e.set(this,void 0),n(this,e,t,"f")}async broadcast(e){return this.wire.sendAction("fdc3-broadcast").catch((e=>{})),this.client.setContext(e)}async _open(e,t){this.wire.sendAction("fdc3-open").catch((e=>{}));try{return await c.InteropClient.ferryFdc3Call(this.client,"fdc3Open",{app:e,context:t})}catch(e){const t=e.message===a.BROKER_ERRORS.fdc3Open?"ResolverUnavailable":e.message;throw new Error(t)}}async _getChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:"system",...(0,o.getUnsupportedChannelApis)()})))}async getOrCreateChannel(e){this.wire.sendAction("fdc3-get-or-create-channel").catch((e=>{}));const t=(await this._getChannels()).find((t=>t.id===e));if(t)return{...t,type:"system",...(0,o.getUnsupportedChannelApis)()};try{const t=await this.client.joinSessionContextGroup(e);return(0,o.buildAppChannelObject)(t)}catch(e){throw console.error(e.message),new Error(o.ChannelError.CreationFailed)}}async getSystemChannels(){return this.wire.sendAction("fdc3-get-system-channels").catch((e=>{})),this._getChannels()}async joinChannel(e){this.wire.sendAction("fdc3-join-channel").catch((e=>{}));try{return await this.client.joinContextGroup(e)}catch(e){if(e.message===a.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup?console.error("The Channel you have tried to join is an App Channel. Custom Channels can only be defined by the Interop Broker through code or manifest configuration. Please use getOrCreateChannel."):console.error(e.message),e.message.startsWith("Attempting to join a context group that does not exist"))throw new Error(o.ChannelError.NoChannelFound);throw new Error(o.ChannelError.AccessDenied)}}async getCurrentChannel(){this.wire.sendAction("fdc3-get-current-channel").catch((e=>{}));const e=await this.getCurrentContextGroupInfo();return e?this.buildChannelObject(e):null}async leaveCurrentChannel(){return this.wire.sendAction("fdc3-leave-current-channel").catch((e=>{})),this.client.removeFromContextGroup()}async getCurrentContextGroupInfo(){const e=await this.client.getContextGroups(),t=e.map((async e=>this.client.getAllClientsInContextGroup(e.id))),n=(await Promise.all(t)).findIndex((e=>e.some((e=>{const{uuid:t,name:n}=e;return this.wire.me.uuid===t&&this.wire.me.name===n}))));return e[n]}async buildChannelObject(e){return{...e,type:"system",addContextListener:(...[e,t])=>{let n,i;"function"==typeof e?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),n=e):(n=t,"string"==typeof e&&(i=e));const r=(async()=>{let e=!0;const t=await this.client.getCurrentContext(i);return this.client.addContextHandler(((i,r)=>{if(!e||(e=!1,!(0,d.default)(t,i)))return n(i,r)}),i)})();return{...r,unsubscribe:()=>r.then((e=>e.unsubscribe()))}},broadcast:this.broadcast.bind(this),getCurrentContext:async e=>{const t=await this.client.getCurrentContext(e);return void 0===t?null:t}}}},e=new WeakMap,tr}ir.PrivateChannelClient=class{constructor(e,t){this.id=t,this.client=e,this.listeners=new Map}async broadcast(e){return this.client.dispatch("broadcast",{context:e})}async getCurrentContext(e){return this.client.dispatch("getCurrentContext",{contextType:e})}async addContextListener(e,t){if("function"!=typeof t)throw new Error("Non-function argument passed to the second parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");let n;n=e?`contextHandler:invoke-${this.id}-${e}-${ar.generateId()}`:`contextHandler:invoke-${this.id}-${ar.generateId()}`,this.client.register(n,ar.wrapContextHandler(t,n));const i={unsubscribe:await this.createContextUnsubscribeCb(n)};return this.listeners.set(n,i),await this.client.dispatch("contextHandlerAdded",{handlerId:n,contextType:e}),i}createNonStandardUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch("nonStandardHandlerRemoved",{handlerId:e})}}createContextUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch("contextHandlerRemoved",{handlerId:e})}}onAddContextListener(e){const t=`onContextHandlerAdded:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch("onAddContextHandlerAdded",{handlerId:t}),n}onDisconnect(e){const t=`onDisconnect:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch("onDisconnectHandlerAdded",{handlerId:t}),n}onUnsubscribe(e){const t=`onUnsubscribe:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch("onUnsubscribeHandlerAdded",{handlerId:t}),n}async cleanUpAllSubs(){Array.from(this.listeners.keys()).forEach((e=>{this.client.remove(e),this.listeners.delete(e)}))}async disconnect(){try{await this.client.dispatch("clientDisconnecting"),await this.cleanUpAllSubs(),await this.client.disconnect()}catch(e){throw new Error(e.message)}}},function(e){var t=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.getIntentResolution=e.isChannel=e.isContext=e.connectPrivateChannel=e.buildAppChannelObject=e.buildPrivateChannelObject=e.ChannelError=e.ResultError=e.UnsupportedChannelApiError=e.getUnsupportedChannelApis=void 0;const n=Hi,r=ir,o=t(i);e.getUnsupportedChannelApis=e=>({addContextListener:()=>{throw new a("Channel.addContextListener",e)},broadcast:()=>{throw new a("Channel.broadcast",e)},getCurrentContext:()=>{throw new a("Channel.getCurrentContext",e)}});class a extends Error{constructor(e,t="System"){super(e),this.message=`Calling ${e} on an instance of a ${t} Channel returned by fdc3.get${t}Channels is not supported. If you would like to use a ${t} Channel, please use fdc3.joinChannel, fdc3.addContextListener, and fdc3.broadcast instead.`}}var c,d;e.UnsupportedChannelApiError=a,function(e){e.NoResultReturned="NoResultReturned",e.IntentHandlerRejected="IntentHandlerRejected"}(c=e.ResultError||(e.ResultError={})),(d=e.ChannelError||(e.ChannelError={})).NoChannelFound="NoChannelFound",d.AccessDenied="AccessDenied",d.CreationFailed="CreationFailed";e.buildPrivateChannelObject=e=>{let t=!1;const n=()=>{if(t)throw new Error("Private Channel Client has been disconnected from the Private Channel")};return{id:e.id,type:"private",broadcast:async t=>(n(),e.broadcast(t)),getCurrentContext:async t=>(n(),e.getCurrentContext(t)),addContextListener:async(t,i)=>{n();let r=i,o=t;"function"==typeof t&&(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),r=t,o=null);return e.addContextListener(o,r)},onAddContextListener:t=>(n(),e.onAddContextListener(t)),disconnect:async()=>(n(),t=!0,e.disconnect()),onDisconnect:t=>(n(),e.onDisconnect(t)),onUnsubscribe:t=>(n(),e.onUnsubscribe(t))}};e.buildAppChannelObject=e=>({id:e.id,type:"app",broadcast:e.setContext,getCurrentContext:async t=>{const n=await e.getCurrentContext(t);return void 0===n?null:n},addContextListener:(t,n)=>{let i,r;"function"==typeof t?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),i=t):(i=n,"string"==typeof t&&(r=t));const s=(async()=>{let t=!0;const n=await e.getCurrentContext(r);return e.addContextHandler(((e,r)=>{if(!t||(t=!1,!(0,o.default)(n,e)))return i(e,r)}),r)})();return{...s,unsubscribe:()=>s.then((e=>e.unsubscribe()))}}});e.connectPrivateChannel=async t=>{try{const n=await fin.InterApplicationBus.Channel.connect(t),i=new r.PrivateChannelClient(n,t);return(0,e.buildPrivateChannelObject)(i)}catch(e){throw new Error(`Private Channel with id: ${t} doesn't exist`)}};e.isContext=e=>{if(e&&"object"==typeof e&&"type"in e){const{type:t}=e;return"string"==typeof t}return!1};e.isChannel=e=>{if(e&&"object"==typeof e&&"type"in e&&"id"in e){const{type:t,id:n}=e;return"string"==typeof t&&"string"==typeof n&&("app"===t||"private"===t)}return!1};e.getIntentResolution=async(t,i,r,o)=>{const s=(0,n.generateId)(),a=new Promise(((e,t)=>{fin.InterApplicationBus.subscribe({uuid:"*"},s,(t=>{e(t)})).catch((()=>t(new Error("getResult is not supported in this environment"))))})),d=r?{target:r,intentResolutionResultId:s}:{intentResolutionResultId:s},h=o?{name:o,context:i,metadata:d}:{...i,metadata:d},l=async()=>{let n=await a;if(!n||"object"!=typeof n)throw new Error(c.NoResultReturned);const{error:i}=n;if(i)throw new Error(c.IntentHandlerRejected);if((0,e.isChannel)(n)){const{id:i,type:r}=n;switch(r){case"private":n=await(0,e.connectPrivateChannel)(i);break;case"app":{const r=await t.joinSessionContextGroup(i);n=(0,e.buildAppChannelObject)(r);break}}}else if(!(0,e.isContext)(n))throw new Error(c.NoResultReturned);return n},u=o?await t.fireIntent(h):await t.fireIntentForContext(h);return"object"!=typeof u?{source:{appId:"",instanceId:""},intent:"",version:"2.0",getResult:l}:{...u,getResult:l}}}(nr);var lr,ur,pr={};function wr(){if(ur)return Ki;ur=1;var e,t,n=s&&s.__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},i=s&&s.__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)},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ki,"__esModule",{value:!0}),Ki.InteropClient=void 0;const o=d,a=r(qi),c=function(){if(dr)return er;dr=1,Object.defineProperty(er,"__esModule",{value:!0}),er.Fdc3Module=void 0;const e=Hi,t=hr();class n extends t.FDC3ModuleBase{async open(e,t){await super._open(e,t)}addContextListener(e,t){let n;return this.wire.sendAction("fdc3-add-context-listener").catch((e=>{})),"function"==typeof e?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),n=this.client.addContextHandler(e)):n=this.client.addContextHandler(t,null===e?void 0:e),{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}addIntentListener(e,t){this.wire.sendAction("fdc3-add-intent-listener").catch((e=>{}));const n=this.client.registerIntentHandler((e=>{const{context:n,metadata:i}=e,{metadata:r}=n,o=i?.intentResolutionResultId||r?.intentResolutionResultId;o&&this.fin.InterApplicationBus.publish(o,null).catch((()=>null)),t(e.context)}),e,{fdc3Version:"1.2"});return{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}async raiseIntent(t,n,i){this.wire.sendAction("fdc3-raise-intent").catch((e=>{}));const r=i?{name:t,context:n,metadata:{target:i}}:{name:t,context:n};try{return await this.client.fireIntent(r)}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntent?"ResolverUnavailable":t.message;throw new Error(n)}}async findIntent(t,n){this.wire.sendAction("fdc3-find-intent").catch((e=>{}));try{return await this.client.getInfoForIntent({name:t,context:n})}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntent?"ResolverUnavailable":t.message;throw new Error(n)}}async findIntentsByContext(t){this.wire.sendAction("fdc3-find-intents-by-context").catch((e=>{}));try{return await this.client.getInfoForIntentsByContext(t)}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntentsByContext?"ResolverUnavailable":t.message;throw new Error(n)}}async raiseIntentForContext(t,n){this.wire.sendAction("fdc3-raise-intent-for-context").catch((e=>{}));try{return await this.client.fireIntentForContext({...t,metadata:{target:n}})}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntentForContext?"ResolverUnavailable":t.message;throw new Error(n)}}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}getInfo(){return this.wire.sendAction("fdc3-get-info").catch((e=>{})),{providerVersion:this.wire.environment.getAdapterVersionSync(),provider:`openfin-${this.wire.me.uuid}`,fdc3Version:"1.2"}}}return er.Fdc3Module=n,er}(),h=function(){if(lr)return pr;lr=1,Object.defineProperty(pr,"__esModule",{value:!0}),pr.Fdc3Module2=void 0;const e=hr(),t=Hi,n=wr(),i=nr,r=ir;class o extends e.FDC3ModuleBase{async open(e,t){return"string"==typeof e&&console.warn("Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string })."),super._open(e,t)}async findInstances(e){this.wire.sendAction("fdc3-find-instances").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,"fdc3FindInstances",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3FindInstances?"ResolverUnavailable":e.message;throw new Error(n)}}async getAppMetadata(e){this.wire.sendAction("fdc3-get-app-metadata").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,"fdc3GetAppMetadata",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3GetAppMetadata?"ResolverUnavailable":e.message;throw new Error(n)}}async addContextListener(e,t){this.wire.sendAction("fdc3-add-context-listener").catch((e=>{}));const n=e=>t=>{const{contextMetadata:n,...i}=t,r=n?[{...i},n]:[t,null];e(...r)};let i=t,r=n(i);return"function"==typeof e?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),i=e,r=n(i),this.client.addContextHandler(r)):this.client.addContextHandler(r,null===e?void 0:e)}async findIntent(e,n,i){this.wire.sendAction("fdc3-find-intent").catch((e=>{}));try{return await this.client.getInfoForIntent({name:e,context:n,metadata:{resultType:i}})}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntent?"ResolverUnavailable":e.message;throw new Error(n)}}async findIntentsByContext(e,i){this.wire.sendAction("fdc3-find-intents-by-context").catch((e=>{}));const r=i?{context:e,metadata:{resultType:i}}:e;try{return await n.InteropClient.ferryFdc3Call(this.client,"fdc3v2FindIntentsByContext",r)}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntentsByContext?"ResolverUnavailable":e.message;throw new Error(n)}}async raiseIntent(e,n,r){this.wire.sendAction("fdc3-raise-intent").catch((e=>{}));try{return"string"==typeof r&&console.warn("Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string })."),(0,i.getIntentResolution)(this.client,n,r,e)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?"ResolverUnavailable":e.message;throw new Error(n)}}async raiseIntentForContext(e,n){this.wire.sendAction("fdc3-raise-intent-for-context").catch((e=>{}));try{return"string"==typeof n&&console.warn("Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string })."),(0,i.getIntentResolution)(this.client,e,n)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?"ResolverUnavailable":e.message;throw new Error(n)}}async addIntentListener(e,t){if(this.wire.sendAction("fdc3-add-intent-listener").catch((e=>{})),"string"!=typeof e)throw new Error("First argument must be an Intent name");return this.client.registerIntentHandler((async e=>{let n,i;const{context:r,metadata:o}=e,{contextMetadata:s,metadata:a,...c}=r,d=o?.intentResolutionResultId||a?.intentResolutionResultId;try{const e=a?{metadata:a,...c}:{...c};n=await t(e,s),i=n}catch(e){n=e,i={error:!0}}if(d&&this.fin.InterApplicationBus.publish(d,i).catch((()=>null)),n instanceof Error)throw new Error(n.message);return n}),e,{fdc3Version:"2.0"})}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}async createPrivateChannel(){const e=(0,t.generateId)();await n.InteropClient.ferryFdc3Call(this.client,"createPrivateChannelProvider",{channelId:e});const o=await this.fin.InterApplicationBus.Channel.connect(e),s=new r.PrivateChannelClient(o,e);return(0,i.buildPrivateChannelObject)(s)}async getUserChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:"user",...(0,i.getUnsupportedChannelApis)("User")})))}async getSystemChannels(){return console.warn("This API has been deprecated. Please use fdc3.getUserChannels instead."),super.getSystemChannels()}async joinUserChannel(e){return super.joinChannel(e)}async joinChannel(e){return console.warn("This API has been deprecated. Please use fdc3.joinUserChannel instead."),super.joinChannel(e)}async getCurrentChannel(){const e=await super.getCurrentChannel();return e?{...e,type:"user",broadcast:this.broadcast.bind(this)}:null}async getInfo(){return n.InteropClient.ferryFdc3Call(this.client,"fdc3v2GetInfo",{fdc3Version:"2.0"})}}return pr.Fdc3Module2=o,pr}(),l=Hi;let u=class extends o.Base{constructor(i,r){super(i),e.set(this,void 0),t.set(this,void 0),n(this,t,new Map,"f"),n(this,e,r,"f")}async setContext(t){this.wire.sendAction("interop-client-set-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("setContext",{context:t})}async addContextHandler(t,n){if(this.wire.sendAction("interop-client-add-context-handler").catch((e=>{})),"function"!=typeof t)throw new Error("Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");const r=await i(this,e,"f");let o;o=n?`invokeContextHandler-${n}-${(0,l.generateId)()}`:"invokeContextHandler";const s=(0,l.wrapContextHandler)(t,o);return r.register(o,s),await r.dispatch("contextHandlerRegistered",{handlerId:o,contextType:n}),{unsubscribe:async()=>{r.remove(o),await r.dispatch("removeContextHandler",{handlerId:o})}}}async getContextGroups(){this.wire.sendAction("interop-client-get-context-groups").catch((e=>{}));return(await i(this,e,"f")).dispatch("getContextGroups")}async joinContextGroup(t,n){this.wire.sendAction("interop-client-join-context-group").catch((e=>{}));const r=await i(this,e,"f");if(!t)throw new Error("No contextGroupId specified for joinContextGroup.");return r.dispatch("joinContextGroup",{contextGroupId:t,target:n})}async removeFromContextGroup(t){this.wire.sendAction("interop-client-remove-from-context-group").catch((e=>{}));return(await i(this,e,"f")).dispatch("removeFromContextGroup",{target:t})}async getAllClientsInContextGroup(t){this.wire.sendAction("interop-client-get-all-clients-in-context-group").catch((e=>{}));const n=await i(this,e,"f");if(!t)throw new Error("No contextGroupId specified for getAllClientsInContextGroup.");return n.dispatch("getAllClientsInContextGroup",{contextGroupId:t})}async getInfoForContextGroup(t){this.wire.sendAction("interop-client-get-info-for-context-group").catch((e=>{}));const n=await i(this,e,"f");if(!t)throw new Error("No contextGroupId specified for getInfoForContextGroup.");return n.dispatch("getInfoForContextGroup",{contextGroupId:t})}async fireIntent(t){this.wire.sendAction("interop-client-fire-intent").catch((e=>{}));return(await i(this,e,"f")).dispatch("fireIntent",t)}async registerIntentHandler(t,n,r){this.wire.sendAction("interop-client-register-intent-handler").catch((e=>{}));const o=await i(this,e,"f"),s=`intent-handler-${n}`,a=(0,l.wrapIntentHandler)(t,s);try{await o.register(s,a),await o.dispatch("intentHandlerRegistered",{handlerId:s,...r})}catch(e){throw new Error("Unable to register intent handler")}return{unsubscribe:async()=>{o.remove(s)}}}async getCurrentContext(t){this.wire.sendAction("interop-client-get-current-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("getCurrentContext",{contextType:t})}async getInfoForIntent(t){this.wire.sendAction("interop-client-get-info-for-intent").catch((e=>{}));return(await i(this,e,"f")).dispatch("getInfoForIntent",t)}async getInfoForIntentsByContext(t){this.wire.sendAction("interop-client-get-info-for-intents-by-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("getInfoForIntentsByContext",t)}async fireIntentForContext(t){this.wire.sendAction("interop-client-fire-intent-for-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("fireIntentForContext",t)}async joinSessionContextGroup(n){try{const r=i(this,t,"f").get(n);if(r)return r.getUserInstance();const o=await i(this,e,"f"),{hasConflict:s}=await o.dispatch("sessionContextGroup:createIfNeeded",{sessionContextGroupId:n});s&&console.warn(`A (non-session) context group with the name "${n}" already exists. If you are trying to join a Context Group, call joinContextGroup instead.`);const c=new a.default(this.wire,i(this,e,"f"),n);return i(this,t,"f").set(n,c),c.getUserInstance()}catch(e){throw console.error(`Error thrown trying to create Session Context Group with id "${n}": ${e}`),e}}async onDisconnection(t){this.wire.sendAction("interop-client-add-ondisconnection-listener").catch((e=>{}));return(await i(this,e,"f")).onDisconnection((e=>{const{uuid:n}=e;t({type:"interop-broker",topic:"disconnected",brokerName:n})}))}getFDC3Sync(e){switch(e){case"1.2":return new c.Fdc3Module((()=>this),this.wire);case"2.0":return new h.Fdc3Module2((()=>this),this.wire);default:throw new Error(`Invalid FDC3 version provided: ${e}. Must be '1.2' or '2.0'`)}}async getFDC3(e){return this.getFDC3Sync(e)}static async ferryFdc3Call(t,n,r){return(await i(t,e,"f")).dispatch(n,r||null)}};return Ki.InteropClient=u,e=new WeakMap,t=new WeakMap,Ki}var yr,fr,gr,mr={};function vr(){if(yr)return mr;yr=1,Object.defineProperty(mr,"__esModule",{value:!0}),mr.overrideCheck=mr.checkFDC32Overrides=mr.getDefaultViewFdc3VersionFromAppInfo=void 0;const e=Vi();function t(t){return["fdc3HandleFindInstances","handleInfoForIntent","handleInfoForIntentsByContext","fdc3HandleGetAppMetadata","fdc3HandleGetInfo","fdc3HandleOpen","handleFiredIntent","handleFiredIntentForContext"].filter((n=>t[n]===e.InteropBroker.prototype[n]))}return mr.getDefaultViewFdc3VersionFromAppInfo=function({manifest:e,initialOptions:t}){const n=e?.platform?.defaultViewOptions?.fdc3InteropApi??t.defaultViewOptions?.fdc3InteropApi;return["1.2","2.0"].includes(n??"")?n:void 0},mr.checkFDC32Overrides=t,mr.overrideCheck=function(e,n){if(n&&"2.0"===n){const n=t(e);n.length>0&&console.warn(`WARNING: FDC3 2.0 has been set as a default option for Views in this Platform, but the required InteropBroker APIs for FDC3 2.0 compliance have not all been overridden.\nThe following APIs need to be overridden:\n${n.join("\n")}`)}},mr}function Cr(){return gr||(gr=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),i=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),i(function(){if(fr)return Ti;fr=1;var e=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ti,"__esModule",{value:!0}),Ti.InteropModule=void 0;const t=e(n),i=$i,r=d,o=Vi(),a=wr(),c=vr(),h=Tn,l=e=>new e,u="You have attempted to use or modify InteropBroker parameters, which is not allowed. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.";class p extends r.Base{async init(e,n=l){this.wire.sendAction("interop-init").catch((()=>{}));const r=await this.wire.environment.getInteropInfo(this.wire.getFin()),s=(0,i.createUnusableObject)(u),a=(0,i.createWarningObject)(u,(0,t.default)(r)),d=async()=>{throw new Error(u)},p=o.InteropBroker.createClosedConstructor(this.wire,(()=>this.fin.InterApplicationBus.Channel.create(`interop-broker-${e}`)),r);let w;return w=Array.isArray(n)?new((0,h.overrideFromComposables)(...n)(p))(s,d,a):await n(p,s,d,a),(0,c.overrideCheck)(w,r.fdc3Version),w}connectSync(e,t){return this.wire.sendAction("interop-connect-sync").catch((()=>{})),new a.InteropClient(this.wire,this.wire.environment.whenReady().then((()=>this.fin.InterApplicationBus.Channel.connect(`interop-broker-${e}`,{payload:t}))))}}return Ti.InteropModule=p,Ti}(),e),i(wr(),e),i(Vi(),e)}(Li)),Li}var br={},Ir={},Er={},xr={};Object.defineProperty(xr,"__esModule",{value:!0}),xr.getSnapshotSourceChannelName=void 0;xr.getSnapshotSourceChannelName=e=>`snapshot-source-provider-${e.uuid}`;var Ar,Pr,Mr,_r,Or,Sr=s&&s.__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},Rr=s&&s.__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)};Object.defineProperty(Er,"__esModule",{value:!0}),Er.SnapshotSource=void 0;const Fr=d,jr=xr,kr=new Map;class Lr extends Fr.Base{constructor(e,t){super(e),Ar.set(this,void 0),Pr.set(this,(()=>(kr.has(this.identity.uuid)||kr.set(this.identity.uuid,{eventFired:null,clientPromise:null}),kr.get(this.identity.uuid)))),Mr.set(this,(()=>(Rr(this,Pr,"f").call(this).clientPromise||(Rr(this,Pr,"f").call(this).clientPromise=Rr(this,_r,"f").call(this)),Rr(this,Pr,"f").call(this).clientPromise))),_r.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);try{Rr(this,Pr,"f").call(this).eventFired||await Rr(this,Or,"f").call(this);const t=await this.fin.InterApplicationBus.Channel.connect(e,{wait:!1});return t.onDisconnection((()=>{Rr(this,Pr,"f").call(this).clientPromise=null,Rr(this,Pr,"f").call(this).eventFired=null})),t}catch(e){throw Rr(this,Pr,"f").call(this).clientPromise=null,new Error("The targeted SnapshotSource is not currently initialized. Await this object's ready() method.")}})),Or.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);let t,n;const i=new Promise(((e,i)=>{t=e,n=i}));Rr(this,Pr,"f").call(this).eventFired=i;const r=async i=>{try{i.channelName===e&&(t(),await this.fin.InterApplicationBus.Channel.removeListener("connected",r))}catch(e){n(e)}};await this.fin.InterApplicationBus.Channel.on("connected",r)})),Sr(this,Ar,t,"f")}get identity(){return Rr(this,Ar,"f")}async ready(){this.wire.sendAction("snapshot-source-ready").catch((e=>{}));try{await Rr(this,Mr,"f").call(this)}catch(e){await Rr(this,Pr,"f").call(this).eventFired}}async getSnapshot(){this.wire.sendAction("snapshot-source-get-snapshot").catch((e=>{}));const e=await Rr(this,Mr,"f").call(this),t=await e.dispatch("get-snapshot");return(await t).snapshot}async applySnapshot(e){this.wire.sendAction("snapshot-source-apply-snapshot").catch((e=>{}));return(await Rr(this,Mr,"f").call(this)).dispatch("apply-snapshot",{snapshot:e})}}Er.SnapshotSource=Lr,Ar=new WeakMap,Pr=new WeakMap,Mr=new WeakMap,_r=new WeakMap,Or=new WeakMap,Object.defineProperty(Ir,"__esModule",{value:!0}),Ir.SnapshotSourceModule=void 0;const Tr=d,$r=Er,Br=xr;class Gr extends Tr.Base{async init(e){if(this.wire.sendAction("snapshot-source-init").catch((e=>{})),"object"!=typeof e||"function"!=typeof e.getSnapshot||"function"!=typeof e.applySnapshot)throw new Error("you must pass in a valid SnapshotProvider");const t=await this.fin.InterApplicationBus.Channel.create((0,Br.getSnapshotSourceChannelName)(this.fin.me));t.register("get-snapshot",(async()=>({snapshot:await e.getSnapshot()}))),t.register("apply-snapshot",(({snapshot:t})=>e.applySnapshot(t)))}wrapSync(e){return this.wire.sendAction("snapshot-source-wrap-sync").catch((e=>{})),new $r.SnapshotSource(this.wire,e)}async wrap(e){return this.wire.sendAction("snapshot-source-wrap").catch((e=>{})),this.wrapSync(e)}}Ir.SnapshotSourceModule=Gr,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Ir,e),n(Er,e)}(br),Object.defineProperty(a,"__esModule",{value:!0});var Wr=a.Fin=void 0;const Hr=t,Nr=c,Dr=ie(),Ur=Z(),Vr=de,zr=en,Kr=rn,qr=un,Jr=bn,Yr=J(),Zr=An,Qr=ki,Xr=Cr(),eo=br;class to extends Hr.EventEmitter{constructor(e){super(),this.wire=e,this.System=new Nr.System(e),this.Window=new Dr._WindowModule(e),this.Application=new Ur.ApplicationModule(e),this.InterApplicationBus=new Vr.InterApplicationBus(e),this.Clipboard=new zr.Clipboard(e),this.ExternalApplication=new Kr.ExternalApplicationModule(e),this.Frame=new qr._FrameModule(e),this.GlobalHotkey=new Jr.GlobalHotkey(e),this.Platform=new Zr.PlatformModule(e,this.InterApplicationBus.Channel),this.View=new Yr.ViewModule(e),this.Interop=new Xr.InteropModule(e),this.SnapshotSource=new eo.SnapshotSourceModule(e),e.registerFin(this),this.me=(0,Qr.getMe)(e),e.on("disconnected",(()=>{this.emit("disconnected")}))}}Wr=a.Fin=to;var no={},io={};function ro(e){return"string"==typeof e.manifestUrl}function oo(e){return ao(e)&&"string"==typeof e.address}function so(e){return oo(e)&&"string"==typeof e.token}function ao(e){return"string"==typeof e.uuid}function co(e){return e.runtime&&"string"==typeof e.runtime.version}function ho(e){return ao(e)&&co(e)}Object.defineProperty(io,"__esModule",{value:!0}),io.isInternalConnectConfig=io.isPortDiscoveryConfig=io.isNewConnectConfig=io.isConfigWithReceiver=io.isRemoteConfig=io.isExistingConnectConfig=io.isExternalConfig=void 0,io.isExternalConfig=ro,io.isExistingConnectConfig=oo,io.isRemoteConfig=so,io.isConfigWithReceiver=function(e){return"object"==typeof e.receiver&&so({...e,address:""})},io.isNewConnectConfig=ho,io.isPortDiscoveryConfig=function(e){return ro(e)&&co(e)||ho(e)},io.isInternalConnectConfig=function(e){return oo(e)||ho(e)};var lo={},uo={};Object.defineProperty(uo,"__esModule",{value:!0}),uo.EmitterMap=void 0;const po=t;function wo(e){return Buffer.from(e).toString("base64")}uo.EmitterMap=class{constructor(){this.storage=new Map}hashKeys(e){return e.map(wo).join("/")}getOrCreate(e){const t=this.hashKeys(e);return this.storage.has(t)||this.storage.set(t,new po.EventEmitter),this.storage.get(t)}has(e){return this.storage.has(this.hashKeys(e))}delete(e){const t=this.hashKeys(e);return this.storage.delete(t)}},Object.defineProperty(lo,"__esModule",{value:!0});const yo=uo;class fo extends yo.EmitterMap{constructor(){super(...arguments),this.dispatchEvent=e=>{if(function(e){return"process-desktop-event"===e.action}(e)){const{payload:t}=e,n=function(e){const{topic:t}=e;if("frame"===t||"window"===t||"view"===t){const{uuid:n,name:i}=e;return[t,n,i]}if("application"===t){const{uuid:n}=e;return[t,n]}return[t]}(t);if(this.has(n))return this.getOrCreate(n).emit(t.type,t),!0}return!1}}}lo.default=fo;var go,mo,vo=s&&s.__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},Co=s&&s.__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)},bo=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(no,"__esModule",{value:!0});var Io=no.Transport=void 0;const Eo=t,xo=io,Ao=g,Po=bo(lo),Mo=ki,_o=ke;class Oo extends Eo.EventEmitter{constructor(e,t,n){super(),this.wireListeners=new Map,this.topicRefMap=new Map,this.eventAggregator=new Po.default,this.messageHandlers=[this.eventAggregator.dispatchEvent],go.set(this,void 0),mo.set(this,void 0),this.connectSync=()=>{Co(this,go,"f").connectSync()},this.getPort=()=>Co(this,go,"f").getPort(),vo(this,go,new e(this.onmessage.bind(this)),"f"),this.environment=t,this.sendRaw=Co(this,go,"f").send.bind(Co(this,go,"f")),this.registerMessageHandler(this.handleMessage.bind(this)),Co(this,go,"f").on("disconnected",(()=>{for(const[,{handleNack:e}]of this.wireListeners)e({reason:"Remote connection has closed"});this.wireListeners.clear(),this.emit("disconnected")}));const{uuid:i,name:r}=n,o=this.environment.getCurrentEntityType();this.me=(0,Mo.getBaseMe)(o,i,r)}getFin(){if(!Co(this,mo,"f"))throw new Error("No Fin object registered for this transport");return Co(this,mo,"f")}registerFin(e){if(Co(this,mo,"f"))throw new Error("Fin object has already been registered for this transport");vo(this,mo,e,"f")}shutdown(){return Co(this,go,"f").shutdown()}async connect(e){if((0,xo.isConfigWithReceiver)(e))return await Co(this,go,"f").connect(e.receiver),this.authorize(e);if((0,xo.isRemoteConfig)(e))return this.connectRemote(e);if((0,xo.isExistingConnectConfig)(e))return this.connectByPort(e);if((0,xo.isNewConnectConfig)(e)){const t=await this.environment.retrievePort(e);return this.connectByPort({...e,address:`ws://localhost:${t}`})}}async connectRemote(e){return await Co(this,go,"f").connect(new(this.environment.getWsConstructor())(e.address)),this.authorize(e)}async connectByPort(e){const{address:t,uuid:n}=e,i={...e,type:"file-token"},r=Co(this,go,"f");await r.connect(new(this.environment.getWsConstructor())(e.address));const o=await this.sendAction("request-external-authorization",{uuid:n,type:"file-token"},!0);if("external-authorization-response"!==o.action)throw new Ao.UnexpectedActionError(o.action);return await this.environment.writeToken(o.payload.file,o.payload.token),this.authorize(i)}async authorize(e){const t=await this.sendAction("request-authorization",e,!0);if("authorization-response"!==t.action)throw new Ao.UnexpectedActionError(t.action);if(!0!==t.payload.success)throw new Ao.RuntimeError(t.payload)}sendAction(e,t={},n=!1){let i=()=>{};const r=Ao.RuntimeError.getCallSite(1),o=this.environment.getNextMessageId(),s=new Promise(((s,a)=>{i=a;const c={action:e,payload:t,messageId:o},d=Co(this,go,"f");return this.addWireListener(o,s,(e=>this.nackHandler(e,a,r)),n),d.send(c).catch(a)}));return Object.assign(s,{cancel:i,messageId:o})}nackHandler(e,t,n){t("string"==typeof e?e:new Ao.RuntimeError(e,n))}ferryAction(e){return new Promise(((t,n)=>{const i=this.environment.getNextMessageId();e.messageId=i;const r=e=>{t(e.payload)};return Co(this,go,"f").send(e).then((()=>this.addWireListener(i,r,(e=>this.nackHandler(e,n)),!1))).catch(n)}))}registerMessageHandler(e){this.messageHandlers.push(e)}addWireListener(e,t,n,i){i?this.uncorrelatedListener=t:this.wireListeners.has(e)?n({reason:"Duplicate handler id",error:(0,_o.errorToPOJO)(new Ao.DuplicateCorrelationError(String(e)))}):this.wireListeners.set(e,{resolve:t,handleNack:n})}onmessage(e){for(const t of this.messageHandlers)t.call(null,e)}handleMessage(e){const t=e.correlationId||NaN;if("correlationId"in e){if(!this.wireListeners.has(t))return!1;{const{resolve:n,handleNack:i}=this.wireListeners.get(t);"ack"!==e.action?i({reason:"Did not receive ack action",error:(0,_o.errorToPOJO)(new Ao.NoAckError(e.action))}):"payload"in e?e.payload.success?n.call(null,e):i(e.payload):"string"==typeof e.reason?i(e):(console.warn("Received invalid response from core",e),i({reason:"invalid response shape"})),this.wireListeners.delete(t)}}else this.uncorrelatedListener&&this.uncorrelatedListener.call(null,e),this.uncorrelatedListener=()=>{};return!0}}Io=no.Transport=Oo,go=new WeakMap,mo=new WeakMap;const So=(...e)=>({log:(...t)=>console.debug(`[${(new Date).toISOString()}]`,...(e=>e.map((e=>`[${e}]`)))(e),...t),getLogger:(...t)=>So(...e,...t)}),Ro=So("@openfin/core-web/client");function Fo(e,t){if(!function(e){return"string"==typeof e}(e))throw new Error(`Property ${t} has invalid type. Expected string, got ${typeof e}.`)}const jo="web-broker-ports-ready",ko=Ro.getLogger("get-web-interop-ports");function Lo(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)}function To(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}"function"==typeof SuppressedError&&SuppressedError;const $o=e=>{var n,i,r;return r=class extends t.EventEmitter{constructor(t){super(),n.set(this,void 0),i.set(this,!1),this.connectSync=()=>{Lo(this,i,"f")||(e.addEventListener("message",(e=>{e.data?.topic?.startsWith("wire-message")&&e.data.message&&Lo(this,n,"f").call(this,{...JSON.parse(e.data.message),ports:e.ports})})),e.start())},this.connect=async()=>{this.connectSync()},this.send=t=>(e.postMessage({topic:"wire-message",message:JSON.stringify(t)}),Promise.resolve()),this.shutdown=async()=>{e.close()},To(this,n,t,"f")}getPort(){return e}},n=new WeakMap,i=new WeakMap,r};var Bo={},Go={};Object.defineProperty(Go,"__esModule",{value:!0}),Go.BaseEnvironment=void 0;const Wo=vr();Go.BaseEnvironment=class{async getViewWindowIdentity(e,t){const{identity:n}=await e.View.wrapSync(t).getCurrentWindow();return n}async getInteropInfo(e){const t=await e.Application.getCurrentSync().getInfo().catch((()=>null)),n=t?.initialOptions?.interopBrokerConfiguration??{};return{fdc3Version:t?(0,Wo.getDefaultViewFdc3VersionFromAppInfo)(t):void 0,...n,fdc3Info:{providerVersion:await e.System.getVersion(),provider:"OpenFin"}}}},Object.defineProperty(Bo,"__esModule",{value:!0});var Ho=Bo.BrowserEnvironment=void 0;const No=Go;class Do extends No.BaseEnvironment{constructor(){super(...arguments),this.type="other",this.getRandomId=()=>{const e=new Uint32Array(1);return window.crypto.getRandomValues(e)[0].toString(32)}}getAdapterVersionSync(){return""}observeBounds(e,t){throw new Error("Method not implemented.")}layoutAllowedInContext(e){return!1}initLayoutManager(e,t,n){throw new Error("Method not implemented.")}applyLayoutSnapshot(e,t,n){throw new Error("Method not implemented.")}createLayout(e,t){throw new Error("Method not implemented.")}destroyLayout(e,t){throw new Error("Method not implemented.")}resolveLayout(e,t){throw new Error("Method not implemented.")}initPlatform(...e){throw new Error("Method not implemented.")}writeToken(e,t){return Promise.resolve("")}retrievePort(e){throw new Error("Method not implemented.")}getNextMessageId(){return this.getRandomId()}createChildContent(e){throw new Error("Method not implemented.")}getWebWindow(e){throw new Error("Method not implemented.")}getCurrentEntityIdentity(){throw new Error("Method not implemented.")}getCurrentEntityType(){return"external connection"}raiseEvent(e,t){throw new Error("Method not implemented.")}getUrl(){return location.href}getDefaultChannelOptions(){return{create:{},connect:{}}}getRtcPeer(){return new RTCPeerConnection}getWsConstructor(){return WebSocket}whenReady(){return Promise.resolve()}}Ho=Bo.BrowserEnvironment=Do;const Uo=e=>"platform"in e&&void 0!==e.platform;var Vo,zo;class Ko extends Ho{constructor(e){super(),this.connectConfig=e,Vo.set(this,void 0),zo.set(this,new W((async()=>Promise.resolve().then((function(){return __webpack_require__(/*! ./main-b14f67c9.js */ "../../node_modules/@openfin/core-web/out/main-b14f67c9.js")}))))),Uo(e)&&this.validatePlatformOptions(e)}getAdapterVersionSync(){return"0.39.21"}validatePlatformOptions({platform:e}){if(!("layoutSnapshot"in e))throw new Error("Platform options are missing layoutSnapshot. Please provide a layoutSnapshot in the platform options.");if("windows"in e||"windows"in e.layoutSnapshot)throw new Error("It appears you tried to call connect() with a snapshot object from an OpenFin desktop environment. Note that connect() expects to be called with a platform property with this structure: { platform: { layoutSnapshot } }. To get a layoutSnapshot of the expected structure, use fin.Platform.Layout.getCurrentLayoutManagerSync().getLayoutSnapshot() in v34+ in your desktop environment.");const{layouts:t}=e.layoutSnapshot;Object.entries(t).map((([e,t])=>{if("object"!=typeof t||null===t)throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must be an object.`);if(!("content"in t))throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must contain a 'content' property.`)}))}async getInteropInfo(e){return{...{contextGroups:void 0,logging:{beforeAction:{enabled:!1},afterAction:{enabled:!1}}},fdc3Version:void 0,fdc3Info:{providerVersion:"0.39.21",provider:"OpenFin Web"}}}layoutAllowedInContext(e){return!0}async initLayoutManager(e,t,n){if(Lo(this,Vo,"f"))throw new Error("Layout already initialized.");if(!Uo(this.connectConfig))throw new Error("Platform options are missing from connection config.");const{WebLayoutEntryPoint:i}=await Lo(this,zo,"f").getValue();return To(this,Vo,new i(this.connectConfig),"f"),await Lo(this,Vo,"f").initLayoutManager(e,t,n)}async applyLayoutSnapshot(e,t,n){Lo(this,Vo,"f")?.applyLayoutSnapshot(e,t,n)}async createLayout(e,t){return Lo(this,Vo,"f")?.createLayout(e,t)}async destroyLayout(e,t){return Lo(this,Vo,"f")?.destroyLayout(e,t)}async getViewWindowIdentity(e,t){return Promise.resolve({uuid:t.uuid,name:t.uuid})}}Vo=new WeakMap,zo=new WeakMap;const qo=()=>{const e=((e,t)=>{const n=new RegExp(`^${t}<(?.*)>$`).exec(e)?.groups?.meta;if(n)try{return JSON.parse(atob(n))}catch(e){throw new Error(`Failed to decode JSON from ${n}.`)}})(window.name,"of-frame");if(e)try{const{name:t,uuid:n,brokerUrl:i,providerId:r,contextGroup:o}=e;return Fo(i,"brokerUrl"),Fo(n,"uuid"),Fo(t,"name"),{identity:{name:t,uuid:n},brokerUrl:i,interopConfig:{providerId:r,currentContextGroup:o}}}catch(e){throw new Error(`Unexpected error occurred when inferring platform information: ${e.stack}`)}},Jo=()=>{const e=r.v4();return{uuid:e,name:e}},Yo=async e=>{if("enabled"===e.connectionInheritance){const t=await(async e=>{const t=qo();if(t){const{validateOptions:n=(()=>!0)}=e,{identity:i,...r}=t;if(!await n(r))throw new Error("Parent options were rejected by validateOptions.");return t}})(e);if(t)return t}if(!e.options){const t="enabled"===e.connectionInheritance?"Broker URL was not specified nor provided by a platform container.":"Connection inheritance is disabled but no options were provided.";throw new Error(t)}return{...e.options,identity:Jo()}};exports.__classPrivateFieldGet=Lo,exports.__classPrivateFieldSet=To,exports.apiExposer=Gn,exports.commonjsGlobal=s,exports.connect=async t=>{try{Ro.log("Establishing connection",t);const{brokerUrl:n,identity:i,timeout:r,interopConfig:s}=await Yo(t),{workerPort:a,iframeBrokerPort:c}=await(async(e,t,n)=>{const{origin:i}=new URL(e),r=document.createElement("IFRAME");let s;r.style.display="none";try{return await new Promise(((a,c)=>{const d=e=>{if(e.source===r.contentWindow&&e.data?.topic===`ack-${jo}`){if(e.origin!==i)c(new Error(`Broker redirected to unexpected origin ${e.origin}, expected ${i}.`));else if(e.data.success){const[t,n]=e.ports;a({iframeBrokerPort:t,workerPort:n})}else c(new m(e.data));window.removeEventListener("message",d),clearTimeout(s)}};window.addEventListener("message",d),ko.log(`Connecting to broker ${e}`),r.setAttribute("src",e),r.setAttribute("name",o(t,"of-broker")),document.body.appendChild(r),ko.log("Iframe loaded, awaiting init message from iframe"),n&&(s=setTimeout((()=>{window.removeEventListener("message",d),document.body.removeChild(r),c(new Error("Worker did not initialize in time"))}),n))}))}catch(e){throw new Error(`Failed to initialise Fin Web Client. ${e.message}`,{cause:e})}})(n,i,r);Ro.log("Successfully established connection to shared worker");const d={entityType:"external connection",...i};a.start(),c.start();const h=((t,n,i)=>{const r=$o(n),o=new Ko(t),s=new Io(r,o,i);return s.connectSync(),window.Buffer=e.Buffer,new Wr(s)})(t,a,d);return s?.providerId&&(h.me.interop=h.Interop.connectSync(s.providerId),s?.currentContextGroup&&h.me.interop.joinContextGroup(s.currentContextGroup).catch((e=>{console.warn(`Error joining specified context group: ${s?.currentContextGroup}, continuing`,e)}))),{...h,me:{...h.me,identity:{uuid:h.me.uuid,name:h.me.name}}}}catch(e){throw new Error(`An error occured during web-interop connection: ${e.message}`)}},exports.decorators=Nn,exports.encodeOptions=o,exports.layout_constants=ai,exports.lazy=G; /***/ }), -/***/ "./node_modules/@openfin/core-web/out/main-b14f67c9.js": -/*!*************************************************************!*\ - !*** ./node_modules/@openfin/core-web/out/main-b14f67c9.js ***! - \*************************************************************/ +/***/ "../../node_modules/@openfin/core-web/out/main-b14f67c9.js": +/*!*****************************************************************!*\ + !*** ../../node_modules/@openfin/core-web/out/main-b14f67c9.js ***! + \*****************************************************************/ /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; -var t=__webpack_require__(/*! ./main-8cad4070.js */ "./node_modules/@openfin/core-web/out/main-8cad4070.js"),e=__webpack_require__(/*! uuid */ "../../node_modules/uuid/dist/esm-browser/index.js");__webpack_require__(/*! buffer/ */ "../../node_modules/buffer/index.js"),__webpack_require__(/*! events */ "../../node_modules/events/events.js"),__webpack_require__(/*! lodash/cloneDeep */ "../../node_modules/lodash/cloneDeep.js"),__webpack_require__(/*! lodash/isEqual */ "../../node_modules/lodash/isEqual.js");var i={},n={};Object.defineProperty(n,"__esModule",{value:!0}),n.mapValuesAsync=n.mapEntriesAsync=void 0;const o=(t,[e,i])=>({...t,[e]:i});async function s(t,e){return(await Promise.all(e.map((async([e,i])=>[e,await t(i,e)])))).reduce(o,{})}n.mapEntriesAsync=s,n.mapValuesAsync=async function(t,e){let i;return i=e instanceof Map?[...e.entries()]:Object.entries(e),s(t,i)};var r,a,l,h,d=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldSet||function(t,e,i,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(t,i):o?o.value=i:e.set(t,i),i},c=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldGet||function(t,e,i,n){if("a"===i&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?n:"a"===i?n.call(t):n?n.value:e.get(t)};Object.defineProperty(i,"__esModule",{value:!0});var m=i.DefaultLayoutManager=void 0;const u=n;class p{constructor(t){a.set(this,void 0),l.set(this,new Map),d(this,a,t,"f")}size(){return c(this,l,"f").size}async applyLayoutSnapshot({layouts:t}){if(Object.keys(t).length>1)throw new Error("[LayoutManager] Tried to call applyLayoutSnapshot with more than 1 layout. When implementing multiple layouts via overridden LayoutManager class, you must override and fully implement the applyLayoutSnapshot method without calling super.applyLayoutSnapshot().");const[[e,i]]=Object.entries(t);await p.createLayout(this,{layoutName:e,layout:i})}async showLayout({layoutName:t}){}async getLayoutSnapshot(){return{layouts:await(0,u.mapValuesAsync)((t=>t.getFrameSnapshot()),c(this,l,"f"))}}async removeLayout({layoutName:t}){}getLayoutIdentityForView(t){const e=[...c(this,l,"f").values()].find((e=>e.getCurrentViews().some((e=>e.name===t.name&&e.uuid===t.uuid))));return e?.identity??void 0}isLayoutVisible({layoutName:t}){return c(p,r,"m",h).call(p,this,t).isVisible()}resolveLayoutIdentity(t){if(t&&"layoutName"in t)return t;const e=[...c(this,l,"f").values()];if(1===e.length)return e[0].identity;const i=e.find((t=>t.isVisible()));return i?.identity??void 0}static async resolveLayout(t,e){const i=t.resolveLayoutIdentity(e);if(void 0===i||!("layoutName"in i))throw new Error("[layout-manager] resolveLayout: Could not resolve the layout identity. Make sure you include 'layoutName' in the identity object.");return c(p,r,"m",h).call(p,t,i.layoutName)}static async handleSharedView(t,e,i){await(0,u.mapValuesAsync)((async t=>{if(t.identity.layoutName!==e.layoutName){const e=t.getCurrentViews().find((t=>t.name===i.name));e&&await t.onViewDetached({viewIdentity:e,target:null}).catch(console.error)}}),c(t,l,"f"))}static async handleLastViewRemoved(t,e){await t.removeLayout(e),await c(t,a,"f").handleLastViewRemoved(t)}static async destroyLayout(t,{layoutName:e}){await c(p,r,"m",h).call(p,t,e).destroy(),c(t,l,"f").delete(e)}static async createLayout(t,e){const{layoutName:i}=e;if(c(t,l,"f").has(i))throw new Error(`Layout name ${i} already exists`);await c(t,a,"f").createLayout(e,t)}static registerLayout(t,e,i){c(t,l,"f").set(e,i)}static getAllLayouts(t){return[...c(t,l,"f").values()]}static setInitialSnapshot(t,e){c(t,a,"f").setInitialSnapshot(e)}static createClosedConstructor(...t){return class extends p{constructor(){super(...t)}}}}m=i.DefaultLayoutManager=p,r=p,a=new WeakMap,l=new WeakMap,h=function(t,e){const i=c(t,l,"f").get(e);if(!i)throw new Error(`[layout-manager] getLayoutByName: Could not locate layout with name '${e}'`);return i};var g={},f={},v={};Object.defineProperty(v,"__esModule",{value:!0}),v.ReversibleMap=void 0;v.ReversibleMap=class{constructor(){this.valueToKey=new Map,this.keyToValue=new Map,this.setUnique=(t,e)=>{if(this.hasKey(t)||this.hasValue(e))throw new Error("Key or value already in the map.");this.keyToValue.set(t,e),this.valueToKey.set(e,t)},this.getKey=t=>{const e=this.valueToKey.get(t);if(!e)throw new Error("Value not found in the map.");return e},this.deleteKey=t=>{const e=this.getValue(t);return this.keyToValue.delete(t),this.valueToKey.delete(e),e},this.deleteValue=t=>{const e=this.getKey(t);return this.keyToValue.delete(e),this.valueToKey.delete(t),e},this.hasKey=t=>this.keyToValue.has(t),this.hasValue=t=>this.valueToKey.has(t)}getValue(t){const e=this.keyToValue.get(t);if(!e)throw new Error("Key not found in the map.");return e}},Object.defineProperty(f,"__esModule",{value:!0});var _=f.LayoutContentCache=void 0;const y=t.lazy,C=v;class w{constructor(){this.contentItemCache=new C.ReversibleMap,this.contentItemCacheId=0,this.createCacheKey=()=>{const t=`entity-${this.contentItemCacheId.toString()}`;return this.contentItemCacheId+=1,t},this.hasKey=t=>this.contentItemCache.hasKey(t),this.getItemOrUndefined=t=>{try{return this.getContentItemOrThrow(t)}catch(t){return}},this.getContentItemOrThrow=(t,e)=>{if(!this.contentItemCache.hasKey(t))throw new Error("Layout component has been destroyed or detached from the current layout.");const i=this.contentItemCache.getValue(t);if(e&&!e.includes(i.type))throw new Error(`Layout item is not the expected type. Expected ${e.join(", ")}, got ${i.type}.`);return i},this.getOrCreateEntityId=t=>{if(this.contentItemCache.hasValue(t))return this.contentItemCache.getKey(t);t.onDestroyed((()=>{this.contentItemCache.deleteValue(t)}));const e=this.createCacheKey();return this.contentItemCache.setUnique(e,t),e}}static getSingleInstance(){return w.singleton.getValue()}}_=f.LayoutContentCache=w,w.singleton=new y.Lazy((()=>new w));var I={},b={};!function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.getAdjacentStacks=t.doShareEdge=t.getAdjacentItem=void 0;t.getAdjacentItem=(e,i)=>{const{parent:n}=e;if(e.isRoot()||!n)return;const o=["top","bottom"].includes(i)?"column":"row",s=["top","left"].includes(i)?-1:1;if(n.type===o){const t=n.contentItems.indexOf(e)+s;if(t>=0&&t{const n=t.getBounds(),o=e.getBounds();if(!n||!o)return!1;if(["top","bottom"].includes(i)){return!(n.righto.right)}return!(n.bottomo.bottom)};t.getAdjacentStacks=(e,i)=>{const n=["top","bottom"].includes(i)?"row":"column",o=s=>"stack"===s.type?(0,t.doShareEdge)(e,s,i)?[s]:[]:"root"===s.type||"ground"===s.type?[]:s.type===n?s.contentItems.map((t=>o(t))).flat():s.type!==n?["top","right"].includes(i)?o(s.contentItems[s.contentItems.length-1]):o(s.contentItems[0]):[],s=(0,t.getAdjacentItem)(e,i);return s?o(s):[]}}(b);var S=t.commonjsGlobal&&t.commonjsGlobal.__decorate||function(t,e,i,n){var o,s=arguments.length,r=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(s<3?o(r):s>3?o(e,i,r):o(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};Object.defineProperty(I,"__esModule",{value:!0}),I.LayoutEntitiesController=void 0;const E=t.decorators,x=b,L=i;class z{constructor(t,e,i){this.wire=t,this.layoutManager=e,this.layoutContentCache=i,this.analytics=t=>{this.wire.sendAction(`layout-controller-${t}`).catch((()=>{}))},this.getLayoutIdentityForViewOrThrow=async t=>{const e=this.layoutManager.getLayoutIdentityForView(t);if(!e)throw new Error(`View identity ${t.name} is not attached to any layouts.`);return e},this.getRoot=async t=>{this.analytics("get-root");const e=(await this.getLayout(t)).getRoot();return{type:e.type,entityId:this.layoutContentCache.getOrCreateEntityId(e)}},this.getStackByView=async t=>{this.analytics("get-stack-by-view");const e=await this.getLayoutIdentityForViewOrThrow(t),i=(await this.getLayout(e)).getStackByView(t);if("stack"===i?.type)return{entityId:this.layoutContentCache.getOrCreateEntityId(i),type:"stack"}},this.getStackViews=t=>{this.analytics("get-stack-views");return this.layoutContentCache.getContentItemOrThrow(t,["stack"]).contentItems.map((t=>({name:t.viewName,uuid:this.wire.me.uuid})))},this.isRoot=t=>{this.analytics("is-root");return this.layoutContentCache.getContentItemOrThrow(t).isRoot()},this.exists=t=>(this.analytics("exists"),this.layoutContentCache.hasKey(t)),this.addViewToStack=async(t,e,{index:i}={index:0})=>{this.analytics("add-view-to-stack");const n=this.layoutContentCache.getContentItemOrThrow(t);if(i&&i>n.contentItems.length+1)throw new Error(`Index '${i}' out of range, please exclude the index or specify a number between 0 and ${n.contentItems.length}`);const o={id:t,index:i},{identity:s}=await n.layout.platformCreateView(e,{location:o});return s},this.findViewInStack=(t,e)=>t.contentItems.find((t=>t.viewName===e.name)),this.removeViewFromStack=async(t,e)=>{this.analytics("remove-view-from-stack");const i=this.layoutContentCache.getContentItemOrThrow(t,["stack"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to remove a view ('${e.name}') which does not belong to the stack.`);await n.layout.platformCloseView(e)},this.createAdjacentStack=async(t,e,{position:i="right"}={})=>{if(this.analytics("create-adjacent-stack"),!Array.isArray(e)||0===e.length)throw new Error('The parameter "views" must be an array with at least 1 element.');if(!["top","bottom","left","right"].includes(i))throw new Error(`Invalid position '${i}' specified.`);const n=this.layoutContentCache.getContentItemOrThrow(t).createAdjacentStack({position:i}),o=this.layoutContentCache.getOrCreateEntityId(n);return await Promise.all(e.reverse().map((t=>this.addViewToStack(o,t)))),o},this.getAdjacentStacks=async({targetId:t,edge:e})=>{this.analytics("get-adjacent-stacks");const i=this.layoutContentCache.getContentItemOrThrow(t);return(0,x.getAdjacentStacks)(i,e).map((t=>({entityId:this.layoutContentCache.getOrCreateEntityId(t)})))},this.setStackActiveView=async(t,e)=>{this.analytics("set-stack-active-view");const i=this.layoutContentCache.getContentItemOrThrow(t,["stack"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to set a view ('${e.name}') as active when it does not belong to the stack.`);i.setActiveContentItem(n,!0)}}async getLayout(t){const e=await L.DefaultLayoutManager.resolveLayout(this.layoutManager,t);if(!e)throw new Error(`Could not resolve target layout identity ${JSON.stringify(t)}`);return e}getContent(t){this.analytics("get-content");return this.layoutContentCache.getContentItemOrThrow(t,["column","row"]).contentItems.map((t=>({type:t.type,entityId:this.layoutContentCache.getOrCreateEntityId(t)})))}getParent(t){this.analytics("get-parent");const e=this.layoutContentCache.getContentItemOrThrow(t);if(!e.isRoot())return e.parent?.contentItems.includes(e)?{type:e.parent.type,entityId:this.layoutContentCache.getOrCreateEntityId(e.parent)}:void 0}}S([(0,E.expose)()],z.prototype,"getLayoutIdentityForViewOrThrow",void 0),S([(0,E.expose)()],z.prototype,"getRoot",void 0),S([(0,E.expose)()],z.prototype,"getStackByView",void 0),S([(0,E.expose)()],z.prototype,"getStackViews",void 0),S([(0,E.expose)()],z.prototype,"getContent",null),S([(0,E.expose)()],z.prototype,"getParent",null),S([(0,E.expose)()],z.prototype,"isRoot",void 0),S([(0,E.expose)()],z.prototype,"exists",void 0),S([(0,E.expose)()],z.prototype,"addViewToStack",void 0),S([(0,E.expose)()],z.prototype,"removeViewFromStack",void 0),S([(0,E.expose)()],z.prototype,"createAdjacentStack",void 0),S([(0,E.expose)()],z.prototype,"getAdjacentStacks",void 0),S([(0,E.expose)()],z.prototype,"setStackActiveView",void 0),I.LayoutEntitiesController=z,Object.defineProperty(g,"__esModule",{value:!0});var M=g.initLayoutEndpoints=void 0;const P=t.apiExposer,T=t.layout_constants,A=f,k=I,D=i;M=g.initLayoutEndpoints=async function(t,e){const i=t.getFin(),n=await i.Platform.getCurrentSync().getClient(),o=new P.ChannelsExposer(n);await new P.ApiExposer(o).exposeInstance(new k.LayoutEntitiesController(t,e,A.LayoutContentCache.getSingleInstance()),{id:T.LAYOUT_CONTROLLER_ID}),await async function(t,e){const i=t=>async i=>{const n=await D.DefaultLayoutManager.resolveLayout(e,i.target);if(!n)throw new Error(`Could not resolve the layout target from payload ${JSON.stringify(i)}`);return t(n,i)},n=(e,n)=>{t.register(e,i(n))},o=(t,e)=>{n(t,e)};n("replace-view",((t,e)=>t.replaceView(e))),n("replace-layout",((t,{layout:e})=>t.replaceLayout(e))),n("add-view",((t,e)=>t.insertView(e))),o("layout-add-view",((t,{viewOptions:e,location:i,targetView:n})=>t.platformCreateView(e,{location:i,targetView:n}))),n("close-view",((t,e)=>t.cleanupView(e.viewIdentity))),o("layout-close-view",((t,e)=>t.platformCloseView(e.viewIdentity))),n("apply-preset-layout",((t,e)=>t.applyPreset(e))),n("get-layout-views",(t=>t.getCurrentViews())),n("get-frame-snapshot",(t=>t.getFrameSnapshot())),n("is-visible",(t=>t.isVisible())),n("destroy",(t=>t.destroy())),t.register("get-layout-snapshot",(()=>e.getLayoutSnapshot()))}(n,e)};var R={};Object.defineProperty(R,"__esModule",{value:!0});var U=R.BaseLayout=void 0;U=R.BaseLayout=class{};var O={};Object.defineProperty(O,"__esModule",{value:!0});var V=O.DOMEmitter=void 0;V=O.DOMEmitter=class{constructor(t){this.container=t}dispatchLocalEvent(t,e){const i={...e,type:t,tabSelector:`tab-${e.name}`,containerSelector:`container-${e.name}`,topic:"openfin-DOM-event"};this.container.dispatchEvent(new CustomEvent(t,{detail:i}))}};var B={};Object.defineProperty(B,"__esModule",{value:!0});var H=B.mapLayoutContentItemsImmutableSync=B.mapLayoutContentItemsImmutable=W=B.isVisible=void 0;var W=B.isVisible=t=>(0!==t.offsetWidth||0!==t.offsetHeight)&&"hidden"!==window.getComputedStyle(t).visibility&&t.offsetTop>=0&&t.offsetLeft>=0&&t.offsetTop<=window.innerHeight&&t.offsetLeft<=window.innerWidth;const F=t=>"type"in t&&"component"===t.type;B.mapLayoutContentItemsImmutable=async function t(e,i){return F(i)?e(i):{...i,content:await Promise.all(i.content?.map((i=>t(e,i))))}},H=B.mapLayoutContentItemsImmutableSync=function t(e,i){return F(i)?e(i):{...i,content:i.content?.map((i=>t(e,i)))}};class N extends Error{constructor(t,e){super(e),this.type=t}}class G extends N{constructor(t,e){super("Configuration",t),this.node=e}}class j extends N{constructor(t){super("PopoutBlocked",t)}}class $ extends N{constructor(t){super("API",t)}}class Z extends N{constructor(t){super("Bind",t)}}class q extends Error{constructor(t,e,i){super(`${t}: ${e}${void 0===i?"":": "+i}`)}}class X extends q{constructor(t,e){super("Assert",t,e)}}class Y extends q{constructor(t,e,i){super("UnreachableCase",t,`${e}${void 0===i?"":": "+i}`)}}class K extends q{constructor(t,e){super("UnexpectedNull",t,e)}}class J extends q{constructor(t,e){super("UnexpectedUndefined",t,e)}}var Q;!function(t){let e=!1;const i={PopoutCannotBeCreatedWithGroundItemConfig:{id:0,default:"Popout cannot be created with ground ItemConfig"},PleaseRegisterAConstructorFunction:{id:1,default:"Please register a constructor function"},ComponentTypeNotRegisteredAndBindComponentEventHandlerNotAssigned:{id:2,default:"Component type not registered and BindComponentEvent handler not assigned"},ComponentIsAlreadyRegistered:{id:3,default:"Component is already registered"},ComponentIsNotVirtuable:{id:4,default:"Component is not virtuable. Requires rootHtmlElement field/getter"},VirtualComponentDoesNotHaveRootHtmlElement:{id:5,default:'Virtual component does not have getter "rootHtmlElement"'},ItemConfigIsNotTypeComponent:{id:6,default:"ItemConfig is not of type component"},InvalidNumberPartInSizeString:{id:7,default:"Invalid number part in size string"},UnknownUnitInSizeString:{id:8,default:"Unknown unit in size string"},UnsupportedUnitInSizeString:{id:9,default:"Unsupported unit in size string"}};t.idCount=Object.keys(i).length;const n=Object.values(i);t.checkInitialise=function(){if(!e)for(let e=0;e="0"&&t<="9"}function Tt(t,e){const i=zt(e);t.style.width=i}function At(t,e){const i=zt(e);t.style.height=i}function kt(t){return{width:t.offsetWidth,height:t.offsetHeight}}function Dt(t,e){t.style.display=e?"":"none"}function Rt(t,e){if(void 0!==e)for(const i in e)if(e.hasOwnProperty(i)){const n=e[i],o=t[i];t[i]=Ut(o,n)}return t}function Ut(t,e){if("object"!=typeof e)return e;if(Array.isArray(e)){const t=e.length,i=new Array(t);for(let n=0;n36)throw new Error("Too many keys in config minifier map")},t.translateObject=n}(dt||(dt={})),function(t){t.defaults={type:at.ground,content:[],size:1,sizeUnit:ht.Fractional,minSize:void 0,minSizeUnit:ht.Pixel,id:"",isClosable:!0},t.createCopy=function(t,e){switch(t.type){case at.ground:case at.row:case at.column:return gt.createCopy(t,e);case at.stack:return ut.createCopy(t,e);case at.component:return pt.createCopy(t);default:throw new Y("CICC91354",t.type,"Invalid Config Item type specified")}},t.createDefault=function(t){switch(t){case at.ground:throw new X("CICCDR91562");case at.row:case at.column:return gt.createDefault(t);case at.stack:return ut.createDefault();case at.component:return pt.createDefault();default:throw new Y("CICCDD91563",t,"Invalid Config Item type specified")}},t.isComponentItem=function(t){return t.type===at.component},t.isStackItem=function(t){return t.type===at.stack},t.isGroundItem=function(t){return t.type===at.ground}}(ct||(ct={})),function(t){t.defaultMaximised=!1,function(t){t.createCopy=function(t,e){return void 0===t?void 0:{show:null!=e?e:t.show,popout:t.popout,close:t.close,maximise:t.maximise,minimise:t.minimise,tabDropdown:t.tabDropdown}}}(t.Header||(t.Header={}))}(mt||(mt={})),function(t){function e(t){const e=t.length,i=new Array(e);for(let n=0;n"__glMaximised"===t));t>0&&(o=!0,n=n.splice(t,1)),e=n.length>0?n[0]:ct.defaults.id}else e=n;return i=void 0!==t.maximised?t.maximised:o,{id:e,maximised:i}}}(wt||(wt={})),function(t){function e(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0;return{resolved:!0,root:Et.resolve(i),openPopouts:t.resolveOpenPopouts(e.openPopouts),dimensions:t.Dimensions.resolve(e.dimensions),settings:t.Settings.resolve(e.settings),header:t.Header.resolve(e.header,e.settings,e.labels)}}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:Lt.fromResolvedArray(e.openPopouts),settings:_t.Settings.createCopy(e.settings),dimensions:t.Dimensions.fromResolved(e.dimensions),header:_t.Header.createCopy(e.header)}},t.isResolved=function(t){const e=t;return void 0!==e.resolved&&!0===e.resolved},t.resolveOpenPopouts=function(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0,{root:Et.resolve(o),openPopouts:xt.resolveOpenPopouts(e.openPopouts),dimensions:xt.Dimensions.resolve(e.dimensions),settings:xt.Settings.resolve(e.settings),header:xt.Header.resolve(e.header,e.settings,e.labels),parentId:null!==(i=e.parentId)&&void 0!==i?i:null,indexInParent:null!==(n=e.indexInParent)&&void 0!==n?n:null,window:t.Window.resolve(e.window,e.dimensions),resolved:!0}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:i(e.openPopouts),dimensions:xt.Dimensions.fromResolved(e.dimensions),settings:_t.Settings.createCopy(e.settings),header:_t.Header.createCopy(e.header),parentId:e.parentId,indexInParent:e.indexInParent,window:t.Window.fromResolved(e.window)}},t.fromResolvedArray=i}(Lt||(Lt={}));class Wt{constructor(){this._allEventSubscriptions=[],this._subscriptionsMap=new Map,this.unbind=this.removeEventListener,this.trigger=this.emit}tryBubbleEvent(t,e){}emit(t,...e){let i=this._subscriptionsMap.get(t);if(void 0!==i){i=i.slice();for(let t=0;t0){const n=e.slice();n.unshift(t);const o=this._allEventSubscriptions.slice();for(let t=0;t0?n.contentItems[0]:n,e=0);const o=this._layoutManager.createAndInitContentItem(i,t);t.addChild(o,e),this._layoutManager.layoutConfig.settings.popInOnClose?this._onClose():this.close()}createWindow(){const t=this.createUrl(),e=Math.floor(1e6*Math.random()).toString(36),i=this.serializeWindowFeatures({width:this._initialWindowSize.width,height:this._initialWindowSize.height,innerWidth:this._initialWindowSize.width,innerHeight:this._initialWindowSize.height,menubar:"no",toolbar:"no",location:"no",personalbar:"no",resizable:"yes",scrollbars:"no",status:"no"});if(this._popoutWindow=globalThis.open(t,e,i),this._popoutWindow)this._popoutWindow.addEventListener("load",(()=>this.positionWindow()),{passive:!0}),this._popoutWindow.addEventListener("beforeunload",(()=>{this._layoutManager.layoutConfig.settings.popInOnClose?this.popIn():this._onClose()}),{passive:!0}),this._checkReadyInterval=setInterval((()=>this.checkReady()),10);else if(!0===this._layoutManager.layoutConfig.settings.blockedPopoutsThrowError){throw new j("Popout blocked")}}checkReady(){if(null===this._popoutWindow)throw new K("BPCR01844");this._popoutWindow.__glInstance&&this._popoutWindow.__glInstance.isInitialised&&(this.onInitialised(),void 0!==this._checkReadyInterval&&(clearInterval(this._checkReadyInterval),this._checkReadyInterval=void 0))}serializeWindowFeatures(t){const e=[];for(const i in t)e.push(i+"="+t[i].toString());return e.join(",")}createUrl(){const t="gl-window-config-"+Ot(),e=_t.minifyConfig(this._config);try{localStorage.setItem(t,JSON.stringify(e))}catch(t){throw new Error("Error while writing to localStorage "+function(t){return t instanceof Error?t.message:"string"==typeof t?t:"Unknown Error"}(t))}const i=new URL(location.href);return i.searchParams.set("gl-window",t),i.toString()}positionWindow(){if(null===this._popoutWindow)throw new Error("BrowserPopout.positionWindow: null popoutWindow");this._popoutWindow.moveTo(this._initialWindowSize.left,this._initialWindowSize.top),this._popoutWindow.focus()}onInitialised(){this._isInitialised=!0,this.getGlInstance().on("popIn",(()=>this.popIn())),this.emit("initialised")}_onClose(){setTimeout((()=>this.emit("closed")),50)}}class Gt extends Wt{constructor(t,e,i,n){super(),this.layoutManager=t,this._parent=i,this._element=n,this._popInParentIds=[],this._type=e.type,this._id=e.id,this._isInitialised=!1,this.isGround=!1,this.isRow=!1,this.isColumn=!1,this.isStack=!1,this.isComponent=!1,this.size=e.size,this.sizeUnit=e.sizeUnit,this.minSize=e.minSize,this.minSizeUnit=e.minSizeUnit,this._isClosable=e.isClosable,this._pendingEventPropagations={},this._throttledEvents=["stateChanged"],this._contentItems=this.createContentItems(e.content)}get type(){return this._type}get id(){return this._id}set id(t){this._id=t}get popInParentIds(){return this._popInParentIds}get parent(){return this._parent}get contentItems(){return this._contentItems}get isClosable(){return this._isClosable}get element(){return this._element}get isInitialised(){return this._isInitialised}static isStack(t){return t.isStack}static isComponentItem(t){return t.isComponent}static isComponentParentableItem(t){return t.isStack||t.isGround}removeChild(t,e=!1){const i=this._contentItems.indexOf(t);if(-1===i)throw new Error("Can't remove child item. Unknown content item");if(e||this._contentItems[i].destroy(),this._contentItems.splice(i,1),this._contentItems.length>0)this.updateSize(!1);else if(!this.isGround&&!0===this._isClosable){if(null===this._parent)throw new K("CIUC00874");this._parent.removeChild(this)}}addChild(t,e,i){return null!=e||(e=this._contentItems.length),this._contentItems.splice(e,0,t),t.setParent(this),!0===this._isInitialised&&!1===t._isInitialised&&t.init(),e}replaceChild(t,e,i=!1){const n=this._contentItems.indexOf(t),o=t._element.parentNode;if(-1===n)throw new X("CIRCI23232","Can't replace child. oldChild is not child of this");if(null===o)throw new K("CIRCP23232");if(o.replaceChild(e._element,t._element),!0===i&&(t._parent=null,t.destroy()),this._contentItems[n]=e,e.setParent(this),e.size=t.size,e.sizeUnit=t.sizeUnit,e.minSize=t.minSize,e.minSizeUnit=t.minSizeUnit,null===e._parent)throw new K("CIRCNC45699");!0===e._parent._isInitialised&&!1===e._isInitialised&&e.init(),this.updateSize(!1)}remove(){if(null===this._parent)throw new K("CIR11110");this._parent.removeChild(this)}popout(){const t=Ot(),e=this.layoutManager.createPopoutFromContentItem(this,void 0,t,void 0);return this.emitBaseBubblingEvent("stateChanged"),e}calculateConfigContent(){const t=this._contentItems,e=t.length,i=new Array(e);for(let n=0;nthis.propagateEventToLayoutManager(t,e))))}propagateEventToLayoutManager(t,e){this._pendingEventPropagations[t]=!1,this.layoutManager.emitUnknown(t,e)}}class jt extends Gt{constructor(t,e,i){super(t,e,i,document.createElement("div")),this._parentItem=i,this._focused=!1,this.isComponent=!0,this._reorderEnabled=e.reorderEnabled,this.applyUpdatableConfig(e),this._initialWantMaximise=e.maximised;const n=document.createElement("div");n.classList.add("lm_content"),this.element.appendChild(n),this._container=new Ft(e,this,t,n,(t=>this.handleUpdateItemConfigEvent(t)),(()=>this.show()),(()=>this.hide()),(t=>this.focus(t)),(t=>this.blur(t)))}get componentName(){return this._container.componentType}get componentType(){return this._container.componentType}get reorderEnabled(){return this._reorderEnabled}get initialWantMaximise(){return this._initialWantMaximise}get component(){return this._container.component}get container(){return this._container}get parentItem(){return this._parentItem}get headerConfig(){return this._headerConfig}get title(){return this._title}get tab(){return this._tab}get focused(){return this._focused}destroy(){this._container.destroy(),super.destroy()}applyUpdatableConfig(t){this.setTitle(t.title),this._headerConfig=t.header}toConfig(){const t=this._container.stateRequestEvent,e=void 0===t?this._container.state:t();return{type:at.component,content:[],size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,maximised:!1,isClosable:this.isClosable,reorderEnabled:this._reorderEnabled,title:this._title,header:mt.Header.createCopy(this._headerConfig),componentType:pt.copyComponentType(this.componentType),componentState:e}}close(){if(null===this.parent)throw new K("CIC68883");this.parent.removeChild(this,!1)}enterDragMode(t,e){Tt(this.element,t),At(this.element,e),this._container.enterDragMode(t,e)}exitDragMode(){this._container.exitDragMode()}enterStackMaximised(){this._container.enterStackMaximised()}exitStackMaximised(){this._container.exitStackMaximised()}drag(){this._container.drag()}updateSize(t){this.updateNodeSize(t)}init(){this.updateNodeSize(!1),super.init(),this._container.emit("open"),this.initContentItems()}setTitle(t){this._title=t,this.emit("titleChanged",t),this.emit("stateChanged")}setTab(t){this._tab=t,this.emit("tab",t),this._container.setTab(t)}hide(){super.hide(),this._container.setVisibility(!1)}show(){super.show(),this._container.setVisibility(!0)}focus(t=!1){this.parentItem.setActiveComponentItem(this,!0,t)}setFocused(t){this._focused=!0,this.tab.setFocused(),t||this.emitBaseBubblingEvent("focus")}blur(t=!1){this._focused&&this.layoutManager.setFocusedComponentItem(void 0,t)}setBlurred(t){this._focused=!1,this.tab.setBlurred(),t||this.emitBaseBubblingEvent("blur")}setParent(t){this._parentItem=t,super.setParent(t)}handleUpdateItemConfigEvent(t){this.applyUpdatableConfig(t)}updateNodeSize(t){if("none"!==this.element.style.display){const{width:e,height:i}=kt(this.element);this._container.setSizeToNodeSize(e,i,t)}}}class $t extends Gt{constructor(){super(...arguments),this._focused=!1}get focused(){return this._focused}setFocusedValue(t){this._focused=t}}class Zt extends Wt{constructor(t,e){super(),this._eElement=t,this._pointerTracking=!1,this._pointerDownEventListener=t=>this.onPointerDown(t),this._pointerMoveEventListener=t=>this.onPointerMove(t),this._pointerUpEventListener=t=>this.onPointerUp(t),this._timeout=void 0,this._allowableTargets=[t,...e],this._oDocument=document,this._eBody=document.body,this._nDelay=1800,this._nDistance=10,this._nX=0,this._nY=0,this._nOriginalX=0,this._nOriginalY=0,this._dragging=!1,this._eElement.addEventListener("pointerdown",this._pointerDownEventListener,{passive:!0})}destroy(){this.checkRemovePointerTrackingEventListeners(),this._eElement.removeEventListener("pointerdown",this._pointerDownEventListener)}cancelDrag(){this.processDragStop(void 0)}onPointerDown(t){if(this._allowableTargets.includes(t.target)&&t.isPrimary){const e=this.getPointerCoordinates(t);this.processPointerDown(e)}}processPointerDown(t){this._nOriginalX=t.x,this._nOriginalY=t.y,this._oDocument.addEventListener("pointermove",this._pointerMoveEventListener),this._oDocument.addEventListener("pointerup",this._pointerUpEventListener,{passive:!0}),this._pointerTracking=!0,this._timeout=setTimeout((()=>{try{this.startDrag()}catch(t){throw console.error(t),t}}),this._nDelay)}onPointerMove(t){this._pointerTracking&&(this.processDragMove(t),t.preventDefault())}processDragMove(t){this._nX=t.pageX-this._nOriginalX,this._nY=t.pageY-this._nOriginalY,!1===this._dragging&&(Math.abs(this._nX)>this._nDistance||Math.abs(this._nY)>this._nDistance)&&this.startDrag(),this._dragging&&this.emit("drag",this._nX,this._nY,t)}onPointerUp(t){this.processDragStop(t)}processDragStop(t){var e;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this.checkRemovePointerTrackingEventListeners(),!0===this._dragging&&(this._eBody.classList.remove("lm_dragging"),this._eElement.classList.remove("lm_dragging"),null===(e=this._oDocument.querySelector("iframe"))||void 0===e||e.style.setProperty("pointer-events",""),this._dragging=!1,this.emit("dragStop",t))}checkRemovePointerTrackingEventListeners(){this._pointerTracking&&(this._oDocument.removeEventListener("pointermove",this._pointerMoveEventListener),this._oDocument.removeEventListener("pointerup",this._pointerUpEventListener),this._pointerTracking=!1)}startDrag(){var t;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this._dragging=!0,this._eBody.classList.add("lm_dragging"),this._eElement.classList.add("lm_dragging"),null===(t=this._oDocument.querySelector("iframe"))||void 0===t||t.style.setProperty("pointer-events","none"),this.emit("dragStart",this._nOriginalX,this._nOriginalY)}getPointerCoordinates(t){return{x:t.pageX,y:t.pageY}}}class qt{constructor(t,e,i){this._isVertical=t,this._size=e,this._grabSize=i0){const i=this.createSplitter(Math.max(0,e-1)).element;e>0?(this.contentItems[e-1].element.insertAdjacentElement("afterend",i),i.insertAdjacentElement("afterend",t.element)):(this.contentItems[0].element.insertAdjacentElement("beforebegin",i),i.insertAdjacentElement("beforebegin",t.element))}else this._childElementContainer.appendChild(t.element);super.addChild(t,e);const n=1/this.contentItems.length*100;if(!0===i)return this.emitBaseBubblingEvent("stateChanged"),e;for(let e=0;e0&&(this.calculateRelativeSizes(),this.setAbsoluteSizes()),this.emitBaseBubblingEvent("stateChanged"),this.emit("resize")}setAbsoluteSizes(){const t=this.calculateAbsoluteSizes();for(let e=0;e0&&t.itemSizes[e]++,this._isColumn?(Tt(this.contentItems[e].element,t.crossAxisSize),At(this.contentItems[e].element,t.itemSizes[e])):(Tt(this.contentItems[e].element,t.itemSizes[e]),At(this.contentItems[e].element,t.crossAxisSize))}calculateAbsoluteSizes(){const t=(this.contentItems.length-1)*this._splitterSize,{width:e,height:i}=kt(this.element);let n,o;this._isColumn?(n=i-t,o=e):(n=e-t,o=i);let s=0;const r=[];for(let t=0;t0){const n=100-t;for(let t=0;t100&&e.length>0){for(let t=0;te)return;{const r=i/e;let a=i;for(let e=0;ethis.onSplitterDrag(e,t,i))),e.on("dragStop",(()=>this.onSplitterDragStop(e))),e.on("dragStart",(()=>this.onSplitterDragStart(e))),this._splitter.splice(t,0,e),e}getSplitItems(t){const e=this._splitter.indexOf(t);return{before:this.contentItems[e],after:this.contentItems[e+1]}}calculateContentItemMinSize(t){const e=t.minSize;if(void 0!==e){if(t.minSizeUnit===ht.Pixel)return e;throw new X("ROCGMD98831",JSON.stringify(t))}{const t=this.layoutManager.layoutConfig.dimensions;return this._isColumn?t.defaultMinItemHeight:t.defaultMinItemWidth}}calculateContentItemsTotalMinSize(t){let e=0;for(const i of t)e+=this.calculateContentItemMinSize(i);return e}onSplitterDragStart(t){const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=this.calculateContentItemsTotalMinSize(e.before.contentItems),s=this.calculateContentItemsTotalMinSize(e.after.contentItems);this._splitterPosition=0,this._splitterMinPosition=-1*(i-o),this._splitterMaxPosition=n-s}onSplitterDrag(t,e,i){let n=this._isColumn?i:e;if(null===this._splitterMinPosition||null===this._splitterMaxPosition)throw new K("ROCOSD59226");n=Math.max(n,this._splitterMinPosition),n=Math.min(n,this._splitterMaxPosition),this._splitterPosition=n;const o=zt(n);this._isColumn?t.element.style.top=o:t.element.style.left=o}onSplitterDragStop(t){if(null===this._splitterPosition)throw new K("ROCOSDS66932");{const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=(this._splitterPosition+i)/(i+n),s=e.before.size+e.after.size;e.before.size=o*s,e.after.size=(1-o)*s,t.element.style.top=zt(0),t.element.style.left=zt(0),globalThis.requestAnimationFrame((()=>this.updateSize(!1)))}}}!function(t){t.getElementDimensionSize=function(t,e){return"width"===e?function(t){return t.offsetWidth}(t):function(t){return t.offsetHeight}(t)},t.setElementDimensionSize=function(t,e,i){return"width"===e?Tt(t,i):At(t,i)},t.createElement=function(t,e){const i=t.createElement("div");return i.classList.add("lm_item"),e?i.classList.add("lm_column"):i.classList.add("lm_row"),i}}(Xt||(Xt={}));class Yt extends $t{constructor(t,e,i){super(t,vt.create(e),null,Yt.createElement(document)),this.isGround=!0,this._childElementContainer=this.element,this._containerElement=i;let n=null;for(;;){const t=n?n.previousSibling:this._containerElement.lastChild;if(!(t instanceof Element&&t.classList.contains("lm_content")))break;n=t}this._containerElement.insertBefore(this.element,n)}init(){if(!0!==this.isInitialised){this.updateNodeSize();for(let t=0;t0?this.contentItems[0]:this,n.isComponent)throw new Error("Cannot add item as child to ComponentItem");{const t=this.layoutManager.createAndInitContentItem(i,n);return e=n.addChild(t,e),n===this?-1:e}}loadComponentAsRoot(t){this.clearRoot();const e=Ct.resolve(t,!1);if(e.maximised)throw new Error("Root Component cannot be maximised");{const t=new jt(this.layoutManager,e,this);t.init(),this.addChild(t,0)}}addChild(t,e){if(this.contentItems.length>0)throw new Error("Ground node can only have a single child");return this._childElementContainer.appendChild(t.element),e=super.addChild(t,e),this.updateSize(!1),this.emitBaseBubblingEvent("stateChanged"),e}calculateConfigContent(){const t=this.contentItems,e=t.length,i=new Array(e);for(let n=0;n0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e)),this.updateContentItemsSize(!1))}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}createSideAreas(){const t=Yt.Area.oppositeSides,e=new Array(Object.keys(t).length);let i=0;for(const n in t){const o=n,s=this.getElementArea();if(null===s)throw new K("RCSA77553");s.side=o,"2"===t[o][1]?s[o]=s[t[o]]-50:s[o]=s[t[o]]+50,s.surface=(s.x2-s.x1)*(s.y2-s.y1),e[i++]=s}return e}highlightDropZone(t,e,i){this.layoutManager.tabDropPlaceholder.remove(),super.highlightDropZone(t,e,i)}onDrop(t,e){if(t.isComponent){const e=ut.createDefault(),i=t;e.header=mt.Header.createCopy(i.headerConfig);const n=this.layoutManager.createAndInitContentItem(e,this);n.addChild(t),t=n}if(0===this.contentItems.length)this.addChild(t);else{if(t.type===at.row||t.type===at.column){const e=ut.createDefault(),i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}const i="x"==e.side[0]?at.row:at.column,n="2"==e.side[1],o=this.contentItems[0];if(o instanceof Xt&&o.type===i){const e=o.contentItems[n?0:o.contentItems.length-1];o.addChild(t,n?0:void 0,!0),e.size*=.5,t.size=e.size,t.sizeUnit=ht.Percent,o.updateSize(!1)}else{const e=ct.createDefault(i),s=this.layoutManager.createContentItem(e,this);this.replaceChild(o,s),s.addChild(t,n?0:void 0,!0),s.addChild(o,n?void 0:0,!0),o.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}}dock(){throw new X("GID87731")}validateDocking(){throw new X("GIVD87732")}getAllContentItems(){const t=[this];return this.deepGetAllContentItems(this.contentItems,t),t}getConfigMaximisedItems(){const t=[];return this.deepFilterContentItems(this.contentItems,t,(t=>!(!Gt.isStack(t)||!t.initialWantMaximise)||!(!Gt.isComponentItem(t)||!t.initialWantMaximise))),t}getItemsByPopInParentId(t){const e=[];return this.deepFilterContentItems(this.contentItems,e,(e=>e.popInParentIds.includes(t))),e}toConfig(){throw new Error("Cannot generate GroundItem config")}setActiveComponentItem(t,e,i){}updateNodeSize(){const{width:t,height:e}=kt(this._containerElement);Tt(this.element,t),At(this.element,e),this.contentItems.length>0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e))}deepGetAllContentItems(t,e){for(let i=0;ithis.onClick(t),this._touchStartEventListener=t=>this.onTouchStart(t),this._element=document.createElement("div"),this._element.classList.add(i),this._element.title=e,this._header.on("destroy",(()=>this.destroy())),this._element.addEventListener("click",this._clickEventListener,{passive:!0}),this._element.addEventListener("touchstart",this._touchStartEventListener,{passive:!0}),this._header.controlsContainerElement.appendChild(this._element)}get element(){return this._element}destroy(){var t;this._element.removeEventListener("click",this._clickEventListener),this._element.removeEventListener("touchstart",this._touchStartEventListener),null===(t=this._element.parentNode)||void 0===t||t.removeChild(this._element)}onClick(t){this._pushEvent(t)}onTouchStart(t){this._pushEvent(t)}}class Jt{constructor(t,e,i,n,o){var s;this._layoutManager=t,this._componentItem=e,this._closeEvent=i,this._focusEvent=n,this._dragStartEvent=o,this._isActive=!1,this._tabClickListener=t=>this.onTabClickDown(t),this._tabTouchStartListener=t=>this.onTabTouchStart(t),this._closeClickListener=()=>this.onCloseClick(),this._closeTouchStartListener=()=>this.onCloseTouchStart(),this._dragStartListener=(t,e)=>this.onDragStart(t,e),this._contentItemDestroyListener=()=>this.onContentItemDestroy(),this._tabTitleChangedListener=t=>this.setTitle(t),this._element=document.createElement("div"),this._element.classList.add("lm_tab"),this._titleElement=document.createElement("span"),this._titleElement.classList.add("lm_title"),this._closeElement=document.createElement("div"),this._closeElement.classList.add("lm_close_tab"),this._element.appendChild(this._titleElement),this._element.appendChild(this._closeElement),e.isClosable?this._closeElement.style.display="":this._closeElement.style.display="none",this.setTitle(e.title),this._componentItem.on("titleChanged",this._tabTitleChangedListener);(null!==(s=e.reorderEnabled)&&void 0!==s?s:this._layoutManager.layoutConfig.settings.reorderEnabled)&&this.enableReorder(),this._element.addEventListener("click",this._tabClickListener,{passive:!0}),this._element.addEventListener("touchstart",this._tabTouchStartListener,{passive:!0}),this._componentItem.isClosable?(this._closeElement.addEventListener("click",this._closeClickListener,{passive:!0}),this._closeElement.addEventListener("touchstart",this._closeTouchStartListener,{passive:!0})):(this._closeElement.remove(),this._closeElement=void 0),this._componentItem.setTab(this),this._layoutManager.emit("tabCreated",this)}get isActive(){return this._isActive}get componentItem(){return this._componentItem}get contentItem(){return this._componentItem}get element(){return this._element}get titleElement(){return this._titleElement}get closeElement(){return this._closeElement}get reorderEnabled(){return void 0!==this._dragListener}set reorderEnabled(t){t!==this.reorderEnabled&&(t?this.enableReorder():this.disableReorder())}setTitle(t){this._titleElement.innerText=t,this._element.title=t}setActive(t){t!==this._isActive&&(this._isActive=t,t?this._element.classList.add("lm_active"):this._element.classList.remove("lm_active"))}destroy(){var t,e;this._closeEvent=void 0,this._focusEvent=void 0,this._dragStartEvent=void 0,this._element.removeEventListener("click",this._tabClickListener),this._element.removeEventListener("touchstart",this._tabTouchStartListener),null===(t=this._closeElement)||void 0===t||t.removeEventListener("click",this._closeClickListener),null===(e=this._closeElement)||void 0===e||e.removeEventListener("touchstart",this._closeTouchStartListener),this._componentItem.off("titleChanged",this._tabTitleChangedListener),this.reorderEnabled&&this.disableReorder(),this._element.remove()}setBlurred(){this._element.classList.remove("lm_focused"),this._titleElement.classList.remove("lm_focused")}setFocused(){this._element.classList.add("lm_focused"),this._titleElement.classList.add("lm_focused")}onDragStart(t,e){if(void 0===this._dragListener)throw new J("TODSDLU10093");if(void 0===this._dragStartEvent)throw new J("TODS23309");this._dragStartEvent(t,e,this._dragListener,this.componentItem)}onContentItemDestroy(){void 0!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=void 0)}onTabClickDown(t){const e=t.target;e!==this._element&&e!==this._titleElement||(0===t.button?this.notifyFocus():1===t.button&&this._componentItem.isClosable&&this.notifyClose())}onTabTouchStart(t){t.target===this._element&&this.notifyFocus()}onCloseClick(){this.notifyClose()}onCloseTouchStart(){this.notifyClose()}notifyClose(){if(void 0===this._closeEvent)throw new J("TNC15007");this._closeEvent(this._componentItem)}notifyFocus(){if(void 0===this._focusEvent)throw new J("TNA15007");this._focusEvent(this._componentItem)}enableReorder(){this._dragListener=new Zt(this._element,[this._titleElement]),this._dragListener.on("dragStart",this._dragStartListener),this._componentItem.on("destroy",this._contentItemDestroyListener)}disableReorder(){if(void 0===this._dragListener)throw new J("TDR87745");this._componentItem.off("destroy",this._contentItemDestroyListener),this._dragListener.off("dragStart",this._dragStartListener),this._dragListener=void 0}}class Qt{constructor(t,e,i,n,o){this._layoutManager=t,this._componentRemoveEvent=e,this._componentFocusEvent=i,this._componentDragStartEvent=n,this._dropdownActiveChangedEvent=o,this._tabs=[],this._lastVisibleTabIndex=-1,this._dropdownActive=!1,this._element=document.createElement("section"),this._element.classList.add("lm_tabs"),this._dropdownElement=document.createElement("section"),this._dropdownElement.classList.add("lm_tabdropdown_list"),this._dropdownElement.style.display="none"}get tabs(){return this._tabs}get tabCount(){return this._tabs.length}get lastVisibleTabIndex(){return this._lastVisibleTabIndex}get element(){return this._element}get dropdownElement(){return this._dropdownElement}get dropdownActive(){return this._dropdownActive}destroy(){for(let t=0;tthis.handleTabCloseEvent(t)),(t=>this.handleTabFocusEvent(t)),((t,e,i,n)=>this.handleTabDragStartEvent(t,e,i,n)));void 0===e&&(e=this._tabs.length),this._tabs.splice(e,0,i),ethis._lastVisibleTabIndex){const t=this._tabs[e];for(let t=e;t>0;t--)this._tabs[t]=this._tabs[t-1];this._tabs[0]=t}}updateTabSizes(t,e){let i=!1;this.tryUpdateTabSizes(i,t,e)||(i=!0,this.tryUpdateTabSizes(i,t,e)),i!==this._dropdownActive&&(this._dropdownActive=i,this._dropdownActiveChangedEvent())}tryUpdateTabSizes(t,e,i){if(this._tabs.length>0){if(void 0===i)throw new Error("non-empty tabs must have active component item");let n=0,o=!1;const s=this._layoutManager.layoutConfig.settings.tabOverlapAllowance,r=this._tabs.indexOf(i.tab),a=this._tabs[r];this._lastVisibleTabIndex=-1;for(let i=0;ie){if(o)i===r&&(l.style.zIndex="auto",l.style.marginLeft="",l.parentElement!==this._element&&this._element.appendChild(l));else{let t;if(t=r>0&&r<=i?(d-e)/(i-1):(d-e)/i,tthis.onClick(t),this._touchStartListener=t=>this.onTouchStart(t),this._rowColumnClosable=!0,this._closeButton=null,this._popoutButton=null,this._tabsContainer=new Qt(this._layoutManager,(t=>this.handleTabInitiatedComponentRemoveEvent(t)),(t=>this.handleTabInitiatedComponentFocusEvent(t)),((t,e,i,n)=>this.handleTabInitiatedDragStartEvent(t,e,i,n)),(()=>this.processTabDropdownActiveChanged())),this._show=i.show,this._popoutEnabled=i.popoutEnabled,this._popoutLabel=i.popoutLabel,this._maximiseEnabled=i.maximiseEnabled,this._maximiseLabel=i.maximiseLabel,this._minimiseEnabled=i.minimiseEnabled,this._minimiseLabel=i.minimiseLabel,this._closeEnabled=i.closeEnabled,this._closeLabel=i.closeLabel,this._tabDropdownEnabled=i.tabDropdownEnabled,this._tabDropdownLabel=i.tabDropdownLabel,this.setSide(i.side),this._canRemoveComponent=this._configClosable,this._element=document.createElement("section"),this._element.classList.add("lm_header"),this._controlsContainerElement=document.createElement("section"),this._controlsContainerElement.classList.add("lm_controls"),this._element.appendChild(this._tabsContainer.element),this._element.appendChild(this._controlsContainerElement),this._element.appendChild(this._tabsContainer.dropdownElement),this._element.addEventListener("click",this._clickListener,{passive:!0}),this._element.addEventListener("touchstart",this._touchStartListener,{passive:!0}),this._documentMouseUpListener=()=>this._tabsContainer.hideAdditionalTabsDropdown(),globalThis.document.addEventListener("mouseup",this._documentMouseUpListener,{passive:!0}),this._tabControlOffset=this._layoutManager.layoutConfig.settings.tabControlOffset,this._tabDropdownEnabled&&(this._tabDropdownButton=new Kt(this,this._tabDropdownLabel,"lm_tabdropdown",(()=>this._tabsContainer.showAdditionalTabsDropdown()))),this._popoutEnabled&&(this._popoutButton=new Kt(this,this._popoutLabel,"lm_popout",(()=>this.handleButtonPopoutEvent()))),this._maximiseEnabled&&(this._maximiseButton=new Kt(this,this._maximiseLabel,"lm_maximise",(t=>this.handleButtonMaximiseToggleEvent(t)))),this._configClosable&&(this._closeButton=new Kt(this,this._closeLabel,"lm_close",(()=>s()))),this.processTabDropdownActiveChanged()}get show(){return this._show}get side(){return this._side}get leftRightSided(){return this._leftRightSided}get layoutManager(){return this._layoutManager}get parent(){return this._parent}get tabs(){return this._tabsContainer.tabs}get lastVisibleTabIndex(){return this._tabsContainer.lastVisibleTabIndex}get element(){return this._element}get tabsContainerElement(){return this._tabsContainer.element}get controlsContainerElement(){return this._controlsContainerElement}destroy(){this.emit("destroy"),this._popoutEvent=void 0,this._maximiseToggleEvent=void 0,this._clickEvent=void 0,this._touchStartEvent=void 0,this._componentRemoveEvent=void 0,this._componentFocusEvent=void 0,this._componentDragStartEvent=void 0,this._tabsContainer.destroy(),globalThis.document.removeEventListener("mouseup",this._documentMouseUpListener),this._element.remove()}createTab(t,e){this._tabsContainer.createTab(t,e)}removeTab(t){this._tabsContainer.removeTab(t)}processActiveComponentChanged(t){this._tabsContainer.processActiveComponentChanged(t),this.updateTabSizes()}setSide(t){this._side=t,this._leftRightSided=[nt.right,nt.left].includes(this._side)}setRowColumnClosable(t){this._rowColumnClosable=t,this.updateClosability()}updateClosability(){let t;if(this._configClosable)if(this._rowColumnClosable){t=!0;const e=this.tabs.length;for(let i=0;i1}applyFocusedValue(t){t?this._element.classList.add("lm_focused"):this._element.classList.remove("lm_focused")}processMaximised(){if(void 0===this._maximiseButton)throw new J("HPMAX16997");this._maximiseButton.element.setAttribute("title",this._minimiseLabel)}processMinimised(){if(void 0===this._maximiseButton)throw new J("HPMIN16997");this._maximiseButton.element.setAttribute("title",this._maximiseLabel)}updateTabSizes(){if(this._tabsContainer.tabCount>0){const t=this._show?this._layoutManager.layoutConfig.dimensions.headerHeight:0;let e;this._leftRightSided?(this._element.style.height="",this._element.style.width=zt(t)):(this._element.style.width="",this._element.style.height=zt(t)),e=this._leftRightSided?this._element.offsetHeight-this._controlsContainerElement.offsetHeight-this._tabControlOffset:this._element.offsetWidth-this._controlsContainerElement.offsetWidth-this._tabControlOffset,this._tabsContainer.updateTabSizes(e,this._getActiveComponentItemEvent())}}handleTabInitiatedComponentRemoveEvent(t){if(this._canRemoveComponent){if(void 0===this._componentRemoveEvent)throw new J("HHTCE22294");this._componentRemoveEvent(t)}}handleTabInitiatedComponentFocusEvent(t){if(void 0===this._componentFocusEvent)throw new J("HHTAE22294");this._componentFocusEvent(t)}handleTabInitiatedDragStartEvent(t,e,i,n){if(this._canRemoveComponent){if(void 0===this._componentDragStartEvent)throw new J("HHTDSE22294");this._componentDragStartEvent(t,e,i,n)}else i.cancelDrag()}processTabDropdownActiveChanged(){void 0!==this._tabDropdownButton&&Dt(this._tabDropdownButton.element,this._tabsContainer.dropdownActive)}handleButtonPopoutEvent(){if(this._layoutManager.layoutConfig.settings.popoutWholeStack){if(void 0===this._popoutEvent)throw new J("HHBPOE17834");this._popoutEvent()}else{const t=this._getActiveComponentItemEvent();t&&t.popout()}}handleButtonMaximiseToggleEvent(t){if(void 0===this._maximiseToggleEvent)throw new J("HHBMTE16834");this._maximiseToggleEvent()}onClick(t){t.target===this._element&&this.notifyClick(t)}onTouchStart(t){t.target===this._element&&this.notifyTouchStart(t)}notifyClick(t){if(void 0===this._clickEvent)throw new J("HNHC46834");this._clickEvent(t)}notifyTouchStart(t){if(void 0===this._touchStartEvent)throw new J("HNHTS46834");this._touchStartEvent(t)}}class ee extends $t{constructor(t,e,i){var n,o,s,r,a,l,h,d,c,m,u,p,g,f,v,_,y,C,w;super(t,e,i,ee.createElement(document)),this._headerSideChanged=!1,this._resizeListener=()=>this.handleResize(),this._maximisedListener=()=>this.handleMaximised(),this._minimisedListener=()=>this.handleMinimised(),this._headerConfig=e.header;const I=t.layoutConfig.header,b=e.content;let S;if(1!==b.length)S=void 0;else{S=b[0].header}this._initialWantMaximise=e.maximised,this._initialActiveItemIndex=null!==(n=e.activeItemIndex)&&void 0!==n?n:0;const E=null!==(r=null!==(s=null===(o=this._headerConfig)||void 0===o?void 0:o.show)&&void 0!==s?s:null==S?void 0:S.show)&&void 0!==r?r:I.show,x=null!==(h=null!==(l=null===(a=this._headerConfig)||void 0===a?void 0:a.popout)&&void 0!==l?l:null==S?void 0:S.popout)&&void 0!==h?h:I.popout,L=null!==(m=null!==(c=null===(d=this._headerConfig)||void 0===d?void 0:d.maximise)&&void 0!==c?c:null==S?void 0:S.maximise)&&void 0!==m?m:I.maximise,z=null!==(g=null!==(p=null===(u=this._headerConfig)||void 0===u?void 0:u.close)&&void 0!==p?p:null==S?void 0:S.close)&&void 0!==g?g:I.close,M=null!==(_=null!==(v=null===(f=this._headerConfig)||void 0===f?void 0:f.minimise)&&void 0!==v?v:null==S?void 0:S.minimise)&&void 0!==_?_:I.minimise,P=null!==(w=null!==(C=null===(y=this._headerConfig)||void 0===y?void 0:y.tabDropdown)&&void 0!==C?C:null==S?void 0:S.tabDropdown)&&void 0!==w?w:I.tabDropdown;this._maximisedEnabled=!1!==L;const T={show:!1!==E,side:!1===E?nt.top:E,popoutEnabled:!1!==x,popoutLabel:!1===x?"":x,maximiseEnabled:this._maximisedEnabled,maximiseLabel:!1===L?"":L,closeEnabled:!1!==z,closeLabel:!1===z?"":z,minimiseEnabled:!0,minimiseLabel:M,tabDropdownEnabled:!1!==P,tabDropdownLabel:!1===P?"":P};this._header=new te(t,this,T,e.isClosable&&!1!==z,(()=>this.getActiveComponentItem()),(()=>this.remove()),(()=>this.handlePopoutEvent()),(()=>this.toggleMaximise()),(t=>this.handleHeaderClickEvent(t)),(t=>this.handleHeaderTouchStartEvent(t)),(t=>this.handleHeaderComponentRemoveEvent(t)),(t=>this.handleHeaderComponentFocusEvent(t)),((t,e,i,n)=>this.handleHeaderComponentStartDragEvent(t,e,i,n))),this.isStack=!0,this._childElementContainer=document.createElement("section"),this._childElementContainer.classList.add("lm_items"),this.on("resize",this._resizeListener),this._maximisedEnabled&&(this.on("maximised",this._maximisedListener),this.on("minimised",this._minimisedListener)),this.element.appendChild(this._header.element),this.element.appendChild(this._childElementContainer),this.setupHeaderPosition(),this._header.updateClosability()}get childElementContainer(){return this._childElementContainer}get header(){return this._header}get headerShow(){return this._header.show}get headerSide(){return this._header.side}get headerLeftRightSided(){return this._header.leftRightSided}get contentAreaDimensions(){return this._contentAreaDimensions}get initialWantMaximise(){return this._initialWantMaximise}get isMaximised(){return this===this.layoutManager.maximisedStack}get stackParent(){if(!this.parent)throw new Error("Stack should always have a parent");return this.parent}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}init(){if(!0===this.isInitialised)return;this.updateNodeSize();for(let t=0;t0){if(this._initialActiveItemIndex<0||this._initialActiveItemIndex>=e)throw new Error(`ActiveItemIndex out of range: ${this._initialActiveItemIndex} id: ${this.id}`);for(let i=0;ithis.contentItems.length)throw e-=1,new X("SAC99728");if(t instanceof jt)return e=super.addChild(t,e),this._childElementContainer.appendChild(t.element),this._header.createTab(t,e),this.setActiveComponentItem(t,i),this._header.updateTabSizes(),this.updateSize(!1),t.container.setBaseLogicalZIndex(),this._header.updateClosability(),this.emitStateChangedEvent(),e;throw new X("SACC88532")}removeChild(t,e){const i=t,n=this.contentItems.indexOf(i),o=1===this.contentItems.length;if(this._activeComponentItem===i&&(i.focused&&i.blur(),!o)){const t=0===n?1:n-1;this.setActiveComponentItem(this.contentItems[t],!1)}this._header.removeTab(i),super.removeChild(i,e),o||this._header.updateClosability(),this.emitStateChangedEvent()}toggleMaximise(){this.isMaximised?this.minimise():this.maximise()}maximise(){if(!this.isMaximised){this.layoutManager.setMaximisedStack(this);const t=this.contentItems,e=t.length;for(let i=0;i0&&void 0===t)throw new Error("expected non-empty stack to have an active component item");return{type:"stack",content:this.calculateConfigContent(),size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,isClosable:this.isClosable,maximised:this.isMaximised,header:this.createHeaderConfig(),activeItemIndex:t}}onDrop(t,e){if("header"===this._dropSegment){if(this.resetHeaderDropZone(),void 0===this._dropIndex)throw new J("SODDI68990");return void this.addChild(t,this._dropIndex)}if("body"===this._dropSegment)return void this.addChild(t,0,!0);const i="top"===this._dropSegment||"bottom"===this._dropSegment,n="left"===this._dropSegment||"right"===this._dropSegment,o="top"===this._dropSegment||"left"===this._dropSegment,s=i&&this.stackParent.isColumn||n&&this.stackParent.isRow;if(t.isComponent){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createAndInitContentItem(e,this);i.addChild(t),t=i}if(t.type===at.row||t.type===at.column){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}if(s){const e=this.stackParent.contentItems.indexOf(this);this.stackParent.addChild(t,o?e:e+1,!0),this.size*=.5,t.size=this.size,t.sizeUnit=this.sizeUnit,this.stackParent.updateSize(!1)}else{const e=i?at.column:at.row,n=ct.createDefault(e),s=this.layoutManager.createContentItem(n,this);this.stackParent.replaceChild(this,s),s.addChild(t,o?0:void 0,!0),s.addChild(this,o?void 0:0,!0),this.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}highlightDropZone(t,e){for(const i in this._contentAreaDimensions){const n=i,o=this._contentAreaDimensions[n].hoverArea;if(o.x1t&&o.y1e)return void("header"===n?(this._dropSegment="header",this.highlightHeaderDropZone(this._header.leftRightSided?e:t)):(this.resetHeaderDropZone(),this.highlightBodyDropZone(n)))}}getArea(){if("none"===this.element.style.display)return null;const t=super.getElementArea(this._header.element),e=super.getElementArea(this._childElementContainer);if(null===t||null===e)throw new K("SGAHC13086");const i=e.x2-e.x1,n=e.y2-e.y1;return this._contentAreaDimensions={header:{hoverArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2},highlightArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2}}},0===this.contentItems.length?(this._contentAreaDimensions.body={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2}},super.getElementArea(this.element)):(this._contentAreaDimensions.left={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x1+.25*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x1+.5*i,y2:e.y2}},this._contentAreaDimensions.top={hoverArea:{x1:e.x1+.25*i,y1:e.y1,x2:e.x1+.75*i,y2:e.y1+.5*n},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y1+.5*n}},this._contentAreaDimensions.right={hoverArea:{x1:e.x1+.75*i,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1+.5*i,y1:e.y1,x2:e.x2,y2:e.y2}},this._contentAreaDimensions.bottom={hoverArea:{x1:e.x1+.25*i,y1:e.y1+.5*n,x2:e.x1+.75*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1+.5*n,x2:e.x2,y2:e.y2}},super.getElementArea(this.element))}positionHeader(t){this._header.side!==t&&(this._header.setSide(t),this._headerSideChanged=!0,this.setupHeaderPosition())}updateNodeSize(){if("none"!==this.element.style.display){const t=kt(this.element);if(this._header.show){t[this._header.leftRightSided?it.width:it.height]-=this.layoutManager.layoutConfig.dimensions.headerHeight}this._childElementContainer.style.width=zt(t.width),this._childElementContainer.style.height=zt(t.height);for(let e=0;e=o&&t({...t,[e]:i});async function s(t,e){return(await Promise.all(e.map((async([e,i])=>[e,await t(i,e)])))).reduce(o,{})}n.mapEntriesAsync=s,n.mapValuesAsync=async function(t,e){let i;return i=e instanceof Map?[...e.entries()]:Object.entries(e),s(t,i)};var r,a,l,h,d=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldSet||function(t,e,i,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(t,i):o?o.value=i:e.set(t,i),i},c=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldGet||function(t,e,i,n){if("a"===i&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?n:"a"===i?n.call(t):n?n.value:e.get(t)};Object.defineProperty(i,"__esModule",{value:!0});var m=i.DefaultLayoutManager=void 0;const u=n;class p{constructor(t){a.set(this,void 0),l.set(this,new Map),d(this,a,t,"f")}size(){return c(this,l,"f").size}async applyLayoutSnapshot({layouts:t}){if(Object.keys(t).length>1)throw new Error("[LayoutManager] Tried to call applyLayoutSnapshot with more than 1 layout. When implementing multiple layouts via overridden LayoutManager class, you must override and fully implement the applyLayoutSnapshot method without calling super.applyLayoutSnapshot().");const[[e,i]]=Object.entries(t);await p.createLayout(this,{layoutName:e,layout:i})}async showLayout({layoutName:t}){}async getLayoutSnapshot(){return{layouts:await(0,u.mapValuesAsync)((t=>t.getFrameSnapshot()),c(this,l,"f"))}}async removeLayout({layoutName:t}){}getLayoutIdentityForView(t){const e=[...c(this,l,"f").values()].find((e=>e.getCurrentViews().some((e=>e.name===t.name&&e.uuid===t.uuid))));return e?.identity??void 0}isLayoutVisible({layoutName:t}){return c(p,r,"m",h).call(p,this,t).isVisible()}resolveLayoutIdentity(t){if(t&&"layoutName"in t)return t;const e=[...c(this,l,"f").values()];if(1===e.length)return e[0].identity;const i=e.find((t=>t.isVisible()));return i?.identity??void 0}static async resolveLayout(t,e){const i=t.resolveLayoutIdentity(e);if(void 0===i||!("layoutName"in i))throw new Error("[layout-manager] resolveLayout: Could not resolve the layout identity. Make sure you include 'layoutName' in the identity object.");return c(p,r,"m",h).call(p,t,i.layoutName)}static async handleSharedView(t,e,i){await(0,u.mapValuesAsync)((async t=>{if(t.identity.layoutName!==e.layoutName){const e=t.getCurrentViews().find((t=>t.name===i.name));e&&await t.onViewDetached({viewIdentity:e,target:null}).catch(console.error)}}),c(t,l,"f"))}static async handleLastViewRemoved(t,e){await t.removeLayout(e),await c(t,a,"f").handleLastViewRemoved(t)}static async destroyLayout(t,{layoutName:e}){await c(p,r,"m",h).call(p,t,e).destroy(),c(t,l,"f").delete(e)}static async createLayout(t,e){const{layoutName:i}=e;if(c(t,l,"f").has(i))throw new Error(`Layout name ${i} already exists`);await c(t,a,"f").createLayout(e,t)}static registerLayout(t,e,i){c(t,l,"f").set(e,i)}static getAllLayouts(t){return[...c(t,l,"f").values()]}static setInitialSnapshot(t,e){c(t,a,"f").setInitialSnapshot(e)}static createClosedConstructor(...t){return class extends p{constructor(){super(...t)}}}}m=i.DefaultLayoutManager=p,r=p,a=new WeakMap,l=new WeakMap,h=function(t,e){const i=c(t,l,"f").get(e);if(!i)throw new Error(`[layout-manager] getLayoutByName: Could not locate layout with name '${e}'`);return i};var g={},f={},v={};Object.defineProperty(v,"__esModule",{value:!0}),v.ReversibleMap=void 0;v.ReversibleMap=class{constructor(){this.valueToKey=new Map,this.keyToValue=new Map,this.setUnique=(t,e)=>{if(this.hasKey(t)||this.hasValue(e))throw new Error("Key or value already in the map.");this.keyToValue.set(t,e),this.valueToKey.set(e,t)},this.getKey=t=>{const e=this.valueToKey.get(t);if(!e)throw new Error("Value not found in the map.");return e},this.deleteKey=t=>{const e=this.getValue(t);return this.keyToValue.delete(t),this.valueToKey.delete(e),e},this.deleteValue=t=>{const e=this.getKey(t);return this.keyToValue.delete(e),this.valueToKey.delete(t),e},this.hasKey=t=>this.keyToValue.has(t),this.hasValue=t=>this.valueToKey.has(t)}getValue(t){const e=this.keyToValue.get(t);if(!e)throw new Error("Key not found in the map.");return e}},Object.defineProperty(f,"__esModule",{value:!0});var _=f.LayoutContentCache=void 0;const y=t.lazy,C=v;class w{constructor(){this.contentItemCache=new C.ReversibleMap,this.contentItemCacheId=0,this.createCacheKey=()=>{const t=`entity-${this.contentItemCacheId.toString()}`;return this.contentItemCacheId+=1,t},this.hasKey=t=>this.contentItemCache.hasKey(t),this.getItemOrUndefined=t=>{try{return this.getContentItemOrThrow(t)}catch(t){return}},this.getContentItemOrThrow=(t,e)=>{if(!this.contentItemCache.hasKey(t))throw new Error("Layout component has been destroyed or detached from the current layout.");const i=this.contentItemCache.getValue(t);if(e&&!e.includes(i.type))throw new Error(`Layout item is not the expected type. Expected ${e.join(", ")}, got ${i.type}.`);return i},this.getOrCreateEntityId=t=>{if(this.contentItemCache.hasValue(t))return this.contentItemCache.getKey(t);t.onDestroyed((()=>{this.contentItemCache.deleteValue(t)}));const e=this.createCacheKey();return this.contentItemCache.setUnique(e,t),e}}static getSingleInstance(){return w.singleton.getValue()}}_=f.LayoutContentCache=w,w.singleton=new y.Lazy((()=>new w));var I={},b={};!function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.getAdjacentStacks=t.doShareEdge=t.getAdjacentItem=void 0;t.getAdjacentItem=(e,i)=>{const{parent:n}=e;if(e.isRoot()||!n)return;const o=["top","bottom"].includes(i)?"column":"row",s=["top","left"].includes(i)?-1:1;if(n.type===o){const t=n.contentItems.indexOf(e)+s;if(t>=0&&t{const n=t.getBounds(),o=e.getBounds();if(!n||!o)return!1;if(["top","bottom"].includes(i)){return!(n.righto.right)}return!(n.bottomo.bottom)};t.getAdjacentStacks=(e,i)=>{const n=["top","bottom"].includes(i)?"row":"column",o=s=>"stack"===s.type?(0,t.doShareEdge)(e,s,i)?[s]:[]:"root"===s.type||"ground"===s.type?[]:s.type===n?s.contentItems.map((t=>o(t))).flat():s.type!==n?["top","right"].includes(i)?o(s.contentItems[s.contentItems.length-1]):o(s.contentItems[0]):[],s=(0,t.getAdjacentItem)(e,i);return s?o(s):[]}}(b);var S=t.commonjsGlobal&&t.commonjsGlobal.__decorate||function(t,e,i,n){var o,s=arguments.length,r=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(s<3?o(r):s>3?o(e,i,r):o(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};Object.defineProperty(I,"__esModule",{value:!0}),I.LayoutEntitiesController=void 0;const E=t.decorators,x=b,L=i;class z{constructor(t,e,i){this.wire=t,this.layoutManager=e,this.layoutContentCache=i,this.analytics=t=>{this.wire.sendAction(`layout-controller-${t}`).catch((()=>{}))},this.getLayoutIdentityForViewOrThrow=async t=>{const e=this.layoutManager.getLayoutIdentityForView(t);if(!e)throw new Error(`View identity ${t.name} is not attached to any layouts.`);return e},this.getRoot=async t=>{this.analytics("get-root");const e=(await this.getLayout(t)).getRoot();return{type:e.type,entityId:this.layoutContentCache.getOrCreateEntityId(e)}},this.getStackByView=async t=>{this.analytics("get-stack-by-view");const e=await this.getLayoutIdentityForViewOrThrow(t),i=(await this.getLayout(e)).getStackByView(t);if("stack"===i?.type)return{entityId:this.layoutContentCache.getOrCreateEntityId(i),type:"stack"}},this.getStackViews=t=>{this.analytics("get-stack-views");return this.layoutContentCache.getContentItemOrThrow(t,["stack"]).contentItems.map((t=>({name:t.viewName,uuid:this.wire.me.uuid})))},this.isRoot=t=>{this.analytics("is-root");return this.layoutContentCache.getContentItemOrThrow(t).isRoot()},this.exists=t=>(this.analytics("exists"),this.layoutContentCache.hasKey(t)),this.addViewToStack=async(t,e,{index:i}={index:0})=>{this.analytics("add-view-to-stack");const n=this.layoutContentCache.getContentItemOrThrow(t);if(i&&i>n.contentItems.length+1)throw new Error(`Index '${i}' out of range, please exclude the index or specify a number between 0 and ${n.contentItems.length}`);const o={id:t,index:i},{identity:s}=await n.layout.platformCreateView(e,{location:o});return s},this.findViewInStack=(t,e)=>t.contentItems.find((t=>t.viewName===e.name)),this.removeViewFromStack=async(t,e)=>{this.analytics("remove-view-from-stack");const i=this.layoutContentCache.getContentItemOrThrow(t,["stack"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to remove a view ('${e.name}') which does not belong to the stack.`);await n.layout.platformCloseView(e)},this.createAdjacentStack=async(t,e,{position:i="right"}={})=>{if(this.analytics("create-adjacent-stack"),!Array.isArray(e)||0===e.length)throw new Error('The parameter "views" must be an array with at least 1 element.');if(!["top","bottom","left","right"].includes(i))throw new Error(`Invalid position '${i}' specified.`);const n=this.layoutContentCache.getContentItemOrThrow(t).createAdjacentStack({position:i}),o=this.layoutContentCache.getOrCreateEntityId(n);return await Promise.all(e.reverse().map((t=>this.addViewToStack(o,t)))),o},this.getAdjacentStacks=async({targetId:t,edge:e})=>{this.analytics("get-adjacent-stacks");const i=this.layoutContentCache.getContentItemOrThrow(t);return(0,x.getAdjacentStacks)(i,e).map((t=>({entityId:this.layoutContentCache.getOrCreateEntityId(t)})))},this.setStackActiveView=async(t,e)=>{this.analytics("set-stack-active-view");const i=this.layoutContentCache.getContentItemOrThrow(t,["stack"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to set a view ('${e.name}') as active when it does not belong to the stack.`);i.setActiveContentItem(n,!0)}}async getLayout(t){const e=await L.DefaultLayoutManager.resolveLayout(this.layoutManager,t);if(!e)throw new Error(`Could not resolve target layout identity ${JSON.stringify(t)}`);return e}getContent(t){this.analytics("get-content");return this.layoutContentCache.getContentItemOrThrow(t,["column","row"]).contentItems.map((t=>({type:t.type,entityId:this.layoutContentCache.getOrCreateEntityId(t)})))}getParent(t){this.analytics("get-parent");const e=this.layoutContentCache.getContentItemOrThrow(t);if(!e.isRoot())return e.parent?.contentItems.includes(e)?{type:e.parent.type,entityId:this.layoutContentCache.getOrCreateEntityId(e.parent)}:void 0}}S([(0,E.expose)()],z.prototype,"getLayoutIdentityForViewOrThrow",void 0),S([(0,E.expose)()],z.prototype,"getRoot",void 0),S([(0,E.expose)()],z.prototype,"getStackByView",void 0),S([(0,E.expose)()],z.prototype,"getStackViews",void 0),S([(0,E.expose)()],z.prototype,"getContent",null),S([(0,E.expose)()],z.prototype,"getParent",null),S([(0,E.expose)()],z.prototype,"isRoot",void 0),S([(0,E.expose)()],z.prototype,"exists",void 0),S([(0,E.expose)()],z.prototype,"addViewToStack",void 0),S([(0,E.expose)()],z.prototype,"removeViewFromStack",void 0),S([(0,E.expose)()],z.prototype,"createAdjacentStack",void 0),S([(0,E.expose)()],z.prototype,"getAdjacentStacks",void 0),S([(0,E.expose)()],z.prototype,"setStackActiveView",void 0),I.LayoutEntitiesController=z,Object.defineProperty(g,"__esModule",{value:!0});var M=g.initLayoutEndpoints=void 0;const P=t.apiExposer,T=t.layout_constants,A=f,k=I,D=i;M=g.initLayoutEndpoints=async function(t,e){const i=t.getFin(),n=await i.Platform.getCurrentSync().getClient(),o=new P.ChannelsExposer(n);await new P.ApiExposer(o).exposeInstance(new k.LayoutEntitiesController(t,e,A.LayoutContentCache.getSingleInstance()),{id:T.LAYOUT_CONTROLLER_ID}),await async function(t,e){const i=t=>async i=>{const n=await D.DefaultLayoutManager.resolveLayout(e,i.target);if(!n)throw new Error(`Could not resolve the layout target from payload ${JSON.stringify(i)}`);return t(n,i)},n=(e,n)=>{t.register(e,i(n))},o=(t,e)=>{n(t,e)};n("replace-view",((t,e)=>t.replaceView(e))),n("replace-layout",((t,{layout:e})=>t.replaceLayout(e))),n("add-view",((t,e)=>t.insertView(e))),o("layout-add-view",((t,{viewOptions:e,location:i,targetView:n})=>t.platformCreateView(e,{location:i,targetView:n}))),n("close-view",((t,e)=>t.cleanupView(e.viewIdentity))),o("layout-close-view",((t,e)=>t.platformCloseView(e.viewIdentity))),n("apply-preset-layout",((t,e)=>t.applyPreset(e))),n("get-layout-views",(t=>t.getCurrentViews())),n("get-frame-snapshot",(t=>t.getFrameSnapshot())),n("is-visible",(t=>t.isVisible())),n("destroy",(t=>t.destroy())),t.register("get-layout-snapshot",(()=>e.getLayoutSnapshot()))}(n,e)};var R={};Object.defineProperty(R,"__esModule",{value:!0});var U=R.BaseLayout=void 0;U=R.BaseLayout=class{};var O={};Object.defineProperty(O,"__esModule",{value:!0});var V=O.DOMEmitter=void 0;V=O.DOMEmitter=class{constructor(t){this.container=t}dispatchLocalEvent(t,e){const i={...e,type:t,tabSelector:`tab-${e.name}`,containerSelector:`container-${e.name}`,topic:"openfin-DOM-event"};this.container.dispatchEvent(new CustomEvent(t,{detail:i}))}};var B={};Object.defineProperty(B,"__esModule",{value:!0});var H=B.mapLayoutContentItemsImmutableSync=B.mapLayoutContentItemsImmutable=W=B.isVisible=void 0;var W=B.isVisible=t=>(0!==t.offsetWidth||0!==t.offsetHeight)&&"hidden"!==window.getComputedStyle(t).visibility&&t.offsetTop>=0&&t.offsetLeft>=0&&t.offsetTop<=window.innerHeight&&t.offsetLeft<=window.innerWidth;const F=t=>"type"in t&&"component"===t.type;B.mapLayoutContentItemsImmutable=async function t(e,i){return F(i)?e(i):{...i,content:await Promise.all(i.content?.map((i=>t(e,i))))}},H=B.mapLayoutContentItemsImmutableSync=function t(e,i){return F(i)?e(i):{...i,content:i.content?.map((i=>t(e,i)))}};class N extends Error{constructor(t,e){super(e),this.type=t}}class G extends N{constructor(t,e){super("Configuration",t),this.node=e}}class j extends N{constructor(t){super("PopoutBlocked",t)}}class $ extends N{constructor(t){super("API",t)}}class Z extends N{constructor(t){super("Bind",t)}}class q extends Error{constructor(t,e,i){super(`${t}: ${e}${void 0===i?"":": "+i}`)}}class X extends q{constructor(t,e){super("Assert",t,e)}}class Y extends q{constructor(t,e,i){super("UnreachableCase",t,`${e}${void 0===i?"":": "+i}`)}}class K extends q{constructor(t,e){super("UnexpectedNull",t,e)}}class J extends q{constructor(t,e){super("UnexpectedUndefined",t,e)}}var Q;!function(t){let e=!1;const i={PopoutCannotBeCreatedWithGroundItemConfig:{id:0,default:"Popout cannot be created with ground ItemConfig"},PleaseRegisterAConstructorFunction:{id:1,default:"Please register a constructor function"},ComponentTypeNotRegisteredAndBindComponentEventHandlerNotAssigned:{id:2,default:"Component type not registered and BindComponentEvent handler not assigned"},ComponentIsAlreadyRegistered:{id:3,default:"Component is already registered"},ComponentIsNotVirtuable:{id:4,default:"Component is not virtuable. Requires rootHtmlElement field/getter"},VirtualComponentDoesNotHaveRootHtmlElement:{id:5,default:'Virtual component does not have getter "rootHtmlElement"'},ItemConfigIsNotTypeComponent:{id:6,default:"ItemConfig is not of type component"},InvalidNumberPartInSizeString:{id:7,default:"Invalid number part in size string"},UnknownUnitInSizeString:{id:8,default:"Unknown unit in size string"},UnsupportedUnitInSizeString:{id:9,default:"Unsupported unit in size string"}};t.idCount=Object.keys(i).length;const n=Object.values(i);t.checkInitialise=function(){if(!e)for(let e=0;e="0"&&t<="9"}function Tt(t,e){const i=zt(e);t.style.width=i}function At(t,e){const i=zt(e);t.style.height=i}function kt(t){return{width:t.offsetWidth,height:t.offsetHeight}}function Dt(t,e){t.style.display=e?"":"none"}function Rt(t,e){if(void 0!==e)for(const i in e)if(e.hasOwnProperty(i)){const n=e[i],o=t[i];t[i]=Ut(o,n)}return t}function Ut(t,e){if("object"!=typeof e)return e;if(Array.isArray(e)){const t=e.length,i=new Array(t);for(let n=0;n36)throw new Error("Too many keys in config minifier map")},t.translateObject=n}(dt||(dt={})),function(t){t.defaults={type:at.ground,content:[],size:1,sizeUnit:ht.Fractional,minSize:void 0,minSizeUnit:ht.Pixel,id:"",isClosable:!0},t.createCopy=function(t,e){switch(t.type){case at.ground:case at.row:case at.column:return gt.createCopy(t,e);case at.stack:return ut.createCopy(t,e);case at.component:return pt.createCopy(t);default:throw new Y("CICC91354",t.type,"Invalid Config Item type specified")}},t.createDefault=function(t){switch(t){case at.ground:throw new X("CICCDR91562");case at.row:case at.column:return gt.createDefault(t);case at.stack:return ut.createDefault();case at.component:return pt.createDefault();default:throw new Y("CICCDD91563",t,"Invalid Config Item type specified")}},t.isComponentItem=function(t){return t.type===at.component},t.isStackItem=function(t){return t.type===at.stack},t.isGroundItem=function(t){return t.type===at.ground}}(ct||(ct={})),function(t){t.defaultMaximised=!1,function(t){t.createCopy=function(t,e){return void 0===t?void 0:{show:null!=e?e:t.show,popout:t.popout,close:t.close,maximise:t.maximise,minimise:t.minimise,tabDropdown:t.tabDropdown}}}(t.Header||(t.Header={}))}(mt||(mt={})),function(t){function e(t){const e=t.length,i=new Array(e);for(let n=0;n"__glMaximised"===t));t>0&&(o=!0,n=n.splice(t,1)),e=n.length>0?n[0]:ct.defaults.id}else e=n;return i=void 0!==t.maximised?t.maximised:o,{id:e,maximised:i}}}(wt||(wt={})),function(t){function e(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0;return{resolved:!0,root:Et.resolve(i),openPopouts:t.resolveOpenPopouts(e.openPopouts),dimensions:t.Dimensions.resolve(e.dimensions),settings:t.Settings.resolve(e.settings),header:t.Header.resolve(e.header,e.settings,e.labels)}}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:Lt.fromResolvedArray(e.openPopouts),settings:_t.Settings.createCopy(e.settings),dimensions:t.Dimensions.fromResolved(e.dimensions),header:_t.Header.createCopy(e.header)}},t.isResolved=function(t){const e=t;return void 0!==e.resolved&&!0===e.resolved},t.resolveOpenPopouts=function(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0,{root:Et.resolve(o),openPopouts:xt.resolveOpenPopouts(e.openPopouts),dimensions:xt.Dimensions.resolve(e.dimensions),settings:xt.Settings.resolve(e.settings),header:xt.Header.resolve(e.header,e.settings,e.labels),parentId:null!==(i=e.parentId)&&void 0!==i?i:null,indexInParent:null!==(n=e.indexInParent)&&void 0!==n?n:null,window:t.Window.resolve(e.window,e.dimensions),resolved:!0}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:i(e.openPopouts),dimensions:xt.Dimensions.fromResolved(e.dimensions),settings:_t.Settings.createCopy(e.settings),header:_t.Header.createCopy(e.header),parentId:e.parentId,indexInParent:e.indexInParent,window:t.Window.fromResolved(e.window)}},t.fromResolvedArray=i}(Lt||(Lt={}));class Wt{constructor(){this._allEventSubscriptions=[],this._subscriptionsMap=new Map,this.unbind=this.removeEventListener,this.trigger=this.emit}tryBubbleEvent(t,e){}emit(t,...e){let i=this._subscriptionsMap.get(t);if(void 0!==i){i=i.slice();for(let t=0;t0){const n=e.slice();n.unshift(t);const o=this._allEventSubscriptions.slice();for(let t=0;t0?n.contentItems[0]:n,e=0);const o=this._layoutManager.createAndInitContentItem(i,t);t.addChild(o,e),this._layoutManager.layoutConfig.settings.popInOnClose?this._onClose():this.close()}createWindow(){const t=this.createUrl(),e=Math.floor(1e6*Math.random()).toString(36),i=this.serializeWindowFeatures({width:this._initialWindowSize.width,height:this._initialWindowSize.height,innerWidth:this._initialWindowSize.width,innerHeight:this._initialWindowSize.height,menubar:"no",toolbar:"no",location:"no",personalbar:"no",resizable:"yes",scrollbars:"no",status:"no"});if(this._popoutWindow=globalThis.open(t,e,i),this._popoutWindow)this._popoutWindow.addEventListener("load",(()=>this.positionWindow()),{passive:!0}),this._popoutWindow.addEventListener("beforeunload",(()=>{this._layoutManager.layoutConfig.settings.popInOnClose?this.popIn():this._onClose()}),{passive:!0}),this._checkReadyInterval=setInterval((()=>this.checkReady()),10);else if(!0===this._layoutManager.layoutConfig.settings.blockedPopoutsThrowError){throw new j("Popout blocked")}}checkReady(){if(null===this._popoutWindow)throw new K("BPCR01844");this._popoutWindow.__glInstance&&this._popoutWindow.__glInstance.isInitialised&&(this.onInitialised(),void 0!==this._checkReadyInterval&&(clearInterval(this._checkReadyInterval),this._checkReadyInterval=void 0))}serializeWindowFeatures(t){const e=[];for(const i in t)e.push(i+"="+t[i].toString());return e.join(",")}createUrl(){const t="gl-window-config-"+Ot(),e=_t.minifyConfig(this._config);try{localStorage.setItem(t,JSON.stringify(e))}catch(t){throw new Error("Error while writing to localStorage "+function(t){return t instanceof Error?t.message:"string"==typeof t?t:"Unknown Error"}(t))}const i=new URL(location.href);return i.searchParams.set("gl-window",t),i.toString()}positionWindow(){if(null===this._popoutWindow)throw new Error("BrowserPopout.positionWindow: null popoutWindow");this._popoutWindow.moveTo(this._initialWindowSize.left,this._initialWindowSize.top),this._popoutWindow.focus()}onInitialised(){this._isInitialised=!0,this.getGlInstance().on("popIn",(()=>this.popIn())),this.emit("initialised")}_onClose(){setTimeout((()=>this.emit("closed")),50)}}class Gt extends Wt{constructor(t,e,i,n){super(),this.layoutManager=t,this._parent=i,this._element=n,this._popInParentIds=[],this._type=e.type,this._id=e.id,this._isInitialised=!1,this.isGround=!1,this.isRow=!1,this.isColumn=!1,this.isStack=!1,this.isComponent=!1,this.size=e.size,this.sizeUnit=e.sizeUnit,this.minSize=e.minSize,this.minSizeUnit=e.minSizeUnit,this._isClosable=e.isClosable,this._pendingEventPropagations={},this._throttledEvents=["stateChanged"],this._contentItems=this.createContentItems(e.content)}get type(){return this._type}get id(){return this._id}set id(t){this._id=t}get popInParentIds(){return this._popInParentIds}get parent(){return this._parent}get contentItems(){return this._contentItems}get isClosable(){return this._isClosable}get element(){return this._element}get isInitialised(){return this._isInitialised}static isStack(t){return t.isStack}static isComponentItem(t){return t.isComponent}static isComponentParentableItem(t){return t.isStack||t.isGround}removeChild(t,e=!1){const i=this._contentItems.indexOf(t);if(-1===i)throw new Error("Can't remove child item. Unknown content item");if(e||this._contentItems[i].destroy(),this._contentItems.splice(i,1),this._contentItems.length>0)this.updateSize(!1);else if(!this.isGround&&!0===this._isClosable){if(null===this._parent)throw new K("CIUC00874");this._parent.removeChild(this)}}addChild(t,e,i){return null!=e||(e=this._contentItems.length),this._contentItems.splice(e,0,t),t.setParent(this),!0===this._isInitialised&&!1===t._isInitialised&&t.init(),e}replaceChild(t,e,i=!1){const n=this._contentItems.indexOf(t),o=t._element.parentNode;if(-1===n)throw new X("CIRCI23232","Can't replace child. oldChild is not child of this");if(null===o)throw new K("CIRCP23232");if(o.replaceChild(e._element,t._element),!0===i&&(t._parent=null,t.destroy()),this._contentItems[n]=e,e.setParent(this),e.size=t.size,e.sizeUnit=t.sizeUnit,e.minSize=t.minSize,e.minSizeUnit=t.minSizeUnit,null===e._parent)throw new K("CIRCNC45699");!0===e._parent._isInitialised&&!1===e._isInitialised&&e.init(),this.updateSize(!1)}remove(){if(null===this._parent)throw new K("CIR11110");this._parent.removeChild(this)}popout(){const t=Ot(),e=this.layoutManager.createPopoutFromContentItem(this,void 0,t,void 0);return this.emitBaseBubblingEvent("stateChanged"),e}calculateConfigContent(){const t=this._contentItems,e=t.length,i=new Array(e);for(let n=0;nthis.propagateEventToLayoutManager(t,e))))}propagateEventToLayoutManager(t,e){this._pendingEventPropagations[t]=!1,this.layoutManager.emitUnknown(t,e)}}class jt extends Gt{constructor(t,e,i){super(t,e,i,document.createElement("div")),this._parentItem=i,this._focused=!1,this.isComponent=!0,this._reorderEnabled=e.reorderEnabled,this.applyUpdatableConfig(e),this._initialWantMaximise=e.maximised;const n=document.createElement("div");n.classList.add("lm_content"),this.element.appendChild(n),this._container=new Ft(e,this,t,n,(t=>this.handleUpdateItemConfigEvent(t)),(()=>this.show()),(()=>this.hide()),(t=>this.focus(t)),(t=>this.blur(t)))}get componentName(){return this._container.componentType}get componentType(){return this._container.componentType}get reorderEnabled(){return this._reorderEnabled}get initialWantMaximise(){return this._initialWantMaximise}get component(){return this._container.component}get container(){return this._container}get parentItem(){return this._parentItem}get headerConfig(){return this._headerConfig}get title(){return this._title}get tab(){return this._tab}get focused(){return this._focused}destroy(){this._container.destroy(),super.destroy()}applyUpdatableConfig(t){this.setTitle(t.title),this._headerConfig=t.header}toConfig(){const t=this._container.stateRequestEvent,e=void 0===t?this._container.state:t();return{type:at.component,content:[],size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,maximised:!1,isClosable:this.isClosable,reorderEnabled:this._reorderEnabled,title:this._title,header:mt.Header.createCopy(this._headerConfig),componentType:pt.copyComponentType(this.componentType),componentState:e}}close(){if(null===this.parent)throw new K("CIC68883");this.parent.removeChild(this,!1)}enterDragMode(t,e){Tt(this.element,t),At(this.element,e),this._container.enterDragMode(t,e)}exitDragMode(){this._container.exitDragMode()}enterStackMaximised(){this._container.enterStackMaximised()}exitStackMaximised(){this._container.exitStackMaximised()}drag(){this._container.drag()}updateSize(t){this.updateNodeSize(t)}init(){this.updateNodeSize(!1),super.init(),this._container.emit("open"),this.initContentItems()}setTitle(t){this._title=t,this.emit("titleChanged",t),this.emit("stateChanged")}setTab(t){this._tab=t,this.emit("tab",t),this._container.setTab(t)}hide(){super.hide(),this._container.setVisibility(!1)}show(){super.show(),this._container.setVisibility(!0)}focus(t=!1){this.parentItem.setActiveComponentItem(this,!0,t)}setFocused(t){this._focused=!0,this.tab.setFocused(),t||this.emitBaseBubblingEvent("focus")}blur(t=!1){this._focused&&this.layoutManager.setFocusedComponentItem(void 0,t)}setBlurred(t){this._focused=!1,this.tab.setBlurred(),t||this.emitBaseBubblingEvent("blur")}setParent(t){this._parentItem=t,super.setParent(t)}handleUpdateItemConfigEvent(t){this.applyUpdatableConfig(t)}updateNodeSize(t){if("none"!==this.element.style.display){const{width:e,height:i}=kt(this.element);this._container.setSizeToNodeSize(e,i,t)}}}class $t extends Gt{constructor(){super(...arguments),this._focused=!1}get focused(){return this._focused}setFocusedValue(t){this._focused=t}}class Zt extends Wt{constructor(t,e){super(),this._eElement=t,this._pointerTracking=!1,this._pointerDownEventListener=t=>this.onPointerDown(t),this._pointerMoveEventListener=t=>this.onPointerMove(t),this._pointerUpEventListener=t=>this.onPointerUp(t),this._timeout=void 0,this._allowableTargets=[t,...e],this._oDocument=document,this._eBody=document.body,this._nDelay=1800,this._nDistance=10,this._nX=0,this._nY=0,this._nOriginalX=0,this._nOriginalY=0,this._dragging=!1,this._eElement.addEventListener("pointerdown",this._pointerDownEventListener,{passive:!0})}destroy(){this.checkRemovePointerTrackingEventListeners(),this._eElement.removeEventListener("pointerdown",this._pointerDownEventListener)}cancelDrag(){this.processDragStop(void 0)}onPointerDown(t){if(this._allowableTargets.includes(t.target)&&t.isPrimary){const e=this.getPointerCoordinates(t);this.processPointerDown(e)}}processPointerDown(t){this._nOriginalX=t.x,this._nOriginalY=t.y,this._oDocument.addEventListener("pointermove",this._pointerMoveEventListener),this._oDocument.addEventListener("pointerup",this._pointerUpEventListener,{passive:!0}),this._pointerTracking=!0,this._timeout=setTimeout((()=>{try{this.startDrag()}catch(t){throw console.error(t),t}}),this._nDelay)}onPointerMove(t){this._pointerTracking&&(this.processDragMove(t),t.preventDefault())}processDragMove(t){this._nX=t.pageX-this._nOriginalX,this._nY=t.pageY-this._nOriginalY,!1===this._dragging&&(Math.abs(this._nX)>this._nDistance||Math.abs(this._nY)>this._nDistance)&&this.startDrag(),this._dragging&&this.emit("drag",this._nX,this._nY,t)}onPointerUp(t){this.processDragStop(t)}processDragStop(t){var e;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this.checkRemovePointerTrackingEventListeners(),!0===this._dragging&&(this._eBody.classList.remove("lm_dragging"),this._eElement.classList.remove("lm_dragging"),null===(e=this._oDocument.querySelector("iframe"))||void 0===e||e.style.setProperty("pointer-events",""),this._dragging=!1,this.emit("dragStop",t))}checkRemovePointerTrackingEventListeners(){this._pointerTracking&&(this._oDocument.removeEventListener("pointermove",this._pointerMoveEventListener),this._oDocument.removeEventListener("pointerup",this._pointerUpEventListener),this._pointerTracking=!1)}startDrag(){var t;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this._dragging=!0,this._eBody.classList.add("lm_dragging"),this._eElement.classList.add("lm_dragging"),null===(t=this._oDocument.querySelector("iframe"))||void 0===t||t.style.setProperty("pointer-events","none"),this.emit("dragStart",this._nOriginalX,this._nOriginalY)}getPointerCoordinates(t){return{x:t.pageX,y:t.pageY}}}class qt{constructor(t,e,i){this._isVertical=t,this._size=e,this._grabSize=i0){const i=this.createSplitter(Math.max(0,e-1)).element;e>0?(this.contentItems[e-1].element.insertAdjacentElement("afterend",i),i.insertAdjacentElement("afterend",t.element)):(this.contentItems[0].element.insertAdjacentElement("beforebegin",i),i.insertAdjacentElement("beforebegin",t.element))}else this._childElementContainer.appendChild(t.element);super.addChild(t,e);const n=1/this.contentItems.length*100;if(!0===i)return this.emitBaseBubblingEvent("stateChanged"),e;for(let e=0;e0&&(this.calculateRelativeSizes(),this.setAbsoluteSizes()),this.emitBaseBubblingEvent("stateChanged"),this.emit("resize")}setAbsoluteSizes(){const t=this.calculateAbsoluteSizes();for(let e=0;e0&&t.itemSizes[e]++,this._isColumn?(Tt(this.contentItems[e].element,t.crossAxisSize),At(this.contentItems[e].element,t.itemSizes[e])):(Tt(this.contentItems[e].element,t.itemSizes[e]),At(this.contentItems[e].element,t.crossAxisSize))}calculateAbsoluteSizes(){const t=(this.contentItems.length-1)*this._splitterSize,{width:e,height:i}=kt(this.element);let n,o;this._isColumn?(n=i-t,o=e):(n=e-t,o=i);let s=0;const r=[];for(let t=0;t0){const n=100-t;for(let t=0;t100&&e.length>0){for(let t=0;te)return;{const r=i/e;let a=i;for(let e=0;ethis.onSplitterDrag(e,t,i))),e.on("dragStop",(()=>this.onSplitterDragStop(e))),e.on("dragStart",(()=>this.onSplitterDragStart(e))),this._splitter.splice(t,0,e),e}getSplitItems(t){const e=this._splitter.indexOf(t);return{before:this.contentItems[e],after:this.contentItems[e+1]}}calculateContentItemMinSize(t){const e=t.minSize;if(void 0!==e){if(t.minSizeUnit===ht.Pixel)return e;throw new X("ROCGMD98831",JSON.stringify(t))}{const t=this.layoutManager.layoutConfig.dimensions;return this._isColumn?t.defaultMinItemHeight:t.defaultMinItemWidth}}calculateContentItemsTotalMinSize(t){let e=0;for(const i of t)e+=this.calculateContentItemMinSize(i);return e}onSplitterDragStart(t){const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=this.calculateContentItemsTotalMinSize(e.before.contentItems),s=this.calculateContentItemsTotalMinSize(e.after.contentItems);this._splitterPosition=0,this._splitterMinPosition=-1*(i-o),this._splitterMaxPosition=n-s}onSplitterDrag(t,e,i){let n=this._isColumn?i:e;if(null===this._splitterMinPosition||null===this._splitterMaxPosition)throw new K("ROCOSD59226");n=Math.max(n,this._splitterMinPosition),n=Math.min(n,this._splitterMaxPosition),this._splitterPosition=n;const o=zt(n);this._isColumn?t.element.style.top=o:t.element.style.left=o}onSplitterDragStop(t){if(null===this._splitterPosition)throw new K("ROCOSDS66932");{const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=(this._splitterPosition+i)/(i+n),s=e.before.size+e.after.size;e.before.size=o*s,e.after.size=(1-o)*s,t.element.style.top=zt(0),t.element.style.left=zt(0),globalThis.requestAnimationFrame((()=>this.updateSize(!1)))}}}!function(t){t.getElementDimensionSize=function(t,e){return"width"===e?function(t){return t.offsetWidth}(t):function(t){return t.offsetHeight}(t)},t.setElementDimensionSize=function(t,e,i){return"width"===e?Tt(t,i):At(t,i)},t.createElement=function(t,e){const i=t.createElement("div");return i.classList.add("lm_item"),e?i.classList.add("lm_column"):i.classList.add("lm_row"),i}}(Xt||(Xt={}));class Yt extends $t{constructor(t,e,i){super(t,vt.create(e),null,Yt.createElement(document)),this.isGround=!0,this._childElementContainer=this.element,this._containerElement=i;let n=null;for(;;){const t=n?n.previousSibling:this._containerElement.lastChild;if(!(t instanceof Element&&t.classList.contains("lm_content")))break;n=t}this._containerElement.insertBefore(this.element,n)}init(){if(!0!==this.isInitialised){this.updateNodeSize();for(let t=0;t0?this.contentItems[0]:this,n.isComponent)throw new Error("Cannot add item as child to ComponentItem");{const t=this.layoutManager.createAndInitContentItem(i,n);return e=n.addChild(t,e),n===this?-1:e}}loadComponentAsRoot(t){this.clearRoot();const e=Ct.resolve(t,!1);if(e.maximised)throw new Error("Root Component cannot be maximised");{const t=new jt(this.layoutManager,e,this);t.init(),this.addChild(t,0)}}addChild(t,e){if(this.contentItems.length>0)throw new Error("Ground node can only have a single child");return this._childElementContainer.appendChild(t.element),e=super.addChild(t,e),this.updateSize(!1),this.emitBaseBubblingEvent("stateChanged"),e}calculateConfigContent(){const t=this.contentItems,e=t.length,i=new Array(e);for(let n=0;n0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e)),this.updateContentItemsSize(!1))}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}createSideAreas(){const t=Yt.Area.oppositeSides,e=new Array(Object.keys(t).length);let i=0;for(const n in t){const o=n,s=this.getElementArea();if(null===s)throw new K("RCSA77553");s.side=o,"2"===t[o][1]?s[o]=s[t[o]]-50:s[o]=s[t[o]]+50,s.surface=(s.x2-s.x1)*(s.y2-s.y1),e[i++]=s}return e}highlightDropZone(t,e,i){this.layoutManager.tabDropPlaceholder.remove(),super.highlightDropZone(t,e,i)}onDrop(t,e){if(t.isComponent){const e=ut.createDefault(),i=t;e.header=mt.Header.createCopy(i.headerConfig);const n=this.layoutManager.createAndInitContentItem(e,this);n.addChild(t),t=n}if(0===this.contentItems.length)this.addChild(t);else{if(t.type===at.row||t.type===at.column){const e=ut.createDefault(),i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}const i="x"==e.side[0]?at.row:at.column,n="2"==e.side[1],o=this.contentItems[0];if(o instanceof Xt&&o.type===i){const e=o.contentItems[n?0:o.contentItems.length-1];o.addChild(t,n?0:void 0,!0),e.size*=.5,t.size=e.size,t.sizeUnit=ht.Percent,o.updateSize(!1)}else{const e=ct.createDefault(i),s=this.layoutManager.createContentItem(e,this);this.replaceChild(o,s),s.addChild(t,n?0:void 0,!0),s.addChild(o,n?void 0:0,!0),o.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}}dock(){throw new X("GID87731")}validateDocking(){throw new X("GIVD87732")}getAllContentItems(){const t=[this];return this.deepGetAllContentItems(this.contentItems,t),t}getConfigMaximisedItems(){const t=[];return this.deepFilterContentItems(this.contentItems,t,(t=>!(!Gt.isStack(t)||!t.initialWantMaximise)||!(!Gt.isComponentItem(t)||!t.initialWantMaximise))),t}getItemsByPopInParentId(t){const e=[];return this.deepFilterContentItems(this.contentItems,e,(e=>e.popInParentIds.includes(t))),e}toConfig(){throw new Error("Cannot generate GroundItem config")}setActiveComponentItem(t,e,i){}updateNodeSize(){const{width:t,height:e}=kt(this._containerElement);Tt(this.element,t),At(this.element,e),this.contentItems.length>0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e))}deepGetAllContentItems(t,e){for(let i=0;ithis.onClick(t),this._touchStartEventListener=t=>this.onTouchStart(t),this._element=document.createElement("div"),this._element.classList.add(i),this._element.title=e,this._header.on("destroy",(()=>this.destroy())),this._element.addEventListener("click",this._clickEventListener,{passive:!0}),this._element.addEventListener("touchstart",this._touchStartEventListener,{passive:!0}),this._header.controlsContainerElement.appendChild(this._element)}get element(){return this._element}destroy(){var t;this._element.removeEventListener("click",this._clickEventListener),this._element.removeEventListener("touchstart",this._touchStartEventListener),null===(t=this._element.parentNode)||void 0===t||t.removeChild(this._element)}onClick(t){this._pushEvent(t)}onTouchStart(t){this._pushEvent(t)}}class Jt{constructor(t,e,i,n,o){var s;this._layoutManager=t,this._componentItem=e,this._closeEvent=i,this._focusEvent=n,this._dragStartEvent=o,this._isActive=!1,this._tabClickListener=t=>this.onTabClickDown(t),this._tabTouchStartListener=t=>this.onTabTouchStart(t),this._closeClickListener=()=>this.onCloseClick(),this._closeTouchStartListener=()=>this.onCloseTouchStart(),this._dragStartListener=(t,e)=>this.onDragStart(t,e),this._contentItemDestroyListener=()=>this.onContentItemDestroy(),this._tabTitleChangedListener=t=>this.setTitle(t),this._element=document.createElement("div"),this._element.classList.add("lm_tab"),this._titleElement=document.createElement("span"),this._titleElement.classList.add("lm_title"),this._closeElement=document.createElement("div"),this._closeElement.classList.add("lm_close_tab"),this._element.appendChild(this._titleElement),this._element.appendChild(this._closeElement),e.isClosable?this._closeElement.style.display="":this._closeElement.style.display="none",this.setTitle(e.title),this._componentItem.on("titleChanged",this._tabTitleChangedListener);(null!==(s=e.reorderEnabled)&&void 0!==s?s:this._layoutManager.layoutConfig.settings.reorderEnabled)&&this.enableReorder(),this._element.addEventListener("click",this._tabClickListener,{passive:!0}),this._element.addEventListener("touchstart",this._tabTouchStartListener,{passive:!0}),this._componentItem.isClosable?(this._closeElement.addEventListener("click",this._closeClickListener,{passive:!0}),this._closeElement.addEventListener("touchstart",this._closeTouchStartListener,{passive:!0})):(this._closeElement.remove(),this._closeElement=void 0),this._componentItem.setTab(this),this._layoutManager.emit("tabCreated",this)}get isActive(){return this._isActive}get componentItem(){return this._componentItem}get contentItem(){return this._componentItem}get element(){return this._element}get titleElement(){return this._titleElement}get closeElement(){return this._closeElement}get reorderEnabled(){return void 0!==this._dragListener}set reorderEnabled(t){t!==this.reorderEnabled&&(t?this.enableReorder():this.disableReorder())}setTitle(t){this._titleElement.innerText=t,this._element.title=t}setActive(t){t!==this._isActive&&(this._isActive=t,t?this._element.classList.add("lm_active"):this._element.classList.remove("lm_active"))}destroy(){var t,e;this._closeEvent=void 0,this._focusEvent=void 0,this._dragStartEvent=void 0,this._element.removeEventListener("click",this._tabClickListener),this._element.removeEventListener("touchstart",this._tabTouchStartListener),null===(t=this._closeElement)||void 0===t||t.removeEventListener("click",this._closeClickListener),null===(e=this._closeElement)||void 0===e||e.removeEventListener("touchstart",this._closeTouchStartListener),this._componentItem.off("titleChanged",this._tabTitleChangedListener),this.reorderEnabled&&this.disableReorder(),this._element.remove()}setBlurred(){this._element.classList.remove("lm_focused"),this._titleElement.classList.remove("lm_focused")}setFocused(){this._element.classList.add("lm_focused"),this._titleElement.classList.add("lm_focused")}onDragStart(t,e){if(void 0===this._dragListener)throw new J("TODSDLU10093");if(void 0===this._dragStartEvent)throw new J("TODS23309");this._dragStartEvent(t,e,this._dragListener,this.componentItem)}onContentItemDestroy(){void 0!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=void 0)}onTabClickDown(t){const e=t.target;e!==this._element&&e!==this._titleElement||(0===t.button?this.notifyFocus():1===t.button&&this._componentItem.isClosable&&this.notifyClose())}onTabTouchStart(t){t.target===this._element&&this.notifyFocus()}onCloseClick(){this.notifyClose()}onCloseTouchStart(){this.notifyClose()}notifyClose(){if(void 0===this._closeEvent)throw new J("TNC15007");this._closeEvent(this._componentItem)}notifyFocus(){if(void 0===this._focusEvent)throw new J("TNA15007");this._focusEvent(this._componentItem)}enableReorder(){this._dragListener=new Zt(this._element,[this._titleElement]),this._dragListener.on("dragStart",this._dragStartListener),this._componentItem.on("destroy",this._contentItemDestroyListener)}disableReorder(){if(void 0===this._dragListener)throw new J("TDR87745");this._componentItem.off("destroy",this._contentItemDestroyListener),this._dragListener.off("dragStart",this._dragStartListener),this._dragListener=void 0}}class Qt{constructor(t,e,i,n,o){this._layoutManager=t,this._componentRemoveEvent=e,this._componentFocusEvent=i,this._componentDragStartEvent=n,this._dropdownActiveChangedEvent=o,this._tabs=[],this._lastVisibleTabIndex=-1,this._dropdownActive=!1,this._element=document.createElement("section"),this._element.classList.add("lm_tabs"),this._dropdownElement=document.createElement("section"),this._dropdownElement.classList.add("lm_tabdropdown_list"),this._dropdownElement.style.display="none"}get tabs(){return this._tabs}get tabCount(){return this._tabs.length}get lastVisibleTabIndex(){return this._lastVisibleTabIndex}get element(){return this._element}get dropdownElement(){return this._dropdownElement}get dropdownActive(){return this._dropdownActive}destroy(){for(let t=0;tthis.handleTabCloseEvent(t)),(t=>this.handleTabFocusEvent(t)),((t,e,i,n)=>this.handleTabDragStartEvent(t,e,i,n)));void 0===e&&(e=this._tabs.length),this._tabs.splice(e,0,i),ethis._lastVisibleTabIndex){const t=this._tabs[e];for(let t=e;t>0;t--)this._tabs[t]=this._tabs[t-1];this._tabs[0]=t}}updateTabSizes(t,e){let i=!1;this.tryUpdateTabSizes(i,t,e)||(i=!0,this.tryUpdateTabSizes(i,t,e)),i!==this._dropdownActive&&(this._dropdownActive=i,this._dropdownActiveChangedEvent())}tryUpdateTabSizes(t,e,i){if(this._tabs.length>0){if(void 0===i)throw new Error("non-empty tabs must have active component item");let n=0,o=!1;const s=this._layoutManager.layoutConfig.settings.tabOverlapAllowance,r=this._tabs.indexOf(i.tab),a=this._tabs[r];this._lastVisibleTabIndex=-1;for(let i=0;ie){if(o)i===r&&(l.style.zIndex="auto",l.style.marginLeft="",l.parentElement!==this._element&&this._element.appendChild(l));else{let t;if(t=r>0&&r<=i?(d-e)/(i-1):(d-e)/i,tthis.onClick(t),this._touchStartListener=t=>this.onTouchStart(t),this._rowColumnClosable=!0,this._closeButton=null,this._popoutButton=null,this._tabsContainer=new Qt(this._layoutManager,(t=>this.handleTabInitiatedComponentRemoveEvent(t)),(t=>this.handleTabInitiatedComponentFocusEvent(t)),((t,e,i,n)=>this.handleTabInitiatedDragStartEvent(t,e,i,n)),(()=>this.processTabDropdownActiveChanged())),this._show=i.show,this._popoutEnabled=i.popoutEnabled,this._popoutLabel=i.popoutLabel,this._maximiseEnabled=i.maximiseEnabled,this._maximiseLabel=i.maximiseLabel,this._minimiseEnabled=i.minimiseEnabled,this._minimiseLabel=i.minimiseLabel,this._closeEnabled=i.closeEnabled,this._closeLabel=i.closeLabel,this._tabDropdownEnabled=i.tabDropdownEnabled,this._tabDropdownLabel=i.tabDropdownLabel,this.setSide(i.side),this._canRemoveComponent=this._configClosable,this._element=document.createElement("section"),this._element.classList.add("lm_header"),this._controlsContainerElement=document.createElement("section"),this._controlsContainerElement.classList.add("lm_controls"),this._element.appendChild(this._tabsContainer.element),this._element.appendChild(this._controlsContainerElement),this._element.appendChild(this._tabsContainer.dropdownElement),this._element.addEventListener("click",this._clickListener,{passive:!0}),this._element.addEventListener("touchstart",this._touchStartListener,{passive:!0}),this._documentMouseUpListener=()=>this._tabsContainer.hideAdditionalTabsDropdown(),globalThis.document.addEventListener("mouseup",this._documentMouseUpListener,{passive:!0}),this._tabControlOffset=this._layoutManager.layoutConfig.settings.tabControlOffset,this._tabDropdownEnabled&&(this._tabDropdownButton=new Kt(this,this._tabDropdownLabel,"lm_tabdropdown",(()=>this._tabsContainer.showAdditionalTabsDropdown()))),this._popoutEnabled&&(this._popoutButton=new Kt(this,this._popoutLabel,"lm_popout",(()=>this.handleButtonPopoutEvent()))),this._maximiseEnabled&&(this._maximiseButton=new Kt(this,this._maximiseLabel,"lm_maximise",(t=>this.handleButtonMaximiseToggleEvent(t)))),this._configClosable&&(this._closeButton=new Kt(this,this._closeLabel,"lm_close",(()=>s()))),this.processTabDropdownActiveChanged()}get show(){return this._show}get side(){return this._side}get leftRightSided(){return this._leftRightSided}get layoutManager(){return this._layoutManager}get parent(){return this._parent}get tabs(){return this._tabsContainer.tabs}get lastVisibleTabIndex(){return this._tabsContainer.lastVisibleTabIndex}get element(){return this._element}get tabsContainerElement(){return this._tabsContainer.element}get controlsContainerElement(){return this._controlsContainerElement}destroy(){this.emit("destroy"),this._popoutEvent=void 0,this._maximiseToggleEvent=void 0,this._clickEvent=void 0,this._touchStartEvent=void 0,this._componentRemoveEvent=void 0,this._componentFocusEvent=void 0,this._componentDragStartEvent=void 0,this._tabsContainer.destroy(),globalThis.document.removeEventListener("mouseup",this._documentMouseUpListener),this._element.remove()}createTab(t,e){this._tabsContainer.createTab(t,e)}removeTab(t){this._tabsContainer.removeTab(t)}processActiveComponentChanged(t){this._tabsContainer.processActiveComponentChanged(t),this.updateTabSizes()}setSide(t){this._side=t,this._leftRightSided=[nt.right,nt.left].includes(this._side)}setRowColumnClosable(t){this._rowColumnClosable=t,this.updateClosability()}updateClosability(){let t;if(this._configClosable)if(this._rowColumnClosable){t=!0;const e=this.tabs.length;for(let i=0;i1}applyFocusedValue(t){t?this._element.classList.add("lm_focused"):this._element.classList.remove("lm_focused")}processMaximised(){if(void 0===this._maximiseButton)throw new J("HPMAX16997");this._maximiseButton.element.setAttribute("title",this._minimiseLabel)}processMinimised(){if(void 0===this._maximiseButton)throw new J("HPMIN16997");this._maximiseButton.element.setAttribute("title",this._maximiseLabel)}updateTabSizes(){if(this._tabsContainer.tabCount>0){const t=this._show?this._layoutManager.layoutConfig.dimensions.headerHeight:0;let e;this._leftRightSided?(this._element.style.height="",this._element.style.width=zt(t)):(this._element.style.width="",this._element.style.height=zt(t)),e=this._leftRightSided?this._element.offsetHeight-this._controlsContainerElement.offsetHeight-this._tabControlOffset:this._element.offsetWidth-this._controlsContainerElement.offsetWidth-this._tabControlOffset,this._tabsContainer.updateTabSizes(e,this._getActiveComponentItemEvent())}}handleTabInitiatedComponentRemoveEvent(t){if(this._canRemoveComponent){if(void 0===this._componentRemoveEvent)throw new J("HHTCE22294");this._componentRemoveEvent(t)}}handleTabInitiatedComponentFocusEvent(t){if(void 0===this._componentFocusEvent)throw new J("HHTAE22294");this._componentFocusEvent(t)}handleTabInitiatedDragStartEvent(t,e,i,n){if(this._canRemoveComponent){if(void 0===this._componentDragStartEvent)throw new J("HHTDSE22294");this._componentDragStartEvent(t,e,i,n)}else i.cancelDrag()}processTabDropdownActiveChanged(){void 0!==this._tabDropdownButton&&Dt(this._tabDropdownButton.element,this._tabsContainer.dropdownActive)}handleButtonPopoutEvent(){if(this._layoutManager.layoutConfig.settings.popoutWholeStack){if(void 0===this._popoutEvent)throw new J("HHBPOE17834");this._popoutEvent()}else{const t=this._getActiveComponentItemEvent();t&&t.popout()}}handleButtonMaximiseToggleEvent(t){if(void 0===this._maximiseToggleEvent)throw new J("HHBMTE16834");this._maximiseToggleEvent()}onClick(t){t.target===this._element&&this.notifyClick(t)}onTouchStart(t){t.target===this._element&&this.notifyTouchStart(t)}notifyClick(t){if(void 0===this._clickEvent)throw new J("HNHC46834");this._clickEvent(t)}notifyTouchStart(t){if(void 0===this._touchStartEvent)throw new J("HNHTS46834");this._touchStartEvent(t)}}class ee extends $t{constructor(t,e,i){var n,o,s,r,a,l,h,d,c,m,u,p,g,f,v,_,y,C,w;super(t,e,i,ee.createElement(document)),this._headerSideChanged=!1,this._resizeListener=()=>this.handleResize(),this._maximisedListener=()=>this.handleMaximised(),this._minimisedListener=()=>this.handleMinimised(),this._headerConfig=e.header;const I=t.layoutConfig.header,b=e.content;let S;if(1!==b.length)S=void 0;else{S=b[0].header}this._initialWantMaximise=e.maximised,this._initialActiveItemIndex=null!==(n=e.activeItemIndex)&&void 0!==n?n:0;const E=null!==(r=null!==(s=null===(o=this._headerConfig)||void 0===o?void 0:o.show)&&void 0!==s?s:null==S?void 0:S.show)&&void 0!==r?r:I.show,x=null!==(h=null!==(l=null===(a=this._headerConfig)||void 0===a?void 0:a.popout)&&void 0!==l?l:null==S?void 0:S.popout)&&void 0!==h?h:I.popout,L=null!==(m=null!==(c=null===(d=this._headerConfig)||void 0===d?void 0:d.maximise)&&void 0!==c?c:null==S?void 0:S.maximise)&&void 0!==m?m:I.maximise,z=null!==(g=null!==(p=null===(u=this._headerConfig)||void 0===u?void 0:u.close)&&void 0!==p?p:null==S?void 0:S.close)&&void 0!==g?g:I.close,M=null!==(_=null!==(v=null===(f=this._headerConfig)||void 0===f?void 0:f.minimise)&&void 0!==v?v:null==S?void 0:S.minimise)&&void 0!==_?_:I.minimise,P=null!==(w=null!==(C=null===(y=this._headerConfig)||void 0===y?void 0:y.tabDropdown)&&void 0!==C?C:null==S?void 0:S.tabDropdown)&&void 0!==w?w:I.tabDropdown;this._maximisedEnabled=!1!==L;const T={show:!1!==E,side:!1===E?nt.top:E,popoutEnabled:!1!==x,popoutLabel:!1===x?"":x,maximiseEnabled:this._maximisedEnabled,maximiseLabel:!1===L?"":L,closeEnabled:!1!==z,closeLabel:!1===z?"":z,minimiseEnabled:!0,minimiseLabel:M,tabDropdownEnabled:!1!==P,tabDropdownLabel:!1===P?"":P};this._header=new te(t,this,T,e.isClosable&&!1!==z,(()=>this.getActiveComponentItem()),(()=>this.remove()),(()=>this.handlePopoutEvent()),(()=>this.toggleMaximise()),(t=>this.handleHeaderClickEvent(t)),(t=>this.handleHeaderTouchStartEvent(t)),(t=>this.handleHeaderComponentRemoveEvent(t)),(t=>this.handleHeaderComponentFocusEvent(t)),((t,e,i,n)=>this.handleHeaderComponentStartDragEvent(t,e,i,n))),this.isStack=!0,this._childElementContainer=document.createElement("section"),this._childElementContainer.classList.add("lm_items"),this.on("resize",this._resizeListener),this._maximisedEnabled&&(this.on("maximised",this._maximisedListener),this.on("minimised",this._minimisedListener)),this.element.appendChild(this._header.element),this.element.appendChild(this._childElementContainer),this.setupHeaderPosition(),this._header.updateClosability()}get childElementContainer(){return this._childElementContainer}get header(){return this._header}get headerShow(){return this._header.show}get headerSide(){return this._header.side}get headerLeftRightSided(){return this._header.leftRightSided}get contentAreaDimensions(){return this._contentAreaDimensions}get initialWantMaximise(){return this._initialWantMaximise}get isMaximised(){return this===this.layoutManager.maximisedStack}get stackParent(){if(!this.parent)throw new Error("Stack should always have a parent");return this.parent}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}init(){if(!0===this.isInitialised)return;this.updateNodeSize();for(let t=0;t0){if(this._initialActiveItemIndex<0||this._initialActiveItemIndex>=e)throw new Error(`ActiveItemIndex out of range: ${this._initialActiveItemIndex} id: ${this.id}`);for(let i=0;ithis.contentItems.length)throw e-=1,new X("SAC99728");if(t instanceof jt)return e=super.addChild(t,e),this._childElementContainer.appendChild(t.element),this._header.createTab(t,e),this.setActiveComponentItem(t,i),this._header.updateTabSizes(),this.updateSize(!1),t.container.setBaseLogicalZIndex(),this._header.updateClosability(),this.emitStateChangedEvent(),e;throw new X("SACC88532")}removeChild(t,e){const i=t,n=this.contentItems.indexOf(i),o=1===this.contentItems.length;if(this._activeComponentItem===i&&(i.focused&&i.blur(),!o)){const t=0===n?1:n-1;this.setActiveComponentItem(this.contentItems[t],!1)}this._header.removeTab(i),super.removeChild(i,e),o||this._header.updateClosability(),this.emitStateChangedEvent()}toggleMaximise(){this.isMaximised?this.minimise():this.maximise()}maximise(){if(!this.isMaximised){this.layoutManager.setMaximisedStack(this);const t=this.contentItems,e=t.length;for(let i=0;i0&&void 0===t)throw new Error("expected non-empty stack to have an active component item");return{type:"stack",content:this.calculateConfigContent(),size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,isClosable:this.isClosable,maximised:this.isMaximised,header:this.createHeaderConfig(),activeItemIndex:t}}onDrop(t,e){if("header"===this._dropSegment){if(this.resetHeaderDropZone(),void 0===this._dropIndex)throw new J("SODDI68990");return void this.addChild(t,this._dropIndex)}if("body"===this._dropSegment)return void this.addChild(t,0,!0);const i="top"===this._dropSegment||"bottom"===this._dropSegment,n="left"===this._dropSegment||"right"===this._dropSegment,o="top"===this._dropSegment||"left"===this._dropSegment,s=i&&this.stackParent.isColumn||n&&this.stackParent.isRow;if(t.isComponent){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createAndInitContentItem(e,this);i.addChild(t),t=i}if(t.type===at.row||t.type===at.column){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}if(s){const e=this.stackParent.contentItems.indexOf(this);this.stackParent.addChild(t,o?e:e+1,!0),this.size*=.5,t.size=this.size,t.sizeUnit=this.sizeUnit,this.stackParent.updateSize(!1)}else{const e=i?at.column:at.row,n=ct.createDefault(e),s=this.layoutManager.createContentItem(n,this);this.stackParent.replaceChild(this,s),s.addChild(t,o?0:void 0,!0),s.addChild(this,o?void 0:0,!0),this.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}highlightDropZone(t,e){for(const i in this._contentAreaDimensions){const n=i,o=this._contentAreaDimensions[n].hoverArea;if(o.x1t&&o.y1e)return void("header"===n?(this._dropSegment="header",this.highlightHeaderDropZone(this._header.leftRightSided?e:t)):(this.resetHeaderDropZone(),this.highlightBodyDropZone(n)))}}getArea(){if("none"===this.element.style.display)return null;const t=super.getElementArea(this._header.element),e=super.getElementArea(this._childElementContainer);if(null===t||null===e)throw new K("SGAHC13086");const i=e.x2-e.x1,n=e.y2-e.y1;return this._contentAreaDimensions={header:{hoverArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2},highlightArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2}}},0===this.contentItems.length?(this._contentAreaDimensions.body={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2}},super.getElementArea(this.element)):(this._contentAreaDimensions.left={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x1+.25*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x1+.5*i,y2:e.y2}},this._contentAreaDimensions.top={hoverArea:{x1:e.x1+.25*i,y1:e.y1,x2:e.x1+.75*i,y2:e.y1+.5*n},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y1+.5*n}},this._contentAreaDimensions.right={hoverArea:{x1:e.x1+.75*i,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1+.5*i,y1:e.y1,x2:e.x2,y2:e.y2}},this._contentAreaDimensions.bottom={hoverArea:{x1:e.x1+.25*i,y1:e.y1+.5*n,x2:e.x1+.75*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1+.5*n,x2:e.x2,y2:e.y2}},super.getElementArea(this.element))}positionHeader(t){this._header.side!==t&&(this._header.setSide(t),this._headerSideChanged=!0,this.setupHeaderPosition())}updateNodeSize(){if("none"!==this.element.style.display){const t=kt(this.element);if(this._header.show){t[this._header.leftRightSided?it.width:it.height]-=this.layoutManager.layoutConfig.dimensions.headerHeight}this._childElementContainer.style.width=zt(t.width),this._childElementContainer.style.height=zt(t.height);for(let e=0;e=o&&tthis.onDrag(t,e,i))),this._dragListener.on("dragStop",(()=>this.onDrop())),this.createDragProxyElements(t,e),null===this._componentItem.parent)throw new K("DPC10097");this._componentItemFocused=this._componentItem.focused,this._componentItemFocused&&this._componentItem.blur(),this._componentItem.parent.removeChild(this._componentItem,!0),this.setDimensions(),document.body.appendChild(this._element),this.determineMinMaxXY(),this._layoutManager.calculateItemAreas(),this.setDropPosition(t,e)}get element(){return this._element}createDragProxyElements(t,e){this._element=document.createElement("div"),this._element.classList.add("lm_dragProxy");const i=document.createElement("div");i.classList.add("lm_header");const n=document.createElement("div");n.classList.add("lm_tabs");const o=document.createElement("div");o.classList.add("lm_tab");const s=document.createElement("span");s.classList.add("lm_title"),o.appendChild(s),n.appendChild(o),i.appendChild(n),this._proxyContainerElement=document.createElement("div"),this._proxyContainerElement.classList.add("lm_content"),this._element.appendChild(i),this._element.appendChild(this._proxyContainerElement),this._originalParent instanceof ee&&this._originalParent.headerShow&&(this._sided=this._originalParent.headerLeftRightSided,this._element.classList.add("lm_"+this._originalParent.headerSide),[nt.right,nt.bottom].indexOf(this._originalParent.headerSide)>=0&&this._proxyContainerElement.insertAdjacentElement("afterend",i)),this._element.style.left=zt(t),this._element.style.top=zt(e),o.setAttribute("title",this._componentItem.title),s.insertAdjacentText("afterbegin",this._componentItem.title),this._proxyContainerElement.appendChild(this._componentItem.element)}determineMinMaxXY(){const t=this._layoutManager.groundItem;if(void 0===t)throw new J("DPDMMXY73109");{const e=t.element.getBoundingClientRect();this._minX=e.left+document.body.scrollLeft,this._minY=e.top+document.body.scrollTop,this._maxX=this._minX+e.width,this._maxY=this._minY+e.height}}onDrag(t,e,i){const n=i.pageX,o=i.pageY;this.setDropPosition(n,o),this._componentItem.drag()}setDropPosition(t,e){this._layoutManager.layoutConfig.settings.constrainDragToContainer&&(t<=this._minX?t=Math.ceil(this._minX):t>=this._maxX&&(t=Math.floor(this._maxX)),e<=this._minY?e=Math.ceil(this._minY):e>=this._maxY&&(e=Math.floor(this._maxY))),this._element.style.left=zt(t),this._element.style.top=zt(e),this._area=this._layoutManager.getArea(t,e),null!==this._area&&(this._lastValidArea=this._area,this._area.contentItem.highlightDropZone(t,e,this._area))}onDrop(){const t=this._layoutManager.dropTargetIndicator;if(null===t)throw new K("DPOD30011");let e;if(t.hide(),this._componentItem.exitDragMode(),null!==this._area)e=this._componentItem,this._area.contentItem.onDrop(e,this._area);else if(null!==this._lastValidArea){e=this._componentItem;this._lastValidArea.contentItem.onDrop(e,this._lastValidArea)}else this._originalParent?(e=this._componentItem,this._originalParent.addChild(e)):this._componentItem.destroy();this._element.remove(),this._layoutManager.emit("itemDropped",this._componentItem),this._componentItemFocused&&void 0!==e&&e.focus()}setDimensions(){const t=this._layoutManager.layoutConfig.dimensions;if(void 0===t)throw new Error("DragProxy.setDimensions: dimensions undefined");let e=t.dragProxyWidth,i=t.dragProxyHeight;if(void 0===e||void 0===i)throw new Error("DragProxy.setDimensions: width and/or height undefined");const n=!1===this._layoutManager.layoutConfig.header.show?0:t.headerHeight;this._element.style.width=zt(e),this._element.style.height=zt(i),e-=this._sided?n:0,i-=this._sided?0:n,this._proxyContainerElement.style.width=zt(e),this._proxyContainerElement.style.height=zt(i),this._componentItem.enterDragMode(e,i),this._componentItem.show()}}class ne{constructor(t,e,i,n,o,s,r){this._layoutManager=t,this._element=e,this._extraAllowableChildTargets=i,this._componentTypeOrFtn=n,this._componentState=o,this._title=s,this._id=r,this._dragListener=null,this._dummyGroundContainer=document.createElement("div");const a=gt.createDefault("row");this._dummyGroundContentItem=new Yt(this._layoutManager,a,this._dummyGroundContainer),this.createDragListener()}destroy(){this.removeDragListener()}createDragListener(){this.removeDragListener(),this._dragListener=new Zt(this._element,this._extraAllowableChildTargets),this._dragListener.on("dragStart",((t,e)=>this.onDragStart(t,e))),this._dragListener.on("dragStop",(()=>this.onDragStop()))}onDragStart(t,e){var i;const n="component";let o;if("function"==typeof this._componentTypeOrFtn){const t=this._componentTypeOrFtn();o=ne.isDragSourceComponentItemConfig(t)?{type:n,componentState:t.state,componentType:t.type,title:null!==(i=t.title)&&void 0!==i?i:this._title}:t}else o={type:n,componentState:this._componentState,componentType:this._componentTypeOrFtn,title:this._title,id:this._id};const s=bt.resolve(o,!1),r=new jt(this._layoutManager,s,this._dummyGroundContentItem);if(this._dummyGroundContentItem.contentItems.push(r),null===this._dragListener)throw new K("DSODSD66746");{const i=new ie(t,e,this._dragListener,this._layoutManager,r,this._dummyGroundContentItem),n=this._layoutManager.transitionIndicator;if(null===n)throw new K("DSODST66746");n.transitionElements(this._element,i.element)}}onDragStop(){this.createDragListener()}removeDragListener(){null!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=null)}}!function(t){t.isDragSourceComponentItemConfig=function(t){return!("componentType"in t)}}(ne||(ne={}));class oe{constructor(){this._element=document.createElement("div"),this._element.classList.add("lm_dropTargetIndicator");const t=document.createElement("div");t.classList.add("lm_inner"),this._element.appendChild(t),document.body.appendChild(this._element)}destroy(){this._element.remove()}highlightArea(t,e){this._element.style.left=zt(t.x1+e),this._element.style.top=zt(t.y1+e),this._element.style.width=zt(t.x2-t.x1-e),this._element.style.height=zt(t.y2-t.y1-e),this._element.style.display="block"}hide(){Dt(this._element,!1)}}class se{constructor(){this._element=document.createElement("div"),this._element.classList.add("lm_transition_indicator"),document.body.appendChild(this._element),this._toElement=null,this._fromDimensions=null,this._totalAnimationDuration=200,this._animationStartTime=null}destroy(){this._element.remove()}transitionElements(t,e){}nextAnimationFrame(){}measure(t){const e=t.getBoundingClientRect();return{left:e.left,top:e.top,width:t.offsetWidth,height:t.offsetHeight}}}class re extends Wt{constructor(t){super(),this._layoutManager=t,this._childEventListener=t=>this.onEventFromChild(t),globalThis.addEventListener(re.ChildEventName,this._childEventListener,{passive:!0})}emit(t,...e){"userBroadcast"===t?this.emitUserBroadcast(...e):super.emit(t,...e)}emitUserBroadcast(...t){this.handleUserBroadcastEvent("userBroadcast",t)}destroy(){globalThis.removeEventListener(re.ChildEventName,this._childEventListener)}handleUserBroadcastEvent(t,e){this._layoutManager.isSubWindow?this.propagateToParent(t,e):this.propagateToThisAndSubtree(t,e)}onEventFromChild(t){const e=t.detail;this.handleUserBroadcastEvent(e.eventName,e.args)}propagateToParent(t,e){const i={bubbles:!0,cancelable:!0,detail:{layoutManager:this._layoutManager,eventName:t,args:e}},n=new CustomEvent(re.ChildEventName,i),o=globalThis.opener;if(null===o)throw new K("EHPTP15778");o.dispatchEvent(n)}propagateToThisAndSubtree(t,e){this.emitUnknown(t,...e);for(let i=0;ithis.handleContainerResize())),this._windowBeforeUnloadListener=()=>this.onBeforeUnload(),this._windowBeforeUnloadListening=!1,this._maximisedStackBeforeDestroyedListener=t=>this.cleanupBeforeMaximisedStackDestroyed(t),this.isSubWindow=t.isSubWindow,this._constructorOrSubWindowLayoutConfig=t.constructorOrSubWindowLayoutConfig,Q.checkInitialise(),dt.checkInitialise(),void 0!==t.containerElement&&(this._containerElement=t.containerElement)}get container(){return this._containerElement}get isInitialised(){return this._isInitialised}get groundItem(){return this._groundItem}get root(){return this._groundItem}get openPopouts(){return this._openPopouts}get dropTargetIndicator(){return this._dropTargetIndicator}get transitionIndicator(){return this._transitionIndicator}get width(){return this._width}get height(){return this._height}get eventHub(){return this._eventHub}get rootItem(){if(void 0===this._groundItem)throw new Error("Cannot access rootItem before init");return 0===this._groundItem.contentItems.length?void 0:this._groundItem.contentItems[0]}get focusedComponentItem(){return this._focusedComponentItem}get tabDropPlaceholder(){return this._tabDropPlaceholder}get maximisedStack(){return this._maximisedStack}get deprecatedConstructor(){return!this.isSubWindow&&void 0!==this._constructorOrSubWindowLayoutConfig}destroy(){if(this._isInitialised){this._windowBeforeUnloadListening&&(globalThis.removeEventListener("beforeunload",this._windowBeforeUnloadListener),this._windowBeforeUnloadListening=!1),!0===this.layoutConfig.settings.closePopoutsOnUnload&&this.closeAllOpenPopouts(),this._resizeObserver.disconnect(),this.checkClearResizeTimeout(),void 0!==this._groundItem&&this._groundItem.destroy(),this._tabDropPlaceholder.remove(),null!==this._dropTargetIndicator&&this._dropTargetIndicator.destroy(),null!==this._transitionIndicator&&this._transitionIndicator.destroy(),this._eventHub.destroy();for(const t of this._dragSources)t.destroy();this._dragSources=[],this._isInitialised=!1}}minifyConfig(t){return _t.minifyConfig(t)}unminifyConfig(t){return _t.unminifyConfig(t)}init(){let t;if(this.setContainer(),this._dropTargetIndicator=new oe,this._transitionIndicator=new se,this.updateSizeFromContainer(),this.isSubWindow){if(void 0===this._constructorOrSubWindowLayoutConfig)throw new J("LMIU07155");{const e=this._constructorOrSubWindowLayoutConfig.root;if(void 0===e)throw new X("LMIC07156");if(!Ct.isComponent(e))throw new X("LMIC07157");t=e;const i=xt.resolve(this._constructorOrSubWindowLayoutConfig);this.layoutConfig=Object.assign(Object.assign({},i),{root:void 0})}}else void 0===this._constructorOrSubWindowLayoutConfig?this.layoutConfig=_t.createDefault():this.layoutConfig=xt.resolve(this._constructorOrSubWindowLayoutConfig);const e=this.layoutConfig;this._groundItem=new Yt(this,e.root,this._containerElement),this._groundItem.init(),this.checkLoadedLayoutMaximiseItem(),this._resizeObserver.observe(this._containerElement),this._isInitialised=!0,this.adjustColumnsResponsive(),this.emit("initialised"),void 0!==t&&this.loadComponentAsRoot(t)}loadLayout(t){if(!this.isInitialised)throw new Error("GoldenLayout: Need to call init() if LayoutConfig with defined root passed to constructor");if(void 0===this._groundItem)throw new J("LMLL11119");this.createSubWindows(),this.layoutConfig=xt.resolve(t),this._groundItem.loadRoot(this.layoutConfig.root),this.checkLoadedLayoutMaximiseItem(),this.adjustColumnsResponsive()}saveLayout(){if(!1===this._isInitialised)throw new Error("Can't create config, layout not yet initialised");if(void 0===this._groundItem)throw new J("LMTC18244");{const t=this._groundItem.calculateConfigContent();let e;e=1!==t.length?void 0:t[0],this.reconcilePopoutWindows();const i=[];for(let t=0;t=0?n=this._groundItem.contentItems[0]:e=0;break;case at.row:case at.column:e=n.addItem(t,i.index);break;case at.stack:if(Ct.isComponent(t)){e=n.addItem(t,i.index);break}throw Error(tt[6]);case at.component:throw new X("LMAIALC87444602");default:throw new Y("LMAIALU98881733",n.type)}if(Ct.isComponent(t)){const t=n.contentItems[e];Gt.isStack(t)&&(n=t,e=0)}return i.parentItem=n,i.index=e,i}}}loadComponentAsRoot(t){if(void 0===this._groundItem)throw new Error("Cannot add item before init");this._groundItem.loadComponentAsRoot(t)}updateSize(t,e){this.setSize(t,e)}setSize(t,e){if(this._width=t,this._height=e,!0===this._isInitialised){if(void 0===this._groundItem)throw new J("LMUS18881");if(this._groundItem.setSize(this._width,this._height),this._maximisedStack){const{width:t,height:e}=kt(this._containerElement);Tt(this._maximisedStack.element,t),At(this._maximisedStack.element,e),this._maximisedStack.updateSize(!1)}this.adjustColumnsResponsive()}}beginSizeInvalidation(){this._sizeInvalidationBeginCount++}endSizeInvalidation(){0==--this._sizeInvalidationBeginCount&&this.updateSizeFromContainer()}updateSizeFromContainer(){const{width:t,height:e}=kt(this._containerElement);this.setSize(t,e)}updateRootSize(t=!1){if(void 0===this._groundItem)throw new J("LMURS28881");this._groundItem.updateSize(t)}createAndInitContentItem(t,e){const i=this.createContentItem(t,e);return i.init(),i}createContentItem(t,e){if("string"!=typeof t.type)throw new G("Missing parameter 'type'",JSON.stringify(t));if(ct.isComponentItem(t)&&!(e instanceof ee)&&e&&!(!0===this.isSubWindow&&e instanceof Yt)){t={type:at.stack,content:[t],size:t.size,sizeUnit:t.sizeUnit,minSize:t.minSize,minSizeUnit:t.minSizeUnit,id:t.id,maximised:t.maximised,isClosable:t.isClosable,activeItemIndex:0,header:void 0}}return this.createContentItemFromConfig(t,e)}findFirstComponentItemById(t){if(void 0===this._groundItem)throw new J("LMFFCIBI82446");return this.findFirstContentItemTypeByIdRecursive(at.component,t,this._groundItem)}createPopout(t,e,i,n){return t instanceof Gt?this.createPopoutFromContentItem(t,e,i,n):this.createPopoutFromItemConfig(t,e,i,n)}createPopoutFromContentItem(t,e,i,n){let o=t.parent,s=t;for(;null!==o&&1===o.contentItems.length&&!o.isGround;)s=o,o=o.parent;if(null===o)throw new K("LMCPFCI00834");{if(void 0===n&&(n=o.contentItems.indexOf(s)),null!==i&&o.addPopInParentId(i),void 0===e){const i=globalThis.screenX||globalThis.screenLeft,n=globalThis.screenY||globalThis.screenTop,o=t.element.offsetLeft,s=t.element.offsetTop,{width:r,height:a}=kt(t.element);e={left:i+o,top:n+s,width:r,height:a}}const r=t.toConfig();if(t.remove(),ft.isRootItemConfig(r))return this.createPopoutFromItemConfig(r,e,i,n);throw new Error(`${tt[0]}`)}}beginVirtualSizedContainerAdding(){0==++this._virtualSizedContainerAddingBeginCount&&(this._virtualSizedContainers.length=0)}addVirtualSizedContainer(t){this._virtualSizedContainers.push(t)}endVirtualSizedContainerAdding(){if(0==--this._virtualSizedContainerAddingBeginCount){const t=this._virtualSizedContainers.length;if(t>0){this.fireBeforeVirtualRectingEvent(t);for(let e=0;ethis.emit("windowOpened",a))),a.on("closed",(()=>this.reconcilePopoutWindows())),this._openPopouts.push(a),this.layoutConfig.settings.closePopoutsOnUnload&&!this._windowBeforeUnloadListening&&(globalThis.addEventListener("beforeunload",this._windowBeforeUnloadListener,{passive:!0}),this._windowBeforeUnloadListening=!0),a}closeAllOpenPopouts(){for(let t=0;tglobalThis.close()),1)}getArea(t,e){let i=null,n=1/0;for(let o=0;o=s.x1&&t=s.y1&&es.surface&&(n=s.surface,i=s)}return i}calculateItemAreas(){const t=this.getAllContentItems(),e=this._groundItem;if(void 0===e)throw new J("LMCIAR44365");if(1!==t.length){e.contentItems[0].isStack?this._itemAreas=[]:this._itemAreas=e.createSideAreas();for(let e=0;e0){let e=t[0];if(Gt.isComponentItem(e)){const t=e.parent;if(null===t)throw new K("LMXLLMI69999");e=t}if(!Gt.isStack(e))throw new X("LMCLLMI19993");e.maximise()}}}processMaximiseStack(t){if(this._maximisedStack=t,t.on("beforeItemDestroyed",this._maximisedStackBeforeDestroyedListener),t.element.classList.add("lm_maximised"),t.element.insertAdjacentElement("afterend",this._maximisePlaceholder),void 0===this._groundItem)throw new J("LMMXI19993");{this._groundItem.element.prepend(t.element);const{width:e,height:i}=kt(this._containerElement);Tt(t.element,e),At(t.element,i),t.updateSize(!0),t.focusActiveContentItem(),this._maximisedStack.emit("maximised"),this.emit("stateChanged")}}processMinimiseMaximisedStack(){if(void 0===this._maximisedStack)throw new X("LMMMS74422");{const t=this._maximisedStack;if(null===t.parent)throw new K("LMMI13668");t.element.classList.remove("lm_maximised"),this._maximisePlaceholder.insertAdjacentElement("afterend",t.element),this._maximisePlaceholder.remove(),this.updateRootSize(!0),this._maximisedStack=void 0,t.off("beforeItemDestroyed",this._maximisedStackBeforeDestroyedListener),t.emit("minimised"),this.emit("stateChanged")}}reconcilePopoutWindows(){const t=[];for(let e=0;e{this._resizeTimeoutId=void 0,this.beginSizeInvalidation(),this.endSizeInvalidation()}),this.resizeDebounceInterval))}checkClearResizeTimeout(){void 0!==this._resizeTimeoutId&&(clearTimeout(this._resizeTimeoutId),this._resizeTimeoutId=void 0)}setContainer(){var t;const e=document.body,i=null!==(t=this._containerElement)&&void 0!==t?t:e;if(i===e){this.resizeWithContainerAutomatically=!0;const t=document.documentElement;t.style.height="100%",t.style.margin="0",t.style.padding="0",t.style.overflow="clip",e.style.height="100%",e.style.margin="0",e.style.padding="0",e.style.overflow="clip"}this._containerElement=i}onBeforeUnload(){this.destroy()}adjustColumnsResponsive(){if(void 0===this._groundItem)throw new J("LMACR20883");if(this._firstLoad=!1,this.useResponsiveLayout()&&!this._updatingColumnsResponsive&&this._groundItem.contentItems.length>0&&this._groundItem.contentItems[0].isRow){if(void 0===this._groundItem||null===this._width)throw new J("LMACR77412");{const t=this._groundItem.contentItems[0].contentItems.length;if(t<=1)return;{const e=this.layoutConfig.dimensions.defaultMinItemWidth;if(t*e<=this._width)return;{this._updatingColumnsResponsive=!0;const i=t-Math.max(Math.floor(this._width/e),1),n=this._groundItem.contentItems[0],o=this.getAllStacks();if(0===o.length)throw new X("LMACRS77413");{const t=o[0];for(let e=0;en?void 0:{parentItem:t,index:o}}}case 1:if(void 0===this._focusedComponentItem)return;{const t=this._focusedComponentItem.parentItem;return this.tryCreateLocationFromParentItem(t,e)}case 2:{const t=this.findFirstContentItemType(at.stack);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 3:{let t=this.findFirstContentItemType(at.row);return void 0!==t?this.tryCreateLocationFromParentItem(t,e):(t=this.findFirstContentItemType(at.column),void 0!==t?this.tryCreateLocationFromParentItem(t,e):void 0)}case 4:{const t=this.findFirstContentItemType(at.row);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 5:{const t=this.findFirstContentItemType(at.column);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 6:if(void 0===this._groundItem)throw new J("LMFLRIF18244");return void 0!==this.rootItem?void 0:void 0===e||0===e?{parentItem:this._groundItem,index:0}:void 0;case 7:if(void 0===this._groundItem)throw new J("LMFLF18244");{const t=this._groundItem.contentItems;if(0===t.length)return void 0===e||0===e?{parentItem:this._groundItem,index:0}:void 0;{const i=t[0];return this.tryCreateLocationFromParentItem(i,e)}}}}tryCreateLocationFromParentItem(t,e){const i=t.contentItems.length;return void 0===e?{parentItem:t,index:i}:e<0||e>i?void 0:{parentItem:t,index:e}}}!function(t){t.createMaximisePlaceElement=function(t){const e=t.createElement("div");return e.classList.add("lm_maximise_place"),e},t.createTabDropPlaceholderElement=function(t){const e=t.createElement("div");return e.classList.add("lm_drop_tab_placeholder"),e},t.defaultLocationSelectors=[{typeId:1,index:void 0},{typeId:2,index:void 0},{typeId:3,index:void 0},{typeId:7,index:void 0}],t.afterFocusedItemIfPossibleLocationSelectors=[{typeId:0,index:1},{typeId:2,index:void 0},{typeId:3,index:void 0},{typeId:7,index:void 0}]}(ae||(ae={}));class le extends ae{constructor(t,e,i,n){if(super(le.createLayoutManagerConstructorParameters(t,e)),this._bindComponentEventHanlderPassedInConstructor=!1,this._creationTimeoutPassed=!1,void 0!==e&&"function"==typeof e&&(this.bindComponentEvent=e,this._bindComponentEventHanlderPassedInConstructor=!0,void 0!==i&&(this.unbindComponentEvent=i)),!this._bindComponentEventHanlderPassedInConstructor&&this.isSubWindow){if(void 0===this._constructorOrSubWindowLayoutConfig)throw new J("VLC98823");{const t=xt.resolve(this._constructorOrSubWindowLayoutConfig);this.layoutConfig=Object.assign(Object.assign({},t),{root:void 0})}}!0!==n&&(this.deprecatedConstructor||this.init())}destroy(){this.bindComponentEvent=void 0,this.unbindComponentEvent=void 0,super.destroy()}init(){if(this._bindComponentEventHanlderPassedInConstructor||"loading"!==document.readyState&&null!==document.body){if(!this._bindComponentEventHanlderPassedInConstructor&&!0===this.isSubWindow&&!this._creationTimeoutPassed)return setTimeout((()=>this.init()),7),void(this._creationTimeoutPassed=!0);!0===this.isSubWindow&&(this._bindComponentEventHanlderPassedInConstructor||this.clearHtmlAndAdjustStylesForSubWindow(),window.__glInstance=this),super.init()}else document.addEventListener("DOMContentLoaded",(()=>this.init()),{passive:!0})}clearHtmlAndAdjustStylesForSubWindow(){const t=document.head,e=new Array(4);e[0]=document.querySelectorAll("body link"),e[1]=document.querySelectorAll("body style"),e[2]=document.querySelectorAll("template"),e[3]=document.querySelectorAll(".gl_keep");for(let i=0;ithis.emit("popIn"))),document.body.appendChild(t),!0}}bindComponent(t,e){if(void 0!==this.bindComponentEvent){return this.bindComponentEvent(t,e)}if(void 0!==this.getComponentEvent)return{virtual:!1,component:this.getComponentEvent(t,e)};{const t=`${tt[2]}: ${JSON.stringify(e)}`;throw new Z(t)}}unbindComponent(t,e,i){if(void 0!==this.unbindComponentEvent)this.unbindComponentEvent(t);else if(!e&&void 0!==this.releaseComponentEvent){if(void 0===i)throw new J("VCUCRCU333998");this.releaseComponentEvent(t,i)}}}!function(t){let e=!1;t.createLayoutManagerConstructorParameters=function(t,i){const n=e?null:new URL(document.location.href).searchParams.get("gl-window");e=!0;const o=null!==n;let s,r;if(null!==n){const e=localStorage.getItem(n);if(null===e)throw new Error("Null gl-window Config");localStorage.removeItem(n);const i=JSON.parse(e),o=_t.unminifyConfig(i);r=xt.fromResolved(o),t instanceof HTMLElement&&(s=t)}else void 0===t?r=void 0:t instanceof HTMLElement?(r=void 0,s=t):r=t,void 0===s&&i instanceof HTMLElement&&(s=i);return{constructorOrSubWindowLayoutConfig:r,isSubWindow:o,containerElement:s}}}(le||(le={}));class he extends le{constructor(t,e,i){super(t,e,i,!0),this._componentTypesMap=new Map,this._registeredComponentMap=new Map,this._virtuableComponentMap=new Map,this._containerVirtualRectingRequiredEventListener=(t,e,i)=>this.handleContainerVirtualRectingRequiredEvent(t,e,i),this._containerVirtualVisibilityChangeRequiredEventListener=(t,e)=>this.handleContainerVirtualVisibilityChangeRequiredEvent(t,e),this._containerVirtualZIndexChangeRequiredEventListener=(t,e,i)=>this.handleContainerVirtualZIndexChangeRequiredEvent(t,e,i),this.deprecatedConstructor||this.init()}registerComponent(t,e,i=!1){if("function"!=typeof e)throw new $("registerComponent() componentConstructorOrFactoryFtn parameter is not a function");if(e.hasOwnProperty("prototype")){const n=e;this.registerComponentConstructor(t,n,i)}else{const n=e;this.registerComponentFactoryFunction(t,n,i)}}registerComponentConstructor(t,e,i=!1){if("function"!=typeof e)throw new Error(tt[1]);if(void 0!==this._componentTypesMap.get(t))throw new Z(`${tt[3]}: ${t}`);this._componentTypesMap.set(t,{constructor:e,factoryFunction:void 0,virtual:i})}registerComponentFactoryFunction(t,e,i=!1){if("function"!=typeof e)throw new Z("Please register a constructor function");if(void 0!==this._componentTypesMap.get(t))throw new Z(`${tt[3]}: ${t}`);this._componentTypesMap.set(t,{constructor:void 0,factoryFunction:e,virtual:i})}registerComponentFunction(t){this.registerGetComponentConstructorCallback(t)}registerGetComponentConstructorCallback(t){if("function"!=typeof t)throw new Error("Please register a callback function");void 0!==this._getComponentConstructorFtn&&console.warn("Multiple component functions are being registered. Only the final registered function will be used."),this._getComponentConstructorFtn=t}getRegisteredComponentTypeNames(){const t=this._componentTypesMap.keys();return Array.from(t)}getComponentInstantiator(t){let e;const i=pt.resolveComponentTypeName(t);return void 0!==i&&(e=this._componentTypesMap.get(i)),void 0===e&&void 0!==this._getComponentConstructorFtn&&(e={constructor:this._getComponentConstructorFtn(t),factoryFunction:void 0,virtual:!1}),e}bindComponent(t,e){let i;const n=pt.resolveComponentTypeName(e);let o;if(void 0!==n&&(i=this._componentTypesMap.get(n)),void 0===i&&void 0!==this._getComponentConstructorFtn&&(i={constructor:this._getComponentConstructorFtn(e),factoryFunction:void 0,virtual:!1}),void 0!==i){const s=i.virtual;let r,a;r=void 0===e.componentState?void 0:Ut({},e.componentState);const l=i.constructor;if(void 0!==l)a=new l(t,r,s);else{const e=i.factoryFunction;if(void 0===e)throw new X("LMBCFFU10008");a=e(t,r,s)}if(s){if(void 0===a)throw new J("GLBCVCU988774");{const e=a,i=e.rootHtmlElement;if(void 0===i)throw new Z(`${tt[5]}: ${n}`);!function(t){const e="absolute";t.style.position!==e&&(t.style.position=e)}(i),this.container.appendChild(i),this._virtuableComponentMap.set(t,e),t.virtualRectingRequiredEvent=this._containerVirtualRectingRequiredEventListener,t.virtualVisibilityChangeRequiredEvent=this._containerVirtualVisibilityChangeRequiredEventListener,t.virtualZIndexChangeRequiredEvent=this._containerVirtualZIndexChangeRequiredEventListener}}this._registeredComponentMap.set(t,a),o={virtual:i.virtual,component:a}}else o=super.bindComponent(t,e);return o}unbindComponent(t,e,i){if(void 0===this._registeredComponentMap.get(t))super.unbindComponent(t,e,i);else{const e=this._virtuableComponentMap.get(t);if(void 0!==e){const i=e.rootHtmlElement;if(void 0===i)throw new X("GLUC77743",t.title);this.container.removeChild(i),this._virtuableComponentMap.delete(t)}}}fireBeforeVirtualRectingEvent(t){this._goldenLayoutBoundingClientRect=this.container.getBoundingClientRect(),super.fireBeforeVirtualRectingEvent(t)}handleContainerVirtualRectingRequiredEvent(t,e,i){const n=this._virtuableComponentMap.get(t);if(void 0===n)throw new J("GLHCSCE55933");{const o=n.rootHtmlElement;if(void 0===o)throw new Z(tt[4]+" "+t.title);{const n=t.element.getBoundingClientRect(),s=n.left-this._goldenLayoutBoundingClientRect.left;o.style.left=zt(s);const r=n.top-this._goldenLayoutBoundingClientRect.top;o.style.top=zt(r),Tt(o,e),At(o,i)}}}handleContainerVirtualVisibilityChangeRequiredEvent(t,e){const i=this._virtuableComponentMap.get(t);if(void 0===i)throw new J("GLHCVVCRE55934");{const n=i.rootHtmlElement;if(void 0===n)throw new Z(tt[4]+" "+t.title);Dt(n,e)}}handleContainerVirtualZIndexChangeRequiredEvent(t,e,i){const n=this._virtuableComponentMap.get(t);if(void 0===n)throw new J("GLHCVZICRE55935");{const e=n.rootHtmlElement;if(void 0===e)throw new Z(tt[4]+" "+t.title);e.style.zIndex=i}}}const de="initial_",ce={show:"top",popout:!1,maximise:!1,close:"close-tab-unused"},me={headerHeight:31},ue={hasHeaders:!0,reorderEnabled:!0},pe={popoutWholeStack:!1,constrainDragToContainer:!1,constrainDragToHeaders:!1,preventDragout:!1,showMaximiseIcon:!1,showPopoutIcon:!1,showCloseIcon:!1,blockedPopoutsThrowError:!0,closePopoutsOnUnload:!0,selectionEnabled:!1};var ge,fe;class ve{constructor(e){this.layout=e,ge.set(this,void 0),fe.set(this,void 0),this.handleResize=t=>{t.forEach((t=>this.resizeElement(t.target)))},this.handleMutation=()=>{this.layout.viewComponentsByContainerElement.forEach((t=>{this.resizeElement(t.container.element)}))},t.__classPrivateFieldSet(this,ge,new ResizeObserver(this.handleResize),"f"),t.__classPrivateFieldSet(this,fe,new MutationObserver(this.handleMutation),"f")}observeMutations(e){t.__classPrivateFieldGet(this,fe,"f")?.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["class"]})}destroy(){t.__classPrivateFieldGet(this,ge,"f").disconnect(),t.__classPrivateFieldGet(this,fe,"f").disconnect()}observeContainer(e){t.__classPrivateFieldGet(this,ge,"f").observe(e)}unobserveContainer(e){t.__classPrivateFieldGet(this,ge,"f").unobserve(e)}resizeElement(t){const e=this.layout.viewComponentsByContainerElement.get(t);e&&e.resize()}}ge=new WeakMap,fe=new WeakMap;var _e={};Object.defineProperty(_e,"__esModule",{value:!0});var ye=_e.BaseItem=void 0;class Ce{constructor(t,e,i){this._item=t,this._layout=e,this._wrap=i}get raw(){return this._item}get layout(){return this._layout}get type(){return this._item.type}get contentItems(){return(this._item.contentItems??[]).map((t=>this._wrap(t)))}get parent(){const t=this._item.parent;return t?this._wrap(t):null}setActiveContentItem(t,e){if("stack"!==this.type)throw new Error(`Cannot call setActiveContentItem from a non-stack item: ${this.type}`);this._item.setActiveContentItem(t.raw,e)}static wrapInternal(t,e,i){const n=Ce.wrapCache.get(e);if(n)return n;const o=new t(e,i,(e=>Ce.wrapInternal(t,e,i)));return Ce.wrapCache.set(e,o),o}}ye=_e.BaseItem=Ce,Ce.wrapCache=new WeakMap;const we=t=>!!t&&"contentItems"in t&&(t.isRow||t.isColumn);class Ie extends ye{isRoot(){return!!this._item.parent?.isGround}getBounds(){return this._item.element.getBoundingClientRect()}get viewName(){if(this._item.isComponent){const{component:t}=this._item;return t.identity.name}throw new Error("View name not found")}onDestroyed(t){const e=({target:i})=>{i===this._item&&(t(),this._item.off("itemDestroyed",e))};this._item.on("itemDestroyed",e)}createAdjacentStack({position:t="right"}={}){const e=this.raw;if(ee.isStack(e)&&e.parent){const i=["top","bottom"].includes(t)?"column":"row",n=["left","top"].includes(t)?1:0,o=we(e.parent)?e.parent:e.layoutManager,s=o,r=e.parent.contentItems.indexOf(e);e.parent.isGround&&e.parent.removeChild(e,!0);const a=o.newItem({type:i,content:[{type:"stack",content:[]}]},r);if(!a)throw new Error("createAdjacentStack: Failed to create new container");const l=a.contentItems[0];return a.addChild(this.raw,n),we(s)&&s.removeChild(e,!0),this._wrap(l)}throw new Error(`Cannot creat adjacent stacks for type: ${e.type}, must be type 'stack'`)}setActiveContentItem(t,e=!0){if(!ee.isStack(this._item))throw new Error(`Cannot call setActiveContentItem from a non-stack item: ${this.type}`);this._item.setActiveComponentItem(t.raw,!e)}static wrap(t,e){return ye.wrapInternal(Ie,t,e)}}function be(t=[],e){for(const i of t)"component"===i.type?Object.keys(e).forEach((t=>{t in i&&(i.componentState={[`${de}${t}`]:i[t],...i.componentState}),i[t]=e[t]})):be(i.content,e)}function Se(t=[],e,i){for(const n of t)if("component"===n.type)Object.keys(e).forEach((t=>{if(`${de}${t}`in n.componentState)return n[t]=n.componentState[`${de}${t}`],void delete n.componentState[`${de}${t}`];n[t]=e[t]}));else{if(n.size&&("row"===i||"column"===i)){n["row"===i?"width":"height"]=n.size?.includes(".")?parseFloat(n.size):parseInt(n.size)}Se(n.content,e,n.type)}}function Ee(t){if(t.root){t.root.content&&Se([t.root],{componentName:"view",isClosable:!0});const e=t.root;t.content=[e],delete t.root}return t}const xe=e=>class extends e{connectedCallback(){if(!this.name||!this.uuid)throw new Error(" Name or uuid attribute missing");if(!this.src)throw new Error(" missing 'src' attribute.");this.#t||(this.#t=document.createElement("iframe"),this.#t.src=this.src,this.#t.style.height="100%",this.#t.style.width="100%",this.#t.style.border="none",this.forceFrameName?this.#t.setAttribute("name",this.forceFrameName):this.#t.setAttribute("name",t.encodeOptions({brokerUrl:this.brokerUrl,name:this.name,uuid:this.uuid,providerId:this.providerId,contextGroup:this.contextGroup},"of-frame")),this.#t.setAttribute("id",this.name),this.appendChild(this.#t))}#t;get brokerUrl(){return this.getAttribute("of-broker")}set brokerUrl(t){t&&this.setAttribute("of-broker",t)}get name(){return this.getAttribute("of-name")}set name(t){t&&this.setAttribute("of-name",t)}get forceFrameName(){return this.getAttribute("forceFrameName")}set forceFrameName(t){t&&this.setAttribute("forceFrameName",t)}get uuid(){return this.getAttribute("of-uuid")}set uuid(t){t&&this.setAttribute("of-uuid",t)}get src(){return this.getAttribute("src")}set src(t){t&&this.setAttribute("src",t)}get providerId(){return this.getAttribute("of-provider-id")}set providerId(t){t&&this.setAttribute("of-provider-id",t)}get contextGroup(){return this.getAttribute("of-context-group")}set contextGroup(t){t&&this.setAttribute("of-context-group",t)}static get observedAttributes(){return["name"]}};class Le{static create(t){const e=document.createElement("of-view");return Object.entries(t).forEach((([t,i])=>{e.setAttribute(t,i)})),e}}customElements.define("of-view",xe(HTMLElement));class ze{constructor(t,i,n,{brokerUrl:o,interopConfig:s},r){this.container=t,this.config=i,this.ofView=null,this.isDragging=()=>this.container.tab.element?.className.includes("lm_dragging")??!1;const{url:a,web:l,interop:h,name:d}=i||{},c=d??`internal-generated-view-${e.v4()}`;if(this.identity={uuid:n,name:c},this.container.element.setAttribute("of-name",c),this.container.element.id=`container-${c}`,this.container.parent.id=c,void 0===a)return void this.handleUrlMissing();const m=this.updateTitleIfNotSet(a),u={"of-broker":o,"of-uuid":n,"of-name":c,src:a};l?.frameName&&(u.forceFrameName=l.frameName);const p=h?.currentContextGroup??s?.currentContextGroup;p&&(u["of-context-group"]=p),s?.providerId&&(u["of-provider-id"]=s?.providerId),this.ofView=Le.create(u),this.ofView.title=m??`Iframe: ${a}`,r.appendChild(this.ofView),this.ofView.style.position="absolute"}updateTitleIfNotSet(t){return"view"===this.container.parent.title&&this.container.parent.setTitle(t),this.container.parent.title}handleUrlMissing(){const t=document.createElement("div");t.setAttribute("style","padding: 20px");t.innerText="No URL provided",this.container.element.appendChild(t)}destroy(){this.ofView?.remove(),this.ofView=null}closeView(){this.container.close()}resize(){if(this.ofView){if(this.isDragging())return void(this.ofView.style.display="none");const t=this.container.element.getBoundingClientRect();this.ofView.style.position="absolute",this.ofView.style.height=`${t.height}px`,this.ofView.style.width=`${t.width}px`,this.ofView.style.inset=`${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`,this.ofView.style.display="block"}}}class Me extends U{static overrideConfig(t){const e={...ue,...t.settings,...pe};return e.reorderEnabled?be(t.content,{isClosable:!0}):be(t.content,{reorderEnabled:!1}),{dimensions:me,...t,settings:e,header:{...ce,show:!1!==t.settings?.hasHeaders&&ce.show}}}constructor(t,e,i,{options:n},o,s){super(),this.identity=t,this.container=e,this.initialConfig=i,this.layoutManager=o,this.platformProvider=s,this.viewComponentsByContainerElement=new Map,this.layoutContentCache=_.getSingleInstance(),this.reparentingViews=new Set,this.goldenLayoutDestroyed=!1,this.createViewComponent=(t,e)=>{m.handleSharedView(this.layoutManager,this.identity,e);const i=new ze(t,e,this.identity.uuid,this.options,this.iframeContainer);return e&&!1===e[`${de}isClosable`]&&this.stylesheet.insertRule(`#tab-${i.identity.name} .lm_close_tab { display: none; }`),this.viewComponentsByContainerElement.set(t.element,i),this.resizeController.observeContainer(t.element),i},this.iframeContainer=document.createElement("div"),this.iframeContainer.id=`openfin-layout-iframe-container-${this.identity.layoutName}`,this.domEmitter=new V(e),this.setupStylesheets(),this.layout=new he(this.container),this.layout.resizeWithContainerAutomatically=!0,this.options=n,this.layout.registerComponent("view",this.createViewComponent),this.setupListeners(),this.resizeController=new ve(this),this.layout.loadLayout(Me.overrideConfig(i));const r=document.createElement("div");r.id=`openfin-layout-shadow-container-${this.identity.layoutName}`,r.attachShadow({mode:"open",delegatesFocus:!1}).appendChild(this.iframeContainer),this.container.appendChild(r),this.resizeController.observeMutations(this.container)}getStackByView({name:t}){const e=this.layout.findFirstComponentItemById(t);if(e?.parent&&e?.parent?.isStack)return Ie.wrap(e.parent,this)}getRoot(){return Ie.wrap(this.layout.rootItem,this)}async platformCloseView(t){const e=[...this.viewComponentsByContainerElement.values()].find((e=>e.identity.name===t.name));if(!e)throw new Error(`View with name: ${t.name} not found in layout.`);e.closeView()}async platformCreateView(t,{location:e,targetView:i}={}){if(i)throw new Error("TargetView not supported in web");const n={options:this.platformProvider.normalizeOptions(t),target:this.identity,location:e};return this.insertView(n)}setupStylesheets(){if(this.container.setAttribute("data-openfin-layout-name",this.identity.layoutName),this.stylesheet=new CSSStyleSheet,this.stylesheet.insertRule(".lm_close { display: none; }"),document.adoptedStyleSheets.push(this.stylesheet),this.initialConfig.settings?.preventSplitterResize){const t=`\n [data-openfin-layout-name='${this.identity.layoutName}'] .lm_splitter {\n pointer-events: none;\n }`;this.stylesheet.insertRule(t)}}insertView({options:t,location:e,targetView:i}){const n=e?this.layoutContentCache.getItemOrUndefined(e.id):void 0,o=i?this.layoutContentCache.getItemOrUndefined(i.name):void 0,s=n??o??Ie.wrap(this.layout.rootItem,this);let r;if(ee.isStack(s.raw))r=s.raw;else{if(!we(s.raw))throw new Error("Cannot add a view at the requested location");r=s.raw.newItem({type:"stack",content:[]})}const a=Math.min(r.contentItems.length,e?.index??r.contentItems.length);let l=this.layout.findFirstComponentItemById(t.name);l?(l.parent&&l.parent.removeChild(l,!0),r.addChild(l,a)):l=r.newComponent("view",t,t.title??t.url??"Default Title",a);const h=l.component.identity;return Promise.resolve({identity:h})}replaceView({viewToReplace:t,newView:e}){throw new Error("Method not implemented.")}replaceLayout(t){throw new Error("Method not implemented.")}async cleanupView(t){}applyPreset(t){throw new Error("Method not implemented.")}getCurrentViews(){return[...this.viewComponentsByContainerElement.values()].map((t=>t.identity))}async getFrameSnapshot(){return Ee(xt.fromResolved(this.layout.toConfig()))}isVisible(){return W(this.container)}async onViewDetached({viewIdentity:t}){this.reparentingViews.add(t.name),this.platformCloseView(t)}async destroy(){this.goldenLayoutDestroyed||(this.goldenLayoutDestroyed=!0,this.layout.destroy()),this.iframeContainer.remove(),this.resizeController.destroy(),document.adoptedStyleSheets=document.adoptedStyleSheets.filter((t=>t!==this.stylesheet)),this.viewComponentsByContainerElement.clear()}setupListeners(){this.container.addEventListener("pointerdown",(t=>{if(t.target instanceof HTMLElement){const e=t.target.classList;["lm_tab","lm_title","lm_splitter","lm_drag_handle"].some((t=>e.contains(t)))&&(this.handleDragStart(),2===t.button&&t.stopPropagation())}}),!0),document.addEventListener("pointerup",(()=>this.handleDragEnd()),!0),this.layout.on("tabCreated",(t=>{const e=t.componentItem.component;t.element.id=`tab-${e.identity.name}`,this.domEmitter.dispatchLocalEvent("tab-created",e.identity)})),this.layout.on("itemCreated",(({target:t})=>{const e=t;if(Gt.isComponentItem(e)){const t=e.component;this.domEmitter.dispatchLocalEvent("container-created",t.identity)}})),this.layout.on("itemDestroyed",(t=>{const e=t.target;if(Gt.isComponentItem(e)){const t=e.component;this.removeViewComponent(t)}})),this.layout.on("itemDropped",(()=>{this.handleDragEnd()}))}handleDragStart(){this.iframeContainer.style.pointerEvents="none"}handleDragEnd(){this.iframeContainer.style.pointerEvents=""}removeViewComponent(t){if(t.config&&!1===t.config[`${de}isClosable`]){const e=[...this.stylesheet.cssRules].findIndex((e=>e.cssText.includes(`#tab-${t.identity.name}`)));this.stylesheet.deleteRule(e)}t.destroy(),this.viewComponentsByContainerElement.delete(t.container.element),this.resizeController.unobserveContainer(t.container.element),this.reparentingViews.has(t.identity.name)?this.reparentingViews.delete(t.identity.name):this.platformProvider.closeView(t.identity.name);0===this.getCurrentViews().length&&(this.goldenLayoutDestroyed||(this.goldenLayoutDestroyed=!0,m.handleLastViewRemoved(this.layoutManager,this.identity)))}}class Pe{constructor(t,e,i,n){this.windowIdentity=t,this.connectConfig=e,this.provider=i,this.fallbackContainer=n}async createLayout(t,e){if(!("container"in t)&&!this.fallbackContainer)throw new Error("Container property is not optional in web");const{layoutName:i}=t,n=t,o=this.provider.initLayoutViews(n),s=n.container??this.fallbackContainer,r={...this.windowIdentity,layoutName:i},a=new Me(r,s,o,this.connectConfig,e,this.provider);m.registerLayout(e,i,a),this.fallbackContainer=null}async getLayoutSnapshot(t){return t.getLayoutSnapshot()}async handleLastViewRemoved(t){}}class Te{static async init(e){const i=e.getFin().InterApplicationBus.Channel,n=await i.create(`custom-frame-${e.me.uuid}`);return n.setDefaultAction((async(t,{target:e,opts:i},o)=>{const s=n.connections.find((t=>t.name===e.name));if(s)return n.dispatch(s,t,{...i,target:e});throw new Error(`Client with name ${e.name} not found`)})),await t.relayChannelClientApi_1(n,"layout-relay"),new Te(e)}constructor(t){this.wire=t,this.viewNames=new Set}normalizeOptions(t,i="default"){const n=this.wire.me.uuid;let{name:o=`internal-generated-view-${e.v4()}`}=t;return o.match(/^internal-generated-view-/)&&this.viewNames.has(o)&&"duplicate"===i&&(o=`internal-generated-view-${e.v4()}`),this.viewNames.add(o),{...t,name:o,uuid:n}}closeView(t){this.viewNames.delete(t)}initLayoutViews({layout:t,multiInstanceViewBehavior:e}){return H((t=>{if("component"===t.type&&t.componentState){const i=this.normalizeOptions(t.componentState,e);return{...t,componentState:i}}return t}),t)}}var Ae;const ke=t=>t;Ae=new WeakMap,exports.WebLayoutEntryPoint=class{constructor(e){Ae.set(this,void 0),this.initLayoutManager=async(e,i,{container:n,layoutManagerOverride:o})=>{const s=await Te.init(i),r=o??ke,a=new Pe(i.me,t.__classPrivateFieldGet(this,Ae,"f"),s,n),l=new(r(m.createClosedConstructor(a)));return await M(i,l),l},this.applyLayoutSnapshot=async(e,i,n)=>{await i.applyLayoutSnapshot(t.__classPrivateFieldGet(this,Ae,"f").platform.layoutSnapshot)},this.createLayout=async(t,e)=>m.createLayout(t,e),this.destroyLayout=async(t,e)=>m.destroyLayout(t,e),t.__classPrivateFieldSet(this,Ae,e,"f")}}; @@ -7340,7 +7340,7 @@ module.exports = stubFalse; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.init = init; -const core_web_1 = __webpack_require__(/*! @openfin/core-web */ "./node_modules/@openfin/core-web/out/api-client.js"); +const core_web_1 = __webpack_require__(/*! @openfin/core-web */ "../../node_modules/@openfin/core-web/out/api-client.js"); const settings_1 = __webpack_require__(/*! ./settings */ "./client/src/platform/settings.ts"); /** * Initializes the OpenFin Web Broker connection. @@ -8405,7 +8405,7 @@ function version(uuid) { /******/ /************************************************************************/ var __webpack_exports__ = {}; -// This entry need to be wrapped in an IIFE because it need to be in strict mode. +// This entry needs to be wrapped in an IIFE because it needs to be in strict mode. (() => { "use strict"; var exports = __webpack_exports__; diff --git a/web/v19.2.0/web-layout/js/fdc3-panel.bundle.js.map b/web/v19.2.0/web-layout/js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A;AACA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,2CAA2C,UAAU;AACrD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;ACrJA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEY;;AAEZ,eAAe,mBAAO,CAAC,wDAAW;AAClC,gBAAgB,mBAAO,CAAC,oDAAS;AACjC;AACA;AACA;AACA;;AAEA,cAAc;AACd,kBAAkB;AAClB,yBAAyB;;AAEzB;AACA,kBAAkB;;AAElB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,kBAAkB,YAAY;AAC9B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA,wCAAwC,SAAS;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;;AAEA;AACA;AACA,cAAc,iBAAiB;AAC/B;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,iDAAiD,EAAE;AACnD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C;AAC1C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA,yBAAyB,eAAe;AACxC;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,yBAAyB,QAAQ;AACjC;AACA,sBAAsB,eAAe;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc,YAAY;AAC1B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB,sBAAsB;AACxC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,mBAAmB;AACnB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA,oBAAoB,SAAS;AAC7B;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA,qBAAqB,WAAW,GAAG,IAAI;AACvC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA,gBAAgB,WAAW,GAAG,IAAI,KAAK,aAAa;AACpD;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;;AAEA;AACA,GAAG;AACH;AACA;AACA,mBAAmB,KAAK,mDAAmD,cAAc;AACzF,GAAG;AACH;AACA;AACA,+BAA+B,IAAI;AACnC;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,MAAM,aAAa,SAAS;AACtD;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,SAAS,gBAAgB;AACzB,cAAc,oBAAoB,EAAE,IAAI;AACxC;AACA,YAAY,gBAAgB,EAAE,IAAI;AAClC;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,GAAG,SAAS,GAAG,KAAK,qBAAqB,EAAE,EAAE;AACpE,QAAQ;AACR,yBAAyB,GAAG,KAAK,yBAAyB,EAAE,EAAE;AAC9D,mBAAmB,yBAAyB,EAAE,EAAE;AAChD;AACA,MAAM;AACN,oBAAoB,IAAI,EAAE,GAAG,SAAS,IAAI,EAAE,EAAE;AAC9C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,0CAA0C,cAAc,SAAS,OAAO;AACxE;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,kBAAkB,YAAY;AAC9B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,kBAAkB,gBAAgB;AAClC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,kBAAkB,gBAAgB;AAClC;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,cAAc,YAAY;AAC1B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,QAAQ;AAC1B;AACA,oBAAoB,QAAQ;AAC5B;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;;;;;ACzjEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEa;;AAEb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB;;AAEnB;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,sBAAsB;AACxC;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA,eAAe;AACf;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA,oBAAoB,SAAS;AAC7B;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;;AAEA,kCAAkC,QAAQ;AAC1C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oBAAoB,iBAAiB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,QAAQ;AACR;AACA,uCAAuC,QAAQ;AAC/C;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,OAAO;AACzB;AACA;AACA;;AAEA;AACA,SAAS,yBAAyB;AAClC;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,gBAAgB;AAClC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,8DAA8D,YAAY;AAC1E;AACA,8DAA8D,YAAY;AAC1E;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,qCAAqC,YAAY;AACjD;AACA;AACA;AACA;AACA;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AACA;AACA;;AAEA;;;;;;;;;;;AC1BA,WAAW,mBAAO,CAAC,mDAAS;;AAE5B;AACA;;AAEA;;;;;;;;;;;ACLA,WAAW,mBAAO,CAAC,mDAAS;;AAE5B;AACA;;AAEA;;;;;;;;;;;ACLA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,WAAW,mBAAO,CAAC,mDAAS;;AAE5B;AACA;;AAEA;;;;;;;;;;;ACNA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,UAAU;AACrB,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACrBA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,UAAU;AACrB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACxBA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,kBAAkB,mBAAO,CAAC,+DAAe;AACzC,cAAc,mBAAO,CAAC,uDAAW;AACjC,eAAe,mBAAO,CAAC,yDAAY;AACnC,cAAc,mBAAO,CAAC,yDAAY;AAClC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,SAAS;AACpB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AChDA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACnBA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAA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ACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;;;;;;;;;;ACrKA,eAAe,mBAAO,CAAC,yDAAY;;AAEnC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;;;;;;;;;;AC7BA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,cAAc,mBAAO,CAAC,uDAAW;;AAEjC;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACnBA,aAAa,mBAAO,CAAC,uDAAW;AAChC,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,qBAAqB,mBAAO,CAAC,uEAAmB;;AAEhD;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC3BA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA,sBAAsB,mBAAO,CAAC,yEAAoB;AAClD,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;AACA;AACA;AACA;AACA,WAAW,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A,oCAAoC;;AAEpC;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC9CA,aAAa,mBAAO,CAAC,uDAAW;AAChC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,eAAe,mBAAO,CAAC,yDAAY;AACnC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC3DA,kBAAkB,mBAAO,CAAC,iEAAgB;AAC1C,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC7BA,eAAe,mBAAO,CAAC,yDAAY;AACnC,kBAAkB,mBAAO,CAAC,iEAAgB;AAC1C,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA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;AACnB;AACA,IAAI;AACJ,CAAC;;AAED;;;;;;;;;;;ACVA,eAAe,mBAAO,CAAC,2DAAa;AACpC,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACnFA,aAAa,mBAAO,CAAC,uDAAW;AAChC,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,SAAS,mBAAO,CAAC,6CAAM;AACvB,kBAAkB,mBAAO,CAAC,iEAAgB;AAC1C,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC/GA,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACzFA;AACA,wBAAwB,qBAAM,gBAAgB,qBAAM,IAAI,qBAAM,sBAAsB,qBAAM;;AAE1F;;;;;;;;;;;ACHA,qBAAqB,mBAAO,CAAC,uEAAmB;AAChD,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,WAAW,mBAAO,CAAC,iDAAQ;;AAE3B;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACfA,qBAAqB,mBAAO,CAAC,uEAAmB;AAChD,mBAAmB,mBAAO,CAAC,mEAAiB;AAC5C,aAAa,mBAAO,CAAC,qDAAU;;AAE/B;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO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AACA,WAAW,GAAG;AACd,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACxBA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACdA,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACnBA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACZA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClCA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,GAAG;AAChB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;AClBA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACfA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd,a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B,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACnBA,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA,kBAAkB,KAA0B;;AAE5C;AACA,gCAAgC,QAAa;;AAE7C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ,CAAC;;AAED;;;;;;;;;;;AC7BA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACrBA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,aAAa,UAAU;AACvB;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACdA,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;ACRA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACbA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;;;;;;;;;;ACjBA,gBAAgB,mBAAO,CAAC,6DAAc;;AAEtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACdA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,GAAG;AAChB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACbA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACbA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,UAAU,mBAAO,CAAC,iDAAQ;AAC1B,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjCA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;;;;;;;;;;;ACzBA,gBAAgB,mBAAO,CAAC,6DAAc;;AAEtC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,GAAG;AAChB;AACA;AACA;AACA,oBAAoB,QAAQ,IAAI,QAAQ;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,kBAAkB;AAClB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpCA,sBAAsB,mBAAO,CAAC,yEAAoB;AAClD,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA,8BAA8B,mBAAmB;AACjD;AACA;AACA;AACA;AACA;AACA,+CAA+C,mBAAmB;AAClE;AACA;AACA;;AAEA;;;;;;;;;;;ACnCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACzBA,iBAAiB,mBAAO,CAAC,6DAAc;AACvC,eAAe,mBAAO,CAAC,yDAAY;;AAEnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AChCA,WAAW,mBAAO,CAAC,mDAAS;AAC5B,gBAAgB,mBAAO,CAAC,2DAAa;;AAErC;AACA,kBAAkB,KAA0B;;AAE5C;AACA,gCAAgC,QAAa;;AAE7C;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACrCA,kBAAkB,mBAAO,CAAC,iEAAgB;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,kBAAkB;AAClB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClCA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,eAAe,mBAAO,CAAC,yDAAY;;AAEnC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpCA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClCA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC1BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC9BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC5BA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC1BA,uBAAuB,mBAAO,CAAC,2EAAqB;AACpD,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC1BA,oBAAoB,mBAAO,CAAC,qEAAkB;AAC9C,eAAe,mBAAO,CAAC,2DAAa;AACpC,kBAAkB,mBAAO,CAAC,+DAAe;;AAEzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpCA,oBAAoB,mBAAO,CAAC,qEAAkB;AAC9C,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,kBAAkB,mBAAO,CAAC,+DAAe;;AAEzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC/BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;;;ACVA,oBA2CC;AAlDD,sHAAwE;AACxE,8FAAyC;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kBAAkB,cAAc;AAChC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,kBAAkB,cAAc;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,kBAAkB,aAAa;AAC/B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,iEAAe,GAAG;;;;;;;;;;;;;;;ACtNlB,iEAAe,sCAAsC;;;;;;;;;;;;;;;;ACAhB;;AAErC;AACA,OAAO,wDAAQ;AACf;AACA;;AAEA;AACA,gCAAgC;;AAEhC;AACA;AACA;AACA,qBAAqB;;AAErB;AACA,qBAAqB;;AAErB;AACA,qBAAqB;;AAErB;AACA,qBAAqB;AACrB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,iEAAe,KAAK;;;;;;;;;;;;;;;AClCpB,iEAAe,cAAc,EAAE,UAAU,EAAE,eAAe,EAAE,gBAAgB,EAAE,UAAU,GAAG,yCAAyC;;;;;;;;;;;;;;;ACApI;AAC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cAAc,CAAC,CAAC;IAChF,MAAM,cAAc,GAAG,QAAQ,CAAC,aAAa,CAAiB,cAAc,CAAC,CAAC;IAE9E,IAAI,eAAe,KAAK,IAAI,IAAI,eAAe,KAAK,IAAI,IAAI,cAAc,KAAK,IAAI,EAAE,CAAC;QACrF,eAAe,CAAC,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;QAC3C,eAAe,CAAC,WAAW,GAAG,OAAO,CAAC,IAAI,IAAI,mBAAmB,CAAC;QAClE,cAAc,CAAC,WAAW,GAAG,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;IAC/D,CAAC;AACF,CAAC;AAED;;GAEG;AACH,KAAK,UAAU,aAAa;IAC3B,MAAM,eAAe,EAAE,CAAC;AACzB,CAAC","sources":["webpack://openfin-web--web-layout/./node_modules/@openfin/core-web/out/api-client.js","webpack://openfin-web--web-layout/./node_modules/@openfin/core-web/out/main-8cad4070.js","webpack://openfin-web--web-layout/./node_modules/@openfin/core-web/out/main-b14f67c9.js","webpack://openfin-web--web-layout/../../node_modules/base64-js/index.js","webpack://openfin-web--web-layout/../../node_modules/buffer/index.js","webpack://openfin-web--web-layout/../../node_modules/events/events.js","webpack://openfin-web--web-layout/../../node_modules/ieee754/index.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_DataView.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_Hash.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_ListCache.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_Map.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_MapCache.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_Promise.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_Set.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_SetCache.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_Stack.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_Symbol.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_Uint8Array.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_WeakMap.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_arrayEach.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_arrayFilter.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_arrayLikeKeys.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_arrayPush.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_arraySome.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_assignValue.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_assocIndexOf.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseAssign.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseAssignIn.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseAssignValue.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseClone.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseCreate.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseGetAllKeys.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseGetTag.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseIsArguments.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseIsEqual.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseIsEqualDeep.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseIsMap.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseIsNative.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseIsSet.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseIsTypedArray.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseKeys.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseKeysIn.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseTimes.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseUnary.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_cacheHas.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_cloneArrayBuffer.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_cloneBuffer.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_cloneDataView.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_cloneRegExp.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_cloneSymbol.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_cloneTypedArray.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_copyArray.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_copyObject.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_copySymbols.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_copySymbolsIn.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_coreJsData.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_defineProperty.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_equalArrays.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_equalByTag.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_equalObjects.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_freeGlobal.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_getAllKeys.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_getAllKeysIn.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_getMapData.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_getNative.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_getPrototype.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_getRawTag.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_getSymbols.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_getSymbolsIn.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_getTag.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_getValue.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_hashClear.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_hashDelete.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_hashGet.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_hashHas.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_hashSet.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_initCloneArray.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_initCloneByTag.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_initCloneObject.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_isIndex.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_isKeyable.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_isMasked.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_isPrototype.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_listCacheClear.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_listCacheDelete.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_listCacheGet.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_listCacheHas.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_listCacheSet.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_mapCacheClear.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_mapCacheDelete.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_mapCacheGet.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_mapCacheHas.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_mapCacheSet.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_mapToArray.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_nativeCreate.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_nativeKeys.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_nativeKeysIn.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_nodeUtil.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_objectToString.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_overArg.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_root.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_setCacheAdd.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_setCacheHas.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_setToArray.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_stackClear.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_stackDelete.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_stackGet.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_stackHas.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_stackSet.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_toSource.js","webpack://openfin-web--web-layout/../../node_modules/lodash/cloneDeep.js","webpack://openfin-web--web-layout/../../node_modules/lodash/eq.js","webpack://openfin-web--web-layout/../../node_modules/lodash/isArguments.js","webpack://openfin-web--web-layout/../../node_modules/lodash/isArray.js","webpack://openfin-web--web-layout/../../node_modules/lodash/isArrayLike.js","webpack://openfin-web--web-layout/../../node_modules/lodash/isBuffer.js","webpack://openfin-web--web-layout/../../node_modules/lodash/isEqual.js","webpack://openfin-web--web-layout/../../node_modules/lodash/isFunction.js","webpack://openfin-web--web-layout/../../node_modules/lodash/isLength.js","webpack://openfin-web--web-layout/../../node_modules/lodash/isMap.js","webpack://openfin-web--web-layout/../../node_modules/lodash/isObject.js","webpack://openfin-web--web-layout/../../node_modules/lodash/isObjectLike.js","webpack://openfin-web--web-layout/../../node_modules/lodash/isSet.js","webpack://openfin-web--web-layout/../../node_modules/lodash/isTypedArray.js","webpack://openfin-web--web-layout/../../node_modules/lodash/keys.js","webpack://openfin-web--web-layout/../../node_modules/lodash/keysIn.js","webpack://openfin-web--web-layout/../../node_modules/lodash/stubArray.js","webpack://openfin-web--web-layout/../../node_modules/lodash/stubFalse.js","webpack://openfin-web--web-layout/./client/src/platform/api.ts","webpack://openfin-web--web-layout/./client/src/platform/settings.ts","webpack://openfin-web--web-layout/../../node_modules/uuid/dist/esm-browser/index.js","webpack://openfin-web--web-layout/../../node_modules/uuid/dist/esm-browser/md5.js","webpack://openfin-web--web-layout/../../node_modules/uuid/dist/esm-browser/nil.js","webpack://openfin-web--web-layout/../../node_modules/uuid/dist/esm-browser/parse.js","webpack://openfin-web--web-layout/../../node_modules/uuid/dist/esm-browser/regex.js","webpack://openfin-web--web-layout/../../node_modules/uuid/dist/esm-browser/rng.js","webpack://openfin-web--web-layout/../../node_modules/uuid/dist/esm-browser/sha1.js","webpack://openfin-web--web-layout/../../node_modules/uuid/dist/esm-browser/stringify.js","webpack://openfin-web--web-layout/../../node_modules/uuid/dist/esm-browser/v1.js","webpack://openfin-web--web-layout/../../node_modules/uuid/dist/esm-browser/v3.js","webpack://openfin-web--web-layout/../../node_modules/uuid/dist/esm-browser/v35.js","webpack://openfin-web--web-layout/../../node_modules/uuid/dist/esm-browser/v4.js","webpack://openfin-web--web-layout/../../node_modules/uuid/dist/esm-browser/v5.js","webpack://openfin-web--web-layout/../../node_modules/uuid/dist/esm-browser/validate.js","webpack://openfin-web--web-layout/../../node_modules/uuid/dist/esm-browser/version.js","webpack://openfin-web--web-layout/webpack/bootstrap","webpack://openfin-web--web-layout/webpack/runtime/define property getters","webpack://openfin-web--web-layout/webpack/runtime/global","webpack://openfin-web--web-layout/webpack/runtime/hasOwnProperty shorthand","webpack://openfin-web--web-layout/webpack/runtime/make namespace object","webpack://openfin-web--web-layout/webpack/runtime/node module decorator","webpack://openfin-web--web-layout/./client/src/content/fdc3-panel.ts"],"sourcesContent":["\"use strict\";var e=require(\"./main-8cad4070.js\");require(\"buffer/\"),require(\"uuid\"),require(\"events\"),require(\"lodash/cloneDeep\"),require(\"lodash/isEqual\"),exports.connect=e.connect;\n","\"use strict\";var e=require(\"buffer/\"),t=require(\"events\"),n=require(\"lodash/cloneDeep\"),i=require(\"lodash/isEqual\"),r=require(\"uuid\");const o=(e,t)=>`${t}<${btoa(JSON.stringify(e))}>`;var s=\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof window?window:\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:{},a={},c={},d={},h={};async function l(e){const t=[];for(const n of e){const e=await n();t.push(e)}return t}Object.defineProperty(h,\"__esModule\",{value:!0}),h.promiseMapSerial=h.serial=h.promiseMap=h.promisify=void 0,h.promisify=function(e){return(...t)=>new Promise(((n,i)=>{e(...t,((e,t)=>e?i(e):n(t)))}))},h.promiseMap=async function(e,t){return Promise.all(e.map(t))},h.serial=l,h.promiseMapSerial=async function(e,t){return l(e.map(((e,n,i)=>()=>t(e,n,i))))};var u,p=s&&s.__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},w=s&&s.__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)};Object.defineProperty(d,\"__esModule\",{value:!0}),d.Reply=d.EmitterBase=d.Base=void 0;const y=h;class f{constructor(e){this.isNodeEnvironment=()=>\"node\"===this.wire.environment.type,this.isOpenFinEnvironment=()=>\"openfin\"===this.wire.environment.type,this.isBrowserEnvironment=()=>\"other\"===this.wire.environment.type,this.wire=e}get fin(){return this.wire.getFin()}get me(){return this.wire.me}}d.Base=f;d.EmitterBase=class extends f{constructor(e,t,...n){super(e),this.topic=t,u.set(this,void 0),this.eventNames=()=>this.hasEmitter()?this.getOrCreateEmitter().eventNames():[],this.emit=(e,t,...n)=>!!this.hasEmitter()&&this.getOrCreateEmitter().emit(e,t,...n),this.hasEmitter=()=>this.wire.eventAggregator.has(w(this,u,\"f\")),this.getOrCreateEmitter=()=>this.wire.eventAggregator.getOrCreate(w(this,u,\"f\")),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[],this.listenerCount=e=>this.hasEmitter()?this.getOrCreateEmitter().listenerCount(e):0,this.registerEventListener=async(e,t={},n,i)=>{const r={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e},o=this.getOrCreateEmitter();n(o);try{await this.wire.sendAction(\"subscribe-to-desktop-event\",r)}catch(e){throw i(o),this.deleteEmitterIfNothingRegistered(o),e}},this.deregisterEventListener=async(e,t={})=>{if(this.hasEmitter()){const n={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e};await this.wire.sendAction(\"unsubscribe-to-desktop-event\",n).catch((()=>null));return this.getOrCreateEmitter()}return Promise.resolve()},p(this,u,[t,...n],\"f\"),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[]}async on(e,t,n){return await this.registerEventListener(e,n,(n=>{n.on(e,t)}),(n=>{n.removeListener(e,t)})),this}async addListener(e,t,n){return this.on(e,t,n)}async once(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.once(e,i),n.once(e,t)}),(n=>{n.removeListener(e,i),n.removeListener(e,t)})),this}async prependListener(e,t,n){return await this.registerEventListener(e,n,(n=>{n.prependListener(e,t)}),(n=>{n.removeListener(e,t)})),this}async prependOnceListener(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.prependOnceListener(e,t),n.once(e,i)}),(n=>{n.removeListener(e,t),n.removeListener(e,i)})),this}async removeListener(e,t,n){const i=await this.deregisterEventListener(e,n);return i&&(i.removeListener(e,t),this.deleteEmitterIfNothingRegistered(i)),this}async deregisterAllListeners(e){const t={...this.identity,type:e,topic:this.topic};if(this.hasEmitter()){const e=this.getOrCreateEmitter(),n=e.listenerCount(t.type),i=[];for(let e=0;enull)));return await Promise.all(i),e}}async removeAllListeners(e){const t=async e=>{const t=await this.deregisterAllListeners(e);t&&(t.removeAllListeners(e),this.deleteEmitterIfNothingRegistered(t))};if(e)await t(e);else if(this.hasEmitter()){const e=this.getOrCreateEmitter().eventNames();await(0,y.promiseMap)(e,t)}return this}deleteEmitterIfNothingRegistered(e){0===e.eventNames().length&&this.wire.eventAggregator.delete(w(this,u,\"f\"))}},u=new WeakMap;d.Reply=class{};var g={};Object.defineProperty(g,\"__esModule\",{value:!0});var m=g.RuntimeError=g.NotSupportedError=g.NotImplementedError=g.NoAckError=g.DuplicateCorrelationError=g.UnexpectedActionError=g.DisconnectedError=void 0;class v extends Error{constructor(e){super(`Expected websocket state OPEN but found ${e}`),this.readyState=e}}g.DisconnectedError=v;class C extends Error{}g.UnexpectedActionError=C;class b extends Error{}g.DuplicateCorrelationError=b;class I extends Error{}g.NoAckError=I;class E extends Error{}g.NotImplementedError=E;class x extends Error{}g.NotSupportedError=x;class A extends Error{constructor(e){const{message:t,name:n,stack:i,...r}=e;super(t),this.name=n||\"Error\",this.stack=i??this.toString(),Object.keys(r).forEach((e=>{this[e]=r[e]}))}}class P extends Error{static getCallSite(e=0){const t=Error.stackTraceLimit,n=e+1;Error.stackTraceLimit=t+n;const i=Error.prepareStackTrace;Error.prepareStackTrace=(e,t)=>t;const r=(new Error).stack?.slice(n)??[];return Error.prepareStackTrace=i,Error.stackTraceLimit=t,r}static prepareStackTrace(e,t){if(\"function\"==typeof Error.prepareStackTrace)return Error.prepareStackTrace(e,t);let n=\"\";n+=e.name||\"Error\",n+=`: ${e.message||\"\"}`;for(const e of t)n+=`\\n at ${e.toString()}`;return n}constructor(e,t){const{reason:n,error:i}=e;super(n),this.name=\"RuntimeError\",i?.stack&&(this.cause=new A(i)),t&&(this.stack=P.prepareStackTrace(this,t))}}m=g.RuntimeError=P;var M={},_={},O={};Object.defineProperty(O,\"__esModule\",{value:!0}),O.validateIdentity=void 0,O.validateIdentity=function(e){let t;return\"object\"==typeof e&&\"string\"==typeof e.uuid||(t=\"Not a valid identity object\"),t};var S={},R={},F={},j={},k={},L={},T={};Object.defineProperty(T,\"__esModule\",{value:!0}),T.handleDeprecatedWarnings=void 0;var $;T.handleDeprecatedWarnings=e=>{(e.contentNavigation?.whitelist||e.contentNavigation?.blacklist||e.contentRedirect?.whitelist||e.contentRedirect?.blacklist)&&console.warn(\"The properties 'whitelist' and 'blacklist' have been marked as deprecated and will be removed in a future version. Please use 'allowlist' and 'denylist'.\")};var B={},G={};Object.defineProperty(G,\"__esModule\",{value:!0}),G.AsyncRetryableLazy=W=G.Lazy=void 0;var W=G.Lazy=class{constructor(e){this.producerFn=e}getValue(){return this.value||(this.value=this.producerFn()),this.value}};G.AsyncRetryableLazy=class{constructor(e){this.producerFn=e}async getValue(){return this.promise||(this.promise=this.producerFn().catch((e=>{throw delete this.promise,e}))),this.promise}};var H={};Object.defineProperty(H,\"__esModule\",{value:!0}),H.WebContents=void 0;const N=d;class D extends N.EmitterBase{constructor(e,t,n){super(e,n,t.uuid,t.name),this.identity=t,this.entityType=n}capturePage(e){return this.wire.sendAction(\"capture-page\",{options:e,...this.identity}).then((({payload:e})=>e.data))}executeJavaScript(e){return this.wire.sendAction(\"execute-javascript-in-window\",{...this.identity,code:e}).then((({payload:e})=>e.data))}getZoomLevel(){return this.wire.sendAction(\"get-zoom-level\",this.identity).then((({payload:e})=>e.data))}setZoomLevel(e){return this.wire.sendAction(\"set-zoom-level\",{...this.identity,level:e}).then((()=>{}))}navigate(e){return this.wire.sendAction(\"navigate-window\",{...this.identity,url:e}).then((()=>{}))}navigateBack(){return this.wire.sendAction(\"navigate-window-back\",{...this.identity}).then((()=>{}))}async navigateForward(){await this.wire.sendAction(\"navigate-window-forward\",{...this.identity})}stopNavigation(){return this.wire.sendAction(\"stop-window-navigation\",{...this.identity}).then((()=>{}))}reload(e=!1){return this.wire.sendAction(\"reload-window\",{ignoreCache:e,...this.identity}).then((()=>{}))}print(e={}){return this.wire.sendAction(\"print\",{...this.identity,options:e}).then((()=>{}))}findInPage(e,t){return this.wire.sendAction(\"find-in-page\",{...this.identity,searchTerm:e,options:t}).then((({payload:e})=>e.data))}stopFindInPage(e){return this.wire.sendAction(\"stop-find-in-page\",{...this.identity,action:e}).then((()=>{}))}getPrinters(){return this.wire.sendAction(\"get-printers\",{...this.identity}).then((({payload:e})=>e.data))}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){await this.wire.sendAction(\"focus-window\",{emitSynthFocused:e,...this.identity})}async showDeveloperTools(){await this.wire.sendAction(\"show-developer-tools\",this.identity)}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction(\"get-process-info\",this.identity);return e}async getSharedWorkers(){return this.wire.sendAction(\"get-shared-workers\",this.identity).then((({payload:e})=>e.data))}async inspectSharedWorker(){await this.wire.sendAction(\"inspect-shared-worker\",{...this.identity})}async inspectSharedWorkerById(e){await this.wire.sendAction(\"inspect-shared-worker-by-id\",{...this.identity,workerId:e})}async inspectServiceWorker(){await this.wire.sendAction(\"inspect-service-worker\",{...this.identity})}async showPopupWindow(e){if(this.wire.sendAction(`${this.entityType}-show-popup-window`,this.identity).catch((()=>{})),e?.onPopupReady){const t=async({popupName:t})=>{try{const n=this.fin.Window.wrapSync({uuid:this.fin.me.uuid,name:t});await e.onPopupReady(n)}catch(e){throw new Error(`Something went wrong during onPopupReady execution: ${e}`)}};await this.once(\"popup-ready\",t)}const{payload:t}=await this.wire.sendAction(\"try-create-popup-window\",{options:{...e,hasResultCallback:!!e?.onPopupResult,hasReadyCallback:!!e?.onPopupReady},...this.identity}),{data:{willOpen:n,options:i}}=t;n&&await this.fin.Window.create(i.initialOptions);if(e?.onPopupResult){const t=async t=>{await e.onPopupResult((e=>{const{name:t,uuid:n,result:i,data:r}=e,o={identity:{name:t,uuid:n},result:i};return r&&(o.data=r),o})(t))},n=async()=>{await this.removeListener(\"popup-result\",t)};await this.on(\"popup-result\",t),await this.once(\"popup-teardown\",n)}const{payload:r}=await this.wire.sendAction(\"show-popup-window\",{options:i,...this.identity});return r.data}}var U,V,z,K,q;function J(){return V||(V=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(function(){if($)return L;$=1,Object.defineProperty(L,\"__esModule\",{value:!0}),L.ViewModule=void 0;const e=d,t=O,n=J(),i=T;class r extends e.Base{async create(e){const{uuid:t}=this.wire.me;if(!e.name||\"string\"!=typeof e.name)throw new Error(\"Please provide a name property as a string in order to create a View.\");return(0,i.handleDeprecatedWarnings)(e),this.wire.environment.childViews?await this.wire.environment.createChildContent({entityType:\"view\",options:{...e,uuid:t}}):await this.wire.sendAction(\"create-view\",{...e,uuid:t}),this.wrapSync({uuid:t,name:e.name})}async wrap(e){this.wire.sendAction(\"view-wrap\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}wrapSync(e){this.wire.sendAction(\"view-wrap-sync\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}getCurrent(){if(this.wire.sendAction(\"view-get-current\").catch((e=>{})),!this.wire.me.isView)throw new Error(\"You are not in a View context\");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction(\"view-get-current-sync\").catch((e=>{})),!this.wire.me.isView)throw new Error(\"You are not in a View context\");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return L.ViewModule=r,L}(),e),n(function(){if(U)return B;var e;U=1,Object.defineProperty(B,\"__esModule\",{value:!0}),B.View=void 0;const t=g,n=G,i=H,r=ie();class o extends i.WebContents{constructor(i,o){super(i,o,\"view\"),this.identity=o,e.set(this,new n.Lazy((()=>this.fin.Platform.wrapSync(this.identity).getClient()))),this.attach=async e=>{await this.wire.sendAction(\"attach-view\",{target:e,...this.identity})},this.destroy=async()=>{await this.wire.sendAction(\"destroy-view\",{...this.identity})},this.show=async()=>{await this.wire.sendAction(\"show-view\",{...this.identity})},this.showAt=async(e,t={})=>{await this.wire.sendAction(\"show-view-at\",{bounds:e,...this.identity,options:t})},this.bringToFront=async()=>{await this.wire.sendAction(\"bring-view-to-front\",{...this.identity})},this.hide=async()=>{await this.wire.sendAction(\"hide-view\",{...this.identity})},this.setBounds=async e=>{await this.wire.sendAction(\"set-view-bounds\",{bounds:e,...this.identity})},this.getBounds=async()=>(await this.wire.sendAction(\"get-view-bounds\",{...this.identity})).payload.data,this.getInfo=async()=>(await this.wire.sendAction(\"get-view-info\",{...this.identity})).payload.data,this.getParentLayout=async()=>(this.wire.sendAction(\"view-get-parent-layout\",{...this.identity}).catch((()=>{})),this.fin.Platform.Layout.getLayoutByViewIdentity(this.identity)),this.getOptions=async()=>this.wire.sendAction(\"get-view-options\",{...this.identity}).then((({payload:e})=>e.data)),this.updateOptions=async e=>this.wire.sendAction(\"update-view-options\",{options:e,...this.identity}).then((()=>{})),this.getCurrentWindow=async()=>{const{payload:{data:e}}=await this.wire.sendAction(\"get-view-window\",{...this.identity});return new r._Window(this.wire,e)},this.getCurrentStack=async()=>{this.wire.sendAction(\"view-get-current-stack\").catch((()=>{}));try{return(await this.getParentLayout()).getStackByViewIdentity(this.identity)}catch(e){throw new t.RuntimeError({reason:\"This view does not belong to a stack.\",error:e})}},this.triggerBeforeUnload=async()=>(await this.wire.sendAction(\"trigger-before-unload\",{...this.identity})).payload.data,this.bindToElement=async e=>{if(!e)throw new Error(\"Element not found.\");return this.wire.environment.observeBounds(e,(async e=>this.setBounds(e)))}}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){const t=await this.getCurrentWindow();await t.focusedWebViewWasChanged(),await super.focus({emitSynthFocused:e})}}return B.View=o,e=new WeakMap,B}(),e)}(k)),k}function Y(){if(z)return j;z=1,Object.defineProperty(j,\"__esModule\",{value:!0}),j.Application=void 0;const e=d,t=ie(),n=J();class i extends e.EmitterBase{constructor(e,n){super(e,\"application\",n.uuid),this.identity=n,this.window=new t._Window(this.wire,{uuid:this.identity.uuid,name:this.identity.uuid})}windowListFromIdentityList(e){const n=[];return e.forEach((e=>{n.push(new t._Window(this.wire,{uuid:e.uuid,name:e.name}))})),n}isRunning(){return this.wire.sendAction(\"is-application-running\",this.identity).then((({payload:e})=>e.data))}async quit(e=!1){try{await this._close(e),await this.wire.sendAction(\"destroy-application\",{force:e,...this.identity})}catch(e){if(![\"Remote connection has closed\",\"Could not locate the requested application\"].some((t=>e.message.includes(t))))throw e}}async _close(e=!1){try{await this.wire.sendAction(\"close-application\",{force:e,...this.identity})}catch(e){if(!e.message.includes(\"Remote connection has closed\"))throw e}}close(e=!1){return console.warn(\"Deprecation Warning: Application.close is deprecated Please use Application.quit\"),this.wire.sendAction(\"application-close\",this.identity).catch((e=>{})),this._close(e)}getChildWindows(){return this.wire.sendAction(\"get-child-windows\",this.identity).then((({payload:e})=>{const t=[];return e.data.forEach((e=>{t.push({uuid:this.identity.uuid,name:e})})),this.windowListFromIdentityList(t)}))}getManifest(){return this.wire.sendAction(\"get-application-manifest\",this.identity).then((({payload:e})=>e.data))}getParentUuid(){return this.wire.sendAction(\"get-parent-application\",this.identity).then((({payload:e})=>e.data))}getShortcuts(){return this.wire.sendAction(\"get-shortcuts\",this.identity).then((({payload:e})=>e.data))}async getViews(){const{payload:e}=await this.wire.sendAction(\"application-get-views\",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}getZoomLevel(){return this.wire.sendAction(\"get-application-zoom-level\",this.identity).then((({payload:e})=>e.data))}getWindow(){return this.wire.sendAction(\"application-get-window\",this.identity).catch((e=>{})),Promise.resolve(this.window)}registerUser(e,t){return this.wire.sendAction(\"register-user\",{userName:e,appName:t,...this.identity}).then((()=>{}))}removeTrayIcon(){return this.wire.sendAction(\"remove-tray-icon\",this.identity).then((()=>{}))}restart(){return this.wire.sendAction(\"restart-application\",this.identity).then((()=>{}))}run(){return console.warn(\"Deprecation Warning: Application.run is deprecated Please use fin.Application.start\"),this.wire.sendAction(\"application-run\",this.identity).catch((e=>{})),this._run()}_run(e={}){return this.wire.sendAction(\"run-application\",{manifestUrl:this._manifestUrl,opts:e,...this.identity}).then((()=>{}))}scheduleRestart(){return this.wire.sendAction(\"relaunch-on-close\",this.identity).then((()=>{}))}async sendApplicationLog(){const{payload:e}=await this.wire.sendAction(\"send-application-log\",this.identity);return e.data}async setJumpList(e){await this.wire.sendAction(\"set-jump-list\",{config:e,...this.identity})}setTrayIcon(e){return this.wire.sendAction(\"set-tray-icon\",{enabledIcon:e,...this.identity}).then((()=>{}))}setShortcuts(e){return this.wire.sendAction(\"set-shortcuts\",{data:e,...this.identity}).then((()=>{}))}async setShortcutQueryParams(e){await this.wire.sendAction(\"set-shortcut-query-args\",{data:e,...this.identity})}setZoomLevel(e){return this.wire.sendAction(\"set-application-zoom-level\",{level:e,...this.identity}).then((()=>{}))}async setAppLogUsername(e){await this.wire.sendAction(\"set-app-log-username\",{data:e,...this.identity})}getTrayIconInfo(){return this.wire.sendAction(\"get-tray-icon-info\",this.identity).then((({payload:e})=>e.data))}hasTrayIcon(){return this.wire.sendAction(\"has-tray-icon\",this.identity).then((({payload:e})=>e.data))}terminate(){return this.wire.sendAction(\"terminate-application\",this.identity).then((()=>{}))}wait(){return this.wire.sendAction(\"wait-for-hung-application\",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction(\"get-info\",this.identity).then((({payload:e})=>e.data))}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction(\"application-get-process-info\",this.identity);return e}async setFileDownloadLocation(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t};await this.wire.sendAction(\"set-file-download-location\",{...n,downloadLocation:e})}async getFileDownloadLocation(){const{payload:{data:e}}=await this.wire.sendAction(\"get-file-download-location\",this.identity);return e}async showTrayIconPopupMenu(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t},{payload:i}=await this.wire.sendAction(\"show-tray-icon-popup-menu\",{...n,options:e});return i.data}async closeTrayIconPopupMenu(){const{name:e}=this.wire.me,t={uuid:this.identity.uuid,name:e};await this.wire.sendAction(\"close-tray-icon-popup-menu\",{...t})}}return j.Application=i,j}function Z(){return q||(q=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(function(){if(K)return F;K=1,Object.defineProperty(F,\"__esModule\",{value:!0}),F.ApplicationModule=void 0;const e=d,t=O,n=Y();class i extends e.Base{async wrap(e){this.wire.sendAction(\"wrap-application\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}wrapSync(e){this.wire.sendAction(\"wrap-application-sync\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}async _create(e){return void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&void 0===e.isPlatformController&&(e.autoShow=!0),await this.wire.sendAction(\"create-application\",e),this.wrap({uuid:e.uuid})}create(e){return console.warn(\"Deprecation Warning: fin.Application.create is deprecated. Please use fin.Application.start\"),this.wire.sendAction(\"application-create\").catch((e=>{})),this._create(e)}async start(e){this.wire.sendAction(\"start-application\").catch((e=>{}));const t=await this._create(e);return await this.wire.sendAction(\"run-application\",{uuid:e.uuid}),t}async startManyManifests(e,t){return this.wire.sendAction(\"run-applications\",{applications:e,opts:t}).then((()=>{}))}getCurrent(){return this.wire.sendAction(\"get-current-application\").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction(\"get-current-application-sync\").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}async startFromManifest(e,t){this.wire.sendAction(\"application-start-from-manifest\").catch((e=>{}));const n=await this._createFromManifest(e);return await n._run(t),n}createFromManifest(e){return console.warn(\"Deprecation Warning: fin.Application.createFromManifest is deprecated. Please use fin.Application.startFromManifest\"),this.wire.sendAction(\"application-create-from-manifest\").catch((e=>{})),this._createFromManifest(e)}_createFromManifest(e){return this.wire.sendAction(\"get-application-manifest\",{manifestUrl:e}).then((({payload:e})=>{const t=e.data.platform?e.data.platform.uuid:e.data.startup_app.uuid;return this.wrap({uuid:t})})).then((t=>(t._manifestUrl=e,t)))}}return F.ApplicationModule=i,F}(),e),n(Y(),e)}(R)),R}H.WebContents=D;var Q={};Object.defineProperty(Q,\"__esModule\",{value:!0}),Q.promisifySubscription=void 0;var X,ee,te;function ne(){if(X)return S;X=1,Object.defineProperty(S,\"__esModule\",{value:!0}),S._Window=void 0;const e=Z(),t=H,n=J(),i=T,r=Q;class o extends t.WebContents{constructor(e,t){super(e,t,\"window\")}async createWindow(e){this.wire.sendAction(\"window-create-window\",this.identity).catch((e=>{}));const t=await(0,r.promisifySubscription)(this,\"fire-constructor-callback\");void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&(e.autoShow=!0),(0,i.handleDeprecatedWarnings)(e);const n=this.wire.environment.createChildContent({entityType:\"window\",options:e}),[o]=await Promise.all([t.getValue(),n]);let s;const{success:a}=o,c=o.data,{message:d}=c;s=a?{httpResponseCode:c.httpResponseCode,apiInjected:c.apiInjected}:{message:c.message,networkErrorCode:c.networkErrorCode,stack:c.stack};const h={message:d,cbPayload:s,success:a};try{this.getWebWindow().fin.__internal_.openerSuccessCBCalled()}catch(e){}return h.success?this:Promise.reject(h)}getAllFrames(){return this.wire.sendAction(\"get-all-frames\",this.identity).then((({payload:e})=>e.data))}getBounds(){return this.wire.sendAction(\"get-window-bounds\",this.identity).then((({payload:e})=>e.data))}center(){return this.wire.sendAction(\"center-window\",this.identity).then((()=>{}))}blur(){return this.wire.sendAction(\"blur-window\",this.identity).then((()=>{}))}bringToFront(){return this.wire.sendAction(\"bring-window-to-front\",this.identity).then((()=>{}))}animate(e,t){return this.wire.sendAction(\"animate-window\",{transitions:e,options:t,...this.identity}).then((()=>{}))}hide(){return this.wire.sendAction(\"hide-window\",this.identity).then((()=>{}))}close(e=!1){return this.wire.sendAction(\"close-window\",{force:e,...this.identity}).then((()=>{Object.setPrototypeOf(this,null)}))}focusedWebViewWasChanged(){return this.wire.sendAction(\"focused-webview-changed\",this.identity).then((()=>{}))}getNativeId(){return this.wire.sendAction(\"get-window-native-id\",this.identity).then((({payload:e})=>e.data))}async getCurrentViews(){const{payload:e}=await this.wire.sendAction(\"window-get-views\",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}disableFrame(){return console.warn(\"Function is deprecated; use disableUserMovement instead.\"),this.wire.sendAction(\"disable-window-frame\",this.identity).then((()=>{}))}disableUserMovement(){return this.wire.sendAction(\"disable-window-frame\",this.identity).then((()=>{}))}enableFrame(){return console.warn(\"Function is deprecated; use enableUserMovement instead.\"),this.wire.sendAction(\"enable-window-frame\",this.identity).then((()=>{}))}enableUserMovement(){return this.wire.sendAction(\"enable-window-frame\",this.identity).then((()=>{}))}flash(){return this.wire.sendAction(\"flash-window\",this.identity).then((()=>{}))}stopFlashing(){return this.wire.sendAction(\"stop-flash-window\",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction(\"get-window-info\",this.identity).then((({payload:e})=>e.data))}async getLayout(e){this.wire.sendAction(\"window-get-layout\",this.identity).catch((e=>{}));const t=await this.getOptions();if(!t.layout&&!t.layoutSnapshot)throw new Error(\"Window does not have a Layout\");return this.fin.Platform.Layout.wrap(e??this.identity)}getOptions(){return this.wire.sendAction(\"get-window-options\",this.identity).then((({payload:e})=>e.data))}getParentApplication(){return this.wire.sendAction(\"window-get-parent-application\",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity))}getParentWindow(){return this.wire.sendAction(\"window-get-parent-window\",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity)).then((e=>e.getWindow()))}async getSnapshot(e){const t={area:e,...this.identity};console.warn(\"Window.getSnapshot has been deprecated, please use Window.capturePage\");return(await this.wire.sendAction(\"get-window-snapshot\",t)).payload.data}getState(){return this.wire.sendAction(\"get-window-state\",this.identity).then((({payload:e})=>e.data))}getWebWindow(){return this.wire.sendAction(\"window-get-web-window\",this.identity).catch((e=>{})),this.wire.environment.getWebWindow(this.identity)}isMainWindow(){return this.wire.sendAction(\"window-is-main-window\",this.identity).catch((e=>{})),this.me.uuid===this.me.name}isShowing(){return this.wire.sendAction(\"is-window-showing\",this.identity).then((({payload:e})=>e.data))}maximize(){return this.wire.sendAction(\"maximize-window\",this.identity).then((()=>{}))}minimize(){return this.wire.sendAction(\"minimize-window\",this.identity).then((()=>{}))}moveBy(e,t,n){return this.wire.sendAction(\"move-window-by\",{deltaLeft:e,deltaTop:t,positioningOptions:n,...this.identity}).then((()=>{}))}moveTo(e,t,n){return this.wire.sendAction(\"move-window\",{left:e,top:t,positioningOptions:n,...this.identity}).then((()=>{}))}resizeBy(e,t,n,i){return this.wire.sendAction(\"resize-window-by\",{deltaWidth:Math.floor(e),deltaHeight:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}resizeTo(e,t,n,i){return this.wire.sendAction(\"resize-window\",{width:Math.floor(e),height:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}restore(){return this.wire.sendAction(\"restore-window\",this.identity).then((()=>{}))}setAsForeground(){return this.wire.sendAction(\"set-foreground-window\",this.identity).then((()=>{}))}setBounds(e,t){return this.wire.sendAction(\"set-window-bounds\",{...e,...this.identity,positioningOptions:t}).then((()=>{}))}show(e=!1){return this.wire.sendAction(\"show-window\",{force:e,...this.identity}).then((()=>{}))}showAt(e,t,n=!1){return this.wire.sendAction(\"show-at-window\",{force:n,left:Math.floor(e),top:Math.floor(t),...this.identity}).then((()=>{}))}updateOptions(e){return this.wire.sendAction(\"update-window-options\",{options:e,...this.identity}).then((()=>{}))}authenticate(e,t){return this.wire.sendAction(\"window-authenticate\",{userName:e,password:t,...this.identity}).then((()=>{}))}async showPopupMenu(e){const{payload:t}=await this.wire.sendAction(\"show-popup-menu\",{options:e,...this.identity});return t.data}async closePopupMenu(){return this.wire.sendAction(\"close-popup-menu\",{...this.identity}).then((()=>{}))}async dispatchPopupResult(e){this.wire.sendAction(\"window-dispatch-popup-result\",this.identity).catch((e=>{})),await this.wire.sendAction(\"dispatch-popup-result\",{data:e,...this.identity})}async print(e={content:\"self\"}){switch(e.content){case void 0:case\"self\":return super.print(e);case\"screenshot\":return this.wire.sendAction(\"print-screenshot\",this.identity).then((()=>{}));case\"views\":return this.wire.sendAction(\"print-views\",{...this.identity,options:e}).then((()=>{}));default:return}}}return S._Window=o,S}function ie(){return te||(te=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(function(){if(ee)return _;ee=1,Object.defineProperty(_,\"__esModule\",{value:!0}),_._WindowModule=void 0;const e=d,t=O,n=ne();class i extends e.Base{async wrap(e){this.wire.sendAction(\"window-wrap\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}wrapSync(e){this.wire.sendAction(\"window-wrap-sync\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}create(e){return this.wire.sendAction(\"create-window\").catch((e=>{})),new n._Window(this.wire,{uuid:this.me.uuid,name:e.name}).createWindow(e)}getCurrent(){if(this.wire.sendAction(\"get-current-window\").catch((e=>{})),!this.wire.me.isWindow)throw new Error(\"You are not in a Window context\");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction(\"get-current-window-sync\").catch((e=>{})),!this.wire.me.isWindow)throw new Error(\"You are not in a Window context\");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return _._WindowModule=i,_}(),e),n(ne(),e)}(M)),M}Q.promisifySubscription=async(e,t,n=(()=>!0),i)=>{let r,o,s;const a=new Promise(((e,t)=>{r=e,o=t})),c=e=>{n(e)&&(clearTimeout(s),r(e))};return await e.on(t,c),i&&(s=setTimeout((()=>o(new Error(\"event timed out\"))),i)),a.finally((()=>{e.removeListener(t,c).catch((()=>null))})),{getValue:()=>a}},Object.defineProperty(c,\"__esModule\",{value:!0}),c.System=void 0;const re=d,oe=g,se=ie(),ae=t;class ce extends re.EmitterBase{constructor(e){super(e,\"system\")}sendExternalProcessRequest(e,t){return new Promise(((n,i)=>{const r=\"external-process-exited\";let o,s,a,c;\"function\"==typeof t.listener&&(a=e=>{const n=e||{};s={topic:\"exited\",uuid:n.processUuid||\"\",exitCode:n.exitCode||0},o===e.processUuid&&(t.listener(s),c.removeListener(r,a))},this.wire.me.name||(this.wire.me.name=this.wire.me.uuid),c=new se._Window(this.wire,this.wire.me),c.on(r,a)),this.wire.sendAction(e,t).then((({payload:e})=>{o=e.data.uuid,n(e.data),s&&o===s.uuid&&(t.listener(s),c.removeListener(r,a))})).catch((e=>{c&&c.removeListener(r,a),i(e)}))}))}getVersion(){return this.wire.sendAction(\"get-version\").then((({payload:e})=>e.data))}clearCache(e){return this.wire.sendAction(\"clear-cache\",e).then((()=>{}))}deleteCacheOnExit(){return this.wire.sendAction(\"delete-cache-request\").then((()=>{}))}exit(){return this.wire.sendAction(\"exit-desktop\").then((()=>{}))}async fetchManifest(e){const{payload:{data:t}}=await this.wire.sendAction(\"fetch-manifest\",{manifestUrl:e});return t}flushCookieStore(){return this.wire.sendAction(\"flush-cookie-store\").then((()=>{}))}getAllWindows(){return this.wire.sendAction(\"get-all-windows\").then((({payload:e})=>e.data))}getAllApplications(){return this.wire.sendAction(\"get-all-applications\").then((({payload:e})=>e.data))}getCommandLineArguments(){return this.wire.sendAction(\"get-command-line-arguments\").then((({payload:e})=>e.data))}async getCrashReporterState(){const{payload:{data:{diagnosticMode:e,isRunning:t}}}=await this.wire.sendAction(\"get-crash-reporter-state\");return console.warn(\"diagnosticMode property is deprecated. It will be removed in a future version\"),{diagnosticMode:e,diagnosticsMode:e,isRunning:t}}async startCrashReporter(e){const t=e,n={...t,diagnosticMode:t.diagnosticsMode||t.diagnosticMode},{payload:{data:{diagnosticMode:i,isRunning:r}}}=await this.wire.sendAction(\"start-crash-reporter\",n);return{diagnosticMode:i,diagnosticsMode:i,isRunning:r}}getUniqueUserId(){return this.wire.sendAction(\"get-unique-user-id\").then((({payload:e})=>e.data))}getEntityInfo(e,t){return this.wire.sendAction(\"get-entity-info\",{uuid:e,name:t}).then((({payload:e})=>e.data))}getEnvironmentVariable(e){return this.wire.sendAction(\"get-environment-variable\",{environmentVariables:e}).then((({payload:e})=>e.data))}getFocusedWindow(){return this.wire.sendAction(\"get-focused-window\").then((({payload:e})=>e.data))}async isAppCertified(e){const{payload:{data:{certifiedInfo:t}}}=await this.wire.sendAction(\"is-app-certified\",{manifestUrl:e});return t}getInstalledRuntimes(){return this.wire.sendAction(\"get-installed-runtimes\").then((({payload:e})=>e.data.runtimes))}async getInstalledApps(){const{payload:{data:{installedApps:e}}}=await this.wire.sendAction(\"get-installed-apps\");return e}getLog(e){return this.wire.sendAction(\"view-log\",e).then((({payload:e})=>e.data))}getMachineId(){return this.wire.sendAction(\"get-machine-id\").then((({payload:e})=>e.data))}getMinLogLevel(){return this.wire.sendAction(\"get-min-log-level\").then((({payload:e})=>e.data))}getLogList(){return this.wire.sendAction(\"list-logs\").then((({payload:e})=>e.data))}getMonitorInfo(){return this.wire.sendAction(\"get-monitor-info\").then((({payload:e})=>e.data))}getMousePosition(){return this.wire.sendAction(\"get-mouse-position\").then((({payload:e})=>e.data))}getProcessList(){return console.warn(\"System.getProcessList has been deprecated. Please consider using our new process APIs: Window.getProcessInfo, View.getProcessInfo, Application.getProcessInfo, System.getAllProcessInfo\"),this.wire.sendAction(\"process-snapshot\").then((({payload:e})=>e.data))}async getAllProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction(\"get-all-process-info\",this.identity);return e}getProxySettings(){return this.wire.sendAction(\"get-proxy-settings\").then((({payload:e})=>e.data))}getRuntimeInfo(){return this.wire.sendAction(\"get-runtime-info\").then((({payload:e})=>e.data))}getRvmInfo(){return this.wire.sendAction(\"get-rvm-info\").then((({payload:e})=>e.data))}getHostSpecs(){return this.wire.sendAction(\"get-host-specs\").then((({payload:e})=>e.data))}getOSInfo(){return this.wire.sendAction(\"get-os-info\").then((({payload:e})=>e.data))}launchExternalProcess(e){return this.sendExternalProcessRequest(\"launch-external-process\",e)}monitorExternalProcess(e){return this.sendExternalProcessRequest(\"monitor-external-process\",e)}log(e,t){return this.wire.sendAction(\"write-to-log\",{level:e,message:t}).then((()=>{}))}openUrlWithBrowser(e){return this.wire.sendAction(\"open-url-with-browser\",{url:e}).then((()=>{}))}async registerCustomProtocol(e){if(\"object\"!=typeof e)throw new Error(\"Must provide an object with a `protocolName` property having a string value.\");await this.wire.sendAction(\"register-custom-protocol\",e)}async unregisterCustomProtocol(e){await this.wire.sendAction(\"unregister-custom-protocol\",{protocolName:e})}async getCustomProtocolState(e){return this.wire.sendAction(\"get-custom-protocol-state\",{protocolName:e}).then((({payload:e})=>e.data))}releaseExternalProcess(e){return this.wire.sendAction(\"release-external-process\",{uuid:e}).then((()=>{}))}showDeveloperTools(e){return this.wire.sendAction(\"show-developer-tools\",e).then((()=>{}))}terminateExternalProcess(e){return this.wire.sendAction(\"terminate-external-process\",e).then((()=>{}))}updateProxySettings(e){return this.wire.sendAction(\"update-proxy\",e).then((()=>{}))}async downloadAsset(e,t){const n=()=>{};let i=n,r=n;const o=new Promise(((e,t)=>{i=e,r=t}));if(\"openfin\"!==this.wire.environment.type)throw new oe.NotSupportedError(\"downloadAsset only supported in an OpenFin Render process\");const s=oe.RuntimeError.getCallSite(),a=this.wire.environment.getNextMessageId().toString(),c=`asset-download-progress-${a}`,d=`asset-download-error-${a}`,h=`asset-download-complete-${a}`,l=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},u=()=>{this.removeListener(c,l)};await Promise.all([this.on(c,l),this.once(d,(e=>{u();const{reason:t,err:n}=e;r(new oe.RuntimeError({reason:t,error:n},s))})),this.once(h,(()=>{u(),i()}))]);const p=Object.assign(e,{downloadId:a});return await this.wire.sendAction(\"download-asset\",p).catch((e=>{throw u(),e})),o}downloadRuntime(e,t){const n=oe.RuntimeError.getCallSite();return new Promise(((i,r)=>{if(\"openfin\"!==this.wire.environment.type)return void r(new oe.NotSupportedError(\"downloadRuntime only supported in an OpenFin Render process\"));const o=this.wire.environment.getNextMessageId().toString(),s=`runtime-download-progress-${o}`,a=`runtime-download-error-${o}`,c=`runtime-download-complete-${o}`,d=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},h=()=>{this.removeListener(s,d)};this.on(s,d),this.once(a,(e=>{h();const{reason:t,err:i}=e;r(new oe.RuntimeError({reason:t,error:i},n))})),this.once(c,(()=>{h(),i()}));const l=Object.assign(e,{downloadId:o});this.wire.sendAction(\"download-runtime\",l).catch((e=>{h(),r(e)}))}))}downloadPreloadScripts(e){return this.wire.sendAction(\"download-preload-scripts\",{scripts:e}).then((({payload:e})=>e.data))}getAllExternalApplications(){return this.wire.sendAction(\"get-all-external-applications\").then((({payload:e})=>e.data))}getAppAssetInfo(e){return this.wire.sendAction(\"get-app-asset-info\",e).then((({payload:e})=>e.data))}getCookies(e){const t=this.wire.environment.getUrl(),n=Object.assign(e,{url:t});return this.wire.sendAction(\"get-cookies\",n).then((({payload:e})=>e.data))}setMinLogLevel(e){return this.wire.sendAction(\"set-min-log-level\",{level:e}).then((()=>{}))}resolveUuid(e){return this.wire.sendAction(\"resolve-uuid\",{entityKey:e}).then((({payload:e})=>e.data))}executeOnRemote(e,t){return t.requestingIdentity=e,this.wire.ferryAction(t)}readRegistryValue(e,t,n){return this.wire.sendAction(\"read-registry-value\",{rootKey:e,subkey:t,value:n}).then((({payload:e})=>e.data))}registerExternalConnection(e){return this.wire.sendAction(\"register-external-connection\",{uuid:e}).then((({payload:e})=>e.data))}async getServiceConfiguration(e){if(\"string\"!=typeof e.name)throw new Error(\"Must provide an object with a `name` property having a string value\");const{name:t}=e;return this.wire.sendAction(\"get-service-configuration\",{name:t}).then((({payload:e})=>e.data))}async getSystemAppConfig(e){if(\"string\"!=typeof e)throw new Error(\"Must provide a string value for name of system app\");return this.wire.sendAction(\"get-system-app-configuration\",{name:e}).then((({payload:e})=>e.data))}async registerShutdownHandler(e){this.wire.sendAction(\"system-register-shutdown-handler\").catch((e=>{}));const{uuid:t,name:n}=this.wire.me;this.on(\"system-shutdown\",(i=>{e({proceed:()=>{this.wire.environment.raiseEvent(\"application/system-shutdown-handled\",{uuid:t,name:n,topic:\"application\"})}})}))}runRvmHealthCheck(){return this.wire.sendAction(\"run-rvm-health-check\").then((({payload:e})=>e.data))}async launchManifest(e,t={}){const{subscribe:n,...i}=t,r=i;if(n){const e=new ae.EventEmitter;n(e);const t=\"app-version-progress\",i=\"runtime-status\",o=\"app-version-complete\",s=\"app-version-error\",a=this.wire.environment.getNextMessageId().toString();r.appVersionId=a;const c=[o,t,i,s],d=e=>{const{appVersionId:t,topic:n,type:i,...r}=e;return{...r,type:c.find((e=>i.includes(e)))}},h=t=>{const n=d(t);e.emit(n.type,n)},l=()=>{this.removeListener(`${t}.${a}`,h),this.removeListener(`${i}.${a}`,h),this.removeListener(`${o}.${a}`,h),this.removeListener(`${s}.${a}`,h),this.removeListener(`${o}.${a}`,l),this.removeListener(`${s}.${a}`,l)};await Promise.all([this.on(`${t}.${a}`,h),this.on(`${i}.${a}`,h),this.once(`${o}.${a}`,h),this.once(`${s}.${a}`,h),this.once(`${o}.${a}`,l),this.once(`${s}.${a}`,l)])}return(await this.wire.sendAction(\"launch-manifest\",{manifestUrl:e,opts:r})).payload.data.manifest}async queryPermissionForCurrentContext(e){const t={uuid:this.wire.me.uuid,name:this.wire.me.name};return(await this.wire.sendAction(\"query-permission-for-current-context\",{apiName:e,identity:t})).payload.data}async enableNativeWindowIntegrationProvider(e){const{payload:t}=await this.wire.sendAction(\"enable-native-window-integration-provider\",{permissions:e});return t.data}async registerUsage({data:e,type:t}){await this.wire.sendAction(\"register-usage\",{data:e,type:t})}async getPrinters(){const{payload:e}=await this.wire.sendAction(\"system-get-printers\");return e.data}async updateProcessLoggingOptions(e){await this.wire.sendAction(\"system-update-process-logging-options\",{options:e})}async getDomainSettings(){const{payload:{data:e}}=await this.wire.sendAction(\"get-domain-settings\",this.identity);return e}async setDomainSettings(e){await this.wire.sendAction(\"set-domain-settings\",{domainSettings:e,...this.identity})}async refreshExtensions(){const{payload:e}=await this.wire.sendAction(\"refresh-extensions\");return e.data}async getInstalledExtensions(){const{payload:e}=await this.wire.sendAction(\"get-installed-extensions\");return e.data}}c.System=ce;var de={},he={};Object.defineProperty(he,\"__esModule\",{value:!0}),he.RefCounter=void 0;he.RefCounter=class{constructor(){this.topicRefMap=new Map}incRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t+1;n=i,this.topicRefMap.set(e,i)}else this.topicRefMap.set(e,1),n=1;return n}decRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t-1;this.topicRefMap.set(e,i),n=i}else n=-1;return n}actOnFirst(e,t,n){return 1===this.incRefCount(e)?t():n()}actOnLast(e,t,n){return 0===this.decRefCount(e)?t():n()}};var le={},ue={},pe={};Object.defineProperty(pe,\"__esModule\",{value:!0}),pe.ChannelBase=pe.ProtectedItems=void 0;const we=e=>async(t,n,i)=>{const r=await e(t,n,i);return void 0===r?n:r};pe.ProtectedItems=class{constructor(e,t){this.providerIdentity=e,this.close=t}};class ye{static defaultAction(e){throw new Error(`No action registered at target for ${e}`)}constructor(){this.subscriptions=new Map}async processAction(e,t,n){try{const i=this.subscriptions.has(e)?this.subscriptions.get(e):(t,n)=>(this.defaultAction??ye.defaultAction)(e,t,n),r=this.preAction?await this.preAction(e,t,n):t,o=await i(r,n);return this.postAction?await this.postAction(e,o,n):o}catch(t){if(this.errorMiddleware)return this.errorMiddleware(e,t,n);throw t}}beforeAction(e){if(this.preAction)throw new Error(\"Already registered beforeAction middleware\");this.preAction=we(e)}onError(e){if(this.errorMiddleware)throw new Error(\"Already registered error middleware\");this.errorMiddleware=e}afterAction(e){if(this.postAction)throw new Error(\"Already registered afterAction middleware\");this.postAction=we(e)}remove(e){this.subscriptions.delete(e)}setDefaultAction(e){if(this.defaultAction)throw new Error(\"default action can only be set once\");this.defaultAction=e}register(e,t){if(this.subscriptions.has(e))throw new Error(`Subscription already registered for action: ${e}. Unsubscribe before adding new subscription`);return this.subscriptions.set(e,t),!0}}pe.ChannelBase=ye;var fe,ge,me,ve=s&&s.__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)},Ce=s&&s.__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};Object.defineProperty(ue,\"__esModule\",{value:!0}),ue.ChannelClient=void 0;const be=pe,Ie=new Map;class Ee extends be.ChannelBase{static closeChannelByEndpointId(e){const t=Ie.get(e);t&&ve(t,me,\"f\").call(t)}static handleProviderDisconnect(e){for(const t of Ie.values())t.providerIdentity.channelId===e.channelId&&(t.disconnectListener(e),ve(t,me,\"f\").call(t))}constructor(e,t,n){super(),fe.set(this,void 0),ge.set(this,void 0),this.processAction=(e,t,n)=>super.processAction(e,t,n),me.set(this,(()=>{Ie.delete(this.endpointId),ve(this,ge,\"f\").close()})),Ce(this,fe,new be.ProtectedItems(e,t),\"f\"),this.disconnectListener=()=>{},this.endpointId=e.endpointId,Ce(this,ge,n,\"f\"),Ie.set(this.endpointId,this),n.receive(this.processAction)}get providerIdentity(){return ve(this,fe,\"f\").providerIdentity}async dispatch(e,t){if(ve(this,ge,\"f\").isEndpointConnected(this.providerIdentity.channelId))return ve(this,ge,\"f\").send(this.providerIdentity.channelId,e,t);throw new Error(\"The client you are trying to dispatch from is disconnected from the target provider.\")}onDisconnection(e){this.disconnectListener=t=>{try{e(t)}catch(e){throw new Error(`Error while calling the onDisconnection callback: ${e.message}`)}finally{this.disconnectListener=()=>{}}}}async disconnect(){await this.sendDisconnectAction(),ve(this,me,\"f\").call(this)}async sendDisconnectAction(){const e=ve(this,fe,\"f\");await e.close()}static async wireClose(e,t,n){const{channelName:i,uuid:r,name:o}=t;await e.sendAction(\"disconnect-from-channel\",{channelName:i,uuid:r,name:o,endpointId:n})}}ue.ChannelClient=Ee,fe=new WeakMap,ge=new WeakMap,me=new WeakMap;var xe={},Ae={};Object.defineProperty(Ae,\"__esModule\",{value:!0}),Ae.exhaustiveCheck=void 0,Ae.exhaustiveCheck=function(e,t){throw new Error(`Unsupported value: ${e}${t?`\\n Supported values are: ${t.join(\"\")}`:\"\"}`)};var Pe,Me,_e,Oe={},Se=s&&s.__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},Re=s&&s.__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)};Object.defineProperty(Oe,\"__esModule\",{value:!0}),Oe.ClassicInfo=Oe.ClassicStrategy=void 0;Oe.ClassicStrategy=class{constructor(e,t,n,i){this.messageReceiver=t,this.endpointId=n,this.providerIdentity=i,Pe.set(this,void 0),Me.set(this,new Map),_e.set(this,new Map),this.send=async(e,t,n)=>{const i=Re(this,Me,\"f\").get(e);if(!i)throw new Error(`Could not locate routing info for endpoint ${e}`);const r={...i};r.isLocalEndpointId&&delete r.endpointId,delete r.isLocalEndpointId;const o=Re(this,Pe,\"f\").sendAction(\"send-channel-message\",{...r,providerIdentity:this.providerIdentity,action:t,payload:n});Re(this,_e,\"f\").get(e)?.add(o);return(await o.catch((e=>{throw new Error(e.message)})).finally((()=>{Re(this,_e,\"f\").get(e)?.delete(o)}))).payload.data.result},this.close=async()=>{this.messageReceiver.removeEndpoint(this.providerIdentity.channelId,this.endpointId),[...Re(this,Me,\"f\").keys()].forEach((e=>this.closeEndpoint(e))),Se(this,Me,new Map,\"f\")},Se(this,Pe,e,\"f\")}onEndpointDisconnect(e,t){}receive(e){this.messageReceiver.addEndpoint(e,this.providerIdentity.channelId,this.endpointId)}async closeEndpoint(e){const t=Re(this,Me,\"f\").get(e);Re(this,Me,\"f\").delete(e);const n=Re(this,_e,\"f\").get(e);n?.forEach((n=>{const i=`Channel connection with identity uuid: ${t?.uuid} / name: ${t?.name} / endpointId: ${e} no longer connected.`;n.cancel(new Error(i))}))}isEndpointConnected(e){return Re(this,Me,\"f\").has(e)}addEndpoint(e,t){Re(this,Me,\"f\").set(e,t.endpointIdentity),Re(this,_e,\"f\").set(e,new Set)}isValidEndpointPayload(e){return\"string\"==typeof e?.endpointIdentity?.endpointId||\"string\"==typeof e?.endpointIdentity?.channelId}},Pe=new WeakMap,Me=new WeakMap,_e=new WeakMap,Oe.ClassicInfo={version:5,minimumVersion:0,type:\"classic\"};var Fe={},je={},ke={};Object.defineProperty(ke,\"__esModule\",{value:!0}),ke.errorToPOJO=void 0,ke.errorToPOJO=function(e){return{stack:e.stack,name:e.name,message:e.message,toString:()=>e.stack||e.toString()}};var Le,Te,$e=s&&s.__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)},Be=s&&s.__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};Object.defineProperty(je,\"__esModule\",{value:!0}),je.RTCEndpoint=void 0;const Ge=ke;je.RTCEndpoint=class{static isValidEndpointPayload(e){const t=e=>\"object\"==typeof e&&null!==e;return t(e)&&t(e.endpointIdentity)&&t(e.rtc)&&\"string\"==typeof e.endpointIdentity.endpointId}constructor({rtc:e,endpointIdentity:t}){this.responseMap=new Map,Le.set(this,null),Te.set(this,void 0),this.connectionStateChangeHandler=e=>{\"connected\"!==this.rtc.rtcClient.connectionState&&(this.rtc.rtcClient.removeEventListener(\"connectionstatechange\",this.connectionStateChangeHandler),this.close(),$e(this,Te,\"f\")&&$e(this,Te,\"f\").call(this))},this.send=async(e,t)=>{const n=`message-${Math.random()}`,i=new Promise(((e,t)=>{this.responseMap.set(n,{resolve:e,reject:t})}));return this.rtc.channels.request.send(JSON.stringify({action:e,payload:t,messageId:n})),i},this.close=()=>{this.responseMap.forEach((e=>e.reject(\"Connection has closed.\"))),this.responseMap=new Map,this.rtc.channels.request.close(),this.rtc.channels.response.close(),this.rtc.rtcClient.close()},this.rtc=e,this.endpointIdentity=t,this.rtc.channels.response.addEventListener(\"message\",(e=>{let{data:t}=e;e.data instanceof ArrayBuffer&&(t=(new TextDecoder).decode(e.data));const{messageId:n,payload:i,success:r,error:o}=JSON.parse(t),{resolve:s,reject:a}=this.responseMap.get(n)??{};s&&a?(this.responseMap.delete(n),r?s(i):a(o)):(console.log(\"Could not find id in responseMap.\"),console.log(e))})),this.rtc.channels.request.addEventListener(\"message\",(async e=>{let{data:n}=e;e.data instanceof ArrayBuffer&&(n=(new TextDecoder).decode(e.data));const{messageId:i,action:r,payload:o}=JSON.parse(n);if($e(this,Le,\"f\"))try{const e=await $e(this,Le,\"f\").call(this,r,o,t);this.rtc.channels.response.send(JSON.stringify({messageId:i,payload:e,success:!0}))}catch(e){\"open\"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,error:(0,Ge.errorToPOJO)(e),success:!1}))}else\"open\"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,success:!1,error:\"Connection not ready.\"}))})),this.rtc.rtcClient.addEventListener(\"connectionstatechange\",this.connectionStateChangeHandler),Object.values(this.rtc.channels).forEach((e=>{e.onclose=e=>{[...this.responseMap.values()].forEach((e=>e.reject(new Error(\"RTCDataChannel closed unexpectedly, this is most commonly caused by message size. Note: RTC Channels have a message size limit of ~255kB.\")))),this.close(),$e(this,Te,\"f\")&&$e(this,Te,\"f\").call(this)}}))}onDisconnect(e){if($e(this,Te,\"f\"))throw new Error(\"RTCEndpoint disconnectListener cannot be set twice.\");Be(this,Te,e,\"f\")}receive(e){if($e(this,Le,\"f\"))throw new Error(\"You have already set a listener for this RTC Endpoint.\");Be(this,Le,e,\"f\")}get connected(){return\"connected\"===this.rtc.rtcClient.connectionState}},Le=new WeakMap,Te=new WeakMap;var We,He,Ne,De={},Ue=s&&s.__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)},Ve=s&&s.__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};Object.defineProperty(De,\"__esModule\",{value:!0}),De.EndpointStrategy=void 0;De.EndpointStrategy=class{constructor(e,t,n){this.EndpointType=e,this.StrategyName=n,We.set(this,null),He.set(this,new Map),Ne.set(this,!0),this.send=async(e,t,n)=>this.getEndpointById(e).send(t,n),this.close=async()=>{Ue(this,Ne,\"f\")&&(Ue(this,He,\"f\").forEach((e=>e.close())),Ve(this,He,new Map,\"f\")),Ve(this,Ne,!1,\"f\")},this.isValidEndpointPayload=t}onEndpointDisconnect(e,t){this.getEndpointById(e).onDisconnect(t)}receive(e){if(Ue(this,We,\"f\"))throw new Error(`You have already set a listener for this ${this.StrategyName} Strategy`);Ve(this,We,e,\"f\"),Ue(this,He,\"f\").forEach((e=>e.receive(Ue(this,We,\"f\"))))}getEndpointById(e){const t=Ue(this,He,\"f\").get(e);if(!t)throw new Error(`Client with endpoint id ${e} is not connected`);return t}get connected(){return Ue(this,Ne,\"f\")}isEndpointConnected(e){return Ue(this,He,\"f\").has(e)}addEndpoint(e,t){if(!Ue(this,Ne,\"f\"))return void console.warn(`Adding endpoint to disconnected ${this.StrategyName} Strategy`);const n=new this.EndpointType(t);Ue(this,We,\"f\")&&n.receive(Ue(this,We,\"f\")),Ue(this,He,\"f\").set(e,n)}async closeEndpoint(e){Ue(this,He,\"f\").delete(e)}},We=new WeakMap,He=new WeakMap,Ne=new WeakMap,Object.defineProperty(Fe,\"__esModule\",{value:!0}),Fe.RTCInfo=Fe.RTCStrategy=void 0;const ze=je,Ke=De;class qe extends Ke.EndpointStrategy{constructor(){super(ze.RTCEndpoint,ze.RTCEndpoint.isValidEndpointPayload,\"RTC\")}}Fe.RTCStrategy=qe,Fe.RTCInfo={version:2,minimumVersion:0,type:\"rtc\"};var Je={};Object.defineProperty(Je,\"__esModule\",{value:!0}),Je.RTCICEManager=void 0;const Ye=d;class Ze extends Ye.EmitterBase{constructor(e){super(e,\"channel\"),this.ensureChannelOpened=e=>new Promise(((t,n)=>{if(\"open\"===e.readyState)t();else if(\"connecting\"===e.readyState){const n=()=>{e.removeEventListener(\"open\",n),t()};e.addEventListener(\"open\",n)}else n(new Error(\"This Channel has already closed\"))}))}static createDataChannelPromise(e,t){let n;const i=new Promise((e=>{n=e})),r=i=>{const o=()=>{i.channel.removeEventListener(\"open\",o),n(i.channel)};i.channel.label===e&&(i.channel.addEventListener(\"open\",o),t.removeEventListener(\"datachannel\",r))};return t.addEventListener(\"datachannel\",r),i}async listenForProviderIce(e,t){await this.on(this.createProviderEventName(e),t,{timestamp:Date.now()})}async raiseProviderIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createProviderEventName(e)),t)}async listenForClientIce(e,t){await this.on(this.createClientEventName(e),t,{timestamp:Date.now()})}async raiseClientIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createClientEventName(e)),t)}cleanupIceListeners(e){this.removeAllListeners(this.createClientEventName(e)),this.removeAllListeners(this.createProviderEventName(e))}createClientEventName(e){return`ice-client-${e}`}createProviderEventName(e){return`ice-provider-${e}`}createRouteString(e){return`channel/${e}`}createRtcPeer(){return this.wire.environment.getRtcPeer()}async startClientOffer(){const e=Math.random().toString(),t=this.createRtcPeer();t.addEventListener(\"icecandidate\",(async t=>{t.candidate&&await this.raiseClientIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForProviderIce(e,(async e=>{await t.addIceCandidate(e.candidate)}));const n={request:t.createDataChannel(\"request\"),response:t.createDataChannel(\"response\")},i=await t.createOffer();await t.setLocalDescription(i);const r=Promise.all([n.request,n.response].map(this.ensureChannelOpened)).then((()=>{}));return{rtcClient:t,channels:n,offer:i,rtcConnectionId:e,channelsOpened:r}}async finishClientOffer(e,t,n){return await e.setRemoteDescription(t),await n,!0}async createProviderAnswer(e,t){const n=this.createRtcPeer(),i=Ze.createDataChannelPromise(\"request\",n),r=Ze.createDataChannelPromise(\"response\",n);n.addEventListener(\"icecandidate\",(async t=>{t.candidate&&await this.raiseProviderIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForClientIce(e,(async e=>{await n.addIceCandidate(e.candidate)})),await n.setRemoteDescription(t);const o=await n.createAnswer();await n.setLocalDescription(o);const s=Promise.all([i,r]).then((([t,n])=>(this.cleanupIceListeners(e),{request:t,response:n})));return{rtcClient:n,answer:o,channels:s}}}Je.RTCICEManager=Ze;var Qe={},Xe={};function et(e){return[...e.split(\".\").reverse().entries()].reduce(((e,[t,n])=>e+ +n*1e4**t),0)}function tt(e,t){return et(e)>=et(t)}function nt(e){return e.split(\"/\")[0]}Object.defineProperty(Xe,\"__esModule\",{value:!0}),Xe.runtimeUuidMeetsMinimumRuntimeVersion=Xe.parseRuntimeUuid=Xe.meetsMinimumRuntimeVersion=void 0,Xe.meetsMinimumRuntimeVersion=tt,Xe.parseRuntimeUuid=nt,Xe.runtimeUuidMeetsMinimumRuntimeVersion=function(e,t){return tt(nt(e),t)};var it,rt,ot,st,at,ct=s&&s.__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)},dt=s&&s.__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};Object.defineProperty(Qe,\"__esModule\",{value:!0}),Qe.ChannelProvider=void 0;const ht=pe,lt=Xe;class ut extends ht.ChannelBase{get connections(){return[...ct(this,it,\"f\")]}static handleClientDisconnection(e,t){const n=e.connections.find((e=>e.endpointId===t.endpointId));if(n)ct(e,st,\"f\").call(e,n);else{e.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name)).forEach(ct(e,st,\"f\"))}e.disconnectListener(t)}static setProviderRemoval(e,t){ut.removalMap.set(e,t)}constructor(e,t,n){super(),it.set(this,void 0),rt.set(this,void 0),ot.set(this,void 0),st.set(this,(e=>{const t=this.connections.filter((t=>t.endpointId!==e.endpointId));ct(this,ot,\"f\").closeEndpoint(e.endpointId),dt(this,it,t,\"f\")})),this.processAction=async(e,t,n)=>(ut.clientIsMultiRuntime(n)&&!(0,lt.runtimeUuidMeetsMinimumRuntimeVersion)(n.runtimeUuid,\"18.87.56.0\")?this.handleMultiRuntimeLegacyClient(n):this.checkForClientConnection(n),super.processAction(e,t,n)),at.set(this,(()=>{ct(this,ot,\"f\").close();const e=ut.removalMap.get(this);e&&e()})),dt(this,rt,new ht.ProtectedItems(e,t),\"f\"),this.connectListener=()=>{},this.disconnectListener=()=>{},dt(this,it,[],\"f\"),dt(this,ot,n,\"f\"),n.receive(this.processAction)}dispatch(e,t,n){const i=e.endpointId??this.getEndpointIdForOpenFinId(e,t);return i&&ct(this,ot,\"f\").isEndpointConnected(i)?ct(this,ot,\"f\").send(i,t,n):Promise.reject(new Error(`Client connection with identity uuid: ${e.uuid} / name: ${e.name} / endpointId: ${i} no longer connected.`))}async processConnection(e,t){return ct(this,it,\"f\").push(e),this.connectListener(e,t)}publish(e,t){return this.connections.map((n=>ct(this,ot,\"f\").send(n.endpointId,e,t)))}onConnection(e){this.connectListener=e}onDisconnection(e){this.disconnectListener=e}async destroy(){const e=ct(this,rt,\"f\");e.providerIdentity,dt(this,it,[],\"f\"),await e.close(),ct(this,at,\"f\").call(this)}async getAllClientInfo(){return this.connections.map((e=>{const{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}=e;return{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}}))}checkForClientConnection(e){if(!this.isClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider.\\n Client Identity: {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}isClientConnected(e){return ut.clientIdentityIncludesEndpointId(e)?this.connections.some((t=>t.endpointId===e.endpointId&&t.uuid===e.uuid&&t.name===e.name)):this.isLegacyClientConnected(e)}isLegacyClientConnected(e){return this.connections.some((t=>t.uuid===e.uuid&&t.name===e.name))}handleMultiRuntimeLegacyClient(e){if(!this.isLegacyClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider. Client Identity:\\n {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}getEndpointIdForOpenFinId(e,t){const n=this.connections.filter((t=>t.name===e.name&&t.uuid===e.uuid));if(n.length>=2){const n=ct(this,rt,\"f\"),{uuid:i,name:r}=e,o=n?.providerIdentity.uuid,s=n?.providerIdentity.name;console.warn(`WARNING: Dispatch call may have unintended results. The \"to\" argument of your dispatch call is missing the\\n \"endpointId\" parameter. The identity you are dispatching to ({uuid: ${i}, name: ${r}})\\n has multiple channelClients for this channel. Your dispatched action: (${t}) from the provider:\\n ({uuid: ${o}, name: ${s}}) will only be processed by the most recently-created client.`)}return n.pop()?.endpointId}static clientIdentityIncludesEndpointId(e){return void 0!==e.endpointId}static clientIsMultiRuntime(e){return void 0!==e.runtimeUuid}static async wireClose(e,t){await e.sendAction(\"destroy-channel\",{channelName:t})}}Qe.ChannelProvider=ut,it=new WeakMap,rt=new WeakMap,ot=new WeakMap,st=new WeakMap,at=new WeakMap,ut.removalMap=new WeakMap;var pt={};Object.defineProperty(pt,\"__esModule\",{value:!0}),pt.MessageReceiver=void 0;const wt=ue,yt=d;class ft extends yt.Base{constructor(e){super(e),this.onmessage=e=>\"process-channel-message\"===e.action&&(this.processChannelMessage(e),!0),this.endpointMap=new Map,this.latestEndpointIdByChannelId=new Map,e.registerMessageHandler(this.onmessage.bind(this))}async processChannelMessage(e){const{senderIdentity:t,providerIdentity:n,action:i,ackToSender:r,payload:o,intendedTargetIdentity:s}=e.payload,a=s.channelId??s.endpointId??this.latestEndpointIdByChannelId.get(n.channelId),c=this.endpointMap.get(a);if(!c)return r.payload.success=!1,r.payload.reason=`Client connection with identity uuid: ${this.wire.me.uuid} / name: ${this.wire.me.name} / endpointId: ${a} no longer connected.`,this.wire.sendRaw(r);try{const e=await c(i,o,t);return r.payload.payload=r.payload.payload||{},r.payload.payload.result=e,this.wire.sendRaw(r)}catch(e){return r.payload.success=!1,r.payload.reason=e.message,this.wire.sendRaw(r)}}addEndpoint(e,t,n){this.endpointMap.set(n,e),t!==n&&this.latestEndpointIdByChannelId.set(t,n)}removeEndpoint(e,t){this.endpointMap.delete(t),this.latestEndpointIdByChannelId.get(e)===t&&this.latestEndpointIdByChannelId.delete(e)}checkForPreviousClientConnection(e){const t=this.latestEndpointIdByChannelId.get(e);t&&(wt.ChannelClient.closeChannelByEndpointId(t),console.warn(\"You have created a second connection to an older provider. First connection has been removed from the clientMap\"),console.warn(\"If the provider calls publish(), you may receive multiple messages.\"))}}pt.MessageReceiver=ft;var gt={};Object.defineProperty(gt,\"__esModule\",{value:!0}),gt.ProtocolManager=void 0;gt.ProtocolManager=class{constructor(e){this.ProtocolsInPreferenceOrder=e,this.DefaultClientProtocols=[\"classic\"],this.DefaultProviderProtocols=[\"classic\"],this.getClientProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultClientProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(\", \")}.`);return t},this.getProviderProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultProviderProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(\", \")}.`);return t},this.getCompatibleProtocols=(e,t)=>t.supportedProtocols.filter((t=>e.some((e=>e.type===t.type&&t.version>=e.minimumVersion&&e.version>=(t.minimumVersion??0))))).slice(0,t.maxProtocols)}};var mt={};Object.defineProperty(mt,\"__esModule\",{value:!0});class vt{static combine(e,t){return new vt(e,t)}constructor(e,t){this.primary=e,this.secondary=t}onEndpointDisconnect(e,t){this.primary.onEndpointDisconnect(e,(()=>{this.secondary.isEndpointConnected(e)||t()})),this.secondary.onEndpointDisconnect(e,(()=>{this.primary.isEndpointConnected(e)||t()}))}isValidEndpointPayload(e){return this.primary.isValidEndpointPayload(e)||this.secondary.isValidEndpointPayload(e)}async closeEndpoint(e){await this.primary.closeEndpoint(e),await this.secondary.closeEndpoint(e)}isEndpointConnected(e){return this.primary.isEndpointConnected(e)||this.secondary.isEndpointConnected(e)}async addEndpoint(e,t){this.primary.isValidEndpointPayload(t)&&await this.primary.addEndpoint(e,t),this.secondary.isValidEndpointPayload(t)&&await this.secondary.addEndpoint(e,t)}receive(e){this.primary.receive(e),this.secondary.receive(e)}send(e,t,n){return this.primary.isEndpointConnected(e)?this.primary.send(e,t,n):this.secondary.send(e,t,n)}async close(){await Promise.all([this.primary.close(),this.secondary.close()])}}mt.default=vt;var Ct,bt,It=s&&s.__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},Et=s&&s.__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)},xt=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(xe,\"__esModule\",{value:!0}),xe.ConnectionManager=void 0;const At=Ae,Pt=d,Mt=Oe,_t=Fe,Ot=Je,St=Qe,Rt=pt,Ft=gt,jt=xt(mt);class kt extends Pt.Base{static getProtocolOptionsFromStrings(e){return e.map((e=>{switch(e){case\"rtc\":return _t.RTCInfo;case\"classic\":return Mt.ClassicInfo;default:return(0,At.exhaustiveCheck)(e,[\"rtc\",\"classic\"])}}))}constructor(e){super(e),Ct.set(this,void 0),bt.set(this,void 0),this.removeChannelFromProviderMap=e=>{this.providerMap.delete(e)},this.onmessage=e=>\"process-channel-connection\"===e.action&&(this.processChannelConnection(e),!0),this.providerMap=new Map,this.protocolManager=new Ft.ProtocolManager(\"node\"===this.wire.environment.type?[\"classic\"]:[\"rtc\",\"classic\"]),It(this,Ct,new Rt.MessageReceiver(e),\"f\"),It(this,bt,new Ot.RTCICEManager(e),\"f\"),e.registerMessageHandler(this.onmessage.bind(this))}createProvider(e,t){const n=Object.assign(this.wire.environment.getDefaultChannelOptions().create,e||{}),i=this.protocolManager.getProviderProtocols(n?.protocols),r=i.map((e=>{switch(e){case\"rtc\":return new _t.RTCStrategy;case\"classic\":return new Mt.ClassicStrategy(this.wire,Et(this,Ct,\"f\"),t.channelId,t);default:return(0,At.exhaustiveCheck)(e,[\"rtc\",\"classic\"])}}));let o;if(2===r.length){const[e,t]=r;o=jt.default.combine(e,t)}else{if(1!==r.length)throw new Error(\"failed to combine strategies\");[o]=r}const s=new St.ChannelProvider(t,(()=>St.ChannelProvider.wireClose(this.wire,t.channelName)),o),a=t.channelId;return this.providerMap.set(a,{provider:s,strategy:o,supportedProtocols:kt.getProtocolOptionsFromStrings(i)}),St.ChannelProvider.setProviderRemoval(s,this.removeChannelFromProviderMap.bind(this)),s}async createClientOffer(e){const t=this.protocolManager.getClientProtocols(e?.protocols);let n;return{offer:{supportedProtocols:await Promise.all(t.map((async e=>{switch(e){case\"rtc\":{const{rtcClient:e,channels:t,offer:i,rtcConnectionId:r,channelsOpened:o}=await Et(this,bt,\"f\").startClientOffer();return n={rtcClient:e,channels:t,channelsOpened:o},{type:\"rtc\",version:_t.RTCInfo.version,payload:{offer:i,rtcConnectionId:r}}}case\"classic\":return{type:\"classic\",version:Mt.ClassicInfo.version};default:return(0,At.exhaustiveCheck)(e,[\"rtc\",\"classic\"])}}))),maxProtocols:2},rtc:n}}async createClientStrategy(e,t){t.endpointId||(t.endpointId=this.wire.environment.getNextMessageId(),Et(this,Ct,\"f\").checkForPreviousClientConnection(t.channelId));const n=t.answer??{supportedProtocols:[{type:\"classic\",version:1}]},i=(await Promise.all(n.supportedProtocols.map((async n=>\"rtc\"===n.type&&e?(await Et(this,bt,\"f\").finishClientOffer(e.rtcClient,n.payload.answer,e.channelsOpened),new _t.RTCStrategy):\"classic\"===n.type?new Mt.ClassicStrategy(this.wire,Et(this,Ct,\"f\"),t.endpointId,t):null)))).filter((e=>null!==e));let r;if(e&&!i.some((e=>e instanceof _t.RTCStrategy))&&e&&e.rtcClient.close(),i.length>=2)r=jt.default.combine(i[0],i[1]);else{if(!i.length)throw new Error(\"No compatible protocols\");[r]=i}const o={endpointIdentity:t,rtc:e};return r.addEndpoint(t.channelId,o),r}async processChannelConnection(e){const{clientIdentity:t,providerIdentity:n,ackToSender:i,payload:r,offer:o}=e.payload;t.endpointId?t.isLocalEndpointId=!1:(t.endpointId=this.wire.environment.getNextMessageId(),t.isLocalEndpointId=!0);const s=n.channelId,a=this.providerMap.get(s);if(!a)return i.payload.success=!1,i.payload.reason=`Channel \"${n.channelName}\" has been destroyed.`,this.wire.sendRaw(i);const{provider:c,strategy:d,supportedProtocols:h}=a;try{if(!(c instanceof St.ChannelProvider))throw Error(\"Cannot connect to a channel client\");const e=o??{supportedProtocols:[{type:\"classic\",version:1}],maxProtocols:1},n=this.protocolManager.getCompatibleProtocols(h,e);if(!n.length)throw new Error(\"This provider does not support any of the offered protocols.\");const s=await c.processConnection(t,r);i.payload.payload=i.payload.payload||{};let a={supportedProtocols:[],endpointPayloadPromise:Promise.resolve({endpointIdentity:t})};return a=await n.reduce((async(e,t)=>{const n=await e;if(\"rtc\"===t.type){const{answer:e,rtcClient:i,channels:r}=await Et(this,bt,\"f\").createProviderAnswer(t.payload.rtcConnectionId,t.payload.offer);n.supportedProtocols.push({type:\"rtc\",version:_t.RTCInfo.version,payload:{answer:e}}),n.endpointPayloadPromise=n.endpointPayloadPromise.then((e=>r.then((t=>({...e,rtc:{rtcClient:i,channels:t}})))))}else n.supportedProtocols.push({type:\"classic\",version:Mt.ClassicInfo.version});return n}),Promise.resolve(a)),a.endpointPayloadPromise.then((e=>d.addEndpoint(t.endpointId,e))),i.payload.payload.result=s,i.payload.payload.answer=a,this.wire.sendRaw(i)}catch(e){return i.payload.success=!1,i.payload.reason=e.message,this.wire.sendRaw(i)}}}xe.ConnectionManager=kt,Ct=new WeakMap,bt=new WeakMap;var Lt,Tt,$t,Bt=s&&s.__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},Gt=s&&s.__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)};Object.defineProperty(le,\"__esModule\",{value:!0}),le.Channel=void 0;const Wt=t,Ht=G,Nt=d,Dt=ue,Ut=xe,Vt=Qe;function zt(e){const t=Math.floor(e/10),n=Math.min(3e4,500*2**t);return new Promise((e=>{setTimeout((()=>{e(!1)}),n)}))}class Kt extends Nt.EmitterBase{constructor(e){super(e,\"channel\"),Lt.set(this,void 0),Tt.set(this,new Wt.EventEmitter),$t.set(this,new Ht.AsyncRetryableLazy((async()=>{await Promise.all([this.on(\"disconnected\",(e=>{Dt.ChannelClient.handleProviderDisconnect(e)})),this.on(\"connected\",((...e)=>{Gt(this,Tt,\"f\").emit(\"connected\",...e)}))]).catch((()=>new Error(\"error setting up channel connection listeners\")))}))),Bt(this,Lt,new Ut.ConnectionManager(e),\"f\")}async getAllChannels(){return this.wire.sendAction(\"get-all-channels\").then((({payload:e})=>e.data))}async onChannelConnect(e){await this.on(\"connected\",e)}async onChannelDisconnect(e){await this.on(\"disconnected\",e)}async safeConnect(e,t,n){const i={count:0};do{let r=()=>{};const o=new Promise((t=>{r=n=>{e===n.channelName&&t(!0)},Gt(this,Tt,\"f\").on(\"connected\",r)}));try{if(i.count>0){i.gotConnectedEvent=await Promise.race([zt(i.count),o]);const t=await this.wire.sendAction(\"connect-to-channel\",{...n,retryInfo:i});return console.log(`Successfully connected to channelName: ${e}`),t.payload.data}const t=this.wire.sendAction(\"connect-to-channel\",n);i.originalMessageId=t.messageId;return(await t).payload.data}catch(n){if(!n.message.includes(\"internal-nack\"))throw n;t&&0===i.count&&console.warn(`No channel found for channelName: ${e}. Waiting for connection...`)}finally{i.count+=1,Gt(this,Tt,\"f\").removeListener(\"connected\",r)}}while(t);throw new Error(`No channel found for channelName: ${e}.`)}async connect(e,t={}){if(await Gt(this,$t,\"f\").getValue(),!e||\"string\"!=typeof e)throw new Error(\"Please provide a channelName string to connect to a channel.\");const n={wait:!0,...this.wire.environment.getDefaultChannelOptions().connect,...t},{offer:i,rtc:r}=await Gt(this,Lt,\"f\").createClientOffer(n);let o;(this.fin.me.isFrame||this.fin.me.isView||this.fin.me.isWindow)&&(o=(await this.fin.me.getInfo()).url);const s={channelName:e,...n,offer:i,connectionUrl:o},a=await this.safeConnect(e,n.wait,s),c=await Gt(this,Lt,\"f\").createClientStrategy(r,a),d=new Dt.ChannelClient(a,(()=>Dt.ChannelClient.wireClose(this.wire,a,a.endpointId)),c);return c.onEndpointDisconnect(a.channelId,(async()=>{try{await d.sendDisconnectAction()}catch(e){console.warn(`Something went wrong during disconnect for client with uuid: ${a.uuid} / name: ${a.name} / endpointId: ${a.endpointId}.`)}finally{Dt.ChannelClient.handleProviderDisconnect(a)}})),d}async create(e,t){if(!e)throw new Error(\"Please provide a channelName to create a channel\");const{payload:{data:n}}=await this.wire.sendAction(\"create-channel\",{channelName:e}),i=Gt(this,Lt,\"f\").createProvider(t,n);return this.on(\"client-disconnected\",(t=>{t.channelName===e&&Vt.ChannelProvider.handleClientDisconnection(i,t)})),i}}le.Channel=Kt,Lt=new WeakMap,Tt=new WeakMap,$t=new WeakMap,Object.defineProperty(de,\"__esModule\",{value:!0}),de.InterAppPayload=de.InterApplicationBus=void 0;const qt=t,Jt=d,Yt=he,Zt=le,Qt=O;class Xt extends Jt.Base{constructor(e){super(e),this.events={subscriberAdded:\"subscriber-added\",subscriberRemoved:\"subscriber-removed\"},this.refCounter=new Yt.RefCounter,this.Channel=new Zt.Channel(e),this.emitter=new qt.EventEmitter,e.registerMessageHandler(this.onmessage.bind(this)),this.on=this.emitter.on.bind(this.emitter),this.removeAllListeners=this.emitter.removeAllListeners.bind(this.emitter)}async publish(e,t){await this.wire.sendAction(\"publish-message\",{topic:e,message:t,sourceWindowName:this.me.name})}async send(e,t,n){const i=(0,Qt.validateIdentity)(e);if(i)throw new Error(i);await this.wire.sendAction(\"send-message\",{destinationUuid:e.uuid,destinationWindowName:e.name,topic:t,message:n,sourceWindowName:this.me.name})}subscribe(e,t,n){const i=this.createSubscriptionKey(e.uuid,e.name||\"*\",t);return this.emitter.on(i,n),this.refCounter.actOnFirst(i,(async()=>{await this.wire.sendAction(\"subscribe\",{sourceUuid:e.uuid,sourceWindowName:e.name||\"*\",topic:t,destinationWindowName:this.me.name})}),(()=>Promise.resolve()))}unsubscribe(e,t,n){const i=e.name||\"*\",r=this.createSubscriptionKey(e.uuid,i,t);return this.emitter.removeListener(r,n),this.refCounter.actOnLast(r,(async()=>{await this.wire.sendAction(\"unsubscribe\",{sourceUuid:e.uuid,sourceWindowName:i,topic:t,destinationWindowName:this.me.name})}),(()=>new Promise((e=>e)).then((()=>{}))))}processMessage(e){const{payload:{message:t,sourceWindowName:n,sourceUuid:i,topic:r}}=e,o=[this.createSubscriptionKey(i,n,r),this.createSubscriptionKey(i,\"*\",r),this.createSubscriptionKey(\"*\",\"*\",r)],s={uuid:i,name:n};o.forEach((e=>{this.emitter.emit(e,t,s)}))}emitSubscriverEvent(e,t){const{payload:{targetName:n,uuid:i,topic:r}}=t,o={name:n,uuid:i,topic:r};this.emitter.emit(e,o)}createSubscriptionKey(e,t,n){const i=t||\"*\";if(!(e&&i&&n))throw new Error(\"Missing uuid, name, or topic string\");return function(...e){return e.map((e=>Buffer.from(`${e}`).toString(\"base64\"))).join(\"/\")}(e,i,n)}onmessage(e){const{action:t}=e;switch(t){case\"process-message\":this.processMessage(e);break;case this.events.subscriberAdded:this.emitSubscriverEvent(this.events.subscriberAdded,e);break;case this.events.subscriberRemoved:this.emitSubscriverEvent(this.events.subscriberRemoved,e)}return!0}}de.InterApplicationBus=Xt;de.InterAppPayload=class{};var en={};Object.defineProperty(en,\"__esModule\",{value:!0}),en.Clipboard=void 0;const tn=d;class nn extends tn.Base{async writeText(e){await this.wire.sendAction(\"clipboard-write-text\",e)}async readText(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-text\",{type:e});return t.data}async writeImage(e){await this.wire.sendAction(\"clipboard-write-image\",e)}async readImage(e={format:\"dataURL\"}){const{payload:t}=await this.wire.sendAction(\"clipboard-read-image\",e);return t.data}async writeHtml(e){await this.wire.sendAction(\"clipboard-write-html\",e)}async readHtml(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-html\",{type:e});return t.data}async writeRtf(e){await this.wire.sendAction(\"clipboard-write-rtf\",e)}async readRtf(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-rtf\",{type:e});return t.data}async write(e){await this.wire.sendAction(\"clipboard-write\",e)}async getAvailableFormats(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-formats\",{type:e});return t.data}}en.Clipboard=nn;var rn={},on={},sn={};Object.defineProperty(sn,\"__esModule\",{value:!0}),sn.ExternalApplication=void 0;const an=d;class cn extends an.EmitterBase{constructor(e,t){super(e,\"external-application\",t.uuid),this.identity=t}getInfo(){return this.wire.sendAction(\"get-external-application-info\",this.identity).then((({payload:e})=>e.data))}}sn.ExternalApplication=cn,Object.defineProperty(on,\"__esModule\",{value:!0}),on.ExternalApplicationModule=void 0;const dn=d,hn=sn;class ln extends dn.Base{wrap(e){return this.wire.sendAction(\"external-application-wrap\").catch((e=>{})),Promise.resolve(new hn.ExternalApplication(this.wire,{uuid:e}))}wrapSync(e){return this.wire.sendAction(\"external-application-wrap-sync\").catch((e=>{})),new hn.ExternalApplication(this.wire,{uuid:e})}}on.ExternalApplicationModule=ln,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(on,e),n(sn,e)}(rn);var un={},pn={},wn={};Object.defineProperty(wn,\"__esModule\",{value:!0}),wn._Frame=void 0;const yn=d;class fn extends yn.EmitterBase{constructor(e,t){super(e,\"frame\",t.uuid,t.name),this.identity=t}getInfo(){return this.wire.sendAction(\"get-frame-info\",this.identity).then((({payload:e})=>e.data))}getParentWindow(){return this.wire.sendAction(\"get-parent-window\",this.identity).then((({payload:e})=>e.data))}}wn._Frame=fn,Object.defineProperty(pn,\"__esModule\",{value:!0}),pn._FrameModule=void 0;const gn=d,mn=O,vn=wn;class Cn extends gn.Base{async wrap(e){this.wire.sendAction(\"frame-wrap\").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}wrapSync(e){this.wire.sendAction(\"frame-wrap-sync\").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}getCurrent(){return this.wire.sendAction(\"frame-get-current\").catch((e=>{})),Promise.resolve(new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity()))}getCurrentSync(){return this.wire.sendAction(\"frame-get-current-sync\").catch((e=>{})),new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity())}}pn._FrameModule=Cn,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(pn,e),n(wn,e)}(un);var bn={};Object.defineProperty(bn,\"__esModule\",{value:!0}),bn.GlobalHotkey=void 0;const In=d;class En extends In.EmitterBase{constructor(e){super(e,\"global-hotkey\")}async register(e,t){await this.on(e,t),await this.wire.sendAction(\"global-hotkey-register\",{hotkey:e})}async unregister(e){await this.removeAllListeners(e),await this.wire.sendAction(\"global-hotkey-unregister\",{hotkey:e})}async unregisterAll(){await Promise.all(this.eventNames().filter((e=>!(\"registered\"===e||\"unregistered\"===e))).map((e=>this.removeAllListeners(e)))),await this.wire.sendAction(\"global-hotkey-unregister-all\",{})}async isRegistered(e){const{payload:{data:t}}=await this.wire.sendAction(\"global-hotkey-is-registered\",{hotkey:e});return t}}bn.GlobalHotkey=En;var xn,An={},Pn={},Mn={},_n=s&&s.__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)};Object.defineProperty(Mn,\"__esModule\",{value:!0}),Mn.Platform=void 0;const On=d,Sn=O,Rn=new Map;class Fn extends On.EmitterBase{constructor(e,t){super(t.wire,\"application\",e.uuid),this.getClient=e=>{this.wire.sendAction(\"platform-get-client\",this.identity).catch((e=>{}));const t=e||this.identity,{uuid:n}=t;if(!Rn.has(n)){const e=_n(this,xn,\"f\").call(this,n);Rn.set(n,e)}return Rn.get(n)},xn.set(this,(async e=>{try{const t=`custom-frame-${e}`,n=await this._channel.connect(t,{wait:!1});return n.onDisconnection((()=>{Rn.delete(e)})),n}catch(t){throw Rn.delete(e),new Error(\"The targeted Platform is not currently running. Listen for application-started event for the given Uuid.\")}})),this.launchLegacyManifest=this.launchContentManifest;const n=(0,Sn.validateIdentity)(e);if(n)throw new Error(n);this._channel=t,this.identity={uuid:e.uuid},this.Layout=this.fin.Platform.Layout,this.Application=this.fin.Application.wrapSync(this.identity)}async createView(e,t,n){this.wire.sendAction(\"platform-create-view\",this.identity).catch((e=>{}));const i=await this.getClient(),r=await i.dispatch(\"create-view\",{target:t,opts:e,targetView:n});if(!r||(0,Sn.validateIdentity)(r.identity))throw new Error(`When overwriting the createView call, please return an object that has a valid 'identity' property: ${JSON.stringify(r)}`);return this.fin.View.wrapSync(r.identity)}async createWindow(e){this.wire.sendAction(\"platform-create-window\",this.identity).catch((e=>{}));const t=await this.getClient();e.reason||(e.reason=\"api-call\");const n=await t.dispatch(\"create-view-container\",e);if(!n||(0,Sn.validateIdentity)(n.identity))throw new Error(`When overwriting the createWindow call, please return an object that has a valid 'identity' property: ${JSON.stringify(n)}`);const{identity:i}=n,r=this.fin.Window.wrapSync(i);return r.name=i.name,r.uuid=i.uuid,r}async quit(){this.wire.sendAction(\"platform-quit\",this.identity).catch((e=>{}));return(await this.getClient()).dispatch(\"quit\")}async closeView(e){this.wire.sendAction(\"platform-close-view\",this.identity).catch((e=>{}));const t=await this.getClient();await t.dispatch(\"close-view\",{view:e})}async reparentView(e,t){console.warn(\"Platform.reparentView has been deprecated, please use Platform.createView\"),this.wire.sendAction(\"platform-reparent-view\",this.identity).catch((e=>{}));const n={...e,uuid:e.uuid??this.identity.uuid},i=await this.fin.View.wrap(n),r=await i.getOptions();return this.createView(r,t)}async getSnapshot(){this.wire.sendAction(\"platform-get-snapshot\",this.identity).catch((e=>{}));return(await this.getClient()).dispatch(\"get-snapshot\")}async getViewSnapshot(e){return(await this.getClient()).dispatch(\"get-view-snapshot\",{viewIdentity:e})}async applySnapshot(e,t){this.wire.sendAction(\"platform-apply-snapshot\",this.identity).catch((e=>{}));const n=\"Requested snapshot must be a valid Snapshot object, or a url or filepath to such an object.\";let i;if(\"string\"==typeof e)try{i=(await this._channel.wire.sendAction(\"get-application-manifest\",{manifestUrl:e})).payload.data}catch(e){throw new Error(`${n}: ${e}`)}else i=e;if(!i.windows)throw new Error(n);const r=await this.getClient();return await r.dispatch(\"apply-snapshot\",{snapshot:i,options:t}),this}async fetchManifest(e){return(await this.getClient()).dispatch(\"platform-fetch-manifest\",{manifestUrl:e})}async launchContentManifest(e){this.wire.sendAction(\"platform-launch-content-manifest\",this.identity).catch((()=>{}));const t=await this.getClient(),n=await this.fetchManifest(e);return t.dispatch(\"launch-into-platform\",{manifest:n,manifestUrl:e}),this}async setWindowContext(e={},t){if(this.wire.sendAction(\"platform-set-window-context\",this.identity).catch((e=>{})),!e)throw new Error(\"Please provide a serializable object or string to set the context.\");const n=await this.getClient(),{entityType:i}=t?await this.fin.System.getEntityInfo(t.uuid,t.name):this.fin.me;await n.dispatch(\"set-window-context\",{context:e,entityType:i,target:t||{uuid:this.fin.me.uuid,name:this.fin.me.name}})}async getWindowContext(e){this.wire.sendAction(\"platform-get-window-context\",this.identity).catch((e=>{}));const t=await this.getClient(),{entityType:n}=e?await this.fin.System.getEntityInfo(e.uuid,e.name):this.fin.me;return t.dispatch(\"get-window-context\",{target:e||{uuid:this.fin.me.uuid,name:this.fin.me.name},entityType:n})}async closeWindow(e,t={skipBeforeUnload:!1}){this.wire.sendAction(\"platform-close-window\",this.identity).catch((e=>{}));return(await this.getClient()).dispatch(\"close-window\",{windowId:e,options:t})}}Mn.Platform=Fn,xn=new WeakMap;var jn={},kn={},Ln={},Tn={};function $n(e){switch(e){case\"columns\":case\"grid\":case\"rows\":case\"tabs\":return!0;default:return!1}}Object.defineProperty(Tn,\"__esModule\",{value:!0}),Tn.overrideFromComposables=Tn.isValidPresetType=void 0,Tn.isValidPresetType=$n,Tn.overrideFromComposables=function(...e){return t=>e.reduceRight(((e,t)=>n=>t(e(n))),(e=>e))(t)},Tn.default={isValidPresetType:$n};var Bn={},Gn={},Wn={};Object.defineProperty(Wn,\"__esModule\",{value:!0}),Wn.ApiConsumer=void 0;Wn.ApiConsumer=class{constructor(e){this.strategy=e,this.consume=async e=>(await this.strategy.getExposedFunctions(e)).reduce(((t,n)=>({...t,[n.key]:this.strategy.createFunction(n,e)})),{})}};var Hn={},Nn={};Object.defineProperty(Nn,\"__esModule\",{value:!0}),Nn.expose=Nn.getExposedProperties=void 0;const Dn=Symbol(\"exposedProperties\");Nn.getExposedProperties=e=>e[Dn]||e.prototype[Dn]||[];Nn.expose=e=>(t,n,i)=>{t[Dn]=t[Dn]||[],t[Dn].push({key:n,descriptor:i,options:e})},Object.defineProperty(Hn,\"__esModule\",{value:!0}),Hn.ApiExposer=void 0;const Un=Nn;Hn.ApiExposer=class{constructor(e){this.strategy=e,this.exposeInstance=async(e,t)=>{const n=(0,Un.getExposedProperties)(e),i=await Promise.all(n.map((async({key:n,options:i})=>({key:n,options:await this.strategy.exposeFunction(e[n].bind(e),{key:n,options:i,meta:t})}))));await this.strategy.exposeMeta(t,i)}}};var Vn={},zn={},Kn={};Object.defineProperty(Kn,\"__esModule\",{value:!0}),Kn.ChannelsConsumer=void 0;Kn.ChannelsConsumer=class{constructor(e){this.channel=e,this.getExposedFunctions=async e=>{const{id:t}=e,{props:n}=await this.channel.dispatch(`api-meta:${t}`);return n},this.createFunction=e=>(...t)=>{const{action:n}=e.options;return this.channel.dispatch(n,{args:t})}}};var qn={};Object.defineProperty(qn,\"__esModule\",{value:!0}),qn.ChannelsExposer=void 0;qn.ChannelsExposer=class{constructor(e){this.channelProviderOrClient=e,this.exposeFunction=async(e,t)=>{const{key:n,options:i,meta:r}=t,{id:o}=r,s=`${o}.${i?.action||n}`;return await this.channelProviderOrClient.register(s,(async({args:t})=>e(...t))),{action:s}},this.exposeMeta=async({id:e},t)=>{const n=`api-meta:${e}`;await this.channelProviderOrClient.register(n,(()=>({props:t})))}}},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Kn,e),n(qn,e)}(zn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(zn,e)}(Vn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Wn,e),n(Hn,e),n(Vn,e),n(Nn,e)}(Gn);var Jn={};Object.defineProperty(Jn,\"__esModule\",{value:!0}),Jn.createRelayedDispatch=exports.relayChannelClientApi_1=Jn.relayChannelClientApi=void 0;const Yn=[\"no longer connected\",\"RTCDataChannel closed unexpectedly\",\"The client you are trying to dispatch from is disconnected from the target provider\"];exports.relayChannelClientApi_1=Jn.relayChannelClientApi=async(e,t)=>{e.register(`relay:${t}`,(({action:t,target:n,payload:i})=>e.dispatch(n,t,i))),await Promise.resolve()};Jn.createRelayedDispatch=(e,t,n,i)=>async(r,o)=>{try{return await e.dispatch(`relay:${n}`,{action:r,payload:o,target:t})}catch(e){if(s=e.message,Yn.some((e=>s.includes(e)))&&i)throw new Error(i);throw e}var s};var Zn,Qn,Xn,ei=s&&s.__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},ti=s&&s.__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)};Object.defineProperty(Bn,\"__esModule\",{value:!0}),Bn.ColumnOrRow=Bn.TabStack=Bn.LayoutNode=void 0;const ni=Gn,ii=Jn;class ri{constructor(e,t){Zn.set(this,void 0),this.isRoot=()=>ti(this,Zn,\"f\").isRoot(this.entityId),this.exists=()=>ti(this,Zn,\"f\").exists(this.entityId),this.getParent=async()=>{const e=await ti(this,Zn,\"f\").getParent(this.entityId);if(e)return ri.getEntity(e,ti(this,Zn,\"f\"))},this.createAdjacentStack=async(e,t)=>{const n=await ti(this,Zn,\"f\").createAdjacentStack(this.entityId,e,t);return ri.getEntity({entityId:n,type:\"stack\"},ti(this,Zn,\"f\"))},this.getAdjacentStacks=async e=>(await ti(this,Zn,\"f\").getAdjacentStacks({targetId:this.entityId,edge:e})).map((e=>ri.getEntity({type:\"stack\",entityId:e.entityId},ti(this,Zn,\"f\")))),ei(this,Zn,e,\"f\"),this.entityId=t}}Bn.LayoutNode=ri,Zn=new WeakMap,ri.newLayoutEntitiesClient=async(e,t,n)=>{const i=(0,ii.createRelayedDispatch)(e,n,\"layout-relay\",\"You are trying to interact with a layout component on a window that does not exist or has been destroyed.\");return new ni.ApiConsumer(new ni.ChannelsConsumer({dispatch:i})).consume({id:t})},ri.getEntity=(e,t)=>{const{entityId:n,type:i}=e;switch(i){case\"column\":case\"row\":return new si(t,n,i);case\"stack\":return new oi(t,n);default:throw new Error(`Unrecognised Layout Entity encountered ('${JSON.stringify(e)})`)}};class oi extends ri{constructor(e,t){super(e,t),Qn.set(this,void 0),this.type=\"stack\",this.getViews=()=>ti(this,Qn,\"f\").getStackViews(this.entityId),this.addView=async(e,t={index:0})=>ti(this,Qn,\"f\").addViewToStack(this.entityId,e,t),this.removeView=async e=>{await ti(this,Qn,\"f\").removeViewFromStack(this.entityId,e)},this.setActiveView=async e=>{await ti(this,Qn,\"f\").setStackActiveView(this.entityId,e)},ei(this,Qn,e,\"f\")}}Bn.TabStack=oi,Qn=new WeakMap;class si extends ri{constructor(e,t,n){super(e,t),Xn.set(this,void 0),this.getContent=async()=>(await ti(this,Xn,\"f\").getContent(this.entityId)).map((e=>ri.getEntity(e,ti(this,Xn,\"f\")))),ei(this,Xn,e,\"f\"),this.type=n}}Bn.ColumnOrRow=si,Xn=new WeakMap;var ai={};Object.defineProperty(ai,\"__esModule\",{value:!0}),ai.DEFAULT_LAYOUT_KEY=ai.LAYOUT_CONTROLLER_ID=void 0,ai.LAYOUT_CONTROLLER_ID=\"layout-entities\",ai.DEFAULT_LAYOUT_KEY=\"__default__\";var ci,di,hi,li=s&&s.__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)};Object.defineProperty(Ln,\"__esModule\",{value:!0}),Ln.Layout=void 0;const ui=G,pi=O,wi=d,yi=Tn,fi=Bn,gi=ai;class mi extends wi.Base{static getClient(e){return li(e,di,\"f\").getValue()}constructor(e,t){super(t),ci.add(this),di.set(this,new ui.Lazy((async()=>fi.LayoutNode.newLayoutEntitiesClient(await this.platform.getClient(),gi.LAYOUT_CONTROLLER_ID,this.identity)))),this.replace=async e=>{this.wire.sendAction(\"layout-replace\").catch((e=>{}));const t=await this.platform.getClient();await t.dispatch(\"replace-layout\",{target:this.identity,opts:{layout:e}})},this.replaceView=async(e,t)=>{this.wire.sendAction(\"layout-replace-view\").catch((e=>{}));const n=await this.platform.getClient();await n.dispatch(\"replace-view\",{target:this.identity,opts:{viewToReplace:e,newView:t}})},this.applyPreset=async e=>{this.wire.sendAction(\"layout-apply-preset\").catch((e=>{}));const t=await this.platform.getClient(),{presetType:n}=e;if(!n||!(0,yi.isValidPresetType)(n))throw new Error(\"Cannot apply preset layout, please include an applicable presetType property in the PresetLayoutOptions.\");await t.dispatch(\"apply-preset-layout\",{target:this.identity,opts:{presetType:n}})};const n=(0,pi.validateIdentity)(e);if(n)throw new Error(n);this.identity=e,this.platform=this.fin.Platform.wrapSync({uuid:e.uuid}),e.uuid===this.fin.me.uuid&&e.name===this.fin.me.name&&(this.init=this.fin.Platform.Layout.init)}async getConfig(){this.wire.sendAction(\"layout-get-config\").catch((e=>{}));return(await this.platform.getClient()).dispatch(\"get-frame-snapshot\",{target:this.identity})}async getCurrentViews(){this.wire.sendAction(\"layout-get-views\").catch((e=>{}));const e=await this.platform.getClient();return(await e.dispatch(\"get-layout-views\",{target:this.identity})).map((e=>this.fin.View.wrapSync(e)))}async getRootItem(){this.wire.sendAction(\"layout-get-root-item\").catch((()=>{}));const e=await li(this,di,\"f\").getValue(),t=await e.getRoot(\"layoutName\"in this.identity?this.identity:void 0);return fi.LayoutNode.getEntity(t,e)}async getStackByViewIdentity(e){this.wire.sendAction(\"layout-get-stack-by-view\").catch((()=>{}));const t=await li(this,di,\"f\").getValue(),n=await t.getStackByView(e);if(!n)throw new Error(`No stack found for view: ${e.uuid}/${e.name}`);return fi.LayoutNode.getEntity(n,t)}async addView(e,{location:t,targetView:n}={}){this.wire.sendAction(\"layout-add-view\").catch((e=>{}));const{identity:i}=await li(this,ci,\"m\",hi).call(this,\"layout-add-view\",{viewOptions:e,location:t,targetView:n});return{identity:i}}async closeView(e){this.wire.sendAction(\"layout-close-view\").catch((e=>{})),await li(this,ci,\"m\",hi).call(this,\"layout-close-view\",{viewIdentity:e})}}Ln.Layout=mi,di=new WeakMap,ci=new WeakSet,hi=async function(e,t){return(await this.platform.getClient()).dispatch(e,{target:this.identity,opts:t})};var vi,Ci,bi,Ii,Ei,xi=s&&s.__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)},Ai=s&&s.__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};Object.defineProperty(kn,\"__esModule\",{value:!0}),kn.LayoutModule=void 0;const Pi=d,Mi=Ln,_i=ai;class Oi extends Pi.Base{constructor(){super(...arguments),vi.add(this),Ci.set(this,!1),bi.set(this,null),this.init=async(e={})=>{if(this.wire.sendAction(\"layout-init\").catch((e=>{})),!this.wire.environment.layoutAllowedInContext(this.fin))throw new Error(\"Layout.init can only be called from a Window context.\");if(xi(this,Ci,\"f\"))throw new Error(\"Layout.init was already called, please use Layout.create to add additional layouts.\");\"openfin\"===this.wire.environment.type&&await this.fin.Platform.getCurrentSync().getClient(),Ai(this,Ci,!0,\"f\"),Ai(this,bi,await this.wire.environment.initLayoutManager(this.fin,this.wire,e),\"f\"),await this.wire.environment.applyLayoutSnapshot(this.fin,xi(this,bi,\"f\"),e);const t={name:this.fin.me.name,uuid:this.fin.me.uuid};if(!e.layoutManagerOverride){const e={layoutName:_i.DEFAULT_LAYOUT_KEY,...t};return xi(this,Ii,\"f\").call(this,e)}return this.wrapSync(t)},Ii.set(this,(e=>{const t=\"[Layout] You are using a deprecated property `layoutManager` - it will throw if you access it starting in v37.\",n=new Proxy({},{get(e,n){throw console.warn(`[Layout-mgr-proxy] accessing ${n.toString()}`),new Error(t)}}),i=Object.assign(this.wrapSync(e),{layoutManager:n});return new Proxy(i,{get(e,n){if(\"layoutManager\"===n)throw console.warn(`[Layout-proxy] accessing ${n.toString()}`),new Error(t);return e[n]}})})),this.getCurrentLayoutManagerSync=()=>xi(this,vi,\"m\",Ei).call(this,\"fin.Platform.Layout.getCurrentLayoutManagerSync()\"),this.create=async e=>this.wire.environment.createLayout(xi(this,vi,\"m\",Ei).call(this,\"fin.Platform.Layout.create()\"),e),this.destroy=async e=>this.wire.environment.destroyLayout(xi(this,vi,\"m\",Ei).call(this,\"fin.Platform.Layout.destroy()\"),e)}async wrap(e){return this.wire.sendAction(\"layout-wrap\").catch((e=>{})),new Mi.Layout(e,this.wire)}wrapSync(e){return this.wire.sendAction(\"layout-wrap-sync\").catch((e=>{})),new Mi.Layout(e,this.wire)}async getCurrent(){if(this.wire.sendAction(\"layout-get-current\").catch((e=>{})),\"openfin\"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error(\"You are not in a Window context. Only Windows can have a Layout.\");const{uuid:e,name:t}=this.fin.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction(\"layout-get-current-sync\").catch((e=>{})),\"openfin\"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error(\"You are not in a Window context. Only Windows can have a Layout.\");const{uuid:e,name:t}=this.fin.me;return this.wrapSync({uuid:e,name:t})}async getLayoutByViewIdentity(e){this.wire.sendAction(\"layout-get-by-view-identity\").catch((()=>{}));let t=await this.wire.environment.getViewWindowIdentity(this.fin,e);t.identity&&(t=t.identity);try{const n=this.wrapSync(t),i=await Mi.Layout.getClient(n),r=await i.getLayoutIdentityForViewOrThrow(e);return this.wrapSync(r)}catch(n){if(![\"No action registered at target for\",\"getLayoutIdentityForViewOrThrow is not a function\"].some((e=>n.message.includes(e))))throw n;if(t.uuid===t.name)throw new Error(`View identity ${JSON.stringify(e)} is not attached to any layout in provider window ${JSON.stringify(t)}.`);return this.wrapSync(t)}}}kn.LayoutModule=Oi,Ci=new WeakMap,bi=new WeakMap,Ii=new WeakMap,vi=new WeakSet,Ei=function(e){if(!xi(this,bi,\"f\"))throw new Error(`You must call init before using the API ${e}`);return xi(this,bi,\"f\")},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(kn,e),n(Ln,e)}(jn),Object.defineProperty(Pn,\"__esModule\",{value:!0}),Pn.PlatformModule=void 0;const Si=d,Ri=Mn,Fi=jn;class ji extends Si.Base{constructor(e,t){super(e),this._channel=t,this.Layout=new Fi.LayoutModule(this.wire)}async init(e){if(!fin.__internal_.isPlatform||fin.me.name!==fin.me.uuid)throw new Error(\"fin.Platform.init should only be called from a custom platform provider running in the main window of the application.\");return this.wire.environment.initPlatform(this.fin,e)}async wrap(e){return this.wire.sendAction(\"platform-wrap\").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}wrapSync(e){return this.wire.sendAction(\"platform-wrap-sync\").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}async getCurrent(){return this.wire.sendAction(\"platform-get-current\").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction(\"platform-get-current-sync\").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}start(e){return this.wire.sendAction(\"platform-start\").catch((e=>{})),new Promise((async(t,n)=>{try{const{uuid:n}=e,i=await this.fin.Application._create({...e,isPlatformController:!0});i.once(\"platform-api-ready\",(()=>t(this.wrapSync({uuid:n})))),i._run({uuid:n})}catch(e){n(e)}}))}startFromManifest(e,t){return this.wire.sendAction(\"platform-start-from-manifest\").catch((e=>{})),new Promise((async(n,i)=>{try{const i=await this.fin.Application._createFromManifest(e);i.once(\"platform-api-ready\",(()=>n(this.wrapSync({uuid:i.identity.uuid})))),i._run(t)}catch(e){i(e)}}))}}Pn.PlatformModule=ji,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Pn,e),n(Mn,e)}(An);var ki={};!function(e){Object.defineProperty(e,\"__esModule\",{value:!0}),e.getMe=e.getBaseMe=e.environmentUnsupportedMessage=void 0;const t=J(),n=un,i=ie(),r=rn;function o(e,t,n){return{...{isView:\"view\"===e,isWindow:\"window\"===e,isFrame:\"iframe\"===e,isExternal:\"external connection\"===e},uuid:t,name:n,entityType:e}}e.environmentUnsupportedMessage=\"You are not running in OpenFin.\",e.getBaseMe=o,e.getMe=function(s){const{uuid:a,name:c,entityType:d}=s.me,h={setContext(){throw new Error(e.environmentUnsupportedMessage)},addContextHandler(){throw new Error(e.environmentUnsupportedMessage)},getContextGroups(){throw new Error(e.environmentUnsupportedMessage)},joinContextGroup(){throw new Error(e.environmentUnsupportedMessage)},removeFromContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getAllClientsInContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getInfoForContextGroup(){throw new Error(e.environmentUnsupportedMessage)}},l=\"Interop API has not been instantiated. Either connection has failed or you have not declared interop in your config.\",u={setContext(){throw new Error(l)},addContextHandler(){throw new Error(l)},getContextGroups(){throw new Error(l)},joinContextGroup(){throw new Error(l)},removeFromContextGroup(){throw new Error(l)},getAllClientsInContextGroup(){throw new Error(l)},getInfoForContextGroup(){throw new Error(l)}},p={eventNames:()=>{throw new Error(e.environmentUnsupportedMessage)},emit:()=>{throw new Error(e.environmentUnsupportedMessage)},listeners:()=>{throw new Error(e.environmentUnsupportedMessage)},listenerCount:()=>{throw new Error(e.environmentUnsupportedMessage)},on:()=>{throw new Error(e.environmentUnsupportedMessage)},addListener:()=>{throw new Error(e.environmentUnsupportedMessage)},once:()=>{throw new Error(e.environmentUnsupportedMessage)},prependListener:()=>{throw new Error(e.environmentUnsupportedMessage)},prependOnceListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeAllListeners:()=>{throw new Error(e.environmentUnsupportedMessage)}};switch(d){case\"view\":return Object.assign(new t.View(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case\"window\":return Object.assign(new i._Window(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case\"iframe\":return Object.assign(new n._Frame(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case\"external connection\":return Object.assign(new r.ExternalApplication(s,{uuid:a}),o(d,a,c),{interop:u,isOpenFin:!1});default:return{...o(d,a,c),...p,interop:h,isOpenFin:!1}}}}(ki);var Li={},Ti={},$i={};Object.defineProperty($i,\"__esModule\",{value:!0}),$i.createWarningObject=$i.createUnusableObject=void 0,$i.createUnusableObject=function(e){const t=()=>{throw new Error(e)};return new Proxy({},{apply:t,construct:t,defineProperty:t,deleteProperty:t,get:t,getOwnPropertyDescriptor:t,getPrototypeOf:t,has:t,isExtensible:t,ownKeys:t,preventExtensions:t,set:t,setPrototypeOf:t})},$i.createWarningObject=function(e,t){return new Proxy(t,{get:(...t)=>(console.warn(e),Reflect.get(...t)),set:(...t)=>(console.warn(e),Reflect.set(...t)),getOwnPropertyDescriptor:(...t)=>(console.warn(e),Reflect.getOwnPropertyDescriptor(...t)),ownKeys:(...t)=>(console.warn(e),Reflect.ownKeys(...t))})};var Bi,Gi={},Wi={};var Hi={};!function(e){Object.defineProperty(e,\"__esModule\",{value:!0}),e.wrapIntentHandler=e.BROKER_ERRORS=e.generateOverrideWarning=e.generateOverrideError=e.wrapContextHandler=e.wrapInTryCatch=e.generateId=void 0;e.generateId=()=>`${Math.random()}${Date.now()}`;e.wrapInTryCatch=(e,t)=>(...n)=>{try{return e(...n)}catch(e){throw new Error((t||\"\")+e)}};e.wrapContextHandler=(e,t)=>async n=>{try{await e(n)}catch(e){throw console.error(`Error thrown by handler ${t} for context type ${n.type}: ${e}`),e}};e.generateOverrideError=(e,t)=>`You have tried to to use ${e} but ${t} has not been overridden in the Interop Broker. Please override this function. Refer to our documentation for more info.`;e.generateOverrideWarning=(e,t,n,i)=>{const{uuid:r,name:o}=n;return i?`Entity with identity: ${r}/${o} has called ${i} or ${e} but ${t} has not been overridden.`:`Entity with identity: ${r}/${o} has called ${e} but ${t} has not been overridden.`},e.BROKER_ERRORS={fireIntent:(0,e.generateOverrideError)(\"fireIntent\",\"handleFiredIntent\"),fireIntentForContext:(0,e.generateOverrideError)(\"fireIntentForContext\",\"handleFiredIntentForContext\"),getInfoForIntent:(0,e.generateOverrideError)(\"getInfoForIntent\",\"handleInfoForIntent\"),getInfoForIntentsByContext:(0,e.generateOverrideError)(\"getInfoForIntentsByContext\",\"handleInfoForIntentsByContext\"),joinSessionContextGroupWithJoinContextGroup:\"The Context Group you have tried to join is a Session Context Group. Custom Context Groups can only be defined by the Interop Broker through code or manifest configuration. Please use joinSessionContextGroup.\",fdc3Open:(0,e.generateOverrideError)(\"fdc3.open\",\"fdc3HandleOpen\"),fdc3FindInstances:(0,e.generateOverrideError)(\"fdc3.findInstances\",\"fdc3HandleFindInstances\"),fdc3GetAppMetadata:(0,e.generateOverrideError)(\"fdc3.getAppMetadata\",\"fdc3HandleGetAppMetadata\"),fdc3GetInfo:(0,e.generateOverrideError)(\"fdc3.getInfo\",\"fdc3HandleGetInfo\")};e.wrapIntentHandler=(e,t)=>async n=>{try{return e(n)}catch(e){throw console.error(`Error thrown by handler ${t}: ${e}`),e}}}(Hi);var Ni,Di,Ui={};function Vi(){if(Di)return Gi;Di=1;var e,t,n,r=s&&s.__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},o=s&&s.__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)},a=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Gi,\"__esModule\",{value:!0}),Gi.InteropBroker=void 0;const c=d,h=a(function(){if(Bi)return Wi;Bi=1,Object.defineProperty(Wi,\"__esModule\",{value:!0});const e=Cr();return Wi.default=class{constructor(e,t){this.provider=e,this.id=t,this.lastContext=void 0,this.contextGroupMap=new Map,this.clients=new Map,this.registerListeners()}registerListeners(){this.provider.register(`sessionContextGroup:getContext-${this.id}`,this.getCurrentContext.bind(this)),this.provider.register(`sessionContextGroup:setContext-${this.id}`,this.setContext.bind(this)),this.provider.register(`sessionContextGroup:handlerAdded-${this.id}`,this.handlerAdded.bind(this)),this.provider.register(`sessionContextGroup:handlerRemoved-${this.id}`,this.handlerRemoved.bind(this))}getCurrentContext(e){return e.type?this.contextGroupMap.get(e.type):this.lastContext}setContext(t,n){const{context:i}=t,r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name} not in Session Client State Map`);this.contextGroupMap.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{e.contextHandlers.get(i.type)?.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getClientState(e){return this.clients.get(e.endpointId)}async handlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(i){const e=r.contextHandlers.get(i)||[];r.contextHandlers.set(i,[...e,n]);const o=this.contextGroupMap.get(i);o&&await this.provider.dispatch(t,n,o)}else{r.globalHandler=n;const e=[...this.contextGroupMap.keys()].map((async e=>{const i=this.contextGroupMap.get(e);i&&await this.provider.dispatch(t,n,i)}));await Promise.all(e)}}handlerRemoved(e,t){const{handlerId:n}=e,i=this.clients.get(t.endpointId);i?(Array.from(i.contextHandlers).forEach((([,e])=>{const t=e.indexOf(n);t>-1&&e.splice(t,1)})),i.globalHandler===n&&(i.globalHandler=void 0)):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={contextHandlers:new Map,clientIdentity:e,globalHandler:void 0};this.clients.set(e.endpointId,t)}}onDisconnection(e){this.clients.delete(e.endpointId)}},Wi}()),l=Hi,u=a(i),p=function(){if(Ni)return Ui;Ni=1,Object.defineProperty(Ui,\"__esModule\",{value:!0}),Ui.PrivateChannelProvider=void 0;const e=Vi();return Ui.PrivateChannelProvider=class t{constructor(e,t){this.provider=e,this.id=t,this.clients=new Map,this.registerListeners(),this.contextByContextType=new Map,this.lastContext=void 0,this.provider.onConnection((e=>this.registerNewClient(e))),this.provider.onDisconnection((async e=>{const{endpointId:t}=e;this.clients.has(t)&&await this.handleClientDisconnecting(e),0===(await this.provider.getAllClientInfo()).length&&this.provider.destroy()}))}getClientState(e){return this.clients.get(e.endpointId)}registerListeners(){this.provider.register(\"broadcast\",this.broadcast.bind(this)),this.provider.register(\"getCurrentContext\",this.getCurrentContext.bind(this)),this.provider.register(\"contextHandlerAdded\",this.contextHandlerAdded.bind(this)),this.provider.register(\"contextHandlerRemoved\",this.contextHandlerRemoved.bind(this)),this.provider.register(\"nonStandardHandlerRemoved\",this.nonStandardHandlerRemoved.bind(this)),this.provider.register(\"onAddContextHandlerAdded\",this.onAddContextHandlerAdded.bind(this)),this.provider.register(\"onDisconnectHandlerAdded\",this.onDisconnectHandlerAdded.bind(this)),this.provider.register(\"onUnsubscribeHandlerAdded\",this.onUnsubscribeHandlerAdded.bind(this)),this.provider.register(\"clientDisconnecting\",((e,t)=>{this.handleClientDisconnecting(t)}))}broadcast(t,n){const{context:i}=t;if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name}, tried to call broadcast, is not connected to this Private Channel`);const r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to broadcast - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);this.contextByContextType.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{const t=e.handlerIdsByContextTypes.get(i.type);t&&t.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getCurrentContext(e,t){const{contextType:n}=e;if(!this.getClientState(t))throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call getCurrentContext, is not connected to this Private Channel`);if(void 0!==n){return this.contextByContextType.get(n)||null}return this.lastContext?this.lastContext:null}contextHandlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call addContextListener, is not connected to this Private Channel`);if(i){const e=r.handlerIdsByContextTypes.get(i)||[];r.handlerIdsByContextTypes.set(i,[...e,n])}else r.globalHandler=n;Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&e.onAddContextListenerHandlerId&&this.provider.dispatch(e.clientIdentity,e.onAddContextListenerHandlerId,i)}))}async contextHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);if(i){let e;if(i.globalHandler===n)i.globalHandler=void 0;else for(const[t,r]of i.handlerIdsByContextTypes){const i=r.indexOf(n);i>-1&&(r.splice(i,1),e=t)}const r=(await this.getConnectedClients()).map((async n=>{const{clientIdentity:i,clientIdentity:{endpointId:r},onUnsubscribeHandlerId:o}=n;r!==t.endpointId&&o&&await this.provider.dispatch(i,o,e)}));try{await Promise.all(r)}catch(e){throw console.error(`Problem when attempting to dispatch to onUnsubscribeHandlers. Error: ${e} Removing Client: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}`),new Error(e)}}else console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}.`)}nonStandardHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);i?i.onDisconnectHandlerId===n?i.onDisconnectHandlerId=void 0:i.onAddContextListenerHandlerId===n?i.onAddContextListenerHandlerId=void 0:i.onUnsubscribeHandlerId===n&&(i.onUnsubscribeHandlerId=void 0):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}onAddContextHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onAddContextListener, is not connected to this Private Channel`);n.onAddContextListenerHandlerId=i,Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&Array.from(e.handlerIdsByContextTypes.keys()).forEach((e=>{this.provider.dispatch(t,i,e)}))}))}onDisconnectHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onDisconnect, is not connected to this Private Channel`);n.onDisconnectHandlerId=i}onUnsubscribeHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onUnsubscribe, is not connected to this Private Channel`);n.onUnsubscribeHandlerId=i}removeClient(e){const t=this.getClientState(e);if(!t)throw new Error(`Client with Identity: ${e.uuid} ${e.name}, tried to call disconnect, is not connected to this Private Channel`);t.handlerIdsByContextTypes.clear(),this.clients.delete(e.endpointId)}async fireOnDisconnectForOtherClients(e){const{endpointId:t}=e,n=(await this.getConnectedClients()).map((async e=>{const{clientIdentity:{endpointId:n},onDisconnectHandlerId:i}=e;n!==t&&i&&await this.provider.dispatch(e.clientIdentity,i)}));try{await Promise.all(n)}catch(t){throw console.error(`Problem when attempting to dispatch to onDisconnectHandlers. Error: ${t} Disconnecting Client: uuid: ${e.uuid}. name: ${e.name}. endpointId: ${e.endpointId}`),new Error(t)}}async unsubscribeAll(e){const{endpointId:t}=e,n=this.clients.get(t);if(n){const t=Array.from(n.handlerIdsByContextTypes.values()).flat(),i=n.globalHandler;if(t.length>0){const n=t.map((async t=>this.contextHandlerRemoved({handlerId:t},e)));try{await Promise.all(n)}catch(e){console.error(e.message)}}if(i)try{await this.contextHandlerRemoved({handlerId:i},e)}catch(e){console.error(e.message)}}}async handleClientDisconnecting(e){await this.unsubscribeAll(e),this.removeClient(e),await this.fireOnDisconnectForOtherClients(e)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={clientIdentity:e,handlerIdsByContextTypes:new Map,globalHandler:void 0,onAddContextListenerHandlerId:void 0,onUnsubscribeHandlerId:void 0,onDisconnectHandlerId:void 0};this.clients.set(e.endpointId,t)}}async getConnectedClients(){const e=await this.provider.getAllClientInfo();return Array.from(this.clients.values()).filter((t=>{const{uuid:n,name:i}=t.clientIdentity;return e.some((e=>i===e.name&&n===e.uuid))}))}static init(e,n){return new t(e,n)}},Ui}(),w=G,y=[{id:\"green\",displayMetadata:{color:\"#00CC88\",name:\"green\"}},{id:\"purple\",displayMetadata:{color:\"#8C61FF\",name:\"purple\"}},{id:\"orange\",displayMetadata:{color:\"#FF8C4C\",name:\"orange\"}},{id:\"red\",displayMetadata:{color:\"#FF5E60\",name:\"red\"}},{id:\"pink\",displayMetadata:{color:\"#FF8FB8\",name:\"pink\"}},{id:\"yellow\",displayMetadata:{color:\"#E9FF8F\",name:\"yellow\"}}];let f=class i extends c.Base{constructor(i,s,a){super(i),e.set(this,void 0),t.set(this,void 0),n.set(this,void 0),this.getProvider=()=>o(this,n,\"f\").getValue(),this.interopClients=new Map,this.contextGroupsById=new Map,r(this,t,a.contextGroups??[...y],\"f\"),r(this,e,a.fdc3Info,\"f\"),a?.logging&&(this.logging=a.logging),this.intentClientMap=new Map,this.lastContextMap=new Map,this.sessionContextGroupMap=new Map,r(this,n,new w.Lazy(s),\"f\"),this.setContextGroupMap(),this.setupChannelProvider()}static createClosedConstructor(...e){return class extends i{constructor(...t){if(t.length){const[n,i,r]=t;if(r&&\"object\"==typeof r&&!(0,u.default)(r,e[2]))return console.warn(\"You have modified the parameters of the InteropOverride constructor. This behavior is deprecated and will be removed in a future version. You can modify these options in your manifest. Please consult our Interop docs for guidance on migrating to the new override scheme.\"),void super(e[0],e[1],r);console.warn(\"You are attempting to pass arguments to the InteropOverride constructor. This is not necessary, and these passed arguments will be ignored. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.\")}super(...e)}}}setContext({context:e},t){this.wire.sendAction(\"interop-broker-set-context\").catch((e=>{}));const n=this.getClientState(t);if(!n||!n.contextGroupId)throw n?new Error(\"You must join a context group before you can set context.\"):new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);{const{contextGroupId:t}=n;this.setContextForGroup({context:e},t)}}setContextForGroup({context:e},t){this.wire.sendAction(\"interop-broker-set-context-for-group\").catch((e=>{}));const n=this.contextGroupsById.get(t);if(!n)throw new Error(`Unable to set context for context group that isn't in the context group mapping: ${t}.`);const r=i.checkContextIntegrity(e);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(e)}`);const o=e.type;n.set(o,e),this.lastContextMap.set(t,o);Array.from(this.interopClients.values()).filter((e=>e.contextGroupId===t)).forEach((t=>{for(const[,n]of t.contextHandlers)i.isContextTypeCompatible(o,n.contextType)&&this.invokeContextHandler(t.clientIdentity,n.handlerId,e)}))}getCurrentContext(e,t){this.wire.sendAction(\"interop-broker-get-current-context\").catch((e=>{}));const n=this.getClientState(t);if(!n?.contextGroupId)throw new Error(\"You must be a member of a context group to call getCurrentContext\");const{contextGroupId:i}=n,r=this.contextGroupsById.get(i),o=this.lastContextMap.get(i),s=e?.contextType??o;return r&&s?r.get(s):void 0}async joinContextGroup({contextGroupId:e,target:t},n){if(this.wire.sendAction(\"interop-broker-join-context-group\").catch((e=>{})),this.sessionContextGroupMap.has(e))throw new Error(l.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup);if(t){i.hasEndpointId(t)&&await this.addClientToContextGroup({contextGroupId:e},t);try{const n=this.channel.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name));if(!n.length)throw new Error(`Given Identity ${t.uuid} ${t.name} is not connected to the Interop Broker.`);n.length>1&&console.warn(`More than one connection found for identity ${t.uuid} ${t.name}`);const i=[];for(const t of n)i.push(this.addClientToContextGroup({contextGroupId:e},t));await Promise.all(i)}catch(e){throw new Error(e)}}else await this.addClientToContextGroup({contextGroupId:e},n)}async addClientToContextGroup({contextGroupId:e},t){this.wire.sendAction(\"interop-broker-add-client-to-context-group\").catch((e=>{}));const n=this.getClientState(t);if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(!this.getContextGroups().find((t=>t.id===e)))throw new Error(`Attempting to join a context group that does not exist: ${e}. You may only join existing context groups.`);if(n.contextGroupId!==e){n.contextGroupId=e,await this.setCurrentContextGroupInClientOptions(t,e);const i=this.contextGroupsById.get(e);for(const[,e]of n.contextHandlers){const{contextType:n,handlerId:r}=e;if(void 0===n)i.forEach(((e,n)=>{this.invokeContextHandler(t,r,e)}));else if(i.has(n)){const e=i.get(n);e&&this.invokeContextHandler(t,r,e)}}}}async removeFromContextGroup({target:e},t){if(this.wire.sendAction(\"interop-broker-remove-from-context-group\").catch((e=>{})),e){i.hasEndpointId(e)&&await this.removeClientFromContextGroup(e);try{const t=this.channel.connections.filter((t=>t.uuid===e.uuid&&t.name===e.name));if(!t.length)throw new Error(`No connection found for given Identity ${e.uuid} ${e.name}`);t.length>1&&console.warn(`More than one connection found for identity ${e.uuid} ${e.name}`);const n=[];for(const e of t)n.push(this.removeClientFromContextGroup(e));await Promise.all(n)}catch(e){throw new Error(e)}}else await this.removeClientFromContextGroup(t)}async removeClientFromContextGroup(e){this.wire.sendAction(\"interop-broker-remove-client-from-context-group\").catch((e=>{}));const t=this.getClientState(e);t&&(t.contextGroupId=void 0),await this.setCurrentContextGroupInClientOptions(e,null)}getContextGroups(){return this.wire.sendAction(\"interop-broker-get-context-groups\").catch((e=>{})),o(this,t,\"f\").map((e=>({...e})))}getInfoForContextGroup({contextGroupId:e}){return this.wire.sendAction(\"interop-broker-get-info-for-context-group\").catch((e=>{})),this.getContextGroups().find((t=>t.id===e))}getAllClientsInContextGroup({contextGroupId:e}){this.wire.sendAction(\"interop-broker-get-all-clients-in-context-group\").catch((e=>{}));return Array.from(this.interopClients.values()).filter((t=>t.contextGroupId===e)).map((e=>e.clientIdentity))}async handleFiredIntent(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.raiseIntent\",\"InteropBroker.handleFiredIntent\",t,\"interopClient.fireIntent\");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntent)}async setIntentTarget(e,t){this.wire.sendAction(\"interop-broker-set-intent-target\").catch((e=>{}));const n=this.intentClientMap.get(t.name),i=`intent-handler-${e.name}`;if(n){const t=n.get(i);if(t){if(t.pendingIntents.push(e),t.clientIdentity&&t.isReady){const{clientIdentity:e,pendingIntents:n}=t;try{const r=n[n.length-1];await this.invokeIntentHandler(e,i,r),t.pendingIntents=[]}catch(n){console.error(`Error invoking intent handler for client ${e.uuid}/${e.name}/${e.endpointId}`),t.isReady=!1}}}else n.set(i,{isReady:!1,pendingIntents:[e]})}else{this.intentClientMap.set(t.name,new Map);const n=this.intentClientMap.get(t.name);n&&n.set(i,{isReady:!1,pendingIntents:[e]})}}async handleInfoForIntent(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.findIntent\",\"InteropBroker.handleInfoForIntent\",t,\"interopClient.getInfoForIntent\");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntent)}async handleInfoForIntentsByContext(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.findIntentsByContext\",\"InteropBroker.handleInfoForIntentsByContext\",t,\"interopClient.getInfoForIntentsByContext\");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntentsByContext)}async handleFiredIntentForContext(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.raiseIntentForContext\",\"InteropBroker.handleFiredIntentForContext\",t,\"interopClient.fireIntentForContext\");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntentForContext)}async clientDisconnected(e){}async fdc3HandleOpen({app:e,context:t},n){const i=(0,l.generateOverrideWarning)(\"fdc3.open\",\"InteropBroker.fdc3HandleOpen\",n);throw console.warn(i),new Error(l.BROKER_ERRORS.fdc3Open)}async fdc3HandleFindInstances(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.open\",\"InteropBroker.fdc3HandleFindInstances\",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3FindInstances)}async fdc3HandleGetAppMetadata(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.getAppMetadata\",\"InteropBroker.fdc3HandleGetAppMetadata\",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3GetAppMetadata)}async invokeContextHandler(e,t,n){const i=await this.getProvider();try{await i.dispatch(e,t,n)}catch(i){console.error(`Error invoking context handler ${t} for context type ${n.type} in client ${e.uuid}/${e.name}/${e.endpointId}`,i)}}async invokeIntentHandler(e,t,n){const i=await this.getProvider();await i.dispatch(e,t,n)}async fdc3HandleGetInfo(t,n){const{fdc3Version:i}=t;return{fdc3Version:i,...o(this,e,\"f\"),optionalFeatures:{OriginatingAppMetadata:!1,UserChannelMembershipAPIs:!0},appMetadata:{appId:\"\",instanceId:\"\"}}}async getAllClientInfo(){return(await this.getProvider()).getAllClientInfo()}decorateSnapshot(e){return{...e,interopSnapshotDetails:{contextGroupStates:this.getContextGroupStates()}}}applySnapshot(e,t){const n=e?.interopSnapshotDetails?.contextGroupStates;n&&(t?.closeExistingWindows||this.updateExistingClients(n),this.rehydrateContextGroupStates(n))}updateExistingClients(e){this.interopClients.forEach((t=>{const{clientIdentity:n,contextGroupId:r,contextHandlers:o}=t;if(r){const t=e[r];for(const[,e]of Object.entries(t))o.forEach((t=>{const{handlerId:r,contextType:o}=t;i.isContextTypeCompatible(e.type,o)&&this.invokeContextHandler(n,r,e)}))}}))}getContextGroupStates(){return i.toObject(this.contextGroupsById)}rehydrateContextGroupStates(e){const t=Object.entries(e);for(const[e,n]of t){const t=Object.entries(n);for(const[n,i]of t)if(this.contextGroupsById.has(e)){this.contextGroupsById.get(e).set(n,i)}else console.warn(`Attempting to set a context group that isn't in the context group mapping. Skipping context group rehydration for: ${e}`)}}contextHandlerRegistered({contextType:e,handlerId:t},n){const i={contextType:e,handlerId:t},r=this.getClientState(n);if(r?.contextHandlers.set(t,i),r&&r.contextGroupId){const{contextGroupId:i}=r,o=this.contextGroupsById.get(i);if(void 0===e)o.forEach(((e,i)=>{this.invokeContextHandler(n,t,e)}));else if(o.has(e)){const i=o.get(e);i&&this.invokeContextHandler(n,t,i)}}}async intentHandlerRegistered(e,t){const{handlerId:n}=e,i=this.intentClientMap.get(t.name),r=i?.get(n);if(i)if(r){const{pendingIntents:e}=r;r.clientIdentity=t,r.isReady=!0;try{if(e.length>0){const i=e[e.length-1];await this.invokeIntentHandler(t,n,i),r.pendingIntents=[]}}catch(e){console.error(`Error invoking intent handler: ${n} for client ${t.uuid}/${t.name}/${t.endpointId}`)}}else i.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t});else{this.intentClientMap.set(t.name,new Map);const e=this.intentClientMap.get(t.name);e&&e.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t})}}removeContextHandler({handlerId:e},t){const n=this.getClientState(t);n&&n.contextHandlers.delete(e)}handleJoinSessionContextGroup({sessionContextGroupId:e},t){try{if(!e)throw new Error(\"Failed to join session context group: must specify group id.\");const n=this.sessionContextGroupMap.get(e);if(n)n.registerNewClient(t);else{const n=new h.default(this.channel,e);n.registerNewClient(t),this.sessionContextGroupMap.set(e,n)}return{hasConflict:this.contextGroupsById.has(e)}}catch(e){throw new Error(e)}}getClientState(e){return this.interopClients.get(e.endpointId)}static toObject(e){const t=Object.fromEntries(e),n={};return Object.entries(t).forEach((([e,t])=>{const i=Object.fromEntries(t);n[e]=i})),n}static checkContextIntegrity(e){if(!e)return{isValid:!1,reason:\"No context supplied\"};if(\"object\"!=typeof e)return{isValid:!1,reason:\"Context must be an Object\"};if(!e.type)return{isValid:!1,reason:\"Context must have a type property\"};if(e.id&&\"object\"!=typeof e.id)return{isValid:!1,reason:\"Context id must be an Object populated with key-value identifiers (if set)\"};if(e.id){const{id:t}=e,n=Object.keys(t);let i=!1;if(!n.length)return{isValid:!1,reason:\"Context id must have at least one key-value identifier\"};if(n.forEach((e=>{\"string\"==typeof e&&\"string\"==typeof t[e]||(i=!0)})),i)return{isValid:!1,reason:\"Context id key-value identifiers must be of type string\"}}return e.name&&\"string\"!=typeof e.name?{isValid:!1,reason:\"Context name must be of string type (if set)\"}:{isValid:!0}}static hasEndpointId(e){return void 0!==e.endpointId}static isContextTypeCompatible(e,t){return void 0===t||e===t}setContextGroupMap(){for(const e of this.getContextGroups())this.contextGroupsById.set(e.id,new Map)}async setCurrentContextGroupInClientOptions(e,t){try{const n=await this.fin.System.getEntityInfo(e.uuid,e.name);let i;\"view\"===n.entityType?i=await this.fin.View.wrap(e):\"window\"===n.entityType&&(i=await this.fin.Window.wrap(e)),i&&await i.updateOptions({interop:{currentContextGroup:t}})}catch(e){}}async setupChannelProvider(){try{const e=await this.getProvider();this.channel=e,this.wireChannel(e)}catch(e){throw new Error(`Error setting up Interop Broker Channel Provider: ${e}`)}}wireChannel(e){e.onConnection((async(e,t)=>{if(!await this.isConnectionAuthorized(e,t))throw new Error(`Connection not authorized for ${e.uuid}, ${e.name}`);if(!e.endpointId)throw new Error(\"Version too old to be compatible with Interop. Please upgrade your runtime to a more recent version.\");const n={contextGroupId:void 0,contextHandlers:new Map,clientIdentity:e};t?.currentContextGroup&&this.contextGroupsById.has(t.currentContextGroup)&&(n.contextGroupId=t?.currentContextGroup),this.interopClients.set(e.endpointId,n)})),e.onDisconnection((e=>{this.interopClients.delete(e.endpointId);const t=this.intentClientMap.get(e.name);t&&e.uuid===this.fin.me.uuid&&t.forEach((e=>{e.isReady=!1})),this.sessionContextGroupMap.forEach((t=>{t.onDisconnection(e)})),this.clientDisconnected(e)})),e.beforeAction((async(e,t,n)=>{if(!await this.isActionAuthorized(e,t,n))throw new Error(`Action (${e}) not authorized for ${n.uuid}, ${n.name}`);this.logging?.beforeAction?.enabled&&console.log(e,t,n)})),e.afterAction(((e,t,n)=>{this.logging?.afterAction?.enabled&&console.log(e,t,n)})),e.register(\"setContext\",this.setContext.bind(this)),e.register(\"fireIntent\",this.handleFiredIntent.bind(this)),e.register(\"getCurrentContext\",this.getCurrentContext.bind(this)),e.register(\"getInfoForIntent\",this.handleInfoForIntent.bind(this)),e.register(\"getInfoForIntentsByContext\",this.handleInfoForIntentsByContext.bind(this)),e.register(\"fireIntentForContext\",this.handleFiredIntentForContext.bind(this)),e.register(\"getContextGroups\",this.getContextGroups.bind(this)),e.register(\"joinContextGroup\",this.joinContextGroup.bind(this)),e.register(\"removeFromContextGroup\",this.removeFromContextGroup.bind(this)),e.register(\"getAllClientsInContextGroup\",this.getAllClientsInContextGroup.bind(this)),e.register(\"getInfoForContextGroup\",this.getInfoForContextGroup.bind(this)),e.register(\"contextHandlerRegistered\",this.contextHandlerRegistered.bind(this)),e.register(\"intentHandlerRegistered\",this.intentHandlerRegistered.bind(this)),e.register(\"removeContextHandler\",this.removeContextHandler.bind(this)),e.register(\"sessionContextGroup:createIfNeeded\",this.handleJoinSessionContextGroup.bind(this)),e.register(\"fdc3Open\",this.fdc3HandleOpen.bind(this)),e.register(\"fdc3v2FindIntentsByContext\",this.handleInfoForIntentsByContext.bind(this)),e.register(\"fdc3FindInstances\",this.fdc3HandleFindInstances.bind(this)),e.register(\"fdc3GetAppMetadata\",this.fdc3HandleGetAppMetadata.bind(this)),e.register(\"fdc3v2GetInfo\",(async(e,t)=>this.fdc3HandleGetInfo.bind(this)(e,t))),e.register(\"createPrivateChannelProvider\",(async e=>{const{channelId:t}=e,n=await this.fin.InterApplicationBus.Channel.create(t);p.PrivateChannelProvider.init(n,t)}))}isConnectionAuthorized(e,t){return this.wire.sendAction(\"interop-broker-is-connection-authorized\").catch((e=>{})),Promise.resolve(!0)}isActionAuthorized(e,t,n){return this.wire.sendAction(\"interop-broker-is-action-authorized\").catch((e=>{})),Promise.resolve(!0)}};return Gi.InteropBroker=f,e=new WeakMap,t=new WeakMap,n=new WeakMap,Gi}var zi,Ki={},qi={},Ji=s&&s.__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},Yi=s&&s.__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)};Object.defineProperty(qi,\"__esModule\",{value:!0});const Zi=d,Qi=Hi;class Xi extends Zi.Base{constructor(e,t,n){super(e),zi.set(this,void 0),this.id=n,Ji(this,zi,t,\"f\")}async setContext(e){this.wire.sendAction(\"interop-session-context-group-set-context\").catch((e=>{}));return(await Yi(this,zi,\"f\")).dispatch(`sessionContextGroup:setContext-${this.id}`,{sessionContextGroupId:this.id,context:e})}async getCurrentContext(e){this.wire.sendAction(\"interop-session-context-group-get-context\").catch((e=>{}));return(await Yi(this,zi,\"f\")).dispatch(`sessionContextGroup:getContext-${this.id}`,{sessionContextGroupId:this.id,type:e})}async addContextHandler(e,t){if(this.wire.sendAction(\"interop-session-context-group-add-handler\").catch((e=>{})),\"function\"!=typeof e)throw new Error(\"Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.\");const n=await Yi(this,zi,\"f\");let i;return i=t?`sessionContextHandler:invoke-${this.id}-${t}-${(0,Qi.generateId)()}`:`sessionContextHandler:invoke-${this.id}`,n.register(i,(0,Qi.wrapContextHandler)(e,i)),await n.dispatch(`sessionContextGroup:handlerAdded-${this.id}`,{handlerId:i,contextType:t}),{unsubscribe:await this.createUnsubscribeCb(i)}}async createUnsubscribeCb(e){const t=await Yi(this,zi,\"f\");return async()=>{t.remove(e),await t.dispatch(`sessionContextGroup:handlerRemoved-${this.id}`,{handlerId:e})}}getUserInstance(){return{id:this.id,setContext:(0,Qi.wrapInTryCatch)(this.setContext.bind(this),\"Failed to set context: \"),getCurrentContext:(0,Qi.wrapInTryCatch)(this.getCurrentContext.bind(this),\"Failed to get context: \"),addContextHandler:(0,Qi.wrapInTryCatch)(this.addContextHandler.bind(this),\"Failed to add context handler: \")}}}qi.default=Xi,zi=new WeakMap;var er={},tr={},nr={},ir={},rr=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),or=s&&s.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,\"default\",{enumerable:!0,value:t})}:function(e,t){e.default=t}),sr=s&&s.__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)&&rr(t,e,n);return or(t,e),t};Object.defineProperty(ir,\"__esModule\",{value:!0}),ir.PrivateChannelClient=void 0;const ar=sr(Hi);var cr,dr;function hr(){if(cr)return tr;cr=1;var e,t=s&&s.__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)},n=s&&s.__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},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(tr,\"__esModule\",{value:!0}),tr.FDC3ModuleBase=void 0;const o=nr,a=Hi,c=wr(),d=r(i);return tr.FDC3ModuleBase=class{get client(){return t(this,e,\"f\").call(this)}get fin(){return this.wire.getFin()}constructor(t,i){this.wire=i,e.set(this,void 0),n(this,e,t,\"f\")}async broadcast(e){return this.wire.sendAction(\"fdc3-broadcast\").catch((e=>{})),this.client.setContext(e)}async _open(e,t){this.wire.sendAction(\"fdc3-open\").catch((e=>{}));try{return await c.InteropClient.ferryFdc3Call(this.client,\"fdc3Open\",{app:e,context:t})}catch(e){const t=e.message===a.BROKER_ERRORS.fdc3Open?\"ResolverUnavailable\":e.message;throw new Error(t)}}async _getChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:\"system\",...(0,o.getUnsupportedChannelApis)()})))}async getOrCreateChannel(e){this.wire.sendAction(\"fdc3-get-or-create-channel\").catch((e=>{}));const t=(await this._getChannels()).find((t=>t.id===e));if(t)return{...t,type:\"system\",...(0,o.getUnsupportedChannelApis)()};try{const t=await this.client.joinSessionContextGroup(e);return(0,o.buildAppChannelObject)(t)}catch(e){throw console.error(e.message),new Error(o.ChannelError.CreationFailed)}}async getSystemChannels(){return this.wire.sendAction(\"fdc3-get-system-channels\").catch((e=>{})),this._getChannels()}async joinChannel(e){this.wire.sendAction(\"fdc3-join-channel\").catch((e=>{}));try{return await this.client.joinContextGroup(e)}catch(e){if(e.message===a.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup?console.error(\"The Channel you have tried to join is an App Channel. Custom Channels can only be defined by the Interop Broker through code or manifest configuration. Please use getOrCreateChannel.\"):console.error(e.message),e.message.startsWith(\"Attempting to join a context group that does not exist\"))throw new Error(o.ChannelError.NoChannelFound);throw new Error(o.ChannelError.AccessDenied)}}async getCurrentChannel(){this.wire.sendAction(\"fdc3-get-current-channel\").catch((e=>{}));const e=await this.getCurrentContextGroupInfo();return e?this.buildChannelObject(e):null}async leaveCurrentChannel(){return this.wire.sendAction(\"fdc3-leave-current-channel\").catch((e=>{})),this.client.removeFromContextGroup()}async getCurrentContextGroupInfo(){const e=await this.client.getContextGroups(),t=e.map((async e=>this.client.getAllClientsInContextGroup(e.id))),n=(await Promise.all(t)).findIndex((e=>e.some((e=>{const{uuid:t,name:n}=e;return this.wire.me.uuid===t&&this.wire.me.name===n}))));return e[n]}async buildChannelObject(e){return{...e,type:\"system\",addContextListener:(...[e,t])=>{let n,i;\"function\"==typeof e?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),n=e):(n=t,\"string\"==typeof e&&(i=e));const r=(async()=>{let e=!0;const t=await this.client.getCurrentContext(i);return this.client.addContextHandler(((i,r)=>{if(!e||(e=!1,!(0,d.default)(t,i)))return n(i,r)}),i)})();return{...r,unsubscribe:()=>r.then((e=>e.unsubscribe()))}},broadcast:this.broadcast.bind(this),getCurrentContext:async e=>{const t=await this.client.getCurrentContext(e);return void 0===t?null:t}}}},e=new WeakMap,tr}ir.PrivateChannelClient=class{constructor(e,t){this.id=t,this.client=e,this.listeners=new Map}async broadcast(e){return this.client.dispatch(\"broadcast\",{context:e})}async getCurrentContext(e){return this.client.dispatch(\"getCurrentContext\",{contextType:e})}async addContextListener(e,t){if(\"function\"!=typeof t)throw new Error(\"Non-function argument passed to the second parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.\");let n;n=e?`contextHandler:invoke-${this.id}-${e}-${ar.generateId()}`:`contextHandler:invoke-${this.id}-${ar.generateId()}`,this.client.register(n,ar.wrapContextHandler(t,n));const i={unsubscribe:await this.createContextUnsubscribeCb(n)};return this.listeners.set(n,i),await this.client.dispatch(\"contextHandlerAdded\",{handlerId:n,contextType:e}),i}createNonStandardUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch(\"nonStandardHandlerRemoved\",{handlerId:e})}}createContextUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch(\"contextHandlerRemoved\",{handlerId:e})}}onAddContextListener(e){const t=`onContextHandlerAdded:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch(\"onAddContextHandlerAdded\",{handlerId:t}),n}onDisconnect(e){const t=`onDisconnect:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch(\"onDisconnectHandlerAdded\",{handlerId:t}),n}onUnsubscribe(e){const t=`onUnsubscribe:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch(\"onUnsubscribeHandlerAdded\",{handlerId:t}),n}async cleanUpAllSubs(){Array.from(this.listeners.keys()).forEach((e=>{this.client.remove(e),this.listeners.delete(e)}))}async disconnect(){try{await this.client.dispatch(\"clientDisconnecting\"),await this.cleanUpAllSubs(),await this.client.disconnect()}catch(e){throw new Error(e.message)}}},function(e){var t=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,\"__esModule\",{value:!0}),e.getIntentResolution=e.isChannel=e.isContext=e.connectPrivateChannel=e.buildAppChannelObject=e.buildPrivateChannelObject=e.ChannelError=e.ResultError=e.UnsupportedChannelApiError=e.getUnsupportedChannelApis=void 0;const n=Hi,r=ir,o=t(i);e.getUnsupportedChannelApis=e=>({addContextListener:()=>{throw new a(\"Channel.addContextListener\",e)},broadcast:()=>{throw new a(\"Channel.broadcast\",e)},getCurrentContext:()=>{throw new a(\"Channel.getCurrentContext\",e)}});class a extends Error{constructor(e,t=\"System\"){super(e),this.message=`Calling ${e} on an instance of a ${t} Channel returned by fdc3.get${t}Channels is not supported. If you would like to use a ${t} Channel, please use fdc3.joinChannel, fdc3.addContextListener, and fdc3.broadcast instead.`}}var c,d;e.UnsupportedChannelApiError=a,function(e){e.NoResultReturned=\"NoResultReturned\",e.IntentHandlerRejected=\"IntentHandlerRejected\"}(c=e.ResultError||(e.ResultError={})),(d=e.ChannelError||(e.ChannelError={})).NoChannelFound=\"NoChannelFound\",d.AccessDenied=\"AccessDenied\",d.CreationFailed=\"CreationFailed\";e.buildPrivateChannelObject=e=>{let t=!1;const n=()=>{if(t)throw new Error(\"Private Channel Client has been disconnected from the Private Channel\")};return{id:e.id,type:\"private\",broadcast:async t=>(n(),e.broadcast(t)),getCurrentContext:async t=>(n(),e.getCurrentContext(t)),addContextListener:async(t,i)=>{n();let r=i,o=t;\"function\"==typeof t&&(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),r=t,o=null);return e.addContextListener(o,r)},onAddContextListener:t=>(n(),e.onAddContextListener(t)),disconnect:async()=>(n(),t=!0,e.disconnect()),onDisconnect:t=>(n(),e.onDisconnect(t)),onUnsubscribe:t=>(n(),e.onUnsubscribe(t))}};e.buildAppChannelObject=e=>({id:e.id,type:\"app\",broadcast:e.setContext,getCurrentContext:async t=>{const n=await e.getCurrentContext(t);return void 0===n?null:n},addContextListener:(t,n)=>{let i,r;\"function\"==typeof t?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),i=t):(i=n,\"string\"==typeof t&&(r=t));const s=(async()=>{let t=!0;const n=await e.getCurrentContext(r);return e.addContextHandler(((e,r)=>{if(!t||(t=!1,!(0,o.default)(n,e)))return i(e,r)}),r)})();return{...s,unsubscribe:()=>s.then((e=>e.unsubscribe()))}}});e.connectPrivateChannel=async t=>{try{const n=await fin.InterApplicationBus.Channel.connect(t),i=new r.PrivateChannelClient(n,t);return(0,e.buildPrivateChannelObject)(i)}catch(e){throw new Error(`Private Channel with id: ${t} doesn't exist`)}};e.isContext=e=>{if(e&&\"object\"==typeof e&&\"type\"in e){const{type:t}=e;return\"string\"==typeof t}return!1};e.isChannel=e=>{if(e&&\"object\"==typeof e&&\"type\"in e&&\"id\"in e){const{type:t,id:n}=e;return\"string\"==typeof t&&\"string\"==typeof n&&(\"app\"===t||\"private\"===t)}return!1};e.getIntentResolution=async(t,i,r,o)=>{const s=(0,n.generateId)(),a=new Promise(((e,t)=>{fin.InterApplicationBus.subscribe({uuid:\"*\"},s,(t=>{e(t)})).catch((()=>t(new Error(\"getResult is not supported in this environment\"))))})),d=r?{target:r,intentResolutionResultId:s}:{intentResolutionResultId:s},h=o?{name:o,context:i,metadata:d}:{...i,metadata:d},l=async()=>{let n=await a;if(!n||\"object\"!=typeof n)throw new Error(c.NoResultReturned);const{error:i}=n;if(i)throw new Error(c.IntentHandlerRejected);if((0,e.isChannel)(n)){const{id:i,type:r}=n;switch(r){case\"private\":n=await(0,e.connectPrivateChannel)(i);break;case\"app\":{const r=await t.joinSessionContextGroup(i);n=(0,e.buildAppChannelObject)(r);break}}}else if(!(0,e.isContext)(n))throw new Error(c.NoResultReturned);return n},u=o?await t.fireIntent(h):await t.fireIntentForContext(h);return\"object\"!=typeof u?{source:{appId:\"\",instanceId:\"\"},intent:\"\",version:\"2.0\",getResult:l}:{...u,getResult:l}}}(nr);var lr,ur,pr={};function wr(){if(ur)return Ki;ur=1;var e,t,n=s&&s.__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},i=s&&s.__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)},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ki,\"__esModule\",{value:!0}),Ki.InteropClient=void 0;const o=d,a=r(qi),c=function(){if(dr)return er;dr=1,Object.defineProperty(er,\"__esModule\",{value:!0}),er.Fdc3Module=void 0;const e=Hi,t=hr();class n extends t.FDC3ModuleBase{async open(e,t){await super._open(e,t)}addContextListener(e,t){let n;return this.wire.sendAction(\"fdc3-add-context-listener\").catch((e=>{})),\"function\"==typeof e?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),n=this.client.addContextHandler(e)):n=this.client.addContextHandler(t,null===e?void 0:e),{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}addIntentListener(e,t){this.wire.sendAction(\"fdc3-add-intent-listener\").catch((e=>{}));const n=this.client.registerIntentHandler((e=>{const{context:n,metadata:i}=e,{metadata:r}=n,o=i?.intentResolutionResultId||r?.intentResolutionResultId;o&&this.fin.InterApplicationBus.publish(o,null).catch((()=>null)),t(e.context)}),e,{fdc3Version:\"1.2\"});return{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}async raiseIntent(t,n,i){this.wire.sendAction(\"fdc3-raise-intent\").catch((e=>{}));const r=i?{name:t,context:n,metadata:{target:i}}:{name:t,context:n};try{return await this.client.fireIntent(r)}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntent?\"ResolverUnavailable\":t.message;throw new Error(n)}}async findIntent(t,n){this.wire.sendAction(\"fdc3-find-intent\").catch((e=>{}));try{return await this.client.getInfoForIntent({name:t,context:n})}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntent?\"ResolverUnavailable\":t.message;throw new Error(n)}}async findIntentsByContext(t){this.wire.sendAction(\"fdc3-find-intents-by-context\").catch((e=>{}));try{return await this.client.getInfoForIntentsByContext(t)}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntentsByContext?\"ResolverUnavailable\":t.message;throw new Error(n)}}async raiseIntentForContext(t,n){this.wire.sendAction(\"fdc3-raise-intent-for-context\").catch((e=>{}));try{return await this.client.fireIntentForContext({...t,metadata:{target:n}})}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntentForContext?\"ResolverUnavailable\":t.message;throw new Error(n)}}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}getInfo(){return this.wire.sendAction(\"fdc3-get-info\").catch((e=>{})),{providerVersion:this.wire.environment.getAdapterVersionSync(),provider:`openfin-${this.wire.me.uuid}`,fdc3Version:\"1.2\"}}}return er.Fdc3Module=n,er}(),h=function(){if(lr)return pr;lr=1,Object.defineProperty(pr,\"__esModule\",{value:!0}),pr.Fdc3Module2=void 0;const e=hr(),t=Hi,n=wr(),i=nr,r=ir;class o extends e.FDC3ModuleBase{async open(e,t){return\"string\"==typeof e&&console.warn(\"Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).\"),super._open(e,t)}async findInstances(e){this.wire.sendAction(\"fdc3-find-instances\").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,\"fdc3FindInstances\",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3FindInstances?\"ResolverUnavailable\":e.message;throw new Error(n)}}async getAppMetadata(e){this.wire.sendAction(\"fdc3-get-app-metadata\").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,\"fdc3GetAppMetadata\",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3GetAppMetadata?\"ResolverUnavailable\":e.message;throw new Error(n)}}async addContextListener(e,t){this.wire.sendAction(\"fdc3-add-context-listener\").catch((e=>{}));const n=e=>t=>{const{contextMetadata:n,...i}=t,r=n?[{...i},n]:[t,null];e(...r)};let i=t,r=n(i);return\"function\"==typeof e?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),i=e,r=n(i),this.client.addContextHandler(r)):this.client.addContextHandler(r,null===e?void 0:e)}async findIntent(e,n,i){this.wire.sendAction(\"fdc3-find-intent\").catch((e=>{}));try{return await this.client.getInfoForIntent({name:e,context:n,metadata:{resultType:i}})}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntent?\"ResolverUnavailable\":e.message;throw new Error(n)}}async findIntentsByContext(e,i){this.wire.sendAction(\"fdc3-find-intents-by-context\").catch((e=>{}));const r=i?{context:e,metadata:{resultType:i}}:e;try{return await n.InteropClient.ferryFdc3Call(this.client,\"fdc3v2FindIntentsByContext\",r)}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntentsByContext?\"ResolverUnavailable\":e.message;throw new Error(n)}}async raiseIntent(e,n,r){this.wire.sendAction(\"fdc3-raise-intent\").catch((e=>{}));try{return\"string\"==typeof r&&console.warn(\"Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).\"),(0,i.getIntentResolution)(this.client,n,r,e)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?\"ResolverUnavailable\":e.message;throw new Error(n)}}async raiseIntentForContext(e,n){this.wire.sendAction(\"fdc3-raise-intent-for-context\").catch((e=>{}));try{return\"string\"==typeof n&&console.warn(\"Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).\"),(0,i.getIntentResolution)(this.client,e,n)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?\"ResolverUnavailable\":e.message;throw new Error(n)}}async addIntentListener(e,t){if(this.wire.sendAction(\"fdc3-add-intent-listener\").catch((e=>{})),\"string\"!=typeof e)throw new Error(\"First argument must be an Intent name\");return this.client.registerIntentHandler((async e=>{let n,i;const{context:r,metadata:o}=e,{contextMetadata:s,metadata:a,...c}=r,d=o?.intentResolutionResultId||a?.intentResolutionResultId;try{const e=a?{metadata:a,...c}:{...c};n=await t(e,s),i=n}catch(e){n=e,i={error:!0}}if(d&&this.fin.InterApplicationBus.publish(d,i).catch((()=>null)),n instanceof Error)throw new Error(n.message);return n}),e,{fdc3Version:\"2.0\"})}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}async createPrivateChannel(){const e=(0,t.generateId)();await n.InteropClient.ferryFdc3Call(this.client,\"createPrivateChannelProvider\",{channelId:e});const o=await this.fin.InterApplicationBus.Channel.connect(e),s=new r.PrivateChannelClient(o,e);return(0,i.buildPrivateChannelObject)(s)}async getUserChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:\"user\",...(0,i.getUnsupportedChannelApis)(\"User\")})))}async getSystemChannels(){return console.warn(\"This API has been deprecated. Please use fdc3.getUserChannels instead.\"),super.getSystemChannels()}async joinUserChannel(e){return super.joinChannel(e)}async joinChannel(e){return console.warn(\"This API has been deprecated. Please use fdc3.joinUserChannel instead.\"),super.joinChannel(e)}async getCurrentChannel(){const e=await super.getCurrentChannel();return e?{...e,type:\"user\",broadcast:this.broadcast.bind(this)}:null}async getInfo(){return n.InteropClient.ferryFdc3Call(this.client,\"fdc3v2GetInfo\",{fdc3Version:\"2.0\"})}}return pr.Fdc3Module2=o,pr}(),l=Hi;let u=class extends o.Base{constructor(i,r){super(i),e.set(this,void 0),t.set(this,void 0),n(this,t,new Map,\"f\"),n(this,e,r,\"f\")}async setContext(t){this.wire.sendAction(\"interop-client-set-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"setContext\",{context:t})}async addContextHandler(t,n){if(this.wire.sendAction(\"interop-client-add-context-handler\").catch((e=>{})),\"function\"!=typeof t)throw new Error(\"Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.\");const r=await i(this,e,\"f\");let o;o=n?`invokeContextHandler-${n}-${(0,l.generateId)()}`:\"invokeContextHandler\";const s=(0,l.wrapContextHandler)(t,o);return r.register(o,s),await r.dispatch(\"contextHandlerRegistered\",{handlerId:o,contextType:n}),{unsubscribe:async()=>{r.remove(o),await r.dispatch(\"removeContextHandler\",{handlerId:o})}}}async getContextGroups(){this.wire.sendAction(\"interop-client-get-context-groups\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getContextGroups\")}async joinContextGroup(t,n){this.wire.sendAction(\"interop-client-join-context-group\").catch((e=>{}));const r=await i(this,e,\"f\");if(!t)throw new Error(\"No contextGroupId specified for joinContextGroup.\");return r.dispatch(\"joinContextGroup\",{contextGroupId:t,target:n})}async removeFromContextGroup(t){this.wire.sendAction(\"interop-client-remove-from-context-group\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"removeFromContextGroup\",{target:t})}async getAllClientsInContextGroup(t){this.wire.sendAction(\"interop-client-get-all-clients-in-context-group\").catch((e=>{}));const n=await i(this,e,\"f\");if(!t)throw new Error(\"No contextGroupId specified for getAllClientsInContextGroup.\");return n.dispatch(\"getAllClientsInContextGroup\",{contextGroupId:t})}async getInfoForContextGroup(t){this.wire.sendAction(\"interop-client-get-info-for-context-group\").catch((e=>{}));const n=await i(this,e,\"f\");if(!t)throw new Error(\"No contextGroupId specified for getInfoForContextGroup.\");return n.dispatch(\"getInfoForContextGroup\",{contextGroupId:t})}async fireIntent(t){this.wire.sendAction(\"interop-client-fire-intent\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"fireIntent\",t)}async registerIntentHandler(t,n,r){this.wire.sendAction(\"interop-client-register-intent-handler\").catch((e=>{}));const o=await i(this,e,\"f\"),s=`intent-handler-${n}`,a=(0,l.wrapIntentHandler)(t,s);try{await o.register(s,a),await o.dispatch(\"intentHandlerRegistered\",{handlerId:s,...r})}catch(e){throw new Error(\"Unable to register intent handler\")}return{unsubscribe:async()=>{o.remove(s)}}}async getCurrentContext(t){this.wire.sendAction(\"interop-client-get-current-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getCurrentContext\",{contextType:t})}async getInfoForIntent(t){this.wire.sendAction(\"interop-client-get-info-for-intent\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getInfoForIntent\",t)}async getInfoForIntentsByContext(t){this.wire.sendAction(\"interop-client-get-info-for-intents-by-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getInfoForIntentsByContext\",t)}async fireIntentForContext(t){this.wire.sendAction(\"interop-client-fire-intent-for-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"fireIntentForContext\",t)}async joinSessionContextGroup(n){try{const r=i(this,t,\"f\").get(n);if(r)return r.getUserInstance();const o=await i(this,e,\"f\"),{hasConflict:s}=await o.dispatch(\"sessionContextGroup:createIfNeeded\",{sessionContextGroupId:n});s&&console.warn(`A (non-session) context group with the name \"${n}\" already exists. If you are trying to join a Context Group, call joinContextGroup instead.`);const c=new a.default(this.wire,i(this,e,\"f\"),n);return i(this,t,\"f\").set(n,c),c.getUserInstance()}catch(e){throw console.error(`Error thrown trying to create Session Context Group with id \"${n}\": ${e}`),e}}async onDisconnection(t){this.wire.sendAction(\"interop-client-add-ondisconnection-listener\").catch((e=>{}));return(await i(this,e,\"f\")).onDisconnection((e=>{const{uuid:n}=e;t({type:\"interop-broker\",topic:\"disconnected\",brokerName:n})}))}getFDC3Sync(e){switch(e){case\"1.2\":return new c.Fdc3Module((()=>this),this.wire);case\"2.0\":return new h.Fdc3Module2((()=>this),this.wire);default:throw new Error(`Invalid FDC3 version provided: ${e}. Must be '1.2' or '2.0'`)}}async getFDC3(e){return this.getFDC3Sync(e)}static async ferryFdc3Call(t,n,r){return(await i(t,e,\"f\")).dispatch(n,r||null)}};return Ki.InteropClient=u,e=new WeakMap,t=new WeakMap,Ki}var yr,fr,gr,mr={};function vr(){if(yr)return mr;yr=1,Object.defineProperty(mr,\"__esModule\",{value:!0}),mr.overrideCheck=mr.checkFDC32Overrides=mr.getDefaultViewFdc3VersionFromAppInfo=void 0;const e=Vi();function t(t){return[\"fdc3HandleFindInstances\",\"handleInfoForIntent\",\"handleInfoForIntentsByContext\",\"fdc3HandleGetAppMetadata\",\"fdc3HandleGetInfo\",\"fdc3HandleOpen\",\"handleFiredIntent\",\"handleFiredIntentForContext\"].filter((n=>t[n]===e.InteropBroker.prototype[n]))}return mr.getDefaultViewFdc3VersionFromAppInfo=function({manifest:e,initialOptions:t}){const n=e?.platform?.defaultViewOptions?.fdc3InteropApi??t.defaultViewOptions?.fdc3InteropApi;return[\"1.2\",\"2.0\"].includes(n??\"\")?n:void 0},mr.checkFDC32Overrides=t,mr.overrideCheck=function(e,n){if(n&&\"2.0\"===n){const n=t(e);n.length>0&&console.warn(`WARNING: FDC3 2.0 has been set as a default option for Views in this Platform, but the required InteropBroker APIs for FDC3 2.0 compliance have not all been overridden.\\nThe following APIs need to be overridden:\\n${n.join(\"\\n\")}`)}},mr}function Cr(){return gr||(gr=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),i=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),i(function(){if(fr)return Ti;fr=1;var e=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ti,\"__esModule\",{value:!0}),Ti.InteropModule=void 0;const t=e(n),i=$i,r=d,o=Vi(),a=wr(),c=vr(),h=Tn,l=e=>new e,u=\"You have attempted to use or modify InteropBroker parameters, which is not allowed. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.\";class p extends r.Base{async init(e,n=l){this.wire.sendAction(\"interop-init\").catch((()=>{}));const r=await this.wire.environment.getInteropInfo(this.wire.getFin()),s=(0,i.createUnusableObject)(u),a=(0,i.createWarningObject)(u,(0,t.default)(r)),d=async()=>{throw new Error(u)},p=o.InteropBroker.createClosedConstructor(this.wire,(()=>this.fin.InterApplicationBus.Channel.create(`interop-broker-${e}`)),r);let w;return w=Array.isArray(n)?new((0,h.overrideFromComposables)(...n)(p))(s,d,a):await n(p,s,d,a),(0,c.overrideCheck)(w,r.fdc3Version),w}connectSync(e,t){return this.wire.sendAction(\"interop-connect-sync\").catch((()=>{})),new a.InteropClient(this.wire,this.wire.environment.whenReady().then((()=>this.fin.InterApplicationBus.Channel.connect(`interop-broker-${e}`,{payload:t}))))}}return Ti.InteropModule=p,Ti}(),e),i(wr(),e),i(Vi(),e)}(Li)),Li}var br={},Ir={},Er={},xr={};Object.defineProperty(xr,\"__esModule\",{value:!0}),xr.getSnapshotSourceChannelName=void 0;xr.getSnapshotSourceChannelName=e=>`snapshot-source-provider-${e.uuid}`;var Ar,Pr,Mr,_r,Or,Sr=s&&s.__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},Rr=s&&s.__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)};Object.defineProperty(Er,\"__esModule\",{value:!0}),Er.SnapshotSource=void 0;const Fr=d,jr=xr,kr=new Map;class Lr extends Fr.Base{constructor(e,t){super(e),Ar.set(this,void 0),Pr.set(this,(()=>(kr.has(this.identity.uuid)||kr.set(this.identity.uuid,{eventFired:null,clientPromise:null}),kr.get(this.identity.uuid)))),Mr.set(this,(()=>(Rr(this,Pr,\"f\").call(this).clientPromise||(Rr(this,Pr,\"f\").call(this).clientPromise=Rr(this,_r,\"f\").call(this)),Rr(this,Pr,\"f\").call(this).clientPromise))),_r.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);try{Rr(this,Pr,\"f\").call(this).eventFired||await Rr(this,Or,\"f\").call(this);const t=await this.fin.InterApplicationBus.Channel.connect(e,{wait:!1});return t.onDisconnection((()=>{Rr(this,Pr,\"f\").call(this).clientPromise=null,Rr(this,Pr,\"f\").call(this).eventFired=null})),t}catch(e){throw Rr(this,Pr,\"f\").call(this).clientPromise=null,new Error(\"The targeted SnapshotSource is not currently initialized. Await this object's ready() method.\")}})),Or.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);let t,n;const i=new Promise(((e,i)=>{t=e,n=i}));Rr(this,Pr,\"f\").call(this).eventFired=i;const r=async i=>{try{i.channelName===e&&(t(),await this.fin.InterApplicationBus.Channel.removeListener(\"connected\",r))}catch(e){n(e)}};await this.fin.InterApplicationBus.Channel.on(\"connected\",r)})),Sr(this,Ar,t,\"f\")}get identity(){return Rr(this,Ar,\"f\")}async ready(){this.wire.sendAction(\"snapshot-source-ready\").catch((e=>{}));try{await Rr(this,Mr,\"f\").call(this)}catch(e){await Rr(this,Pr,\"f\").call(this).eventFired}}async getSnapshot(){this.wire.sendAction(\"snapshot-source-get-snapshot\").catch((e=>{}));const e=await Rr(this,Mr,\"f\").call(this),t=await e.dispatch(\"get-snapshot\");return(await t).snapshot}async applySnapshot(e){this.wire.sendAction(\"snapshot-source-apply-snapshot\").catch((e=>{}));return(await Rr(this,Mr,\"f\").call(this)).dispatch(\"apply-snapshot\",{snapshot:e})}}Er.SnapshotSource=Lr,Ar=new WeakMap,Pr=new WeakMap,Mr=new WeakMap,_r=new WeakMap,Or=new WeakMap,Object.defineProperty(Ir,\"__esModule\",{value:!0}),Ir.SnapshotSourceModule=void 0;const Tr=d,$r=Er,Br=xr;class Gr extends Tr.Base{async init(e){if(this.wire.sendAction(\"snapshot-source-init\").catch((e=>{})),\"object\"!=typeof e||\"function\"!=typeof e.getSnapshot||\"function\"!=typeof e.applySnapshot)throw new Error(\"you must pass in a valid SnapshotProvider\");const t=await this.fin.InterApplicationBus.Channel.create((0,Br.getSnapshotSourceChannelName)(this.fin.me));t.register(\"get-snapshot\",(async()=>({snapshot:await e.getSnapshot()}))),t.register(\"apply-snapshot\",(({snapshot:t})=>e.applySnapshot(t)))}wrapSync(e){return this.wire.sendAction(\"snapshot-source-wrap-sync\").catch((e=>{})),new $r.SnapshotSource(this.wire,e)}async wrap(e){return this.wire.sendAction(\"snapshot-source-wrap\").catch((e=>{})),this.wrapSync(e)}}Ir.SnapshotSourceModule=Gr,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Ir,e),n(Er,e)}(br),Object.defineProperty(a,\"__esModule\",{value:!0});var Wr=a.Fin=void 0;const Hr=t,Nr=c,Dr=ie(),Ur=Z(),Vr=de,zr=en,Kr=rn,qr=un,Jr=bn,Yr=J(),Zr=An,Qr=ki,Xr=Cr(),eo=br;class to extends Hr.EventEmitter{constructor(e){super(),this.wire=e,this.System=new Nr.System(e),this.Window=new Dr._WindowModule(e),this.Application=new Ur.ApplicationModule(e),this.InterApplicationBus=new Vr.InterApplicationBus(e),this.Clipboard=new zr.Clipboard(e),this.ExternalApplication=new Kr.ExternalApplicationModule(e),this.Frame=new qr._FrameModule(e),this.GlobalHotkey=new Jr.GlobalHotkey(e),this.Platform=new Zr.PlatformModule(e,this.InterApplicationBus.Channel),this.View=new Yr.ViewModule(e),this.Interop=new Xr.InteropModule(e),this.SnapshotSource=new eo.SnapshotSourceModule(e),e.registerFin(this),this.me=(0,Qr.getMe)(e),e.on(\"disconnected\",(()=>{this.emit(\"disconnected\")}))}}Wr=a.Fin=to;var no={},io={};function ro(e){return\"string\"==typeof e.manifestUrl}function oo(e){return ao(e)&&\"string\"==typeof e.address}function so(e){return oo(e)&&\"string\"==typeof e.token}function ao(e){return\"string\"==typeof e.uuid}function co(e){return e.runtime&&\"string\"==typeof e.runtime.version}function ho(e){return ao(e)&&co(e)}Object.defineProperty(io,\"__esModule\",{value:!0}),io.isInternalConnectConfig=io.isPortDiscoveryConfig=io.isNewConnectConfig=io.isConfigWithReceiver=io.isRemoteConfig=io.isExistingConnectConfig=io.isExternalConfig=void 0,io.isExternalConfig=ro,io.isExistingConnectConfig=oo,io.isRemoteConfig=so,io.isConfigWithReceiver=function(e){return\"object\"==typeof e.receiver&&so({...e,address:\"\"})},io.isNewConnectConfig=ho,io.isPortDiscoveryConfig=function(e){return ro(e)&&co(e)||ho(e)},io.isInternalConnectConfig=function(e){return oo(e)||ho(e)};var lo={},uo={};Object.defineProperty(uo,\"__esModule\",{value:!0}),uo.EmitterMap=void 0;const po=t;function wo(e){return Buffer.from(e).toString(\"base64\")}uo.EmitterMap=class{constructor(){this.storage=new Map}hashKeys(e){return e.map(wo).join(\"/\")}getOrCreate(e){const t=this.hashKeys(e);return this.storage.has(t)||this.storage.set(t,new po.EventEmitter),this.storage.get(t)}has(e){return this.storage.has(this.hashKeys(e))}delete(e){const t=this.hashKeys(e);return this.storage.delete(t)}},Object.defineProperty(lo,\"__esModule\",{value:!0});const yo=uo;class fo extends yo.EmitterMap{constructor(){super(...arguments),this.dispatchEvent=e=>{if(function(e){return\"process-desktop-event\"===e.action}(e)){const{payload:t}=e,n=function(e){const{topic:t}=e;if(\"frame\"===t||\"window\"===t||\"view\"===t){const{uuid:n,name:i}=e;return[t,n,i]}if(\"application\"===t){const{uuid:n}=e;return[t,n]}return[t]}(t);if(this.has(n))return this.getOrCreate(n).emit(t.type,t),!0}return!1}}}lo.default=fo;var go,mo,vo=s&&s.__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},Co=s&&s.__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)},bo=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(no,\"__esModule\",{value:!0});var Io=no.Transport=void 0;const Eo=t,xo=io,Ao=g,Po=bo(lo),Mo=ki,_o=ke;class Oo extends Eo.EventEmitter{constructor(e,t,n){super(),this.wireListeners=new Map,this.topicRefMap=new Map,this.eventAggregator=new Po.default,this.messageHandlers=[this.eventAggregator.dispatchEvent],go.set(this,void 0),mo.set(this,void 0),this.connectSync=()=>{Co(this,go,\"f\").connectSync()},this.getPort=()=>Co(this,go,\"f\").getPort(),vo(this,go,new e(this.onmessage.bind(this)),\"f\"),this.environment=t,this.sendRaw=Co(this,go,\"f\").send.bind(Co(this,go,\"f\")),this.registerMessageHandler(this.handleMessage.bind(this)),Co(this,go,\"f\").on(\"disconnected\",(()=>{for(const[,{handleNack:e}]of this.wireListeners)e({reason:\"Remote connection has closed\"});this.wireListeners.clear(),this.emit(\"disconnected\")}));const{uuid:i,name:r}=n,o=this.environment.getCurrentEntityType();this.me=(0,Mo.getBaseMe)(o,i,r)}getFin(){if(!Co(this,mo,\"f\"))throw new Error(\"No Fin object registered for this transport\");return Co(this,mo,\"f\")}registerFin(e){if(Co(this,mo,\"f\"))throw new Error(\"Fin object has already been registered for this transport\");vo(this,mo,e,\"f\")}shutdown(){return Co(this,go,\"f\").shutdown()}async connect(e){if((0,xo.isConfigWithReceiver)(e))return await Co(this,go,\"f\").connect(e.receiver),this.authorize(e);if((0,xo.isRemoteConfig)(e))return this.connectRemote(e);if((0,xo.isExistingConnectConfig)(e))return this.connectByPort(e);if((0,xo.isNewConnectConfig)(e)){const t=await this.environment.retrievePort(e);return this.connectByPort({...e,address:`ws://localhost:${t}`})}}async connectRemote(e){return await Co(this,go,\"f\").connect(new(this.environment.getWsConstructor())(e.address)),this.authorize(e)}async connectByPort(e){const{address:t,uuid:n}=e,i={...e,type:\"file-token\"},r=Co(this,go,\"f\");await r.connect(new(this.environment.getWsConstructor())(e.address));const o=await this.sendAction(\"request-external-authorization\",{uuid:n,type:\"file-token\"},!0);if(\"external-authorization-response\"!==o.action)throw new Ao.UnexpectedActionError(o.action);return await this.environment.writeToken(o.payload.file,o.payload.token),this.authorize(i)}async authorize(e){const t=await this.sendAction(\"request-authorization\",e,!0);if(\"authorization-response\"!==t.action)throw new Ao.UnexpectedActionError(t.action);if(!0!==t.payload.success)throw new Ao.RuntimeError(t.payload)}sendAction(e,t={},n=!1){let i=()=>{};const r=Ao.RuntimeError.getCallSite(1),o=this.environment.getNextMessageId(),s=new Promise(((s,a)=>{i=a;const c={action:e,payload:t,messageId:o},d=Co(this,go,\"f\");return this.addWireListener(o,s,(e=>this.nackHandler(e,a,r)),n),d.send(c).catch(a)}));return Object.assign(s,{cancel:i,messageId:o})}nackHandler(e,t,n){t(\"string\"==typeof e?e:new Ao.RuntimeError(e,n))}ferryAction(e){return new Promise(((t,n)=>{const i=this.environment.getNextMessageId();e.messageId=i;const r=e=>{t(e.payload)};return Co(this,go,\"f\").send(e).then((()=>this.addWireListener(i,r,(e=>this.nackHandler(e,n)),!1))).catch(n)}))}registerMessageHandler(e){this.messageHandlers.push(e)}addWireListener(e,t,n,i){i?this.uncorrelatedListener=t:this.wireListeners.has(e)?n({reason:\"Duplicate handler id\",error:(0,_o.errorToPOJO)(new Ao.DuplicateCorrelationError(String(e)))}):this.wireListeners.set(e,{resolve:t,handleNack:n})}onmessage(e){for(const t of this.messageHandlers)t.call(null,e)}handleMessage(e){const t=e.correlationId||NaN;if(\"correlationId\"in e){if(!this.wireListeners.has(t))return!1;{const{resolve:n,handleNack:i}=this.wireListeners.get(t);\"ack\"!==e.action?i({reason:\"Did not receive ack action\",error:(0,_o.errorToPOJO)(new Ao.NoAckError(e.action))}):\"payload\"in e?e.payload.success?n.call(null,e):i(e.payload):\"string\"==typeof e.reason?i(e):(console.warn(\"Received invalid response from core\",e),i({reason:\"invalid response shape\"})),this.wireListeners.delete(t)}}else this.uncorrelatedListener&&this.uncorrelatedListener.call(null,e),this.uncorrelatedListener=()=>{};return!0}}Io=no.Transport=Oo,go=new WeakMap,mo=new WeakMap;const So=(...e)=>({log:(...t)=>console.debug(`[${(new Date).toISOString()}]`,...(e=>e.map((e=>`[${e}]`)))(e),...t),getLogger:(...t)=>So(...e,...t)}),Ro=So(\"@openfin/core-web/client\");function Fo(e,t){if(!function(e){return\"string\"==typeof e}(e))throw new Error(`Property ${t} has invalid type. Expected string, got ${typeof e}.`)}const jo=\"web-broker-ports-ready\",ko=Ro.getLogger(\"get-web-interop-ports\");function Lo(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)}function To(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}\"function\"==typeof SuppressedError&&SuppressedError;const $o=e=>{var n,i,r;return r=class extends t.EventEmitter{constructor(t){super(),n.set(this,void 0),i.set(this,!1),this.connectSync=()=>{Lo(this,i,\"f\")||(e.addEventListener(\"message\",(e=>{e.data?.topic?.startsWith(\"wire-message\")&&e.data.message&&Lo(this,n,\"f\").call(this,{...JSON.parse(e.data.message),ports:e.ports})})),e.start())},this.connect=async()=>{this.connectSync()},this.send=t=>(e.postMessage({topic:\"wire-message\",message:JSON.stringify(t)}),Promise.resolve()),this.shutdown=async()=>{e.close()},To(this,n,t,\"f\")}getPort(){return e}},n=new WeakMap,i=new WeakMap,r};var Bo={},Go={};Object.defineProperty(Go,\"__esModule\",{value:!0}),Go.BaseEnvironment=void 0;const Wo=vr();Go.BaseEnvironment=class{async getViewWindowIdentity(e,t){const{identity:n}=await e.View.wrapSync(t).getCurrentWindow();return n}async getInteropInfo(e){const t=await e.Application.getCurrentSync().getInfo().catch((()=>null)),n=t?.initialOptions?.interopBrokerConfiguration??{};return{fdc3Version:t?(0,Wo.getDefaultViewFdc3VersionFromAppInfo)(t):void 0,...n,fdc3Info:{providerVersion:await e.System.getVersion(),provider:\"OpenFin\"}}}},Object.defineProperty(Bo,\"__esModule\",{value:!0});var Ho=Bo.BrowserEnvironment=void 0;const No=Go;class Do extends No.BaseEnvironment{constructor(){super(...arguments),this.type=\"other\",this.getRandomId=()=>{const e=new Uint32Array(1);return window.crypto.getRandomValues(e)[0].toString(32)}}getAdapterVersionSync(){return\"\"}observeBounds(e,t){throw new Error(\"Method not implemented.\")}layoutAllowedInContext(e){return!1}initLayoutManager(e,t,n){throw new Error(\"Method not implemented.\")}applyLayoutSnapshot(e,t,n){throw new Error(\"Method not implemented.\")}createLayout(e,t){throw new Error(\"Method not implemented.\")}destroyLayout(e,t){throw new Error(\"Method not implemented.\")}resolveLayout(e,t){throw new Error(\"Method not implemented.\")}initPlatform(...e){throw new Error(\"Method not implemented.\")}writeToken(e,t){return Promise.resolve(\"\")}retrievePort(e){throw new Error(\"Method not implemented.\")}getNextMessageId(){return this.getRandomId()}createChildContent(e){throw new Error(\"Method not implemented.\")}getWebWindow(e){throw new Error(\"Method not implemented.\")}getCurrentEntityIdentity(){throw new Error(\"Method not implemented.\")}getCurrentEntityType(){return\"external connection\"}raiseEvent(e,t){throw new Error(\"Method not implemented.\")}getUrl(){return location.href}getDefaultChannelOptions(){return{create:{},connect:{}}}getRtcPeer(){return new RTCPeerConnection}getWsConstructor(){return WebSocket}whenReady(){return Promise.resolve()}}Ho=Bo.BrowserEnvironment=Do;const Uo=e=>\"platform\"in e&&void 0!==e.platform;var Vo,zo;class Ko extends Ho{constructor(e){super(),this.connectConfig=e,Vo.set(this,void 0),zo.set(this,new W((async()=>Promise.resolve().then((function(){return require(\"./main-b14f67c9.js\")}))))),Uo(e)&&this.validatePlatformOptions(e)}getAdapterVersionSync(){return\"0.39.21\"}validatePlatformOptions({platform:e}){if(!(\"layoutSnapshot\"in e))throw new Error(\"Platform options are missing layoutSnapshot. Please provide a layoutSnapshot in the platform options.\");if(\"windows\"in e||\"windows\"in e.layoutSnapshot)throw new Error(\"It appears you tried to call connect() with a snapshot object from an OpenFin desktop environment. Note that connect() expects to be called with a platform property with this structure: { platform: { layoutSnapshot } }. To get a layoutSnapshot of the expected structure, use fin.Platform.Layout.getCurrentLayoutManagerSync().getLayoutSnapshot() in v34+ in your desktop environment.\");const{layouts:t}=e.layoutSnapshot;Object.entries(t).map((([e,t])=>{if(\"object\"!=typeof t||null===t)throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must be an object.`);if(!(\"content\"in t))throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must contain a 'content' property.`)}))}async getInteropInfo(e){return{...{contextGroups:void 0,logging:{beforeAction:{enabled:!1},afterAction:{enabled:!1}}},fdc3Version:void 0,fdc3Info:{providerVersion:\"0.39.21\",provider:\"OpenFin Web\"}}}layoutAllowedInContext(e){return!0}async initLayoutManager(e,t,n){if(Lo(this,Vo,\"f\"))throw new Error(\"Layout already initialized.\");if(!Uo(this.connectConfig))throw new Error(\"Platform options are missing from connection config.\");const{WebLayoutEntryPoint:i}=await Lo(this,zo,\"f\").getValue();return To(this,Vo,new i(this.connectConfig),\"f\"),await Lo(this,Vo,\"f\").initLayoutManager(e,t,n)}async applyLayoutSnapshot(e,t,n){Lo(this,Vo,\"f\")?.applyLayoutSnapshot(e,t,n)}async createLayout(e,t){return Lo(this,Vo,\"f\")?.createLayout(e,t)}async destroyLayout(e,t){return Lo(this,Vo,\"f\")?.destroyLayout(e,t)}async getViewWindowIdentity(e,t){return Promise.resolve({uuid:t.uuid,name:t.uuid})}}Vo=new WeakMap,zo=new WeakMap;const qo=()=>{const e=((e,t)=>{const n=new RegExp(`^${t}<(?.*)>$`).exec(e)?.groups?.meta;if(n)try{return JSON.parse(atob(n))}catch(e){throw new Error(`Failed to decode JSON from ${n}.`)}})(window.name,\"of-frame\");if(e)try{const{name:t,uuid:n,brokerUrl:i,providerId:r,contextGroup:o}=e;return Fo(i,\"brokerUrl\"),Fo(n,\"uuid\"),Fo(t,\"name\"),{identity:{name:t,uuid:n},brokerUrl:i,interopConfig:{providerId:r,currentContextGroup:o}}}catch(e){throw new Error(`Unexpected error occurred when inferring platform information: ${e.stack}`)}},Jo=()=>{const e=r.v4();return{uuid:e,name:e}},Yo=async e=>{if(\"enabled\"===e.connectionInheritance){const t=await(async e=>{const t=qo();if(t){const{validateOptions:n=(()=>!0)}=e,{identity:i,...r}=t;if(!await n(r))throw new Error(\"Parent options were rejected by validateOptions.\");return t}})(e);if(t)return t}if(!e.options){const t=\"enabled\"===e.connectionInheritance?\"Broker URL was not specified nor provided by a platform container.\":\"Connection inheritance is disabled but no options were provided.\";throw new Error(t)}return{...e.options,identity:Jo()}};exports.__classPrivateFieldGet=Lo,exports.__classPrivateFieldSet=To,exports.apiExposer=Gn,exports.commonjsGlobal=s,exports.connect=async t=>{try{Ro.log(\"Establishing connection\",t);const{brokerUrl:n,identity:i,timeout:r,interopConfig:s}=await Yo(t),{workerPort:a,iframeBrokerPort:c}=await(async(e,t,n)=>{const{origin:i}=new URL(e),r=document.createElement(\"IFRAME\");let s;r.style.display=\"none\";try{return await new Promise(((a,c)=>{const d=e=>{if(e.source===r.contentWindow&&e.data?.topic===`ack-${jo}`){if(e.origin!==i)c(new Error(`Broker redirected to unexpected origin ${e.origin}, expected ${i}.`));else if(e.data.success){const[t,n]=e.ports;a({iframeBrokerPort:t,workerPort:n})}else c(new m(e.data));window.removeEventListener(\"message\",d),clearTimeout(s)}};window.addEventListener(\"message\",d),ko.log(`Connecting to broker ${e}`),r.setAttribute(\"src\",e),r.setAttribute(\"name\",o(t,\"of-broker\")),document.body.appendChild(r),ko.log(\"Iframe loaded, awaiting init message from iframe\"),n&&(s=setTimeout((()=>{window.removeEventListener(\"message\",d),document.body.removeChild(r),c(new Error(\"Worker did not initialize in time\"))}),n))}))}catch(e){throw new Error(`Failed to initialise Fin Web Client. ${e.message}`,{cause:e})}})(n,i,r);Ro.log(\"Successfully established connection to shared worker\");const d={entityType:\"external connection\",...i};a.start(),c.start();const h=((t,n,i)=>{const r=$o(n),o=new Ko(t),s=new Io(r,o,i);return s.connectSync(),window.Buffer=e.Buffer,new Wr(s)})(t,a,d);return s?.providerId&&(h.me.interop=h.Interop.connectSync(s.providerId),s?.currentContextGroup&&h.me.interop.joinContextGroup(s.currentContextGroup).catch((e=>{console.warn(`Error joining specified context group: ${s?.currentContextGroup}, continuing`,e)}))),{...h,me:{...h.me,identity:{uuid:h.me.uuid,name:h.me.name}}}}catch(e){throw new Error(`An error occured during web-interop connection: ${e.message}`)}},exports.decorators=Nn,exports.encodeOptions=o,exports.layout_constants=ai,exports.lazy=G;\n","\"use strict\";var t=require(\"./main-8cad4070.js\"),e=require(\"uuid\");require(\"buffer/\"),require(\"events\"),require(\"lodash/cloneDeep\"),require(\"lodash/isEqual\");var i={},n={};Object.defineProperty(n,\"__esModule\",{value:!0}),n.mapValuesAsync=n.mapEntriesAsync=void 0;const o=(t,[e,i])=>({...t,[e]:i});async function s(t,e){return(await Promise.all(e.map((async([e,i])=>[e,await t(i,e)])))).reduce(o,{})}n.mapEntriesAsync=s,n.mapValuesAsync=async function(t,e){let i;return i=e instanceof Map?[...e.entries()]:Object.entries(e),s(t,i)};var r,a,l,h,d=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldSet||function(t,e,i,n,o){if(\"m\"===n)throw new TypeError(\"Private method is not writable\");if(\"a\"===n&&!o)throw new TypeError(\"Private accessor was defined without a setter\");if(\"function\"==typeof e?t!==e||!o:!e.has(t))throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");return\"a\"===n?o.call(t,i):o?o.value=i:e.set(t,i),i},c=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldGet||function(t,e,i,n){if(\"a\"===i&&!n)throw new TypeError(\"Private accessor was defined without a getter\");if(\"function\"==typeof e?t!==e||!n:!e.has(t))throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");return\"m\"===i?n:\"a\"===i?n.call(t):n?n.value:e.get(t)};Object.defineProperty(i,\"__esModule\",{value:!0});var m=i.DefaultLayoutManager=void 0;const u=n;class p{constructor(t){a.set(this,void 0),l.set(this,new Map),d(this,a,t,\"f\")}size(){return c(this,l,\"f\").size}async applyLayoutSnapshot({layouts:t}){if(Object.keys(t).length>1)throw new Error(\"[LayoutManager] Tried to call applyLayoutSnapshot with more than 1 layout. When implementing multiple layouts via overridden LayoutManager class, you must override and fully implement the applyLayoutSnapshot method without calling super.applyLayoutSnapshot().\");const[[e,i]]=Object.entries(t);await p.createLayout(this,{layoutName:e,layout:i})}async showLayout({layoutName:t}){}async getLayoutSnapshot(){return{layouts:await(0,u.mapValuesAsync)((t=>t.getFrameSnapshot()),c(this,l,\"f\"))}}async removeLayout({layoutName:t}){}getLayoutIdentityForView(t){const e=[...c(this,l,\"f\").values()].find((e=>e.getCurrentViews().some((e=>e.name===t.name&&e.uuid===t.uuid))));return e?.identity??void 0}isLayoutVisible({layoutName:t}){return c(p,r,\"m\",h).call(p,this,t).isVisible()}resolveLayoutIdentity(t){if(t&&\"layoutName\"in t)return t;const e=[...c(this,l,\"f\").values()];if(1===e.length)return e[0].identity;const i=e.find((t=>t.isVisible()));return i?.identity??void 0}static async resolveLayout(t,e){const i=t.resolveLayoutIdentity(e);if(void 0===i||!(\"layoutName\"in i))throw new Error(\"[layout-manager] resolveLayout: Could not resolve the layout identity. Make sure you include 'layoutName' in the identity object.\");return c(p,r,\"m\",h).call(p,t,i.layoutName)}static async handleSharedView(t,e,i){await(0,u.mapValuesAsync)((async t=>{if(t.identity.layoutName!==e.layoutName){const e=t.getCurrentViews().find((t=>t.name===i.name));e&&await t.onViewDetached({viewIdentity:e,target:null}).catch(console.error)}}),c(t,l,\"f\"))}static async handleLastViewRemoved(t,e){await t.removeLayout(e),await c(t,a,\"f\").handleLastViewRemoved(t)}static async destroyLayout(t,{layoutName:e}){await c(p,r,\"m\",h).call(p,t,e).destroy(),c(t,l,\"f\").delete(e)}static async createLayout(t,e){const{layoutName:i}=e;if(c(t,l,\"f\").has(i))throw new Error(`Layout name ${i} already exists`);await c(t,a,\"f\").createLayout(e,t)}static registerLayout(t,e,i){c(t,l,\"f\").set(e,i)}static getAllLayouts(t){return[...c(t,l,\"f\").values()]}static setInitialSnapshot(t,e){c(t,a,\"f\").setInitialSnapshot(e)}static createClosedConstructor(...t){return class extends p{constructor(){super(...t)}}}}m=i.DefaultLayoutManager=p,r=p,a=new WeakMap,l=new WeakMap,h=function(t,e){const i=c(t,l,\"f\").get(e);if(!i)throw new Error(`[layout-manager] getLayoutByName: Could not locate layout with name '${e}'`);return i};var g={},f={},v={};Object.defineProperty(v,\"__esModule\",{value:!0}),v.ReversibleMap=void 0;v.ReversibleMap=class{constructor(){this.valueToKey=new Map,this.keyToValue=new Map,this.setUnique=(t,e)=>{if(this.hasKey(t)||this.hasValue(e))throw new Error(\"Key or value already in the map.\");this.keyToValue.set(t,e),this.valueToKey.set(e,t)},this.getKey=t=>{const e=this.valueToKey.get(t);if(!e)throw new Error(\"Value not found in the map.\");return e},this.deleteKey=t=>{const e=this.getValue(t);return this.keyToValue.delete(t),this.valueToKey.delete(e),e},this.deleteValue=t=>{const e=this.getKey(t);return this.keyToValue.delete(e),this.valueToKey.delete(t),e},this.hasKey=t=>this.keyToValue.has(t),this.hasValue=t=>this.valueToKey.has(t)}getValue(t){const e=this.keyToValue.get(t);if(!e)throw new Error(\"Key not found in the map.\");return e}},Object.defineProperty(f,\"__esModule\",{value:!0});var _=f.LayoutContentCache=void 0;const y=t.lazy,C=v;class w{constructor(){this.contentItemCache=new C.ReversibleMap,this.contentItemCacheId=0,this.createCacheKey=()=>{const t=`entity-${this.contentItemCacheId.toString()}`;return this.contentItemCacheId+=1,t},this.hasKey=t=>this.contentItemCache.hasKey(t),this.getItemOrUndefined=t=>{try{return this.getContentItemOrThrow(t)}catch(t){return}},this.getContentItemOrThrow=(t,e)=>{if(!this.contentItemCache.hasKey(t))throw new Error(\"Layout component has been destroyed or detached from the current layout.\");const i=this.contentItemCache.getValue(t);if(e&&!e.includes(i.type))throw new Error(`Layout item is not the expected type. Expected ${e.join(\", \")}, got ${i.type}.`);return i},this.getOrCreateEntityId=t=>{if(this.contentItemCache.hasValue(t))return this.contentItemCache.getKey(t);t.onDestroyed((()=>{this.contentItemCache.deleteValue(t)}));const e=this.createCacheKey();return this.contentItemCache.setUnique(e,t),e}}static getSingleInstance(){return w.singleton.getValue()}}_=f.LayoutContentCache=w,w.singleton=new y.Lazy((()=>new w));var I={},b={};!function(t){Object.defineProperty(t,\"__esModule\",{value:!0}),t.getAdjacentStacks=t.doShareEdge=t.getAdjacentItem=void 0;t.getAdjacentItem=(e,i)=>{const{parent:n}=e;if(e.isRoot()||!n)return;const o=[\"top\",\"bottom\"].includes(i)?\"column\":\"row\",s=[\"top\",\"left\"].includes(i)?-1:1;if(n.type===o){const t=n.contentItems.indexOf(e)+s;if(t>=0&&t{const n=t.getBounds(),o=e.getBounds();if(!n||!o)return!1;if([\"top\",\"bottom\"].includes(i)){return!(n.righto.right)}return!(n.bottomo.bottom)};t.getAdjacentStacks=(e,i)=>{const n=[\"top\",\"bottom\"].includes(i)?\"row\":\"column\",o=s=>\"stack\"===s.type?(0,t.doShareEdge)(e,s,i)?[s]:[]:\"root\"===s.type||\"ground\"===s.type?[]:s.type===n?s.contentItems.map((t=>o(t))).flat():s.type!==n?[\"top\",\"right\"].includes(i)?o(s.contentItems[s.contentItems.length-1]):o(s.contentItems[0]):[],s=(0,t.getAdjacentItem)(e,i);return s?o(s):[]}}(b);var S=t.commonjsGlobal&&t.commonjsGlobal.__decorate||function(t,e,i,n){var o,s=arguments.length,r=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if(\"object\"==typeof Reflect&&\"function\"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(s<3?o(r):s>3?o(e,i,r):o(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};Object.defineProperty(I,\"__esModule\",{value:!0}),I.LayoutEntitiesController=void 0;const E=t.decorators,x=b,L=i;class z{constructor(t,e,i){this.wire=t,this.layoutManager=e,this.layoutContentCache=i,this.analytics=t=>{this.wire.sendAction(`layout-controller-${t}`).catch((()=>{}))},this.getLayoutIdentityForViewOrThrow=async t=>{const e=this.layoutManager.getLayoutIdentityForView(t);if(!e)throw new Error(`View identity ${t.name} is not attached to any layouts.`);return e},this.getRoot=async t=>{this.analytics(\"get-root\");const e=(await this.getLayout(t)).getRoot();return{type:e.type,entityId:this.layoutContentCache.getOrCreateEntityId(e)}},this.getStackByView=async t=>{this.analytics(\"get-stack-by-view\");const e=await this.getLayoutIdentityForViewOrThrow(t),i=(await this.getLayout(e)).getStackByView(t);if(\"stack\"===i?.type)return{entityId:this.layoutContentCache.getOrCreateEntityId(i),type:\"stack\"}},this.getStackViews=t=>{this.analytics(\"get-stack-views\");return this.layoutContentCache.getContentItemOrThrow(t,[\"stack\"]).contentItems.map((t=>({name:t.viewName,uuid:this.wire.me.uuid})))},this.isRoot=t=>{this.analytics(\"is-root\");return this.layoutContentCache.getContentItemOrThrow(t).isRoot()},this.exists=t=>(this.analytics(\"exists\"),this.layoutContentCache.hasKey(t)),this.addViewToStack=async(t,e,{index:i}={index:0})=>{this.analytics(\"add-view-to-stack\");const n=this.layoutContentCache.getContentItemOrThrow(t);if(i&&i>n.contentItems.length+1)throw new Error(`Index '${i}' out of range, please exclude the index or specify a number between 0 and ${n.contentItems.length}`);const o={id:t,index:i},{identity:s}=await n.layout.platformCreateView(e,{location:o});return s},this.findViewInStack=(t,e)=>t.contentItems.find((t=>t.viewName===e.name)),this.removeViewFromStack=async(t,e)=>{this.analytics(\"remove-view-from-stack\");const i=this.layoutContentCache.getContentItemOrThrow(t,[\"stack\"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to remove a view ('${e.name}') which does not belong to the stack.`);await n.layout.platformCloseView(e)},this.createAdjacentStack=async(t,e,{position:i=\"right\"}={})=>{if(this.analytics(\"create-adjacent-stack\"),!Array.isArray(e)||0===e.length)throw new Error('The parameter \"views\" must be an array with at least 1 element.');if(![\"top\",\"bottom\",\"left\",\"right\"].includes(i))throw new Error(`Invalid position '${i}' specified.`);const n=this.layoutContentCache.getContentItemOrThrow(t).createAdjacentStack({position:i}),o=this.layoutContentCache.getOrCreateEntityId(n);return await Promise.all(e.reverse().map((t=>this.addViewToStack(o,t)))),o},this.getAdjacentStacks=async({targetId:t,edge:e})=>{this.analytics(\"get-adjacent-stacks\");const i=this.layoutContentCache.getContentItemOrThrow(t);return(0,x.getAdjacentStacks)(i,e).map((t=>({entityId:this.layoutContentCache.getOrCreateEntityId(t)})))},this.setStackActiveView=async(t,e)=>{this.analytics(\"set-stack-active-view\");const i=this.layoutContentCache.getContentItemOrThrow(t,[\"stack\"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to set a view ('${e.name}') as active when it does not belong to the stack.`);i.setActiveContentItem(n,!0)}}async getLayout(t){const e=await L.DefaultLayoutManager.resolveLayout(this.layoutManager,t);if(!e)throw new Error(`Could not resolve target layout identity ${JSON.stringify(t)}`);return e}getContent(t){this.analytics(\"get-content\");return this.layoutContentCache.getContentItemOrThrow(t,[\"column\",\"row\"]).contentItems.map((t=>({type:t.type,entityId:this.layoutContentCache.getOrCreateEntityId(t)})))}getParent(t){this.analytics(\"get-parent\");const e=this.layoutContentCache.getContentItemOrThrow(t);if(!e.isRoot())return e.parent?.contentItems.includes(e)?{type:e.parent.type,entityId:this.layoutContentCache.getOrCreateEntityId(e.parent)}:void 0}}S([(0,E.expose)()],z.prototype,\"getLayoutIdentityForViewOrThrow\",void 0),S([(0,E.expose)()],z.prototype,\"getRoot\",void 0),S([(0,E.expose)()],z.prototype,\"getStackByView\",void 0),S([(0,E.expose)()],z.prototype,\"getStackViews\",void 0),S([(0,E.expose)()],z.prototype,\"getContent\",null),S([(0,E.expose)()],z.prototype,\"getParent\",null),S([(0,E.expose)()],z.prototype,\"isRoot\",void 0),S([(0,E.expose)()],z.prototype,\"exists\",void 0),S([(0,E.expose)()],z.prototype,\"addViewToStack\",void 0),S([(0,E.expose)()],z.prototype,\"removeViewFromStack\",void 0),S([(0,E.expose)()],z.prototype,\"createAdjacentStack\",void 0),S([(0,E.expose)()],z.prototype,\"getAdjacentStacks\",void 0),S([(0,E.expose)()],z.prototype,\"setStackActiveView\",void 0),I.LayoutEntitiesController=z,Object.defineProperty(g,\"__esModule\",{value:!0});var M=g.initLayoutEndpoints=void 0;const P=t.apiExposer,T=t.layout_constants,A=f,k=I,D=i;M=g.initLayoutEndpoints=async function(t,e){const i=t.getFin(),n=await i.Platform.getCurrentSync().getClient(),o=new P.ChannelsExposer(n);await new P.ApiExposer(o).exposeInstance(new k.LayoutEntitiesController(t,e,A.LayoutContentCache.getSingleInstance()),{id:T.LAYOUT_CONTROLLER_ID}),await async function(t,e){const i=t=>async i=>{const n=await D.DefaultLayoutManager.resolveLayout(e,i.target);if(!n)throw new Error(`Could not resolve the layout target from payload ${JSON.stringify(i)}`);return t(n,i)},n=(e,n)=>{t.register(e,i(n))},o=(t,e)=>{n(t,e)};n(\"replace-view\",((t,e)=>t.replaceView(e))),n(\"replace-layout\",((t,{layout:e})=>t.replaceLayout(e))),n(\"add-view\",((t,e)=>t.insertView(e))),o(\"layout-add-view\",((t,{viewOptions:e,location:i,targetView:n})=>t.platformCreateView(e,{location:i,targetView:n}))),n(\"close-view\",((t,e)=>t.cleanupView(e.viewIdentity))),o(\"layout-close-view\",((t,e)=>t.platformCloseView(e.viewIdentity))),n(\"apply-preset-layout\",((t,e)=>t.applyPreset(e))),n(\"get-layout-views\",(t=>t.getCurrentViews())),n(\"get-frame-snapshot\",(t=>t.getFrameSnapshot())),n(\"is-visible\",(t=>t.isVisible())),n(\"destroy\",(t=>t.destroy())),t.register(\"get-layout-snapshot\",(()=>e.getLayoutSnapshot()))}(n,e)};var R={};Object.defineProperty(R,\"__esModule\",{value:!0});var U=R.BaseLayout=void 0;U=R.BaseLayout=class{};var O={};Object.defineProperty(O,\"__esModule\",{value:!0});var V=O.DOMEmitter=void 0;V=O.DOMEmitter=class{constructor(t){this.container=t}dispatchLocalEvent(t,e){const i={...e,type:t,tabSelector:`tab-${e.name}`,containerSelector:`container-${e.name}`,topic:\"openfin-DOM-event\"};this.container.dispatchEvent(new CustomEvent(t,{detail:i}))}};var B={};Object.defineProperty(B,\"__esModule\",{value:!0});var H=B.mapLayoutContentItemsImmutableSync=B.mapLayoutContentItemsImmutable=W=B.isVisible=void 0;var W=B.isVisible=t=>(0!==t.offsetWidth||0!==t.offsetHeight)&&\"hidden\"!==window.getComputedStyle(t).visibility&&t.offsetTop>=0&&t.offsetLeft>=0&&t.offsetTop<=window.innerHeight&&t.offsetLeft<=window.innerWidth;const F=t=>\"type\"in t&&\"component\"===t.type;B.mapLayoutContentItemsImmutable=async function t(e,i){return F(i)?e(i):{...i,content:await Promise.all(i.content?.map((i=>t(e,i))))}},H=B.mapLayoutContentItemsImmutableSync=function t(e,i){return F(i)?e(i):{...i,content:i.content?.map((i=>t(e,i)))}};class N extends Error{constructor(t,e){super(e),this.type=t}}class G extends N{constructor(t,e){super(\"Configuration\",t),this.node=e}}class j extends N{constructor(t){super(\"PopoutBlocked\",t)}}class $ extends N{constructor(t){super(\"API\",t)}}class Z extends N{constructor(t){super(\"Bind\",t)}}class q extends Error{constructor(t,e,i){super(`${t}: ${e}${void 0===i?\"\":\": \"+i}`)}}class X extends q{constructor(t,e){super(\"Assert\",t,e)}}class Y extends q{constructor(t,e,i){super(\"UnreachableCase\",t,`${e}${void 0===i?\"\":\": \"+i}`)}}class K extends q{constructor(t,e){super(\"UnexpectedNull\",t,e)}}class J extends q{constructor(t,e){super(\"UnexpectedUndefined\",t,e)}}var Q;!function(t){let e=!1;const i={PopoutCannotBeCreatedWithGroundItemConfig:{id:0,default:\"Popout cannot be created with ground ItemConfig\"},PleaseRegisterAConstructorFunction:{id:1,default:\"Please register a constructor function\"},ComponentTypeNotRegisteredAndBindComponentEventHandlerNotAssigned:{id:2,default:\"Component type not registered and BindComponentEvent handler not assigned\"},ComponentIsAlreadyRegistered:{id:3,default:\"Component is already registered\"},ComponentIsNotVirtuable:{id:4,default:\"Component is not virtuable. Requires rootHtmlElement field/getter\"},VirtualComponentDoesNotHaveRootHtmlElement:{id:5,default:'Virtual component does not have getter \"rootHtmlElement\"'},ItemConfigIsNotTypeComponent:{id:6,default:\"ItemConfig is not of type component\"},InvalidNumberPartInSizeString:{id:7,default:\"Invalid number part in size string\"},UnknownUnitInSizeString:{id:8,default:\"Unknown unit in size string\"},UnsupportedUnitInSizeString:{id:9,default:\"Unsupported unit in size string\"}};t.idCount=Object.keys(i).length;const n=Object.values(i);t.checkInitialise=function(){if(!e)for(let e=0;e=\"0\"&&t<=\"9\"}function Tt(t,e){const i=zt(e);t.style.width=i}function At(t,e){const i=zt(e);t.style.height=i}function kt(t){return{width:t.offsetWidth,height:t.offsetHeight}}function Dt(t,e){t.style.display=e?\"\":\"none\"}function Rt(t,e){if(void 0!==e)for(const i in e)if(e.hasOwnProperty(i)){const n=e[i],o=t[i];t[i]=Ut(o,n)}return t}function Ut(t,e){if(\"object\"!=typeof e)return e;if(Array.isArray(e)){const t=e.length,i=new Array(t);for(let n=0;n36)throw new Error(\"Too many keys in config minifier map\")},t.translateObject=n}(dt||(dt={})),function(t){t.defaults={type:at.ground,content:[],size:1,sizeUnit:ht.Fractional,minSize:void 0,minSizeUnit:ht.Pixel,id:\"\",isClosable:!0},t.createCopy=function(t,e){switch(t.type){case at.ground:case at.row:case at.column:return gt.createCopy(t,e);case at.stack:return ut.createCopy(t,e);case at.component:return pt.createCopy(t);default:throw new Y(\"CICC91354\",t.type,\"Invalid Config Item type specified\")}},t.createDefault=function(t){switch(t){case at.ground:throw new X(\"CICCDR91562\");case at.row:case at.column:return gt.createDefault(t);case at.stack:return ut.createDefault();case at.component:return pt.createDefault();default:throw new Y(\"CICCDD91563\",t,\"Invalid Config Item type specified\")}},t.isComponentItem=function(t){return t.type===at.component},t.isStackItem=function(t){return t.type===at.stack},t.isGroundItem=function(t){return t.type===at.ground}}(ct||(ct={})),function(t){t.defaultMaximised=!1,function(t){t.createCopy=function(t,e){return void 0===t?void 0:{show:null!=e?e:t.show,popout:t.popout,close:t.close,maximise:t.maximise,minimise:t.minimise,tabDropdown:t.tabDropdown}}}(t.Header||(t.Header={}))}(mt||(mt={})),function(t){function e(t){const e=t.length,i=new Array(e);for(let n=0;n\"__glMaximised\"===t));t>0&&(o=!0,n=n.splice(t,1)),e=n.length>0?n[0]:ct.defaults.id}else e=n;return i=void 0!==t.maximised?t.maximised:o,{id:e,maximised:i}}}(wt||(wt={})),function(t){function e(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0;return{resolved:!0,root:Et.resolve(i),openPopouts:t.resolveOpenPopouts(e.openPopouts),dimensions:t.Dimensions.resolve(e.dimensions),settings:t.Settings.resolve(e.settings),header:t.Header.resolve(e.header,e.settings,e.labels)}}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:Lt.fromResolvedArray(e.openPopouts),settings:_t.Settings.createCopy(e.settings),dimensions:t.Dimensions.fromResolved(e.dimensions),header:_t.Header.createCopy(e.header)}},t.isResolved=function(t){const e=t;return void 0!==e.resolved&&!0===e.resolved},t.resolveOpenPopouts=function(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0,{root:Et.resolve(o),openPopouts:xt.resolveOpenPopouts(e.openPopouts),dimensions:xt.Dimensions.resolve(e.dimensions),settings:xt.Settings.resolve(e.settings),header:xt.Header.resolve(e.header,e.settings,e.labels),parentId:null!==(i=e.parentId)&&void 0!==i?i:null,indexInParent:null!==(n=e.indexInParent)&&void 0!==n?n:null,window:t.Window.resolve(e.window,e.dimensions),resolved:!0}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:i(e.openPopouts),dimensions:xt.Dimensions.fromResolved(e.dimensions),settings:_t.Settings.createCopy(e.settings),header:_t.Header.createCopy(e.header),parentId:e.parentId,indexInParent:e.indexInParent,window:t.Window.fromResolved(e.window)}},t.fromResolvedArray=i}(Lt||(Lt={}));class Wt{constructor(){this._allEventSubscriptions=[],this._subscriptionsMap=new Map,this.unbind=this.removeEventListener,this.trigger=this.emit}tryBubbleEvent(t,e){}emit(t,...e){let i=this._subscriptionsMap.get(t);if(void 0!==i){i=i.slice();for(let t=0;t0){const n=e.slice();n.unshift(t);const o=this._allEventSubscriptions.slice();for(let t=0;t0?n.contentItems[0]:n,e=0);const o=this._layoutManager.createAndInitContentItem(i,t);t.addChild(o,e),this._layoutManager.layoutConfig.settings.popInOnClose?this._onClose():this.close()}createWindow(){const t=this.createUrl(),e=Math.floor(1e6*Math.random()).toString(36),i=this.serializeWindowFeatures({width:this._initialWindowSize.width,height:this._initialWindowSize.height,innerWidth:this._initialWindowSize.width,innerHeight:this._initialWindowSize.height,menubar:\"no\",toolbar:\"no\",location:\"no\",personalbar:\"no\",resizable:\"yes\",scrollbars:\"no\",status:\"no\"});if(this._popoutWindow=globalThis.open(t,e,i),this._popoutWindow)this._popoutWindow.addEventListener(\"load\",(()=>this.positionWindow()),{passive:!0}),this._popoutWindow.addEventListener(\"beforeunload\",(()=>{this._layoutManager.layoutConfig.settings.popInOnClose?this.popIn():this._onClose()}),{passive:!0}),this._checkReadyInterval=setInterval((()=>this.checkReady()),10);else if(!0===this._layoutManager.layoutConfig.settings.blockedPopoutsThrowError){throw new j(\"Popout blocked\")}}checkReady(){if(null===this._popoutWindow)throw new K(\"BPCR01844\");this._popoutWindow.__glInstance&&this._popoutWindow.__glInstance.isInitialised&&(this.onInitialised(),void 0!==this._checkReadyInterval&&(clearInterval(this._checkReadyInterval),this._checkReadyInterval=void 0))}serializeWindowFeatures(t){const e=[];for(const i in t)e.push(i+\"=\"+t[i].toString());return e.join(\",\")}createUrl(){const t=\"gl-window-config-\"+Ot(),e=_t.minifyConfig(this._config);try{localStorage.setItem(t,JSON.stringify(e))}catch(t){throw new Error(\"Error while writing to localStorage \"+function(t){return t instanceof Error?t.message:\"string\"==typeof t?t:\"Unknown Error\"}(t))}const i=new URL(location.href);return i.searchParams.set(\"gl-window\",t),i.toString()}positionWindow(){if(null===this._popoutWindow)throw new Error(\"BrowserPopout.positionWindow: null popoutWindow\");this._popoutWindow.moveTo(this._initialWindowSize.left,this._initialWindowSize.top),this._popoutWindow.focus()}onInitialised(){this._isInitialised=!0,this.getGlInstance().on(\"popIn\",(()=>this.popIn())),this.emit(\"initialised\")}_onClose(){setTimeout((()=>this.emit(\"closed\")),50)}}class Gt extends Wt{constructor(t,e,i,n){super(),this.layoutManager=t,this._parent=i,this._element=n,this._popInParentIds=[],this._type=e.type,this._id=e.id,this._isInitialised=!1,this.isGround=!1,this.isRow=!1,this.isColumn=!1,this.isStack=!1,this.isComponent=!1,this.size=e.size,this.sizeUnit=e.sizeUnit,this.minSize=e.minSize,this.minSizeUnit=e.minSizeUnit,this._isClosable=e.isClosable,this._pendingEventPropagations={},this._throttledEvents=[\"stateChanged\"],this._contentItems=this.createContentItems(e.content)}get type(){return this._type}get id(){return this._id}set id(t){this._id=t}get popInParentIds(){return this._popInParentIds}get parent(){return this._parent}get contentItems(){return this._contentItems}get isClosable(){return this._isClosable}get element(){return this._element}get isInitialised(){return this._isInitialised}static isStack(t){return t.isStack}static isComponentItem(t){return t.isComponent}static isComponentParentableItem(t){return t.isStack||t.isGround}removeChild(t,e=!1){const i=this._contentItems.indexOf(t);if(-1===i)throw new Error(\"Can't remove child item. Unknown content item\");if(e||this._contentItems[i].destroy(),this._contentItems.splice(i,1),this._contentItems.length>0)this.updateSize(!1);else if(!this.isGround&&!0===this._isClosable){if(null===this._parent)throw new K(\"CIUC00874\");this._parent.removeChild(this)}}addChild(t,e,i){return null!=e||(e=this._contentItems.length),this._contentItems.splice(e,0,t),t.setParent(this),!0===this._isInitialised&&!1===t._isInitialised&&t.init(),e}replaceChild(t,e,i=!1){const n=this._contentItems.indexOf(t),o=t._element.parentNode;if(-1===n)throw new X(\"CIRCI23232\",\"Can't replace child. oldChild is not child of this\");if(null===o)throw new K(\"CIRCP23232\");if(o.replaceChild(e._element,t._element),!0===i&&(t._parent=null,t.destroy()),this._contentItems[n]=e,e.setParent(this),e.size=t.size,e.sizeUnit=t.sizeUnit,e.minSize=t.minSize,e.minSizeUnit=t.minSizeUnit,null===e._parent)throw new K(\"CIRCNC45699\");!0===e._parent._isInitialised&&!1===e._isInitialised&&e.init(),this.updateSize(!1)}remove(){if(null===this._parent)throw new K(\"CIR11110\");this._parent.removeChild(this)}popout(){const t=Ot(),e=this.layoutManager.createPopoutFromContentItem(this,void 0,t,void 0);return this.emitBaseBubblingEvent(\"stateChanged\"),e}calculateConfigContent(){const t=this._contentItems,e=t.length,i=new Array(e);for(let n=0;nthis.propagateEventToLayoutManager(t,e))))}propagateEventToLayoutManager(t,e){this._pendingEventPropagations[t]=!1,this.layoutManager.emitUnknown(t,e)}}class jt extends Gt{constructor(t,e,i){super(t,e,i,document.createElement(\"div\")),this._parentItem=i,this._focused=!1,this.isComponent=!0,this._reorderEnabled=e.reorderEnabled,this.applyUpdatableConfig(e),this._initialWantMaximise=e.maximised;const n=document.createElement(\"div\");n.classList.add(\"lm_content\"),this.element.appendChild(n),this._container=new Ft(e,this,t,n,(t=>this.handleUpdateItemConfigEvent(t)),(()=>this.show()),(()=>this.hide()),(t=>this.focus(t)),(t=>this.blur(t)))}get componentName(){return this._container.componentType}get componentType(){return this._container.componentType}get reorderEnabled(){return this._reorderEnabled}get initialWantMaximise(){return this._initialWantMaximise}get component(){return this._container.component}get container(){return this._container}get parentItem(){return this._parentItem}get headerConfig(){return this._headerConfig}get title(){return this._title}get tab(){return this._tab}get focused(){return this._focused}destroy(){this._container.destroy(),super.destroy()}applyUpdatableConfig(t){this.setTitle(t.title),this._headerConfig=t.header}toConfig(){const t=this._container.stateRequestEvent,e=void 0===t?this._container.state:t();return{type:at.component,content:[],size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,maximised:!1,isClosable:this.isClosable,reorderEnabled:this._reorderEnabled,title:this._title,header:mt.Header.createCopy(this._headerConfig),componentType:pt.copyComponentType(this.componentType),componentState:e}}close(){if(null===this.parent)throw new K(\"CIC68883\");this.parent.removeChild(this,!1)}enterDragMode(t,e){Tt(this.element,t),At(this.element,e),this._container.enterDragMode(t,e)}exitDragMode(){this._container.exitDragMode()}enterStackMaximised(){this._container.enterStackMaximised()}exitStackMaximised(){this._container.exitStackMaximised()}drag(){this._container.drag()}updateSize(t){this.updateNodeSize(t)}init(){this.updateNodeSize(!1),super.init(),this._container.emit(\"open\"),this.initContentItems()}setTitle(t){this._title=t,this.emit(\"titleChanged\",t),this.emit(\"stateChanged\")}setTab(t){this._tab=t,this.emit(\"tab\",t),this._container.setTab(t)}hide(){super.hide(),this._container.setVisibility(!1)}show(){super.show(),this._container.setVisibility(!0)}focus(t=!1){this.parentItem.setActiveComponentItem(this,!0,t)}setFocused(t){this._focused=!0,this.tab.setFocused(),t||this.emitBaseBubblingEvent(\"focus\")}blur(t=!1){this._focused&&this.layoutManager.setFocusedComponentItem(void 0,t)}setBlurred(t){this._focused=!1,this.tab.setBlurred(),t||this.emitBaseBubblingEvent(\"blur\")}setParent(t){this._parentItem=t,super.setParent(t)}handleUpdateItemConfigEvent(t){this.applyUpdatableConfig(t)}updateNodeSize(t){if(\"none\"!==this.element.style.display){const{width:e,height:i}=kt(this.element);this._container.setSizeToNodeSize(e,i,t)}}}class $t extends Gt{constructor(){super(...arguments),this._focused=!1}get focused(){return this._focused}setFocusedValue(t){this._focused=t}}class Zt extends Wt{constructor(t,e){super(),this._eElement=t,this._pointerTracking=!1,this._pointerDownEventListener=t=>this.onPointerDown(t),this._pointerMoveEventListener=t=>this.onPointerMove(t),this._pointerUpEventListener=t=>this.onPointerUp(t),this._timeout=void 0,this._allowableTargets=[t,...e],this._oDocument=document,this._eBody=document.body,this._nDelay=1800,this._nDistance=10,this._nX=0,this._nY=0,this._nOriginalX=0,this._nOriginalY=0,this._dragging=!1,this._eElement.addEventListener(\"pointerdown\",this._pointerDownEventListener,{passive:!0})}destroy(){this.checkRemovePointerTrackingEventListeners(),this._eElement.removeEventListener(\"pointerdown\",this._pointerDownEventListener)}cancelDrag(){this.processDragStop(void 0)}onPointerDown(t){if(this._allowableTargets.includes(t.target)&&t.isPrimary){const e=this.getPointerCoordinates(t);this.processPointerDown(e)}}processPointerDown(t){this._nOriginalX=t.x,this._nOriginalY=t.y,this._oDocument.addEventListener(\"pointermove\",this._pointerMoveEventListener),this._oDocument.addEventListener(\"pointerup\",this._pointerUpEventListener,{passive:!0}),this._pointerTracking=!0,this._timeout=setTimeout((()=>{try{this.startDrag()}catch(t){throw console.error(t),t}}),this._nDelay)}onPointerMove(t){this._pointerTracking&&(this.processDragMove(t),t.preventDefault())}processDragMove(t){this._nX=t.pageX-this._nOriginalX,this._nY=t.pageY-this._nOriginalY,!1===this._dragging&&(Math.abs(this._nX)>this._nDistance||Math.abs(this._nY)>this._nDistance)&&this.startDrag(),this._dragging&&this.emit(\"drag\",this._nX,this._nY,t)}onPointerUp(t){this.processDragStop(t)}processDragStop(t){var e;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this.checkRemovePointerTrackingEventListeners(),!0===this._dragging&&(this._eBody.classList.remove(\"lm_dragging\"),this._eElement.classList.remove(\"lm_dragging\"),null===(e=this._oDocument.querySelector(\"iframe\"))||void 0===e||e.style.setProperty(\"pointer-events\",\"\"),this._dragging=!1,this.emit(\"dragStop\",t))}checkRemovePointerTrackingEventListeners(){this._pointerTracking&&(this._oDocument.removeEventListener(\"pointermove\",this._pointerMoveEventListener),this._oDocument.removeEventListener(\"pointerup\",this._pointerUpEventListener),this._pointerTracking=!1)}startDrag(){var t;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this._dragging=!0,this._eBody.classList.add(\"lm_dragging\"),this._eElement.classList.add(\"lm_dragging\"),null===(t=this._oDocument.querySelector(\"iframe\"))||void 0===t||t.style.setProperty(\"pointer-events\",\"none\"),this.emit(\"dragStart\",this._nOriginalX,this._nOriginalY)}getPointerCoordinates(t){return{x:t.pageX,y:t.pageY}}}class qt{constructor(t,e,i){this._isVertical=t,this._size=e,this._grabSize=i0){const i=this.createSplitter(Math.max(0,e-1)).element;e>0?(this.contentItems[e-1].element.insertAdjacentElement(\"afterend\",i),i.insertAdjacentElement(\"afterend\",t.element)):(this.contentItems[0].element.insertAdjacentElement(\"beforebegin\",i),i.insertAdjacentElement(\"beforebegin\",t.element))}else this._childElementContainer.appendChild(t.element);super.addChild(t,e);const n=1/this.contentItems.length*100;if(!0===i)return this.emitBaseBubblingEvent(\"stateChanged\"),e;for(let e=0;e0&&(this.calculateRelativeSizes(),this.setAbsoluteSizes()),this.emitBaseBubblingEvent(\"stateChanged\"),this.emit(\"resize\")}setAbsoluteSizes(){const t=this.calculateAbsoluteSizes();for(let e=0;e0&&t.itemSizes[e]++,this._isColumn?(Tt(this.contentItems[e].element,t.crossAxisSize),At(this.contentItems[e].element,t.itemSizes[e])):(Tt(this.contentItems[e].element,t.itemSizes[e]),At(this.contentItems[e].element,t.crossAxisSize))}calculateAbsoluteSizes(){const t=(this.contentItems.length-1)*this._splitterSize,{width:e,height:i}=kt(this.element);let n,o;this._isColumn?(n=i-t,o=e):(n=e-t,o=i);let s=0;const r=[];for(let t=0;t0){const n=100-t;for(let t=0;t100&&e.length>0){for(let t=0;te)return;{const r=i/e;let a=i;for(let e=0;ethis.onSplitterDrag(e,t,i))),e.on(\"dragStop\",(()=>this.onSplitterDragStop(e))),e.on(\"dragStart\",(()=>this.onSplitterDragStart(e))),this._splitter.splice(t,0,e),e}getSplitItems(t){const e=this._splitter.indexOf(t);return{before:this.contentItems[e],after:this.contentItems[e+1]}}calculateContentItemMinSize(t){const e=t.minSize;if(void 0!==e){if(t.minSizeUnit===ht.Pixel)return e;throw new X(\"ROCGMD98831\",JSON.stringify(t))}{const t=this.layoutManager.layoutConfig.dimensions;return this._isColumn?t.defaultMinItemHeight:t.defaultMinItemWidth}}calculateContentItemsTotalMinSize(t){let e=0;for(const i of t)e+=this.calculateContentItemMinSize(i);return e}onSplitterDragStart(t){const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=this.calculateContentItemsTotalMinSize(e.before.contentItems),s=this.calculateContentItemsTotalMinSize(e.after.contentItems);this._splitterPosition=0,this._splitterMinPosition=-1*(i-o),this._splitterMaxPosition=n-s}onSplitterDrag(t,e,i){let n=this._isColumn?i:e;if(null===this._splitterMinPosition||null===this._splitterMaxPosition)throw new K(\"ROCOSD59226\");n=Math.max(n,this._splitterMinPosition),n=Math.min(n,this._splitterMaxPosition),this._splitterPosition=n;const o=zt(n);this._isColumn?t.element.style.top=o:t.element.style.left=o}onSplitterDragStop(t){if(null===this._splitterPosition)throw new K(\"ROCOSDS66932\");{const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=(this._splitterPosition+i)/(i+n),s=e.before.size+e.after.size;e.before.size=o*s,e.after.size=(1-o)*s,t.element.style.top=zt(0),t.element.style.left=zt(0),globalThis.requestAnimationFrame((()=>this.updateSize(!1)))}}}!function(t){t.getElementDimensionSize=function(t,e){return\"width\"===e?function(t){return t.offsetWidth}(t):function(t){return t.offsetHeight}(t)},t.setElementDimensionSize=function(t,e,i){return\"width\"===e?Tt(t,i):At(t,i)},t.createElement=function(t,e){const i=t.createElement(\"div\");return i.classList.add(\"lm_item\"),e?i.classList.add(\"lm_column\"):i.classList.add(\"lm_row\"),i}}(Xt||(Xt={}));class Yt extends $t{constructor(t,e,i){super(t,vt.create(e),null,Yt.createElement(document)),this.isGround=!0,this._childElementContainer=this.element,this._containerElement=i;let n=null;for(;;){const t=n?n.previousSibling:this._containerElement.lastChild;if(!(t instanceof Element&&t.classList.contains(\"lm_content\")))break;n=t}this._containerElement.insertBefore(this.element,n)}init(){if(!0!==this.isInitialised){this.updateNodeSize();for(let t=0;t0?this.contentItems[0]:this,n.isComponent)throw new Error(\"Cannot add item as child to ComponentItem\");{const t=this.layoutManager.createAndInitContentItem(i,n);return e=n.addChild(t,e),n===this?-1:e}}loadComponentAsRoot(t){this.clearRoot();const e=Ct.resolve(t,!1);if(e.maximised)throw new Error(\"Root Component cannot be maximised\");{const t=new jt(this.layoutManager,e,this);t.init(),this.addChild(t,0)}}addChild(t,e){if(this.contentItems.length>0)throw new Error(\"Ground node can only have a single child\");return this._childElementContainer.appendChild(t.element),e=super.addChild(t,e),this.updateSize(!1),this.emitBaseBubblingEvent(\"stateChanged\"),e}calculateConfigContent(){const t=this.contentItems,e=t.length,i=new Array(e);for(let n=0;n0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e)),this.updateContentItemsSize(!1))}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}createSideAreas(){const t=Yt.Area.oppositeSides,e=new Array(Object.keys(t).length);let i=0;for(const n in t){const o=n,s=this.getElementArea();if(null===s)throw new K(\"RCSA77553\");s.side=o,\"2\"===t[o][1]?s[o]=s[t[o]]-50:s[o]=s[t[o]]+50,s.surface=(s.x2-s.x1)*(s.y2-s.y1),e[i++]=s}return e}highlightDropZone(t,e,i){this.layoutManager.tabDropPlaceholder.remove(),super.highlightDropZone(t,e,i)}onDrop(t,e){if(t.isComponent){const e=ut.createDefault(),i=t;e.header=mt.Header.createCopy(i.headerConfig);const n=this.layoutManager.createAndInitContentItem(e,this);n.addChild(t),t=n}if(0===this.contentItems.length)this.addChild(t);else{if(t.type===at.row||t.type===at.column){const e=ut.createDefault(),i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}const i=\"x\"==e.side[0]?at.row:at.column,n=\"2\"==e.side[1],o=this.contentItems[0];if(o instanceof Xt&&o.type===i){const e=o.contentItems[n?0:o.contentItems.length-1];o.addChild(t,n?0:void 0,!0),e.size*=.5,t.size=e.size,t.sizeUnit=ht.Percent,o.updateSize(!1)}else{const e=ct.createDefault(i),s=this.layoutManager.createContentItem(e,this);this.replaceChild(o,s),s.addChild(t,n?0:void 0,!0),s.addChild(o,n?void 0:0,!0),o.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}}dock(){throw new X(\"GID87731\")}validateDocking(){throw new X(\"GIVD87732\")}getAllContentItems(){const t=[this];return this.deepGetAllContentItems(this.contentItems,t),t}getConfigMaximisedItems(){const t=[];return this.deepFilterContentItems(this.contentItems,t,(t=>!(!Gt.isStack(t)||!t.initialWantMaximise)||!(!Gt.isComponentItem(t)||!t.initialWantMaximise))),t}getItemsByPopInParentId(t){const e=[];return this.deepFilterContentItems(this.contentItems,e,(e=>e.popInParentIds.includes(t))),e}toConfig(){throw new Error(\"Cannot generate GroundItem config\")}setActiveComponentItem(t,e,i){}updateNodeSize(){const{width:t,height:e}=kt(this._containerElement);Tt(this.element,t),At(this.element,e),this.contentItems.length>0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e))}deepGetAllContentItems(t,e){for(let i=0;ithis.onClick(t),this._touchStartEventListener=t=>this.onTouchStart(t),this._element=document.createElement(\"div\"),this._element.classList.add(i),this._element.title=e,this._header.on(\"destroy\",(()=>this.destroy())),this._element.addEventListener(\"click\",this._clickEventListener,{passive:!0}),this._element.addEventListener(\"touchstart\",this._touchStartEventListener,{passive:!0}),this._header.controlsContainerElement.appendChild(this._element)}get element(){return this._element}destroy(){var t;this._element.removeEventListener(\"click\",this._clickEventListener),this._element.removeEventListener(\"touchstart\",this._touchStartEventListener),null===(t=this._element.parentNode)||void 0===t||t.removeChild(this._element)}onClick(t){this._pushEvent(t)}onTouchStart(t){this._pushEvent(t)}}class Jt{constructor(t,e,i,n,o){var s;this._layoutManager=t,this._componentItem=e,this._closeEvent=i,this._focusEvent=n,this._dragStartEvent=o,this._isActive=!1,this._tabClickListener=t=>this.onTabClickDown(t),this._tabTouchStartListener=t=>this.onTabTouchStart(t),this._closeClickListener=()=>this.onCloseClick(),this._closeTouchStartListener=()=>this.onCloseTouchStart(),this._dragStartListener=(t,e)=>this.onDragStart(t,e),this._contentItemDestroyListener=()=>this.onContentItemDestroy(),this._tabTitleChangedListener=t=>this.setTitle(t),this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_tab\"),this._titleElement=document.createElement(\"span\"),this._titleElement.classList.add(\"lm_title\"),this._closeElement=document.createElement(\"div\"),this._closeElement.classList.add(\"lm_close_tab\"),this._element.appendChild(this._titleElement),this._element.appendChild(this._closeElement),e.isClosable?this._closeElement.style.display=\"\":this._closeElement.style.display=\"none\",this.setTitle(e.title),this._componentItem.on(\"titleChanged\",this._tabTitleChangedListener);(null!==(s=e.reorderEnabled)&&void 0!==s?s:this._layoutManager.layoutConfig.settings.reorderEnabled)&&this.enableReorder(),this._element.addEventListener(\"click\",this._tabClickListener,{passive:!0}),this._element.addEventListener(\"touchstart\",this._tabTouchStartListener,{passive:!0}),this._componentItem.isClosable?(this._closeElement.addEventListener(\"click\",this._closeClickListener,{passive:!0}),this._closeElement.addEventListener(\"touchstart\",this._closeTouchStartListener,{passive:!0})):(this._closeElement.remove(),this._closeElement=void 0),this._componentItem.setTab(this),this._layoutManager.emit(\"tabCreated\",this)}get isActive(){return this._isActive}get componentItem(){return this._componentItem}get contentItem(){return this._componentItem}get element(){return this._element}get titleElement(){return this._titleElement}get closeElement(){return this._closeElement}get reorderEnabled(){return void 0!==this._dragListener}set reorderEnabled(t){t!==this.reorderEnabled&&(t?this.enableReorder():this.disableReorder())}setTitle(t){this._titleElement.innerText=t,this._element.title=t}setActive(t){t!==this._isActive&&(this._isActive=t,t?this._element.classList.add(\"lm_active\"):this._element.classList.remove(\"lm_active\"))}destroy(){var t,e;this._closeEvent=void 0,this._focusEvent=void 0,this._dragStartEvent=void 0,this._element.removeEventListener(\"click\",this._tabClickListener),this._element.removeEventListener(\"touchstart\",this._tabTouchStartListener),null===(t=this._closeElement)||void 0===t||t.removeEventListener(\"click\",this._closeClickListener),null===(e=this._closeElement)||void 0===e||e.removeEventListener(\"touchstart\",this._closeTouchStartListener),this._componentItem.off(\"titleChanged\",this._tabTitleChangedListener),this.reorderEnabled&&this.disableReorder(),this._element.remove()}setBlurred(){this._element.classList.remove(\"lm_focused\"),this._titleElement.classList.remove(\"lm_focused\")}setFocused(){this._element.classList.add(\"lm_focused\"),this._titleElement.classList.add(\"lm_focused\")}onDragStart(t,e){if(void 0===this._dragListener)throw new J(\"TODSDLU10093\");if(void 0===this._dragStartEvent)throw new J(\"TODS23309\");this._dragStartEvent(t,e,this._dragListener,this.componentItem)}onContentItemDestroy(){void 0!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=void 0)}onTabClickDown(t){const e=t.target;e!==this._element&&e!==this._titleElement||(0===t.button?this.notifyFocus():1===t.button&&this._componentItem.isClosable&&this.notifyClose())}onTabTouchStart(t){t.target===this._element&&this.notifyFocus()}onCloseClick(){this.notifyClose()}onCloseTouchStart(){this.notifyClose()}notifyClose(){if(void 0===this._closeEvent)throw new J(\"TNC15007\");this._closeEvent(this._componentItem)}notifyFocus(){if(void 0===this._focusEvent)throw new J(\"TNA15007\");this._focusEvent(this._componentItem)}enableReorder(){this._dragListener=new Zt(this._element,[this._titleElement]),this._dragListener.on(\"dragStart\",this._dragStartListener),this._componentItem.on(\"destroy\",this._contentItemDestroyListener)}disableReorder(){if(void 0===this._dragListener)throw new J(\"TDR87745\");this._componentItem.off(\"destroy\",this._contentItemDestroyListener),this._dragListener.off(\"dragStart\",this._dragStartListener),this._dragListener=void 0}}class Qt{constructor(t,e,i,n,o){this._layoutManager=t,this._componentRemoveEvent=e,this._componentFocusEvent=i,this._componentDragStartEvent=n,this._dropdownActiveChangedEvent=o,this._tabs=[],this._lastVisibleTabIndex=-1,this._dropdownActive=!1,this._element=document.createElement(\"section\"),this._element.classList.add(\"lm_tabs\"),this._dropdownElement=document.createElement(\"section\"),this._dropdownElement.classList.add(\"lm_tabdropdown_list\"),this._dropdownElement.style.display=\"none\"}get tabs(){return this._tabs}get tabCount(){return this._tabs.length}get lastVisibleTabIndex(){return this._lastVisibleTabIndex}get element(){return this._element}get dropdownElement(){return this._dropdownElement}get dropdownActive(){return this._dropdownActive}destroy(){for(let t=0;tthis.handleTabCloseEvent(t)),(t=>this.handleTabFocusEvent(t)),((t,e,i,n)=>this.handleTabDragStartEvent(t,e,i,n)));void 0===e&&(e=this._tabs.length),this._tabs.splice(e,0,i),ethis._lastVisibleTabIndex){const t=this._tabs[e];for(let t=e;t>0;t--)this._tabs[t]=this._tabs[t-1];this._tabs[0]=t}}updateTabSizes(t,e){let i=!1;this.tryUpdateTabSizes(i,t,e)||(i=!0,this.tryUpdateTabSizes(i,t,e)),i!==this._dropdownActive&&(this._dropdownActive=i,this._dropdownActiveChangedEvent())}tryUpdateTabSizes(t,e,i){if(this._tabs.length>0){if(void 0===i)throw new Error(\"non-empty tabs must have active component item\");let n=0,o=!1;const s=this._layoutManager.layoutConfig.settings.tabOverlapAllowance,r=this._tabs.indexOf(i.tab),a=this._tabs[r];this._lastVisibleTabIndex=-1;for(let i=0;ie){if(o)i===r&&(l.style.zIndex=\"auto\",l.style.marginLeft=\"\",l.parentElement!==this._element&&this._element.appendChild(l));else{let t;if(t=r>0&&r<=i?(d-e)/(i-1):(d-e)/i,tthis.onClick(t),this._touchStartListener=t=>this.onTouchStart(t),this._rowColumnClosable=!0,this._closeButton=null,this._popoutButton=null,this._tabsContainer=new Qt(this._layoutManager,(t=>this.handleTabInitiatedComponentRemoveEvent(t)),(t=>this.handleTabInitiatedComponentFocusEvent(t)),((t,e,i,n)=>this.handleTabInitiatedDragStartEvent(t,e,i,n)),(()=>this.processTabDropdownActiveChanged())),this._show=i.show,this._popoutEnabled=i.popoutEnabled,this._popoutLabel=i.popoutLabel,this._maximiseEnabled=i.maximiseEnabled,this._maximiseLabel=i.maximiseLabel,this._minimiseEnabled=i.minimiseEnabled,this._minimiseLabel=i.minimiseLabel,this._closeEnabled=i.closeEnabled,this._closeLabel=i.closeLabel,this._tabDropdownEnabled=i.tabDropdownEnabled,this._tabDropdownLabel=i.tabDropdownLabel,this.setSide(i.side),this._canRemoveComponent=this._configClosable,this._element=document.createElement(\"section\"),this._element.classList.add(\"lm_header\"),this._controlsContainerElement=document.createElement(\"section\"),this._controlsContainerElement.classList.add(\"lm_controls\"),this._element.appendChild(this._tabsContainer.element),this._element.appendChild(this._controlsContainerElement),this._element.appendChild(this._tabsContainer.dropdownElement),this._element.addEventListener(\"click\",this._clickListener,{passive:!0}),this._element.addEventListener(\"touchstart\",this._touchStartListener,{passive:!0}),this._documentMouseUpListener=()=>this._tabsContainer.hideAdditionalTabsDropdown(),globalThis.document.addEventListener(\"mouseup\",this._documentMouseUpListener,{passive:!0}),this._tabControlOffset=this._layoutManager.layoutConfig.settings.tabControlOffset,this._tabDropdownEnabled&&(this._tabDropdownButton=new Kt(this,this._tabDropdownLabel,\"lm_tabdropdown\",(()=>this._tabsContainer.showAdditionalTabsDropdown()))),this._popoutEnabled&&(this._popoutButton=new Kt(this,this._popoutLabel,\"lm_popout\",(()=>this.handleButtonPopoutEvent()))),this._maximiseEnabled&&(this._maximiseButton=new Kt(this,this._maximiseLabel,\"lm_maximise\",(t=>this.handleButtonMaximiseToggleEvent(t)))),this._configClosable&&(this._closeButton=new Kt(this,this._closeLabel,\"lm_close\",(()=>s()))),this.processTabDropdownActiveChanged()}get show(){return this._show}get side(){return this._side}get leftRightSided(){return this._leftRightSided}get layoutManager(){return this._layoutManager}get parent(){return this._parent}get tabs(){return this._tabsContainer.tabs}get lastVisibleTabIndex(){return this._tabsContainer.lastVisibleTabIndex}get element(){return this._element}get tabsContainerElement(){return this._tabsContainer.element}get controlsContainerElement(){return this._controlsContainerElement}destroy(){this.emit(\"destroy\"),this._popoutEvent=void 0,this._maximiseToggleEvent=void 0,this._clickEvent=void 0,this._touchStartEvent=void 0,this._componentRemoveEvent=void 0,this._componentFocusEvent=void 0,this._componentDragStartEvent=void 0,this._tabsContainer.destroy(),globalThis.document.removeEventListener(\"mouseup\",this._documentMouseUpListener),this._element.remove()}createTab(t,e){this._tabsContainer.createTab(t,e)}removeTab(t){this._tabsContainer.removeTab(t)}processActiveComponentChanged(t){this._tabsContainer.processActiveComponentChanged(t),this.updateTabSizes()}setSide(t){this._side=t,this._leftRightSided=[nt.right,nt.left].includes(this._side)}setRowColumnClosable(t){this._rowColumnClosable=t,this.updateClosability()}updateClosability(){let t;if(this._configClosable)if(this._rowColumnClosable){t=!0;const e=this.tabs.length;for(let i=0;i1}applyFocusedValue(t){t?this._element.classList.add(\"lm_focused\"):this._element.classList.remove(\"lm_focused\")}processMaximised(){if(void 0===this._maximiseButton)throw new J(\"HPMAX16997\");this._maximiseButton.element.setAttribute(\"title\",this._minimiseLabel)}processMinimised(){if(void 0===this._maximiseButton)throw new J(\"HPMIN16997\");this._maximiseButton.element.setAttribute(\"title\",this._maximiseLabel)}updateTabSizes(){if(this._tabsContainer.tabCount>0){const t=this._show?this._layoutManager.layoutConfig.dimensions.headerHeight:0;let e;this._leftRightSided?(this._element.style.height=\"\",this._element.style.width=zt(t)):(this._element.style.width=\"\",this._element.style.height=zt(t)),e=this._leftRightSided?this._element.offsetHeight-this._controlsContainerElement.offsetHeight-this._tabControlOffset:this._element.offsetWidth-this._controlsContainerElement.offsetWidth-this._tabControlOffset,this._tabsContainer.updateTabSizes(e,this._getActiveComponentItemEvent())}}handleTabInitiatedComponentRemoveEvent(t){if(this._canRemoveComponent){if(void 0===this._componentRemoveEvent)throw new J(\"HHTCE22294\");this._componentRemoveEvent(t)}}handleTabInitiatedComponentFocusEvent(t){if(void 0===this._componentFocusEvent)throw new J(\"HHTAE22294\");this._componentFocusEvent(t)}handleTabInitiatedDragStartEvent(t,e,i,n){if(this._canRemoveComponent){if(void 0===this._componentDragStartEvent)throw new J(\"HHTDSE22294\");this._componentDragStartEvent(t,e,i,n)}else i.cancelDrag()}processTabDropdownActiveChanged(){void 0!==this._tabDropdownButton&&Dt(this._tabDropdownButton.element,this._tabsContainer.dropdownActive)}handleButtonPopoutEvent(){if(this._layoutManager.layoutConfig.settings.popoutWholeStack){if(void 0===this._popoutEvent)throw new J(\"HHBPOE17834\");this._popoutEvent()}else{const t=this._getActiveComponentItemEvent();t&&t.popout()}}handleButtonMaximiseToggleEvent(t){if(void 0===this._maximiseToggleEvent)throw new J(\"HHBMTE16834\");this._maximiseToggleEvent()}onClick(t){t.target===this._element&&this.notifyClick(t)}onTouchStart(t){t.target===this._element&&this.notifyTouchStart(t)}notifyClick(t){if(void 0===this._clickEvent)throw new J(\"HNHC46834\");this._clickEvent(t)}notifyTouchStart(t){if(void 0===this._touchStartEvent)throw new J(\"HNHTS46834\");this._touchStartEvent(t)}}class ee extends $t{constructor(t,e,i){var n,o,s,r,a,l,h,d,c,m,u,p,g,f,v,_,y,C,w;super(t,e,i,ee.createElement(document)),this._headerSideChanged=!1,this._resizeListener=()=>this.handleResize(),this._maximisedListener=()=>this.handleMaximised(),this._minimisedListener=()=>this.handleMinimised(),this._headerConfig=e.header;const I=t.layoutConfig.header,b=e.content;let S;if(1!==b.length)S=void 0;else{S=b[0].header}this._initialWantMaximise=e.maximised,this._initialActiveItemIndex=null!==(n=e.activeItemIndex)&&void 0!==n?n:0;const E=null!==(r=null!==(s=null===(o=this._headerConfig)||void 0===o?void 0:o.show)&&void 0!==s?s:null==S?void 0:S.show)&&void 0!==r?r:I.show,x=null!==(h=null!==(l=null===(a=this._headerConfig)||void 0===a?void 0:a.popout)&&void 0!==l?l:null==S?void 0:S.popout)&&void 0!==h?h:I.popout,L=null!==(m=null!==(c=null===(d=this._headerConfig)||void 0===d?void 0:d.maximise)&&void 0!==c?c:null==S?void 0:S.maximise)&&void 0!==m?m:I.maximise,z=null!==(g=null!==(p=null===(u=this._headerConfig)||void 0===u?void 0:u.close)&&void 0!==p?p:null==S?void 0:S.close)&&void 0!==g?g:I.close,M=null!==(_=null!==(v=null===(f=this._headerConfig)||void 0===f?void 0:f.minimise)&&void 0!==v?v:null==S?void 0:S.minimise)&&void 0!==_?_:I.minimise,P=null!==(w=null!==(C=null===(y=this._headerConfig)||void 0===y?void 0:y.tabDropdown)&&void 0!==C?C:null==S?void 0:S.tabDropdown)&&void 0!==w?w:I.tabDropdown;this._maximisedEnabled=!1!==L;const T={show:!1!==E,side:!1===E?nt.top:E,popoutEnabled:!1!==x,popoutLabel:!1===x?\"\":x,maximiseEnabled:this._maximisedEnabled,maximiseLabel:!1===L?\"\":L,closeEnabled:!1!==z,closeLabel:!1===z?\"\":z,minimiseEnabled:!0,minimiseLabel:M,tabDropdownEnabled:!1!==P,tabDropdownLabel:!1===P?\"\":P};this._header=new te(t,this,T,e.isClosable&&!1!==z,(()=>this.getActiveComponentItem()),(()=>this.remove()),(()=>this.handlePopoutEvent()),(()=>this.toggleMaximise()),(t=>this.handleHeaderClickEvent(t)),(t=>this.handleHeaderTouchStartEvent(t)),(t=>this.handleHeaderComponentRemoveEvent(t)),(t=>this.handleHeaderComponentFocusEvent(t)),((t,e,i,n)=>this.handleHeaderComponentStartDragEvent(t,e,i,n))),this.isStack=!0,this._childElementContainer=document.createElement(\"section\"),this._childElementContainer.classList.add(\"lm_items\"),this.on(\"resize\",this._resizeListener),this._maximisedEnabled&&(this.on(\"maximised\",this._maximisedListener),this.on(\"minimised\",this._minimisedListener)),this.element.appendChild(this._header.element),this.element.appendChild(this._childElementContainer),this.setupHeaderPosition(),this._header.updateClosability()}get childElementContainer(){return this._childElementContainer}get header(){return this._header}get headerShow(){return this._header.show}get headerSide(){return this._header.side}get headerLeftRightSided(){return this._header.leftRightSided}get contentAreaDimensions(){return this._contentAreaDimensions}get initialWantMaximise(){return this._initialWantMaximise}get isMaximised(){return this===this.layoutManager.maximisedStack}get stackParent(){if(!this.parent)throw new Error(\"Stack should always have a parent\");return this.parent}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}init(){if(!0===this.isInitialised)return;this.updateNodeSize();for(let t=0;t0){if(this._initialActiveItemIndex<0||this._initialActiveItemIndex>=e)throw new Error(`ActiveItemIndex out of range: ${this._initialActiveItemIndex} id: ${this.id}`);for(let i=0;ithis.contentItems.length)throw e-=1,new X(\"SAC99728\");if(t instanceof jt)return e=super.addChild(t,e),this._childElementContainer.appendChild(t.element),this._header.createTab(t,e),this.setActiveComponentItem(t,i),this._header.updateTabSizes(),this.updateSize(!1),t.container.setBaseLogicalZIndex(),this._header.updateClosability(),this.emitStateChangedEvent(),e;throw new X(\"SACC88532\")}removeChild(t,e){const i=t,n=this.contentItems.indexOf(i),o=1===this.contentItems.length;if(this._activeComponentItem===i&&(i.focused&&i.blur(),!o)){const t=0===n?1:n-1;this.setActiveComponentItem(this.contentItems[t],!1)}this._header.removeTab(i),super.removeChild(i,e),o||this._header.updateClosability(),this.emitStateChangedEvent()}toggleMaximise(){this.isMaximised?this.minimise():this.maximise()}maximise(){if(!this.isMaximised){this.layoutManager.setMaximisedStack(this);const t=this.contentItems,e=t.length;for(let i=0;i0&&void 0===t)throw new Error(\"expected non-empty stack to have an active component item\");return{type:\"stack\",content:this.calculateConfigContent(),size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,isClosable:this.isClosable,maximised:this.isMaximised,header:this.createHeaderConfig(),activeItemIndex:t}}onDrop(t,e){if(\"header\"===this._dropSegment){if(this.resetHeaderDropZone(),void 0===this._dropIndex)throw new J(\"SODDI68990\");return void this.addChild(t,this._dropIndex)}if(\"body\"===this._dropSegment)return void this.addChild(t,0,!0);const i=\"top\"===this._dropSegment||\"bottom\"===this._dropSegment,n=\"left\"===this._dropSegment||\"right\"===this._dropSegment,o=\"top\"===this._dropSegment||\"left\"===this._dropSegment,s=i&&this.stackParent.isColumn||n&&this.stackParent.isRow;if(t.isComponent){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createAndInitContentItem(e,this);i.addChild(t),t=i}if(t.type===at.row||t.type===at.column){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}if(s){const e=this.stackParent.contentItems.indexOf(this);this.stackParent.addChild(t,o?e:e+1,!0),this.size*=.5,t.size=this.size,t.sizeUnit=this.sizeUnit,this.stackParent.updateSize(!1)}else{const e=i?at.column:at.row,n=ct.createDefault(e),s=this.layoutManager.createContentItem(n,this);this.stackParent.replaceChild(this,s),s.addChild(t,o?0:void 0,!0),s.addChild(this,o?void 0:0,!0),this.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}highlightDropZone(t,e){for(const i in this._contentAreaDimensions){const n=i,o=this._contentAreaDimensions[n].hoverArea;if(o.x1t&&o.y1e)return void(\"header\"===n?(this._dropSegment=\"header\",this.highlightHeaderDropZone(this._header.leftRightSided?e:t)):(this.resetHeaderDropZone(),this.highlightBodyDropZone(n)))}}getArea(){if(\"none\"===this.element.style.display)return null;const t=super.getElementArea(this._header.element),e=super.getElementArea(this._childElementContainer);if(null===t||null===e)throw new K(\"SGAHC13086\");const i=e.x2-e.x1,n=e.y2-e.y1;return this._contentAreaDimensions={header:{hoverArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2},highlightArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2}}},0===this.contentItems.length?(this._contentAreaDimensions.body={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2}},super.getElementArea(this.element)):(this._contentAreaDimensions.left={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x1+.25*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x1+.5*i,y2:e.y2}},this._contentAreaDimensions.top={hoverArea:{x1:e.x1+.25*i,y1:e.y1,x2:e.x1+.75*i,y2:e.y1+.5*n},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y1+.5*n}},this._contentAreaDimensions.right={hoverArea:{x1:e.x1+.75*i,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1+.5*i,y1:e.y1,x2:e.x2,y2:e.y2}},this._contentAreaDimensions.bottom={hoverArea:{x1:e.x1+.25*i,y1:e.y1+.5*n,x2:e.x1+.75*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1+.5*n,x2:e.x2,y2:e.y2}},super.getElementArea(this.element))}positionHeader(t){this._header.side!==t&&(this._header.setSide(t),this._headerSideChanged=!0,this.setupHeaderPosition())}updateNodeSize(){if(\"none\"!==this.element.style.display){const t=kt(this.element);if(this._header.show){t[this._header.leftRightSided?it.width:it.height]-=this.layoutManager.layoutConfig.dimensions.headerHeight}this._childElementContainer.style.width=zt(t.width),this._childElementContainer.style.height=zt(t.height);for(let e=0;e=o&&tthis.onDrag(t,e,i))),this._dragListener.on(\"dragStop\",(()=>this.onDrop())),this.createDragProxyElements(t,e),null===this._componentItem.parent)throw new K(\"DPC10097\");this._componentItemFocused=this._componentItem.focused,this._componentItemFocused&&this._componentItem.blur(),this._componentItem.parent.removeChild(this._componentItem,!0),this.setDimensions(),document.body.appendChild(this._element),this.determineMinMaxXY(),this._layoutManager.calculateItemAreas(),this.setDropPosition(t,e)}get element(){return this._element}createDragProxyElements(t,e){this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_dragProxy\");const i=document.createElement(\"div\");i.classList.add(\"lm_header\");const n=document.createElement(\"div\");n.classList.add(\"lm_tabs\");const o=document.createElement(\"div\");o.classList.add(\"lm_tab\");const s=document.createElement(\"span\");s.classList.add(\"lm_title\"),o.appendChild(s),n.appendChild(o),i.appendChild(n),this._proxyContainerElement=document.createElement(\"div\"),this._proxyContainerElement.classList.add(\"lm_content\"),this._element.appendChild(i),this._element.appendChild(this._proxyContainerElement),this._originalParent instanceof ee&&this._originalParent.headerShow&&(this._sided=this._originalParent.headerLeftRightSided,this._element.classList.add(\"lm_\"+this._originalParent.headerSide),[nt.right,nt.bottom].indexOf(this._originalParent.headerSide)>=0&&this._proxyContainerElement.insertAdjacentElement(\"afterend\",i)),this._element.style.left=zt(t),this._element.style.top=zt(e),o.setAttribute(\"title\",this._componentItem.title),s.insertAdjacentText(\"afterbegin\",this._componentItem.title),this._proxyContainerElement.appendChild(this._componentItem.element)}determineMinMaxXY(){const t=this._layoutManager.groundItem;if(void 0===t)throw new J(\"DPDMMXY73109\");{const e=t.element.getBoundingClientRect();this._minX=e.left+document.body.scrollLeft,this._minY=e.top+document.body.scrollTop,this._maxX=this._minX+e.width,this._maxY=this._minY+e.height}}onDrag(t,e,i){const n=i.pageX,o=i.pageY;this.setDropPosition(n,o),this._componentItem.drag()}setDropPosition(t,e){this._layoutManager.layoutConfig.settings.constrainDragToContainer&&(t<=this._minX?t=Math.ceil(this._minX):t>=this._maxX&&(t=Math.floor(this._maxX)),e<=this._minY?e=Math.ceil(this._minY):e>=this._maxY&&(e=Math.floor(this._maxY))),this._element.style.left=zt(t),this._element.style.top=zt(e),this._area=this._layoutManager.getArea(t,e),null!==this._area&&(this._lastValidArea=this._area,this._area.contentItem.highlightDropZone(t,e,this._area))}onDrop(){const t=this._layoutManager.dropTargetIndicator;if(null===t)throw new K(\"DPOD30011\");let e;if(t.hide(),this._componentItem.exitDragMode(),null!==this._area)e=this._componentItem,this._area.contentItem.onDrop(e,this._area);else if(null!==this._lastValidArea){e=this._componentItem;this._lastValidArea.contentItem.onDrop(e,this._lastValidArea)}else this._originalParent?(e=this._componentItem,this._originalParent.addChild(e)):this._componentItem.destroy();this._element.remove(),this._layoutManager.emit(\"itemDropped\",this._componentItem),this._componentItemFocused&&void 0!==e&&e.focus()}setDimensions(){const t=this._layoutManager.layoutConfig.dimensions;if(void 0===t)throw new Error(\"DragProxy.setDimensions: dimensions undefined\");let e=t.dragProxyWidth,i=t.dragProxyHeight;if(void 0===e||void 0===i)throw new Error(\"DragProxy.setDimensions: width and/or height undefined\");const n=!1===this._layoutManager.layoutConfig.header.show?0:t.headerHeight;this._element.style.width=zt(e),this._element.style.height=zt(i),e-=this._sided?n:0,i-=this._sided?0:n,this._proxyContainerElement.style.width=zt(e),this._proxyContainerElement.style.height=zt(i),this._componentItem.enterDragMode(e,i),this._componentItem.show()}}class ne{constructor(t,e,i,n,o,s,r){this._layoutManager=t,this._element=e,this._extraAllowableChildTargets=i,this._componentTypeOrFtn=n,this._componentState=o,this._title=s,this._id=r,this._dragListener=null,this._dummyGroundContainer=document.createElement(\"div\");const a=gt.createDefault(\"row\");this._dummyGroundContentItem=new Yt(this._layoutManager,a,this._dummyGroundContainer),this.createDragListener()}destroy(){this.removeDragListener()}createDragListener(){this.removeDragListener(),this._dragListener=new Zt(this._element,this._extraAllowableChildTargets),this._dragListener.on(\"dragStart\",((t,e)=>this.onDragStart(t,e))),this._dragListener.on(\"dragStop\",(()=>this.onDragStop()))}onDragStart(t,e){var i;const n=\"component\";let o;if(\"function\"==typeof this._componentTypeOrFtn){const t=this._componentTypeOrFtn();o=ne.isDragSourceComponentItemConfig(t)?{type:n,componentState:t.state,componentType:t.type,title:null!==(i=t.title)&&void 0!==i?i:this._title}:t}else o={type:n,componentState:this._componentState,componentType:this._componentTypeOrFtn,title:this._title,id:this._id};const s=bt.resolve(o,!1),r=new jt(this._layoutManager,s,this._dummyGroundContentItem);if(this._dummyGroundContentItem.contentItems.push(r),null===this._dragListener)throw new K(\"DSODSD66746\");{const i=new ie(t,e,this._dragListener,this._layoutManager,r,this._dummyGroundContentItem),n=this._layoutManager.transitionIndicator;if(null===n)throw new K(\"DSODST66746\");n.transitionElements(this._element,i.element)}}onDragStop(){this.createDragListener()}removeDragListener(){null!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=null)}}!function(t){t.isDragSourceComponentItemConfig=function(t){return!(\"componentType\"in t)}}(ne||(ne={}));class oe{constructor(){this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_dropTargetIndicator\");const t=document.createElement(\"div\");t.classList.add(\"lm_inner\"),this._element.appendChild(t),document.body.appendChild(this._element)}destroy(){this._element.remove()}highlightArea(t,e){this._element.style.left=zt(t.x1+e),this._element.style.top=zt(t.y1+e),this._element.style.width=zt(t.x2-t.x1-e),this._element.style.height=zt(t.y2-t.y1-e),this._element.style.display=\"block\"}hide(){Dt(this._element,!1)}}class se{constructor(){this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_transition_indicator\"),document.body.appendChild(this._element),this._toElement=null,this._fromDimensions=null,this._totalAnimationDuration=200,this._animationStartTime=null}destroy(){this._element.remove()}transitionElements(t,e){}nextAnimationFrame(){}measure(t){const e=t.getBoundingClientRect();return{left:e.left,top:e.top,width:t.offsetWidth,height:t.offsetHeight}}}class re extends Wt{constructor(t){super(),this._layoutManager=t,this._childEventListener=t=>this.onEventFromChild(t),globalThis.addEventListener(re.ChildEventName,this._childEventListener,{passive:!0})}emit(t,...e){\"userBroadcast\"===t?this.emitUserBroadcast(...e):super.emit(t,...e)}emitUserBroadcast(...t){this.handleUserBroadcastEvent(\"userBroadcast\",t)}destroy(){globalThis.removeEventListener(re.ChildEventName,this._childEventListener)}handleUserBroadcastEvent(t,e){this._layoutManager.isSubWindow?this.propagateToParent(t,e):this.propagateToThisAndSubtree(t,e)}onEventFromChild(t){const e=t.detail;this.handleUserBroadcastEvent(e.eventName,e.args)}propagateToParent(t,e){const i={bubbles:!0,cancelable:!0,detail:{layoutManager:this._layoutManager,eventName:t,args:e}},n=new CustomEvent(re.ChildEventName,i),o=globalThis.opener;if(null===o)throw new K(\"EHPTP15778\");o.dispatchEvent(n)}propagateToThisAndSubtree(t,e){this.emitUnknown(t,...e);for(let i=0;ithis.handleContainerResize())),this._windowBeforeUnloadListener=()=>this.onBeforeUnload(),this._windowBeforeUnloadListening=!1,this._maximisedStackBeforeDestroyedListener=t=>this.cleanupBeforeMaximisedStackDestroyed(t),this.isSubWindow=t.isSubWindow,this._constructorOrSubWindowLayoutConfig=t.constructorOrSubWindowLayoutConfig,Q.checkInitialise(),dt.checkInitialise(),void 0!==t.containerElement&&(this._containerElement=t.containerElement)}get container(){return this._containerElement}get isInitialised(){return this._isInitialised}get groundItem(){return this._groundItem}get root(){return this._groundItem}get openPopouts(){return this._openPopouts}get dropTargetIndicator(){return this._dropTargetIndicator}get transitionIndicator(){return this._transitionIndicator}get width(){return this._width}get height(){return this._height}get eventHub(){return this._eventHub}get rootItem(){if(void 0===this._groundItem)throw new Error(\"Cannot access rootItem before init\");return 0===this._groundItem.contentItems.length?void 0:this._groundItem.contentItems[0]}get focusedComponentItem(){return this._focusedComponentItem}get tabDropPlaceholder(){return this._tabDropPlaceholder}get maximisedStack(){return this._maximisedStack}get deprecatedConstructor(){return!this.isSubWindow&&void 0!==this._constructorOrSubWindowLayoutConfig}destroy(){if(this._isInitialised){this._windowBeforeUnloadListening&&(globalThis.removeEventListener(\"beforeunload\",this._windowBeforeUnloadListener),this._windowBeforeUnloadListening=!1),!0===this.layoutConfig.settings.closePopoutsOnUnload&&this.closeAllOpenPopouts(),this._resizeObserver.disconnect(),this.checkClearResizeTimeout(),void 0!==this._groundItem&&this._groundItem.destroy(),this._tabDropPlaceholder.remove(),null!==this._dropTargetIndicator&&this._dropTargetIndicator.destroy(),null!==this._transitionIndicator&&this._transitionIndicator.destroy(),this._eventHub.destroy();for(const t of this._dragSources)t.destroy();this._dragSources=[],this._isInitialised=!1}}minifyConfig(t){return _t.minifyConfig(t)}unminifyConfig(t){return _t.unminifyConfig(t)}init(){let t;if(this.setContainer(),this._dropTargetIndicator=new oe,this._transitionIndicator=new se,this.updateSizeFromContainer(),this.isSubWindow){if(void 0===this._constructorOrSubWindowLayoutConfig)throw new J(\"LMIU07155\");{const e=this._constructorOrSubWindowLayoutConfig.root;if(void 0===e)throw new X(\"LMIC07156\");if(!Ct.isComponent(e))throw new X(\"LMIC07157\");t=e;const i=xt.resolve(this._constructorOrSubWindowLayoutConfig);this.layoutConfig=Object.assign(Object.assign({},i),{root:void 0})}}else void 0===this._constructorOrSubWindowLayoutConfig?this.layoutConfig=_t.createDefault():this.layoutConfig=xt.resolve(this._constructorOrSubWindowLayoutConfig);const e=this.layoutConfig;this._groundItem=new Yt(this,e.root,this._containerElement),this._groundItem.init(),this.checkLoadedLayoutMaximiseItem(),this._resizeObserver.observe(this._containerElement),this._isInitialised=!0,this.adjustColumnsResponsive(),this.emit(\"initialised\"),void 0!==t&&this.loadComponentAsRoot(t)}loadLayout(t){if(!this.isInitialised)throw new Error(\"GoldenLayout: Need to call init() if LayoutConfig with defined root passed to constructor\");if(void 0===this._groundItem)throw new J(\"LMLL11119\");this.createSubWindows(),this.layoutConfig=xt.resolve(t),this._groundItem.loadRoot(this.layoutConfig.root),this.checkLoadedLayoutMaximiseItem(),this.adjustColumnsResponsive()}saveLayout(){if(!1===this._isInitialised)throw new Error(\"Can't create config, layout not yet initialised\");if(void 0===this._groundItem)throw new J(\"LMTC18244\");{const t=this._groundItem.calculateConfigContent();let e;e=1!==t.length?void 0:t[0],this.reconcilePopoutWindows();const i=[];for(let t=0;t=0?n=this._groundItem.contentItems[0]:e=0;break;case at.row:case at.column:e=n.addItem(t,i.index);break;case at.stack:if(Ct.isComponent(t)){e=n.addItem(t,i.index);break}throw Error(tt[6]);case at.component:throw new X(\"LMAIALC87444602\");default:throw new Y(\"LMAIALU98881733\",n.type)}if(Ct.isComponent(t)){const t=n.contentItems[e];Gt.isStack(t)&&(n=t,e=0)}return i.parentItem=n,i.index=e,i}}}loadComponentAsRoot(t){if(void 0===this._groundItem)throw new Error(\"Cannot add item before init\");this._groundItem.loadComponentAsRoot(t)}updateSize(t,e){this.setSize(t,e)}setSize(t,e){if(this._width=t,this._height=e,!0===this._isInitialised){if(void 0===this._groundItem)throw new J(\"LMUS18881\");if(this._groundItem.setSize(this._width,this._height),this._maximisedStack){const{width:t,height:e}=kt(this._containerElement);Tt(this._maximisedStack.element,t),At(this._maximisedStack.element,e),this._maximisedStack.updateSize(!1)}this.adjustColumnsResponsive()}}beginSizeInvalidation(){this._sizeInvalidationBeginCount++}endSizeInvalidation(){0==--this._sizeInvalidationBeginCount&&this.updateSizeFromContainer()}updateSizeFromContainer(){const{width:t,height:e}=kt(this._containerElement);this.setSize(t,e)}updateRootSize(t=!1){if(void 0===this._groundItem)throw new J(\"LMURS28881\");this._groundItem.updateSize(t)}createAndInitContentItem(t,e){const i=this.createContentItem(t,e);return i.init(),i}createContentItem(t,e){if(\"string\"!=typeof t.type)throw new G(\"Missing parameter 'type'\",JSON.stringify(t));if(ct.isComponentItem(t)&&!(e instanceof ee)&&e&&!(!0===this.isSubWindow&&e instanceof Yt)){t={type:at.stack,content:[t],size:t.size,sizeUnit:t.sizeUnit,minSize:t.minSize,minSizeUnit:t.minSizeUnit,id:t.id,maximised:t.maximised,isClosable:t.isClosable,activeItemIndex:0,header:void 0}}return this.createContentItemFromConfig(t,e)}findFirstComponentItemById(t){if(void 0===this._groundItem)throw new J(\"LMFFCIBI82446\");return this.findFirstContentItemTypeByIdRecursive(at.component,t,this._groundItem)}createPopout(t,e,i,n){return t instanceof Gt?this.createPopoutFromContentItem(t,e,i,n):this.createPopoutFromItemConfig(t,e,i,n)}createPopoutFromContentItem(t,e,i,n){let o=t.parent,s=t;for(;null!==o&&1===o.contentItems.length&&!o.isGround;)s=o,o=o.parent;if(null===o)throw new K(\"LMCPFCI00834\");{if(void 0===n&&(n=o.contentItems.indexOf(s)),null!==i&&o.addPopInParentId(i),void 0===e){const i=globalThis.screenX||globalThis.screenLeft,n=globalThis.screenY||globalThis.screenTop,o=t.element.offsetLeft,s=t.element.offsetTop,{width:r,height:a}=kt(t.element);e={left:i+o,top:n+s,width:r,height:a}}const r=t.toConfig();if(t.remove(),ft.isRootItemConfig(r))return this.createPopoutFromItemConfig(r,e,i,n);throw new Error(`${tt[0]}`)}}beginVirtualSizedContainerAdding(){0==++this._virtualSizedContainerAddingBeginCount&&(this._virtualSizedContainers.length=0)}addVirtualSizedContainer(t){this._virtualSizedContainers.push(t)}endVirtualSizedContainerAdding(){if(0==--this._virtualSizedContainerAddingBeginCount){const t=this._virtualSizedContainers.length;if(t>0){this.fireBeforeVirtualRectingEvent(t);for(let e=0;ethis.emit(\"windowOpened\",a))),a.on(\"closed\",(()=>this.reconcilePopoutWindows())),this._openPopouts.push(a),this.layoutConfig.settings.closePopoutsOnUnload&&!this._windowBeforeUnloadListening&&(globalThis.addEventListener(\"beforeunload\",this._windowBeforeUnloadListener,{passive:!0}),this._windowBeforeUnloadListening=!0),a}closeAllOpenPopouts(){for(let t=0;tglobalThis.close()),1)}getArea(t,e){let i=null,n=1/0;for(let o=0;o=s.x1&&t=s.y1&&es.surface&&(n=s.surface,i=s)}return i}calculateItemAreas(){const t=this.getAllContentItems(),e=this._groundItem;if(void 0===e)throw new J(\"LMCIAR44365\");if(1!==t.length){e.contentItems[0].isStack?this._itemAreas=[]:this._itemAreas=e.createSideAreas();for(let e=0;e0){let e=t[0];if(Gt.isComponentItem(e)){const t=e.parent;if(null===t)throw new K(\"LMXLLMI69999\");e=t}if(!Gt.isStack(e))throw new X(\"LMCLLMI19993\");e.maximise()}}}processMaximiseStack(t){if(this._maximisedStack=t,t.on(\"beforeItemDestroyed\",this._maximisedStackBeforeDestroyedListener),t.element.classList.add(\"lm_maximised\"),t.element.insertAdjacentElement(\"afterend\",this._maximisePlaceholder),void 0===this._groundItem)throw new J(\"LMMXI19993\");{this._groundItem.element.prepend(t.element);const{width:e,height:i}=kt(this._containerElement);Tt(t.element,e),At(t.element,i),t.updateSize(!0),t.focusActiveContentItem(),this._maximisedStack.emit(\"maximised\"),this.emit(\"stateChanged\")}}processMinimiseMaximisedStack(){if(void 0===this._maximisedStack)throw new X(\"LMMMS74422\");{const t=this._maximisedStack;if(null===t.parent)throw new K(\"LMMI13668\");t.element.classList.remove(\"lm_maximised\"),this._maximisePlaceholder.insertAdjacentElement(\"afterend\",t.element),this._maximisePlaceholder.remove(),this.updateRootSize(!0),this._maximisedStack=void 0,t.off(\"beforeItemDestroyed\",this._maximisedStackBeforeDestroyedListener),t.emit(\"minimised\"),this.emit(\"stateChanged\")}}reconcilePopoutWindows(){const t=[];for(let e=0;e{this._resizeTimeoutId=void 0,this.beginSizeInvalidation(),this.endSizeInvalidation()}),this.resizeDebounceInterval))}checkClearResizeTimeout(){void 0!==this._resizeTimeoutId&&(clearTimeout(this._resizeTimeoutId),this._resizeTimeoutId=void 0)}setContainer(){var t;const e=document.body,i=null!==(t=this._containerElement)&&void 0!==t?t:e;if(i===e){this.resizeWithContainerAutomatically=!0;const t=document.documentElement;t.style.height=\"100%\",t.style.margin=\"0\",t.style.padding=\"0\",t.style.overflow=\"clip\",e.style.height=\"100%\",e.style.margin=\"0\",e.style.padding=\"0\",e.style.overflow=\"clip\"}this._containerElement=i}onBeforeUnload(){this.destroy()}adjustColumnsResponsive(){if(void 0===this._groundItem)throw new J(\"LMACR20883\");if(this._firstLoad=!1,this.useResponsiveLayout()&&!this._updatingColumnsResponsive&&this._groundItem.contentItems.length>0&&this._groundItem.contentItems[0].isRow){if(void 0===this._groundItem||null===this._width)throw new J(\"LMACR77412\");{const t=this._groundItem.contentItems[0].contentItems.length;if(t<=1)return;{const e=this.layoutConfig.dimensions.defaultMinItemWidth;if(t*e<=this._width)return;{this._updatingColumnsResponsive=!0;const i=t-Math.max(Math.floor(this._width/e),1),n=this._groundItem.contentItems[0],o=this.getAllStacks();if(0===o.length)throw new X(\"LMACRS77413\");{const t=o[0];for(let e=0;en?void 0:{parentItem:t,index:o}}}case 1:if(void 0===this._focusedComponentItem)return;{const t=this._focusedComponentItem.parentItem;return this.tryCreateLocationFromParentItem(t,e)}case 2:{const t=this.findFirstContentItemType(at.stack);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 3:{let t=this.findFirstContentItemType(at.row);return void 0!==t?this.tryCreateLocationFromParentItem(t,e):(t=this.findFirstContentItemType(at.column),void 0!==t?this.tryCreateLocationFromParentItem(t,e):void 0)}case 4:{const t=this.findFirstContentItemType(at.row);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 5:{const t=this.findFirstContentItemType(at.column);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 6:if(void 0===this._groundItem)throw new J(\"LMFLRIF18244\");return void 0!==this.rootItem?void 0:void 0===e||0===e?{parentItem:this._groundItem,index:0}:void 0;case 7:if(void 0===this._groundItem)throw new J(\"LMFLF18244\");{const t=this._groundItem.contentItems;if(0===t.length)return void 0===e||0===e?{parentItem:this._groundItem,index:0}:void 0;{const i=t[0];return this.tryCreateLocationFromParentItem(i,e)}}}}tryCreateLocationFromParentItem(t,e){const i=t.contentItems.length;return void 0===e?{parentItem:t,index:i}:e<0||e>i?void 0:{parentItem:t,index:e}}}!function(t){t.createMaximisePlaceElement=function(t){const e=t.createElement(\"div\");return e.classList.add(\"lm_maximise_place\"),e},t.createTabDropPlaceholderElement=function(t){const e=t.createElement(\"div\");return e.classList.add(\"lm_drop_tab_placeholder\"),e},t.defaultLocationSelectors=[{typeId:1,index:void 0},{typeId:2,index:void 0},{typeId:3,index:void 0},{typeId:7,index:void 0}],t.afterFocusedItemIfPossibleLocationSelectors=[{typeId:0,index:1},{typeId:2,index:void 0},{typeId:3,index:void 0},{typeId:7,index:void 0}]}(ae||(ae={}));class le extends ae{constructor(t,e,i,n){if(super(le.createLayoutManagerConstructorParameters(t,e)),this._bindComponentEventHanlderPassedInConstructor=!1,this._creationTimeoutPassed=!1,void 0!==e&&\"function\"==typeof e&&(this.bindComponentEvent=e,this._bindComponentEventHanlderPassedInConstructor=!0,void 0!==i&&(this.unbindComponentEvent=i)),!this._bindComponentEventHanlderPassedInConstructor&&this.isSubWindow){if(void 0===this._constructorOrSubWindowLayoutConfig)throw new J(\"VLC98823\");{const t=xt.resolve(this._constructorOrSubWindowLayoutConfig);this.layoutConfig=Object.assign(Object.assign({},t),{root:void 0})}}!0!==n&&(this.deprecatedConstructor||this.init())}destroy(){this.bindComponentEvent=void 0,this.unbindComponentEvent=void 0,super.destroy()}init(){if(this._bindComponentEventHanlderPassedInConstructor||\"loading\"!==document.readyState&&null!==document.body){if(!this._bindComponentEventHanlderPassedInConstructor&&!0===this.isSubWindow&&!this._creationTimeoutPassed)return setTimeout((()=>this.init()),7),void(this._creationTimeoutPassed=!0);!0===this.isSubWindow&&(this._bindComponentEventHanlderPassedInConstructor||this.clearHtmlAndAdjustStylesForSubWindow(),window.__glInstance=this),super.init()}else document.addEventListener(\"DOMContentLoaded\",(()=>this.init()),{passive:!0})}clearHtmlAndAdjustStylesForSubWindow(){const t=document.head,e=new Array(4);e[0]=document.querySelectorAll(\"body link\"),e[1]=document.querySelectorAll(\"body style\"),e[2]=document.querySelectorAll(\"template\"),e[3]=document.querySelectorAll(\".gl_keep\");for(let i=0;ithis.emit(\"popIn\"))),document.body.appendChild(t),!0}}bindComponent(t,e){if(void 0!==this.bindComponentEvent){return this.bindComponentEvent(t,e)}if(void 0!==this.getComponentEvent)return{virtual:!1,component:this.getComponentEvent(t,e)};{const t=`${tt[2]}: ${JSON.stringify(e)}`;throw new Z(t)}}unbindComponent(t,e,i){if(void 0!==this.unbindComponentEvent)this.unbindComponentEvent(t);else if(!e&&void 0!==this.releaseComponentEvent){if(void 0===i)throw new J(\"VCUCRCU333998\");this.releaseComponentEvent(t,i)}}}!function(t){let e=!1;t.createLayoutManagerConstructorParameters=function(t,i){const n=e?null:new URL(document.location.href).searchParams.get(\"gl-window\");e=!0;const o=null!==n;let s,r;if(null!==n){const e=localStorage.getItem(n);if(null===e)throw new Error(\"Null gl-window Config\");localStorage.removeItem(n);const i=JSON.parse(e),o=_t.unminifyConfig(i);r=xt.fromResolved(o),t instanceof HTMLElement&&(s=t)}else void 0===t?r=void 0:t instanceof HTMLElement?(r=void 0,s=t):r=t,void 0===s&&i instanceof HTMLElement&&(s=i);return{constructorOrSubWindowLayoutConfig:r,isSubWindow:o,containerElement:s}}}(le||(le={}));class he extends le{constructor(t,e,i){super(t,e,i,!0),this._componentTypesMap=new Map,this._registeredComponentMap=new Map,this._virtuableComponentMap=new Map,this._containerVirtualRectingRequiredEventListener=(t,e,i)=>this.handleContainerVirtualRectingRequiredEvent(t,e,i),this._containerVirtualVisibilityChangeRequiredEventListener=(t,e)=>this.handleContainerVirtualVisibilityChangeRequiredEvent(t,e),this._containerVirtualZIndexChangeRequiredEventListener=(t,e,i)=>this.handleContainerVirtualZIndexChangeRequiredEvent(t,e,i),this.deprecatedConstructor||this.init()}registerComponent(t,e,i=!1){if(\"function\"!=typeof e)throw new $(\"registerComponent() componentConstructorOrFactoryFtn parameter is not a function\");if(e.hasOwnProperty(\"prototype\")){const n=e;this.registerComponentConstructor(t,n,i)}else{const n=e;this.registerComponentFactoryFunction(t,n,i)}}registerComponentConstructor(t,e,i=!1){if(\"function\"!=typeof e)throw new Error(tt[1]);if(void 0!==this._componentTypesMap.get(t))throw new Z(`${tt[3]}: ${t}`);this._componentTypesMap.set(t,{constructor:e,factoryFunction:void 0,virtual:i})}registerComponentFactoryFunction(t,e,i=!1){if(\"function\"!=typeof e)throw new Z(\"Please register a constructor function\");if(void 0!==this._componentTypesMap.get(t))throw new Z(`${tt[3]}: ${t}`);this._componentTypesMap.set(t,{constructor:void 0,factoryFunction:e,virtual:i})}registerComponentFunction(t){this.registerGetComponentConstructorCallback(t)}registerGetComponentConstructorCallback(t){if(\"function\"!=typeof t)throw new Error(\"Please register a callback function\");void 0!==this._getComponentConstructorFtn&&console.warn(\"Multiple component functions are being registered. Only the final registered function will be used.\"),this._getComponentConstructorFtn=t}getRegisteredComponentTypeNames(){const t=this._componentTypesMap.keys();return Array.from(t)}getComponentInstantiator(t){let e;const i=pt.resolveComponentTypeName(t);return void 0!==i&&(e=this._componentTypesMap.get(i)),void 0===e&&void 0!==this._getComponentConstructorFtn&&(e={constructor:this._getComponentConstructorFtn(t),factoryFunction:void 0,virtual:!1}),e}bindComponent(t,e){let i;const n=pt.resolveComponentTypeName(e);let o;if(void 0!==n&&(i=this._componentTypesMap.get(n)),void 0===i&&void 0!==this._getComponentConstructorFtn&&(i={constructor:this._getComponentConstructorFtn(e),factoryFunction:void 0,virtual:!1}),void 0!==i){const s=i.virtual;let r,a;r=void 0===e.componentState?void 0:Ut({},e.componentState);const l=i.constructor;if(void 0!==l)a=new l(t,r,s);else{const e=i.factoryFunction;if(void 0===e)throw new X(\"LMBCFFU10008\");a=e(t,r,s)}if(s){if(void 0===a)throw new J(\"GLBCVCU988774\");{const e=a,i=e.rootHtmlElement;if(void 0===i)throw new Z(`${tt[5]}: ${n}`);!function(t){const e=\"absolute\";t.style.position!==e&&(t.style.position=e)}(i),this.container.appendChild(i),this._virtuableComponentMap.set(t,e),t.virtualRectingRequiredEvent=this._containerVirtualRectingRequiredEventListener,t.virtualVisibilityChangeRequiredEvent=this._containerVirtualVisibilityChangeRequiredEventListener,t.virtualZIndexChangeRequiredEvent=this._containerVirtualZIndexChangeRequiredEventListener}}this._registeredComponentMap.set(t,a),o={virtual:i.virtual,component:a}}else o=super.bindComponent(t,e);return o}unbindComponent(t,e,i){if(void 0===this._registeredComponentMap.get(t))super.unbindComponent(t,e,i);else{const e=this._virtuableComponentMap.get(t);if(void 0!==e){const i=e.rootHtmlElement;if(void 0===i)throw new X(\"GLUC77743\",t.title);this.container.removeChild(i),this._virtuableComponentMap.delete(t)}}}fireBeforeVirtualRectingEvent(t){this._goldenLayoutBoundingClientRect=this.container.getBoundingClientRect(),super.fireBeforeVirtualRectingEvent(t)}handleContainerVirtualRectingRequiredEvent(t,e,i){const n=this._virtuableComponentMap.get(t);if(void 0===n)throw new J(\"GLHCSCE55933\");{const o=n.rootHtmlElement;if(void 0===o)throw new Z(tt[4]+\" \"+t.title);{const n=t.element.getBoundingClientRect(),s=n.left-this._goldenLayoutBoundingClientRect.left;o.style.left=zt(s);const r=n.top-this._goldenLayoutBoundingClientRect.top;o.style.top=zt(r),Tt(o,e),At(o,i)}}}handleContainerVirtualVisibilityChangeRequiredEvent(t,e){const i=this._virtuableComponentMap.get(t);if(void 0===i)throw new J(\"GLHCVVCRE55934\");{const n=i.rootHtmlElement;if(void 0===n)throw new Z(tt[4]+\" \"+t.title);Dt(n,e)}}handleContainerVirtualZIndexChangeRequiredEvent(t,e,i){const n=this._virtuableComponentMap.get(t);if(void 0===n)throw new J(\"GLHCVZICRE55935\");{const e=n.rootHtmlElement;if(void 0===e)throw new Z(tt[4]+\" \"+t.title);e.style.zIndex=i}}}const de=\"initial_\",ce={show:\"top\",popout:!1,maximise:!1,close:\"close-tab-unused\"},me={headerHeight:31},ue={hasHeaders:!0,reorderEnabled:!0},pe={popoutWholeStack:!1,constrainDragToContainer:!1,constrainDragToHeaders:!1,preventDragout:!1,showMaximiseIcon:!1,showPopoutIcon:!1,showCloseIcon:!1,blockedPopoutsThrowError:!0,closePopoutsOnUnload:!0,selectionEnabled:!1};var ge,fe;class ve{constructor(e){this.layout=e,ge.set(this,void 0),fe.set(this,void 0),this.handleResize=t=>{t.forEach((t=>this.resizeElement(t.target)))},this.handleMutation=()=>{this.layout.viewComponentsByContainerElement.forEach((t=>{this.resizeElement(t.container.element)}))},t.__classPrivateFieldSet(this,ge,new ResizeObserver(this.handleResize),\"f\"),t.__classPrivateFieldSet(this,fe,new MutationObserver(this.handleMutation),\"f\")}observeMutations(e){t.__classPrivateFieldGet(this,fe,\"f\")?.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[\"class\"]})}destroy(){t.__classPrivateFieldGet(this,ge,\"f\").disconnect(),t.__classPrivateFieldGet(this,fe,\"f\").disconnect()}observeContainer(e){t.__classPrivateFieldGet(this,ge,\"f\").observe(e)}unobserveContainer(e){t.__classPrivateFieldGet(this,ge,\"f\").unobserve(e)}resizeElement(t){const e=this.layout.viewComponentsByContainerElement.get(t);e&&e.resize()}}ge=new WeakMap,fe=new WeakMap;var _e={};Object.defineProperty(_e,\"__esModule\",{value:!0});var ye=_e.BaseItem=void 0;class Ce{constructor(t,e,i){this._item=t,this._layout=e,this._wrap=i}get raw(){return this._item}get layout(){return this._layout}get type(){return this._item.type}get contentItems(){return(this._item.contentItems??[]).map((t=>this._wrap(t)))}get parent(){const t=this._item.parent;return t?this._wrap(t):null}setActiveContentItem(t,e){if(\"stack\"!==this.type)throw new Error(`Cannot call setActiveContentItem from a non-stack item: ${this.type}`);this._item.setActiveContentItem(t.raw,e)}static wrapInternal(t,e,i){const n=Ce.wrapCache.get(e);if(n)return n;const o=new t(e,i,(e=>Ce.wrapInternal(t,e,i)));return Ce.wrapCache.set(e,o),o}}ye=_e.BaseItem=Ce,Ce.wrapCache=new WeakMap;const we=t=>!!t&&\"contentItems\"in t&&(t.isRow||t.isColumn);class Ie extends ye{isRoot(){return!!this._item.parent?.isGround}getBounds(){return this._item.element.getBoundingClientRect()}get viewName(){if(this._item.isComponent){const{component:t}=this._item;return t.identity.name}throw new Error(\"View name not found\")}onDestroyed(t){const e=({target:i})=>{i===this._item&&(t(),this._item.off(\"itemDestroyed\",e))};this._item.on(\"itemDestroyed\",e)}createAdjacentStack({position:t=\"right\"}={}){const e=this.raw;if(ee.isStack(e)&&e.parent){const i=[\"top\",\"bottom\"].includes(t)?\"column\":\"row\",n=[\"left\",\"top\"].includes(t)?1:0,o=we(e.parent)?e.parent:e.layoutManager,s=o,r=e.parent.contentItems.indexOf(e);e.parent.isGround&&e.parent.removeChild(e,!0);const a=o.newItem({type:i,content:[{type:\"stack\",content:[]}]},r);if(!a)throw new Error(\"createAdjacentStack: Failed to create new container\");const l=a.contentItems[0];return a.addChild(this.raw,n),we(s)&&s.removeChild(e,!0),this._wrap(l)}throw new Error(`Cannot creat adjacent stacks for type: ${e.type}, must be type 'stack'`)}setActiveContentItem(t,e=!0){if(!ee.isStack(this._item))throw new Error(`Cannot call setActiveContentItem from a non-stack item: ${this.type}`);this._item.setActiveComponentItem(t.raw,!e)}static wrap(t,e){return ye.wrapInternal(Ie,t,e)}}function be(t=[],e){for(const i of t)\"component\"===i.type?Object.keys(e).forEach((t=>{t in i&&(i.componentState={[`${de}${t}`]:i[t],...i.componentState}),i[t]=e[t]})):be(i.content,e)}function Se(t=[],e,i){for(const n of t)if(\"component\"===n.type)Object.keys(e).forEach((t=>{if(`${de}${t}`in n.componentState)return n[t]=n.componentState[`${de}${t}`],void delete n.componentState[`${de}${t}`];n[t]=e[t]}));else{if(n.size&&(\"row\"===i||\"column\"===i)){n[\"row\"===i?\"width\":\"height\"]=n.size?.includes(\".\")?parseFloat(n.size):parseInt(n.size)}Se(n.content,e,n.type)}}function Ee(t){if(t.root){t.root.content&&Se([t.root],{componentName:\"view\",isClosable:!0});const e=t.root;t.content=[e],delete t.root}return t}const xe=e=>class extends e{connectedCallback(){if(!this.name||!this.uuid)throw new Error(\" Name or uuid attribute missing\");if(!this.src)throw new Error(\" missing 'src' attribute.\");this.#t||(this.#t=document.createElement(\"iframe\"),this.#t.src=this.src,this.#t.style.height=\"100%\",this.#t.style.width=\"100%\",this.#t.style.border=\"none\",this.forceFrameName?this.#t.setAttribute(\"name\",this.forceFrameName):this.#t.setAttribute(\"name\",t.encodeOptions({brokerUrl:this.brokerUrl,name:this.name,uuid:this.uuid,providerId:this.providerId,contextGroup:this.contextGroup},\"of-frame\")),this.#t.setAttribute(\"id\",this.name),this.appendChild(this.#t))}#t;get brokerUrl(){return this.getAttribute(\"of-broker\")}set brokerUrl(t){t&&this.setAttribute(\"of-broker\",t)}get name(){return this.getAttribute(\"of-name\")}set name(t){t&&this.setAttribute(\"of-name\",t)}get forceFrameName(){return this.getAttribute(\"forceFrameName\")}set forceFrameName(t){t&&this.setAttribute(\"forceFrameName\",t)}get uuid(){return this.getAttribute(\"of-uuid\")}set uuid(t){t&&this.setAttribute(\"of-uuid\",t)}get src(){return this.getAttribute(\"src\")}set src(t){t&&this.setAttribute(\"src\",t)}get providerId(){return this.getAttribute(\"of-provider-id\")}set providerId(t){t&&this.setAttribute(\"of-provider-id\",t)}get contextGroup(){return this.getAttribute(\"of-context-group\")}set contextGroup(t){t&&this.setAttribute(\"of-context-group\",t)}static get observedAttributes(){return[\"name\"]}};class Le{static create(t){const e=document.createElement(\"of-view\");return Object.entries(t).forEach((([t,i])=>{e.setAttribute(t,i)})),e}}customElements.define(\"of-view\",xe(HTMLElement));class ze{constructor(t,i,n,{brokerUrl:o,interopConfig:s},r){this.container=t,this.config=i,this.ofView=null,this.isDragging=()=>this.container.tab.element?.className.includes(\"lm_dragging\")??!1;const{url:a,web:l,interop:h,name:d}=i||{},c=d??`internal-generated-view-${e.v4()}`;if(this.identity={uuid:n,name:c},this.container.element.setAttribute(\"of-name\",c),this.container.element.id=`container-${c}`,this.container.parent.id=c,void 0===a)return void this.handleUrlMissing();const m=this.updateTitleIfNotSet(a),u={\"of-broker\":o,\"of-uuid\":n,\"of-name\":c,src:a};l?.frameName&&(u.forceFrameName=l.frameName);const p=h?.currentContextGroup??s?.currentContextGroup;p&&(u[\"of-context-group\"]=p),s?.providerId&&(u[\"of-provider-id\"]=s?.providerId),this.ofView=Le.create(u),this.ofView.title=m??`Iframe: ${a}`,r.appendChild(this.ofView),this.ofView.style.position=\"absolute\"}updateTitleIfNotSet(t){return\"view\"===this.container.parent.title&&this.container.parent.setTitle(t),this.container.parent.title}handleUrlMissing(){const t=document.createElement(\"div\");t.setAttribute(\"style\",\"padding: 20px\");t.innerText=\"No URL provided\",this.container.element.appendChild(t)}destroy(){this.ofView?.remove(),this.ofView=null}closeView(){this.container.close()}resize(){if(this.ofView){if(this.isDragging())return void(this.ofView.style.display=\"none\");const t=this.container.element.getBoundingClientRect();this.ofView.style.position=\"absolute\",this.ofView.style.height=`${t.height}px`,this.ofView.style.width=`${t.width}px`,this.ofView.style.inset=`${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`,this.ofView.style.display=\"block\"}}}class Me extends U{static overrideConfig(t){const e={...ue,...t.settings,...pe};return e.reorderEnabled?be(t.content,{isClosable:!0}):be(t.content,{reorderEnabled:!1}),{dimensions:me,...t,settings:e,header:{...ce,show:!1!==t.settings?.hasHeaders&&ce.show}}}constructor(t,e,i,{options:n},o,s){super(),this.identity=t,this.container=e,this.initialConfig=i,this.layoutManager=o,this.platformProvider=s,this.viewComponentsByContainerElement=new Map,this.layoutContentCache=_.getSingleInstance(),this.reparentingViews=new Set,this.goldenLayoutDestroyed=!1,this.createViewComponent=(t,e)=>{m.handleSharedView(this.layoutManager,this.identity,e);const i=new ze(t,e,this.identity.uuid,this.options,this.iframeContainer);return e&&!1===e[`${de}isClosable`]&&this.stylesheet.insertRule(`#tab-${i.identity.name} .lm_close_tab { display: none; }`),this.viewComponentsByContainerElement.set(t.element,i),this.resizeController.observeContainer(t.element),i},this.iframeContainer=document.createElement(\"div\"),this.iframeContainer.id=`openfin-layout-iframe-container-${this.identity.layoutName}`,this.domEmitter=new V(e),this.setupStylesheets(),this.layout=new he(this.container),this.layout.resizeWithContainerAutomatically=!0,this.options=n,this.layout.registerComponent(\"view\",this.createViewComponent),this.setupListeners(),this.resizeController=new ve(this),this.layout.loadLayout(Me.overrideConfig(i));const r=document.createElement(\"div\");r.id=`openfin-layout-shadow-container-${this.identity.layoutName}`,r.attachShadow({mode:\"open\",delegatesFocus:!1}).appendChild(this.iframeContainer),this.container.appendChild(r),this.resizeController.observeMutations(this.container)}getStackByView({name:t}){const e=this.layout.findFirstComponentItemById(t);if(e?.parent&&e?.parent?.isStack)return Ie.wrap(e.parent,this)}getRoot(){return Ie.wrap(this.layout.rootItem,this)}async platformCloseView(t){const e=[...this.viewComponentsByContainerElement.values()].find((e=>e.identity.name===t.name));if(!e)throw new Error(`View with name: ${t.name} not found in layout.`);e.closeView()}async platformCreateView(t,{location:e,targetView:i}={}){if(i)throw new Error(\"TargetView not supported in web\");const n={options:this.platformProvider.normalizeOptions(t),target:this.identity,location:e};return this.insertView(n)}setupStylesheets(){if(this.container.setAttribute(\"data-openfin-layout-name\",this.identity.layoutName),this.stylesheet=new CSSStyleSheet,this.stylesheet.insertRule(\".lm_close { display: none; }\"),document.adoptedStyleSheets.push(this.stylesheet),this.initialConfig.settings?.preventSplitterResize){const t=`\\n [data-openfin-layout-name='${this.identity.layoutName}'] .lm_splitter {\\n pointer-events: none;\\n }`;this.stylesheet.insertRule(t)}}insertView({options:t,location:e,targetView:i}){const n=e?this.layoutContentCache.getItemOrUndefined(e.id):void 0,o=i?this.layoutContentCache.getItemOrUndefined(i.name):void 0,s=n??o??Ie.wrap(this.layout.rootItem,this);let r;if(ee.isStack(s.raw))r=s.raw;else{if(!we(s.raw))throw new Error(\"Cannot add a view at the requested location\");r=s.raw.newItem({type:\"stack\",content:[]})}const a=Math.min(r.contentItems.length,e?.index??r.contentItems.length);let l=this.layout.findFirstComponentItemById(t.name);l?(l.parent&&l.parent.removeChild(l,!0),r.addChild(l,a)):l=r.newComponent(\"view\",t,t.title??t.url??\"Default Title\",a);const h=l.component.identity;return Promise.resolve({identity:h})}replaceView({viewToReplace:t,newView:e}){throw new Error(\"Method not implemented.\")}replaceLayout(t){throw new Error(\"Method not implemented.\")}async cleanupView(t){}applyPreset(t){throw new Error(\"Method not implemented.\")}getCurrentViews(){return[...this.viewComponentsByContainerElement.values()].map((t=>t.identity))}async getFrameSnapshot(){return Ee(xt.fromResolved(this.layout.toConfig()))}isVisible(){return W(this.container)}async onViewDetached({viewIdentity:t}){this.reparentingViews.add(t.name),this.platformCloseView(t)}async destroy(){this.goldenLayoutDestroyed||(this.goldenLayoutDestroyed=!0,this.layout.destroy()),this.iframeContainer.remove(),this.resizeController.destroy(),document.adoptedStyleSheets=document.adoptedStyleSheets.filter((t=>t!==this.stylesheet)),this.viewComponentsByContainerElement.clear()}setupListeners(){this.container.addEventListener(\"pointerdown\",(t=>{if(t.target instanceof HTMLElement){const e=t.target.classList;[\"lm_tab\",\"lm_title\",\"lm_splitter\",\"lm_drag_handle\"].some((t=>e.contains(t)))&&(this.handleDragStart(),2===t.button&&t.stopPropagation())}}),!0),document.addEventListener(\"pointerup\",(()=>this.handleDragEnd()),!0),this.layout.on(\"tabCreated\",(t=>{const e=t.componentItem.component;t.element.id=`tab-${e.identity.name}`,this.domEmitter.dispatchLocalEvent(\"tab-created\",e.identity)})),this.layout.on(\"itemCreated\",(({target:t})=>{const e=t;if(Gt.isComponentItem(e)){const t=e.component;this.domEmitter.dispatchLocalEvent(\"container-created\",t.identity)}})),this.layout.on(\"itemDestroyed\",(t=>{const e=t.target;if(Gt.isComponentItem(e)){const t=e.component;this.removeViewComponent(t)}})),this.layout.on(\"itemDropped\",(()=>{this.handleDragEnd()}))}handleDragStart(){this.iframeContainer.style.pointerEvents=\"none\"}handleDragEnd(){this.iframeContainer.style.pointerEvents=\"\"}removeViewComponent(t){if(t.config&&!1===t.config[`${de}isClosable`]){const e=[...this.stylesheet.cssRules].findIndex((e=>e.cssText.includes(`#tab-${t.identity.name}`)));this.stylesheet.deleteRule(e)}t.destroy(),this.viewComponentsByContainerElement.delete(t.container.element),this.resizeController.unobserveContainer(t.container.element),this.reparentingViews.has(t.identity.name)?this.reparentingViews.delete(t.identity.name):this.platformProvider.closeView(t.identity.name);0===this.getCurrentViews().length&&(this.goldenLayoutDestroyed||(this.goldenLayoutDestroyed=!0,m.handleLastViewRemoved(this.layoutManager,this.identity)))}}class Pe{constructor(t,e,i,n){this.windowIdentity=t,this.connectConfig=e,this.provider=i,this.fallbackContainer=n}async createLayout(t,e){if(!(\"container\"in t)&&!this.fallbackContainer)throw new Error(\"Container property is not optional in web\");const{layoutName:i}=t,n=t,o=this.provider.initLayoutViews(n),s=n.container??this.fallbackContainer,r={...this.windowIdentity,layoutName:i},a=new Me(r,s,o,this.connectConfig,e,this.provider);m.registerLayout(e,i,a),this.fallbackContainer=null}async getLayoutSnapshot(t){return t.getLayoutSnapshot()}async handleLastViewRemoved(t){}}class Te{static async init(e){const i=e.getFin().InterApplicationBus.Channel,n=await i.create(`custom-frame-${e.me.uuid}`);return n.setDefaultAction((async(t,{target:e,opts:i},o)=>{const s=n.connections.find((t=>t.name===e.name));if(s)return n.dispatch(s,t,{...i,target:e});throw new Error(`Client with name ${e.name} not found`)})),await t.relayChannelClientApi_1(n,\"layout-relay\"),new Te(e)}constructor(t){this.wire=t,this.viewNames=new Set}normalizeOptions(t,i=\"default\"){const n=this.wire.me.uuid;let{name:o=`internal-generated-view-${e.v4()}`}=t;return o.match(/^internal-generated-view-/)&&this.viewNames.has(o)&&\"duplicate\"===i&&(o=`internal-generated-view-${e.v4()}`),this.viewNames.add(o),{...t,name:o,uuid:n}}closeView(t){this.viewNames.delete(t)}initLayoutViews({layout:t,multiInstanceViewBehavior:e}){return H((t=>{if(\"component\"===t.type&&t.componentState){const i=this.normalizeOptions(t.componentState,e);return{...t,componentState:i}}return t}),t)}}var Ae;const ke=t=>t;Ae=new WeakMap,exports.WebLayoutEntryPoint=class{constructor(e){Ae.set(this,void 0),this.initLayoutManager=async(e,i,{container:n,layoutManagerOverride:o})=>{const s=await Te.init(i),r=o??ke,a=new Pe(i.me,t.__classPrivateFieldGet(this,Ae,\"f\"),s,n),l=new(r(m.createClosedConstructor(a)));return await M(i,l),l},this.applyLayoutSnapshot=async(e,i,n)=>{await i.applyLayoutSnapshot(t.__classPrivateFieldGet(this,Ae,\"f\").platform.layoutSnapshot)},this.createLayout=async(t,e)=>m.createLayout(t,e),this.destroyLayout=async(t,e)=>m.destroyLayout(t,e),t.__classPrivateFieldSet(this,Ae,e,\"f\")}};\n","'use strict'\n\nexports.byteLength = byteLength\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\nfor (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i]\n revLookup[code.charCodeAt(i)] = i\n}\n\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction getLens (b64) {\n var len = b64.length\n\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // Trim off extra bytes after placeholder bytes are found\n // See: https://github.com/beatgammit/base64-js/issues/42\n var validLen = b64.indexOf('=')\n if (validLen === -1) validLen = len\n\n var placeHoldersLen = validLen === len\n ? 0\n : 4 - (validLen % 4)\n\n return [validLen, placeHoldersLen]\n}\n\n// base64 is 4/3 + up to two characters of the original data\nfunction byteLength (b64) {\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction _byteLength (b64, validLen, placeHoldersLen) {\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction toByteArray (b64) {\n var tmp\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n\n var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))\n\n var curByte = 0\n\n // if there are placeholders, only get up to the last complete 4 chars\n var len = placeHoldersLen > 0\n ? validLen - 4\n : validLen\n\n var i\n for (i = 0; i < len; i += 4) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 18) |\n (revLookup[b64.charCodeAt(i + 1)] << 12) |\n (revLookup[b64.charCodeAt(i + 2)] << 6) |\n revLookup[b64.charCodeAt(i + 3)]\n arr[curByte++] = (tmp >> 16) & 0xFF\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 2) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 2) |\n (revLookup[b64.charCodeAt(i + 1)] >> 4)\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 1) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 10) |\n (revLookup[b64.charCodeAt(i + 1)] << 4) |\n (revLookup[b64.charCodeAt(i + 2)] >> 2)\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] +\n lookup[num >> 12 & 0x3F] +\n lookup[num >> 6 & 0x3F] +\n lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n var tmp\n var output = []\n for (var i = start; i < end; i += 3) {\n tmp =\n ((uint8[i] << 16) & 0xFF0000) +\n ((uint8[i + 1] << 8) & 0xFF00) +\n (uint8[i + 2] & 0xFF)\n output.push(tripletToBase64(tmp))\n }\n return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n var tmp\n var len = uint8.length\n var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n var parts = []\n var maxChunkLength = 16383 // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1]\n parts.push(\n lookup[tmp >> 2] +\n lookup[(tmp << 4) & 0x3F] +\n '=='\n )\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + uint8[len - 1]\n parts.push(\n lookup[tmp >> 10] +\n lookup[(tmp >> 4) & 0x3F] +\n lookup[(tmp << 2) & 0x3F] +\n '='\n )\n }\n\n return parts.join('')\n}\n","/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n/* eslint-disable no-proto */\n\n'use strict'\n\nconst base64 = require('base64-js')\nconst ieee754 = require('ieee754')\nconst customInspectSymbol =\n (typeof Symbol === 'function' && typeof Symbol['for'] === 'function') // eslint-disable-line dot-notation\n ? Symbol['for']('nodejs.util.inspect.custom') // eslint-disable-line dot-notation\n : null\n\nexports.Buffer = Buffer\nexports.SlowBuffer = SlowBuffer\nexports.INSPECT_MAX_BYTES = 50\n\nconst K_MAX_LENGTH = 0x7fffffff\nexports.kMaxLength = K_MAX_LENGTH\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Print warning and recommend using `buffer` v4.x which has an Object\n * implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * We report that the browser does not support typed arrays if the are not subclassable\n * using __proto__. Firefox 4-29 lacks support for adding new properties to `Uint8Array`\n * (See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438). IE 10 lacks support\n * for __proto__ and has a buggy typed array implementation.\n */\nBuffer.TYPED_ARRAY_SUPPORT = typedArraySupport()\n\nif (!Buffer.TYPED_ARRAY_SUPPORT && typeof console !== 'undefined' &&\n typeof console.error === 'function') {\n console.error(\n 'This browser lacks typed array (Uint8Array) support which is required by ' +\n '`buffer` v5.x. Use `buffer` v4.x if you require old browser support.'\n )\n}\n\nfunction typedArraySupport () {\n // Can typed array instances can be augmented?\n try {\n const arr = new Uint8Array(1)\n const proto = { foo: function () { return 42 } }\n Object.setPrototypeOf(proto, Uint8Array.prototype)\n Object.setPrototypeOf(arr, proto)\n return arr.foo() === 42\n } catch (e) {\n return false\n }\n}\n\nObject.defineProperty(Buffer.prototype, 'parent', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.buffer\n }\n})\n\nObject.defineProperty(Buffer.prototype, 'offset', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.byteOffset\n }\n})\n\nfunction createBuffer (length) {\n if (length > K_MAX_LENGTH) {\n throw new RangeError('The value \"' + length + '\" is invalid for option \"size\"')\n }\n // Return an augmented `Uint8Array` instance\n const buf = new Uint8Array(length)\n Object.setPrototypeOf(buf, Buffer.prototype)\n return buf\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new TypeError(\n 'The \"string\" argument must be of type string. Received type number'\n )\n }\n return allocUnsafe(arg)\n }\n return from(arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\nfunction from (value, encodingOrOffset, length) {\n if (typeof value === 'string') {\n return fromString(value, encodingOrOffset)\n }\n\n if (ArrayBuffer.isView(value)) {\n return fromArrayView(value)\n }\n\n if (value == null) {\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n }\n\n if (isInstance(value, ArrayBuffer) ||\n (value && isInstance(value.buffer, ArrayBuffer))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof SharedArrayBuffer !== 'undefined' &&\n (isInstance(value, SharedArrayBuffer) ||\n (value && isInstance(value.buffer, SharedArrayBuffer)))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof value === 'number') {\n throw new TypeError(\n 'The \"value\" argument must not be of type number. Received type number'\n )\n }\n\n const valueOf = value.valueOf && value.valueOf()\n if (valueOf != null && valueOf !== value) {\n return Buffer.from(valueOf, encodingOrOffset, length)\n }\n\n const b = fromObject(value)\n if (b) return b\n\n if (typeof Symbol !== 'undefined' && Symbol.toPrimitive != null &&\n typeof value[Symbol.toPrimitive] === 'function') {\n return Buffer.from(value[Symbol.toPrimitive]('string'), encodingOrOffset, length)\n }\n\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n return from(value, encodingOrOffset, length)\n}\n\n// Note: Change prototype *after* Buffer.from is defined to workaround Chrome bug:\n// https://github.com/feross/buffer/pull/148\nObject.setPrototypeOf(Buffer.prototype, Uint8Array.prototype)\nObject.setPrototypeOf(Buffer, Uint8Array)\n\nfunction assertSize (size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be of type number')\n } else if (size < 0) {\n throw new RangeError('The value \"' + size + '\" is invalid for option \"size\"')\n }\n}\n\nfunction alloc (size, fill, encoding) {\n assertSize(size)\n if (size <= 0) {\n return createBuffer(size)\n }\n if (fill !== undefined) {\n // Only pay attention to encoding if it's a string. This\n // prevents accidentally sending in a number that would\n // be interpreted as a start offset.\n return typeof encoding === 'string'\n ? createBuffer(size).fill(fill, encoding)\n : createBuffer(size).fill(fill)\n }\n return createBuffer(size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n return alloc(size, fill, encoding)\n}\n\nfunction allocUnsafe (size) {\n assertSize(size)\n return createBuffer(size < 0 ? 0 : checked(size) | 0)\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n return allocUnsafe(size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n return allocUnsafe(size)\n}\n\nfunction fromString (string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8'\n }\n\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n\n const length = byteLength(string, encoding) | 0\n let buf = createBuffer(length)\n\n const actual = buf.write(string, encoding)\n\n if (actual !== length) {\n // Writing a hex string, for example, that contains invalid characters will\n // cause everything after the first invalid character to be ignored. (e.g.\n // 'abxxcd' will be treated as 'ab')\n buf = buf.slice(0, actual)\n }\n\n return buf\n}\n\nfunction fromArrayLike (array) {\n const length = array.length < 0 ? 0 : checked(array.length) | 0\n const buf = createBuffer(length)\n for (let i = 0; i < length; i += 1) {\n buf[i] = array[i] & 255\n }\n return buf\n}\n\nfunction fromArrayView (arrayView) {\n if (isInstance(arrayView, Uint8Array)) {\n const copy = new Uint8Array(arrayView)\n return fromArrayBuffer(copy.buffer, copy.byteOffset, copy.byteLength)\n }\n return fromArrayLike(arrayView)\n}\n\nfunction fromArrayBuffer (array, byteOffset, length) {\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\"offset\" is outside of buffer bounds')\n }\n\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\"length\" is outside of buffer bounds')\n }\n\n let buf\n if (byteOffset === undefined && length === undefined) {\n buf = new Uint8Array(array)\n } else if (length === undefined) {\n buf = new Uint8Array(array, byteOffset)\n } else {\n buf = new Uint8Array(array, byteOffset, length)\n }\n\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(buf, Buffer.prototype)\n\n return buf\n}\n\nfunction fromObject (obj) {\n if (Buffer.isBuffer(obj)) {\n const len = checked(obj.length) | 0\n const buf = createBuffer(len)\n\n if (buf.length === 0) {\n return buf\n }\n\n obj.copy(buf, 0, 0, len)\n return buf\n }\n\n if (obj.length !== undefined) {\n if (typeof obj.length !== 'number' || numberIsNaN(obj.length)) {\n return createBuffer(0)\n }\n return fromArrayLike(obj)\n }\n\n if (obj.type === 'Buffer' && Array.isArray(obj.data)) {\n return fromArrayLike(obj.data)\n }\n}\n\nfunction checked (length) {\n // Note: cannot use `length < K_MAX_LENGTH` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= K_MAX_LENGTH) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + K_MAX_LENGTH.toString(16) + ' bytes')\n }\n return length | 0\n}\n\nfunction SlowBuffer (length) {\n if (+length != length) { // eslint-disable-line eqeqeq\n length = 0\n }\n return Buffer.alloc(+length)\n}\n\nBuffer.isBuffer = function isBuffer (b) {\n return b != null && b._isBuffer === true &&\n b !== Buffer.prototype // so Buffer.isBuffer(Buffer.prototype) will be false\n}\n\nBuffer.compare = function compare (a, b) {\n if (isInstance(a, Uint8Array)) a = Buffer.from(a, a.offset, a.byteLength)\n if (isInstance(b, Uint8Array)) b = Buffer.from(b, b.offset, b.byteLength)\n if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n throw new TypeError(\n 'The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array'\n )\n }\n\n if (a === b) return 0\n\n let x = a.length\n let y = b.length\n\n for (let i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i]\n y = b[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n switch (String(encoding).toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'latin1':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return true\n default:\n return false\n }\n}\n\nBuffer.concat = function concat (list, length) {\n if (!Array.isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n\n if (list.length === 0) {\n return Buffer.alloc(0)\n }\n\n let i\n if (length === undefined) {\n length = 0\n for (i = 0; i < list.length; ++i) {\n length += list[i].length\n }\n }\n\n const buffer = Buffer.allocUnsafe(length)\n let pos = 0\n for (i = 0; i < list.length; ++i) {\n let buf = list[i]\n if (isInstance(buf, Uint8Array)) {\n if (pos + buf.length > buffer.length) {\n if (!Buffer.isBuffer(buf)) buf = Buffer.from(buf)\n buf.copy(buffer, pos)\n } else {\n Uint8Array.prototype.set.call(\n buffer,\n buf,\n pos\n )\n }\n } else if (!Buffer.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n } else {\n buf.copy(buffer, pos)\n }\n pos += buf.length\n }\n return buffer\n}\n\nfunction byteLength (string, encoding) {\n if (Buffer.isBuffer(string)) {\n return string.length\n }\n if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) {\n return string.byteLength\n }\n if (typeof string !== 'string') {\n throw new TypeError(\n 'The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. ' +\n 'Received type ' + typeof string\n )\n }\n\n const len = string.length\n const mustMatch = (arguments.length > 2 && arguments[2] === true)\n if (!mustMatch && len === 0) return 0\n\n // Use a for loop to avoid recursion\n let loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'ascii':\n case 'latin1':\n case 'binary':\n return len\n case 'utf8':\n case 'utf-8':\n return utf8ToBytes(string).length\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return len * 2\n case 'hex':\n return len >>> 1\n case 'base64':\n return base64ToBytes(string).length\n default:\n if (loweredCase) {\n return mustMatch ? -1 : utf8ToBytes(string).length // assume utf8\n }\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n let loweredCase = false\n\n // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n // property of a typed array.\n\n // This behaves neither like String nor Uint8Array in that we set start/end\n // to their upper/lower bounds if the value passed is out of range.\n // undefined is handled specially as per ECMA-262 6th Edition,\n // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n if (start === undefined || start < 0) {\n start = 0\n }\n // Return early if start > this.length. Done here to prevent potential uint32\n // coercion fail below.\n if (start > this.length) {\n return ''\n }\n\n if (end === undefined || end > this.length) {\n end = this.length\n }\n\n if (end <= 0) {\n return ''\n }\n\n // Force coercion to uint32. This will also coerce falsey/NaN values to 0.\n end >>>= 0\n start >>>= 0\n\n if (end <= start) {\n return ''\n }\n\n if (!encoding) encoding = 'utf8'\n\n while (true) {\n switch (encoding) {\n case 'hex':\n return hexSlice(this, start, end)\n\n case 'utf8':\n case 'utf-8':\n return utf8Slice(this, start, end)\n\n case 'ascii':\n return asciiSlice(this, start, end)\n\n case 'latin1':\n case 'binary':\n return latin1Slice(this, start, end)\n\n case 'base64':\n return base64Slice(this, start, end)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return utf16leSlice(this, start, end)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = (encoding + '').toLowerCase()\n loweredCase = true\n }\n }\n}\n\n// This property is used by `Buffer.isBuffer` (and the `is-buffer` npm package)\n// to detect a Buffer instance. It's not possible to use `instanceof Buffer`\n// reliably in a browserify context because there could be multiple different\n// copies of the 'buffer' package in use. This method works even for Buffer\n// instances that were created from another copy of the `buffer` package.\n// See: https://github.com/feross/buffer/issues/154\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n const i = b[n]\n b[n] = b[m]\n b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n const len = this.length\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits')\n }\n for (let i = 0; i < len; i += 2) {\n swap(this, i, i + 1)\n }\n return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n const len = this.length\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits')\n }\n for (let i = 0; i < len; i += 4) {\n swap(this, i, i + 3)\n swap(this, i + 1, i + 2)\n }\n return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n const len = this.length\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits')\n }\n for (let i = 0; i < len; i += 8) {\n swap(this, i, i + 7)\n swap(this, i + 1, i + 6)\n swap(this, i + 2, i + 5)\n swap(this, i + 3, i + 4)\n }\n return this\n}\n\nBuffer.prototype.toString = function toString () {\n const length = this.length\n if (length === 0) return ''\n if (arguments.length === 0) return utf8Slice(this, 0, length)\n return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.toLocaleString = Buffer.prototype.toString\n\nBuffer.prototype.equals = function equals (b) {\n if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n if (this === b) return true\n return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n let str = ''\n const max = exports.INSPECT_MAX_BYTES\n str = this.toString('hex', 0, max).replace(/(.{2})/g, '$1 ').trim()\n if (this.length > max) str += ' ... '\n return ''\n}\nif (customInspectSymbol) {\n Buffer.prototype[customInspectSymbol] = Buffer.prototype.inspect\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n if (isInstance(target, Uint8Array)) {\n target = Buffer.from(target, target.offset, target.byteLength)\n }\n if (!Buffer.isBuffer(target)) {\n throw new TypeError(\n 'The \"target\" argument must be one of type Buffer or Uint8Array. ' +\n 'Received type ' + (typeof target)\n )\n }\n\n if (start === undefined) {\n start = 0\n }\n if (end === undefined) {\n end = target ? target.length : 0\n }\n if (thisStart === undefined) {\n thisStart = 0\n }\n if (thisEnd === undefined) {\n thisEnd = this.length\n }\n\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError('out of range index')\n }\n\n if (thisStart >= thisEnd && start >= end) {\n return 0\n }\n if (thisStart >= thisEnd) {\n return -1\n }\n if (start >= end) {\n return 1\n }\n\n start >>>= 0\n end >>>= 0\n thisStart >>>= 0\n thisEnd >>>= 0\n\n if (this === target) return 0\n\n let x = thisEnd - thisStart\n let y = end - start\n const len = Math.min(x, y)\n\n const thisCopy = this.slice(thisStart, thisEnd)\n const targetCopy = target.slice(start, end)\n\n for (let i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i]\n y = targetCopy[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (numberIsNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [val], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n let indexSize = 1\n let arrLength = arr.length\n let valLength = val.length\n\n if (encoding !== undefined) {\n encoding = String(encoding).toLowerCase()\n if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n encoding === 'utf16le' || encoding === 'utf-16le') {\n if (arr.length < 2 || val.length < 2) {\n return -1\n }\n indexSize = 2\n arrLength /= 2\n valLength /= 2\n byteOffset /= 2\n }\n }\n\n function read (buf, i) {\n if (indexSize === 1) {\n return buf[i]\n } else {\n return buf.readUInt16BE(i * indexSize)\n }\n }\n\n let i\n if (dir) {\n let foundIndex = -1\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1) foundIndex = i\n if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n } else {\n if (foundIndex !== -1) i -= i - foundIndex\n foundIndex = -1\n }\n }\n } else {\n if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n for (i = byteOffset; i >= 0; i--) {\n let found = true\n for (let j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false\n break\n }\n }\n if (found) return i\n }\n }\n\n return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n offset = Number(offset) || 0\n const remaining = buf.length - offset\n if (!length) {\n length = remaining\n } else {\n length = Number(length)\n if (length > remaining) {\n length = remaining\n }\n }\n\n const strLen = string.length\n\n if (length > strLen / 2) {\n length = strLen / 2\n }\n let i\n for (i = 0; i < length; ++i) {\n const parsed = parseInt(string.substr(i * 2, 2), 16)\n if (numberIsNaN(parsed)) return i\n buf[offset + i] = parsed\n }\n return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n // Buffer#write(string)\n if (offset === undefined) {\n encoding = 'utf8'\n length = this.length\n offset = 0\n // Buffer#write(string, encoding)\n } else if (length === undefined && typeof offset === 'string') {\n encoding = offset\n length = this.length\n offset = 0\n // Buffer#write(string, offset[, length][, encoding])\n } else if (isFinite(offset)) {\n offset = offset >>> 0\n if (isFinite(length)) {\n length = length >>> 0\n if (encoding === undefined) encoding = 'utf8'\n } else {\n encoding = length\n length = undefined\n }\n } else {\n throw new Error(\n 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n )\n }\n\n const remaining = this.length - offset\n if (length === undefined || length > remaining) length = remaining\n\n if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n throw new RangeError('Attempt to write outside buffer bounds')\n }\n\n if (!encoding) encoding = 'utf8'\n\n let loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'hex':\n return hexWrite(this, string, offset, length)\n\n case 'utf8':\n case 'utf-8':\n return utf8Write(this, string, offset, length)\n\n case 'ascii':\n case 'latin1':\n case 'binary':\n return asciiWrite(this, string, offset, length)\n\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return base64Write(this, string, offset, length)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return ucs2Write(this, string, offset, length)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0)\n }\n}\n\nfunction base64Slice (buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf)\n } else {\n return base64.fromByteArray(buf.slice(start, end))\n }\n}\n\nfunction utf8Slice (buf, start, end) {\n end = Math.min(buf.length, end)\n const res = []\n\n let i = start\n while (i < end) {\n const firstByte = buf[i]\n let codePoint = null\n let bytesPerSequence = (firstByte > 0xEF)\n ? 4\n : (firstByte > 0xDF)\n ? 3\n : (firstByte > 0xBF)\n ? 2\n : 1\n\n if (i + bytesPerSequence <= end) {\n let secondByte, thirdByte, fourthByte, tempCodePoint\n\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 0x80) {\n codePoint = firstByte\n }\n break\n case 2:\n secondByte = buf[i + 1]\n if ((secondByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n if (tempCodePoint > 0x7F) {\n codePoint = tempCodePoint\n }\n }\n break\n case 3:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n codePoint = tempCodePoint\n }\n }\n break\n case 4:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n fourthByte = buf[i + 3]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n codePoint = tempCodePoint\n }\n }\n }\n }\n\n if (codePoint === null) {\n // we did not generate a valid codePoint so insert a\n // replacement char (U+FFFD) and advance only 1 byte\n codePoint = 0xFFFD\n bytesPerSequence = 1\n } else if (codePoint > 0xFFFF) {\n // encode to utf16 (surrogate pair dance)\n codePoint -= 0x10000\n res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n codePoint = 0xDC00 | codePoint & 0x3FF\n }\n\n res.push(codePoint)\n i += bytesPerSequence\n }\n\n return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nconst MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n const len = codePoints.length\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n }\n\n // Decode in chunks to avoid \"call stack size exceeded\".\n let res = ''\n let i = 0\n while (i < len) {\n res += String.fromCharCode.apply(\n String,\n codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n )\n }\n return res\n}\n\nfunction asciiSlice (buf, start, end) {\n let ret = ''\n end = Math.min(buf.length, end)\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F)\n }\n return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n let ret = ''\n end = Math.min(buf.length, end)\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i])\n }\n return ret\n}\n\nfunction hexSlice (buf, start, end) {\n const len = buf.length\n\n if (!start || start < 0) start = 0\n if (!end || end < 0 || end > len) end = len\n\n let out = ''\n for (let i = start; i < end; ++i) {\n out += hexSliceLookupTable[buf[i]]\n }\n return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n const bytes = buf.slice(start, end)\n let res = ''\n // If bytes.length is odd, the last 8 bits must be ignored (same as node.js)\n for (let i = 0; i < bytes.length - 1; i += 2) {\n res += String.fromCharCode(bytes[i] + (bytes[i + 1] * 256))\n }\n return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n const len = this.length\n start = ~~start\n end = end === undefined ? len : ~~end\n\n if (start < 0) {\n start += len\n if (start < 0) start = 0\n } else if (start > len) {\n start = len\n }\n\n if (end < 0) {\n end += len\n if (end < 0) end = 0\n } else if (end > len) {\n end = len\n }\n\n if (end < start) end = start\n\n const newBuf = this.subarray(start, end)\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(newBuf, Buffer.prototype)\n\n return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUintLE =\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let val = this[offset]\n let mul = 1\n let i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUintBE =\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n checkOffset(offset, byteLength, this.length)\n }\n\n let val = this[offset + --byteLength]\n let mul = 1\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUint8 =\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n return this[offset]\n}\n\nBuffer.prototype.readUint16LE =\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUint16BE =\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUint32LE =\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return ((this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16)) +\n (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUint32BE =\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] * 0x1000000) +\n ((this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n this[offset + 3])\n}\n\nBuffer.prototype.readBigUInt64LE = defineBigIntMethod(function readBigUInt64LE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const lo = first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24\n\n const hi = this[++offset] +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n last * 2 ** 24\n\n return BigInt(lo) + (BigInt(hi) << BigInt(32))\n})\n\nBuffer.prototype.readBigUInt64BE = defineBigIntMethod(function readBigUInt64BE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const hi = first * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset]\n\n const lo = this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last\n\n return (BigInt(hi) << BigInt(32)) + BigInt(lo)\n})\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let val = this[offset]\n let mul = 1\n let i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let i = byteLength\n let mul = 1\n let val = this[offset + --i]\n while (i > 0 && (mul *= 0x100)) {\n val += this[offset + --i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n if (!(this[offset] & 0x80)) return (this[offset])\n return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n const val = this[offset] | (this[offset + 1] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n const val = this[offset + 1] | (this[offset] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16) |\n (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] << 24) |\n (this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n (this[offset + 3])\n}\n\nBuffer.prototype.readBigInt64LE = defineBigIntMethod(function readBigInt64LE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const val = this[offset + 4] +\n this[offset + 5] * 2 ** 8 +\n this[offset + 6] * 2 ** 16 +\n (last << 24) // Overflow\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24)\n})\n\nBuffer.prototype.readBigInt64BE = defineBigIntMethod(function readBigInt64BE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const val = (first << 24) + // Overflow\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset]\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last)\n})\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUintLE =\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n let mul = 1\n let i = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUintBE =\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n let i = byteLength - 1\n let mul = 1\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUint8 =\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeUint16LE =\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeUint16BE =\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeUint32LE =\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset + 3] = (value >>> 24)\n this[offset + 2] = (value >>> 16)\n this[offset + 1] = (value >>> 8)\n this[offset] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeUint32BE =\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nfunction wrtBigUInt64LE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7)\n\n let lo = Number(value & BigInt(0xffffffff))\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n return offset\n}\n\nfunction wrtBigUInt64BE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7)\n\n let lo = Number(value & BigInt(0xffffffff))\n buf[offset + 7] = lo\n lo = lo >> 8\n buf[offset + 6] = lo\n lo = lo >> 8\n buf[offset + 5] = lo\n lo = lo >> 8\n buf[offset + 4] = lo\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n buf[offset + 3] = hi\n hi = hi >> 8\n buf[offset + 2] = hi\n hi = hi >> 8\n buf[offset + 1] = hi\n hi = hi >> 8\n buf[offset] = hi\n return offset + 8\n}\n\nBuffer.prototype.writeBigUInt64LE = defineBigIntMethod(function writeBigUInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeBigUInt64BE = defineBigIntMethod(function writeBigUInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n let i = 0\n let mul = 1\n let sub = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n let i = byteLength - 1\n let mul = 1\n let sub = 0\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n if (value < 0) value = 0xff + value + 1\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n this[offset + 2] = (value >>> 16)\n this[offset + 3] = (value >>> 24)\n return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (value < 0) value = 0xffffffff + value + 1\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeBigInt64LE = defineBigIntMethod(function writeBigInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nBuffer.prototype.writeBigInt64BE = defineBigIntMethod(function writeBigInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n }\n ieee754.write(buf, value, offset, littleEndian, 23, 4)\n return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n }\n ieee754.write(buf, value, offset, littleEndian, 52, 8)\n return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n if (!Buffer.isBuffer(target)) throw new TypeError('argument should be a Buffer')\n if (!start) start = 0\n if (!end && end !== 0) end = this.length\n if (targetStart >= target.length) targetStart = target.length\n if (!targetStart) targetStart = 0\n if (end > 0 && end < start) end = start\n\n // Copy 0 bytes; we're done\n if (end === start) return 0\n if (target.length === 0 || this.length === 0) return 0\n\n // Fatal error conditions\n if (targetStart < 0) {\n throw new RangeError('targetStart out of bounds')\n }\n if (start < 0 || start >= this.length) throw new RangeError('Index out of range')\n if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n // Are we oob?\n if (end > this.length) end = this.length\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start\n }\n\n const len = end - start\n\n if (this === target && typeof Uint8Array.prototype.copyWithin === 'function') {\n // Use built-in when available, missing from IE11\n this.copyWithin(targetStart, start, end)\n } else {\n Uint8Array.prototype.set.call(\n target,\n this.subarray(start, end),\n targetStart\n )\n }\n\n return len\n}\n\n// Usage:\n// buffer.fill(number[, offset[, end]])\n// buffer.fill(buffer[, offset[, end]])\n// buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n // Handle string cases:\n if (typeof val === 'string') {\n if (typeof start === 'string') {\n encoding = start\n start = 0\n end = this.length\n } else if (typeof end === 'string') {\n encoding = end\n end = this.length\n }\n if (encoding !== undefined && typeof encoding !== 'string') {\n throw new TypeError('encoding must be a string')\n }\n if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n if (val.length === 1) {\n const code = val.charCodeAt(0)\n if ((encoding === 'utf8' && code < 128) ||\n encoding === 'latin1') {\n // Fast path: If `val` fits into a single byte, use that numeric value.\n val = code\n }\n }\n } else if (typeof val === 'number') {\n val = val & 255\n } else if (typeof val === 'boolean') {\n val = Number(val)\n }\n\n // Invalid ranges are not set to a default, so can range check early.\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError('Out of range index')\n }\n\n if (end <= start) {\n return this\n }\n\n start = start >>> 0\n end = end === undefined ? this.length : end >>> 0\n\n if (!val) val = 0\n\n let i\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val\n }\n } else {\n const bytes = Buffer.isBuffer(val)\n ? val\n : Buffer.from(val, encoding)\n const len = bytes.length\n if (len === 0) {\n throw new TypeError('The value \"' + val +\n '\" is invalid for argument \"value\"')\n }\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len]\n }\n }\n\n return this\n}\n\n// CUSTOM ERRORS\n// =============\n\n// Simplified versions from Node, changed for Buffer-only usage\nconst errors = {}\nfunction E (sym, getMessage, Base) {\n errors[sym] = class NodeError extends Base {\n constructor () {\n super()\n\n Object.defineProperty(this, 'message', {\n value: getMessage.apply(this, arguments),\n writable: true,\n configurable: true\n })\n\n // Add the error code to the name to include it in the stack trace.\n this.name = `${this.name} [${sym}]`\n // Access the stack to generate the error message including the error code\n // from the name.\n this.stack // eslint-disable-line no-unused-expressions\n // Reset the name to the actual name.\n delete this.name\n }\n\n get code () {\n return sym\n }\n\n set code (value) {\n Object.defineProperty(this, 'code', {\n configurable: true,\n enumerable: true,\n value,\n writable: true\n })\n }\n\n toString () {\n return `${this.name} [${sym}]: ${this.message}`\n }\n }\n}\n\nE('ERR_BUFFER_OUT_OF_BOUNDS',\n function (name) {\n if (name) {\n return `${name} is outside of buffer bounds`\n }\n\n return 'Attempt to access memory outside buffer bounds'\n }, RangeError)\nE('ERR_INVALID_ARG_TYPE',\n function (name, actual) {\n return `The \"${name}\" argument must be of type number. Received type ${typeof actual}`\n }, TypeError)\nE('ERR_OUT_OF_RANGE',\n function (str, range, input) {\n let msg = `The value of \"${str}\" is out of range.`\n let received = input\n if (Number.isInteger(input) && Math.abs(input) > 2 ** 32) {\n received = addNumericalSeparator(String(input))\n } else if (typeof input === 'bigint') {\n received = String(input)\n if (input > BigInt(2) ** BigInt(32) || input < -(BigInt(2) ** BigInt(32))) {\n received = addNumericalSeparator(received)\n }\n received += 'n'\n }\n msg += ` It must be ${range}. Received ${received}`\n return msg\n }, RangeError)\n\nfunction addNumericalSeparator (val) {\n let res = ''\n let i = val.length\n const start = val[0] === '-' ? 1 : 0\n for (; i >= start + 4; i -= 3) {\n res = `_${val.slice(i - 3, i)}${res}`\n }\n return `${val.slice(0, i)}${res}`\n}\n\n// CHECK FUNCTIONS\n// ===============\n\nfunction checkBounds (buf, offset, byteLength) {\n validateNumber(offset, 'offset')\n if (buf[offset] === undefined || buf[offset + byteLength] === undefined) {\n boundsError(offset, buf.length - (byteLength + 1))\n }\n}\n\nfunction checkIntBI (value, min, max, buf, offset, byteLength) {\n if (value > max || value < min) {\n const n = typeof min === 'bigint' ? 'n' : ''\n let range\n if (byteLength > 3) {\n if (min === 0 || min === BigInt(0)) {\n range = `>= 0${n} and < 2${n} ** ${(byteLength + 1) * 8}${n}`\n } else {\n range = `>= -(2${n} ** ${(byteLength + 1) * 8 - 1}${n}) and < 2 ** ` +\n `${(byteLength + 1) * 8 - 1}${n}`\n }\n } else {\n range = `>= ${min}${n} and <= ${max}${n}`\n }\n throw new errors.ERR_OUT_OF_RANGE('value', range, value)\n }\n checkBounds(buf, offset, byteLength)\n}\n\nfunction validateNumber (value, name) {\n if (typeof value !== 'number') {\n throw new errors.ERR_INVALID_ARG_TYPE(name, 'number', value)\n }\n}\n\nfunction boundsError (value, length, type) {\n if (Math.floor(value) !== value) {\n validateNumber(value, type)\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset', 'an integer', value)\n }\n\n if (length < 0) {\n throw new errors.ERR_BUFFER_OUT_OF_BOUNDS()\n }\n\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset',\n `>= ${type ? 1 : 0} and <= ${length}`,\n value)\n}\n\n// HELPER FUNCTIONS\n// ================\n\nconst INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n // Node takes equal signs as end of the Base64 encoding\n str = str.split('=')[0]\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = str.trim().replace(INVALID_BASE64_RE, '')\n // Node converts strings with length < 2 to ''\n if (str.length < 2) return ''\n // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n while (str.length % 4 !== 0) {\n str = str + '='\n }\n return str\n}\n\nfunction utf8ToBytes (string, units) {\n units = units || Infinity\n let codePoint\n const length = string.length\n let leadSurrogate = null\n const bytes = []\n\n for (let i = 0; i < length; ++i) {\n codePoint = string.charCodeAt(i)\n\n // is surrogate component\n if (codePoint > 0xD7FF && codePoint < 0xE000) {\n // last char was a lead\n if (!leadSurrogate) {\n // no lead yet\n if (codePoint > 0xDBFF) {\n // unexpected trail\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n } else if (i + 1 === length) {\n // unpaired lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n }\n\n // valid lead\n leadSurrogate = codePoint\n\n continue\n }\n\n // 2 leads in a row\n if (codePoint < 0xDC00) {\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n leadSurrogate = codePoint\n continue\n }\n\n // valid surrogate pair\n codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n } else if (leadSurrogate) {\n // valid bmp char, but last char was a lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n }\n\n leadSurrogate = null\n\n // encode utf8\n if (codePoint < 0x80) {\n if ((units -= 1) < 0) break\n bytes.push(codePoint)\n } else if (codePoint < 0x800) {\n if ((units -= 2) < 0) break\n bytes.push(\n codePoint >> 0x6 | 0xC0,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x10000) {\n if ((units -= 3) < 0) break\n bytes.push(\n codePoint >> 0xC | 0xE0,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x110000) {\n if ((units -= 4) < 0) break\n bytes.push(\n codePoint >> 0x12 | 0xF0,\n codePoint >> 0xC & 0x3F | 0x80,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else {\n throw new Error('Invalid code point')\n }\n }\n\n return bytes\n}\n\nfunction asciiToBytes (str) {\n const byteArray = []\n for (let i = 0; i < str.length; ++i) {\n // Node's code seems to be doing this and not & 0x7F..\n byteArray.push(str.charCodeAt(i) & 0xFF)\n }\n return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n let c, hi, lo\n const byteArray = []\n for (let i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0) break\n\n c = str.charCodeAt(i)\n hi = c >> 8\n lo = c % 256\n byteArray.push(lo)\n byteArray.push(hi)\n }\n\n return byteArray\n}\n\nfunction base64ToBytes (str) {\n return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n let i\n for (i = 0; i < length; ++i) {\n if ((i + offset >= dst.length) || (i >= src.length)) break\n dst[i + offset] = src[i]\n }\n return i\n}\n\n// ArrayBuffer or Uint8Array objects from other contexts (i.e. iframes) do not pass\n// the `instanceof` check but they should be treated as of that type.\n// See: https://github.com/feross/buffer/issues/166\nfunction isInstance (obj, type) {\n return obj instanceof type ||\n (obj != null && obj.constructor != null && obj.constructor.name != null &&\n obj.constructor.name === type.name)\n}\nfunction numberIsNaN (obj) {\n // For IE11 support\n return obj !== obj // eslint-disable-line no-self-compare\n}\n\n// Create lookup table for `toString('hex')`\n// See: https://github.com/feross/buffer/issues/219\nconst hexSliceLookupTable = (function () {\n const alphabet = '0123456789abcdef'\n const table = new Array(256)\n for (let i = 0; i < 16; ++i) {\n const i16 = i * 16\n for (let j = 0; j < 16; ++j) {\n table[i16 + j] = alphabet[i] + alphabet[j]\n }\n }\n return table\n})()\n\n// Return not function with Error if BigInt not supported\nfunction defineBigIntMethod (fn) {\n return typeof BigInt === 'undefined' ? BufferBigIntNotDefined : fn\n}\n\nfunction BufferBigIntNotDefined () {\n throw new Error('BigInt not supported')\n}\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\nvar R = typeof Reflect === 'object' ? Reflect : null\nvar ReflectApply = R && typeof R.apply === 'function'\n ? R.apply\n : function ReflectApply(target, receiver, args) {\n return Function.prototype.apply.call(target, receiver, args);\n }\n\nvar ReflectOwnKeys\nif (R && typeof R.ownKeys === 'function') {\n ReflectOwnKeys = R.ownKeys\n} else if (Object.getOwnPropertySymbols) {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target)\n .concat(Object.getOwnPropertySymbols(target));\n };\n} else {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target);\n };\n}\n\nfunction ProcessEmitWarning(warning) {\n if (console && console.warn) console.warn(warning);\n}\n\nvar NumberIsNaN = Number.isNaN || function NumberIsNaN(value) {\n return value !== value;\n}\n\nfunction EventEmitter() {\n EventEmitter.init.call(this);\n}\nmodule.exports = EventEmitter;\nmodule.exports.once = once;\n\n// Backwards-compat with node 0.10.x\nEventEmitter.EventEmitter = EventEmitter;\n\nEventEmitter.prototype._events = undefined;\nEventEmitter.prototype._eventsCount = 0;\nEventEmitter.prototype._maxListeners = undefined;\n\n// By default EventEmitters will print a warning if more than 10 listeners are\n// added to it. This is a useful default which helps finding memory leaks.\nvar defaultMaxListeners = 10;\n\nfunction checkListener(listener) {\n if (typeof listener !== 'function') {\n throw new TypeError('The \"listener\" argument must be of type Function. Received type ' + typeof listener);\n }\n}\n\nObject.defineProperty(EventEmitter, 'defaultMaxListeners', {\n enumerable: true,\n get: function() {\n return defaultMaxListeners;\n },\n set: function(arg) {\n if (typeof arg !== 'number' || arg < 0 || NumberIsNaN(arg)) {\n throw new RangeError('The value of \"defaultMaxListeners\" is out of range. It must be a non-negative number. Received ' + arg + '.');\n }\n defaultMaxListeners = arg;\n }\n});\n\nEventEmitter.init = function() {\n\n if (this._events === undefined ||\n this._events === Object.getPrototypeOf(this)._events) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n }\n\n this._maxListeners = this._maxListeners || undefined;\n};\n\n// Obviously not all Emitters should be limited to 10. This function allows\n// that to be increased. Set to zero for unlimited.\nEventEmitter.prototype.setMaxListeners = function setMaxListeners(n) {\n if (typeof n !== 'number' || n < 0 || NumberIsNaN(n)) {\n throw new RangeError('The value of \"n\" is out of range. It must be a non-negative number. Received ' + n + '.');\n }\n this._maxListeners = n;\n return this;\n};\n\nfunction _getMaxListeners(that) {\n if (that._maxListeners === undefined)\n return EventEmitter.defaultMaxListeners;\n return that._maxListeners;\n}\n\nEventEmitter.prototype.getMaxListeners = function getMaxListeners() {\n return _getMaxListeners(this);\n};\n\nEventEmitter.prototype.emit = function emit(type) {\n var args = [];\n for (var i = 1; i < arguments.length; i++) args.push(arguments[i]);\n var doError = (type === 'error');\n\n var events = this._events;\n if (events !== undefined)\n doError = (doError && events.error === undefined);\n else if (!doError)\n return false;\n\n // If there is no 'error' event listener then throw.\n if (doError) {\n var er;\n if (args.length > 0)\n er = args[0];\n if (er instanceof Error) {\n // Note: The comments on the `throw` lines are intentional, they show\n // up in Node's output if this results in an unhandled exception.\n throw er; // Unhandled 'error' event\n }\n // At least give some kind of context to the user\n var err = new Error('Unhandled error.' + (er ? ' (' + er.message + ')' : ''));\n err.context = er;\n throw err; // Unhandled 'error' event\n }\n\n var handler = events[type];\n\n if (handler === undefined)\n return false;\n\n if (typeof handler === 'function') {\n ReflectApply(handler, this, args);\n } else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n ReflectApply(listeners[i], this, args);\n }\n\n return true;\n};\n\nfunction _addListener(target, type, listener, prepend) {\n var m;\n var events;\n var existing;\n\n checkListener(listener);\n\n events = target._events;\n if (events === undefined) {\n events = target._events = Object.create(null);\n target._eventsCount = 0;\n } else {\n // To avoid recursion in the case that type === \"newListener\"! Before\n // adding it to the listeners, first emit \"newListener\".\n if (events.newListener !== undefined) {\n target.emit('newListener', type,\n listener.listener ? listener.listener : listener);\n\n // Re-assign `events` because a newListener handler could have caused the\n // this._events to be assigned to a new object\n events = target._events;\n }\n existing = events[type];\n }\n\n if (existing === undefined) {\n // Optimize the case of one listener. Don't need the extra array object.\n existing = events[type] = listener;\n ++target._eventsCount;\n } else {\n if (typeof existing === 'function') {\n // Adding the second element, need to change to array.\n existing = events[type] =\n prepend ? [listener, existing] : [existing, listener];\n // If we've already got an array, just append.\n } else if (prepend) {\n existing.unshift(listener);\n } else {\n existing.push(listener);\n }\n\n // Check for listener leak\n m = _getMaxListeners(target);\n if (m > 0 && existing.length > m && !existing.warned) {\n existing.warned = true;\n // No error code for this since it is a Warning\n // eslint-disable-next-line no-restricted-syntax\n var w = new Error('Possible EventEmitter memory leak detected. ' +\n existing.length + ' ' + String(type) + ' listeners ' +\n 'added. Use emitter.setMaxListeners() to ' +\n 'increase limit');\n w.name = 'MaxListenersExceededWarning';\n w.emitter = target;\n w.type = type;\n w.count = existing.length;\n ProcessEmitWarning(w);\n }\n }\n\n return target;\n}\n\nEventEmitter.prototype.addListener = function addListener(type, listener) {\n return _addListener(this, type, listener, false);\n};\n\nEventEmitter.prototype.on = EventEmitter.prototype.addListener;\n\nEventEmitter.prototype.prependListener =\n function prependListener(type, listener) {\n return _addListener(this, type, listener, true);\n };\n\nfunction onceWrapper() {\n if (!this.fired) {\n this.target.removeListener(this.type, this.wrapFn);\n this.fired = true;\n if (arguments.length === 0)\n return this.listener.call(this.target);\n return this.listener.apply(this.target, arguments);\n }\n}\n\nfunction _onceWrap(target, type, listener) {\n var state = { fired: false, wrapFn: undefined, target: target, type: type, listener: listener };\n var wrapped = onceWrapper.bind(state);\n wrapped.listener = listener;\n state.wrapFn = wrapped;\n return wrapped;\n}\n\nEventEmitter.prototype.once = function once(type, listener) {\n checkListener(listener);\n this.on(type, _onceWrap(this, type, listener));\n return this;\n};\n\nEventEmitter.prototype.prependOnceListener =\n function prependOnceListener(type, listener) {\n checkListener(listener);\n this.prependListener(type, _onceWrap(this, type, listener));\n return this;\n };\n\n// Emits a 'removeListener' event if and only if the listener was removed.\nEventEmitter.prototype.removeListener =\n function removeListener(type, listener) {\n var list, events, position, i, originalListener;\n\n checkListener(listener);\n\n events = this._events;\n if (events === undefined)\n return this;\n\n list = events[type];\n if (list === undefined)\n return this;\n\n if (list === listener || list.listener === listener) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else {\n delete events[type];\n if (events.removeListener)\n this.emit('removeListener', type, list.listener || listener);\n }\n } else if (typeof list !== 'function') {\n position = -1;\n\n for (i = list.length - 1; i >= 0; i--) {\n if (list[i] === listener || list[i].listener === listener) {\n originalListener = list[i].listener;\n position = i;\n break;\n }\n }\n\n if (position < 0)\n return this;\n\n if (position === 0)\n list.shift();\n else {\n spliceOne(list, position);\n }\n\n if (list.length === 1)\n events[type] = list[0];\n\n if (events.removeListener !== undefined)\n this.emit('removeListener', type, originalListener || listener);\n }\n\n return this;\n };\n\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\n\nEventEmitter.prototype.removeAllListeners =\n function removeAllListeners(type) {\n var listeners, events, i;\n\n events = this._events;\n if (events === undefined)\n return this;\n\n // not listening for removeListener, no need to emit\n if (events.removeListener === undefined) {\n if (arguments.length === 0) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n } else if (events[type] !== undefined) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else\n delete events[type];\n }\n return this;\n }\n\n // emit removeListener for all listeners on all events\n if (arguments.length === 0) {\n var keys = Object.keys(events);\n var key;\n for (i = 0; i < keys.length; ++i) {\n key = keys[i];\n if (key === 'removeListener') continue;\n this.removeAllListeners(key);\n }\n this.removeAllListeners('removeListener');\n this._events = Object.create(null);\n this._eventsCount = 0;\n return this;\n }\n\n listeners = events[type];\n\n if (typeof listeners === 'function') {\n this.removeListener(type, listeners);\n } else if (listeners !== undefined) {\n // LIFO order\n for (i = listeners.length - 1; i >= 0; i--) {\n this.removeListener(type, listeners[i]);\n }\n }\n\n return this;\n };\n\nfunction _listeners(target, type, unwrap) {\n var events = target._events;\n\n if (events === undefined)\n return [];\n\n var evlistener = events[type];\n if (evlistener === undefined)\n return [];\n\n if (typeof evlistener === 'function')\n return unwrap ? [evlistener.listener || evlistener] : [evlistener];\n\n return unwrap ?\n unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length);\n}\n\nEventEmitter.prototype.listeners = function listeners(type) {\n return _listeners(this, type, true);\n};\n\nEventEmitter.prototype.rawListeners = function rawListeners(type) {\n return _listeners(this, type, false);\n};\n\nEventEmitter.listenerCount = function(emitter, type) {\n if (typeof emitter.listenerCount === 'function') {\n return emitter.listenerCount(type);\n } else {\n return listenerCount.call(emitter, type);\n }\n};\n\nEventEmitter.prototype.listenerCount = listenerCount;\nfunction listenerCount(type) {\n var events = this._events;\n\n if (events !== undefined) {\n var evlistener = events[type];\n\n if (typeof evlistener === 'function') {\n return 1;\n } else if (evlistener !== undefined) {\n return evlistener.length;\n }\n }\n\n return 0;\n}\n\nEventEmitter.prototype.eventNames = function eventNames() {\n return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : [];\n};\n\nfunction arrayClone(arr, n) {\n var copy = new Array(n);\n for (var i = 0; i < n; ++i)\n copy[i] = arr[i];\n return copy;\n}\n\nfunction spliceOne(list, index) {\n for (; index + 1 < list.length; index++)\n list[index] = list[index + 1];\n list.pop();\n}\n\nfunction unwrapListeners(arr) {\n var ret = new Array(arr.length);\n for (var i = 0; i < ret.length; ++i) {\n ret[i] = arr[i].listener || arr[i];\n }\n return ret;\n}\n\nfunction once(emitter, name) {\n return new Promise(function (resolve, reject) {\n function errorListener(err) {\n emitter.removeListener(name, resolver);\n reject(err);\n }\n\n function resolver() {\n if (typeof emitter.removeListener === 'function') {\n emitter.removeListener('error', errorListener);\n }\n resolve([].slice.call(arguments));\n };\n\n eventTargetAgnosticAddListener(emitter, name, resolver, { once: true });\n if (name !== 'error') {\n addErrorHandlerIfEventEmitter(emitter, errorListener, { once: true });\n }\n });\n}\n\nfunction addErrorHandlerIfEventEmitter(emitter, handler, flags) {\n if (typeof emitter.on === 'function') {\n eventTargetAgnosticAddListener(emitter, 'error', handler, flags);\n }\n}\n\nfunction eventTargetAgnosticAddListener(emitter, name, listener, flags) {\n if (typeof emitter.on === 'function') {\n if (flags.once) {\n emitter.once(name, listener);\n } else {\n emitter.on(name, listener);\n }\n } else if (typeof emitter.addEventListener === 'function') {\n // EventTarget does not have `error` event semantics like Node\n // EventEmitters, we do not listen for `error` events here.\n emitter.addEventListener(name, function wrapListener(arg) {\n // IE does not have builtin `{ once: true }` support so we\n // have to do it manually.\n if (flags.once) {\n emitter.removeEventListener(name, wrapListener);\n }\n listener(arg);\n });\n } else {\n throw new TypeError('The \"emitter\" argument must be of type EventEmitter. Received type ' + typeof emitter);\n }\n}\n","/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */\nexports.read = function (buffer, offset, isLE, mLen, nBytes) {\n var e, m\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var nBits = -7\n var i = isLE ? (nBytes - 1) : 0\n var d = isLE ? -1 : 1\n var s = buffer[offset + i]\n\n i += d\n\n e = s & ((1 << (-nBits)) - 1)\n s >>= (-nBits)\n nBits += eLen\n for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & ((1 << (-nBits)) - 1)\n e >>= (-nBits)\n nBits += mLen\n for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias\n } else if (e === eMax) {\n return m ? NaN : ((s ? -1 : 1) * Infinity)\n } else {\n m = m + Math.pow(2, mLen)\n e = e - eBias\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n var i = isLE ? 0 : (nBytes - 1)\n var d = isLE ? 1 : -1\n var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n value = Math.abs(value)\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0\n e = eMax\n } else {\n e = Math.floor(Math.log(value) / Math.LN2)\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--\n c *= 2\n }\n if (e + eBias >= 1) {\n value += rt / c\n } else {\n value += rt * Math.pow(2, 1 - eBias)\n }\n if (value * c >= 2) {\n e++\n c /= 2\n }\n\n if (e + eBias >= eMax) {\n m = 0\n e = eMax\n } else if (e + eBias >= 1) {\n m = ((value * c) - 1) * Math.pow(2, mLen)\n e = e + eBias\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n e = 0\n }\n }\n\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n e = (e << mLen) | m\n eLen += mLen\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128\n}\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView');\n\nmodule.exports = DataView;\n","var hashClear = require('./_hashClear'),\n hashDelete = require('./_hashDelete'),\n hashGet = require('./_hashGet'),\n hashHas = require('./_hashHas'),\n hashSet = require('./_hashSet');\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\nmodule.exports = Hash;\n","var listCacheClear = require('./_listCacheClear'),\n listCacheDelete = require('./_listCacheDelete'),\n listCacheGet = require('./_listCacheGet'),\n listCacheHas = require('./_listCacheHas'),\n listCacheSet = require('./_listCacheSet');\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\nmodule.exports = ListCache;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map');\n\nmodule.exports = Map;\n","var mapCacheClear = require('./_mapCacheClear'),\n mapCacheDelete = require('./_mapCacheDelete'),\n mapCacheGet = require('./_mapCacheGet'),\n mapCacheHas = require('./_mapCacheHas'),\n mapCacheSet = require('./_mapCacheSet');\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\nmodule.exports = MapCache;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Promise = getNative(root, 'Promise');\n\nmodule.exports = Promise;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Set = getNative(root, 'Set');\n\nmodule.exports = Set;\n","var MapCache = require('./_MapCache'),\n setCacheAdd = require('./_setCacheAdd'),\n setCacheHas = require('./_setCacheHas');\n\n/**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\nfunction SetCache(values) {\n var index = -1,\n length = values == null ? 0 : values.length;\n\n this.__data__ = new MapCache;\n while (++index < length) {\n this.add(values[index]);\n }\n}\n\n// Add methods to `SetCache`.\nSetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\nSetCache.prototype.has = setCacheHas;\n\nmodule.exports = SetCache;\n","var ListCache = require('./_ListCache'),\n stackClear = require('./_stackClear'),\n stackDelete = require('./_stackDelete'),\n stackGet = require('./_stackGet'),\n stackHas = require('./_stackHas'),\n stackSet = require('./_stackSet');\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\nmodule.exports = Stack;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Uint8Array = root.Uint8Array;\n\nmodule.exports = Uint8Array;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar WeakMap = getNative(root, 'WeakMap');\n\nmodule.exports = WeakMap;\n","/**\n * A specialized version of `_.forEach` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\nfunction arrayEach(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (iteratee(array[index], index, array) === false) {\n break;\n }\n }\n return array;\n}\n\nmodule.exports = arrayEach;\n","/**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\nfunction arrayFilter(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result[resIndex++] = value;\n }\n }\n return result;\n}\n\nmodule.exports = arrayFilter;\n","var baseTimes = require('./_baseTimes'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isIndex = require('./_isIndex'),\n isTypedArray = require('./isTypedArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = arrayLikeKeys;\n","/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n}\n\nmodule.exports = arrayPush;\n","/**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\nfunction arraySome(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (predicate(array[index], index, array)) {\n return true;\n }\n }\n return false;\n}\n\nmodule.exports = arraySome;\n","var baseAssignValue = require('./_baseAssignValue'),\n eq = require('./eq');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\nmodule.exports = assignValue;\n","var eq = require('./eq');\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\nmodule.exports = assocIndexOf;\n","var copyObject = require('./_copyObject'),\n keys = require('./keys');\n\n/**\n * The base implementation of `_.assign` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssign(object, source) {\n return object && copyObject(source, keys(source), object);\n}\n\nmodule.exports = baseAssign;\n","var copyObject = require('./_copyObject'),\n keysIn = require('./keysIn');\n\n/**\n * The base implementation of `_.assignIn` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssignIn(object, source) {\n return object && copyObject(source, keysIn(source), object);\n}\n\nmodule.exports = baseAssignIn;\n","var defineProperty = require('./_defineProperty');\n\n/**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction baseAssignValue(object, key, value) {\n if (key == '__proto__' && defineProperty) {\n defineProperty(object, key, {\n 'configurable': true,\n 'enumerable': true,\n 'value': value,\n 'writable': true\n });\n } else {\n object[key] = value;\n }\n}\n\nmodule.exports = baseAssignValue;\n","var Stack = require('./_Stack'),\n arrayEach = require('./_arrayEach'),\n assignValue = require('./_assignValue'),\n baseAssign = require('./_baseAssign'),\n baseAssignIn = require('./_baseAssignIn'),\n cloneBuffer = require('./_cloneBuffer'),\n copyArray = require('./_copyArray'),\n copySymbols = require('./_copySymbols'),\n copySymbolsIn = require('./_copySymbolsIn'),\n getAllKeys = require('./_getAllKeys'),\n getAllKeysIn = require('./_getAllKeysIn'),\n getTag = require('./_getTag'),\n initCloneArray = require('./_initCloneArray'),\n initCloneByTag = require('./_initCloneByTag'),\n initCloneObject = require('./_initCloneObject'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isMap = require('./isMap'),\n isObject = require('./isObject'),\n isSet = require('./isSet'),\n keys = require('./keys'),\n keysIn = require('./keysIn');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_FLAT_FLAG = 2,\n CLONE_SYMBOLS_FLAG = 4;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values supported by `_.clone`. */\nvar cloneableTags = {};\ncloneableTags[argsTag] = cloneableTags[arrayTag] =\ncloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =\ncloneableTags[boolTag] = cloneableTags[dateTag] =\ncloneableTags[float32Tag] = cloneableTags[float64Tag] =\ncloneableTags[int8Tag] = cloneableTags[int16Tag] =\ncloneableTags[int32Tag] = cloneableTags[mapTag] =\ncloneableTags[numberTag] = cloneableTags[objectTag] =\ncloneableTags[regexpTag] = cloneableTags[setTag] =\ncloneableTags[stringTag] = cloneableTags[symbolTag] =\ncloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =\ncloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;\ncloneableTags[errorTag] = cloneableTags[funcTag] =\ncloneableTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.clone` and `_.cloneDeep` which tracks\n * traversed objects.\n *\n * @private\n * @param {*} value The value to clone.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Deep clone\n * 2 - Flatten inherited properties\n * 4 - Clone symbols\n * @param {Function} [customizer] The function to customize cloning.\n * @param {string} [key] The key of `value`.\n * @param {Object} [object] The parent object of `value`.\n * @param {Object} [stack] Tracks traversed objects and their clone counterparts.\n * @returns {*} Returns the cloned value.\n */\nfunction baseClone(value, bitmask, customizer, key, object, stack) {\n var result,\n isDeep = bitmask & CLONE_DEEP_FLAG,\n isFlat = bitmask & CLONE_FLAT_FLAG,\n isFull = bitmask & CLONE_SYMBOLS_FLAG;\n\n if (customizer) {\n result = object ? customizer(value, key, object, stack) : customizer(value);\n }\n if (result !== undefined) {\n return result;\n }\n if (!isObject(value)) {\n return value;\n }\n var isArr = isArray(value);\n if (isArr) {\n result = initCloneArray(value);\n if (!isDeep) {\n return copyArray(value, result);\n }\n } else {\n var tag = getTag(value),\n isFunc = tag == funcTag || tag == genTag;\n\n if (isBuffer(value)) {\n return cloneBuffer(value, isDeep);\n }\n if (tag == objectTag || tag == argsTag || (isFunc && !object)) {\n result = (isFlat || isFunc) ? {} : initCloneObject(value);\n if (!isDeep) {\n return isFlat\n ? copySymbolsIn(value, baseAssignIn(result, value))\n : copySymbols(value, baseAssign(result, value));\n }\n } else {\n if (!cloneableTags[tag]) {\n return object ? value : {};\n }\n result = initCloneByTag(value, tag, isDeep);\n }\n }\n // Check for circular references and return its corresponding clone.\n stack || (stack = new Stack);\n var stacked = stack.get(value);\n if (stacked) {\n return stacked;\n }\n stack.set(value, result);\n\n if (isSet(value)) {\n value.forEach(function(subValue) {\n result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));\n });\n } else if (isMap(value)) {\n value.forEach(function(subValue, key) {\n result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n }\n\n var keysFunc = isFull\n ? (isFlat ? getAllKeysIn : getAllKeys)\n : (isFlat ? keysIn : keys);\n\n var props = isArr ? undefined : keysFunc(value);\n arrayEach(props || value, function(subValue, key) {\n if (props) {\n key = subValue;\n subValue = value[key];\n }\n // Recursively populate clone (susceptible to call stack limits).\n assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n return result;\n}\n\nmodule.exports = baseClone;\n","var isObject = require('./isObject');\n\n/** Built-in value references. */\nvar objectCreate = Object.create;\n\n/**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} proto The object to inherit from.\n * @returns {Object} Returns the new object.\n */\nvar baseCreate = (function() {\n function object() {}\n return function(proto) {\n if (!isObject(proto)) {\n return {};\n }\n if (objectCreate) {\n return objectCreate(proto);\n }\n object.prototype = proto;\n var result = new object;\n object.prototype = undefined;\n return result;\n };\n}());\n\nmodule.exports = baseCreate;\n","var arrayPush = require('./_arrayPush'),\n isArray = require('./isArray');\n\n/**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction baseGetAllKeys(object, keysFunc, symbolsFunc) {\n var result = keysFunc(object);\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n}\n\nmodule.exports = baseGetAllKeys;\n","var Symbol = require('./_Symbol'),\n getRawTag = require('./_getRawTag'),\n objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]';\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\nmodule.exports = baseIsArguments;\n","var baseIsEqualDeep = require('./_baseIsEqualDeep'),\n isObjectLike = require('./isObjectLike');\n\n/**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Unordered comparison\n * 2 - Partial comparison\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\nfunction baseIsEqual(value, other, bitmask, customizer, stack) {\n if (value === other) {\n return true;\n }\n if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\n return value !== value && other !== other;\n }\n return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n}\n\nmodule.exports = baseIsEqual;\n","var Stack = require('./_Stack'),\n equalArrays = require('./_equalArrays'),\n equalByTag = require('./_equalByTag'),\n equalObjects = require('./_equalObjects'),\n getTag = require('./_getTag'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isTypedArray = require('./isTypedArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n var objIsArr = isArray(object),\n othIsArr = isArray(other),\n objTag = objIsArr ? arrayTag : getTag(object),\n othTag = othIsArr ? arrayTag : getTag(other);\n\n objTag = objTag == argsTag ? objectTag : objTag;\n othTag = othTag == argsTag ? objectTag : othTag;\n\n var objIsObj = objTag == objectTag,\n othIsObj = othTag == objectTag,\n isSameTag = objTag == othTag;\n\n if (isSameTag && isBuffer(object)) {\n if (!isBuffer(other)) {\n return false;\n }\n objIsArr = true;\n objIsObj = false;\n }\n if (isSameTag && !objIsObj) {\n stack || (stack = new Stack);\n return (objIsArr || isTypedArray(object))\n ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n }\n if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n if (objIsWrapped || othIsWrapped) {\n var objUnwrapped = objIsWrapped ? object.value() : object,\n othUnwrapped = othIsWrapped ? other.value() : other;\n\n stack || (stack = new Stack);\n return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n }\n }\n if (!isSameTag) {\n return false;\n }\n stack || (stack = new Stack);\n return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n}\n\nmodule.exports = baseIsEqualDeep;\n","var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]';\n\n/**\n * The base implementation of `_.isMap` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n */\nfunction baseIsMap(value) {\n return isObjectLike(value) && getTag(value) == mapTag;\n}\n\nmodule.exports = baseIsMap;\n","var isFunction = require('./isFunction'),\n isMasked = require('./_isMasked'),\n isObject = require('./isObject'),\n toSource = require('./_toSource');\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\nmodule.exports = baseIsNative;\n","var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar setTag = '[object Set]';\n\n/**\n * The base implementation of `_.isSet` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n */\nfunction baseIsSet(value) {\n return isObjectLike(value) && getTag(value) == setTag;\n}\n\nmodule.exports = baseIsSet;\n","var baseGetTag = require('./_baseGetTag'),\n isLength = require('./isLength'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n\nmodule.exports = baseIsTypedArray;\n","var isPrototype = require('./_isPrototype'),\n nativeKeys = require('./_nativeKeys');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeys;\n","var isObject = require('./isObject'),\n isPrototype = require('./_isPrototype'),\n nativeKeysIn = require('./_nativeKeysIn');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeysIn(object) {\n if (!isObject(object)) {\n return nativeKeysIn(object);\n }\n var isProto = isPrototype(object),\n result = [];\n\n for (var key in object) {\n if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeysIn;\n","/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\nmodule.exports = baseTimes;\n","/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n return function(value) {\n return func(value);\n };\n}\n\nmodule.exports = baseUnary;\n","/**\n * Checks if a `cache` value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction cacheHas(cache, key) {\n return cache.has(key);\n}\n\nmodule.exports = cacheHas;\n","var Uint8Array = require('./_Uint8Array');\n\n/**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\nfunction cloneArrayBuffer(arrayBuffer) {\n var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n return result;\n}\n\nmodule.exports = cloneArrayBuffer;\n","var root = require('./_root');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined,\n allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;\n\n/**\n * Creates a clone of `buffer`.\n *\n * @private\n * @param {Buffer} buffer The buffer to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Buffer} Returns the cloned buffer.\n */\nfunction cloneBuffer(buffer, isDeep) {\n if (isDeep) {\n return buffer.slice();\n }\n var length = buffer.length,\n result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\n\n buffer.copy(result);\n return result;\n}\n\nmodule.exports = cloneBuffer;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer');\n\n/**\n * Creates a clone of `dataView`.\n *\n * @private\n * @param {Object} dataView The data view to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned data view.\n */\nfunction cloneDataView(dataView, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;\n return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);\n}\n\nmodule.exports = cloneDataView;\n","/** Used to match `RegExp` flags from their coerced string values. */\nvar reFlags = /\\w*$/;\n\n/**\n * Creates a clone of `regexp`.\n *\n * @private\n * @param {Object} regexp The regexp to clone.\n * @returns {Object} Returns the cloned regexp.\n */\nfunction cloneRegExp(regexp) {\n var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));\n result.lastIndex = regexp.lastIndex;\n return result;\n}\n\nmodule.exports = cloneRegExp;\n","var Symbol = require('./_Symbol');\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * Creates a clone of the `symbol` object.\n *\n * @private\n * @param {Object} symbol The symbol object to clone.\n * @returns {Object} Returns the cloned symbol object.\n */\nfunction cloneSymbol(symbol) {\n return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};\n}\n\nmodule.exports = cloneSymbol;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer');\n\n/**\n * Creates a clone of `typedArray`.\n *\n * @private\n * @param {Object} typedArray The typed array to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned typed array.\n */\nfunction cloneTypedArray(typedArray, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n}\n\nmodule.exports = cloneTypedArray;\n","/**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\nfunction copyArray(source, array) {\n var index = -1,\n length = source.length;\n\n array || (array = Array(length));\n while (++index < length) {\n array[index] = source[index];\n }\n return array;\n}\n\nmodule.exports = copyArray;\n","var assignValue = require('./_assignValue'),\n baseAssignValue = require('./_baseAssignValue');\n\n/**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\nfunction copyObject(source, props, object, customizer) {\n var isNew = !object;\n object || (object = {});\n\n var index = -1,\n length = props.length;\n\n while (++index < length) {\n var key = props[index];\n\n var newValue = customizer\n ? customizer(object[key], source[key], key, object, source)\n : undefined;\n\n if (newValue === undefined) {\n newValue = source[key];\n }\n if (isNew) {\n baseAssignValue(object, key, newValue);\n } else {\n assignValue(object, key, newValue);\n }\n }\n return object;\n}\n\nmodule.exports = copyObject;\n","var copyObject = require('./_copyObject'),\n getSymbols = require('./_getSymbols');\n\n/**\n * Copies own symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbols(source, object) {\n return copyObject(source, getSymbols(source), object);\n}\n\nmodule.exports = copySymbols;\n","var copyObject = require('./_copyObject'),\n getSymbolsIn = require('./_getSymbolsIn');\n\n/**\n * Copies own and inherited symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbolsIn(source, object) {\n return copyObject(source, getSymbolsIn(source), object);\n}\n\nmodule.exports = copySymbolsIn;\n","var root = require('./_root');\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\nmodule.exports = coreJsData;\n","var getNative = require('./_getNative');\n\nvar defineProperty = (function() {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n}());\n\nmodule.exports = defineProperty;\n","var SetCache = require('./_SetCache'),\n arraySome = require('./_arraySome'),\n cacheHas = require('./_cacheHas');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\nfunction equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n arrLength = array.length,\n othLength = other.length;\n\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n return false;\n }\n // Check that cyclic values are equal.\n var arrStacked = stack.get(array);\n var othStacked = stack.get(other);\n if (arrStacked && othStacked) {\n return arrStacked == other && othStacked == array;\n }\n var index = -1,\n result = true,\n seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n stack.set(array, other);\n stack.set(other, array);\n\n // Ignore non-index properties.\n while (++index < arrLength) {\n var arrValue = array[index],\n othValue = other[index];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, arrValue, index, other, array, stack)\n : customizer(arrValue, othValue, index, array, other, stack);\n }\n if (compared !== undefined) {\n if (compared) {\n continue;\n }\n result = false;\n break;\n }\n // Recursively compare arrays (susceptible to call stack limits).\n if (seen) {\n if (!arraySome(other, function(othValue, othIndex) {\n if (!cacheHas(seen, othIndex) &&\n (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n return seen.push(othIndex);\n }\n })) {\n result = false;\n break;\n }\n } else if (!(\n arrValue === othValue ||\n equalFunc(arrValue, othValue, bitmask, customizer, stack)\n )) {\n result = false;\n break;\n }\n }\n stack['delete'](array);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalArrays;\n","var Symbol = require('./_Symbol'),\n Uint8Array = require('./_Uint8Array'),\n eq = require('./eq'),\n equalArrays = require('./_equalArrays'),\n mapToArray = require('./_mapToArray'),\n setToArray = require('./_setToArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]';\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n switch (tag) {\n case dataViewTag:\n if ((object.byteLength != other.byteLength) ||\n (object.byteOffset != other.byteOffset)) {\n return false;\n }\n object = object.buffer;\n other = other.buffer;\n\n case arrayBufferTag:\n if ((object.byteLength != other.byteLength) ||\n !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n return false;\n }\n return true;\n\n case boolTag:\n case dateTag:\n case numberTag:\n // Coerce booleans to `1` or `0` and dates to milliseconds.\n // Invalid dates are coerced to `NaN`.\n return eq(+object, +other);\n\n case errorTag:\n return object.name == other.name && object.message == other.message;\n\n case regexpTag:\n case stringTag:\n // Coerce regexes to strings and treat strings, primitives and objects,\n // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n // for more details.\n return object == (other + '');\n\n case mapTag:\n var convert = mapToArray;\n\n case setTag:\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n convert || (convert = setToArray);\n\n if (object.size != other.size && !isPartial) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked) {\n return stacked == other;\n }\n bitmask |= COMPARE_UNORDERED_FLAG;\n\n // Recursively compare objects (susceptible to call stack limits).\n stack.set(object, other);\n var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n stack['delete'](object);\n return result;\n\n case symbolTag:\n if (symbolValueOf) {\n return symbolValueOf.call(object) == symbolValueOf.call(other);\n }\n }\n return false;\n}\n\nmodule.exports = equalByTag;\n","var getAllKeys = require('./_getAllKeys');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n objProps = getAllKeys(object),\n objLength = objProps.length,\n othProps = getAllKeys(other),\n othLength = othProps.length;\n\n if (objLength != othLength && !isPartial) {\n return false;\n }\n var index = objLength;\n while (index--) {\n var key = objProps[index];\n if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n return false;\n }\n }\n // Check that cyclic values are equal.\n var objStacked = stack.get(object);\n var othStacked = stack.get(other);\n if (objStacked && othStacked) {\n return objStacked == other && othStacked == object;\n }\n var result = true;\n stack.set(object, other);\n stack.set(other, object);\n\n var skipCtor = isPartial;\n while (++index < objLength) {\n key = objProps[index];\n var objValue = object[key],\n othValue = other[key];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, objValue, key, other, object, stack)\n : customizer(objValue, othValue, key, object, other, stack);\n }\n // Recursively compare objects (susceptible to call stack limits).\n if (!(compared === undefined\n ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n : compared\n )) {\n result = false;\n break;\n }\n skipCtor || (skipCtor = key == 'constructor');\n }\n if (result && !skipCtor) {\n var objCtor = object.constructor,\n othCtor = other.constructor;\n\n // Non `Object` object instances with different constructors are not equal.\n if (objCtor != othCtor &&\n ('constructor' in object && 'constructor' in other) &&\n !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n result = false;\n }\n }\n stack['delete'](object);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalObjects;\n","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n","var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbols = require('./_getSymbols'),\n keys = require('./keys');\n\n/**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeys(object) {\n return baseGetAllKeys(object, keys, getSymbols);\n}\n\nmodule.exports = getAllKeys;\n","var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbolsIn = require('./_getSymbolsIn'),\n keysIn = require('./keysIn');\n\n/**\n * Creates an array of own and inherited enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeysIn(object) {\n return baseGetAllKeys(object, keysIn, getSymbolsIn);\n}\n\nmodule.exports = getAllKeysIn;\n","var isKeyable = require('./_isKeyable');\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\nmodule.exports = getMapData;\n","var baseIsNative = require('./_baseIsNative'),\n getValue = require('./_getValue');\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\nmodule.exports = getNative;\n","var overArg = require('./_overArg');\n\n/** Built-in value references. */\nvar getPrototype = overArg(Object.getPrototypeOf, Object);\n\nmodule.exports = getPrototype;\n","var Symbol = require('./_Symbol');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nmodule.exports = getRawTag;\n","var arrayFilter = require('./_arrayFilter'),\n stubArray = require('./stubArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n if (object == null) {\n return [];\n }\n object = Object(object);\n return arrayFilter(nativeGetSymbols(object), function(symbol) {\n return propertyIsEnumerable.call(object, symbol);\n });\n};\n\nmodule.exports = getSymbols;\n","var arrayPush = require('./_arrayPush'),\n getPrototype = require('./_getPrototype'),\n getSymbols = require('./_getSymbols'),\n stubArray = require('./stubArray');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own and inherited enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {\n var result = [];\n while (object) {\n arrayPush(result, getSymbols(object));\n object = getPrototype(object);\n }\n return result;\n};\n\nmodule.exports = getSymbolsIn;\n","var DataView = require('./_DataView'),\n Map = require('./_Map'),\n Promise = require('./_Promise'),\n Set = require('./_Set'),\n WeakMap = require('./_WeakMap'),\n baseGetTag = require('./_baseGetTag'),\n toSource = require('./_toSource');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n setTag = '[object Set]',\n weakMapTag = '[object WeakMap]';\n\nvar dataViewTag = '[object DataView]';\n\n/** Used to detect maps, sets, and weakmaps. */\nvar dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nvar getTag = baseGetTag;\n\n// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\nif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = baseGetTag(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : '';\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n}\n\nmodule.exports = getTag;\n","/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\nmodule.exports = getValue;\n","var nativeCreate = require('./_nativeCreate');\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n}\n\nmodule.exports = hashClear;\n","/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = hashDelete;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\nmodule.exports = hashGet;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\nmodule.exports = hashHas;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\nmodule.exports = hashSet;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Initializes an array clone.\n *\n * @private\n * @param {Array} array The array to clone.\n * @returns {Array} Returns the initialized clone.\n */\nfunction initCloneArray(array) {\n var length = array.length,\n result = new array.constructor(length);\n\n // Add properties assigned by `RegExp#exec`.\n if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {\n result.index = array.index;\n result.input = array.input;\n }\n return result;\n}\n\nmodule.exports = initCloneArray;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer'),\n cloneDataView = require('./_cloneDataView'),\n cloneRegExp = require('./_cloneRegExp'),\n cloneSymbol = require('./_cloneSymbol'),\n cloneTypedArray = require('./_cloneTypedArray');\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/**\n * Initializes an object clone based on its `toStringTag`.\n *\n * **Note:** This function only supports cloning values with tags of\n * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.\n *\n * @private\n * @param {Object} object The object to clone.\n * @param {string} tag The `toStringTag` of the object to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneByTag(object, tag, isDeep) {\n var Ctor = object.constructor;\n switch (tag) {\n case arrayBufferTag:\n return cloneArrayBuffer(object);\n\n case boolTag:\n case dateTag:\n return new Ctor(+object);\n\n case dataViewTag:\n return cloneDataView(object, isDeep);\n\n case float32Tag: case float64Tag:\n case int8Tag: case int16Tag: case int32Tag:\n case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:\n return cloneTypedArray(object, isDeep);\n\n case mapTag:\n return new Ctor;\n\n case numberTag:\n case stringTag:\n return new Ctor(object);\n\n case regexpTag:\n return cloneRegExp(object);\n\n case setTag:\n return new Ctor;\n\n case symbolTag:\n return cloneSymbol(object);\n }\n}\n\nmodule.exports = initCloneByTag;\n","var baseCreate = require('./_baseCreate'),\n getPrototype = require('./_getPrototype'),\n isPrototype = require('./_isPrototype');\n\n/**\n * Initializes an object clone.\n *\n * @private\n * @param {Object} object The object to clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneObject(object) {\n return (typeof object.constructor == 'function' && !isPrototype(object))\n ? baseCreate(getPrototype(object))\n : {};\n}\n\nmodule.exports = initCloneObject;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n var type = typeof value;\n length = length == null ? MAX_SAFE_INTEGER : length;\n\n return !!length &&\n (type == 'number' ||\n (type != 'symbol' && reIsUint.test(value))) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\nmodule.exports = isIndex;\n","/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\nmodule.exports = isKeyable;\n","var coreJsData = require('./_coreJsData');\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\nmodule.exports = isMasked;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\nmodule.exports = isPrototype;\n","/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n}\n\nmodule.exports = listCacheClear;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype;\n\n/** Built-in value references. */\nvar splice = arrayProto.splice;\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n}\n\nmodule.exports = listCacheDelete;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\nmodule.exports = listCacheGet;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\nmodule.exports = listCacheHas;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\nmodule.exports = listCacheSet;\n","var Hash = require('./_Hash'),\n ListCache = require('./_ListCache'),\n Map = require('./_Map');\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\nmodule.exports = mapCacheClear;\n","var getMapData = require('./_getMapData');\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = mapCacheDelete;\n","var getMapData = require('./_getMapData');\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\nmodule.exports = mapCacheGet;\n","var getMapData = require('./_getMapData');\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\nmodule.exports = mapCacheHas;\n","var getMapData = require('./_getMapData');\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n}\n\nmodule.exports = mapCacheSet;\n","/**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\nfunction mapToArray(map) {\n var index = -1,\n result = Array(map.size);\n\n map.forEach(function(value, key) {\n result[++index] = [key, value];\n });\n return result;\n}\n\nmodule.exports = mapToArray;\n","var getNative = require('./_getNative');\n\n/* Built-in method references that are verified to be native. */\nvar nativeCreate = getNative(Object, 'create');\n\nmodule.exports = nativeCreate;\n","var overArg = require('./_overArg');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeKeys = overArg(Object.keys, Object);\n\nmodule.exports = nativeKeys;\n","/**\n * This function is like\n * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * except that it includes inherited enumerable properties.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction nativeKeysIn(object) {\n var result = [];\n if (object != null) {\n for (var key in Object(object)) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = nativeKeysIn;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n try {\n // Use `util.types` for Node.js 10+.\n var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n if (types) {\n return types;\n }\n\n // Legacy `process.binding('util')` for Node.js < 10.\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n}());\n\nmodule.exports = nodeUtil;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n","/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\nmodule.exports = overArg;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n","/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\nfunction setCacheAdd(value) {\n this.__data__.set(value, HASH_UNDEFINED);\n return this;\n}\n\nmodule.exports = setCacheAdd;\n","/**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\nfunction setCacheHas(value) {\n return this.__data__.has(value);\n}\n\nmodule.exports = setCacheHas;\n","/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\nfunction setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n}\n\nmodule.exports = setToArray;\n","var ListCache = require('./_ListCache');\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}\n\nmodule.exports = stackClear;\n","/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n var data = this.__data__,\n result = data['delete'](key);\n\n this.size = data.size;\n return result;\n}\n\nmodule.exports = stackDelete;\n","/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n return this.__data__.get(key);\n}\n\nmodule.exports = stackGet;\n","/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n return this.__data__.has(key);\n}\n\nmodule.exports = stackHas;\n","var ListCache = require('./_ListCache'),\n Map = require('./_Map'),\n MapCache = require('./_MapCache');\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n var data = this.__data__;\n if (data instanceof ListCache) {\n var pairs = data.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n this.size = ++data.size;\n return this;\n }\n data = this.__data__ = new MapCache(pairs);\n }\n data.set(key, value);\n this.size = data.size;\n return this;\n}\n\nmodule.exports = stackSet;\n","/** Used for built-in method references. */\nvar funcProto = Function.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\nmodule.exports = toSource;\n","var baseClone = require('./_baseClone');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_SYMBOLS_FLAG = 4;\n\n/**\n * This method is like `_.clone` except that it recursively clones `value`.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Lang\n * @param {*} value The value to recursively clone.\n * @returns {*} Returns the deep cloned value.\n * @see _.clone\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var deep = _.cloneDeep(objects);\n * console.log(deep[0] === objects[0]);\n * // => false\n */\nfunction cloneDeep(value) {\n return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);\n}\n\nmodule.exports = cloneDeep;\n","/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\nmodule.exports = eq;\n","var baseIsArguments = require('./_baseIsArguments'),\n isObjectLike = require('./isObjectLike');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n};\n\nmodule.exports = isArguments;\n","/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\nmodule.exports = isArray;\n","var isFunction = require('./isFunction'),\n isLength = require('./isLength');\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\nmodule.exports = isArrayLike;\n","var root = require('./_root'),\n stubFalse = require('./stubFalse');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\nmodule.exports = isBuffer;\n","var baseIsEqual = require('./_baseIsEqual');\n\n/**\n * Performs a deep comparison between two values to determine if they are\n * equivalent.\n *\n * **Note:** This method supports comparing arrays, array buffers, booleans,\n * date objects, error objects, maps, numbers, `Object` objects, regexes,\n * sets, strings, symbols, and typed arrays. `Object` objects are compared\n * by their own, not inherited, enumerable properties. Functions and DOM\n * nodes are compared by strict equality, i.e. `===`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.isEqual(object, other);\n * // => true\n *\n * object === other;\n * // => false\n */\nfunction isEqual(value, other) {\n return baseIsEqual(value, other);\n}\n\nmodule.exports = isEqual;\n","var baseGetTag = require('./_baseGetTag'),\n isObject = require('./isObject');\n\n/** `Object#toString` result references. */\nvar asyncTag = '[object AsyncFunction]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n proxyTag = '[object Proxy]';\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\nmodule.exports = isFunction;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\nmodule.exports = isLength;\n","var baseIsMap = require('./_baseIsMap'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsMap = nodeUtil && nodeUtil.isMap;\n\n/**\n * Checks if `value` is classified as a `Map` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n * @example\n *\n * _.isMap(new Map);\n * // => true\n *\n * _.isMap(new WeakMap);\n * // => false\n */\nvar isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;\n\nmodule.exports = isMap;\n","/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n","var baseIsSet = require('./_baseIsSet'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsSet = nodeUtil && nodeUtil.isSet;\n\n/**\n * Checks if `value` is classified as a `Set` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n * @example\n *\n * _.isSet(new Set);\n * // => true\n *\n * _.isSet(new WeakSet);\n * // => false\n */\nvar isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;\n\nmodule.exports = isSet;\n","var baseIsTypedArray = require('./_baseIsTypedArray'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\nmodule.exports = isTypedArray;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeys = require('./_baseKeys'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\nmodule.exports = keys;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeysIn = require('./_baseKeysIn'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\nfunction keysIn(object) {\n return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n}\n\nmodule.exports = keysIn;\n","/**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\nfunction stubArray() {\n return [];\n}\n\nmodule.exports = stubArray;\n","/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n return false;\n}\n\nmodule.exports = stubFalse;\n","import { connect, type BaseConnectionOptions } from \"@openfin/core-web\";\nimport { getSettings } from \"./settings\";\n\n/**\n * Initializes the OpenFin Web Broker connection.\n * @param inherit Should we inherit settings from the host (available in the OpenFin layout system) or use settings? Default is true.\n */\nexport async function init(inherit: boolean = true): Promise {\n\t// Set window.fin to the `fin` object.\n\tlet options: BaseConnectionOptions | undefined;\n\tif (window.fin === undefined) {\n\t\tif (!inherit) {\n\t\t\tconst settings = await getSettings();\n\t\t\tif (settings === undefined) {\n\t\t\t\tconsole.error(\n\t\t\t\t\t\"Unable to run the sample as we have been unable to load the web manifest and it's settings from the currently running html page. Please ensure that the web manifest is being served and that it contains the custom_settings section.\"\n\t\t\t\t);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\toptions = {\n\t\t\t\tbrokerUrl: settings.platform.interop.brokerUrl,\n\t\t\t\tinteropConfig: {\n\t\t\t\t\tproviderId: settings.platform.interop.providerId,\n\t\t\t\t\tcurrentContextGroup: settings.platform.interop.defaultContextGroup\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t\t// Specify an interopConfig with a specific provider ID and a context group to initialize the `fin.me.interop` client on connection.\n\t\tif (options) {\n\t\t\twindow.fin = await connect({\n\t\t\t\toptions\n\t\t\t});\n\t\t} else {\n\t\t\twindow.fin = await connect({\n\t\t\t\tconnectionInheritance: \"enabled\"\n\t\t\t});\n\t\t}\n\t\tconsole.log(\"Finished initializing the fin API.\");\n\t\t// Create and dispatch the finReady event\n\t\tconst event = new CustomEvent(\"finReady\");\n\t\twindow.dispatchEvent(event);\n\t}\n\n\tif (window.fdc3 === undefined && window?.fin?.me.interop?.getFDC3Sync !== undefined) {\n\t\twindow.fdc3 = fin.me.interop.getFDC3Sync(\"2.0\");\n\t\tconsole.log(\"Finished initializing the fdc3 API.\");\n\t\t// Create and dispatch the FDC3Ready event\n\t\tconst event = new CustomEvent(\"fdc3Ready\");\n\t\twindow.dispatchEvent(event);\n\t}\n}\n","import type { WebLayoutSnapshot } from \"@openfin/core-web\";\nimport type { Settings } from \"../shapes/setting-shapes\";\n\n/**\n * Fetches the settings for the application.\n * @returns The settings for the application.\n */\nexport async function getSettings(): Promise {\n\tconst settings = await getManifestSettings();\n\tif (settings === undefined) {\n\t\tconsole.error(\n\t\t\t\"Unable to run the example as settings are required and we fetch them from the link web manifest from the html page that is being served. It should exist in the customSettings section of the web manifest.\"\n\t\t);\n\t}\n\treturn settings;\n}\n\n/**\n * Returns a default layout from the settings if provided.\n * @returns The default layout from the settings.\n */\nexport async function getDefaultLayout(): Promise {\n\tconst settings = await getSettings();\n\tif (settings?.platform?.layout?.defaultLayout === undefined) {\n\t\tconsole.error(\n\t\t\t\"Unable to run the example as without a layout being defined. Please ensure that settings have been provided in the web manifest.\"\n\t\t);\n\t\treturn;\n\t}\n\tif (typeof settings.platform.layout.defaultLayout === \"string\") {\n\t\tconst layoutResponse = await fetch(settings.platform.layout.defaultLayout);\n\t\tconst layoutJson = (await layoutResponse.json()) as WebLayoutSnapshot;\n\t\treturn layoutJson;\n\t}\n\treturn settings.platform.layout.defaultLayout;\n}\n\n/**\n * Returns a default layout from the settings if provided.\n * @returns The default layout from the settings.\n */\nexport async function getSecondLayout(): Promise {\n\tconst settings = await getSettings();\n\tif (settings?.platform?.layout?.secondLayout === undefined) {\n\t\tconsole.error(\n\t\t\t\"Unable to run the example as without a layout being defined. Please ensure that settings have been provided in the web manifest.\"\n\t\t);\n\t\treturn;\n\t}\n\tif (typeof settings.platform.layout.secondLayout === \"string\") {\n\t\tconst layoutResponse = await fetch(settings.platform.layout.secondLayout);\n\t\tconst layoutJson = (await layoutResponse.json()) as WebLayoutSnapshot;\n\t\treturn layoutJson;\n\t}\n\treturn settings.platform.layout.secondLayout;\n}\n/**\n * Returns the settings from the manifest file.\n * @returns customSettings for this example\n */\nasync function getManifestSettings(): Promise {\n\t// Get the manifest link\n\tconst link = document.querySelector('link[rel=\"manifest\"]');\n\tif (link !== null) {\n\t\tconst manifestResponse = await fetch(link.href);\n\t\tconst manifestJson = (await manifestResponse.json()) as { custom_settings: Settings };\n\t\treturn manifestJson.custom_settings;\n\t}\n}\n","export { default as v1 } from './v1.js';\nexport { default as v3 } from './v3.js';\nexport { default as v4 } from './v4.js';\nexport { default as v5 } from './v5.js';\nexport { default as NIL } from './nil.js';\nexport { default as version } from './version.js';\nexport { default as validate } from './validate.js';\nexport { default as stringify } from './stringify.js';\nexport { default as parse } from './parse.js';","/*\n * Browser-compatible JavaScript MD5\n *\n * Modification of JavaScript MD5\n * https://github.com/blueimp/JavaScript-MD5\n *\n * Copyright 2011, Sebastian Tschan\n * https://blueimp.net\n *\n * Licensed under the MIT license:\n * https://opensource.org/licenses/MIT\n *\n * Based on\n * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message\n * Digest Algorithm, as defined in RFC 1321.\n * Version 2.2 Copyright (C) Paul Johnston 1999 - 2009\n * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet\n * Distributed under the BSD License\n * See http://pajhome.org.uk/crypt/md5 for more info.\n */\nfunction md5(bytes) {\n if (typeof bytes === 'string') {\n var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape\n\n bytes = new Uint8Array(msg.length);\n\n for (var i = 0; i < msg.length; ++i) {\n bytes[i] = msg.charCodeAt(i);\n }\n }\n\n return md5ToHexEncodedArray(wordsToMd5(bytesToWords(bytes), bytes.length * 8));\n}\n/*\n * Convert an array of little-endian words to an array of bytes\n */\n\n\nfunction md5ToHexEncodedArray(input) {\n var output = [];\n var length32 = input.length * 32;\n var hexTab = '0123456789abcdef';\n\n for (var i = 0; i < length32; i += 8) {\n var x = input[i >> 5] >>> i % 32 & 0xff;\n var hex = parseInt(hexTab.charAt(x >>> 4 & 0x0f) + hexTab.charAt(x & 0x0f), 16);\n output.push(hex);\n }\n\n return output;\n}\n/**\n * Calculate output length with padding and bit length\n */\n\n\nfunction getOutputLength(inputLength8) {\n return (inputLength8 + 64 >>> 9 << 4) + 14 + 1;\n}\n/*\n * Calculate the MD5 of an array of little-endian words, and a bit length.\n */\n\n\nfunction wordsToMd5(x, len) {\n /* append padding */\n x[len >> 5] |= 0x80 << len % 32;\n x[getOutputLength(len) - 1] = len;\n var a = 1732584193;\n var b = -271733879;\n var c = -1732584194;\n var d = 271733878;\n\n for (var i = 0; i < x.length; i += 16) {\n var olda = a;\n var oldb = b;\n var oldc = c;\n var oldd = d;\n a = md5ff(a, b, c, d, x[i], 7, -680876936);\n d = md5ff(d, a, b, c, x[i + 1], 12, -389564586);\n c = md5ff(c, d, a, b, x[i + 2], 17, 606105819);\n b = md5ff(b, c, d, a, x[i + 3], 22, -1044525330);\n a = md5ff(a, b, c, d, x[i + 4], 7, -176418897);\n d = md5ff(d, a, b, c, x[i + 5], 12, 1200080426);\n c = md5ff(c, d, a, b, x[i + 6], 17, -1473231341);\n b = md5ff(b, c, d, a, x[i + 7], 22, -45705983);\n a = md5ff(a, b, c, d, x[i + 8], 7, 1770035416);\n d = md5ff(d, a, b, c, x[i + 9], 12, -1958414417);\n c = md5ff(c, d, a, b, x[i + 10], 17, -42063);\n b = md5ff(b, c, d, a, x[i + 11], 22, -1990404162);\n a = md5ff(a, b, c, d, x[i + 12], 7, 1804603682);\n d = md5ff(d, a, b, c, x[i + 13], 12, -40341101);\n c = md5ff(c, d, a, b, x[i + 14], 17, -1502002290);\n b = md5ff(b, c, d, a, x[i + 15], 22, 1236535329);\n a = md5gg(a, b, c, d, x[i + 1], 5, -165796510);\n d = md5gg(d, a, b, c, x[i + 6], 9, -1069501632);\n c = md5gg(c, d, a, b, x[i + 11], 14, 643717713);\n b = md5gg(b, c, d, a, x[i], 20, -373897302);\n a = md5gg(a, b, c, d, x[i + 5], 5, -701558691);\n d = md5gg(d, a, b, c, x[i + 10], 9, 38016083);\n c = md5gg(c, d, a, b, x[i + 15], 14, -660478335);\n b = md5gg(b, c, d, a, x[i + 4], 20, -405537848);\n a = md5gg(a, b, c, d, x[i + 9], 5, 568446438);\n d = md5gg(d, a, b, c, x[i + 14], 9, -1019803690);\n c = md5gg(c, d, a, b, x[i + 3], 14, -187363961);\n b = md5gg(b, c, d, a, x[i + 8], 20, 1163531501);\n a = md5gg(a, b, c, d, x[i + 13], 5, -1444681467);\n d = md5gg(d, a, b, c, x[i + 2], 9, -51403784);\n c = md5gg(c, d, a, b, x[i + 7], 14, 1735328473);\n b = md5gg(b, c, d, a, x[i + 12], 20, -1926607734);\n a = md5hh(a, b, c, d, x[i + 5], 4, -378558);\n d = md5hh(d, a, b, c, x[i + 8], 11, -2022574463);\n c = md5hh(c, d, a, b, x[i + 11], 16, 1839030562);\n b = md5hh(b, c, d, a, x[i + 14], 23, -35309556);\n a = md5hh(a, b, c, d, x[i + 1], 4, -1530992060);\n d = md5hh(d, a, b, c, x[i + 4], 11, 1272893353);\n c = md5hh(c, d, a, b, x[i + 7], 16, -155497632);\n b = md5hh(b, c, d, a, x[i + 10], 23, -1094730640);\n a = md5hh(a, b, c, d, x[i + 13], 4, 681279174);\n d = md5hh(d, a, b, c, x[i], 11, -358537222);\n c = md5hh(c, d, a, b, x[i + 3], 16, -722521979);\n b = md5hh(b, c, d, a, x[i + 6], 23, 76029189);\n a = md5hh(a, b, c, d, x[i + 9], 4, -640364487);\n d = md5hh(d, a, b, c, x[i + 12], 11, -421815835);\n c = md5hh(c, d, a, b, x[i + 15], 16, 530742520);\n b = md5hh(b, c, d, a, x[i + 2], 23, -995338651);\n a = md5ii(a, b, c, d, x[i], 6, -198630844);\n d = md5ii(d, a, b, c, x[i + 7], 10, 1126891415);\n c = md5ii(c, d, a, b, x[i + 14], 15, -1416354905);\n b = md5ii(b, c, d, a, x[i + 5], 21, -57434055);\n a = md5ii(a, b, c, d, x[i + 12], 6, 1700485571);\n d = md5ii(d, a, b, c, x[i + 3], 10, -1894986606);\n c = md5ii(c, d, a, b, x[i + 10], 15, -1051523);\n b = md5ii(b, c, d, a, x[i + 1], 21, -2054922799);\n a = md5ii(a, b, c, d, x[i + 8], 6, 1873313359);\n d = md5ii(d, a, b, c, x[i + 15], 10, -30611744);\n c = md5ii(c, d, a, b, x[i + 6], 15, -1560198380);\n b = md5ii(b, c, d, a, x[i + 13], 21, 1309151649);\n a = md5ii(a, b, c, d, x[i + 4], 6, -145523070);\n d = md5ii(d, a, b, c, x[i + 11], 10, -1120210379);\n c = md5ii(c, d, a, b, x[i + 2], 15, 718787259);\n b = md5ii(b, c, d, a, x[i + 9], 21, -343485551);\n a = safeAdd(a, olda);\n b = safeAdd(b, oldb);\n c = safeAdd(c, oldc);\n d = safeAdd(d, oldd);\n }\n\n return [a, b, c, d];\n}\n/*\n * Convert an array bytes to an array of little-endian words\n * Characters >255 have their high-byte silently ignored.\n */\n\n\nfunction bytesToWords(input) {\n if (input.length === 0) {\n return [];\n }\n\n var length8 = input.length * 8;\n var output = new Uint32Array(getOutputLength(length8));\n\n for (var i = 0; i < length8; i += 8) {\n output[i >> 5] |= (input[i / 8] & 0xff) << i % 32;\n }\n\n return output;\n}\n/*\n * Add integers, wrapping at 2^32. This uses 16-bit operations internally\n * to work around bugs in some JS interpreters.\n */\n\n\nfunction safeAdd(x, y) {\n var lsw = (x & 0xffff) + (y & 0xffff);\n var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n return msw << 16 | lsw & 0xffff;\n}\n/*\n * Bitwise rotate a 32-bit number to the left.\n */\n\n\nfunction bitRotateLeft(num, cnt) {\n return num << cnt | num >>> 32 - cnt;\n}\n/*\n * These functions implement the four basic operations the algorithm uses.\n */\n\n\nfunction md5cmn(q, a, b, x, s, t) {\n return safeAdd(bitRotateLeft(safeAdd(safeAdd(a, q), safeAdd(x, t)), s), b);\n}\n\nfunction md5ff(a, b, c, d, x, s, t) {\n return md5cmn(b & c | ~b & d, a, b, x, s, t);\n}\n\nfunction md5gg(a, b, c, d, x, s, t) {\n return md5cmn(b & d | c & ~d, a, b, x, s, t);\n}\n\nfunction md5hh(a, b, c, d, x, s, t) {\n return md5cmn(b ^ c ^ d, a, b, x, s, t);\n}\n\nfunction md5ii(a, b, c, d, x, s, t) {\n return md5cmn(c ^ (b | ~d), a, b, x, s, t);\n}\n\nexport default md5;","export default '00000000-0000-0000-0000-000000000000';","import validate from './validate.js';\n\nfunction parse(uuid) {\n if (!validate(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n var v;\n var arr = new Uint8Array(16); // Parse ########-....-....-....-............\n\n arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24;\n arr[1] = v >>> 16 & 0xff;\n arr[2] = v >>> 8 & 0xff;\n arr[3] = v & 0xff; // Parse ........-####-....-....-............\n\n arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8;\n arr[5] = v & 0xff; // Parse ........-....-####-....-............\n\n arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8;\n arr[7] = v & 0xff; // Parse ........-....-....-####-............\n\n arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8;\n arr[9] = v & 0xff; // Parse ........-....-....-....-############\n // (Use \"/\" to avoid 32-bit truncation when bit-shifting high-order bytes)\n\n arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff;\n arr[11] = v / 0x100000000 & 0xff;\n arr[12] = v >>> 24 & 0xff;\n arr[13] = v >>> 16 & 0xff;\n arr[14] = v >>> 8 & 0xff;\n arr[15] = v & 0xff;\n return arr;\n}\n\nexport default parse;","export default /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;","// Unique ID creation requires a high quality random # generator. In the browser we therefore\n// require the crypto API and do not support built-in fallback to lower quality random number\n// generators (like Math.random()).\nvar getRandomValues;\nvar rnds8 = new Uint8Array(16);\nexport default function rng() {\n // lazy load so that environments that need to polyfill have a chance to do so\n if (!getRandomValues) {\n // getRandomValues needs to be invoked in a context where \"this\" is a Crypto implementation. Also,\n // find the complete implementation of crypto (msCrypto) on IE11.\n getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto !== 'undefined' && typeof msCrypto.getRandomValues === 'function' && msCrypto.getRandomValues.bind(msCrypto);\n\n if (!getRandomValues) {\n throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');\n }\n }\n\n return getRandomValues(rnds8);\n}","// Adapted from Chris Veness' SHA1 code at\n// http://www.movable-type.co.uk/scripts/sha1.html\nfunction f(s, x, y, z) {\n switch (s) {\n case 0:\n return x & y ^ ~x & z;\n\n case 1:\n return x ^ y ^ z;\n\n case 2:\n return x & y ^ x & z ^ y & z;\n\n case 3:\n return x ^ y ^ z;\n }\n}\n\nfunction ROTL(x, n) {\n return x << n | x >>> 32 - n;\n}\n\nfunction sha1(bytes) {\n var K = [0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xca62c1d6];\n var H = [0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0];\n\n if (typeof bytes === 'string') {\n var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape\n\n bytes = [];\n\n for (var i = 0; i < msg.length; ++i) {\n bytes.push(msg.charCodeAt(i));\n }\n } else if (!Array.isArray(bytes)) {\n // Convert Array-like to Array\n bytes = Array.prototype.slice.call(bytes);\n }\n\n bytes.push(0x80);\n var l = bytes.length / 4 + 2;\n var N = Math.ceil(l / 16);\n var M = new Array(N);\n\n for (var _i = 0; _i < N; ++_i) {\n var arr = new Uint32Array(16);\n\n for (var j = 0; j < 16; ++j) {\n arr[j] = bytes[_i * 64 + j * 4] << 24 | bytes[_i * 64 + j * 4 + 1] << 16 | bytes[_i * 64 + j * 4 + 2] << 8 | bytes[_i * 64 + j * 4 + 3];\n }\n\n M[_i] = arr;\n }\n\n M[N - 1][14] = (bytes.length - 1) * 8 / Math.pow(2, 32);\n M[N - 1][14] = Math.floor(M[N - 1][14]);\n M[N - 1][15] = (bytes.length - 1) * 8 & 0xffffffff;\n\n for (var _i2 = 0; _i2 < N; ++_i2) {\n var W = new Uint32Array(80);\n\n for (var t = 0; t < 16; ++t) {\n W[t] = M[_i2][t];\n }\n\n for (var _t = 16; _t < 80; ++_t) {\n W[_t] = ROTL(W[_t - 3] ^ W[_t - 8] ^ W[_t - 14] ^ W[_t - 16], 1);\n }\n\n var a = H[0];\n var b = H[1];\n var c = H[2];\n var d = H[3];\n var e = H[4];\n\n for (var _t2 = 0; _t2 < 80; ++_t2) {\n var s = Math.floor(_t2 / 20);\n var T = ROTL(a, 5) + f(s, b, c, d) + e + K[s] + W[_t2] >>> 0;\n e = d;\n d = c;\n c = ROTL(b, 30) >>> 0;\n b = a;\n a = T;\n }\n\n H[0] = H[0] + a >>> 0;\n H[1] = H[1] + b >>> 0;\n H[2] = H[2] + c >>> 0;\n H[3] = H[3] + d >>> 0;\n H[4] = H[4] + e >>> 0;\n }\n\n return [H[0] >> 24 & 0xff, H[0] >> 16 & 0xff, H[0] >> 8 & 0xff, H[0] & 0xff, H[1] >> 24 & 0xff, H[1] >> 16 & 0xff, H[1] >> 8 & 0xff, H[1] & 0xff, H[2] >> 24 & 0xff, H[2] >> 16 & 0xff, H[2] >> 8 & 0xff, H[2] & 0xff, H[3] >> 24 & 0xff, H[3] >> 16 & 0xff, H[3] >> 8 & 0xff, H[3] & 0xff, H[4] >> 24 & 0xff, H[4] >> 16 & 0xff, H[4] >> 8 & 0xff, H[4] & 0xff];\n}\n\nexport default sha1;","import validate from './validate.js';\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\n\nvar byteToHex = [];\n\nfor (var i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).substr(1));\n}\n\nfunction stringify(arr) {\n var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n var uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!validate(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n\n return uuid;\n}\n\nexport default stringify;","import rng from './rng.js';\nimport stringify from './stringify.js'; // **`v1()` - Generate time-based UUID**\n//\n// Inspired by https://github.com/LiosK/UUID.js\n// and http://docs.python.org/library/uuid.html\n\nvar _nodeId;\n\nvar _clockseq; // Previous uuid creation time\n\n\nvar _lastMSecs = 0;\nvar _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details\n\nfunction v1(options, buf, offset) {\n var i = buf && offset || 0;\n var b = buf || new Array(16);\n options = options || {};\n var node = options.node || _nodeId;\n var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not\n // specified. We do this lazily to minimize issues related to insufficient\n // system entropy. See #189\n\n if (node == null || clockseq == null) {\n var seedBytes = options.random || (options.rng || rng)();\n\n if (node == null) {\n // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)\n node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]];\n }\n\n if (clockseq == null) {\n // Per 4.2.2, randomize (14 bit) clockseq\n clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;\n }\n } // UUID timestamps are 100 nano-second units since the Gregorian epoch,\n // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so\n // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'\n // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.\n\n\n var msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock\n // cycle to simulate higher resolution clock\n\n var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs)\n\n var dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression\n\n if (dt < 0 && options.clockseq === undefined) {\n clockseq = clockseq + 1 & 0x3fff;\n } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new\n // time interval\n\n\n if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {\n nsecs = 0;\n } // Per 4.2.1.2 Throw error if too many uuids are requested\n\n\n if (nsecs >= 10000) {\n throw new Error(\"uuid.v1(): Can't create more than 10M uuids/sec\");\n }\n\n _lastMSecs = msecs;\n _lastNSecs = nsecs;\n _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch\n\n msecs += 12219292800000; // `time_low`\n\n var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;\n b[i++] = tl >>> 24 & 0xff;\n b[i++] = tl >>> 16 & 0xff;\n b[i++] = tl >>> 8 & 0xff;\n b[i++] = tl & 0xff; // `time_mid`\n\n var tmh = msecs / 0x100000000 * 10000 & 0xfffffff;\n b[i++] = tmh >>> 8 & 0xff;\n b[i++] = tmh & 0xff; // `time_high_and_version`\n\n b[i++] = tmh >>> 24 & 0xf | 0x10; // include version\n\n b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)\n\n b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low`\n\n b[i++] = clockseq & 0xff; // `node`\n\n for (var n = 0; n < 6; ++n) {\n b[i + n] = node[n];\n }\n\n return buf || stringify(b);\n}\n\nexport default v1;","import v35 from './v35.js';\nimport md5 from './md5.js';\nvar v3 = v35('v3', 0x30, md5);\nexport default v3;","import stringify from './stringify.js';\nimport parse from './parse.js';\n\nfunction stringToBytes(str) {\n str = unescape(encodeURIComponent(str)); // UTF8 escape\n\n var bytes = [];\n\n for (var i = 0; i < str.length; ++i) {\n bytes.push(str.charCodeAt(i));\n }\n\n return bytes;\n}\n\nexport var DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8';\nexport var URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8';\nexport default function (name, version, hashfunc) {\n function generateUUID(value, namespace, buf, offset) {\n if (typeof value === 'string') {\n value = stringToBytes(value);\n }\n\n if (typeof namespace === 'string') {\n namespace = parse(namespace);\n }\n\n if (namespace.length !== 16) {\n throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)');\n } // Compute hash of namespace and value, Per 4.3\n // Future: Use spread syntax when supported on all platforms, e.g. `bytes =\n // hashfunc([...namespace, ... value])`\n\n\n var bytes = new Uint8Array(16 + value.length);\n bytes.set(namespace);\n bytes.set(value, namespace.length);\n bytes = hashfunc(bytes);\n bytes[6] = bytes[6] & 0x0f | version;\n bytes[8] = bytes[8] & 0x3f | 0x80;\n\n if (buf) {\n offset = offset || 0;\n\n for (var i = 0; i < 16; ++i) {\n buf[offset + i] = bytes[i];\n }\n\n return buf;\n }\n\n return stringify(bytes);\n } // Function#name is not settable on some platforms (#270)\n\n\n try {\n generateUUID.name = name; // eslint-disable-next-line no-empty\n } catch (err) {} // For CommonJS default export support\n\n\n generateUUID.DNS = DNS;\n generateUUID.URL = URL;\n return generateUUID;\n}","import rng from './rng.js';\nimport stringify from './stringify.js';\n\nfunction v4(options, buf, offset) {\n options = options || {};\n var rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n offset = offset || 0;\n\n for (var i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n\n return buf;\n }\n\n return stringify(rnds);\n}\n\nexport default v4;","import v35 from './v35.js';\nimport sha1 from './sha1.js';\nvar v5 = v35('v5', 0x50, sha1);\nexport default v5;","import REGEX from './regex.js';\n\nfunction validate(uuid) {\n return typeof uuid === 'string' && REGEX.test(uuid);\n}\n\nexport default validate;","import validate from './validate.js';\n\nfunction version(uuid) {\n if (!validate(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n return parseInt(uuid.substr(14, 1), 16);\n}\n\nexport default version;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = (module) => {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","import type { Context } from \"@finos/fdc3\";\nimport { init } from \"../platform/api\";\n\nwindow.addEventListener(\"DOMContentLoaded\", async () => {\n\tawait init(false);\n\tawait initializeDOM();\n});\n\n/**\n * Adds an FDC3 context listener to the window.\n */\nasync function addFDC3Listener(): Promise {\n\tif (window.fdc3) {\n\t\tawait window.fdc3.addContextListener(null, (context) => {\n\t\t\tupdateDOMElements(context);\n\t\t});\n\t} else {\n\t\twindow.addEventListener(\"fdc3Ready\", async () => {\n\t\t\tawait window.fdc3.addContextListener(null, (context) => {\n\t\t\t\tupdateDOMElements(context);\n\t\t\t});\n\t\t});\n\t}\n}\n\n/**\n * Updates the DOM elements with the provided context.\n * @param context The context to update the DOM elements with.\n */\nfunction updateDOMElements(context: Context): void {\n\tconst contextTypeSpan = document.querySelector(\"#contextType\");\n\tconst contextNameSpan = document.querySelector(\"#contextName\");\n\tconst contextBodyPre = document.querySelector(\"#contextBody\");\n\n\tif (contextTypeSpan !== null && contextNameSpan !== null && contextBodyPre !== null) {\n\t\tcontextTypeSpan.textContent = context.type;\n\t\tcontextNameSpan.textContent = context.name ?? \"No name provided.\";\n\t\tcontextBodyPre.textContent = JSON.stringify(context, null, 2);\n\t}\n}\n\n/**\n * Initialize the DOM elements.\n */\nasync function initializeDOM(): Promise {\n\tawait addFDC3Listener();\n}\n"],"names":[],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"fdc3-panel.bundle.js","mappings":";;;;;;;;;;AAAa,MAAM,mBAAO,CAAC,qFAAoB,EAAE,mBAAO,CAAC,mDAAS,EAAE,mBAAO,CAAC,+DAAM,EAAE,mBAAO,CAAC,mDAAQ,EAAE,mBAAO,CAAC,gEAAkB,EAAE,mBAAO,CAAC,4DAAgB,EAAE,eAAe;;;;;;;;;;;;ACA9J,MAAM,mBAAO,CAAC,mDAAS,IAAI,mBAAO,CAAC,mDAAQ,IAAI,mBAAO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C,OAAO,EAAE,GAAG,mHAAmH,OAAO,0BAA0B,oBAAoB,aAAa,yBAAyB,iBAAiB,qCAAqC,EAAE,cAAc,2CAA2C,kDAAkD,OAAO,uBAAuB,SAAS,MAAM,OAAO,cAAc,eAAe,2BAA2B,OAAO,eAAe,sDAAsD,oCAAoC,IAAI,iIAAiI,sBAAsB,yCAAyC,2FAA2F;;;;;;;;;;;;ACFv6nD;;AAEZ,kBAAkB;AAClB,mBAAmB;AACnB,qBAAqB;;AAErB;AACA;AACA;;AAEA;AACA,mCAAmC,SAAS;AAC5C;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,cAAc,SAAS;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,2CAA2C,UAAU;AACrD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;ACrJA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEY;;AAEZ,eAAe,mBAAO,CAAC,wDAAW;AAClC,gBAAgB,mBAAO,CAAC,oDAAS;AACjC;AACA;AACA;AACA;;AAEA,cAAc;AACd,kBAAkB;AAClB,yBAAyB;;AAEzB;AACA,kBAAkB;;AAElB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,kBAAkB,YAAY;AAC9B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA,wCAAwC,SAAS;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;;AAEA;AACA;AACA,cAAc,iBAAiB;AAC/B;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,iDAAiD,EAAE;AACnD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C;AAC1C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA,yBAAyB,eAAe;AACxC;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,yBAAyB,QAAQ;AACjC;AACA,sBAAsB,eAAe;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc,YAAY;AAC1B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB,sBAAsB;AACxC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,mBAAmB;AACnB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA,oBAAoB,SAAS;AAC7B;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA,qBAAqB,WAAW,GAAG,IAAI;AACvC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA,gBAAgB,WAAW,GAAG,IAAI,KAAK,aAAa;AACpD;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;;AAEA;AACA,GAAG;AACH;AACA;AACA,mBAAmB,KAAK,mDAAmD,cAAc;AACzF,GAAG;AACH;AACA;AACA,+BAA+B,IAAI;AACnC;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,MAAM,aAAa,SAAS;AACtD;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,SAAS,gBAAgB;AACzB,cAAc,oBAAoB,EAAE,IAAI;AACxC;AACA,YAAY,gBAAgB,EAAE,IAAI;AAClC;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,GAAG,SAAS,GAAG,KAAK,qBAAqB,EAAE,EAAE;AACpE,QAAQ;AACR,yBAAyB,GAAG,KAAK,yBAAyB,EAAE,EAAE;AAC9D,mBAAmB,yBAAyB,EAAE,EAAE;AAChD;AACA,MAAM;AACN,oBAAoB,IAAI,EAAE,GAAG,SAAS,IAAI,EAAE,EAAE;AAC9C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,0CAA0C,cAAc,SAAS,OAAO;AACxE;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,kBAAkB,YAAY;AAC9B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,kBAAkB,gBAAgB;AAClC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,kBAAkB,gBAAgB;AAClC;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,cAAc,YAAY;AAC1B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,QAAQ;AAC1B;AACA,oBAAoB,QAAQ;AAC5B;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;;;;;ACzjEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEa;;AAEb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB;;AAEnB;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,sBAAsB;AACxC;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA,eAAe;AACf;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA,oBAAoB,SAAS;AAC7B;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;;AAEA,kCAAkC,QAAQ;AAC1C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oBAAoB,iBAAiB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,QAAQ;AACR;AACA,uCAAuC,QAAQ;AAC/C;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,OAAO;AACzB;AACA;AACA;;AAEA;AACA,SAAS,yBAAyB;AAClC;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,gBAAgB;AAClC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,8DAA8D,YAAY;AAC1E;AACA,8DAA8D,YAAY;AAC1E;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,qCAAqC,YAAY;AACjD;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;AACA;;;;;;;;;;;AChfA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,SAAS,WAAW;;AAEpB;AACA;AACA;AACA,SAAS,WAAW;;AAEpB;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAA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O;AAClB,WAAW,UAAU;AACrB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACxBA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,kBAAkB,mBAAO,CAAC,+DAAe;AACzC,cAAc,mBAAO,CAAC,uDAAW;AACjC,eAAe,mBAAO,CAAC,yDAAY;AACnC,cAAc,mBAAO,CAAC,yDAAY;AAClC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,SAAS;AACpB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AChDA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACnBA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,UAAU;AACrB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACtBA,sBAAsB,mBAAO,CAAC,yEAAoB;AAClD,SAAS,mBAAO,CAAC,6CAAM;;AAEvB;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC3BA,SAAS,mBAAO,CAAC,6CAAM;;AAEvB;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,GAAG;AACd,aAAa,QAAQ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,uDAAW;AACjC,eAAe,mBAAO,CAAC,yDAAY;AACnC,YAAY,mBAAO,CAAC,mDAAS;AAC7B,eAAe,mBAAO,CAAC,yDAAY;AACnC,YAAY,mBAAO,CAAC,mDAAS;AAC7B,WAAW,mBAAO,CAAC,iDAAQ;AAC3B,aAAa,mBAAO,CAAC,qDAAU;;AAE/B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,SAAS;AACpB;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa,GAAG;AAChB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;AACA,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;;;;;;;;;;ACrKA,eAAe,mBAAO,CAAC,yDAAY;;AAEnC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;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E3C;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClFA,aAAa,mBAAO,CAAC,uDAAW;AAChC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA,iBAAiB,mBAAO,CAAC,6DAAc;AACvC,eAAe,mBAAO,CAAC,2DAAa;AACpC,eAAe,mBAAO,CAAC,yDAAY;AACnC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;AACA;AACA;AACA,oCAAoC;;AAEpC;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC9CA,aAAa,mBAAO,CAAC,uDAAW;AAChC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,eAAe,mBAAO,CAAC,yDAAY;AACnC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC3DA,kBAAkB,mBAAO,CAAC,iEAAgB;AAC1C,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC7BA,eAAe,mBAAO,CAAC,yDAAY;AACnC,kBAAkB,mBAAO,CAAC,iEAAgB;AAC1C,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AChCA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACnBA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,aAAa,UAAU;AACvB;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACbA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACZA,i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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACnFA,aAAa,mBAAO,CAAC,uDAAW;AAChC,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,SAAS,mBAAO,CAAC,6CAAM;AACvB,kBAAkB,mBAAO,CAAC,iEAAgB;AAC1C,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC/GA,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;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AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACzDA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa,GAAG;AAChB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACZA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACdA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AChBA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,GAAG;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC7BA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACtBA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACtBA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACzBA,uBAAuB,mBAAO,CAAC,2EAAqB;AACpD,oBAAoB,mBAAO,CAAC,qEAAkB;AAC9C,kBAAkB,mBAAO,CAAC,iEAAgB;AAC1C,kBAAkB,mBAAO,CAAC,iEAAgB;AAC1C,sBAAsB,mBAAO,CAAC,yEAAoB;;AAElD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC5EA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,mBAAmB,mBAAO,CAAC,mEAAiB;AAC5C,kBAAkB,mBAAO,CAAC,iEAAgB;;AAE1C;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACxBA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACdA,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACnBA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACZA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClCA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,GAAG;AAChB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;AClBA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACfA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACzBA,WAAW,mBAAO,CAAC,mDAAS;AAC5B,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,UAAU,mBAAO,CAAC,iDAAQ;;AAE1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpBA,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACj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ACA;AACA,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,aAAa,UAAU;AACvB;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACdA,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;ACRA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACbA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;;;;;;;;;;ACjBA,gBAAgB,mBAAO,CAAC,6DAAc;;AAEtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACdA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,GAAG;AAChB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACbA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACbA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,UAAU,mBAAO,CAAC,iDAAQ;AAC1B,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjCA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;;;;;;;;;;;ACzBA,gBAAgB,mBAAO,CAAC,6DAAc;;AAEtC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,GAAG;AAChB;AACA;AACA;AACA,oBAAoB,QAAQ,IAAI,QAAQ;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,kBAAkB;AAClB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpCA,sBAAsB,mBAAO,CAAC,yEAAoB;AAClD,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA,8BAA8B,mBAAmB;AACjD;AACA;AACA;AACA;AACA;AACA,+CAA+C,mBAAmB;AAClE;AACA;AACA;;AAEA;;;;;;;;;;;ACnCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACzBA,iBAAiB,mBAAO,CAAC,6DAAc;AACvC,eAAe,mBAAO,CAAC,yDAAY;;AAEnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AChCA,WAAW,mBAAO,CAAC,mDAAS;AAC5B,gBAAgB,mBAAO,CAAC,2DAAa;;AAErC;AACA,kBAAkB,KAA0B;;AAE5C;AACA,gCAAgC,QAAa;;AAE7C;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACrCA,kBAAkB,mBAAO,CAAC,iEAAgB;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,kBAAkB;AAClB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClCA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,eAAe,mBAAO,CAAC,yDAAY;;AAEnC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpCA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClCA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC1BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC9BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC5BA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC1BA,uBAAuB,mBAAO,CAAC,2EAAqB;AACpD,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC1BA,oBAAoB,mBAAO,CAAC,qEAAkB;AAC9C,eAAe,mBAAO,CAAC,2DAAa;AACpC,kBAAkB,mBAAO,CAAC,+DAAe;;A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IACD,OAAO,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,YAAY,CAAC;AAC9C,CAAC;AACD;;;GAGG;AACH,KAAK,UAAU,mBAAmB;IACjC,wBAAwB;IACxB,MAAM,IAAI,GAAG,QAAQ,CAAC,aAAa,CAAkB,sBAAsB,CAAC,CAAC;IAC7E,IAAI,IAAI,KAAK,IAAI,EAAE,CAAC;QACnB,MAAM,gBAAgB,GAAG,MAAM,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAChD,MAAM,YAAY,GAAG,CAAC,MAAM,gBAAgB,CAAC,IAAI,EAAE,CAAkC,CAAC;QACtF,OAAO,YAAY,CAAC,eAAe,CAAC;IACrC,CAAC;AACF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACpEuC;AACA;AACA;AACA;AACE;AACQ;AACE;AACE;;;;;;;;;;;;;;;;ACPtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD;;AAEnD;;AAEA,oBAAoB,gBAAgB;AACpC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA,kBAAkB,cAAc;AAChC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,kBAAkB,cAAc;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,kBAAkB,aAAa;AAC/B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,iEAAe,GAAG;;;;;;;;;;;;;;;ACtNlB,iEAAe,sCAAsC;;;;;;;;;;;;;;;;ACAhB;;AAErC;AACA,OAAO,wDAAQ;AACf;AACA;;AAEA;AACA,gCAAgC;;AAEhC;AACA;AACA;AACA,qBAAqB;;AAErB;AACA,qBAAqB;;AAErB;AACA,qBAAqB;;AAErB;AACA,qBAAqB;AACrB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,iEAAe,KAAK;;;;;;;;;;;;;;;AClCpB,iEAAe,cAAc,EAAE,UAAU,EAAE,eAAe,EAAE,gBAAgB,EAAE,UAAU,GAAG,yCAAyC;;;;;;;;;;;;;;;ACApI;AACA;AACA;AACA;AACA;AACe;AACf;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;AClBA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,mDAAmD;;AAEnD;;AAEA,oBAAoB,gBAAgB;AACpC;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,mBAAmB,QAAQ;AAC3B;;AAEA,oBAAoB,QAAQ;AAC5B;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,oBAAoB,SAAS;AAC7B;;AAEA,oBAAoB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a;IAC3B,MAAM,eAAe,EAAE,CAAC;AACzB,CAAC","sources":["webpack://openfin-web--web-layout/../../node_modules/@openfin/core-web/out/api-client.js","webpack://openfin-web--web-layout/../../node_modules/@openfin/core-web/out/main-8cad4070.js","webpack://openfin-web--web-layout/../../node_modules/@openfin/core-web/out/main-b14f67c9.js","webpack://openfin-web--web-layout/../../node_modules/base64-js/index.js","webpack://openfin-web--web-layout/../../node_modules/buffer/index.js","webpack://openfin-web--web-layout/../../node_modules/events/events.js","webpack://openfin-web--web-layout/../../node_modules/ieee754/index.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_DataView.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_Hash.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_ListCache.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_Map.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_MapCache.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_Promise.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_Set.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_SetCache.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_Stack.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_Symbol.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_Uint8Array.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_WeakMap.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_arrayEach.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_arrayFilter.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_arrayLikeKeys.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_arrayPush.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_arraySome.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_assignValue.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_assocIndexOf.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseAssign.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseAssignIn.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseAssignValue.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseClone.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseCreate.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseGetAllKeys.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseGetTag.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseIsArguments.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseIsEqual.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseIsEqualDeep.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseIsMap.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseIsNative.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseIsSet.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseIsTypedArray.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseKeys.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseKeysIn.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseTimes.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseUnary.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_cacheHas.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_cloneArrayBuffer.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_cloneBuffer.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_cloneDataView.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_cloneRegExp.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_cloneSymbol.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_cloneTypedArray.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_copyArray.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_copyObject.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_copySymbols.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_copySymbolsIn.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_coreJsData.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_defineProperty.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_equalArrays.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_equalByTag.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_equalObjects.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_freeGlobal.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_getAllKeys.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_getAllKeysIn.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_getMapData.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_getNative.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_getPrototype.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_getRawTag.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_getSymbols.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_getSymbolsIn.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_getTag.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_getValue.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_hashClear.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_hashDelete.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_hashGet.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_hashHas.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_hashSet.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_initCloneArray.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_initCloneByTag.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_initCloneObject.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_isIndex.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_isKeyable.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_isMasked.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_isPrototype.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_listCacheClear.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_listCacheDelete.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_listCacheGet.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_listCacheHas.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_listCacheSet.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_mapCacheClear.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_mapCacheDelete.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_mapCacheGet.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_mapCacheHas.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_mapCacheSet.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_mapToArray.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_nativeCreate.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_nativeKeys.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_nativeKeysIn.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_nodeUtil.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_objectToString.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_overArg.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_root.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_setCacheAdd.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_setCacheHas.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_setToArray.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_stackClear.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_stackDelete.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_stackGet.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_stackHas.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_stackSet.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_toSource.js","webpack://openfin-web--web-layout/../../node_modules/lodash/cloneDeep.js","webpack://openfin-web--web-layout/../../node_modules/lodash/eq.js","webpack://openfin-web--web-layout/../../node_modules/lodash/isArguments.js","webpack://openfin-web--web-layout/../../node_modules/lodash/isArray.js","webpack://openfin-web--web-layout/../../node_modules/lodash/isArrayLike.js","webpack://openfin-web--web-layout/../../node_modules/lodash/isBuffer.js","webpack://openfin-web--web-layout/../../node_modules/lodash/isEqual.js","webpack://openfin-web--web-layout/../../node_modules/lodash/isFunction.js","webpack://openfin-web--web-layout/../../node_modules/lodash/isLength.js","webpack://openfin-web--web-layout/../../node_modules/lodash/isMap.js","webpack://openfin-web--web-layout/../../node_modules/lodash/isObject.js","webpack://openfin-web--web-layout/../../node_modules/lodash/isObjectLike.js","webpack://openfin-web--web-layout/../../node_modules/lodash/isSet.js","webpack://openfin-web--web-layout/../../node_modules/lodash/isTypedArray.js","webpack://openfin-web--web-layout/../../node_modules/lodash/keys.js","webpack://openfin-web--web-layout/../../node_modules/lodash/keysIn.js","webpack://openfin-web--web-layout/../../node_modules/lodash/stubArray.js","webpack://openfin-web--web-layout/../../node_modules/lodash/stubFalse.js","webpack://openfin-web--web-layout/./client/src/platform/api.ts","webpack://openfin-web--web-layout/./client/src/platform/settings.ts","webpack://openfin-web--web-layout/../../node_modules/uuid/dist/esm-browser/index.js","webpack://openfin-web--web-layout/../../node_modules/uuid/dist/esm-browser/md5.js","webpack://openfin-web--web-layout/../../node_modules/uuid/dist/esm-browser/nil.js","webpack://openfin-web--web-layout/../../node_modules/uuid/dist/esm-browser/parse.js","webpack://openfin-web--web-layout/../../node_modules/uuid/dist/esm-browser/regex.js","webpack://openfin-web--web-layout/../../node_modules/uuid/dist/esm-browser/rng.js","webpack://openfin-web--web-layout/../../node_modules/uuid/dist/esm-browser/sha1.js","webpack://openfin-web--web-layout/../../node_modules/uuid/dist/esm-browser/stringify.js","webpack://openfin-web--web-layout/../../node_modules/uuid/dist/esm-browser/v1.js","webpack://openfin-web--web-layout/../../node_modules/uuid/dist/esm-browser/v3.js","webpack://openfin-web--web-layout/../../node_modules/uuid/dist/esm-browser/v35.js","webpack://openfin-web--web-layout/../../node_modules/uuid/dist/esm-browser/v4.js","webpack://openfin-web--web-layout/../../node_modules/uuid/dist/esm-browser/v5.js","webpack://openfin-web--web-layout/../../node_modules/uuid/dist/esm-browser/validate.js","webpack://openfin-web--web-layout/../../node_modules/uuid/dist/esm-browser/version.js","webpack://openfin-web--web-layout/webpack/bootstrap","webpack://openfin-web--web-layout/webpack/runtime/define property getters","webpack://openfin-web--web-layout/webpack/runtime/global","webpack://openfin-web--web-layout/webpack/runtime/hasOwnProperty shorthand","webpack://openfin-web--web-layout/webpack/runtime/make namespace object","webpack://openfin-web--web-layout/webpack/runtime/node module decorator","webpack://openfin-web--web-layout/./client/src/content/fdc3-panel.ts"],"sourcesContent":["\"use strict\";var e=require(\"./main-8cad4070.js\");require(\"buffer/\"),require(\"uuid\"),require(\"events\"),require(\"lodash/cloneDeep\"),require(\"lodash/isEqual\"),exports.connect=e.connect;\n","\"use strict\";var e=require(\"buffer/\"),t=require(\"events\"),n=require(\"lodash/cloneDeep\"),i=require(\"lodash/isEqual\"),r=require(\"uuid\");const o=(e,t)=>`${t}<${btoa(JSON.stringify(e))}>`;var s=\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof window?window:\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:{},a={},c={},d={},h={};async function l(e){const t=[];for(const n of e){const e=await n();t.push(e)}return t}Object.defineProperty(h,\"__esModule\",{value:!0}),h.promiseMapSerial=h.serial=h.promiseMap=h.promisify=void 0,h.promisify=function(e){return(...t)=>new Promise(((n,i)=>{e(...t,((e,t)=>e?i(e):n(t)))}))},h.promiseMap=async function(e,t){return Promise.all(e.map(t))},h.serial=l,h.promiseMapSerial=async function(e,t){return l(e.map(((e,n,i)=>()=>t(e,n,i))))};var u,p=s&&s.__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},w=s&&s.__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)};Object.defineProperty(d,\"__esModule\",{value:!0}),d.Reply=d.EmitterBase=d.Base=void 0;const y=h;class f{constructor(e){this.isNodeEnvironment=()=>\"node\"===this.wire.environment.type,this.isOpenFinEnvironment=()=>\"openfin\"===this.wire.environment.type,this.isBrowserEnvironment=()=>\"other\"===this.wire.environment.type,this.wire=e}get fin(){return this.wire.getFin()}get me(){return this.wire.me}}d.Base=f;d.EmitterBase=class extends f{constructor(e,t,...n){super(e),this.topic=t,u.set(this,void 0),this.eventNames=()=>this.hasEmitter()?this.getOrCreateEmitter().eventNames():[],this.emit=(e,t,...n)=>!!this.hasEmitter()&&this.getOrCreateEmitter().emit(e,t,...n),this.hasEmitter=()=>this.wire.eventAggregator.has(w(this,u,\"f\")),this.getOrCreateEmitter=()=>this.wire.eventAggregator.getOrCreate(w(this,u,\"f\")),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[],this.listenerCount=e=>this.hasEmitter()?this.getOrCreateEmitter().listenerCount(e):0,this.registerEventListener=async(e,t={},n,i)=>{const r={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e},o=this.getOrCreateEmitter();n(o);try{await this.wire.sendAction(\"subscribe-to-desktop-event\",r)}catch(e){throw i(o),this.deleteEmitterIfNothingRegistered(o),e}},this.deregisterEventListener=async(e,t={})=>{if(this.hasEmitter()){const n={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e};await this.wire.sendAction(\"unsubscribe-to-desktop-event\",n).catch((()=>null));return this.getOrCreateEmitter()}return Promise.resolve()},p(this,u,[t,...n],\"f\"),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[]}async on(e,t,n){return await this.registerEventListener(e,n,(n=>{n.on(e,t)}),(n=>{n.removeListener(e,t)})),this}async addListener(e,t,n){return this.on(e,t,n)}async once(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.once(e,i),n.once(e,t)}),(n=>{n.removeListener(e,i),n.removeListener(e,t)})),this}async prependListener(e,t,n){return await this.registerEventListener(e,n,(n=>{n.prependListener(e,t)}),(n=>{n.removeListener(e,t)})),this}async prependOnceListener(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.prependOnceListener(e,t),n.once(e,i)}),(n=>{n.removeListener(e,t),n.removeListener(e,i)})),this}async removeListener(e,t,n){const i=await this.deregisterEventListener(e,n);return i&&(i.removeListener(e,t),this.deleteEmitterIfNothingRegistered(i)),this}async deregisterAllListeners(e){const t={...this.identity,type:e,topic:this.topic};if(this.hasEmitter()){const e=this.getOrCreateEmitter(),n=e.listenerCount(t.type),i=[];for(let e=0;enull)));return await Promise.all(i),e}}async removeAllListeners(e){const t=async e=>{const t=await this.deregisterAllListeners(e);t&&(t.removeAllListeners(e),this.deleteEmitterIfNothingRegistered(t))};if(e)await t(e);else if(this.hasEmitter()){const e=this.getOrCreateEmitter().eventNames();await(0,y.promiseMap)(e,t)}return this}deleteEmitterIfNothingRegistered(e){0===e.eventNames().length&&this.wire.eventAggregator.delete(w(this,u,\"f\"))}},u=new WeakMap;d.Reply=class{};var g={};Object.defineProperty(g,\"__esModule\",{value:!0});var m=g.RuntimeError=g.NotSupportedError=g.NotImplementedError=g.NoAckError=g.DuplicateCorrelationError=g.UnexpectedActionError=g.DisconnectedError=void 0;class v extends Error{constructor(e){super(`Expected websocket state OPEN but found ${e}`),this.readyState=e}}g.DisconnectedError=v;class C extends Error{}g.UnexpectedActionError=C;class b extends Error{}g.DuplicateCorrelationError=b;class I extends Error{}g.NoAckError=I;class E extends Error{}g.NotImplementedError=E;class x extends Error{}g.NotSupportedError=x;class A extends Error{constructor(e){const{message:t,name:n,stack:i,...r}=e;super(t),this.name=n||\"Error\",this.stack=i??this.toString(),Object.keys(r).forEach((e=>{this[e]=r[e]}))}}class P extends Error{static getCallSite(e=0){const t=Error.stackTraceLimit,n=e+1;Error.stackTraceLimit=t+n;const i=Error.prepareStackTrace;Error.prepareStackTrace=(e,t)=>t;const r=(new Error).stack?.slice(n)??[];return Error.prepareStackTrace=i,Error.stackTraceLimit=t,r}static prepareStackTrace(e,t){if(\"function\"==typeof Error.prepareStackTrace)return Error.prepareStackTrace(e,t);let n=\"\";n+=e.name||\"Error\",n+=`: ${e.message||\"\"}`;for(const e of t)n+=`\\n at ${e.toString()}`;return n}constructor(e,t){const{reason:n,error:i}=e;super(n),this.name=\"RuntimeError\",i?.stack&&(this.cause=new A(i)),t&&(this.stack=P.prepareStackTrace(this,t))}}m=g.RuntimeError=P;var M={},_={},O={};Object.defineProperty(O,\"__esModule\",{value:!0}),O.validateIdentity=void 0,O.validateIdentity=function(e){let t;return\"object\"==typeof e&&\"string\"==typeof e.uuid||(t=\"Not a valid identity object\"),t};var S={},R={},F={},j={},k={},L={},T={};Object.defineProperty(T,\"__esModule\",{value:!0}),T.handleDeprecatedWarnings=void 0;var $;T.handleDeprecatedWarnings=e=>{(e.contentNavigation?.whitelist||e.contentNavigation?.blacklist||e.contentRedirect?.whitelist||e.contentRedirect?.blacklist)&&console.warn(\"The properties 'whitelist' and 'blacklist' have been marked as deprecated and will be removed in a future version. Please use 'allowlist' and 'denylist'.\")};var B={},G={};Object.defineProperty(G,\"__esModule\",{value:!0}),G.AsyncRetryableLazy=W=G.Lazy=void 0;var W=G.Lazy=class{constructor(e){this.producerFn=e}getValue(){return this.value||(this.value=this.producerFn()),this.value}};G.AsyncRetryableLazy=class{constructor(e){this.producerFn=e}async getValue(){return this.promise||(this.promise=this.producerFn().catch((e=>{throw delete this.promise,e}))),this.promise}};var H={};Object.defineProperty(H,\"__esModule\",{value:!0}),H.WebContents=void 0;const N=d;class D extends N.EmitterBase{constructor(e,t,n){super(e,n,t.uuid,t.name),this.identity=t,this.entityType=n}capturePage(e){return this.wire.sendAction(\"capture-page\",{options:e,...this.identity}).then((({payload:e})=>e.data))}executeJavaScript(e){return this.wire.sendAction(\"execute-javascript-in-window\",{...this.identity,code:e}).then((({payload:e})=>e.data))}getZoomLevel(){return this.wire.sendAction(\"get-zoom-level\",this.identity).then((({payload:e})=>e.data))}setZoomLevel(e){return this.wire.sendAction(\"set-zoom-level\",{...this.identity,level:e}).then((()=>{}))}navigate(e){return this.wire.sendAction(\"navigate-window\",{...this.identity,url:e}).then((()=>{}))}navigateBack(){return this.wire.sendAction(\"navigate-window-back\",{...this.identity}).then((()=>{}))}async navigateForward(){await this.wire.sendAction(\"navigate-window-forward\",{...this.identity})}stopNavigation(){return this.wire.sendAction(\"stop-window-navigation\",{...this.identity}).then((()=>{}))}reload(e=!1){return this.wire.sendAction(\"reload-window\",{ignoreCache:e,...this.identity}).then((()=>{}))}print(e={}){return this.wire.sendAction(\"print\",{...this.identity,options:e}).then((()=>{}))}findInPage(e,t){return this.wire.sendAction(\"find-in-page\",{...this.identity,searchTerm:e,options:t}).then((({payload:e})=>e.data))}stopFindInPage(e){return this.wire.sendAction(\"stop-find-in-page\",{...this.identity,action:e}).then((()=>{}))}getPrinters(){return this.wire.sendAction(\"get-printers\",{...this.identity}).then((({payload:e})=>e.data))}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){await this.wire.sendAction(\"focus-window\",{emitSynthFocused:e,...this.identity})}async showDeveloperTools(){await this.wire.sendAction(\"show-developer-tools\",this.identity)}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction(\"get-process-info\",this.identity);return e}async getSharedWorkers(){return this.wire.sendAction(\"get-shared-workers\",this.identity).then((({payload:e})=>e.data))}async inspectSharedWorker(){await this.wire.sendAction(\"inspect-shared-worker\",{...this.identity})}async inspectSharedWorkerById(e){await this.wire.sendAction(\"inspect-shared-worker-by-id\",{...this.identity,workerId:e})}async inspectServiceWorker(){await this.wire.sendAction(\"inspect-service-worker\",{...this.identity})}async showPopupWindow(e){if(this.wire.sendAction(`${this.entityType}-show-popup-window`,this.identity).catch((()=>{})),e?.onPopupReady){const t=async({popupName:t})=>{try{const n=this.fin.Window.wrapSync({uuid:this.fin.me.uuid,name:t});await e.onPopupReady(n)}catch(e){throw new Error(`Something went wrong during onPopupReady execution: ${e}`)}};await this.once(\"popup-ready\",t)}const{payload:t}=await this.wire.sendAction(\"try-create-popup-window\",{options:{...e,hasResultCallback:!!e?.onPopupResult,hasReadyCallback:!!e?.onPopupReady},...this.identity}),{data:{willOpen:n,options:i}}=t;n&&await this.fin.Window.create(i.initialOptions);if(e?.onPopupResult){const t=async t=>{await e.onPopupResult((e=>{const{name:t,uuid:n,result:i,data:r}=e,o={identity:{name:t,uuid:n},result:i};return r&&(o.data=r),o})(t))},n=async()=>{await this.removeListener(\"popup-result\",t)};await this.on(\"popup-result\",t),await this.once(\"popup-teardown\",n)}const{payload:r}=await this.wire.sendAction(\"show-popup-window\",{options:i,...this.identity});return r.data}}var U,V,z,K,q;function J(){return V||(V=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(function(){if($)return L;$=1,Object.defineProperty(L,\"__esModule\",{value:!0}),L.ViewModule=void 0;const e=d,t=O,n=J(),i=T;class r extends e.Base{async create(e){const{uuid:t}=this.wire.me;if(!e.name||\"string\"!=typeof e.name)throw new Error(\"Please provide a name property as a string in order to create a View.\");return(0,i.handleDeprecatedWarnings)(e),this.wire.environment.childViews?await this.wire.environment.createChildContent({entityType:\"view\",options:{...e,uuid:t}}):await this.wire.sendAction(\"create-view\",{...e,uuid:t}),this.wrapSync({uuid:t,name:e.name})}async wrap(e){this.wire.sendAction(\"view-wrap\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}wrapSync(e){this.wire.sendAction(\"view-wrap-sync\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}getCurrent(){if(this.wire.sendAction(\"view-get-current\").catch((e=>{})),!this.wire.me.isView)throw new Error(\"You are not in a View context\");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction(\"view-get-current-sync\").catch((e=>{})),!this.wire.me.isView)throw new Error(\"You are not in a View context\");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return L.ViewModule=r,L}(),e),n(function(){if(U)return B;var e;U=1,Object.defineProperty(B,\"__esModule\",{value:!0}),B.View=void 0;const t=g,n=G,i=H,r=ie();class o extends i.WebContents{constructor(i,o){super(i,o,\"view\"),this.identity=o,e.set(this,new n.Lazy((()=>this.fin.Platform.wrapSync(this.identity).getClient()))),this.attach=async e=>{await this.wire.sendAction(\"attach-view\",{target:e,...this.identity})},this.destroy=async()=>{await this.wire.sendAction(\"destroy-view\",{...this.identity})},this.show=async()=>{await this.wire.sendAction(\"show-view\",{...this.identity})},this.showAt=async(e,t={})=>{await this.wire.sendAction(\"show-view-at\",{bounds:e,...this.identity,options:t})},this.bringToFront=async()=>{await this.wire.sendAction(\"bring-view-to-front\",{...this.identity})},this.hide=async()=>{await this.wire.sendAction(\"hide-view\",{...this.identity})},this.setBounds=async e=>{await this.wire.sendAction(\"set-view-bounds\",{bounds:e,...this.identity})},this.getBounds=async()=>(await this.wire.sendAction(\"get-view-bounds\",{...this.identity})).payload.data,this.getInfo=async()=>(await this.wire.sendAction(\"get-view-info\",{...this.identity})).payload.data,this.getParentLayout=async()=>(this.wire.sendAction(\"view-get-parent-layout\",{...this.identity}).catch((()=>{})),this.fin.Platform.Layout.getLayoutByViewIdentity(this.identity)),this.getOptions=async()=>this.wire.sendAction(\"get-view-options\",{...this.identity}).then((({payload:e})=>e.data)),this.updateOptions=async e=>this.wire.sendAction(\"update-view-options\",{options:e,...this.identity}).then((()=>{})),this.getCurrentWindow=async()=>{const{payload:{data:e}}=await this.wire.sendAction(\"get-view-window\",{...this.identity});return new r._Window(this.wire,e)},this.getCurrentStack=async()=>{this.wire.sendAction(\"view-get-current-stack\").catch((()=>{}));try{return(await this.getParentLayout()).getStackByViewIdentity(this.identity)}catch(e){throw new t.RuntimeError({reason:\"This view does not belong to a stack.\",error:e})}},this.triggerBeforeUnload=async()=>(await this.wire.sendAction(\"trigger-before-unload\",{...this.identity})).payload.data,this.bindToElement=async e=>{if(!e)throw new Error(\"Element not found.\");return this.wire.environment.observeBounds(e,(async e=>this.setBounds(e)))}}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){const t=await this.getCurrentWindow();await t.focusedWebViewWasChanged(),await super.focus({emitSynthFocused:e})}}return B.View=o,e=new WeakMap,B}(),e)}(k)),k}function Y(){if(z)return j;z=1,Object.defineProperty(j,\"__esModule\",{value:!0}),j.Application=void 0;const e=d,t=ie(),n=J();class i extends e.EmitterBase{constructor(e,n){super(e,\"application\",n.uuid),this.identity=n,this.window=new t._Window(this.wire,{uuid:this.identity.uuid,name:this.identity.uuid})}windowListFromIdentityList(e){const n=[];return e.forEach((e=>{n.push(new t._Window(this.wire,{uuid:e.uuid,name:e.name}))})),n}isRunning(){return this.wire.sendAction(\"is-application-running\",this.identity).then((({payload:e})=>e.data))}async quit(e=!1){try{await this._close(e),await this.wire.sendAction(\"destroy-application\",{force:e,...this.identity})}catch(e){if(![\"Remote connection has closed\",\"Could not locate the requested application\"].some((t=>e.message.includes(t))))throw e}}async _close(e=!1){try{await this.wire.sendAction(\"close-application\",{force:e,...this.identity})}catch(e){if(!e.message.includes(\"Remote connection has closed\"))throw e}}close(e=!1){return console.warn(\"Deprecation Warning: Application.close is deprecated Please use Application.quit\"),this.wire.sendAction(\"application-close\",this.identity).catch((e=>{})),this._close(e)}getChildWindows(){return this.wire.sendAction(\"get-child-windows\",this.identity).then((({payload:e})=>{const t=[];return e.data.forEach((e=>{t.push({uuid:this.identity.uuid,name:e})})),this.windowListFromIdentityList(t)}))}getManifest(){return this.wire.sendAction(\"get-application-manifest\",this.identity).then((({payload:e})=>e.data))}getParentUuid(){return this.wire.sendAction(\"get-parent-application\",this.identity).then((({payload:e})=>e.data))}getShortcuts(){return this.wire.sendAction(\"get-shortcuts\",this.identity).then((({payload:e})=>e.data))}async getViews(){const{payload:e}=await this.wire.sendAction(\"application-get-views\",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}getZoomLevel(){return this.wire.sendAction(\"get-application-zoom-level\",this.identity).then((({payload:e})=>e.data))}getWindow(){return this.wire.sendAction(\"application-get-window\",this.identity).catch((e=>{})),Promise.resolve(this.window)}registerUser(e,t){return this.wire.sendAction(\"register-user\",{userName:e,appName:t,...this.identity}).then((()=>{}))}removeTrayIcon(){return this.wire.sendAction(\"remove-tray-icon\",this.identity).then((()=>{}))}restart(){return this.wire.sendAction(\"restart-application\",this.identity).then((()=>{}))}run(){return console.warn(\"Deprecation Warning: Application.run is deprecated Please use fin.Application.start\"),this.wire.sendAction(\"application-run\",this.identity).catch((e=>{})),this._run()}_run(e={}){return this.wire.sendAction(\"run-application\",{manifestUrl:this._manifestUrl,opts:e,...this.identity}).then((()=>{}))}scheduleRestart(){return this.wire.sendAction(\"relaunch-on-close\",this.identity).then((()=>{}))}async sendApplicationLog(){const{payload:e}=await this.wire.sendAction(\"send-application-log\",this.identity);return e.data}async setJumpList(e){await this.wire.sendAction(\"set-jump-list\",{config:e,...this.identity})}setTrayIcon(e){return this.wire.sendAction(\"set-tray-icon\",{enabledIcon:e,...this.identity}).then((()=>{}))}setShortcuts(e){return this.wire.sendAction(\"set-shortcuts\",{data:e,...this.identity}).then((()=>{}))}async setShortcutQueryParams(e){await this.wire.sendAction(\"set-shortcut-query-args\",{data:e,...this.identity})}setZoomLevel(e){return this.wire.sendAction(\"set-application-zoom-level\",{level:e,...this.identity}).then((()=>{}))}async setAppLogUsername(e){await this.wire.sendAction(\"set-app-log-username\",{data:e,...this.identity})}getTrayIconInfo(){return this.wire.sendAction(\"get-tray-icon-info\",this.identity).then((({payload:e})=>e.data))}hasTrayIcon(){return this.wire.sendAction(\"has-tray-icon\",this.identity).then((({payload:e})=>e.data))}terminate(){return this.wire.sendAction(\"terminate-application\",this.identity).then((()=>{}))}wait(){return this.wire.sendAction(\"wait-for-hung-application\",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction(\"get-info\",this.identity).then((({payload:e})=>e.data))}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction(\"application-get-process-info\",this.identity);return e}async setFileDownloadLocation(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t};await this.wire.sendAction(\"set-file-download-location\",{...n,downloadLocation:e})}async getFileDownloadLocation(){const{payload:{data:e}}=await this.wire.sendAction(\"get-file-download-location\",this.identity);return e}async showTrayIconPopupMenu(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t},{payload:i}=await this.wire.sendAction(\"show-tray-icon-popup-menu\",{...n,options:e});return i.data}async closeTrayIconPopupMenu(){const{name:e}=this.wire.me,t={uuid:this.identity.uuid,name:e};await this.wire.sendAction(\"close-tray-icon-popup-menu\",{...t})}}return j.Application=i,j}function Z(){return q||(q=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(function(){if(K)return F;K=1,Object.defineProperty(F,\"__esModule\",{value:!0}),F.ApplicationModule=void 0;const e=d,t=O,n=Y();class i extends e.Base{async wrap(e){this.wire.sendAction(\"wrap-application\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}wrapSync(e){this.wire.sendAction(\"wrap-application-sync\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}async _create(e){return void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&void 0===e.isPlatformController&&(e.autoShow=!0),await this.wire.sendAction(\"create-application\",e),this.wrap({uuid:e.uuid})}create(e){return console.warn(\"Deprecation Warning: fin.Application.create is deprecated. Please use fin.Application.start\"),this.wire.sendAction(\"application-create\").catch((e=>{})),this._create(e)}async start(e){this.wire.sendAction(\"start-application\").catch((e=>{}));const t=await this._create(e);return await this.wire.sendAction(\"run-application\",{uuid:e.uuid}),t}async startManyManifests(e,t){return this.wire.sendAction(\"run-applications\",{applications:e,opts:t}).then((()=>{}))}getCurrent(){return this.wire.sendAction(\"get-current-application\").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction(\"get-current-application-sync\").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}async startFromManifest(e,t){this.wire.sendAction(\"application-start-from-manifest\").catch((e=>{}));const n=await this._createFromManifest(e);return await n._run(t),n}createFromManifest(e){return console.warn(\"Deprecation Warning: fin.Application.createFromManifest is deprecated. Please use fin.Application.startFromManifest\"),this.wire.sendAction(\"application-create-from-manifest\").catch((e=>{})),this._createFromManifest(e)}_createFromManifest(e){return this.wire.sendAction(\"get-application-manifest\",{manifestUrl:e}).then((({payload:e})=>{const t=e.data.platform?e.data.platform.uuid:e.data.startup_app.uuid;return this.wrap({uuid:t})})).then((t=>(t._manifestUrl=e,t)))}}return F.ApplicationModule=i,F}(),e),n(Y(),e)}(R)),R}H.WebContents=D;var Q={};Object.defineProperty(Q,\"__esModule\",{value:!0}),Q.promisifySubscription=void 0;var X,ee,te;function ne(){if(X)return S;X=1,Object.defineProperty(S,\"__esModule\",{value:!0}),S._Window=void 0;const e=Z(),t=H,n=J(),i=T,r=Q;class o extends t.WebContents{constructor(e,t){super(e,t,\"window\")}async createWindow(e){this.wire.sendAction(\"window-create-window\",this.identity).catch((e=>{}));const t=await(0,r.promisifySubscription)(this,\"fire-constructor-callback\");void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&(e.autoShow=!0),(0,i.handleDeprecatedWarnings)(e);const n=this.wire.environment.createChildContent({entityType:\"window\",options:e}),[o]=await Promise.all([t.getValue(),n]);let s;const{success:a}=o,c=o.data,{message:d}=c;s=a?{httpResponseCode:c.httpResponseCode,apiInjected:c.apiInjected}:{message:c.message,networkErrorCode:c.networkErrorCode,stack:c.stack};const h={message:d,cbPayload:s,success:a};try{this.getWebWindow().fin.__internal_.openerSuccessCBCalled()}catch(e){}return h.success?this:Promise.reject(h)}getAllFrames(){return this.wire.sendAction(\"get-all-frames\",this.identity).then((({payload:e})=>e.data))}getBounds(){return this.wire.sendAction(\"get-window-bounds\",this.identity).then((({payload:e})=>e.data))}center(){return this.wire.sendAction(\"center-window\",this.identity).then((()=>{}))}blur(){return this.wire.sendAction(\"blur-window\",this.identity).then((()=>{}))}bringToFront(){return this.wire.sendAction(\"bring-window-to-front\",this.identity).then((()=>{}))}animate(e,t){return this.wire.sendAction(\"animate-window\",{transitions:e,options:t,...this.identity}).then((()=>{}))}hide(){return this.wire.sendAction(\"hide-window\",this.identity).then((()=>{}))}close(e=!1){return this.wire.sendAction(\"close-window\",{force:e,...this.identity}).then((()=>{Object.setPrototypeOf(this,null)}))}focusedWebViewWasChanged(){return this.wire.sendAction(\"focused-webview-changed\",this.identity).then((()=>{}))}getNativeId(){return this.wire.sendAction(\"get-window-native-id\",this.identity).then((({payload:e})=>e.data))}async getCurrentViews(){const{payload:e}=await this.wire.sendAction(\"window-get-views\",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}disableFrame(){return console.warn(\"Function is deprecated; use disableUserMovement instead.\"),this.wire.sendAction(\"disable-window-frame\",this.identity).then((()=>{}))}disableUserMovement(){return this.wire.sendAction(\"disable-window-frame\",this.identity).then((()=>{}))}enableFrame(){return console.warn(\"Function is deprecated; use enableUserMovement instead.\"),this.wire.sendAction(\"enable-window-frame\",this.identity).then((()=>{}))}enableUserMovement(){return this.wire.sendAction(\"enable-window-frame\",this.identity).then((()=>{}))}flash(){return this.wire.sendAction(\"flash-window\",this.identity).then((()=>{}))}stopFlashing(){return this.wire.sendAction(\"stop-flash-window\",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction(\"get-window-info\",this.identity).then((({payload:e})=>e.data))}async getLayout(e){this.wire.sendAction(\"window-get-layout\",this.identity).catch((e=>{}));const t=await this.getOptions();if(!t.layout&&!t.layoutSnapshot)throw new Error(\"Window does not have a Layout\");return this.fin.Platform.Layout.wrap(e??this.identity)}getOptions(){return this.wire.sendAction(\"get-window-options\",this.identity).then((({payload:e})=>e.data))}getParentApplication(){return this.wire.sendAction(\"window-get-parent-application\",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity))}getParentWindow(){return this.wire.sendAction(\"window-get-parent-window\",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity)).then((e=>e.getWindow()))}async getSnapshot(e){const t={area:e,...this.identity};console.warn(\"Window.getSnapshot has been deprecated, please use Window.capturePage\");return(await this.wire.sendAction(\"get-window-snapshot\",t)).payload.data}getState(){return this.wire.sendAction(\"get-window-state\",this.identity).then((({payload:e})=>e.data))}getWebWindow(){return this.wire.sendAction(\"window-get-web-window\",this.identity).catch((e=>{})),this.wire.environment.getWebWindow(this.identity)}isMainWindow(){return this.wire.sendAction(\"window-is-main-window\",this.identity).catch((e=>{})),this.me.uuid===this.me.name}isShowing(){return this.wire.sendAction(\"is-window-showing\",this.identity).then((({payload:e})=>e.data))}maximize(){return this.wire.sendAction(\"maximize-window\",this.identity).then((()=>{}))}minimize(){return this.wire.sendAction(\"minimize-window\",this.identity).then((()=>{}))}moveBy(e,t,n){return this.wire.sendAction(\"move-window-by\",{deltaLeft:e,deltaTop:t,positioningOptions:n,...this.identity}).then((()=>{}))}moveTo(e,t,n){return this.wire.sendAction(\"move-window\",{left:e,top:t,positioningOptions:n,...this.identity}).then((()=>{}))}resizeBy(e,t,n,i){return this.wire.sendAction(\"resize-window-by\",{deltaWidth:Math.floor(e),deltaHeight:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}resizeTo(e,t,n,i){return this.wire.sendAction(\"resize-window\",{width:Math.floor(e),height:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}restore(){return this.wire.sendAction(\"restore-window\",this.identity).then((()=>{}))}setAsForeground(){return this.wire.sendAction(\"set-foreground-window\",this.identity).then((()=>{}))}setBounds(e,t){return this.wire.sendAction(\"set-window-bounds\",{...e,...this.identity,positioningOptions:t}).then((()=>{}))}show(e=!1){return this.wire.sendAction(\"show-window\",{force:e,...this.identity}).then((()=>{}))}showAt(e,t,n=!1){return this.wire.sendAction(\"show-at-window\",{force:n,left:Math.floor(e),top:Math.floor(t),...this.identity}).then((()=>{}))}updateOptions(e){return this.wire.sendAction(\"update-window-options\",{options:e,...this.identity}).then((()=>{}))}authenticate(e,t){return this.wire.sendAction(\"window-authenticate\",{userName:e,password:t,...this.identity}).then((()=>{}))}async showPopupMenu(e){const{payload:t}=await this.wire.sendAction(\"show-popup-menu\",{options:e,...this.identity});return t.data}async closePopupMenu(){return this.wire.sendAction(\"close-popup-menu\",{...this.identity}).then((()=>{}))}async dispatchPopupResult(e){this.wire.sendAction(\"window-dispatch-popup-result\",this.identity).catch((e=>{})),await this.wire.sendAction(\"dispatch-popup-result\",{data:e,...this.identity})}async print(e={content:\"self\"}){switch(e.content){case void 0:case\"self\":return super.print(e);case\"screenshot\":return this.wire.sendAction(\"print-screenshot\",this.identity).then((()=>{}));case\"views\":return this.wire.sendAction(\"print-views\",{...this.identity,options:e}).then((()=>{}));default:return}}}return S._Window=o,S}function ie(){return te||(te=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(function(){if(ee)return _;ee=1,Object.defineProperty(_,\"__esModule\",{value:!0}),_._WindowModule=void 0;const e=d,t=O,n=ne();class i extends e.Base{async wrap(e){this.wire.sendAction(\"window-wrap\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}wrapSync(e){this.wire.sendAction(\"window-wrap-sync\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}create(e){return this.wire.sendAction(\"create-window\").catch((e=>{})),new n._Window(this.wire,{uuid:this.me.uuid,name:e.name}).createWindow(e)}getCurrent(){if(this.wire.sendAction(\"get-current-window\").catch((e=>{})),!this.wire.me.isWindow)throw new Error(\"You are not in a Window context\");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction(\"get-current-window-sync\").catch((e=>{})),!this.wire.me.isWindow)throw new Error(\"You are not in a Window context\");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return _._WindowModule=i,_}(),e),n(ne(),e)}(M)),M}Q.promisifySubscription=async(e,t,n=(()=>!0),i)=>{let r,o,s;const a=new Promise(((e,t)=>{r=e,o=t})),c=e=>{n(e)&&(clearTimeout(s),r(e))};return await e.on(t,c),i&&(s=setTimeout((()=>o(new Error(\"event timed out\"))),i)),a.finally((()=>{e.removeListener(t,c).catch((()=>null))})),{getValue:()=>a}},Object.defineProperty(c,\"__esModule\",{value:!0}),c.System=void 0;const re=d,oe=g,se=ie(),ae=t;class ce extends re.EmitterBase{constructor(e){super(e,\"system\")}sendExternalProcessRequest(e,t){return new Promise(((n,i)=>{const r=\"external-process-exited\";let o,s,a,c;\"function\"==typeof t.listener&&(a=e=>{const n=e||{};s={topic:\"exited\",uuid:n.processUuid||\"\",exitCode:n.exitCode||0},o===e.processUuid&&(t.listener(s),c.removeListener(r,a))},this.wire.me.name||(this.wire.me.name=this.wire.me.uuid),c=new se._Window(this.wire,this.wire.me),c.on(r,a)),this.wire.sendAction(e,t).then((({payload:e})=>{o=e.data.uuid,n(e.data),s&&o===s.uuid&&(t.listener(s),c.removeListener(r,a))})).catch((e=>{c&&c.removeListener(r,a),i(e)}))}))}getVersion(){return this.wire.sendAction(\"get-version\").then((({payload:e})=>e.data))}clearCache(e){return this.wire.sendAction(\"clear-cache\",e).then((()=>{}))}deleteCacheOnExit(){return this.wire.sendAction(\"delete-cache-request\").then((()=>{}))}exit(){return this.wire.sendAction(\"exit-desktop\").then((()=>{}))}async fetchManifest(e){const{payload:{data:t}}=await this.wire.sendAction(\"fetch-manifest\",{manifestUrl:e});return t}flushCookieStore(){return this.wire.sendAction(\"flush-cookie-store\").then((()=>{}))}getAllWindows(){return this.wire.sendAction(\"get-all-windows\").then((({payload:e})=>e.data))}getAllApplications(){return this.wire.sendAction(\"get-all-applications\").then((({payload:e})=>e.data))}getCommandLineArguments(){return this.wire.sendAction(\"get-command-line-arguments\").then((({payload:e})=>e.data))}async getCrashReporterState(){const{payload:{data:{diagnosticMode:e,isRunning:t}}}=await this.wire.sendAction(\"get-crash-reporter-state\");return console.warn(\"diagnosticMode property is deprecated. It will be removed in a future version\"),{diagnosticMode:e,diagnosticsMode:e,isRunning:t}}async startCrashReporter(e){const t=e,n={...t,diagnosticMode:t.diagnosticsMode||t.diagnosticMode},{payload:{data:{diagnosticMode:i,isRunning:r}}}=await this.wire.sendAction(\"start-crash-reporter\",n);return{diagnosticMode:i,diagnosticsMode:i,isRunning:r}}getUniqueUserId(){return this.wire.sendAction(\"get-unique-user-id\").then((({payload:e})=>e.data))}getEntityInfo(e,t){return this.wire.sendAction(\"get-entity-info\",{uuid:e,name:t}).then((({payload:e})=>e.data))}getEnvironmentVariable(e){return this.wire.sendAction(\"get-environment-variable\",{environmentVariables:e}).then((({payload:e})=>e.data))}getFocusedWindow(){return this.wire.sendAction(\"get-focused-window\").then((({payload:e})=>e.data))}async isAppCertified(e){const{payload:{data:{certifiedInfo:t}}}=await this.wire.sendAction(\"is-app-certified\",{manifestUrl:e});return t}getInstalledRuntimes(){return this.wire.sendAction(\"get-installed-runtimes\").then((({payload:e})=>e.data.runtimes))}async getInstalledApps(){const{payload:{data:{installedApps:e}}}=await this.wire.sendAction(\"get-installed-apps\");return e}getLog(e){return this.wire.sendAction(\"view-log\",e).then((({payload:e})=>e.data))}getMachineId(){return this.wire.sendAction(\"get-machine-id\").then((({payload:e})=>e.data))}getMinLogLevel(){return this.wire.sendAction(\"get-min-log-level\").then((({payload:e})=>e.data))}getLogList(){return this.wire.sendAction(\"list-logs\").then((({payload:e})=>e.data))}getMonitorInfo(){return this.wire.sendAction(\"get-monitor-info\").then((({payload:e})=>e.data))}getMousePosition(){return this.wire.sendAction(\"get-mouse-position\").then((({payload:e})=>e.data))}getProcessList(){return console.warn(\"System.getProcessList has been deprecated. Please consider using our new process APIs: Window.getProcessInfo, View.getProcessInfo, Application.getProcessInfo, System.getAllProcessInfo\"),this.wire.sendAction(\"process-snapshot\").then((({payload:e})=>e.data))}async getAllProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction(\"get-all-process-info\",this.identity);return e}getProxySettings(){return this.wire.sendAction(\"get-proxy-settings\").then((({payload:e})=>e.data))}getRuntimeInfo(){return this.wire.sendAction(\"get-runtime-info\").then((({payload:e})=>e.data))}getRvmInfo(){return this.wire.sendAction(\"get-rvm-info\").then((({payload:e})=>e.data))}getHostSpecs(){return this.wire.sendAction(\"get-host-specs\").then((({payload:e})=>e.data))}getOSInfo(){return this.wire.sendAction(\"get-os-info\").then((({payload:e})=>e.data))}launchExternalProcess(e){return this.sendExternalProcessRequest(\"launch-external-process\",e)}monitorExternalProcess(e){return this.sendExternalProcessRequest(\"monitor-external-process\",e)}log(e,t){return this.wire.sendAction(\"write-to-log\",{level:e,message:t}).then((()=>{}))}openUrlWithBrowser(e){return this.wire.sendAction(\"open-url-with-browser\",{url:e}).then((()=>{}))}async registerCustomProtocol(e){if(\"object\"!=typeof e)throw new Error(\"Must provide an object with a `protocolName` property having a string value.\");await this.wire.sendAction(\"register-custom-protocol\",e)}async unregisterCustomProtocol(e){await this.wire.sendAction(\"unregister-custom-protocol\",{protocolName:e})}async getCustomProtocolState(e){return this.wire.sendAction(\"get-custom-protocol-state\",{protocolName:e}).then((({payload:e})=>e.data))}releaseExternalProcess(e){return this.wire.sendAction(\"release-external-process\",{uuid:e}).then((()=>{}))}showDeveloperTools(e){return this.wire.sendAction(\"show-developer-tools\",e).then((()=>{}))}terminateExternalProcess(e){return this.wire.sendAction(\"terminate-external-process\",e).then((()=>{}))}updateProxySettings(e){return this.wire.sendAction(\"update-proxy\",e).then((()=>{}))}async downloadAsset(e,t){const n=()=>{};let i=n,r=n;const o=new Promise(((e,t)=>{i=e,r=t}));if(\"openfin\"!==this.wire.environment.type)throw new oe.NotSupportedError(\"downloadAsset only supported in an OpenFin Render process\");const s=oe.RuntimeError.getCallSite(),a=this.wire.environment.getNextMessageId().toString(),c=`asset-download-progress-${a}`,d=`asset-download-error-${a}`,h=`asset-download-complete-${a}`,l=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},u=()=>{this.removeListener(c,l)};await Promise.all([this.on(c,l),this.once(d,(e=>{u();const{reason:t,err:n}=e;r(new oe.RuntimeError({reason:t,error:n},s))})),this.once(h,(()=>{u(),i()}))]);const p=Object.assign(e,{downloadId:a});return await this.wire.sendAction(\"download-asset\",p).catch((e=>{throw u(),e})),o}downloadRuntime(e,t){const n=oe.RuntimeError.getCallSite();return new Promise(((i,r)=>{if(\"openfin\"!==this.wire.environment.type)return void r(new oe.NotSupportedError(\"downloadRuntime only supported in an OpenFin Render process\"));const o=this.wire.environment.getNextMessageId().toString(),s=`runtime-download-progress-${o}`,a=`runtime-download-error-${o}`,c=`runtime-download-complete-${o}`,d=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},h=()=>{this.removeListener(s,d)};this.on(s,d),this.once(a,(e=>{h();const{reason:t,err:i}=e;r(new oe.RuntimeError({reason:t,error:i},n))})),this.once(c,(()=>{h(),i()}));const l=Object.assign(e,{downloadId:o});this.wire.sendAction(\"download-runtime\",l).catch((e=>{h(),r(e)}))}))}downloadPreloadScripts(e){return this.wire.sendAction(\"download-preload-scripts\",{scripts:e}).then((({payload:e})=>e.data))}getAllExternalApplications(){return this.wire.sendAction(\"get-all-external-applications\").then((({payload:e})=>e.data))}getAppAssetInfo(e){return this.wire.sendAction(\"get-app-asset-info\",e).then((({payload:e})=>e.data))}getCookies(e){const t=this.wire.environment.getUrl(),n=Object.assign(e,{url:t});return this.wire.sendAction(\"get-cookies\",n).then((({payload:e})=>e.data))}setMinLogLevel(e){return this.wire.sendAction(\"set-min-log-level\",{level:e}).then((()=>{}))}resolveUuid(e){return this.wire.sendAction(\"resolve-uuid\",{entityKey:e}).then((({payload:e})=>e.data))}executeOnRemote(e,t){return t.requestingIdentity=e,this.wire.ferryAction(t)}readRegistryValue(e,t,n){return this.wire.sendAction(\"read-registry-value\",{rootKey:e,subkey:t,value:n}).then((({payload:e})=>e.data))}registerExternalConnection(e){return this.wire.sendAction(\"register-external-connection\",{uuid:e}).then((({payload:e})=>e.data))}async getServiceConfiguration(e){if(\"string\"!=typeof e.name)throw new Error(\"Must provide an object with a `name` property having a string value\");const{name:t}=e;return this.wire.sendAction(\"get-service-configuration\",{name:t}).then((({payload:e})=>e.data))}async getSystemAppConfig(e){if(\"string\"!=typeof e)throw new Error(\"Must provide a string value for name of system app\");return this.wire.sendAction(\"get-system-app-configuration\",{name:e}).then((({payload:e})=>e.data))}async registerShutdownHandler(e){this.wire.sendAction(\"system-register-shutdown-handler\").catch((e=>{}));const{uuid:t,name:n}=this.wire.me;this.on(\"system-shutdown\",(i=>{e({proceed:()=>{this.wire.environment.raiseEvent(\"application/system-shutdown-handled\",{uuid:t,name:n,topic:\"application\"})}})}))}runRvmHealthCheck(){return this.wire.sendAction(\"run-rvm-health-check\").then((({payload:e})=>e.data))}async launchManifest(e,t={}){const{subscribe:n,...i}=t,r=i;if(n){const e=new ae.EventEmitter;n(e);const t=\"app-version-progress\",i=\"runtime-status\",o=\"app-version-complete\",s=\"app-version-error\",a=this.wire.environment.getNextMessageId().toString();r.appVersionId=a;const c=[o,t,i,s],d=e=>{const{appVersionId:t,topic:n,type:i,...r}=e;return{...r,type:c.find((e=>i.includes(e)))}},h=t=>{const n=d(t);e.emit(n.type,n)},l=()=>{this.removeListener(`${t}.${a}`,h),this.removeListener(`${i}.${a}`,h),this.removeListener(`${o}.${a}`,h),this.removeListener(`${s}.${a}`,h),this.removeListener(`${o}.${a}`,l),this.removeListener(`${s}.${a}`,l)};await Promise.all([this.on(`${t}.${a}`,h),this.on(`${i}.${a}`,h),this.once(`${o}.${a}`,h),this.once(`${s}.${a}`,h),this.once(`${o}.${a}`,l),this.once(`${s}.${a}`,l)])}return(await this.wire.sendAction(\"launch-manifest\",{manifestUrl:e,opts:r})).payload.data.manifest}async queryPermissionForCurrentContext(e){const t={uuid:this.wire.me.uuid,name:this.wire.me.name};return(await this.wire.sendAction(\"query-permission-for-current-context\",{apiName:e,identity:t})).payload.data}async enableNativeWindowIntegrationProvider(e){const{payload:t}=await this.wire.sendAction(\"enable-native-window-integration-provider\",{permissions:e});return t.data}async registerUsage({data:e,type:t}){await this.wire.sendAction(\"register-usage\",{data:e,type:t})}async getPrinters(){const{payload:e}=await this.wire.sendAction(\"system-get-printers\");return e.data}async updateProcessLoggingOptions(e){await this.wire.sendAction(\"system-update-process-logging-options\",{options:e})}async getDomainSettings(){const{payload:{data:e}}=await this.wire.sendAction(\"get-domain-settings\",this.identity);return e}async setDomainSettings(e){await this.wire.sendAction(\"set-domain-settings\",{domainSettings:e,...this.identity})}async refreshExtensions(){const{payload:e}=await this.wire.sendAction(\"refresh-extensions\");return e.data}async getInstalledExtensions(){const{payload:e}=await this.wire.sendAction(\"get-installed-extensions\");return e.data}}c.System=ce;var de={},he={};Object.defineProperty(he,\"__esModule\",{value:!0}),he.RefCounter=void 0;he.RefCounter=class{constructor(){this.topicRefMap=new Map}incRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t+1;n=i,this.topicRefMap.set(e,i)}else this.topicRefMap.set(e,1),n=1;return n}decRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t-1;this.topicRefMap.set(e,i),n=i}else n=-1;return n}actOnFirst(e,t,n){return 1===this.incRefCount(e)?t():n()}actOnLast(e,t,n){return 0===this.decRefCount(e)?t():n()}};var le={},ue={},pe={};Object.defineProperty(pe,\"__esModule\",{value:!0}),pe.ChannelBase=pe.ProtectedItems=void 0;const we=e=>async(t,n,i)=>{const r=await e(t,n,i);return void 0===r?n:r};pe.ProtectedItems=class{constructor(e,t){this.providerIdentity=e,this.close=t}};class ye{static defaultAction(e){throw new Error(`No action registered at target for ${e}`)}constructor(){this.subscriptions=new Map}async processAction(e,t,n){try{const i=this.subscriptions.has(e)?this.subscriptions.get(e):(t,n)=>(this.defaultAction??ye.defaultAction)(e,t,n),r=this.preAction?await this.preAction(e,t,n):t,o=await i(r,n);return this.postAction?await this.postAction(e,o,n):o}catch(t){if(this.errorMiddleware)return this.errorMiddleware(e,t,n);throw t}}beforeAction(e){if(this.preAction)throw new Error(\"Already registered beforeAction middleware\");this.preAction=we(e)}onError(e){if(this.errorMiddleware)throw new Error(\"Already registered error middleware\");this.errorMiddleware=e}afterAction(e){if(this.postAction)throw new Error(\"Already registered afterAction middleware\");this.postAction=we(e)}remove(e){this.subscriptions.delete(e)}setDefaultAction(e){if(this.defaultAction)throw new Error(\"default action can only be set once\");this.defaultAction=e}register(e,t){if(this.subscriptions.has(e))throw new Error(`Subscription already registered for action: ${e}. Unsubscribe before adding new subscription`);return this.subscriptions.set(e,t),!0}}pe.ChannelBase=ye;var fe,ge,me,ve=s&&s.__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)},Ce=s&&s.__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};Object.defineProperty(ue,\"__esModule\",{value:!0}),ue.ChannelClient=void 0;const be=pe,Ie=new Map;class Ee extends be.ChannelBase{static closeChannelByEndpointId(e){const t=Ie.get(e);t&&ve(t,me,\"f\").call(t)}static handleProviderDisconnect(e){for(const t of Ie.values())t.providerIdentity.channelId===e.channelId&&(t.disconnectListener(e),ve(t,me,\"f\").call(t))}constructor(e,t,n){super(),fe.set(this,void 0),ge.set(this,void 0),this.processAction=(e,t,n)=>super.processAction(e,t,n),me.set(this,(()=>{Ie.delete(this.endpointId),ve(this,ge,\"f\").close()})),Ce(this,fe,new be.ProtectedItems(e,t),\"f\"),this.disconnectListener=()=>{},this.endpointId=e.endpointId,Ce(this,ge,n,\"f\"),Ie.set(this.endpointId,this),n.receive(this.processAction)}get providerIdentity(){return ve(this,fe,\"f\").providerIdentity}async dispatch(e,t){if(ve(this,ge,\"f\").isEndpointConnected(this.providerIdentity.channelId))return ve(this,ge,\"f\").send(this.providerIdentity.channelId,e,t);throw new Error(\"The client you are trying to dispatch from is disconnected from the target provider.\")}onDisconnection(e){this.disconnectListener=t=>{try{e(t)}catch(e){throw new Error(`Error while calling the onDisconnection callback: ${e.message}`)}finally{this.disconnectListener=()=>{}}}}async disconnect(){await this.sendDisconnectAction(),ve(this,me,\"f\").call(this)}async sendDisconnectAction(){const e=ve(this,fe,\"f\");await e.close()}static async wireClose(e,t,n){const{channelName:i,uuid:r,name:o}=t;await e.sendAction(\"disconnect-from-channel\",{channelName:i,uuid:r,name:o,endpointId:n})}}ue.ChannelClient=Ee,fe=new WeakMap,ge=new WeakMap,me=new WeakMap;var xe={},Ae={};Object.defineProperty(Ae,\"__esModule\",{value:!0}),Ae.exhaustiveCheck=void 0,Ae.exhaustiveCheck=function(e,t){throw new Error(`Unsupported value: ${e}${t?`\\n Supported values are: ${t.join(\"\")}`:\"\"}`)};var Pe,Me,_e,Oe={},Se=s&&s.__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},Re=s&&s.__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)};Object.defineProperty(Oe,\"__esModule\",{value:!0}),Oe.ClassicInfo=Oe.ClassicStrategy=void 0;Oe.ClassicStrategy=class{constructor(e,t,n,i){this.messageReceiver=t,this.endpointId=n,this.providerIdentity=i,Pe.set(this,void 0),Me.set(this,new Map),_e.set(this,new Map),this.send=async(e,t,n)=>{const i=Re(this,Me,\"f\").get(e);if(!i)throw new Error(`Could not locate routing info for endpoint ${e}`);const r={...i};r.isLocalEndpointId&&delete r.endpointId,delete r.isLocalEndpointId;const o=Re(this,Pe,\"f\").sendAction(\"send-channel-message\",{...r,providerIdentity:this.providerIdentity,action:t,payload:n});Re(this,_e,\"f\").get(e)?.add(o);return(await o.catch((e=>{throw new Error(e.message)})).finally((()=>{Re(this,_e,\"f\").get(e)?.delete(o)}))).payload.data.result},this.close=async()=>{this.messageReceiver.removeEndpoint(this.providerIdentity.channelId,this.endpointId),[...Re(this,Me,\"f\").keys()].forEach((e=>this.closeEndpoint(e))),Se(this,Me,new Map,\"f\")},Se(this,Pe,e,\"f\")}onEndpointDisconnect(e,t){}receive(e){this.messageReceiver.addEndpoint(e,this.providerIdentity.channelId,this.endpointId)}async closeEndpoint(e){const t=Re(this,Me,\"f\").get(e);Re(this,Me,\"f\").delete(e);const n=Re(this,_e,\"f\").get(e);n?.forEach((n=>{const i=`Channel connection with identity uuid: ${t?.uuid} / name: ${t?.name} / endpointId: ${e} no longer connected.`;n.cancel(new Error(i))}))}isEndpointConnected(e){return Re(this,Me,\"f\").has(e)}addEndpoint(e,t){Re(this,Me,\"f\").set(e,t.endpointIdentity),Re(this,_e,\"f\").set(e,new Set)}isValidEndpointPayload(e){return\"string\"==typeof e?.endpointIdentity?.endpointId||\"string\"==typeof e?.endpointIdentity?.channelId}},Pe=new WeakMap,Me=new WeakMap,_e=new WeakMap,Oe.ClassicInfo={version:5,minimumVersion:0,type:\"classic\"};var Fe={},je={},ke={};Object.defineProperty(ke,\"__esModule\",{value:!0}),ke.errorToPOJO=void 0,ke.errorToPOJO=function(e){return{stack:e.stack,name:e.name,message:e.message,toString:()=>e.stack||e.toString()}};var Le,Te,$e=s&&s.__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)},Be=s&&s.__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};Object.defineProperty(je,\"__esModule\",{value:!0}),je.RTCEndpoint=void 0;const Ge=ke;je.RTCEndpoint=class{static isValidEndpointPayload(e){const t=e=>\"object\"==typeof e&&null!==e;return t(e)&&t(e.endpointIdentity)&&t(e.rtc)&&\"string\"==typeof e.endpointIdentity.endpointId}constructor({rtc:e,endpointIdentity:t}){this.responseMap=new Map,Le.set(this,null),Te.set(this,void 0),this.connectionStateChangeHandler=e=>{\"connected\"!==this.rtc.rtcClient.connectionState&&(this.rtc.rtcClient.removeEventListener(\"connectionstatechange\",this.connectionStateChangeHandler),this.close(),$e(this,Te,\"f\")&&$e(this,Te,\"f\").call(this))},this.send=async(e,t)=>{const n=`message-${Math.random()}`,i=new Promise(((e,t)=>{this.responseMap.set(n,{resolve:e,reject:t})}));return this.rtc.channels.request.send(JSON.stringify({action:e,payload:t,messageId:n})),i},this.close=()=>{this.responseMap.forEach((e=>e.reject(\"Connection has closed.\"))),this.responseMap=new Map,this.rtc.channels.request.close(),this.rtc.channels.response.close(),this.rtc.rtcClient.close()},this.rtc=e,this.endpointIdentity=t,this.rtc.channels.response.addEventListener(\"message\",(e=>{let{data:t}=e;e.data instanceof ArrayBuffer&&(t=(new TextDecoder).decode(e.data));const{messageId:n,payload:i,success:r,error:o}=JSON.parse(t),{resolve:s,reject:a}=this.responseMap.get(n)??{};s&&a?(this.responseMap.delete(n),r?s(i):a(o)):(console.log(\"Could not find id in responseMap.\"),console.log(e))})),this.rtc.channels.request.addEventListener(\"message\",(async e=>{let{data:n}=e;e.data instanceof ArrayBuffer&&(n=(new TextDecoder).decode(e.data));const{messageId:i,action:r,payload:o}=JSON.parse(n);if($e(this,Le,\"f\"))try{const e=await $e(this,Le,\"f\").call(this,r,o,t);this.rtc.channels.response.send(JSON.stringify({messageId:i,payload:e,success:!0}))}catch(e){\"open\"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,error:(0,Ge.errorToPOJO)(e),success:!1}))}else\"open\"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,success:!1,error:\"Connection not ready.\"}))})),this.rtc.rtcClient.addEventListener(\"connectionstatechange\",this.connectionStateChangeHandler),Object.values(this.rtc.channels).forEach((e=>{e.onclose=e=>{[...this.responseMap.values()].forEach((e=>e.reject(new Error(\"RTCDataChannel closed unexpectedly, this is most commonly caused by message size. Note: RTC Channels have a message size limit of ~255kB.\")))),this.close(),$e(this,Te,\"f\")&&$e(this,Te,\"f\").call(this)}}))}onDisconnect(e){if($e(this,Te,\"f\"))throw new Error(\"RTCEndpoint disconnectListener cannot be set twice.\");Be(this,Te,e,\"f\")}receive(e){if($e(this,Le,\"f\"))throw new Error(\"You have already set a listener for this RTC Endpoint.\");Be(this,Le,e,\"f\")}get connected(){return\"connected\"===this.rtc.rtcClient.connectionState}},Le=new WeakMap,Te=new WeakMap;var We,He,Ne,De={},Ue=s&&s.__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)},Ve=s&&s.__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};Object.defineProperty(De,\"__esModule\",{value:!0}),De.EndpointStrategy=void 0;De.EndpointStrategy=class{constructor(e,t,n){this.EndpointType=e,this.StrategyName=n,We.set(this,null),He.set(this,new Map),Ne.set(this,!0),this.send=async(e,t,n)=>this.getEndpointById(e).send(t,n),this.close=async()=>{Ue(this,Ne,\"f\")&&(Ue(this,He,\"f\").forEach((e=>e.close())),Ve(this,He,new Map,\"f\")),Ve(this,Ne,!1,\"f\")},this.isValidEndpointPayload=t}onEndpointDisconnect(e,t){this.getEndpointById(e).onDisconnect(t)}receive(e){if(Ue(this,We,\"f\"))throw new Error(`You have already set a listener for this ${this.StrategyName} Strategy`);Ve(this,We,e,\"f\"),Ue(this,He,\"f\").forEach((e=>e.receive(Ue(this,We,\"f\"))))}getEndpointById(e){const t=Ue(this,He,\"f\").get(e);if(!t)throw new Error(`Client with endpoint id ${e} is not connected`);return t}get connected(){return Ue(this,Ne,\"f\")}isEndpointConnected(e){return Ue(this,He,\"f\").has(e)}addEndpoint(e,t){if(!Ue(this,Ne,\"f\"))return void console.warn(`Adding endpoint to disconnected ${this.StrategyName} Strategy`);const n=new this.EndpointType(t);Ue(this,We,\"f\")&&n.receive(Ue(this,We,\"f\")),Ue(this,He,\"f\").set(e,n)}async closeEndpoint(e){Ue(this,He,\"f\").delete(e)}},We=new WeakMap,He=new WeakMap,Ne=new WeakMap,Object.defineProperty(Fe,\"__esModule\",{value:!0}),Fe.RTCInfo=Fe.RTCStrategy=void 0;const ze=je,Ke=De;class qe extends Ke.EndpointStrategy{constructor(){super(ze.RTCEndpoint,ze.RTCEndpoint.isValidEndpointPayload,\"RTC\")}}Fe.RTCStrategy=qe,Fe.RTCInfo={version:2,minimumVersion:0,type:\"rtc\"};var Je={};Object.defineProperty(Je,\"__esModule\",{value:!0}),Je.RTCICEManager=void 0;const Ye=d;class Ze extends Ye.EmitterBase{constructor(e){super(e,\"channel\"),this.ensureChannelOpened=e=>new Promise(((t,n)=>{if(\"open\"===e.readyState)t();else if(\"connecting\"===e.readyState){const n=()=>{e.removeEventListener(\"open\",n),t()};e.addEventListener(\"open\",n)}else n(new Error(\"This Channel has already closed\"))}))}static createDataChannelPromise(e,t){let n;const i=new Promise((e=>{n=e})),r=i=>{const o=()=>{i.channel.removeEventListener(\"open\",o),n(i.channel)};i.channel.label===e&&(i.channel.addEventListener(\"open\",o),t.removeEventListener(\"datachannel\",r))};return t.addEventListener(\"datachannel\",r),i}async listenForProviderIce(e,t){await this.on(this.createProviderEventName(e),t,{timestamp:Date.now()})}async raiseProviderIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createProviderEventName(e)),t)}async listenForClientIce(e,t){await this.on(this.createClientEventName(e),t,{timestamp:Date.now()})}async raiseClientIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createClientEventName(e)),t)}cleanupIceListeners(e){this.removeAllListeners(this.createClientEventName(e)),this.removeAllListeners(this.createProviderEventName(e))}createClientEventName(e){return`ice-client-${e}`}createProviderEventName(e){return`ice-provider-${e}`}createRouteString(e){return`channel/${e}`}createRtcPeer(){return this.wire.environment.getRtcPeer()}async startClientOffer(){const e=Math.random().toString(),t=this.createRtcPeer();t.addEventListener(\"icecandidate\",(async t=>{t.candidate&&await this.raiseClientIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForProviderIce(e,(async e=>{await t.addIceCandidate(e.candidate)}));const n={request:t.createDataChannel(\"request\"),response:t.createDataChannel(\"response\")},i=await t.createOffer();await t.setLocalDescription(i);const r=Promise.all([n.request,n.response].map(this.ensureChannelOpened)).then((()=>{}));return{rtcClient:t,channels:n,offer:i,rtcConnectionId:e,channelsOpened:r}}async finishClientOffer(e,t,n){return await e.setRemoteDescription(t),await n,!0}async createProviderAnswer(e,t){const n=this.createRtcPeer(),i=Ze.createDataChannelPromise(\"request\",n),r=Ze.createDataChannelPromise(\"response\",n);n.addEventListener(\"icecandidate\",(async t=>{t.candidate&&await this.raiseProviderIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForClientIce(e,(async e=>{await n.addIceCandidate(e.candidate)})),await n.setRemoteDescription(t);const o=await n.createAnswer();await n.setLocalDescription(o);const s=Promise.all([i,r]).then((([t,n])=>(this.cleanupIceListeners(e),{request:t,response:n})));return{rtcClient:n,answer:o,channels:s}}}Je.RTCICEManager=Ze;var Qe={},Xe={};function et(e){return[...e.split(\".\").reverse().entries()].reduce(((e,[t,n])=>e+ +n*1e4**t),0)}function tt(e,t){return et(e)>=et(t)}function nt(e){return e.split(\"/\")[0]}Object.defineProperty(Xe,\"__esModule\",{value:!0}),Xe.runtimeUuidMeetsMinimumRuntimeVersion=Xe.parseRuntimeUuid=Xe.meetsMinimumRuntimeVersion=void 0,Xe.meetsMinimumRuntimeVersion=tt,Xe.parseRuntimeUuid=nt,Xe.runtimeUuidMeetsMinimumRuntimeVersion=function(e,t){return tt(nt(e),t)};var it,rt,ot,st,at,ct=s&&s.__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)},dt=s&&s.__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};Object.defineProperty(Qe,\"__esModule\",{value:!0}),Qe.ChannelProvider=void 0;const ht=pe,lt=Xe;class ut extends ht.ChannelBase{get connections(){return[...ct(this,it,\"f\")]}static handleClientDisconnection(e,t){const n=e.connections.find((e=>e.endpointId===t.endpointId));if(n)ct(e,st,\"f\").call(e,n);else{e.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name)).forEach(ct(e,st,\"f\"))}e.disconnectListener(t)}static setProviderRemoval(e,t){ut.removalMap.set(e,t)}constructor(e,t,n){super(),it.set(this,void 0),rt.set(this,void 0),ot.set(this,void 0),st.set(this,(e=>{const t=this.connections.filter((t=>t.endpointId!==e.endpointId));ct(this,ot,\"f\").closeEndpoint(e.endpointId),dt(this,it,t,\"f\")})),this.processAction=async(e,t,n)=>(ut.clientIsMultiRuntime(n)&&!(0,lt.runtimeUuidMeetsMinimumRuntimeVersion)(n.runtimeUuid,\"18.87.56.0\")?this.handleMultiRuntimeLegacyClient(n):this.checkForClientConnection(n),super.processAction(e,t,n)),at.set(this,(()=>{ct(this,ot,\"f\").close();const e=ut.removalMap.get(this);e&&e()})),dt(this,rt,new ht.ProtectedItems(e,t),\"f\"),this.connectListener=()=>{},this.disconnectListener=()=>{},dt(this,it,[],\"f\"),dt(this,ot,n,\"f\"),n.receive(this.processAction)}dispatch(e,t,n){const i=e.endpointId??this.getEndpointIdForOpenFinId(e,t);return i&&ct(this,ot,\"f\").isEndpointConnected(i)?ct(this,ot,\"f\").send(i,t,n):Promise.reject(new Error(`Client connection with identity uuid: ${e.uuid} / name: ${e.name} / endpointId: ${i} no longer connected.`))}async processConnection(e,t){return ct(this,it,\"f\").push(e),this.connectListener(e,t)}publish(e,t){return this.connections.map((n=>ct(this,ot,\"f\").send(n.endpointId,e,t)))}onConnection(e){this.connectListener=e}onDisconnection(e){this.disconnectListener=e}async destroy(){const e=ct(this,rt,\"f\");e.providerIdentity,dt(this,it,[],\"f\"),await e.close(),ct(this,at,\"f\").call(this)}async getAllClientInfo(){return this.connections.map((e=>{const{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}=e;return{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}}))}checkForClientConnection(e){if(!this.isClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider.\\n Client Identity: {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}isClientConnected(e){return ut.clientIdentityIncludesEndpointId(e)?this.connections.some((t=>t.endpointId===e.endpointId&&t.uuid===e.uuid&&t.name===e.name)):this.isLegacyClientConnected(e)}isLegacyClientConnected(e){return this.connections.some((t=>t.uuid===e.uuid&&t.name===e.name))}handleMultiRuntimeLegacyClient(e){if(!this.isLegacyClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider. Client Identity:\\n {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}getEndpointIdForOpenFinId(e,t){const n=this.connections.filter((t=>t.name===e.name&&t.uuid===e.uuid));if(n.length>=2){const n=ct(this,rt,\"f\"),{uuid:i,name:r}=e,o=n?.providerIdentity.uuid,s=n?.providerIdentity.name;console.warn(`WARNING: Dispatch call may have unintended results. The \"to\" argument of your dispatch call is missing the\\n \"endpointId\" parameter. The identity you are dispatching to ({uuid: ${i}, name: ${r}})\\n has multiple channelClients for this channel. Your dispatched action: (${t}) from the provider:\\n ({uuid: ${o}, name: ${s}}) will only be processed by the most recently-created client.`)}return n.pop()?.endpointId}static clientIdentityIncludesEndpointId(e){return void 0!==e.endpointId}static clientIsMultiRuntime(e){return void 0!==e.runtimeUuid}static async wireClose(e,t){await e.sendAction(\"destroy-channel\",{channelName:t})}}Qe.ChannelProvider=ut,it=new WeakMap,rt=new WeakMap,ot=new WeakMap,st=new WeakMap,at=new WeakMap,ut.removalMap=new WeakMap;var pt={};Object.defineProperty(pt,\"__esModule\",{value:!0}),pt.MessageReceiver=void 0;const wt=ue,yt=d;class ft extends yt.Base{constructor(e){super(e),this.onmessage=e=>\"process-channel-message\"===e.action&&(this.processChannelMessage(e),!0),this.endpointMap=new Map,this.latestEndpointIdByChannelId=new Map,e.registerMessageHandler(this.onmessage.bind(this))}async processChannelMessage(e){const{senderIdentity:t,providerIdentity:n,action:i,ackToSender:r,payload:o,intendedTargetIdentity:s}=e.payload,a=s.channelId??s.endpointId??this.latestEndpointIdByChannelId.get(n.channelId),c=this.endpointMap.get(a);if(!c)return r.payload.success=!1,r.payload.reason=`Client connection with identity uuid: ${this.wire.me.uuid} / name: ${this.wire.me.name} / endpointId: ${a} no longer connected.`,this.wire.sendRaw(r);try{const e=await c(i,o,t);return r.payload.payload=r.payload.payload||{},r.payload.payload.result=e,this.wire.sendRaw(r)}catch(e){return r.payload.success=!1,r.payload.reason=e.message,this.wire.sendRaw(r)}}addEndpoint(e,t,n){this.endpointMap.set(n,e),t!==n&&this.latestEndpointIdByChannelId.set(t,n)}removeEndpoint(e,t){this.endpointMap.delete(t),this.latestEndpointIdByChannelId.get(e)===t&&this.latestEndpointIdByChannelId.delete(e)}checkForPreviousClientConnection(e){const t=this.latestEndpointIdByChannelId.get(e);t&&(wt.ChannelClient.closeChannelByEndpointId(t),console.warn(\"You have created a second connection to an older provider. First connection has been removed from the clientMap\"),console.warn(\"If the provider calls publish(), you may receive multiple messages.\"))}}pt.MessageReceiver=ft;var gt={};Object.defineProperty(gt,\"__esModule\",{value:!0}),gt.ProtocolManager=void 0;gt.ProtocolManager=class{constructor(e){this.ProtocolsInPreferenceOrder=e,this.DefaultClientProtocols=[\"classic\"],this.DefaultProviderProtocols=[\"classic\"],this.getClientProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultClientProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(\", \")}.`);return t},this.getProviderProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultProviderProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(\", \")}.`);return t},this.getCompatibleProtocols=(e,t)=>t.supportedProtocols.filter((t=>e.some((e=>e.type===t.type&&t.version>=e.minimumVersion&&e.version>=(t.minimumVersion??0))))).slice(0,t.maxProtocols)}};var mt={};Object.defineProperty(mt,\"__esModule\",{value:!0});class vt{static combine(e,t){return new vt(e,t)}constructor(e,t){this.primary=e,this.secondary=t}onEndpointDisconnect(e,t){this.primary.onEndpointDisconnect(e,(()=>{this.secondary.isEndpointConnected(e)||t()})),this.secondary.onEndpointDisconnect(e,(()=>{this.primary.isEndpointConnected(e)||t()}))}isValidEndpointPayload(e){return this.primary.isValidEndpointPayload(e)||this.secondary.isValidEndpointPayload(e)}async closeEndpoint(e){await this.primary.closeEndpoint(e),await this.secondary.closeEndpoint(e)}isEndpointConnected(e){return this.primary.isEndpointConnected(e)||this.secondary.isEndpointConnected(e)}async addEndpoint(e,t){this.primary.isValidEndpointPayload(t)&&await this.primary.addEndpoint(e,t),this.secondary.isValidEndpointPayload(t)&&await this.secondary.addEndpoint(e,t)}receive(e){this.primary.receive(e),this.secondary.receive(e)}send(e,t,n){return this.primary.isEndpointConnected(e)?this.primary.send(e,t,n):this.secondary.send(e,t,n)}async close(){await Promise.all([this.primary.close(),this.secondary.close()])}}mt.default=vt;var Ct,bt,It=s&&s.__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},Et=s&&s.__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)},xt=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(xe,\"__esModule\",{value:!0}),xe.ConnectionManager=void 0;const At=Ae,Pt=d,Mt=Oe,_t=Fe,Ot=Je,St=Qe,Rt=pt,Ft=gt,jt=xt(mt);class kt extends Pt.Base{static getProtocolOptionsFromStrings(e){return e.map((e=>{switch(e){case\"rtc\":return _t.RTCInfo;case\"classic\":return Mt.ClassicInfo;default:return(0,At.exhaustiveCheck)(e,[\"rtc\",\"classic\"])}}))}constructor(e){super(e),Ct.set(this,void 0),bt.set(this,void 0),this.removeChannelFromProviderMap=e=>{this.providerMap.delete(e)},this.onmessage=e=>\"process-channel-connection\"===e.action&&(this.processChannelConnection(e),!0),this.providerMap=new Map,this.protocolManager=new Ft.ProtocolManager(\"node\"===this.wire.environment.type?[\"classic\"]:[\"rtc\",\"classic\"]),It(this,Ct,new Rt.MessageReceiver(e),\"f\"),It(this,bt,new Ot.RTCICEManager(e),\"f\"),e.registerMessageHandler(this.onmessage.bind(this))}createProvider(e,t){const n=Object.assign(this.wire.environment.getDefaultChannelOptions().create,e||{}),i=this.protocolManager.getProviderProtocols(n?.protocols),r=i.map((e=>{switch(e){case\"rtc\":return new _t.RTCStrategy;case\"classic\":return new Mt.ClassicStrategy(this.wire,Et(this,Ct,\"f\"),t.channelId,t);default:return(0,At.exhaustiveCheck)(e,[\"rtc\",\"classic\"])}}));let o;if(2===r.length){const[e,t]=r;o=jt.default.combine(e,t)}else{if(1!==r.length)throw new Error(\"failed to combine strategies\");[o]=r}const s=new St.ChannelProvider(t,(()=>St.ChannelProvider.wireClose(this.wire,t.channelName)),o),a=t.channelId;return this.providerMap.set(a,{provider:s,strategy:o,supportedProtocols:kt.getProtocolOptionsFromStrings(i)}),St.ChannelProvider.setProviderRemoval(s,this.removeChannelFromProviderMap.bind(this)),s}async createClientOffer(e){const t=this.protocolManager.getClientProtocols(e?.protocols);let n;return{offer:{supportedProtocols:await Promise.all(t.map((async e=>{switch(e){case\"rtc\":{const{rtcClient:e,channels:t,offer:i,rtcConnectionId:r,channelsOpened:o}=await Et(this,bt,\"f\").startClientOffer();return n={rtcClient:e,channels:t,channelsOpened:o},{type:\"rtc\",version:_t.RTCInfo.version,payload:{offer:i,rtcConnectionId:r}}}case\"classic\":return{type:\"classic\",version:Mt.ClassicInfo.version};default:return(0,At.exhaustiveCheck)(e,[\"rtc\",\"classic\"])}}))),maxProtocols:2},rtc:n}}async createClientStrategy(e,t){t.endpointId||(t.endpointId=this.wire.environment.getNextMessageId(),Et(this,Ct,\"f\").checkForPreviousClientConnection(t.channelId));const n=t.answer??{supportedProtocols:[{type:\"classic\",version:1}]},i=(await Promise.all(n.supportedProtocols.map((async n=>\"rtc\"===n.type&&e?(await Et(this,bt,\"f\").finishClientOffer(e.rtcClient,n.payload.answer,e.channelsOpened),new _t.RTCStrategy):\"classic\"===n.type?new Mt.ClassicStrategy(this.wire,Et(this,Ct,\"f\"),t.endpointId,t):null)))).filter((e=>null!==e));let r;if(e&&!i.some((e=>e instanceof _t.RTCStrategy))&&e&&e.rtcClient.close(),i.length>=2)r=jt.default.combine(i[0],i[1]);else{if(!i.length)throw new Error(\"No compatible protocols\");[r]=i}const o={endpointIdentity:t,rtc:e};return r.addEndpoint(t.channelId,o),r}async processChannelConnection(e){const{clientIdentity:t,providerIdentity:n,ackToSender:i,payload:r,offer:o}=e.payload;t.endpointId?t.isLocalEndpointId=!1:(t.endpointId=this.wire.environment.getNextMessageId(),t.isLocalEndpointId=!0);const s=n.channelId,a=this.providerMap.get(s);if(!a)return i.payload.success=!1,i.payload.reason=`Channel \"${n.channelName}\" has been destroyed.`,this.wire.sendRaw(i);const{provider:c,strategy:d,supportedProtocols:h}=a;try{if(!(c instanceof St.ChannelProvider))throw Error(\"Cannot connect to a channel client\");const e=o??{supportedProtocols:[{type:\"classic\",version:1}],maxProtocols:1},n=this.protocolManager.getCompatibleProtocols(h,e);if(!n.length)throw new Error(\"This provider does not support any of the offered protocols.\");const s=await c.processConnection(t,r);i.payload.payload=i.payload.payload||{};let a={supportedProtocols:[],endpointPayloadPromise:Promise.resolve({endpointIdentity:t})};return a=await n.reduce((async(e,t)=>{const n=await e;if(\"rtc\"===t.type){const{answer:e,rtcClient:i,channels:r}=await Et(this,bt,\"f\").createProviderAnswer(t.payload.rtcConnectionId,t.payload.offer);n.supportedProtocols.push({type:\"rtc\",version:_t.RTCInfo.version,payload:{answer:e}}),n.endpointPayloadPromise=n.endpointPayloadPromise.then((e=>r.then((t=>({...e,rtc:{rtcClient:i,channels:t}})))))}else n.supportedProtocols.push({type:\"classic\",version:Mt.ClassicInfo.version});return n}),Promise.resolve(a)),a.endpointPayloadPromise.then((e=>d.addEndpoint(t.endpointId,e))),i.payload.payload.result=s,i.payload.payload.answer=a,this.wire.sendRaw(i)}catch(e){return i.payload.success=!1,i.payload.reason=e.message,this.wire.sendRaw(i)}}}xe.ConnectionManager=kt,Ct=new WeakMap,bt=new WeakMap;var Lt,Tt,$t,Bt=s&&s.__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},Gt=s&&s.__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)};Object.defineProperty(le,\"__esModule\",{value:!0}),le.Channel=void 0;const Wt=t,Ht=G,Nt=d,Dt=ue,Ut=xe,Vt=Qe;function zt(e){const t=Math.floor(e/10),n=Math.min(3e4,500*2**t);return new Promise((e=>{setTimeout((()=>{e(!1)}),n)}))}class Kt extends Nt.EmitterBase{constructor(e){super(e,\"channel\"),Lt.set(this,void 0),Tt.set(this,new Wt.EventEmitter),$t.set(this,new Ht.AsyncRetryableLazy((async()=>{await Promise.all([this.on(\"disconnected\",(e=>{Dt.ChannelClient.handleProviderDisconnect(e)})),this.on(\"connected\",((...e)=>{Gt(this,Tt,\"f\").emit(\"connected\",...e)}))]).catch((()=>new Error(\"error setting up channel connection listeners\")))}))),Bt(this,Lt,new Ut.ConnectionManager(e),\"f\")}async getAllChannels(){return this.wire.sendAction(\"get-all-channels\").then((({payload:e})=>e.data))}async onChannelConnect(e){await this.on(\"connected\",e)}async onChannelDisconnect(e){await this.on(\"disconnected\",e)}async safeConnect(e,t,n){const i={count:0};do{let r=()=>{};const o=new Promise((t=>{r=n=>{e===n.channelName&&t(!0)},Gt(this,Tt,\"f\").on(\"connected\",r)}));try{if(i.count>0){i.gotConnectedEvent=await Promise.race([zt(i.count),o]);const t=await this.wire.sendAction(\"connect-to-channel\",{...n,retryInfo:i});return console.log(`Successfully connected to channelName: ${e}`),t.payload.data}const t=this.wire.sendAction(\"connect-to-channel\",n);i.originalMessageId=t.messageId;return(await t).payload.data}catch(n){if(!n.message.includes(\"internal-nack\"))throw n;t&&0===i.count&&console.warn(`No channel found for channelName: ${e}. Waiting for connection...`)}finally{i.count+=1,Gt(this,Tt,\"f\").removeListener(\"connected\",r)}}while(t);throw new Error(`No channel found for channelName: ${e}.`)}async connect(e,t={}){if(await Gt(this,$t,\"f\").getValue(),!e||\"string\"!=typeof e)throw new Error(\"Please provide a channelName string to connect to a channel.\");const n={wait:!0,...this.wire.environment.getDefaultChannelOptions().connect,...t},{offer:i,rtc:r}=await Gt(this,Lt,\"f\").createClientOffer(n);let o;(this.fin.me.isFrame||this.fin.me.isView||this.fin.me.isWindow)&&(o=(await this.fin.me.getInfo()).url);const s={channelName:e,...n,offer:i,connectionUrl:o},a=await this.safeConnect(e,n.wait,s),c=await Gt(this,Lt,\"f\").createClientStrategy(r,a),d=new Dt.ChannelClient(a,(()=>Dt.ChannelClient.wireClose(this.wire,a,a.endpointId)),c);return c.onEndpointDisconnect(a.channelId,(async()=>{try{await d.sendDisconnectAction()}catch(e){console.warn(`Something went wrong during disconnect for client with uuid: ${a.uuid} / name: ${a.name} / endpointId: ${a.endpointId}.`)}finally{Dt.ChannelClient.handleProviderDisconnect(a)}})),d}async create(e,t){if(!e)throw new Error(\"Please provide a channelName to create a channel\");const{payload:{data:n}}=await this.wire.sendAction(\"create-channel\",{channelName:e}),i=Gt(this,Lt,\"f\").createProvider(t,n);return this.on(\"client-disconnected\",(t=>{t.channelName===e&&Vt.ChannelProvider.handleClientDisconnection(i,t)})),i}}le.Channel=Kt,Lt=new WeakMap,Tt=new WeakMap,$t=new WeakMap,Object.defineProperty(de,\"__esModule\",{value:!0}),de.InterAppPayload=de.InterApplicationBus=void 0;const qt=t,Jt=d,Yt=he,Zt=le,Qt=O;class Xt extends Jt.Base{constructor(e){super(e),this.events={subscriberAdded:\"subscriber-added\",subscriberRemoved:\"subscriber-removed\"},this.refCounter=new Yt.RefCounter,this.Channel=new Zt.Channel(e),this.emitter=new qt.EventEmitter,e.registerMessageHandler(this.onmessage.bind(this)),this.on=this.emitter.on.bind(this.emitter),this.removeAllListeners=this.emitter.removeAllListeners.bind(this.emitter)}async publish(e,t){await this.wire.sendAction(\"publish-message\",{topic:e,message:t,sourceWindowName:this.me.name})}async send(e,t,n){const i=(0,Qt.validateIdentity)(e);if(i)throw new Error(i);await this.wire.sendAction(\"send-message\",{destinationUuid:e.uuid,destinationWindowName:e.name,topic:t,message:n,sourceWindowName:this.me.name})}subscribe(e,t,n){const i=this.createSubscriptionKey(e.uuid,e.name||\"*\",t);return this.emitter.on(i,n),this.refCounter.actOnFirst(i,(async()=>{await this.wire.sendAction(\"subscribe\",{sourceUuid:e.uuid,sourceWindowName:e.name||\"*\",topic:t,destinationWindowName:this.me.name})}),(()=>Promise.resolve()))}unsubscribe(e,t,n){const i=e.name||\"*\",r=this.createSubscriptionKey(e.uuid,i,t);return this.emitter.removeListener(r,n),this.refCounter.actOnLast(r,(async()=>{await this.wire.sendAction(\"unsubscribe\",{sourceUuid:e.uuid,sourceWindowName:i,topic:t,destinationWindowName:this.me.name})}),(()=>new Promise((e=>e)).then((()=>{}))))}processMessage(e){const{payload:{message:t,sourceWindowName:n,sourceUuid:i,topic:r}}=e,o=[this.createSubscriptionKey(i,n,r),this.createSubscriptionKey(i,\"*\",r),this.createSubscriptionKey(\"*\",\"*\",r)],s={uuid:i,name:n};o.forEach((e=>{this.emitter.emit(e,t,s)}))}emitSubscriverEvent(e,t){const{payload:{targetName:n,uuid:i,topic:r}}=t,o={name:n,uuid:i,topic:r};this.emitter.emit(e,o)}createSubscriptionKey(e,t,n){const i=t||\"*\";if(!(e&&i&&n))throw new Error(\"Missing uuid, name, or topic string\");return function(...e){return e.map((e=>Buffer.from(`${e}`).toString(\"base64\"))).join(\"/\")}(e,i,n)}onmessage(e){const{action:t}=e;switch(t){case\"process-message\":this.processMessage(e);break;case this.events.subscriberAdded:this.emitSubscriverEvent(this.events.subscriberAdded,e);break;case this.events.subscriberRemoved:this.emitSubscriverEvent(this.events.subscriberRemoved,e)}return!0}}de.InterApplicationBus=Xt;de.InterAppPayload=class{};var en={};Object.defineProperty(en,\"__esModule\",{value:!0}),en.Clipboard=void 0;const tn=d;class nn extends tn.Base{async writeText(e){await this.wire.sendAction(\"clipboard-write-text\",e)}async readText(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-text\",{type:e});return t.data}async writeImage(e){await this.wire.sendAction(\"clipboard-write-image\",e)}async readImage(e={format:\"dataURL\"}){const{payload:t}=await this.wire.sendAction(\"clipboard-read-image\",e);return t.data}async writeHtml(e){await this.wire.sendAction(\"clipboard-write-html\",e)}async readHtml(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-html\",{type:e});return t.data}async writeRtf(e){await this.wire.sendAction(\"clipboard-write-rtf\",e)}async readRtf(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-rtf\",{type:e});return t.data}async write(e){await this.wire.sendAction(\"clipboard-write\",e)}async getAvailableFormats(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-formats\",{type:e});return t.data}}en.Clipboard=nn;var rn={},on={},sn={};Object.defineProperty(sn,\"__esModule\",{value:!0}),sn.ExternalApplication=void 0;const an=d;class cn extends an.EmitterBase{constructor(e,t){super(e,\"external-application\",t.uuid),this.identity=t}getInfo(){return this.wire.sendAction(\"get-external-application-info\",this.identity).then((({payload:e})=>e.data))}}sn.ExternalApplication=cn,Object.defineProperty(on,\"__esModule\",{value:!0}),on.ExternalApplicationModule=void 0;const dn=d,hn=sn;class ln extends dn.Base{wrap(e){return this.wire.sendAction(\"external-application-wrap\").catch((e=>{})),Promise.resolve(new hn.ExternalApplication(this.wire,{uuid:e}))}wrapSync(e){return this.wire.sendAction(\"external-application-wrap-sync\").catch((e=>{})),new hn.ExternalApplication(this.wire,{uuid:e})}}on.ExternalApplicationModule=ln,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(on,e),n(sn,e)}(rn);var un={},pn={},wn={};Object.defineProperty(wn,\"__esModule\",{value:!0}),wn._Frame=void 0;const yn=d;class fn extends yn.EmitterBase{constructor(e,t){super(e,\"frame\",t.uuid,t.name),this.identity=t}getInfo(){return this.wire.sendAction(\"get-frame-info\",this.identity).then((({payload:e})=>e.data))}getParentWindow(){return this.wire.sendAction(\"get-parent-window\",this.identity).then((({payload:e})=>e.data))}}wn._Frame=fn,Object.defineProperty(pn,\"__esModule\",{value:!0}),pn._FrameModule=void 0;const gn=d,mn=O,vn=wn;class Cn extends gn.Base{async wrap(e){this.wire.sendAction(\"frame-wrap\").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}wrapSync(e){this.wire.sendAction(\"frame-wrap-sync\").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}getCurrent(){return this.wire.sendAction(\"frame-get-current\").catch((e=>{})),Promise.resolve(new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity()))}getCurrentSync(){return this.wire.sendAction(\"frame-get-current-sync\").catch((e=>{})),new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity())}}pn._FrameModule=Cn,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(pn,e),n(wn,e)}(un);var bn={};Object.defineProperty(bn,\"__esModule\",{value:!0}),bn.GlobalHotkey=void 0;const In=d;class En extends In.EmitterBase{constructor(e){super(e,\"global-hotkey\")}async register(e,t){await this.on(e,t),await this.wire.sendAction(\"global-hotkey-register\",{hotkey:e})}async unregister(e){await this.removeAllListeners(e),await this.wire.sendAction(\"global-hotkey-unregister\",{hotkey:e})}async unregisterAll(){await Promise.all(this.eventNames().filter((e=>!(\"registered\"===e||\"unregistered\"===e))).map((e=>this.removeAllListeners(e)))),await this.wire.sendAction(\"global-hotkey-unregister-all\",{})}async isRegistered(e){const{payload:{data:t}}=await this.wire.sendAction(\"global-hotkey-is-registered\",{hotkey:e});return t}}bn.GlobalHotkey=En;var xn,An={},Pn={},Mn={},_n=s&&s.__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)};Object.defineProperty(Mn,\"__esModule\",{value:!0}),Mn.Platform=void 0;const On=d,Sn=O,Rn=new Map;class Fn extends On.EmitterBase{constructor(e,t){super(t.wire,\"application\",e.uuid),this.getClient=e=>{this.wire.sendAction(\"platform-get-client\",this.identity).catch((e=>{}));const t=e||this.identity,{uuid:n}=t;if(!Rn.has(n)){const e=_n(this,xn,\"f\").call(this,n);Rn.set(n,e)}return Rn.get(n)},xn.set(this,(async e=>{try{const t=`custom-frame-${e}`,n=await this._channel.connect(t,{wait:!1});return n.onDisconnection((()=>{Rn.delete(e)})),n}catch(t){throw Rn.delete(e),new Error(\"The targeted Platform is not currently running. Listen for application-started event for the given Uuid.\")}})),this.launchLegacyManifest=this.launchContentManifest;const n=(0,Sn.validateIdentity)(e);if(n)throw new Error(n);this._channel=t,this.identity={uuid:e.uuid},this.Layout=this.fin.Platform.Layout,this.Application=this.fin.Application.wrapSync(this.identity)}async createView(e,t,n){this.wire.sendAction(\"platform-create-view\",this.identity).catch((e=>{}));const i=await this.getClient(),r=await i.dispatch(\"create-view\",{target:t,opts:e,targetView:n});if(!r||(0,Sn.validateIdentity)(r.identity))throw new Error(`When overwriting the createView call, please return an object that has a valid 'identity' property: ${JSON.stringify(r)}`);return this.fin.View.wrapSync(r.identity)}async createWindow(e){this.wire.sendAction(\"platform-create-window\",this.identity).catch((e=>{}));const t=await this.getClient();e.reason||(e.reason=\"api-call\");const n=await t.dispatch(\"create-view-container\",e);if(!n||(0,Sn.validateIdentity)(n.identity))throw new Error(`When overwriting the createWindow call, please return an object that has a valid 'identity' property: ${JSON.stringify(n)}`);const{identity:i}=n,r=this.fin.Window.wrapSync(i);return r.name=i.name,r.uuid=i.uuid,r}async quit(){this.wire.sendAction(\"platform-quit\",this.identity).catch((e=>{}));return(await this.getClient()).dispatch(\"quit\")}async closeView(e){this.wire.sendAction(\"platform-close-view\",this.identity).catch((e=>{}));const t=await this.getClient();await t.dispatch(\"close-view\",{view:e})}async reparentView(e,t){console.warn(\"Platform.reparentView has been deprecated, please use Platform.createView\"),this.wire.sendAction(\"platform-reparent-view\",this.identity).catch((e=>{}));const n={...e,uuid:e.uuid??this.identity.uuid},i=await this.fin.View.wrap(n),r=await i.getOptions();return this.createView(r,t)}async getSnapshot(){this.wire.sendAction(\"platform-get-snapshot\",this.identity).catch((e=>{}));return(await this.getClient()).dispatch(\"get-snapshot\")}async getViewSnapshot(e){return(await this.getClient()).dispatch(\"get-view-snapshot\",{viewIdentity:e})}async applySnapshot(e,t){this.wire.sendAction(\"platform-apply-snapshot\",this.identity).catch((e=>{}));const n=\"Requested snapshot must be a valid Snapshot object, or a url or filepath to such an object.\";let i;if(\"string\"==typeof e)try{i=(await this._channel.wire.sendAction(\"get-application-manifest\",{manifestUrl:e})).payload.data}catch(e){throw new Error(`${n}: ${e}`)}else i=e;if(!i.windows)throw new Error(n);const r=await this.getClient();return await r.dispatch(\"apply-snapshot\",{snapshot:i,options:t}),this}async fetchManifest(e){return(await this.getClient()).dispatch(\"platform-fetch-manifest\",{manifestUrl:e})}async launchContentManifest(e){this.wire.sendAction(\"platform-launch-content-manifest\",this.identity).catch((()=>{}));const t=await this.getClient(),n=await this.fetchManifest(e);return t.dispatch(\"launch-into-platform\",{manifest:n,manifestUrl:e}),this}async setWindowContext(e={},t){if(this.wire.sendAction(\"platform-set-window-context\",this.identity).catch((e=>{})),!e)throw new Error(\"Please provide a serializable object or string to set the context.\");const n=await this.getClient(),{entityType:i}=t?await this.fin.System.getEntityInfo(t.uuid,t.name):this.fin.me;await n.dispatch(\"set-window-context\",{context:e,entityType:i,target:t||{uuid:this.fin.me.uuid,name:this.fin.me.name}})}async getWindowContext(e){this.wire.sendAction(\"platform-get-window-context\",this.identity).catch((e=>{}));const t=await this.getClient(),{entityType:n}=e?await this.fin.System.getEntityInfo(e.uuid,e.name):this.fin.me;return t.dispatch(\"get-window-context\",{target:e||{uuid:this.fin.me.uuid,name:this.fin.me.name},entityType:n})}async closeWindow(e,t={skipBeforeUnload:!1}){this.wire.sendAction(\"platform-close-window\",this.identity).catch((e=>{}));return(await this.getClient()).dispatch(\"close-window\",{windowId:e,options:t})}}Mn.Platform=Fn,xn=new WeakMap;var jn={},kn={},Ln={},Tn={};function $n(e){switch(e){case\"columns\":case\"grid\":case\"rows\":case\"tabs\":return!0;default:return!1}}Object.defineProperty(Tn,\"__esModule\",{value:!0}),Tn.overrideFromComposables=Tn.isValidPresetType=void 0,Tn.isValidPresetType=$n,Tn.overrideFromComposables=function(...e){return t=>e.reduceRight(((e,t)=>n=>t(e(n))),(e=>e))(t)},Tn.default={isValidPresetType:$n};var Bn={},Gn={},Wn={};Object.defineProperty(Wn,\"__esModule\",{value:!0}),Wn.ApiConsumer=void 0;Wn.ApiConsumer=class{constructor(e){this.strategy=e,this.consume=async e=>(await this.strategy.getExposedFunctions(e)).reduce(((t,n)=>({...t,[n.key]:this.strategy.createFunction(n,e)})),{})}};var Hn={},Nn={};Object.defineProperty(Nn,\"__esModule\",{value:!0}),Nn.expose=Nn.getExposedProperties=void 0;const Dn=Symbol(\"exposedProperties\");Nn.getExposedProperties=e=>e[Dn]||e.prototype[Dn]||[];Nn.expose=e=>(t,n,i)=>{t[Dn]=t[Dn]||[],t[Dn].push({key:n,descriptor:i,options:e})},Object.defineProperty(Hn,\"__esModule\",{value:!0}),Hn.ApiExposer=void 0;const Un=Nn;Hn.ApiExposer=class{constructor(e){this.strategy=e,this.exposeInstance=async(e,t)=>{const n=(0,Un.getExposedProperties)(e),i=await Promise.all(n.map((async({key:n,options:i})=>({key:n,options:await this.strategy.exposeFunction(e[n].bind(e),{key:n,options:i,meta:t})}))));await this.strategy.exposeMeta(t,i)}}};var Vn={},zn={},Kn={};Object.defineProperty(Kn,\"__esModule\",{value:!0}),Kn.ChannelsConsumer=void 0;Kn.ChannelsConsumer=class{constructor(e){this.channel=e,this.getExposedFunctions=async e=>{const{id:t}=e,{props:n}=await this.channel.dispatch(`api-meta:${t}`);return n},this.createFunction=e=>(...t)=>{const{action:n}=e.options;return this.channel.dispatch(n,{args:t})}}};var qn={};Object.defineProperty(qn,\"__esModule\",{value:!0}),qn.ChannelsExposer=void 0;qn.ChannelsExposer=class{constructor(e){this.channelProviderOrClient=e,this.exposeFunction=async(e,t)=>{const{key:n,options:i,meta:r}=t,{id:o}=r,s=`${o}.${i?.action||n}`;return await this.channelProviderOrClient.register(s,(async({args:t})=>e(...t))),{action:s}},this.exposeMeta=async({id:e},t)=>{const n=`api-meta:${e}`;await this.channelProviderOrClient.register(n,(()=>({props:t})))}}},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Kn,e),n(qn,e)}(zn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(zn,e)}(Vn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Wn,e),n(Hn,e),n(Vn,e),n(Nn,e)}(Gn);var Jn={};Object.defineProperty(Jn,\"__esModule\",{value:!0}),Jn.createRelayedDispatch=exports.relayChannelClientApi_1=Jn.relayChannelClientApi=void 0;const Yn=[\"no longer connected\",\"RTCDataChannel closed unexpectedly\",\"The client you are trying to dispatch from is disconnected from the target provider\"];exports.relayChannelClientApi_1=Jn.relayChannelClientApi=async(e,t)=>{e.register(`relay:${t}`,(({action:t,target:n,payload:i})=>e.dispatch(n,t,i))),await Promise.resolve()};Jn.createRelayedDispatch=(e,t,n,i)=>async(r,o)=>{try{return await e.dispatch(`relay:${n}`,{action:r,payload:o,target:t})}catch(e){if(s=e.message,Yn.some((e=>s.includes(e)))&&i)throw new Error(i);throw e}var s};var Zn,Qn,Xn,ei=s&&s.__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},ti=s&&s.__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)};Object.defineProperty(Bn,\"__esModule\",{value:!0}),Bn.ColumnOrRow=Bn.TabStack=Bn.LayoutNode=void 0;const ni=Gn,ii=Jn;class ri{constructor(e,t){Zn.set(this,void 0),this.isRoot=()=>ti(this,Zn,\"f\").isRoot(this.entityId),this.exists=()=>ti(this,Zn,\"f\").exists(this.entityId),this.getParent=async()=>{const e=await ti(this,Zn,\"f\").getParent(this.entityId);if(e)return ri.getEntity(e,ti(this,Zn,\"f\"))},this.createAdjacentStack=async(e,t)=>{const n=await ti(this,Zn,\"f\").createAdjacentStack(this.entityId,e,t);return ri.getEntity({entityId:n,type:\"stack\"},ti(this,Zn,\"f\"))},this.getAdjacentStacks=async e=>(await ti(this,Zn,\"f\").getAdjacentStacks({targetId:this.entityId,edge:e})).map((e=>ri.getEntity({type:\"stack\",entityId:e.entityId},ti(this,Zn,\"f\")))),ei(this,Zn,e,\"f\"),this.entityId=t}}Bn.LayoutNode=ri,Zn=new WeakMap,ri.newLayoutEntitiesClient=async(e,t,n)=>{const i=(0,ii.createRelayedDispatch)(e,n,\"layout-relay\",\"You are trying to interact with a layout component on a window that does not exist or has been destroyed.\");return new ni.ApiConsumer(new ni.ChannelsConsumer({dispatch:i})).consume({id:t})},ri.getEntity=(e,t)=>{const{entityId:n,type:i}=e;switch(i){case\"column\":case\"row\":return new si(t,n,i);case\"stack\":return new oi(t,n);default:throw new Error(`Unrecognised Layout Entity encountered ('${JSON.stringify(e)})`)}};class oi extends ri{constructor(e,t){super(e,t),Qn.set(this,void 0),this.type=\"stack\",this.getViews=()=>ti(this,Qn,\"f\").getStackViews(this.entityId),this.addView=async(e,t={index:0})=>ti(this,Qn,\"f\").addViewToStack(this.entityId,e,t),this.removeView=async e=>{await ti(this,Qn,\"f\").removeViewFromStack(this.entityId,e)},this.setActiveView=async e=>{await ti(this,Qn,\"f\").setStackActiveView(this.entityId,e)},ei(this,Qn,e,\"f\")}}Bn.TabStack=oi,Qn=new WeakMap;class si extends ri{constructor(e,t,n){super(e,t),Xn.set(this,void 0),this.getContent=async()=>(await ti(this,Xn,\"f\").getContent(this.entityId)).map((e=>ri.getEntity(e,ti(this,Xn,\"f\")))),ei(this,Xn,e,\"f\"),this.type=n}}Bn.ColumnOrRow=si,Xn=new WeakMap;var ai={};Object.defineProperty(ai,\"__esModule\",{value:!0}),ai.DEFAULT_LAYOUT_KEY=ai.LAYOUT_CONTROLLER_ID=void 0,ai.LAYOUT_CONTROLLER_ID=\"layout-entities\",ai.DEFAULT_LAYOUT_KEY=\"__default__\";var ci,di,hi,li=s&&s.__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)};Object.defineProperty(Ln,\"__esModule\",{value:!0}),Ln.Layout=void 0;const ui=G,pi=O,wi=d,yi=Tn,fi=Bn,gi=ai;class mi extends wi.Base{static getClient(e){return li(e,di,\"f\").getValue()}constructor(e,t){super(t),ci.add(this),di.set(this,new ui.Lazy((async()=>fi.LayoutNode.newLayoutEntitiesClient(await this.platform.getClient(),gi.LAYOUT_CONTROLLER_ID,this.identity)))),this.replace=async e=>{this.wire.sendAction(\"layout-replace\").catch((e=>{}));const t=await this.platform.getClient();await t.dispatch(\"replace-layout\",{target:this.identity,opts:{layout:e}})},this.replaceView=async(e,t)=>{this.wire.sendAction(\"layout-replace-view\").catch((e=>{}));const n=await this.platform.getClient();await n.dispatch(\"replace-view\",{target:this.identity,opts:{viewToReplace:e,newView:t}})},this.applyPreset=async e=>{this.wire.sendAction(\"layout-apply-preset\").catch((e=>{}));const t=await this.platform.getClient(),{presetType:n}=e;if(!n||!(0,yi.isValidPresetType)(n))throw new Error(\"Cannot apply preset layout, please include an applicable presetType property in the PresetLayoutOptions.\");await t.dispatch(\"apply-preset-layout\",{target:this.identity,opts:{presetType:n}})};const n=(0,pi.validateIdentity)(e);if(n)throw new Error(n);this.identity=e,this.platform=this.fin.Platform.wrapSync({uuid:e.uuid}),e.uuid===this.fin.me.uuid&&e.name===this.fin.me.name&&(this.init=this.fin.Platform.Layout.init)}async getConfig(){this.wire.sendAction(\"layout-get-config\").catch((e=>{}));return(await this.platform.getClient()).dispatch(\"get-frame-snapshot\",{target:this.identity})}async getCurrentViews(){this.wire.sendAction(\"layout-get-views\").catch((e=>{}));const e=await this.platform.getClient();return(await e.dispatch(\"get-layout-views\",{target:this.identity})).map((e=>this.fin.View.wrapSync(e)))}async getRootItem(){this.wire.sendAction(\"layout-get-root-item\").catch((()=>{}));const e=await li(this,di,\"f\").getValue(),t=await e.getRoot(\"layoutName\"in this.identity?this.identity:void 0);return fi.LayoutNode.getEntity(t,e)}async getStackByViewIdentity(e){this.wire.sendAction(\"layout-get-stack-by-view\").catch((()=>{}));const t=await li(this,di,\"f\").getValue(),n=await t.getStackByView(e);if(!n)throw new Error(`No stack found for view: ${e.uuid}/${e.name}`);return fi.LayoutNode.getEntity(n,t)}async addView(e,{location:t,targetView:n}={}){this.wire.sendAction(\"layout-add-view\").catch((e=>{}));const{identity:i}=await li(this,ci,\"m\",hi).call(this,\"layout-add-view\",{viewOptions:e,location:t,targetView:n});return{identity:i}}async closeView(e){this.wire.sendAction(\"layout-close-view\").catch((e=>{})),await li(this,ci,\"m\",hi).call(this,\"layout-close-view\",{viewIdentity:e})}}Ln.Layout=mi,di=new WeakMap,ci=new WeakSet,hi=async function(e,t){return(await this.platform.getClient()).dispatch(e,{target:this.identity,opts:t})};var vi,Ci,bi,Ii,Ei,xi=s&&s.__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)},Ai=s&&s.__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};Object.defineProperty(kn,\"__esModule\",{value:!0}),kn.LayoutModule=void 0;const Pi=d,Mi=Ln,_i=ai;class Oi extends Pi.Base{constructor(){super(...arguments),vi.add(this),Ci.set(this,!1),bi.set(this,null),this.init=async(e={})=>{if(this.wire.sendAction(\"layout-init\").catch((e=>{})),!this.wire.environment.layoutAllowedInContext(this.fin))throw new Error(\"Layout.init can only be called from a Window context.\");if(xi(this,Ci,\"f\"))throw new Error(\"Layout.init was already called, please use Layout.create to add additional layouts.\");\"openfin\"===this.wire.environment.type&&await this.fin.Platform.getCurrentSync().getClient(),Ai(this,Ci,!0,\"f\"),Ai(this,bi,await this.wire.environment.initLayoutManager(this.fin,this.wire,e),\"f\"),await this.wire.environment.applyLayoutSnapshot(this.fin,xi(this,bi,\"f\"),e);const t={name:this.fin.me.name,uuid:this.fin.me.uuid};if(!e.layoutManagerOverride){const e={layoutName:_i.DEFAULT_LAYOUT_KEY,...t};return xi(this,Ii,\"f\").call(this,e)}return this.wrapSync(t)},Ii.set(this,(e=>{const t=\"[Layout] You are using a deprecated property `layoutManager` - it will throw if you access it starting in v37.\",n=new Proxy({},{get(e,n){throw console.warn(`[Layout-mgr-proxy] accessing ${n.toString()}`),new Error(t)}}),i=Object.assign(this.wrapSync(e),{layoutManager:n});return new Proxy(i,{get(e,n){if(\"layoutManager\"===n)throw console.warn(`[Layout-proxy] accessing ${n.toString()}`),new Error(t);return e[n]}})})),this.getCurrentLayoutManagerSync=()=>xi(this,vi,\"m\",Ei).call(this,\"fin.Platform.Layout.getCurrentLayoutManagerSync()\"),this.create=async e=>this.wire.environment.createLayout(xi(this,vi,\"m\",Ei).call(this,\"fin.Platform.Layout.create()\"),e),this.destroy=async e=>this.wire.environment.destroyLayout(xi(this,vi,\"m\",Ei).call(this,\"fin.Platform.Layout.destroy()\"),e)}async wrap(e){return this.wire.sendAction(\"layout-wrap\").catch((e=>{})),new Mi.Layout(e,this.wire)}wrapSync(e){return this.wire.sendAction(\"layout-wrap-sync\").catch((e=>{})),new Mi.Layout(e,this.wire)}async getCurrent(){if(this.wire.sendAction(\"layout-get-current\").catch((e=>{})),\"openfin\"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error(\"You are not in a Window context. Only Windows can have a Layout.\");const{uuid:e,name:t}=this.fin.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction(\"layout-get-current-sync\").catch((e=>{})),\"openfin\"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error(\"You are not in a Window context. Only Windows can have a Layout.\");const{uuid:e,name:t}=this.fin.me;return this.wrapSync({uuid:e,name:t})}async getLayoutByViewIdentity(e){this.wire.sendAction(\"layout-get-by-view-identity\").catch((()=>{}));let t=await this.wire.environment.getViewWindowIdentity(this.fin,e);t.identity&&(t=t.identity);try{const n=this.wrapSync(t),i=await Mi.Layout.getClient(n),r=await i.getLayoutIdentityForViewOrThrow(e);return this.wrapSync(r)}catch(n){if(![\"No action registered at target for\",\"getLayoutIdentityForViewOrThrow is not a function\"].some((e=>n.message.includes(e))))throw n;if(t.uuid===t.name)throw new Error(`View identity ${JSON.stringify(e)} is not attached to any layout in provider window ${JSON.stringify(t)}.`);return this.wrapSync(t)}}}kn.LayoutModule=Oi,Ci=new WeakMap,bi=new WeakMap,Ii=new WeakMap,vi=new WeakSet,Ei=function(e){if(!xi(this,bi,\"f\"))throw new Error(`You must call init before using the API ${e}`);return xi(this,bi,\"f\")},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(kn,e),n(Ln,e)}(jn),Object.defineProperty(Pn,\"__esModule\",{value:!0}),Pn.PlatformModule=void 0;const Si=d,Ri=Mn,Fi=jn;class ji extends Si.Base{constructor(e,t){super(e),this._channel=t,this.Layout=new Fi.LayoutModule(this.wire)}async init(e){if(!fin.__internal_.isPlatform||fin.me.name!==fin.me.uuid)throw new Error(\"fin.Platform.init should only be called from a custom platform provider running in the main window of the application.\");return this.wire.environment.initPlatform(this.fin,e)}async wrap(e){return this.wire.sendAction(\"platform-wrap\").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}wrapSync(e){return this.wire.sendAction(\"platform-wrap-sync\").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}async getCurrent(){return this.wire.sendAction(\"platform-get-current\").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction(\"platform-get-current-sync\").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}start(e){return this.wire.sendAction(\"platform-start\").catch((e=>{})),new Promise((async(t,n)=>{try{const{uuid:n}=e,i=await this.fin.Application._create({...e,isPlatformController:!0});i.once(\"platform-api-ready\",(()=>t(this.wrapSync({uuid:n})))),i._run({uuid:n})}catch(e){n(e)}}))}startFromManifest(e,t){return this.wire.sendAction(\"platform-start-from-manifest\").catch((e=>{})),new Promise((async(n,i)=>{try{const i=await this.fin.Application._createFromManifest(e);i.once(\"platform-api-ready\",(()=>n(this.wrapSync({uuid:i.identity.uuid})))),i._run(t)}catch(e){i(e)}}))}}Pn.PlatformModule=ji,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Pn,e),n(Mn,e)}(An);var ki={};!function(e){Object.defineProperty(e,\"__esModule\",{value:!0}),e.getMe=e.getBaseMe=e.environmentUnsupportedMessage=void 0;const t=J(),n=un,i=ie(),r=rn;function o(e,t,n){return{...{isView:\"view\"===e,isWindow:\"window\"===e,isFrame:\"iframe\"===e,isExternal:\"external connection\"===e},uuid:t,name:n,entityType:e}}e.environmentUnsupportedMessage=\"You are not running in OpenFin.\",e.getBaseMe=o,e.getMe=function(s){const{uuid:a,name:c,entityType:d}=s.me,h={setContext(){throw new Error(e.environmentUnsupportedMessage)},addContextHandler(){throw new Error(e.environmentUnsupportedMessage)},getContextGroups(){throw new Error(e.environmentUnsupportedMessage)},joinContextGroup(){throw new Error(e.environmentUnsupportedMessage)},removeFromContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getAllClientsInContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getInfoForContextGroup(){throw new Error(e.environmentUnsupportedMessage)}},l=\"Interop API has not been instantiated. Either connection has failed or you have not declared interop in your config.\",u={setContext(){throw new Error(l)},addContextHandler(){throw new Error(l)},getContextGroups(){throw new Error(l)},joinContextGroup(){throw new Error(l)},removeFromContextGroup(){throw new Error(l)},getAllClientsInContextGroup(){throw new Error(l)},getInfoForContextGroup(){throw new Error(l)}},p={eventNames:()=>{throw new Error(e.environmentUnsupportedMessage)},emit:()=>{throw new Error(e.environmentUnsupportedMessage)},listeners:()=>{throw new Error(e.environmentUnsupportedMessage)},listenerCount:()=>{throw new Error(e.environmentUnsupportedMessage)},on:()=>{throw new Error(e.environmentUnsupportedMessage)},addListener:()=>{throw new Error(e.environmentUnsupportedMessage)},once:()=>{throw new Error(e.environmentUnsupportedMessage)},prependListener:()=>{throw new Error(e.environmentUnsupportedMessage)},prependOnceListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeAllListeners:()=>{throw new Error(e.environmentUnsupportedMessage)}};switch(d){case\"view\":return Object.assign(new t.View(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case\"window\":return Object.assign(new i._Window(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case\"iframe\":return Object.assign(new n._Frame(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case\"external connection\":return Object.assign(new r.ExternalApplication(s,{uuid:a}),o(d,a,c),{interop:u,isOpenFin:!1});default:return{...o(d,a,c),...p,interop:h,isOpenFin:!1}}}}(ki);var Li={},Ti={},$i={};Object.defineProperty($i,\"__esModule\",{value:!0}),$i.createWarningObject=$i.createUnusableObject=void 0,$i.createUnusableObject=function(e){const t=()=>{throw new Error(e)};return new Proxy({},{apply:t,construct:t,defineProperty:t,deleteProperty:t,get:t,getOwnPropertyDescriptor:t,getPrototypeOf:t,has:t,isExtensible:t,ownKeys:t,preventExtensions:t,set:t,setPrototypeOf:t})},$i.createWarningObject=function(e,t){return new Proxy(t,{get:(...t)=>(console.warn(e),Reflect.get(...t)),set:(...t)=>(console.warn(e),Reflect.set(...t)),getOwnPropertyDescriptor:(...t)=>(console.warn(e),Reflect.getOwnPropertyDescriptor(...t)),ownKeys:(...t)=>(console.warn(e),Reflect.ownKeys(...t))})};var Bi,Gi={},Wi={};var Hi={};!function(e){Object.defineProperty(e,\"__esModule\",{value:!0}),e.wrapIntentHandler=e.BROKER_ERRORS=e.generateOverrideWarning=e.generateOverrideError=e.wrapContextHandler=e.wrapInTryCatch=e.generateId=void 0;e.generateId=()=>`${Math.random()}${Date.now()}`;e.wrapInTryCatch=(e,t)=>(...n)=>{try{return e(...n)}catch(e){throw new Error((t||\"\")+e)}};e.wrapContextHandler=(e,t)=>async n=>{try{await e(n)}catch(e){throw console.error(`Error thrown by handler ${t} for context type ${n.type}: ${e}`),e}};e.generateOverrideError=(e,t)=>`You have tried to to use ${e} but ${t} has not been overridden in the Interop Broker. Please override this function. Refer to our documentation for more info.`;e.generateOverrideWarning=(e,t,n,i)=>{const{uuid:r,name:o}=n;return i?`Entity with identity: ${r}/${o} has called ${i} or ${e} but ${t} has not been overridden.`:`Entity with identity: ${r}/${o} has called ${e} but ${t} has not been overridden.`},e.BROKER_ERRORS={fireIntent:(0,e.generateOverrideError)(\"fireIntent\",\"handleFiredIntent\"),fireIntentForContext:(0,e.generateOverrideError)(\"fireIntentForContext\",\"handleFiredIntentForContext\"),getInfoForIntent:(0,e.generateOverrideError)(\"getInfoForIntent\",\"handleInfoForIntent\"),getInfoForIntentsByContext:(0,e.generateOverrideError)(\"getInfoForIntentsByContext\",\"handleInfoForIntentsByContext\"),joinSessionContextGroupWithJoinContextGroup:\"The Context Group you have tried to join is a Session Context Group. Custom Context Groups can only be defined by the Interop Broker through code or manifest configuration. Please use joinSessionContextGroup.\",fdc3Open:(0,e.generateOverrideError)(\"fdc3.open\",\"fdc3HandleOpen\"),fdc3FindInstances:(0,e.generateOverrideError)(\"fdc3.findInstances\",\"fdc3HandleFindInstances\"),fdc3GetAppMetadata:(0,e.generateOverrideError)(\"fdc3.getAppMetadata\",\"fdc3HandleGetAppMetadata\"),fdc3GetInfo:(0,e.generateOverrideError)(\"fdc3.getInfo\",\"fdc3HandleGetInfo\")};e.wrapIntentHandler=(e,t)=>async n=>{try{return e(n)}catch(e){throw console.error(`Error thrown by handler ${t}: ${e}`),e}}}(Hi);var Ni,Di,Ui={};function Vi(){if(Di)return Gi;Di=1;var e,t,n,r=s&&s.__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},o=s&&s.__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)},a=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Gi,\"__esModule\",{value:!0}),Gi.InteropBroker=void 0;const c=d,h=a(function(){if(Bi)return Wi;Bi=1,Object.defineProperty(Wi,\"__esModule\",{value:!0});const e=Cr();return Wi.default=class{constructor(e,t){this.provider=e,this.id=t,this.lastContext=void 0,this.contextGroupMap=new Map,this.clients=new Map,this.registerListeners()}registerListeners(){this.provider.register(`sessionContextGroup:getContext-${this.id}`,this.getCurrentContext.bind(this)),this.provider.register(`sessionContextGroup:setContext-${this.id}`,this.setContext.bind(this)),this.provider.register(`sessionContextGroup:handlerAdded-${this.id}`,this.handlerAdded.bind(this)),this.provider.register(`sessionContextGroup:handlerRemoved-${this.id}`,this.handlerRemoved.bind(this))}getCurrentContext(e){return e.type?this.contextGroupMap.get(e.type):this.lastContext}setContext(t,n){const{context:i}=t,r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name} not in Session Client State Map`);this.contextGroupMap.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{e.contextHandlers.get(i.type)?.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getClientState(e){return this.clients.get(e.endpointId)}async handlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(i){const e=r.contextHandlers.get(i)||[];r.contextHandlers.set(i,[...e,n]);const o=this.contextGroupMap.get(i);o&&await this.provider.dispatch(t,n,o)}else{r.globalHandler=n;const e=[...this.contextGroupMap.keys()].map((async e=>{const i=this.contextGroupMap.get(e);i&&await this.provider.dispatch(t,n,i)}));await Promise.all(e)}}handlerRemoved(e,t){const{handlerId:n}=e,i=this.clients.get(t.endpointId);i?(Array.from(i.contextHandlers).forEach((([,e])=>{const t=e.indexOf(n);t>-1&&e.splice(t,1)})),i.globalHandler===n&&(i.globalHandler=void 0)):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={contextHandlers:new Map,clientIdentity:e,globalHandler:void 0};this.clients.set(e.endpointId,t)}}onDisconnection(e){this.clients.delete(e.endpointId)}},Wi}()),l=Hi,u=a(i),p=function(){if(Ni)return Ui;Ni=1,Object.defineProperty(Ui,\"__esModule\",{value:!0}),Ui.PrivateChannelProvider=void 0;const e=Vi();return Ui.PrivateChannelProvider=class t{constructor(e,t){this.provider=e,this.id=t,this.clients=new Map,this.registerListeners(),this.contextByContextType=new Map,this.lastContext=void 0,this.provider.onConnection((e=>this.registerNewClient(e))),this.provider.onDisconnection((async e=>{const{endpointId:t}=e;this.clients.has(t)&&await this.handleClientDisconnecting(e),0===(await this.provider.getAllClientInfo()).length&&this.provider.destroy()}))}getClientState(e){return this.clients.get(e.endpointId)}registerListeners(){this.provider.register(\"broadcast\",this.broadcast.bind(this)),this.provider.register(\"getCurrentContext\",this.getCurrentContext.bind(this)),this.provider.register(\"contextHandlerAdded\",this.contextHandlerAdded.bind(this)),this.provider.register(\"contextHandlerRemoved\",this.contextHandlerRemoved.bind(this)),this.provider.register(\"nonStandardHandlerRemoved\",this.nonStandardHandlerRemoved.bind(this)),this.provider.register(\"onAddContextHandlerAdded\",this.onAddContextHandlerAdded.bind(this)),this.provider.register(\"onDisconnectHandlerAdded\",this.onDisconnectHandlerAdded.bind(this)),this.provider.register(\"onUnsubscribeHandlerAdded\",this.onUnsubscribeHandlerAdded.bind(this)),this.provider.register(\"clientDisconnecting\",((e,t)=>{this.handleClientDisconnecting(t)}))}broadcast(t,n){const{context:i}=t;if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name}, tried to call broadcast, is not connected to this Private Channel`);const r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to broadcast - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);this.contextByContextType.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{const t=e.handlerIdsByContextTypes.get(i.type);t&&t.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getCurrentContext(e,t){const{contextType:n}=e;if(!this.getClientState(t))throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call getCurrentContext, is not connected to this Private Channel`);if(void 0!==n){return this.contextByContextType.get(n)||null}return this.lastContext?this.lastContext:null}contextHandlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call addContextListener, is not connected to this Private Channel`);if(i){const e=r.handlerIdsByContextTypes.get(i)||[];r.handlerIdsByContextTypes.set(i,[...e,n])}else r.globalHandler=n;Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&e.onAddContextListenerHandlerId&&this.provider.dispatch(e.clientIdentity,e.onAddContextListenerHandlerId,i)}))}async contextHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);if(i){let e;if(i.globalHandler===n)i.globalHandler=void 0;else for(const[t,r]of i.handlerIdsByContextTypes){const i=r.indexOf(n);i>-1&&(r.splice(i,1),e=t)}const r=(await this.getConnectedClients()).map((async n=>{const{clientIdentity:i,clientIdentity:{endpointId:r},onUnsubscribeHandlerId:o}=n;r!==t.endpointId&&o&&await this.provider.dispatch(i,o,e)}));try{await Promise.all(r)}catch(e){throw console.error(`Problem when attempting to dispatch to onUnsubscribeHandlers. Error: ${e} Removing Client: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}`),new Error(e)}}else console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}.`)}nonStandardHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);i?i.onDisconnectHandlerId===n?i.onDisconnectHandlerId=void 0:i.onAddContextListenerHandlerId===n?i.onAddContextListenerHandlerId=void 0:i.onUnsubscribeHandlerId===n&&(i.onUnsubscribeHandlerId=void 0):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}onAddContextHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onAddContextListener, is not connected to this Private Channel`);n.onAddContextListenerHandlerId=i,Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&Array.from(e.handlerIdsByContextTypes.keys()).forEach((e=>{this.provider.dispatch(t,i,e)}))}))}onDisconnectHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onDisconnect, is not connected to this Private Channel`);n.onDisconnectHandlerId=i}onUnsubscribeHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onUnsubscribe, is not connected to this Private Channel`);n.onUnsubscribeHandlerId=i}removeClient(e){const t=this.getClientState(e);if(!t)throw new Error(`Client with Identity: ${e.uuid} ${e.name}, tried to call disconnect, is not connected to this Private Channel`);t.handlerIdsByContextTypes.clear(),this.clients.delete(e.endpointId)}async fireOnDisconnectForOtherClients(e){const{endpointId:t}=e,n=(await this.getConnectedClients()).map((async e=>{const{clientIdentity:{endpointId:n},onDisconnectHandlerId:i}=e;n!==t&&i&&await this.provider.dispatch(e.clientIdentity,i)}));try{await Promise.all(n)}catch(t){throw console.error(`Problem when attempting to dispatch to onDisconnectHandlers. Error: ${t} Disconnecting Client: uuid: ${e.uuid}. name: ${e.name}. endpointId: ${e.endpointId}`),new Error(t)}}async unsubscribeAll(e){const{endpointId:t}=e,n=this.clients.get(t);if(n){const t=Array.from(n.handlerIdsByContextTypes.values()).flat(),i=n.globalHandler;if(t.length>0){const n=t.map((async t=>this.contextHandlerRemoved({handlerId:t},e)));try{await Promise.all(n)}catch(e){console.error(e.message)}}if(i)try{await this.contextHandlerRemoved({handlerId:i},e)}catch(e){console.error(e.message)}}}async handleClientDisconnecting(e){await this.unsubscribeAll(e),this.removeClient(e),await this.fireOnDisconnectForOtherClients(e)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={clientIdentity:e,handlerIdsByContextTypes:new Map,globalHandler:void 0,onAddContextListenerHandlerId:void 0,onUnsubscribeHandlerId:void 0,onDisconnectHandlerId:void 0};this.clients.set(e.endpointId,t)}}async getConnectedClients(){const e=await this.provider.getAllClientInfo();return Array.from(this.clients.values()).filter((t=>{const{uuid:n,name:i}=t.clientIdentity;return e.some((e=>i===e.name&&n===e.uuid))}))}static init(e,n){return new t(e,n)}},Ui}(),w=G,y=[{id:\"green\",displayMetadata:{color:\"#00CC88\",name:\"green\"}},{id:\"purple\",displayMetadata:{color:\"#8C61FF\",name:\"purple\"}},{id:\"orange\",displayMetadata:{color:\"#FF8C4C\",name:\"orange\"}},{id:\"red\",displayMetadata:{color:\"#FF5E60\",name:\"red\"}},{id:\"pink\",displayMetadata:{color:\"#FF8FB8\",name:\"pink\"}},{id:\"yellow\",displayMetadata:{color:\"#E9FF8F\",name:\"yellow\"}}];let f=class i extends c.Base{constructor(i,s,a){super(i),e.set(this,void 0),t.set(this,void 0),n.set(this,void 0),this.getProvider=()=>o(this,n,\"f\").getValue(),this.interopClients=new Map,this.contextGroupsById=new Map,r(this,t,a.contextGroups??[...y],\"f\"),r(this,e,a.fdc3Info,\"f\"),a?.logging&&(this.logging=a.logging),this.intentClientMap=new Map,this.lastContextMap=new Map,this.sessionContextGroupMap=new Map,r(this,n,new w.Lazy(s),\"f\"),this.setContextGroupMap(),this.setupChannelProvider()}static createClosedConstructor(...e){return class extends i{constructor(...t){if(t.length){const[n,i,r]=t;if(r&&\"object\"==typeof r&&!(0,u.default)(r,e[2]))return console.warn(\"You have modified the parameters of the InteropOverride constructor. This behavior is deprecated and will be removed in a future version. You can modify these options in your manifest. Please consult our Interop docs for guidance on migrating to the new override scheme.\"),void super(e[0],e[1],r);console.warn(\"You are attempting to pass arguments to the InteropOverride constructor. This is not necessary, and these passed arguments will be ignored. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.\")}super(...e)}}}setContext({context:e},t){this.wire.sendAction(\"interop-broker-set-context\").catch((e=>{}));const n=this.getClientState(t);if(!n||!n.contextGroupId)throw n?new Error(\"You must join a context group before you can set context.\"):new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);{const{contextGroupId:t}=n;this.setContextForGroup({context:e},t)}}setContextForGroup({context:e},t){this.wire.sendAction(\"interop-broker-set-context-for-group\").catch((e=>{}));const n=this.contextGroupsById.get(t);if(!n)throw new Error(`Unable to set context for context group that isn't in the context group mapping: ${t}.`);const r=i.checkContextIntegrity(e);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(e)}`);const o=e.type;n.set(o,e),this.lastContextMap.set(t,o);Array.from(this.interopClients.values()).filter((e=>e.contextGroupId===t)).forEach((t=>{for(const[,n]of t.contextHandlers)i.isContextTypeCompatible(o,n.contextType)&&this.invokeContextHandler(t.clientIdentity,n.handlerId,e)}))}getCurrentContext(e,t){this.wire.sendAction(\"interop-broker-get-current-context\").catch((e=>{}));const n=this.getClientState(t);if(!n?.contextGroupId)throw new Error(\"You must be a member of a context group to call getCurrentContext\");const{contextGroupId:i}=n,r=this.contextGroupsById.get(i),o=this.lastContextMap.get(i),s=e?.contextType??o;return r&&s?r.get(s):void 0}async joinContextGroup({contextGroupId:e,target:t},n){if(this.wire.sendAction(\"interop-broker-join-context-group\").catch((e=>{})),this.sessionContextGroupMap.has(e))throw new Error(l.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup);if(t){i.hasEndpointId(t)&&await this.addClientToContextGroup({contextGroupId:e},t);try{const n=this.channel.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name));if(!n.length)throw new Error(`Given Identity ${t.uuid} ${t.name} is not connected to the Interop Broker.`);n.length>1&&console.warn(`More than one connection found for identity ${t.uuid} ${t.name}`);const i=[];for(const t of n)i.push(this.addClientToContextGroup({contextGroupId:e},t));await Promise.all(i)}catch(e){throw new Error(e)}}else await this.addClientToContextGroup({contextGroupId:e},n)}async addClientToContextGroup({contextGroupId:e},t){this.wire.sendAction(\"interop-broker-add-client-to-context-group\").catch((e=>{}));const n=this.getClientState(t);if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(!this.getContextGroups().find((t=>t.id===e)))throw new Error(`Attempting to join a context group that does not exist: ${e}. You may only join existing context groups.`);if(n.contextGroupId!==e){n.contextGroupId=e,await this.setCurrentContextGroupInClientOptions(t,e);const i=this.contextGroupsById.get(e);for(const[,e]of n.contextHandlers){const{contextType:n,handlerId:r}=e;if(void 0===n)i.forEach(((e,n)=>{this.invokeContextHandler(t,r,e)}));else if(i.has(n)){const e=i.get(n);e&&this.invokeContextHandler(t,r,e)}}}}async removeFromContextGroup({target:e},t){if(this.wire.sendAction(\"interop-broker-remove-from-context-group\").catch((e=>{})),e){i.hasEndpointId(e)&&await this.removeClientFromContextGroup(e);try{const t=this.channel.connections.filter((t=>t.uuid===e.uuid&&t.name===e.name));if(!t.length)throw new Error(`No connection found for given Identity ${e.uuid} ${e.name}`);t.length>1&&console.warn(`More than one connection found for identity ${e.uuid} ${e.name}`);const n=[];for(const e of t)n.push(this.removeClientFromContextGroup(e));await Promise.all(n)}catch(e){throw new Error(e)}}else await this.removeClientFromContextGroup(t)}async removeClientFromContextGroup(e){this.wire.sendAction(\"interop-broker-remove-client-from-context-group\").catch((e=>{}));const t=this.getClientState(e);t&&(t.contextGroupId=void 0),await this.setCurrentContextGroupInClientOptions(e,null)}getContextGroups(){return this.wire.sendAction(\"interop-broker-get-context-groups\").catch((e=>{})),o(this,t,\"f\").map((e=>({...e})))}getInfoForContextGroup({contextGroupId:e}){return this.wire.sendAction(\"interop-broker-get-info-for-context-group\").catch((e=>{})),this.getContextGroups().find((t=>t.id===e))}getAllClientsInContextGroup({contextGroupId:e}){this.wire.sendAction(\"interop-broker-get-all-clients-in-context-group\").catch((e=>{}));return Array.from(this.interopClients.values()).filter((t=>t.contextGroupId===e)).map((e=>e.clientIdentity))}async handleFiredIntent(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.raiseIntent\",\"InteropBroker.handleFiredIntent\",t,\"interopClient.fireIntent\");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntent)}async setIntentTarget(e,t){this.wire.sendAction(\"interop-broker-set-intent-target\").catch((e=>{}));const n=this.intentClientMap.get(t.name),i=`intent-handler-${e.name}`;if(n){const t=n.get(i);if(t){if(t.pendingIntents.push(e),t.clientIdentity&&t.isReady){const{clientIdentity:e,pendingIntents:n}=t;try{const r=n[n.length-1];await this.invokeIntentHandler(e,i,r),t.pendingIntents=[]}catch(n){console.error(`Error invoking intent handler for client ${e.uuid}/${e.name}/${e.endpointId}`),t.isReady=!1}}}else n.set(i,{isReady:!1,pendingIntents:[e]})}else{this.intentClientMap.set(t.name,new Map);const n=this.intentClientMap.get(t.name);n&&n.set(i,{isReady:!1,pendingIntents:[e]})}}async handleInfoForIntent(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.findIntent\",\"InteropBroker.handleInfoForIntent\",t,\"interopClient.getInfoForIntent\");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntent)}async handleInfoForIntentsByContext(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.findIntentsByContext\",\"InteropBroker.handleInfoForIntentsByContext\",t,\"interopClient.getInfoForIntentsByContext\");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntentsByContext)}async handleFiredIntentForContext(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.raiseIntentForContext\",\"InteropBroker.handleFiredIntentForContext\",t,\"interopClient.fireIntentForContext\");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntentForContext)}async clientDisconnected(e){}async fdc3HandleOpen({app:e,context:t},n){const i=(0,l.generateOverrideWarning)(\"fdc3.open\",\"InteropBroker.fdc3HandleOpen\",n);throw console.warn(i),new Error(l.BROKER_ERRORS.fdc3Open)}async fdc3HandleFindInstances(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.open\",\"InteropBroker.fdc3HandleFindInstances\",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3FindInstances)}async fdc3HandleGetAppMetadata(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.getAppMetadata\",\"InteropBroker.fdc3HandleGetAppMetadata\",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3GetAppMetadata)}async invokeContextHandler(e,t,n){const i=await this.getProvider();try{await i.dispatch(e,t,n)}catch(i){console.error(`Error invoking context handler ${t} for context type ${n.type} in client ${e.uuid}/${e.name}/${e.endpointId}`,i)}}async invokeIntentHandler(e,t,n){const i=await this.getProvider();await i.dispatch(e,t,n)}async fdc3HandleGetInfo(t,n){const{fdc3Version:i}=t;return{fdc3Version:i,...o(this,e,\"f\"),optionalFeatures:{OriginatingAppMetadata:!1,UserChannelMembershipAPIs:!0},appMetadata:{appId:\"\",instanceId:\"\"}}}async getAllClientInfo(){return(await this.getProvider()).getAllClientInfo()}decorateSnapshot(e){return{...e,interopSnapshotDetails:{contextGroupStates:this.getContextGroupStates()}}}applySnapshot(e,t){const n=e?.interopSnapshotDetails?.contextGroupStates;n&&(t?.closeExistingWindows||this.updateExistingClients(n),this.rehydrateContextGroupStates(n))}updateExistingClients(e){this.interopClients.forEach((t=>{const{clientIdentity:n,contextGroupId:r,contextHandlers:o}=t;if(r){const t=e[r];for(const[,e]of Object.entries(t))o.forEach((t=>{const{handlerId:r,contextType:o}=t;i.isContextTypeCompatible(e.type,o)&&this.invokeContextHandler(n,r,e)}))}}))}getContextGroupStates(){return i.toObject(this.contextGroupsById)}rehydrateContextGroupStates(e){const t=Object.entries(e);for(const[e,n]of t){const t=Object.entries(n);for(const[n,i]of t)if(this.contextGroupsById.has(e)){this.contextGroupsById.get(e).set(n,i)}else console.warn(`Attempting to set a context group that isn't in the context group mapping. Skipping context group rehydration for: ${e}`)}}contextHandlerRegistered({contextType:e,handlerId:t},n){const i={contextType:e,handlerId:t},r=this.getClientState(n);if(r?.contextHandlers.set(t,i),r&&r.contextGroupId){const{contextGroupId:i}=r,o=this.contextGroupsById.get(i);if(void 0===e)o.forEach(((e,i)=>{this.invokeContextHandler(n,t,e)}));else if(o.has(e)){const i=o.get(e);i&&this.invokeContextHandler(n,t,i)}}}async intentHandlerRegistered(e,t){const{handlerId:n}=e,i=this.intentClientMap.get(t.name),r=i?.get(n);if(i)if(r){const{pendingIntents:e}=r;r.clientIdentity=t,r.isReady=!0;try{if(e.length>0){const i=e[e.length-1];await this.invokeIntentHandler(t,n,i),r.pendingIntents=[]}}catch(e){console.error(`Error invoking intent handler: ${n} for client ${t.uuid}/${t.name}/${t.endpointId}`)}}else i.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t});else{this.intentClientMap.set(t.name,new Map);const e=this.intentClientMap.get(t.name);e&&e.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t})}}removeContextHandler({handlerId:e},t){const n=this.getClientState(t);n&&n.contextHandlers.delete(e)}handleJoinSessionContextGroup({sessionContextGroupId:e},t){try{if(!e)throw new Error(\"Failed to join session context group: must specify group id.\");const n=this.sessionContextGroupMap.get(e);if(n)n.registerNewClient(t);else{const n=new h.default(this.channel,e);n.registerNewClient(t),this.sessionContextGroupMap.set(e,n)}return{hasConflict:this.contextGroupsById.has(e)}}catch(e){throw new Error(e)}}getClientState(e){return this.interopClients.get(e.endpointId)}static toObject(e){const t=Object.fromEntries(e),n={};return Object.entries(t).forEach((([e,t])=>{const i=Object.fromEntries(t);n[e]=i})),n}static checkContextIntegrity(e){if(!e)return{isValid:!1,reason:\"No context supplied\"};if(\"object\"!=typeof e)return{isValid:!1,reason:\"Context must be an Object\"};if(!e.type)return{isValid:!1,reason:\"Context must have a type property\"};if(e.id&&\"object\"!=typeof e.id)return{isValid:!1,reason:\"Context id must be an Object populated with key-value identifiers (if set)\"};if(e.id){const{id:t}=e,n=Object.keys(t);let i=!1;if(!n.length)return{isValid:!1,reason:\"Context id must have at least one key-value identifier\"};if(n.forEach((e=>{\"string\"==typeof e&&\"string\"==typeof t[e]||(i=!0)})),i)return{isValid:!1,reason:\"Context id key-value identifiers must be of type string\"}}return e.name&&\"string\"!=typeof e.name?{isValid:!1,reason:\"Context name must be of string type (if set)\"}:{isValid:!0}}static hasEndpointId(e){return void 0!==e.endpointId}static isContextTypeCompatible(e,t){return void 0===t||e===t}setContextGroupMap(){for(const e of this.getContextGroups())this.contextGroupsById.set(e.id,new Map)}async setCurrentContextGroupInClientOptions(e,t){try{const n=await this.fin.System.getEntityInfo(e.uuid,e.name);let i;\"view\"===n.entityType?i=await this.fin.View.wrap(e):\"window\"===n.entityType&&(i=await this.fin.Window.wrap(e)),i&&await i.updateOptions({interop:{currentContextGroup:t}})}catch(e){}}async setupChannelProvider(){try{const e=await this.getProvider();this.channel=e,this.wireChannel(e)}catch(e){throw new Error(`Error setting up Interop Broker Channel Provider: ${e}`)}}wireChannel(e){e.onConnection((async(e,t)=>{if(!await this.isConnectionAuthorized(e,t))throw new Error(`Connection not authorized for ${e.uuid}, ${e.name}`);if(!e.endpointId)throw new Error(\"Version too old to be compatible with Interop. Please upgrade your runtime to a more recent version.\");const n={contextGroupId:void 0,contextHandlers:new Map,clientIdentity:e};t?.currentContextGroup&&this.contextGroupsById.has(t.currentContextGroup)&&(n.contextGroupId=t?.currentContextGroup),this.interopClients.set(e.endpointId,n)})),e.onDisconnection((e=>{this.interopClients.delete(e.endpointId);const t=this.intentClientMap.get(e.name);t&&e.uuid===this.fin.me.uuid&&t.forEach((e=>{e.isReady=!1})),this.sessionContextGroupMap.forEach((t=>{t.onDisconnection(e)})),this.clientDisconnected(e)})),e.beforeAction((async(e,t,n)=>{if(!await this.isActionAuthorized(e,t,n))throw new Error(`Action (${e}) not authorized for ${n.uuid}, ${n.name}`);this.logging?.beforeAction?.enabled&&console.log(e,t,n)})),e.afterAction(((e,t,n)=>{this.logging?.afterAction?.enabled&&console.log(e,t,n)})),e.register(\"setContext\",this.setContext.bind(this)),e.register(\"fireIntent\",this.handleFiredIntent.bind(this)),e.register(\"getCurrentContext\",this.getCurrentContext.bind(this)),e.register(\"getInfoForIntent\",this.handleInfoForIntent.bind(this)),e.register(\"getInfoForIntentsByContext\",this.handleInfoForIntentsByContext.bind(this)),e.register(\"fireIntentForContext\",this.handleFiredIntentForContext.bind(this)),e.register(\"getContextGroups\",this.getContextGroups.bind(this)),e.register(\"joinContextGroup\",this.joinContextGroup.bind(this)),e.register(\"removeFromContextGroup\",this.removeFromContextGroup.bind(this)),e.register(\"getAllClientsInContextGroup\",this.getAllClientsInContextGroup.bind(this)),e.register(\"getInfoForContextGroup\",this.getInfoForContextGroup.bind(this)),e.register(\"contextHandlerRegistered\",this.contextHandlerRegistered.bind(this)),e.register(\"intentHandlerRegistered\",this.intentHandlerRegistered.bind(this)),e.register(\"removeContextHandler\",this.removeContextHandler.bind(this)),e.register(\"sessionContextGroup:createIfNeeded\",this.handleJoinSessionContextGroup.bind(this)),e.register(\"fdc3Open\",this.fdc3HandleOpen.bind(this)),e.register(\"fdc3v2FindIntentsByContext\",this.handleInfoForIntentsByContext.bind(this)),e.register(\"fdc3FindInstances\",this.fdc3HandleFindInstances.bind(this)),e.register(\"fdc3GetAppMetadata\",this.fdc3HandleGetAppMetadata.bind(this)),e.register(\"fdc3v2GetInfo\",(async(e,t)=>this.fdc3HandleGetInfo.bind(this)(e,t))),e.register(\"createPrivateChannelProvider\",(async e=>{const{channelId:t}=e,n=await this.fin.InterApplicationBus.Channel.create(t);p.PrivateChannelProvider.init(n,t)}))}isConnectionAuthorized(e,t){return this.wire.sendAction(\"interop-broker-is-connection-authorized\").catch((e=>{})),Promise.resolve(!0)}isActionAuthorized(e,t,n){return this.wire.sendAction(\"interop-broker-is-action-authorized\").catch((e=>{})),Promise.resolve(!0)}};return Gi.InteropBroker=f,e=new WeakMap,t=new WeakMap,n=new WeakMap,Gi}var zi,Ki={},qi={},Ji=s&&s.__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},Yi=s&&s.__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)};Object.defineProperty(qi,\"__esModule\",{value:!0});const Zi=d,Qi=Hi;class Xi extends Zi.Base{constructor(e,t,n){super(e),zi.set(this,void 0),this.id=n,Ji(this,zi,t,\"f\")}async setContext(e){this.wire.sendAction(\"interop-session-context-group-set-context\").catch((e=>{}));return(await Yi(this,zi,\"f\")).dispatch(`sessionContextGroup:setContext-${this.id}`,{sessionContextGroupId:this.id,context:e})}async getCurrentContext(e){this.wire.sendAction(\"interop-session-context-group-get-context\").catch((e=>{}));return(await Yi(this,zi,\"f\")).dispatch(`sessionContextGroup:getContext-${this.id}`,{sessionContextGroupId:this.id,type:e})}async addContextHandler(e,t){if(this.wire.sendAction(\"interop-session-context-group-add-handler\").catch((e=>{})),\"function\"!=typeof e)throw new Error(\"Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.\");const n=await Yi(this,zi,\"f\");let i;return i=t?`sessionContextHandler:invoke-${this.id}-${t}-${(0,Qi.generateId)()}`:`sessionContextHandler:invoke-${this.id}`,n.register(i,(0,Qi.wrapContextHandler)(e,i)),await n.dispatch(`sessionContextGroup:handlerAdded-${this.id}`,{handlerId:i,contextType:t}),{unsubscribe:await this.createUnsubscribeCb(i)}}async createUnsubscribeCb(e){const t=await Yi(this,zi,\"f\");return async()=>{t.remove(e),await t.dispatch(`sessionContextGroup:handlerRemoved-${this.id}`,{handlerId:e})}}getUserInstance(){return{id:this.id,setContext:(0,Qi.wrapInTryCatch)(this.setContext.bind(this),\"Failed to set context: \"),getCurrentContext:(0,Qi.wrapInTryCatch)(this.getCurrentContext.bind(this),\"Failed to get context: \"),addContextHandler:(0,Qi.wrapInTryCatch)(this.addContextHandler.bind(this),\"Failed to add context handler: \")}}}qi.default=Xi,zi=new WeakMap;var er={},tr={},nr={},ir={},rr=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),or=s&&s.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,\"default\",{enumerable:!0,value:t})}:function(e,t){e.default=t}),sr=s&&s.__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)&&rr(t,e,n);return or(t,e),t};Object.defineProperty(ir,\"__esModule\",{value:!0}),ir.PrivateChannelClient=void 0;const ar=sr(Hi);var cr,dr;function hr(){if(cr)return tr;cr=1;var e,t=s&&s.__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)},n=s&&s.__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},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(tr,\"__esModule\",{value:!0}),tr.FDC3ModuleBase=void 0;const o=nr,a=Hi,c=wr(),d=r(i);return tr.FDC3ModuleBase=class{get client(){return t(this,e,\"f\").call(this)}get fin(){return this.wire.getFin()}constructor(t,i){this.wire=i,e.set(this,void 0),n(this,e,t,\"f\")}async broadcast(e){return this.wire.sendAction(\"fdc3-broadcast\").catch((e=>{})),this.client.setContext(e)}async _open(e,t){this.wire.sendAction(\"fdc3-open\").catch((e=>{}));try{return await c.InteropClient.ferryFdc3Call(this.client,\"fdc3Open\",{app:e,context:t})}catch(e){const t=e.message===a.BROKER_ERRORS.fdc3Open?\"ResolverUnavailable\":e.message;throw new Error(t)}}async _getChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:\"system\",...(0,o.getUnsupportedChannelApis)()})))}async getOrCreateChannel(e){this.wire.sendAction(\"fdc3-get-or-create-channel\").catch((e=>{}));const t=(await this._getChannels()).find((t=>t.id===e));if(t)return{...t,type:\"system\",...(0,o.getUnsupportedChannelApis)()};try{const t=await this.client.joinSessionContextGroup(e);return(0,o.buildAppChannelObject)(t)}catch(e){throw console.error(e.message),new Error(o.ChannelError.CreationFailed)}}async getSystemChannels(){return this.wire.sendAction(\"fdc3-get-system-channels\").catch((e=>{})),this._getChannels()}async joinChannel(e){this.wire.sendAction(\"fdc3-join-channel\").catch((e=>{}));try{return await this.client.joinContextGroup(e)}catch(e){if(e.message===a.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup?console.error(\"The Channel you have tried to join is an App Channel. Custom Channels can only be defined by the Interop Broker through code or manifest configuration. Please use getOrCreateChannel.\"):console.error(e.message),e.message.startsWith(\"Attempting to join a context group that does not exist\"))throw new Error(o.ChannelError.NoChannelFound);throw new Error(o.ChannelError.AccessDenied)}}async getCurrentChannel(){this.wire.sendAction(\"fdc3-get-current-channel\").catch((e=>{}));const e=await this.getCurrentContextGroupInfo();return e?this.buildChannelObject(e):null}async leaveCurrentChannel(){return this.wire.sendAction(\"fdc3-leave-current-channel\").catch((e=>{})),this.client.removeFromContextGroup()}async getCurrentContextGroupInfo(){const e=await this.client.getContextGroups(),t=e.map((async e=>this.client.getAllClientsInContextGroup(e.id))),n=(await Promise.all(t)).findIndex((e=>e.some((e=>{const{uuid:t,name:n}=e;return this.wire.me.uuid===t&&this.wire.me.name===n}))));return e[n]}async buildChannelObject(e){return{...e,type:\"system\",addContextListener:(...[e,t])=>{let n,i;\"function\"==typeof e?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),n=e):(n=t,\"string\"==typeof e&&(i=e));const r=(async()=>{let e=!0;const t=await this.client.getCurrentContext(i);return this.client.addContextHandler(((i,r)=>{if(!e||(e=!1,!(0,d.default)(t,i)))return n(i,r)}),i)})();return{...r,unsubscribe:()=>r.then((e=>e.unsubscribe()))}},broadcast:this.broadcast.bind(this),getCurrentContext:async e=>{const t=await this.client.getCurrentContext(e);return void 0===t?null:t}}}},e=new WeakMap,tr}ir.PrivateChannelClient=class{constructor(e,t){this.id=t,this.client=e,this.listeners=new Map}async broadcast(e){return this.client.dispatch(\"broadcast\",{context:e})}async getCurrentContext(e){return this.client.dispatch(\"getCurrentContext\",{contextType:e})}async addContextListener(e,t){if(\"function\"!=typeof t)throw new Error(\"Non-function argument passed to the second parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.\");let n;n=e?`contextHandler:invoke-${this.id}-${e}-${ar.generateId()}`:`contextHandler:invoke-${this.id}-${ar.generateId()}`,this.client.register(n,ar.wrapContextHandler(t,n));const i={unsubscribe:await this.createContextUnsubscribeCb(n)};return this.listeners.set(n,i),await this.client.dispatch(\"contextHandlerAdded\",{handlerId:n,contextType:e}),i}createNonStandardUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch(\"nonStandardHandlerRemoved\",{handlerId:e})}}createContextUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch(\"contextHandlerRemoved\",{handlerId:e})}}onAddContextListener(e){const t=`onContextHandlerAdded:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch(\"onAddContextHandlerAdded\",{handlerId:t}),n}onDisconnect(e){const t=`onDisconnect:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch(\"onDisconnectHandlerAdded\",{handlerId:t}),n}onUnsubscribe(e){const t=`onUnsubscribe:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch(\"onUnsubscribeHandlerAdded\",{handlerId:t}),n}async cleanUpAllSubs(){Array.from(this.listeners.keys()).forEach((e=>{this.client.remove(e),this.listeners.delete(e)}))}async disconnect(){try{await this.client.dispatch(\"clientDisconnecting\"),await this.cleanUpAllSubs(),await this.client.disconnect()}catch(e){throw new Error(e.message)}}},function(e){var t=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,\"__esModule\",{value:!0}),e.getIntentResolution=e.isChannel=e.isContext=e.connectPrivateChannel=e.buildAppChannelObject=e.buildPrivateChannelObject=e.ChannelError=e.ResultError=e.UnsupportedChannelApiError=e.getUnsupportedChannelApis=void 0;const n=Hi,r=ir,o=t(i);e.getUnsupportedChannelApis=e=>({addContextListener:()=>{throw new a(\"Channel.addContextListener\",e)},broadcast:()=>{throw new a(\"Channel.broadcast\",e)},getCurrentContext:()=>{throw new a(\"Channel.getCurrentContext\",e)}});class a extends Error{constructor(e,t=\"System\"){super(e),this.message=`Calling ${e} on an instance of a ${t} Channel returned by fdc3.get${t}Channels is not supported. If you would like to use a ${t} Channel, please use fdc3.joinChannel, fdc3.addContextListener, and fdc3.broadcast instead.`}}var c,d;e.UnsupportedChannelApiError=a,function(e){e.NoResultReturned=\"NoResultReturned\",e.IntentHandlerRejected=\"IntentHandlerRejected\"}(c=e.ResultError||(e.ResultError={})),(d=e.ChannelError||(e.ChannelError={})).NoChannelFound=\"NoChannelFound\",d.AccessDenied=\"AccessDenied\",d.CreationFailed=\"CreationFailed\";e.buildPrivateChannelObject=e=>{let t=!1;const n=()=>{if(t)throw new Error(\"Private Channel Client has been disconnected from the Private Channel\")};return{id:e.id,type:\"private\",broadcast:async t=>(n(),e.broadcast(t)),getCurrentContext:async t=>(n(),e.getCurrentContext(t)),addContextListener:async(t,i)=>{n();let r=i,o=t;\"function\"==typeof t&&(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),r=t,o=null);return e.addContextListener(o,r)},onAddContextListener:t=>(n(),e.onAddContextListener(t)),disconnect:async()=>(n(),t=!0,e.disconnect()),onDisconnect:t=>(n(),e.onDisconnect(t)),onUnsubscribe:t=>(n(),e.onUnsubscribe(t))}};e.buildAppChannelObject=e=>({id:e.id,type:\"app\",broadcast:e.setContext,getCurrentContext:async t=>{const n=await e.getCurrentContext(t);return void 0===n?null:n},addContextListener:(t,n)=>{let i,r;\"function\"==typeof t?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),i=t):(i=n,\"string\"==typeof t&&(r=t));const s=(async()=>{let t=!0;const n=await e.getCurrentContext(r);return e.addContextHandler(((e,r)=>{if(!t||(t=!1,!(0,o.default)(n,e)))return i(e,r)}),r)})();return{...s,unsubscribe:()=>s.then((e=>e.unsubscribe()))}}});e.connectPrivateChannel=async t=>{try{const n=await fin.InterApplicationBus.Channel.connect(t),i=new r.PrivateChannelClient(n,t);return(0,e.buildPrivateChannelObject)(i)}catch(e){throw new Error(`Private Channel with id: ${t} doesn't exist`)}};e.isContext=e=>{if(e&&\"object\"==typeof e&&\"type\"in e){const{type:t}=e;return\"string\"==typeof t}return!1};e.isChannel=e=>{if(e&&\"object\"==typeof e&&\"type\"in e&&\"id\"in e){const{type:t,id:n}=e;return\"string\"==typeof t&&\"string\"==typeof n&&(\"app\"===t||\"private\"===t)}return!1};e.getIntentResolution=async(t,i,r,o)=>{const s=(0,n.generateId)(),a=new Promise(((e,t)=>{fin.InterApplicationBus.subscribe({uuid:\"*\"},s,(t=>{e(t)})).catch((()=>t(new Error(\"getResult is not supported in this environment\"))))})),d=r?{target:r,intentResolutionResultId:s}:{intentResolutionResultId:s},h=o?{name:o,context:i,metadata:d}:{...i,metadata:d},l=async()=>{let n=await a;if(!n||\"object\"!=typeof n)throw new Error(c.NoResultReturned);const{error:i}=n;if(i)throw new Error(c.IntentHandlerRejected);if((0,e.isChannel)(n)){const{id:i,type:r}=n;switch(r){case\"private\":n=await(0,e.connectPrivateChannel)(i);break;case\"app\":{const r=await t.joinSessionContextGroup(i);n=(0,e.buildAppChannelObject)(r);break}}}else if(!(0,e.isContext)(n))throw new Error(c.NoResultReturned);return n},u=o?await t.fireIntent(h):await t.fireIntentForContext(h);return\"object\"!=typeof u?{source:{appId:\"\",instanceId:\"\"},intent:\"\",version:\"2.0\",getResult:l}:{...u,getResult:l}}}(nr);var lr,ur,pr={};function wr(){if(ur)return Ki;ur=1;var e,t,n=s&&s.__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},i=s&&s.__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)},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ki,\"__esModule\",{value:!0}),Ki.InteropClient=void 0;const o=d,a=r(qi),c=function(){if(dr)return er;dr=1,Object.defineProperty(er,\"__esModule\",{value:!0}),er.Fdc3Module=void 0;const e=Hi,t=hr();class n extends t.FDC3ModuleBase{async open(e,t){await super._open(e,t)}addContextListener(e,t){let n;return this.wire.sendAction(\"fdc3-add-context-listener\").catch((e=>{})),\"function\"==typeof e?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),n=this.client.addContextHandler(e)):n=this.client.addContextHandler(t,null===e?void 0:e),{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}addIntentListener(e,t){this.wire.sendAction(\"fdc3-add-intent-listener\").catch((e=>{}));const n=this.client.registerIntentHandler((e=>{const{context:n,metadata:i}=e,{metadata:r}=n,o=i?.intentResolutionResultId||r?.intentResolutionResultId;o&&this.fin.InterApplicationBus.publish(o,null).catch((()=>null)),t(e.context)}),e,{fdc3Version:\"1.2\"});return{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}async raiseIntent(t,n,i){this.wire.sendAction(\"fdc3-raise-intent\").catch((e=>{}));const r=i?{name:t,context:n,metadata:{target:i}}:{name:t,context:n};try{return await this.client.fireIntent(r)}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntent?\"ResolverUnavailable\":t.message;throw new Error(n)}}async findIntent(t,n){this.wire.sendAction(\"fdc3-find-intent\").catch((e=>{}));try{return await this.client.getInfoForIntent({name:t,context:n})}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntent?\"ResolverUnavailable\":t.message;throw new Error(n)}}async findIntentsByContext(t){this.wire.sendAction(\"fdc3-find-intents-by-context\").catch((e=>{}));try{return await this.client.getInfoForIntentsByContext(t)}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntentsByContext?\"ResolverUnavailable\":t.message;throw new Error(n)}}async raiseIntentForContext(t,n){this.wire.sendAction(\"fdc3-raise-intent-for-context\").catch((e=>{}));try{return await this.client.fireIntentForContext({...t,metadata:{target:n}})}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntentForContext?\"ResolverUnavailable\":t.message;throw new Error(n)}}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}getInfo(){return this.wire.sendAction(\"fdc3-get-info\").catch((e=>{})),{providerVersion:this.wire.environment.getAdapterVersionSync(),provider:`openfin-${this.wire.me.uuid}`,fdc3Version:\"1.2\"}}}return er.Fdc3Module=n,er}(),h=function(){if(lr)return pr;lr=1,Object.defineProperty(pr,\"__esModule\",{value:!0}),pr.Fdc3Module2=void 0;const e=hr(),t=Hi,n=wr(),i=nr,r=ir;class o extends e.FDC3ModuleBase{async open(e,t){return\"string\"==typeof e&&console.warn(\"Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).\"),super._open(e,t)}async findInstances(e){this.wire.sendAction(\"fdc3-find-instances\").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,\"fdc3FindInstances\",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3FindInstances?\"ResolverUnavailable\":e.message;throw new Error(n)}}async getAppMetadata(e){this.wire.sendAction(\"fdc3-get-app-metadata\").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,\"fdc3GetAppMetadata\",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3GetAppMetadata?\"ResolverUnavailable\":e.message;throw new Error(n)}}async addContextListener(e,t){this.wire.sendAction(\"fdc3-add-context-listener\").catch((e=>{}));const n=e=>t=>{const{contextMetadata:n,...i}=t,r=n?[{...i},n]:[t,null];e(...r)};let i=t,r=n(i);return\"function\"==typeof e?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),i=e,r=n(i),this.client.addContextHandler(r)):this.client.addContextHandler(r,null===e?void 0:e)}async findIntent(e,n,i){this.wire.sendAction(\"fdc3-find-intent\").catch((e=>{}));try{return await this.client.getInfoForIntent({name:e,context:n,metadata:{resultType:i}})}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntent?\"ResolverUnavailable\":e.message;throw new Error(n)}}async findIntentsByContext(e,i){this.wire.sendAction(\"fdc3-find-intents-by-context\").catch((e=>{}));const r=i?{context:e,metadata:{resultType:i}}:e;try{return await n.InteropClient.ferryFdc3Call(this.client,\"fdc3v2FindIntentsByContext\",r)}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntentsByContext?\"ResolverUnavailable\":e.message;throw new Error(n)}}async raiseIntent(e,n,r){this.wire.sendAction(\"fdc3-raise-intent\").catch((e=>{}));try{return\"string\"==typeof r&&console.warn(\"Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).\"),(0,i.getIntentResolution)(this.client,n,r,e)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?\"ResolverUnavailable\":e.message;throw new Error(n)}}async raiseIntentForContext(e,n){this.wire.sendAction(\"fdc3-raise-intent-for-context\").catch((e=>{}));try{return\"string\"==typeof n&&console.warn(\"Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).\"),(0,i.getIntentResolution)(this.client,e,n)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?\"ResolverUnavailable\":e.message;throw new Error(n)}}async addIntentListener(e,t){if(this.wire.sendAction(\"fdc3-add-intent-listener\").catch((e=>{})),\"string\"!=typeof e)throw new Error(\"First argument must be an Intent name\");return this.client.registerIntentHandler((async e=>{let n,i;const{context:r,metadata:o}=e,{contextMetadata:s,metadata:a,...c}=r,d=o?.intentResolutionResultId||a?.intentResolutionResultId;try{const e=a?{metadata:a,...c}:{...c};n=await t(e,s),i=n}catch(e){n=e,i={error:!0}}if(d&&this.fin.InterApplicationBus.publish(d,i).catch((()=>null)),n instanceof Error)throw new Error(n.message);return n}),e,{fdc3Version:\"2.0\"})}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}async createPrivateChannel(){const e=(0,t.generateId)();await n.InteropClient.ferryFdc3Call(this.client,\"createPrivateChannelProvider\",{channelId:e});const o=await this.fin.InterApplicationBus.Channel.connect(e),s=new r.PrivateChannelClient(o,e);return(0,i.buildPrivateChannelObject)(s)}async getUserChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:\"user\",...(0,i.getUnsupportedChannelApis)(\"User\")})))}async getSystemChannels(){return console.warn(\"This API has been deprecated. Please use fdc3.getUserChannels instead.\"),super.getSystemChannels()}async joinUserChannel(e){return super.joinChannel(e)}async joinChannel(e){return console.warn(\"This API has been deprecated. Please use fdc3.joinUserChannel instead.\"),super.joinChannel(e)}async getCurrentChannel(){const e=await super.getCurrentChannel();return e?{...e,type:\"user\",broadcast:this.broadcast.bind(this)}:null}async getInfo(){return n.InteropClient.ferryFdc3Call(this.client,\"fdc3v2GetInfo\",{fdc3Version:\"2.0\"})}}return pr.Fdc3Module2=o,pr}(),l=Hi;let u=class extends o.Base{constructor(i,r){super(i),e.set(this,void 0),t.set(this,void 0),n(this,t,new Map,\"f\"),n(this,e,r,\"f\")}async setContext(t){this.wire.sendAction(\"interop-client-set-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"setContext\",{context:t})}async addContextHandler(t,n){if(this.wire.sendAction(\"interop-client-add-context-handler\").catch((e=>{})),\"function\"!=typeof t)throw new Error(\"Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.\");const r=await i(this,e,\"f\");let o;o=n?`invokeContextHandler-${n}-${(0,l.generateId)()}`:\"invokeContextHandler\";const s=(0,l.wrapContextHandler)(t,o);return r.register(o,s),await r.dispatch(\"contextHandlerRegistered\",{handlerId:o,contextType:n}),{unsubscribe:async()=>{r.remove(o),await r.dispatch(\"removeContextHandler\",{handlerId:o})}}}async getContextGroups(){this.wire.sendAction(\"interop-client-get-context-groups\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getContextGroups\")}async joinContextGroup(t,n){this.wire.sendAction(\"interop-client-join-context-group\").catch((e=>{}));const r=await i(this,e,\"f\");if(!t)throw new Error(\"No contextGroupId specified for joinContextGroup.\");return r.dispatch(\"joinContextGroup\",{contextGroupId:t,target:n})}async removeFromContextGroup(t){this.wire.sendAction(\"interop-client-remove-from-context-group\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"removeFromContextGroup\",{target:t})}async getAllClientsInContextGroup(t){this.wire.sendAction(\"interop-client-get-all-clients-in-context-group\").catch((e=>{}));const n=await i(this,e,\"f\");if(!t)throw new Error(\"No contextGroupId specified for getAllClientsInContextGroup.\");return n.dispatch(\"getAllClientsInContextGroup\",{contextGroupId:t})}async getInfoForContextGroup(t){this.wire.sendAction(\"interop-client-get-info-for-context-group\").catch((e=>{}));const n=await i(this,e,\"f\");if(!t)throw new Error(\"No contextGroupId specified for getInfoForContextGroup.\");return n.dispatch(\"getInfoForContextGroup\",{contextGroupId:t})}async fireIntent(t){this.wire.sendAction(\"interop-client-fire-intent\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"fireIntent\",t)}async registerIntentHandler(t,n,r){this.wire.sendAction(\"interop-client-register-intent-handler\").catch((e=>{}));const o=await i(this,e,\"f\"),s=`intent-handler-${n}`,a=(0,l.wrapIntentHandler)(t,s);try{await o.register(s,a),await o.dispatch(\"intentHandlerRegistered\",{handlerId:s,...r})}catch(e){throw new Error(\"Unable to register intent handler\")}return{unsubscribe:async()=>{o.remove(s)}}}async getCurrentContext(t){this.wire.sendAction(\"interop-client-get-current-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getCurrentContext\",{contextType:t})}async getInfoForIntent(t){this.wire.sendAction(\"interop-client-get-info-for-intent\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getInfoForIntent\",t)}async getInfoForIntentsByContext(t){this.wire.sendAction(\"interop-client-get-info-for-intents-by-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getInfoForIntentsByContext\",t)}async fireIntentForContext(t){this.wire.sendAction(\"interop-client-fire-intent-for-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"fireIntentForContext\",t)}async joinSessionContextGroup(n){try{const r=i(this,t,\"f\").get(n);if(r)return r.getUserInstance();const o=await i(this,e,\"f\"),{hasConflict:s}=await o.dispatch(\"sessionContextGroup:createIfNeeded\",{sessionContextGroupId:n});s&&console.warn(`A (non-session) context group with the name \"${n}\" already exists. If you are trying to join a Context Group, call joinContextGroup instead.`);const c=new a.default(this.wire,i(this,e,\"f\"),n);return i(this,t,\"f\").set(n,c),c.getUserInstance()}catch(e){throw console.error(`Error thrown trying to create Session Context Group with id \"${n}\": ${e}`),e}}async onDisconnection(t){this.wire.sendAction(\"interop-client-add-ondisconnection-listener\").catch((e=>{}));return(await i(this,e,\"f\")).onDisconnection((e=>{const{uuid:n}=e;t({type:\"interop-broker\",topic:\"disconnected\",brokerName:n})}))}getFDC3Sync(e){switch(e){case\"1.2\":return new c.Fdc3Module((()=>this),this.wire);case\"2.0\":return new h.Fdc3Module2((()=>this),this.wire);default:throw new Error(`Invalid FDC3 version provided: ${e}. Must be '1.2' or '2.0'`)}}async getFDC3(e){return this.getFDC3Sync(e)}static async ferryFdc3Call(t,n,r){return(await i(t,e,\"f\")).dispatch(n,r||null)}};return Ki.InteropClient=u,e=new WeakMap,t=new WeakMap,Ki}var yr,fr,gr,mr={};function vr(){if(yr)return mr;yr=1,Object.defineProperty(mr,\"__esModule\",{value:!0}),mr.overrideCheck=mr.checkFDC32Overrides=mr.getDefaultViewFdc3VersionFromAppInfo=void 0;const e=Vi();function t(t){return[\"fdc3HandleFindInstances\",\"handleInfoForIntent\",\"handleInfoForIntentsByContext\",\"fdc3HandleGetAppMetadata\",\"fdc3HandleGetInfo\",\"fdc3HandleOpen\",\"handleFiredIntent\",\"handleFiredIntentForContext\"].filter((n=>t[n]===e.InteropBroker.prototype[n]))}return mr.getDefaultViewFdc3VersionFromAppInfo=function({manifest:e,initialOptions:t}){const n=e?.platform?.defaultViewOptions?.fdc3InteropApi??t.defaultViewOptions?.fdc3InteropApi;return[\"1.2\",\"2.0\"].includes(n??\"\")?n:void 0},mr.checkFDC32Overrides=t,mr.overrideCheck=function(e,n){if(n&&\"2.0\"===n){const n=t(e);n.length>0&&console.warn(`WARNING: FDC3 2.0 has been set as a default option for Views in this Platform, but the required InteropBroker APIs for FDC3 2.0 compliance have not all been overridden.\\nThe following APIs need to be overridden:\\n${n.join(\"\\n\")}`)}},mr}function Cr(){return gr||(gr=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),i=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),i(function(){if(fr)return Ti;fr=1;var e=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ti,\"__esModule\",{value:!0}),Ti.InteropModule=void 0;const t=e(n),i=$i,r=d,o=Vi(),a=wr(),c=vr(),h=Tn,l=e=>new e,u=\"You have attempted to use or modify InteropBroker parameters, which is not allowed. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.\";class p extends r.Base{async init(e,n=l){this.wire.sendAction(\"interop-init\").catch((()=>{}));const r=await this.wire.environment.getInteropInfo(this.wire.getFin()),s=(0,i.createUnusableObject)(u),a=(0,i.createWarningObject)(u,(0,t.default)(r)),d=async()=>{throw new Error(u)},p=o.InteropBroker.createClosedConstructor(this.wire,(()=>this.fin.InterApplicationBus.Channel.create(`interop-broker-${e}`)),r);let w;return w=Array.isArray(n)?new((0,h.overrideFromComposables)(...n)(p))(s,d,a):await n(p,s,d,a),(0,c.overrideCheck)(w,r.fdc3Version),w}connectSync(e,t){return this.wire.sendAction(\"interop-connect-sync\").catch((()=>{})),new a.InteropClient(this.wire,this.wire.environment.whenReady().then((()=>this.fin.InterApplicationBus.Channel.connect(`interop-broker-${e}`,{payload:t}))))}}return Ti.InteropModule=p,Ti}(),e),i(wr(),e),i(Vi(),e)}(Li)),Li}var br={},Ir={},Er={},xr={};Object.defineProperty(xr,\"__esModule\",{value:!0}),xr.getSnapshotSourceChannelName=void 0;xr.getSnapshotSourceChannelName=e=>`snapshot-source-provider-${e.uuid}`;var Ar,Pr,Mr,_r,Or,Sr=s&&s.__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},Rr=s&&s.__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)};Object.defineProperty(Er,\"__esModule\",{value:!0}),Er.SnapshotSource=void 0;const Fr=d,jr=xr,kr=new Map;class Lr extends Fr.Base{constructor(e,t){super(e),Ar.set(this,void 0),Pr.set(this,(()=>(kr.has(this.identity.uuid)||kr.set(this.identity.uuid,{eventFired:null,clientPromise:null}),kr.get(this.identity.uuid)))),Mr.set(this,(()=>(Rr(this,Pr,\"f\").call(this).clientPromise||(Rr(this,Pr,\"f\").call(this).clientPromise=Rr(this,_r,\"f\").call(this)),Rr(this,Pr,\"f\").call(this).clientPromise))),_r.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);try{Rr(this,Pr,\"f\").call(this).eventFired||await Rr(this,Or,\"f\").call(this);const t=await this.fin.InterApplicationBus.Channel.connect(e,{wait:!1});return t.onDisconnection((()=>{Rr(this,Pr,\"f\").call(this).clientPromise=null,Rr(this,Pr,\"f\").call(this).eventFired=null})),t}catch(e){throw Rr(this,Pr,\"f\").call(this).clientPromise=null,new Error(\"The targeted SnapshotSource is not currently initialized. Await this object's ready() method.\")}})),Or.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);let t,n;const i=new Promise(((e,i)=>{t=e,n=i}));Rr(this,Pr,\"f\").call(this).eventFired=i;const r=async i=>{try{i.channelName===e&&(t(),await this.fin.InterApplicationBus.Channel.removeListener(\"connected\",r))}catch(e){n(e)}};await this.fin.InterApplicationBus.Channel.on(\"connected\",r)})),Sr(this,Ar,t,\"f\")}get identity(){return Rr(this,Ar,\"f\")}async ready(){this.wire.sendAction(\"snapshot-source-ready\").catch((e=>{}));try{await Rr(this,Mr,\"f\").call(this)}catch(e){await Rr(this,Pr,\"f\").call(this).eventFired}}async getSnapshot(){this.wire.sendAction(\"snapshot-source-get-snapshot\").catch((e=>{}));const e=await Rr(this,Mr,\"f\").call(this),t=await e.dispatch(\"get-snapshot\");return(await t).snapshot}async applySnapshot(e){this.wire.sendAction(\"snapshot-source-apply-snapshot\").catch((e=>{}));return(await Rr(this,Mr,\"f\").call(this)).dispatch(\"apply-snapshot\",{snapshot:e})}}Er.SnapshotSource=Lr,Ar=new WeakMap,Pr=new WeakMap,Mr=new WeakMap,_r=new WeakMap,Or=new WeakMap,Object.defineProperty(Ir,\"__esModule\",{value:!0}),Ir.SnapshotSourceModule=void 0;const Tr=d,$r=Er,Br=xr;class Gr extends Tr.Base{async init(e){if(this.wire.sendAction(\"snapshot-source-init\").catch((e=>{})),\"object\"!=typeof e||\"function\"!=typeof e.getSnapshot||\"function\"!=typeof e.applySnapshot)throw new Error(\"you must pass in a valid SnapshotProvider\");const t=await this.fin.InterApplicationBus.Channel.create((0,Br.getSnapshotSourceChannelName)(this.fin.me));t.register(\"get-snapshot\",(async()=>({snapshot:await e.getSnapshot()}))),t.register(\"apply-snapshot\",(({snapshot:t})=>e.applySnapshot(t)))}wrapSync(e){return this.wire.sendAction(\"snapshot-source-wrap-sync\").catch((e=>{})),new $r.SnapshotSource(this.wire,e)}async wrap(e){return this.wire.sendAction(\"snapshot-source-wrap\").catch((e=>{})),this.wrapSync(e)}}Ir.SnapshotSourceModule=Gr,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Ir,e),n(Er,e)}(br),Object.defineProperty(a,\"__esModule\",{value:!0});var Wr=a.Fin=void 0;const Hr=t,Nr=c,Dr=ie(),Ur=Z(),Vr=de,zr=en,Kr=rn,qr=un,Jr=bn,Yr=J(),Zr=An,Qr=ki,Xr=Cr(),eo=br;class to extends Hr.EventEmitter{constructor(e){super(),this.wire=e,this.System=new Nr.System(e),this.Window=new Dr._WindowModule(e),this.Application=new Ur.ApplicationModule(e),this.InterApplicationBus=new Vr.InterApplicationBus(e),this.Clipboard=new zr.Clipboard(e),this.ExternalApplication=new Kr.ExternalApplicationModule(e),this.Frame=new qr._FrameModule(e),this.GlobalHotkey=new Jr.GlobalHotkey(e),this.Platform=new Zr.PlatformModule(e,this.InterApplicationBus.Channel),this.View=new Yr.ViewModule(e),this.Interop=new Xr.InteropModule(e),this.SnapshotSource=new eo.SnapshotSourceModule(e),e.registerFin(this),this.me=(0,Qr.getMe)(e),e.on(\"disconnected\",(()=>{this.emit(\"disconnected\")}))}}Wr=a.Fin=to;var no={},io={};function ro(e){return\"string\"==typeof e.manifestUrl}function oo(e){return ao(e)&&\"string\"==typeof e.address}function so(e){return oo(e)&&\"string\"==typeof e.token}function ao(e){return\"string\"==typeof e.uuid}function co(e){return e.runtime&&\"string\"==typeof e.runtime.version}function ho(e){return ao(e)&&co(e)}Object.defineProperty(io,\"__esModule\",{value:!0}),io.isInternalConnectConfig=io.isPortDiscoveryConfig=io.isNewConnectConfig=io.isConfigWithReceiver=io.isRemoteConfig=io.isExistingConnectConfig=io.isExternalConfig=void 0,io.isExternalConfig=ro,io.isExistingConnectConfig=oo,io.isRemoteConfig=so,io.isConfigWithReceiver=function(e){return\"object\"==typeof e.receiver&&so({...e,address:\"\"})},io.isNewConnectConfig=ho,io.isPortDiscoveryConfig=function(e){return ro(e)&&co(e)||ho(e)},io.isInternalConnectConfig=function(e){return oo(e)||ho(e)};var lo={},uo={};Object.defineProperty(uo,\"__esModule\",{value:!0}),uo.EmitterMap=void 0;const po=t;function wo(e){return Buffer.from(e).toString(\"base64\")}uo.EmitterMap=class{constructor(){this.storage=new Map}hashKeys(e){return e.map(wo).join(\"/\")}getOrCreate(e){const t=this.hashKeys(e);return this.storage.has(t)||this.storage.set(t,new po.EventEmitter),this.storage.get(t)}has(e){return this.storage.has(this.hashKeys(e))}delete(e){const t=this.hashKeys(e);return this.storage.delete(t)}},Object.defineProperty(lo,\"__esModule\",{value:!0});const yo=uo;class fo extends yo.EmitterMap{constructor(){super(...arguments),this.dispatchEvent=e=>{if(function(e){return\"process-desktop-event\"===e.action}(e)){const{payload:t}=e,n=function(e){const{topic:t}=e;if(\"frame\"===t||\"window\"===t||\"view\"===t){const{uuid:n,name:i}=e;return[t,n,i]}if(\"application\"===t){const{uuid:n}=e;return[t,n]}return[t]}(t);if(this.has(n))return this.getOrCreate(n).emit(t.type,t),!0}return!1}}}lo.default=fo;var go,mo,vo=s&&s.__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},Co=s&&s.__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)},bo=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(no,\"__esModule\",{value:!0});var Io=no.Transport=void 0;const Eo=t,xo=io,Ao=g,Po=bo(lo),Mo=ki,_o=ke;class Oo extends Eo.EventEmitter{constructor(e,t,n){super(),this.wireListeners=new Map,this.topicRefMap=new Map,this.eventAggregator=new Po.default,this.messageHandlers=[this.eventAggregator.dispatchEvent],go.set(this,void 0),mo.set(this,void 0),this.connectSync=()=>{Co(this,go,\"f\").connectSync()},this.getPort=()=>Co(this,go,\"f\").getPort(),vo(this,go,new e(this.onmessage.bind(this)),\"f\"),this.environment=t,this.sendRaw=Co(this,go,\"f\").send.bind(Co(this,go,\"f\")),this.registerMessageHandler(this.handleMessage.bind(this)),Co(this,go,\"f\").on(\"disconnected\",(()=>{for(const[,{handleNack:e}]of this.wireListeners)e({reason:\"Remote connection has closed\"});this.wireListeners.clear(),this.emit(\"disconnected\")}));const{uuid:i,name:r}=n,o=this.environment.getCurrentEntityType();this.me=(0,Mo.getBaseMe)(o,i,r)}getFin(){if(!Co(this,mo,\"f\"))throw new Error(\"No Fin object registered for this transport\");return Co(this,mo,\"f\")}registerFin(e){if(Co(this,mo,\"f\"))throw new Error(\"Fin object has already been registered for this transport\");vo(this,mo,e,\"f\")}shutdown(){return Co(this,go,\"f\").shutdown()}async connect(e){if((0,xo.isConfigWithReceiver)(e))return await Co(this,go,\"f\").connect(e.receiver),this.authorize(e);if((0,xo.isRemoteConfig)(e))return this.connectRemote(e);if((0,xo.isExistingConnectConfig)(e))return this.connectByPort(e);if((0,xo.isNewConnectConfig)(e)){const t=await this.environment.retrievePort(e);return this.connectByPort({...e,address:`ws://localhost:${t}`})}}async connectRemote(e){return await Co(this,go,\"f\").connect(new(this.environment.getWsConstructor())(e.address)),this.authorize(e)}async connectByPort(e){const{address:t,uuid:n}=e,i={...e,type:\"file-token\"},r=Co(this,go,\"f\");await r.connect(new(this.environment.getWsConstructor())(e.address));const o=await this.sendAction(\"request-external-authorization\",{uuid:n,type:\"file-token\"},!0);if(\"external-authorization-response\"!==o.action)throw new Ao.UnexpectedActionError(o.action);return await this.environment.writeToken(o.payload.file,o.payload.token),this.authorize(i)}async authorize(e){const t=await this.sendAction(\"request-authorization\",e,!0);if(\"authorization-response\"!==t.action)throw new Ao.UnexpectedActionError(t.action);if(!0!==t.payload.success)throw new Ao.RuntimeError(t.payload)}sendAction(e,t={},n=!1){let i=()=>{};const r=Ao.RuntimeError.getCallSite(1),o=this.environment.getNextMessageId(),s=new Promise(((s,a)=>{i=a;const c={action:e,payload:t,messageId:o},d=Co(this,go,\"f\");return this.addWireListener(o,s,(e=>this.nackHandler(e,a,r)),n),d.send(c).catch(a)}));return Object.assign(s,{cancel:i,messageId:o})}nackHandler(e,t,n){t(\"string\"==typeof e?e:new Ao.RuntimeError(e,n))}ferryAction(e){return new Promise(((t,n)=>{const i=this.environment.getNextMessageId();e.messageId=i;const r=e=>{t(e.payload)};return Co(this,go,\"f\").send(e).then((()=>this.addWireListener(i,r,(e=>this.nackHandler(e,n)),!1))).catch(n)}))}registerMessageHandler(e){this.messageHandlers.push(e)}addWireListener(e,t,n,i){i?this.uncorrelatedListener=t:this.wireListeners.has(e)?n({reason:\"Duplicate handler id\",error:(0,_o.errorToPOJO)(new Ao.DuplicateCorrelationError(String(e)))}):this.wireListeners.set(e,{resolve:t,handleNack:n})}onmessage(e){for(const t of this.messageHandlers)t.call(null,e)}handleMessage(e){const t=e.correlationId||NaN;if(\"correlationId\"in e){if(!this.wireListeners.has(t))return!1;{const{resolve:n,handleNack:i}=this.wireListeners.get(t);\"ack\"!==e.action?i({reason:\"Did not receive ack action\",error:(0,_o.errorToPOJO)(new Ao.NoAckError(e.action))}):\"payload\"in e?e.payload.success?n.call(null,e):i(e.payload):\"string\"==typeof e.reason?i(e):(console.warn(\"Received invalid response from core\",e),i({reason:\"invalid response shape\"})),this.wireListeners.delete(t)}}else this.uncorrelatedListener&&this.uncorrelatedListener.call(null,e),this.uncorrelatedListener=()=>{};return!0}}Io=no.Transport=Oo,go=new WeakMap,mo=new WeakMap;const So=(...e)=>({log:(...t)=>console.debug(`[${(new Date).toISOString()}]`,...(e=>e.map((e=>`[${e}]`)))(e),...t),getLogger:(...t)=>So(...e,...t)}),Ro=So(\"@openfin/core-web/client\");function Fo(e,t){if(!function(e){return\"string\"==typeof e}(e))throw new Error(`Property ${t} has invalid type. Expected string, got ${typeof e}.`)}const jo=\"web-broker-ports-ready\",ko=Ro.getLogger(\"get-web-interop-ports\");function Lo(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)}function To(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}\"function\"==typeof SuppressedError&&SuppressedError;const $o=e=>{var n,i,r;return r=class extends t.EventEmitter{constructor(t){super(),n.set(this,void 0),i.set(this,!1),this.connectSync=()=>{Lo(this,i,\"f\")||(e.addEventListener(\"message\",(e=>{e.data?.topic?.startsWith(\"wire-message\")&&e.data.message&&Lo(this,n,\"f\").call(this,{...JSON.parse(e.data.message),ports:e.ports})})),e.start())},this.connect=async()=>{this.connectSync()},this.send=t=>(e.postMessage({topic:\"wire-message\",message:JSON.stringify(t)}),Promise.resolve()),this.shutdown=async()=>{e.close()},To(this,n,t,\"f\")}getPort(){return e}},n=new WeakMap,i=new WeakMap,r};var Bo={},Go={};Object.defineProperty(Go,\"__esModule\",{value:!0}),Go.BaseEnvironment=void 0;const Wo=vr();Go.BaseEnvironment=class{async getViewWindowIdentity(e,t){const{identity:n}=await e.View.wrapSync(t).getCurrentWindow();return n}async getInteropInfo(e){const t=await e.Application.getCurrentSync().getInfo().catch((()=>null)),n=t?.initialOptions?.interopBrokerConfiguration??{};return{fdc3Version:t?(0,Wo.getDefaultViewFdc3VersionFromAppInfo)(t):void 0,...n,fdc3Info:{providerVersion:await e.System.getVersion(),provider:\"OpenFin\"}}}},Object.defineProperty(Bo,\"__esModule\",{value:!0});var Ho=Bo.BrowserEnvironment=void 0;const No=Go;class Do extends No.BaseEnvironment{constructor(){super(...arguments),this.type=\"other\",this.getRandomId=()=>{const e=new Uint32Array(1);return window.crypto.getRandomValues(e)[0].toString(32)}}getAdapterVersionSync(){return\"\"}observeBounds(e,t){throw new Error(\"Method not implemented.\")}layoutAllowedInContext(e){return!1}initLayoutManager(e,t,n){throw new Error(\"Method not implemented.\")}applyLayoutSnapshot(e,t,n){throw new Error(\"Method not implemented.\")}createLayout(e,t){throw new Error(\"Method not implemented.\")}destroyLayout(e,t){throw new Error(\"Method not implemented.\")}resolveLayout(e,t){throw new Error(\"Method not implemented.\")}initPlatform(...e){throw new Error(\"Method not implemented.\")}writeToken(e,t){return Promise.resolve(\"\")}retrievePort(e){throw new Error(\"Method not implemented.\")}getNextMessageId(){return this.getRandomId()}createChildContent(e){throw new Error(\"Method not implemented.\")}getWebWindow(e){throw new Error(\"Method not implemented.\")}getCurrentEntityIdentity(){throw new Error(\"Method not implemented.\")}getCurrentEntityType(){return\"external connection\"}raiseEvent(e,t){throw new Error(\"Method not implemented.\")}getUrl(){return location.href}getDefaultChannelOptions(){return{create:{},connect:{}}}getRtcPeer(){return new RTCPeerConnection}getWsConstructor(){return WebSocket}whenReady(){return Promise.resolve()}}Ho=Bo.BrowserEnvironment=Do;const Uo=e=>\"platform\"in e&&void 0!==e.platform;var Vo,zo;class Ko extends Ho{constructor(e){super(),this.connectConfig=e,Vo.set(this,void 0),zo.set(this,new W((async()=>Promise.resolve().then((function(){return require(\"./main-b14f67c9.js\")}))))),Uo(e)&&this.validatePlatformOptions(e)}getAdapterVersionSync(){return\"0.39.21\"}validatePlatformOptions({platform:e}){if(!(\"layoutSnapshot\"in e))throw new Error(\"Platform options are missing layoutSnapshot. Please provide a layoutSnapshot in the platform options.\");if(\"windows\"in e||\"windows\"in e.layoutSnapshot)throw new Error(\"It appears you tried to call connect() with a snapshot object from an OpenFin desktop environment. Note that connect() expects to be called with a platform property with this structure: { platform: { layoutSnapshot } }. To get a layoutSnapshot of the expected structure, use fin.Platform.Layout.getCurrentLayoutManagerSync().getLayoutSnapshot() in v34+ in your desktop environment.\");const{layouts:t}=e.layoutSnapshot;Object.entries(t).map((([e,t])=>{if(\"object\"!=typeof t||null===t)throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must be an object.`);if(!(\"content\"in t))throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must contain a 'content' property.`)}))}async getInteropInfo(e){return{...{contextGroups:void 0,logging:{beforeAction:{enabled:!1},afterAction:{enabled:!1}}},fdc3Version:void 0,fdc3Info:{providerVersion:\"0.39.21\",provider:\"OpenFin Web\"}}}layoutAllowedInContext(e){return!0}async initLayoutManager(e,t,n){if(Lo(this,Vo,\"f\"))throw new Error(\"Layout already initialized.\");if(!Uo(this.connectConfig))throw new Error(\"Platform options are missing from connection config.\");const{WebLayoutEntryPoint:i}=await Lo(this,zo,\"f\").getValue();return To(this,Vo,new i(this.connectConfig),\"f\"),await Lo(this,Vo,\"f\").initLayoutManager(e,t,n)}async applyLayoutSnapshot(e,t,n){Lo(this,Vo,\"f\")?.applyLayoutSnapshot(e,t,n)}async createLayout(e,t){return Lo(this,Vo,\"f\")?.createLayout(e,t)}async destroyLayout(e,t){return Lo(this,Vo,\"f\")?.destroyLayout(e,t)}async getViewWindowIdentity(e,t){return Promise.resolve({uuid:t.uuid,name:t.uuid})}}Vo=new WeakMap,zo=new WeakMap;const qo=()=>{const e=((e,t)=>{const n=new RegExp(`^${t}<(?.*)>$`).exec(e)?.groups?.meta;if(n)try{return JSON.parse(atob(n))}catch(e){throw new Error(`Failed to decode JSON from ${n}.`)}})(window.name,\"of-frame\");if(e)try{const{name:t,uuid:n,brokerUrl:i,providerId:r,contextGroup:o}=e;return Fo(i,\"brokerUrl\"),Fo(n,\"uuid\"),Fo(t,\"name\"),{identity:{name:t,uuid:n},brokerUrl:i,interopConfig:{providerId:r,currentContextGroup:o}}}catch(e){throw new Error(`Unexpected error occurred when inferring platform information: ${e.stack}`)}},Jo=()=>{const e=r.v4();return{uuid:e,name:e}},Yo=async e=>{if(\"enabled\"===e.connectionInheritance){const t=await(async e=>{const t=qo();if(t){const{validateOptions:n=(()=>!0)}=e,{identity:i,...r}=t;if(!await n(r))throw new Error(\"Parent options were rejected by validateOptions.\");return t}})(e);if(t)return t}if(!e.options){const t=\"enabled\"===e.connectionInheritance?\"Broker URL was not specified nor provided by a platform container.\":\"Connection inheritance is disabled but no options were provided.\";throw new Error(t)}return{...e.options,identity:Jo()}};exports.__classPrivateFieldGet=Lo,exports.__classPrivateFieldSet=To,exports.apiExposer=Gn,exports.commonjsGlobal=s,exports.connect=async t=>{try{Ro.log(\"Establishing connection\",t);const{brokerUrl:n,identity:i,timeout:r,interopConfig:s}=await Yo(t),{workerPort:a,iframeBrokerPort:c}=await(async(e,t,n)=>{const{origin:i}=new URL(e),r=document.createElement(\"IFRAME\");let s;r.style.display=\"none\";try{return await new Promise(((a,c)=>{const d=e=>{if(e.source===r.contentWindow&&e.data?.topic===`ack-${jo}`){if(e.origin!==i)c(new Error(`Broker redirected to unexpected origin ${e.origin}, expected ${i}.`));else if(e.data.success){const[t,n]=e.ports;a({iframeBrokerPort:t,workerPort:n})}else c(new m(e.data));window.removeEventListener(\"message\",d),clearTimeout(s)}};window.addEventListener(\"message\",d),ko.log(`Connecting to broker ${e}`),r.setAttribute(\"src\",e),r.setAttribute(\"name\",o(t,\"of-broker\")),document.body.appendChild(r),ko.log(\"Iframe loaded, awaiting init message from iframe\"),n&&(s=setTimeout((()=>{window.removeEventListener(\"message\",d),document.body.removeChild(r),c(new Error(\"Worker did not initialize in time\"))}),n))}))}catch(e){throw new Error(`Failed to initialise Fin Web Client. ${e.message}`,{cause:e})}})(n,i,r);Ro.log(\"Successfully established connection to shared worker\");const d={entityType:\"external connection\",...i};a.start(),c.start();const h=((t,n,i)=>{const r=$o(n),o=new Ko(t),s=new Io(r,o,i);return s.connectSync(),window.Buffer=e.Buffer,new Wr(s)})(t,a,d);return s?.providerId&&(h.me.interop=h.Interop.connectSync(s.providerId),s?.currentContextGroup&&h.me.interop.joinContextGroup(s.currentContextGroup).catch((e=>{console.warn(`Error joining specified context group: ${s?.currentContextGroup}, continuing`,e)}))),{...h,me:{...h.me,identity:{uuid:h.me.uuid,name:h.me.name}}}}catch(e){throw new Error(`An error occured during web-interop connection: ${e.message}`)}},exports.decorators=Nn,exports.encodeOptions=o,exports.layout_constants=ai,exports.lazy=G;\n","\"use strict\";var t=require(\"./main-8cad4070.js\"),e=require(\"uuid\");require(\"buffer/\"),require(\"events\"),require(\"lodash/cloneDeep\"),require(\"lodash/isEqual\");var i={},n={};Object.defineProperty(n,\"__esModule\",{value:!0}),n.mapValuesAsync=n.mapEntriesAsync=void 0;const o=(t,[e,i])=>({...t,[e]:i});async function s(t,e){return(await Promise.all(e.map((async([e,i])=>[e,await t(i,e)])))).reduce(o,{})}n.mapEntriesAsync=s,n.mapValuesAsync=async function(t,e){let i;return i=e instanceof Map?[...e.entries()]:Object.entries(e),s(t,i)};var r,a,l,h,d=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldSet||function(t,e,i,n,o){if(\"m\"===n)throw new TypeError(\"Private method is not writable\");if(\"a\"===n&&!o)throw new TypeError(\"Private accessor was defined without a setter\");if(\"function\"==typeof e?t!==e||!o:!e.has(t))throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");return\"a\"===n?o.call(t,i):o?o.value=i:e.set(t,i),i},c=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldGet||function(t,e,i,n){if(\"a\"===i&&!n)throw new TypeError(\"Private accessor was defined without a getter\");if(\"function\"==typeof e?t!==e||!n:!e.has(t))throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");return\"m\"===i?n:\"a\"===i?n.call(t):n?n.value:e.get(t)};Object.defineProperty(i,\"__esModule\",{value:!0});var m=i.DefaultLayoutManager=void 0;const u=n;class p{constructor(t){a.set(this,void 0),l.set(this,new Map),d(this,a,t,\"f\")}size(){return c(this,l,\"f\").size}async applyLayoutSnapshot({layouts:t}){if(Object.keys(t).length>1)throw new Error(\"[LayoutManager] Tried to call applyLayoutSnapshot with more than 1 layout. When implementing multiple layouts via overridden LayoutManager class, you must override and fully implement the applyLayoutSnapshot method without calling super.applyLayoutSnapshot().\");const[[e,i]]=Object.entries(t);await p.createLayout(this,{layoutName:e,layout:i})}async showLayout({layoutName:t}){}async getLayoutSnapshot(){return{layouts:await(0,u.mapValuesAsync)((t=>t.getFrameSnapshot()),c(this,l,\"f\"))}}async removeLayout({layoutName:t}){}getLayoutIdentityForView(t){const e=[...c(this,l,\"f\").values()].find((e=>e.getCurrentViews().some((e=>e.name===t.name&&e.uuid===t.uuid))));return e?.identity??void 0}isLayoutVisible({layoutName:t}){return c(p,r,\"m\",h).call(p,this,t).isVisible()}resolveLayoutIdentity(t){if(t&&\"layoutName\"in t)return t;const e=[...c(this,l,\"f\").values()];if(1===e.length)return e[0].identity;const i=e.find((t=>t.isVisible()));return i?.identity??void 0}static async resolveLayout(t,e){const i=t.resolveLayoutIdentity(e);if(void 0===i||!(\"layoutName\"in i))throw new Error(\"[layout-manager] resolveLayout: Could not resolve the layout identity. Make sure you include 'layoutName' in the identity object.\");return c(p,r,\"m\",h).call(p,t,i.layoutName)}static async handleSharedView(t,e,i){await(0,u.mapValuesAsync)((async t=>{if(t.identity.layoutName!==e.layoutName){const e=t.getCurrentViews().find((t=>t.name===i.name));e&&await t.onViewDetached({viewIdentity:e,target:null}).catch(console.error)}}),c(t,l,\"f\"))}static async handleLastViewRemoved(t,e){await t.removeLayout(e),await c(t,a,\"f\").handleLastViewRemoved(t)}static async destroyLayout(t,{layoutName:e}){await c(p,r,\"m\",h).call(p,t,e).destroy(),c(t,l,\"f\").delete(e)}static async createLayout(t,e){const{layoutName:i}=e;if(c(t,l,\"f\").has(i))throw new Error(`Layout name ${i} already exists`);await c(t,a,\"f\").createLayout(e,t)}static registerLayout(t,e,i){c(t,l,\"f\").set(e,i)}static getAllLayouts(t){return[...c(t,l,\"f\").values()]}static setInitialSnapshot(t,e){c(t,a,\"f\").setInitialSnapshot(e)}static createClosedConstructor(...t){return class extends p{constructor(){super(...t)}}}}m=i.DefaultLayoutManager=p,r=p,a=new WeakMap,l=new WeakMap,h=function(t,e){const i=c(t,l,\"f\").get(e);if(!i)throw new Error(`[layout-manager] getLayoutByName: Could not locate layout with name '${e}'`);return i};var g={},f={},v={};Object.defineProperty(v,\"__esModule\",{value:!0}),v.ReversibleMap=void 0;v.ReversibleMap=class{constructor(){this.valueToKey=new Map,this.keyToValue=new Map,this.setUnique=(t,e)=>{if(this.hasKey(t)||this.hasValue(e))throw new Error(\"Key or value already in the map.\");this.keyToValue.set(t,e),this.valueToKey.set(e,t)},this.getKey=t=>{const e=this.valueToKey.get(t);if(!e)throw new Error(\"Value not found in the map.\");return e},this.deleteKey=t=>{const e=this.getValue(t);return this.keyToValue.delete(t),this.valueToKey.delete(e),e},this.deleteValue=t=>{const e=this.getKey(t);return this.keyToValue.delete(e),this.valueToKey.delete(t),e},this.hasKey=t=>this.keyToValue.has(t),this.hasValue=t=>this.valueToKey.has(t)}getValue(t){const e=this.keyToValue.get(t);if(!e)throw new Error(\"Key not found in the map.\");return e}},Object.defineProperty(f,\"__esModule\",{value:!0});var _=f.LayoutContentCache=void 0;const y=t.lazy,C=v;class w{constructor(){this.contentItemCache=new C.ReversibleMap,this.contentItemCacheId=0,this.createCacheKey=()=>{const t=`entity-${this.contentItemCacheId.toString()}`;return this.contentItemCacheId+=1,t},this.hasKey=t=>this.contentItemCache.hasKey(t),this.getItemOrUndefined=t=>{try{return this.getContentItemOrThrow(t)}catch(t){return}},this.getContentItemOrThrow=(t,e)=>{if(!this.contentItemCache.hasKey(t))throw new Error(\"Layout component has been destroyed or detached from the current layout.\");const i=this.contentItemCache.getValue(t);if(e&&!e.includes(i.type))throw new Error(`Layout item is not the expected type. Expected ${e.join(\", \")}, got ${i.type}.`);return i},this.getOrCreateEntityId=t=>{if(this.contentItemCache.hasValue(t))return this.contentItemCache.getKey(t);t.onDestroyed((()=>{this.contentItemCache.deleteValue(t)}));const e=this.createCacheKey();return this.contentItemCache.setUnique(e,t),e}}static getSingleInstance(){return w.singleton.getValue()}}_=f.LayoutContentCache=w,w.singleton=new y.Lazy((()=>new w));var I={},b={};!function(t){Object.defineProperty(t,\"__esModule\",{value:!0}),t.getAdjacentStacks=t.doShareEdge=t.getAdjacentItem=void 0;t.getAdjacentItem=(e,i)=>{const{parent:n}=e;if(e.isRoot()||!n)return;const o=[\"top\",\"bottom\"].includes(i)?\"column\":\"row\",s=[\"top\",\"left\"].includes(i)?-1:1;if(n.type===o){const t=n.contentItems.indexOf(e)+s;if(t>=0&&t{const n=t.getBounds(),o=e.getBounds();if(!n||!o)return!1;if([\"top\",\"bottom\"].includes(i)){return!(n.righto.right)}return!(n.bottomo.bottom)};t.getAdjacentStacks=(e,i)=>{const n=[\"top\",\"bottom\"].includes(i)?\"row\":\"column\",o=s=>\"stack\"===s.type?(0,t.doShareEdge)(e,s,i)?[s]:[]:\"root\"===s.type||\"ground\"===s.type?[]:s.type===n?s.contentItems.map((t=>o(t))).flat():s.type!==n?[\"top\",\"right\"].includes(i)?o(s.contentItems[s.contentItems.length-1]):o(s.contentItems[0]):[],s=(0,t.getAdjacentItem)(e,i);return s?o(s):[]}}(b);var S=t.commonjsGlobal&&t.commonjsGlobal.__decorate||function(t,e,i,n){var o,s=arguments.length,r=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if(\"object\"==typeof Reflect&&\"function\"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(s<3?o(r):s>3?o(e,i,r):o(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};Object.defineProperty(I,\"__esModule\",{value:!0}),I.LayoutEntitiesController=void 0;const E=t.decorators,x=b,L=i;class z{constructor(t,e,i){this.wire=t,this.layoutManager=e,this.layoutContentCache=i,this.analytics=t=>{this.wire.sendAction(`layout-controller-${t}`).catch((()=>{}))},this.getLayoutIdentityForViewOrThrow=async t=>{const e=this.layoutManager.getLayoutIdentityForView(t);if(!e)throw new Error(`View identity ${t.name} is not attached to any layouts.`);return e},this.getRoot=async t=>{this.analytics(\"get-root\");const e=(await this.getLayout(t)).getRoot();return{type:e.type,entityId:this.layoutContentCache.getOrCreateEntityId(e)}},this.getStackByView=async t=>{this.analytics(\"get-stack-by-view\");const e=await this.getLayoutIdentityForViewOrThrow(t),i=(await this.getLayout(e)).getStackByView(t);if(\"stack\"===i?.type)return{entityId:this.layoutContentCache.getOrCreateEntityId(i),type:\"stack\"}},this.getStackViews=t=>{this.analytics(\"get-stack-views\");return this.layoutContentCache.getContentItemOrThrow(t,[\"stack\"]).contentItems.map((t=>({name:t.viewName,uuid:this.wire.me.uuid})))},this.isRoot=t=>{this.analytics(\"is-root\");return this.layoutContentCache.getContentItemOrThrow(t).isRoot()},this.exists=t=>(this.analytics(\"exists\"),this.layoutContentCache.hasKey(t)),this.addViewToStack=async(t,e,{index:i}={index:0})=>{this.analytics(\"add-view-to-stack\");const n=this.layoutContentCache.getContentItemOrThrow(t);if(i&&i>n.contentItems.length+1)throw new Error(`Index '${i}' out of range, please exclude the index or specify a number between 0 and ${n.contentItems.length}`);const o={id:t,index:i},{identity:s}=await n.layout.platformCreateView(e,{location:o});return s},this.findViewInStack=(t,e)=>t.contentItems.find((t=>t.viewName===e.name)),this.removeViewFromStack=async(t,e)=>{this.analytics(\"remove-view-from-stack\");const i=this.layoutContentCache.getContentItemOrThrow(t,[\"stack\"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to remove a view ('${e.name}') which does not belong to the stack.`);await n.layout.platformCloseView(e)},this.createAdjacentStack=async(t,e,{position:i=\"right\"}={})=>{if(this.analytics(\"create-adjacent-stack\"),!Array.isArray(e)||0===e.length)throw new Error('The parameter \"views\" must be an array with at least 1 element.');if(![\"top\",\"bottom\",\"left\",\"right\"].includes(i))throw new Error(`Invalid position '${i}' specified.`);const n=this.layoutContentCache.getContentItemOrThrow(t).createAdjacentStack({position:i}),o=this.layoutContentCache.getOrCreateEntityId(n);return await Promise.all(e.reverse().map((t=>this.addViewToStack(o,t)))),o},this.getAdjacentStacks=async({targetId:t,edge:e})=>{this.analytics(\"get-adjacent-stacks\");const i=this.layoutContentCache.getContentItemOrThrow(t);return(0,x.getAdjacentStacks)(i,e).map((t=>({entityId:this.layoutContentCache.getOrCreateEntityId(t)})))},this.setStackActiveView=async(t,e)=>{this.analytics(\"set-stack-active-view\");const i=this.layoutContentCache.getContentItemOrThrow(t,[\"stack\"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to set a view ('${e.name}') as active when it does not belong to the stack.`);i.setActiveContentItem(n,!0)}}async getLayout(t){const e=await L.DefaultLayoutManager.resolveLayout(this.layoutManager,t);if(!e)throw new Error(`Could not resolve target layout identity ${JSON.stringify(t)}`);return e}getContent(t){this.analytics(\"get-content\");return this.layoutContentCache.getContentItemOrThrow(t,[\"column\",\"row\"]).contentItems.map((t=>({type:t.type,entityId:this.layoutContentCache.getOrCreateEntityId(t)})))}getParent(t){this.analytics(\"get-parent\");const e=this.layoutContentCache.getContentItemOrThrow(t);if(!e.isRoot())return e.parent?.contentItems.includes(e)?{type:e.parent.type,entityId:this.layoutContentCache.getOrCreateEntityId(e.parent)}:void 0}}S([(0,E.expose)()],z.prototype,\"getLayoutIdentityForViewOrThrow\",void 0),S([(0,E.expose)()],z.prototype,\"getRoot\",void 0),S([(0,E.expose)()],z.prototype,\"getStackByView\",void 0),S([(0,E.expose)()],z.prototype,\"getStackViews\",void 0),S([(0,E.expose)()],z.prototype,\"getContent\",null),S([(0,E.expose)()],z.prototype,\"getParent\",null),S([(0,E.expose)()],z.prototype,\"isRoot\",void 0),S([(0,E.expose)()],z.prototype,\"exists\",void 0),S([(0,E.expose)()],z.prototype,\"addViewToStack\",void 0),S([(0,E.expose)()],z.prototype,\"removeViewFromStack\",void 0),S([(0,E.expose)()],z.prototype,\"createAdjacentStack\",void 0),S([(0,E.expose)()],z.prototype,\"getAdjacentStacks\",void 0),S([(0,E.expose)()],z.prototype,\"setStackActiveView\",void 0),I.LayoutEntitiesController=z,Object.defineProperty(g,\"__esModule\",{value:!0});var M=g.initLayoutEndpoints=void 0;const P=t.apiExposer,T=t.layout_constants,A=f,k=I,D=i;M=g.initLayoutEndpoints=async function(t,e){const i=t.getFin(),n=await i.Platform.getCurrentSync().getClient(),o=new P.ChannelsExposer(n);await new P.ApiExposer(o).exposeInstance(new k.LayoutEntitiesController(t,e,A.LayoutContentCache.getSingleInstance()),{id:T.LAYOUT_CONTROLLER_ID}),await async function(t,e){const i=t=>async i=>{const n=await D.DefaultLayoutManager.resolveLayout(e,i.target);if(!n)throw new Error(`Could not resolve the layout target from payload ${JSON.stringify(i)}`);return t(n,i)},n=(e,n)=>{t.register(e,i(n))},o=(t,e)=>{n(t,e)};n(\"replace-view\",((t,e)=>t.replaceView(e))),n(\"replace-layout\",((t,{layout:e})=>t.replaceLayout(e))),n(\"add-view\",((t,e)=>t.insertView(e))),o(\"layout-add-view\",((t,{viewOptions:e,location:i,targetView:n})=>t.platformCreateView(e,{location:i,targetView:n}))),n(\"close-view\",((t,e)=>t.cleanupView(e.viewIdentity))),o(\"layout-close-view\",((t,e)=>t.platformCloseView(e.viewIdentity))),n(\"apply-preset-layout\",((t,e)=>t.applyPreset(e))),n(\"get-layout-views\",(t=>t.getCurrentViews())),n(\"get-frame-snapshot\",(t=>t.getFrameSnapshot())),n(\"is-visible\",(t=>t.isVisible())),n(\"destroy\",(t=>t.destroy())),t.register(\"get-layout-snapshot\",(()=>e.getLayoutSnapshot()))}(n,e)};var R={};Object.defineProperty(R,\"__esModule\",{value:!0});var U=R.BaseLayout=void 0;U=R.BaseLayout=class{};var O={};Object.defineProperty(O,\"__esModule\",{value:!0});var V=O.DOMEmitter=void 0;V=O.DOMEmitter=class{constructor(t){this.container=t}dispatchLocalEvent(t,e){const i={...e,type:t,tabSelector:`tab-${e.name}`,containerSelector:`container-${e.name}`,topic:\"openfin-DOM-event\"};this.container.dispatchEvent(new CustomEvent(t,{detail:i}))}};var B={};Object.defineProperty(B,\"__esModule\",{value:!0});var H=B.mapLayoutContentItemsImmutableSync=B.mapLayoutContentItemsImmutable=W=B.isVisible=void 0;var W=B.isVisible=t=>(0!==t.offsetWidth||0!==t.offsetHeight)&&\"hidden\"!==window.getComputedStyle(t).visibility&&t.offsetTop>=0&&t.offsetLeft>=0&&t.offsetTop<=window.innerHeight&&t.offsetLeft<=window.innerWidth;const F=t=>\"type\"in t&&\"component\"===t.type;B.mapLayoutContentItemsImmutable=async function t(e,i){return F(i)?e(i):{...i,content:await Promise.all(i.content?.map((i=>t(e,i))))}},H=B.mapLayoutContentItemsImmutableSync=function t(e,i){return F(i)?e(i):{...i,content:i.content?.map((i=>t(e,i)))}};class N extends Error{constructor(t,e){super(e),this.type=t}}class G extends N{constructor(t,e){super(\"Configuration\",t),this.node=e}}class j extends N{constructor(t){super(\"PopoutBlocked\",t)}}class $ extends N{constructor(t){super(\"API\",t)}}class Z extends N{constructor(t){super(\"Bind\",t)}}class q extends Error{constructor(t,e,i){super(`${t}: ${e}${void 0===i?\"\":\": \"+i}`)}}class X extends q{constructor(t,e){super(\"Assert\",t,e)}}class Y extends q{constructor(t,e,i){super(\"UnreachableCase\",t,`${e}${void 0===i?\"\":\": \"+i}`)}}class K extends q{constructor(t,e){super(\"UnexpectedNull\",t,e)}}class J extends q{constructor(t,e){super(\"UnexpectedUndefined\",t,e)}}var Q;!function(t){let e=!1;const i={PopoutCannotBeCreatedWithGroundItemConfig:{id:0,default:\"Popout cannot be created with ground ItemConfig\"},PleaseRegisterAConstructorFunction:{id:1,default:\"Please register a constructor function\"},ComponentTypeNotRegisteredAndBindComponentEventHandlerNotAssigned:{id:2,default:\"Component type not registered and BindComponentEvent handler not assigned\"},ComponentIsAlreadyRegistered:{id:3,default:\"Component is already registered\"},ComponentIsNotVirtuable:{id:4,default:\"Component is not virtuable. Requires rootHtmlElement field/getter\"},VirtualComponentDoesNotHaveRootHtmlElement:{id:5,default:'Virtual component does not have getter \"rootHtmlElement\"'},ItemConfigIsNotTypeComponent:{id:6,default:\"ItemConfig is not of type component\"},InvalidNumberPartInSizeString:{id:7,default:\"Invalid number part in size string\"},UnknownUnitInSizeString:{id:8,default:\"Unknown unit in size string\"},UnsupportedUnitInSizeString:{id:9,default:\"Unsupported unit in size string\"}};t.idCount=Object.keys(i).length;const n=Object.values(i);t.checkInitialise=function(){if(!e)for(let e=0;e=\"0\"&&t<=\"9\"}function Tt(t,e){const i=zt(e);t.style.width=i}function At(t,e){const i=zt(e);t.style.height=i}function kt(t){return{width:t.offsetWidth,height:t.offsetHeight}}function Dt(t,e){t.style.display=e?\"\":\"none\"}function Rt(t,e){if(void 0!==e)for(const i in e)if(e.hasOwnProperty(i)){const n=e[i],o=t[i];t[i]=Ut(o,n)}return t}function Ut(t,e){if(\"object\"!=typeof e)return e;if(Array.isArray(e)){const t=e.length,i=new Array(t);for(let n=0;n36)throw new Error(\"Too many keys in config minifier map\")},t.translateObject=n}(dt||(dt={})),function(t){t.defaults={type:at.ground,content:[],size:1,sizeUnit:ht.Fractional,minSize:void 0,minSizeUnit:ht.Pixel,id:\"\",isClosable:!0},t.createCopy=function(t,e){switch(t.type){case at.ground:case at.row:case at.column:return gt.createCopy(t,e);case at.stack:return ut.createCopy(t,e);case at.component:return pt.createCopy(t);default:throw new Y(\"CICC91354\",t.type,\"Invalid Config Item type specified\")}},t.createDefault=function(t){switch(t){case at.ground:throw new X(\"CICCDR91562\");case at.row:case at.column:return gt.createDefault(t);case at.stack:return ut.createDefault();case at.component:return pt.createDefault();default:throw new Y(\"CICCDD91563\",t,\"Invalid Config Item type specified\")}},t.isComponentItem=function(t){return t.type===at.component},t.isStackItem=function(t){return t.type===at.stack},t.isGroundItem=function(t){return t.type===at.ground}}(ct||(ct={})),function(t){t.defaultMaximised=!1,function(t){t.createCopy=function(t,e){return void 0===t?void 0:{show:null!=e?e:t.show,popout:t.popout,close:t.close,maximise:t.maximise,minimise:t.minimise,tabDropdown:t.tabDropdown}}}(t.Header||(t.Header={}))}(mt||(mt={})),function(t){function e(t){const e=t.length,i=new Array(e);for(let n=0;n\"__glMaximised\"===t));t>0&&(o=!0,n=n.splice(t,1)),e=n.length>0?n[0]:ct.defaults.id}else e=n;return i=void 0!==t.maximised?t.maximised:o,{id:e,maximised:i}}}(wt||(wt={})),function(t){function e(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0;return{resolved:!0,root:Et.resolve(i),openPopouts:t.resolveOpenPopouts(e.openPopouts),dimensions:t.Dimensions.resolve(e.dimensions),settings:t.Settings.resolve(e.settings),header:t.Header.resolve(e.header,e.settings,e.labels)}}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:Lt.fromResolvedArray(e.openPopouts),settings:_t.Settings.createCopy(e.settings),dimensions:t.Dimensions.fromResolved(e.dimensions),header:_t.Header.createCopy(e.header)}},t.isResolved=function(t){const e=t;return void 0!==e.resolved&&!0===e.resolved},t.resolveOpenPopouts=function(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0,{root:Et.resolve(o),openPopouts:xt.resolveOpenPopouts(e.openPopouts),dimensions:xt.Dimensions.resolve(e.dimensions),settings:xt.Settings.resolve(e.settings),header:xt.Header.resolve(e.header,e.settings,e.labels),parentId:null!==(i=e.parentId)&&void 0!==i?i:null,indexInParent:null!==(n=e.indexInParent)&&void 0!==n?n:null,window:t.Window.resolve(e.window,e.dimensions),resolved:!0}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:i(e.openPopouts),dimensions:xt.Dimensions.fromResolved(e.dimensions),settings:_t.Settings.createCopy(e.settings),header:_t.Header.createCopy(e.header),parentId:e.parentId,indexInParent:e.indexInParent,window:t.Window.fromResolved(e.window)}},t.fromResolvedArray=i}(Lt||(Lt={}));class Wt{constructor(){this._allEventSubscriptions=[],this._subscriptionsMap=new Map,this.unbind=this.removeEventListener,this.trigger=this.emit}tryBubbleEvent(t,e){}emit(t,...e){let i=this._subscriptionsMap.get(t);if(void 0!==i){i=i.slice();for(let t=0;t0){const n=e.slice();n.unshift(t);const o=this._allEventSubscriptions.slice();for(let t=0;t0?n.contentItems[0]:n,e=0);const o=this._layoutManager.createAndInitContentItem(i,t);t.addChild(o,e),this._layoutManager.layoutConfig.settings.popInOnClose?this._onClose():this.close()}createWindow(){const t=this.createUrl(),e=Math.floor(1e6*Math.random()).toString(36),i=this.serializeWindowFeatures({width:this._initialWindowSize.width,height:this._initialWindowSize.height,innerWidth:this._initialWindowSize.width,innerHeight:this._initialWindowSize.height,menubar:\"no\",toolbar:\"no\",location:\"no\",personalbar:\"no\",resizable:\"yes\",scrollbars:\"no\",status:\"no\"});if(this._popoutWindow=globalThis.open(t,e,i),this._popoutWindow)this._popoutWindow.addEventListener(\"load\",(()=>this.positionWindow()),{passive:!0}),this._popoutWindow.addEventListener(\"beforeunload\",(()=>{this._layoutManager.layoutConfig.settings.popInOnClose?this.popIn():this._onClose()}),{passive:!0}),this._checkReadyInterval=setInterval((()=>this.checkReady()),10);else if(!0===this._layoutManager.layoutConfig.settings.blockedPopoutsThrowError){throw new j(\"Popout blocked\")}}checkReady(){if(null===this._popoutWindow)throw new K(\"BPCR01844\");this._popoutWindow.__glInstance&&this._popoutWindow.__glInstance.isInitialised&&(this.onInitialised(),void 0!==this._checkReadyInterval&&(clearInterval(this._checkReadyInterval),this._checkReadyInterval=void 0))}serializeWindowFeatures(t){const e=[];for(const i in t)e.push(i+\"=\"+t[i].toString());return e.join(\",\")}createUrl(){const t=\"gl-window-config-\"+Ot(),e=_t.minifyConfig(this._config);try{localStorage.setItem(t,JSON.stringify(e))}catch(t){throw new Error(\"Error while writing to localStorage \"+function(t){return t instanceof Error?t.message:\"string\"==typeof t?t:\"Unknown Error\"}(t))}const i=new URL(location.href);return i.searchParams.set(\"gl-window\",t),i.toString()}positionWindow(){if(null===this._popoutWindow)throw new Error(\"BrowserPopout.positionWindow: null popoutWindow\");this._popoutWindow.moveTo(this._initialWindowSize.left,this._initialWindowSize.top),this._popoutWindow.focus()}onInitialised(){this._isInitialised=!0,this.getGlInstance().on(\"popIn\",(()=>this.popIn())),this.emit(\"initialised\")}_onClose(){setTimeout((()=>this.emit(\"closed\")),50)}}class Gt extends Wt{constructor(t,e,i,n){super(),this.layoutManager=t,this._parent=i,this._element=n,this._popInParentIds=[],this._type=e.type,this._id=e.id,this._isInitialised=!1,this.isGround=!1,this.isRow=!1,this.isColumn=!1,this.isStack=!1,this.isComponent=!1,this.size=e.size,this.sizeUnit=e.sizeUnit,this.minSize=e.minSize,this.minSizeUnit=e.minSizeUnit,this._isClosable=e.isClosable,this._pendingEventPropagations={},this._throttledEvents=[\"stateChanged\"],this._contentItems=this.createContentItems(e.content)}get type(){return this._type}get id(){return this._id}set id(t){this._id=t}get popInParentIds(){return this._popInParentIds}get parent(){return this._parent}get contentItems(){return this._contentItems}get isClosable(){return this._isClosable}get element(){return this._element}get isInitialised(){return this._isInitialised}static isStack(t){return t.isStack}static isComponentItem(t){return t.isComponent}static isComponentParentableItem(t){return t.isStack||t.isGround}removeChild(t,e=!1){const i=this._contentItems.indexOf(t);if(-1===i)throw new Error(\"Can't remove child item. Unknown content item\");if(e||this._contentItems[i].destroy(),this._contentItems.splice(i,1),this._contentItems.length>0)this.updateSize(!1);else if(!this.isGround&&!0===this._isClosable){if(null===this._parent)throw new K(\"CIUC00874\");this._parent.removeChild(this)}}addChild(t,e,i){return null!=e||(e=this._contentItems.length),this._contentItems.splice(e,0,t),t.setParent(this),!0===this._isInitialised&&!1===t._isInitialised&&t.init(),e}replaceChild(t,e,i=!1){const n=this._contentItems.indexOf(t),o=t._element.parentNode;if(-1===n)throw new X(\"CIRCI23232\",\"Can't replace child. oldChild is not child of this\");if(null===o)throw new K(\"CIRCP23232\");if(o.replaceChild(e._element,t._element),!0===i&&(t._parent=null,t.destroy()),this._contentItems[n]=e,e.setParent(this),e.size=t.size,e.sizeUnit=t.sizeUnit,e.minSize=t.minSize,e.minSizeUnit=t.minSizeUnit,null===e._parent)throw new K(\"CIRCNC45699\");!0===e._parent._isInitialised&&!1===e._isInitialised&&e.init(),this.updateSize(!1)}remove(){if(null===this._parent)throw new K(\"CIR11110\");this._parent.removeChild(this)}popout(){const t=Ot(),e=this.layoutManager.createPopoutFromContentItem(this,void 0,t,void 0);return this.emitBaseBubblingEvent(\"stateChanged\"),e}calculateConfigContent(){const t=this._contentItems,e=t.length,i=new Array(e);for(let n=0;nthis.propagateEventToLayoutManager(t,e))))}propagateEventToLayoutManager(t,e){this._pendingEventPropagations[t]=!1,this.layoutManager.emitUnknown(t,e)}}class jt extends Gt{constructor(t,e,i){super(t,e,i,document.createElement(\"div\")),this._parentItem=i,this._focused=!1,this.isComponent=!0,this._reorderEnabled=e.reorderEnabled,this.applyUpdatableConfig(e),this._initialWantMaximise=e.maximised;const n=document.createElement(\"div\");n.classList.add(\"lm_content\"),this.element.appendChild(n),this._container=new Ft(e,this,t,n,(t=>this.handleUpdateItemConfigEvent(t)),(()=>this.show()),(()=>this.hide()),(t=>this.focus(t)),(t=>this.blur(t)))}get componentName(){return this._container.componentType}get componentType(){return this._container.componentType}get reorderEnabled(){return this._reorderEnabled}get initialWantMaximise(){return this._initialWantMaximise}get component(){return this._container.component}get container(){return this._container}get parentItem(){return this._parentItem}get headerConfig(){return this._headerConfig}get title(){return this._title}get tab(){return this._tab}get focused(){return this._focused}destroy(){this._container.destroy(),super.destroy()}applyUpdatableConfig(t){this.setTitle(t.title),this._headerConfig=t.header}toConfig(){const t=this._container.stateRequestEvent,e=void 0===t?this._container.state:t();return{type:at.component,content:[],size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,maximised:!1,isClosable:this.isClosable,reorderEnabled:this._reorderEnabled,title:this._title,header:mt.Header.createCopy(this._headerConfig),componentType:pt.copyComponentType(this.componentType),componentState:e}}close(){if(null===this.parent)throw new K(\"CIC68883\");this.parent.removeChild(this,!1)}enterDragMode(t,e){Tt(this.element,t),At(this.element,e),this._container.enterDragMode(t,e)}exitDragMode(){this._container.exitDragMode()}enterStackMaximised(){this._container.enterStackMaximised()}exitStackMaximised(){this._container.exitStackMaximised()}drag(){this._container.drag()}updateSize(t){this.updateNodeSize(t)}init(){this.updateNodeSize(!1),super.init(),this._container.emit(\"open\"),this.initContentItems()}setTitle(t){this._title=t,this.emit(\"titleChanged\",t),this.emit(\"stateChanged\")}setTab(t){this._tab=t,this.emit(\"tab\",t),this._container.setTab(t)}hide(){super.hide(),this._container.setVisibility(!1)}show(){super.show(),this._container.setVisibility(!0)}focus(t=!1){this.parentItem.setActiveComponentItem(this,!0,t)}setFocused(t){this._focused=!0,this.tab.setFocused(),t||this.emitBaseBubblingEvent(\"focus\")}blur(t=!1){this._focused&&this.layoutManager.setFocusedComponentItem(void 0,t)}setBlurred(t){this._focused=!1,this.tab.setBlurred(),t||this.emitBaseBubblingEvent(\"blur\")}setParent(t){this._parentItem=t,super.setParent(t)}handleUpdateItemConfigEvent(t){this.applyUpdatableConfig(t)}updateNodeSize(t){if(\"none\"!==this.element.style.display){const{width:e,height:i}=kt(this.element);this._container.setSizeToNodeSize(e,i,t)}}}class $t extends Gt{constructor(){super(...arguments),this._focused=!1}get focused(){return this._focused}setFocusedValue(t){this._focused=t}}class Zt extends Wt{constructor(t,e){super(),this._eElement=t,this._pointerTracking=!1,this._pointerDownEventListener=t=>this.onPointerDown(t),this._pointerMoveEventListener=t=>this.onPointerMove(t),this._pointerUpEventListener=t=>this.onPointerUp(t),this._timeout=void 0,this._allowableTargets=[t,...e],this._oDocument=document,this._eBody=document.body,this._nDelay=1800,this._nDistance=10,this._nX=0,this._nY=0,this._nOriginalX=0,this._nOriginalY=0,this._dragging=!1,this._eElement.addEventListener(\"pointerdown\",this._pointerDownEventListener,{passive:!0})}destroy(){this.checkRemovePointerTrackingEventListeners(),this._eElement.removeEventListener(\"pointerdown\",this._pointerDownEventListener)}cancelDrag(){this.processDragStop(void 0)}onPointerDown(t){if(this._allowableTargets.includes(t.target)&&t.isPrimary){const e=this.getPointerCoordinates(t);this.processPointerDown(e)}}processPointerDown(t){this._nOriginalX=t.x,this._nOriginalY=t.y,this._oDocument.addEventListener(\"pointermove\",this._pointerMoveEventListener),this._oDocument.addEventListener(\"pointerup\",this._pointerUpEventListener,{passive:!0}),this._pointerTracking=!0,this._timeout=setTimeout((()=>{try{this.startDrag()}catch(t){throw console.error(t),t}}),this._nDelay)}onPointerMove(t){this._pointerTracking&&(this.processDragMove(t),t.preventDefault())}processDragMove(t){this._nX=t.pageX-this._nOriginalX,this._nY=t.pageY-this._nOriginalY,!1===this._dragging&&(Math.abs(this._nX)>this._nDistance||Math.abs(this._nY)>this._nDistance)&&this.startDrag(),this._dragging&&this.emit(\"drag\",this._nX,this._nY,t)}onPointerUp(t){this.processDragStop(t)}processDragStop(t){var e;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this.checkRemovePointerTrackingEventListeners(),!0===this._dragging&&(this._eBody.classList.remove(\"lm_dragging\"),this._eElement.classList.remove(\"lm_dragging\"),null===(e=this._oDocument.querySelector(\"iframe\"))||void 0===e||e.style.setProperty(\"pointer-events\",\"\"),this._dragging=!1,this.emit(\"dragStop\",t))}checkRemovePointerTrackingEventListeners(){this._pointerTracking&&(this._oDocument.removeEventListener(\"pointermove\",this._pointerMoveEventListener),this._oDocument.removeEventListener(\"pointerup\",this._pointerUpEventListener),this._pointerTracking=!1)}startDrag(){var t;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this._dragging=!0,this._eBody.classList.add(\"lm_dragging\"),this._eElement.classList.add(\"lm_dragging\"),null===(t=this._oDocument.querySelector(\"iframe\"))||void 0===t||t.style.setProperty(\"pointer-events\",\"none\"),this.emit(\"dragStart\",this._nOriginalX,this._nOriginalY)}getPointerCoordinates(t){return{x:t.pageX,y:t.pageY}}}class qt{constructor(t,e,i){this._isVertical=t,this._size=e,this._grabSize=i0){const i=this.createSplitter(Math.max(0,e-1)).element;e>0?(this.contentItems[e-1].element.insertAdjacentElement(\"afterend\",i),i.insertAdjacentElement(\"afterend\",t.element)):(this.contentItems[0].element.insertAdjacentElement(\"beforebegin\",i),i.insertAdjacentElement(\"beforebegin\",t.element))}else this._childElementContainer.appendChild(t.element);super.addChild(t,e);const n=1/this.contentItems.length*100;if(!0===i)return this.emitBaseBubblingEvent(\"stateChanged\"),e;for(let e=0;e0&&(this.calculateRelativeSizes(),this.setAbsoluteSizes()),this.emitBaseBubblingEvent(\"stateChanged\"),this.emit(\"resize\")}setAbsoluteSizes(){const t=this.calculateAbsoluteSizes();for(let e=0;e0&&t.itemSizes[e]++,this._isColumn?(Tt(this.contentItems[e].element,t.crossAxisSize),At(this.contentItems[e].element,t.itemSizes[e])):(Tt(this.contentItems[e].element,t.itemSizes[e]),At(this.contentItems[e].element,t.crossAxisSize))}calculateAbsoluteSizes(){const t=(this.contentItems.length-1)*this._splitterSize,{width:e,height:i}=kt(this.element);let n,o;this._isColumn?(n=i-t,o=e):(n=e-t,o=i);let s=0;const r=[];for(let t=0;t0){const n=100-t;for(let t=0;t100&&e.length>0){for(let t=0;te)return;{const r=i/e;let a=i;for(let e=0;ethis.onSplitterDrag(e,t,i))),e.on(\"dragStop\",(()=>this.onSplitterDragStop(e))),e.on(\"dragStart\",(()=>this.onSplitterDragStart(e))),this._splitter.splice(t,0,e),e}getSplitItems(t){const e=this._splitter.indexOf(t);return{before:this.contentItems[e],after:this.contentItems[e+1]}}calculateContentItemMinSize(t){const e=t.minSize;if(void 0!==e){if(t.minSizeUnit===ht.Pixel)return e;throw new X(\"ROCGMD98831\",JSON.stringify(t))}{const t=this.layoutManager.layoutConfig.dimensions;return this._isColumn?t.defaultMinItemHeight:t.defaultMinItemWidth}}calculateContentItemsTotalMinSize(t){let e=0;for(const i of t)e+=this.calculateContentItemMinSize(i);return e}onSplitterDragStart(t){const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=this.calculateContentItemsTotalMinSize(e.before.contentItems),s=this.calculateContentItemsTotalMinSize(e.after.contentItems);this._splitterPosition=0,this._splitterMinPosition=-1*(i-o),this._splitterMaxPosition=n-s}onSplitterDrag(t,e,i){let n=this._isColumn?i:e;if(null===this._splitterMinPosition||null===this._splitterMaxPosition)throw new K(\"ROCOSD59226\");n=Math.max(n,this._splitterMinPosition),n=Math.min(n,this._splitterMaxPosition),this._splitterPosition=n;const o=zt(n);this._isColumn?t.element.style.top=o:t.element.style.left=o}onSplitterDragStop(t){if(null===this._splitterPosition)throw new K(\"ROCOSDS66932\");{const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=(this._splitterPosition+i)/(i+n),s=e.before.size+e.after.size;e.before.size=o*s,e.after.size=(1-o)*s,t.element.style.top=zt(0),t.element.style.left=zt(0),globalThis.requestAnimationFrame((()=>this.updateSize(!1)))}}}!function(t){t.getElementDimensionSize=function(t,e){return\"width\"===e?function(t){return t.offsetWidth}(t):function(t){return t.offsetHeight}(t)},t.setElementDimensionSize=function(t,e,i){return\"width\"===e?Tt(t,i):At(t,i)},t.createElement=function(t,e){const i=t.createElement(\"div\");return i.classList.add(\"lm_item\"),e?i.classList.add(\"lm_column\"):i.classList.add(\"lm_row\"),i}}(Xt||(Xt={}));class Yt extends $t{constructor(t,e,i){super(t,vt.create(e),null,Yt.createElement(document)),this.isGround=!0,this._childElementContainer=this.element,this._containerElement=i;let n=null;for(;;){const t=n?n.previousSibling:this._containerElement.lastChild;if(!(t instanceof Element&&t.classList.contains(\"lm_content\")))break;n=t}this._containerElement.insertBefore(this.element,n)}init(){if(!0!==this.isInitialised){this.updateNodeSize();for(let t=0;t0?this.contentItems[0]:this,n.isComponent)throw new Error(\"Cannot add item as child to ComponentItem\");{const t=this.layoutManager.createAndInitContentItem(i,n);return e=n.addChild(t,e),n===this?-1:e}}loadComponentAsRoot(t){this.clearRoot();const e=Ct.resolve(t,!1);if(e.maximised)throw new Error(\"Root Component cannot be maximised\");{const t=new jt(this.layoutManager,e,this);t.init(),this.addChild(t,0)}}addChild(t,e){if(this.contentItems.length>0)throw new Error(\"Ground node can only have a single child\");return this._childElementContainer.appendChild(t.element),e=super.addChild(t,e),this.updateSize(!1),this.emitBaseBubblingEvent(\"stateChanged\"),e}calculateConfigContent(){const t=this.contentItems,e=t.length,i=new Array(e);for(let n=0;n0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e)),this.updateContentItemsSize(!1))}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}createSideAreas(){const t=Yt.Area.oppositeSides,e=new Array(Object.keys(t).length);let i=0;for(const n in t){const o=n,s=this.getElementArea();if(null===s)throw new K(\"RCSA77553\");s.side=o,\"2\"===t[o][1]?s[o]=s[t[o]]-50:s[o]=s[t[o]]+50,s.surface=(s.x2-s.x1)*(s.y2-s.y1),e[i++]=s}return e}highlightDropZone(t,e,i){this.layoutManager.tabDropPlaceholder.remove(),super.highlightDropZone(t,e,i)}onDrop(t,e){if(t.isComponent){const e=ut.createDefault(),i=t;e.header=mt.Header.createCopy(i.headerConfig);const n=this.layoutManager.createAndInitContentItem(e,this);n.addChild(t),t=n}if(0===this.contentItems.length)this.addChild(t);else{if(t.type===at.row||t.type===at.column){const e=ut.createDefault(),i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}const i=\"x\"==e.side[0]?at.row:at.column,n=\"2\"==e.side[1],o=this.contentItems[0];if(o instanceof Xt&&o.type===i){const e=o.contentItems[n?0:o.contentItems.length-1];o.addChild(t,n?0:void 0,!0),e.size*=.5,t.size=e.size,t.sizeUnit=ht.Percent,o.updateSize(!1)}else{const e=ct.createDefault(i),s=this.layoutManager.createContentItem(e,this);this.replaceChild(o,s),s.addChild(t,n?0:void 0,!0),s.addChild(o,n?void 0:0,!0),o.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}}dock(){throw new X(\"GID87731\")}validateDocking(){throw new X(\"GIVD87732\")}getAllContentItems(){const t=[this];return this.deepGetAllContentItems(this.contentItems,t),t}getConfigMaximisedItems(){const t=[];return this.deepFilterContentItems(this.contentItems,t,(t=>!(!Gt.isStack(t)||!t.initialWantMaximise)||!(!Gt.isComponentItem(t)||!t.initialWantMaximise))),t}getItemsByPopInParentId(t){const e=[];return this.deepFilterContentItems(this.contentItems,e,(e=>e.popInParentIds.includes(t))),e}toConfig(){throw new Error(\"Cannot generate GroundItem config\")}setActiveComponentItem(t,e,i){}updateNodeSize(){const{width:t,height:e}=kt(this._containerElement);Tt(this.element,t),At(this.element,e),this.contentItems.length>0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e))}deepGetAllContentItems(t,e){for(let i=0;ithis.onClick(t),this._touchStartEventListener=t=>this.onTouchStart(t),this._element=document.createElement(\"div\"),this._element.classList.add(i),this._element.title=e,this._header.on(\"destroy\",(()=>this.destroy())),this._element.addEventListener(\"click\",this._clickEventListener,{passive:!0}),this._element.addEventListener(\"touchstart\",this._touchStartEventListener,{passive:!0}),this._header.controlsContainerElement.appendChild(this._element)}get element(){return this._element}destroy(){var t;this._element.removeEventListener(\"click\",this._clickEventListener),this._element.removeEventListener(\"touchstart\",this._touchStartEventListener),null===(t=this._element.parentNode)||void 0===t||t.removeChild(this._element)}onClick(t){this._pushEvent(t)}onTouchStart(t){this._pushEvent(t)}}class Jt{constructor(t,e,i,n,o){var s;this._layoutManager=t,this._componentItem=e,this._closeEvent=i,this._focusEvent=n,this._dragStartEvent=o,this._isActive=!1,this._tabClickListener=t=>this.onTabClickDown(t),this._tabTouchStartListener=t=>this.onTabTouchStart(t),this._closeClickListener=()=>this.onCloseClick(),this._closeTouchStartListener=()=>this.onCloseTouchStart(),this._dragStartListener=(t,e)=>this.onDragStart(t,e),this._contentItemDestroyListener=()=>this.onContentItemDestroy(),this._tabTitleChangedListener=t=>this.setTitle(t),this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_tab\"),this._titleElement=document.createElement(\"span\"),this._titleElement.classList.add(\"lm_title\"),this._closeElement=document.createElement(\"div\"),this._closeElement.classList.add(\"lm_close_tab\"),this._element.appendChild(this._titleElement),this._element.appendChild(this._closeElement),e.isClosable?this._closeElement.style.display=\"\":this._closeElement.style.display=\"none\",this.setTitle(e.title),this._componentItem.on(\"titleChanged\",this._tabTitleChangedListener);(null!==(s=e.reorderEnabled)&&void 0!==s?s:this._layoutManager.layoutConfig.settings.reorderEnabled)&&this.enableReorder(),this._element.addEventListener(\"click\",this._tabClickListener,{passive:!0}),this._element.addEventListener(\"touchstart\",this._tabTouchStartListener,{passive:!0}),this._componentItem.isClosable?(this._closeElement.addEventListener(\"click\",this._closeClickListener,{passive:!0}),this._closeElement.addEventListener(\"touchstart\",this._closeTouchStartListener,{passive:!0})):(this._closeElement.remove(),this._closeElement=void 0),this._componentItem.setTab(this),this._layoutManager.emit(\"tabCreated\",this)}get isActive(){return this._isActive}get componentItem(){return this._componentItem}get contentItem(){return this._componentItem}get element(){return this._element}get titleElement(){return this._titleElement}get closeElement(){return this._closeElement}get reorderEnabled(){return void 0!==this._dragListener}set reorderEnabled(t){t!==this.reorderEnabled&&(t?this.enableReorder():this.disableReorder())}setTitle(t){this._titleElement.innerText=t,this._element.title=t}setActive(t){t!==this._isActive&&(this._isActive=t,t?this._element.classList.add(\"lm_active\"):this._element.classList.remove(\"lm_active\"))}destroy(){var t,e;this._closeEvent=void 0,this._focusEvent=void 0,this._dragStartEvent=void 0,this._element.removeEventListener(\"click\",this._tabClickListener),this._element.removeEventListener(\"touchstart\",this._tabTouchStartListener),null===(t=this._closeElement)||void 0===t||t.removeEventListener(\"click\",this._closeClickListener),null===(e=this._closeElement)||void 0===e||e.removeEventListener(\"touchstart\",this._closeTouchStartListener),this._componentItem.off(\"titleChanged\",this._tabTitleChangedListener),this.reorderEnabled&&this.disableReorder(),this._element.remove()}setBlurred(){this._element.classList.remove(\"lm_focused\"),this._titleElement.classList.remove(\"lm_focused\")}setFocused(){this._element.classList.add(\"lm_focused\"),this._titleElement.classList.add(\"lm_focused\")}onDragStart(t,e){if(void 0===this._dragListener)throw new J(\"TODSDLU10093\");if(void 0===this._dragStartEvent)throw new J(\"TODS23309\");this._dragStartEvent(t,e,this._dragListener,this.componentItem)}onContentItemDestroy(){void 0!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=void 0)}onTabClickDown(t){const e=t.target;e!==this._element&&e!==this._titleElement||(0===t.button?this.notifyFocus():1===t.button&&this._componentItem.isClosable&&this.notifyClose())}onTabTouchStart(t){t.target===this._element&&this.notifyFocus()}onCloseClick(){this.notifyClose()}onCloseTouchStart(){this.notifyClose()}notifyClose(){if(void 0===this._closeEvent)throw new J(\"TNC15007\");this._closeEvent(this._componentItem)}notifyFocus(){if(void 0===this._focusEvent)throw new J(\"TNA15007\");this._focusEvent(this._componentItem)}enableReorder(){this._dragListener=new Zt(this._element,[this._titleElement]),this._dragListener.on(\"dragStart\",this._dragStartListener),this._componentItem.on(\"destroy\",this._contentItemDestroyListener)}disableReorder(){if(void 0===this._dragListener)throw new J(\"TDR87745\");this._componentItem.off(\"destroy\",this._contentItemDestroyListener),this._dragListener.off(\"dragStart\",this._dragStartListener),this._dragListener=void 0}}class Qt{constructor(t,e,i,n,o){this._layoutManager=t,this._componentRemoveEvent=e,this._componentFocusEvent=i,this._componentDragStartEvent=n,this._dropdownActiveChangedEvent=o,this._tabs=[],this._lastVisibleTabIndex=-1,this._dropdownActive=!1,this._element=document.createElement(\"section\"),this._element.classList.add(\"lm_tabs\"),this._dropdownElement=document.createElement(\"section\"),this._dropdownElement.classList.add(\"lm_tabdropdown_list\"),this._dropdownElement.style.display=\"none\"}get tabs(){return this._tabs}get tabCount(){return this._tabs.length}get lastVisibleTabIndex(){return this._lastVisibleTabIndex}get element(){return this._element}get dropdownElement(){return this._dropdownElement}get dropdownActive(){return this._dropdownActive}destroy(){for(let t=0;tthis.handleTabCloseEvent(t)),(t=>this.handleTabFocusEvent(t)),((t,e,i,n)=>this.handleTabDragStartEvent(t,e,i,n)));void 0===e&&(e=this._tabs.length),this._tabs.splice(e,0,i),ethis._lastVisibleTabIndex){const t=this._tabs[e];for(let t=e;t>0;t--)this._tabs[t]=this._tabs[t-1];this._tabs[0]=t}}updateTabSizes(t,e){let i=!1;this.tryUpdateTabSizes(i,t,e)||(i=!0,this.tryUpdateTabSizes(i,t,e)),i!==this._dropdownActive&&(this._dropdownActive=i,this._dropdownActiveChangedEvent())}tryUpdateTabSizes(t,e,i){if(this._tabs.length>0){if(void 0===i)throw new Error(\"non-empty tabs must have active component item\");let n=0,o=!1;const s=this._layoutManager.layoutConfig.settings.tabOverlapAllowance,r=this._tabs.indexOf(i.tab),a=this._tabs[r];this._lastVisibleTabIndex=-1;for(let i=0;ie){if(o)i===r&&(l.style.zIndex=\"auto\",l.style.marginLeft=\"\",l.parentElement!==this._element&&this._element.appendChild(l));else{let t;if(t=r>0&&r<=i?(d-e)/(i-1):(d-e)/i,tthis.onClick(t),this._touchStartListener=t=>this.onTouchStart(t),this._rowColumnClosable=!0,this._closeButton=null,this._popoutButton=null,this._tabsContainer=new Qt(this._layoutManager,(t=>this.handleTabInitiatedComponentRemoveEvent(t)),(t=>this.handleTabInitiatedComponentFocusEvent(t)),((t,e,i,n)=>this.handleTabInitiatedDragStartEvent(t,e,i,n)),(()=>this.processTabDropdownActiveChanged())),this._show=i.show,this._popoutEnabled=i.popoutEnabled,this._popoutLabel=i.popoutLabel,this._maximiseEnabled=i.maximiseEnabled,this._maximiseLabel=i.maximiseLabel,this._minimiseEnabled=i.minimiseEnabled,this._minimiseLabel=i.minimiseLabel,this._closeEnabled=i.closeEnabled,this._closeLabel=i.closeLabel,this._tabDropdownEnabled=i.tabDropdownEnabled,this._tabDropdownLabel=i.tabDropdownLabel,this.setSide(i.side),this._canRemoveComponent=this._configClosable,this._element=document.createElement(\"section\"),this._element.classList.add(\"lm_header\"),this._controlsContainerElement=document.createElement(\"section\"),this._controlsContainerElement.classList.add(\"lm_controls\"),this._element.appendChild(this._tabsContainer.element),this._element.appendChild(this._controlsContainerElement),this._element.appendChild(this._tabsContainer.dropdownElement),this._element.addEventListener(\"click\",this._clickListener,{passive:!0}),this._element.addEventListener(\"touchstart\",this._touchStartListener,{passive:!0}),this._documentMouseUpListener=()=>this._tabsContainer.hideAdditionalTabsDropdown(),globalThis.document.addEventListener(\"mouseup\",this._documentMouseUpListener,{passive:!0}),this._tabControlOffset=this._layoutManager.layoutConfig.settings.tabControlOffset,this._tabDropdownEnabled&&(this._tabDropdownButton=new Kt(this,this._tabDropdownLabel,\"lm_tabdropdown\",(()=>this._tabsContainer.showAdditionalTabsDropdown()))),this._popoutEnabled&&(this._popoutButton=new Kt(this,this._popoutLabel,\"lm_popout\",(()=>this.handleButtonPopoutEvent()))),this._maximiseEnabled&&(this._maximiseButton=new Kt(this,this._maximiseLabel,\"lm_maximise\",(t=>this.handleButtonMaximiseToggleEvent(t)))),this._configClosable&&(this._closeButton=new Kt(this,this._closeLabel,\"lm_close\",(()=>s()))),this.processTabDropdownActiveChanged()}get show(){return this._show}get side(){return this._side}get leftRightSided(){return this._leftRightSided}get layoutManager(){return this._layoutManager}get parent(){return this._parent}get tabs(){return this._tabsContainer.tabs}get lastVisibleTabIndex(){return this._tabsContainer.lastVisibleTabIndex}get element(){return this._element}get tabsContainerElement(){return this._tabsContainer.element}get controlsContainerElement(){return this._controlsContainerElement}destroy(){this.emit(\"destroy\"),this._popoutEvent=void 0,this._maximiseToggleEvent=void 0,this._clickEvent=void 0,this._touchStartEvent=void 0,this._componentRemoveEvent=void 0,this._componentFocusEvent=void 0,this._componentDragStartEvent=void 0,this._tabsContainer.destroy(),globalThis.document.removeEventListener(\"mouseup\",this._documentMouseUpListener),this._element.remove()}createTab(t,e){this._tabsContainer.createTab(t,e)}removeTab(t){this._tabsContainer.removeTab(t)}processActiveComponentChanged(t){this._tabsContainer.processActiveComponentChanged(t),this.updateTabSizes()}setSide(t){this._side=t,this._leftRightSided=[nt.right,nt.left].includes(this._side)}setRowColumnClosable(t){this._rowColumnClosable=t,this.updateClosability()}updateClosability(){let t;if(this._configClosable)if(this._rowColumnClosable){t=!0;const e=this.tabs.length;for(let i=0;i1}applyFocusedValue(t){t?this._element.classList.add(\"lm_focused\"):this._element.classList.remove(\"lm_focused\")}processMaximised(){if(void 0===this._maximiseButton)throw new J(\"HPMAX16997\");this._maximiseButton.element.setAttribute(\"title\",this._minimiseLabel)}processMinimised(){if(void 0===this._maximiseButton)throw new J(\"HPMIN16997\");this._maximiseButton.element.setAttribute(\"title\",this._maximiseLabel)}updateTabSizes(){if(this._tabsContainer.tabCount>0){const t=this._show?this._layoutManager.layoutConfig.dimensions.headerHeight:0;let e;this._leftRightSided?(this._element.style.height=\"\",this._element.style.width=zt(t)):(this._element.style.width=\"\",this._element.style.height=zt(t)),e=this._leftRightSided?this._element.offsetHeight-this._controlsContainerElement.offsetHeight-this._tabControlOffset:this._element.offsetWidth-this._controlsContainerElement.offsetWidth-this._tabControlOffset,this._tabsContainer.updateTabSizes(e,this._getActiveComponentItemEvent())}}handleTabInitiatedComponentRemoveEvent(t){if(this._canRemoveComponent){if(void 0===this._componentRemoveEvent)throw new J(\"HHTCE22294\");this._componentRemoveEvent(t)}}handleTabInitiatedComponentFocusEvent(t){if(void 0===this._componentFocusEvent)throw new J(\"HHTAE22294\");this._componentFocusEvent(t)}handleTabInitiatedDragStartEvent(t,e,i,n){if(this._canRemoveComponent){if(void 0===this._componentDragStartEvent)throw new J(\"HHTDSE22294\");this._componentDragStartEvent(t,e,i,n)}else i.cancelDrag()}processTabDropdownActiveChanged(){void 0!==this._tabDropdownButton&&Dt(this._tabDropdownButton.element,this._tabsContainer.dropdownActive)}handleButtonPopoutEvent(){if(this._layoutManager.layoutConfig.settings.popoutWholeStack){if(void 0===this._popoutEvent)throw new J(\"HHBPOE17834\");this._popoutEvent()}else{const t=this._getActiveComponentItemEvent();t&&t.popout()}}handleButtonMaximiseToggleEvent(t){if(void 0===this._maximiseToggleEvent)throw new J(\"HHBMTE16834\");this._maximiseToggleEvent()}onClick(t){t.target===this._element&&this.notifyClick(t)}onTouchStart(t){t.target===this._element&&this.notifyTouchStart(t)}notifyClick(t){if(void 0===this._clickEvent)throw new J(\"HNHC46834\");this._clickEvent(t)}notifyTouchStart(t){if(void 0===this._touchStartEvent)throw new J(\"HNHTS46834\");this._touchStartEvent(t)}}class ee extends $t{constructor(t,e,i){var n,o,s,r,a,l,h,d,c,m,u,p,g,f,v,_,y,C,w;super(t,e,i,ee.createElement(document)),this._headerSideChanged=!1,this._resizeListener=()=>this.handleResize(),this._maximisedListener=()=>this.handleMaximised(),this._minimisedListener=()=>this.handleMinimised(),this._headerConfig=e.header;const I=t.layoutConfig.header,b=e.content;let S;if(1!==b.length)S=void 0;else{S=b[0].header}this._initialWantMaximise=e.maximised,this._initialActiveItemIndex=null!==(n=e.activeItemIndex)&&void 0!==n?n:0;const E=null!==(r=null!==(s=null===(o=this._headerConfig)||void 0===o?void 0:o.show)&&void 0!==s?s:null==S?void 0:S.show)&&void 0!==r?r:I.show,x=null!==(h=null!==(l=null===(a=this._headerConfig)||void 0===a?void 0:a.popout)&&void 0!==l?l:null==S?void 0:S.popout)&&void 0!==h?h:I.popout,L=null!==(m=null!==(c=null===(d=this._headerConfig)||void 0===d?void 0:d.maximise)&&void 0!==c?c:null==S?void 0:S.maximise)&&void 0!==m?m:I.maximise,z=null!==(g=null!==(p=null===(u=this._headerConfig)||void 0===u?void 0:u.close)&&void 0!==p?p:null==S?void 0:S.close)&&void 0!==g?g:I.close,M=null!==(_=null!==(v=null===(f=this._headerConfig)||void 0===f?void 0:f.minimise)&&void 0!==v?v:null==S?void 0:S.minimise)&&void 0!==_?_:I.minimise,P=null!==(w=null!==(C=null===(y=this._headerConfig)||void 0===y?void 0:y.tabDropdown)&&void 0!==C?C:null==S?void 0:S.tabDropdown)&&void 0!==w?w:I.tabDropdown;this._maximisedEnabled=!1!==L;const T={show:!1!==E,side:!1===E?nt.top:E,popoutEnabled:!1!==x,popoutLabel:!1===x?\"\":x,maximiseEnabled:this._maximisedEnabled,maximiseLabel:!1===L?\"\":L,closeEnabled:!1!==z,closeLabel:!1===z?\"\":z,minimiseEnabled:!0,minimiseLabel:M,tabDropdownEnabled:!1!==P,tabDropdownLabel:!1===P?\"\":P};this._header=new te(t,this,T,e.isClosable&&!1!==z,(()=>this.getActiveComponentItem()),(()=>this.remove()),(()=>this.handlePopoutEvent()),(()=>this.toggleMaximise()),(t=>this.handleHeaderClickEvent(t)),(t=>this.handleHeaderTouchStartEvent(t)),(t=>this.handleHeaderComponentRemoveEvent(t)),(t=>this.handleHeaderComponentFocusEvent(t)),((t,e,i,n)=>this.handleHeaderComponentStartDragEvent(t,e,i,n))),this.isStack=!0,this._childElementContainer=document.createElement(\"section\"),this._childElementContainer.classList.add(\"lm_items\"),this.on(\"resize\",this._resizeListener),this._maximisedEnabled&&(this.on(\"maximised\",this._maximisedListener),this.on(\"minimised\",this._minimisedListener)),this.element.appendChild(this._header.element),this.element.appendChild(this._childElementContainer),this.setupHeaderPosition(),this._header.updateClosability()}get childElementContainer(){return this._childElementContainer}get header(){return this._header}get headerShow(){return this._header.show}get headerSide(){return this._header.side}get headerLeftRightSided(){return this._header.leftRightSided}get contentAreaDimensions(){return this._contentAreaDimensions}get initialWantMaximise(){return this._initialWantMaximise}get isMaximised(){return this===this.layoutManager.maximisedStack}get stackParent(){if(!this.parent)throw new Error(\"Stack should always have a parent\");return this.parent}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}init(){if(!0===this.isInitialised)return;this.updateNodeSize();for(let t=0;t0){if(this._initialActiveItemIndex<0||this._initialActiveItemIndex>=e)throw new Error(`ActiveItemIndex out of range: ${this._initialActiveItemIndex} id: ${this.id}`);for(let i=0;ithis.contentItems.length)throw e-=1,new X(\"SAC99728\");if(t instanceof jt)return e=super.addChild(t,e),this._childElementContainer.appendChild(t.element),this._header.createTab(t,e),this.setActiveComponentItem(t,i),this._header.updateTabSizes(),this.updateSize(!1),t.container.setBaseLogicalZIndex(),this._header.updateClosability(),this.emitStateChangedEvent(),e;throw new X(\"SACC88532\")}removeChild(t,e){const i=t,n=this.contentItems.indexOf(i),o=1===this.contentItems.length;if(this._activeComponentItem===i&&(i.focused&&i.blur(),!o)){const t=0===n?1:n-1;this.setActiveComponentItem(this.contentItems[t],!1)}this._header.removeTab(i),super.removeChild(i,e),o||this._header.updateClosability(),this.emitStateChangedEvent()}toggleMaximise(){this.isMaximised?this.minimise():this.maximise()}maximise(){if(!this.isMaximised){this.layoutManager.setMaximisedStack(this);const t=this.contentItems,e=t.length;for(let i=0;i0&&void 0===t)throw new Error(\"expected non-empty stack to have an active component item\");return{type:\"stack\",content:this.calculateConfigContent(),size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,isClosable:this.isClosable,maximised:this.isMaximised,header:this.createHeaderConfig(),activeItemIndex:t}}onDrop(t,e){if(\"header\"===this._dropSegment){if(this.resetHeaderDropZone(),void 0===this._dropIndex)throw new J(\"SODDI68990\");return void this.addChild(t,this._dropIndex)}if(\"body\"===this._dropSegment)return void this.addChild(t,0,!0);const i=\"top\"===this._dropSegment||\"bottom\"===this._dropSegment,n=\"left\"===this._dropSegment||\"right\"===this._dropSegment,o=\"top\"===this._dropSegment||\"left\"===this._dropSegment,s=i&&this.stackParent.isColumn||n&&this.stackParent.isRow;if(t.isComponent){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createAndInitContentItem(e,this);i.addChild(t),t=i}if(t.type===at.row||t.type===at.column){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}if(s){const e=this.stackParent.contentItems.indexOf(this);this.stackParent.addChild(t,o?e:e+1,!0),this.size*=.5,t.size=this.size,t.sizeUnit=this.sizeUnit,this.stackParent.updateSize(!1)}else{const e=i?at.column:at.row,n=ct.createDefault(e),s=this.layoutManager.createContentItem(n,this);this.stackParent.replaceChild(this,s),s.addChild(t,o?0:void 0,!0),s.addChild(this,o?void 0:0,!0),this.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}highlightDropZone(t,e){for(const i in this._contentAreaDimensions){const n=i,o=this._contentAreaDimensions[n].hoverArea;if(o.x1t&&o.y1e)return void(\"header\"===n?(this._dropSegment=\"header\",this.highlightHeaderDropZone(this._header.leftRightSided?e:t)):(this.resetHeaderDropZone(),this.highlightBodyDropZone(n)))}}getArea(){if(\"none\"===this.element.style.display)return null;const t=super.getElementArea(this._header.element),e=super.getElementArea(this._childElementContainer);if(null===t||null===e)throw new K(\"SGAHC13086\");const i=e.x2-e.x1,n=e.y2-e.y1;return this._contentAreaDimensions={header:{hoverArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2},highlightArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2}}},0===this.contentItems.length?(this._contentAreaDimensions.body={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2}},super.getElementArea(this.element)):(this._contentAreaDimensions.left={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x1+.25*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x1+.5*i,y2:e.y2}},this._contentAreaDimensions.top={hoverArea:{x1:e.x1+.25*i,y1:e.y1,x2:e.x1+.75*i,y2:e.y1+.5*n},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y1+.5*n}},this._contentAreaDimensions.right={hoverArea:{x1:e.x1+.75*i,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1+.5*i,y1:e.y1,x2:e.x2,y2:e.y2}},this._contentAreaDimensions.bottom={hoverArea:{x1:e.x1+.25*i,y1:e.y1+.5*n,x2:e.x1+.75*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1+.5*n,x2:e.x2,y2:e.y2}},super.getElementArea(this.element))}positionHeader(t){this._header.side!==t&&(this._header.setSide(t),this._headerSideChanged=!0,this.setupHeaderPosition())}updateNodeSize(){if(\"none\"!==this.element.style.display){const t=kt(this.element);if(this._header.show){t[this._header.leftRightSided?it.width:it.height]-=this.layoutManager.layoutConfig.dimensions.headerHeight}this._childElementContainer.style.width=zt(t.width),this._childElementContainer.style.height=zt(t.height);for(let e=0;e=o&&tthis.onDrag(t,e,i))),this._dragListener.on(\"dragStop\",(()=>this.onDrop())),this.createDragProxyElements(t,e),null===this._componentItem.parent)throw new K(\"DPC10097\");this._componentItemFocused=this._componentItem.focused,this._componentItemFocused&&this._componentItem.blur(),this._componentItem.parent.removeChild(this._componentItem,!0),this.setDimensions(),document.body.appendChild(this._element),this.determineMinMaxXY(),this._layoutManager.calculateItemAreas(),this.setDropPosition(t,e)}get element(){return this._element}createDragProxyElements(t,e){this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_dragProxy\");const i=document.createElement(\"div\");i.classList.add(\"lm_header\");const n=document.createElement(\"div\");n.classList.add(\"lm_tabs\");const o=document.createElement(\"div\");o.classList.add(\"lm_tab\");const s=document.createElement(\"span\");s.classList.add(\"lm_title\"),o.appendChild(s),n.appendChild(o),i.appendChild(n),this._proxyContainerElement=document.createElement(\"div\"),this._proxyContainerElement.classList.add(\"lm_content\"),this._element.appendChild(i),this._element.appendChild(this._proxyContainerElement),this._originalParent instanceof ee&&this._originalParent.headerShow&&(this._sided=this._originalParent.headerLeftRightSided,this._element.classList.add(\"lm_\"+this._originalParent.headerSide),[nt.right,nt.bottom].indexOf(this._originalParent.headerSide)>=0&&this._proxyContainerElement.insertAdjacentElement(\"afterend\",i)),this._element.style.left=zt(t),this._element.style.top=zt(e),o.setAttribute(\"title\",this._componentItem.title),s.insertAdjacentText(\"afterbegin\",this._componentItem.title),this._proxyContainerElement.appendChild(this._componentItem.element)}determineMinMaxXY(){const t=this._layoutManager.groundItem;if(void 0===t)throw new J(\"DPDMMXY73109\");{const e=t.element.getBoundingClientRect();this._minX=e.left+document.body.scrollLeft,this._minY=e.top+document.body.scrollTop,this._maxX=this._minX+e.width,this._maxY=this._minY+e.height}}onDrag(t,e,i){const n=i.pageX,o=i.pageY;this.setDropPosition(n,o),this._componentItem.drag()}setDropPosition(t,e){this._layoutManager.layoutConfig.settings.constrainDragToContainer&&(t<=this._minX?t=Math.ceil(this._minX):t>=this._maxX&&(t=Math.floor(this._maxX)),e<=this._minY?e=Math.ceil(this._minY):e>=this._maxY&&(e=Math.floor(this._maxY))),this._element.style.left=zt(t),this._element.style.top=zt(e),this._area=this._layoutManager.getArea(t,e),null!==this._area&&(this._lastValidArea=this._area,this._area.contentItem.highlightDropZone(t,e,this._area))}onDrop(){const t=this._layoutManager.dropTargetIndicator;if(null===t)throw new K(\"DPOD30011\");let e;if(t.hide(),this._componentItem.exitDragMode(),null!==this._area)e=this._componentItem,this._area.contentItem.onDrop(e,this._area);else if(null!==this._lastValidArea){e=this._componentItem;this._lastValidArea.contentItem.onDrop(e,this._lastValidArea)}else this._originalParent?(e=this._componentItem,this._originalParent.addChild(e)):this._componentItem.destroy();this._element.remove(),this._layoutManager.emit(\"itemDropped\",this._componentItem),this._componentItemFocused&&void 0!==e&&e.focus()}setDimensions(){const t=this._layoutManager.layoutConfig.dimensions;if(void 0===t)throw new Error(\"DragProxy.setDimensions: dimensions undefined\");let e=t.dragProxyWidth,i=t.dragProxyHeight;if(void 0===e||void 0===i)throw new Error(\"DragProxy.setDimensions: width and/or height undefined\");const n=!1===this._layoutManager.layoutConfig.header.show?0:t.headerHeight;this._element.style.width=zt(e),this._element.style.height=zt(i),e-=this._sided?n:0,i-=this._sided?0:n,this._proxyContainerElement.style.width=zt(e),this._proxyContainerElement.style.height=zt(i),this._componentItem.enterDragMode(e,i),this._componentItem.show()}}class ne{constructor(t,e,i,n,o,s,r){this._layoutManager=t,this._element=e,this._extraAllowableChildTargets=i,this._componentTypeOrFtn=n,this._componentState=o,this._title=s,this._id=r,this._dragListener=null,this._dummyGroundContainer=document.createElement(\"div\");const a=gt.createDefault(\"row\");this._dummyGroundContentItem=new Yt(this._layoutManager,a,this._dummyGroundContainer),this.createDragListener()}destroy(){this.removeDragListener()}createDragListener(){this.removeDragListener(),this._dragListener=new Zt(this._element,this._extraAllowableChildTargets),this._dragListener.on(\"dragStart\",((t,e)=>this.onDragStart(t,e))),this._dragListener.on(\"dragStop\",(()=>this.onDragStop()))}onDragStart(t,e){var i;const n=\"component\";let o;if(\"function\"==typeof this._componentTypeOrFtn){const t=this._componentTypeOrFtn();o=ne.isDragSourceComponentItemConfig(t)?{type:n,componentState:t.state,componentType:t.type,title:null!==(i=t.title)&&void 0!==i?i:this._title}:t}else o={type:n,componentState:this._componentState,componentType:this._componentTypeOrFtn,title:this._title,id:this._id};const s=bt.resolve(o,!1),r=new jt(this._layoutManager,s,this._dummyGroundContentItem);if(this._dummyGroundContentItem.contentItems.push(r),null===this._dragListener)throw new K(\"DSODSD66746\");{const i=new ie(t,e,this._dragListener,this._layoutManager,r,this._dummyGroundContentItem),n=this._layoutManager.transitionIndicator;if(null===n)throw new K(\"DSODST66746\");n.transitionElements(this._element,i.element)}}onDragStop(){this.createDragListener()}removeDragListener(){null!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=null)}}!function(t){t.isDragSourceComponentItemConfig=function(t){return!(\"componentType\"in t)}}(ne||(ne={}));class oe{constructor(){this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_dropTargetIndicator\");const t=document.createElement(\"div\");t.classList.add(\"lm_inner\"),this._element.appendChild(t),document.body.appendChild(this._element)}destroy(){this._element.remove()}highlightArea(t,e){this._element.style.left=zt(t.x1+e),this._element.style.top=zt(t.y1+e),this._element.style.width=zt(t.x2-t.x1-e),this._element.style.height=zt(t.y2-t.y1-e),this._element.style.display=\"block\"}hide(){Dt(this._element,!1)}}class se{constructor(){this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_transition_indicator\"),document.body.appendChild(this._element),this._toElement=null,this._fromDimensions=null,this._totalAnimationDuration=200,this._animationStartTime=null}destroy(){this._element.remove()}transitionElements(t,e){}nextAnimationFrame(){}measure(t){const e=t.getBoundingClientRect();return{left:e.left,top:e.top,width:t.offsetWidth,height:t.offsetHeight}}}class re extends Wt{constructor(t){super(),this._layoutManager=t,this._childEventListener=t=>this.onEventFromChild(t),globalThis.addEventListener(re.ChildEventName,this._childEventListener,{passive:!0})}emit(t,...e){\"userBroadcast\"===t?this.emitUserBroadcast(...e):super.emit(t,...e)}emitUserBroadcast(...t){this.handleUserBroadcastEvent(\"userBroadcast\",t)}destroy(){globalThis.removeEventListener(re.ChildEventName,this._childEventListener)}handleUserBroadcastEvent(t,e){this._layoutManager.isSubWindow?this.propagateToParent(t,e):this.propagateToThisAndSubtree(t,e)}onEventFromChild(t){const e=t.detail;this.handleUserBroadcastEvent(e.eventName,e.args)}propagateToParent(t,e){const i={bubbles:!0,cancelable:!0,detail:{layoutManager:this._layoutManager,eventName:t,args:e}},n=new CustomEvent(re.ChildEventName,i),o=globalThis.opener;if(null===o)throw new K(\"EHPTP15778\");o.dispatchEvent(n)}propagateToThisAndSubtree(t,e){this.emitUnknown(t,...e);for(let i=0;ithis.handleContainerResize())),this._windowBeforeUnloadListener=()=>this.onBeforeUnload(),this._windowBeforeUnloadListening=!1,this._maximisedStackBeforeDestroyedListener=t=>this.cleanupBeforeMaximisedStackDestroyed(t),this.isSubWindow=t.isSubWindow,this._constructorOrSubWindowLayoutConfig=t.constructorOrSubWindowLayoutConfig,Q.checkInitialise(),dt.checkInitialise(),void 0!==t.containerElement&&(this._containerElement=t.containerElement)}get container(){return this._containerElement}get isInitialised(){return this._isInitialised}get groundItem(){return this._groundItem}get root(){return this._groundItem}get openPopouts(){return this._openPopouts}get dropTargetIndicator(){return this._dropTargetIndicator}get transitionIndicator(){return this._transitionIndicator}get width(){return this._width}get height(){return this._height}get eventHub(){return this._eventHub}get rootItem(){if(void 0===this._groundItem)throw new Error(\"Cannot access rootItem before init\");return 0===this._groundItem.contentItems.length?void 0:this._groundItem.contentItems[0]}get focusedComponentItem(){return this._focusedComponentItem}get tabDropPlaceholder(){return this._tabDropPlaceholder}get maximisedStack(){return this._maximisedStack}get deprecatedConstructor(){return!this.isSubWindow&&void 0!==this._constructorOrSubWindowLayoutConfig}destroy(){if(this._isInitialised){this._windowBeforeUnloadListening&&(globalThis.removeEventListener(\"beforeunload\",this._windowBeforeUnloadListener),this._windowBeforeUnloadListening=!1),!0===this.layoutConfig.settings.closePopoutsOnUnload&&this.closeAllOpenPopouts(),this._resizeObserver.disconnect(),this.checkClearResizeTimeout(),void 0!==this._groundItem&&this._groundItem.destroy(),this._tabDropPlaceholder.remove(),null!==this._dropTargetIndicator&&this._dropTargetIndicator.destroy(),null!==this._transitionIndicator&&this._transitionIndicator.destroy(),this._eventHub.destroy();for(const t of this._dragSources)t.destroy();this._dragSources=[],this._isInitialised=!1}}minifyConfig(t){return _t.minifyConfig(t)}unminifyConfig(t){return _t.unminifyConfig(t)}init(){let t;if(this.setContainer(),this._dropTargetIndicator=new oe,this._transitionIndicator=new se,this.updateSizeFromContainer(),this.isSubWindow){if(void 0===this._constructorOrSubWindowLayoutConfig)throw new J(\"LMIU07155\");{const e=this._constructorOrSubWindowLayoutConfig.root;if(void 0===e)throw new X(\"LMIC07156\");if(!Ct.isComponent(e))throw new X(\"LMIC07157\");t=e;const i=xt.resolve(this._constructorOrSubWindowLayoutConfig);this.layoutConfig=Object.assign(Object.assign({},i),{root:void 0})}}else void 0===this._constructorOrSubWindowLayoutConfig?this.layoutConfig=_t.createDefault():this.layoutConfig=xt.resolve(this._constructorOrSubWindowLayoutConfig);const e=this.layoutConfig;this._groundItem=new Yt(this,e.root,this._containerElement),this._groundItem.init(),this.checkLoadedLayoutMaximiseItem(),this._resizeObserver.observe(this._containerElement),this._isInitialised=!0,this.adjustColumnsResponsive(),this.emit(\"initialised\"),void 0!==t&&this.loadComponentAsRoot(t)}loadLayout(t){if(!this.isInitialised)throw new Error(\"GoldenLayout: Need to call init() if LayoutConfig with defined root passed to constructor\");if(void 0===this._groundItem)throw new J(\"LMLL11119\");this.createSubWindows(),this.layoutConfig=xt.resolve(t),this._groundItem.loadRoot(this.layoutConfig.root),this.checkLoadedLayoutMaximiseItem(),this.adjustColumnsResponsive()}saveLayout(){if(!1===this._isInitialised)throw new Error(\"Can't create config, layout not yet initialised\");if(void 0===this._groundItem)throw new J(\"LMTC18244\");{const t=this._groundItem.calculateConfigContent();let e;e=1!==t.length?void 0:t[0],this.reconcilePopoutWindows();const i=[];for(let t=0;t=0?n=this._groundItem.contentItems[0]:e=0;break;case at.row:case at.column:e=n.addItem(t,i.index);break;case at.stack:if(Ct.isComponent(t)){e=n.addItem(t,i.index);break}throw Error(tt[6]);case at.component:throw new X(\"LMAIALC87444602\");default:throw new Y(\"LMAIALU98881733\",n.type)}if(Ct.isComponent(t)){const t=n.contentItems[e];Gt.isStack(t)&&(n=t,e=0)}return i.parentItem=n,i.index=e,i}}}loadComponentAsRoot(t){if(void 0===this._groundItem)throw new Error(\"Cannot add item before init\");this._groundItem.loadComponentAsRoot(t)}updateSize(t,e){this.setSize(t,e)}setSize(t,e){if(this._width=t,this._height=e,!0===this._isInitialised){if(void 0===this._groundItem)throw new J(\"LMUS18881\");if(this._groundItem.setSize(this._width,this._height),this._maximisedStack){const{width:t,height:e}=kt(this._containerElement);Tt(this._maximisedStack.element,t),At(this._maximisedStack.element,e),this._maximisedStack.updateSize(!1)}this.adjustColumnsResponsive()}}beginSizeInvalidation(){this._sizeInvalidationBeginCount++}endSizeInvalidation(){0==--this._sizeInvalidationBeginCount&&this.updateSizeFromContainer()}updateSizeFromContainer(){const{width:t,height:e}=kt(this._containerElement);this.setSize(t,e)}updateRootSize(t=!1){if(void 0===this._groundItem)throw new J(\"LMURS28881\");this._groundItem.updateSize(t)}createAndInitContentItem(t,e){const i=this.createContentItem(t,e);return i.init(),i}createContentItem(t,e){if(\"string\"!=typeof t.type)throw new G(\"Missing parameter 'type'\",JSON.stringify(t));if(ct.isComponentItem(t)&&!(e instanceof ee)&&e&&!(!0===this.isSubWindow&&e instanceof Yt)){t={type:at.stack,content:[t],size:t.size,sizeUnit:t.sizeUnit,minSize:t.minSize,minSizeUnit:t.minSizeUnit,id:t.id,maximised:t.maximised,isClosable:t.isClosable,activeItemIndex:0,header:void 0}}return this.createContentItemFromConfig(t,e)}findFirstComponentItemById(t){if(void 0===this._groundItem)throw new J(\"LMFFCIBI82446\");return this.findFirstContentItemTypeByIdRecursive(at.component,t,this._groundItem)}createPopout(t,e,i,n){return t instanceof Gt?this.createPopoutFromContentItem(t,e,i,n):this.createPopoutFromItemConfig(t,e,i,n)}createPopoutFromContentItem(t,e,i,n){let o=t.parent,s=t;for(;null!==o&&1===o.contentItems.length&&!o.isGround;)s=o,o=o.parent;if(null===o)throw new K(\"LMCPFCI00834\");{if(void 0===n&&(n=o.contentItems.indexOf(s)),null!==i&&o.addPopInParentId(i),void 0===e){const i=globalThis.screenX||globalThis.screenLeft,n=globalThis.screenY||globalThis.screenTop,o=t.element.offsetLeft,s=t.element.offsetTop,{width:r,height:a}=kt(t.element);e={left:i+o,top:n+s,width:r,height:a}}const r=t.toConfig();if(t.remove(),ft.isRootItemConfig(r))return this.createPopoutFromItemConfig(r,e,i,n);throw new Error(`${tt[0]}`)}}beginVirtualSizedContainerAdding(){0==++this._virtualSizedContainerAddingBeginCount&&(this._virtualSizedContainers.length=0)}addVirtualSizedContainer(t){this._virtualSizedContainers.push(t)}endVirtualSizedContainerAdding(){if(0==--this._virtualSizedContainerAddingBeginCount){const t=this._virtualSizedContainers.length;if(t>0){this.fireBeforeVirtualRectingEvent(t);for(let e=0;ethis.emit(\"windowOpened\",a))),a.on(\"closed\",(()=>this.reconcilePopoutWindows())),this._openPopouts.push(a),this.layoutConfig.settings.closePopoutsOnUnload&&!this._windowBeforeUnloadListening&&(globalThis.addEventListener(\"beforeunload\",this._windowBeforeUnloadListener,{passive:!0}),this._windowBeforeUnloadListening=!0),a}closeAllOpenPopouts(){for(let t=0;tglobalThis.close()),1)}getArea(t,e){let i=null,n=1/0;for(let o=0;o=s.x1&&t=s.y1&&es.surface&&(n=s.surface,i=s)}return i}calculateItemAreas(){const t=this.getAllContentItems(),e=this._groundItem;if(void 0===e)throw new J(\"LMCIAR44365\");if(1!==t.length){e.contentItems[0].isStack?this._itemAreas=[]:this._itemAreas=e.createSideAreas();for(let e=0;e0){let e=t[0];if(Gt.isComponentItem(e)){const t=e.parent;if(null===t)throw new K(\"LMXLLMI69999\");e=t}if(!Gt.isStack(e))throw new X(\"LMCLLMI19993\");e.maximise()}}}processMaximiseStack(t){if(this._maximisedStack=t,t.on(\"beforeItemDestroyed\",this._maximisedStackBeforeDestroyedListener),t.element.classList.add(\"lm_maximised\"),t.element.insertAdjacentElement(\"afterend\",this._maximisePlaceholder),void 0===this._groundItem)throw new J(\"LMMXI19993\");{this._groundItem.element.prepend(t.element);const{width:e,height:i}=kt(this._containerElement);Tt(t.element,e),At(t.element,i),t.updateSize(!0),t.focusActiveContentItem(),this._maximisedStack.emit(\"maximised\"),this.emit(\"stateChanged\")}}processMinimiseMaximisedStack(){if(void 0===this._maximisedStack)throw new X(\"LMMMS74422\");{const t=this._maximisedStack;if(null===t.parent)throw new K(\"LMMI13668\");t.element.classList.remove(\"lm_maximised\"),this._maximisePlaceholder.insertAdjacentElement(\"afterend\",t.element),this._maximisePlaceholder.remove(),this.updateRootSize(!0),this._maximisedStack=void 0,t.off(\"beforeItemDestroyed\",this._maximisedStackBeforeDestroyedListener),t.emit(\"minimised\"),this.emit(\"stateChanged\")}}reconcilePopoutWindows(){const t=[];for(let e=0;e{this._resizeTimeoutId=void 0,this.beginSizeInvalidation(),this.endSizeInvalidation()}),this.resizeDebounceInterval))}checkClearResizeTimeout(){void 0!==this._resizeTimeoutId&&(clearTimeout(this._resizeTimeoutId),this._resizeTimeoutId=void 0)}setContainer(){var t;const e=document.body,i=null!==(t=this._containerElement)&&void 0!==t?t:e;if(i===e){this.resizeWithContainerAutomatically=!0;const t=document.documentElement;t.style.height=\"100%\",t.style.margin=\"0\",t.style.padding=\"0\",t.style.overflow=\"clip\",e.style.height=\"100%\",e.style.margin=\"0\",e.style.padding=\"0\",e.style.overflow=\"clip\"}this._containerElement=i}onBeforeUnload(){this.destroy()}adjustColumnsResponsive(){if(void 0===this._groundItem)throw new J(\"LMACR20883\");if(this._firstLoad=!1,this.useResponsiveLayout()&&!this._updatingColumnsResponsive&&this._groundItem.contentItems.length>0&&this._groundItem.contentItems[0].isRow){if(void 0===this._groundItem||null===this._width)throw new J(\"LMACR77412\");{const t=this._groundItem.contentItems[0].contentItems.length;if(t<=1)return;{const e=this.layoutConfig.dimensions.defaultMinItemWidth;if(t*e<=this._width)return;{this._updatingColumnsResponsive=!0;const i=t-Math.max(Math.floor(this._width/e),1),n=this._groundItem.contentItems[0],o=this.getAllStacks();if(0===o.length)throw new X(\"LMACRS77413\");{const t=o[0];for(let e=0;en?void 0:{parentItem:t,index:o}}}case 1:if(void 0===this._focusedComponentItem)return;{const t=this._focusedComponentItem.parentItem;return this.tryCreateLocationFromParentItem(t,e)}case 2:{const t=this.findFirstContentItemType(at.stack);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 3:{let t=this.findFirstContentItemType(at.row);return void 0!==t?this.tryCreateLocationFromParentItem(t,e):(t=this.findFirstContentItemType(at.column),void 0!==t?this.tryCreateLocationFromParentItem(t,e):void 0)}case 4:{const t=this.findFirstContentItemType(at.row);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 5:{const t=this.findFirstContentItemType(at.column);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 6:if(void 0===this._groundItem)throw new J(\"LMFLRIF18244\");return void 0!==this.rootItem?void 0:void 0===e||0===e?{parentItem:this._groundItem,index:0}:void 0;case 7:if(void 0===this._groundItem)throw new J(\"LMFLF18244\");{const t=this._groundItem.contentItems;if(0===t.length)return void 0===e||0===e?{parentItem:this._groundItem,index:0}:void 0;{const i=t[0];return this.tryCreateLocationFromParentItem(i,e)}}}}tryCreateLocationFromParentItem(t,e){const i=t.contentItems.length;return void 0===e?{parentItem:t,index:i}:e<0||e>i?void 0:{parentItem:t,index:e}}}!function(t){t.createMaximisePlaceElement=function(t){const e=t.createElement(\"div\");return e.classList.add(\"lm_maximise_place\"),e},t.createTabDropPlaceholderElement=function(t){const e=t.createElement(\"div\");return e.classList.add(\"lm_drop_tab_placeholder\"),e},t.defaultLocationSelectors=[{typeId:1,index:void 0},{typeId:2,index:void 0},{typeId:3,index:void 0},{typeId:7,index:void 0}],t.afterFocusedItemIfPossibleLocationSelectors=[{typeId:0,index:1},{typeId:2,index:void 0},{typeId:3,index:void 0},{typeId:7,index:void 0}]}(ae||(ae={}));class le extends ae{constructor(t,e,i,n){if(super(le.createLayoutManagerConstructorParameters(t,e)),this._bindComponentEventHanlderPassedInConstructor=!1,this._creationTimeoutPassed=!1,void 0!==e&&\"function\"==typeof e&&(this.bindComponentEvent=e,this._bindComponentEventHanlderPassedInConstructor=!0,void 0!==i&&(this.unbindComponentEvent=i)),!this._bindComponentEventHanlderPassedInConstructor&&this.isSubWindow){if(void 0===this._constructorOrSubWindowLayoutConfig)throw new J(\"VLC98823\");{const t=xt.resolve(this._constructorOrSubWindowLayoutConfig);this.layoutConfig=Object.assign(Object.assign({},t),{root:void 0})}}!0!==n&&(this.deprecatedConstructor||this.init())}destroy(){this.bindComponentEvent=void 0,this.unbindComponentEvent=void 0,super.destroy()}init(){if(this._bindComponentEventHanlderPassedInConstructor||\"loading\"!==document.readyState&&null!==document.body){if(!this._bindComponentEventHanlderPassedInConstructor&&!0===this.isSubWindow&&!this._creationTimeoutPassed)return setTimeout((()=>this.init()),7),void(this._creationTimeoutPassed=!0);!0===this.isSubWindow&&(this._bindComponentEventHanlderPassedInConstructor||this.clearHtmlAndAdjustStylesForSubWindow(),window.__glInstance=this),super.init()}else document.addEventListener(\"DOMContentLoaded\",(()=>this.init()),{passive:!0})}clearHtmlAndAdjustStylesForSubWindow(){const t=document.head,e=new Array(4);e[0]=document.querySelectorAll(\"body link\"),e[1]=document.querySelectorAll(\"body style\"),e[2]=document.querySelectorAll(\"template\"),e[3]=document.querySelectorAll(\".gl_keep\");for(let i=0;ithis.emit(\"popIn\"))),document.body.appendChild(t),!0}}bindComponent(t,e){if(void 0!==this.bindComponentEvent){return this.bindComponentEvent(t,e)}if(void 0!==this.getComponentEvent)return{virtual:!1,component:this.getComponentEvent(t,e)};{const t=`${tt[2]}: ${JSON.stringify(e)}`;throw new Z(t)}}unbindComponent(t,e,i){if(void 0!==this.unbindComponentEvent)this.unbindComponentEvent(t);else if(!e&&void 0!==this.releaseComponentEvent){if(void 0===i)throw new J(\"VCUCRCU333998\");this.releaseComponentEvent(t,i)}}}!function(t){let e=!1;t.createLayoutManagerConstructorParameters=function(t,i){const n=e?null:new URL(document.location.href).searchParams.get(\"gl-window\");e=!0;const o=null!==n;let s,r;if(null!==n){const e=localStorage.getItem(n);if(null===e)throw new Error(\"Null gl-window Config\");localStorage.removeItem(n);const i=JSON.parse(e),o=_t.unminifyConfig(i);r=xt.fromResolved(o),t instanceof HTMLElement&&(s=t)}else void 0===t?r=void 0:t instanceof HTMLElement?(r=void 0,s=t):r=t,void 0===s&&i instanceof HTMLElement&&(s=i);return{constructorOrSubWindowLayoutConfig:r,isSubWindow:o,containerElement:s}}}(le||(le={}));class he extends le{constructor(t,e,i){super(t,e,i,!0),this._componentTypesMap=new Map,this._registeredComponentMap=new Map,this._virtuableComponentMap=new Map,this._containerVirtualRectingRequiredEventListener=(t,e,i)=>this.handleContainerVirtualRectingRequiredEvent(t,e,i),this._containerVirtualVisibilityChangeRequiredEventListener=(t,e)=>this.handleContainerVirtualVisibilityChangeRequiredEvent(t,e),this._containerVirtualZIndexChangeRequiredEventListener=(t,e,i)=>this.handleContainerVirtualZIndexChangeRequiredEvent(t,e,i),this.deprecatedConstructor||this.init()}registerComponent(t,e,i=!1){if(\"function\"!=typeof e)throw new $(\"registerComponent() componentConstructorOrFactoryFtn parameter is not a function\");if(e.hasOwnProperty(\"prototype\")){const n=e;this.registerComponentConstructor(t,n,i)}else{const n=e;this.registerComponentFactoryFunction(t,n,i)}}registerComponentConstructor(t,e,i=!1){if(\"function\"!=typeof e)throw new Error(tt[1]);if(void 0!==this._componentTypesMap.get(t))throw new Z(`${tt[3]}: ${t}`);this._componentTypesMap.set(t,{constructor:e,factoryFunction:void 0,virtual:i})}registerComponentFactoryFunction(t,e,i=!1){if(\"function\"!=typeof e)throw new Z(\"Please register a constructor function\");if(void 0!==this._componentTypesMap.get(t))throw new Z(`${tt[3]}: ${t}`);this._componentTypesMap.set(t,{constructor:void 0,factoryFunction:e,virtual:i})}registerComponentFunction(t){this.registerGetComponentConstructorCallback(t)}registerGetComponentConstructorCallback(t){if(\"function\"!=typeof t)throw new Error(\"Please register a callback function\");void 0!==this._getComponentConstructorFtn&&console.warn(\"Multiple component functions are being registered. Only the final registered function will be used.\"),this._getComponentConstructorFtn=t}getRegisteredComponentTypeNames(){const t=this._componentTypesMap.keys();return Array.from(t)}getComponentInstantiator(t){let e;const i=pt.resolveComponentTypeName(t);return void 0!==i&&(e=this._componentTypesMap.get(i)),void 0===e&&void 0!==this._getComponentConstructorFtn&&(e={constructor:this._getComponentConstructorFtn(t),factoryFunction:void 0,virtual:!1}),e}bindComponent(t,e){let i;const n=pt.resolveComponentTypeName(e);let o;if(void 0!==n&&(i=this._componentTypesMap.get(n)),void 0===i&&void 0!==this._getComponentConstructorFtn&&(i={constructor:this._getComponentConstructorFtn(e),factoryFunction:void 0,virtual:!1}),void 0!==i){const s=i.virtual;let r,a;r=void 0===e.componentState?void 0:Ut({},e.componentState);const l=i.constructor;if(void 0!==l)a=new l(t,r,s);else{const e=i.factoryFunction;if(void 0===e)throw new X(\"LMBCFFU10008\");a=e(t,r,s)}if(s){if(void 0===a)throw new J(\"GLBCVCU988774\");{const e=a,i=e.rootHtmlElement;if(void 0===i)throw new Z(`${tt[5]}: ${n}`);!function(t){const e=\"absolute\";t.style.position!==e&&(t.style.position=e)}(i),this.container.appendChild(i),this._virtuableComponentMap.set(t,e),t.virtualRectingRequiredEvent=this._containerVirtualRectingRequiredEventListener,t.virtualVisibilityChangeRequiredEvent=this._containerVirtualVisibilityChangeRequiredEventListener,t.virtualZIndexChangeRequiredEvent=this._containerVirtualZIndexChangeRequiredEventListener}}this._registeredComponentMap.set(t,a),o={virtual:i.virtual,component:a}}else o=super.bindComponent(t,e);return o}unbindComponent(t,e,i){if(void 0===this._registeredComponentMap.get(t))super.unbindComponent(t,e,i);else{const e=this._virtuableComponentMap.get(t);if(void 0!==e){const i=e.rootHtmlElement;if(void 0===i)throw new X(\"GLUC77743\",t.title);this.container.removeChild(i),this._virtuableComponentMap.delete(t)}}}fireBeforeVirtualRectingEvent(t){this._goldenLayoutBoundingClientRect=this.container.getBoundingClientRect(),super.fireBeforeVirtualRectingEvent(t)}handleContainerVirtualRectingRequiredEvent(t,e,i){const n=this._virtuableComponentMap.get(t);if(void 0===n)throw new J(\"GLHCSCE55933\");{const o=n.rootHtmlElement;if(void 0===o)throw new Z(tt[4]+\" \"+t.title);{const n=t.element.getBoundingClientRect(),s=n.left-this._goldenLayoutBoundingClientRect.left;o.style.left=zt(s);const r=n.top-this._goldenLayoutBoundingClientRect.top;o.style.top=zt(r),Tt(o,e),At(o,i)}}}handleContainerVirtualVisibilityChangeRequiredEvent(t,e){const i=this._virtuableComponentMap.get(t);if(void 0===i)throw new J(\"GLHCVVCRE55934\");{const n=i.rootHtmlElement;if(void 0===n)throw new Z(tt[4]+\" \"+t.title);Dt(n,e)}}handleContainerVirtualZIndexChangeRequiredEvent(t,e,i){const n=this._virtuableComponentMap.get(t);if(void 0===n)throw new J(\"GLHCVZICRE55935\");{const e=n.rootHtmlElement;if(void 0===e)throw new Z(tt[4]+\" \"+t.title);e.style.zIndex=i}}}const de=\"initial_\",ce={show:\"top\",popout:!1,maximise:!1,close:\"close-tab-unused\"},me={headerHeight:31},ue={hasHeaders:!0,reorderEnabled:!0},pe={popoutWholeStack:!1,constrainDragToContainer:!1,constrainDragToHeaders:!1,preventDragout:!1,showMaximiseIcon:!1,showPopoutIcon:!1,showCloseIcon:!1,blockedPopoutsThrowError:!0,closePopoutsOnUnload:!0,selectionEnabled:!1};var ge,fe;class ve{constructor(e){this.layout=e,ge.set(this,void 0),fe.set(this,void 0),this.handleResize=t=>{t.forEach((t=>this.resizeElement(t.target)))},this.handleMutation=()=>{this.layout.viewComponentsByContainerElement.forEach((t=>{this.resizeElement(t.container.element)}))},t.__classPrivateFieldSet(this,ge,new ResizeObserver(this.handleResize),\"f\"),t.__classPrivateFieldSet(this,fe,new MutationObserver(this.handleMutation),\"f\")}observeMutations(e){t.__classPrivateFieldGet(this,fe,\"f\")?.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[\"class\"]})}destroy(){t.__classPrivateFieldGet(this,ge,\"f\").disconnect(),t.__classPrivateFieldGet(this,fe,\"f\").disconnect()}observeContainer(e){t.__classPrivateFieldGet(this,ge,\"f\").observe(e)}unobserveContainer(e){t.__classPrivateFieldGet(this,ge,\"f\").unobserve(e)}resizeElement(t){const e=this.layout.viewComponentsByContainerElement.get(t);e&&e.resize()}}ge=new WeakMap,fe=new WeakMap;var _e={};Object.defineProperty(_e,\"__esModule\",{value:!0});var ye=_e.BaseItem=void 0;class Ce{constructor(t,e,i){this._item=t,this._layout=e,this._wrap=i}get raw(){return this._item}get layout(){return this._layout}get type(){return this._item.type}get contentItems(){return(this._item.contentItems??[]).map((t=>this._wrap(t)))}get parent(){const t=this._item.parent;return t?this._wrap(t):null}setActiveContentItem(t,e){if(\"stack\"!==this.type)throw new Error(`Cannot call setActiveContentItem from a non-stack item: ${this.type}`);this._item.setActiveContentItem(t.raw,e)}static wrapInternal(t,e,i){const n=Ce.wrapCache.get(e);if(n)return n;const o=new t(e,i,(e=>Ce.wrapInternal(t,e,i)));return Ce.wrapCache.set(e,o),o}}ye=_e.BaseItem=Ce,Ce.wrapCache=new WeakMap;const we=t=>!!t&&\"contentItems\"in t&&(t.isRow||t.isColumn);class Ie extends ye{isRoot(){return!!this._item.parent?.isGround}getBounds(){return this._item.element.getBoundingClientRect()}get viewName(){if(this._item.isComponent){const{component:t}=this._item;return t.identity.name}throw new Error(\"View name not found\")}onDestroyed(t){const e=({target:i})=>{i===this._item&&(t(),this._item.off(\"itemDestroyed\",e))};this._item.on(\"itemDestroyed\",e)}createAdjacentStack({position:t=\"right\"}={}){const e=this.raw;if(ee.isStack(e)&&e.parent){const i=[\"top\",\"bottom\"].includes(t)?\"column\":\"row\",n=[\"left\",\"top\"].includes(t)?1:0,o=we(e.parent)?e.parent:e.layoutManager,s=o,r=e.parent.contentItems.indexOf(e);e.parent.isGround&&e.parent.removeChild(e,!0);const a=o.newItem({type:i,content:[{type:\"stack\",content:[]}]},r);if(!a)throw new Error(\"createAdjacentStack: Failed to create new container\");const l=a.contentItems[0];return a.addChild(this.raw,n),we(s)&&s.removeChild(e,!0),this._wrap(l)}throw new Error(`Cannot creat adjacent stacks for type: ${e.type}, must be type 'stack'`)}setActiveContentItem(t,e=!0){if(!ee.isStack(this._item))throw new Error(`Cannot call setActiveContentItem from a non-stack item: ${this.type}`);this._item.setActiveComponentItem(t.raw,!e)}static wrap(t,e){return ye.wrapInternal(Ie,t,e)}}function be(t=[],e){for(const i of t)\"component\"===i.type?Object.keys(e).forEach((t=>{t in i&&(i.componentState={[`${de}${t}`]:i[t],...i.componentState}),i[t]=e[t]})):be(i.content,e)}function Se(t=[],e,i){for(const n of t)if(\"component\"===n.type)Object.keys(e).forEach((t=>{if(`${de}${t}`in n.componentState)return n[t]=n.componentState[`${de}${t}`],void delete n.componentState[`${de}${t}`];n[t]=e[t]}));else{if(n.size&&(\"row\"===i||\"column\"===i)){n[\"row\"===i?\"width\":\"height\"]=n.size?.includes(\".\")?parseFloat(n.size):parseInt(n.size)}Se(n.content,e,n.type)}}function Ee(t){if(t.root){t.root.content&&Se([t.root],{componentName:\"view\",isClosable:!0});const e=t.root;t.content=[e],delete t.root}return t}const xe=e=>class extends e{connectedCallback(){if(!this.name||!this.uuid)throw new Error(\" Name or uuid attribute missing\");if(!this.src)throw new Error(\" missing 'src' attribute.\");this.#t||(this.#t=document.createElement(\"iframe\"),this.#t.src=this.src,this.#t.style.height=\"100%\",this.#t.style.width=\"100%\",this.#t.style.border=\"none\",this.forceFrameName?this.#t.setAttribute(\"name\",this.forceFrameName):this.#t.setAttribute(\"name\",t.encodeOptions({brokerUrl:this.brokerUrl,name:this.name,uuid:this.uuid,providerId:this.providerId,contextGroup:this.contextGroup},\"of-frame\")),this.#t.setAttribute(\"id\",this.name),this.appendChild(this.#t))}#t;get brokerUrl(){return this.getAttribute(\"of-broker\")}set brokerUrl(t){t&&this.setAttribute(\"of-broker\",t)}get name(){return this.getAttribute(\"of-name\")}set name(t){t&&this.setAttribute(\"of-name\",t)}get forceFrameName(){return this.getAttribute(\"forceFrameName\")}set forceFrameName(t){t&&this.setAttribute(\"forceFrameName\",t)}get uuid(){return this.getAttribute(\"of-uuid\")}set uuid(t){t&&this.setAttribute(\"of-uuid\",t)}get src(){return this.getAttribute(\"src\")}set src(t){t&&this.setAttribute(\"src\",t)}get providerId(){return this.getAttribute(\"of-provider-id\")}set providerId(t){t&&this.setAttribute(\"of-provider-id\",t)}get contextGroup(){return this.getAttribute(\"of-context-group\")}set contextGroup(t){t&&this.setAttribute(\"of-context-group\",t)}static get observedAttributes(){return[\"name\"]}};class Le{static create(t){const e=document.createElement(\"of-view\");return Object.entries(t).forEach((([t,i])=>{e.setAttribute(t,i)})),e}}customElements.define(\"of-view\",xe(HTMLElement));class ze{constructor(t,i,n,{brokerUrl:o,interopConfig:s},r){this.container=t,this.config=i,this.ofView=null,this.isDragging=()=>this.container.tab.element?.className.includes(\"lm_dragging\")??!1;const{url:a,web:l,interop:h,name:d}=i||{},c=d??`internal-generated-view-${e.v4()}`;if(this.identity={uuid:n,name:c},this.container.element.setAttribute(\"of-name\",c),this.container.element.id=`container-${c}`,this.container.parent.id=c,void 0===a)return void this.handleUrlMissing();const m=this.updateTitleIfNotSet(a),u={\"of-broker\":o,\"of-uuid\":n,\"of-name\":c,src:a};l?.frameName&&(u.forceFrameName=l.frameName);const p=h?.currentContextGroup??s?.currentContextGroup;p&&(u[\"of-context-group\"]=p),s?.providerId&&(u[\"of-provider-id\"]=s?.providerId),this.ofView=Le.create(u),this.ofView.title=m??`Iframe: ${a}`,r.appendChild(this.ofView),this.ofView.style.position=\"absolute\"}updateTitleIfNotSet(t){return\"view\"===this.container.parent.title&&this.container.parent.setTitle(t),this.container.parent.title}handleUrlMissing(){const t=document.createElement(\"div\");t.setAttribute(\"style\",\"padding: 20px\");t.innerText=\"No URL provided\",this.container.element.appendChild(t)}destroy(){this.ofView?.remove(),this.ofView=null}closeView(){this.container.close()}resize(){if(this.ofView){if(this.isDragging())return void(this.ofView.style.display=\"none\");const t=this.container.element.getBoundingClientRect();this.ofView.style.position=\"absolute\",this.ofView.style.height=`${t.height}px`,this.ofView.style.width=`${t.width}px`,this.ofView.style.inset=`${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`,this.ofView.style.display=\"block\"}}}class Me extends U{static overrideConfig(t){const e={...ue,...t.settings,...pe};return e.reorderEnabled?be(t.content,{isClosable:!0}):be(t.content,{reorderEnabled:!1}),{dimensions:me,...t,settings:e,header:{...ce,show:!1!==t.settings?.hasHeaders&&ce.show}}}constructor(t,e,i,{options:n},o,s){super(),this.identity=t,this.container=e,this.initialConfig=i,this.layoutManager=o,this.platformProvider=s,this.viewComponentsByContainerElement=new Map,this.layoutContentCache=_.getSingleInstance(),this.reparentingViews=new Set,this.goldenLayoutDestroyed=!1,this.createViewComponent=(t,e)=>{m.handleSharedView(this.layoutManager,this.identity,e);const i=new ze(t,e,this.identity.uuid,this.options,this.iframeContainer);return e&&!1===e[`${de}isClosable`]&&this.stylesheet.insertRule(`#tab-${i.identity.name} .lm_close_tab { display: none; }`),this.viewComponentsByContainerElement.set(t.element,i),this.resizeController.observeContainer(t.element),i},this.iframeContainer=document.createElement(\"div\"),this.iframeContainer.id=`openfin-layout-iframe-container-${this.identity.layoutName}`,this.domEmitter=new V(e),this.setupStylesheets(),this.layout=new he(this.container),this.layout.resizeWithContainerAutomatically=!0,this.options=n,this.layout.registerComponent(\"view\",this.createViewComponent),this.setupListeners(),this.resizeController=new ve(this),this.layout.loadLayout(Me.overrideConfig(i));const r=document.createElement(\"div\");r.id=`openfin-layout-shadow-container-${this.identity.layoutName}`,r.attachShadow({mode:\"open\",delegatesFocus:!1}).appendChild(this.iframeContainer),this.container.appendChild(r),this.resizeController.observeMutations(this.container)}getStackByView({name:t}){const e=this.layout.findFirstComponentItemById(t);if(e?.parent&&e?.parent?.isStack)return Ie.wrap(e.parent,this)}getRoot(){return Ie.wrap(this.layout.rootItem,this)}async platformCloseView(t){const e=[...this.viewComponentsByContainerElement.values()].find((e=>e.identity.name===t.name));if(!e)throw new Error(`View with name: ${t.name} not found in layout.`);e.closeView()}async platformCreateView(t,{location:e,targetView:i}={}){if(i)throw new Error(\"TargetView not supported in web\");const n={options:this.platformProvider.normalizeOptions(t),target:this.identity,location:e};return this.insertView(n)}setupStylesheets(){if(this.container.setAttribute(\"data-openfin-layout-name\",this.identity.layoutName),this.stylesheet=new CSSStyleSheet,this.stylesheet.insertRule(\".lm_close { display: none; }\"),document.adoptedStyleSheets.push(this.stylesheet),this.initialConfig.settings?.preventSplitterResize){const t=`\\n [data-openfin-layout-name='${this.identity.layoutName}'] .lm_splitter {\\n pointer-events: none;\\n }`;this.stylesheet.insertRule(t)}}insertView({options:t,location:e,targetView:i}){const n=e?this.layoutContentCache.getItemOrUndefined(e.id):void 0,o=i?this.layoutContentCache.getItemOrUndefined(i.name):void 0,s=n??o??Ie.wrap(this.layout.rootItem,this);let r;if(ee.isStack(s.raw))r=s.raw;else{if(!we(s.raw))throw new Error(\"Cannot add a view at the requested location\");r=s.raw.newItem({type:\"stack\",content:[]})}const a=Math.min(r.contentItems.length,e?.index??r.contentItems.length);let l=this.layout.findFirstComponentItemById(t.name);l?(l.parent&&l.parent.removeChild(l,!0),r.addChild(l,a)):l=r.newComponent(\"view\",t,t.title??t.url??\"Default Title\",a);const h=l.component.identity;return Promise.resolve({identity:h})}replaceView({viewToReplace:t,newView:e}){throw new Error(\"Method not implemented.\")}replaceLayout(t){throw new Error(\"Method not implemented.\")}async cleanupView(t){}applyPreset(t){throw new Error(\"Method not implemented.\")}getCurrentViews(){return[...this.viewComponentsByContainerElement.values()].map((t=>t.identity))}async getFrameSnapshot(){return Ee(xt.fromResolved(this.layout.toConfig()))}isVisible(){return W(this.container)}async onViewDetached({viewIdentity:t}){this.reparentingViews.add(t.name),this.platformCloseView(t)}async destroy(){this.goldenLayoutDestroyed||(this.goldenLayoutDestroyed=!0,this.layout.destroy()),this.iframeContainer.remove(),this.resizeController.destroy(),document.adoptedStyleSheets=document.adoptedStyleSheets.filter((t=>t!==this.stylesheet)),this.viewComponentsByContainerElement.clear()}setupListeners(){this.container.addEventListener(\"pointerdown\",(t=>{if(t.target instanceof HTMLElement){const e=t.target.classList;[\"lm_tab\",\"lm_title\",\"lm_splitter\",\"lm_drag_handle\"].some((t=>e.contains(t)))&&(this.handleDragStart(),2===t.button&&t.stopPropagation())}}),!0),document.addEventListener(\"pointerup\",(()=>this.handleDragEnd()),!0),this.layout.on(\"tabCreated\",(t=>{const e=t.componentItem.component;t.element.id=`tab-${e.identity.name}`,this.domEmitter.dispatchLocalEvent(\"tab-created\",e.identity)})),this.layout.on(\"itemCreated\",(({target:t})=>{const e=t;if(Gt.isComponentItem(e)){const t=e.component;this.domEmitter.dispatchLocalEvent(\"container-created\",t.identity)}})),this.layout.on(\"itemDestroyed\",(t=>{const e=t.target;if(Gt.isComponentItem(e)){const t=e.component;this.removeViewComponent(t)}})),this.layout.on(\"itemDropped\",(()=>{this.handleDragEnd()}))}handleDragStart(){this.iframeContainer.style.pointerEvents=\"none\"}handleDragEnd(){this.iframeContainer.style.pointerEvents=\"\"}removeViewComponent(t){if(t.config&&!1===t.config[`${de}isClosable`]){const e=[...this.stylesheet.cssRules].findIndex((e=>e.cssText.includes(`#tab-${t.identity.name}`)));this.stylesheet.deleteRule(e)}t.destroy(),this.viewComponentsByContainerElement.delete(t.container.element),this.resizeController.unobserveContainer(t.container.element),this.reparentingViews.has(t.identity.name)?this.reparentingViews.delete(t.identity.name):this.platformProvider.closeView(t.identity.name);0===this.getCurrentViews().length&&(this.goldenLayoutDestroyed||(this.goldenLayoutDestroyed=!0,m.handleLastViewRemoved(this.layoutManager,this.identity)))}}class Pe{constructor(t,e,i,n){this.windowIdentity=t,this.connectConfig=e,this.provider=i,this.fallbackContainer=n}async createLayout(t,e){if(!(\"container\"in t)&&!this.fallbackContainer)throw new Error(\"Container property is not optional in web\");const{layoutName:i}=t,n=t,o=this.provider.initLayoutViews(n),s=n.container??this.fallbackContainer,r={...this.windowIdentity,layoutName:i},a=new Me(r,s,o,this.connectConfig,e,this.provider);m.registerLayout(e,i,a),this.fallbackContainer=null}async getLayoutSnapshot(t){return t.getLayoutSnapshot()}async handleLastViewRemoved(t){}}class Te{static async init(e){const i=e.getFin().InterApplicationBus.Channel,n=await i.create(`custom-frame-${e.me.uuid}`);return n.setDefaultAction((async(t,{target:e,opts:i},o)=>{const s=n.connections.find((t=>t.name===e.name));if(s)return n.dispatch(s,t,{...i,target:e});throw new Error(`Client with name ${e.name} not found`)})),await t.relayChannelClientApi_1(n,\"layout-relay\"),new Te(e)}constructor(t){this.wire=t,this.viewNames=new Set}normalizeOptions(t,i=\"default\"){const n=this.wire.me.uuid;let{name:o=`internal-generated-view-${e.v4()}`}=t;return o.match(/^internal-generated-view-/)&&this.viewNames.has(o)&&\"duplicate\"===i&&(o=`internal-generated-view-${e.v4()}`),this.viewNames.add(o),{...t,name:o,uuid:n}}closeView(t){this.viewNames.delete(t)}initLayoutViews({layout:t,multiInstanceViewBehavior:e}){return H((t=>{if(\"component\"===t.type&&t.componentState){const i=this.normalizeOptions(t.componentState,e);return{...t,componentState:i}}return t}),t)}}var Ae;const ke=t=>t;Ae=new WeakMap,exports.WebLayoutEntryPoint=class{constructor(e){Ae.set(this,void 0),this.initLayoutManager=async(e,i,{container:n,layoutManagerOverride:o})=>{const s=await Te.init(i),r=o??ke,a=new Pe(i.me,t.__classPrivateFieldGet(this,Ae,\"f\"),s,n),l=new(r(m.createClosedConstructor(a)));return await M(i,l),l},this.applyLayoutSnapshot=async(e,i,n)=>{await i.applyLayoutSnapshot(t.__classPrivateFieldGet(this,Ae,\"f\").platform.layoutSnapshot)},this.createLayout=async(t,e)=>m.createLayout(t,e),this.destroyLayout=async(t,e)=>m.destroyLayout(t,e),t.__classPrivateFieldSet(this,Ae,e,\"f\")}};\n","'use strict'\n\nexports.byteLength = byteLength\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\nfor (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i]\n revLookup[code.charCodeAt(i)] = i\n}\n\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction getLens (b64) {\n var len = b64.length\n\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // Trim off extra bytes after placeholder bytes are found\n // See: https://github.com/beatgammit/base64-js/issues/42\n var validLen = b64.indexOf('=')\n if (validLen === -1) validLen = len\n\n var placeHoldersLen = validLen === len\n ? 0\n : 4 - (validLen % 4)\n\n return [validLen, placeHoldersLen]\n}\n\n// base64 is 4/3 + up to two characters of the original data\nfunction byteLength (b64) {\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction _byteLength (b64, validLen, placeHoldersLen) {\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction toByteArray (b64) {\n var tmp\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n\n var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))\n\n var curByte = 0\n\n // if there are placeholders, only get up to the last complete 4 chars\n var len = placeHoldersLen > 0\n ? validLen - 4\n : validLen\n\n var i\n for (i = 0; i < len; i += 4) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 18) |\n (revLookup[b64.charCodeAt(i + 1)] << 12) |\n (revLookup[b64.charCodeAt(i + 2)] << 6) |\n revLookup[b64.charCodeAt(i + 3)]\n arr[curByte++] = (tmp >> 16) & 0xFF\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 2) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 2) |\n (revLookup[b64.charCodeAt(i + 1)] >> 4)\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 1) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 10) |\n (revLookup[b64.charCodeAt(i + 1)] << 4) |\n (revLookup[b64.charCodeAt(i + 2)] >> 2)\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] +\n lookup[num >> 12 & 0x3F] +\n lookup[num >> 6 & 0x3F] +\n lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n var tmp\n var output = []\n for (var i = start; i < end; i += 3) {\n tmp =\n ((uint8[i] << 16) & 0xFF0000) +\n ((uint8[i + 1] << 8) & 0xFF00) +\n (uint8[i + 2] & 0xFF)\n output.push(tripletToBase64(tmp))\n }\n return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n var tmp\n var len = uint8.length\n var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n var parts = []\n var maxChunkLength = 16383 // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1]\n parts.push(\n lookup[tmp >> 2] +\n lookup[(tmp << 4) & 0x3F] +\n '=='\n )\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + uint8[len - 1]\n parts.push(\n lookup[tmp >> 10] +\n lookup[(tmp >> 4) & 0x3F] +\n lookup[(tmp << 2) & 0x3F] +\n '='\n )\n }\n\n return parts.join('')\n}\n","/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n/* eslint-disable no-proto */\n\n'use strict'\n\nconst base64 = require('base64-js')\nconst ieee754 = require('ieee754')\nconst customInspectSymbol =\n (typeof Symbol === 'function' && typeof Symbol['for'] === 'function') // eslint-disable-line dot-notation\n ? Symbol['for']('nodejs.util.inspect.custom') // eslint-disable-line dot-notation\n : null\n\nexports.Buffer = Buffer\nexports.SlowBuffer = SlowBuffer\nexports.INSPECT_MAX_BYTES = 50\n\nconst K_MAX_LENGTH = 0x7fffffff\nexports.kMaxLength = K_MAX_LENGTH\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Print warning and recommend using `buffer` v4.x which has an Object\n * implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * We report that the browser does not support typed arrays if the are not subclassable\n * using __proto__. Firefox 4-29 lacks support for adding new properties to `Uint8Array`\n * (See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438). IE 10 lacks support\n * for __proto__ and has a buggy typed array implementation.\n */\nBuffer.TYPED_ARRAY_SUPPORT = typedArraySupport()\n\nif (!Buffer.TYPED_ARRAY_SUPPORT && typeof console !== 'undefined' &&\n typeof console.error === 'function') {\n console.error(\n 'This browser lacks typed array (Uint8Array) support which is required by ' +\n '`buffer` v5.x. Use `buffer` v4.x if you require old browser support.'\n )\n}\n\nfunction typedArraySupport () {\n // Can typed array instances can be augmented?\n try {\n const arr = new Uint8Array(1)\n const proto = { foo: function () { return 42 } }\n Object.setPrototypeOf(proto, Uint8Array.prototype)\n Object.setPrototypeOf(arr, proto)\n return arr.foo() === 42\n } catch (e) {\n return false\n }\n}\n\nObject.defineProperty(Buffer.prototype, 'parent', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.buffer\n }\n})\n\nObject.defineProperty(Buffer.prototype, 'offset', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.byteOffset\n }\n})\n\nfunction createBuffer (length) {\n if (length > K_MAX_LENGTH) {\n throw new RangeError('The value \"' + length + '\" is invalid for option \"size\"')\n }\n // Return an augmented `Uint8Array` instance\n const buf = new Uint8Array(length)\n Object.setPrototypeOf(buf, Buffer.prototype)\n return buf\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new TypeError(\n 'The \"string\" argument must be of type string. Received type number'\n )\n }\n return allocUnsafe(arg)\n }\n return from(arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\nfunction from (value, encodingOrOffset, length) {\n if (typeof value === 'string') {\n return fromString(value, encodingOrOffset)\n }\n\n if (ArrayBuffer.isView(value)) {\n return fromArrayView(value)\n }\n\n if (value == null) {\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n }\n\n if (isInstance(value, ArrayBuffer) ||\n (value && isInstance(value.buffer, ArrayBuffer))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof SharedArrayBuffer !== 'undefined' &&\n (isInstance(value, SharedArrayBuffer) ||\n (value && isInstance(value.buffer, SharedArrayBuffer)))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof value === 'number') {\n throw new TypeError(\n 'The \"value\" argument must not be of type number. Received type number'\n )\n }\n\n const valueOf = value.valueOf && value.valueOf()\n if (valueOf != null && valueOf !== value) {\n return Buffer.from(valueOf, encodingOrOffset, length)\n }\n\n const b = fromObject(value)\n if (b) return b\n\n if (typeof Symbol !== 'undefined' && Symbol.toPrimitive != null &&\n typeof value[Symbol.toPrimitive] === 'function') {\n return Buffer.from(value[Symbol.toPrimitive]('string'), encodingOrOffset, length)\n }\n\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n return from(value, encodingOrOffset, length)\n}\n\n// Note: Change prototype *after* Buffer.from is defined to workaround Chrome bug:\n// https://github.com/feross/buffer/pull/148\nObject.setPrototypeOf(Buffer.prototype, Uint8Array.prototype)\nObject.setPrototypeOf(Buffer, Uint8Array)\n\nfunction assertSize (size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be of type number')\n } else if (size < 0) {\n throw new RangeError('The value \"' + size + '\" is invalid for option \"size\"')\n }\n}\n\nfunction alloc (size, fill, encoding) {\n assertSize(size)\n if (size <= 0) {\n return createBuffer(size)\n }\n if (fill !== undefined) {\n // Only pay attention to encoding if it's a string. This\n // prevents accidentally sending in a number that would\n // be interpreted as a start offset.\n return typeof encoding === 'string'\n ? createBuffer(size).fill(fill, encoding)\n : createBuffer(size).fill(fill)\n }\n return createBuffer(size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n return alloc(size, fill, encoding)\n}\n\nfunction allocUnsafe (size) {\n assertSize(size)\n return createBuffer(size < 0 ? 0 : checked(size) | 0)\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n return allocUnsafe(size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n return allocUnsafe(size)\n}\n\nfunction fromString (string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8'\n }\n\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n\n const length = byteLength(string, encoding) | 0\n let buf = createBuffer(length)\n\n const actual = buf.write(string, encoding)\n\n if (actual !== length) {\n // Writing a hex string, for example, that contains invalid characters will\n // cause everything after the first invalid character to be ignored. (e.g.\n // 'abxxcd' will be treated as 'ab')\n buf = buf.slice(0, actual)\n }\n\n return buf\n}\n\nfunction fromArrayLike (array) {\n const length = array.length < 0 ? 0 : checked(array.length) | 0\n const buf = createBuffer(length)\n for (let i = 0; i < length; i += 1) {\n buf[i] = array[i] & 255\n }\n return buf\n}\n\nfunction fromArrayView (arrayView) {\n if (isInstance(arrayView, Uint8Array)) {\n const copy = new Uint8Array(arrayView)\n return fromArrayBuffer(copy.buffer, copy.byteOffset, copy.byteLength)\n }\n return fromArrayLike(arrayView)\n}\n\nfunction fromArrayBuffer (array, byteOffset, length) {\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\"offset\" is outside of buffer bounds')\n }\n\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\"length\" is outside of buffer bounds')\n }\n\n let buf\n if (byteOffset === undefined && length === undefined) {\n buf = new Uint8Array(array)\n } else if (length === undefined) {\n buf = new Uint8Array(array, byteOffset)\n } else {\n buf = new Uint8Array(array, byteOffset, length)\n }\n\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(buf, Buffer.prototype)\n\n return buf\n}\n\nfunction fromObject (obj) {\n if (Buffer.isBuffer(obj)) {\n const len = checked(obj.length) | 0\n const buf = createBuffer(len)\n\n if (buf.length === 0) {\n return buf\n }\n\n obj.copy(buf, 0, 0, len)\n return buf\n }\n\n if (obj.length !== undefined) {\n if (typeof obj.length !== 'number' || numberIsNaN(obj.length)) {\n return createBuffer(0)\n }\n return fromArrayLike(obj)\n }\n\n if (obj.type === 'Buffer' && Array.isArray(obj.data)) {\n return fromArrayLike(obj.data)\n }\n}\n\nfunction checked (length) {\n // Note: cannot use `length < K_MAX_LENGTH` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= K_MAX_LENGTH) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + K_MAX_LENGTH.toString(16) + ' bytes')\n }\n return length | 0\n}\n\nfunction SlowBuffer (length) {\n if (+length != length) { // eslint-disable-line eqeqeq\n length = 0\n }\n return Buffer.alloc(+length)\n}\n\nBuffer.isBuffer = function isBuffer (b) {\n return b != null && b._isBuffer === true &&\n b !== Buffer.prototype // so Buffer.isBuffer(Buffer.prototype) will be false\n}\n\nBuffer.compare = function compare (a, b) {\n if (isInstance(a, Uint8Array)) a = Buffer.from(a, a.offset, a.byteLength)\n if (isInstance(b, Uint8Array)) b = Buffer.from(b, b.offset, b.byteLength)\n if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n throw new TypeError(\n 'The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array'\n )\n }\n\n if (a === b) return 0\n\n let x = a.length\n let y = b.length\n\n for (let i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i]\n y = b[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n switch (String(encoding).toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'latin1':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return true\n default:\n return false\n }\n}\n\nBuffer.concat = function concat (list, length) {\n if (!Array.isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n\n if (list.length === 0) {\n return Buffer.alloc(0)\n }\n\n let i\n if (length === undefined) {\n length = 0\n for (i = 0; i < list.length; ++i) {\n length += list[i].length\n }\n }\n\n const buffer = Buffer.allocUnsafe(length)\n let pos = 0\n for (i = 0; i < list.length; ++i) {\n let buf = list[i]\n if (isInstance(buf, Uint8Array)) {\n if (pos + buf.length > buffer.length) {\n if (!Buffer.isBuffer(buf)) buf = Buffer.from(buf)\n buf.copy(buffer, pos)\n } else {\n Uint8Array.prototype.set.call(\n buffer,\n buf,\n pos\n )\n }\n } else if (!Buffer.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n } else {\n buf.copy(buffer, pos)\n }\n pos += buf.length\n }\n return buffer\n}\n\nfunction byteLength (string, encoding) {\n if (Buffer.isBuffer(string)) {\n return string.length\n }\n if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) {\n return string.byteLength\n }\n if (typeof string !== 'string') {\n throw new TypeError(\n 'The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. ' +\n 'Received type ' + typeof string\n )\n }\n\n const len = string.length\n const mustMatch = (arguments.length > 2 && arguments[2] === true)\n if (!mustMatch && len === 0) return 0\n\n // Use a for loop to avoid recursion\n let loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'ascii':\n case 'latin1':\n case 'binary':\n return len\n case 'utf8':\n case 'utf-8':\n return utf8ToBytes(string).length\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return len * 2\n case 'hex':\n return len >>> 1\n case 'base64':\n return base64ToBytes(string).length\n default:\n if (loweredCase) {\n return mustMatch ? -1 : utf8ToBytes(string).length // assume utf8\n }\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n let loweredCase = false\n\n // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n // property of a typed array.\n\n // This behaves neither like String nor Uint8Array in that we set start/end\n // to their upper/lower bounds if the value passed is out of range.\n // undefined is handled specially as per ECMA-262 6th Edition,\n // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n if (start === undefined || start < 0) {\n start = 0\n }\n // Return early if start > this.length. Done here to prevent potential uint32\n // coercion fail below.\n if (start > this.length) {\n return ''\n }\n\n if (end === undefined || end > this.length) {\n end = this.length\n }\n\n if (end <= 0) {\n return ''\n }\n\n // Force coercion to uint32. This will also coerce falsey/NaN values to 0.\n end >>>= 0\n start >>>= 0\n\n if (end <= start) {\n return ''\n }\n\n if (!encoding) encoding = 'utf8'\n\n while (true) {\n switch (encoding) {\n case 'hex':\n return hexSlice(this, start, end)\n\n case 'utf8':\n case 'utf-8':\n return utf8Slice(this, start, end)\n\n case 'ascii':\n return asciiSlice(this, start, end)\n\n case 'latin1':\n case 'binary':\n return latin1Slice(this, start, end)\n\n case 'base64':\n return base64Slice(this, start, end)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return utf16leSlice(this, start, end)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = (encoding + '').toLowerCase()\n loweredCase = true\n }\n }\n}\n\n// This property is used by `Buffer.isBuffer` (and the `is-buffer` npm package)\n// to detect a Buffer instance. It's not possible to use `instanceof Buffer`\n// reliably in a browserify context because there could be multiple different\n// copies of the 'buffer' package in use. This method works even for Buffer\n// instances that were created from another copy of the `buffer` package.\n// See: https://github.com/feross/buffer/issues/154\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n const i = b[n]\n b[n] = b[m]\n b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n const len = this.length\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits')\n }\n for (let i = 0; i < len; i += 2) {\n swap(this, i, i + 1)\n }\n return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n const len = this.length\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits')\n }\n for (let i = 0; i < len; i += 4) {\n swap(this, i, i + 3)\n swap(this, i + 1, i + 2)\n }\n return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n const len = this.length\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits')\n }\n for (let i = 0; i < len; i += 8) {\n swap(this, i, i + 7)\n swap(this, i + 1, i + 6)\n swap(this, i + 2, i + 5)\n swap(this, i + 3, i + 4)\n }\n return this\n}\n\nBuffer.prototype.toString = function toString () {\n const length = this.length\n if (length === 0) return ''\n if (arguments.length === 0) return utf8Slice(this, 0, length)\n return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.toLocaleString = Buffer.prototype.toString\n\nBuffer.prototype.equals = function equals (b) {\n if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n if (this === b) return true\n return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n let str = ''\n const max = exports.INSPECT_MAX_BYTES\n str = this.toString('hex', 0, max).replace(/(.{2})/g, '$1 ').trim()\n if (this.length > max) str += ' ... '\n return ''\n}\nif (customInspectSymbol) {\n Buffer.prototype[customInspectSymbol] = Buffer.prototype.inspect\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n if (isInstance(target, Uint8Array)) {\n target = Buffer.from(target, target.offset, target.byteLength)\n }\n if (!Buffer.isBuffer(target)) {\n throw new TypeError(\n 'The \"target\" argument must be one of type Buffer or Uint8Array. ' +\n 'Received type ' + (typeof target)\n )\n }\n\n if (start === undefined) {\n start = 0\n }\n if (end === undefined) {\n end = target ? target.length : 0\n }\n if (thisStart === undefined) {\n thisStart = 0\n }\n if (thisEnd === undefined) {\n thisEnd = this.length\n }\n\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError('out of range index')\n }\n\n if (thisStart >= thisEnd && start >= end) {\n return 0\n }\n if (thisStart >= thisEnd) {\n return -1\n }\n if (start >= end) {\n return 1\n }\n\n start >>>= 0\n end >>>= 0\n thisStart >>>= 0\n thisEnd >>>= 0\n\n if (this === target) return 0\n\n let x = thisEnd - thisStart\n let y = end - start\n const len = Math.min(x, y)\n\n const thisCopy = this.slice(thisStart, thisEnd)\n const targetCopy = target.slice(start, end)\n\n for (let i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i]\n y = targetCopy[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (numberIsNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [val], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n let indexSize = 1\n let arrLength = arr.length\n let valLength = val.length\n\n if (encoding !== undefined) {\n encoding = String(encoding).toLowerCase()\n if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n encoding === 'utf16le' || encoding === 'utf-16le') {\n if (arr.length < 2 || val.length < 2) {\n return -1\n }\n indexSize = 2\n arrLength /= 2\n valLength /= 2\n byteOffset /= 2\n }\n }\n\n function read (buf, i) {\n if (indexSize === 1) {\n return buf[i]\n } else {\n return buf.readUInt16BE(i * indexSize)\n }\n }\n\n let i\n if (dir) {\n let foundIndex = -1\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1) foundIndex = i\n if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n } else {\n if (foundIndex !== -1) i -= i - foundIndex\n foundIndex = -1\n }\n }\n } else {\n if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n for (i = byteOffset; i >= 0; i--) {\n let found = true\n for (let j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false\n break\n }\n }\n if (found) return i\n }\n }\n\n return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n offset = Number(offset) || 0\n const remaining = buf.length - offset\n if (!length) {\n length = remaining\n } else {\n length = Number(length)\n if (length > remaining) {\n length = remaining\n }\n }\n\n const strLen = string.length\n\n if (length > strLen / 2) {\n length = strLen / 2\n }\n let i\n for (i = 0; i < length; ++i) {\n const parsed = parseInt(string.substr(i * 2, 2), 16)\n if (numberIsNaN(parsed)) return i\n buf[offset + i] = parsed\n }\n return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n // Buffer#write(string)\n if (offset === undefined) {\n encoding = 'utf8'\n length = this.length\n offset = 0\n // Buffer#write(string, encoding)\n } else if (length === undefined && typeof offset === 'string') {\n encoding = offset\n length = this.length\n offset = 0\n // Buffer#write(string, offset[, length][, encoding])\n } else if (isFinite(offset)) {\n offset = offset >>> 0\n if (isFinite(length)) {\n length = length >>> 0\n if (encoding === undefined) encoding = 'utf8'\n } else {\n encoding = length\n length = undefined\n }\n } else {\n throw new Error(\n 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n )\n }\n\n const remaining = this.length - offset\n if (length === undefined || length > remaining) length = remaining\n\n if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n throw new RangeError('Attempt to write outside buffer bounds')\n }\n\n if (!encoding) encoding = 'utf8'\n\n let loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'hex':\n return hexWrite(this, string, offset, length)\n\n case 'utf8':\n case 'utf-8':\n return utf8Write(this, string, offset, length)\n\n case 'ascii':\n case 'latin1':\n case 'binary':\n return asciiWrite(this, string, offset, length)\n\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return base64Write(this, string, offset, length)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return ucs2Write(this, string, offset, length)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0)\n }\n}\n\nfunction base64Slice (buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf)\n } else {\n return base64.fromByteArray(buf.slice(start, end))\n }\n}\n\nfunction utf8Slice (buf, start, end) {\n end = Math.min(buf.length, end)\n const res = []\n\n let i = start\n while (i < end) {\n const firstByte = buf[i]\n let codePoint = null\n let bytesPerSequence = (firstByte > 0xEF)\n ? 4\n : (firstByte > 0xDF)\n ? 3\n : (firstByte > 0xBF)\n ? 2\n : 1\n\n if (i + bytesPerSequence <= end) {\n let secondByte, thirdByte, fourthByte, tempCodePoint\n\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 0x80) {\n codePoint = firstByte\n }\n break\n case 2:\n secondByte = buf[i + 1]\n if ((secondByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n if (tempCodePoint > 0x7F) {\n codePoint = tempCodePoint\n }\n }\n break\n case 3:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n codePoint = tempCodePoint\n }\n }\n break\n case 4:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n fourthByte = buf[i + 3]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n codePoint = tempCodePoint\n }\n }\n }\n }\n\n if (codePoint === null) {\n // we did not generate a valid codePoint so insert a\n // replacement char (U+FFFD) and advance only 1 byte\n codePoint = 0xFFFD\n bytesPerSequence = 1\n } else if (codePoint > 0xFFFF) {\n // encode to utf16 (surrogate pair dance)\n codePoint -= 0x10000\n res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n codePoint = 0xDC00 | codePoint & 0x3FF\n }\n\n res.push(codePoint)\n i += bytesPerSequence\n }\n\n return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nconst MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n const len = codePoints.length\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n }\n\n // Decode in chunks to avoid \"call stack size exceeded\".\n let res = ''\n let i = 0\n while (i < len) {\n res += String.fromCharCode.apply(\n String,\n codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n )\n }\n return res\n}\n\nfunction asciiSlice (buf, start, end) {\n let ret = ''\n end = Math.min(buf.length, end)\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F)\n }\n return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n let ret = ''\n end = Math.min(buf.length, end)\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i])\n }\n return ret\n}\n\nfunction hexSlice (buf, start, end) {\n const len = buf.length\n\n if (!start || start < 0) start = 0\n if (!end || end < 0 || end > len) end = len\n\n let out = ''\n for (let i = start; i < end; ++i) {\n out += hexSliceLookupTable[buf[i]]\n }\n return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n const bytes = buf.slice(start, end)\n let res = ''\n // If bytes.length is odd, the last 8 bits must be ignored (same as node.js)\n for (let i = 0; i < bytes.length - 1; i += 2) {\n res += String.fromCharCode(bytes[i] + (bytes[i + 1] * 256))\n }\n return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n const len = this.length\n start = ~~start\n end = end === undefined ? len : ~~end\n\n if (start < 0) {\n start += len\n if (start < 0) start = 0\n } else if (start > len) {\n start = len\n }\n\n if (end < 0) {\n end += len\n if (end < 0) end = 0\n } else if (end > len) {\n end = len\n }\n\n if (end < start) end = start\n\n const newBuf = this.subarray(start, end)\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(newBuf, Buffer.prototype)\n\n return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUintLE =\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let val = this[offset]\n let mul = 1\n let i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUintBE =\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n checkOffset(offset, byteLength, this.length)\n }\n\n let val = this[offset + --byteLength]\n let mul = 1\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUint8 =\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n return this[offset]\n}\n\nBuffer.prototype.readUint16LE =\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUint16BE =\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUint32LE =\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return ((this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16)) +\n (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUint32BE =\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] * 0x1000000) +\n ((this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n this[offset + 3])\n}\n\nBuffer.prototype.readBigUInt64LE = defineBigIntMethod(function readBigUInt64LE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const lo = first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24\n\n const hi = this[++offset] +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n last * 2 ** 24\n\n return BigInt(lo) + (BigInt(hi) << BigInt(32))\n})\n\nBuffer.prototype.readBigUInt64BE = defineBigIntMethod(function readBigUInt64BE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const hi = first * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset]\n\n const lo = this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last\n\n return (BigInt(hi) << BigInt(32)) + BigInt(lo)\n})\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let val = this[offset]\n let mul = 1\n let i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let i = byteLength\n let mul = 1\n let val = this[offset + --i]\n while (i > 0 && (mul *= 0x100)) {\n val += this[offset + --i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n if (!(this[offset] & 0x80)) return (this[offset])\n return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n const val = this[offset] | (this[offset + 1] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n const val = this[offset + 1] | (this[offset] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16) |\n (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] << 24) |\n (this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n (this[offset + 3])\n}\n\nBuffer.prototype.readBigInt64LE = defineBigIntMethod(function readBigInt64LE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const val = this[offset + 4] +\n this[offset + 5] * 2 ** 8 +\n this[offset + 6] * 2 ** 16 +\n (last << 24) // Overflow\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24)\n})\n\nBuffer.prototype.readBigInt64BE = defineBigIntMethod(function readBigInt64BE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const val = (first << 24) + // Overflow\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset]\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last)\n})\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUintLE =\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n let mul = 1\n let i = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUintBE =\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n let i = byteLength - 1\n let mul = 1\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUint8 =\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeUint16LE =\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeUint16BE =\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeUint32LE =\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset + 3] = (value >>> 24)\n this[offset + 2] = (value >>> 16)\n this[offset + 1] = (value >>> 8)\n this[offset] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeUint32BE =\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nfunction wrtBigUInt64LE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7)\n\n let lo = Number(value & BigInt(0xffffffff))\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n return offset\n}\n\nfunction wrtBigUInt64BE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7)\n\n let lo = Number(value & BigInt(0xffffffff))\n buf[offset + 7] = lo\n lo = lo >> 8\n buf[offset + 6] = lo\n lo = lo >> 8\n buf[offset + 5] = lo\n lo = lo >> 8\n buf[offset + 4] = lo\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n buf[offset + 3] = hi\n hi = hi >> 8\n buf[offset + 2] = hi\n hi = hi >> 8\n buf[offset + 1] = hi\n hi = hi >> 8\n buf[offset] = hi\n return offset + 8\n}\n\nBuffer.prototype.writeBigUInt64LE = defineBigIntMethod(function writeBigUInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeBigUInt64BE = defineBigIntMethod(function writeBigUInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n let i = 0\n let mul = 1\n let sub = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n let i = byteLength - 1\n let mul = 1\n let sub = 0\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n if (value < 0) value = 0xff + value + 1\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n this[offset + 2] = (value >>> 16)\n this[offset + 3] = (value >>> 24)\n return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (value < 0) value = 0xffffffff + value + 1\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeBigInt64LE = defineBigIntMethod(function writeBigInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nBuffer.prototype.writeBigInt64BE = defineBigIntMethod(function writeBigInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n }\n ieee754.write(buf, value, offset, littleEndian, 23, 4)\n return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n }\n ieee754.write(buf, value, offset, littleEndian, 52, 8)\n return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n if (!Buffer.isBuffer(target)) throw new TypeError('argument should be a Buffer')\n if (!start) start = 0\n if (!end && end !== 0) end = this.length\n if (targetStart >= target.length) targetStart = target.length\n if (!targetStart) targetStart = 0\n if (end > 0 && end < start) end = start\n\n // Copy 0 bytes; we're done\n if (end === start) return 0\n if (target.length === 0 || this.length === 0) return 0\n\n // Fatal error conditions\n if (targetStart < 0) {\n throw new RangeError('targetStart out of bounds')\n }\n if (start < 0 || start >= this.length) throw new RangeError('Index out of range')\n if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n // Are we oob?\n if (end > this.length) end = this.length\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start\n }\n\n const len = end - start\n\n if (this === target && typeof Uint8Array.prototype.copyWithin === 'function') {\n // Use built-in when available, missing from IE11\n this.copyWithin(targetStart, start, end)\n } else {\n Uint8Array.prototype.set.call(\n target,\n this.subarray(start, end),\n targetStart\n )\n }\n\n return len\n}\n\n// Usage:\n// buffer.fill(number[, offset[, end]])\n// buffer.fill(buffer[, offset[, end]])\n// buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n // Handle string cases:\n if (typeof val === 'string') {\n if (typeof start === 'string') {\n encoding = start\n start = 0\n end = this.length\n } else if (typeof end === 'string') {\n encoding = end\n end = this.length\n }\n if (encoding !== undefined && typeof encoding !== 'string') {\n throw new TypeError('encoding must be a string')\n }\n if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n if (val.length === 1) {\n const code = val.charCodeAt(0)\n if ((encoding === 'utf8' && code < 128) ||\n encoding === 'latin1') {\n // Fast path: If `val` fits into a single byte, use that numeric value.\n val = code\n }\n }\n } else if (typeof val === 'number') {\n val = val & 255\n } else if (typeof val === 'boolean') {\n val = Number(val)\n }\n\n // Invalid ranges are not set to a default, so can range check early.\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError('Out of range index')\n }\n\n if (end <= start) {\n return this\n }\n\n start = start >>> 0\n end = end === undefined ? this.length : end >>> 0\n\n if (!val) val = 0\n\n let i\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val\n }\n } else {\n const bytes = Buffer.isBuffer(val)\n ? val\n : Buffer.from(val, encoding)\n const len = bytes.length\n if (len === 0) {\n throw new TypeError('The value \"' + val +\n '\" is invalid for argument \"value\"')\n }\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len]\n }\n }\n\n return this\n}\n\n// CUSTOM ERRORS\n// =============\n\n// Simplified versions from Node, changed for Buffer-only usage\nconst errors = {}\nfunction E (sym, getMessage, Base) {\n errors[sym] = class NodeError extends Base {\n constructor () {\n super()\n\n Object.defineProperty(this, 'message', {\n value: getMessage.apply(this, arguments),\n writable: true,\n configurable: true\n })\n\n // Add the error code to the name to include it in the stack trace.\n this.name = `${this.name} [${sym}]`\n // Access the stack to generate the error message including the error code\n // from the name.\n this.stack // eslint-disable-line no-unused-expressions\n // Reset the name to the actual name.\n delete this.name\n }\n\n get code () {\n return sym\n }\n\n set code (value) {\n Object.defineProperty(this, 'code', {\n configurable: true,\n enumerable: true,\n value,\n writable: true\n })\n }\n\n toString () {\n return `${this.name} [${sym}]: ${this.message}`\n }\n }\n}\n\nE('ERR_BUFFER_OUT_OF_BOUNDS',\n function (name) {\n if (name) {\n return `${name} is outside of buffer bounds`\n }\n\n return 'Attempt to access memory outside buffer bounds'\n }, RangeError)\nE('ERR_INVALID_ARG_TYPE',\n function (name, actual) {\n return `The \"${name}\" argument must be of type number. Received type ${typeof actual}`\n }, TypeError)\nE('ERR_OUT_OF_RANGE',\n function (str, range, input) {\n let msg = `The value of \"${str}\" is out of range.`\n let received = input\n if (Number.isInteger(input) && Math.abs(input) > 2 ** 32) {\n received = addNumericalSeparator(String(input))\n } else if (typeof input === 'bigint') {\n received = String(input)\n if (input > BigInt(2) ** BigInt(32) || input < -(BigInt(2) ** BigInt(32))) {\n received = addNumericalSeparator(received)\n }\n received += 'n'\n }\n msg += ` It must be ${range}. Received ${received}`\n return msg\n }, RangeError)\n\nfunction addNumericalSeparator (val) {\n let res = ''\n let i = val.length\n const start = val[0] === '-' ? 1 : 0\n for (; i >= start + 4; i -= 3) {\n res = `_${val.slice(i - 3, i)}${res}`\n }\n return `${val.slice(0, i)}${res}`\n}\n\n// CHECK FUNCTIONS\n// ===============\n\nfunction checkBounds (buf, offset, byteLength) {\n validateNumber(offset, 'offset')\n if (buf[offset] === undefined || buf[offset + byteLength] === undefined) {\n boundsError(offset, buf.length - (byteLength + 1))\n }\n}\n\nfunction checkIntBI (value, min, max, buf, offset, byteLength) {\n if (value > max || value < min) {\n const n = typeof min === 'bigint' ? 'n' : ''\n let range\n if (byteLength > 3) {\n if (min === 0 || min === BigInt(0)) {\n range = `>= 0${n} and < 2${n} ** ${(byteLength + 1) * 8}${n}`\n } else {\n range = `>= -(2${n} ** ${(byteLength + 1) * 8 - 1}${n}) and < 2 ** ` +\n `${(byteLength + 1) * 8 - 1}${n}`\n }\n } else {\n range = `>= ${min}${n} and <= ${max}${n}`\n }\n throw new errors.ERR_OUT_OF_RANGE('value', range, value)\n }\n checkBounds(buf, offset, byteLength)\n}\n\nfunction validateNumber (value, name) {\n if (typeof value !== 'number') {\n throw new errors.ERR_INVALID_ARG_TYPE(name, 'number', value)\n }\n}\n\nfunction boundsError (value, length, type) {\n if (Math.floor(value) !== value) {\n validateNumber(value, type)\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset', 'an integer', value)\n }\n\n if (length < 0) {\n throw new errors.ERR_BUFFER_OUT_OF_BOUNDS()\n }\n\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset',\n `>= ${type ? 1 : 0} and <= ${length}`,\n value)\n}\n\n// HELPER FUNCTIONS\n// ================\n\nconst INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n // Node takes equal signs as end of the Base64 encoding\n str = str.split('=')[0]\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = str.trim().replace(INVALID_BASE64_RE, '')\n // Node converts strings with length < 2 to ''\n if (str.length < 2) return ''\n // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n while (str.length % 4 !== 0) {\n str = str + '='\n }\n return str\n}\n\nfunction utf8ToBytes (string, units) {\n units = units || Infinity\n let codePoint\n const length = string.length\n let leadSurrogate = null\n const bytes = []\n\n for (let i = 0; i < length; ++i) {\n codePoint = string.charCodeAt(i)\n\n // is surrogate component\n if (codePoint > 0xD7FF && codePoint < 0xE000) {\n // last char was a lead\n if (!leadSurrogate) {\n // no lead yet\n if (codePoint > 0xDBFF) {\n // unexpected trail\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n } else if (i + 1 === length) {\n // unpaired lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n }\n\n // valid lead\n leadSurrogate = codePoint\n\n continue\n }\n\n // 2 leads in a row\n if (codePoint < 0xDC00) {\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n leadSurrogate = codePoint\n continue\n }\n\n // valid surrogate pair\n codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n } else if (leadSurrogate) {\n // valid bmp char, but last char was a lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n }\n\n leadSurrogate = null\n\n // encode utf8\n if (codePoint < 0x80) {\n if ((units -= 1) < 0) break\n bytes.push(codePoint)\n } else if (codePoint < 0x800) {\n if ((units -= 2) < 0) break\n bytes.push(\n codePoint >> 0x6 | 0xC0,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x10000) {\n if ((units -= 3) < 0) break\n bytes.push(\n codePoint >> 0xC | 0xE0,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x110000) {\n if ((units -= 4) < 0) break\n bytes.push(\n codePoint >> 0x12 | 0xF0,\n codePoint >> 0xC & 0x3F | 0x80,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else {\n throw new Error('Invalid code point')\n }\n }\n\n return bytes\n}\n\nfunction asciiToBytes (str) {\n const byteArray = []\n for (let i = 0; i < str.length; ++i) {\n // Node's code seems to be doing this and not & 0x7F..\n byteArray.push(str.charCodeAt(i) & 0xFF)\n }\n return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n let c, hi, lo\n const byteArray = []\n for (let i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0) break\n\n c = str.charCodeAt(i)\n hi = c >> 8\n lo = c % 256\n byteArray.push(lo)\n byteArray.push(hi)\n }\n\n return byteArray\n}\n\nfunction base64ToBytes (str) {\n return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n let i\n for (i = 0; i < length; ++i) {\n if ((i + offset >= dst.length) || (i >= src.length)) break\n dst[i + offset] = src[i]\n }\n return i\n}\n\n// ArrayBuffer or Uint8Array objects from other contexts (i.e. iframes) do not pass\n// the `instanceof` check but they should be treated as of that type.\n// See: https://github.com/feross/buffer/issues/166\nfunction isInstance (obj, type) {\n return obj instanceof type ||\n (obj != null && obj.constructor != null && obj.constructor.name != null &&\n obj.constructor.name === type.name)\n}\nfunction numberIsNaN (obj) {\n // For IE11 support\n return obj !== obj // eslint-disable-line no-self-compare\n}\n\n// Create lookup table for `toString('hex')`\n// See: https://github.com/feross/buffer/issues/219\nconst hexSliceLookupTable = (function () {\n const alphabet = '0123456789abcdef'\n const table = new Array(256)\n for (let i = 0; i < 16; ++i) {\n const i16 = i * 16\n for (let j = 0; j < 16; ++j) {\n table[i16 + j] = alphabet[i] + alphabet[j]\n }\n }\n return table\n})()\n\n// Return not function with Error if BigInt not supported\nfunction defineBigIntMethod (fn) {\n return typeof BigInt === 'undefined' ? BufferBigIntNotDefined : fn\n}\n\nfunction BufferBigIntNotDefined () {\n throw new Error('BigInt not supported')\n}\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\nvar R = typeof Reflect === 'object' ? Reflect : null\nvar ReflectApply = R && typeof R.apply === 'function'\n ? R.apply\n : function ReflectApply(target, receiver, args) {\n return Function.prototype.apply.call(target, receiver, args);\n }\n\nvar ReflectOwnKeys\nif (R && typeof R.ownKeys === 'function') {\n ReflectOwnKeys = R.ownKeys\n} else if (Object.getOwnPropertySymbols) {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target)\n .concat(Object.getOwnPropertySymbols(target));\n };\n} else {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target);\n };\n}\n\nfunction ProcessEmitWarning(warning) {\n if (console && console.warn) console.warn(warning);\n}\n\nvar NumberIsNaN = Number.isNaN || function NumberIsNaN(value) {\n return value !== value;\n}\n\nfunction EventEmitter() {\n EventEmitter.init.call(this);\n}\nmodule.exports = EventEmitter;\nmodule.exports.once = once;\n\n// Backwards-compat with node 0.10.x\nEventEmitter.EventEmitter = EventEmitter;\n\nEventEmitter.prototype._events = undefined;\nEventEmitter.prototype._eventsCount = 0;\nEventEmitter.prototype._maxListeners = undefined;\n\n// By default EventEmitters will print a warning if more than 10 listeners are\n// added to it. This is a useful default which helps finding memory leaks.\nvar defaultMaxListeners = 10;\n\nfunction checkListener(listener) {\n if (typeof listener !== 'function') {\n throw new TypeError('The \"listener\" argument must be of type Function. Received type ' + typeof listener);\n }\n}\n\nObject.defineProperty(EventEmitter, 'defaultMaxListeners', {\n enumerable: true,\n get: function() {\n return defaultMaxListeners;\n },\n set: function(arg) {\n if (typeof arg !== 'number' || arg < 0 || NumberIsNaN(arg)) {\n throw new RangeError('The value of \"defaultMaxListeners\" is out of range. It must be a non-negative number. Received ' + arg + '.');\n }\n defaultMaxListeners = arg;\n }\n});\n\nEventEmitter.init = function() {\n\n if (this._events === undefined ||\n this._events === Object.getPrototypeOf(this)._events) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n }\n\n this._maxListeners = this._maxListeners || undefined;\n};\n\n// Obviously not all Emitters should be limited to 10. This function allows\n// that to be increased. Set to zero for unlimited.\nEventEmitter.prototype.setMaxListeners = function setMaxListeners(n) {\n if (typeof n !== 'number' || n < 0 || NumberIsNaN(n)) {\n throw new RangeError('The value of \"n\" is out of range. It must be a non-negative number. Received ' + n + '.');\n }\n this._maxListeners = n;\n return this;\n};\n\nfunction _getMaxListeners(that) {\n if (that._maxListeners === undefined)\n return EventEmitter.defaultMaxListeners;\n return that._maxListeners;\n}\n\nEventEmitter.prototype.getMaxListeners = function getMaxListeners() {\n return _getMaxListeners(this);\n};\n\nEventEmitter.prototype.emit = function emit(type) {\n var args = [];\n for (var i = 1; i < arguments.length; i++) args.push(arguments[i]);\n var doError = (type === 'error');\n\n var events = this._events;\n if (events !== undefined)\n doError = (doError && events.error === undefined);\n else if (!doError)\n return false;\n\n // If there is no 'error' event listener then throw.\n if (doError) {\n var er;\n if (args.length > 0)\n er = args[0];\n if (er instanceof Error) {\n // Note: The comments on the `throw` lines are intentional, they show\n // up in Node's output if this results in an unhandled exception.\n throw er; // Unhandled 'error' event\n }\n // At least give some kind of context to the user\n var err = new Error('Unhandled error.' + (er ? ' (' + er.message + ')' : ''));\n err.context = er;\n throw err; // Unhandled 'error' event\n }\n\n var handler = events[type];\n\n if (handler === undefined)\n return false;\n\n if (typeof handler === 'function') {\n ReflectApply(handler, this, args);\n } else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n ReflectApply(listeners[i], this, args);\n }\n\n return true;\n};\n\nfunction _addListener(target, type, listener, prepend) {\n var m;\n var events;\n var existing;\n\n checkListener(listener);\n\n events = target._events;\n if (events === undefined) {\n events = target._events = Object.create(null);\n target._eventsCount = 0;\n } else {\n // To avoid recursion in the case that type === \"newListener\"! Before\n // adding it to the listeners, first emit \"newListener\".\n if (events.newListener !== undefined) {\n target.emit('newListener', type,\n listener.listener ? listener.listener : listener);\n\n // Re-assign `events` because a newListener handler could have caused the\n // this._events to be assigned to a new object\n events = target._events;\n }\n existing = events[type];\n }\n\n if (existing === undefined) {\n // Optimize the case of one listener. Don't need the extra array object.\n existing = events[type] = listener;\n ++target._eventsCount;\n } else {\n if (typeof existing === 'function') {\n // Adding the second element, need to change to array.\n existing = events[type] =\n prepend ? [listener, existing] : [existing, listener];\n // If we've already got an array, just append.\n } else if (prepend) {\n existing.unshift(listener);\n } else {\n existing.push(listener);\n }\n\n // Check for listener leak\n m = _getMaxListeners(target);\n if (m > 0 && existing.length > m && !existing.warned) {\n existing.warned = true;\n // No error code for this since it is a Warning\n // eslint-disable-next-line no-restricted-syntax\n var w = new Error('Possible EventEmitter memory leak detected. ' +\n existing.length + ' ' + String(type) + ' listeners ' +\n 'added. Use emitter.setMaxListeners() to ' +\n 'increase limit');\n w.name = 'MaxListenersExceededWarning';\n w.emitter = target;\n w.type = type;\n w.count = existing.length;\n ProcessEmitWarning(w);\n }\n }\n\n return target;\n}\n\nEventEmitter.prototype.addListener = function addListener(type, listener) {\n return _addListener(this, type, listener, false);\n};\n\nEventEmitter.prototype.on = EventEmitter.prototype.addListener;\n\nEventEmitter.prototype.prependListener =\n function prependListener(type, listener) {\n return _addListener(this, type, listener, true);\n };\n\nfunction onceWrapper() {\n if (!this.fired) {\n this.target.removeListener(this.type, this.wrapFn);\n this.fired = true;\n if (arguments.length === 0)\n return this.listener.call(this.target);\n return this.listener.apply(this.target, arguments);\n }\n}\n\nfunction _onceWrap(target, type, listener) {\n var state = { fired: false, wrapFn: undefined, target: target, type: type, listener: listener };\n var wrapped = onceWrapper.bind(state);\n wrapped.listener = listener;\n state.wrapFn = wrapped;\n return wrapped;\n}\n\nEventEmitter.prototype.once = function once(type, listener) {\n checkListener(listener);\n this.on(type, _onceWrap(this, type, listener));\n return this;\n};\n\nEventEmitter.prototype.prependOnceListener =\n function prependOnceListener(type, listener) {\n checkListener(listener);\n this.prependListener(type, _onceWrap(this, type, listener));\n return this;\n };\n\n// Emits a 'removeListener' event if and only if the listener was removed.\nEventEmitter.prototype.removeListener =\n function removeListener(type, listener) {\n var list, events, position, i, originalListener;\n\n checkListener(listener);\n\n events = this._events;\n if (events === undefined)\n return this;\n\n list = events[type];\n if (list === undefined)\n return this;\n\n if (list === listener || list.listener === listener) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else {\n delete events[type];\n if (events.removeListener)\n this.emit('removeListener', type, list.listener || listener);\n }\n } else if (typeof list !== 'function') {\n position = -1;\n\n for (i = list.length - 1; i >= 0; i--) {\n if (list[i] === listener || list[i].listener === listener) {\n originalListener = list[i].listener;\n position = i;\n break;\n }\n }\n\n if (position < 0)\n return this;\n\n if (position === 0)\n list.shift();\n else {\n spliceOne(list, position);\n }\n\n if (list.length === 1)\n events[type] = list[0];\n\n if (events.removeListener !== undefined)\n this.emit('removeListener', type, originalListener || listener);\n }\n\n return this;\n };\n\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\n\nEventEmitter.prototype.removeAllListeners =\n function removeAllListeners(type) {\n var listeners, events, i;\n\n events = this._events;\n if (events === undefined)\n return this;\n\n // not listening for removeListener, no need to emit\n if (events.removeListener === undefined) {\n if (arguments.length === 0) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n } else if (events[type] !== undefined) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else\n delete events[type];\n }\n return this;\n }\n\n // emit removeListener for all listeners on all events\n if (arguments.length === 0) {\n var keys = Object.keys(events);\n var key;\n for (i = 0; i < keys.length; ++i) {\n key = keys[i];\n if (key === 'removeListener') continue;\n this.removeAllListeners(key);\n }\n this.removeAllListeners('removeListener');\n this._events = Object.create(null);\n this._eventsCount = 0;\n return this;\n }\n\n listeners = events[type];\n\n if (typeof listeners === 'function') {\n this.removeListener(type, listeners);\n } else if (listeners !== undefined) {\n // LIFO order\n for (i = listeners.length - 1; i >= 0; i--) {\n this.removeListener(type, listeners[i]);\n }\n }\n\n return this;\n };\n\nfunction _listeners(target, type, unwrap) {\n var events = target._events;\n\n if (events === undefined)\n return [];\n\n var evlistener = events[type];\n if (evlistener === undefined)\n return [];\n\n if (typeof evlistener === 'function')\n return unwrap ? [evlistener.listener || evlistener] : [evlistener];\n\n return unwrap ?\n unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length);\n}\n\nEventEmitter.prototype.listeners = function listeners(type) {\n return _listeners(this, type, true);\n};\n\nEventEmitter.prototype.rawListeners = function rawListeners(type) {\n return _listeners(this, type, false);\n};\n\nEventEmitter.listenerCount = function(emitter, type) {\n if (typeof emitter.listenerCount === 'function') {\n return emitter.listenerCount(type);\n } else {\n return listenerCount.call(emitter, type);\n }\n};\n\nEventEmitter.prototype.listenerCount = listenerCount;\nfunction listenerCount(type) {\n var events = this._events;\n\n if (events !== undefined) {\n var evlistener = events[type];\n\n if (typeof evlistener === 'function') {\n return 1;\n } else if (evlistener !== undefined) {\n return evlistener.length;\n }\n }\n\n return 0;\n}\n\nEventEmitter.prototype.eventNames = function eventNames() {\n return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : [];\n};\n\nfunction arrayClone(arr, n) {\n var copy = new Array(n);\n for (var i = 0; i < n; ++i)\n copy[i] = arr[i];\n return copy;\n}\n\nfunction spliceOne(list, index) {\n for (; index + 1 < list.length; index++)\n list[index] = list[index + 1];\n list.pop();\n}\n\nfunction unwrapListeners(arr) {\n var ret = new Array(arr.length);\n for (var i = 0; i < ret.length; ++i) {\n ret[i] = arr[i].listener || arr[i];\n }\n return ret;\n}\n\nfunction once(emitter, name) {\n return new Promise(function (resolve, reject) {\n function errorListener(err) {\n emitter.removeListener(name, resolver);\n reject(err);\n }\n\n function resolver() {\n if (typeof emitter.removeListener === 'function') {\n emitter.removeListener('error', errorListener);\n }\n resolve([].slice.call(arguments));\n };\n\n eventTargetAgnosticAddListener(emitter, name, resolver, { once: true });\n if (name !== 'error') {\n addErrorHandlerIfEventEmitter(emitter, errorListener, { once: true });\n }\n });\n}\n\nfunction addErrorHandlerIfEventEmitter(emitter, handler, flags) {\n if (typeof emitter.on === 'function') {\n eventTargetAgnosticAddListener(emitter, 'error', handler, flags);\n }\n}\n\nfunction eventTargetAgnosticAddListener(emitter, name, listener, flags) {\n if (typeof emitter.on === 'function') {\n if (flags.once) {\n emitter.once(name, listener);\n } else {\n emitter.on(name, listener);\n }\n } else if (typeof emitter.addEventListener === 'function') {\n // EventTarget does not have `error` event semantics like Node\n // EventEmitters, we do not listen for `error` events here.\n emitter.addEventListener(name, function wrapListener(arg) {\n // IE does not have builtin `{ once: true }` support so we\n // have to do it manually.\n if (flags.once) {\n emitter.removeEventListener(name, wrapListener);\n }\n listener(arg);\n });\n } else {\n throw new TypeError('The \"emitter\" argument must be of type EventEmitter. Received type ' + typeof emitter);\n }\n}\n","/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */\nexports.read = function (buffer, offset, isLE, mLen, nBytes) {\n var e, m\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var nBits = -7\n var i = isLE ? (nBytes - 1) : 0\n var d = isLE ? -1 : 1\n var s = buffer[offset + i]\n\n i += d\n\n e = s & ((1 << (-nBits)) - 1)\n s >>= (-nBits)\n nBits += eLen\n for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & ((1 << (-nBits)) - 1)\n e >>= (-nBits)\n nBits += mLen\n for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias\n } else if (e === eMax) {\n return m ? NaN : ((s ? -1 : 1) * Infinity)\n } else {\n m = m + Math.pow(2, mLen)\n e = e - eBias\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n var i = isLE ? 0 : (nBytes - 1)\n var d = isLE ? 1 : -1\n var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n value = Math.abs(value)\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0\n e = eMax\n } else {\n e = Math.floor(Math.log(value) / Math.LN2)\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--\n c *= 2\n }\n if (e + eBias >= 1) {\n value += rt / c\n } else {\n value += rt * Math.pow(2, 1 - eBias)\n }\n if (value * c >= 2) {\n e++\n c /= 2\n }\n\n if (e + eBias >= eMax) {\n m = 0\n e = eMax\n } else if (e + eBias >= 1) {\n m = ((value * c) - 1) * Math.pow(2, mLen)\n e = e + eBias\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n e = 0\n }\n }\n\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n e = (e << mLen) | m\n eLen += mLen\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128\n}\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView');\n\nmodule.exports = DataView;\n","var hashClear = require('./_hashClear'),\n hashDelete = require('./_hashDelete'),\n hashGet = require('./_hashGet'),\n hashHas = require('./_hashHas'),\n hashSet = require('./_hashSet');\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\nmodule.exports = Hash;\n","var listCacheClear = require('./_listCacheClear'),\n listCacheDelete = require('./_listCacheDelete'),\n listCacheGet = require('./_listCacheGet'),\n listCacheHas = require('./_listCacheHas'),\n listCacheSet = require('./_listCacheSet');\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\nmodule.exports = ListCache;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map');\n\nmodule.exports = Map;\n","var mapCacheClear = require('./_mapCacheClear'),\n mapCacheDelete = require('./_mapCacheDelete'),\n mapCacheGet = require('./_mapCacheGet'),\n mapCacheHas = require('./_mapCacheHas'),\n mapCacheSet = require('./_mapCacheSet');\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\nmodule.exports = MapCache;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Promise = getNative(root, 'Promise');\n\nmodule.exports = Promise;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Set = getNative(root, 'Set');\n\nmodule.exports = Set;\n","var MapCache = require('./_MapCache'),\n setCacheAdd = require('./_setCacheAdd'),\n setCacheHas = require('./_setCacheHas');\n\n/**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\nfunction SetCache(values) {\n var index = -1,\n length = values == null ? 0 : values.length;\n\n this.__data__ = new MapCache;\n while (++index < length) {\n this.add(values[index]);\n }\n}\n\n// Add methods to `SetCache`.\nSetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\nSetCache.prototype.has = setCacheHas;\n\nmodule.exports = SetCache;\n","var ListCache = require('./_ListCache'),\n stackClear = require('./_stackClear'),\n stackDelete = require('./_stackDelete'),\n stackGet = require('./_stackGet'),\n stackHas = require('./_stackHas'),\n stackSet = require('./_stackSet');\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\nmodule.exports = Stack;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Uint8Array = root.Uint8Array;\n\nmodule.exports = Uint8Array;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar WeakMap = getNative(root, 'WeakMap');\n\nmodule.exports = WeakMap;\n","/**\n * A specialized version of `_.forEach` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\nfunction arrayEach(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (iteratee(array[index], index, array) === false) {\n break;\n }\n }\n return array;\n}\n\nmodule.exports = arrayEach;\n","/**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\nfunction arrayFilter(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result[resIndex++] = value;\n }\n }\n return result;\n}\n\nmodule.exports = arrayFilter;\n","var baseTimes = require('./_baseTimes'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isIndex = require('./_isIndex'),\n isTypedArray = require('./isTypedArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = arrayLikeKeys;\n","/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n}\n\nmodule.exports = arrayPush;\n","/**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\nfunction arraySome(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (predicate(array[index], index, array)) {\n return true;\n }\n }\n return false;\n}\n\nmodule.exports = arraySome;\n","var baseAssignValue = require('./_baseAssignValue'),\n eq = require('./eq');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\nmodule.exports = assignValue;\n","var eq = require('./eq');\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\nmodule.exports = assocIndexOf;\n","var copyObject = require('./_copyObject'),\n keys = require('./keys');\n\n/**\n * The base implementation of `_.assign` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssign(object, source) {\n return object && copyObject(source, keys(source), object);\n}\n\nmodule.exports = baseAssign;\n","var copyObject = require('./_copyObject'),\n keysIn = require('./keysIn');\n\n/**\n * The base implementation of `_.assignIn` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssignIn(object, source) {\n return object && copyObject(source, keysIn(source), object);\n}\n\nmodule.exports = baseAssignIn;\n","var defineProperty = require('./_defineProperty');\n\n/**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction baseAssignValue(object, key, value) {\n if (key == '__proto__' && defineProperty) {\n defineProperty(object, key, {\n 'configurable': true,\n 'enumerable': true,\n 'value': value,\n 'writable': true\n });\n } else {\n object[key] = value;\n }\n}\n\nmodule.exports = baseAssignValue;\n","var Stack = require('./_Stack'),\n arrayEach = require('./_arrayEach'),\n assignValue = require('./_assignValue'),\n baseAssign = require('./_baseAssign'),\n baseAssignIn = require('./_baseAssignIn'),\n cloneBuffer = require('./_cloneBuffer'),\n copyArray = require('./_copyArray'),\n copySymbols = require('./_copySymbols'),\n copySymbolsIn = require('./_copySymbolsIn'),\n getAllKeys = require('./_getAllKeys'),\n getAllKeysIn = require('./_getAllKeysIn'),\n getTag = require('./_getTag'),\n initCloneArray = require('./_initCloneArray'),\n initCloneByTag = require('./_initCloneByTag'),\n initCloneObject = require('./_initCloneObject'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isMap = require('./isMap'),\n isObject = require('./isObject'),\n isSet = require('./isSet'),\n keys = require('./keys'),\n keysIn = require('./keysIn');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_FLAT_FLAG = 2,\n CLONE_SYMBOLS_FLAG = 4;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values supported by `_.clone`. */\nvar cloneableTags = {};\ncloneableTags[argsTag] = cloneableTags[arrayTag] =\ncloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =\ncloneableTags[boolTag] = cloneableTags[dateTag] =\ncloneableTags[float32Tag] = cloneableTags[float64Tag] =\ncloneableTags[int8Tag] = cloneableTags[int16Tag] =\ncloneableTags[int32Tag] = cloneableTags[mapTag] =\ncloneableTags[numberTag] = cloneableTags[objectTag] =\ncloneableTags[regexpTag] = cloneableTags[setTag] =\ncloneableTags[stringTag] = cloneableTags[symbolTag] =\ncloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =\ncloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;\ncloneableTags[errorTag] = cloneableTags[funcTag] =\ncloneableTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.clone` and `_.cloneDeep` which tracks\n * traversed objects.\n *\n * @private\n * @param {*} value The value to clone.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Deep clone\n * 2 - Flatten inherited properties\n * 4 - Clone symbols\n * @param {Function} [customizer] The function to customize cloning.\n * @param {string} [key] The key of `value`.\n * @param {Object} [object] The parent object of `value`.\n * @param {Object} [stack] Tracks traversed objects and their clone counterparts.\n * @returns {*} Returns the cloned value.\n */\nfunction baseClone(value, bitmask, customizer, key, object, stack) {\n var result,\n isDeep = bitmask & CLONE_DEEP_FLAG,\n isFlat = bitmask & CLONE_FLAT_FLAG,\n isFull = bitmask & CLONE_SYMBOLS_FLAG;\n\n if (customizer) {\n result = object ? customizer(value, key, object, stack) : customizer(value);\n }\n if (result !== undefined) {\n return result;\n }\n if (!isObject(value)) {\n return value;\n }\n var isArr = isArray(value);\n if (isArr) {\n result = initCloneArray(value);\n if (!isDeep) {\n return copyArray(value, result);\n }\n } else {\n var tag = getTag(value),\n isFunc = tag == funcTag || tag == genTag;\n\n if (isBuffer(value)) {\n return cloneBuffer(value, isDeep);\n }\n if (tag == objectTag || tag == argsTag || (isFunc && !object)) {\n result = (isFlat || isFunc) ? {} : initCloneObject(value);\n if (!isDeep) {\n return isFlat\n ? copySymbolsIn(value, baseAssignIn(result, value))\n : copySymbols(value, baseAssign(result, value));\n }\n } else {\n if (!cloneableTags[tag]) {\n return object ? value : {};\n }\n result = initCloneByTag(value, tag, isDeep);\n }\n }\n // Check for circular references and return its corresponding clone.\n stack || (stack = new Stack);\n var stacked = stack.get(value);\n if (stacked) {\n return stacked;\n }\n stack.set(value, result);\n\n if (isSet(value)) {\n value.forEach(function(subValue) {\n result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));\n });\n } else if (isMap(value)) {\n value.forEach(function(subValue, key) {\n result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n }\n\n var keysFunc = isFull\n ? (isFlat ? getAllKeysIn : getAllKeys)\n : (isFlat ? keysIn : keys);\n\n var props = isArr ? undefined : keysFunc(value);\n arrayEach(props || value, function(subValue, key) {\n if (props) {\n key = subValue;\n subValue = value[key];\n }\n // Recursively populate clone (susceptible to call stack limits).\n assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n return result;\n}\n\nmodule.exports = baseClone;\n","var isObject = require('./isObject');\n\n/** Built-in value references. */\nvar objectCreate = Object.create;\n\n/**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} proto The object to inherit from.\n * @returns {Object} Returns the new object.\n */\nvar baseCreate = (function() {\n function object() {}\n return function(proto) {\n if (!isObject(proto)) {\n return {};\n }\n if (objectCreate) {\n return objectCreate(proto);\n }\n object.prototype = proto;\n var result = new object;\n object.prototype = undefined;\n return result;\n };\n}());\n\nmodule.exports = baseCreate;\n","var arrayPush = require('./_arrayPush'),\n isArray = require('./isArray');\n\n/**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction baseGetAllKeys(object, keysFunc, symbolsFunc) {\n var result = keysFunc(object);\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n}\n\nmodule.exports = baseGetAllKeys;\n","var Symbol = require('./_Symbol'),\n getRawTag = require('./_getRawTag'),\n objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]';\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\nmodule.exports = baseIsArguments;\n","var baseIsEqualDeep = require('./_baseIsEqualDeep'),\n isObjectLike = require('./isObjectLike');\n\n/**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Unordered comparison\n * 2 - Partial comparison\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\nfunction baseIsEqual(value, other, bitmask, customizer, stack) {\n if (value === other) {\n return true;\n }\n if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\n return value !== value && other !== other;\n }\n return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n}\n\nmodule.exports = baseIsEqual;\n","var Stack = require('./_Stack'),\n equalArrays = require('./_equalArrays'),\n equalByTag = require('./_equalByTag'),\n equalObjects = require('./_equalObjects'),\n getTag = require('./_getTag'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isTypedArray = require('./isTypedArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n var objIsArr = isArray(object),\n othIsArr = isArray(other),\n objTag = objIsArr ? arrayTag : getTag(object),\n othTag = othIsArr ? arrayTag : getTag(other);\n\n objTag = objTag == argsTag ? objectTag : objTag;\n othTag = othTag == argsTag ? objectTag : othTag;\n\n var objIsObj = objTag == objectTag,\n othIsObj = othTag == objectTag,\n isSameTag = objTag == othTag;\n\n if (isSameTag && isBuffer(object)) {\n if (!isBuffer(other)) {\n return false;\n }\n objIsArr = true;\n objIsObj = false;\n }\n if (isSameTag && !objIsObj) {\n stack || (stack = new Stack);\n return (objIsArr || isTypedArray(object))\n ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n }\n if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n if (objIsWrapped || othIsWrapped) {\n var objUnwrapped = objIsWrapped ? object.value() : object,\n othUnwrapped = othIsWrapped ? other.value() : other;\n\n stack || (stack = new Stack);\n return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n }\n }\n if (!isSameTag) {\n return false;\n }\n stack || (stack = new Stack);\n return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n}\n\nmodule.exports = baseIsEqualDeep;\n","var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]';\n\n/**\n * The base implementation of `_.isMap` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n */\nfunction baseIsMap(value) {\n return isObjectLike(value) && getTag(value) == mapTag;\n}\n\nmodule.exports = baseIsMap;\n","var isFunction = require('./isFunction'),\n isMasked = require('./_isMasked'),\n isObject = require('./isObject'),\n toSource = require('./_toSource');\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\nmodule.exports = baseIsNative;\n","var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar setTag = '[object Set]';\n\n/**\n * The base implementation of `_.isSet` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n */\nfunction baseIsSet(value) {\n return isObjectLike(value) && getTag(value) == setTag;\n}\n\nmodule.exports = baseIsSet;\n","var baseGetTag = require('./_baseGetTag'),\n isLength = require('./isLength'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n\nmodule.exports = baseIsTypedArray;\n","var isPrototype = require('./_isPrototype'),\n nativeKeys = require('./_nativeKeys');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeys;\n","var isObject = require('./isObject'),\n isPrototype = require('./_isPrototype'),\n nativeKeysIn = require('./_nativeKeysIn');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeysIn(object) {\n if (!isObject(object)) {\n return nativeKeysIn(object);\n }\n var isProto = isPrototype(object),\n result = [];\n\n for (var key in object) {\n if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeysIn;\n","/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\nmodule.exports = baseTimes;\n","/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n return function(value) {\n return func(value);\n };\n}\n\nmodule.exports = baseUnary;\n","/**\n * Checks if a `cache` value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction cacheHas(cache, key) {\n return cache.has(key);\n}\n\nmodule.exports = cacheHas;\n","var Uint8Array = require('./_Uint8Array');\n\n/**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\nfunction cloneArrayBuffer(arrayBuffer) {\n var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n return result;\n}\n\nmodule.exports = cloneArrayBuffer;\n","var root = require('./_root');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined,\n allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;\n\n/**\n * Creates a clone of `buffer`.\n *\n * @private\n * @param {Buffer} buffer The buffer to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Buffer} Returns the cloned buffer.\n */\nfunction cloneBuffer(buffer, isDeep) {\n if (isDeep) {\n return buffer.slice();\n }\n var length = buffer.length,\n result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\n\n buffer.copy(result);\n return result;\n}\n\nmodule.exports = cloneBuffer;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer');\n\n/**\n * Creates a clone of `dataView`.\n *\n * @private\n * @param {Object} dataView The data view to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned data view.\n */\nfunction cloneDataView(dataView, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;\n return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);\n}\n\nmodule.exports = cloneDataView;\n","/** Used to match `RegExp` flags from their coerced string values. */\nvar reFlags = /\\w*$/;\n\n/**\n * Creates a clone of `regexp`.\n *\n * @private\n * @param {Object} regexp The regexp to clone.\n * @returns {Object} Returns the cloned regexp.\n */\nfunction cloneRegExp(regexp) {\n var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));\n result.lastIndex = regexp.lastIndex;\n return result;\n}\n\nmodule.exports = cloneRegExp;\n","var Symbol = require('./_Symbol');\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * Creates a clone of the `symbol` object.\n *\n * @private\n * @param {Object} symbol The symbol object to clone.\n * @returns {Object} Returns the cloned symbol object.\n */\nfunction cloneSymbol(symbol) {\n return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};\n}\n\nmodule.exports = cloneSymbol;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer');\n\n/**\n * Creates a clone of `typedArray`.\n *\n * @private\n * @param {Object} typedArray The typed array to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned typed array.\n */\nfunction cloneTypedArray(typedArray, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n}\n\nmodule.exports = cloneTypedArray;\n","/**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\nfunction copyArray(source, array) {\n var index = -1,\n length = source.length;\n\n array || (array = Array(length));\n while (++index < length) {\n array[index] = source[index];\n }\n return array;\n}\n\nmodule.exports = copyArray;\n","var assignValue = require('./_assignValue'),\n baseAssignValue = require('./_baseAssignValue');\n\n/**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\nfunction copyObject(source, props, object, customizer) {\n var isNew = !object;\n object || (object = {});\n\n var index = -1,\n length = props.length;\n\n while (++index < length) {\n var key = props[index];\n\n var newValue = customizer\n ? customizer(object[key], source[key], key, object, source)\n : undefined;\n\n if (newValue === undefined) {\n newValue = source[key];\n }\n if (isNew) {\n baseAssignValue(object, key, newValue);\n } else {\n assignValue(object, key, newValue);\n }\n }\n return object;\n}\n\nmodule.exports = copyObject;\n","var copyObject = require('./_copyObject'),\n getSymbols = require('./_getSymbols');\n\n/**\n * Copies own symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbols(source, object) {\n return copyObject(source, getSymbols(source), object);\n}\n\nmodule.exports = copySymbols;\n","var copyObject = require('./_copyObject'),\n getSymbolsIn = require('./_getSymbolsIn');\n\n/**\n * Copies own and inherited symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbolsIn(source, object) {\n return copyObject(source, getSymbolsIn(source), object);\n}\n\nmodule.exports = copySymbolsIn;\n","var root = require('./_root');\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\nmodule.exports = coreJsData;\n","var getNative = require('./_getNative');\n\nvar defineProperty = (function() {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n}());\n\nmodule.exports = defineProperty;\n","var SetCache = require('./_SetCache'),\n arraySome = require('./_arraySome'),\n cacheHas = require('./_cacheHas');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\nfunction equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n arrLength = array.length,\n othLength = other.length;\n\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n return false;\n }\n // Check that cyclic values are equal.\n var arrStacked = stack.get(array);\n var othStacked = stack.get(other);\n if (arrStacked && othStacked) {\n return arrStacked == other && othStacked == array;\n }\n var index = -1,\n result = true,\n seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n stack.set(array, other);\n stack.set(other, array);\n\n // Ignore non-index properties.\n while (++index < arrLength) {\n var arrValue = array[index],\n othValue = other[index];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, arrValue, index, other, array, stack)\n : customizer(arrValue, othValue, index, array, other, stack);\n }\n if (compared !== undefined) {\n if (compared) {\n continue;\n }\n result = false;\n break;\n }\n // Recursively compare arrays (susceptible to call stack limits).\n if (seen) {\n if (!arraySome(other, function(othValue, othIndex) {\n if (!cacheHas(seen, othIndex) &&\n (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n return seen.push(othIndex);\n }\n })) {\n result = false;\n break;\n }\n } else if (!(\n arrValue === othValue ||\n equalFunc(arrValue, othValue, bitmask, customizer, stack)\n )) {\n result = false;\n break;\n }\n }\n stack['delete'](array);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalArrays;\n","var Symbol = require('./_Symbol'),\n Uint8Array = require('./_Uint8Array'),\n eq = require('./eq'),\n equalArrays = require('./_equalArrays'),\n mapToArray = require('./_mapToArray'),\n setToArray = require('./_setToArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]';\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n switch (tag) {\n case dataViewTag:\n if ((object.byteLength != other.byteLength) ||\n (object.byteOffset != other.byteOffset)) {\n return false;\n }\n object = object.buffer;\n other = other.buffer;\n\n case arrayBufferTag:\n if ((object.byteLength != other.byteLength) ||\n !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n return false;\n }\n return true;\n\n case boolTag:\n case dateTag:\n case numberTag:\n // Coerce booleans to `1` or `0` and dates to milliseconds.\n // Invalid dates are coerced to `NaN`.\n return eq(+object, +other);\n\n case errorTag:\n return object.name == other.name && object.message == other.message;\n\n case regexpTag:\n case stringTag:\n // Coerce regexes to strings and treat strings, primitives and objects,\n // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n // for more details.\n return object == (other + '');\n\n case mapTag:\n var convert = mapToArray;\n\n case setTag:\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n convert || (convert = setToArray);\n\n if (object.size != other.size && !isPartial) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked) {\n return stacked == other;\n }\n bitmask |= COMPARE_UNORDERED_FLAG;\n\n // Recursively compare objects (susceptible to call stack limits).\n stack.set(object, other);\n var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n stack['delete'](object);\n return result;\n\n case symbolTag:\n if (symbolValueOf) {\n return symbolValueOf.call(object) == symbolValueOf.call(other);\n }\n }\n return false;\n}\n\nmodule.exports = equalByTag;\n","var getAllKeys = require('./_getAllKeys');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n objProps = getAllKeys(object),\n objLength = objProps.length,\n othProps = getAllKeys(other),\n othLength = othProps.length;\n\n if (objLength != othLength && !isPartial) {\n return false;\n }\n var index = objLength;\n while (index--) {\n var key = objProps[index];\n if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n return false;\n }\n }\n // Check that cyclic values are equal.\n var objStacked = stack.get(object);\n var othStacked = stack.get(other);\n if (objStacked && othStacked) {\n return objStacked == other && othStacked == object;\n }\n var result = true;\n stack.set(object, other);\n stack.set(other, object);\n\n var skipCtor = isPartial;\n while (++index < objLength) {\n key = objProps[index];\n var objValue = object[key],\n othValue = other[key];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, objValue, key, other, object, stack)\n : customizer(objValue, othValue, key, object, other, stack);\n }\n // Recursively compare objects (susceptible to call stack limits).\n if (!(compared === undefined\n ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n : compared\n )) {\n result = false;\n break;\n }\n skipCtor || (skipCtor = key == 'constructor');\n }\n if (result && !skipCtor) {\n var objCtor = object.constructor,\n othCtor = other.constructor;\n\n // Non `Object` object instances with different constructors are not equal.\n if (objCtor != othCtor &&\n ('constructor' in object && 'constructor' in other) &&\n !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n result = false;\n }\n }\n stack['delete'](object);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalObjects;\n","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n","var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbols = require('./_getSymbols'),\n keys = require('./keys');\n\n/**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeys(object) {\n return baseGetAllKeys(object, keys, getSymbols);\n}\n\nmodule.exports = getAllKeys;\n","var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbolsIn = require('./_getSymbolsIn'),\n keysIn = require('./keysIn');\n\n/**\n * Creates an array of own and inherited enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeysIn(object) {\n return baseGetAllKeys(object, keysIn, getSymbolsIn);\n}\n\nmodule.exports = getAllKeysIn;\n","var isKeyable = require('./_isKeyable');\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\nmodule.exports = getMapData;\n","var baseIsNative = require('./_baseIsNative'),\n getValue = require('./_getValue');\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\nmodule.exports = getNative;\n","var overArg = require('./_overArg');\n\n/** Built-in value references. */\nvar getPrototype = overArg(Object.getPrototypeOf, Object);\n\nmodule.exports = getPrototype;\n","var Symbol = require('./_Symbol');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nmodule.exports = getRawTag;\n","var arrayFilter = require('./_arrayFilter'),\n stubArray = require('./stubArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n if (object == null) {\n return [];\n }\n object = Object(object);\n return arrayFilter(nativeGetSymbols(object), function(symbol) {\n return propertyIsEnumerable.call(object, symbol);\n });\n};\n\nmodule.exports = getSymbols;\n","var arrayPush = require('./_arrayPush'),\n getPrototype = require('./_getPrototype'),\n getSymbols = require('./_getSymbols'),\n stubArray = require('./stubArray');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own and inherited enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {\n var result = [];\n while (object) {\n arrayPush(result, getSymbols(object));\n object = getPrototype(object);\n }\n return result;\n};\n\nmodule.exports = getSymbolsIn;\n","var DataView = require('./_DataView'),\n Map = require('./_Map'),\n Promise = require('./_Promise'),\n Set = require('./_Set'),\n WeakMap = require('./_WeakMap'),\n baseGetTag = require('./_baseGetTag'),\n toSource = require('./_toSource');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n setTag = '[object Set]',\n weakMapTag = '[object WeakMap]';\n\nvar dataViewTag = '[object DataView]';\n\n/** Used to detect maps, sets, and weakmaps. */\nvar dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nvar getTag = baseGetTag;\n\n// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\nif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = baseGetTag(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : '';\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n}\n\nmodule.exports = getTag;\n","/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\nmodule.exports = getValue;\n","var nativeCreate = require('./_nativeCreate');\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n}\n\nmodule.exports = hashClear;\n","/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = hashDelete;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\nmodule.exports = hashGet;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\nmodule.exports = hashHas;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\nmodule.exports = hashSet;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Initializes an array clone.\n *\n * @private\n * @param {Array} array The array to clone.\n * @returns {Array} Returns the initialized clone.\n */\nfunction initCloneArray(array) {\n var length = array.length,\n result = new array.constructor(length);\n\n // Add properties assigned by `RegExp#exec`.\n if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {\n result.index = array.index;\n result.input = array.input;\n }\n return result;\n}\n\nmodule.exports = initCloneArray;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer'),\n cloneDataView = require('./_cloneDataView'),\n cloneRegExp = require('./_cloneRegExp'),\n cloneSymbol = require('./_cloneSymbol'),\n cloneTypedArray = require('./_cloneTypedArray');\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/**\n * Initializes an object clone based on its `toStringTag`.\n *\n * **Note:** This function only supports cloning values with tags of\n * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.\n *\n * @private\n * @param {Object} object The object to clone.\n * @param {string} tag The `toStringTag` of the object to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneByTag(object, tag, isDeep) {\n var Ctor = object.constructor;\n switch (tag) {\n case arrayBufferTag:\n return cloneArrayBuffer(object);\n\n case boolTag:\n case dateTag:\n return new Ctor(+object);\n\n case dataViewTag:\n return cloneDataView(object, isDeep);\n\n case float32Tag: case float64Tag:\n case int8Tag: case int16Tag: case int32Tag:\n case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:\n return cloneTypedArray(object, isDeep);\n\n case mapTag:\n return new Ctor;\n\n case numberTag:\n case stringTag:\n return new Ctor(object);\n\n case regexpTag:\n return cloneRegExp(object);\n\n case setTag:\n return new Ctor;\n\n case symbolTag:\n return cloneSymbol(object);\n }\n}\n\nmodule.exports = initCloneByTag;\n","var baseCreate = require('./_baseCreate'),\n getPrototype = require('./_getPrototype'),\n isPrototype = require('./_isPrototype');\n\n/**\n * Initializes an object clone.\n *\n * @private\n * @param {Object} object The object to clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneObject(object) {\n return (typeof object.constructor == 'function' && !isPrototype(object))\n ? baseCreate(getPrototype(object))\n : {};\n}\n\nmodule.exports = initCloneObject;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n var type = typeof value;\n length = length == null ? MAX_SAFE_INTEGER : length;\n\n return !!length &&\n (type == 'number' ||\n (type != 'symbol' && reIsUint.test(value))) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\nmodule.exports = isIndex;\n","/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\nmodule.exports = isKeyable;\n","var coreJsData = require('./_coreJsData');\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\nmodule.exports = isMasked;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\nmodule.exports = isPrototype;\n","/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n}\n\nmodule.exports = listCacheClear;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype;\n\n/** Built-in value references. */\nvar splice = arrayProto.splice;\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n}\n\nmodule.exports = listCacheDelete;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\nmodule.exports = listCacheGet;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\nmodule.exports = listCacheHas;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\nmodule.exports = listCacheSet;\n","var Hash = require('./_Hash'),\n ListCache = require('./_ListCache'),\n Map = require('./_Map');\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\nmodule.exports = mapCacheClear;\n","var getMapData = require('./_getMapData');\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = mapCacheDelete;\n","var getMapData = require('./_getMapData');\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\nmodule.exports = mapCacheGet;\n","var getMapData = require('./_getMapData');\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\nmodule.exports = mapCacheHas;\n","var getMapData = require('./_getMapData');\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n}\n\nmodule.exports = mapCacheSet;\n","/**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\nfunction mapToArray(map) {\n var index = -1,\n result = Array(map.size);\n\n map.forEach(function(value, key) {\n result[++index] = [key, value];\n });\n return result;\n}\n\nmodule.exports = mapToArray;\n","var getNative = require('./_getNative');\n\n/* Built-in method references that are verified to be native. */\nvar nativeCreate = getNative(Object, 'create');\n\nmodule.exports = nativeCreate;\n","var overArg = require('./_overArg');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeKeys = overArg(Object.keys, Object);\n\nmodule.exports = nativeKeys;\n","/**\n * This function is like\n * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * except that it includes inherited enumerable properties.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction nativeKeysIn(object) {\n var result = [];\n if (object != null) {\n for (var key in Object(object)) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = nativeKeysIn;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n try {\n // Use `util.types` for Node.js 10+.\n var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n if (types) {\n return types;\n }\n\n // Legacy `process.binding('util')` for Node.js < 10.\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n}());\n\nmodule.exports = nodeUtil;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n","/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\nmodule.exports = overArg;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n","/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\nfunction setCacheAdd(value) {\n this.__data__.set(value, HASH_UNDEFINED);\n return this;\n}\n\nmodule.exports = setCacheAdd;\n","/**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\nfunction setCacheHas(value) {\n return this.__data__.has(value);\n}\n\nmodule.exports = setCacheHas;\n","/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\nfunction setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n}\n\nmodule.exports = setToArray;\n","var ListCache = require('./_ListCache');\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}\n\nmodule.exports = stackClear;\n","/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n var data = this.__data__,\n result = data['delete'](key);\n\n this.size = data.size;\n return result;\n}\n\nmodule.exports = stackDelete;\n","/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n return this.__data__.get(key);\n}\n\nmodule.exports = stackGet;\n","/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n return this.__data__.has(key);\n}\n\nmodule.exports = stackHas;\n","var ListCache = require('./_ListCache'),\n Map = require('./_Map'),\n MapCache = require('./_MapCache');\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n var data = this.__data__;\n if (data instanceof ListCache) {\n var pairs = data.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n this.size = ++data.size;\n return this;\n }\n data = this.__data__ = new MapCache(pairs);\n }\n data.set(key, value);\n this.size = data.size;\n return this;\n}\n\nmodule.exports = stackSet;\n","/** Used for built-in method references. */\nvar funcProto = Function.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\nmodule.exports = toSource;\n","var baseClone = require('./_baseClone');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_SYMBOLS_FLAG = 4;\n\n/**\n * This method is like `_.clone` except that it recursively clones `value`.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Lang\n * @param {*} value The value to recursively clone.\n * @returns {*} Returns the deep cloned value.\n * @see _.clone\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var deep = _.cloneDeep(objects);\n * console.log(deep[0] === objects[0]);\n * // => false\n */\nfunction cloneDeep(value) {\n return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);\n}\n\nmodule.exports = cloneDeep;\n","/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\nmodule.exports = eq;\n","var baseIsArguments = require('./_baseIsArguments'),\n isObjectLike = require('./isObjectLike');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n};\n\nmodule.exports = isArguments;\n","/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\nmodule.exports = isArray;\n","var isFunction = require('./isFunction'),\n isLength = require('./isLength');\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\nmodule.exports = isArrayLike;\n","var root = require('./_root'),\n stubFalse = require('./stubFalse');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\nmodule.exports = isBuffer;\n","var baseIsEqual = require('./_baseIsEqual');\n\n/**\n * Performs a deep comparison between two values to determine if they are\n * equivalent.\n *\n * **Note:** This method supports comparing arrays, array buffers, booleans,\n * date objects, error objects, maps, numbers, `Object` objects, regexes,\n * sets, strings, symbols, and typed arrays. `Object` objects are compared\n * by their own, not inherited, enumerable properties. Functions and DOM\n * nodes are compared by strict equality, i.e. `===`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.isEqual(object, other);\n * // => true\n *\n * object === other;\n * // => false\n */\nfunction isEqual(value, other) {\n return baseIsEqual(value, other);\n}\n\nmodule.exports = isEqual;\n","var baseGetTag = require('./_baseGetTag'),\n isObject = require('./isObject');\n\n/** `Object#toString` result references. */\nvar asyncTag = '[object AsyncFunction]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n proxyTag = '[object Proxy]';\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\nmodule.exports = isFunction;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\nmodule.exports = isLength;\n","var baseIsMap = require('./_baseIsMap'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsMap = nodeUtil && nodeUtil.isMap;\n\n/**\n * Checks if `value` is classified as a `Map` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n * @example\n *\n * _.isMap(new Map);\n * // => true\n *\n * _.isMap(new WeakMap);\n * // => false\n */\nvar isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;\n\nmodule.exports = isMap;\n","/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n","var baseIsSet = require('./_baseIsSet'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsSet = nodeUtil && nodeUtil.isSet;\n\n/**\n * Checks if `value` is classified as a `Set` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n * @example\n *\n * _.isSet(new Set);\n * // => true\n *\n * _.isSet(new WeakSet);\n * // => false\n */\nvar isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;\n\nmodule.exports = isSet;\n","var baseIsTypedArray = require('./_baseIsTypedArray'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\nmodule.exports = isTypedArray;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeys = require('./_baseKeys'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\nmodule.exports = keys;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeysIn = require('./_baseKeysIn'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\nfunction keysIn(object) {\n return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n}\n\nmodule.exports = keysIn;\n","/**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\nfunction stubArray() {\n return [];\n}\n\nmodule.exports = stubArray;\n","/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n return false;\n}\n\nmodule.exports = stubFalse;\n","import { connect, type BaseConnectionOptions } from \"@openfin/core-web\";\nimport { getSettings } from \"./settings\";\n\n/**\n * Initializes the OpenFin Web Broker connection.\n * @param inherit Should we inherit settings from the host (available in the OpenFin layout system) or use settings? Default is true.\n */\nexport async function init(inherit: boolean = true): Promise {\n\t// Set window.fin to the `fin` object.\n\tlet options: BaseConnectionOptions | undefined;\n\tif (window.fin === undefined) {\n\t\tif (!inherit) {\n\t\t\tconst settings = await getSettings();\n\t\t\tif (settings === undefined) {\n\t\t\t\tconsole.error(\n\t\t\t\t\t\"Unable to run the sample as we have been unable to load the web manifest and it's settings from the currently running html page. Please ensure that the web manifest is being served and that it contains the custom_settings section.\"\n\t\t\t\t);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\toptions = {\n\t\t\t\tbrokerUrl: settings.platform.interop.brokerUrl,\n\t\t\t\tinteropConfig: {\n\t\t\t\t\tproviderId: settings.platform.interop.providerId,\n\t\t\t\t\tcurrentContextGroup: settings.platform.interop.defaultContextGroup\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t\t// Specify an interopConfig with a specific provider ID and a context group to initialize the `fin.me.interop` client on connection.\n\t\tif (options) {\n\t\t\twindow.fin = await connect({\n\t\t\t\toptions\n\t\t\t});\n\t\t} else {\n\t\t\twindow.fin = await connect({\n\t\t\t\tconnectionInheritance: \"enabled\"\n\t\t\t});\n\t\t}\n\t\tconsole.log(\"Finished initializing the fin API.\");\n\t\t// Create and dispatch the finReady event\n\t\tconst event = new CustomEvent(\"finReady\");\n\t\twindow.dispatchEvent(event);\n\t}\n\n\tif (window.fdc3 === undefined && window?.fin?.me.interop?.getFDC3Sync !== undefined) {\n\t\twindow.fdc3 = fin.me.interop.getFDC3Sync(\"2.0\");\n\t\tconsole.log(\"Finished initializing the fdc3 API.\");\n\t\t// Create and dispatch the FDC3Ready event\n\t\tconst event = new CustomEvent(\"fdc3Ready\");\n\t\twindow.dispatchEvent(event);\n\t}\n}\n","import type { WebLayoutSnapshot } from \"@openfin/core-web\";\nimport type { Settings } from \"../shapes/setting-shapes\";\n\n/**\n * Fetches the settings for the application.\n * @returns The settings for the application.\n */\nexport async function getSettings(): Promise {\n\tconst settings = await getManifestSettings();\n\tif (settings === undefined) {\n\t\tconsole.error(\n\t\t\t\"Unable to run the example as settings are required and we fetch them from the link web manifest from the html page that is being served. It should exist in the customSettings section of the web manifest.\"\n\t\t);\n\t}\n\treturn settings;\n}\n\n/**\n * Returns a default layout from the settings if provided.\n * @returns The default layout from the settings.\n */\nexport async function getDefaultLayout(): Promise {\n\tconst settings = await getSettings();\n\tif (settings?.platform?.layout?.defaultLayout === undefined) {\n\t\tconsole.error(\n\t\t\t\"Unable to run the example as without a layout being defined. Please ensure that settings have been provided in the web manifest.\"\n\t\t);\n\t\treturn;\n\t}\n\tif (typeof settings.platform.layout.defaultLayout === \"string\") {\n\t\tconst layoutResponse = await fetch(settings.platform.layout.defaultLayout);\n\t\tconst layoutJson = (await layoutResponse.json()) as WebLayoutSnapshot;\n\t\treturn layoutJson;\n\t}\n\treturn settings.platform.layout.defaultLayout;\n}\n\n/**\n * Returns a default layout from the settings if provided.\n * @returns The default layout from the settings.\n */\nexport async function getSecondLayout(): Promise {\n\tconst settings = await getSettings();\n\tif (settings?.platform?.layout?.secondLayout === undefined) {\n\t\tconsole.error(\n\t\t\t\"Unable to run the example as without a layout being defined. Please ensure that settings have been provided in the web manifest.\"\n\t\t);\n\t\treturn;\n\t}\n\tif (typeof settings.platform.layout.secondLayout === \"string\") {\n\t\tconst layoutResponse = await fetch(settings.platform.layout.secondLayout);\n\t\tconst layoutJson = (await layoutResponse.json()) as WebLayoutSnapshot;\n\t\treturn layoutJson;\n\t}\n\treturn settings.platform.layout.secondLayout;\n}\n/**\n * Returns the settings from the manifest file.\n * @returns customSettings for this example\n */\nasync function getManifestSettings(): Promise {\n\t// Get the manifest link\n\tconst link = document.querySelector('link[rel=\"manifest\"]');\n\tif (link !== null) {\n\t\tconst manifestResponse = await fetch(link.href);\n\t\tconst manifestJson = (await manifestResponse.json()) as { custom_settings: Settings };\n\t\treturn manifestJson.custom_settings;\n\t}\n}\n","export { default as v1 } from './v1.js';\nexport { default as v3 } from './v3.js';\nexport { default as v4 } from './v4.js';\nexport { default as v5 } from './v5.js';\nexport { default as NIL } from './nil.js';\nexport { default as version } from './version.js';\nexport { default as validate } from './validate.js';\nexport { default as stringify } from './stringify.js';\nexport { default as parse } from './parse.js';","/*\n * Browser-compatible JavaScript MD5\n *\n * Modification of JavaScript MD5\n * https://github.com/blueimp/JavaScript-MD5\n *\n * Copyright 2011, Sebastian Tschan\n * https://blueimp.net\n *\n * Licensed under the MIT license:\n * https://opensource.org/licenses/MIT\n *\n * Based on\n * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message\n * Digest Algorithm, as defined in RFC 1321.\n * Version 2.2 Copyright (C) Paul Johnston 1999 - 2009\n * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet\n * Distributed under the BSD License\n * See http://pajhome.org.uk/crypt/md5 for more info.\n */\nfunction md5(bytes) {\n if (typeof bytes === 'string') {\n var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape\n\n bytes = new Uint8Array(msg.length);\n\n for (var i = 0; i < msg.length; ++i) {\n bytes[i] = msg.charCodeAt(i);\n }\n }\n\n return md5ToHexEncodedArray(wordsToMd5(bytesToWords(bytes), bytes.length * 8));\n}\n/*\n * Convert an array of little-endian words to an array of bytes\n */\n\n\nfunction md5ToHexEncodedArray(input) {\n var output = [];\n var length32 = input.length * 32;\n var hexTab = '0123456789abcdef';\n\n for (var i = 0; i < length32; i += 8) {\n var x = input[i >> 5] >>> i % 32 & 0xff;\n var hex = parseInt(hexTab.charAt(x >>> 4 & 0x0f) + hexTab.charAt(x & 0x0f), 16);\n output.push(hex);\n }\n\n return output;\n}\n/**\n * Calculate output length with padding and bit length\n */\n\n\nfunction getOutputLength(inputLength8) {\n return (inputLength8 + 64 >>> 9 << 4) + 14 + 1;\n}\n/*\n * Calculate the MD5 of an array of little-endian words, and a bit length.\n */\n\n\nfunction wordsToMd5(x, len) {\n /* append padding */\n x[len >> 5] |= 0x80 << len % 32;\n x[getOutputLength(len) - 1] = len;\n var a = 1732584193;\n var b = -271733879;\n var c = -1732584194;\n var d = 271733878;\n\n for (var i = 0; i < x.length; i += 16) {\n var olda = a;\n var oldb = b;\n var oldc = c;\n var oldd = d;\n a = md5ff(a, b, c, d, x[i], 7, -680876936);\n d = md5ff(d, a, b, c, x[i + 1], 12, -389564586);\n c = md5ff(c, d, a, b, x[i + 2], 17, 606105819);\n b = md5ff(b, c, d, a, x[i + 3], 22, -1044525330);\n a = md5ff(a, b, c, d, x[i + 4], 7, -176418897);\n d = md5ff(d, a, b, c, x[i + 5], 12, 1200080426);\n c = md5ff(c, d, a, b, x[i + 6], 17, -1473231341);\n b = md5ff(b, c, d, a, x[i + 7], 22, -45705983);\n a = md5ff(a, b, c, d, x[i + 8], 7, 1770035416);\n d = md5ff(d, a, b, c, x[i + 9], 12, -1958414417);\n c = md5ff(c, d, a, b, x[i + 10], 17, -42063);\n b = md5ff(b, c, d, a, x[i + 11], 22, -1990404162);\n a = md5ff(a, b, c, d, x[i + 12], 7, 1804603682);\n d = md5ff(d, a, b, c, x[i + 13], 12, -40341101);\n c = md5ff(c, d, a, b, x[i + 14], 17, -1502002290);\n b = md5ff(b, c, d, a, x[i + 15], 22, 1236535329);\n a = md5gg(a, b, c, d, x[i + 1], 5, -165796510);\n d = md5gg(d, a, b, c, x[i + 6], 9, -1069501632);\n c = md5gg(c, d, a, b, x[i + 11], 14, 643717713);\n b = md5gg(b, c, d, a, x[i], 20, -373897302);\n a = md5gg(a, b, c, d, x[i + 5], 5, -701558691);\n d = md5gg(d, a, b, c, x[i + 10], 9, 38016083);\n c = md5gg(c, d, a, b, x[i + 15], 14, -660478335);\n b = md5gg(b, c, d, a, x[i + 4], 20, -405537848);\n a = md5gg(a, b, c, d, x[i + 9], 5, 568446438);\n d = md5gg(d, a, b, c, x[i + 14], 9, -1019803690);\n c = md5gg(c, d, a, b, x[i + 3], 14, -187363961);\n b = md5gg(b, c, d, a, x[i + 8], 20, 1163531501);\n a = md5gg(a, b, c, d, x[i + 13], 5, -1444681467);\n d = md5gg(d, a, b, c, x[i + 2], 9, -51403784);\n c = md5gg(c, d, a, b, x[i + 7], 14, 1735328473);\n b = md5gg(b, c, d, a, x[i + 12], 20, -1926607734);\n a = md5hh(a, b, c, d, x[i + 5], 4, -378558);\n d = md5hh(d, a, b, c, x[i + 8], 11, -2022574463);\n c = md5hh(c, d, a, b, x[i + 11], 16, 1839030562);\n b = md5hh(b, c, d, a, x[i + 14], 23, -35309556);\n a = md5hh(a, b, c, d, x[i + 1], 4, -1530992060);\n d = md5hh(d, a, b, c, x[i + 4], 11, 1272893353);\n c = md5hh(c, d, a, b, x[i + 7], 16, -155497632);\n b = md5hh(b, c, d, a, x[i + 10], 23, -1094730640);\n a = md5hh(a, b, c, d, x[i + 13], 4, 681279174);\n d = md5hh(d, a, b, c, x[i], 11, -358537222);\n c = md5hh(c, d, a, b, x[i + 3], 16, -722521979);\n b = md5hh(b, c, d, a, x[i + 6], 23, 76029189);\n a = md5hh(a, b, c, d, x[i + 9], 4, -640364487);\n d = md5hh(d, a, b, c, x[i + 12], 11, -421815835);\n c = md5hh(c, d, a, b, x[i + 15], 16, 530742520);\n b = md5hh(b, c, d, a, x[i + 2], 23, -995338651);\n a = md5ii(a, b, c, d, x[i], 6, -198630844);\n d = md5ii(d, a, b, c, x[i + 7], 10, 1126891415);\n c = md5ii(c, d, a, b, x[i + 14], 15, -1416354905);\n b = md5ii(b, c, d, a, x[i + 5], 21, -57434055);\n a = md5ii(a, b, c, d, x[i + 12], 6, 1700485571);\n d = md5ii(d, a, b, c, x[i + 3], 10, -1894986606);\n c = md5ii(c, d, a, b, x[i + 10], 15, -1051523);\n b = md5ii(b, c, d, a, x[i + 1], 21, -2054922799);\n a = md5ii(a, b, c, d, x[i + 8], 6, 1873313359);\n d = md5ii(d, a, b, c, x[i + 15], 10, -30611744);\n c = md5ii(c, d, a, b, x[i + 6], 15, -1560198380);\n b = md5ii(b, c, d, a, x[i + 13], 21, 1309151649);\n a = md5ii(a, b, c, d, x[i + 4], 6, -145523070);\n d = md5ii(d, a, b, c, x[i + 11], 10, -1120210379);\n c = md5ii(c, d, a, b, x[i + 2], 15, 718787259);\n b = md5ii(b, c, d, a, x[i + 9], 21, -343485551);\n a = safeAdd(a, olda);\n b = safeAdd(b, oldb);\n c = safeAdd(c, oldc);\n d = safeAdd(d, oldd);\n }\n\n return [a, b, c, d];\n}\n/*\n * Convert an array bytes to an array of little-endian words\n * Characters >255 have their high-byte silently ignored.\n */\n\n\nfunction bytesToWords(input) {\n if (input.length === 0) {\n return [];\n }\n\n var length8 = input.length * 8;\n var output = new Uint32Array(getOutputLength(length8));\n\n for (var i = 0; i < length8; i += 8) {\n output[i >> 5] |= (input[i / 8] & 0xff) << i % 32;\n }\n\n return output;\n}\n/*\n * Add integers, wrapping at 2^32. This uses 16-bit operations internally\n * to work around bugs in some JS interpreters.\n */\n\n\nfunction safeAdd(x, y) {\n var lsw = (x & 0xffff) + (y & 0xffff);\n var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n return msw << 16 | lsw & 0xffff;\n}\n/*\n * Bitwise rotate a 32-bit number to the left.\n */\n\n\nfunction bitRotateLeft(num, cnt) {\n return num << cnt | num >>> 32 - cnt;\n}\n/*\n * These functions implement the four basic operations the algorithm uses.\n */\n\n\nfunction md5cmn(q, a, b, x, s, t) {\n return safeAdd(bitRotateLeft(safeAdd(safeAdd(a, q), safeAdd(x, t)), s), b);\n}\n\nfunction md5ff(a, b, c, d, x, s, t) {\n return md5cmn(b & c | ~b & d, a, b, x, s, t);\n}\n\nfunction md5gg(a, b, c, d, x, s, t) {\n return md5cmn(b & d | c & ~d, a, b, x, s, t);\n}\n\nfunction md5hh(a, b, c, d, x, s, t) {\n return md5cmn(b ^ c ^ d, a, b, x, s, t);\n}\n\nfunction md5ii(a, b, c, d, x, s, t) {\n return md5cmn(c ^ (b | ~d), a, b, x, s, t);\n}\n\nexport default md5;","export default '00000000-0000-0000-0000-000000000000';","import validate from './validate.js';\n\nfunction parse(uuid) {\n if (!validate(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n var v;\n var arr = new Uint8Array(16); // Parse ########-....-....-....-............\n\n arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24;\n arr[1] = v >>> 16 & 0xff;\n arr[2] = v >>> 8 & 0xff;\n arr[3] = v & 0xff; // Parse ........-####-....-....-............\n\n arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8;\n arr[5] = v & 0xff; // Parse ........-....-####-....-............\n\n arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8;\n arr[7] = v & 0xff; // Parse ........-....-....-####-............\n\n arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8;\n arr[9] = v & 0xff; // Parse ........-....-....-....-############\n // (Use \"/\" to avoid 32-bit truncation when bit-shifting high-order bytes)\n\n arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff;\n arr[11] = v / 0x100000000 & 0xff;\n arr[12] = v >>> 24 & 0xff;\n arr[13] = v >>> 16 & 0xff;\n arr[14] = v >>> 8 & 0xff;\n arr[15] = v & 0xff;\n return arr;\n}\n\nexport default parse;","export default /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;","// Unique ID creation requires a high quality random # generator. In the browser we therefore\n// require the crypto API and do not support built-in fallback to lower quality random number\n// generators (like Math.random()).\nvar getRandomValues;\nvar rnds8 = new Uint8Array(16);\nexport default function rng() {\n // lazy load so that environments that need to polyfill have a chance to do so\n if (!getRandomValues) {\n // getRandomValues needs to be invoked in a context where \"this\" is a Crypto implementation. Also,\n // find the complete implementation of crypto (msCrypto) on IE11.\n getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto !== 'undefined' && typeof msCrypto.getRandomValues === 'function' && msCrypto.getRandomValues.bind(msCrypto);\n\n if (!getRandomValues) {\n throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');\n }\n }\n\n return getRandomValues(rnds8);\n}","// Adapted from Chris Veness' SHA1 code at\n// http://www.movable-type.co.uk/scripts/sha1.html\nfunction f(s, x, y, z) {\n switch (s) {\n case 0:\n return x & y ^ ~x & z;\n\n case 1:\n return x ^ y ^ z;\n\n case 2:\n return x & y ^ x & z ^ y & z;\n\n case 3:\n return x ^ y ^ z;\n }\n}\n\nfunction ROTL(x, n) {\n return x << n | x >>> 32 - n;\n}\n\nfunction sha1(bytes) {\n var K = [0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xca62c1d6];\n var H = [0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0];\n\n if (typeof bytes === 'string') {\n var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape\n\n bytes = [];\n\n for (var i = 0; i < msg.length; ++i) {\n bytes.push(msg.charCodeAt(i));\n }\n } else if (!Array.isArray(bytes)) {\n // Convert Array-like to Array\n bytes = Array.prototype.slice.call(bytes);\n }\n\n bytes.push(0x80);\n var l = bytes.length / 4 + 2;\n var N = Math.ceil(l / 16);\n var M = new Array(N);\n\n for (var _i = 0; _i < N; ++_i) {\n var arr = new Uint32Array(16);\n\n for (var j = 0; j < 16; ++j) {\n arr[j] = bytes[_i * 64 + j * 4] << 24 | bytes[_i * 64 + j * 4 + 1] << 16 | bytes[_i * 64 + j * 4 + 2] << 8 | bytes[_i * 64 + j * 4 + 3];\n }\n\n M[_i] = arr;\n }\n\n M[N - 1][14] = (bytes.length - 1) * 8 / Math.pow(2, 32);\n M[N - 1][14] = Math.floor(M[N - 1][14]);\n M[N - 1][15] = (bytes.length - 1) * 8 & 0xffffffff;\n\n for (var _i2 = 0; _i2 < N; ++_i2) {\n var W = new Uint32Array(80);\n\n for (var t = 0; t < 16; ++t) {\n W[t] = M[_i2][t];\n }\n\n for (var _t = 16; _t < 80; ++_t) {\n W[_t] = ROTL(W[_t - 3] ^ W[_t - 8] ^ W[_t - 14] ^ W[_t - 16], 1);\n }\n\n var a = H[0];\n var b = H[1];\n var c = H[2];\n var d = H[3];\n var e = H[4];\n\n for (var _t2 = 0; _t2 < 80; ++_t2) {\n var s = Math.floor(_t2 / 20);\n var T = ROTL(a, 5) + f(s, b, c, d) + e + K[s] + W[_t2] >>> 0;\n e = d;\n d = c;\n c = ROTL(b, 30) >>> 0;\n b = a;\n a = T;\n }\n\n H[0] = H[0] + a >>> 0;\n H[1] = H[1] + b >>> 0;\n H[2] = H[2] + c >>> 0;\n H[3] = H[3] + d >>> 0;\n H[4] = H[4] + e >>> 0;\n }\n\n return [H[0] >> 24 & 0xff, H[0] >> 16 & 0xff, H[0] >> 8 & 0xff, H[0] & 0xff, H[1] >> 24 & 0xff, H[1] >> 16 & 0xff, H[1] >> 8 & 0xff, H[1] & 0xff, H[2] >> 24 & 0xff, H[2] >> 16 & 0xff, H[2] >> 8 & 0xff, H[2] & 0xff, H[3] >> 24 & 0xff, H[3] >> 16 & 0xff, H[3] >> 8 & 0xff, H[3] & 0xff, H[4] >> 24 & 0xff, H[4] >> 16 & 0xff, H[4] >> 8 & 0xff, H[4] & 0xff];\n}\n\nexport default sha1;","import validate from './validate.js';\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\n\nvar byteToHex = [];\n\nfor (var i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).substr(1));\n}\n\nfunction stringify(arr) {\n var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n var uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!validate(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n\n return uuid;\n}\n\nexport default stringify;","import rng from './rng.js';\nimport stringify from './stringify.js'; // **`v1()` - Generate time-based UUID**\n//\n// Inspired by https://github.com/LiosK/UUID.js\n// and http://docs.python.org/library/uuid.html\n\nvar _nodeId;\n\nvar _clockseq; // Previous uuid creation time\n\n\nvar _lastMSecs = 0;\nvar _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details\n\nfunction v1(options, buf, offset) {\n var i = buf && offset || 0;\n var b = buf || new Array(16);\n options = options || {};\n var node = options.node || _nodeId;\n var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not\n // specified. We do this lazily to minimize issues related to insufficient\n // system entropy. See #189\n\n if (node == null || clockseq == null) {\n var seedBytes = options.random || (options.rng || rng)();\n\n if (node == null) {\n // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)\n node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]];\n }\n\n if (clockseq == null) {\n // Per 4.2.2, randomize (14 bit) clockseq\n clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;\n }\n } // UUID timestamps are 100 nano-second units since the Gregorian epoch,\n // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so\n // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'\n // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.\n\n\n var msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock\n // cycle to simulate higher resolution clock\n\n var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs)\n\n var dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression\n\n if (dt < 0 && options.clockseq === undefined) {\n clockseq = clockseq + 1 & 0x3fff;\n } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new\n // time interval\n\n\n if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {\n nsecs = 0;\n } // Per 4.2.1.2 Throw error if too many uuids are requested\n\n\n if (nsecs >= 10000) {\n throw new Error(\"uuid.v1(): Can't create more than 10M uuids/sec\");\n }\n\n _lastMSecs = msecs;\n _lastNSecs = nsecs;\n _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch\n\n msecs += 12219292800000; // `time_low`\n\n var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;\n b[i++] = tl >>> 24 & 0xff;\n b[i++] = tl >>> 16 & 0xff;\n b[i++] = tl >>> 8 & 0xff;\n b[i++] = tl & 0xff; // `time_mid`\n\n var tmh = msecs / 0x100000000 * 10000 & 0xfffffff;\n b[i++] = tmh >>> 8 & 0xff;\n b[i++] = tmh & 0xff; // `time_high_and_version`\n\n b[i++] = tmh >>> 24 & 0xf | 0x10; // include version\n\n b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)\n\n b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low`\n\n b[i++] = clockseq & 0xff; // `node`\n\n for (var n = 0; n < 6; ++n) {\n b[i + n] = node[n];\n }\n\n return buf || stringify(b);\n}\n\nexport default v1;","import v35 from './v35.js';\nimport md5 from './md5.js';\nvar v3 = v35('v3', 0x30, md5);\nexport default v3;","import stringify from './stringify.js';\nimport parse from './parse.js';\n\nfunction stringToBytes(str) {\n str = unescape(encodeURIComponent(str)); // UTF8 escape\n\n var bytes = [];\n\n for (var i = 0; i < str.length; ++i) {\n bytes.push(str.charCodeAt(i));\n }\n\n return bytes;\n}\n\nexport var DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8';\nexport var URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8';\nexport default function (name, version, hashfunc) {\n function generateUUID(value, namespace, buf, offset) {\n if (typeof value === 'string') {\n value = stringToBytes(value);\n }\n\n if (typeof namespace === 'string') {\n namespace = parse(namespace);\n }\n\n if (namespace.length !== 16) {\n throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)');\n } // Compute hash of namespace and value, Per 4.3\n // Future: Use spread syntax when supported on all platforms, e.g. `bytes =\n // hashfunc([...namespace, ... value])`\n\n\n var bytes = new Uint8Array(16 + value.length);\n bytes.set(namespace);\n bytes.set(value, namespace.length);\n bytes = hashfunc(bytes);\n bytes[6] = bytes[6] & 0x0f | version;\n bytes[8] = bytes[8] & 0x3f | 0x80;\n\n if (buf) {\n offset = offset || 0;\n\n for (var i = 0; i < 16; ++i) {\n buf[offset + i] = bytes[i];\n }\n\n return buf;\n }\n\n return stringify(bytes);\n } // Function#name is not settable on some platforms (#270)\n\n\n try {\n generateUUID.name = name; // eslint-disable-next-line no-empty\n } catch (err) {} // For CommonJS default export support\n\n\n generateUUID.DNS = DNS;\n generateUUID.URL = URL;\n return generateUUID;\n}","import rng from './rng.js';\nimport stringify from './stringify.js';\n\nfunction v4(options, buf, offset) {\n options = options || {};\n var rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n offset = offset || 0;\n\n for (var i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n\n return buf;\n }\n\n return stringify(rnds);\n}\n\nexport default v4;","import v35 from './v35.js';\nimport sha1 from './sha1.js';\nvar v5 = v35('v5', 0x50, sha1);\nexport default v5;","import REGEX from './regex.js';\n\nfunction validate(uuid) {\n return typeof uuid === 'string' && REGEX.test(uuid);\n}\n\nexport default validate;","import validate from './validate.js';\n\nfunction version(uuid) {\n if (!validate(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n return parseInt(uuid.substr(14, 1), 16);\n}\n\nexport default version;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = (module) => {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","import type { Context } from \"@finos/fdc3\";\nimport { init } from \"../platform/api\";\n\nwindow.addEventListener(\"DOMContentLoaded\", async () => {\n\tawait init(false);\n\tawait initializeDOM();\n});\n\n/**\n * Adds an FDC3 context listener to the window.\n */\nasync function addFDC3Listener(): Promise {\n\tif (window.fdc3) {\n\t\tawait window.fdc3.addContextListener(null, (context) => {\n\t\t\tupdateDOMElements(context);\n\t\t});\n\t} else {\n\t\twindow.addEventListener(\"fdc3Ready\", async () => {\n\t\t\tawait window.fdc3.addContextListener(null, (context) => {\n\t\t\t\tupdateDOMElements(context);\n\t\t\t});\n\t\t});\n\t}\n}\n\n/**\n * Updates the DOM elements with the provided context.\n * @param context The context to update the DOM elements with.\n */\nfunction updateDOMElements(context: Context): void {\n\tconst contextTypeSpan = document.querySelector(\"#contextType\");\n\tconst contextNameSpan = document.querySelector(\"#contextName\");\n\tconst contextBodyPre = document.querySelector(\"#contextBody\");\n\n\tif (contextTypeSpan !== null && contextNameSpan !== null && contextBodyPre !== null) {\n\t\tcontextTypeSpan.textContent = context.type;\n\t\tcontextNameSpan.textContent = context.name ?? \"No name provided.\";\n\t\tcontextBodyPre.textContent = JSON.stringify(context, null, 2);\n\t}\n}\n\n/**\n * Initialize the DOM elements.\n */\nasync function initializeDOM(): Promise {\n\tawait addFDC3Listener();\n}\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/web/v19.2.0/web-layout/js/fdc3-view.bundle.js b/web/v19.2.0/web-layout/js/fdc3-view.bundle.js index f986f72..358fa14 100644 --- a/web/v19.2.0/web-layout/js/fdc3-view.bundle.js +++ b/web/v19.2.0/web-layout/js/fdc3-view.bundle.js @@ -1,38 +1,38 @@ /******/ (() => { // webpackBootstrap /******/ var __webpack_modules__ = ({ -/***/ "./node_modules/@openfin/core-web/out/api-client.js": -/*!**********************************************************!*\ - !*** ./node_modules/@openfin/core-web/out/api-client.js ***! - \**********************************************************/ +/***/ "../../node_modules/@openfin/core-web/out/api-client.js": +/*!**************************************************************!*\ + !*** ../../node_modules/@openfin/core-web/out/api-client.js ***! + \**************************************************************/ /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; -var e=__webpack_require__(/*! ./main-8cad4070.js */ "./node_modules/@openfin/core-web/out/main-8cad4070.js");__webpack_require__(/*! buffer/ */ "../../node_modules/buffer/index.js"),__webpack_require__(/*! uuid */ "../../node_modules/uuid/dist/esm-browser/index.js"),__webpack_require__(/*! events */ "../../node_modules/events/events.js"),__webpack_require__(/*! lodash/cloneDeep */ "../../node_modules/lodash/cloneDeep.js"),__webpack_require__(/*! lodash/isEqual */ "../../node_modules/lodash/isEqual.js"),exports.connect=e.connect; +var e=__webpack_require__(/*! ./main-8cad4070.js */ "../../node_modules/@openfin/core-web/out/main-8cad4070.js");__webpack_require__(/*! buffer/ */ "../../node_modules/buffer/index.js"),__webpack_require__(/*! uuid */ "../../node_modules/uuid/dist/esm-browser/index.js"),__webpack_require__(/*! events */ "../../node_modules/events/events.js"),__webpack_require__(/*! lodash/cloneDeep */ "../../node_modules/lodash/cloneDeep.js"),__webpack_require__(/*! lodash/isEqual */ "../../node_modules/lodash/isEqual.js"),exports.connect=e.connect; /***/ }), -/***/ "./node_modules/@openfin/core-web/out/main-8cad4070.js": -/*!*************************************************************!*\ - !*** ./node_modules/@openfin/core-web/out/main-8cad4070.js ***! - \*************************************************************/ +/***/ "../../node_modules/@openfin/core-web/out/main-8cad4070.js": +/*!*****************************************************************!*\ + !*** ../../node_modules/@openfin/core-web/out/main-8cad4070.js ***! + \*****************************************************************/ /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; -var e=__webpack_require__(/*! buffer/ */ "../../node_modules/buffer/index.js"),t=__webpack_require__(/*! events */ "../../node_modules/events/events.js"),n=__webpack_require__(/*! lodash/cloneDeep */ "../../node_modules/lodash/cloneDeep.js"),i=__webpack_require__(/*! lodash/isEqual */ "../../node_modules/lodash/isEqual.js"),r=__webpack_require__(/*! uuid */ "../../node_modules/uuid/dist/esm-browser/index.js");const o=(e,t)=>`${t}<${btoa(JSON.stringify(e))}>`;var s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof __webpack_require__.g?__webpack_require__.g:"undefined"!=typeof self?self:{},a={},c={},d={},h={};async function l(e){const t=[];for(const n of e){const e=await n();t.push(e)}return t}Object.defineProperty(h,"__esModule",{value:!0}),h.promiseMapSerial=h.serial=h.promiseMap=h.promisify=void 0,h.promisify=function(e){return(...t)=>new Promise(((n,i)=>{e(...t,((e,t)=>e?i(e):n(t)))}))},h.promiseMap=async function(e,t){return Promise.all(e.map(t))},h.serial=l,h.promiseMapSerial=async function(e,t){return l(e.map(((e,n,i)=>()=>t(e,n,i))))};var u,p=s&&s.__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},w=s&&s.__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)};Object.defineProperty(d,"__esModule",{value:!0}),d.Reply=d.EmitterBase=d.Base=void 0;const y=h;class f{constructor(e){this.isNodeEnvironment=()=>"node"===this.wire.environment.type,this.isOpenFinEnvironment=()=>"openfin"===this.wire.environment.type,this.isBrowserEnvironment=()=>"other"===this.wire.environment.type,this.wire=e}get fin(){return this.wire.getFin()}get me(){return this.wire.me}}d.Base=f;d.EmitterBase=class extends f{constructor(e,t,...n){super(e),this.topic=t,u.set(this,void 0),this.eventNames=()=>this.hasEmitter()?this.getOrCreateEmitter().eventNames():[],this.emit=(e,t,...n)=>!!this.hasEmitter()&&this.getOrCreateEmitter().emit(e,t,...n),this.hasEmitter=()=>this.wire.eventAggregator.has(w(this,u,"f")),this.getOrCreateEmitter=()=>this.wire.eventAggregator.getOrCreate(w(this,u,"f")),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[],this.listenerCount=e=>this.hasEmitter()?this.getOrCreateEmitter().listenerCount(e):0,this.registerEventListener=async(e,t={},n,i)=>{const r={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e},o=this.getOrCreateEmitter();n(o);try{await this.wire.sendAction("subscribe-to-desktop-event",r)}catch(e){throw i(o),this.deleteEmitterIfNothingRegistered(o),e}},this.deregisterEventListener=async(e,t={})=>{if(this.hasEmitter()){const n={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e};await this.wire.sendAction("unsubscribe-to-desktop-event",n).catch((()=>null));return this.getOrCreateEmitter()}return Promise.resolve()},p(this,u,[t,...n],"f"),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[]}async on(e,t,n){return await this.registerEventListener(e,n,(n=>{n.on(e,t)}),(n=>{n.removeListener(e,t)})),this}async addListener(e,t,n){return this.on(e,t,n)}async once(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.once(e,i),n.once(e,t)}),(n=>{n.removeListener(e,i),n.removeListener(e,t)})),this}async prependListener(e,t,n){return await this.registerEventListener(e,n,(n=>{n.prependListener(e,t)}),(n=>{n.removeListener(e,t)})),this}async prependOnceListener(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.prependOnceListener(e,t),n.once(e,i)}),(n=>{n.removeListener(e,t),n.removeListener(e,i)})),this}async removeListener(e,t,n){const i=await this.deregisterEventListener(e,n);return i&&(i.removeListener(e,t),this.deleteEmitterIfNothingRegistered(i)),this}async deregisterAllListeners(e){const t={...this.identity,type:e,topic:this.topic};if(this.hasEmitter()){const e=this.getOrCreateEmitter(),n=e.listenerCount(t.type),i=[];for(let e=0;enull)));return await Promise.all(i),e}}async removeAllListeners(e){const t=async e=>{const t=await this.deregisterAllListeners(e);t&&(t.removeAllListeners(e),this.deleteEmitterIfNothingRegistered(t))};if(e)await t(e);else if(this.hasEmitter()){const e=this.getOrCreateEmitter().eventNames();await(0,y.promiseMap)(e,t)}return this}deleteEmitterIfNothingRegistered(e){0===e.eventNames().length&&this.wire.eventAggregator.delete(w(this,u,"f"))}},u=new WeakMap;d.Reply=class{};var g={};Object.defineProperty(g,"__esModule",{value:!0});var m=g.RuntimeError=g.NotSupportedError=g.NotImplementedError=g.NoAckError=g.DuplicateCorrelationError=g.UnexpectedActionError=g.DisconnectedError=void 0;class v extends Error{constructor(e){super(`Expected websocket state OPEN but found ${e}`),this.readyState=e}}g.DisconnectedError=v;class C extends Error{}g.UnexpectedActionError=C;class b extends Error{}g.DuplicateCorrelationError=b;class I extends Error{}g.NoAckError=I;class E extends Error{}g.NotImplementedError=E;class x extends Error{}g.NotSupportedError=x;class A extends Error{constructor(e){const{message:t,name:n,stack:i,...r}=e;super(t),this.name=n||"Error",this.stack=i??this.toString(),Object.keys(r).forEach((e=>{this[e]=r[e]}))}}class P extends Error{static getCallSite(e=0){const t=Error.stackTraceLimit,n=e+1;Error.stackTraceLimit=t+n;const i=Error.prepareStackTrace;Error.prepareStackTrace=(e,t)=>t;const r=(new Error).stack?.slice(n)??[];return Error.prepareStackTrace=i,Error.stackTraceLimit=t,r}static prepareStackTrace(e,t){if("function"==typeof Error.prepareStackTrace)return Error.prepareStackTrace(e,t);let n="";n+=e.name||"Error",n+=`: ${e.message||""}`;for(const e of t)n+=`\n at ${e.toString()}`;return n}constructor(e,t){const{reason:n,error:i}=e;super(n),this.name="RuntimeError",i?.stack&&(this.cause=new A(i)),t&&(this.stack=P.prepareStackTrace(this,t))}}m=g.RuntimeError=P;var M={},_={},O={};Object.defineProperty(O,"__esModule",{value:!0}),O.validateIdentity=void 0,O.validateIdentity=function(e){let t;return"object"==typeof e&&"string"==typeof e.uuid||(t="Not a valid identity object"),t};var S={},R={},F={},j={},k={},L={},T={};Object.defineProperty(T,"__esModule",{value:!0}),T.handleDeprecatedWarnings=void 0;var $;T.handleDeprecatedWarnings=e=>{(e.contentNavigation?.whitelist||e.contentNavigation?.blacklist||e.contentRedirect?.whitelist||e.contentRedirect?.blacklist)&&console.warn("The properties 'whitelist' and 'blacklist' have been marked as deprecated and will be removed in a future version. Please use 'allowlist' and 'denylist'.")};var B={},G={};Object.defineProperty(G,"__esModule",{value:!0}),G.AsyncRetryableLazy=W=G.Lazy=void 0;var W=G.Lazy=class{constructor(e){this.producerFn=e}getValue(){return this.value||(this.value=this.producerFn()),this.value}};G.AsyncRetryableLazy=class{constructor(e){this.producerFn=e}async getValue(){return this.promise||(this.promise=this.producerFn().catch((e=>{throw delete this.promise,e}))),this.promise}};var H={};Object.defineProperty(H,"__esModule",{value:!0}),H.WebContents=void 0;const N=d;class D extends N.EmitterBase{constructor(e,t,n){super(e,n,t.uuid,t.name),this.identity=t,this.entityType=n}capturePage(e){return this.wire.sendAction("capture-page",{options:e,...this.identity}).then((({payload:e})=>e.data))}executeJavaScript(e){return this.wire.sendAction("execute-javascript-in-window",{...this.identity,code:e}).then((({payload:e})=>e.data))}getZoomLevel(){return this.wire.sendAction("get-zoom-level",this.identity).then((({payload:e})=>e.data))}setZoomLevel(e){return this.wire.sendAction("set-zoom-level",{...this.identity,level:e}).then((()=>{}))}navigate(e){return this.wire.sendAction("navigate-window",{...this.identity,url:e}).then((()=>{}))}navigateBack(){return this.wire.sendAction("navigate-window-back",{...this.identity}).then((()=>{}))}async navigateForward(){await this.wire.sendAction("navigate-window-forward",{...this.identity})}stopNavigation(){return this.wire.sendAction("stop-window-navigation",{...this.identity}).then((()=>{}))}reload(e=!1){return this.wire.sendAction("reload-window",{ignoreCache:e,...this.identity}).then((()=>{}))}print(e={}){return this.wire.sendAction("print",{...this.identity,options:e}).then((()=>{}))}findInPage(e,t){return this.wire.sendAction("find-in-page",{...this.identity,searchTerm:e,options:t}).then((({payload:e})=>e.data))}stopFindInPage(e){return this.wire.sendAction("stop-find-in-page",{...this.identity,action:e}).then((()=>{}))}getPrinters(){return this.wire.sendAction("get-printers",{...this.identity}).then((({payload:e})=>e.data))}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){await this.wire.sendAction("focus-window",{emitSynthFocused:e,...this.identity})}async showDeveloperTools(){await this.wire.sendAction("show-developer-tools",this.identity)}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction("get-process-info",this.identity);return e}async getSharedWorkers(){return this.wire.sendAction("get-shared-workers",this.identity).then((({payload:e})=>e.data))}async inspectSharedWorker(){await this.wire.sendAction("inspect-shared-worker",{...this.identity})}async inspectSharedWorkerById(e){await this.wire.sendAction("inspect-shared-worker-by-id",{...this.identity,workerId:e})}async inspectServiceWorker(){await this.wire.sendAction("inspect-service-worker",{...this.identity})}async showPopupWindow(e){if(this.wire.sendAction(`${this.entityType}-show-popup-window`,this.identity).catch((()=>{})),e?.onPopupReady){const t=async({popupName:t})=>{try{const n=this.fin.Window.wrapSync({uuid:this.fin.me.uuid,name:t});await e.onPopupReady(n)}catch(e){throw new Error(`Something went wrong during onPopupReady execution: ${e}`)}};await this.once("popup-ready",t)}const{payload:t}=await this.wire.sendAction("try-create-popup-window",{options:{...e,hasResultCallback:!!e?.onPopupResult,hasReadyCallback:!!e?.onPopupReady},...this.identity}),{data:{willOpen:n,options:i}}=t;n&&await this.fin.Window.create(i.initialOptions);if(e?.onPopupResult){const t=async t=>{await e.onPopupResult((e=>{const{name:t,uuid:n,result:i,data:r}=e,o={identity:{name:t,uuid:n},result:i};return r&&(o.data=r),o})(t))},n=async()=>{await this.removeListener("popup-result",t)};await this.on("popup-result",t),await this.once("popup-teardown",n)}const{payload:r}=await this.wire.sendAction("show-popup-window",{options:i,...this.identity});return r.data}}var U,V,z,K,q;function J(){return V||(V=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(function(){if($)return L;$=1,Object.defineProperty(L,"__esModule",{value:!0}),L.ViewModule=void 0;const e=d,t=O,n=J(),i=T;class r extends e.Base{async create(e){const{uuid:t}=this.wire.me;if(!e.name||"string"!=typeof e.name)throw new Error("Please provide a name property as a string in order to create a View.");return(0,i.handleDeprecatedWarnings)(e),this.wire.environment.childViews?await this.wire.environment.createChildContent({entityType:"view",options:{...e,uuid:t}}):await this.wire.sendAction("create-view",{...e,uuid:t}),this.wrapSync({uuid:t,name:e.name})}async wrap(e){this.wire.sendAction("view-wrap").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}wrapSync(e){this.wire.sendAction("view-wrap-sync").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}getCurrent(){if(this.wire.sendAction("view-get-current").catch((e=>{})),!this.wire.me.isView)throw new Error("You are not in a View context");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction("view-get-current-sync").catch((e=>{})),!this.wire.me.isView)throw new Error("You are not in a View context");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return L.ViewModule=r,L}(),e),n(function(){if(U)return B;var e;U=1,Object.defineProperty(B,"__esModule",{value:!0}),B.View=void 0;const t=g,n=G,i=H,r=ie();class o extends i.WebContents{constructor(i,o){super(i,o,"view"),this.identity=o,e.set(this,new n.Lazy((()=>this.fin.Platform.wrapSync(this.identity).getClient()))),this.attach=async e=>{await this.wire.sendAction("attach-view",{target:e,...this.identity})},this.destroy=async()=>{await this.wire.sendAction("destroy-view",{...this.identity})},this.show=async()=>{await this.wire.sendAction("show-view",{...this.identity})},this.showAt=async(e,t={})=>{await this.wire.sendAction("show-view-at",{bounds:e,...this.identity,options:t})},this.bringToFront=async()=>{await this.wire.sendAction("bring-view-to-front",{...this.identity})},this.hide=async()=>{await this.wire.sendAction("hide-view",{...this.identity})},this.setBounds=async e=>{await this.wire.sendAction("set-view-bounds",{bounds:e,...this.identity})},this.getBounds=async()=>(await this.wire.sendAction("get-view-bounds",{...this.identity})).payload.data,this.getInfo=async()=>(await this.wire.sendAction("get-view-info",{...this.identity})).payload.data,this.getParentLayout=async()=>(this.wire.sendAction("view-get-parent-layout",{...this.identity}).catch((()=>{})),this.fin.Platform.Layout.getLayoutByViewIdentity(this.identity)),this.getOptions=async()=>this.wire.sendAction("get-view-options",{...this.identity}).then((({payload:e})=>e.data)),this.updateOptions=async e=>this.wire.sendAction("update-view-options",{options:e,...this.identity}).then((()=>{})),this.getCurrentWindow=async()=>{const{payload:{data:e}}=await this.wire.sendAction("get-view-window",{...this.identity});return new r._Window(this.wire,e)},this.getCurrentStack=async()=>{this.wire.sendAction("view-get-current-stack").catch((()=>{}));try{return(await this.getParentLayout()).getStackByViewIdentity(this.identity)}catch(e){throw new t.RuntimeError({reason:"This view does not belong to a stack.",error:e})}},this.triggerBeforeUnload=async()=>(await this.wire.sendAction("trigger-before-unload",{...this.identity})).payload.data,this.bindToElement=async e=>{if(!e)throw new Error("Element not found.");return this.wire.environment.observeBounds(e,(async e=>this.setBounds(e)))}}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){const t=await this.getCurrentWindow();await t.focusedWebViewWasChanged(),await super.focus({emitSynthFocused:e})}}return B.View=o,e=new WeakMap,B}(),e)}(k)),k}function Y(){if(z)return j;z=1,Object.defineProperty(j,"__esModule",{value:!0}),j.Application=void 0;const e=d,t=ie(),n=J();class i extends e.EmitterBase{constructor(e,n){super(e,"application",n.uuid),this.identity=n,this.window=new t._Window(this.wire,{uuid:this.identity.uuid,name:this.identity.uuid})}windowListFromIdentityList(e){const n=[];return e.forEach((e=>{n.push(new t._Window(this.wire,{uuid:e.uuid,name:e.name}))})),n}isRunning(){return this.wire.sendAction("is-application-running",this.identity).then((({payload:e})=>e.data))}async quit(e=!1){try{await this._close(e),await this.wire.sendAction("destroy-application",{force:e,...this.identity})}catch(e){if(!["Remote connection has closed","Could not locate the requested application"].some((t=>e.message.includes(t))))throw e}}async _close(e=!1){try{await this.wire.sendAction("close-application",{force:e,...this.identity})}catch(e){if(!e.message.includes("Remote connection has closed"))throw e}}close(e=!1){return console.warn("Deprecation Warning: Application.close is deprecated Please use Application.quit"),this.wire.sendAction("application-close",this.identity).catch((e=>{})),this._close(e)}getChildWindows(){return this.wire.sendAction("get-child-windows",this.identity).then((({payload:e})=>{const t=[];return e.data.forEach((e=>{t.push({uuid:this.identity.uuid,name:e})})),this.windowListFromIdentityList(t)}))}getManifest(){return this.wire.sendAction("get-application-manifest",this.identity).then((({payload:e})=>e.data))}getParentUuid(){return this.wire.sendAction("get-parent-application",this.identity).then((({payload:e})=>e.data))}getShortcuts(){return this.wire.sendAction("get-shortcuts",this.identity).then((({payload:e})=>e.data))}async getViews(){const{payload:e}=await this.wire.sendAction("application-get-views",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}getZoomLevel(){return this.wire.sendAction("get-application-zoom-level",this.identity).then((({payload:e})=>e.data))}getWindow(){return this.wire.sendAction("application-get-window",this.identity).catch((e=>{})),Promise.resolve(this.window)}registerUser(e,t){return this.wire.sendAction("register-user",{userName:e,appName:t,...this.identity}).then((()=>{}))}removeTrayIcon(){return this.wire.sendAction("remove-tray-icon",this.identity).then((()=>{}))}restart(){return this.wire.sendAction("restart-application",this.identity).then((()=>{}))}run(){return console.warn("Deprecation Warning: Application.run is deprecated Please use fin.Application.start"),this.wire.sendAction("application-run",this.identity).catch((e=>{})),this._run()}_run(e={}){return this.wire.sendAction("run-application",{manifestUrl:this._manifestUrl,opts:e,...this.identity}).then((()=>{}))}scheduleRestart(){return this.wire.sendAction("relaunch-on-close",this.identity).then((()=>{}))}async sendApplicationLog(){const{payload:e}=await this.wire.sendAction("send-application-log",this.identity);return e.data}async setJumpList(e){await this.wire.sendAction("set-jump-list",{config:e,...this.identity})}setTrayIcon(e){return this.wire.sendAction("set-tray-icon",{enabledIcon:e,...this.identity}).then((()=>{}))}setShortcuts(e){return this.wire.sendAction("set-shortcuts",{data:e,...this.identity}).then((()=>{}))}async setShortcutQueryParams(e){await this.wire.sendAction("set-shortcut-query-args",{data:e,...this.identity})}setZoomLevel(e){return this.wire.sendAction("set-application-zoom-level",{level:e,...this.identity}).then((()=>{}))}async setAppLogUsername(e){await this.wire.sendAction("set-app-log-username",{data:e,...this.identity})}getTrayIconInfo(){return this.wire.sendAction("get-tray-icon-info",this.identity).then((({payload:e})=>e.data))}hasTrayIcon(){return this.wire.sendAction("has-tray-icon",this.identity).then((({payload:e})=>e.data))}terminate(){return this.wire.sendAction("terminate-application",this.identity).then((()=>{}))}wait(){return this.wire.sendAction("wait-for-hung-application",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction("get-info",this.identity).then((({payload:e})=>e.data))}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction("application-get-process-info",this.identity);return e}async setFileDownloadLocation(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t};await this.wire.sendAction("set-file-download-location",{...n,downloadLocation:e})}async getFileDownloadLocation(){const{payload:{data:e}}=await this.wire.sendAction("get-file-download-location",this.identity);return e}async showTrayIconPopupMenu(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t},{payload:i}=await this.wire.sendAction("show-tray-icon-popup-menu",{...n,options:e});return i.data}async closeTrayIconPopupMenu(){const{name:e}=this.wire.me,t={uuid:this.identity.uuid,name:e};await this.wire.sendAction("close-tray-icon-popup-menu",{...t})}}return j.Application=i,j}function Z(){return q||(q=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(function(){if(K)return F;K=1,Object.defineProperty(F,"__esModule",{value:!0}),F.ApplicationModule=void 0;const e=d,t=O,n=Y();class i extends e.Base{async wrap(e){this.wire.sendAction("wrap-application").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}wrapSync(e){this.wire.sendAction("wrap-application-sync").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}async _create(e){return void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&void 0===e.isPlatformController&&(e.autoShow=!0),await this.wire.sendAction("create-application",e),this.wrap({uuid:e.uuid})}create(e){return console.warn("Deprecation Warning: fin.Application.create is deprecated. Please use fin.Application.start"),this.wire.sendAction("application-create").catch((e=>{})),this._create(e)}async start(e){this.wire.sendAction("start-application").catch((e=>{}));const t=await this._create(e);return await this.wire.sendAction("run-application",{uuid:e.uuid}),t}async startManyManifests(e,t){return this.wire.sendAction("run-applications",{applications:e,opts:t}).then((()=>{}))}getCurrent(){return this.wire.sendAction("get-current-application").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction("get-current-application-sync").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}async startFromManifest(e,t){this.wire.sendAction("application-start-from-manifest").catch((e=>{}));const n=await this._createFromManifest(e);return await n._run(t),n}createFromManifest(e){return console.warn("Deprecation Warning: fin.Application.createFromManifest is deprecated. Please use fin.Application.startFromManifest"),this.wire.sendAction("application-create-from-manifest").catch((e=>{})),this._createFromManifest(e)}_createFromManifest(e){return this.wire.sendAction("get-application-manifest",{manifestUrl:e}).then((({payload:e})=>{const t=e.data.platform?e.data.platform.uuid:e.data.startup_app.uuid;return this.wrap({uuid:t})})).then((t=>(t._manifestUrl=e,t)))}}return F.ApplicationModule=i,F}(),e),n(Y(),e)}(R)),R}H.WebContents=D;var Q={};Object.defineProperty(Q,"__esModule",{value:!0}),Q.promisifySubscription=void 0;var X,ee,te;function ne(){if(X)return S;X=1,Object.defineProperty(S,"__esModule",{value:!0}),S._Window=void 0;const e=Z(),t=H,n=J(),i=T,r=Q;class o extends t.WebContents{constructor(e,t){super(e,t,"window")}async createWindow(e){this.wire.sendAction("window-create-window",this.identity).catch((e=>{}));const t=await(0,r.promisifySubscription)(this,"fire-constructor-callback");void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&(e.autoShow=!0),(0,i.handleDeprecatedWarnings)(e);const n=this.wire.environment.createChildContent({entityType:"window",options:e}),[o]=await Promise.all([t.getValue(),n]);let s;const{success:a}=o,c=o.data,{message:d}=c;s=a?{httpResponseCode:c.httpResponseCode,apiInjected:c.apiInjected}:{message:c.message,networkErrorCode:c.networkErrorCode,stack:c.stack};const h={message:d,cbPayload:s,success:a};try{this.getWebWindow().fin.__internal_.openerSuccessCBCalled()}catch(e){}return h.success?this:Promise.reject(h)}getAllFrames(){return this.wire.sendAction("get-all-frames",this.identity).then((({payload:e})=>e.data))}getBounds(){return this.wire.sendAction("get-window-bounds",this.identity).then((({payload:e})=>e.data))}center(){return this.wire.sendAction("center-window",this.identity).then((()=>{}))}blur(){return this.wire.sendAction("blur-window",this.identity).then((()=>{}))}bringToFront(){return this.wire.sendAction("bring-window-to-front",this.identity).then((()=>{}))}animate(e,t){return this.wire.sendAction("animate-window",{transitions:e,options:t,...this.identity}).then((()=>{}))}hide(){return this.wire.sendAction("hide-window",this.identity).then((()=>{}))}close(e=!1){return this.wire.sendAction("close-window",{force:e,...this.identity}).then((()=>{Object.setPrototypeOf(this,null)}))}focusedWebViewWasChanged(){return this.wire.sendAction("focused-webview-changed",this.identity).then((()=>{}))}getNativeId(){return this.wire.sendAction("get-window-native-id",this.identity).then((({payload:e})=>e.data))}async getCurrentViews(){const{payload:e}=await this.wire.sendAction("window-get-views",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}disableFrame(){return console.warn("Function is deprecated; use disableUserMovement instead."),this.wire.sendAction("disable-window-frame",this.identity).then((()=>{}))}disableUserMovement(){return this.wire.sendAction("disable-window-frame",this.identity).then((()=>{}))}enableFrame(){return console.warn("Function is deprecated; use enableUserMovement instead."),this.wire.sendAction("enable-window-frame",this.identity).then((()=>{}))}enableUserMovement(){return this.wire.sendAction("enable-window-frame",this.identity).then((()=>{}))}flash(){return this.wire.sendAction("flash-window",this.identity).then((()=>{}))}stopFlashing(){return this.wire.sendAction("stop-flash-window",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction("get-window-info",this.identity).then((({payload:e})=>e.data))}async getLayout(e){this.wire.sendAction("window-get-layout",this.identity).catch((e=>{}));const t=await this.getOptions();if(!t.layout&&!t.layoutSnapshot)throw new Error("Window does not have a Layout");return this.fin.Platform.Layout.wrap(e??this.identity)}getOptions(){return this.wire.sendAction("get-window-options",this.identity).then((({payload:e})=>e.data))}getParentApplication(){return this.wire.sendAction("window-get-parent-application",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity))}getParentWindow(){return this.wire.sendAction("window-get-parent-window",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity)).then((e=>e.getWindow()))}async getSnapshot(e){const t={area:e,...this.identity};console.warn("Window.getSnapshot has been deprecated, please use Window.capturePage");return(await this.wire.sendAction("get-window-snapshot",t)).payload.data}getState(){return this.wire.sendAction("get-window-state",this.identity).then((({payload:e})=>e.data))}getWebWindow(){return this.wire.sendAction("window-get-web-window",this.identity).catch((e=>{})),this.wire.environment.getWebWindow(this.identity)}isMainWindow(){return this.wire.sendAction("window-is-main-window",this.identity).catch((e=>{})),this.me.uuid===this.me.name}isShowing(){return this.wire.sendAction("is-window-showing",this.identity).then((({payload:e})=>e.data))}maximize(){return this.wire.sendAction("maximize-window",this.identity).then((()=>{}))}minimize(){return this.wire.sendAction("minimize-window",this.identity).then((()=>{}))}moveBy(e,t,n){return this.wire.sendAction("move-window-by",{deltaLeft:e,deltaTop:t,positioningOptions:n,...this.identity}).then((()=>{}))}moveTo(e,t,n){return this.wire.sendAction("move-window",{left:e,top:t,positioningOptions:n,...this.identity}).then((()=>{}))}resizeBy(e,t,n,i){return this.wire.sendAction("resize-window-by",{deltaWidth:Math.floor(e),deltaHeight:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}resizeTo(e,t,n,i){return this.wire.sendAction("resize-window",{width:Math.floor(e),height:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}restore(){return this.wire.sendAction("restore-window",this.identity).then((()=>{}))}setAsForeground(){return this.wire.sendAction("set-foreground-window",this.identity).then((()=>{}))}setBounds(e,t){return this.wire.sendAction("set-window-bounds",{...e,...this.identity,positioningOptions:t}).then((()=>{}))}show(e=!1){return this.wire.sendAction("show-window",{force:e,...this.identity}).then((()=>{}))}showAt(e,t,n=!1){return this.wire.sendAction("show-at-window",{force:n,left:Math.floor(e),top:Math.floor(t),...this.identity}).then((()=>{}))}updateOptions(e){return this.wire.sendAction("update-window-options",{options:e,...this.identity}).then((()=>{}))}authenticate(e,t){return this.wire.sendAction("window-authenticate",{userName:e,password:t,...this.identity}).then((()=>{}))}async showPopupMenu(e){const{payload:t}=await this.wire.sendAction("show-popup-menu",{options:e,...this.identity});return t.data}async closePopupMenu(){return this.wire.sendAction("close-popup-menu",{...this.identity}).then((()=>{}))}async dispatchPopupResult(e){this.wire.sendAction("window-dispatch-popup-result",this.identity).catch((e=>{})),await this.wire.sendAction("dispatch-popup-result",{data:e,...this.identity})}async print(e={content:"self"}){switch(e.content){case void 0:case"self":return super.print(e);case"screenshot":return this.wire.sendAction("print-screenshot",this.identity).then((()=>{}));case"views":return this.wire.sendAction("print-views",{...this.identity,options:e}).then((()=>{}));default:return}}}return S._Window=o,S}function ie(){return te||(te=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(function(){if(ee)return _;ee=1,Object.defineProperty(_,"__esModule",{value:!0}),_._WindowModule=void 0;const e=d,t=O,n=ne();class i extends e.Base{async wrap(e){this.wire.sendAction("window-wrap").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}wrapSync(e){this.wire.sendAction("window-wrap-sync").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}create(e){return this.wire.sendAction("create-window").catch((e=>{})),new n._Window(this.wire,{uuid:this.me.uuid,name:e.name}).createWindow(e)}getCurrent(){if(this.wire.sendAction("get-current-window").catch((e=>{})),!this.wire.me.isWindow)throw new Error("You are not in a Window context");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction("get-current-window-sync").catch((e=>{})),!this.wire.me.isWindow)throw new Error("You are not in a Window context");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return _._WindowModule=i,_}(),e),n(ne(),e)}(M)),M}Q.promisifySubscription=async(e,t,n=(()=>!0),i)=>{let r,o,s;const a=new Promise(((e,t)=>{r=e,o=t})),c=e=>{n(e)&&(clearTimeout(s),r(e))};return await e.on(t,c),i&&(s=setTimeout((()=>o(new Error("event timed out"))),i)),a.finally((()=>{e.removeListener(t,c).catch((()=>null))})),{getValue:()=>a}},Object.defineProperty(c,"__esModule",{value:!0}),c.System=void 0;const re=d,oe=g,se=ie(),ae=t;class ce extends re.EmitterBase{constructor(e){super(e,"system")}sendExternalProcessRequest(e,t){return new Promise(((n,i)=>{const r="external-process-exited";let o,s,a,c;"function"==typeof t.listener&&(a=e=>{const n=e||{};s={topic:"exited",uuid:n.processUuid||"",exitCode:n.exitCode||0},o===e.processUuid&&(t.listener(s),c.removeListener(r,a))},this.wire.me.name||(this.wire.me.name=this.wire.me.uuid),c=new se._Window(this.wire,this.wire.me),c.on(r,a)),this.wire.sendAction(e,t).then((({payload:e})=>{o=e.data.uuid,n(e.data),s&&o===s.uuid&&(t.listener(s),c.removeListener(r,a))})).catch((e=>{c&&c.removeListener(r,a),i(e)}))}))}getVersion(){return this.wire.sendAction("get-version").then((({payload:e})=>e.data))}clearCache(e){return this.wire.sendAction("clear-cache",e).then((()=>{}))}deleteCacheOnExit(){return this.wire.sendAction("delete-cache-request").then((()=>{}))}exit(){return this.wire.sendAction("exit-desktop").then((()=>{}))}async fetchManifest(e){const{payload:{data:t}}=await this.wire.sendAction("fetch-manifest",{manifestUrl:e});return t}flushCookieStore(){return this.wire.sendAction("flush-cookie-store").then((()=>{}))}getAllWindows(){return this.wire.sendAction("get-all-windows").then((({payload:e})=>e.data))}getAllApplications(){return this.wire.sendAction("get-all-applications").then((({payload:e})=>e.data))}getCommandLineArguments(){return this.wire.sendAction("get-command-line-arguments").then((({payload:e})=>e.data))}async getCrashReporterState(){const{payload:{data:{diagnosticMode:e,isRunning:t}}}=await this.wire.sendAction("get-crash-reporter-state");return console.warn("diagnosticMode property is deprecated. It will be removed in a future version"),{diagnosticMode:e,diagnosticsMode:e,isRunning:t}}async startCrashReporter(e){const t=e,n={...t,diagnosticMode:t.diagnosticsMode||t.diagnosticMode},{payload:{data:{diagnosticMode:i,isRunning:r}}}=await this.wire.sendAction("start-crash-reporter",n);return{diagnosticMode:i,diagnosticsMode:i,isRunning:r}}getUniqueUserId(){return this.wire.sendAction("get-unique-user-id").then((({payload:e})=>e.data))}getEntityInfo(e,t){return this.wire.sendAction("get-entity-info",{uuid:e,name:t}).then((({payload:e})=>e.data))}getEnvironmentVariable(e){return this.wire.sendAction("get-environment-variable",{environmentVariables:e}).then((({payload:e})=>e.data))}getFocusedWindow(){return this.wire.sendAction("get-focused-window").then((({payload:e})=>e.data))}async isAppCertified(e){const{payload:{data:{certifiedInfo:t}}}=await this.wire.sendAction("is-app-certified",{manifestUrl:e});return t}getInstalledRuntimes(){return this.wire.sendAction("get-installed-runtimes").then((({payload:e})=>e.data.runtimes))}async getInstalledApps(){const{payload:{data:{installedApps:e}}}=await this.wire.sendAction("get-installed-apps");return e}getLog(e){return this.wire.sendAction("view-log",e).then((({payload:e})=>e.data))}getMachineId(){return this.wire.sendAction("get-machine-id").then((({payload:e})=>e.data))}getMinLogLevel(){return this.wire.sendAction("get-min-log-level").then((({payload:e})=>e.data))}getLogList(){return this.wire.sendAction("list-logs").then((({payload:e})=>e.data))}getMonitorInfo(){return this.wire.sendAction("get-monitor-info").then((({payload:e})=>e.data))}getMousePosition(){return this.wire.sendAction("get-mouse-position").then((({payload:e})=>e.data))}getProcessList(){return console.warn("System.getProcessList has been deprecated. Please consider using our new process APIs: Window.getProcessInfo, View.getProcessInfo, Application.getProcessInfo, System.getAllProcessInfo"),this.wire.sendAction("process-snapshot").then((({payload:e})=>e.data))}async getAllProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction("get-all-process-info",this.identity);return e}getProxySettings(){return this.wire.sendAction("get-proxy-settings").then((({payload:e})=>e.data))}getRuntimeInfo(){return this.wire.sendAction("get-runtime-info").then((({payload:e})=>e.data))}getRvmInfo(){return this.wire.sendAction("get-rvm-info").then((({payload:e})=>e.data))}getHostSpecs(){return this.wire.sendAction("get-host-specs").then((({payload:e})=>e.data))}getOSInfo(){return this.wire.sendAction("get-os-info").then((({payload:e})=>e.data))}launchExternalProcess(e){return this.sendExternalProcessRequest("launch-external-process",e)}monitorExternalProcess(e){return this.sendExternalProcessRequest("monitor-external-process",e)}log(e,t){return this.wire.sendAction("write-to-log",{level:e,message:t}).then((()=>{}))}openUrlWithBrowser(e){return this.wire.sendAction("open-url-with-browser",{url:e}).then((()=>{}))}async registerCustomProtocol(e){if("object"!=typeof e)throw new Error("Must provide an object with a `protocolName` property having a string value.");await this.wire.sendAction("register-custom-protocol",e)}async unregisterCustomProtocol(e){await this.wire.sendAction("unregister-custom-protocol",{protocolName:e})}async getCustomProtocolState(e){return this.wire.sendAction("get-custom-protocol-state",{protocolName:e}).then((({payload:e})=>e.data))}releaseExternalProcess(e){return this.wire.sendAction("release-external-process",{uuid:e}).then((()=>{}))}showDeveloperTools(e){return this.wire.sendAction("show-developer-tools",e).then((()=>{}))}terminateExternalProcess(e){return this.wire.sendAction("terminate-external-process",e).then((()=>{}))}updateProxySettings(e){return this.wire.sendAction("update-proxy",e).then((()=>{}))}async downloadAsset(e,t){const n=()=>{};let i=n,r=n;const o=new Promise(((e,t)=>{i=e,r=t}));if("openfin"!==this.wire.environment.type)throw new oe.NotSupportedError("downloadAsset only supported in an OpenFin Render process");const s=oe.RuntimeError.getCallSite(),a=this.wire.environment.getNextMessageId().toString(),c=`asset-download-progress-${a}`,d=`asset-download-error-${a}`,h=`asset-download-complete-${a}`,l=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},u=()=>{this.removeListener(c,l)};await Promise.all([this.on(c,l),this.once(d,(e=>{u();const{reason:t,err:n}=e;r(new oe.RuntimeError({reason:t,error:n},s))})),this.once(h,(()=>{u(),i()}))]);const p=Object.assign(e,{downloadId:a});return await this.wire.sendAction("download-asset",p).catch((e=>{throw u(),e})),o}downloadRuntime(e,t){const n=oe.RuntimeError.getCallSite();return new Promise(((i,r)=>{if("openfin"!==this.wire.environment.type)return void r(new oe.NotSupportedError("downloadRuntime only supported in an OpenFin Render process"));const o=this.wire.environment.getNextMessageId().toString(),s=`runtime-download-progress-${o}`,a=`runtime-download-error-${o}`,c=`runtime-download-complete-${o}`,d=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},h=()=>{this.removeListener(s,d)};this.on(s,d),this.once(a,(e=>{h();const{reason:t,err:i}=e;r(new oe.RuntimeError({reason:t,error:i},n))})),this.once(c,(()=>{h(),i()}));const l=Object.assign(e,{downloadId:o});this.wire.sendAction("download-runtime",l).catch((e=>{h(),r(e)}))}))}downloadPreloadScripts(e){return this.wire.sendAction("download-preload-scripts",{scripts:e}).then((({payload:e})=>e.data))}getAllExternalApplications(){return this.wire.sendAction("get-all-external-applications").then((({payload:e})=>e.data))}getAppAssetInfo(e){return this.wire.sendAction("get-app-asset-info",e).then((({payload:e})=>e.data))}getCookies(e){const t=this.wire.environment.getUrl(),n=Object.assign(e,{url:t});return this.wire.sendAction("get-cookies",n).then((({payload:e})=>e.data))}setMinLogLevel(e){return this.wire.sendAction("set-min-log-level",{level:e}).then((()=>{}))}resolveUuid(e){return this.wire.sendAction("resolve-uuid",{entityKey:e}).then((({payload:e})=>e.data))}executeOnRemote(e,t){return t.requestingIdentity=e,this.wire.ferryAction(t)}readRegistryValue(e,t,n){return this.wire.sendAction("read-registry-value",{rootKey:e,subkey:t,value:n}).then((({payload:e})=>e.data))}registerExternalConnection(e){return this.wire.sendAction("register-external-connection",{uuid:e}).then((({payload:e})=>e.data))}async getServiceConfiguration(e){if("string"!=typeof e.name)throw new Error("Must provide an object with a `name` property having a string value");const{name:t}=e;return this.wire.sendAction("get-service-configuration",{name:t}).then((({payload:e})=>e.data))}async getSystemAppConfig(e){if("string"!=typeof e)throw new Error("Must provide a string value for name of system app");return this.wire.sendAction("get-system-app-configuration",{name:e}).then((({payload:e})=>e.data))}async registerShutdownHandler(e){this.wire.sendAction("system-register-shutdown-handler").catch((e=>{}));const{uuid:t,name:n}=this.wire.me;this.on("system-shutdown",(i=>{e({proceed:()=>{this.wire.environment.raiseEvent("application/system-shutdown-handled",{uuid:t,name:n,topic:"application"})}})}))}runRvmHealthCheck(){return this.wire.sendAction("run-rvm-health-check").then((({payload:e})=>e.data))}async launchManifest(e,t={}){const{subscribe:n,...i}=t,r=i;if(n){const e=new ae.EventEmitter;n(e);const t="app-version-progress",i="runtime-status",o="app-version-complete",s="app-version-error",a=this.wire.environment.getNextMessageId().toString();r.appVersionId=a;const c=[o,t,i,s],d=e=>{const{appVersionId:t,topic:n,type:i,...r}=e;return{...r,type:c.find((e=>i.includes(e)))}},h=t=>{const n=d(t);e.emit(n.type,n)},l=()=>{this.removeListener(`${t}.${a}`,h),this.removeListener(`${i}.${a}`,h),this.removeListener(`${o}.${a}`,h),this.removeListener(`${s}.${a}`,h),this.removeListener(`${o}.${a}`,l),this.removeListener(`${s}.${a}`,l)};await Promise.all([this.on(`${t}.${a}`,h),this.on(`${i}.${a}`,h),this.once(`${o}.${a}`,h),this.once(`${s}.${a}`,h),this.once(`${o}.${a}`,l),this.once(`${s}.${a}`,l)])}return(await this.wire.sendAction("launch-manifest",{manifestUrl:e,opts:r})).payload.data.manifest}async queryPermissionForCurrentContext(e){const t={uuid:this.wire.me.uuid,name:this.wire.me.name};return(await this.wire.sendAction("query-permission-for-current-context",{apiName:e,identity:t})).payload.data}async enableNativeWindowIntegrationProvider(e){const{payload:t}=await this.wire.sendAction("enable-native-window-integration-provider",{permissions:e});return t.data}async registerUsage({data:e,type:t}){await this.wire.sendAction("register-usage",{data:e,type:t})}async getPrinters(){const{payload:e}=await this.wire.sendAction("system-get-printers");return e.data}async updateProcessLoggingOptions(e){await this.wire.sendAction("system-update-process-logging-options",{options:e})}async getDomainSettings(){const{payload:{data:e}}=await this.wire.sendAction("get-domain-settings",this.identity);return e}async setDomainSettings(e){await this.wire.sendAction("set-domain-settings",{domainSettings:e,...this.identity})}async refreshExtensions(){const{payload:e}=await this.wire.sendAction("refresh-extensions");return e.data}async getInstalledExtensions(){const{payload:e}=await this.wire.sendAction("get-installed-extensions");return e.data}}c.System=ce;var de={},he={};Object.defineProperty(he,"__esModule",{value:!0}),he.RefCounter=void 0;he.RefCounter=class{constructor(){this.topicRefMap=new Map}incRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t+1;n=i,this.topicRefMap.set(e,i)}else this.topicRefMap.set(e,1),n=1;return n}decRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t-1;this.topicRefMap.set(e,i),n=i}else n=-1;return n}actOnFirst(e,t,n){return 1===this.incRefCount(e)?t():n()}actOnLast(e,t,n){return 0===this.decRefCount(e)?t():n()}};var le={},ue={},pe={};Object.defineProperty(pe,"__esModule",{value:!0}),pe.ChannelBase=pe.ProtectedItems=void 0;const we=e=>async(t,n,i)=>{const r=await e(t,n,i);return void 0===r?n:r};pe.ProtectedItems=class{constructor(e,t){this.providerIdentity=e,this.close=t}};class ye{static defaultAction(e){throw new Error(`No action registered at target for ${e}`)}constructor(){this.subscriptions=new Map}async processAction(e,t,n){try{const i=this.subscriptions.has(e)?this.subscriptions.get(e):(t,n)=>(this.defaultAction??ye.defaultAction)(e,t,n),r=this.preAction?await this.preAction(e,t,n):t,o=await i(r,n);return this.postAction?await this.postAction(e,o,n):o}catch(t){if(this.errorMiddleware)return this.errorMiddleware(e,t,n);throw t}}beforeAction(e){if(this.preAction)throw new Error("Already registered beforeAction middleware");this.preAction=we(e)}onError(e){if(this.errorMiddleware)throw new Error("Already registered error middleware");this.errorMiddleware=e}afterAction(e){if(this.postAction)throw new Error("Already registered afterAction middleware");this.postAction=we(e)}remove(e){this.subscriptions.delete(e)}setDefaultAction(e){if(this.defaultAction)throw new Error("default action can only be set once");this.defaultAction=e}register(e,t){if(this.subscriptions.has(e))throw new Error(`Subscription already registered for action: ${e}. Unsubscribe before adding new subscription`);return this.subscriptions.set(e,t),!0}}pe.ChannelBase=ye;var fe,ge,me,ve=s&&s.__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)},Ce=s&&s.__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};Object.defineProperty(ue,"__esModule",{value:!0}),ue.ChannelClient=void 0;const be=pe,Ie=new Map;class Ee extends be.ChannelBase{static closeChannelByEndpointId(e){const t=Ie.get(e);t&&ve(t,me,"f").call(t)}static handleProviderDisconnect(e){for(const t of Ie.values())t.providerIdentity.channelId===e.channelId&&(t.disconnectListener(e),ve(t,me,"f").call(t))}constructor(e,t,n){super(),fe.set(this,void 0),ge.set(this,void 0),this.processAction=(e,t,n)=>super.processAction(e,t,n),me.set(this,(()=>{Ie.delete(this.endpointId),ve(this,ge,"f").close()})),Ce(this,fe,new be.ProtectedItems(e,t),"f"),this.disconnectListener=()=>{},this.endpointId=e.endpointId,Ce(this,ge,n,"f"),Ie.set(this.endpointId,this),n.receive(this.processAction)}get providerIdentity(){return ve(this,fe,"f").providerIdentity}async dispatch(e,t){if(ve(this,ge,"f").isEndpointConnected(this.providerIdentity.channelId))return ve(this,ge,"f").send(this.providerIdentity.channelId,e,t);throw new Error("The client you are trying to dispatch from is disconnected from the target provider.")}onDisconnection(e){this.disconnectListener=t=>{try{e(t)}catch(e){throw new Error(`Error while calling the onDisconnection callback: ${e.message}`)}finally{this.disconnectListener=()=>{}}}}async disconnect(){await this.sendDisconnectAction(),ve(this,me,"f").call(this)}async sendDisconnectAction(){const e=ve(this,fe,"f");await e.close()}static async wireClose(e,t,n){const{channelName:i,uuid:r,name:o}=t;await e.sendAction("disconnect-from-channel",{channelName:i,uuid:r,name:o,endpointId:n})}}ue.ChannelClient=Ee,fe=new WeakMap,ge=new WeakMap,me=new WeakMap;var xe={},Ae={};Object.defineProperty(Ae,"__esModule",{value:!0}),Ae.exhaustiveCheck=void 0,Ae.exhaustiveCheck=function(e,t){throw new Error(`Unsupported value: ${e}${t?`\n Supported values are: ${t.join("")}`:""}`)};var Pe,Me,_e,Oe={},Se=s&&s.__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},Re=s&&s.__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)};Object.defineProperty(Oe,"__esModule",{value:!0}),Oe.ClassicInfo=Oe.ClassicStrategy=void 0;Oe.ClassicStrategy=class{constructor(e,t,n,i){this.messageReceiver=t,this.endpointId=n,this.providerIdentity=i,Pe.set(this,void 0),Me.set(this,new Map),_e.set(this,new Map),this.send=async(e,t,n)=>{const i=Re(this,Me,"f").get(e);if(!i)throw new Error(`Could not locate routing info for endpoint ${e}`);const r={...i};r.isLocalEndpointId&&delete r.endpointId,delete r.isLocalEndpointId;const o=Re(this,Pe,"f").sendAction("send-channel-message",{...r,providerIdentity:this.providerIdentity,action:t,payload:n});Re(this,_e,"f").get(e)?.add(o);return(await o.catch((e=>{throw new Error(e.message)})).finally((()=>{Re(this,_e,"f").get(e)?.delete(o)}))).payload.data.result},this.close=async()=>{this.messageReceiver.removeEndpoint(this.providerIdentity.channelId,this.endpointId),[...Re(this,Me,"f").keys()].forEach((e=>this.closeEndpoint(e))),Se(this,Me,new Map,"f")},Se(this,Pe,e,"f")}onEndpointDisconnect(e,t){}receive(e){this.messageReceiver.addEndpoint(e,this.providerIdentity.channelId,this.endpointId)}async closeEndpoint(e){const t=Re(this,Me,"f").get(e);Re(this,Me,"f").delete(e);const n=Re(this,_e,"f").get(e);n?.forEach((n=>{const i=`Channel connection with identity uuid: ${t?.uuid} / name: ${t?.name} / endpointId: ${e} no longer connected.`;n.cancel(new Error(i))}))}isEndpointConnected(e){return Re(this,Me,"f").has(e)}addEndpoint(e,t){Re(this,Me,"f").set(e,t.endpointIdentity),Re(this,_e,"f").set(e,new Set)}isValidEndpointPayload(e){return"string"==typeof e?.endpointIdentity?.endpointId||"string"==typeof e?.endpointIdentity?.channelId}},Pe=new WeakMap,Me=new WeakMap,_e=new WeakMap,Oe.ClassicInfo={version:5,minimumVersion:0,type:"classic"};var Fe={},je={},ke={};Object.defineProperty(ke,"__esModule",{value:!0}),ke.errorToPOJO=void 0,ke.errorToPOJO=function(e){return{stack:e.stack,name:e.name,message:e.message,toString:()=>e.stack||e.toString()}};var Le,Te,$e=s&&s.__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)},Be=s&&s.__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};Object.defineProperty(je,"__esModule",{value:!0}),je.RTCEndpoint=void 0;const Ge=ke;je.RTCEndpoint=class{static isValidEndpointPayload(e){const t=e=>"object"==typeof e&&null!==e;return t(e)&&t(e.endpointIdentity)&&t(e.rtc)&&"string"==typeof e.endpointIdentity.endpointId}constructor({rtc:e,endpointIdentity:t}){this.responseMap=new Map,Le.set(this,null),Te.set(this,void 0),this.connectionStateChangeHandler=e=>{"connected"!==this.rtc.rtcClient.connectionState&&(this.rtc.rtcClient.removeEventListener("connectionstatechange",this.connectionStateChangeHandler),this.close(),$e(this,Te,"f")&&$e(this,Te,"f").call(this))},this.send=async(e,t)=>{const n=`message-${Math.random()}`,i=new Promise(((e,t)=>{this.responseMap.set(n,{resolve:e,reject:t})}));return this.rtc.channels.request.send(JSON.stringify({action:e,payload:t,messageId:n})),i},this.close=()=>{this.responseMap.forEach((e=>e.reject("Connection has closed."))),this.responseMap=new Map,this.rtc.channels.request.close(),this.rtc.channels.response.close(),this.rtc.rtcClient.close()},this.rtc=e,this.endpointIdentity=t,this.rtc.channels.response.addEventListener("message",(e=>{let{data:t}=e;e.data instanceof ArrayBuffer&&(t=(new TextDecoder).decode(e.data));const{messageId:n,payload:i,success:r,error:o}=JSON.parse(t),{resolve:s,reject:a}=this.responseMap.get(n)??{};s&&a?(this.responseMap.delete(n),r?s(i):a(o)):(console.log("Could not find id in responseMap."),console.log(e))})),this.rtc.channels.request.addEventListener("message",(async e=>{let{data:n}=e;e.data instanceof ArrayBuffer&&(n=(new TextDecoder).decode(e.data));const{messageId:i,action:r,payload:o}=JSON.parse(n);if($e(this,Le,"f"))try{const e=await $e(this,Le,"f").call(this,r,o,t);this.rtc.channels.response.send(JSON.stringify({messageId:i,payload:e,success:!0}))}catch(e){"open"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,error:(0,Ge.errorToPOJO)(e),success:!1}))}else"open"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,success:!1,error:"Connection not ready."}))})),this.rtc.rtcClient.addEventListener("connectionstatechange",this.connectionStateChangeHandler),Object.values(this.rtc.channels).forEach((e=>{e.onclose=e=>{[...this.responseMap.values()].forEach((e=>e.reject(new Error("RTCDataChannel closed unexpectedly, this is most commonly caused by message size. Note: RTC Channels have a message size limit of ~255kB.")))),this.close(),$e(this,Te,"f")&&$e(this,Te,"f").call(this)}}))}onDisconnect(e){if($e(this,Te,"f"))throw new Error("RTCEndpoint disconnectListener cannot be set twice.");Be(this,Te,e,"f")}receive(e){if($e(this,Le,"f"))throw new Error("You have already set a listener for this RTC Endpoint.");Be(this,Le,e,"f")}get connected(){return"connected"===this.rtc.rtcClient.connectionState}},Le=new WeakMap,Te=new WeakMap;var We,He,Ne,De={},Ue=s&&s.__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)},Ve=s&&s.__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};Object.defineProperty(De,"__esModule",{value:!0}),De.EndpointStrategy=void 0;De.EndpointStrategy=class{constructor(e,t,n){this.EndpointType=e,this.StrategyName=n,We.set(this,null),He.set(this,new Map),Ne.set(this,!0),this.send=async(e,t,n)=>this.getEndpointById(e).send(t,n),this.close=async()=>{Ue(this,Ne,"f")&&(Ue(this,He,"f").forEach((e=>e.close())),Ve(this,He,new Map,"f")),Ve(this,Ne,!1,"f")},this.isValidEndpointPayload=t}onEndpointDisconnect(e,t){this.getEndpointById(e).onDisconnect(t)}receive(e){if(Ue(this,We,"f"))throw new Error(`You have already set a listener for this ${this.StrategyName} Strategy`);Ve(this,We,e,"f"),Ue(this,He,"f").forEach((e=>e.receive(Ue(this,We,"f"))))}getEndpointById(e){const t=Ue(this,He,"f").get(e);if(!t)throw new Error(`Client with endpoint id ${e} is not connected`);return t}get connected(){return Ue(this,Ne,"f")}isEndpointConnected(e){return Ue(this,He,"f").has(e)}addEndpoint(e,t){if(!Ue(this,Ne,"f"))return void console.warn(`Adding endpoint to disconnected ${this.StrategyName} Strategy`);const n=new this.EndpointType(t);Ue(this,We,"f")&&n.receive(Ue(this,We,"f")),Ue(this,He,"f").set(e,n)}async closeEndpoint(e){Ue(this,He,"f").delete(e)}},We=new WeakMap,He=new WeakMap,Ne=new WeakMap,Object.defineProperty(Fe,"__esModule",{value:!0}),Fe.RTCInfo=Fe.RTCStrategy=void 0;const ze=je,Ke=De;class qe extends Ke.EndpointStrategy{constructor(){super(ze.RTCEndpoint,ze.RTCEndpoint.isValidEndpointPayload,"RTC")}}Fe.RTCStrategy=qe,Fe.RTCInfo={version:2,minimumVersion:0,type:"rtc"};var Je={};Object.defineProperty(Je,"__esModule",{value:!0}),Je.RTCICEManager=void 0;const Ye=d;class Ze extends Ye.EmitterBase{constructor(e){super(e,"channel"),this.ensureChannelOpened=e=>new Promise(((t,n)=>{if("open"===e.readyState)t();else if("connecting"===e.readyState){const n=()=>{e.removeEventListener("open",n),t()};e.addEventListener("open",n)}else n(new Error("This Channel has already closed"))}))}static createDataChannelPromise(e,t){let n;const i=new Promise((e=>{n=e})),r=i=>{const o=()=>{i.channel.removeEventListener("open",o),n(i.channel)};i.channel.label===e&&(i.channel.addEventListener("open",o),t.removeEventListener("datachannel",r))};return t.addEventListener("datachannel",r),i}async listenForProviderIce(e,t){await this.on(this.createProviderEventName(e),t,{timestamp:Date.now()})}async raiseProviderIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createProviderEventName(e)),t)}async listenForClientIce(e,t){await this.on(this.createClientEventName(e),t,{timestamp:Date.now()})}async raiseClientIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createClientEventName(e)),t)}cleanupIceListeners(e){this.removeAllListeners(this.createClientEventName(e)),this.removeAllListeners(this.createProviderEventName(e))}createClientEventName(e){return`ice-client-${e}`}createProviderEventName(e){return`ice-provider-${e}`}createRouteString(e){return`channel/${e}`}createRtcPeer(){return this.wire.environment.getRtcPeer()}async startClientOffer(){const e=Math.random().toString(),t=this.createRtcPeer();t.addEventListener("icecandidate",(async t=>{t.candidate&&await this.raiseClientIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForProviderIce(e,(async e=>{await t.addIceCandidate(e.candidate)}));const n={request:t.createDataChannel("request"),response:t.createDataChannel("response")},i=await t.createOffer();await t.setLocalDescription(i);const r=Promise.all([n.request,n.response].map(this.ensureChannelOpened)).then((()=>{}));return{rtcClient:t,channels:n,offer:i,rtcConnectionId:e,channelsOpened:r}}async finishClientOffer(e,t,n){return await e.setRemoteDescription(t),await n,!0}async createProviderAnswer(e,t){const n=this.createRtcPeer(),i=Ze.createDataChannelPromise("request",n),r=Ze.createDataChannelPromise("response",n);n.addEventListener("icecandidate",(async t=>{t.candidate&&await this.raiseProviderIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForClientIce(e,(async e=>{await n.addIceCandidate(e.candidate)})),await n.setRemoteDescription(t);const o=await n.createAnswer();await n.setLocalDescription(o);const s=Promise.all([i,r]).then((([t,n])=>(this.cleanupIceListeners(e),{request:t,response:n})));return{rtcClient:n,answer:o,channels:s}}}Je.RTCICEManager=Ze;var Qe={},Xe={};function et(e){return[...e.split(".").reverse().entries()].reduce(((e,[t,n])=>e+ +n*1e4**t),0)}function tt(e,t){return et(e)>=et(t)}function nt(e){return e.split("/")[0]}Object.defineProperty(Xe,"__esModule",{value:!0}),Xe.runtimeUuidMeetsMinimumRuntimeVersion=Xe.parseRuntimeUuid=Xe.meetsMinimumRuntimeVersion=void 0,Xe.meetsMinimumRuntimeVersion=tt,Xe.parseRuntimeUuid=nt,Xe.runtimeUuidMeetsMinimumRuntimeVersion=function(e,t){return tt(nt(e),t)};var it,rt,ot,st,at,ct=s&&s.__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)},dt=s&&s.__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};Object.defineProperty(Qe,"__esModule",{value:!0}),Qe.ChannelProvider=void 0;const ht=pe,lt=Xe;class ut extends ht.ChannelBase{get connections(){return[...ct(this,it,"f")]}static handleClientDisconnection(e,t){const n=e.connections.find((e=>e.endpointId===t.endpointId));if(n)ct(e,st,"f").call(e,n);else{e.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name)).forEach(ct(e,st,"f"))}e.disconnectListener(t)}static setProviderRemoval(e,t){ut.removalMap.set(e,t)}constructor(e,t,n){super(),it.set(this,void 0),rt.set(this,void 0),ot.set(this,void 0),st.set(this,(e=>{const t=this.connections.filter((t=>t.endpointId!==e.endpointId));ct(this,ot,"f").closeEndpoint(e.endpointId),dt(this,it,t,"f")})),this.processAction=async(e,t,n)=>(ut.clientIsMultiRuntime(n)&&!(0,lt.runtimeUuidMeetsMinimumRuntimeVersion)(n.runtimeUuid,"18.87.56.0")?this.handleMultiRuntimeLegacyClient(n):this.checkForClientConnection(n),super.processAction(e,t,n)),at.set(this,(()=>{ct(this,ot,"f").close();const e=ut.removalMap.get(this);e&&e()})),dt(this,rt,new ht.ProtectedItems(e,t),"f"),this.connectListener=()=>{},this.disconnectListener=()=>{},dt(this,it,[],"f"),dt(this,ot,n,"f"),n.receive(this.processAction)}dispatch(e,t,n){const i=e.endpointId??this.getEndpointIdForOpenFinId(e,t);return i&&ct(this,ot,"f").isEndpointConnected(i)?ct(this,ot,"f").send(i,t,n):Promise.reject(new Error(`Client connection with identity uuid: ${e.uuid} / name: ${e.name} / endpointId: ${i} no longer connected.`))}async processConnection(e,t){return ct(this,it,"f").push(e),this.connectListener(e,t)}publish(e,t){return this.connections.map((n=>ct(this,ot,"f").send(n.endpointId,e,t)))}onConnection(e){this.connectListener=e}onDisconnection(e){this.disconnectListener=e}async destroy(){const e=ct(this,rt,"f");e.providerIdentity,dt(this,it,[],"f"),await e.close(),ct(this,at,"f").call(this)}async getAllClientInfo(){return this.connections.map((e=>{const{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}=e;return{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}}))}checkForClientConnection(e){if(!this.isClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider.\n Client Identity: {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}isClientConnected(e){return ut.clientIdentityIncludesEndpointId(e)?this.connections.some((t=>t.endpointId===e.endpointId&&t.uuid===e.uuid&&t.name===e.name)):this.isLegacyClientConnected(e)}isLegacyClientConnected(e){return this.connections.some((t=>t.uuid===e.uuid&&t.name===e.name))}handleMultiRuntimeLegacyClient(e){if(!this.isLegacyClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider. Client Identity:\n {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}getEndpointIdForOpenFinId(e,t){const n=this.connections.filter((t=>t.name===e.name&&t.uuid===e.uuid));if(n.length>=2){const n=ct(this,rt,"f"),{uuid:i,name:r}=e,o=n?.providerIdentity.uuid,s=n?.providerIdentity.name;console.warn(`WARNING: Dispatch call may have unintended results. The "to" argument of your dispatch call is missing the\n "endpointId" parameter. The identity you are dispatching to ({uuid: ${i}, name: ${r}})\n has multiple channelClients for this channel. Your dispatched action: (${t}) from the provider:\n ({uuid: ${o}, name: ${s}}) will only be processed by the most recently-created client.`)}return n.pop()?.endpointId}static clientIdentityIncludesEndpointId(e){return void 0!==e.endpointId}static clientIsMultiRuntime(e){return void 0!==e.runtimeUuid}static async wireClose(e,t){await e.sendAction("destroy-channel",{channelName:t})}}Qe.ChannelProvider=ut,it=new WeakMap,rt=new WeakMap,ot=new WeakMap,st=new WeakMap,at=new WeakMap,ut.removalMap=new WeakMap;var pt={};Object.defineProperty(pt,"__esModule",{value:!0}),pt.MessageReceiver=void 0;const wt=ue,yt=d;class ft extends yt.Base{constructor(e){super(e),this.onmessage=e=>"process-channel-message"===e.action&&(this.processChannelMessage(e),!0),this.endpointMap=new Map,this.latestEndpointIdByChannelId=new Map,e.registerMessageHandler(this.onmessage.bind(this))}async processChannelMessage(e){const{senderIdentity:t,providerIdentity:n,action:i,ackToSender:r,payload:o,intendedTargetIdentity:s}=e.payload,a=s.channelId??s.endpointId??this.latestEndpointIdByChannelId.get(n.channelId),c=this.endpointMap.get(a);if(!c)return r.payload.success=!1,r.payload.reason=`Client connection with identity uuid: ${this.wire.me.uuid} / name: ${this.wire.me.name} / endpointId: ${a} no longer connected.`,this.wire.sendRaw(r);try{const e=await c(i,o,t);return r.payload.payload=r.payload.payload||{},r.payload.payload.result=e,this.wire.sendRaw(r)}catch(e){return r.payload.success=!1,r.payload.reason=e.message,this.wire.sendRaw(r)}}addEndpoint(e,t,n){this.endpointMap.set(n,e),t!==n&&this.latestEndpointIdByChannelId.set(t,n)}removeEndpoint(e,t){this.endpointMap.delete(t),this.latestEndpointIdByChannelId.get(e)===t&&this.latestEndpointIdByChannelId.delete(e)}checkForPreviousClientConnection(e){const t=this.latestEndpointIdByChannelId.get(e);t&&(wt.ChannelClient.closeChannelByEndpointId(t),console.warn("You have created a second connection to an older provider. First connection has been removed from the clientMap"),console.warn("If the provider calls publish(), you may receive multiple messages."))}}pt.MessageReceiver=ft;var gt={};Object.defineProperty(gt,"__esModule",{value:!0}),gt.ProtocolManager=void 0;gt.ProtocolManager=class{constructor(e){this.ProtocolsInPreferenceOrder=e,this.DefaultClientProtocols=["classic"],this.DefaultProviderProtocols=["classic"],this.getClientProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultClientProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(", ")}.`);return t},this.getProviderProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultProviderProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(", ")}.`);return t},this.getCompatibleProtocols=(e,t)=>t.supportedProtocols.filter((t=>e.some((e=>e.type===t.type&&t.version>=e.minimumVersion&&e.version>=(t.minimumVersion??0))))).slice(0,t.maxProtocols)}};var mt={};Object.defineProperty(mt,"__esModule",{value:!0});class vt{static combine(e,t){return new vt(e,t)}constructor(e,t){this.primary=e,this.secondary=t}onEndpointDisconnect(e,t){this.primary.onEndpointDisconnect(e,(()=>{this.secondary.isEndpointConnected(e)||t()})),this.secondary.onEndpointDisconnect(e,(()=>{this.primary.isEndpointConnected(e)||t()}))}isValidEndpointPayload(e){return this.primary.isValidEndpointPayload(e)||this.secondary.isValidEndpointPayload(e)}async closeEndpoint(e){await this.primary.closeEndpoint(e),await this.secondary.closeEndpoint(e)}isEndpointConnected(e){return this.primary.isEndpointConnected(e)||this.secondary.isEndpointConnected(e)}async addEndpoint(e,t){this.primary.isValidEndpointPayload(t)&&await this.primary.addEndpoint(e,t),this.secondary.isValidEndpointPayload(t)&&await this.secondary.addEndpoint(e,t)}receive(e){this.primary.receive(e),this.secondary.receive(e)}send(e,t,n){return this.primary.isEndpointConnected(e)?this.primary.send(e,t,n):this.secondary.send(e,t,n)}async close(){await Promise.all([this.primary.close(),this.secondary.close()])}}mt.default=vt;var Ct,bt,It=s&&s.__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},Et=s&&s.__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)},xt=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(xe,"__esModule",{value:!0}),xe.ConnectionManager=void 0;const At=Ae,Pt=d,Mt=Oe,_t=Fe,Ot=Je,St=Qe,Rt=pt,Ft=gt,jt=xt(mt);class kt extends Pt.Base{static getProtocolOptionsFromStrings(e){return e.map((e=>{switch(e){case"rtc":return _t.RTCInfo;case"classic":return Mt.ClassicInfo;default:return(0,At.exhaustiveCheck)(e,["rtc","classic"])}}))}constructor(e){super(e),Ct.set(this,void 0),bt.set(this,void 0),this.removeChannelFromProviderMap=e=>{this.providerMap.delete(e)},this.onmessage=e=>"process-channel-connection"===e.action&&(this.processChannelConnection(e),!0),this.providerMap=new Map,this.protocolManager=new Ft.ProtocolManager("node"===this.wire.environment.type?["classic"]:["rtc","classic"]),It(this,Ct,new Rt.MessageReceiver(e),"f"),It(this,bt,new Ot.RTCICEManager(e),"f"),e.registerMessageHandler(this.onmessage.bind(this))}createProvider(e,t){const n=Object.assign(this.wire.environment.getDefaultChannelOptions().create,e||{}),i=this.protocolManager.getProviderProtocols(n?.protocols),r=i.map((e=>{switch(e){case"rtc":return new _t.RTCStrategy;case"classic":return new Mt.ClassicStrategy(this.wire,Et(this,Ct,"f"),t.channelId,t);default:return(0,At.exhaustiveCheck)(e,["rtc","classic"])}}));let o;if(2===r.length){const[e,t]=r;o=jt.default.combine(e,t)}else{if(1!==r.length)throw new Error("failed to combine strategies");[o]=r}const s=new St.ChannelProvider(t,(()=>St.ChannelProvider.wireClose(this.wire,t.channelName)),o),a=t.channelId;return this.providerMap.set(a,{provider:s,strategy:o,supportedProtocols:kt.getProtocolOptionsFromStrings(i)}),St.ChannelProvider.setProviderRemoval(s,this.removeChannelFromProviderMap.bind(this)),s}async createClientOffer(e){const t=this.protocolManager.getClientProtocols(e?.protocols);let n;return{offer:{supportedProtocols:await Promise.all(t.map((async e=>{switch(e){case"rtc":{const{rtcClient:e,channels:t,offer:i,rtcConnectionId:r,channelsOpened:o}=await Et(this,bt,"f").startClientOffer();return n={rtcClient:e,channels:t,channelsOpened:o},{type:"rtc",version:_t.RTCInfo.version,payload:{offer:i,rtcConnectionId:r}}}case"classic":return{type:"classic",version:Mt.ClassicInfo.version};default:return(0,At.exhaustiveCheck)(e,["rtc","classic"])}}))),maxProtocols:2},rtc:n}}async createClientStrategy(e,t){t.endpointId||(t.endpointId=this.wire.environment.getNextMessageId(),Et(this,Ct,"f").checkForPreviousClientConnection(t.channelId));const n=t.answer??{supportedProtocols:[{type:"classic",version:1}]},i=(await Promise.all(n.supportedProtocols.map((async n=>"rtc"===n.type&&e?(await Et(this,bt,"f").finishClientOffer(e.rtcClient,n.payload.answer,e.channelsOpened),new _t.RTCStrategy):"classic"===n.type?new Mt.ClassicStrategy(this.wire,Et(this,Ct,"f"),t.endpointId,t):null)))).filter((e=>null!==e));let r;if(e&&!i.some((e=>e instanceof _t.RTCStrategy))&&e&&e.rtcClient.close(),i.length>=2)r=jt.default.combine(i[0],i[1]);else{if(!i.length)throw new Error("No compatible protocols");[r]=i}const o={endpointIdentity:t,rtc:e};return r.addEndpoint(t.channelId,o),r}async processChannelConnection(e){const{clientIdentity:t,providerIdentity:n,ackToSender:i,payload:r,offer:o}=e.payload;t.endpointId?t.isLocalEndpointId=!1:(t.endpointId=this.wire.environment.getNextMessageId(),t.isLocalEndpointId=!0);const s=n.channelId,a=this.providerMap.get(s);if(!a)return i.payload.success=!1,i.payload.reason=`Channel "${n.channelName}" has been destroyed.`,this.wire.sendRaw(i);const{provider:c,strategy:d,supportedProtocols:h}=a;try{if(!(c instanceof St.ChannelProvider))throw Error("Cannot connect to a channel client");const e=o??{supportedProtocols:[{type:"classic",version:1}],maxProtocols:1},n=this.protocolManager.getCompatibleProtocols(h,e);if(!n.length)throw new Error("This provider does not support any of the offered protocols.");const s=await c.processConnection(t,r);i.payload.payload=i.payload.payload||{};let a={supportedProtocols:[],endpointPayloadPromise:Promise.resolve({endpointIdentity:t})};return a=await n.reduce((async(e,t)=>{const n=await e;if("rtc"===t.type){const{answer:e,rtcClient:i,channels:r}=await Et(this,bt,"f").createProviderAnswer(t.payload.rtcConnectionId,t.payload.offer);n.supportedProtocols.push({type:"rtc",version:_t.RTCInfo.version,payload:{answer:e}}),n.endpointPayloadPromise=n.endpointPayloadPromise.then((e=>r.then((t=>({...e,rtc:{rtcClient:i,channels:t}})))))}else n.supportedProtocols.push({type:"classic",version:Mt.ClassicInfo.version});return n}),Promise.resolve(a)),a.endpointPayloadPromise.then((e=>d.addEndpoint(t.endpointId,e))),i.payload.payload.result=s,i.payload.payload.answer=a,this.wire.sendRaw(i)}catch(e){return i.payload.success=!1,i.payload.reason=e.message,this.wire.sendRaw(i)}}}xe.ConnectionManager=kt,Ct=new WeakMap,bt=new WeakMap;var Lt,Tt,$t,Bt=s&&s.__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},Gt=s&&s.__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)};Object.defineProperty(le,"__esModule",{value:!0}),le.Channel=void 0;const Wt=t,Ht=G,Nt=d,Dt=ue,Ut=xe,Vt=Qe;function zt(e){const t=Math.floor(e/10),n=Math.min(3e4,500*2**t);return new Promise((e=>{setTimeout((()=>{e(!1)}),n)}))}class Kt extends Nt.EmitterBase{constructor(e){super(e,"channel"),Lt.set(this,void 0),Tt.set(this,new Wt.EventEmitter),$t.set(this,new Ht.AsyncRetryableLazy((async()=>{await Promise.all([this.on("disconnected",(e=>{Dt.ChannelClient.handleProviderDisconnect(e)})),this.on("connected",((...e)=>{Gt(this,Tt,"f").emit("connected",...e)}))]).catch((()=>new Error("error setting up channel connection listeners")))}))),Bt(this,Lt,new Ut.ConnectionManager(e),"f")}async getAllChannels(){return this.wire.sendAction("get-all-channels").then((({payload:e})=>e.data))}async onChannelConnect(e){await this.on("connected",e)}async onChannelDisconnect(e){await this.on("disconnected",e)}async safeConnect(e,t,n){const i={count:0};do{let r=()=>{};const o=new Promise((t=>{r=n=>{e===n.channelName&&t(!0)},Gt(this,Tt,"f").on("connected",r)}));try{if(i.count>0){i.gotConnectedEvent=await Promise.race([zt(i.count),o]);const t=await this.wire.sendAction("connect-to-channel",{...n,retryInfo:i});return console.log(`Successfully connected to channelName: ${e}`),t.payload.data}const t=this.wire.sendAction("connect-to-channel",n);i.originalMessageId=t.messageId;return(await t).payload.data}catch(n){if(!n.message.includes("internal-nack"))throw n;t&&0===i.count&&console.warn(`No channel found for channelName: ${e}. Waiting for connection...`)}finally{i.count+=1,Gt(this,Tt,"f").removeListener("connected",r)}}while(t);throw new Error(`No channel found for channelName: ${e}.`)}async connect(e,t={}){if(await Gt(this,$t,"f").getValue(),!e||"string"!=typeof e)throw new Error("Please provide a channelName string to connect to a channel.");const n={wait:!0,...this.wire.environment.getDefaultChannelOptions().connect,...t},{offer:i,rtc:r}=await Gt(this,Lt,"f").createClientOffer(n);let o;(this.fin.me.isFrame||this.fin.me.isView||this.fin.me.isWindow)&&(o=(await this.fin.me.getInfo()).url);const s={channelName:e,...n,offer:i,connectionUrl:o},a=await this.safeConnect(e,n.wait,s),c=await Gt(this,Lt,"f").createClientStrategy(r,a),d=new Dt.ChannelClient(a,(()=>Dt.ChannelClient.wireClose(this.wire,a,a.endpointId)),c);return c.onEndpointDisconnect(a.channelId,(async()=>{try{await d.sendDisconnectAction()}catch(e){console.warn(`Something went wrong during disconnect for client with uuid: ${a.uuid} / name: ${a.name} / endpointId: ${a.endpointId}.`)}finally{Dt.ChannelClient.handleProviderDisconnect(a)}})),d}async create(e,t){if(!e)throw new Error("Please provide a channelName to create a channel");const{payload:{data:n}}=await this.wire.sendAction("create-channel",{channelName:e}),i=Gt(this,Lt,"f").createProvider(t,n);return this.on("client-disconnected",(t=>{t.channelName===e&&Vt.ChannelProvider.handleClientDisconnection(i,t)})),i}}le.Channel=Kt,Lt=new WeakMap,Tt=new WeakMap,$t=new WeakMap,Object.defineProperty(de,"__esModule",{value:!0}),de.InterAppPayload=de.InterApplicationBus=void 0;const qt=t,Jt=d,Yt=he,Zt=le,Qt=O;class Xt extends Jt.Base{constructor(e){super(e),this.events={subscriberAdded:"subscriber-added",subscriberRemoved:"subscriber-removed"},this.refCounter=new Yt.RefCounter,this.Channel=new Zt.Channel(e),this.emitter=new qt.EventEmitter,e.registerMessageHandler(this.onmessage.bind(this)),this.on=this.emitter.on.bind(this.emitter),this.removeAllListeners=this.emitter.removeAllListeners.bind(this.emitter)}async publish(e,t){await this.wire.sendAction("publish-message",{topic:e,message:t,sourceWindowName:this.me.name})}async send(e,t,n){const i=(0,Qt.validateIdentity)(e);if(i)throw new Error(i);await this.wire.sendAction("send-message",{destinationUuid:e.uuid,destinationWindowName:e.name,topic:t,message:n,sourceWindowName:this.me.name})}subscribe(e,t,n){const i=this.createSubscriptionKey(e.uuid,e.name||"*",t);return this.emitter.on(i,n),this.refCounter.actOnFirst(i,(async()=>{await this.wire.sendAction("subscribe",{sourceUuid:e.uuid,sourceWindowName:e.name||"*",topic:t,destinationWindowName:this.me.name})}),(()=>Promise.resolve()))}unsubscribe(e,t,n){const i=e.name||"*",r=this.createSubscriptionKey(e.uuid,i,t);return this.emitter.removeListener(r,n),this.refCounter.actOnLast(r,(async()=>{await this.wire.sendAction("unsubscribe",{sourceUuid:e.uuid,sourceWindowName:i,topic:t,destinationWindowName:this.me.name})}),(()=>new Promise((e=>e)).then((()=>{}))))}processMessage(e){const{payload:{message:t,sourceWindowName:n,sourceUuid:i,topic:r}}=e,o=[this.createSubscriptionKey(i,n,r),this.createSubscriptionKey(i,"*",r),this.createSubscriptionKey("*","*",r)],s={uuid:i,name:n};o.forEach((e=>{this.emitter.emit(e,t,s)}))}emitSubscriverEvent(e,t){const{payload:{targetName:n,uuid:i,topic:r}}=t,o={name:n,uuid:i,topic:r};this.emitter.emit(e,o)}createSubscriptionKey(e,t,n){const i=t||"*";if(!(e&&i&&n))throw new Error("Missing uuid, name, or topic string");return function(...e){return e.map((e=>Buffer.from(`${e}`).toString("base64"))).join("/")}(e,i,n)}onmessage(e){const{action:t}=e;switch(t){case"process-message":this.processMessage(e);break;case this.events.subscriberAdded:this.emitSubscriverEvent(this.events.subscriberAdded,e);break;case this.events.subscriberRemoved:this.emitSubscriverEvent(this.events.subscriberRemoved,e)}return!0}}de.InterApplicationBus=Xt;de.InterAppPayload=class{};var en={};Object.defineProperty(en,"__esModule",{value:!0}),en.Clipboard=void 0;const tn=d;class nn extends tn.Base{async writeText(e){await this.wire.sendAction("clipboard-write-text",e)}async readText(e){const{payload:t}=await this.wire.sendAction("clipboard-read-text",{type:e});return t.data}async writeImage(e){await this.wire.sendAction("clipboard-write-image",e)}async readImage(e={format:"dataURL"}){const{payload:t}=await this.wire.sendAction("clipboard-read-image",e);return t.data}async writeHtml(e){await this.wire.sendAction("clipboard-write-html",e)}async readHtml(e){const{payload:t}=await this.wire.sendAction("clipboard-read-html",{type:e});return t.data}async writeRtf(e){await this.wire.sendAction("clipboard-write-rtf",e)}async readRtf(e){const{payload:t}=await this.wire.sendAction("clipboard-read-rtf",{type:e});return t.data}async write(e){await this.wire.sendAction("clipboard-write",e)}async getAvailableFormats(e){const{payload:t}=await this.wire.sendAction("clipboard-read-formats",{type:e});return t.data}}en.Clipboard=nn;var rn={},on={},sn={};Object.defineProperty(sn,"__esModule",{value:!0}),sn.ExternalApplication=void 0;const an=d;class cn extends an.EmitterBase{constructor(e,t){super(e,"external-application",t.uuid),this.identity=t}getInfo(){return this.wire.sendAction("get-external-application-info",this.identity).then((({payload:e})=>e.data))}}sn.ExternalApplication=cn,Object.defineProperty(on,"__esModule",{value:!0}),on.ExternalApplicationModule=void 0;const dn=d,hn=sn;class ln extends dn.Base{wrap(e){return this.wire.sendAction("external-application-wrap").catch((e=>{})),Promise.resolve(new hn.ExternalApplication(this.wire,{uuid:e}))}wrapSync(e){return this.wire.sendAction("external-application-wrap-sync").catch((e=>{})),new hn.ExternalApplication(this.wire,{uuid:e})}}on.ExternalApplicationModule=ln,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(on,e),n(sn,e)}(rn);var un={},pn={},wn={};Object.defineProperty(wn,"__esModule",{value:!0}),wn._Frame=void 0;const yn=d;class fn extends yn.EmitterBase{constructor(e,t){super(e,"frame",t.uuid,t.name),this.identity=t}getInfo(){return this.wire.sendAction("get-frame-info",this.identity).then((({payload:e})=>e.data))}getParentWindow(){return this.wire.sendAction("get-parent-window",this.identity).then((({payload:e})=>e.data))}}wn._Frame=fn,Object.defineProperty(pn,"__esModule",{value:!0}),pn._FrameModule=void 0;const gn=d,mn=O,vn=wn;class Cn extends gn.Base{async wrap(e){this.wire.sendAction("frame-wrap").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}wrapSync(e){this.wire.sendAction("frame-wrap-sync").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}getCurrent(){return this.wire.sendAction("frame-get-current").catch((e=>{})),Promise.resolve(new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity()))}getCurrentSync(){return this.wire.sendAction("frame-get-current-sync").catch((e=>{})),new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity())}}pn._FrameModule=Cn,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(pn,e),n(wn,e)}(un);var bn={};Object.defineProperty(bn,"__esModule",{value:!0}),bn.GlobalHotkey=void 0;const In=d;class En extends In.EmitterBase{constructor(e){super(e,"global-hotkey")}async register(e,t){await this.on(e,t),await this.wire.sendAction("global-hotkey-register",{hotkey:e})}async unregister(e){await this.removeAllListeners(e),await this.wire.sendAction("global-hotkey-unregister",{hotkey:e})}async unregisterAll(){await Promise.all(this.eventNames().filter((e=>!("registered"===e||"unregistered"===e))).map((e=>this.removeAllListeners(e)))),await this.wire.sendAction("global-hotkey-unregister-all",{})}async isRegistered(e){const{payload:{data:t}}=await this.wire.sendAction("global-hotkey-is-registered",{hotkey:e});return t}}bn.GlobalHotkey=En;var xn,An={},Pn={},Mn={},_n=s&&s.__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)};Object.defineProperty(Mn,"__esModule",{value:!0}),Mn.Platform=void 0;const On=d,Sn=O,Rn=new Map;class Fn extends On.EmitterBase{constructor(e,t){super(t.wire,"application",e.uuid),this.getClient=e=>{this.wire.sendAction("platform-get-client",this.identity).catch((e=>{}));const t=e||this.identity,{uuid:n}=t;if(!Rn.has(n)){const e=_n(this,xn,"f").call(this,n);Rn.set(n,e)}return Rn.get(n)},xn.set(this,(async e=>{try{const t=`custom-frame-${e}`,n=await this._channel.connect(t,{wait:!1});return n.onDisconnection((()=>{Rn.delete(e)})),n}catch(t){throw Rn.delete(e),new Error("The targeted Platform is not currently running. Listen for application-started event for the given Uuid.")}})),this.launchLegacyManifest=this.launchContentManifest;const n=(0,Sn.validateIdentity)(e);if(n)throw new Error(n);this._channel=t,this.identity={uuid:e.uuid},this.Layout=this.fin.Platform.Layout,this.Application=this.fin.Application.wrapSync(this.identity)}async createView(e,t,n){this.wire.sendAction("platform-create-view",this.identity).catch((e=>{}));const i=await this.getClient(),r=await i.dispatch("create-view",{target:t,opts:e,targetView:n});if(!r||(0,Sn.validateIdentity)(r.identity))throw new Error(`When overwriting the createView call, please return an object that has a valid 'identity' property: ${JSON.stringify(r)}`);return this.fin.View.wrapSync(r.identity)}async createWindow(e){this.wire.sendAction("platform-create-window",this.identity).catch((e=>{}));const t=await this.getClient();e.reason||(e.reason="api-call");const n=await t.dispatch("create-view-container",e);if(!n||(0,Sn.validateIdentity)(n.identity))throw new Error(`When overwriting the createWindow call, please return an object that has a valid 'identity' property: ${JSON.stringify(n)}`);const{identity:i}=n,r=this.fin.Window.wrapSync(i);return r.name=i.name,r.uuid=i.uuid,r}async quit(){this.wire.sendAction("platform-quit",this.identity).catch((e=>{}));return(await this.getClient()).dispatch("quit")}async closeView(e){this.wire.sendAction("platform-close-view",this.identity).catch((e=>{}));const t=await this.getClient();await t.dispatch("close-view",{view:e})}async reparentView(e,t){console.warn("Platform.reparentView has been deprecated, please use Platform.createView"),this.wire.sendAction("platform-reparent-view",this.identity).catch((e=>{}));const n={...e,uuid:e.uuid??this.identity.uuid},i=await this.fin.View.wrap(n),r=await i.getOptions();return this.createView(r,t)}async getSnapshot(){this.wire.sendAction("platform-get-snapshot",this.identity).catch((e=>{}));return(await this.getClient()).dispatch("get-snapshot")}async getViewSnapshot(e){return(await this.getClient()).dispatch("get-view-snapshot",{viewIdentity:e})}async applySnapshot(e,t){this.wire.sendAction("platform-apply-snapshot",this.identity).catch((e=>{}));const n="Requested snapshot must be a valid Snapshot object, or a url or filepath to such an object.";let i;if("string"==typeof e)try{i=(await this._channel.wire.sendAction("get-application-manifest",{manifestUrl:e})).payload.data}catch(e){throw new Error(`${n}: ${e}`)}else i=e;if(!i.windows)throw new Error(n);const r=await this.getClient();return await r.dispatch("apply-snapshot",{snapshot:i,options:t}),this}async fetchManifest(e){return(await this.getClient()).dispatch("platform-fetch-manifest",{manifestUrl:e})}async launchContentManifest(e){this.wire.sendAction("platform-launch-content-manifest",this.identity).catch((()=>{}));const t=await this.getClient(),n=await this.fetchManifest(e);return t.dispatch("launch-into-platform",{manifest:n,manifestUrl:e}),this}async setWindowContext(e={},t){if(this.wire.sendAction("platform-set-window-context",this.identity).catch((e=>{})),!e)throw new Error("Please provide a serializable object or string to set the context.");const n=await this.getClient(),{entityType:i}=t?await this.fin.System.getEntityInfo(t.uuid,t.name):this.fin.me;await n.dispatch("set-window-context",{context:e,entityType:i,target:t||{uuid:this.fin.me.uuid,name:this.fin.me.name}})}async getWindowContext(e){this.wire.sendAction("platform-get-window-context",this.identity).catch((e=>{}));const t=await this.getClient(),{entityType:n}=e?await this.fin.System.getEntityInfo(e.uuid,e.name):this.fin.me;return t.dispatch("get-window-context",{target:e||{uuid:this.fin.me.uuid,name:this.fin.me.name},entityType:n})}async closeWindow(e,t={skipBeforeUnload:!1}){this.wire.sendAction("platform-close-window",this.identity).catch((e=>{}));return(await this.getClient()).dispatch("close-window",{windowId:e,options:t})}}Mn.Platform=Fn,xn=new WeakMap;var jn={},kn={},Ln={},Tn={};function $n(e){switch(e){case"columns":case"grid":case"rows":case"tabs":return!0;default:return!1}}Object.defineProperty(Tn,"__esModule",{value:!0}),Tn.overrideFromComposables=Tn.isValidPresetType=void 0,Tn.isValidPresetType=$n,Tn.overrideFromComposables=function(...e){return t=>e.reduceRight(((e,t)=>n=>t(e(n))),(e=>e))(t)},Tn.default={isValidPresetType:$n};var Bn={},Gn={},Wn={};Object.defineProperty(Wn,"__esModule",{value:!0}),Wn.ApiConsumer=void 0;Wn.ApiConsumer=class{constructor(e){this.strategy=e,this.consume=async e=>(await this.strategy.getExposedFunctions(e)).reduce(((t,n)=>({...t,[n.key]:this.strategy.createFunction(n,e)})),{})}};var Hn={},Nn={};Object.defineProperty(Nn,"__esModule",{value:!0}),Nn.expose=Nn.getExposedProperties=void 0;const Dn=Symbol("exposedProperties");Nn.getExposedProperties=e=>e[Dn]||e.prototype[Dn]||[];Nn.expose=e=>(t,n,i)=>{t[Dn]=t[Dn]||[],t[Dn].push({key:n,descriptor:i,options:e})},Object.defineProperty(Hn,"__esModule",{value:!0}),Hn.ApiExposer=void 0;const Un=Nn;Hn.ApiExposer=class{constructor(e){this.strategy=e,this.exposeInstance=async(e,t)=>{const n=(0,Un.getExposedProperties)(e),i=await Promise.all(n.map((async({key:n,options:i})=>({key:n,options:await this.strategy.exposeFunction(e[n].bind(e),{key:n,options:i,meta:t})}))));await this.strategy.exposeMeta(t,i)}}};var Vn={},zn={},Kn={};Object.defineProperty(Kn,"__esModule",{value:!0}),Kn.ChannelsConsumer=void 0;Kn.ChannelsConsumer=class{constructor(e){this.channel=e,this.getExposedFunctions=async e=>{const{id:t}=e,{props:n}=await this.channel.dispatch(`api-meta:${t}`);return n},this.createFunction=e=>(...t)=>{const{action:n}=e.options;return this.channel.dispatch(n,{args:t})}}};var qn={};Object.defineProperty(qn,"__esModule",{value:!0}),qn.ChannelsExposer=void 0;qn.ChannelsExposer=class{constructor(e){this.channelProviderOrClient=e,this.exposeFunction=async(e,t)=>{const{key:n,options:i,meta:r}=t,{id:o}=r,s=`${o}.${i?.action||n}`;return await this.channelProviderOrClient.register(s,(async({args:t})=>e(...t))),{action:s}},this.exposeMeta=async({id:e},t)=>{const n=`api-meta:${e}`;await this.channelProviderOrClient.register(n,(()=>({props:t})))}}},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Kn,e),n(qn,e)}(zn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(zn,e)}(Vn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Wn,e),n(Hn,e),n(Vn,e),n(Nn,e)}(Gn);var Jn={};Object.defineProperty(Jn,"__esModule",{value:!0}),Jn.createRelayedDispatch=exports.relayChannelClientApi_1=Jn.relayChannelClientApi=void 0;const Yn=["no longer connected","RTCDataChannel closed unexpectedly","The client you are trying to dispatch from is disconnected from the target provider"];exports.relayChannelClientApi_1=Jn.relayChannelClientApi=async(e,t)=>{e.register(`relay:${t}`,(({action:t,target:n,payload:i})=>e.dispatch(n,t,i))),await Promise.resolve()};Jn.createRelayedDispatch=(e,t,n,i)=>async(r,o)=>{try{return await e.dispatch(`relay:${n}`,{action:r,payload:o,target:t})}catch(e){if(s=e.message,Yn.some((e=>s.includes(e)))&&i)throw new Error(i);throw e}var s};var Zn,Qn,Xn,ei=s&&s.__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},ti=s&&s.__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)};Object.defineProperty(Bn,"__esModule",{value:!0}),Bn.ColumnOrRow=Bn.TabStack=Bn.LayoutNode=void 0;const ni=Gn,ii=Jn;class ri{constructor(e,t){Zn.set(this,void 0),this.isRoot=()=>ti(this,Zn,"f").isRoot(this.entityId),this.exists=()=>ti(this,Zn,"f").exists(this.entityId),this.getParent=async()=>{const e=await ti(this,Zn,"f").getParent(this.entityId);if(e)return ri.getEntity(e,ti(this,Zn,"f"))},this.createAdjacentStack=async(e,t)=>{const n=await ti(this,Zn,"f").createAdjacentStack(this.entityId,e,t);return ri.getEntity({entityId:n,type:"stack"},ti(this,Zn,"f"))},this.getAdjacentStacks=async e=>(await ti(this,Zn,"f").getAdjacentStacks({targetId:this.entityId,edge:e})).map((e=>ri.getEntity({type:"stack",entityId:e.entityId},ti(this,Zn,"f")))),ei(this,Zn,e,"f"),this.entityId=t}}Bn.LayoutNode=ri,Zn=new WeakMap,ri.newLayoutEntitiesClient=async(e,t,n)=>{const i=(0,ii.createRelayedDispatch)(e,n,"layout-relay","You are trying to interact with a layout component on a window that does not exist or has been destroyed.");return new ni.ApiConsumer(new ni.ChannelsConsumer({dispatch:i})).consume({id:t})},ri.getEntity=(e,t)=>{const{entityId:n,type:i}=e;switch(i){case"column":case"row":return new si(t,n,i);case"stack":return new oi(t,n);default:throw new Error(`Unrecognised Layout Entity encountered ('${JSON.stringify(e)})`)}};class oi extends ri{constructor(e,t){super(e,t),Qn.set(this,void 0),this.type="stack",this.getViews=()=>ti(this,Qn,"f").getStackViews(this.entityId),this.addView=async(e,t={index:0})=>ti(this,Qn,"f").addViewToStack(this.entityId,e,t),this.removeView=async e=>{await ti(this,Qn,"f").removeViewFromStack(this.entityId,e)},this.setActiveView=async e=>{await ti(this,Qn,"f").setStackActiveView(this.entityId,e)},ei(this,Qn,e,"f")}}Bn.TabStack=oi,Qn=new WeakMap;class si extends ri{constructor(e,t,n){super(e,t),Xn.set(this,void 0),this.getContent=async()=>(await ti(this,Xn,"f").getContent(this.entityId)).map((e=>ri.getEntity(e,ti(this,Xn,"f")))),ei(this,Xn,e,"f"),this.type=n}}Bn.ColumnOrRow=si,Xn=new WeakMap;var ai={};Object.defineProperty(ai,"__esModule",{value:!0}),ai.DEFAULT_LAYOUT_KEY=ai.LAYOUT_CONTROLLER_ID=void 0,ai.LAYOUT_CONTROLLER_ID="layout-entities",ai.DEFAULT_LAYOUT_KEY="__default__";var ci,di,hi,li=s&&s.__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)};Object.defineProperty(Ln,"__esModule",{value:!0}),Ln.Layout=void 0;const ui=G,pi=O,wi=d,yi=Tn,fi=Bn,gi=ai;class mi extends wi.Base{static getClient(e){return li(e,di,"f").getValue()}constructor(e,t){super(t),ci.add(this),di.set(this,new ui.Lazy((async()=>fi.LayoutNode.newLayoutEntitiesClient(await this.platform.getClient(),gi.LAYOUT_CONTROLLER_ID,this.identity)))),this.replace=async e=>{this.wire.sendAction("layout-replace").catch((e=>{}));const t=await this.platform.getClient();await t.dispatch("replace-layout",{target:this.identity,opts:{layout:e}})},this.replaceView=async(e,t)=>{this.wire.sendAction("layout-replace-view").catch((e=>{}));const n=await this.platform.getClient();await n.dispatch("replace-view",{target:this.identity,opts:{viewToReplace:e,newView:t}})},this.applyPreset=async e=>{this.wire.sendAction("layout-apply-preset").catch((e=>{}));const t=await this.platform.getClient(),{presetType:n}=e;if(!n||!(0,yi.isValidPresetType)(n))throw new Error("Cannot apply preset layout, please include an applicable presetType property in the PresetLayoutOptions.");await t.dispatch("apply-preset-layout",{target:this.identity,opts:{presetType:n}})};const n=(0,pi.validateIdentity)(e);if(n)throw new Error(n);this.identity=e,this.platform=this.fin.Platform.wrapSync({uuid:e.uuid}),e.uuid===this.fin.me.uuid&&e.name===this.fin.me.name&&(this.init=this.fin.Platform.Layout.init)}async getConfig(){this.wire.sendAction("layout-get-config").catch((e=>{}));return(await this.platform.getClient()).dispatch("get-frame-snapshot",{target:this.identity})}async getCurrentViews(){this.wire.sendAction("layout-get-views").catch((e=>{}));const e=await this.platform.getClient();return(await e.dispatch("get-layout-views",{target:this.identity})).map((e=>this.fin.View.wrapSync(e)))}async getRootItem(){this.wire.sendAction("layout-get-root-item").catch((()=>{}));const e=await li(this,di,"f").getValue(),t=await e.getRoot("layoutName"in this.identity?this.identity:void 0);return fi.LayoutNode.getEntity(t,e)}async getStackByViewIdentity(e){this.wire.sendAction("layout-get-stack-by-view").catch((()=>{}));const t=await li(this,di,"f").getValue(),n=await t.getStackByView(e);if(!n)throw new Error(`No stack found for view: ${e.uuid}/${e.name}`);return fi.LayoutNode.getEntity(n,t)}async addView(e,{location:t,targetView:n}={}){this.wire.sendAction("layout-add-view").catch((e=>{}));const{identity:i}=await li(this,ci,"m",hi).call(this,"layout-add-view",{viewOptions:e,location:t,targetView:n});return{identity:i}}async closeView(e){this.wire.sendAction("layout-close-view").catch((e=>{})),await li(this,ci,"m",hi).call(this,"layout-close-view",{viewIdentity:e})}}Ln.Layout=mi,di=new WeakMap,ci=new WeakSet,hi=async function(e,t){return(await this.platform.getClient()).dispatch(e,{target:this.identity,opts:t})};var vi,Ci,bi,Ii,Ei,xi=s&&s.__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)},Ai=s&&s.__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};Object.defineProperty(kn,"__esModule",{value:!0}),kn.LayoutModule=void 0;const Pi=d,Mi=Ln,_i=ai;class Oi extends Pi.Base{constructor(){super(...arguments),vi.add(this),Ci.set(this,!1),bi.set(this,null),this.init=async(e={})=>{if(this.wire.sendAction("layout-init").catch((e=>{})),!this.wire.environment.layoutAllowedInContext(this.fin))throw new Error("Layout.init can only be called from a Window context.");if(xi(this,Ci,"f"))throw new Error("Layout.init was already called, please use Layout.create to add additional layouts.");"openfin"===this.wire.environment.type&&await this.fin.Platform.getCurrentSync().getClient(),Ai(this,Ci,!0,"f"),Ai(this,bi,await this.wire.environment.initLayoutManager(this.fin,this.wire,e),"f"),await this.wire.environment.applyLayoutSnapshot(this.fin,xi(this,bi,"f"),e);const t={name:this.fin.me.name,uuid:this.fin.me.uuid};if(!e.layoutManagerOverride){const e={layoutName:_i.DEFAULT_LAYOUT_KEY,...t};return xi(this,Ii,"f").call(this,e)}return this.wrapSync(t)},Ii.set(this,(e=>{const t="[Layout] You are using a deprecated property `layoutManager` - it will throw if you access it starting in v37.",n=new Proxy({},{get(e,n){throw console.warn(`[Layout-mgr-proxy] accessing ${n.toString()}`),new Error(t)}}),i=Object.assign(this.wrapSync(e),{layoutManager:n});return new Proxy(i,{get(e,n){if("layoutManager"===n)throw console.warn(`[Layout-proxy] accessing ${n.toString()}`),new Error(t);return e[n]}})})),this.getCurrentLayoutManagerSync=()=>xi(this,vi,"m",Ei).call(this,"fin.Platform.Layout.getCurrentLayoutManagerSync()"),this.create=async e=>this.wire.environment.createLayout(xi(this,vi,"m",Ei).call(this,"fin.Platform.Layout.create()"),e),this.destroy=async e=>this.wire.environment.destroyLayout(xi(this,vi,"m",Ei).call(this,"fin.Platform.Layout.destroy()"),e)}async wrap(e){return this.wire.sendAction("layout-wrap").catch((e=>{})),new Mi.Layout(e,this.wire)}wrapSync(e){return this.wire.sendAction("layout-wrap-sync").catch((e=>{})),new Mi.Layout(e,this.wire)}async getCurrent(){if(this.wire.sendAction("layout-get-current").catch((e=>{})),"openfin"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error("You are not in a Window context. Only Windows can have a Layout.");const{uuid:e,name:t}=this.fin.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction("layout-get-current-sync").catch((e=>{})),"openfin"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error("You are not in a Window context. Only Windows can have a Layout.");const{uuid:e,name:t}=this.fin.me;return this.wrapSync({uuid:e,name:t})}async getLayoutByViewIdentity(e){this.wire.sendAction("layout-get-by-view-identity").catch((()=>{}));let t=await this.wire.environment.getViewWindowIdentity(this.fin,e);t.identity&&(t=t.identity);try{const n=this.wrapSync(t),i=await Mi.Layout.getClient(n),r=await i.getLayoutIdentityForViewOrThrow(e);return this.wrapSync(r)}catch(n){if(!["No action registered at target for","getLayoutIdentityForViewOrThrow is not a function"].some((e=>n.message.includes(e))))throw n;if(t.uuid===t.name)throw new Error(`View identity ${JSON.stringify(e)} is not attached to any layout in provider window ${JSON.stringify(t)}.`);return this.wrapSync(t)}}}kn.LayoutModule=Oi,Ci=new WeakMap,bi=new WeakMap,Ii=new WeakMap,vi=new WeakSet,Ei=function(e){if(!xi(this,bi,"f"))throw new Error(`You must call init before using the API ${e}`);return xi(this,bi,"f")},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(kn,e),n(Ln,e)}(jn),Object.defineProperty(Pn,"__esModule",{value:!0}),Pn.PlatformModule=void 0;const Si=d,Ri=Mn,Fi=jn;class ji extends Si.Base{constructor(e,t){super(e),this._channel=t,this.Layout=new Fi.LayoutModule(this.wire)}async init(e){if(!fin.__internal_.isPlatform||fin.me.name!==fin.me.uuid)throw new Error("fin.Platform.init should only be called from a custom platform provider running in the main window of the application.");return this.wire.environment.initPlatform(this.fin,e)}async wrap(e){return this.wire.sendAction("platform-wrap").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}wrapSync(e){return this.wire.sendAction("platform-wrap-sync").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}async getCurrent(){return this.wire.sendAction("platform-get-current").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction("platform-get-current-sync").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}start(e){return this.wire.sendAction("platform-start").catch((e=>{})),new Promise((async(t,n)=>{try{const{uuid:n}=e,i=await this.fin.Application._create({...e,isPlatformController:!0});i.once("platform-api-ready",(()=>t(this.wrapSync({uuid:n})))),i._run({uuid:n})}catch(e){n(e)}}))}startFromManifest(e,t){return this.wire.sendAction("platform-start-from-manifest").catch((e=>{})),new Promise((async(n,i)=>{try{const i=await this.fin.Application._createFromManifest(e);i.once("platform-api-ready",(()=>n(this.wrapSync({uuid:i.identity.uuid})))),i._run(t)}catch(e){i(e)}}))}}Pn.PlatformModule=ji,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Pn,e),n(Mn,e)}(An);var ki={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getMe=e.getBaseMe=e.environmentUnsupportedMessage=void 0;const t=J(),n=un,i=ie(),r=rn;function o(e,t,n){return{...{isView:"view"===e,isWindow:"window"===e,isFrame:"iframe"===e,isExternal:"external connection"===e},uuid:t,name:n,entityType:e}}e.environmentUnsupportedMessage="You are not running in OpenFin.",e.getBaseMe=o,e.getMe=function(s){const{uuid:a,name:c,entityType:d}=s.me,h={setContext(){throw new Error(e.environmentUnsupportedMessage)},addContextHandler(){throw new Error(e.environmentUnsupportedMessage)},getContextGroups(){throw new Error(e.environmentUnsupportedMessage)},joinContextGroup(){throw new Error(e.environmentUnsupportedMessage)},removeFromContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getAllClientsInContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getInfoForContextGroup(){throw new Error(e.environmentUnsupportedMessage)}},l="Interop API has not been instantiated. Either connection has failed or you have not declared interop in your config.",u={setContext(){throw new Error(l)},addContextHandler(){throw new Error(l)},getContextGroups(){throw new Error(l)},joinContextGroup(){throw new Error(l)},removeFromContextGroup(){throw new Error(l)},getAllClientsInContextGroup(){throw new Error(l)},getInfoForContextGroup(){throw new Error(l)}},p={eventNames:()=>{throw new Error(e.environmentUnsupportedMessage)},emit:()=>{throw new Error(e.environmentUnsupportedMessage)},listeners:()=>{throw new Error(e.environmentUnsupportedMessage)},listenerCount:()=>{throw new Error(e.environmentUnsupportedMessage)},on:()=>{throw new Error(e.environmentUnsupportedMessage)},addListener:()=>{throw new Error(e.environmentUnsupportedMessage)},once:()=>{throw new Error(e.environmentUnsupportedMessage)},prependListener:()=>{throw new Error(e.environmentUnsupportedMessage)},prependOnceListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeAllListeners:()=>{throw new Error(e.environmentUnsupportedMessage)}};switch(d){case"view":return Object.assign(new t.View(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case"window":return Object.assign(new i._Window(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case"iframe":return Object.assign(new n._Frame(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case"external connection":return Object.assign(new r.ExternalApplication(s,{uuid:a}),o(d,a,c),{interop:u,isOpenFin:!1});default:return{...o(d,a,c),...p,interop:h,isOpenFin:!1}}}}(ki);var Li={},Ti={},$i={};Object.defineProperty($i,"__esModule",{value:!0}),$i.createWarningObject=$i.createUnusableObject=void 0,$i.createUnusableObject=function(e){const t=()=>{throw new Error(e)};return new Proxy({},{apply:t,construct:t,defineProperty:t,deleteProperty:t,get:t,getOwnPropertyDescriptor:t,getPrototypeOf:t,has:t,isExtensible:t,ownKeys:t,preventExtensions:t,set:t,setPrototypeOf:t})},$i.createWarningObject=function(e,t){return new Proxy(t,{get:(...t)=>(console.warn(e),Reflect.get(...t)),set:(...t)=>(console.warn(e),Reflect.set(...t)),getOwnPropertyDescriptor:(...t)=>(console.warn(e),Reflect.getOwnPropertyDescriptor(...t)),ownKeys:(...t)=>(console.warn(e),Reflect.ownKeys(...t))})};var Bi,Gi={},Wi={};var Hi={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.wrapIntentHandler=e.BROKER_ERRORS=e.generateOverrideWarning=e.generateOverrideError=e.wrapContextHandler=e.wrapInTryCatch=e.generateId=void 0;e.generateId=()=>`${Math.random()}${Date.now()}`;e.wrapInTryCatch=(e,t)=>(...n)=>{try{return e(...n)}catch(e){throw new Error((t||"")+e)}};e.wrapContextHandler=(e,t)=>async n=>{try{await e(n)}catch(e){throw console.error(`Error thrown by handler ${t} for context type ${n.type}: ${e}`),e}};e.generateOverrideError=(e,t)=>`You have tried to to use ${e} but ${t} has not been overridden in the Interop Broker. Please override this function. Refer to our documentation for more info.`;e.generateOverrideWarning=(e,t,n,i)=>{const{uuid:r,name:o}=n;return i?`Entity with identity: ${r}/${o} has called ${i} or ${e} but ${t} has not been overridden.`:`Entity with identity: ${r}/${o} has called ${e} but ${t} has not been overridden.`},e.BROKER_ERRORS={fireIntent:(0,e.generateOverrideError)("fireIntent","handleFiredIntent"),fireIntentForContext:(0,e.generateOverrideError)("fireIntentForContext","handleFiredIntentForContext"),getInfoForIntent:(0,e.generateOverrideError)("getInfoForIntent","handleInfoForIntent"),getInfoForIntentsByContext:(0,e.generateOverrideError)("getInfoForIntentsByContext","handleInfoForIntentsByContext"),joinSessionContextGroupWithJoinContextGroup:"The Context Group you have tried to join is a Session Context Group. Custom Context Groups can only be defined by the Interop Broker through code or manifest configuration. Please use joinSessionContextGroup.",fdc3Open:(0,e.generateOverrideError)("fdc3.open","fdc3HandleOpen"),fdc3FindInstances:(0,e.generateOverrideError)("fdc3.findInstances","fdc3HandleFindInstances"),fdc3GetAppMetadata:(0,e.generateOverrideError)("fdc3.getAppMetadata","fdc3HandleGetAppMetadata"),fdc3GetInfo:(0,e.generateOverrideError)("fdc3.getInfo","fdc3HandleGetInfo")};e.wrapIntentHandler=(e,t)=>async n=>{try{return e(n)}catch(e){throw console.error(`Error thrown by handler ${t}: ${e}`),e}}}(Hi);var Ni,Di,Ui={};function Vi(){if(Di)return Gi;Di=1;var e,t,n,r=s&&s.__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},o=s&&s.__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)},a=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Gi,"__esModule",{value:!0}),Gi.InteropBroker=void 0;const c=d,h=a(function(){if(Bi)return Wi;Bi=1,Object.defineProperty(Wi,"__esModule",{value:!0});const e=Cr();return Wi.default=class{constructor(e,t){this.provider=e,this.id=t,this.lastContext=void 0,this.contextGroupMap=new Map,this.clients=new Map,this.registerListeners()}registerListeners(){this.provider.register(`sessionContextGroup:getContext-${this.id}`,this.getCurrentContext.bind(this)),this.provider.register(`sessionContextGroup:setContext-${this.id}`,this.setContext.bind(this)),this.provider.register(`sessionContextGroup:handlerAdded-${this.id}`,this.handlerAdded.bind(this)),this.provider.register(`sessionContextGroup:handlerRemoved-${this.id}`,this.handlerRemoved.bind(this))}getCurrentContext(e){return e.type?this.contextGroupMap.get(e.type):this.lastContext}setContext(t,n){const{context:i}=t,r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name} not in Session Client State Map`);this.contextGroupMap.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{e.contextHandlers.get(i.type)?.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getClientState(e){return this.clients.get(e.endpointId)}async handlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(i){const e=r.contextHandlers.get(i)||[];r.contextHandlers.set(i,[...e,n]);const o=this.contextGroupMap.get(i);o&&await this.provider.dispatch(t,n,o)}else{r.globalHandler=n;const e=[...this.contextGroupMap.keys()].map((async e=>{const i=this.contextGroupMap.get(e);i&&await this.provider.dispatch(t,n,i)}));await Promise.all(e)}}handlerRemoved(e,t){const{handlerId:n}=e,i=this.clients.get(t.endpointId);i?(Array.from(i.contextHandlers).forEach((([,e])=>{const t=e.indexOf(n);t>-1&&e.splice(t,1)})),i.globalHandler===n&&(i.globalHandler=void 0)):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={contextHandlers:new Map,clientIdentity:e,globalHandler:void 0};this.clients.set(e.endpointId,t)}}onDisconnection(e){this.clients.delete(e.endpointId)}},Wi}()),l=Hi,u=a(i),p=function(){if(Ni)return Ui;Ni=1,Object.defineProperty(Ui,"__esModule",{value:!0}),Ui.PrivateChannelProvider=void 0;const e=Vi();return Ui.PrivateChannelProvider=class t{constructor(e,t){this.provider=e,this.id=t,this.clients=new Map,this.registerListeners(),this.contextByContextType=new Map,this.lastContext=void 0,this.provider.onConnection((e=>this.registerNewClient(e))),this.provider.onDisconnection((async e=>{const{endpointId:t}=e;this.clients.has(t)&&await this.handleClientDisconnecting(e),0===(await this.provider.getAllClientInfo()).length&&this.provider.destroy()}))}getClientState(e){return this.clients.get(e.endpointId)}registerListeners(){this.provider.register("broadcast",this.broadcast.bind(this)),this.provider.register("getCurrentContext",this.getCurrentContext.bind(this)),this.provider.register("contextHandlerAdded",this.contextHandlerAdded.bind(this)),this.provider.register("contextHandlerRemoved",this.contextHandlerRemoved.bind(this)),this.provider.register("nonStandardHandlerRemoved",this.nonStandardHandlerRemoved.bind(this)),this.provider.register("onAddContextHandlerAdded",this.onAddContextHandlerAdded.bind(this)),this.provider.register("onDisconnectHandlerAdded",this.onDisconnectHandlerAdded.bind(this)),this.provider.register("onUnsubscribeHandlerAdded",this.onUnsubscribeHandlerAdded.bind(this)),this.provider.register("clientDisconnecting",((e,t)=>{this.handleClientDisconnecting(t)}))}broadcast(t,n){const{context:i}=t;if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name}, tried to call broadcast, is not connected to this Private Channel`);const r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to broadcast - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);this.contextByContextType.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{const t=e.handlerIdsByContextTypes.get(i.type);t&&t.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getCurrentContext(e,t){const{contextType:n}=e;if(!this.getClientState(t))throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call getCurrentContext, is not connected to this Private Channel`);if(void 0!==n){return this.contextByContextType.get(n)||null}return this.lastContext?this.lastContext:null}contextHandlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call addContextListener, is not connected to this Private Channel`);if(i){const e=r.handlerIdsByContextTypes.get(i)||[];r.handlerIdsByContextTypes.set(i,[...e,n])}else r.globalHandler=n;Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&e.onAddContextListenerHandlerId&&this.provider.dispatch(e.clientIdentity,e.onAddContextListenerHandlerId,i)}))}async contextHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);if(i){let e;if(i.globalHandler===n)i.globalHandler=void 0;else for(const[t,r]of i.handlerIdsByContextTypes){const i=r.indexOf(n);i>-1&&(r.splice(i,1),e=t)}const r=(await this.getConnectedClients()).map((async n=>{const{clientIdentity:i,clientIdentity:{endpointId:r},onUnsubscribeHandlerId:o}=n;r!==t.endpointId&&o&&await this.provider.dispatch(i,o,e)}));try{await Promise.all(r)}catch(e){throw console.error(`Problem when attempting to dispatch to onUnsubscribeHandlers. Error: ${e} Removing Client: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}`),new Error(e)}}else console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}.`)}nonStandardHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);i?i.onDisconnectHandlerId===n?i.onDisconnectHandlerId=void 0:i.onAddContextListenerHandlerId===n?i.onAddContextListenerHandlerId=void 0:i.onUnsubscribeHandlerId===n&&(i.onUnsubscribeHandlerId=void 0):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}onAddContextHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onAddContextListener, is not connected to this Private Channel`);n.onAddContextListenerHandlerId=i,Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&Array.from(e.handlerIdsByContextTypes.keys()).forEach((e=>{this.provider.dispatch(t,i,e)}))}))}onDisconnectHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onDisconnect, is not connected to this Private Channel`);n.onDisconnectHandlerId=i}onUnsubscribeHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onUnsubscribe, is not connected to this Private Channel`);n.onUnsubscribeHandlerId=i}removeClient(e){const t=this.getClientState(e);if(!t)throw new Error(`Client with Identity: ${e.uuid} ${e.name}, tried to call disconnect, is not connected to this Private Channel`);t.handlerIdsByContextTypes.clear(),this.clients.delete(e.endpointId)}async fireOnDisconnectForOtherClients(e){const{endpointId:t}=e,n=(await this.getConnectedClients()).map((async e=>{const{clientIdentity:{endpointId:n},onDisconnectHandlerId:i}=e;n!==t&&i&&await this.provider.dispatch(e.clientIdentity,i)}));try{await Promise.all(n)}catch(t){throw console.error(`Problem when attempting to dispatch to onDisconnectHandlers. Error: ${t} Disconnecting Client: uuid: ${e.uuid}. name: ${e.name}. endpointId: ${e.endpointId}`),new Error(t)}}async unsubscribeAll(e){const{endpointId:t}=e,n=this.clients.get(t);if(n){const t=Array.from(n.handlerIdsByContextTypes.values()).flat(),i=n.globalHandler;if(t.length>0){const n=t.map((async t=>this.contextHandlerRemoved({handlerId:t},e)));try{await Promise.all(n)}catch(e){console.error(e.message)}}if(i)try{await this.contextHandlerRemoved({handlerId:i},e)}catch(e){console.error(e.message)}}}async handleClientDisconnecting(e){await this.unsubscribeAll(e),this.removeClient(e),await this.fireOnDisconnectForOtherClients(e)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={clientIdentity:e,handlerIdsByContextTypes:new Map,globalHandler:void 0,onAddContextListenerHandlerId:void 0,onUnsubscribeHandlerId:void 0,onDisconnectHandlerId:void 0};this.clients.set(e.endpointId,t)}}async getConnectedClients(){const e=await this.provider.getAllClientInfo();return Array.from(this.clients.values()).filter((t=>{const{uuid:n,name:i}=t.clientIdentity;return e.some((e=>i===e.name&&n===e.uuid))}))}static init(e,n){return new t(e,n)}},Ui}(),w=G,y=[{id:"green",displayMetadata:{color:"#00CC88",name:"green"}},{id:"purple",displayMetadata:{color:"#8C61FF",name:"purple"}},{id:"orange",displayMetadata:{color:"#FF8C4C",name:"orange"}},{id:"red",displayMetadata:{color:"#FF5E60",name:"red"}},{id:"pink",displayMetadata:{color:"#FF8FB8",name:"pink"}},{id:"yellow",displayMetadata:{color:"#E9FF8F",name:"yellow"}}];let f=class i extends c.Base{constructor(i,s,a){super(i),e.set(this,void 0),t.set(this,void 0),n.set(this,void 0),this.getProvider=()=>o(this,n,"f").getValue(),this.interopClients=new Map,this.contextGroupsById=new Map,r(this,t,a.contextGroups??[...y],"f"),r(this,e,a.fdc3Info,"f"),a?.logging&&(this.logging=a.logging),this.intentClientMap=new Map,this.lastContextMap=new Map,this.sessionContextGroupMap=new Map,r(this,n,new w.Lazy(s),"f"),this.setContextGroupMap(),this.setupChannelProvider()}static createClosedConstructor(...e){return class extends i{constructor(...t){if(t.length){const[n,i,r]=t;if(r&&"object"==typeof r&&!(0,u.default)(r,e[2]))return console.warn("You have modified the parameters of the InteropOverride constructor. This behavior is deprecated and will be removed in a future version. You can modify these options in your manifest. Please consult our Interop docs for guidance on migrating to the new override scheme."),void super(e[0],e[1],r);console.warn("You are attempting to pass arguments to the InteropOverride constructor. This is not necessary, and these passed arguments will be ignored. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.")}super(...e)}}}setContext({context:e},t){this.wire.sendAction("interop-broker-set-context").catch((e=>{}));const n=this.getClientState(t);if(!n||!n.contextGroupId)throw n?new Error("You must join a context group before you can set context."):new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);{const{contextGroupId:t}=n;this.setContextForGroup({context:e},t)}}setContextForGroup({context:e},t){this.wire.sendAction("interop-broker-set-context-for-group").catch((e=>{}));const n=this.contextGroupsById.get(t);if(!n)throw new Error(`Unable to set context for context group that isn't in the context group mapping: ${t}.`);const r=i.checkContextIntegrity(e);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(e)}`);const o=e.type;n.set(o,e),this.lastContextMap.set(t,o);Array.from(this.interopClients.values()).filter((e=>e.contextGroupId===t)).forEach((t=>{for(const[,n]of t.contextHandlers)i.isContextTypeCompatible(o,n.contextType)&&this.invokeContextHandler(t.clientIdentity,n.handlerId,e)}))}getCurrentContext(e,t){this.wire.sendAction("interop-broker-get-current-context").catch((e=>{}));const n=this.getClientState(t);if(!n?.contextGroupId)throw new Error("You must be a member of a context group to call getCurrentContext");const{contextGroupId:i}=n,r=this.contextGroupsById.get(i),o=this.lastContextMap.get(i),s=e?.contextType??o;return r&&s?r.get(s):void 0}async joinContextGroup({contextGroupId:e,target:t},n){if(this.wire.sendAction("interop-broker-join-context-group").catch((e=>{})),this.sessionContextGroupMap.has(e))throw new Error(l.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup);if(t){i.hasEndpointId(t)&&await this.addClientToContextGroup({contextGroupId:e},t);try{const n=this.channel.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name));if(!n.length)throw new Error(`Given Identity ${t.uuid} ${t.name} is not connected to the Interop Broker.`);n.length>1&&console.warn(`More than one connection found for identity ${t.uuid} ${t.name}`);const i=[];for(const t of n)i.push(this.addClientToContextGroup({contextGroupId:e},t));await Promise.all(i)}catch(e){throw new Error(e)}}else await this.addClientToContextGroup({contextGroupId:e},n)}async addClientToContextGroup({contextGroupId:e},t){this.wire.sendAction("interop-broker-add-client-to-context-group").catch((e=>{}));const n=this.getClientState(t);if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(!this.getContextGroups().find((t=>t.id===e)))throw new Error(`Attempting to join a context group that does not exist: ${e}. You may only join existing context groups.`);if(n.contextGroupId!==e){n.contextGroupId=e,await this.setCurrentContextGroupInClientOptions(t,e);const i=this.contextGroupsById.get(e);for(const[,e]of n.contextHandlers){const{contextType:n,handlerId:r}=e;if(void 0===n)i.forEach(((e,n)=>{this.invokeContextHandler(t,r,e)}));else if(i.has(n)){const e=i.get(n);e&&this.invokeContextHandler(t,r,e)}}}}async removeFromContextGroup({target:e},t){if(this.wire.sendAction("interop-broker-remove-from-context-group").catch((e=>{})),e){i.hasEndpointId(e)&&await this.removeClientFromContextGroup(e);try{const t=this.channel.connections.filter((t=>t.uuid===e.uuid&&t.name===e.name));if(!t.length)throw new Error(`No connection found for given Identity ${e.uuid} ${e.name}`);t.length>1&&console.warn(`More than one connection found for identity ${e.uuid} ${e.name}`);const n=[];for(const e of t)n.push(this.removeClientFromContextGroup(e));await Promise.all(n)}catch(e){throw new Error(e)}}else await this.removeClientFromContextGroup(t)}async removeClientFromContextGroup(e){this.wire.sendAction("interop-broker-remove-client-from-context-group").catch((e=>{}));const t=this.getClientState(e);t&&(t.contextGroupId=void 0),await this.setCurrentContextGroupInClientOptions(e,null)}getContextGroups(){return this.wire.sendAction("interop-broker-get-context-groups").catch((e=>{})),o(this,t,"f").map((e=>({...e})))}getInfoForContextGroup({contextGroupId:e}){return this.wire.sendAction("interop-broker-get-info-for-context-group").catch((e=>{})),this.getContextGroups().find((t=>t.id===e))}getAllClientsInContextGroup({contextGroupId:e}){this.wire.sendAction("interop-broker-get-all-clients-in-context-group").catch((e=>{}));return Array.from(this.interopClients.values()).filter((t=>t.contextGroupId===e)).map((e=>e.clientIdentity))}async handleFiredIntent(e,t){const n=(0,l.generateOverrideWarning)("fdc3.raiseIntent","InteropBroker.handleFiredIntent",t,"interopClient.fireIntent");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntent)}async setIntentTarget(e,t){this.wire.sendAction("interop-broker-set-intent-target").catch((e=>{}));const n=this.intentClientMap.get(t.name),i=`intent-handler-${e.name}`;if(n){const t=n.get(i);if(t){if(t.pendingIntents.push(e),t.clientIdentity&&t.isReady){const{clientIdentity:e,pendingIntents:n}=t;try{const r=n[n.length-1];await this.invokeIntentHandler(e,i,r),t.pendingIntents=[]}catch(n){console.error(`Error invoking intent handler for client ${e.uuid}/${e.name}/${e.endpointId}`),t.isReady=!1}}}else n.set(i,{isReady:!1,pendingIntents:[e]})}else{this.intentClientMap.set(t.name,new Map);const n=this.intentClientMap.get(t.name);n&&n.set(i,{isReady:!1,pendingIntents:[e]})}}async handleInfoForIntent(e,t){const n=(0,l.generateOverrideWarning)("fdc3.findIntent","InteropBroker.handleInfoForIntent",t,"interopClient.getInfoForIntent");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntent)}async handleInfoForIntentsByContext(e,t){const n=(0,l.generateOverrideWarning)("fdc3.findIntentsByContext","InteropBroker.handleInfoForIntentsByContext",t,"interopClient.getInfoForIntentsByContext");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntentsByContext)}async handleFiredIntentForContext(e,t){const n=(0,l.generateOverrideWarning)("fdc3.raiseIntentForContext","InteropBroker.handleFiredIntentForContext",t,"interopClient.fireIntentForContext");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntentForContext)}async clientDisconnected(e){}async fdc3HandleOpen({app:e,context:t},n){const i=(0,l.generateOverrideWarning)("fdc3.open","InteropBroker.fdc3HandleOpen",n);throw console.warn(i),new Error(l.BROKER_ERRORS.fdc3Open)}async fdc3HandleFindInstances(e,t){const n=(0,l.generateOverrideWarning)("fdc3.open","InteropBroker.fdc3HandleFindInstances",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3FindInstances)}async fdc3HandleGetAppMetadata(e,t){const n=(0,l.generateOverrideWarning)("fdc3.getAppMetadata","InteropBroker.fdc3HandleGetAppMetadata",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3GetAppMetadata)}async invokeContextHandler(e,t,n){const i=await this.getProvider();try{await i.dispatch(e,t,n)}catch(i){console.error(`Error invoking context handler ${t} for context type ${n.type} in client ${e.uuid}/${e.name}/${e.endpointId}`,i)}}async invokeIntentHandler(e,t,n){const i=await this.getProvider();await i.dispatch(e,t,n)}async fdc3HandleGetInfo(t,n){const{fdc3Version:i}=t;return{fdc3Version:i,...o(this,e,"f"),optionalFeatures:{OriginatingAppMetadata:!1,UserChannelMembershipAPIs:!0},appMetadata:{appId:"",instanceId:""}}}async getAllClientInfo(){return(await this.getProvider()).getAllClientInfo()}decorateSnapshot(e){return{...e,interopSnapshotDetails:{contextGroupStates:this.getContextGroupStates()}}}applySnapshot(e,t){const n=e?.interopSnapshotDetails?.contextGroupStates;n&&(t?.closeExistingWindows||this.updateExistingClients(n),this.rehydrateContextGroupStates(n))}updateExistingClients(e){this.interopClients.forEach((t=>{const{clientIdentity:n,contextGroupId:r,contextHandlers:o}=t;if(r){const t=e[r];for(const[,e]of Object.entries(t))o.forEach((t=>{const{handlerId:r,contextType:o}=t;i.isContextTypeCompatible(e.type,o)&&this.invokeContextHandler(n,r,e)}))}}))}getContextGroupStates(){return i.toObject(this.contextGroupsById)}rehydrateContextGroupStates(e){const t=Object.entries(e);for(const[e,n]of t){const t=Object.entries(n);for(const[n,i]of t)if(this.contextGroupsById.has(e)){this.contextGroupsById.get(e).set(n,i)}else console.warn(`Attempting to set a context group that isn't in the context group mapping. Skipping context group rehydration for: ${e}`)}}contextHandlerRegistered({contextType:e,handlerId:t},n){const i={contextType:e,handlerId:t},r=this.getClientState(n);if(r?.contextHandlers.set(t,i),r&&r.contextGroupId){const{contextGroupId:i}=r,o=this.contextGroupsById.get(i);if(void 0===e)o.forEach(((e,i)=>{this.invokeContextHandler(n,t,e)}));else if(o.has(e)){const i=o.get(e);i&&this.invokeContextHandler(n,t,i)}}}async intentHandlerRegistered(e,t){const{handlerId:n}=e,i=this.intentClientMap.get(t.name),r=i?.get(n);if(i)if(r){const{pendingIntents:e}=r;r.clientIdentity=t,r.isReady=!0;try{if(e.length>0){const i=e[e.length-1];await this.invokeIntentHandler(t,n,i),r.pendingIntents=[]}}catch(e){console.error(`Error invoking intent handler: ${n} for client ${t.uuid}/${t.name}/${t.endpointId}`)}}else i.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t});else{this.intentClientMap.set(t.name,new Map);const e=this.intentClientMap.get(t.name);e&&e.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t})}}removeContextHandler({handlerId:e},t){const n=this.getClientState(t);n&&n.contextHandlers.delete(e)}handleJoinSessionContextGroup({sessionContextGroupId:e},t){try{if(!e)throw new Error("Failed to join session context group: must specify group id.");const n=this.sessionContextGroupMap.get(e);if(n)n.registerNewClient(t);else{const n=new h.default(this.channel,e);n.registerNewClient(t),this.sessionContextGroupMap.set(e,n)}return{hasConflict:this.contextGroupsById.has(e)}}catch(e){throw new Error(e)}}getClientState(e){return this.interopClients.get(e.endpointId)}static toObject(e){const t=Object.fromEntries(e),n={};return Object.entries(t).forEach((([e,t])=>{const i=Object.fromEntries(t);n[e]=i})),n}static checkContextIntegrity(e){if(!e)return{isValid:!1,reason:"No context supplied"};if("object"!=typeof e)return{isValid:!1,reason:"Context must be an Object"};if(!e.type)return{isValid:!1,reason:"Context must have a type property"};if(e.id&&"object"!=typeof e.id)return{isValid:!1,reason:"Context id must be an Object populated with key-value identifiers (if set)"};if(e.id){const{id:t}=e,n=Object.keys(t);let i=!1;if(!n.length)return{isValid:!1,reason:"Context id must have at least one key-value identifier"};if(n.forEach((e=>{"string"==typeof e&&"string"==typeof t[e]||(i=!0)})),i)return{isValid:!1,reason:"Context id key-value identifiers must be of type string"}}return e.name&&"string"!=typeof e.name?{isValid:!1,reason:"Context name must be of string type (if set)"}:{isValid:!0}}static hasEndpointId(e){return void 0!==e.endpointId}static isContextTypeCompatible(e,t){return void 0===t||e===t}setContextGroupMap(){for(const e of this.getContextGroups())this.contextGroupsById.set(e.id,new Map)}async setCurrentContextGroupInClientOptions(e,t){try{const n=await this.fin.System.getEntityInfo(e.uuid,e.name);let i;"view"===n.entityType?i=await this.fin.View.wrap(e):"window"===n.entityType&&(i=await this.fin.Window.wrap(e)),i&&await i.updateOptions({interop:{currentContextGroup:t}})}catch(e){}}async setupChannelProvider(){try{const e=await this.getProvider();this.channel=e,this.wireChannel(e)}catch(e){throw new Error(`Error setting up Interop Broker Channel Provider: ${e}`)}}wireChannel(e){e.onConnection((async(e,t)=>{if(!await this.isConnectionAuthorized(e,t))throw new Error(`Connection not authorized for ${e.uuid}, ${e.name}`);if(!e.endpointId)throw new Error("Version too old to be compatible with Interop. Please upgrade your runtime to a more recent version.");const n={contextGroupId:void 0,contextHandlers:new Map,clientIdentity:e};t?.currentContextGroup&&this.contextGroupsById.has(t.currentContextGroup)&&(n.contextGroupId=t?.currentContextGroup),this.interopClients.set(e.endpointId,n)})),e.onDisconnection((e=>{this.interopClients.delete(e.endpointId);const t=this.intentClientMap.get(e.name);t&&e.uuid===this.fin.me.uuid&&t.forEach((e=>{e.isReady=!1})),this.sessionContextGroupMap.forEach((t=>{t.onDisconnection(e)})),this.clientDisconnected(e)})),e.beforeAction((async(e,t,n)=>{if(!await this.isActionAuthorized(e,t,n))throw new Error(`Action (${e}) not authorized for ${n.uuid}, ${n.name}`);this.logging?.beforeAction?.enabled&&console.log(e,t,n)})),e.afterAction(((e,t,n)=>{this.logging?.afterAction?.enabled&&console.log(e,t,n)})),e.register("setContext",this.setContext.bind(this)),e.register("fireIntent",this.handleFiredIntent.bind(this)),e.register("getCurrentContext",this.getCurrentContext.bind(this)),e.register("getInfoForIntent",this.handleInfoForIntent.bind(this)),e.register("getInfoForIntentsByContext",this.handleInfoForIntentsByContext.bind(this)),e.register("fireIntentForContext",this.handleFiredIntentForContext.bind(this)),e.register("getContextGroups",this.getContextGroups.bind(this)),e.register("joinContextGroup",this.joinContextGroup.bind(this)),e.register("removeFromContextGroup",this.removeFromContextGroup.bind(this)),e.register("getAllClientsInContextGroup",this.getAllClientsInContextGroup.bind(this)),e.register("getInfoForContextGroup",this.getInfoForContextGroup.bind(this)),e.register("contextHandlerRegistered",this.contextHandlerRegistered.bind(this)),e.register("intentHandlerRegistered",this.intentHandlerRegistered.bind(this)),e.register("removeContextHandler",this.removeContextHandler.bind(this)),e.register("sessionContextGroup:createIfNeeded",this.handleJoinSessionContextGroup.bind(this)),e.register("fdc3Open",this.fdc3HandleOpen.bind(this)),e.register("fdc3v2FindIntentsByContext",this.handleInfoForIntentsByContext.bind(this)),e.register("fdc3FindInstances",this.fdc3HandleFindInstances.bind(this)),e.register("fdc3GetAppMetadata",this.fdc3HandleGetAppMetadata.bind(this)),e.register("fdc3v2GetInfo",(async(e,t)=>this.fdc3HandleGetInfo.bind(this)(e,t))),e.register("createPrivateChannelProvider",(async e=>{const{channelId:t}=e,n=await this.fin.InterApplicationBus.Channel.create(t);p.PrivateChannelProvider.init(n,t)}))}isConnectionAuthorized(e,t){return this.wire.sendAction("interop-broker-is-connection-authorized").catch((e=>{})),Promise.resolve(!0)}isActionAuthorized(e,t,n){return this.wire.sendAction("interop-broker-is-action-authorized").catch((e=>{})),Promise.resolve(!0)}};return Gi.InteropBroker=f,e=new WeakMap,t=new WeakMap,n=new WeakMap,Gi}var zi,Ki={},qi={},Ji=s&&s.__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},Yi=s&&s.__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)};Object.defineProperty(qi,"__esModule",{value:!0});const Zi=d,Qi=Hi;class Xi extends Zi.Base{constructor(e,t,n){super(e),zi.set(this,void 0),this.id=n,Ji(this,zi,t,"f")}async setContext(e){this.wire.sendAction("interop-session-context-group-set-context").catch((e=>{}));return(await Yi(this,zi,"f")).dispatch(`sessionContextGroup:setContext-${this.id}`,{sessionContextGroupId:this.id,context:e})}async getCurrentContext(e){this.wire.sendAction("interop-session-context-group-get-context").catch((e=>{}));return(await Yi(this,zi,"f")).dispatch(`sessionContextGroup:getContext-${this.id}`,{sessionContextGroupId:this.id,type:e})}async addContextHandler(e,t){if(this.wire.sendAction("interop-session-context-group-add-handler").catch((e=>{})),"function"!=typeof e)throw new Error("Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");const n=await Yi(this,zi,"f");let i;return i=t?`sessionContextHandler:invoke-${this.id}-${t}-${(0,Qi.generateId)()}`:`sessionContextHandler:invoke-${this.id}`,n.register(i,(0,Qi.wrapContextHandler)(e,i)),await n.dispatch(`sessionContextGroup:handlerAdded-${this.id}`,{handlerId:i,contextType:t}),{unsubscribe:await this.createUnsubscribeCb(i)}}async createUnsubscribeCb(e){const t=await Yi(this,zi,"f");return async()=>{t.remove(e),await t.dispatch(`sessionContextGroup:handlerRemoved-${this.id}`,{handlerId:e})}}getUserInstance(){return{id:this.id,setContext:(0,Qi.wrapInTryCatch)(this.setContext.bind(this),"Failed to set context: "),getCurrentContext:(0,Qi.wrapInTryCatch)(this.getCurrentContext.bind(this),"Failed to get context: "),addContextHandler:(0,Qi.wrapInTryCatch)(this.addContextHandler.bind(this),"Failed to add context handler: ")}}}qi.default=Xi,zi=new WeakMap;var er={},tr={},nr={},ir={},rr=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),or=s&&s.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),sr=s&&s.__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)&&rr(t,e,n);return or(t,e),t};Object.defineProperty(ir,"__esModule",{value:!0}),ir.PrivateChannelClient=void 0;const ar=sr(Hi);var cr,dr;function hr(){if(cr)return tr;cr=1;var e,t=s&&s.__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)},n=s&&s.__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},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(tr,"__esModule",{value:!0}),tr.FDC3ModuleBase=void 0;const o=nr,a=Hi,c=wr(),d=r(i);return tr.FDC3ModuleBase=class{get client(){return t(this,e,"f").call(this)}get fin(){return this.wire.getFin()}constructor(t,i){this.wire=i,e.set(this,void 0),n(this,e,t,"f")}async broadcast(e){return this.wire.sendAction("fdc3-broadcast").catch((e=>{})),this.client.setContext(e)}async _open(e,t){this.wire.sendAction("fdc3-open").catch((e=>{}));try{return await c.InteropClient.ferryFdc3Call(this.client,"fdc3Open",{app:e,context:t})}catch(e){const t=e.message===a.BROKER_ERRORS.fdc3Open?"ResolverUnavailable":e.message;throw new Error(t)}}async _getChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:"system",...(0,o.getUnsupportedChannelApis)()})))}async getOrCreateChannel(e){this.wire.sendAction("fdc3-get-or-create-channel").catch((e=>{}));const t=(await this._getChannels()).find((t=>t.id===e));if(t)return{...t,type:"system",...(0,o.getUnsupportedChannelApis)()};try{const t=await this.client.joinSessionContextGroup(e);return(0,o.buildAppChannelObject)(t)}catch(e){throw console.error(e.message),new Error(o.ChannelError.CreationFailed)}}async getSystemChannels(){return this.wire.sendAction("fdc3-get-system-channels").catch((e=>{})),this._getChannels()}async joinChannel(e){this.wire.sendAction("fdc3-join-channel").catch((e=>{}));try{return await this.client.joinContextGroup(e)}catch(e){if(e.message===a.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup?console.error("The Channel you have tried to join is an App Channel. Custom Channels can only be defined by the Interop Broker through code or manifest configuration. Please use getOrCreateChannel."):console.error(e.message),e.message.startsWith("Attempting to join a context group that does not exist"))throw new Error(o.ChannelError.NoChannelFound);throw new Error(o.ChannelError.AccessDenied)}}async getCurrentChannel(){this.wire.sendAction("fdc3-get-current-channel").catch((e=>{}));const e=await this.getCurrentContextGroupInfo();return e?this.buildChannelObject(e):null}async leaveCurrentChannel(){return this.wire.sendAction("fdc3-leave-current-channel").catch((e=>{})),this.client.removeFromContextGroup()}async getCurrentContextGroupInfo(){const e=await this.client.getContextGroups(),t=e.map((async e=>this.client.getAllClientsInContextGroup(e.id))),n=(await Promise.all(t)).findIndex((e=>e.some((e=>{const{uuid:t,name:n}=e;return this.wire.me.uuid===t&&this.wire.me.name===n}))));return e[n]}async buildChannelObject(e){return{...e,type:"system",addContextListener:(...[e,t])=>{let n,i;"function"==typeof e?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),n=e):(n=t,"string"==typeof e&&(i=e));const r=(async()=>{let e=!0;const t=await this.client.getCurrentContext(i);return this.client.addContextHandler(((i,r)=>{if(!e||(e=!1,!(0,d.default)(t,i)))return n(i,r)}),i)})();return{...r,unsubscribe:()=>r.then((e=>e.unsubscribe()))}},broadcast:this.broadcast.bind(this),getCurrentContext:async e=>{const t=await this.client.getCurrentContext(e);return void 0===t?null:t}}}},e=new WeakMap,tr}ir.PrivateChannelClient=class{constructor(e,t){this.id=t,this.client=e,this.listeners=new Map}async broadcast(e){return this.client.dispatch("broadcast",{context:e})}async getCurrentContext(e){return this.client.dispatch("getCurrentContext",{contextType:e})}async addContextListener(e,t){if("function"!=typeof t)throw new Error("Non-function argument passed to the second parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");let n;n=e?`contextHandler:invoke-${this.id}-${e}-${ar.generateId()}`:`contextHandler:invoke-${this.id}-${ar.generateId()}`,this.client.register(n,ar.wrapContextHandler(t,n));const i={unsubscribe:await this.createContextUnsubscribeCb(n)};return this.listeners.set(n,i),await this.client.dispatch("contextHandlerAdded",{handlerId:n,contextType:e}),i}createNonStandardUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch("nonStandardHandlerRemoved",{handlerId:e})}}createContextUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch("contextHandlerRemoved",{handlerId:e})}}onAddContextListener(e){const t=`onContextHandlerAdded:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch("onAddContextHandlerAdded",{handlerId:t}),n}onDisconnect(e){const t=`onDisconnect:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch("onDisconnectHandlerAdded",{handlerId:t}),n}onUnsubscribe(e){const t=`onUnsubscribe:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch("onUnsubscribeHandlerAdded",{handlerId:t}),n}async cleanUpAllSubs(){Array.from(this.listeners.keys()).forEach((e=>{this.client.remove(e),this.listeners.delete(e)}))}async disconnect(){try{await this.client.dispatch("clientDisconnecting"),await this.cleanUpAllSubs(),await this.client.disconnect()}catch(e){throw new Error(e.message)}}},function(e){var t=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.getIntentResolution=e.isChannel=e.isContext=e.connectPrivateChannel=e.buildAppChannelObject=e.buildPrivateChannelObject=e.ChannelError=e.ResultError=e.UnsupportedChannelApiError=e.getUnsupportedChannelApis=void 0;const n=Hi,r=ir,o=t(i);e.getUnsupportedChannelApis=e=>({addContextListener:()=>{throw new a("Channel.addContextListener",e)},broadcast:()=>{throw new a("Channel.broadcast",e)},getCurrentContext:()=>{throw new a("Channel.getCurrentContext",e)}});class a extends Error{constructor(e,t="System"){super(e),this.message=`Calling ${e} on an instance of a ${t} Channel returned by fdc3.get${t}Channels is not supported. If you would like to use a ${t} Channel, please use fdc3.joinChannel, fdc3.addContextListener, and fdc3.broadcast instead.`}}var c,d;e.UnsupportedChannelApiError=a,function(e){e.NoResultReturned="NoResultReturned",e.IntentHandlerRejected="IntentHandlerRejected"}(c=e.ResultError||(e.ResultError={})),(d=e.ChannelError||(e.ChannelError={})).NoChannelFound="NoChannelFound",d.AccessDenied="AccessDenied",d.CreationFailed="CreationFailed";e.buildPrivateChannelObject=e=>{let t=!1;const n=()=>{if(t)throw new Error("Private Channel Client has been disconnected from the Private Channel")};return{id:e.id,type:"private",broadcast:async t=>(n(),e.broadcast(t)),getCurrentContext:async t=>(n(),e.getCurrentContext(t)),addContextListener:async(t,i)=>{n();let r=i,o=t;"function"==typeof t&&(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),r=t,o=null);return e.addContextListener(o,r)},onAddContextListener:t=>(n(),e.onAddContextListener(t)),disconnect:async()=>(n(),t=!0,e.disconnect()),onDisconnect:t=>(n(),e.onDisconnect(t)),onUnsubscribe:t=>(n(),e.onUnsubscribe(t))}};e.buildAppChannelObject=e=>({id:e.id,type:"app",broadcast:e.setContext,getCurrentContext:async t=>{const n=await e.getCurrentContext(t);return void 0===n?null:n},addContextListener:(t,n)=>{let i,r;"function"==typeof t?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),i=t):(i=n,"string"==typeof t&&(r=t));const s=(async()=>{let t=!0;const n=await e.getCurrentContext(r);return e.addContextHandler(((e,r)=>{if(!t||(t=!1,!(0,o.default)(n,e)))return i(e,r)}),r)})();return{...s,unsubscribe:()=>s.then((e=>e.unsubscribe()))}}});e.connectPrivateChannel=async t=>{try{const n=await fin.InterApplicationBus.Channel.connect(t),i=new r.PrivateChannelClient(n,t);return(0,e.buildPrivateChannelObject)(i)}catch(e){throw new Error(`Private Channel with id: ${t} doesn't exist`)}};e.isContext=e=>{if(e&&"object"==typeof e&&"type"in e){const{type:t}=e;return"string"==typeof t}return!1};e.isChannel=e=>{if(e&&"object"==typeof e&&"type"in e&&"id"in e){const{type:t,id:n}=e;return"string"==typeof t&&"string"==typeof n&&("app"===t||"private"===t)}return!1};e.getIntentResolution=async(t,i,r,o)=>{const s=(0,n.generateId)(),a=new Promise(((e,t)=>{fin.InterApplicationBus.subscribe({uuid:"*"},s,(t=>{e(t)})).catch((()=>t(new Error("getResult is not supported in this environment"))))})),d=r?{target:r,intentResolutionResultId:s}:{intentResolutionResultId:s},h=o?{name:o,context:i,metadata:d}:{...i,metadata:d},l=async()=>{let n=await a;if(!n||"object"!=typeof n)throw new Error(c.NoResultReturned);const{error:i}=n;if(i)throw new Error(c.IntentHandlerRejected);if((0,e.isChannel)(n)){const{id:i,type:r}=n;switch(r){case"private":n=await(0,e.connectPrivateChannel)(i);break;case"app":{const r=await t.joinSessionContextGroup(i);n=(0,e.buildAppChannelObject)(r);break}}}else if(!(0,e.isContext)(n))throw new Error(c.NoResultReturned);return n},u=o?await t.fireIntent(h):await t.fireIntentForContext(h);return"object"!=typeof u?{source:{appId:"",instanceId:""},intent:"",version:"2.0",getResult:l}:{...u,getResult:l}}}(nr);var lr,ur,pr={};function wr(){if(ur)return Ki;ur=1;var e,t,n=s&&s.__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},i=s&&s.__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)},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ki,"__esModule",{value:!0}),Ki.InteropClient=void 0;const o=d,a=r(qi),c=function(){if(dr)return er;dr=1,Object.defineProperty(er,"__esModule",{value:!0}),er.Fdc3Module=void 0;const e=Hi,t=hr();class n extends t.FDC3ModuleBase{async open(e,t){await super._open(e,t)}addContextListener(e,t){let n;return this.wire.sendAction("fdc3-add-context-listener").catch((e=>{})),"function"==typeof e?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),n=this.client.addContextHandler(e)):n=this.client.addContextHandler(t,null===e?void 0:e),{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}addIntentListener(e,t){this.wire.sendAction("fdc3-add-intent-listener").catch((e=>{}));const n=this.client.registerIntentHandler((e=>{const{context:n,metadata:i}=e,{metadata:r}=n,o=i?.intentResolutionResultId||r?.intentResolutionResultId;o&&this.fin.InterApplicationBus.publish(o,null).catch((()=>null)),t(e.context)}),e,{fdc3Version:"1.2"});return{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}async raiseIntent(t,n,i){this.wire.sendAction("fdc3-raise-intent").catch((e=>{}));const r=i?{name:t,context:n,metadata:{target:i}}:{name:t,context:n};try{return await this.client.fireIntent(r)}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntent?"ResolverUnavailable":t.message;throw new Error(n)}}async findIntent(t,n){this.wire.sendAction("fdc3-find-intent").catch((e=>{}));try{return await this.client.getInfoForIntent({name:t,context:n})}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntent?"ResolverUnavailable":t.message;throw new Error(n)}}async findIntentsByContext(t){this.wire.sendAction("fdc3-find-intents-by-context").catch((e=>{}));try{return await this.client.getInfoForIntentsByContext(t)}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntentsByContext?"ResolverUnavailable":t.message;throw new Error(n)}}async raiseIntentForContext(t,n){this.wire.sendAction("fdc3-raise-intent-for-context").catch((e=>{}));try{return await this.client.fireIntentForContext({...t,metadata:{target:n}})}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntentForContext?"ResolverUnavailable":t.message;throw new Error(n)}}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}getInfo(){return this.wire.sendAction("fdc3-get-info").catch((e=>{})),{providerVersion:this.wire.environment.getAdapterVersionSync(),provider:`openfin-${this.wire.me.uuid}`,fdc3Version:"1.2"}}}return er.Fdc3Module=n,er}(),h=function(){if(lr)return pr;lr=1,Object.defineProperty(pr,"__esModule",{value:!0}),pr.Fdc3Module2=void 0;const e=hr(),t=Hi,n=wr(),i=nr,r=ir;class o extends e.FDC3ModuleBase{async open(e,t){return"string"==typeof e&&console.warn("Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string })."),super._open(e,t)}async findInstances(e){this.wire.sendAction("fdc3-find-instances").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,"fdc3FindInstances",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3FindInstances?"ResolverUnavailable":e.message;throw new Error(n)}}async getAppMetadata(e){this.wire.sendAction("fdc3-get-app-metadata").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,"fdc3GetAppMetadata",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3GetAppMetadata?"ResolverUnavailable":e.message;throw new Error(n)}}async addContextListener(e,t){this.wire.sendAction("fdc3-add-context-listener").catch((e=>{}));const n=e=>t=>{const{contextMetadata:n,...i}=t,r=n?[{...i},n]:[t,null];e(...r)};let i=t,r=n(i);return"function"==typeof e?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),i=e,r=n(i),this.client.addContextHandler(r)):this.client.addContextHandler(r,null===e?void 0:e)}async findIntent(e,n,i){this.wire.sendAction("fdc3-find-intent").catch((e=>{}));try{return await this.client.getInfoForIntent({name:e,context:n,metadata:{resultType:i}})}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntent?"ResolverUnavailable":e.message;throw new Error(n)}}async findIntentsByContext(e,i){this.wire.sendAction("fdc3-find-intents-by-context").catch((e=>{}));const r=i?{context:e,metadata:{resultType:i}}:e;try{return await n.InteropClient.ferryFdc3Call(this.client,"fdc3v2FindIntentsByContext",r)}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntentsByContext?"ResolverUnavailable":e.message;throw new Error(n)}}async raiseIntent(e,n,r){this.wire.sendAction("fdc3-raise-intent").catch((e=>{}));try{return"string"==typeof r&&console.warn("Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string })."),(0,i.getIntentResolution)(this.client,n,r,e)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?"ResolverUnavailable":e.message;throw new Error(n)}}async raiseIntentForContext(e,n){this.wire.sendAction("fdc3-raise-intent-for-context").catch((e=>{}));try{return"string"==typeof n&&console.warn("Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string })."),(0,i.getIntentResolution)(this.client,e,n)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?"ResolverUnavailable":e.message;throw new Error(n)}}async addIntentListener(e,t){if(this.wire.sendAction("fdc3-add-intent-listener").catch((e=>{})),"string"!=typeof e)throw new Error("First argument must be an Intent name");return this.client.registerIntentHandler((async e=>{let n,i;const{context:r,metadata:o}=e,{contextMetadata:s,metadata:a,...c}=r,d=o?.intentResolutionResultId||a?.intentResolutionResultId;try{const e=a?{metadata:a,...c}:{...c};n=await t(e,s),i=n}catch(e){n=e,i={error:!0}}if(d&&this.fin.InterApplicationBus.publish(d,i).catch((()=>null)),n instanceof Error)throw new Error(n.message);return n}),e,{fdc3Version:"2.0"})}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}async createPrivateChannel(){const e=(0,t.generateId)();await n.InteropClient.ferryFdc3Call(this.client,"createPrivateChannelProvider",{channelId:e});const o=await this.fin.InterApplicationBus.Channel.connect(e),s=new r.PrivateChannelClient(o,e);return(0,i.buildPrivateChannelObject)(s)}async getUserChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:"user",...(0,i.getUnsupportedChannelApis)("User")})))}async getSystemChannels(){return console.warn("This API has been deprecated. Please use fdc3.getUserChannels instead."),super.getSystemChannels()}async joinUserChannel(e){return super.joinChannel(e)}async joinChannel(e){return console.warn("This API has been deprecated. Please use fdc3.joinUserChannel instead."),super.joinChannel(e)}async getCurrentChannel(){const e=await super.getCurrentChannel();return e?{...e,type:"user",broadcast:this.broadcast.bind(this)}:null}async getInfo(){return n.InteropClient.ferryFdc3Call(this.client,"fdc3v2GetInfo",{fdc3Version:"2.0"})}}return pr.Fdc3Module2=o,pr}(),l=Hi;let u=class extends o.Base{constructor(i,r){super(i),e.set(this,void 0),t.set(this,void 0),n(this,t,new Map,"f"),n(this,e,r,"f")}async setContext(t){this.wire.sendAction("interop-client-set-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("setContext",{context:t})}async addContextHandler(t,n){if(this.wire.sendAction("interop-client-add-context-handler").catch((e=>{})),"function"!=typeof t)throw new Error("Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");const r=await i(this,e,"f");let o;o=n?`invokeContextHandler-${n}-${(0,l.generateId)()}`:"invokeContextHandler";const s=(0,l.wrapContextHandler)(t,o);return r.register(o,s),await r.dispatch("contextHandlerRegistered",{handlerId:o,contextType:n}),{unsubscribe:async()=>{r.remove(o),await r.dispatch("removeContextHandler",{handlerId:o})}}}async getContextGroups(){this.wire.sendAction("interop-client-get-context-groups").catch((e=>{}));return(await i(this,e,"f")).dispatch("getContextGroups")}async joinContextGroup(t,n){this.wire.sendAction("interop-client-join-context-group").catch((e=>{}));const r=await i(this,e,"f");if(!t)throw new Error("No contextGroupId specified for joinContextGroup.");return r.dispatch("joinContextGroup",{contextGroupId:t,target:n})}async removeFromContextGroup(t){this.wire.sendAction("interop-client-remove-from-context-group").catch((e=>{}));return(await i(this,e,"f")).dispatch("removeFromContextGroup",{target:t})}async getAllClientsInContextGroup(t){this.wire.sendAction("interop-client-get-all-clients-in-context-group").catch((e=>{}));const n=await i(this,e,"f");if(!t)throw new Error("No contextGroupId specified for getAllClientsInContextGroup.");return n.dispatch("getAllClientsInContextGroup",{contextGroupId:t})}async getInfoForContextGroup(t){this.wire.sendAction("interop-client-get-info-for-context-group").catch((e=>{}));const n=await i(this,e,"f");if(!t)throw new Error("No contextGroupId specified for getInfoForContextGroup.");return n.dispatch("getInfoForContextGroup",{contextGroupId:t})}async fireIntent(t){this.wire.sendAction("interop-client-fire-intent").catch((e=>{}));return(await i(this,e,"f")).dispatch("fireIntent",t)}async registerIntentHandler(t,n,r){this.wire.sendAction("interop-client-register-intent-handler").catch((e=>{}));const o=await i(this,e,"f"),s=`intent-handler-${n}`,a=(0,l.wrapIntentHandler)(t,s);try{await o.register(s,a),await o.dispatch("intentHandlerRegistered",{handlerId:s,...r})}catch(e){throw new Error("Unable to register intent handler")}return{unsubscribe:async()=>{o.remove(s)}}}async getCurrentContext(t){this.wire.sendAction("interop-client-get-current-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("getCurrentContext",{contextType:t})}async getInfoForIntent(t){this.wire.sendAction("interop-client-get-info-for-intent").catch((e=>{}));return(await i(this,e,"f")).dispatch("getInfoForIntent",t)}async getInfoForIntentsByContext(t){this.wire.sendAction("interop-client-get-info-for-intents-by-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("getInfoForIntentsByContext",t)}async fireIntentForContext(t){this.wire.sendAction("interop-client-fire-intent-for-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("fireIntentForContext",t)}async joinSessionContextGroup(n){try{const r=i(this,t,"f").get(n);if(r)return r.getUserInstance();const o=await i(this,e,"f"),{hasConflict:s}=await o.dispatch("sessionContextGroup:createIfNeeded",{sessionContextGroupId:n});s&&console.warn(`A (non-session) context group with the name "${n}" already exists. If you are trying to join a Context Group, call joinContextGroup instead.`);const c=new a.default(this.wire,i(this,e,"f"),n);return i(this,t,"f").set(n,c),c.getUserInstance()}catch(e){throw console.error(`Error thrown trying to create Session Context Group with id "${n}": ${e}`),e}}async onDisconnection(t){this.wire.sendAction("interop-client-add-ondisconnection-listener").catch((e=>{}));return(await i(this,e,"f")).onDisconnection((e=>{const{uuid:n}=e;t({type:"interop-broker",topic:"disconnected",brokerName:n})}))}getFDC3Sync(e){switch(e){case"1.2":return new c.Fdc3Module((()=>this),this.wire);case"2.0":return new h.Fdc3Module2((()=>this),this.wire);default:throw new Error(`Invalid FDC3 version provided: ${e}. Must be '1.2' or '2.0'`)}}async getFDC3(e){return this.getFDC3Sync(e)}static async ferryFdc3Call(t,n,r){return(await i(t,e,"f")).dispatch(n,r||null)}};return Ki.InteropClient=u,e=new WeakMap,t=new WeakMap,Ki}var yr,fr,gr,mr={};function vr(){if(yr)return mr;yr=1,Object.defineProperty(mr,"__esModule",{value:!0}),mr.overrideCheck=mr.checkFDC32Overrides=mr.getDefaultViewFdc3VersionFromAppInfo=void 0;const e=Vi();function t(t){return["fdc3HandleFindInstances","handleInfoForIntent","handleInfoForIntentsByContext","fdc3HandleGetAppMetadata","fdc3HandleGetInfo","fdc3HandleOpen","handleFiredIntent","handleFiredIntentForContext"].filter((n=>t[n]===e.InteropBroker.prototype[n]))}return mr.getDefaultViewFdc3VersionFromAppInfo=function({manifest:e,initialOptions:t}){const n=e?.platform?.defaultViewOptions?.fdc3InteropApi??t.defaultViewOptions?.fdc3InteropApi;return["1.2","2.0"].includes(n??"")?n:void 0},mr.checkFDC32Overrides=t,mr.overrideCheck=function(e,n){if(n&&"2.0"===n){const n=t(e);n.length>0&&console.warn(`WARNING: FDC3 2.0 has been set as a default option for Views in this Platform, but the required InteropBroker APIs for FDC3 2.0 compliance have not all been overridden.\nThe following APIs need to be overridden:\n${n.join("\n")}`)}},mr}function Cr(){return gr||(gr=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),i=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),i(function(){if(fr)return Ti;fr=1;var e=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ti,"__esModule",{value:!0}),Ti.InteropModule=void 0;const t=e(n),i=$i,r=d,o=Vi(),a=wr(),c=vr(),h=Tn,l=e=>new e,u="You have attempted to use or modify InteropBroker parameters, which is not allowed. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.";class p extends r.Base{async init(e,n=l){this.wire.sendAction("interop-init").catch((()=>{}));const r=await this.wire.environment.getInteropInfo(this.wire.getFin()),s=(0,i.createUnusableObject)(u),a=(0,i.createWarningObject)(u,(0,t.default)(r)),d=async()=>{throw new Error(u)},p=o.InteropBroker.createClosedConstructor(this.wire,(()=>this.fin.InterApplicationBus.Channel.create(`interop-broker-${e}`)),r);let w;return w=Array.isArray(n)?new((0,h.overrideFromComposables)(...n)(p))(s,d,a):await n(p,s,d,a),(0,c.overrideCheck)(w,r.fdc3Version),w}connectSync(e,t){return this.wire.sendAction("interop-connect-sync").catch((()=>{})),new a.InteropClient(this.wire,this.wire.environment.whenReady().then((()=>this.fin.InterApplicationBus.Channel.connect(`interop-broker-${e}`,{payload:t}))))}}return Ti.InteropModule=p,Ti}(),e),i(wr(),e),i(Vi(),e)}(Li)),Li}var br={},Ir={},Er={},xr={};Object.defineProperty(xr,"__esModule",{value:!0}),xr.getSnapshotSourceChannelName=void 0;xr.getSnapshotSourceChannelName=e=>`snapshot-source-provider-${e.uuid}`;var Ar,Pr,Mr,_r,Or,Sr=s&&s.__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},Rr=s&&s.__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)};Object.defineProperty(Er,"__esModule",{value:!0}),Er.SnapshotSource=void 0;const Fr=d,jr=xr,kr=new Map;class Lr extends Fr.Base{constructor(e,t){super(e),Ar.set(this,void 0),Pr.set(this,(()=>(kr.has(this.identity.uuid)||kr.set(this.identity.uuid,{eventFired:null,clientPromise:null}),kr.get(this.identity.uuid)))),Mr.set(this,(()=>(Rr(this,Pr,"f").call(this).clientPromise||(Rr(this,Pr,"f").call(this).clientPromise=Rr(this,_r,"f").call(this)),Rr(this,Pr,"f").call(this).clientPromise))),_r.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);try{Rr(this,Pr,"f").call(this).eventFired||await Rr(this,Or,"f").call(this);const t=await this.fin.InterApplicationBus.Channel.connect(e,{wait:!1});return t.onDisconnection((()=>{Rr(this,Pr,"f").call(this).clientPromise=null,Rr(this,Pr,"f").call(this).eventFired=null})),t}catch(e){throw Rr(this,Pr,"f").call(this).clientPromise=null,new Error("The targeted SnapshotSource is not currently initialized. Await this object's ready() method.")}})),Or.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);let t,n;const i=new Promise(((e,i)=>{t=e,n=i}));Rr(this,Pr,"f").call(this).eventFired=i;const r=async i=>{try{i.channelName===e&&(t(),await this.fin.InterApplicationBus.Channel.removeListener("connected",r))}catch(e){n(e)}};await this.fin.InterApplicationBus.Channel.on("connected",r)})),Sr(this,Ar,t,"f")}get identity(){return Rr(this,Ar,"f")}async ready(){this.wire.sendAction("snapshot-source-ready").catch((e=>{}));try{await Rr(this,Mr,"f").call(this)}catch(e){await Rr(this,Pr,"f").call(this).eventFired}}async getSnapshot(){this.wire.sendAction("snapshot-source-get-snapshot").catch((e=>{}));const e=await Rr(this,Mr,"f").call(this),t=await e.dispatch("get-snapshot");return(await t).snapshot}async applySnapshot(e){this.wire.sendAction("snapshot-source-apply-snapshot").catch((e=>{}));return(await Rr(this,Mr,"f").call(this)).dispatch("apply-snapshot",{snapshot:e})}}Er.SnapshotSource=Lr,Ar=new WeakMap,Pr=new WeakMap,Mr=new WeakMap,_r=new WeakMap,Or=new WeakMap,Object.defineProperty(Ir,"__esModule",{value:!0}),Ir.SnapshotSourceModule=void 0;const Tr=d,$r=Er,Br=xr;class Gr extends Tr.Base{async init(e){if(this.wire.sendAction("snapshot-source-init").catch((e=>{})),"object"!=typeof e||"function"!=typeof e.getSnapshot||"function"!=typeof e.applySnapshot)throw new Error("you must pass in a valid SnapshotProvider");const t=await this.fin.InterApplicationBus.Channel.create((0,Br.getSnapshotSourceChannelName)(this.fin.me));t.register("get-snapshot",(async()=>({snapshot:await e.getSnapshot()}))),t.register("apply-snapshot",(({snapshot:t})=>e.applySnapshot(t)))}wrapSync(e){return this.wire.sendAction("snapshot-source-wrap-sync").catch((e=>{})),new $r.SnapshotSource(this.wire,e)}async wrap(e){return this.wire.sendAction("snapshot-source-wrap").catch((e=>{})),this.wrapSync(e)}}Ir.SnapshotSourceModule=Gr,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Ir,e),n(Er,e)}(br),Object.defineProperty(a,"__esModule",{value:!0});var Wr=a.Fin=void 0;const Hr=t,Nr=c,Dr=ie(),Ur=Z(),Vr=de,zr=en,Kr=rn,qr=un,Jr=bn,Yr=J(),Zr=An,Qr=ki,Xr=Cr(),eo=br;class to extends Hr.EventEmitter{constructor(e){super(),this.wire=e,this.System=new Nr.System(e),this.Window=new Dr._WindowModule(e),this.Application=new Ur.ApplicationModule(e),this.InterApplicationBus=new Vr.InterApplicationBus(e),this.Clipboard=new zr.Clipboard(e),this.ExternalApplication=new Kr.ExternalApplicationModule(e),this.Frame=new qr._FrameModule(e),this.GlobalHotkey=new Jr.GlobalHotkey(e),this.Platform=new Zr.PlatformModule(e,this.InterApplicationBus.Channel),this.View=new Yr.ViewModule(e),this.Interop=new Xr.InteropModule(e),this.SnapshotSource=new eo.SnapshotSourceModule(e),e.registerFin(this),this.me=(0,Qr.getMe)(e),e.on("disconnected",(()=>{this.emit("disconnected")}))}}Wr=a.Fin=to;var no={},io={};function ro(e){return"string"==typeof e.manifestUrl}function oo(e){return ao(e)&&"string"==typeof e.address}function so(e){return oo(e)&&"string"==typeof e.token}function ao(e){return"string"==typeof e.uuid}function co(e){return e.runtime&&"string"==typeof e.runtime.version}function ho(e){return ao(e)&&co(e)}Object.defineProperty(io,"__esModule",{value:!0}),io.isInternalConnectConfig=io.isPortDiscoveryConfig=io.isNewConnectConfig=io.isConfigWithReceiver=io.isRemoteConfig=io.isExistingConnectConfig=io.isExternalConfig=void 0,io.isExternalConfig=ro,io.isExistingConnectConfig=oo,io.isRemoteConfig=so,io.isConfigWithReceiver=function(e){return"object"==typeof e.receiver&&so({...e,address:""})},io.isNewConnectConfig=ho,io.isPortDiscoveryConfig=function(e){return ro(e)&&co(e)||ho(e)},io.isInternalConnectConfig=function(e){return oo(e)||ho(e)};var lo={},uo={};Object.defineProperty(uo,"__esModule",{value:!0}),uo.EmitterMap=void 0;const po=t;function wo(e){return Buffer.from(e).toString("base64")}uo.EmitterMap=class{constructor(){this.storage=new Map}hashKeys(e){return e.map(wo).join("/")}getOrCreate(e){const t=this.hashKeys(e);return this.storage.has(t)||this.storage.set(t,new po.EventEmitter),this.storage.get(t)}has(e){return this.storage.has(this.hashKeys(e))}delete(e){const t=this.hashKeys(e);return this.storage.delete(t)}},Object.defineProperty(lo,"__esModule",{value:!0});const yo=uo;class fo extends yo.EmitterMap{constructor(){super(...arguments),this.dispatchEvent=e=>{if(function(e){return"process-desktop-event"===e.action}(e)){const{payload:t}=e,n=function(e){const{topic:t}=e;if("frame"===t||"window"===t||"view"===t){const{uuid:n,name:i}=e;return[t,n,i]}if("application"===t){const{uuid:n}=e;return[t,n]}return[t]}(t);if(this.has(n))return this.getOrCreate(n).emit(t.type,t),!0}return!1}}}lo.default=fo;var go,mo,vo=s&&s.__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},Co=s&&s.__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)},bo=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(no,"__esModule",{value:!0});var Io=no.Transport=void 0;const Eo=t,xo=io,Ao=g,Po=bo(lo),Mo=ki,_o=ke;class Oo extends Eo.EventEmitter{constructor(e,t,n){super(),this.wireListeners=new Map,this.topicRefMap=new Map,this.eventAggregator=new Po.default,this.messageHandlers=[this.eventAggregator.dispatchEvent],go.set(this,void 0),mo.set(this,void 0),this.connectSync=()=>{Co(this,go,"f").connectSync()},this.getPort=()=>Co(this,go,"f").getPort(),vo(this,go,new e(this.onmessage.bind(this)),"f"),this.environment=t,this.sendRaw=Co(this,go,"f").send.bind(Co(this,go,"f")),this.registerMessageHandler(this.handleMessage.bind(this)),Co(this,go,"f").on("disconnected",(()=>{for(const[,{handleNack:e}]of this.wireListeners)e({reason:"Remote connection has closed"});this.wireListeners.clear(),this.emit("disconnected")}));const{uuid:i,name:r}=n,o=this.environment.getCurrentEntityType();this.me=(0,Mo.getBaseMe)(o,i,r)}getFin(){if(!Co(this,mo,"f"))throw new Error("No Fin object registered for this transport");return Co(this,mo,"f")}registerFin(e){if(Co(this,mo,"f"))throw new Error("Fin object has already been registered for this transport");vo(this,mo,e,"f")}shutdown(){return Co(this,go,"f").shutdown()}async connect(e){if((0,xo.isConfigWithReceiver)(e))return await Co(this,go,"f").connect(e.receiver),this.authorize(e);if((0,xo.isRemoteConfig)(e))return this.connectRemote(e);if((0,xo.isExistingConnectConfig)(e))return this.connectByPort(e);if((0,xo.isNewConnectConfig)(e)){const t=await this.environment.retrievePort(e);return this.connectByPort({...e,address:`ws://localhost:${t}`})}}async connectRemote(e){return await Co(this,go,"f").connect(new(this.environment.getWsConstructor())(e.address)),this.authorize(e)}async connectByPort(e){const{address:t,uuid:n}=e,i={...e,type:"file-token"},r=Co(this,go,"f");await r.connect(new(this.environment.getWsConstructor())(e.address));const o=await this.sendAction("request-external-authorization",{uuid:n,type:"file-token"},!0);if("external-authorization-response"!==o.action)throw new Ao.UnexpectedActionError(o.action);return await this.environment.writeToken(o.payload.file,o.payload.token),this.authorize(i)}async authorize(e){const t=await this.sendAction("request-authorization",e,!0);if("authorization-response"!==t.action)throw new Ao.UnexpectedActionError(t.action);if(!0!==t.payload.success)throw new Ao.RuntimeError(t.payload)}sendAction(e,t={},n=!1){let i=()=>{};const r=Ao.RuntimeError.getCallSite(1),o=this.environment.getNextMessageId(),s=new Promise(((s,a)=>{i=a;const c={action:e,payload:t,messageId:o},d=Co(this,go,"f");return this.addWireListener(o,s,(e=>this.nackHandler(e,a,r)),n),d.send(c).catch(a)}));return Object.assign(s,{cancel:i,messageId:o})}nackHandler(e,t,n){t("string"==typeof e?e:new Ao.RuntimeError(e,n))}ferryAction(e){return new Promise(((t,n)=>{const i=this.environment.getNextMessageId();e.messageId=i;const r=e=>{t(e.payload)};return Co(this,go,"f").send(e).then((()=>this.addWireListener(i,r,(e=>this.nackHandler(e,n)),!1))).catch(n)}))}registerMessageHandler(e){this.messageHandlers.push(e)}addWireListener(e,t,n,i){i?this.uncorrelatedListener=t:this.wireListeners.has(e)?n({reason:"Duplicate handler id",error:(0,_o.errorToPOJO)(new Ao.DuplicateCorrelationError(String(e)))}):this.wireListeners.set(e,{resolve:t,handleNack:n})}onmessage(e){for(const t of this.messageHandlers)t.call(null,e)}handleMessage(e){const t=e.correlationId||NaN;if("correlationId"in e){if(!this.wireListeners.has(t))return!1;{const{resolve:n,handleNack:i}=this.wireListeners.get(t);"ack"!==e.action?i({reason:"Did not receive ack action",error:(0,_o.errorToPOJO)(new Ao.NoAckError(e.action))}):"payload"in e?e.payload.success?n.call(null,e):i(e.payload):"string"==typeof e.reason?i(e):(console.warn("Received invalid response from core",e),i({reason:"invalid response shape"})),this.wireListeners.delete(t)}}else this.uncorrelatedListener&&this.uncorrelatedListener.call(null,e),this.uncorrelatedListener=()=>{};return!0}}Io=no.Transport=Oo,go=new WeakMap,mo=new WeakMap;const So=(...e)=>({log:(...t)=>console.debug(`[${(new Date).toISOString()}]`,...(e=>e.map((e=>`[${e}]`)))(e),...t),getLogger:(...t)=>So(...e,...t)}),Ro=So("@openfin/core-web/client");function Fo(e,t){if(!function(e){return"string"==typeof e}(e))throw new Error(`Property ${t} has invalid type. Expected string, got ${typeof e}.`)}const jo="web-broker-ports-ready",ko=Ro.getLogger("get-web-interop-ports");function Lo(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)}function To(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}"function"==typeof SuppressedError&&SuppressedError;const $o=e=>{var n,i,r;return r=class extends t.EventEmitter{constructor(t){super(),n.set(this,void 0),i.set(this,!1),this.connectSync=()=>{Lo(this,i,"f")||(e.addEventListener("message",(e=>{e.data?.topic?.startsWith("wire-message")&&e.data.message&&Lo(this,n,"f").call(this,{...JSON.parse(e.data.message),ports:e.ports})})),e.start())},this.connect=async()=>{this.connectSync()},this.send=t=>(e.postMessage({topic:"wire-message",message:JSON.stringify(t)}),Promise.resolve()),this.shutdown=async()=>{e.close()},To(this,n,t,"f")}getPort(){return e}},n=new WeakMap,i=new WeakMap,r};var Bo={},Go={};Object.defineProperty(Go,"__esModule",{value:!0}),Go.BaseEnvironment=void 0;const Wo=vr();Go.BaseEnvironment=class{async getViewWindowIdentity(e,t){const{identity:n}=await e.View.wrapSync(t).getCurrentWindow();return n}async getInteropInfo(e){const t=await e.Application.getCurrentSync().getInfo().catch((()=>null)),n=t?.initialOptions?.interopBrokerConfiguration??{};return{fdc3Version:t?(0,Wo.getDefaultViewFdc3VersionFromAppInfo)(t):void 0,...n,fdc3Info:{providerVersion:await e.System.getVersion(),provider:"OpenFin"}}}},Object.defineProperty(Bo,"__esModule",{value:!0});var Ho=Bo.BrowserEnvironment=void 0;const No=Go;class Do extends No.BaseEnvironment{constructor(){super(...arguments),this.type="other",this.getRandomId=()=>{const e=new Uint32Array(1);return window.crypto.getRandomValues(e)[0].toString(32)}}getAdapterVersionSync(){return""}observeBounds(e,t){throw new Error("Method not implemented.")}layoutAllowedInContext(e){return!1}initLayoutManager(e,t,n){throw new Error("Method not implemented.")}applyLayoutSnapshot(e,t,n){throw new Error("Method not implemented.")}createLayout(e,t){throw new Error("Method not implemented.")}destroyLayout(e,t){throw new Error("Method not implemented.")}resolveLayout(e,t){throw new Error("Method not implemented.")}initPlatform(...e){throw new Error("Method not implemented.")}writeToken(e,t){return Promise.resolve("")}retrievePort(e){throw new Error("Method not implemented.")}getNextMessageId(){return this.getRandomId()}createChildContent(e){throw new Error("Method not implemented.")}getWebWindow(e){throw new Error("Method not implemented.")}getCurrentEntityIdentity(){throw new Error("Method not implemented.")}getCurrentEntityType(){return"external connection"}raiseEvent(e,t){throw new Error("Method not implemented.")}getUrl(){return location.href}getDefaultChannelOptions(){return{create:{},connect:{}}}getRtcPeer(){return new RTCPeerConnection}getWsConstructor(){return WebSocket}whenReady(){return Promise.resolve()}}Ho=Bo.BrowserEnvironment=Do;const Uo=e=>"platform"in e&&void 0!==e.platform;var Vo,zo;class Ko extends Ho{constructor(e){super(),this.connectConfig=e,Vo.set(this,void 0),zo.set(this,new W((async()=>Promise.resolve().then((function(){return __webpack_require__(/*! ./main-b14f67c9.js */ "./node_modules/@openfin/core-web/out/main-b14f67c9.js")}))))),Uo(e)&&this.validatePlatformOptions(e)}getAdapterVersionSync(){return"0.39.21"}validatePlatformOptions({platform:e}){if(!("layoutSnapshot"in e))throw new Error("Platform options are missing layoutSnapshot. Please provide a layoutSnapshot in the platform options.");if("windows"in e||"windows"in e.layoutSnapshot)throw new Error("It appears you tried to call connect() with a snapshot object from an OpenFin desktop environment. Note that connect() expects to be called with a platform property with this structure: { platform: { layoutSnapshot } }. To get a layoutSnapshot of the expected structure, use fin.Platform.Layout.getCurrentLayoutManagerSync().getLayoutSnapshot() in v34+ in your desktop environment.");const{layouts:t}=e.layoutSnapshot;Object.entries(t).map((([e,t])=>{if("object"!=typeof t||null===t)throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must be an object.`);if(!("content"in t))throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must contain a 'content' property.`)}))}async getInteropInfo(e){return{...{contextGroups:void 0,logging:{beforeAction:{enabled:!1},afterAction:{enabled:!1}}},fdc3Version:void 0,fdc3Info:{providerVersion:"0.39.21",provider:"OpenFin Web"}}}layoutAllowedInContext(e){return!0}async initLayoutManager(e,t,n){if(Lo(this,Vo,"f"))throw new Error("Layout already initialized.");if(!Uo(this.connectConfig))throw new Error("Platform options are missing from connection config.");const{WebLayoutEntryPoint:i}=await Lo(this,zo,"f").getValue();return To(this,Vo,new i(this.connectConfig),"f"),await Lo(this,Vo,"f").initLayoutManager(e,t,n)}async applyLayoutSnapshot(e,t,n){Lo(this,Vo,"f")?.applyLayoutSnapshot(e,t,n)}async createLayout(e,t){return Lo(this,Vo,"f")?.createLayout(e,t)}async destroyLayout(e,t){return Lo(this,Vo,"f")?.destroyLayout(e,t)}async getViewWindowIdentity(e,t){return Promise.resolve({uuid:t.uuid,name:t.uuid})}}Vo=new WeakMap,zo=new WeakMap;const qo=()=>{const e=((e,t)=>{const n=new RegExp(`^${t}<(?.*)>$`).exec(e)?.groups?.meta;if(n)try{return JSON.parse(atob(n))}catch(e){throw new Error(`Failed to decode JSON from ${n}.`)}})(window.name,"of-frame");if(e)try{const{name:t,uuid:n,brokerUrl:i,providerId:r,contextGroup:o}=e;return Fo(i,"brokerUrl"),Fo(n,"uuid"),Fo(t,"name"),{identity:{name:t,uuid:n},brokerUrl:i,interopConfig:{providerId:r,currentContextGroup:o}}}catch(e){throw new Error(`Unexpected error occurred when inferring platform information: ${e.stack}`)}},Jo=()=>{const e=r.v4();return{uuid:e,name:e}},Yo=async e=>{if("enabled"===e.connectionInheritance){const t=await(async e=>{const t=qo();if(t){const{validateOptions:n=(()=>!0)}=e,{identity:i,...r}=t;if(!await n(r))throw new Error("Parent options were rejected by validateOptions.");return t}})(e);if(t)return t}if(!e.options){const t="enabled"===e.connectionInheritance?"Broker URL was not specified nor provided by a platform container.":"Connection inheritance is disabled but no options were provided.";throw new Error(t)}return{...e.options,identity:Jo()}};exports.__classPrivateFieldGet=Lo,exports.__classPrivateFieldSet=To,exports.apiExposer=Gn,exports.commonjsGlobal=s,exports.connect=async t=>{try{Ro.log("Establishing connection",t);const{brokerUrl:n,identity:i,timeout:r,interopConfig:s}=await Yo(t),{workerPort:a,iframeBrokerPort:c}=await(async(e,t,n)=>{const{origin:i}=new URL(e),r=document.createElement("IFRAME");let s;r.style.display="none";try{return await new Promise(((a,c)=>{const d=e=>{if(e.source===r.contentWindow&&e.data?.topic===`ack-${jo}`){if(e.origin!==i)c(new Error(`Broker redirected to unexpected origin ${e.origin}, expected ${i}.`));else if(e.data.success){const[t,n]=e.ports;a({iframeBrokerPort:t,workerPort:n})}else c(new m(e.data));window.removeEventListener("message",d),clearTimeout(s)}};window.addEventListener("message",d),ko.log(`Connecting to broker ${e}`),r.setAttribute("src",e),r.setAttribute("name",o(t,"of-broker")),document.body.appendChild(r),ko.log("Iframe loaded, awaiting init message from iframe"),n&&(s=setTimeout((()=>{window.removeEventListener("message",d),document.body.removeChild(r),c(new Error("Worker did not initialize in time"))}),n))}))}catch(e){throw new Error(`Failed to initialise Fin Web Client. ${e.message}`,{cause:e})}})(n,i,r);Ro.log("Successfully established connection to shared worker");const d={entityType:"external connection",...i};a.start(),c.start();const h=((t,n,i)=>{const r=$o(n),o=new Ko(t),s=new Io(r,o,i);return s.connectSync(),window.Buffer=e.Buffer,new Wr(s)})(t,a,d);return s?.providerId&&(h.me.interop=h.Interop.connectSync(s.providerId),s?.currentContextGroup&&h.me.interop.joinContextGroup(s.currentContextGroup).catch((e=>{console.warn(`Error joining specified context group: ${s?.currentContextGroup}, continuing`,e)}))),{...h,me:{...h.me,identity:{uuid:h.me.uuid,name:h.me.name}}}}catch(e){throw new Error(`An error occured during web-interop connection: ${e.message}`)}},exports.decorators=Nn,exports.encodeOptions=o,exports.layout_constants=ai,exports.lazy=G; +var e=__webpack_require__(/*! buffer/ */ "../../node_modules/buffer/index.js"),t=__webpack_require__(/*! events */ "../../node_modules/events/events.js"),n=__webpack_require__(/*! lodash/cloneDeep */ "../../node_modules/lodash/cloneDeep.js"),i=__webpack_require__(/*! lodash/isEqual */ "../../node_modules/lodash/isEqual.js"),r=__webpack_require__(/*! uuid */ "../../node_modules/uuid/dist/esm-browser/index.js");const o=(e,t)=>`${t}<${btoa(JSON.stringify(e))}>`;var s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof __webpack_require__.g?__webpack_require__.g:"undefined"!=typeof self?self:{},a={},c={},d={},h={};async function l(e){const t=[];for(const n of e){const e=await n();t.push(e)}return t}Object.defineProperty(h,"__esModule",{value:!0}),h.promiseMapSerial=h.serial=h.promiseMap=h.promisify=void 0,h.promisify=function(e){return(...t)=>new Promise(((n,i)=>{e(...t,((e,t)=>e?i(e):n(t)))}))},h.promiseMap=async function(e,t){return Promise.all(e.map(t))},h.serial=l,h.promiseMapSerial=async function(e,t){return l(e.map(((e,n,i)=>()=>t(e,n,i))))};var u,p=s&&s.__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},w=s&&s.__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)};Object.defineProperty(d,"__esModule",{value:!0}),d.Reply=d.EmitterBase=d.Base=void 0;const y=h;class f{constructor(e){this.isNodeEnvironment=()=>"node"===this.wire.environment.type,this.isOpenFinEnvironment=()=>"openfin"===this.wire.environment.type,this.isBrowserEnvironment=()=>"other"===this.wire.environment.type,this.wire=e}get fin(){return this.wire.getFin()}get me(){return this.wire.me}}d.Base=f;d.EmitterBase=class extends f{constructor(e,t,...n){super(e),this.topic=t,u.set(this,void 0),this.eventNames=()=>this.hasEmitter()?this.getOrCreateEmitter().eventNames():[],this.emit=(e,t,...n)=>!!this.hasEmitter()&&this.getOrCreateEmitter().emit(e,t,...n),this.hasEmitter=()=>this.wire.eventAggregator.has(w(this,u,"f")),this.getOrCreateEmitter=()=>this.wire.eventAggregator.getOrCreate(w(this,u,"f")),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[],this.listenerCount=e=>this.hasEmitter()?this.getOrCreateEmitter().listenerCount(e):0,this.registerEventListener=async(e,t={},n,i)=>{const r={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e},o=this.getOrCreateEmitter();n(o);try{await this.wire.sendAction("subscribe-to-desktop-event",r)}catch(e){throw i(o),this.deleteEmitterIfNothingRegistered(o),e}},this.deregisterEventListener=async(e,t={})=>{if(this.hasEmitter()){const n={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e};await this.wire.sendAction("unsubscribe-to-desktop-event",n).catch((()=>null));return this.getOrCreateEmitter()}return Promise.resolve()},p(this,u,[t,...n],"f"),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[]}async on(e,t,n){return await this.registerEventListener(e,n,(n=>{n.on(e,t)}),(n=>{n.removeListener(e,t)})),this}async addListener(e,t,n){return this.on(e,t,n)}async once(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.once(e,i),n.once(e,t)}),(n=>{n.removeListener(e,i),n.removeListener(e,t)})),this}async prependListener(e,t,n){return await this.registerEventListener(e,n,(n=>{n.prependListener(e,t)}),(n=>{n.removeListener(e,t)})),this}async prependOnceListener(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.prependOnceListener(e,t),n.once(e,i)}),(n=>{n.removeListener(e,t),n.removeListener(e,i)})),this}async removeListener(e,t,n){const i=await this.deregisterEventListener(e,n);return i&&(i.removeListener(e,t),this.deleteEmitterIfNothingRegistered(i)),this}async deregisterAllListeners(e){const t={...this.identity,type:e,topic:this.topic};if(this.hasEmitter()){const e=this.getOrCreateEmitter(),n=e.listenerCount(t.type),i=[];for(let e=0;enull)));return await Promise.all(i),e}}async removeAllListeners(e){const t=async e=>{const t=await this.deregisterAllListeners(e);t&&(t.removeAllListeners(e),this.deleteEmitterIfNothingRegistered(t))};if(e)await t(e);else if(this.hasEmitter()){const e=this.getOrCreateEmitter().eventNames();await(0,y.promiseMap)(e,t)}return this}deleteEmitterIfNothingRegistered(e){0===e.eventNames().length&&this.wire.eventAggregator.delete(w(this,u,"f"))}},u=new WeakMap;d.Reply=class{};var g={};Object.defineProperty(g,"__esModule",{value:!0});var m=g.RuntimeError=g.NotSupportedError=g.NotImplementedError=g.NoAckError=g.DuplicateCorrelationError=g.UnexpectedActionError=g.DisconnectedError=void 0;class v extends Error{constructor(e){super(`Expected websocket state OPEN but found ${e}`),this.readyState=e}}g.DisconnectedError=v;class C extends Error{}g.UnexpectedActionError=C;class b extends Error{}g.DuplicateCorrelationError=b;class I extends Error{}g.NoAckError=I;class E extends Error{}g.NotImplementedError=E;class x extends Error{}g.NotSupportedError=x;class A extends Error{constructor(e){const{message:t,name:n,stack:i,...r}=e;super(t),this.name=n||"Error",this.stack=i??this.toString(),Object.keys(r).forEach((e=>{this[e]=r[e]}))}}class P extends Error{static getCallSite(e=0){const t=Error.stackTraceLimit,n=e+1;Error.stackTraceLimit=t+n;const i=Error.prepareStackTrace;Error.prepareStackTrace=(e,t)=>t;const r=(new Error).stack?.slice(n)??[];return Error.prepareStackTrace=i,Error.stackTraceLimit=t,r}static prepareStackTrace(e,t){if("function"==typeof Error.prepareStackTrace)return Error.prepareStackTrace(e,t);let n="";n+=e.name||"Error",n+=`: ${e.message||""}`;for(const e of t)n+=`\n at ${e.toString()}`;return n}constructor(e,t){const{reason:n,error:i}=e;super(n),this.name="RuntimeError",i?.stack&&(this.cause=new A(i)),t&&(this.stack=P.prepareStackTrace(this,t))}}m=g.RuntimeError=P;var M={},_={},O={};Object.defineProperty(O,"__esModule",{value:!0}),O.validateIdentity=void 0,O.validateIdentity=function(e){let t;return"object"==typeof e&&"string"==typeof e.uuid||(t="Not a valid identity object"),t};var S={},R={},F={},j={},k={},L={},T={};Object.defineProperty(T,"__esModule",{value:!0}),T.handleDeprecatedWarnings=void 0;var $;T.handleDeprecatedWarnings=e=>{(e.contentNavigation?.whitelist||e.contentNavigation?.blacklist||e.contentRedirect?.whitelist||e.contentRedirect?.blacklist)&&console.warn("The properties 'whitelist' and 'blacklist' have been marked as deprecated and will be removed in a future version. Please use 'allowlist' and 'denylist'.")};var B={},G={};Object.defineProperty(G,"__esModule",{value:!0}),G.AsyncRetryableLazy=W=G.Lazy=void 0;var W=G.Lazy=class{constructor(e){this.producerFn=e}getValue(){return this.value||(this.value=this.producerFn()),this.value}};G.AsyncRetryableLazy=class{constructor(e){this.producerFn=e}async getValue(){return this.promise||(this.promise=this.producerFn().catch((e=>{throw delete this.promise,e}))),this.promise}};var H={};Object.defineProperty(H,"__esModule",{value:!0}),H.WebContents=void 0;const N=d;class D extends N.EmitterBase{constructor(e,t,n){super(e,n,t.uuid,t.name),this.identity=t,this.entityType=n}capturePage(e){return this.wire.sendAction("capture-page",{options:e,...this.identity}).then((({payload:e})=>e.data))}executeJavaScript(e){return this.wire.sendAction("execute-javascript-in-window",{...this.identity,code:e}).then((({payload:e})=>e.data))}getZoomLevel(){return this.wire.sendAction("get-zoom-level",this.identity).then((({payload:e})=>e.data))}setZoomLevel(e){return this.wire.sendAction("set-zoom-level",{...this.identity,level:e}).then((()=>{}))}navigate(e){return this.wire.sendAction("navigate-window",{...this.identity,url:e}).then((()=>{}))}navigateBack(){return this.wire.sendAction("navigate-window-back",{...this.identity}).then((()=>{}))}async navigateForward(){await this.wire.sendAction("navigate-window-forward",{...this.identity})}stopNavigation(){return this.wire.sendAction("stop-window-navigation",{...this.identity}).then((()=>{}))}reload(e=!1){return this.wire.sendAction("reload-window",{ignoreCache:e,...this.identity}).then((()=>{}))}print(e={}){return this.wire.sendAction("print",{...this.identity,options:e}).then((()=>{}))}findInPage(e,t){return this.wire.sendAction("find-in-page",{...this.identity,searchTerm:e,options:t}).then((({payload:e})=>e.data))}stopFindInPage(e){return this.wire.sendAction("stop-find-in-page",{...this.identity,action:e}).then((()=>{}))}getPrinters(){return this.wire.sendAction("get-printers",{...this.identity}).then((({payload:e})=>e.data))}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){await this.wire.sendAction("focus-window",{emitSynthFocused:e,...this.identity})}async showDeveloperTools(){await this.wire.sendAction("show-developer-tools",this.identity)}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction("get-process-info",this.identity);return e}async getSharedWorkers(){return this.wire.sendAction("get-shared-workers",this.identity).then((({payload:e})=>e.data))}async inspectSharedWorker(){await this.wire.sendAction("inspect-shared-worker",{...this.identity})}async inspectSharedWorkerById(e){await this.wire.sendAction("inspect-shared-worker-by-id",{...this.identity,workerId:e})}async inspectServiceWorker(){await this.wire.sendAction("inspect-service-worker",{...this.identity})}async showPopupWindow(e){if(this.wire.sendAction(`${this.entityType}-show-popup-window`,this.identity).catch((()=>{})),e?.onPopupReady){const t=async({popupName:t})=>{try{const n=this.fin.Window.wrapSync({uuid:this.fin.me.uuid,name:t});await e.onPopupReady(n)}catch(e){throw new Error(`Something went wrong during onPopupReady execution: ${e}`)}};await this.once("popup-ready",t)}const{payload:t}=await this.wire.sendAction("try-create-popup-window",{options:{...e,hasResultCallback:!!e?.onPopupResult,hasReadyCallback:!!e?.onPopupReady},...this.identity}),{data:{willOpen:n,options:i}}=t;n&&await this.fin.Window.create(i.initialOptions);if(e?.onPopupResult){const t=async t=>{await e.onPopupResult((e=>{const{name:t,uuid:n,result:i,data:r}=e,o={identity:{name:t,uuid:n},result:i};return r&&(o.data=r),o})(t))},n=async()=>{await this.removeListener("popup-result",t)};await this.on("popup-result",t),await this.once("popup-teardown",n)}const{payload:r}=await this.wire.sendAction("show-popup-window",{options:i,...this.identity});return r.data}}var U,V,z,K,q;function J(){return V||(V=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(function(){if($)return L;$=1,Object.defineProperty(L,"__esModule",{value:!0}),L.ViewModule=void 0;const e=d,t=O,n=J(),i=T;class r extends e.Base{async create(e){const{uuid:t}=this.wire.me;if(!e.name||"string"!=typeof e.name)throw new Error("Please provide a name property as a string in order to create a View.");return(0,i.handleDeprecatedWarnings)(e),this.wire.environment.childViews?await this.wire.environment.createChildContent({entityType:"view",options:{...e,uuid:t}}):await this.wire.sendAction("create-view",{...e,uuid:t}),this.wrapSync({uuid:t,name:e.name})}async wrap(e){this.wire.sendAction("view-wrap").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}wrapSync(e){this.wire.sendAction("view-wrap-sync").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}getCurrent(){if(this.wire.sendAction("view-get-current").catch((e=>{})),!this.wire.me.isView)throw new Error("You are not in a View context");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction("view-get-current-sync").catch((e=>{})),!this.wire.me.isView)throw new Error("You are not in a View context");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return L.ViewModule=r,L}(),e),n(function(){if(U)return B;var e;U=1,Object.defineProperty(B,"__esModule",{value:!0}),B.View=void 0;const t=g,n=G,i=H,r=ie();class o extends i.WebContents{constructor(i,o){super(i,o,"view"),this.identity=o,e.set(this,new n.Lazy((()=>this.fin.Platform.wrapSync(this.identity).getClient()))),this.attach=async e=>{await this.wire.sendAction("attach-view",{target:e,...this.identity})},this.destroy=async()=>{await this.wire.sendAction("destroy-view",{...this.identity})},this.show=async()=>{await this.wire.sendAction("show-view",{...this.identity})},this.showAt=async(e,t={})=>{await this.wire.sendAction("show-view-at",{bounds:e,...this.identity,options:t})},this.bringToFront=async()=>{await this.wire.sendAction("bring-view-to-front",{...this.identity})},this.hide=async()=>{await this.wire.sendAction("hide-view",{...this.identity})},this.setBounds=async e=>{await this.wire.sendAction("set-view-bounds",{bounds:e,...this.identity})},this.getBounds=async()=>(await this.wire.sendAction("get-view-bounds",{...this.identity})).payload.data,this.getInfo=async()=>(await this.wire.sendAction("get-view-info",{...this.identity})).payload.data,this.getParentLayout=async()=>(this.wire.sendAction("view-get-parent-layout",{...this.identity}).catch((()=>{})),this.fin.Platform.Layout.getLayoutByViewIdentity(this.identity)),this.getOptions=async()=>this.wire.sendAction("get-view-options",{...this.identity}).then((({payload:e})=>e.data)),this.updateOptions=async e=>this.wire.sendAction("update-view-options",{options:e,...this.identity}).then((()=>{})),this.getCurrentWindow=async()=>{const{payload:{data:e}}=await this.wire.sendAction("get-view-window",{...this.identity});return new r._Window(this.wire,e)},this.getCurrentStack=async()=>{this.wire.sendAction("view-get-current-stack").catch((()=>{}));try{return(await this.getParentLayout()).getStackByViewIdentity(this.identity)}catch(e){throw new t.RuntimeError({reason:"This view does not belong to a stack.",error:e})}},this.triggerBeforeUnload=async()=>(await this.wire.sendAction("trigger-before-unload",{...this.identity})).payload.data,this.bindToElement=async e=>{if(!e)throw new Error("Element not found.");return this.wire.environment.observeBounds(e,(async e=>this.setBounds(e)))}}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){const t=await this.getCurrentWindow();await t.focusedWebViewWasChanged(),await super.focus({emitSynthFocused:e})}}return B.View=o,e=new WeakMap,B}(),e)}(k)),k}function Y(){if(z)return j;z=1,Object.defineProperty(j,"__esModule",{value:!0}),j.Application=void 0;const e=d,t=ie(),n=J();class i extends e.EmitterBase{constructor(e,n){super(e,"application",n.uuid),this.identity=n,this.window=new t._Window(this.wire,{uuid:this.identity.uuid,name:this.identity.uuid})}windowListFromIdentityList(e){const n=[];return e.forEach((e=>{n.push(new t._Window(this.wire,{uuid:e.uuid,name:e.name}))})),n}isRunning(){return this.wire.sendAction("is-application-running",this.identity).then((({payload:e})=>e.data))}async quit(e=!1){try{await this._close(e),await this.wire.sendAction("destroy-application",{force:e,...this.identity})}catch(e){if(!["Remote connection has closed","Could not locate the requested application"].some((t=>e.message.includes(t))))throw e}}async _close(e=!1){try{await this.wire.sendAction("close-application",{force:e,...this.identity})}catch(e){if(!e.message.includes("Remote connection has closed"))throw e}}close(e=!1){return console.warn("Deprecation Warning: Application.close is deprecated Please use Application.quit"),this.wire.sendAction("application-close",this.identity).catch((e=>{})),this._close(e)}getChildWindows(){return this.wire.sendAction("get-child-windows",this.identity).then((({payload:e})=>{const t=[];return e.data.forEach((e=>{t.push({uuid:this.identity.uuid,name:e})})),this.windowListFromIdentityList(t)}))}getManifest(){return this.wire.sendAction("get-application-manifest",this.identity).then((({payload:e})=>e.data))}getParentUuid(){return this.wire.sendAction("get-parent-application",this.identity).then((({payload:e})=>e.data))}getShortcuts(){return this.wire.sendAction("get-shortcuts",this.identity).then((({payload:e})=>e.data))}async getViews(){const{payload:e}=await this.wire.sendAction("application-get-views",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}getZoomLevel(){return this.wire.sendAction("get-application-zoom-level",this.identity).then((({payload:e})=>e.data))}getWindow(){return this.wire.sendAction("application-get-window",this.identity).catch((e=>{})),Promise.resolve(this.window)}registerUser(e,t){return this.wire.sendAction("register-user",{userName:e,appName:t,...this.identity}).then((()=>{}))}removeTrayIcon(){return this.wire.sendAction("remove-tray-icon",this.identity).then((()=>{}))}restart(){return this.wire.sendAction("restart-application",this.identity).then((()=>{}))}run(){return console.warn("Deprecation Warning: Application.run is deprecated Please use fin.Application.start"),this.wire.sendAction("application-run",this.identity).catch((e=>{})),this._run()}_run(e={}){return this.wire.sendAction("run-application",{manifestUrl:this._manifestUrl,opts:e,...this.identity}).then((()=>{}))}scheduleRestart(){return this.wire.sendAction("relaunch-on-close",this.identity).then((()=>{}))}async sendApplicationLog(){const{payload:e}=await this.wire.sendAction("send-application-log",this.identity);return e.data}async setJumpList(e){await this.wire.sendAction("set-jump-list",{config:e,...this.identity})}setTrayIcon(e){return this.wire.sendAction("set-tray-icon",{enabledIcon:e,...this.identity}).then((()=>{}))}setShortcuts(e){return this.wire.sendAction("set-shortcuts",{data:e,...this.identity}).then((()=>{}))}async setShortcutQueryParams(e){await this.wire.sendAction("set-shortcut-query-args",{data:e,...this.identity})}setZoomLevel(e){return this.wire.sendAction("set-application-zoom-level",{level:e,...this.identity}).then((()=>{}))}async setAppLogUsername(e){await this.wire.sendAction("set-app-log-username",{data:e,...this.identity})}getTrayIconInfo(){return this.wire.sendAction("get-tray-icon-info",this.identity).then((({payload:e})=>e.data))}hasTrayIcon(){return this.wire.sendAction("has-tray-icon",this.identity).then((({payload:e})=>e.data))}terminate(){return this.wire.sendAction("terminate-application",this.identity).then((()=>{}))}wait(){return this.wire.sendAction("wait-for-hung-application",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction("get-info",this.identity).then((({payload:e})=>e.data))}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction("application-get-process-info",this.identity);return e}async setFileDownloadLocation(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t};await this.wire.sendAction("set-file-download-location",{...n,downloadLocation:e})}async getFileDownloadLocation(){const{payload:{data:e}}=await this.wire.sendAction("get-file-download-location",this.identity);return e}async showTrayIconPopupMenu(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t},{payload:i}=await this.wire.sendAction("show-tray-icon-popup-menu",{...n,options:e});return i.data}async closeTrayIconPopupMenu(){const{name:e}=this.wire.me,t={uuid:this.identity.uuid,name:e};await this.wire.sendAction("close-tray-icon-popup-menu",{...t})}}return j.Application=i,j}function Z(){return q||(q=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(function(){if(K)return F;K=1,Object.defineProperty(F,"__esModule",{value:!0}),F.ApplicationModule=void 0;const e=d,t=O,n=Y();class i extends e.Base{async wrap(e){this.wire.sendAction("wrap-application").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}wrapSync(e){this.wire.sendAction("wrap-application-sync").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}async _create(e){return void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&void 0===e.isPlatformController&&(e.autoShow=!0),await this.wire.sendAction("create-application",e),this.wrap({uuid:e.uuid})}create(e){return console.warn("Deprecation Warning: fin.Application.create is deprecated. Please use fin.Application.start"),this.wire.sendAction("application-create").catch((e=>{})),this._create(e)}async start(e){this.wire.sendAction("start-application").catch((e=>{}));const t=await this._create(e);return await this.wire.sendAction("run-application",{uuid:e.uuid}),t}async startManyManifests(e,t){return this.wire.sendAction("run-applications",{applications:e,opts:t}).then((()=>{}))}getCurrent(){return this.wire.sendAction("get-current-application").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction("get-current-application-sync").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}async startFromManifest(e,t){this.wire.sendAction("application-start-from-manifest").catch((e=>{}));const n=await this._createFromManifest(e);return await n._run(t),n}createFromManifest(e){return console.warn("Deprecation Warning: fin.Application.createFromManifest is deprecated. Please use fin.Application.startFromManifest"),this.wire.sendAction("application-create-from-manifest").catch((e=>{})),this._createFromManifest(e)}_createFromManifest(e){return this.wire.sendAction("get-application-manifest",{manifestUrl:e}).then((({payload:e})=>{const t=e.data.platform?e.data.platform.uuid:e.data.startup_app.uuid;return this.wrap({uuid:t})})).then((t=>(t._manifestUrl=e,t)))}}return F.ApplicationModule=i,F}(),e),n(Y(),e)}(R)),R}H.WebContents=D;var Q={};Object.defineProperty(Q,"__esModule",{value:!0}),Q.promisifySubscription=void 0;var X,ee,te;function ne(){if(X)return S;X=1,Object.defineProperty(S,"__esModule",{value:!0}),S._Window=void 0;const e=Z(),t=H,n=J(),i=T,r=Q;class o extends t.WebContents{constructor(e,t){super(e,t,"window")}async createWindow(e){this.wire.sendAction("window-create-window",this.identity).catch((e=>{}));const t=await(0,r.promisifySubscription)(this,"fire-constructor-callback");void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&(e.autoShow=!0),(0,i.handleDeprecatedWarnings)(e);const n=this.wire.environment.createChildContent({entityType:"window",options:e}),[o]=await Promise.all([t.getValue(),n]);let s;const{success:a}=o,c=o.data,{message:d}=c;s=a?{httpResponseCode:c.httpResponseCode,apiInjected:c.apiInjected}:{message:c.message,networkErrorCode:c.networkErrorCode,stack:c.stack};const h={message:d,cbPayload:s,success:a};try{this.getWebWindow().fin.__internal_.openerSuccessCBCalled()}catch(e){}return h.success?this:Promise.reject(h)}getAllFrames(){return this.wire.sendAction("get-all-frames",this.identity).then((({payload:e})=>e.data))}getBounds(){return this.wire.sendAction("get-window-bounds",this.identity).then((({payload:e})=>e.data))}center(){return this.wire.sendAction("center-window",this.identity).then((()=>{}))}blur(){return this.wire.sendAction("blur-window",this.identity).then((()=>{}))}bringToFront(){return this.wire.sendAction("bring-window-to-front",this.identity).then((()=>{}))}animate(e,t){return this.wire.sendAction("animate-window",{transitions:e,options:t,...this.identity}).then((()=>{}))}hide(){return this.wire.sendAction("hide-window",this.identity).then((()=>{}))}close(e=!1){return this.wire.sendAction("close-window",{force:e,...this.identity}).then((()=>{Object.setPrototypeOf(this,null)}))}focusedWebViewWasChanged(){return this.wire.sendAction("focused-webview-changed",this.identity).then((()=>{}))}getNativeId(){return this.wire.sendAction("get-window-native-id",this.identity).then((({payload:e})=>e.data))}async getCurrentViews(){const{payload:e}=await this.wire.sendAction("window-get-views",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}disableFrame(){return console.warn("Function is deprecated; use disableUserMovement instead."),this.wire.sendAction("disable-window-frame",this.identity).then((()=>{}))}disableUserMovement(){return this.wire.sendAction("disable-window-frame",this.identity).then((()=>{}))}enableFrame(){return console.warn("Function is deprecated; use enableUserMovement instead."),this.wire.sendAction("enable-window-frame",this.identity).then((()=>{}))}enableUserMovement(){return this.wire.sendAction("enable-window-frame",this.identity).then((()=>{}))}flash(){return this.wire.sendAction("flash-window",this.identity).then((()=>{}))}stopFlashing(){return this.wire.sendAction("stop-flash-window",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction("get-window-info",this.identity).then((({payload:e})=>e.data))}async getLayout(e){this.wire.sendAction("window-get-layout",this.identity).catch((e=>{}));const t=await this.getOptions();if(!t.layout&&!t.layoutSnapshot)throw new Error("Window does not have a Layout");return this.fin.Platform.Layout.wrap(e??this.identity)}getOptions(){return this.wire.sendAction("get-window-options",this.identity).then((({payload:e})=>e.data))}getParentApplication(){return this.wire.sendAction("window-get-parent-application",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity))}getParentWindow(){return this.wire.sendAction("window-get-parent-window",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity)).then((e=>e.getWindow()))}async getSnapshot(e){const t={area:e,...this.identity};console.warn("Window.getSnapshot has been deprecated, please use Window.capturePage");return(await this.wire.sendAction("get-window-snapshot",t)).payload.data}getState(){return this.wire.sendAction("get-window-state",this.identity).then((({payload:e})=>e.data))}getWebWindow(){return this.wire.sendAction("window-get-web-window",this.identity).catch((e=>{})),this.wire.environment.getWebWindow(this.identity)}isMainWindow(){return this.wire.sendAction("window-is-main-window",this.identity).catch((e=>{})),this.me.uuid===this.me.name}isShowing(){return this.wire.sendAction("is-window-showing",this.identity).then((({payload:e})=>e.data))}maximize(){return this.wire.sendAction("maximize-window",this.identity).then((()=>{}))}minimize(){return this.wire.sendAction("minimize-window",this.identity).then((()=>{}))}moveBy(e,t,n){return this.wire.sendAction("move-window-by",{deltaLeft:e,deltaTop:t,positioningOptions:n,...this.identity}).then((()=>{}))}moveTo(e,t,n){return this.wire.sendAction("move-window",{left:e,top:t,positioningOptions:n,...this.identity}).then((()=>{}))}resizeBy(e,t,n,i){return this.wire.sendAction("resize-window-by",{deltaWidth:Math.floor(e),deltaHeight:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}resizeTo(e,t,n,i){return this.wire.sendAction("resize-window",{width:Math.floor(e),height:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}restore(){return this.wire.sendAction("restore-window",this.identity).then((()=>{}))}setAsForeground(){return this.wire.sendAction("set-foreground-window",this.identity).then((()=>{}))}setBounds(e,t){return this.wire.sendAction("set-window-bounds",{...e,...this.identity,positioningOptions:t}).then((()=>{}))}show(e=!1){return this.wire.sendAction("show-window",{force:e,...this.identity}).then((()=>{}))}showAt(e,t,n=!1){return this.wire.sendAction("show-at-window",{force:n,left:Math.floor(e),top:Math.floor(t),...this.identity}).then((()=>{}))}updateOptions(e){return this.wire.sendAction("update-window-options",{options:e,...this.identity}).then((()=>{}))}authenticate(e,t){return this.wire.sendAction("window-authenticate",{userName:e,password:t,...this.identity}).then((()=>{}))}async showPopupMenu(e){const{payload:t}=await this.wire.sendAction("show-popup-menu",{options:e,...this.identity});return t.data}async closePopupMenu(){return this.wire.sendAction("close-popup-menu",{...this.identity}).then((()=>{}))}async dispatchPopupResult(e){this.wire.sendAction("window-dispatch-popup-result",this.identity).catch((e=>{})),await this.wire.sendAction("dispatch-popup-result",{data:e,...this.identity})}async print(e={content:"self"}){switch(e.content){case void 0:case"self":return super.print(e);case"screenshot":return this.wire.sendAction("print-screenshot",this.identity).then((()=>{}));case"views":return this.wire.sendAction("print-views",{...this.identity,options:e}).then((()=>{}));default:return}}}return S._Window=o,S}function ie(){return te||(te=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(function(){if(ee)return _;ee=1,Object.defineProperty(_,"__esModule",{value:!0}),_._WindowModule=void 0;const e=d,t=O,n=ne();class i extends e.Base{async wrap(e){this.wire.sendAction("window-wrap").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}wrapSync(e){this.wire.sendAction("window-wrap-sync").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}create(e){return this.wire.sendAction("create-window").catch((e=>{})),new n._Window(this.wire,{uuid:this.me.uuid,name:e.name}).createWindow(e)}getCurrent(){if(this.wire.sendAction("get-current-window").catch((e=>{})),!this.wire.me.isWindow)throw new Error("You are not in a Window context");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction("get-current-window-sync").catch((e=>{})),!this.wire.me.isWindow)throw new Error("You are not in a Window context");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return _._WindowModule=i,_}(),e),n(ne(),e)}(M)),M}Q.promisifySubscription=async(e,t,n=(()=>!0),i)=>{let r,o,s;const a=new Promise(((e,t)=>{r=e,o=t})),c=e=>{n(e)&&(clearTimeout(s),r(e))};return await e.on(t,c),i&&(s=setTimeout((()=>o(new Error("event timed out"))),i)),a.finally((()=>{e.removeListener(t,c).catch((()=>null))})),{getValue:()=>a}},Object.defineProperty(c,"__esModule",{value:!0}),c.System=void 0;const re=d,oe=g,se=ie(),ae=t;class ce extends re.EmitterBase{constructor(e){super(e,"system")}sendExternalProcessRequest(e,t){return new Promise(((n,i)=>{const r="external-process-exited";let o,s,a,c;"function"==typeof t.listener&&(a=e=>{const n=e||{};s={topic:"exited",uuid:n.processUuid||"",exitCode:n.exitCode||0},o===e.processUuid&&(t.listener(s),c.removeListener(r,a))},this.wire.me.name||(this.wire.me.name=this.wire.me.uuid),c=new se._Window(this.wire,this.wire.me),c.on(r,a)),this.wire.sendAction(e,t).then((({payload:e})=>{o=e.data.uuid,n(e.data),s&&o===s.uuid&&(t.listener(s),c.removeListener(r,a))})).catch((e=>{c&&c.removeListener(r,a),i(e)}))}))}getVersion(){return this.wire.sendAction("get-version").then((({payload:e})=>e.data))}clearCache(e){return this.wire.sendAction("clear-cache",e).then((()=>{}))}deleteCacheOnExit(){return this.wire.sendAction("delete-cache-request").then((()=>{}))}exit(){return this.wire.sendAction("exit-desktop").then((()=>{}))}async fetchManifest(e){const{payload:{data:t}}=await this.wire.sendAction("fetch-manifest",{manifestUrl:e});return t}flushCookieStore(){return this.wire.sendAction("flush-cookie-store").then((()=>{}))}getAllWindows(){return this.wire.sendAction("get-all-windows").then((({payload:e})=>e.data))}getAllApplications(){return this.wire.sendAction("get-all-applications").then((({payload:e})=>e.data))}getCommandLineArguments(){return this.wire.sendAction("get-command-line-arguments").then((({payload:e})=>e.data))}async getCrashReporterState(){const{payload:{data:{diagnosticMode:e,isRunning:t}}}=await this.wire.sendAction("get-crash-reporter-state");return console.warn("diagnosticMode property is deprecated. It will be removed in a future version"),{diagnosticMode:e,diagnosticsMode:e,isRunning:t}}async startCrashReporter(e){const t=e,n={...t,diagnosticMode:t.diagnosticsMode||t.diagnosticMode},{payload:{data:{diagnosticMode:i,isRunning:r}}}=await this.wire.sendAction("start-crash-reporter",n);return{diagnosticMode:i,diagnosticsMode:i,isRunning:r}}getUniqueUserId(){return this.wire.sendAction("get-unique-user-id").then((({payload:e})=>e.data))}getEntityInfo(e,t){return this.wire.sendAction("get-entity-info",{uuid:e,name:t}).then((({payload:e})=>e.data))}getEnvironmentVariable(e){return this.wire.sendAction("get-environment-variable",{environmentVariables:e}).then((({payload:e})=>e.data))}getFocusedWindow(){return this.wire.sendAction("get-focused-window").then((({payload:e})=>e.data))}async isAppCertified(e){const{payload:{data:{certifiedInfo:t}}}=await this.wire.sendAction("is-app-certified",{manifestUrl:e});return t}getInstalledRuntimes(){return this.wire.sendAction("get-installed-runtimes").then((({payload:e})=>e.data.runtimes))}async getInstalledApps(){const{payload:{data:{installedApps:e}}}=await this.wire.sendAction("get-installed-apps");return e}getLog(e){return this.wire.sendAction("view-log",e).then((({payload:e})=>e.data))}getMachineId(){return this.wire.sendAction("get-machine-id").then((({payload:e})=>e.data))}getMinLogLevel(){return this.wire.sendAction("get-min-log-level").then((({payload:e})=>e.data))}getLogList(){return this.wire.sendAction("list-logs").then((({payload:e})=>e.data))}getMonitorInfo(){return this.wire.sendAction("get-monitor-info").then((({payload:e})=>e.data))}getMousePosition(){return this.wire.sendAction("get-mouse-position").then((({payload:e})=>e.data))}getProcessList(){return console.warn("System.getProcessList has been deprecated. Please consider using our new process APIs: Window.getProcessInfo, View.getProcessInfo, Application.getProcessInfo, System.getAllProcessInfo"),this.wire.sendAction("process-snapshot").then((({payload:e})=>e.data))}async getAllProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction("get-all-process-info",this.identity);return e}getProxySettings(){return this.wire.sendAction("get-proxy-settings").then((({payload:e})=>e.data))}getRuntimeInfo(){return this.wire.sendAction("get-runtime-info").then((({payload:e})=>e.data))}getRvmInfo(){return this.wire.sendAction("get-rvm-info").then((({payload:e})=>e.data))}getHostSpecs(){return this.wire.sendAction("get-host-specs").then((({payload:e})=>e.data))}getOSInfo(){return this.wire.sendAction("get-os-info").then((({payload:e})=>e.data))}launchExternalProcess(e){return this.sendExternalProcessRequest("launch-external-process",e)}monitorExternalProcess(e){return this.sendExternalProcessRequest("monitor-external-process",e)}log(e,t){return this.wire.sendAction("write-to-log",{level:e,message:t}).then((()=>{}))}openUrlWithBrowser(e){return this.wire.sendAction("open-url-with-browser",{url:e}).then((()=>{}))}async registerCustomProtocol(e){if("object"!=typeof e)throw new Error("Must provide an object with a `protocolName` property having a string value.");await this.wire.sendAction("register-custom-protocol",e)}async unregisterCustomProtocol(e){await this.wire.sendAction("unregister-custom-protocol",{protocolName:e})}async getCustomProtocolState(e){return this.wire.sendAction("get-custom-protocol-state",{protocolName:e}).then((({payload:e})=>e.data))}releaseExternalProcess(e){return this.wire.sendAction("release-external-process",{uuid:e}).then((()=>{}))}showDeveloperTools(e){return this.wire.sendAction("show-developer-tools",e).then((()=>{}))}terminateExternalProcess(e){return this.wire.sendAction("terminate-external-process",e).then((()=>{}))}updateProxySettings(e){return this.wire.sendAction("update-proxy",e).then((()=>{}))}async downloadAsset(e,t){const n=()=>{};let i=n,r=n;const o=new Promise(((e,t)=>{i=e,r=t}));if("openfin"!==this.wire.environment.type)throw new oe.NotSupportedError("downloadAsset only supported in an OpenFin Render process");const s=oe.RuntimeError.getCallSite(),a=this.wire.environment.getNextMessageId().toString(),c=`asset-download-progress-${a}`,d=`asset-download-error-${a}`,h=`asset-download-complete-${a}`,l=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},u=()=>{this.removeListener(c,l)};await Promise.all([this.on(c,l),this.once(d,(e=>{u();const{reason:t,err:n}=e;r(new oe.RuntimeError({reason:t,error:n},s))})),this.once(h,(()=>{u(),i()}))]);const p=Object.assign(e,{downloadId:a});return await this.wire.sendAction("download-asset",p).catch((e=>{throw u(),e})),o}downloadRuntime(e,t){const n=oe.RuntimeError.getCallSite();return new Promise(((i,r)=>{if("openfin"!==this.wire.environment.type)return void r(new oe.NotSupportedError("downloadRuntime only supported in an OpenFin Render process"));const o=this.wire.environment.getNextMessageId().toString(),s=`runtime-download-progress-${o}`,a=`runtime-download-error-${o}`,c=`runtime-download-complete-${o}`,d=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},h=()=>{this.removeListener(s,d)};this.on(s,d),this.once(a,(e=>{h();const{reason:t,err:i}=e;r(new oe.RuntimeError({reason:t,error:i},n))})),this.once(c,(()=>{h(),i()}));const l=Object.assign(e,{downloadId:o});this.wire.sendAction("download-runtime",l).catch((e=>{h(),r(e)}))}))}downloadPreloadScripts(e){return this.wire.sendAction("download-preload-scripts",{scripts:e}).then((({payload:e})=>e.data))}getAllExternalApplications(){return this.wire.sendAction("get-all-external-applications").then((({payload:e})=>e.data))}getAppAssetInfo(e){return this.wire.sendAction("get-app-asset-info",e).then((({payload:e})=>e.data))}getCookies(e){const t=this.wire.environment.getUrl(),n=Object.assign(e,{url:t});return this.wire.sendAction("get-cookies",n).then((({payload:e})=>e.data))}setMinLogLevel(e){return this.wire.sendAction("set-min-log-level",{level:e}).then((()=>{}))}resolveUuid(e){return this.wire.sendAction("resolve-uuid",{entityKey:e}).then((({payload:e})=>e.data))}executeOnRemote(e,t){return t.requestingIdentity=e,this.wire.ferryAction(t)}readRegistryValue(e,t,n){return this.wire.sendAction("read-registry-value",{rootKey:e,subkey:t,value:n}).then((({payload:e})=>e.data))}registerExternalConnection(e){return this.wire.sendAction("register-external-connection",{uuid:e}).then((({payload:e})=>e.data))}async getServiceConfiguration(e){if("string"!=typeof e.name)throw new Error("Must provide an object with a `name` property having a string value");const{name:t}=e;return this.wire.sendAction("get-service-configuration",{name:t}).then((({payload:e})=>e.data))}async getSystemAppConfig(e){if("string"!=typeof e)throw new Error("Must provide a string value for name of system app");return this.wire.sendAction("get-system-app-configuration",{name:e}).then((({payload:e})=>e.data))}async registerShutdownHandler(e){this.wire.sendAction("system-register-shutdown-handler").catch((e=>{}));const{uuid:t,name:n}=this.wire.me;this.on("system-shutdown",(i=>{e({proceed:()=>{this.wire.environment.raiseEvent("application/system-shutdown-handled",{uuid:t,name:n,topic:"application"})}})}))}runRvmHealthCheck(){return this.wire.sendAction("run-rvm-health-check").then((({payload:e})=>e.data))}async launchManifest(e,t={}){const{subscribe:n,...i}=t,r=i;if(n){const e=new ae.EventEmitter;n(e);const t="app-version-progress",i="runtime-status",o="app-version-complete",s="app-version-error",a=this.wire.environment.getNextMessageId().toString();r.appVersionId=a;const c=[o,t,i,s],d=e=>{const{appVersionId:t,topic:n,type:i,...r}=e;return{...r,type:c.find((e=>i.includes(e)))}},h=t=>{const n=d(t);e.emit(n.type,n)},l=()=>{this.removeListener(`${t}.${a}`,h),this.removeListener(`${i}.${a}`,h),this.removeListener(`${o}.${a}`,h),this.removeListener(`${s}.${a}`,h),this.removeListener(`${o}.${a}`,l),this.removeListener(`${s}.${a}`,l)};await Promise.all([this.on(`${t}.${a}`,h),this.on(`${i}.${a}`,h),this.once(`${o}.${a}`,h),this.once(`${s}.${a}`,h),this.once(`${o}.${a}`,l),this.once(`${s}.${a}`,l)])}return(await this.wire.sendAction("launch-manifest",{manifestUrl:e,opts:r})).payload.data.manifest}async queryPermissionForCurrentContext(e){const t={uuid:this.wire.me.uuid,name:this.wire.me.name};return(await this.wire.sendAction("query-permission-for-current-context",{apiName:e,identity:t})).payload.data}async enableNativeWindowIntegrationProvider(e){const{payload:t}=await this.wire.sendAction("enable-native-window-integration-provider",{permissions:e});return t.data}async registerUsage({data:e,type:t}){await this.wire.sendAction("register-usage",{data:e,type:t})}async getPrinters(){const{payload:e}=await this.wire.sendAction("system-get-printers");return e.data}async updateProcessLoggingOptions(e){await this.wire.sendAction("system-update-process-logging-options",{options:e})}async getDomainSettings(){const{payload:{data:e}}=await this.wire.sendAction("get-domain-settings",this.identity);return e}async setDomainSettings(e){await this.wire.sendAction("set-domain-settings",{domainSettings:e,...this.identity})}async refreshExtensions(){const{payload:e}=await this.wire.sendAction("refresh-extensions");return e.data}async getInstalledExtensions(){const{payload:e}=await this.wire.sendAction("get-installed-extensions");return e.data}}c.System=ce;var de={},he={};Object.defineProperty(he,"__esModule",{value:!0}),he.RefCounter=void 0;he.RefCounter=class{constructor(){this.topicRefMap=new Map}incRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t+1;n=i,this.topicRefMap.set(e,i)}else this.topicRefMap.set(e,1),n=1;return n}decRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t-1;this.topicRefMap.set(e,i),n=i}else n=-1;return n}actOnFirst(e,t,n){return 1===this.incRefCount(e)?t():n()}actOnLast(e,t,n){return 0===this.decRefCount(e)?t():n()}};var le={},ue={},pe={};Object.defineProperty(pe,"__esModule",{value:!0}),pe.ChannelBase=pe.ProtectedItems=void 0;const we=e=>async(t,n,i)=>{const r=await e(t,n,i);return void 0===r?n:r};pe.ProtectedItems=class{constructor(e,t){this.providerIdentity=e,this.close=t}};class ye{static defaultAction(e){throw new Error(`No action registered at target for ${e}`)}constructor(){this.subscriptions=new Map}async processAction(e,t,n){try{const i=this.subscriptions.has(e)?this.subscriptions.get(e):(t,n)=>(this.defaultAction??ye.defaultAction)(e,t,n),r=this.preAction?await this.preAction(e,t,n):t,o=await i(r,n);return this.postAction?await this.postAction(e,o,n):o}catch(t){if(this.errorMiddleware)return this.errorMiddleware(e,t,n);throw t}}beforeAction(e){if(this.preAction)throw new Error("Already registered beforeAction middleware");this.preAction=we(e)}onError(e){if(this.errorMiddleware)throw new Error("Already registered error middleware");this.errorMiddleware=e}afterAction(e){if(this.postAction)throw new Error("Already registered afterAction middleware");this.postAction=we(e)}remove(e){this.subscriptions.delete(e)}setDefaultAction(e){if(this.defaultAction)throw new Error("default action can only be set once");this.defaultAction=e}register(e,t){if(this.subscriptions.has(e))throw new Error(`Subscription already registered for action: ${e}. Unsubscribe before adding new subscription`);return this.subscriptions.set(e,t),!0}}pe.ChannelBase=ye;var fe,ge,me,ve=s&&s.__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)},Ce=s&&s.__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};Object.defineProperty(ue,"__esModule",{value:!0}),ue.ChannelClient=void 0;const be=pe,Ie=new Map;class Ee extends be.ChannelBase{static closeChannelByEndpointId(e){const t=Ie.get(e);t&&ve(t,me,"f").call(t)}static handleProviderDisconnect(e){for(const t of Ie.values())t.providerIdentity.channelId===e.channelId&&(t.disconnectListener(e),ve(t,me,"f").call(t))}constructor(e,t,n){super(),fe.set(this,void 0),ge.set(this,void 0),this.processAction=(e,t,n)=>super.processAction(e,t,n),me.set(this,(()=>{Ie.delete(this.endpointId),ve(this,ge,"f").close()})),Ce(this,fe,new be.ProtectedItems(e,t),"f"),this.disconnectListener=()=>{},this.endpointId=e.endpointId,Ce(this,ge,n,"f"),Ie.set(this.endpointId,this),n.receive(this.processAction)}get providerIdentity(){return ve(this,fe,"f").providerIdentity}async dispatch(e,t){if(ve(this,ge,"f").isEndpointConnected(this.providerIdentity.channelId))return ve(this,ge,"f").send(this.providerIdentity.channelId,e,t);throw new Error("The client you are trying to dispatch from is disconnected from the target provider.")}onDisconnection(e){this.disconnectListener=t=>{try{e(t)}catch(e){throw new Error(`Error while calling the onDisconnection callback: ${e.message}`)}finally{this.disconnectListener=()=>{}}}}async disconnect(){await this.sendDisconnectAction(),ve(this,me,"f").call(this)}async sendDisconnectAction(){const e=ve(this,fe,"f");await e.close()}static async wireClose(e,t,n){const{channelName:i,uuid:r,name:o}=t;await e.sendAction("disconnect-from-channel",{channelName:i,uuid:r,name:o,endpointId:n})}}ue.ChannelClient=Ee,fe=new WeakMap,ge=new WeakMap,me=new WeakMap;var xe={},Ae={};Object.defineProperty(Ae,"__esModule",{value:!0}),Ae.exhaustiveCheck=void 0,Ae.exhaustiveCheck=function(e,t){throw new Error(`Unsupported value: ${e}${t?`\n Supported values are: ${t.join("")}`:""}`)};var Pe,Me,_e,Oe={},Se=s&&s.__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},Re=s&&s.__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)};Object.defineProperty(Oe,"__esModule",{value:!0}),Oe.ClassicInfo=Oe.ClassicStrategy=void 0;Oe.ClassicStrategy=class{constructor(e,t,n,i){this.messageReceiver=t,this.endpointId=n,this.providerIdentity=i,Pe.set(this,void 0),Me.set(this,new Map),_e.set(this,new Map),this.send=async(e,t,n)=>{const i=Re(this,Me,"f").get(e);if(!i)throw new Error(`Could not locate routing info for endpoint ${e}`);const r={...i};r.isLocalEndpointId&&delete r.endpointId,delete r.isLocalEndpointId;const o=Re(this,Pe,"f").sendAction("send-channel-message",{...r,providerIdentity:this.providerIdentity,action:t,payload:n});Re(this,_e,"f").get(e)?.add(o);return(await o.catch((e=>{throw new Error(e.message)})).finally((()=>{Re(this,_e,"f").get(e)?.delete(o)}))).payload.data.result},this.close=async()=>{this.messageReceiver.removeEndpoint(this.providerIdentity.channelId,this.endpointId),[...Re(this,Me,"f").keys()].forEach((e=>this.closeEndpoint(e))),Se(this,Me,new Map,"f")},Se(this,Pe,e,"f")}onEndpointDisconnect(e,t){}receive(e){this.messageReceiver.addEndpoint(e,this.providerIdentity.channelId,this.endpointId)}async closeEndpoint(e){const t=Re(this,Me,"f").get(e);Re(this,Me,"f").delete(e);const n=Re(this,_e,"f").get(e);n?.forEach((n=>{const i=`Channel connection with identity uuid: ${t?.uuid} / name: ${t?.name} / endpointId: ${e} no longer connected.`;n.cancel(new Error(i))}))}isEndpointConnected(e){return Re(this,Me,"f").has(e)}addEndpoint(e,t){Re(this,Me,"f").set(e,t.endpointIdentity),Re(this,_e,"f").set(e,new Set)}isValidEndpointPayload(e){return"string"==typeof e?.endpointIdentity?.endpointId||"string"==typeof e?.endpointIdentity?.channelId}},Pe=new WeakMap,Me=new WeakMap,_e=new WeakMap,Oe.ClassicInfo={version:5,minimumVersion:0,type:"classic"};var Fe={},je={},ke={};Object.defineProperty(ke,"__esModule",{value:!0}),ke.errorToPOJO=void 0,ke.errorToPOJO=function(e){return{stack:e.stack,name:e.name,message:e.message,toString:()=>e.stack||e.toString()}};var Le,Te,$e=s&&s.__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)},Be=s&&s.__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};Object.defineProperty(je,"__esModule",{value:!0}),je.RTCEndpoint=void 0;const Ge=ke;je.RTCEndpoint=class{static isValidEndpointPayload(e){const t=e=>"object"==typeof e&&null!==e;return t(e)&&t(e.endpointIdentity)&&t(e.rtc)&&"string"==typeof e.endpointIdentity.endpointId}constructor({rtc:e,endpointIdentity:t}){this.responseMap=new Map,Le.set(this,null),Te.set(this,void 0),this.connectionStateChangeHandler=e=>{"connected"!==this.rtc.rtcClient.connectionState&&(this.rtc.rtcClient.removeEventListener("connectionstatechange",this.connectionStateChangeHandler),this.close(),$e(this,Te,"f")&&$e(this,Te,"f").call(this))},this.send=async(e,t)=>{const n=`message-${Math.random()}`,i=new Promise(((e,t)=>{this.responseMap.set(n,{resolve:e,reject:t})}));return this.rtc.channels.request.send(JSON.stringify({action:e,payload:t,messageId:n})),i},this.close=()=>{this.responseMap.forEach((e=>e.reject("Connection has closed."))),this.responseMap=new Map,this.rtc.channels.request.close(),this.rtc.channels.response.close(),this.rtc.rtcClient.close()},this.rtc=e,this.endpointIdentity=t,this.rtc.channels.response.addEventListener("message",(e=>{let{data:t}=e;e.data instanceof ArrayBuffer&&(t=(new TextDecoder).decode(e.data));const{messageId:n,payload:i,success:r,error:o}=JSON.parse(t),{resolve:s,reject:a}=this.responseMap.get(n)??{};s&&a?(this.responseMap.delete(n),r?s(i):a(o)):(console.log("Could not find id in responseMap."),console.log(e))})),this.rtc.channels.request.addEventListener("message",(async e=>{let{data:n}=e;e.data instanceof ArrayBuffer&&(n=(new TextDecoder).decode(e.data));const{messageId:i,action:r,payload:o}=JSON.parse(n);if($e(this,Le,"f"))try{const e=await $e(this,Le,"f").call(this,r,o,t);this.rtc.channels.response.send(JSON.stringify({messageId:i,payload:e,success:!0}))}catch(e){"open"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,error:(0,Ge.errorToPOJO)(e),success:!1}))}else"open"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,success:!1,error:"Connection not ready."}))})),this.rtc.rtcClient.addEventListener("connectionstatechange",this.connectionStateChangeHandler),Object.values(this.rtc.channels).forEach((e=>{e.onclose=e=>{[...this.responseMap.values()].forEach((e=>e.reject(new Error("RTCDataChannel closed unexpectedly, this is most commonly caused by message size. Note: RTC Channels have a message size limit of ~255kB.")))),this.close(),$e(this,Te,"f")&&$e(this,Te,"f").call(this)}}))}onDisconnect(e){if($e(this,Te,"f"))throw new Error("RTCEndpoint disconnectListener cannot be set twice.");Be(this,Te,e,"f")}receive(e){if($e(this,Le,"f"))throw new Error("You have already set a listener for this RTC Endpoint.");Be(this,Le,e,"f")}get connected(){return"connected"===this.rtc.rtcClient.connectionState}},Le=new WeakMap,Te=new WeakMap;var We,He,Ne,De={},Ue=s&&s.__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)},Ve=s&&s.__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};Object.defineProperty(De,"__esModule",{value:!0}),De.EndpointStrategy=void 0;De.EndpointStrategy=class{constructor(e,t,n){this.EndpointType=e,this.StrategyName=n,We.set(this,null),He.set(this,new Map),Ne.set(this,!0),this.send=async(e,t,n)=>this.getEndpointById(e).send(t,n),this.close=async()=>{Ue(this,Ne,"f")&&(Ue(this,He,"f").forEach((e=>e.close())),Ve(this,He,new Map,"f")),Ve(this,Ne,!1,"f")},this.isValidEndpointPayload=t}onEndpointDisconnect(e,t){this.getEndpointById(e).onDisconnect(t)}receive(e){if(Ue(this,We,"f"))throw new Error(`You have already set a listener for this ${this.StrategyName} Strategy`);Ve(this,We,e,"f"),Ue(this,He,"f").forEach((e=>e.receive(Ue(this,We,"f"))))}getEndpointById(e){const t=Ue(this,He,"f").get(e);if(!t)throw new Error(`Client with endpoint id ${e} is not connected`);return t}get connected(){return Ue(this,Ne,"f")}isEndpointConnected(e){return Ue(this,He,"f").has(e)}addEndpoint(e,t){if(!Ue(this,Ne,"f"))return void console.warn(`Adding endpoint to disconnected ${this.StrategyName} Strategy`);const n=new this.EndpointType(t);Ue(this,We,"f")&&n.receive(Ue(this,We,"f")),Ue(this,He,"f").set(e,n)}async closeEndpoint(e){Ue(this,He,"f").delete(e)}},We=new WeakMap,He=new WeakMap,Ne=new WeakMap,Object.defineProperty(Fe,"__esModule",{value:!0}),Fe.RTCInfo=Fe.RTCStrategy=void 0;const ze=je,Ke=De;class qe extends Ke.EndpointStrategy{constructor(){super(ze.RTCEndpoint,ze.RTCEndpoint.isValidEndpointPayload,"RTC")}}Fe.RTCStrategy=qe,Fe.RTCInfo={version:2,minimumVersion:0,type:"rtc"};var Je={};Object.defineProperty(Je,"__esModule",{value:!0}),Je.RTCICEManager=void 0;const Ye=d;class Ze extends Ye.EmitterBase{constructor(e){super(e,"channel"),this.ensureChannelOpened=e=>new Promise(((t,n)=>{if("open"===e.readyState)t();else if("connecting"===e.readyState){const n=()=>{e.removeEventListener("open",n),t()};e.addEventListener("open",n)}else n(new Error("This Channel has already closed"))}))}static createDataChannelPromise(e,t){let n;const i=new Promise((e=>{n=e})),r=i=>{const o=()=>{i.channel.removeEventListener("open",o),n(i.channel)};i.channel.label===e&&(i.channel.addEventListener("open",o),t.removeEventListener("datachannel",r))};return t.addEventListener("datachannel",r),i}async listenForProviderIce(e,t){await this.on(this.createProviderEventName(e),t,{timestamp:Date.now()})}async raiseProviderIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createProviderEventName(e)),t)}async listenForClientIce(e,t){await this.on(this.createClientEventName(e),t,{timestamp:Date.now()})}async raiseClientIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createClientEventName(e)),t)}cleanupIceListeners(e){this.removeAllListeners(this.createClientEventName(e)),this.removeAllListeners(this.createProviderEventName(e))}createClientEventName(e){return`ice-client-${e}`}createProviderEventName(e){return`ice-provider-${e}`}createRouteString(e){return`channel/${e}`}createRtcPeer(){return this.wire.environment.getRtcPeer()}async startClientOffer(){const e=Math.random().toString(),t=this.createRtcPeer();t.addEventListener("icecandidate",(async t=>{t.candidate&&await this.raiseClientIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForProviderIce(e,(async e=>{await t.addIceCandidate(e.candidate)}));const n={request:t.createDataChannel("request"),response:t.createDataChannel("response")},i=await t.createOffer();await t.setLocalDescription(i);const r=Promise.all([n.request,n.response].map(this.ensureChannelOpened)).then((()=>{}));return{rtcClient:t,channels:n,offer:i,rtcConnectionId:e,channelsOpened:r}}async finishClientOffer(e,t,n){return await e.setRemoteDescription(t),await n,!0}async createProviderAnswer(e,t){const n=this.createRtcPeer(),i=Ze.createDataChannelPromise("request",n),r=Ze.createDataChannelPromise("response",n);n.addEventListener("icecandidate",(async t=>{t.candidate&&await this.raiseProviderIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForClientIce(e,(async e=>{await n.addIceCandidate(e.candidate)})),await n.setRemoteDescription(t);const o=await n.createAnswer();await n.setLocalDescription(o);const s=Promise.all([i,r]).then((([t,n])=>(this.cleanupIceListeners(e),{request:t,response:n})));return{rtcClient:n,answer:o,channels:s}}}Je.RTCICEManager=Ze;var Qe={},Xe={};function et(e){return[...e.split(".").reverse().entries()].reduce(((e,[t,n])=>e+ +n*1e4**t),0)}function tt(e,t){return et(e)>=et(t)}function nt(e){return e.split("/")[0]}Object.defineProperty(Xe,"__esModule",{value:!0}),Xe.runtimeUuidMeetsMinimumRuntimeVersion=Xe.parseRuntimeUuid=Xe.meetsMinimumRuntimeVersion=void 0,Xe.meetsMinimumRuntimeVersion=tt,Xe.parseRuntimeUuid=nt,Xe.runtimeUuidMeetsMinimumRuntimeVersion=function(e,t){return tt(nt(e),t)};var it,rt,ot,st,at,ct=s&&s.__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)},dt=s&&s.__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};Object.defineProperty(Qe,"__esModule",{value:!0}),Qe.ChannelProvider=void 0;const ht=pe,lt=Xe;class ut extends ht.ChannelBase{get connections(){return[...ct(this,it,"f")]}static handleClientDisconnection(e,t){const n=e.connections.find((e=>e.endpointId===t.endpointId));if(n)ct(e,st,"f").call(e,n);else{e.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name)).forEach(ct(e,st,"f"))}e.disconnectListener(t)}static setProviderRemoval(e,t){ut.removalMap.set(e,t)}constructor(e,t,n){super(),it.set(this,void 0),rt.set(this,void 0),ot.set(this,void 0),st.set(this,(e=>{const t=this.connections.filter((t=>t.endpointId!==e.endpointId));ct(this,ot,"f").closeEndpoint(e.endpointId),dt(this,it,t,"f")})),this.processAction=async(e,t,n)=>(ut.clientIsMultiRuntime(n)&&!(0,lt.runtimeUuidMeetsMinimumRuntimeVersion)(n.runtimeUuid,"18.87.56.0")?this.handleMultiRuntimeLegacyClient(n):this.checkForClientConnection(n),super.processAction(e,t,n)),at.set(this,(()=>{ct(this,ot,"f").close();const e=ut.removalMap.get(this);e&&e()})),dt(this,rt,new ht.ProtectedItems(e,t),"f"),this.connectListener=()=>{},this.disconnectListener=()=>{},dt(this,it,[],"f"),dt(this,ot,n,"f"),n.receive(this.processAction)}dispatch(e,t,n){const i=e.endpointId??this.getEndpointIdForOpenFinId(e,t);return i&&ct(this,ot,"f").isEndpointConnected(i)?ct(this,ot,"f").send(i,t,n):Promise.reject(new Error(`Client connection with identity uuid: ${e.uuid} / name: ${e.name} / endpointId: ${i} no longer connected.`))}async processConnection(e,t){return ct(this,it,"f").push(e),this.connectListener(e,t)}publish(e,t){return this.connections.map((n=>ct(this,ot,"f").send(n.endpointId,e,t)))}onConnection(e){this.connectListener=e}onDisconnection(e){this.disconnectListener=e}async destroy(){const e=ct(this,rt,"f");e.providerIdentity,dt(this,it,[],"f"),await e.close(),ct(this,at,"f").call(this)}async getAllClientInfo(){return this.connections.map((e=>{const{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}=e;return{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}}))}checkForClientConnection(e){if(!this.isClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider.\n Client Identity: {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}isClientConnected(e){return ut.clientIdentityIncludesEndpointId(e)?this.connections.some((t=>t.endpointId===e.endpointId&&t.uuid===e.uuid&&t.name===e.name)):this.isLegacyClientConnected(e)}isLegacyClientConnected(e){return this.connections.some((t=>t.uuid===e.uuid&&t.name===e.name))}handleMultiRuntimeLegacyClient(e){if(!this.isLegacyClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider. Client Identity:\n {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}getEndpointIdForOpenFinId(e,t){const n=this.connections.filter((t=>t.name===e.name&&t.uuid===e.uuid));if(n.length>=2){const n=ct(this,rt,"f"),{uuid:i,name:r}=e,o=n?.providerIdentity.uuid,s=n?.providerIdentity.name;console.warn(`WARNING: Dispatch call may have unintended results. The "to" argument of your dispatch call is missing the\n "endpointId" parameter. The identity you are dispatching to ({uuid: ${i}, name: ${r}})\n has multiple channelClients for this channel. Your dispatched action: (${t}) from the provider:\n ({uuid: ${o}, name: ${s}}) will only be processed by the most recently-created client.`)}return n.pop()?.endpointId}static clientIdentityIncludesEndpointId(e){return void 0!==e.endpointId}static clientIsMultiRuntime(e){return void 0!==e.runtimeUuid}static async wireClose(e,t){await e.sendAction("destroy-channel",{channelName:t})}}Qe.ChannelProvider=ut,it=new WeakMap,rt=new WeakMap,ot=new WeakMap,st=new WeakMap,at=new WeakMap,ut.removalMap=new WeakMap;var pt={};Object.defineProperty(pt,"__esModule",{value:!0}),pt.MessageReceiver=void 0;const wt=ue,yt=d;class ft extends yt.Base{constructor(e){super(e),this.onmessage=e=>"process-channel-message"===e.action&&(this.processChannelMessage(e),!0),this.endpointMap=new Map,this.latestEndpointIdByChannelId=new Map,e.registerMessageHandler(this.onmessage.bind(this))}async processChannelMessage(e){const{senderIdentity:t,providerIdentity:n,action:i,ackToSender:r,payload:o,intendedTargetIdentity:s}=e.payload,a=s.channelId??s.endpointId??this.latestEndpointIdByChannelId.get(n.channelId),c=this.endpointMap.get(a);if(!c)return r.payload.success=!1,r.payload.reason=`Client connection with identity uuid: ${this.wire.me.uuid} / name: ${this.wire.me.name} / endpointId: ${a} no longer connected.`,this.wire.sendRaw(r);try{const e=await c(i,o,t);return r.payload.payload=r.payload.payload||{},r.payload.payload.result=e,this.wire.sendRaw(r)}catch(e){return r.payload.success=!1,r.payload.reason=e.message,this.wire.sendRaw(r)}}addEndpoint(e,t,n){this.endpointMap.set(n,e),t!==n&&this.latestEndpointIdByChannelId.set(t,n)}removeEndpoint(e,t){this.endpointMap.delete(t),this.latestEndpointIdByChannelId.get(e)===t&&this.latestEndpointIdByChannelId.delete(e)}checkForPreviousClientConnection(e){const t=this.latestEndpointIdByChannelId.get(e);t&&(wt.ChannelClient.closeChannelByEndpointId(t),console.warn("You have created a second connection to an older provider. First connection has been removed from the clientMap"),console.warn("If the provider calls publish(), you may receive multiple messages."))}}pt.MessageReceiver=ft;var gt={};Object.defineProperty(gt,"__esModule",{value:!0}),gt.ProtocolManager=void 0;gt.ProtocolManager=class{constructor(e){this.ProtocolsInPreferenceOrder=e,this.DefaultClientProtocols=["classic"],this.DefaultProviderProtocols=["classic"],this.getClientProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultClientProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(", ")}.`);return t},this.getProviderProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultProviderProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(", ")}.`);return t},this.getCompatibleProtocols=(e,t)=>t.supportedProtocols.filter((t=>e.some((e=>e.type===t.type&&t.version>=e.minimumVersion&&e.version>=(t.minimumVersion??0))))).slice(0,t.maxProtocols)}};var mt={};Object.defineProperty(mt,"__esModule",{value:!0});class vt{static combine(e,t){return new vt(e,t)}constructor(e,t){this.primary=e,this.secondary=t}onEndpointDisconnect(e,t){this.primary.onEndpointDisconnect(e,(()=>{this.secondary.isEndpointConnected(e)||t()})),this.secondary.onEndpointDisconnect(e,(()=>{this.primary.isEndpointConnected(e)||t()}))}isValidEndpointPayload(e){return this.primary.isValidEndpointPayload(e)||this.secondary.isValidEndpointPayload(e)}async closeEndpoint(e){await this.primary.closeEndpoint(e),await this.secondary.closeEndpoint(e)}isEndpointConnected(e){return this.primary.isEndpointConnected(e)||this.secondary.isEndpointConnected(e)}async addEndpoint(e,t){this.primary.isValidEndpointPayload(t)&&await this.primary.addEndpoint(e,t),this.secondary.isValidEndpointPayload(t)&&await this.secondary.addEndpoint(e,t)}receive(e){this.primary.receive(e),this.secondary.receive(e)}send(e,t,n){return this.primary.isEndpointConnected(e)?this.primary.send(e,t,n):this.secondary.send(e,t,n)}async close(){await Promise.all([this.primary.close(),this.secondary.close()])}}mt.default=vt;var Ct,bt,It=s&&s.__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},Et=s&&s.__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)},xt=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(xe,"__esModule",{value:!0}),xe.ConnectionManager=void 0;const At=Ae,Pt=d,Mt=Oe,_t=Fe,Ot=Je,St=Qe,Rt=pt,Ft=gt,jt=xt(mt);class kt extends Pt.Base{static getProtocolOptionsFromStrings(e){return e.map((e=>{switch(e){case"rtc":return _t.RTCInfo;case"classic":return Mt.ClassicInfo;default:return(0,At.exhaustiveCheck)(e,["rtc","classic"])}}))}constructor(e){super(e),Ct.set(this,void 0),bt.set(this,void 0),this.removeChannelFromProviderMap=e=>{this.providerMap.delete(e)},this.onmessage=e=>"process-channel-connection"===e.action&&(this.processChannelConnection(e),!0),this.providerMap=new Map,this.protocolManager=new Ft.ProtocolManager("node"===this.wire.environment.type?["classic"]:["rtc","classic"]),It(this,Ct,new Rt.MessageReceiver(e),"f"),It(this,bt,new Ot.RTCICEManager(e),"f"),e.registerMessageHandler(this.onmessage.bind(this))}createProvider(e,t){const n=Object.assign(this.wire.environment.getDefaultChannelOptions().create,e||{}),i=this.protocolManager.getProviderProtocols(n?.protocols),r=i.map((e=>{switch(e){case"rtc":return new _t.RTCStrategy;case"classic":return new Mt.ClassicStrategy(this.wire,Et(this,Ct,"f"),t.channelId,t);default:return(0,At.exhaustiveCheck)(e,["rtc","classic"])}}));let o;if(2===r.length){const[e,t]=r;o=jt.default.combine(e,t)}else{if(1!==r.length)throw new Error("failed to combine strategies");[o]=r}const s=new St.ChannelProvider(t,(()=>St.ChannelProvider.wireClose(this.wire,t.channelName)),o),a=t.channelId;return this.providerMap.set(a,{provider:s,strategy:o,supportedProtocols:kt.getProtocolOptionsFromStrings(i)}),St.ChannelProvider.setProviderRemoval(s,this.removeChannelFromProviderMap.bind(this)),s}async createClientOffer(e){const t=this.protocolManager.getClientProtocols(e?.protocols);let n;return{offer:{supportedProtocols:await Promise.all(t.map((async e=>{switch(e){case"rtc":{const{rtcClient:e,channels:t,offer:i,rtcConnectionId:r,channelsOpened:o}=await Et(this,bt,"f").startClientOffer();return n={rtcClient:e,channels:t,channelsOpened:o},{type:"rtc",version:_t.RTCInfo.version,payload:{offer:i,rtcConnectionId:r}}}case"classic":return{type:"classic",version:Mt.ClassicInfo.version};default:return(0,At.exhaustiveCheck)(e,["rtc","classic"])}}))),maxProtocols:2},rtc:n}}async createClientStrategy(e,t){t.endpointId||(t.endpointId=this.wire.environment.getNextMessageId(),Et(this,Ct,"f").checkForPreviousClientConnection(t.channelId));const n=t.answer??{supportedProtocols:[{type:"classic",version:1}]},i=(await Promise.all(n.supportedProtocols.map((async n=>"rtc"===n.type&&e?(await Et(this,bt,"f").finishClientOffer(e.rtcClient,n.payload.answer,e.channelsOpened),new _t.RTCStrategy):"classic"===n.type?new Mt.ClassicStrategy(this.wire,Et(this,Ct,"f"),t.endpointId,t):null)))).filter((e=>null!==e));let r;if(e&&!i.some((e=>e instanceof _t.RTCStrategy))&&e&&e.rtcClient.close(),i.length>=2)r=jt.default.combine(i[0],i[1]);else{if(!i.length)throw new Error("No compatible protocols");[r]=i}const o={endpointIdentity:t,rtc:e};return r.addEndpoint(t.channelId,o),r}async processChannelConnection(e){const{clientIdentity:t,providerIdentity:n,ackToSender:i,payload:r,offer:o}=e.payload;t.endpointId?t.isLocalEndpointId=!1:(t.endpointId=this.wire.environment.getNextMessageId(),t.isLocalEndpointId=!0);const s=n.channelId,a=this.providerMap.get(s);if(!a)return i.payload.success=!1,i.payload.reason=`Channel "${n.channelName}" has been destroyed.`,this.wire.sendRaw(i);const{provider:c,strategy:d,supportedProtocols:h}=a;try{if(!(c instanceof St.ChannelProvider))throw Error("Cannot connect to a channel client");const e=o??{supportedProtocols:[{type:"classic",version:1}],maxProtocols:1},n=this.protocolManager.getCompatibleProtocols(h,e);if(!n.length)throw new Error("This provider does not support any of the offered protocols.");const s=await c.processConnection(t,r);i.payload.payload=i.payload.payload||{};let a={supportedProtocols:[],endpointPayloadPromise:Promise.resolve({endpointIdentity:t})};return a=await n.reduce((async(e,t)=>{const n=await e;if("rtc"===t.type){const{answer:e,rtcClient:i,channels:r}=await Et(this,bt,"f").createProviderAnswer(t.payload.rtcConnectionId,t.payload.offer);n.supportedProtocols.push({type:"rtc",version:_t.RTCInfo.version,payload:{answer:e}}),n.endpointPayloadPromise=n.endpointPayloadPromise.then((e=>r.then((t=>({...e,rtc:{rtcClient:i,channels:t}})))))}else n.supportedProtocols.push({type:"classic",version:Mt.ClassicInfo.version});return n}),Promise.resolve(a)),a.endpointPayloadPromise.then((e=>d.addEndpoint(t.endpointId,e))),i.payload.payload.result=s,i.payload.payload.answer=a,this.wire.sendRaw(i)}catch(e){return i.payload.success=!1,i.payload.reason=e.message,this.wire.sendRaw(i)}}}xe.ConnectionManager=kt,Ct=new WeakMap,bt=new WeakMap;var Lt,Tt,$t,Bt=s&&s.__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},Gt=s&&s.__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)};Object.defineProperty(le,"__esModule",{value:!0}),le.Channel=void 0;const Wt=t,Ht=G,Nt=d,Dt=ue,Ut=xe,Vt=Qe;function zt(e){const t=Math.floor(e/10),n=Math.min(3e4,500*2**t);return new Promise((e=>{setTimeout((()=>{e(!1)}),n)}))}class Kt extends Nt.EmitterBase{constructor(e){super(e,"channel"),Lt.set(this,void 0),Tt.set(this,new Wt.EventEmitter),$t.set(this,new Ht.AsyncRetryableLazy((async()=>{await Promise.all([this.on("disconnected",(e=>{Dt.ChannelClient.handleProviderDisconnect(e)})),this.on("connected",((...e)=>{Gt(this,Tt,"f").emit("connected",...e)}))]).catch((()=>new Error("error setting up channel connection listeners")))}))),Bt(this,Lt,new Ut.ConnectionManager(e),"f")}async getAllChannels(){return this.wire.sendAction("get-all-channels").then((({payload:e})=>e.data))}async onChannelConnect(e){await this.on("connected",e)}async onChannelDisconnect(e){await this.on("disconnected",e)}async safeConnect(e,t,n){const i={count:0};do{let r=()=>{};const o=new Promise((t=>{r=n=>{e===n.channelName&&t(!0)},Gt(this,Tt,"f").on("connected",r)}));try{if(i.count>0){i.gotConnectedEvent=await Promise.race([zt(i.count),o]);const t=await this.wire.sendAction("connect-to-channel",{...n,retryInfo:i});return console.log(`Successfully connected to channelName: ${e}`),t.payload.data}const t=this.wire.sendAction("connect-to-channel",n);i.originalMessageId=t.messageId;return(await t).payload.data}catch(n){if(!n.message.includes("internal-nack"))throw n;t&&0===i.count&&console.warn(`No channel found for channelName: ${e}. Waiting for connection...`)}finally{i.count+=1,Gt(this,Tt,"f").removeListener("connected",r)}}while(t);throw new Error(`No channel found for channelName: ${e}.`)}async connect(e,t={}){if(await Gt(this,$t,"f").getValue(),!e||"string"!=typeof e)throw new Error("Please provide a channelName string to connect to a channel.");const n={wait:!0,...this.wire.environment.getDefaultChannelOptions().connect,...t},{offer:i,rtc:r}=await Gt(this,Lt,"f").createClientOffer(n);let o;(this.fin.me.isFrame||this.fin.me.isView||this.fin.me.isWindow)&&(o=(await this.fin.me.getInfo()).url);const s={channelName:e,...n,offer:i,connectionUrl:o},a=await this.safeConnect(e,n.wait,s),c=await Gt(this,Lt,"f").createClientStrategy(r,a),d=new Dt.ChannelClient(a,(()=>Dt.ChannelClient.wireClose(this.wire,a,a.endpointId)),c);return c.onEndpointDisconnect(a.channelId,(async()=>{try{await d.sendDisconnectAction()}catch(e){console.warn(`Something went wrong during disconnect for client with uuid: ${a.uuid} / name: ${a.name} / endpointId: ${a.endpointId}.`)}finally{Dt.ChannelClient.handleProviderDisconnect(a)}})),d}async create(e,t){if(!e)throw new Error("Please provide a channelName to create a channel");const{payload:{data:n}}=await this.wire.sendAction("create-channel",{channelName:e}),i=Gt(this,Lt,"f").createProvider(t,n);return this.on("client-disconnected",(t=>{t.channelName===e&&Vt.ChannelProvider.handleClientDisconnection(i,t)})),i}}le.Channel=Kt,Lt=new WeakMap,Tt=new WeakMap,$t=new WeakMap,Object.defineProperty(de,"__esModule",{value:!0}),de.InterAppPayload=de.InterApplicationBus=void 0;const qt=t,Jt=d,Yt=he,Zt=le,Qt=O;class Xt extends Jt.Base{constructor(e){super(e),this.events={subscriberAdded:"subscriber-added",subscriberRemoved:"subscriber-removed"},this.refCounter=new Yt.RefCounter,this.Channel=new Zt.Channel(e),this.emitter=new qt.EventEmitter,e.registerMessageHandler(this.onmessage.bind(this)),this.on=this.emitter.on.bind(this.emitter),this.removeAllListeners=this.emitter.removeAllListeners.bind(this.emitter)}async publish(e,t){await this.wire.sendAction("publish-message",{topic:e,message:t,sourceWindowName:this.me.name})}async send(e,t,n){const i=(0,Qt.validateIdentity)(e);if(i)throw new Error(i);await this.wire.sendAction("send-message",{destinationUuid:e.uuid,destinationWindowName:e.name,topic:t,message:n,sourceWindowName:this.me.name})}subscribe(e,t,n){const i=this.createSubscriptionKey(e.uuid,e.name||"*",t);return this.emitter.on(i,n),this.refCounter.actOnFirst(i,(async()=>{await this.wire.sendAction("subscribe",{sourceUuid:e.uuid,sourceWindowName:e.name||"*",topic:t,destinationWindowName:this.me.name})}),(()=>Promise.resolve()))}unsubscribe(e,t,n){const i=e.name||"*",r=this.createSubscriptionKey(e.uuid,i,t);return this.emitter.removeListener(r,n),this.refCounter.actOnLast(r,(async()=>{await this.wire.sendAction("unsubscribe",{sourceUuid:e.uuid,sourceWindowName:i,topic:t,destinationWindowName:this.me.name})}),(()=>new Promise((e=>e)).then((()=>{}))))}processMessage(e){const{payload:{message:t,sourceWindowName:n,sourceUuid:i,topic:r}}=e,o=[this.createSubscriptionKey(i,n,r),this.createSubscriptionKey(i,"*",r),this.createSubscriptionKey("*","*",r)],s={uuid:i,name:n};o.forEach((e=>{this.emitter.emit(e,t,s)}))}emitSubscriverEvent(e,t){const{payload:{targetName:n,uuid:i,topic:r}}=t,o={name:n,uuid:i,topic:r};this.emitter.emit(e,o)}createSubscriptionKey(e,t,n){const i=t||"*";if(!(e&&i&&n))throw new Error("Missing uuid, name, or topic string");return function(...e){return e.map((e=>Buffer.from(`${e}`).toString("base64"))).join("/")}(e,i,n)}onmessage(e){const{action:t}=e;switch(t){case"process-message":this.processMessage(e);break;case this.events.subscriberAdded:this.emitSubscriverEvent(this.events.subscriberAdded,e);break;case this.events.subscriberRemoved:this.emitSubscriverEvent(this.events.subscriberRemoved,e)}return!0}}de.InterApplicationBus=Xt;de.InterAppPayload=class{};var en={};Object.defineProperty(en,"__esModule",{value:!0}),en.Clipboard=void 0;const tn=d;class nn extends tn.Base{async writeText(e){await this.wire.sendAction("clipboard-write-text",e)}async readText(e){const{payload:t}=await this.wire.sendAction("clipboard-read-text",{type:e});return t.data}async writeImage(e){await this.wire.sendAction("clipboard-write-image",e)}async readImage(e={format:"dataURL"}){const{payload:t}=await this.wire.sendAction("clipboard-read-image",e);return t.data}async writeHtml(e){await this.wire.sendAction("clipboard-write-html",e)}async readHtml(e){const{payload:t}=await this.wire.sendAction("clipboard-read-html",{type:e});return t.data}async writeRtf(e){await this.wire.sendAction("clipboard-write-rtf",e)}async readRtf(e){const{payload:t}=await this.wire.sendAction("clipboard-read-rtf",{type:e});return t.data}async write(e){await this.wire.sendAction("clipboard-write",e)}async getAvailableFormats(e){const{payload:t}=await this.wire.sendAction("clipboard-read-formats",{type:e});return t.data}}en.Clipboard=nn;var rn={},on={},sn={};Object.defineProperty(sn,"__esModule",{value:!0}),sn.ExternalApplication=void 0;const an=d;class cn extends an.EmitterBase{constructor(e,t){super(e,"external-application",t.uuid),this.identity=t}getInfo(){return this.wire.sendAction("get-external-application-info",this.identity).then((({payload:e})=>e.data))}}sn.ExternalApplication=cn,Object.defineProperty(on,"__esModule",{value:!0}),on.ExternalApplicationModule=void 0;const dn=d,hn=sn;class ln extends dn.Base{wrap(e){return this.wire.sendAction("external-application-wrap").catch((e=>{})),Promise.resolve(new hn.ExternalApplication(this.wire,{uuid:e}))}wrapSync(e){return this.wire.sendAction("external-application-wrap-sync").catch((e=>{})),new hn.ExternalApplication(this.wire,{uuid:e})}}on.ExternalApplicationModule=ln,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(on,e),n(sn,e)}(rn);var un={},pn={},wn={};Object.defineProperty(wn,"__esModule",{value:!0}),wn._Frame=void 0;const yn=d;class fn extends yn.EmitterBase{constructor(e,t){super(e,"frame",t.uuid,t.name),this.identity=t}getInfo(){return this.wire.sendAction("get-frame-info",this.identity).then((({payload:e})=>e.data))}getParentWindow(){return this.wire.sendAction("get-parent-window",this.identity).then((({payload:e})=>e.data))}}wn._Frame=fn,Object.defineProperty(pn,"__esModule",{value:!0}),pn._FrameModule=void 0;const gn=d,mn=O,vn=wn;class Cn extends gn.Base{async wrap(e){this.wire.sendAction("frame-wrap").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}wrapSync(e){this.wire.sendAction("frame-wrap-sync").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}getCurrent(){return this.wire.sendAction("frame-get-current").catch((e=>{})),Promise.resolve(new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity()))}getCurrentSync(){return this.wire.sendAction("frame-get-current-sync").catch((e=>{})),new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity())}}pn._FrameModule=Cn,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(pn,e),n(wn,e)}(un);var bn={};Object.defineProperty(bn,"__esModule",{value:!0}),bn.GlobalHotkey=void 0;const In=d;class En extends In.EmitterBase{constructor(e){super(e,"global-hotkey")}async register(e,t){await this.on(e,t),await this.wire.sendAction("global-hotkey-register",{hotkey:e})}async unregister(e){await this.removeAllListeners(e),await this.wire.sendAction("global-hotkey-unregister",{hotkey:e})}async unregisterAll(){await Promise.all(this.eventNames().filter((e=>!("registered"===e||"unregistered"===e))).map((e=>this.removeAllListeners(e)))),await this.wire.sendAction("global-hotkey-unregister-all",{})}async isRegistered(e){const{payload:{data:t}}=await this.wire.sendAction("global-hotkey-is-registered",{hotkey:e});return t}}bn.GlobalHotkey=En;var xn,An={},Pn={},Mn={},_n=s&&s.__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)};Object.defineProperty(Mn,"__esModule",{value:!0}),Mn.Platform=void 0;const On=d,Sn=O,Rn=new Map;class Fn extends On.EmitterBase{constructor(e,t){super(t.wire,"application",e.uuid),this.getClient=e=>{this.wire.sendAction("platform-get-client",this.identity).catch((e=>{}));const t=e||this.identity,{uuid:n}=t;if(!Rn.has(n)){const e=_n(this,xn,"f").call(this,n);Rn.set(n,e)}return Rn.get(n)},xn.set(this,(async e=>{try{const t=`custom-frame-${e}`,n=await this._channel.connect(t,{wait:!1});return n.onDisconnection((()=>{Rn.delete(e)})),n}catch(t){throw Rn.delete(e),new Error("The targeted Platform is not currently running. Listen for application-started event for the given Uuid.")}})),this.launchLegacyManifest=this.launchContentManifest;const n=(0,Sn.validateIdentity)(e);if(n)throw new Error(n);this._channel=t,this.identity={uuid:e.uuid},this.Layout=this.fin.Platform.Layout,this.Application=this.fin.Application.wrapSync(this.identity)}async createView(e,t,n){this.wire.sendAction("platform-create-view",this.identity).catch((e=>{}));const i=await this.getClient(),r=await i.dispatch("create-view",{target:t,opts:e,targetView:n});if(!r||(0,Sn.validateIdentity)(r.identity))throw new Error(`When overwriting the createView call, please return an object that has a valid 'identity' property: ${JSON.stringify(r)}`);return this.fin.View.wrapSync(r.identity)}async createWindow(e){this.wire.sendAction("platform-create-window",this.identity).catch((e=>{}));const t=await this.getClient();e.reason||(e.reason="api-call");const n=await t.dispatch("create-view-container",e);if(!n||(0,Sn.validateIdentity)(n.identity))throw new Error(`When overwriting the createWindow call, please return an object that has a valid 'identity' property: ${JSON.stringify(n)}`);const{identity:i}=n,r=this.fin.Window.wrapSync(i);return r.name=i.name,r.uuid=i.uuid,r}async quit(){this.wire.sendAction("platform-quit",this.identity).catch((e=>{}));return(await this.getClient()).dispatch("quit")}async closeView(e){this.wire.sendAction("platform-close-view",this.identity).catch((e=>{}));const t=await this.getClient();await t.dispatch("close-view",{view:e})}async reparentView(e,t){console.warn("Platform.reparentView has been deprecated, please use Platform.createView"),this.wire.sendAction("platform-reparent-view",this.identity).catch((e=>{}));const n={...e,uuid:e.uuid??this.identity.uuid},i=await this.fin.View.wrap(n),r=await i.getOptions();return this.createView(r,t)}async getSnapshot(){this.wire.sendAction("platform-get-snapshot",this.identity).catch((e=>{}));return(await this.getClient()).dispatch("get-snapshot")}async getViewSnapshot(e){return(await this.getClient()).dispatch("get-view-snapshot",{viewIdentity:e})}async applySnapshot(e,t){this.wire.sendAction("platform-apply-snapshot",this.identity).catch((e=>{}));const n="Requested snapshot must be a valid Snapshot object, or a url or filepath to such an object.";let i;if("string"==typeof e)try{i=(await this._channel.wire.sendAction("get-application-manifest",{manifestUrl:e})).payload.data}catch(e){throw new Error(`${n}: ${e}`)}else i=e;if(!i.windows)throw new Error(n);const r=await this.getClient();return await r.dispatch("apply-snapshot",{snapshot:i,options:t}),this}async fetchManifest(e){return(await this.getClient()).dispatch("platform-fetch-manifest",{manifestUrl:e})}async launchContentManifest(e){this.wire.sendAction("platform-launch-content-manifest",this.identity).catch((()=>{}));const t=await this.getClient(),n=await this.fetchManifest(e);return t.dispatch("launch-into-platform",{manifest:n,manifestUrl:e}),this}async setWindowContext(e={},t){if(this.wire.sendAction("platform-set-window-context",this.identity).catch((e=>{})),!e)throw new Error("Please provide a serializable object or string to set the context.");const n=await this.getClient(),{entityType:i}=t?await this.fin.System.getEntityInfo(t.uuid,t.name):this.fin.me;await n.dispatch("set-window-context",{context:e,entityType:i,target:t||{uuid:this.fin.me.uuid,name:this.fin.me.name}})}async getWindowContext(e){this.wire.sendAction("platform-get-window-context",this.identity).catch((e=>{}));const t=await this.getClient(),{entityType:n}=e?await this.fin.System.getEntityInfo(e.uuid,e.name):this.fin.me;return t.dispatch("get-window-context",{target:e||{uuid:this.fin.me.uuid,name:this.fin.me.name},entityType:n})}async closeWindow(e,t={skipBeforeUnload:!1}){this.wire.sendAction("platform-close-window",this.identity).catch((e=>{}));return(await this.getClient()).dispatch("close-window",{windowId:e,options:t})}}Mn.Platform=Fn,xn=new WeakMap;var jn={},kn={},Ln={},Tn={};function $n(e){switch(e){case"columns":case"grid":case"rows":case"tabs":return!0;default:return!1}}Object.defineProperty(Tn,"__esModule",{value:!0}),Tn.overrideFromComposables=Tn.isValidPresetType=void 0,Tn.isValidPresetType=$n,Tn.overrideFromComposables=function(...e){return t=>e.reduceRight(((e,t)=>n=>t(e(n))),(e=>e))(t)},Tn.default={isValidPresetType:$n};var Bn={},Gn={},Wn={};Object.defineProperty(Wn,"__esModule",{value:!0}),Wn.ApiConsumer=void 0;Wn.ApiConsumer=class{constructor(e){this.strategy=e,this.consume=async e=>(await this.strategy.getExposedFunctions(e)).reduce(((t,n)=>({...t,[n.key]:this.strategy.createFunction(n,e)})),{})}};var Hn={},Nn={};Object.defineProperty(Nn,"__esModule",{value:!0}),Nn.expose=Nn.getExposedProperties=void 0;const Dn=Symbol("exposedProperties");Nn.getExposedProperties=e=>e[Dn]||e.prototype[Dn]||[];Nn.expose=e=>(t,n,i)=>{t[Dn]=t[Dn]||[],t[Dn].push({key:n,descriptor:i,options:e})},Object.defineProperty(Hn,"__esModule",{value:!0}),Hn.ApiExposer=void 0;const Un=Nn;Hn.ApiExposer=class{constructor(e){this.strategy=e,this.exposeInstance=async(e,t)=>{const n=(0,Un.getExposedProperties)(e),i=await Promise.all(n.map((async({key:n,options:i})=>({key:n,options:await this.strategy.exposeFunction(e[n].bind(e),{key:n,options:i,meta:t})}))));await this.strategy.exposeMeta(t,i)}}};var Vn={},zn={},Kn={};Object.defineProperty(Kn,"__esModule",{value:!0}),Kn.ChannelsConsumer=void 0;Kn.ChannelsConsumer=class{constructor(e){this.channel=e,this.getExposedFunctions=async e=>{const{id:t}=e,{props:n}=await this.channel.dispatch(`api-meta:${t}`);return n},this.createFunction=e=>(...t)=>{const{action:n}=e.options;return this.channel.dispatch(n,{args:t})}}};var qn={};Object.defineProperty(qn,"__esModule",{value:!0}),qn.ChannelsExposer=void 0;qn.ChannelsExposer=class{constructor(e){this.channelProviderOrClient=e,this.exposeFunction=async(e,t)=>{const{key:n,options:i,meta:r}=t,{id:o}=r,s=`${o}.${i?.action||n}`;return await this.channelProviderOrClient.register(s,(async({args:t})=>e(...t))),{action:s}},this.exposeMeta=async({id:e},t)=>{const n=`api-meta:${e}`;await this.channelProviderOrClient.register(n,(()=>({props:t})))}}},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Kn,e),n(qn,e)}(zn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(zn,e)}(Vn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Wn,e),n(Hn,e),n(Vn,e),n(Nn,e)}(Gn);var Jn={};Object.defineProperty(Jn,"__esModule",{value:!0}),Jn.createRelayedDispatch=exports.relayChannelClientApi_1=Jn.relayChannelClientApi=void 0;const Yn=["no longer connected","RTCDataChannel closed unexpectedly","The client you are trying to dispatch from is disconnected from the target provider"];exports.relayChannelClientApi_1=Jn.relayChannelClientApi=async(e,t)=>{e.register(`relay:${t}`,(({action:t,target:n,payload:i})=>e.dispatch(n,t,i))),await Promise.resolve()};Jn.createRelayedDispatch=(e,t,n,i)=>async(r,o)=>{try{return await e.dispatch(`relay:${n}`,{action:r,payload:o,target:t})}catch(e){if(s=e.message,Yn.some((e=>s.includes(e)))&&i)throw new Error(i);throw e}var s};var Zn,Qn,Xn,ei=s&&s.__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},ti=s&&s.__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)};Object.defineProperty(Bn,"__esModule",{value:!0}),Bn.ColumnOrRow=Bn.TabStack=Bn.LayoutNode=void 0;const ni=Gn,ii=Jn;class ri{constructor(e,t){Zn.set(this,void 0),this.isRoot=()=>ti(this,Zn,"f").isRoot(this.entityId),this.exists=()=>ti(this,Zn,"f").exists(this.entityId),this.getParent=async()=>{const e=await ti(this,Zn,"f").getParent(this.entityId);if(e)return ri.getEntity(e,ti(this,Zn,"f"))},this.createAdjacentStack=async(e,t)=>{const n=await ti(this,Zn,"f").createAdjacentStack(this.entityId,e,t);return ri.getEntity({entityId:n,type:"stack"},ti(this,Zn,"f"))},this.getAdjacentStacks=async e=>(await ti(this,Zn,"f").getAdjacentStacks({targetId:this.entityId,edge:e})).map((e=>ri.getEntity({type:"stack",entityId:e.entityId},ti(this,Zn,"f")))),ei(this,Zn,e,"f"),this.entityId=t}}Bn.LayoutNode=ri,Zn=new WeakMap,ri.newLayoutEntitiesClient=async(e,t,n)=>{const i=(0,ii.createRelayedDispatch)(e,n,"layout-relay","You are trying to interact with a layout component on a window that does not exist or has been destroyed.");return new ni.ApiConsumer(new ni.ChannelsConsumer({dispatch:i})).consume({id:t})},ri.getEntity=(e,t)=>{const{entityId:n,type:i}=e;switch(i){case"column":case"row":return new si(t,n,i);case"stack":return new oi(t,n);default:throw new Error(`Unrecognised Layout Entity encountered ('${JSON.stringify(e)})`)}};class oi extends ri{constructor(e,t){super(e,t),Qn.set(this,void 0),this.type="stack",this.getViews=()=>ti(this,Qn,"f").getStackViews(this.entityId),this.addView=async(e,t={index:0})=>ti(this,Qn,"f").addViewToStack(this.entityId,e,t),this.removeView=async e=>{await ti(this,Qn,"f").removeViewFromStack(this.entityId,e)},this.setActiveView=async e=>{await ti(this,Qn,"f").setStackActiveView(this.entityId,e)},ei(this,Qn,e,"f")}}Bn.TabStack=oi,Qn=new WeakMap;class si extends ri{constructor(e,t,n){super(e,t),Xn.set(this,void 0),this.getContent=async()=>(await ti(this,Xn,"f").getContent(this.entityId)).map((e=>ri.getEntity(e,ti(this,Xn,"f")))),ei(this,Xn,e,"f"),this.type=n}}Bn.ColumnOrRow=si,Xn=new WeakMap;var ai={};Object.defineProperty(ai,"__esModule",{value:!0}),ai.DEFAULT_LAYOUT_KEY=ai.LAYOUT_CONTROLLER_ID=void 0,ai.LAYOUT_CONTROLLER_ID="layout-entities",ai.DEFAULT_LAYOUT_KEY="__default__";var ci,di,hi,li=s&&s.__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)};Object.defineProperty(Ln,"__esModule",{value:!0}),Ln.Layout=void 0;const ui=G,pi=O,wi=d,yi=Tn,fi=Bn,gi=ai;class mi extends wi.Base{static getClient(e){return li(e,di,"f").getValue()}constructor(e,t){super(t),ci.add(this),di.set(this,new ui.Lazy((async()=>fi.LayoutNode.newLayoutEntitiesClient(await this.platform.getClient(),gi.LAYOUT_CONTROLLER_ID,this.identity)))),this.replace=async e=>{this.wire.sendAction("layout-replace").catch((e=>{}));const t=await this.platform.getClient();await t.dispatch("replace-layout",{target:this.identity,opts:{layout:e}})},this.replaceView=async(e,t)=>{this.wire.sendAction("layout-replace-view").catch((e=>{}));const n=await this.platform.getClient();await n.dispatch("replace-view",{target:this.identity,opts:{viewToReplace:e,newView:t}})},this.applyPreset=async e=>{this.wire.sendAction("layout-apply-preset").catch((e=>{}));const t=await this.platform.getClient(),{presetType:n}=e;if(!n||!(0,yi.isValidPresetType)(n))throw new Error("Cannot apply preset layout, please include an applicable presetType property in the PresetLayoutOptions.");await t.dispatch("apply-preset-layout",{target:this.identity,opts:{presetType:n}})};const n=(0,pi.validateIdentity)(e);if(n)throw new Error(n);this.identity=e,this.platform=this.fin.Platform.wrapSync({uuid:e.uuid}),e.uuid===this.fin.me.uuid&&e.name===this.fin.me.name&&(this.init=this.fin.Platform.Layout.init)}async getConfig(){this.wire.sendAction("layout-get-config").catch((e=>{}));return(await this.platform.getClient()).dispatch("get-frame-snapshot",{target:this.identity})}async getCurrentViews(){this.wire.sendAction("layout-get-views").catch((e=>{}));const e=await this.platform.getClient();return(await e.dispatch("get-layout-views",{target:this.identity})).map((e=>this.fin.View.wrapSync(e)))}async getRootItem(){this.wire.sendAction("layout-get-root-item").catch((()=>{}));const e=await li(this,di,"f").getValue(),t=await e.getRoot("layoutName"in this.identity?this.identity:void 0);return fi.LayoutNode.getEntity(t,e)}async getStackByViewIdentity(e){this.wire.sendAction("layout-get-stack-by-view").catch((()=>{}));const t=await li(this,di,"f").getValue(),n=await t.getStackByView(e);if(!n)throw new Error(`No stack found for view: ${e.uuid}/${e.name}`);return fi.LayoutNode.getEntity(n,t)}async addView(e,{location:t,targetView:n}={}){this.wire.sendAction("layout-add-view").catch((e=>{}));const{identity:i}=await li(this,ci,"m",hi).call(this,"layout-add-view",{viewOptions:e,location:t,targetView:n});return{identity:i}}async closeView(e){this.wire.sendAction("layout-close-view").catch((e=>{})),await li(this,ci,"m",hi).call(this,"layout-close-view",{viewIdentity:e})}}Ln.Layout=mi,di=new WeakMap,ci=new WeakSet,hi=async function(e,t){return(await this.platform.getClient()).dispatch(e,{target:this.identity,opts:t})};var vi,Ci,bi,Ii,Ei,xi=s&&s.__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)},Ai=s&&s.__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};Object.defineProperty(kn,"__esModule",{value:!0}),kn.LayoutModule=void 0;const Pi=d,Mi=Ln,_i=ai;class Oi extends Pi.Base{constructor(){super(...arguments),vi.add(this),Ci.set(this,!1),bi.set(this,null),this.init=async(e={})=>{if(this.wire.sendAction("layout-init").catch((e=>{})),!this.wire.environment.layoutAllowedInContext(this.fin))throw new Error("Layout.init can only be called from a Window context.");if(xi(this,Ci,"f"))throw new Error("Layout.init was already called, please use Layout.create to add additional layouts.");"openfin"===this.wire.environment.type&&await this.fin.Platform.getCurrentSync().getClient(),Ai(this,Ci,!0,"f"),Ai(this,bi,await this.wire.environment.initLayoutManager(this.fin,this.wire,e),"f"),await this.wire.environment.applyLayoutSnapshot(this.fin,xi(this,bi,"f"),e);const t={name:this.fin.me.name,uuid:this.fin.me.uuid};if(!e.layoutManagerOverride){const e={layoutName:_i.DEFAULT_LAYOUT_KEY,...t};return xi(this,Ii,"f").call(this,e)}return this.wrapSync(t)},Ii.set(this,(e=>{const t="[Layout] You are using a deprecated property `layoutManager` - it will throw if you access it starting in v37.",n=new Proxy({},{get(e,n){throw console.warn(`[Layout-mgr-proxy] accessing ${n.toString()}`),new Error(t)}}),i=Object.assign(this.wrapSync(e),{layoutManager:n});return new Proxy(i,{get(e,n){if("layoutManager"===n)throw console.warn(`[Layout-proxy] accessing ${n.toString()}`),new Error(t);return e[n]}})})),this.getCurrentLayoutManagerSync=()=>xi(this,vi,"m",Ei).call(this,"fin.Platform.Layout.getCurrentLayoutManagerSync()"),this.create=async e=>this.wire.environment.createLayout(xi(this,vi,"m",Ei).call(this,"fin.Platform.Layout.create()"),e),this.destroy=async e=>this.wire.environment.destroyLayout(xi(this,vi,"m",Ei).call(this,"fin.Platform.Layout.destroy()"),e)}async wrap(e){return this.wire.sendAction("layout-wrap").catch((e=>{})),new Mi.Layout(e,this.wire)}wrapSync(e){return this.wire.sendAction("layout-wrap-sync").catch((e=>{})),new Mi.Layout(e,this.wire)}async getCurrent(){if(this.wire.sendAction("layout-get-current").catch((e=>{})),"openfin"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error("You are not in a Window context. Only Windows can have a Layout.");const{uuid:e,name:t}=this.fin.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction("layout-get-current-sync").catch((e=>{})),"openfin"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error("You are not in a Window context. Only Windows can have a Layout.");const{uuid:e,name:t}=this.fin.me;return this.wrapSync({uuid:e,name:t})}async getLayoutByViewIdentity(e){this.wire.sendAction("layout-get-by-view-identity").catch((()=>{}));let t=await this.wire.environment.getViewWindowIdentity(this.fin,e);t.identity&&(t=t.identity);try{const n=this.wrapSync(t),i=await Mi.Layout.getClient(n),r=await i.getLayoutIdentityForViewOrThrow(e);return this.wrapSync(r)}catch(n){if(!["No action registered at target for","getLayoutIdentityForViewOrThrow is not a function"].some((e=>n.message.includes(e))))throw n;if(t.uuid===t.name)throw new Error(`View identity ${JSON.stringify(e)} is not attached to any layout in provider window ${JSON.stringify(t)}.`);return this.wrapSync(t)}}}kn.LayoutModule=Oi,Ci=new WeakMap,bi=new WeakMap,Ii=new WeakMap,vi=new WeakSet,Ei=function(e){if(!xi(this,bi,"f"))throw new Error(`You must call init before using the API ${e}`);return xi(this,bi,"f")},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(kn,e),n(Ln,e)}(jn),Object.defineProperty(Pn,"__esModule",{value:!0}),Pn.PlatformModule=void 0;const Si=d,Ri=Mn,Fi=jn;class ji extends Si.Base{constructor(e,t){super(e),this._channel=t,this.Layout=new Fi.LayoutModule(this.wire)}async init(e){if(!fin.__internal_.isPlatform||fin.me.name!==fin.me.uuid)throw new Error("fin.Platform.init should only be called from a custom platform provider running in the main window of the application.");return this.wire.environment.initPlatform(this.fin,e)}async wrap(e){return this.wire.sendAction("platform-wrap").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}wrapSync(e){return this.wire.sendAction("platform-wrap-sync").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}async getCurrent(){return this.wire.sendAction("platform-get-current").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction("platform-get-current-sync").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}start(e){return this.wire.sendAction("platform-start").catch((e=>{})),new Promise((async(t,n)=>{try{const{uuid:n}=e,i=await this.fin.Application._create({...e,isPlatformController:!0});i.once("platform-api-ready",(()=>t(this.wrapSync({uuid:n})))),i._run({uuid:n})}catch(e){n(e)}}))}startFromManifest(e,t){return this.wire.sendAction("platform-start-from-manifest").catch((e=>{})),new Promise((async(n,i)=>{try{const i=await this.fin.Application._createFromManifest(e);i.once("platform-api-ready",(()=>n(this.wrapSync({uuid:i.identity.uuid})))),i._run(t)}catch(e){i(e)}}))}}Pn.PlatformModule=ji,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Pn,e),n(Mn,e)}(An);var ki={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getMe=e.getBaseMe=e.environmentUnsupportedMessage=void 0;const t=J(),n=un,i=ie(),r=rn;function o(e,t,n){return{...{isView:"view"===e,isWindow:"window"===e,isFrame:"iframe"===e,isExternal:"external connection"===e},uuid:t,name:n,entityType:e}}e.environmentUnsupportedMessage="You are not running in OpenFin.",e.getBaseMe=o,e.getMe=function(s){const{uuid:a,name:c,entityType:d}=s.me,h={setContext(){throw new Error(e.environmentUnsupportedMessage)},addContextHandler(){throw new Error(e.environmentUnsupportedMessage)},getContextGroups(){throw new Error(e.environmentUnsupportedMessage)},joinContextGroup(){throw new Error(e.environmentUnsupportedMessage)},removeFromContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getAllClientsInContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getInfoForContextGroup(){throw new Error(e.environmentUnsupportedMessage)}},l="Interop API has not been instantiated. Either connection has failed or you have not declared interop in your config.",u={setContext(){throw new Error(l)},addContextHandler(){throw new Error(l)},getContextGroups(){throw new Error(l)},joinContextGroup(){throw new Error(l)},removeFromContextGroup(){throw new Error(l)},getAllClientsInContextGroup(){throw new Error(l)},getInfoForContextGroup(){throw new Error(l)}},p={eventNames:()=>{throw new Error(e.environmentUnsupportedMessage)},emit:()=>{throw new Error(e.environmentUnsupportedMessage)},listeners:()=>{throw new Error(e.environmentUnsupportedMessage)},listenerCount:()=>{throw new Error(e.environmentUnsupportedMessage)},on:()=>{throw new Error(e.environmentUnsupportedMessage)},addListener:()=>{throw new Error(e.environmentUnsupportedMessage)},once:()=>{throw new Error(e.environmentUnsupportedMessage)},prependListener:()=>{throw new Error(e.environmentUnsupportedMessage)},prependOnceListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeAllListeners:()=>{throw new Error(e.environmentUnsupportedMessage)}};switch(d){case"view":return Object.assign(new t.View(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case"window":return Object.assign(new i._Window(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case"iframe":return Object.assign(new n._Frame(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case"external connection":return Object.assign(new r.ExternalApplication(s,{uuid:a}),o(d,a,c),{interop:u,isOpenFin:!1});default:return{...o(d,a,c),...p,interop:h,isOpenFin:!1}}}}(ki);var Li={},Ti={},$i={};Object.defineProperty($i,"__esModule",{value:!0}),$i.createWarningObject=$i.createUnusableObject=void 0,$i.createUnusableObject=function(e){const t=()=>{throw new Error(e)};return new Proxy({},{apply:t,construct:t,defineProperty:t,deleteProperty:t,get:t,getOwnPropertyDescriptor:t,getPrototypeOf:t,has:t,isExtensible:t,ownKeys:t,preventExtensions:t,set:t,setPrototypeOf:t})},$i.createWarningObject=function(e,t){return new Proxy(t,{get:(...t)=>(console.warn(e),Reflect.get(...t)),set:(...t)=>(console.warn(e),Reflect.set(...t)),getOwnPropertyDescriptor:(...t)=>(console.warn(e),Reflect.getOwnPropertyDescriptor(...t)),ownKeys:(...t)=>(console.warn(e),Reflect.ownKeys(...t))})};var Bi,Gi={},Wi={};var Hi={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.wrapIntentHandler=e.BROKER_ERRORS=e.generateOverrideWarning=e.generateOverrideError=e.wrapContextHandler=e.wrapInTryCatch=e.generateId=void 0;e.generateId=()=>`${Math.random()}${Date.now()}`;e.wrapInTryCatch=(e,t)=>(...n)=>{try{return e(...n)}catch(e){throw new Error((t||"")+e)}};e.wrapContextHandler=(e,t)=>async n=>{try{await e(n)}catch(e){throw console.error(`Error thrown by handler ${t} for context type ${n.type}: ${e}`),e}};e.generateOverrideError=(e,t)=>`You have tried to to use ${e} but ${t} has not been overridden in the Interop Broker. Please override this function. Refer to our documentation for more info.`;e.generateOverrideWarning=(e,t,n,i)=>{const{uuid:r,name:o}=n;return i?`Entity with identity: ${r}/${o} has called ${i} or ${e} but ${t} has not been overridden.`:`Entity with identity: ${r}/${o} has called ${e} but ${t} has not been overridden.`},e.BROKER_ERRORS={fireIntent:(0,e.generateOverrideError)("fireIntent","handleFiredIntent"),fireIntentForContext:(0,e.generateOverrideError)("fireIntentForContext","handleFiredIntentForContext"),getInfoForIntent:(0,e.generateOverrideError)("getInfoForIntent","handleInfoForIntent"),getInfoForIntentsByContext:(0,e.generateOverrideError)("getInfoForIntentsByContext","handleInfoForIntentsByContext"),joinSessionContextGroupWithJoinContextGroup:"The Context Group you have tried to join is a Session Context Group. Custom Context Groups can only be defined by the Interop Broker through code or manifest configuration. Please use joinSessionContextGroup.",fdc3Open:(0,e.generateOverrideError)("fdc3.open","fdc3HandleOpen"),fdc3FindInstances:(0,e.generateOverrideError)("fdc3.findInstances","fdc3HandleFindInstances"),fdc3GetAppMetadata:(0,e.generateOverrideError)("fdc3.getAppMetadata","fdc3HandleGetAppMetadata"),fdc3GetInfo:(0,e.generateOverrideError)("fdc3.getInfo","fdc3HandleGetInfo")};e.wrapIntentHandler=(e,t)=>async n=>{try{return e(n)}catch(e){throw console.error(`Error thrown by handler ${t}: ${e}`),e}}}(Hi);var Ni,Di,Ui={};function Vi(){if(Di)return Gi;Di=1;var e,t,n,r=s&&s.__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},o=s&&s.__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)},a=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Gi,"__esModule",{value:!0}),Gi.InteropBroker=void 0;const c=d,h=a(function(){if(Bi)return Wi;Bi=1,Object.defineProperty(Wi,"__esModule",{value:!0});const e=Cr();return Wi.default=class{constructor(e,t){this.provider=e,this.id=t,this.lastContext=void 0,this.contextGroupMap=new Map,this.clients=new Map,this.registerListeners()}registerListeners(){this.provider.register(`sessionContextGroup:getContext-${this.id}`,this.getCurrentContext.bind(this)),this.provider.register(`sessionContextGroup:setContext-${this.id}`,this.setContext.bind(this)),this.provider.register(`sessionContextGroup:handlerAdded-${this.id}`,this.handlerAdded.bind(this)),this.provider.register(`sessionContextGroup:handlerRemoved-${this.id}`,this.handlerRemoved.bind(this))}getCurrentContext(e){return e.type?this.contextGroupMap.get(e.type):this.lastContext}setContext(t,n){const{context:i}=t,r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name} not in Session Client State Map`);this.contextGroupMap.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{e.contextHandlers.get(i.type)?.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getClientState(e){return this.clients.get(e.endpointId)}async handlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(i){const e=r.contextHandlers.get(i)||[];r.contextHandlers.set(i,[...e,n]);const o=this.contextGroupMap.get(i);o&&await this.provider.dispatch(t,n,o)}else{r.globalHandler=n;const e=[...this.contextGroupMap.keys()].map((async e=>{const i=this.contextGroupMap.get(e);i&&await this.provider.dispatch(t,n,i)}));await Promise.all(e)}}handlerRemoved(e,t){const{handlerId:n}=e,i=this.clients.get(t.endpointId);i?(Array.from(i.contextHandlers).forEach((([,e])=>{const t=e.indexOf(n);t>-1&&e.splice(t,1)})),i.globalHandler===n&&(i.globalHandler=void 0)):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={contextHandlers:new Map,clientIdentity:e,globalHandler:void 0};this.clients.set(e.endpointId,t)}}onDisconnection(e){this.clients.delete(e.endpointId)}},Wi}()),l=Hi,u=a(i),p=function(){if(Ni)return Ui;Ni=1,Object.defineProperty(Ui,"__esModule",{value:!0}),Ui.PrivateChannelProvider=void 0;const e=Vi();return Ui.PrivateChannelProvider=class t{constructor(e,t){this.provider=e,this.id=t,this.clients=new Map,this.registerListeners(),this.contextByContextType=new Map,this.lastContext=void 0,this.provider.onConnection((e=>this.registerNewClient(e))),this.provider.onDisconnection((async e=>{const{endpointId:t}=e;this.clients.has(t)&&await this.handleClientDisconnecting(e),0===(await this.provider.getAllClientInfo()).length&&this.provider.destroy()}))}getClientState(e){return this.clients.get(e.endpointId)}registerListeners(){this.provider.register("broadcast",this.broadcast.bind(this)),this.provider.register("getCurrentContext",this.getCurrentContext.bind(this)),this.provider.register("contextHandlerAdded",this.contextHandlerAdded.bind(this)),this.provider.register("contextHandlerRemoved",this.contextHandlerRemoved.bind(this)),this.provider.register("nonStandardHandlerRemoved",this.nonStandardHandlerRemoved.bind(this)),this.provider.register("onAddContextHandlerAdded",this.onAddContextHandlerAdded.bind(this)),this.provider.register("onDisconnectHandlerAdded",this.onDisconnectHandlerAdded.bind(this)),this.provider.register("onUnsubscribeHandlerAdded",this.onUnsubscribeHandlerAdded.bind(this)),this.provider.register("clientDisconnecting",((e,t)=>{this.handleClientDisconnecting(t)}))}broadcast(t,n){const{context:i}=t;if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name}, tried to call broadcast, is not connected to this Private Channel`);const r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to broadcast - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);this.contextByContextType.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{const t=e.handlerIdsByContextTypes.get(i.type);t&&t.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getCurrentContext(e,t){const{contextType:n}=e;if(!this.getClientState(t))throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call getCurrentContext, is not connected to this Private Channel`);if(void 0!==n){return this.contextByContextType.get(n)||null}return this.lastContext?this.lastContext:null}contextHandlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call addContextListener, is not connected to this Private Channel`);if(i){const e=r.handlerIdsByContextTypes.get(i)||[];r.handlerIdsByContextTypes.set(i,[...e,n])}else r.globalHandler=n;Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&e.onAddContextListenerHandlerId&&this.provider.dispatch(e.clientIdentity,e.onAddContextListenerHandlerId,i)}))}async contextHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);if(i){let e;if(i.globalHandler===n)i.globalHandler=void 0;else for(const[t,r]of i.handlerIdsByContextTypes){const i=r.indexOf(n);i>-1&&(r.splice(i,1),e=t)}const r=(await this.getConnectedClients()).map((async n=>{const{clientIdentity:i,clientIdentity:{endpointId:r},onUnsubscribeHandlerId:o}=n;r!==t.endpointId&&o&&await this.provider.dispatch(i,o,e)}));try{await Promise.all(r)}catch(e){throw console.error(`Problem when attempting to dispatch to onUnsubscribeHandlers. Error: ${e} Removing Client: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}`),new Error(e)}}else console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}.`)}nonStandardHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);i?i.onDisconnectHandlerId===n?i.onDisconnectHandlerId=void 0:i.onAddContextListenerHandlerId===n?i.onAddContextListenerHandlerId=void 0:i.onUnsubscribeHandlerId===n&&(i.onUnsubscribeHandlerId=void 0):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}onAddContextHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onAddContextListener, is not connected to this Private Channel`);n.onAddContextListenerHandlerId=i,Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&Array.from(e.handlerIdsByContextTypes.keys()).forEach((e=>{this.provider.dispatch(t,i,e)}))}))}onDisconnectHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onDisconnect, is not connected to this Private Channel`);n.onDisconnectHandlerId=i}onUnsubscribeHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onUnsubscribe, is not connected to this Private Channel`);n.onUnsubscribeHandlerId=i}removeClient(e){const t=this.getClientState(e);if(!t)throw new Error(`Client with Identity: ${e.uuid} ${e.name}, tried to call disconnect, is not connected to this Private Channel`);t.handlerIdsByContextTypes.clear(),this.clients.delete(e.endpointId)}async fireOnDisconnectForOtherClients(e){const{endpointId:t}=e,n=(await this.getConnectedClients()).map((async e=>{const{clientIdentity:{endpointId:n},onDisconnectHandlerId:i}=e;n!==t&&i&&await this.provider.dispatch(e.clientIdentity,i)}));try{await Promise.all(n)}catch(t){throw console.error(`Problem when attempting to dispatch to onDisconnectHandlers. Error: ${t} Disconnecting Client: uuid: ${e.uuid}. name: ${e.name}. endpointId: ${e.endpointId}`),new Error(t)}}async unsubscribeAll(e){const{endpointId:t}=e,n=this.clients.get(t);if(n){const t=Array.from(n.handlerIdsByContextTypes.values()).flat(),i=n.globalHandler;if(t.length>0){const n=t.map((async t=>this.contextHandlerRemoved({handlerId:t},e)));try{await Promise.all(n)}catch(e){console.error(e.message)}}if(i)try{await this.contextHandlerRemoved({handlerId:i},e)}catch(e){console.error(e.message)}}}async handleClientDisconnecting(e){await this.unsubscribeAll(e),this.removeClient(e),await this.fireOnDisconnectForOtherClients(e)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={clientIdentity:e,handlerIdsByContextTypes:new Map,globalHandler:void 0,onAddContextListenerHandlerId:void 0,onUnsubscribeHandlerId:void 0,onDisconnectHandlerId:void 0};this.clients.set(e.endpointId,t)}}async getConnectedClients(){const e=await this.provider.getAllClientInfo();return Array.from(this.clients.values()).filter((t=>{const{uuid:n,name:i}=t.clientIdentity;return e.some((e=>i===e.name&&n===e.uuid))}))}static init(e,n){return new t(e,n)}},Ui}(),w=G,y=[{id:"green",displayMetadata:{color:"#00CC88",name:"green"}},{id:"purple",displayMetadata:{color:"#8C61FF",name:"purple"}},{id:"orange",displayMetadata:{color:"#FF8C4C",name:"orange"}},{id:"red",displayMetadata:{color:"#FF5E60",name:"red"}},{id:"pink",displayMetadata:{color:"#FF8FB8",name:"pink"}},{id:"yellow",displayMetadata:{color:"#E9FF8F",name:"yellow"}}];let f=class i extends c.Base{constructor(i,s,a){super(i),e.set(this,void 0),t.set(this,void 0),n.set(this,void 0),this.getProvider=()=>o(this,n,"f").getValue(),this.interopClients=new Map,this.contextGroupsById=new Map,r(this,t,a.contextGroups??[...y],"f"),r(this,e,a.fdc3Info,"f"),a?.logging&&(this.logging=a.logging),this.intentClientMap=new Map,this.lastContextMap=new Map,this.sessionContextGroupMap=new Map,r(this,n,new w.Lazy(s),"f"),this.setContextGroupMap(),this.setupChannelProvider()}static createClosedConstructor(...e){return class extends i{constructor(...t){if(t.length){const[n,i,r]=t;if(r&&"object"==typeof r&&!(0,u.default)(r,e[2]))return console.warn("You have modified the parameters of the InteropOverride constructor. This behavior is deprecated and will be removed in a future version. You can modify these options in your manifest. Please consult our Interop docs for guidance on migrating to the new override scheme."),void super(e[0],e[1],r);console.warn("You are attempting to pass arguments to the InteropOverride constructor. This is not necessary, and these passed arguments will be ignored. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.")}super(...e)}}}setContext({context:e},t){this.wire.sendAction("interop-broker-set-context").catch((e=>{}));const n=this.getClientState(t);if(!n||!n.contextGroupId)throw n?new Error("You must join a context group before you can set context."):new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);{const{contextGroupId:t}=n;this.setContextForGroup({context:e},t)}}setContextForGroup({context:e},t){this.wire.sendAction("interop-broker-set-context-for-group").catch((e=>{}));const n=this.contextGroupsById.get(t);if(!n)throw new Error(`Unable to set context for context group that isn't in the context group mapping: ${t}.`);const r=i.checkContextIntegrity(e);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(e)}`);const o=e.type;n.set(o,e),this.lastContextMap.set(t,o);Array.from(this.interopClients.values()).filter((e=>e.contextGroupId===t)).forEach((t=>{for(const[,n]of t.contextHandlers)i.isContextTypeCompatible(o,n.contextType)&&this.invokeContextHandler(t.clientIdentity,n.handlerId,e)}))}getCurrentContext(e,t){this.wire.sendAction("interop-broker-get-current-context").catch((e=>{}));const n=this.getClientState(t);if(!n?.contextGroupId)throw new Error("You must be a member of a context group to call getCurrentContext");const{contextGroupId:i}=n,r=this.contextGroupsById.get(i),o=this.lastContextMap.get(i),s=e?.contextType??o;return r&&s?r.get(s):void 0}async joinContextGroup({contextGroupId:e,target:t},n){if(this.wire.sendAction("interop-broker-join-context-group").catch((e=>{})),this.sessionContextGroupMap.has(e))throw new Error(l.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup);if(t){i.hasEndpointId(t)&&await this.addClientToContextGroup({contextGroupId:e},t);try{const n=this.channel.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name));if(!n.length)throw new Error(`Given Identity ${t.uuid} ${t.name} is not connected to the Interop Broker.`);n.length>1&&console.warn(`More than one connection found for identity ${t.uuid} ${t.name}`);const i=[];for(const t of n)i.push(this.addClientToContextGroup({contextGroupId:e},t));await Promise.all(i)}catch(e){throw new Error(e)}}else await this.addClientToContextGroup({contextGroupId:e},n)}async addClientToContextGroup({contextGroupId:e},t){this.wire.sendAction("interop-broker-add-client-to-context-group").catch((e=>{}));const n=this.getClientState(t);if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(!this.getContextGroups().find((t=>t.id===e)))throw new Error(`Attempting to join a context group that does not exist: ${e}. You may only join existing context groups.`);if(n.contextGroupId!==e){n.contextGroupId=e,await this.setCurrentContextGroupInClientOptions(t,e);const i=this.contextGroupsById.get(e);for(const[,e]of n.contextHandlers){const{contextType:n,handlerId:r}=e;if(void 0===n)i.forEach(((e,n)=>{this.invokeContextHandler(t,r,e)}));else if(i.has(n)){const e=i.get(n);e&&this.invokeContextHandler(t,r,e)}}}}async removeFromContextGroup({target:e},t){if(this.wire.sendAction("interop-broker-remove-from-context-group").catch((e=>{})),e){i.hasEndpointId(e)&&await this.removeClientFromContextGroup(e);try{const t=this.channel.connections.filter((t=>t.uuid===e.uuid&&t.name===e.name));if(!t.length)throw new Error(`No connection found for given Identity ${e.uuid} ${e.name}`);t.length>1&&console.warn(`More than one connection found for identity ${e.uuid} ${e.name}`);const n=[];for(const e of t)n.push(this.removeClientFromContextGroup(e));await Promise.all(n)}catch(e){throw new Error(e)}}else await this.removeClientFromContextGroup(t)}async removeClientFromContextGroup(e){this.wire.sendAction("interop-broker-remove-client-from-context-group").catch((e=>{}));const t=this.getClientState(e);t&&(t.contextGroupId=void 0),await this.setCurrentContextGroupInClientOptions(e,null)}getContextGroups(){return this.wire.sendAction("interop-broker-get-context-groups").catch((e=>{})),o(this,t,"f").map((e=>({...e})))}getInfoForContextGroup({contextGroupId:e}){return this.wire.sendAction("interop-broker-get-info-for-context-group").catch((e=>{})),this.getContextGroups().find((t=>t.id===e))}getAllClientsInContextGroup({contextGroupId:e}){this.wire.sendAction("interop-broker-get-all-clients-in-context-group").catch((e=>{}));return Array.from(this.interopClients.values()).filter((t=>t.contextGroupId===e)).map((e=>e.clientIdentity))}async handleFiredIntent(e,t){const n=(0,l.generateOverrideWarning)("fdc3.raiseIntent","InteropBroker.handleFiredIntent",t,"interopClient.fireIntent");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntent)}async setIntentTarget(e,t){this.wire.sendAction("interop-broker-set-intent-target").catch((e=>{}));const n=this.intentClientMap.get(t.name),i=`intent-handler-${e.name}`;if(n){const t=n.get(i);if(t){if(t.pendingIntents.push(e),t.clientIdentity&&t.isReady){const{clientIdentity:e,pendingIntents:n}=t;try{const r=n[n.length-1];await this.invokeIntentHandler(e,i,r),t.pendingIntents=[]}catch(n){console.error(`Error invoking intent handler for client ${e.uuid}/${e.name}/${e.endpointId}`),t.isReady=!1}}}else n.set(i,{isReady:!1,pendingIntents:[e]})}else{this.intentClientMap.set(t.name,new Map);const n=this.intentClientMap.get(t.name);n&&n.set(i,{isReady:!1,pendingIntents:[e]})}}async handleInfoForIntent(e,t){const n=(0,l.generateOverrideWarning)("fdc3.findIntent","InteropBroker.handleInfoForIntent",t,"interopClient.getInfoForIntent");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntent)}async handleInfoForIntentsByContext(e,t){const n=(0,l.generateOverrideWarning)("fdc3.findIntentsByContext","InteropBroker.handleInfoForIntentsByContext",t,"interopClient.getInfoForIntentsByContext");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntentsByContext)}async handleFiredIntentForContext(e,t){const n=(0,l.generateOverrideWarning)("fdc3.raiseIntentForContext","InteropBroker.handleFiredIntentForContext",t,"interopClient.fireIntentForContext");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntentForContext)}async clientDisconnected(e){}async fdc3HandleOpen({app:e,context:t},n){const i=(0,l.generateOverrideWarning)("fdc3.open","InteropBroker.fdc3HandleOpen",n);throw console.warn(i),new Error(l.BROKER_ERRORS.fdc3Open)}async fdc3HandleFindInstances(e,t){const n=(0,l.generateOverrideWarning)("fdc3.open","InteropBroker.fdc3HandleFindInstances",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3FindInstances)}async fdc3HandleGetAppMetadata(e,t){const n=(0,l.generateOverrideWarning)("fdc3.getAppMetadata","InteropBroker.fdc3HandleGetAppMetadata",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3GetAppMetadata)}async invokeContextHandler(e,t,n){const i=await this.getProvider();try{await i.dispatch(e,t,n)}catch(i){console.error(`Error invoking context handler ${t} for context type ${n.type} in client ${e.uuid}/${e.name}/${e.endpointId}`,i)}}async invokeIntentHandler(e,t,n){const i=await this.getProvider();await i.dispatch(e,t,n)}async fdc3HandleGetInfo(t,n){const{fdc3Version:i}=t;return{fdc3Version:i,...o(this,e,"f"),optionalFeatures:{OriginatingAppMetadata:!1,UserChannelMembershipAPIs:!0},appMetadata:{appId:"",instanceId:""}}}async getAllClientInfo(){return(await this.getProvider()).getAllClientInfo()}decorateSnapshot(e){return{...e,interopSnapshotDetails:{contextGroupStates:this.getContextGroupStates()}}}applySnapshot(e,t){const n=e?.interopSnapshotDetails?.contextGroupStates;n&&(t?.closeExistingWindows||this.updateExistingClients(n),this.rehydrateContextGroupStates(n))}updateExistingClients(e){this.interopClients.forEach((t=>{const{clientIdentity:n,contextGroupId:r,contextHandlers:o}=t;if(r){const t=e[r];for(const[,e]of Object.entries(t))o.forEach((t=>{const{handlerId:r,contextType:o}=t;i.isContextTypeCompatible(e.type,o)&&this.invokeContextHandler(n,r,e)}))}}))}getContextGroupStates(){return i.toObject(this.contextGroupsById)}rehydrateContextGroupStates(e){const t=Object.entries(e);for(const[e,n]of t){const t=Object.entries(n);for(const[n,i]of t)if(this.contextGroupsById.has(e)){this.contextGroupsById.get(e).set(n,i)}else console.warn(`Attempting to set a context group that isn't in the context group mapping. Skipping context group rehydration for: ${e}`)}}contextHandlerRegistered({contextType:e,handlerId:t},n){const i={contextType:e,handlerId:t},r=this.getClientState(n);if(r?.contextHandlers.set(t,i),r&&r.contextGroupId){const{contextGroupId:i}=r,o=this.contextGroupsById.get(i);if(void 0===e)o.forEach(((e,i)=>{this.invokeContextHandler(n,t,e)}));else if(o.has(e)){const i=o.get(e);i&&this.invokeContextHandler(n,t,i)}}}async intentHandlerRegistered(e,t){const{handlerId:n}=e,i=this.intentClientMap.get(t.name),r=i?.get(n);if(i)if(r){const{pendingIntents:e}=r;r.clientIdentity=t,r.isReady=!0;try{if(e.length>0){const i=e[e.length-1];await this.invokeIntentHandler(t,n,i),r.pendingIntents=[]}}catch(e){console.error(`Error invoking intent handler: ${n} for client ${t.uuid}/${t.name}/${t.endpointId}`)}}else i.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t});else{this.intentClientMap.set(t.name,new Map);const e=this.intentClientMap.get(t.name);e&&e.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t})}}removeContextHandler({handlerId:e},t){const n=this.getClientState(t);n&&n.contextHandlers.delete(e)}handleJoinSessionContextGroup({sessionContextGroupId:e},t){try{if(!e)throw new Error("Failed to join session context group: must specify group id.");const n=this.sessionContextGroupMap.get(e);if(n)n.registerNewClient(t);else{const n=new h.default(this.channel,e);n.registerNewClient(t),this.sessionContextGroupMap.set(e,n)}return{hasConflict:this.contextGroupsById.has(e)}}catch(e){throw new Error(e)}}getClientState(e){return this.interopClients.get(e.endpointId)}static toObject(e){const t=Object.fromEntries(e),n={};return Object.entries(t).forEach((([e,t])=>{const i=Object.fromEntries(t);n[e]=i})),n}static checkContextIntegrity(e){if(!e)return{isValid:!1,reason:"No context supplied"};if("object"!=typeof e)return{isValid:!1,reason:"Context must be an Object"};if(!e.type)return{isValid:!1,reason:"Context must have a type property"};if(e.id&&"object"!=typeof e.id)return{isValid:!1,reason:"Context id must be an Object populated with key-value identifiers (if set)"};if(e.id){const{id:t}=e,n=Object.keys(t);let i=!1;if(!n.length)return{isValid:!1,reason:"Context id must have at least one key-value identifier"};if(n.forEach((e=>{"string"==typeof e&&"string"==typeof t[e]||(i=!0)})),i)return{isValid:!1,reason:"Context id key-value identifiers must be of type string"}}return e.name&&"string"!=typeof e.name?{isValid:!1,reason:"Context name must be of string type (if set)"}:{isValid:!0}}static hasEndpointId(e){return void 0!==e.endpointId}static isContextTypeCompatible(e,t){return void 0===t||e===t}setContextGroupMap(){for(const e of this.getContextGroups())this.contextGroupsById.set(e.id,new Map)}async setCurrentContextGroupInClientOptions(e,t){try{const n=await this.fin.System.getEntityInfo(e.uuid,e.name);let i;"view"===n.entityType?i=await this.fin.View.wrap(e):"window"===n.entityType&&(i=await this.fin.Window.wrap(e)),i&&await i.updateOptions({interop:{currentContextGroup:t}})}catch(e){}}async setupChannelProvider(){try{const e=await this.getProvider();this.channel=e,this.wireChannel(e)}catch(e){throw new Error(`Error setting up Interop Broker Channel Provider: ${e}`)}}wireChannel(e){e.onConnection((async(e,t)=>{if(!await this.isConnectionAuthorized(e,t))throw new Error(`Connection not authorized for ${e.uuid}, ${e.name}`);if(!e.endpointId)throw new Error("Version too old to be compatible with Interop. Please upgrade your runtime to a more recent version.");const n={contextGroupId:void 0,contextHandlers:new Map,clientIdentity:e};t?.currentContextGroup&&this.contextGroupsById.has(t.currentContextGroup)&&(n.contextGroupId=t?.currentContextGroup),this.interopClients.set(e.endpointId,n)})),e.onDisconnection((e=>{this.interopClients.delete(e.endpointId);const t=this.intentClientMap.get(e.name);t&&e.uuid===this.fin.me.uuid&&t.forEach((e=>{e.isReady=!1})),this.sessionContextGroupMap.forEach((t=>{t.onDisconnection(e)})),this.clientDisconnected(e)})),e.beforeAction((async(e,t,n)=>{if(!await this.isActionAuthorized(e,t,n))throw new Error(`Action (${e}) not authorized for ${n.uuid}, ${n.name}`);this.logging?.beforeAction?.enabled&&console.log(e,t,n)})),e.afterAction(((e,t,n)=>{this.logging?.afterAction?.enabled&&console.log(e,t,n)})),e.register("setContext",this.setContext.bind(this)),e.register("fireIntent",this.handleFiredIntent.bind(this)),e.register("getCurrentContext",this.getCurrentContext.bind(this)),e.register("getInfoForIntent",this.handleInfoForIntent.bind(this)),e.register("getInfoForIntentsByContext",this.handleInfoForIntentsByContext.bind(this)),e.register("fireIntentForContext",this.handleFiredIntentForContext.bind(this)),e.register("getContextGroups",this.getContextGroups.bind(this)),e.register("joinContextGroup",this.joinContextGroup.bind(this)),e.register("removeFromContextGroup",this.removeFromContextGroup.bind(this)),e.register("getAllClientsInContextGroup",this.getAllClientsInContextGroup.bind(this)),e.register("getInfoForContextGroup",this.getInfoForContextGroup.bind(this)),e.register("contextHandlerRegistered",this.contextHandlerRegistered.bind(this)),e.register("intentHandlerRegistered",this.intentHandlerRegistered.bind(this)),e.register("removeContextHandler",this.removeContextHandler.bind(this)),e.register("sessionContextGroup:createIfNeeded",this.handleJoinSessionContextGroup.bind(this)),e.register("fdc3Open",this.fdc3HandleOpen.bind(this)),e.register("fdc3v2FindIntentsByContext",this.handleInfoForIntentsByContext.bind(this)),e.register("fdc3FindInstances",this.fdc3HandleFindInstances.bind(this)),e.register("fdc3GetAppMetadata",this.fdc3HandleGetAppMetadata.bind(this)),e.register("fdc3v2GetInfo",(async(e,t)=>this.fdc3HandleGetInfo.bind(this)(e,t))),e.register("createPrivateChannelProvider",(async e=>{const{channelId:t}=e,n=await this.fin.InterApplicationBus.Channel.create(t);p.PrivateChannelProvider.init(n,t)}))}isConnectionAuthorized(e,t){return this.wire.sendAction("interop-broker-is-connection-authorized").catch((e=>{})),Promise.resolve(!0)}isActionAuthorized(e,t,n){return this.wire.sendAction("interop-broker-is-action-authorized").catch((e=>{})),Promise.resolve(!0)}};return Gi.InteropBroker=f,e=new WeakMap,t=new WeakMap,n=new WeakMap,Gi}var zi,Ki={},qi={},Ji=s&&s.__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},Yi=s&&s.__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)};Object.defineProperty(qi,"__esModule",{value:!0});const Zi=d,Qi=Hi;class Xi extends Zi.Base{constructor(e,t,n){super(e),zi.set(this,void 0),this.id=n,Ji(this,zi,t,"f")}async setContext(e){this.wire.sendAction("interop-session-context-group-set-context").catch((e=>{}));return(await Yi(this,zi,"f")).dispatch(`sessionContextGroup:setContext-${this.id}`,{sessionContextGroupId:this.id,context:e})}async getCurrentContext(e){this.wire.sendAction("interop-session-context-group-get-context").catch((e=>{}));return(await Yi(this,zi,"f")).dispatch(`sessionContextGroup:getContext-${this.id}`,{sessionContextGroupId:this.id,type:e})}async addContextHandler(e,t){if(this.wire.sendAction("interop-session-context-group-add-handler").catch((e=>{})),"function"!=typeof e)throw new Error("Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");const n=await Yi(this,zi,"f");let i;return i=t?`sessionContextHandler:invoke-${this.id}-${t}-${(0,Qi.generateId)()}`:`sessionContextHandler:invoke-${this.id}`,n.register(i,(0,Qi.wrapContextHandler)(e,i)),await n.dispatch(`sessionContextGroup:handlerAdded-${this.id}`,{handlerId:i,contextType:t}),{unsubscribe:await this.createUnsubscribeCb(i)}}async createUnsubscribeCb(e){const t=await Yi(this,zi,"f");return async()=>{t.remove(e),await t.dispatch(`sessionContextGroup:handlerRemoved-${this.id}`,{handlerId:e})}}getUserInstance(){return{id:this.id,setContext:(0,Qi.wrapInTryCatch)(this.setContext.bind(this),"Failed to set context: "),getCurrentContext:(0,Qi.wrapInTryCatch)(this.getCurrentContext.bind(this),"Failed to get context: "),addContextHandler:(0,Qi.wrapInTryCatch)(this.addContextHandler.bind(this),"Failed to add context handler: ")}}}qi.default=Xi,zi=new WeakMap;var er={},tr={},nr={},ir={},rr=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),or=s&&s.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),sr=s&&s.__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)&&rr(t,e,n);return or(t,e),t};Object.defineProperty(ir,"__esModule",{value:!0}),ir.PrivateChannelClient=void 0;const ar=sr(Hi);var cr,dr;function hr(){if(cr)return tr;cr=1;var e,t=s&&s.__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)},n=s&&s.__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},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(tr,"__esModule",{value:!0}),tr.FDC3ModuleBase=void 0;const o=nr,a=Hi,c=wr(),d=r(i);return tr.FDC3ModuleBase=class{get client(){return t(this,e,"f").call(this)}get fin(){return this.wire.getFin()}constructor(t,i){this.wire=i,e.set(this,void 0),n(this,e,t,"f")}async broadcast(e){return this.wire.sendAction("fdc3-broadcast").catch((e=>{})),this.client.setContext(e)}async _open(e,t){this.wire.sendAction("fdc3-open").catch((e=>{}));try{return await c.InteropClient.ferryFdc3Call(this.client,"fdc3Open",{app:e,context:t})}catch(e){const t=e.message===a.BROKER_ERRORS.fdc3Open?"ResolverUnavailable":e.message;throw new Error(t)}}async _getChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:"system",...(0,o.getUnsupportedChannelApis)()})))}async getOrCreateChannel(e){this.wire.sendAction("fdc3-get-or-create-channel").catch((e=>{}));const t=(await this._getChannels()).find((t=>t.id===e));if(t)return{...t,type:"system",...(0,o.getUnsupportedChannelApis)()};try{const t=await this.client.joinSessionContextGroup(e);return(0,o.buildAppChannelObject)(t)}catch(e){throw console.error(e.message),new Error(o.ChannelError.CreationFailed)}}async getSystemChannels(){return this.wire.sendAction("fdc3-get-system-channels").catch((e=>{})),this._getChannels()}async joinChannel(e){this.wire.sendAction("fdc3-join-channel").catch((e=>{}));try{return await this.client.joinContextGroup(e)}catch(e){if(e.message===a.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup?console.error("The Channel you have tried to join is an App Channel. Custom Channels can only be defined by the Interop Broker through code or manifest configuration. Please use getOrCreateChannel."):console.error(e.message),e.message.startsWith("Attempting to join a context group that does not exist"))throw new Error(o.ChannelError.NoChannelFound);throw new Error(o.ChannelError.AccessDenied)}}async getCurrentChannel(){this.wire.sendAction("fdc3-get-current-channel").catch((e=>{}));const e=await this.getCurrentContextGroupInfo();return e?this.buildChannelObject(e):null}async leaveCurrentChannel(){return this.wire.sendAction("fdc3-leave-current-channel").catch((e=>{})),this.client.removeFromContextGroup()}async getCurrentContextGroupInfo(){const e=await this.client.getContextGroups(),t=e.map((async e=>this.client.getAllClientsInContextGroup(e.id))),n=(await Promise.all(t)).findIndex((e=>e.some((e=>{const{uuid:t,name:n}=e;return this.wire.me.uuid===t&&this.wire.me.name===n}))));return e[n]}async buildChannelObject(e){return{...e,type:"system",addContextListener:(...[e,t])=>{let n,i;"function"==typeof e?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),n=e):(n=t,"string"==typeof e&&(i=e));const r=(async()=>{let e=!0;const t=await this.client.getCurrentContext(i);return this.client.addContextHandler(((i,r)=>{if(!e||(e=!1,!(0,d.default)(t,i)))return n(i,r)}),i)})();return{...r,unsubscribe:()=>r.then((e=>e.unsubscribe()))}},broadcast:this.broadcast.bind(this),getCurrentContext:async e=>{const t=await this.client.getCurrentContext(e);return void 0===t?null:t}}}},e=new WeakMap,tr}ir.PrivateChannelClient=class{constructor(e,t){this.id=t,this.client=e,this.listeners=new Map}async broadcast(e){return this.client.dispatch("broadcast",{context:e})}async getCurrentContext(e){return this.client.dispatch("getCurrentContext",{contextType:e})}async addContextListener(e,t){if("function"!=typeof t)throw new Error("Non-function argument passed to the second parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");let n;n=e?`contextHandler:invoke-${this.id}-${e}-${ar.generateId()}`:`contextHandler:invoke-${this.id}-${ar.generateId()}`,this.client.register(n,ar.wrapContextHandler(t,n));const i={unsubscribe:await this.createContextUnsubscribeCb(n)};return this.listeners.set(n,i),await this.client.dispatch("contextHandlerAdded",{handlerId:n,contextType:e}),i}createNonStandardUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch("nonStandardHandlerRemoved",{handlerId:e})}}createContextUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch("contextHandlerRemoved",{handlerId:e})}}onAddContextListener(e){const t=`onContextHandlerAdded:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch("onAddContextHandlerAdded",{handlerId:t}),n}onDisconnect(e){const t=`onDisconnect:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch("onDisconnectHandlerAdded",{handlerId:t}),n}onUnsubscribe(e){const t=`onUnsubscribe:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch("onUnsubscribeHandlerAdded",{handlerId:t}),n}async cleanUpAllSubs(){Array.from(this.listeners.keys()).forEach((e=>{this.client.remove(e),this.listeners.delete(e)}))}async disconnect(){try{await this.client.dispatch("clientDisconnecting"),await this.cleanUpAllSubs(),await this.client.disconnect()}catch(e){throw new Error(e.message)}}},function(e){var t=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.getIntentResolution=e.isChannel=e.isContext=e.connectPrivateChannel=e.buildAppChannelObject=e.buildPrivateChannelObject=e.ChannelError=e.ResultError=e.UnsupportedChannelApiError=e.getUnsupportedChannelApis=void 0;const n=Hi,r=ir,o=t(i);e.getUnsupportedChannelApis=e=>({addContextListener:()=>{throw new a("Channel.addContextListener",e)},broadcast:()=>{throw new a("Channel.broadcast",e)},getCurrentContext:()=>{throw new a("Channel.getCurrentContext",e)}});class a extends Error{constructor(e,t="System"){super(e),this.message=`Calling ${e} on an instance of a ${t} Channel returned by fdc3.get${t}Channels is not supported. If you would like to use a ${t} Channel, please use fdc3.joinChannel, fdc3.addContextListener, and fdc3.broadcast instead.`}}var c,d;e.UnsupportedChannelApiError=a,function(e){e.NoResultReturned="NoResultReturned",e.IntentHandlerRejected="IntentHandlerRejected"}(c=e.ResultError||(e.ResultError={})),(d=e.ChannelError||(e.ChannelError={})).NoChannelFound="NoChannelFound",d.AccessDenied="AccessDenied",d.CreationFailed="CreationFailed";e.buildPrivateChannelObject=e=>{let t=!1;const n=()=>{if(t)throw new Error("Private Channel Client has been disconnected from the Private Channel")};return{id:e.id,type:"private",broadcast:async t=>(n(),e.broadcast(t)),getCurrentContext:async t=>(n(),e.getCurrentContext(t)),addContextListener:async(t,i)=>{n();let r=i,o=t;"function"==typeof t&&(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),r=t,o=null);return e.addContextListener(o,r)},onAddContextListener:t=>(n(),e.onAddContextListener(t)),disconnect:async()=>(n(),t=!0,e.disconnect()),onDisconnect:t=>(n(),e.onDisconnect(t)),onUnsubscribe:t=>(n(),e.onUnsubscribe(t))}};e.buildAppChannelObject=e=>({id:e.id,type:"app",broadcast:e.setContext,getCurrentContext:async t=>{const n=await e.getCurrentContext(t);return void 0===n?null:n},addContextListener:(t,n)=>{let i,r;"function"==typeof t?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),i=t):(i=n,"string"==typeof t&&(r=t));const s=(async()=>{let t=!0;const n=await e.getCurrentContext(r);return e.addContextHandler(((e,r)=>{if(!t||(t=!1,!(0,o.default)(n,e)))return i(e,r)}),r)})();return{...s,unsubscribe:()=>s.then((e=>e.unsubscribe()))}}});e.connectPrivateChannel=async t=>{try{const n=await fin.InterApplicationBus.Channel.connect(t),i=new r.PrivateChannelClient(n,t);return(0,e.buildPrivateChannelObject)(i)}catch(e){throw new Error(`Private Channel with id: ${t} doesn't exist`)}};e.isContext=e=>{if(e&&"object"==typeof e&&"type"in e){const{type:t}=e;return"string"==typeof t}return!1};e.isChannel=e=>{if(e&&"object"==typeof e&&"type"in e&&"id"in e){const{type:t,id:n}=e;return"string"==typeof t&&"string"==typeof n&&("app"===t||"private"===t)}return!1};e.getIntentResolution=async(t,i,r,o)=>{const s=(0,n.generateId)(),a=new Promise(((e,t)=>{fin.InterApplicationBus.subscribe({uuid:"*"},s,(t=>{e(t)})).catch((()=>t(new Error("getResult is not supported in this environment"))))})),d=r?{target:r,intentResolutionResultId:s}:{intentResolutionResultId:s},h=o?{name:o,context:i,metadata:d}:{...i,metadata:d},l=async()=>{let n=await a;if(!n||"object"!=typeof n)throw new Error(c.NoResultReturned);const{error:i}=n;if(i)throw new Error(c.IntentHandlerRejected);if((0,e.isChannel)(n)){const{id:i,type:r}=n;switch(r){case"private":n=await(0,e.connectPrivateChannel)(i);break;case"app":{const r=await t.joinSessionContextGroup(i);n=(0,e.buildAppChannelObject)(r);break}}}else if(!(0,e.isContext)(n))throw new Error(c.NoResultReturned);return n},u=o?await t.fireIntent(h):await t.fireIntentForContext(h);return"object"!=typeof u?{source:{appId:"",instanceId:""},intent:"",version:"2.0",getResult:l}:{...u,getResult:l}}}(nr);var lr,ur,pr={};function wr(){if(ur)return Ki;ur=1;var e,t,n=s&&s.__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},i=s&&s.__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)},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ki,"__esModule",{value:!0}),Ki.InteropClient=void 0;const o=d,a=r(qi),c=function(){if(dr)return er;dr=1,Object.defineProperty(er,"__esModule",{value:!0}),er.Fdc3Module=void 0;const e=Hi,t=hr();class n extends t.FDC3ModuleBase{async open(e,t){await super._open(e,t)}addContextListener(e,t){let n;return this.wire.sendAction("fdc3-add-context-listener").catch((e=>{})),"function"==typeof e?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),n=this.client.addContextHandler(e)):n=this.client.addContextHandler(t,null===e?void 0:e),{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}addIntentListener(e,t){this.wire.sendAction("fdc3-add-intent-listener").catch((e=>{}));const n=this.client.registerIntentHandler((e=>{const{context:n,metadata:i}=e,{metadata:r}=n,o=i?.intentResolutionResultId||r?.intentResolutionResultId;o&&this.fin.InterApplicationBus.publish(o,null).catch((()=>null)),t(e.context)}),e,{fdc3Version:"1.2"});return{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}async raiseIntent(t,n,i){this.wire.sendAction("fdc3-raise-intent").catch((e=>{}));const r=i?{name:t,context:n,metadata:{target:i}}:{name:t,context:n};try{return await this.client.fireIntent(r)}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntent?"ResolverUnavailable":t.message;throw new Error(n)}}async findIntent(t,n){this.wire.sendAction("fdc3-find-intent").catch((e=>{}));try{return await this.client.getInfoForIntent({name:t,context:n})}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntent?"ResolverUnavailable":t.message;throw new Error(n)}}async findIntentsByContext(t){this.wire.sendAction("fdc3-find-intents-by-context").catch((e=>{}));try{return await this.client.getInfoForIntentsByContext(t)}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntentsByContext?"ResolverUnavailable":t.message;throw new Error(n)}}async raiseIntentForContext(t,n){this.wire.sendAction("fdc3-raise-intent-for-context").catch((e=>{}));try{return await this.client.fireIntentForContext({...t,metadata:{target:n}})}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntentForContext?"ResolverUnavailable":t.message;throw new Error(n)}}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}getInfo(){return this.wire.sendAction("fdc3-get-info").catch((e=>{})),{providerVersion:this.wire.environment.getAdapterVersionSync(),provider:`openfin-${this.wire.me.uuid}`,fdc3Version:"1.2"}}}return er.Fdc3Module=n,er}(),h=function(){if(lr)return pr;lr=1,Object.defineProperty(pr,"__esModule",{value:!0}),pr.Fdc3Module2=void 0;const e=hr(),t=Hi,n=wr(),i=nr,r=ir;class o extends e.FDC3ModuleBase{async open(e,t){return"string"==typeof e&&console.warn("Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string })."),super._open(e,t)}async findInstances(e){this.wire.sendAction("fdc3-find-instances").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,"fdc3FindInstances",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3FindInstances?"ResolverUnavailable":e.message;throw new Error(n)}}async getAppMetadata(e){this.wire.sendAction("fdc3-get-app-metadata").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,"fdc3GetAppMetadata",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3GetAppMetadata?"ResolverUnavailable":e.message;throw new Error(n)}}async addContextListener(e,t){this.wire.sendAction("fdc3-add-context-listener").catch((e=>{}));const n=e=>t=>{const{contextMetadata:n,...i}=t,r=n?[{...i},n]:[t,null];e(...r)};let i=t,r=n(i);return"function"==typeof e?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),i=e,r=n(i),this.client.addContextHandler(r)):this.client.addContextHandler(r,null===e?void 0:e)}async findIntent(e,n,i){this.wire.sendAction("fdc3-find-intent").catch((e=>{}));try{return await this.client.getInfoForIntent({name:e,context:n,metadata:{resultType:i}})}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntent?"ResolverUnavailable":e.message;throw new Error(n)}}async findIntentsByContext(e,i){this.wire.sendAction("fdc3-find-intents-by-context").catch((e=>{}));const r=i?{context:e,metadata:{resultType:i}}:e;try{return await n.InteropClient.ferryFdc3Call(this.client,"fdc3v2FindIntentsByContext",r)}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntentsByContext?"ResolverUnavailable":e.message;throw new Error(n)}}async raiseIntent(e,n,r){this.wire.sendAction("fdc3-raise-intent").catch((e=>{}));try{return"string"==typeof r&&console.warn("Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string })."),(0,i.getIntentResolution)(this.client,n,r,e)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?"ResolverUnavailable":e.message;throw new Error(n)}}async raiseIntentForContext(e,n){this.wire.sendAction("fdc3-raise-intent-for-context").catch((e=>{}));try{return"string"==typeof n&&console.warn("Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string })."),(0,i.getIntentResolution)(this.client,e,n)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?"ResolverUnavailable":e.message;throw new Error(n)}}async addIntentListener(e,t){if(this.wire.sendAction("fdc3-add-intent-listener").catch((e=>{})),"string"!=typeof e)throw new Error("First argument must be an Intent name");return this.client.registerIntentHandler((async e=>{let n,i;const{context:r,metadata:o}=e,{contextMetadata:s,metadata:a,...c}=r,d=o?.intentResolutionResultId||a?.intentResolutionResultId;try{const e=a?{metadata:a,...c}:{...c};n=await t(e,s),i=n}catch(e){n=e,i={error:!0}}if(d&&this.fin.InterApplicationBus.publish(d,i).catch((()=>null)),n instanceof Error)throw new Error(n.message);return n}),e,{fdc3Version:"2.0"})}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}async createPrivateChannel(){const e=(0,t.generateId)();await n.InteropClient.ferryFdc3Call(this.client,"createPrivateChannelProvider",{channelId:e});const o=await this.fin.InterApplicationBus.Channel.connect(e),s=new r.PrivateChannelClient(o,e);return(0,i.buildPrivateChannelObject)(s)}async getUserChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:"user",...(0,i.getUnsupportedChannelApis)("User")})))}async getSystemChannels(){return console.warn("This API has been deprecated. Please use fdc3.getUserChannels instead."),super.getSystemChannels()}async joinUserChannel(e){return super.joinChannel(e)}async joinChannel(e){return console.warn("This API has been deprecated. Please use fdc3.joinUserChannel instead."),super.joinChannel(e)}async getCurrentChannel(){const e=await super.getCurrentChannel();return e?{...e,type:"user",broadcast:this.broadcast.bind(this)}:null}async getInfo(){return n.InteropClient.ferryFdc3Call(this.client,"fdc3v2GetInfo",{fdc3Version:"2.0"})}}return pr.Fdc3Module2=o,pr}(),l=Hi;let u=class extends o.Base{constructor(i,r){super(i),e.set(this,void 0),t.set(this,void 0),n(this,t,new Map,"f"),n(this,e,r,"f")}async setContext(t){this.wire.sendAction("interop-client-set-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("setContext",{context:t})}async addContextHandler(t,n){if(this.wire.sendAction("interop-client-add-context-handler").catch((e=>{})),"function"!=typeof t)throw new Error("Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");const r=await i(this,e,"f");let o;o=n?`invokeContextHandler-${n}-${(0,l.generateId)()}`:"invokeContextHandler";const s=(0,l.wrapContextHandler)(t,o);return r.register(o,s),await r.dispatch("contextHandlerRegistered",{handlerId:o,contextType:n}),{unsubscribe:async()=>{r.remove(o),await r.dispatch("removeContextHandler",{handlerId:o})}}}async getContextGroups(){this.wire.sendAction("interop-client-get-context-groups").catch((e=>{}));return(await i(this,e,"f")).dispatch("getContextGroups")}async joinContextGroup(t,n){this.wire.sendAction("interop-client-join-context-group").catch((e=>{}));const r=await i(this,e,"f");if(!t)throw new Error("No contextGroupId specified for joinContextGroup.");return r.dispatch("joinContextGroup",{contextGroupId:t,target:n})}async removeFromContextGroup(t){this.wire.sendAction("interop-client-remove-from-context-group").catch((e=>{}));return(await i(this,e,"f")).dispatch("removeFromContextGroup",{target:t})}async getAllClientsInContextGroup(t){this.wire.sendAction("interop-client-get-all-clients-in-context-group").catch((e=>{}));const n=await i(this,e,"f");if(!t)throw new Error("No contextGroupId specified for getAllClientsInContextGroup.");return n.dispatch("getAllClientsInContextGroup",{contextGroupId:t})}async getInfoForContextGroup(t){this.wire.sendAction("interop-client-get-info-for-context-group").catch((e=>{}));const n=await i(this,e,"f");if(!t)throw new Error("No contextGroupId specified for getInfoForContextGroup.");return n.dispatch("getInfoForContextGroup",{contextGroupId:t})}async fireIntent(t){this.wire.sendAction("interop-client-fire-intent").catch((e=>{}));return(await i(this,e,"f")).dispatch("fireIntent",t)}async registerIntentHandler(t,n,r){this.wire.sendAction("interop-client-register-intent-handler").catch((e=>{}));const o=await i(this,e,"f"),s=`intent-handler-${n}`,a=(0,l.wrapIntentHandler)(t,s);try{await o.register(s,a),await o.dispatch("intentHandlerRegistered",{handlerId:s,...r})}catch(e){throw new Error("Unable to register intent handler")}return{unsubscribe:async()=>{o.remove(s)}}}async getCurrentContext(t){this.wire.sendAction("interop-client-get-current-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("getCurrentContext",{contextType:t})}async getInfoForIntent(t){this.wire.sendAction("interop-client-get-info-for-intent").catch((e=>{}));return(await i(this,e,"f")).dispatch("getInfoForIntent",t)}async getInfoForIntentsByContext(t){this.wire.sendAction("interop-client-get-info-for-intents-by-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("getInfoForIntentsByContext",t)}async fireIntentForContext(t){this.wire.sendAction("interop-client-fire-intent-for-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("fireIntentForContext",t)}async joinSessionContextGroup(n){try{const r=i(this,t,"f").get(n);if(r)return r.getUserInstance();const o=await i(this,e,"f"),{hasConflict:s}=await o.dispatch("sessionContextGroup:createIfNeeded",{sessionContextGroupId:n});s&&console.warn(`A (non-session) context group with the name "${n}" already exists. If you are trying to join a Context Group, call joinContextGroup instead.`);const c=new a.default(this.wire,i(this,e,"f"),n);return i(this,t,"f").set(n,c),c.getUserInstance()}catch(e){throw console.error(`Error thrown trying to create Session Context Group with id "${n}": ${e}`),e}}async onDisconnection(t){this.wire.sendAction("interop-client-add-ondisconnection-listener").catch((e=>{}));return(await i(this,e,"f")).onDisconnection((e=>{const{uuid:n}=e;t({type:"interop-broker",topic:"disconnected",brokerName:n})}))}getFDC3Sync(e){switch(e){case"1.2":return new c.Fdc3Module((()=>this),this.wire);case"2.0":return new h.Fdc3Module2((()=>this),this.wire);default:throw new Error(`Invalid FDC3 version provided: ${e}. Must be '1.2' or '2.0'`)}}async getFDC3(e){return this.getFDC3Sync(e)}static async ferryFdc3Call(t,n,r){return(await i(t,e,"f")).dispatch(n,r||null)}};return Ki.InteropClient=u,e=new WeakMap,t=new WeakMap,Ki}var yr,fr,gr,mr={};function vr(){if(yr)return mr;yr=1,Object.defineProperty(mr,"__esModule",{value:!0}),mr.overrideCheck=mr.checkFDC32Overrides=mr.getDefaultViewFdc3VersionFromAppInfo=void 0;const e=Vi();function t(t){return["fdc3HandleFindInstances","handleInfoForIntent","handleInfoForIntentsByContext","fdc3HandleGetAppMetadata","fdc3HandleGetInfo","fdc3HandleOpen","handleFiredIntent","handleFiredIntentForContext"].filter((n=>t[n]===e.InteropBroker.prototype[n]))}return mr.getDefaultViewFdc3VersionFromAppInfo=function({manifest:e,initialOptions:t}){const n=e?.platform?.defaultViewOptions?.fdc3InteropApi??t.defaultViewOptions?.fdc3InteropApi;return["1.2","2.0"].includes(n??"")?n:void 0},mr.checkFDC32Overrides=t,mr.overrideCheck=function(e,n){if(n&&"2.0"===n){const n=t(e);n.length>0&&console.warn(`WARNING: FDC3 2.0 has been set as a default option for Views in this Platform, but the required InteropBroker APIs for FDC3 2.0 compliance have not all been overridden.\nThe following APIs need to be overridden:\n${n.join("\n")}`)}},mr}function Cr(){return gr||(gr=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),i=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),i(function(){if(fr)return Ti;fr=1;var e=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ti,"__esModule",{value:!0}),Ti.InteropModule=void 0;const t=e(n),i=$i,r=d,o=Vi(),a=wr(),c=vr(),h=Tn,l=e=>new e,u="You have attempted to use or modify InteropBroker parameters, which is not allowed. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.";class p extends r.Base{async init(e,n=l){this.wire.sendAction("interop-init").catch((()=>{}));const r=await this.wire.environment.getInteropInfo(this.wire.getFin()),s=(0,i.createUnusableObject)(u),a=(0,i.createWarningObject)(u,(0,t.default)(r)),d=async()=>{throw new Error(u)},p=o.InteropBroker.createClosedConstructor(this.wire,(()=>this.fin.InterApplicationBus.Channel.create(`interop-broker-${e}`)),r);let w;return w=Array.isArray(n)?new((0,h.overrideFromComposables)(...n)(p))(s,d,a):await n(p,s,d,a),(0,c.overrideCheck)(w,r.fdc3Version),w}connectSync(e,t){return this.wire.sendAction("interop-connect-sync").catch((()=>{})),new a.InteropClient(this.wire,this.wire.environment.whenReady().then((()=>this.fin.InterApplicationBus.Channel.connect(`interop-broker-${e}`,{payload:t}))))}}return Ti.InteropModule=p,Ti}(),e),i(wr(),e),i(Vi(),e)}(Li)),Li}var br={},Ir={},Er={},xr={};Object.defineProperty(xr,"__esModule",{value:!0}),xr.getSnapshotSourceChannelName=void 0;xr.getSnapshotSourceChannelName=e=>`snapshot-source-provider-${e.uuid}`;var Ar,Pr,Mr,_r,Or,Sr=s&&s.__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},Rr=s&&s.__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)};Object.defineProperty(Er,"__esModule",{value:!0}),Er.SnapshotSource=void 0;const Fr=d,jr=xr,kr=new Map;class Lr extends Fr.Base{constructor(e,t){super(e),Ar.set(this,void 0),Pr.set(this,(()=>(kr.has(this.identity.uuid)||kr.set(this.identity.uuid,{eventFired:null,clientPromise:null}),kr.get(this.identity.uuid)))),Mr.set(this,(()=>(Rr(this,Pr,"f").call(this).clientPromise||(Rr(this,Pr,"f").call(this).clientPromise=Rr(this,_r,"f").call(this)),Rr(this,Pr,"f").call(this).clientPromise))),_r.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);try{Rr(this,Pr,"f").call(this).eventFired||await Rr(this,Or,"f").call(this);const t=await this.fin.InterApplicationBus.Channel.connect(e,{wait:!1});return t.onDisconnection((()=>{Rr(this,Pr,"f").call(this).clientPromise=null,Rr(this,Pr,"f").call(this).eventFired=null})),t}catch(e){throw Rr(this,Pr,"f").call(this).clientPromise=null,new Error("The targeted SnapshotSource is not currently initialized. Await this object's ready() method.")}})),Or.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);let t,n;const i=new Promise(((e,i)=>{t=e,n=i}));Rr(this,Pr,"f").call(this).eventFired=i;const r=async i=>{try{i.channelName===e&&(t(),await this.fin.InterApplicationBus.Channel.removeListener("connected",r))}catch(e){n(e)}};await this.fin.InterApplicationBus.Channel.on("connected",r)})),Sr(this,Ar,t,"f")}get identity(){return Rr(this,Ar,"f")}async ready(){this.wire.sendAction("snapshot-source-ready").catch((e=>{}));try{await Rr(this,Mr,"f").call(this)}catch(e){await Rr(this,Pr,"f").call(this).eventFired}}async getSnapshot(){this.wire.sendAction("snapshot-source-get-snapshot").catch((e=>{}));const e=await Rr(this,Mr,"f").call(this),t=await e.dispatch("get-snapshot");return(await t).snapshot}async applySnapshot(e){this.wire.sendAction("snapshot-source-apply-snapshot").catch((e=>{}));return(await Rr(this,Mr,"f").call(this)).dispatch("apply-snapshot",{snapshot:e})}}Er.SnapshotSource=Lr,Ar=new WeakMap,Pr=new WeakMap,Mr=new WeakMap,_r=new WeakMap,Or=new WeakMap,Object.defineProperty(Ir,"__esModule",{value:!0}),Ir.SnapshotSourceModule=void 0;const Tr=d,$r=Er,Br=xr;class Gr extends Tr.Base{async init(e){if(this.wire.sendAction("snapshot-source-init").catch((e=>{})),"object"!=typeof e||"function"!=typeof e.getSnapshot||"function"!=typeof e.applySnapshot)throw new Error("you must pass in a valid SnapshotProvider");const t=await this.fin.InterApplicationBus.Channel.create((0,Br.getSnapshotSourceChannelName)(this.fin.me));t.register("get-snapshot",(async()=>({snapshot:await e.getSnapshot()}))),t.register("apply-snapshot",(({snapshot:t})=>e.applySnapshot(t)))}wrapSync(e){return this.wire.sendAction("snapshot-source-wrap-sync").catch((e=>{})),new $r.SnapshotSource(this.wire,e)}async wrap(e){return this.wire.sendAction("snapshot-source-wrap").catch((e=>{})),this.wrapSync(e)}}Ir.SnapshotSourceModule=Gr,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Ir,e),n(Er,e)}(br),Object.defineProperty(a,"__esModule",{value:!0});var Wr=a.Fin=void 0;const Hr=t,Nr=c,Dr=ie(),Ur=Z(),Vr=de,zr=en,Kr=rn,qr=un,Jr=bn,Yr=J(),Zr=An,Qr=ki,Xr=Cr(),eo=br;class to extends Hr.EventEmitter{constructor(e){super(),this.wire=e,this.System=new Nr.System(e),this.Window=new Dr._WindowModule(e),this.Application=new Ur.ApplicationModule(e),this.InterApplicationBus=new Vr.InterApplicationBus(e),this.Clipboard=new zr.Clipboard(e),this.ExternalApplication=new Kr.ExternalApplicationModule(e),this.Frame=new qr._FrameModule(e),this.GlobalHotkey=new Jr.GlobalHotkey(e),this.Platform=new Zr.PlatformModule(e,this.InterApplicationBus.Channel),this.View=new Yr.ViewModule(e),this.Interop=new Xr.InteropModule(e),this.SnapshotSource=new eo.SnapshotSourceModule(e),e.registerFin(this),this.me=(0,Qr.getMe)(e),e.on("disconnected",(()=>{this.emit("disconnected")}))}}Wr=a.Fin=to;var no={},io={};function ro(e){return"string"==typeof e.manifestUrl}function oo(e){return ao(e)&&"string"==typeof e.address}function so(e){return oo(e)&&"string"==typeof e.token}function ao(e){return"string"==typeof e.uuid}function co(e){return e.runtime&&"string"==typeof e.runtime.version}function ho(e){return ao(e)&&co(e)}Object.defineProperty(io,"__esModule",{value:!0}),io.isInternalConnectConfig=io.isPortDiscoveryConfig=io.isNewConnectConfig=io.isConfigWithReceiver=io.isRemoteConfig=io.isExistingConnectConfig=io.isExternalConfig=void 0,io.isExternalConfig=ro,io.isExistingConnectConfig=oo,io.isRemoteConfig=so,io.isConfigWithReceiver=function(e){return"object"==typeof e.receiver&&so({...e,address:""})},io.isNewConnectConfig=ho,io.isPortDiscoveryConfig=function(e){return ro(e)&&co(e)||ho(e)},io.isInternalConnectConfig=function(e){return oo(e)||ho(e)};var lo={},uo={};Object.defineProperty(uo,"__esModule",{value:!0}),uo.EmitterMap=void 0;const po=t;function wo(e){return Buffer.from(e).toString("base64")}uo.EmitterMap=class{constructor(){this.storage=new Map}hashKeys(e){return e.map(wo).join("/")}getOrCreate(e){const t=this.hashKeys(e);return this.storage.has(t)||this.storage.set(t,new po.EventEmitter),this.storage.get(t)}has(e){return this.storage.has(this.hashKeys(e))}delete(e){const t=this.hashKeys(e);return this.storage.delete(t)}},Object.defineProperty(lo,"__esModule",{value:!0});const yo=uo;class fo extends yo.EmitterMap{constructor(){super(...arguments),this.dispatchEvent=e=>{if(function(e){return"process-desktop-event"===e.action}(e)){const{payload:t}=e,n=function(e){const{topic:t}=e;if("frame"===t||"window"===t||"view"===t){const{uuid:n,name:i}=e;return[t,n,i]}if("application"===t){const{uuid:n}=e;return[t,n]}return[t]}(t);if(this.has(n))return this.getOrCreate(n).emit(t.type,t),!0}return!1}}}lo.default=fo;var go,mo,vo=s&&s.__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},Co=s&&s.__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)},bo=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(no,"__esModule",{value:!0});var Io=no.Transport=void 0;const Eo=t,xo=io,Ao=g,Po=bo(lo),Mo=ki,_o=ke;class Oo extends Eo.EventEmitter{constructor(e,t,n){super(),this.wireListeners=new Map,this.topicRefMap=new Map,this.eventAggregator=new Po.default,this.messageHandlers=[this.eventAggregator.dispatchEvent],go.set(this,void 0),mo.set(this,void 0),this.connectSync=()=>{Co(this,go,"f").connectSync()},this.getPort=()=>Co(this,go,"f").getPort(),vo(this,go,new e(this.onmessage.bind(this)),"f"),this.environment=t,this.sendRaw=Co(this,go,"f").send.bind(Co(this,go,"f")),this.registerMessageHandler(this.handleMessage.bind(this)),Co(this,go,"f").on("disconnected",(()=>{for(const[,{handleNack:e}]of this.wireListeners)e({reason:"Remote connection has closed"});this.wireListeners.clear(),this.emit("disconnected")}));const{uuid:i,name:r}=n,o=this.environment.getCurrentEntityType();this.me=(0,Mo.getBaseMe)(o,i,r)}getFin(){if(!Co(this,mo,"f"))throw new Error("No Fin object registered for this transport");return Co(this,mo,"f")}registerFin(e){if(Co(this,mo,"f"))throw new Error("Fin object has already been registered for this transport");vo(this,mo,e,"f")}shutdown(){return Co(this,go,"f").shutdown()}async connect(e){if((0,xo.isConfigWithReceiver)(e))return await Co(this,go,"f").connect(e.receiver),this.authorize(e);if((0,xo.isRemoteConfig)(e))return this.connectRemote(e);if((0,xo.isExistingConnectConfig)(e))return this.connectByPort(e);if((0,xo.isNewConnectConfig)(e)){const t=await this.environment.retrievePort(e);return this.connectByPort({...e,address:`ws://localhost:${t}`})}}async connectRemote(e){return await Co(this,go,"f").connect(new(this.environment.getWsConstructor())(e.address)),this.authorize(e)}async connectByPort(e){const{address:t,uuid:n}=e,i={...e,type:"file-token"},r=Co(this,go,"f");await r.connect(new(this.environment.getWsConstructor())(e.address));const o=await this.sendAction("request-external-authorization",{uuid:n,type:"file-token"},!0);if("external-authorization-response"!==o.action)throw new Ao.UnexpectedActionError(o.action);return await this.environment.writeToken(o.payload.file,o.payload.token),this.authorize(i)}async authorize(e){const t=await this.sendAction("request-authorization",e,!0);if("authorization-response"!==t.action)throw new Ao.UnexpectedActionError(t.action);if(!0!==t.payload.success)throw new Ao.RuntimeError(t.payload)}sendAction(e,t={},n=!1){let i=()=>{};const r=Ao.RuntimeError.getCallSite(1),o=this.environment.getNextMessageId(),s=new Promise(((s,a)=>{i=a;const c={action:e,payload:t,messageId:o},d=Co(this,go,"f");return this.addWireListener(o,s,(e=>this.nackHandler(e,a,r)),n),d.send(c).catch(a)}));return Object.assign(s,{cancel:i,messageId:o})}nackHandler(e,t,n){t("string"==typeof e?e:new Ao.RuntimeError(e,n))}ferryAction(e){return new Promise(((t,n)=>{const i=this.environment.getNextMessageId();e.messageId=i;const r=e=>{t(e.payload)};return Co(this,go,"f").send(e).then((()=>this.addWireListener(i,r,(e=>this.nackHandler(e,n)),!1))).catch(n)}))}registerMessageHandler(e){this.messageHandlers.push(e)}addWireListener(e,t,n,i){i?this.uncorrelatedListener=t:this.wireListeners.has(e)?n({reason:"Duplicate handler id",error:(0,_o.errorToPOJO)(new Ao.DuplicateCorrelationError(String(e)))}):this.wireListeners.set(e,{resolve:t,handleNack:n})}onmessage(e){for(const t of this.messageHandlers)t.call(null,e)}handleMessage(e){const t=e.correlationId||NaN;if("correlationId"in e){if(!this.wireListeners.has(t))return!1;{const{resolve:n,handleNack:i}=this.wireListeners.get(t);"ack"!==e.action?i({reason:"Did not receive ack action",error:(0,_o.errorToPOJO)(new Ao.NoAckError(e.action))}):"payload"in e?e.payload.success?n.call(null,e):i(e.payload):"string"==typeof e.reason?i(e):(console.warn("Received invalid response from core",e),i({reason:"invalid response shape"})),this.wireListeners.delete(t)}}else this.uncorrelatedListener&&this.uncorrelatedListener.call(null,e),this.uncorrelatedListener=()=>{};return!0}}Io=no.Transport=Oo,go=new WeakMap,mo=new WeakMap;const So=(...e)=>({log:(...t)=>console.debug(`[${(new Date).toISOString()}]`,...(e=>e.map((e=>`[${e}]`)))(e),...t),getLogger:(...t)=>So(...e,...t)}),Ro=So("@openfin/core-web/client");function Fo(e,t){if(!function(e){return"string"==typeof e}(e))throw new Error(`Property ${t} has invalid type. Expected string, got ${typeof e}.`)}const jo="web-broker-ports-ready",ko=Ro.getLogger("get-web-interop-ports");function Lo(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)}function To(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}"function"==typeof SuppressedError&&SuppressedError;const $o=e=>{var n,i,r;return r=class extends t.EventEmitter{constructor(t){super(),n.set(this,void 0),i.set(this,!1),this.connectSync=()=>{Lo(this,i,"f")||(e.addEventListener("message",(e=>{e.data?.topic?.startsWith("wire-message")&&e.data.message&&Lo(this,n,"f").call(this,{...JSON.parse(e.data.message),ports:e.ports})})),e.start())},this.connect=async()=>{this.connectSync()},this.send=t=>(e.postMessage({topic:"wire-message",message:JSON.stringify(t)}),Promise.resolve()),this.shutdown=async()=>{e.close()},To(this,n,t,"f")}getPort(){return e}},n=new WeakMap,i=new WeakMap,r};var Bo={},Go={};Object.defineProperty(Go,"__esModule",{value:!0}),Go.BaseEnvironment=void 0;const Wo=vr();Go.BaseEnvironment=class{async getViewWindowIdentity(e,t){const{identity:n}=await e.View.wrapSync(t).getCurrentWindow();return n}async getInteropInfo(e){const t=await e.Application.getCurrentSync().getInfo().catch((()=>null)),n=t?.initialOptions?.interopBrokerConfiguration??{};return{fdc3Version:t?(0,Wo.getDefaultViewFdc3VersionFromAppInfo)(t):void 0,...n,fdc3Info:{providerVersion:await e.System.getVersion(),provider:"OpenFin"}}}},Object.defineProperty(Bo,"__esModule",{value:!0});var Ho=Bo.BrowserEnvironment=void 0;const No=Go;class Do extends No.BaseEnvironment{constructor(){super(...arguments),this.type="other",this.getRandomId=()=>{const e=new Uint32Array(1);return window.crypto.getRandomValues(e)[0].toString(32)}}getAdapterVersionSync(){return""}observeBounds(e,t){throw new Error("Method not implemented.")}layoutAllowedInContext(e){return!1}initLayoutManager(e,t,n){throw new Error("Method not implemented.")}applyLayoutSnapshot(e,t,n){throw new Error("Method not implemented.")}createLayout(e,t){throw new Error("Method not implemented.")}destroyLayout(e,t){throw new Error("Method not implemented.")}resolveLayout(e,t){throw new Error("Method not implemented.")}initPlatform(...e){throw new Error("Method not implemented.")}writeToken(e,t){return Promise.resolve("")}retrievePort(e){throw new Error("Method not implemented.")}getNextMessageId(){return this.getRandomId()}createChildContent(e){throw new Error("Method not implemented.")}getWebWindow(e){throw new Error("Method not implemented.")}getCurrentEntityIdentity(){throw new Error("Method not implemented.")}getCurrentEntityType(){return"external connection"}raiseEvent(e,t){throw new Error("Method not implemented.")}getUrl(){return location.href}getDefaultChannelOptions(){return{create:{},connect:{}}}getRtcPeer(){return new RTCPeerConnection}getWsConstructor(){return WebSocket}whenReady(){return Promise.resolve()}}Ho=Bo.BrowserEnvironment=Do;const Uo=e=>"platform"in e&&void 0!==e.platform;var Vo,zo;class Ko extends Ho{constructor(e){super(),this.connectConfig=e,Vo.set(this,void 0),zo.set(this,new W((async()=>Promise.resolve().then((function(){return __webpack_require__(/*! ./main-b14f67c9.js */ "../../node_modules/@openfin/core-web/out/main-b14f67c9.js")}))))),Uo(e)&&this.validatePlatformOptions(e)}getAdapterVersionSync(){return"0.39.21"}validatePlatformOptions({platform:e}){if(!("layoutSnapshot"in e))throw new Error("Platform options are missing layoutSnapshot. Please provide a layoutSnapshot in the platform options.");if("windows"in e||"windows"in e.layoutSnapshot)throw new Error("It appears you tried to call connect() with a snapshot object from an OpenFin desktop environment. Note that connect() expects to be called with a platform property with this structure: { platform: { layoutSnapshot } }. To get a layoutSnapshot of the expected structure, use fin.Platform.Layout.getCurrentLayoutManagerSync().getLayoutSnapshot() in v34+ in your desktop environment.");const{layouts:t}=e.layoutSnapshot;Object.entries(t).map((([e,t])=>{if("object"!=typeof t||null===t)throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must be an object.`);if(!("content"in t))throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must contain a 'content' property.`)}))}async getInteropInfo(e){return{...{contextGroups:void 0,logging:{beforeAction:{enabled:!1},afterAction:{enabled:!1}}},fdc3Version:void 0,fdc3Info:{providerVersion:"0.39.21",provider:"OpenFin Web"}}}layoutAllowedInContext(e){return!0}async initLayoutManager(e,t,n){if(Lo(this,Vo,"f"))throw new Error("Layout already initialized.");if(!Uo(this.connectConfig))throw new Error("Platform options are missing from connection config.");const{WebLayoutEntryPoint:i}=await Lo(this,zo,"f").getValue();return To(this,Vo,new i(this.connectConfig),"f"),await Lo(this,Vo,"f").initLayoutManager(e,t,n)}async applyLayoutSnapshot(e,t,n){Lo(this,Vo,"f")?.applyLayoutSnapshot(e,t,n)}async createLayout(e,t){return Lo(this,Vo,"f")?.createLayout(e,t)}async destroyLayout(e,t){return Lo(this,Vo,"f")?.destroyLayout(e,t)}async getViewWindowIdentity(e,t){return Promise.resolve({uuid:t.uuid,name:t.uuid})}}Vo=new WeakMap,zo=new WeakMap;const qo=()=>{const e=((e,t)=>{const n=new RegExp(`^${t}<(?.*)>$`).exec(e)?.groups?.meta;if(n)try{return JSON.parse(atob(n))}catch(e){throw new Error(`Failed to decode JSON from ${n}.`)}})(window.name,"of-frame");if(e)try{const{name:t,uuid:n,brokerUrl:i,providerId:r,contextGroup:o}=e;return Fo(i,"brokerUrl"),Fo(n,"uuid"),Fo(t,"name"),{identity:{name:t,uuid:n},brokerUrl:i,interopConfig:{providerId:r,currentContextGroup:o}}}catch(e){throw new Error(`Unexpected error occurred when inferring platform information: ${e.stack}`)}},Jo=()=>{const e=r.v4();return{uuid:e,name:e}},Yo=async e=>{if("enabled"===e.connectionInheritance){const t=await(async e=>{const t=qo();if(t){const{validateOptions:n=(()=>!0)}=e,{identity:i,...r}=t;if(!await n(r))throw new Error("Parent options were rejected by validateOptions.");return t}})(e);if(t)return t}if(!e.options){const t="enabled"===e.connectionInheritance?"Broker URL was not specified nor provided by a platform container.":"Connection inheritance is disabled but no options were provided.";throw new Error(t)}return{...e.options,identity:Jo()}};exports.__classPrivateFieldGet=Lo,exports.__classPrivateFieldSet=To,exports.apiExposer=Gn,exports.commonjsGlobal=s,exports.connect=async t=>{try{Ro.log("Establishing connection",t);const{brokerUrl:n,identity:i,timeout:r,interopConfig:s}=await Yo(t),{workerPort:a,iframeBrokerPort:c}=await(async(e,t,n)=>{const{origin:i}=new URL(e),r=document.createElement("IFRAME");let s;r.style.display="none";try{return await new Promise(((a,c)=>{const d=e=>{if(e.source===r.contentWindow&&e.data?.topic===`ack-${jo}`){if(e.origin!==i)c(new Error(`Broker redirected to unexpected origin ${e.origin}, expected ${i}.`));else if(e.data.success){const[t,n]=e.ports;a({iframeBrokerPort:t,workerPort:n})}else c(new m(e.data));window.removeEventListener("message",d),clearTimeout(s)}};window.addEventListener("message",d),ko.log(`Connecting to broker ${e}`),r.setAttribute("src",e),r.setAttribute("name",o(t,"of-broker")),document.body.appendChild(r),ko.log("Iframe loaded, awaiting init message from iframe"),n&&(s=setTimeout((()=>{window.removeEventListener("message",d),document.body.removeChild(r),c(new Error("Worker did not initialize in time"))}),n))}))}catch(e){throw new Error(`Failed to initialise Fin Web Client. ${e.message}`,{cause:e})}})(n,i,r);Ro.log("Successfully established connection to shared worker");const d={entityType:"external connection",...i};a.start(),c.start();const h=((t,n,i)=>{const r=$o(n),o=new Ko(t),s=new Io(r,o,i);return s.connectSync(),window.Buffer=e.Buffer,new Wr(s)})(t,a,d);return s?.providerId&&(h.me.interop=h.Interop.connectSync(s.providerId),s?.currentContextGroup&&h.me.interop.joinContextGroup(s.currentContextGroup).catch((e=>{console.warn(`Error joining specified context group: ${s?.currentContextGroup}, continuing`,e)}))),{...h,me:{...h.me,identity:{uuid:h.me.uuid,name:h.me.name}}}}catch(e){throw new Error(`An error occured during web-interop connection: ${e.message}`)}},exports.decorators=Nn,exports.encodeOptions=o,exports.layout_constants=ai,exports.lazy=G; /***/ }), -/***/ "./node_modules/@openfin/core-web/out/main-b14f67c9.js": -/*!*************************************************************!*\ - !*** ./node_modules/@openfin/core-web/out/main-b14f67c9.js ***! - \*************************************************************/ +/***/ "../../node_modules/@openfin/core-web/out/main-b14f67c9.js": +/*!*****************************************************************!*\ + !*** ../../node_modules/@openfin/core-web/out/main-b14f67c9.js ***! + \*****************************************************************/ /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; -var t=__webpack_require__(/*! ./main-8cad4070.js */ "./node_modules/@openfin/core-web/out/main-8cad4070.js"),e=__webpack_require__(/*! uuid */ "../../node_modules/uuid/dist/esm-browser/index.js");__webpack_require__(/*! buffer/ */ "../../node_modules/buffer/index.js"),__webpack_require__(/*! events */ "../../node_modules/events/events.js"),__webpack_require__(/*! lodash/cloneDeep */ "../../node_modules/lodash/cloneDeep.js"),__webpack_require__(/*! lodash/isEqual */ "../../node_modules/lodash/isEqual.js");var i={},n={};Object.defineProperty(n,"__esModule",{value:!0}),n.mapValuesAsync=n.mapEntriesAsync=void 0;const o=(t,[e,i])=>({...t,[e]:i});async function s(t,e){return(await Promise.all(e.map((async([e,i])=>[e,await t(i,e)])))).reduce(o,{})}n.mapEntriesAsync=s,n.mapValuesAsync=async function(t,e){let i;return i=e instanceof Map?[...e.entries()]:Object.entries(e),s(t,i)};var r,a,l,h,d=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldSet||function(t,e,i,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(t,i):o?o.value=i:e.set(t,i),i},c=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldGet||function(t,e,i,n){if("a"===i&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?n:"a"===i?n.call(t):n?n.value:e.get(t)};Object.defineProperty(i,"__esModule",{value:!0});var m=i.DefaultLayoutManager=void 0;const u=n;class p{constructor(t){a.set(this,void 0),l.set(this,new Map),d(this,a,t,"f")}size(){return c(this,l,"f").size}async applyLayoutSnapshot({layouts:t}){if(Object.keys(t).length>1)throw new Error("[LayoutManager] Tried to call applyLayoutSnapshot with more than 1 layout. When implementing multiple layouts via overridden LayoutManager class, you must override and fully implement the applyLayoutSnapshot method without calling super.applyLayoutSnapshot().");const[[e,i]]=Object.entries(t);await p.createLayout(this,{layoutName:e,layout:i})}async showLayout({layoutName:t}){}async getLayoutSnapshot(){return{layouts:await(0,u.mapValuesAsync)((t=>t.getFrameSnapshot()),c(this,l,"f"))}}async removeLayout({layoutName:t}){}getLayoutIdentityForView(t){const e=[...c(this,l,"f").values()].find((e=>e.getCurrentViews().some((e=>e.name===t.name&&e.uuid===t.uuid))));return e?.identity??void 0}isLayoutVisible({layoutName:t}){return c(p,r,"m",h).call(p,this,t).isVisible()}resolveLayoutIdentity(t){if(t&&"layoutName"in t)return t;const e=[...c(this,l,"f").values()];if(1===e.length)return e[0].identity;const i=e.find((t=>t.isVisible()));return i?.identity??void 0}static async resolveLayout(t,e){const i=t.resolveLayoutIdentity(e);if(void 0===i||!("layoutName"in i))throw new Error("[layout-manager] resolveLayout: Could not resolve the layout identity. Make sure you include 'layoutName' in the identity object.");return c(p,r,"m",h).call(p,t,i.layoutName)}static async handleSharedView(t,e,i){await(0,u.mapValuesAsync)((async t=>{if(t.identity.layoutName!==e.layoutName){const e=t.getCurrentViews().find((t=>t.name===i.name));e&&await t.onViewDetached({viewIdentity:e,target:null}).catch(console.error)}}),c(t,l,"f"))}static async handleLastViewRemoved(t,e){await t.removeLayout(e),await c(t,a,"f").handleLastViewRemoved(t)}static async destroyLayout(t,{layoutName:e}){await c(p,r,"m",h).call(p,t,e).destroy(),c(t,l,"f").delete(e)}static async createLayout(t,e){const{layoutName:i}=e;if(c(t,l,"f").has(i))throw new Error(`Layout name ${i} already exists`);await c(t,a,"f").createLayout(e,t)}static registerLayout(t,e,i){c(t,l,"f").set(e,i)}static getAllLayouts(t){return[...c(t,l,"f").values()]}static setInitialSnapshot(t,e){c(t,a,"f").setInitialSnapshot(e)}static createClosedConstructor(...t){return class extends p{constructor(){super(...t)}}}}m=i.DefaultLayoutManager=p,r=p,a=new WeakMap,l=new WeakMap,h=function(t,e){const i=c(t,l,"f").get(e);if(!i)throw new Error(`[layout-manager] getLayoutByName: Could not locate layout with name '${e}'`);return i};var g={},f={},v={};Object.defineProperty(v,"__esModule",{value:!0}),v.ReversibleMap=void 0;v.ReversibleMap=class{constructor(){this.valueToKey=new Map,this.keyToValue=new Map,this.setUnique=(t,e)=>{if(this.hasKey(t)||this.hasValue(e))throw new Error("Key or value already in the map.");this.keyToValue.set(t,e),this.valueToKey.set(e,t)},this.getKey=t=>{const e=this.valueToKey.get(t);if(!e)throw new Error("Value not found in the map.");return e},this.deleteKey=t=>{const e=this.getValue(t);return this.keyToValue.delete(t),this.valueToKey.delete(e),e},this.deleteValue=t=>{const e=this.getKey(t);return this.keyToValue.delete(e),this.valueToKey.delete(t),e},this.hasKey=t=>this.keyToValue.has(t),this.hasValue=t=>this.valueToKey.has(t)}getValue(t){const e=this.keyToValue.get(t);if(!e)throw new Error("Key not found in the map.");return e}},Object.defineProperty(f,"__esModule",{value:!0});var _=f.LayoutContentCache=void 0;const y=t.lazy,C=v;class w{constructor(){this.contentItemCache=new C.ReversibleMap,this.contentItemCacheId=0,this.createCacheKey=()=>{const t=`entity-${this.contentItemCacheId.toString()}`;return this.contentItemCacheId+=1,t},this.hasKey=t=>this.contentItemCache.hasKey(t),this.getItemOrUndefined=t=>{try{return this.getContentItemOrThrow(t)}catch(t){return}},this.getContentItemOrThrow=(t,e)=>{if(!this.contentItemCache.hasKey(t))throw new Error("Layout component has been destroyed or detached from the current layout.");const i=this.contentItemCache.getValue(t);if(e&&!e.includes(i.type))throw new Error(`Layout item is not the expected type. Expected ${e.join(", ")}, got ${i.type}.`);return i},this.getOrCreateEntityId=t=>{if(this.contentItemCache.hasValue(t))return this.contentItemCache.getKey(t);t.onDestroyed((()=>{this.contentItemCache.deleteValue(t)}));const e=this.createCacheKey();return this.contentItemCache.setUnique(e,t),e}}static getSingleInstance(){return w.singleton.getValue()}}_=f.LayoutContentCache=w,w.singleton=new y.Lazy((()=>new w));var I={},b={};!function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.getAdjacentStacks=t.doShareEdge=t.getAdjacentItem=void 0;t.getAdjacentItem=(e,i)=>{const{parent:n}=e;if(e.isRoot()||!n)return;const o=["top","bottom"].includes(i)?"column":"row",s=["top","left"].includes(i)?-1:1;if(n.type===o){const t=n.contentItems.indexOf(e)+s;if(t>=0&&t{const n=t.getBounds(),o=e.getBounds();if(!n||!o)return!1;if(["top","bottom"].includes(i)){return!(n.righto.right)}return!(n.bottomo.bottom)};t.getAdjacentStacks=(e,i)=>{const n=["top","bottom"].includes(i)?"row":"column",o=s=>"stack"===s.type?(0,t.doShareEdge)(e,s,i)?[s]:[]:"root"===s.type||"ground"===s.type?[]:s.type===n?s.contentItems.map((t=>o(t))).flat():s.type!==n?["top","right"].includes(i)?o(s.contentItems[s.contentItems.length-1]):o(s.contentItems[0]):[],s=(0,t.getAdjacentItem)(e,i);return s?o(s):[]}}(b);var S=t.commonjsGlobal&&t.commonjsGlobal.__decorate||function(t,e,i,n){var o,s=arguments.length,r=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(s<3?o(r):s>3?o(e,i,r):o(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};Object.defineProperty(I,"__esModule",{value:!0}),I.LayoutEntitiesController=void 0;const E=t.decorators,x=b,L=i;class z{constructor(t,e,i){this.wire=t,this.layoutManager=e,this.layoutContentCache=i,this.analytics=t=>{this.wire.sendAction(`layout-controller-${t}`).catch((()=>{}))},this.getLayoutIdentityForViewOrThrow=async t=>{const e=this.layoutManager.getLayoutIdentityForView(t);if(!e)throw new Error(`View identity ${t.name} is not attached to any layouts.`);return e},this.getRoot=async t=>{this.analytics("get-root");const e=(await this.getLayout(t)).getRoot();return{type:e.type,entityId:this.layoutContentCache.getOrCreateEntityId(e)}},this.getStackByView=async t=>{this.analytics("get-stack-by-view");const e=await this.getLayoutIdentityForViewOrThrow(t),i=(await this.getLayout(e)).getStackByView(t);if("stack"===i?.type)return{entityId:this.layoutContentCache.getOrCreateEntityId(i),type:"stack"}},this.getStackViews=t=>{this.analytics("get-stack-views");return this.layoutContentCache.getContentItemOrThrow(t,["stack"]).contentItems.map((t=>({name:t.viewName,uuid:this.wire.me.uuid})))},this.isRoot=t=>{this.analytics("is-root");return this.layoutContentCache.getContentItemOrThrow(t).isRoot()},this.exists=t=>(this.analytics("exists"),this.layoutContentCache.hasKey(t)),this.addViewToStack=async(t,e,{index:i}={index:0})=>{this.analytics("add-view-to-stack");const n=this.layoutContentCache.getContentItemOrThrow(t);if(i&&i>n.contentItems.length+1)throw new Error(`Index '${i}' out of range, please exclude the index or specify a number between 0 and ${n.contentItems.length}`);const o={id:t,index:i},{identity:s}=await n.layout.platformCreateView(e,{location:o});return s},this.findViewInStack=(t,e)=>t.contentItems.find((t=>t.viewName===e.name)),this.removeViewFromStack=async(t,e)=>{this.analytics("remove-view-from-stack");const i=this.layoutContentCache.getContentItemOrThrow(t,["stack"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to remove a view ('${e.name}') which does not belong to the stack.`);await n.layout.platformCloseView(e)},this.createAdjacentStack=async(t,e,{position:i="right"}={})=>{if(this.analytics("create-adjacent-stack"),!Array.isArray(e)||0===e.length)throw new Error('The parameter "views" must be an array with at least 1 element.');if(!["top","bottom","left","right"].includes(i))throw new Error(`Invalid position '${i}' specified.`);const n=this.layoutContentCache.getContentItemOrThrow(t).createAdjacentStack({position:i}),o=this.layoutContentCache.getOrCreateEntityId(n);return await Promise.all(e.reverse().map((t=>this.addViewToStack(o,t)))),o},this.getAdjacentStacks=async({targetId:t,edge:e})=>{this.analytics("get-adjacent-stacks");const i=this.layoutContentCache.getContentItemOrThrow(t);return(0,x.getAdjacentStacks)(i,e).map((t=>({entityId:this.layoutContentCache.getOrCreateEntityId(t)})))},this.setStackActiveView=async(t,e)=>{this.analytics("set-stack-active-view");const i=this.layoutContentCache.getContentItemOrThrow(t,["stack"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to set a view ('${e.name}') as active when it does not belong to the stack.`);i.setActiveContentItem(n,!0)}}async getLayout(t){const e=await L.DefaultLayoutManager.resolveLayout(this.layoutManager,t);if(!e)throw new Error(`Could not resolve target layout identity ${JSON.stringify(t)}`);return e}getContent(t){this.analytics("get-content");return this.layoutContentCache.getContentItemOrThrow(t,["column","row"]).contentItems.map((t=>({type:t.type,entityId:this.layoutContentCache.getOrCreateEntityId(t)})))}getParent(t){this.analytics("get-parent");const e=this.layoutContentCache.getContentItemOrThrow(t);if(!e.isRoot())return e.parent?.contentItems.includes(e)?{type:e.parent.type,entityId:this.layoutContentCache.getOrCreateEntityId(e.parent)}:void 0}}S([(0,E.expose)()],z.prototype,"getLayoutIdentityForViewOrThrow",void 0),S([(0,E.expose)()],z.prototype,"getRoot",void 0),S([(0,E.expose)()],z.prototype,"getStackByView",void 0),S([(0,E.expose)()],z.prototype,"getStackViews",void 0),S([(0,E.expose)()],z.prototype,"getContent",null),S([(0,E.expose)()],z.prototype,"getParent",null),S([(0,E.expose)()],z.prototype,"isRoot",void 0),S([(0,E.expose)()],z.prototype,"exists",void 0),S([(0,E.expose)()],z.prototype,"addViewToStack",void 0),S([(0,E.expose)()],z.prototype,"removeViewFromStack",void 0),S([(0,E.expose)()],z.prototype,"createAdjacentStack",void 0),S([(0,E.expose)()],z.prototype,"getAdjacentStacks",void 0),S([(0,E.expose)()],z.prototype,"setStackActiveView",void 0),I.LayoutEntitiesController=z,Object.defineProperty(g,"__esModule",{value:!0});var M=g.initLayoutEndpoints=void 0;const P=t.apiExposer,T=t.layout_constants,A=f,k=I,D=i;M=g.initLayoutEndpoints=async function(t,e){const i=t.getFin(),n=await i.Platform.getCurrentSync().getClient(),o=new P.ChannelsExposer(n);await new P.ApiExposer(o).exposeInstance(new k.LayoutEntitiesController(t,e,A.LayoutContentCache.getSingleInstance()),{id:T.LAYOUT_CONTROLLER_ID}),await async function(t,e){const i=t=>async i=>{const n=await D.DefaultLayoutManager.resolveLayout(e,i.target);if(!n)throw new Error(`Could not resolve the layout target from payload ${JSON.stringify(i)}`);return t(n,i)},n=(e,n)=>{t.register(e,i(n))},o=(t,e)=>{n(t,e)};n("replace-view",((t,e)=>t.replaceView(e))),n("replace-layout",((t,{layout:e})=>t.replaceLayout(e))),n("add-view",((t,e)=>t.insertView(e))),o("layout-add-view",((t,{viewOptions:e,location:i,targetView:n})=>t.platformCreateView(e,{location:i,targetView:n}))),n("close-view",((t,e)=>t.cleanupView(e.viewIdentity))),o("layout-close-view",((t,e)=>t.platformCloseView(e.viewIdentity))),n("apply-preset-layout",((t,e)=>t.applyPreset(e))),n("get-layout-views",(t=>t.getCurrentViews())),n("get-frame-snapshot",(t=>t.getFrameSnapshot())),n("is-visible",(t=>t.isVisible())),n("destroy",(t=>t.destroy())),t.register("get-layout-snapshot",(()=>e.getLayoutSnapshot()))}(n,e)};var R={};Object.defineProperty(R,"__esModule",{value:!0});var U=R.BaseLayout=void 0;U=R.BaseLayout=class{};var O={};Object.defineProperty(O,"__esModule",{value:!0});var V=O.DOMEmitter=void 0;V=O.DOMEmitter=class{constructor(t){this.container=t}dispatchLocalEvent(t,e){const i={...e,type:t,tabSelector:`tab-${e.name}`,containerSelector:`container-${e.name}`,topic:"openfin-DOM-event"};this.container.dispatchEvent(new CustomEvent(t,{detail:i}))}};var B={};Object.defineProperty(B,"__esModule",{value:!0});var H=B.mapLayoutContentItemsImmutableSync=B.mapLayoutContentItemsImmutable=W=B.isVisible=void 0;var W=B.isVisible=t=>(0!==t.offsetWidth||0!==t.offsetHeight)&&"hidden"!==window.getComputedStyle(t).visibility&&t.offsetTop>=0&&t.offsetLeft>=0&&t.offsetTop<=window.innerHeight&&t.offsetLeft<=window.innerWidth;const F=t=>"type"in t&&"component"===t.type;B.mapLayoutContentItemsImmutable=async function t(e,i){return F(i)?e(i):{...i,content:await Promise.all(i.content?.map((i=>t(e,i))))}},H=B.mapLayoutContentItemsImmutableSync=function t(e,i){return F(i)?e(i):{...i,content:i.content?.map((i=>t(e,i)))}};class N extends Error{constructor(t,e){super(e),this.type=t}}class G extends N{constructor(t,e){super("Configuration",t),this.node=e}}class j extends N{constructor(t){super("PopoutBlocked",t)}}class $ extends N{constructor(t){super("API",t)}}class Z extends N{constructor(t){super("Bind",t)}}class q extends Error{constructor(t,e,i){super(`${t}: ${e}${void 0===i?"":": "+i}`)}}class X extends q{constructor(t,e){super("Assert",t,e)}}class Y extends q{constructor(t,e,i){super("UnreachableCase",t,`${e}${void 0===i?"":": "+i}`)}}class K extends q{constructor(t,e){super("UnexpectedNull",t,e)}}class J extends q{constructor(t,e){super("UnexpectedUndefined",t,e)}}var Q;!function(t){let e=!1;const i={PopoutCannotBeCreatedWithGroundItemConfig:{id:0,default:"Popout cannot be created with ground ItemConfig"},PleaseRegisterAConstructorFunction:{id:1,default:"Please register a constructor function"},ComponentTypeNotRegisteredAndBindComponentEventHandlerNotAssigned:{id:2,default:"Component type not registered and BindComponentEvent handler not assigned"},ComponentIsAlreadyRegistered:{id:3,default:"Component is already registered"},ComponentIsNotVirtuable:{id:4,default:"Component is not virtuable. Requires rootHtmlElement field/getter"},VirtualComponentDoesNotHaveRootHtmlElement:{id:5,default:'Virtual component does not have getter "rootHtmlElement"'},ItemConfigIsNotTypeComponent:{id:6,default:"ItemConfig is not of type component"},InvalidNumberPartInSizeString:{id:7,default:"Invalid number part in size string"},UnknownUnitInSizeString:{id:8,default:"Unknown unit in size string"},UnsupportedUnitInSizeString:{id:9,default:"Unsupported unit in size string"}};t.idCount=Object.keys(i).length;const n=Object.values(i);t.checkInitialise=function(){if(!e)for(let e=0;e="0"&&t<="9"}function Tt(t,e){const i=zt(e);t.style.width=i}function At(t,e){const i=zt(e);t.style.height=i}function kt(t){return{width:t.offsetWidth,height:t.offsetHeight}}function Dt(t,e){t.style.display=e?"":"none"}function Rt(t,e){if(void 0!==e)for(const i in e)if(e.hasOwnProperty(i)){const n=e[i],o=t[i];t[i]=Ut(o,n)}return t}function Ut(t,e){if("object"!=typeof e)return e;if(Array.isArray(e)){const t=e.length,i=new Array(t);for(let n=0;n36)throw new Error("Too many keys in config minifier map")},t.translateObject=n}(dt||(dt={})),function(t){t.defaults={type:at.ground,content:[],size:1,sizeUnit:ht.Fractional,minSize:void 0,minSizeUnit:ht.Pixel,id:"",isClosable:!0},t.createCopy=function(t,e){switch(t.type){case at.ground:case at.row:case at.column:return gt.createCopy(t,e);case at.stack:return ut.createCopy(t,e);case at.component:return pt.createCopy(t);default:throw new Y("CICC91354",t.type,"Invalid Config Item type specified")}},t.createDefault=function(t){switch(t){case at.ground:throw new X("CICCDR91562");case at.row:case at.column:return gt.createDefault(t);case at.stack:return ut.createDefault();case at.component:return pt.createDefault();default:throw new Y("CICCDD91563",t,"Invalid Config Item type specified")}},t.isComponentItem=function(t){return t.type===at.component},t.isStackItem=function(t){return t.type===at.stack},t.isGroundItem=function(t){return t.type===at.ground}}(ct||(ct={})),function(t){t.defaultMaximised=!1,function(t){t.createCopy=function(t,e){return void 0===t?void 0:{show:null!=e?e:t.show,popout:t.popout,close:t.close,maximise:t.maximise,minimise:t.minimise,tabDropdown:t.tabDropdown}}}(t.Header||(t.Header={}))}(mt||(mt={})),function(t){function e(t){const e=t.length,i=new Array(e);for(let n=0;n"__glMaximised"===t));t>0&&(o=!0,n=n.splice(t,1)),e=n.length>0?n[0]:ct.defaults.id}else e=n;return i=void 0!==t.maximised?t.maximised:o,{id:e,maximised:i}}}(wt||(wt={})),function(t){function e(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0;return{resolved:!0,root:Et.resolve(i),openPopouts:t.resolveOpenPopouts(e.openPopouts),dimensions:t.Dimensions.resolve(e.dimensions),settings:t.Settings.resolve(e.settings),header:t.Header.resolve(e.header,e.settings,e.labels)}}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:Lt.fromResolvedArray(e.openPopouts),settings:_t.Settings.createCopy(e.settings),dimensions:t.Dimensions.fromResolved(e.dimensions),header:_t.Header.createCopy(e.header)}},t.isResolved=function(t){const e=t;return void 0!==e.resolved&&!0===e.resolved},t.resolveOpenPopouts=function(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0,{root:Et.resolve(o),openPopouts:xt.resolveOpenPopouts(e.openPopouts),dimensions:xt.Dimensions.resolve(e.dimensions),settings:xt.Settings.resolve(e.settings),header:xt.Header.resolve(e.header,e.settings,e.labels),parentId:null!==(i=e.parentId)&&void 0!==i?i:null,indexInParent:null!==(n=e.indexInParent)&&void 0!==n?n:null,window:t.Window.resolve(e.window,e.dimensions),resolved:!0}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:i(e.openPopouts),dimensions:xt.Dimensions.fromResolved(e.dimensions),settings:_t.Settings.createCopy(e.settings),header:_t.Header.createCopy(e.header),parentId:e.parentId,indexInParent:e.indexInParent,window:t.Window.fromResolved(e.window)}},t.fromResolvedArray=i}(Lt||(Lt={}));class Wt{constructor(){this._allEventSubscriptions=[],this._subscriptionsMap=new Map,this.unbind=this.removeEventListener,this.trigger=this.emit}tryBubbleEvent(t,e){}emit(t,...e){let i=this._subscriptionsMap.get(t);if(void 0!==i){i=i.slice();for(let t=0;t0){const n=e.slice();n.unshift(t);const o=this._allEventSubscriptions.slice();for(let t=0;t0?n.contentItems[0]:n,e=0);const o=this._layoutManager.createAndInitContentItem(i,t);t.addChild(o,e),this._layoutManager.layoutConfig.settings.popInOnClose?this._onClose():this.close()}createWindow(){const t=this.createUrl(),e=Math.floor(1e6*Math.random()).toString(36),i=this.serializeWindowFeatures({width:this._initialWindowSize.width,height:this._initialWindowSize.height,innerWidth:this._initialWindowSize.width,innerHeight:this._initialWindowSize.height,menubar:"no",toolbar:"no",location:"no",personalbar:"no",resizable:"yes",scrollbars:"no",status:"no"});if(this._popoutWindow=globalThis.open(t,e,i),this._popoutWindow)this._popoutWindow.addEventListener("load",(()=>this.positionWindow()),{passive:!0}),this._popoutWindow.addEventListener("beforeunload",(()=>{this._layoutManager.layoutConfig.settings.popInOnClose?this.popIn():this._onClose()}),{passive:!0}),this._checkReadyInterval=setInterval((()=>this.checkReady()),10);else if(!0===this._layoutManager.layoutConfig.settings.blockedPopoutsThrowError){throw new j("Popout blocked")}}checkReady(){if(null===this._popoutWindow)throw new K("BPCR01844");this._popoutWindow.__glInstance&&this._popoutWindow.__glInstance.isInitialised&&(this.onInitialised(),void 0!==this._checkReadyInterval&&(clearInterval(this._checkReadyInterval),this._checkReadyInterval=void 0))}serializeWindowFeatures(t){const e=[];for(const i in t)e.push(i+"="+t[i].toString());return e.join(",")}createUrl(){const t="gl-window-config-"+Ot(),e=_t.minifyConfig(this._config);try{localStorage.setItem(t,JSON.stringify(e))}catch(t){throw new Error("Error while writing to localStorage "+function(t){return t instanceof Error?t.message:"string"==typeof t?t:"Unknown Error"}(t))}const i=new URL(location.href);return i.searchParams.set("gl-window",t),i.toString()}positionWindow(){if(null===this._popoutWindow)throw new Error("BrowserPopout.positionWindow: null popoutWindow");this._popoutWindow.moveTo(this._initialWindowSize.left,this._initialWindowSize.top),this._popoutWindow.focus()}onInitialised(){this._isInitialised=!0,this.getGlInstance().on("popIn",(()=>this.popIn())),this.emit("initialised")}_onClose(){setTimeout((()=>this.emit("closed")),50)}}class Gt extends Wt{constructor(t,e,i,n){super(),this.layoutManager=t,this._parent=i,this._element=n,this._popInParentIds=[],this._type=e.type,this._id=e.id,this._isInitialised=!1,this.isGround=!1,this.isRow=!1,this.isColumn=!1,this.isStack=!1,this.isComponent=!1,this.size=e.size,this.sizeUnit=e.sizeUnit,this.minSize=e.minSize,this.minSizeUnit=e.minSizeUnit,this._isClosable=e.isClosable,this._pendingEventPropagations={},this._throttledEvents=["stateChanged"],this._contentItems=this.createContentItems(e.content)}get type(){return this._type}get id(){return this._id}set id(t){this._id=t}get popInParentIds(){return this._popInParentIds}get parent(){return this._parent}get contentItems(){return this._contentItems}get isClosable(){return this._isClosable}get element(){return this._element}get isInitialised(){return this._isInitialised}static isStack(t){return t.isStack}static isComponentItem(t){return t.isComponent}static isComponentParentableItem(t){return t.isStack||t.isGround}removeChild(t,e=!1){const i=this._contentItems.indexOf(t);if(-1===i)throw new Error("Can't remove child item. Unknown content item");if(e||this._contentItems[i].destroy(),this._contentItems.splice(i,1),this._contentItems.length>0)this.updateSize(!1);else if(!this.isGround&&!0===this._isClosable){if(null===this._parent)throw new K("CIUC00874");this._parent.removeChild(this)}}addChild(t,e,i){return null!=e||(e=this._contentItems.length),this._contentItems.splice(e,0,t),t.setParent(this),!0===this._isInitialised&&!1===t._isInitialised&&t.init(),e}replaceChild(t,e,i=!1){const n=this._contentItems.indexOf(t),o=t._element.parentNode;if(-1===n)throw new X("CIRCI23232","Can't replace child. oldChild is not child of this");if(null===o)throw new K("CIRCP23232");if(o.replaceChild(e._element,t._element),!0===i&&(t._parent=null,t.destroy()),this._contentItems[n]=e,e.setParent(this),e.size=t.size,e.sizeUnit=t.sizeUnit,e.minSize=t.minSize,e.minSizeUnit=t.minSizeUnit,null===e._parent)throw new K("CIRCNC45699");!0===e._parent._isInitialised&&!1===e._isInitialised&&e.init(),this.updateSize(!1)}remove(){if(null===this._parent)throw new K("CIR11110");this._parent.removeChild(this)}popout(){const t=Ot(),e=this.layoutManager.createPopoutFromContentItem(this,void 0,t,void 0);return this.emitBaseBubblingEvent("stateChanged"),e}calculateConfigContent(){const t=this._contentItems,e=t.length,i=new Array(e);for(let n=0;nthis.propagateEventToLayoutManager(t,e))))}propagateEventToLayoutManager(t,e){this._pendingEventPropagations[t]=!1,this.layoutManager.emitUnknown(t,e)}}class jt extends Gt{constructor(t,e,i){super(t,e,i,document.createElement("div")),this._parentItem=i,this._focused=!1,this.isComponent=!0,this._reorderEnabled=e.reorderEnabled,this.applyUpdatableConfig(e),this._initialWantMaximise=e.maximised;const n=document.createElement("div");n.classList.add("lm_content"),this.element.appendChild(n),this._container=new Ft(e,this,t,n,(t=>this.handleUpdateItemConfigEvent(t)),(()=>this.show()),(()=>this.hide()),(t=>this.focus(t)),(t=>this.blur(t)))}get componentName(){return this._container.componentType}get componentType(){return this._container.componentType}get reorderEnabled(){return this._reorderEnabled}get initialWantMaximise(){return this._initialWantMaximise}get component(){return this._container.component}get container(){return this._container}get parentItem(){return this._parentItem}get headerConfig(){return this._headerConfig}get title(){return this._title}get tab(){return this._tab}get focused(){return this._focused}destroy(){this._container.destroy(),super.destroy()}applyUpdatableConfig(t){this.setTitle(t.title),this._headerConfig=t.header}toConfig(){const t=this._container.stateRequestEvent,e=void 0===t?this._container.state:t();return{type:at.component,content:[],size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,maximised:!1,isClosable:this.isClosable,reorderEnabled:this._reorderEnabled,title:this._title,header:mt.Header.createCopy(this._headerConfig),componentType:pt.copyComponentType(this.componentType),componentState:e}}close(){if(null===this.parent)throw new K("CIC68883");this.parent.removeChild(this,!1)}enterDragMode(t,e){Tt(this.element,t),At(this.element,e),this._container.enterDragMode(t,e)}exitDragMode(){this._container.exitDragMode()}enterStackMaximised(){this._container.enterStackMaximised()}exitStackMaximised(){this._container.exitStackMaximised()}drag(){this._container.drag()}updateSize(t){this.updateNodeSize(t)}init(){this.updateNodeSize(!1),super.init(),this._container.emit("open"),this.initContentItems()}setTitle(t){this._title=t,this.emit("titleChanged",t),this.emit("stateChanged")}setTab(t){this._tab=t,this.emit("tab",t),this._container.setTab(t)}hide(){super.hide(),this._container.setVisibility(!1)}show(){super.show(),this._container.setVisibility(!0)}focus(t=!1){this.parentItem.setActiveComponentItem(this,!0,t)}setFocused(t){this._focused=!0,this.tab.setFocused(),t||this.emitBaseBubblingEvent("focus")}blur(t=!1){this._focused&&this.layoutManager.setFocusedComponentItem(void 0,t)}setBlurred(t){this._focused=!1,this.tab.setBlurred(),t||this.emitBaseBubblingEvent("blur")}setParent(t){this._parentItem=t,super.setParent(t)}handleUpdateItemConfigEvent(t){this.applyUpdatableConfig(t)}updateNodeSize(t){if("none"!==this.element.style.display){const{width:e,height:i}=kt(this.element);this._container.setSizeToNodeSize(e,i,t)}}}class $t extends Gt{constructor(){super(...arguments),this._focused=!1}get focused(){return this._focused}setFocusedValue(t){this._focused=t}}class Zt extends Wt{constructor(t,e){super(),this._eElement=t,this._pointerTracking=!1,this._pointerDownEventListener=t=>this.onPointerDown(t),this._pointerMoveEventListener=t=>this.onPointerMove(t),this._pointerUpEventListener=t=>this.onPointerUp(t),this._timeout=void 0,this._allowableTargets=[t,...e],this._oDocument=document,this._eBody=document.body,this._nDelay=1800,this._nDistance=10,this._nX=0,this._nY=0,this._nOriginalX=0,this._nOriginalY=0,this._dragging=!1,this._eElement.addEventListener("pointerdown",this._pointerDownEventListener,{passive:!0})}destroy(){this.checkRemovePointerTrackingEventListeners(),this._eElement.removeEventListener("pointerdown",this._pointerDownEventListener)}cancelDrag(){this.processDragStop(void 0)}onPointerDown(t){if(this._allowableTargets.includes(t.target)&&t.isPrimary){const e=this.getPointerCoordinates(t);this.processPointerDown(e)}}processPointerDown(t){this._nOriginalX=t.x,this._nOriginalY=t.y,this._oDocument.addEventListener("pointermove",this._pointerMoveEventListener),this._oDocument.addEventListener("pointerup",this._pointerUpEventListener,{passive:!0}),this._pointerTracking=!0,this._timeout=setTimeout((()=>{try{this.startDrag()}catch(t){throw console.error(t),t}}),this._nDelay)}onPointerMove(t){this._pointerTracking&&(this.processDragMove(t),t.preventDefault())}processDragMove(t){this._nX=t.pageX-this._nOriginalX,this._nY=t.pageY-this._nOriginalY,!1===this._dragging&&(Math.abs(this._nX)>this._nDistance||Math.abs(this._nY)>this._nDistance)&&this.startDrag(),this._dragging&&this.emit("drag",this._nX,this._nY,t)}onPointerUp(t){this.processDragStop(t)}processDragStop(t){var e;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this.checkRemovePointerTrackingEventListeners(),!0===this._dragging&&(this._eBody.classList.remove("lm_dragging"),this._eElement.classList.remove("lm_dragging"),null===(e=this._oDocument.querySelector("iframe"))||void 0===e||e.style.setProperty("pointer-events",""),this._dragging=!1,this.emit("dragStop",t))}checkRemovePointerTrackingEventListeners(){this._pointerTracking&&(this._oDocument.removeEventListener("pointermove",this._pointerMoveEventListener),this._oDocument.removeEventListener("pointerup",this._pointerUpEventListener),this._pointerTracking=!1)}startDrag(){var t;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this._dragging=!0,this._eBody.classList.add("lm_dragging"),this._eElement.classList.add("lm_dragging"),null===(t=this._oDocument.querySelector("iframe"))||void 0===t||t.style.setProperty("pointer-events","none"),this.emit("dragStart",this._nOriginalX,this._nOriginalY)}getPointerCoordinates(t){return{x:t.pageX,y:t.pageY}}}class qt{constructor(t,e,i){this._isVertical=t,this._size=e,this._grabSize=i0){const i=this.createSplitter(Math.max(0,e-1)).element;e>0?(this.contentItems[e-1].element.insertAdjacentElement("afterend",i),i.insertAdjacentElement("afterend",t.element)):(this.contentItems[0].element.insertAdjacentElement("beforebegin",i),i.insertAdjacentElement("beforebegin",t.element))}else this._childElementContainer.appendChild(t.element);super.addChild(t,e);const n=1/this.contentItems.length*100;if(!0===i)return this.emitBaseBubblingEvent("stateChanged"),e;for(let e=0;e0&&(this.calculateRelativeSizes(),this.setAbsoluteSizes()),this.emitBaseBubblingEvent("stateChanged"),this.emit("resize")}setAbsoluteSizes(){const t=this.calculateAbsoluteSizes();for(let e=0;e0&&t.itemSizes[e]++,this._isColumn?(Tt(this.contentItems[e].element,t.crossAxisSize),At(this.contentItems[e].element,t.itemSizes[e])):(Tt(this.contentItems[e].element,t.itemSizes[e]),At(this.contentItems[e].element,t.crossAxisSize))}calculateAbsoluteSizes(){const t=(this.contentItems.length-1)*this._splitterSize,{width:e,height:i}=kt(this.element);let n,o;this._isColumn?(n=i-t,o=e):(n=e-t,o=i);let s=0;const r=[];for(let t=0;t0){const n=100-t;for(let t=0;t100&&e.length>0){for(let t=0;te)return;{const r=i/e;let a=i;for(let e=0;ethis.onSplitterDrag(e,t,i))),e.on("dragStop",(()=>this.onSplitterDragStop(e))),e.on("dragStart",(()=>this.onSplitterDragStart(e))),this._splitter.splice(t,0,e),e}getSplitItems(t){const e=this._splitter.indexOf(t);return{before:this.contentItems[e],after:this.contentItems[e+1]}}calculateContentItemMinSize(t){const e=t.minSize;if(void 0!==e){if(t.minSizeUnit===ht.Pixel)return e;throw new X("ROCGMD98831",JSON.stringify(t))}{const t=this.layoutManager.layoutConfig.dimensions;return this._isColumn?t.defaultMinItemHeight:t.defaultMinItemWidth}}calculateContentItemsTotalMinSize(t){let e=0;for(const i of t)e+=this.calculateContentItemMinSize(i);return e}onSplitterDragStart(t){const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=this.calculateContentItemsTotalMinSize(e.before.contentItems),s=this.calculateContentItemsTotalMinSize(e.after.contentItems);this._splitterPosition=0,this._splitterMinPosition=-1*(i-o),this._splitterMaxPosition=n-s}onSplitterDrag(t,e,i){let n=this._isColumn?i:e;if(null===this._splitterMinPosition||null===this._splitterMaxPosition)throw new K("ROCOSD59226");n=Math.max(n,this._splitterMinPosition),n=Math.min(n,this._splitterMaxPosition),this._splitterPosition=n;const o=zt(n);this._isColumn?t.element.style.top=o:t.element.style.left=o}onSplitterDragStop(t){if(null===this._splitterPosition)throw new K("ROCOSDS66932");{const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=(this._splitterPosition+i)/(i+n),s=e.before.size+e.after.size;e.before.size=o*s,e.after.size=(1-o)*s,t.element.style.top=zt(0),t.element.style.left=zt(0),globalThis.requestAnimationFrame((()=>this.updateSize(!1)))}}}!function(t){t.getElementDimensionSize=function(t,e){return"width"===e?function(t){return t.offsetWidth}(t):function(t){return t.offsetHeight}(t)},t.setElementDimensionSize=function(t,e,i){return"width"===e?Tt(t,i):At(t,i)},t.createElement=function(t,e){const i=t.createElement("div");return i.classList.add("lm_item"),e?i.classList.add("lm_column"):i.classList.add("lm_row"),i}}(Xt||(Xt={}));class Yt extends $t{constructor(t,e,i){super(t,vt.create(e),null,Yt.createElement(document)),this.isGround=!0,this._childElementContainer=this.element,this._containerElement=i;let n=null;for(;;){const t=n?n.previousSibling:this._containerElement.lastChild;if(!(t instanceof Element&&t.classList.contains("lm_content")))break;n=t}this._containerElement.insertBefore(this.element,n)}init(){if(!0!==this.isInitialised){this.updateNodeSize();for(let t=0;t0?this.contentItems[0]:this,n.isComponent)throw new Error("Cannot add item as child to ComponentItem");{const t=this.layoutManager.createAndInitContentItem(i,n);return e=n.addChild(t,e),n===this?-1:e}}loadComponentAsRoot(t){this.clearRoot();const e=Ct.resolve(t,!1);if(e.maximised)throw new Error("Root Component cannot be maximised");{const t=new jt(this.layoutManager,e,this);t.init(),this.addChild(t,0)}}addChild(t,e){if(this.contentItems.length>0)throw new Error("Ground node can only have a single child");return this._childElementContainer.appendChild(t.element),e=super.addChild(t,e),this.updateSize(!1),this.emitBaseBubblingEvent("stateChanged"),e}calculateConfigContent(){const t=this.contentItems,e=t.length,i=new Array(e);for(let n=0;n0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e)),this.updateContentItemsSize(!1))}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}createSideAreas(){const t=Yt.Area.oppositeSides,e=new Array(Object.keys(t).length);let i=0;for(const n in t){const o=n,s=this.getElementArea();if(null===s)throw new K("RCSA77553");s.side=o,"2"===t[o][1]?s[o]=s[t[o]]-50:s[o]=s[t[o]]+50,s.surface=(s.x2-s.x1)*(s.y2-s.y1),e[i++]=s}return e}highlightDropZone(t,e,i){this.layoutManager.tabDropPlaceholder.remove(),super.highlightDropZone(t,e,i)}onDrop(t,e){if(t.isComponent){const e=ut.createDefault(),i=t;e.header=mt.Header.createCopy(i.headerConfig);const n=this.layoutManager.createAndInitContentItem(e,this);n.addChild(t),t=n}if(0===this.contentItems.length)this.addChild(t);else{if(t.type===at.row||t.type===at.column){const e=ut.createDefault(),i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}const i="x"==e.side[0]?at.row:at.column,n="2"==e.side[1],o=this.contentItems[0];if(o instanceof Xt&&o.type===i){const e=o.contentItems[n?0:o.contentItems.length-1];o.addChild(t,n?0:void 0,!0),e.size*=.5,t.size=e.size,t.sizeUnit=ht.Percent,o.updateSize(!1)}else{const e=ct.createDefault(i),s=this.layoutManager.createContentItem(e,this);this.replaceChild(o,s),s.addChild(t,n?0:void 0,!0),s.addChild(o,n?void 0:0,!0),o.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}}dock(){throw new X("GID87731")}validateDocking(){throw new X("GIVD87732")}getAllContentItems(){const t=[this];return this.deepGetAllContentItems(this.contentItems,t),t}getConfigMaximisedItems(){const t=[];return this.deepFilterContentItems(this.contentItems,t,(t=>!(!Gt.isStack(t)||!t.initialWantMaximise)||!(!Gt.isComponentItem(t)||!t.initialWantMaximise))),t}getItemsByPopInParentId(t){const e=[];return this.deepFilterContentItems(this.contentItems,e,(e=>e.popInParentIds.includes(t))),e}toConfig(){throw new Error("Cannot generate GroundItem config")}setActiveComponentItem(t,e,i){}updateNodeSize(){const{width:t,height:e}=kt(this._containerElement);Tt(this.element,t),At(this.element,e),this.contentItems.length>0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e))}deepGetAllContentItems(t,e){for(let i=0;ithis.onClick(t),this._touchStartEventListener=t=>this.onTouchStart(t),this._element=document.createElement("div"),this._element.classList.add(i),this._element.title=e,this._header.on("destroy",(()=>this.destroy())),this._element.addEventListener("click",this._clickEventListener,{passive:!0}),this._element.addEventListener("touchstart",this._touchStartEventListener,{passive:!0}),this._header.controlsContainerElement.appendChild(this._element)}get element(){return this._element}destroy(){var t;this._element.removeEventListener("click",this._clickEventListener),this._element.removeEventListener("touchstart",this._touchStartEventListener),null===(t=this._element.parentNode)||void 0===t||t.removeChild(this._element)}onClick(t){this._pushEvent(t)}onTouchStart(t){this._pushEvent(t)}}class Jt{constructor(t,e,i,n,o){var s;this._layoutManager=t,this._componentItem=e,this._closeEvent=i,this._focusEvent=n,this._dragStartEvent=o,this._isActive=!1,this._tabClickListener=t=>this.onTabClickDown(t),this._tabTouchStartListener=t=>this.onTabTouchStart(t),this._closeClickListener=()=>this.onCloseClick(),this._closeTouchStartListener=()=>this.onCloseTouchStart(),this._dragStartListener=(t,e)=>this.onDragStart(t,e),this._contentItemDestroyListener=()=>this.onContentItemDestroy(),this._tabTitleChangedListener=t=>this.setTitle(t),this._element=document.createElement("div"),this._element.classList.add("lm_tab"),this._titleElement=document.createElement("span"),this._titleElement.classList.add("lm_title"),this._closeElement=document.createElement("div"),this._closeElement.classList.add("lm_close_tab"),this._element.appendChild(this._titleElement),this._element.appendChild(this._closeElement),e.isClosable?this._closeElement.style.display="":this._closeElement.style.display="none",this.setTitle(e.title),this._componentItem.on("titleChanged",this._tabTitleChangedListener);(null!==(s=e.reorderEnabled)&&void 0!==s?s:this._layoutManager.layoutConfig.settings.reorderEnabled)&&this.enableReorder(),this._element.addEventListener("click",this._tabClickListener,{passive:!0}),this._element.addEventListener("touchstart",this._tabTouchStartListener,{passive:!0}),this._componentItem.isClosable?(this._closeElement.addEventListener("click",this._closeClickListener,{passive:!0}),this._closeElement.addEventListener("touchstart",this._closeTouchStartListener,{passive:!0})):(this._closeElement.remove(),this._closeElement=void 0),this._componentItem.setTab(this),this._layoutManager.emit("tabCreated",this)}get isActive(){return this._isActive}get componentItem(){return this._componentItem}get contentItem(){return this._componentItem}get element(){return this._element}get titleElement(){return this._titleElement}get closeElement(){return this._closeElement}get reorderEnabled(){return void 0!==this._dragListener}set reorderEnabled(t){t!==this.reorderEnabled&&(t?this.enableReorder():this.disableReorder())}setTitle(t){this._titleElement.innerText=t,this._element.title=t}setActive(t){t!==this._isActive&&(this._isActive=t,t?this._element.classList.add("lm_active"):this._element.classList.remove("lm_active"))}destroy(){var t,e;this._closeEvent=void 0,this._focusEvent=void 0,this._dragStartEvent=void 0,this._element.removeEventListener("click",this._tabClickListener),this._element.removeEventListener("touchstart",this._tabTouchStartListener),null===(t=this._closeElement)||void 0===t||t.removeEventListener("click",this._closeClickListener),null===(e=this._closeElement)||void 0===e||e.removeEventListener("touchstart",this._closeTouchStartListener),this._componentItem.off("titleChanged",this._tabTitleChangedListener),this.reorderEnabled&&this.disableReorder(),this._element.remove()}setBlurred(){this._element.classList.remove("lm_focused"),this._titleElement.classList.remove("lm_focused")}setFocused(){this._element.classList.add("lm_focused"),this._titleElement.classList.add("lm_focused")}onDragStart(t,e){if(void 0===this._dragListener)throw new J("TODSDLU10093");if(void 0===this._dragStartEvent)throw new J("TODS23309");this._dragStartEvent(t,e,this._dragListener,this.componentItem)}onContentItemDestroy(){void 0!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=void 0)}onTabClickDown(t){const e=t.target;e!==this._element&&e!==this._titleElement||(0===t.button?this.notifyFocus():1===t.button&&this._componentItem.isClosable&&this.notifyClose())}onTabTouchStart(t){t.target===this._element&&this.notifyFocus()}onCloseClick(){this.notifyClose()}onCloseTouchStart(){this.notifyClose()}notifyClose(){if(void 0===this._closeEvent)throw new J("TNC15007");this._closeEvent(this._componentItem)}notifyFocus(){if(void 0===this._focusEvent)throw new J("TNA15007");this._focusEvent(this._componentItem)}enableReorder(){this._dragListener=new Zt(this._element,[this._titleElement]),this._dragListener.on("dragStart",this._dragStartListener),this._componentItem.on("destroy",this._contentItemDestroyListener)}disableReorder(){if(void 0===this._dragListener)throw new J("TDR87745");this._componentItem.off("destroy",this._contentItemDestroyListener),this._dragListener.off("dragStart",this._dragStartListener),this._dragListener=void 0}}class Qt{constructor(t,e,i,n,o){this._layoutManager=t,this._componentRemoveEvent=e,this._componentFocusEvent=i,this._componentDragStartEvent=n,this._dropdownActiveChangedEvent=o,this._tabs=[],this._lastVisibleTabIndex=-1,this._dropdownActive=!1,this._element=document.createElement("section"),this._element.classList.add("lm_tabs"),this._dropdownElement=document.createElement("section"),this._dropdownElement.classList.add("lm_tabdropdown_list"),this._dropdownElement.style.display="none"}get tabs(){return this._tabs}get tabCount(){return this._tabs.length}get lastVisibleTabIndex(){return this._lastVisibleTabIndex}get element(){return this._element}get dropdownElement(){return this._dropdownElement}get dropdownActive(){return this._dropdownActive}destroy(){for(let t=0;tthis.handleTabCloseEvent(t)),(t=>this.handleTabFocusEvent(t)),((t,e,i,n)=>this.handleTabDragStartEvent(t,e,i,n)));void 0===e&&(e=this._tabs.length),this._tabs.splice(e,0,i),ethis._lastVisibleTabIndex){const t=this._tabs[e];for(let t=e;t>0;t--)this._tabs[t]=this._tabs[t-1];this._tabs[0]=t}}updateTabSizes(t,e){let i=!1;this.tryUpdateTabSizes(i,t,e)||(i=!0,this.tryUpdateTabSizes(i,t,e)),i!==this._dropdownActive&&(this._dropdownActive=i,this._dropdownActiveChangedEvent())}tryUpdateTabSizes(t,e,i){if(this._tabs.length>0){if(void 0===i)throw new Error("non-empty tabs must have active component item");let n=0,o=!1;const s=this._layoutManager.layoutConfig.settings.tabOverlapAllowance,r=this._tabs.indexOf(i.tab),a=this._tabs[r];this._lastVisibleTabIndex=-1;for(let i=0;ie){if(o)i===r&&(l.style.zIndex="auto",l.style.marginLeft="",l.parentElement!==this._element&&this._element.appendChild(l));else{let t;if(t=r>0&&r<=i?(d-e)/(i-1):(d-e)/i,tthis.onClick(t),this._touchStartListener=t=>this.onTouchStart(t),this._rowColumnClosable=!0,this._closeButton=null,this._popoutButton=null,this._tabsContainer=new Qt(this._layoutManager,(t=>this.handleTabInitiatedComponentRemoveEvent(t)),(t=>this.handleTabInitiatedComponentFocusEvent(t)),((t,e,i,n)=>this.handleTabInitiatedDragStartEvent(t,e,i,n)),(()=>this.processTabDropdownActiveChanged())),this._show=i.show,this._popoutEnabled=i.popoutEnabled,this._popoutLabel=i.popoutLabel,this._maximiseEnabled=i.maximiseEnabled,this._maximiseLabel=i.maximiseLabel,this._minimiseEnabled=i.minimiseEnabled,this._minimiseLabel=i.minimiseLabel,this._closeEnabled=i.closeEnabled,this._closeLabel=i.closeLabel,this._tabDropdownEnabled=i.tabDropdownEnabled,this._tabDropdownLabel=i.tabDropdownLabel,this.setSide(i.side),this._canRemoveComponent=this._configClosable,this._element=document.createElement("section"),this._element.classList.add("lm_header"),this._controlsContainerElement=document.createElement("section"),this._controlsContainerElement.classList.add("lm_controls"),this._element.appendChild(this._tabsContainer.element),this._element.appendChild(this._controlsContainerElement),this._element.appendChild(this._tabsContainer.dropdownElement),this._element.addEventListener("click",this._clickListener,{passive:!0}),this._element.addEventListener("touchstart",this._touchStartListener,{passive:!0}),this._documentMouseUpListener=()=>this._tabsContainer.hideAdditionalTabsDropdown(),globalThis.document.addEventListener("mouseup",this._documentMouseUpListener,{passive:!0}),this._tabControlOffset=this._layoutManager.layoutConfig.settings.tabControlOffset,this._tabDropdownEnabled&&(this._tabDropdownButton=new Kt(this,this._tabDropdownLabel,"lm_tabdropdown",(()=>this._tabsContainer.showAdditionalTabsDropdown()))),this._popoutEnabled&&(this._popoutButton=new Kt(this,this._popoutLabel,"lm_popout",(()=>this.handleButtonPopoutEvent()))),this._maximiseEnabled&&(this._maximiseButton=new Kt(this,this._maximiseLabel,"lm_maximise",(t=>this.handleButtonMaximiseToggleEvent(t)))),this._configClosable&&(this._closeButton=new Kt(this,this._closeLabel,"lm_close",(()=>s()))),this.processTabDropdownActiveChanged()}get show(){return this._show}get side(){return this._side}get leftRightSided(){return this._leftRightSided}get layoutManager(){return this._layoutManager}get parent(){return this._parent}get tabs(){return this._tabsContainer.tabs}get lastVisibleTabIndex(){return this._tabsContainer.lastVisibleTabIndex}get element(){return this._element}get tabsContainerElement(){return this._tabsContainer.element}get controlsContainerElement(){return this._controlsContainerElement}destroy(){this.emit("destroy"),this._popoutEvent=void 0,this._maximiseToggleEvent=void 0,this._clickEvent=void 0,this._touchStartEvent=void 0,this._componentRemoveEvent=void 0,this._componentFocusEvent=void 0,this._componentDragStartEvent=void 0,this._tabsContainer.destroy(),globalThis.document.removeEventListener("mouseup",this._documentMouseUpListener),this._element.remove()}createTab(t,e){this._tabsContainer.createTab(t,e)}removeTab(t){this._tabsContainer.removeTab(t)}processActiveComponentChanged(t){this._tabsContainer.processActiveComponentChanged(t),this.updateTabSizes()}setSide(t){this._side=t,this._leftRightSided=[nt.right,nt.left].includes(this._side)}setRowColumnClosable(t){this._rowColumnClosable=t,this.updateClosability()}updateClosability(){let t;if(this._configClosable)if(this._rowColumnClosable){t=!0;const e=this.tabs.length;for(let i=0;i1}applyFocusedValue(t){t?this._element.classList.add("lm_focused"):this._element.classList.remove("lm_focused")}processMaximised(){if(void 0===this._maximiseButton)throw new J("HPMAX16997");this._maximiseButton.element.setAttribute("title",this._minimiseLabel)}processMinimised(){if(void 0===this._maximiseButton)throw new J("HPMIN16997");this._maximiseButton.element.setAttribute("title",this._maximiseLabel)}updateTabSizes(){if(this._tabsContainer.tabCount>0){const t=this._show?this._layoutManager.layoutConfig.dimensions.headerHeight:0;let e;this._leftRightSided?(this._element.style.height="",this._element.style.width=zt(t)):(this._element.style.width="",this._element.style.height=zt(t)),e=this._leftRightSided?this._element.offsetHeight-this._controlsContainerElement.offsetHeight-this._tabControlOffset:this._element.offsetWidth-this._controlsContainerElement.offsetWidth-this._tabControlOffset,this._tabsContainer.updateTabSizes(e,this._getActiveComponentItemEvent())}}handleTabInitiatedComponentRemoveEvent(t){if(this._canRemoveComponent){if(void 0===this._componentRemoveEvent)throw new J("HHTCE22294");this._componentRemoveEvent(t)}}handleTabInitiatedComponentFocusEvent(t){if(void 0===this._componentFocusEvent)throw new J("HHTAE22294");this._componentFocusEvent(t)}handleTabInitiatedDragStartEvent(t,e,i,n){if(this._canRemoveComponent){if(void 0===this._componentDragStartEvent)throw new J("HHTDSE22294");this._componentDragStartEvent(t,e,i,n)}else i.cancelDrag()}processTabDropdownActiveChanged(){void 0!==this._tabDropdownButton&&Dt(this._tabDropdownButton.element,this._tabsContainer.dropdownActive)}handleButtonPopoutEvent(){if(this._layoutManager.layoutConfig.settings.popoutWholeStack){if(void 0===this._popoutEvent)throw new J("HHBPOE17834");this._popoutEvent()}else{const t=this._getActiveComponentItemEvent();t&&t.popout()}}handleButtonMaximiseToggleEvent(t){if(void 0===this._maximiseToggleEvent)throw new J("HHBMTE16834");this._maximiseToggleEvent()}onClick(t){t.target===this._element&&this.notifyClick(t)}onTouchStart(t){t.target===this._element&&this.notifyTouchStart(t)}notifyClick(t){if(void 0===this._clickEvent)throw new J("HNHC46834");this._clickEvent(t)}notifyTouchStart(t){if(void 0===this._touchStartEvent)throw new J("HNHTS46834");this._touchStartEvent(t)}}class ee extends $t{constructor(t,e,i){var n,o,s,r,a,l,h,d,c,m,u,p,g,f,v,_,y,C,w;super(t,e,i,ee.createElement(document)),this._headerSideChanged=!1,this._resizeListener=()=>this.handleResize(),this._maximisedListener=()=>this.handleMaximised(),this._minimisedListener=()=>this.handleMinimised(),this._headerConfig=e.header;const I=t.layoutConfig.header,b=e.content;let S;if(1!==b.length)S=void 0;else{S=b[0].header}this._initialWantMaximise=e.maximised,this._initialActiveItemIndex=null!==(n=e.activeItemIndex)&&void 0!==n?n:0;const E=null!==(r=null!==(s=null===(o=this._headerConfig)||void 0===o?void 0:o.show)&&void 0!==s?s:null==S?void 0:S.show)&&void 0!==r?r:I.show,x=null!==(h=null!==(l=null===(a=this._headerConfig)||void 0===a?void 0:a.popout)&&void 0!==l?l:null==S?void 0:S.popout)&&void 0!==h?h:I.popout,L=null!==(m=null!==(c=null===(d=this._headerConfig)||void 0===d?void 0:d.maximise)&&void 0!==c?c:null==S?void 0:S.maximise)&&void 0!==m?m:I.maximise,z=null!==(g=null!==(p=null===(u=this._headerConfig)||void 0===u?void 0:u.close)&&void 0!==p?p:null==S?void 0:S.close)&&void 0!==g?g:I.close,M=null!==(_=null!==(v=null===(f=this._headerConfig)||void 0===f?void 0:f.minimise)&&void 0!==v?v:null==S?void 0:S.minimise)&&void 0!==_?_:I.minimise,P=null!==(w=null!==(C=null===(y=this._headerConfig)||void 0===y?void 0:y.tabDropdown)&&void 0!==C?C:null==S?void 0:S.tabDropdown)&&void 0!==w?w:I.tabDropdown;this._maximisedEnabled=!1!==L;const T={show:!1!==E,side:!1===E?nt.top:E,popoutEnabled:!1!==x,popoutLabel:!1===x?"":x,maximiseEnabled:this._maximisedEnabled,maximiseLabel:!1===L?"":L,closeEnabled:!1!==z,closeLabel:!1===z?"":z,minimiseEnabled:!0,minimiseLabel:M,tabDropdownEnabled:!1!==P,tabDropdownLabel:!1===P?"":P};this._header=new te(t,this,T,e.isClosable&&!1!==z,(()=>this.getActiveComponentItem()),(()=>this.remove()),(()=>this.handlePopoutEvent()),(()=>this.toggleMaximise()),(t=>this.handleHeaderClickEvent(t)),(t=>this.handleHeaderTouchStartEvent(t)),(t=>this.handleHeaderComponentRemoveEvent(t)),(t=>this.handleHeaderComponentFocusEvent(t)),((t,e,i,n)=>this.handleHeaderComponentStartDragEvent(t,e,i,n))),this.isStack=!0,this._childElementContainer=document.createElement("section"),this._childElementContainer.classList.add("lm_items"),this.on("resize",this._resizeListener),this._maximisedEnabled&&(this.on("maximised",this._maximisedListener),this.on("minimised",this._minimisedListener)),this.element.appendChild(this._header.element),this.element.appendChild(this._childElementContainer),this.setupHeaderPosition(),this._header.updateClosability()}get childElementContainer(){return this._childElementContainer}get header(){return this._header}get headerShow(){return this._header.show}get headerSide(){return this._header.side}get headerLeftRightSided(){return this._header.leftRightSided}get contentAreaDimensions(){return this._contentAreaDimensions}get initialWantMaximise(){return this._initialWantMaximise}get isMaximised(){return this===this.layoutManager.maximisedStack}get stackParent(){if(!this.parent)throw new Error("Stack should always have a parent");return this.parent}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}init(){if(!0===this.isInitialised)return;this.updateNodeSize();for(let t=0;t0){if(this._initialActiveItemIndex<0||this._initialActiveItemIndex>=e)throw new Error(`ActiveItemIndex out of range: ${this._initialActiveItemIndex} id: ${this.id}`);for(let i=0;ithis.contentItems.length)throw e-=1,new X("SAC99728");if(t instanceof jt)return e=super.addChild(t,e),this._childElementContainer.appendChild(t.element),this._header.createTab(t,e),this.setActiveComponentItem(t,i),this._header.updateTabSizes(),this.updateSize(!1),t.container.setBaseLogicalZIndex(),this._header.updateClosability(),this.emitStateChangedEvent(),e;throw new X("SACC88532")}removeChild(t,e){const i=t,n=this.contentItems.indexOf(i),o=1===this.contentItems.length;if(this._activeComponentItem===i&&(i.focused&&i.blur(),!o)){const t=0===n?1:n-1;this.setActiveComponentItem(this.contentItems[t],!1)}this._header.removeTab(i),super.removeChild(i,e),o||this._header.updateClosability(),this.emitStateChangedEvent()}toggleMaximise(){this.isMaximised?this.minimise():this.maximise()}maximise(){if(!this.isMaximised){this.layoutManager.setMaximisedStack(this);const t=this.contentItems,e=t.length;for(let i=0;i0&&void 0===t)throw new Error("expected non-empty stack to have an active component item");return{type:"stack",content:this.calculateConfigContent(),size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,isClosable:this.isClosable,maximised:this.isMaximised,header:this.createHeaderConfig(),activeItemIndex:t}}onDrop(t,e){if("header"===this._dropSegment){if(this.resetHeaderDropZone(),void 0===this._dropIndex)throw new J("SODDI68990");return void this.addChild(t,this._dropIndex)}if("body"===this._dropSegment)return void this.addChild(t,0,!0);const i="top"===this._dropSegment||"bottom"===this._dropSegment,n="left"===this._dropSegment||"right"===this._dropSegment,o="top"===this._dropSegment||"left"===this._dropSegment,s=i&&this.stackParent.isColumn||n&&this.stackParent.isRow;if(t.isComponent){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createAndInitContentItem(e,this);i.addChild(t),t=i}if(t.type===at.row||t.type===at.column){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}if(s){const e=this.stackParent.contentItems.indexOf(this);this.stackParent.addChild(t,o?e:e+1,!0),this.size*=.5,t.size=this.size,t.sizeUnit=this.sizeUnit,this.stackParent.updateSize(!1)}else{const e=i?at.column:at.row,n=ct.createDefault(e),s=this.layoutManager.createContentItem(n,this);this.stackParent.replaceChild(this,s),s.addChild(t,o?0:void 0,!0),s.addChild(this,o?void 0:0,!0),this.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}highlightDropZone(t,e){for(const i in this._contentAreaDimensions){const n=i,o=this._contentAreaDimensions[n].hoverArea;if(o.x1t&&o.y1e)return void("header"===n?(this._dropSegment="header",this.highlightHeaderDropZone(this._header.leftRightSided?e:t)):(this.resetHeaderDropZone(),this.highlightBodyDropZone(n)))}}getArea(){if("none"===this.element.style.display)return null;const t=super.getElementArea(this._header.element),e=super.getElementArea(this._childElementContainer);if(null===t||null===e)throw new K("SGAHC13086");const i=e.x2-e.x1,n=e.y2-e.y1;return this._contentAreaDimensions={header:{hoverArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2},highlightArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2}}},0===this.contentItems.length?(this._contentAreaDimensions.body={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2}},super.getElementArea(this.element)):(this._contentAreaDimensions.left={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x1+.25*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x1+.5*i,y2:e.y2}},this._contentAreaDimensions.top={hoverArea:{x1:e.x1+.25*i,y1:e.y1,x2:e.x1+.75*i,y2:e.y1+.5*n},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y1+.5*n}},this._contentAreaDimensions.right={hoverArea:{x1:e.x1+.75*i,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1+.5*i,y1:e.y1,x2:e.x2,y2:e.y2}},this._contentAreaDimensions.bottom={hoverArea:{x1:e.x1+.25*i,y1:e.y1+.5*n,x2:e.x1+.75*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1+.5*n,x2:e.x2,y2:e.y2}},super.getElementArea(this.element))}positionHeader(t){this._header.side!==t&&(this._header.setSide(t),this._headerSideChanged=!0,this.setupHeaderPosition())}updateNodeSize(){if("none"!==this.element.style.display){const t=kt(this.element);if(this._header.show){t[this._header.leftRightSided?it.width:it.height]-=this.layoutManager.layoutConfig.dimensions.headerHeight}this._childElementContainer.style.width=zt(t.width),this._childElementContainer.style.height=zt(t.height);for(let e=0;e=o&&t({...t,[e]:i});async function s(t,e){return(await Promise.all(e.map((async([e,i])=>[e,await t(i,e)])))).reduce(o,{})}n.mapEntriesAsync=s,n.mapValuesAsync=async function(t,e){let i;return i=e instanceof Map?[...e.entries()]:Object.entries(e),s(t,i)};var r,a,l,h,d=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldSet||function(t,e,i,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(t,i):o?o.value=i:e.set(t,i),i},c=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldGet||function(t,e,i,n){if("a"===i&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?n:"a"===i?n.call(t):n?n.value:e.get(t)};Object.defineProperty(i,"__esModule",{value:!0});var m=i.DefaultLayoutManager=void 0;const u=n;class p{constructor(t){a.set(this,void 0),l.set(this,new Map),d(this,a,t,"f")}size(){return c(this,l,"f").size}async applyLayoutSnapshot({layouts:t}){if(Object.keys(t).length>1)throw new Error("[LayoutManager] Tried to call applyLayoutSnapshot with more than 1 layout. When implementing multiple layouts via overridden LayoutManager class, you must override and fully implement the applyLayoutSnapshot method without calling super.applyLayoutSnapshot().");const[[e,i]]=Object.entries(t);await p.createLayout(this,{layoutName:e,layout:i})}async showLayout({layoutName:t}){}async getLayoutSnapshot(){return{layouts:await(0,u.mapValuesAsync)((t=>t.getFrameSnapshot()),c(this,l,"f"))}}async removeLayout({layoutName:t}){}getLayoutIdentityForView(t){const e=[...c(this,l,"f").values()].find((e=>e.getCurrentViews().some((e=>e.name===t.name&&e.uuid===t.uuid))));return e?.identity??void 0}isLayoutVisible({layoutName:t}){return c(p,r,"m",h).call(p,this,t).isVisible()}resolveLayoutIdentity(t){if(t&&"layoutName"in t)return t;const e=[...c(this,l,"f").values()];if(1===e.length)return e[0].identity;const i=e.find((t=>t.isVisible()));return i?.identity??void 0}static async resolveLayout(t,e){const i=t.resolveLayoutIdentity(e);if(void 0===i||!("layoutName"in i))throw new Error("[layout-manager] resolveLayout: Could not resolve the layout identity. Make sure you include 'layoutName' in the identity object.");return c(p,r,"m",h).call(p,t,i.layoutName)}static async handleSharedView(t,e,i){await(0,u.mapValuesAsync)((async t=>{if(t.identity.layoutName!==e.layoutName){const e=t.getCurrentViews().find((t=>t.name===i.name));e&&await t.onViewDetached({viewIdentity:e,target:null}).catch(console.error)}}),c(t,l,"f"))}static async handleLastViewRemoved(t,e){await t.removeLayout(e),await c(t,a,"f").handleLastViewRemoved(t)}static async destroyLayout(t,{layoutName:e}){await c(p,r,"m",h).call(p,t,e).destroy(),c(t,l,"f").delete(e)}static async createLayout(t,e){const{layoutName:i}=e;if(c(t,l,"f").has(i))throw new Error(`Layout name ${i} already exists`);await c(t,a,"f").createLayout(e,t)}static registerLayout(t,e,i){c(t,l,"f").set(e,i)}static getAllLayouts(t){return[...c(t,l,"f").values()]}static setInitialSnapshot(t,e){c(t,a,"f").setInitialSnapshot(e)}static createClosedConstructor(...t){return class extends p{constructor(){super(...t)}}}}m=i.DefaultLayoutManager=p,r=p,a=new WeakMap,l=new WeakMap,h=function(t,e){const i=c(t,l,"f").get(e);if(!i)throw new Error(`[layout-manager] getLayoutByName: Could not locate layout with name '${e}'`);return i};var g={},f={},v={};Object.defineProperty(v,"__esModule",{value:!0}),v.ReversibleMap=void 0;v.ReversibleMap=class{constructor(){this.valueToKey=new Map,this.keyToValue=new Map,this.setUnique=(t,e)=>{if(this.hasKey(t)||this.hasValue(e))throw new Error("Key or value already in the map.");this.keyToValue.set(t,e),this.valueToKey.set(e,t)},this.getKey=t=>{const e=this.valueToKey.get(t);if(!e)throw new Error("Value not found in the map.");return e},this.deleteKey=t=>{const e=this.getValue(t);return this.keyToValue.delete(t),this.valueToKey.delete(e),e},this.deleteValue=t=>{const e=this.getKey(t);return this.keyToValue.delete(e),this.valueToKey.delete(t),e},this.hasKey=t=>this.keyToValue.has(t),this.hasValue=t=>this.valueToKey.has(t)}getValue(t){const e=this.keyToValue.get(t);if(!e)throw new Error("Key not found in the map.");return e}},Object.defineProperty(f,"__esModule",{value:!0});var _=f.LayoutContentCache=void 0;const y=t.lazy,C=v;class w{constructor(){this.contentItemCache=new C.ReversibleMap,this.contentItemCacheId=0,this.createCacheKey=()=>{const t=`entity-${this.contentItemCacheId.toString()}`;return this.contentItemCacheId+=1,t},this.hasKey=t=>this.contentItemCache.hasKey(t),this.getItemOrUndefined=t=>{try{return this.getContentItemOrThrow(t)}catch(t){return}},this.getContentItemOrThrow=(t,e)=>{if(!this.contentItemCache.hasKey(t))throw new Error("Layout component has been destroyed or detached from the current layout.");const i=this.contentItemCache.getValue(t);if(e&&!e.includes(i.type))throw new Error(`Layout item is not the expected type. Expected ${e.join(", ")}, got ${i.type}.`);return i},this.getOrCreateEntityId=t=>{if(this.contentItemCache.hasValue(t))return this.contentItemCache.getKey(t);t.onDestroyed((()=>{this.contentItemCache.deleteValue(t)}));const e=this.createCacheKey();return this.contentItemCache.setUnique(e,t),e}}static getSingleInstance(){return w.singleton.getValue()}}_=f.LayoutContentCache=w,w.singleton=new y.Lazy((()=>new w));var I={},b={};!function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.getAdjacentStacks=t.doShareEdge=t.getAdjacentItem=void 0;t.getAdjacentItem=(e,i)=>{const{parent:n}=e;if(e.isRoot()||!n)return;const o=["top","bottom"].includes(i)?"column":"row",s=["top","left"].includes(i)?-1:1;if(n.type===o){const t=n.contentItems.indexOf(e)+s;if(t>=0&&t{const n=t.getBounds(),o=e.getBounds();if(!n||!o)return!1;if(["top","bottom"].includes(i)){return!(n.righto.right)}return!(n.bottomo.bottom)};t.getAdjacentStacks=(e,i)=>{const n=["top","bottom"].includes(i)?"row":"column",o=s=>"stack"===s.type?(0,t.doShareEdge)(e,s,i)?[s]:[]:"root"===s.type||"ground"===s.type?[]:s.type===n?s.contentItems.map((t=>o(t))).flat():s.type!==n?["top","right"].includes(i)?o(s.contentItems[s.contentItems.length-1]):o(s.contentItems[0]):[],s=(0,t.getAdjacentItem)(e,i);return s?o(s):[]}}(b);var S=t.commonjsGlobal&&t.commonjsGlobal.__decorate||function(t,e,i,n){var o,s=arguments.length,r=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(s<3?o(r):s>3?o(e,i,r):o(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};Object.defineProperty(I,"__esModule",{value:!0}),I.LayoutEntitiesController=void 0;const E=t.decorators,x=b,L=i;class z{constructor(t,e,i){this.wire=t,this.layoutManager=e,this.layoutContentCache=i,this.analytics=t=>{this.wire.sendAction(`layout-controller-${t}`).catch((()=>{}))},this.getLayoutIdentityForViewOrThrow=async t=>{const e=this.layoutManager.getLayoutIdentityForView(t);if(!e)throw new Error(`View identity ${t.name} is not attached to any layouts.`);return e},this.getRoot=async t=>{this.analytics("get-root");const e=(await this.getLayout(t)).getRoot();return{type:e.type,entityId:this.layoutContentCache.getOrCreateEntityId(e)}},this.getStackByView=async t=>{this.analytics("get-stack-by-view");const e=await this.getLayoutIdentityForViewOrThrow(t),i=(await this.getLayout(e)).getStackByView(t);if("stack"===i?.type)return{entityId:this.layoutContentCache.getOrCreateEntityId(i),type:"stack"}},this.getStackViews=t=>{this.analytics("get-stack-views");return this.layoutContentCache.getContentItemOrThrow(t,["stack"]).contentItems.map((t=>({name:t.viewName,uuid:this.wire.me.uuid})))},this.isRoot=t=>{this.analytics("is-root");return this.layoutContentCache.getContentItemOrThrow(t).isRoot()},this.exists=t=>(this.analytics("exists"),this.layoutContentCache.hasKey(t)),this.addViewToStack=async(t,e,{index:i}={index:0})=>{this.analytics("add-view-to-stack");const n=this.layoutContentCache.getContentItemOrThrow(t);if(i&&i>n.contentItems.length+1)throw new Error(`Index '${i}' out of range, please exclude the index or specify a number between 0 and ${n.contentItems.length}`);const o={id:t,index:i},{identity:s}=await n.layout.platformCreateView(e,{location:o});return s},this.findViewInStack=(t,e)=>t.contentItems.find((t=>t.viewName===e.name)),this.removeViewFromStack=async(t,e)=>{this.analytics("remove-view-from-stack");const i=this.layoutContentCache.getContentItemOrThrow(t,["stack"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to remove a view ('${e.name}') which does not belong to the stack.`);await n.layout.platformCloseView(e)},this.createAdjacentStack=async(t,e,{position:i="right"}={})=>{if(this.analytics("create-adjacent-stack"),!Array.isArray(e)||0===e.length)throw new Error('The parameter "views" must be an array with at least 1 element.');if(!["top","bottom","left","right"].includes(i))throw new Error(`Invalid position '${i}' specified.`);const n=this.layoutContentCache.getContentItemOrThrow(t).createAdjacentStack({position:i}),o=this.layoutContentCache.getOrCreateEntityId(n);return await Promise.all(e.reverse().map((t=>this.addViewToStack(o,t)))),o},this.getAdjacentStacks=async({targetId:t,edge:e})=>{this.analytics("get-adjacent-stacks");const i=this.layoutContentCache.getContentItemOrThrow(t);return(0,x.getAdjacentStacks)(i,e).map((t=>({entityId:this.layoutContentCache.getOrCreateEntityId(t)})))},this.setStackActiveView=async(t,e)=>{this.analytics("set-stack-active-view");const i=this.layoutContentCache.getContentItemOrThrow(t,["stack"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to set a view ('${e.name}') as active when it does not belong to the stack.`);i.setActiveContentItem(n,!0)}}async getLayout(t){const e=await L.DefaultLayoutManager.resolveLayout(this.layoutManager,t);if(!e)throw new Error(`Could not resolve target layout identity ${JSON.stringify(t)}`);return e}getContent(t){this.analytics("get-content");return this.layoutContentCache.getContentItemOrThrow(t,["column","row"]).contentItems.map((t=>({type:t.type,entityId:this.layoutContentCache.getOrCreateEntityId(t)})))}getParent(t){this.analytics("get-parent");const e=this.layoutContentCache.getContentItemOrThrow(t);if(!e.isRoot())return e.parent?.contentItems.includes(e)?{type:e.parent.type,entityId:this.layoutContentCache.getOrCreateEntityId(e.parent)}:void 0}}S([(0,E.expose)()],z.prototype,"getLayoutIdentityForViewOrThrow",void 0),S([(0,E.expose)()],z.prototype,"getRoot",void 0),S([(0,E.expose)()],z.prototype,"getStackByView",void 0),S([(0,E.expose)()],z.prototype,"getStackViews",void 0),S([(0,E.expose)()],z.prototype,"getContent",null),S([(0,E.expose)()],z.prototype,"getParent",null),S([(0,E.expose)()],z.prototype,"isRoot",void 0),S([(0,E.expose)()],z.prototype,"exists",void 0),S([(0,E.expose)()],z.prototype,"addViewToStack",void 0),S([(0,E.expose)()],z.prototype,"removeViewFromStack",void 0),S([(0,E.expose)()],z.prototype,"createAdjacentStack",void 0),S([(0,E.expose)()],z.prototype,"getAdjacentStacks",void 0),S([(0,E.expose)()],z.prototype,"setStackActiveView",void 0),I.LayoutEntitiesController=z,Object.defineProperty(g,"__esModule",{value:!0});var M=g.initLayoutEndpoints=void 0;const P=t.apiExposer,T=t.layout_constants,A=f,k=I,D=i;M=g.initLayoutEndpoints=async function(t,e){const i=t.getFin(),n=await i.Platform.getCurrentSync().getClient(),o=new P.ChannelsExposer(n);await new P.ApiExposer(o).exposeInstance(new k.LayoutEntitiesController(t,e,A.LayoutContentCache.getSingleInstance()),{id:T.LAYOUT_CONTROLLER_ID}),await async function(t,e){const i=t=>async i=>{const n=await D.DefaultLayoutManager.resolveLayout(e,i.target);if(!n)throw new Error(`Could not resolve the layout target from payload ${JSON.stringify(i)}`);return t(n,i)},n=(e,n)=>{t.register(e,i(n))},o=(t,e)=>{n(t,e)};n("replace-view",((t,e)=>t.replaceView(e))),n("replace-layout",((t,{layout:e})=>t.replaceLayout(e))),n("add-view",((t,e)=>t.insertView(e))),o("layout-add-view",((t,{viewOptions:e,location:i,targetView:n})=>t.platformCreateView(e,{location:i,targetView:n}))),n("close-view",((t,e)=>t.cleanupView(e.viewIdentity))),o("layout-close-view",((t,e)=>t.platformCloseView(e.viewIdentity))),n("apply-preset-layout",((t,e)=>t.applyPreset(e))),n("get-layout-views",(t=>t.getCurrentViews())),n("get-frame-snapshot",(t=>t.getFrameSnapshot())),n("is-visible",(t=>t.isVisible())),n("destroy",(t=>t.destroy())),t.register("get-layout-snapshot",(()=>e.getLayoutSnapshot()))}(n,e)};var R={};Object.defineProperty(R,"__esModule",{value:!0});var U=R.BaseLayout=void 0;U=R.BaseLayout=class{};var O={};Object.defineProperty(O,"__esModule",{value:!0});var V=O.DOMEmitter=void 0;V=O.DOMEmitter=class{constructor(t){this.container=t}dispatchLocalEvent(t,e){const i={...e,type:t,tabSelector:`tab-${e.name}`,containerSelector:`container-${e.name}`,topic:"openfin-DOM-event"};this.container.dispatchEvent(new CustomEvent(t,{detail:i}))}};var B={};Object.defineProperty(B,"__esModule",{value:!0});var H=B.mapLayoutContentItemsImmutableSync=B.mapLayoutContentItemsImmutable=W=B.isVisible=void 0;var W=B.isVisible=t=>(0!==t.offsetWidth||0!==t.offsetHeight)&&"hidden"!==window.getComputedStyle(t).visibility&&t.offsetTop>=0&&t.offsetLeft>=0&&t.offsetTop<=window.innerHeight&&t.offsetLeft<=window.innerWidth;const F=t=>"type"in t&&"component"===t.type;B.mapLayoutContentItemsImmutable=async function t(e,i){return F(i)?e(i):{...i,content:await Promise.all(i.content?.map((i=>t(e,i))))}},H=B.mapLayoutContentItemsImmutableSync=function t(e,i){return F(i)?e(i):{...i,content:i.content?.map((i=>t(e,i)))}};class N extends Error{constructor(t,e){super(e),this.type=t}}class G extends N{constructor(t,e){super("Configuration",t),this.node=e}}class j extends N{constructor(t){super("PopoutBlocked",t)}}class $ extends N{constructor(t){super("API",t)}}class Z extends N{constructor(t){super("Bind",t)}}class q extends Error{constructor(t,e,i){super(`${t}: ${e}${void 0===i?"":": "+i}`)}}class X extends q{constructor(t,e){super("Assert",t,e)}}class Y extends q{constructor(t,e,i){super("UnreachableCase",t,`${e}${void 0===i?"":": "+i}`)}}class K extends q{constructor(t,e){super("UnexpectedNull",t,e)}}class J extends q{constructor(t,e){super("UnexpectedUndefined",t,e)}}var Q;!function(t){let e=!1;const i={PopoutCannotBeCreatedWithGroundItemConfig:{id:0,default:"Popout cannot be created with ground ItemConfig"},PleaseRegisterAConstructorFunction:{id:1,default:"Please register a constructor function"},ComponentTypeNotRegisteredAndBindComponentEventHandlerNotAssigned:{id:2,default:"Component type not registered and BindComponentEvent handler not assigned"},ComponentIsAlreadyRegistered:{id:3,default:"Component is already registered"},ComponentIsNotVirtuable:{id:4,default:"Component is not virtuable. Requires rootHtmlElement field/getter"},VirtualComponentDoesNotHaveRootHtmlElement:{id:5,default:'Virtual component does not have getter "rootHtmlElement"'},ItemConfigIsNotTypeComponent:{id:6,default:"ItemConfig is not of type component"},InvalidNumberPartInSizeString:{id:7,default:"Invalid number part in size string"},UnknownUnitInSizeString:{id:8,default:"Unknown unit in size string"},UnsupportedUnitInSizeString:{id:9,default:"Unsupported unit in size string"}};t.idCount=Object.keys(i).length;const n=Object.values(i);t.checkInitialise=function(){if(!e)for(let e=0;e="0"&&t<="9"}function Tt(t,e){const i=zt(e);t.style.width=i}function At(t,e){const i=zt(e);t.style.height=i}function kt(t){return{width:t.offsetWidth,height:t.offsetHeight}}function Dt(t,e){t.style.display=e?"":"none"}function Rt(t,e){if(void 0!==e)for(const i in e)if(e.hasOwnProperty(i)){const n=e[i],o=t[i];t[i]=Ut(o,n)}return t}function Ut(t,e){if("object"!=typeof e)return e;if(Array.isArray(e)){const t=e.length,i=new Array(t);for(let n=0;n36)throw new Error("Too many keys in config minifier map")},t.translateObject=n}(dt||(dt={})),function(t){t.defaults={type:at.ground,content:[],size:1,sizeUnit:ht.Fractional,minSize:void 0,minSizeUnit:ht.Pixel,id:"",isClosable:!0},t.createCopy=function(t,e){switch(t.type){case at.ground:case at.row:case at.column:return gt.createCopy(t,e);case at.stack:return ut.createCopy(t,e);case at.component:return pt.createCopy(t);default:throw new Y("CICC91354",t.type,"Invalid Config Item type specified")}},t.createDefault=function(t){switch(t){case at.ground:throw new X("CICCDR91562");case at.row:case at.column:return gt.createDefault(t);case at.stack:return ut.createDefault();case at.component:return pt.createDefault();default:throw new Y("CICCDD91563",t,"Invalid Config Item type specified")}},t.isComponentItem=function(t){return t.type===at.component},t.isStackItem=function(t){return t.type===at.stack},t.isGroundItem=function(t){return t.type===at.ground}}(ct||(ct={})),function(t){t.defaultMaximised=!1,function(t){t.createCopy=function(t,e){return void 0===t?void 0:{show:null!=e?e:t.show,popout:t.popout,close:t.close,maximise:t.maximise,minimise:t.minimise,tabDropdown:t.tabDropdown}}}(t.Header||(t.Header={}))}(mt||(mt={})),function(t){function e(t){const e=t.length,i=new Array(e);for(let n=0;n"__glMaximised"===t));t>0&&(o=!0,n=n.splice(t,1)),e=n.length>0?n[0]:ct.defaults.id}else e=n;return i=void 0!==t.maximised?t.maximised:o,{id:e,maximised:i}}}(wt||(wt={})),function(t){function e(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0;return{resolved:!0,root:Et.resolve(i),openPopouts:t.resolveOpenPopouts(e.openPopouts),dimensions:t.Dimensions.resolve(e.dimensions),settings:t.Settings.resolve(e.settings),header:t.Header.resolve(e.header,e.settings,e.labels)}}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:Lt.fromResolvedArray(e.openPopouts),settings:_t.Settings.createCopy(e.settings),dimensions:t.Dimensions.fromResolved(e.dimensions),header:_t.Header.createCopy(e.header)}},t.isResolved=function(t){const e=t;return void 0!==e.resolved&&!0===e.resolved},t.resolveOpenPopouts=function(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0,{root:Et.resolve(o),openPopouts:xt.resolveOpenPopouts(e.openPopouts),dimensions:xt.Dimensions.resolve(e.dimensions),settings:xt.Settings.resolve(e.settings),header:xt.Header.resolve(e.header,e.settings,e.labels),parentId:null!==(i=e.parentId)&&void 0!==i?i:null,indexInParent:null!==(n=e.indexInParent)&&void 0!==n?n:null,window:t.Window.resolve(e.window,e.dimensions),resolved:!0}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:i(e.openPopouts),dimensions:xt.Dimensions.fromResolved(e.dimensions),settings:_t.Settings.createCopy(e.settings),header:_t.Header.createCopy(e.header),parentId:e.parentId,indexInParent:e.indexInParent,window:t.Window.fromResolved(e.window)}},t.fromResolvedArray=i}(Lt||(Lt={}));class Wt{constructor(){this._allEventSubscriptions=[],this._subscriptionsMap=new Map,this.unbind=this.removeEventListener,this.trigger=this.emit}tryBubbleEvent(t,e){}emit(t,...e){let i=this._subscriptionsMap.get(t);if(void 0!==i){i=i.slice();for(let t=0;t0){const n=e.slice();n.unshift(t);const o=this._allEventSubscriptions.slice();for(let t=0;t0?n.contentItems[0]:n,e=0);const o=this._layoutManager.createAndInitContentItem(i,t);t.addChild(o,e),this._layoutManager.layoutConfig.settings.popInOnClose?this._onClose():this.close()}createWindow(){const t=this.createUrl(),e=Math.floor(1e6*Math.random()).toString(36),i=this.serializeWindowFeatures({width:this._initialWindowSize.width,height:this._initialWindowSize.height,innerWidth:this._initialWindowSize.width,innerHeight:this._initialWindowSize.height,menubar:"no",toolbar:"no",location:"no",personalbar:"no",resizable:"yes",scrollbars:"no",status:"no"});if(this._popoutWindow=globalThis.open(t,e,i),this._popoutWindow)this._popoutWindow.addEventListener("load",(()=>this.positionWindow()),{passive:!0}),this._popoutWindow.addEventListener("beforeunload",(()=>{this._layoutManager.layoutConfig.settings.popInOnClose?this.popIn():this._onClose()}),{passive:!0}),this._checkReadyInterval=setInterval((()=>this.checkReady()),10);else if(!0===this._layoutManager.layoutConfig.settings.blockedPopoutsThrowError){throw new j("Popout blocked")}}checkReady(){if(null===this._popoutWindow)throw new K("BPCR01844");this._popoutWindow.__glInstance&&this._popoutWindow.__glInstance.isInitialised&&(this.onInitialised(),void 0!==this._checkReadyInterval&&(clearInterval(this._checkReadyInterval),this._checkReadyInterval=void 0))}serializeWindowFeatures(t){const e=[];for(const i in t)e.push(i+"="+t[i].toString());return e.join(",")}createUrl(){const t="gl-window-config-"+Ot(),e=_t.minifyConfig(this._config);try{localStorage.setItem(t,JSON.stringify(e))}catch(t){throw new Error("Error while writing to localStorage "+function(t){return t instanceof Error?t.message:"string"==typeof t?t:"Unknown Error"}(t))}const i=new URL(location.href);return i.searchParams.set("gl-window",t),i.toString()}positionWindow(){if(null===this._popoutWindow)throw new Error("BrowserPopout.positionWindow: null popoutWindow");this._popoutWindow.moveTo(this._initialWindowSize.left,this._initialWindowSize.top),this._popoutWindow.focus()}onInitialised(){this._isInitialised=!0,this.getGlInstance().on("popIn",(()=>this.popIn())),this.emit("initialised")}_onClose(){setTimeout((()=>this.emit("closed")),50)}}class Gt extends Wt{constructor(t,e,i,n){super(),this.layoutManager=t,this._parent=i,this._element=n,this._popInParentIds=[],this._type=e.type,this._id=e.id,this._isInitialised=!1,this.isGround=!1,this.isRow=!1,this.isColumn=!1,this.isStack=!1,this.isComponent=!1,this.size=e.size,this.sizeUnit=e.sizeUnit,this.minSize=e.minSize,this.minSizeUnit=e.minSizeUnit,this._isClosable=e.isClosable,this._pendingEventPropagations={},this._throttledEvents=["stateChanged"],this._contentItems=this.createContentItems(e.content)}get type(){return this._type}get id(){return this._id}set id(t){this._id=t}get popInParentIds(){return this._popInParentIds}get parent(){return this._parent}get contentItems(){return this._contentItems}get isClosable(){return this._isClosable}get element(){return this._element}get isInitialised(){return this._isInitialised}static isStack(t){return t.isStack}static isComponentItem(t){return t.isComponent}static isComponentParentableItem(t){return t.isStack||t.isGround}removeChild(t,e=!1){const i=this._contentItems.indexOf(t);if(-1===i)throw new Error("Can't remove child item. Unknown content item");if(e||this._contentItems[i].destroy(),this._contentItems.splice(i,1),this._contentItems.length>0)this.updateSize(!1);else if(!this.isGround&&!0===this._isClosable){if(null===this._parent)throw new K("CIUC00874");this._parent.removeChild(this)}}addChild(t,e,i){return null!=e||(e=this._contentItems.length),this._contentItems.splice(e,0,t),t.setParent(this),!0===this._isInitialised&&!1===t._isInitialised&&t.init(),e}replaceChild(t,e,i=!1){const n=this._contentItems.indexOf(t),o=t._element.parentNode;if(-1===n)throw new X("CIRCI23232","Can't replace child. oldChild is not child of this");if(null===o)throw new K("CIRCP23232");if(o.replaceChild(e._element,t._element),!0===i&&(t._parent=null,t.destroy()),this._contentItems[n]=e,e.setParent(this),e.size=t.size,e.sizeUnit=t.sizeUnit,e.minSize=t.minSize,e.minSizeUnit=t.minSizeUnit,null===e._parent)throw new K("CIRCNC45699");!0===e._parent._isInitialised&&!1===e._isInitialised&&e.init(),this.updateSize(!1)}remove(){if(null===this._parent)throw new K("CIR11110");this._parent.removeChild(this)}popout(){const t=Ot(),e=this.layoutManager.createPopoutFromContentItem(this,void 0,t,void 0);return this.emitBaseBubblingEvent("stateChanged"),e}calculateConfigContent(){const t=this._contentItems,e=t.length,i=new Array(e);for(let n=0;nthis.propagateEventToLayoutManager(t,e))))}propagateEventToLayoutManager(t,e){this._pendingEventPropagations[t]=!1,this.layoutManager.emitUnknown(t,e)}}class jt extends Gt{constructor(t,e,i){super(t,e,i,document.createElement("div")),this._parentItem=i,this._focused=!1,this.isComponent=!0,this._reorderEnabled=e.reorderEnabled,this.applyUpdatableConfig(e),this._initialWantMaximise=e.maximised;const n=document.createElement("div");n.classList.add("lm_content"),this.element.appendChild(n),this._container=new Ft(e,this,t,n,(t=>this.handleUpdateItemConfigEvent(t)),(()=>this.show()),(()=>this.hide()),(t=>this.focus(t)),(t=>this.blur(t)))}get componentName(){return this._container.componentType}get componentType(){return this._container.componentType}get reorderEnabled(){return this._reorderEnabled}get initialWantMaximise(){return this._initialWantMaximise}get component(){return this._container.component}get container(){return this._container}get parentItem(){return this._parentItem}get headerConfig(){return this._headerConfig}get title(){return this._title}get tab(){return this._tab}get focused(){return this._focused}destroy(){this._container.destroy(),super.destroy()}applyUpdatableConfig(t){this.setTitle(t.title),this._headerConfig=t.header}toConfig(){const t=this._container.stateRequestEvent,e=void 0===t?this._container.state:t();return{type:at.component,content:[],size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,maximised:!1,isClosable:this.isClosable,reorderEnabled:this._reorderEnabled,title:this._title,header:mt.Header.createCopy(this._headerConfig),componentType:pt.copyComponentType(this.componentType),componentState:e}}close(){if(null===this.parent)throw new K("CIC68883");this.parent.removeChild(this,!1)}enterDragMode(t,e){Tt(this.element,t),At(this.element,e),this._container.enterDragMode(t,e)}exitDragMode(){this._container.exitDragMode()}enterStackMaximised(){this._container.enterStackMaximised()}exitStackMaximised(){this._container.exitStackMaximised()}drag(){this._container.drag()}updateSize(t){this.updateNodeSize(t)}init(){this.updateNodeSize(!1),super.init(),this._container.emit("open"),this.initContentItems()}setTitle(t){this._title=t,this.emit("titleChanged",t),this.emit("stateChanged")}setTab(t){this._tab=t,this.emit("tab",t),this._container.setTab(t)}hide(){super.hide(),this._container.setVisibility(!1)}show(){super.show(),this._container.setVisibility(!0)}focus(t=!1){this.parentItem.setActiveComponentItem(this,!0,t)}setFocused(t){this._focused=!0,this.tab.setFocused(),t||this.emitBaseBubblingEvent("focus")}blur(t=!1){this._focused&&this.layoutManager.setFocusedComponentItem(void 0,t)}setBlurred(t){this._focused=!1,this.tab.setBlurred(),t||this.emitBaseBubblingEvent("blur")}setParent(t){this._parentItem=t,super.setParent(t)}handleUpdateItemConfigEvent(t){this.applyUpdatableConfig(t)}updateNodeSize(t){if("none"!==this.element.style.display){const{width:e,height:i}=kt(this.element);this._container.setSizeToNodeSize(e,i,t)}}}class $t extends Gt{constructor(){super(...arguments),this._focused=!1}get focused(){return this._focused}setFocusedValue(t){this._focused=t}}class Zt extends Wt{constructor(t,e){super(),this._eElement=t,this._pointerTracking=!1,this._pointerDownEventListener=t=>this.onPointerDown(t),this._pointerMoveEventListener=t=>this.onPointerMove(t),this._pointerUpEventListener=t=>this.onPointerUp(t),this._timeout=void 0,this._allowableTargets=[t,...e],this._oDocument=document,this._eBody=document.body,this._nDelay=1800,this._nDistance=10,this._nX=0,this._nY=0,this._nOriginalX=0,this._nOriginalY=0,this._dragging=!1,this._eElement.addEventListener("pointerdown",this._pointerDownEventListener,{passive:!0})}destroy(){this.checkRemovePointerTrackingEventListeners(),this._eElement.removeEventListener("pointerdown",this._pointerDownEventListener)}cancelDrag(){this.processDragStop(void 0)}onPointerDown(t){if(this._allowableTargets.includes(t.target)&&t.isPrimary){const e=this.getPointerCoordinates(t);this.processPointerDown(e)}}processPointerDown(t){this._nOriginalX=t.x,this._nOriginalY=t.y,this._oDocument.addEventListener("pointermove",this._pointerMoveEventListener),this._oDocument.addEventListener("pointerup",this._pointerUpEventListener,{passive:!0}),this._pointerTracking=!0,this._timeout=setTimeout((()=>{try{this.startDrag()}catch(t){throw console.error(t),t}}),this._nDelay)}onPointerMove(t){this._pointerTracking&&(this.processDragMove(t),t.preventDefault())}processDragMove(t){this._nX=t.pageX-this._nOriginalX,this._nY=t.pageY-this._nOriginalY,!1===this._dragging&&(Math.abs(this._nX)>this._nDistance||Math.abs(this._nY)>this._nDistance)&&this.startDrag(),this._dragging&&this.emit("drag",this._nX,this._nY,t)}onPointerUp(t){this.processDragStop(t)}processDragStop(t){var e;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this.checkRemovePointerTrackingEventListeners(),!0===this._dragging&&(this._eBody.classList.remove("lm_dragging"),this._eElement.classList.remove("lm_dragging"),null===(e=this._oDocument.querySelector("iframe"))||void 0===e||e.style.setProperty("pointer-events",""),this._dragging=!1,this.emit("dragStop",t))}checkRemovePointerTrackingEventListeners(){this._pointerTracking&&(this._oDocument.removeEventListener("pointermove",this._pointerMoveEventListener),this._oDocument.removeEventListener("pointerup",this._pointerUpEventListener),this._pointerTracking=!1)}startDrag(){var t;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this._dragging=!0,this._eBody.classList.add("lm_dragging"),this._eElement.classList.add("lm_dragging"),null===(t=this._oDocument.querySelector("iframe"))||void 0===t||t.style.setProperty("pointer-events","none"),this.emit("dragStart",this._nOriginalX,this._nOriginalY)}getPointerCoordinates(t){return{x:t.pageX,y:t.pageY}}}class qt{constructor(t,e,i){this._isVertical=t,this._size=e,this._grabSize=i0){const i=this.createSplitter(Math.max(0,e-1)).element;e>0?(this.contentItems[e-1].element.insertAdjacentElement("afterend",i),i.insertAdjacentElement("afterend",t.element)):(this.contentItems[0].element.insertAdjacentElement("beforebegin",i),i.insertAdjacentElement("beforebegin",t.element))}else this._childElementContainer.appendChild(t.element);super.addChild(t,e);const n=1/this.contentItems.length*100;if(!0===i)return this.emitBaseBubblingEvent("stateChanged"),e;for(let e=0;e0&&(this.calculateRelativeSizes(),this.setAbsoluteSizes()),this.emitBaseBubblingEvent("stateChanged"),this.emit("resize")}setAbsoluteSizes(){const t=this.calculateAbsoluteSizes();for(let e=0;e0&&t.itemSizes[e]++,this._isColumn?(Tt(this.contentItems[e].element,t.crossAxisSize),At(this.contentItems[e].element,t.itemSizes[e])):(Tt(this.contentItems[e].element,t.itemSizes[e]),At(this.contentItems[e].element,t.crossAxisSize))}calculateAbsoluteSizes(){const t=(this.contentItems.length-1)*this._splitterSize,{width:e,height:i}=kt(this.element);let n,o;this._isColumn?(n=i-t,o=e):(n=e-t,o=i);let s=0;const r=[];for(let t=0;t0){const n=100-t;for(let t=0;t100&&e.length>0){for(let t=0;te)return;{const r=i/e;let a=i;for(let e=0;ethis.onSplitterDrag(e,t,i))),e.on("dragStop",(()=>this.onSplitterDragStop(e))),e.on("dragStart",(()=>this.onSplitterDragStart(e))),this._splitter.splice(t,0,e),e}getSplitItems(t){const e=this._splitter.indexOf(t);return{before:this.contentItems[e],after:this.contentItems[e+1]}}calculateContentItemMinSize(t){const e=t.minSize;if(void 0!==e){if(t.minSizeUnit===ht.Pixel)return e;throw new X("ROCGMD98831",JSON.stringify(t))}{const t=this.layoutManager.layoutConfig.dimensions;return this._isColumn?t.defaultMinItemHeight:t.defaultMinItemWidth}}calculateContentItemsTotalMinSize(t){let e=0;for(const i of t)e+=this.calculateContentItemMinSize(i);return e}onSplitterDragStart(t){const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=this.calculateContentItemsTotalMinSize(e.before.contentItems),s=this.calculateContentItemsTotalMinSize(e.after.contentItems);this._splitterPosition=0,this._splitterMinPosition=-1*(i-o),this._splitterMaxPosition=n-s}onSplitterDrag(t,e,i){let n=this._isColumn?i:e;if(null===this._splitterMinPosition||null===this._splitterMaxPosition)throw new K("ROCOSD59226");n=Math.max(n,this._splitterMinPosition),n=Math.min(n,this._splitterMaxPosition),this._splitterPosition=n;const o=zt(n);this._isColumn?t.element.style.top=o:t.element.style.left=o}onSplitterDragStop(t){if(null===this._splitterPosition)throw new K("ROCOSDS66932");{const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=(this._splitterPosition+i)/(i+n),s=e.before.size+e.after.size;e.before.size=o*s,e.after.size=(1-o)*s,t.element.style.top=zt(0),t.element.style.left=zt(0),globalThis.requestAnimationFrame((()=>this.updateSize(!1)))}}}!function(t){t.getElementDimensionSize=function(t,e){return"width"===e?function(t){return t.offsetWidth}(t):function(t){return t.offsetHeight}(t)},t.setElementDimensionSize=function(t,e,i){return"width"===e?Tt(t,i):At(t,i)},t.createElement=function(t,e){const i=t.createElement("div");return i.classList.add("lm_item"),e?i.classList.add("lm_column"):i.classList.add("lm_row"),i}}(Xt||(Xt={}));class Yt extends $t{constructor(t,e,i){super(t,vt.create(e),null,Yt.createElement(document)),this.isGround=!0,this._childElementContainer=this.element,this._containerElement=i;let n=null;for(;;){const t=n?n.previousSibling:this._containerElement.lastChild;if(!(t instanceof Element&&t.classList.contains("lm_content")))break;n=t}this._containerElement.insertBefore(this.element,n)}init(){if(!0!==this.isInitialised){this.updateNodeSize();for(let t=0;t0?this.contentItems[0]:this,n.isComponent)throw new Error("Cannot add item as child to ComponentItem");{const t=this.layoutManager.createAndInitContentItem(i,n);return e=n.addChild(t,e),n===this?-1:e}}loadComponentAsRoot(t){this.clearRoot();const e=Ct.resolve(t,!1);if(e.maximised)throw new Error("Root Component cannot be maximised");{const t=new jt(this.layoutManager,e,this);t.init(),this.addChild(t,0)}}addChild(t,e){if(this.contentItems.length>0)throw new Error("Ground node can only have a single child");return this._childElementContainer.appendChild(t.element),e=super.addChild(t,e),this.updateSize(!1),this.emitBaseBubblingEvent("stateChanged"),e}calculateConfigContent(){const t=this.contentItems,e=t.length,i=new Array(e);for(let n=0;n0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e)),this.updateContentItemsSize(!1))}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}createSideAreas(){const t=Yt.Area.oppositeSides,e=new Array(Object.keys(t).length);let i=0;for(const n in t){const o=n,s=this.getElementArea();if(null===s)throw new K("RCSA77553");s.side=o,"2"===t[o][1]?s[o]=s[t[o]]-50:s[o]=s[t[o]]+50,s.surface=(s.x2-s.x1)*(s.y2-s.y1),e[i++]=s}return e}highlightDropZone(t,e,i){this.layoutManager.tabDropPlaceholder.remove(),super.highlightDropZone(t,e,i)}onDrop(t,e){if(t.isComponent){const e=ut.createDefault(),i=t;e.header=mt.Header.createCopy(i.headerConfig);const n=this.layoutManager.createAndInitContentItem(e,this);n.addChild(t),t=n}if(0===this.contentItems.length)this.addChild(t);else{if(t.type===at.row||t.type===at.column){const e=ut.createDefault(),i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}const i="x"==e.side[0]?at.row:at.column,n="2"==e.side[1],o=this.contentItems[0];if(o instanceof Xt&&o.type===i){const e=o.contentItems[n?0:o.contentItems.length-1];o.addChild(t,n?0:void 0,!0),e.size*=.5,t.size=e.size,t.sizeUnit=ht.Percent,o.updateSize(!1)}else{const e=ct.createDefault(i),s=this.layoutManager.createContentItem(e,this);this.replaceChild(o,s),s.addChild(t,n?0:void 0,!0),s.addChild(o,n?void 0:0,!0),o.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}}dock(){throw new X("GID87731")}validateDocking(){throw new X("GIVD87732")}getAllContentItems(){const t=[this];return this.deepGetAllContentItems(this.contentItems,t),t}getConfigMaximisedItems(){const t=[];return this.deepFilterContentItems(this.contentItems,t,(t=>!(!Gt.isStack(t)||!t.initialWantMaximise)||!(!Gt.isComponentItem(t)||!t.initialWantMaximise))),t}getItemsByPopInParentId(t){const e=[];return this.deepFilterContentItems(this.contentItems,e,(e=>e.popInParentIds.includes(t))),e}toConfig(){throw new Error("Cannot generate GroundItem config")}setActiveComponentItem(t,e,i){}updateNodeSize(){const{width:t,height:e}=kt(this._containerElement);Tt(this.element,t),At(this.element,e),this.contentItems.length>0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e))}deepGetAllContentItems(t,e){for(let i=0;ithis.onClick(t),this._touchStartEventListener=t=>this.onTouchStart(t),this._element=document.createElement("div"),this._element.classList.add(i),this._element.title=e,this._header.on("destroy",(()=>this.destroy())),this._element.addEventListener("click",this._clickEventListener,{passive:!0}),this._element.addEventListener("touchstart",this._touchStartEventListener,{passive:!0}),this._header.controlsContainerElement.appendChild(this._element)}get element(){return this._element}destroy(){var t;this._element.removeEventListener("click",this._clickEventListener),this._element.removeEventListener("touchstart",this._touchStartEventListener),null===(t=this._element.parentNode)||void 0===t||t.removeChild(this._element)}onClick(t){this._pushEvent(t)}onTouchStart(t){this._pushEvent(t)}}class Jt{constructor(t,e,i,n,o){var s;this._layoutManager=t,this._componentItem=e,this._closeEvent=i,this._focusEvent=n,this._dragStartEvent=o,this._isActive=!1,this._tabClickListener=t=>this.onTabClickDown(t),this._tabTouchStartListener=t=>this.onTabTouchStart(t),this._closeClickListener=()=>this.onCloseClick(),this._closeTouchStartListener=()=>this.onCloseTouchStart(),this._dragStartListener=(t,e)=>this.onDragStart(t,e),this._contentItemDestroyListener=()=>this.onContentItemDestroy(),this._tabTitleChangedListener=t=>this.setTitle(t),this._element=document.createElement("div"),this._element.classList.add("lm_tab"),this._titleElement=document.createElement("span"),this._titleElement.classList.add("lm_title"),this._closeElement=document.createElement("div"),this._closeElement.classList.add("lm_close_tab"),this._element.appendChild(this._titleElement),this._element.appendChild(this._closeElement),e.isClosable?this._closeElement.style.display="":this._closeElement.style.display="none",this.setTitle(e.title),this._componentItem.on("titleChanged",this._tabTitleChangedListener);(null!==(s=e.reorderEnabled)&&void 0!==s?s:this._layoutManager.layoutConfig.settings.reorderEnabled)&&this.enableReorder(),this._element.addEventListener("click",this._tabClickListener,{passive:!0}),this._element.addEventListener("touchstart",this._tabTouchStartListener,{passive:!0}),this._componentItem.isClosable?(this._closeElement.addEventListener("click",this._closeClickListener,{passive:!0}),this._closeElement.addEventListener("touchstart",this._closeTouchStartListener,{passive:!0})):(this._closeElement.remove(),this._closeElement=void 0),this._componentItem.setTab(this),this._layoutManager.emit("tabCreated",this)}get isActive(){return this._isActive}get componentItem(){return this._componentItem}get contentItem(){return this._componentItem}get element(){return this._element}get titleElement(){return this._titleElement}get closeElement(){return this._closeElement}get reorderEnabled(){return void 0!==this._dragListener}set reorderEnabled(t){t!==this.reorderEnabled&&(t?this.enableReorder():this.disableReorder())}setTitle(t){this._titleElement.innerText=t,this._element.title=t}setActive(t){t!==this._isActive&&(this._isActive=t,t?this._element.classList.add("lm_active"):this._element.classList.remove("lm_active"))}destroy(){var t,e;this._closeEvent=void 0,this._focusEvent=void 0,this._dragStartEvent=void 0,this._element.removeEventListener("click",this._tabClickListener),this._element.removeEventListener("touchstart",this._tabTouchStartListener),null===(t=this._closeElement)||void 0===t||t.removeEventListener("click",this._closeClickListener),null===(e=this._closeElement)||void 0===e||e.removeEventListener("touchstart",this._closeTouchStartListener),this._componentItem.off("titleChanged",this._tabTitleChangedListener),this.reorderEnabled&&this.disableReorder(),this._element.remove()}setBlurred(){this._element.classList.remove("lm_focused"),this._titleElement.classList.remove("lm_focused")}setFocused(){this._element.classList.add("lm_focused"),this._titleElement.classList.add("lm_focused")}onDragStart(t,e){if(void 0===this._dragListener)throw new J("TODSDLU10093");if(void 0===this._dragStartEvent)throw new J("TODS23309");this._dragStartEvent(t,e,this._dragListener,this.componentItem)}onContentItemDestroy(){void 0!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=void 0)}onTabClickDown(t){const e=t.target;e!==this._element&&e!==this._titleElement||(0===t.button?this.notifyFocus():1===t.button&&this._componentItem.isClosable&&this.notifyClose())}onTabTouchStart(t){t.target===this._element&&this.notifyFocus()}onCloseClick(){this.notifyClose()}onCloseTouchStart(){this.notifyClose()}notifyClose(){if(void 0===this._closeEvent)throw new J("TNC15007");this._closeEvent(this._componentItem)}notifyFocus(){if(void 0===this._focusEvent)throw new J("TNA15007");this._focusEvent(this._componentItem)}enableReorder(){this._dragListener=new Zt(this._element,[this._titleElement]),this._dragListener.on("dragStart",this._dragStartListener),this._componentItem.on("destroy",this._contentItemDestroyListener)}disableReorder(){if(void 0===this._dragListener)throw new J("TDR87745");this._componentItem.off("destroy",this._contentItemDestroyListener),this._dragListener.off("dragStart",this._dragStartListener),this._dragListener=void 0}}class Qt{constructor(t,e,i,n,o){this._layoutManager=t,this._componentRemoveEvent=e,this._componentFocusEvent=i,this._componentDragStartEvent=n,this._dropdownActiveChangedEvent=o,this._tabs=[],this._lastVisibleTabIndex=-1,this._dropdownActive=!1,this._element=document.createElement("section"),this._element.classList.add("lm_tabs"),this._dropdownElement=document.createElement("section"),this._dropdownElement.classList.add("lm_tabdropdown_list"),this._dropdownElement.style.display="none"}get tabs(){return this._tabs}get tabCount(){return this._tabs.length}get lastVisibleTabIndex(){return this._lastVisibleTabIndex}get element(){return this._element}get dropdownElement(){return this._dropdownElement}get dropdownActive(){return this._dropdownActive}destroy(){for(let t=0;tthis.handleTabCloseEvent(t)),(t=>this.handleTabFocusEvent(t)),((t,e,i,n)=>this.handleTabDragStartEvent(t,e,i,n)));void 0===e&&(e=this._tabs.length),this._tabs.splice(e,0,i),ethis._lastVisibleTabIndex){const t=this._tabs[e];for(let t=e;t>0;t--)this._tabs[t]=this._tabs[t-1];this._tabs[0]=t}}updateTabSizes(t,e){let i=!1;this.tryUpdateTabSizes(i,t,e)||(i=!0,this.tryUpdateTabSizes(i,t,e)),i!==this._dropdownActive&&(this._dropdownActive=i,this._dropdownActiveChangedEvent())}tryUpdateTabSizes(t,e,i){if(this._tabs.length>0){if(void 0===i)throw new Error("non-empty tabs must have active component item");let n=0,o=!1;const s=this._layoutManager.layoutConfig.settings.tabOverlapAllowance,r=this._tabs.indexOf(i.tab),a=this._tabs[r];this._lastVisibleTabIndex=-1;for(let i=0;ie){if(o)i===r&&(l.style.zIndex="auto",l.style.marginLeft="",l.parentElement!==this._element&&this._element.appendChild(l));else{let t;if(t=r>0&&r<=i?(d-e)/(i-1):(d-e)/i,tthis.onClick(t),this._touchStartListener=t=>this.onTouchStart(t),this._rowColumnClosable=!0,this._closeButton=null,this._popoutButton=null,this._tabsContainer=new Qt(this._layoutManager,(t=>this.handleTabInitiatedComponentRemoveEvent(t)),(t=>this.handleTabInitiatedComponentFocusEvent(t)),((t,e,i,n)=>this.handleTabInitiatedDragStartEvent(t,e,i,n)),(()=>this.processTabDropdownActiveChanged())),this._show=i.show,this._popoutEnabled=i.popoutEnabled,this._popoutLabel=i.popoutLabel,this._maximiseEnabled=i.maximiseEnabled,this._maximiseLabel=i.maximiseLabel,this._minimiseEnabled=i.minimiseEnabled,this._minimiseLabel=i.minimiseLabel,this._closeEnabled=i.closeEnabled,this._closeLabel=i.closeLabel,this._tabDropdownEnabled=i.tabDropdownEnabled,this._tabDropdownLabel=i.tabDropdownLabel,this.setSide(i.side),this._canRemoveComponent=this._configClosable,this._element=document.createElement("section"),this._element.classList.add("lm_header"),this._controlsContainerElement=document.createElement("section"),this._controlsContainerElement.classList.add("lm_controls"),this._element.appendChild(this._tabsContainer.element),this._element.appendChild(this._controlsContainerElement),this._element.appendChild(this._tabsContainer.dropdownElement),this._element.addEventListener("click",this._clickListener,{passive:!0}),this._element.addEventListener("touchstart",this._touchStartListener,{passive:!0}),this._documentMouseUpListener=()=>this._tabsContainer.hideAdditionalTabsDropdown(),globalThis.document.addEventListener("mouseup",this._documentMouseUpListener,{passive:!0}),this._tabControlOffset=this._layoutManager.layoutConfig.settings.tabControlOffset,this._tabDropdownEnabled&&(this._tabDropdownButton=new Kt(this,this._tabDropdownLabel,"lm_tabdropdown",(()=>this._tabsContainer.showAdditionalTabsDropdown()))),this._popoutEnabled&&(this._popoutButton=new Kt(this,this._popoutLabel,"lm_popout",(()=>this.handleButtonPopoutEvent()))),this._maximiseEnabled&&(this._maximiseButton=new Kt(this,this._maximiseLabel,"lm_maximise",(t=>this.handleButtonMaximiseToggleEvent(t)))),this._configClosable&&(this._closeButton=new Kt(this,this._closeLabel,"lm_close",(()=>s()))),this.processTabDropdownActiveChanged()}get show(){return this._show}get side(){return this._side}get leftRightSided(){return this._leftRightSided}get layoutManager(){return this._layoutManager}get parent(){return this._parent}get tabs(){return this._tabsContainer.tabs}get lastVisibleTabIndex(){return this._tabsContainer.lastVisibleTabIndex}get element(){return this._element}get tabsContainerElement(){return this._tabsContainer.element}get controlsContainerElement(){return this._controlsContainerElement}destroy(){this.emit("destroy"),this._popoutEvent=void 0,this._maximiseToggleEvent=void 0,this._clickEvent=void 0,this._touchStartEvent=void 0,this._componentRemoveEvent=void 0,this._componentFocusEvent=void 0,this._componentDragStartEvent=void 0,this._tabsContainer.destroy(),globalThis.document.removeEventListener("mouseup",this._documentMouseUpListener),this._element.remove()}createTab(t,e){this._tabsContainer.createTab(t,e)}removeTab(t){this._tabsContainer.removeTab(t)}processActiveComponentChanged(t){this._tabsContainer.processActiveComponentChanged(t),this.updateTabSizes()}setSide(t){this._side=t,this._leftRightSided=[nt.right,nt.left].includes(this._side)}setRowColumnClosable(t){this._rowColumnClosable=t,this.updateClosability()}updateClosability(){let t;if(this._configClosable)if(this._rowColumnClosable){t=!0;const e=this.tabs.length;for(let i=0;i1}applyFocusedValue(t){t?this._element.classList.add("lm_focused"):this._element.classList.remove("lm_focused")}processMaximised(){if(void 0===this._maximiseButton)throw new J("HPMAX16997");this._maximiseButton.element.setAttribute("title",this._minimiseLabel)}processMinimised(){if(void 0===this._maximiseButton)throw new J("HPMIN16997");this._maximiseButton.element.setAttribute("title",this._maximiseLabel)}updateTabSizes(){if(this._tabsContainer.tabCount>0){const t=this._show?this._layoutManager.layoutConfig.dimensions.headerHeight:0;let e;this._leftRightSided?(this._element.style.height="",this._element.style.width=zt(t)):(this._element.style.width="",this._element.style.height=zt(t)),e=this._leftRightSided?this._element.offsetHeight-this._controlsContainerElement.offsetHeight-this._tabControlOffset:this._element.offsetWidth-this._controlsContainerElement.offsetWidth-this._tabControlOffset,this._tabsContainer.updateTabSizes(e,this._getActiveComponentItemEvent())}}handleTabInitiatedComponentRemoveEvent(t){if(this._canRemoveComponent){if(void 0===this._componentRemoveEvent)throw new J("HHTCE22294");this._componentRemoveEvent(t)}}handleTabInitiatedComponentFocusEvent(t){if(void 0===this._componentFocusEvent)throw new J("HHTAE22294");this._componentFocusEvent(t)}handleTabInitiatedDragStartEvent(t,e,i,n){if(this._canRemoveComponent){if(void 0===this._componentDragStartEvent)throw new J("HHTDSE22294");this._componentDragStartEvent(t,e,i,n)}else i.cancelDrag()}processTabDropdownActiveChanged(){void 0!==this._tabDropdownButton&&Dt(this._tabDropdownButton.element,this._tabsContainer.dropdownActive)}handleButtonPopoutEvent(){if(this._layoutManager.layoutConfig.settings.popoutWholeStack){if(void 0===this._popoutEvent)throw new J("HHBPOE17834");this._popoutEvent()}else{const t=this._getActiveComponentItemEvent();t&&t.popout()}}handleButtonMaximiseToggleEvent(t){if(void 0===this._maximiseToggleEvent)throw new J("HHBMTE16834");this._maximiseToggleEvent()}onClick(t){t.target===this._element&&this.notifyClick(t)}onTouchStart(t){t.target===this._element&&this.notifyTouchStart(t)}notifyClick(t){if(void 0===this._clickEvent)throw new J("HNHC46834");this._clickEvent(t)}notifyTouchStart(t){if(void 0===this._touchStartEvent)throw new J("HNHTS46834");this._touchStartEvent(t)}}class ee extends $t{constructor(t,e,i){var n,o,s,r,a,l,h,d,c,m,u,p,g,f,v,_,y,C,w;super(t,e,i,ee.createElement(document)),this._headerSideChanged=!1,this._resizeListener=()=>this.handleResize(),this._maximisedListener=()=>this.handleMaximised(),this._minimisedListener=()=>this.handleMinimised(),this._headerConfig=e.header;const I=t.layoutConfig.header,b=e.content;let S;if(1!==b.length)S=void 0;else{S=b[0].header}this._initialWantMaximise=e.maximised,this._initialActiveItemIndex=null!==(n=e.activeItemIndex)&&void 0!==n?n:0;const E=null!==(r=null!==(s=null===(o=this._headerConfig)||void 0===o?void 0:o.show)&&void 0!==s?s:null==S?void 0:S.show)&&void 0!==r?r:I.show,x=null!==(h=null!==(l=null===(a=this._headerConfig)||void 0===a?void 0:a.popout)&&void 0!==l?l:null==S?void 0:S.popout)&&void 0!==h?h:I.popout,L=null!==(m=null!==(c=null===(d=this._headerConfig)||void 0===d?void 0:d.maximise)&&void 0!==c?c:null==S?void 0:S.maximise)&&void 0!==m?m:I.maximise,z=null!==(g=null!==(p=null===(u=this._headerConfig)||void 0===u?void 0:u.close)&&void 0!==p?p:null==S?void 0:S.close)&&void 0!==g?g:I.close,M=null!==(_=null!==(v=null===(f=this._headerConfig)||void 0===f?void 0:f.minimise)&&void 0!==v?v:null==S?void 0:S.minimise)&&void 0!==_?_:I.minimise,P=null!==(w=null!==(C=null===(y=this._headerConfig)||void 0===y?void 0:y.tabDropdown)&&void 0!==C?C:null==S?void 0:S.tabDropdown)&&void 0!==w?w:I.tabDropdown;this._maximisedEnabled=!1!==L;const T={show:!1!==E,side:!1===E?nt.top:E,popoutEnabled:!1!==x,popoutLabel:!1===x?"":x,maximiseEnabled:this._maximisedEnabled,maximiseLabel:!1===L?"":L,closeEnabled:!1!==z,closeLabel:!1===z?"":z,minimiseEnabled:!0,minimiseLabel:M,tabDropdownEnabled:!1!==P,tabDropdownLabel:!1===P?"":P};this._header=new te(t,this,T,e.isClosable&&!1!==z,(()=>this.getActiveComponentItem()),(()=>this.remove()),(()=>this.handlePopoutEvent()),(()=>this.toggleMaximise()),(t=>this.handleHeaderClickEvent(t)),(t=>this.handleHeaderTouchStartEvent(t)),(t=>this.handleHeaderComponentRemoveEvent(t)),(t=>this.handleHeaderComponentFocusEvent(t)),((t,e,i,n)=>this.handleHeaderComponentStartDragEvent(t,e,i,n))),this.isStack=!0,this._childElementContainer=document.createElement("section"),this._childElementContainer.classList.add("lm_items"),this.on("resize",this._resizeListener),this._maximisedEnabled&&(this.on("maximised",this._maximisedListener),this.on("minimised",this._minimisedListener)),this.element.appendChild(this._header.element),this.element.appendChild(this._childElementContainer),this.setupHeaderPosition(),this._header.updateClosability()}get childElementContainer(){return this._childElementContainer}get header(){return this._header}get headerShow(){return this._header.show}get headerSide(){return this._header.side}get headerLeftRightSided(){return this._header.leftRightSided}get contentAreaDimensions(){return this._contentAreaDimensions}get initialWantMaximise(){return this._initialWantMaximise}get isMaximised(){return this===this.layoutManager.maximisedStack}get stackParent(){if(!this.parent)throw new Error("Stack should always have a parent");return this.parent}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}init(){if(!0===this.isInitialised)return;this.updateNodeSize();for(let t=0;t0){if(this._initialActiveItemIndex<0||this._initialActiveItemIndex>=e)throw new Error(`ActiveItemIndex out of range: ${this._initialActiveItemIndex} id: ${this.id}`);for(let i=0;ithis.contentItems.length)throw e-=1,new X("SAC99728");if(t instanceof jt)return e=super.addChild(t,e),this._childElementContainer.appendChild(t.element),this._header.createTab(t,e),this.setActiveComponentItem(t,i),this._header.updateTabSizes(),this.updateSize(!1),t.container.setBaseLogicalZIndex(),this._header.updateClosability(),this.emitStateChangedEvent(),e;throw new X("SACC88532")}removeChild(t,e){const i=t,n=this.contentItems.indexOf(i),o=1===this.contentItems.length;if(this._activeComponentItem===i&&(i.focused&&i.blur(),!o)){const t=0===n?1:n-1;this.setActiveComponentItem(this.contentItems[t],!1)}this._header.removeTab(i),super.removeChild(i,e),o||this._header.updateClosability(),this.emitStateChangedEvent()}toggleMaximise(){this.isMaximised?this.minimise():this.maximise()}maximise(){if(!this.isMaximised){this.layoutManager.setMaximisedStack(this);const t=this.contentItems,e=t.length;for(let i=0;i0&&void 0===t)throw new Error("expected non-empty stack to have an active component item");return{type:"stack",content:this.calculateConfigContent(),size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,isClosable:this.isClosable,maximised:this.isMaximised,header:this.createHeaderConfig(),activeItemIndex:t}}onDrop(t,e){if("header"===this._dropSegment){if(this.resetHeaderDropZone(),void 0===this._dropIndex)throw new J("SODDI68990");return void this.addChild(t,this._dropIndex)}if("body"===this._dropSegment)return void this.addChild(t,0,!0);const i="top"===this._dropSegment||"bottom"===this._dropSegment,n="left"===this._dropSegment||"right"===this._dropSegment,o="top"===this._dropSegment||"left"===this._dropSegment,s=i&&this.stackParent.isColumn||n&&this.stackParent.isRow;if(t.isComponent){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createAndInitContentItem(e,this);i.addChild(t),t=i}if(t.type===at.row||t.type===at.column){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}if(s){const e=this.stackParent.contentItems.indexOf(this);this.stackParent.addChild(t,o?e:e+1,!0),this.size*=.5,t.size=this.size,t.sizeUnit=this.sizeUnit,this.stackParent.updateSize(!1)}else{const e=i?at.column:at.row,n=ct.createDefault(e),s=this.layoutManager.createContentItem(n,this);this.stackParent.replaceChild(this,s),s.addChild(t,o?0:void 0,!0),s.addChild(this,o?void 0:0,!0),this.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}highlightDropZone(t,e){for(const i in this._contentAreaDimensions){const n=i,o=this._contentAreaDimensions[n].hoverArea;if(o.x1t&&o.y1e)return void("header"===n?(this._dropSegment="header",this.highlightHeaderDropZone(this._header.leftRightSided?e:t)):(this.resetHeaderDropZone(),this.highlightBodyDropZone(n)))}}getArea(){if("none"===this.element.style.display)return null;const t=super.getElementArea(this._header.element),e=super.getElementArea(this._childElementContainer);if(null===t||null===e)throw new K("SGAHC13086");const i=e.x2-e.x1,n=e.y2-e.y1;return this._contentAreaDimensions={header:{hoverArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2},highlightArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2}}},0===this.contentItems.length?(this._contentAreaDimensions.body={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2}},super.getElementArea(this.element)):(this._contentAreaDimensions.left={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x1+.25*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x1+.5*i,y2:e.y2}},this._contentAreaDimensions.top={hoverArea:{x1:e.x1+.25*i,y1:e.y1,x2:e.x1+.75*i,y2:e.y1+.5*n},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y1+.5*n}},this._contentAreaDimensions.right={hoverArea:{x1:e.x1+.75*i,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1+.5*i,y1:e.y1,x2:e.x2,y2:e.y2}},this._contentAreaDimensions.bottom={hoverArea:{x1:e.x1+.25*i,y1:e.y1+.5*n,x2:e.x1+.75*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1+.5*n,x2:e.x2,y2:e.y2}},super.getElementArea(this.element))}positionHeader(t){this._header.side!==t&&(this._header.setSide(t),this._headerSideChanged=!0,this.setupHeaderPosition())}updateNodeSize(){if("none"!==this.element.style.display){const t=kt(this.element);if(this._header.show){t[this._header.leftRightSided?it.width:it.height]-=this.layoutManager.layoutConfig.dimensions.headerHeight}this._childElementContainer.style.width=zt(t.width),this._childElementContainer.style.height=zt(t.height);for(let e=0;e=o&&tthis.onDrag(t,e,i))),this._dragListener.on("dragStop",(()=>this.onDrop())),this.createDragProxyElements(t,e),null===this._componentItem.parent)throw new K("DPC10097");this._componentItemFocused=this._componentItem.focused,this._componentItemFocused&&this._componentItem.blur(),this._componentItem.parent.removeChild(this._componentItem,!0),this.setDimensions(),document.body.appendChild(this._element),this.determineMinMaxXY(),this._layoutManager.calculateItemAreas(),this.setDropPosition(t,e)}get element(){return this._element}createDragProxyElements(t,e){this._element=document.createElement("div"),this._element.classList.add("lm_dragProxy");const i=document.createElement("div");i.classList.add("lm_header");const n=document.createElement("div");n.classList.add("lm_tabs");const o=document.createElement("div");o.classList.add("lm_tab");const s=document.createElement("span");s.classList.add("lm_title"),o.appendChild(s),n.appendChild(o),i.appendChild(n),this._proxyContainerElement=document.createElement("div"),this._proxyContainerElement.classList.add("lm_content"),this._element.appendChild(i),this._element.appendChild(this._proxyContainerElement),this._originalParent instanceof ee&&this._originalParent.headerShow&&(this._sided=this._originalParent.headerLeftRightSided,this._element.classList.add("lm_"+this._originalParent.headerSide),[nt.right,nt.bottom].indexOf(this._originalParent.headerSide)>=0&&this._proxyContainerElement.insertAdjacentElement("afterend",i)),this._element.style.left=zt(t),this._element.style.top=zt(e),o.setAttribute("title",this._componentItem.title),s.insertAdjacentText("afterbegin",this._componentItem.title),this._proxyContainerElement.appendChild(this._componentItem.element)}determineMinMaxXY(){const t=this._layoutManager.groundItem;if(void 0===t)throw new J("DPDMMXY73109");{const e=t.element.getBoundingClientRect();this._minX=e.left+document.body.scrollLeft,this._minY=e.top+document.body.scrollTop,this._maxX=this._minX+e.width,this._maxY=this._minY+e.height}}onDrag(t,e,i){const n=i.pageX,o=i.pageY;this.setDropPosition(n,o),this._componentItem.drag()}setDropPosition(t,e){this._layoutManager.layoutConfig.settings.constrainDragToContainer&&(t<=this._minX?t=Math.ceil(this._minX):t>=this._maxX&&(t=Math.floor(this._maxX)),e<=this._minY?e=Math.ceil(this._minY):e>=this._maxY&&(e=Math.floor(this._maxY))),this._element.style.left=zt(t),this._element.style.top=zt(e),this._area=this._layoutManager.getArea(t,e),null!==this._area&&(this._lastValidArea=this._area,this._area.contentItem.highlightDropZone(t,e,this._area))}onDrop(){const t=this._layoutManager.dropTargetIndicator;if(null===t)throw new K("DPOD30011");let e;if(t.hide(),this._componentItem.exitDragMode(),null!==this._area)e=this._componentItem,this._area.contentItem.onDrop(e,this._area);else if(null!==this._lastValidArea){e=this._componentItem;this._lastValidArea.contentItem.onDrop(e,this._lastValidArea)}else this._originalParent?(e=this._componentItem,this._originalParent.addChild(e)):this._componentItem.destroy();this._element.remove(),this._layoutManager.emit("itemDropped",this._componentItem),this._componentItemFocused&&void 0!==e&&e.focus()}setDimensions(){const t=this._layoutManager.layoutConfig.dimensions;if(void 0===t)throw new Error("DragProxy.setDimensions: dimensions undefined");let e=t.dragProxyWidth,i=t.dragProxyHeight;if(void 0===e||void 0===i)throw new Error("DragProxy.setDimensions: width and/or height undefined");const n=!1===this._layoutManager.layoutConfig.header.show?0:t.headerHeight;this._element.style.width=zt(e),this._element.style.height=zt(i),e-=this._sided?n:0,i-=this._sided?0:n,this._proxyContainerElement.style.width=zt(e),this._proxyContainerElement.style.height=zt(i),this._componentItem.enterDragMode(e,i),this._componentItem.show()}}class ne{constructor(t,e,i,n,o,s,r){this._layoutManager=t,this._element=e,this._extraAllowableChildTargets=i,this._componentTypeOrFtn=n,this._componentState=o,this._title=s,this._id=r,this._dragListener=null,this._dummyGroundContainer=document.createElement("div");const a=gt.createDefault("row");this._dummyGroundContentItem=new Yt(this._layoutManager,a,this._dummyGroundContainer),this.createDragListener()}destroy(){this.removeDragListener()}createDragListener(){this.removeDragListener(),this._dragListener=new Zt(this._element,this._extraAllowableChildTargets),this._dragListener.on("dragStart",((t,e)=>this.onDragStart(t,e))),this._dragListener.on("dragStop",(()=>this.onDragStop()))}onDragStart(t,e){var i;const n="component";let o;if("function"==typeof this._componentTypeOrFtn){const t=this._componentTypeOrFtn();o=ne.isDragSourceComponentItemConfig(t)?{type:n,componentState:t.state,componentType:t.type,title:null!==(i=t.title)&&void 0!==i?i:this._title}:t}else o={type:n,componentState:this._componentState,componentType:this._componentTypeOrFtn,title:this._title,id:this._id};const s=bt.resolve(o,!1),r=new jt(this._layoutManager,s,this._dummyGroundContentItem);if(this._dummyGroundContentItem.contentItems.push(r),null===this._dragListener)throw new K("DSODSD66746");{const i=new ie(t,e,this._dragListener,this._layoutManager,r,this._dummyGroundContentItem),n=this._layoutManager.transitionIndicator;if(null===n)throw new K("DSODST66746");n.transitionElements(this._element,i.element)}}onDragStop(){this.createDragListener()}removeDragListener(){null!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=null)}}!function(t){t.isDragSourceComponentItemConfig=function(t){return!("componentType"in t)}}(ne||(ne={}));class oe{constructor(){this._element=document.createElement("div"),this._element.classList.add("lm_dropTargetIndicator");const t=document.createElement("div");t.classList.add("lm_inner"),this._element.appendChild(t),document.body.appendChild(this._element)}destroy(){this._element.remove()}highlightArea(t,e){this._element.style.left=zt(t.x1+e),this._element.style.top=zt(t.y1+e),this._element.style.width=zt(t.x2-t.x1-e),this._element.style.height=zt(t.y2-t.y1-e),this._element.style.display="block"}hide(){Dt(this._element,!1)}}class se{constructor(){this._element=document.createElement("div"),this._element.classList.add("lm_transition_indicator"),document.body.appendChild(this._element),this._toElement=null,this._fromDimensions=null,this._totalAnimationDuration=200,this._animationStartTime=null}destroy(){this._element.remove()}transitionElements(t,e){}nextAnimationFrame(){}measure(t){const e=t.getBoundingClientRect();return{left:e.left,top:e.top,width:t.offsetWidth,height:t.offsetHeight}}}class re extends Wt{constructor(t){super(),this._layoutManager=t,this._childEventListener=t=>this.onEventFromChild(t),globalThis.addEventListener(re.ChildEventName,this._childEventListener,{passive:!0})}emit(t,...e){"userBroadcast"===t?this.emitUserBroadcast(...e):super.emit(t,...e)}emitUserBroadcast(...t){this.handleUserBroadcastEvent("userBroadcast",t)}destroy(){globalThis.removeEventListener(re.ChildEventName,this._childEventListener)}handleUserBroadcastEvent(t,e){this._layoutManager.isSubWindow?this.propagateToParent(t,e):this.propagateToThisAndSubtree(t,e)}onEventFromChild(t){const e=t.detail;this.handleUserBroadcastEvent(e.eventName,e.args)}propagateToParent(t,e){const i={bubbles:!0,cancelable:!0,detail:{layoutManager:this._layoutManager,eventName:t,args:e}},n=new CustomEvent(re.ChildEventName,i),o=globalThis.opener;if(null===o)throw new K("EHPTP15778");o.dispatchEvent(n)}propagateToThisAndSubtree(t,e){this.emitUnknown(t,...e);for(let i=0;ithis.handleContainerResize())),this._windowBeforeUnloadListener=()=>this.onBeforeUnload(),this._windowBeforeUnloadListening=!1,this._maximisedStackBeforeDestroyedListener=t=>this.cleanupBeforeMaximisedStackDestroyed(t),this.isSubWindow=t.isSubWindow,this._constructorOrSubWindowLayoutConfig=t.constructorOrSubWindowLayoutConfig,Q.checkInitialise(),dt.checkInitialise(),void 0!==t.containerElement&&(this._containerElement=t.containerElement)}get container(){return this._containerElement}get isInitialised(){return this._isInitialised}get groundItem(){return this._groundItem}get root(){return this._groundItem}get openPopouts(){return this._openPopouts}get dropTargetIndicator(){return this._dropTargetIndicator}get transitionIndicator(){return this._transitionIndicator}get width(){return this._width}get height(){return this._height}get eventHub(){return this._eventHub}get rootItem(){if(void 0===this._groundItem)throw new Error("Cannot access rootItem before init");return 0===this._groundItem.contentItems.length?void 0:this._groundItem.contentItems[0]}get focusedComponentItem(){return this._focusedComponentItem}get tabDropPlaceholder(){return this._tabDropPlaceholder}get maximisedStack(){return this._maximisedStack}get deprecatedConstructor(){return!this.isSubWindow&&void 0!==this._constructorOrSubWindowLayoutConfig}destroy(){if(this._isInitialised){this._windowBeforeUnloadListening&&(globalThis.removeEventListener("beforeunload",this._windowBeforeUnloadListener),this._windowBeforeUnloadListening=!1),!0===this.layoutConfig.settings.closePopoutsOnUnload&&this.closeAllOpenPopouts(),this._resizeObserver.disconnect(),this.checkClearResizeTimeout(),void 0!==this._groundItem&&this._groundItem.destroy(),this._tabDropPlaceholder.remove(),null!==this._dropTargetIndicator&&this._dropTargetIndicator.destroy(),null!==this._transitionIndicator&&this._transitionIndicator.destroy(),this._eventHub.destroy();for(const t of this._dragSources)t.destroy();this._dragSources=[],this._isInitialised=!1}}minifyConfig(t){return _t.minifyConfig(t)}unminifyConfig(t){return _t.unminifyConfig(t)}init(){let t;if(this.setContainer(),this._dropTargetIndicator=new oe,this._transitionIndicator=new se,this.updateSizeFromContainer(),this.isSubWindow){if(void 0===this._constructorOrSubWindowLayoutConfig)throw new J("LMIU07155");{const e=this._constructorOrSubWindowLayoutConfig.root;if(void 0===e)throw new X("LMIC07156");if(!Ct.isComponent(e))throw new X("LMIC07157");t=e;const i=xt.resolve(this._constructorOrSubWindowLayoutConfig);this.layoutConfig=Object.assign(Object.assign({},i),{root:void 0})}}else void 0===this._constructorOrSubWindowLayoutConfig?this.layoutConfig=_t.createDefault():this.layoutConfig=xt.resolve(this._constructorOrSubWindowLayoutConfig);const e=this.layoutConfig;this._groundItem=new Yt(this,e.root,this._containerElement),this._groundItem.init(),this.checkLoadedLayoutMaximiseItem(),this._resizeObserver.observe(this._containerElement),this._isInitialised=!0,this.adjustColumnsResponsive(),this.emit("initialised"),void 0!==t&&this.loadComponentAsRoot(t)}loadLayout(t){if(!this.isInitialised)throw new Error("GoldenLayout: Need to call init() if LayoutConfig with defined root passed to constructor");if(void 0===this._groundItem)throw new J("LMLL11119");this.createSubWindows(),this.layoutConfig=xt.resolve(t),this._groundItem.loadRoot(this.layoutConfig.root),this.checkLoadedLayoutMaximiseItem(),this.adjustColumnsResponsive()}saveLayout(){if(!1===this._isInitialised)throw new Error("Can't create config, layout not yet initialised");if(void 0===this._groundItem)throw new J("LMTC18244");{const t=this._groundItem.calculateConfigContent();let e;e=1!==t.length?void 0:t[0],this.reconcilePopoutWindows();const i=[];for(let t=0;t=0?n=this._groundItem.contentItems[0]:e=0;break;case at.row:case at.column:e=n.addItem(t,i.index);break;case at.stack:if(Ct.isComponent(t)){e=n.addItem(t,i.index);break}throw Error(tt[6]);case at.component:throw new X("LMAIALC87444602");default:throw new Y("LMAIALU98881733",n.type)}if(Ct.isComponent(t)){const t=n.contentItems[e];Gt.isStack(t)&&(n=t,e=0)}return i.parentItem=n,i.index=e,i}}}loadComponentAsRoot(t){if(void 0===this._groundItem)throw new Error("Cannot add item before init");this._groundItem.loadComponentAsRoot(t)}updateSize(t,e){this.setSize(t,e)}setSize(t,e){if(this._width=t,this._height=e,!0===this._isInitialised){if(void 0===this._groundItem)throw new J("LMUS18881");if(this._groundItem.setSize(this._width,this._height),this._maximisedStack){const{width:t,height:e}=kt(this._containerElement);Tt(this._maximisedStack.element,t),At(this._maximisedStack.element,e),this._maximisedStack.updateSize(!1)}this.adjustColumnsResponsive()}}beginSizeInvalidation(){this._sizeInvalidationBeginCount++}endSizeInvalidation(){0==--this._sizeInvalidationBeginCount&&this.updateSizeFromContainer()}updateSizeFromContainer(){const{width:t,height:e}=kt(this._containerElement);this.setSize(t,e)}updateRootSize(t=!1){if(void 0===this._groundItem)throw new J("LMURS28881");this._groundItem.updateSize(t)}createAndInitContentItem(t,e){const i=this.createContentItem(t,e);return i.init(),i}createContentItem(t,e){if("string"!=typeof t.type)throw new G("Missing parameter 'type'",JSON.stringify(t));if(ct.isComponentItem(t)&&!(e instanceof ee)&&e&&!(!0===this.isSubWindow&&e instanceof Yt)){t={type:at.stack,content:[t],size:t.size,sizeUnit:t.sizeUnit,minSize:t.minSize,minSizeUnit:t.minSizeUnit,id:t.id,maximised:t.maximised,isClosable:t.isClosable,activeItemIndex:0,header:void 0}}return this.createContentItemFromConfig(t,e)}findFirstComponentItemById(t){if(void 0===this._groundItem)throw new J("LMFFCIBI82446");return this.findFirstContentItemTypeByIdRecursive(at.component,t,this._groundItem)}createPopout(t,e,i,n){return t instanceof Gt?this.createPopoutFromContentItem(t,e,i,n):this.createPopoutFromItemConfig(t,e,i,n)}createPopoutFromContentItem(t,e,i,n){let o=t.parent,s=t;for(;null!==o&&1===o.contentItems.length&&!o.isGround;)s=o,o=o.parent;if(null===o)throw new K("LMCPFCI00834");{if(void 0===n&&(n=o.contentItems.indexOf(s)),null!==i&&o.addPopInParentId(i),void 0===e){const i=globalThis.screenX||globalThis.screenLeft,n=globalThis.screenY||globalThis.screenTop,o=t.element.offsetLeft,s=t.element.offsetTop,{width:r,height:a}=kt(t.element);e={left:i+o,top:n+s,width:r,height:a}}const r=t.toConfig();if(t.remove(),ft.isRootItemConfig(r))return this.createPopoutFromItemConfig(r,e,i,n);throw new Error(`${tt[0]}`)}}beginVirtualSizedContainerAdding(){0==++this._virtualSizedContainerAddingBeginCount&&(this._virtualSizedContainers.length=0)}addVirtualSizedContainer(t){this._virtualSizedContainers.push(t)}endVirtualSizedContainerAdding(){if(0==--this._virtualSizedContainerAddingBeginCount){const t=this._virtualSizedContainers.length;if(t>0){this.fireBeforeVirtualRectingEvent(t);for(let e=0;ethis.emit("windowOpened",a))),a.on("closed",(()=>this.reconcilePopoutWindows())),this._openPopouts.push(a),this.layoutConfig.settings.closePopoutsOnUnload&&!this._windowBeforeUnloadListening&&(globalThis.addEventListener("beforeunload",this._windowBeforeUnloadListener,{passive:!0}),this._windowBeforeUnloadListening=!0),a}closeAllOpenPopouts(){for(let t=0;tglobalThis.close()),1)}getArea(t,e){let i=null,n=1/0;for(let o=0;o=s.x1&&t=s.y1&&es.surface&&(n=s.surface,i=s)}return i}calculateItemAreas(){const t=this.getAllContentItems(),e=this._groundItem;if(void 0===e)throw new J("LMCIAR44365");if(1!==t.length){e.contentItems[0].isStack?this._itemAreas=[]:this._itemAreas=e.createSideAreas();for(let e=0;e0){let e=t[0];if(Gt.isComponentItem(e)){const t=e.parent;if(null===t)throw new K("LMXLLMI69999");e=t}if(!Gt.isStack(e))throw new X("LMCLLMI19993");e.maximise()}}}processMaximiseStack(t){if(this._maximisedStack=t,t.on("beforeItemDestroyed",this._maximisedStackBeforeDestroyedListener),t.element.classList.add("lm_maximised"),t.element.insertAdjacentElement("afterend",this._maximisePlaceholder),void 0===this._groundItem)throw new J("LMMXI19993");{this._groundItem.element.prepend(t.element);const{width:e,height:i}=kt(this._containerElement);Tt(t.element,e),At(t.element,i),t.updateSize(!0),t.focusActiveContentItem(),this._maximisedStack.emit("maximised"),this.emit("stateChanged")}}processMinimiseMaximisedStack(){if(void 0===this._maximisedStack)throw new X("LMMMS74422");{const t=this._maximisedStack;if(null===t.parent)throw new K("LMMI13668");t.element.classList.remove("lm_maximised"),this._maximisePlaceholder.insertAdjacentElement("afterend",t.element),this._maximisePlaceholder.remove(),this.updateRootSize(!0),this._maximisedStack=void 0,t.off("beforeItemDestroyed",this._maximisedStackBeforeDestroyedListener),t.emit("minimised"),this.emit("stateChanged")}}reconcilePopoutWindows(){const t=[];for(let e=0;e{this._resizeTimeoutId=void 0,this.beginSizeInvalidation(),this.endSizeInvalidation()}),this.resizeDebounceInterval))}checkClearResizeTimeout(){void 0!==this._resizeTimeoutId&&(clearTimeout(this._resizeTimeoutId),this._resizeTimeoutId=void 0)}setContainer(){var t;const e=document.body,i=null!==(t=this._containerElement)&&void 0!==t?t:e;if(i===e){this.resizeWithContainerAutomatically=!0;const t=document.documentElement;t.style.height="100%",t.style.margin="0",t.style.padding="0",t.style.overflow="clip",e.style.height="100%",e.style.margin="0",e.style.padding="0",e.style.overflow="clip"}this._containerElement=i}onBeforeUnload(){this.destroy()}adjustColumnsResponsive(){if(void 0===this._groundItem)throw new J("LMACR20883");if(this._firstLoad=!1,this.useResponsiveLayout()&&!this._updatingColumnsResponsive&&this._groundItem.contentItems.length>0&&this._groundItem.contentItems[0].isRow){if(void 0===this._groundItem||null===this._width)throw new J("LMACR77412");{const t=this._groundItem.contentItems[0].contentItems.length;if(t<=1)return;{const e=this.layoutConfig.dimensions.defaultMinItemWidth;if(t*e<=this._width)return;{this._updatingColumnsResponsive=!0;const i=t-Math.max(Math.floor(this._width/e),1),n=this._groundItem.contentItems[0],o=this.getAllStacks();if(0===o.length)throw new X("LMACRS77413");{const t=o[0];for(let e=0;en?void 0:{parentItem:t,index:o}}}case 1:if(void 0===this._focusedComponentItem)return;{const t=this._focusedComponentItem.parentItem;return this.tryCreateLocationFromParentItem(t,e)}case 2:{const t=this.findFirstContentItemType(at.stack);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 3:{let t=this.findFirstContentItemType(at.row);return void 0!==t?this.tryCreateLocationFromParentItem(t,e):(t=this.findFirstContentItemType(at.column),void 0!==t?this.tryCreateLocationFromParentItem(t,e):void 0)}case 4:{const t=this.findFirstContentItemType(at.row);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 5:{const t=this.findFirstContentItemType(at.column);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 6:if(void 0===this._groundItem)throw new J("LMFLRIF18244");return void 0!==this.rootItem?void 0:void 0===e||0===e?{parentItem:this._groundItem,index:0}:void 0;case 7:if(void 0===this._groundItem)throw new J("LMFLF18244");{const t=this._groundItem.contentItems;if(0===t.length)return void 0===e||0===e?{parentItem:this._groundItem,index:0}:void 0;{const i=t[0];return this.tryCreateLocationFromParentItem(i,e)}}}}tryCreateLocationFromParentItem(t,e){const i=t.contentItems.length;return void 0===e?{parentItem:t,index:i}:e<0||e>i?void 0:{parentItem:t,index:e}}}!function(t){t.createMaximisePlaceElement=function(t){const e=t.createElement("div");return e.classList.add("lm_maximise_place"),e},t.createTabDropPlaceholderElement=function(t){const e=t.createElement("div");return e.classList.add("lm_drop_tab_placeholder"),e},t.defaultLocationSelectors=[{typeId:1,index:void 0},{typeId:2,index:void 0},{typeId:3,index:void 0},{typeId:7,index:void 0}],t.afterFocusedItemIfPossibleLocationSelectors=[{typeId:0,index:1},{typeId:2,index:void 0},{typeId:3,index:void 0},{typeId:7,index:void 0}]}(ae||(ae={}));class le extends ae{constructor(t,e,i,n){if(super(le.createLayoutManagerConstructorParameters(t,e)),this._bindComponentEventHanlderPassedInConstructor=!1,this._creationTimeoutPassed=!1,void 0!==e&&"function"==typeof e&&(this.bindComponentEvent=e,this._bindComponentEventHanlderPassedInConstructor=!0,void 0!==i&&(this.unbindComponentEvent=i)),!this._bindComponentEventHanlderPassedInConstructor&&this.isSubWindow){if(void 0===this._constructorOrSubWindowLayoutConfig)throw new J("VLC98823");{const t=xt.resolve(this._constructorOrSubWindowLayoutConfig);this.layoutConfig=Object.assign(Object.assign({},t),{root:void 0})}}!0!==n&&(this.deprecatedConstructor||this.init())}destroy(){this.bindComponentEvent=void 0,this.unbindComponentEvent=void 0,super.destroy()}init(){if(this._bindComponentEventHanlderPassedInConstructor||"loading"!==document.readyState&&null!==document.body){if(!this._bindComponentEventHanlderPassedInConstructor&&!0===this.isSubWindow&&!this._creationTimeoutPassed)return setTimeout((()=>this.init()),7),void(this._creationTimeoutPassed=!0);!0===this.isSubWindow&&(this._bindComponentEventHanlderPassedInConstructor||this.clearHtmlAndAdjustStylesForSubWindow(),window.__glInstance=this),super.init()}else document.addEventListener("DOMContentLoaded",(()=>this.init()),{passive:!0})}clearHtmlAndAdjustStylesForSubWindow(){const t=document.head,e=new Array(4);e[0]=document.querySelectorAll("body link"),e[1]=document.querySelectorAll("body style"),e[2]=document.querySelectorAll("template"),e[3]=document.querySelectorAll(".gl_keep");for(let i=0;ithis.emit("popIn"))),document.body.appendChild(t),!0}}bindComponent(t,e){if(void 0!==this.bindComponentEvent){return this.bindComponentEvent(t,e)}if(void 0!==this.getComponentEvent)return{virtual:!1,component:this.getComponentEvent(t,e)};{const t=`${tt[2]}: ${JSON.stringify(e)}`;throw new Z(t)}}unbindComponent(t,e,i){if(void 0!==this.unbindComponentEvent)this.unbindComponentEvent(t);else if(!e&&void 0!==this.releaseComponentEvent){if(void 0===i)throw new J("VCUCRCU333998");this.releaseComponentEvent(t,i)}}}!function(t){let e=!1;t.createLayoutManagerConstructorParameters=function(t,i){const n=e?null:new URL(document.location.href).searchParams.get("gl-window");e=!0;const o=null!==n;let s,r;if(null!==n){const e=localStorage.getItem(n);if(null===e)throw new Error("Null gl-window Config");localStorage.removeItem(n);const i=JSON.parse(e),o=_t.unminifyConfig(i);r=xt.fromResolved(o),t instanceof HTMLElement&&(s=t)}else void 0===t?r=void 0:t instanceof HTMLElement?(r=void 0,s=t):r=t,void 0===s&&i instanceof HTMLElement&&(s=i);return{constructorOrSubWindowLayoutConfig:r,isSubWindow:o,containerElement:s}}}(le||(le={}));class he extends le{constructor(t,e,i){super(t,e,i,!0),this._componentTypesMap=new Map,this._registeredComponentMap=new Map,this._virtuableComponentMap=new Map,this._containerVirtualRectingRequiredEventListener=(t,e,i)=>this.handleContainerVirtualRectingRequiredEvent(t,e,i),this._containerVirtualVisibilityChangeRequiredEventListener=(t,e)=>this.handleContainerVirtualVisibilityChangeRequiredEvent(t,e),this._containerVirtualZIndexChangeRequiredEventListener=(t,e,i)=>this.handleContainerVirtualZIndexChangeRequiredEvent(t,e,i),this.deprecatedConstructor||this.init()}registerComponent(t,e,i=!1){if("function"!=typeof e)throw new $("registerComponent() componentConstructorOrFactoryFtn parameter is not a function");if(e.hasOwnProperty("prototype")){const n=e;this.registerComponentConstructor(t,n,i)}else{const n=e;this.registerComponentFactoryFunction(t,n,i)}}registerComponentConstructor(t,e,i=!1){if("function"!=typeof e)throw new Error(tt[1]);if(void 0!==this._componentTypesMap.get(t))throw new Z(`${tt[3]}: ${t}`);this._componentTypesMap.set(t,{constructor:e,factoryFunction:void 0,virtual:i})}registerComponentFactoryFunction(t,e,i=!1){if("function"!=typeof e)throw new Z("Please register a constructor function");if(void 0!==this._componentTypesMap.get(t))throw new Z(`${tt[3]}: ${t}`);this._componentTypesMap.set(t,{constructor:void 0,factoryFunction:e,virtual:i})}registerComponentFunction(t){this.registerGetComponentConstructorCallback(t)}registerGetComponentConstructorCallback(t){if("function"!=typeof t)throw new Error("Please register a callback function");void 0!==this._getComponentConstructorFtn&&console.warn("Multiple component functions are being registered. Only the final registered function will be used."),this._getComponentConstructorFtn=t}getRegisteredComponentTypeNames(){const t=this._componentTypesMap.keys();return Array.from(t)}getComponentInstantiator(t){let e;const i=pt.resolveComponentTypeName(t);return void 0!==i&&(e=this._componentTypesMap.get(i)),void 0===e&&void 0!==this._getComponentConstructorFtn&&(e={constructor:this._getComponentConstructorFtn(t),factoryFunction:void 0,virtual:!1}),e}bindComponent(t,e){let i;const n=pt.resolveComponentTypeName(e);let o;if(void 0!==n&&(i=this._componentTypesMap.get(n)),void 0===i&&void 0!==this._getComponentConstructorFtn&&(i={constructor:this._getComponentConstructorFtn(e),factoryFunction:void 0,virtual:!1}),void 0!==i){const s=i.virtual;let r,a;r=void 0===e.componentState?void 0:Ut({},e.componentState);const l=i.constructor;if(void 0!==l)a=new l(t,r,s);else{const e=i.factoryFunction;if(void 0===e)throw new X("LMBCFFU10008");a=e(t,r,s)}if(s){if(void 0===a)throw new J("GLBCVCU988774");{const e=a,i=e.rootHtmlElement;if(void 0===i)throw new Z(`${tt[5]}: ${n}`);!function(t){const e="absolute";t.style.position!==e&&(t.style.position=e)}(i),this.container.appendChild(i),this._virtuableComponentMap.set(t,e),t.virtualRectingRequiredEvent=this._containerVirtualRectingRequiredEventListener,t.virtualVisibilityChangeRequiredEvent=this._containerVirtualVisibilityChangeRequiredEventListener,t.virtualZIndexChangeRequiredEvent=this._containerVirtualZIndexChangeRequiredEventListener}}this._registeredComponentMap.set(t,a),o={virtual:i.virtual,component:a}}else o=super.bindComponent(t,e);return o}unbindComponent(t,e,i){if(void 0===this._registeredComponentMap.get(t))super.unbindComponent(t,e,i);else{const e=this._virtuableComponentMap.get(t);if(void 0!==e){const i=e.rootHtmlElement;if(void 0===i)throw new X("GLUC77743",t.title);this.container.removeChild(i),this._virtuableComponentMap.delete(t)}}}fireBeforeVirtualRectingEvent(t){this._goldenLayoutBoundingClientRect=this.container.getBoundingClientRect(),super.fireBeforeVirtualRectingEvent(t)}handleContainerVirtualRectingRequiredEvent(t,e,i){const n=this._virtuableComponentMap.get(t);if(void 0===n)throw new J("GLHCSCE55933");{const o=n.rootHtmlElement;if(void 0===o)throw new Z(tt[4]+" "+t.title);{const n=t.element.getBoundingClientRect(),s=n.left-this._goldenLayoutBoundingClientRect.left;o.style.left=zt(s);const r=n.top-this._goldenLayoutBoundingClientRect.top;o.style.top=zt(r),Tt(o,e),At(o,i)}}}handleContainerVirtualVisibilityChangeRequiredEvent(t,e){const i=this._virtuableComponentMap.get(t);if(void 0===i)throw new J("GLHCVVCRE55934");{const n=i.rootHtmlElement;if(void 0===n)throw new Z(tt[4]+" "+t.title);Dt(n,e)}}handleContainerVirtualZIndexChangeRequiredEvent(t,e,i){const n=this._virtuableComponentMap.get(t);if(void 0===n)throw new J("GLHCVZICRE55935");{const e=n.rootHtmlElement;if(void 0===e)throw new Z(tt[4]+" "+t.title);e.style.zIndex=i}}}const de="initial_",ce={show:"top",popout:!1,maximise:!1,close:"close-tab-unused"},me={headerHeight:31},ue={hasHeaders:!0,reorderEnabled:!0},pe={popoutWholeStack:!1,constrainDragToContainer:!1,constrainDragToHeaders:!1,preventDragout:!1,showMaximiseIcon:!1,showPopoutIcon:!1,showCloseIcon:!1,blockedPopoutsThrowError:!0,closePopoutsOnUnload:!0,selectionEnabled:!1};var ge,fe;class ve{constructor(e){this.layout=e,ge.set(this,void 0),fe.set(this,void 0),this.handleResize=t=>{t.forEach((t=>this.resizeElement(t.target)))},this.handleMutation=()=>{this.layout.viewComponentsByContainerElement.forEach((t=>{this.resizeElement(t.container.element)}))},t.__classPrivateFieldSet(this,ge,new ResizeObserver(this.handleResize),"f"),t.__classPrivateFieldSet(this,fe,new MutationObserver(this.handleMutation),"f")}observeMutations(e){t.__classPrivateFieldGet(this,fe,"f")?.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["class"]})}destroy(){t.__classPrivateFieldGet(this,ge,"f").disconnect(),t.__classPrivateFieldGet(this,fe,"f").disconnect()}observeContainer(e){t.__classPrivateFieldGet(this,ge,"f").observe(e)}unobserveContainer(e){t.__classPrivateFieldGet(this,ge,"f").unobserve(e)}resizeElement(t){const e=this.layout.viewComponentsByContainerElement.get(t);e&&e.resize()}}ge=new WeakMap,fe=new WeakMap;var _e={};Object.defineProperty(_e,"__esModule",{value:!0});var ye=_e.BaseItem=void 0;class Ce{constructor(t,e,i){this._item=t,this._layout=e,this._wrap=i}get raw(){return this._item}get layout(){return this._layout}get type(){return this._item.type}get contentItems(){return(this._item.contentItems??[]).map((t=>this._wrap(t)))}get parent(){const t=this._item.parent;return t?this._wrap(t):null}setActiveContentItem(t,e){if("stack"!==this.type)throw new Error(`Cannot call setActiveContentItem from a non-stack item: ${this.type}`);this._item.setActiveContentItem(t.raw,e)}static wrapInternal(t,e,i){const n=Ce.wrapCache.get(e);if(n)return n;const o=new t(e,i,(e=>Ce.wrapInternal(t,e,i)));return Ce.wrapCache.set(e,o),o}}ye=_e.BaseItem=Ce,Ce.wrapCache=new WeakMap;const we=t=>!!t&&"contentItems"in t&&(t.isRow||t.isColumn);class Ie extends ye{isRoot(){return!!this._item.parent?.isGround}getBounds(){return this._item.element.getBoundingClientRect()}get viewName(){if(this._item.isComponent){const{component:t}=this._item;return t.identity.name}throw new Error("View name not found")}onDestroyed(t){const e=({target:i})=>{i===this._item&&(t(),this._item.off("itemDestroyed",e))};this._item.on("itemDestroyed",e)}createAdjacentStack({position:t="right"}={}){const e=this.raw;if(ee.isStack(e)&&e.parent){const i=["top","bottom"].includes(t)?"column":"row",n=["left","top"].includes(t)?1:0,o=we(e.parent)?e.parent:e.layoutManager,s=o,r=e.parent.contentItems.indexOf(e);e.parent.isGround&&e.parent.removeChild(e,!0);const a=o.newItem({type:i,content:[{type:"stack",content:[]}]},r);if(!a)throw new Error("createAdjacentStack: Failed to create new container");const l=a.contentItems[0];return a.addChild(this.raw,n),we(s)&&s.removeChild(e,!0),this._wrap(l)}throw new Error(`Cannot creat adjacent stacks for type: ${e.type}, must be type 'stack'`)}setActiveContentItem(t,e=!0){if(!ee.isStack(this._item))throw new Error(`Cannot call setActiveContentItem from a non-stack item: ${this.type}`);this._item.setActiveComponentItem(t.raw,!e)}static wrap(t,e){return ye.wrapInternal(Ie,t,e)}}function be(t=[],e){for(const i of t)"component"===i.type?Object.keys(e).forEach((t=>{t in i&&(i.componentState={[`${de}${t}`]:i[t],...i.componentState}),i[t]=e[t]})):be(i.content,e)}function Se(t=[],e,i){for(const n of t)if("component"===n.type)Object.keys(e).forEach((t=>{if(`${de}${t}`in n.componentState)return n[t]=n.componentState[`${de}${t}`],void delete n.componentState[`${de}${t}`];n[t]=e[t]}));else{if(n.size&&("row"===i||"column"===i)){n["row"===i?"width":"height"]=n.size?.includes(".")?parseFloat(n.size):parseInt(n.size)}Se(n.content,e,n.type)}}function Ee(t){if(t.root){t.root.content&&Se([t.root],{componentName:"view",isClosable:!0});const e=t.root;t.content=[e],delete t.root}return t}const xe=e=>class extends e{connectedCallback(){if(!this.name||!this.uuid)throw new Error(" Name or uuid attribute missing");if(!this.src)throw new Error(" missing 'src' attribute.");this.#t||(this.#t=document.createElement("iframe"),this.#t.src=this.src,this.#t.style.height="100%",this.#t.style.width="100%",this.#t.style.border="none",this.forceFrameName?this.#t.setAttribute("name",this.forceFrameName):this.#t.setAttribute("name",t.encodeOptions({brokerUrl:this.brokerUrl,name:this.name,uuid:this.uuid,providerId:this.providerId,contextGroup:this.contextGroup},"of-frame")),this.#t.setAttribute("id",this.name),this.appendChild(this.#t))}#t;get brokerUrl(){return this.getAttribute("of-broker")}set brokerUrl(t){t&&this.setAttribute("of-broker",t)}get name(){return this.getAttribute("of-name")}set name(t){t&&this.setAttribute("of-name",t)}get forceFrameName(){return this.getAttribute("forceFrameName")}set forceFrameName(t){t&&this.setAttribute("forceFrameName",t)}get uuid(){return this.getAttribute("of-uuid")}set uuid(t){t&&this.setAttribute("of-uuid",t)}get src(){return this.getAttribute("src")}set src(t){t&&this.setAttribute("src",t)}get providerId(){return this.getAttribute("of-provider-id")}set providerId(t){t&&this.setAttribute("of-provider-id",t)}get contextGroup(){return this.getAttribute("of-context-group")}set contextGroup(t){t&&this.setAttribute("of-context-group",t)}static get observedAttributes(){return["name"]}};class Le{static create(t){const e=document.createElement("of-view");return Object.entries(t).forEach((([t,i])=>{e.setAttribute(t,i)})),e}}customElements.define("of-view",xe(HTMLElement));class ze{constructor(t,i,n,{brokerUrl:o,interopConfig:s},r){this.container=t,this.config=i,this.ofView=null,this.isDragging=()=>this.container.tab.element?.className.includes("lm_dragging")??!1;const{url:a,web:l,interop:h,name:d}=i||{},c=d??`internal-generated-view-${e.v4()}`;if(this.identity={uuid:n,name:c},this.container.element.setAttribute("of-name",c),this.container.element.id=`container-${c}`,this.container.parent.id=c,void 0===a)return void this.handleUrlMissing();const m=this.updateTitleIfNotSet(a),u={"of-broker":o,"of-uuid":n,"of-name":c,src:a};l?.frameName&&(u.forceFrameName=l.frameName);const p=h?.currentContextGroup??s?.currentContextGroup;p&&(u["of-context-group"]=p),s?.providerId&&(u["of-provider-id"]=s?.providerId),this.ofView=Le.create(u),this.ofView.title=m??`Iframe: ${a}`,r.appendChild(this.ofView),this.ofView.style.position="absolute"}updateTitleIfNotSet(t){return"view"===this.container.parent.title&&this.container.parent.setTitle(t),this.container.parent.title}handleUrlMissing(){const t=document.createElement("div");t.setAttribute("style","padding: 20px");t.innerText="No URL provided",this.container.element.appendChild(t)}destroy(){this.ofView?.remove(),this.ofView=null}closeView(){this.container.close()}resize(){if(this.ofView){if(this.isDragging())return void(this.ofView.style.display="none");const t=this.container.element.getBoundingClientRect();this.ofView.style.position="absolute",this.ofView.style.height=`${t.height}px`,this.ofView.style.width=`${t.width}px`,this.ofView.style.inset=`${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`,this.ofView.style.display="block"}}}class Me extends U{static overrideConfig(t){const e={...ue,...t.settings,...pe};return e.reorderEnabled?be(t.content,{isClosable:!0}):be(t.content,{reorderEnabled:!1}),{dimensions:me,...t,settings:e,header:{...ce,show:!1!==t.settings?.hasHeaders&&ce.show}}}constructor(t,e,i,{options:n},o,s){super(),this.identity=t,this.container=e,this.initialConfig=i,this.layoutManager=o,this.platformProvider=s,this.viewComponentsByContainerElement=new Map,this.layoutContentCache=_.getSingleInstance(),this.reparentingViews=new Set,this.goldenLayoutDestroyed=!1,this.createViewComponent=(t,e)=>{m.handleSharedView(this.layoutManager,this.identity,e);const i=new ze(t,e,this.identity.uuid,this.options,this.iframeContainer);return e&&!1===e[`${de}isClosable`]&&this.stylesheet.insertRule(`#tab-${i.identity.name} .lm_close_tab { display: none; }`),this.viewComponentsByContainerElement.set(t.element,i),this.resizeController.observeContainer(t.element),i},this.iframeContainer=document.createElement("div"),this.iframeContainer.id=`openfin-layout-iframe-container-${this.identity.layoutName}`,this.domEmitter=new V(e),this.setupStylesheets(),this.layout=new he(this.container),this.layout.resizeWithContainerAutomatically=!0,this.options=n,this.layout.registerComponent("view",this.createViewComponent),this.setupListeners(),this.resizeController=new ve(this),this.layout.loadLayout(Me.overrideConfig(i));const r=document.createElement("div");r.id=`openfin-layout-shadow-container-${this.identity.layoutName}`,r.attachShadow({mode:"open",delegatesFocus:!1}).appendChild(this.iframeContainer),this.container.appendChild(r),this.resizeController.observeMutations(this.container)}getStackByView({name:t}){const e=this.layout.findFirstComponentItemById(t);if(e?.parent&&e?.parent?.isStack)return Ie.wrap(e.parent,this)}getRoot(){return Ie.wrap(this.layout.rootItem,this)}async platformCloseView(t){const e=[...this.viewComponentsByContainerElement.values()].find((e=>e.identity.name===t.name));if(!e)throw new Error(`View with name: ${t.name} not found in layout.`);e.closeView()}async platformCreateView(t,{location:e,targetView:i}={}){if(i)throw new Error("TargetView not supported in web");const n={options:this.platformProvider.normalizeOptions(t),target:this.identity,location:e};return this.insertView(n)}setupStylesheets(){if(this.container.setAttribute("data-openfin-layout-name",this.identity.layoutName),this.stylesheet=new CSSStyleSheet,this.stylesheet.insertRule(".lm_close { display: none; }"),document.adoptedStyleSheets.push(this.stylesheet),this.initialConfig.settings?.preventSplitterResize){const t=`\n [data-openfin-layout-name='${this.identity.layoutName}'] .lm_splitter {\n pointer-events: none;\n }`;this.stylesheet.insertRule(t)}}insertView({options:t,location:e,targetView:i}){const n=e?this.layoutContentCache.getItemOrUndefined(e.id):void 0,o=i?this.layoutContentCache.getItemOrUndefined(i.name):void 0,s=n??o??Ie.wrap(this.layout.rootItem,this);let r;if(ee.isStack(s.raw))r=s.raw;else{if(!we(s.raw))throw new Error("Cannot add a view at the requested location");r=s.raw.newItem({type:"stack",content:[]})}const a=Math.min(r.contentItems.length,e?.index??r.contentItems.length);let l=this.layout.findFirstComponentItemById(t.name);l?(l.parent&&l.parent.removeChild(l,!0),r.addChild(l,a)):l=r.newComponent("view",t,t.title??t.url??"Default Title",a);const h=l.component.identity;return Promise.resolve({identity:h})}replaceView({viewToReplace:t,newView:e}){throw new Error("Method not implemented.")}replaceLayout(t){throw new Error("Method not implemented.")}async cleanupView(t){}applyPreset(t){throw new Error("Method not implemented.")}getCurrentViews(){return[...this.viewComponentsByContainerElement.values()].map((t=>t.identity))}async getFrameSnapshot(){return Ee(xt.fromResolved(this.layout.toConfig()))}isVisible(){return W(this.container)}async onViewDetached({viewIdentity:t}){this.reparentingViews.add(t.name),this.platformCloseView(t)}async destroy(){this.goldenLayoutDestroyed||(this.goldenLayoutDestroyed=!0,this.layout.destroy()),this.iframeContainer.remove(),this.resizeController.destroy(),document.adoptedStyleSheets=document.adoptedStyleSheets.filter((t=>t!==this.stylesheet)),this.viewComponentsByContainerElement.clear()}setupListeners(){this.container.addEventListener("pointerdown",(t=>{if(t.target instanceof HTMLElement){const e=t.target.classList;["lm_tab","lm_title","lm_splitter","lm_drag_handle"].some((t=>e.contains(t)))&&(this.handleDragStart(),2===t.button&&t.stopPropagation())}}),!0),document.addEventListener("pointerup",(()=>this.handleDragEnd()),!0),this.layout.on("tabCreated",(t=>{const e=t.componentItem.component;t.element.id=`tab-${e.identity.name}`,this.domEmitter.dispatchLocalEvent("tab-created",e.identity)})),this.layout.on("itemCreated",(({target:t})=>{const e=t;if(Gt.isComponentItem(e)){const t=e.component;this.domEmitter.dispatchLocalEvent("container-created",t.identity)}})),this.layout.on("itemDestroyed",(t=>{const e=t.target;if(Gt.isComponentItem(e)){const t=e.component;this.removeViewComponent(t)}})),this.layout.on("itemDropped",(()=>{this.handleDragEnd()}))}handleDragStart(){this.iframeContainer.style.pointerEvents="none"}handleDragEnd(){this.iframeContainer.style.pointerEvents=""}removeViewComponent(t){if(t.config&&!1===t.config[`${de}isClosable`]){const e=[...this.stylesheet.cssRules].findIndex((e=>e.cssText.includes(`#tab-${t.identity.name}`)));this.stylesheet.deleteRule(e)}t.destroy(),this.viewComponentsByContainerElement.delete(t.container.element),this.resizeController.unobserveContainer(t.container.element),this.reparentingViews.has(t.identity.name)?this.reparentingViews.delete(t.identity.name):this.platformProvider.closeView(t.identity.name);0===this.getCurrentViews().length&&(this.goldenLayoutDestroyed||(this.goldenLayoutDestroyed=!0,m.handleLastViewRemoved(this.layoutManager,this.identity)))}}class Pe{constructor(t,e,i,n){this.windowIdentity=t,this.connectConfig=e,this.provider=i,this.fallbackContainer=n}async createLayout(t,e){if(!("container"in t)&&!this.fallbackContainer)throw new Error("Container property is not optional in web");const{layoutName:i}=t,n=t,o=this.provider.initLayoutViews(n),s=n.container??this.fallbackContainer,r={...this.windowIdentity,layoutName:i},a=new Me(r,s,o,this.connectConfig,e,this.provider);m.registerLayout(e,i,a),this.fallbackContainer=null}async getLayoutSnapshot(t){return t.getLayoutSnapshot()}async handleLastViewRemoved(t){}}class Te{static async init(e){const i=e.getFin().InterApplicationBus.Channel,n=await i.create(`custom-frame-${e.me.uuid}`);return n.setDefaultAction((async(t,{target:e,opts:i},o)=>{const s=n.connections.find((t=>t.name===e.name));if(s)return n.dispatch(s,t,{...i,target:e});throw new Error(`Client with name ${e.name} not found`)})),await t.relayChannelClientApi_1(n,"layout-relay"),new Te(e)}constructor(t){this.wire=t,this.viewNames=new Set}normalizeOptions(t,i="default"){const n=this.wire.me.uuid;let{name:o=`internal-generated-view-${e.v4()}`}=t;return o.match(/^internal-generated-view-/)&&this.viewNames.has(o)&&"duplicate"===i&&(o=`internal-generated-view-${e.v4()}`),this.viewNames.add(o),{...t,name:o,uuid:n}}closeView(t){this.viewNames.delete(t)}initLayoutViews({layout:t,multiInstanceViewBehavior:e}){return H((t=>{if("component"===t.type&&t.componentState){const i=this.normalizeOptions(t.componentState,e);return{...t,componentState:i}}return t}),t)}}var Ae;const ke=t=>t;Ae=new WeakMap,exports.WebLayoutEntryPoint=class{constructor(e){Ae.set(this,void 0),this.initLayoutManager=async(e,i,{container:n,layoutManagerOverride:o})=>{const s=await Te.init(i),r=o??ke,a=new Pe(i.me,t.__classPrivateFieldGet(this,Ae,"f"),s,n),l=new(r(m.createClosedConstructor(a)));return await M(i,l),l},this.applyLayoutSnapshot=async(e,i,n)=>{await i.applyLayoutSnapshot(t.__classPrivateFieldGet(this,Ae,"f").platform.layoutSnapshot)},this.createLayout=async(t,e)=>m.createLayout(t,e),this.destroyLayout=async(t,e)=>m.destroyLayout(t,e),t.__classPrivateFieldSet(this,Ae,e,"f")}}; @@ -7340,7 +7340,7 @@ module.exports = stubFalse; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.init = init; -const core_web_1 = __webpack_require__(/*! @openfin/core-web */ "./node_modules/@openfin/core-web/out/api-client.js"); +const core_web_1 = __webpack_require__(/*! @openfin/core-web */ "../../node_modules/@openfin/core-web/out/api-client.js"); const settings_1 = __webpack_require__(/*! ./settings */ "./client/src/platform/settings.ts"); /** * Initializes the OpenFin Web Broker connection. @@ -8405,7 +8405,7 @@ function version(uuid) { /******/ /************************************************************************/ var __webpack_exports__ = {}; -// This entry need to be wrapped in an IIFE because it need to be in strict mode. +// This entry needs to be wrapped in an IIFE because it needs to be in strict mode. (() => { "use strict"; var exports = __webpack_exports__; diff --git a/web/v19.2.0/web-layout/js/fdc3-view.bundle.js.map b/web/v19.2.0/web-layout/js/fdc3-view.bundle.js.map index 6b93bfa..58c9e32 100644 --- a/web/v19.2.0/web-layout/js/fdc3-view.bundle.js.map +++ b/web/v19.2.0/web-layout/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CAA2C,UAAU;AACrD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;ACrJA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEY;;AAEZ,eAAe,mBAAO,CAAC,wDAAW;AAClC,gBAAgB,mBAAO,CAAC,oDAAS;AACjC;AACA;AACA;AACA;;AAEA,cAAc;AACd,kBAAkB;AAClB,yBAAyB;;AAEzB;AACA,kBAAkB;;AAElB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,kBAAkB,YAAY;AAC9B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA,wCAAwC,SAAS;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;;AAEA;AACA;AACA,cAAc,iBAAiB;AAC/B;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,iDAAiD,EAAE;AACnD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C;AAC1C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA,yBAAyB,eAAe;AACxC;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,yBAAyB,QAAQ;AACjC;AACA,sBAAsB,eAAe;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc,YAAY;AAC1B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB,sBAAsB;AACxC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,mBAAmB;AACnB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA,oBAAoB,SAAS;AAC7B;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA,qBAAqB,WAAW,GAAG,IAAI;AACvC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA,gBAAgB,WAAW,GAAG,IAAI,KAAK,aAAa;AACpD;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;;AAEA;AACA,GAAG;AACH;AACA;AACA,mBAAmB,KAAK,mDAAmD,cAAc;AACzF,GAAG;AACH;AACA;AACA,+BAA+B,IAAI;AACnC;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,MAAM,aAAa,SAAS;AACtD;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,SAAS,gBAAgB;AACzB,cAAc,oBAAoB,EAAE,IAAI;AACxC;AACA,YAAY,gBAAgB,EAAE,IAAI;AAClC;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,GAAG,SAAS,GAAG,KAAK,qBAAqB,EAAE,EAAE;AACpE,QAAQ;AACR,yBAAyB,GAAG,KAAK,yBAAyB,EAAE,EAAE;AAC9D,mBAAmB,yBAAyB,EAAE,EAAE;AAChD;AACA,MAAM;AACN,oBAAoB,IAAI,EAAE,GAAG,SAAS,IAAI,EAAE,EAAE;AAC9C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,0CAA0C,cAAc,SAAS,OAAO;AACxE;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,kBAAkB,YAAY;AAC9B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,kBAAkB,gBAAgB;AAClC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,kBAAkB,gBAAgB;AAClC;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,cAAc,YAAY;AAC1B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,QAAQ;AAC1B;AACA,oBAAoB,QAAQ;AAC5B;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;;;;;ACzjEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEa;;AAEb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB;;AAEnB;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,sBAAsB;AACxC;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA,eAAe;AACf;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA,oBAAoB,SAAS;AAC7B;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;;AAEA,kCAAkC,QAAQ;AAC1C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oBAAoB,iBAAiB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,QAAQ;AACR;AACA,uCAAuC,QAAQ;AAC/C;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,OAAO;AACzB;AACA;AACA;;AAEA;AACA,SAAS,yBAAyB;AAClC;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,gBAAgB;AAClC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,8DAA8D,YAAY;AAC1E;AACA,8DAA8D,YAAY;AAC1E;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,qCAAqC,YAAY;AACjD;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;AACA;;;;;;;;;;;AChfA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;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mBAAO,CAAC,mDAAS;;AAE5B;AACA;;AAEA;;;;;;;;;;;ACLA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,WAAW,mBAAO,CAAC,mDAAS;;AAE5B;AACA;;AAEA;;;;;;;;;;;ACNA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,UAAU;AACrB,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACrBA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,UAAU;AACrB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACxBA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,kBAAkB,mBAAO,CAAC,+DAAe;AACzC,cAAc,mBAAO,CAAC,uDAAW;AACjC,eAAe,mBAAO,CAAC,yDAAY;AACnC,cAAc,mBAAO,CAAC,yDAAY;AAClC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,SAAS;AACpB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AChDA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACnBA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,UAAU;AACrB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;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AAC1C,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,kBAAkB,mBAAO,CAAC,iEAAgB;AAC1C,oBAAoB,mBAAO,CAAC,qEAAkB;AAC9C,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,mBAAmB,mBAAO,CAAC,mEAAiB;AAC5C,aAAa,mBAAO,CAAC,uDAAW;AAChC,qBAAqB,mBAAO,CAAC,uEAAmB;AAChD,qBAAqB,mBAAO,CAAC,uEAAmB;AAChD,sBAAsB,mBAAO,CAAC,yEAAoB;AAClD,cAAc,mBAAO,CAAC,uDAAW;AACjC,eAAe,mBAAO,CAAC,yDAAY;AACnC,YAAY,mBAAO,CAAC,mDAAS;AAC7B,eAAe,mBAAO,CAAC,yDAAY;AACnC,YAAY,mBAAO,CAAC,mDAAS;AAC7B,WAAW,mBAAO,CAAC,iDAAQ;AAC3B,aAAa,mBAAO,CAAC,qDAAU;;AAE/B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,SAAS;AACpB;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa,GAAG;AAChB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;AACA,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA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;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC9CA,aAAa,mBAAO,CAAC,uDAAW;AAChC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,eAAe,mBAAO,CAAC,yDAAY;AACnC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC3DA,kBAAkB,mBAAO,CAAC,iEAAgB;AAC1C,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC7BA,eAAe,mBAAO,CAAC,yDAAY;AACnC,kBAAkB,mBAAO,CAAC,iEAAgB;AAC1C,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AChCA;AACA;AACA;AACA;AACA;A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,6DAAc;AACtC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACnFA,aAAa,mBAAO,CAAC,uDAAW;AAChC,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,SAAS,mBAAO,CAAC,6CAAM;AACvB,kBAAkB,mBAAO,CAAC,iEAAgB;AAC1C,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC/GA,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACzFA;AACA,wBAAwB,qBAAM,gBAAgB,qBAAM,IAAI,qBAAM,sBAAsB,qBAAM;;AAE1F;;;;;;;;;;;ACHA,qBAAqB,mBAAO,CAAC,uEAAmB;AAChD,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,WAAW,mBAAO,CAAC,iDAAQ;;AAE3B;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACfA,qBAAqB,mBAAO,CAAC,uEAAmB;AAChD,mBAAmB,mBAAO,CAAC,mEAAiB;AAC5C,aAAa,mBAAO,CAAC,qDAAU;;AAE/B;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AChBA,gBAAgB,mBAAO,CAAC,6DAAc;;AAEtC;AACA;AACA;AACA;AACA,WAA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;;;;;;;;;;ACxBA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACdA,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACnBA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACZA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClCA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,GAAG;AAChB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;AClBA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACfA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACzBA,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CAAC,+DAAe;;AAExC;AACA,kBAAkB,KAA0B;;AAE5C;AACA,gCAAgC,QAAa;;AAE7C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ,CAAC;;AAED;;;;;;;;;;;AC7BA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACrBA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,aAAa,UAAU;AACvB;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACdA,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;ACRA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACbA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;;;;;;;;;;ACjBA,gBAAgB,mBAAO,CAAC,6DAAc;;AAEtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACdA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,GAAG;AAChB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACbA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACbA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,UAAU,mBAAO,CAAC,iDAAQ;AAC1B,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjCA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;;;;;;;;;;;ACzBA,gBAAgB,mBAAO,CAAC,6DAAc;;AAEtC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,GAAG;AAChB;AACA;AACA;AACA,oBAAoB,QAAQ,IAAI,QAAQ;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,kBAAkB;AAClB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpCA,sBAAsB,mBAAO,CAAC,yEAAoB;AAClD,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA,8BAA8B,mBAAmB;AACjD;AACA;AACA;AACA;AACA;AACA,+CAA+C,mBAAmB;AAClE;AACA;AACA;;AAEA;;;;;;;;;;;ACnCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACzBA,iBAAiB,mBAAO,CAAC,6DAAc;AACvC,eAAe,mBAAO,CAAC,yDAAY;;AAEnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AChCA,WAAW,mBAAO,CAAC,mDAAS;AAC5B,gBAAgB,mBAAO,CAAC,2DAAa;;AAErC;AACA,kBAAkB,KAA0B;;AAE5C;AACA,gCAAgC,QAAa;;AAE7C;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACrCA,kBAAkB,mBAAO,CAAC,iEAAgB;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,kBAAkB;AAClB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClCA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,eAAe,mBAAO,CAAC,yDAAY;;AAEnC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpCA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClCA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC1BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC9BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC5BA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC1BA,uBAAuB,mBAAO,CAAC,2EAAqB;AACpD,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC1BA,oBAAoB,mBAAO,CAAC,qEAAkB;AAC9C,eAAe,mBAAO,CAAC,2DAAa;AACpC,kBAAkB,mBAAO,CAAC,+DAAe;;AAEzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpCA,oBAAoB,mBAAO,CAAC,qEAAkB;AAC9C,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,kBAAkB,mBAAO,CAAC,+DAAe;;AAEzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC/BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;;;ACVA,oBA2CC;AAlDD,sHAAwE;AACxE,8FAAyC;AAEzC;;;GAGG;AACI,KAAK,UAAU,IAAI,CAAC,UAAmB,IAAI;IACjD,sCAAsC;IACtC,IAAI,OAA0C,CAAC;IAC/C,IA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AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,kBAAkB,cAAc;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,kBAAkB,aAAa;AAC/B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,iEAAe,GAAG;;;;;;;;;;;;;;;ACtNlB,iEAAe,sCAAsC;;;;;;;;;;;;;;;;ACAhB;;AAErC;AACA,OAAO,wDAAQ;AACf;AACA;;AAEA;AACA,gCAAgC;;AAEhC;AACA;AACA;AACA,qBAAqB;;AAErB;AACA,qBAAqB;;AAErB;AACA,qBAAqB;;AAErB;AACA,qBAAqB;AACrB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,iEAAe,KAAK;;;;;;;;;;;;;;;AClCpB,iEAAe,cAAc,EAAE,UAAU,EAAE,eAAe,EAAE,gBAAgB,EAAE,UAAU,GAAG,yCAAyC;;;;;;;;;;;;;;;ACApI;AACA;AACA;AACA;AACA;AACe;AACf;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;AClBA;AACA;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AO,EAAE,KAAK,IAAI,EAAE;YACpD,MAAM,gBAAgB,EAAE,CAAC;QAC1B,CAAC,CAAC,CAAC;IACJ,CAAC;IAED,MAAM,eAAe,EAAE,CAAC;AACzB,CAAC","sources":["webpack://openfin-web--web-layout/./node_modules/@openfin/core-web/out/api-client.js","webpack://openfin-web--web-layout/./node_modules/@openfin/core-web/out/main-8cad4070.js","webpack://openfin-web--web-layout/./node_modules/@openfin/core-web/out/main-b14f67c9.js","webpack://openfin-web--web-layout/../../node_modules/base64-js/index.js","webpack://openfin-web--web-layout/../../node_modules/buffer/index.js","webpack://openfin-web--web-layout/../../node_modules/events/events.js","webpack://openfin-web--web-layout/../../node_modules/ieee754/index.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_DataView.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_Hash.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_ListCache.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_Map.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_MapCache.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_Promise.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_Set.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_SetCache.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_Stack.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_Symbol.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_Uint8Array.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_WeakMap.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_arrayEach.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_arrayFilter.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_arrayLikeKeys.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_arrayPush.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_arraySome.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_assignValue.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_assocIndexOf.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseAssign.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseAssignIn.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseAssignValue.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseClone.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseCreate.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseGetAllKeys.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseGetTag.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseIsArguments.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseIsEqual.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseIsEqualDeep.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseIsMap.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseIsNative.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseIsSet.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseIsTypedArray.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseKeys.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseKeysIn.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseTimes.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseUnary.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_cacheHas.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_cloneArrayBuffer.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_cloneBuffer.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_cloneDataView.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_cloneRegExp.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_cloneSymbol.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_cloneTypedArray.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_copyArray.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_copyObject.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_copySymbols.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_copySymbolsIn.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_coreJsData.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_defineProperty.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_equalArrays.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_equalByTag.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_equalObjects.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_freeGlobal.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_getAllKeys.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_getAllKeysIn.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_getMapData.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_getNative.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_getPrototype.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_getRawTag.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_getSymbols.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_getSymbolsIn.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_getTag.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_getValue.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_hashClear.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_hashDelete.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_hashGet.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_hashHas.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_hashSet.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_initCloneArray.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_initCloneByTag.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_initCloneObject.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_isIndex.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_isKeyable.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_isMasked.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_isPrototype.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_listCacheClear.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_listCacheDelete.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_listCacheGet.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_listCacheHas.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_listCacheSet.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_mapCacheClear.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_mapCacheDelete.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_mapCacheGet.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_mapCacheHas.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_mapCacheSet.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_mapToArray.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_nativeCreate.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_nativeKeys.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_nativeKeysIn.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_nodeUtil.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_objectToString.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_overArg.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_root.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_setCacheAdd.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_setCacheHas.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_setToArray.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_stackClear.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_stackDelete.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_stackGet.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_stackHas.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_stackSet.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_toSource.js","webpack://openfin-web--web-layout/../../node_modules/lodash/cloneDeep.js","webpack://openfin-web--web-layout/../../node_modules/lodash/eq.js","webpack://openfin-web--web-layout/../../node_modules/lodash/isArguments.js","webpack://openfin-web--web-layout/../../node_modules/lodash/isArray.js","webpack://openfin-web--web-layout/../../node_modules/lodash/isArrayLike.js","webpack://openfin-web--web-layout/../../node_modules/lodash/isBuffer.js","webpack://openfin-web--web-layout/../../node_modules/lodash/isEqual.js","webpack://openfin-web--web-layout/../../node_modules/lodash/isFunction.js","webpack://openfin-web--web-layout/../../node_modules/lodash/isLength.js","webpack://openfin-web--web-layout/../../node_modules/lodash/isMap.js","webpack://openfin-web--web-layout/../../node_modules/lodash/isObject.js","webpack://openfin-web--web-layout/../../node_modules/lodash/isObjectLike.js","webpack://openfin-web--web-layout/../../node_modules/lodash/isSet.js","webpack://openfin-web--web-layout/../../node_modules/lodash/isTypedArray.js","webpack://openfin-web--web-layout/../../node_modules/lodash/keys.js","webpack://openfin-web--web-layout/../../node_modules/lodash/keysIn.js","webpack://openfin-web--web-layout/../../node_modules/lodash/stubArray.js","webpack://openfin-web--web-layout/../../node_modules/lodash/stubFalse.js","webpack://openfin-web--web-layout/./client/src/platform/api.ts","webpack://openfin-web--web-layout/./client/src/platform/settings.ts","webpack://openfin-web--web-layout/../../node_modules/uuid/dist/esm-browser/index.js","webpack://openfin-web--web-layout/../../node_modules/uuid/dist/esm-browser/md5.js","webpack://openfin-web--web-layout/../../node_modules/uuid/dist/esm-browser/nil.js","webpack://openfin-web--web-layout/../../node_modules/uuid/dist/esm-browser/parse.js","webpack://openfin-web--web-layout/../../node_modules/uuid/dist/esm-browser/regex.js","webpack://openfin-web--web-layout/../../node_modules/uuid/dist/esm-browser/rng.js","webpack://openfin-web--web-layout/../../node_modules/uuid/dist/esm-browser/sha1.js","webpack://openfin-web--web-layout/../../node_modules/uuid/dist/esm-browser/stringify.js","webpack://openfin-web--web-layout/../../node_modules/uuid/dist/esm-browser/v1.js","webpack://openfin-web--web-layout/../../node_modules/uuid/dist/esm-browser/v3.js","webpack://openfin-web--web-layout/../../node_modules/uuid/dist/esm-browser/v35.js","webpack://openfin-web--web-layout/../../node_modules/uuid/dist/esm-browser/v4.js","webpack://openfin-web--web-layout/../../node_modules/uuid/dist/esm-browser/v5.js","webpack://openfin-web--web-layout/../../node_modules/uuid/dist/esm-browser/validate.js","webpack://openfin-web--web-layout/../../node_modules/uuid/dist/esm-browser/version.js","webpack://openfin-web--web-layout/webpack/bootstrap","webpack://openfin-web--web-layout/webpack/runtime/define property getters","webpack://openfin-web--web-layout/webpack/runtime/global","webpack://openfin-web--web-layout/webpack/runtime/hasOwnProperty shorthand","webpack://openfin-web--web-layout/webpack/runtime/make namespace object","webpack://openfin-web--web-layout/webpack/runtime/node module decorator","webpack://openfin-web--web-layout/./client/src/content/fdc3-view.ts"],"sourcesContent":["\"use strict\";var e=require(\"./main-8cad4070.js\");require(\"buffer/\"),require(\"uuid\"),require(\"events\"),require(\"lodash/cloneDeep\"),require(\"lodash/isEqual\"),exports.connect=e.connect;\n","\"use strict\";var e=require(\"buffer/\"),t=require(\"events\"),n=require(\"lodash/cloneDeep\"),i=require(\"lodash/isEqual\"),r=require(\"uuid\");const o=(e,t)=>`${t}<${btoa(JSON.stringify(e))}>`;var s=\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof window?window:\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:{},a={},c={},d={},h={};async function l(e){const t=[];for(const n of e){const e=await n();t.push(e)}return t}Object.defineProperty(h,\"__esModule\",{value:!0}),h.promiseMapSerial=h.serial=h.promiseMap=h.promisify=void 0,h.promisify=function(e){return(...t)=>new Promise(((n,i)=>{e(...t,((e,t)=>e?i(e):n(t)))}))},h.promiseMap=async function(e,t){return Promise.all(e.map(t))},h.serial=l,h.promiseMapSerial=async function(e,t){return l(e.map(((e,n,i)=>()=>t(e,n,i))))};var u,p=s&&s.__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},w=s&&s.__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)};Object.defineProperty(d,\"__esModule\",{value:!0}),d.Reply=d.EmitterBase=d.Base=void 0;const y=h;class f{constructor(e){this.isNodeEnvironment=()=>\"node\"===this.wire.environment.type,this.isOpenFinEnvironment=()=>\"openfin\"===this.wire.environment.type,this.isBrowserEnvironment=()=>\"other\"===this.wire.environment.type,this.wire=e}get fin(){return this.wire.getFin()}get me(){return this.wire.me}}d.Base=f;d.EmitterBase=class extends f{constructor(e,t,...n){super(e),this.topic=t,u.set(this,void 0),this.eventNames=()=>this.hasEmitter()?this.getOrCreateEmitter().eventNames():[],this.emit=(e,t,...n)=>!!this.hasEmitter()&&this.getOrCreateEmitter().emit(e,t,...n),this.hasEmitter=()=>this.wire.eventAggregator.has(w(this,u,\"f\")),this.getOrCreateEmitter=()=>this.wire.eventAggregator.getOrCreate(w(this,u,\"f\")),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[],this.listenerCount=e=>this.hasEmitter()?this.getOrCreateEmitter().listenerCount(e):0,this.registerEventListener=async(e,t={},n,i)=>{const r={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e},o=this.getOrCreateEmitter();n(o);try{await this.wire.sendAction(\"subscribe-to-desktop-event\",r)}catch(e){throw i(o),this.deleteEmitterIfNothingRegistered(o),e}},this.deregisterEventListener=async(e,t={})=>{if(this.hasEmitter()){const n={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e};await this.wire.sendAction(\"unsubscribe-to-desktop-event\",n).catch((()=>null));return this.getOrCreateEmitter()}return Promise.resolve()},p(this,u,[t,...n],\"f\"),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[]}async on(e,t,n){return await this.registerEventListener(e,n,(n=>{n.on(e,t)}),(n=>{n.removeListener(e,t)})),this}async addListener(e,t,n){return this.on(e,t,n)}async once(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.once(e,i),n.once(e,t)}),(n=>{n.removeListener(e,i),n.removeListener(e,t)})),this}async prependListener(e,t,n){return await this.registerEventListener(e,n,(n=>{n.prependListener(e,t)}),(n=>{n.removeListener(e,t)})),this}async prependOnceListener(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.prependOnceListener(e,t),n.once(e,i)}),(n=>{n.removeListener(e,t),n.removeListener(e,i)})),this}async removeListener(e,t,n){const i=await this.deregisterEventListener(e,n);return i&&(i.removeListener(e,t),this.deleteEmitterIfNothingRegistered(i)),this}async deregisterAllListeners(e){const t={...this.identity,type:e,topic:this.topic};if(this.hasEmitter()){const e=this.getOrCreateEmitter(),n=e.listenerCount(t.type),i=[];for(let e=0;enull)));return await Promise.all(i),e}}async removeAllListeners(e){const t=async e=>{const t=await this.deregisterAllListeners(e);t&&(t.removeAllListeners(e),this.deleteEmitterIfNothingRegistered(t))};if(e)await t(e);else if(this.hasEmitter()){const e=this.getOrCreateEmitter().eventNames();await(0,y.promiseMap)(e,t)}return this}deleteEmitterIfNothingRegistered(e){0===e.eventNames().length&&this.wire.eventAggregator.delete(w(this,u,\"f\"))}},u=new WeakMap;d.Reply=class{};var g={};Object.defineProperty(g,\"__esModule\",{value:!0});var m=g.RuntimeError=g.NotSupportedError=g.NotImplementedError=g.NoAckError=g.DuplicateCorrelationError=g.UnexpectedActionError=g.DisconnectedError=void 0;class v extends Error{constructor(e){super(`Expected websocket state OPEN but found ${e}`),this.readyState=e}}g.DisconnectedError=v;class C extends Error{}g.UnexpectedActionError=C;class b extends Error{}g.DuplicateCorrelationError=b;class I extends Error{}g.NoAckError=I;class E extends Error{}g.NotImplementedError=E;class x extends Error{}g.NotSupportedError=x;class A extends Error{constructor(e){const{message:t,name:n,stack:i,...r}=e;super(t),this.name=n||\"Error\",this.stack=i??this.toString(),Object.keys(r).forEach((e=>{this[e]=r[e]}))}}class P extends Error{static getCallSite(e=0){const t=Error.stackTraceLimit,n=e+1;Error.stackTraceLimit=t+n;const i=Error.prepareStackTrace;Error.prepareStackTrace=(e,t)=>t;const r=(new Error).stack?.slice(n)??[];return Error.prepareStackTrace=i,Error.stackTraceLimit=t,r}static prepareStackTrace(e,t){if(\"function\"==typeof Error.prepareStackTrace)return Error.prepareStackTrace(e,t);let n=\"\";n+=e.name||\"Error\",n+=`: ${e.message||\"\"}`;for(const e of t)n+=`\\n at ${e.toString()}`;return n}constructor(e,t){const{reason:n,error:i}=e;super(n),this.name=\"RuntimeError\",i?.stack&&(this.cause=new A(i)),t&&(this.stack=P.prepareStackTrace(this,t))}}m=g.RuntimeError=P;var M={},_={},O={};Object.defineProperty(O,\"__esModule\",{value:!0}),O.validateIdentity=void 0,O.validateIdentity=function(e){let t;return\"object\"==typeof e&&\"string\"==typeof e.uuid||(t=\"Not a valid identity object\"),t};var S={},R={},F={},j={},k={},L={},T={};Object.defineProperty(T,\"__esModule\",{value:!0}),T.handleDeprecatedWarnings=void 0;var $;T.handleDeprecatedWarnings=e=>{(e.contentNavigation?.whitelist||e.contentNavigation?.blacklist||e.contentRedirect?.whitelist||e.contentRedirect?.blacklist)&&console.warn(\"The properties 'whitelist' and 'blacklist' have been marked as deprecated and will be removed in a future version. Please use 'allowlist' and 'denylist'.\")};var B={},G={};Object.defineProperty(G,\"__esModule\",{value:!0}),G.AsyncRetryableLazy=W=G.Lazy=void 0;var W=G.Lazy=class{constructor(e){this.producerFn=e}getValue(){return this.value||(this.value=this.producerFn()),this.value}};G.AsyncRetryableLazy=class{constructor(e){this.producerFn=e}async getValue(){return this.promise||(this.promise=this.producerFn().catch((e=>{throw delete this.promise,e}))),this.promise}};var H={};Object.defineProperty(H,\"__esModule\",{value:!0}),H.WebContents=void 0;const N=d;class D extends N.EmitterBase{constructor(e,t,n){super(e,n,t.uuid,t.name),this.identity=t,this.entityType=n}capturePage(e){return this.wire.sendAction(\"capture-page\",{options:e,...this.identity}).then((({payload:e})=>e.data))}executeJavaScript(e){return this.wire.sendAction(\"execute-javascript-in-window\",{...this.identity,code:e}).then((({payload:e})=>e.data))}getZoomLevel(){return this.wire.sendAction(\"get-zoom-level\",this.identity).then((({payload:e})=>e.data))}setZoomLevel(e){return this.wire.sendAction(\"set-zoom-level\",{...this.identity,level:e}).then((()=>{}))}navigate(e){return this.wire.sendAction(\"navigate-window\",{...this.identity,url:e}).then((()=>{}))}navigateBack(){return this.wire.sendAction(\"navigate-window-back\",{...this.identity}).then((()=>{}))}async navigateForward(){await this.wire.sendAction(\"navigate-window-forward\",{...this.identity})}stopNavigation(){return this.wire.sendAction(\"stop-window-navigation\",{...this.identity}).then((()=>{}))}reload(e=!1){return this.wire.sendAction(\"reload-window\",{ignoreCache:e,...this.identity}).then((()=>{}))}print(e={}){return this.wire.sendAction(\"print\",{...this.identity,options:e}).then((()=>{}))}findInPage(e,t){return this.wire.sendAction(\"find-in-page\",{...this.identity,searchTerm:e,options:t}).then((({payload:e})=>e.data))}stopFindInPage(e){return this.wire.sendAction(\"stop-find-in-page\",{...this.identity,action:e}).then((()=>{}))}getPrinters(){return this.wire.sendAction(\"get-printers\",{...this.identity}).then((({payload:e})=>e.data))}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){await this.wire.sendAction(\"focus-window\",{emitSynthFocused:e,...this.identity})}async showDeveloperTools(){await this.wire.sendAction(\"show-developer-tools\",this.identity)}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction(\"get-process-info\",this.identity);return e}async getSharedWorkers(){return this.wire.sendAction(\"get-shared-workers\",this.identity).then((({payload:e})=>e.data))}async inspectSharedWorker(){await this.wire.sendAction(\"inspect-shared-worker\",{...this.identity})}async inspectSharedWorkerById(e){await this.wire.sendAction(\"inspect-shared-worker-by-id\",{...this.identity,workerId:e})}async inspectServiceWorker(){await this.wire.sendAction(\"inspect-service-worker\",{...this.identity})}async showPopupWindow(e){if(this.wire.sendAction(`${this.entityType}-show-popup-window`,this.identity).catch((()=>{})),e?.onPopupReady){const t=async({popupName:t})=>{try{const n=this.fin.Window.wrapSync({uuid:this.fin.me.uuid,name:t});await e.onPopupReady(n)}catch(e){throw new Error(`Something went wrong during onPopupReady execution: ${e}`)}};await this.once(\"popup-ready\",t)}const{payload:t}=await this.wire.sendAction(\"try-create-popup-window\",{options:{...e,hasResultCallback:!!e?.onPopupResult,hasReadyCallback:!!e?.onPopupReady},...this.identity}),{data:{willOpen:n,options:i}}=t;n&&await this.fin.Window.create(i.initialOptions);if(e?.onPopupResult){const t=async t=>{await e.onPopupResult((e=>{const{name:t,uuid:n,result:i,data:r}=e,o={identity:{name:t,uuid:n},result:i};return r&&(o.data=r),o})(t))},n=async()=>{await this.removeListener(\"popup-result\",t)};await this.on(\"popup-result\",t),await this.once(\"popup-teardown\",n)}const{payload:r}=await this.wire.sendAction(\"show-popup-window\",{options:i,...this.identity});return r.data}}var U,V,z,K,q;function J(){return V||(V=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(function(){if($)return L;$=1,Object.defineProperty(L,\"__esModule\",{value:!0}),L.ViewModule=void 0;const e=d,t=O,n=J(),i=T;class r extends e.Base{async create(e){const{uuid:t}=this.wire.me;if(!e.name||\"string\"!=typeof e.name)throw new Error(\"Please provide a name property as a string in order to create a View.\");return(0,i.handleDeprecatedWarnings)(e),this.wire.environment.childViews?await this.wire.environment.createChildContent({entityType:\"view\",options:{...e,uuid:t}}):await this.wire.sendAction(\"create-view\",{...e,uuid:t}),this.wrapSync({uuid:t,name:e.name})}async wrap(e){this.wire.sendAction(\"view-wrap\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}wrapSync(e){this.wire.sendAction(\"view-wrap-sync\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}getCurrent(){if(this.wire.sendAction(\"view-get-current\").catch((e=>{})),!this.wire.me.isView)throw new Error(\"You are not in a View context\");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction(\"view-get-current-sync\").catch((e=>{})),!this.wire.me.isView)throw new Error(\"You are not in a View context\");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return L.ViewModule=r,L}(),e),n(function(){if(U)return B;var e;U=1,Object.defineProperty(B,\"__esModule\",{value:!0}),B.View=void 0;const t=g,n=G,i=H,r=ie();class o extends i.WebContents{constructor(i,o){super(i,o,\"view\"),this.identity=o,e.set(this,new n.Lazy((()=>this.fin.Platform.wrapSync(this.identity).getClient()))),this.attach=async e=>{await this.wire.sendAction(\"attach-view\",{target:e,...this.identity})},this.destroy=async()=>{await this.wire.sendAction(\"destroy-view\",{...this.identity})},this.show=async()=>{await this.wire.sendAction(\"show-view\",{...this.identity})},this.showAt=async(e,t={})=>{await this.wire.sendAction(\"show-view-at\",{bounds:e,...this.identity,options:t})},this.bringToFront=async()=>{await this.wire.sendAction(\"bring-view-to-front\",{...this.identity})},this.hide=async()=>{await this.wire.sendAction(\"hide-view\",{...this.identity})},this.setBounds=async e=>{await this.wire.sendAction(\"set-view-bounds\",{bounds:e,...this.identity})},this.getBounds=async()=>(await this.wire.sendAction(\"get-view-bounds\",{...this.identity})).payload.data,this.getInfo=async()=>(await this.wire.sendAction(\"get-view-info\",{...this.identity})).payload.data,this.getParentLayout=async()=>(this.wire.sendAction(\"view-get-parent-layout\",{...this.identity}).catch((()=>{})),this.fin.Platform.Layout.getLayoutByViewIdentity(this.identity)),this.getOptions=async()=>this.wire.sendAction(\"get-view-options\",{...this.identity}).then((({payload:e})=>e.data)),this.updateOptions=async e=>this.wire.sendAction(\"update-view-options\",{options:e,...this.identity}).then((()=>{})),this.getCurrentWindow=async()=>{const{payload:{data:e}}=await this.wire.sendAction(\"get-view-window\",{...this.identity});return new r._Window(this.wire,e)},this.getCurrentStack=async()=>{this.wire.sendAction(\"view-get-current-stack\").catch((()=>{}));try{return(await this.getParentLayout()).getStackByViewIdentity(this.identity)}catch(e){throw new t.RuntimeError({reason:\"This view does not belong to a stack.\",error:e})}},this.triggerBeforeUnload=async()=>(await this.wire.sendAction(\"trigger-before-unload\",{...this.identity})).payload.data,this.bindToElement=async e=>{if(!e)throw new Error(\"Element not found.\");return this.wire.environment.observeBounds(e,(async e=>this.setBounds(e)))}}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){const t=await this.getCurrentWindow();await t.focusedWebViewWasChanged(),await super.focus({emitSynthFocused:e})}}return B.View=o,e=new WeakMap,B}(),e)}(k)),k}function Y(){if(z)return j;z=1,Object.defineProperty(j,\"__esModule\",{value:!0}),j.Application=void 0;const e=d,t=ie(),n=J();class i extends e.EmitterBase{constructor(e,n){super(e,\"application\",n.uuid),this.identity=n,this.window=new t._Window(this.wire,{uuid:this.identity.uuid,name:this.identity.uuid})}windowListFromIdentityList(e){const n=[];return e.forEach((e=>{n.push(new t._Window(this.wire,{uuid:e.uuid,name:e.name}))})),n}isRunning(){return this.wire.sendAction(\"is-application-running\",this.identity).then((({payload:e})=>e.data))}async quit(e=!1){try{await this._close(e),await this.wire.sendAction(\"destroy-application\",{force:e,...this.identity})}catch(e){if(![\"Remote connection has closed\",\"Could not locate the requested application\"].some((t=>e.message.includes(t))))throw e}}async _close(e=!1){try{await this.wire.sendAction(\"close-application\",{force:e,...this.identity})}catch(e){if(!e.message.includes(\"Remote connection has closed\"))throw e}}close(e=!1){return console.warn(\"Deprecation Warning: Application.close is deprecated Please use Application.quit\"),this.wire.sendAction(\"application-close\",this.identity).catch((e=>{})),this._close(e)}getChildWindows(){return this.wire.sendAction(\"get-child-windows\",this.identity).then((({payload:e})=>{const t=[];return e.data.forEach((e=>{t.push({uuid:this.identity.uuid,name:e})})),this.windowListFromIdentityList(t)}))}getManifest(){return this.wire.sendAction(\"get-application-manifest\",this.identity).then((({payload:e})=>e.data))}getParentUuid(){return this.wire.sendAction(\"get-parent-application\",this.identity).then((({payload:e})=>e.data))}getShortcuts(){return this.wire.sendAction(\"get-shortcuts\",this.identity).then((({payload:e})=>e.data))}async getViews(){const{payload:e}=await this.wire.sendAction(\"application-get-views\",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}getZoomLevel(){return this.wire.sendAction(\"get-application-zoom-level\",this.identity).then((({payload:e})=>e.data))}getWindow(){return this.wire.sendAction(\"application-get-window\",this.identity).catch((e=>{})),Promise.resolve(this.window)}registerUser(e,t){return this.wire.sendAction(\"register-user\",{userName:e,appName:t,...this.identity}).then((()=>{}))}removeTrayIcon(){return this.wire.sendAction(\"remove-tray-icon\",this.identity).then((()=>{}))}restart(){return this.wire.sendAction(\"restart-application\",this.identity).then((()=>{}))}run(){return console.warn(\"Deprecation Warning: Application.run is deprecated Please use fin.Application.start\"),this.wire.sendAction(\"application-run\",this.identity).catch((e=>{})),this._run()}_run(e={}){return this.wire.sendAction(\"run-application\",{manifestUrl:this._manifestUrl,opts:e,...this.identity}).then((()=>{}))}scheduleRestart(){return this.wire.sendAction(\"relaunch-on-close\",this.identity).then((()=>{}))}async sendApplicationLog(){const{payload:e}=await this.wire.sendAction(\"send-application-log\",this.identity);return e.data}async setJumpList(e){await this.wire.sendAction(\"set-jump-list\",{config:e,...this.identity})}setTrayIcon(e){return this.wire.sendAction(\"set-tray-icon\",{enabledIcon:e,...this.identity}).then((()=>{}))}setShortcuts(e){return this.wire.sendAction(\"set-shortcuts\",{data:e,...this.identity}).then((()=>{}))}async setShortcutQueryParams(e){await this.wire.sendAction(\"set-shortcut-query-args\",{data:e,...this.identity})}setZoomLevel(e){return this.wire.sendAction(\"set-application-zoom-level\",{level:e,...this.identity}).then((()=>{}))}async setAppLogUsername(e){await this.wire.sendAction(\"set-app-log-username\",{data:e,...this.identity})}getTrayIconInfo(){return this.wire.sendAction(\"get-tray-icon-info\",this.identity).then((({payload:e})=>e.data))}hasTrayIcon(){return this.wire.sendAction(\"has-tray-icon\",this.identity).then((({payload:e})=>e.data))}terminate(){return this.wire.sendAction(\"terminate-application\",this.identity).then((()=>{}))}wait(){return this.wire.sendAction(\"wait-for-hung-application\",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction(\"get-info\",this.identity).then((({payload:e})=>e.data))}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction(\"application-get-process-info\",this.identity);return e}async setFileDownloadLocation(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t};await this.wire.sendAction(\"set-file-download-location\",{...n,downloadLocation:e})}async getFileDownloadLocation(){const{payload:{data:e}}=await this.wire.sendAction(\"get-file-download-location\",this.identity);return e}async showTrayIconPopupMenu(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t},{payload:i}=await this.wire.sendAction(\"show-tray-icon-popup-menu\",{...n,options:e});return i.data}async closeTrayIconPopupMenu(){const{name:e}=this.wire.me,t={uuid:this.identity.uuid,name:e};await this.wire.sendAction(\"close-tray-icon-popup-menu\",{...t})}}return j.Application=i,j}function Z(){return q||(q=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(function(){if(K)return F;K=1,Object.defineProperty(F,\"__esModule\",{value:!0}),F.ApplicationModule=void 0;const e=d,t=O,n=Y();class i extends e.Base{async wrap(e){this.wire.sendAction(\"wrap-application\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}wrapSync(e){this.wire.sendAction(\"wrap-application-sync\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}async _create(e){return void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&void 0===e.isPlatformController&&(e.autoShow=!0),await this.wire.sendAction(\"create-application\",e),this.wrap({uuid:e.uuid})}create(e){return console.warn(\"Deprecation Warning: fin.Application.create is deprecated. Please use fin.Application.start\"),this.wire.sendAction(\"application-create\").catch((e=>{})),this._create(e)}async start(e){this.wire.sendAction(\"start-application\").catch((e=>{}));const t=await this._create(e);return await this.wire.sendAction(\"run-application\",{uuid:e.uuid}),t}async startManyManifests(e,t){return this.wire.sendAction(\"run-applications\",{applications:e,opts:t}).then((()=>{}))}getCurrent(){return this.wire.sendAction(\"get-current-application\").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction(\"get-current-application-sync\").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}async startFromManifest(e,t){this.wire.sendAction(\"application-start-from-manifest\").catch((e=>{}));const n=await this._createFromManifest(e);return await n._run(t),n}createFromManifest(e){return console.warn(\"Deprecation Warning: fin.Application.createFromManifest is deprecated. Please use fin.Application.startFromManifest\"),this.wire.sendAction(\"application-create-from-manifest\").catch((e=>{})),this._createFromManifest(e)}_createFromManifest(e){return this.wire.sendAction(\"get-application-manifest\",{manifestUrl:e}).then((({payload:e})=>{const t=e.data.platform?e.data.platform.uuid:e.data.startup_app.uuid;return this.wrap({uuid:t})})).then((t=>(t._manifestUrl=e,t)))}}return F.ApplicationModule=i,F}(),e),n(Y(),e)}(R)),R}H.WebContents=D;var Q={};Object.defineProperty(Q,\"__esModule\",{value:!0}),Q.promisifySubscription=void 0;var X,ee,te;function ne(){if(X)return S;X=1,Object.defineProperty(S,\"__esModule\",{value:!0}),S._Window=void 0;const e=Z(),t=H,n=J(),i=T,r=Q;class o extends t.WebContents{constructor(e,t){super(e,t,\"window\")}async createWindow(e){this.wire.sendAction(\"window-create-window\",this.identity).catch((e=>{}));const t=await(0,r.promisifySubscription)(this,\"fire-constructor-callback\");void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&(e.autoShow=!0),(0,i.handleDeprecatedWarnings)(e);const n=this.wire.environment.createChildContent({entityType:\"window\",options:e}),[o]=await Promise.all([t.getValue(),n]);let s;const{success:a}=o,c=o.data,{message:d}=c;s=a?{httpResponseCode:c.httpResponseCode,apiInjected:c.apiInjected}:{message:c.message,networkErrorCode:c.networkErrorCode,stack:c.stack};const h={message:d,cbPayload:s,success:a};try{this.getWebWindow().fin.__internal_.openerSuccessCBCalled()}catch(e){}return h.success?this:Promise.reject(h)}getAllFrames(){return this.wire.sendAction(\"get-all-frames\",this.identity).then((({payload:e})=>e.data))}getBounds(){return this.wire.sendAction(\"get-window-bounds\",this.identity).then((({payload:e})=>e.data))}center(){return this.wire.sendAction(\"center-window\",this.identity).then((()=>{}))}blur(){return this.wire.sendAction(\"blur-window\",this.identity).then((()=>{}))}bringToFront(){return this.wire.sendAction(\"bring-window-to-front\",this.identity).then((()=>{}))}animate(e,t){return this.wire.sendAction(\"animate-window\",{transitions:e,options:t,...this.identity}).then((()=>{}))}hide(){return this.wire.sendAction(\"hide-window\",this.identity).then((()=>{}))}close(e=!1){return this.wire.sendAction(\"close-window\",{force:e,...this.identity}).then((()=>{Object.setPrototypeOf(this,null)}))}focusedWebViewWasChanged(){return this.wire.sendAction(\"focused-webview-changed\",this.identity).then((()=>{}))}getNativeId(){return this.wire.sendAction(\"get-window-native-id\",this.identity).then((({payload:e})=>e.data))}async getCurrentViews(){const{payload:e}=await this.wire.sendAction(\"window-get-views\",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}disableFrame(){return console.warn(\"Function is deprecated; use disableUserMovement instead.\"),this.wire.sendAction(\"disable-window-frame\",this.identity).then((()=>{}))}disableUserMovement(){return this.wire.sendAction(\"disable-window-frame\",this.identity).then((()=>{}))}enableFrame(){return console.warn(\"Function is deprecated; use enableUserMovement instead.\"),this.wire.sendAction(\"enable-window-frame\",this.identity).then((()=>{}))}enableUserMovement(){return this.wire.sendAction(\"enable-window-frame\",this.identity).then((()=>{}))}flash(){return this.wire.sendAction(\"flash-window\",this.identity).then((()=>{}))}stopFlashing(){return this.wire.sendAction(\"stop-flash-window\",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction(\"get-window-info\",this.identity).then((({payload:e})=>e.data))}async getLayout(e){this.wire.sendAction(\"window-get-layout\",this.identity).catch((e=>{}));const t=await this.getOptions();if(!t.layout&&!t.layoutSnapshot)throw new Error(\"Window does not have a Layout\");return this.fin.Platform.Layout.wrap(e??this.identity)}getOptions(){return this.wire.sendAction(\"get-window-options\",this.identity).then((({payload:e})=>e.data))}getParentApplication(){return this.wire.sendAction(\"window-get-parent-application\",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity))}getParentWindow(){return this.wire.sendAction(\"window-get-parent-window\",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity)).then((e=>e.getWindow()))}async getSnapshot(e){const t={area:e,...this.identity};console.warn(\"Window.getSnapshot has been deprecated, please use Window.capturePage\");return(await this.wire.sendAction(\"get-window-snapshot\",t)).payload.data}getState(){return this.wire.sendAction(\"get-window-state\",this.identity).then((({payload:e})=>e.data))}getWebWindow(){return this.wire.sendAction(\"window-get-web-window\",this.identity).catch((e=>{})),this.wire.environment.getWebWindow(this.identity)}isMainWindow(){return this.wire.sendAction(\"window-is-main-window\",this.identity).catch((e=>{})),this.me.uuid===this.me.name}isShowing(){return this.wire.sendAction(\"is-window-showing\",this.identity).then((({payload:e})=>e.data))}maximize(){return this.wire.sendAction(\"maximize-window\",this.identity).then((()=>{}))}minimize(){return this.wire.sendAction(\"minimize-window\",this.identity).then((()=>{}))}moveBy(e,t,n){return this.wire.sendAction(\"move-window-by\",{deltaLeft:e,deltaTop:t,positioningOptions:n,...this.identity}).then((()=>{}))}moveTo(e,t,n){return this.wire.sendAction(\"move-window\",{left:e,top:t,positioningOptions:n,...this.identity}).then((()=>{}))}resizeBy(e,t,n,i){return this.wire.sendAction(\"resize-window-by\",{deltaWidth:Math.floor(e),deltaHeight:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}resizeTo(e,t,n,i){return this.wire.sendAction(\"resize-window\",{width:Math.floor(e),height:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}restore(){return this.wire.sendAction(\"restore-window\",this.identity).then((()=>{}))}setAsForeground(){return this.wire.sendAction(\"set-foreground-window\",this.identity).then((()=>{}))}setBounds(e,t){return this.wire.sendAction(\"set-window-bounds\",{...e,...this.identity,positioningOptions:t}).then((()=>{}))}show(e=!1){return this.wire.sendAction(\"show-window\",{force:e,...this.identity}).then((()=>{}))}showAt(e,t,n=!1){return this.wire.sendAction(\"show-at-window\",{force:n,left:Math.floor(e),top:Math.floor(t),...this.identity}).then((()=>{}))}updateOptions(e){return this.wire.sendAction(\"update-window-options\",{options:e,...this.identity}).then((()=>{}))}authenticate(e,t){return this.wire.sendAction(\"window-authenticate\",{userName:e,password:t,...this.identity}).then((()=>{}))}async showPopupMenu(e){const{payload:t}=await this.wire.sendAction(\"show-popup-menu\",{options:e,...this.identity});return t.data}async closePopupMenu(){return this.wire.sendAction(\"close-popup-menu\",{...this.identity}).then((()=>{}))}async dispatchPopupResult(e){this.wire.sendAction(\"window-dispatch-popup-result\",this.identity).catch((e=>{})),await this.wire.sendAction(\"dispatch-popup-result\",{data:e,...this.identity})}async print(e={content:\"self\"}){switch(e.content){case void 0:case\"self\":return super.print(e);case\"screenshot\":return this.wire.sendAction(\"print-screenshot\",this.identity).then((()=>{}));case\"views\":return this.wire.sendAction(\"print-views\",{...this.identity,options:e}).then((()=>{}));default:return}}}return S._Window=o,S}function ie(){return te||(te=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(function(){if(ee)return _;ee=1,Object.defineProperty(_,\"__esModule\",{value:!0}),_._WindowModule=void 0;const e=d,t=O,n=ne();class i extends e.Base{async wrap(e){this.wire.sendAction(\"window-wrap\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}wrapSync(e){this.wire.sendAction(\"window-wrap-sync\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}create(e){return this.wire.sendAction(\"create-window\").catch((e=>{})),new n._Window(this.wire,{uuid:this.me.uuid,name:e.name}).createWindow(e)}getCurrent(){if(this.wire.sendAction(\"get-current-window\").catch((e=>{})),!this.wire.me.isWindow)throw new Error(\"You are not in a Window context\");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction(\"get-current-window-sync\").catch((e=>{})),!this.wire.me.isWindow)throw new Error(\"You are not in a Window context\");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return _._WindowModule=i,_}(),e),n(ne(),e)}(M)),M}Q.promisifySubscription=async(e,t,n=(()=>!0),i)=>{let r,o,s;const a=new Promise(((e,t)=>{r=e,o=t})),c=e=>{n(e)&&(clearTimeout(s),r(e))};return await e.on(t,c),i&&(s=setTimeout((()=>o(new Error(\"event timed out\"))),i)),a.finally((()=>{e.removeListener(t,c).catch((()=>null))})),{getValue:()=>a}},Object.defineProperty(c,\"__esModule\",{value:!0}),c.System=void 0;const re=d,oe=g,se=ie(),ae=t;class ce extends re.EmitterBase{constructor(e){super(e,\"system\")}sendExternalProcessRequest(e,t){return new Promise(((n,i)=>{const r=\"external-process-exited\";let o,s,a,c;\"function\"==typeof t.listener&&(a=e=>{const n=e||{};s={topic:\"exited\",uuid:n.processUuid||\"\",exitCode:n.exitCode||0},o===e.processUuid&&(t.listener(s),c.removeListener(r,a))},this.wire.me.name||(this.wire.me.name=this.wire.me.uuid),c=new se._Window(this.wire,this.wire.me),c.on(r,a)),this.wire.sendAction(e,t).then((({payload:e})=>{o=e.data.uuid,n(e.data),s&&o===s.uuid&&(t.listener(s),c.removeListener(r,a))})).catch((e=>{c&&c.removeListener(r,a),i(e)}))}))}getVersion(){return this.wire.sendAction(\"get-version\").then((({payload:e})=>e.data))}clearCache(e){return this.wire.sendAction(\"clear-cache\",e).then((()=>{}))}deleteCacheOnExit(){return this.wire.sendAction(\"delete-cache-request\").then((()=>{}))}exit(){return this.wire.sendAction(\"exit-desktop\").then((()=>{}))}async fetchManifest(e){const{payload:{data:t}}=await this.wire.sendAction(\"fetch-manifest\",{manifestUrl:e});return t}flushCookieStore(){return this.wire.sendAction(\"flush-cookie-store\").then((()=>{}))}getAllWindows(){return this.wire.sendAction(\"get-all-windows\").then((({payload:e})=>e.data))}getAllApplications(){return this.wire.sendAction(\"get-all-applications\").then((({payload:e})=>e.data))}getCommandLineArguments(){return this.wire.sendAction(\"get-command-line-arguments\").then((({payload:e})=>e.data))}async getCrashReporterState(){const{payload:{data:{diagnosticMode:e,isRunning:t}}}=await this.wire.sendAction(\"get-crash-reporter-state\");return console.warn(\"diagnosticMode property is deprecated. It will be removed in a future version\"),{diagnosticMode:e,diagnosticsMode:e,isRunning:t}}async startCrashReporter(e){const t=e,n={...t,diagnosticMode:t.diagnosticsMode||t.diagnosticMode},{payload:{data:{diagnosticMode:i,isRunning:r}}}=await this.wire.sendAction(\"start-crash-reporter\",n);return{diagnosticMode:i,diagnosticsMode:i,isRunning:r}}getUniqueUserId(){return this.wire.sendAction(\"get-unique-user-id\").then((({payload:e})=>e.data))}getEntityInfo(e,t){return this.wire.sendAction(\"get-entity-info\",{uuid:e,name:t}).then((({payload:e})=>e.data))}getEnvironmentVariable(e){return this.wire.sendAction(\"get-environment-variable\",{environmentVariables:e}).then((({payload:e})=>e.data))}getFocusedWindow(){return this.wire.sendAction(\"get-focused-window\").then((({payload:e})=>e.data))}async isAppCertified(e){const{payload:{data:{certifiedInfo:t}}}=await this.wire.sendAction(\"is-app-certified\",{manifestUrl:e});return t}getInstalledRuntimes(){return this.wire.sendAction(\"get-installed-runtimes\").then((({payload:e})=>e.data.runtimes))}async getInstalledApps(){const{payload:{data:{installedApps:e}}}=await this.wire.sendAction(\"get-installed-apps\");return e}getLog(e){return this.wire.sendAction(\"view-log\",e).then((({payload:e})=>e.data))}getMachineId(){return this.wire.sendAction(\"get-machine-id\").then((({payload:e})=>e.data))}getMinLogLevel(){return this.wire.sendAction(\"get-min-log-level\").then((({payload:e})=>e.data))}getLogList(){return this.wire.sendAction(\"list-logs\").then((({payload:e})=>e.data))}getMonitorInfo(){return this.wire.sendAction(\"get-monitor-info\").then((({payload:e})=>e.data))}getMousePosition(){return this.wire.sendAction(\"get-mouse-position\").then((({payload:e})=>e.data))}getProcessList(){return console.warn(\"System.getProcessList has been deprecated. Please consider using our new process APIs: Window.getProcessInfo, View.getProcessInfo, Application.getProcessInfo, System.getAllProcessInfo\"),this.wire.sendAction(\"process-snapshot\").then((({payload:e})=>e.data))}async getAllProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction(\"get-all-process-info\",this.identity);return e}getProxySettings(){return this.wire.sendAction(\"get-proxy-settings\").then((({payload:e})=>e.data))}getRuntimeInfo(){return this.wire.sendAction(\"get-runtime-info\").then((({payload:e})=>e.data))}getRvmInfo(){return this.wire.sendAction(\"get-rvm-info\").then((({payload:e})=>e.data))}getHostSpecs(){return this.wire.sendAction(\"get-host-specs\").then((({payload:e})=>e.data))}getOSInfo(){return this.wire.sendAction(\"get-os-info\").then((({payload:e})=>e.data))}launchExternalProcess(e){return this.sendExternalProcessRequest(\"launch-external-process\",e)}monitorExternalProcess(e){return this.sendExternalProcessRequest(\"monitor-external-process\",e)}log(e,t){return this.wire.sendAction(\"write-to-log\",{level:e,message:t}).then((()=>{}))}openUrlWithBrowser(e){return this.wire.sendAction(\"open-url-with-browser\",{url:e}).then((()=>{}))}async registerCustomProtocol(e){if(\"object\"!=typeof e)throw new Error(\"Must provide an object with a `protocolName` property having a string value.\");await this.wire.sendAction(\"register-custom-protocol\",e)}async unregisterCustomProtocol(e){await this.wire.sendAction(\"unregister-custom-protocol\",{protocolName:e})}async getCustomProtocolState(e){return this.wire.sendAction(\"get-custom-protocol-state\",{protocolName:e}).then((({payload:e})=>e.data))}releaseExternalProcess(e){return this.wire.sendAction(\"release-external-process\",{uuid:e}).then((()=>{}))}showDeveloperTools(e){return this.wire.sendAction(\"show-developer-tools\",e).then((()=>{}))}terminateExternalProcess(e){return this.wire.sendAction(\"terminate-external-process\",e).then((()=>{}))}updateProxySettings(e){return this.wire.sendAction(\"update-proxy\",e).then((()=>{}))}async downloadAsset(e,t){const n=()=>{};let i=n,r=n;const o=new Promise(((e,t)=>{i=e,r=t}));if(\"openfin\"!==this.wire.environment.type)throw new oe.NotSupportedError(\"downloadAsset only supported in an OpenFin Render process\");const s=oe.RuntimeError.getCallSite(),a=this.wire.environment.getNextMessageId().toString(),c=`asset-download-progress-${a}`,d=`asset-download-error-${a}`,h=`asset-download-complete-${a}`,l=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},u=()=>{this.removeListener(c,l)};await Promise.all([this.on(c,l),this.once(d,(e=>{u();const{reason:t,err:n}=e;r(new oe.RuntimeError({reason:t,error:n},s))})),this.once(h,(()=>{u(),i()}))]);const p=Object.assign(e,{downloadId:a});return await this.wire.sendAction(\"download-asset\",p).catch((e=>{throw u(),e})),o}downloadRuntime(e,t){const n=oe.RuntimeError.getCallSite();return new Promise(((i,r)=>{if(\"openfin\"!==this.wire.environment.type)return void r(new oe.NotSupportedError(\"downloadRuntime only supported in an OpenFin Render process\"));const o=this.wire.environment.getNextMessageId().toString(),s=`runtime-download-progress-${o}`,a=`runtime-download-error-${o}`,c=`runtime-download-complete-${o}`,d=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},h=()=>{this.removeListener(s,d)};this.on(s,d),this.once(a,(e=>{h();const{reason:t,err:i}=e;r(new oe.RuntimeError({reason:t,error:i},n))})),this.once(c,(()=>{h(),i()}));const l=Object.assign(e,{downloadId:o});this.wire.sendAction(\"download-runtime\",l).catch((e=>{h(),r(e)}))}))}downloadPreloadScripts(e){return this.wire.sendAction(\"download-preload-scripts\",{scripts:e}).then((({payload:e})=>e.data))}getAllExternalApplications(){return this.wire.sendAction(\"get-all-external-applications\").then((({payload:e})=>e.data))}getAppAssetInfo(e){return this.wire.sendAction(\"get-app-asset-info\",e).then((({payload:e})=>e.data))}getCookies(e){const t=this.wire.environment.getUrl(),n=Object.assign(e,{url:t});return this.wire.sendAction(\"get-cookies\",n).then((({payload:e})=>e.data))}setMinLogLevel(e){return this.wire.sendAction(\"set-min-log-level\",{level:e}).then((()=>{}))}resolveUuid(e){return this.wire.sendAction(\"resolve-uuid\",{entityKey:e}).then((({payload:e})=>e.data))}executeOnRemote(e,t){return t.requestingIdentity=e,this.wire.ferryAction(t)}readRegistryValue(e,t,n){return this.wire.sendAction(\"read-registry-value\",{rootKey:e,subkey:t,value:n}).then((({payload:e})=>e.data))}registerExternalConnection(e){return this.wire.sendAction(\"register-external-connection\",{uuid:e}).then((({payload:e})=>e.data))}async getServiceConfiguration(e){if(\"string\"!=typeof e.name)throw new Error(\"Must provide an object with a `name` property having a string value\");const{name:t}=e;return this.wire.sendAction(\"get-service-configuration\",{name:t}).then((({payload:e})=>e.data))}async getSystemAppConfig(e){if(\"string\"!=typeof e)throw new Error(\"Must provide a string value for name of system app\");return this.wire.sendAction(\"get-system-app-configuration\",{name:e}).then((({payload:e})=>e.data))}async registerShutdownHandler(e){this.wire.sendAction(\"system-register-shutdown-handler\").catch((e=>{}));const{uuid:t,name:n}=this.wire.me;this.on(\"system-shutdown\",(i=>{e({proceed:()=>{this.wire.environment.raiseEvent(\"application/system-shutdown-handled\",{uuid:t,name:n,topic:\"application\"})}})}))}runRvmHealthCheck(){return this.wire.sendAction(\"run-rvm-health-check\").then((({payload:e})=>e.data))}async launchManifest(e,t={}){const{subscribe:n,...i}=t,r=i;if(n){const e=new ae.EventEmitter;n(e);const t=\"app-version-progress\",i=\"runtime-status\",o=\"app-version-complete\",s=\"app-version-error\",a=this.wire.environment.getNextMessageId().toString();r.appVersionId=a;const c=[o,t,i,s],d=e=>{const{appVersionId:t,topic:n,type:i,...r}=e;return{...r,type:c.find((e=>i.includes(e)))}},h=t=>{const n=d(t);e.emit(n.type,n)},l=()=>{this.removeListener(`${t}.${a}`,h),this.removeListener(`${i}.${a}`,h),this.removeListener(`${o}.${a}`,h),this.removeListener(`${s}.${a}`,h),this.removeListener(`${o}.${a}`,l),this.removeListener(`${s}.${a}`,l)};await Promise.all([this.on(`${t}.${a}`,h),this.on(`${i}.${a}`,h),this.once(`${o}.${a}`,h),this.once(`${s}.${a}`,h),this.once(`${o}.${a}`,l),this.once(`${s}.${a}`,l)])}return(await this.wire.sendAction(\"launch-manifest\",{manifestUrl:e,opts:r})).payload.data.manifest}async queryPermissionForCurrentContext(e){const t={uuid:this.wire.me.uuid,name:this.wire.me.name};return(await this.wire.sendAction(\"query-permission-for-current-context\",{apiName:e,identity:t})).payload.data}async enableNativeWindowIntegrationProvider(e){const{payload:t}=await this.wire.sendAction(\"enable-native-window-integration-provider\",{permissions:e});return t.data}async registerUsage({data:e,type:t}){await this.wire.sendAction(\"register-usage\",{data:e,type:t})}async getPrinters(){const{payload:e}=await this.wire.sendAction(\"system-get-printers\");return e.data}async updateProcessLoggingOptions(e){await this.wire.sendAction(\"system-update-process-logging-options\",{options:e})}async getDomainSettings(){const{payload:{data:e}}=await this.wire.sendAction(\"get-domain-settings\",this.identity);return e}async setDomainSettings(e){await this.wire.sendAction(\"set-domain-settings\",{domainSettings:e,...this.identity})}async refreshExtensions(){const{payload:e}=await this.wire.sendAction(\"refresh-extensions\");return e.data}async getInstalledExtensions(){const{payload:e}=await this.wire.sendAction(\"get-installed-extensions\");return e.data}}c.System=ce;var de={},he={};Object.defineProperty(he,\"__esModule\",{value:!0}),he.RefCounter=void 0;he.RefCounter=class{constructor(){this.topicRefMap=new Map}incRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t+1;n=i,this.topicRefMap.set(e,i)}else this.topicRefMap.set(e,1),n=1;return n}decRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t-1;this.topicRefMap.set(e,i),n=i}else n=-1;return n}actOnFirst(e,t,n){return 1===this.incRefCount(e)?t():n()}actOnLast(e,t,n){return 0===this.decRefCount(e)?t():n()}};var le={},ue={},pe={};Object.defineProperty(pe,\"__esModule\",{value:!0}),pe.ChannelBase=pe.ProtectedItems=void 0;const we=e=>async(t,n,i)=>{const r=await e(t,n,i);return void 0===r?n:r};pe.ProtectedItems=class{constructor(e,t){this.providerIdentity=e,this.close=t}};class ye{static defaultAction(e){throw new Error(`No action registered at target for ${e}`)}constructor(){this.subscriptions=new Map}async processAction(e,t,n){try{const i=this.subscriptions.has(e)?this.subscriptions.get(e):(t,n)=>(this.defaultAction??ye.defaultAction)(e,t,n),r=this.preAction?await this.preAction(e,t,n):t,o=await i(r,n);return this.postAction?await this.postAction(e,o,n):o}catch(t){if(this.errorMiddleware)return this.errorMiddleware(e,t,n);throw t}}beforeAction(e){if(this.preAction)throw new Error(\"Already registered beforeAction middleware\");this.preAction=we(e)}onError(e){if(this.errorMiddleware)throw new Error(\"Already registered error middleware\");this.errorMiddleware=e}afterAction(e){if(this.postAction)throw new Error(\"Already registered afterAction middleware\");this.postAction=we(e)}remove(e){this.subscriptions.delete(e)}setDefaultAction(e){if(this.defaultAction)throw new Error(\"default action can only be set once\");this.defaultAction=e}register(e,t){if(this.subscriptions.has(e))throw new Error(`Subscription already registered for action: ${e}. Unsubscribe before adding new subscription`);return this.subscriptions.set(e,t),!0}}pe.ChannelBase=ye;var fe,ge,me,ve=s&&s.__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)},Ce=s&&s.__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};Object.defineProperty(ue,\"__esModule\",{value:!0}),ue.ChannelClient=void 0;const be=pe,Ie=new Map;class Ee extends be.ChannelBase{static closeChannelByEndpointId(e){const t=Ie.get(e);t&&ve(t,me,\"f\").call(t)}static handleProviderDisconnect(e){for(const t of Ie.values())t.providerIdentity.channelId===e.channelId&&(t.disconnectListener(e),ve(t,me,\"f\").call(t))}constructor(e,t,n){super(),fe.set(this,void 0),ge.set(this,void 0),this.processAction=(e,t,n)=>super.processAction(e,t,n),me.set(this,(()=>{Ie.delete(this.endpointId),ve(this,ge,\"f\").close()})),Ce(this,fe,new be.ProtectedItems(e,t),\"f\"),this.disconnectListener=()=>{},this.endpointId=e.endpointId,Ce(this,ge,n,\"f\"),Ie.set(this.endpointId,this),n.receive(this.processAction)}get providerIdentity(){return ve(this,fe,\"f\").providerIdentity}async dispatch(e,t){if(ve(this,ge,\"f\").isEndpointConnected(this.providerIdentity.channelId))return ve(this,ge,\"f\").send(this.providerIdentity.channelId,e,t);throw new Error(\"The client you are trying to dispatch from is disconnected from the target provider.\")}onDisconnection(e){this.disconnectListener=t=>{try{e(t)}catch(e){throw new Error(`Error while calling the onDisconnection callback: ${e.message}`)}finally{this.disconnectListener=()=>{}}}}async disconnect(){await this.sendDisconnectAction(),ve(this,me,\"f\").call(this)}async sendDisconnectAction(){const e=ve(this,fe,\"f\");await e.close()}static async wireClose(e,t,n){const{channelName:i,uuid:r,name:o}=t;await e.sendAction(\"disconnect-from-channel\",{channelName:i,uuid:r,name:o,endpointId:n})}}ue.ChannelClient=Ee,fe=new WeakMap,ge=new WeakMap,me=new WeakMap;var xe={},Ae={};Object.defineProperty(Ae,\"__esModule\",{value:!0}),Ae.exhaustiveCheck=void 0,Ae.exhaustiveCheck=function(e,t){throw new Error(`Unsupported value: ${e}${t?`\\n Supported values are: ${t.join(\"\")}`:\"\"}`)};var Pe,Me,_e,Oe={},Se=s&&s.__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},Re=s&&s.__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)};Object.defineProperty(Oe,\"__esModule\",{value:!0}),Oe.ClassicInfo=Oe.ClassicStrategy=void 0;Oe.ClassicStrategy=class{constructor(e,t,n,i){this.messageReceiver=t,this.endpointId=n,this.providerIdentity=i,Pe.set(this,void 0),Me.set(this,new Map),_e.set(this,new Map),this.send=async(e,t,n)=>{const i=Re(this,Me,\"f\").get(e);if(!i)throw new Error(`Could not locate routing info for endpoint ${e}`);const r={...i};r.isLocalEndpointId&&delete r.endpointId,delete r.isLocalEndpointId;const o=Re(this,Pe,\"f\").sendAction(\"send-channel-message\",{...r,providerIdentity:this.providerIdentity,action:t,payload:n});Re(this,_e,\"f\").get(e)?.add(o);return(await o.catch((e=>{throw new Error(e.message)})).finally((()=>{Re(this,_e,\"f\").get(e)?.delete(o)}))).payload.data.result},this.close=async()=>{this.messageReceiver.removeEndpoint(this.providerIdentity.channelId,this.endpointId),[...Re(this,Me,\"f\").keys()].forEach((e=>this.closeEndpoint(e))),Se(this,Me,new Map,\"f\")},Se(this,Pe,e,\"f\")}onEndpointDisconnect(e,t){}receive(e){this.messageReceiver.addEndpoint(e,this.providerIdentity.channelId,this.endpointId)}async closeEndpoint(e){const t=Re(this,Me,\"f\").get(e);Re(this,Me,\"f\").delete(e);const n=Re(this,_e,\"f\").get(e);n?.forEach((n=>{const i=`Channel connection with identity uuid: ${t?.uuid} / name: ${t?.name} / endpointId: ${e} no longer connected.`;n.cancel(new Error(i))}))}isEndpointConnected(e){return Re(this,Me,\"f\").has(e)}addEndpoint(e,t){Re(this,Me,\"f\").set(e,t.endpointIdentity),Re(this,_e,\"f\").set(e,new Set)}isValidEndpointPayload(e){return\"string\"==typeof e?.endpointIdentity?.endpointId||\"string\"==typeof e?.endpointIdentity?.channelId}},Pe=new WeakMap,Me=new WeakMap,_e=new WeakMap,Oe.ClassicInfo={version:5,minimumVersion:0,type:\"classic\"};var Fe={},je={},ke={};Object.defineProperty(ke,\"__esModule\",{value:!0}),ke.errorToPOJO=void 0,ke.errorToPOJO=function(e){return{stack:e.stack,name:e.name,message:e.message,toString:()=>e.stack||e.toString()}};var Le,Te,$e=s&&s.__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)},Be=s&&s.__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};Object.defineProperty(je,\"__esModule\",{value:!0}),je.RTCEndpoint=void 0;const Ge=ke;je.RTCEndpoint=class{static isValidEndpointPayload(e){const t=e=>\"object\"==typeof e&&null!==e;return t(e)&&t(e.endpointIdentity)&&t(e.rtc)&&\"string\"==typeof e.endpointIdentity.endpointId}constructor({rtc:e,endpointIdentity:t}){this.responseMap=new Map,Le.set(this,null),Te.set(this,void 0),this.connectionStateChangeHandler=e=>{\"connected\"!==this.rtc.rtcClient.connectionState&&(this.rtc.rtcClient.removeEventListener(\"connectionstatechange\",this.connectionStateChangeHandler),this.close(),$e(this,Te,\"f\")&&$e(this,Te,\"f\").call(this))},this.send=async(e,t)=>{const n=`message-${Math.random()}`,i=new Promise(((e,t)=>{this.responseMap.set(n,{resolve:e,reject:t})}));return this.rtc.channels.request.send(JSON.stringify({action:e,payload:t,messageId:n})),i},this.close=()=>{this.responseMap.forEach((e=>e.reject(\"Connection has closed.\"))),this.responseMap=new Map,this.rtc.channels.request.close(),this.rtc.channels.response.close(),this.rtc.rtcClient.close()},this.rtc=e,this.endpointIdentity=t,this.rtc.channels.response.addEventListener(\"message\",(e=>{let{data:t}=e;e.data instanceof ArrayBuffer&&(t=(new TextDecoder).decode(e.data));const{messageId:n,payload:i,success:r,error:o}=JSON.parse(t),{resolve:s,reject:a}=this.responseMap.get(n)??{};s&&a?(this.responseMap.delete(n),r?s(i):a(o)):(console.log(\"Could not find id in responseMap.\"),console.log(e))})),this.rtc.channels.request.addEventListener(\"message\",(async e=>{let{data:n}=e;e.data instanceof ArrayBuffer&&(n=(new TextDecoder).decode(e.data));const{messageId:i,action:r,payload:o}=JSON.parse(n);if($e(this,Le,\"f\"))try{const e=await $e(this,Le,\"f\").call(this,r,o,t);this.rtc.channels.response.send(JSON.stringify({messageId:i,payload:e,success:!0}))}catch(e){\"open\"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,error:(0,Ge.errorToPOJO)(e),success:!1}))}else\"open\"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,success:!1,error:\"Connection not ready.\"}))})),this.rtc.rtcClient.addEventListener(\"connectionstatechange\",this.connectionStateChangeHandler),Object.values(this.rtc.channels).forEach((e=>{e.onclose=e=>{[...this.responseMap.values()].forEach((e=>e.reject(new Error(\"RTCDataChannel closed unexpectedly, this is most commonly caused by message size. Note: RTC Channels have a message size limit of ~255kB.\")))),this.close(),$e(this,Te,\"f\")&&$e(this,Te,\"f\").call(this)}}))}onDisconnect(e){if($e(this,Te,\"f\"))throw new Error(\"RTCEndpoint disconnectListener cannot be set twice.\");Be(this,Te,e,\"f\")}receive(e){if($e(this,Le,\"f\"))throw new Error(\"You have already set a listener for this RTC Endpoint.\");Be(this,Le,e,\"f\")}get connected(){return\"connected\"===this.rtc.rtcClient.connectionState}},Le=new WeakMap,Te=new WeakMap;var We,He,Ne,De={},Ue=s&&s.__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)},Ve=s&&s.__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};Object.defineProperty(De,\"__esModule\",{value:!0}),De.EndpointStrategy=void 0;De.EndpointStrategy=class{constructor(e,t,n){this.EndpointType=e,this.StrategyName=n,We.set(this,null),He.set(this,new Map),Ne.set(this,!0),this.send=async(e,t,n)=>this.getEndpointById(e).send(t,n),this.close=async()=>{Ue(this,Ne,\"f\")&&(Ue(this,He,\"f\").forEach((e=>e.close())),Ve(this,He,new Map,\"f\")),Ve(this,Ne,!1,\"f\")},this.isValidEndpointPayload=t}onEndpointDisconnect(e,t){this.getEndpointById(e).onDisconnect(t)}receive(e){if(Ue(this,We,\"f\"))throw new Error(`You have already set a listener for this ${this.StrategyName} Strategy`);Ve(this,We,e,\"f\"),Ue(this,He,\"f\").forEach((e=>e.receive(Ue(this,We,\"f\"))))}getEndpointById(e){const t=Ue(this,He,\"f\").get(e);if(!t)throw new Error(`Client with endpoint id ${e} is not connected`);return t}get connected(){return Ue(this,Ne,\"f\")}isEndpointConnected(e){return Ue(this,He,\"f\").has(e)}addEndpoint(e,t){if(!Ue(this,Ne,\"f\"))return void console.warn(`Adding endpoint to disconnected ${this.StrategyName} Strategy`);const n=new this.EndpointType(t);Ue(this,We,\"f\")&&n.receive(Ue(this,We,\"f\")),Ue(this,He,\"f\").set(e,n)}async closeEndpoint(e){Ue(this,He,\"f\").delete(e)}},We=new WeakMap,He=new WeakMap,Ne=new WeakMap,Object.defineProperty(Fe,\"__esModule\",{value:!0}),Fe.RTCInfo=Fe.RTCStrategy=void 0;const ze=je,Ke=De;class qe extends Ke.EndpointStrategy{constructor(){super(ze.RTCEndpoint,ze.RTCEndpoint.isValidEndpointPayload,\"RTC\")}}Fe.RTCStrategy=qe,Fe.RTCInfo={version:2,minimumVersion:0,type:\"rtc\"};var Je={};Object.defineProperty(Je,\"__esModule\",{value:!0}),Je.RTCICEManager=void 0;const Ye=d;class Ze extends Ye.EmitterBase{constructor(e){super(e,\"channel\"),this.ensureChannelOpened=e=>new Promise(((t,n)=>{if(\"open\"===e.readyState)t();else if(\"connecting\"===e.readyState){const n=()=>{e.removeEventListener(\"open\",n),t()};e.addEventListener(\"open\",n)}else n(new Error(\"This Channel has already closed\"))}))}static createDataChannelPromise(e,t){let n;const i=new Promise((e=>{n=e})),r=i=>{const o=()=>{i.channel.removeEventListener(\"open\",o),n(i.channel)};i.channel.label===e&&(i.channel.addEventListener(\"open\",o),t.removeEventListener(\"datachannel\",r))};return t.addEventListener(\"datachannel\",r),i}async listenForProviderIce(e,t){await this.on(this.createProviderEventName(e),t,{timestamp:Date.now()})}async raiseProviderIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createProviderEventName(e)),t)}async listenForClientIce(e,t){await this.on(this.createClientEventName(e),t,{timestamp:Date.now()})}async raiseClientIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createClientEventName(e)),t)}cleanupIceListeners(e){this.removeAllListeners(this.createClientEventName(e)),this.removeAllListeners(this.createProviderEventName(e))}createClientEventName(e){return`ice-client-${e}`}createProviderEventName(e){return`ice-provider-${e}`}createRouteString(e){return`channel/${e}`}createRtcPeer(){return this.wire.environment.getRtcPeer()}async startClientOffer(){const e=Math.random().toString(),t=this.createRtcPeer();t.addEventListener(\"icecandidate\",(async t=>{t.candidate&&await this.raiseClientIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForProviderIce(e,(async e=>{await t.addIceCandidate(e.candidate)}));const n={request:t.createDataChannel(\"request\"),response:t.createDataChannel(\"response\")},i=await t.createOffer();await t.setLocalDescription(i);const r=Promise.all([n.request,n.response].map(this.ensureChannelOpened)).then((()=>{}));return{rtcClient:t,channels:n,offer:i,rtcConnectionId:e,channelsOpened:r}}async finishClientOffer(e,t,n){return await e.setRemoteDescription(t),await n,!0}async createProviderAnswer(e,t){const n=this.createRtcPeer(),i=Ze.createDataChannelPromise(\"request\",n),r=Ze.createDataChannelPromise(\"response\",n);n.addEventListener(\"icecandidate\",(async t=>{t.candidate&&await this.raiseProviderIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForClientIce(e,(async e=>{await n.addIceCandidate(e.candidate)})),await n.setRemoteDescription(t);const o=await n.createAnswer();await n.setLocalDescription(o);const s=Promise.all([i,r]).then((([t,n])=>(this.cleanupIceListeners(e),{request:t,response:n})));return{rtcClient:n,answer:o,channels:s}}}Je.RTCICEManager=Ze;var Qe={},Xe={};function et(e){return[...e.split(\".\").reverse().entries()].reduce(((e,[t,n])=>e+ +n*1e4**t),0)}function tt(e,t){return et(e)>=et(t)}function nt(e){return e.split(\"/\")[0]}Object.defineProperty(Xe,\"__esModule\",{value:!0}),Xe.runtimeUuidMeetsMinimumRuntimeVersion=Xe.parseRuntimeUuid=Xe.meetsMinimumRuntimeVersion=void 0,Xe.meetsMinimumRuntimeVersion=tt,Xe.parseRuntimeUuid=nt,Xe.runtimeUuidMeetsMinimumRuntimeVersion=function(e,t){return tt(nt(e),t)};var it,rt,ot,st,at,ct=s&&s.__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)},dt=s&&s.__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};Object.defineProperty(Qe,\"__esModule\",{value:!0}),Qe.ChannelProvider=void 0;const ht=pe,lt=Xe;class ut extends ht.ChannelBase{get connections(){return[...ct(this,it,\"f\")]}static handleClientDisconnection(e,t){const n=e.connections.find((e=>e.endpointId===t.endpointId));if(n)ct(e,st,\"f\").call(e,n);else{e.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name)).forEach(ct(e,st,\"f\"))}e.disconnectListener(t)}static setProviderRemoval(e,t){ut.removalMap.set(e,t)}constructor(e,t,n){super(),it.set(this,void 0),rt.set(this,void 0),ot.set(this,void 0),st.set(this,(e=>{const t=this.connections.filter((t=>t.endpointId!==e.endpointId));ct(this,ot,\"f\").closeEndpoint(e.endpointId),dt(this,it,t,\"f\")})),this.processAction=async(e,t,n)=>(ut.clientIsMultiRuntime(n)&&!(0,lt.runtimeUuidMeetsMinimumRuntimeVersion)(n.runtimeUuid,\"18.87.56.0\")?this.handleMultiRuntimeLegacyClient(n):this.checkForClientConnection(n),super.processAction(e,t,n)),at.set(this,(()=>{ct(this,ot,\"f\").close();const e=ut.removalMap.get(this);e&&e()})),dt(this,rt,new ht.ProtectedItems(e,t),\"f\"),this.connectListener=()=>{},this.disconnectListener=()=>{},dt(this,it,[],\"f\"),dt(this,ot,n,\"f\"),n.receive(this.processAction)}dispatch(e,t,n){const i=e.endpointId??this.getEndpointIdForOpenFinId(e,t);return i&&ct(this,ot,\"f\").isEndpointConnected(i)?ct(this,ot,\"f\").send(i,t,n):Promise.reject(new Error(`Client connection with identity uuid: ${e.uuid} / name: ${e.name} / endpointId: ${i} no longer connected.`))}async processConnection(e,t){return ct(this,it,\"f\").push(e),this.connectListener(e,t)}publish(e,t){return this.connections.map((n=>ct(this,ot,\"f\").send(n.endpointId,e,t)))}onConnection(e){this.connectListener=e}onDisconnection(e){this.disconnectListener=e}async destroy(){const e=ct(this,rt,\"f\");e.providerIdentity,dt(this,it,[],\"f\"),await e.close(),ct(this,at,\"f\").call(this)}async getAllClientInfo(){return this.connections.map((e=>{const{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}=e;return{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}}))}checkForClientConnection(e){if(!this.isClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider.\\n Client Identity: {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}isClientConnected(e){return ut.clientIdentityIncludesEndpointId(e)?this.connections.some((t=>t.endpointId===e.endpointId&&t.uuid===e.uuid&&t.name===e.name)):this.isLegacyClientConnected(e)}isLegacyClientConnected(e){return this.connections.some((t=>t.uuid===e.uuid&&t.name===e.name))}handleMultiRuntimeLegacyClient(e){if(!this.isLegacyClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider. Client Identity:\\n {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}getEndpointIdForOpenFinId(e,t){const n=this.connections.filter((t=>t.name===e.name&&t.uuid===e.uuid));if(n.length>=2){const n=ct(this,rt,\"f\"),{uuid:i,name:r}=e,o=n?.providerIdentity.uuid,s=n?.providerIdentity.name;console.warn(`WARNING: Dispatch call may have unintended results. The \"to\" argument of your dispatch call is missing the\\n \"endpointId\" parameter. The identity you are dispatching to ({uuid: ${i}, name: ${r}})\\n has multiple channelClients for this channel. Your dispatched action: (${t}) from the provider:\\n ({uuid: ${o}, name: ${s}}) will only be processed by the most recently-created client.`)}return n.pop()?.endpointId}static clientIdentityIncludesEndpointId(e){return void 0!==e.endpointId}static clientIsMultiRuntime(e){return void 0!==e.runtimeUuid}static async wireClose(e,t){await e.sendAction(\"destroy-channel\",{channelName:t})}}Qe.ChannelProvider=ut,it=new WeakMap,rt=new WeakMap,ot=new WeakMap,st=new WeakMap,at=new WeakMap,ut.removalMap=new WeakMap;var pt={};Object.defineProperty(pt,\"__esModule\",{value:!0}),pt.MessageReceiver=void 0;const wt=ue,yt=d;class ft extends yt.Base{constructor(e){super(e),this.onmessage=e=>\"process-channel-message\"===e.action&&(this.processChannelMessage(e),!0),this.endpointMap=new Map,this.latestEndpointIdByChannelId=new Map,e.registerMessageHandler(this.onmessage.bind(this))}async processChannelMessage(e){const{senderIdentity:t,providerIdentity:n,action:i,ackToSender:r,payload:o,intendedTargetIdentity:s}=e.payload,a=s.channelId??s.endpointId??this.latestEndpointIdByChannelId.get(n.channelId),c=this.endpointMap.get(a);if(!c)return r.payload.success=!1,r.payload.reason=`Client connection with identity uuid: ${this.wire.me.uuid} / name: ${this.wire.me.name} / endpointId: ${a} no longer connected.`,this.wire.sendRaw(r);try{const e=await c(i,o,t);return r.payload.payload=r.payload.payload||{},r.payload.payload.result=e,this.wire.sendRaw(r)}catch(e){return r.payload.success=!1,r.payload.reason=e.message,this.wire.sendRaw(r)}}addEndpoint(e,t,n){this.endpointMap.set(n,e),t!==n&&this.latestEndpointIdByChannelId.set(t,n)}removeEndpoint(e,t){this.endpointMap.delete(t),this.latestEndpointIdByChannelId.get(e)===t&&this.latestEndpointIdByChannelId.delete(e)}checkForPreviousClientConnection(e){const t=this.latestEndpointIdByChannelId.get(e);t&&(wt.ChannelClient.closeChannelByEndpointId(t),console.warn(\"You have created a second connection to an older provider. First connection has been removed from the clientMap\"),console.warn(\"If the provider calls publish(), you may receive multiple messages.\"))}}pt.MessageReceiver=ft;var gt={};Object.defineProperty(gt,\"__esModule\",{value:!0}),gt.ProtocolManager=void 0;gt.ProtocolManager=class{constructor(e){this.ProtocolsInPreferenceOrder=e,this.DefaultClientProtocols=[\"classic\"],this.DefaultProviderProtocols=[\"classic\"],this.getClientProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultClientProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(\", \")}.`);return t},this.getProviderProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultProviderProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(\", \")}.`);return t},this.getCompatibleProtocols=(e,t)=>t.supportedProtocols.filter((t=>e.some((e=>e.type===t.type&&t.version>=e.minimumVersion&&e.version>=(t.minimumVersion??0))))).slice(0,t.maxProtocols)}};var mt={};Object.defineProperty(mt,\"__esModule\",{value:!0});class vt{static combine(e,t){return new vt(e,t)}constructor(e,t){this.primary=e,this.secondary=t}onEndpointDisconnect(e,t){this.primary.onEndpointDisconnect(e,(()=>{this.secondary.isEndpointConnected(e)||t()})),this.secondary.onEndpointDisconnect(e,(()=>{this.primary.isEndpointConnected(e)||t()}))}isValidEndpointPayload(e){return this.primary.isValidEndpointPayload(e)||this.secondary.isValidEndpointPayload(e)}async closeEndpoint(e){await this.primary.closeEndpoint(e),await this.secondary.closeEndpoint(e)}isEndpointConnected(e){return this.primary.isEndpointConnected(e)||this.secondary.isEndpointConnected(e)}async addEndpoint(e,t){this.primary.isValidEndpointPayload(t)&&await this.primary.addEndpoint(e,t),this.secondary.isValidEndpointPayload(t)&&await this.secondary.addEndpoint(e,t)}receive(e){this.primary.receive(e),this.secondary.receive(e)}send(e,t,n){return this.primary.isEndpointConnected(e)?this.primary.send(e,t,n):this.secondary.send(e,t,n)}async close(){await Promise.all([this.primary.close(),this.secondary.close()])}}mt.default=vt;var Ct,bt,It=s&&s.__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},Et=s&&s.__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)},xt=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(xe,\"__esModule\",{value:!0}),xe.ConnectionManager=void 0;const At=Ae,Pt=d,Mt=Oe,_t=Fe,Ot=Je,St=Qe,Rt=pt,Ft=gt,jt=xt(mt);class kt extends Pt.Base{static getProtocolOptionsFromStrings(e){return e.map((e=>{switch(e){case\"rtc\":return _t.RTCInfo;case\"classic\":return Mt.ClassicInfo;default:return(0,At.exhaustiveCheck)(e,[\"rtc\",\"classic\"])}}))}constructor(e){super(e),Ct.set(this,void 0),bt.set(this,void 0),this.removeChannelFromProviderMap=e=>{this.providerMap.delete(e)},this.onmessage=e=>\"process-channel-connection\"===e.action&&(this.processChannelConnection(e),!0),this.providerMap=new Map,this.protocolManager=new Ft.ProtocolManager(\"node\"===this.wire.environment.type?[\"classic\"]:[\"rtc\",\"classic\"]),It(this,Ct,new Rt.MessageReceiver(e),\"f\"),It(this,bt,new Ot.RTCICEManager(e),\"f\"),e.registerMessageHandler(this.onmessage.bind(this))}createProvider(e,t){const n=Object.assign(this.wire.environment.getDefaultChannelOptions().create,e||{}),i=this.protocolManager.getProviderProtocols(n?.protocols),r=i.map((e=>{switch(e){case\"rtc\":return new _t.RTCStrategy;case\"classic\":return new Mt.ClassicStrategy(this.wire,Et(this,Ct,\"f\"),t.channelId,t);default:return(0,At.exhaustiveCheck)(e,[\"rtc\",\"classic\"])}}));let o;if(2===r.length){const[e,t]=r;o=jt.default.combine(e,t)}else{if(1!==r.length)throw new Error(\"failed to combine strategies\");[o]=r}const s=new St.ChannelProvider(t,(()=>St.ChannelProvider.wireClose(this.wire,t.channelName)),o),a=t.channelId;return this.providerMap.set(a,{provider:s,strategy:o,supportedProtocols:kt.getProtocolOptionsFromStrings(i)}),St.ChannelProvider.setProviderRemoval(s,this.removeChannelFromProviderMap.bind(this)),s}async createClientOffer(e){const t=this.protocolManager.getClientProtocols(e?.protocols);let n;return{offer:{supportedProtocols:await Promise.all(t.map((async e=>{switch(e){case\"rtc\":{const{rtcClient:e,channels:t,offer:i,rtcConnectionId:r,channelsOpened:o}=await Et(this,bt,\"f\").startClientOffer();return n={rtcClient:e,channels:t,channelsOpened:o},{type:\"rtc\",version:_t.RTCInfo.version,payload:{offer:i,rtcConnectionId:r}}}case\"classic\":return{type:\"classic\",version:Mt.ClassicInfo.version};default:return(0,At.exhaustiveCheck)(e,[\"rtc\",\"classic\"])}}))),maxProtocols:2},rtc:n}}async createClientStrategy(e,t){t.endpointId||(t.endpointId=this.wire.environment.getNextMessageId(),Et(this,Ct,\"f\").checkForPreviousClientConnection(t.channelId));const n=t.answer??{supportedProtocols:[{type:\"classic\",version:1}]},i=(await Promise.all(n.supportedProtocols.map((async n=>\"rtc\"===n.type&&e?(await Et(this,bt,\"f\").finishClientOffer(e.rtcClient,n.payload.answer,e.channelsOpened),new _t.RTCStrategy):\"classic\"===n.type?new Mt.ClassicStrategy(this.wire,Et(this,Ct,\"f\"),t.endpointId,t):null)))).filter((e=>null!==e));let r;if(e&&!i.some((e=>e instanceof _t.RTCStrategy))&&e&&e.rtcClient.close(),i.length>=2)r=jt.default.combine(i[0],i[1]);else{if(!i.length)throw new Error(\"No compatible protocols\");[r]=i}const o={endpointIdentity:t,rtc:e};return r.addEndpoint(t.channelId,o),r}async processChannelConnection(e){const{clientIdentity:t,providerIdentity:n,ackToSender:i,payload:r,offer:o}=e.payload;t.endpointId?t.isLocalEndpointId=!1:(t.endpointId=this.wire.environment.getNextMessageId(),t.isLocalEndpointId=!0);const s=n.channelId,a=this.providerMap.get(s);if(!a)return i.payload.success=!1,i.payload.reason=`Channel \"${n.channelName}\" has been destroyed.`,this.wire.sendRaw(i);const{provider:c,strategy:d,supportedProtocols:h}=a;try{if(!(c instanceof St.ChannelProvider))throw Error(\"Cannot connect to a channel client\");const e=o??{supportedProtocols:[{type:\"classic\",version:1}],maxProtocols:1},n=this.protocolManager.getCompatibleProtocols(h,e);if(!n.length)throw new Error(\"This provider does not support any of the offered protocols.\");const s=await c.processConnection(t,r);i.payload.payload=i.payload.payload||{};let a={supportedProtocols:[],endpointPayloadPromise:Promise.resolve({endpointIdentity:t})};return a=await n.reduce((async(e,t)=>{const n=await e;if(\"rtc\"===t.type){const{answer:e,rtcClient:i,channels:r}=await Et(this,bt,\"f\").createProviderAnswer(t.payload.rtcConnectionId,t.payload.offer);n.supportedProtocols.push({type:\"rtc\",version:_t.RTCInfo.version,payload:{answer:e}}),n.endpointPayloadPromise=n.endpointPayloadPromise.then((e=>r.then((t=>({...e,rtc:{rtcClient:i,channels:t}})))))}else n.supportedProtocols.push({type:\"classic\",version:Mt.ClassicInfo.version});return n}),Promise.resolve(a)),a.endpointPayloadPromise.then((e=>d.addEndpoint(t.endpointId,e))),i.payload.payload.result=s,i.payload.payload.answer=a,this.wire.sendRaw(i)}catch(e){return i.payload.success=!1,i.payload.reason=e.message,this.wire.sendRaw(i)}}}xe.ConnectionManager=kt,Ct=new WeakMap,bt=new WeakMap;var Lt,Tt,$t,Bt=s&&s.__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},Gt=s&&s.__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)};Object.defineProperty(le,\"__esModule\",{value:!0}),le.Channel=void 0;const Wt=t,Ht=G,Nt=d,Dt=ue,Ut=xe,Vt=Qe;function zt(e){const t=Math.floor(e/10),n=Math.min(3e4,500*2**t);return new Promise((e=>{setTimeout((()=>{e(!1)}),n)}))}class Kt extends Nt.EmitterBase{constructor(e){super(e,\"channel\"),Lt.set(this,void 0),Tt.set(this,new Wt.EventEmitter),$t.set(this,new Ht.AsyncRetryableLazy((async()=>{await Promise.all([this.on(\"disconnected\",(e=>{Dt.ChannelClient.handleProviderDisconnect(e)})),this.on(\"connected\",((...e)=>{Gt(this,Tt,\"f\").emit(\"connected\",...e)}))]).catch((()=>new Error(\"error setting up channel connection listeners\")))}))),Bt(this,Lt,new Ut.ConnectionManager(e),\"f\")}async getAllChannels(){return this.wire.sendAction(\"get-all-channels\").then((({payload:e})=>e.data))}async onChannelConnect(e){await this.on(\"connected\",e)}async onChannelDisconnect(e){await this.on(\"disconnected\",e)}async safeConnect(e,t,n){const i={count:0};do{let r=()=>{};const o=new Promise((t=>{r=n=>{e===n.channelName&&t(!0)},Gt(this,Tt,\"f\").on(\"connected\",r)}));try{if(i.count>0){i.gotConnectedEvent=await Promise.race([zt(i.count),o]);const t=await this.wire.sendAction(\"connect-to-channel\",{...n,retryInfo:i});return console.log(`Successfully connected to channelName: ${e}`),t.payload.data}const t=this.wire.sendAction(\"connect-to-channel\",n);i.originalMessageId=t.messageId;return(await t).payload.data}catch(n){if(!n.message.includes(\"internal-nack\"))throw n;t&&0===i.count&&console.warn(`No channel found for channelName: ${e}. Waiting for connection...`)}finally{i.count+=1,Gt(this,Tt,\"f\").removeListener(\"connected\",r)}}while(t);throw new Error(`No channel found for channelName: ${e}.`)}async connect(e,t={}){if(await Gt(this,$t,\"f\").getValue(),!e||\"string\"!=typeof e)throw new Error(\"Please provide a channelName string to connect to a channel.\");const n={wait:!0,...this.wire.environment.getDefaultChannelOptions().connect,...t},{offer:i,rtc:r}=await Gt(this,Lt,\"f\").createClientOffer(n);let o;(this.fin.me.isFrame||this.fin.me.isView||this.fin.me.isWindow)&&(o=(await this.fin.me.getInfo()).url);const s={channelName:e,...n,offer:i,connectionUrl:o},a=await this.safeConnect(e,n.wait,s),c=await Gt(this,Lt,\"f\").createClientStrategy(r,a),d=new Dt.ChannelClient(a,(()=>Dt.ChannelClient.wireClose(this.wire,a,a.endpointId)),c);return c.onEndpointDisconnect(a.channelId,(async()=>{try{await d.sendDisconnectAction()}catch(e){console.warn(`Something went wrong during disconnect for client with uuid: ${a.uuid} / name: ${a.name} / endpointId: ${a.endpointId}.`)}finally{Dt.ChannelClient.handleProviderDisconnect(a)}})),d}async create(e,t){if(!e)throw new Error(\"Please provide a channelName to create a channel\");const{payload:{data:n}}=await this.wire.sendAction(\"create-channel\",{channelName:e}),i=Gt(this,Lt,\"f\").createProvider(t,n);return this.on(\"client-disconnected\",(t=>{t.channelName===e&&Vt.ChannelProvider.handleClientDisconnection(i,t)})),i}}le.Channel=Kt,Lt=new WeakMap,Tt=new WeakMap,$t=new WeakMap,Object.defineProperty(de,\"__esModule\",{value:!0}),de.InterAppPayload=de.InterApplicationBus=void 0;const qt=t,Jt=d,Yt=he,Zt=le,Qt=O;class Xt extends Jt.Base{constructor(e){super(e),this.events={subscriberAdded:\"subscriber-added\",subscriberRemoved:\"subscriber-removed\"},this.refCounter=new Yt.RefCounter,this.Channel=new Zt.Channel(e),this.emitter=new qt.EventEmitter,e.registerMessageHandler(this.onmessage.bind(this)),this.on=this.emitter.on.bind(this.emitter),this.removeAllListeners=this.emitter.removeAllListeners.bind(this.emitter)}async publish(e,t){await this.wire.sendAction(\"publish-message\",{topic:e,message:t,sourceWindowName:this.me.name})}async send(e,t,n){const i=(0,Qt.validateIdentity)(e);if(i)throw new Error(i);await this.wire.sendAction(\"send-message\",{destinationUuid:e.uuid,destinationWindowName:e.name,topic:t,message:n,sourceWindowName:this.me.name})}subscribe(e,t,n){const i=this.createSubscriptionKey(e.uuid,e.name||\"*\",t);return this.emitter.on(i,n),this.refCounter.actOnFirst(i,(async()=>{await this.wire.sendAction(\"subscribe\",{sourceUuid:e.uuid,sourceWindowName:e.name||\"*\",topic:t,destinationWindowName:this.me.name})}),(()=>Promise.resolve()))}unsubscribe(e,t,n){const i=e.name||\"*\",r=this.createSubscriptionKey(e.uuid,i,t);return this.emitter.removeListener(r,n),this.refCounter.actOnLast(r,(async()=>{await this.wire.sendAction(\"unsubscribe\",{sourceUuid:e.uuid,sourceWindowName:i,topic:t,destinationWindowName:this.me.name})}),(()=>new Promise((e=>e)).then((()=>{}))))}processMessage(e){const{payload:{message:t,sourceWindowName:n,sourceUuid:i,topic:r}}=e,o=[this.createSubscriptionKey(i,n,r),this.createSubscriptionKey(i,\"*\",r),this.createSubscriptionKey(\"*\",\"*\",r)],s={uuid:i,name:n};o.forEach((e=>{this.emitter.emit(e,t,s)}))}emitSubscriverEvent(e,t){const{payload:{targetName:n,uuid:i,topic:r}}=t,o={name:n,uuid:i,topic:r};this.emitter.emit(e,o)}createSubscriptionKey(e,t,n){const i=t||\"*\";if(!(e&&i&&n))throw new Error(\"Missing uuid, name, or topic string\");return function(...e){return e.map((e=>Buffer.from(`${e}`).toString(\"base64\"))).join(\"/\")}(e,i,n)}onmessage(e){const{action:t}=e;switch(t){case\"process-message\":this.processMessage(e);break;case this.events.subscriberAdded:this.emitSubscriverEvent(this.events.subscriberAdded,e);break;case this.events.subscriberRemoved:this.emitSubscriverEvent(this.events.subscriberRemoved,e)}return!0}}de.InterApplicationBus=Xt;de.InterAppPayload=class{};var en={};Object.defineProperty(en,\"__esModule\",{value:!0}),en.Clipboard=void 0;const tn=d;class nn extends tn.Base{async writeText(e){await this.wire.sendAction(\"clipboard-write-text\",e)}async readText(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-text\",{type:e});return t.data}async writeImage(e){await this.wire.sendAction(\"clipboard-write-image\",e)}async readImage(e={format:\"dataURL\"}){const{payload:t}=await this.wire.sendAction(\"clipboard-read-image\",e);return t.data}async writeHtml(e){await this.wire.sendAction(\"clipboard-write-html\",e)}async readHtml(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-html\",{type:e});return t.data}async writeRtf(e){await this.wire.sendAction(\"clipboard-write-rtf\",e)}async readRtf(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-rtf\",{type:e});return t.data}async write(e){await this.wire.sendAction(\"clipboard-write\",e)}async getAvailableFormats(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-formats\",{type:e});return t.data}}en.Clipboard=nn;var rn={},on={},sn={};Object.defineProperty(sn,\"__esModule\",{value:!0}),sn.ExternalApplication=void 0;const an=d;class cn extends an.EmitterBase{constructor(e,t){super(e,\"external-application\",t.uuid),this.identity=t}getInfo(){return this.wire.sendAction(\"get-external-application-info\",this.identity).then((({payload:e})=>e.data))}}sn.ExternalApplication=cn,Object.defineProperty(on,\"__esModule\",{value:!0}),on.ExternalApplicationModule=void 0;const dn=d,hn=sn;class ln extends dn.Base{wrap(e){return this.wire.sendAction(\"external-application-wrap\").catch((e=>{})),Promise.resolve(new hn.ExternalApplication(this.wire,{uuid:e}))}wrapSync(e){return this.wire.sendAction(\"external-application-wrap-sync\").catch((e=>{})),new hn.ExternalApplication(this.wire,{uuid:e})}}on.ExternalApplicationModule=ln,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(on,e),n(sn,e)}(rn);var un={},pn={},wn={};Object.defineProperty(wn,\"__esModule\",{value:!0}),wn._Frame=void 0;const yn=d;class fn extends yn.EmitterBase{constructor(e,t){super(e,\"frame\",t.uuid,t.name),this.identity=t}getInfo(){return this.wire.sendAction(\"get-frame-info\",this.identity).then((({payload:e})=>e.data))}getParentWindow(){return this.wire.sendAction(\"get-parent-window\",this.identity).then((({payload:e})=>e.data))}}wn._Frame=fn,Object.defineProperty(pn,\"__esModule\",{value:!0}),pn._FrameModule=void 0;const gn=d,mn=O,vn=wn;class Cn extends gn.Base{async wrap(e){this.wire.sendAction(\"frame-wrap\").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}wrapSync(e){this.wire.sendAction(\"frame-wrap-sync\").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}getCurrent(){return this.wire.sendAction(\"frame-get-current\").catch((e=>{})),Promise.resolve(new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity()))}getCurrentSync(){return this.wire.sendAction(\"frame-get-current-sync\").catch((e=>{})),new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity())}}pn._FrameModule=Cn,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(pn,e),n(wn,e)}(un);var bn={};Object.defineProperty(bn,\"__esModule\",{value:!0}),bn.GlobalHotkey=void 0;const In=d;class En extends In.EmitterBase{constructor(e){super(e,\"global-hotkey\")}async register(e,t){await this.on(e,t),await this.wire.sendAction(\"global-hotkey-register\",{hotkey:e})}async unregister(e){await this.removeAllListeners(e),await this.wire.sendAction(\"global-hotkey-unregister\",{hotkey:e})}async unregisterAll(){await Promise.all(this.eventNames().filter((e=>!(\"registered\"===e||\"unregistered\"===e))).map((e=>this.removeAllListeners(e)))),await this.wire.sendAction(\"global-hotkey-unregister-all\",{})}async isRegistered(e){const{payload:{data:t}}=await this.wire.sendAction(\"global-hotkey-is-registered\",{hotkey:e});return t}}bn.GlobalHotkey=En;var xn,An={},Pn={},Mn={},_n=s&&s.__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)};Object.defineProperty(Mn,\"__esModule\",{value:!0}),Mn.Platform=void 0;const On=d,Sn=O,Rn=new Map;class Fn extends On.EmitterBase{constructor(e,t){super(t.wire,\"application\",e.uuid),this.getClient=e=>{this.wire.sendAction(\"platform-get-client\",this.identity).catch((e=>{}));const t=e||this.identity,{uuid:n}=t;if(!Rn.has(n)){const e=_n(this,xn,\"f\").call(this,n);Rn.set(n,e)}return Rn.get(n)},xn.set(this,(async e=>{try{const t=`custom-frame-${e}`,n=await this._channel.connect(t,{wait:!1});return n.onDisconnection((()=>{Rn.delete(e)})),n}catch(t){throw Rn.delete(e),new Error(\"The targeted Platform is not currently running. Listen for application-started event for the given Uuid.\")}})),this.launchLegacyManifest=this.launchContentManifest;const n=(0,Sn.validateIdentity)(e);if(n)throw new Error(n);this._channel=t,this.identity={uuid:e.uuid},this.Layout=this.fin.Platform.Layout,this.Application=this.fin.Application.wrapSync(this.identity)}async createView(e,t,n){this.wire.sendAction(\"platform-create-view\",this.identity).catch((e=>{}));const i=await this.getClient(),r=await i.dispatch(\"create-view\",{target:t,opts:e,targetView:n});if(!r||(0,Sn.validateIdentity)(r.identity))throw new Error(`When overwriting the createView call, please return an object that has a valid 'identity' property: ${JSON.stringify(r)}`);return this.fin.View.wrapSync(r.identity)}async createWindow(e){this.wire.sendAction(\"platform-create-window\",this.identity).catch((e=>{}));const t=await this.getClient();e.reason||(e.reason=\"api-call\");const n=await t.dispatch(\"create-view-container\",e);if(!n||(0,Sn.validateIdentity)(n.identity))throw new Error(`When overwriting the createWindow call, please return an object that has a valid 'identity' property: ${JSON.stringify(n)}`);const{identity:i}=n,r=this.fin.Window.wrapSync(i);return r.name=i.name,r.uuid=i.uuid,r}async quit(){this.wire.sendAction(\"platform-quit\",this.identity).catch((e=>{}));return(await this.getClient()).dispatch(\"quit\")}async closeView(e){this.wire.sendAction(\"platform-close-view\",this.identity).catch((e=>{}));const t=await this.getClient();await t.dispatch(\"close-view\",{view:e})}async reparentView(e,t){console.warn(\"Platform.reparentView has been deprecated, please use Platform.createView\"),this.wire.sendAction(\"platform-reparent-view\",this.identity).catch((e=>{}));const n={...e,uuid:e.uuid??this.identity.uuid},i=await this.fin.View.wrap(n),r=await i.getOptions();return this.createView(r,t)}async getSnapshot(){this.wire.sendAction(\"platform-get-snapshot\",this.identity).catch((e=>{}));return(await this.getClient()).dispatch(\"get-snapshot\")}async getViewSnapshot(e){return(await this.getClient()).dispatch(\"get-view-snapshot\",{viewIdentity:e})}async applySnapshot(e,t){this.wire.sendAction(\"platform-apply-snapshot\",this.identity).catch((e=>{}));const n=\"Requested snapshot must be a valid Snapshot object, or a url or filepath to such an object.\";let i;if(\"string\"==typeof e)try{i=(await this._channel.wire.sendAction(\"get-application-manifest\",{manifestUrl:e})).payload.data}catch(e){throw new Error(`${n}: ${e}`)}else i=e;if(!i.windows)throw new Error(n);const r=await this.getClient();return await r.dispatch(\"apply-snapshot\",{snapshot:i,options:t}),this}async fetchManifest(e){return(await this.getClient()).dispatch(\"platform-fetch-manifest\",{manifestUrl:e})}async launchContentManifest(e){this.wire.sendAction(\"platform-launch-content-manifest\",this.identity).catch((()=>{}));const t=await this.getClient(),n=await this.fetchManifest(e);return t.dispatch(\"launch-into-platform\",{manifest:n,manifestUrl:e}),this}async setWindowContext(e={},t){if(this.wire.sendAction(\"platform-set-window-context\",this.identity).catch((e=>{})),!e)throw new Error(\"Please provide a serializable object or string to set the context.\");const n=await this.getClient(),{entityType:i}=t?await this.fin.System.getEntityInfo(t.uuid,t.name):this.fin.me;await n.dispatch(\"set-window-context\",{context:e,entityType:i,target:t||{uuid:this.fin.me.uuid,name:this.fin.me.name}})}async getWindowContext(e){this.wire.sendAction(\"platform-get-window-context\",this.identity).catch((e=>{}));const t=await this.getClient(),{entityType:n}=e?await this.fin.System.getEntityInfo(e.uuid,e.name):this.fin.me;return t.dispatch(\"get-window-context\",{target:e||{uuid:this.fin.me.uuid,name:this.fin.me.name},entityType:n})}async closeWindow(e,t={skipBeforeUnload:!1}){this.wire.sendAction(\"platform-close-window\",this.identity).catch((e=>{}));return(await this.getClient()).dispatch(\"close-window\",{windowId:e,options:t})}}Mn.Platform=Fn,xn=new WeakMap;var jn={},kn={},Ln={},Tn={};function $n(e){switch(e){case\"columns\":case\"grid\":case\"rows\":case\"tabs\":return!0;default:return!1}}Object.defineProperty(Tn,\"__esModule\",{value:!0}),Tn.overrideFromComposables=Tn.isValidPresetType=void 0,Tn.isValidPresetType=$n,Tn.overrideFromComposables=function(...e){return t=>e.reduceRight(((e,t)=>n=>t(e(n))),(e=>e))(t)},Tn.default={isValidPresetType:$n};var Bn={},Gn={},Wn={};Object.defineProperty(Wn,\"__esModule\",{value:!0}),Wn.ApiConsumer=void 0;Wn.ApiConsumer=class{constructor(e){this.strategy=e,this.consume=async e=>(await this.strategy.getExposedFunctions(e)).reduce(((t,n)=>({...t,[n.key]:this.strategy.createFunction(n,e)})),{})}};var Hn={},Nn={};Object.defineProperty(Nn,\"__esModule\",{value:!0}),Nn.expose=Nn.getExposedProperties=void 0;const Dn=Symbol(\"exposedProperties\");Nn.getExposedProperties=e=>e[Dn]||e.prototype[Dn]||[];Nn.expose=e=>(t,n,i)=>{t[Dn]=t[Dn]||[],t[Dn].push({key:n,descriptor:i,options:e})},Object.defineProperty(Hn,\"__esModule\",{value:!0}),Hn.ApiExposer=void 0;const Un=Nn;Hn.ApiExposer=class{constructor(e){this.strategy=e,this.exposeInstance=async(e,t)=>{const n=(0,Un.getExposedProperties)(e),i=await Promise.all(n.map((async({key:n,options:i})=>({key:n,options:await this.strategy.exposeFunction(e[n].bind(e),{key:n,options:i,meta:t})}))));await this.strategy.exposeMeta(t,i)}}};var Vn={},zn={},Kn={};Object.defineProperty(Kn,\"__esModule\",{value:!0}),Kn.ChannelsConsumer=void 0;Kn.ChannelsConsumer=class{constructor(e){this.channel=e,this.getExposedFunctions=async e=>{const{id:t}=e,{props:n}=await this.channel.dispatch(`api-meta:${t}`);return n},this.createFunction=e=>(...t)=>{const{action:n}=e.options;return this.channel.dispatch(n,{args:t})}}};var qn={};Object.defineProperty(qn,\"__esModule\",{value:!0}),qn.ChannelsExposer=void 0;qn.ChannelsExposer=class{constructor(e){this.channelProviderOrClient=e,this.exposeFunction=async(e,t)=>{const{key:n,options:i,meta:r}=t,{id:o}=r,s=`${o}.${i?.action||n}`;return await this.channelProviderOrClient.register(s,(async({args:t})=>e(...t))),{action:s}},this.exposeMeta=async({id:e},t)=>{const n=`api-meta:${e}`;await this.channelProviderOrClient.register(n,(()=>({props:t})))}}},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Kn,e),n(qn,e)}(zn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(zn,e)}(Vn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Wn,e),n(Hn,e),n(Vn,e),n(Nn,e)}(Gn);var Jn={};Object.defineProperty(Jn,\"__esModule\",{value:!0}),Jn.createRelayedDispatch=exports.relayChannelClientApi_1=Jn.relayChannelClientApi=void 0;const Yn=[\"no longer connected\",\"RTCDataChannel closed unexpectedly\",\"The client you are trying to dispatch from is disconnected from the target provider\"];exports.relayChannelClientApi_1=Jn.relayChannelClientApi=async(e,t)=>{e.register(`relay:${t}`,(({action:t,target:n,payload:i})=>e.dispatch(n,t,i))),await Promise.resolve()};Jn.createRelayedDispatch=(e,t,n,i)=>async(r,o)=>{try{return await e.dispatch(`relay:${n}`,{action:r,payload:o,target:t})}catch(e){if(s=e.message,Yn.some((e=>s.includes(e)))&&i)throw new Error(i);throw e}var s};var Zn,Qn,Xn,ei=s&&s.__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},ti=s&&s.__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)};Object.defineProperty(Bn,\"__esModule\",{value:!0}),Bn.ColumnOrRow=Bn.TabStack=Bn.LayoutNode=void 0;const ni=Gn,ii=Jn;class ri{constructor(e,t){Zn.set(this,void 0),this.isRoot=()=>ti(this,Zn,\"f\").isRoot(this.entityId),this.exists=()=>ti(this,Zn,\"f\").exists(this.entityId),this.getParent=async()=>{const e=await ti(this,Zn,\"f\").getParent(this.entityId);if(e)return ri.getEntity(e,ti(this,Zn,\"f\"))},this.createAdjacentStack=async(e,t)=>{const n=await ti(this,Zn,\"f\").createAdjacentStack(this.entityId,e,t);return ri.getEntity({entityId:n,type:\"stack\"},ti(this,Zn,\"f\"))},this.getAdjacentStacks=async e=>(await ti(this,Zn,\"f\").getAdjacentStacks({targetId:this.entityId,edge:e})).map((e=>ri.getEntity({type:\"stack\",entityId:e.entityId},ti(this,Zn,\"f\")))),ei(this,Zn,e,\"f\"),this.entityId=t}}Bn.LayoutNode=ri,Zn=new WeakMap,ri.newLayoutEntitiesClient=async(e,t,n)=>{const i=(0,ii.createRelayedDispatch)(e,n,\"layout-relay\",\"You are trying to interact with a layout component on a window that does not exist or has been destroyed.\");return new ni.ApiConsumer(new ni.ChannelsConsumer({dispatch:i})).consume({id:t})},ri.getEntity=(e,t)=>{const{entityId:n,type:i}=e;switch(i){case\"column\":case\"row\":return new si(t,n,i);case\"stack\":return new oi(t,n);default:throw new Error(`Unrecognised Layout Entity encountered ('${JSON.stringify(e)})`)}};class oi extends ri{constructor(e,t){super(e,t),Qn.set(this,void 0),this.type=\"stack\",this.getViews=()=>ti(this,Qn,\"f\").getStackViews(this.entityId),this.addView=async(e,t={index:0})=>ti(this,Qn,\"f\").addViewToStack(this.entityId,e,t),this.removeView=async e=>{await ti(this,Qn,\"f\").removeViewFromStack(this.entityId,e)},this.setActiveView=async e=>{await ti(this,Qn,\"f\").setStackActiveView(this.entityId,e)},ei(this,Qn,e,\"f\")}}Bn.TabStack=oi,Qn=new WeakMap;class si extends ri{constructor(e,t,n){super(e,t),Xn.set(this,void 0),this.getContent=async()=>(await ti(this,Xn,\"f\").getContent(this.entityId)).map((e=>ri.getEntity(e,ti(this,Xn,\"f\")))),ei(this,Xn,e,\"f\"),this.type=n}}Bn.ColumnOrRow=si,Xn=new WeakMap;var ai={};Object.defineProperty(ai,\"__esModule\",{value:!0}),ai.DEFAULT_LAYOUT_KEY=ai.LAYOUT_CONTROLLER_ID=void 0,ai.LAYOUT_CONTROLLER_ID=\"layout-entities\",ai.DEFAULT_LAYOUT_KEY=\"__default__\";var ci,di,hi,li=s&&s.__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)};Object.defineProperty(Ln,\"__esModule\",{value:!0}),Ln.Layout=void 0;const ui=G,pi=O,wi=d,yi=Tn,fi=Bn,gi=ai;class mi extends wi.Base{static getClient(e){return li(e,di,\"f\").getValue()}constructor(e,t){super(t),ci.add(this),di.set(this,new ui.Lazy((async()=>fi.LayoutNode.newLayoutEntitiesClient(await this.platform.getClient(),gi.LAYOUT_CONTROLLER_ID,this.identity)))),this.replace=async e=>{this.wire.sendAction(\"layout-replace\").catch((e=>{}));const t=await this.platform.getClient();await t.dispatch(\"replace-layout\",{target:this.identity,opts:{layout:e}})},this.replaceView=async(e,t)=>{this.wire.sendAction(\"layout-replace-view\").catch((e=>{}));const n=await this.platform.getClient();await n.dispatch(\"replace-view\",{target:this.identity,opts:{viewToReplace:e,newView:t}})},this.applyPreset=async e=>{this.wire.sendAction(\"layout-apply-preset\").catch((e=>{}));const t=await this.platform.getClient(),{presetType:n}=e;if(!n||!(0,yi.isValidPresetType)(n))throw new Error(\"Cannot apply preset layout, please include an applicable presetType property in the PresetLayoutOptions.\");await t.dispatch(\"apply-preset-layout\",{target:this.identity,opts:{presetType:n}})};const n=(0,pi.validateIdentity)(e);if(n)throw new Error(n);this.identity=e,this.platform=this.fin.Platform.wrapSync({uuid:e.uuid}),e.uuid===this.fin.me.uuid&&e.name===this.fin.me.name&&(this.init=this.fin.Platform.Layout.init)}async getConfig(){this.wire.sendAction(\"layout-get-config\").catch((e=>{}));return(await this.platform.getClient()).dispatch(\"get-frame-snapshot\",{target:this.identity})}async getCurrentViews(){this.wire.sendAction(\"layout-get-views\").catch((e=>{}));const e=await this.platform.getClient();return(await e.dispatch(\"get-layout-views\",{target:this.identity})).map((e=>this.fin.View.wrapSync(e)))}async getRootItem(){this.wire.sendAction(\"layout-get-root-item\").catch((()=>{}));const e=await li(this,di,\"f\").getValue(),t=await e.getRoot(\"layoutName\"in this.identity?this.identity:void 0);return fi.LayoutNode.getEntity(t,e)}async getStackByViewIdentity(e){this.wire.sendAction(\"layout-get-stack-by-view\").catch((()=>{}));const t=await li(this,di,\"f\").getValue(),n=await t.getStackByView(e);if(!n)throw new Error(`No stack found for view: ${e.uuid}/${e.name}`);return fi.LayoutNode.getEntity(n,t)}async addView(e,{location:t,targetView:n}={}){this.wire.sendAction(\"layout-add-view\").catch((e=>{}));const{identity:i}=await li(this,ci,\"m\",hi).call(this,\"layout-add-view\",{viewOptions:e,location:t,targetView:n});return{identity:i}}async closeView(e){this.wire.sendAction(\"layout-close-view\").catch((e=>{})),await li(this,ci,\"m\",hi).call(this,\"layout-close-view\",{viewIdentity:e})}}Ln.Layout=mi,di=new WeakMap,ci=new WeakSet,hi=async function(e,t){return(await this.platform.getClient()).dispatch(e,{target:this.identity,opts:t})};var vi,Ci,bi,Ii,Ei,xi=s&&s.__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)},Ai=s&&s.__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};Object.defineProperty(kn,\"__esModule\",{value:!0}),kn.LayoutModule=void 0;const Pi=d,Mi=Ln,_i=ai;class Oi extends Pi.Base{constructor(){super(...arguments),vi.add(this),Ci.set(this,!1),bi.set(this,null),this.init=async(e={})=>{if(this.wire.sendAction(\"layout-init\").catch((e=>{})),!this.wire.environment.layoutAllowedInContext(this.fin))throw new Error(\"Layout.init can only be called from a Window context.\");if(xi(this,Ci,\"f\"))throw new Error(\"Layout.init was already called, please use Layout.create to add additional layouts.\");\"openfin\"===this.wire.environment.type&&await this.fin.Platform.getCurrentSync().getClient(),Ai(this,Ci,!0,\"f\"),Ai(this,bi,await this.wire.environment.initLayoutManager(this.fin,this.wire,e),\"f\"),await this.wire.environment.applyLayoutSnapshot(this.fin,xi(this,bi,\"f\"),e);const t={name:this.fin.me.name,uuid:this.fin.me.uuid};if(!e.layoutManagerOverride){const e={layoutName:_i.DEFAULT_LAYOUT_KEY,...t};return xi(this,Ii,\"f\").call(this,e)}return this.wrapSync(t)},Ii.set(this,(e=>{const t=\"[Layout] You are using a deprecated property `layoutManager` - it will throw if you access it starting in v37.\",n=new Proxy({},{get(e,n){throw console.warn(`[Layout-mgr-proxy] accessing ${n.toString()}`),new Error(t)}}),i=Object.assign(this.wrapSync(e),{layoutManager:n});return new Proxy(i,{get(e,n){if(\"layoutManager\"===n)throw console.warn(`[Layout-proxy] accessing ${n.toString()}`),new Error(t);return e[n]}})})),this.getCurrentLayoutManagerSync=()=>xi(this,vi,\"m\",Ei).call(this,\"fin.Platform.Layout.getCurrentLayoutManagerSync()\"),this.create=async e=>this.wire.environment.createLayout(xi(this,vi,\"m\",Ei).call(this,\"fin.Platform.Layout.create()\"),e),this.destroy=async e=>this.wire.environment.destroyLayout(xi(this,vi,\"m\",Ei).call(this,\"fin.Platform.Layout.destroy()\"),e)}async wrap(e){return this.wire.sendAction(\"layout-wrap\").catch((e=>{})),new Mi.Layout(e,this.wire)}wrapSync(e){return this.wire.sendAction(\"layout-wrap-sync\").catch((e=>{})),new Mi.Layout(e,this.wire)}async getCurrent(){if(this.wire.sendAction(\"layout-get-current\").catch((e=>{})),\"openfin\"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error(\"You are not in a Window context. Only Windows can have a Layout.\");const{uuid:e,name:t}=this.fin.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction(\"layout-get-current-sync\").catch((e=>{})),\"openfin\"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error(\"You are not in a Window context. Only Windows can have a Layout.\");const{uuid:e,name:t}=this.fin.me;return this.wrapSync({uuid:e,name:t})}async getLayoutByViewIdentity(e){this.wire.sendAction(\"layout-get-by-view-identity\").catch((()=>{}));let t=await this.wire.environment.getViewWindowIdentity(this.fin,e);t.identity&&(t=t.identity);try{const n=this.wrapSync(t),i=await Mi.Layout.getClient(n),r=await i.getLayoutIdentityForViewOrThrow(e);return this.wrapSync(r)}catch(n){if(![\"No action registered at target for\",\"getLayoutIdentityForViewOrThrow is not a function\"].some((e=>n.message.includes(e))))throw n;if(t.uuid===t.name)throw new Error(`View identity ${JSON.stringify(e)} is not attached to any layout in provider window ${JSON.stringify(t)}.`);return this.wrapSync(t)}}}kn.LayoutModule=Oi,Ci=new WeakMap,bi=new WeakMap,Ii=new WeakMap,vi=new WeakSet,Ei=function(e){if(!xi(this,bi,\"f\"))throw new Error(`You must call init before using the API ${e}`);return xi(this,bi,\"f\")},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(kn,e),n(Ln,e)}(jn),Object.defineProperty(Pn,\"__esModule\",{value:!0}),Pn.PlatformModule=void 0;const Si=d,Ri=Mn,Fi=jn;class ji extends Si.Base{constructor(e,t){super(e),this._channel=t,this.Layout=new Fi.LayoutModule(this.wire)}async init(e){if(!fin.__internal_.isPlatform||fin.me.name!==fin.me.uuid)throw new Error(\"fin.Platform.init should only be called from a custom platform provider running in the main window of the application.\");return this.wire.environment.initPlatform(this.fin,e)}async wrap(e){return this.wire.sendAction(\"platform-wrap\").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}wrapSync(e){return this.wire.sendAction(\"platform-wrap-sync\").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}async getCurrent(){return this.wire.sendAction(\"platform-get-current\").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction(\"platform-get-current-sync\").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}start(e){return this.wire.sendAction(\"platform-start\").catch((e=>{})),new Promise((async(t,n)=>{try{const{uuid:n}=e,i=await this.fin.Application._create({...e,isPlatformController:!0});i.once(\"platform-api-ready\",(()=>t(this.wrapSync({uuid:n})))),i._run({uuid:n})}catch(e){n(e)}}))}startFromManifest(e,t){return this.wire.sendAction(\"platform-start-from-manifest\").catch((e=>{})),new Promise((async(n,i)=>{try{const i=await this.fin.Application._createFromManifest(e);i.once(\"platform-api-ready\",(()=>n(this.wrapSync({uuid:i.identity.uuid})))),i._run(t)}catch(e){i(e)}}))}}Pn.PlatformModule=ji,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Pn,e),n(Mn,e)}(An);var ki={};!function(e){Object.defineProperty(e,\"__esModule\",{value:!0}),e.getMe=e.getBaseMe=e.environmentUnsupportedMessage=void 0;const t=J(),n=un,i=ie(),r=rn;function o(e,t,n){return{...{isView:\"view\"===e,isWindow:\"window\"===e,isFrame:\"iframe\"===e,isExternal:\"external connection\"===e},uuid:t,name:n,entityType:e}}e.environmentUnsupportedMessage=\"You are not running in OpenFin.\",e.getBaseMe=o,e.getMe=function(s){const{uuid:a,name:c,entityType:d}=s.me,h={setContext(){throw new Error(e.environmentUnsupportedMessage)},addContextHandler(){throw new Error(e.environmentUnsupportedMessage)},getContextGroups(){throw new Error(e.environmentUnsupportedMessage)},joinContextGroup(){throw new Error(e.environmentUnsupportedMessage)},removeFromContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getAllClientsInContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getInfoForContextGroup(){throw new Error(e.environmentUnsupportedMessage)}},l=\"Interop API has not been instantiated. Either connection has failed or you have not declared interop in your config.\",u={setContext(){throw new Error(l)},addContextHandler(){throw new Error(l)},getContextGroups(){throw new Error(l)},joinContextGroup(){throw new Error(l)},removeFromContextGroup(){throw new Error(l)},getAllClientsInContextGroup(){throw new Error(l)},getInfoForContextGroup(){throw new Error(l)}},p={eventNames:()=>{throw new Error(e.environmentUnsupportedMessage)},emit:()=>{throw new Error(e.environmentUnsupportedMessage)},listeners:()=>{throw new Error(e.environmentUnsupportedMessage)},listenerCount:()=>{throw new Error(e.environmentUnsupportedMessage)},on:()=>{throw new Error(e.environmentUnsupportedMessage)},addListener:()=>{throw new Error(e.environmentUnsupportedMessage)},once:()=>{throw new Error(e.environmentUnsupportedMessage)},prependListener:()=>{throw new Error(e.environmentUnsupportedMessage)},prependOnceListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeAllListeners:()=>{throw new Error(e.environmentUnsupportedMessage)}};switch(d){case\"view\":return Object.assign(new t.View(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case\"window\":return Object.assign(new i._Window(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case\"iframe\":return Object.assign(new n._Frame(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case\"external connection\":return Object.assign(new r.ExternalApplication(s,{uuid:a}),o(d,a,c),{interop:u,isOpenFin:!1});default:return{...o(d,a,c),...p,interop:h,isOpenFin:!1}}}}(ki);var Li={},Ti={},$i={};Object.defineProperty($i,\"__esModule\",{value:!0}),$i.createWarningObject=$i.createUnusableObject=void 0,$i.createUnusableObject=function(e){const t=()=>{throw new Error(e)};return new Proxy({},{apply:t,construct:t,defineProperty:t,deleteProperty:t,get:t,getOwnPropertyDescriptor:t,getPrototypeOf:t,has:t,isExtensible:t,ownKeys:t,preventExtensions:t,set:t,setPrototypeOf:t})},$i.createWarningObject=function(e,t){return new Proxy(t,{get:(...t)=>(console.warn(e),Reflect.get(...t)),set:(...t)=>(console.warn(e),Reflect.set(...t)),getOwnPropertyDescriptor:(...t)=>(console.warn(e),Reflect.getOwnPropertyDescriptor(...t)),ownKeys:(...t)=>(console.warn(e),Reflect.ownKeys(...t))})};var Bi,Gi={},Wi={};var Hi={};!function(e){Object.defineProperty(e,\"__esModule\",{value:!0}),e.wrapIntentHandler=e.BROKER_ERRORS=e.generateOverrideWarning=e.generateOverrideError=e.wrapContextHandler=e.wrapInTryCatch=e.generateId=void 0;e.generateId=()=>`${Math.random()}${Date.now()}`;e.wrapInTryCatch=(e,t)=>(...n)=>{try{return e(...n)}catch(e){throw new Error((t||\"\")+e)}};e.wrapContextHandler=(e,t)=>async n=>{try{await e(n)}catch(e){throw console.error(`Error thrown by handler ${t} for context type ${n.type}: ${e}`),e}};e.generateOverrideError=(e,t)=>`You have tried to to use ${e} but ${t} has not been overridden in the Interop Broker. Please override this function. Refer to our documentation for more info.`;e.generateOverrideWarning=(e,t,n,i)=>{const{uuid:r,name:o}=n;return i?`Entity with identity: ${r}/${o} has called ${i} or ${e} but ${t} has not been overridden.`:`Entity with identity: ${r}/${o} has called ${e} but ${t} has not been overridden.`},e.BROKER_ERRORS={fireIntent:(0,e.generateOverrideError)(\"fireIntent\",\"handleFiredIntent\"),fireIntentForContext:(0,e.generateOverrideError)(\"fireIntentForContext\",\"handleFiredIntentForContext\"),getInfoForIntent:(0,e.generateOverrideError)(\"getInfoForIntent\",\"handleInfoForIntent\"),getInfoForIntentsByContext:(0,e.generateOverrideError)(\"getInfoForIntentsByContext\",\"handleInfoForIntentsByContext\"),joinSessionContextGroupWithJoinContextGroup:\"The Context Group you have tried to join is a Session Context Group. Custom Context Groups can only be defined by the Interop Broker through code or manifest configuration. Please use joinSessionContextGroup.\",fdc3Open:(0,e.generateOverrideError)(\"fdc3.open\",\"fdc3HandleOpen\"),fdc3FindInstances:(0,e.generateOverrideError)(\"fdc3.findInstances\",\"fdc3HandleFindInstances\"),fdc3GetAppMetadata:(0,e.generateOverrideError)(\"fdc3.getAppMetadata\",\"fdc3HandleGetAppMetadata\"),fdc3GetInfo:(0,e.generateOverrideError)(\"fdc3.getInfo\",\"fdc3HandleGetInfo\")};e.wrapIntentHandler=(e,t)=>async n=>{try{return e(n)}catch(e){throw console.error(`Error thrown by handler ${t}: ${e}`),e}}}(Hi);var Ni,Di,Ui={};function Vi(){if(Di)return Gi;Di=1;var e,t,n,r=s&&s.__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},o=s&&s.__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)},a=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Gi,\"__esModule\",{value:!0}),Gi.InteropBroker=void 0;const c=d,h=a(function(){if(Bi)return Wi;Bi=1,Object.defineProperty(Wi,\"__esModule\",{value:!0});const e=Cr();return Wi.default=class{constructor(e,t){this.provider=e,this.id=t,this.lastContext=void 0,this.contextGroupMap=new Map,this.clients=new Map,this.registerListeners()}registerListeners(){this.provider.register(`sessionContextGroup:getContext-${this.id}`,this.getCurrentContext.bind(this)),this.provider.register(`sessionContextGroup:setContext-${this.id}`,this.setContext.bind(this)),this.provider.register(`sessionContextGroup:handlerAdded-${this.id}`,this.handlerAdded.bind(this)),this.provider.register(`sessionContextGroup:handlerRemoved-${this.id}`,this.handlerRemoved.bind(this))}getCurrentContext(e){return e.type?this.contextGroupMap.get(e.type):this.lastContext}setContext(t,n){const{context:i}=t,r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name} not in Session Client State Map`);this.contextGroupMap.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{e.contextHandlers.get(i.type)?.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getClientState(e){return this.clients.get(e.endpointId)}async handlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(i){const e=r.contextHandlers.get(i)||[];r.contextHandlers.set(i,[...e,n]);const o=this.contextGroupMap.get(i);o&&await this.provider.dispatch(t,n,o)}else{r.globalHandler=n;const e=[...this.contextGroupMap.keys()].map((async e=>{const i=this.contextGroupMap.get(e);i&&await this.provider.dispatch(t,n,i)}));await Promise.all(e)}}handlerRemoved(e,t){const{handlerId:n}=e,i=this.clients.get(t.endpointId);i?(Array.from(i.contextHandlers).forEach((([,e])=>{const t=e.indexOf(n);t>-1&&e.splice(t,1)})),i.globalHandler===n&&(i.globalHandler=void 0)):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={contextHandlers:new Map,clientIdentity:e,globalHandler:void 0};this.clients.set(e.endpointId,t)}}onDisconnection(e){this.clients.delete(e.endpointId)}},Wi}()),l=Hi,u=a(i),p=function(){if(Ni)return Ui;Ni=1,Object.defineProperty(Ui,\"__esModule\",{value:!0}),Ui.PrivateChannelProvider=void 0;const e=Vi();return Ui.PrivateChannelProvider=class t{constructor(e,t){this.provider=e,this.id=t,this.clients=new Map,this.registerListeners(),this.contextByContextType=new Map,this.lastContext=void 0,this.provider.onConnection((e=>this.registerNewClient(e))),this.provider.onDisconnection((async e=>{const{endpointId:t}=e;this.clients.has(t)&&await this.handleClientDisconnecting(e),0===(await this.provider.getAllClientInfo()).length&&this.provider.destroy()}))}getClientState(e){return this.clients.get(e.endpointId)}registerListeners(){this.provider.register(\"broadcast\",this.broadcast.bind(this)),this.provider.register(\"getCurrentContext\",this.getCurrentContext.bind(this)),this.provider.register(\"contextHandlerAdded\",this.contextHandlerAdded.bind(this)),this.provider.register(\"contextHandlerRemoved\",this.contextHandlerRemoved.bind(this)),this.provider.register(\"nonStandardHandlerRemoved\",this.nonStandardHandlerRemoved.bind(this)),this.provider.register(\"onAddContextHandlerAdded\",this.onAddContextHandlerAdded.bind(this)),this.provider.register(\"onDisconnectHandlerAdded\",this.onDisconnectHandlerAdded.bind(this)),this.provider.register(\"onUnsubscribeHandlerAdded\",this.onUnsubscribeHandlerAdded.bind(this)),this.provider.register(\"clientDisconnecting\",((e,t)=>{this.handleClientDisconnecting(t)}))}broadcast(t,n){const{context:i}=t;if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name}, tried to call broadcast, is not connected to this Private Channel`);const r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to broadcast - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);this.contextByContextType.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{const t=e.handlerIdsByContextTypes.get(i.type);t&&t.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getCurrentContext(e,t){const{contextType:n}=e;if(!this.getClientState(t))throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call getCurrentContext, is not connected to this Private Channel`);if(void 0!==n){return this.contextByContextType.get(n)||null}return this.lastContext?this.lastContext:null}contextHandlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call addContextListener, is not connected to this Private Channel`);if(i){const e=r.handlerIdsByContextTypes.get(i)||[];r.handlerIdsByContextTypes.set(i,[...e,n])}else r.globalHandler=n;Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&e.onAddContextListenerHandlerId&&this.provider.dispatch(e.clientIdentity,e.onAddContextListenerHandlerId,i)}))}async contextHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);if(i){let e;if(i.globalHandler===n)i.globalHandler=void 0;else for(const[t,r]of i.handlerIdsByContextTypes){const i=r.indexOf(n);i>-1&&(r.splice(i,1),e=t)}const r=(await this.getConnectedClients()).map((async n=>{const{clientIdentity:i,clientIdentity:{endpointId:r},onUnsubscribeHandlerId:o}=n;r!==t.endpointId&&o&&await this.provider.dispatch(i,o,e)}));try{await Promise.all(r)}catch(e){throw console.error(`Problem when attempting to dispatch to onUnsubscribeHandlers. Error: ${e} Removing Client: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}`),new Error(e)}}else console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}.`)}nonStandardHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);i?i.onDisconnectHandlerId===n?i.onDisconnectHandlerId=void 0:i.onAddContextListenerHandlerId===n?i.onAddContextListenerHandlerId=void 0:i.onUnsubscribeHandlerId===n&&(i.onUnsubscribeHandlerId=void 0):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}onAddContextHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onAddContextListener, is not connected to this Private Channel`);n.onAddContextListenerHandlerId=i,Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&Array.from(e.handlerIdsByContextTypes.keys()).forEach((e=>{this.provider.dispatch(t,i,e)}))}))}onDisconnectHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onDisconnect, is not connected to this Private Channel`);n.onDisconnectHandlerId=i}onUnsubscribeHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onUnsubscribe, is not connected to this Private Channel`);n.onUnsubscribeHandlerId=i}removeClient(e){const t=this.getClientState(e);if(!t)throw new Error(`Client with Identity: ${e.uuid} ${e.name}, tried to call disconnect, is not connected to this Private Channel`);t.handlerIdsByContextTypes.clear(),this.clients.delete(e.endpointId)}async fireOnDisconnectForOtherClients(e){const{endpointId:t}=e,n=(await this.getConnectedClients()).map((async e=>{const{clientIdentity:{endpointId:n},onDisconnectHandlerId:i}=e;n!==t&&i&&await this.provider.dispatch(e.clientIdentity,i)}));try{await Promise.all(n)}catch(t){throw console.error(`Problem when attempting to dispatch to onDisconnectHandlers. Error: ${t} Disconnecting Client: uuid: ${e.uuid}. name: ${e.name}. endpointId: ${e.endpointId}`),new Error(t)}}async unsubscribeAll(e){const{endpointId:t}=e,n=this.clients.get(t);if(n){const t=Array.from(n.handlerIdsByContextTypes.values()).flat(),i=n.globalHandler;if(t.length>0){const n=t.map((async t=>this.contextHandlerRemoved({handlerId:t},e)));try{await Promise.all(n)}catch(e){console.error(e.message)}}if(i)try{await this.contextHandlerRemoved({handlerId:i},e)}catch(e){console.error(e.message)}}}async handleClientDisconnecting(e){await this.unsubscribeAll(e),this.removeClient(e),await this.fireOnDisconnectForOtherClients(e)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={clientIdentity:e,handlerIdsByContextTypes:new Map,globalHandler:void 0,onAddContextListenerHandlerId:void 0,onUnsubscribeHandlerId:void 0,onDisconnectHandlerId:void 0};this.clients.set(e.endpointId,t)}}async getConnectedClients(){const e=await this.provider.getAllClientInfo();return Array.from(this.clients.values()).filter((t=>{const{uuid:n,name:i}=t.clientIdentity;return e.some((e=>i===e.name&&n===e.uuid))}))}static init(e,n){return new t(e,n)}},Ui}(),w=G,y=[{id:\"green\",displayMetadata:{color:\"#00CC88\",name:\"green\"}},{id:\"purple\",displayMetadata:{color:\"#8C61FF\",name:\"purple\"}},{id:\"orange\",displayMetadata:{color:\"#FF8C4C\",name:\"orange\"}},{id:\"red\",displayMetadata:{color:\"#FF5E60\",name:\"red\"}},{id:\"pink\",displayMetadata:{color:\"#FF8FB8\",name:\"pink\"}},{id:\"yellow\",displayMetadata:{color:\"#E9FF8F\",name:\"yellow\"}}];let f=class i extends c.Base{constructor(i,s,a){super(i),e.set(this,void 0),t.set(this,void 0),n.set(this,void 0),this.getProvider=()=>o(this,n,\"f\").getValue(),this.interopClients=new Map,this.contextGroupsById=new Map,r(this,t,a.contextGroups??[...y],\"f\"),r(this,e,a.fdc3Info,\"f\"),a?.logging&&(this.logging=a.logging),this.intentClientMap=new Map,this.lastContextMap=new Map,this.sessionContextGroupMap=new Map,r(this,n,new w.Lazy(s),\"f\"),this.setContextGroupMap(),this.setupChannelProvider()}static createClosedConstructor(...e){return class extends i{constructor(...t){if(t.length){const[n,i,r]=t;if(r&&\"object\"==typeof r&&!(0,u.default)(r,e[2]))return console.warn(\"You have modified the parameters of the InteropOverride constructor. This behavior is deprecated and will be removed in a future version. You can modify these options in your manifest. Please consult our Interop docs for guidance on migrating to the new override scheme.\"),void super(e[0],e[1],r);console.warn(\"You are attempting to pass arguments to the InteropOverride constructor. This is not necessary, and these passed arguments will be ignored. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.\")}super(...e)}}}setContext({context:e},t){this.wire.sendAction(\"interop-broker-set-context\").catch((e=>{}));const n=this.getClientState(t);if(!n||!n.contextGroupId)throw n?new Error(\"You must join a context group before you can set context.\"):new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);{const{contextGroupId:t}=n;this.setContextForGroup({context:e},t)}}setContextForGroup({context:e},t){this.wire.sendAction(\"interop-broker-set-context-for-group\").catch((e=>{}));const n=this.contextGroupsById.get(t);if(!n)throw new Error(`Unable to set context for context group that isn't in the context group mapping: ${t}.`);const r=i.checkContextIntegrity(e);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(e)}`);const o=e.type;n.set(o,e),this.lastContextMap.set(t,o);Array.from(this.interopClients.values()).filter((e=>e.contextGroupId===t)).forEach((t=>{for(const[,n]of t.contextHandlers)i.isContextTypeCompatible(o,n.contextType)&&this.invokeContextHandler(t.clientIdentity,n.handlerId,e)}))}getCurrentContext(e,t){this.wire.sendAction(\"interop-broker-get-current-context\").catch((e=>{}));const n=this.getClientState(t);if(!n?.contextGroupId)throw new Error(\"You must be a member of a context group to call getCurrentContext\");const{contextGroupId:i}=n,r=this.contextGroupsById.get(i),o=this.lastContextMap.get(i),s=e?.contextType??o;return r&&s?r.get(s):void 0}async joinContextGroup({contextGroupId:e,target:t},n){if(this.wire.sendAction(\"interop-broker-join-context-group\").catch((e=>{})),this.sessionContextGroupMap.has(e))throw new Error(l.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup);if(t){i.hasEndpointId(t)&&await this.addClientToContextGroup({contextGroupId:e},t);try{const n=this.channel.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name));if(!n.length)throw new Error(`Given Identity ${t.uuid} ${t.name} is not connected to the Interop Broker.`);n.length>1&&console.warn(`More than one connection found for identity ${t.uuid} ${t.name}`);const i=[];for(const t of n)i.push(this.addClientToContextGroup({contextGroupId:e},t));await Promise.all(i)}catch(e){throw new Error(e)}}else await this.addClientToContextGroup({contextGroupId:e},n)}async addClientToContextGroup({contextGroupId:e},t){this.wire.sendAction(\"interop-broker-add-client-to-context-group\").catch((e=>{}));const n=this.getClientState(t);if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(!this.getContextGroups().find((t=>t.id===e)))throw new Error(`Attempting to join a context group that does not exist: ${e}. You may only join existing context groups.`);if(n.contextGroupId!==e){n.contextGroupId=e,await this.setCurrentContextGroupInClientOptions(t,e);const i=this.contextGroupsById.get(e);for(const[,e]of n.contextHandlers){const{contextType:n,handlerId:r}=e;if(void 0===n)i.forEach(((e,n)=>{this.invokeContextHandler(t,r,e)}));else if(i.has(n)){const e=i.get(n);e&&this.invokeContextHandler(t,r,e)}}}}async removeFromContextGroup({target:e},t){if(this.wire.sendAction(\"interop-broker-remove-from-context-group\").catch((e=>{})),e){i.hasEndpointId(e)&&await this.removeClientFromContextGroup(e);try{const t=this.channel.connections.filter((t=>t.uuid===e.uuid&&t.name===e.name));if(!t.length)throw new Error(`No connection found for given Identity ${e.uuid} ${e.name}`);t.length>1&&console.warn(`More than one connection found for identity ${e.uuid} ${e.name}`);const n=[];for(const e of t)n.push(this.removeClientFromContextGroup(e));await Promise.all(n)}catch(e){throw new Error(e)}}else await this.removeClientFromContextGroup(t)}async removeClientFromContextGroup(e){this.wire.sendAction(\"interop-broker-remove-client-from-context-group\").catch((e=>{}));const t=this.getClientState(e);t&&(t.contextGroupId=void 0),await this.setCurrentContextGroupInClientOptions(e,null)}getContextGroups(){return this.wire.sendAction(\"interop-broker-get-context-groups\").catch((e=>{})),o(this,t,\"f\").map((e=>({...e})))}getInfoForContextGroup({contextGroupId:e}){return this.wire.sendAction(\"interop-broker-get-info-for-context-group\").catch((e=>{})),this.getContextGroups().find((t=>t.id===e))}getAllClientsInContextGroup({contextGroupId:e}){this.wire.sendAction(\"interop-broker-get-all-clients-in-context-group\").catch((e=>{}));return Array.from(this.interopClients.values()).filter((t=>t.contextGroupId===e)).map((e=>e.clientIdentity))}async handleFiredIntent(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.raiseIntent\",\"InteropBroker.handleFiredIntent\",t,\"interopClient.fireIntent\");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntent)}async setIntentTarget(e,t){this.wire.sendAction(\"interop-broker-set-intent-target\").catch((e=>{}));const n=this.intentClientMap.get(t.name),i=`intent-handler-${e.name}`;if(n){const t=n.get(i);if(t){if(t.pendingIntents.push(e),t.clientIdentity&&t.isReady){const{clientIdentity:e,pendingIntents:n}=t;try{const r=n[n.length-1];await this.invokeIntentHandler(e,i,r),t.pendingIntents=[]}catch(n){console.error(`Error invoking intent handler for client ${e.uuid}/${e.name}/${e.endpointId}`),t.isReady=!1}}}else n.set(i,{isReady:!1,pendingIntents:[e]})}else{this.intentClientMap.set(t.name,new Map);const n=this.intentClientMap.get(t.name);n&&n.set(i,{isReady:!1,pendingIntents:[e]})}}async handleInfoForIntent(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.findIntent\",\"InteropBroker.handleInfoForIntent\",t,\"interopClient.getInfoForIntent\");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntent)}async handleInfoForIntentsByContext(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.findIntentsByContext\",\"InteropBroker.handleInfoForIntentsByContext\",t,\"interopClient.getInfoForIntentsByContext\");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntentsByContext)}async handleFiredIntentForContext(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.raiseIntentForContext\",\"InteropBroker.handleFiredIntentForContext\",t,\"interopClient.fireIntentForContext\");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntentForContext)}async clientDisconnected(e){}async fdc3HandleOpen({app:e,context:t},n){const i=(0,l.generateOverrideWarning)(\"fdc3.open\",\"InteropBroker.fdc3HandleOpen\",n);throw console.warn(i),new Error(l.BROKER_ERRORS.fdc3Open)}async fdc3HandleFindInstances(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.open\",\"InteropBroker.fdc3HandleFindInstances\",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3FindInstances)}async fdc3HandleGetAppMetadata(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.getAppMetadata\",\"InteropBroker.fdc3HandleGetAppMetadata\",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3GetAppMetadata)}async invokeContextHandler(e,t,n){const i=await this.getProvider();try{await i.dispatch(e,t,n)}catch(i){console.error(`Error invoking context handler ${t} for context type ${n.type} in client ${e.uuid}/${e.name}/${e.endpointId}`,i)}}async invokeIntentHandler(e,t,n){const i=await this.getProvider();await i.dispatch(e,t,n)}async fdc3HandleGetInfo(t,n){const{fdc3Version:i}=t;return{fdc3Version:i,...o(this,e,\"f\"),optionalFeatures:{OriginatingAppMetadata:!1,UserChannelMembershipAPIs:!0},appMetadata:{appId:\"\",instanceId:\"\"}}}async getAllClientInfo(){return(await this.getProvider()).getAllClientInfo()}decorateSnapshot(e){return{...e,interopSnapshotDetails:{contextGroupStates:this.getContextGroupStates()}}}applySnapshot(e,t){const n=e?.interopSnapshotDetails?.contextGroupStates;n&&(t?.closeExistingWindows||this.updateExistingClients(n),this.rehydrateContextGroupStates(n))}updateExistingClients(e){this.interopClients.forEach((t=>{const{clientIdentity:n,contextGroupId:r,contextHandlers:o}=t;if(r){const t=e[r];for(const[,e]of Object.entries(t))o.forEach((t=>{const{handlerId:r,contextType:o}=t;i.isContextTypeCompatible(e.type,o)&&this.invokeContextHandler(n,r,e)}))}}))}getContextGroupStates(){return i.toObject(this.contextGroupsById)}rehydrateContextGroupStates(e){const t=Object.entries(e);for(const[e,n]of t){const t=Object.entries(n);for(const[n,i]of t)if(this.contextGroupsById.has(e)){this.contextGroupsById.get(e).set(n,i)}else console.warn(`Attempting to set a context group that isn't in the context group mapping. Skipping context group rehydration for: ${e}`)}}contextHandlerRegistered({contextType:e,handlerId:t},n){const i={contextType:e,handlerId:t},r=this.getClientState(n);if(r?.contextHandlers.set(t,i),r&&r.contextGroupId){const{contextGroupId:i}=r,o=this.contextGroupsById.get(i);if(void 0===e)o.forEach(((e,i)=>{this.invokeContextHandler(n,t,e)}));else if(o.has(e)){const i=o.get(e);i&&this.invokeContextHandler(n,t,i)}}}async intentHandlerRegistered(e,t){const{handlerId:n}=e,i=this.intentClientMap.get(t.name),r=i?.get(n);if(i)if(r){const{pendingIntents:e}=r;r.clientIdentity=t,r.isReady=!0;try{if(e.length>0){const i=e[e.length-1];await this.invokeIntentHandler(t,n,i),r.pendingIntents=[]}}catch(e){console.error(`Error invoking intent handler: ${n} for client ${t.uuid}/${t.name}/${t.endpointId}`)}}else i.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t});else{this.intentClientMap.set(t.name,new Map);const e=this.intentClientMap.get(t.name);e&&e.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t})}}removeContextHandler({handlerId:e},t){const n=this.getClientState(t);n&&n.contextHandlers.delete(e)}handleJoinSessionContextGroup({sessionContextGroupId:e},t){try{if(!e)throw new Error(\"Failed to join session context group: must specify group id.\");const n=this.sessionContextGroupMap.get(e);if(n)n.registerNewClient(t);else{const n=new h.default(this.channel,e);n.registerNewClient(t),this.sessionContextGroupMap.set(e,n)}return{hasConflict:this.contextGroupsById.has(e)}}catch(e){throw new Error(e)}}getClientState(e){return this.interopClients.get(e.endpointId)}static toObject(e){const t=Object.fromEntries(e),n={};return Object.entries(t).forEach((([e,t])=>{const i=Object.fromEntries(t);n[e]=i})),n}static checkContextIntegrity(e){if(!e)return{isValid:!1,reason:\"No context supplied\"};if(\"object\"!=typeof e)return{isValid:!1,reason:\"Context must be an Object\"};if(!e.type)return{isValid:!1,reason:\"Context must have a type property\"};if(e.id&&\"object\"!=typeof e.id)return{isValid:!1,reason:\"Context id must be an Object populated with key-value identifiers (if set)\"};if(e.id){const{id:t}=e,n=Object.keys(t);let i=!1;if(!n.length)return{isValid:!1,reason:\"Context id must have at least one key-value identifier\"};if(n.forEach((e=>{\"string\"==typeof e&&\"string\"==typeof t[e]||(i=!0)})),i)return{isValid:!1,reason:\"Context id key-value identifiers must be of type string\"}}return e.name&&\"string\"!=typeof e.name?{isValid:!1,reason:\"Context name must be of string type (if set)\"}:{isValid:!0}}static hasEndpointId(e){return void 0!==e.endpointId}static isContextTypeCompatible(e,t){return void 0===t||e===t}setContextGroupMap(){for(const e of this.getContextGroups())this.contextGroupsById.set(e.id,new Map)}async setCurrentContextGroupInClientOptions(e,t){try{const n=await this.fin.System.getEntityInfo(e.uuid,e.name);let i;\"view\"===n.entityType?i=await this.fin.View.wrap(e):\"window\"===n.entityType&&(i=await this.fin.Window.wrap(e)),i&&await i.updateOptions({interop:{currentContextGroup:t}})}catch(e){}}async setupChannelProvider(){try{const e=await this.getProvider();this.channel=e,this.wireChannel(e)}catch(e){throw new Error(`Error setting up Interop Broker Channel Provider: ${e}`)}}wireChannel(e){e.onConnection((async(e,t)=>{if(!await this.isConnectionAuthorized(e,t))throw new Error(`Connection not authorized for ${e.uuid}, ${e.name}`);if(!e.endpointId)throw new Error(\"Version too old to be compatible with Interop. Please upgrade your runtime to a more recent version.\");const n={contextGroupId:void 0,contextHandlers:new Map,clientIdentity:e};t?.currentContextGroup&&this.contextGroupsById.has(t.currentContextGroup)&&(n.contextGroupId=t?.currentContextGroup),this.interopClients.set(e.endpointId,n)})),e.onDisconnection((e=>{this.interopClients.delete(e.endpointId);const t=this.intentClientMap.get(e.name);t&&e.uuid===this.fin.me.uuid&&t.forEach((e=>{e.isReady=!1})),this.sessionContextGroupMap.forEach((t=>{t.onDisconnection(e)})),this.clientDisconnected(e)})),e.beforeAction((async(e,t,n)=>{if(!await this.isActionAuthorized(e,t,n))throw new Error(`Action (${e}) not authorized for ${n.uuid}, ${n.name}`);this.logging?.beforeAction?.enabled&&console.log(e,t,n)})),e.afterAction(((e,t,n)=>{this.logging?.afterAction?.enabled&&console.log(e,t,n)})),e.register(\"setContext\",this.setContext.bind(this)),e.register(\"fireIntent\",this.handleFiredIntent.bind(this)),e.register(\"getCurrentContext\",this.getCurrentContext.bind(this)),e.register(\"getInfoForIntent\",this.handleInfoForIntent.bind(this)),e.register(\"getInfoForIntentsByContext\",this.handleInfoForIntentsByContext.bind(this)),e.register(\"fireIntentForContext\",this.handleFiredIntentForContext.bind(this)),e.register(\"getContextGroups\",this.getContextGroups.bind(this)),e.register(\"joinContextGroup\",this.joinContextGroup.bind(this)),e.register(\"removeFromContextGroup\",this.removeFromContextGroup.bind(this)),e.register(\"getAllClientsInContextGroup\",this.getAllClientsInContextGroup.bind(this)),e.register(\"getInfoForContextGroup\",this.getInfoForContextGroup.bind(this)),e.register(\"contextHandlerRegistered\",this.contextHandlerRegistered.bind(this)),e.register(\"intentHandlerRegistered\",this.intentHandlerRegistered.bind(this)),e.register(\"removeContextHandler\",this.removeContextHandler.bind(this)),e.register(\"sessionContextGroup:createIfNeeded\",this.handleJoinSessionContextGroup.bind(this)),e.register(\"fdc3Open\",this.fdc3HandleOpen.bind(this)),e.register(\"fdc3v2FindIntentsByContext\",this.handleInfoForIntentsByContext.bind(this)),e.register(\"fdc3FindInstances\",this.fdc3HandleFindInstances.bind(this)),e.register(\"fdc3GetAppMetadata\",this.fdc3HandleGetAppMetadata.bind(this)),e.register(\"fdc3v2GetInfo\",(async(e,t)=>this.fdc3HandleGetInfo.bind(this)(e,t))),e.register(\"createPrivateChannelProvider\",(async e=>{const{channelId:t}=e,n=await this.fin.InterApplicationBus.Channel.create(t);p.PrivateChannelProvider.init(n,t)}))}isConnectionAuthorized(e,t){return this.wire.sendAction(\"interop-broker-is-connection-authorized\").catch((e=>{})),Promise.resolve(!0)}isActionAuthorized(e,t,n){return this.wire.sendAction(\"interop-broker-is-action-authorized\").catch((e=>{})),Promise.resolve(!0)}};return Gi.InteropBroker=f,e=new WeakMap,t=new WeakMap,n=new WeakMap,Gi}var zi,Ki={},qi={},Ji=s&&s.__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},Yi=s&&s.__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)};Object.defineProperty(qi,\"__esModule\",{value:!0});const Zi=d,Qi=Hi;class Xi extends Zi.Base{constructor(e,t,n){super(e),zi.set(this,void 0),this.id=n,Ji(this,zi,t,\"f\")}async setContext(e){this.wire.sendAction(\"interop-session-context-group-set-context\").catch((e=>{}));return(await Yi(this,zi,\"f\")).dispatch(`sessionContextGroup:setContext-${this.id}`,{sessionContextGroupId:this.id,context:e})}async getCurrentContext(e){this.wire.sendAction(\"interop-session-context-group-get-context\").catch((e=>{}));return(await Yi(this,zi,\"f\")).dispatch(`sessionContextGroup:getContext-${this.id}`,{sessionContextGroupId:this.id,type:e})}async addContextHandler(e,t){if(this.wire.sendAction(\"interop-session-context-group-add-handler\").catch((e=>{})),\"function\"!=typeof e)throw new Error(\"Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.\");const n=await Yi(this,zi,\"f\");let i;return i=t?`sessionContextHandler:invoke-${this.id}-${t}-${(0,Qi.generateId)()}`:`sessionContextHandler:invoke-${this.id}`,n.register(i,(0,Qi.wrapContextHandler)(e,i)),await n.dispatch(`sessionContextGroup:handlerAdded-${this.id}`,{handlerId:i,contextType:t}),{unsubscribe:await this.createUnsubscribeCb(i)}}async createUnsubscribeCb(e){const t=await Yi(this,zi,\"f\");return async()=>{t.remove(e),await t.dispatch(`sessionContextGroup:handlerRemoved-${this.id}`,{handlerId:e})}}getUserInstance(){return{id:this.id,setContext:(0,Qi.wrapInTryCatch)(this.setContext.bind(this),\"Failed to set context: \"),getCurrentContext:(0,Qi.wrapInTryCatch)(this.getCurrentContext.bind(this),\"Failed to get context: \"),addContextHandler:(0,Qi.wrapInTryCatch)(this.addContextHandler.bind(this),\"Failed to add context handler: \")}}}qi.default=Xi,zi=new WeakMap;var er={},tr={},nr={},ir={},rr=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),or=s&&s.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,\"default\",{enumerable:!0,value:t})}:function(e,t){e.default=t}),sr=s&&s.__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)&&rr(t,e,n);return or(t,e),t};Object.defineProperty(ir,\"__esModule\",{value:!0}),ir.PrivateChannelClient=void 0;const ar=sr(Hi);var cr,dr;function hr(){if(cr)return tr;cr=1;var e,t=s&&s.__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)},n=s&&s.__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},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(tr,\"__esModule\",{value:!0}),tr.FDC3ModuleBase=void 0;const o=nr,a=Hi,c=wr(),d=r(i);return tr.FDC3ModuleBase=class{get client(){return t(this,e,\"f\").call(this)}get fin(){return this.wire.getFin()}constructor(t,i){this.wire=i,e.set(this,void 0),n(this,e,t,\"f\")}async broadcast(e){return this.wire.sendAction(\"fdc3-broadcast\").catch((e=>{})),this.client.setContext(e)}async _open(e,t){this.wire.sendAction(\"fdc3-open\").catch((e=>{}));try{return await c.InteropClient.ferryFdc3Call(this.client,\"fdc3Open\",{app:e,context:t})}catch(e){const t=e.message===a.BROKER_ERRORS.fdc3Open?\"ResolverUnavailable\":e.message;throw new Error(t)}}async _getChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:\"system\",...(0,o.getUnsupportedChannelApis)()})))}async getOrCreateChannel(e){this.wire.sendAction(\"fdc3-get-or-create-channel\").catch((e=>{}));const t=(await this._getChannels()).find((t=>t.id===e));if(t)return{...t,type:\"system\",...(0,o.getUnsupportedChannelApis)()};try{const t=await this.client.joinSessionContextGroup(e);return(0,o.buildAppChannelObject)(t)}catch(e){throw console.error(e.message),new Error(o.ChannelError.CreationFailed)}}async getSystemChannels(){return this.wire.sendAction(\"fdc3-get-system-channels\").catch((e=>{})),this._getChannels()}async joinChannel(e){this.wire.sendAction(\"fdc3-join-channel\").catch((e=>{}));try{return await this.client.joinContextGroup(e)}catch(e){if(e.message===a.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup?console.error(\"The Channel you have tried to join is an App Channel. Custom Channels can only be defined by the Interop Broker through code or manifest configuration. Please use getOrCreateChannel.\"):console.error(e.message),e.message.startsWith(\"Attempting to join a context group that does not exist\"))throw new Error(o.ChannelError.NoChannelFound);throw new Error(o.ChannelError.AccessDenied)}}async getCurrentChannel(){this.wire.sendAction(\"fdc3-get-current-channel\").catch((e=>{}));const e=await this.getCurrentContextGroupInfo();return e?this.buildChannelObject(e):null}async leaveCurrentChannel(){return this.wire.sendAction(\"fdc3-leave-current-channel\").catch((e=>{})),this.client.removeFromContextGroup()}async getCurrentContextGroupInfo(){const e=await this.client.getContextGroups(),t=e.map((async e=>this.client.getAllClientsInContextGroup(e.id))),n=(await Promise.all(t)).findIndex((e=>e.some((e=>{const{uuid:t,name:n}=e;return this.wire.me.uuid===t&&this.wire.me.name===n}))));return e[n]}async buildChannelObject(e){return{...e,type:\"system\",addContextListener:(...[e,t])=>{let n,i;\"function\"==typeof e?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),n=e):(n=t,\"string\"==typeof e&&(i=e));const r=(async()=>{let e=!0;const t=await this.client.getCurrentContext(i);return this.client.addContextHandler(((i,r)=>{if(!e||(e=!1,!(0,d.default)(t,i)))return n(i,r)}),i)})();return{...r,unsubscribe:()=>r.then((e=>e.unsubscribe()))}},broadcast:this.broadcast.bind(this),getCurrentContext:async e=>{const t=await this.client.getCurrentContext(e);return void 0===t?null:t}}}},e=new WeakMap,tr}ir.PrivateChannelClient=class{constructor(e,t){this.id=t,this.client=e,this.listeners=new Map}async broadcast(e){return this.client.dispatch(\"broadcast\",{context:e})}async getCurrentContext(e){return this.client.dispatch(\"getCurrentContext\",{contextType:e})}async addContextListener(e,t){if(\"function\"!=typeof t)throw new Error(\"Non-function argument passed to the second parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.\");let n;n=e?`contextHandler:invoke-${this.id}-${e}-${ar.generateId()}`:`contextHandler:invoke-${this.id}-${ar.generateId()}`,this.client.register(n,ar.wrapContextHandler(t,n));const i={unsubscribe:await this.createContextUnsubscribeCb(n)};return this.listeners.set(n,i),await this.client.dispatch(\"contextHandlerAdded\",{handlerId:n,contextType:e}),i}createNonStandardUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch(\"nonStandardHandlerRemoved\",{handlerId:e})}}createContextUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch(\"contextHandlerRemoved\",{handlerId:e})}}onAddContextListener(e){const t=`onContextHandlerAdded:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch(\"onAddContextHandlerAdded\",{handlerId:t}),n}onDisconnect(e){const t=`onDisconnect:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch(\"onDisconnectHandlerAdded\",{handlerId:t}),n}onUnsubscribe(e){const t=`onUnsubscribe:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch(\"onUnsubscribeHandlerAdded\",{handlerId:t}),n}async cleanUpAllSubs(){Array.from(this.listeners.keys()).forEach((e=>{this.client.remove(e),this.listeners.delete(e)}))}async disconnect(){try{await this.client.dispatch(\"clientDisconnecting\"),await this.cleanUpAllSubs(),await this.client.disconnect()}catch(e){throw new Error(e.message)}}},function(e){var t=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,\"__esModule\",{value:!0}),e.getIntentResolution=e.isChannel=e.isContext=e.connectPrivateChannel=e.buildAppChannelObject=e.buildPrivateChannelObject=e.ChannelError=e.ResultError=e.UnsupportedChannelApiError=e.getUnsupportedChannelApis=void 0;const n=Hi,r=ir,o=t(i);e.getUnsupportedChannelApis=e=>({addContextListener:()=>{throw new a(\"Channel.addContextListener\",e)},broadcast:()=>{throw new a(\"Channel.broadcast\",e)},getCurrentContext:()=>{throw new a(\"Channel.getCurrentContext\",e)}});class a extends Error{constructor(e,t=\"System\"){super(e),this.message=`Calling ${e} on an instance of a ${t} Channel returned by fdc3.get${t}Channels is not supported. If you would like to use a ${t} Channel, please use fdc3.joinChannel, fdc3.addContextListener, and fdc3.broadcast instead.`}}var c,d;e.UnsupportedChannelApiError=a,function(e){e.NoResultReturned=\"NoResultReturned\",e.IntentHandlerRejected=\"IntentHandlerRejected\"}(c=e.ResultError||(e.ResultError={})),(d=e.ChannelError||(e.ChannelError={})).NoChannelFound=\"NoChannelFound\",d.AccessDenied=\"AccessDenied\",d.CreationFailed=\"CreationFailed\";e.buildPrivateChannelObject=e=>{let t=!1;const n=()=>{if(t)throw new Error(\"Private Channel Client has been disconnected from the Private Channel\")};return{id:e.id,type:\"private\",broadcast:async t=>(n(),e.broadcast(t)),getCurrentContext:async t=>(n(),e.getCurrentContext(t)),addContextListener:async(t,i)=>{n();let r=i,o=t;\"function\"==typeof t&&(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),r=t,o=null);return e.addContextListener(o,r)},onAddContextListener:t=>(n(),e.onAddContextListener(t)),disconnect:async()=>(n(),t=!0,e.disconnect()),onDisconnect:t=>(n(),e.onDisconnect(t)),onUnsubscribe:t=>(n(),e.onUnsubscribe(t))}};e.buildAppChannelObject=e=>({id:e.id,type:\"app\",broadcast:e.setContext,getCurrentContext:async t=>{const n=await e.getCurrentContext(t);return void 0===n?null:n},addContextListener:(t,n)=>{let i,r;\"function\"==typeof t?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),i=t):(i=n,\"string\"==typeof t&&(r=t));const s=(async()=>{let t=!0;const n=await e.getCurrentContext(r);return e.addContextHandler(((e,r)=>{if(!t||(t=!1,!(0,o.default)(n,e)))return i(e,r)}),r)})();return{...s,unsubscribe:()=>s.then((e=>e.unsubscribe()))}}});e.connectPrivateChannel=async t=>{try{const n=await fin.InterApplicationBus.Channel.connect(t),i=new r.PrivateChannelClient(n,t);return(0,e.buildPrivateChannelObject)(i)}catch(e){throw new Error(`Private Channel with id: ${t} doesn't exist`)}};e.isContext=e=>{if(e&&\"object\"==typeof e&&\"type\"in e){const{type:t}=e;return\"string\"==typeof t}return!1};e.isChannel=e=>{if(e&&\"object\"==typeof e&&\"type\"in e&&\"id\"in e){const{type:t,id:n}=e;return\"string\"==typeof t&&\"string\"==typeof n&&(\"app\"===t||\"private\"===t)}return!1};e.getIntentResolution=async(t,i,r,o)=>{const s=(0,n.generateId)(),a=new Promise(((e,t)=>{fin.InterApplicationBus.subscribe({uuid:\"*\"},s,(t=>{e(t)})).catch((()=>t(new Error(\"getResult is not supported in this environment\"))))})),d=r?{target:r,intentResolutionResultId:s}:{intentResolutionResultId:s},h=o?{name:o,context:i,metadata:d}:{...i,metadata:d},l=async()=>{let n=await a;if(!n||\"object\"!=typeof n)throw new Error(c.NoResultReturned);const{error:i}=n;if(i)throw new Error(c.IntentHandlerRejected);if((0,e.isChannel)(n)){const{id:i,type:r}=n;switch(r){case\"private\":n=await(0,e.connectPrivateChannel)(i);break;case\"app\":{const r=await t.joinSessionContextGroup(i);n=(0,e.buildAppChannelObject)(r);break}}}else if(!(0,e.isContext)(n))throw new Error(c.NoResultReturned);return n},u=o?await t.fireIntent(h):await t.fireIntentForContext(h);return\"object\"!=typeof u?{source:{appId:\"\",instanceId:\"\"},intent:\"\",version:\"2.0\",getResult:l}:{...u,getResult:l}}}(nr);var lr,ur,pr={};function wr(){if(ur)return Ki;ur=1;var e,t,n=s&&s.__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},i=s&&s.__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)},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ki,\"__esModule\",{value:!0}),Ki.InteropClient=void 0;const o=d,a=r(qi),c=function(){if(dr)return er;dr=1,Object.defineProperty(er,\"__esModule\",{value:!0}),er.Fdc3Module=void 0;const e=Hi,t=hr();class n extends t.FDC3ModuleBase{async open(e,t){await super._open(e,t)}addContextListener(e,t){let n;return this.wire.sendAction(\"fdc3-add-context-listener\").catch((e=>{})),\"function\"==typeof e?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),n=this.client.addContextHandler(e)):n=this.client.addContextHandler(t,null===e?void 0:e),{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}addIntentListener(e,t){this.wire.sendAction(\"fdc3-add-intent-listener\").catch((e=>{}));const n=this.client.registerIntentHandler((e=>{const{context:n,metadata:i}=e,{metadata:r}=n,o=i?.intentResolutionResultId||r?.intentResolutionResultId;o&&this.fin.InterApplicationBus.publish(o,null).catch((()=>null)),t(e.context)}),e,{fdc3Version:\"1.2\"});return{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}async raiseIntent(t,n,i){this.wire.sendAction(\"fdc3-raise-intent\").catch((e=>{}));const r=i?{name:t,context:n,metadata:{target:i}}:{name:t,context:n};try{return await this.client.fireIntent(r)}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntent?\"ResolverUnavailable\":t.message;throw new Error(n)}}async findIntent(t,n){this.wire.sendAction(\"fdc3-find-intent\").catch((e=>{}));try{return await this.client.getInfoForIntent({name:t,context:n})}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntent?\"ResolverUnavailable\":t.message;throw new Error(n)}}async findIntentsByContext(t){this.wire.sendAction(\"fdc3-find-intents-by-context\").catch((e=>{}));try{return await this.client.getInfoForIntentsByContext(t)}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntentsByContext?\"ResolverUnavailable\":t.message;throw new Error(n)}}async raiseIntentForContext(t,n){this.wire.sendAction(\"fdc3-raise-intent-for-context\").catch((e=>{}));try{return await this.client.fireIntentForContext({...t,metadata:{target:n}})}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntentForContext?\"ResolverUnavailable\":t.message;throw new Error(n)}}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}getInfo(){return this.wire.sendAction(\"fdc3-get-info\").catch((e=>{})),{providerVersion:this.wire.environment.getAdapterVersionSync(),provider:`openfin-${this.wire.me.uuid}`,fdc3Version:\"1.2\"}}}return er.Fdc3Module=n,er}(),h=function(){if(lr)return pr;lr=1,Object.defineProperty(pr,\"__esModule\",{value:!0}),pr.Fdc3Module2=void 0;const e=hr(),t=Hi,n=wr(),i=nr,r=ir;class o extends e.FDC3ModuleBase{async open(e,t){return\"string\"==typeof e&&console.warn(\"Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).\"),super._open(e,t)}async findInstances(e){this.wire.sendAction(\"fdc3-find-instances\").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,\"fdc3FindInstances\",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3FindInstances?\"ResolverUnavailable\":e.message;throw new Error(n)}}async getAppMetadata(e){this.wire.sendAction(\"fdc3-get-app-metadata\").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,\"fdc3GetAppMetadata\",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3GetAppMetadata?\"ResolverUnavailable\":e.message;throw new Error(n)}}async addContextListener(e,t){this.wire.sendAction(\"fdc3-add-context-listener\").catch((e=>{}));const n=e=>t=>{const{contextMetadata:n,...i}=t,r=n?[{...i},n]:[t,null];e(...r)};let i=t,r=n(i);return\"function\"==typeof e?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),i=e,r=n(i),this.client.addContextHandler(r)):this.client.addContextHandler(r,null===e?void 0:e)}async findIntent(e,n,i){this.wire.sendAction(\"fdc3-find-intent\").catch((e=>{}));try{return await this.client.getInfoForIntent({name:e,context:n,metadata:{resultType:i}})}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntent?\"ResolverUnavailable\":e.message;throw new Error(n)}}async findIntentsByContext(e,i){this.wire.sendAction(\"fdc3-find-intents-by-context\").catch((e=>{}));const r=i?{context:e,metadata:{resultType:i}}:e;try{return await n.InteropClient.ferryFdc3Call(this.client,\"fdc3v2FindIntentsByContext\",r)}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntentsByContext?\"ResolverUnavailable\":e.message;throw new Error(n)}}async raiseIntent(e,n,r){this.wire.sendAction(\"fdc3-raise-intent\").catch((e=>{}));try{return\"string\"==typeof r&&console.warn(\"Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).\"),(0,i.getIntentResolution)(this.client,n,r,e)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?\"ResolverUnavailable\":e.message;throw new Error(n)}}async raiseIntentForContext(e,n){this.wire.sendAction(\"fdc3-raise-intent-for-context\").catch((e=>{}));try{return\"string\"==typeof n&&console.warn(\"Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).\"),(0,i.getIntentResolution)(this.client,e,n)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?\"ResolverUnavailable\":e.message;throw new Error(n)}}async addIntentListener(e,t){if(this.wire.sendAction(\"fdc3-add-intent-listener\").catch((e=>{})),\"string\"!=typeof e)throw new Error(\"First argument must be an Intent name\");return this.client.registerIntentHandler((async e=>{let n,i;const{context:r,metadata:o}=e,{contextMetadata:s,metadata:a,...c}=r,d=o?.intentResolutionResultId||a?.intentResolutionResultId;try{const e=a?{metadata:a,...c}:{...c};n=await t(e,s),i=n}catch(e){n=e,i={error:!0}}if(d&&this.fin.InterApplicationBus.publish(d,i).catch((()=>null)),n instanceof Error)throw new Error(n.message);return n}),e,{fdc3Version:\"2.0\"})}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}async createPrivateChannel(){const e=(0,t.generateId)();await n.InteropClient.ferryFdc3Call(this.client,\"createPrivateChannelProvider\",{channelId:e});const o=await this.fin.InterApplicationBus.Channel.connect(e),s=new r.PrivateChannelClient(o,e);return(0,i.buildPrivateChannelObject)(s)}async getUserChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:\"user\",...(0,i.getUnsupportedChannelApis)(\"User\")})))}async getSystemChannels(){return console.warn(\"This API has been deprecated. Please use fdc3.getUserChannels instead.\"),super.getSystemChannels()}async joinUserChannel(e){return super.joinChannel(e)}async joinChannel(e){return console.warn(\"This API has been deprecated. Please use fdc3.joinUserChannel instead.\"),super.joinChannel(e)}async getCurrentChannel(){const e=await super.getCurrentChannel();return e?{...e,type:\"user\",broadcast:this.broadcast.bind(this)}:null}async getInfo(){return n.InteropClient.ferryFdc3Call(this.client,\"fdc3v2GetInfo\",{fdc3Version:\"2.0\"})}}return pr.Fdc3Module2=o,pr}(),l=Hi;let u=class extends o.Base{constructor(i,r){super(i),e.set(this,void 0),t.set(this,void 0),n(this,t,new Map,\"f\"),n(this,e,r,\"f\")}async setContext(t){this.wire.sendAction(\"interop-client-set-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"setContext\",{context:t})}async addContextHandler(t,n){if(this.wire.sendAction(\"interop-client-add-context-handler\").catch((e=>{})),\"function\"!=typeof t)throw new Error(\"Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.\");const r=await i(this,e,\"f\");let o;o=n?`invokeContextHandler-${n}-${(0,l.generateId)()}`:\"invokeContextHandler\";const s=(0,l.wrapContextHandler)(t,o);return r.register(o,s),await r.dispatch(\"contextHandlerRegistered\",{handlerId:o,contextType:n}),{unsubscribe:async()=>{r.remove(o),await r.dispatch(\"removeContextHandler\",{handlerId:o})}}}async getContextGroups(){this.wire.sendAction(\"interop-client-get-context-groups\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getContextGroups\")}async joinContextGroup(t,n){this.wire.sendAction(\"interop-client-join-context-group\").catch((e=>{}));const r=await i(this,e,\"f\");if(!t)throw new Error(\"No contextGroupId specified for joinContextGroup.\");return r.dispatch(\"joinContextGroup\",{contextGroupId:t,target:n})}async removeFromContextGroup(t){this.wire.sendAction(\"interop-client-remove-from-context-group\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"removeFromContextGroup\",{target:t})}async getAllClientsInContextGroup(t){this.wire.sendAction(\"interop-client-get-all-clients-in-context-group\").catch((e=>{}));const n=await i(this,e,\"f\");if(!t)throw new Error(\"No contextGroupId specified for getAllClientsInContextGroup.\");return n.dispatch(\"getAllClientsInContextGroup\",{contextGroupId:t})}async getInfoForContextGroup(t){this.wire.sendAction(\"interop-client-get-info-for-context-group\").catch((e=>{}));const n=await i(this,e,\"f\");if(!t)throw new Error(\"No contextGroupId specified for getInfoForContextGroup.\");return n.dispatch(\"getInfoForContextGroup\",{contextGroupId:t})}async fireIntent(t){this.wire.sendAction(\"interop-client-fire-intent\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"fireIntent\",t)}async registerIntentHandler(t,n,r){this.wire.sendAction(\"interop-client-register-intent-handler\").catch((e=>{}));const o=await i(this,e,\"f\"),s=`intent-handler-${n}`,a=(0,l.wrapIntentHandler)(t,s);try{await o.register(s,a),await o.dispatch(\"intentHandlerRegistered\",{handlerId:s,...r})}catch(e){throw new Error(\"Unable to register intent handler\")}return{unsubscribe:async()=>{o.remove(s)}}}async getCurrentContext(t){this.wire.sendAction(\"interop-client-get-current-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getCurrentContext\",{contextType:t})}async getInfoForIntent(t){this.wire.sendAction(\"interop-client-get-info-for-intent\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getInfoForIntent\",t)}async getInfoForIntentsByContext(t){this.wire.sendAction(\"interop-client-get-info-for-intents-by-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getInfoForIntentsByContext\",t)}async fireIntentForContext(t){this.wire.sendAction(\"interop-client-fire-intent-for-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"fireIntentForContext\",t)}async joinSessionContextGroup(n){try{const r=i(this,t,\"f\").get(n);if(r)return r.getUserInstance();const o=await i(this,e,\"f\"),{hasConflict:s}=await o.dispatch(\"sessionContextGroup:createIfNeeded\",{sessionContextGroupId:n});s&&console.warn(`A (non-session) context group with the name \"${n}\" already exists. If you are trying to join a Context Group, call joinContextGroup instead.`);const c=new a.default(this.wire,i(this,e,\"f\"),n);return i(this,t,\"f\").set(n,c),c.getUserInstance()}catch(e){throw console.error(`Error thrown trying to create Session Context Group with id \"${n}\": ${e}`),e}}async onDisconnection(t){this.wire.sendAction(\"interop-client-add-ondisconnection-listener\").catch((e=>{}));return(await i(this,e,\"f\")).onDisconnection((e=>{const{uuid:n}=e;t({type:\"interop-broker\",topic:\"disconnected\",brokerName:n})}))}getFDC3Sync(e){switch(e){case\"1.2\":return new c.Fdc3Module((()=>this),this.wire);case\"2.0\":return new h.Fdc3Module2((()=>this),this.wire);default:throw new Error(`Invalid FDC3 version provided: ${e}. Must be '1.2' or '2.0'`)}}async getFDC3(e){return this.getFDC3Sync(e)}static async ferryFdc3Call(t,n,r){return(await i(t,e,\"f\")).dispatch(n,r||null)}};return Ki.InteropClient=u,e=new WeakMap,t=new WeakMap,Ki}var yr,fr,gr,mr={};function vr(){if(yr)return mr;yr=1,Object.defineProperty(mr,\"__esModule\",{value:!0}),mr.overrideCheck=mr.checkFDC32Overrides=mr.getDefaultViewFdc3VersionFromAppInfo=void 0;const e=Vi();function t(t){return[\"fdc3HandleFindInstances\",\"handleInfoForIntent\",\"handleInfoForIntentsByContext\",\"fdc3HandleGetAppMetadata\",\"fdc3HandleGetInfo\",\"fdc3HandleOpen\",\"handleFiredIntent\",\"handleFiredIntentForContext\"].filter((n=>t[n]===e.InteropBroker.prototype[n]))}return mr.getDefaultViewFdc3VersionFromAppInfo=function({manifest:e,initialOptions:t}){const n=e?.platform?.defaultViewOptions?.fdc3InteropApi??t.defaultViewOptions?.fdc3InteropApi;return[\"1.2\",\"2.0\"].includes(n??\"\")?n:void 0},mr.checkFDC32Overrides=t,mr.overrideCheck=function(e,n){if(n&&\"2.0\"===n){const n=t(e);n.length>0&&console.warn(`WARNING: FDC3 2.0 has been set as a default option for Views in this Platform, but the required InteropBroker APIs for FDC3 2.0 compliance have not all been overridden.\\nThe following APIs need to be overridden:\\n${n.join(\"\\n\")}`)}},mr}function Cr(){return gr||(gr=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),i=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),i(function(){if(fr)return Ti;fr=1;var e=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ti,\"__esModule\",{value:!0}),Ti.InteropModule=void 0;const t=e(n),i=$i,r=d,o=Vi(),a=wr(),c=vr(),h=Tn,l=e=>new e,u=\"You have attempted to use or modify InteropBroker parameters, which is not allowed. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.\";class p extends r.Base{async init(e,n=l){this.wire.sendAction(\"interop-init\").catch((()=>{}));const r=await this.wire.environment.getInteropInfo(this.wire.getFin()),s=(0,i.createUnusableObject)(u),a=(0,i.createWarningObject)(u,(0,t.default)(r)),d=async()=>{throw new Error(u)},p=o.InteropBroker.createClosedConstructor(this.wire,(()=>this.fin.InterApplicationBus.Channel.create(`interop-broker-${e}`)),r);let w;return w=Array.isArray(n)?new((0,h.overrideFromComposables)(...n)(p))(s,d,a):await n(p,s,d,a),(0,c.overrideCheck)(w,r.fdc3Version),w}connectSync(e,t){return this.wire.sendAction(\"interop-connect-sync\").catch((()=>{})),new a.InteropClient(this.wire,this.wire.environment.whenReady().then((()=>this.fin.InterApplicationBus.Channel.connect(`interop-broker-${e}`,{payload:t}))))}}return Ti.InteropModule=p,Ti}(),e),i(wr(),e),i(Vi(),e)}(Li)),Li}var br={},Ir={},Er={},xr={};Object.defineProperty(xr,\"__esModule\",{value:!0}),xr.getSnapshotSourceChannelName=void 0;xr.getSnapshotSourceChannelName=e=>`snapshot-source-provider-${e.uuid}`;var Ar,Pr,Mr,_r,Or,Sr=s&&s.__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},Rr=s&&s.__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)};Object.defineProperty(Er,\"__esModule\",{value:!0}),Er.SnapshotSource=void 0;const Fr=d,jr=xr,kr=new Map;class Lr extends Fr.Base{constructor(e,t){super(e),Ar.set(this,void 0),Pr.set(this,(()=>(kr.has(this.identity.uuid)||kr.set(this.identity.uuid,{eventFired:null,clientPromise:null}),kr.get(this.identity.uuid)))),Mr.set(this,(()=>(Rr(this,Pr,\"f\").call(this).clientPromise||(Rr(this,Pr,\"f\").call(this).clientPromise=Rr(this,_r,\"f\").call(this)),Rr(this,Pr,\"f\").call(this).clientPromise))),_r.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);try{Rr(this,Pr,\"f\").call(this).eventFired||await Rr(this,Or,\"f\").call(this);const t=await this.fin.InterApplicationBus.Channel.connect(e,{wait:!1});return t.onDisconnection((()=>{Rr(this,Pr,\"f\").call(this).clientPromise=null,Rr(this,Pr,\"f\").call(this).eventFired=null})),t}catch(e){throw Rr(this,Pr,\"f\").call(this).clientPromise=null,new Error(\"The targeted SnapshotSource is not currently initialized. Await this object's ready() method.\")}})),Or.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);let t,n;const i=new Promise(((e,i)=>{t=e,n=i}));Rr(this,Pr,\"f\").call(this).eventFired=i;const r=async i=>{try{i.channelName===e&&(t(),await this.fin.InterApplicationBus.Channel.removeListener(\"connected\",r))}catch(e){n(e)}};await this.fin.InterApplicationBus.Channel.on(\"connected\",r)})),Sr(this,Ar,t,\"f\")}get identity(){return Rr(this,Ar,\"f\")}async ready(){this.wire.sendAction(\"snapshot-source-ready\").catch((e=>{}));try{await Rr(this,Mr,\"f\").call(this)}catch(e){await Rr(this,Pr,\"f\").call(this).eventFired}}async getSnapshot(){this.wire.sendAction(\"snapshot-source-get-snapshot\").catch((e=>{}));const e=await Rr(this,Mr,\"f\").call(this),t=await e.dispatch(\"get-snapshot\");return(await t).snapshot}async applySnapshot(e){this.wire.sendAction(\"snapshot-source-apply-snapshot\").catch((e=>{}));return(await Rr(this,Mr,\"f\").call(this)).dispatch(\"apply-snapshot\",{snapshot:e})}}Er.SnapshotSource=Lr,Ar=new WeakMap,Pr=new WeakMap,Mr=new WeakMap,_r=new WeakMap,Or=new WeakMap,Object.defineProperty(Ir,\"__esModule\",{value:!0}),Ir.SnapshotSourceModule=void 0;const Tr=d,$r=Er,Br=xr;class Gr extends Tr.Base{async init(e){if(this.wire.sendAction(\"snapshot-source-init\").catch((e=>{})),\"object\"!=typeof e||\"function\"!=typeof e.getSnapshot||\"function\"!=typeof e.applySnapshot)throw new Error(\"you must pass in a valid SnapshotProvider\");const t=await this.fin.InterApplicationBus.Channel.create((0,Br.getSnapshotSourceChannelName)(this.fin.me));t.register(\"get-snapshot\",(async()=>({snapshot:await e.getSnapshot()}))),t.register(\"apply-snapshot\",(({snapshot:t})=>e.applySnapshot(t)))}wrapSync(e){return this.wire.sendAction(\"snapshot-source-wrap-sync\").catch((e=>{})),new $r.SnapshotSource(this.wire,e)}async wrap(e){return this.wire.sendAction(\"snapshot-source-wrap\").catch((e=>{})),this.wrapSync(e)}}Ir.SnapshotSourceModule=Gr,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Ir,e),n(Er,e)}(br),Object.defineProperty(a,\"__esModule\",{value:!0});var Wr=a.Fin=void 0;const Hr=t,Nr=c,Dr=ie(),Ur=Z(),Vr=de,zr=en,Kr=rn,qr=un,Jr=bn,Yr=J(),Zr=An,Qr=ki,Xr=Cr(),eo=br;class to extends Hr.EventEmitter{constructor(e){super(),this.wire=e,this.System=new Nr.System(e),this.Window=new Dr._WindowModule(e),this.Application=new Ur.ApplicationModule(e),this.InterApplicationBus=new Vr.InterApplicationBus(e),this.Clipboard=new zr.Clipboard(e),this.ExternalApplication=new Kr.ExternalApplicationModule(e),this.Frame=new qr._FrameModule(e),this.GlobalHotkey=new Jr.GlobalHotkey(e),this.Platform=new Zr.PlatformModule(e,this.InterApplicationBus.Channel),this.View=new Yr.ViewModule(e),this.Interop=new Xr.InteropModule(e),this.SnapshotSource=new eo.SnapshotSourceModule(e),e.registerFin(this),this.me=(0,Qr.getMe)(e),e.on(\"disconnected\",(()=>{this.emit(\"disconnected\")}))}}Wr=a.Fin=to;var no={},io={};function ro(e){return\"string\"==typeof e.manifestUrl}function oo(e){return ao(e)&&\"string\"==typeof e.address}function so(e){return oo(e)&&\"string\"==typeof e.token}function ao(e){return\"string\"==typeof e.uuid}function co(e){return e.runtime&&\"string\"==typeof e.runtime.version}function ho(e){return ao(e)&&co(e)}Object.defineProperty(io,\"__esModule\",{value:!0}),io.isInternalConnectConfig=io.isPortDiscoveryConfig=io.isNewConnectConfig=io.isConfigWithReceiver=io.isRemoteConfig=io.isExistingConnectConfig=io.isExternalConfig=void 0,io.isExternalConfig=ro,io.isExistingConnectConfig=oo,io.isRemoteConfig=so,io.isConfigWithReceiver=function(e){return\"object\"==typeof e.receiver&&so({...e,address:\"\"})},io.isNewConnectConfig=ho,io.isPortDiscoveryConfig=function(e){return ro(e)&&co(e)||ho(e)},io.isInternalConnectConfig=function(e){return oo(e)||ho(e)};var lo={},uo={};Object.defineProperty(uo,\"__esModule\",{value:!0}),uo.EmitterMap=void 0;const po=t;function wo(e){return Buffer.from(e).toString(\"base64\")}uo.EmitterMap=class{constructor(){this.storage=new Map}hashKeys(e){return e.map(wo).join(\"/\")}getOrCreate(e){const t=this.hashKeys(e);return this.storage.has(t)||this.storage.set(t,new po.EventEmitter),this.storage.get(t)}has(e){return this.storage.has(this.hashKeys(e))}delete(e){const t=this.hashKeys(e);return this.storage.delete(t)}},Object.defineProperty(lo,\"__esModule\",{value:!0});const yo=uo;class fo extends yo.EmitterMap{constructor(){super(...arguments),this.dispatchEvent=e=>{if(function(e){return\"process-desktop-event\"===e.action}(e)){const{payload:t}=e,n=function(e){const{topic:t}=e;if(\"frame\"===t||\"window\"===t||\"view\"===t){const{uuid:n,name:i}=e;return[t,n,i]}if(\"application\"===t){const{uuid:n}=e;return[t,n]}return[t]}(t);if(this.has(n))return this.getOrCreate(n).emit(t.type,t),!0}return!1}}}lo.default=fo;var go,mo,vo=s&&s.__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},Co=s&&s.__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)},bo=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(no,\"__esModule\",{value:!0});var Io=no.Transport=void 0;const Eo=t,xo=io,Ao=g,Po=bo(lo),Mo=ki,_o=ke;class Oo extends Eo.EventEmitter{constructor(e,t,n){super(),this.wireListeners=new Map,this.topicRefMap=new Map,this.eventAggregator=new Po.default,this.messageHandlers=[this.eventAggregator.dispatchEvent],go.set(this,void 0),mo.set(this,void 0),this.connectSync=()=>{Co(this,go,\"f\").connectSync()},this.getPort=()=>Co(this,go,\"f\").getPort(),vo(this,go,new e(this.onmessage.bind(this)),\"f\"),this.environment=t,this.sendRaw=Co(this,go,\"f\").send.bind(Co(this,go,\"f\")),this.registerMessageHandler(this.handleMessage.bind(this)),Co(this,go,\"f\").on(\"disconnected\",(()=>{for(const[,{handleNack:e}]of this.wireListeners)e({reason:\"Remote connection has closed\"});this.wireListeners.clear(),this.emit(\"disconnected\")}));const{uuid:i,name:r}=n,o=this.environment.getCurrentEntityType();this.me=(0,Mo.getBaseMe)(o,i,r)}getFin(){if(!Co(this,mo,\"f\"))throw new Error(\"No Fin object registered for this transport\");return Co(this,mo,\"f\")}registerFin(e){if(Co(this,mo,\"f\"))throw new Error(\"Fin object has already been registered for this transport\");vo(this,mo,e,\"f\")}shutdown(){return Co(this,go,\"f\").shutdown()}async connect(e){if((0,xo.isConfigWithReceiver)(e))return await Co(this,go,\"f\").connect(e.receiver),this.authorize(e);if((0,xo.isRemoteConfig)(e))return this.connectRemote(e);if((0,xo.isExistingConnectConfig)(e))return this.connectByPort(e);if((0,xo.isNewConnectConfig)(e)){const t=await this.environment.retrievePort(e);return this.connectByPort({...e,address:`ws://localhost:${t}`})}}async connectRemote(e){return await Co(this,go,\"f\").connect(new(this.environment.getWsConstructor())(e.address)),this.authorize(e)}async connectByPort(e){const{address:t,uuid:n}=e,i={...e,type:\"file-token\"},r=Co(this,go,\"f\");await r.connect(new(this.environment.getWsConstructor())(e.address));const o=await this.sendAction(\"request-external-authorization\",{uuid:n,type:\"file-token\"},!0);if(\"external-authorization-response\"!==o.action)throw new Ao.UnexpectedActionError(o.action);return await this.environment.writeToken(o.payload.file,o.payload.token),this.authorize(i)}async authorize(e){const t=await this.sendAction(\"request-authorization\",e,!0);if(\"authorization-response\"!==t.action)throw new Ao.UnexpectedActionError(t.action);if(!0!==t.payload.success)throw new Ao.RuntimeError(t.payload)}sendAction(e,t={},n=!1){let i=()=>{};const r=Ao.RuntimeError.getCallSite(1),o=this.environment.getNextMessageId(),s=new Promise(((s,a)=>{i=a;const c={action:e,payload:t,messageId:o},d=Co(this,go,\"f\");return this.addWireListener(o,s,(e=>this.nackHandler(e,a,r)),n),d.send(c).catch(a)}));return Object.assign(s,{cancel:i,messageId:o})}nackHandler(e,t,n){t(\"string\"==typeof e?e:new Ao.RuntimeError(e,n))}ferryAction(e){return new Promise(((t,n)=>{const i=this.environment.getNextMessageId();e.messageId=i;const r=e=>{t(e.payload)};return Co(this,go,\"f\").send(e).then((()=>this.addWireListener(i,r,(e=>this.nackHandler(e,n)),!1))).catch(n)}))}registerMessageHandler(e){this.messageHandlers.push(e)}addWireListener(e,t,n,i){i?this.uncorrelatedListener=t:this.wireListeners.has(e)?n({reason:\"Duplicate handler id\",error:(0,_o.errorToPOJO)(new Ao.DuplicateCorrelationError(String(e)))}):this.wireListeners.set(e,{resolve:t,handleNack:n})}onmessage(e){for(const t of this.messageHandlers)t.call(null,e)}handleMessage(e){const t=e.correlationId||NaN;if(\"correlationId\"in e){if(!this.wireListeners.has(t))return!1;{const{resolve:n,handleNack:i}=this.wireListeners.get(t);\"ack\"!==e.action?i({reason:\"Did not receive ack action\",error:(0,_o.errorToPOJO)(new Ao.NoAckError(e.action))}):\"payload\"in e?e.payload.success?n.call(null,e):i(e.payload):\"string\"==typeof e.reason?i(e):(console.warn(\"Received invalid response from core\",e),i({reason:\"invalid response shape\"})),this.wireListeners.delete(t)}}else this.uncorrelatedListener&&this.uncorrelatedListener.call(null,e),this.uncorrelatedListener=()=>{};return!0}}Io=no.Transport=Oo,go=new WeakMap,mo=new WeakMap;const So=(...e)=>({log:(...t)=>console.debug(`[${(new Date).toISOString()}]`,...(e=>e.map((e=>`[${e}]`)))(e),...t),getLogger:(...t)=>So(...e,...t)}),Ro=So(\"@openfin/core-web/client\");function Fo(e,t){if(!function(e){return\"string\"==typeof e}(e))throw new Error(`Property ${t} has invalid type. Expected string, got ${typeof e}.`)}const jo=\"web-broker-ports-ready\",ko=Ro.getLogger(\"get-web-interop-ports\");function Lo(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)}function To(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}\"function\"==typeof SuppressedError&&SuppressedError;const $o=e=>{var n,i,r;return r=class extends t.EventEmitter{constructor(t){super(),n.set(this,void 0),i.set(this,!1),this.connectSync=()=>{Lo(this,i,\"f\")||(e.addEventListener(\"message\",(e=>{e.data?.topic?.startsWith(\"wire-message\")&&e.data.message&&Lo(this,n,\"f\").call(this,{...JSON.parse(e.data.message),ports:e.ports})})),e.start())},this.connect=async()=>{this.connectSync()},this.send=t=>(e.postMessage({topic:\"wire-message\",message:JSON.stringify(t)}),Promise.resolve()),this.shutdown=async()=>{e.close()},To(this,n,t,\"f\")}getPort(){return e}},n=new WeakMap,i=new WeakMap,r};var Bo={},Go={};Object.defineProperty(Go,\"__esModule\",{value:!0}),Go.BaseEnvironment=void 0;const Wo=vr();Go.BaseEnvironment=class{async getViewWindowIdentity(e,t){const{identity:n}=await e.View.wrapSync(t).getCurrentWindow();return n}async getInteropInfo(e){const t=await e.Application.getCurrentSync().getInfo().catch((()=>null)),n=t?.initialOptions?.interopBrokerConfiguration??{};return{fdc3Version:t?(0,Wo.getDefaultViewFdc3VersionFromAppInfo)(t):void 0,...n,fdc3Info:{providerVersion:await e.System.getVersion(),provider:\"OpenFin\"}}}},Object.defineProperty(Bo,\"__esModule\",{value:!0});var Ho=Bo.BrowserEnvironment=void 0;const No=Go;class Do extends No.BaseEnvironment{constructor(){super(...arguments),this.type=\"other\",this.getRandomId=()=>{const e=new Uint32Array(1);return window.crypto.getRandomValues(e)[0].toString(32)}}getAdapterVersionSync(){return\"\"}observeBounds(e,t){throw new Error(\"Method not implemented.\")}layoutAllowedInContext(e){return!1}initLayoutManager(e,t,n){throw new Error(\"Method not implemented.\")}applyLayoutSnapshot(e,t,n){throw new Error(\"Method not implemented.\")}createLayout(e,t){throw new Error(\"Method not implemented.\")}destroyLayout(e,t){throw new Error(\"Method not implemented.\")}resolveLayout(e,t){throw new Error(\"Method not implemented.\")}initPlatform(...e){throw new Error(\"Method not implemented.\")}writeToken(e,t){return Promise.resolve(\"\")}retrievePort(e){throw new Error(\"Method not implemented.\")}getNextMessageId(){return this.getRandomId()}createChildContent(e){throw new Error(\"Method not implemented.\")}getWebWindow(e){throw new Error(\"Method not implemented.\")}getCurrentEntityIdentity(){throw new Error(\"Method not implemented.\")}getCurrentEntityType(){return\"external connection\"}raiseEvent(e,t){throw new Error(\"Method not implemented.\")}getUrl(){return location.href}getDefaultChannelOptions(){return{create:{},connect:{}}}getRtcPeer(){return new RTCPeerConnection}getWsConstructor(){return WebSocket}whenReady(){return Promise.resolve()}}Ho=Bo.BrowserEnvironment=Do;const Uo=e=>\"platform\"in e&&void 0!==e.platform;var Vo,zo;class Ko extends Ho{constructor(e){super(),this.connectConfig=e,Vo.set(this,void 0),zo.set(this,new W((async()=>Promise.resolve().then((function(){return require(\"./main-b14f67c9.js\")}))))),Uo(e)&&this.validatePlatformOptions(e)}getAdapterVersionSync(){return\"0.39.21\"}validatePlatformOptions({platform:e}){if(!(\"layoutSnapshot\"in e))throw new Error(\"Platform options are missing layoutSnapshot. Please provide a layoutSnapshot in the platform options.\");if(\"windows\"in e||\"windows\"in e.layoutSnapshot)throw new Error(\"It appears you tried to call connect() with a snapshot object from an OpenFin desktop environment. Note that connect() expects to be called with a platform property with this structure: { platform: { layoutSnapshot } }. To get a layoutSnapshot of the expected structure, use fin.Platform.Layout.getCurrentLayoutManagerSync().getLayoutSnapshot() in v34+ in your desktop environment.\");const{layouts:t}=e.layoutSnapshot;Object.entries(t).map((([e,t])=>{if(\"object\"!=typeof t||null===t)throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must be an object.`);if(!(\"content\"in t))throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must contain a 'content' property.`)}))}async getInteropInfo(e){return{...{contextGroups:void 0,logging:{beforeAction:{enabled:!1},afterAction:{enabled:!1}}},fdc3Version:void 0,fdc3Info:{providerVersion:\"0.39.21\",provider:\"OpenFin Web\"}}}layoutAllowedInContext(e){return!0}async initLayoutManager(e,t,n){if(Lo(this,Vo,\"f\"))throw new Error(\"Layout already initialized.\");if(!Uo(this.connectConfig))throw new Error(\"Platform options are missing from connection config.\");const{WebLayoutEntryPoint:i}=await Lo(this,zo,\"f\").getValue();return To(this,Vo,new i(this.connectConfig),\"f\"),await Lo(this,Vo,\"f\").initLayoutManager(e,t,n)}async applyLayoutSnapshot(e,t,n){Lo(this,Vo,\"f\")?.applyLayoutSnapshot(e,t,n)}async createLayout(e,t){return Lo(this,Vo,\"f\")?.createLayout(e,t)}async destroyLayout(e,t){return Lo(this,Vo,\"f\")?.destroyLayout(e,t)}async getViewWindowIdentity(e,t){return Promise.resolve({uuid:t.uuid,name:t.uuid})}}Vo=new WeakMap,zo=new WeakMap;const qo=()=>{const e=((e,t)=>{const n=new RegExp(`^${t}<(?.*)>$`).exec(e)?.groups?.meta;if(n)try{return JSON.parse(atob(n))}catch(e){throw new Error(`Failed to decode JSON from ${n}.`)}})(window.name,\"of-frame\");if(e)try{const{name:t,uuid:n,brokerUrl:i,providerId:r,contextGroup:o}=e;return Fo(i,\"brokerUrl\"),Fo(n,\"uuid\"),Fo(t,\"name\"),{identity:{name:t,uuid:n},brokerUrl:i,interopConfig:{providerId:r,currentContextGroup:o}}}catch(e){throw new Error(`Unexpected error occurred when inferring platform information: ${e.stack}`)}},Jo=()=>{const e=r.v4();return{uuid:e,name:e}},Yo=async e=>{if(\"enabled\"===e.connectionInheritance){const t=await(async e=>{const t=qo();if(t){const{validateOptions:n=(()=>!0)}=e,{identity:i,...r}=t;if(!await n(r))throw new Error(\"Parent options were rejected by validateOptions.\");return t}})(e);if(t)return t}if(!e.options){const t=\"enabled\"===e.connectionInheritance?\"Broker URL was not specified nor provided by a platform container.\":\"Connection inheritance is disabled but no options were provided.\";throw new Error(t)}return{...e.options,identity:Jo()}};exports.__classPrivateFieldGet=Lo,exports.__classPrivateFieldSet=To,exports.apiExposer=Gn,exports.commonjsGlobal=s,exports.connect=async t=>{try{Ro.log(\"Establishing connection\",t);const{brokerUrl:n,identity:i,timeout:r,interopConfig:s}=await Yo(t),{workerPort:a,iframeBrokerPort:c}=await(async(e,t,n)=>{const{origin:i}=new URL(e),r=document.createElement(\"IFRAME\");let s;r.style.display=\"none\";try{return await new Promise(((a,c)=>{const d=e=>{if(e.source===r.contentWindow&&e.data?.topic===`ack-${jo}`){if(e.origin!==i)c(new Error(`Broker redirected to unexpected origin ${e.origin}, expected ${i}.`));else if(e.data.success){const[t,n]=e.ports;a({iframeBrokerPort:t,workerPort:n})}else c(new m(e.data));window.removeEventListener(\"message\",d),clearTimeout(s)}};window.addEventListener(\"message\",d),ko.log(`Connecting to broker ${e}`),r.setAttribute(\"src\",e),r.setAttribute(\"name\",o(t,\"of-broker\")),document.body.appendChild(r),ko.log(\"Iframe loaded, awaiting init message from iframe\"),n&&(s=setTimeout((()=>{window.removeEventListener(\"message\",d),document.body.removeChild(r),c(new Error(\"Worker did not initialize in time\"))}),n))}))}catch(e){throw new Error(`Failed to initialise Fin Web Client. ${e.message}`,{cause:e})}})(n,i,r);Ro.log(\"Successfully established connection to shared worker\");const d={entityType:\"external connection\",...i};a.start(),c.start();const h=((t,n,i)=>{const r=$o(n),o=new Ko(t),s=new Io(r,o,i);return s.connectSync(),window.Buffer=e.Buffer,new Wr(s)})(t,a,d);return s?.providerId&&(h.me.interop=h.Interop.connectSync(s.providerId),s?.currentContextGroup&&h.me.interop.joinContextGroup(s.currentContextGroup).catch((e=>{console.warn(`Error joining specified context group: ${s?.currentContextGroup}, continuing`,e)}))),{...h,me:{...h.me,identity:{uuid:h.me.uuid,name:h.me.name}}}}catch(e){throw new Error(`An error occured during web-interop connection: ${e.message}`)}},exports.decorators=Nn,exports.encodeOptions=o,exports.layout_constants=ai,exports.lazy=G;\n","\"use strict\";var t=require(\"./main-8cad4070.js\"),e=require(\"uuid\");require(\"buffer/\"),require(\"events\"),require(\"lodash/cloneDeep\"),require(\"lodash/isEqual\");var i={},n={};Object.defineProperty(n,\"__esModule\",{value:!0}),n.mapValuesAsync=n.mapEntriesAsync=void 0;const o=(t,[e,i])=>({...t,[e]:i});async function s(t,e){return(await Promise.all(e.map((async([e,i])=>[e,await t(i,e)])))).reduce(o,{})}n.mapEntriesAsync=s,n.mapValuesAsync=async function(t,e){let i;return i=e instanceof Map?[...e.entries()]:Object.entries(e),s(t,i)};var r,a,l,h,d=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldSet||function(t,e,i,n,o){if(\"m\"===n)throw new TypeError(\"Private method is not writable\");if(\"a\"===n&&!o)throw new TypeError(\"Private accessor was defined without a setter\");if(\"function\"==typeof e?t!==e||!o:!e.has(t))throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");return\"a\"===n?o.call(t,i):o?o.value=i:e.set(t,i),i},c=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldGet||function(t,e,i,n){if(\"a\"===i&&!n)throw new TypeError(\"Private accessor was defined without a getter\");if(\"function\"==typeof e?t!==e||!n:!e.has(t))throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");return\"m\"===i?n:\"a\"===i?n.call(t):n?n.value:e.get(t)};Object.defineProperty(i,\"__esModule\",{value:!0});var m=i.DefaultLayoutManager=void 0;const u=n;class p{constructor(t){a.set(this,void 0),l.set(this,new Map),d(this,a,t,\"f\")}size(){return c(this,l,\"f\").size}async applyLayoutSnapshot({layouts:t}){if(Object.keys(t).length>1)throw new Error(\"[LayoutManager] Tried to call applyLayoutSnapshot with more than 1 layout. When implementing multiple layouts via overridden LayoutManager class, you must override and fully implement the applyLayoutSnapshot method without calling super.applyLayoutSnapshot().\");const[[e,i]]=Object.entries(t);await p.createLayout(this,{layoutName:e,layout:i})}async showLayout({layoutName:t}){}async getLayoutSnapshot(){return{layouts:await(0,u.mapValuesAsync)((t=>t.getFrameSnapshot()),c(this,l,\"f\"))}}async removeLayout({layoutName:t}){}getLayoutIdentityForView(t){const e=[...c(this,l,\"f\").values()].find((e=>e.getCurrentViews().some((e=>e.name===t.name&&e.uuid===t.uuid))));return e?.identity??void 0}isLayoutVisible({layoutName:t}){return c(p,r,\"m\",h).call(p,this,t).isVisible()}resolveLayoutIdentity(t){if(t&&\"layoutName\"in t)return t;const e=[...c(this,l,\"f\").values()];if(1===e.length)return e[0].identity;const i=e.find((t=>t.isVisible()));return i?.identity??void 0}static async resolveLayout(t,e){const i=t.resolveLayoutIdentity(e);if(void 0===i||!(\"layoutName\"in i))throw new Error(\"[layout-manager] resolveLayout: Could not resolve the layout identity. Make sure you include 'layoutName' in the identity object.\");return c(p,r,\"m\",h).call(p,t,i.layoutName)}static async handleSharedView(t,e,i){await(0,u.mapValuesAsync)((async t=>{if(t.identity.layoutName!==e.layoutName){const e=t.getCurrentViews().find((t=>t.name===i.name));e&&await t.onViewDetached({viewIdentity:e,target:null}).catch(console.error)}}),c(t,l,\"f\"))}static async handleLastViewRemoved(t,e){await t.removeLayout(e),await c(t,a,\"f\").handleLastViewRemoved(t)}static async destroyLayout(t,{layoutName:e}){await c(p,r,\"m\",h).call(p,t,e).destroy(),c(t,l,\"f\").delete(e)}static async createLayout(t,e){const{layoutName:i}=e;if(c(t,l,\"f\").has(i))throw new Error(`Layout name ${i} already exists`);await c(t,a,\"f\").createLayout(e,t)}static registerLayout(t,e,i){c(t,l,\"f\").set(e,i)}static getAllLayouts(t){return[...c(t,l,\"f\").values()]}static setInitialSnapshot(t,e){c(t,a,\"f\").setInitialSnapshot(e)}static createClosedConstructor(...t){return class extends p{constructor(){super(...t)}}}}m=i.DefaultLayoutManager=p,r=p,a=new WeakMap,l=new WeakMap,h=function(t,e){const i=c(t,l,\"f\").get(e);if(!i)throw new Error(`[layout-manager] getLayoutByName: Could not locate layout with name '${e}'`);return i};var g={},f={},v={};Object.defineProperty(v,\"__esModule\",{value:!0}),v.ReversibleMap=void 0;v.ReversibleMap=class{constructor(){this.valueToKey=new Map,this.keyToValue=new Map,this.setUnique=(t,e)=>{if(this.hasKey(t)||this.hasValue(e))throw new Error(\"Key or value already in the map.\");this.keyToValue.set(t,e),this.valueToKey.set(e,t)},this.getKey=t=>{const e=this.valueToKey.get(t);if(!e)throw new Error(\"Value not found in the map.\");return e},this.deleteKey=t=>{const e=this.getValue(t);return this.keyToValue.delete(t),this.valueToKey.delete(e),e},this.deleteValue=t=>{const e=this.getKey(t);return this.keyToValue.delete(e),this.valueToKey.delete(t),e},this.hasKey=t=>this.keyToValue.has(t),this.hasValue=t=>this.valueToKey.has(t)}getValue(t){const e=this.keyToValue.get(t);if(!e)throw new Error(\"Key not found in the map.\");return e}},Object.defineProperty(f,\"__esModule\",{value:!0});var _=f.LayoutContentCache=void 0;const y=t.lazy,C=v;class w{constructor(){this.contentItemCache=new C.ReversibleMap,this.contentItemCacheId=0,this.createCacheKey=()=>{const t=`entity-${this.contentItemCacheId.toString()}`;return this.contentItemCacheId+=1,t},this.hasKey=t=>this.contentItemCache.hasKey(t),this.getItemOrUndefined=t=>{try{return this.getContentItemOrThrow(t)}catch(t){return}},this.getContentItemOrThrow=(t,e)=>{if(!this.contentItemCache.hasKey(t))throw new Error(\"Layout component has been destroyed or detached from the current layout.\");const i=this.contentItemCache.getValue(t);if(e&&!e.includes(i.type))throw new Error(`Layout item is not the expected type. Expected ${e.join(\", \")}, got ${i.type}.`);return i},this.getOrCreateEntityId=t=>{if(this.contentItemCache.hasValue(t))return this.contentItemCache.getKey(t);t.onDestroyed((()=>{this.contentItemCache.deleteValue(t)}));const e=this.createCacheKey();return this.contentItemCache.setUnique(e,t),e}}static getSingleInstance(){return w.singleton.getValue()}}_=f.LayoutContentCache=w,w.singleton=new y.Lazy((()=>new w));var I={},b={};!function(t){Object.defineProperty(t,\"__esModule\",{value:!0}),t.getAdjacentStacks=t.doShareEdge=t.getAdjacentItem=void 0;t.getAdjacentItem=(e,i)=>{const{parent:n}=e;if(e.isRoot()||!n)return;const o=[\"top\",\"bottom\"].includes(i)?\"column\":\"row\",s=[\"top\",\"left\"].includes(i)?-1:1;if(n.type===o){const t=n.contentItems.indexOf(e)+s;if(t>=0&&t{const n=t.getBounds(),o=e.getBounds();if(!n||!o)return!1;if([\"top\",\"bottom\"].includes(i)){return!(n.righto.right)}return!(n.bottomo.bottom)};t.getAdjacentStacks=(e,i)=>{const n=[\"top\",\"bottom\"].includes(i)?\"row\":\"column\",o=s=>\"stack\"===s.type?(0,t.doShareEdge)(e,s,i)?[s]:[]:\"root\"===s.type||\"ground\"===s.type?[]:s.type===n?s.contentItems.map((t=>o(t))).flat():s.type!==n?[\"top\",\"right\"].includes(i)?o(s.contentItems[s.contentItems.length-1]):o(s.contentItems[0]):[],s=(0,t.getAdjacentItem)(e,i);return s?o(s):[]}}(b);var S=t.commonjsGlobal&&t.commonjsGlobal.__decorate||function(t,e,i,n){var o,s=arguments.length,r=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if(\"object\"==typeof Reflect&&\"function\"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(s<3?o(r):s>3?o(e,i,r):o(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};Object.defineProperty(I,\"__esModule\",{value:!0}),I.LayoutEntitiesController=void 0;const E=t.decorators,x=b,L=i;class z{constructor(t,e,i){this.wire=t,this.layoutManager=e,this.layoutContentCache=i,this.analytics=t=>{this.wire.sendAction(`layout-controller-${t}`).catch((()=>{}))},this.getLayoutIdentityForViewOrThrow=async t=>{const e=this.layoutManager.getLayoutIdentityForView(t);if(!e)throw new Error(`View identity ${t.name} is not attached to any layouts.`);return e},this.getRoot=async t=>{this.analytics(\"get-root\");const e=(await this.getLayout(t)).getRoot();return{type:e.type,entityId:this.layoutContentCache.getOrCreateEntityId(e)}},this.getStackByView=async t=>{this.analytics(\"get-stack-by-view\");const e=await this.getLayoutIdentityForViewOrThrow(t),i=(await this.getLayout(e)).getStackByView(t);if(\"stack\"===i?.type)return{entityId:this.layoutContentCache.getOrCreateEntityId(i),type:\"stack\"}},this.getStackViews=t=>{this.analytics(\"get-stack-views\");return this.layoutContentCache.getContentItemOrThrow(t,[\"stack\"]).contentItems.map((t=>({name:t.viewName,uuid:this.wire.me.uuid})))},this.isRoot=t=>{this.analytics(\"is-root\");return this.layoutContentCache.getContentItemOrThrow(t).isRoot()},this.exists=t=>(this.analytics(\"exists\"),this.layoutContentCache.hasKey(t)),this.addViewToStack=async(t,e,{index:i}={index:0})=>{this.analytics(\"add-view-to-stack\");const n=this.layoutContentCache.getContentItemOrThrow(t);if(i&&i>n.contentItems.length+1)throw new Error(`Index '${i}' out of range, please exclude the index or specify a number between 0 and ${n.contentItems.length}`);const o={id:t,index:i},{identity:s}=await n.layout.platformCreateView(e,{location:o});return s},this.findViewInStack=(t,e)=>t.contentItems.find((t=>t.viewName===e.name)),this.removeViewFromStack=async(t,e)=>{this.analytics(\"remove-view-from-stack\");const i=this.layoutContentCache.getContentItemOrThrow(t,[\"stack\"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to remove a view ('${e.name}') which does not belong to the stack.`);await n.layout.platformCloseView(e)},this.createAdjacentStack=async(t,e,{position:i=\"right\"}={})=>{if(this.analytics(\"create-adjacent-stack\"),!Array.isArray(e)||0===e.length)throw new Error('The parameter \"views\" must be an array with at least 1 element.');if(![\"top\",\"bottom\",\"left\",\"right\"].includes(i))throw new Error(`Invalid position '${i}' specified.`);const n=this.layoutContentCache.getContentItemOrThrow(t).createAdjacentStack({position:i}),o=this.layoutContentCache.getOrCreateEntityId(n);return await Promise.all(e.reverse().map((t=>this.addViewToStack(o,t)))),o},this.getAdjacentStacks=async({targetId:t,edge:e})=>{this.analytics(\"get-adjacent-stacks\");const i=this.layoutContentCache.getContentItemOrThrow(t);return(0,x.getAdjacentStacks)(i,e).map((t=>({entityId:this.layoutContentCache.getOrCreateEntityId(t)})))},this.setStackActiveView=async(t,e)=>{this.analytics(\"set-stack-active-view\");const i=this.layoutContentCache.getContentItemOrThrow(t,[\"stack\"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to set a view ('${e.name}') as active when it does not belong to the stack.`);i.setActiveContentItem(n,!0)}}async getLayout(t){const e=await L.DefaultLayoutManager.resolveLayout(this.layoutManager,t);if(!e)throw new Error(`Could not resolve target layout identity ${JSON.stringify(t)}`);return e}getContent(t){this.analytics(\"get-content\");return this.layoutContentCache.getContentItemOrThrow(t,[\"column\",\"row\"]).contentItems.map((t=>({type:t.type,entityId:this.layoutContentCache.getOrCreateEntityId(t)})))}getParent(t){this.analytics(\"get-parent\");const e=this.layoutContentCache.getContentItemOrThrow(t);if(!e.isRoot())return e.parent?.contentItems.includes(e)?{type:e.parent.type,entityId:this.layoutContentCache.getOrCreateEntityId(e.parent)}:void 0}}S([(0,E.expose)()],z.prototype,\"getLayoutIdentityForViewOrThrow\",void 0),S([(0,E.expose)()],z.prototype,\"getRoot\",void 0),S([(0,E.expose)()],z.prototype,\"getStackByView\",void 0),S([(0,E.expose)()],z.prototype,\"getStackViews\",void 0),S([(0,E.expose)()],z.prototype,\"getContent\",null),S([(0,E.expose)()],z.prototype,\"getParent\",null),S([(0,E.expose)()],z.prototype,\"isRoot\",void 0),S([(0,E.expose)()],z.prototype,\"exists\",void 0),S([(0,E.expose)()],z.prototype,\"addViewToStack\",void 0),S([(0,E.expose)()],z.prototype,\"removeViewFromStack\",void 0),S([(0,E.expose)()],z.prototype,\"createAdjacentStack\",void 0),S([(0,E.expose)()],z.prototype,\"getAdjacentStacks\",void 0),S([(0,E.expose)()],z.prototype,\"setStackActiveView\",void 0),I.LayoutEntitiesController=z,Object.defineProperty(g,\"__esModule\",{value:!0});var M=g.initLayoutEndpoints=void 0;const P=t.apiExposer,T=t.layout_constants,A=f,k=I,D=i;M=g.initLayoutEndpoints=async function(t,e){const i=t.getFin(),n=await i.Platform.getCurrentSync().getClient(),o=new P.ChannelsExposer(n);await new P.ApiExposer(o).exposeInstance(new k.LayoutEntitiesController(t,e,A.LayoutContentCache.getSingleInstance()),{id:T.LAYOUT_CONTROLLER_ID}),await async function(t,e){const i=t=>async i=>{const n=await D.DefaultLayoutManager.resolveLayout(e,i.target);if(!n)throw new Error(`Could not resolve the layout target from payload ${JSON.stringify(i)}`);return t(n,i)},n=(e,n)=>{t.register(e,i(n))},o=(t,e)=>{n(t,e)};n(\"replace-view\",((t,e)=>t.replaceView(e))),n(\"replace-layout\",((t,{layout:e})=>t.replaceLayout(e))),n(\"add-view\",((t,e)=>t.insertView(e))),o(\"layout-add-view\",((t,{viewOptions:e,location:i,targetView:n})=>t.platformCreateView(e,{location:i,targetView:n}))),n(\"close-view\",((t,e)=>t.cleanupView(e.viewIdentity))),o(\"layout-close-view\",((t,e)=>t.platformCloseView(e.viewIdentity))),n(\"apply-preset-layout\",((t,e)=>t.applyPreset(e))),n(\"get-layout-views\",(t=>t.getCurrentViews())),n(\"get-frame-snapshot\",(t=>t.getFrameSnapshot())),n(\"is-visible\",(t=>t.isVisible())),n(\"destroy\",(t=>t.destroy())),t.register(\"get-layout-snapshot\",(()=>e.getLayoutSnapshot()))}(n,e)};var R={};Object.defineProperty(R,\"__esModule\",{value:!0});var U=R.BaseLayout=void 0;U=R.BaseLayout=class{};var O={};Object.defineProperty(O,\"__esModule\",{value:!0});var V=O.DOMEmitter=void 0;V=O.DOMEmitter=class{constructor(t){this.container=t}dispatchLocalEvent(t,e){const i={...e,type:t,tabSelector:`tab-${e.name}`,containerSelector:`container-${e.name}`,topic:\"openfin-DOM-event\"};this.container.dispatchEvent(new CustomEvent(t,{detail:i}))}};var B={};Object.defineProperty(B,\"__esModule\",{value:!0});var H=B.mapLayoutContentItemsImmutableSync=B.mapLayoutContentItemsImmutable=W=B.isVisible=void 0;var W=B.isVisible=t=>(0!==t.offsetWidth||0!==t.offsetHeight)&&\"hidden\"!==window.getComputedStyle(t).visibility&&t.offsetTop>=0&&t.offsetLeft>=0&&t.offsetTop<=window.innerHeight&&t.offsetLeft<=window.innerWidth;const F=t=>\"type\"in t&&\"component\"===t.type;B.mapLayoutContentItemsImmutable=async function t(e,i){return F(i)?e(i):{...i,content:await Promise.all(i.content?.map((i=>t(e,i))))}},H=B.mapLayoutContentItemsImmutableSync=function t(e,i){return F(i)?e(i):{...i,content:i.content?.map((i=>t(e,i)))}};class N extends Error{constructor(t,e){super(e),this.type=t}}class G extends N{constructor(t,e){super(\"Configuration\",t),this.node=e}}class j extends N{constructor(t){super(\"PopoutBlocked\",t)}}class $ extends N{constructor(t){super(\"API\",t)}}class Z extends N{constructor(t){super(\"Bind\",t)}}class q extends Error{constructor(t,e,i){super(`${t}: ${e}${void 0===i?\"\":\": \"+i}`)}}class X extends q{constructor(t,e){super(\"Assert\",t,e)}}class Y extends q{constructor(t,e,i){super(\"UnreachableCase\",t,`${e}${void 0===i?\"\":\": \"+i}`)}}class K extends q{constructor(t,e){super(\"UnexpectedNull\",t,e)}}class J extends q{constructor(t,e){super(\"UnexpectedUndefined\",t,e)}}var Q;!function(t){let e=!1;const i={PopoutCannotBeCreatedWithGroundItemConfig:{id:0,default:\"Popout cannot be created with ground ItemConfig\"},PleaseRegisterAConstructorFunction:{id:1,default:\"Please register a constructor function\"},ComponentTypeNotRegisteredAndBindComponentEventHandlerNotAssigned:{id:2,default:\"Component type not registered and BindComponentEvent handler not assigned\"},ComponentIsAlreadyRegistered:{id:3,default:\"Component is already registered\"},ComponentIsNotVirtuable:{id:4,default:\"Component is not virtuable. Requires rootHtmlElement field/getter\"},VirtualComponentDoesNotHaveRootHtmlElement:{id:5,default:'Virtual component does not have getter \"rootHtmlElement\"'},ItemConfigIsNotTypeComponent:{id:6,default:\"ItemConfig is not of type component\"},InvalidNumberPartInSizeString:{id:7,default:\"Invalid number part in size string\"},UnknownUnitInSizeString:{id:8,default:\"Unknown unit in size string\"},UnsupportedUnitInSizeString:{id:9,default:\"Unsupported unit in size string\"}};t.idCount=Object.keys(i).length;const n=Object.values(i);t.checkInitialise=function(){if(!e)for(let e=0;e=\"0\"&&t<=\"9\"}function Tt(t,e){const i=zt(e);t.style.width=i}function At(t,e){const i=zt(e);t.style.height=i}function kt(t){return{width:t.offsetWidth,height:t.offsetHeight}}function Dt(t,e){t.style.display=e?\"\":\"none\"}function Rt(t,e){if(void 0!==e)for(const i in e)if(e.hasOwnProperty(i)){const n=e[i],o=t[i];t[i]=Ut(o,n)}return t}function Ut(t,e){if(\"object\"!=typeof e)return e;if(Array.isArray(e)){const t=e.length,i=new Array(t);for(let n=0;n36)throw new Error(\"Too many keys in config minifier map\")},t.translateObject=n}(dt||(dt={})),function(t){t.defaults={type:at.ground,content:[],size:1,sizeUnit:ht.Fractional,minSize:void 0,minSizeUnit:ht.Pixel,id:\"\",isClosable:!0},t.createCopy=function(t,e){switch(t.type){case at.ground:case at.row:case at.column:return gt.createCopy(t,e);case at.stack:return ut.createCopy(t,e);case at.component:return pt.createCopy(t);default:throw new Y(\"CICC91354\",t.type,\"Invalid Config Item type specified\")}},t.createDefault=function(t){switch(t){case at.ground:throw new X(\"CICCDR91562\");case at.row:case at.column:return gt.createDefault(t);case at.stack:return ut.createDefault();case at.component:return pt.createDefault();default:throw new Y(\"CICCDD91563\",t,\"Invalid Config Item type specified\")}},t.isComponentItem=function(t){return t.type===at.component},t.isStackItem=function(t){return t.type===at.stack},t.isGroundItem=function(t){return t.type===at.ground}}(ct||(ct={})),function(t){t.defaultMaximised=!1,function(t){t.createCopy=function(t,e){return void 0===t?void 0:{show:null!=e?e:t.show,popout:t.popout,close:t.close,maximise:t.maximise,minimise:t.minimise,tabDropdown:t.tabDropdown}}}(t.Header||(t.Header={}))}(mt||(mt={})),function(t){function e(t){const e=t.length,i=new Array(e);for(let n=0;n\"__glMaximised\"===t));t>0&&(o=!0,n=n.splice(t,1)),e=n.length>0?n[0]:ct.defaults.id}else e=n;return i=void 0!==t.maximised?t.maximised:o,{id:e,maximised:i}}}(wt||(wt={})),function(t){function e(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0;return{resolved:!0,root:Et.resolve(i),openPopouts:t.resolveOpenPopouts(e.openPopouts),dimensions:t.Dimensions.resolve(e.dimensions),settings:t.Settings.resolve(e.settings),header:t.Header.resolve(e.header,e.settings,e.labels)}}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:Lt.fromResolvedArray(e.openPopouts),settings:_t.Settings.createCopy(e.settings),dimensions:t.Dimensions.fromResolved(e.dimensions),header:_t.Header.createCopy(e.header)}},t.isResolved=function(t){const e=t;return void 0!==e.resolved&&!0===e.resolved},t.resolveOpenPopouts=function(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0,{root:Et.resolve(o),openPopouts:xt.resolveOpenPopouts(e.openPopouts),dimensions:xt.Dimensions.resolve(e.dimensions),settings:xt.Settings.resolve(e.settings),header:xt.Header.resolve(e.header,e.settings,e.labels),parentId:null!==(i=e.parentId)&&void 0!==i?i:null,indexInParent:null!==(n=e.indexInParent)&&void 0!==n?n:null,window:t.Window.resolve(e.window,e.dimensions),resolved:!0}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:i(e.openPopouts),dimensions:xt.Dimensions.fromResolved(e.dimensions),settings:_t.Settings.createCopy(e.settings),header:_t.Header.createCopy(e.header),parentId:e.parentId,indexInParent:e.indexInParent,window:t.Window.fromResolved(e.window)}},t.fromResolvedArray=i}(Lt||(Lt={}));class Wt{constructor(){this._allEventSubscriptions=[],this._subscriptionsMap=new Map,this.unbind=this.removeEventListener,this.trigger=this.emit}tryBubbleEvent(t,e){}emit(t,...e){let i=this._subscriptionsMap.get(t);if(void 0!==i){i=i.slice();for(let t=0;t0){const n=e.slice();n.unshift(t);const o=this._allEventSubscriptions.slice();for(let t=0;t0?n.contentItems[0]:n,e=0);const o=this._layoutManager.createAndInitContentItem(i,t);t.addChild(o,e),this._layoutManager.layoutConfig.settings.popInOnClose?this._onClose():this.close()}createWindow(){const t=this.createUrl(),e=Math.floor(1e6*Math.random()).toString(36),i=this.serializeWindowFeatures({width:this._initialWindowSize.width,height:this._initialWindowSize.height,innerWidth:this._initialWindowSize.width,innerHeight:this._initialWindowSize.height,menubar:\"no\",toolbar:\"no\",location:\"no\",personalbar:\"no\",resizable:\"yes\",scrollbars:\"no\",status:\"no\"});if(this._popoutWindow=globalThis.open(t,e,i),this._popoutWindow)this._popoutWindow.addEventListener(\"load\",(()=>this.positionWindow()),{passive:!0}),this._popoutWindow.addEventListener(\"beforeunload\",(()=>{this._layoutManager.layoutConfig.settings.popInOnClose?this.popIn():this._onClose()}),{passive:!0}),this._checkReadyInterval=setInterval((()=>this.checkReady()),10);else if(!0===this._layoutManager.layoutConfig.settings.blockedPopoutsThrowError){throw new j(\"Popout blocked\")}}checkReady(){if(null===this._popoutWindow)throw new K(\"BPCR01844\");this._popoutWindow.__glInstance&&this._popoutWindow.__glInstance.isInitialised&&(this.onInitialised(),void 0!==this._checkReadyInterval&&(clearInterval(this._checkReadyInterval),this._checkReadyInterval=void 0))}serializeWindowFeatures(t){const e=[];for(const i in t)e.push(i+\"=\"+t[i].toString());return e.join(\",\")}createUrl(){const t=\"gl-window-config-\"+Ot(),e=_t.minifyConfig(this._config);try{localStorage.setItem(t,JSON.stringify(e))}catch(t){throw new Error(\"Error while writing to localStorage \"+function(t){return t instanceof Error?t.message:\"string\"==typeof t?t:\"Unknown Error\"}(t))}const i=new URL(location.href);return i.searchParams.set(\"gl-window\",t),i.toString()}positionWindow(){if(null===this._popoutWindow)throw new Error(\"BrowserPopout.positionWindow: null popoutWindow\");this._popoutWindow.moveTo(this._initialWindowSize.left,this._initialWindowSize.top),this._popoutWindow.focus()}onInitialised(){this._isInitialised=!0,this.getGlInstance().on(\"popIn\",(()=>this.popIn())),this.emit(\"initialised\")}_onClose(){setTimeout((()=>this.emit(\"closed\")),50)}}class Gt extends Wt{constructor(t,e,i,n){super(),this.layoutManager=t,this._parent=i,this._element=n,this._popInParentIds=[],this._type=e.type,this._id=e.id,this._isInitialised=!1,this.isGround=!1,this.isRow=!1,this.isColumn=!1,this.isStack=!1,this.isComponent=!1,this.size=e.size,this.sizeUnit=e.sizeUnit,this.minSize=e.minSize,this.minSizeUnit=e.minSizeUnit,this._isClosable=e.isClosable,this._pendingEventPropagations={},this._throttledEvents=[\"stateChanged\"],this._contentItems=this.createContentItems(e.content)}get type(){return this._type}get id(){return this._id}set id(t){this._id=t}get popInParentIds(){return this._popInParentIds}get parent(){return this._parent}get contentItems(){return this._contentItems}get isClosable(){return this._isClosable}get element(){return this._element}get isInitialised(){return this._isInitialised}static isStack(t){return t.isStack}static isComponentItem(t){return t.isComponent}static isComponentParentableItem(t){return t.isStack||t.isGround}removeChild(t,e=!1){const i=this._contentItems.indexOf(t);if(-1===i)throw new Error(\"Can't remove child item. Unknown content item\");if(e||this._contentItems[i].destroy(),this._contentItems.splice(i,1),this._contentItems.length>0)this.updateSize(!1);else if(!this.isGround&&!0===this._isClosable){if(null===this._parent)throw new K(\"CIUC00874\");this._parent.removeChild(this)}}addChild(t,e,i){return null!=e||(e=this._contentItems.length),this._contentItems.splice(e,0,t),t.setParent(this),!0===this._isInitialised&&!1===t._isInitialised&&t.init(),e}replaceChild(t,e,i=!1){const n=this._contentItems.indexOf(t),o=t._element.parentNode;if(-1===n)throw new X(\"CIRCI23232\",\"Can't replace child. oldChild is not child of this\");if(null===o)throw new K(\"CIRCP23232\");if(o.replaceChild(e._element,t._element),!0===i&&(t._parent=null,t.destroy()),this._contentItems[n]=e,e.setParent(this),e.size=t.size,e.sizeUnit=t.sizeUnit,e.minSize=t.minSize,e.minSizeUnit=t.minSizeUnit,null===e._parent)throw new K(\"CIRCNC45699\");!0===e._parent._isInitialised&&!1===e._isInitialised&&e.init(),this.updateSize(!1)}remove(){if(null===this._parent)throw new K(\"CIR11110\");this._parent.removeChild(this)}popout(){const t=Ot(),e=this.layoutManager.createPopoutFromContentItem(this,void 0,t,void 0);return this.emitBaseBubblingEvent(\"stateChanged\"),e}calculateConfigContent(){const t=this._contentItems,e=t.length,i=new Array(e);for(let n=0;nthis.propagateEventToLayoutManager(t,e))))}propagateEventToLayoutManager(t,e){this._pendingEventPropagations[t]=!1,this.layoutManager.emitUnknown(t,e)}}class jt extends Gt{constructor(t,e,i){super(t,e,i,document.createElement(\"div\")),this._parentItem=i,this._focused=!1,this.isComponent=!0,this._reorderEnabled=e.reorderEnabled,this.applyUpdatableConfig(e),this._initialWantMaximise=e.maximised;const n=document.createElement(\"div\");n.classList.add(\"lm_content\"),this.element.appendChild(n),this._container=new Ft(e,this,t,n,(t=>this.handleUpdateItemConfigEvent(t)),(()=>this.show()),(()=>this.hide()),(t=>this.focus(t)),(t=>this.blur(t)))}get componentName(){return this._container.componentType}get componentType(){return this._container.componentType}get reorderEnabled(){return this._reorderEnabled}get initialWantMaximise(){return this._initialWantMaximise}get component(){return this._container.component}get container(){return this._container}get parentItem(){return this._parentItem}get headerConfig(){return this._headerConfig}get title(){return this._title}get tab(){return this._tab}get focused(){return this._focused}destroy(){this._container.destroy(),super.destroy()}applyUpdatableConfig(t){this.setTitle(t.title),this._headerConfig=t.header}toConfig(){const t=this._container.stateRequestEvent,e=void 0===t?this._container.state:t();return{type:at.component,content:[],size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,maximised:!1,isClosable:this.isClosable,reorderEnabled:this._reorderEnabled,title:this._title,header:mt.Header.createCopy(this._headerConfig),componentType:pt.copyComponentType(this.componentType),componentState:e}}close(){if(null===this.parent)throw new K(\"CIC68883\");this.parent.removeChild(this,!1)}enterDragMode(t,e){Tt(this.element,t),At(this.element,e),this._container.enterDragMode(t,e)}exitDragMode(){this._container.exitDragMode()}enterStackMaximised(){this._container.enterStackMaximised()}exitStackMaximised(){this._container.exitStackMaximised()}drag(){this._container.drag()}updateSize(t){this.updateNodeSize(t)}init(){this.updateNodeSize(!1),super.init(),this._container.emit(\"open\"),this.initContentItems()}setTitle(t){this._title=t,this.emit(\"titleChanged\",t),this.emit(\"stateChanged\")}setTab(t){this._tab=t,this.emit(\"tab\",t),this._container.setTab(t)}hide(){super.hide(),this._container.setVisibility(!1)}show(){super.show(),this._container.setVisibility(!0)}focus(t=!1){this.parentItem.setActiveComponentItem(this,!0,t)}setFocused(t){this._focused=!0,this.tab.setFocused(),t||this.emitBaseBubblingEvent(\"focus\")}blur(t=!1){this._focused&&this.layoutManager.setFocusedComponentItem(void 0,t)}setBlurred(t){this._focused=!1,this.tab.setBlurred(),t||this.emitBaseBubblingEvent(\"blur\")}setParent(t){this._parentItem=t,super.setParent(t)}handleUpdateItemConfigEvent(t){this.applyUpdatableConfig(t)}updateNodeSize(t){if(\"none\"!==this.element.style.display){const{width:e,height:i}=kt(this.element);this._container.setSizeToNodeSize(e,i,t)}}}class $t extends Gt{constructor(){super(...arguments),this._focused=!1}get focused(){return this._focused}setFocusedValue(t){this._focused=t}}class Zt extends Wt{constructor(t,e){super(),this._eElement=t,this._pointerTracking=!1,this._pointerDownEventListener=t=>this.onPointerDown(t),this._pointerMoveEventListener=t=>this.onPointerMove(t),this._pointerUpEventListener=t=>this.onPointerUp(t),this._timeout=void 0,this._allowableTargets=[t,...e],this._oDocument=document,this._eBody=document.body,this._nDelay=1800,this._nDistance=10,this._nX=0,this._nY=0,this._nOriginalX=0,this._nOriginalY=0,this._dragging=!1,this._eElement.addEventListener(\"pointerdown\",this._pointerDownEventListener,{passive:!0})}destroy(){this.checkRemovePointerTrackingEventListeners(),this._eElement.removeEventListener(\"pointerdown\",this._pointerDownEventListener)}cancelDrag(){this.processDragStop(void 0)}onPointerDown(t){if(this._allowableTargets.includes(t.target)&&t.isPrimary){const e=this.getPointerCoordinates(t);this.processPointerDown(e)}}processPointerDown(t){this._nOriginalX=t.x,this._nOriginalY=t.y,this._oDocument.addEventListener(\"pointermove\",this._pointerMoveEventListener),this._oDocument.addEventListener(\"pointerup\",this._pointerUpEventListener,{passive:!0}),this._pointerTracking=!0,this._timeout=setTimeout((()=>{try{this.startDrag()}catch(t){throw console.error(t),t}}),this._nDelay)}onPointerMove(t){this._pointerTracking&&(this.processDragMove(t),t.preventDefault())}processDragMove(t){this._nX=t.pageX-this._nOriginalX,this._nY=t.pageY-this._nOriginalY,!1===this._dragging&&(Math.abs(this._nX)>this._nDistance||Math.abs(this._nY)>this._nDistance)&&this.startDrag(),this._dragging&&this.emit(\"drag\",this._nX,this._nY,t)}onPointerUp(t){this.processDragStop(t)}processDragStop(t){var e;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this.checkRemovePointerTrackingEventListeners(),!0===this._dragging&&(this._eBody.classList.remove(\"lm_dragging\"),this._eElement.classList.remove(\"lm_dragging\"),null===(e=this._oDocument.querySelector(\"iframe\"))||void 0===e||e.style.setProperty(\"pointer-events\",\"\"),this._dragging=!1,this.emit(\"dragStop\",t))}checkRemovePointerTrackingEventListeners(){this._pointerTracking&&(this._oDocument.removeEventListener(\"pointermove\",this._pointerMoveEventListener),this._oDocument.removeEventListener(\"pointerup\",this._pointerUpEventListener),this._pointerTracking=!1)}startDrag(){var t;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this._dragging=!0,this._eBody.classList.add(\"lm_dragging\"),this._eElement.classList.add(\"lm_dragging\"),null===(t=this._oDocument.querySelector(\"iframe\"))||void 0===t||t.style.setProperty(\"pointer-events\",\"none\"),this.emit(\"dragStart\",this._nOriginalX,this._nOriginalY)}getPointerCoordinates(t){return{x:t.pageX,y:t.pageY}}}class qt{constructor(t,e,i){this._isVertical=t,this._size=e,this._grabSize=i0){const i=this.createSplitter(Math.max(0,e-1)).element;e>0?(this.contentItems[e-1].element.insertAdjacentElement(\"afterend\",i),i.insertAdjacentElement(\"afterend\",t.element)):(this.contentItems[0].element.insertAdjacentElement(\"beforebegin\",i),i.insertAdjacentElement(\"beforebegin\",t.element))}else this._childElementContainer.appendChild(t.element);super.addChild(t,e);const n=1/this.contentItems.length*100;if(!0===i)return this.emitBaseBubblingEvent(\"stateChanged\"),e;for(let e=0;e0&&(this.calculateRelativeSizes(),this.setAbsoluteSizes()),this.emitBaseBubblingEvent(\"stateChanged\"),this.emit(\"resize\")}setAbsoluteSizes(){const t=this.calculateAbsoluteSizes();for(let e=0;e0&&t.itemSizes[e]++,this._isColumn?(Tt(this.contentItems[e].element,t.crossAxisSize),At(this.contentItems[e].element,t.itemSizes[e])):(Tt(this.contentItems[e].element,t.itemSizes[e]),At(this.contentItems[e].element,t.crossAxisSize))}calculateAbsoluteSizes(){const t=(this.contentItems.length-1)*this._splitterSize,{width:e,height:i}=kt(this.element);let n,o;this._isColumn?(n=i-t,o=e):(n=e-t,o=i);let s=0;const r=[];for(let t=0;t0){const n=100-t;for(let t=0;t100&&e.length>0){for(let t=0;te)return;{const r=i/e;let a=i;for(let e=0;ethis.onSplitterDrag(e,t,i))),e.on(\"dragStop\",(()=>this.onSplitterDragStop(e))),e.on(\"dragStart\",(()=>this.onSplitterDragStart(e))),this._splitter.splice(t,0,e),e}getSplitItems(t){const e=this._splitter.indexOf(t);return{before:this.contentItems[e],after:this.contentItems[e+1]}}calculateContentItemMinSize(t){const e=t.minSize;if(void 0!==e){if(t.minSizeUnit===ht.Pixel)return e;throw new X(\"ROCGMD98831\",JSON.stringify(t))}{const t=this.layoutManager.layoutConfig.dimensions;return this._isColumn?t.defaultMinItemHeight:t.defaultMinItemWidth}}calculateContentItemsTotalMinSize(t){let e=0;for(const i of t)e+=this.calculateContentItemMinSize(i);return e}onSplitterDragStart(t){const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=this.calculateContentItemsTotalMinSize(e.before.contentItems),s=this.calculateContentItemsTotalMinSize(e.after.contentItems);this._splitterPosition=0,this._splitterMinPosition=-1*(i-o),this._splitterMaxPosition=n-s}onSplitterDrag(t,e,i){let n=this._isColumn?i:e;if(null===this._splitterMinPosition||null===this._splitterMaxPosition)throw new K(\"ROCOSD59226\");n=Math.max(n,this._splitterMinPosition),n=Math.min(n,this._splitterMaxPosition),this._splitterPosition=n;const o=zt(n);this._isColumn?t.element.style.top=o:t.element.style.left=o}onSplitterDragStop(t){if(null===this._splitterPosition)throw new K(\"ROCOSDS66932\");{const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=(this._splitterPosition+i)/(i+n),s=e.before.size+e.after.size;e.before.size=o*s,e.after.size=(1-o)*s,t.element.style.top=zt(0),t.element.style.left=zt(0),globalThis.requestAnimationFrame((()=>this.updateSize(!1)))}}}!function(t){t.getElementDimensionSize=function(t,e){return\"width\"===e?function(t){return t.offsetWidth}(t):function(t){return t.offsetHeight}(t)},t.setElementDimensionSize=function(t,e,i){return\"width\"===e?Tt(t,i):At(t,i)},t.createElement=function(t,e){const i=t.createElement(\"div\");return i.classList.add(\"lm_item\"),e?i.classList.add(\"lm_column\"):i.classList.add(\"lm_row\"),i}}(Xt||(Xt={}));class Yt extends $t{constructor(t,e,i){super(t,vt.create(e),null,Yt.createElement(document)),this.isGround=!0,this._childElementContainer=this.element,this._containerElement=i;let n=null;for(;;){const t=n?n.previousSibling:this._containerElement.lastChild;if(!(t instanceof Element&&t.classList.contains(\"lm_content\")))break;n=t}this._containerElement.insertBefore(this.element,n)}init(){if(!0!==this.isInitialised){this.updateNodeSize();for(let t=0;t0?this.contentItems[0]:this,n.isComponent)throw new Error(\"Cannot add item as child to ComponentItem\");{const t=this.layoutManager.createAndInitContentItem(i,n);return e=n.addChild(t,e),n===this?-1:e}}loadComponentAsRoot(t){this.clearRoot();const e=Ct.resolve(t,!1);if(e.maximised)throw new Error(\"Root Component cannot be maximised\");{const t=new jt(this.layoutManager,e,this);t.init(),this.addChild(t,0)}}addChild(t,e){if(this.contentItems.length>0)throw new Error(\"Ground node can only have a single child\");return this._childElementContainer.appendChild(t.element),e=super.addChild(t,e),this.updateSize(!1),this.emitBaseBubblingEvent(\"stateChanged\"),e}calculateConfigContent(){const t=this.contentItems,e=t.length,i=new Array(e);for(let n=0;n0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e)),this.updateContentItemsSize(!1))}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}createSideAreas(){const t=Yt.Area.oppositeSides,e=new Array(Object.keys(t).length);let i=0;for(const n in t){const o=n,s=this.getElementArea();if(null===s)throw new K(\"RCSA77553\");s.side=o,\"2\"===t[o][1]?s[o]=s[t[o]]-50:s[o]=s[t[o]]+50,s.surface=(s.x2-s.x1)*(s.y2-s.y1),e[i++]=s}return e}highlightDropZone(t,e,i){this.layoutManager.tabDropPlaceholder.remove(),super.highlightDropZone(t,e,i)}onDrop(t,e){if(t.isComponent){const e=ut.createDefault(),i=t;e.header=mt.Header.createCopy(i.headerConfig);const n=this.layoutManager.createAndInitContentItem(e,this);n.addChild(t),t=n}if(0===this.contentItems.length)this.addChild(t);else{if(t.type===at.row||t.type===at.column){const e=ut.createDefault(),i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}const i=\"x\"==e.side[0]?at.row:at.column,n=\"2\"==e.side[1],o=this.contentItems[0];if(o instanceof Xt&&o.type===i){const e=o.contentItems[n?0:o.contentItems.length-1];o.addChild(t,n?0:void 0,!0),e.size*=.5,t.size=e.size,t.sizeUnit=ht.Percent,o.updateSize(!1)}else{const e=ct.createDefault(i),s=this.layoutManager.createContentItem(e,this);this.replaceChild(o,s),s.addChild(t,n?0:void 0,!0),s.addChild(o,n?void 0:0,!0),o.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}}dock(){throw new X(\"GID87731\")}validateDocking(){throw new X(\"GIVD87732\")}getAllContentItems(){const t=[this];return this.deepGetAllContentItems(this.contentItems,t),t}getConfigMaximisedItems(){const t=[];return this.deepFilterContentItems(this.contentItems,t,(t=>!(!Gt.isStack(t)||!t.initialWantMaximise)||!(!Gt.isComponentItem(t)||!t.initialWantMaximise))),t}getItemsByPopInParentId(t){const e=[];return this.deepFilterContentItems(this.contentItems,e,(e=>e.popInParentIds.includes(t))),e}toConfig(){throw new Error(\"Cannot generate GroundItem config\")}setActiveComponentItem(t,e,i){}updateNodeSize(){const{width:t,height:e}=kt(this._containerElement);Tt(this.element,t),At(this.element,e),this.contentItems.length>0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e))}deepGetAllContentItems(t,e){for(let i=0;ithis.onClick(t),this._touchStartEventListener=t=>this.onTouchStart(t),this._element=document.createElement(\"div\"),this._element.classList.add(i),this._element.title=e,this._header.on(\"destroy\",(()=>this.destroy())),this._element.addEventListener(\"click\",this._clickEventListener,{passive:!0}),this._element.addEventListener(\"touchstart\",this._touchStartEventListener,{passive:!0}),this._header.controlsContainerElement.appendChild(this._element)}get element(){return this._element}destroy(){var t;this._element.removeEventListener(\"click\",this._clickEventListener),this._element.removeEventListener(\"touchstart\",this._touchStartEventListener),null===(t=this._element.parentNode)||void 0===t||t.removeChild(this._element)}onClick(t){this._pushEvent(t)}onTouchStart(t){this._pushEvent(t)}}class Jt{constructor(t,e,i,n,o){var s;this._layoutManager=t,this._componentItem=e,this._closeEvent=i,this._focusEvent=n,this._dragStartEvent=o,this._isActive=!1,this._tabClickListener=t=>this.onTabClickDown(t),this._tabTouchStartListener=t=>this.onTabTouchStart(t),this._closeClickListener=()=>this.onCloseClick(),this._closeTouchStartListener=()=>this.onCloseTouchStart(),this._dragStartListener=(t,e)=>this.onDragStart(t,e),this._contentItemDestroyListener=()=>this.onContentItemDestroy(),this._tabTitleChangedListener=t=>this.setTitle(t),this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_tab\"),this._titleElement=document.createElement(\"span\"),this._titleElement.classList.add(\"lm_title\"),this._closeElement=document.createElement(\"div\"),this._closeElement.classList.add(\"lm_close_tab\"),this._element.appendChild(this._titleElement),this._element.appendChild(this._closeElement),e.isClosable?this._closeElement.style.display=\"\":this._closeElement.style.display=\"none\",this.setTitle(e.title),this._componentItem.on(\"titleChanged\",this._tabTitleChangedListener);(null!==(s=e.reorderEnabled)&&void 0!==s?s:this._layoutManager.layoutConfig.settings.reorderEnabled)&&this.enableReorder(),this._element.addEventListener(\"click\",this._tabClickListener,{passive:!0}),this._element.addEventListener(\"touchstart\",this._tabTouchStartListener,{passive:!0}),this._componentItem.isClosable?(this._closeElement.addEventListener(\"click\",this._closeClickListener,{passive:!0}),this._closeElement.addEventListener(\"touchstart\",this._closeTouchStartListener,{passive:!0})):(this._closeElement.remove(),this._closeElement=void 0),this._componentItem.setTab(this),this._layoutManager.emit(\"tabCreated\",this)}get isActive(){return this._isActive}get componentItem(){return this._componentItem}get contentItem(){return this._componentItem}get element(){return this._element}get titleElement(){return this._titleElement}get closeElement(){return this._closeElement}get reorderEnabled(){return void 0!==this._dragListener}set reorderEnabled(t){t!==this.reorderEnabled&&(t?this.enableReorder():this.disableReorder())}setTitle(t){this._titleElement.innerText=t,this._element.title=t}setActive(t){t!==this._isActive&&(this._isActive=t,t?this._element.classList.add(\"lm_active\"):this._element.classList.remove(\"lm_active\"))}destroy(){var t,e;this._closeEvent=void 0,this._focusEvent=void 0,this._dragStartEvent=void 0,this._element.removeEventListener(\"click\",this._tabClickListener),this._element.removeEventListener(\"touchstart\",this._tabTouchStartListener),null===(t=this._closeElement)||void 0===t||t.removeEventListener(\"click\",this._closeClickListener),null===(e=this._closeElement)||void 0===e||e.removeEventListener(\"touchstart\",this._closeTouchStartListener),this._componentItem.off(\"titleChanged\",this._tabTitleChangedListener),this.reorderEnabled&&this.disableReorder(),this._element.remove()}setBlurred(){this._element.classList.remove(\"lm_focused\"),this._titleElement.classList.remove(\"lm_focused\")}setFocused(){this._element.classList.add(\"lm_focused\"),this._titleElement.classList.add(\"lm_focused\")}onDragStart(t,e){if(void 0===this._dragListener)throw new J(\"TODSDLU10093\");if(void 0===this._dragStartEvent)throw new J(\"TODS23309\");this._dragStartEvent(t,e,this._dragListener,this.componentItem)}onContentItemDestroy(){void 0!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=void 0)}onTabClickDown(t){const e=t.target;e!==this._element&&e!==this._titleElement||(0===t.button?this.notifyFocus():1===t.button&&this._componentItem.isClosable&&this.notifyClose())}onTabTouchStart(t){t.target===this._element&&this.notifyFocus()}onCloseClick(){this.notifyClose()}onCloseTouchStart(){this.notifyClose()}notifyClose(){if(void 0===this._closeEvent)throw new J(\"TNC15007\");this._closeEvent(this._componentItem)}notifyFocus(){if(void 0===this._focusEvent)throw new J(\"TNA15007\");this._focusEvent(this._componentItem)}enableReorder(){this._dragListener=new Zt(this._element,[this._titleElement]),this._dragListener.on(\"dragStart\",this._dragStartListener),this._componentItem.on(\"destroy\",this._contentItemDestroyListener)}disableReorder(){if(void 0===this._dragListener)throw new J(\"TDR87745\");this._componentItem.off(\"destroy\",this._contentItemDestroyListener),this._dragListener.off(\"dragStart\",this._dragStartListener),this._dragListener=void 0}}class Qt{constructor(t,e,i,n,o){this._layoutManager=t,this._componentRemoveEvent=e,this._componentFocusEvent=i,this._componentDragStartEvent=n,this._dropdownActiveChangedEvent=o,this._tabs=[],this._lastVisibleTabIndex=-1,this._dropdownActive=!1,this._element=document.createElement(\"section\"),this._element.classList.add(\"lm_tabs\"),this._dropdownElement=document.createElement(\"section\"),this._dropdownElement.classList.add(\"lm_tabdropdown_list\"),this._dropdownElement.style.display=\"none\"}get tabs(){return this._tabs}get tabCount(){return this._tabs.length}get lastVisibleTabIndex(){return this._lastVisibleTabIndex}get element(){return this._element}get dropdownElement(){return this._dropdownElement}get dropdownActive(){return this._dropdownActive}destroy(){for(let t=0;tthis.handleTabCloseEvent(t)),(t=>this.handleTabFocusEvent(t)),((t,e,i,n)=>this.handleTabDragStartEvent(t,e,i,n)));void 0===e&&(e=this._tabs.length),this._tabs.splice(e,0,i),ethis._lastVisibleTabIndex){const t=this._tabs[e];for(let t=e;t>0;t--)this._tabs[t]=this._tabs[t-1];this._tabs[0]=t}}updateTabSizes(t,e){let i=!1;this.tryUpdateTabSizes(i,t,e)||(i=!0,this.tryUpdateTabSizes(i,t,e)),i!==this._dropdownActive&&(this._dropdownActive=i,this._dropdownActiveChangedEvent())}tryUpdateTabSizes(t,e,i){if(this._tabs.length>0){if(void 0===i)throw new Error(\"non-empty tabs must have active component item\");let n=0,o=!1;const s=this._layoutManager.layoutConfig.settings.tabOverlapAllowance,r=this._tabs.indexOf(i.tab),a=this._tabs[r];this._lastVisibleTabIndex=-1;for(let i=0;ie){if(o)i===r&&(l.style.zIndex=\"auto\",l.style.marginLeft=\"\",l.parentElement!==this._element&&this._element.appendChild(l));else{let t;if(t=r>0&&r<=i?(d-e)/(i-1):(d-e)/i,tthis.onClick(t),this._touchStartListener=t=>this.onTouchStart(t),this._rowColumnClosable=!0,this._closeButton=null,this._popoutButton=null,this._tabsContainer=new Qt(this._layoutManager,(t=>this.handleTabInitiatedComponentRemoveEvent(t)),(t=>this.handleTabInitiatedComponentFocusEvent(t)),((t,e,i,n)=>this.handleTabInitiatedDragStartEvent(t,e,i,n)),(()=>this.processTabDropdownActiveChanged())),this._show=i.show,this._popoutEnabled=i.popoutEnabled,this._popoutLabel=i.popoutLabel,this._maximiseEnabled=i.maximiseEnabled,this._maximiseLabel=i.maximiseLabel,this._minimiseEnabled=i.minimiseEnabled,this._minimiseLabel=i.minimiseLabel,this._closeEnabled=i.closeEnabled,this._closeLabel=i.closeLabel,this._tabDropdownEnabled=i.tabDropdownEnabled,this._tabDropdownLabel=i.tabDropdownLabel,this.setSide(i.side),this._canRemoveComponent=this._configClosable,this._element=document.createElement(\"section\"),this._element.classList.add(\"lm_header\"),this._controlsContainerElement=document.createElement(\"section\"),this._controlsContainerElement.classList.add(\"lm_controls\"),this._element.appendChild(this._tabsContainer.element),this._element.appendChild(this._controlsContainerElement),this._element.appendChild(this._tabsContainer.dropdownElement),this._element.addEventListener(\"click\",this._clickListener,{passive:!0}),this._element.addEventListener(\"touchstart\",this._touchStartListener,{passive:!0}),this._documentMouseUpListener=()=>this._tabsContainer.hideAdditionalTabsDropdown(),globalThis.document.addEventListener(\"mouseup\",this._documentMouseUpListener,{passive:!0}),this._tabControlOffset=this._layoutManager.layoutConfig.settings.tabControlOffset,this._tabDropdownEnabled&&(this._tabDropdownButton=new Kt(this,this._tabDropdownLabel,\"lm_tabdropdown\",(()=>this._tabsContainer.showAdditionalTabsDropdown()))),this._popoutEnabled&&(this._popoutButton=new Kt(this,this._popoutLabel,\"lm_popout\",(()=>this.handleButtonPopoutEvent()))),this._maximiseEnabled&&(this._maximiseButton=new Kt(this,this._maximiseLabel,\"lm_maximise\",(t=>this.handleButtonMaximiseToggleEvent(t)))),this._configClosable&&(this._closeButton=new Kt(this,this._closeLabel,\"lm_close\",(()=>s()))),this.processTabDropdownActiveChanged()}get show(){return this._show}get side(){return this._side}get leftRightSided(){return this._leftRightSided}get layoutManager(){return this._layoutManager}get parent(){return this._parent}get tabs(){return this._tabsContainer.tabs}get lastVisibleTabIndex(){return this._tabsContainer.lastVisibleTabIndex}get element(){return this._element}get tabsContainerElement(){return this._tabsContainer.element}get controlsContainerElement(){return this._controlsContainerElement}destroy(){this.emit(\"destroy\"),this._popoutEvent=void 0,this._maximiseToggleEvent=void 0,this._clickEvent=void 0,this._touchStartEvent=void 0,this._componentRemoveEvent=void 0,this._componentFocusEvent=void 0,this._componentDragStartEvent=void 0,this._tabsContainer.destroy(),globalThis.document.removeEventListener(\"mouseup\",this._documentMouseUpListener),this._element.remove()}createTab(t,e){this._tabsContainer.createTab(t,e)}removeTab(t){this._tabsContainer.removeTab(t)}processActiveComponentChanged(t){this._tabsContainer.processActiveComponentChanged(t),this.updateTabSizes()}setSide(t){this._side=t,this._leftRightSided=[nt.right,nt.left].includes(this._side)}setRowColumnClosable(t){this._rowColumnClosable=t,this.updateClosability()}updateClosability(){let t;if(this._configClosable)if(this._rowColumnClosable){t=!0;const e=this.tabs.length;for(let i=0;i1}applyFocusedValue(t){t?this._element.classList.add(\"lm_focused\"):this._element.classList.remove(\"lm_focused\")}processMaximised(){if(void 0===this._maximiseButton)throw new J(\"HPMAX16997\");this._maximiseButton.element.setAttribute(\"title\",this._minimiseLabel)}processMinimised(){if(void 0===this._maximiseButton)throw new J(\"HPMIN16997\");this._maximiseButton.element.setAttribute(\"title\",this._maximiseLabel)}updateTabSizes(){if(this._tabsContainer.tabCount>0){const t=this._show?this._layoutManager.layoutConfig.dimensions.headerHeight:0;let e;this._leftRightSided?(this._element.style.height=\"\",this._element.style.width=zt(t)):(this._element.style.width=\"\",this._element.style.height=zt(t)),e=this._leftRightSided?this._element.offsetHeight-this._controlsContainerElement.offsetHeight-this._tabControlOffset:this._element.offsetWidth-this._controlsContainerElement.offsetWidth-this._tabControlOffset,this._tabsContainer.updateTabSizes(e,this._getActiveComponentItemEvent())}}handleTabInitiatedComponentRemoveEvent(t){if(this._canRemoveComponent){if(void 0===this._componentRemoveEvent)throw new J(\"HHTCE22294\");this._componentRemoveEvent(t)}}handleTabInitiatedComponentFocusEvent(t){if(void 0===this._componentFocusEvent)throw new J(\"HHTAE22294\");this._componentFocusEvent(t)}handleTabInitiatedDragStartEvent(t,e,i,n){if(this._canRemoveComponent){if(void 0===this._componentDragStartEvent)throw new J(\"HHTDSE22294\");this._componentDragStartEvent(t,e,i,n)}else i.cancelDrag()}processTabDropdownActiveChanged(){void 0!==this._tabDropdownButton&&Dt(this._tabDropdownButton.element,this._tabsContainer.dropdownActive)}handleButtonPopoutEvent(){if(this._layoutManager.layoutConfig.settings.popoutWholeStack){if(void 0===this._popoutEvent)throw new J(\"HHBPOE17834\");this._popoutEvent()}else{const t=this._getActiveComponentItemEvent();t&&t.popout()}}handleButtonMaximiseToggleEvent(t){if(void 0===this._maximiseToggleEvent)throw new J(\"HHBMTE16834\");this._maximiseToggleEvent()}onClick(t){t.target===this._element&&this.notifyClick(t)}onTouchStart(t){t.target===this._element&&this.notifyTouchStart(t)}notifyClick(t){if(void 0===this._clickEvent)throw new J(\"HNHC46834\");this._clickEvent(t)}notifyTouchStart(t){if(void 0===this._touchStartEvent)throw new J(\"HNHTS46834\");this._touchStartEvent(t)}}class ee extends $t{constructor(t,e,i){var n,o,s,r,a,l,h,d,c,m,u,p,g,f,v,_,y,C,w;super(t,e,i,ee.createElement(document)),this._headerSideChanged=!1,this._resizeListener=()=>this.handleResize(),this._maximisedListener=()=>this.handleMaximised(),this._minimisedListener=()=>this.handleMinimised(),this._headerConfig=e.header;const I=t.layoutConfig.header,b=e.content;let S;if(1!==b.length)S=void 0;else{S=b[0].header}this._initialWantMaximise=e.maximised,this._initialActiveItemIndex=null!==(n=e.activeItemIndex)&&void 0!==n?n:0;const E=null!==(r=null!==(s=null===(o=this._headerConfig)||void 0===o?void 0:o.show)&&void 0!==s?s:null==S?void 0:S.show)&&void 0!==r?r:I.show,x=null!==(h=null!==(l=null===(a=this._headerConfig)||void 0===a?void 0:a.popout)&&void 0!==l?l:null==S?void 0:S.popout)&&void 0!==h?h:I.popout,L=null!==(m=null!==(c=null===(d=this._headerConfig)||void 0===d?void 0:d.maximise)&&void 0!==c?c:null==S?void 0:S.maximise)&&void 0!==m?m:I.maximise,z=null!==(g=null!==(p=null===(u=this._headerConfig)||void 0===u?void 0:u.close)&&void 0!==p?p:null==S?void 0:S.close)&&void 0!==g?g:I.close,M=null!==(_=null!==(v=null===(f=this._headerConfig)||void 0===f?void 0:f.minimise)&&void 0!==v?v:null==S?void 0:S.minimise)&&void 0!==_?_:I.minimise,P=null!==(w=null!==(C=null===(y=this._headerConfig)||void 0===y?void 0:y.tabDropdown)&&void 0!==C?C:null==S?void 0:S.tabDropdown)&&void 0!==w?w:I.tabDropdown;this._maximisedEnabled=!1!==L;const T={show:!1!==E,side:!1===E?nt.top:E,popoutEnabled:!1!==x,popoutLabel:!1===x?\"\":x,maximiseEnabled:this._maximisedEnabled,maximiseLabel:!1===L?\"\":L,closeEnabled:!1!==z,closeLabel:!1===z?\"\":z,minimiseEnabled:!0,minimiseLabel:M,tabDropdownEnabled:!1!==P,tabDropdownLabel:!1===P?\"\":P};this._header=new te(t,this,T,e.isClosable&&!1!==z,(()=>this.getActiveComponentItem()),(()=>this.remove()),(()=>this.handlePopoutEvent()),(()=>this.toggleMaximise()),(t=>this.handleHeaderClickEvent(t)),(t=>this.handleHeaderTouchStartEvent(t)),(t=>this.handleHeaderComponentRemoveEvent(t)),(t=>this.handleHeaderComponentFocusEvent(t)),((t,e,i,n)=>this.handleHeaderComponentStartDragEvent(t,e,i,n))),this.isStack=!0,this._childElementContainer=document.createElement(\"section\"),this._childElementContainer.classList.add(\"lm_items\"),this.on(\"resize\",this._resizeListener),this._maximisedEnabled&&(this.on(\"maximised\",this._maximisedListener),this.on(\"minimised\",this._minimisedListener)),this.element.appendChild(this._header.element),this.element.appendChild(this._childElementContainer),this.setupHeaderPosition(),this._header.updateClosability()}get childElementContainer(){return this._childElementContainer}get header(){return this._header}get headerShow(){return this._header.show}get headerSide(){return this._header.side}get headerLeftRightSided(){return this._header.leftRightSided}get contentAreaDimensions(){return this._contentAreaDimensions}get initialWantMaximise(){return this._initialWantMaximise}get isMaximised(){return this===this.layoutManager.maximisedStack}get stackParent(){if(!this.parent)throw new Error(\"Stack should always have a parent\");return this.parent}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}init(){if(!0===this.isInitialised)return;this.updateNodeSize();for(let t=0;t0){if(this._initialActiveItemIndex<0||this._initialActiveItemIndex>=e)throw new Error(`ActiveItemIndex out of range: ${this._initialActiveItemIndex} id: ${this.id}`);for(let i=0;ithis.contentItems.length)throw e-=1,new X(\"SAC99728\");if(t instanceof jt)return e=super.addChild(t,e),this._childElementContainer.appendChild(t.element),this._header.createTab(t,e),this.setActiveComponentItem(t,i),this._header.updateTabSizes(),this.updateSize(!1),t.container.setBaseLogicalZIndex(),this._header.updateClosability(),this.emitStateChangedEvent(),e;throw new X(\"SACC88532\")}removeChild(t,e){const i=t,n=this.contentItems.indexOf(i),o=1===this.contentItems.length;if(this._activeComponentItem===i&&(i.focused&&i.blur(),!o)){const t=0===n?1:n-1;this.setActiveComponentItem(this.contentItems[t],!1)}this._header.removeTab(i),super.removeChild(i,e),o||this._header.updateClosability(),this.emitStateChangedEvent()}toggleMaximise(){this.isMaximised?this.minimise():this.maximise()}maximise(){if(!this.isMaximised){this.layoutManager.setMaximisedStack(this);const t=this.contentItems,e=t.length;for(let i=0;i0&&void 0===t)throw new Error(\"expected non-empty stack to have an active component item\");return{type:\"stack\",content:this.calculateConfigContent(),size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,isClosable:this.isClosable,maximised:this.isMaximised,header:this.createHeaderConfig(),activeItemIndex:t}}onDrop(t,e){if(\"header\"===this._dropSegment){if(this.resetHeaderDropZone(),void 0===this._dropIndex)throw new J(\"SODDI68990\");return void this.addChild(t,this._dropIndex)}if(\"body\"===this._dropSegment)return void this.addChild(t,0,!0);const i=\"top\"===this._dropSegment||\"bottom\"===this._dropSegment,n=\"left\"===this._dropSegment||\"right\"===this._dropSegment,o=\"top\"===this._dropSegment||\"left\"===this._dropSegment,s=i&&this.stackParent.isColumn||n&&this.stackParent.isRow;if(t.isComponent){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createAndInitContentItem(e,this);i.addChild(t),t=i}if(t.type===at.row||t.type===at.column){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}if(s){const e=this.stackParent.contentItems.indexOf(this);this.stackParent.addChild(t,o?e:e+1,!0),this.size*=.5,t.size=this.size,t.sizeUnit=this.sizeUnit,this.stackParent.updateSize(!1)}else{const e=i?at.column:at.row,n=ct.createDefault(e),s=this.layoutManager.createContentItem(n,this);this.stackParent.replaceChild(this,s),s.addChild(t,o?0:void 0,!0),s.addChild(this,o?void 0:0,!0),this.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}highlightDropZone(t,e){for(const i in this._contentAreaDimensions){const n=i,o=this._contentAreaDimensions[n].hoverArea;if(o.x1t&&o.y1e)return void(\"header\"===n?(this._dropSegment=\"header\",this.highlightHeaderDropZone(this._header.leftRightSided?e:t)):(this.resetHeaderDropZone(),this.highlightBodyDropZone(n)))}}getArea(){if(\"none\"===this.element.style.display)return null;const t=super.getElementArea(this._header.element),e=super.getElementArea(this._childElementContainer);if(null===t||null===e)throw new K(\"SGAHC13086\");const i=e.x2-e.x1,n=e.y2-e.y1;return this._contentAreaDimensions={header:{hoverArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2},highlightArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2}}},0===this.contentItems.length?(this._contentAreaDimensions.body={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2}},super.getElementArea(this.element)):(this._contentAreaDimensions.left={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x1+.25*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x1+.5*i,y2:e.y2}},this._contentAreaDimensions.top={hoverArea:{x1:e.x1+.25*i,y1:e.y1,x2:e.x1+.75*i,y2:e.y1+.5*n},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y1+.5*n}},this._contentAreaDimensions.right={hoverArea:{x1:e.x1+.75*i,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1+.5*i,y1:e.y1,x2:e.x2,y2:e.y2}},this._contentAreaDimensions.bottom={hoverArea:{x1:e.x1+.25*i,y1:e.y1+.5*n,x2:e.x1+.75*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1+.5*n,x2:e.x2,y2:e.y2}},super.getElementArea(this.element))}positionHeader(t){this._header.side!==t&&(this._header.setSide(t),this._headerSideChanged=!0,this.setupHeaderPosition())}updateNodeSize(){if(\"none\"!==this.element.style.display){const t=kt(this.element);if(this._header.show){t[this._header.leftRightSided?it.width:it.height]-=this.layoutManager.layoutConfig.dimensions.headerHeight}this._childElementContainer.style.width=zt(t.width),this._childElementContainer.style.height=zt(t.height);for(let e=0;e=o&&tthis.onDrag(t,e,i))),this._dragListener.on(\"dragStop\",(()=>this.onDrop())),this.createDragProxyElements(t,e),null===this._componentItem.parent)throw new K(\"DPC10097\");this._componentItemFocused=this._componentItem.focused,this._componentItemFocused&&this._componentItem.blur(),this._componentItem.parent.removeChild(this._componentItem,!0),this.setDimensions(),document.body.appendChild(this._element),this.determineMinMaxXY(),this._layoutManager.calculateItemAreas(),this.setDropPosition(t,e)}get element(){return this._element}createDragProxyElements(t,e){this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_dragProxy\");const i=document.createElement(\"div\");i.classList.add(\"lm_header\");const n=document.createElement(\"div\");n.classList.add(\"lm_tabs\");const o=document.createElement(\"div\");o.classList.add(\"lm_tab\");const s=document.createElement(\"span\");s.classList.add(\"lm_title\"),o.appendChild(s),n.appendChild(o),i.appendChild(n),this._proxyContainerElement=document.createElement(\"div\"),this._proxyContainerElement.classList.add(\"lm_content\"),this._element.appendChild(i),this._element.appendChild(this._proxyContainerElement),this._originalParent instanceof ee&&this._originalParent.headerShow&&(this._sided=this._originalParent.headerLeftRightSided,this._element.classList.add(\"lm_\"+this._originalParent.headerSide),[nt.right,nt.bottom].indexOf(this._originalParent.headerSide)>=0&&this._proxyContainerElement.insertAdjacentElement(\"afterend\",i)),this._element.style.left=zt(t),this._element.style.top=zt(e),o.setAttribute(\"title\",this._componentItem.title),s.insertAdjacentText(\"afterbegin\",this._componentItem.title),this._proxyContainerElement.appendChild(this._componentItem.element)}determineMinMaxXY(){const t=this._layoutManager.groundItem;if(void 0===t)throw new J(\"DPDMMXY73109\");{const e=t.element.getBoundingClientRect();this._minX=e.left+document.body.scrollLeft,this._minY=e.top+document.body.scrollTop,this._maxX=this._minX+e.width,this._maxY=this._minY+e.height}}onDrag(t,e,i){const n=i.pageX,o=i.pageY;this.setDropPosition(n,o),this._componentItem.drag()}setDropPosition(t,e){this._layoutManager.layoutConfig.settings.constrainDragToContainer&&(t<=this._minX?t=Math.ceil(this._minX):t>=this._maxX&&(t=Math.floor(this._maxX)),e<=this._minY?e=Math.ceil(this._minY):e>=this._maxY&&(e=Math.floor(this._maxY))),this._element.style.left=zt(t),this._element.style.top=zt(e),this._area=this._layoutManager.getArea(t,e),null!==this._area&&(this._lastValidArea=this._area,this._area.contentItem.highlightDropZone(t,e,this._area))}onDrop(){const t=this._layoutManager.dropTargetIndicator;if(null===t)throw new K(\"DPOD30011\");let e;if(t.hide(),this._componentItem.exitDragMode(),null!==this._area)e=this._componentItem,this._area.contentItem.onDrop(e,this._area);else if(null!==this._lastValidArea){e=this._componentItem;this._lastValidArea.contentItem.onDrop(e,this._lastValidArea)}else this._originalParent?(e=this._componentItem,this._originalParent.addChild(e)):this._componentItem.destroy();this._element.remove(),this._layoutManager.emit(\"itemDropped\",this._componentItem),this._componentItemFocused&&void 0!==e&&e.focus()}setDimensions(){const t=this._layoutManager.layoutConfig.dimensions;if(void 0===t)throw new Error(\"DragProxy.setDimensions: dimensions undefined\");let e=t.dragProxyWidth,i=t.dragProxyHeight;if(void 0===e||void 0===i)throw new Error(\"DragProxy.setDimensions: width and/or height undefined\");const n=!1===this._layoutManager.layoutConfig.header.show?0:t.headerHeight;this._element.style.width=zt(e),this._element.style.height=zt(i),e-=this._sided?n:0,i-=this._sided?0:n,this._proxyContainerElement.style.width=zt(e),this._proxyContainerElement.style.height=zt(i),this._componentItem.enterDragMode(e,i),this._componentItem.show()}}class ne{constructor(t,e,i,n,o,s,r){this._layoutManager=t,this._element=e,this._extraAllowableChildTargets=i,this._componentTypeOrFtn=n,this._componentState=o,this._title=s,this._id=r,this._dragListener=null,this._dummyGroundContainer=document.createElement(\"div\");const a=gt.createDefault(\"row\");this._dummyGroundContentItem=new Yt(this._layoutManager,a,this._dummyGroundContainer),this.createDragListener()}destroy(){this.removeDragListener()}createDragListener(){this.removeDragListener(),this._dragListener=new Zt(this._element,this._extraAllowableChildTargets),this._dragListener.on(\"dragStart\",((t,e)=>this.onDragStart(t,e))),this._dragListener.on(\"dragStop\",(()=>this.onDragStop()))}onDragStart(t,e){var i;const n=\"component\";let o;if(\"function\"==typeof this._componentTypeOrFtn){const t=this._componentTypeOrFtn();o=ne.isDragSourceComponentItemConfig(t)?{type:n,componentState:t.state,componentType:t.type,title:null!==(i=t.title)&&void 0!==i?i:this._title}:t}else o={type:n,componentState:this._componentState,componentType:this._componentTypeOrFtn,title:this._title,id:this._id};const s=bt.resolve(o,!1),r=new jt(this._layoutManager,s,this._dummyGroundContentItem);if(this._dummyGroundContentItem.contentItems.push(r),null===this._dragListener)throw new K(\"DSODSD66746\");{const i=new ie(t,e,this._dragListener,this._layoutManager,r,this._dummyGroundContentItem),n=this._layoutManager.transitionIndicator;if(null===n)throw new K(\"DSODST66746\");n.transitionElements(this._element,i.element)}}onDragStop(){this.createDragListener()}removeDragListener(){null!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=null)}}!function(t){t.isDragSourceComponentItemConfig=function(t){return!(\"componentType\"in t)}}(ne||(ne={}));class oe{constructor(){this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_dropTargetIndicator\");const t=document.createElement(\"div\");t.classList.add(\"lm_inner\"),this._element.appendChild(t),document.body.appendChild(this._element)}destroy(){this._element.remove()}highlightArea(t,e){this._element.style.left=zt(t.x1+e),this._element.style.top=zt(t.y1+e),this._element.style.width=zt(t.x2-t.x1-e),this._element.style.height=zt(t.y2-t.y1-e),this._element.style.display=\"block\"}hide(){Dt(this._element,!1)}}class se{constructor(){this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_transition_indicator\"),document.body.appendChild(this._element),this._toElement=null,this._fromDimensions=null,this._totalAnimationDuration=200,this._animationStartTime=null}destroy(){this._element.remove()}transitionElements(t,e){}nextAnimationFrame(){}measure(t){const e=t.getBoundingClientRect();return{left:e.left,top:e.top,width:t.offsetWidth,height:t.offsetHeight}}}class re extends Wt{constructor(t){super(),this._layoutManager=t,this._childEventListener=t=>this.onEventFromChild(t),globalThis.addEventListener(re.ChildEventName,this._childEventListener,{passive:!0})}emit(t,...e){\"userBroadcast\"===t?this.emitUserBroadcast(...e):super.emit(t,...e)}emitUserBroadcast(...t){this.handleUserBroadcastEvent(\"userBroadcast\",t)}destroy(){globalThis.removeEventListener(re.ChildEventName,this._childEventListener)}handleUserBroadcastEvent(t,e){this._layoutManager.isSubWindow?this.propagateToParent(t,e):this.propagateToThisAndSubtree(t,e)}onEventFromChild(t){const e=t.detail;this.handleUserBroadcastEvent(e.eventName,e.args)}propagateToParent(t,e){const i={bubbles:!0,cancelable:!0,detail:{layoutManager:this._layoutManager,eventName:t,args:e}},n=new CustomEvent(re.ChildEventName,i),o=globalThis.opener;if(null===o)throw new K(\"EHPTP15778\");o.dispatchEvent(n)}propagateToThisAndSubtree(t,e){this.emitUnknown(t,...e);for(let i=0;ithis.handleContainerResize())),this._windowBeforeUnloadListener=()=>this.onBeforeUnload(),this._windowBeforeUnloadListening=!1,this._maximisedStackBeforeDestroyedListener=t=>this.cleanupBeforeMaximisedStackDestroyed(t),this.isSubWindow=t.isSubWindow,this._constructorOrSubWindowLayoutConfig=t.constructorOrSubWindowLayoutConfig,Q.checkInitialise(),dt.checkInitialise(),void 0!==t.containerElement&&(this._containerElement=t.containerElement)}get container(){return this._containerElement}get isInitialised(){return this._isInitialised}get groundItem(){return this._groundItem}get root(){return this._groundItem}get openPopouts(){return this._openPopouts}get dropTargetIndicator(){return this._dropTargetIndicator}get transitionIndicator(){return this._transitionIndicator}get width(){return this._width}get height(){return this._height}get eventHub(){return this._eventHub}get rootItem(){if(void 0===this._groundItem)throw new Error(\"Cannot access rootItem before init\");return 0===this._groundItem.contentItems.length?void 0:this._groundItem.contentItems[0]}get focusedComponentItem(){return this._focusedComponentItem}get tabDropPlaceholder(){return this._tabDropPlaceholder}get maximisedStack(){return this._maximisedStack}get deprecatedConstructor(){return!this.isSubWindow&&void 0!==this._constructorOrSubWindowLayoutConfig}destroy(){if(this._isInitialised){this._windowBeforeUnloadListening&&(globalThis.removeEventListener(\"beforeunload\",this._windowBeforeUnloadListener),this._windowBeforeUnloadListening=!1),!0===this.layoutConfig.settings.closePopoutsOnUnload&&this.closeAllOpenPopouts(),this._resizeObserver.disconnect(),this.checkClearResizeTimeout(),void 0!==this._groundItem&&this._groundItem.destroy(),this._tabDropPlaceholder.remove(),null!==this._dropTargetIndicator&&this._dropTargetIndicator.destroy(),null!==this._transitionIndicator&&this._transitionIndicator.destroy(),this._eventHub.destroy();for(const t of this._dragSources)t.destroy();this._dragSources=[],this._isInitialised=!1}}minifyConfig(t){return _t.minifyConfig(t)}unminifyConfig(t){return _t.unminifyConfig(t)}init(){let t;if(this.setContainer(),this._dropTargetIndicator=new oe,this._transitionIndicator=new se,this.updateSizeFromContainer(),this.isSubWindow){if(void 0===this._constructorOrSubWindowLayoutConfig)throw new J(\"LMIU07155\");{const e=this._constructorOrSubWindowLayoutConfig.root;if(void 0===e)throw new X(\"LMIC07156\");if(!Ct.isComponent(e))throw new X(\"LMIC07157\");t=e;const i=xt.resolve(this._constructorOrSubWindowLayoutConfig);this.layoutConfig=Object.assign(Object.assign({},i),{root:void 0})}}else void 0===this._constructorOrSubWindowLayoutConfig?this.layoutConfig=_t.createDefault():this.layoutConfig=xt.resolve(this._constructorOrSubWindowLayoutConfig);const e=this.layoutConfig;this._groundItem=new Yt(this,e.root,this._containerElement),this._groundItem.init(),this.checkLoadedLayoutMaximiseItem(),this._resizeObserver.observe(this._containerElement),this._isInitialised=!0,this.adjustColumnsResponsive(),this.emit(\"initialised\"),void 0!==t&&this.loadComponentAsRoot(t)}loadLayout(t){if(!this.isInitialised)throw new Error(\"GoldenLayout: Need to call init() if LayoutConfig with defined root passed to constructor\");if(void 0===this._groundItem)throw new J(\"LMLL11119\");this.createSubWindows(),this.layoutConfig=xt.resolve(t),this._groundItem.loadRoot(this.layoutConfig.root),this.checkLoadedLayoutMaximiseItem(),this.adjustColumnsResponsive()}saveLayout(){if(!1===this._isInitialised)throw new Error(\"Can't create config, layout not yet initialised\");if(void 0===this._groundItem)throw new J(\"LMTC18244\");{const t=this._groundItem.calculateConfigContent();let e;e=1!==t.length?void 0:t[0],this.reconcilePopoutWindows();const i=[];for(let t=0;t=0?n=this._groundItem.contentItems[0]:e=0;break;case at.row:case at.column:e=n.addItem(t,i.index);break;case at.stack:if(Ct.isComponent(t)){e=n.addItem(t,i.index);break}throw Error(tt[6]);case at.component:throw new X(\"LMAIALC87444602\");default:throw new Y(\"LMAIALU98881733\",n.type)}if(Ct.isComponent(t)){const t=n.contentItems[e];Gt.isStack(t)&&(n=t,e=0)}return i.parentItem=n,i.index=e,i}}}loadComponentAsRoot(t){if(void 0===this._groundItem)throw new Error(\"Cannot add item before init\");this._groundItem.loadComponentAsRoot(t)}updateSize(t,e){this.setSize(t,e)}setSize(t,e){if(this._width=t,this._height=e,!0===this._isInitialised){if(void 0===this._groundItem)throw new J(\"LMUS18881\");if(this._groundItem.setSize(this._width,this._height),this._maximisedStack){const{width:t,height:e}=kt(this._containerElement);Tt(this._maximisedStack.element,t),At(this._maximisedStack.element,e),this._maximisedStack.updateSize(!1)}this.adjustColumnsResponsive()}}beginSizeInvalidation(){this._sizeInvalidationBeginCount++}endSizeInvalidation(){0==--this._sizeInvalidationBeginCount&&this.updateSizeFromContainer()}updateSizeFromContainer(){const{width:t,height:e}=kt(this._containerElement);this.setSize(t,e)}updateRootSize(t=!1){if(void 0===this._groundItem)throw new J(\"LMURS28881\");this._groundItem.updateSize(t)}createAndInitContentItem(t,e){const i=this.createContentItem(t,e);return i.init(),i}createContentItem(t,e){if(\"string\"!=typeof t.type)throw new G(\"Missing parameter 'type'\",JSON.stringify(t));if(ct.isComponentItem(t)&&!(e instanceof ee)&&e&&!(!0===this.isSubWindow&&e instanceof Yt)){t={type:at.stack,content:[t],size:t.size,sizeUnit:t.sizeUnit,minSize:t.minSize,minSizeUnit:t.minSizeUnit,id:t.id,maximised:t.maximised,isClosable:t.isClosable,activeItemIndex:0,header:void 0}}return this.createContentItemFromConfig(t,e)}findFirstComponentItemById(t){if(void 0===this._groundItem)throw new J(\"LMFFCIBI82446\");return this.findFirstContentItemTypeByIdRecursive(at.component,t,this._groundItem)}createPopout(t,e,i,n){return t instanceof Gt?this.createPopoutFromContentItem(t,e,i,n):this.createPopoutFromItemConfig(t,e,i,n)}createPopoutFromContentItem(t,e,i,n){let o=t.parent,s=t;for(;null!==o&&1===o.contentItems.length&&!o.isGround;)s=o,o=o.parent;if(null===o)throw new K(\"LMCPFCI00834\");{if(void 0===n&&(n=o.contentItems.indexOf(s)),null!==i&&o.addPopInParentId(i),void 0===e){const i=globalThis.screenX||globalThis.screenLeft,n=globalThis.screenY||globalThis.screenTop,o=t.element.offsetLeft,s=t.element.offsetTop,{width:r,height:a}=kt(t.element);e={left:i+o,top:n+s,width:r,height:a}}const r=t.toConfig();if(t.remove(),ft.isRootItemConfig(r))return this.createPopoutFromItemConfig(r,e,i,n);throw new Error(`${tt[0]}`)}}beginVirtualSizedContainerAdding(){0==++this._virtualSizedContainerAddingBeginCount&&(this._virtualSizedContainers.length=0)}addVirtualSizedContainer(t){this._virtualSizedContainers.push(t)}endVirtualSizedContainerAdding(){if(0==--this._virtualSizedContainerAddingBeginCount){const t=this._virtualSizedContainers.length;if(t>0){this.fireBeforeVirtualRectingEvent(t);for(let e=0;ethis.emit(\"windowOpened\",a))),a.on(\"closed\",(()=>this.reconcilePopoutWindows())),this._openPopouts.push(a),this.layoutConfig.settings.closePopoutsOnUnload&&!this._windowBeforeUnloadListening&&(globalThis.addEventListener(\"beforeunload\",this._windowBeforeUnloadListener,{passive:!0}),this._windowBeforeUnloadListening=!0),a}closeAllOpenPopouts(){for(let t=0;tglobalThis.close()),1)}getArea(t,e){let i=null,n=1/0;for(let o=0;o=s.x1&&t=s.y1&&es.surface&&(n=s.surface,i=s)}return i}calculateItemAreas(){const t=this.getAllContentItems(),e=this._groundItem;if(void 0===e)throw new J(\"LMCIAR44365\");if(1!==t.length){e.contentItems[0].isStack?this._itemAreas=[]:this._itemAreas=e.createSideAreas();for(let e=0;e0){let e=t[0];if(Gt.isComponentItem(e)){const t=e.parent;if(null===t)throw new K(\"LMXLLMI69999\");e=t}if(!Gt.isStack(e))throw new X(\"LMCLLMI19993\");e.maximise()}}}processMaximiseStack(t){if(this._maximisedStack=t,t.on(\"beforeItemDestroyed\",this._maximisedStackBeforeDestroyedListener),t.element.classList.add(\"lm_maximised\"),t.element.insertAdjacentElement(\"afterend\",this._maximisePlaceholder),void 0===this._groundItem)throw new J(\"LMMXI19993\");{this._groundItem.element.prepend(t.element);const{width:e,height:i}=kt(this._containerElement);Tt(t.element,e),At(t.element,i),t.updateSize(!0),t.focusActiveContentItem(),this._maximisedStack.emit(\"maximised\"),this.emit(\"stateChanged\")}}processMinimiseMaximisedStack(){if(void 0===this._maximisedStack)throw new X(\"LMMMS74422\");{const t=this._maximisedStack;if(null===t.parent)throw new K(\"LMMI13668\");t.element.classList.remove(\"lm_maximised\"),this._maximisePlaceholder.insertAdjacentElement(\"afterend\",t.element),this._maximisePlaceholder.remove(),this.updateRootSize(!0),this._maximisedStack=void 0,t.off(\"beforeItemDestroyed\",this._maximisedStackBeforeDestroyedListener),t.emit(\"minimised\"),this.emit(\"stateChanged\")}}reconcilePopoutWindows(){const t=[];for(let e=0;e{this._resizeTimeoutId=void 0,this.beginSizeInvalidation(),this.endSizeInvalidation()}),this.resizeDebounceInterval))}checkClearResizeTimeout(){void 0!==this._resizeTimeoutId&&(clearTimeout(this._resizeTimeoutId),this._resizeTimeoutId=void 0)}setContainer(){var t;const e=document.body,i=null!==(t=this._containerElement)&&void 0!==t?t:e;if(i===e){this.resizeWithContainerAutomatically=!0;const t=document.documentElement;t.style.height=\"100%\",t.style.margin=\"0\",t.style.padding=\"0\",t.style.overflow=\"clip\",e.style.height=\"100%\",e.style.margin=\"0\",e.style.padding=\"0\",e.style.overflow=\"clip\"}this._containerElement=i}onBeforeUnload(){this.destroy()}adjustColumnsResponsive(){if(void 0===this._groundItem)throw new J(\"LMACR20883\");if(this._firstLoad=!1,this.useResponsiveLayout()&&!this._updatingColumnsResponsive&&this._groundItem.contentItems.length>0&&this._groundItem.contentItems[0].isRow){if(void 0===this._groundItem||null===this._width)throw new J(\"LMACR77412\");{const t=this._groundItem.contentItems[0].contentItems.length;if(t<=1)return;{const e=this.layoutConfig.dimensions.defaultMinItemWidth;if(t*e<=this._width)return;{this._updatingColumnsResponsive=!0;const i=t-Math.max(Math.floor(this._width/e),1),n=this._groundItem.contentItems[0],o=this.getAllStacks();if(0===o.length)throw new X(\"LMACRS77413\");{const t=o[0];for(let e=0;en?void 0:{parentItem:t,index:o}}}case 1:if(void 0===this._focusedComponentItem)return;{const t=this._focusedComponentItem.parentItem;return this.tryCreateLocationFromParentItem(t,e)}case 2:{const t=this.findFirstContentItemType(at.stack);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 3:{let t=this.findFirstContentItemType(at.row);return void 0!==t?this.tryCreateLocationFromParentItem(t,e):(t=this.findFirstContentItemType(at.column),void 0!==t?this.tryCreateLocationFromParentItem(t,e):void 0)}case 4:{const t=this.findFirstContentItemType(at.row);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 5:{const t=this.findFirstContentItemType(at.column);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 6:if(void 0===this._groundItem)throw new J(\"LMFLRIF18244\");return void 0!==this.rootItem?void 0:void 0===e||0===e?{parentItem:this._groundItem,index:0}:void 0;case 7:if(void 0===this._groundItem)throw new J(\"LMFLF18244\");{const t=this._groundItem.contentItems;if(0===t.length)return void 0===e||0===e?{parentItem:this._groundItem,index:0}:void 0;{const i=t[0];return this.tryCreateLocationFromParentItem(i,e)}}}}tryCreateLocationFromParentItem(t,e){const i=t.contentItems.length;return void 0===e?{parentItem:t,index:i}:e<0||e>i?void 0:{parentItem:t,index:e}}}!function(t){t.createMaximisePlaceElement=function(t){const e=t.createElement(\"div\");return e.classList.add(\"lm_maximise_place\"),e},t.createTabDropPlaceholderElement=function(t){const e=t.createElement(\"div\");return e.classList.add(\"lm_drop_tab_placeholder\"),e},t.defaultLocationSelectors=[{typeId:1,index:void 0},{typeId:2,index:void 0},{typeId:3,index:void 0},{typeId:7,index:void 0}],t.afterFocusedItemIfPossibleLocationSelectors=[{typeId:0,index:1},{typeId:2,index:void 0},{typeId:3,index:void 0},{typeId:7,index:void 0}]}(ae||(ae={}));class le extends ae{constructor(t,e,i,n){if(super(le.createLayoutManagerConstructorParameters(t,e)),this._bindComponentEventHanlderPassedInConstructor=!1,this._creationTimeoutPassed=!1,void 0!==e&&\"function\"==typeof e&&(this.bindComponentEvent=e,this._bindComponentEventHanlderPassedInConstructor=!0,void 0!==i&&(this.unbindComponentEvent=i)),!this._bindComponentEventHanlderPassedInConstructor&&this.isSubWindow){if(void 0===this._constructorOrSubWindowLayoutConfig)throw new J(\"VLC98823\");{const t=xt.resolve(this._constructorOrSubWindowLayoutConfig);this.layoutConfig=Object.assign(Object.assign({},t),{root:void 0})}}!0!==n&&(this.deprecatedConstructor||this.init())}destroy(){this.bindComponentEvent=void 0,this.unbindComponentEvent=void 0,super.destroy()}init(){if(this._bindComponentEventHanlderPassedInConstructor||\"loading\"!==document.readyState&&null!==document.body){if(!this._bindComponentEventHanlderPassedInConstructor&&!0===this.isSubWindow&&!this._creationTimeoutPassed)return setTimeout((()=>this.init()),7),void(this._creationTimeoutPassed=!0);!0===this.isSubWindow&&(this._bindComponentEventHanlderPassedInConstructor||this.clearHtmlAndAdjustStylesForSubWindow(),window.__glInstance=this),super.init()}else document.addEventListener(\"DOMContentLoaded\",(()=>this.init()),{passive:!0})}clearHtmlAndAdjustStylesForSubWindow(){const t=document.head,e=new Array(4);e[0]=document.querySelectorAll(\"body link\"),e[1]=document.querySelectorAll(\"body style\"),e[2]=document.querySelectorAll(\"template\"),e[3]=document.querySelectorAll(\".gl_keep\");for(let i=0;ithis.emit(\"popIn\"))),document.body.appendChild(t),!0}}bindComponent(t,e){if(void 0!==this.bindComponentEvent){return this.bindComponentEvent(t,e)}if(void 0!==this.getComponentEvent)return{virtual:!1,component:this.getComponentEvent(t,e)};{const t=`${tt[2]}: ${JSON.stringify(e)}`;throw new Z(t)}}unbindComponent(t,e,i){if(void 0!==this.unbindComponentEvent)this.unbindComponentEvent(t);else if(!e&&void 0!==this.releaseComponentEvent){if(void 0===i)throw new J(\"VCUCRCU333998\");this.releaseComponentEvent(t,i)}}}!function(t){let e=!1;t.createLayoutManagerConstructorParameters=function(t,i){const n=e?null:new URL(document.location.href).searchParams.get(\"gl-window\");e=!0;const o=null!==n;let s,r;if(null!==n){const e=localStorage.getItem(n);if(null===e)throw new Error(\"Null gl-window Config\");localStorage.removeItem(n);const i=JSON.parse(e),o=_t.unminifyConfig(i);r=xt.fromResolved(o),t instanceof HTMLElement&&(s=t)}else void 0===t?r=void 0:t instanceof HTMLElement?(r=void 0,s=t):r=t,void 0===s&&i instanceof HTMLElement&&(s=i);return{constructorOrSubWindowLayoutConfig:r,isSubWindow:o,containerElement:s}}}(le||(le={}));class he extends le{constructor(t,e,i){super(t,e,i,!0),this._componentTypesMap=new Map,this._registeredComponentMap=new Map,this._virtuableComponentMap=new Map,this._containerVirtualRectingRequiredEventListener=(t,e,i)=>this.handleContainerVirtualRectingRequiredEvent(t,e,i),this._containerVirtualVisibilityChangeRequiredEventListener=(t,e)=>this.handleContainerVirtualVisibilityChangeRequiredEvent(t,e),this._containerVirtualZIndexChangeRequiredEventListener=(t,e,i)=>this.handleContainerVirtualZIndexChangeRequiredEvent(t,e,i),this.deprecatedConstructor||this.init()}registerComponent(t,e,i=!1){if(\"function\"!=typeof e)throw new $(\"registerComponent() componentConstructorOrFactoryFtn parameter is not a function\");if(e.hasOwnProperty(\"prototype\")){const n=e;this.registerComponentConstructor(t,n,i)}else{const n=e;this.registerComponentFactoryFunction(t,n,i)}}registerComponentConstructor(t,e,i=!1){if(\"function\"!=typeof e)throw new Error(tt[1]);if(void 0!==this._componentTypesMap.get(t))throw new Z(`${tt[3]}: ${t}`);this._componentTypesMap.set(t,{constructor:e,factoryFunction:void 0,virtual:i})}registerComponentFactoryFunction(t,e,i=!1){if(\"function\"!=typeof e)throw new Z(\"Please register a constructor function\");if(void 0!==this._componentTypesMap.get(t))throw new Z(`${tt[3]}: ${t}`);this._componentTypesMap.set(t,{constructor:void 0,factoryFunction:e,virtual:i})}registerComponentFunction(t){this.registerGetComponentConstructorCallback(t)}registerGetComponentConstructorCallback(t){if(\"function\"!=typeof t)throw new Error(\"Please register a callback function\");void 0!==this._getComponentConstructorFtn&&console.warn(\"Multiple component functions are being registered. Only the final registered function will be used.\"),this._getComponentConstructorFtn=t}getRegisteredComponentTypeNames(){const t=this._componentTypesMap.keys();return Array.from(t)}getComponentInstantiator(t){let e;const i=pt.resolveComponentTypeName(t);return void 0!==i&&(e=this._componentTypesMap.get(i)),void 0===e&&void 0!==this._getComponentConstructorFtn&&(e={constructor:this._getComponentConstructorFtn(t),factoryFunction:void 0,virtual:!1}),e}bindComponent(t,e){let i;const n=pt.resolveComponentTypeName(e);let o;if(void 0!==n&&(i=this._componentTypesMap.get(n)),void 0===i&&void 0!==this._getComponentConstructorFtn&&(i={constructor:this._getComponentConstructorFtn(e),factoryFunction:void 0,virtual:!1}),void 0!==i){const s=i.virtual;let r,a;r=void 0===e.componentState?void 0:Ut({},e.componentState);const l=i.constructor;if(void 0!==l)a=new l(t,r,s);else{const e=i.factoryFunction;if(void 0===e)throw new X(\"LMBCFFU10008\");a=e(t,r,s)}if(s){if(void 0===a)throw new J(\"GLBCVCU988774\");{const e=a,i=e.rootHtmlElement;if(void 0===i)throw new Z(`${tt[5]}: ${n}`);!function(t){const e=\"absolute\";t.style.position!==e&&(t.style.position=e)}(i),this.container.appendChild(i),this._virtuableComponentMap.set(t,e),t.virtualRectingRequiredEvent=this._containerVirtualRectingRequiredEventListener,t.virtualVisibilityChangeRequiredEvent=this._containerVirtualVisibilityChangeRequiredEventListener,t.virtualZIndexChangeRequiredEvent=this._containerVirtualZIndexChangeRequiredEventListener}}this._registeredComponentMap.set(t,a),o={virtual:i.virtual,component:a}}else o=super.bindComponent(t,e);return o}unbindComponent(t,e,i){if(void 0===this._registeredComponentMap.get(t))super.unbindComponent(t,e,i);else{const e=this._virtuableComponentMap.get(t);if(void 0!==e){const i=e.rootHtmlElement;if(void 0===i)throw new X(\"GLUC77743\",t.title);this.container.removeChild(i),this._virtuableComponentMap.delete(t)}}}fireBeforeVirtualRectingEvent(t){this._goldenLayoutBoundingClientRect=this.container.getBoundingClientRect(),super.fireBeforeVirtualRectingEvent(t)}handleContainerVirtualRectingRequiredEvent(t,e,i){const n=this._virtuableComponentMap.get(t);if(void 0===n)throw new J(\"GLHCSCE55933\");{const o=n.rootHtmlElement;if(void 0===o)throw new Z(tt[4]+\" \"+t.title);{const n=t.element.getBoundingClientRect(),s=n.left-this._goldenLayoutBoundingClientRect.left;o.style.left=zt(s);const r=n.top-this._goldenLayoutBoundingClientRect.top;o.style.top=zt(r),Tt(o,e),At(o,i)}}}handleContainerVirtualVisibilityChangeRequiredEvent(t,e){const i=this._virtuableComponentMap.get(t);if(void 0===i)throw new J(\"GLHCVVCRE55934\");{const n=i.rootHtmlElement;if(void 0===n)throw new Z(tt[4]+\" \"+t.title);Dt(n,e)}}handleContainerVirtualZIndexChangeRequiredEvent(t,e,i){const n=this._virtuableComponentMap.get(t);if(void 0===n)throw new J(\"GLHCVZICRE55935\");{const e=n.rootHtmlElement;if(void 0===e)throw new Z(tt[4]+\" \"+t.title);e.style.zIndex=i}}}const de=\"initial_\",ce={show:\"top\",popout:!1,maximise:!1,close:\"close-tab-unused\"},me={headerHeight:31},ue={hasHeaders:!0,reorderEnabled:!0},pe={popoutWholeStack:!1,constrainDragToContainer:!1,constrainDragToHeaders:!1,preventDragout:!1,showMaximiseIcon:!1,showPopoutIcon:!1,showCloseIcon:!1,blockedPopoutsThrowError:!0,closePopoutsOnUnload:!0,selectionEnabled:!1};var ge,fe;class ve{constructor(e){this.layout=e,ge.set(this,void 0),fe.set(this,void 0),this.handleResize=t=>{t.forEach((t=>this.resizeElement(t.target)))},this.handleMutation=()=>{this.layout.viewComponentsByContainerElement.forEach((t=>{this.resizeElement(t.container.element)}))},t.__classPrivateFieldSet(this,ge,new ResizeObserver(this.handleResize),\"f\"),t.__classPrivateFieldSet(this,fe,new MutationObserver(this.handleMutation),\"f\")}observeMutations(e){t.__classPrivateFieldGet(this,fe,\"f\")?.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[\"class\"]})}destroy(){t.__classPrivateFieldGet(this,ge,\"f\").disconnect(),t.__classPrivateFieldGet(this,fe,\"f\").disconnect()}observeContainer(e){t.__classPrivateFieldGet(this,ge,\"f\").observe(e)}unobserveContainer(e){t.__classPrivateFieldGet(this,ge,\"f\").unobserve(e)}resizeElement(t){const e=this.layout.viewComponentsByContainerElement.get(t);e&&e.resize()}}ge=new WeakMap,fe=new WeakMap;var _e={};Object.defineProperty(_e,\"__esModule\",{value:!0});var ye=_e.BaseItem=void 0;class Ce{constructor(t,e,i){this._item=t,this._layout=e,this._wrap=i}get raw(){return this._item}get layout(){return this._layout}get type(){return this._item.type}get contentItems(){return(this._item.contentItems??[]).map((t=>this._wrap(t)))}get parent(){const t=this._item.parent;return t?this._wrap(t):null}setActiveContentItem(t,e){if(\"stack\"!==this.type)throw new Error(`Cannot call setActiveContentItem from a non-stack item: ${this.type}`);this._item.setActiveContentItem(t.raw,e)}static wrapInternal(t,e,i){const n=Ce.wrapCache.get(e);if(n)return n;const o=new t(e,i,(e=>Ce.wrapInternal(t,e,i)));return Ce.wrapCache.set(e,o),o}}ye=_e.BaseItem=Ce,Ce.wrapCache=new WeakMap;const we=t=>!!t&&\"contentItems\"in t&&(t.isRow||t.isColumn);class Ie extends ye{isRoot(){return!!this._item.parent?.isGround}getBounds(){return this._item.element.getBoundingClientRect()}get viewName(){if(this._item.isComponent){const{component:t}=this._item;return t.identity.name}throw new Error(\"View name not found\")}onDestroyed(t){const e=({target:i})=>{i===this._item&&(t(),this._item.off(\"itemDestroyed\",e))};this._item.on(\"itemDestroyed\",e)}createAdjacentStack({position:t=\"right\"}={}){const e=this.raw;if(ee.isStack(e)&&e.parent){const i=[\"top\",\"bottom\"].includes(t)?\"column\":\"row\",n=[\"left\",\"top\"].includes(t)?1:0,o=we(e.parent)?e.parent:e.layoutManager,s=o,r=e.parent.contentItems.indexOf(e);e.parent.isGround&&e.parent.removeChild(e,!0);const a=o.newItem({type:i,content:[{type:\"stack\",content:[]}]},r);if(!a)throw new Error(\"createAdjacentStack: Failed to create new container\");const l=a.contentItems[0];return a.addChild(this.raw,n),we(s)&&s.removeChild(e,!0),this._wrap(l)}throw new Error(`Cannot creat adjacent stacks for type: ${e.type}, must be type 'stack'`)}setActiveContentItem(t,e=!0){if(!ee.isStack(this._item))throw new Error(`Cannot call setActiveContentItem from a non-stack item: ${this.type}`);this._item.setActiveComponentItem(t.raw,!e)}static wrap(t,e){return ye.wrapInternal(Ie,t,e)}}function be(t=[],e){for(const i of t)\"component\"===i.type?Object.keys(e).forEach((t=>{t in i&&(i.componentState={[`${de}${t}`]:i[t],...i.componentState}),i[t]=e[t]})):be(i.content,e)}function Se(t=[],e,i){for(const n of t)if(\"component\"===n.type)Object.keys(e).forEach((t=>{if(`${de}${t}`in n.componentState)return n[t]=n.componentState[`${de}${t}`],void delete n.componentState[`${de}${t}`];n[t]=e[t]}));else{if(n.size&&(\"row\"===i||\"column\"===i)){n[\"row\"===i?\"width\":\"height\"]=n.size?.includes(\".\")?parseFloat(n.size):parseInt(n.size)}Se(n.content,e,n.type)}}function Ee(t){if(t.root){t.root.content&&Se([t.root],{componentName:\"view\",isClosable:!0});const e=t.root;t.content=[e],delete t.root}return t}const xe=e=>class extends e{connectedCallback(){if(!this.name||!this.uuid)throw new Error(\" Name or uuid attribute missing\");if(!this.src)throw new Error(\" missing 'src' attribute.\");this.#t||(this.#t=document.createElement(\"iframe\"),this.#t.src=this.src,this.#t.style.height=\"100%\",this.#t.style.width=\"100%\",this.#t.style.border=\"none\",this.forceFrameName?this.#t.setAttribute(\"name\",this.forceFrameName):this.#t.setAttribute(\"name\",t.encodeOptions({brokerUrl:this.brokerUrl,name:this.name,uuid:this.uuid,providerId:this.providerId,contextGroup:this.contextGroup},\"of-frame\")),this.#t.setAttribute(\"id\",this.name),this.appendChild(this.#t))}#t;get brokerUrl(){return this.getAttribute(\"of-broker\")}set brokerUrl(t){t&&this.setAttribute(\"of-broker\",t)}get name(){return this.getAttribute(\"of-name\")}set name(t){t&&this.setAttribute(\"of-name\",t)}get forceFrameName(){return this.getAttribute(\"forceFrameName\")}set forceFrameName(t){t&&this.setAttribute(\"forceFrameName\",t)}get uuid(){return this.getAttribute(\"of-uuid\")}set uuid(t){t&&this.setAttribute(\"of-uuid\",t)}get src(){return this.getAttribute(\"src\")}set src(t){t&&this.setAttribute(\"src\",t)}get providerId(){return this.getAttribute(\"of-provider-id\")}set providerId(t){t&&this.setAttribute(\"of-provider-id\",t)}get contextGroup(){return this.getAttribute(\"of-context-group\")}set contextGroup(t){t&&this.setAttribute(\"of-context-group\",t)}static get observedAttributes(){return[\"name\"]}};class Le{static create(t){const e=document.createElement(\"of-view\");return Object.entries(t).forEach((([t,i])=>{e.setAttribute(t,i)})),e}}customElements.define(\"of-view\",xe(HTMLElement));class ze{constructor(t,i,n,{brokerUrl:o,interopConfig:s},r){this.container=t,this.config=i,this.ofView=null,this.isDragging=()=>this.container.tab.element?.className.includes(\"lm_dragging\")??!1;const{url:a,web:l,interop:h,name:d}=i||{},c=d??`internal-generated-view-${e.v4()}`;if(this.identity={uuid:n,name:c},this.container.element.setAttribute(\"of-name\",c),this.container.element.id=`container-${c}`,this.container.parent.id=c,void 0===a)return void this.handleUrlMissing();const m=this.updateTitleIfNotSet(a),u={\"of-broker\":o,\"of-uuid\":n,\"of-name\":c,src:a};l?.frameName&&(u.forceFrameName=l.frameName);const p=h?.currentContextGroup??s?.currentContextGroup;p&&(u[\"of-context-group\"]=p),s?.providerId&&(u[\"of-provider-id\"]=s?.providerId),this.ofView=Le.create(u),this.ofView.title=m??`Iframe: ${a}`,r.appendChild(this.ofView),this.ofView.style.position=\"absolute\"}updateTitleIfNotSet(t){return\"view\"===this.container.parent.title&&this.container.parent.setTitle(t),this.container.parent.title}handleUrlMissing(){const t=document.createElement(\"div\");t.setAttribute(\"style\",\"padding: 20px\");t.innerText=\"No URL provided\",this.container.element.appendChild(t)}destroy(){this.ofView?.remove(),this.ofView=null}closeView(){this.container.close()}resize(){if(this.ofView){if(this.isDragging())return void(this.ofView.style.display=\"none\");const t=this.container.element.getBoundingClientRect();this.ofView.style.position=\"absolute\",this.ofView.style.height=`${t.height}px`,this.ofView.style.width=`${t.width}px`,this.ofView.style.inset=`${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`,this.ofView.style.display=\"block\"}}}class Me extends U{static overrideConfig(t){const e={...ue,...t.settings,...pe};return e.reorderEnabled?be(t.content,{isClosable:!0}):be(t.content,{reorderEnabled:!1}),{dimensions:me,...t,settings:e,header:{...ce,show:!1!==t.settings?.hasHeaders&&ce.show}}}constructor(t,e,i,{options:n},o,s){super(),this.identity=t,this.container=e,this.initialConfig=i,this.layoutManager=o,this.platformProvider=s,this.viewComponentsByContainerElement=new Map,this.layoutContentCache=_.getSingleInstance(),this.reparentingViews=new Set,this.goldenLayoutDestroyed=!1,this.createViewComponent=(t,e)=>{m.handleSharedView(this.layoutManager,this.identity,e);const i=new ze(t,e,this.identity.uuid,this.options,this.iframeContainer);return e&&!1===e[`${de}isClosable`]&&this.stylesheet.insertRule(`#tab-${i.identity.name} .lm_close_tab { display: none; }`),this.viewComponentsByContainerElement.set(t.element,i),this.resizeController.observeContainer(t.element),i},this.iframeContainer=document.createElement(\"div\"),this.iframeContainer.id=`openfin-layout-iframe-container-${this.identity.layoutName}`,this.domEmitter=new V(e),this.setupStylesheets(),this.layout=new he(this.container),this.layout.resizeWithContainerAutomatically=!0,this.options=n,this.layout.registerComponent(\"view\",this.createViewComponent),this.setupListeners(),this.resizeController=new ve(this),this.layout.loadLayout(Me.overrideConfig(i));const r=document.createElement(\"div\");r.id=`openfin-layout-shadow-container-${this.identity.layoutName}`,r.attachShadow({mode:\"open\",delegatesFocus:!1}).appendChild(this.iframeContainer),this.container.appendChild(r),this.resizeController.observeMutations(this.container)}getStackByView({name:t}){const e=this.layout.findFirstComponentItemById(t);if(e?.parent&&e?.parent?.isStack)return Ie.wrap(e.parent,this)}getRoot(){return Ie.wrap(this.layout.rootItem,this)}async platformCloseView(t){const e=[...this.viewComponentsByContainerElement.values()].find((e=>e.identity.name===t.name));if(!e)throw new Error(`View with name: ${t.name} not found in layout.`);e.closeView()}async platformCreateView(t,{location:e,targetView:i}={}){if(i)throw new Error(\"TargetView not supported in web\");const n={options:this.platformProvider.normalizeOptions(t),target:this.identity,location:e};return this.insertView(n)}setupStylesheets(){if(this.container.setAttribute(\"data-openfin-layout-name\",this.identity.layoutName),this.stylesheet=new CSSStyleSheet,this.stylesheet.insertRule(\".lm_close { display: none; }\"),document.adoptedStyleSheets.push(this.stylesheet),this.initialConfig.settings?.preventSplitterResize){const t=`\\n [data-openfin-layout-name='${this.identity.layoutName}'] .lm_splitter {\\n pointer-events: none;\\n }`;this.stylesheet.insertRule(t)}}insertView({options:t,location:e,targetView:i}){const n=e?this.layoutContentCache.getItemOrUndefined(e.id):void 0,o=i?this.layoutContentCache.getItemOrUndefined(i.name):void 0,s=n??o??Ie.wrap(this.layout.rootItem,this);let r;if(ee.isStack(s.raw))r=s.raw;else{if(!we(s.raw))throw new Error(\"Cannot add a view at the requested location\");r=s.raw.newItem({type:\"stack\",content:[]})}const a=Math.min(r.contentItems.length,e?.index??r.contentItems.length);let l=this.layout.findFirstComponentItemById(t.name);l?(l.parent&&l.parent.removeChild(l,!0),r.addChild(l,a)):l=r.newComponent(\"view\",t,t.title??t.url??\"Default Title\",a);const h=l.component.identity;return Promise.resolve({identity:h})}replaceView({viewToReplace:t,newView:e}){throw new Error(\"Method not implemented.\")}replaceLayout(t){throw new Error(\"Method not implemented.\")}async cleanupView(t){}applyPreset(t){throw new Error(\"Method not implemented.\")}getCurrentViews(){return[...this.viewComponentsByContainerElement.values()].map((t=>t.identity))}async getFrameSnapshot(){return Ee(xt.fromResolved(this.layout.toConfig()))}isVisible(){return W(this.container)}async onViewDetached({viewIdentity:t}){this.reparentingViews.add(t.name),this.platformCloseView(t)}async destroy(){this.goldenLayoutDestroyed||(this.goldenLayoutDestroyed=!0,this.layout.destroy()),this.iframeContainer.remove(),this.resizeController.destroy(),document.adoptedStyleSheets=document.adoptedStyleSheets.filter((t=>t!==this.stylesheet)),this.viewComponentsByContainerElement.clear()}setupListeners(){this.container.addEventListener(\"pointerdown\",(t=>{if(t.target instanceof HTMLElement){const e=t.target.classList;[\"lm_tab\",\"lm_title\",\"lm_splitter\",\"lm_drag_handle\"].some((t=>e.contains(t)))&&(this.handleDragStart(),2===t.button&&t.stopPropagation())}}),!0),document.addEventListener(\"pointerup\",(()=>this.handleDragEnd()),!0),this.layout.on(\"tabCreated\",(t=>{const e=t.componentItem.component;t.element.id=`tab-${e.identity.name}`,this.domEmitter.dispatchLocalEvent(\"tab-created\",e.identity)})),this.layout.on(\"itemCreated\",(({target:t})=>{const e=t;if(Gt.isComponentItem(e)){const t=e.component;this.domEmitter.dispatchLocalEvent(\"container-created\",t.identity)}})),this.layout.on(\"itemDestroyed\",(t=>{const e=t.target;if(Gt.isComponentItem(e)){const t=e.component;this.removeViewComponent(t)}})),this.layout.on(\"itemDropped\",(()=>{this.handleDragEnd()}))}handleDragStart(){this.iframeContainer.style.pointerEvents=\"none\"}handleDragEnd(){this.iframeContainer.style.pointerEvents=\"\"}removeViewComponent(t){if(t.config&&!1===t.config[`${de}isClosable`]){const e=[...this.stylesheet.cssRules].findIndex((e=>e.cssText.includes(`#tab-${t.identity.name}`)));this.stylesheet.deleteRule(e)}t.destroy(),this.viewComponentsByContainerElement.delete(t.container.element),this.resizeController.unobserveContainer(t.container.element),this.reparentingViews.has(t.identity.name)?this.reparentingViews.delete(t.identity.name):this.platformProvider.closeView(t.identity.name);0===this.getCurrentViews().length&&(this.goldenLayoutDestroyed||(this.goldenLayoutDestroyed=!0,m.handleLastViewRemoved(this.layoutManager,this.identity)))}}class Pe{constructor(t,e,i,n){this.windowIdentity=t,this.connectConfig=e,this.provider=i,this.fallbackContainer=n}async createLayout(t,e){if(!(\"container\"in t)&&!this.fallbackContainer)throw new Error(\"Container property is not optional in web\");const{layoutName:i}=t,n=t,o=this.provider.initLayoutViews(n),s=n.container??this.fallbackContainer,r={...this.windowIdentity,layoutName:i},a=new Me(r,s,o,this.connectConfig,e,this.provider);m.registerLayout(e,i,a),this.fallbackContainer=null}async getLayoutSnapshot(t){return t.getLayoutSnapshot()}async handleLastViewRemoved(t){}}class Te{static async init(e){const i=e.getFin().InterApplicationBus.Channel,n=await i.create(`custom-frame-${e.me.uuid}`);return n.setDefaultAction((async(t,{target:e,opts:i},o)=>{const s=n.connections.find((t=>t.name===e.name));if(s)return n.dispatch(s,t,{...i,target:e});throw new Error(`Client with name ${e.name} not found`)})),await t.relayChannelClientApi_1(n,\"layout-relay\"),new Te(e)}constructor(t){this.wire=t,this.viewNames=new Set}normalizeOptions(t,i=\"default\"){const n=this.wire.me.uuid;let{name:o=`internal-generated-view-${e.v4()}`}=t;return o.match(/^internal-generated-view-/)&&this.viewNames.has(o)&&\"duplicate\"===i&&(o=`internal-generated-view-${e.v4()}`),this.viewNames.add(o),{...t,name:o,uuid:n}}closeView(t){this.viewNames.delete(t)}initLayoutViews({layout:t,multiInstanceViewBehavior:e}){return H((t=>{if(\"component\"===t.type&&t.componentState){const i=this.normalizeOptions(t.componentState,e);return{...t,componentState:i}}return t}),t)}}var Ae;const ke=t=>t;Ae=new WeakMap,exports.WebLayoutEntryPoint=class{constructor(e){Ae.set(this,void 0),this.initLayoutManager=async(e,i,{container:n,layoutManagerOverride:o})=>{const s=await Te.init(i),r=o??ke,a=new Pe(i.me,t.__classPrivateFieldGet(this,Ae,\"f\"),s,n),l=new(r(m.createClosedConstructor(a)));return await M(i,l),l},this.applyLayoutSnapshot=async(e,i,n)=>{await i.applyLayoutSnapshot(t.__classPrivateFieldGet(this,Ae,\"f\").platform.layoutSnapshot)},this.createLayout=async(t,e)=>m.createLayout(t,e),this.destroyLayout=async(t,e)=>m.destroyLayout(t,e),t.__classPrivateFieldSet(this,Ae,e,\"f\")}};\n","'use strict'\n\nexports.byteLength = byteLength\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\nfor (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i]\n revLookup[code.charCodeAt(i)] = i\n}\n\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction getLens (b64) {\n var len = b64.length\n\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // Trim off extra bytes after placeholder bytes are found\n // See: https://github.com/beatgammit/base64-js/issues/42\n var validLen = b64.indexOf('=')\n if (validLen === -1) validLen = len\n\n var placeHoldersLen = validLen === len\n ? 0\n : 4 - (validLen % 4)\n\n return [validLen, placeHoldersLen]\n}\n\n// base64 is 4/3 + up to two characters of the original data\nfunction byteLength (b64) {\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction _byteLength (b64, validLen, placeHoldersLen) {\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction toByteArray (b64) {\n var tmp\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n\n var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))\n\n var curByte = 0\n\n // if there are placeholders, only get up to the last complete 4 chars\n var len = placeHoldersLen > 0\n ? validLen - 4\n : validLen\n\n var i\n for (i = 0; i < len; i += 4) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 18) |\n (revLookup[b64.charCodeAt(i + 1)] << 12) |\n (revLookup[b64.charCodeAt(i + 2)] << 6) |\n revLookup[b64.charCodeAt(i + 3)]\n arr[curByte++] = (tmp >> 16) & 0xFF\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 2) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 2) |\n (revLookup[b64.charCodeAt(i + 1)] >> 4)\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 1) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 10) |\n (revLookup[b64.charCodeAt(i + 1)] << 4) |\n (revLookup[b64.charCodeAt(i + 2)] >> 2)\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] +\n lookup[num >> 12 & 0x3F] +\n lookup[num >> 6 & 0x3F] +\n lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n var tmp\n var output = []\n for (var i = start; i < end; i += 3) {\n tmp =\n ((uint8[i] << 16) & 0xFF0000) +\n ((uint8[i + 1] << 8) & 0xFF00) +\n (uint8[i + 2] & 0xFF)\n output.push(tripletToBase64(tmp))\n }\n return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n var tmp\n var len = uint8.length\n var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n var parts = []\n var maxChunkLength = 16383 // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1]\n parts.push(\n lookup[tmp >> 2] +\n lookup[(tmp << 4) & 0x3F] +\n '=='\n )\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + uint8[len - 1]\n parts.push(\n lookup[tmp >> 10] +\n lookup[(tmp >> 4) & 0x3F] +\n lookup[(tmp << 2) & 0x3F] +\n '='\n )\n }\n\n return parts.join('')\n}\n","/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n/* eslint-disable no-proto */\n\n'use strict'\n\nconst base64 = require('base64-js')\nconst ieee754 = require('ieee754')\nconst customInspectSymbol =\n (typeof Symbol === 'function' && typeof Symbol['for'] === 'function') // eslint-disable-line dot-notation\n ? Symbol['for']('nodejs.util.inspect.custom') // eslint-disable-line dot-notation\n : null\n\nexports.Buffer = Buffer\nexports.SlowBuffer = SlowBuffer\nexports.INSPECT_MAX_BYTES = 50\n\nconst K_MAX_LENGTH = 0x7fffffff\nexports.kMaxLength = K_MAX_LENGTH\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Print warning and recommend using `buffer` v4.x which has an Object\n * implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * We report that the browser does not support typed arrays if the are not subclassable\n * using __proto__. Firefox 4-29 lacks support for adding new properties to `Uint8Array`\n * (See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438). IE 10 lacks support\n * for __proto__ and has a buggy typed array implementation.\n */\nBuffer.TYPED_ARRAY_SUPPORT = typedArraySupport()\n\nif (!Buffer.TYPED_ARRAY_SUPPORT && typeof console !== 'undefined' &&\n typeof console.error === 'function') {\n console.error(\n 'This browser lacks typed array (Uint8Array) support which is required by ' +\n '`buffer` v5.x. Use `buffer` v4.x if you require old browser support.'\n )\n}\n\nfunction typedArraySupport () {\n // Can typed array instances can be augmented?\n try {\n const arr = new Uint8Array(1)\n const proto = { foo: function () { return 42 } }\n Object.setPrototypeOf(proto, Uint8Array.prototype)\n Object.setPrototypeOf(arr, proto)\n return arr.foo() === 42\n } catch (e) {\n return false\n }\n}\n\nObject.defineProperty(Buffer.prototype, 'parent', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.buffer\n }\n})\n\nObject.defineProperty(Buffer.prototype, 'offset', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.byteOffset\n }\n})\n\nfunction createBuffer (length) {\n if (length > K_MAX_LENGTH) {\n throw new RangeError('The value \"' + length + '\" is invalid for option \"size\"')\n }\n // Return an augmented `Uint8Array` instance\n const buf = new Uint8Array(length)\n Object.setPrototypeOf(buf, Buffer.prototype)\n return buf\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new TypeError(\n 'The \"string\" argument must be of type string. Received type number'\n )\n }\n return allocUnsafe(arg)\n }\n return from(arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\nfunction from (value, encodingOrOffset, length) {\n if (typeof value === 'string') {\n return fromString(value, encodingOrOffset)\n }\n\n if (ArrayBuffer.isView(value)) {\n return fromArrayView(value)\n }\n\n if (value == null) {\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n }\n\n if (isInstance(value, ArrayBuffer) ||\n (value && isInstance(value.buffer, ArrayBuffer))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof SharedArrayBuffer !== 'undefined' &&\n (isInstance(value, SharedArrayBuffer) ||\n (value && isInstance(value.buffer, SharedArrayBuffer)))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof value === 'number') {\n throw new TypeError(\n 'The \"value\" argument must not be of type number. Received type number'\n )\n }\n\n const valueOf = value.valueOf && value.valueOf()\n if (valueOf != null && valueOf !== value) {\n return Buffer.from(valueOf, encodingOrOffset, length)\n }\n\n const b = fromObject(value)\n if (b) return b\n\n if (typeof Symbol !== 'undefined' && Symbol.toPrimitive != null &&\n typeof value[Symbol.toPrimitive] === 'function') {\n return Buffer.from(value[Symbol.toPrimitive]('string'), encodingOrOffset, length)\n }\n\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n return from(value, encodingOrOffset, length)\n}\n\n// Note: Change prototype *after* Buffer.from is defined to workaround Chrome bug:\n// https://github.com/feross/buffer/pull/148\nObject.setPrototypeOf(Buffer.prototype, Uint8Array.prototype)\nObject.setPrototypeOf(Buffer, Uint8Array)\n\nfunction assertSize (size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be of type number')\n } else if (size < 0) {\n throw new RangeError('The value \"' + size + '\" is invalid for option \"size\"')\n }\n}\n\nfunction alloc (size, fill, encoding) {\n assertSize(size)\n if (size <= 0) {\n return createBuffer(size)\n }\n if (fill !== undefined) {\n // Only pay attention to encoding if it's a string. This\n // prevents accidentally sending in a number that would\n // be interpreted as a start offset.\n return typeof encoding === 'string'\n ? createBuffer(size).fill(fill, encoding)\n : createBuffer(size).fill(fill)\n }\n return createBuffer(size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n return alloc(size, fill, encoding)\n}\n\nfunction allocUnsafe (size) {\n assertSize(size)\n return createBuffer(size < 0 ? 0 : checked(size) | 0)\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n return allocUnsafe(size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n return allocUnsafe(size)\n}\n\nfunction fromString (string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8'\n }\n\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n\n const length = byteLength(string, encoding) | 0\n let buf = createBuffer(length)\n\n const actual = buf.write(string, encoding)\n\n if (actual !== length) {\n // Writing a hex string, for example, that contains invalid characters will\n // cause everything after the first invalid character to be ignored. (e.g.\n // 'abxxcd' will be treated as 'ab')\n buf = buf.slice(0, actual)\n }\n\n return buf\n}\n\nfunction fromArrayLike (array) {\n const length = array.length < 0 ? 0 : checked(array.length) | 0\n const buf = createBuffer(length)\n for (let i = 0; i < length; i += 1) {\n buf[i] = array[i] & 255\n }\n return buf\n}\n\nfunction fromArrayView (arrayView) {\n if (isInstance(arrayView, Uint8Array)) {\n const copy = new Uint8Array(arrayView)\n return fromArrayBuffer(copy.buffer, copy.byteOffset, copy.byteLength)\n }\n return fromArrayLike(arrayView)\n}\n\nfunction fromArrayBuffer (array, byteOffset, length) {\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\"offset\" is outside of buffer bounds')\n }\n\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\"length\" is outside of buffer bounds')\n }\n\n let buf\n if (byteOffset === undefined && length === undefined) {\n buf = new Uint8Array(array)\n } else if (length === undefined) {\n buf = new Uint8Array(array, byteOffset)\n } else {\n buf = new Uint8Array(array, byteOffset, length)\n }\n\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(buf, Buffer.prototype)\n\n return buf\n}\n\nfunction fromObject (obj) {\n if (Buffer.isBuffer(obj)) {\n const len = checked(obj.length) | 0\n const buf = createBuffer(len)\n\n if (buf.length === 0) {\n return buf\n }\n\n obj.copy(buf, 0, 0, len)\n return buf\n }\n\n if (obj.length !== undefined) {\n if (typeof obj.length !== 'number' || numberIsNaN(obj.length)) {\n return createBuffer(0)\n }\n return fromArrayLike(obj)\n }\n\n if (obj.type === 'Buffer' && Array.isArray(obj.data)) {\n return fromArrayLike(obj.data)\n }\n}\n\nfunction checked (length) {\n // Note: cannot use `length < K_MAX_LENGTH` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= K_MAX_LENGTH) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + K_MAX_LENGTH.toString(16) + ' bytes')\n }\n return length | 0\n}\n\nfunction SlowBuffer (length) {\n if (+length != length) { // eslint-disable-line eqeqeq\n length = 0\n }\n return Buffer.alloc(+length)\n}\n\nBuffer.isBuffer = function isBuffer (b) {\n return b != null && b._isBuffer === true &&\n b !== Buffer.prototype // so Buffer.isBuffer(Buffer.prototype) will be false\n}\n\nBuffer.compare = function compare (a, b) {\n if (isInstance(a, Uint8Array)) a = Buffer.from(a, a.offset, a.byteLength)\n if (isInstance(b, Uint8Array)) b = Buffer.from(b, b.offset, b.byteLength)\n if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n throw new TypeError(\n 'The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array'\n )\n }\n\n if (a === b) return 0\n\n let x = a.length\n let y = b.length\n\n for (let i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i]\n y = b[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n switch (String(encoding).toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'latin1':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return true\n default:\n return false\n }\n}\n\nBuffer.concat = function concat (list, length) {\n if (!Array.isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n\n if (list.length === 0) {\n return Buffer.alloc(0)\n }\n\n let i\n if (length === undefined) {\n length = 0\n for (i = 0; i < list.length; ++i) {\n length += list[i].length\n }\n }\n\n const buffer = Buffer.allocUnsafe(length)\n let pos = 0\n for (i = 0; i < list.length; ++i) {\n let buf = list[i]\n if (isInstance(buf, Uint8Array)) {\n if (pos + buf.length > buffer.length) {\n if (!Buffer.isBuffer(buf)) buf = Buffer.from(buf)\n buf.copy(buffer, pos)\n } else {\n Uint8Array.prototype.set.call(\n buffer,\n buf,\n pos\n )\n }\n } else if (!Buffer.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n } else {\n buf.copy(buffer, pos)\n }\n pos += buf.length\n }\n return buffer\n}\n\nfunction byteLength (string, encoding) {\n if (Buffer.isBuffer(string)) {\n return string.length\n }\n if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) {\n return string.byteLength\n }\n if (typeof string !== 'string') {\n throw new TypeError(\n 'The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. ' +\n 'Received type ' + typeof string\n )\n }\n\n const len = string.length\n const mustMatch = (arguments.length > 2 && arguments[2] === true)\n if (!mustMatch && len === 0) return 0\n\n // Use a for loop to avoid recursion\n let loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'ascii':\n case 'latin1':\n case 'binary':\n return len\n case 'utf8':\n case 'utf-8':\n return utf8ToBytes(string).length\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return len * 2\n case 'hex':\n return len >>> 1\n case 'base64':\n return base64ToBytes(string).length\n default:\n if (loweredCase) {\n return mustMatch ? -1 : utf8ToBytes(string).length // assume utf8\n }\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n let loweredCase = false\n\n // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n // property of a typed array.\n\n // This behaves neither like String nor Uint8Array in that we set start/end\n // to their upper/lower bounds if the value passed is out of range.\n // undefined is handled specially as per ECMA-262 6th Edition,\n // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n if (start === undefined || start < 0) {\n start = 0\n }\n // Return early if start > this.length. Done here to prevent potential uint32\n // coercion fail below.\n if (start > this.length) {\n return ''\n }\n\n if (end === undefined || end > this.length) {\n end = this.length\n }\n\n if (end <= 0) {\n return ''\n }\n\n // Force coercion to uint32. This will also coerce falsey/NaN values to 0.\n end >>>= 0\n start >>>= 0\n\n if (end <= start) {\n return ''\n }\n\n if (!encoding) encoding = 'utf8'\n\n while (true) {\n switch (encoding) {\n case 'hex':\n return hexSlice(this, start, end)\n\n case 'utf8':\n case 'utf-8':\n return utf8Slice(this, start, end)\n\n case 'ascii':\n return asciiSlice(this, start, end)\n\n case 'latin1':\n case 'binary':\n return latin1Slice(this, start, end)\n\n case 'base64':\n return base64Slice(this, start, end)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return utf16leSlice(this, start, end)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = (encoding + '').toLowerCase()\n loweredCase = true\n }\n }\n}\n\n// This property is used by `Buffer.isBuffer` (and the `is-buffer` npm package)\n// to detect a Buffer instance. It's not possible to use `instanceof Buffer`\n// reliably in a browserify context because there could be multiple different\n// copies of the 'buffer' package in use. This method works even for Buffer\n// instances that were created from another copy of the `buffer` package.\n// See: https://github.com/feross/buffer/issues/154\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n const i = b[n]\n b[n] = b[m]\n b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n const len = this.length\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits')\n }\n for (let i = 0; i < len; i += 2) {\n swap(this, i, i + 1)\n }\n return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n const len = this.length\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits')\n }\n for (let i = 0; i < len; i += 4) {\n swap(this, i, i + 3)\n swap(this, i + 1, i + 2)\n }\n return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n const len = this.length\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits')\n }\n for (let i = 0; i < len; i += 8) {\n swap(this, i, i + 7)\n swap(this, i + 1, i + 6)\n swap(this, i + 2, i + 5)\n swap(this, i + 3, i + 4)\n }\n return this\n}\n\nBuffer.prototype.toString = function toString () {\n const length = this.length\n if (length === 0) return ''\n if (arguments.length === 0) return utf8Slice(this, 0, length)\n return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.toLocaleString = Buffer.prototype.toString\n\nBuffer.prototype.equals = function equals (b) {\n if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n if (this === b) return true\n return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n let str = ''\n const max = exports.INSPECT_MAX_BYTES\n str = this.toString('hex', 0, max).replace(/(.{2})/g, '$1 ').trim()\n if (this.length > max) str += ' ... '\n return ''\n}\nif (customInspectSymbol) {\n Buffer.prototype[customInspectSymbol] = Buffer.prototype.inspect\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n if (isInstance(target, Uint8Array)) {\n target = Buffer.from(target, target.offset, target.byteLength)\n }\n if (!Buffer.isBuffer(target)) {\n throw new TypeError(\n 'The \"target\" argument must be one of type Buffer or Uint8Array. ' +\n 'Received type ' + (typeof target)\n )\n }\n\n if (start === undefined) {\n start = 0\n }\n if (end === undefined) {\n end = target ? target.length : 0\n }\n if (thisStart === undefined) {\n thisStart = 0\n }\n if (thisEnd === undefined) {\n thisEnd = this.length\n }\n\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError('out of range index')\n }\n\n if (thisStart >= thisEnd && start >= end) {\n return 0\n }\n if (thisStart >= thisEnd) {\n return -1\n }\n if (start >= end) {\n return 1\n }\n\n start >>>= 0\n end >>>= 0\n thisStart >>>= 0\n thisEnd >>>= 0\n\n if (this === target) return 0\n\n let x = thisEnd - thisStart\n let y = end - start\n const len = Math.min(x, y)\n\n const thisCopy = this.slice(thisStart, thisEnd)\n const targetCopy = target.slice(start, end)\n\n for (let i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i]\n y = targetCopy[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (numberIsNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [val], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n let indexSize = 1\n let arrLength = arr.length\n let valLength = val.length\n\n if (encoding !== undefined) {\n encoding = String(encoding).toLowerCase()\n if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n encoding === 'utf16le' || encoding === 'utf-16le') {\n if (arr.length < 2 || val.length < 2) {\n return -1\n }\n indexSize = 2\n arrLength /= 2\n valLength /= 2\n byteOffset /= 2\n }\n }\n\n function read (buf, i) {\n if (indexSize === 1) {\n return buf[i]\n } else {\n return buf.readUInt16BE(i * indexSize)\n }\n }\n\n let i\n if (dir) {\n let foundIndex = -1\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1) foundIndex = i\n if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n } else {\n if (foundIndex !== -1) i -= i - foundIndex\n foundIndex = -1\n }\n }\n } else {\n if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n for (i = byteOffset; i >= 0; i--) {\n let found = true\n for (let j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false\n break\n }\n }\n if (found) return i\n }\n }\n\n return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n offset = Number(offset) || 0\n const remaining = buf.length - offset\n if (!length) {\n length = remaining\n } else {\n length = Number(length)\n if (length > remaining) {\n length = remaining\n }\n }\n\n const strLen = string.length\n\n if (length > strLen / 2) {\n length = strLen / 2\n }\n let i\n for (i = 0; i < length; ++i) {\n const parsed = parseInt(string.substr(i * 2, 2), 16)\n if (numberIsNaN(parsed)) return i\n buf[offset + i] = parsed\n }\n return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n // Buffer#write(string)\n if (offset === undefined) {\n encoding = 'utf8'\n length = this.length\n offset = 0\n // Buffer#write(string, encoding)\n } else if (length === undefined && typeof offset === 'string') {\n encoding = offset\n length = this.length\n offset = 0\n // Buffer#write(string, offset[, length][, encoding])\n } else if (isFinite(offset)) {\n offset = offset >>> 0\n if (isFinite(length)) {\n length = length >>> 0\n if (encoding === undefined) encoding = 'utf8'\n } else {\n encoding = length\n length = undefined\n }\n } else {\n throw new Error(\n 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n )\n }\n\n const remaining = this.length - offset\n if (length === undefined || length > remaining) length = remaining\n\n if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n throw new RangeError('Attempt to write outside buffer bounds')\n }\n\n if (!encoding) encoding = 'utf8'\n\n let loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'hex':\n return hexWrite(this, string, offset, length)\n\n case 'utf8':\n case 'utf-8':\n return utf8Write(this, string, offset, length)\n\n case 'ascii':\n case 'latin1':\n case 'binary':\n return asciiWrite(this, string, offset, length)\n\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return base64Write(this, string, offset, length)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return ucs2Write(this, string, offset, length)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0)\n }\n}\n\nfunction base64Slice (buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf)\n } else {\n return base64.fromByteArray(buf.slice(start, end))\n }\n}\n\nfunction utf8Slice (buf, start, end) {\n end = Math.min(buf.length, end)\n const res = []\n\n let i = start\n while (i < end) {\n const firstByte = buf[i]\n let codePoint = null\n let bytesPerSequence = (firstByte > 0xEF)\n ? 4\n : (firstByte > 0xDF)\n ? 3\n : (firstByte > 0xBF)\n ? 2\n : 1\n\n if (i + bytesPerSequence <= end) {\n let secondByte, thirdByte, fourthByte, tempCodePoint\n\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 0x80) {\n codePoint = firstByte\n }\n break\n case 2:\n secondByte = buf[i + 1]\n if ((secondByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n if (tempCodePoint > 0x7F) {\n codePoint = tempCodePoint\n }\n }\n break\n case 3:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n codePoint = tempCodePoint\n }\n }\n break\n case 4:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n fourthByte = buf[i + 3]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n codePoint = tempCodePoint\n }\n }\n }\n }\n\n if (codePoint === null) {\n // we did not generate a valid codePoint so insert a\n // replacement char (U+FFFD) and advance only 1 byte\n codePoint = 0xFFFD\n bytesPerSequence = 1\n } else if (codePoint > 0xFFFF) {\n // encode to utf16 (surrogate pair dance)\n codePoint -= 0x10000\n res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n codePoint = 0xDC00 | codePoint & 0x3FF\n }\n\n res.push(codePoint)\n i += bytesPerSequence\n }\n\n return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nconst MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n const len = codePoints.length\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n }\n\n // Decode in chunks to avoid \"call stack size exceeded\".\n let res = ''\n let i = 0\n while (i < len) {\n res += String.fromCharCode.apply(\n String,\n codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n )\n }\n return res\n}\n\nfunction asciiSlice (buf, start, end) {\n let ret = ''\n end = Math.min(buf.length, end)\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F)\n }\n return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n let ret = ''\n end = Math.min(buf.length, end)\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i])\n }\n return ret\n}\n\nfunction hexSlice (buf, start, end) {\n const len = buf.length\n\n if (!start || start < 0) start = 0\n if (!end || end < 0 || end > len) end = len\n\n let out = ''\n for (let i = start; i < end; ++i) {\n out += hexSliceLookupTable[buf[i]]\n }\n return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n const bytes = buf.slice(start, end)\n let res = ''\n // If bytes.length is odd, the last 8 bits must be ignored (same as node.js)\n for (let i = 0; i < bytes.length - 1; i += 2) {\n res += String.fromCharCode(bytes[i] + (bytes[i + 1] * 256))\n }\n return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n const len = this.length\n start = ~~start\n end = end === undefined ? len : ~~end\n\n if (start < 0) {\n start += len\n if (start < 0) start = 0\n } else if (start > len) {\n start = len\n }\n\n if (end < 0) {\n end += len\n if (end < 0) end = 0\n } else if (end > len) {\n end = len\n }\n\n if (end < start) end = start\n\n const newBuf = this.subarray(start, end)\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(newBuf, Buffer.prototype)\n\n return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUintLE =\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let val = this[offset]\n let mul = 1\n let i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUintBE =\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n checkOffset(offset, byteLength, this.length)\n }\n\n let val = this[offset + --byteLength]\n let mul = 1\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUint8 =\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n return this[offset]\n}\n\nBuffer.prototype.readUint16LE =\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUint16BE =\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUint32LE =\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return ((this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16)) +\n (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUint32BE =\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] * 0x1000000) +\n ((this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n this[offset + 3])\n}\n\nBuffer.prototype.readBigUInt64LE = defineBigIntMethod(function readBigUInt64LE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const lo = first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24\n\n const hi = this[++offset] +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n last * 2 ** 24\n\n return BigInt(lo) + (BigInt(hi) << BigInt(32))\n})\n\nBuffer.prototype.readBigUInt64BE = defineBigIntMethod(function readBigUInt64BE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const hi = first * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset]\n\n const lo = this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last\n\n return (BigInt(hi) << BigInt(32)) + BigInt(lo)\n})\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let val = this[offset]\n let mul = 1\n let i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let i = byteLength\n let mul = 1\n let val = this[offset + --i]\n while (i > 0 && (mul *= 0x100)) {\n val += this[offset + --i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n if (!(this[offset] & 0x80)) return (this[offset])\n return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n const val = this[offset] | (this[offset + 1] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n const val = this[offset + 1] | (this[offset] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16) |\n (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] << 24) |\n (this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n (this[offset + 3])\n}\n\nBuffer.prototype.readBigInt64LE = defineBigIntMethod(function readBigInt64LE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const val = this[offset + 4] +\n this[offset + 5] * 2 ** 8 +\n this[offset + 6] * 2 ** 16 +\n (last << 24) // Overflow\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24)\n})\n\nBuffer.prototype.readBigInt64BE = defineBigIntMethod(function readBigInt64BE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const val = (first << 24) + // Overflow\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset]\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last)\n})\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUintLE =\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n let mul = 1\n let i = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUintBE =\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n let i = byteLength - 1\n let mul = 1\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUint8 =\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeUint16LE =\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeUint16BE =\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeUint32LE =\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset + 3] = (value >>> 24)\n this[offset + 2] = (value >>> 16)\n this[offset + 1] = (value >>> 8)\n this[offset] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeUint32BE =\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nfunction wrtBigUInt64LE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7)\n\n let lo = Number(value & BigInt(0xffffffff))\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n return offset\n}\n\nfunction wrtBigUInt64BE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7)\n\n let lo = Number(value & BigInt(0xffffffff))\n buf[offset + 7] = lo\n lo = lo >> 8\n buf[offset + 6] = lo\n lo = lo >> 8\n buf[offset + 5] = lo\n lo = lo >> 8\n buf[offset + 4] = lo\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n buf[offset + 3] = hi\n hi = hi >> 8\n buf[offset + 2] = hi\n hi = hi >> 8\n buf[offset + 1] = hi\n hi = hi >> 8\n buf[offset] = hi\n return offset + 8\n}\n\nBuffer.prototype.writeBigUInt64LE = defineBigIntMethod(function writeBigUInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeBigUInt64BE = defineBigIntMethod(function writeBigUInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n let i = 0\n let mul = 1\n let sub = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n let i = byteLength - 1\n let mul = 1\n let sub = 0\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n if (value < 0) value = 0xff + value + 1\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n this[offset + 2] = (value >>> 16)\n this[offset + 3] = (value >>> 24)\n return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (value < 0) value = 0xffffffff + value + 1\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeBigInt64LE = defineBigIntMethod(function writeBigInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nBuffer.prototype.writeBigInt64BE = defineBigIntMethod(function writeBigInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n }\n ieee754.write(buf, value, offset, littleEndian, 23, 4)\n return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n }\n ieee754.write(buf, value, offset, littleEndian, 52, 8)\n return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n if (!Buffer.isBuffer(target)) throw new TypeError('argument should be a Buffer')\n if (!start) start = 0\n if (!end && end !== 0) end = this.length\n if (targetStart >= target.length) targetStart = target.length\n if (!targetStart) targetStart = 0\n if (end > 0 && end < start) end = start\n\n // Copy 0 bytes; we're done\n if (end === start) return 0\n if (target.length === 0 || this.length === 0) return 0\n\n // Fatal error conditions\n if (targetStart < 0) {\n throw new RangeError('targetStart out of bounds')\n }\n if (start < 0 || start >= this.length) throw new RangeError('Index out of range')\n if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n // Are we oob?\n if (end > this.length) end = this.length\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start\n }\n\n const len = end - start\n\n if (this === target && typeof Uint8Array.prototype.copyWithin === 'function') {\n // Use built-in when available, missing from IE11\n this.copyWithin(targetStart, start, end)\n } else {\n Uint8Array.prototype.set.call(\n target,\n this.subarray(start, end),\n targetStart\n )\n }\n\n return len\n}\n\n// Usage:\n// buffer.fill(number[, offset[, end]])\n// buffer.fill(buffer[, offset[, end]])\n// buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n // Handle string cases:\n if (typeof val === 'string') {\n if (typeof start === 'string') {\n encoding = start\n start = 0\n end = this.length\n } else if (typeof end === 'string') {\n encoding = end\n end = this.length\n }\n if (encoding !== undefined && typeof encoding !== 'string') {\n throw new TypeError('encoding must be a string')\n }\n if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n if (val.length === 1) {\n const code = val.charCodeAt(0)\n if ((encoding === 'utf8' && code < 128) ||\n encoding === 'latin1') {\n // Fast path: If `val` fits into a single byte, use that numeric value.\n val = code\n }\n }\n } else if (typeof val === 'number') {\n val = val & 255\n } else if (typeof val === 'boolean') {\n val = Number(val)\n }\n\n // Invalid ranges are not set to a default, so can range check early.\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError('Out of range index')\n }\n\n if (end <= start) {\n return this\n }\n\n start = start >>> 0\n end = end === undefined ? this.length : end >>> 0\n\n if (!val) val = 0\n\n let i\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val\n }\n } else {\n const bytes = Buffer.isBuffer(val)\n ? val\n : Buffer.from(val, encoding)\n const len = bytes.length\n if (len === 0) {\n throw new TypeError('The value \"' + val +\n '\" is invalid for argument \"value\"')\n }\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len]\n }\n }\n\n return this\n}\n\n// CUSTOM ERRORS\n// =============\n\n// Simplified versions from Node, changed for Buffer-only usage\nconst errors = {}\nfunction E (sym, getMessage, Base) {\n errors[sym] = class NodeError extends Base {\n constructor () {\n super()\n\n Object.defineProperty(this, 'message', {\n value: getMessage.apply(this, arguments),\n writable: true,\n configurable: true\n })\n\n // Add the error code to the name to include it in the stack trace.\n this.name = `${this.name} [${sym}]`\n // Access the stack to generate the error message including the error code\n // from the name.\n this.stack // eslint-disable-line no-unused-expressions\n // Reset the name to the actual name.\n delete this.name\n }\n\n get code () {\n return sym\n }\n\n set code (value) {\n Object.defineProperty(this, 'code', {\n configurable: true,\n enumerable: true,\n value,\n writable: true\n })\n }\n\n toString () {\n return `${this.name} [${sym}]: ${this.message}`\n }\n }\n}\n\nE('ERR_BUFFER_OUT_OF_BOUNDS',\n function (name) {\n if (name) {\n return `${name} is outside of buffer bounds`\n }\n\n return 'Attempt to access memory outside buffer bounds'\n }, RangeError)\nE('ERR_INVALID_ARG_TYPE',\n function (name, actual) {\n return `The \"${name}\" argument must be of type number. Received type ${typeof actual}`\n }, TypeError)\nE('ERR_OUT_OF_RANGE',\n function (str, range, input) {\n let msg = `The value of \"${str}\" is out of range.`\n let received = input\n if (Number.isInteger(input) && Math.abs(input) > 2 ** 32) {\n received = addNumericalSeparator(String(input))\n } else if (typeof input === 'bigint') {\n received = String(input)\n if (input > BigInt(2) ** BigInt(32) || input < -(BigInt(2) ** BigInt(32))) {\n received = addNumericalSeparator(received)\n }\n received += 'n'\n }\n msg += ` It must be ${range}. Received ${received}`\n return msg\n }, RangeError)\n\nfunction addNumericalSeparator (val) {\n let res = ''\n let i = val.length\n const start = val[0] === '-' ? 1 : 0\n for (; i >= start + 4; i -= 3) {\n res = `_${val.slice(i - 3, i)}${res}`\n }\n return `${val.slice(0, i)}${res}`\n}\n\n// CHECK FUNCTIONS\n// ===============\n\nfunction checkBounds (buf, offset, byteLength) {\n validateNumber(offset, 'offset')\n if (buf[offset] === undefined || buf[offset + byteLength] === undefined) {\n boundsError(offset, buf.length - (byteLength + 1))\n }\n}\n\nfunction checkIntBI (value, min, max, buf, offset, byteLength) {\n if (value > max || value < min) {\n const n = typeof min === 'bigint' ? 'n' : ''\n let range\n if (byteLength > 3) {\n if (min === 0 || min === BigInt(0)) {\n range = `>= 0${n} and < 2${n} ** ${(byteLength + 1) * 8}${n}`\n } else {\n range = `>= -(2${n} ** ${(byteLength + 1) * 8 - 1}${n}) and < 2 ** ` +\n `${(byteLength + 1) * 8 - 1}${n}`\n }\n } else {\n range = `>= ${min}${n} and <= ${max}${n}`\n }\n throw new errors.ERR_OUT_OF_RANGE('value', range, value)\n }\n checkBounds(buf, offset, byteLength)\n}\n\nfunction validateNumber (value, name) {\n if (typeof value !== 'number') {\n throw new errors.ERR_INVALID_ARG_TYPE(name, 'number', value)\n }\n}\n\nfunction boundsError (value, length, type) {\n if (Math.floor(value) !== value) {\n validateNumber(value, type)\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset', 'an integer', value)\n }\n\n if (length < 0) {\n throw new errors.ERR_BUFFER_OUT_OF_BOUNDS()\n }\n\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset',\n `>= ${type ? 1 : 0} and <= ${length}`,\n value)\n}\n\n// HELPER FUNCTIONS\n// ================\n\nconst INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n // Node takes equal signs as end of the Base64 encoding\n str = str.split('=')[0]\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = str.trim().replace(INVALID_BASE64_RE, '')\n // Node converts strings with length < 2 to ''\n if (str.length < 2) return ''\n // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n while (str.length % 4 !== 0) {\n str = str + '='\n }\n return str\n}\n\nfunction utf8ToBytes (string, units) {\n units = units || Infinity\n let codePoint\n const length = string.length\n let leadSurrogate = null\n const bytes = []\n\n for (let i = 0; i < length; ++i) {\n codePoint = string.charCodeAt(i)\n\n // is surrogate component\n if (codePoint > 0xD7FF && codePoint < 0xE000) {\n // last char was a lead\n if (!leadSurrogate) {\n // no lead yet\n if (codePoint > 0xDBFF) {\n // unexpected trail\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n } else if (i + 1 === length) {\n // unpaired lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n }\n\n // valid lead\n leadSurrogate = codePoint\n\n continue\n }\n\n // 2 leads in a row\n if (codePoint < 0xDC00) {\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n leadSurrogate = codePoint\n continue\n }\n\n // valid surrogate pair\n codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n } else if (leadSurrogate) {\n // valid bmp char, but last char was a lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n }\n\n leadSurrogate = null\n\n // encode utf8\n if (codePoint < 0x80) {\n if ((units -= 1) < 0) break\n bytes.push(codePoint)\n } else if (codePoint < 0x800) {\n if ((units -= 2) < 0) break\n bytes.push(\n codePoint >> 0x6 | 0xC0,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x10000) {\n if ((units -= 3) < 0) break\n bytes.push(\n codePoint >> 0xC | 0xE0,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x110000) {\n if ((units -= 4) < 0) break\n bytes.push(\n codePoint >> 0x12 | 0xF0,\n codePoint >> 0xC & 0x3F | 0x80,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else {\n throw new Error('Invalid code point')\n }\n }\n\n return bytes\n}\n\nfunction asciiToBytes (str) {\n const byteArray = []\n for (let i = 0; i < str.length; ++i) {\n // Node's code seems to be doing this and not & 0x7F..\n byteArray.push(str.charCodeAt(i) & 0xFF)\n }\n return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n let c, hi, lo\n const byteArray = []\n for (let i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0) break\n\n c = str.charCodeAt(i)\n hi = c >> 8\n lo = c % 256\n byteArray.push(lo)\n byteArray.push(hi)\n }\n\n return byteArray\n}\n\nfunction base64ToBytes (str) {\n return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n let i\n for (i = 0; i < length; ++i) {\n if ((i + offset >= dst.length) || (i >= src.length)) break\n dst[i + offset] = src[i]\n }\n return i\n}\n\n// ArrayBuffer or Uint8Array objects from other contexts (i.e. iframes) do not pass\n// the `instanceof` check but they should be treated as of that type.\n// See: https://github.com/feross/buffer/issues/166\nfunction isInstance (obj, type) {\n return obj instanceof type ||\n (obj != null && obj.constructor != null && obj.constructor.name != null &&\n obj.constructor.name === type.name)\n}\nfunction numberIsNaN (obj) {\n // For IE11 support\n return obj !== obj // eslint-disable-line no-self-compare\n}\n\n// Create lookup table for `toString('hex')`\n// See: https://github.com/feross/buffer/issues/219\nconst hexSliceLookupTable = (function () {\n const alphabet = '0123456789abcdef'\n const table = new Array(256)\n for (let i = 0; i < 16; ++i) {\n const i16 = i * 16\n for (let j = 0; j < 16; ++j) {\n table[i16 + j] = alphabet[i] + alphabet[j]\n }\n }\n return table\n})()\n\n// Return not function with Error if BigInt not supported\nfunction defineBigIntMethod (fn) {\n return typeof BigInt === 'undefined' ? BufferBigIntNotDefined : fn\n}\n\nfunction BufferBigIntNotDefined () {\n throw new Error('BigInt not supported')\n}\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\nvar R = typeof Reflect === 'object' ? Reflect : null\nvar ReflectApply = R && typeof R.apply === 'function'\n ? R.apply\n : function ReflectApply(target, receiver, args) {\n return Function.prototype.apply.call(target, receiver, args);\n }\n\nvar ReflectOwnKeys\nif (R && typeof R.ownKeys === 'function') {\n ReflectOwnKeys = R.ownKeys\n} else if (Object.getOwnPropertySymbols) {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target)\n .concat(Object.getOwnPropertySymbols(target));\n };\n} else {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target);\n };\n}\n\nfunction ProcessEmitWarning(warning) {\n if (console && console.warn) console.warn(warning);\n}\n\nvar NumberIsNaN = Number.isNaN || function NumberIsNaN(value) {\n return value !== value;\n}\n\nfunction EventEmitter() {\n EventEmitter.init.call(this);\n}\nmodule.exports = EventEmitter;\nmodule.exports.once = once;\n\n// Backwards-compat with node 0.10.x\nEventEmitter.EventEmitter = EventEmitter;\n\nEventEmitter.prototype._events = undefined;\nEventEmitter.prototype._eventsCount = 0;\nEventEmitter.prototype._maxListeners = undefined;\n\n// By default EventEmitters will print a warning if more than 10 listeners are\n// added to it. This is a useful default which helps finding memory leaks.\nvar defaultMaxListeners = 10;\n\nfunction checkListener(listener) {\n if (typeof listener !== 'function') {\n throw new TypeError('The \"listener\" argument must be of type Function. Received type ' + typeof listener);\n }\n}\n\nObject.defineProperty(EventEmitter, 'defaultMaxListeners', {\n enumerable: true,\n get: function() {\n return defaultMaxListeners;\n },\n set: function(arg) {\n if (typeof arg !== 'number' || arg < 0 || NumberIsNaN(arg)) {\n throw new RangeError('The value of \"defaultMaxListeners\" is out of range. It must be a non-negative number. Received ' + arg + '.');\n }\n defaultMaxListeners = arg;\n }\n});\n\nEventEmitter.init = function() {\n\n if (this._events === undefined ||\n this._events === Object.getPrototypeOf(this)._events) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n }\n\n this._maxListeners = this._maxListeners || undefined;\n};\n\n// Obviously not all Emitters should be limited to 10. This function allows\n// that to be increased. Set to zero for unlimited.\nEventEmitter.prototype.setMaxListeners = function setMaxListeners(n) {\n if (typeof n !== 'number' || n < 0 || NumberIsNaN(n)) {\n throw new RangeError('The value of \"n\" is out of range. It must be a non-negative number. Received ' + n + '.');\n }\n this._maxListeners = n;\n return this;\n};\n\nfunction _getMaxListeners(that) {\n if (that._maxListeners === undefined)\n return EventEmitter.defaultMaxListeners;\n return that._maxListeners;\n}\n\nEventEmitter.prototype.getMaxListeners = function getMaxListeners() {\n return _getMaxListeners(this);\n};\n\nEventEmitter.prototype.emit = function emit(type) {\n var args = [];\n for (var i = 1; i < arguments.length; i++) args.push(arguments[i]);\n var doError = (type === 'error');\n\n var events = this._events;\n if (events !== undefined)\n doError = (doError && events.error === undefined);\n else if (!doError)\n return false;\n\n // If there is no 'error' event listener then throw.\n if (doError) {\n var er;\n if (args.length > 0)\n er = args[0];\n if (er instanceof Error) {\n // Note: The comments on the `throw` lines are intentional, they show\n // up in Node's output if this results in an unhandled exception.\n throw er; // Unhandled 'error' event\n }\n // At least give some kind of context to the user\n var err = new Error('Unhandled error.' + (er ? ' (' + er.message + ')' : ''));\n err.context = er;\n throw err; // Unhandled 'error' event\n }\n\n var handler = events[type];\n\n if (handler === undefined)\n return false;\n\n if (typeof handler === 'function') {\n ReflectApply(handler, this, args);\n } else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n ReflectApply(listeners[i], this, args);\n }\n\n return true;\n};\n\nfunction _addListener(target, type, listener, prepend) {\n var m;\n var events;\n var existing;\n\n checkListener(listener);\n\n events = target._events;\n if (events === undefined) {\n events = target._events = Object.create(null);\n target._eventsCount = 0;\n } else {\n // To avoid recursion in the case that type === \"newListener\"! Before\n // adding it to the listeners, first emit \"newListener\".\n if (events.newListener !== undefined) {\n target.emit('newListener', type,\n listener.listener ? listener.listener : listener);\n\n // Re-assign `events` because a newListener handler could have caused the\n // this._events to be assigned to a new object\n events = target._events;\n }\n existing = events[type];\n }\n\n if (existing === undefined) {\n // Optimize the case of one listener. Don't need the extra array object.\n existing = events[type] = listener;\n ++target._eventsCount;\n } else {\n if (typeof existing === 'function') {\n // Adding the second element, need to change to array.\n existing = events[type] =\n prepend ? [listener, existing] : [existing, listener];\n // If we've already got an array, just append.\n } else if (prepend) {\n existing.unshift(listener);\n } else {\n existing.push(listener);\n }\n\n // Check for listener leak\n m = _getMaxListeners(target);\n if (m > 0 && existing.length > m && !existing.warned) {\n existing.warned = true;\n // No error code for this since it is a Warning\n // eslint-disable-next-line no-restricted-syntax\n var w = new Error('Possible EventEmitter memory leak detected. ' +\n existing.length + ' ' + String(type) + ' listeners ' +\n 'added. Use emitter.setMaxListeners() to ' +\n 'increase limit');\n w.name = 'MaxListenersExceededWarning';\n w.emitter = target;\n w.type = type;\n w.count = existing.length;\n ProcessEmitWarning(w);\n }\n }\n\n return target;\n}\n\nEventEmitter.prototype.addListener = function addListener(type, listener) {\n return _addListener(this, type, listener, false);\n};\n\nEventEmitter.prototype.on = EventEmitter.prototype.addListener;\n\nEventEmitter.prototype.prependListener =\n function prependListener(type, listener) {\n return _addListener(this, type, listener, true);\n };\n\nfunction onceWrapper() {\n if (!this.fired) {\n this.target.removeListener(this.type, this.wrapFn);\n this.fired = true;\n if (arguments.length === 0)\n return this.listener.call(this.target);\n return this.listener.apply(this.target, arguments);\n }\n}\n\nfunction _onceWrap(target, type, listener) {\n var state = { fired: false, wrapFn: undefined, target: target, type: type, listener: listener };\n var wrapped = onceWrapper.bind(state);\n wrapped.listener = listener;\n state.wrapFn = wrapped;\n return wrapped;\n}\n\nEventEmitter.prototype.once = function once(type, listener) {\n checkListener(listener);\n this.on(type, _onceWrap(this, type, listener));\n return this;\n};\n\nEventEmitter.prototype.prependOnceListener =\n function prependOnceListener(type, listener) {\n checkListener(listener);\n this.prependListener(type, _onceWrap(this, type, listener));\n return this;\n };\n\n// Emits a 'removeListener' event if and only if the listener was removed.\nEventEmitter.prototype.removeListener =\n function removeListener(type, listener) {\n var list, events, position, i, originalListener;\n\n checkListener(listener);\n\n events = this._events;\n if (events === undefined)\n return this;\n\n list = events[type];\n if (list === undefined)\n return this;\n\n if (list === listener || list.listener === listener) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else {\n delete events[type];\n if (events.removeListener)\n this.emit('removeListener', type, list.listener || listener);\n }\n } else if (typeof list !== 'function') {\n position = -1;\n\n for (i = list.length - 1; i >= 0; i--) {\n if (list[i] === listener || list[i].listener === listener) {\n originalListener = list[i].listener;\n position = i;\n break;\n }\n }\n\n if (position < 0)\n return this;\n\n if (position === 0)\n list.shift();\n else {\n spliceOne(list, position);\n }\n\n if (list.length === 1)\n events[type] = list[0];\n\n if (events.removeListener !== undefined)\n this.emit('removeListener', type, originalListener || listener);\n }\n\n return this;\n };\n\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\n\nEventEmitter.prototype.removeAllListeners =\n function removeAllListeners(type) {\n var listeners, events, i;\n\n events = this._events;\n if (events === undefined)\n return this;\n\n // not listening for removeListener, no need to emit\n if (events.removeListener === undefined) {\n if (arguments.length === 0) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n } else if (events[type] !== undefined) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else\n delete events[type];\n }\n return this;\n }\n\n // emit removeListener for all listeners on all events\n if (arguments.length === 0) {\n var keys = Object.keys(events);\n var key;\n for (i = 0; i < keys.length; ++i) {\n key = keys[i];\n if (key === 'removeListener') continue;\n this.removeAllListeners(key);\n }\n this.removeAllListeners('removeListener');\n this._events = Object.create(null);\n this._eventsCount = 0;\n return this;\n }\n\n listeners = events[type];\n\n if (typeof listeners === 'function') {\n this.removeListener(type, listeners);\n } else if (listeners !== undefined) {\n // LIFO order\n for (i = listeners.length - 1; i >= 0; i--) {\n this.removeListener(type, listeners[i]);\n }\n }\n\n return this;\n };\n\nfunction _listeners(target, type, unwrap) {\n var events = target._events;\n\n if (events === undefined)\n return [];\n\n var evlistener = events[type];\n if (evlistener === undefined)\n return [];\n\n if (typeof evlistener === 'function')\n return unwrap ? [evlistener.listener || evlistener] : [evlistener];\n\n return unwrap ?\n unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length);\n}\n\nEventEmitter.prototype.listeners = function listeners(type) {\n return _listeners(this, type, true);\n};\n\nEventEmitter.prototype.rawListeners = function rawListeners(type) {\n return _listeners(this, type, false);\n};\n\nEventEmitter.listenerCount = function(emitter, type) {\n if (typeof emitter.listenerCount === 'function') {\n return emitter.listenerCount(type);\n } else {\n return listenerCount.call(emitter, type);\n }\n};\n\nEventEmitter.prototype.listenerCount = listenerCount;\nfunction listenerCount(type) {\n var events = this._events;\n\n if (events !== undefined) {\n var evlistener = events[type];\n\n if (typeof evlistener === 'function') {\n return 1;\n } else if (evlistener !== undefined) {\n return evlistener.length;\n }\n }\n\n return 0;\n}\n\nEventEmitter.prototype.eventNames = function eventNames() {\n return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : [];\n};\n\nfunction arrayClone(arr, n) {\n var copy = new Array(n);\n for (var i = 0; i < n; ++i)\n copy[i] = arr[i];\n return copy;\n}\n\nfunction spliceOne(list, index) {\n for (; index + 1 < list.length; index++)\n list[index] = list[index + 1];\n list.pop();\n}\n\nfunction unwrapListeners(arr) {\n var ret = new Array(arr.length);\n for (var i = 0; i < ret.length; ++i) {\n ret[i] = arr[i].listener || arr[i];\n }\n return ret;\n}\n\nfunction once(emitter, name) {\n return new Promise(function (resolve, reject) {\n function errorListener(err) {\n emitter.removeListener(name, resolver);\n reject(err);\n }\n\n function resolver() {\n if (typeof emitter.removeListener === 'function') {\n emitter.removeListener('error', errorListener);\n }\n resolve([].slice.call(arguments));\n };\n\n eventTargetAgnosticAddListener(emitter, name, resolver, { once: true });\n if (name !== 'error') {\n addErrorHandlerIfEventEmitter(emitter, errorListener, { once: true });\n }\n });\n}\n\nfunction addErrorHandlerIfEventEmitter(emitter, handler, flags) {\n if (typeof emitter.on === 'function') {\n eventTargetAgnosticAddListener(emitter, 'error', handler, flags);\n }\n}\n\nfunction eventTargetAgnosticAddListener(emitter, name, listener, flags) {\n if (typeof emitter.on === 'function') {\n if (flags.once) {\n emitter.once(name, listener);\n } else {\n emitter.on(name, listener);\n }\n } else if (typeof emitter.addEventListener === 'function') {\n // EventTarget does not have `error` event semantics like Node\n // EventEmitters, we do not listen for `error` events here.\n emitter.addEventListener(name, function wrapListener(arg) {\n // IE does not have builtin `{ once: true }` support so we\n // have to do it manually.\n if (flags.once) {\n emitter.removeEventListener(name, wrapListener);\n }\n listener(arg);\n });\n } else {\n throw new TypeError('The \"emitter\" argument must be of type EventEmitter. Received type ' + typeof emitter);\n }\n}\n","/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */\nexports.read = function (buffer, offset, isLE, mLen, nBytes) {\n var e, m\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var nBits = -7\n var i = isLE ? (nBytes - 1) : 0\n var d = isLE ? -1 : 1\n var s = buffer[offset + i]\n\n i += d\n\n e = s & ((1 << (-nBits)) - 1)\n s >>= (-nBits)\n nBits += eLen\n for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & ((1 << (-nBits)) - 1)\n e >>= (-nBits)\n nBits += mLen\n for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias\n } else if (e === eMax) {\n return m ? NaN : ((s ? -1 : 1) * Infinity)\n } else {\n m = m + Math.pow(2, mLen)\n e = e - eBias\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n var i = isLE ? 0 : (nBytes - 1)\n var d = isLE ? 1 : -1\n var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n value = Math.abs(value)\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0\n e = eMax\n } else {\n e = Math.floor(Math.log(value) / Math.LN2)\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--\n c *= 2\n }\n if (e + eBias >= 1) {\n value += rt / c\n } else {\n value += rt * Math.pow(2, 1 - eBias)\n }\n if (value * c >= 2) {\n e++\n c /= 2\n }\n\n if (e + eBias >= eMax) {\n m = 0\n e = eMax\n } else if (e + eBias >= 1) {\n m = ((value * c) - 1) * Math.pow(2, mLen)\n e = e + eBias\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n e = 0\n }\n }\n\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n e = (e << mLen) | m\n eLen += mLen\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128\n}\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView');\n\nmodule.exports = DataView;\n","var hashClear = require('./_hashClear'),\n hashDelete = require('./_hashDelete'),\n hashGet = require('./_hashGet'),\n hashHas = require('./_hashHas'),\n hashSet = require('./_hashSet');\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\nmodule.exports = Hash;\n","var listCacheClear = require('./_listCacheClear'),\n listCacheDelete = require('./_listCacheDelete'),\n listCacheGet = require('./_listCacheGet'),\n listCacheHas = require('./_listCacheHas'),\n listCacheSet = require('./_listCacheSet');\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\nmodule.exports = ListCache;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map');\n\nmodule.exports = Map;\n","var mapCacheClear = require('./_mapCacheClear'),\n mapCacheDelete = require('./_mapCacheDelete'),\n mapCacheGet = require('./_mapCacheGet'),\n mapCacheHas = require('./_mapCacheHas'),\n mapCacheSet = require('./_mapCacheSet');\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\nmodule.exports = MapCache;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Promise = getNative(root, 'Promise');\n\nmodule.exports = Promise;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Set = getNative(root, 'Set');\n\nmodule.exports = Set;\n","var MapCache = require('./_MapCache'),\n setCacheAdd = require('./_setCacheAdd'),\n setCacheHas = require('./_setCacheHas');\n\n/**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\nfunction SetCache(values) {\n var index = -1,\n length = values == null ? 0 : values.length;\n\n this.__data__ = new MapCache;\n while (++index < length) {\n this.add(values[index]);\n }\n}\n\n// Add methods to `SetCache`.\nSetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\nSetCache.prototype.has = setCacheHas;\n\nmodule.exports = SetCache;\n","var ListCache = require('./_ListCache'),\n stackClear = require('./_stackClear'),\n stackDelete = require('./_stackDelete'),\n stackGet = require('./_stackGet'),\n stackHas = require('./_stackHas'),\n stackSet = require('./_stackSet');\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\nmodule.exports = Stack;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Uint8Array = root.Uint8Array;\n\nmodule.exports = Uint8Array;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar WeakMap = getNative(root, 'WeakMap');\n\nmodule.exports = WeakMap;\n","/**\n * A specialized version of `_.forEach` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\nfunction arrayEach(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (iteratee(array[index], index, array) === false) {\n break;\n }\n }\n return array;\n}\n\nmodule.exports = arrayEach;\n","/**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\nfunction arrayFilter(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result[resIndex++] = value;\n }\n }\n return result;\n}\n\nmodule.exports = arrayFilter;\n","var baseTimes = require('./_baseTimes'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isIndex = require('./_isIndex'),\n isTypedArray = require('./isTypedArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = arrayLikeKeys;\n","/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n}\n\nmodule.exports = arrayPush;\n","/**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\nfunction arraySome(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (predicate(array[index], index, array)) {\n return true;\n }\n }\n return false;\n}\n\nmodule.exports = arraySome;\n","var baseAssignValue = require('./_baseAssignValue'),\n eq = require('./eq');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\nmodule.exports = assignValue;\n","var eq = require('./eq');\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\nmodule.exports = assocIndexOf;\n","var copyObject = require('./_copyObject'),\n keys = require('./keys');\n\n/**\n * The base implementation of `_.assign` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssign(object, source) {\n return object && copyObject(source, keys(source), object);\n}\n\nmodule.exports = baseAssign;\n","var copyObject = require('./_copyObject'),\n keysIn = require('./keysIn');\n\n/**\n * The base implementation of `_.assignIn` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssignIn(object, source) {\n return object && copyObject(source, keysIn(source), object);\n}\n\nmodule.exports = baseAssignIn;\n","var defineProperty = require('./_defineProperty');\n\n/**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction baseAssignValue(object, key, value) {\n if (key == '__proto__' && defineProperty) {\n defineProperty(object, key, {\n 'configurable': true,\n 'enumerable': true,\n 'value': value,\n 'writable': true\n });\n } else {\n object[key] = value;\n }\n}\n\nmodule.exports = baseAssignValue;\n","var Stack = require('./_Stack'),\n arrayEach = require('./_arrayEach'),\n assignValue = require('./_assignValue'),\n baseAssign = require('./_baseAssign'),\n baseAssignIn = require('./_baseAssignIn'),\n cloneBuffer = require('./_cloneBuffer'),\n copyArray = require('./_copyArray'),\n copySymbols = require('./_copySymbols'),\n copySymbolsIn = require('./_copySymbolsIn'),\n getAllKeys = require('./_getAllKeys'),\n getAllKeysIn = require('./_getAllKeysIn'),\n getTag = require('./_getTag'),\n initCloneArray = require('./_initCloneArray'),\n initCloneByTag = require('./_initCloneByTag'),\n initCloneObject = require('./_initCloneObject'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isMap = require('./isMap'),\n isObject = require('./isObject'),\n isSet = require('./isSet'),\n keys = require('./keys'),\n keysIn = require('./keysIn');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_FLAT_FLAG = 2,\n CLONE_SYMBOLS_FLAG = 4;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values supported by `_.clone`. */\nvar cloneableTags = {};\ncloneableTags[argsTag] = cloneableTags[arrayTag] =\ncloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =\ncloneableTags[boolTag] = cloneableTags[dateTag] =\ncloneableTags[float32Tag] = cloneableTags[float64Tag] =\ncloneableTags[int8Tag] = cloneableTags[int16Tag] =\ncloneableTags[int32Tag] = cloneableTags[mapTag] =\ncloneableTags[numberTag] = cloneableTags[objectTag] =\ncloneableTags[regexpTag] = cloneableTags[setTag] =\ncloneableTags[stringTag] = cloneableTags[symbolTag] =\ncloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =\ncloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;\ncloneableTags[errorTag] = cloneableTags[funcTag] =\ncloneableTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.clone` and `_.cloneDeep` which tracks\n * traversed objects.\n *\n * @private\n * @param {*} value The value to clone.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Deep clone\n * 2 - Flatten inherited properties\n * 4 - Clone symbols\n * @param {Function} [customizer] The function to customize cloning.\n * @param {string} [key] The key of `value`.\n * @param {Object} [object] The parent object of `value`.\n * @param {Object} [stack] Tracks traversed objects and their clone counterparts.\n * @returns {*} Returns the cloned value.\n */\nfunction baseClone(value, bitmask, customizer, key, object, stack) {\n var result,\n isDeep = bitmask & CLONE_DEEP_FLAG,\n isFlat = bitmask & CLONE_FLAT_FLAG,\n isFull = bitmask & CLONE_SYMBOLS_FLAG;\n\n if (customizer) {\n result = object ? customizer(value, key, object, stack) : customizer(value);\n }\n if (result !== undefined) {\n return result;\n }\n if (!isObject(value)) {\n return value;\n }\n var isArr = isArray(value);\n if (isArr) {\n result = initCloneArray(value);\n if (!isDeep) {\n return copyArray(value, result);\n }\n } else {\n var tag = getTag(value),\n isFunc = tag == funcTag || tag == genTag;\n\n if (isBuffer(value)) {\n return cloneBuffer(value, isDeep);\n }\n if (tag == objectTag || tag == argsTag || (isFunc && !object)) {\n result = (isFlat || isFunc) ? {} : initCloneObject(value);\n if (!isDeep) {\n return isFlat\n ? copySymbolsIn(value, baseAssignIn(result, value))\n : copySymbols(value, baseAssign(result, value));\n }\n } else {\n if (!cloneableTags[tag]) {\n return object ? value : {};\n }\n result = initCloneByTag(value, tag, isDeep);\n }\n }\n // Check for circular references and return its corresponding clone.\n stack || (stack = new Stack);\n var stacked = stack.get(value);\n if (stacked) {\n return stacked;\n }\n stack.set(value, result);\n\n if (isSet(value)) {\n value.forEach(function(subValue) {\n result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));\n });\n } else if (isMap(value)) {\n value.forEach(function(subValue, key) {\n result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n }\n\n var keysFunc = isFull\n ? (isFlat ? getAllKeysIn : getAllKeys)\n : (isFlat ? keysIn : keys);\n\n var props = isArr ? undefined : keysFunc(value);\n arrayEach(props || value, function(subValue, key) {\n if (props) {\n key = subValue;\n subValue = value[key];\n }\n // Recursively populate clone (susceptible to call stack limits).\n assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n return result;\n}\n\nmodule.exports = baseClone;\n","var isObject = require('./isObject');\n\n/** Built-in value references. */\nvar objectCreate = Object.create;\n\n/**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} proto The object to inherit from.\n * @returns {Object} Returns the new object.\n */\nvar baseCreate = (function() {\n function object() {}\n return function(proto) {\n if (!isObject(proto)) {\n return {};\n }\n if (objectCreate) {\n return objectCreate(proto);\n }\n object.prototype = proto;\n var result = new object;\n object.prototype = undefined;\n return result;\n };\n}());\n\nmodule.exports = baseCreate;\n","var arrayPush = require('./_arrayPush'),\n isArray = require('./isArray');\n\n/**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction baseGetAllKeys(object, keysFunc, symbolsFunc) {\n var result = keysFunc(object);\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n}\n\nmodule.exports = baseGetAllKeys;\n","var Symbol = require('./_Symbol'),\n getRawTag = require('./_getRawTag'),\n objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]';\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\nmodule.exports = baseIsArguments;\n","var baseIsEqualDeep = require('./_baseIsEqualDeep'),\n isObjectLike = require('./isObjectLike');\n\n/**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Unordered comparison\n * 2 - Partial comparison\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\nfunction baseIsEqual(value, other, bitmask, customizer, stack) {\n if (value === other) {\n return true;\n }\n if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\n return value !== value && other !== other;\n }\n return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n}\n\nmodule.exports = baseIsEqual;\n","var Stack = require('./_Stack'),\n equalArrays = require('./_equalArrays'),\n equalByTag = require('./_equalByTag'),\n equalObjects = require('./_equalObjects'),\n getTag = require('./_getTag'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isTypedArray = require('./isTypedArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n var objIsArr = isArray(object),\n othIsArr = isArray(other),\n objTag = objIsArr ? arrayTag : getTag(object),\n othTag = othIsArr ? arrayTag : getTag(other);\n\n objTag = objTag == argsTag ? objectTag : objTag;\n othTag = othTag == argsTag ? objectTag : othTag;\n\n var objIsObj = objTag == objectTag,\n othIsObj = othTag == objectTag,\n isSameTag = objTag == othTag;\n\n if (isSameTag && isBuffer(object)) {\n if (!isBuffer(other)) {\n return false;\n }\n objIsArr = true;\n objIsObj = false;\n }\n if (isSameTag && !objIsObj) {\n stack || (stack = new Stack);\n return (objIsArr || isTypedArray(object))\n ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n }\n if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n if (objIsWrapped || othIsWrapped) {\n var objUnwrapped = objIsWrapped ? object.value() : object,\n othUnwrapped = othIsWrapped ? other.value() : other;\n\n stack || (stack = new Stack);\n return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n }\n }\n if (!isSameTag) {\n return false;\n }\n stack || (stack = new Stack);\n return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n}\n\nmodule.exports = baseIsEqualDeep;\n","var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]';\n\n/**\n * The base implementation of `_.isMap` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n */\nfunction baseIsMap(value) {\n return isObjectLike(value) && getTag(value) == mapTag;\n}\n\nmodule.exports = baseIsMap;\n","var isFunction = require('./isFunction'),\n isMasked = require('./_isMasked'),\n isObject = require('./isObject'),\n toSource = require('./_toSource');\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\nmodule.exports = baseIsNative;\n","var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar setTag = '[object Set]';\n\n/**\n * The base implementation of `_.isSet` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n */\nfunction baseIsSet(value) {\n return isObjectLike(value) && getTag(value) == setTag;\n}\n\nmodule.exports = baseIsSet;\n","var baseGetTag = require('./_baseGetTag'),\n isLength = require('./isLength'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n\nmodule.exports = baseIsTypedArray;\n","var isPrototype = require('./_isPrototype'),\n nativeKeys = require('./_nativeKeys');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeys;\n","var isObject = require('./isObject'),\n isPrototype = require('./_isPrototype'),\n nativeKeysIn = require('./_nativeKeysIn');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeysIn(object) {\n if (!isObject(object)) {\n return nativeKeysIn(object);\n }\n var isProto = isPrototype(object),\n result = [];\n\n for (var key in object) {\n if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeysIn;\n","/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\nmodule.exports = baseTimes;\n","/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n return function(value) {\n return func(value);\n };\n}\n\nmodule.exports = baseUnary;\n","/**\n * Checks if a `cache` value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction cacheHas(cache, key) {\n return cache.has(key);\n}\n\nmodule.exports = cacheHas;\n","var Uint8Array = require('./_Uint8Array');\n\n/**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\nfunction cloneArrayBuffer(arrayBuffer) {\n var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n return result;\n}\n\nmodule.exports = cloneArrayBuffer;\n","var root = require('./_root');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined,\n allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;\n\n/**\n * Creates a clone of `buffer`.\n *\n * @private\n * @param {Buffer} buffer The buffer to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Buffer} Returns the cloned buffer.\n */\nfunction cloneBuffer(buffer, isDeep) {\n if (isDeep) {\n return buffer.slice();\n }\n var length = buffer.length,\n result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\n\n buffer.copy(result);\n return result;\n}\n\nmodule.exports = cloneBuffer;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer');\n\n/**\n * Creates a clone of `dataView`.\n *\n * @private\n * @param {Object} dataView The data view to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned data view.\n */\nfunction cloneDataView(dataView, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;\n return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);\n}\n\nmodule.exports = cloneDataView;\n","/** Used to match `RegExp` flags from their coerced string values. */\nvar reFlags = /\\w*$/;\n\n/**\n * Creates a clone of `regexp`.\n *\n * @private\n * @param {Object} regexp The regexp to clone.\n * @returns {Object} Returns the cloned regexp.\n */\nfunction cloneRegExp(regexp) {\n var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));\n result.lastIndex = regexp.lastIndex;\n return result;\n}\n\nmodule.exports = cloneRegExp;\n","var Symbol = require('./_Symbol');\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * Creates a clone of the `symbol` object.\n *\n * @private\n * @param {Object} symbol The symbol object to clone.\n * @returns {Object} Returns the cloned symbol object.\n */\nfunction cloneSymbol(symbol) {\n return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};\n}\n\nmodule.exports = cloneSymbol;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer');\n\n/**\n * Creates a clone of `typedArray`.\n *\n * @private\n * @param {Object} typedArray The typed array to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned typed array.\n */\nfunction cloneTypedArray(typedArray, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n}\n\nmodule.exports = cloneTypedArray;\n","/**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\nfunction copyArray(source, array) {\n var index = -1,\n length = source.length;\n\n array || (array = Array(length));\n while (++index < length) {\n array[index] = source[index];\n }\n return array;\n}\n\nmodule.exports = copyArray;\n","var assignValue = require('./_assignValue'),\n baseAssignValue = require('./_baseAssignValue');\n\n/**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\nfunction copyObject(source, props, object, customizer) {\n var isNew = !object;\n object || (object = {});\n\n var index = -1,\n length = props.length;\n\n while (++index < length) {\n var key = props[index];\n\n var newValue = customizer\n ? customizer(object[key], source[key], key, object, source)\n : undefined;\n\n if (newValue === undefined) {\n newValue = source[key];\n }\n if (isNew) {\n baseAssignValue(object, key, newValue);\n } else {\n assignValue(object, key, newValue);\n }\n }\n return object;\n}\n\nmodule.exports = copyObject;\n","var copyObject = require('./_copyObject'),\n getSymbols = require('./_getSymbols');\n\n/**\n * Copies own symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbols(source, object) {\n return copyObject(source, getSymbols(source), object);\n}\n\nmodule.exports = copySymbols;\n","var copyObject = require('./_copyObject'),\n getSymbolsIn = require('./_getSymbolsIn');\n\n/**\n * Copies own and inherited symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbolsIn(source, object) {\n return copyObject(source, getSymbolsIn(source), object);\n}\n\nmodule.exports = copySymbolsIn;\n","var root = require('./_root');\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\nmodule.exports = coreJsData;\n","var getNative = require('./_getNative');\n\nvar defineProperty = (function() {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n}());\n\nmodule.exports = defineProperty;\n","var SetCache = require('./_SetCache'),\n arraySome = require('./_arraySome'),\n cacheHas = require('./_cacheHas');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\nfunction equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n arrLength = array.length,\n othLength = other.length;\n\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n return false;\n }\n // Check that cyclic values are equal.\n var arrStacked = stack.get(array);\n var othStacked = stack.get(other);\n if (arrStacked && othStacked) {\n return arrStacked == other && othStacked == array;\n }\n var index = -1,\n result = true,\n seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n stack.set(array, other);\n stack.set(other, array);\n\n // Ignore non-index properties.\n while (++index < arrLength) {\n var arrValue = array[index],\n othValue = other[index];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, arrValue, index, other, array, stack)\n : customizer(arrValue, othValue, index, array, other, stack);\n }\n if (compared !== undefined) {\n if (compared) {\n continue;\n }\n result = false;\n break;\n }\n // Recursively compare arrays (susceptible to call stack limits).\n if (seen) {\n if (!arraySome(other, function(othValue, othIndex) {\n if (!cacheHas(seen, othIndex) &&\n (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n return seen.push(othIndex);\n }\n })) {\n result = false;\n break;\n }\n } else if (!(\n arrValue === othValue ||\n equalFunc(arrValue, othValue, bitmask, customizer, stack)\n )) {\n result = false;\n break;\n }\n }\n stack['delete'](array);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalArrays;\n","var Symbol = require('./_Symbol'),\n Uint8Array = require('./_Uint8Array'),\n eq = require('./eq'),\n equalArrays = require('./_equalArrays'),\n mapToArray = require('./_mapToArray'),\n setToArray = require('./_setToArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]';\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n switch (tag) {\n case dataViewTag:\n if ((object.byteLength != other.byteLength) ||\n (object.byteOffset != other.byteOffset)) {\n return false;\n }\n object = object.buffer;\n other = other.buffer;\n\n case arrayBufferTag:\n if ((object.byteLength != other.byteLength) ||\n !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n return false;\n }\n return true;\n\n case boolTag:\n case dateTag:\n case numberTag:\n // Coerce booleans to `1` or `0` and dates to milliseconds.\n // Invalid dates are coerced to `NaN`.\n return eq(+object, +other);\n\n case errorTag:\n return object.name == other.name && object.message == other.message;\n\n case regexpTag:\n case stringTag:\n // Coerce regexes to strings and treat strings, primitives and objects,\n // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n // for more details.\n return object == (other + '');\n\n case mapTag:\n var convert = mapToArray;\n\n case setTag:\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n convert || (convert = setToArray);\n\n if (object.size != other.size && !isPartial) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked) {\n return stacked == other;\n }\n bitmask |= COMPARE_UNORDERED_FLAG;\n\n // Recursively compare objects (susceptible to call stack limits).\n stack.set(object, other);\n var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n stack['delete'](object);\n return result;\n\n case symbolTag:\n if (symbolValueOf) {\n return symbolValueOf.call(object) == symbolValueOf.call(other);\n }\n }\n return false;\n}\n\nmodule.exports = equalByTag;\n","var getAllKeys = require('./_getAllKeys');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n objProps = getAllKeys(object),\n objLength = objProps.length,\n othProps = getAllKeys(other),\n othLength = othProps.length;\n\n if (objLength != othLength && !isPartial) {\n return false;\n }\n var index = objLength;\n while (index--) {\n var key = objProps[index];\n if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n return false;\n }\n }\n // Check that cyclic values are equal.\n var objStacked = stack.get(object);\n var othStacked = stack.get(other);\n if (objStacked && othStacked) {\n return objStacked == other && othStacked == object;\n }\n var result = true;\n stack.set(object, other);\n stack.set(other, object);\n\n var skipCtor = isPartial;\n while (++index < objLength) {\n key = objProps[index];\n var objValue = object[key],\n othValue = other[key];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, objValue, key, other, object, stack)\n : customizer(objValue, othValue, key, object, other, stack);\n }\n // Recursively compare objects (susceptible to call stack limits).\n if (!(compared === undefined\n ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n : compared\n )) {\n result = false;\n break;\n }\n skipCtor || (skipCtor = key == 'constructor');\n }\n if (result && !skipCtor) {\n var objCtor = object.constructor,\n othCtor = other.constructor;\n\n // Non `Object` object instances with different constructors are not equal.\n if (objCtor != othCtor &&\n ('constructor' in object && 'constructor' in other) &&\n !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n result = false;\n }\n }\n stack['delete'](object);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalObjects;\n","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n","var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbols = require('./_getSymbols'),\n keys = require('./keys');\n\n/**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeys(object) {\n return baseGetAllKeys(object, keys, getSymbols);\n}\n\nmodule.exports = getAllKeys;\n","var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbolsIn = require('./_getSymbolsIn'),\n keysIn = require('./keysIn');\n\n/**\n * Creates an array of own and inherited enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeysIn(object) {\n return baseGetAllKeys(object, keysIn, getSymbolsIn);\n}\n\nmodule.exports = getAllKeysIn;\n","var isKeyable = require('./_isKeyable');\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\nmodule.exports = getMapData;\n","var baseIsNative = require('./_baseIsNative'),\n getValue = require('./_getValue');\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\nmodule.exports = getNative;\n","var overArg = require('./_overArg');\n\n/** Built-in value references. */\nvar getPrototype = overArg(Object.getPrototypeOf, Object);\n\nmodule.exports = getPrototype;\n","var Symbol = require('./_Symbol');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nmodule.exports = getRawTag;\n","var arrayFilter = require('./_arrayFilter'),\n stubArray = require('./stubArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n if (object == null) {\n return [];\n }\n object = Object(object);\n return arrayFilter(nativeGetSymbols(object), function(symbol) {\n return propertyIsEnumerable.call(object, symbol);\n });\n};\n\nmodule.exports = getSymbols;\n","var arrayPush = require('./_arrayPush'),\n getPrototype = require('./_getPrototype'),\n getSymbols = require('./_getSymbols'),\n stubArray = require('./stubArray');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own and inherited enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {\n var result = [];\n while (object) {\n arrayPush(result, getSymbols(object));\n object = getPrototype(object);\n }\n return result;\n};\n\nmodule.exports = getSymbolsIn;\n","var DataView = require('./_DataView'),\n Map = require('./_Map'),\n Promise = require('./_Promise'),\n Set = require('./_Set'),\n WeakMap = require('./_WeakMap'),\n baseGetTag = require('./_baseGetTag'),\n toSource = require('./_toSource');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n setTag = '[object Set]',\n weakMapTag = '[object WeakMap]';\n\nvar dataViewTag = '[object DataView]';\n\n/** Used to detect maps, sets, and weakmaps. */\nvar dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nvar getTag = baseGetTag;\n\n// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\nif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = baseGetTag(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : '';\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n}\n\nmodule.exports = getTag;\n","/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\nmodule.exports = getValue;\n","var nativeCreate = require('./_nativeCreate');\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n}\n\nmodule.exports = hashClear;\n","/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = hashDelete;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\nmodule.exports = hashGet;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\nmodule.exports = hashHas;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\nmodule.exports = hashSet;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Initializes an array clone.\n *\n * @private\n * @param {Array} array The array to clone.\n * @returns {Array} Returns the initialized clone.\n */\nfunction initCloneArray(array) {\n var length = array.length,\n result = new array.constructor(length);\n\n // Add properties assigned by `RegExp#exec`.\n if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {\n result.index = array.index;\n result.input = array.input;\n }\n return result;\n}\n\nmodule.exports = initCloneArray;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer'),\n cloneDataView = require('./_cloneDataView'),\n cloneRegExp = require('./_cloneRegExp'),\n cloneSymbol = require('./_cloneSymbol'),\n cloneTypedArray = require('./_cloneTypedArray');\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/**\n * Initializes an object clone based on its `toStringTag`.\n *\n * **Note:** This function only supports cloning values with tags of\n * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.\n *\n * @private\n * @param {Object} object The object to clone.\n * @param {string} tag The `toStringTag` of the object to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneByTag(object, tag, isDeep) {\n var Ctor = object.constructor;\n switch (tag) {\n case arrayBufferTag:\n return cloneArrayBuffer(object);\n\n case boolTag:\n case dateTag:\n return new Ctor(+object);\n\n case dataViewTag:\n return cloneDataView(object, isDeep);\n\n case float32Tag: case float64Tag:\n case int8Tag: case int16Tag: case int32Tag:\n case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:\n return cloneTypedArray(object, isDeep);\n\n case mapTag:\n return new Ctor;\n\n case numberTag:\n case stringTag:\n return new Ctor(object);\n\n case regexpTag:\n return cloneRegExp(object);\n\n case setTag:\n return new Ctor;\n\n case symbolTag:\n return cloneSymbol(object);\n }\n}\n\nmodule.exports = initCloneByTag;\n","var baseCreate = require('./_baseCreate'),\n getPrototype = require('./_getPrototype'),\n isPrototype = require('./_isPrototype');\n\n/**\n * Initializes an object clone.\n *\n * @private\n * @param {Object} object The object to clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneObject(object) {\n return (typeof object.constructor == 'function' && !isPrototype(object))\n ? baseCreate(getPrototype(object))\n : {};\n}\n\nmodule.exports = initCloneObject;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n var type = typeof value;\n length = length == null ? MAX_SAFE_INTEGER : length;\n\n return !!length &&\n (type == 'number' ||\n (type != 'symbol' && reIsUint.test(value))) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\nmodule.exports = isIndex;\n","/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\nmodule.exports = isKeyable;\n","var coreJsData = require('./_coreJsData');\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\nmodule.exports = isMasked;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\nmodule.exports = isPrototype;\n","/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n}\n\nmodule.exports = listCacheClear;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype;\n\n/** Built-in value references. */\nvar splice = arrayProto.splice;\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n}\n\nmodule.exports = listCacheDelete;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\nmodule.exports = listCacheGet;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\nmodule.exports = listCacheHas;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\nmodule.exports = listCacheSet;\n","var Hash = require('./_Hash'),\n ListCache = require('./_ListCache'),\n Map = require('./_Map');\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\nmodule.exports = mapCacheClear;\n","var getMapData = require('./_getMapData');\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = mapCacheDelete;\n","var getMapData = require('./_getMapData');\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\nmodule.exports = mapCacheGet;\n","var getMapData = require('./_getMapData');\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\nmodule.exports = mapCacheHas;\n","var getMapData = require('./_getMapData');\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n}\n\nmodule.exports = mapCacheSet;\n","/**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\nfunction mapToArray(map) {\n var index = -1,\n result = Array(map.size);\n\n map.forEach(function(value, key) {\n result[++index] = [key, value];\n });\n return result;\n}\n\nmodule.exports = mapToArray;\n","var getNative = require('./_getNative');\n\n/* Built-in method references that are verified to be native. */\nvar nativeCreate = getNative(Object, 'create');\n\nmodule.exports = nativeCreate;\n","var overArg = require('./_overArg');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeKeys = overArg(Object.keys, Object);\n\nmodule.exports = nativeKeys;\n","/**\n * This function is like\n * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * except that it includes inherited enumerable properties.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction nativeKeysIn(object) {\n var result = [];\n if (object != null) {\n for (var key in Object(object)) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = nativeKeysIn;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n try {\n // Use `util.types` for Node.js 10+.\n var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n if (types) {\n return types;\n }\n\n // Legacy `process.binding('util')` for Node.js < 10.\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n}());\n\nmodule.exports = nodeUtil;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n","/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\nmodule.exports = overArg;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n","/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\nfunction setCacheAdd(value) {\n this.__data__.set(value, HASH_UNDEFINED);\n return this;\n}\n\nmodule.exports = setCacheAdd;\n","/**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\nfunction setCacheHas(value) {\n return this.__data__.has(value);\n}\n\nmodule.exports = setCacheHas;\n","/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\nfunction setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n}\n\nmodule.exports = setToArray;\n","var ListCache = require('./_ListCache');\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}\n\nmodule.exports = stackClear;\n","/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n var data = this.__data__,\n result = data['delete'](key);\n\n this.size = data.size;\n return result;\n}\n\nmodule.exports = stackDelete;\n","/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n return this.__data__.get(key);\n}\n\nmodule.exports = stackGet;\n","/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n return this.__data__.has(key);\n}\n\nmodule.exports = stackHas;\n","var ListCache = require('./_ListCache'),\n Map = require('./_Map'),\n MapCache = require('./_MapCache');\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n var data = this.__data__;\n if (data instanceof ListCache) {\n var pairs = data.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n this.size = ++data.size;\n return this;\n }\n data = this.__data__ = new MapCache(pairs);\n }\n data.set(key, value);\n this.size = data.size;\n return this;\n}\n\nmodule.exports = stackSet;\n","/** Used for built-in method references. */\nvar funcProto = Function.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\nmodule.exports = toSource;\n","var baseClone = require('./_baseClone');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_SYMBOLS_FLAG = 4;\n\n/**\n * This method is like `_.clone` except that it recursively clones `value`.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Lang\n * @param {*} value The value to recursively clone.\n * @returns {*} Returns the deep cloned value.\n * @see _.clone\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var deep = _.cloneDeep(objects);\n * console.log(deep[0] === objects[0]);\n * // => false\n */\nfunction cloneDeep(value) {\n return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);\n}\n\nmodule.exports = cloneDeep;\n","/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\nmodule.exports = eq;\n","var baseIsArguments = require('./_baseIsArguments'),\n isObjectLike = require('./isObjectLike');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n};\n\nmodule.exports = isArguments;\n","/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\nmodule.exports = isArray;\n","var isFunction = require('./isFunction'),\n isLength = require('./isLength');\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\nmodule.exports = isArrayLike;\n","var root = require('./_root'),\n stubFalse = require('./stubFalse');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\nmodule.exports = isBuffer;\n","var baseIsEqual = require('./_baseIsEqual');\n\n/**\n * Performs a deep comparison between two values to determine if they are\n * equivalent.\n *\n * **Note:** This method supports comparing arrays, array buffers, booleans,\n * date objects, error objects, maps, numbers, `Object` objects, regexes,\n * sets, strings, symbols, and typed arrays. `Object` objects are compared\n * by their own, not inherited, enumerable properties. Functions and DOM\n * nodes are compared by strict equality, i.e. `===`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.isEqual(object, other);\n * // => true\n *\n * object === other;\n * // => false\n */\nfunction isEqual(value, other) {\n return baseIsEqual(value, other);\n}\n\nmodule.exports = isEqual;\n","var baseGetTag = require('./_baseGetTag'),\n isObject = require('./isObject');\n\n/** `Object#toString` result references. */\nvar asyncTag = '[object AsyncFunction]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n proxyTag = '[object Proxy]';\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\nmodule.exports = isFunction;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\nmodule.exports = isLength;\n","var baseIsMap = require('./_baseIsMap'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsMap = nodeUtil && nodeUtil.isMap;\n\n/**\n * Checks if `value` is classified as a `Map` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n * @example\n *\n * _.isMap(new Map);\n * // => true\n *\n * _.isMap(new WeakMap);\n * // => false\n */\nvar isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;\n\nmodule.exports = isMap;\n","/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n","var baseIsSet = require('./_baseIsSet'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsSet = nodeUtil && nodeUtil.isSet;\n\n/**\n * Checks if `value` is classified as a `Set` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n * @example\n *\n * _.isSet(new Set);\n * // => true\n *\n * _.isSet(new WeakSet);\n * // => false\n */\nvar isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;\n\nmodule.exports = isSet;\n","var baseIsTypedArray = require('./_baseIsTypedArray'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\nmodule.exports = isTypedArray;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeys = require('./_baseKeys'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\nmodule.exports = keys;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeysIn = require('./_baseKeysIn'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\nfunction keysIn(object) {\n return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n}\n\nmodule.exports = keysIn;\n","/**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\nfunction stubArray() {\n return [];\n}\n\nmodule.exports = stubArray;\n","/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n return false;\n}\n\nmodule.exports = stubFalse;\n","import { connect, type BaseConnectionOptions } from \"@openfin/core-web\";\nimport { getSettings } from \"./settings\";\n\n/**\n * Initializes the OpenFin Web Broker connection.\n * @param inherit Should we inherit settings from the host (available in the OpenFin layout system) or use settings? Default is true.\n */\nexport async function init(inherit: boolean = true): Promise {\n\t// Set window.fin to the `fin` object.\n\tlet options: BaseConnectionOptions | undefined;\n\tif (window.fin === undefined) {\n\t\tif (!inherit) {\n\t\t\tconst settings = await getSettings();\n\t\t\tif (settings === undefined) {\n\t\t\t\tconsole.error(\n\t\t\t\t\t\"Unable to run the sample as we have been unable to load the web manifest and it's settings from the currently running html page. Please ensure that the web manifest is being served and that it contains the custom_settings section.\"\n\t\t\t\t);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\toptions = {\n\t\t\t\tbrokerUrl: settings.platform.interop.brokerUrl,\n\t\t\t\tinteropConfig: {\n\t\t\t\t\tproviderId: settings.platform.interop.providerId,\n\t\t\t\t\tcurrentContextGroup: settings.platform.interop.defaultContextGroup\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t\t// Specify an interopConfig with a specific provider ID and a context group to initialize the `fin.me.interop` client on connection.\n\t\tif (options) {\n\t\t\twindow.fin = await connect({\n\t\t\t\toptions\n\t\t\t});\n\t\t} else {\n\t\t\twindow.fin = await connect({\n\t\t\t\tconnectionInheritance: \"enabled\"\n\t\t\t});\n\t\t}\n\t\tconsole.log(\"Finished initializing the fin API.\");\n\t\t// Create and dispatch the finReady event\n\t\tconst event = new CustomEvent(\"finReady\");\n\t\twindow.dispatchEvent(event);\n\t}\n\n\tif (window.fdc3 === undefined && window?.fin?.me.interop?.getFDC3Sync !== undefined) {\n\t\twindow.fdc3 = fin.me.interop.getFDC3Sync(\"2.0\");\n\t\tconsole.log(\"Finished initializing the fdc3 API.\");\n\t\t// Create and dispatch the FDC3Ready event\n\t\tconst event = new CustomEvent(\"fdc3Ready\");\n\t\twindow.dispatchEvent(event);\n\t}\n}\n","import type { WebLayoutSnapshot } from \"@openfin/core-web\";\nimport type { Settings } from \"../shapes/setting-shapes\";\n\n/**\n * Fetches the settings for the application.\n * @returns The settings for the application.\n */\nexport async function getSettings(): Promise {\n\tconst settings = await getManifestSettings();\n\tif (settings === undefined) {\n\t\tconsole.error(\n\t\t\t\"Unable to run the example as settings are required and we fetch them from the link web manifest from the html page that is being served. It should exist in the customSettings section of the web manifest.\"\n\t\t);\n\t}\n\treturn settings;\n}\n\n/**\n * Returns a default layout from the settings if provided.\n * @returns The default layout from the settings.\n */\nexport async function getDefaultLayout(): Promise {\n\tconst settings = await getSettings();\n\tif (settings?.platform?.layout?.defaultLayout === undefined) {\n\t\tconsole.error(\n\t\t\t\"Unable to run the example as without a layout being defined. Please ensure that settings have been provided in the web manifest.\"\n\t\t);\n\t\treturn;\n\t}\n\tif (typeof settings.platform.layout.defaultLayout === \"string\") {\n\t\tconst layoutResponse = await fetch(settings.platform.layout.defaultLayout);\n\t\tconst layoutJson = (await layoutResponse.json()) as WebLayoutSnapshot;\n\t\treturn layoutJson;\n\t}\n\treturn settings.platform.layout.defaultLayout;\n}\n\n/**\n * Returns a default layout from the settings if provided.\n * @returns The default layout from the settings.\n */\nexport async function getSecondLayout(): Promise {\n\tconst settings = await getSettings();\n\tif (settings?.platform?.layout?.secondLayout === undefined) {\n\t\tconsole.error(\n\t\t\t\"Unable to run the example as without a layout being defined. Please ensure that settings have been provided in the web manifest.\"\n\t\t);\n\t\treturn;\n\t}\n\tif (typeof settings.platform.layout.secondLayout === \"string\") {\n\t\tconst layoutResponse = await fetch(settings.platform.layout.secondLayout);\n\t\tconst layoutJson = (await layoutResponse.json()) as WebLayoutSnapshot;\n\t\treturn layoutJson;\n\t}\n\treturn settings.platform.layout.secondLayout;\n}\n/**\n * Returns the settings from the manifest file.\n * @returns customSettings for this example\n */\nasync function getManifestSettings(): Promise {\n\t// Get the manifest link\n\tconst link = document.querySelector('link[rel=\"manifest\"]');\n\tif (link !== null) {\n\t\tconst manifestResponse = await fetch(link.href);\n\t\tconst manifestJson = (await manifestResponse.json()) as { custom_settings: Settings };\n\t\treturn manifestJson.custom_settings;\n\t}\n}\n","export { default as v1 } from './v1.js';\nexport { default as v3 } from './v3.js';\nexport { default as v4 } from './v4.js';\nexport { default as v5 } from './v5.js';\nexport { default as NIL } from './nil.js';\nexport { default as version } from './version.js';\nexport { default as validate } from './validate.js';\nexport { default as stringify } from './stringify.js';\nexport { default as parse } from './parse.js';","/*\n * Browser-compatible JavaScript MD5\n *\n * Modification of JavaScript MD5\n * https://github.com/blueimp/JavaScript-MD5\n *\n * Copyright 2011, Sebastian Tschan\n * https://blueimp.net\n *\n * Licensed under the MIT license:\n * https://opensource.org/licenses/MIT\n *\n * Based on\n * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message\n * Digest Algorithm, as defined in RFC 1321.\n * Version 2.2 Copyright (C) Paul Johnston 1999 - 2009\n * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet\n * Distributed under the BSD License\n * See http://pajhome.org.uk/crypt/md5 for more info.\n */\nfunction md5(bytes) {\n if (typeof bytes === 'string') {\n var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape\n\n bytes = new Uint8Array(msg.length);\n\n for (var i = 0; i < msg.length; ++i) {\n bytes[i] = msg.charCodeAt(i);\n }\n }\n\n return md5ToHexEncodedArray(wordsToMd5(bytesToWords(bytes), bytes.length * 8));\n}\n/*\n * Convert an array of little-endian words to an array of bytes\n */\n\n\nfunction md5ToHexEncodedArray(input) {\n var output = [];\n var length32 = input.length * 32;\n var hexTab = '0123456789abcdef';\n\n for (var i = 0; i < length32; i += 8) {\n var x = input[i >> 5] >>> i % 32 & 0xff;\n var hex = parseInt(hexTab.charAt(x >>> 4 & 0x0f) + hexTab.charAt(x & 0x0f), 16);\n output.push(hex);\n }\n\n return output;\n}\n/**\n * Calculate output length with padding and bit length\n */\n\n\nfunction getOutputLength(inputLength8) {\n return (inputLength8 + 64 >>> 9 << 4) + 14 + 1;\n}\n/*\n * Calculate the MD5 of an array of little-endian words, and a bit length.\n */\n\n\nfunction wordsToMd5(x, len) {\n /* append padding */\n x[len >> 5] |= 0x80 << len % 32;\n x[getOutputLength(len) - 1] = len;\n var a = 1732584193;\n var b = -271733879;\n var c = -1732584194;\n var d = 271733878;\n\n for (var i = 0; i < x.length; i += 16) {\n var olda = a;\n var oldb = b;\n var oldc = c;\n var oldd = d;\n a = md5ff(a, b, c, d, x[i], 7, -680876936);\n d = md5ff(d, a, b, c, x[i + 1], 12, -389564586);\n c = md5ff(c, d, a, b, x[i + 2], 17, 606105819);\n b = md5ff(b, c, d, a, x[i + 3], 22, -1044525330);\n a = md5ff(a, b, c, d, x[i + 4], 7, -176418897);\n d = md5ff(d, a, b, c, x[i + 5], 12, 1200080426);\n c = md5ff(c, d, a, b, x[i + 6], 17, -1473231341);\n b = md5ff(b, c, d, a, x[i + 7], 22, -45705983);\n a = md5ff(a, b, c, d, x[i + 8], 7, 1770035416);\n d = md5ff(d, a, b, c, x[i + 9], 12, -1958414417);\n c = md5ff(c, d, a, b, x[i + 10], 17, -42063);\n b = md5ff(b, c, d, a, x[i + 11], 22, -1990404162);\n a = md5ff(a, b, c, d, x[i + 12], 7, 1804603682);\n d = md5ff(d, a, b, c, x[i + 13], 12, -40341101);\n c = md5ff(c, d, a, b, x[i + 14], 17, -1502002290);\n b = md5ff(b, c, d, a, x[i + 15], 22, 1236535329);\n a = md5gg(a, b, c, d, x[i + 1], 5, -165796510);\n d = md5gg(d, a, b, c, x[i + 6], 9, -1069501632);\n c = md5gg(c, d, a, b, x[i + 11], 14, 643717713);\n b = md5gg(b, c, d, a, x[i], 20, -373897302);\n a = md5gg(a, b, c, d, x[i + 5], 5, -701558691);\n d = md5gg(d, a, b, c, x[i + 10], 9, 38016083);\n c = md5gg(c, d, a, b, x[i + 15], 14, -660478335);\n b = md5gg(b, c, d, a, x[i + 4], 20, -405537848);\n a = md5gg(a, b, c, d, x[i + 9], 5, 568446438);\n d = md5gg(d, a, b, c, x[i + 14], 9, -1019803690);\n c = md5gg(c, d, a, b, x[i + 3], 14, -187363961);\n b = md5gg(b, c, d, a, x[i + 8], 20, 1163531501);\n a = md5gg(a, b, c, d, x[i + 13], 5, -1444681467);\n d = md5gg(d, a, b, c, x[i + 2], 9, -51403784);\n c = md5gg(c, d, a, b, x[i + 7], 14, 1735328473);\n b = md5gg(b, c, d, a, x[i + 12], 20, -1926607734);\n a = md5hh(a, b, c, d, x[i + 5], 4, -378558);\n d = md5hh(d, a, b, c, x[i + 8], 11, -2022574463);\n c = md5hh(c, d, a, b, x[i + 11], 16, 1839030562);\n b = md5hh(b, c, d, a, x[i + 14], 23, -35309556);\n a = md5hh(a, b, c, d, x[i + 1], 4, -1530992060);\n d = md5hh(d, a, b, c, x[i + 4], 11, 1272893353);\n c = md5hh(c, d, a, b, x[i + 7], 16, -155497632);\n b = md5hh(b, c, d, a, x[i + 10], 23, -1094730640);\n a = md5hh(a, b, c, d, x[i + 13], 4, 681279174);\n d = md5hh(d, a, b, c, x[i], 11, -358537222);\n c = md5hh(c, d, a, b, x[i + 3], 16, -722521979);\n b = md5hh(b, c, d, a, x[i + 6], 23, 76029189);\n a = md5hh(a, b, c, d, x[i + 9], 4, -640364487);\n d = md5hh(d, a, b, c, x[i + 12], 11, -421815835);\n c = md5hh(c, d, a, b, x[i + 15], 16, 530742520);\n b = md5hh(b, c, d, a, x[i + 2], 23, -995338651);\n a = md5ii(a, b, c, d, x[i], 6, -198630844);\n d = md5ii(d, a, b, c, x[i + 7], 10, 1126891415);\n c = md5ii(c, d, a, b, x[i + 14], 15, -1416354905);\n b = md5ii(b, c, d, a, x[i + 5], 21, -57434055);\n a = md5ii(a, b, c, d, x[i + 12], 6, 1700485571);\n d = md5ii(d, a, b, c, x[i + 3], 10, -1894986606);\n c = md5ii(c, d, a, b, x[i + 10], 15, -1051523);\n b = md5ii(b, c, d, a, x[i + 1], 21, -2054922799);\n a = md5ii(a, b, c, d, x[i + 8], 6, 1873313359);\n d = md5ii(d, a, b, c, x[i + 15], 10, -30611744);\n c = md5ii(c, d, a, b, x[i + 6], 15, -1560198380);\n b = md5ii(b, c, d, a, x[i + 13], 21, 1309151649);\n a = md5ii(a, b, c, d, x[i + 4], 6, -145523070);\n d = md5ii(d, a, b, c, x[i + 11], 10, -1120210379);\n c = md5ii(c, d, a, b, x[i + 2], 15, 718787259);\n b = md5ii(b, c, d, a, x[i + 9], 21, -343485551);\n a = safeAdd(a, olda);\n b = safeAdd(b, oldb);\n c = safeAdd(c, oldc);\n d = safeAdd(d, oldd);\n }\n\n return [a, b, c, d];\n}\n/*\n * Convert an array bytes to an array of little-endian words\n * Characters >255 have their high-byte silently ignored.\n */\n\n\nfunction bytesToWords(input) {\n if (input.length === 0) {\n return [];\n }\n\n var length8 = input.length * 8;\n var output = new Uint32Array(getOutputLength(length8));\n\n for (var i = 0; i < length8; i += 8) {\n output[i >> 5] |= (input[i / 8] & 0xff) << i % 32;\n }\n\n return output;\n}\n/*\n * Add integers, wrapping at 2^32. This uses 16-bit operations internally\n * to work around bugs in some JS interpreters.\n */\n\n\nfunction safeAdd(x, y) {\n var lsw = (x & 0xffff) + (y & 0xffff);\n var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n return msw << 16 | lsw & 0xffff;\n}\n/*\n * Bitwise rotate a 32-bit number to the left.\n */\n\n\nfunction bitRotateLeft(num, cnt) {\n return num << cnt | num >>> 32 - cnt;\n}\n/*\n * These functions implement the four basic operations the algorithm uses.\n */\n\n\nfunction md5cmn(q, a, b, x, s, t) {\n return safeAdd(bitRotateLeft(safeAdd(safeAdd(a, q), safeAdd(x, t)), s), b);\n}\n\nfunction md5ff(a, b, c, d, x, s, t) {\n return md5cmn(b & c | ~b & d, a, b, x, s, t);\n}\n\nfunction md5gg(a, b, c, d, x, s, t) {\n return md5cmn(b & d | c & ~d, a, b, x, s, t);\n}\n\nfunction md5hh(a, b, c, d, x, s, t) {\n return md5cmn(b ^ c ^ d, a, b, x, s, t);\n}\n\nfunction md5ii(a, b, c, d, x, s, t) {\n return md5cmn(c ^ (b | ~d), a, b, x, s, t);\n}\n\nexport default md5;","export default '00000000-0000-0000-0000-000000000000';","import validate from './validate.js';\n\nfunction parse(uuid) {\n if (!validate(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n var v;\n var arr = new Uint8Array(16); // Parse ########-....-....-....-............\n\n arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24;\n arr[1] = v >>> 16 & 0xff;\n arr[2] = v >>> 8 & 0xff;\n arr[3] = v & 0xff; // Parse ........-####-....-....-............\n\n arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8;\n arr[5] = v & 0xff; // Parse ........-....-####-....-............\n\n arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8;\n arr[7] = v & 0xff; // Parse ........-....-....-####-............\n\n arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8;\n arr[9] = v & 0xff; // Parse ........-....-....-....-############\n // (Use \"/\" to avoid 32-bit truncation when bit-shifting high-order bytes)\n\n arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff;\n arr[11] = v / 0x100000000 & 0xff;\n arr[12] = v >>> 24 & 0xff;\n arr[13] = v >>> 16 & 0xff;\n arr[14] = v >>> 8 & 0xff;\n arr[15] = v & 0xff;\n return arr;\n}\n\nexport default parse;","export default /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;","// Unique ID creation requires a high quality random # generator. In the browser we therefore\n// require the crypto API and do not support built-in fallback to lower quality random number\n// generators (like Math.random()).\nvar getRandomValues;\nvar rnds8 = new Uint8Array(16);\nexport default function rng() {\n // lazy load so that environments that need to polyfill have a chance to do so\n if (!getRandomValues) {\n // getRandomValues needs to be invoked in a context where \"this\" is a Crypto implementation. Also,\n // find the complete implementation of crypto (msCrypto) on IE11.\n getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto !== 'undefined' && typeof msCrypto.getRandomValues === 'function' && msCrypto.getRandomValues.bind(msCrypto);\n\n if (!getRandomValues) {\n throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');\n }\n }\n\n return getRandomValues(rnds8);\n}","// Adapted from Chris Veness' SHA1 code at\n// http://www.movable-type.co.uk/scripts/sha1.html\nfunction f(s, x, y, z) {\n switch (s) {\n case 0:\n return x & y ^ ~x & z;\n\n case 1:\n return x ^ y ^ z;\n\n case 2:\n return x & y ^ x & z ^ y & z;\n\n case 3:\n return x ^ y ^ z;\n }\n}\n\nfunction ROTL(x, n) {\n return x << n | x >>> 32 - n;\n}\n\nfunction sha1(bytes) {\n var K = [0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xca62c1d6];\n var H = [0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0];\n\n if (typeof bytes === 'string') {\n var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape\n\n bytes = [];\n\n for (var i = 0; i < msg.length; ++i) {\n bytes.push(msg.charCodeAt(i));\n }\n } else if (!Array.isArray(bytes)) {\n // Convert Array-like to Array\n bytes = Array.prototype.slice.call(bytes);\n }\n\n bytes.push(0x80);\n var l = bytes.length / 4 + 2;\n var N = Math.ceil(l / 16);\n var M = new Array(N);\n\n for (var _i = 0; _i < N; ++_i) {\n var arr = new Uint32Array(16);\n\n for (var j = 0; j < 16; ++j) {\n arr[j] = bytes[_i * 64 + j * 4] << 24 | bytes[_i * 64 + j * 4 + 1] << 16 | bytes[_i * 64 + j * 4 + 2] << 8 | bytes[_i * 64 + j * 4 + 3];\n }\n\n M[_i] = arr;\n }\n\n M[N - 1][14] = (bytes.length - 1) * 8 / Math.pow(2, 32);\n M[N - 1][14] = Math.floor(M[N - 1][14]);\n M[N - 1][15] = (bytes.length - 1) * 8 & 0xffffffff;\n\n for (var _i2 = 0; _i2 < N; ++_i2) {\n var W = new Uint32Array(80);\n\n for (var t = 0; t < 16; ++t) {\n W[t] = M[_i2][t];\n }\n\n for (var _t = 16; _t < 80; ++_t) {\n W[_t] = ROTL(W[_t - 3] ^ W[_t - 8] ^ W[_t - 14] ^ W[_t - 16], 1);\n }\n\n var a = H[0];\n var b = H[1];\n var c = H[2];\n var d = H[3];\n var e = H[4];\n\n for (var _t2 = 0; _t2 < 80; ++_t2) {\n var s = Math.floor(_t2 / 20);\n var T = ROTL(a, 5) + f(s, b, c, d) + e + K[s] + W[_t2] >>> 0;\n e = d;\n d = c;\n c = ROTL(b, 30) >>> 0;\n b = a;\n a = T;\n }\n\n H[0] = H[0] + a >>> 0;\n H[1] = H[1] + b >>> 0;\n H[2] = H[2] + c >>> 0;\n H[3] = H[3] + d >>> 0;\n H[4] = H[4] + e >>> 0;\n }\n\n return [H[0] >> 24 & 0xff, H[0] >> 16 & 0xff, H[0] >> 8 & 0xff, H[0] & 0xff, H[1] >> 24 & 0xff, H[1] >> 16 & 0xff, H[1] >> 8 & 0xff, H[1] & 0xff, H[2] >> 24 & 0xff, H[2] >> 16 & 0xff, H[2] >> 8 & 0xff, H[2] & 0xff, H[3] >> 24 & 0xff, H[3] >> 16 & 0xff, H[3] >> 8 & 0xff, H[3] & 0xff, H[4] >> 24 & 0xff, H[4] >> 16 & 0xff, H[4] >> 8 & 0xff, H[4] & 0xff];\n}\n\nexport default sha1;","import validate from './validate.js';\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\n\nvar byteToHex = [];\n\nfor (var i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).substr(1));\n}\n\nfunction stringify(arr) {\n var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n var uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!validate(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n\n return uuid;\n}\n\nexport default stringify;","import rng from './rng.js';\nimport stringify from './stringify.js'; // **`v1()` - Generate time-based UUID**\n//\n// Inspired by https://github.com/LiosK/UUID.js\n// and http://docs.python.org/library/uuid.html\n\nvar _nodeId;\n\nvar _clockseq; // Previous uuid creation time\n\n\nvar _lastMSecs = 0;\nvar _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details\n\nfunction v1(options, buf, offset) {\n var i = buf && offset || 0;\n var b = buf || new Array(16);\n options = options || {};\n var node = options.node || _nodeId;\n var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not\n // specified. We do this lazily to minimize issues related to insufficient\n // system entropy. See #189\n\n if (node == null || clockseq == null) {\n var seedBytes = options.random || (options.rng || rng)();\n\n if (node == null) {\n // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)\n node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]];\n }\n\n if (clockseq == null) {\n // Per 4.2.2, randomize (14 bit) clockseq\n clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;\n }\n } // UUID timestamps are 100 nano-second units since the Gregorian epoch,\n // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so\n // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'\n // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.\n\n\n var msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock\n // cycle to simulate higher resolution clock\n\n var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs)\n\n var dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression\n\n if (dt < 0 && options.clockseq === undefined) {\n clockseq = clockseq + 1 & 0x3fff;\n } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new\n // time interval\n\n\n if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {\n nsecs = 0;\n } // Per 4.2.1.2 Throw error if too many uuids are requested\n\n\n if (nsecs >= 10000) {\n throw new Error(\"uuid.v1(): Can't create more than 10M uuids/sec\");\n }\n\n _lastMSecs = msecs;\n _lastNSecs = nsecs;\n _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch\n\n msecs += 12219292800000; // `time_low`\n\n var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;\n b[i++] = tl >>> 24 & 0xff;\n b[i++] = tl >>> 16 & 0xff;\n b[i++] = tl >>> 8 & 0xff;\n b[i++] = tl & 0xff; // `time_mid`\n\n var tmh = msecs / 0x100000000 * 10000 & 0xfffffff;\n b[i++] = tmh >>> 8 & 0xff;\n b[i++] = tmh & 0xff; // `time_high_and_version`\n\n b[i++] = tmh >>> 24 & 0xf | 0x10; // include version\n\n b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)\n\n b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low`\n\n b[i++] = clockseq & 0xff; // `node`\n\n for (var n = 0; n < 6; ++n) {\n b[i + n] = node[n];\n }\n\n return buf || stringify(b);\n}\n\nexport default v1;","import v35 from './v35.js';\nimport md5 from './md5.js';\nvar v3 = v35('v3', 0x30, md5);\nexport default v3;","import stringify from './stringify.js';\nimport parse from './parse.js';\n\nfunction stringToBytes(str) {\n str = unescape(encodeURIComponent(str)); // UTF8 escape\n\n var bytes = [];\n\n for (var i = 0; i < str.length; ++i) {\n bytes.push(str.charCodeAt(i));\n }\n\n return bytes;\n}\n\nexport var DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8';\nexport var URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8';\nexport default function (name, version, hashfunc) {\n function generateUUID(value, namespace, buf, offset) {\n if (typeof value === 'string') {\n value = stringToBytes(value);\n }\n\n if (typeof namespace === 'string') {\n namespace = parse(namespace);\n }\n\n if (namespace.length !== 16) {\n throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)');\n } // Compute hash of namespace and value, Per 4.3\n // Future: Use spread syntax when supported on all platforms, e.g. `bytes =\n // hashfunc([...namespace, ... value])`\n\n\n var bytes = new Uint8Array(16 + value.length);\n bytes.set(namespace);\n bytes.set(value, namespace.length);\n bytes = hashfunc(bytes);\n bytes[6] = bytes[6] & 0x0f | version;\n bytes[8] = bytes[8] & 0x3f | 0x80;\n\n if (buf) {\n offset = offset || 0;\n\n for (var i = 0; i < 16; ++i) {\n buf[offset + i] = bytes[i];\n }\n\n return buf;\n }\n\n return stringify(bytes);\n } // Function#name is not settable on some platforms (#270)\n\n\n try {\n generateUUID.name = name; // eslint-disable-next-line no-empty\n } catch (err) {} // For CommonJS default export support\n\n\n generateUUID.DNS = DNS;\n generateUUID.URL = URL;\n return generateUUID;\n}","import rng from './rng.js';\nimport stringify from './stringify.js';\n\nfunction v4(options, buf, offset) {\n options = options || {};\n var rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n offset = offset || 0;\n\n for (var i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n\n return buf;\n }\n\n return stringify(rnds);\n}\n\nexport default v4;","import v35 from './v35.js';\nimport sha1 from './sha1.js';\nvar v5 = v35('v5', 0x50, sha1);\nexport default v5;","import REGEX from './regex.js';\n\nfunction validate(uuid) {\n return typeof uuid === 'string' && REGEX.test(uuid);\n}\n\nexport default validate;","import validate from './validate.js';\n\nfunction version(uuid) {\n if (!validate(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n return parseInt(uuid.substr(14, 1), 16);\n}\n\nexport default version;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = (module) => {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","import type { Context } from \"@finos/fdc3\";\nimport { init } from \"../platform/api\";\n\nwindow.addEventListener(\"DOMContentLoaded\", async () => {\n\tawait init(true);\n\tawait initializeDOM();\n});\n\n/**\n * Broadcasts a context using FDC3.\n */\nasync function broadcastContext(): Promise {\n\tconst contextType = \"fdc3.instrument\";\n\tconst contextName = \"Apple\";\n\tconst idData = {\n\t\tticker: \"AAPL\"\n\t};\n\tconst context = {\n\t\ttype: contextType,\n\t\tname: contextName,\n\t\tid: idData\n\t};\n\tif (window.fdc3) {\n\t\tawait window.fdc3.broadcast(context);\n\t\tconsole.log(`Broadcasted context: ${contextType} - ${contextName}`);\n\t} else {\n\t\twindow.addEventListener(\"fdc3Ready\", async () => {\n\t\t\tawait window.fdc3.broadcast(context);\n\t\t\tconsole.log(`Broadcasted context: ${contextType} - ${contextName}`);\n\t\t});\n\t}\n}\n\n/**\n * Adds an FDC3 context listener to the window.\n */\nasync function addFDC3Listener(): Promise {\n\tif (window.fdc3) {\n\t\tawait window.fdc3.addContextListener(null, (context) => {\n\t\t\tupdateDOMElements(context);\n\t\t});\n\t} else {\n\t\twindow.addEventListener(\"fdc3Ready\", async () => {\n\t\t\tawait window.fdc3.addContextListener(null, (context) => {\n\t\t\t\tupdateDOMElements(context);\n\t\t\t});\n\t\t});\n\t}\n}\n\n/**\n * Updates the DOM elements with the provided context.\n * @param context The context to update the DOM elements with.\n */\nfunction updateDOMElements(context: Context): void {\n\tconst contextTypeSpan = document.querySelector(\"#contextType\");\n\tconst contextNameSpan = document.querySelector(\"#contextName\");\n\tconst contextBodyPre = document.querySelector(\"#contextBody\");\n\n\tif (contextTypeSpan !== null && contextNameSpan !== null && contextBodyPre !== null) {\n\t\tcontextTypeSpan.textContent = context.type;\n\t\tcontextNameSpan.textContent = context.name ?? \"No name provided.\";\n\t\tcontextBodyPre.textContent = JSON.stringify(context, null, 2);\n\t}\n}\n\n/**\n * Initialize the DOM elements.\n */\nasync function initializeDOM(): Promise {\n\tconst broadcastButton = document.querySelector(\"#broadcast\");\n\n\tif (broadcastButton !== null) {\n\t\tbroadcastButton.addEventListener(\"click\", async () => {\n\t\t\tawait broadcastContext();\n\t\t});\n\t}\n\n\tawait addFDC3Listener();\n}\n"],"names":[],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"fdc3-view.bundle.js","mappings":";;;;;;;;;;AAAa,MAAM,mBAAO,CAAC,qFAAoB,EAAE,mBAAO,CAAC,mDAAS,EAAE,mBAAO,CAAC,+DA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AACA;AACA;AACA;;AAEY;;AAEZ,eAAe,mBAAO,CAAC,wDAAW;AAClC,gBAAgB,mBAAO,CAAC,oDAAS;AACjC;AACA;AACA;AACA;;AAEA,cAAc;AACd,kBAAkB;AAClB,yBAAyB;;AAEzB;AACA,kBAAkB;;AAElB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,kBAAkB,YAAY;AAC9B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA,wCAAwC,SAAS;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;;AAEA;AACA;AACA,cAAc,iBAAiB;AAC/B;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,iDAAiD,EAAE;AACnD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C;AAC1C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA,yBAAyB,eAAe;AACxC;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,yBAAyB,QAAQ;AACjC;AACA,sBAAsB,eAAe;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc,YAAY;AAC1B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB,sBAAsB;AACxC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,mBAAmB;AACnB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA,oBAAoB,SAAS;AAC7B;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA,qBAAqB,WAAW,GAAG,IAAI;AACvC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA,gBAAgB,WAAW,GAAG,IAAI,KAAK,aAAa;AACpD;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;;AAEA;AACA,GAAG;AACH;AACA;AACA,mBAAmB,KAAK,mDAAmD,cAAc;AACzF,GAAG;AACH;AACA;AACA,+BAA+B,IAAI;AACnC;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,MAAM,aAAa,SAAS;AACtD;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,SAAS,gBAAgB;AACzB,cAAc,oBAAoB,EAAE,IAAI;AACxC;AACA,YAAY,gBAAgB,EAAE,IAAI;AAClC;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,GAAG,SAAS,GAAG,KAAK,qBAAqB,EAAE,EAAE;AACpE,QAAQ;AACR,yBAAyB,GAAG,KAAK,yBAAyB,EAAE,EAAE;AAC9D,mBAAmB,yBAAyB,EAAE,EAAE;AAChD;AACA,MAAM;AACN,oBAAoB,IAAI,EAAE,GAAG,SAAS,IAAI,EAAE,EAAE;AAC9C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,0CAA0C,cAAc,SAAS,OAAO;AACxE;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,kBAAkB,YAAY;AAC9B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,kBAAkB,gBAAgB;AAClC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,kBAAkB,gBAAgB;AAClC;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,cAAc,YAAY;AAC1B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,QAAQ;AAC1B;AACA,oBAAoB,QAAQ;AAC5B;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;;;;;ACzjEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEa;;AAEb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB;;AAEnB;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,sBAAsB;AACxC;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA,eAAe;AACf;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA,oBAAoB,SAAS;AAC7B;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;;AAEA,kCAAkC,QAAQ;AAC1C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oBAAoB,iBAAiB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,QAAQ;AACR;AACA,uCAAuC,QAAQ;AAC/C;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,OAAO;AACzB;AACA;AACA;;AAEA;AACA,SAAS,yBAAyB;AAClC;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,gBAAgB;AAClC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,8DAA8D,YAAY;AAC1E;AACA,8DAA8D,YAAY;AAC1E;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,qCAAqC,YAAY;AACjD;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;AACA;;;;;;;;;;;AChfA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,SAAS,WAAW;;AAEpB;AACA;AACA;AACA,SAAS,WAAW;;AAEpB;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA,aAAa;AACb;AACA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;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,UAAU;AACrB,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACrBA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,UAAU;AACrB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACxBA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,kBAAkB,mBAAO,CAAC,+DAAe;AACzC,cAAc,mBAAO,CAAC,uDAAW;AACjC,eAAe,mBAAO,CAAC,yDAAY;AACnC,cAAc,mBAAO,CAAC,yDAAY;AAClC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,SAAS;AACpB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AChDA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACnBA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,UAAU;AACrB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACtBA,sBAAsB,mBAAO,CAAC,yEAAoB;AAClD,SAAS,mBAAO,CAAC,6CAAM;;AAEvB;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ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AAO,CAAC,mEAAiB;AAC5C,aAAa,mBAAO,CAAC,uDAAW;AAChC,qBAAqB,mBAAO,CAAC,uEAAmB;AAChD,qBAAqB,mBAAO,CAAC,uEAAmB;AAChD,sBAAsB,mBAAO,CAAC,yEAAoB;AAClD,cAAc,mBAAO,CAAC,uDAAW;AACjC,eAAe,mBAAO,CAAC,yDAAY;AACnC,YAAY,mBAAO,CAAC,mDAAS;AAC7B,eAAe,mBAAO,CAAC,yDAAY;AACnC,YAAY,mBAAO,CAAC,mDAAS;AAC7B,WAAW,mBAAO,CAAC,iDAAQ;AAC3B,aAAa,mBAAO,CAAC,qDAAU;;AAE/B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,SAAS;AACpB;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa,GAAG;AAChB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;AACA,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;;;;;;;;;;ACrKA,eAAe,mB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C,iEAAgB;;AAE3C;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,eAAe,mBAAO,CAAC,yDAAY;AACnC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC3DA,kBAAkB,mBAAO,CAAC,iEAAgB;AAC1C,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC7BA,eAAe,mBAAO,CAAC,yDAAY;AACnC,kBAAkB,mBAAO,CAAC,iEAAgB;AAC1C,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AChCA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACnBA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB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,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACnFA,aAAa,mBAAO,CAAC,uDAAW;AAChC,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,SAAS,mBAAO,CAAC,6CAAM;AACvB,kBAAkB,mBAAO,CAAC,iEAAgB;AAC1C,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC/GA,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;;AAEA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;;AAEpC;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACzDA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa,GAAG;AAChB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACZA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACdA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AChBA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,GAAG;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC7BA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACtBA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACtBA;AACA;;AAEA;AACA;;AAEA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;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACnBA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACZA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClCA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,GAAG;AAChB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;AClBA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACfA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACzBA,WAAW,mBAAO,CAAC,mDAAS;AAC5B,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,UAAU,mBAAO,CAAC,iDAAQ;;AAE1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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J,CAAC;;AAED;;;;;;;;;;;AC7BA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACrBA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,aAAa,UAAU;AACvB;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACdA,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;ACRA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACbA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;;;;;;;;;;ACjBA,gBAAgB,mBAAO,CAAC,6DAAc;;AAEtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACdA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,GAAG;AAChB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACbA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACbA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,UAAU,mBAAO,CAAC,iDAAQ;AAC1B,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjCA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;;;;;;;;;;;ACzBA,gBAAgB,mBAAO,CAAC,6DAAc;;AAEtC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,GAAG;AAChB;AACA;AACA;AACA,oBAAoB,QAAQ,IAAI,QAAQ;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,kBAAkB;AAClB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpCA,sBAAsB,mBAAO,CAAC,yEAAoB;AAClD,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA,8BAA8B,mBAAmB;AACjD;AACA;AACA;AACA;AACA;AACA,+CAA+C,mBAAmB;AAClE;AACA;AACA;;AAEA;;;;;;;;;;;ACnCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACzBA,iBAAiB,mBAAO,CAAC,6DAAc;AACvC,eAAe,mBAAO,CAAC,yDAAY;;AAEnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AChCA,WAAW,mBAAO,CAAC,mDAAS;AAC5B,gBAAgB,mBAAO,CAAC,2DAAa;;AAErC;AACA,kBAAkB,KAA0B;;AAE5C;AACA,gCAAgC,QAAa;;AAE7C;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACrCA,kBAAkB,mBAAO,CAAC,iEAAgB;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,kBAAkB;AAClB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClCA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,eAAe,mBAAO,CAAC,yDAAY;;AAEnC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpCA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClCA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC1BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC9BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC5BA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC1BA,uBAAuB,mBAAO,CAAC,2EAAqB;AACpD,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC1BA,oBAAoB,mBAAO,CAAC,qEAAkB;AAC9C,eAAe,mBAAO,CAAC,2DAAa;AACpC,kBAAkB,mBAAO,CAAC,+DAAe;;AAEzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpCA,oBAAoB,mBAAO,CAAC,qEAAkB;AAC9C,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,kBAAkB,mBAAO,CAAC,+DAAe;;AAEzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC/BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;;;ACVA,oBA2CC;AAlDD,0HAAwE;AACxE,8FAAyC;AAEzC;;;GAGG;AACI,KAAK,UAAU,IAAI,CAAC,UAAmB,IAAI;IACjD,sCAAsC;IACtC,IAAI,OAA0C,CAAC;IAC/C,IAAI,MAAM,CAAC,GAAG,KAAK,SAAS,EAAE,CAAC;QAC9B,IAAI,CAAC,OAAO,EAAE,CAAC;YACd,MAAM,QAAQ,GAAG,MAAM,0BAAW,GAAE,CAAC;YACrC,IAAI,QAAQ,KAAK,SAAS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AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,kBAAkB,aAAa;AAC/B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,iEAAe,GAAG;;;;;;;;;;;;;;;ACtNlB,iEAAe,sCAAsC;;;;;;;;;;;;;;;;ACAhB;;AAErC;AACA,OAAO,wDAAQ;AACf;AACA;;AAEA;AACA,gCAAgC;;AAEhC;AACA;AACA;AACA,qBAAqB;;AAErB;AACA,qBAAqB;;AAErB;AACA,qBAAqB;;AAErB;AACA,qBAAqB;AACrB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,iEAAe,KAAK;;;;;;;;;;;;;;;AClCpB,iEAAe,cAAc,EAAE,UAAU,EAAE,eAAe,EAAE,gBAAgB,EAAE,UAAU,GAAG,yCAAyC;;;;;;;;;;;;;;;ACApI;AACA;AACA;AACA;AACA;AACe;AACf;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;AClBA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,mDAAmD;;AAEnD;;AAEA,oBAAoB,gBAAgB;AACpC;AACA;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../node_modules/@openfin/core-web/out/api-client.js","webpack://openfin-web--web-layout/../../node_modules/@openfin/core-web/out/main-8cad4070.js","webpack://openfin-web--web-layout/../../node_modules/@openfin/core-web/out/main-b14f67c9.js","webpack://openfin-web--web-layout/../../node_modules/base64-js/index.js","webpack://openfin-web--web-layout/../../node_modules/buffer/index.js","webpack://openfin-web--web-layout/../../node_modules/events/events.js","webpack://openfin-web--web-layout/../../node_modules/ieee754/index.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_DataView.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_Hash.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_ListCache.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_Map.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_MapCache.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_Promise.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_Set.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_SetCache.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_Stack.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_Symbol.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_Uint8Array.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_WeakMap.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_arrayEach.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_arrayFilter.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_arrayLikeKeys.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_arrayPush.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_arraySome.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_assignValue.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_assocIndexOf.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseAssign.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseAssignIn.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseAssignValue.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseClone.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseCreate.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseGetAllKeys.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseGetTag.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseIsArguments.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseIsEqual.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseIsEqualDeep.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseIsMap.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseIsNative.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseIsSet.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseIsTypedArray.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseKeys.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseKeysIn.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseTimes.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseUnary.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_cacheHas.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_cloneArrayBuffer.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_cloneBuffer.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_cloneDataView.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_cloneRegExp.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_cloneSymbol.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_cloneTypedArray.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_copyArray.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_copyObject.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_copySymbols.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_copySymbolsIn.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_coreJsData.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_defineProperty.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_equalArrays.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_equalByTag.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_equalObjects.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_freeGlobal.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_getAllKeys.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_getAllKeysIn.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_getMapData.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_getNative.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_getPrototype.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_getRawTag.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_getSymbols.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_getSymbolsIn.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_getTag.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_getValue.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_hashClear.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_hashDelete.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_hashGet.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_hashHas.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_hashSet.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_initCloneArray.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_initCloneByTag.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_initCloneObject.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_isIndex.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_isKeyable.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_isMasked.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_isPrototype.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_listCacheClear.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_listCacheDelete.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_listCacheGet.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_listCacheHas.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_listCacheSet.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_mapCacheClear.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_mapCacheDelete.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_mapCacheGet.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_mapCacheHas.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_mapCacheSet.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_mapToArray.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_nativeCreate.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_nativeKeys.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_nativeKeysIn.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_nodeUtil.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_objectToString.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_overArg.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_root.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_setCacheAdd.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_setCacheHas.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_setToArray.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_stackClear.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_stackDelete.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_stackGet.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_stackHas.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_stackSet.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_toSource.js","webpack://openfin-web--web-layout/../../node_modules/lodash/cloneDeep.js","webpack://openfin-web--web-layout/../../node_modules/lodash/eq.js","webpack://openfin-web--web-layout/../../node_modules/lodash/isArguments.js","webpack://openfin-web--web-layout/../../node_modules/lodash/isArray.js","webpack://openfin-web--web-layout/../../node_modules/lodash/isArrayLike.js","webpack://openfin-web--web-layout/../../node_modules/lodash/isBuffer.js","webpack://openfin-web--web-layout/../../node_modules/lodash/isEqual.js","webpack://openfin-web--web-layout/../../node_modules/lodash/isFunction.js","webpack://openfin-web--web-layout/../../node_modules/lodash/isLength.js","webpack://openfin-web--web-layout/../../node_modules/lodash/isMap.js","webpack://openfin-web--web-layout/../../node_modules/lodash/isObject.js","webpack://openfin-web--web-layout/../../node_modules/lodash/isObjectLike.js","webpack://openfin-web--web-layout/../../node_modules/lodash/isSet.js","webpack://openfin-web--web-layout/../../node_modules/lodash/isTypedArray.js","webpack://openfin-web--web-layout/../../node_modules/lodash/keys.js","webpack://openfin-web--web-layout/../../node_modules/lodash/keysIn.js","webpack://openfin-web--web-layout/../../node_modules/lodash/stubArray.js","webpack://openfin-web--web-layout/../../node_modules/lodash/stubFalse.js","webpack://openfin-web--web-layout/./client/src/platform/api.ts","webpack://openfin-web--web-layout/./client/src/platform/settings.ts","webpack://openfin-web--web-layout/../../node_modules/uuid/dist/esm-browser/index.js","webpack://openfin-web--web-layout/../../node_modules/uuid/dist/esm-browser/md5.js","webpack://openfin-web--web-layout/../../node_modules/uuid/dist/esm-browser/nil.js","webpack://openfin-web--web-layout/../../node_modules/uuid/dist/esm-browser/parse.js","webpack://openfin-web--web-layout/../../node_modules/uuid/dist/esm-browser/regex.js","webpack://openfin-web--web-layout/../../node_modules/uuid/dist/esm-browser/rng.js","webpack://openfin-web--web-layout/../../node_modules/uuid/dist/esm-browser/sha1.js","webpack://openfin-web--web-layout/../../node_modules/uuid/dist/esm-browser/stringify.js","webpack://openfin-web--web-layout/../../node_modules/uuid/dist/esm-browser/v1.js","webpack://openfin-web--web-layout/../../node_modules/uuid/dist/esm-browser/v3.js","webpack://openfin-web--web-layout/../../node_modules/uuid/dist/esm-browser/v35.js","webpack://openfin-web--web-layout/../../node_modules/uuid/dist/esm-browser/v4.js","webpack://openfin-web--web-layout/../../node_modules/uuid/dist/esm-browser/v5.js","webpack://openfin-web--web-layout/../../node_modules/uuid/dist/esm-browser/validate.js","webpack://openfin-web--web-layout/../../node_modules/uuid/dist/esm-browser/version.js","webpack://openfin-web--web-layout/webpack/bootstrap","webpack://openfin-web--web-layout/webpack/runtime/define property getters","webpack://openfin-web--web-layout/webpack/runtime/global","webpack://openfin-web--web-layout/webpack/runtime/hasOwnProperty shorthand","webpack://openfin-web--web-layout/webpack/runtime/make namespace object","webpack://openfin-web--web-layout/webpack/runtime/node module decorator","webpack://openfin-web--web-layout/./client/src/content/fdc3-view.ts"],"sourcesContent":["\"use strict\";var e=require(\"./main-8cad4070.js\");require(\"buffer/\"),require(\"uuid\"),require(\"events\"),require(\"lodash/cloneDeep\"),require(\"lodash/isEqual\"),exports.connect=e.connect;\n","\"use strict\";var e=require(\"buffer/\"),t=require(\"events\"),n=require(\"lodash/cloneDeep\"),i=require(\"lodash/isEqual\"),r=require(\"uuid\");const o=(e,t)=>`${t}<${btoa(JSON.stringify(e))}>`;var s=\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof window?window:\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:{},a={},c={},d={},h={};async function l(e){const t=[];for(const n of e){const e=await n();t.push(e)}return t}Object.defineProperty(h,\"__esModule\",{value:!0}),h.promiseMapSerial=h.serial=h.promiseMap=h.promisify=void 0,h.promisify=function(e){return(...t)=>new Promise(((n,i)=>{e(...t,((e,t)=>e?i(e):n(t)))}))},h.promiseMap=async function(e,t){return Promise.all(e.map(t))},h.serial=l,h.promiseMapSerial=async function(e,t){return l(e.map(((e,n,i)=>()=>t(e,n,i))))};var u,p=s&&s.__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},w=s&&s.__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)};Object.defineProperty(d,\"__esModule\",{value:!0}),d.Reply=d.EmitterBase=d.Base=void 0;const y=h;class f{constructor(e){this.isNodeEnvironment=()=>\"node\"===this.wire.environment.type,this.isOpenFinEnvironment=()=>\"openfin\"===this.wire.environment.type,this.isBrowserEnvironment=()=>\"other\"===this.wire.environment.type,this.wire=e}get fin(){return this.wire.getFin()}get me(){return this.wire.me}}d.Base=f;d.EmitterBase=class extends f{constructor(e,t,...n){super(e),this.topic=t,u.set(this,void 0),this.eventNames=()=>this.hasEmitter()?this.getOrCreateEmitter().eventNames():[],this.emit=(e,t,...n)=>!!this.hasEmitter()&&this.getOrCreateEmitter().emit(e,t,...n),this.hasEmitter=()=>this.wire.eventAggregator.has(w(this,u,\"f\")),this.getOrCreateEmitter=()=>this.wire.eventAggregator.getOrCreate(w(this,u,\"f\")),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[],this.listenerCount=e=>this.hasEmitter()?this.getOrCreateEmitter().listenerCount(e):0,this.registerEventListener=async(e,t={},n,i)=>{const r={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e},o=this.getOrCreateEmitter();n(o);try{await this.wire.sendAction(\"subscribe-to-desktop-event\",r)}catch(e){throw i(o),this.deleteEmitterIfNothingRegistered(o),e}},this.deregisterEventListener=async(e,t={})=>{if(this.hasEmitter()){const n={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e};await this.wire.sendAction(\"unsubscribe-to-desktop-event\",n).catch((()=>null));return this.getOrCreateEmitter()}return Promise.resolve()},p(this,u,[t,...n],\"f\"),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[]}async on(e,t,n){return await this.registerEventListener(e,n,(n=>{n.on(e,t)}),(n=>{n.removeListener(e,t)})),this}async addListener(e,t,n){return this.on(e,t,n)}async once(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.once(e,i),n.once(e,t)}),(n=>{n.removeListener(e,i),n.removeListener(e,t)})),this}async prependListener(e,t,n){return await this.registerEventListener(e,n,(n=>{n.prependListener(e,t)}),(n=>{n.removeListener(e,t)})),this}async prependOnceListener(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.prependOnceListener(e,t),n.once(e,i)}),(n=>{n.removeListener(e,t),n.removeListener(e,i)})),this}async removeListener(e,t,n){const i=await this.deregisterEventListener(e,n);return i&&(i.removeListener(e,t),this.deleteEmitterIfNothingRegistered(i)),this}async deregisterAllListeners(e){const t={...this.identity,type:e,topic:this.topic};if(this.hasEmitter()){const e=this.getOrCreateEmitter(),n=e.listenerCount(t.type),i=[];for(let e=0;enull)));return await Promise.all(i),e}}async removeAllListeners(e){const t=async e=>{const t=await this.deregisterAllListeners(e);t&&(t.removeAllListeners(e),this.deleteEmitterIfNothingRegistered(t))};if(e)await t(e);else if(this.hasEmitter()){const e=this.getOrCreateEmitter().eventNames();await(0,y.promiseMap)(e,t)}return this}deleteEmitterIfNothingRegistered(e){0===e.eventNames().length&&this.wire.eventAggregator.delete(w(this,u,\"f\"))}},u=new WeakMap;d.Reply=class{};var g={};Object.defineProperty(g,\"__esModule\",{value:!0});var m=g.RuntimeError=g.NotSupportedError=g.NotImplementedError=g.NoAckError=g.DuplicateCorrelationError=g.UnexpectedActionError=g.DisconnectedError=void 0;class v extends Error{constructor(e){super(`Expected websocket state OPEN but found ${e}`),this.readyState=e}}g.DisconnectedError=v;class C extends Error{}g.UnexpectedActionError=C;class b extends Error{}g.DuplicateCorrelationError=b;class I extends Error{}g.NoAckError=I;class E extends Error{}g.NotImplementedError=E;class x extends Error{}g.NotSupportedError=x;class A extends Error{constructor(e){const{message:t,name:n,stack:i,...r}=e;super(t),this.name=n||\"Error\",this.stack=i??this.toString(),Object.keys(r).forEach((e=>{this[e]=r[e]}))}}class P extends Error{static getCallSite(e=0){const t=Error.stackTraceLimit,n=e+1;Error.stackTraceLimit=t+n;const i=Error.prepareStackTrace;Error.prepareStackTrace=(e,t)=>t;const r=(new Error).stack?.slice(n)??[];return Error.prepareStackTrace=i,Error.stackTraceLimit=t,r}static prepareStackTrace(e,t){if(\"function\"==typeof Error.prepareStackTrace)return Error.prepareStackTrace(e,t);let n=\"\";n+=e.name||\"Error\",n+=`: ${e.message||\"\"}`;for(const e of t)n+=`\\n at ${e.toString()}`;return n}constructor(e,t){const{reason:n,error:i}=e;super(n),this.name=\"RuntimeError\",i?.stack&&(this.cause=new A(i)),t&&(this.stack=P.prepareStackTrace(this,t))}}m=g.RuntimeError=P;var M={},_={},O={};Object.defineProperty(O,\"__esModule\",{value:!0}),O.validateIdentity=void 0,O.validateIdentity=function(e){let t;return\"object\"==typeof e&&\"string\"==typeof e.uuid||(t=\"Not a valid identity object\"),t};var S={},R={},F={},j={},k={},L={},T={};Object.defineProperty(T,\"__esModule\",{value:!0}),T.handleDeprecatedWarnings=void 0;var $;T.handleDeprecatedWarnings=e=>{(e.contentNavigation?.whitelist||e.contentNavigation?.blacklist||e.contentRedirect?.whitelist||e.contentRedirect?.blacklist)&&console.warn(\"The properties 'whitelist' and 'blacklist' have been marked as deprecated and will be removed in a future version. Please use 'allowlist' and 'denylist'.\")};var B={},G={};Object.defineProperty(G,\"__esModule\",{value:!0}),G.AsyncRetryableLazy=W=G.Lazy=void 0;var W=G.Lazy=class{constructor(e){this.producerFn=e}getValue(){return this.value||(this.value=this.producerFn()),this.value}};G.AsyncRetryableLazy=class{constructor(e){this.producerFn=e}async getValue(){return this.promise||(this.promise=this.producerFn().catch((e=>{throw delete this.promise,e}))),this.promise}};var H={};Object.defineProperty(H,\"__esModule\",{value:!0}),H.WebContents=void 0;const N=d;class D extends N.EmitterBase{constructor(e,t,n){super(e,n,t.uuid,t.name),this.identity=t,this.entityType=n}capturePage(e){return this.wire.sendAction(\"capture-page\",{options:e,...this.identity}).then((({payload:e})=>e.data))}executeJavaScript(e){return this.wire.sendAction(\"execute-javascript-in-window\",{...this.identity,code:e}).then((({payload:e})=>e.data))}getZoomLevel(){return this.wire.sendAction(\"get-zoom-level\",this.identity).then((({payload:e})=>e.data))}setZoomLevel(e){return this.wire.sendAction(\"set-zoom-level\",{...this.identity,level:e}).then((()=>{}))}navigate(e){return this.wire.sendAction(\"navigate-window\",{...this.identity,url:e}).then((()=>{}))}navigateBack(){return this.wire.sendAction(\"navigate-window-back\",{...this.identity}).then((()=>{}))}async navigateForward(){await this.wire.sendAction(\"navigate-window-forward\",{...this.identity})}stopNavigation(){return this.wire.sendAction(\"stop-window-navigation\",{...this.identity}).then((()=>{}))}reload(e=!1){return this.wire.sendAction(\"reload-window\",{ignoreCache:e,...this.identity}).then((()=>{}))}print(e={}){return this.wire.sendAction(\"print\",{...this.identity,options:e}).then((()=>{}))}findInPage(e,t){return this.wire.sendAction(\"find-in-page\",{...this.identity,searchTerm:e,options:t}).then((({payload:e})=>e.data))}stopFindInPage(e){return this.wire.sendAction(\"stop-find-in-page\",{...this.identity,action:e}).then((()=>{}))}getPrinters(){return this.wire.sendAction(\"get-printers\",{...this.identity}).then((({payload:e})=>e.data))}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){await this.wire.sendAction(\"focus-window\",{emitSynthFocused:e,...this.identity})}async showDeveloperTools(){await this.wire.sendAction(\"show-developer-tools\",this.identity)}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction(\"get-process-info\",this.identity);return e}async getSharedWorkers(){return this.wire.sendAction(\"get-shared-workers\",this.identity).then((({payload:e})=>e.data))}async inspectSharedWorker(){await this.wire.sendAction(\"inspect-shared-worker\",{...this.identity})}async inspectSharedWorkerById(e){await this.wire.sendAction(\"inspect-shared-worker-by-id\",{...this.identity,workerId:e})}async inspectServiceWorker(){await this.wire.sendAction(\"inspect-service-worker\",{...this.identity})}async showPopupWindow(e){if(this.wire.sendAction(`${this.entityType}-show-popup-window`,this.identity).catch((()=>{})),e?.onPopupReady){const t=async({popupName:t})=>{try{const n=this.fin.Window.wrapSync({uuid:this.fin.me.uuid,name:t});await e.onPopupReady(n)}catch(e){throw new Error(`Something went wrong during onPopupReady execution: ${e}`)}};await this.once(\"popup-ready\",t)}const{payload:t}=await this.wire.sendAction(\"try-create-popup-window\",{options:{...e,hasResultCallback:!!e?.onPopupResult,hasReadyCallback:!!e?.onPopupReady},...this.identity}),{data:{willOpen:n,options:i}}=t;n&&await this.fin.Window.create(i.initialOptions);if(e?.onPopupResult){const t=async t=>{await e.onPopupResult((e=>{const{name:t,uuid:n,result:i,data:r}=e,o={identity:{name:t,uuid:n},result:i};return r&&(o.data=r),o})(t))},n=async()=>{await this.removeListener(\"popup-result\",t)};await this.on(\"popup-result\",t),await this.once(\"popup-teardown\",n)}const{payload:r}=await this.wire.sendAction(\"show-popup-window\",{options:i,...this.identity});return r.data}}var U,V,z,K,q;function J(){return V||(V=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(function(){if($)return L;$=1,Object.defineProperty(L,\"__esModule\",{value:!0}),L.ViewModule=void 0;const e=d,t=O,n=J(),i=T;class r extends e.Base{async create(e){const{uuid:t}=this.wire.me;if(!e.name||\"string\"!=typeof e.name)throw new Error(\"Please provide a name property as a string in order to create a View.\");return(0,i.handleDeprecatedWarnings)(e),this.wire.environment.childViews?await this.wire.environment.createChildContent({entityType:\"view\",options:{...e,uuid:t}}):await this.wire.sendAction(\"create-view\",{...e,uuid:t}),this.wrapSync({uuid:t,name:e.name})}async wrap(e){this.wire.sendAction(\"view-wrap\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}wrapSync(e){this.wire.sendAction(\"view-wrap-sync\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}getCurrent(){if(this.wire.sendAction(\"view-get-current\").catch((e=>{})),!this.wire.me.isView)throw new Error(\"You are not in a View context\");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction(\"view-get-current-sync\").catch((e=>{})),!this.wire.me.isView)throw new Error(\"You are not in a View context\");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return L.ViewModule=r,L}(),e),n(function(){if(U)return B;var e;U=1,Object.defineProperty(B,\"__esModule\",{value:!0}),B.View=void 0;const t=g,n=G,i=H,r=ie();class o extends i.WebContents{constructor(i,o){super(i,o,\"view\"),this.identity=o,e.set(this,new n.Lazy((()=>this.fin.Platform.wrapSync(this.identity).getClient()))),this.attach=async e=>{await this.wire.sendAction(\"attach-view\",{target:e,...this.identity})},this.destroy=async()=>{await this.wire.sendAction(\"destroy-view\",{...this.identity})},this.show=async()=>{await this.wire.sendAction(\"show-view\",{...this.identity})},this.showAt=async(e,t={})=>{await this.wire.sendAction(\"show-view-at\",{bounds:e,...this.identity,options:t})},this.bringToFront=async()=>{await this.wire.sendAction(\"bring-view-to-front\",{...this.identity})},this.hide=async()=>{await this.wire.sendAction(\"hide-view\",{...this.identity})},this.setBounds=async e=>{await this.wire.sendAction(\"set-view-bounds\",{bounds:e,...this.identity})},this.getBounds=async()=>(await this.wire.sendAction(\"get-view-bounds\",{...this.identity})).payload.data,this.getInfo=async()=>(await this.wire.sendAction(\"get-view-info\",{...this.identity})).payload.data,this.getParentLayout=async()=>(this.wire.sendAction(\"view-get-parent-layout\",{...this.identity}).catch((()=>{})),this.fin.Platform.Layout.getLayoutByViewIdentity(this.identity)),this.getOptions=async()=>this.wire.sendAction(\"get-view-options\",{...this.identity}).then((({payload:e})=>e.data)),this.updateOptions=async e=>this.wire.sendAction(\"update-view-options\",{options:e,...this.identity}).then((()=>{})),this.getCurrentWindow=async()=>{const{payload:{data:e}}=await this.wire.sendAction(\"get-view-window\",{...this.identity});return new r._Window(this.wire,e)},this.getCurrentStack=async()=>{this.wire.sendAction(\"view-get-current-stack\").catch((()=>{}));try{return(await this.getParentLayout()).getStackByViewIdentity(this.identity)}catch(e){throw new t.RuntimeError({reason:\"This view does not belong to a stack.\",error:e})}},this.triggerBeforeUnload=async()=>(await this.wire.sendAction(\"trigger-before-unload\",{...this.identity})).payload.data,this.bindToElement=async e=>{if(!e)throw new Error(\"Element not found.\");return this.wire.environment.observeBounds(e,(async e=>this.setBounds(e)))}}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){const t=await this.getCurrentWindow();await t.focusedWebViewWasChanged(),await super.focus({emitSynthFocused:e})}}return B.View=o,e=new WeakMap,B}(),e)}(k)),k}function Y(){if(z)return j;z=1,Object.defineProperty(j,\"__esModule\",{value:!0}),j.Application=void 0;const e=d,t=ie(),n=J();class i extends e.EmitterBase{constructor(e,n){super(e,\"application\",n.uuid),this.identity=n,this.window=new t._Window(this.wire,{uuid:this.identity.uuid,name:this.identity.uuid})}windowListFromIdentityList(e){const n=[];return e.forEach((e=>{n.push(new t._Window(this.wire,{uuid:e.uuid,name:e.name}))})),n}isRunning(){return this.wire.sendAction(\"is-application-running\",this.identity).then((({payload:e})=>e.data))}async quit(e=!1){try{await this._close(e),await this.wire.sendAction(\"destroy-application\",{force:e,...this.identity})}catch(e){if(![\"Remote connection has closed\",\"Could not locate the requested application\"].some((t=>e.message.includes(t))))throw e}}async _close(e=!1){try{await this.wire.sendAction(\"close-application\",{force:e,...this.identity})}catch(e){if(!e.message.includes(\"Remote connection has closed\"))throw e}}close(e=!1){return console.warn(\"Deprecation Warning: Application.close is deprecated Please use Application.quit\"),this.wire.sendAction(\"application-close\",this.identity).catch((e=>{})),this._close(e)}getChildWindows(){return this.wire.sendAction(\"get-child-windows\",this.identity).then((({payload:e})=>{const t=[];return e.data.forEach((e=>{t.push({uuid:this.identity.uuid,name:e})})),this.windowListFromIdentityList(t)}))}getManifest(){return this.wire.sendAction(\"get-application-manifest\",this.identity).then((({payload:e})=>e.data))}getParentUuid(){return this.wire.sendAction(\"get-parent-application\",this.identity).then((({payload:e})=>e.data))}getShortcuts(){return this.wire.sendAction(\"get-shortcuts\",this.identity).then((({payload:e})=>e.data))}async getViews(){const{payload:e}=await this.wire.sendAction(\"application-get-views\",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}getZoomLevel(){return this.wire.sendAction(\"get-application-zoom-level\",this.identity).then((({payload:e})=>e.data))}getWindow(){return this.wire.sendAction(\"application-get-window\",this.identity).catch((e=>{})),Promise.resolve(this.window)}registerUser(e,t){return this.wire.sendAction(\"register-user\",{userName:e,appName:t,...this.identity}).then((()=>{}))}removeTrayIcon(){return this.wire.sendAction(\"remove-tray-icon\",this.identity).then((()=>{}))}restart(){return this.wire.sendAction(\"restart-application\",this.identity).then((()=>{}))}run(){return console.warn(\"Deprecation Warning: Application.run is deprecated Please use fin.Application.start\"),this.wire.sendAction(\"application-run\",this.identity).catch((e=>{})),this._run()}_run(e={}){return this.wire.sendAction(\"run-application\",{manifestUrl:this._manifestUrl,opts:e,...this.identity}).then((()=>{}))}scheduleRestart(){return this.wire.sendAction(\"relaunch-on-close\",this.identity).then((()=>{}))}async sendApplicationLog(){const{payload:e}=await this.wire.sendAction(\"send-application-log\",this.identity);return e.data}async setJumpList(e){await this.wire.sendAction(\"set-jump-list\",{config:e,...this.identity})}setTrayIcon(e){return this.wire.sendAction(\"set-tray-icon\",{enabledIcon:e,...this.identity}).then((()=>{}))}setShortcuts(e){return this.wire.sendAction(\"set-shortcuts\",{data:e,...this.identity}).then((()=>{}))}async setShortcutQueryParams(e){await this.wire.sendAction(\"set-shortcut-query-args\",{data:e,...this.identity})}setZoomLevel(e){return this.wire.sendAction(\"set-application-zoom-level\",{level:e,...this.identity}).then((()=>{}))}async setAppLogUsername(e){await this.wire.sendAction(\"set-app-log-username\",{data:e,...this.identity})}getTrayIconInfo(){return this.wire.sendAction(\"get-tray-icon-info\",this.identity).then((({payload:e})=>e.data))}hasTrayIcon(){return this.wire.sendAction(\"has-tray-icon\",this.identity).then((({payload:e})=>e.data))}terminate(){return this.wire.sendAction(\"terminate-application\",this.identity).then((()=>{}))}wait(){return this.wire.sendAction(\"wait-for-hung-application\",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction(\"get-info\",this.identity).then((({payload:e})=>e.data))}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction(\"application-get-process-info\",this.identity);return e}async setFileDownloadLocation(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t};await this.wire.sendAction(\"set-file-download-location\",{...n,downloadLocation:e})}async getFileDownloadLocation(){const{payload:{data:e}}=await this.wire.sendAction(\"get-file-download-location\",this.identity);return e}async showTrayIconPopupMenu(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t},{payload:i}=await this.wire.sendAction(\"show-tray-icon-popup-menu\",{...n,options:e});return i.data}async closeTrayIconPopupMenu(){const{name:e}=this.wire.me,t={uuid:this.identity.uuid,name:e};await this.wire.sendAction(\"close-tray-icon-popup-menu\",{...t})}}return j.Application=i,j}function Z(){return q||(q=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(function(){if(K)return F;K=1,Object.defineProperty(F,\"__esModule\",{value:!0}),F.ApplicationModule=void 0;const e=d,t=O,n=Y();class i extends e.Base{async wrap(e){this.wire.sendAction(\"wrap-application\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}wrapSync(e){this.wire.sendAction(\"wrap-application-sync\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}async _create(e){return void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&void 0===e.isPlatformController&&(e.autoShow=!0),await this.wire.sendAction(\"create-application\",e),this.wrap({uuid:e.uuid})}create(e){return console.warn(\"Deprecation Warning: fin.Application.create is deprecated. Please use fin.Application.start\"),this.wire.sendAction(\"application-create\").catch((e=>{})),this._create(e)}async start(e){this.wire.sendAction(\"start-application\").catch((e=>{}));const t=await this._create(e);return await this.wire.sendAction(\"run-application\",{uuid:e.uuid}),t}async startManyManifests(e,t){return this.wire.sendAction(\"run-applications\",{applications:e,opts:t}).then((()=>{}))}getCurrent(){return this.wire.sendAction(\"get-current-application\").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction(\"get-current-application-sync\").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}async startFromManifest(e,t){this.wire.sendAction(\"application-start-from-manifest\").catch((e=>{}));const n=await this._createFromManifest(e);return await n._run(t),n}createFromManifest(e){return console.warn(\"Deprecation Warning: fin.Application.createFromManifest is deprecated. Please use fin.Application.startFromManifest\"),this.wire.sendAction(\"application-create-from-manifest\").catch((e=>{})),this._createFromManifest(e)}_createFromManifest(e){return this.wire.sendAction(\"get-application-manifest\",{manifestUrl:e}).then((({payload:e})=>{const t=e.data.platform?e.data.platform.uuid:e.data.startup_app.uuid;return this.wrap({uuid:t})})).then((t=>(t._manifestUrl=e,t)))}}return F.ApplicationModule=i,F}(),e),n(Y(),e)}(R)),R}H.WebContents=D;var Q={};Object.defineProperty(Q,\"__esModule\",{value:!0}),Q.promisifySubscription=void 0;var X,ee,te;function ne(){if(X)return S;X=1,Object.defineProperty(S,\"__esModule\",{value:!0}),S._Window=void 0;const e=Z(),t=H,n=J(),i=T,r=Q;class o extends t.WebContents{constructor(e,t){super(e,t,\"window\")}async createWindow(e){this.wire.sendAction(\"window-create-window\",this.identity).catch((e=>{}));const t=await(0,r.promisifySubscription)(this,\"fire-constructor-callback\");void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&(e.autoShow=!0),(0,i.handleDeprecatedWarnings)(e);const n=this.wire.environment.createChildContent({entityType:\"window\",options:e}),[o]=await Promise.all([t.getValue(),n]);let s;const{success:a}=o,c=o.data,{message:d}=c;s=a?{httpResponseCode:c.httpResponseCode,apiInjected:c.apiInjected}:{message:c.message,networkErrorCode:c.networkErrorCode,stack:c.stack};const h={message:d,cbPayload:s,success:a};try{this.getWebWindow().fin.__internal_.openerSuccessCBCalled()}catch(e){}return h.success?this:Promise.reject(h)}getAllFrames(){return this.wire.sendAction(\"get-all-frames\",this.identity).then((({payload:e})=>e.data))}getBounds(){return this.wire.sendAction(\"get-window-bounds\",this.identity).then((({payload:e})=>e.data))}center(){return this.wire.sendAction(\"center-window\",this.identity).then((()=>{}))}blur(){return this.wire.sendAction(\"blur-window\",this.identity).then((()=>{}))}bringToFront(){return this.wire.sendAction(\"bring-window-to-front\",this.identity).then((()=>{}))}animate(e,t){return this.wire.sendAction(\"animate-window\",{transitions:e,options:t,...this.identity}).then((()=>{}))}hide(){return this.wire.sendAction(\"hide-window\",this.identity).then((()=>{}))}close(e=!1){return this.wire.sendAction(\"close-window\",{force:e,...this.identity}).then((()=>{Object.setPrototypeOf(this,null)}))}focusedWebViewWasChanged(){return this.wire.sendAction(\"focused-webview-changed\",this.identity).then((()=>{}))}getNativeId(){return this.wire.sendAction(\"get-window-native-id\",this.identity).then((({payload:e})=>e.data))}async getCurrentViews(){const{payload:e}=await this.wire.sendAction(\"window-get-views\",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}disableFrame(){return console.warn(\"Function is deprecated; use disableUserMovement instead.\"),this.wire.sendAction(\"disable-window-frame\",this.identity).then((()=>{}))}disableUserMovement(){return this.wire.sendAction(\"disable-window-frame\",this.identity).then((()=>{}))}enableFrame(){return console.warn(\"Function is deprecated; use enableUserMovement instead.\"),this.wire.sendAction(\"enable-window-frame\",this.identity).then((()=>{}))}enableUserMovement(){return this.wire.sendAction(\"enable-window-frame\",this.identity).then((()=>{}))}flash(){return this.wire.sendAction(\"flash-window\",this.identity).then((()=>{}))}stopFlashing(){return this.wire.sendAction(\"stop-flash-window\",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction(\"get-window-info\",this.identity).then((({payload:e})=>e.data))}async getLayout(e){this.wire.sendAction(\"window-get-layout\",this.identity).catch((e=>{}));const t=await this.getOptions();if(!t.layout&&!t.layoutSnapshot)throw new Error(\"Window does not have a Layout\");return this.fin.Platform.Layout.wrap(e??this.identity)}getOptions(){return this.wire.sendAction(\"get-window-options\",this.identity).then((({payload:e})=>e.data))}getParentApplication(){return this.wire.sendAction(\"window-get-parent-application\",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity))}getParentWindow(){return this.wire.sendAction(\"window-get-parent-window\",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity)).then((e=>e.getWindow()))}async getSnapshot(e){const t={area:e,...this.identity};console.warn(\"Window.getSnapshot has been deprecated, please use Window.capturePage\");return(await this.wire.sendAction(\"get-window-snapshot\",t)).payload.data}getState(){return this.wire.sendAction(\"get-window-state\",this.identity).then((({payload:e})=>e.data))}getWebWindow(){return this.wire.sendAction(\"window-get-web-window\",this.identity).catch((e=>{})),this.wire.environment.getWebWindow(this.identity)}isMainWindow(){return this.wire.sendAction(\"window-is-main-window\",this.identity).catch((e=>{})),this.me.uuid===this.me.name}isShowing(){return this.wire.sendAction(\"is-window-showing\",this.identity).then((({payload:e})=>e.data))}maximize(){return this.wire.sendAction(\"maximize-window\",this.identity).then((()=>{}))}minimize(){return this.wire.sendAction(\"minimize-window\",this.identity).then((()=>{}))}moveBy(e,t,n){return this.wire.sendAction(\"move-window-by\",{deltaLeft:e,deltaTop:t,positioningOptions:n,...this.identity}).then((()=>{}))}moveTo(e,t,n){return this.wire.sendAction(\"move-window\",{left:e,top:t,positioningOptions:n,...this.identity}).then((()=>{}))}resizeBy(e,t,n,i){return this.wire.sendAction(\"resize-window-by\",{deltaWidth:Math.floor(e),deltaHeight:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}resizeTo(e,t,n,i){return this.wire.sendAction(\"resize-window\",{width:Math.floor(e),height:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}restore(){return this.wire.sendAction(\"restore-window\",this.identity).then((()=>{}))}setAsForeground(){return this.wire.sendAction(\"set-foreground-window\",this.identity).then((()=>{}))}setBounds(e,t){return this.wire.sendAction(\"set-window-bounds\",{...e,...this.identity,positioningOptions:t}).then((()=>{}))}show(e=!1){return this.wire.sendAction(\"show-window\",{force:e,...this.identity}).then((()=>{}))}showAt(e,t,n=!1){return this.wire.sendAction(\"show-at-window\",{force:n,left:Math.floor(e),top:Math.floor(t),...this.identity}).then((()=>{}))}updateOptions(e){return this.wire.sendAction(\"update-window-options\",{options:e,...this.identity}).then((()=>{}))}authenticate(e,t){return this.wire.sendAction(\"window-authenticate\",{userName:e,password:t,...this.identity}).then((()=>{}))}async showPopupMenu(e){const{payload:t}=await this.wire.sendAction(\"show-popup-menu\",{options:e,...this.identity});return t.data}async closePopupMenu(){return this.wire.sendAction(\"close-popup-menu\",{...this.identity}).then((()=>{}))}async dispatchPopupResult(e){this.wire.sendAction(\"window-dispatch-popup-result\",this.identity).catch((e=>{})),await this.wire.sendAction(\"dispatch-popup-result\",{data:e,...this.identity})}async print(e={content:\"self\"}){switch(e.content){case void 0:case\"self\":return super.print(e);case\"screenshot\":return this.wire.sendAction(\"print-screenshot\",this.identity).then((()=>{}));case\"views\":return this.wire.sendAction(\"print-views\",{...this.identity,options:e}).then((()=>{}));default:return}}}return S._Window=o,S}function ie(){return te||(te=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(function(){if(ee)return _;ee=1,Object.defineProperty(_,\"__esModule\",{value:!0}),_._WindowModule=void 0;const e=d,t=O,n=ne();class i extends e.Base{async wrap(e){this.wire.sendAction(\"window-wrap\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}wrapSync(e){this.wire.sendAction(\"window-wrap-sync\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}create(e){return this.wire.sendAction(\"create-window\").catch((e=>{})),new n._Window(this.wire,{uuid:this.me.uuid,name:e.name}).createWindow(e)}getCurrent(){if(this.wire.sendAction(\"get-current-window\").catch((e=>{})),!this.wire.me.isWindow)throw new Error(\"You are not in a Window context\");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction(\"get-current-window-sync\").catch((e=>{})),!this.wire.me.isWindow)throw new Error(\"You are not in a Window context\");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return _._WindowModule=i,_}(),e),n(ne(),e)}(M)),M}Q.promisifySubscription=async(e,t,n=(()=>!0),i)=>{let r,o,s;const a=new Promise(((e,t)=>{r=e,o=t})),c=e=>{n(e)&&(clearTimeout(s),r(e))};return await e.on(t,c),i&&(s=setTimeout((()=>o(new Error(\"event timed out\"))),i)),a.finally((()=>{e.removeListener(t,c).catch((()=>null))})),{getValue:()=>a}},Object.defineProperty(c,\"__esModule\",{value:!0}),c.System=void 0;const re=d,oe=g,se=ie(),ae=t;class ce extends re.EmitterBase{constructor(e){super(e,\"system\")}sendExternalProcessRequest(e,t){return new Promise(((n,i)=>{const r=\"external-process-exited\";let o,s,a,c;\"function\"==typeof t.listener&&(a=e=>{const n=e||{};s={topic:\"exited\",uuid:n.processUuid||\"\",exitCode:n.exitCode||0},o===e.processUuid&&(t.listener(s),c.removeListener(r,a))},this.wire.me.name||(this.wire.me.name=this.wire.me.uuid),c=new se._Window(this.wire,this.wire.me),c.on(r,a)),this.wire.sendAction(e,t).then((({payload:e})=>{o=e.data.uuid,n(e.data),s&&o===s.uuid&&(t.listener(s),c.removeListener(r,a))})).catch((e=>{c&&c.removeListener(r,a),i(e)}))}))}getVersion(){return this.wire.sendAction(\"get-version\").then((({payload:e})=>e.data))}clearCache(e){return this.wire.sendAction(\"clear-cache\",e).then((()=>{}))}deleteCacheOnExit(){return this.wire.sendAction(\"delete-cache-request\").then((()=>{}))}exit(){return this.wire.sendAction(\"exit-desktop\").then((()=>{}))}async fetchManifest(e){const{payload:{data:t}}=await this.wire.sendAction(\"fetch-manifest\",{manifestUrl:e});return t}flushCookieStore(){return this.wire.sendAction(\"flush-cookie-store\").then((()=>{}))}getAllWindows(){return this.wire.sendAction(\"get-all-windows\").then((({payload:e})=>e.data))}getAllApplications(){return this.wire.sendAction(\"get-all-applications\").then((({payload:e})=>e.data))}getCommandLineArguments(){return this.wire.sendAction(\"get-command-line-arguments\").then((({payload:e})=>e.data))}async getCrashReporterState(){const{payload:{data:{diagnosticMode:e,isRunning:t}}}=await this.wire.sendAction(\"get-crash-reporter-state\");return console.warn(\"diagnosticMode property is deprecated. It will be removed in a future version\"),{diagnosticMode:e,diagnosticsMode:e,isRunning:t}}async startCrashReporter(e){const t=e,n={...t,diagnosticMode:t.diagnosticsMode||t.diagnosticMode},{payload:{data:{diagnosticMode:i,isRunning:r}}}=await this.wire.sendAction(\"start-crash-reporter\",n);return{diagnosticMode:i,diagnosticsMode:i,isRunning:r}}getUniqueUserId(){return this.wire.sendAction(\"get-unique-user-id\").then((({payload:e})=>e.data))}getEntityInfo(e,t){return this.wire.sendAction(\"get-entity-info\",{uuid:e,name:t}).then((({payload:e})=>e.data))}getEnvironmentVariable(e){return this.wire.sendAction(\"get-environment-variable\",{environmentVariables:e}).then((({payload:e})=>e.data))}getFocusedWindow(){return this.wire.sendAction(\"get-focused-window\").then((({payload:e})=>e.data))}async isAppCertified(e){const{payload:{data:{certifiedInfo:t}}}=await this.wire.sendAction(\"is-app-certified\",{manifestUrl:e});return t}getInstalledRuntimes(){return this.wire.sendAction(\"get-installed-runtimes\").then((({payload:e})=>e.data.runtimes))}async getInstalledApps(){const{payload:{data:{installedApps:e}}}=await this.wire.sendAction(\"get-installed-apps\");return e}getLog(e){return this.wire.sendAction(\"view-log\",e).then((({payload:e})=>e.data))}getMachineId(){return this.wire.sendAction(\"get-machine-id\").then((({payload:e})=>e.data))}getMinLogLevel(){return this.wire.sendAction(\"get-min-log-level\").then((({payload:e})=>e.data))}getLogList(){return this.wire.sendAction(\"list-logs\").then((({payload:e})=>e.data))}getMonitorInfo(){return this.wire.sendAction(\"get-monitor-info\").then((({payload:e})=>e.data))}getMousePosition(){return this.wire.sendAction(\"get-mouse-position\").then((({payload:e})=>e.data))}getProcessList(){return console.warn(\"System.getProcessList has been deprecated. Please consider using our new process APIs: Window.getProcessInfo, View.getProcessInfo, Application.getProcessInfo, System.getAllProcessInfo\"),this.wire.sendAction(\"process-snapshot\").then((({payload:e})=>e.data))}async getAllProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction(\"get-all-process-info\",this.identity);return e}getProxySettings(){return this.wire.sendAction(\"get-proxy-settings\").then((({payload:e})=>e.data))}getRuntimeInfo(){return this.wire.sendAction(\"get-runtime-info\").then((({payload:e})=>e.data))}getRvmInfo(){return this.wire.sendAction(\"get-rvm-info\").then((({payload:e})=>e.data))}getHostSpecs(){return this.wire.sendAction(\"get-host-specs\").then((({payload:e})=>e.data))}getOSInfo(){return this.wire.sendAction(\"get-os-info\").then((({payload:e})=>e.data))}launchExternalProcess(e){return this.sendExternalProcessRequest(\"launch-external-process\",e)}monitorExternalProcess(e){return this.sendExternalProcessRequest(\"monitor-external-process\",e)}log(e,t){return this.wire.sendAction(\"write-to-log\",{level:e,message:t}).then((()=>{}))}openUrlWithBrowser(e){return this.wire.sendAction(\"open-url-with-browser\",{url:e}).then((()=>{}))}async registerCustomProtocol(e){if(\"object\"!=typeof e)throw new Error(\"Must provide an object with a `protocolName` property having a string value.\");await this.wire.sendAction(\"register-custom-protocol\",e)}async unregisterCustomProtocol(e){await this.wire.sendAction(\"unregister-custom-protocol\",{protocolName:e})}async getCustomProtocolState(e){return this.wire.sendAction(\"get-custom-protocol-state\",{protocolName:e}).then((({payload:e})=>e.data))}releaseExternalProcess(e){return this.wire.sendAction(\"release-external-process\",{uuid:e}).then((()=>{}))}showDeveloperTools(e){return this.wire.sendAction(\"show-developer-tools\",e).then((()=>{}))}terminateExternalProcess(e){return this.wire.sendAction(\"terminate-external-process\",e).then((()=>{}))}updateProxySettings(e){return this.wire.sendAction(\"update-proxy\",e).then((()=>{}))}async downloadAsset(e,t){const n=()=>{};let i=n,r=n;const o=new Promise(((e,t)=>{i=e,r=t}));if(\"openfin\"!==this.wire.environment.type)throw new oe.NotSupportedError(\"downloadAsset only supported in an OpenFin Render process\");const s=oe.RuntimeError.getCallSite(),a=this.wire.environment.getNextMessageId().toString(),c=`asset-download-progress-${a}`,d=`asset-download-error-${a}`,h=`asset-download-complete-${a}`,l=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},u=()=>{this.removeListener(c,l)};await Promise.all([this.on(c,l),this.once(d,(e=>{u();const{reason:t,err:n}=e;r(new oe.RuntimeError({reason:t,error:n},s))})),this.once(h,(()=>{u(),i()}))]);const p=Object.assign(e,{downloadId:a});return await this.wire.sendAction(\"download-asset\",p).catch((e=>{throw u(),e})),o}downloadRuntime(e,t){const n=oe.RuntimeError.getCallSite();return new Promise(((i,r)=>{if(\"openfin\"!==this.wire.environment.type)return void r(new oe.NotSupportedError(\"downloadRuntime only supported in an OpenFin Render process\"));const o=this.wire.environment.getNextMessageId().toString(),s=`runtime-download-progress-${o}`,a=`runtime-download-error-${o}`,c=`runtime-download-complete-${o}`,d=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},h=()=>{this.removeListener(s,d)};this.on(s,d),this.once(a,(e=>{h();const{reason:t,err:i}=e;r(new oe.RuntimeError({reason:t,error:i},n))})),this.once(c,(()=>{h(),i()}));const l=Object.assign(e,{downloadId:o});this.wire.sendAction(\"download-runtime\",l).catch((e=>{h(),r(e)}))}))}downloadPreloadScripts(e){return this.wire.sendAction(\"download-preload-scripts\",{scripts:e}).then((({payload:e})=>e.data))}getAllExternalApplications(){return this.wire.sendAction(\"get-all-external-applications\").then((({payload:e})=>e.data))}getAppAssetInfo(e){return this.wire.sendAction(\"get-app-asset-info\",e).then((({payload:e})=>e.data))}getCookies(e){const t=this.wire.environment.getUrl(),n=Object.assign(e,{url:t});return this.wire.sendAction(\"get-cookies\",n).then((({payload:e})=>e.data))}setMinLogLevel(e){return this.wire.sendAction(\"set-min-log-level\",{level:e}).then((()=>{}))}resolveUuid(e){return this.wire.sendAction(\"resolve-uuid\",{entityKey:e}).then((({payload:e})=>e.data))}executeOnRemote(e,t){return t.requestingIdentity=e,this.wire.ferryAction(t)}readRegistryValue(e,t,n){return this.wire.sendAction(\"read-registry-value\",{rootKey:e,subkey:t,value:n}).then((({payload:e})=>e.data))}registerExternalConnection(e){return this.wire.sendAction(\"register-external-connection\",{uuid:e}).then((({payload:e})=>e.data))}async getServiceConfiguration(e){if(\"string\"!=typeof e.name)throw new Error(\"Must provide an object with a `name` property having a string value\");const{name:t}=e;return this.wire.sendAction(\"get-service-configuration\",{name:t}).then((({payload:e})=>e.data))}async getSystemAppConfig(e){if(\"string\"!=typeof e)throw new Error(\"Must provide a string value for name of system app\");return this.wire.sendAction(\"get-system-app-configuration\",{name:e}).then((({payload:e})=>e.data))}async registerShutdownHandler(e){this.wire.sendAction(\"system-register-shutdown-handler\").catch((e=>{}));const{uuid:t,name:n}=this.wire.me;this.on(\"system-shutdown\",(i=>{e({proceed:()=>{this.wire.environment.raiseEvent(\"application/system-shutdown-handled\",{uuid:t,name:n,topic:\"application\"})}})}))}runRvmHealthCheck(){return this.wire.sendAction(\"run-rvm-health-check\").then((({payload:e})=>e.data))}async launchManifest(e,t={}){const{subscribe:n,...i}=t,r=i;if(n){const e=new ae.EventEmitter;n(e);const t=\"app-version-progress\",i=\"runtime-status\",o=\"app-version-complete\",s=\"app-version-error\",a=this.wire.environment.getNextMessageId().toString();r.appVersionId=a;const c=[o,t,i,s],d=e=>{const{appVersionId:t,topic:n,type:i,...r}=e;return{...r,type:c.find((e=>i.includes(e)))}},h=t=>{const n=d(t);e.emit(n.type,n)},l=()=>{this.removeListener(`${t}.${a}`,h),this.removeListener(`${i}.${a}`,h),this.removeListener(`${o}.${a}`,h),this.removeListener(`${s}.${a}`,h),this.removeListener(`${o}.${a}`,l),this.removeListener(`${s}.${a}`,l)};await Promise.all([this.on(`${t}.${a}`,h),this.on(`${i}.${a}`,h),this.once(`${o}.${a}`,h),this.once(`${s}.${a}`,h),this.once(`${o}.${a}`,l),this.once(`${s}.${a}`,l)])}return(await this.wire.sendAction(\"launch-manifest\",{manifestUrl:e,opts:r})).payload.data.manifest}async queryPermissionForCurrentContext(e){const t={uuid:this.wire.me.uuid,name:this.wire.me.name};return(await this.wire.sendAction(\"query-permission-for-current-context\",{apiName:e,identity:t})).payload.data}async enableNativeWindowIntegrationProvider(e){const{payload:t}=await this.wire.sendAction(\"enable-native-window-integration-provider\",{permissions:e});return t.data}async registerUsage({data:e,type:t}){await this.wire.sendAction(\"register-usage\",{data:e,type:t})}async getPrinters(){const{payload:e}=await this.wire.sendAction(\"system-get-printers\");return e.data}async updateProcessLoggingOptions(e){await this.wire.sendAction(\"system-update-process-logging-options\",{options:e})}async getDomainSettings(){const{payload:{data:e}}=await this.wire.sendAction(\"get-domain-settings\",this.identity);return e}async setDomainSettings(e){await this.wire.sendAction(\"set-domain-settings\",{domainSettings:e,...this.identity})}async refreshExtensions(){const{payload:e}=await this.wire.sendAction(\"refresh-extensions\");return e.data}async getInstalledExtensions(){const{payload:e}=await this.wire.sendAction(\"get-installed-extensions\");return e.data}}c.System=ce;var de={},he={};Object.defineProperty(he,\"__esModule\",{value:!0}),he.RefCounter=void 0;he.RefCounter=class{constructor(){this.topicRefMap=new Map}incRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t+1;n=i,this.topicRefMap.set(e,i)}else this.topicRefMap.set(e,1),n=1;return n}decRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t-1;this.topicRefMap.set(e,i),n=i}else n=-1;return n}actOnFirst(e,t,n){return 1===this.incRefCount(e)?t():n()}actOnLast(e,t,n){return 0===this.decRefCount(e)?t():n()}};var le={},ue={},pe={};Object.defineProperty(pe,\"__esModule\",{value:!0}),pe.ChannelBase=pe.ProtectedItems=void 0;const we=e=>async(t,n,i)=>{const r=await e(t,n,i);return void 0===r?n:r};pe.ProtectedItems=class{constructor(e,t){this.providerIdentity=e,this.close=t}};class ye{static defaultAction(e){throw new Error(`No action registered at target for ${e}`)}constructor(){this.subscriptions=new Map}async processAction(e,t,n){try{const i=this.subscriptions.has(e)?this.subscriptions.get(e):(t,n)=>(this.defaultAction??ye.defaultAction)(e,t,n),r=this.preAction?await this.preAction(e,t,n):t,o=await i(r,n);return this.postAction?await this.postAction(e,o,n):o}catch(t){if(this.errorMiddleware)return this.errorMiddleware(e,t,n);throw t}}beforeAction(e){if(this.preAction)throw new Error(\"Already registered beforeAction middleware\");this.preAction=we(e)}onError(e){if(this.errorMiddleware)throw new Error(\"Already registered error middleware\");this.errorMiddleware=e}afterAction(e){if(this.postAction)throw new Error(\"Already registered afterAction middleware\");this.postAction=we(e)}remove(e){this.subscriptions.delete(e)}setDefaultAction(e){if(this.defaultAction)throw new Error(\"default action can only be set once\");this.defaultAction=e}register(e,t){if(this.subscriptions.has(e))throw new Error(`Subscription already registered for action: ${e}. Unsubscribe before adding new subscription`);return this.subscriptions.set(e,t),!0}}pe.ChannelBase=ye;var fe,ge,me,ve=s&&s.__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)},Ce=s&&s.__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};Object.defineProperty(ue,\"__esModule\",{value:!0}),ue.ChannelClient=void 0;const be=pe,Ie=new Map;class Ee extends be.ChannelBase{static closeChannelByEndpointId(e){const t=Ie.get(e);t&&ve(t,me,\"f\").call(t)}static handleProviderDisconnect(e){for(const t of Ie.values())t.providerIdentity.channelId===e.channelId&&(t.disconnectListener(e),ve(t,me,\"f\").call(t))}constructor(e,t,n){super(),fe.set(this,void 0),ge.set(this,void 0),this.processAction=(e,t,n)=>super.processAction(e,t,n),me.set(this,(()=>{Ie.delete(this.endpointId),ve(this,ge,\"f\").close()})),Ce(this,fe,new be.ProtectedItems(e,t),\"f\"),this.disconnectListener=()=>{},this.endpointId=e.endpointId,Ce(this,ge,n,\"f\"),Ie.set(this.endpointId,this),n.receive(this.processAction)}get providerIdentity(){return ve(this,fe,\"f\").providerIdentity}async dispatch(e,t){if(ve(this,ge,\"f\").isEndpointConnected(this.providerIdentity.channelId))return ve(this,ge,\"f\").send(this.providerIdentity.channelId,e,t);throw new Error(\"The client you are trying to dispatch from is disconnected from the target provider.\")}onDisconnection(e){this.disconnectListener=t=>{try{e(t)}catch(e){throw new Error(`Error while calling the onDisconnection callback: ${e.message}`)}finally{this.disconnectListener=()=>{}}}}async disconnect(){await this.sendDisconnectAction(),ve(this,me,\"f\").call(this)}async sendDisconnectAction(){const e=ve(this,fe,\"f\");await e.close()}static async wireClose(e,t,n){const{channelName:i,uuid:r,name:o}=t;await e.sendAction(\"disconnect-from-channel\",{channelName:i,uuid:r,name:o,endpointId:n})}}ue.ChannelClient=Ee,fe=new WeakMap,ge=new WeakMap,me=new WeakMap;var xe={},Ae={};Object.defineProperty(Ae,\"__esModule\",{value:!0}),Ae.exhaustiveCheck=void 0,Ae.exhaustiveCheck=function(e,t){throw new Error(`Unsupported value: ${e}${t?`\\n Supported values are: ${t.join(\"\")}`:\"\"}`)};var Pe,Me,_e,Oe={},Se=s&&s.__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},Re=s&&s.__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)};Object.defineProperty(Oe,\"__esModule\",{value:!0}),Oe.ClassicInfo=Oe.ClassicStrategy=void 0;Oe.ClassicStrategy=class{constructor(e,t,n,i){this.messageReceiver=t,this.endpointId=n,this.providerIdentity=i,Pe.set(this,void 0),Me.set(this,new Map),_e.set(this,new Map),this.send=async(e,t,n)=>{const i=Re(this,Me,\"f\").get(e);if(!i)throw new Error(`Could not locate routing info for endpoint ${e}`);const r={...i};r.isLocalEndpointId&&delete r.endpointId,delete r.isLocalEndpointId;const o=Re(this,Pe,\"f\").sendAction(\"send-channel-message\",{...r,providerIdentity:this.providerIdentity,action:t,payload:n});Re(this,_e,\"f\").get(e)?.add(o);return(await o.catch((e=>{throw new Error(e.message)})).finally((()=>{Re(this,_e,\"f\").get(e)?.delete(o)}))).payload.data.result},this.close=async()=>{this.messageReceiver.removeEndpoint(this.providerIdentity.channelId,this.endpointId),[...Re(this,Me,\"f\").keys()].forEach((e=>this.closeEndpoint(e))),Se(this,Me,new Map,\"f\")},Se(this,Pe,e,\"f\")}onEndpointDisconnect(e,t){}receive(e){this.messageReceiver.addEndpoint(e,this.providerIdentity.channelId,this.endpointId)}async closeEndpoint(e){const t=Re(this,Me,\"f\").get(e);Re(this,Me,\"f\").delete(e);const n=Re(this,_e,\"f\").get(e);n?.forEach((n=>{const i=`Channel connection with identity uuid: ${t?.uuid} / name: ${t?.name} / endpointId: ${e} no longer connected.`;n.cancel(new Error(i))}))}isEndpointConnected(e){return Re(this,Me,\"f\").has(e)}addEndpoint(e,t){Re(this,Me,\"f\").set(e,t.endpointIdentity),Re(this,_e,\"f\").set(e,new Set)}isValidEndpointPayload(e){return\"string\"==typeof e?.endpointIdentity?.endpointId||\"string\"==typeof e?.endpointIdentity?.channelId}},Pe=new WeakMap,Me=new WeakMap,_e=new WeakMap,Oe.ClassicInfo={version:5,minimumVersion:0,type:\"classic\"};var Fe={},je={},ke={};Object.defineProperty(ke,\"__esModule\",{value:!0}),ke.errorToPOJO=void 0,ke.errorToPOJO=function(e){return{stack:e.stack,name:e.name,message:e.message,toString:()=>e.stack||e.toString()}};var Le,Te,$e=s&&s.__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)},Be=s&&s.__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};Object.defineProperty(je,\"__esModule\",{value:!0}),je.RTCEndpoint=void 0;const Ge=ke;je.RTCEndpoint=class{static isValidEndpointPayload(e){const t=e=>\"object\"==typeof e&&null!==e;return t(e)&&t(e.endpointIdentity)&&t(e.rtc)&&\"string\"==typeof e.endpointIdentity.endpointId}constructor({rtc:e,endpointIdentity:t}){this.responseMap=new Map,Le.set(this,null),Te.set(this,void 0),this.connectionStateChangeHandler=e=>{\"connected\"!==this.rtc.rtcClient.connectionState&&(this.rtc.rtcClient.removeEventListener(\"connectionstatechange\",this.connectionStateChangeHandler),this.close(),$e(this,Te,\"f\")&&$e(this,Te,\"f\").call(this))},this.send=async(e,t)=>{const n=`message-${Math.random()}`,i=new Promise(((e,t)=>{this.responseMap.set(n,{resolve:e,reject:t})}));return this.rtc.channels.request.send(JSON.stringify({action:e,payload:t,messageId:n})),i},this.close=()=>{this.responseMap.forEach((e=>e.reject(\"Connection has closed.\"))),this.responseMap=new Map,this.rtc.channels.request.close(),this.rtc.channels.response.close(),this.rtc.rtcClient.close()},this.rtc=e,this.endpointIdentity=t,this.rtc.channels.response.addEventListener(\"message\",(e=>{let{data:t}=e;e.data instanceof ArrayBuffer&&(t=(new TextDecoder).decode(e.data));const{messageId:n,payload:i,success:r,error:o}=JSON.parse(t),{resolve:s,reject:a}=this.responseMap.get(n)??{};s&&a?(this.responseMap.delete(n),r?s(i):a(o)):(console.log(\"Could not find id in responseMap.\"),console.log(e))})),this.rtc.channels.request.addEventListener(\"message\",(async e=>{let{data:n}=e;e.data instanceof ArrayBuffer&&(n=(new TextDecoder).decode(e.data));const{messageId:i,action:r,payload:o}=JSON.parse(n);if($e(this,Le,\"f\"))try{const e=await $e(this,Le,\"f\").call(this,r,o,t);this.rtc.channels.response.send(JSON.stringify({messageId:i,payload:e,success:!0}))}catch(e){\"open\"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,error:(0,Ge.errorToPOJO)(e),success:!1}))}else\"open\"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,success:!1,error:\"Connection not ready.\"}))})),this.rtc.rtcClient.addEventListener(\"connectionstatechange\",this.connectionStateChangeHandler),Object.values(this.rtc.channels).forEach((e=>{e.onclose=e=>{[...this.responseMap.values()].forEach((e=>e.reject(new Error(\"RTCDataChannel closed unexpectedly, this is most commonly caused by message size. Note: RTC Channels have a message size limit of ~255kB.\")))),this.close(),$e(this,Te,\"f\")&&$e(this,Te,\"f\").call(this)}}))}onDisconnect(e){if($e(this,Te,\"f\"))throw new Error(\"RTCEndpoint disconnectListener cannot be set twice.\");Be(this,Te,e,\"f\")}receive(e){if($e(this,Le,\"f\"))throw new Error(\"You have already set a listener for this RTC Endpoint.\");Be(this,Le,e,\"f\")}get connected(){return\"connected\"===this.rtc.rtcClient.connectionState}},Le=new WeakMap,Te=new WeakMap;var We,He,Ne,De={},Ue=s&&s.__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)},Ve=s&&s.__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};Object.defineProperty(De,\"__esModule\",{value:!0}),De.EndpointStrategy=void 0;De.EndpointStrategy=class{constructor(e,t,n){this.EndpointType=e,this.StrategyName=n,We.set(this,null),He.set(this,new Map),Ne.set(this,!0),this.send=async(e,t,n)=>this.getEndpointById(e).send(t,n),this.close=async()=>{Ue(this,Ne,\"f\")&&(Ue(this,He,\"f\").forEach((e=>e.close())),Ve(this,He,new Map,\"f\")),Ve(this,Ne,!1,\"f\")},this.isValidEndpointPayload=t}onEndpointDisconnect(e,t){this.getEndpointById(e).onDisconnect(t)}receive(e){if(Ue(this,We,\"f\"))throw new Error(`You have already set a listener for this ${this.StrategyName} Strategy`);Ve(this,We,e,\"f\"),Ue(this,He,\"f\").forEach((e=>e.receive(Ue(this,We,\"f\"))))}getEndpointById(e){const t=Ue(this,He,\"f\").get(e);if(!t)throw new Error(`Client with endpoint id ${e} is not connected`);return t}get connected(){return Ue(this,Ne,\"f\")}isEndpointConnected(e){return Ue(this,He,\"f\").has(e)}addEndpoint(e,t){if(!Ue(this,Ne,\"f\"))return void console.warn(`Adding endpoint to disconnected ${this.StrategyName} Strategy`);const n=new this.EndpointType(t);Ue(this,We,\"f\")&&n.receive(Ue(this,We,\"f\")),Ue(this,He,\"f\").set(e,n)}async closeEndpoint(e){Ue(this,He,\"f\").delete(e)}},We=new WeakMap,He=new WeakMap,Ne=new WeakMap,Object.defineProperty(Fe,\"__esModule\",{value:!0}),Fe.RTCInfo=Fe.RTCStrategy=void 0;const ze=je,Ke=De;class qe extends Ke.EndpointStrategy{constructor(){super(ze.RTCEndpoint,ze.RTCEndpoint.isValidEndpointPayload,\"RTC\")}}Fe.RTCStrategy=qe,Fe.RTCInfo={version:2,minimumVersion:0,type:\"rtc\"};var Je={};Object.defineProperty(Je,\"__esModule\",{value:!0}),Je.RTCICEManager=void 0;const Ye=d;class Ze extends Ye.EmitterBase{constructor(e){super(e,\"channel\"),this.ensureChannelOpened=e=>new Promise(((t,n)=>{if(\"open\"===e.readyState)t();else if(\"connecting\"===e.readyState){const n=()=>{e.removeEventListener(\"open\",n),t()};e.addEventListener(\"open\",n)}else n(new Error(\"This Channel has already closed\"))}))}static createDataChannelPromise(e,t){let n;const i=new Promise((e=>{n=e})),r=i=>{const o=()=>{i.channel.removeEventListener(\"open\",o),n(i.channel)};i.channel.label===e&&(i.channel.addEventListener(\"open\",o),t.removeEventListener(\"datachannel\",r))};return t.addEventListener(\"datachannel\",r),i}async listenForProviderIce(e,t){await this.on(this.createProviderEventName(e),t,{timestamp:Date.now()})}async raiseProviderIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createProviderEventName(e)),t)}async listenForClientIce(e,t){await this.on(this.createClientEventName(e),t,{timestamp:Date.now()})}async raiseClientIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createClientEventName(e)),t)}cleanupIceListeners(e){this.removeAllListeners(this.createClientEventName(e)),this.removeAllListeners(this.createProviderEventName(e))}createClientEventName(e){return`ice-client-${e}`}createProviderEventName(e){return`ice-provider-${e}`}createRouteString(e){return`channel/${e}`}createRtcPeer(){return this.wire.environment.getRtcPeer()}async startClientOffer(){const e=Math.random().toString(),t=this.createRtcPeer();t.addEventListener(\"icecandidate\",(async t=>{t.candidate&&await this.raiseClientIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForProviderIce(e,(async e=>{await t.addIceCandidate(e.candidate)}));const n={request:t.createDataChannel(\"request\"),response:t.createDataChannel(\"response\")},i=await t.createOffer();await t.setLocalDescription(i);const r=Promise.all([n.request,n.response].map(this.ensureChannelOpened)).then((()=>{}));return{rtcClient:t,channels:n,offer:i,rtcConnectionId:e,channelsOpened:r}}async finishClientOffer(e,t,n){return await e.setRemoteDescription(t),await n,!0}async createProviderAnswer(e,t){const n=this.createRtcPeer(),i=Ze.createDataChannelPromise(\"request\",n),r=Ze.createDataChannelPromise(\"response\",n);n.addEventListener(\"icecandidate\",(async t=>{t.candidate&&await this.raiseProviderIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForClientIce(e,(async e=>{await n.addIceCandidate(e.candidate)})),await n.setRemoteDescription(t);const o=await n.createAnswer();await n.setLocalDescription(o);const s=Promise.all([i,r]).then((([t,n])=>(this.cleanupIceListeners(e),{request:t,response:n})));return{rtcClient:n,answer:o,channels:s}}}Je.RTCICEManager=Ze;var Qe={},Xe={};function et(e){return[...e.split(\".\").reverse().entries()].reduce(((e,[t,n])=>e+ +n*1e4**t),0)}function tt(e,t){return et(e)>=et(t)}function nt(e){return e.split(\"/\")[0]}Object.defineProperty(Xe,\"__esModule\",{value:!0}),Xe.runtimeUuidMeetsMinimumRuntimeVersion=Xe.parseRuntimeUuid=Xe.meetsMinimumRuntimeVersion=void 0,Xe.meetsMinimumRuntimeVersion=tt,Xe.parseRuntimeUuid=nt,Xe.runtimeUuidMeetsMinimumRuntimeVersion=function(e,t){return tt(nt(e),t)};var it,rt,ot,st,at,ct=s&&s.__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)},dt=s&&s.__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};Object.defineProperty(Qe,\"__esModule\",{value:!0}),Qe.ChannelProvider=void 0;const ht=pe,lt=Xe;class ut extends ht.ChannelBase{get connections(){return[...ct(this,it,\"f\")]}static handleClientDisconnection(e,t){const n=e.connections.find((e=>e.endpointId===t.endpointId));if(n)ct(e,st,\"f\").call(e,n);else{e.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name)).forEach(ct(e,st,\"f\"))}e.disconnectListener(t)}static setProviderRemoval(e,t){ut.removalMap.set(e,t)}constructor(e,t,n){super(),it.set(this,void 0),rt.set(this,void 0),ot.set(this,void 0),st.set(this,(e=>{const t=this.connections.filter((t=>t.endpointId!==e.endpointId));ct(this,ot,\"f\").closeEndpoint(e.endpointId),dt(this,it,t,\"f\")})),this.processAction=async(e,t,n)=>(ut.clientIsMultiRuntime(n)&&!(0,lt.runtimeUuidMeetsMinimumRuntimeVersion)(n.runtimeUuid,\"18.87.56.0\")?this.handleMultiRuntimeLegacyClient(n):this.checkForClientConnection(n),super.processAction(e,t,n)),at.set(this,(()=>{ct(this,ot,\"f\").close();const e=ut.removalMap.get(this);e&&e()})),dt(this,rt,new ht.ProtectedItems(e,t),\"f\"),this.connectListener=()=>{},this.disconnectListener=()=>{},dt(this,it,[],\"f\"),dt(this,ot,n,\"f\"),n.receive(this.processAction)}dispatch(e,t,n){const i=e.endpointId??this.getEndpointIdForOpenFinId(e,t);return i&&ct(this,ot,\"f\").isEndpointConnected(i)?ct(this,ot,\"f\").send(i,t,n):Promise.reject(new Error(`Client connection with identity uuid: ${e.uuid} / name: ${e.name} / endpointId: ${i} no longer connected.`))}async processConnection(e,t){return ct(this,it,\"f\").push(e),this.connectListener(e,t)}publish(e,t){return this.connections.map((n=>ct(this,ot,\"f\").send(n.endpointId,e,t)))}onConnection(e){this.connectListener=e}onDisconnection(e){this.disconnectListener=e}async destroy(){const e=ct(this,rt,\"f\");e.providerIdentity,dt(this,it,[],\"f\"),await e.close(),ct(this,at,\"f\").call(this)}async getAllClientInfo(){return this.connections.map((e=>{const{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}=e;return{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}}))}checkForClientConnection(e){if(!this.isClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider.\\n Client Identity: {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}isClientConnected(e){return ut.clientIdentityIncludesEndpointId(e)?this.connections.some((t=>t.endpointId===e.endpointId&&t.uuid===e.uuid&&t.name===e.name)):this.isLegacyClientConnected(e)}isLegacyClientConnected(e){return this.connections.some((t=>t.uuid===e.uuid&&t.name===e.name))}handleMultiRuntimeLegacyClient(e){if(!this.isLegacyClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider. Client Identity:\\n {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}getEndpointIdForOpenFinId(e,t){const n=this.connections.filter((t=>t.name===e.name&&t.uuid===e.uuid));if(n.length>=2){const n=ct(this,rt,\"f\"),{uuid:i,name:r}=e,o=n?.providerIdentity.uuid,s=n?.providerIdentity.name;console.warn(`WARNING: Dispatch call may have unintended results. The \"to\" argument of your dispatch call is missing the\\n \"endpointId\" parameter. The identity you are dispatching to ({uuid: ${i}, name: ${r}})\\n has multiple channelClients for this channel. Your dispatched action: (${t}) from the provider:\\n ({uuid: ${o}, name: ${s}}) will only be processed by the most recently-created client.`)}return n.pop()?.endpointId}static clientIdentityIncludesEndpointId(e){return void 0!==e.endpointId}static clientIsMultiRuntime(e){return void 0!==e.runtimeUuid}static async wireClose(e,t){await e.sendAction(\"destroy-channel\",{channelName:t})}}Qe.ChannelProvider=ut,it=new WeakMap,rt=new WeakMap,ot=new WeakMap,st=new WeakMap,at=new WeakMap,ut.removalMap=new WeakMap;var pt={};Object.defineProperty(pt,\"__esModule\",{value:!0}),pt.MessageReceiver=void 0;const wt=ue,yt=d;class ft extends yt.Base{constructor(e){super(e),this.onmessage=e=>\"process-channel-message\"===e.action&&(this.processChannelMessage(e),!0),this.endpointMap=new Map,this.latestEndpointIdByChannelId=new Map,e.registerMessageHandler(this.onmessage.bind(this))}async processChannelMessage(e){const{senderIdentity:t,providerIdentity:n,action:i,ackToSender:r,payload:o,intendedTargetIdentity:s}=e.payload,a=s.channelId??s.endpointId??this.latestEndpointIdByChannelId.get(n.channelId),c=this.endpointMap.get(a);if(!c)return r.payload.success=!1,r.payload.reason=`Client connection with identity uuid: ${this.wire.me.uuid} / name: ${this.wire.me.name} / endpointId: ${a} no longer connected.`,this.wire.sendRaw(r);try{const e=await c(i,o,t);return r.payload.payload=r.payload.payload||{},r.payload.payload.result=e,this.wire.sendRaw(r)}catch(e){return r.payload.success=!1,r.payload.reason=e.message,this.wire.sendRaw(r)}}addEndpoint(e,t,n){this.endpointMap.set(n,e),t!==n&&this.latestEndpointIdByChannelId.set(t,n)}removeEndpoint(e,t){this.endpointMap.delete(t),this.latestEndpointIdByChannelId.get(e)===t&&this.latestEndpointIdByChannelId.delete(e)}checkForPreviousClientConnection(e){const t=this.latestEndpointIdByChannelId.get(e);t&&(wt.ChannelClient.closeChannelByEndpointId(t),console.warn(\"You have created a second connection to an older provider. First connection has been removed from the clientMap\"),console.warn(\"If the provider calls publish(), you may receive multiple messages.\"))}}pt.MessageReceiver=ft;var gt={};Object.defineProperty(gt,\"__esModule\",{value:!0}),gt.ProtocolManager=void 0;gt.ProtocolManager=class{constructor(e){this.ProtocolsInPreferenceOrder=e,this.DefaultClientProtocols=[\"classic\"],this.DefaultProviderProtocols=[\"classic\"],this.getClientProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultClientProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(\", \")}.`);return t},this.getProviderProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultProviderProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(\", \")}.`);return t},this.getCompatibleProtocols=(e,t)=>t.supportedProtocols.filter((t=>e.some((e=>e.type===t.type&&t.version>=e.minimumVersion&&e.version>=(t.minimumVersion??0))))).slice(0,t.maxProtocols)}};var mt={};Object.defineProperty(mt,\"__esModule\",{value:!0});class vt{static combine(e,t){return new vt(e,t)}constructor(e,t){this.primary=e,this.secondary=t}onEndpointDisconnect(e,t){this.primary.onEndpointDisconnect(e,(()=>{this.secondary.isEndpointConnected(e)||t()})),this.secondary.onEndpointDisconnect(e,(()=>{this.primary.isEndpointConnected(e)||t()}))}isValidEndpointPayload(e){return this.primary.isValidEndpointPayload(e)||this.secondary.isValidEndpointPayload(e)}async closeEndpoint(e){await this.primary.closeEndpoint(e),await this.secondary.closeEndpoint(e)}isEndpointConnected(e){return this.primary.isEndpointConnected(e)||this.secondary.isEndpointConnected(e)}async addEndpoint(e,t){this.primary.isValidEndpointPayload(t)&&await this.primary.addEndpoint(e,t),this.secondary.isValidEndpointPayload(t)&&await this.secondary.addEndpoint(e,t)}receive(e){this.primary.receive(e),this.secondary.receive(e)}send(e,t,n){return this.primary.isEndpointConnected(e)?this.primary.send(e,t,n):this.secondary.send(e,t,n)}async close(){await Promise.all([this.primary.close(),this.secondary.close()])}}mt.default=vt;var Ct,bt,It=s&&s.__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},Et=s&&s.__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)},xt=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(xe,\"__esModule\",{value:!0}),xe.ConnectionManager=void 0;const At=Ae,Pt=d,Mt=Oe,_t=Fe,Ot=Je,St=Qe,Rt=pt,Ft=gt,jt=xt(mt);class kt extends Pt.Base{static getProtocolOptionsFromStrings(e){return e.map((e=>{switch(e){case\"rtc\":return _t.RTCInfo;case\"classic\":return Mt.ClassicInfo;default:return(0,At.exhaustiveCheck)(e,[\"rtc\",\"classic\"])}}))}constructor(e){super(e),Ct.set(this,void 0),bt.set(this,void 0),this.removeChannelFromProviderMap=e=>{this.providerMap.delete(e)},this.onmessage=e=>\"process-channel-connection\"===e.action&&(this.processChannelConnection(e),!0),this.providerMap=new Map,this.protocolManager=new Ft.ProtocolManager(\"node\"===this.wire.environment.type?[\"classic\"]:[\"rtc\",\"classic\"]),It(this,Ct,new Rt.MessageReceiver(e),\"f\"),It(this,bt,new Ot.RTCICEManager(e),\"f\"),e.registerMessageHandler(this.onmessage.bind(this))}createProvider(e,t){const n=Object.assign(this.wire.environment.getDefaultChannelOptions().create,e||{}),i=this.protocolManager.getProviderProtocols(n?.protocols),r=i.map((e=>{switch(e){case\"rtc\":return new _t.RTCStrategy;case\"classic\":return new Mt.ClassicStrategy(this.wire,Et(this,Ct,\"f\"),t.channelId,t);default:return(0,At.exhaustiveCheck)(e,[\"rtc\",\"classic\"])}}));let o;if(2===r.length){const[e,t]=r;o=jt.default.combine(e,t)}else{if(1!==r.length)throw new Error(\"failed to combine strategies\");[o]=r}const s=new St.ChannelProvider(t,(()=>St.ChannelProvider.wireClose(this.wire,t.channelName)),o),a=t.channelId;return this.providerMap.set(a,{provider:s,strategy:o,supportedProtocols:kt.getProtocolOptionsFromStrings(i)}),St.ChannelProvider.setProviderRemoval(s,this.removeChannelFromProviderMap.bind(this)),s}async createClientOffer(e){const t=this.protocolManager.getClientProtocols(e?.protocols);let n;return{offer:{supportedProtocols:await Promise.all(t.map((async e=>{switch(e){case\"rtc\":{const{rtcClient:e,channels:t,offer:i,rtcConnectionId:r,channelsOpened:o}=await Et(this,bt,\"f\").startClientOffer();return n={rtcClient:e,channels:t,channelsOpened:o},{type:\"rtc\",version:_t.RTCInfo.version,payload:{offer:i,rtcConnectionId:r}}}case\"classic\":return{type:\"classic\",version:Mt.ClassicInfo.version};default:return(0,At.exhaustiveCheck)(e,[\"rtc\",\"classic\"])}}))),maxProtocols:2},rtc:n}}async createClientStrategy(e,t){t.endpointId||(t.endpointId=this.wire.environment.getNextMessageId(),Et(this,Ct,\"f\").checkForPreviousClientConnection(t.channelId));const n=t.answer??{supportedProtocols:[{type:\"classic\",version:1}]},i=(await Promise.all(n.supportedProtocols.map((async n=>\"rtc\"===n.type&&e?(await Et(this,bt,\"f\").finishClientOffer(e.rtcClient,n.payload.answer,e.channelsOpened),new _t.RTCStrategy):\"classic\"===n.type?new Mt.ClassicStrategy(this.wire,Et(this,Ct,\"f\"),t.endpointId,t):null)))).filter((e=>null!==e));let r;if(e&&!i.some((e=>e instanceof _t.RTCStrategy))&&e&&e.rtcClient.close(),i.length>=2)r=jt.default.combine(i[0],i[1]);else{if(!i.length)throw new Error(\"No compatible protocols\");[r]=i}const o={endpointIdentity:t,rtc:e};return r.addEndpoint(t.channelId,o),r}async processChannelConnection(e){const{clientIdentity:t,providerIdentity:n,ackToSender:i,payload:r,offer:o}=e.payload;t.endpointId?t.isLocalEndpointId=!1:(t.endpointId=this.wire.environment.getNextMessageId(),t.isLocalEndpointId=!0);const s=n.channelId,a=this.providerMap.get(s);if(!a)return i.payload.success=!1,i.payload.reason=`Channel \"${n.channelName}\" has been destroyed.`,this.wire.sendRaw(i);const{provider:c,strategy:d,supportedProtocols:h}=a;try{if(!(c instanceof St.ChannelProvider))throw Error(\"Cannot connect to a channel client\");const e=o??{supportedProtocols:[{type:\"classic\",version:1}],maxProtocols:1},n=this.protocolManager.getCompatibleProtocols(h,e);if(!n.length)throw new Error(\"This provider does not support any of the offered protocols.\");const s=await c.processConnection(t,r);i.payload.payload=i.payload.payload||{};let a={supportedProtocols:[],endpointPayloadPromise:Promise.resolve({endpointIdentity:t})};return a=await n.reduce((async(e,t)=>{const n=await e;if(\"rtc\"===t.type){const{answer:e,rtcClient:i,channels:r}=await Et(this,bt,\"f\").createProviderAnswer(t.payload.rtcConnectionId,t.payload.offer);n.supportedProtocols.push({type:\"rtc\",version:_t.RTCInfo.version,payload:{answer:e}}),n.endpointPayloadPromise=n.endpointPayloadPromise.then((e=>r.then((t=>({...e,rtc:{rtcClient:i,channels:t}})))))}else n.supportedProtocols.push({type:\"classic\",version:Mt.ClassicInfo.version});return n}),Promise.resolve(a)),a.endpointPayloadPromise.then((e=>d.addEndpoint(t.endpointId,e))),i.payload.payload.result=s,i.payload.payload.answer=a,this.wire.sendRaw(i)}catch(e){return i.payload.success=!1,i.payload.reason=e.message,this.wire.sendRaw(i)}}}xe.ConnectionManager=kt,Ct=new WeakMap,bt=new WeakMap;var Lt,Tt,$t,Bt=s&&s.__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},Gt=s&&s.__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)};Object.defineProperty(le,\"__esModule\",{value:!0}),le.Channel=void 0;const Wt=t,Ht=G,Nt=d,Dt=ue,Ut=xe,Vt=Qe;function zt(e){const t=Math.floor(e/10),n=Math.min(3e4,500*2**t);return new Promise((e=>{setTimeout((()=>{e(!1)}),n)}))}class Kt extends Nt.EmitterBase{constructor(e){super(e,\"channel\"),Lt.set(this,void 0),Tt.set(this,new Wt.EventEmitter),$t.set(this,new Ht.AsyncRetryableLazy((async()=>{await Promise.all([this.on(\"disconnected\",(e=>{Dt.ChannelClient.handleProviderDisconnect(e)})),this.on(\"connected\",((...e)=>{Gt(this,Tt,\"f\").emit(\"connected\",...e)}))]).catch((()=>new Error(\"error setting up channel connection listeners\")))}))),Bt(this,Lt,new Ut.ConnectionManager(e),\"f\")}async getAllChannels(){return this.wire.sendAction(\"get-all-channels\").then((({payload:e})=>e.data))}async onChannelConnect(e){await this.on(\"connected\",e)}async onChannelDisconnect(e){await this.on(\"disconnected\",e)}async safeConnect(e,t,n){const i={count:0};do{let r=()=>{};const o=new Promise((t=>{r=n=>{e===n.channelName&&t(!0)},Gt(this,Tt,\"f\").on(\"connected\",r)}));try{if(i.count>0){i.gotConnectedEvent=await Promise.race([zt(i.count),o]);const t=await this.wire.sendAction(\"connect-to-channel\",{...n,retryInfo:i});return console.log(`Successfully connected to channelName: ${e}`),t.payload.data}const t=this.wire.sendAction(\"connect-to-channel\",n);i.originalMessageId=t.messageId;return(await t).payload.data}catch(n){if(!n.message.includes(\"internal-nack\"))throw n;t&&0===i.count&&console.warn(`No channel found for channelName: ${e}. Waiting for connection...`)}finally{i.count+=1,Gt(this,Tt,\"f\").removeListener(\"connected\",r)}}while(t);throw new Error(`No channel found for channelName: ${e}.`)}async connect(e,t={}){if(await Gt(this,$t,\"f\").getValue(),!e||\"string\"!=typeof e)throw new Error(\"Please provide a channelName string to connect to a channel.\");const n={wait:!0,...this.wire.environment.getDefaultChannelOptions().connect,...t},{offer:i,rtc:r}=await Gt(this,Lt,\"f\").createClientOffer(n);let o;(this.fin.me.isFrame||this.fin.me.isView||this.fin.me.isWindow)&&(o=(await this.fin.me.getInfo()).url);const s={channelName:e,...n,offer:i,connectionUrl:o},a=await this.safeConnect(e,n.wait,s),c=await Gt(this,Lt,\"f\").createClientStrategy(r,a),d=new Dt.ChannelClient(a,(()=>Dt.ChannelClient.wireClose(this.wire,a,a.endpointId)),c);return c.onEndpointDisconnect(a.channelId,(async()=>{try{await d.sendDisconnectAction()}catch(e){console.warn(`Something went wrong during disconnect for client with uuid: ${a.uuid} / name: ${a.name} / endpointId: ${a.endpointId}.`)}finally{Dt.ChannelClient.handleProviderDisconnect(a)}})),d}async create(e,t){if(!e)throw new Error(\"Please provide a channelName to create a channel\");const{payload:{data:n}}=await this.wire.sendAction(\"create-channel\",{channelName:e}),i=Gt(this,Lt,\"f\").createProvider(t,n);return this.on(\"client-disconnected\",(t=>{t.channelName===e&&Vt.ChannelProvider.handleClientDisconnection(i,t)})),i}}le.Channel=Kt,Lt=new WeakMap,Tt=new WeakMap,$t=new WeakMap,Object.defineProperty(de,\"__esModule\",{value:!0}),de.InterAppPayload=de.InterApplicationBus=void 0;const qt=t,Jt=d,Yt=he,Zt=le,Qt=O;class Xt extends Jt.Base{constructor(e){super(e),this.events={subscriberAdded:\"subscriber-added\",subscriberRemoved:\"subscriber-removed\"},this.refCounter=new Yt.RefCounter,this.Channel=new Zt.Channel(e),this.emitter=new qt.EventEmitter,e.registerMessageHandler(this.onmessage.bind(this)),this.on=this.emitter.on.bind(this.emitter),this.removeAllListeners=this.emitter.removeAllListeners.bind(this.emitter)}async publish(e,t){await this.wire.sendAction(\"publish-message\",{topic:e,message:t,sourceWindowName:this.me.name})}async send(e,t,n){const i=(0,Qt.validateIdentity)(e);if(i)throw new Error(i);await this.wire.sendAction(\"send-message\",{destinationUuid:e.uuid,destinationWindowName:e.name,topic:t,message:n,sourceWindowName:this.me.name})}subscribe(e,t,n){const i=this.createSubscriptionKey(e.uuid,e.name||\"*\",t);return this.emitter.on(i,n),this.refCounter.actOnFirst(i,(async()=>{await this.wire.sendAction(\"subscribe\",{sourceUuid:e.uuid,sourceWindowName:e.name||\"*\",topic:t,destinationWindowName:this.me.name})}),(()=>Promise.resolve()))}unsubscribe(e,t,n){const i=e.name||\"*\",r=this.createSubscriptionKey(e.uuid,i,t);return this.emitter.removeListener(r,n),this.refCounter.actOnLast(r,(async()=>{await this.wire.sendAction(\"unsubscribe\",{sourceUuid:e.uuid,sourceWindowName:i,topic:t,destinationWindowName:this.me.name})}),(()=>new Promise((e=>e)).then((()=>{}))))}processMessage(e){const{payload:{message:t,sourceWindowName:n,sourceUuid:i,topic:r}}=e,o=[this.createSubscriptionKey(i,n,r),this.createSubscriptionKey(i,\"*\",r),this.createSubscriptionKey(\"*\",\"*\",r)],s={uuid:i,name:n};o.forEach((e=>{this.emitter.emit(e,t,s)}))}emitSubscriverEvent(e,t){const{payload:{targetName:n,uuid:i,topic:r}}=t,o={name:n,uuid:i,topic:r};this.emitter.emit(e,o)}createSubscriptionKey(e,t,n){const i=t||\"*\";if(!(e&&i&&n))throw new Error(\"Missing uuid, name, or topic string\");return function(...e){return e.map((e=>Buffer.from(`${e}`).toString(\"base64\"))).join(\"/\")}(e,i,n)}onmessage(e){const{action:t}=e;switch(t){case\"process-message\":this.processMessage(e);break;case this.events.subscriberAdded:this.emitSubscriverEvent(this.events.subscriberAdded,e);break;case this.events.subscriberRemoved:this.emitSubscriverEvent(this.events.subscriberRemoved,e)}return!0}}de.InterApplicationBus=Xt;de.InterAppPayload=class{};var en={};Object.defineProperty(en,\"__esModule\",{value:!0}),en.Clipboard=void 0;const tn=d;class nn extends tn.Base{async writeText(e){await this.wire.sendAction(\"clipboard-write-text\",e)}async readText(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-text\",{type:e});return t.data}async writeImage(e){await this.wire.sendAction(\"clipboard-write-image\",e)}async readImage(e={format:\"dataURL\"}){const{payload:t}=await this.wire.sendAction(\"clipboard-read-image\",e);return t.data}async writeHtml(e){await this.wire.sendAction(\"clipboard-write-html\",e)}async readHtml(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-html\",{type:e});return t.data}async writeRtf(e){await this.wire.sendAction(\"clipboard-write-rtf\",e)}async readRtf(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-rtf\",{type:e});return t.data}async write(e){await this.wire.sendAction(\"clipboard-write\",e)}async getAvailableFormats(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-formats\",{type:e});return t.data}}en.Clipboard=nn;var rn={},on={},sn={};Object.defineProperty(sn,\"__esModule\",{value:!0}),sn.ExternalApplication=void 0;const an=d;class cn extends an.EmitterBase{constructor(e,t){super(e,\"external-application\",t.uuid),this.identity=t}getInfo(){return this.wire.sendAction(\"get-external-application-info\",this.identity).then((({payload:e})=>e.data))}}sn.ExternalApplication=cn,Object.defineProperty(on,\"__esModule\",{value:!0}),on.ExternalApplicationModule=void 0;const dn=d,hn=sn;class ln extends dn.Base{wrap(e){return this.wire.sendAction(\"external-application-wrap\").catch((e=>{})),Promise.resolve(new hn.ExternalApplication(this.wire,{uuid:e}))}wrapSync(e){return this.wire.sendAction(\"external-application-wrap-sync\").catch((e=>{})),new hn.ExternalApplication(this.wire,{uuid:e})}}on.ExternalApplicationModule=ln,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(on,e),n(sn,e)}(rn);var un={},pn={},wn={};Object.defineProperty(wn,\"__esModule\",{value:!0}),wn._Frame=void 0;const yn=d;class fn extends yn.EmitterBase{constructor(e,t){super(e,\"frame\",t.uuid,t.name),this.identity=t}getInfo(){return this.wire.sendAction(\"get-frame-info\",this.identity).then((({payload:e})=>e.data))}getParentWindow(){return this.wire.sendAction(\"get-parent-window\",this.identity).then((({payload:e})=>e.data))}}wn._Frame=fn,Object.defineProperty(pn,\"__esModule\",{value:!0}),pn._FrameModule=void 0;const gn=d,mn=O,vn=wn;class Cn extends gn.Base{async wrap(e){this.wire.sendAction(\"frame-wrap\").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}wrapSync(e){this.wire.sendAction(\"frame-wrap-sync\").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}getCurrent(){return this.wire.sendAction(\"frame-get-current\").catch((e=>{})),Promise.resolve(new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity()))}getCurrentSync(){return this.wire.sendAction(\"frame-get-current-sync\").catch((e=>{})),new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity())}}pn._FrameModule=Cn,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(pn,e),n(wn,e)}(un);var bn={};Object.defineProperty(bn,\"__esModule\",{value:!0}),bn.GlobalHotkey=void 0;const In=d;class En extends In.EmitterBase{constructor(e){super(e,\"global-hotkey\")}async register(e,t){await this.on(e,t),await this.wire.sendAction(\"global-hotkey-register\",{hotkey:e})}async unregister(e){await this.removeAllListeners(e),await this.wire.sendAction(\"global-hotkey-unregister\",{hotkey:e})}async unregisterAll(){await Promise.all(this.eventNames().filter((e=>!(\"registered\"===e||\"unregistered\"===e))).map((e=>this.removeAllListeners(e)))),await this.wire.sendAction(\"global-hotkey-unregister-all\",{})}async isRegistered(e){const{payload:{data:t}}=await this.wire.sendAction(\"global-hotkey-is-registered\",{hotkey:e});return t}}bn.GlobalHotkey=En;var xn,An={},Pn={},Mn={},_n=s&&s.__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)};Object.defineProperty(Mn,\"__esModule\",{value:!0}),Mn.Platform=void 0;const On=d,Sn=O,Rn=new Map;class Fn extends On.EmitterBase{constructor(e,t){super(t.wire,\"application\",e.uuid),this.getClient=e=>{this.wire.sendAction(\"platform-get-client\",this.identity).catch((e=>{}));const t=e||this.identity,{uuid:n}=t;if(!Rn.has(n)){const e=_n(this,xn,\"f\").call(this,n);Rn.set(n,e)}return Rn.get(n)},xn.set(this,(async e=>{try{const t=`custom-frame-${e}`,n=await this._channel.connect(t,{wait:!1});return n.onDisconnection((()=>{Rn.delete(e)})),n}catch(t){throw Rn.delete(e),new Error(\"The targeted Platform is not currently running. Listen for application-started event for the given Uuid.\")}})),this.launchLegacyManifest=this.launchContentManifest;const n=(0,Sn.validateIdentity)(e);if(n)throw new Error(n);this._channel=t,this.identity={uuid:e.uuid},this.Layout=this.fin.Platform.Layout,this.Application=this.fin.Application.wrapSync(this.identity)}async createView(e,t,n){this.wire.sendAction(\"platform-create-view\",this.identity).catch((e=>{}));const i=await this.getClient(),r=await i.dispatch(\"create-view\",{target:t,opts:e,targetView:n});if(!r||(0,Sn.validateIdentity)(r.identity))throw new Error(`When overwriting the createView call, please return an object that has a valid 'identity' property: ${JSON.stringify(r)}`);return this.fin.View.wrapSync(r.identity)}async createWindow(e){this.wire.sendAction(\"platform-create-window\",this.identity).catch((e=>{}));const t=await this.getClient();e.reason||(e.reason=\"api-call\");const n=await t.dispatch(\"create-view-container\",e);if(!n||(0,Sn.validateIdentity)(n.identity))throw new Error(`When overwriting the createWindow call, please return an object that has a valid 'identity' property: ${JSON.stringify(n)}`);const{identity:i}=n,r=this.fin.Window.wrapSync(i);return r.name=i.name,r.uuid=i.uuid,r}async quit(){this.wire.sendAction(\"platform-quit\",this.identity).catch((e=>{}));return(await this.getClient()).dispatch(\"quit\")}async closeView(e){this.wire.sendAction(\"platform-close-view\",this.identity).catch((e=>{}));const t=await this.getClient();await t.dispatch(\"close-view\",{view:e})}async reparentView(e,t){console.warn(\"Platform.reparentView has been deprecated, please use Platform.createView\"),this.wire.sendAction(\"platform-reparent-view\",this.identity).catch((e=>{}));const n={...e,uuid:e.uuid??this.identity.uuid},i=await this.fin.View.wrap(n),r=await i.getOptions();return this.createView(r,t)}async getSnapshot(){this.wire.sendAction(\"platform-get-snapshot\",this.identity).catch((e=>{}));return(await this.getClient()).dispatch(\"get-snapshot\")}async getViewSnapshot(e){return(await this.getClient()).dispatch(\"get-view-snapshot\",{viewIdentity:e})}async applySnapshot(e,t){this.wire.sendAction(\"platform-apply-snapshot\",this.identity).catch((e=>{}));const n=\"Requested snapshot must be a valid Snapshot object, or a url or filepath to such an object.\";let i;if(\"string\"==typeof e)try{i=(await this._channel.wire.sendAction(\"get-application-manifest\",{manifestUrl:e})).payload.data}catch(e){throw new Error(`${n}: ${e}`)}else i=e;if(!i.windows)throw new Error(n);const r=await this.getClient();return await r.dispatch(\"apply-snapshot\",{snapshot:i,options:t}),this}async fetchManifest(e){return(await this.getClient()).dispatch(\"platform-fetch-manifest\",{manifestUrl:e})}async launchContentManifest(e){this.wire.sendAction(\"platform-launch-content-manifest\",this.identity).catch((()=>{}));const t=await this.getClient(),n=await this.fetchManifest(e);return t.dispatch(\"launch-into-platform\",{manifest:n,manifestUrl:e}),this}async setWindowContext(e={},t){if(this.wire.sendAction(\"platform-set-window-context\",this.identity).catch((e=>{})),!e)throw new Error(\"Please provide a serializable object or string to set the context.\");const n=await this.getClient(),{entityType:i}=t?await this.fin.System.getEntityInfo(t.uuid,t.name):this.fin.me;await n.dispatch(\"set-window-context\",{context:e,entityType:i,target:t||{uuid:this.fin.me.uuid,name:this.fin.me.name}})}async getWindowContext(e){this.wire.sendAction(\"platform-get-window-context\",this.identity).catch((e=>{}));const t=await this.getClient(),{entityType:n}=e?await this.fin.System.getEntityInfo(e.uuid,e.name):this.fin.me;return t.dispatch(\"get-window-context\",{target:e||{uuid:this.fin.me.uuid,name:this.fin.me.name},entityType:n})}async closeWindow(e,t={skipBeforeUnload:!1}){this.wire.sendAction(\"platform-close-window\",this.identity).catch((e=>{}));return(await this.getClient()).dispatch(\"close-window\",{windowId:e,options:t})}}Mn.Platform=Fn,xn=new WeakMap;var jn={},kn={},Ln={},Tn={};function $n(e){switch(e){case\"columns\":case\"grid\":case\"rows\":case\"tabs\":return!0;default:return!1}}Object.defineProperty(Tn,\"__esModule\",{value:!0}),Tn.overrideFromComposables=Tn.isValidPresetType=void 0,Tn.isValidPresetType=$n,Tn.overrideFromComposables=function(...e){return t=>e.reduceRight(((e,t)=>n=>t(e(n))),(e=>e))(t)},Tn.default={isValidPresetType:$n};var Bn={},Gn={},Wn={};Object.defineProperty(Wn,\"__esModule\",{value:!0}),Wn.ApiConsumer=void 0;Wn.ApiConsumer=class{constructor(e){this.strategy=e,this.consume=async e=>(await this.strategy.getExposedFunctions(e)).reduce(((t,n)=>({...t,[n.key]:this.strategy.createFunction(n,e)})),{})}};var Hn={},Nn={};Object.defineProperty(Nn,\"__esModule\",{value:!0}),Nn.expose=Nn.getExposedProperties=void 0;const Dn=Symbol(\"exposedProperties\");Nn.getExposedProperties=e=>e[Dn]||e.prototype[Dn]||[];Nn.expose=e=>(t,n,i)=>{t[Dn]=t[Dn]||[],t[Dn].push({key:n,descriptor:i,options:e})},Object.defineProperty(Hn,\"__esModule\",{value:!0}),Hn.ApiExposer=void 0;const Un=Nn;Hn.ApiExposer=class{constructor(e){this.strategy=e,this.exposeInstance=async(e,t)=>{const n=(0,Un.getExposedProperties)(e),i=await Promise.all(n.map((async({key:n,options:i})=>({key:n,options:await this.strategy.exposeFunction(e[n].bind(e),{key:n,options:i,meta:t})}))));await this.strategy.exposeMeta(t,i)}}};var Vn={},zn={},Kn={};Object.defineProperty(Kn,\"__esModule\",{value:!0}),Kn.ChannelsConsumer=void 0;Kn.ChannelsConsumer=class{constructor(e){this.channel=e,this.getExposedFunctions=async e=>{const{id:t}=e,{props:n}=await this.channel.dispatch(`api-meta:${t}`);return n},this.createFunction=e=>(...t)=>{const{action:n}=e.options;return this.channel.dispatch(n,{args:t})}}};var qn={};Object.defineProperty(qn,\"__esModule\",{value:!0}),qn.ChannelsExposer=void 0;qn.ChannelsExposer=class{constructor(e){this.channelProviderOrClient=e,this.exposeFunction=async(e,t)=>{const{key:n,options:i,meta:r}=t,{id:o}=r,s=`${o}.${i?.action||n}`;return await this.channelProviderOrClient.register(s,(async({args:t})=>e(...t))),{action:s}},this.exposeMeta=async({id:e},t)=>{const n=`api-meta:${e}`;await this.channelProviderOrClient.register(n,(()=>({props:t})))}}},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Kn,e),n(qn,e)}(zn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(zn,e)}(Vn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Wn,e),n(Hn,e),n(Vn,e),n(Nn,e)}(Gn);var Jn={};Object.defineProperty(Jn,\"__esModule\",{value:!0}),Jn.createRelayedDispatch=exports.relayChannelClientApi_1=Jn.relayChannelClientApi=void 0;const Yn=[\"no longer connected\",\"RTCDataChannel closed unexpectedly\",\"The client you are trying to dispatch from is disconnected from the target provider\"];exports.relayChannelClientApi_1=Jn.relayChannelClientApi=async(e,t)=>{e.register(`relay:${t}`,(({action:t,target:n,payload:i})=>e.dispatch(n,t,i))),await Promise.resolve()};Jn.createRelayedDispatch=(e,t,n,i)=>async(r,o)=>{try{return await e.dispatch(`relay:${n}`,{action:r,payload:o,target:t})}catch(e){if(s=e.message,Yn.some((e=>s.includes(e)))&&i)throw new Error(i);throw e}var s};var Zn,Qn,Xn,ei=s&&s.__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},ti=s&&s.__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)};Object.defineProperty(Bn,\"__esModule\",{value:!0}),Bn.ColumnOrRow=Bn.TabStack=Bn.LayoutNode=void 0;const ni=Gn,ii=Jn;class ri{constructor(e,t){Zn.set(this,void 0),this.isRoot=()=>ti(this,Zn,\"f\").isRoot(this.entityId),this.exists=()=>ti(this,Zn,\"f\").exists(this.entityId),this.getParent=async()=>{const e=await ti(this,Zn,\"f\").getParent(this.entityId);if(e)return ri.getEntity(e,ti(this,Zn,\"f\"))},this.createAdjacentStack=async(e,t)=>{const n=await ti(this,Zn,\"f\").createAdjacentStack(this.entityId,e,t);return ri.getEntity({entityId:n,type:\"stack\"},ti(this,Zn,\"f\"))},this.getAdjacentStacks=async e=>(await ti(this,Zn,\"f\").getAdjacentStacks({targetId:this.entityId,edge:e})).map((e=>ri.getEntity({type:\"stack\",entityId:e.entityId},ti(this,Zn,\"f\")))),ei(this,Zn,e,\"f\"),this.entityId=t}}Bn.LayoutNode=ri,Zn=new WeakMap,ri.newLayoutEntitiesClient=async(e,t,n)=>{const i=(0,ii.createRelayedDispatch)(e,n,\"layout-relay\",\"You are trying to interact with a layout component on a window that does not exist or has been destroyed.\");return new ni.ApiConsumer(new ni.ChannelsConsumer({dispatch:i})).consume({id:t})},ri.getEntity=(e,t)=>{const{entityId:n,type:i}=e;switch(i){case\"column\":case\"row\":return new si(t,n,i);case\"stack\":return new oi(t,n);default:throw new Error(`Unrecognised Layout Entity encountered ('${JSON.stringify(e)})`)}};class oi extends ri{constructor(e,t){super(e,t),Qn.set(this,void 0),this.type=\"stack\",this.getViews=()=>ti(this,Qn,\"f\").getStackViews(this.entityId),this.addView=async(e,t={index:0})=>ti(this,Qn,\"f\").addViewToStack(this.entityId,e,t),this.removeView=async e=>{await ti(this,Qn,\"f\").removeViewFromStack(this.entityId,e)},this.setActiveView=async e=>{await ti(this,Qn,\"f\").setStackActiveView(this.entityId,e)},ei(this,Qn,e,\"f\")}}Bn.TabStack=oi,Qn=new WeakMap;class si extends ri{constructor(e,t,n){super(e,t),Xn.set(this,void 0),this.getContent=async()=>(await ti(this,Xn,\"f\").getContent(this.entityId)).map((e=>ri.getEntity(e,ti(this,Xn,\"f\")))),ei(this,Xn,e,\"f\"),this.type=n}}Bn.ColumnOrRow=si,Xn=new WeakMap;var ai={};Object.defineProperty(ai,\"__esModule\",{value:!0}),ai.DEFAULT_LAYOUT_KEY=ai.LAYOUT_CONTROLLER_ID=void 0,ai.LAYOUT_CONTROLLER_ID=\"layout-entities\",ai.DEFAULT_LAYOUT_KEY=\"__default__\";var ci,di,hi,li=s&&s.__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)};Object.defineProperty(Ln,\"__esModule\",{value:!0}),Ln.Layout=void 0;const ui=G,pi=O,wi=d,yi=Tn,fi=Bn,gi=ai;class mi extends wi.Base{static getClient(e){return li(e,di,\"f\").getValue()}constructor(e,t){super(t),ci.add(this),di.set(this,new ui.Lazy((async()=>fi.LayoutNode.newLayoutEntitiesClient(await this.platform.getClient(),gi.LAYOUT_CONTROLLER_ID,this.identity)))),this.replace=async e=>{this.wire.sendAction(\"layout-replace\").catch((e=>{}));const t=await this.platform.getClient();await t.dispatch(\"replace-layout\",{target:this.identity,opts:{layout:e}})},this.replaceView=async(e,t)=>{this.wire.sendAction(\"layout-replace-view\").catch((e=>{}));const n=await this.platform.getClient();await n.dispatch(\"replace-view\",{target:this.identity,opts:{viewToReplace:e,newView:t}})},this.applyPreset=async e=>{this.wire.sendAction(\"layout-apply-preset\").catch((e=>{}));const t=await this.platform.getClient(),{presetType:n}=e;if(!n||!(0,yi.isValidPresetType)(n))throw new Error(\"Cannot apply preset layout, please include an applicable presetType property in the PresetLayoutOptions.\");await t.dispatch(\"apply-preset-layout\",{target:this.identity,opts:{presetType:n}})};const n=(0,pi.validateIdentity)(e);if(n)throw new Error(n);this.identity=e,this.platform=this.fin.Platform.wrapSync({uuid:e.uuid}),e.uuid===this.fin.me.uuid&&e.name===this.fin.me.name&&(this.init=this.fin.Platform.Layout.init)}async getConfig(){this.wire.sendAction(\"layout-get-config\").catch((e=>{}));return(await this.platform.getClient()).dispatch(\"get-frame-snapshot\",{target:this.identity})}async getCurrentViews(){this.wire.sendAction(\"layout-get-views\").catch((e=>{}));const e=await this.platform.getClient();return(await e.dispatch(\"get-layout-views\",{target:this.identity})).map((e=>this.fin.View.wrapSync(e)))}async getRootItem(){this.wire.sendAction(\"layout-get-root-item\").catch((()=>{}));const e=await li(this,di,\"f\").getValue(),t=await e.getRoot(\"layoutName\"in this.identity?this.identity:void 0);return fi.LayoutNode.getEntity(t,e)}async getStackByViewIdentity(e){this.wire.sendAction(\"layout-get-stack-by-view\").catch((()=>{}));const t=await li(this,di,\"f\").getValue(),n=await t.getStackByView(e);if(!n)throw new Error(`No stack found for view: ${e.uuid}/${e.name}`);return fi.LayoutNode.getEntity(n,t)}async addView(e,{location:t,targetView:n}={}){this.wire.sendAction(\"layout-add-view\").catch((e=>{}));const{identity:i}=await li(this,ci,\"m\",hi).call(this,\"layout-add-view\",{viewOptions:e,location:t,targetView:n});return{identity:i}}async closeView(e){this.wire.sendAction(\"layout-close-view\").catch((e=>{})),await li(this,ci,\"m\",hi).call(this,\"layout-close-view\",{viewIdentity:e})}}Ln.Layout=mi,di=new WeakMap,ci=new WeakSet,hi=async function(e,t){return(await this.platform.getClient()).dispatch(e,{target:this.identity,opts:t})};var vi,Ci,bi,Ii,Ei,xi=s&&s.__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)},Ai=s&&s.__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};Object.defineProperty(kn,\"__esModule\",{value:!0}),kn.LayoutModule=void 0;const Pi=d,Mi=Ln,_i=ai;class Oi extends Pi.Base{constructor(){super(...arguments),vi.add(this),Ci.set(this,!1),bi.set(this,null),this.init=async(e={})=>{if(this.wire.sendAction(\"layout-init\").catch((e=>{})),!this.wire.environment.layoutAllowedInContext(this.fin))throw new Error(\"Layout.init can only be called from a Window context.\");if(xi(this,Ci,\"f\"))throw new Error(\"Layout.init was already called, please use Layout.create to add additional layouts.\");\"openfin\"===this.wire.environment.type&&await this.fin.Platform.getCurrentSync().getClient(),Ai(this,Ci,!0,\"f\"),Ai(this,bi,await this.wire.environment.initLayoutManager(this.fin,this.wire,e),\"f\"),await this.wire.environment.applyLayoutSnapshot(this.fin,xi(this,bi,\"f\"),e);const t={name:this.fin.me.name,uuid:this.fin.me.uuid};if(!e.layoutManagerOverride){const e={layoutName:_i.DEFAULT_LAYOUT_KEY,...t};return xi(this,Ii,\"f\").call(this,e)}return this.wrapSync(t)},Ii.set(this,(e=>{const t=\"[Layout] You are using a deprecated property `layoutManager` - it will throw if you access it starting in v37.\",n=new Proxy({},{get(e,n){throw console.warn(`[Layout-mgr-proxy] accessing ${n.toString()}`),new Error(t)}}),i=Object.assign(this.wrapSync(e),{layoutManager:n});return new Proxy(i,{get(e,n){if(\"layoutManager\"===n)throw console.warn(`[Layout-proxy] accessing ${n.toString()}`),new Error(t);return e[n]}})})),this.getCurrentLayoutManagerSync=()=>xi(this,vi,\"m\",Ei).call(this,\"fin.Platform.Layout.getCurrentLayoutManagerSync()\"),this.create=async e=>this.wire.environment.createLayout(xi(this,vi,\"m\",Ei).call(this,\"fin.Platform.Layout.create()\"),e),this.destroy=async e=>this.wire.environment.destroyLayout(xi(this,vi,\"m\",Ei).call(this,\"fin.Platform.Layout.destroy()\"),e)}async wrap(e){return this.wire.sendAction(\"layout-wrap\").catch((e=>{})),new Mi.Layout(e,this.wire)}wrapSync(e){return this.wire.sendAction(\"layout-wrap-sync\").catch((e=>{})),new Mi.Layout(e,this.wire)}async getCurrent(){if(this.wire.sendAction(\"layout-get-current\").catch((e=>{})),\"openfin\"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error(\"You are not in a Window context. Only Windows can have a Layout.\");const{uuid:e,name:t}=this.fin.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction(\"layout-get-current-sync\").catch((e=>{})),\"openfin\"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error(\"You are not in a Window context. Only Windows can have a Layout.\");const{uuid:e,name:t}=this.fin.me;return this.wrapSync({uuid:e,name:t})}async getLayoutByViewIdentity(e){this.wire.sendAction(\"layout-get-by-view-identity\").catch((()=>{}));let t=await this.wire.environment.getViewWindowIdentity(this.fin,e);t.identity&&(t=t.identity);try{const n=this.wrapSync(t),i=await Mi.Layout.getClient(n),r=await i.getLayoutIdentityForViewOrThrow(e);return this.wrapSync(r)}catch(n){if(![\"No action registered at target for\",\"getLayoutIdentityForViewOrThrow is not a function\"].some((e=>n.message.includes(e))))throw n;if(t.uuid===t.name)throw new Error(`View identity ${JSON.stringify(e)} is not attached to any layout in provider window ${JSON.stringify(t)}.`);return this.wrapSync(t)}}}kn.LayoutModule=Oi,Ci=new WeakMap,bi=new WeakMap,Ii=new WeakMap,vi=new WeakSet,Ei=function(e){if(!xi(this,bi,\"f\"))throw new Error(`You must call init before using the API ${e}`);return xi(this,bi,\"f\")},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(kn,e),n(Ln,e)}(jn),Object.defineProperty(Pn,\"__esModule\",{value:!0}),Pn.PlatformModule=void 0;const Si=d,Ri=Mn,Fi=jn;class ji extends Si.Base{constructor(e,t){super(e),this._channel=t,this.Layout=new Fi.LayoutModule(this.wire)}async init(e){if(!fin.__internal_.isPlatform||fin.me.name!==fin.me.uuid)throw new Error(\"fin.Platform.init should only be called from a custom platform provider running in the main window of the application.\");return this.wire.environment.initPlatform(this.fin,e)}async wrap(e){return this.wire.sendAction(\"platform-wrap\").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}wrapSync(e){return this.wire.sendAction(\"platform-wrap-sync\").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}async getCurrent(){return this.wire.sendAction(\"platform-get-current\").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction(\"platform-get-current-sync\").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}start(e){return this.wire.sendAction(\"platform-start\").catch((e=>{})),new Promise((async(t,n)=>{try{const{uuid:n}=e,i=await this.fin.Application._create({...e,isPlatformController:!0});i.once(\"platform-api-ready\",(()=>t(this.wrapSync({uuid:n})))),i._run({uuid:n})}catch(e){n(e)}}))}startFromManifest(e,t){return this.wire.sendAction(\"platform-start-from-manifest\").catch((e=>{})),new Promise((async(n,i)=>{try{const i=await this.fin.Application._createFromManifest(e);i.once(\"platform-api-ready\",(()=>n(this.wrapSync({uuid:i.identity.uuid})))),i._run(t)}catch(e){i(e)}}))}}Pn.PlatformModule=ji,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Pn,e),n(Mn,e)}(An);var ki={};!function(e){Object.defineProperty(e,\"__esModule\",{value:!0}),e.getMe=e.getBaseMe=e.environmentUnsupportedMessage=void 0;const t=J(),n=un,i=ie(),r=rn;function o(e,t,n){return{...{isView:\"view\"===e,isWindow:\"window\"===e,isFrame:\"iframe\"===e,isExternal:\"external connection\"===e},uuid:t,name:n,entityType:e}}e.environmentUnsupportedMessage=\"You are not running in OpenFin.\",e.getBaseMe=o,e.getMe=function(s){const{uuid:a,name:c,entityType:d}=s.me,h={setContext(){throw new Error(e.environmentUnsupportedMessage)},addContextHandler(){throw new Error(e.environmentUnsupportedMessage)},getContextGroups(){throw new Error(e.environmentUnsupportedMessage)},joinContextGroup(){throw new Error(e.environmentUnsupportedMessage)},removeFromContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getAllClientsInContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getInfoForContextGroup(){throw new Error(e.environmentUnsupportedMessage)}},l=\"Interop API has not been instantiated. Either connection has failed or you have not declared interop in your config.\",u={setContext(){throw new Error(l)},addContextHandler(){throw new Error(l)},getContextGroups(){throw new Error(l)},joinContextGroup(){throw new Error(l)},removeFromContextGroup(){throw new Error(l)},getAllClientsInContextGroup(){throw new Error(l)},getInfoForContextGroup(){throw new Error(l)}},p={eventNames:()=>{throw new Error(e.environmentUnsupportedMessage)},emit:()=>{throw new Error(e.environmentUnsupportedMessage)},listeners:()=>{throw new Error(e.environmentUnsupportedMessage)},listenerCount:()=>{throw new Error(e.environmentUnsupportedMessage)},on:()=>{throw new Error(e.environmentUnsupportedMessage)},addListener:()=>{throw new Error(e.environmentUnsupportedMessage)},once:()=>{throw new Error(e.environmentUnsupportedMessage)},prependListener:()=>{throw new Error(e.environmentUnsupportedMessage)},prependOnceListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeAllListeners:()=>{throw new Error(e.environmentUnsupportedMessage)}};switch(d){case\"view\":return Object.assign(new t.View(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case\"window\":return Object.assign(new i._Window(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case\"iframe\":return Object.assign(new n._Frame(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case\"external connection\":return Object.assign(new r.ExternalApplication(s,{uuid:a}),o(d,a,c),{interop:u,isOpenFin:!1});default:return{...o(d,a,c),...p,interop:h,isOpenFin:!1}}}}(ki);var Li={},Ti={},$i={};Object.defineProperty($i,\"__esModule\",{value:!0}),$i.createWarningObject=$i.createUnusableObject=void 0,$i.createUnusableObject=function(e){const t=()=>{throw new Error(e)};return new Proxy({},{apply:t,construct:t,defineProperty:t,deleteProperty:t,get:t,getOwnPropertyDescriptor:t,getPrototypeOf:t,has:t,isExtensible:t,ownKeys:t,preventExtensions:t,set:t,setPrototypeOf:t})},$i.createWarningObject=function(e,t){return new Proxy(t,{get:(...t)=>(console.warn(e),Reflect.get(...t)),set:(...t)=>(console.warn(e),Reflect.set(...t)),getOwnPropertyDescriptor:(...t)=>(console.warn(e),Reflect.getOwnPropertyDescriptor(...t)),ownKeys:(...t)=>(console.warn(e),Reflect.ownKeys(...t))})};var Bi,Gi={},Wi={};var Hi={};!function(e){Object.defineProperty(e,\"__esModule\",{value:!0}),e.wrapIntentHandler=e.BROKER_ERRORS=e.generateOverrideWarning=e.generateOverrideError=e.wrapContextHandler=e.wrapInTryCatch=e.generateId=void 0;e.generateId=()=>`${Math.random()}${Date.now()}`;e.wrapInTryCatch=(e,t)=>(...n)=>{try{return e(...n)}catch(e){throw new Error((t||\"\")+e)}};e.wrapContextHandler=(e,t)=>async n=>{try{await e(n)}catch(e){throw console.error(`Error thrown by handler ${t} for context type ${n.type}: ${e}`),e}};e.generateOverrideError=(e,t)=>`You have tried to to use ${e} but ${t} has not been overridden in the Interop Broker. Please override this function. Refer to our documentation for more info.`;e.generateOverrideWarning=(e,t,n,i)=>{const{uuid:r,name:o}=n;return i?`Entity with identity: ${r}/${o} has called ${i} or ${e} but ${t} has not been overridden.`:`Entity with identity: ${r}/${o} has called ${e} but ${t} has not been overridden.`},e.BROKER_ERRORS={fireIntent:(0,e.generateOverrideError)(\"fireIntent\",\"handleFiredIntent\"),fireIntentForContext:(0,e.generateOverrideError)(\"fireIntentForContext\",\"handleFiredIntentForContext\"),getInfoForIntent:(0,e.generateOverrideError)(\"getInfoForIntent\",\"handleInfoForIntent\"),getInfoForIntentsByContext:(0,e.generateOverrideError)(\"getInfoForIntentsByContext\",\"handleInfoForIntentsByContext\"),joinSessionContextGroupWithJoinContextGroup:\"The Context Group you have tried to join is a Session Context Group. Custom Context Groups can only be defined by the Interop Broker through code or manifest configuration. Please use joinSessionContextGroup.\",fdc3Open:(0,e.generateOverrideError)(\"fdc3.open\",\"fdc3HandleOpen\"),fdc3FindInstances:(0,e.generateOverrideError)(\"fdc3.findInstances\",\"fdc3HandleFindInstances\"),fdc3GetAppMetadata:(0,e.generateOverrideError)(\"fdc3.getAppMetadata\",\"fdc3HandleGetAppMetadata\"),fdc3GetInfo:(0,e.generateOverrideError)(\"fdc3.getInfo\",\"fdc3HandleGetInfo\")};e.wrapIntentHandler=(e,t)=>async n=>{try{return e(n)}catch(e){throw console.error(`Error thrown by handler ${t}: ${e}`),e}}}(Hi);var Ni,Di,Ui={};function Vi(){if(Di)return Gi;Di=1;var e,t,n,r=s&&s.__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},o=s&&s.__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)},a=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Gi,\"__esModule\",{value:!0}),Gi.InteropBroker=void 0;const c=d,h=a(function(){if(Bi)return Wi;Bi=1,Object.defineProperty(Wi,\"__esModule\",{value:!0});const e=Cr();return Wi.default=class{constructor(e,t){this.provider=e,this.id=t,this.lastContext=void 0,this.contextGroupMap=new Map,this.clients=new Map,this.registerListeners()}registerListeners(){this.provider.register(`sessionContextGroup:getContext-${this.id}`,this.getCurrentContext.bind(this)),this.provider.register(`sessionContextGroup:setContext-${this.id}`,this.setContext.bind(this)),this.provider.register(`sessionContextGroup:handlerAdded-${this.id}`,this.handlerAdded.bind(this)),this.provider.register(`sessionContextGroup:handlerRemoved-${this.id}`,this.handlerRemoved.bind(this))}getCurrentContext(e){return e.type?this.contextGroupMap.get(e.type):this.lastContext}setContext(t,n){const{context:i}=t,r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name} not in Session Client State Map`);this.contextGroupMap.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{e.contextHandlers.get(i.type)?.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getClientState(e){return this.clients.get(e.endpointId)}async handlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(i){const e=r.contextHandlers.get(i)||[];r.contextHandlers.set(i,[...e,n]);const o=this.contextGroupMap.get(i);o&&await this.provider.dispatch(t,n,o)}else{r.globalHandler=n;const e=[...this.contextGroupMap.keys()].map((async e=>{const i=this.contextGroupMap.get(e);i&&await this.provider.dispatch(t,n,i)}));await Promise.all(e)}}handlerRemoved(e,t){const{handlerId:n}=e,i=this.clients.get(t.endpointId);i?(Array.from(i.contextHandlers).forEach((([,e])=>{const t=e.indexOf(n);t>-1&&e.splice(t,1)})),i.globalHandler===n&&(i.globalHandler=void 0)):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={contextHandlers:new Map,clientIdentity:e,globalHandler:void 0};this.clients.set(e.endpointId,t)}}onDisconnection(e){this.clients.delete(e.endpointId)}},Wi}()),l=Hi,u=a(i),p=function(){if(Ni)return Ui;Ni=1,Object.defineProperty(Ui,\"__esModule\",{value:!0}),Ui.PrivateChannelProvider=void 0;const e=Vi();return Ui.PrivateChannelProvider=class t{constructor(e,t){this.provider=e,this.id=t,this.clients=new Map,this.registerListeners(),this.contextByContextType=new Map,this.lastContext=void 0,this.provider.onConnection((e=>this.registerNewClient(e))),this.provider.onDisconnection((async e=>{const{endpointId:t}=e;this.clients.has(t)&&await this.handleClientDisconnecting(e),0===(await this.provider.getAllClientInfo()).length&&this.provider.destroy()}))}getClientState(e){return this.clients.get(e.endpointId)}registerListeners(){this.provider.register(\"broadcast\",this.broadcast.bind(this)),this.provider.register(\"getCurrentContext\",this.getCurrentContext.bind(this)),this.provider.register(\"contextHandlerAdded\",this.contextHandlerAdded.bind(this)),this.provider.register(\"contextHandlerRemoved\",this.contextHandlerRemoved.bind(this)),this.provider.register(\"nonStandardHandlerRemoved\",this.nonStandardHandlerRemoved.bind(this)),this.provider.register(\"onAddContextHandlerAdded\",this.onAddContextHandlerAdded.bind(this)),this.provider.register(\"onDisconnectHandlerAdded\",this.onDisconnectHandlerAdded.bind(this)),this.provider.register(\"onUnsubscribeHandlerAdded\",this.onUnsubscribeHandlerAdded.bind(this)),this.provider.register(\"clientDisconnecting\",((e,t)=>{this.handleClientDisconnecting(t)}))}broadcast(t,n){const{context:i}=t;if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name}, tried to call broadcast, is not connected to this Private Channel`);const r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to broadcast - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);this.contextByContextType.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{const t=e.handlerIdsByContextTypes.get(i.type);t&&t.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getCurrentContext(e,t){const{contextType:n}=e;if(!this.getClientState(t))throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call getCurrentContext, is not connected to this Private Channel`);if(void 0!==n){return this.contextByContextType.get(n)||null}return this.lastContext?this.lastContext:null}contextHandlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call addContextListener, is not connected to this Private Channel`);if(i){const e=r.handlerIdsByContextTypes.get(i)||[];r.handlerIdsByContextTypes.set(i,[...e,n])}else r.globalHandler=n;Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&e.onAddContextListenerHandlerId&&this.provider.dispatch(e.clientIdentity,e.onAddContextListenerHandlerId,i)}))}async contextHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);if(i){let e;if(i.globalHandler===n)i.globalHandler=void 0;else for(const[t,r]of i.handlerIdsByContextTypes){const i=r.indexOf(n);i>-1&&(r.splice(i,1),e=t)}const r=(await this.getConnectedClients()).map((async n=>{const{clientIdentity:i,clientIdentity:{endpointId:r},onUnsubscribeHandlerId:o}=n;r!==t.endpointId&&o&&await this.provider.dispatch(i,o,e)}));try{await Promise.all(r)}catch(e){throw console.error(`Problem when attempting to dispatch to onUnsubscribeHandlers. Error: ${e} Removing Client: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}`),new Error(e)}}else console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}.`)}nonStandardHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);i?i.onDisconnectHandlerId===n?i.onDisconnectHandlerId=void 0:i.onAddContextListenerHandlerId===n?i.onAddContextListenerHandlerId=void 0:i.onUnsubscribeHandlerId===n&&(i.onUnsubscribeHandlerId=void 0):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}onAddContextHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onAddContextListener, is not connected to this Private Channel`);n.onAddContextListenerHandlerId=i,Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&Array.from(e.handlerIdsByContextTypes.keys()).forEach((e=>{this.provider.dispatch(t,i,e)}))}))}onDisconnectHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onDisconnect, is not connected to this Private Channel`);n.onDisconnectHandlerId=i}onUnsubscribeHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onUnsubscribe, is not connected to this Private Channel`);n.onUnsubscribeHandlerId=i}removeClient(e){const t=this.getClientState(e);if(!t)throw new Error(`Client with Identity: ${e.uuid} ${e.name}, tried to call disconnect, is not connected to this Private Channel`);t.handlerIdsByContextTypes.clear(),this.clients.delete(e.endpointId)}async fireOnDisconnectForOtherClients(e){const{endpointId:t}=e,n=(await this.getConnectedClients()).map((async e=>{const{clientIdentity:{endpointId:n},onDisconnectHandlerId:i}=e;n!==t&&i&&await this.provider.dispatch(e.clientIdentity,i)}));try{await Promise.all(n)}catch(t){throw console.error(`Problem when attempting to dispatch to onDisconnectHandlers. Error: ${t} Disconnecting Client: uuid: ${e.uuid}. name: ${e.name}. endpointId: ${e.endpointId}`),new Error(t)}}async unsubscribeAll(e){const{endpointId:t}=e,n=this.clients.get(t);if(n){const t=Array.from(n.handlerIdsByContextTypes.values()).flat(),i=n.globalHandler;if(t.length>0){const n=t.map((async t=>this.contextHandlerRemoved({handlerId:t},e)));try{await Promise.all(n)}catch(e){console.error(e.message)}}if(i)try{await this.contextHandlerRemoved({handlerId:i},e)}catch(e){console.error(e.message)}}}async handleClientDisconnecting(e){await this.unsubscribeAll(e),this.removeClient(e),await this.fireOnDisconnectForOtherClients(e)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={clientIdentity:e,handlerIdsByContextTypes:new Map,globalHandler:void 0,onAddContextListenerHandlerId:void 0,onUnsubscribeHandlerId:void 0,onDisconnectHandlerId:void 0};this.clients.set(e.endpointId,t)}}async getConnectedClients(){const e=await this.provider.getAllClientInfo();return Array.from(this.clients.values()).filter((t=>{const{uuid:n,name:i}=t.clientIdentity;return e.some((e=>i===e.name&&n===e.uuid))}))}static init(e,n){return new t(e,n)}},Ui}(),w=G,y=[{id:\"green\",displayMetadata:{color:\"#00CC88\",name:\"green\"}},{id:\"purple\",displayMetadata:{color:\"#8C61FF\",name:\"purple\"}},{id:\"orange\",displayMetadata:{color:\"#FF8C4C\",name:\"orange\"}},{id:\"red\",displayMetadata:{color:\"#FF5E60\",name:\"red\"}},{id:\"pink\",displayMetadata:{color:\"#FF8FB8\",name:\"pink\"}},{id:\"yellow\",displayMetadata:{color:\"#E9FF8F\",name:\"yellow\"}}];let f=class i extends c.Base{constructor(i,s,a){super(i),e.set(this,void 0),t.set(this,void 0),n.set(this,void 0),this.getProvider=()=>o(this,n,\"f\").getValue(),this.interopClients=new Map,this.contextGroupsById=new Map,r(this,t,a.contextGroups??[...y],\"f\"),r(this,e,a.fdc3Info,\"f\"),a?.logging&&(this.logging=a.logging),this.intentClientMap=new Map,this.lastContextMap=new Map,this.sessionContextGroupMap=new Map,r(this,n,new w.Lazy(s),\"f\"),this.setContextGroupMap(),this.setupChannelProvider()}static createClosedConstructor(...e){return class extends i{constructor(...t){if(t.length){const[n,i,r]=t;if(r&&\"object\"==typeof r&&!(0,u.default)(r,e[2]))return console.warn(\"You have modified the parameters of the InteropOverride constructor. This behavior is deprecated and will be removed in a future version. You can modify these options in your manifest. Please consult our Interop docs for guidance on migrating to the new override scheme.\"),void super(e[0],e[1],r);console.warn(\"You are attempting to pass arguments to the InteropOverride constructor. This is not necessary, and these passed arguments will be ignored. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.\")}super(...e)}}}setContext({context:e},t){this.wire.sendAction(\"interop-broker-set-context\").catch((e=>{}));const n=this.getClientState(t);if(!n||!n.contextGroupId)throw n?new Error(\"You must join a context group before you can set context.\"):new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);{const{contextGroupId:t}=n;this.setContextForGroup({context:e},t)}}setContextForGroup({context:e},t){this.wire.sendAction(\"interop-broker-set-context-for-group\").catch((e=>{}));const n=this.contextGroupsById.get(t);if(!n)throw new Error(`Unable to set context for context group that isn't in the context group mapping: ${t}.`);const r=i.checkContextIntegrity(e);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(e)}`);const o=e.type;n.set(o,e),this.lastContextMap.set(t,o);Array.from(this.interopClients.values()).filter((e=>e.contextGroupId===t)).forEach((t=>{for(const[,n]of t.contextHandlers)i.isContextTypeCompatible(o,n.contextType)&&this.invokeContextHandler(t.clientIdentity,n.handlerId,e)}))}getCurrentContext(e,t){this.wire.sendAction(\"interop-broker-get-current-context\").catch((e=>{}));const n=this.getClientState(t);if(!n?.contextGroupId)throw new Error(\"You must be a member of a context group to call getCurrentContext\");const{contextGroupId:i}=n,r=this.contextGroupsById.get(i),o=this.lastContextMap.get(i),s=e?.contextType??o;return r&&s?r.get(s):void 0}async joinContextGroup({contextGroupId:e,target:t},n){if(this.wire.sendAction(\"interop-broker-join-context-group\").catch((e=>{})),this.sessionContextGroupMap.has(e))throw new Error(l.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup);if(t){i.hasEndpointId(t)&&await this.addClientToContextGroup({contextGroupId:e},t);try{const n=this.channel.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name));if(!n.length)throw new Error(`Given Identity ${t.uuid} ${t.name} is not connected to the Interop Broker.`);n.length>1&&console.warn(`More than one connection found for identity ${t.uuid} ${t.name}`);const i=[];for(const t of n)i.push(this.addClientToContextGroup({contextGroupId:e},t));await Promise.all(i)}catch(e){throw new Error(e)}}else await this.addClientToContextGroup({contextGroupId:e},n)}async addClientToContextGroup({contextGroupId:e},t){this.wire.sendAction(\"interop-broker-add-client-to-context-group\").catch((e=>{}));const n=this.getClientState(t);if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(!this.getContextGroups().find((t=>t.id===e)))throw new Error(`Attempting to join a context group that does not exist: ${e}. You may only join existing context groups.`);if(n.contextGroupId!==e){n.contextGroupId=e,await this.setCurrentContextGroupInClientOptions(t,e);const i=this.contextGroupsById.get(e);for(const[,e]of n.contextHandlers){const{contextType:n,handlerId:r}=e;if(void 0===n)i.forEach(((e,n)=>{this.invokeContextHandler(t,r,e)}));else if(i.has(n)){const e=i.get(n);e&&this.invokeContextHandler(t,r,e)}}}}async removeFromContextGroup({target:e},t){if(this.wire.sendAction(\"interop-broker-remove-from-context-group\").catch((e=>{})),e){i.hasEndpointId(e)&&await this.removeClientFromContextGroup(e);try{const t=this.channel.connections.filter((t=>t.uuid===e.uuid&&t.name===e.name));if(!t.length)throw new Error(`No connection found for given Identity ${e.uuid} ${e.name}`);t.length>1&&console.warn(`More than one connection found for identity ${e.uuid} ${e.name}`);const n=[];for(const e of t)n.push(this.removeClientFromContextGroup(e));await Promise.all(n)}catch(e){throw new Error(e)}}else await this.removeClientFromContextGroup(t)}async removeClientFromContextGroup(e){this.wire.sendAction(\"interop-broker-remove-client-from-context-group\").catch((e=>{}));const t=this.getClientState(e);t&&(t.contextGroupId=void 0),await this.setCurrentContextGroupInClientOptions(e,null)}getContextGroups(){return this.wire.sendAction(\"interop-broker-get-context-groups\").catch((e=>{})),o(this,t,\"f\").map((e=>({...e})))}getInfoForContextGroup({contextGroupId:e}){return this.wire.sendAction(\"interop-broker-get-info-for-context-group\").catch((e=>{})),this.getContextGroups().find((t=>t.id===e))}getAllClientsInContextGroup({contextGroupId:e}){this.wire.sendAction(\"interop-broker-get-all-clients-in-context-group\").catch((e=>{}));return Array.from(this.interopClients.values()).filter((t=>t.contextGroupId===e)).map((e=>e.clientIdentity))}async handleFiredIntent(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.raiseIntent\",\"InteropBroker.handleFiredIntent\",t,\"interopClient.fireIntent\");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntent)}async setIntentTarget(e,t){this.wire.sendAction(\"interop-broker-set-intent-target\").catch((e=>{}));const n=this.intentClientMap.get(t.name),i=`intent-handler-${e.name}`;if(n){const t=n.get(i);if(t){if(t.pendingIntents.push(e),t.clientIdentity&&t.isReady){const{clientIdentity:e,pendingIntents:n}=t;try{const r=n[n.length-1];await this.invokeIntentHandler(e,i,r),t.pendingIntents=[]}catch(n){console.error(`Error invoking intent handler for client ${e.uuid}/${e.name}/${e.endpointId}`),t.isReady=!1}}}else n.set(i,{isReady:!1,pendingIntents:[e]})}else{this.intentClientMap.set(t.name,new Map);const n=this.intentClientMap.get(t.name);n&&n.set(i,{isReady:!1,pendingIntents:[e]})}}async handleInfoForIntent(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.findIntent\",\"InteropBroker.handleInfoForIntent\",t,\"interopClient.getInfoForIntent\");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntent)}async handleInfoForIntentsByContext(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.findIntentsByContext\",\"InteropBroker.handleInfoForIntentsByContext\",t,\"interopClient.getInfoForIntentsByContext\");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntentsByContext)}async handleFiredIntentForContext(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.raiseIntentForContext\",\"InteropBroker.handleFiredIntentForContext\",t,\"interopClient.fireIntentForContext\");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntentForContext)}async clientDisconnected(e){}async fdc3HandleOpen({app:e,context:t},n){const i=(0,l.generateOverrideWarning)(\"fdc3.open\",\"InteropBroker.fdc3HandleOpen\",n);throw console.warn(i),new Error(l.BROKER_ERRORS.fdc3Open)}async fdc3HandleFindInstances(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.open\",\"InteropBroker.fdc3HandleFindInstances\",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3FindInstances)}async fdc3HandleGetAppMetadata(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.getAppMetadata\",\"InteropBroker.fdc3HandleGetAppMetadata\",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3GetAppMetadata)}async invokeContextHandler(e,t,n){const i=await this.getProvider();try{await i.dispatch(e,t,n)}catch(i){console.error(`Error invoking context handler ${t} for context type ${n.type} in client ${e.uuid}/${e.name}/${e.endpointId}`,i)}}async invokeIntentHandler(e,t,n){const i=await this.getProvider();await i.dispatch(e,t,n)}async fdc3HandleGetInfo(t,n){const{fdc3Version:i}=t;return{fdc3Version:i,...o(this,e,\"f\"),optionalFeatures:{OriginatingAppMetadata:!1,UserChannelMembershipAPIs:!0},appMetadata:{appId:\"\",instanceId:\"\"}}}async getAllClientInfo(){return(await this.getProvider()).getAllClientInfo()}decorateSnapshot(e){return{...e,interopSnapshotDetails:{contextGroupStates:this.getContextGroupStates()}}}applySnapshot(e,t){const n=e?.interopSnapshotDetails?.contextGroupStates;n&&(t?.closeExistingWindows||this.updateExistingClients(n),this.rehydrateContextGroupStates(n))}updateExistingClients(e){this.interopClients.forEach((t=>{const{clientIdentity:n,contextGroupId:r,contextHandlers:o}=t;if(r){const t=e[r];for(const[,e]of Object.entries(t))o.forEach((t=>{const{handlerId:r,contextType:o}=t;i.isContextTypeCompatible(e.type,o)&&this.invokeContextHandler(n,r,e)}))}}))}getContextGroupStates(){return i.toObject(this.contextGroupsById)}rehydrateContextGroupStates(e){const t=Object.entries(e);for(const[e,n]of t){const t=Object.entries(n);for(const[n,i]of t)if(this.contextGroupsById.has(e)){this.contextGroupsById.get(e).set(n,i)}else console.warn(`Attempting to set a context group that isn't in the context group mapping. Skipping context group rehydration for: ${e}`)}}contextHandlerRegistered({contextType:e,handlerId:t},n){const i={contextType:e,handlerId:t},r=this.getClientState(n);if(r?.contextHandlers.set(t,i),r&&r.contextGroupId){const{contextGroupId:i}=r,o=this.contextGroupsById.get(i);if(void 0===e)o.forEach(((e,i)=>{this.invokeContextHandler(n,t,e)}));else if(o.has(e)){const i=o.get(e);i&&this.invokeContextHandler(n,t,i)}}}async intentHandlerRegistered(e,t){const{handlerId:n}=e,i=this.intentClientMap.get(t.name),r=i?.get(n);if(i)if(r){const{pendingIntents:e}=r;r.clientIdentity=t,r.isReady=!0;try{if(e.length>0){const i=e[e.length-1];await this.invokeIntentHandler(t,n,i),r.pendingIntents=[]}}catch(e){console.error(`Error invoking intent handler: ${n} for client ${t.uuid}/${t.name}/${t.endpointId}`)}}else i.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t});else{this.intentClientMap.set(t.name,new Map);const e=this.intentClientMap.get(t.name);e&&e.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t})}}removeContextHandler({handlerId:e},t){const n=this.getClientState(t);n&&n.contextHandlers.delete(e)}handleJoinSessionContextGroup({sessionContextGroupId:e},t){try{if(!e)throw new Error(\"Failed to join session context group: must specify group id.\");const n=this.sessionContextGroupMap.get(e);if(n)n.registerNewClient(t);else{const n=new h.default(this.channel,e);n.registerNewClient(t),this.sessionContextGroupMap.set(e,n)}return{hasConflict:this.contextGroupsById.has(e)}}catch(e){throw new Error(e)}}getClientState(e){return this.interopClients.get(e.endpointId)}static toObject(e){const t=Object.fromEntries(e),n={};return Object.entries(t).forEach((([e,t])=>{const i=Object.fromEntries(t);n[e]=i})),n}static checkContextIntegrity(e){if(!e)return{isValid:!1,reason:\"No context supplied\"};if(\"object\"!=typeof e)return{isValid:!1,reason:\"Context must be an Object\"};if(!e.type)return{isValid:!1,reason:\"Context must have a type property\"};if(e.id&&\"object\"!=typeof e.id)return{isValid:!1,reason:\"Context id must be an Object populated with key-value identifiers (if set)\"};if(e.id){const{id:t}=e,n=Object.keys(t);let i=!1;if(!n.length)return{isValid:!1,reason:\"Context id must have at least one key-value identifier\"};if(n.forEach((e=>{\"string\"==typeof e&&\"string\"==typeof t[e]||(i=!0)})),i)return{isValid:!1,reason:\"Context id key-value identifiers must be of type string\"}}return e.name&&\"string\"!=typeof e.name?{isValid:!1,reason:\"Context name must be of string type (if set)\"}:{isValid:!0}}static hasEndpointId(e){return void 0!==e.endpointId}static isContextTypeCompatible(e,t){return void 0===t||e===t}setContextGroupMap(){for(const e of this.getContextGroups())this.contextGroupsById.set(e.id,new Map)}async setCurrentContextGroupInClientOptions(e,t){try{const n=await this.fin.System.getEntityInfo(e.uuid,e.name);let i;\"view\"===n.entityType?i=await this.fin.View.wrap(e):\"window\"===n.entityType&&(i=await this.fin.Window.wrap(e)),i&&await i.updateOptions({interop:{currentContextGroup:t}})}catch(e){}}async setupChannelProvider(){try{const e=await this.getProvider();this.channel=e,this.wireChannel(e)}catch(e){throw new Error(`Error setting up Interop Broker Channel Provider: ${e}`)}}wireChannel(e){e.onConnection((async(e,t)=>{if(!await this.isConnectionAuthorized(e,t))throw new Error(`Connection not authorized for ${e.uuid}, ${e.name}`);if(!e.endpointId)throw new Error(\"Version too old to be compatible with Interop. Please upgrade your runtime to a more recent version.\");const n={contextGroupId:void 0,contextHandlers:new Map,clientIdentity:e};t?.currentContextGroup&&this.contextGroupsById.has(t.currentContextGroup)&&(n.contextGroupId=t?.currentContextGroup),this.interopClients.set(e.endpointId,n)})),e.onDisconnection((e=>{this.interopClients.delete(e.endpointId);const t=this.intentClientMap.get(e.name);t&&e.uuid===this.fin.me.uuid&&t.forEach((e=>{e.isReady=!1})),this.sessionContextGroupMap.forEach((t=>{t.onDisconnection(e)})),this.clientDisconnected(e)})),e.beforeAction((async(e,t,n)=>{if(!await this.isActionAuthorized(e,t,n))throw new Error(`Action (${e}) not authorized for ${n.uuid}, ${n.name}`);this.logging?.beforeAction?.enabled&&console.log(e,t,n)})),e.afterAction(((e,t,n)=>{this.logging?.afterAction?.enabled&&console.log(e,t,n)})),e.register(\"setContext\",this.setContext.bind(this)),e.register(\"fireIntent\",this.handleFiredIntent.bind(this)),e.register(\"getCurrentContext\",this.getCurrentContext.bind(this)),e.register(\"getInfoForIntent\",this.handleInfoForIntent.bind(this)),e.register(\"getInfoForIntentsByContext\",this.handleInfoForIntentsByContext.bind(this)),e.register(\"fireIntentForContext\",this.handleFiredIntentForContext.bind(this)),e.register(\"getContextGroups\",this.getContextGroups.bind(this)),e.register(\"joinContextGroup\",this.joinContextGroup.bind(this)),e.register(\"removeFromContextGroup\",this.removeFromContextGroup.bind(this)),e.register(\"getAllClientsInContextGroup\",this.getAllClientsInContextGroup.bind(this)),e.register(\"getInfoForContextGroup\",this.getInfoForContextGroup.bind(this)),e.register(\"contextHandlerRegistered\",this.contextHandlerRegistered.bind(this)),e.register(\"intentHandlerRegistered\",this.intentHandlerRegistered.bind(this)),e.register(\"removeContextHandler\",this.removeContextHandler.bind(this)),e.register(\"sessionContextGroup:createIfNeeded\",this.handleJoinSessionContextGroup.bind(this)),e.register(\"fdc3Open\",this.fdc3HandleOpen.bind(this)),e.register(\"fdc3v2FindIntentsByContext\",this.handleInfoForIntentsByContext.bind(this)),e.register(\"fdc3FindInstances\",this.fdc3HandleFindInstances.bind(this)),e.register(\"fdc3GetAppMetadata\",this.fdc3HandleGetAppMetadata.bind(this)),e.register(\"fdc3v2GetInfo\",(async(e,t)=>this.fdc3HandleGetInfo.bind(this)(e,t))),e.register(\"createPrivateChannelProvider\",(async e=>{const{channelId:t}=e,n=await this.fin.InterApplicationBus.Channel.create(t);p.PrivateChannelProvider.init(n,t)}))}isConnectionAuthorized(e,t){return this.wire.sendAction(\"interop-broker-is-connection-authorized\").catch((e=>{})),Promise.resolve(!0)}isActionAuthorized(e,t,n){return this.wire.sendAction(\"interop-broker-is-action-authorized\").catch((e=>{})),Promise.resolve(!0)}};return Gi.InteropBroker=f,e=new WeakMap,t=new WeakMap,n=new WeakMap,Gi}var zi,Ki={},qi={},Ji=s&&s.__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},Yi=s&&s.__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)};Object.defineProperty(qi,\"__esModule\",{value:!0});const Zi=d,Qi=Hi;class Xi extends Zi.Base{constructor(e,t,n){super(e),zi.set(this,void 0),this.id=n,Ji(this,zi,t,\"f\")}async setContext(e){this.wire.sendAction(\"interop-session-context-group-set-context\").catch((e=>{}));return(await Yi(this,zi,\"f\")).dispatch(`sessionContextGroup:setContext-${this.id}`,{sessionContextGroupId:this.id,context:e})}async getCurrentContext(e){this.wire.sendAction(\"interop-session-context-group-get-context\").catch((e=>{}));return(await Yi(this,zi,\"f\")).dispatch(`sessionContextGroup:getContext-${this.id}`,{sessionContextGroupId:this.id,type:e})}async addContextHandler(e,t){if(this.wire.sendAction(\"interop-session-context-group-add-handler\").catch((e=>{})),\"function\"!=typeof e)throw new Error(\"Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.\");const n=await Yi(this,zi,\"f\");let i;return i=t?`sessionContextHandler:invoke-${this.id}-${t}-${(0,Qi.generateId)()}`:`sessionContextHandler:invoke-${this.id}`,n.register(i,(0,Qi.wrapContextHandler)(e,i)),await n.dispatch(`sessionContextGroup:handlerAdded-${this.id}`,{handlerId:i,contextType:t}),{unsubscribe:await this.createUnsubscribeCb(i)}}async createUnsubscribeCb(e){const t=await Yi(this,zi,\"f\");return async()=>{t.remove(e),await t.dispatch(`sessionContextGroup:handlerRemoved-${this.id}`,{handlerId:e})}}getUserInstance(){return{id:this.id,setContext:(0,Qi.wrapInTryCatch)(this.setContext.bind(this),\"Failed to set context: \"),getCurrentContext:(0,Qi.wrapInTryCatch)(this.getCurrentContext.bind(this),\"Failed to get context: \"),addContextHandler:(0,Qi.wrapInTryCatch)(this.addContextHandler.bind(this),\"Failed to add context handler: \")}}}qi.default=Xi,zi=new WeakMap;var er={},tr={},nr={},ir={},rr=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),or=s&&s.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,\"default\",{enumerable:!0,value:t})}:function(e,t){e.default=t}),sr=s&&s.__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)&&rr(t,e,n);return or(t,e),t};Object.defineProperty(ir,\"__esModule\",{value:!0}),ir.PrivateChannelClient=void 0;const ar=sr(Hi);var cr,dr;function hr(){if(cr)return tr;cr=1;var e,t=s&&s.__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)},n=s&&s.__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},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(tr,\"__esModule\",{value:!0}),tr.FDC3ModuleBase=void 0;const o=nr,a=Hi,c=wr(),d=r(i);return tr.FDC3ModuleBase=class{get client(){return t(this,e,\"f\").call(this)}get fin(){return this.wire.getFin()}constructor(t,i){this.wire=i,e.set(this,void 0),n(this,e,t,\"f\")}async broadcast(e){return this.wire.sendAction(\"fdc3-broadcast\").catch((e=>{})),this.client.setContext(e)}async _open(e,t){this.wire.sendAction(\"fdc3-open\").catch((e=>{}));try{return await c.InteropClient.ferryFdc3Call(this.client,\"fdc3Open\",{app:e,context:t})}catch(e){const t=e.message===a.BROKER_ERRORS.fdc3Open?\"ResolverUnavailable\":e.message;throw new Error(t)}}async _getChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:\"system\",...(0,o.getUnsupportedChannelApis)()})))}async getOrCreateChannel(e){this.wire.sendAction(\"fdc3-get-or-create-channel\").catch((e=>{}));const t=(await this._getChannels()).find((t=>t.id===e));if(t)return{...t,type:\"system\",...(0,o.getUnsupportedChannelApis)()};try{const t=await this.client.joinSessionContextGroup(e);return(0,o.buildAppChannelObject)(t)}catch(e){throw console.error(e.message),new Error(o.ChannelError.CreationFailed)}}async getSystemChannels(){return this.wire.sendAction(\"fdc3-get-system-channels\").catch((e=>{})),this._getChannels()}async joinChannel(e){this.wire.sendAction(\"fdc3-join-channel\").catch((e=>{}));try{return await this.client.joinContextGroup(e)}catch(e){if(e.message===a.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup?console.error(\"The Channel you have tried to join is an App Channel. Custom Channels can only be defined by the Interop Broker through code or manifest configuration. Please use getOrCreateChannel.\"):console.error(e.message),e.message.startsWith(\"Attempting to join a context group that does not exist\"))throw new Error(o.ChannelError.NoChannelFound);throw new Error(o.ChannelError.AccessDenied)}}async getCurrentChannel(){this.wire.sendAction(\"fdc3-get-current-channel\").catch((e=>{}));const e=await this.getCurrentContextGroupInfo();return e?this.buildChannelObject(e):null}async leaveCurrentChannel(){return this.wire.sendAction(\"fdc3-leave-current-channel\").catch((e=>{})),this.client.removeFromContextGroup()}async getCurrentContextGroupInfo(){const e=await this.client.getContextGroups(),t=e.map((async e=>this.client.getAllClientsInContextGroup(e.id))),n=(await Promise.all(t)).findIndex((e=>e.some((e=>{const{uuid:t,name:n}=e;return this.wire.me.uuid===t&&this.wire.me.name===n}))));return e[n]}async buildChannelObject(e){return{...e,type:\"system\",addContextListener:(...[e,t])=>{let n,i;\"function\"==typeof e?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),n=e):(n=t,\"string\"==typeof e&&(i=e));const r=(async()=>{let e=!0;const t=await this.client.getCurrentContext(i);return this.client.addContextHandler(((i,r)=>{if(!e||(e=!1,!(0,d.default)(t,i)))return n(i,r)}),i)})();return{...r,unsubscribe:()=>r.then((e=>e.unsubscribe()))}},broadcast:this.broadcast.bind(this),getCurrentContext:async e=>{const t=await this.client.getCurrentContext(e);return void 0===t?null:t}}}},e=new WeakMap,tr}ir.PrivateChannelClient=class{constructor(e,t){this.id=t,this.client=e,this.listeners=new Map}async broadcast(e){return this.client.dispatch(\"broadcast\",{context:e})}async getCurrentContext(e){return this.client.dispatch(\"getCurrentContext\",{contextType:e})}async addContextListener(e,t){if(\"function\"!=typeof t)throw new Error(\"Non-function argument passed to the second parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.\");let n;n=e?`contextHandler:invoke-${this.id}-${e}-${ar.generateId()}`:`contextHandler:invoke-${this.id}-${ar.generateId()}`,this.client.register(n,ar.wrapContextHandler(t,n));const i={unsubscribe:await this.createContextUnsubscribeCb(n)};return this.listeners.set(n,i),await this.client.dispatch(\"contextHandlerAdded\",{handlerId:n,contextType:e}),i}createNonStandardUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch(\"nonStandardHandlerRemoved\",{handlerId:e})}}createContextUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch(\"contextHandlerRemoved\",{handlerId:e})}}onAddContextListener(e){const t=`onContextHandlerAdded:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch(\"onAddContextHandlerAdded\",{handlerId:t}),n}onDisconnect(e){const t=`onDisconnect:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch(\"onDisconnectHandlerAdded\",{handlerId:t}),n}onUnsubscribe(e){const t=`onUnsubscribe:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch(\"onUnsubscribeHandlerAdded\",{handlerId:t}),n}async cleanUpAllSubs(){Array.from(this.listeners.keys()).forEach((e=>{this.client.remove(e),this.listeners.delete(e)}))}async disconnect(){try{await this.client.dispatch(\"clientDisconnecting\"),await this.cleanUpAllSubs(),await this.client.disconnect()}catch(e){throw new Error(e.message)}}},function(e){var t=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,\"__esModule\",{value:!0}),e.getIntentResolution=e.isChannel=e.isContext=e.connectPrivateChannel=e.buildAppChannelObject=e.buildPrivateChannelObject=e.ChannelError=e.ResultError=e.UnsupportedChannelApiError=e.getUnsupportedChannelApis=void 0;const n=Hi,r=ir,o=t(i);e.getUnsupportedChannelApis=e=>({addContextListener:()=>{throw new a(\"Channel.addContextListener\",e)},broadcast:()=>{throw new a(\"Channel.broadcast\",e)},getCurrentContext:()=>{throw new a(\"Channel.getCurrentContext\",e)}});class a extends Error{constructor(e,t=\"System\"){super(e),this.message=`Calling ${e} on an instance of a ${t} Channel returned by fdc3.get${t}Channels is not supported. If you would like to use a ${t} Channel, please use fdc3.joinChannel, fdc3.addContextListener, and fdc3.broadcast instead.`}}var c,d;e.UnsupportedChannelApiError=a,function(e){e.NoResultReturned=\"NoResultReturned\",e.IntentHandlerRejected=\"IntentHandlerRejected\"}(c=e.ResultError||(e.ResultError={})),(d=e.ChannelError||(e.ChannelError={})).NoChannelFound=\"NoChannelFound\",d.AccessDenied=\"AccessDenied\",d.CreationFailed=\"CreationFailed\";e.buildPrivateChannelObject=e=>{let t=!1;const n=()=>{if(t)throw new Error(\"Private Channel Client has been disconnected from the Private Channel\")};return{id:e.id,type:\"private\",broadcast:async t=>(n(),e.broadcast(t)),getCurrentContext:async t=>(n(),e.getCurrentContext(t)),addContextListener:async(t,i)=>{n();let r=i,o=t;\"function\"==typeof t&&(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),r=t,o=null);return e.addContextListener(o,r)},onAddContextListener:t=>(n(),e.onAddContextListener(t)),disconnect:async()=>(n(),t=!0,e.disconnect()),onDisconnect:t=>(n(),e.onDisconnect(t)),onUnsubscribe:t=>(n(),e.onUnsubscribe(t))}};e.buildAppChannelObject=e=>({id:e.id,type:\"app\",broadcast:e.setContext,getCurrentContext:async t=>{const n=await e.getCurrentContext(t);return void 0===n?null:n},addContextListener:(t,n)=>{let i,r;\"function\"==typeof t?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),i=t):(i=n,\"string\"==typeof t&&(r=t));const s=(async()=>{let t=!0;const n=await e.getCurrentContext(r);return e.addContextHandler(((e,r)=>{if(!t||(t=!1,!(0,o.default)(n,e)))return i(e,r)}),r)})();return{...s,unsubscribe:()=>s.then((e=>e.unsubscribe()))}}});e.connectPrivateChannel=async t=>{try{const n=await fin.InterApplicationBus.Channel.connect(t),i=new r.PrivateChannelClient(n,t);return(0,e.buildPrivateChannelObject)(i)}catch(e){throw new Error(`Private Channel with id: ${t} doesn't exist`)}};e.isContext=e=>{if(e&&\"object\"==typeof e&&\"type\"in e){const{type:t}=e;return\"string\"==typeof t}return!1};e.isChannel=e=>{if(e&&\"object\"==typeof e&&\"type\"in e&&\"id\"in e){const{type:t,id:n}=e;return\"string\"==typeof t&&\"string\"==typeof n&&(\"app\"===t||\"private\"===t)}return!1};e.getIntentResolution=async(t,i,r,o)=>{const s=(0,n.generateId)(),a=new Promise(((e,t)=>{fin.InterApplicationBus.subscribe({uuid:\"*\"},s,(t=>{e(t)})).catch((()=>t(new Error(\"getResult is not supported in this environment\"))))})),d=r?{target:r,intentResolutionResultId:s}:{intentResolutionResultId:s},h=o?{name:o,context:i,metadata:d}:{...i,metadata:d},l=async()=>{let n=await a;if(!n||\"object\"!=typeof n)throw new Error(c.NoResultReturned);const{error:i}=n;if(i)throw new Error(c.IntentHandlerRejected);if((0,e.isChannel)(n)){const{id:i,type:r}=n;switch(r){case\"private\":n=await(0,e.connectPrivateChannel)(i);break;case\"app\":{const r=await t.joinSessionContextGroup(i);n=(0,e.buildAppChannelObject)(r);break}}}else if(!(0,e.isContext)(n))throw new Error(c.NoResultReturned);return n},u=o?await t.fireIntent(h):await t.fireIntentForContext(h);return\"object\"!=typeof u?{source:{appId:\"\",instanceId:\"\"},intent:\"\",version:\"2.0\",getResult:l}:{...u,getResult:l}}}(nr);var lr,ur,pr={};function wr(){if(ur)return Ki;ur=1;var e,t,n=s&&s.__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},i=s&&s.__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)},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ki,\"__esModule\",{value:!0}),Ki.InteropClient=void 0;const o=d,a=r(qi),c=function(){if(dr)return er;dr=1,Object.defineProperty(er,\"__esModule\",{value:!0}),er.Fdc3Module=void 0;const e=Hi,t=hr();class n extends t.FDC3ModuleBase{async open(e,t){await super._open(e,t)}addContextListener(e,t){let n;return this.wire.sendAction(\"fdc3-add-context-listener\").catch((e=>{})),\"function\"==typeof e?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),n=this.client.addContextHandler(e)):n=this.client.addContextHandler(t,null===e?void 0:e),{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}addIntentListener(e,t){this.wire.sendAction(\"fdc3-add-intent-listener\").catch((e=>{}));const n=this.client.registerIntentHandler((e=>{const{context:n,metadata:i}=e,{metadata:r}=n,o=i?.intentResolutionResultId||r?.intentResolutionResultId;o&&this.fin.InterApplicationBus.publish(o,null).catch((()=>null)),t(e.context)}),e,{fdc3Version:\"1.2\"});return{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}async raiseIntent(t,n,i){this.wire.sendAction(\"fdc3-raise-intent\").catch((e=>{}));const r=i?{name:t,context:n,metadata:{target:i}}:{name:t,context:n};try{return await this.client.fireIntent(r)}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntent?\"ResolverUnavailable\":t.message;throw new Error(n)}}async findIntent(t,n){this.wire.sendAction(\"fdc3-find-intent\").catch((e=>{}));try{return await this.client.getInfoForIntent({name:t,context:n})}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntent?\"ResolverUnavailable\":t.message;throw new Error(n)}}async findIntentsByContext(t){this.wire.sendAction(\"fdc3-find-intents-by-context\").catch((e=>{}));try{return await this.client.getInfoForIntentsByContext(t)}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntentsByContext?\"ResolverUnavailable\":t.message;throw new Error(n)}}async raiseIntentForContext(t,n){this.wire.sendAction(\"fdc3-raise-intent-for-context\").catch((e=>{}));try{return await this.client.fireIntentForContext({...t,metadata:{target:n}})}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntentForContext?\"ResolverUnavailable\":t.message;throw new Error(n)}}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}getInfo(){return this.wire.sendAction(\"fdc3-get-info\").catch((e=>{})),{providerVersion:this.wire.environment.getAdapterVersionSync(),provider:`openfin-${this.wire.me.uuid}`,fdc3Version:\"1.2\"}}}return er.Fdc3Module=n,er}(),h=function(){if(lr)return pr;lr=1,Object.defineProperty(pr,\"__esModule\",{value:!0}),pr.Fdc3Module2=void 0;const e=hr(),t=Hi,n=wr(),i=nr,r=ir;class o extends e.FDC3ModuleBase{async open(e,t){return\"string\"==typeof e&&console.warn(\"Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).\"),super._open(e,t)}async findInstances(e){this.wire.sendAction(\"fdc3-find-instances\").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,\"fdc3FindInstances\",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3FindInstances?\"ResolverUnavailable\":e.message;throw new Error(n)}}async getAppMetadata(e){this.wire.sendAction(\"fdc3-get-app-metadata\").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,\"fdc3GetAppMetadata\",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3GetAppMetadata?\"ResolverUnavailable\":e.message;throw new Error(n)}}async addContextListener(e,t){this.wire.sendAction(\"fdc3-add-context-listener\").catch((e=>{}));const n=e=>t=>{const{contextMetadata:n,...i}=t,r=n?[{...i},n]:[t,null];e(...r)};let i=t,r=n(i);return\"function\"==typeof e?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),i=e,r=n(i),this.client.addContextHandler(r)):this.client.addContextHandler(r,null===e?void 0:e)}async findIntent(e,n,i){this.wire.sendAction(\"fdc3-find-intent\").catch((e=>{}));try{return await this.client.getInfoForIntent({name:e,context:n,metadata:{resultType:i}})}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntent?\"ResolverUnavailable\":e.message;throw new Error(n)}}async findIntentsByContext(e,i){this.wire.sendAction(\"fdc3-find-intents-by-context\").catch((e=>{}));const r=i?{context:e,metadata:{resultType:i}}:e;try{return await n.InteropClient.ferryFdc3Call(this.client,\"fdc3v2FindIntentsByContext\",r)}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntentsByContext?\"ResolverUnavailable\":e.message;throw new Error(n)}}async raiseIntent(e,n,r){this.wire.sendAction(\"fdc3-raise-intent\").catch((e=>{}));try{return\"string\"==typeof r&&console.warn(\"Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).\"),(0,i.getIntentResolution)(this.client,n,r,e)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?\"ResolverUnavailable\":e.message;throw new Error(n)}}async raiseIntentForContext(e,n){this.wire.sendAction(\"fdc3-raise-intent-for-context\").catch((e=>{}));try{return\"string\"==typeof n&&console.warn(\"Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).\"),(0,i.getIntentResolution)(this.client,e,n)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?\"ResolverUnavailable\":e.message;throw new Error(n)}}async addIntentListener(e,t){if(this.wire.sendAction(\"fdc3-add-intent-listener\").catch((e=>{})),\"string\"!=typeof e)throw new Error(\"First argument must be an Intent name\");return this.client.registerIntentHandler((async e=>{let n,i;const{context:r,metadata:o}=e,{contextMetadata:s,metadata:a,...c}=r,d=o?.intentResolutionResultId||a?.intentResolutionResultId;try{const e=a?{metadata:a,...c}:{...c};n=await t(e,s),i=n}catch(e){n=e,i={error:!0}}if(d&&this.fin.InterApplicationBus.publish(d,i).catch((()=>null)),n instanceof Error)throw new Error(n.message);return n}),e,{fdc3Version:\"2.0\"})}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}async createPrivateChannel(){const e=(0,t.generateId)();await n.InteropClient.ferryFdc3Call(this.client,\"createPrivateChannelProvider\",{channelId:e});const o=await this.fin.InterApplicationBus.Channel.connect(e),s=new r.PrivateChannelClient(o,e);return(0,i.buildPrivateChannelObject)(s)}async getUserChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:\"user\",...(0,i.getUnsupportedChannelApis)(\"User\")})))}async getSystemChannels(){return console.warn(\"This API has been deprecated. Please use fdc3.getUserChannels instead.\"),super.getSystemChannels()}async joinUserChannel(e){return super.joinChannel(e)}async joinChannel(e){return console.warn(\"This API has been deprecated. Please use fdc3.joinUserChannel instead.\"),super.joinChannel(e)}async getCurrentChannel(){const e=await super.getCurrentChannel();return e?{...e,type:\"user\",broadcast:this.broadcast.bind(this)}:null}async getInfo(){return n.InteropClient.ferryFdc3Call(this.client,\"fdc3v2GetInfo\",{fdc3Version:\"2.0\"})}}return pr.Fdc3Module2=o,pr}(),l=Hi;let u=class extends o.Base{constructor(i,r){super(i),e.set(this,void 0),t.set(this,void 0),n(this,t,new Map,\"f\"),n(this,e,r,\"f\")}async setContext(t){this.wire.sendAction(\"interop-client-set-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"setContext\",{context:t})}async addContextHandler(t,n){if(this.wire.sendAction(\"interop-client-add-context-handler\").catch((e=>{})),\"function\"!=typeof t)throw new Error(\"Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.\");const r=await i(this,e,\"f\");let o;o=n?`invokeContextHandler-${n}-${(0,l.generateId)()}`:\"invokeContextHandler\";const s=(0,l.wrapContextHandler)(t,o);return r.register(o,s),await r.dispatch(\"contextHandlerRegistered\",{handlerId:o,contextType:n}),{unsubscribe:async()=>{r.remove(o),await r.dispatch(\"removeContextHandler\",{handlerId:o})}}}async getContextGroups(){this.wire.sendAction(\"interop-client-get-context-groups\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getContextGroups\")}async joinContextGroup(t,n){this.wire.sendAction(\"interop-client-join-context-group\").catch((e=>{}));const r=await i(this,e,\"f\");if(!t)throw new Error(\"No contextGroupId specified for joinContextGroup.\");return r.dispatch(\"joinContextGroup\",{contextGroupId:t,target:n})}async removeFromContextGroup(t){this.wire.sendAction(\"interop-client-remove-from-context-group\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"removeFromContextGroup\",{target:t})}async getAllClientsInContextGroup(t){this.wire.sendAction(\"interop-client-get-all-clients-in-context-group\").catch((e=>{}));const n=await i(this,e,\"f\");if(!t)throw new Error(\"No contextGroupId specified for getAllClientsInContextGroup.\");return n.dispatch(\"getAllClientsInContextGroup\",{contextGroupId:t})}async getInfoForContextGroup(t){this.wire.sendAction(\"interop-client-get-info-for-context-group\").catch((e=>{}));const n=await i(this,e,\"f\");if(!t)throw new Error(\"No contextGroupId specified for getInfoForContextGroup.\");return n.dispatch(\"getInfoForContextGroup\",{contextGroupId:t})}async fireIntent(t){this.wire.sendAction(\"interop-client-fire-intent\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"fireIntent\",t)}async registerIntentHandler(t,n,r){this.wire.sendAction(\"interop-client-register-intent-handler\").catch((e=>{}));const o=await i(this,e,\"f\"),s=`intent-handler-${n}`,a=(0,l.wrapIntentHandler)(t,s);try{await o.register(s,a),await o.dispatch(\"intentHandlerRegistered\",{handlerId:s,...r})}catch(e){throw new Error(\"Unable to register intent handler\")}return{unsubscribe:async()=>{o.remove(s)}}}async getCurrentContext(t){this.wire.sendAction(\"interop-client-get-current-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getCurrentContext\",{contextType:t})}async getInfoForIntent(t){this.wire.sendAction(\"interop-client-get-info-for-intent\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getInfoForIntent\",t)}async getInfoForIntentsByContext(t){this.wire.sendAction(\"interop-client-get-info-for-intents-by-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getInfoForIntentsByContext\",t)}async fireIntentForContext(t){this.wire.sendAction(\"interop-client-fire-intent-for-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"fireIntentForContext\",t)}async joinSessionContextGroup(n){try{const r=i(this,t,\"f\").get(n);if(r)return r.getUserInstance();const o=await i(this,e,\"f\"),{hasConflict:s}=await o.dispatch(\"sessionContextGroup:createIfNeeded\",{sessionContextGroupId:n});s&&console.warn(`A (non-session) context group with the name \"${n}\" already exists. If you are trying to join a Context Group, call joinContextGroup instead.`);const c=new a.default(this.wire,i(this,e,\"f\"),n);return i(this,t,\"f\").set(n,c),c.getUserInstance()}catch(e){throw console.error(`Error thrown trying to create Session Context Group with id \"${n}\": ${e}`),e}}async onDisconnection(t){this.wire.sendAction(\"interop-client-add-ondisconnection-listener\").catch((e=>{}));return(await i(this,e,\"f\")).onDisconnection((e=>{const{uuid:n}=e;t({type:\"interop-broker\",topic:\"disconnected\",brokerName:n})}))}getFDC3Sync(e){switch(e){case\"1.2\":return new c.Fdc3Module((()=>this),this.wire);case\"2.0\":return new h.Fdc3Module2((()=>this),this.wire);default:throw new Error(`Invalid FDC3 version provided: ${e}. Must be '1.2' or '2.0'`)}}async getFDC3(e){return this.getFDC3Sync(e)}static async ferryFdc3Call(t,n,r){return(await i(t,e,\"f\")).dispatch(n,r||null)}};return Ki.InteropClient=u,e=new WeakMap,t=new WeakMap,Ki}var yr,fr,gr,mr={};function vr(){if(yr)return mr;yr=1,Object.defineProperty(mr,\"__esModule\",{value:!0}),mr.overrideCheck=mr.checkFDC32Overrides=mr.getDefaultViewFdc3VersionFromAppInfo=void 0;const e=Vi();function t(t){return[\"fdc3HandleFindInstances\",\"handleInfoForIntent\",\"handleInfoForIntentsByContext\",\"fdc3HandleGetAppMetadata\",\"fdc3HandleGetInfo\",\"fdc3HandleOpen\",\"handleFiredIntent\",\"handleFiredIntentForContext\"].filter((n=>t[n]===e.InteropBroker.prototype[n]))}return mr.getDefaultViewFdc3VersionFromAppInfo=function({manifest:e,initialOptions:t}){const n=e?.platform?.defaultViewOptions?.fdc3InteropApi??t.defaultViewOptions?.fdc3InteropApi;return[\"1.2\",\"2.0\"].includes(n??\"\")?n:void 0},mr.checkFDC32Overrides=t,mr.overrideCheck=function(e,n){if(n&&\"2.0\"===n){const n=t(e);n.length>0&&console.warn(`WARNING: FDC3 2.0 has been set as a default option for Views in this Platform, but the required InteropBroker APIs for FDC3 2.0 compliance have not all been overridden.\\nThe following APIs need to be overridden:\\n${n.join(\"\\n\")}`)}},mr}function Cr(){return gr||(gr=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),i=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),i(function(){if(fr)return Ti;fr=1;var e=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ti,\"__esModule\",{value:!0}),Ti.InteropModule=void 0;const t=e(n),i=$i,r=d,o=Vi(),a=wr(),c=vr(),h=Tn,l=e=>new e,u=\"You have attempted to use or modify InteropBroker parameters, which is not allowed. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.\";class p extends r.Base{async init(e,n=l){this.wire.sendAction(\"interop-init\").catch((()=>{}));const r=await this.wire.environment.getInteropInfo(this.wire.getFin()),s=(0,i.createUnusableObject)(u),a=(0,i.createWarningObject)(u,(0,t.default)(r)),d=async()=>{throw new Error(u)},p=o.InteropBroker.createClosedConstructor(this.wire,(()=>this.fin.InterApplicationBus.Channel.create(`interop-broker-${e}`)),r);let w;return w=Array.isArray(n)?new((0,h.overrideFromComposables)(...n)(p))(s,d,a):await n(p,s,d,a),(0,c.overrideCheck)(w,r.fdc3Version),w}connectSync(e,t){return this.wire.sendAction(\"interop-connect-sync\").catch((()=>{})),new a.InteropClient(this.wire,this.wire.environment.whenReady().then((()=>this.fin.InterApplicationBus.Channel.connect(`interop-broker-${e}`,{payload:t}))))}}return Ti.InteropModule=p,Ti}(),e),i(wr(),e),i(Vi(),e)}(Li)),Li}var br={},Ir={},Er={},xr={};Object.defineProperty(xr,\"__esModule\",{value:!0}),xr.getSnapshotSourceChannelName=void 0;xr.getSnapshotSourceChannelName=e=>`snapshot-source-provider-${e.uuid}`;var Ar,Pr,Mr,_r,Or,Sr=s&&s.__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},Rr=s&&s.__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)};Object.defineProperty(Er,\"__esModule\",{value:!0}),Er.SnapshotSource=void 0;const Fr=d,jr=xr,kr=new Map;class Lr extends Fr.Base{constructor(e,t){super(e),Ar.set(this,void 0),Pr.set(this,(()=>(kr.has(this.identity.uuid)||kr.set(this.identity.uuid,{eventFired:null,clientPromise:null}),kr.get(this.identity.uuid)))),Mr.set(this,(()=>(Rr(this,Pr,\"f\").call(this).clientPromise||(Rr(this,Pr,\"f\").call(this).clientPromise=Rr(this,_r,\"f\").call(this)),Rr(this,Pr,\"f\").call(this).clientPromise))),_r.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);try{Rr(this,Pr,\"f\").call(this).eventFired||await Rr(this,Or,\"f\").call(this);const t=await this.fin.InterApplicationBus.Channel.connect(e,{wait:!1});return t.onDisconnection((()=>{Rr(this,Pr,\"f\").call(this).clientPromise=null,Rr(this,Pr,\"f\").call(this).eventFired=null})),t}catch(e){throw Rr(this,Pr,\"f\").call(this).clientPromise=null,new Error(\"The targeted SnapshotSource is not currently initialized. Await this object's ready() method.\")}})),Or.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);let t,n;const i=new Promise(((e,i)=>{t=e,n=i}));Rr(this,Pr,\"f\").call(this).eventFired=i;const r=async i=>{try{i.channelName===e&&(t(),await this.fin.InterApplicationBus.Channel.removeListener(\"connected\",r))}catch(e){n(e)}};await this.fin.InterApplicationBus.Channel.on(\"connected\",r)})),Sr(this,Ar,t,\"f\")}get identity(){return Rr(this,Ar,\"f\")}async ready(){this.wire.sendAction(\"snapshot-source-ready\").catch((e=>{}));try{await Rr(this,Mr,\"f\").call(this)}catch(e){await Rr(this,Pr,\"f\").call(this).eventFired}}async getSnapshot(){this.wire.sendAction(\"snapshot-source-get-snapshot\").catch((e=>{}));const e=await Rr(this,Mr,\"f\").call(this),t=await e.dispatch(\"get-snapshot\");return(await t).snapshot}async applySnapshot(e){this.wire.sendAction(\"snapshot-source-apply-snapshot\").catch((e=>{}));return(await Rr(this,Mr,\"f\").call(this)).dispatch(\"apply-snapshot\",{snapshot:e})}}Er.SnapshotSource=Lr,Ar=new WeakMap,Pr=new WeakMap,Mr=new WeakMap,_r=new WeakMap,Or=new WeakMap,Object.defineProperty(Ir,\"__esModule\",{value:!0}),Ir.SnapshotSourceModule=void 0;const Tr=d,$r=Er,Br=xr;class Gr extends Tr.Base{async init(e){if(this.wire.sendAction(\"snapshot-source-init\").catch((e=>{})),\"object\"!=typeof e||\"function\"!=typeof e.getSnapshot||\"function\"!=typeof e.applySnapshot)throw new Error(\"you must pass in a valid SnapshotProvider\");const t=await this.fin.InterApplicationBus.Channel.create((0,Br.getSnapshotSourceChannelName)(this.fin.me));t.register(\"get-snapshot\",(async()=>({snapshot:await e.getSnapshot()}))),t.register(\"apply-snapshot\",(({snapshot:t})=>e.applySnapshot(t)))}wrapSync(e){return this.wire.sendAction(\"snapshot-source-wrap-sync\").catch((e=>{})),new $r.SnapshotSource(this.wire,e)}async wrap(e){return this.wire.sendAction(\"snapshot-source-wrap\").catch((e=>{})),this.wrapSync(e)}}Ir.SnapshotSourceModule=Gr,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Ir,e),n(Er,e)}(br),Object.defineProperty(a,\"__esModule\",{value:!0});var Wr=a.Fin=void 0;const Hr=t,Nr=c,Dr=ie(),Ur=Z(),Vr=de,zr=en,Kr=rn,qr=un,Jr=bn,Yr=J(),Zr=An,Qr=ki,Xr=Cr(),eo=br;class to extends Hr.EventEmitter{constructor(e){super(),this.wire=e,this.System=new Nr.System(e),this.Window=new Dr._WindowModule(e),this.Application=new Ur.ApplicationModule(e),this.InterApplicationBus=new Vr.InterApplicationBus(e),this.Clipboard=new zr.Clipboard(e),this.ExternalApplication=new Kr.ExternalApplicationModule(e),this.Frame=new qr._FrameModule(e),this.GlobalHotkey=new Jr.GlobalHotkey(e),this.Platform=new Zr.PlatformModule(e,this.InterApplicationBus.Channel),this.View=new Yr.ViewModule(e),this.Interop=new Xr.InteropModule(e),this.SnapshotSource=new eo.SnapshotSourceModule(e),e.registerFin(this),this.me=(0,Qr.getMe)(e),e.on(\"disconnected\",(()=>{this.emit(\"disconnected\")}))}}Wr=a.Fin=to;var no={},io={};function ro(e){return\"string\"==typeof e.manifestUrl}function oo(e){return ao(e)&&\"string\"==typeof e.address}function so(e){return oo(e)&&\"string\"==typeof e.token}function ao(e){return\"string\"==typeof e.uuid}function co(e){return e.runtime&&\"string\"==typeof e.runtime.version}function ho(e){return ao(e)&&co(e)}Object.defineProperty(io,\"__esModule\",{value:!0}),io.isInternalConnectConfig=io.isPortDiscoveryConfig=io.isNewConnectConfig=io.isConfigWithReceiver=io.isRemoteConfig=io.isExistingConnectConfig=io.isExternalConfig=void 0,io.isExternalConfig=ro,io.isExistingConnectConfig=oo,io.isRemoteConfig=so,io.isConfigWithReceiver=function(e){return\"object\"==typeof e.receiver&&so({...e,address:\"\"})},io.isNewConnectConfig=ho,io.isPortDiscoveryConfig=function(e){return ro(e)&&co(e)||ho(e)},io.isInternalConnectConfig=function(e){return oo(e)||ho(e)};var lo={},uo={};Object.defineProperty(uo,\"__esModule\",{value:!0}),uo.EmitterMap=void 0;const po=t;function wo(e){return Buffer.from(e).toString(\"base64\")}uo.EmitterMap=class{constructor(){this.storage=new Map}hashKeys(e){return e.map(wo).join(\"/\")}getOrCreate(e){const t=this.hashKeys(e);return this.storage.has(t)||this.storage.set(t,new po.EventEmitter),this.storage.get(t)}has(e){return this.storage.has(this.hashKeys(e))}delete(e){const t=this.hashKeys(e);return this.storage.delete(t)}},Object.defineProperty(lo,\"__esModule\",{value:!0});const yo=uo;class fo extends yo.EmitterMap{constructor(){super(...arguments),this.dispatchEvent=e=>{if(function(e){return\"process-desktop-event\"===e.action}(e)){const{payload:t}=e,n=function(e){const{topic:t}=e;if(\"frame\"===t||\"window\"===t||\"view\"===t){const{uuid:n,name:i}=e;return[t,n,i]}if(\"application\"===t){const{uuid:n}=e;return[t,n]}return[t]}(t);if(this.has(n))return this.getOrCreate(n).emit(t.type,t),!0}return!1}}}lo.default=fo;var go,mo,vo=s&&s.__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},Co=s&&s.__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)},bo=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(no,\"__esModule\",{value:!0});var Io=no.Transport=void 0;const Eo=t,xo=io,Ao=g,Po=bo(lo),Mo=ki,_o=ke;class Oo extends Eo.EventEmitter{constructor(e,t,n){super(),this.wireListeners=new Map,this.topicRefMap=new Map,this.eventAggregator=new Po.default,this.messageHandlers=[this.eventAggregator.dispatchEvent],go.set(this,void 0),mo.set(this,void 0),this.connectSync=()=>{Co(this,go,\"f\").connectSync()},this.getPort=()=>Co(this,go,\"f\").getPort(),vo(this,go,new e(this.onmessage.bind(this)),\"f\"),this.environment=t,this.sendRaw=Co(this,go,\"f\").send.bind(Co(this,go,\"f\")),this.registerMessageHandler(this.handleMessage.bind(this)),Co(this,go,\"f\").on(\"disconnected\",(()=>{for(const[,{handleNack:e}]of this.wireListeners)e({reason:\"Remote connection has closed\"});this.wireListeners.clear(),this.emit(\"disconnected\")}));const{uuid:i,name:r}=n,o=this.environment.getCurrentEntityType();this.me=(0,Mo.getBaseMe)(o,i,r)}getFin(){if(!Co(this,mo,\"f\"))throw new Error(\"No Fin object registered for this transport\");return Co(this,mo,\"f\")}registerFin(e){if(Co(this,mo,\"f\"))throw new Error(\"Fin object has already been registered for this transport\");vo(this,mo,e,\"f\")}shutdown(){return Co(this,go,\"f\").shutdown()}async connect(e){if((0,xo.isConfigWithReceiver)(e))return await Co(this,go,\"f\").connect(e.receiver),this.authorize(e);if((0,xo.isRemoteConfig)(e))return this.connectRemote(e);if((0,xo.isExistingConnectConfig)(e))return this.connectByPort(e);if((0,xo.isNewConnectConfig)(e)){const t=await this.environment.retrievePort(e);return this.connectByPort({...e,address:`ws://localhost:${t}`})}}async connectRemote(e){return await Co(this,go,\"f\").connect(new(this.environment.getWsConstructor())(e.address)),this.authorize(e)}async connectByPort(e){const{address:t,uuid:n}=e,i={...e,type:\"file-token\"},r=Co(this,go,\"f\");await r.connect(new(this.environment.getWsConstructor())(e.address));const o=await this.sendAction(\"request-external-authorization\",{uuid:n,type:\"file-token\"},!0);if(\"external-authorization-response\"!==o.action)throw new Ao.UnexpectedActionError(o.action);return await this.environment.writeToken(o.payload.file,o.payload.token),this.authorize(i)}async authorize(e){const t=await this.sendAction(\"request-authorization\",e,!0);if(\"authorization-response\"!==t.action)throw new Ao.UnexpectedActionError(t.action);if(!0!==t.payload.success)throw new Ao.RuntimeError(t.payload)}sendAction(e,t={},n=!1){let i=()=>{};const r=Ao.RuntimeError.getCallSite(1),o=this.environment.getNextMessageId(),s=new Promise(((s,a)=>{i=a;const c={action:e,payload:t,messageId:o},d=Co(this,go,\"f\");return this.addWireListener(o,s,(e=>this.nackHandler(e,a,r)),n),d.send(c).catch(a)}));return Object.assign(s,{cancel:i,messageId:o})}nackHandler(e,t,n){t(\"string\"==typeof e?e:new Ao.RuntimeError(e,n))}ferryAction(e){return new Promise(((t,n)=>{const i=this.environment.getNextMessageId();e.messageId=i;const r=e=>{t(e.payload)};return Co(this,go,\"f\").send(e).then((()=>this.addWireListener(i,r,(e=>this.nackHandler(e,n)),!1))).catch(n)}))}registerMessageHandler(e){this.messageHandlers.push(e)}addWireListener(e,t,n,i){i?this.uncorrelatedListener=t:this.wireListeners.has(e)?n({reason:\"Duplicate handler id\",error:(0,_o.errorToPOJO)(new Ao.DuplicateCorrelationError(String(e)))}):this.wireListeners.set(e,{resolve:t,handleNack:n})}onmessage(e){for(const t of this.messageHandlers)t.call(null,e)}handleMessage(e){const t=e.correlationId||NaN;if(\"correlationId\"in e){if(!this.wireListeners.has(t))return!1;{const{resolve:n,handleNack:i}=this.wireListeners.get(t);\"ack\"!==e.action?i({reason:\"Did not receive ack action\",error:(0,_o.errorToPOJO)(new Ao.NoAckError(e.action))}):\"payload\"in e?e.payload.success?n.call(null,e):i(e.payload):\"string\"==typeof e.reason?i(e):(console.warn(\"Received invalid response from core\",e),i({reason:\"invalid response shape\"})),this.wireListeners.delete(t)}}else this.uncorrelatedListener&&this.uncorrelatedListener.call(null,e),this.uncorrelatedListener=()=>{};return!0}}Io=no.Transport=Oo,go=new WeakMap,mo=new WeakMap;const So=(...e)=>({log:(...t)=>console.debug(`[${(new Date).toISOString()}]`,...(e=>e.map((e=>`[${e}]`)))(e),...t),getLogger:(...t)=>So(...e,...t)}),Ro=So(\"@openfin/core-web/client\");function Fo(e,t){if(!function(e){return\"string\"==typeof e}(e))throw new Error(`Property ${t} has invalid type. Expected string, got ${typeof e}.`)}const jo=\"web-broker-ports-ready\",ko=Ro.getLogger(\"get-web-interop-ports\");function Lo(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)}function To(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}\"function\"==typeof SuppressedError&&SuppressedError;const $o=e=>{var n,i,r;return r=class extends t.EventEmitter{constructor(t){super(),n.set(this,void 0),i.set(this,!1),this.connectSync=()=>{Lo(this,i,\"f\")||(e.addEventListener(\"message\",(e=>{e.data?.topic?.startsWith(\"wire-message\")&&e.data.message&&Lo(this,n,\"f\").call(this,{...JSON.parse(e.data.message),ports:e.ports})})),e.start())},this.connect=async()=>{this.connectSync()},this.send=t=>(e.postMessage({topic:\"wire-message\",message:JSON.stringify(t)}),Promise.resolve()),this.shutdown=async()=>{e.close()},To(this,n,t,\"f\")}getPort(){return e}},n=new WeakMap,i=new WeakMap,r};var Bo={},Go={};Object.defineProperty(Go,\"__esModule\",{value:!0}),Go.BaseEnvironment=void 0;const Wo=vr();Go.BaseEnvironment=class{async getViewWindowIdentity(e,t){const{identity:n}=await e.View.wrapSync(t).getCurrentWindow();return n}async getInteropInfo(e){const t=await e.Application.getCurrentSync().getInfo().catch((()=>null)),n=t?.initialOptions?.interopBrokerConfiguration??{};return{fdc3Version:t?(0,Wo.getDefaultViewFdc3VersionFromAppInfo)(t):void 0,...n,fdc3Info:{providerVersion:await e.System.getVersion(),provider:\"OpenFin\"}}}},Object.defineProperty(Bo,\"__esModule\",{value:!0});var Ho=Bo.BrowserEnvironment=void 0;const No=Go;class Do extends No.BaseEnvironment{constructor(){super(...arguments),this.type=\"other\",this.getRandomId=()=>{const e=new Uint32Array(1);return window.crypto.getRandomValues(e)[0].toString(32)}}getAdapterVersionSync(){return\"\"}observeBounds(e,t){throw new Error(\"Method not implemented.\")}layoutAllowedInContext(e){return!1}initLayoutManager(e,t,n){throw new Error(\"Method not implemented.\")}applyLayoutSnapshot(e,t,n){throw new Error(\"Method not implemented.\")}createLayout(e,t){throw new Error(\"Method not implemented.\")}destroyLayout(e,t){throw new Error(\"Method not implemented.\")}resolveLayout(e,t){throw new Error(\"Method not implemented.\")}initPlatform(...e){throw new Error(\"Method not implemented.\")}writeToken(e,t){return Promise.resolve(\"\")}retrievePort(e){throw new Error(\"Method not implemented.\")}getNextMessageId(){return this.getRandomId()}createChildContent(e){throw new Error(\"Method not implemented.\")}getWebWindow(e){throw new Error(\"Method not implemented.\")}getCurrentEntityIdentity(){throw new Error(\"Method not implemented.\")}getCurrentEntityType(){return\"external connection\"}raiseEvent(e,t){throw new Error(\"Method not implemented.\")}getUrl(){return location.href}getDefaultChannelOptions(){return{create:{},connect:{}}}getRtcPeer(){return new RTCPeerConnection}getWsConstructor(){return WebSocket}whenReady(){return Promise.resolve()}}Ho=Bo.BrowserEnvironment=Do;const Uo=e=>\"platform\"in e&&void 0!==e.platform;var Vo,zo;class Ko extends Ho{constructor(e){super(),this.connectConfig=e,Vo.set(this,void 0),zo.set(this,new W((async()=>Promise.resolve().then((function(){return require(\"./main-b14f67c9.js\")}))))),Uo(e)&&this.validatePlatformOptions(e)}getAdapterVersionSync(){return\"0.39.21\"}validatePlatformOptions({platform:e}){if(!(\"layoutSnapshot\"in e))throw new Error(\"Platform options are missing layoutSnapshot. Please provide a layoutSnapshot in the platform options.\");if(\"windows\"in e||\"windows\"in e.layoutSnapshot)throw new Error(\"It appears you tried to call connect() with a snapshot object from an OpenFin desktop environment. Note that connect() expects to be called with a platform property with this structure: { platform: { layoutSnapshot } }. To get a layoutSnapshot of the expected structure, use fin.Platform.Layout.getCurrentLayoutManagerSync().getLayoutSnapshot() in v34+ in your desktop environment.\");const{layouts:t}=e.layoutSnapshot;Object.entries(t).map((([e,t])=>{if(\"object\"!=typeof t||null===t)throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must be an object.`);if(!(\"content\"in t))throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must contain a 'content' property.`)}))}async getInteropInfo(e){return{...{contextGroups:void 0,logging:{beforeAction:{enabled:!1},afterAction:{enabled:!1}}},fdc3Version:void 0,fdc3Info:{providerVersion:\"0.39.21\",provider:\"OpenFin Web\"}}}layoutAllowedInContext(e){return!0}async initLayoutManager(e,t,n){if(Lo(this,Vo,\"f\"))throw new Error(\"Layout already initialized.\");if(!Uo(this.connectConfig))throw new Error(\"Platform options are missing from connection config.\");const{WebLayoutEntryPoint:i}=await Lo(this,zo,\"f\").getValue();return To(this,Vo,new i(this.connectConfig),\"f\"),await Lo(this,Vo,\"f\").initLayoutManager(e,t,n)}async applyLayoutSnapshot(e,t,n){Lo(this,Vo,\"f\")?.applyLayoutSnapshot(e,t,n)}async createLayout(e,t){return Lo(this,Vo,\"f\")?.createLayout(e,t)}async destroyLayout(e,t){return Lo(this,Vo,\"f\")?.destroyLayout(e,t)}async getViewWindowIdentity(e,t){return Promise.resolve({uuid:t.uuid,name:t.uuid})}}Vo=new WeakMap,zo=new WeakMap;const qo=()=>{const e=((e,t)=>{const n=new RegExp(`^${t}<(?.*)>$`).exec(e)?.groups?.meta;if(n)try{return JSON.parse(atob(n))}catch(e){throw new Error(`Failed to decode JSON from ${n}.`)}})(window.name,\"of-frame\");if(e)try{const{name:t,uuid:n,brokerUrl:i,providerId:r,contextGroup:o}=e;return Fo(i,\"brokerUrl\"),Fo(n,\"uuid\"),Fo(t,\"name\"),{identity:{name:t,uuid:n},brokerUrl:i,interopConfig:{providerId:r,currentContextGroup:o}}}catch(e){throw new Error(`Unexpected error occurred when inferring platform information: ${e.stack}`)}},Jo=()=>{const e=r.v4();return{uuid:e,name:e}},Yo=async e=>{if(\"enabled\"===e.connectionInheritance){const t=await(async e=>{const t=qo();if(t){const{validateOptions:n=(()=>!0)}=e,{identity:i,...r}=t;if(!await n(r))throw new Error(\"Parent options were rejected by validateOptions.\");return t}})(e);if(t)return t}if(!e.options){const t=\"enabled\"===e.connectionInheritance?\"Broker URL was not specified nor provided by a platform container.\":\"Connection inheritance is disabled but no options were provided.\";throw new Error(t)}return{...e.options,identity:Jo()}};exports.__classPrivateFieldGet=Lo,exports.__classPrivateFieldSet=To,exports.apiExposer=Gn,exports.commonjsGlobal=s,exports.connect=async t=>{try{Ro.log(\"Establishing connection\",t);const{brokerUrl:n,identity:i,timeout:r,interopConfig:s}=await Yo(t),{workerPort:a,iframeBrokerPort:c}=await(async(e,t,n)=>{const{origin:i}=new URL(e),r=document.createElement(\"IFRAME\");let s;r.style.display=\"none\";try{return await new Promise(((a,c)=>{const d=e=>{if(e.source===r.contentWindow&&e.data?.topic===`ack-${jo}`){if(e.origin!==i)c(new Error(`Broker redirected to unexpected origin ${e.origin}, expected ${i}.`));else if(e.data.success){const[t,n]=e.ports;a({iframeBrokerPort:t,workerPort:n})}else c(new m(e.data));window.removeEventListener(\"message\",d),clearTimeout(s)}};window.addEventListener(\"message\",d),ko.log(`Connecting to broker ${e}`),r.setAttribute(\"src\",e),r.setAttribute(\"name\",o(t,\"of-broker\")),document.body.appendChild(r),ko.log(\"Iframe loaded, awaiting init message from iframe\"),n&&(s=setTimeout((()=>{window.removeEventListener(\"message\",d),document.body.removeChild(r),c(new Error(\"Worker did not initialize in time\"))}),n))}))}catch(e){throw new Error(`Failed to initialise Fin Web Client. ${e.message}`,{cause:e})}})(n,i,r);Ro.log(\"Successfully established connection to shared worker\");const d={entityType:\"external connection\",...i};a.start(),c.start();const h=((t,n,i)=>{const r=$o(n),o=new Ko(t),s=new Io(r,o,i);return s.connectSync(),window.Buffer=e.Buffer,new Wr(s)})(t,a,d);return s?.providerId&&(h.me.interop=h.Interop.connectSync(s.providerId),s?.currentContextGroup&&h.me.interop.joinContextGroup(s.currentContextGroup).catch((e=>{console.warn(`Error joining specified context group: ${s?.currentContextGroup}, continuing`,e)}))),{...h,me:{...h.me,identity:{uuid:h.me.uuid,name:h.me.name}}}}catch(e){throw new Error(`An error occured during web-interop connection: ${e.message}`)}},exports.decorators=Nn,exports.encodeOptions=o,exports.layout_constants=ai,exports.lazy=G;\n","\"use strict\";var t=require(\"./main-8cad4070.js\"),e=require(\"uuid\");require(\"buffer/\"),require(\"events\"),require(\"lodash/cloneDeep\"),require(\"lodash/isEqual\");var i={},n={};Object.defineProperty(n,\"__esModule\",{value:!0}),n.mapValuesAsync=n.mapEntriesAsync=void 0;const o=(t,[e,i])=>({...t,[e]:i});async function s(t,e){return(await Promise.all(e.map((async([e,i])=>[e,await t(i,e)])))).reduce(o,{})}n.mapEntriesAsync=s,n.mapValuesAsync=async function(t,e){let i;return i=e instanceof Map?[...e.entries()]:Object.entries(e),s(t,i)};var r,a,l,h,d=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldSet||function(t,e,i,n,o){if(\"m\"===n)throw new TypeError(\"Private method is not writable\");if(\"a\"===n&&!o)throw new TypeError(\"Private accessor was defined without a setter\");if(\"function\"==typeof e?t!==e||!o:!e.has(t))throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");return\"a\"===n?o.call(t,i):o?o.value=i:e.set(t,i),i},c=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldGet||function(t,e,i,n){if(\"a\"===i&&!n)throw new TypeError(\"Private accessor was defined without a getter\");if(\"function\"==typeof e?t!==e||!n:!e.has(t))throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");return\"m\"===i?n:\"a\"===i?n.call(t):n?n.value:e.get(t)};Object.defineProperty(i,\"__esModule\",{value:!0});var m=i.DefaultLayoutManager=void 0;const u=n;class p{constructor(t){a.set(this,void 0),l.set(this,new Map),d(this,a,t,\"f\")}size(){return c(this,l,\"f\").size}async applyLayoutSnapshot({layouts:t}){if(Object.keys(t).length>1)throw new Error(\"[LayoutManager] Tried to call applyLayoutSnapshot with more than 1 layout. When implementing multiple layouts via overridden LayoutManager class, you must override and fully implement the applyLayoutSnapshot method without calling super.applyLayoutSnapshot().\");const[[e,i]]=Object.entries(t);await p.createLayout(this,{layoutName:e,layout:i})}async showLayout({layoutName:t}){}async getLayoutSnapshot(){return{layouts:await(0,u.mapValuesAsync)((t=>t.getFrameSnapshot()),c(this,l,\"f\"))}}async removeLayout({layoutName:t}){}getLayoutIdentityForView(t){const e=[...c(this,l,\"f\").values()].find((e=>e.getCurrentViews().some((e=>e.name===t.name&&e.uuid===t.uuid))));return e?.identity??void 0}isLayoutVisible({layoutName:t}){return c(p,r,\"m\",h).call(p,this,t).isVisible()}resolveLayoutIdentity(t){if(t&&\"layoutName\"in t)return t;const e=[...c(this,l,\"f\").values()];if(1===e.length)return e[0].identity;const i=e.find((t=>t.isVisible()));return i?.identity??void 0}static async resolveLayout(t,e){const i=t.resolveLayoutIdentity(e);if(void 0===i||!(\"layoutName\"in i))throw new Error(\"[layout-manager] resolveLayout: Could not resolve the layout identity. Make sure you include 'layoutName' in the identity object.\");return c(p,r,\"m\",h).call(p,t,i.layoutName)}static async handleSharedView(t,e,i){await(0,u.mapValuesAsync)((async t=>{if(t.identity.layoutName!==e.layoutName){const e=t.getCurrentViews().find((t=>t.name===i.name));e&&await t.onViewDetached({viewIdentity:e,target:null}).catch(console.error)}}),c(t,l,\"f\"))}static async handleLastViewRemoved(t,e){await t.removeLayout(e),await c(t,a,\"f\").handleLastViewRemoved(t)}static async destroyLayout(t,{layoutName:e}){await c(p,r,\"m\",h).call(p,t,e).destroy(),c(t,l,\"f\").delete(e)}static async createLayout(t,e){const{layoutName:i}=e;if(c(t,l,\"f\").has(i))throw new Error(`Layout name ${i} already exists`);await c(t,a,\"f\").createLayout(e,t)}static registerLayout(t,e,i){c(t,l,\"f\").set(e,i)}static getAllLayouts(t){return[...c(t,l,\"f\").values()]}static setInitialSnapshot(t,e){c(t,a,\"f\").setInitialSnapshot(e)}static createClosedConstructor(...t){return class extends p{constructor(){super(...t)}}}}m=i.DefaultLayoutManager=p,r=p,a=new WeakMap,l=new WeakMap,h=function(t,e){const i=c(t,l,\"f\").get(e);if(!i)throw new Error(`[layout-manager] getLayoutByName: Could not locate layout with name '${e}'`);return i};var g={},f={},v={};Object.defineProperty(v,\"__esModule\",{value:!0}),v.ReversibleMap=void 0;v.ReversibleMap=class{constructor(){this.valueToKey=new Map,this.keyToValue=new Map,this.setUnique=(t,e)=>{if(this.hasKey(t)||this.hasValue(e))throw new Error(\"Key or value already in the map.\");this.keyToValue.set(t,e),this.valueToKey.set(e,t)},this.getKey=t=>{const e=this.valueToKey.get(t);if(!e)throw new Error(\"Value not found in the map.\");return e},this.deleteKey=t=>{const e=this.getValue(t);return this.keyToValue.delete(t),this.valueToKey.delete(e),e},this.deleteValue=t=>{const e=this.getKey(t);return this.keyToValue.delete(e),this.valueToKey.delete(t),e},this.hasKey=t=>this.keyToValue.has(t),this.hasValue=t=>this.valueToKey.has(t)}getValue(t){const e=this.keyToValue.get(t);if(!e)throw new Error(\"Key not found in the map.\");return e}},Object.defineProperty(f,\"__esModule\",{value:!0});var _=f.LayoutContentCache=void 0;const y=t.lazy,C=v;class w{constructor(){this.contentItemCache=new C.ReversibleMap,this.contentItemCacheId=0,this.createCacheKey=()=>{const t=`entity-${this.contentItemCacheId.toString()}`;return this.contentItemCacheId+=1,t},this.hasKey=t=>this.contentItemCache.hasKey(t),this.getItemOrUndefined=t=>{try{return this.getContentItemOrThrow(t)}catch(t){return}},this.getContentItemOrThrow=(t,e)=>{if(!this.contentItemCache.hasKey(t))throw new Error(\"Layout component has been destroyed or detached from the current layout.\");const i=this.contentItemCache.getValue(t);if(e&&!e.includes(i.type))throw new Error(`Layout item is not the expected type. Expected ${e.join(\", \")}, got ${i.type}.`);return i},this.getOrCreateEntityId=t=>{if(this.contentItemCache.hasValue(t))return this.contentItemCache.getKey(t);t.onDestroyed((()=>{this.contentItemCache.deleteValue(t)}));const e=this.createCacheKey();return this.contentItemCache.setUnique(e,t),e}}static getSingleInstance(){return w.singleton.getValue()}}_=f.LayoutContentCache=w,w.singleton=new y.Lazy((()=>new w));var I={},b={};!function(t){Object.defineProperty(t,\"__esModule\",{value:!0}),t.getAdjacentStacks=t.doShareEdge=t.getAdjacentItem=void 0;t.getAdjacentItem=(e,i)=>{const{parent:n}=e;if(e.isRoot()||!n)return;const o=[\"top\",\"bottom\"].includes(i)?\"column\":\"row\",s=[\"top\",\"left\"].includes(i)?-1:1;if(n.type===o){const t=n.contentItems.indexOf(e)+s;if(t>=0&&t{const n=t.getBounds(),o=e.getBounds();if(!n||!o)return!1;if([\"top\",\"bottom\"].includes(i)){return!(n.righto.right)}return!(n.bottomo.bottom)};t.getAdjacentStacks=(e,i)=>{const n=[\"top\",\"bottom\"].includes(i)?\"row\":\"column\",o=s=>\"stack\"===s.type?(0,t.doShareEdge)(e,s,i)?[s]:[]:\"root\"===s.type||\"ground\"===s.type?[]:s.type===n?s.contentItems.map((t=>o(t))).flat():s.type!==n?[\"top\",\"right\"].includes(i)?o(s.contentItems[s.contentItems.length-1]):o(s.contentItems[0]):[],s=(0,t.getAdjacentItem)(e,i);return s?o(s):[]}}(b);var S=t.commonjsGlobal&&t.commonjsGlobal.__decorate||function(t,e,i,n){var o,s=arguments.length,r=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if(\"object\"==typeof Reflect&&\"function\"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(s<3?o(r):s>3?o(e,i,r):o(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};Object.defineProperty(I,\"__esModule\",{value:!0}),I.LayoutEntitiesController=void 0;const E=t.decorators,x=b,L=i;class z{constructor(t,e,i){this.wire=t,this.layoutManager=e,this.layoutContentCache=i,this.analytics=t=>{this.wire.sendAction(`layout-controller-${t}`).catch((()=>{}))},this.getLayoutIdentityForViewOrThrow=async t=>{const e=this.layoutManager.getLayoutIdentityForView(t);if(!e)throw new Error(`View identity ${t.name} is not attached to any layouts.`);return e},this.getRoot=async t=>{this.analytics(\"get-root\");const e=(await this.getLayout(t)).getRoot();return{type:e.type,entityId:this.layoutContentCache.getOrCreateEntityId(e)}},this.getStackByView=async t=>{this.analytics(\"get-stack-by-view\");const e=await this.getLayoutIdentityForViewOrThrow(t),i=(await this.getLayout(e)).getStackByView(t);if(\"stack\"===i?.type)return{entityId:this.layoutContentCache.getOrCreateEntityId(i),type:\"stack\"}},this.getStackViews=t=>{this.analytics(\"get-stack-views\");return this.layoutContentCache.getContentItemOrThrow(t,[\"stack\"]).contentItems.map((t=>({name:t.viewName,uuid:this.wire.me.uuid})))},this.isRoot=t=>{this.analytics(\"is-root\");return this.layoutContentCache.getContentItemOrThrow(t).isRoot()},this.exists=t=>(this.analytics(\"exists\"),this.layoutContentCache.hasKey(t)),this.addViewToStack=async(t,e,{index:i}={index:0})=>{this.analytics(\"add-view-to-stack\");const n=this.layoutContentCache.getContentItemOrThrow(t);if(i&&i>n.contentItems.length+1)throw new Error(`Index '${i}' out of range, please exclude the index or specify a number between 0 and ${n.contentItems.length}`);const o={id:t,index:i},{identity:s}=await n.layout.platformCreateView(e,{location:o});return s},this.findViewInStack=(t,e)=>t.contentItems.find((t=>t.viewName===e.name)),this.removeViewFromStack=async(t,e)=>{this.analytics(\"remove-view-from-stack\");const i=this.layoutContentCache.getContentItemOrThrow(t,[\"stack\"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to remove a view ('${e.name}') which does not belong to the stack.`);await n.layout.platformCloseView(e)},this.createAdjacentStack=async(t,e,{position:i=\"right\"}={})=>{if(this.analytics(\"create-adjacent-stack\"),!Array.isArray(e)||0===e.length)throw new Error('The parameter \"views\" must be an array with at least 1 element.');if(![\"top\",\"bottom\",\"left\",\"right\"].includes(i))throw new Error(`Invalid position '${i}' specified.`);const n=this.layoutContentCache.getContentItemOrThrow(t).createAdjacentStack({position:i}),o=this.layoutContentCache.getOrCreateEntityId(n);return await Promise.all(e.reverse().map((t=>this.addViewToStack(o,t)))),o},this.getAdjacentStacks=async({targetId:t,edge:e})=>{this.analytics(\"get-adjacent-stacks\");const i=this.layoutContentCache.getContentItemOrThrow(t);return(0,x.getAdjacentStacks)(i,e).map((t=>({entityId:this.layoutContentCache.getOrCreateEntityId(t)})))},this.setStackActiveView=async(t,e)=>{this.analytics(\"set-stack-active-view\");const i=this.layoutContentCache.getContentItemOrThrow(t,[\"stack\"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to set a view ('${e.name}') as active when it does not belong to the stack.`);i.setActiveContentItem(n,!0)}}async getLayout(t){const e=await L.DefaultLayoutManager.resolveLayout(this.layoutManager,t);if(!e)throw new Error(`Could not resolve target layout identity ${JSON.stringify(t)}`);return e}getContent(t){this.analytics(\"get-content\");return this.layoutContentCache.getContentItemOrThrow(t,[\"column\",\"row\"]).contentItems.map((t=>({type:t.type,entityId:this.layoutContentCache.getOrCreateEntityId(t)})))}getParent(t){this.analytics(\"get-parent\");const e=this.layoutContentCache.getContentItemOrThrow(t);if(!e.isRoot())return e.parent?.contentItems.includes(e)?{type:e.parent.type,entityId:this.layoutContentCache.getOrCreateEntityId(e.parent)}:void 0}}S([(0,E.expose)()],z.prototype,\"getLayoutIdentityForViewOrThrow\",void 0),S([(0,E.expose)()],z.prototype,\"getRoot\",void 0),S([(0,E.expose)()],z.prototype,\"getStackByView\",void 0),S([(0,E.expose)()],z.prototype,\"getStackViews\",void 0),S([(0,E.expose)()],z.prototype,\"getContent\",null),S([(0,E.expose)()],z.prototype,\"getParent\",null),S([(0,E.expose)()],z.prototype,\"isRoot\",void 0),S([(0,E.expose)()],z.prototype,\"exists\",void 0),S([(0,E.expose)()],z.prototype,\"addViewToStack\",void 0),S([(0,E.expose)()],z.prototype,\"removeViewFromStack\",void 0),S([(0,E.expose)()],z.prototype,\"createAdjacentStack\",void 0),S([(0,E.expose)()],z.prototype,\"getAdjacentStacks\",void 0),S([(0,E.expose)()],z.prototype,\"setStackActiveView\",void 0),I.LayoutEntitiesController=z,Object.defineProperty(g,\"__esModule\",{value:!0});var M=g.initLayoutEndpoints=void 0;const P=t.apiExposer,T=t.layout_constants,A=f,k=I,D=i;M=g.initLayoutEndpoints=async function(t,e){const i=t.getFin(),n=await i.Platform.getCurrentSync().getClient(),o=new P.ChannelsExposer(n);await new P.ApiExposer(o).exposeInstance(new k.LayoutEntitiesController(t,e,A.LayoutContentCache.getSingleInstance()),{id:T.LAYOUT_CONTROLLER_ID}),await async function(t,e){const i=t=>async i=>{const n=await D.DefaultLayoutManager.resolveLayout(e,i.target);if(!n)throw new Error(`Could not resolve the layout target from payload ${JSON.stringify(i)}`);return t(n,i)},n=(e,n)=>{t.register(e,i(n))},o=(t,e)=>{n(t,e)};n(\"replace-view\",((t,e)=>t.replaceView(e))),n(\"replace-layout\",((t,{layout:e})=>t.replaceLayout(e))),n(\"add-view\",((t,e)=>t.insertView(e))),o(\"layout-add-view\",((t,{viewOptions:e,location:i,targetView:n})=>t.platformCreateView(e,{location:i,targetView:n}))),n(\"close-view\",((t,e)=>t.cleanupView(e.viewIdentity))),o(\"layout-close-view\",((t,e)=>t.platformCloseView(e.viewIdentity))),n(\"apply-preset-layout\",((t,e)=>t.applyPreset(e))),n(\"get-layout-views\",(t=>t.getCurrentViews())),n(\"get-frame-snapshot\",(t=>t.getFrameSnapshot())),n(\"is-visible\",(t=>t.isVisible())),n(\"destroy\",(t=>t.destroy())),t.register(\"get-layout-snapshot\",(()=>e.getLayoutSnapshot()))}(n,e)};var R={};Object.defineProperty(R,\"__esModule\",{value:!0});var U=R.BaseLayout=void 0;U=R.BaseLayout=class{};var O={};Object.defineProperty(O,\"__esModule\",{value:!0});var V=O.DOMEmitter=void 0;V=O.DOMEmitter=class{constructor(t){this.container=t}dispatchLocalEvent(t,e){const i={...e,type:t,tabSelector:`tab-${e.name}`,containerSelector:`container-${e.name}`,topic:\"openfin-DOM-event\"};this.container.dispatchEvent(new CustomEvent(t,{detail:i}))}};var B={};Object.defineProperty(B,\"__esModule\",{value:!0});var H=B.mapLayoutContentItemsImmutableSync=B.mapLayoutContentItemsImmutable=W=B.isVisible=void 0;var W=B.isVisible=t=>(0!==t.offsetWidth||0!==t.offsetHeight)&&\"hidden\"!==window.getComputedStyle(t).visibility&&t.offsetTop>=0&&t.offsetLeft>=0&&t.offsetTop<=window.innerHeight&&t.offsetLeft<=window.innerWidth;const F=t=>\"type\"in t&&\"component\"===t.type;B.mapLayoutContentItemsImmutable=async function t(e,i){return F(i)?e(i):{...i,content:await Promise.all(i.content?.map((i=>t(e,i))))}},H=B.mapLayoutContentItemsImmutableSync=function t(e,i){return F(i)?e(i):{...i,content:i.content?.map((i=>t(e,i)))}};class N extends Error{constructor(t,e){super(e),this.type=t}}class G extends N{constructor(t,e){super(\"Configuration\",t),this.node=e}}class j extends N{constructor(t){super(\"PopoutBlocked\",t)}}class $ extends N{constructor(t){super(\"API\",t)}}class Z extends N{constructor(t){super(\"Bind\",t)}}class q extends Error{constructor(t,e,i){super(`${t}: ${e}${void 0===i?\"\":\": \"+i}`)}}class X extends q{constructor(t,e){super(\"Assert\",t,e)}}class Y extends q{constructor(t,e,i){super(\"UnreachableCase\",t,`${e}${void 0===i?\"\":\": \"+i}`)}}class K extends q{constructor(t,e){super(\"UnexpectedNull\",t,e)}}class J extends q{constructor(t,e){super(\"UnexpectedUndefined\",t,e)}}var Q;!function(t){let e=!1;const i={PopoutCannotBeCreatedWithGroundItemConfig:{id:0,default:\"Popout cannot be created with ground ItemConfig\"},PleaseRegisterAConstructorFunction:{id:1,default:\"Please register a constructor function\"},ComponentTypeNotRegisteredAndBindComponentEventHandlerNotAssigned:{id:2,default:\"Component type not registered and BindComponentEvent handler not assigned\"},ComponentIsAlreadyRegistered:{id:3,default:\"Component is already registered\"},ComponentIsNotVirtuable:{id:4,default:\"Component is not virtuable. Requires rootHtmlElement field/getter\"},VirtualComponentDoesNotHaveRootHtmlElement:{id:5,default:'Virtual component does not have getter \"rootHtmlElement\"'},ItemConfigIsNotTypeComponent:{id:6,default:\"ItemConfig is not of type component\"},InvalidNumberPartInSizeString:{id:7,default:\"Invalid number part in size string\"},UnknownUnitInSizeString:{id:8,default:\"Unknown unit in size string\"},UnsupportedUnitInSizeString:{id:9,default:\"Unsupported unit in size string\"}};t.idCount=Object.keys(i).length;const n=Object.values(i);t.checkInitialise=function(){if(!e)for(let e=0;e=\"0\"&&t<=\"9\"}function Tt(t,e){const i=zt(e);t.style.width=i}function At(t,e){const i=zt(e);t.style.height=i}function kt(t){return{width:t.offsetWidth,height:t.offsetHeight}}function Dt(t,e){t.style.display=e?\"\":\"none\"}function Rt(t,e){if(void 0!==e)for(const i in e)if(e.hasOwnProperty(i)){const n=e[i],o=t[i];t[i]=Ut(o,n)}return t}function Ut(t,e){if(\"object\"!=typeof e)return e;if(Array.isArray(e)){const t=e.length,i=new Array(t);for(let n=0;n36)throw new Error(\"Too many keys in config minifier map\")},t.translateObject=n}(dt||(dt={})),function(t){t.defaults={type:at.ground,content:[],size:1,sizeUnit:ht.Fractional,minSize:void 0,minSizeUnit:ht.Pixel,id:\"\",isClosable:!0},t.createCopy=function(t,e){switch(t.type){case at.ground:case at.row:case at.column:return gt.createCopy(t,e);case at.stack:return ut.createCopy(t,e);case at.component:return pt.createCopy(t);default:throw new Y(\"CICC91354\",t.type,\"Invalid Config Item type specified\")}},t.createDefault=function(t){switch(t){case at.ground:throw new X(\"CICCDR91562\");case at.row:case at.column:return gt.createDefault(t);case at.stack:return ut.createDefault();case at.component:return pt.createDefault();default:throw new Y(\"CICCDD91563\",t,\"Invalid Config Item type specified\")}},t.isComponentItem=function(t){return t.type===at.component},t.isStackItem=function(t){return t.type===at.stack},t.isGroundItem=function(t){return t.type===at.ground}}(ct||(ct={})),function(t){t.defaultMaximised=!1,function(t){t.createCopy=function(t,e){return void 0===t?void 0:{show:null!=e?e:t.show,popout:t.popout,close:t.close,maximise:t.maximise,minimise:t.minimise,tabDropdown:t.tabDropdown}}}(t.Header||(t.Header={}))}(mt||(mt={})),function(t){function e(t){const e=t.length,i=new Array(e);for(let n=0;n\"__glMaximised\"===t));t>0&&(o=!0,n=n.splice(t,1)),e=n.length>0?n[0]:ct.defaults.id}else e=n;return i=void 0!==t.maximised?t.maximised:o,{id:e,maximised:i}}}(wt||(wt={})),function(t){function e(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0;return{resolved:!0,root:Et.resolve(i),openPopouts:t.resolveOpenPopouts(e.openPopouts),dimensions:t.Dimensions.resolve(e.dimensions),settings:t.Settings.resolve(e.settings),header:t.Header.resolve(e.header,e.settings,e.labels)}}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:Lt.fromResolvedArray(e.openPopouts),settings:_t.Settings.createCopy(e.settings),dimensions:t.Dimensions.fromResolved(e.dimensions),header:_t.Header.createCopy(e.header)}},t.isResolved=function(t){const e=t;return void 0!==e.resolved&&!0===e.resolved},t.resolveOpenPopouts=function(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0,{root:Et.resolve(o),openPopouts:xt.resolveOpenPopouts(e.openPopouts),dimensions:xt.Dimensions.resolve(e.dimensions),settings:xt.Settings.resolve(e.settings),header:xt.Header.resolve(e.header,e.settings,e.labels),parentId:null!==(i=e.parentId)&&void 0!==i?i:null,indexInParent:null!==(n=e.indexInParent)&&void 0!==n?n:null,window:t.Window.resolve(e.window,e.dimensions),resolved:!0}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:i(e.openPopouts),dimensions:xt.Dimensions.fromResolved(e.dimensions),settings:_t.Settings.createCopy(e.settings),header:_t.Header.createCopy(e.header),parentId:e.parentId,indexInParent:e.indexInParent,window:t.Window.fromResolved(e.window)}},t.fromResolvedArray=i}(Lt||(Lt={}));class Wt{constructor(){this._allEventSubscriptions=[],this._subscriptionsMap=new Map,this.unbind=this.removeEventListener,this.trigger=this.emit}tryBubbleEvent(t,e){}emit(t,...e){let i=this._subscriptionsMap.get(t);if(void 0!==i){i=i.slice();for(let t=0;t0){const n=e.slice();n.unshift(t);const o=this._allEventSubscriptions.slice();for(let t=0;t0?n.contentItems[0]:n,e=0);const o=this._layoutManager.createAndInitContentItem(i,t);t.addChild(o,e),this._layoutManager.layoutConfig.settings.popInOnClose?this._onClose():this.close()}createWindow(){const t=this.createUrl(),e=Math.floor(1e6*Math.random()).toString(36),i=this.serializeWindowFeatures({width:this._initialWindowSize.width,height:this._initialWindowSize.height,innerWidth:this._initialWindowSize.width,innerHeight:this._initialWindowSize.height,menubar:\"no\",toolbar:\"no\",location:\"no\",personalbar:\"no\",resizable:\"yes\",scrollbars:\"no\",status:\"no\"});if(this._popoutWindow=globalThis.open(t,e,i),this._popoutWindow)this._popoutWindow.addEventListener(\"load\",(()=>this.positionWindow()),{passive:!0}),this._popoutWindow.addEventListener(\"beforeunload\",(()=>{this._layoutManager.layoutConfig.settings.popInOnClose?this.popIn():this._onClose()}),{passive:!0}),this._checkReadyInterval=setInterval((()=>this.checkReady()),10);else if(!0===this._layoutManager.layoutConfig.settings.blockedPopoutsThrowError){throw new j(\"Popout blocked\")}}checkReady(){if(null===this._popoutWindow)throw new K(\"BPCR01844\");this._popoutWindow.__glInstance&&this._popoutWindow.__glInstance.isInitialised&&(this.onInitialised(),void 0!==this._checkReadyInterval&&(clearInterval(this._checkReadyInterval),this._checkReadyInterval=void 0))}serializeWindowFeatures(t){const e=[];for(const i in t)e.push(i+\"=\"+t[i].toString());return e.join(\",\")}createUrl(){const t=\"gl-window-config-\"+Ot(),e=_t.minifyConfig(this._config);try{localStorage.setItem(t,JSON.stringify(e))}catch(t){throw new Error(\"Error while writing to localStorage \"+function(t){return t instanceof Error?t.message:\"string\"==typeof t?t:\"Unknown Error\"}(t))}const i=new URL(location.href);return i.searchParams.set(\"gl-window\",t),i.toString()}positionWindow(){if(null===this._popoutWindow)throw new Error(\"BrowserPopout.positionWindow: null popoutWindow\");this._popoutWindow.moveTo(this._initialWindowSize.left,this._initialWindowSize.top),this._popoutWindow.focus()}onInitialised(){this._isInitialised=!0,this.getGlInstance().on(\"popIn\",(()=>this.popIn())),this.emit(\"initialised\")}_onClose(){setTimeout((()=>this.emit(\"closed\")),50)}}class Gt extends Wt{constructor(t,e,i,n){super(),this.layoutManager=t,this._parent=i,this._element=n,this._popInParentIds=[],this._type=e.type,this._id=e.id,this._isInitialised=!1,this.isGround=!1,this.isRow=!1,this.isColumn=!1,this.isStack=!1,this.isComponent=!1,this.size=e.size,this.sizeUnit=e.sizeUnit,this.minSize=e.minSize,this.minSizeUnit=e.minSizeUnit,this._isClosable=e.isClosable,this._pendingEventPropagations={},this._throttledEvents=[\"stateChanged\"],this._contentItems=this.createContentItems(e.content)}get type(){return this._type}get id(){return this._id}set id(t){this._id=t}get popInParentIds(){return this._popInParentIds}get parent(){return this._parent}get contentItems(){return this._contentItems}get isClosable(){return this._isClosable}get element(){return this._element}get isInitialised(){return this._isInitialised}static isStack(t){return t.isStack}static isComponentItem(t){return t.isComponent}static isComponentParentableItem(t){return t.isStack||t.isGround}removeChild(t,e=!1){const i=this._contentItems.indexOf(t);if(-1===i)throw new Error(\"Can't remove child item. Unknown content item\");if(e||this._contentItems[i].destroy(),this._contentItems.splice(i,1),this._contentItems.length>0)this.updateSize(!1);else if(!this.isGround&&!0===this._isClosable){if(null===this._parent)throw new K(\"CIUC00874\");this._parent.removeChild(this)}}addChild(t,e,i){return null!=e||(e=this._contentItems.length),this._contentItems.splice(e,0,t),t.setParent(this),!0===this._isInitialised&&!1===t._isInitialised&&t.init(),e}replaceChild(t,e,i=!1){const n=this._contentItems.indexOf(t),o=t._element.parentNode;if(-1===n)throw new X(\"CIRCI23232\",\"Can't replace child. oldChild is not child of this\");if(null===o)throw new K(\"CIRCP23232\");if(o.replaceChild(e._element,t._element),!0===i&&(t._parent=null,t.destroy()),this._contentItems[n]=e,e.setParent(this),e.size=t.size,e.sizeUnit=t.sizeUnit,e.minSize=t.minSize,e.minSizeUnit=t.minSizeUnit,null===e._parent)throw new K(\"CIRCNC45699\");!0===e._parent._isInitialised&&!1===e._isInitialised&&e.init(),this.updateSize(!1)}remove(){if(null===this._parent)throw new K(\"CIR11110\");this._parent.removeChild(this)}popout(){const t=Ot(),e=this.layoutManager.createPopoutFromContentItem(this,void 0,t,void 0);return this.emitBaseBubblingEvent(\"stateChanged\"),e}calculateConfigContent(){const t=this._contentItems,e=t.length,i=new Array(e);for(let n=0;nthis.propagateEventToLayoutManager(t,e))))}propagateEventToLayoutManager(t,e){this._pendingEventPropagations[t]=!1,this.layoutManager.emitUnknown(t,e)}}class jt extends Gt{constructor(t,e,i){super(t,e,i,document.createElement(\"div\")),this._parentItem=i,this._focused=!1,this.isComponent=!0,this._reorderEnabled=e.reorderEnabled,this.applyUpdatableConfig(e),this._initialWantMaximise=e.maximised;const n=document.createElement(\"div\");n.classList.add(\"lm_content\"),this.element.appendChild(n),this._container=new Ft(e,this,t,n,(t=>this.handleUpdateItemConfigEvent(t)),(()=>this.show()),(()=>this.hide()),(t=>this.focus(t)),(t=>this.blur(t)))}get componentName(){return this._container.componentType}get componentType(){return this._container.componentType}get reorderEnabled(){return this._reorderEnabled}get initialWantMaximise(){return this._initialWantMaximise}get component(){return this._container.component}get container(){return this._container}get parentItem(){return this._parentItem}get headerConfig(){return this._headerConfig}get title(){return this._title}get tab(){return this._tab}get focused(){return this._focused}destroy(){this._container.destroy(),super.destroy()}applyUpdatableConfig(t){this.setTitle(t.title),this._headerConfig=t.header}toConfig(){const t=this._container.stateRequestEvent,e=void 0===t?this._container.state:t();return{type:at.component,content:[],size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,maximised:!1,isClosable:this.isClosable,reorderEnabled:this._reorderEnabled,title:this._title,header:mt.Header.createCopy(this._headerConfig),componentType:pt.copyComponentType(this.componentType),componentState:e}}close(){if(null===this.parent)throw new K(\"CIC68883\");this.parent.removeChild(this,!1)}enterDragMode(t,e){Tt(this.element,t),At(this.element,e),this._container.enterDragMode(t,e)}exitDragMode(){this._container.exitDragMode()}enterStackMaximised(){this._container.enterStackMaximised()}exitStackMaximised(){this._container.exitStackMaximised()}drag(){this._container.drag()}updateSize(t){this.updateNodeSize(t)}init(){this.updateNodeSize(!1),super.init(),this._container.emit(\"open\"),this.initContentItems()}setTitle(t){this._title=t,this.emit(\"titleChanged\",t),this.emit(\"stateChanged\")}setTab(t){this._tab=t,this.emit(\"tab\",t),this._container.setTab(t)}hide(){super.hide(),this._container.setVisibility(!1)}show(){super.show(),this._container.setVisibility(!0)}focus(t=!1){this.parentItem.setActiveComponentItem(this,!0,t)}setFocused(t){this._focused=!0,this.tab.setFocused(),t||this.emitBaseBubblingEvent(\"focus\")}blur(t=!1){this._focused&&this.layoutManager.setFocusedComponentItem(void 0,t)}setBlurred(t){this._focused=!1,this.tab.setBlurred(),t||this.emitBaseBubblingEvent(\"blur\")}setParent(t){this._parentItem=t,super.setParent(t)}handleUpdateItemConfigEvent(t){this.applyUpdatableConfig(t)}updateNodeSize(t){if(\"none\"!==this.element.style.display){const{width:e,height:i}=kt(this.element);this._container.setSizeToNodeSize(e,i,t)}}}class $t extends Gt{constructor(){super(...arguments),this._focused=!1}get focused(){return this._focused}setFocusedValue(t){this._focused=t}}class Zt extends Wt{constructor(t,e){super(),this._eElement=t,this._pointerTracking=!1,this._pointerDownEventListener=t=>this.onPointerDown(t),this._pointerMoveEventListener=t=>this.onPointerMove(t),this._pointerUpEventListener=t=>this.onPointerUp(t),this._timeout=void 0,this._allowableTargets=[t,...e],this._oDocument=document,this._eBody=document.body,this._nDelay=1800,this._nDistance=10,this._nX=0,this._nY=0,this._nOriginalX=0,this._nOriginalY=0,this._dragging=!1,this._eElement.addEventListener(\"pointerdown\",this._pointerDownEventListener,{passive:!0})}destroy(){this.checkRemovePointerTrackingEventListeners(),this._eElement.removeEventListener(\"pointerdown\",this._pointerDownEventListener)}cancelDrag(){this.processDragStop(void 0)}onPointerDown(t){if(this._allowableTargets.includes(t.target)&&t.isPrimary){const e=this.getPointerCoordinates(t);this.processPointerDown(e)}}processPointerDown(t){this._nOriginalX=t.x,this._nOriginalY=t.y,this._oDocument.addEventListener(\"pointermove\",this._pointerMoveEventListener),this._oDocument.addEventListener(\"pointerup\",this._pointerUpEventListener,{passive:!0}),this._pointerTracking=!0,this._timeout=setTimeout((()=>{try{this.startDrag()}catch(t){throw console.error(t),t}}),this._nDelay)}onPointerMove(t){this._pointerTracking&&(this.processDragMove(t),t.preventDefault())}processDragMove(t){this._nX=t.pageX-this._nOriginalX,this._nY=t.pageY-this._nOriginalY,!1===this._dragging&&(Math.abs(this._nX)>this._nDistance||Math.abs(this._nY)>this._nDistance)&&this.startDrag(),this._dragging&&this.emit(\"drag\",this._nX,this._nY,t)}onPointerUp(t){this.processDragStop(t)}processDragStop(t){var e;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this.checkRemovePointerTrackingEventListeners(),!0===this._dragging&&(this._eBody.classList.remove(\"lm_dragging\"),this._eElement.classList.remove(\"lm_dragging\"),null===(e=this._oDocument.querySelector(\"iframe\"))||void 0===e||e.style.setProperty(\"pointer-events\",\"\"),this._dragging=!1,this.emit(\"dragStop\",t))}checkRemovePointerTrackingEventListeners(){this._pointerTracking&&(this._oDocument.removeEventListener(\"pointermove\",this._pointerMoveEventListener),this._oDocument.removeEventListener(\"pointerup\",this._pointerUpEventListener),this._pointerTracking=!1)}startDrag(){var t;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this._dragging=!0,this._eBody.classList.add(\"lm_dragging\"),this._eElement.classList.add(\"lm_dragging\"),null===(t=this._oDocument.querySelector(\"iframe\"))||void 0===t||t.style.setProperty(\"pointer-events\",\"none\"),this.emit(\"dragStart\",this._nOriginalX,this._nOriginalY)}getPointerCoordinates(t){return{x:t.pageX,y:t.pageY}}}class qt{constructor(t,e,i){this._isVertical=t,this._size=e,this._grabSize=i0){const i=this.createSplitter(Math.max(0,e-1)).element;e>0?(this.contentItems[e-1].element.insertAdjacentElement(\"afterend\",i),i.insertAdjacentElement(\"afterend\",t.element)):(this.contentItems[0].element.insertAdjacentElement(\"beforebegin\",i),i.insertAdjacentElement(\"beforebegin\",t.element))}else this._childElementContainer.appendChild(t.element);super.addChild(t,e);const n=1/this.contentItems.length*100;if(!0===i)return this.emitBaseBubblingEvent(\"stateChanged\"),e;for(let e=0;e0&&(this.calculateRelativeSizes(),this.setAbsoluteSizes()),this.emitBaseBubblingEvent(\"stateChanged\"),this.emit(\"resize\")}setAbsoluteSizes(){const t=this.calculateAbsoluteSizes();for(let e=0;e0&&t.itemSizes[e]++,this._isColumn?(Tt(this.contentItems[e].element,t.crossAxisSize),At(this.contentItems[e].element,t.itemSizes[e])):(Tt(this.contentItems[e].element,t.itemSizes[e]),At(this.contentItems[e].element,t.crossAxisSize))}calculateAbsoluteSizes(){const t=(this.contentItems.length-1)*this._splitterSize,{width:e,height:i}=kt(this.element);let n,o;this._isColumn?(n=i-t,o=e):(n=e-t,o=i);let s=0;const r=[];for(let t=0;t0){const n=100-t;for(let t=0;t100&&e.length>0){for(let t=0;te)return;{const r=i/e;let a=i;for(let e=0;ethis.onSplitterDrag(e,t,i))),e.on(\"dragStop\",(()=>this.onSplitterDragStop(e))),e.on(\"dragStart\",(()=>this.onSplitterDragStart(e))),this._splitter.splice(t,0,e),e}getSplitItems(t){const e=this._splitter.indexOf(t);return{before:this.contentItems[e],after:this.contentItems[e+1]}}calculateContentItemMinSize(t){const e=t.minSize;if(void 0!==e){if(t.minSizeUnit===ht.Pixel)return e;throw new X(\"ROCGMD98831\",JSON.stringify(t))}{const t=this.layoutManager.layoutConfig.dimensions;return this._isColumn?t.defaultMinItemHeight:t.defaultMinItemWidth}}calculateContentItemsTotalMinSize(t){let e=0;for(const i of t)e+=this.calculateContentItemMinSize(i);return e}onSplitterDragStart(t){const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=this.calculateContentItemsTotalMinSize(e.before.contentItems),s=this.calculateContentItemsTotalMinSize(e.after.contentItems);this._splitterPosition=0,this._splitterMinPosition=-1*(i-o),this._splitterMaxPosition=n-s}onSplitterDrag(t,e,i){let n=this._isColumn?i:e;if(null===this._splitterMinPosition||null===this._splitterMaxPosition)throw new K(\"ROCOSD59226\");n=Math.max(n,this._splitterMinPosition),n=Math.min(n,this._splitterMaxPosition),this._splitterPosition=n;const o=zt(n);this._isColumn?t.element.style.top=o:t.element.style.left=o}onSplitterDragStop(t){if(null===this._splitterPosition)throw new K(\"ROCOSDS66932\");{const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=(this._splitterPosition+i)/(i+n),s=e.before.size+e.after.size;e.before.size=o*s,e.after.size=(1-o)*s,t.element.style.top=zt(0),t.element.style.left=zt(0),globalThis.requestAnimationFrame((()=>this.updateSize(!1)))}}}!function(t){t.getElementDimensionSize=function(t,e){return\"width\"===e?function(t){return t.offsetWidth}(t):function(t){return t.offsetHeight}(t)},t.setElementDimensionSize=function(t,e,i){return\"width\"===e?Tt(t,i):At(t,i)},t.createElement=function(t,e){const i=t.createElement(\"div\");return i.classList.add(\"lm_item\"),e?i.classList.add(\"lm_column\"):i.classList.add(\"lm_row\"),i}}(Xt||(Xt={}));class Yt extends $t{constructor(t,e,i){super(t,vt.create(e),null,Yt.createElement(document)),this.isGround=!0,this._childElementContainer=this.element,this._containerElement=i;let n=null;for(;;){const t=n?n.previousSibling:this._containerElement.lastChild;if(!(t instanceof Element&&t.classList.contains(\"lm_content\")))break;n=t}this._containerElement.insertBefore(this.element,n)}init(){if(!0!==this.isInitialised){this.updateNodeSize();for(let t=0;t0?this.contentItems[0]:this,n.isComponent)throw new Error(\"Cannot add item as child to ComponentItem\");{const t=this.layoutManager.createAndInitContentItem(i,n);return e=n.addChild(t,e),n===this?-1:e}}loadComponentAsRoot(t){this.clearRoot();const e=Ct.resolve(t,!1);if(e.maximised)throw new Error(\"Root Component cannot be maximised\");{const t=new jt(this.layoutManager,e,this);t.init(),this.addChild(t,0)}}addChild(t,e){if(this.contentItems.length>0)throw new Error(\"Ground node can only have a single child\");return this._childElementContainer.appendChild(t.element),e=super.addChild(t,e),this.updateSize(!1),this.emitBaseBubblingEvent(\"stateChanged\"),e}calculateConfigContent(){const t=this.contentItems,e=t.length,i=new Array(e);for(let n=0;n0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e)),this.updateContentItemsSize(!1))}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}createSideAreas(){const t=Yt.Area.oppositeSides,e=new Array(Object.keys(t).length);let i=0;for(const n in t){const o=n,s=this.getElementArea();if(null===s)throw new K(\"RCSA77553\");s.side=o,\"2\"===t[o][1]?s[o]=s[t[o]]-50:s[o]=s[t[o]]+50,s.surface=(s.x2-s.x1)*(s.y2-s.y1),e[i++]=s}return e}highlightDropZone(t,e,i){this.layoutManager.tabDropPlaceholder.remove(),super.highlightDropZone(t,e,i)}onDrop(t,e){if(t.isComponent){const e=ut.createDefault(),i=t;e.header=mt.Header.createCopy(i.headerConfig);const n=this.layoutManager.createAndInitContentItem(e,this);n.addChild(t),t=n}if(0===this.contentItems.length)this.addChild(t);else{if(t.type===at.row||t.type===at.column){const e=ut.createDefault(),i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}const i=\"x\"==e.side[0]?at.row:at.column,n=\"2\"==e.side[1],o=this.contentItems[0];if(o instanceof Xt&&o.type===i){const e=o.contentItems[n?0:o.contentItems.length-1];o.addChild(t,n?0:void 0,!0),e.size*=.5,t.size=e.size,t.sizeUnit=ht.Percent,o.updateSize(!1)}else{const e=ct.createDefault(i),s=this.layoutManager.createContentItem(e,this);this.replaceChild(o,s),s.addChild(t,n?0:void 0,!0),s.addChild(o,n?void 0:0,!0),o.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}}dock(){throw new X(\"GID87731\")}validateDocking(){throw new X(\"GIVD87732\")}getAllContentItems(){const t=[this];return this.deepGetAllContentItems(this.contentItems,t),t}getConfigMaximisedItems(){const t=[];return this.deepFilterContentItems(this.contentItems,t,(t=>!(!Gt.isStack(t)||!t.initialWantMaximise)||!(!Gt.isComponentItem(t)||!t.initialWantMaximise))),t}getItemsByPopInParentId(t){const e=[];return this.deepFilterContentItems(this.contentItems,e,(e=>e.popInParentIds.includes(t))),e}toConfig(){throw new Error(\"Cannot generate GroundItem config\")}setActiveComponentItem(t,e,i){}updateNodeSize(){const{width:t,height:e}=kt(this._containerElement);Tt(this.element,t),At(this.element,e),this.contentItems.length>0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e))}deepGetAllContentItems(t,e){for(let i=0;ithis.onClick(t),this._touchStartEventListener=t=>this.onTouchStart(t),this._element=document.createElement(\"div\"),this._element.classList.add(i),this._element.title=e,this._header.on(\"destroy\",(()=>this.destroy())),this._element.addEventListener(\"click\",this._clickEventListener,{passive:!0}),this._element.addEventListener(\"touchstart\",this._touchStartEventListener,{passive:!0}),this._header.controlsContainerElement.appendChild(this._element)}get element(){return this._element}destroy(){var t;this._element.removeEventListener(\"click\",this._clickEventListener),this._element.removeEventListener(\"touchstart\",this._touchStartEventListener),null===(t=this._element.parentNode)||void 0===t||t.removeChild(this._element)}onClick(t){this._pushEvent(t)}onTouchStart(t){this._pushEvent(t)}}class Jt{constructor(t,e,i,n,o){var s;this._layoutManager=t,this._componentItem=e,this._closeEvent=i,this._focusEvent=n,this._dragStartEvent=o,this._isActive=!1,this._tabClickListener=t=>this.onTabClickDown(t),this._tabTouchStartListener=t=>this.onTabTouchStart(t),this._closeClickListener=()=>this.onCloseClick(),this._closeTouchStartListener=()=>this.onCloseTouchStart(),this._dragStartListener=(t,e)=>this.onDragStart(t,e),this._contentItemDestroyListener=()=>this.onContentItemDestroy(),this._tabTitleChangedListener=t=>this.setTitle(t),this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_tab\"),this._titleElement=document.createElement(\"span\"),this._titleElement.classList.add(\"lm_title\"),this._closeElement=document.createElement(\"div\"),this._closeElement.classList.add(\"lm_close_tab\"),this._element.appendChild(this._titleElement),this._element.appendChild(this._closeElement),e.isClosable?this._closeElement.style.display=\"\":this._closeElement.style.display=\"none\",this.setTitle(e.title),this._componentItem.on(\"titleChanged\",this._tabTitleChangedListener);(null!==(s=e.reorderEnabled)&&void 0!==s?s:this._layoutManager.layoutConfig.settings.reorderEnabled)&&this.enableReorder(),this._element.addEventListener(\"click\",this._tabClickListener,{passive:!0}),this._element.addEventListener(\"touchstart\",this._tabTouchStartListener,{passive:!0}),this._componentItem.isClosable?(this._closeElement.addEventListener(\"click\",this._closeClickListener,{passive:!0}),this._closeElement.addEventListener(\"touchstart\",this._closeTouchStartListener,{passive:!0})):(this._closeElement.remove(),this._closeElement=void 0),this._componentItem.setTab(this),this._layoutManager.emit(\"tabCreated\",this)}get isActive(){return this._isActive}get componentItem(){return this._componentItem}get contentItem(){return this._componentItem}get element(){return this._element}get titleElement(){return this._titleElement}get closeElement(){return this._closeElement}get reorderEnabled(){return void 0!==this._dragListener}set reorderEnabled(t){t!==this.reorderEnabled&&(t?this.enableReorder():this.disableReorder())}setTitle(t){this._titleElement.innerText=t,this._element.title=t}setActive(t){t!==this._isActive&&(this._isActive=t,t?this._element.classList.add(\"lm_active\"):this._element.classList.remove(\"lm_active\"))}destroy(){var t,e;this._closeEvent=void 0,this._focusEvent=void 0,this._dragStartEvent=void 0,this._element.removeEventListener(\"click\",this._tabClickListener),this._element.removeEventListener(\"touchstart\",this._tabTouchStartListener),null===(t=this._closeElement)||void 0===t||t.removeEventListener(\"click\",this._closeClickListener),null===(e=this._closeElement)||void 0===e||e.removeEventListener(\"touchstart\",this._closeTouchStartListener),this._componentItem.off(\"titleChanged\",this._tabTitleChangedListener),this.reorderEnabled&&this.disableReorder(),this._element.remove()}setBlurred(){this._element.classList.remove(\"lm_focused\"),this._titleElement.classList.remove(\"lm_focused\")}setFocused(){this._element.classList.add(\"lm_focused\"),this._titleElement.classList.add(\"lm_focused\")}onDragStart(t,e){if(void 0===this._dragListener)throw new J(\"TODSDLU10093\");if(void 0===this._dragStartEvent)throw new J(\"TODS23309\");this._dragStartEvent(t,e,this._dragListener,this.componentItem)}onContentItemDestroy(){void 0!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=void 0)}onTabClickDown(t){const e=t.target;e!==this._element&&e!==this._titleElement||(0===t.button?this.notifyFocus():1===t.button&&this._componentItem.isClosable&&this.notifyClose())}onTabTouchStart(t){t.target===this._element&&this.notifyFocus()}onCloseClick(){this.notifyClose()}onCloseTouchStart(){this.notifyClose()}notifyClose(){if(void 0===this._closeEvent)throw new J(\"TNC15007\");this._closeEvent(this._componentItem)}notifyFocus(){if(void 0===this._focusEvent)throw new J(\"TNA15007\");this._focusEvent(this._componentItem)}enableReorder(){this._dragListener=new Zt(this._element,[this._titleElement]),this._dragListener.on(\"dragStart\",this._dragStartListener),this._componentItem.on(\"destroy\",this._contentItemDestroyListener)}disableReorder(){if(void 0===this._dragListener)throw new J(\"TDR87745\");this._componentItem.off(\"destroy\",this._contentItemDestroyListener),this._dragListener.off(\"dragStart\",this._dragStartListener),this._dragListener=void 0}}class Qt{constructor(t,e,i,n,o){this._layoutManager=t,this._componentRemoveEvent=e,this._componentFocusEvent=i,this._componentDragStartEvent=n,this._dropdownActiveChangedEvent=o,this._tabs=[],this._lastVisibleTabIndex=-1,this._dropdownActive=!1,this._element=document.createElement(\"section\"),this._element.classList.add(\"lm_tabs\"),this._dropdownElement=document.createElement(\"section\"),this._dropdownElement.classList.add(\"lm_tabdropdown_list\"),this._dropdownElement.style.display=\"none\"}get tabs(){return this._tabs}get tabCount(){return this._tabs.length}get lastVisibleTabIndex(){return this._lastVisibleTabIndex}get element(){return this._element}get dropdownElement(){return this._dropdownElement}get dropdownActive(){return this._dropdownActive}destroy(){for(let t=0;tthis.handleTabCloseEvent(t)),(t=>this.handleTabFocusEvent(t)),((t,e,i,n)=>this.handleTabDragStartEvent(t,e,i,n)));void 0===e&&(e=this._tabs.length),this._tabs.splice(e,0,i),ethis._lastVisibleTabIndex){const t=this._tabs[e];for(let t=e;t>0;t--)this._tabs[t]=this._tabs[t-1];this._tabs[0]=t}}updateTabSizes(t,e){let i=!1;this.tryUpdateTabSizes(i,t,e)||(i=!0,this.tryUpdateTabSizes(i,t,e)),i!==this._dropdownActive&&(this._dropdownActive=i,this._dropdownActiveChangedEvent())}tryUpdateTabSizes(t,e,i){if(this._tabs.length>0){if(void 0===i)throw new Error(\"non-empty tabs must have active component item\");let n=0,o=!1;const s=this._layoutManager.layoutConfig.settings.tabOverlapAllowance,r=this._tabs.indexOf(i.tab),a=this._tabs[r];this._lastVisibleTabIndex=-1;for(let i=0;ie){if(o)i===r&&(l.style.zIndex=\"auto\",l.style.marginLeft=\"\",l.parentElement!==this._element&&this._element.appendChild(l));else{let t;if(t=r>0&&r<=i?(d-e)/(i-1):(d-e)/i,tthis.onClick(t),this._touchStartListener=t=>this.onTouchStart(t),this._rowColumnClosable=!0,this._closeButton=null,this._popoutButton=null,this._tabsContainer=new Qt(this._layoutManager,(t=>this.handleTabInitiatedComponentRemoveEvent(t)),(t=>this.handleTabInitiatedComponentFocusEvent(t)),((t,e,i,n)=>this.handleTabInitiatedDragStartEvent(t,e,i,n)),(()=>this.processTabDropdownActiveChanged())),this._show=i.show,this._popoutEnabled=i.popoutEnabled,this._popoutLabel=i.popoutLabel,this._maximiseEnabled=i.maximiseEnabled,this._maximiseLabel=i.maximiseLabel,this._minimiseEnabled=i.minimiseEnabled,this._minimiseLabel=i.minimiseLabel,this._closeEnabled=i.closeEnabled,this._closeLabel=i.closeLabel,this._tabDropdownEnabled=i.tabDropdownEnabled,this._tabDropdownLabel=i.tabDropdownLabel,this.setSide(i.side),this._canRemoveComponent=this._configClosable,this._element=document.createElement(\"section\"),this._element.classList.add(\"lm_header\"),this._controlsContainerElement=document.createElement(\"section\"),this._controlsContainerElement.classList.add(\"lm_controls\"),this._element.appendChild(this._tabsContainer.element),this._element.appendChild(this._controlsContainerElement),this._element.appendChild(this._tabsContainer.dropdownElement),this._element.addEventListener(\"click\",this._clickListener,{passive:!0}),this._element.addEventListener(\"touchstart\",this._touchStartListener,{passive:!0}),this._documentMouseUpListener=()=>this._tabsContainer.hideAdditionalTabsDropdown(),globalThis.document.addEventListener(\"mouseup\",this._documentMouseUpListener,{passive:!0}),this._tabControlOffset=this._layoutManager.layoutConfig.settings.tabControlOffset,this._tabDropdownEnabled&&(this._tabDropdownButton=new Kt(this,this._tabDropdownLabel,\"lm_tabdropdown\",(()=>this._tabsContainer.showAdditionalTabsDropdown()))),this._popoutEnabled&&(this._popoutButton=new Kt(this,this._popoutLabel,\"lm_popout\",(()=>this.handleButtonPopoutEvent()))),this._maximiseEnabled&&(this._maximiseButton=new Kt(this,this._maximiseLabel,\"lm_maximise\",(t=>this.handleButtonMaximiseToggleEvent(t)))),this._configClosable&&(this._closeButton=new Kt(this,this._closeLabel,\"lm_close\",(()=>s()))),this.processTabDropdownActiveChanged()}get show(){return this._show}get side(){return this._side}get leftRightSided(){return this._leftRightSided}get layoutManager(){return this._layoutManager}get parent(){return this._parent}get tabs(){return this._tabsContainer.tabs}get lastVisibleTabIndex(){return this._tabsContainer.lastVisibleTabIndex}get element(){return this._element}get tabsContainerElement(){return this._tabsContainer.element}get controlsContainerElement(){return this._controlsContainerElement}destroy(){this.emit(\"destroy\"),this._popoutEvent=void 0,this._maximiseToggleEvent=void 0,this._clickEvent=void 0,this._touchStartEvent=void 0,this._componentRemoveEvent=void 0,this._componentFocusEvent=void 0,this._componentDragStartEvent=void 0,this._tabsContainer.destroy(),globalThis.document.removeEventListener(\"mouseup\",this._documentMouseUpListener),this._element.remove()}createTab(t,e){this._tabsContainer.createTab(t,e)}removeTab(t){this._tabsContainer.removeTab(t)}processActiveComponentChanged(t){this._tabsContainer.processActiveComponentChanged(t),this.updateTabSizes()}setSide(t){this._side=t,this._leftRightSided=[nt.right,nt.left].includes(this._side)}setRowColumnClosable(t){this._rowColumnClosable=t,this.updateClosability()}updateClosability(){let t;if(this._configClosable)if(this._rowColumnClosable){t=!0;const e=this.tabs.length;for(let i=0;i1}applyFocusedValue(t){t?this._element.classList.add(\"lm_focused\"):this._element.classList.remove(\"lm_focused\")}processMaximised(){if(void 0===this._maximiseButton)throw new J(\"HPMAX16997\");this._maximiseButton.element.setAttribute(\"title\",this._minimiseLabel)}processMinimised(){if(void 0===this._maximiseButton)throw new J(\"HPMIN16997\");this._maximiseButton.element.setAttribute(\"title\",this._maximiseLabel)}updateTabSizes(){if(this._tabsContainer.tabCount>0){const t=this._show?this._layoutManager.layoutConfig.dimensions.headerHeight:0;let e;this._leftRightSided?(this._element.style.height=\"\",this._element.style.width=zt(t)):(this._element.style.width=\"\",this._element.style.height=zt(t)),e=this._leftRightSided?this._element.offsetHeight-this._controlsContainerElement.offsetHeight-this._tabControlOffset:this._element.offsetWidth-this._controlsContainerElement.offsetWidth-this._tabControlOffset,this._tabsContainer.updateTabSizes(e,this._getActiveComponentItemEvent())}}handleTabInitiatedComponentRemoveEvent(t){if(this._canRemoveComponent){if(void 0===this._componentRemoveEvent)throw new J(\"HHTCE22294\");this._componentRemoveEvent(t)}}handleTabInitiatedComponentFocusEvent(t){if(void 0===this._componentFocusEvent)throw new J(\"HHTAE22294\");this._componentFocusEvent(t)}handleTabInitiatedDragStartEvent(t,e,i,n){if(this._canRemoveComponent){if(void 0===this._componentDragStartEvent)throw new J(\"HHTDSE22294\");this._componentDragStartEvent(t,e,i,n)}else i.cancelDrag()}processTabDropdownActiveChanged(){void 0!==this._tabDropdownButton&&Dt(this._tabDropdownButton.element,this._tabsContainer.dropdownActive)}handleButtonPopoutEvent(){if(this._layoutManager.layoutConfig.settings.popoutWholeStack){if(void 0===this._popoutEvent)throw new J(\"HHBPOE17834\");this._popoutEvent()}else{const t=this._getActiveComponentItemEvent();t&&t.popout()}}handleButtonMaximiseToggleEvent(t){if(void 0===this._maximiseToggleEvent)throw new J(\"HHBMTE16834\");this._maximiseToggleEvent()}onClick(t){t.target===this._element&&this.notifyClick(t)}onTouchStart(t){t.target===this._element&&this.notifyTouchStart(t)}notifyClick(t){if(void 0===this._clickEvent)throw new J(\"HNHC46834\");this._clickEvent(t)}notifyTouchStart(t){if(void 0===this._touchStartEvent)throw new J(\"HNHTS46834\");this._touchStartEvent(t)}}class ee extends $t{constructor(t,e,i){var n,o,s,r,a,l,h,d,c,m,u,p,g,f,v,_,y,C,w;super(t,e,i,ee.createElement(document)),this._headerSideChanged=!1,this._resizeListener=()=>this.handleResize(),this._maximisedListener=()=>this.handleMaximised(),this._minimisedListener=()=>this.handleMinimised(),this._headerConfig=e.header;const I=t.layoutConfig.header,b=e.content;let S;if(1!==b.length)S=void 0;else{S=b[0].header}this._initialWantMaximise=e.maximised,this._initialActiveItemIndex=null!==(n=e.activeItemIndex)&&void 0!==n?n:0;const E=null!==(r=null!==(s=null===(o=this._headerConfig)||void 0===o?void 0:o.show)&&void 0!==s?s:null==S?void 0:S.show)&&void 0!==r?r:I.show,x=null!==(h=null!==(l=null===(a=this._headerConfig)||void 0===a?void 0:a.popout)&&void 0!==l?l:null==S?void 0:S.popout)&&void 0!==h?h:I.popout,L=null!==(m=null!==(c=null===(d=this._headerConfig)||void 0===d?void 0:d.maximise)&&void 0!==c?c:null==S?void 0:S.maximise)&&void 0!==m?m:I.maximise,z=null!==(g=null!==(p=null===(u=this._headerConfig)||void 0===u?void 0:u.close)&&void 0!==p?p:null==S?void 0:S.close)&&void 0!==g?g:I.close,M=null!==(_=null!==(v=null===(f=this._headerConfig)||void 0===f?void 0:f.minimise)&&void 0!==v?v:null==S?void 0:S.minimise)&&void 0!==_?_:I.minimise,P=null!==(w=null!==(C=null===(y=this._headerConfig)||void 0===y?void 0:y.tabDropdown)&&void 0!==C?C:null==S?void 0:S.tabDropdown)&&void 0!==w?w:I.tabDropdown;this._maximisedEnabled=!1!==L;const T={show:!1!==E,side:!1===E?nt.top:E,popoutEnabled:!1!==x,popoutLabel:!1===x?\"\":x,maximiseEnabled:this._maximisedEnabled,maximiseLabel:!1===L?\"\":L,closeEnabled:!1!==z,closeLabel:!1===z?\"\":z,minimiseEnabled:!0,minimiseLabel:M,tabDropdownEnabled:!1!==P,tabDropdownLabel:!1===P?\"\":P};this._header=new te(t,this,T,e.isClosable&&!1!==z,(()=>this.getActiveComponentItem()),(()=>this.remove()),(()=>this.handlePopoutEvent()),(()=>this.toggleMaximise()),(t=>this.handleHeaderClickEvent(t)),(t=>this.handleHeaderTouchStartEvent(t)),(t=>this.handleHeaderComponentRemoveEvent(t)),(t=>this.handleHeaderComponentFocusEvent(t)),((t,e,i,n)=>this.handleHeaderComponentStartDragEvent(t,e,i,n))),this.isStack=!0,this._childElementContainer=document.createElement(\"section\"),this._childElementContainer.classList.add(\"lm_items\"),this.on(\"resize\",this._resizeListener),this._maximisedEnabled&&(this.on(\"maximised\",this._maximisedListener),this.on(\"minimised\",this._minimisedListener)),this.element.appendChild(this._header.element),this.element.appendChild(this._childElementContainer),this.setupHeaderPosition(),this._header.updateClosability()}get childElementContainer(){return this._childElementContainer}get header(){return this._header}get headerShow(){return this._header.show}get headerSide(){return this._header.side}get headerLeftRightSided(){return this._header.leftRightSided}get contentAreaDimensions(){return this._contentAreaDimensions}get initialWantMaximise(){return this._initialWantMaximise}get isMaximised(){return this===this.layoutManager.maximisedStack}get stackParent(){if(!this.parent)throw new Error(\"Stack should always have a parent\");return this.parent}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}init(){if(!0===this.isInitialised)return;this.updateNodeSize();for(let t=0;t0){if(this._initialActiveItemIndex<0||this._initialActiveItemIndex>=e)throw new Error(`ActiveItemIndex out of range: ${this._initialActiveItemIndex} id: ${this.id}`);for(let i=0;ithis.contentItems.length)throw e-=1,new X(\"SAC99728\");if(t instanceof jt)return e=super.addChild(t,e),this._childElementContainer.appendChild(t.element),this._header.createTab(t,e),this.setActiveComponentItem(t,i),this._header.updateTabSizes(),this.updateSize(!1),t.container.setBaseLogicalZIndex(),this._header.updateClosability(),this.emitStateChangedEvent(),e;throw new X(\"SACC88532\")}removeChild(t,e){const i=t,n=this.contentItems.indexOf(i),o=1===this.contentItems.length;if(this._activeComponentItem===i&&(i.focused&&i.blur(),!o)){const t=0===n?1:n-1;this.setActiveComponentItem(this.contentItems[t],!1)}this._header.removeTab(i),super.removeChild(i,e),o||this._header.updateClosability(),this.emitStateChangedEvent()}toggleMaximise(){this.isMaximised?this.minimise():this.maximise()}maximise(){if(!this.isMaximised){this.layoutManager.setMaximisedStack(this);const t=this.contentItems,e=t.length;for(let i=0;i0&&void 0===t)throw new Error(\"expected non-empty stack to have an active component item\");return{type:\"stack\",content:this.calculateConfigContent(),size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,isClosable:this.isClosable,maximised:this.isMaximised,header:this.createHeaderConfig(),activeItemIndex:t}}onDrop(t,e){if(\"header\"===this._dropSegment){if(this.resetHeaderDropZone(),void 0===this._dropIndex)throw new J(\"SODDI68990\");return void this.addChild(t,this._dropIndex)}if(\"body\"===this._dropSegment)return void this.addChild(t,0,!0);const i=\"top\"===this._dropSegment||\"bottom\"===this._dropSegment,n=\"left\"===this._dropSegment||\"right\"===this._dropSegment,o=\"top\"===this._dropSegment||\"left\"===this._dropSegment,s=i&&this.stackParent.isColumn||n&&this.stackParent.isRow;if(t.isComponent){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createAndInitContentItem(e,this);i.addChild(t),t=i}if(t.type===at.row||t.type===at.column){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}if(s){const e=this.stackParent.contentItems.indexOf(this);this.stackParent.addChild(t,o?e:e+1,!0),this.size*=.5,t.size=this.size,t.sizeUnit=this.sizeUnit,this.stackParent.updateSize(!1)}else{const e=i?at.column:at.row,n=ct.createDefault(e),s=this.layoutManager.createContentItem(n,this);this.stackParent.replaceChild(this,s),s.addChild(t,o?0:void 0,!0),s.addChild(this,o?void 0:0,!0),this.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}highlightDropZone(t,e){for(const i in this._contentAreaDimensions){const n=i,o=this._contentAreaDimensions[n].hoverArea;if(o.x1t&&o.y1e)return void(\"header\"===n?(this._dropSegment=\"header\",this.highlightHeaderDropZone(this._header.leftRightSided?e:t)):(this.resetHeaderDropZone(),this.highlightBodyDropZone(n)))}}getArea(){if(\"none\"===this.element.style.display)return null;const t=super.getElementArea(this._header.element),e=super.getElementArea(this._childElementContainer);if(null===t||null===e)throw new K(\"SGAHC13086\");const i=e.x2-e.x1,n=e.y2-e.y1;return this._contentAreaDimensions={header:{hoverArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2},highlightArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2}}},0===this.contentItems.length?(this._contentAreaDimensions.body={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2}},super.getElementArea(this.element)):(this._contentAreaDimensions.left={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x1+.25*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x1+.5*i,y2:e.y2}},this._contentAreaDimensions.top={hoverArea:{x1:e.x1+.25*i,y1:e.y1,x2:e.x1+.75*i,y2:e.y1+.5*n},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y1+.5*n}},this._contentAreaDimensions.right={hoverArea:{x1:e.x1+.75*i,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1+.5*i,y1:e.y1,x2:e.x2,y2:e.y2}},this._contentAreaDimensions.bottom={hoverArea:{x1:e.x1+.25*i,y1:e.y1+.5*n,x2:e.x1+.75*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1+.5*n,x2:e.x2,y2:e.y2}},super.getElementArea(this.element))}positionHeader(t){this._header.side!==t&&(this._header.setSide(t),this._headerSideChanged=!0,this.setupHeaderPosition())}updateNodeSize(){if(\"none\"!==this.element.style.display){const t=kt(this.element);if(this._header.show){t[this._header.leftRightSided?it.width:it.height]-=this.layoutManager.layoutConfig.dimensions.headerHeight}this._childElementContainer.style.width=zt(t.width),this._childElementContainer.style.height=zt(t.height);for(let e=0;e=o&&tthis.onDrag(t,e,i))),this._dragListener.on(\"dragStop\",(()=>this.onDrop())),this.createDragProxyElements(t,e),null===this._componentItem.parent)throw new K(\"DPC10097\");this._componentItemFocused=this._componentItem.focused,this._componentItemFocused&&this._componentItem.blur(),this._componentItem.parent.removeChild(this._componentItem,!0),this.setDimensions(),document.body.appendChild(this._element),this.determineMinMaxXY(),this._layoutManager.calculateItemAreas(),this.setDropPosition(t,e)}get element(){return this._element}createDragProxyElements(t,e){this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_dragProxy\");const i=document.createElement(\"div\");i.classList.add(\"lm_header\");const n=document.createElement(\"div\");n.classList.add(\"lm_tabs\");const o=document.createElement(\"div\");o.classList.add(\"lm_tab\");const s=document.createElement(\"span\");s.classList.add(\"lm_title\"),o.appendChild(s),n.appendChild(o),i.appendChild(n),this._proxyContainerElement=document.createElement(\"div\"),this._proxyContainerElement.classList.add(\"lm_content\"),this._element.appendChild(i),this._element.appendChild(this._proxyContainerElement),this._originalParent instanceof ee&&this._originalParent.headerShow&&(this._sided=this._originalParent.headerLeftRightSided,this._element.classList.add(\"lm_\"+this._originalParent.headerSide),[nt.right,nt.bottom].indexOf(this._originalParent.headerSide)>=0&&this._proxyContainerElement.insertAdjacentElement(\"afterend\",i)),this._element.style.left=zt(t),this._element.style.top=zt(e),o.setAttribute(\"title\",this._componentItem.title),s.insertAdjacentText(\"afterbegin\",this._componentItem.title),this._proxyContainerElement.appendChild(this._componentItem.element)}determineMinMaxXY(){const t=this._layoutManager.groundItem;if(void 0===t)throw new J(\"DPDMMXY73109\");{const e=t.element.getBoundingClientRect();this._minX=e.left+document.body.scrollLeft,this._minY=e.top+document.body.scrollTop,this._maxX=this._minX+e.width,this._maxY=this._minY+e.height}}onDrag(t,e,i){const n=i.pageX,o=i.pageY;this.setDropPosition(n,o),this._componentItem.drag()}setDropPosition(t,e){this._layoutManager.layoutConfig.settings.constrainDragToContainer&&(t<=this._minX?t=Math.ceil(this._minX):t>=this._maxX&&(t=Math.floor(this._maxX)),e<=this._minY?e=Math.ceil(this._minY):e>=this._maxY&&(e=Math.floor(this._maxY))),this._element.style.left=zt(t),this._element.style.top=zt(e),this._area=this._layoutManager.getArea(t,e),null!==this._area&&(this._lastValidArea=this._area,this._area.contentItem.highlightDropZone(t,e,this._area))}onDrop(){const t=this._layoutManager.dropTargetIndicator;if(null===t)throw new K(\"DPOD30011\");let e;if(t.hide(),this._componentItem.exitDragMode(),null!==this._area)e=this._componentItem,this._area.contentItem.onDrop(e,this._area);else if(null!==this._lastValidArea){e=this._componentItem;this._lastValidArea.contentItem.onDrop(e,this._lastValidArea)}else this._originalParent?(e=this._componentItem,this._originalParent.addChild(e)):this._componentItem.destroy();this._element.remove(),this._layoutManager.emit(\"itemDropped\",this._componentItem),this._componentItemFocused&&void 0!==e&&e.focus()}setDimensions(){const t=this._layoutManager.layoutConfig.dimensions;if(void 0===t)throw new Error(\"DragProxy.setDimensions: dimensions undefined\");let e=t.dragProxyWidth,i=t.dragProxyHeight;if(void 0===e||void 0===i)throw new Error(\"DragProxy.setDimensions: width and/or height undefined\");const n=!1===this._layoutManager.layoutConfig.header.show?0:t.headerHeight;this._element.style.width=zt(e),this._element.style.height=zt(i),e-=this._sided?n:0,i-=this._sided?0:n,this._proxyContainerElement.style.width=zt(e),this._proxyContainerElement.style.height=zt(i),this._componentItem.enterDragMode(e,i),this._componentItem.show()}}class ne{constructor(t,e,i,n,o,s,r){this._layoutManager=t,this._element=e,this._extraAllowableChildTargets=i,this._componentTypeOrFtn=n,this._componentState=o,this._title=s,this._id=r,this._dragListener=null,this._dummyGroundContainer=document.createElement(\"div\");const a=gt.createDefault(\"row\");this._dummyGroundContentItem=new Yt(this._layoutManager,a,this._dummyGroundContainer),this.createDragListener()}destroy(){this.removeDragListener()}createDragListener(){this.removeDragListener(),this._dragListener=new Zt(this._element,this._extraAllowableChildTargets),this._dragListener.on(\"dragStart\",((t,e)=>this.onDragStart(t,e))),this._dragListener.on(\"dragStop\",(()=>this.onDragStop()))}onDragStart(t,e){var i;const n=\"component\";let o;if(\"function\"==typeof this._componentTypeOrFtn){const t=this._componentTypeOrFtn();o=ne.isDragSourceComponentItemConfig(t)?{type:n,componentState:t.state,componentType:t.type,title:null!==(i=t.title)&&void 0!==i?i:this._title}:t}else o={type:n,componentState:this._componentState,componentType:this._componentTypeOrFtn,title:this._title,id:this._id};const s=bt.resolve(o,!1),r=new jt(this._layoutManager,s,this._dummyGroundContentItem);if(this._dummyGroundContentItem.contentItems.push(r),null===this._dragListener)throw new K(\"DSODSD66746\");{const i=new ie(t,e,this._dragListener,this._layoutManager,r,this._dummyGroundContentItem),n=this._layoutManager.transitionIndicator;if(null===n)throw new K(\"DSODST66746\");n.transitionElements(this._element,i.element)}}onDragStop(){this.createDragListener()}removeDragListener(){null!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=null)}}!function(t){t.isDragSourceComponentItemConfig=function(t){return!(\"componentType\"in t)}}(ne||(ne={}));class oe{constructor(){this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_dropTargetIndicator\");const t=document.createElement(\"div\");t.classList.add(\"lm_inner\"),this._element.appendChild(t),document.body.appendChild(this._element)}destroy(){this._element.remove()}highlightArea(t,e){this._element.style.left=zt(t.x1+e),this._element.style.top=zt(t.y1+e),this._element.style.width=zt(t.x2-t.x1-e),this._element.style.height=zt(t.y2-t.y1-e),this._element.style.display=\"block\"}hide(){Dt(this._element,!1)}}class se{constructor(){this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_transition_indicator\"),document.body.appendChild(this._element),this._toElement=null,this._fromDimensions=null,this._totalAnimationDuration=200,this._animationStartTime=null}destroy(){this._element.remove()}transitionElements(t,e){}nextAnimationFrame(){}measure(t){const e=t.getBoundingClientRect();return{left:e.left,top:e.top,width:t.offsetWidth,height:t.offsetHeight}}}class re extends Wt{constructor(t){super(),this._layoutManager=t,this._childEventListener=t=>this.onEventFromChild(t),globalThis.addEventListener(re.ChildEventName,this._childEventListener,{passive:!0})}emit(t,...e){\"userBroadcast\"===t?this.emitUserBroadcast(...e):super.emit(t,...e)}emitUserBroadcast(...t){this.handleUserBroadcastEvent(\"userBroadcast\",t)}destroy(){globalThis.removeEventListener(re.ChildEventName,this._childEventListener)}handleUserBroadcastEvent(t,e){this._layoutManager.isSubWindow?this.propagateToParent(t,e):this.propagateToThisAndSubtree(t,e)}onEventFromChild(t){const e=t.detail;this.handleUserBroadcastEvent(e.eventName,e.args)}propagateToParent(t,e){const i={bubbles:!0,cancelable:!0,detail:{layoutManager:this._layoutManager,eventName:t,args:e}},n=new CustomEvent(re.ChildEventName,i),o=globalThis.opener;if(null===o)throw new K(\"EHPTP15778\");o.dispatchEvent(n)}propagateToThisAndSubtree(t,e){this.emitUnknown(t,...e);for(let i=0;ithis.handleContainerResize())),this._windowBeforeUnloadListener=()=>this.onBeforeUnload(),this._windowBeforeUnloadListening=!1,this._maximisedStackBeforeDestroyedListener=t=>this.cleanupBeforeMaximisedStackDestroyed(t),this.isSubWindow=t.isSubWindow,this._constructorOrSubWindowLayoutConfig=t.constructorOrSubWindowLayoutConfig,Q.checkInitialise(),dt.checkInitialise(),void 0!==t.containerElement&&(this._containerElement=t.containerElement)}get container(){return this._containerElement}get isInitialised(){return this._isInitialised}get groundItem(){return this._groundItem}get root(){return this._groundItem}get openPopouts(){return this._openPopouts}get dropTargetIndicator(){return this._dropTargetIndicator}get transitionIndicator(){return this._transitionIndicator}get width(){return this._width}get height(){return this._height}get eventHub(){return this._eventHub}get rootItem(){if(void 0===this._groundItem)throw new Error(\"Cannot access rootItem before init\");return 0===this._groundItem.contentItems.length?void 0:this._groundItem.contentItems[0]}get focusedComponentItem(){return this._focusedComponentItem}get tabDropPlaceholder(){return this._tabDropPlaceholder}get maximisedStack(){return this._maximisedStack}get deprecatedConstructor(){return!this.isSubWindow&&void 0!==this._constructorOrSubWindowLayoutConfig}destroy(){if(this._isInitialised){this._windowBeforeUnloadListening&&(globalThis.removeEventListener(\"beforeunload\",this._windowBeforeUnloadListener),this._windowBeforeUnloadListening=!1),!0===this.layoutConfig.settings.closePopoutsOnUnload&&this.closeAllOpenPopouts(),this._resizeObserver.disconnect(),this.checkClearResizeTimeout(),void 0!==this._groundItem&&this._groundItem.destroy(),this._tabDropPlaceholder.remove(),null!==this._dropTargetIndicator&&this._dropTargetIndicator.destroy(),null!==this._transitionIndicator&&this._transitionIndicator.destroy(),this._eventHub.destroy();for(const t of this._dragSources)t.destroy();this._dragSources=[],this._isInitialised=!1}}minifyConfig(t){return _t.minifyConfig(t)}unminifyConfig(t){return _t.unminifyConfig(t)}init(){let t;if(this.setContainer(),this._dropTargetIndicator=new oe,this._transitionIndicator=new se,this.updateSizeFromContainer(),this.isSubWindow){if(void 0===this._constructorOrSubWindowLayoutConfig)throw new J(\"LMIU07155\");{const e=this._constructorOrSubWindowLayoutConfig.root;if(void 0===e)throw new X(\"LMIC07156\");if(!Ct.isComponent(e))throw new X(\"LMIC07157\");t=e;const i=xt.resolve(this._constructorOrSubWindowLayoutConfig);this.layoutConfig=Object.assign(Object.assign({},i),{root:void 0})}}else void 0===this._constructorOrSubWindowLayoutConfig?this.layoutConfig=_t.createDefault():this.layoutConfig=xt.resolve(this._constructorOrSubWindowLayoutConfig);const e=this.layoutConfig;this._groundItem=new Yt(this,e.root,this._containerElement),this._groundItem.init(),this.checkLoadedLayoutMaximiseItem(),this._resizeObserver.observe(this._containerElement),this._isInitialised=!0,this.adjustColumnsResponsive(),this.emit(\"initialised\"),void 0!==t&&this.loadComponentAsRoot(t)}loadLayout(t){if(!this.isInitialised)throw new Error(\"GoldenLayout: Need to call init() if LayoutConfig with defined root passed to constructor\");if(void 0===this._groundItem)throw new J(\"LMLL11119\");this.createSubWindows(),this.layoutConfig=xt.resolve(t),this._groundItem.loadRoot(this.layoutConfig.root),this.checkLoadedLayoutMaximiseItem(),this.adjustColumnsResponsive()}saveLayout(){if(!1===this._isInitialised)throw new Error(\"Can't create config, layout not yet initialised\");if(void 0===this._groundItem)throw new J(\"LMTC18244\");{const t=this._groundItem.calculateConfigContent();let e;e=1!==t.length?void 0:t[0],this.reconcilePopoutWindows();const i=[];for(let t=0;t=0?n=this._groundItem.contentItems[0]:e=0;break;case at.row:case at.column:e=n.addItem(t,i.index);break;case at.stack:if(Ct.isComponent(t)){e=n.addItem(t,i.index);break}throw Error(tt[6]);case at.component:throw new X(\"LMAIALC87444602\");default:throw new Y(\"LMAIALU98881733\",n.type)}if(Ct.isComponent(t)){const t=n.contentItems[e];Gt.isStack(t)&&(n=t,e=0)}return i.parentItem=n,i.index=e,i}}}loadComponentAsRoot(t){if(void 0===this._groundItem)throw new Error(\"Cannot add item before init\");this._groundItem.loadComponentAsRoot(t)}updateSize(t,e){this.setSize(t,e)}setSize(t,e){if(this._width=t,this._height=e,!0===this._isInitialised){if(void 0===this._groundItem)throw new J(\"LMUS18881\");if(this._groundItem.setSize(this._width,this._height),this._maximisedStack){const{width:t,height:e}=kt(this._containerElement);Tt(this._maximisedStack.element,t),At(this._maximisedStack.element,e),this._maximisedStack.updateSize(!1)}this.adjustColumnsResponsive()}}beginSizeInvalidation(){this._sizeInvalidationBeginCount++}endSizeInvalidation(){0==--this._sizeInvalidationBeginCount&&this.updateSizeFromContainer()}updateSizeFromContainer(){const{width:t,height:e}=kt(this._containerElement);this.setSize(t,e)}updateRootSize(t=!1){if(void 0===this._groundItem)throw new J(\"LMURS28881\");this._groundItem.updateSize(t)}createAndInitContentItem(t,e){const i=this.createContentItem(t,e);return i.init(),i}createContentItem(t,e){if(\"string\"!=typeof t.type)throw new G(\"Missing parameter 'type'\",JSON.stringify(t));if(ct.isComponentItem(t)&&!(e instanceof ee)&&e&&!(!0===this.isSubWindow&&e instanceof Yt)){t={type:at.stack,content:[t],size:t.size,sizeUnit:t.sizeUnit,minSize:t.minSize,minSizeUnit:t.minSizeUnit,id:t.id,maximised:t.maximised,isClosable:t.isClosable,activeItemIndex:0,header:void 0}}return this.createContentItemFromConfig(t,e)}findFirstComponentItemById(t){if(void 0===this._groundItem)throw new J(\"LMFFCIBI82446\");return this.findFirstContentItemTypeByIdRecursive(at.component,t,this._groundItem)}createPopout(t,e,i,n){return t instanceof Gt?this.createPopoutFromContentItem(t,e,i,n):this.createPopoutFromItemConfig(t,e,i,n)}createPopoutFromContentItem(t,e,i,n){let o=t.parent,s=t;for(;null!==o&&1===o.contentItems.length&&!o.isGround;)s=o,o=o.parent;if(null===o)throw new K(\"LMCPFCI00834\");{if(void 0===n&&(n=o.contentItems.indexOf(s)),null!==i&&o.addPopInParentId(i),void 0===e){const i=globalThis.screenX||globalThis.screenLeft,n=globalThis.screenY||globalThis.screenTop,o=t.element.offsetLeft,s=t.element.offsetTop,{width:r,height:a}=kt(t.element);e={left:i+o,top:n+s,width:r,height:a}}const r=t.toConfig();if(t.remove(),ft.isRootItemConfig(r))return this.createPopoutFromItemConfig(r,e,i,n);throw new Error(`${tt[0]}`)}}beginVirtualSizedContainerAdding(){0==++this._virtualSizedContainerAddingBeginCount&&(this._virtualSizedContainers.length=0)}addVirtualSizedContainer(t){this._virtualSizedContainers.push(t)}endVirtualSizedContainerAdding(){if(0==--this._virtualSizedContainerAddingBeginCount){const t=this._virtualSizedContainers.length;if(t>0){this.fireBeforeVirtualRectingEvent(t);for(let e=0;ethis.emit(\"windowOpened\",a))),a.on(\"closed\",(()=>this.reconcilePopoutWindows())),this._openPopouts.push(a),this.layoutConfig.settings.closePopoutsOnUnload&&!this._windowBeforeUnloadListening&&(globalThis.addEventListener(\"beforeunload\",this._windowBeforeUnloadListener,{passive:!0}),this._windowBeforeUnloadListening=!0),a}closeAllOpenPopouts(){for(let t=0;tglobalThis.close()),1)}getArea(t,e){let i=null,n=1/0;for(let o=0;o=s.x1&&t=s.y1&&es.surface&&(n=s.surface,i=s)}return i}calculateItemAreas(){const t=this.getAllContentItems(),e=this._groundItem;if(void 0===e)throw new J(\"LMCIAR44365\");if(1!==t.length){e.contentItems[0].isStack?this._itemAreas=[]:this._itemAreas=e.createSideAreas();for(let e=0;e0){let e=t[0];if(Gt.isComponentItem(e)){const t=e.parent;if(null===t)throw new K(\"LMXLLMI69999\");e=t}if(!Gt.isStack(e))throw new X(\"LMCLLMI19993\");e.maximise()}}}processMaximiseStack(t){if(this._maximisedStack=t,t.on(\"beforeItemDestroyed\",this._maximisedStackBeforeDestroyedListener),t.element.classList.add(\"lm_maximised\"),t.element.insertAdjacentElement(\"afterend\",this._maximisePlaceholder),void 0===this._groundItem)throw new J(\"LMMXI19993\");{this._groundItem.element.prepend(t.element);const{width:e,height:i}=kt(this._containerElement);Tt(t.element,e),At(t.element,i),t.updateSize(!0),t.focusActiveContentItem(),this._maximisedStack.emit(\"maximised\"),this.emit(\"stateChanged\")}}processMinimiseMaximisedStack(){if(void 0===this._maximisedStack)throw new X(\"LMMMS74422\");{const t=this._maximisedStack;if(null===t.parent)throw new K(\"LMMI13668\");t.element.classList.remove(\"lm_maximised\"),this._maximisePlaceholder.insertAdjacentElement(\"afterend\",t.element),this._maximisePlaceholder.remove(),this.updateRootSize(!0),this._maximisedStack=void 0,t.off(\"beforeItemDestroyed\",this._maximisedStackBeforeDestroyedListener),t.emit(\"minimised\"),this.emit(\"stateChanged\")}}reconcilePopoutWindows(){const t=[];for(let e=0;e{this._resizeTimeoutId=void 0,this.beginSizeInvalidation(),this.endSizeInvalidation()}),this.resizeDebounceInterval))}checkClearResizeTimeout(){void 0!==this._resizeTimeoutId&&(clearTimeout(this._resizeTimeoutId),this._resizeTimeoutId=void 0)}setContainer(){var t;const e=document.body,i=null!==(t=this._containerElement)&&void 0!==t?t:e;if(i===e){this.resizeWithContainerAutomatically=!0;const t=document.documentElement;t.style.height=\"100%\",t.style.margin=\"0\",t.style.padding=\"0\",t.style.overflow=\"clip\",e.style.height=\"100%\",e.style.margin=\"0\",e.style.padding=\"0\",e.style.overflow=\"clip\"}this._containerElement=i}onBeforeUnload(){this.destroy()}adjustColumnsResponsive(){if(void 0===this._groundItem)throw new J(\"LMACR20883\");if(this._firstLoad=!1,this.useResponsiveLayout()&&!this._updatingColumnsResponsive&&this._groundItem.contentItems.length>0&&this._groundItem.contentItems[0].isRow){if(void 0===this._groundItem||null===this._width)throw new J(\"LMACR77412\");{const t=this._groundItem.contentItems[0].contentItems.length;if(t<=1)return;{const e=this.layoutConfig.dimensions.defaultMinItemWidth;if(t*e<=this._width)return;{this._updatingColumnsResponsive=!0;const i=t-Math.max(Math.floor(this._width/e),1),n=this._groundItem.contentItems[0],o=this.getAllStacks();if(0===o.length)throw new X(\"LMACRS77413\");{const t=o[0];for(let e=0;en?void 0:{parentItem:t,index:o}}}case 1:if(void 0===this._focusedComponentItem)return;{const t=this._focusedComponentItem.parentItem;return this.tryCreateLocationFromParentItem(t,e)}case 2:{const t=this.findFirstContentItemType(at.stack);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 3:{let t=this.findFirstContentItemType(at.row);return void 0!==t?this.tryCreateLocationFromParentItem(t,e):(t=this.findFirstContentItemType(at.column),void 0!==t?this.tryCreateLocationFromParentItem(t,e):void 0)}case 4:{const t=this.findFirstContentItemType(at.row);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 5:{const t=this.findFirstContentItemType(at.column);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 6:if(void 0===this._groundItem)throw new J(\"LMFLRIF18244\");return void 0!==this.rootItem?void 0:void 0===e||0===e?{parentItem:this._groundItem,index:0}:void 0;case 7:if(void 0===this._groundItem)throw new J(\"LMFLF18244\");{const t=this._groundItem.contentItems;if(0===t.length)return void 0===e||0===e?{parentItem:this._groundItem,index:0}:void 0;{const i=t[0];return this.tryCreateLocationFromParentItem(i,e)}}}}tryCreateLocationFromParentItem(t,e){const i=t.contentItems.length;return void 0===e?{parentItem:t,index:i}:e<0||e>i?void 0:{parentItem:t,index:e}}}!function(t){t.createMaximisePlaceElement=function(t){const e=t.createElement(\"div\");return e.classList.add(\"lm_maximise_place\"),e},t.createTabDropPlaceholderElement=function(t){const e=t.createElement(\"div\");return e.classList.add(\"lm_drop_tab_placeholder\"),e},t.defaultLocationSelectors=[{typeId:1,index:void 0},{typeId:2,index:void 0},{typeId:3,index:void 0},{typeId:7,index:void 0}],t.afterFocusedItemIfPossibleLocationSelectors=[{typeId:0,index:1},{typeId:2,index:void 0},{typeId:3,index:void 0},{typeId:7,index:void 0}]}(ae||(ae={}));class le extends ae{constructor(t,e,i,n){if(super(le.createLayoutManagerConstructorParameters(t,e)),this._bindComponentEventHanlderPassedInConstructor=!1,this._creationTimeoutPassed=!1,void 0!==e&&\"function\"==typeof e&&(this.bindComponentEvent=e,this._bindComponentEventHanlderPassedInConstructor=!0,void 0!==i&&(this.unbindComponentEvent=i)),!this._bindComponentEventHanlderPassedInConstructor&&this.isSubWindow){if(void 0===this._constructorOrSubWindowLayoutConfig)throw new J(\"VLC98823\");{const t=xt.resolve(this._constructorOrSubWindowLayoutConfig);this.layoutConfig=Object.assign(Object.assign({},t),{root:void 0})}}!0!==n&&(this.deprecatedConstructor||this.init())}destroy(){this.bindComponentEvent=void 0,this.unbindComponentEvent=void 0,super.destroy()}init(){if(this._bindComponentEventHanlderPassedInConstructor||\"loading\"!==document.readyState&&null!==document.body){if(!this._bindComponentEventHanlderPassedInConstructor&&!0===this.isSubWindow&&!this._creationTimeoutPassed)return setTimeout((()=>this.init()),7),void(this._creationTimeoutPassed=!0);!0===this.isSubWindow&&(this._bindComponentEventHanlderPassedInConstructor||this.clearHtmlAndAdjustStylesForSubWindow(),window.__glInstance=this),super.init()}else document.addEventListener(\"DOMContentLoaded\",(()=>this.init()),{passive:!0})}clearHtmlAndAdjustStylesForSubWindow(){const t=document.head,e=new Array(4);e[0]=document.querySelectorAll(\"body link\"),e[1]=document.querySelectorAll(\"body style\"),e[2]=document.querySelectorAll(\"template\"),e[3]=document.querySelectorAll(\".gl_keep\");for(let i=0;ithis.emit(\"popIn\"))),document.body.appendChild(t),!0}}bindComponent(t,e){if(void 0!==this.bindComponentEvent){return this.bindComponentEvent(t,e)}if(void 0!==this.getComponentEvent)return{virtual:!1,component:this.getComponentEvent(t,e)};{const t=`${tt[2]}: ${JSON.stringify(e)}`;throw new Z(t)}}unbindComponent(t,e,i){if(void 0!==this.unbindComponentEvent)this.unbindComponentEvent(t);else if(!e&&void 0!==this.releaseComponentEvent){if(void 0===i)throw new J(\"VCUCRCU333998\");this.releaseComponentEvent(t,i)}}}!function(t){let e=!1;t.createLayoutManagerConstructorParameters=function(t,i){const n=e?null:new URL(document.location.href).searchParams.get(\"gl-window\");e=!0;const o=null!==n;let s,r;if(null!==n){const e=localStorage.getItem(n);if(null===e)throw new Error(\"Null gl-window Config\");localStorage.removeItem(n);const i=JSON.parse(e),o=_t.unminifyConfig(i);r=xt.fromResolved(o),t instanceof HTMLElement&&(s=t)}else void 0===t?r=void 0:t instanceof HTMLElement?(r=void 0,s=t):r=t,void 0===s&&i instanceof HTMLElement&&(s=i);return{constructorOrSubWindowLayoutConfig:r,isSubWindow:o,containerElement:s}}}(le||(le={}));class he extends le{constructor(t,e,i){super(t,e,i,!0),this._componentTypesMap=new Map,this._registeredComponentMap=new Map,this._virtuableComponentMap=new Map,this._containerVirtualRectingRequiredEventListener=(t,e,i)=>this.handleContainerVirtualRectingRequiredEvent(t,e,i),this._containerVirtualVisibilityChangeRequiredEventListener=(t,e)=>this.handleContainerVirtualVisibilityChangeRequiredEvent(t,e),this._containerVirtualZIndexChangeRequiredEventListener=(t,e,i)=>this.handleContainerVirtualZIndexChangeRequiredEvent(t,e,i),this.deprecatedConstructor||this.init()}registerComponent(t,e,i=!1){if(\"function\"!=typeof e)throw new $(\"registerComponent() componentConstructorOrFactoryFtn parameter is not a function\");if(e.hasOwnProperty(\"prototype\")){const n=e;this.registerComponentConstructor(t,n,i)}else{const n=e;this.registerComponentFactoryFunction(t,n,i)}}registerComponentConstructor(t,e,i=!1){if(\"function\"!=typeof e)throw new Error(tt[1]);if(void 0!==this._componentTypesMap.get(t))throw new Z(`${tt[3]}: ${t}`);this._componentTypesMap.set(t,{constructor:e,factoryFunction:void 0,virtual:i})}registerComponentFactoryFunction(t,e,i=!1){if(\"function\"!=typeof e)throw new Z(\"Please register a constructor function\");if(void 0!==this._componentTypesMap.get(t))throw new Z(`${tt[3]}: ${t}`);this._componentTypesMap.set(t,{constructor:void 0,factoryFunction:e,virtual:i})}registerComponentFunction(t){this.registerGetComponentConstructorCallback(t)}registerGetComponentConstructorCallback(t){if(\"function\"!=typeof t)throw new Error(\"Please register a callback function\");void 0!==this._getComponentConstructorFtn&&console.warn(\"Multiple component functions are being registered. Only the final registered function will be used.\"),this._getComponentConstructorFtn=t}getRegisteredComponentTypeNames(){const t=this._componentTypesMap.keys();return Array.from(t)}getComponentInstantiator(t){let e;const i=pt.resolveComponentTypeName(t);return void 0!==i&&(e=this._componentTypesMap.get(i)),void 0===e&&void 0!==this._getComponentConstructorFtn&&(e={constructor:this._getComponentConstructorFtn(t),factoryFunction:void 0,virtual:!1}),e}bindComponent(t,e){let i;const n=pt.resolveComponentTypeName(e);let o;if(void 0!==n&&(i=this._componentTypesMap.get(n)),void 0===i&&void 0!==this._getComponentConstructorFtn&&(i={constructor:this._getComponentConstructorFtn(e),factoryFunction:void 0,virtual:!1}),void 0!==i){const s=i.virtual;let r,a;r=void 0===e.componentState?void 0:Ut({},e.componentState);const l=i.constructor;if(void 0!==l)a=new l(t,r,s);else{const e=i.factoryFunction;if(void 0===e)throw new X(\"LMBCFFU10008\");a=e(t,r,s)}if(s){if(void 0===a)throw new J(\"GLBCVCU988774\");{const e=a,i=e.rootHtmlElement;if(void 0===i)throw new Z(`${tt[5]}: ${n}`);!function(t){const e=\"absolute\";t.style.position!==e&&(t.style.position=e)}(i),this.container.appendChild(i),this._virtuableComponentMap.set(t,e),t.virtualRectingRequiredEvent=this._containerVirtualRectingRequiredEventListener,t.virtualVisibilityChangeRequiredEvent=this._containerVirtualVisibilityChangeRequiredEventListener,t.virtualZIndexChangeRequiredEvent=this._containerVirtualZIndexChangeRequiredEventListener}}this._registeredComponentMap.set(t,a),o={virtual:i.virtual,component:a}}else o=super.bindComponent(t,e);return o}unbindComponent(t,e,i){if(void 0===this._registeredComponentMap.get(t))super.unbindComponent(t,e,i);else{const e=this._virtuableComponentMap.get(t);if(void 0!==e){const i=e.rootHtmlElement;if(void 0===i)throw new X(\"GLUC77743\",t.title);this.container.removeChild(i),this._virtuableComponentMap.delete(t)}}}fireBeforeVirtualRectingEvent(t){this._goldenLayoutBoundingClientRect=this.container.getBoundingClientRect(),super.fireBeforeVirtualRectingEvent(t)}handleContainerVirtualRectingRequiredEvent(t,e,i){const n=this._virtuableComponentMap.get(t);if(void 0===n)throw new J(\"GLHCSCE55933\");{const o=n.rootHtmlElement;if(void 0===o)throw new Z(tt[4]+\" \"+t.title);{const n=t.element.getBoundingClientRect(),s=n.left-this._goldenLayoutBoundingClientRect.left;o.style.left=zt(s);const r=n.top-this._goldenLayoutBoundingClientRect.top;o.style.top=zt(r),Tt(o,e),At(o,i)}}}handleContainerVirtualVisibilityChangeRequiredEvent(t,e){const i=this._virtuableComponentMap.get(t);if(void 0===i)throw new J(\"GLHCVVCRE55934\");{const n=i.rootHtmlElement;if(void 0===n)throw new Z(tt[4]+\" \"+t.title);Dt(n,e)}}handleContainerVirtualZIndexChangeRequiredEvent(t,e,i){const n=this._virtuableComponentMap.get(t);if(void 0===n)throw new J(\"GLHCVZICRE55935\");{const e=n.rootHtmlElement;if(void 0===e)throw new Z(tt[4]+\" \"+t.title);e.style.zIndex=i}}}const de=\"initial_\",ce={show:\"top\",popout:!1,maximise:!1,close:\"close-tab-unused\"},me={headerHeight:31},ue={hasHeaders:!0,reorderEnabled:!0},pe={popoutWholeStack:!1,constrainDragToContainer:!1,constrainDragToHeaders:!1,preventDragout:!1,showMaximiseIcon:!1,showPopoutIcon:!1,showCloseIcon:!1,blockedPopoutsThrowError:!0,closePopoutsOnUnload:!0,selectionEnabled:!1};var ge,fe;class ve{constructor(e){this.layout=e,ge.set(this,void 0),fe.set(this,void 0),this.handleResize=t=>{t.forEach((t=>this.resizeElement(t.target)))},this.handleMutation=()=>{this.layout.viewComponentsByContainerElement.forEach((t=>{this.resizeElement(t.container.element)}))},t.__classPrivateFieldSet(this,ge,new ResizeObserver(this.handleResize),\"f\"),t.__classPrivateFieldSet(this,fe,new MutationObserver(this.handleMutation),\"f\")}observeMutations(e){t.__classPrivateFieldGet(this,fe,\"f\")?.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[\"class\"]})}destroy(){t.__classPrivateFieldGet(this,ge,\"f\").disconnect(),t.__classPrivateFieldGet(this,fe,\"f\").disconnect()}observeContainer(e){t.__classPrivateFieldGet(this,ge,\"f\").observe(e)}unobserveContainer(e){t.__classPrivateFieldGet(this,ge,\"f\").unobserve(e)}resizeElement(t){const e=this.layout.viewComponentsByContainerElement.get(t);e&&e.resize()}}ge=new WeakMap,fe=new WeakMap;var _e={};Object.defineProperty(_e,\"__esModule\",{value:!0});var ye=_e.BaseItem=void 0;class Ce{constructor(t,e,i){this._item=t,this._layout=e,this._wrap=i}get raw(){return this._item}get layout(){return this._layout}get type(){return this._item.type}get contentItems(){return(this._item.contentItems??[]).map((t=>this._wrap(t)))}get parent(){const t=this._item.parent;return t?this._wrap(t):null}setActiveContentItem(t,e){if(\"stack\"!==this.type)throw new Error(`Cannot call setActiveContentItem from a non-stack item: ${this.type}`);this._item.setActiveContentItem(t.raw,e)}static wrapInternal(t,e,i){const n=Ce.wrapCache.get(e);if(n)return n;const o=new t(e,i,(e=>Ce.wrapInternal(t,e,i)));return Ce.wrapCache.set(e,o),o}}ye=_e.BaseItem=Ce,Ce.wrapCache=new WeakMap;const we=t=>!!t&&\"contentItems\"in t&&(t.isRow||t.isColumn);class Ie extends ye{isRoot(){return!!this._item.parent?.isGround}getBounds(){return this._item.element.getBoundingClientRect()}get viewName(){if(this._item.isComponent){const{component:t}=this._item;return t.identity.name}throw new Error(\"View name not found\")}onDestroyed(t){const e=({target:i})=>{i===this._item&&(t(),this._item.off(\"itemDestroyed\",e))};this._item.on(\"itemDestroyed\",e)}createAdjacentStack({position:t=\"right\"}={}){const e=this.raw;if(ee.isStack(e)&&e.parent){const i=[\"top\",\"bottom\"].includes(t)?\"column\":\"row\",n=[\"left\",\"top\"].includes(t)?1:0,o=we(e.parent)?e.parent:e.layoutManager,s=o,r=e.parent.contentItems.indexOf(e);e.parent.isGround&&e.parent.removeChild(e,!0);const a=o.newItem({type:i,content:[{type:\"stack\",content:[]}]},r);if(!a)throw new Error(\"createAdjacentStack: Failed to create new container\");const l=a.contentItems[0];return a.addChild(this.raw,n),we(s)&&s.removeChild(e,!0),this._wrap(l)}throw new Error(`Cannot creat adjacent stacks for type: ${e.type}, must be type 'stack'`)}setActiveContentItem(t,e=!0){if(!ee.isStack(this._item))throw new Error(`Cannot call setActiveContentItem from a non-stack item: ${this.type}`);this._item.setActiveComponentItem(t.raw,!e)}static wrap(t,e){return ye.wrapInternal(Ie,t,e)}}function be(t=[],e){for(const i of t)\"component\"===i.type?Object.keys(e).forEach((t=>{t in i&&(i.componentState={[`${de}${t}`]:i[t],...i.componentState}),i[t]=e[t]})):be(i.content,e)}function Se(t=[],e,i){for(const n of t)if(\"component\"===n.type)Object.keys(e).forEach((t=>{if(`${de}${t}`in n.componentState)return n[t]=n.componentState[`${de}${t}`],void delete n.componentState[`${de}${t}`];n[t]=e[t]}));else{if(n.size&&(\"row\"===i||\"column\"===i)){n[\"row\"===i?\"width\":\"height\"]=n.size?.includes(\".\")?parseFloat(n.size):parseInt(n.size)}Se(n.content,e,n.type)}}function Ee(t){if(t.root){t.root.content&&Se([t.root],{componentName:\"view\",isClosable:!0});const e=t.root;t.content=[e],delete t.root}return t}const xe=e=>class extends e{connectedCallback(){if(!this.name||!this.uuid)throw new Error(\" Name or uuid attribute missing\");if(!this.src)throw new Error(\" missing 'src' attribute.\");this.#t||(this.#t=document.createElement(\"iframe\"),this.#t.src=this.src,this.#t.style.height=\"100%\",this.#t.style.width=\"100%\",this.#t.style.border=\"none\",this.forceFrameName?this.#t.setAttribute(\"name\",this.forceFrameName):this.#t.setAttribute(\"name\",t.encodeOptions({brokerUrl:this.brokerUrl,name:this.name,uuid:this.uuid,providerId:this.providerId,contextGroup:this.contextGroup},\"of-frame\")),this.#t.setAttribute(\"id\",this.name),this.appendChild(this.#t))}#t;get brokerUrl(){return this.getAttribute(\"of-broker\")}set brokerUrl(t){t&&this.setAttribute(\"of-broker\",t)}get name(){return this.getAttribute(\"of-name\")}set name(t){t&&this.setAttribute(\"of-name\",t)}get forceFrameName(){return this.getAttribute(\"forceFrameName\")}set forceFrameName(t){t&&this.setAttribute(\"forceFrameName\",t)}get uuid(){return this.getAttribute(\"of-uuid\")}set uuid(t){t&&this.setAttribute(\"of-uuid\",t)}get src(){return this.getAttribute(\"src\")}set src(t){t&&this.setAttribute(\"src\",t)}get providerId(){return this.getAttribute(\"of-provider-id\")}set providerId(t){t&&this.setAttribute(\"of-provider-id\",t)}get contextGroup(){return this.getAttribute(\"of-context-group\")}set contextGroup(t){t&&this.setAttribute(\"of-context-group\",t)}static get observedAttributes(){return[\"name\"]}};class Le{static create(t){const e=document.createElement(\"of-view\");return Object.entries(t).forEach((([t,i])=>{e.setAttribute(t,i)})),e}}customElements.define(\"of-view\",xe(HTMLElement));class ze{constructor(t,i,n,{brokerUrl:o,interopConfig:s},r){this.container=t,this.config=i,this.ofView=null,this.isDragging=()=>this.container.tab.element?.className.includes(\"lm_dragging\")??!1;const{url:a,web:l,interop:h,name:d}=i||{},c=d??`internal-generated-view-${e.v4()}`;if(this.identity={uuid:n,name:c},this.container.element.setAttribute(\"of-name\",c),this.container.element.id=`container-${c}`,this.container.parent.id=c,void 0===a)return void this.handleUrlMissing();const m=this.updateTitleIfNotSet(a),u={\"of-broker\":o,\"of-uuid\":n,\"of-name\":c,src:a};l?.frameName&&(u.forceFrameName=l.frameName);const p=h?.currentContextGroup??s?.currentContextGroup;p&&(u[\"of-context-group\"]=p),s?.providerId&&(u[\"of-provider-id\"]=s?.providerId),this.ofView=Le.create(u),this.ofView.title=m??`Iframe: ${a}`,r.appendChild(this.ofView),this.ofView.style.position=\"absolute\"}updateTitleIfNotSet(t){return\"view\"===this.container.parent.title&&this.container.parent.setTitle(t),this.container.parent.title}handleUrlMissing(){const t=document.createElement(\"div\");t.setAttribute(\"style\",\"padding: 20px\");t.innerText=\"No URL provided\",this.container.element.appendChild(t)}destroy(){this.ofView?.remove(),this.ofView=null}closeView(){this.container.close()}resize(){if(this.ofView){if(this.isDragging())return void(this.ofView.style.display=\"none\");const t=this.container.element.getBoundingClientRect();this.ofView.style.position=\"absolute\",this.ofView.style.height=`${t.height}px`,this.ofView.style.width=`${t.width}px`,this.ofView.style.inset=`${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`,this.ofView.style.display=\"block\"}}}class Me extends U{static overrideConfig(t){const e={...ue,...t.settings,...pe};return e.reorderEnabled?be(t.content,{isClosable:!0}):be(t.content,{reorderEnabled:!1}),{dimensions:me,...t,settings:e,header:{...ce,show:!1!==t.settings?.hasHeaders&&ce.show}}}constructor(t,e,i,{options:n},o,s){super(),this.identity=t,this.container=e,this.initialConfig=i,this.layoutManager=o,this.platformProvider=s,this.viewComponentsByContainerElement=new Map,this.layoutContentCache=_.getSingleInstance(),this.reparentingViews=new Set,this.goldenLayoutDestroyed=!1,this.createViewComponent=(t,e)=>{m.handleSharedView(this.layoutManager,this.identity,e);const i=new ze(t,e,this.identity.uuid,this.options,this.iframeContainer);return e&&!1===e[`${de}isClosable`]&&this.stylesheet.insertRule(`#tab-${i.identity.name} .lm_close_tab { display: none; }`),this.viewComponentsByContainerElement.set(t.element,i),this.resizeController.observeContainer(t.element),i},this.iframeContainer=document.createElement(\"div\"),this.iframeContainer.id=`openfin-layout-iframe-container-${this.identity.layoutName}`,this.domEmitter=new V(e),this.setupStylesheets(),this.layout=new he(this.container),this.layout.resizeWithContainerAutomatically=!0,this.options=n,this.layout.registerComponent(\"view\",this.createViewComponent),this.setupListeners(),this.resizeController=new ve(this),this.layout.loadLayout(Me.overrideConfig(i));const r=document.createElement(\"div\");r.id=`openfin-layout-shadow-container-${this.identity.layoutName}`,r.attachShadow({mode:\"open\",delegatesFocus:!1}).appendChild(this.iframeContainer),this.container.appendChild(r),this.resizeController.observeMutations(this.container)}getStackByView({name:t}){const e=this.layout.findFirstComponentItemById(t);if(e?.parent&&e?.parent?.isStack)return Ie.wrap(e.parent,this)}getRoot(){return Ie.wrap(this.layout.rootItem,this)}async platformCloseView(t){const e=[...this.viewComponentsByContainerElement.values()].find((e=>e.identity.name===t.name));if(!e)throw new Error(`View with name: ${t.name} not found in layout.`);e.closeView()}async platformCreateView(t,{location:e,targetView:i}={}){if(i)throw new Error(\"TargetView not supported in web\");const n={options:this.platformProvider.normalizeOptions(t),target:this.identity,location:e};return this.insertView(n)}setupStylesheets(){if(this.container.setAttribute(\"data-openfin-layout-name\",this.identity.layoutName),this.stylesheet=new CSSStyleSheet,this.stylesheet.insertRule(\".lm_close { display: none; }\"),document.adoptedStyleSheets.push(this.stylesheet),this.initialConfig.settings?.preventSplitterResize){const t=`\\n [data-openfin-layout-name='${this.identity.layoutName}'] .lm_splitter {\\n pointer-events: none;\\n }`;this.stylesheet.insertRule(t)}}insertView({options:t,location:e,targetView:i}){const n=e?this.layoutContentCache.getItemOrUndefined(e.id):void 0,o=i?this.layoutContentCache.getItemOrUndefined(i.name):void 0,s=n??o??Ie.wrap(this.layout.rootItem,this);let r;if(ee.isStack(s.raw))r=s.raw;else{if(!we(s.raw))throw new Error(\"Cannot add a view at the requested location\");r=s.raw.newItem({type:\"stack\",content:[]})}const a=Math.min(r.contentItems.length,e?.index??r.contentItems.length);let l=this.layout.findFirstComponentItemById(t.name);l?(l.parent&&l.parent.removeChild(l,!0),r.addChild(l,a)):l=r.newComponent(\"view\",t,t.title??t.url??\"Default Title\",a);const h=l.component.identity;return Promise.resolve({identity:h})}replaceView({viewToReplace:t,newView:e}){throw new Error(\"Method not implemented.\")}replaceLayout(t){throw new Error(\"Method not implemented.\")}async cleanupView(t){}applyPreset(t){throw new Error(\"Method not implemented.\")}getCurrentViews(){return[...this.viewComponentsByContainerElement.values()].map((t=>t.identity))}async getFrameSnapshot(){return Ee(xt.fromResolved(this.layout.toConfig()))}isVisible(){return W(this.container)}async onViewDetached({viewIdentity:t}){this.reparentingViews.add(t.name),this.platformCloseView(t)}async destroy(){this.goldenLayoutDestroyed||(this.goldenLayoutDestroyed=!0,this.layout.destroy()),this.iframeContainer.remove(),this.resizeController.destroy(),document.adoptedStyleSheets=document.adoptedStyleSheets.filter((t=>t!==this.stylesheet)),this.viewComponentsByContainerElement.clear()}setupListeners(){this.container.addEventListener(\"pointerdown\",(t=>{if(t.target instanceof HTMLElement){const e=t.target.classList;[\"lm_tab\",\"lm_title\",\"lm_splitter\",\"lm_drag_handle\"].some((t=>e.contains(t)))&&(this.handleDragStart(),2===t.button&&t.stopPropagation())}}),!0),document.addEventListener(\"pointerup\",(()=>this.handleDragEnd()),!0),this.layout.on(\"tabCreated\",(t=>{const e=t.componentItem.component;t.element.id=`tab-${e.identity.name}`,this.domEmitter.dispatchLocalEvent(\"tab-created\",e.identity)})),this.layout.on(\"itemCreated\",(({target:t})=>{const e=t;if(Gt.isComponentItem(e)){const t=e.component;this.domEmitter.dispatchLocalEvent(\"container-created\",t.identity)}})),this.layout.on(\"itemDestroyed\",(t=>{const e=t.target;if(Gt.isComponentItem(e)){const t=e.component;this.removeViewComponent(t)}})),this.layout.on(\"itemDropped\",(()=>{this.handleDragEnd()}))}handleDragStart(){this.iframeContainer.style.pointerEvents=\"none\"}handleDragEnd(){this.iframeContainer.style.pointerEvents=\"\"}removeViewComponent(t){if(t.config&&!1===t.config[`${de}isClosable`]){const e=[...this.stylesheet.cssRules].findIndex((e=>e.cssText.includes(`#tab-${t.identity.name}`)));this.stylesheet.deleteRule(e)}t.destroy(),this.viewComponentsByContainerElement.delete(t.container.element),this.resizeController.unobserveContainer(t.container.element),this.reparentingViews.has(t.identity.name)?this.reparentingViews.delete(t.identity.name):this.platformProvider.closeView(t.identity.name);0===this.getCurrentViews().length&&(this.goldenLayoutDestroyed||(this.goldenLayoutDestroyed=!0,m.handleLastViewRemoved(this.layoutManager,this.identity)))}}class Pe{constructor(t,e,i,n){this.windowIdentity=t,this.connectConfig=e,this.provider=i,this.fallbackContainer=n}async createLayout(t,e){if(!(\"container\"in t)&&!this.fallbackContainer)throw new Error(\"Container property is not optional in web\");const{layoutName:i}=t,n=t,o=this.provider.initLayoutViews(n),s=n.container??this.fallbackContainer,r={...this.windowIdentity,layoutName:i},a=new Me(r,s,o,this.connectConfig,e,this.provider);m.registerLayout(e,i,a),this.fallbackContainer=null}async getLayoutSnapshot(t){return t.getLayoutSnapshot()}async handleLastViewRemoved(t){}}class Te{static async init(e){const i=e.getFin().InterApplicationBus.Channel,n=await i.create(`custom-frame-${e.me.uuid}`);return n.setDefaultAction((async(t,{target:e,opts:i},o)=>{const s=n.connections.find((t=>t.name===e.name));if(s)return n.dispatch(s,t,{...i,target:e});throw new Error(`Client with name ${e.name} not found`)})),await t.relayChannelClientApi_1(n,\"layout-relay\"),new Te(e)}constructor(t){this.wire=t,this.viewNames=new Set}normalizeOptions(t,i=\"default\"){const n=this.wire.me.uuid;let{name:o=`internal-generated-view-${e.v4()}`}=t;return o.match(/^internal-generated-view-/)&&this.viewNames.has(o)&&\"duplicate\"===i&&(o=`internal-generated-view-${e.v4()}`),this.viewNames.add(o),{...t,name:o,uuid:n}}closeView(t){this.viewNames.delete(t)}initLayoutViews({layout:t,multiInstanceViewBehavior:e}){return H((t=>{if(\"component\"===t.type&&t.componentState){const i=this.normalizeOptions(t.componentState,e);return{...t,componentState:i}}return t}),t)}}var Ae;const ke=t=>t;Ae=new WeakMap,exports.WebLayoutEntryPoint=class{constructor(e){Ae.set(this,void 0),this.initLayoutManager=async(e,i,{container:n,layoutManagerOverride:o})=>{const s=await Te.init(i),r=o??ke,a=new Pe(i.me,t.__classPrivateFieldGet(this,Ae,\"f\"),s,n),l=new(r(m.createClosedConstructor(a)));return await M(i,l),l},this.applyLayoutSnapshot=async(e,i,n)=>{await i.applyLayoutSnapshot(t.__classPrivateFieldGet(this,Ae,\"f\").platform.layoutSnapshot)},this.createLayout=async(t,e)=>m.createLayout(t,e),this.destroyLayout=async(t,e)=>m.destroyLayout(t,e),t.__classPrivateFieldSet(this,Ae,e,\"f\")}};\n","'use strict'\n\nexports.byteLength = byteLength\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\nfor (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i]\n revLookup[code.charCodeAt(i)] = i\n}\n\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction getLens (b64) {\n var len = b64.length\n\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // Trim off extra bytes after placeholder bytes are found\n // See: https://github.com/beatgammit/base64-js/issues/42\n var validLen = b64.indexOf('=')\n if (validLen === -1) validLen = len\n\n var placeHoldersLen = validLen === len\n ? 0\n : 4 - (validLen % 4)\n\n return [validLen, placeHoldersLen]\n}\n\n// base64 is 4/3 + up to two characters of the original data\nfunction byteLength (b64) {\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction _byteLength (b64, validLen, placeHoldersLen) {\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction toByteArray (b64) {\n var tmp\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n\n var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))\n\n var curByte = 0\n\n // if there are placeholders, only get up to the last complete 4 chars\n var len = placeHoldersLen > 0\n ? validLen - 4\n : validLen\n\n var i\n for (i = 0; i < len; i += 4) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 18) |\n (revLookup[b64.charCodeAt(i + 1)] << 12) |\n (revLookup[b64.charCodeAt(i + 2)] << 6) |\n revLookup[b64.charCodeAt(i + 3)]\n arr[curByte++] = (tmp >> 16) & 0xFF\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 2) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 2) |\n (revLookup[b64.charCodeAt(i + 1)] >> 4)\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 1) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 10) |\n (revLookup[b64.charCodeAt(i + 1)] << 4) |\n (revLookup[b64.charCodeAt(i + 2)] >> 2)\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] +\n lookup[num >> 12 & 0x3F] +\n lookup[num >> 6 & 0x3F] +\n lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n var tmp\n var output = []\n for (var i = start; i < end; i += 3) {\n tmp =\n ((uint8[i] << 16) & 0xFF0000) +\n ((uint8[i + 1] << 8) & 0xFF00) +\n (uint8[i + 2] & 0xFF)\n output.push(tripletToBase64(tmp))\n }\n return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n var tmp\n var len = uint8.length\n var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n var parts = []\n var maxChunkLength = 16383 // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1]\n parts.push(\n lookup[tmp >> 2] +\n lookup[(tmp << 4) & 0x3F] +\n '=='\n )\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + uint8[len - 1]\n parts.push(\n lookup[tmp >> 10] +\n lookup[(tmp >> 4) & 0x3F] +\n lookup[(tmp << 2) & 0x3F] +\n '='\n )\n }\n\n return parts.join('')\n}\n","/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n/* eslint-disable no-proto */\n\n'use strict'\n\nconst base64 = require('base64-js')\nconst ieee754 = require('ieee754')\nconst customInspectSymbol =\n (typeof Symbol === 'function' && typeof Symbol['for'] === 'function') // eslint-disable-line dot-notation\n ? Symbol['for']('nodejs.util.inspect.custom') // eslint-disable-line dot-notation\n : null\n\nexports.Buffer = Buffer\nexports.SlowBuffer = SlowBuffer\nexports.INSPECT_MAX_BYTES = 50\n\nconst K_MAX_LENGTH = 0x7fffffff\nexports.kMaxLength = K_MAX_LENGTH\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Print warning and recommend using `buffer` v4.x which has an Object\n * implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * We report that the browser does not support typed arrays if the are not subclassable\n * using __proto__. Firefox 4-29 lacks support for adding new properties to `Uint8Array`\n * (See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438). IE 10 lacks support\n * for __proto__ and has a buggy typed array implementation.\n */\nBuffer.TYPED_ARRAY_SUPPORT = typedArraySupport()\n\nif (!Buffer.TYPED_ARRAY_SUPPORT && typeof console !== 'undefined' &&\n typeof console.error === 'function') {\n console.error(\n 'This browser lacks typed array (Uint8Array) support which is required by ' +\n '`buffer` v5.x. Use `buffer` v4.x if you require old browser support.'\n )\n}\n\nfunction typedArraySupport () {\n // Can typed array instances can be augmented?\n try {\n const arr = new Uint8Array(1)\n const proto = { foo: function () { return 42 } }\n Object.setPrototypeOf(proto, Uint8Array.prototype)\n Object.setPrototypeOf(arr, proto)\n return arr.foo() === 42\n } catch (e) {\n return false\n }\n}\n\nObject.defineProperty(Buffer.prototype, 'parent', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.buffer\n }\n})\n\nObject.defineProperty(Buffer.prototype, 'offset', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.byteOffset\n }\n})\n\nfunction createBuffer (length) {\n if (length > K_MAX_LENGTH) {\n throw new RangeError('The value \"' + length + '\" is invalid for option \"size\"')\n }\n // Return an augmented `Uint8Array` instance\n const buf = new Uint8Array(length)\n Object.setPrototypeOf(buf, Buffer.prototype)\n return buf\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new TypeError(\n 'The \"string\" argument must be of type string. Received type number'\n )\n }\n return allocUnsafe(arg)\n }\n return from(arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\nfunction from (value, encodingOrOffset, length) {\n if (typeof value === 'string') {\n return fromString(value, encodingOrOffset)\n }\n\n if (ArrayBuffer.isView(value)) {\n return fromArrayView(value)\n }\n\n if (value == null) {\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n }\n\n if (isInstance(value, ArrayBuffer) ||\n (value && isInstance(value.buffer, ArrayBuffer))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof SharedArrayBuffer !== 'undefined' &&\n (isInstance(value, SharedArrayBuffer) ||\n (value && isInstance(value.buffer, SharedArrayBuffer)))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof value === 'number') {\n throw new TypeError(\n 'The \"value\" argument must not be of type number. Received type number'\n )\n }\n\n const valueOf = value.valueOf && value.valueOf()\n if (valueOf != null && valueOf !== value) {\n return Buffer.from(valueOf, encodingOrOffset, length)\n }\n\n const b = fromObject(value)\n if (b) return b\n\n if (typeof Symbol !== 'undefined' && Symbol.toPrimitive != null &&\n typeof value[Symbol.toPrimitive] === 'function') {\n return Buffer.from(value[Symbol.toPrimitive]('string'), encodingOrOffset, length)\n }\n\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n return from(value, encodingOrOffset, length)\n}\n\n// Note: Change prototype *after* Buffer.from is defined to workaround Chrome bug:\n// https://github.com/feross/buffer/pull/148\nObject.setPrototypeOf(Buffer.prototype, Uint8Array.prototype)\nObject.setPrototypeOf(Buffer, Uint8Array)\n\nfunction assertSize (size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be of type number')\n } else if (size < 0) {\n throw new RangeError('The value \"' + size + '\" is invalid for option \"size\"')\n }\n}\n\nfunction alloc (size, fill, encoding) {\n assertSize(size)\n if (size <= 0) {\n return createBuffer(size)\n }\n if (fill !== undefined) {\n // Only pay attention to encoding if it's a string. This\n // prevents accidentally sending in a number that would\n // be interpreted as a start offset.\n return typeof encoding === 'string'\n ? createBuffer(size).fill(fill, encoding)\n : createBuffer(size).fill(fill)\n }\n return createBuffer(size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n return alloc(size, fill, encoding)\n}\n\nfunction allocUnsafe (size) {\n assertSize(size)\n return createBuffer(size < 0 ? 0 : checked(size) | 0)\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n return allocUnsafe(size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n return allocUnsafe(size)\n}\n\nfunction fromString (string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8'\n }\n\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n\n const length = byteLength(string, encoding) | 0\n let buf = createBuffer(length)\n\n const actual = buf.write(string, encoding)\n\n if (actual !== length) {\n // Writing a hex string, for example, that contains invalid characters will\n // cause everything after the first invalid character to be ignored. (e.g.\n // 'abxxcd' will be treated as 'ab')\n buf = buf.slice(0, actual)\n }\n\n return buf\n}\n\nfunction fromArrayLike (array) {\n const length = array.length < 0 ? 0 : checked(array.length) | 0\n const buf = createBuffer(length)\n for (let i = 0; i < length; i += 1) {\n buf[i] = array[i] & 255\n }\n return buf\n}\n\nfunction fromArrayView (arrayView) {\n if (isInstance(arrayView, Uint8Array)) {\n const copy = new Uint8Array(arrayView)\n return fromArrayBuffer(copy.buffer, copy.byteOffset, copy.byteLength)\n }\n return fromArrayLike(arrayView)\n}\n\nfunction fromArrayBuffer (array, byteOffset, length) {\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\"offset\" is outside of buffer bounds')\n }\n\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\"length\" is outside of buffer bounds')\n }\n\n let buf\n if (byteOffset === undefined && length === undefined) {\n buf = new Uint8Array(array)\n } else if (length === undefined) {\n buf = new Uint8Array(array, byteOffset)\n } else {\n buf = new Uint8Array(array, byteOffset, length)\n }\n\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(buf, Buffer.prototype)\n\n return buf\n}\n\nfunction fromObject (obj) {\n if (Buffer.isBuffer(obj)) {\n const len = checked(obj.length) | 0\n const buf = createBuffer(len)\n\n if (buf.length === 0) {\n return buf\n }\n\n obj.copy(buf, 0, 0, len)\n return buf\n }\n\n if (obj.length !== undefined) {\n if (typeof obj.length !== 'number' || numberIsNaN(obj.length)) {\n return createBuffer(0)\n }\n return fromArrayLike(obj)\n }\n\n if (obj.type === 'Buffer' && Array.isArray(obj.data)) {\n return fromArrayLike(obj.data)\n }\n}\n\nfunction checked (length) {\n // Note: cannot use `length < K_MAX_LENGTH` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= K_MAX_LENGTH) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + K_MAX_LENGTH.toString(16) + ' bytes')\n }\n return length | 0\n}\n\nfunction SlowBuffer (length) {\n if (+length != length) { // eslint-disable-line eqeqeq\n length = 0\n }\n return Buffer.alloc(+length)\n}\n\nBuffer.isBuffer = function isBuffer (b) {\n return b != null && b._isBuffer === true &&\n b !== Buffer.prototype // so Buffer.isBuffer(Buffer.prototype) will be false\n}\n\nBuffer.compare = function compare (a, b) {\n if (isInstance(a, Uint8Array)) a = Buffer.from(a, a.offset, a.byteLength)\n if (isInstance(b, Uint8Array)) b = Buffer.from(b, b.offset, b.byteLength)\n if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n throw new TypeError(\n 'The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array'\n )\n }\n\n if (a === b) return 0\n\n let x = a.length\n let y = b.length\n\n for (let i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i]\n y = b[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n switch (String(encoding).toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'latin1':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return true\n default:\n return false\n }\n}\n\nBuffer.concat = function concat (list, length) {\n if (!Array.isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n\n if (list.length === 0) {\n return Buffer.alloc(0)\n }\n\n let i\n if (length === undefined) {\n length = 0\n for (i = 0; i < list.length; ++i) {\n length += list[i].length\n }\n }\n\n const buffer = Buffer.allocUnsafe(length)\n let pos = 0\n for (i = 0; i < list.length; ++i) {\n let buf = list[i]\n if (isInstance(buf, Uint8Array)) {\n if (pos + buf.length > buffer.length) {\n if (!Buffer.isBuffer(buf)) buf = Buffer.from(buf)\n buf.copy(buffer, pos)\n } else {\n Uint8Array.prototype.set.call(\n buffer,\n buf,\n pos\n )\n }\n } else if (!Buffer.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n } else {\n buf.copy(buffer, pos)\n }\n pos += buf.length\n }\n return buffer\n}\n\nfunction byteLength (string, encoding) {\n if (Buffer.isBuffer(string)) {\n return string.length\n }\n if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) {\n return string.byteLength\n }\n if (typeof string !== 'string') {\n throw new TypeError(\n 'The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. ' +\n 'Received type ' + typeof string\n )\n }\n\n const len = string.length\n const mustMatch = (arguments.length > 2 && arguments[2] === true)\n if (!mustMatch && len === 0) return 0\n\n // Use a for loop to avoid recursion\n let loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'ascii':\n case 'latin1':\n case 'binary':\n return len\n case 'utf8':\n case 'utf-8':\n return utf8ToBytes(string).length\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return len * 2\n case 'hex':\n return len >>> 1\n case 'base64':\n return base64ToBytes(string).length\n default:\n if (loweredCase) {\n return mustMatch ? -1 : utf8ToBytes(string).length // assume utf8\n }\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n let loweredCase = false\n\n // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n // property of a typed array.\n\n // This behaves neither like String nor Uint8Array in that we set start/end\n // to their upper/lower bounds if the value passed is out of range.\n // undefined is handled specially as per ECMA-262 6th Edition,\n // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n if (start === undefined || start < 0) {\n start = 0\n }\n // Return early if start > this.length. Done here to prevent potential uint32\n // coercion fail below.\n if (start > this.length) {\n return ''\n }\n\n if (end === undefined || end > this.length) {\n end = this.length\n }\n\n if (end <= 0) {\n return ''\n }\n\n // Force coercion to uint32. This will also coerce falsey/NaN values to 0.\n end >>>= 0\n start >>>= 0\n\n if (end <= start) {\n return ''\n }\n\n if (!encoding) encoding = 'utf8'\n\n while (true) {\n switch (encoding) {\n case 'hex':\n return hexSlice(this, start, end)\n\n case 'utf8':\n case 'utf-8':\n return utf8Slice(this, start, end)\n\n case 'ascii':\n return asciiSlice(this, start, end)\n\n case 'latin1':\n case 'binary':\n return latin1Slice(this, start, end)\n\n case 'base64':\n return base64Slice(this, start, end)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return utf16leSlice(this, start, end)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = (encoding + '').toLowerCase()\n loweredCase = true\n }\n }\n}\n\n// This property is used by `Buffer.isBuffer` (and the `is-buffer` npm package)\n// to detect a Buffer instance. It's not possible to use `instanceof Buffer`\n// reliably in a browserify context because there could be multiple different\n// copies of the 'buffer' package in use. This method works even for Buffer\n// instances that were created from another copy of the `buffer` package.\n// See: https://github.com/feross/buffer/issues/154\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n const i = b[n]\n b[n] = b[m]\n b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n const len = this.length\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits')\n }\n for (let i = 0; i < len; i += 2) {\n swap(this, i, i + 1)\n }\n return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n const len = this.length\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits')\n }\n for (let i = 0; i < len; i += 4) {\n swap(this, i, i + 3)\n swap(this, i + 1, i + 2)\n }\n return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n const len = this.length\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits')\n }\n for (let i = 0; i < len; i += 8) {\n swap(this, i, i + 7)\n swap(this, i + 1, i + 6)\n swap(this, i + 2, i + 5)\n swap(this, i + 3, i + 4)\n }\n return this\n}\n\nBuffer.prototype.toString = function toString () {\n const length = this.length\n if (length === 0) return ''\n if (arguments.length === 0) return utf8Slice(this, 0, length)\n return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.toLocaleString = Buffer.prototype.toString\n\nBuffer.prototype.equals = function equals (b) {\n if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n if (this === b) return true\n return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n let str = ''\n const max = exports.INSPECT_MAX_BYTES\n str = this.toString('hex', 0, max).replace(/(.{2})/g, '$1 ').trim()\n if (this.length > max) str += ' ... '\n return ''\n}\nif (customInspectSymbol) {\n Buffer.prototype[customInspectSymbol] = Buffer.prototype.inspect\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n if (isInstance(target, Uint8Array)) {\n target = Buffer.from(target, target.offset, target.byteLength)\n }\n if (!Buffer.isBuffer(target)) {\n throw new TypeError(\n 'The \"target\" argument must be one of type Buffer or Uint8Array. ' +\n 'Received type ' + (typeof target)\n )\n }\n\n if (start === undefined) {\n start = 0\n }\n if (end === undefined) {\n end = target ? target.length : 0\n }\n if (thisStart === undefined) {\n thisStart = 0\n }\n if (thisEnd === undefined) {\n thisEnd = this.length\n }\n\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError('out of range index')\n }\n\n if (thisStart >= thisEnd && start >= end) {\n return 0\n }\n if (thisStart >= thisEnd) {\n return -1\n }\n if (start >= end) {\n return 1\n }\n\n start >>>= 0\n end >>>= 0\n thisStart >>>= 0\n thisEnd >>>= 0\n\n if (this === target) return 0\n\n let x = thisEnd - thisStart\n let y = end - start\n const len = Math.min(x, y)\n\n const thisCopy = this.slice(thisStart, thisEnd)\n const targetCopy = target.slice(start, end)\n\n for (let i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i]\n y = targetCopy[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (numberIsNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [val], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n let indexSize = 1\n let arrLength = arr.length\n let valLength = val.length\n\n if (encoding !== undefined) {\n encoding = String(encoding).toLowerCase()\n if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n encoding === 'utf16le' || encoding === 'utf-16le') {\n if (arr.length < 2 || val.length < 2) {\n return -1\n }\n indexSize = 2\n arrLength /= 2\n valLength /= 2\n byteOffset /= 2\n }\n }\n\n function read (buf, i) {\n if (indexSize === 1) {\n return buf[i]\n } else {\n return buf.readUInt16BE(i * indexSize)\n }\n }\n\n let i\n if (dir) {\n let foundIndex = -1\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1) foundIndex = i\n if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n } else {\n if (foundIndex !== -1) i -= i - foundIndex\n foundIndex = -1\n }\n }\n } else {\n if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n for (i = byteOffset; i >= 0; i--) {\n let found = true\n for (let j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false\n break\n }\n }\n if (found) return i\n }\n }\n\n return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n offset = Number(offset) || 0\n const remaining = buf.length - offset\n if (!length) {\n length = remaining\n } else {\n length = Number(length)\n if (length > remaining) {\n length = remaining\n }\n }\n\n const strLen = string.length\n\n if (length > strLen / 2) {\n length = strLen / 2\n }\n let i\n for (i = 0; i < length; ++i) {\n const parsed = parseInt(string.substr(i * 2, 2), 16)\n if (numberIsNaN(parsed)) return i\n buf[offset + i] = parsed\n }\n return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n // Buffer#write(string)\n if (offset === undefined) {\n encoding = 'utf8'\n length = this.length\n offset = 0\n // Buffer#write(string, encoding)\n } else if (length === undefined && typeof offset === 'string') {\n encoding = offset\n length = this.length\n offset = 0\n // Buffer#write(string, offset[, length][, encoding])\n } else if (isFinite(offset)) {\n offset = offset >>> 0\n if (isFinite(length)) {\n length = length >>> 0\n if (encoding === undefined) encoding = 'utf8'\n } else {\n encoding = length\n length = undefined\n }\n } else {\n throw new Error(\n 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n )\n }\n\n const remaining = this.length - offset\n if (length === undefined || length > remaining) length = remaining\n\n if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n throw new RangeError('Attempt to write outside buffer bounds')\n }\n\n if (!encoding) encoding = 'utf8'\n\n let loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'hex':\n return hexWrite(this, string, offset, length)\n\n case 'utf8':\n case 'utf-8':\n return utf8Write(this, string, offset, length)\n\n case 'ascii':\n case 'latin1':\n case 'binary':\n return asciiWrite(this, string, offset, length)\n\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return base64Write(this, string, offset, length)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return ucs2Write(this, string, offset, length)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0)\n }\n}\n\nfunction base64Slice (buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf)\n } else {\n return base64.fromByteArray(buf.slice(start, end))\n }\n}\n\nfunction utf8Slice (buf, start, end) {\n end = Math.min(buf.length, end)\n const res = []\n\n let i = start\n while (i < end) {\n const firstByte = buf[i]\n let codePoint = null\n let bytesPerSequence = (firstByte > 0xEF)\n ? 4\n : (firstByte > 0xDF)\n ? 3\n : (firstByte > 0xBF)\n ? 2\n : 1\n\n if (i + bytesPerSequence <= end) {\n let secondByte, thirdByte, fourthByte, tempCodePoint\n\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 0x80) {\n codePoint = firstByte\n }\n break\n case 2:\n secondByte = buf[i + 1]\n if ((secondByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n if (tempCodePoint > 0x7F) {\n codePoint = tempCodePoint\n }\n }\n break\n case 3:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n codePoint = tempCodePoint\n }\n }\n break\n case 4:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n fourthByte = buf[i + 3]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n codePoint = tempCodePoint\n }\n }\n }\n }\n\n if (codePoint === null) {\n // we did not generate a valid codePoint so insert a\n // replacement char (U+FFFD) and advance only 1 byte\n codePoint = 0xFFFD\n bytesPerSequence = 1\n } else if (codePoint > 0xFFFF) {\n // encode to utf16 (surrogate pair dance)\n codePoint -= 0x10000\n res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n codePoint = 0xDC00 | codePoint & 0x3FF\n }\n\n res.push(codePoint)\n i += bytesPerSequence\n }\n\n return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nconst MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n const len = codePoints.length\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n }\n\n // Decode in chunks to avoid \"call stack size exceeded\".\n let res = ''\n let i = 0\n while (i < len) {\n res += String.fromCharCode.apply(\n String,\n codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n )\n }\n return res\n}\n\nfunction asciiSlice (buf, start, end) {\n let ret = ''\n end = Math.min(buf.length, end)\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F)\n }\n return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n let ret = ''\n end = Math.min(buf.length, end)\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i])\n }\n return ret\n}\n\nfunction hexSlice (buf, start, end) {\n const len = buf.length\n\n if (!start || start < 0) start = 0\n if (!end || end < 0 || end > len) end = len\n\n let out = ''\n for (let i = start; i < end; ++i) {\n out += hexSliceLookupTable[buf[i]]\n }\n return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n const bytes = buf.slice(start, end)\n let res = ''\n // If bytes.length is odd, the last 8 bits must be ignored (same as node.js)\n for (let i = 0; i < bytes.length - 1; i += 2) {\n res += String.fromCharCode(bytes[i] + (bytes[i + 1] * 256))\n }\n return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n const len = this.length\n start = ~~start\n end = end === undefined ? len : ~~end\n\n if (start < 0) {\n start += len\n if (start < 0) start = 0\n } else if (start > len) {\n start = len\n }\n\n if (end < 0) {\n end += len\n if (end < 0) end = 0\n } else if (end > len) {\n end = len\n }\n\n if (end < start) end = start\n\n const newBuf = this.subarray(start, end)\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(newBuf, Buffer.prototype)\n\n return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUintLE =\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let val = this[offset]\n let mul = 1\n let i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUintBE =\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n checkOffset(offset, byteLength, this.length)\n }\n\n let val = this[offset + --byteLength]\n let mul = 1\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUint8 =\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n return this[offset]\n}\n\nBuffer.prototype.readUint16LE =\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUint16BE =\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUint32LE =\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return ((this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16)) +\n (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUint32BE =\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] * 0x1000000) +\n ((this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n this[offset + 3])\n}\n\nBuffer.prototype.readBigUInt64LE = defineBigIntMethod(function readBigUInt64LE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const lo = first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24\n\n const hi = this[++offset] +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n last * 2 ** 24\n\n return BigInt(lo) + (BigInt(hi) << BigInt(32))\n})\n\nBuffer.prototype.readBigUInt64BE = defineBigIntMethod(function readBigUInt64BE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const hi = first * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset]\n\n const lo = this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last\n\n return (BigInt(hi) << BigInt(32)) + BigInt(lo)\n})\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let val = this[offset]\n let mul = 1\n let i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let i = byteLength\n let mul = 1\n let val = this[offset + --i]\n while (i > 0 && (mul *= 0x100)) {\n val += this[offset + --i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n if (!(this[offset] & 0x80)) return (this[offset])\n return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n const val = this[offset] | (this[offset + 1] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n const val = this[offset + 1] | (this[offset] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16) |\n (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] << 24) |\n (this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n (this[offset + 3])\n}\n\nBuffer.prototype.readBigInt64LE = defineBigIntMethod(function readBigInt64LE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const val = this[offset + 4] +\n this[offset + 5] * 2 ** 8 +\n this[offset + 6] * 2 ** 16 +\n (last << 24) // Overflow\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24)\n})\n\nBuffer.prototype.readBigInt64BE = defineBigIntMethod(function readBigInt64BE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const val = (first << 24) + // Overflow\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset]\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last)\n})\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUintLE =\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n let mul = 1\n let i = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUintBE =\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n let i = byteLength - 1\n let mul = 1\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUint8 =\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeUint16LE =\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeUint16BE =\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeUint32LE =\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset + 3] = (value >>> 24)\n this[offset + 2] = (value >>> 16)\n this[offset + 1] = (value >>> 8)\n this[offset] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeUint32BE =\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nfunction wrtBigUInt64LE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7)\n\n let lo = Number(value & BigInt(0xffffffff))\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n return offset\n}\n\nfunction wrtBigUInt64BE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7)\n\n let lo = Number(value & BigInt(0xffffffff))\n buf[offset + 7] = lo\n lo = lo >> 8\n buf[offset + 6] = lo\n lo = lo >> 8\n buf[offset + 5] = lo\n lo = lo >> 8\n buf[offset + 4] = lo\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n buf[offset + 3] = hi\n hi = hi >> 8\n buf[offset + 2] = hi\n hi = hi >> 8\n buf[offset + 1] = hi\n hi = hi >> 8\n buf[offset] = hi\n return offset + 8\n}\n\nBuffer.prototype.writeBigUInt64LE = defineBigIntMethod(function writeBigUInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeBigUInt64BE = defineBigIntMethod(function writeBigUInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n let i = 0\n let mul = 1\n let sub = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n let i = byteLength - 1\n let mul = 1\n let sub = 0\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n if (value < 0) value = 0xff + value + 1\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n this[offset + 2] = (value >>> 16)\n this[offset + 3] = (value >>> 24)\n return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (value < 0) value = 0xffffffff + value + 1\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeBigInt64LE = defineBigIntMethod(function writeBigInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nBuffer.prototype.writeBigInt64BE = defineBigIntMethod(function writeBigInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n }\n ieee754.write(buf, value, offset, littleEndian, 23, 4)\n return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n }\n ieee754.write(buf, value, offset, littleEndian, 52, 8)\n return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n if (!Buffer.isBuffer(target)) throw new TypeError('argument should be a Buffer')\n if (!start) start = 0\n if (!end && end !== 0) end = this.length\n if (targetStart >= target.length) targetStart = target.length\n if (!targetStart) targetStart = 0\n if (end > 0 && end < start) end = start\n\n // Copy 0 bytes; we're done\n if (end === start) return 0\n if (target.length === 0 || this.length === 0) return 0\n\n // Fatal error conditions\n if (targetStart < 0) {\n throw new RangeError('targetStart out of bounds')\n }\n if (start < 0 || start >= this.length) throw new RangeError('Index out of range')\n if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n // Are we oob?\n if (end > this.length) end = this.length\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start\n }\n\n const len = end - start\n\n if (this === target && typeof Uint8Array.prototype.copyWithin === 'function') {\n // Use built-in when available, missing from IE11\n this.copyWithin(targetStart, start, end)\n } else {\n Uint8Array.prototype.set.call(\n target,\n this.subarray(start, end),\n targetStart\n )\n }\n\n return len\n}\n\n// Usage:\n// buffer.fill(number[, offset[, end]])\n// buffer.fill(buffer[, offset[, end]])\n// buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n // Handle string cases:\n if (typeof val === 'string') {\n if (typeof start === 'string') {\n encoding = start\n start = 0\n end = this.length\n } else if (typeof end === 'string') {\n encoding = end\n end = this.length\n }\n if (encoding !== undefined && typeof encoding !== 'string') {\n throw new TypeError('encoding must be a string')\n }\n if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n if (val.length === 1) {\n const code = val.charCodeAt(0)\n if ((encoding === 'utf8' && code < 128) ||\n encoding === 'latin1') {\n // Fast path: If `val` fits into a single byte, use that numeric value.\n val = code\n }\n }\n } else if (typeof val === 'number') {\n val = val & 255\n } else if (typeof val === 'boolean') {\n val = Number(val)\n }\n\n // Invalid ranges are not set to a default, so can range check early.\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError('Out of range index')\n }\n\n if (end <= start) {\n return this\n }\n\n start = start >>> 0\n end = end === undefined ? this.length : end >>> 0\n\n if (!val) val = 0\n\n let i\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val\n }\n } else {\n const bytes = Buffer.isBuffer(val)\n ? val\n : Buffer.from(val, encoding)\n const len = bytes.length\n if (len === 0) {\n throw new TypeError('The value \"' + val +\n '\" is invalid for argument \"value\"')\n }\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len]\n }\n }\n\n return this\n}\n\n// CUSTOM ERRORS\n// =============\n\n// Simplified versions from Node, changed for Buffer-only usage\nconst errors = {}\nfunction E (sym, getMessage, Base) {\n errors[sym] = class NodeError extends Base {\n constructor () {\n super()\n\n Object.defineProperty(this, 'message', {\n value: getMessage.apply(this, arguments),\n writable: true,\n configurable: true\n })\n\n // Add the error code to the name to include it in the stack trace.\n this.name = `${this.name} [${sym}]`\n // Access the stack to generate the error message including the error code\n // from the name.\n this.stack // eslint-disable-line no-unused-expressions\n // Reset the name to the actual name.\n delete this.name\n }\n\n get code () {\n return sym\n }\n\n set code (value) {\n Object.defineProperty(this, 'code', {\n configurable: true,\n enumerable: true,\n value,\n writable: true\n })\n }\n\n toString () {\n return `${this.name} [${sym}]: ${this.message}`\n }\n }\n}\n\nE('ERR_BUFFER_OUT_OF_BOUNDS',\n function (name) {\n if (name) {\n return `${name} is outside of buffer bounds`\n }\n\n return 'Attempt to access memory outside buffer bounds'\n }, RangeError)\nE('ERR_INVALID_ARG_TYPE',\n function (name, actual) {\n return `The \"${name}\" argument must be of type number. Received type ${typeof actual}`\n }, TypeError)\nE('ERR_OUT_OF_RANGE',\n function (str, range, input) {\n let msg = `The value of \"${str}\" is out of range.`\n let received = input\n if (Number.isInteger(input) && Math.abs(input) > 2 ** 32) {\n received = addNumericalSeparator(String(input))\n } else if (typeof input === 'bigint') {\n received = String(input)\n if (input > BigInt(2) ** BigInt(32) || input < -(BigInt(2) ** BigInt(32))) {\n received = addNumericalSeparator(received)\n }\n received += 'n'\n }\n msg += ` It must be ${range}. Received ${received}`\n return msg\n }, RangeError)\n\nfunction addNumericalSeparator (val) {\n let res = ''\n let i = val.length\n const start = val[0] === '-' ? 1 : 0\n for (; i >= start + 4; i -= 3) {\n res = `_${val.slice(i - 3, i)}${res}`\n }\n return `${val.slice(0, i)}${res}`\n}\n\n// CHECK FUNCTIONS\n// ===============\n\nfunction checkBounds (buf, offset, byteLength) {\n validateNumber(offset, 'offset')\n if (buf[offset] === undefined || buf[offset + byteLength] === undefined) {\n boundsError(offset, buf.length - (byteLength + 1))\n }\n}\n\nfunction checkIntBI (value, min, max, buf, offset, byteLength) {\n if (value > max || value < min) {\n const n = typeof min === 'bigint' ? 'n' : ''\n let range\n if (byteLength > 3) {\n if (min === 0 || min === BigInt(0)) {\n range = `>= 0${n} and < 2${n} ** ${(byteLength + 1) * 8}${n}`\n } else {\n range = `>= -(2${n} ** ${(byteLength + 1) * 8 - 1}${n}) and < 2 ** ` +\n `${(byteLength + 1) * 8 - 1}${n}`\n }\n } else {\n range = `>= ${min}${n} and <= ${max}${n}`\n }\n throw new errors.ERR_OUT_OF_RANGE('value', range, value)\n }\n checkBounds(buf, offset, byteLength)\n}\n\nfunction validateNumber (value, name) {\n if (typeof value !== 'number') {\n throw new errors.ERR_INVALID_ARG_TYPE(name, 'number', value)\n }\n}\n\nfunction boundsError (value, length, type) {\n if (Math.floor(value) !== value) {\n validateNumber(value, type)\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset', 'an integer', value)\n }\n\n if (length < 0) {\n throw new errors.ERR_BUFFER_OUT_OF_BOUNDS()\n }\n\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset',\n `>= ${type ? 1 : 0} and <= ${length}`,\n value)\n}\n\n// HELPER FUNCTIONS\n// ================\n\nconst INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n // Node takes equal signs as end of the Base64 encoding\n str = str.split('=')[0]\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = str.trim().replace(INVALID_BASE64_RE, '')\n // Node converts strings with length < 2 to ''\n if (str.length < 2) return ''\n // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n while (str.length % 4 !== 0) {\n str = str + '='\n }\n return str\n}\n\nfunction utf8ToBytes (string, units) {\n units = units || Infinity\n let codePoint\n const length = string.length\n let leadSurrogate = null\n const bytes = []\n\n for (let i = 0; i < length; ++i) {\n codePoint = string.charCodeAt(i)\n\n // is surrogate component\n if (codePoint > 0xD7FF && codePoint < 0xE000) {\n // last char was a lead\n if (!leadSurrogate) {\n // no lead yet\n if (codePoint > 0xDBFF) {\n // unexpected trail\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n } else if (i + 1 === length) {\n // unpaired lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n }\n\n // valid lead\n leadSurrogate = codePoint\n\n continue\n }\n\n // 2 leads in a row\n if (codePoint < 0xDC00) {\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n leadSurrogate = codePoint\n continue\n }\n\n // valid surrogate pair\n codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n } else if (leadSurrogate) {\n // valid bmp char, but last char was a lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n }\n\n leadSurrogate = null\n\n // encode utf8\n if (codePoint < 0x80) {\n if ((units -= 1) < 0) break\n bytes.push(codePoint)\n } else if (codePoint < 0x800) {\n if ((units -= 2) < 0) break\n bytes.push(\n codePoint >> 0x6 | 0xC0,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x10000) {\n if ((units -= 3) < 0) break\n bytes.push(\n codePoint >> 0xC | 0xE0,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x110000) {\n if ((units -= 4) < 0) break\n bytes.push(\n codePoint >> 0x12 | 0xF0,\n codePoint >> 0xC & 0x3F | 0x80,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else {\n throw new Error('Invalid code point')\n }\n }\n\n return bytes\n}\n\nfunction asciiToBytes (str) {\n const byteArray = []\n for (let i = 0; i < str.length; ++i) {\n // Node's code seems to be doing this and not & 0x7F..\n byteArray.push(str.charCodeAt(i) & 0xFF)\n }\n return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n let c, hi, lo\n const byteArray = []\n for (let i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0) break\n\n c = str.charCodeAt(i)\n hi = c >> 8\n lo = c % 256\n byteArray.push(lo)\n byteArray.push(hi)\n }\n\n return byteArray\n}\n\nfunction base64ToBytes (str) {\n return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n let i\n for (i = 0; i < length; ++i) {\n if ((i + offset >= dst.length) || (i >= src.length)) break\n dst[i + offset] = src[i]\n }\n return i\n}\n\n// ArrayBuffer or Uint8Array objects from other contexts (i.e. iframes) do not pass\n// the `instanceof` check but they should be treated as of that type.\n// See: https://github.com/feross/buffer/issues/166\nfunction isInstance (obj, type) {\n return obj instanceof type ||\n (obj != null && obj.constructor != null && obj.constructor.name != null &&\n obj.constructor.name === type.name)\n}\nfunction numberIsNaN (obj) {\n // For IE11 support\n return obj !== obj // eslint-disable-line no-self-compare\n}\n\n// Create lookup table for `toString('hex')`\n// See: https://github.com/feross/buffer/issues/219\nconst hexSliceLookupTable = (function () {\n const alphabet = '0123456789abcdef'\n const table = new Array(256)\n for (let i = 0; i < 16; ++i) {\n const i16 = i * 16\n for (let j = 0; j < 16; ++j) {\n table[i16 + j] = alphabet[i] + alphabet[j]\n }\n }\n return table\n})()\n\n// Return not function with Error if BigInt not supported\nfunction defineBigIntMethod (fn) {\n return typeof BigInt === 'undefined' ? BufferBigIntNotDefined : fn\n}\n\nfunction BufferBigIntNotDefined () {\n throw new Error('BigInt not supported')\n}\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\nvar R = typeof Reflect === 'object' ? Reflect : null\nvar ReflectApply = R && typeof R.apply === 'function'\n ? R.apply\n : function ReflectApply(target, receiver, args) {\n return Function.prototype.apply.call(target, receiver, args);\n }\n\nvar ReflectOwnKeys\nif (R && typeof R.ownKeys === 'function') {\n ReflectOwnKeys = R.ownKeys\n} else if (Object.getOwnPropertySymbols) {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target)\n .concat(Object.getOwnPropertySymbols(target));\n };\n} else {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target);\n };\n}\n\nfunction ProcessEmitWarning(warning) {\n if (console && console.warn) console.warn(warning);\n}\n\nvar NumberIsNaN = Number.isNaN || function NumberIsNaN(value) {\n return value !== value;\n}\n\nfunction EventEmitter() {\n EventEmitter.init.call(this);\n}\nmodule.exports = EventEmitter;\nmodule.exports.once = once;\n\n// Backwards-compat with node 0.10.x\nEventEmitter.EventEmitter = EventEmitter;\n\nEventEmitter.prototype._events = undefined;\nEventEmitter.prototype._eventsCount = 0;\nEventEmitter.prototype._maxListeners = undefined;\n\n// By default EventEmitters will print a warning if more than 10 listeners are\n// added to it. This is a useful default which helps finding memory leaks.\nvar defaultMaxListeners = 10;\n\nfunction checkListener(listener) {\n if (typeof listener !== 'function') {\n throw new TypeError('The \"listener\" argument must be of type Function. Received type ' + typeof listener);\n }\n}\n\nObject.defineProperty(EventEmitter, 'defaultMaxListeners', {\n enumerable: true,\n get: function() {\n return defaultMaxListeners;\n },\n set: function(arg) {\n if (typeof arg !== 'number' || arg < 0 || NumberIsNaN(arg)) {\n throw new RangeError('The value of \"defaultMaxListeners\" is out of range. It must be a non-negative number. Received ' + arg + '.');\n }\n defaultMaxListeners = arg;\n }\n});\n\nEventEmitter.init = function() {\n\n if (this._events === undefined ||\n this._events === Object.getPrototypeOf(this)._events) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n }\n\n this._maxListeners = this._maxListeners || undefined;\n};\n\n// Obviously not all Emitters should be limited to 10. This function allows\n// that to be increased. Set to zero for unlimited.\nEventEmitter.prototype.setMaxListeners = function setMaxListeners(n) {\n if (typeof n !== 'number' || n < 0 || NumberIsNaN(n)) {\n throw new RangeError('The value of \"n\" is out of range. It must be a non-negative number. Received ' + n + '.');\n }\n this._maxListeners = n;\n return this;\n};\n\nfunction _getMaxListeners(that) {\n if (that._maxListeners === undefined)\n return EventEmitter.defaultMaxListeners;\n return that._maxListeners;\n}\n\nEventEmitter.prototype.getMaxListeners = function getMaxListeners() {\n return _getMaxListeners(this);\n};\n\nEventEmitter.prototype.emit = function emit(type) {\n var args = [];\n for (var i = 1; i < arguments.length; i++) args.push(arguments[i]);\n var doError = (type === 'error');\n\n var events = this._events;\n if (events !== undefined)\n doError = (doError && events.error === undefined);\n else if (!doError)\n return false;\n\n // If there is no 'error' event listener then throw.\n if (doError) {\n var er;\n if (args.length > 0)\n er = args[0];\n if (er instanceof Error) {\n // Note: The comments on the `throw` lines are intentional, they show\n // up in Node's output if this results in an unhandled exception.\n throw er; // Unhandled 'error' event\n }\n // At least give some kind of context to the user\n var err = new Error('Unhandled error.' + (er ? ' (' + er.message + ')' : ''));\n err.context = er;\n throw err; // Unhandled 'error' event\n }\n\n var handler = events[type];\n\n if (handler === undefined)\n return false;\n\n if (typeof handler === 'function') {\n ReflectApply(handler, this, args);\n } else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n ReflectApply(listeners[i], this, args);\n }\n\n return true;\n};\n\nfunction _addListener(target, type, listener, prepend) {\n var m;\n var events;\n var existing;\n\n checkListener(listener);\n\n events = target._events;\n if (events === undefined) {\n events = target._events = Object.create(null);\n target._eventsCount = 0;\n } else {\n // To avoid recursion in the case that type === \"newListener\"! Before\n // adding it to the listeners, first emit \"newListener\".\n if (events.newListener !== undefined) {\n target.emit('newListener', type,\n listener.listener ? listener.listener : listener);\n\n // Re-assign `events` because a newListener handler could have caused the\n // this._events to be assigned to a new object\n events = target._events;\n }\n existing = events[type];\n }\n\n if (existing === undefined) {\n // Optimize the case of one listener. Don't need the extra array object.\n existing = events[type] = listener;\n ++target._eventsCount;\n } else {\n if (typeof existing === 'function') {\n // Adding the second element, need to change to array.\n existing = events[type] =\n prepend ? [listener, existing] : [existing, listener];\n // If we've already got an array, just append.\n } else if (prepend) {\n existing.unshift(listener);\n } else {\n existing.push(listener);\n }\n\n // Check for listener leak\n m = _getMaxListeners(target);\n if (m > 0 && existing.length > m && !existing.warned) {\n existing.warned = true;\n // No error code for this since it is a Warning\n // eslint-disable-next-line no-restricted-syntax\n var w = new Error('Possible EventEmitter memory leak detected. ' +\n existing.length + ' ' + String(type) + ' listeners ' +\n 'added. Use emitter.setMaxListeners() to ' +\n 'increase limit');\n w.name = 'MaxListenersExceededWarning';\n w.emitter = target;\n w.type = type;\n w.count = existing.length;\n ProcessEmitWarning(w);\n }\n }\n\n return target;\n}\n\nEventEmitter.prototype.addListener = function addListener(type, listener) {\n return _addListener(this, type, listener, false);\n};\n\nEventEmitter.prototype.on = EventEmitter.prototype.addListener;\n\nEventEmitter.prototype.prependListener =\n function prependListener(type, listener) {\n return _addListener(this, type, listener, true);\n };\n\nfunction onceWrapper() {\n if (!this.fired) {\n this.target.removeListener(this.type, this.wrapFn);\n this.fired = true;\n if (arguments.length === 0)\n return this.listener.call(this.target);\n return this.listener.apply(this.target, arguments);\n }\n}\n\nfunction _onceWrap(target, type, listener) {\n var state = { fired: false, wrapFn: undefined, target: target, type: type, listener: listener };\n var wrapped = onceWrapper.bind(state);\n wrapped.listener = listener;\n state.wrapFn = wrapped;\n return wrapped;\n}\n\nEventEmitter.prototype.once = function once(type, listener) {\n checkListener(listener);\n this.on(type, _onceWrap(this, type, listener));\n return this;\n};\n\nEventEmitter.prototype.prependOnceListener =\n function prependOnceListener(type, listener) {\n checkListener(listener);\n this.prependListener(type, _onceWrap(this, type, listener));\n return this;\n };\n\n// Emits a 'removeListener' event if and only if the listener was removed.\nEventEmitter.prototype.removeListener =\n function removeListener(type, listener) {\n var list, events, position, i, originalListener;\n\n checkListener(listener);\n\n events = this._events;\n if (events === undefined)\n return this;\n\n list = events[type];\n if (list === undefined)\n return this;\n\n if (list === listener || list.listener === listener) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else {\n delete events[type];\n if (events.removeListener)\n this.emit('removeListener', type, list.listener || listener);\n }\n } else if (typeof list !== 'function') {\n position = -1;\n\n for (i = list.length - 1; i >= 0; i--) {\n if (list[i] === listener || list[i].listener === listener) {\n originalListener = list[i].listener;\n position = i;\n break;\n }\n }\n\n if (position < 0)\n return this;\n\n if (position === 0)\n list.shift();\n else {\n spliceOne(list, position);\n }\n\n if (list.length === 1)\n events[type] = list[0];\n\n if (events.removeListener !== undefined)\n this.emit('removeListener', type, originalListener || listener);\n }\n\n return this;\n };\n\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\n\nEventEmitter.prototype.removeAllListeners =\n function removeAllListeners(type) {\n var listeners, events, i;\n\n events = this._events;\n if (events === undefined)\n return this;\n\n // not listening for removeListener, no need to emit\n if (events.removeListener === undefined) {\n if (arguments.length === 0) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n } else if (events[type] !== undefined) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else\n delete events[type];\n }\n return this;\n }\n\n // emit removeListener for all listeners on all events\n if (arguments.length === 0) {\n var keys = Object.keys(events);\n var key;\n for (i = 0; i < keys.length; ++i) {\n key = keys[i];\n if (key === 'removeListener') continue;\n this.removeAllListeners(key);\n }\n this.removeAllListeners('removeListener');\n this._events = Object.create(null);\n this._eventsCount = 0;\n return this;\n }\n\n listeners = events[type];\n\n if (typeof listeners === 'function') {\n this.removeListener(type, listeners);\n } else if (listeners !== undefined) {\n // LIFO order\n for (i = listeners.length - 1; i >= 0; i--) {\n this.removeListener(type, listeners[i]);\n }\n }\n\n return this;\n };\n\nfunction _listeners(target, type, unwrap) {\n var events = target._events;\n\n if (events === undefined)\n return [];\n\n var evlistener = events[type];\n if (evlistener === undefined)\n return [];\n\n if (typeof evlistener === 'function')\n return unwrap ? [evlistener.listener || evlistener] : [evlistener];\n\n return unwrap ?\n unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length);\n}\n\nEventEmitter.prototype.listeners = function listeners(type) {\n return _listeners(this, type, true);\n};\n\nEventEmitter.prototype.rawListeners = function rawListeners(type) {\n return _listeners(this, type, false);\n};\n\nEventEmitter.listenerCount = function(emitter, type) {\n if (typeof emitter.listenerCount === 'function') {\n return emitter.listenerCount(type);\n } else {\n return listenerCount.call(emitter, type);\n }\n};\n\nEventEmitter.prototype.listenerCount = listenerCount;\nfunction listenerCount(type) {\n var events = this._events;\n\n if (events !== undefined) {\n var evlistener = events[type];\n\n if (typeof evlistener === 'function') {\n return 1;\n } else if (evlistener !== undefined) {\n return evlistener.length;\n }\n }\n\n return 0;\n}\n\nEventEmitter.prototype.eventNames = function eventNames() {\n return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : [];\n};\n\nfunction arrayClone(arr, n) {\n var copy = new Array(n);\n for (var i = 0; i < n; ++i)\n copy[i] = arr[i];\n return copy;\n}\n\nfunction spliceOne(list, index) {\n for (; index + 1 < list.length; index++)\n list[index] = list[index + 1];\n list.pop();\n}\n\nfunction unwrapListeners(arr) {\n var ret = new Array(arr.length);\n for (var i = 0; i < ret.length; ++i) {\n ret[i] = arr[i].listener || arr[i];\n }\n return ret;\n}\n\nfunction once(emitter, name) {\n return new Promise(function (resolve, reject) {\n function errorListener(err) {\n emitter.removeListener(name, resolver);\n reject(err);\n }\n\n function resolver() {\n if (typeof emitter.removeListener === 'function') {\n emitter.removeListener('error', errorListener);\n }\n resolve([].slice.call(arguments));\n };\n\n eventTargetAgnosticAddListener(emitter, name, resolver, { once: true });\n if (name !== 'error') {\n addErrorHandlerIfEventEmitter(emitter, errorListener, { once: true });\n }\n });\n}\n\nfunction addErrorHandlerIfEventEmitter(emitter, handler, flags) {\n if (typeof emitter.on === 'function') {\n eventTargetAgnosticAddListener(emitter, 'error', handler, flags);\n }\n}\n\nfunction eventTargetAgnosticAddListener(emitter, name, listener, flags) {\n if (typeof emitter.on === 'function') {\n if (flags.once) {\n emitter.once(name, listener);\n } else {\n emitter.on(name, listener);\n }\n } else if (typeof emitter.addEventListener === 'function') {\n // EventTarget does not have `error` event semantics like Node\n // EventEmitters, we do not listen for `error` events here.\n emitter.addEventListener(name, function wrapListener(arg) {\n // IE does not have builtin `{ once: true }` support so we\n // have to do it manually.\n if (flags.once) {\n emitter.removeEventListener(name, wrapListener);\n }\n listener(arg);\n });\n } else {\n throw new TypeError('The \"emitter\" argument must be of type EventEmitter. Received type ' + typeof emitter);\n }\n}\n","/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */\nexports.read = function (buffer, offset, isLE, mLen, nBytes) {\n var e, m\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var nBits = -7\n var i = isLE ? (nBytes - 1) : 0\n var d = isLE ? -1 : 1\n var s = buffer[offset + i]\n\n i += d\n\n e = s & ((1 << (-nBits)) - 1)\n s >>= (-nBits)\n nBits += eLen\n for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & ((1 << (-nBits)) - 1)\n e >>= (-nBits)\n nBits += mLen\n for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias\n } else if (e === eMax) {\n return m ? NaN : ((s ? -1 : 1) * Infinity)\n } else {\n m = m + Math.pow(2, mLen)\n e = e - eBias\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n var i = isLE ? 0 : (nBytes - 1)\n var d = isLE ? 1 : -1\n var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n value = Math.abs(value)\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0\n e = eMax\n } else {\n e = Math.floor(Math.log(value) / Math.LN2)\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--\n c *= 2\n }\n if (e + eBias >= 1) {\n value += rt / c\n } else {\n value += rt * Math.pow(2, 1 - eBias)\n }\n if (value * c >= 2) {\n e++\n c /= 2\n }\n\n if (e + eBias >= eMax) {\n m = 0\n e = eMax\n } else if (e + eBias >= 1) {\n m = ((value * c) - 1) * Math.pow(2, mLen)\n e = e + eBias\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n e = 0\n }\n }\n\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n e = (e << mLen) | m\n eLen += mLen\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128\n}\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView');\n\nmodule.exports = DataView;\n","var hashClear = require('./_hashClear'),\n hashDelete = require('./_hashDelete'),\n hashGet = require('./_hashGet'),\n hashHas = require('./_hashHas'),\n hashSet = require('./_hashSet');\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\nmodule.exports = Hash;\n","var listCacheClear = require('./_listCacheClear'),\n listCacheDelete = require('./_listCacheDelete'),\n listCacheGet = require('./_listCacheGet'),\n listCacheHas = require('./_listCacheHas'),\n listCacheSet = require('./_listCacheSet');\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\nmodule.exports = ListCache;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map');\n\nmodule.exports = Map;\n","var mapCacheClear = require('./_mapCacheClear'),\n mapCacheDelete = require('./_mapCacheDelete'),\n mapCacheGet = require('./_mapCacheGet'),\n mapCacheHas = require('./_mapCacheHas'),\n mapCacheSet = require('./_mapCacheSet');\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\nmodule.exports = MapCache;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Promise = getNative(root, 'Promise');\n\nmodule.exports = Promise;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Set = getNative(root, 'Set');\n\nmodule.exports = Set;\n","var MapCache = require('./_MapCache'),\n setCacheAdd = require('./_setCacheAdd'),\n setCacheHas = require('./_setCacheHas');\n\n/**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\nfunction SetCache(values) {\n var index = -1,\n length = values == null ? 0 : values.length;\n\n this.__data__ = new MapCache;\n while (++index < length) {\n this.add(values[index]);\n }\n}\n\n// Add methods to `SetCache`.\nSetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\nSetCache.prototype.has = setCacheHas;\n\nmodule.exports = SetCache;\n","var ListCache = require('./_ListCache'),\n stackClear = require('./_stackClear'),\n stackDelete = require('./_stackDelete'),\n stackGet = require('./_stackGet'),\n stackHas = require('./_stackHas'),\n stackSet = require('./_stackSet');\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\nmodule.exports = Stack;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Uint8Array = root.Uint8Array;\n\nmodule.exports = Uint8Array;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar WeakMap = getNative(root, 'WeakMap');\n\nmodule.exports = WeakMap;\n","/**\n * A specialized version of `_.forEach` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\nfunction arrayEach(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (iteratee(array[index], index, array) === false) {\n break;\n }\n }\n return array;\n}\n\nmodule.exports = arrayEach;\n","/**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\nfunction arrayFilter(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result[resIndex++] = value;\n }\n }\n return result;\n}\n\nmodule.exports = arrayFilter;\n","var baseTimes = require('./_baseTimes'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isIndex = require('./_isIndex'),\n isTypedArray = require('./isTypedArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = arrayLikeKeys;\n","/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n}\n\nmodule.exports = arrayPush;\n","/**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\nfunction arraySome(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (predicate(array[index], index, array)) {\n return true;\n }\n }\n return false;\n}\n\nmodule.exports = arraySome;\n","var baseAssignValue = require('./_baseAssignValue'),\n eq = require('./eq');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\nmodule.exports = assignValue;\n","var eq = require('./eq');\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\nmodule.exports = assocIndexOf;\n","var copyObject = require('./_copyObject'),\n keys = require('./keys');\n\n/**\n * The base implementation of `_.assign` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssign(object, source) {\n return object && copyObject(source, keys(source), object);\n}\n\nmodule.exports = baseAssign;\n","var copyObject = require('./_copyObject'),\n keysIn = require('./keysIn');\n\n/**\n * The base implementation of `_.assignIn` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssignIn(object, source) {\n return object && copyObject(source, keysIn(source), object);\n}\n\nmodule.exports = baseAssignIn;\n","var defineProperty = require('./_defineProperty');\n\n/**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction baseAssignValue(object, key, value) {\n if (key == '__proto__' && defineProperty) {\n defineProperty(object, key, {\n 'configurable': true,\n 'enumerable': true,\n 'value': value,\n 'writable': true\n });\n } else {\n object[key] = value;\n }\n}\n\nmodule.exports = baseAssignValue;\n","var Stack = require('./_Stack'),\n arrayEach = require('./_arrayEach'),\n assignValue = require('./_assignValue'),\n baseAssign = require('./_baseAssign'),\n baseAssignIn = require('./_baseAssignIn'),\n cloneBuffer = require('./_cloneBuffer'),\n copyArray = require('./_copyArray'),\n copySymbols = require('./_copySymbols'),\n copySymbolsIn = require('./_copySymbolsIn'),\n getAllKeys = require('./_getAllKeys'),\n getAllKeysIn = require('./_getAllKeysIn'),\n getTag = require('./_getTag'),\n initCloneArray = require('./_initCloneArray'),\n initCloneByTag = require('./_initCloneByTag'),\n initCloneObject = require('./_initCloneObject'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isMap = require('./isMap'),\n isObject = require('./isObject'),\n isSet = require('./isSet'),\n keys = require('./keys'),\n keysIn = require('./keysIn');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_FLAT_FLAG = 2,\n CLONE_SYMBOLS_FLAG = 4;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values supported by `_.clone`. */\nvar cloneableTags = {};\ncloneableTags[argsTag] = cloneableTags[arrayTag] =\ncloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =\ncloneableTags[boolTag] = cloneableTags[dateTag] =\ncloneableTags[float32Tag] = cloneableTags[float64Tag] =\ncloneableTags[int8Tag] = cloneableTags[int16Tag] =\ncloneableTags[int32Tag] = cloneableTags[mapTag] =\ncloneableTags[numberTag] = cloneableTags[objectTag] =\ncloneableTags[regexpTag] = cloneableTags[setTag] =\ncloneableTags[stringTag] = cloneableTags[symbolTag] =\ncloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =\ncloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;\ncloneableTags[errorTag] = cloneableTags[funcTag] =\ncloneableTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.clone` and `_.cloneDeep` which tracks\n * traversed objects.\n *\n * @private\n * @param {*} value The value to clone.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Deep clone\n * 2 - Flatten inherited properties\n * 4 - Clone symbols\n * @param {Function} [customizer] The function to customize cloning.\n * @param {string} [key] The key of `value`.\n * @param {Object} [object] The parent object of `value`.\n * @param {Object} [stack] Tracks traversed objects and their clone counterparts.\n * @returns {*} Returns the cloned value.\n */\nfunction baseClone(value, bitmask, customizer, key, object, stack) {\n var result,\n isDeep = bitmask & CLONE_DEEP_FLAG,\n isFlat = bitmask & CLONE_FLAT_FLAG,\n isFull = bitmask & CLONE_SYMBOLS_FLAG;\n\n if (customizer) {\n result = object ? customizer(value, key, object, stack) : customizer(value);\n }\n if (result !== undefined) {\n return result;\n }\n if (!isObject(value)) {\n return value;\n }\n var isArr = isArray(value);\n if (isArr) {\n result = initCloneArray(value);\n if (!isDeep) {\n return copyArray(value, result);\n }\n } else {\n var tag = getTag(value),\n isFunc = tag == funcTag || tag == genTag;\n\n if (isBuffer(value)) {\n return cloneBuffer(value, isDeep);\n }\n if (tag == objectTag || tag == argsTag || (isFunc && !object)) {\n result = (isFlat || isFunc) ? {} : initCloneObject(value);\n if (!isDeep) {\n return isFlat\n ? copySymbolsIn(value, baseAssignIn(result, value))\n : copySymbols(value, baseAssign(result, value));\n }\n } else {\n if (!cloneableTags[tag]) {\n return object ? value : {};\n }\n result = initCloneByTag(value, tag, isDeep);\n }\n }\n // Check for circular references and return its corresponding clone.\n stack || (stack = new Stack);\n var stacked = stack.get(value);\n if (stacked) {\n return stacked;\n }\n stack.set(value, result);\n\n if (isSet(value)) {\n value.forEach(function(subValue) {\n result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));\n });\n } else if (isMap(value)) {\n value.forEach(function(subValue, key) {\n result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n }\n\n var keysFunc = isFull\n ? (isFlat ? getAllKeysIn : getAllKeys)\n : (isFlat ? keysIn : keys);\n\n var props = isArr ? undefined : keysFunc(value);\n arrayEach(props || value, function(subValue, key) {\n if (props) {\n key = subValue;\n subValue = value[key];\n }\n // Recursively populate clone (susceptible to call stack limits).\n assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n return result;\n}\n\nmodule.exports = baseClone;\n","var isObject = require('./isObject');\n\n/** Built-in value references. */\nvar objectCreate = Object.create;\n\n/**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} proto The object to inherit from.\n * @returns {Object} Returns the new object.\n */\nvar baseCreate = (function() {\n function object() {}\n return function(proto) {\n if (!isObject(proto)) {\n return {};\n }\n if (objectCreate) {\n return objectCreate(proto);\n }\n object.prototype = proto;\n var result = new object;\n object.prototype = undefined;\n return result;\n };\n}());\n\nmodule.exports = baseCreate;\n","var arrayPush = require('./_arrayPush'),\n isArray = require('./isArray');\n\n/**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction baseGetAllKeys(object, keysFunc, symbolsFunc) {\n var result = keysFunc(object);\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n}\n\nmodule.exports = baseGetAllKeys;\n","var Symbol = require('./_Symbol'),\n getRawTag = require('./_getRawTag'),\n objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]';\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\nmodule.exports = baseIsArguments;\n","var baseIsEqualDeep = require('./_baseIsEqualDeep'),\n isObjectLike = require('./isObjectLike');\n\n/**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Unordered comparison\n * 2 - Partial comparison\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\nfunction baseIsEqual(value, other, bitmask, customizer, stack) {\n if (value === other) {\n return true;\n }\n if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\n return value !== value && other !== other;\n }\n return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n}\n\nmodule.exports = baseIsEqual;\n","var Stack = require('./_Stack'),\n equalArrays = require('./_equalArrays'),\n equalByTag = require('./_equalByTag'),\n equalObjects = require('./_equalObjects'),\n getTag = require('./_getTag'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isTypedArray = require('./isTypedArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n var objIsArr = isArray(object),\n othIsArr = isArray(other),\n objTag = objIsArr ? arrayTag : getTag(object),\n othTag = othIsArr ? arrayTag : getTag(other);\n\n objTag = objTag == argsTag ? objectTag : objTag;\n othTag = othTag == argsTag ? objectTag : othTag;\n\n var objIsObj = objTag == objectTag,\n othIsObj = othTag == objectTag,\n isSameTag = objTag == othTag;\n\n if (isSameTag && isBuffer(object)) {\n if (!isBuffer(other)) {\n return false;\n }\n objIsArr = true;\n objIsObj = false;\n }\n if (isSameTag && !objIsObj) {\n stack || (stack = new Stack);\n return (objIsArr || isTypedArray(object))\n ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n }\n if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n if (objIsWrapped || othIsWrapped) {\n var objUnwrapped = objIsWrapped ? object.value() : object,\n othUnwrapped = othIsWrapped ? other.value() : other;\n\n stack || (stack = new Stack);\n return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n }\n }\n if (!isSameTag) {\n return false;\n }\n stack || (stack = new Stack);\n return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n}\n\nmodule.exports = baseIsEqualDeep;\n","var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]';\n\n/**\n * The base implementation of `_.isMap` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n */\nfunction baseIsMap(value) {\n return isObjectLike(value) && getTag(value) == mapTag;\n}\n\nmodule.exports = baseIsMap;\n","var isFunction = require('./isFunction'),\n isMasked = require('./_isMasked'),\n isObject = require('./isObject'),\n toSource = require('./_toSource');\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\nmodule.exports = baseIsNative;\n","var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar setTag = '[object Set]';\n\n/**\n * The base implementation of `_.isSet` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n */\nfunction baseIsSet(value) {\n return isObjectLike(value) && getTag(value) == setTag;\n}\n\nmodule.exports = baseIsSet;\n","var baseGetTag = require('./_baseGetTag'),\n isLength = require('./isLength'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n\nmodule.exports = baseIsTypedArray;\n","var isPrototype = require('./_isPrototype'),\n nativeKeys = require('./_nativeKeys');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeys;\n","var isObject = require('./isObject'),\n isPrototype = require('./_isPrototype'),\n nativeKeysIn = require('./_nativeKeysIn');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeysIn(object) {\n if (!isObject(object)) {\n return nativeKeysIn(object);\n }\n var isProto = isPrototype(object),\n result = [];\n\n for (var key in object) {\n if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeysIn;\n","/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\nmodule.exports = baseTimes;\n","/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n return function(value) {\n return func(value);\n };\n}\n\nmodule.exports = baseUnary;\n","/**\n * Checks if a `cache` value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction cacheHas(cache, key) {\n return cache.has(key);\n}\n\nmodule.exports = cacheHas;\n","var Uint8Array = require('./_Uint8Array');\n\n/**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\nfunction cloneArrayBuffer(arrayBuffer) {\n var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n return result;\n}\n\nmodule.exports = cloneArrayBuffer;\n","var root = require('./_root');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined,\n allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;\n\n/**\n * Creates a clone of `buffer`.\n *\n * @private\n * @param {Buffer} buffer The buffer to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Buffer} Returns the cloned buffer.\n */\nfunction cloneBuffer(buffer, isDeep) {\n if (isDeep) {\n return buffer.slice();\n }\n var length = buffer.length,\n result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\n\n buffer.copy(result);\n return result;\n}\n\nmodule.exports = cloneBuffer;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer');\n\n/**\n * Creates a clone of `dataView`.\n *\n * @private\n * @param {Object} dataView The data view to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned data view.\n */\nfunction cloneDataView(dataView, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;\n return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);\n}\n\nmodule.exports = cloneDataView;\n","/** Used to match `RegExp` flags from their coerced string values. */\nvar reFlags = /\\w*$/;\n\n/**\n * Creates a clone of `regexp`.\n *\n * @private\n * @param {Object} regexp The regexp to clone.\n * @returns {Object} Returns the cloned regexp.\n */\nfunction cloneRegExp(regexp) {\n var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));\n result.lastIndex = regexp.lastIndex;\n return result;\n}\n\nmodule.exports = cloneRegExp;\n","var Symbol = require('./_Symbol');\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * Creates a clone of the `symbol` object.\n *\n * @private\n * @param {Object} symbol The symbol object to clone.\n * @returns {Object} Returns the cloned symbol object.\n */\nfunction cloneSymbol(symbol) {\n return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};\n}\n\nmodule.exports = cloneSymbol;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer');\n\n/**\n * Creates a clone of `typedArray`.\n *\n * @private\n * @param {Object} typedArray The typed array to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned typed array.\n */\nfunction cloneTypedArray(typedArray, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n}\n\nmodule.exports = cloneTypedArray;\n","/**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\nfunction copyArray(source, array) {\n var index = -1,\n length = source.length;\n\n array || (array = Array(length));\n while (++index < length) {\n array[index] = source[index];\n }\n return array;\n}\n\nmodule.exports = copyArray;\n","var assignValue = require('./_assignValue'),\n baseAssignValue = require('./_baseAssignValue');\n\n/**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\nfunction copyObject(source, props, object, customizer) {\n var isNew = !object;\n object || (object = {});\n\n var index = -1,\n length = props.length;\n\n while (++index < length) {\n var key = props[index];\n\n var newValue = customizer\n ? customizer(object[key], source[key], key, object, source)\n : undefined;\n\n if (newValue === undefined) {\n newValue = source[key];\n }\n if (isNew) {\n baseAssignValue(object, key, newValue);\n } else {\n assignValue(object, key, newValue);\n }\n }\n return object;\n}\n\nmodule.exports = copyObject;\n","var copyObject = require('./_copyObject'),\n getSymbols = require('./_getSymbols');\n\n/**\n * Copies own symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbols(source, object) {\n return copyObject(source, getSymbols(source), object);\n}\n\nmodule.exports = copySymbols;\n","var copyObject = require('./_copyObject'),\n getSymbolsIn = require('./_getSymbolsIn');\n\n/**\n * Copies own and inherited symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbolsIn(source, object) {\n return copyObject(source, getSymbolsIn(source), object);\n}\n\nmodule.exports = copySymbolsIn;\n","var root = require('./_root');\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\nmodule.exports = coreJsData;\n","var getNative = require('./_getNative');\n\nvar defineProperty = (function() {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n}());\n\nmodule.exports = defineProperty;\n","var SetCache = require('./_SetCache'),\n arraySome = require('./_arraySome'),\n cacheHas = require('./_cacheHas');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\nfunction equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n arrLength = array.length,\n othLength = other.length;\n\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n return false;\n }\n // Check that cyclic values are equal.\n var arrStacked = stack.get(array);\n var othStacked = stack.get(other);\n if (arrStacked && othStacked) {\n return arrStacked == other && othStacked == array;\n }\n var index = -1,\n result = true,\n seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n stack.set(array, other);\n stack.set(other, array);\n\n // Ignore non-index properties.\n while (++index < arrLength) {\n var arrValue = array[index],\n othValue = other[index];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, arrValue, index, other, array, stack)\n : customizer(arrValue, othValue, index, array, other, stack);\n }\n if (compared !== undefined) {\n if (compared) {\n continue;\n }\n result = false;\n break;\n }\n // Recursively compare arrays (susceptible to call stack limits).\n if (seen) {\n if (!arraySome(other, function(othValue, othIndex) {\n if (!cacheHas(seen, othIndex) &&\n (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n return seen.push(othIndex);\n }\n })) {\n result = false;\n break;\n }\n } else if (!(\n arrValue === othValue ||\n equalFunc(arrValue, othValue, bitmask, customizer, stack)\n )) {\n result = false;\n break;\n }\n }\n stack['delete'](array);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalArrays;\n","var Symbol = require('./_Symbol'),\n Uint8Array = require('./_Uint8Array'),\n eq = require('./eq'),\n equalArrays = require('./_equalArrays'),\n mapToArray = require('./_mapToArray'),\n setToArray = require('./_setToArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]';\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n switch (tag) {\n case dataViewTag:\n if ((object.byteLength != other.byteLength) ||\n (object.byteOffset != other.byteOffset)) {\n return false;\n }\n object = object.buffer;\n other = other.buffer;\n\n case arrayBufferTag:\n if ((object.byteLength != other.byteLength) ||\n !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n return false;\n }\n return true;\n\n case boolTag:\n case dateTag:\n case numberTag:\n // Coerce booleans to `1` or `0` and dates to milliseconds.\n // Invalid dates are coerced to `NaN`.\n return eq(+object, +other);\n\n case errorTag:\n return object.name == other.name && object.message == other.message;\n\n case regexpTag:\n case stringTag:\n // Coerce regexes to strings and treat strings, primitives and objects,\n // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n // for more details.\n return object == (other + '');\n\n case mapTag:\n var convert = mapToArray;\n\n case setTag:\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n convert || (convert = setToArray);\n\n if (object.size != other.size && !isPartial) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked) {\n return stacked == other;\n }\n bitmask |= COMPARE_UNORDERED_FLAG;\n\n // Recursively compare objects (susceptible to call stack limits).\n stack.set(object, other);\n var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n stack['delete'](object);\n return result;\n\n case symbolTag:\n if (symbolValueOf) {\n return symbolValueOf.call(object) == symbolValueOf.call(other);\n }\n }\n return false;\n}\n\nmodule.exports = equalByTag;\n","var getAllKeys = require('./_getAllKeys');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n objProps = getAllKeys(object),\n objLength = objProps.length,\n othProps = getAllKeys(other),\n othLength = othProps.length;\n\n if (objLength != othLength && !isPartial) {\n return false;\n }\n var index = objLength;\n while (index--) {\n var key = objProps[index];\n if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n return false;\n }\n }\n // Check that cyclic values are equal.\n var objStacked = stack.get(object);\n var othStacked = stack.get(other);\n if (objStacked && othStacked) {\n return objStacked == other && othStacked == object;\n }\n var result = true;\n stack.set(object, other);\n stack.set(other, object);\n\n var skipCtor = isPartial;\n while (++index < objLength) {\n key = objProps[index];\n var objValue = object[key],\n othValue = other[key];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, objValue, key, other, object, stack)\n : customizer(objValue, othValue, key, object, other, stack);\n }\n // Recursively compare objects (susceptible to call stack limits).\n if (!(compared === undefined\n ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n : compared\n )) {\n result = false;\n break;\n }\n skipCtor || (skipCtor = key == 'constructor');\n }\n if (result && !skipCtor) {\n var objCtor = object.constructor,\n othCtor = other.constructor;\n\n // Non `Object` object instances with different constructors are not equal.\n if (objCtor != othCtor &&\n ('constructor' in object && 'constructor' in other) &&\n !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n result = false;\n }\n }\n stack['delete'](object);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalObjects;\n","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n","var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbols = require('./_getSymbols'),\n keys = require('./keys');\n\n/**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeys(object) {\n return baseGetAllKeys(object, keys, getSymbols);\n}\n\nmodule.exports = getAllKeys;\n","var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbolsIn = require('./_getSymbolsIn'),\n keysIn = require('./keysIn');\n\n/**\n * Creates an array of own and inherited enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeysIn(object) {\n return baseGetAllKeys(object, keysIn, getSymbolsIn);\n}\n\nmodule.exports = getAllKeysIn;\n","var isKeyable = require('./_isKeyable');\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\nmodule.exports = getMapData;\n","var baseIsNative = require('./_baseIsNative'),\n getValue = require('./_getValue');\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\nmodule.exports = getNative;\n","var overArg = require('./_overArg');\n\n/** Built-in value references. */\nvar getPrototype = overArg(Object.getPrototypeOf, Object);\n\nmodule.exports = getPrototype;\n","var Symbol = require('./_Symbol');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nmodule.exports = getRawTag;\n","var arrayFilter = require('./_arrayFilter'),\n stubArray = require('./stubArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n if (object == null) {\n return [];\n }\n object = Object(object);\n return arrayFilter(nativeGetSymbols(object), function(symbol) {\n return propertyIsEnumerable.call(object, symbol);\n });\n};\n\nmodule.exports = getSymbols;\n","var arrayPush = require('./_arrayPush'),\n getPrototype = require('./_getPrototype'),\n getSymbols = require('./_getSymbols'),\n stubArray = require('./stubArray');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own and inherited enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {\n var result = [];\n while (object) {\n arrayPush(result, getSymbols(object));\n object = getPrototype(object);\n }\n return result;\n};\n\nmodule.exports = getSymbolsIn;\n","var DataView = require('./_DataView'),\n Map = require('./_Map'),\n Promise = require('./_Promise'),\n Set = require('./_Set'),\n WeakMap = require('./_WeakMap'),\n baseGetTag = require('./_baseGetTag'),\n toSource = require('./_toSource');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n setTag = '[object Set]',\n weakMapTag = '[object WeakMap]';\n\nvar dataViewTag = '[object DataView]';\n\n/** Used to detect maps, sets, and weakmaps. */\nvar dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nvar getTag = baseGetTag;\n\n// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\nif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = baseGetTag(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : '';\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n}\n\nmodule.exports = getTag;\n","/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\nmodule.exports = getValue;\n","var nativeCreate = require('./_nativeCreate');\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n}\n\nmodule.exports = hashClear;\n","/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = hashDelete;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\nmodule.exports = hashGet;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\nmodule.exports = hashHas;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\nmodule.exports = hashSet;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Initializes an array clone.\n *\n * @private\n * @param {Array} array The array to clone.\n * @returns {Array} Returns the initialized clone.\n */\nfunction initCloneArray(array) {\n var length = array.length,\n result = new array.constructor(length);\n\n // Add properties assigned by `RegExp#exec`.\n if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {\n result.index = array.index;\n result.input = array.input;\n }\n return result;\n}\n\nmodule.exports = initCloneArray;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer'),\n cloneDataView = require('./_cloneDataView'),\n cloneRegExp = require('./_cloneRegExp'),\n cloneSymbol = require('./_cloneSymbol'),\n cloneTypedArray = require('./_cloneTypedArray');\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/**\n * Initializes an object clone based on its `toStringTag`.\n *\n * **Note:** This function only supports cloning values with tags of\n * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.\n *\n * @private\n * @param {Object} object The object to clone.\n * @param {string} tag The `toStringTag` of the object to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneByTag(object, tag, isDeep) {\n var Ctor = object.constructor;\n switch (tag) {\n case arrayBufferTag:\n return cloneArrayBuffer(object);\n\n case boolTag:\n case dateTag:\n return new Ctor(+object);\n\n case dataViewTag:\n return cloneDataView(object, isDeep);\n\n case float32Tag: case float64Tag:\n case int8Tag: case int16Tag: case int32Tag:\n case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:\n return cloneTypedArray(object, isDeep);\n\n case mapTag:\n return new Ctor;\n\n case numberTag:\n case stringTag:\n return new Ctor(object);\n\n case regexpTag:\n return cloneRegExp(object);\n\n case setTag:\n return new Ctor;\n\n case symbolTag:\n return cloneSymbol(object);\n }\n}\n\nmodule.exports = initCloneByTag;\n","var baseCreate = require('./_baseCreate'),\n getPrototype = require('./_getPrototype'),\n isPrototype = require('./_isPrototype');\n\n/**\n * Initializes an object clone.\n *\n * @private\n * @param {Object} object The object to clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneObject(object) {\n return (typeof object.constructor == 'function' && !isPrototype(object))\n ? baseCreate(getPrototype(object))\n : {};\n}\n\nmodule.exports = initCloneObject;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n var type = typeof value;\n length = length == null ? MAX_SAFE_INTEGER : length;\n\n return !!length &&\n (type == 'number' ||\n (type != 'symbol' && reIsUint.test(value))) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\nmodule.exports = isIndex;\n","/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\nmodule.exports = isKeyable;\n","var coreJsData = require('./_coreJsData');\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\nmodule.exports = isMasked;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\nmodule.exports = isPrototype;\n","/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n}\n\nmodule.exports = listCacheClear;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype;\n\n/** Built-in value references. */\nvar splice = arrayProto.splice;\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n}\n\nmodule.exports = listCacheDelete;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\nmodule.exports = listCacheGet;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\nmodule.exports = listCacheHas;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\nmodule.exports = listCacheSet;\n","var Hash = require('./_Hash'),\n ListCache = require('./_ListCache'),\n Map = require('./_Map');\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\nmodule.exports = mapCacheClear;\n","var getMapData = require('./_getMapData');\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = mapCacheDelete;\n","var getMapData = require('./_getMapData');\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\nmodule.exports = mapCacheGet;\n","var getMapData = require('./_getMapData');\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\nmodule.exports = mapCacheHas;\n","var getMapData = require('./_getMapData');\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n}\n\nmodule.exports = mapCacheSet;\n","/**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\nfunction mapToArray(map) {\n var index = -1,\n result = Array(map.size);\n\n map.forEach(function(value, key) {\n result[++index] = [key, value];\n });\n return result;\n}\n\nmodule.exports = mapToArray;\n","var getNative = require('./_getNative');\n\n/* Built-in method references that are verified to be native. */\nvar nativeCreate = getNative(Object, 'create');\n\nmodule.exports = nativeCreate;\n","var overArg = require('./_overArg');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeKeys = overArg(Object.keys, Object);\n\nmodule.exports = nativeKeys;\n","/**\n * This function is like\n * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * except that it includes inherited enumerable properties.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction nativeKeysIn(object) {\n var result = [];\n if (object != null) {\n for (var key in Object(object)) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = nativeKeysIn;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n try {\n // Use `util.types` for Node.js 10+.\n var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n if (types) {\n return types;\n }\n\n // Legacy `process.binding('util')` for Node.js < 10.\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n}());\n\nmodule.exports = nodeUtil;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n","/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\nmodule.exports = overArg;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n","/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\nfunction setCacheAdd(value) {\n this.__data__.set(value, HASH_UNDEFINED);\n return this;\n}\n\nmodule.exports = setCacheAdd;\n","/**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\nfunction setCacheHas(value) {\n return this.__data__.has(value);\n}\n\nmodule.exports = setCacheHas;\n","/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\nfunction setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n}\n\nmodule.exports = setToArray;\n","var ListCache = require('./_ListCache');\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}\n\nmodule.exports = stackClear;\n","/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n var data = this.__data__,\n result = data['delete'](key);\n\n this.size = data.size;\n return result;\n}\n\nmodule.exports = stackDelete;\n","/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n return this.__data__.get(key);\n}\n\nmodule.exports = stackGet;\n","/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n return this.__data__.has(key);\n}\n\nmodule.exports = stackHas;\n","var ListCache = require('./_ListCache'),\n Map = require('./_Map'),\n MapCache = require('./_MapCache');\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n var data = this.__data__;\n if (data instanceof ListCache) {\n var pairs = data.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n this.size = ++data.size;\n return this;\n }\n data = this.__data__ = new MapCache(pairs);\n }\n data.set(key, value);\n this.size = data.size;\n return this;\n}\n\nmodule.exports = stackSet;\n","/** Used for built-in method references. */\nvar funcProto = Function.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\nmodule.exports = toSource;\n","var baseClone = require('./_baseClone');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_SYMBOLS_FLAG = 4;\n\n/**\n * This method is like `_.clone` except that it recursively clones `value`.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Lang\n * @param {*} value The value to recursively clone.\n * @returns {*} Returns the deep cloned value.\n * @see _.clone\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var deep = _.cloneDeep(objects);\n * console.log(deep[0] === objects[0]);\n * // => false\n */\nfunction cloneDeep(value) {\n return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);\n}\n\nmodule.exports = cloneDeep;\n","/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\nmodule.exports = eq;\n","var baseIsArguments = require('./_baseIsArguments'),\n isObjectLike = require('./isObjectLike');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n};\n\nmodule.exports = isArguments;\n","/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\nmodule.exports = isArray;\n","var isFunction = require('./isFunction'),\n isLength = require('./isLength');\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\nmodule.exports = isArrayLike;\n","var root = require('./_root'),\n stubFalse = require('./stubFalse');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\nmodule.exports = isBuffer;\n","var baseIsEqual = require('./_baseIsEqual');\n\n/**\n * Performs a deep comparison between two values to determine if they are\n * equivalent.\n *\n * **Note:** This method supports comparing arrays, array buffers, booleans,\n * date objects, error objects, maps, numbers, `Object` objects, regexes,\n * sets, strings, symbols, and typed arrays. `Object` objects are compared\n * by their own, not inherited, enumerable properties. Functions and DOM\n * nodes are compared by strict equality, i.e. `===`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.isEqual(object, other);\n * // => true\n *\n * object === other;\n * // => false\n */\nfunction isEqual(value, other) {\n return baseIsEqual(value, other);\n}\n\nmodule.exports = isEqual;\n","var baseGetTag = require('./_baseGetTag'),\n isObject = require('./isObject');\n\n/** `Object#toString` result references. */\nvar asyncTag = '[object AsyncFunction]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n proxyTag = '[object Proxy]';\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\nmodule.exports = isFunction;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\nmodule.exports = isLength;\n","var baseIsMap = require('./_baseIsMap'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsMap = nodeUtil && nodeUtil.isMap;\n\n/**\n * Checks if `value` is classified as a `Map` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n * @example\n *\n * _.isMap(new Map);\n * // => true\n *\n * _.isMap(new WeakMap);\n * // => false\n */\nvar isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;\n\nmodule.exports = isMap;\n","/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n","var baseIsSet = require('./_baseIsSet'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsSet = nodeUtil && nodeUtil.isSet;\n\n/**\n * Checks if `value` is classified as a `Set` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n * @example\n *\n * _.isSet(new Set);\n * // => true\n *\n * _.isSet(new WeakSet);\n * // => false\n */\nvar isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;\n\nmodule.exports = isSet;\n","var baseIsTypedArray = require('./_baseIsTypedArray'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\nmodule.exports = isTypedArray;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeys = require('./_baseKeys'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\nmodule.exports = keys;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeysIn = require('./_baseKeysIn'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\nfunction keysIn(object) {\n return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n}\n\nmodule.exports = keysIn;\n","/**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\nfunction stubArray() {\n return [];\n}\n\nmodule.exports = stubArray;\n","/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n return false;\n}\n\nmodule.exports = stubFalse;\n","import { connect, type BaseConnectionOptions } from \"@openfin/core-web\";\nimport { getSettings } from \"./settings\";\n\n/**\n * Initializes the OpenFin Web Broker connection.\n * @param inherit Should we inherit settings from the host (available in the OpenFin layout system) or use settings? Default is true.\n */\nexport async function init(inherit: boolean = true): Promise {\n\t// Set window.fin to the `fin` object.\n\tlet options: BaseConnectionOptions | undefined;\n\tif (window.fin === undefined) {\n\t\tif (!inherit) {\n\t\t\tconst settings = await getSettings();\n\t\t\tif (settings === undefined) {\n\t\t\t\tconsole.error(\n\t\t\t\t\t\"Unable to run the sample as we have been unable to load the web manifest and it's settings from the currently running html page. Please ensure that the web manifest is being served and that it contains the custom_settings section.\"\n\t\t\t\t);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\toptions = {\n\t\t\t\tbrokerUrl: settings.platform.interop.brokerUrl,\n\t\t\t\tinteropConfig: {\n\t\t\t\t\tproviderId: settings.platform.interop.providerId,\n\t\t\t\t\tcurrentContextGroup: settings.platform.interop.defaultContextGroup\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t\t// Specify an interopConfig with a specific provider ID and a context group to initialize the `fin.me.interop` client on connection.\n\t\tif (options) {\n\t\t\twindow.fin = await connect({\n\t\t\t\toptions\n\t\t\t});\n\t\t} else {\n\t\t\twindow.fin = await connect({\n\t\t\t\tconnectionInheritance: \"enabled\"\n\t\t\t});\n\t\t}\n\t\tconsole.log(\"Finished initializing the fin API.\");\n\t\t// Create and dispatch the finReady event\n\t\tconst event = new CustomEvent(\"finReady\");\n\t\twindow.dispatchEvent(event);\n\t}\n\n\tif (window.fdc3 === undefined && window?.fin?.me.interop?.getFDC3Sync !== undefined) {\n\t\twindow.fdc3 = fin.me.interop.getFDC3Sync(\"2.0\");\n\t\tconsole.log(\"Finished initializing the fdc3 API.\");\n\t\t// Create and dispatch the FDC3Ready event\n\t\tconst event = new CustomEvent(\"fdc3Ready\");\n\t\twindow.dispatchEvent(event);\n\t}\n}\n","import type { WebLayoutSnapshot } from \"@openfin/core-web\";\nimport type { Settings } from \"../shapes/setting-shapes\";\n\n/**\n * Fetches the settings for the application.\n * @returns The settings for the application.\n */\nexport async function getSettings(): Promise {\n\tconst settings = await getManifestSettings();\n\tif (settings === undefined) {\n\t\tconsole.error(\n\t\t\t\"Unable to run the example as settings are required and we fetch them from the link web manifest from the html page that is being served. It should exist in the customSettings section of the web manifest.\"\n\t\t);\n\t}\n\treturn settings;\n}\n\n/**\n * Returns a default layout from the settings if provided.\n * @returns The default layout from the settings.\n */\nexport async function getDefaultLayout(): Promise {\n\tconst settings = await getSettings();\n\tif (settings?.platform?.layout?.defaultLayout === undefined) {\n\t\tconsole.error(\n\t\t\t\"Unable to run the example as without a layout being defined. Please ensure that settings have been provided in the web manifest.\"\n\t\t);\n\t\treturn;\n\t}\n\tif (typeof settings.platform.layout.defaultLayout === \"string\") {\n\t\tconst layoutResponse = await fetch(settings.platform.layout.defaultLayout);\n\t\tconst layoutJson = (await layoutResponse.json()) as WebLayoutSnapshot;\n\t\treturn layoutJson;\n\t}\n\treturn settings.platform.layout.defaultLayout;\n}\n\n/**\n * Returns a default layout from the settings if provided.\n * @returns The default layout from the settings.\n */\nexport async function getSecondLayout(): Promise {\n\tconst settings = await getSettings();\n\tif (settings?.platform?.layout?.secondLayout === undefined) {\n\t\tconsole.error(\n\t\t\t\"Unable to run the example as without a layout being defined. Please ensure that settings have been provided in the web manifest.\"\n\t\t);\n\t\treturn;\n\t}\n\tif (typeof settings.platform.layout.secondLayout === \"string\") {\n\t\tconst layoutResponse = await fetch(settings.platform.layout.secondLayout);\n\t\tconst layoutJson = (await layoutResponse.json()) as WebLayoutSnapshot;\n\t\treturn layoutJson;\n\t}\n\treturn settings.platform.layout.secondLayout;\n}\n/**\n * Returns the settings from the manifest file.\n * @returns customSettings for this example\n */\nasync function getManifestSettings(): Promise {\n\t// Get the manifest link\n\tconst link = document.querySelector('link[rel=\"manifest\"]');\n\tif (link !== null) {\n\t\tconst manifestResponse = await fetch(link.href);\n\t\tconst manifestJson = (await manifestResponse.json()) as { custom_settings: Settings };\n\t\treturn manifestJson.custom_settings;\n\t}\n}\n","export { default as v1 } from './v1.js';\nexport { default as v3 } from './v3.js';\nexport { default as v4 } from './v4.js';\nexport { default as v5 } from './v5.js';\nexport { default as NIL } from './nil.js';\nexport { default as version } from './version.js';\nexport { default as validate } from './validate.js';\nexport { default as stringify } from './stringify.js';\nexport { default as parse } from './parse.js';","/*\n * Browser-compatible JavaScript MD5\n *\n * Modification of JavaScript MD5\n * https://github.com/blueimp/JavaScript-MD5\n *\n * Copyright 2011, Sebastian Tschan\n * https://blueimp.net\n *\n * Licensed under the MIT license:\n * https://opensource.org/licenses/MIT\n *\n * Based on\n * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message\n * Digest Algorithm, as defined in RFC 1321.\n * Version 2.2 Copyright (C) Paul Johnston 1999 - 2009\n * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet\n * Distributed under the BSD License\n * See http://pajhome.org.uk/crypt/md5 for more info.\n */\nfunction md5(bytes) {\n if (typeof bytes === 'string') {\n var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape\n\n bytes = new Uint8Array(msg.length);\n\n for (var i = 0; i < msg.length; ++i) {\n bytes[i] = msg.charCodeAt(i);\n }\n }\n\n return md5ToHexEncodedArray(wordsToMd5(bytesToWords(bytes), bytes.length * 8));\n}\n/*\n * Convert an array of little-endian words to an array of bytes\n */\n\n\nfunction md5ToHexEncodedArray(input) {\n var output = [];\n var length32 = input.length * 32;\n var hexTab = '0123456789abcdef';\n\n for (var i = 0; i < length32; i += 8) {\n var x = input[i >> 5] >>> i % 32 & 0xff;\n var hex = parseInt(hexTab.charAt(x >>> 4 & 0x0f) + hexTab.charAt(x & 0x0f), 16);\n output.push(hex);\n }\n\n return output;\n}\n/**\n * Calculate output length with padding and bit length\n */\n\n\nfunction getOutputLength(inputLength8) {\n return (inputLength8 + 64 >>> 9 << 4) + 14 + 1;\n}\n/*\n * Calculate the MD5 of an array of little-endian words, and a bit length.\n */\n\n\nfunction wordsToMd5(x, len) {\n /* append padding */\n x[len >> 5] |= 0x80 << len % 32;\n x[getOutputLength(len) - 1] = len;\n var a = 1732584193;\n var b = -271733879;\n var c = -1732584194;\n var d = 271733878;\n\n for (var i = 0; i < x.length; i += 16) {\n var olda = a;\n var oldb = b;\n var oldc = c;\n var oldd = d;\n a = md5ff(a, b, c, d, x[i], 7, -680876936);\n d = md5ff(d, a, b, c, x[i + 1], 12, -389564586);\n c = md5ff(c, d, a, b, x[i + 2], 17, 606105819);\n b = md5ff(b, c, d, a, x[i + 3], 22, -1044525330);\n a = md5ff(a, b, c, d, x[i + 4], 7, -176418897);\n d = md5ff(d, a, b, c, x[i + 5], 12, 1200080426);\n c = md5ff(c, d, a, b, x[i + 6], 17, -1473231341);\n b = md5ff(b, c, d, a, x[i + 7], 22, -45705983);\n a = md5ff(a, b, c, d, x[i + 8], 7, 1770035416);\n d = md5ff(d, a, b, c, x[i + 9], 12, -1958414417);\n c = md5ff(c, d, a, b, x[i + 10], 17, -42063);\n b = md5ff(b, c, d, a, x[i + 11], 22, -1990404162);\n a = md5ff(a, b, c, d, x[i + 12], 7, 1804603682);\n d = md5ff(d, a, b, c, x[i + 13], 12, -40341101);\n c = md5ff(c, d, a, b, x[i + 14], 17, -1502002290);\n b = md5ff(b, c, d, a, x[i + 15], 22, 1236535329);\n a = md5gg(a, b, c, d, x[i + 1], 5, -165796510);\n d = md5gg(d, a, b, c, x[i + 6], 9, -1069501632);\n c = md5gg(c, d, a, b, x[i + 11], 14, 643717713);\n b = md5gg(b, c, d, a, x[i], 20, -373897302);\n a = md5gg(a, b, c, d, x[i + 5], 5, -701558691);\n d = md5gg(d, a, b, c, x[i + 10], 9, 38016083);\n c = md5gg(c, d, a, b, x[i + 15], 14, -660478335);\n b = md5gg(b, c, d, a, x[i + 4], 20, -405537848);\n a = md5gg(a, b, c, d, x[i + 9], 5, 568446438);\n d = md5gg(d, a, b, c, x[i + 14], 9, -1019803690);\n c = md5gg(c, d, a, b, x[i + 3], 14, -187363961);\n b = md5gg(b, c, d, a, x[i + 8], 20, 1163531501);\n a = md5gg(a, b, c, d, x[i + 13], 5, -1444681467);\n d = md5gg(d, a, b, c, x[i + 2], 9, -51403784);\n c = md5gg(c, d, a, b, x[i + 7], 14, 1735328473);\n b = md5gg(b, c, d, a, x[i + 12], 20, -1926607734);\n a = md5hh(a, b, c, d, x[i + 5], 4, -378558);\n d = md5hh(d, a, b, c, x[i + 8], 11, -2022574463);\n c = md5hh(c, d, a, b, x[i + 11], 16, 1839030562);\n b = md5hh(b, c, d, a, x[i + 14], 23, -35309556);\n a = md5hh(a, b, c, d, x[i + 1], 4, -1530992060);\n d = md5hh(d, a, b, c, x[i + 4], 11, 1272893353);\n c = md5hh(c, d, a, b, x[i + 7], 16, -155497632);\n b = md5hh(b, c, d, a, x[i + 10], 23, -1094730640);\n a = md5hh(a, b, c, d, x[i + 13], 4, 681279174);\n d = md5hh(d, a, b, c, x[i], 11, -358537222);\n c = md5hh(c, d, a, b, x[i + 3], 16, -722521979);\n b = md5hh(b, c, d, a, x[i + 6], 23, 76029189);\n a = md5hh(a, b, c, d, x[i + 9], 4, -640364487);\n d = md5hh(d, a, b, c, x[i + 12], 11, -421815835);\n c = md5hh(c, d, a, b, x[i + 15], 16, 530742520);\n b = md5hh(b, c, d, a, x[i + 2], 23, -995338651);\n a = md5ii(a, b, c, d, x[i], 6, -198630844);\n d = md5ii(d, a, b, c, x[i + 7], 10, 1126891415);\n c = md5ii(c, d, a, b, x[i + 14], 15, -1416354905);\n b = md5ii(b, c, d, a, x[i + 5], 21, -57434055);\n a = md5ii(a, b, c, d, x[i + 12], 6, 1700485571);\n d = md5ii(d, a, b, c, x[i + 3], 10, -1894986606);\n c = md5ii(c, d, a, b, x[i + 10], 15, -1051523);\n b = md5ii(b, c, d, a, x[i + 1], 21, -2054922799);\n a = md5ii(a, b, c, d, x[i + 8], 6, 1873313359);\n d = md5ii(d, a, b, c, x[i + 15], 10, -30611744);\n c = md5ii(c, d, a, b, x[i + 6], 15, -1560198380);\n b = md5ii(b, c, d, a, x[i + 13], 21, 1309151649);\n a = md5ii(a, b, c, d, x[i + 4], 6, -145523070);\n d = md5ii(d, a, b, c, x[i + 11], 10, -1120210379);\n c = md5ii(c, d, a, b, x[i + 2], 15, 718787259);\n b = md5ii(b, c, d, a, x[i + 9], 21, -343485551);\n a = safeAdd(a, olda);\n b = safeAdd(b, oldb);\n c = safeAdd(c, oldc);\n d = safeAdd(d, oldd);\n }\n\n return [a, b, c, d];\n}\n/*\n * Convert an array bytes to an array of little-endian words\n * Characters >255 have their high-byte silently ignored.\n */\n\n\nfunction bytesToWords(input) {\n if (input.length === 0) {\n return [];\n }\n\n var length8 = input.length * 8;\n var output = new Uint32Array(getOutputLength(length8));\n\n for (var i = 0; i < length8; i += 8) {\n output[i >> 5] |= (input[i / 8] & 0xff) << i % 32;\n }\n\n return output;\n}\n/*\n * Add integers, wrapping at 2^32. This uses 16-bit operations internally\n * to work around bugs in some JS interpreters.\n */\n\n\nfunction safeAdd(x, y) {\n var lsw = (x & 0xffff) + (y & 0xffff);\n var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n return msw << 16 | lsw & 0xffff;\n}\n/*\n * Bitwise rotate a 32-bit number to the left.\n */\n\n\nfunction bitRotateLeft(num, cnt) {\n return num << cnt | num >>> 32 - cnt;\n}\n/*\n * These functions implement the four basic operations the algorithm uses.\n */\n\n\nfunction md5cmn(q, a, b, x, s, t) {\n return safeAdd(bitRotateLeft(safeAdd(safeAdd(a, q), safeAdd(x, t)), s), b);\n}\n\nfunction md5ff(a, b, c, d, x, s, t) {\n return md5cmn(b & c | ~b & d, a, b, x, s, t);\n}\n\nfunction md5gg(a, b, c, d, x, s, t) {\n return md5cmn(b & d | c & ~d, a, b, x, s, t);\n}\n\nfunction md5hh(a, b, c, d, x, s, t) {\n return md5cmn(b ^ c ^ d, a, b, x, s, t);\n}\n\nfunction md5ii(a, b, c, d, x, s, t) {\n return md5cmn(c ^ (b | ~d), a, b, x, s, t);\n}\n\nexport default md5;","export default '00000000-0000-0000-0000-000000000000';","import validate from './validate.js';\n\nfunction parse(uuid) {\n if (!validate(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n var v;\n var arr = new Uint8Array(16); // Parse ########-....-....-....-............\n\n arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24;\n arr[1] = v >>> 16 & 0xff;\n arr[2] = v >>> 8 & 0xff;\n arr[3] = v & 0xff; // Parse ........-####-....-....-............\n\n arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8;\n arr[5] = v & 0xff; // Parse ........-....-####-....-............\n\n arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8;\n arr[7] = v & 0xff; // Parse ........-....-....-####-............\n\n arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8;\n arr[9] = v & 0xff; // Parse ........-....-....-....-############\n // (Use \"/\" to avoid 32-bit truncation when bit-shifting high-order bytes)\n\n arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff;\n arr[11] = v / 0x100000000 & 0xff;\n arr[12] = v >>> 24 & 0xff;\n arr[13] = v >>> 16 & 0xff;\n arr[14] = v >>> 8 & 0xff;\n arr[15] = v & 0xff;\n return arr;\n}\n\nexport default parse;","export default /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;","// Unique ID creation requires a high quality random # generator. In the browser we therefore\n// require the crypto API and do not support built-in fallback to lower quality random number\n// generators (like Math.random()).\nvar getRandomValues;\nvar rnds8 = new Uint8Array(16);\nexport default function rng() {\n // lazy load so that environments that need to polyfill have a chance to do so\n if (!getRandomValues) {\n // getRandomValues needs to be invoked in a context where \"this\" is a Crypto implementation. Also,\n // find the complete implementation of crypto (msCrypto) on IE11.\n getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto !== 'undefined' && typeof msCrypto.getRandomValues === 'function' && msCrypto.getRandomValues.bind(msCrypto);\n\n if (!getRandomValues) {\n throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');\n }\n }\n\n return getRandomValues(rnds8);\n}","// Adapted from Chris Veness' SHA1 code at\n// http://www.movable-type.co.uk/scripts/sha1.html\nfunction f(s, x, y, z) {\n switch (s) {\n case 0:\n return x & y ^ ~x & z;\n\n case 1:\n return x ^ y ^ z;\n\n case 2:\n return x & y ^ x & z ^ y & z;\n\n case 3:\n return x ^ y ^ z;\n }\n}\n\nfunction ROTL(x, n) {\n return x << n | x >>> 32 - n;\n}\n\nfunction sha1(bytes) {\n var K = [0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xca62c1d6];\n var H = [0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0];\n\n if (typeof bytes === 'string') {\n var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape\n\n bytes = [];\n\n for (var i = 0; i < msg.length; ++i) {\n bytes.push(msg.charCodeAt(i));\n }\n } else if (!Array.isArray(bytes)) {\n // Convert Array-like to Array\n bytes = Array.prototype.slice.call(bytes);\n }\n\n bytes.push(0x80);\n var l = bytes.length / 4 + 2;\n var N = Math.ceil(l / 16);\n var M = new Array(N);\n\n for (var _i = 0; _i < N; ++_i) {\n var arr = new Uint32Array(16);\n\n for (var j = 0; j < 16; ++j) {\n arr[j] = bytes[_i * 64 + j * 4] << 24 | bytes[_i * 64 + j * 4 + 1] << 16 | bytes[_i * 64 + j * 4 + 2] << 8 | bytes[_i * 64 + j * 4 + 3];\n }\n\n M[_i] = arr;\n }\n\n M[N - 1][14] = (bytes.length - 1) * 8 / Math.pow(2, 32);\n M[N - 1][14] = Math.floor(M[N - 1][14]);\n M[N - 1][15] = (bytes.length - 1) * 8 & 0xffffffff;\n\n for (var _i2 = 0; _i2 < N; ++_i2) {\n var W = new Uint32Array(80);\n\n for (var t = 0; t < 16; ++t) {\n W[t] = M[_i2][t];\n }\n\n for (var _t = 16; _t < 80; ++_t) {\n W[_t] = ROTL(W[_t - 3] ^ W[_t - 8] ^ W[_t - 14] ^ W[_t - 16], 1);\n }\n\n var a = H[0];\n var b = H[1];\n var c = H[2];\n var d = H[3];\n var e = H[4];\n\n for (var _t2 = 0; _t2 < 80; ++_t2) {\n var s = Math.floor(_t2 / 20);\n var T = ROTL(a, 5) + f(s, b, c, d) + e + K[s] + W[_t2] >>> 0;\n e = d;\n d = c;\n c = ROTL(b, 30) >>> 0;\n b = a;\n a = T;\n }\n\n H[0] = H[0] + a >>> 0;\n H[1] = H[1] + b >>> 0;\n H[2] = H[2] + c >>> 0;\n H[3] = H[3] + d >>> 0;\n H[4] = H[4] + e >>> 0;\n }\n\n return [H[0] >> 24 & 0xff, H[0] >> 16 & 0xff, H[0] >> 8 & 0xff, H[0] & 0xff, H[1] >> 24 & 0xff, H[1] >> 16 & 0xff, H[1] >> 8 & 0xff, H[1] & 0xff, H[2] >> 24 & 0xff, H[2] >> 16 & 0xff, H[2] >> 8 & 0xff, H[2] & 0xff, H[3] >> 24 & 0xff, H[3] >> 16 & 0xff, H[3] >> 8 & 0xff, H[3] & 0xff, H[4] >> 24 & 0xff, H[4] >> 16 & 0xff, H[4] >> 8 & 0xff, H[4] & 0xff];\n}\n\nexport default sha1;","import validate from './validate.js';\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\n\nvar byteToHex = [];\n\nfor (var i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).substr(1));\n}\n\nfunction stringify(arr) {\n var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n var uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!validate(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n\n return uuid;\n}\n\nexport default stringify;","import rng from './rng.js';\nimport stringify from './stringify.js'; // **`v1()` - Generate time-based UUID**\n//\n// Inspired by https://github.com/LiosK/UUID.js\n// and http://docs.python.org/library/uuid.html\n\nvar _nodeId;\n\nvar _clockseq; // Previous uuid creation time\n\n\nvar _lastMSecs = 0;\nvar _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details\n\nfunction v1(options, buf, offset) {\n var i = buf && offset || 0;\n var b = buf || new Array(16);\n options = options || {};\n var node = options.node || _nodeId;\n var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not\n // specified. We do this lazily to minimize issues related to insufficient\n // system entropy. See #189\n\n if (node == null || clockseq == null) {\n var seedBytes = options.random || (options.rng || rng)();\n\n if (node == null) {\n // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)\n node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]];\n }\n\n if (clockseq == null) {\n // Per 4.2.2, randomize (14 bit) clockseq\n clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;\n }\n } // UUID timestamps are 100 nano-second units since the Gregorian epoch,\n // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so\n // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'\n // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.\n\n\n var msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock\n // cycle to simulate higher resolution clock\n\n var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs)\n\n var dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression\n\n if (dt < 0 && options.clockseq === undefined) {\n clockseq = clockseq + 1 & 0x3fff;\n } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new\n // time interval\n\n\n if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {\n nsecs = 0;\n } // Per 4.2.1.2 Throw error if too many uuids are requested\n\n\n if (nsecs >= 10000) {\n throw new Error(\"uuid.v1(): Can't create more than 10M uuids/sec\");\n }\n\n _lastMSecs = msecs;\n _lastNSecs = nsecs;\n _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch\n\n msecs += 12219292800000; // `time_low`\n\n var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;\n b[i++] = tl >>> 24 & 0xff;\n b[i++] = tl >>> 16 & 0xff;\n b[i++] = tl >>> 8 & 0xff;\n b[i++] = tl & 0xff; // `time_mid`\n\n var tmh = msecs / 0x100000000 * 10000 & 0xfffffff;\n b[i++] = tmh >>> 8 & 0xff;\n b[i++] = tmh & 0xff; // `time_high_and_version`\n\n b[i++] = tmh >>> 24 & 0xf | 0x10; // include version\n\n b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)\n\n b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low`\n\n b[i++] = clockseq & 0xff; // `node`\n\n for (var n = 0; n < 6; ++n) {\n b[i + n] = node[n];\n }\n\n return buf || stringify(b);\n}\n\nexport default v1;","import v35 from './v35.js';\nimport md5 from './md5.js';\nvar v3 = v35('v3', 0x30, md5);\nexport default v3;","import stringify from './stringify.js';\nimport parse from './parse.js';\n\nfunction stringToBytes(str) {\n str = unescape(encodeURIComponent(str)); // UTF8 escape\n\n var bytes = [];\n\n for (var i = 0; i < str.length; ++i) {\n bytes.push(str.charCodeAt(i));\n }\n\n return bytes;\n}\n\nexport var DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8';\nexport var URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8';\nexport default function (name, version, hashfunc) {\n function generateUUID(value, namespace, buf, offset) {\n if (typeof value === 'string') {\n value = stringToBytes(value);\n }\n\n if (typeof namespace === 'string') {\n namespace = parse(namespace);\n }\n\n if (namespace.length !== 16) {\n throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)');\n } // Compute hash of namespace and value, Per 4.3\n // Future: Use spread syntax when supported on all platforms, e.g. `bytes =\n // hashfunc([...namespace, ... value])`\n\n\n var bytes = new Uint8Array(16 + value.length);\n bytes.set(namespace);\n bytes.set(value, namespace.length);\n bytes = hashfunc(bytes);\n bytes[6] = bytes[6] & 0x0f | version;\n bytes[8] = bytes[8] & 0x3f | 0x80;\n\n if (buf) {\n offset = offset || 0;\n\n for (var i = 0; i < 16; ++i) {\n buf[offset + i] = bytes[i];\n }\n\n return buf;\n }\n\n return stringify(bytes);\n } // Function#name is not settable on some platforms (#270)\n\n\n try {\n generateUUID.name = name; // eslint-disable-next-line no-empty\n } catch (err) {} // For CommonJS default export support\n\n\n generateUUID.DNS = DNS;\n generateUUID.URL = URL;\n return generateUUID;\n}","import rng from './rng.js';\nimport stringify from './stringify.js';\n\nfunction v4(options, buf, offset) {\n options = options || {};\n var rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n offset = offset || 0;\n\n for (var i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n\n return buf;\n }\n\n return stringify(rnds);\n}\n\nexport default v4;","import v35 from './v35.js';\nimport sha1 from './sha1.js';\nvar v5 = v35('v5', 0x50, sha1);\nexport default v5;","import REGEX from './regex.js';\n\nfunction validate(uuid) {\n return typeof uuid === 'string' && REGEX.test(uuid);\n}\n\nexport default validate;","import validate from './validate.js';\n\nfunction version(uuid) {\n if (!validate(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n return parseInt(uuid.substr(14, 1), 16);\n}\n\nexport default version;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = (module) => {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","import type { Context } from \"@finos/fdc3\";\nimport { init } from \"../platform/api\";\n\nwindow.addEventListener(\"DOMContentLoaded\", async () => {\n\tawait init(true);\n\tawait initializeDOM();\n});\n\n/**\n * Broadcasts a context using FDC3.\n */\nasync function broadcastContext(): Promise {\n\tconst contextType = \"fdc3.instrument\";\n\tconst contextName = \"Apple\";\n\tconst idData = {\n\t\tticker: \"AAPL\"\n\t};\n\tconst context = {\n\t\ttype: contextType,\n\t\tname: contextName,\n\t\tid: idData\n\t};\n\tif (window.fdc3) {\n\t\tawait window.fdc3.broadcast(context);\n\t\tconsole.log(`Broadcasted context: ${contextType} - ${contextName}`);\n\t} else {\n\t\twindow.addEventListener(\"fdc3Ready\", async () => {\n\t\t\tawait window.fdc3.broadcast(context);\n\t\t\tconsole.log(`Broadcasted context: ${contextType} - ${contextName}`);\n\t\t});\n\t}\n}\n\n/**\n * Adds an FDC3 context listener to the window.\n */\nasync function addFDC3Listener(): Promise {\n\tif (window.fdc3) {\n\t\tawait window.fdc3.addContextListener(null, (context) => {\n\t\t\tupdateDOMElements(context);\n\t\t});\n\t} else {\n\t\twindow.addEventListener(\"fdc3Ready\", async () => {\n\t\t\tawait window.fdc3.addContextListener(null, (context) => {\n\t\t\t\tupdateDOMElements(context);\n\t\t\t});\n\t\t});\n\t}\n}\n\n/**\n * Updates the DOM elements with the provided context.\n * @param context The context to update the DOM elements with.\n */\nfunction updateDOMElements(context: Context): void {\n\tconst contextTypeSpan = document.querySelector(\"#contextType\");\n\tconst contextNameSpan = document.querySelector(\"#contextName\");\n\tconst contextBodyPre = document.querySelector(\"#contextBody\");\n\n\tif (contextTypeSpan !== null && contextNameSpan !== null && contextBodyPre !== null) {\n\t\tcontextTypeSpan.textContent = context.type;\n\t\tcontextNameSpan.textContent = context.name ?? \"No name provided.\";\n\t\tcontextBodyPre.textContent = JSON.stringify(context, null, 2);\n\t}\n}\n\n/**\n * Initialize the DOM elements.\n */\nasync function initializeDOM(): Promise {\n\tconst broadcastButton = document.querySelector(\"#broadcast\");\n\n\tif (broadcastButton !== null) {\n\t\tbroadcastButton.addEventListener(\"click\", async () => {\n\t\t\tawait broadcastContext();\n\t\t});\n\t}\n\n\tawait addFDC3Listener();\n}\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/web/v19.2.0/web-layout/js/iframe-broker.bundle.js b/web/v19.2.0/web-layout/js/iframe-broker.bundle.js index 1ef5809..248e705 100644 --- a/web/v19.2.0/web-layout/js/iframe-broker.bundle.js +++ b/web/v19.2.0/web-layout/js/iframe-broker.bundle.js @@ -2,10 +2,10 @@ /******/ "use strict"; /******/ var __webpack_modules__ = ({ -/***/ "./node_modules/@openfin/core-web/out/iframe-broker.js": -/*!*************************************************************!*\ - !*** ./node_modules/@openfin/core-web/out/iframe-broker.js ***! - \*************************************************************/ +/***/ "../../node_modules/@openfin/core-web/out/iframe-broker.js": +/*!*****************************************************************!*\ + !*** ../../node_modules/@openfin/core-web/out/iframe-broker.js ***! + \*****************************************************************/ /***/ ((__unused_webpack_module, exports) => { const e="web-broker-ports-ready",t="worker-initialize-connection",i="create-fallback-connection",r="request-fallback-connection",n=e=>`ack-${e}`,o=(...e)=>({log:(...t)=>console.debug(`[${(new Date).toISOString()}]`,...(e=>e.map((e=>`[${e}]`)))(e),...t),getLogger:(...t)=>o(...e,...t)}),s=e=>window.top===e,a=(e,t)=>{try{return e.origin===t.origin}catch(e){return!1}},c="openfin/web-shared-worker";class d{static get lockApi(){return navigator.locks}constructor(e){this.name=e,this.releaseCallback=null,d.pending.add(this),this.lockAcquiredPromise=new Promise(((e,t)=>{this.lockReleasedPromise=d.lockApi.request(this.name,(()=>(d.pending.delete(this),e(),new Promise((e=>{d.held.add(this),this.releaseCallback=e}))))).catch((e=>{throw t(e),e}))}))}async acquired(){await this.lockAcquiredPromise}async release(){if(!this.releaseCallback)throw new Error(`Lock ${this.name} not acquired.`);this.releaseCallback(),this.releaseCallback=null,await this.lockReleasedPromise,d.held.delete(this)}async onReleased(e){if(!this.lockReleasedPromise)throw new Error(`Lock ${this.name} not queued.`);return this.lockReleasedPromise.then(e)}autoRelease(){this.acquired().then((()=>this.release()))}static async releaseAll(){const e=Promise.all([...this.pending].map((async e=>{await e.acquired(),await e.release()})));await Promise.all([...this.held].map((async e=>{await e.release()}))),await e}}d.pending=new Set,d.held=new Set;class l{constructor(e=100,t=2){this.pingIntervalMs=e,this.allowedMissedPings=t,this.lockSelf=async e=>{const t=new d((e=>`__OPENFIN__${e.uuid}_${e.name}`)(e));return await t.acquired(),t}}async lockProxiedConnection(e,t){let i=0;t.addEventListener("message",(e=>{"pong"===e.data.topic&&i--}));const r=await this.lockSelf(e);let n=setInterval((()=>{i>=this.allowedMissedPings?(r.release(),clearInterval(n)):(i++,t.postMessage({topic:"ping"}))}),this.pingIntervalMs);t.start()}registerProxiedConnection(e){e.addEventListener("message",(t=>{"ping"===t.data.topic&&e.postMessage({topic:"pong"})})),e.start()}}class h{constructor(e,t,o){this.workerUrl=e,this.iframeWindow=t,this.forceWorker=o,this.identityDisconnectionController=new l,this.isSharedWorkerSupported=()=>!this.forceWorker&&!!window.SharedWorker,this.state="ready",this.establishWorkerConnectionViaWindow=async(e,t)=>{if(a(this.iframeWindow,e)){const o=new MessageChannel,s=new MessageChannel;return this.identityDisconnectionController.registerProxiedConnection(s.port1),new Promise(((a,c)=>{o.port1.addEventListener("message",(e=>{e.data.topic===n(i)&&(e.data.success?a(o.port1):c(e.data.reason))})),o.port1.start();const d={topic:r,payload:{identity:t}};e.postMessage(d,location.origin,[o.port2,s.port2])}))}throw new Error("Could not connect via top level browsing context as its origin does not much the web interop broker.")},this.listenForNestedConnections=e=>{"top-window"===this.state&&a(this.iframeWindow,this.iframeWindow.parent)&&this.iframeWindow.parent.addEventListener("message",(async t=>{const{data:n}=t;if(t.origin===location.origin&&n.topic===r){const[r,...o]=t.ports;if(o.length>0&&n.payload?.identity){const[e]=o;await this.identityDisconnectionController.lockProxiedConnection(n.payload.identity,e)}const s={topic:i};e.postMessage(s,[r])}}))},this.initialize=async e=>{if("ready"!==this.state)throw new Error("Worker connection already initialized");return(e=>{const t=i=>!(!(e=>{try{return!e.origin}catch(e){return!0}})(i)&&i.origin===e.origin)||!s(i)&&t(i.parent);return!s(e)&&t(e.parent)})(this.iframeWindow)&&a(this.iframeWindow,this.iframeWindow.top)?this.state="partitioned-frame":s(this.iframeWindow.parent)?this.state="top-window":this.state="frame",this.connect(e)}}async connect(e){if("ready"===this.state)throw new Error("Must call initialize before connect");switch(this.state){case"partitioned-frame":return this.establishWorkerConnectionViaWindow(this.iframeWindow.top,e);case"top-window":{let t;return t=this.isSharedWorkerSupported()?new SharedWorker(this.workerUrl,c).port:new Worker(this.workerUrl),await this.identityDisconnectionController.lockSelf(e),this.listenForNestedConnections(t),t}case"frame":{if(!this.isSharedWorkerSupported())try{return await this.establishWorkerConnectionViaWindow(this.iframeWindow.top,e)}catch(e){throw new Error(`SharedWorker is not supported and an unexpected error occured when trying to connect via fallback mechanism: ${e.message}`,{cause:e})}await this.identityDisconnectionController.lockSelf(e);const{port:t}=new SharedWorker(this.workerUrl,c);return t}default:throw this.state,new Error(`Invalid state: ${this.state}`)}}}const w=o("@openfin/core-web/iframe-broker"),p=()=>{const e=((e,t)=>{const i=new RegExp(`^${t}<(?.*)>$`).exec(e)?.groups?.meta;if(i)try{return JSON.parse(atob(i))}catch(e){throw new Error(`Failed to decode JSON from ${i}.`)}})(window.name,"of-broker");if(!e)throw new Error("Invalid or missing identity string in iframe context. Ensure that this iframe is being renderered via the @openfin/core-web library.");return e};function g(t){const i={topic:n(e),success:!1,reason:t?.reason??"Connection Rejected"};window.parent.postMessage(i,"*")}exports.init=async i=>{try{const{sharedWorkerUrl:r}=i;await("loading"===document.readyState?new Promise((e=>{const t=()=>{e(),window.removeEventListener("DOMContentLoaded",t)};window.addEventListener("DOMContentLoaded",t)})):Promise.resolve());const o=p(),s=new h(r,window,"same-site"!==i.experimental?.crossTab),a=await s.initialize(o);w.log(`Loading ${r} in ${s.state} mode...`);const c=await(async(i,r,o)=>{const s=new MessageChannel,a=new MessageChannel,c={topic:t,payload:{identity:o}};await new Promise(((e,i)=>{r.addEventListener("message",(r=>{r.data.topic===n(t)&&(r.data.success?e():i(new Error(r.data.reason)))})),r.start?.(),r.postMessage(c,[a.port2])}));const d={topic:n(e),success:!0,payload:{identity:o}};return i.postMessage(d,"*",[s.port2,a.port1]),s.port1})(window.parent,a,o);c.start(),a.start?.(),w.log(`Port transfer complete in ${s.state} mode. Connection established with identity ${JSON.stringify(o)}. SharedWorker support=${s.isSharedWorkerSupported()}`)}catch(e){const t=new Error(`An unexpected error occured during initialization. ${e.message}`);g({reason:t.message}),console.error(t)}},exports.rejectConnections=g; @@ -114,7 +114,7 @@ async function getManifestSettings() { /******/ /************************************************************************/ var __webpack_exports__ = {}; -// This entry need to be wrapped in an IIFE because it uses a non-standard name for the exports (exports). +// This entry needs to be wrapped in an IIFE because it needs to be isolated against other modules in the chunk. (() => { var exports = __webpack_exports__; /*!**********************************************!*\ @@ -122,7 +122,7 @@ var exports = __webpack_exports__; \**********************************************/ Object.defineProperty(exports, "__esModule", ({ value: true })); -const iframe_broker_1 = __webpack_require__(/*! @openfin/core-web/iframe-broker */ "./node_modules/@openfin/core-web/out/iframe-broker.js"); +const iframe_broker_1 = __webpack_require__(/*! @openfin/core-web/iframe-broker */ "../../node_modules/@openfin/core-web/out/iframe-broker.js"); const settings_1 = __webpack_require__(/*! ./settings */ "./client/src/platform/settings.ts"); /** * Initializes the OpenFin Web Broker connection. diff --git a/web/v19.2.0/web-layout/js/iframe-broker.bundle.js.map b/web/v19.2.0/web-layout/js/iframe-broker.bundle.js.map index 4ed4864..df3702c 100644 --- a/web/v19.2.0/web-layout/js/iframe-broker.bundle.js.map +++ b/web/v19.2.0/web-layout/js/iframe-broker.bundle.js.map @@ -1 +1 @@ -{"version":3,"file":"iframe-broker.bundle.js","mappings":";;;;;;;;;;AAAa,6IAA6I,EAAE,cAAc,8BAA8B,yBAAyB,wBAAwB,EAAE,8CAA8C,gCAAgC,IAAI,2BAA2B,SAAS,UAAU,+BAA+B,QAAQ,qBAAqB,uBAAuB,eAAe,wGAAwG,uGAAuG,wCAAwC,iBAAiB,aAAa,GAAG,GAAG,iBAAiB,+BAA+B,gBAAgB,iDAAiD,WAAW,gBAAgB,oGAAoG,oBAAoB,qDAAqD,WAAW,cAAc,wCAAwC,cAAc,2CAA2C,0BAA0B,qDAAqD,qCAAqC,IAAI,gDAAgD,kBAAkB,aAAa,iCAAiC,QAAQ,uBAAuB,wEAAwE,gCAAgC,OAAO,GAAG,OAAO,OAAO,6BAA6B,iCAAiC,QAAQ,kCAAkC,2BAA2B,GAAG,+BAA+B,wBAAwB,8EAA8E,aAAa,GAAG,uBA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CAAC,QAAQ,CAAC,MAAM,CAAC,YAAY,CAAC;AAC9C,CAAC;AACD;;;GAGG;AACH,KAAK,UAAU,mBAAmB;IACjC,wBAAwB;IACxB,MAAM,IAAI,GAAG,QAAQ,CAAC,aAAa,CAAkB,sBAAsB,CAAC,CAAC;IAC7E,IAAI,IAAI,KAAK,IAAI,EAAE,CAAC;QACnB,MAAM,gBAAgB,GAAG,MAAM,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAChD,MAAM,YAAY,GAAG,CAAC,MAAM,gBAAgB,CAAC,IAAI,EAAE,CAAkC,CAAC;QACtF,OAAO,YAAY,CAAC,eAAe,CAAC;IACrC,CAAC;AACF,CAAC;;;;;;;UCpED;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;;;;;;;;ACtBA,4IAA+E;AAC/E,8FAAyC;AAEzC;;;GAGG;AACH,KAAK,UAAU,IAAI;IAClB,MAAM,QAAQ,GAAG,MAAM,0BAAW,GAAE,CAAC;IACrC,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;QAC5B,OAAO,CAAC,KAAK,CACZ,wOAAwO,CACxO,CAAC;QACF,OAAO;IACR,CAAC;IACD,OAAO,wBAAoB,EAAC;QAC3B,eAAe,EAAE,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,eAAe;KAC1D,CAAC,CAAC;AACJ,CAAC;AAED,IAAI,EAAE;KACJ,IAAI,CAAC,GAAG,EAAE;IACV,OAAO,CAAC,GAAG,CAAC,6CAA6C,CAAC,CAAC;IAC3D,OAAO,IAAI,CAAC;AACb,CAAC,CAAC;KACD,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC","sources":["webpack://openfin-web--web-layout/./node_modules/@openfin/core-web/out/iframe-broker.js","webpack://openfin-web--web-layout/./client/src/platform/settings.ts","webpack://openfin-web--web-layout/webpack/bootstrap","webpack://openfin-web--web-layout/./client/src/platform/iframe-broker.ts"],"sourcesContent":["\"use strict\";const e=\"web-broker-ports-ready\",t=\"worker-initialize-connection\",i=\"create-fallback-connection\",r=\"request-fallback-connection\",n=e=>`ack-${e}`,o=(...e)=>({log:(...t)=>console.debug(`[${(new Date).toISOString()}]`,...(e=>e.map((e=>`[${e}]`)))(e),...t),getLogger:(...t)=>o(...e,...t)}),s=e=>window.top===e,a=(e,t)=>{try{return e.origin===t.origin}catch(e){return!1}},c=\"openfin/web-shared-worker\";class d{static get lockApi(){return navigator.locks}constructor(e){this.name=e,this.releaseCallback=null,d.pending.add(this),this.lockAcquiredPromise=new Promise(((e,t)=>{this.lockReleasedPromise=d.lockApi.request(this.name,(()=>(d.pending.delete(this),e(),new Promise((e=>{d.held.add(this),this.releaseCallback=e}))))).catch((e=>{throw t(e),e}))}))}async acquired(){await this.lockAcquiredPromise}async release(){if(!this.releaseCallback)throw new Error(`Lock ${this.name} not acquired.`);this.releaseCallback(),this.releaseCallback=null,await this.lockReleasedPromise,d.held.delete(this)}async onReleased(e){if(!this.lockReleasedPromise)throw new Error(`Lock ${this.name} not queued.`);return this.lockReleasedPromise.then(e)}autoRelease(){this.acquired().then((()=>this.release()))}static async releaseAll(){const e=Promise.all([...this.pending].map((async e=>{await e.acquired(),await e.release()})));await Promise.all([...this.held].map((async e=>{await e.release()}))),await e}}d.pending=new Set,d.held=new Set;class l{constructor(e=100,t=2){this.pingIntervalMs=e,this.allowedMissedPings=t,this.lockSelf=async e=>{const t=new d((e=>`__OPENFIN__${e.uuid}_${e.name}`)(e));return await t.acquired(),t}}async lockProxiedConnection(e,t){let i=0;t.addEventListener(\"message\",(e=>{\"pong\"===e.data.topic&&i--}));const r=await this.lockSelf(e);let n=setInterval((()=>{i>=this.allowedMissedPings?(r.release(),clearInterval(n)):(i++,t.postMessage({topic:\"ping\"}))}),this.pingIntervalMs);t.start()}registerProxiedConnection(e){e.addEventListener(\"message\",(t=>{\"ping\"===t.data.topic&&e.postMessage({topic:\"pong\"})})),e.start()}}class h{constructor(e,t,o){this.workerUrl=e,this.iframeWindow=t,this.forceWorker=o,this.identityDisconnectionController=new l,this.isSharedWorkerSupported=()=>!this.forceWorker&&!!window.SharedWorker,this.state=\"ready\",this.establishWorkerConnectionViaWindow=async(e,t)=>{if(a(this.iframeWindow,e)){const o=new MessageChannel,s=new MessageChannel;return this.identityDisconnectionController.registerProxiedConnection(s.port1),new Promise(((a,c)=>{o.port1.addEventListener(\"message\",(e=>{e.data.topic===n(i)&&(e.data.success?a(o.port1):c(e.data.reason))})),o.port1.start();const d={topic:r,payload:{identity:t}};e.postMessage(d,location.origin,[o.port2,s.port2])}))}throw new Error(\"Could not connect via top level browsing context as its origin does not much the web interop broker.\")},this.listenForNestedConnections=e=>{\"top-window\"===this.state&&a(this.iframeWindow,this.iframeWindow.parent)&&this.iframeWindow.parent.addEventListener(\"message\",(async t=>{const{data:n}=t;if(t.origin===location.origin&&n.topic===r){const[r,...o]=t.ports;if(o.length>0&&n.payload?.identity){const[e]=o;await this.identityDisconnectionController.lockProxiedConnection(n.payload.identity,e)}const s={topic:i};e.postMessage(s,[r])}}))},this.initialize=async e=>{if(\"ready\"!==this.state)throw new Error(\"Worker connection already initialized\");return(e=>{const t=i=>!(!(e=>{try{return!e.origin}catch(e){return!0}})(i)&&i.origin===e.origin)||!s(i)&&t(i.parent);return!s(e)&&t(e.parent)})(this.iframeWindow)&&a(this.iframeWindow,this.iframeWindow.top)?this.state=\"partitioned-frame\":s(this.iframeWindow.parent)?this.state=\"top-window\":this.state=\"frame\",this.connect(e)}}async connect(e){if(\"ready\"===this.state)throw new Error(\"Must call initialize before connect\");switch(this.state){case\"partitioned-frame\":return this.establishWorkerConnectionViaWindow(this.iframeWindow.top,e);case\"top-window\":{let t;return t=this.isSharedWorkerSupported()?new SharedWorker(this.workerUrl,c).port:new Worker(this.workerUrl),await this.identityDisconnectionController.lockSelf(e),this.listenForNestedConnections(t),t}case\"frame\":{if(!this.isSharedWorkerSupported())try{return await this.establishWorkerConnectionViaWindow(this.iframeWindow.top,e)}catch(e){throw new Error(`SharedWorker is not supported and an unexpected error occured when trying to connect via fallback mechanism: ${e.message}`,{cause:e})}await this.identityDisconnectionController.lockSelf(e);const{port:t}=new SharedWorker(this.workerUrl,c);return t}default:throw this.state,new Error(`Invalid state: ${this.state}`)}}}const w=o(\"@openfin/core-web/iframe-broker\"),p=()=>{const e=((e,t)=>{const i=new RegExp(`^${t}<(?.*)>$`).exec(e)?.groups?.meta;if(i)try{return JSON.parse(atob(i))}catch(e){throw new Error(`Failed to decode JSON from ${i}.`)}})(window.name,\"of-broker\");if(!e)throw new Error(\"Invalid or missing identity string in iframe context. Ensure that this iframe is being renderered via the @openfin/core-web library.\");return e};function g(t){const i={topic:n(e),success:!1,reason:t?.reason??\"Connection Rejected\"};window.parent.postMessage(i,\"*\")}exports.init=async i=>{try{const{sharedWorkerUrl:r}=i;await(\"loading\"===document.readyState?new Promise((e=>{const t=()=>{e(),window.removeEventListener(\"DOMContentLoaded\",t)};window.addEventListener(\"DOMContentLoaded\",t)})):Promise.resolve());const o=p(),s=new h(r,window,\"same-site\"!==i.experimental?.crossTab),a=await s.initialize(o);w.log(`Loading ${r} in ${s.state} mode...`);const c=await(async(i,r,o)=>{const s=new MessageChannel,a=new MessageChannel,c={topic:t,payload:{identity:o}};await new Promise(((e,i)=>{r.addEventListener(\"message\",(r=>{r.data.topic===n(t)&&(r.data.success?e():i(new Error(r.data.reason)))})),r.start?.(),r.postMessage(c,[a.port2])}));const d={topic:n(e),success:!0,payload:{identity:o}};return i.postMessage(d,\"*\",[s.port2,a.port1]),s.port1})(window.parent,a,o);c.start(),a.start?.(),w.log(`Port transfer complete in ${s.state} mode. Connection established with identity ${JSON.stringify(o)}. SharedWorker support=${s.isSharedWorkerSupported()}`)}catch(e){const t=new Error(`An unexpected error occured during initialization. ${e.message}`);g({reason:t.message}),console.error(t)}},exports.rejectConnections=g;\n","import type { WebLayoutSnapshot } from \"@openfin/core-web\";\nimport type { Settings } from \"../shapes/setting-shapes\";\n\n/**\n * Fetches the settings for the application.\n * @returns The settings for the application.\n */\nexport async function getSettings(): Promise {\n\tconst settings = await getManifestSettings();\n\tif (settings === undefined) {\n\t\tconsole.error(\n\t\t\t\"Unable to run the example as settings are required and we fetch them from the link web manifest from the html page that is being served. It should exist in the customSettings section of the web manifest.\"\n\t\t);\n\t}\n\treturn settings;\n}\n\n/**\n * Returns a default layout from the settings if provided.\n * @returns The default layout from the settings.\n */\nexport async function getDefaultLayout(): Promise {\n\tconst settings = await getSettings();\n\tif (settings?.platform?.layout?.defaultLayout === undefined) {\n\t\tconsole.error(\n\t\t\t\"Unable to run the example as without a layout being defined. Please ensure that settings have been provided in the web manifest.\"\n\t\t);\n\t\treturn;\n\t}\n\tif (typeof settings.platform.layout.defaultLayout === \"string\") {\n\t\tconst layoutResponse = await fetch(settings.platform.layout.defaultLayout);\n\t\tconst layoutJson = (await layoutResponse.json()) as WebLayoutSnapshot;\n\t\treturn layoutJson;\n\t}\n\treturn settings.platform.layout.defaultLayout;\n}\n\n/**\n * Returns a default layout from the settings if provided.\n * @returns The default layout from the settings.\n */\nexport async function getSecondLayout(): Promise {\n\tconst settings = await getSettings();\n\tif (settings?.platform?.layout?.secondLayout === undefined) {\n\t\tconsole.error(\n\t\t\t\"Unable to run the example as without a layout being defined. Please ensure that settings have been provided in the web manifest.\"\n\t\t);\n\t\treturn;\n\t}\n\tif (typeof settings.platform.layout.secondLayout === \"string\") {\n\t\tconst layoutResponse = await fetch(settings.platform.layout.secondLayout);\n\t\tconst layoutJson = (await layoutResponse.json()) as WebLayoutSnapshot;\n\t\treturn layoutJson;\n\t}\n\treturn settings.platform.layout.secondLayout;\n}\n/**\n * Returns the settings from the manifest file.\n * @returns customSettings for this example\n */\nasync function getManifestSettings(): Promise {\n\t// Get the manifest link\n\tconst link = document.querySelector('link[rel=\"manifest\"]');\n\tif (link !== null) {\n\t\tconst manifestResponse = await fetch(link.href);\n\t\tconst manifestJson = (await manifestResponse.json()) as { custom_settings: Settings };\n\t\treturn manifestJson.custom_settings;\n\t}\n}\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","import { init as initBrokerConnection } from \"@openfin/core-web/iframe-broker\";\nimport { getSettings } from \"./settings\";\n\n/**\n * Initializes the OpenFin Web Broker connection.\n * @returns A promise that resolves when the connection is established.\n */\nasync function init(): Promise {\n\tconst settings = await getSettings();\n\tif (settings === undefined) {\n\t\tconsole.error(\n\t\t\t\"Unable to run the sample as we have been unable to load the web manifest and it's settings from the currently running html page. Please ensure that the web manifest is being served and that it contains the custom_settings section.\"\n\t\t);\n\t\treturn;\n\t}\n\treturn initBrokerConnection({\n\t\tsharedWorkerUrl: settings.platform.interop.sharedWorkerUrl\n\t});\n}\n\ninit()\n\t.then(() => {\n\t\tconsole.log(\"Connected to the OpenFin IFrame Web Broker.\");\n\t\treturn true;\n\t})\n\t.catch((err) => console.error(err));\n"],"names":[],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"iframe-broker.bundle.js","mappings":";;;;;;;;;;AAAa,6IAA6I,EAAE,cAAc,8BAA8B,yBAAyB,wBAAwB,EAAE,8CAA8C,gCAAgC,IAAI,2BAA2B,SAAS,UAAU,+BAA+B,QAAQ,qBAAqB,uBAAuB,eAAe,wGAAwG,uGAAuG,wCAAwC,iBAAiB,aAAa,GAAG,GAAG,iBAAiB,+BAA+B,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ACJ,IAAI,CAAC,GAAG,EAAE;IACV,OAAO,CAAC,GAAG,CAAC,6CAA6C,CAAC,CAAC;IAC3D,OAAO,IAAI,CAAC;AACb,CAAC,CAAC;KACD,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC","sources":["webpack://openfin-web--web-layout/../../node_modules/@openfin/core-web/out/iframe-broker.js","webpack://openfin-web--web-layout/./client/src/platform/settings.ts","webpack://openfin-web--web-layout/webpack/bootstrap","webpack://openfin-web--web-layout/./client/src/platform/iframe-broker.ts"],"sourcesContent":["\"use strict\";const e=\"web-broker-ports-ready\",t=\"worker-initialize-connection\",i=\"create-fallback-connection\",r=\"request-fallback-connection\",n=e=>`ack-${e}`,o=(...e)=>({log:(...t)=>console.debug(`[${(new Date).toISOString()}]`,...(e=>e.map((e=>`[${e}]`)))(e),...t),getLogger:(...t)=>o(...e,...t)}),s=e=>window.top===e,a=(e,t)=>{try{return e.origin===t.origin}catch(e){return!1}},c=\"openfin/web-shared-worker\";class d{static get lockApi(){return navigator.locks}constructor(e){this.name=e,this.releaseCallback=null,d.pending.add(this),this.lockAcquiredPromise=new Promise(((e,t)=>{this.lockReleasedPromise=d.lockApi.request(this.name,(()=>(d.pending.delete(this),e(),new Promise((e=>{d.held.add(this),this.releaseCallback=e}))))).catch((e=>{throw t(e),e}))}))}async acquired(){await this.lockAcquiredPromise}async release(){if(!this.releaseCallback)throw new Error(`Lock ${this.name} not acquired.`);this.releaseCallback(),this.releaseCallback=null,await this.lockReleasedPromise,d.held.delete(this)}async onReleased(e){if(!this.lockReleasedPromise)throw new Error(`Lock ${this.name} not queued.`);return this.lockReleasedPromise.then(e)}autoRelease(){this.acquired().then((()=>this.release()))}static async releaseAll(){const e=Promise.all([...this.pending].map((async e=>{await e.acquired(),await e.release()})));await Promise.all([...this.held].map((async e=>{await e.release()}))),await e}}d.pending=new Set,d.held=new Set;class l{constructor(e=100,t=2){this.pingIntervalMs=e,this.allowedMissedPings=t,this.lockSelf=async e=>{const t=new d((e=>`__OPENFIN__${e.uuid}_${e.name}`)(e));return await t.acquired(),t}}async lockProxiedConnection(e,t){let i=0;t.addEventListener(\"message\",(e=>{\"pong\"===e.data.topic&&i--}));const r=await this.lockSelf(e);let n=setInterval((()=>{i>=this.allowedMissedPings?(r.release(),clearInterval(n)):(i++,t.postMessage({topic:\"ping\"}))}),this.pingIntervalMs);t.start()}registerProxiedConnection(e){e.addEventListener(\"message\",(t=>{\"ping\"===t.data.topic&&e.postMessage({topic:\"pong\"})})),e.start()}}class h{constructor(e,t,o){this.workerUrl=e,this.iframeWindow=t,this.forceWorker=o,this.identityDisconnectionController=new l,this.isSharedWorkerSupported=()=>!this.forceWorker&&!!window.SharedWorker,this.state=\"ready\",this.establishWorkerConnectionViaWindow=async(e,t)=>{if(a(this.iframeWindow,e)){const o=new MessageChannel,s=new MessageChannel;return this.identityDisconnectionController.registerProxiedConnection(s.port1),new Promise(((a,c)=>{o.port1.addEventListener(\"message\",(e=>{e.data.topic===n(i)&&(e.data.success?a(o.port1):c(e.data.reason))})),o.port1.start();const d={topic:r,payload:{identity:t}};e.postMessage(d,location.origin,[o.port2,s.port2])}))}throw new Error(\"Could not connect via top level browsing context as its origin does not much the web interop broker.\")},this.listenForNestedConnections=e=>{\"top-window\"===this.state&&a(this.iframeWindow,this.iframeWindow.parent)&&this.iframeWindow.parent.addEventListener(\"message\",(async t=>{const{data:n}=t;if(t.origin===location.origin&&n.topic===r){const[r,...o]=t.ports;if(o.length>0&&n.payload?.identity){const[e]=o;await this.identityDisconnectionController.lockProxiedConnection(n.payload.identity,e)}const s={topic:i};e.postMessage(s,[r])}}))},this.initialize=async e=>{if(\"ready\"!==this.state)throw new Error(\"Worker connection already initialized\");return(e=>{const t=i=>!(!(e=>{try{return!e.origin}catch(e){return!0}})(i)&&i.origin===e.origin)||!s(i)&&t(i.parent);return!s(e)&&t(e.parent)})(this.iframeWindow)&&a(this.iframeWindow,this.iframeWindow.top)?this.state=\"partitioned-frame\":s(this.iframeWindow.parent)?this.state=\"top-window\":this.state=\"frame\",this.connect(e)}}async connect(e){if(\"ready\"===this.state)throw new Error(\"Must call initialize before connect\");switch(this.state){case\"partitioned-frame\":return this.establishWorkerConnectionViaWindow(this.iframeWindow.top,e);case\"top-window\":{let t;return t=this.isSharedWorkerSupported()?new SharedWorker(this.workerUrl,c).port:new Worker(this.workerUrl),await this.identityDisconnectionController.lockSelf(e),this.listenForNestedConnections(t),t}case\"frame\":{if(!this.isSharedWorkerSupported())try{return await this.establishWorkerConnectionViaWindow(this.iframeWindow.top,e)}catch(e){throw new Error(`SharedWorker is not supported and an unexpected error occured when trying to connect via fallback mechanism: ${e.message}`,{cause:e})}await this.identityDisconnectionController.lockSelf(e);const{port:t}=new SharedWorker(this.workerUrl,c);return t}default:throw this.state,new Error(`Invalid state: ${this.state}`)}}}const w=o(\"@openfin/core-web/iframe-broker\"),p=()=>{const e=((e,t)=>{const i=new RegExp(`^${t}<(?.*)>$`).exec(e)?.groups?.meta;if(i)try{return JSON.parse(atob(i))}catch(e){throw new Error(`Failed to decode JSON from ${i}.`)}})(window.name,\"of-broker\");if(!e)throw new Error(\"Invalid or missing identity string in iframe context. Ensure that this iframe is being renderered via the @openfin/core-web library.\");return e};function g(t){const i={topic:n(e),success:!1,reason:t?.reason??\"Connection Rejected\"};window.parent.postMessage(i,\"*\")}exports.init=async i=>{try{const{sharedWorkerUrl:r}=i;await(\"loading\"===document.readyState?new Promise((e=>{const t=()=>{e(),window.removeEventListener(\"DOMContentLoaded\",t)};window.addEventListener(\"DOMContentLoaded\",t)})):Promise.resolve());const o=p(),s=new h(r,window,\"same-site\"!==i.experimental?.crossTab),a=await s.initialize(o);w.log(`Loading ${r} in ${s.state} mode...`);const c=await(async(i,r,o)=>{const s=new MessageChannel,a=new MessageChannel,c={topic:t,payload:{identity:o}};await new Promise(((e,i)=>{r.addEventListener(\"message\",(r=>{r.data.topic===n(t)&&(r.data.success?e():i(new Error(r.data.reason)))})),r.start?.(),r.postMessage(c,[a.port2])}));const d={topic:n(e),success:!0,payload:{identity:o}};return i.postMessage(d,\"*\",[s.port2,a.port1]),s.port1})(window.parent,a,o);c.start(),a.start?.(),w.log(`Port transfer complete in ${s.state} mode. Connection established with identity ${JSON.stringify(o)}. SharedWorker support=${s.isSharedWorkerSupported()}`)}catch(e){const t=new Error(`An unexpected error occured during initialization. ${e.message}`);g({reason:t.message}),console.error(t)}},exports.rejectConnections=g;\n","import type { WebLayoutSnapshot } from \"@openfin/core-web\";\nimport type { Settings } from \"../shapes/setting-shapes\";\n\n/**\n * Fetches the settings for the application.\n * @returns The settings for the application.\n */\nexport async function getSettings(): Promise {\n\tconst settings = await getManifestSettings();\n\tif (settings === undefined) {\n\t\tconsole.error(\n\t\t\t\"Unable to run the example as settings are required and we fetch them from the link web manifest from the html page that is being served. It should exist in the customSettings section of the web manifest.\"\n\t\t);\n\t}\n\treturn settings;\n}\n\n/**\n * Returns a default layout from the settings if provided.\n * @returns The default layout from the settings.\n */\nexport async function getDefaultLayout(): Promise {\n\tconst settings = await getSettings();\n\tif (settings?.platform?.layout?.defaultLayout === undefined) {\n\t\tconsole.error(\n\t\t\t\"Unable to run the example as without a layout being defined. Please ensure that settings have been provided in the web manifest.\"\n\t\t);\n\t\treturn;\n\t}\n\tif (typeof settings.platform.layout.defaultLayout === \"string\") {\n\t\tconst layoutResponse = await fetch(settings.platform.layout.defaultLayout);\n\t\tconst layoutJson = (await layoutResponse.json()) as WebLayoutSnapshot;\n\t\treturn layoutJson;\n\t}\n\treturn settings.platform.layout.defaultLayout;\n}\n\n/**\n * Returns a default layout from the settings if provided.\n * @returns The default layout from the settings.\n */\nexport async function getSecondLayout(): Promise {\n\tconst settings = await getSettings();\n\tif (settings?.platform?.layout?.secondLayout === undefined) {\n\t\tconsole.error(\n\t\t\t\"Unable to run the example as without a layout being defined. Please ensure that settings have been provided in the web manifest.\"\n\t\t);\n\t\treturn;\n\t}\n\tif (typeof settings.platform.layout.secondLayout === \"string\") {\n\t\tconst layoutResponse = await fetch(settings.platform.layout.secondLayout);\n\t\tconst layoutJson = (await layoutResponse.json()) as WebLayoutSnapshot;\n\t\treturn layoutJson;\n\t}\n\treturn settings.platform.layout.secondLayout;\n}\n/**\n * Returns the settings from the manifest file.\n * @returns customSettings for this example\n */\nasync function getManifestSettings(): Promise {\n\t// Get the manifest link\n\tconst link = document.querySelector('link[rel=\"manifest\"]');\n\tif (link !== null) {\n\t\tconst manifestResponse = await fetch(link.href);\n\t\tconst manifestJson = (await manifestResponse.json()) as { custom_settings: Settings };\n\t\treturn manifestJson.custom_settings;\n\t}\n}\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","import { init as initBrokerConnection } from \"@openfin/core-web/iframe-broker\";\nimport { getSettings } from \"./settings\";\n\n/**\n * Initializes the OpenFin Web Broker connection.\n * @returns A promise that resolves when the connection is established.\n */\nasync function init(): Promise {\n\tconst settings = await getSettings();\n\tif (settings === undefined) {\n\t\tconsole.error(\n\t\t\t\"Unable to run the sample as we have been unable to load the web manifest and it's settings from the currently running html page. Please ensure that the web manifest is being served and that it contains the custom_settings section.\"\n\t\t);\n\t\treturn;\n\t}\n\treturn initBrokerConnection({\n\t\tsharedWorkerUrl: settings.platform.interop.sharedWorkerUrl\n\t});\n}\n\ninit()\n\t.then(() => {\n\t\tconsole.log(\"Connected to the OpenFin IFrame Web Broker.\");\n\t\treturn true;\n\t})\n\t.catch((err) => console.error(err));\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/web/v19.2.0/web-layout/js/interop-view.bundle.js b/web/v19.2.0/web-layout/js/interop-view.bundle.js index 09abe04..04e71c0 100644 --- a/web/v19.2.0/web-layout/js/interop-view.bundle.js +++ b/web/v19.2.0/web-layout/js/interop-view.bundle.js @@ -1,38 +1,38 @@ /******/ (() => { // webpackBootstrap /******/ var __webpack_modules__ = ({ -/***/ "./node_modules/@openfin/core-web/out/api-client.js": -/*!**********************************************************!*\ - !*** ./node_modules/@openfin/core-web/out/api-client.js ***! - \**********************************************************/ +/***/ "../../node_modules/@openfin/core-web/out/api-client.js": +/*!**************************************************************!*\ + !*** ../../node_modules/@openfin/core-web/out/api-client.js ***! + \**************************************************************/ /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; -var e=__webpack_require__(/*! ./main-8cad4070.js */ "./node_modules/@openfin/core-web/out/main-8cad4070.js");__webpack_require__(/*! buffer/ */ "../../node_modules/buffer/index.js"),__webpack_require__(/*! uuid */ "../../node_modules/uuid/dist/esm-browser/index.js"),__webpack_require__(/*! events */ "../../node_modules/events/events.js"),__webpack_require__(/*! lodash/cloneDeep */ "../../node_modules/lodash/cloneDeep.js"),__webpack_require__(/*! lodash/isEqual */ "../../node_modules/lodash/isEqual.js"),exports.connect=e.connect; +var e=__webpack_require__(/*! ./main-8cad4070.js */ "../../node_modules/@openfin/core-web/out/main-8cad4070.js");__webpack_require__(/*! buffer/ */ "../../node_modules/buffer/index.js"),__webpack_require__(/*! uuid */ "../../node_modules/uuid/dist/esm-browser/index.js"),__webpack_require__(/*! events */ "../../node_modules/events/events.js"),__webpack_require__(/*! lodash/cloneDeep */ "../../node_modules/lodash/cloneDeep.js"),__webpack_require__(/*! lodash/isEqual */ "../../node_modules/lodash/isEqual.js"),exports.connect=e.connect; /***/ }), -/***/ "./node_modules/@openfin/core-web/out/main-8cad4070.js": -/*!*************************************************************!*\ - !*** ./node_modules/@openfin/core-web/out/main-8cad4070.js ***! - \*************************************************************/ +/***/ "../../node_modules/@openfin/core-web/out/main-8cad4070.js": +/*!*****************************************************************!*\ + !*** ../../node_modules/@openfin/core-web/out/main-8cad4070.js ***! + \*****************************************************************/ /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; -var e=__webpack_require__(/*! buffer/ */ "../../node_modules/buffer/index.js"),t=__webpack_require__(/*! events */ "../../node_modules/events/events.js"),n=__webpack_require__(/*! lodash/cloneDeep */ "../../node_modules/lodash/cloneDeep.js"),i=__webpack_require__(/*! lodash/isEqual */ "../../node_modules/lodash/isEqual.js"),r=__webpack_require__(/*! uuid */ "../../node_modules/uuid/dist/esm-browser/index.js");const o=(e,t)=>`${t}<${btoa(JSON.stringify(e))}>`;var s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof __webpack_require__.g?__webpack_require__.g:"undefined"!=typeof self?self:{},a={},c={},d={},h={};async function l(e){const t=[];for(const n of e){const e=await n();t.push(e)}return t}Object.defineProperty(h,"__esModule",{value:!0}),h.promiseMapSerial=h.serial=h.promiseMap=h.promisify=void 0,h.promisify=function(e){return(...t)=>new Promise(((n,i)=>{e(...t,((e,t)=>e?i(e):n(t)))}))},h.promiseMap=async function(e,t){return Promise.all(e.map(t))},h.serial=l,h.promiseMapSerial=async function(e,t){return l(e.map(((e,n,i)=>()=>t(e,n,i))))};var u,p=s&&s.__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},w=s&&s.__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)};Object.defineProperty(d,"__esModule",{value:!0}),d.Reply=d.EmitterBase=d.Base=void 0;const y=h;class f{constructor(e){this.isNodeEnvironment=()=>"node"===this.wire.environment.type,this.isOpenFinEnvironment=()=>"openfin"===this.wire.environment.type,this.isBrowserEnvironment=()=>"other"===this.wire.environment.type,this.wire=e}get fin(){return this.wire.getFin()}get me(){return this.wire.me}}d.Base=f;d.EmitterBase=class extends f{constructor(e,t,...n){super(e),this.topic=t,u.set(this,void 0),this.eventNames=()=>this.hasEmitter()?this.getOrCreateEmitter().eventNames():[],this.emit=(e,t,...n)=>!!this.hasEmitter()&&this.getOrCreateEmitter().emit(e,t,...n),this.hasEmitter=()=>this.wire.eventAggregator.has(w(this,u,"f")),this.getOrCreateEmitter=()=>this.wire.eventAggregator.getOrCreate(w(this,u,"f")),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[],this.listenerCount=e=>this.hasEmitter()?this.getOrCreateEmitter().listenerCount(e):0,this.registerEventListener=async(e,t={},n,i)=>{const r={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e},o=this.getOrCreateEmitter();n(o);try{await this.wire.sendAction("subscribe-to-desktop-event",r)}catch(e){throw i(o),this.deleteEmitterIfNothingRegistered(o),e}},this.deregisterEventListener=async(e,t={})=>{if(this.hasEmitter()){const n={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e};await this.wire.sendAction("unsubscribe-to-desktop-event",n).catch((()=>null));return this.getOrCreateEmitter()}return Promise.resolve()},p(this,u,[t,...n],"f"),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[]}async on(e,t,n){return await this.registerEventListener(e,n,(n=>{n.on(e,t)}),(n=>{n.removeListener(e,t)})),this}async addListener(e,t,n){return this.on(e,t,n)}async once(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.once(e,i),n.once(e,t)}),(n=>{n.removeListener(e,i),n.removeListener(e,t)})),this}async prependListener(e,t,n){return await this.registerEventListener(e,n,(n=>{n.prependListener(e,t)}),(n=>{n.removeListener(e,t)})),this}async prependOnceListener(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.prependOnceListener(e,t),n.once(e,i)}),(n=>{n.removeListener(e,t),n.removeListener(e,i)})),this}async removeListener(e,t,n){const i=await this.deregisterEventListener(e,n);return i&&(i.removeListener(e,t),this.deleteEmitterIfNothingRegistered(i)),this}async deregisterAllListeners(e){const t={...this.identity,type:e,topic:this.topic};if(this.hasEmitter()){const e=this.getOrCreateEmitter(),n=e.listenerCount(t.type),i=[];for(let e=0;enull)));return await Promise.all(i),e}}async removeAllListeners(e){const t=async e=>{const t=await this.deregisterAllListeners(e);t&&(t.removeAllListeners(e),this.deleteEmitterIfNothingRegistered(t))};if(e)await t(e);else if(this.hasEmitter()){const e=this.getOrCreateEmitter().eventNames();await(0,y.promiseMap)(e,t)}return this}deleteEmitterIfNothingRegistered(e){0===e.eventNames().length&&this.wire.eventAggregator.delete(w(this,u,"f"))}},u=new WeakMap;d.Reply=class{};var g={};Object.defineProperty(g,"__esModule",{value:!0});var m=g.RuntimeError=g.NotSupportedError=g.NotImplementedError=g.NoAckError=g.DuplicateCorrelationError=g.UnexpectedActionError=g.DisconnectedError=void 0;class v extends Error{constructor(e){super(`Expected websocket state OPEN but found ${e}`),this.readyState=e}}g.DisconnectedError=v;class C extends Error{}g.UnexpectedActionError=C;class b extends Error{}g.DuplicateCorrelationError=b;class I extends Error{}g.NoAckError=I;class E extends Error{}g.NotImplementedError=E;class x extends Error{}g.NotSupportedError=x;class A extends Error{constructor(e){const{message:t,name:n,stack:i,...r}=e;super(t),this.name=n||"Error",this.stack=i??this.toString(),Object.keys(r).forEach((e=>{this[e]=r[e]}))}}class P extends Error{static getCallSite(e=0){const t=Error.stackTraceLimit,n=e+1;Error.stackTraceLimit=t+n;const i=Error.prepareStackTrace;Error.prepareStackTrace=(e,t)=>t;const r=(new Error).stack?.slice(n)??[];return Error.prepareStackTrace=i,Error.stackTraceLimit=t,r}static prepareStackTrace(e,t){if("function"==typeof Error.prepareStackTrace)return Error.prepareStackTrace(e,t);let n="";n+=e.name||"Error",n+=`: ${e.message||""}`;for(const e of t)n+=`\n at ${e.toString()}`;return n}constructor(e,t){const{reason:n,error:i}=e;super(n),this.name="RuntimeError",i?.stack&&(this.cause=new A(i)),t&&(this.stack=P.prepareStackTrace(this,t))}}m=g.RuntimeError=P;var M={},_={},O={};Object.defineProperty(O,"__esModule",{value:!0}),O.validateIdentity=void 0,O.validateIdentity=function(e){let t;return"object"==typeof e&&"string"==typeof e.uuid||(t="Not a valid identity object"),t};var S={},R={},F={},j={},k={},L={},T={};Object.defineProperty(T,"__esModule",{value:!0}),T.handleDeprecatedWarnings=void 0;var $;T.handleDeprecatedWarnings=e=>{(e.contentNavigation?.whitelist||e.contentNavigation?.blacklist||e.contentRedirect?.whitelist||e.contentRedirect?.blacklist)&&console.warn("The properties 'whitelist' and 'blacklist' have been marked as deprecated and will be removed in a future version. Please use 'allowlist' and 'denylist'.")};var B={},G={};Object.defineProperty(G,"__esModule",{value:!0}),G.AsyncRetryableLazy=W=G.Lazy=void 0;var W=G.Lazy=class{constructor(e){this.producerFn=e}getValue(){return this.value||(this.value=this.producerFn()),this.value}};G.AsyncRetryableLazy=class{constructor(e){this.producerFn=e}async getValue(){return this.promise||(this.promise=this.producerFn().catch((e=>{throw delete this.promise,e}))),this.promise}};var H={};Object.defineProperty(H,"__esModule",{value:!0}),H.WebContents=void 0;const N=d;class D extends N.EmitterBase{constructor(e,t,n){super(e,n,t.uuid,t.name),this.identity=t,this.entityType=n}capturePage(e){return this.wire.sendAction("capture-page",{options:e,...this.identity}).then((({payload:e})=>e.data))}executeJavaScript(e){return this.wire.sendAction("execute-javascript-in-window",{...this.identity,code:e}).then((({payload:e})=>e.data))}getZoomLevel(){return this.wire.sendAction("get-zoom-level",this.identity).then((({payload:e})=>e.data))}setZoomLevel(e){return this.wire.sendAction("set-zoom-level",{...this.identity,level:e}).then((()=>{}))}navigate(e){return this.wire.sendAction("navigate-window",{...this.identity,url:e}).then((()=>{}))}navigateBack(){return this.wire.sendAction("navigate-window-back",{...this.identity}).then((()=>{}))}async navigateForward(){await this.wire.sendAction("navigate-window-forward",{...this.identity})}stopNavigation(){return this.wire.sendAction("stop-window-navigation",{...this.identity}).then((()=>{}))}reload(e=!1){return this.wire.sendAction("reload-window",{ignoreCache:e,...this.identity}).then((()=>{}))}print(e={}){return this.wire.sendAction("print",{...this.identity,options:e}).then((()=>{}))}findInPage(e,t){return this.wire.sendAction("find-in-page",{...this.identity,searchTerm:e,options:t}).then((({payload:e})=>e.data))}stopFindInPage(e){return this.wire.sendAction("stop-find-in-page",{...this.identity,action:e}).then((()=>{}))}getPrinters(){return this.wire.sendAction("get-printers",{...this.identity}).then((({payload:e})=>e.data))}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){await this.wire.sendAction("focus-window",{emitSynthFocused:e,...this.identity})}async showDeveloperTools(){await this.wire.sendAction("show-developer-tools",this.identity)}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction("get-process-info",this.identity);return e}async getSharedWorkers(){return this.wire.sendAction("get-shared-workers",this.identity).then((({payload:e})=>e.data))}async inspectSharedWorker(){await this.wire.sendAction("inspect-shared-worker",{...this.identity})}async inspectSharedWorkerById(e){await this.wire.sendAction("inspect-shared-worker-by-id",{...this.identity,workerId:e})}async inspectServiceWorker(){await this.wire.sendAction("inspect-service-worker",{...this.identity})}async showPopupWindow(e){if(this.wire.sendAction(`${this.entityType}-show-popup-window`,this.identity).catch((()=>{})),e?.onPopupReady){const t=async({popupName:t})=>{try{const n=this.fin.Window.wrapSync({uuid:this.fin.me.uuid,name:t});await e.onPopupReady(n)}catch(e){throw new Error(`Something went wrong during onPopupReady execution: ${e}`)}};await this.once("popup-ready",t)}const{payload:t}=await this.wire.sendAction("try-create-popup-window",{options:{...e,hasResultCallback:!!e?.onPopupResult,hasReadyCallback:!!e?.onPopupReady},...this.identity}),{data:{willOpen:n,options:i}}=t;n&&await this.fin.Window.create(i.initialOptions);if(e?.onPopupResult){const t=async t=>{await e.onPopupResult((e=>{const{name:t,uuid:n,result:i,data:r}=e,o={identity:{name:t,uuid:n},result:i};return r&&(o.data=r),o})(t))},n=async()=>{await this.removeListener("popup-result",t)};await this.on("popup-result",t),await this.once("popup-teardown",n)}const{payload:r}=await this.wire.sendAction("show-popup-window",{options:i,...this.identity});return r.data}}var U,V,z,K,q;function J(){return V||(V=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(function(){if($)return L;$=1,Object.defineProperty(L,"__esModule",{value:!0}),L.ViewModule=void 0;const e=d,t=O,n=J(),i=T;class r extends e.Base{async create(e){const{uuid:t}=this.wire.me;if(!e.name||"string"!=typeof e.name)throw new Error("Please provide a name property as a string in order to create a View.");return(0,i.handleDeprecatedWarnings)(e),this.wire.environment.childViews?await this.wire.environment.createChildContent({entityType:"view",options:{...e,uuid:t}}):await this.wire.sendAction("create-view",{...e,uuid:t}),this.wrapSync({uuid:t,name:e.name})}async wrap(e){this.wire.sendAction("view-wrap").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}wrapSync(e){this.wire.sendAction("view-wrap-sync").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}getCurrent(){if(this.wire.sendAction("view-get-current").catch((e=>{})),!this.wire.me.isView)throw new Error("You are not in a View context");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction("view-get-current-sync").catch((e=>{})),!this.wire.me.isView)throw new Error("You are not in a View context");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return L.ViewModule=r,L}(),e),n(function(){if(U)return B;var e;U=1,Object.defineProperty(B,"__esModule",{value:!0}),B.View=void 0;const t=g,n=G,i=H,r=ie();class o extends i.WebContents{constructor(i,o){super(i,o,"view"),this.identity=o,e.set(this,new n.Lazy((()=>this.fin.Platform.wrapSync(this.identity).getClient()))),this.attach=async e=>{await this.wire.sendAction("attach-view",{target:e,...this.identity})},this.destroy=async()=>{await this.wire.sendAction("destroy-view",{...this.identity})},this.show=async()=>{await this.wire.sendAction("show-view",{...this.identity})},this.showAt=async(e,t={})=>{await this.wire.sendAction("show-view-at",{bounds:e,...this.identity,options:t})},this.bringToFront=async()=>{await this.wire.sendAction("bring-view-to-front",{...this.identity})},this.hide=async()=>{await this.wire.sendAction("hide-view",{...this.identity})},this.setBounds=async e=>{await this.wire.sendAction("set-view-bounds",{bounds:e,...this.identity})},this.getBounds=async()=>(await this.wire.sendAction("get-view-bounds",{...this.identity})).payload.data,this.getInfo=async()=>(await this.wire.sendAction("get-view-info",{...this.identity})).payload.data,this.getParentLayout=async()=>(this.wire.sendAction("view-get-parent-layout",{...this.identity}).catch((()=>{})),this.fin.Platform.Layout.getLayoutByViewIdentity(this.identity)),this.getOptions=async()=>this.wire.sendAction("get-view-options",{...this.identity}).then((({payload:e})=>e.data)),this.updateOptions=async e=>this.wire.sendAction("update-view-options",{options:e,...this.identity}).then((()=>{})),this.getCurrentWindow=async()=>{const{payload:{data:e}}=await this.wire.sendAction("get-view-window",{...this.identity});return new r._Window(this.wire,e)},this.getCurrentStack=async()=>{this.wire.sendAction("view-get-current-stack").catch((()=>{}));try{return(await this.getParentLayout()).getStackByViewIdentity(this.identity)}catch(e){throw new t.RuntimeError({reason:"This view does not belong to a stack.",error:e})}},this.triggerBeforeUnload=async()=>(await this.wire.sendAction("trigger-before-unload",{...this.identity})).payload.data,this.bindToElement=async e=>{if(!e)throw new Error("Element not found.");return this.wire.environment.observeBounds(e,(async e=>this.setBounds(e)))}}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){const t=await this.getCurrentWindow();await t.focusedWebViewWasChanged(),await super.focus({emitSynthFocused:e})}}return B.View=o,e=new WeakMap,B}(),e)}(k)),k}function Y(){if(z)return j;z=1,Object.defineProperty(j,"__esModule",{value:!0}),j.Application=void 0;const e=d,t=ie(),n=J();class i extends e.EmitterBase{constructor(e,n){super(e,"application",n.uuid),this.identity=n,this.window=new t._Window(this.wire,{uuid:this.identity.uuid,name:this.identity.uuid})}windowListFromIdentityList(e){const n=[];return e.forEach((e=>{n.push(new t._Window(this.wire,{uuid:e.uuid,name:e.name}))})),n}isRunning(){return this.wire.sendAction("is-application-running",this.identity).then((({payload:e})=>e.data))}async quit(e=!1){try{await this._close(e),await this.wire.sendAction("destroy-application",{force:e,...this.identity})}catch(e){if(!["Remote connection has closed","Could not locate the requested application"].some((t=>e.message.includes(t))))throw e}}async _close(e=!1){try{await this.wire.sendAction("close-application",{force:e,...this.identity})}catch(e){if(!e.message.includes("Remote connection has closed"))throw e}}close(e=!1){return console.warn("Deprecation Warning: Application.close is deprecated Please use Application.quit"),this.wire.sendAction("application-close",this.identity).catch((e=>{})),this._close(e)}getChildWindows(){return this.wire.sendAction("get-child-windows",this.identity).then((({payload:e})=>{const t=[];return e.data.forEach((e=>{t.push({uuid:this.identity.uuid,name:e})})),this.windowListFromIdentityList(t)}))}getManifest(){return this.wire.sendAction("get-application-manifest",this.identity).then((({payload:e})=>e.data))}getParentUuid(){return this.wire.sendAction("get-parent-application",this.identity).then((({payload:e})=>e.data))}getShortcuts(){return this.wire.sendAction("get-shortcuts",this.identity).then((({payload:e})=>e.data))}async getViews(){const{payload:e}=await this.wire.sendAction("application-get-views",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}getZoomLevel(){return this.wire.sendAction("get-application-zoom-level",this.identity).then((({payload:e})=>e.data))}getWindow(){return this.wire.sendAction("application-get-window",this.identity).catch((e=>{})),Promise.resolve(this.window)}registerUser(e,t){return this.wire.sendAction("register-user",{userName:e,appName:t,...this.identity}).then((()=>{}))}removeTrayIcon(){return this.wire.sendAction("remove-tray-icon",this.identity).then((()=>{}))}restart(){return this.wire.sendAction("restart-application",this.identity).then((()=>{}))}run(){return console.warn("Deprecation Warning: Application.run is deprecated Please use fin.Application.start"),this.wire.sendAction("application-run",this.identity).catch((e=>{})),this._run()}_run(e={}){return this.wire.sendAction("run-application",{manifestUrl:this._manifestUrl,opts:e,...this.identity}).then((()=>{}))}scheduleRestart(){return this.wire.sendAction("relaunch-on-close",this.identity).then((()=>{}))}async sendApplicationLog(){const{payload:e}=await this.wire.sendAction("send-application-log",this.identity);return e.data}async setJumpList(e){await this.wire.sendAction("set-jump-list",{config:e,...this.identity})}setTrayIcon(e){return this.wire.sendAction("set-tray-icon",{enabledIcon:e,...this.identity}).then((()=>{}))}setShortcuts(e){return this.wire.sendAction("set-shortcuts",{data:e,...this.identity}).then((()=>{}))}async setShortcutQueryParams(e){await this.wire.sendAction("set-shortcut-query-args",{data:e,...this.identity})}setZoomLevel(e){return this.wire.sendAction("set-application-zoom-level",{level:e,...this.identity}).then((()=>{}))}async setAppLogUsername(e){await this.wire.sendAction("set-app-log-username",{data:e,...this.identity})}getTrayIconInfo(){return this.wire.sendAction("get-tray-icon-info",this.identity).then((({payload:e})=>e.data))}hasTrayIcon(){return this.wire.sendAction("has-tray-icon",this.identity).then((({payload:e})=>e.data))}terminate(){return this.wire.sendAction("terminate-application",this.identity).then((()=>{}))}wait(){return this.wire.sendAction("wait-for-hung-application",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction("get-info",this.identity).then((({payload:e})=>e.data))}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction("application-get-process-info",this.identity);return e}async setFileDownloadLocation(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t};await this.wire.sendAction("set-file-download-location",{...n,downloadLocation:e})}async getFileDownloadLocation(){const{payload:{data:e}}=await this.wire.sendAction("get-file-download-location",this.identity);return e}async showTrayIconPopupMenu(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t},{payload:i}=await this.wire.sendAction("show-tray-icon-popup-menu",{...n,options:e});return i.data}async closeTrayIconPopupMenu(){const{name:e}=this.wire.me,t={uuid:this.identity.uuid,name:e};await this.wire.sendAction("close-tray-icon-popup-menu",{...t})}}return j.Application=i,j}function Z(){return q||(q=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(function(){if(K)return F;K=1,Object.defineProperty(F,"__esModule",{value:!0}),F.ApplicationModule=void 0;const e=d,t=O,n=Y();class i extends e.Base{async wrap(e){this.wire.sendAction("wrap-application").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}wrapSync(e){this.wire.sendAction("wrap-application-sync").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}async _create(e){return void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&void 0===e.isPlatformController&&(e.autoShow=!0),await this.wire.sendAction("create-application",e),this.wrap({uuid:e.uuid})}create(e){return console.warn("Deprecation Warning: fin.Application.create is deprecated. Please use fin.Application.start"),this.wire.sendAction("application-create").catch((e=>{})),this._create(e)}async start(e){this.wire.sendAction("start-application").catch((e=>{}));const t=await this._create(e);return await this.wire.sendAction("run-application",{uuid:e.uuid}),t}async startManyManifests(e,t){return this.wire.sendAction("run-applications",{applications:e,opts:t}).then((()=>{}))}getCurrent(){return this.wire.sendAction("get-current-application").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction("get-current-application-sync").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}async startFromManifest(e,t){this.wire.sendAction("application-start-from-manifest").catch((e=>{}));const n=await this._createFromManifest(e);return await n._run(t),n}createFromManifest(e){return console.warn("Deprecation Warning: fin.Application.createFromManifest is deprecated. Please use fin.Application.startFromManifest"),this.wire.sendAction("application-create-from-manifest").catch((e=>{})),this._createFromManifest(e)}_createFromManifest(e){return this.wire.sendAction("get-application-manifest",{manifestUrl:e}).then((({payload:e})=>{const t=e.data.platform?e.data.platform.uuid:e.data.startup_app.uuid;return this.wrap({uuid:t})})).then((t=>(t._manifestUrl=e,t)))}}return F.ApplicationModule=i,F}(),e),n(Y(),e)}(R)),R}H.WebContents=D;var Q={};Object.defineProperty(Q,"__esModule",{value:!0}),Q.promisifySubscription=void 0;var X,ee,te;function ne(){if(X)return S;X=1,Object.defineProperty(S,"__esModule",{value:!0}),S._Window=void 0;const e=Z(),t=H,n=J(),i=T,r=Q;class o extends t.WebContents{constructor(e,t){super(e,t,"window")}async createWindow(e){this.wire.sendAction("window-create-window",this.identity).catch((e=>{}));const t=await(0,r.promisifySubscription)(this,"fire-constructor-callback");void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&(e.autoShow=!0),(0,i.handleDeprecatedWarnings)(e);const n=this.wire.environment.createChildContent({entityType:"window",options:e}),[o]=await Promise.all([t.getValue(),n]);let s;const{success:a}=o,c=o.data,{message:d}=c;s=a?{httpResponseCode:c.httpResponseCode,apiInjected:c.apiInjected}:{message:c.message,networkErrorCode:c.networkErrorCode,stack:c.stack};const h={message:d,cbPayload:s,success:a};try{this.getWebWindow().fin.__internal_.openerSuccessCBCalled()}catch(e){}return h.success?this:Promise.reject(h)}getAllFrames(){return this.wire.sendAction("get-all-frames",this.identity).then((({payload:e})=>e.data))}getBounds(){return this.wire.sendAction("get-window-bounds",this.identity).then((({payload:e})=>e.data))}center(){return this.wire.sendAction("center-window",this.identity).then((()=>{}))}blur(){return this.wire.sendAction("blur-window",this.identity).then((()=>{}))}bringToFront(){return this.wire.sendAction("bring-window-to-front",this.identity).then((()=>{}))}animate(e,t){return this.wire.sendAction("animate-window",{transitions:e,options:t,...this.identity}).then((()=>{}))}hide(){return this.wire.sendAction("hide-window",this.identity).then((()=>{}))}close(e=!1){return this.wire.sendAction("close-window",{force:e,...this.identity}).then((()=>{Object.setPrototypeOf(this,null)}))}focusedWebViewWasChanged(){return this.wire.sendAction("focused-webview-changed",this.identity).then((()=>{}))}getNativeId(){return this.wire.sendAction("get-window-native-id",this.identity).then((({payload:e})=>e.data))}async getCurrentViews(){const{payload:e}=await this.wire.sendAction("window-get-views",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}disableFrame(){return console.warn("Function is deprecated; use disableUserMovement instead."),this.wire.sendAction("disable-window-frame",this.identity).then((()=>{}))}disableUserMovement(){return this.wire.sendAction("disable-window-frame",this.identity).then((()=>{}))}enableFrame(){return console.warn("Function is deprecated; use enableUserMovement instead."),this.wire.sendAction("enable-window-frame",this.identity).then((()=>{}))}enableUserMovement(){return this.wire.sendAction("enable-window-frame",this.identity).then((()=>{}))}flash(){return this.wire.sendAction("flash-window",this.identity).then((()=>{}))}stopFlashing(){return this.wire.sendAction("stop-flash-window",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction("get-window-info",this.identity).then((({payload:e})=>e.data))}async getLayout(e){this.wire.sendAction("window-get-layout",this.identity).catch((e=>{}));const t=await this.getOptions();if(!t.layout&&!t.layoutSnapshot)throw new Error("Window does not have a Layout");return this.fin.Platform.Layout.wrap(e??this.identity)}getOptions(){return this.wire.sendAction("get-window-options",this.identity).then((({payload:e})=>e.data))}getParentApplication(){return this.wire.sendAction("window-get-parent-application",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity))}getParentWindow(){return this.wire.sendAction("window-get-parent-window",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity)).then((e=>e.getWindow()))}async getSnapshot(e){const t={area:e,...this.identity};console.warn("Window.getSnapshot has been deprecated, please use Window.capturePage");return(await this.wire.sendAction("get-window-snapshot",t)).payload.data}getState(){return this.wire.sendAction("get-window-state",this.identity).then((({payload:e})=>e.data))}getWebWindow(){return this.wire.sendAction("window-get-web-window",this.identity).catch((e=>{})),this.wire.environment.getWebWindow(this.identity)}isMainWindow(){return this.wire.sendAction("window-is-main-window",this.identity).catch((e=>{})),this.me.uuid===this.me.name}isShowing(){return this.wire.sendAction("is-window-showing",this.identity).then((({payload:e})=>e.data))}maximize(){return this.wire.sendAction("maximize-window",this.identity).then((()=>{}))}minimize(){return this.wire.sendAction("minimize-window",this.identity).then((()=>{}))}moveBy(e,t,n){return this.wire.sendAction("move-window-by",{deltaLeft:e,deltaTop:t,positioningOptions:n,...this.identity}).then((()=>{}))}moveTo(e,t,n){return this.wire.sendAction("move-window",{left:e,top:t,positioningOptions:n,...this.identity}).then((()=>{}))}resizeBy(e,t,n,i){return this.wire.sendAction("resize-window-by",{deltaWidth:Math.floor(e),deltaHeight:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}resizeTo(e,t,n,i){return this.wire.sendAction("resize-window",{width:Math.floor(e),height:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}restore(){return this.wire.sendAction("restore-window",this.identity).then((()=>{}))}setAsForeground(){return this.wire.sendAction("set-foreground-window",this.identity).then((()=>{}))}setBounds(e,t){return this.wire.sendAction("set-window-bounds",{...e,...this.identity,positioningOptions:t}).then((()=>{}))}show(e=!1){return this.wire.sendAction("show-window",{force:e,...this.identity}).then((()=>{}))}showAt(e,t,n=!1){return this.wire.sendAction("show-at-window",{force:n,left:Math.floor(e),top:Math.floor(t),...this.identity}).then((()=>{}))}updateOptions(e){return this.wire.sendAction("update-window-options",{options:e,...this.identity}).then((()=>{}))}authenticate(e,t){return this.wire.sendAction("window-authenticate",{userName:e,password:t,...this.identity}).then((()=>{}))}async showPopupMenu(e){const{payload:t}=await this.wire.sendAction("show-popup-menu",{options:e,...this.identity});return t.data}async closePopupMenu(){return this.wire.sendAction("close-popup-menu",{...this.identity}).then((()=>{}))}async dispatchPopupResult(e){this.wire.sendAction("window-dispatch-popup-result",this.identity).catch((e=>{})),await this.wire.sendAction("dispatch-popup-result",{data:e,...this.identity})}async print(e={content:"self"}){switch(e.content){case void 0:case"self":return super.print(e);case"screenshot":return this.wire.sendAction("print-screenshot",this.identity).then((()=>{}));case"views":return this.wire.sendAction("print-views",{...this.identity,options:e}).then((()=>{}));default:return}}}return S._Window=o,S}function ie(){return te||(te=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(function(){if(ee)return _;ee=1,Object.defineProperty(_,"__esModule",{value:!0}),_._WindowModule=void 0;const e=d,t=O,n=ne();class i extends e.Base{async wrap(e){this.wire.sendAction("window-wrap").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}wrapSync(e){this.wire.sendAction("window-wrap-sync").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}create(e){return this.wire.sendAction("create-window").catch((e=>{})),new n._Window(this.wire,{uuid:this.me.uuid,name:e.name}).createWindow(e)}getCurrent(){if(this.wire.sendAction("get-current-window").catch((e=>{})),!this.wire.me.isWindow)throw new Error("You are not in a Window context");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction("get-current-window-sync").catch((e=>{})),!this.wire.me.isWindow)throw new Error("You are not in a Window context");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return _._WindowModule=i,_}(),e),n(ne(),e)}(M)),M}Q.promisifySubscription=async(e,t,n=(()=>!0),i)=>{let r,o,s;const a=new Promise(((e,t)=>{r=e,o=t})),c=e=>{n(e)&&(clearTimeout(s),r(e))};return await e.on(t,c),i&&(s=setTimeout((()=>o(new Error("event timed out"))),i)),a.finally((()=>{e.removeListener(t,c).catch((()=>null))})),{getValue:()=>a}},Object.defineProperty(c,"__esModule",{value:!0}),c.System=void 0;const re=d,oe=g,se=ie(),ae=t;class ce extends re.EmitterBase{constructor(e){super(e,"system")}sendExternalProcessRequest(e,t){return new Promise(((n,i)=>{const r="external-process-exited";let o,s,a,c;"function"==typeof t.listener&&(a=e=>{const n=e||{};s={topic:"exited",uuid:n.processUuid||"",exitCode:n.exitCode||0},o===e.processUuid&&(t.listener(s),c.removeListener(r,a))},this.wire.me.name||(this.wire.me.name=this.wire.me.uuid),c=new se._Window(this.wire,this.wire.me),c.on(r,a)),this.wire.sendAction(e,t).then((({payload:e})=>{o=e.data.uuid,n(e.data),s&&o===s.uuid&&(t.listener(s),c.removeListener(r,a))})).catch((e=>{c&&c.removeListener(r,a),i(e)}))}))}getVersion(){return this.wire.sendAction("get-version").then((({payload:e})=>e.data))}clearCache(e){return this.wire.sendAction("clear-cache",e).then((()=>{}))}deleteCacheOnExit(){return this.wire.sendAction("delete-cache-request").then((()=>{}))}exit(){return this.wire.sendAction("exit-desktop").then((()=>{}))}async fetchManifest(e){const{payload:{data:t}}=await this.wire.sendAction("fetch-manifest",{manifestUrl:e});return t}flushCookieStore(){return this.wire.sendAction("flush-cookie-store").then((()=>{}))}getAllWindows(){return this.wire.sendAction("get-all-windows").then((({payload:e})=>e.data))}getAllApplications(){return this.wire.sendAction("get-all-applications").then((({payload:e})=>e.data))}getCommandLineArguments(){return this.wire.sendAction("get-command-line-arguments").then((({payload:e})=>e.data))}async getCrashReporterState(){const{payload:{data:{diagnosticMode:e,isRunning:t}}}=await this.wire.sendAction("get-crash-reporter-state");return console.warn("diagnosticMode property is deprecated. It will be removed in a future version"),{diagnosticMode:e,diagnosticsMode:e,isRunning:t}}async startCrashReporter(e){const t=e,n={...t,diagnosticMode:t.diagnosticsMode||t.diagnosticMode},{payload:{data:{diagnosticMode:i,isRunning:r}}}=await this.wire.sendAction("start-crash-reporter",n);return{diagnosticMode:i,diagnosticsMode:i,isRunning:r}}getUniqueUserId(){return this.wire.sendAction("get-unique-user-id").then((({payload:e})=>e.data))}getEntityInfo(e,t){return this.wire.sendAction("get-entity-info",{uuid:e,name:t}).then((({payload:e})=>e.data))}getEnvironmentVariable(e){return this.wire.sendAction("get-environment-variable",{environmentVariables:e}).then((({payload:e})=>e.data))}getFocusedWindow(){return this.wire.sendAction("get-focused-window").then((({payload:e})=>e.data))}async isAppCertified(e){const{payload:{data:{certifiedInfo:t}}}=await this.wire.sendAction("is-app-certified",{manifestUrl:e});return t}getInstalledRuntimes(){return this.wire.sendAction("get-installed-runtimes").then((({payload:e})=>e.data.runtimes))}async getInstalledApps(){const{payload:{data:{installedApps:e}}}=await this.wire.sendAction("get-installed-apps");return e}getLog(e){return this.wire.sendAction("view-log",e).then((({payload:e})=>e.data))}getMachineId(){return this.wire.sendAction("get-machine-id").then((({payload:e})=>e.data))}getMinLogLevel(){return this.wire.sendAction("get-min-log-level").then((({payload:e})=>e.data))}getLogList(){return this.wire.sendAction("list-logs").then((({payload:e})=>e.data))}getMonitorInfo(){return this.wire.sendAction("get-monitor-info").then((({payload:e})=>e.data))}getMousePosition(){return this.wire.sendAction("get-mouse-position").then((({payload:e})=>e.data))}getProcessList(){return console.warn("System.getProcessList has been deprecated. Please consider using our new process APIs: Window.getProcessInfo, View.getProcessInfo, Application.getProcessInfo, System.getAllProcessInfo"),this.wire.sendAction("process-snapshot").then((({payload:e})=>e.data))}async getAllProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction("get-all-process-info",this.identity);return e}getProxySettings(){return this.wire.sendAction("get-proxy-settings").then((({payload:e})=>e.data))}getRuntimeInfo(){return this.wire.sendAction("get-runtime-info").then((({payload:e})=>e.data))}getRvmInfo(){return this.wire.sendAction("get-rvm-info").then((({payload:e})=>e.data))}getHostSpecs(){return this.wire.sendAction("get-host-specs").then((({payload:e})=>e.data))}getOSInfo(){return this.wire.sendAction("get-os-info").then((({payload:e})=>e.data))}launchExternalProcess(e){return this.sendExternalProcessRequest("launch-external-process",e)}monitorExternalProcess(e){return this.sendExternalProcessRequest("monitor-external-process",e)}log(e,t){return this.wire.sendAction("write-to-log",{level:e,message:t}).then((()=>{}))}openUrlWithBrowser(e){return this.wire.sendAction("open-url-with-browser",{url:e}).then((()=>{}))}async registerCustomProtocol(e){if("object"!=typeof e)throw new Error("Must provide an object with a `protocolName` property having a string value.");await this.wire.sendAction("register-custom-protocol",e)}async unregisterCustomProtocol(e){await this.wire.sendAction("unregister-custom-protocol",{protocolName:e})}async getCustomProtocolState(e){return this.wire.sendAction("get-custom-protocol-state",{protocolName:e}).then((({payload:e})=>e.data))}releaseExternalProcess(e){return this.wire.sendAction("release-external-process",{uuid:e}).then((()=>{}))}showDeveloperTools(e){return this.wire.sendAction("show-developer-tools",e).then((()=>{}))}terminateExternalProcess(e){return this.wire.sendAction("terminate-external-process",e).then((()=>{}))}updateProxySettings(e){return this.wire.sendAction("update-proxy",e).then((()=>{}))}async downloadAsset(e,t){const n=()=>{};let i=n,r=n;const o=new Promise(((e,t)=>{i=e,r=t}));if("openfin"!==this.wire.environment.type)throw new oe.NotSupportedError("downloadAsset only supported in an OpenFin Render process");const s=oe.RuntimeError.getCallSite(),a=this.wire.environment.getNextMessageId().toString(),c=`asset-download-progress-${a}`,d=`asset-download-error-${a}`,h=`asset-download-complete-${a}`,l=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},u=()=>{this.removeListener(c,l)};await Promise.all([this.on(c,l),this.once(d,(e=>{u();const{reason:t,err:n}=e;r(new oe.RuntimeError({reason:t,error:n},s))})),this.once(h,(()=>{u(),i()}))]);const p=Object.assign(e,{downloadId:a});return await this.wire.sendAction("download-asset",p).catch((e=>{throw u(),e})),o}downloadRuntime(e,t){const n=oe.RuntimeError.getCallSite();return new Promise(((i,r)=>{if("openfin"!==this.wire.environment.type)return void r(new oe.NotSupportedError("downloadRuntime only supported in an OpenFin Render process"));const o=this.wire.environment.getNextMessageId().toString(),s=`runtime-download-progress-${o}`,a=`runtime-download-error-${o}`,c=`runtime-download-complete-${o}`,d=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},h=()=>{this.removeListener(s,d)};this.on(s,d),this.once(a,(e=>{h();const{reason:t,err:i}=e;r(new oe.RuntimeError({reason:t,error:i},n))})),this.once(c,(()=>{h(),i()}));const l=Object.assign(e,{downloadId:o});this.wire.sendAction("download-runtime",l).catch((e=>{h(),r(e)}))}))}downloadPreloadScripts(e){return this.wire.sendAction("download-preload-scripts",{scripts:e}).then((({payload:e})=>e.data))}getAllExternalApplications(){return this.wire.sendAction("get-all-external-applications").then((({payload:e})=>e.data))}getAppAssetInfo(e){return this.wire.sendAction("get-app-asset-info",e).then((({payload:e})=>e.data))}getCookies(e){const t=this.wire.environment.getUrl(),n=Object.assign(e,{url:t});return this.wire.sendAction("get-cookies",n).then((({payload:e})=>e.data))}setMinLogLevel(e){return this.wire.sendAction("set-min-log-level",{level:e}).then((()=>{}))}resolveUuid(e){return this.wire.sendAction("resolve-uuid",{entityKey:e}).then((({payload:e})=>e.data))}executeOnRemote(e,t){return t.requestingIdentity=e,this.wire.ferryAction(t)}readRegistryValue(e,t,n){return this.wire.sendAction("read-registry-value",{rootKey:e,subkey:t,value:n}).then((({payload:e})=>e.data))}registerExternalConnection(e){return this.wire.sendAction("register-external-connection",{uuid:e}).then((({payload:e})=>e.data))}async getServiceConfiguration(e){if("string"!=typeof e.name)throw new Error("Must provide an object with a `name` property having a string value");const{name:t}=e;return this.wire.sendAction("get-service-configuration",{name:t}).then((({payload:e})=>e.data))}async getSystemAppConfig(e){if("string"!=typeof e)throw new Error("Must provide a string value for name of system app");return this.wire.sendAction("get-system-app-configuration",{name:e}).then((({payload:e})=>e.data))}async registerShutdownHandler(e){this.wire.sendAction("system-register-shutdown-handler").catch((e=>{}));const{uuid:t,name:n}=this.wire.me;this.on("system-shutdown",(i=>{e({proceed:()=>{this.wire.environment.raiseEvent("application/system-shutdown-handled",{uuid:t,name:n,topic:"application"})}})}))}runRvmHealthCheck(){return this.wire.sendAction("run-rvm-health-check").then((({payload:e})=>e.data))}async launchManifest(e,t={}){const{subscribe:n,...i}=t,r=i;if(n){const e=new ae.EventEmitter;n(e);const t="app-version-progress",i="runtime-status",o="app-version-complete",s="app-version-error",a=this.wire.environment.getNextMessageId().toString();r.appVersionId=a;const c=[o,t,i,s],d=e=>{const{appVersionId:t,topic:n,type:i,...r}=e;return{...r,type:c.find((e=>i.includes(e)))}},h=t=>{const n=d(t);e.emit(n.type,n)},l=()=>{this.removeListener(`${t}.${a}`,h),this.removeListener(`${i}.${a}`,h),this.removeListener(`${o}.${a}`,h),this.removeListener(`${s}.${a}`,h),this.removeListener(`${o}.${a}`,l),this.removeListener(`${s}.${a}`,l)};await Promise.all([this.on(`${t}.${a}`,h),this.on(`${i}.${a}`,h),this.once(`${o}.${a}`,h),this.once(`${s}.${a}`,h),this.once(`${o}.${a}`,l),this.once(`${s}.${a}`,l)])}return(await this.wire.sendAction("launch-manifest",{manifestUrl:e,opts:r})).payload.data.manifest}async queryPermissionForCurrentContext(e){const t={uuid:this.wire.me.uuid,name:this.wire.me.name};return(await this.wire.sendAction("query-permission-for-current-context",{apiName:e,identity:t})).payload.data}async enableNativeWindowIntegrationProvider(e){const{payload:t}=await this.wire.sendAction("enable-native-window-integration-provider",{permissions:e});return t.data}async registerUsage({data:e,type:t}){await this.wire.sendAction("register-usage",{data:e,type:t})}async getPrinters(){const{payload:e}=await this.wire.sendAction("system-get-printers");return e.data}async updateProcessLoggingOptions(e){await this.wire.sendAction("system-update-process-logging-options",{options:e})}async getDomainSettings(){const{payload:{data:e}}=await this.wire.sendAction("get-domain-settings",this.identity);return e}async setDomainSettings(e){await this.wire.sendAction("set-domain-settings",{domainSettings:e,...this.identity})}async refreshExtensions(){const{payload:e}=await this.wire.sendAction("refresh-extensions");return e.data}async getInstalledExtensions(){const{payload:e}=await this.wire.sendAction("get-installed-extensions");return e.data}}c.System=ce;var de={},he={};Object.defineProperty(he,"__esModule",{value:!0}),he.RefCounter=void 0;he.RefCounter=class{constructor(){this.topicRefMap=new Map}incRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t+1;n=i,this.topicRefMap.set(e,i)}else this.topicRefMap.set(e,1),n=1;return n}decRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t-1;this.topicRefMap.set(e,i),n=i}else n=-1;return n}actOnFirst(e,t,n){return 1===this.incRefCount(e)?t():n()}actOnLast(e,t,n){return 0===this.decRefCount(e)?t():n()}};var le={},ue={},pe={};Object.defineProperty(pe,"__esModule",{value:!0}),pe.ChannelBase=pe.ProtectedItems=void 0;const we=e=>async(t,n,i)=>{const r=await e(t,n,i);return void 0===r?n:r};pe.ProtectedItems=class{constructor(e,t){this.providerIdentity=e,this.close=t}};class ye{static defaultAction(e){throw new Error(`No action registered at target for ${e}`)}constructor(){this.subscriptions=new Map}async processAction(e,t,n){try{const i=this.subscriptions.has(e)?this.subscriptions.get(e):(t,n)=>(this.defaultAction??ye.defaultAction)(e,t,n),r=this.preAction?await this.preAction(e,t,n):t,o=await i(r,n);return this.postAction?await this.postAction(e,o,n):o}catch(t){if(this.errorMiddleware)return this.errorMiddleware(e,t,n);throw t}}beforeAction(e){if(this.preAction)throw new Error("Already registered beforeAction middleware");this.preAction=we(e)}onError(e){if(this.errorMiddleware)throw new Error("Already registered error middleware");this.errorMiddleware=e}afterAction(e){if(this.postAction)throw new Error("Already registered afterAction middleware");this.postAction=we(e)}remove(e){this.subscriptions.delete(e)}setDefaultAction(e){if(this.defaultAction)throw new Error("default action can only be set once");this.defaultAction=e}register(e,t){if(this.subscriptions.has(e))throw new Error(`Subscription already registered for action: ${e}. Unsubscribe before adding new subscription`);return this.subscriptions.set(e,t),!0}}pe.ChannelBase=ye;var fe,ge,me,ve=s&&s.__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)},Ce=s&&s.__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};Object.defineProperty(ue,"__esModule",{value:!0}),ue.ChannelClient=void 0;const be=pe,Ie=new Map;class Ee extends be.ChannelBase{static closeChannelByEndpointId(e){const t=Ie.get(e);t&&ve(t,me,"f").call(t)}static handleProviderDisconnect(e){for(const t of Ie.values())t.providerIdentity.channelId===e.channelId&&(t.disconnectListener(e),ve(t,me,"f").call(t))}constructor(e,t,n){super(),fe.set(this,void 0),ge.set(this,void 0),this.processAction=(e,t,n)=>super.processAction(e,t,n),me.set(this,(()=>{Ie.delete(this.endpointId),ve(this,ge,"f").close()})),Ce(this,fe,new be.ProtectedItems(e,t),"f"),this.disconnectListener=()=>{},this.endpointId=e.endpointId,Ce(this,ge,n,"f"),Ie.set(this.endpointId,this),n.receive(this.processAction)}get providerIdentity(){return ve(this,fe,"f").providerIdentity}async dispatch(e,t){if(ve(this,ge,"f").isEndpointConnected(this.providerIdentity.channelId))return ve(this,ge,"f").send(this.providerIdentity.channelId,e,t);throw new Error("The client you are trying to dispatch from is disconnected from the target provider.")}onDisconnection(e){this.disconnectListener=t=>{try{e(t)}catch(e){throw new Error(`Error while calling the onDisconnection callback: ${e.message}`)}finally{this.disconnectListener=()=>{}}}}async disconnect(){await this.sendDisconnectAction(),ve(this,me,"f").call(this)}async sendDisconnectAction(){const e=ve(this,fe,"f");await e.close()}static async wireClose(e,t,n){const{channelName:i,uuid:r,name:o}=t;await e.sendAction("disconnect-from-channel",{channelName:i,uuid:r,name:o,endpointId:n})}}ue.ChannelClient=Ee,fe=new WeakMap,ge=new WeakMap,me=new WeakMap;var xe={},Ae={};Object.defineProperty(Ae,"__esModule",{value:!0}),Ae.exhaustiveCheck=void 0,Ae.exhaustiveCheck=function(e,t){throw new Error(`Unsupported value: ${e}${t?`\n Supported values are: ${t.join("")}`:""}`)};var Pe,Me,_e,Oe={},Se=s&&s.__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},Re=s&&s.__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)};Object.defineProperty(Oe,"__esModule",{value:!0}),Oe.ClassicInfo=Oe.ClassicStrategy=void 0;Oe.ClassicStrategy=class{constructor(e,t,n,i){this.messageReceiver=t,this.endpointId=n,this.providerIdentity=i,Pe.set(this,void 0),Me.set(this,new Map),_e.set(this,new Map),this.send=async(e,t,n)=>{const i=Re(this,Me,"f").get(e);if(!i)throw new Error(`Could not locate routing info for endpoint ${e}`);const r={...i};r.isLocalEndpointId&&delete r.endpointId,delete r.isLocalEndpointId;const o=Re(this,Pe,"f").sendAction("send-channel-message",{...r,providerIdentity:this.providerIdentity,action:t,payload:n});Re(this,_e,"f").get(e)?.add(o);return(await o.catch((e=>{throw new Error(e.message)})).finally((()=>{Re(this,_e,"f").get(e)?.delete(o)}))).payload.data.result},this.close=async()=>{this.messageReceiver.removeEndpoint(this.providerIdentity.channelId,this.endpointId),[...Re(this,Me,"f").keys()].forEach((e=>this.closeEndpoint(e))),Se(this,Me,new Map,"f")},Se(this,Pe,e,"f")}onEndpointDisconnect(e,t){}receive(e){this.messageReceiver.addEndpoint(e,this.providerIdentity.channelId,this.endpointId)}async closeEndpoint(e){const t=Re(this,Me,"f").get(e);Re(this,Me,"f").delete(e);const n=Re(this,_e,"f").get(e);n?.forEach((n=>{const i=`Channel connection with identity uuid: ${t?.uuid} / name: ${t?.name} / endpointId: ${e} no longer connected.`;n.cancel(new Error(i))}))}isEndpointConnected(e){return Re(this,Me,"f").has(e)}addEndpoint(e,t){Re(this,Me,"f").set(e,t.endpointIdentity),Re(this,_e,"f").set(e,new Set)}isValidEndpointPayload(e){return"string"==typeof e?.endpointIdentity?.endpointId||"string"==typeof e?.endpointIdentity?.channelId}},Pe=new WeakMap,Me=new WeakMap,_e=new WeakMap,Oe.ClassicInfo={version:5,minimumVersion:0,type:"classic"};var Fe={},je={},ke={};Object.defineProperty(ke,"__esModule",{value:!0}),ke.errorToPOJO=void 0,ke.errorToPOJO=function(e){return{stack:e.stack,name:e.name,message:e.message,toString:()=>e.stack||e.toString()}};var Le,Te,$e=s&&s.__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)},Be=s&&s.__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};Object.defineProperty(je,"__esModule",{value:!0}),je.RTCEndpoint=void 0;const Ge=ke;je.RTCEndpoint=class{static isValidEndpointPayload(e){const t=e=>"object"==typeof e&&null!==e;return t(e)&&t(e.endpointIdentity)&&t(e.rtc)&&"string"==typeof e.endpointIdentity.endpointId}constructor({rtc:e,endpointIdentity:t}){this.responseMap=new Map,Le.set(this,null),Te.set(this,void 0),this.connectionStateChangeHandler=e=>{"connected"!==this.rtc.rtcClient.connectionState&&(this.rtc.rtcClient.removeEventListener("connectionstatechange",this.connectionStateChangeHandler),this.close(),$e(this,Te,"f")&&$e(this,Te,"f").call(this))},this.send=async(e,t)=>{const n=`message-${Math.random()}`,i=new Promise(((e,t)=>{this.responseMap.set(n,{resolve:e,reject:t})}));return this.rtc.channels.request.send(JSON.stringify({action:e,payload:t,messageId:n})),i},this.close=()=>{this.responseMap.forEach((e=>e.reject("Connection has closed."))),this.responseMap=new Map,this.rtc.channels.request.close(),this.rtc.channels.response.close(),this.rtc.rtcClient.close()},this.rtc=e,this.endpointIdentity=t,this.rtc.channels.response.addEventListener("message",(e=>{let{data:t}=e;e.data instanceof ArrayBuffer&&(t=(new TextDecoder).decode(e.data));const{messageId:n,payload:i,success:r,error:o}=JSON.parse(t),{resolve:s,reject:a}=this.responseMap.get(n)??{};s&&a?(this.responseMap.delete(n),r?s(i):a(o)):(console.log("Could not find id in responseMap."),console.log(e))})),this.rtc.channels.request.addEventListener("message",(async e=>{let{data:n}=e;e.data instanceof ArrayBuffer&&(n=(new TextDecoder).decode(e.data));const{messageId:i,action:r,payload:o}=JSON.parse(n);if($e(this,Le,"f"))try{const e=await $e(this,Le,"f").call(this,r,o,t);this.rtc.channels.response.send(JSON.stringify({messageId:i,payload:e,success:!0}))}catch(e){"open"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,error:(0,Ge.errorToPOJO)(e),success:!1}))}else"open"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,success:!1,error:"Connection not ready."}))})),this.rtc.rtcClient.addEventListener("connectionstatechange",this.connectionStateChangeHandler),Object.values(this.rtc.channels).forEach((e=>{e.onclose=e=>{[...this.responseMap.values()].forEach((e=>e.reject(new Error("RTCDataChannel closed unexpectedly, this is most commonly caused by message size. Note: RTC Channels have a message size limit of ~255kB.")))),this.close(),$e(this,Te,"f")&&$e(this,Te,"f").call(this)}}))}onDisconnect(e){if($e(this,Te,"f"))throw new Error("RTCEndpoint disconnectListener cannot be set twice.");Be(this,Te,e,"f")}receive(e){if($e(this,Le,"f"))throw new Error("You have already set a listener for this RTC Endpoint.");Be(this,Le,e,"f")}get connected(){return"connected"===this.rtc.rtcClient.connectionState}},Le=new WeakMap,Te=new WeakMap;var We,He,Ne,De={},Ue=s&&s.__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)},Ve=s&&s.__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};Object.defineProperty(De,"__esModule",{value:!0}),De.EndpointStrategy=void 0;De.EndpointStrategy=class{constructor(e,t,n){this.EndpointType=e,this.StrategyName=n,We.set(this,null),He.set(this,new Map),Ne.set(this,!0),this.send=async(e,t,n)=>this.getEndpointById(e).send(t,n),this.close=async()=>{Ue(this,Ne,"f")&&(Ue(this,He,"f").forEach((e=>e.close())),Ve(this,He,new Map,"f")),Ve(this,Ne,!1,"f")},this.isValidEndpointPayload=t}onEndpointDisconnect(e,t){this.getEndpointById(e).onDisconnect(t)}receive(e){if(Ue(this,We,"f"))throw new Error(`You have already set a listener for this ${this.StrategyName} Strategy`);Ve(this,We,e,"f"),Ue(this,He,"f").forEach((e=>e.receive(Ue(this,We,"f"))))}getEndpointById(e){const t=Ue(this,He,"f").get(e);if(!t)throw new Error(`Client with endpoint id ${e} is not connected`);return t}get connected(){return Ue(this,Ne,"f")}isEndpointConnected(e){return Ue(this,He,"f").has(e)}addEndpoint(e,t){if(!Ue(this,Ne,"f"))return void console.warn(`Adding endpoint to disconnected ${this.StrategyName} Strategy`);const n=new this.EndpointType(t);Ue(this,We,"f")&&n.receive(Ue(this,We,"f")),Ue(this,He,"f").set(e,n)}async closeEndpoint(e){Ue(this,He,"f").delete(e)}},We=new WeakMap,He=new WeakMap,Ne=new WeakMap,Object.defineProperty(Fe,"__esModule",{value:!0}),Fe.RTCInfo=Fe.RTCStrategy=void 0;const ze=je,Ke=De;class qe extends Ke.EndpointStrategy{constructor(){super(ze.RTCEndpoint,ze.RTCEndpoint.isValidEndpointPayload,"RTC")}}Fe.RTCStrategy=qe,Fe.RTCInfo={version:2,minimumVersion:0,type:"rtc"};var Je={};Object.defineProperty(Je,"__esModule",{value:!0}),Je.RTCICEManager=void 0;const Ye=d;class Ze extends Ye.EmitterBase{constructor(e){super(e,"channel"),this.ensureChannelOpened=e=>new Promise(((t,n)=>{if("open"===e.readyState)t();else if("connecting"===e.readyState){const n=()=>{e.removeEventListener("open",n),t()};e.addEventListener("open",n)}else n(new Error("This Channel has already closed"))}))}static createDataChannelPromise(e,t){let n;const i=new Promise((e=>{n=e})),r=i=>{const o=()=>{i.channel.removeEventListener("open",o),n(i.channel)};i.channel.label===e&&(i.channel.addEventListener("open",o),t.removeEventListener("datachannel",r))};return t.addEventListener("datachannel",r),i}async listenForProviderIce(e,t){await this.on(this.createProviderEventName(e),t,{timestamp:Date.now()})}async raiseProviderIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createProviderEventName(e)),t)}async listenForClientIce(e,t){await this.on(this.createClientEventName(e),t,{timestamp:Date.now()})}async raiseClientIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createClientEventName(e)),t)}cleanupIceListeners(e){this.removeAllListeners(this.createClientEventName(e)),this.removeAllListeners(this.createProviderEventName(e))}createClientEventName(e){return`ice-client-${e}`}createProviderEventName(e){return`ice-provider-${e}`}createRouteString(e){return`channel/${e}`}createRtcPeer(){return this.wire.environment.getRtcPeer()}async startClientOffer(){const e=Math.random().toString(),t=this.createRtcPeer();t.addEventListener("icecandidate",(async t=>{t.candidate&&await this.raiseClientIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForProviderIce(e,(async e=>{await t.addIceCandidate(e.candidate)}));const n={request:t.createDataChannel("request"),response:t.createDataChannel("response")},i=await t.createOffer();await t.setLocalDescription(i);const r=Promise.all([n.request,n.response].map(this.ensureChannelOpened)).then((()=>{}));return{rtcClient:t,channels:n,offer:i,rtcConnectionId:e,channelsOpened:r}}async finishClientOffer(e,t,n){return await e.setRemoteDescription(t),await n,!0}async createProviderAnswer(e,t){const n=this.createRtcPeer(),i=Ze.createDataChannelPromise("request",n),r=Ze.createDataChannelPromise("response",n);n.addEventListener("icecandidate",(async t=>{t.candidate&&await this.raiseProviderIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForClientIce(e,(async e=>{await n.addIceCandidate(e.candidate)})),await n.setRemoteDescription(t);const o=await n.createAnswer();await n.setLocalDescription(o);const s=Promise.all([i,r]).then((([t,n])=>(this.cleanupIceListeners(e),{request:t,response:n})));return{rtcClient:n,answer:o,channels:s}}}Je.RTCICEManager=Ze;var Qe={},Xe={};function et(e){return[...e.split(".").reverse().entries()].reduce(((e,[t,n])=>e+ +n*1e4**t),0)}function tt(e,t){return et(e)>=et(t)}function nt(e){return e.split("/")[0]}Object.defineProperty(Xe,"__esModule",{value:!0}),Xe.runtimeUuidMeetsMinimumRuntimeVersion=Xe.parseRuntimeUuid=Xe.meetsMinimumRuntimeVersion=void 0,Xe.meetsMinimumRuntimeVersion=tt,Xe.parseRuntimeUuid=nt,Xe.runtimeUuidMeetsMinimumRuntimeVersion=function(e,t){return tt(nt(e),t)};var it,rt,ot,st,at,ct=s&&s.__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)},dt=s&&s.__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};Object.defineProperty(Qe,"__esModule",{value:!0}),Qe.ChannelProvider=void 0;const ht=pe,lt=Xe;class ut extends ht.ChannelBase{get connections(){return[...ct(this,it,"f")]}static handleClientDisconnection(e,t){const n=e.connections.find((e=>e.endpointId===t.endpointId));if(n)ct(e,st,"f").call(e,n);else{e.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name)).forEach(ct(e,st,"f"))}e.disconnectListener(t)}static setProviderRemoval(e,t){ut.removalMap.set(e,t)}constructor(e,t,n){super(),it.set(this,void 0),rt.set(this,void 0),ot.set(this,void 0),st.set(this,(e=>{const t=this.connections.filter((t=>t.endpointId!==e.endpointId));ct(this,ot,"f").closeEndpoint(e.endpointId),dt(this,it,t,"f")})),this.processAction=async(e,t,n)=>(ut.clientIsMultiRuntime(n)&&!(0,lt.runtimeUuidMeetsMinimumRuntimeVersion)(n.runtimeUuid,"18.87.56.0")?this.handleMultiRuntimeLegacyClient(n):this.checkForClientConnection(n),super.processAction(e,t,n)),at.set(this,(()=>{ct(this,ot,"f").close();const e=ut.removalMap.get(this);e&&e()})),dt(this,rt,new ht.ProtectedItems(e,t),"f"),this.connectListener=()=>{},this.disconnectListener=()=>{},dt(this,it,[],"f"),dt(this,ot,n,"f"),n.receive(this.processAction)}dispatch(e,t,n){const i=e.endpointId??this.getEndpointIdForOpenFinId(e,t);return i&&ct(this,ot,"f").isEndpointConnected(i)?ct(this,ot,"f").send(i,t,n):Promise.reject(new Error(`Client connection with identity uuid: ${e.uuid} / name: ${e.name} / endpointId: ${i} no longer connected.`))}async processConnection(e,t){return ct(this,it,"f").push(e),this.connectListener(e,t)}publish(e,t){return this.connections.map((n=>ct(this,ot,"f").send(n.endpointId,e,t)))}onConnection(e){this.connectListener=e}onDisconnection(e){this.disconnectListener=e}async destroy(){const e=ct(this,rt,"f");e.providerIdentity,dt(this,it,[],"f"),await e.close(),ct(this,at,"f").call(this)}async getAllClientInfo(){return this.connections.map((e=>{const{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}=e;return{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}}))}checkForClientConnection(e){if(!this.isClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider.\n Client Identity: {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}isClientConnected(e){return ut.clientIdentityIncludesEndpointId(e)?this.connections.some((t=>t.endpointId===e.endpointId&&t.uuid===e.uuid&&t.name===e.name)):this.isLegacyClientConnected(e)}isLegacyClientConnected(e){return this.connections.some((t=>t.uuid===e.uuid&&t.name===e.name))}handleMultiRuntimeLegacyClient(e){if(!this.isLegacyClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider. Client Identity:\n {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}getEndpointIdForOpenFinId(e,t){const n=this.connections.filter((t=>t.name===e.name&&t.uuid===e.uuid));if(n.length>=2){const n=ct(this,rt,"f"),{uuid:i,name:r}=e,o=n?.providerIdentity.uuid,s=n?.providerIdentity.name;console.warn(`WARNING: Dispatch call may have unintended results. The "to" argument of your dispatch call is missing the\n "endpointId" parameter. The identity you are dispatching to ({uuid: ${i}, name: ${r}})\n has multiple channelClients for this channel. Your dispatched action: (${t}) from the provider:\n ({uuid: ${o}, name: ${s}}) will only be processed by the most recently-created client.`)}return n.pop()?.endpointId}static clientIdentityIncludesEndpointId(e){return void 0!==e.endpointId}static clientIsMultiRuntime(e){return void 0!==e.runtimeUuid}static async wireClose(e,t){await e.sendAction("destroy-channel",{channelName:t})}}Qe.ChannelProvider=ut,it=new WeakMap,rt=new WeakMap,ot=new WeakMap,st=new WeakMap,at=new WeakMap,ut.removalMap=new WeakMap;var pt={};Object.defineProperty(pt,"__esModule",{value:!0}),pt.MessageReceiver=void 0;const wt=ue,yt=d;class ft extends yt.Base{constructor(e){super(e),this.onmessage=e=>"process-channel-message"===e.action&&(this.processChannelMessage(e),!0),this.endpointMap=new Map,this.latestEndpointIdByChannelId=new Map,e.registerMessageHandler(this.onmessage.bind(this))}async processChannelMessage(e){const{senderIdentity:t,providerIdentity:n,action:i,ackToSender:r,payload:o,intendedTargetIdentity:s}=e.payload,a=s.channelId??s.endpointId??this.latestEndpointIdByChannelId.get(n.channelId),c=this.endpointMap.get(a);if(!c)return r.payload.success=!1,r.payload.reason=`Client connection with identity uuid: ${this.wire.me.uuid} / name: ${this.wire.me.name} / endpointId: ${a} no longer connected.`,this.wire.sendRaw(r);try{const e=await c(i,o,t);return r.payload.payload=r.payload.payload||{},r.payload.payload.result=e,this.wire.sendRaw(r)}catch(e){return r.payload.success=!1,r.payload.reason=e.message,this.wire.sendRaw(r)}}addEndpoint(e,t,n){this.endpointMap.set(n,e),t!==n&&this.latestEndpointIdByChannelId.set(t,n)}removeEndpoint(e,t){this.endpointMap.delete(t),this.latestEndpointIdByChannelId.get(e)===t&&this.latestEndpointIdByChannelId.delete(e)}checkForPreviousClientConnection(e){const t=this.latestEndpointIdByChannelId.get(e);t&&(wt.ChannelClient.closeChannelByEndpointId(t),console.warn("You have created a second connection to an older provider. First connection has been removed from the clientMap"),console.warn("If the provider calls publish(), you may receive multiple messages."))}}pt.MessageReceiver=ft;var gt={};Object.defineProperty(gt,"__esModule",{value:!0}),gt.ProtocolManager=void 0;gt.ProtocolManager=class{constructor(e){this.ProtocolsInPreferenceOrder=e,this.DefaultClientProtocols=["classic"],this.DefaultProviderProtocols=["classic"],this.getClientProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultClientProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(", ")}.`);return t},this.getProviderProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultProviderProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(", ")}.`);return t},this.getCompatibleProtocols=(e,t)=>t.supportedProtocols.filter((t=>e.some((e=>e.type===t.type&&t.version>=e.minimumVersion&&e.version>=(t.minimumVersion??0))))).slice(0,t.maxProtocols)}};var mt={};Object.defineProperty(mt,"__esModule",{value:!0});class vt{static combine(e,t){return new vt(e,t)}constructor(e,t){this.primary=e,this.secondary=t}onEndpointDisconnect(e,t){this.primary.onEndpointDisconnect(e,(()=>{this.secondary.isEndpointConnected(e)||t()})),this.secondary.onEndpointDisconnect(e,(()=>{this.primary.isEndpointConnected(e)||t()}))}isValidEndpointPayload(e){return this.primary.isValidEndpointPayload(e)||this.secondary.isValidEndpointPayload(e)}async closeEndpoint(e){await this.primary.closeEndpoint(e),await this.secondary.closeEndpoint(e)}isEndpointConnected(e){return this.primary.isEndpointConnected(e)||this.secondary.isEndpointConnected(e)}async addEndpoint(e,t){this.primary.isValidEndpointPayload(t)&&await this.primary.addEndpoint(e,t),this.secondary.isValidEndpointPayload(t)&&await this.secondary.addEndpoint(e,t)}receive(e){this.primary.receive(e),this.secondary.receive(e)}send(e,t,n){return this.primary.isEndpointConnected(e)?this.primary.send(e,t,n):this.secondary.send(e,t,n)}async close(){await Promise.all([this.primary.close(),this.secondary.close()])}}mt.default=vt;var Ct,bt,It=s&&s.__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},Et=s&&s.__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)},xt=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(xe,"__esModule",{value:!0}),xe.ConnectionManager=void 0;const At=Ae,Pt=d,Mt=Oe,_t=Fe,Ot=Je,St=Qe,Rt=pt,Ft=gt,jt=xt(mt);class kt extends Pt.Base{static getProtocolOptionsFromStrings(e){return e.map((e=>{switch(e){case"rtc":return _t.RTCInfo;case"classic":return Mt.ClassicInfo;default:return(0,At.exhaustiveCheck)(e,["rtc","classic"])}}))}constructor(e){super(e),Ct.set(this,void 0),bt.set(this,void 0),this.removeChannelFromProviderMap=e=>{this.providerMap.delete(e)},this.onmessage=e=>"process-channel-connection"===e.action&&(this.processChannelConnection(e),!0),this.providerMap=new Map,this.protocolManager=new Ft.ProtocolManager("node"===this.wire.environment.type?["classic"]:["rtc","classic"]),It(this,Ct,new Rt.MessageReceiver(e),"f"),It(this,bt,new Ot.RTCICEManager(e),"f"),e.registerMessageHandler(this.onmessage.bind(this))}createProvider(e,t){const n=Object.assign(this.wire.environment.getDefaultChannelOptions().create,e||{}),i=this.protocolManager.getProviderProtocols(n?.protocols),r=i.map((e=>{switch(e){case"rtc":return new _t.RTCStrategy;case"classic":return new Mt.ClassicStrategy(this.wire,Et(this,Ct,"f"),t.channelId,t);default:return(0,At.exhaustiveCheck)(e,["rtc","classic"])}}));let o;if(2===r.length){const[e,t]=r;o=jt.default.combine(e,t)}else{if(1!==r.length)throw new Error("failed to combine strategies");[o]=r}const s=new St.ChannelProvider(t,(()=>St.ChannelProvider.wireClose(this.wire,t.channelName)),o),a=t.channelId;return this.providerMap.set(a,{provider:s,strategy:o,supportedProtocols:kt.getProtocolOptionsFromStrings(i)}),St.ChannelProvider.setProviderRemoval(s,this.removeChannelFromProviderMap.bind(this)),s}async createClientOffer(e){const t=this.protocolManager.getClientProtocols(e?.protocols);let n;return{offer:{supportedProtocols:await Promise.all(t.map((async e=>{switch(e){case"rtc":{const{rtcClient:e,channels:t,offer:i,rtcConnectionId:r,channelsOpened:o}=await Et(this,bt,"f").startClientOffer();return n={rtcClient:e,channels:t,channelsOpened:o},{type:"rtc",version:_t.RTCInfo.version,payload:{offer:i,rtcConnectionId:r}}}case"classic":return{type:"classic",version:Mt.ClassicInfo.version};default:return(0,At.exhaustiveCheck)(e,["rtc","classic"])}}))),maxProtocols:2},rtc:n}}async createClientStrategy(e,t){t.endpointId||(t.endpointId=this.wire.environment.getNextMessageId(),Et(this,Ct,"f").checkForPreviousClientConnection(t.channelId));const n=t.answer??{supportedProtocols:[{type:"classic",version:1}]},i=(await Promise.all(n.supportedProtocols.map((async n=>"rtc"===n.type&&e?(await Et(this,bt,"f").finishClientOffer(e.rtcClient,n.payload.answer,e.channelsOpened),new _t.RTCStrategy):"classic"===n.type?new Mt.ClassicStrategy(this.wire,Et(this,Ct,"f"),t.endpointId,t):null)))).filter((e=>null!==e));let r;if(e&&!i.some((e=>e instanceof _t.RTCStrategy))&&e&&e.rtcClient.close(),i.length>=2)r=jt.default.combine(i[0],i[1]);else{if(!i.length)throw new Error("No compatible protocols");[r]=i}const o={endpointIdentity:t,rtc:e};return r.addEndpoint(t.channelId,o),r}async processChannelConnection(e){const{clientIdentity:t,providerIdentity:n,ackToSender:i,payload:r,offer:o}=e.payload;t.endpointId?t.isLocalEndpointId=!1:(t.endpointId=this.wire.environment.getNextMessageId(),t.isLocalEndpointId=!0);const s=n.channelId,a=this.providerMap.get(s);if(!a)return i.payload.success=!1,i.payload.reason=`Channel "${n.channelName}" has been destroyed.`,this.wire.sendRaw(i);const{provider:c,strategy:d,supportedProtocols:h}=a;try{if(!(c instanceof St.ChannelProvider))throw Error("Cannot connect to a channel client");const e=o??{supportedProtocols:[{type:"classic",version:1}],maxProtocols:1},n=this.protocolManager.getCompatibleProtocols(h,e);if(!n.length)throw new Error("This provider does not support any of the offered protocols.");const s=await c.processConnection(t,r);i.payload.payload=i.payload.payload||{};let a={supportedProtocols:[],endpointPayloadPromise:Promise.resolve({endpointIdentity:t})};return a=await n.reduce((async(e,t)=>{const n=await e;if("rtc"===t.type){const{answer:e,rtcClient:i,channels:r}=await Et(this,bt,"f").createProviderAnswer(t.payload.rtcConnectionId,t.payload.offer);n.supportedProtocols.push({type:"rtc",version:_t.RTCInfo.version,payload:{answer:e}}),n.endpointPayloadPromise=n.endpointPayloadPromise.then((e=>r.then((t=>({...e,rtc:{rtcClient:i,channels:t}})))))}else n.supportedProtocols.push({type:"classic",version:Mt.ClassicInfo.version});return n}),Promise.resolve(a)),a.endpointPayloadPromise.then((e=>d.addEndpoint(t.endpointId,e))),i.payload.payload.result=s,i.payload.payload.answer=a,this.wire.sendRaw(i)}catch(e){return i.payload.success=!1,i.payload.reason=e.message,this.wire.sendRaw(i)}}}xe.ConnectionManager=kt,Ct=new WeakMap,bt=new WeakMap;var Lt,Tt,$t,Bt=s&&s.__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},Gt=s&&s.__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)};Object.defineProperty(le,"__esModule",{value:!0}),le.Channel=void 0;const Wt=t,Ht=G,Nt=d,Dt=ue,Ut=xe,Vt=Qe;function zt(e){const t=Math.floor(e/10),n=Math.min(3e4,500*2**t);return new Promise((e=>{setTimeout((()=>{e(!1)}),n)}))}class Kt extends Nt.EmitterBase{constructor(e){super(e,"channel"),Lt.set(this,void 0),Tt.set(this,new Wt.EventEmitter),$t.set(this,new Ht.AsyncRetryableLazy((async()=>{await Promise.all([this.on("disconnected",(e=>{Dt.ChannelClient.handleProviderDisconnect(e)})),this.on("connected",((...e)=>{Gt(this,Tt,"f").emit("connected",...e)}))]).catch((()=>new Error("error setting up channel connection listeners")))}))),Bt(this,Lt,new Ut.ConnectionManager(e),"f")}async getAllChannels(){return this.wire.sendAction("get-all-channels").then((({payload:e})=>e.data))}async onChannelConnect(e){await this.on("connected",e)}async onChannelDisconnect(e){await this.on("disconnected",e)}async safeConnect(e,t,n){const i={count:0};do{let r=()=>{};const o=new Promise((t=>{r=n=>{e===n.channelName&&t(!0)},Gt(this,Tt,"f").on("connected",r)}));try{if(i.count>0){i.gotConnectedEvent=await Promise.race([zt(i.count),o]);const t=await this.wire.sendAction("connect-to-channel",{...n,retryInfo:i});return console.log(`Successfully connected to channelName: ${e}`),t.payload.data}const t=this.wire.sendAction("connect-to-channel",n);i.originalMessageId=t.messageId;return(await t).payload.data}catch(n){if(!n.message.includes("internal-nack"))throw n;t&&0===i.count&&console.warn(`No channel found for channelName: ${e}. Waiting for connection...`)}finally{i.count+=1,Gt(this,Tt,"f").removeListener("connected",r)}}while(t);throw new Error(`No channel found for channelName: ${e}.`)}async connect(e,t={}){if(await Gt(this,$t,"f").getValue(),!e||"string"!=typeof e)throw new Error("Please provide a channelName string to connect to a channel.");const n={wait:!0,...this.wire.environment.getDefaultChannelOptions().connect,...t},{offer:i,rtc:r}=await Gt(this,Lt,"f").createClientOffer(n);let o;(this.fin.me.isFrame||this.fin.me.isView||this.fin.me.isWindow)&&(o=(await this.fin.me.getInfo()).url);const s={channelName:e,...n,offer:i,connectionUrl:o},a=await this.safeConnect(e,n.wait,s),c=await Gt(this,Lt,"f").createClientStrategy(r,a),d=new Dt.ChannelClient(a,(()=>Dt.ChannelClient.wireClose(this.wire,a,a.endpointId)),c);return c.onEndpointDisconnect(a.channelId,(async()=>{try{await d.sendDisconnectAction()}catch(e){console.warn(`Something went wrong during disconnect for client with uuid: ${a.uuid} / name: ${a.name} / endpointId: ${a.endpointId}.`)}finally{Dt.ChannelClient.handleProviderDisconnect(a)}})),d}async create(e,t){if(!e)throw new Error("Please provide a channelName to create a channel");const{payload:{data:n}}=await this.wire.sendAction("create-channel",{channelName:e}),i=Gt(this,Lt,"f").createProvider(t,n);return this.on("client-disconnected",(t=>{t.channelName===e&&Vt.ChannelProvider.handleClientDisconnection(i,t)})),i}}le.Channel=Kt,Lt=new WeakMap,Tt=new WeakMap,$t=new WeakMap,Object.defineProperty(de,"__esModule",{value:!0}),de.InterAppPayload=de.InterApplicationBus=void 0;const qt=t,Jt=d,Yt=he,Zt=le,Qt=O;class Xt extends Jt.Base{constructor(e){super(e),this.events={subscriberAdded:"subscriber-added",subscriberRemoved:"subscriber-removed"},this.refCounter=new Yt.RefCounter,this.Channel=new Zt.Channel(e),this.emitter=new qt.EventEmitter,e.registerMessageHandler(this.onmessage.bind(this)),this.on=this.emitter.on.bind(this.emitter),this.removeAllListeners=this.emitter.removeAllListeners.bind(this.emitter)}async publish(e,t){await this.wire.sendAction("publish-message",{topic:e,message:t,sourceWindowName:this.me.name})}async send(e,t,n){const i=(0,Qt.validateIdentity)(e);if(i)throw new Error(i);await this.wire.sendAction("send-message",{destinationUuid:e.uuid,destinationWindowName:e.name,topic:t,message:n,sourceWindowName:this.me.name})}subscribe(e,t,n){const i=this.createSubscriptionKey(e.uuid,e.name||"*",t);return this.emitter.on(i,n),this.refCounter.actOnFirst(i,(async()=>{await this.wire.sendAction("subscribe",{sourceUuid:e.uuid,sourceWindowName:e.name||"*",topic:t,destinationWindowName:this.me.name})}),(()=>Promise.resolve()))}unsubscribe(e,t,n){const i=e.name||"*",r=this.createSubscriptionKey(e.uuid,i,t);return this.emitter.removeListener(r,n),this.refCounter.actOnLast(r,(async()=>{await this.wire.sendAction("unsubscribe",{sourceUuid:e.uuid,sourceWindowName:i,topic:t,destinationWindowName:this.me.name})}),(()=>new Promise((e=>e)).then((()=>{}))))}processMessage(e){const{payload:{message:t,sourceWindowName:n,sourceUuid:i,topic:r}}=e,o=[this.createSubscriptionKey(i,n,r),this.createSubscriptionKey(i,"*",r),this.createSubscriptionKey("*","*",r)],s={uuid:i,name:n};o.forEach((e=>{this.emitter.emit(e,t,s)}))}emitSubscriverEvent(e,t){const{payload:{targetName:n,uuid:i,topic:r}}=t,o={name:n,uuid:i,topic:r};this.emitter.emit(e,o)}createSubscriptionKey(e,t,n){const i=t||"*";if(!(e&&i&&n))throw new Error("Missing uuid, name, or topic string");return function(...e){return e.map((e=>Buffer.from(`${e}`).toString("base64"))).join("/")}(e,i,n)}onmessage(e){const{action:t}=e;switch(t){case"process-message":this.processMessage(e);break;case this.events.subscriberAdded:this.emitSubscriverEvent(this.events.subscriberAdded,e);break;case this.events.subscriberRemoved:this.emitSubscriverEvent(this.events.subscriberRemoved,e)}return!0}}de.InterApplicationBus=Xt;de.InterAppPayload=class{};var en={};Object.defineProperty(en,"__esModule",{value:!0}),en.Clipboard=void 0;const tn=d;class nn extends tn.Base{async writeText(e){await this.wire.sendAction("clipboard-write-text",e)}async readText(e){const{payload:t}=await this.wire.sendAction("clipboard-read-text",{type:e});return t.data}async writeImage(e){await this.wire.sendAction("clipboard-write-image",e)}async readImage(e={format:"dataURL"}){const{payload:t}=await this.wire.sendAction("clipboard-read-image",e);return t.data}async writeHtml(e){await this.wire.sendAction("clipboard-write-html",e)}async readHtml(e){const{payload:t}=await this.wire.sendAction("clipboard-read-html",{type:e});return t.data}async writeRtf(e){await this.wire.sendAction("clipboard-write-rtf",e)}async readRtf(e){const{payload:t}=await this.wire.sendAction("clipboard-read-rtf",{type:e});return t.data}async write(e){await this.wire.sendAction("clipboard-write",e)}async getAvailableFormats(e){const{payload:t}=await this.wire.sendAction("clipboard-read-formats",{type:e});return t.data}}en.Clipboard=nn;var rn={},on={},sn={};Object.defineProperty(sn,"__esModule",{value:!0}),sn.ExternalApplication=void 0;const an=d;class cn extends an.EmitterBase{constructor(e,t){super(e,"external-application",t.uuid),this.identity=t}getInfo(){return this.wire.sendAction("get-external-application-info",this.identity).then((({payload:e})=>e.data))}}sn.ExternalApplication=cn,Object.defineProperty(on,"__esModule",{value:!0}),on.ExternalApplicationModule=void 0;const dn=d,hn=sn;class ln extends dn.Base{wrap(e){return this.wire.sendAction("external-application-wrap").catch((e=>{})),Promise.resolve(new hn.ExternalApplication(this.wire,{uuid:e}))}wrapSync(e){return this.wire.sendAction("external-application-wrap-sync").catch((e=>{})),new hn.ExternalApplication(this.wire,{uuid:e})}}on.ExternalApplicationModule=ln,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(on,e),n(sn,e)}(rn);var un={},pn={},wn={};Object.defineProperty(wn,"__esModule",{value:!0}),wn._Frame=void 0;const yn=d;class fn extends yn.EmitterBase{constructor(e,t){super(e,"frame",t.uuid,t.name),this.identity=t}getInfo(){return this.wire.sendAction("get-frame-info",this.identity).then((({payload:e})=>e.data))}getParentWindow(){return this.wire.sendAction("get-parent-window",this.identity).then((({payload:e})=>e.data))}}wn._Frame=fn,Object.defineProperty(pn,"__esModule",{value:!0}),pn._FrameModule=void 0;const gn=d,mn=O,vn=wn;class Cn extends gn.Base{async wrap(e){this.wire.sendAction("frame-wrap").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}wrapSync(e){this.wire.sendAction("frame-wrap-sync").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}getCurrent(){return this.wire.sendAction("frame-get-current").catch((e=>{})),Promise.resolve(new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity()))}getCurrentSync(){return this.wire.sendAction("frame-get-current-sync").catch((e=>{})),new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity())}}pn._FrameModule=Cn,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(pn,e),n(wn,e)}(un);var bn={};Object.defineProperty(bn,"__esModule",{value:!0}),bn.GlobalHotkey=void 0;const In=d;class En extends In.EmitterBase{constructor(e){super(e,"global-hotkey")}async register(e,t){await this.on(e,t),await this.wire.sendAction("global-hotkey-register",{hotkey:e})}async unregister(e){await this.removeAllListeners(e),await this.wire.sendAction("global-hotkey-unregister",{hotkey:e})}async unregisterAll(){await Promise.all(this.eventNames().filter((e=>!("registered"===e||"unregistered"===e))).map((e=>this.removeAllListeners(e)))),await this.wire.sendAction("global-hotkey-unregister-all",{})}async isRegistered(e){const{payload:{data:t}}=await this.wire.sendAction("global-hotkey-is-registered",{hotkey:e});return t}}bn.GlobalHotkey=En;var xn,An={},Pn={},Mn={},_n=s&&s.__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)};Object.defineProperty(Mn,"__esModule",{value:!0}),Mn.Platform=void 0;const On=d,Sn=O,Rn=new Map;class Fn extends On.EmitterBase{constructor(e,t){super(t.wire,"application",e.uuid),this.getClient=e=>{this.wire.sendAction("platform-get-client",this.identity).catch((e=>{}));const t=e||this.identity,{uuid:n}=t;if(!Rn.has(n)){const e=_n(this,xn,"f").call(this,n);Rn.set(n,e)}return Rn.get(n)},xn.set(this,(async e=>{try{const t=`custom-frame-${e}`,n=await this._channel.connect(t,{wait:!1});return n.onDisconnection((()=>{Rn.delete(e)})),n}catch(t){throw Rn.delete(e),new Error("The targeted Platform is not currently running. Listen for application-started event for the given Uuid.")}})),this.launchLegacyManifest=this.launchContentManifest;const n=(0,Sn.validateIdentity)(e);if(n)throw new Error(n);this._channel=t,this.identity={uuid:e.uuid},this.Layout=this.fin.Platform.Layout,this.Application=this.fin.Application.wrapSync(this.identity)}async createView(e,t,n){this.wire.sendAction("platform-create-view",this.identity).catch((e=>{}));const i=await this.getClient(),r=await i.dispatch("create-view",{target:t,opts:e,targetView:n});if(!r||(0,Sn.validateIdentity)(r.identity))throw new Error(`When overwriting the createView call, please return an object that has a valid 'identity' property: ${JSON.stringify(r)}`);return this.fin.View.wrapSync(r.identity)}async createWindow(e){this.wire.sendAction("platform-create-window",this.identity).catch((e=>{}));const t=await this.getClient();e.reason||(e.reason="api-call");const n=await t.dispatch("create-view-container",e);if(!n||(0,Sn.validateIdentity)(n.identity))throw new Error(`When overwriting the createWindow call, please return an object that has a valid 'identity' property: ${JSON.stringify(n)}`);const{identity:i}=n,r=this.fin.Window.wrapSync(i);return r.name=i.name,r.uuid=i.uuid,r}async quit(){this.wire.sendAction("platform-quit",this.identity).catch((e=>{}));return(await this.getClient()).dispatch("quit")}async closeView(e){this.wire.sendAction("platform-close-view",this.identity).catch((e=>{}));const t=await this.getClient();await t.dispatch("close-view",{view:e})}async reparentView(e,t){console.warn("Platform.reparentView has been deprecated, please use Platform.createView"),this.wire.sendAction("platform-reparent-view",this.identity).catch((e=>{}));const n={...e,uuid:e.uuid??this.identity.uuid},i=await this.fin.View.wrap(n),r=await i.getOptions();return this.createView(r,t)}async getSnapshot(){this.wire.sendAction("platform-get-snapshot",this.identity).catch((e=>{}));return(await this.getClient()).dispatch("get-snapshot")}async getViewSnapshot(e){return(await this.getClient()).dispatch("get-view-snapshot",{viewIdentity:e})}async applySnapshot(e,t){this.wire.sendAction("platform-apply-snapshot",this.identity).catch((e=>{}));const n="Requested snapshot must be a valid Snapshot object, or a url or filepath to such an object.";let i;if("string"==typeof e)try{i=(await this._channel.wire.sendAction("get-application-manifest",{manifestUrl:e})).payload.data}catch(e){throw new Error(`${n}: ${e}`)}else i=e;if(!i.windows)throw new Error(n);const r=await this.getClient();return await r.dispatch("apply-snapshot",{snapshot:i,options:t}),this}async fetchManifest(e){return(await this.getClient()).dispatch("platform-fetch-manifest",{manifestUrl:e})}async launchContentManifest(e){this.wire.sendAction("platform-launch-content-manifest",this.identity).catch((()=>{}));const t=await this.getClient(),n=await this.fetchManifest(e);return t.dispatch("launch-into-platform",{manifest:n,manifestUrl:e}),this}async setWindowContext(e={},t){if(this.wire.sendAction("platform-set-window-context",this.identity).catch((e=>{})),!e)throw new Error("Please provide a serializable object or string to set the context.");const n=await this.getClient(),{entityType:i}=t?await this.fin.System.getEntityInfo(t.uuid,t.name):this.fin.me;await n.dispatch("set-window-context",{context:e,entityType:i,target:t||{uuid:this.fin.me.uuid,name:this.fin.me.name}})}async getWindowContext(e){this.wire.sendAction("platform-get-window-context",this.identity).catch((e=>{}));const t=await this.getClient(),{entityType:n}=e?await this.fin.System.getEntityInfo(e.uuid,e.name):this.fin.me;return t.dispatch("get-window-context",{target:e||{uuid:this.fin.me.uuid,name:this.fin.me.name},entityType:n})}async closeWindow(e,t={skipBeforeUnload:!1}){this.wire.sendAction("platform-close-window",this.identity).catch((e=>{}));return(await this.getClient()).dispatch("close-window",{windowId:e,options:t})}}Mn.Platform=Fn,xn=new WeakMap;var jn={},kn={},Ln={},Tn={};function $n(e){switch(e){case"columns":case"grid":case"rows":case"tabs":return!0;default:return!1}}Object.defineProperty(Tn,"__esModule",{value:!0}),Tn.overrideFromComposables=Tn.isValidPresetType=void 0,Tn.isValidPresetType=$n,Tn.overrideFromComposables=function(...e){return t=>e.reduceRight(((e,t)=>n=>t(e(n))),(e=>e))(t)},Tn.default={isValidPresetType:$n};var Bn={},Gn={},Wn={};Object.defineProperty(Wn,"__esModule",{value:!0}),Wn.ApiConsumer=void 0;Wn.ApiConsumer=class{constructor(e){this.strategy=e,this.consume=async e=>(await this.strategy.getExposedFunctions(e)).reduce(((t,n)=>({...t,[n.key]:this.strategy.createFunction(n,e)})),{})}};var Hn={},Nn={};Object.defineProperty(Nn,"__esModule",{value:!0}),Nn.expose=Nn.getExposedProperties=void 0;const Dn=Symbol("exposedProperties");Nn.getExposedProperties=e=>e[Dn]||e.prototype[Dn]||[];Nn.expose=e=>(t,n,i)=>{t[Dn]=t[Dn]||[],t[Dn].push({key:n,descriptor:i,options:e})},Object.defineProperty(Hn,"__esModule",{value:!0}),Hn.ApiExposer=void 0;const Un=Nn;Hn.ApiExposer=class{constructor(e){this.strategy=e,this.exposeInstance=async(e,t)=>{const n=(0,Un.getExposedProperties)(e),i=await Promise.all(n.map((async({key:n,options:i})=>({key:n,options:await this.strategy.exposeFunction(e[n].bind(e),{key:n,options:i,meta:t})}))));await this.strategy.exposeMeta(t,i)}}};var Vn={},zn={},Kn={};Object.defineProperty(Kn,"__esModule",{value:!0}),Kn.ChannelsConsumer=void 0;Kn.ChannelsConsumer=class{constructor(e){this.channel=e,this.getExposedFunctions=async e=>{const{id:t}=e,{props:n}=await this.channel.dispatch(`api-meta:${t}`);return n},this.createFunction=e=>(...t)=>{const{action:n}=e.options;return this.channel.dispatch(n,{args:t})}}};var qn={};Object.defineProperty(qn,"__esModule",{value:!0}),qn.ChannelsExposer=void 0;qn.ChannelsExposer=class{constructor(e){this.channelProviderOrClient=e,this.exposeFunction=async(e,t)=>{const{key:n,options:i,meta:r}=t,{id:o}=r,s=`${o}.${i?.action||n}`;return await this.channelProviderOrClient.register(s,(async({args:t})=>e(...t))),{action:s}},this.exposeMeta=async({id:e},t)=>{const n=`api-meta:${e}`;await this.channelProviderOrClient.register(n,(()=>({props:t})))}}},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Kn,e),n(qn,e)}(zn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(zn,e)}(Vn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Wn,e),n(Hn,e),n(Vn,e),n(Nn,e)}(Gn);var Jn={};Object.defineProperty(Jn,"__esModule",{value:!0}),Jn.createRelayedDispatch=exports.relayChannelClientApi_1=Jn.relayChannelClientApi=void 0;const Yn=["no longer connected","RTCDataChannel closed unexpectedly","The client you are trying to dispatch from is disconnected from the target provider"];exports.relayChannelClientApi_1=Jn.relayChannelClientApi=async(e,t)=>{e.register(`relay:${t}`,(({action:t,target:n,payload:i})=>e.dispatch(n,t,i))),await Promise.resolve()};Jn.createRelayedDispatch=(e,t,n,i)=>async(r,o)=>{try{return await e.dispatch(`relay:${n}`,{action:r,payload:o,target:t})}catch(e){if(s=e.message,Yn.some((e=>s.includes(e)))&&i)throw new Error(i);throw e}var s};var Zn,Qn,Xn,ei=s&&s.__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},ti=s&&s.__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)};Object.defineProperty(Bn,"__esModule",{value:!0}),Bn.ColumnOrRow=Bn.TabStack=Bn.LayoutNode=void 0;const ni=Gn,ii=Jn;class ri{constructor(e,t){Zn.set(this,void 0),this.isRoot=()=>ti(this,Zn,"f").isRoot(this.entityId),this.exists=()=>ti(this,Zn,"f").exists(this.entityId),this.getParent=async()=>{const e=await ti(this,Zn,"f").getParent(this.entityId);if(e)return ri.getEntity(e,ti(this,Zn,"f"))},this.createAdjacentStack=async(e,t)=>{const n=await ti(this,Zn,"f").createAdjacentStack(this.entityId,e,t);return ri.getEntity({entityId:n,type:"stack"},ti(this,Zn,"f"))},this.getAdjacentStacks=async e=>(await ti(this,Zn,"f").getAdjacentStacks({targetId:this.entityId,edge:e})).map((e=>ri.getEntity({type:"stack",entityId:e.entityId},ti(this,Zn,"f")))),ei(this,Zn,e,"f"),this.entityId=t}}Bn.LayoutNode=ri,Zn=new WeakMap,ri.newLayoutEntitiesClient=async(e,t,n)=>{const i=(0,ii.createRelayedDispatch)(e,n,"layout-relay","You are trying to interact with a layout component on a window that does not exist or has been destroyed.");return new ni.ApiConsumer(new ni.ChannelsConsumer({dispatch:i})).consume({id:t})},ri.getEntity=(e,t)=>{const{entityId:n,type:i}=e;switch(i){case"column":case"row":return new si(t,n,i);case"stack":return new oi(t,n);default:throw new Error(`Unrecognised Layout Entity encountered ('${JSON.stringify(e)})`)}};class oi extends ri{constructor(e,t){super(e,t),Qn.set(this,void 0),this.type="stack",this.getViews=()=>ti(this,Qn,"f").getStackViews(this.entityId),this.addView=async(e,t={index:0})=>ti(this,Qn,"f").addViewToStack(this.entityId,e,t),this.removeView=async e=>{await ti(this,Qn,"f").removeViewFromStack(this.entityId,e)},this.setActiveView=async e=>{await ti(this,Qn,"f").setStackActiveView(this.entityId,e)},ei(this,Qn,e,"f")}}Bn.TabStack=oi,Qn=new WeakMap;class si extends ri{constructor(e,t,n){super(e,t),Xn.set(this,void 0),this.getContent=async()=>(await ti(this,Xn,"f").getContent(this.entityId)).map((e=>ri.getEntity(e,ti(this,Xn,"f")))),ei(this,Xn,e,"f"),this.type=n}}Bn.ColumnOrRow=si,Xn=new WeakMap;var ai={};Object.defineProperty(ai,"__esModule",{value:!0}),ai.DEFAULT_LAYOUT_KEY=ai.LAYOUT_CONTROLLER_ID=void 0,ai.LAYOUT_CONTROLLER_ID="layout-entities",ai.DEFAULT_LAYOUT_KEY="__default__";var ci,di,hi,li=s&&s.__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)};Object.defineProperty(Ln,"__esModule",{value:!0}),Ln.Layout=void 0;const ui=G,pi=O,wi=d,yi=Tn,fi=Bn,gi=ai;class mi extends wi.Base{static getClient(e){return li(e,di,"f").getValue()}constructor(e,t){super(t),ci.add(this),di.set(this,new ui.Lazy((async()=>fi.LayoutNode.newLayoutEntitiesClient(await this.platform.getClient(),gi.LAYOUT_CONTROLLER_ID,this.identity)))),this.replace=async e=>{this.wire.sendAction("layout-replace").catch((e=>{}));const t=await this.platform.getClient();await t.dispatch("replace-layout",{target:this.identity,opts:{layout:e}})},this.replaceView=async(e,t)=>{this.wire.sendAction("layout-replace-view").catch((e=>{}));const n=await this.platform.getClient();await n.dispatch("replace-view",{target:this.identity,opts:{viewToReplace:e,newView:t}})},this.applyPreset=async e=>{this.wire.sendAction("layout-apply-preset").catch((e=>{}));const t=await this.platform.getClient(),{presetType:n}=e;if(!n||!(0,yi.isValidPresetType)(n))throw new Error("Cannot apply preset layout, please include an applicable presetType property in the PresetLayoutOptions.");await t.dispatch("apply-preset-layout",{target:this.identity,opts:{presetType:n}})};const n=(0,pi.validateIdentity)(e);if(n)throw new Error(n);this.identity=e,this.platform=this.fin.Platform.wrapSync({uuid:e.uuid}),e.uuid===this.fin.me.uuid&&e.name===this.fin.me.name&&(this.init=this.fin.Platform.Layout.init)}async getConfig(){this.wire.sendAction("layout-get-config").catch((e=>{}));return(await this.platform.getClient()).dispatch("get-frame-snapshot",{target:this.identity})}async getCurrentViews(){this.wire.sendAction("layout-get-views").catch((e=>{}));const e=await this.platform.getClient();return(await e.dispatch("get-layout-views",{target:this.identity})).map((e=>this.fin.View.wrapSync(e)))}async getRootItem(){this.wire.sendAction("layout-get-root-item").catch((()=>{}));const e=await li(this,di,"f").getValue(),t=await e.getRoot("layoutName"in this.identity?this.identity:void 0);return fi.LayoutNode.getEntity(t,e)}async getStackByViewIdentity(e){this.wire.sendAction("layout-get-stack-by-view").catch((()=>{}));const t=await li(this,di,"f").getValue(),n=await t.getStackByView(e);if(!n)throw new Error(`No stack found for view: ${e.uuid}/${e.name}`);return fi.LayoutNode.getEntity(n,t)}async addView(e,{location:t,targetView:n}={}){this.wire.sendAction("layout-add-view").catch((e=>{}));const{identity:i}=await li(this,ci,"m",hi).call(this,"layout-add-view",{viewOptions:e,location:t,targetView:n});return{identity:i}}async closeView(e){this.wire.sendAction("layout-close-view").catch((e=>{})),await li(this,ci,"m",hi).call(this,"layout-close-view",{viewIdentity:e})}}Ln.Layout=mi,di=new WeakMap,ci=new WeakSet,hi=async function(e,t){return(await this.platform.getClient()).dispatch(e,{target:this.identity,opts:t})};var vi,Ci,bi,Ii,Ei,xi=s&&s.__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)},Ai=s&&s.__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};Object.defineProperty(kn,"__esModule",{value:!0}),kn.LayoutModule=void 0;const Pi=d,Mi=Ln,_i=ai;class Oi extends Pi.Base{constructor(){super(...arguments),vi.add(this),Ci.set(this,!1),bi.set(this,null),this.init=async(e={})=>{if(this.wire.sendAction("layout-init").catch((e=>{})),!this.wire.environment.layoutAllowedInContext(this.fin))throw new Error("Layout.init can only be called from a Window context.");if(xi(this,Ci,"f"))throw new Error("Layout.init was already called, please use Layout.create to add additional layouts.");"openfin"===this.wire.environment.type&&await this.fin.Platform.getCurrentSync().getClient(),Ai(this,Ci,!0,"f"),Ai(this,bi,await this.wire.environment.initLayoutManager(this.fin,this.wire,e),"f"),await this.wire.environment.applyLayoutSnapshot(this.fin,xi(this,bi,"f"),e);const t={name:this.fin.me.name,uuid:this.fin.me.uuid};if(!e.layoutManagerOverride){const e={layoutName:_i.DEFAULT_LAYOUT_KEY,...t};return xi(this,Ii,"f").call(this,e)}return this.wrapSync(t)},Ii.set(this,(e=>{const t="[Layout] You are using a deprecated property `layoutManager` - it will throw if you access it starting in v37.",n=new Proxy({},{get(e,n){throw console.warn(`[Layout-mgr-proxy] accessing ${n.toString()}`),new Error(t)}}),i=Object.assign(this.wrapSync(e),{layoutManager:n});return new Proxy(i,{get(e,n){if("layoutManager"===n)throw console.warn(`[Layout-proxy] accessing ${n.toString()}`),new Error(t);return e[n]}})})),this.getCurrentLayoutManagerSync=()=>xi(this,vi,"m",Ei).call(this,"fin.Platform.Layout.getCurrentLayoutManagerSync()"),this.create=async e=>this.wire.environment.createLayout(xi(this,vi,"m",Ei).call(this,"fin.Platform.Layout.create()"),e),this.destroy=async e=>this.wire.environment.destroyLayout(xi(this,vi,"m",Ei).call(this,"fin.Platform.Layout.destroy()"),e)}async wrap(e){return this.wire.sendAction("layout-wrap").catch((e=>{})),new Mi.Layout(e,this.wire)}wrapSync(e){return this.wire.sendAction("layout-wrap-sync").catch((e=>{})),new Mi.Layout(e,this.wire)}async getCurrent(){if(this.wire.sendAction("layout-get-current").catch((e=>{})),"openfin"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error("You are not in a Window context. Only Windows can have a Layout.");const{uuid:e,name:t}=this.fin.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction("layout-get-current-sync").catch((e=>{})),"openfin"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error("You are not in a Window context. Only Windows can have a Layout.");const{uuid:e,name:t}=this.fin.me;return this.wrapSync({uuid:e,name:t})}async getLayoutByViewIdentity(e){this.wire.sendAction("layout-get-by-view-identity").catch((()=>{}));let t=await this.wire.environment.getViewWindowIdentity(this.fin,e);t.identity&&(t=t.identity);try{const n=this.wrapSync(t),i=await Mi.Layout.getClient(n),r=await i.getLayoutIdentityForViewOrThrow(e);return this.wrapSync(r)}catch(n){if(!["No action registered at target for","getLayoutIdentityForViewOrThrow is not a function"].some((e=>n.message.includes(e))))throw n;if(t.uuid===t.name)throw new Error(`View identity ${JSON.stringify(e)} is not attached to any layout in provider window ${JSON.stringify(t)}.`);return this.wrapSync(t)}}}kn.LayoutModule=Oi,Ci=new WeakMap,bi=new WeakMap,Ii=new WeakMap,vi=new WeakSet,Ei=function(e){if(!xi(this,bi,"f"))throw new Error(`You must call init before using the API ${e}`);return xi(this,bi,"f")},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(kn,e),n(Ln,e)}(jn),Object.defineProperty(Pn,"__esModule",{value:!0}),Pn.PlatformModule=void 0;const Si=d,Ri=Mn,Fi=jn;class ji extends Si.Base{constructor(e,t){super(e),this._channel=t,this.Layout=new Fi.LayoutModule(this.wire)}async init(e){if(!fin.__internal_.isPlatform||fin.me.name!==fin.me.uuid)throw new Error("fin.Platform.init should only be called from a custom platform provider running in the main window of the application.");return this.wire.environment.initPlatform(this.fin,e)}async wrap(e){return this.wire.sendAction("platform-wrap").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}wrapSync(e){return this.wire.sendAction("platform-wrap-sync").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}async getCurrent(){return this.wire.sendAction("platform-get-current").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction("platform-get-current-sync").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}start(e){return this.wire.sendAction("platform-start").catch((e=>{})),new Promise((async(t,n)=>{try{const{uuid:n}=e,i=await this.fin.Application._create({...e,isPlatformController:!0});i.once("platform-api-ready",(()=>t(this.wrapSync({uuid:n})))),i._run({uuid:n})}catch(e){n(e)}}))}startFromManifest(e,t){return this.wire.sendAction("platform-start-from-manifest").catch((e=>{})),new Promise((async(n,i)=>{try{const i=await this.fin.Application._createFromManifest(e);i.once("platform-api-ready",(()=>n(this.wrapSync({uuid:i.identity.uuid})))),i._run(t)}catch(e){i(e)}}))}}Pn.PlatformModule=ji,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Pn,e),n(Mn,e)}(An);var ki={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getMe=e.getBaseMe=e.environmentUnsupportedMessage=void 0;const t=J(),n=un,i=ie(),r=rn;function o(e,t,n){return{...{isView:"view"===e,isWindow:"window"===e,isFrame:"iframe"===e,isExternal:"external connection"===e},uuid:t,name:n,entityType:e}}e.environmentUnsupportedMessage="You are not running in OpenFin.",e.getBaseMe=o,e.getMe=function(s){const{uuid:a,name:c,entityType:d}=s.me,h={setContext(){throw new Error(e.environmentUnsupportedMessage)},addContextHandler(){throw new Error(e.environmentUnsupportedMessage)},getContextGroups(){throw new Error(e.environmentUnsupportedMessage)},joinContextGroup(){throw new Error(e.environmentUnsupportedMessage)},removeFromContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getAllClientsInContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getInfoForContextGroup(){throw new Error(e.environmentUnsupportedMessage)}},l="Interop API has not been instantiated. Either connection has failed or you have not declared interop in your config.",u={setContext(){throw new Error(l)},addContextHandler(){throw new Error(l)},getContextGroups(){throw new Error(l)},joinContextGroup(){throw new Error(l)},removeFromContextGroup(){throw new Error(l)},getAllClientsInContextGroup(){throw new Error(l)},getInfoForContextGroup(){throw new Error(l)}},p={eventNames:()=>{throw new Error(e.environmentUnsupportedMessage)},emit:()=>{throw new Error(e.environmentUnsupportedMessage)},listeners:()=>{throw new Error(e.environmentUnsupportedMessage)},listenerCount:()=>{throw new Error(e.environmentUnsupportedMessage)},on:()=>{throw new Error(e.environmentUnsupportedMessage)},addListener:()=>{throw new Error(e.environmentUnsupportedMessage)},once:()=>{throw new Error(e.environmentUnsupportedMessage)},prependListener:()=>{throw new Error(e.environmentUnsupportedMessage)},prependOnceListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeAllListeners:()=>{throw new Error(e.environmentUnsupportedMessage)}};switch(d){case"view":return Object.assign(new t.View(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case"window":return Object.assign(new i._Window(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case"iframe":return Object.assign(new n._Frame(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case"external connection":return Object.assign(new r.ExternalApplication(s,{uuid:a}),o(d,a,c),{interop:u,isOpenFin:!1});default:return{...o(d,a,c),...p,interop:h,isOpenFin:!1}}}}(ki);var Li={},Ti={},$i={};Object.defineProperty($i,"__esModule",{value:!0}),$i.createWarningObject=$i.createUnusableObject=void 0,$i.createUnusableObject=function(e){const t=()=>{throw new Error(e)};return new Proxy({},{apply:t,construct:t,defineProperty:t,deleteProperty:t,get:t,getOwnPropertyDescriptor:t,getPrototypeOf:t,has:t,isExtensible:t,ownKeys:t,preventExtensions:t,set:t,setPrototypeOf:t})},$i.createWarningObject=function(e,t){return new Proxy(t,{get:(...t)=>(console.warn(e),Reflect.get(...t)),set:(...t)=>(console.warn(e),Reflect.set(...t)),getOwnPropertyDescriptor:(...t)=>(console.warn(e),Reflect.getOwnPropertyDescriptor(...t)),ownKeys:(...t)=>(console.warn(e),Reflect.ownKeys(...t))})};var Bi,Gi={},Wi={};var Hi={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.wrapIntentHandler=e.BROKER_ERRORS=e.generateOverrideWarning=e.generateOverrideError=e.wrapContextHandler=e.wrapInTryCatch=e.generateId=void 0;e.generateId=()=>`${Math.random()}${Date.now()}`;e.wrapInTryCatch=(e,t)=>(...n)=>{try{return e(...n)}catch(e){throw new Error((t||"")+e)}};e.wrapContextHandler=(e,t)=>async n=>{try{await e(n)}catch(e){throw console.error(`Error thrown by handler ${t} for context type ${n.type}: ${e}`),e}};e.generateOverrideError=(e,t)=>`You have tried to to use ${e} but ${t} has not been overridden in the Interop Broker. Please override this function. Refer to our documentation for more info.`;e.generateOverrideWarning=(e,t,n,i)=>{const{uuid:r,name:o}=n;return i?`Entity with identity: ${r}/${o} has called ${i} or ${e} but ${t} has not been overridden.`:`Entity with identity: ${r}/${o} has called ${e} but ${t} has not been overridden.`},e.BROKER_ERRORS={fireIntent:(0,e.generateOverrideError)("fireIntent","handleFiredIntent"),fireIntentForContext:(0,e.generateOverrideError)("fireIntentForContext","handleFiredIntentForContext"),getInfoForIntent:(0,e.generateOverrideError)("getInfoForIntent","handleInfoForIntent"),getInfoForIntentsByContext:(0,e.generateOverrideError)("getInfoForIntentsByContext","handleInfoForIntentsByContext"),joinSessionContextGroupWithJoinContextGroup:"The Context Group you have tried to join is a Session Context Group. Custom Context Groups can only be defined by the Interop Broker through code or manifest configuration. Please use joinSessionContextGroup.",fdc3Open:(0,e.generateOverrideError)("fdc3.open","fdc3HandleOpen"),fdc3FindInstances:(0,e.generateOverrideError)("fdc3.findInstances","fdc3HandleFindInstances"),fdc3GetAppMetadata:(0,e.generateOverrideError)("fdc3.getAppMetadata","fdc3HandleGetAppMetadata"),fdc3GetInfo:(0,e.generateOverrideError)("fdc3.getInfo","fdc3HandleGetInfo")};e.wrapIntentHandler=(e,t)=>async n=>{try{return e(n)}catch(e){throw console.error(`Error thrown by handler ${t}: ${e}`),e}}}(Hi);var Ni,Di,Ui={};function Vi(){if(Di)return Gi;Di=1;var e,t,n,r=s&&s.__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},o=s&&s.__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)},a=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Gi,"__esModule",{value:!0}),Gi.InteropBroker=void 0;const c=d,h=a(function(){if(Bi)return Wi;Bi=1,Object.defineProperty(Wi,"__esModule",{value:!0});const e=Cr();return Wi.default=class{constructor(e,t){this.provider=e,this.id=t,this.lastContext=void 0,this.contextGroupMap=new Map,this.clients=new Map,this.registerListeners()}registerListeners(){this.provider.register(`sessionContextGroup:getContext-${this.id}`,this.getCurrentContext.bind(this)),this.provider.register(`sessionContextGroup:setContext-${this.id}`,this.setContext.bind(this)),this.provider.register(`sessionContextGroup:handlerAdded-${this.id}`,this.handlerAdded.bind(this)),this.provider.register(`sessionContextGroup:handlerRemoved-${this.id}`,this.handlerRemoved.bind(this))}getCurrentContext(e){return e.type?this.contextGroupMap.get(e.type):this.lastContext}setContext(t,n){const{context:i}=t,r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name} not in Session Client State Map`);this.contextGroupMap.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{e.contextHandlers.get(i.type)?.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getClientState(e){return this.clients.get(e.endpointId)}async handlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(i){const e=r.contextHandlers.get(i)||[];r.contextHandlers.set(i,[...e,n]);const o=this.contextGroupMap.get(i);o&&await this.provider.dispatch(t,n,o)}else{r.globalHandler=n;const e=[...this.contextGroupMap.keys()].map((async e=>{const i=this.contextGroupMap.get(e);i&&await this.provider.dispatch(t,n,i)}));await Promise.all(e)}}handlerRemoved(e,t){const{handlerId:n}=e,i=this.clients.get(t.endpointId);i?(Array.from(i.contextHandlers).forEach((([,e])=>{const t=e.indexOf(n);t>-1&&e.splice(t,1)})),i.globalHandler===n&&(i.globalHandler=void 0)):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={contextHandlers:new Map,clientIdentity:e,globalHandler:void 0};this.clients.set(e.endpointId,t)}}onDisconnection(e){this.clients.delete(e.endpointId)}},Wi}()),l=Hi,u=a(i),p=function(){if(Ni)return Ui;Ni=1,Object.defineProperty(Ui,"__esModule",{value:!0}),Ui.PrivateChannelProvider=void 0;const e=Vi();return Ui.PrivateChannelProvider=class t{constructor(e,t){this.provider=e,this.id=t,this.clients=new Map,this.registerListeners(),this.contextByContextType=new Map,this.lastContext=void 0,this.provider.onConnection((e=>this.registerNewClient(e))),this.provider.onDisconnection((async e=>{const{endpointId:t}=e;this.clients.has(t)&&await this.handleClientDisconnecting(e),0===(await this.provider.getAllClientInfo()).length&&this.provider.destroy()}))}getClientState(e){return this.clients.get(e.endpointId)}registerListeners(){this.provider.register("broadcast",this.broadcast.bind(this)),this.provider.register("getCurrentContext",this.getCurrentContext.bind(this)),this.provider.register("contextHandlerAdded",this.contextHandlerAdded.bind(this)),this.provider.register("contextHandlerRemoved",this.contextHandlerRemoved.bind(this)),this.provider.register("nonStandardHandlerRemoved",this.nonStandardHandlerRemoved.bind(this)),this.provider.register("onAddContextHandlerAdded",this.onAddContextHandlerAdded.bind(this)),this.provider.register("onDisconnectHandlerAdded",this.onDisconnectHandlerAdded.bind(this)),this.provider.register("onUnsubscribeHandlerAdded",this.onUnsubscribeHandlerAdded.bind(this)),this.provider.register("clientDisconnecting",((e,t)=>{this.handleClientDisconnecting(t)}))}broadcast(t,n){const{context:i}=t;if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name}, tried to call broadcast, is not connected to this Private Channel`);const r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to broadcast - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);this.contextByContextType.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{const t=e.handlerIdsByContextTypes.get(i.type);t&&t.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getCurrentContext(e,t){const{contextType:n}=e;if(!this.getClientState(t))throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call getCurrentContext, is not connected to this Private Channel`);if(void 0!==n){return this.contextByContextType.get(n)||null}return this.lastContext?this.lastContext:null}contextHandlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call addContextListener, is not connected to this Private Channel`);if(i){const e=r.handlerIdsByContextTypes.get(i)||[];r.handlerIdsByContextTypes.set(i,[...e,n])}else r.globalHandler=n;Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&e.onAddContextListenerHandlerId&&this.provider.dispatch(e.clientIdentity,e.onAddContextListenerHandlerId,i)}))}async contextHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);if(i){let e;if(i.globalHandler===n)i.globalHandler=void 0;else for(const[t,r]of i.handlerIdsByContextTypes){const i=r.indexOf(n);i>-1&&(r.splice(i,1),e=t)}const r=(await this.getConnectedClients()).map((async n=>{const{clientIdentity:i,clientIdentity:{endpointId:r},onUnsubscribeHandlerId:o}=n;r!==t.endpointId&&o&&await this.provider.dispatch(i,o,e)}));try{await Promise.all(r)}catch(e){throw console.error(`Problem when attempting to dispatch to onUnsubscribeHandlers. Error: ${e} Removing Client: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}`),new Error(e)}}else console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}.`)}nonStandardHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);i?i.onDisconnectHandlerId===n?i.onDisconnectHandlerId=void 0:i.onAddContextListenerHandlerId===n?i.onAddContextListenerHandlerId=void 0:i.onUnsubscribeHandlerId===n&&(i.onUnsubscribeHandlerId=void 0):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}onAddContextHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onAddContextListener, is not connected to this Private Channel`);n.onAddContextListenerHandlerId=i,Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&Array.from(e.handlerIdsByContextTypes.keys()).forEach((e=>{this.provider.dispatch(t,i,e)}))}))}onDisconnectHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onDisconnect, is not connected to this Private Channel`);n.onDisconnectHandlerId=i}onUnsubscribeHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onUnsubscribe, is not connected to this Private Channel`);n.onUnsubscribeHandlerId=i}removeClient(e){const t=this.getClientState(e);if(!t)throw new Error(`Client with Identity: ${e.uuid} ${e.name}, tried to call disconnect, is not connected to this Private Channel`);t.handlerIdsByContextTypes.clear(),this.clients.delete(e.endpointId)}async fireOnDisconnectForOtherClients(e){const{endpointId:t}=e,n=(await this.getConnectedClients()).map((async e=>{const{clientIdentity:{endpointId:n},onDisconnectHandlerId:i}=e;n!==t&&i&&await this.provider.dispatch(e.clientIdentity,i)}));try{await Promise.all(n)}catch(t){throw console.error(`Problem when attempting to dispatch to onDisconnectHandlers. Error: ${t} Disconnecting Client: uuid: ${e.uuid}. name: ${e.name}. endpointId: ${e.endpointId}`),new Error(t)}}async unsubscribeAll(e){const{endpointId:t}=e,n=this.clients.get(t);if(n){const t=Array.from(n.handlerIdsByContextTypes.values()).flat(),i=n.globalHandler;if(t.length>0){const n=t.map((async t=>this.contextHandlerRemoved({handlerId:t},e)));try{await Promise.all(n)}catch(e){console.error(e.message)}}if(i)try{await this.contextHandlerRemoved({handlerId:i},e)}catch(e){console.error(e.message)}}}async handleClientDisconnecting(e){await this.unsubscribeAll(e),this.removeClient(e),await this.fireOnDisconnectForOtherClients(e)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={clientIdentity:e,handlerIdsByContextTypes:new Map,globalHandler:void 0,onAddContextListenerHandlerId:void 0,onUnsubscribeHandlerId:void 0,onDisconnectHandlerId:void 0};this.clients.set(e.endpointId,t)}}async getConnectedClients(){const e=await this.provider.getAllClientInfo();return Array.from(this.clients.values()).filter((t=>{const{uuid:n,name:i}=t.clientIdentity;return e.some((e=>i===e.name&&n===e.uuid))}))}static init(e,n){return new t(e,n)}},Ui}(),w=G,y=[{id:"green",displayMetadata:{color:"#00CC88",name:"green"}},{id:"purple",displayMetadata:{color:"#8C61FF",name:"purple"}},{id:"orange",displayMetadata:{color:"#FF8C4C",name:"orange"}},{id:"red",displayMetadata:{color:"#FF5E60",name:"red"}},{id:"pink",displayMetadata:{color:"#FF8FB8",name:"pink"}},{id:"yellow",displayMetadata:{color:"#E9FF8F",name:"yellow"}}];let f=class i extends c.Base{constructor(i,s,a){super(i),e.set(this,void 0),t.set(this,void 0),n.set(this,void 0),this.getProvider=()=>o(this,n,"f").getValue(),this.interopClients=new Map,this.contextGroupsById=new Map,r(this,t,a.contextGroups??[...y],"f"),r(this,e,a.fdc3Info,"f"),a?.logging&&(this.logging=a.logging),this.intentClientMap=new Map,this.lastContextMap=new Map,this.sessionContextGroupMap=new Map,r(this,n,new w.Lazy(s),"f"),this.setContextGroupMap(),this.setupChannelProvider()}static createClosedConstructor(...e){return class extends i{constructor(...t){if(t.length){const[n,i,r]=t;if(r&&"object"==typeof r&&!(0,u.default)(r,e[2]))return console.warn("You have modified the parameters of the InteropOverride constructor. This behavior is deprecated and will be removed in a future version. You can modify these options in your manifest. Please consult our Interop docs for guidance on migrating to the new override scheme."),void super(e[0],e[1],r);console.warn("You are attempting to pass arguments to the InteropOverride constructor. This is not necessary, and these passed arguments will be ignored. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.")}super(...e)}}}setContext({context:e},t){this.wire.sendAction("interop-broker-set-context").catch((e=>{}));const n=this.getClientState(t);if(!n||!n.contextGroupId)throw n?new Error("You must join a context group before you can set context."):new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);{const{contextGroupId:t}=n;this.setContextForGroup({context:e},t)}}setContextForGroup({context:e},t){this.wire.sendAction("interop-broker-set-context-for-group").catch((e=>{}));const n=this.contextGroupsById.get(t);if(!n)throw new Error(`Unable to set context for context group that isn't in the context group mapping: ${t}.`);const r=i.checkContextIntegrity(e);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(e)}`);const o=e.type;n.set(o,e),this.lastContextMap.set(t,o);Array.from(this.interopClients.values()).filter((e=>e.contextGroupId===t)).forEach((t=>{for(const[,n]of t.contextHandlers)i.isContextTypeCompatible(o,n.contextType)&&this.invokeContextHandler(t.clientIdentity,n.handlerId,e)}))}getCurrentContext(e,t){this.wire.sendAction("interop-broker-get-current-context").catch((e=>{}));const n=this.getClientState(t);if(!n?.contextGroupId)throw new Error("You must be a member of a context group to call getCurrentContext");const{contextGroupId:i}=n,r=this.contextGroupsById.get(i),o=this.lastContextMap.get(i),s=e?.contextType??o;return r&&s?r.get(s):void 0}async joinContextGroup({contextGroupId:e,target:t},n){if(this.wire.sendAction("interop-broker-join-context-group").catch((e=>{})),this.sessionContextGroupMap.has(e))throw new Error(l.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup);if(t){i.hasEndpointId(t)&&await this.addClientToContextGroup({contextGroupId:e},t);try{const n=this.channel.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name));if(!n.length)throw new Error(`Given Identity ${t.uuid} ${t.name} is not connected to the Interop Broker.`);n.length>1&&console.warn(`More than one connection found for identity ${t.uuid} ${t.name}`);const i=[];for(const t of n)i.push(this.addClientToContextGroup({contextGroupId:e},t));await Promise.all(i)}catch(e){throw new Error(e)}}else await this.addClientToContextGroup({contextGroupId:e},n)}async addClientToContextGroup({contextGroupId:e},t){this.wire.sendAction("interop-broker-add-client-to-context-group").catch((e=>{}));const n=this.getClientState(t);if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(!this.getContextGroups().find((t=>t.id===e)))throw new Error(`Attempting to join a context group that does not exist: ${e}. You may only join existing context groups.`);if(n.contextGroupId!==e){n.contextGroupId=e,await this.setCurrentContextGroupInClientOptions(t,e);const i=this.contextGroupsById.get(e);for(const[,e]of n.contextHandlers){const{contextType:n,handlerId:r}=e;if(void 0===n)i.forEach(((e,n)=>{this.invokeContextHandler(t,r,e)}));else if(i.has(n)){const e=i.get(n);e&&this.invokeContextHandler(t,r,e)}}}}async removeFromContextGroup({target:e},t){if(this.wire.sendAction("interop-broker-remove-from-context-group").catch((e=>{})),e){i.hasEndpointId(e)&&await this.removeClientFromContextGroup(e);try{const t=this.channel.connections.filter((t=>t.uuid===e.uuid&&t.name===e.name));if(!t.length)throw new Error(`No connection found for given Identity ${e.uuid} ${e.name}`);t.length>1&&console.warn(`More than one connection found for identity ${e.uuid} ${e.name}`);const n=[];for(const e of t)n.push(this.removeClientFromContextGroup(e));await Promise.all(n)}catch(e){throw new Error(e)}}else await this.removeClientFromContextGroup(t)}async removeClientFromContextGroup(e){this.wire.sendAction("interop-broker-remove-client-from-context-group").catch((e=>{}));const t=this.getClientState(e);t&&(t.contextGroupId=void 0),await this.setCurrentContextGroupInClientOptions(e,null)}getContextGroups(){return this.wire.sendAction("interop-broker-get-context-groups").catch((e=>{})),o(this,t,"f").map((e=>({...e})))}getInfoForContextGroup({contextGroupId:e}){return this.wire.sendAction("interop-broker-get-info-for-context-group").catch((e=>{})),this.getContextGroups().find((t=>t.id===e))}getAllClientsInContextGroup({contextGroupId:e}){this.wire.sendAction("interop-broker-get-all-clients-in-context-group").catch((e=>{}));return Array.from(this.interopClients.values()).filter((t=>t.contextGroupId===e)).map((e=>e.clientIdentity))}async handleFiredIntent(e,t){const n=(0,l.generateOverrideWarning)("fdc3.raiseIntent","InteropBroker.handleFiredIntent",t,"interopClient.fireIntent");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntent)}async setIntentTarget(e,t){this.wire.sendAction("interop-broker-set-intent-target").catch((e=>{}));const n=this.intentClientMap.get(t.name),i=`intent-handler-${e.name}`;if(n){const t=n.get(i);if(t){if(t.pendingIntents.push(e),t.clientIdentity&&t.isReady){const{clientIdentity:e,pendingIntents:n}=t;try{const r=n[n.length-1];await this.invokeIntentHandler(e,i,r),t.pendingIntents=[]}catch(n){console.error(`Error invoking intent handler for client ${e.uuid}/${e.name}/${e.endpointId}`),t.isReady=!1}}}else n.set(i,{isReady:!1,pendingIntents:[e]})}else{this.intentClientMap.set(t.name,new Map);const n=this.intentClientMap.get(t.name);n&&n.set(i,{isReady:!1,pendingIntents:[e]})}}async handleInfoForIntent(e,t){const n=(0,l.generateOverrideWarning)("fdc3.findIntent","InteropBroker.handleInfoForIntent",t,"interopClient.getInfoForIntent");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntent)}async handleInfoForIntentsByContext(e,t){const n=(0,l.generateOverrideWarning)("fdc3.findIntentsByContext","InteropBroker.handleInfoForIntentsByContext",t,"interopClient.getInfoForIntentsByContext");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntentsByContext)}async handleFiredIntentForContext(e,t){const n=(0,l.generateOverrideWarning)("fdc3.raiseIntentForContext","InteropBroker.handleFiredIntentForContext",t,"interopClient.fireIntentForContext");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntentForContext)}async clientDisconnected(e){}async fdc3HandleOpen({app:e,context:t},n){const i=(0,l.generateOverrideWarning)("fdc3.open","InteropBroker.fdc3HandleOpen",n);throw console.warn(i),new Error(l.BROKER_ERRORS.fdc3Open)}async fdc3HandleFindInstances(e,t){const n=(0,l.generateOverrideWarning)("fdc3.open","InteropBroker.fdc3HandleFindInstances",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3FindInstances)}async fdc3HandleGetAppMetadata(e,t){const n=(0,l.generateOverrideWarning)("fdc3.getAppMetadata","InteropBroker.fdc3HandleGetAppMetadata",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3GetAppMetadata)}async invokeContextHandler(e,t,n){const i=await this.getProvider();try{await i.dispatch(e,t,n)}catch(i){console.error(`Error invoking context handler ${t} for context type ${n.type} in client ${e.uuid}/${e.name}/${e.endpointId}`,i)}}async invokeIntentHandler(e,t,n){const i=await this.getProvider();await i.dispatch(e,t,n)}async fdc3HandleGetInfo(t,n){const{fdc3Version:i}=t;return{fdc3Version:i,...o(this,e,"f"),optionalFeatures:{OriginatingAppMetadata:!1,UserChannelMembershipAPIs:!0},appMetadata:{appId:"",instanceId:""}}}async getAllClientInfo(){return(await this.getProvider()).getAllClientInfo()}decorateSnapshot(e){return{...e,interopSnapshotDetails:{contextGroupStates:this.getContextGroupStates()}}}applySnapshot(e,t){const n=e?.interopSnapshotDetails?.contextGroupStates;n&&(t?.closeExistingWindows||this.updateExistingClients(n),this.rehydrateContextGroupStates(n))}updateExistingClients(e){this.interopClients.forEach((t=>{const{clientIdentity:n,contextGroupId:r,contextHandlers:o}=t;if(r){const t=e[r];for(const[,e]of Object.entries(t))o.forEach((t=>{const{handlerId:r,contextType:o}=t;i.isContextTypeCompatible(e.type,o)&&this.invokeContextHandler(n,r,e)}))}}))}getContextGroupStates(){return i.toObject(this.contextGroupsById)}rehydrateContextGroupStates(e){const t=Object.entries(e);for(const[e,n]of t){const t=Object.entries(n);for(const[n,i]of t)if(this.contextGroupsById.has(e)){this.contextGroupsById.get(e).set(n,i)}else console.warn(`Attempting to set a context group that isn't in the context group mapping. Skipping context group rehydration for: ${e}`)}}contextHandlerRegistered({contextType:e,handlerId:t},n){const i={contextType:e,handlerId:t},r=this.getClientState(n);if(r?.contextHandlers.set(t,i),r&&r.contextGroupId){const{contextGroupId:i}=r,o=this.contextGroupsById.get(i);if(void 0===e)o.forEach(((e,i)=>{this.invokeContextHandler(n,t,e)}));else if(o.has(e)){const i=o.get(e);i&&this.invokeContextHandler(n,t,i)}}}async intentHandlerRegistered(e,t){const{handlerId:n}=e,i=this.intentClientMap.get(t.name),r=i?.get(n);if(i)if(r){const{pendingIntents:e}=r;r.clientIdentity=t,r.isReady=!0;try{if(e.length>0){const i=e[e.length-1];await this.invokeIntentHandler(t,n,i),r.pendingIntents=[]}}catch(e){console.error(`Error invoking intent handler: ${n} for client ${t.uuid}/${t.name}/${t.endpointId}`)}}else i.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t});else{this.intentClientMap.set(t.name,new Map);const e=this.intentClientMap.get(t.name);e&&e.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t})}}removeContextHandler({handlerId:e},t){const n=this.getClientState(t);n&&n.contextHandlers.delete(e)}handleJoinSessionContextGroup({sessionContextGroupId:e},t){try{if(!e)throw new Error("Failed to join session context group: must specify group id.");const n=this.sessionContextGroupMap.get(e);if(n)n.registerNewClient(t);else{const n=new h.default(this.channel,e);n.registerNewClient(t),this.sessionContextGroupMap.set(e,n)}return{hasConflict:this.contextGroupsById.has(e)}}catch(e){throw new Error(e)}}getClientState(e){return this.interopClients.get(e.endpointId)}static toObject(e){const t=Object.fromEntries(e),n={};return Object.entries(t).forEach((([e,t])=>{const i=Object.fromEntries(t);n[e]=i})),n}static checkContextIntegrity(e){if(!e)return{isValid:!1,reason:"No context supplied"};if("object"!=typeof e)return{isValid:!1,reason:"Context must be an Object"};if(!e.type)return{isValid:!1,reason:"Context must have a type property"};if(e.id&&"object"!=typeof e.id)return{isValid:!1,reason:"Context id must be an Object populated with key-value identifiers (if set)"};if(e.id){const{id:t}=e,n=Object.keys(t);let i=!1;if(!n.length)return{isValid:!1,reason:"Context id must have at least one key-value identifier"};if(n.forEach((e=>{"string"==typeof e&&"string"==typeof t[e]||(i=!0)})),i)return{isValid:!1,reason:"Context id key-value identifiers must be of type string"}}return e.name&&"string"!=typeof e.name?{isValid:!1,reason:"Context name must be of string type (if set)"}:{isValid:!0}}static hasEndpointId(e){return void 0!==e.endpointId}static isContextTypeCompatible(e,t){return void 0===t||e===t}setContextGroupMap(){for(const e of this.getContextGroups())this.contextGroupsById.set(e.id,new Map)}async setCurrentContextGroupInClientOptions(e,t){try{const n=await this.fin.System.getEntityInfo(e.uuid,e.name);let i;"view"===n.entityType?i=await this.fin.View.wrap(e):"window"===n.entityType&&(i=await this.fin.Window.wrap(e)),i&&await i.updateOptions({interop:{currentContextGroup:t}})}catch(e){}}async setupChannelProvider(){try{const e=await this.getProvider();this.channel=e,this.wireChannel(e)}catch(e){throw new Error(`Error setting up Interop Broker Channel Provider: ${e}`)}}wireChannel(e){e.onConnection((async(e,t)=>{if(!await this.isConnectionAuthorized(e,t))throw new Error(`Connection not authorized for ${e.uuid}, ${e.name}`);if(!e.endpointId)throw new Error("Version too old to be compatible with Interop. Please upgrade your runtime to a more recent version.");const n={contextGroupId:void 0,contextHandlers:new Map,clientIdentity:e};t?.currentContextGroup&&this.contextGroupsById.has(t.currentContextGroup)&&(n.contextGroupId=t?.currentContextGroup),this.interopClients.set(e.endpointId,n)})),e.onDisconnection((e=>{this.interopClients.delete(e.endpointId);const t=this.intentClientMap.get(e.name);t&&e.uuid===this.fin.me.uuid&&t.forEach((e=>{e.isReady=!1})),this.sessionContextGroupMap.forEach((t=>{t.onDisconnection(e)})),this.clientDisconnected(e)})),e.beforeAction((async(e,t,n)=>{if(!await this.isActionAuthorized(e,t,n))throw new Error(`Action (${e}) not authorized for ${n.uuid}, ${n.name}`);this.logging?.beforeAction?.enabled&&console.log(e,t,n)})),e.afterAction(((e,t,n)=>{this.logging?.afterAction?.enabled&&console.log(e,t,n)})),e.register("setContext",this.setContext.bind(this)),e.register("fireIntent",this.handleFiredIntent.bind(this)),e.register("getCurrentContext",this.getCurrentContext.bind(this)),e.register("getInfoForIntent",this.handleInfoForIntent.bind(this)),e.register("getInfoForIntentsByContext",this.handleInfoForIntentsByContext.bind(this)),e.register("fireIntentForContext",this.handleFiredIntentForContext.bind(this)),e.register("getContextGroups",this.getContextGroups.bind(this)),e.register("joinContextGroup",this.joinContextGroup.bind(this)),e.register("removeFromContextGroup",this.removeFromContextGroup.bind(this)),e.register("getAllClientsInContextGroup",this.getAllClientsInContextGroup.bind(this)),e.register("getInfoForContextGroup",this.getInfoForContextGroup.bind(this)),e.register("contextHandlerRegistered",this.contextHandlerRegistered.bind(this)),e.register("intentHandlerRegistered",this.intentHandlerRegistered.bind(this)),e.register("removeContextHandler",this.removeContextHandler.bind(this)),e.register("sessionContextGroup:createIfNeeded",this.handleJoinSessionContextGroup.bind(this)),e.register("fdc3Open",this.fdc3HandleOpen.bind(this)),e.register("fdc3v2FindIntentsByContext",this.handleInfoForIntentsByContext.bind(this)),e.register("fdc3FindInstances",this.fdc3HandleFindInstances.bind(this)),e.register("fdc3GetAppMetadata",this.fdc3HandleGetAppMetadata.bind(this)),e.register("fdc3v2GetInfo",(async(e,t)=>this.fdc3HandleGetInfo.bind(this)(e,t))),e.register("createPrivateChannelProvider",(async e=>{const{channelId:t}=e,n=await this.fin.InterApplicationBus.Channel.create(t);p.PrivateChannelProvider.init(n,t)}))}isConnectionAuthorized(e,t){return this.wire.sendAction("interop-broker-is-connection-authorized").catch((e=>{})),Promise.resolve(!0)}isActionAuthorized(e,t,n){return this.wire.sendAction("interop-broker-is-action-authorized").catch((e=>{})),Promise.resolve(!0)}};return Gi.InteropBroker=f,e=new WeakMap,t=new WeakMap,n=new WeakMap,Gi}var zi,Ki={},qi={},Ji=s&&s.__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},Yi=s&&s.__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)};Object.defineProperty(qi,"__esModule",{value:!0});const Zi=d,Qi=Hi;class Xi extends Zi.Base{constructor(e,t,n){super(e),zi.set(this,void 0),this.id=n,Ji(this,zi,t,"f")}async setContext(e){this.wire.sendAction("interop-session-context-group-set-context").catch((e=>{}));return(await Yi(this,zi,"f")).dispatch(`sessionContextGroup:setContext-${this.id}`,{sessionContextGroupId:this.id,context:e})}async getCurrentContext(e){this.wire.sendAction("interop-session-context-group-get-context").catch((e=>{}));return(await Yi(this,zi,"f")).dispatch(`sessionContextGroup:getContext-${this.id}`,{sessionContextGroupId:this.id,type:e})}async addContextHandler(e,t){if(this.wire.sendAction("interop-session-context-group-add-handler").catch((e=>{})),"function"!=typeof e)throw new Error("Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");const n=await Yi(this,zi,"f");let i;return i=t?`sessionContextHandler:invoke-${this.id}-${t}-${(0,Qi.generateId)()}`:`sessionContextHandler:invoke-${this.id}`,n.register(i,(0,Qi.wrapContextHandler)(e,i)),await n.dispatch(`sessionContextGroup:handlerAdded-${this.id}`,{handlerId:i,contextType:t}),{unsubscribe:await this.createUnsubscribeCb(i)}}async createUnsubscribeCb(e){const t=await Yi(this,zi,"f");return async()=>{t.remove(e),await t.dispatch(`sessionContextGroup:handlerRemoved-${this.id}`,{handlerId:e})}}getUserInstance(){return{id:this.id,setContext:(0,Qi.wrapInTryCatch)(this.setContext.bind(this),"Failed to set context: "),getCurrentContext:(0,Qi.wrapInTryCatch)(this.getCurrentContext.bind(this),"Failed to get context: "),addContextHandler:(0,Qi.wrapInTryCatch)(this.addContextHandler.bind(this),"Failed to add context handler: ")}}}qi.default=Xi,zi=new WeakMap;var er={},tr={},nr={},ir={},rr=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),or=s&&s.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),sr=s&&s.__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)&&rr(t,e,n);return or(t,e),t};Object.defineProperty(ir,"__esModule",{value:!0}),ir.PrivateChannelClient=void 0;const ar=sr(Hi);var cr,dr;function hr(){if(cr)return tr;cr=1;var e,t=s&&s.__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)},n=s&&s.__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},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(tr,"__esModule",{value:!0}),tr.FDC3ModuleBase=void 0;const o=nr,a=Hi,c=wr(),d=r(i);return tr.FDC3ModuleBase=class{get client(){return t(this,e,"f").call(this)}get fin(){return this.wire.getFin()}constructor(t,i){this.wire=i,e.set(this,void 0),n(this,e,t,"f")}async broadcast(e){return this.wire.sendAction("fdc3-broadcast").catch((e=>{})),this.client.setContext(e)}async _open(e,t){this.wire.sendAction("fdc3-open").catch((e=>{}));try{return await c.InteropClient.ferryFdc3Call(this.client,"fdc3Open",{app:e,context:t})}catch(e){const t=e.message===a.BROKER_ERRORS.fdc3Open?"ResolverUnavailable":e.message;throw new Error(t)}}async _getChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:"system",...(0,o.getUnsupportedChannelApis)()})))}async getOrCreateChannel(e){this.wire.sendAction("fdc3-get-or-create-channel").catch((e=>{}));const t=(await this._getChannels()).find((t=>t.id===e));if(t)return{...t,type:"system",...(0,o.getUnsupportedChannelApis)()};try{const t=await this.client.joinSessionContextGroup(e);return(0,o.buildAppChannelObject)(t)}catch(e){throw console.error(e.message),new Error(o.ChannelError.CreationFailed)}}async getSystemChannels(){return this.wire.sendAction("fdc3-get-system-channels").catch((e=>{})),this._getChannels()}async joinChannel(e){this.wire.sendAction("fdc3-join-channel").catch((e=>{}));try{return await this.client.joinContextGroup(e)}catch(e){if(e.message===a.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup?console.error("The Channel you have tried to join is an App Channel. Custom Channels can only be defined by the Interop Broker through code or manifest configuration. Please use getOrCreateChannel."):console.error(e.message),e.message.startsWith("Attempting to join a context group that does not exist"))throw new Error(o.ChannelError.NoChannelFound);throw new Error(o.ChannelError.AccessDenied)}}async getCurrentChannel(){this.wire.sendAction("fdc3-get-current-channel").catch((e=>{}));const e=await this.getCurrentContextGroupInfo();return e?this.buildChannelObject(e):null}async leaveCurrentChannel(){return this.wire.sendAction("fdc3-leave-current-channel").catch((e=>{})),this.client.removeFromContextGroup()}async getCurrentContextGroupInfo(){const e=await this.client.getContextGroups(),t=e.map((async e=>this.client.getAllClientsInContextGroup(e.id))),n=(await Promise.all(t)).findIndex((e=>e.some((e=>{const{uuid:t,name:n}=e;return this.wire.me.uuid===t&&this.wire.me.name===n}))));return e[n]}async buildChannelObject(e){return{...e,type:"system",addContextListener:(...[e,t])=>{let n,i;"function"==typeof e?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),n=e):(n=t,"string"==typeof e&&(i=e));const r=(async()=>{let e=!0;const t=await this.client.getCurrentContext(i);return this.client.addContextHandler(((i,r)=>{if(!e||(e=!1,!(0,d.default)(t,i)))return n(i,r)}),i)})();return{...r,unsubscribe:()=>r.then((e=>e.unsubscribe()))}},broadcast:this.broadcast.bind(this),getCurrentContext:async e=>{const t=await this.client.getCurrentContext(e);return void 0===t?null:t}}}},e=new WeakMap,tr}ir.PrivateChannelClient=class{constructor(e,t){this.id=t,this.client=e,this.listeners=new Map}async broadcast(e){return this.client.dispatch("broadcast",{context:e})}async getCurrentContext(e){return this.client.dispatch("getCurrentContext",{contextType:e})}async addContextListener(e,t){if("function"!=typeof t)throw new Error("Non-function argument passed to the second parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");let n;n=e?`contextHandler:invoke-${this.id}-${e}-${ar.generateId()}`:`contextHandler:invoke-${this.id}-${ar.generateId()}`,this.client.register(n,ar.wrapContextHandler(t,n));const i={unsubscribe:await this.createContextUnsubscribeCb(n)};return this.listeners.set(n,i),await this.client.dispatch("contextHandlerAdded",{handlerId:n,contextType:e}),i}createNonStandardUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch("nonStandardHandlerRemoved",{handlerId:e})}}createContextUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch("contextHandlerRemoved",{handlerId:e})}}onAddContextListener(e){const t=`onContextHandlerAdded:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch("onAddContextHandlerAdded",{handlerId:t}),n}onDisconnect(e){const t=`onDisconnect:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch("onDisconnectHandlerAdded",{handlerId:t}),n}onUnsubscribe(e){const t=`onUnsubscribe:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch("onUnsubscribeHandlerAdded",{handlerId:t}),n}async cleanUpAllSubs(){Array.from(this.listeners.keys()).forEach((e=>{this.client.remove(e),this.listeners.delete(e)}))}async disconnect(){try{await this.client.dispatch("clientDisconnecting"),await this.cleanUpAllSubs(),await this.client.disconnect()}catch(e){throw new Error(e.message)}}},function(e){var t=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.getIntentResolution=e.isChannel=e.isContext=e.connectPrivateChannel=e.buildAppChannelObject=e.buildPrivateChannelObject=e.ChannelError=e.ResultError=e.UnsupportedChannelApiError=e.getUnsupportedChannelApis=void 0;const n=Hi,r=ir,o=t(i);e.getUnsupportedChannelApis=e=>({addContextListener:()=>{throw new a("Channel.addContextListener",e)},broadcast:()=>{throw new a("Channel.broadcast",e)},getCurrentContext:()=>{throw new a("Channel.getCurrentContext",e)}});class a extends Error{constructor(e,t="System"){super(e),this.message=`Calling ${e} on an instance of a ${t} Channel returned by fdc3.get${t}Channels is not supported. If you would like to use a ${t} Channel, please use fdc3.joinChannel, fdc3.addContextListener, and fdc3.broadcast instead.`}}var c,d;e.UnsupportedChannelApiError=a,function(e){e.NoResultReturned="NoResultReturned",e.IntentHandlerRejected="IntentHandlerRejected"}(c=e.ResultError||(e.ResultError={})),(d=e.ChannelError||(e.ChannelError={})).NoChannelFound="NoChannelFound",d.AccessDenied="AccessDenied",d.CreationFailed="CreationFailed";e.buildPrivateChannelObject=e=>{let t=!1;const n=()=>{if(t)throw new Error("Private Channel Client has been disconnected from the Private Channel")};return{id:e.id,type:"private",broadcast:async t=>(n(),e.broadcast(t)),getCurrentContext:async t=>(n(),e.getCurrentContext(t)),addContextListener:async(t,i)=>{n();let r=i,o=t;"function"==typeof t&&(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),r=t,o=null);return e.addContextListener(o,r)},onAddContextListener:t=>(n(),e.onAddContextListener(t)),disconnect:async()=>(n(),t=!0,e.disconnect()),onDisconnect:t=>(n(),e.onDisconnect(t)),onUnsubscribe:t=>(n(),e.onUnsubscribe(t))}};e.buildAppChannelObject=e=>({id:e.id,type:"app",broadcast:e.setContext,getCurrentContext:async t=>{const n=await e.getCurrentContext(t);return void 0===n?null:n},addContextListener:(t,n)=>{let i,r;"function"==typeof t?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),i=t):(i=n,"string"==typeof t&&(r=t));const s=(async()=>{let t=!0;const n=await e.getCurrentContext(r);return e.addContextHandler(((e,r)=>{if(!t||(t=!1,!(0,o.default)(n,e)))return i(e,r)}),r)})();return{...s,unsubscribe:()=>s.then((e=>e.unsubscribe()))}}});e.connectPrivateChannel=async t=>{try{const n=await fin.InterApplicationBus.Channel.connect(t),i=new r.PrivateChannelClient(n,t);return(0,e.buildPrivateChannelObject)(i)}catch(e){throw new Error(`Private Channel with id: ${t} doesn't exist`)}};e.isContext=e=>{if(e&&"object"==typeof e&&"type"in e){const{type:t}=e;return"string"==typeof t}return!1};e.isChannel=e=>{if(e&&"object"==typeof e&&"type"in e&&"id"in e){const{type:t,id:n}=e;return"string"==typeof t&&"string"==typeof n&&("app"===t||"private"===t)}return!1};e.getIntentResolution=async(t,i,r,o)=>{const s=(0,n.generateId)(),a=new Promise(((e,t)=>{fin.InterApplicationBus.subscribe({uuid:"*"},s,(t=>{e(t)})).catch((()=>t(new Error("getResult is not supported in this environment"))))})),d=r?{target:r,intentResolutionResultId:s}:{intentResolutionResultId:s},h=o?{name:o,context:i,metadata:d}:{...i,metadata:d},l=async()=>{let n=await a;if(!n||"object"!=typeof n)throw new Error(c.NoResultReturned);const{error:i}=n;if(i)throw new Error(c.IntentHandlerRejected);if((0,e.isChannel)(n)){const{id:i,type:r}=n;switch(r){case"private":n=await(0,e.connectPrivateChannel)(i);break;case"app":{const r=await t.joinSessionContextGroup(i);n=(0,e.buildAppChannelObject)(r);break}}}else if(!(0,e.isContext)(n))throw new Error(c.NoResultReturned);return n},u=o?await t.fireIntent(h):await t.fireIntentForContext(h);return"object"!=typeof u?{source:{appId:"",instanceId:""},intent:"",version:"2.0",getResult:l}:{...u,getResult:l}}}(nr);var lr,ur,pr={};function wr(){if(ur)return Ki;ur=1;var e,t,n=s&&s.__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},i=s&&s.__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)},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ki,"__esModule",{value:!0}),Ki.InteropClient=void 0;const o=d,a=r(qi),c=function(){if(dr)return er;dr=1,Object.defineProperty(er,"__esModule",{value:!0}),er.Fdc3Module=void 0;const e=Hi,t=hr();class n extends t.FDC3ModuleBase{async open(e,t){await super._open(e,t)}addContextListener(e,t){let n;return this.wire.sendAction("fdc3-add-context-listener").catch((e=>{})),"function"==typeof e?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),n=this.client.addContextHandler(e)):n=this.client.addContextHandler(t,null===e?void 0:e),{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}addIntentListener(e,t){this.wire.sendAction("fdc3-add-intent-listener").catch((e=>{}));const n=this.client.registerIntentHandler((e=>{const{context:n,metadata:i}=e,{metadata:r}=n,o=i?.intentResolutionResultId||r?.intentResolutionResultId;o&&this.fin.InterApplicationBus.publish(o,null).catch((()=>null)),t(e.context)}),e,{fdc3Version:"1.2"});return{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}async raiseIntent(t,n,i){this.wire.sendAction("fdc3-raise-intent").catch((e=>{}));const r=i?{name:t,context:n,metadata:{target:i}}:{name:t,context:n};try{return await this.client.fireIntent(r)}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntent?"ResolverUnavailable":t.message;throw new Error(n)}}async findIntent(t,n){this.wire.sendAction("fdc3-find-intent").catch((e=>{}));try{return await this.client.getInfoForIntent({name:t,context:n})}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntent?"ResolverUnavailable":t.message;throw new Error(n)}}async findIntentsByContext(t){this.wire.sendAction("fdc3-find-intents-by-context").catch((e=>{}));try{return await this.client.getInfoForIntentsByContext(t)}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntentsByContext?"ResolverUnavailable":t.message;throw new Error(n)}}async raiseIntentForContext(t,n){this.wire.sendAction("fdc3-raise-intent-for-context").catch((e=>{}));try{return await this.client.fireIntentForContext({...t,metadata:{target:n}})}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntentForContext?"ResolverUnavailable":t.message;throw new Error(n)}}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}getInfo(){return this.wire.sendAction("fdc3-get-info").catch((e=>{})),{providerVersion:this.wire.environment.getAdapterVersionSync(),provider:`openfin-${this.wire.me.uuid}`,fdc3Version:"1.2"}}}return er.Fdc3Module=n,er}(),h=function(){if(lr)return pr;lr=1,Object.defineProperty(pr,"__esModule",{value:!0}),pr.Fdc3Module2=void 0;const e=hr(),t=Hi,n=wr(),i=nr,r=ir;class o extends e.FDC3ModuleBase{async open(e,t){return"string"==typeof e&&console.warn("Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string })."),super._open(e,t)}async findInstances(e){this.wire.sendAction("fdc3-find-instances").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,"fdc3FindInstances",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3FindInstances?"ResolverUnavailable":e.message;throw new Error(n)}}async getAppMetadata(e){this.wire.sendAction("fdc3-get-app-metadata").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,"fdc3GetAppMetadata",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3GetAppMetadata?"ResolverUnavailable":e.message;throw new Error(n)}}async addContextListener(e,t){this.wire.sendAction("fdc3-add-context-listener").catch((e=>{}));const n=e=>t=>{const{contextMetadata:n,...i}=t,r=n?[{...i},n]:[t,null];e(...r)};let i=t,r=n(i);return"function"==typeof e?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),i=e,r=n(i),this.client.addContextHandler(r)):this.client.addContextHandler(r,null===e?void 0:e)}async findIntent(e,n,i){this.wire.sendAction("fdc3-find-intent").catch((e=>{}));try{return await this.client.getInfoForIntent({name:e,context:n,metadata:{resultType:i}})}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntent?"ResolverUnavailable":e.message;throw new Error(n)}}async findIntentsByContext(e,i){this.wire.sendAction("fdc3-find-intents-by-context").catch((e=>{}));const r=i?{context:e,metadata:{resultType:i}}:e;try{return await n.InteropClient.ferryFdc3Call(this.client,"fdc3v2FindIntentsByContext",r)}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntentsByContext?"ResolverUnavailable":e.message;throw new Error(n)}}async raiseIntent(e,n,r){this.wire.sendAction("fdc3-raise-intent").catch((e=>{}));try{return"string"==typeof r&&console.warn("Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string })."),(0,i.getIntentResolution)(this.client,n,r,e)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?"ResolverUnavailable":e.message;throw new Error(n)}}async raiseIntentForContext(e,n){this.wire.sendAction("fdc3-raise-intent-for-context").catch((e=>{}));try{return"string"==typeof n&&console.warn("Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string })."),(0,i.getIntentResolution)(this.client,e,n)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?"ResolverUnavailable":e.message;throw new Error(n)}}async addIntentListener(e,t){if(this.wire.sendAction("fdc3-add-intent-listener").catch((e=>{})),"string"!=typeof e)throw new Error("First argument must be an Intent name");return this.client.registerIntentHandler((async e=>{let n,i;const{context:r,metadata:o}=e,{contextMetadata:s,metadata:a,...c}=r,d=o?.intentResolutionResultId||a?.intentResolutionResultId;try{const e=a?{metadata:a,...c}:{...c};n=await t(e,s),i=n}catch(e){n=e,i={error:!0}}if(d&&this.fin.InterApplicationBus.publish(d,i).catch((()=>null)),n instanceof Error)throw new Error(n.message);return n}),e,{fdc3Version:"2.0"})}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}async createPrivateChannel(){const e=(0,t.generateId)();await n.InteropClient.ferryFdc3Call(this.client,"createPrivateChannelProvider",{channelId:e});const o=await this.fin.InterApplicationBus.Channel.connect(e),s=new r.PrivateChannelClient(o,e);return(0,i.buildPrivateChannelObject)(s)}async getUserChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:"user",...(0,i.getUnsupportedChannelApis)("User")})))}async getSystemChannels(){return console.warn("This API has been deprecated. Please use fdc3.getUserChannels instead."),super.getSystemChannels()}async joinUserChannel(e){return super.joinChannel(e)}async joinChannel(e){return console.warn("This API has been deprecated. Please use fdc3.joinUserChannel instead."),super.joinChannel(e)}async getCurrentChannel(){const e=await super.getCurrentChannel();return e?{...e,type:"user",broadcast:this.broadcast.bind(this)}:null}async getInfo(){return n.InteropClient.ferryFdc3Call(this.client,"fdc3v2GetInfo",{fdc3Version:"2.0"})}}return pr.Fdc3Module2=o,pr}(),l=Hi;let u=class extends o.Base{constructor(i,r){super(i),e.set(this,void 0),t.set(this,void 0),n(this,t,new Map,"f"),n(this,e,r,"f")}async setContext(t){this.wire.sendAction("interop-client-set-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("setContext",{context:t})}async addContextHandler(t,n){if(this.wire.sendAction("interop-client-add-context-handler").catch((e=>{})),"function"!=typeof t)throw new Error("Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");const r=await i(this,e,"f");let o;o=n?`invokeContextHandler-${n}-${(0,l.generateId)()}`:"invokeContextHandler";const s=(0,l.wrapContextHandler)(t,o);return r.register(o,s),await r.dispatch("contextHandlerRegistered",{handlerId:o,contextType:n}),{unsubscribe:async()=>{r.remove(o),await r.dispatch("removeContextHandler",{handlerId:o})}}}async getContextGroups(){this.wire.sendAction("interop-client-get-context-groups").catch((e=>{}));return(await i(this,e,"f")).dispatch("getContextGroups")}async joinContextGroup(t,n){this.wire.sendAction("interop-client-join-context-group").catch((e=>{}));const r=await i(this,e,"f");if(!t)throw new Error("No contextGroupId specified for joinContextGroup.");return r.dispatch("joinContextGroup",{contextGroupId:t,target:n})}async removeFromContextGroup(t){this.wire.sendAction("interop-client-remove-from-context-group").catch((e=>{}));return(await i(this,e,"f")).dispatch("removeFromContextGroup",{target:t})}async getAllClientsInContextGroup(t){this.wire.sendAction("interop-client-get-all-clients-in-context-group").catch((e=>{}));const n=await i(this,e,"f");if(!t)throw new Error("No contextGroupId specified for getAllClientsInContextGroup.");return n.dispatch("getAllClientsInContextGroup",{contextGroupId:t})}async getInfoForContextGroup(t){this.wire.sendAction("interop-client-get-info-for-context-group").catch((e=>{}));const n=await i(this,e,"f");if(!t)throw new Error("No contextGroupId specified for getInfoForContextGroup.");return n.dispatch("getInfoForContextGroup",{contextGroupId:t})}async fireIntent(t){this.wire.sendAction("interop-client-fire-intent").catch((e=>{}));return(await i(this,e,"f")).dispatch("fireIntent",t)}async registerIntentHandler(t,n,r){this.wire.sendAction("interop-client-register-intent-handler").catch((e=>{}));const o=await i(this,e,"f"),s=`intent-handler-${n}`,a=(0,l.wrapIntentHandler)(t,s);try{await o.register(s,a),await o.dispatch("intentHandlerRegistered",{handlerId:s,...r})}catch(e){throw new Error("Unable to register intent handler")}return{unsubscribe:async()=>{o.remove(s)}}}async getCurrentContext(t){this.wire.sendAction("interop-client-get-current-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("getCurrentContext",{contextType:t})}async getInfoForIntent(t){this.wire.sendAction("interop-client-get-info-for-intent").catch((e=>{}));return(await i(this,e,"f")).dispatch("getInfoForIntent",t)}async getInfoForIntentsByContext(t){this.wire.sendAction("interop-client-get-info-for-intents-by-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("getInfoForIntentsByContext",t)}async fireIntentForContext(t){this.wire.sendAction("interop-client-fire-intent-for-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("fireIntentForContext",t)}async joinSessionContextGroup(n){try{const r=i(this,t,"f").get(n);if(r)return r.getUserInstance();const o=await i(this,e,"f"),{hasConflict:s}=await o.dispatch("sessionContextGroup:createIfNeeded",{sessionContextGroupId:n});s&&console.warn(`A (non-session) context group with the name "${n}" already exists. If you are trying to join a Context Group, call joinContextGroup instead.`);const c=new a.default(this.wire,i(this,e,"f"),n);return i(this,t,"f").set(n,c),c.getUserInstance()}catch(e){throw console.error(`Error thrown trying to create Session Context Group with id "${n}": ${e}`),e}}async onDisconnection(t){this.wire.sendAction("interop-client-add-ondisconnection-listener").catch((e=>{}));return(await i(this,e,"f")).onDisconnection((e=>{const{uuid:n}=e;t({type:"interop-broker",topic:"disconnected",brokerName:n})}))}getFDC3Sync(e){switch(e){case"1.2":return new c.Fdc3Module((()=>this),this.wire);case"2.0":return new h.Fdc3Module2((()=>this),this.wire);default:throw new Error(`Invalid FDC3 version provided: ${e}. Must be '1.2' or '2.0'`)}}async getFDC3(e){return this.getFDC3Sync(e)}static async ferryFdc3Call(t,n,r){return(await i(t,e,"f")).dispatch(n,r||null)}};return Ki.InteropClient=u,e=new WeakMap,t=new WeakMap,Ki}var yr,fr,gr,mr={};function vr(){if(yr)return mr;yr=1,Object.defineProperty(mr,"__esModule",{value:!0}),mr.overrideCheck=mr.checkFDC32Overrides=mr.getDefaultViewFdc3VersionFromAppInfo=void 0;const e=Vi();function t(t){return["fdc3HandleFindInstances","handleInfoForIntent","handleInfoForIntentsByContext","fdc3HandleGetAppMetadata","fdc3HandleGetInfo","fdc3HandleOpen","handleFiredIntent","handleFiredIntentForContext"].filter((n=>t[n]===e.InteropBroker.prototype[n]))}return mr.getDefaultViewFdc3VersionFromAppInfo=function({manifest:e,initialOptions:t}){const n=e?.platform?.defaultViewOptions?.fdc3InteropApi??t.defaultViewOptions?.fdc3InteropApi;return["1.2","2.0"].includes(n??"")?n:void 0},mr.checkFDC32Overrides=t,mr.overrideCheck=function(e,n){if(n&&"2.0"===n){const n=t(e);n.length>0&&console.warn(`WARNING: FDC3 2.0 has been set as a default option for Views in this Platform, but the required InteropBroker APIs for FDC3 2.0 compliance have not all been overridden.\nThe following APIs need to be overridden:\n${n.join("\n")}`)}},mr}function Cr(){return gr||(gr=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),i=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),i(function(){if(fr)return Ti;fr=1;var e=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ti,"__esModule",{value:!0}),Ti.InteropModule=void 0;const t=e(n),i=$i,r=d,o=Vi(),a=wr(),c=vr(),h=Tn,l=e=>new e,u="You have attempted to use or modify InteropBroker parameters, which is not allowed. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.";class p extends r.Base{async init(e,n=l){this.wire.sendAction("interop-init").catch((()=>{}));const r=await this.wire.environment.getInteropInfo(this.wire.getFin()),s=(0,i.createUnusableObject)(u),a=(0,i.createWarningObject)(u,(0,t.default)(r)),d=async()=>{throw new Error(u)},p=o.InteropBroker.createClosedConstructor(this.wire,(()=>this.fin.InterApplicationBus.Channel.create(`interop-broker-${e}`)),r);let w;return w=Array.isArray(n)?new((0,h.overrideFromComposables)(...n)(p))(s,d,a):await n(p,s,d,a),(0,c.overrideCheck)(w,r.fdc3Version),w}connectSync(e,t){return this.wire.sendAction("interop-connect-sync").catch((()=>{})),new a.InteropClient(this.wire,this.wire.environment.whenReady().then((()=>this.fin.InterApplicationBus.Channel.connect(`interop-broker-${e}`,{payload:t}))))}}return Ti.InteropModule=p,Ti}(),e),i(wr(),e),i(Vi(),e)}(Li)),Li}var br={},Ir={},Er={},xr={};Object.defineProperty(xr,"__esModule",{value:!0}),xr.getSnapshotSourceChannelName=void 0;xr.getSnapshotSourceChannelName=e=>`snapshot-source-provider-${e.uuid}`;var Ar,Pr,Mr,_r,Or,Sr=s&&s.__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},Rr=s&&s.__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)};Object.defineProperty(Er,"__esModule",{value:!0}),Er.SnapshotSource=void 0;const Fr=d,jr=xr,kr=new Map;class Lr extends Fr.Base{constructor(e,t){super(e),Ar.set(this,void 0),Pr.set(this,(()=>(kr.has(this.identity.uuid)||kr.set(this.identity.uuid,{eventFired:null,clientPromise:null}),kr.get(this.identity.uuid)))),Mr.set(this,(()=>(Rr(this,Pr,"f").call(this).clientPromise||(Rr(this,Pr,"f").call(this).clientPromise=Rr(this,_r,"f").call(this)),Rr(this,Pr,"f").call(this).clientPromise))),_r.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);try{Rr(this,Pr,"f").call(this).eventFired||await Rr(this,Or,"f").call(this);const t=await this.fin.InterApplicationBus.Channel.connect(e,{wait:!1});return t.onDisconnection((()=>{Rr(this,Pr,"f").call(this).clientPromise=null,Rr(this,Pr,"f").call(this).eventFired=null})),t}catch(e){throw Rr(this,Pr,"f").call(this).clientPromise=null,new Error("The targeted SnapshotSource is not currently initialized. Await this object's ready() method.")}})),Or.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);let t,n;const i=new Promise(((e,i)=>{t=e,n=i}));Rr(this,Pr,"f").call(this).eventFired=i;const r=async i=>{try{i.channelName===e&&(t(),await this.fin.InterApplicationBus.Channel.removeListener("connected",r))}catch(e){n(e)}};await this.fin.InterApplicationBus.Channel.on("connected",r)})),Sr(this,Ar,t,"f")}get identity(){return Rr(this,Ar,"f")}async ready(){this.wire.sendAction("snapshot-source-ready").catch((e=>{}));try{await Rr(this,Mr,"f").call(this)}catch(e){await Rr(this,Pr,"f").call(this).eventFired}}async getSnapshot(){this.wire.sendAction("snapshot-source-get-snapshot").catch((e=>{}));const e=await Rr(this,Mr,"f").call(this),t=await e.dispatch("get-snapshot");return(await t).snapshot}async applySnapshot(e){this.wire.sendAction("snapshot-source-apply-snapshot").catch((e=>{}));return(await Rr(this,Mr,"f").call(this)).dispatch("apply-snapshot",{snapshot:e})}}Er.SnapshotSource=Lr,Ar=new WeakMap,Pr=new WeakMap,Mr=new WeakMap,_r=new WeakMap,Or=new WeakMap,Object.defineProperty(Ir,"__esModule",{value:!0}),Ir.SnapshotSourceModule=void 0;const Tr=d,$r=Er,Br=xr;class Gr extends Tr.Base{async init(e){if(this.wire.sendAction("snapshot-source-init").catch((e=>{})),"object"!=typeof e||"function"!=typeof e.getSnapshot||"function"!=typeof e.applySnapshot)throw new Error("you must pass in a valid SnapshotProvider");const t=await this.fin.InterApplicationBus.Channel.create((0,Br.getSnapshotSourceChannelName)(this.fin.me));t.register("get-snapshot",(async()=>({snapshot:await e.getSnapshot()}))),t.register("apply-snapshot",(({snapshot:t})=>e.applySnapshot(t)))}wrapSync(e){return this.wire.sendAction("snapshot-source-wrap-sync").catch((e=>{})),new $r.SnapshotSource(this.wire,e)}async wrap(e){return this.wire.sendAction("snapshot-source-wrap").catch((e=>{})),this.wrapSync(e)}}Ir.SnapshotSourceModule=Gr,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Ir,e),n(Er,e)}(br),Object.defineProperty(a,"__esModule",{value:!0});var Wr=a.Fin=void 0;const Hr=t,Nr=c,Dr=ie(),Ur=Z(),Vr=de,zr=en,Kr=rn,qr=un,Jr=bn,Yr=J(),Zr=An,Qr=ki,Xr=Cr(),eo=br;class to extends Hr.EventEmitter{constructor(e){super(),this.wire=e,this.System=new Nr.System(e),this.Window=new Dr._WindowModule(e),this.Application=new Ur.ApplicationModule(e),this.InterApplicationBus=new Vr.InterApplicationBus(e),this.Clipboard=new zr.Clipboard(e),this.ExternalApplication=new Kr.ExternalApplicationModule(e),this.Frame=new qr._FrameModule(e),this.GlobalHotkey=new Jr.GlobalHotkey(e),this.Platform=new Zr.PlatformModule(e,this.InterApplicationBus.Channel),this.View=new Yr.ViewModule(e),this.Interop=new Xr.InteropModule(e),this.SnapshotSource=new eo.SnapshotSourceModule(e),e.registerFin(this),this.me=(0,Qr.getMe)(e),e.on("disconnected",(()=>{this.emit("disconnected")}))}}Wr=a.Fin=to;var no={},io={};function ro(e){return"string"==typeof e.manifestUrl}function oo(e){return ao(e)&&"string"==typeof e.address}function so(e){return oo(e)&&"string"==typeof e.token}function ao(e){return"string"==typeof e.uuid}function co(e){return e.runtime&&"string"==typeof e.runtime.version}function ho(e){return ao(e)&&co(e)}Object.defineProperty(io,"__esModule",{value:!0}),io.isInternalConnectConfig=io.isPortDiscoveryConfig=io.isNewConnectConfig=io.isConfigWithReceiver=io.isRemoteConfig=io.isExistingConnectConfig=io.isExternalConfig=void 0,io.isExternalConfig=ro,io.isExistingConnectConfig=oo,io.isRemoteConfig=so,io.isConfigWithReceiver=function(e){return"object"==typeof e.receiver&&so({...e,address:""})},io.isNewConnectConfig=ho,io.isPortDiscoveryConfig=function(e){return ro(e)&&co(e)||ho(e)},io.isInternalConnectConfig=function(e){return oo(e)||ho(e)};var lo={},uo={};Object.defineProperty(uo,"__esModule",{value:!0}),uo.EmitterMap=void 0;const po=t;function wo(e){return Buffer.from(e).toString("base64")}uo.EmitterMap=class{constructor(){this.storage=new Map}hashKeys(e){return e.map(wo).join("/")}getOrCreate(e){const t=this.hashKeys(e);return this.storage.has(t)||this.storage.set(t,new po.EventEmitter),this.storage.get(t)}has(e){return this.storage.has(this.hashKeys(e))}delete(e){const t=this.hashKeys(e);return this.storage.delete(t)}},Object.defineProperty(lo,"__esModule",{value:!0});const yo=uo;class fo extends yo.EmitterMap{constructor(){super(...arguments),this.dispatchEvent=e=>{if(function(e){return"process-desktop-event"===e.action}(e)){const{payload:t}=e,n=function(e){const{topic:t}=e;if("frame"===t||"window"===t||"view"===t){const{uuid:n,name:i}=e;return[t,n,i]}if("application"===t){const{uuid:n}=e;return[t,n]}return[t]}(t);if(this.has(n))return this.getOrCreate(n).emit(t.type,t),!0}return!1}}}lo.default=fo;var go,mo,vo=s&&s.__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},Co=s&&s.__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)},bo=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(no,"__esModule",{value:!0});var Io=no.Transport=void 0;const Eo=t,xo=io,Ao=g,Po=bo(lo),Mo=ki,_o=ke;class Oo extends Eo.EventEmitter{constructor(e,t,n){super(),this.wireListeners=new Map,this.topicRefMap=new Map,this.eventAggregator=new Po.default,this.messageHandlers=[this.eventAggregator.dispatchEvent],go.set(this,void 0),mo.set(this,void 0),this.connectSync=()=>{Co(this,go,"f").connectSync()},this.getPort=()=>Co(this,go,"f").getPort(),vo(this,go,new e(this.onmessage.bind(this)),"f"),this.environment=t,this.sendRaw=Co(this,go,"f").send.bind(Co(this,go,"f")),this.registerMessageHandler(this.handleMessage.bind(this)),Co(this,go,"f").on("disconnected",(()=>{for(const[,{handleNack:e}]of this.wireListeners)e({reason:"Remote connection has closed"});this.wireListeners.clear(),this.emit("disconnected")}));const{uuid:i,name:r}=n,o=this.environment.getCurrentEntityType();this.me=(0,Mo.getBaseMe)(o,i,r)}getFin(){if(!Co(this,mo,"f"))throw new Error("No Fin object registered for this transport");return Co(this,mo,"f")}registerFin(e){if(Co(this,mo,"f"))throw new Error("Fin object has already been registered for this transport");vo(this,mo,e,"f")}shutdown(){return Co(this,go,"f").shutdown()}async connect(e){if((0,xo.isConfigWithReceiver)(e))return await Co(this,go,"f").connect(e.receiver),this.authorize(e);if((0,xo.isRemoteConfig)(e))return this.connectRemote(e);if((0,xo.isExistingConnectConfig)(e))return this.connectByPort(e);if((0,xo.isNewConnectConfig)(e)){const t=await this.environment.retrievePort(e);return this.connectByPort({...e,address:`ws://localhost:${t}`})}}async connectRemote(e){return await Co(this,go,"f").connect(new(this.environment.getWsConstructor())(e.address)),this.authorize(e)}async connectByPort(e){const{address:t,uuid:n}=e,i={...e,type:"file-token"},r=Co(this,go,"f");await r.connect(new(this.environment.getWsConstructor())(e.address));const o=await this.sendAction("request-external-authorization",{uuid:n,type:"file-token"},!0);if("external-authorization-response"!==o.action)throw new Ao.UnexpectedActionError(o.action);return await this.environment.writeToken(o.payload.file,o.payload.token),this.authorize(i)}async authorize(e){const t=await this.sendAction("request-authorization",e,!0);if("authorization-response"!==t.action)throw new Ao.UnexpectedActionError(t.action);if(!0!==t.payload.success)throw new Ao.RuntimeError(t.payload)}sendAction(e,t={},n=!1){let i=()=>{};const r=Ao.RuntimeError.getCallSite(1),o=this.environment.getNextMessageId(),s=new Promise(((s,a)=>{i=a;const c={action:e,payload:t,messageId:o},d=Co(this,go,"f");return this.addWireListener(o,s,(e=>this.nackHandler(e,a,r)),n),d.send(c).catch(a)}));return Object.assign(s,{cancel:i,messageId:o})}nackHandler(e,t,n){t("string"==typeof e?e:new Ao.RuntimeError(e,n))}ferryAction(e){return new Promise(((t,n)=>{const i=this.environment.getNextMessageId();e.messageId=i;const r=e=>{t(e.payload)};return Co(this,go,"f").send(e).then((()=>this.addWireListener(i,r,(e=>this.nackHandler(e,n)),!1))).catch(n)}))}registerMessageHandler(e){this.messageHandlers.push(e)}addWireListener(e,t,n,i){i?this.uncorrelatedListener=t:this.wireListeners.has(e)?n({reason:"Duplicate handler id",error:(0,_o.errorToPOJO)(new Ao.DuplicateCorrelationError(String(e)))}):this.wireListeners.set(e,{resolve:t,handleNack:n})}onmessage(e){for(const t of this.messageHandlers)t.call(null,e)}handleMessage(e){const t=e.correlationId||NaN;if("correlationId"in e){if(!this.wireListeners.has(t))return!1;{const{resolve:n,handleNack:i}=this.wireListeners.get(t);"ack"!==e.action?i({reason:"Did not receive ack action",error:(0,_o.errorToPOJO)(new Ao.NoAckError(e.action))}):"payload"in e?e.payload.success?n.call(null,e):i(e.payload):"string"==typeof e.reason?i(e):(console.warn("Received invalid response from core",e),i({reason:"invalid response shape"})),this.wireListeners.delete(t)}}else this.uncorrelatedListener&&this.uncorrelatedListener.call(null,e),this.uncorrelatedListener=()=>{};return!0}}Io=no.Transport=Oo,go=new WeakMap,mo=new WeakMap;const So=(...e)=>({log:(...t)=>console.debug(`[${(new Date).toISOString()}]`,...(e=>e.map((e=>`[${e}]`)))(e),...t),getLogger:(...t)=>So(...e,...t)}),Ro=So("@openfin/core-web/client");function Fo(e,t){if(!function(e){return"string"==typeof e}(e))throw new Error(`Property ${t} has invalid type. Expected string, got ${typeof e}.`)}const jo="web-broker-ports-ready",ko=Ro.getLogger("get-web-interop-ports");function Lo(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)}function To(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}"function"==typeof SuppressedError&&SuppressedError;const $o=e=>{var n,i,r;return r=class extends t.EventEmitter{constructor(t){super(),n.set(this,void 0),i.set(this,!1),this.connectSync=()=>{Lo(this,i,"f")||(e.addEventListener("message",(e=>{e.data?.topic?.startsWith("wire-message")&&e.data.message&&Lo(this,n,"f").call(this,{...JSON.parse(e.data.message),ports:e.ports})})),e.start())},this.connect=async()=>{this.connectSync()},this.send=t=>(e.postMessage({topic:"wire-message",message:JSON.stringify(t)}),Promise.resolve()),this.shutdown=async()=>{e.close()},To(this,n,t,"f")}getPort(){return e}},n=new WeakMap,i=new WeakMap,r};var Bo={},Go={};Object.defineProperty(Go,"__esModule",{value:!0}),Go.BaseEnvironment=void 0;const Wo=vr();Go.BaseEnvironment=class{async getViewWindowIdentity(e,t){const{identity:n}=await e.View.wrapSync(t).getCurrentWindow();return n}async getInteropInfo(e){const t=await e.Application.getCurrentSync().getInfo().catch((()=>null)),n=t?.initialOptions?.interopBrokerConfiguration??{};return{fdc3Version:t?(0,Wo.getDefaultViewFdc3VersionFromAppInfo)(t):void 0,...n,fdc3Info:{providerVersion:await e.System.getVersion(),provider:"OpenFin"}}}},Object.defineProperty(Bo,"__esModule",{value:!0});var Ho=Bo.BrowserEnvironment=void 0;const No=Go;class Do extends No.BaseEnvironment{constructor(){super(...arguments),this.type="other",this.getRandomId=()=>{const e=new Uint32Array(1);return window.crypto.getRandomValues(e)[0].toString(32)}}getAdapterVersionSync(){return""}observeBounds(e,t){throw new Error("Method not implemented.")}layoutAllowedInContext(e){return!1}initLayoutManager(e,t,n){throw new Error("Method not implemented.")}applyLayoutSnapshot(e,t,n){throw new Error("Method not implemented.")}createLayout(e,t){throw new Error("Method not implemented.")}destroyLayout(e,t){throw new Error("Method not implemented.")}resolveLayout(e,t){throw new Error("Method not implemented.")}initPlatform(...e){throw new Error("Method not implemented.")}writeToken(e,t){return Promise.resolve("")}retrievePort(e){throw new Error("Method not implemented.")}getNextMessageId(){return this.getRandomId()}createChildContent(e){throw new Error("Method not implemented.")}getWebWindow(e){throw new Error("Method not implemented.")}getCurrentEntityIdentity(){throw new Error("Method not implemented.")}getCurrentEntityType(){return"external connection"}raiseEvent(e,t){throw new Error("Method not implemented.")}getUrl(){return location.href}getDefaultChannelOptions(){return{create:{},connect:{}}}getRtcPeer(){return new RTCPeerConnection}getWsConstructor(){return WebSocket}whenReady(){return Promise.resolve()}}Ho=Bo.BrowserEnvironment=Do;const Uo=e=>"platform"in e&&void 0!==e.platform;var Vo,zo;class Ko extends Ho{constructor(e){super(),this.connectConfig=e,Vo.set(this,void 0),zo.set(this,new W((async()=>Promise.resolve().then((function(){return __webpack_require__(/*! ./main-b14f67c9.js */ "./node_modules/@openfin/core-web/out/main-b14f67c9.js")}))))),Uo(e)&&this.validatePlatformOptions(e)}getAdapterVersionSync(){return"0.39.21"}validatePlatformOptions({platform:e}){if(!("layoutSnapshot"in e))throw new Error("Platform options are missing layoutSnapshot. Please provide a layoutSnapshot in the platform options.");if("windows"in e||"windows"in e.layoutSnapshot)throw new Error("It appears you tried to call connect() with a snapshot object from an OpenFin desktop environment. Note that connect() expects to be called with a platform property with this structure: { platform: { layoutSnapshot } }. To get a layoutSnapshot of the expected structure, use fin.Platform.Layout.getCurrentLayoutManagerSync().getLayoutSnapshot() in v34+ in your desktop environment.");const{layouts:t}=e.layoutSnapshot;Object.entries(t).map((([e,t])=>{if("object"!=typeof t||null===t)throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must be an object.`);if(!("content"in t))throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must contain a 'content' property.`)}))}async getInteropInfo(e){return{...{contextGroups:void 0,logging:{beforeAction:{enabled:!1},afterAction:{enabled:!1}}},fdc3Version:void 0,fdc3Info:{providerVersion:"0.39.21",provider:"OpenFin Web"}}}layoutAllowedInContext(e){return!0}async initLayoutManager(e,t,n){if(Lo(this,Vo,"f"))throw new Error("Layout already initialized.");if(!Uo(this.connectConfig))throw new Error("Platform options are missing from connection config.");const{WebLayoutEntryPoint:i}=await Lo(this,zo,"f").getValue();return To(this,Vo,new i(this.connectConfig),"f"),await Lo(this,Vo,"f").initLayoutManager(e,t,n)}async applyLayoutSnapshot(e,t,n){Lo(this,Vo,"f")?.applyLayoutSnapshot(e,t,n)}async createLayout(e,t){return Lo(this,Vo,"f")?.createLayout(e,t)}async destroyLayout(e,t){return Lo(this,Vo,"f")?.destroyLayout(e,t)}async getViewWindowIdentity(e,t){return Promise.resolve({uuid:t.uuid,name:t.uuid})}}Vo=new WeakMap,zo=new WeakMap;const qo=()=>{const e=((e,t)=>{const n=new RegExp(`^${t}<(?.*)>$`).exec(e)?.groups?.meta;if(n)try{return JSON.parse(atob(n))}catch(e){throw new Error(`Failed to decode JSON from ${n}.`)}})(window.name,"of-frame");if(e)try{const{name:t,uuid:n,brokerUrl:i,providerId:r,contextGroup:o}=e;return Fo(i,"brokerUrl"),Fo(n,"uuid"),Fo(t,"name"),{identity:{name:t,uuid:n},brokerUrl:i,interopConfig:{providerId:r,currentContextGroup:o}}}catch(e){throw new Error(`Unexpected error occurred when inferring platform information: ${e.stack}`)}},Jo=()=>{const e=r.v4();return{uuid:e,name:e}},Yo=async e=>{if("enabled"===e.connectionInheritance){const t=await(async e=>{const t=qo();if(t){const{validateOptions:n=(()=>!0)}=e,{identity:i,...r}=t;if(!await n(r))throw new Error("Parent options were rejected by validateOptions.");return t}})(e);if(t)return t}if(!e.options){const t="enabled"===e.connectionInheritance?"Broker URL was not specified nor provided by a platform container.":"Connection inheritance is disabled but no options were provided.";throw new Error(t)}return{...e.options,identity:Jo()}};exports.__classPrivateFieldGet=Lo,exports.__classPrivateFieldSet=To,exports.apiExposer=Gn,exports.commonjsGlobal=s,exports.connect=async t=>{try{Ro.log("Establishing connection",t);const{brokerUrl:n,identity:i,timeout:r,interopConfig:s}=await Yo(t),{workerPort:a,iframeBrokerPort:c}=await(async(e,t,n)=>{const{origin:i}=new URL(e),r=document.createElement("IFRAME");let s;r.style.display="none";try{return await new Promise(((a,c)=>{const d=e=>{if(e.source===r.contentWindow&&e.data?.topic===`ack-${jo}`){if(e.origin!==i)c(new Error(`Broker redirected to unexpected origin ${e.origin}, expected ${i}.`));else if(e.data.success){const[t,n]=e.ports;a({iframeBrokerPort:t,workerPort:n})}else c(new m(e.data));window.removeEventListener("message",d),clearTimeout(s)}};window.addEventListener("message",d),ko.log(`Connecting to broker ${e}`),r.setAttribute("src",e),r.setAttribute("name",o(t,"of-broker")),document.body.appendChild(r),ko.log("Iframe loaded, awaiting init message from iframe"),n&&(s=setTimeout((()=>{window.removeEventListener("message",d),document.body.removeChild(r),c(new Error("Worker did not initialize in time"))}),n))}))}catch(e){throw new Error(`Failed to initialise Fin Web Client. ${e.message}`,{cause:e})}})(n,i,r);Ro.log("Successfully established connection to shared worker");const d={entityType:"external connection",...i};a.start(),c.start();const h=((t,n,i)=>{const r=$o(n),o=new Ko(t),s=new Io(r,o,i);return s.connectSync(),window.Buffer=e.Buffer,new Wr(s)})(t,a,d);return s?.providerId&&(h.me.interop=h.Interop.connectSync(s.providerId),s?.currentContextGroup&&h.me.interop.joinContextGroup(s.currentContextGroup).catch((e=>{console.warn(`Error joining specified context group: ${s?.currentContextGroup}, continuing`,e)}))),{...h,me:{...h.me,identity:{uuid:h.me.uuid,name:h.me.name}}}}catch(e){throw new Error(`An error occured during web-interop connection: ${e.message}`)}},exports.decorators=Nn,exports.encodeOptions=o,exports.layout_constants=ai,exports.lazy=G; +var e=__webpack_require__(/*! buffer/ */ "../../node_modules/buffer/index.js"),t=__webpack_require__(/*! events */ "../../node_modules/events/events.js"),n=__webpack_require__(/*! lodash/cloneDeep */ "../../node_modules/lodash/cloneDeep.js"),i=__webpack_require__(/*! lodash/isEqual */ "../../node_modules/lodash/isEqual.js"),r=__webpack_require__(/*! uuid */ "../../node_modules/uuid/dist/esm-browser/index.js");const o=(e,t)=>`${t}<${btoa(JSON.stringify(e))}>`;var s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof __webpack_require__.g?__webpack_require__.g:"undefined"!=typeof self?self:{},a={},c={},d={},h={};async function l(e){const t=[];for(const n of e){const e=await n();t.push(e)}return t}Object.defineProperty(h,"__esModule",{value:!0}),h.promiseMapSerial=h.serial=h.promiseMap=h.promisify=void 0,h.promisify=function(e){return(...t)=>new Promise(((n,i)=>{e(...t,((e,t)=>e?i(e):n(t)))}))},h.promiseMap=async function(e,t){return Promise.all(e.map(t))},h.serial=l,h.promiseMapSerial=async function(e,t){return l(e.map(((e,n,i)=>()=>t(e,n,i))))};var u,p=s&&s.__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},w=s&&s.__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)};Object.defineProperty(d,"__esModule",{value:!0}),d.Reply=d.EmitterBase=d.Base=void 0;const y=h;class f{constructor(e){this.isNodeEnvironment=()=>"node"===this.wire.environment.type,this.isOpenFinEnvironment=()=>"openfin"===this.wire.environment.type,this.isBrowserEnvironment=()=>"other"===this.wire.environment.type,this.wire=e}get fin(){return this.wire.getFin()}get me(){return this.wire.me}}d.Base=f;d.EmitterBase=class extends f{constructor(e,t,...n){super(e),this.topic=t,u.set(this,void 0),this.eventNames=()=>this.hasEmitter()?this.getOrCreateEmitter().eventNames():[],this.emit=(e,t,...n)=>!!this.hasEmitter()&&this.getOrCreateEmitter().emit(e,t,...n),this.hasEmitter=()=>this.wire.eventAggregator.has(w(this,u,"f")),this.getOrCreateEmitter=()=>this.wire.eventAggregator.getOrCreate(w(this,u,"f")),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[],this.listenerCount=e=>this.hasEmitter()?this.getOrCreateEmitter().listenerCount(e):0,this.registerEventListener=async(e,t={},n,i)=>{const r={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e},o=this.getOrCreateEmitter();n(o);try{await this.wire.sendAction("subscribe-to-desktop-event",r)}catch(e){throw i(o),this.deleteEmitterIfNothingRegistered(o),e}},this.deregisterEventListener=async(e,t={})=>{if(this.hasEmitter()){const n={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e};await this.wire.sendAction("unsubscribe-to-desktop-event",n).catch((()=>null));return this.getOrCreateEmitter()}return Promise.resolve()},p(this,u,[t,...n],"f"),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[]}async on(e,t,n){return await this.registerEventListener(e,n,(n=>{n.on(e,t)}),(n=>{n.removeListener(e,t)})),this}async addListener(e,t,n){return this.on(e,t,n)}async once(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.once(e,i),n.once(e,t)}),(n=>{n.removeListener(e,i),n.removeListener(e,t)})),this}async prependListener(e,t,n){return await this.registerEventListener(e,n,(n=>{n.prependListener(e,t)}),(n=>{n.removeListener(e,t)})),this}async prependOnceListener(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.prependOnceListener(e,t),n.once(e,i)}),(n=>{n.removeListener(e,t),n.removeListener(e,i)})),this}async removeListener(e,t,n){const i=await this.deregisterEventListener(e,n);return i&&(i.removeListener(e,t),this.deleteEmitterIfNothingRegistered(i)),this}async deregisterAllListeners(e){const t={...this.identity,type:e,topic:this.topic};if(this.hasEmitter()){const e=this.getOrCreateEmitter(),n=e.listenerCount(t.type),i=[];for(let e=0;enull)));return await Promise.all(i),e}}async removeAllListeners(e){const t=async e=>{const t=await this.deregisterAllListeners(e);t&&(t.removeAllListeners(e),this.deleteEmitterIfNothingRegistered(t))};if(e)await t(e);else if(this.hasEmitter()){const e=this.getOrCreateEmitter().eventNames();await(0,y.promiseMap)(e,t)}return this}deleteEmitterIfNothingRegistered(e){0===e.eventNames().length&&this.wire.eventAggregator.delete(w(this,u,"f"))}},u=new WeakMap;d.Reply=class{};var g={};Object.defineProperty(g,"__esModule",{value:!0});var m=g.RuntimeError=g.NotSupportedError=g.NotImplementedError=g.NoAckError=g.DuplicateCorrelationError=g.UnexpectedActionError=g.DisconnectedError=void 0;class v extends Error{constructor(e){super(`Expected websocket state OPEN but found ${e}`),this.readyState=e}}g.DisconnectedError=v;class C extends Error{}g.UnexpectedActionError=C;class b extends Error{}g.DuplicateCorrelationError=b;class I extends Error{}g.NoAckError=I;class E extends Error{}g.NotImplementedError=E;class x extends Error{}g.NotSupportedError=x;class A extends Error{constructor(e){const{message:t,name:n,stack:i,...r}=e;super(t),this.name=n||"Error",this.stack=i??this.toString(),Object.keys(r).forEach((e=>{this[e]=r[e]}))}}class P extends Error{static getCallSite(e=0){const t=Error.stackTraceLimit,n=e+1;Error.stackTraceLimit=t+n;const i=Error.prepareStackTrace;Error.prepareStackTrace=(e,t)=>t;const r=(new Error).stack?.slice(n)??[];return Error.prepareStackTrace=i,Error.stackTraceLimit=t,r}static prepareStackTrace(e,t){if("function"==typeof Error.prepareStackTrace)return Error.prepareStackTrace(e,t);let n="";n+=e.name||"Error",n+=`: ${e.message||""}`;for(const e of t)n+=`\n at ${e.toString()}`;return n}constructor(e,t){const{reason:n,error:i}=e;super(n),this.name="RuntimeError",i?.stack&&(this.cause=new A(i)),t&&(this.stack=P.prepareStackTrace(this,t))}}m=g.RuntimeError=P;var M={},_={},O={};Object.defineProperty(O,"__esModule",{value:!0}),O.validateIdentity=void 0,O.validateIdentity=function(e){let t;return"object"==typeof e&&"string"==typeof e.uuid||(t="Not a valid identity object"),t};var S={},R={},F={},j={},k={},L={},T={};Object.defineProperty(T,"__esModule",{value:!0}),T.handleDeprecatedWarnings=void 0;var $;T.handleDeprecatedWarnings=e=>{(e.contentNavigation?.whitelist||e.contentNavigation?.blacklist||e.contentRedirect?.whitelist||e.contentRedirect?.blacklist)&&console.warn("The properties 'whitelist' and 'blacklist' have been marked as deprecated and will be removed in a future version. Please use 'allowlist' and 'denylist'.")};var B={},G={};Object.defineProperty(G,"__esModule",{value:!0}),G.AsyncRetryableLazy=W=G.Lazy=void 0;var W=G.Lazy=class{constructor(e){this.producerFn=e}getValue(){return this.value||(this.value=this.producerFn()),this.value}};G.AsyncRetryableLazy=class{constructor(e){this.producerFn=e}async getValue(){return this.promise||(this.promise=this.producerFn().catch((e=>{throw delete this.promise,e}))),this.promise}};var H={};Object.defineProperty(H,"__esModule",{value:!0}),H.WebContents=void 0;const N=d;class D extends N.EmitterBase{constructor(e,t,n){super(e,n,t.uuid,t.name),this.identity=t,this.entityType=n}capturePage(e){return this.wire.sendAction("capture-page",{options:e,...this.identity}).then((({payload:e})=>e.data))}executeJavaScript(e){return this.wire.sendAction("execute-javascript-in-window",{...this.identity,code:e}).then((({payload:e})=>e.data))}getZoomLevel(){return this.wire.sendAction("get-zoom-level",this.identity).then((({payload:e})=>e.data))}setZoomLevel(e){return this.wire.sendAction("set-zoom-level",{...this.identity,level:e}).then((()=>{}))}navigate(e){return this.wire.sendAction("navigate-window",{...this.identity,url:e}).then((()=>{}))}navigateBack(){return this.wire.sendAction("navigate-window-back",{...this.identity}).then((()=>{}))}async navigateForward(){await this.wire.sendAction("navigate-window-forward",{...this.identity})}stopNavigation(){return this.wire.sendAction("stop-window-navigation",{...this.identity}).then((()=>{}))}reload(e=!1){return this.wire.sendAction("reload-window",{ignoreCache:e,...this.identity}).then((()=>{}))}print(e={}){return this.wire.sendAction("print",{...this.identity,options:e}).then((()=>{}))}findInPage(e,t){return this.wire.sendAction("find-in-page",{...this.identity,searchTerm:e,options:t}).then((({payload:e})=>e.data))}stopFindInPage(e){return this.wire.sendAction("stop-find-in-page",{...this.identity,action:e}).then((()=>{}))}getPrinters(){return this.wire.sendAction("get-printers",{...this.identity}).then((({payload:e})=>e.data))}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){await this.wire.sendAction("focus-window",{emitSynthFocused:e,...this.identity})}async showDeveloperTools(){await this.wire.sendAction("show-developer-tools",this.identity)}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction("get-process-info",this.identity);return e}async getSharedWorkers(){return this.wire.sendAction("get-shared-workers",this.identity).then((({payload:e})=>e.data))}async inspectSharedWorker(){await this.wire.sendAction("inspect-shared-worker",{...this.identity})}async inspectSharedWorkerById(e){await this.wire.sendAction("inspect-shared-worker-by-id",{...this.identity,workerId:e})}async inspectServiceWorker(){await this.wire.sendAction("inspect-service-worker",{...this.identity})}async showPopupWindow(e){if(this.wire.sendAction(`${this.entityType}-show-popup-window`,this.identity).catch((()=>{})),e?.onPopupReady){const t=async({popupName:t})=>{try{const n=this.fin.Window.wrapSync({uuid:this.fin.me.uuid,name:t});await e.onPopupReady(n)}catch(e){throw new Error(`Something went wrong during onPopupReady execution: ${e}`)}};await this.once("popup-ready",t)}const{payload:t}=await this.wire.sendAction("try-create-popup-window",{options:{...e,hasResultCallback:!!e?.onPopupResult,hasReadyCallback:!!e?.onPopupReady},...this.identity}),{data:{willOpen:n,options:i}}=t;n&&await this.fin.Window.create(i.initialOptions);if(e?.onPopupResult){const t=async t=>{await e.onPopupResult((e=>{const{name:t,uuid:n,result:i,data:r}=e,o={identity:{name:t,uuid:n},result:i};return r&&(o.data=r),o})(t))},n=async()=>{await this.removeListener("popup-result",t)};await this.on("popup-result",t),await this.once("popup-teardown",n)}const{payload:r}=await this.wire.sendAction("show-popup-window",{options:i,...this.identity});return r.data}}var U,V,z,K,q;function J(){return V||(V=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(function(){if($)return L;$=1,Object.defineProperty(L,"__esModule",{value:!0}),L.ViewModule=void 0;const e=d,t=O,n=J(),i=T;class r extends e.Base{async create(e){const{uuid:t}=this.wire.me;if(!e.name||"string"!=typeof e.name)throw new Error("Please provide a name property as a string in order to create a View.");return(0,i.handleDeprecatedWarnings)(e),this.wire.environment.childViews?await this.wire.environment.createChildContent({entityType:"view",options:{...e,uuid:t}}):await this.wire.sendAction("create-view",{...e,uuid:t}),this.wrapSync({uuid:t,name:e.name})}async wrap(e){this.wire.sendAction("view-wrap").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}wrapSync(e){this.wire.sendAction("view-wrap-sync").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}getCurrent(){if(this.wire.sendAction("view-get-current").catch((e=>{})),!this.wire.me.isView)throw new Error("You are not in a View context");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction("view-get-current-sync").catch((e=>{})),!this.wire.me.isView)throw new Error("You are not in a View context");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return L.ViewModule=r,L}(),e),n(function(){if(U)return B;var e;U=1,Object.defineProperty(B,"__esModule",{value:!0}),B.View=void 0;const t=g,n=G,i=H,r=ie();class o extends i.WebContents{constructor(i,o){super(i,o,"view"),this.identity=o,e.set(this,new n.Lazy((()=>this.fin.Platform.wrapSync(this.identity).getClient()))),this.attach=async e=>{await this.wire.sendAction("attach-view",{target:e,...this.identity})},this.destroy=async()=>{await this.wire.sendAction("destroy-view",{...this.identity})},this.show=async()=>{await this.wire.sendAction("show-view",{...this.identity})},this.showAt=async(e,t={})=>{await this.wire.sendAction("show-view-at",{bounds:e,...this.identity,options:t})},this.bringToFront=async()=>{await this.wire.sendAction("bring-view-to-front",{...this.identity})},this.hide=async()=>{await this.wire.sendAction("hide-view",{...this.identity})},this.setBounds=async e=>{await this.wire.sendAction("set-view-bounds",{bounds:e,...this.identity})},this.getBounds=async()=>(await this.wire.sendAction("get-view-bounds",{...this.identity})).payload.data,this.getInfo=async()=>(await this.wire.sendAction("get-view-info",{...this.identity})).payload.data,this.getParentLayout=async()=>(this.wire.sendAction("view-get-parent-layout",{...this.identity}).catch((()=>{})),this.fin.Platform.Layout.getLayoutByViewIdentity(this.identity)),this.getOptions=async()=>this.wire.sendAction("get-view-options",{...this.identity}).then((({payload:e})=>e.data)),this.updateOptions=async e=>this.wire.sendAction("update-view-options",{options:e,...this.identity}).then((()=>{})),this.getCurrentWindow=async()=>{const{payload:{data:e}}=await this.wire.sendAction("get-view-window",{...this.identity});return new r._Window(this.wire,e)},this.getCurrentStack=async()=>{this.wire.sendAction("view-get-current-stack").catch((()=>{}));try{return(await this.getParentLayout()).getStackByViewIdentity(this.identity)}catch(e){throw new t.RuntimeError({reason:"This view does not belong to a stack.",error:e})}},this.triggerBeforeUnload=async()=>(await this.wire.sendAction("trigger-before-unload",{...this.identity})).payload.data,this.bindToElement=async e=>{if(!e)throw new Error("Element not found.");return this.wire.environment.observeBounds(e,(async e=>this.setBounds(e)))}}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){const t=await this.getCurrentWindow();await t.focusedWebViewWasChanged(),await super.focus({emitSynthFocused:e})}}return B.View=o,e=new WeakMap,B}(),e)}(k)),k}function Y(){if(z)return j;z=1,Object.defineProperty(j,"__esModule",{value:!0}),j.Application=void 0;const e=d,t=ie(),n=J();class i extends e.EmitterBase{constructor(e,n){super(e,"application",n.uuid),this.identity=n,this.window=new t._Window(this.wire,{uuid:this.identity.uuid,name:this.identity.uuid})}windowListFromIdentityList(e){const n=[];return e.forEach((e=>{n.push(new t._Window(this.wire,{uuid:e.uuid,name:e.name}))})),n}isRunning(){return this.wire.sendAction("is-application-running",this.identity).then((({payload:e})=>e.data))}async quit(e=!1){try{await this._close(e),await this.wire.sendAction("destroy-application",{force:e,...this.identity})}catch(e){if(!["Remote connection has closed","Could not locate the requested application"].some((t=>e.message.includes(t))))throw e}}async _close(e=!1){try{await this.wire.sendAction("close-application",{force:e,...this.identity})}catch(e){if(!e.message.includes("Remote connection has closed"))throw e}}close(e=!1){return console.warn("Deprecation Warning: Application.close is deprecated Please use Application.quit"),this.wire.sendAction("application-close",this.identity).catch((e=>{})),this._close(e)}getChildWindows(){return this.wire.sendAction("get-child-windows",this.identity).then((({payload:e})=>{const t=[];return e.data.forEach((e=>{t.push({uuid:this.identity.uuid,name:e})})),this.windowListFromIdentityList(t)}))}getManifest(){return this.wire.sendAction("get-application-manifest",this.identity).then((({payload:e})=>e.data))}getParentUuid(){return this.wire.sendAction("get-parent-application",this.identity).then((({payload:e})=>e.data))}getShortcuts(){return this.wire.sendAction("get-shortcuts",this.identity).then((({payload:e})=>e.data))}async getViews(){const{payload:e}=await this.wire.sendAction("application-get-views",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}getZoomLevel(){return this.wire.sendAction("get-application-zoom-level",this.identity).then((({payload:e})=>e.data))}getWindow(){return this.wire.sendAction("application-get-window",this.identity).catch((e=>{})),Promise.resolve(this.window)}registerUser(e,t){return this.wire.sendAction("register-user",{userName:e,appName:t,...this.identity}).then((()=>{}))}removeTrayIcon(){return this.wire.sendAction("remove-tray-icon",this.identity).then((()=>{}))}restart(){return this.wire.sendAction("restart-application",this.identity).then((()=>{}))}run(){return console.warn("Deprecation Warning: Application.run is deprecated Please use fin.Application.start"),this.wire.sendAction("application-run",this.identity).catch((e=>{})),this._run()}_run(e={}){return this.wire.sendAction("run-application",{manifestUrl:this._manifestUrl,opts:e,...this.identity}).then((()=>{}))}scheduleRestart(){return this.wire.sendAction("relaunch-on-close",this.identity).then((()=>{}))}async sendApplicationLog(){const{payload:e}=await this.wire.sendAction("send-application-log",this.identity);return e.data}async setJumpList(e){await this.wire.sendAction("set-jump-list",{config:e,...this.identity})}setTrayIcon(e){return this.wire.sendAction("set-tray-icon",{enabledIcon:e,...this.identity}).then((()=>{}))}setShortcuts(e){return this.wire.sendAction("set-shortcuts",{data:e,...this.identity}).then((()=>{}))}async setShortcutQueryParams(e){await this.wire.sendAction("set-shortcut-query-args",{data:e,...this.identity})}setZoomLevel(e){return this.wire.sendAction("set-application-zoom-level",{level:e,...this.identity}).then((()=>{}))}async setAppLogUsername(e){await this.wire.sendAction("set-app-log-username",{data:e,...this.identity})}getTrayIconInfo(){return this.wire.sendAction("get-tray-icon-info",this.identity).then((({payload:e})=>e.data))}hasTrayIcon(){return this.wire.sendAction("has-tray-icon",this.identity).then((({payload:e})=>e.data))}terminate(){return this.wire.sendAction("terminate-application",this.identity).then((()=>{}))}wait(){return this.wire.sendAction("wait-for-hung-application",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction("get-info",this.identity).then((({payload:e})=>e.data))}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction("application-get-process-info",this.identity);return e}async setFileDownloadLocation(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t};await this.wire.sendAction("set-file-download-location",{...n,downloadLocation:e})}async getFileDownloadLocation(){const{payload:{data:e}}=await this.wire.sendAction("get-file-download-location",this.identity);return e}async showTrayIconPopupMenu(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t},{payload:i}=await this.wire.sendAction("show-tray-icon-popup-menu",{...n,options:e});return i.data}async closeTrayIconPopupMenu(){const{name:e}=this.wire.me,t={uuid:this.identity.uuid,name:e};await this.wire.sendAction("close-tray-icon-popup-menu",{...t})}}return j.Application=i,j}function Z(){return q||(q=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(function(){if(K)return F;K=1,Object.defineProperty(F,"__esModule",{value:!0}),F.ApplicationModule=void 0;const e=d,t=O,n=Y();class i extends e.Base{async wrap(e){this.wire.sendAction("wrap-application").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}wrapSync(e){this.wire.sendAction("wrap-application-sync").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}async _create(e){return void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&void 0===e.isPlatformController&&(e.autoShow=!0),await this.wire.sendAction("create-application",e),this.wrap({uuid:e.uuid})}create(e){return console.warn("Deprecation Warning: fin.Application.create is deprecated. Please use fin.Application.start"),this.wire.sendAction("application-create").catch((e=>{})),this._create(e)}async start(e){this.wire.sendAction("start-application").catch((e=>{}));const t=await this._create(e);return await this.wire.sendAction("run-application",{uuid:e.uuid}),t}async startManyManifests(e,t){return this.wire.sendAction("run-applications",{applications:e,opts:t}).then((()=>{}))}getCurrent(){return this.wire.sendAction("get-current-application").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction("get-current-application-sync").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}async startFromManifest(e,t){this.wire.sendAction("application-start-from-manifest").catch((e=>{}));const n=await this._createFromManifest(e);return await n._run(t),n}createFromManifest(e){return console.warn("Deprecation Warning: fin.Application.createFromManifest is deprecated. Please use fin.Application.startFromManifest"),this.wire.sendAction("application-create-from-manifest").catch((e=>{})),this._createFromManifest(e)}_createFromManifest(e){return this.wire.sendAction("get-application-manifest",{manifestUrl:e}).then((({payload:e})=>{const t=e.data.platform?e.data.platform.uuid:e.data.startup_app.uuid;return this.wrap({uuid:t})})).then((t=>(t._manifestUrl=e,t)))}}return F.ApplicationModule=i,F}(),e),n(Y(),e)}(R)),R}H.WebContents=D;var Q={};Object.defineProperty(Q,"__esModule",{value:!0}),Q.promisifySubscription=void 0;var X,ee,te;function ne(){if(X)return S;X=1,Object.defineProperty(S,"__esModule",{value:!0}),S._Window=void 0;const e=Z(),t=H,n=J(),i=T,r=Q;class o extends t.WebContents{constructor(e,t){super(e,t,"window")}async createWindow(e){this.wire.sendAction("window-create-window",this.identity).catch((e=>{}));const t=await(0,r.promisifySubscription)(this,"fire-constructor-callback");void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&(e.autoShow=!0),(0,i.handleDeprecatedWarnings)(e);const n=this.wire.environment.createChildContent({entityType:"window",options:e}),[o]=await Promise.all([t.getValue(),n]);let s;const{success:a}=o,c=o.data,{message:d}=c;s=a?{httpResponseCode:c.httpResponseCode,apiInjected:c.apiInjected}:{message:c.message,networkErrorCode:c.networkErrorCode,stack:c.stack};const h={message:d,cbPayload:s,success:a};try{this.getWebWindow().fin.__internal_.openerSuccessCBCalled()}catch(e){}return h.success?this:Promise.reject(h)}getAllFrames(){return this.wire.sendAction("get-all-frames",this.identity).then((({payload:e})=>e.data))}getBounds(){return this.wire.sendAction("get-window-bounds",this.identity).then((({payload:e})=>e.data))}center(){return this.wire.sendAction("center-window",this.identity).then((()=>{}))}blur(){return this.wire.sendAction("blur-window",this.identity).then((()=>{}))}bringToFront(){return this.wire.sendAction("bring-window-to-front",this.identity).then((()=>{}))}animate(e,t){return this.wire.sendAction("animate-window",{transitions:e,options:t,...this.identity}).then((()=>{}))}hide(){return this.wire.sendAction("hide-window",this.identity).then((()=>{}))}close(e=!1){return this.wire.sendAction("close-window",{force:e,...this.identity}).then((()=>{Object.setPrototypeOf(this,null)}))}focusedWebViewWasChanged(){return this.wire.sendAction("focused-webview-changed",this.identity).then((()=>{}))}getNativeId(){return this.wire.sendAction("get-window-native-id",this.identity).then((({payload:e})=>e.data))}async getCurrentViews(){const{payload:e}=await this.wire.sendAction("window-get-views",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}disableFrame(){return console.warn("Function is deprecated; use disableUserMovement instead."),this.wire.sendAction("disable-window-frame",this.identity).then((()=>{}))}disableUserMovement(){return this.wire.sendAction("disable-window-frame",this.identity).then((()=>{}))}enableFrame(){return console.warn("Function is deprecated; use enableUserMovement instead."),this.wire.sendAction("enable-window-frame",this.identity).then((()=>{}))}enableUserMovement(){return this.wire.sendAction("enable-window-frame",this.identity).then((()=>{}))}flash(){return this.wire.sendAction("flash-window",this.identity).then((()=>{}))}stopFlashing(){return this.wire.sendAction("stop-flash-window",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction("get-window-info",this.identity).then((({payload:e})=>e.data))}async getLayout(e){this.wire.sendAction("window-get-layout",this.identity).catch((e=>{}));const t=await this.getOptions();if(!t.layout&&!t.layoutSnapshot)throw new Error("Window does not have a Layout");return this.fin.Platform.Layout.wrap(e??this.identity)}getOptions(){return this.wire.sendAction("get-window-options",this.identity).then((({payload:e})=>e.data))}getParentApplication(){return this.wire.sendAction("window-get-parent-application",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity))}getParentWindow(){return this.wire.sendAction("window-get-parent-window",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity)).then((e=>e.getWindow()))}async getSnapshot(e){const t={area:e,...this.identity};console.warn("Window.getSnapshot has been deprecated, please use Window.capturePage");return(await this.wire.sendAction("get-window-snapshot",t)).payload.data}getState(){return this.wire.sendAction("get-window-state",this.identity).then((({payload:e})=>e.data))}getWebWindow(){return this.wire.sendAction("window-get-web-window",this.identity).catch((e=>{})),this.wire.environment.getWebWindow(this.identity)}isMainWindow(){return this.wire.sendAction("window-is-main-window",this.identity).catch((e=>{})),this.me.uuid===this.me.name}isShowing(){return this.wire.sendAction("is-window-showing",this.identity).then((({payload:e})=>e.data))}maximize(){return this.wire.sendAction("maximize-window",this.identity).then((()=>{}))}minimize(){return this.wire.sendAction("minimize-window",this.identity).then((()=>{}))}moveBy(e,t,n){return this.wire.sendAction("move-window-by",{deltaLeft:e,deltaTop:t,positioningOptions:n,...this.identity}).then((()=>{}))}moveTo(e,t,n){return this.wire.sendAction("move-window",{left:e,top:t,positioningOptions:n,...this.identity}).then((()=>{}))}resizeBy(e,t,n,i){return this.wire.sendAction("resize-window-by",{deltaWidth:Math.floor(e),deltaHeight:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}resizeTo(e,t,n,i){return this.wire.sendAction("resize-window",{width:Math.floor(e),height:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}restore(){return this.wire.sendAction("restore-window",this.identity).then((()=>{}))}setAsForeground(){return this.wire.sendAction("set-foreground-window",this.identity).then((()=>{}))}setBounds(e,t){return this.wire.sendAction("set-window-bounds",{...e,...this.identity,positioningOptions:t}).then((()=>{}))}show(e=!1){return this.wire.sendAction("show-window",{force:e,...this.identity}).then((()=>{}))}showAt(e,t,n=!1){return this.wire.sendAction("show-at-window",{force:n,left:Math.floor(e),top:Math.floor(t),...this.identity}).then((()=>{}))}updateOptions(e){return this.wire.sendAction("update-window-options",{options:e,...this.identity}).then((()=>{}))}authenticate(e,t){return this.wire.sendAction("window-authenticate",{userName:e,password:t,...this.identity}).then((()=>{}))}async showPopupMenu(e){const{payload:t}=await this.wire.sendAction("show-popup-menu",{options:e,...this.identity});return t.data}async closePopupMenu(){return this.wire.sendAction("close-popup-menu",{...this.identity}).then((()=>{}))}async dispatchPopupResult(e){this.wire.sendAction("window-dispatch-popup-result",this.identity).catch((e=>{})),await this.wire.sendAction("dispatch-popup-result",{data:e,...this.identity})}async print(e={content:"self"}){switch(e.content){case void 0:case"self":return super.print(e);case"screenshot":return this.wire.sendAction("print-screenshot",this.identity).then((()=>{}));case"views":return this.wire.sendAction("print-views",{...this.identity,options:e}).then((()=>{}));default:return}}}return S._Window=o,S}function ie(){return te||(te=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(function(){if(ee)return _;ee=1,Object.defineProperty(_,"__esModule",{value:!0}),_._WindowModule=void 0;const e=d,t=O,n=ne();class i extends e.Base{async wrap(e){this.wire.sendAction("window-wrap").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}wrapSync(e){this.wire.sendAction("window-wrap-sync").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}create(e){return this.wire.sendAction("create-window").catch((e=>{})),new n._Window(this.wire,{uuid:this.me.uuid,name:e.name}).createWindow(e)}getCurrent(){if(this.wire.sendAction("get-current-window").catch((e=>{})),!this.wire.me.isWindow)throw new Error("You are not in a Window context");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction("get-current-window-sync").catch((e=>{})),!this.wire.me.isWindow)throw new Error("You are not in a Window context");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return _._WindowModule=i,_}(),e),n(ne(),e)}(M)),M}Q.promisifySubscription=async(e,t,n=(()=>!0),i)=>{let r,o,s;const a=new Promise(((e,t)=>{r=e,o=t})),c=e=>{n(e)&&(clearTimeout(s),r(e))};return await e.on(t,c),i&&(s=setTimeout((()=>o(new Error("event timed out"))),i)),a.finally((()=>{e.removeListener(t,c).catch((()=>null))})),{getValue:()=>a}},Object.defineProperty(c,"__esModule",{value:!0}),c.System=void 0;const re=d,oe=g,se=ie(),ae=t;class ce extends re.EmitterBase{constructor(e){super(e,"system")}sendExternalProcessRequest(e,t){return new Promise(((n,i)=>{const r="external-process-exited";let o,s,a,c;"function"==typeof t.listener&&(a=e=>{const n=e||{};s={topic:"exited",uuid:n.processUuid||"",exitCode:n.exitCode||0},o===e.processUuid&&(t.listener(s),c.removeListener(r,a))},this.wire.me.name||(this.wire.me.name=this.wire.me.uuid),c=new se._Window(this.wire,this.wire.me),c.on(r,a)),this.wire.sendAction(e,t).then((({payload:e})=>{o=e.data.uuid,n(e.data),s&&o===s.uuid&&(t.listener(s),c.removeListener(r,a))})).catch((e=>{c&&c.removeListener(r,a),i(e)}))}))}getVersion(){return this.wire.sendAction("get-version").then((({payload:e})=>e.data))}clearCache(e){return this.wire.sendAction("clear-cache",e).then((()=>{}))}deleteCacheOnExit(){return this.wire.sendAction("delete-cache-request").then((()=>{}))}exit(){return this.wire.sendAction("exit-desktop").then((()=>{}))}async fetchManifest(e){const{payload:{data:t}}=await this.wire.sendAction("fetch-manifest",{manifestUrl:e});return t}flushCookieStore(){return this.wire.sendAction("flush-cookie-store").then((()=>{}))}getAllWindows(){return this.wire.sendAction("get-all-windows").then((({payload:e})=>e.data))}getAllApplications(){return this.wire.sendAction("get-all-applications").then((({payload:e})=>e.data))}getCommandLineArguments(){return this.wire.sendAction("get-command-line-arguments").then((({payload:e})=>e.data))}async getCrashReporterState(){const{payload:{data:{diagnosticMode:e,isRunning:t}}}=await this.wire.sendAction("get-crash-reporter-state");return console.warn("diagnosticMode property is deprecated. It will be removed in a future version"),{diagnosticMode:e,diagnosticsMode:e,isRunning:t}}async startCrashReporter(e){const t=e,n={...t,diagnosticMode:t.diagnosticsMode||t.diagnosticMode},{payload:{data:{diagnosticMode:i,isRunning:r}}}=await this.wire.sendAction("start-crash-reporter",n);return{diagnosticMode:i,diagnosticsMode:i,isRunning:r}}getUniqueUserId(){return this.wire.sendAction("get-unique-user-id").then((({payload:e})=>e.data))}getEntityInfo(e,t){return this.wire.sendAction("get-entity-info",{uuid:e,name:t}).then((({payload:e})=>e.data))}getEnvironmentVariable(e){return this.wire.sendAction("get-environment-variable",{environmentVariables:e}).then((({payload:e})=>e.data))}getFocusedWindow(){return this.wire.sendAction("get-focused-window").then((({payload:e})=>e.data))}async isAppCertified(e){const{payload:{data:{certifiedInfo:t}}}=await this.wire.sendAction("is-app-certified",{manifestUrl:e});return t}getInstalledRuntimes(){return this.wire.sendAction("get-installed-runtimes").then((({payload:e})=>e.data.runtimes))}async getInstalledApps(){const{payload:{data:{installedApps:e}}}=await this.wire.sendAction("get-installed-apps");return e}getLog(e){return this.wire.sendAction("view-log",e).then((({payload:e})=>e.data))}getMachineId(){return this.wire.sendAction("get-machine-id").then((({payload:e})=>e.data))}getMinLogLevel(){return this.wire.sendAction("get-min-log-level").then((({payload:e})=>e.data))}getLogList(){return this.wire.sendAction("list-logs").then((({payload:e})=>e.data))}getMonitorInfo(){return this.wire.sendAction("get-monitor-info").then((({payload:e})=>e.data))}getMousePosition(){return this.wire.sendAction("get-mouse-position").then((({payload:e})=>e.data))}getProcessList(){return console.warn("System.getProcessList has been deprecated. Please consider using our new process APIs: Window.getProcessInfo, View.getProcessInfo, Application.getProcessInfo, System.getAllProcessInfo"),this.wire.sendAction("process-snapshot").then((({payload:e})=>e.data))}async getAllProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction("get-all-process-info",this.identity);return e}getProxySettings(){return this.wire.sendAction("get-proxy-settings").then((({payload:e})=>e.data))}getRuntimeInfo(){return this.wire.sendAction("get-runtime-info").then((({payload:e})=>e.data))}getRvmInfo(){return this.wire.sendAction("get-rvm-info").then((({payload:e})=>e.data))}getHostSpecs(){return this.wire.sendAction("get-host-specs").then((({payload:e})=>e.data))}getOSInfo(){return this.wire.sendAction("get-os-info").then((({payload:e})=>e.data))}launchExternalProcess(e){return this.sendExternalProcessRequest("launch-external-process",e)}monitorExternalProcess(e){return this.sendExternalProcessRequest("monitor-external-process",e)}log(e,t){return this.wire.sendAction("write-to-log",{level:e,message:t}).then((()=>{}))}openUrlWithBrowser(e){return this.wire.sendAction("open-url-with-browser",{url:e}).then((()=>{}))}async registerCustomProtocol(e){if("object"!=typeof e)throw new Error("Must provide an object with a `protocolName` property having a string value.");await this.wire.sendAction("register-custom-protocol",e)}async unregisterCustomProtocol(e){await this.wire.sendAction("unregister-custom-protocol",{protocolName:e})}async getCustomProtocolState(e){return this.wire.sendAction("get-custom-protocol-state",{protocolName:e}).then((({payload:e})=>e.data))}releaseExternalProcess(e){return this.wire.sendAction("release-external-process",{uuid:e}).then((()=>{}))}showDeveloperTools(e){return this.wire.sendAction("show-developer-tools",e).then((()=>{}))}terminateExternalProcess(e){return this.wire.sendAction("terminate-external-process",e).then((()=>{}))}updateProxySettings(e){return this.wire.sendAction("update-proxy",e).then((()=>{}))}async downloadAsset(e,t){const n=()=>{};let i=n,r=n;const o=new Promise(((e,t)=>{i=e,r=t}));if("openfin"!==this.wire.environment.type)throw new oe.NotSupportedError("downloadAsset only supported in an OpenFin Render process");const s=oe.RuntimeError.getCallSite(),a=this.wire.environment.getNextMessageId().toString(),c=`asset-download-progress-${a}`,d=`asset-download-error-${a}`,h=`asset-download-complete-${a}`,l=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},u=()=>{this.removeListener(c,l)};await Promise.all([this.on(c,l),this.once(d,(e=>{u();const{reason:t,err:n}=e;r(new oe.RuntimeError({reason:t,error:n},s))})),this.once(h,(()=>{u(),i()}))]);const p=Object.assign(e,{downloadId:a});return await this.wire.sendAction("download-asset",p).catch((e=>{throw u(),e})),o}downloadRuntime(e,t){const n=oe.RuntimeError.getCallSite();return new Promise(((i,r)=>{if("openfin"!==this.wire.environment.type)return void r(new oe.NotSupportedError("downloadRuntime only supported in an OpenFin Render process"));const o=this.wire.environment.getNextMessageId().toString(),s=`runtime-download-progress-${o}`,a=`runtime-download-error-${o}`,c=`runtime-download-complete-${o}`,d=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},h=()=>{this.removeListener(s,d)};this.on(s,d),this.once(a,(e=>{h();const{reason:t,err:i}=e;r(new oe.RuntimeError({reason:t,error:i},n))})),this.once(c,(()=>{h(),i()}));const l=Object.assign(e,{downloadId:o});this.wire.sendAction("download-runtime",l).catch((e=>{h(),r(e)}))}))}downloadPreloadScripts(e){return this.wire.sendAction("download-preload-scripts",{scripts:e}).then((({payload:e})=>e.data))}getAllExternalApplications(){return this.wire.sendAction("get-all-external-applications").then((({payload:e})=>e.data))}getAppAssetInfo(e){return this.wire.sendAction("get-app-asset-info",e).then((({payload:e})=>e.data))}getCookies(e){const t=this.wire.environment.getUrl(),n=Object.assign(e,{url:t});return this.wire.sendAction("get-cookies",n).then((({payload:e})=>e.data))}setMinLogLevel(e){return this.wire.sendAction("set-min-log-level",{level:e}).then((()=>{}))}resolveUuid(e){return this.wire.sendAction("resolve-uuid",{entityKey:e}).then((({payload:e})=>e.data))}executeOnRemote(e,t){return t.requestingIdentity=e,this.wire.ferryAction(t)}readRegistryValue(e,t,n){return this.wire.sendAction("read-registry-value",{rootKey:e,subkey:t,value:n}).then((({payload:e})=>e.data))}registerExternalConnection(e){return this.wire.sendAction("register-external-connection",{uuid:e}).then((({payload:e})=>e.data))}async getServiceConfiguration(e){if("string"!=typeof e.name)throw new Error("Must provide an object with a `name` property having a string value");const{name:t}=e;return this.wire.sendAction("get-service-configuration",{name:t}).then((({payload:e})=>e.data))}async getSystemAppConfig(e){if("string"!=typeof e)throw new Error("Must provide a string value for name of system app");return this.wire.sendAction("get-system-app-configuration",{name:e}).then((({payload:e})=>e.data))}async registerShutdownHandler(e){this.wire.sendAction("system-register-shutdown-handler").catch((e=>{}));const{uuid:t,name:n}=this.wire.me;this.on("system-shutdown",(i=>{e({proceed:()=>{this.wire.environment.raiseEvent("application/system-shutdown-handled",{uuid:t,name:n,topic:"application"})}})}))}runRvmHealthCheck(){return this.wire.sendAction("run-rvm-health-check").then((({payload:e})=>e.data))}async launchManifest(e,t={}){const{subscribe:n,...i}=t,r=i;if(n){const e=new ae.EventEmitter;n(e);const t="app-version-progress",i="runtime-status",o="app-version-complete",s="app-version-error",a=this.wire.environment.getNextMessageId().toString();r.appVersionId=a;const c=[o,t,i,s],d=e=>{const{appVersionId:t,topic:n,type:i,...r}=e;return{...r,type:c.find((e=>i.includes(e)))}},h=t=>{const n=d(t);e.emit(n.type,n)},l=()=>{this.removeListener(`${t}.${a}`,h),this.removeListener(`${i}.${a}`,h),this.removeListener(`${o}.${a}`,h),this.removeListener(`${s}.${a}`,h),this.removeListener(`${o}.${a}`,l),this.removeListener(`${s}.${a}`,l)};await Promise.all([this.on(`${t}.${a}`,h),this.on(`${i}.${a}`,h),this.once(`${o}.${a}`,h),this.once(`${s}.${a}`,h),this.once(`${o}.${a}`,l),this.once(`${s}.${a}`,l)])}return(await this.wire.sendAction("launch-manifest",{manifestUrl:e,opts:r})).payload.data.manifest}async queryPermissionForCurrentContext(e){const t={uuid:this.wire.me.uuid,name:this.wire.me.name};return(await this.wire.sendAction("query-permission-for-current-context",{apiName:e,identity:t})).payload.data}async enableNativeWindowIntegrationProvider(e){const{payload:t}=await this.wire.sendAction("enable-native-window-integration-provider",{permissions:e});return t.data}async registerUsage({data:e,type:t}){await this.wire.sendAction("register-usage",{data:e,type:t})}async getPrinters(){const{payload:e}=await this.wire.sendAction("system-get-printers");return e.data}async updateProcessLoggingOptions(e){await this.wire.sendAction("system-update-process-logging-options",{options:e})}async getDomainSettings(){const{payload:{data:e}}=await this.wire.sendAction("get-domain-settings",this.identity);return e}async setDomainSettings(e){await this.wire.sendAction("set-domain-settings",{domainSettings:e,...this.identity})}async refreshExtensions(){const{payload:e}=await this.wire.sendAction("refresh-extensions");return e.data}async getInstalledExtensions(){const{payload:e}=await this.wire.sendAction("get-installed-extensions");return e.data}}c.System=ce;var de={},he={};Object.defineProperty(he,"__esModule",{value:!0}),he.RefCounter=void 0;he.RefCounter=class{constructor(){this.topicRefMap=new Map}incRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t+1;n=i,this.topicRefMap.set(e,i)}else this.topicRefMap.set(e,1),n=1;return n}decRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t-1;this.topicRefMap.set(e,i),n=i}else n=-1;return n}actOnFirst(e,t,n){return 1===this.incRefCount(e)?t():n()}actOnLast(e,t,n){return 0===this.decRefCount(e)?t():n()}};var le={},ue={},pe={};Object.defineProperty(pe,"__esModule",{value:!0}),pe.ChannelBase=pe.ProtectedItems=void 0;const we=e=>async(t,n,i)=>{const r=await e(t,n,i);return void 0===r?n:r};pe.ProtectedItems=class{constructor(e,t){this.providerIdentity=e,this.close=t}};class ye{static defaultAction(e){throw new Error(`No action registered at target for ${e}`)}constructor(){this.subscriptions=new Map}async processAction(e,t,n){try{const i=this.subscriptions.has(e)?this.subscriptions.get(e):(t,n)=>(this.defaultAction??ye.defaultAction)(e,t,n),r=this.preAction?await this.preAction(e,t,n):t,o=await i(r,n);return this.postAction?await this.postAction(e,o,n):o}catch(t){if(this.errorMiddleware)return this.errorMiddleware(e,t,n);throw t}}beforeAction(e){if(this.preAction)throw new Error("Already registered beforeAction middleware");this.preAction=we(e)}onError(e){if(this.errorMiddleware)throw new Error("Already registered error middleware");this.errorMiddleware=e}afterAction(e){if(this.postAction)throw new Error("Already registered afterAction middleware");this.postAction=we(e)}remove(e){this.subscriptions.delete(e)}setDefaultAction(e){if(this.defaultAction)throw new Error("default action can only be set once");this.defaultAction=e}register(e,t){if(this.subscriptions.has(e))throw new Error(`Subscription already registered for action: ${e}. Unsubscribe before adding new subscription`);return this.subscriptions.set(e,t),!0}}pe.ChannelBase=ye;var fe,ge,me,ve=s&&s.__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)},Ce=s&&s.__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};Object.defineProperty(ue,"__esModule",{value:!0}),ue.ChannelClient=void 0;const be=pe,Ie=new Map;class Ee extends be.ChannelBase{static closeChannelByEndpointId(e){const t=Ie.get(e);t&&ve(t,me,"f").call(t)}static handleProviderDisconnect(e){for(const t of Ie.values())t.providerIdentity.channelId===e.channelId&&(t.disconnectListener(e),ve(t,me,"f").call(t))}constructor(e,t,n){super(),fe.set(this,void 0),ge.set(this,void 0),this.processAction=(e,t,n)=>super.processAction(e,t,n),me.set(this,(()=>{Ie.delete(this.endpointId),ve(this,ge,"f").close()})),Ce(this,fe,new be.ProtectedItems(e,t),"f"),this.disconnectListener=()=>{},this.endpointId=e.endpointId,Ce(this,ge,n,"f"),Ie.set(this.endpointId,this),n.receive(this.processAction)}get providerIdentity(){return ve(this,fe,"f").providerIdentity}async dispatch(e,t){if(ve(this,ge,"f").isEndpointConnected(this.providerIdentity.channelId))return ve(this,ge,"f").send(this.providerIdentity.channelId,e,t);throw new Error("The client you are trying to dispatch from is disconnected from the target provider.")}onDisconnection(e){this.disconnectListener=t=>{try{e(t)}catch(e){throw new Error(`Error while calling the onDisconnection callback: ${e.message}`)}finally{this.disconnectListener=()=>{}}}}async disconnect(){await this.sendDisconnectAction(),ve(this,me,"f").call(this)}async sendDisconnectAction(){const e=ve(this,fe,"f");await e.close()}static async wireClose(e,t,n){const{channelName:i,uuid:r,name:o}=t;await e.sendAction("disconnect-from-channel",{channelName:i,uuid:r,name:o,endpointId:n})}}ue.ChannelClient=Ee,fe=new WeakMap,ge=new WeakMap,me=new WeakMap;var xe={},Ae={};Object.defineProperty(Ae,"__esModule",{value:!0}),Ae.exhaustiveCheck=void 0,Ae.exhaustiveCheck=function(e,t){throw new Error(`Unsupported value: ${e}${t?`\n Supported values are: ${t.join("")}`:""}`)};var Pe,Me,_e,Oe={},Se=s&&s.__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},Re=s&&s.__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)};Object.defineProperty(Oe,"__esModule",{value:!0}),Oe.ClassicInfo=Oe.ClassicStrategy=void 0;Oe.ClassicStrategy=class{constructor(e,t,n,i){this.messageReceiver=t,this.endpointId=n,this.providerIdentity=i,Pe.set(this,void 0),Me.set(this,new Map),_e.set(this,new Map),this.send=async(e,t,n)=>{const i=Re(this,Me,"f").get(e);if(!i)throw new Error(`Could not locate routing info for endpoint ${e}`);const r={...i};r.isLocalEndpointId&&delete r.endpointId,delete r.isLocalEndpointId;const o=Re(this,Pe,"f").sendAction("send-channel-message",{...r,providerIdentity:this.providerIdentity,action:t,payload:n});Re(this,_e,"f").get(e)?.add(o);return(await o.catch((e=>{throw new Error(e.message)})).finally((()=>{Re(this,_e,"f").get(e)?.delete(o)}))).payload.data.result},this.close=async()=>{this.messageReceiver.removeEndpoint(this.providerIdentity.channelId,this.endpointId),[...Re(this,Me,"f").keys()].forEach((e=>this.closeEndpoint(e))),Se(this,Me,new Map,"f")},Se(this,Pe,e,"f")}onEndpointDisconnect(e,t){}receive(e){this.messageReceiver.addEndpoint(e,this.providerIdentity.channelId,this.endpointId)}async closeEndpoint(e){const t=Re(this,Me,"f").get(e);Re(this,Me,"f").delete(e);const n=Re(this,_e,"f").get(e);n?.forEach((n=>{const i=`Channel connection with identity uuid: ${t?.uuid} / name: ${t?.name} / endpointId: ${e} no longer connected.`;n.cancel(new Error(i))}))}isEndpointConnected(e){return Re(this,Me,"f").has(e)}addEndpoint(e,t){Re(this,Me,"f").set(e,t.endpointIdentity),Re(this,_e,"f").set(e,new Set)}isValidEndpointPayload(e){return"string"==typeof e?.endpointIdentity?.endpointId||"string"==typeof e?.endpointIdentity?.channelId}},Pe=new WeakMap,Me=new WeakMap,_e=new WeakMap,Oe.ClassicInfo={version:5,minimumVersion:0,type:"classic"};var Fe={},je={},ke={};Object.defineProperty(ke,"__esModule",{value:!0}),ke.errorToPOJO=void 0,ke.errorToPOJO=function(e){return{stack:e.stack,name:e.name,message:e.message,toString:()=>e.stack||e.toString()}};var Le,Te,$e=s&&s.__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)},Be=s&&s.__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};Object.defineProperty(je,"__esModule",{value:!0}),je.RTCEndpoint=void 0;const Ge=ke;je.RTCEndpoint=class{static isValidEndpointPayload(e){const t=e=>"object"==typeof e&&null!==e;return t(e)&&t(e.endpointIdentity)&&t(e.rtc)&&"string"==typeof e.endpointIdentity.endpointId}constructor({rtc:e,endpointIdentity:t}){this.responseMap=new Map,Le.set(this,null),Te.set(this,void 0),this.connectionStateChangeHandler=e=>{"connected"!==this.rtc.rtcClient.connectionState&&(this.rtc.rtcClient.removeEventListener("connectionstatechange",this.connectionStateChangeHandler),this.close(),$e(this,Te,"f")&&$e(this,Te,"f").call(this))},this.send=async(e,t)=>{const n=`message-${Math.random()}`,i=new Promise(((e,t)=>{this.responseMap.set(n,{resolve:e,reject:t})}));return this.rtc.channels.request.send(JSON.stringify({action:e,payload:t,messageId:n})),i},this.close=()=>{this.responseMap.forEach((e=>e.reject("Connection has closed."))),this.responseMap=new Map,this.rtc.channels.request.close(),this.rtc.channels.response.close(),this.rtc.rtcClient.close()},this.rtc=e,this.endpointIdentity=t,this.rtc.channels.response.addEventListener("message",(e=>{let{data:t}=e;e.data instanceof ArrayBuffer&&(t=(new TextDecoder).decode(e.data));const{messageId:n,payload:i,success:r,error:o}=JSON.parse(t),{resolve:s,reject:a}=this.responseMap.get(n)??{};s&&a?(this.responseMap.delete(n),r?s(i):a(o)):(console.log("Could not find id in responseMap."),console.log(e))})),this.rtc.channels.request.addEventListener("message",(async e=>{let{data:n}=e;e.data instanceof ArrayBuffer&&(n=(new TextDecoder).decode(e.data));const{messageId:i,action:r,payload:o}=JSON.parse(n);if($e(this,Le,"f"))try{const e=await $e(this,Le,"f").call(this,r,o,t);this.rtc.channels.response.send(JSON.stringify({messageId:i,payload:e,success:!0}))}catch(e){"open"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,error:(0,Ge.errorToPOJO)(e),success:!1}))}else"open"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,success:!1,error:"Connection not ready."}))})),this.rtc.rtcClient.addEventListener("connectionstatechange",this.connectionStateChangeHandler),Object.values(this.rtc.channels).forEach((e=>{e.onclose=e=>{[...this.responseMap.values()].forEach((e=>e.reject(new Error("RTCDataChannel closed unexpectedly, this is most commonly caused by message size. Note: RTC Channels have a message size limit of ~255kB.")))),this.close(),$e(this,Te,"f")&&$e(this,Te,"f").call(this)}}))}onDisconnect(e){if($e(this,Te,"f"))throw new Error("RTCEndpoint disconnectListener cannot be set twice.");Be(this,Te,e,"f")}receive(e){if($e(this,Le,"f"))throw new Error("You have already set a listener for this RTC Endpoint.");Be(this,Le,e,"f")}get connected(){return"connected"===this.rtc.rtcClient.connectionState}},Le=new WeakMap,Te=new WeakMap;var We,He,Ne,De={},Ue=s&&s.__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)},Ve=s&&s.__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};Object.defineProperty(De,"__esModule",{value:!0}),De.EndpointStrategy=void 0;De.EndpointStrategy=class{constructor(e,t,n){this.EndpointType=e,this.StrategyName=n,We.set(this,null),He.set(this,new Map),Ne.set(this,!0),this.send=async(e,t,n)=>this.getEndpointById(e).send(t,n),this.close=async()=>{Ue(this,Ne,"f")&&(Ue(this,He,"f").forEach((e=>e.close())),Ve(this,He,new Map,"f")),Ve(this,Ne,!1,"f")},this.isValidEndpointPayload=t}onEndpointDisconnect(e,t){this.getEndpointById(e).onDisconnect(t)}receive(e){if(Ue(this,We,"f"))throw new Error(`You have already set a listener for this ${this.StrategyName} Strategy`);Ve(this,We,e,"f"),Ue(this,He,"f").forEach((e=>e.receive(Ue(this,We,"f"))))}getEndpointById(e){const t=Ue(this,He,"f").get(e);if(!t)throw new Error(`Client with endpoint id ${e} is not connected`);return t}get connected(){return Ue(this,Ne,"f")}isEndpointConnected(e){return Ue(this,He,"f").has(e)}addEndpoint(e,t){if(!Ue(this,Ne,"f"))return void console.warn(`Adding endpoint to disconnected ${this.StrategyName} Strategy`);const n=new this.EndpointType(t);Ue(this,We,"f")&&n.receive(Ue(this,We,"f")),Ue(this,He,"f").set(e,n)}async closeEndpoint(e){Ue(this,He,"f").delete(e)}},We=new WeakMap,He=new WeakMap,Ne=new WeakMap,Object.defineProperty(Fe,"__esModule",{value:!0}),Fe.RTCInfo=Fe.RTCStrategy=void 0;const ze=je,Ke=De;class qe extends Ke.EndpointStrategy{constructor(){super(ze.RTCEndpoint,ze.RTCEndpoint.isValidEndpointPayload,"RTC")}}Fe.RTCStrategy=qe,Fe.RTCInfo={version:2,minimumVersion:0,type:"rtc"};var Je={};Object.defineProperty(Je,"__esModule",{value:!0}),Je.RTCICEManager=void 0;const Ye=d;class Ze extends Ye.EmitterBase{constructor(e){super(e,"channel"),this.ensureChannelOpened=e=>new Promise(((t,n)=>{if("open"===e.readyState)t();else if("connecting"===e.readyState){const n=()=>{e.removeEventListener("open",n),t()};e.addEventListener("open",n)}else n(new Error("This Channel has already closed"))}))}static createDataChannelPromise(e,t){let n;const i=new Promise((e=>{n=e})),r=i=>{const o=()=>{i.channel.removeEventListener("open",o),n(i.channel)};i.channel.label===e&&(i.channel.addEventListener("open",o),t.removeEventListener("datachannel",r))};return t.addEventListener("datachannel",r),i}async listenForProviderIce(e,t){await this.on(this.createProviderEventName(e),t,{timestamp:Date.now()})}async raiseProviderIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createProviderEventName(e)),t)}async listenForClientIce(e,t){await this.on(this.createClientEventName(e),t,{timestamp:Date.now()})}async raiseClientIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createClientEventName(e)),t)}cleanupIceListeners(e){this.removeAllListeners(this.createClientEventName(e)),this.removeAllListeners(this.createProviderEventName(e))}createClientEventName(e){return`ice-client-${e}`}createProviderEventName(e){return`ice-provider-${e}`}createRouteString(e){return`channel/${e}`}createRtcPeer(){return this.wire.environment.getRtcPeer()}async startClientOffer(){const e=Math.random().toString(),t=this.createRtcPeer();t.addEventListener("icecandidate",(async t=>{t.candidate&&await this.raiseClientIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForProviderIce(e,(async e=>{await t.addIceCandidate(e.candidate)}));const n={request:t.createDataChannel("request"),response:t.createDataChannel("response")},i=await t.createOffer();await t.setLocalDescription(i);const r=Promise.all([n.request,n.response].map(this.ensureChannelOpened)).then((()=>{}));return{rtcClient:t,channels:n,offer:i,rtcConnectionId:e,channelsOpened:r}}async finishClientOffer(e,t,n){return await e.setRemoteDescription(t),await n,!0}async createProviderAnswer(e,t){const n=this.createRtcPeer(),i=Ze.createDataChannelPromise("request",n),r=Ze.createDataChannelPromise("response",n);n.addEventListener("icecandidate",(async t=>{t.candidate&&await this.raiseProviderIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForClientIce(e,(async e=>{await n.addIceCandidate(e.candidate)})),await n.setRemoteDescription(t);const o=await n.createAnswer();await n.setLocalDescription(o);const s=Promise.all([i,r]).then((([t,n])=>(this.cleanupIceListeners(e),{request:t,response:n})));return{rtcClient:n,answer:o,channels:s}}}Je.RTCICEManager=Ze;var Qe={},Xe={};function et(e){return[...e.split(".").reverse().entries()].reduce(((e,[t,n])=>e+ +n*1e4**t),0)}function tt(e,t){return et(e)>=et(t)}function nt(e){return e.split("/")[0]}Object.defineProperty(Xe,"__esModule",{value:!0}),Xe.runtimeUuidMeetsMinimumRuntimeVersion=Xe.parseRuntimeUuid=Xe.meetsMinimumRuntimeVersion=void 0,Xe.meetsMinimumRuntimeVersion=tt,Xe.parseRuntimeUuid=nt,Xe.runtimeUuidMeetsMinimumRuntimeVersion=function(e,t){return tt(nt(e),t)};var it,rt,ot,st,at,ct=s&&s.__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)},dt=s&&s.__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};Object.defineProperty(Qe,"__esModule",{value:!0}),Qe.ChannelProvider=void 0;const ht=pe,lt=Xe;class ut extends ht.ChannelBase{get connections(){return[...ct(this,it,"f")]}static handleClientDisconnection(e,t){const n=e.connections.find((e=>e.endpointId===t.endpointId));if(n)ct(e,st,"f").call(e,n);else{e.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name)).forEach(ct(e,st,"f"))}e.disconnectListener(t)}static setProviderRemoval(e,t){ut.removalMap.set(e,t)}constructor(e,t,n){super(),it.set(this,void 0),rt.set(this,void 0),ot.set(this,void 0),st.set(this,(e=>{const t=this.connections.filter((t=>t.endpointId!==e.endpointId));ct(this,ot,"f").closeEndpoint(e.endpointId),dt(this,it,t,"f")})),this.processAction=async(e,t,n)=>(ut.clientIsMultiRuntime(n)&&!(0,lt.runtimeUuidMeetsMinimumRuntimeVersion)(n.runtimeUuid,"18.87.56.0")?this.handleMultiRuntimeLegacyClient(n):this.checkForClientConnection(n),super.processAction(e,t,n)),at.set(this,(()=>{ct(this,ot,"f").close();const e=ut.removalMap.get(this);e&&e()})),dt(this,rt,new ht.ProtectedItems(e,t),"f"),this.connectListener=()=>{},this.disconnectListener=()=>{},dt(this,it,[],"f"),dt(this,ot,n,"f"),n.receive(this.processAction)}dispatch(e,t,n){const i=e.endpointId??this.getEndpointIdForOpenFinId(e,t);return i&&ct(this,ot,"f").isEndpointConnected(i)?ct(this,ot,"f").send(i,t,n):Promise.reject(new Error(`Client connection with identity uuid: ${e.uuid} / name: ${e.name} / endpointId: ${i} no longer connected.`))}async processConnection(e,t){return ct(this,it,"f").push(e),this.connectListener(e,t)}publish(e,t){return this.connections.map((n=>ct(this,ot,"f").send(n.endpointId,e,t)))}onConnection(e){this.connectListener=e}onDisconnection(e){this.disconnectListener=e}async destroy(){const e=ct(this,rt,"f");e.providerIdentity,dt(this,it,[],"f"),await e.close(),ct(this,at,"f").call(this)}async getAllClientInfo(){return this.connections.map((e=>{const{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}=e;return{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}}))}checkForClientConnection(e){if(!this.isClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider.\n Client Identity: {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}isClientConnected(e){return ut.clientIdentityIncludesEndpointId(e)?this.connections.some((t=>t.endpointId===e.endpointId&&t.uuid===e.uuid&&t.name===e.name)):this.isLegacyClientConnected(e)}isLegacyClientConnected(e){return this.connections.some((t=>t.uuid===e.uuid&&t.name===e.name))}handleMultiRuntimeLegacyClient(e){if(!this.isLegacyClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider. Client Identity:\n {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}getEndpointIdForOpenFinId(e,t){const n=this.connections.filter((t=>t.name===e.name&&t.uuid===e.uuid));if(n.length>=2){const n=ct(this,rt,"f"),{uuid:i,name:r}=e,o=n?.providerIdentity.uuid,s=n?.providerIdentity.name;console.warn(`WARNING: Dispatch call may have unintended results. The "to" argument of your dispatch call is missing the\n "endpointId" parameter. The identity you are dispatching to ({uuid: ${i}, name: ${r}})\n has multiple channelClients for this channel. Your dispatched action: (${t}) from the provider:\n ({uuid: ${o}, name: ${s}}) will only be processed by the most recently-created client.`)}return n.pop()?.endpointId}static clientIdentityIncludesEndpointId(e){return void 0!==e.endpointId}static clientIsMultiRuntime(e){return void 0!==e.runtimeUuid}static async wireClose(e,t){await e.sendAction("destroy-channel",{channelName:t})}}Qe.ChannelProvider=ut,it=new WeakMap,rt=new WeakMap,ot=new WeakMap,st=new WeakMap,at=new WeakMap,ut.removalMap=new WeakMap;var pt={};Object.defineProperty(pt,"__esModule",{value:!0}),pt.MessageReceiver=void 0;const wt=ue,yt=d;class ft extends yt.Base{constructor(e){super(e),this.onmessage=e=>"process-channel-message"===e.action&&(this.processChannelMessage(e),!0),this.endpointMap=new Map,this.latestEndpointIdByChannelId=new Map,e.registerMessageHandler(this.onmessage.bind(this))}async processChannelMessage(e){const{senderIdentity:t,providerIdentity:n,action:i,ackToSender:r,payload:o,intendedTargetIdentity:s}=e.payload,a=s.channelId??s.endpointId??this.latestEndpointIdByChannelId.get(n.channelId),c=this.endpointMap.get(a);if(!c)return r.payload.success=!1,r.payload.reason=`Client connection with identity uuid: ${this.wire.me.uuid} / name: ${this.wire.me.name} / endpointId: ${a} no longer connected.`,this.wire.sendRaw(r);try{const e=await c(i,o,t);return r.payload.payload=r.payload.payload||{},r.payload.payload.result=e,this.wire.sendRaw(r)}catch(e){return r.payload.success=!1,r.payload.reason=e.message,this.wire.sendRaw(r)}}addEndpoint(e,t,n){this.endpointMap.set(n,e),t!==n&&this.latestEndpointIdByChannelId.set(t,n)}removeEndpoint(e,t){this.endpointMap.delete(t),this.latestEndpointIdByChannelId.get(e)===t&&this.latestEndpointIdByChannelId.delete(e)}checkForPreviousClientConnection(e){const t=this.latestEndpointIdByChannelId.get(e);t&&(wt.ChannelClient.closeChannelByEndpointId(t),console.warn("You have created a second connection to an older provider. First connection has been removed from the clientMap"),console.warn("If the provider calls publish(), you may receive multiple messages."))}}pt.MessageReceiver=ft;var gt={};Object.defineProperty(gt,"__esModule",{value:!0}),gt.ProtocolManager=void 0;gt.ProtocolManager=class{constructor(e){this.ProtocolsInPreferenceOrder=e,this.DefaultClientProtocols=["classic"],this.DefaultProviderProtocols=["classic"],this.getClientProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultClientProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(", ")}.`);return t},this.getProviderProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultProviderProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(", ")}.`);return t},this.getCompatibleProtocols=(e,t)=>t.supportedProtocols.filter((t=>e.some((e=>e.type===t.type&&t.version>=e.minimumVersion&&e.version>=(t.minimumVersion??0))))).slice(0,t.maxProtocols)}};var mt={};Object.defineProperty(mt,"__esModule",{value:!0});class vt{static combine(e,t){return new vt(e,t)}constructor(e,t){this.primary=e,this.secondary=t}onEndpointDisconnect(e,t){this.primary.onEndpointDisconnect(e,(()=>{this.secondary.isEndpointConnected(e)||t()})),this.secondary.onEndpointDisconnect(e,(()=>{this.primary.isEndpointConnected(e)||t()}))}isValidEndpointPayload(e){return this.primary.isValidEndpointPayload(e)||this.secondary.isValidEndpointPayload(e)}async closeEndpoint(e){await this.primary.closeEndpoint(e),await this.secondary.closeEndpoint(e)}isEndpointConnected(e){return this.primary.isEndpointConnected(e)||this.secondary.isEndpointConnected(e)}async addEndpoint(e,t){this.primary.isValidEndpointPayload(t)&&await this.primary.addEndpoint(e,t),this.secondary.isValidEndpointPayload(t)&&await this.secondary.addEndpoint(e,t)}receive(e){this.primary.receive(e),this.secondary.receive(e)}send(e,t,n){return this.primary.isEndpointConnected(e)?this.primary.send(e,t,n):this.secondary.send(e,t,n)}async close(){await Promise.all([this.primary.close(),this.secondary.close()])}}mt.default=vt;var Ct,bt,It=s&&s.__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},Et=s&&s.__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)},xt=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(xe,"__esModule",{value:!0}),xe.ConnectionManager=void 0;const At=Ae,Pt=d,Mt=Oe,_t=Fe,Ot=Je,St=Qe,Rt=pt,Ft=gt,jt=xt(mt);class kt extends Pt.Base{static getProtocolOptionsFromStrings(e){return e.map((e=>{switch(e){case"rtc":return _t.RTCInfo;case"classic":return Mt.ClassicInfo;default:return(0,At.exhaustiveCheck)(e,["rtc","classic"])}}))}constructor(e){super(e),Ct.set(this,void 0),bt.set(this,void 0),this.removeChannelFromProviderMap=e=>{this.providerMap.delete(e)},this.onmessage=e=>"process-channel-connection"===e.action&&(this.processChannelConnection(e),!0),this.providerMap=new Map,this.protocolManager=new Ft.ProtocolManager("node"===this.wire.environment.type?["classic"]:["rtc","classic"]),It(this,Ct,new Rt.MessageReceiver(e),"f"),It(this,bt,new Ot.RTCICEManager(e),"f"),e.registerMessageHandler(this.onmessage.bind(this))}createProvider(e,t){const n=Object.assign(this.wire.environment.getDefaultChannelOptions().create,e||{}),i=this.protocolManager.getProviderProtocols(n?.protocols),r=i.map((e=>{switch(e){case"rtc":return new _t.RTCStrategy;case"classic":return new Mt.ClassicStrategy(this.wire,Et(this,Ct,"f"),t.channelId,t);default:return(0,At.exhaustiveCheck)(e,["rtc","classic"])}}));let o;if(2===r.length){const[e,t]=r;o=jt.default.combine(e,t)}else{if(1!==r.length)throw new Error("failed to combine strategies");[o]=r}const s=new St.ChannelProvider(t,(()=>St.ChannelProvider.wireClose(this.wire,t.channelName)),o),a=t.channelId;return this.providerMap.set(a,{provider:s,strategy:o,supportedProtocols:kt.getProtocolOptionsFromStrings(i)}),St.ChannelProvider.setProviderRemoval(s,this.removeChannelFromProviderMap.bind(this)),s}async createClientOffer(e){const t=this.protocolManager.getClientProtocols(e?.protocols);let n;return{offer:{supportedProtocols:await Promise.all(t.map((async e=>{switch(e){case"rtc":{const{rtcClient:e,channels:t,offer:i,rtcConnectionId:r,channelsOpened:o}=await Et(this,bt,"f").startClientOffer();return n={rtcClient:e,channels:t,channelsOpened:o},{type:"rtc",version:_t.RTCInfo.version,payload:{offer:i,rtcConnectionId:r}}}case"classic":return{type:"classic",version:Mt.ClassicInfo.version};default:return(0,At.exhaustiveCheck)(e,["rtc","classic"])}}))),maxProtocols:2},rtc:n}}async createClientStrategy(e,t){t.endpointId||(t.endpointId=this.wire.environment.getNextMessageId(),Et(this,Ct,"f").checkForPreviousClientConnection(t.channelId));const n=t.answer??{supportedProtocols:[{type:"classic",version:1}]},i=(await Promise.all(n.supportedProtocols.map((async n=>"rtc"===n.type&&e?(await Et(this,bt,"f").finishClientOffer(e.rtcClient,n.payload.answer,e.channelsOpened),new _t.RTCStrategy):"classic"===n.type?new Mt.ClassicStrategy(this.wire,Et(this,Ct,"f"),t.endpointId,t):null)))).filter((e=>null!==e));let r;if(e&&!i.some((e=>e instanceof _t.RTCStrategy))&&e&&e.rtcClient.close(),i.length>=2)r=jt.default.combine(i[0],i[1]);else{if(!i.length)throw new Error("No compatible protocols");[r]=i}const o={endpointIdentity:t,rtc:e};return r.addEndpoint(t.channelId,o),r}async processChannelConnection(e){const{clientIdentity:t,providerIdentity:n,ackToSender:i,payload:r,offer:o}=e.payload;t.endpointId?t.isLocalEndpointId=!1:(t.endpointId=this.wire.environment.getNextMessageId(),t.isLocalEndpointId=!0);const s=n.channelId,a=this.providerMap.get(s);if(!a)return i.payload.success=!1,i.payload.reason=`Channel "${n.channelName}" has been destroyed.`,this.wire.sendRaw(i);const{provider:c,strategy:d,supportedProtocols:h}=a;try{if(!(c instanceof St.ChannelProvider))throw Error("Cannot connect to a channel client");const e=o??{supportedProtocols:[{type:"classic",version:1}],maxProtocols:1},n=this.protocolManager.getCompatibleProtocols(h,e);if(!n.length)throw new Error("This provider does not support any of the offered protocols.");const s=await c.processConnection(t,r);i.payload.payload=i.payload.payload||{};let a={supportedProtocols:[],endpointPayloadPromise:Promise.resolve({endpointIdentity:t})};return a=await n.reduce((async(e,t)=>{const n=await e;if("rtc"===t.type){const{answer:e,rtcClient:i,channels:r}=await Et(this,bt,"f").createProviderAnswer(t.payload.rtcConnectionId,t.payload.offer);n.supportedProtocols.push({type:"rtc",version:_t.RTCInfo.version,payload:{answer:e}}),n.endpointPayloadPromise=n.endpointPayloadPromise.then((e=>r.then((t=>({...e,rtc:{rtcClient:i,channels:t}})))))}else n.supportedProtocols.push({type:"classic",version:Mt.ClassicInfo.version});return n}),Promise.resolve(a)),a.endpointPayloadPromise.then((e=>d.addEndpoint(t.endpointId,e))),i.payload.payload.result=s,i.payload.payload.answer=a,this.wire.sendRaw(i)}catch(e){return i.payload.success=!1,i.payload.reason=e.message,this.wire.sendRaw(i)}}}xe.ConnectionManager=kt,Ct=new WeakMap,bt=new WeakMap;var Lt,Tt,$t,Bt=s&&s.__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},Gt=s&&s.__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)};Object.defineProperty(le,"__esModule",{value:!0}),le.Channel=void 0;const Wt=t,Ht=G,Nt=d,Dt=ue,Ut=xe,Vt=Qe;function zt(e){const t=Math.floor(e/10),n=Math.min(3e4,500*2**t);return new Promise((e=>{setTimeout((()=>{e(!1)}),n)}))}class Kt extends Nt.EmitterBase{constructor(e){super(e,"channel"),Lt.set(this,void 0),Tt.set(this,new Wt.EventEmitter),$t.set(this,new Ht.AsyncRetryableLazy((async()=>{await Promise.all([this.on("disconnected",(e=>{Dt.ChannelClient.handleProviderDisconnect(e)})),this.on("connected",((...e)=>{Gt(this,Tt,"f").emit("connected",...e)}))]).catch((()=>new Error("error setting up channel connection listeners")))}))),Bt(this,Lt,new Ut.ConnectionManager(e),"f")}async getAllChannels(){return this.wire.sendAction("get-all-channels").then((({payload:e})=>e.data))}async onChannelConnect(e){await this.on("connected",e)}async onChannelDisconnect(e){await this.on("disconnected",e)}async safeConnect(e,t,n){const i={count:0};do{let r=()=>{};const o=new Promise((t=>{r=n=>{e===n.channelName&&t(!0)},Gt(this,Tt,"f").on("connected",r)}));try{if(i.count>0){i.gotConnectedEvent=await Promise.race([zt(i.count),o]);const t=await this.wire.sendAction("connect-to-channel",{...n,retryInfo:i});return console.log(`Successfully connected to channelName: ${e}`),t.payload.data}const t=this.wire.sendAction("connect-to-channel",n);i.originalMessageId=t.messageId;return(await t).payload.data}catch(n){if(!n.message.includes("internal-nack"))throw n;t&&0===i.count&&console.warn(`No channel found for channelName: ${e}. Waiting for connection...`)}finally{i.count+=1,Gt(this,Tt,"f").removeListener("connected",r)}}while(t);throw new Error(`No channel found for channelName: ${e}.`)}async connect(e,t={}){if(await Gt(this,$t,"f").getValue(),!e||"string"!=typeof e)throw new Error("Please provide a channelName string to connect to a channel.");const n={wait:!0,...this.wire.environment.getDefaultChannelOptions().connect,...t},{offer:i,rtc:r}=await Gt(this,Lt,"f").createClientOffer(n);let o;(this.fin.me.isFrame||this.fin.me.isView||this.fin.me.isWindow)&&(o=(await this.fin.me.getInfo()).url);const s={channelName:e,...n,offer:i,connectionUrl:o},a=await this.safeConnect(e,n.wait,s),c=await Gt(this,Lt,"f").createClientStrategy(r,a),d=new Dt.ChannelClient(a,(()=>Dt.ChannelClient.wireClose(this.wire,a,a.endpointId)),c);return c.onEndpointDisconnect(a.channelId,(async()=>{try{await d.sendDisconnectAction()}catch(e){console.warn(`Something went wrong during disconnect for client with uuid: ${a.uuid} / name: ${a.name} / endpointId: ${a.endpointId}.`)}finally{Dt.ChannelClient.handleProviderDisconnect(a)}})),d}async create(e,t){if(!e)throw new Error("Please provide a channelName to create a channel");const{payload:{data:n}}=await this.wire.sendAction("create-channel",{channelName:e}),i=Gt(this,Lt,"f").createProvider(t,n);return this.on("client-disconnected",(t=>{t.channelName===e&&Vt.ChannelProvider.handleClientDisconnection(i,t)})),i}}le.Channel=Kt,Lt=new WeakMap,Tt=new WeakMap,$t=new WeakMap,Object.defineProperty(de,"__esModule",{value:!0}),de.InterAppPayload=de.InterApplicationBus=void 0;const qt=t,Jt=d,Yt=he,Zt=le,Qt=O;class Xt extends Jt.Base{constructor(e){super(e),this.events={subscriberAdded:"subscriber-added",subscriberRemoved:"subscriber-removed"},this.refCounter=new Yt.RefCounter,this.Channel=new Zt.Channel(e),this.emitter=new qt.EventEmitter,e.registerMessageHandler(this.onmessage.bind(this)),this.on=this.emitter.on.bind(this.emitter),this.removeAllListeners=this.emitter.removeAllListeners.bind(this.emitter)}async publish(e,t){await this.wire.sendAction("publish-message",{topic:e,message:t,sourceWindowName:this.me.name})}async send(e,t,n){const i=(0,Qt.validateIdentity)(e);if(i)throw new Error(i);await this.wire.sendAction("send-message",{destinationUuid:e.uuid,destinationWindowName:e.name,topic:t,message:n,sourceWindowName:this.me.name})}subscribe(e,t,n){const i=this.createSubscriptionKey(e.uuid,e.name||"*",t);return this.emitter.on(i,n),this.refCounter.actOnFirst(i,(async()=>{await this.wire.sendAction("subscribe",{sourceUuid:e.uuid,sourceWindowName:e.name||"*",topic:t,destinationWindowName:this.me.name})}),(()=>Promise.resolve()))}unsubscribe(e,t,n){const i=e.name||"*",r=this.createSubscriptionKey(e.uuid,i,t);return this.emitter.removeListener(r,n),this.refCounter.actOnLast(r,(async()=>{await this.wire.sendAction("unsubscribe",{sourceUuid:e.uuid,sourceWindowName:i,topic:t,destinationWindowName:this.me.name})}),(()=>new Promise((e=>e)).then((()=>{}))))}processMessage(e){const{payload:{message:t,sourceWindowName:n,sourceUuid:i,topic:r}}=e,o=[this.createSubscriptionKey(i,n,r),this.createSubscriptionKey(i,"*",r),this.createSubscriptionKey("*","*",r)],s={uuid:i,name:n};o.forEach((e=>{this.emitter.emit(e,t,s)}))}emitSubscriverEvent(e,t){const{payload:{targetName:n,uuid:i,topic:r}}=t,o={name:n,uuid:i,topic:r};this.emitter.emit(e,o)}createSubscriptionKey(e,t,n){const i=t||"*";if(!(e&&i&&n))throw new Error("Missing uuid, name, or topic string");return function(...e){return e.map((e=>Buffer.from(`${e}`).toString("base64"))).join("/")}(e,i,n)}onmessage(e){const{action:t}=e;switch(t){case"process-message":this.processMessage(e);break;case this.events.subscriberAdded:this.emitSubscriverEvent(this.events.subscriberAdded,e);break;case this.events.subscriberRemoved:this.emitSubscriverEvent(this.events.subscriberRemoved,e)}return!0}}de.InterApplicationBus=Xt;de.InterAppPayload=class{};var en={};Object.defineProperty(en,"__esModule",{value:!0}),en.Clipboard=void 0;const tn=d;class nn extends tn.Base{async writeText(e){await this.wire.sendAction("clipboard-write-text",e)}async readText(e){const{payload:t}=await this.wire.sendAction("clipboard-read-text",{type:e});return t.data}async writeImage(e){await this.wire.sendAction("clipboard-write-image",e)}async readImage(e={format:"dataURL"}){const{payload:t}=await this.wire.sendAction("clipboard-read-image",e);return t.data}async writeHtml(e){await this.wire.sendAction("clipboard-write-html",e)}async readHtml(e){const{payload:t}=await this.wire.sendAction("clipboard-read-html",{type:e});return t.data}async writeRtf(e){await this.wire.sendAction("clipboard-write-rtf",e)}async readRtf(e){const{payload:t}=await this.wire.sendAction("clipboard-read-rtf",{type:e});return t.data}async write(e){await this.wire.sendAction("clipboard-write",e)}async getAvailableFormats(e){const{payload:t}=await this.wire.sendAction("clipboard-read-formats",{type:e});return t.data}}en.Clipboard=nn;var rn={},on={},sn={};Object.defineProperty(sn,"__esModule",{value:!0}),sn.ExternalApplication=void 0;const an=d;class cn extends an.EmitterBase{constructor(e,t){super(e,"external-application",t.uuid),this.identity=t}getInfo(){return this.wire.sendAction("get-external-application-info",this.identity).then((({payload:e})=>e.data))}}sn.ExternalApplication=cn,Object.defineProperty(on,"__esModule",{value:!0}),on.ExternalApplicationModule=void 0;const dn=d,hn=sn;class ln extends dn.Base{wrap(e){return this.wire.sendAction("external-application-wrap").catch((e=>{})),Promise.resolve(new hn.ExternalApplication(this.wire,{uuid:e}))}wrapSync(e){return this.wire.sendAction("external-application-wrap-sync").catch((e=>{})),new hn.ExternalApplication(this.wire,{uuid:e})}}on.ExternalApplicationModule=ln,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(on,e),n(sn,e)}(rn);var un={},pn={},wn={};Object.defineProperty(wn,"__esModule",{value:!0}),wn._Frame=void 0;const yn=d;class fn extends yn.EmitterBase{constructor(e,t){super(e,"frame",t.uuid,t.name),this.identity=t}getInfo(){return this.wire.sendAction("get-frame-info",this.identity).then((({payload:e})=>e.data))}getParentWindow(){return this.wire.sendAction("get-parent-window",this.identity).then((({payload:e})=>e.data))}}wn._Frame=fn,Object.defineProperty(pn,"__esModule",{value:!0}),pn._FrameModule=void 0;const gn=d,mn=O,vn=wn;class Cn extends gn.Base{async wrap(e){this.wire.sendAction("frame-wrap").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}wrapSync(e){this.wire.sendAction("frame-wrap-sync").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}getCurrent(){return this.wire.sendAction("frame-get-current").catch((e=>{})),Promise.resolve(new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity()))}getCurrentSync(){return this.wire.sendAction("frame-get-current-sync").catch((e=>{})),new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity())}}pn._FrameModule=Cn,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(pn,e),n(wn,e)}(un);var bn={};Object.defineProperty(bn,"__esModule",{value:!0}),bn.GlobalHotkey=void 0;const In=d;class En extends In.EmitterBase{constructor(e){super(e,"global-hotkey")}async register(e,t){await this.on(e,t),await this.wire.sendAction("global-hotkey-register",{hotkey:e})}async unregister(e){await this.removeAllListeners(e),await this.wire.sendAction("global-hotkey-unregister",{hotkey:e})}async unregisterAll(){await Promise.all(this.eventNames().filter((e=>!("registered"===e||"unregistered"===e))).map((e=>this.removeAllListeners(e)))),await this.wire.sendAction("global-hotkey-unregister-all",{})}async isRegistered(e){const{payload:{data:t}}=await this.wire.sendAction("global-hotkey-is-registered",{hotkey:e});return t}}bn.GlobalHotkey=En;var xn,An={},Pn={},Mn={},_n=s&&s.__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)};Object.defineProperty(Mn,"__esModule",{value:!0}),Mn.Platform=void 0;const On=d,Sn=O,Rn=new Map;class Fn extends On.EmitterBase{constructor(e,t){super(t.wire,"application",e.uuid),this.getClient=e=>{this.wire.sendAction("platform-get-client",this.identity).catch((e=>{}));const t=e||this.identity,{uuid:n}=t;if(!Rn.has(n)){const e=_n(this,xn,"f").call(this,n);Rn.set(n,e)}return Rn.get(n)},xn.set(this,(async e=>{try{const t=`custom-frame-${e}`,n=await this._channel.connect(t,{wait:!1});return n.onDisconnection((()=>{Rn.delete(e)})),n}catch(t){throw Rn.delete(e),new Error("The targeted Platform is not currently running. Listen for application-started event for the given Uuid.")}})),this.launchLegacyManifest=this.launchContentManifest;const n=(0,Sn.validateIdentity)(e);if(n)throw new Error(n);this._channel=t,this.identity={uuid:e.uuid},this.Layout=this.fin.Platform.Layout,this.Application=this.fin.Application.wrapSync(this.identity)}async createView(e,t,n){this.wire.sendAction("platform-create-view",this.identity).catch((e=>{}));const i=await this.getClient(),r=await i.dispatch("create-view",{target:t,opts:e,targetView:n});if(!r||(0,Sn.validateIdentity)(r.identity))throw new Error(`When overwriting the createView call, please return an object that has a valid 'identity' property: ${JSON.stringify(r)}`);return this.fin.View.wrapSync(r.identity)}async createWindow(e){this.wire.sendAction("platform-create-window",this.identity).catch((e=>{}));const t=await this.getClient();e.reason||(e.reason="api-call");const n=await t.dispatch("create-view-container",e);if(!n||(0,Sn.validateIdentity)(n.identity))throw new Error(`When overwriting the createWindow call, please return an object that has a valid 'identity' property: ${JSON.stringify(n)}`);const{identity:i}=n,r=this.fin.Window.wrapSync(i);return r.name=i.name,r.uuid=i.uuid,r}async quit(){this.wire.sendAction("platform-quit",this.identity).catch((e=>{}));return(await this.getClient()).dispatch("quit")}async closeView(e){this.wire.sendAction("platform-close-view",this.identity).catch((e=>{}));const t=await this.getClient();await t.dispatch("close-view",{view:e})}async reparentView(e,t){console.warn("Platform.reparentView has been deprecated, please use Platform.createView"),this.wire.sendAction("platform-reparent-view",this.identity).catch((e=>{}));const n={...e,uuid:e.uuid??this.identity.uuid},i=await this.fin.View.wrap(n),r=await i.getOptions();return this.createView(r,t)}async getSnapshot(){this.wire.sendAction("platform-get-snapshot",this.identity).catch((e=>{}));return(await this.getClient()).dispatch("get-snapshot")}async getViewSnapshot(e){return(await this.getClient()).dispatch("get-view-snapshot",{viewIdentity:e})}async applySnapshot(e,t){this.wire.sendAction("platform-apply-snapshot",this.identity).catch((e=>{}));const n="Requested snapshot must be a valid Snapshot object, or a url or filepath to such an object.";let i;if("string"==typeof e)try{i=(await this._channel.wire.sendAction("get-application-manifest",{manifestUrl:e})).payload.data}catch(e){throw new Error(`${n}: ${e}`)}else i=e;if(!i.windows)throw new Error(n);const r=await this.getClient();return await r.dispatch("apply-snapshot",{snapshot:i,options:t}),this}async fetchManifest(e){return(await this.getClient()).dispatch("platform-fetch-manifest",{manifestUrl:e})}async launchContentManifest(e){this.wire.sendAction("platform-launch-content-manifest",this.identity).catch((()=>{}));const t=await this.getClient(),n=await this.fetchManifest(e);return t.dispatch("launch-into-platform",{manifest:n,manifestUrl:e}),this}async setWindowContext(e={},t){if(this.wire.sendAction("platform-set-window-context",this.identity).catch((e=>{})),!e)throw new Error("Please provide a serializable object or string to set the context.");const n=await this.getClient(),{entityType:i}=t?await this.fin.System.getEntityInfo(t.uuid,t.name):this.fin.me;await n.dispatch("set-window-context",{context:e,entityType:i,target:t||{uuid:this.fin.me.uuid,name:this.fin.me.name}})}async getWindowContext(e){this.wire.sendAction("platform-get-window-context",this.identity).catch((e=>{}));const t=await this.getClient(),{entityType:n}=e?await this.fin.System.getEntityInfo(e.uuid,e.name):this.fin.me;return t.dispatch("get-window-context",{target:e||{uuid:this.fin.me.uuid,name:this.fin.me.name},entityType:n})}async closeWindow(e,t={skipBeforeUnload:!1}){this.wire.sendAction("platform-close-window",this.identity).catch((e=>{}));return(await this.getClient()).dispatch("close-window",{windowId:e,options:t})}}Mn.Platform=Fn,xn=new WeakMap;var jn={},kn={},Ln={},Tn={};function $n(e){switch(e){case"columns":case"grid":case"rows":case"tabs":return!0;default:return!1}}Object.defineProperty(Tn,"__esModule",{value:!0}),Tn.overrideFromComposables=Tn.isValidPresetType=void 0,Tn.isValidPresetType=$n,Tn.overrideFromComposables=function(...e){return t=>e.reduceRight(((e,t)=>n=>t(e(n))),(e=>e))(t)},Tn.default={isValidPresetType:$n};var Bn={},Gn={},Wn={};Object.defineProperty(Wn,"__esModule",{value:!0}),Wn.ApiConsumer=void 0;Wn.ApiConsumer=class{constructor(e){this.strategy=e,this.consume=async e=>(await this.strategy.getExposedFunctions(e)).reduce(((t,n)=>({...t,[n.key]:this.strategy.createFunction(n,e)})),{})}};var Hn={},Nn={};Object.defineProperty(Nn,"__esModule",{value:!0}),Nn.expose=Nn.getExposedProperties=void 0;const Dn=Symbol("exposedProperties");Nn.getExposedProperties=e=>e[Dn]||e.prototype[Dn]||[];Nn.expose=e=>(t,n,i)=>{t[Dn]=t[Dn]||[],t[Dn].push({key:n,descriptor:i,options:e})},Object.defineProperty(Hn,"__esModule",{value:!0}),Hn.ApiExposer=void 0;const Un=Nn;Hn.ApiExposer=class{constructor(e){this.strategy=e,this.exposeInstance=async(e,t)=>{const n=(0,Un.getExposedProperties)(e),i=await Promise.all(n.map((async({key:n,options:i})=>({key:n,options:await this.strategy.exposeFunction(e[n].bind(e),{key:n,options:i,meta:t})}))));await this.strategy.exposeMeta(t,i)}}};var Vn={},zn={},Kn={};Object.defineProperty(Kn,"__esModule",{value:!0}),Kn.ChannelsConsumer=void 0;Kn.ChannelsConsumer=class{constructor(e){this.channel=e,this.getExposedFunctions=async e=>{const{id:t}=e,{props:n}=await this.channel.dispatch(`api-meta:${t}`);return n},this.createFunction=e=>(...t)=>{const{action:n}=e.options;return this.channel.dispatch(n,{args:t})}}};var qn={};Object.defineProperty(qn,"__esModule",{value:!0}),qn.ChannelsExposer=void 0;qn.ChannelsExposer=class{constructor(e){this.channelProviderOrClient=e,this.exposeFunction=async(e,t)=>{const{key:n,options:i,meta:r}=t,{id:o}=r,s=`${o}.${i?.action||n}`;return await this.channelProviderOrClient.register(s,(async({args:t})=>e(...t))),{action:s}},this.exposeMeta=async({id:e},t)=>{const n=`api-meta:${e}`;await this.channelProviderOrClient.register(n,(()=>({props:t})))}}},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Kn,e),n(qn,e)}(zn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(zn,e)}(Vn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Wn,e),n(Hn,e),n(Vn,e),n(Nn,e)}(Gn);var Jn={};Object.defineProperty(Jn,"__esModule",{value:!0}),Jn.createRelayedDispatch=exports.relayChannelClientApi_1=Jn.relayChannelClientApi=void 0;const Yn=["no longer connected","RTCDataChannel closed unexpectedly","The client you are trying to dispatch from is disconnected from the target provider"];exports.relayChannelClientApi_1=Jn.relayChannelClientApi=async(e,t)=>{e.register(`relay:${t}`,(({action:t,target:n,payload:i})=>e.dispatch(n,t,i))),await Promise.resolve()};Jn.createRelayedDispatch=(e,t,n,i)=>async(r,o)=>{try{return await e.dispatch(`relay:${n}`,{action:r,payload:o,target:t})}catch(e){if(s=e.message,Yn.some((e=>s.includes(e)))&&i)throw new Error(i);throw e}var s};var Zn,Qn,Xn,ei=s&&s.__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},ti=s&&s.__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)};Object.defineProperty(Bn,"__esModule",{value:!0}),Bn.ColumnOrRow=Bn.TabStack=Bn.LayoutNode=void 0;const ni=Gn,ii=Jn;class ri{constructor(e,t){Zn.set(this,void 0),this.isRoot=()=>ti(this,Zn,"f").isRoot(this.entityId),this.exists=()=>ti(this,Zn,"f").exists(this.entityId),this.getParent=async()=>{const e=await ti(this,Zn,"f").getParent(this.entityId);if(e)return ri.getEntity(e,ti(this,Zn,"f"))},this.createAdjacentStack=async(e,t)=>{const n=await ti(this,Zn,"f").createAdjacentStack(this.entityId,e,t);return ri.getEntity({entityId:n,type:"stack"},ti(this,Zn,"f"))},this.getAdjacentStacks=async e=>(await ti(this,Zn,"f").getAdjacentStacks({targetId:this.entityId,edge:e})).map((e=>ri.getEntity({type:"stack",entityId:e.entityId},ti(this,Zn,"f")))),ei(this,Zn,e,"f"),this.entityId=t}}Bn.LayoutNode=ri,Zn=new WeakMap,ri.newLayoutEntitiesClient=async(e,t,n)=>{const i=(0,ii.createRelayedDispatch)(e,n,"layout-relay","You are trying to interact with a layout component on a window that does not exist or has been destroyed.");return new ni.ApiConsumer(new ni.ChannelsConsumer({dispatch:i})).consume({id:t})},ri.getEntity=(e,t)=>{const{entityId:n,type:i}=e;switch(i){case"column":case"row":return new si(t,n,i);case"stack":return new oi(t,n);default:throw new Error(`Unrecognised Layout Entity encountered ('${JSON.stringify(e)})`)}};class oi extends ri{constructor(e,t){super(e,t),Qn.set(this,void 0),this.type="stack",this.getViews=()=>ti(this,Qn,"f").getStackViews(this.entityId),this.addView=async(e,t={index:0})=>ti(this,Qn,"f").addViewToStack(this.entityId,e,t),this.removeView=async e=>{await ti(this,Qn,"f").removeViewFromStack(this.entityId,e)},this.setActiveView=async e=>{await ti(this,Qn,"f").setStackActiveView(this.entityId,e)},ei(this,Qn,e,"f")}}Bn.TabStack=oi,Qn=new WeakMap;class si extends ri{constructor(e,t,n){super(e,t),Xn.set(this,void 0),this.getContent=async()=>(await ti(this,Xn,"f").getContent(this.entityId)).map((e=>ri.getEntity(e,ti(this,Xn,"f")))),ei(this,Xn,e,"f"),this.type=n}}Bn.ColumnOrRow=si,Xn=new WeakMap;var ai={};Object.defineProperty(ai,"__esModule",{value:!0}),ai.DEFAULT_LAYOUT_KEY=ai.LAYOUT_CONTROLLER_ID=void 0,ai.LAYOUT_CONTROLLER_ID="layout-entities",ai.DEFAULT_LAYOUT_KEY="__default__";var ci,di,hi,li=s&&s.__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)};Object.defineProperty(Ln,"__esModule",{value:!0}),Ln.Layout=void 0;const ui=G,pi=O,wi=d,yi=Tn,fi=Bn,gi=ai;class mi extends wi.Base{static getClient(e){return li(e,di,"f").getValue()}constructor(e,t){super(t),ci.add(this),di.set(this,new ui.Lazy((async()=>fi.LayoutNode.newLayoutEntitiesClient(await this.platform.getClient(),gi.LAYOUT_CONTROLLER_ID,this.identity)))),this.replace=async e=>{this.wire.sendAction("layout-replace").catch((e=>{}));const t=await this.platform.getClient();await t.dispatch("replace-layout",{target:this.identity,opts:{layout:e}})},this.replaceView=async(e,t)=>{this.wire.sendAction("layout-replace-view").catch((e=>{}));const n=await this.platform.getClient();await n.dispatch("replace-view",{target:this.identity,opts:{viewToReplace:e,newView:t}})},this.applyPreset=async e=>{this.wire.sendAction("layout-apply-preset").catch((e=>{}));const t=await this.platform.getClient(),{presetType:n}=e;if(!n||!(0,yi.isValidPresetType)(n))throw new Error("Cannot apply preset layout, please include an applicable presetType property in the PresetLayoutOptions.");await t.dispatch("apply-preset-layout",{target:this.identity,opts:{presetType:n}})};const n=(0,pi.validateIdentity)(e);if(n)throw new Error(n);this.identity=e,this.platform=this.fin.Platform.wrapSync({uuid:e.uuid}),e.uuid===this.fin.me.uuid&&e.name===this.fin.me.name&&(this.init=this.fin.Platform.Layout.init)}async getConfig(){this.wire.sendAction("layout-get-config").catch((e=>{}));return(await this.platform.getClient()).dispatch("get-frame-snapshot",{target:this.identity})}async getCurrentViews(){this.wire.sendAction("layout-get-views").catch((e=>{}));const e=await this.platform.getClient();return(await e.dispatch("get-layout-views",{target:this.identity})).map((e=>this.fin.View.wrapSync(e)))}async getRootItem(){this.wire.sendAction("layout-get-root-item").catch((()=>{}));const e=await li(this,di,"f").getValue(),t=await e.getRoot("layoutName"in this.identity?this.identity:void 0);return fi.LayoutNode.getEntity(t,e)}async getStackByViewIdentity(e){this.wire.sendAction("layout-get-stack-by-view").catch((()=>{}));const t=await li(this,di,"f").getValue(),n=await t.getStackByView(e);if(!n)throw new Error(`No stack found for view: ${e.uuid}/${e.name}`);return fi.LayoutNode.getEntity(n,t)}async addView(e,{location:t,targetView:n}={}){this.wire.sendAction("layout-add-view").catch((e=>{}));const{identity:i}=await li(this,ci,"m",hi).call(this,"layout-add-view",{viewOptions:e,location:t,targetView:n});return{identity:i}}async closeView(e){this.wire.sendAction("layout-close-view").catch((e=>{})),await li(this,ci,"m",hi).call(this,"layout-close-view",{viewIdentity:e})}}Ln.Layout=mi,di=new WeakMap,ci=new WeakSet,hi=async function(e,t){return(await this.platform.getClient()).dispatch(e,{target:this.identity,opts:t})};var vi,Ci,bi,Ii,Ei,xi=s&&s.__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)},Ai=s&&s.__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};Object.defineProperty(kn,"__esModule",{value:!0}),kn.LayoutModule=void 0;const Pi=d,Mi=Ln,_i=ai;class Oi extends Pi.Base{constructor(){super(...arguments),vi.add(this),Ci.set(this,!1),bi.set(this,null),this.init=async(e={})=>{if(this.wire.sendAction("layout-init").catch((e=>{})),!this.wire.environment.layoutAllowedInContext(this.fin))throw new Error("Layout.init can only be called from a Window context.");if(xi(this,Ci,"f"))throw new Error("Layout.init was already called, please use Layout.create to add additional layouts.");"openfin"===this.wire.environment.type&&await this.fin.Platform.getCurrentSync().getClient(),Ai(this,Ci,!0,"f"),Ai(this,bi,await this.wire.environment.initLayoutManager(this.fin,this.wire,e),"f"),await this.wire.environment.applyLayoutSnapshot(this.fin,xi(this,bi,"f"),e);const t={name:this.fin.me.name,uuid:this.fin.me.uuid};if(!e.layoutManagerOverride){const e={layoutName:_i.DEFAULT_LAYOUT_KEY,...t};return xi(this,Ii,"f").call(this,e)}return this.wrapSync(t)},Ii.set(this,(e=>{const t="[Layout] You are using a deprecated property `layoutManager` - it will throw if you access it starting in v37.",n=new Proxy({},{get(e,n){throw console.warn(`[Layout-mgr-proxy] accessing ${n.toString()}`),new Error(t)}}),i=Object.assign(this.wrapSync(e),{layoutManager:n});return new Proxy(i,{get(e,n){if("layoutManager"===n)throw console.warn(`[Layout-proxy] accessing ${n.toString()}`),new Error(t);return e[n]}})})),this.getCurrentLayoutManagerSync=()=>xi(this,vi,"m",Ei).call(this,"fin.Platform.Layout.getCurrentLayoutManagerSync()"),this.create=async e=>this.wire.environment.createLayout(xi(this,vi,"m",Ei).call(this,"fin.Platform.Layout.create()"),e),this.destroy=async e=>this.wire.environment.destroyLayout(xi(this,vi,"m",Ei).call(this,"fin.Platform.Layout.destroy()"),e)}async wrap(e){return this.wire.sendAction("layout-wrap").catch((e=>{})),new Mi.Layout(e,this.wire)}wrapSync(e){return this.wire.sendAction("layout-wrap-sync").catch((e=>{})),new Mi.Layout(e,this.wire)}async getCurrent(){if(this.wire.sendAction("layout-get-current").catch((e=>{})),"openfin"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error("You are not in a Window context. Only Windows can have a Layout.");const{uuid:e,name:t}=this.fin.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction("layout-get-current-sync").catch((e=>{})),"openfin"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error("You are not in a Window context. Only Windows can have a Layout.");const{uuid:e,name:t}=this.fin.me;return this.wrapSync({uuid:e,name:t})}async getLayoutByViewIdentity(e){this.wire.sendAction("layout-get-by-view-identity").catch((()=>{}));let t=await this.wire.environment.getViewWindowIdentity(this.fin,e);t.identity&&(t=t.identity);try{const n=this.wrapSync(t),i=await Mi.Layout.getClient(n),r=await i.getLayoutIdentityForViewOrThrow(e);return this.wrapSync(r)}catch(n){if(!["No action registered at target for","getLayoutIdentityForViewOrThrow is not a function"].some((e=>n.message.includes(e))))throw n;if(t.uuid===t.name)throw new Error(`View identity ${JSON.stringify(e)} is not attached to any layout in provider window ${JSON.stringify(t)}.`);return this.wrapSync(t)}}}kn.LayoutModule=Oi,Ci=new WeakMap,bi=new WeakMap,Ii=new WeakMap,vi=new WeakSet,Ei=function(e){if(!xi(this,bi,"f"))throw new Error(`You must call init before using the API ${e}`);return xi(this,bi,"f")},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(kn,e),n(Ln,e)}(jn),Object.defineProperty(Pn,"__esModule",{value:!0}),Pn.PlatformModule=void 0;const Si=d,Ri=Mn,Fi=jn;class ji extends Si.Base{constructor(e,t){super(e),this._channel=t,this.Layout=new Fi.LayoutModule(this.wire)}async init(e){if(!fin.__internal_.isPlatform||fin.me.name!==fin.me.uuid)throw new Error("fin.Platform.init should only be called from a custom platform provider running in the main window of the application.");return this.wire.environment.initPlatform(this.fin,e)}async wrap(e){return this.wire.sendAction("platform-wrap").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}wrapSync(e){return this.wire.sendAction("platform-wrap-sync").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}async getCurrent(){return this.wire.sendAction("platform-get-current").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction("platform-get-current-sync").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}start(e){return this.wire.sendAction("platform-start").catch((e=>{})),new Promise((async(t,n)=>{try{const{uuid:n}=e,i=await this.fin.Application._create({...e,isPlatformController:!0});i.once("platform-api-ready",(()=>t(this.wrapSync({uuid:n})))),i._run({uuid:n})}catch(e){n(e)}}))}startFromManifest(e,t){return this.wire.sendAction("platform-start-from-manifest").catch((e=>{})),new Promise((async(n,i)=>{try{const i=await this.fin.Application._createFromManifest(e);i.once("platform-api-ready",(()=>n(this.wrapSync({uuid:i.identity.uuid})))),i._run(t)}catch(e){i(e)}}))}}Pn.PlatformModule=ji,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Pn,e),n(Mn,e)}(An);var ki={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getMe=e.getBaseMe=e.environmentUnsupportedMessage=void 0;const t=J(),n=un,i=ie(),r=rn;function o(e,t,n){return{...{isView:"view"===e,isWindow:"window"===e,isFrame:"iframe"===e,isExternal:"external connection"===e},uuid:t,name:n,entityType:e}}e.environmentUnsupportedMessage="You are not running in OpenFin.",e.getBaseMe=o,e.getMe=function(s){const{uuid:a,name:c,entityType:d}=s.me,h={setContext(){throw new Error(e.environmentUnsupportedMessage)},addContextHandler(){throw new Error(e.environmentUnsupportedMessage)},getContextGroups(){throw new Error(e.environmentUnsupportedMessage)},joinContextGroup(){throw new Error(e.environmentUnsupportedMessage)},removeFromContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getAllClientsInContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getInfoForContextGroup(){throw new Error(e.environmentUnsupportedMessage)}},l="Interop API has not been instantiated. Either connection has failed or you have not declared interop in your config.",u={setContext(){throw new Error(l)},addContextHandler(){throw new Error(l)},getContextGroups(){throw new Error(l)},joinContextGroup(){throw new Error(l)},removeFromContextGroup(){throw new Error(l)},getAllClientsInContextGroup(){throw new Error(l)},getInfoForContextGroup(){throw new Error(l)}},p={eventNames:()=>{throw new Error(e.environmentUnsupportedMessage)},emit:()=>{throw new Error(e.environmentUnsupportedMessage)},listeners:()=>{throw new Error(e.environmentUnsupportedMessage)},listenerCount:()=>{throw new Error(e.environmentUnsupportedMessage)},on:()=>{throw new Error(e.environmentUnsupportedMessage)},addListener:()=>{throw new Error(e.environmentUnsupportedMessage)},once:()=>{throw new Error(e.environmentUnsupportedMessage)},prependListener:()=>{throw new Error(e.environmentUnsupportedMessage)},prependOnceListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeAllListeners:()=>{throw new Error(e.environmentUnsupportedMessage)}};switch(d){case"view":return Object.assign(new t.View(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case"window":return Object.assign(new i._Window(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case"iframe":return Object.assign(new n._Frame(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case"external connection":return Object.assign(new r.ExternalApplication(s,{uuid:a}),o(d,a,c),{interop:u,isOpenFin:!1});default:return{...o(d,a,c),...p,interop:h,isOpenFin:!1}}}}(ki);var Li={},Ti={},$i={};Object.defineProperty($i,"__esModule",{value:!0}),$i.createWarningObject=$i.createUnusableObject=void 0,$i.createUnusableObject=function(e){const t=()=>{throw new Error(e)};return new Proxy({},{apply:t,construct:t,defineProperty:t,deleteProperty:t,get:t,getOwnPropertyDescriptor:t,getPrototypeOf:t,has:t,isExtensible:t,ownKeys:t,preventExtensions:t,set:t,setPrototypeOf:t})},$i.createWarningObject=function(e,t){return new Proxy(t,{get:(...t)=>(console.warn(e),Reflect.get(...t)),set:(...t)=>(console.warn(e),Reflect.set(...t)),getOwnPropertyDescriptor:(...t)=>(console.warn(e),Reflect.getOwnPropertyDescriptor(...t)),ownKeys:(...t)=>(console.warn(e),Reflect.ownKeys(...t))})};var Bi,Gi={},Wi={};var Hi={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.wrapIntentHandler=e.BROKER_ERRORS=e.generateOverrideWarning=e.generateOverrideError=e.wrapContextHandler=e.wrapInTryCatch=e.generateId=void 0;e.generateId=()=>`${Math.random()}${Date.now()}`;e.wrapInTryCatch=(e,t)=>(...n)=>{try{return e(...n)}catch(e){throw new Error((t||"")+e)}};e.wrapContextHandler=(e,t)=>async n=>{try{await e(n)}catch(e){throw console.error(`Error thrown by handler ${t} for context type ${n.type}: ${e}`),e}};e.generateOverrideError=(e,t)=>`You have tried to to use ${e} but ${t} has not been overridden in the Interop Broker. Please override this function. Refer to our documentation for more info.`;e.generateOverrideWarning=(e,t,n,i)=>{const{uuid:r,name:o}=n;return i?`Entity with identity: ${r}/${o} has called ${i} or ${e} but ${t} has not been overridden.`:`Entity with identity: ${r}/${o} has called ${e} but ${t} has not been overridden.`},e.BROKER_ERRORS={fireIntent:(0,e.generateOverrideError)("fireIntent","handleFiredIntent"),fireIntentForContext:(0,e.generateOverrideError)("fireIntentForContext","handleFiredIntentForContext"),getInfoForIntent:(0,e.generateOverrideError)("getInfoForIntent","handleInfoForIntent"),getInfoForIntentsByContext:(0,e.generateOverrideError)("getInfoForIntentsByContext","handleInfoForIntentsByContext"),joinSessionContextGroupWithJoinContextGroup:"The Context Group you have tried to join is a Session Context Group. Custom Context Groups can only be defined by the Interop Broker through code or manifest configuration. Please use joinSessionContextGroup.",fdc3Open:(0,e.generateOverrideError)("fdc3.open","fdc3HandleOpen"),fdc3FindInstances:(0,e.generateOverrideError)("fdc3.findInstances","fdc3HandleFindInstances"),fdc3GetAppMetadata:(0,e.generateOverrideError)("fdc3.getAppMetadata","fdc3HandleGetAppMetadata"),fdc3GetInfo:(0,e.generateOverrideError)("fdc3.getInfo","fdc3HandleGetInfo")};e.wrapIntentHandler=(e,t)=>async n=>{try{return e(n)}catch(e){throw console.error(`Error thrown by handler ${t}: ${e}`),e}}}(Hi);var Ni,Di,Ui={};function Vi(){if(Di)return Gi;Di=1;var e,t,n,r=s&&s.__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},o=s&&s.__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)},a=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Gi,"__esModule",{value:!0}),Gi.InteropBroker=void 0;const c=d,h=a(function(){if(Bi)return Wi;Bi=1,Object.defineProperty(Wi,"__esModule",{value:!0});const e=Cr();return Wi.default=class{constructor(e,t){this.provider=e,this.id=t,this.lastContext=void 0,this.contextGroupMap=new Map,this.clients=new Map,this.registerListeners()}registerListeners(){this.provider.register(`sessionContextGroup:getContext-${this.id}`,this.getCurrentContext.bind(this)),this.provider.register(`sessionContextGroup:setContext-${this.id}`,this.setContext.bind(this)),this.provider.register(`sessionContextGroup:handlerAdded-${this.id}`,this.handlerAdded.bind(this)),this.provider.register(`sessionContextGroup:handlerRemoved-${this.id}`,this.handlerRemoved.bind(this))}getCurrentContext(e){return e.type?this.contextGroupMap.get(e.type):this.lastContext}setContext(t,n){const{context:i}=t,r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name} not in Session Client State Map`);this.contextGroupMap.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{e.contextHandlers.get(i.type)?.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getClientState(e){return this.clients.get(e.endpointId)}async handlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(i){const e=r.contextHandlers.get(i)||[];r.contextHandlers.set(i,[...e,n]);const o=this.contextGroupMap.get(i);o&&await this.provider.dispatch(t,n,o)}else{r.globalHandler=n;const e=[...this.contextGroupMap.keys()].map((async e=>{const i=this.contextGroupMap.get(e);i&&await this.provider.dispatch(t,n,i)}));await Promise.all(e)}}handlerRemoved(e,t){const{handlerId:n}=e,i=this.clients.get(t.endpointId);i?(Array.from(i.contextHandlers).forEach((([,e])=>{const t=e.indexOf(n);t>-1&&e.splice(t,1)})),i.globalHandler===n&&(i.globalHandler=void 0)):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={contextHandlers:new Map,clientIdentity:e,globalHandler:void 0};this.clients.set(e.endpointId,t)}}onDisconnection(e){this.clients.delete(e.endpointId)}},Wi}()),l=Hi,u=a(i),p=function(){if(Ni)return Ui;Ni=1,Object.defineProperty(Ui,"__esModule",{value:!0}),Ui.PrivateChannelProvider=void 0;const e=Vi();return Ui.PrivateChannelProvider=class t{constructor(e,t){this.provider=e,this.id=t,this.clients=new Map,this.registerListeners(),this.contextByContextType=new Map,this.lastContext=void 0,this.provider.onConnection((e=>this.registerNewClient(e))),this.provider.onDisconnection((async e=>{const{endpointId:t}=e;this.clients.has(t)&&await this.handleClientDisconnecting(e),0===(await this.provider.getAllClientInfo()).length&&this.provider.destroy()}))}getClientState(e){return this.clients.get(e.endpointId)}registerListeners(){this.provider.register("broadcast",this.broadcast.bind(this)),this.provider.register("getCurrentContext",this.getCurrentContext.bind(this)),this.provider.register("contextHandlerAdded",this.contextHandlerAdded.bind(this)),this.provider.register("contextHandlerRemoved",this.contextHandlerRemoved.bind(this)),this.provider.register("nonStandardHandlerRemoved",this.nonStandardHandlerRemoved.bind(this)),this.provider.register("onAddContextHandlerAdded",this.onAddContextHandlerAdded.bind(this)),this.provider.register("onDisconnectHandlerAdded",this.onDisconnectHandlerAdded.bind(this)),this.provider.register("onUnsubscribeHandlerAdded",this.onUnsubscribeHandlerAdded.bind(this)),this.provider.register("clientDisconnecting",((e,t)=>{this.handleClientDisconnecting(t)}))}broadcast(t,n){const{context:i}=t;if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name}, tried to call broadcast, is not connected to this Private Channel`);const r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to broadcast - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);this.contextByContextType.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{const t=e.handlerIdsByContextTypes.get(i.type);t&&t.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getCurrentContext(e,t){const{contextType:n}=e;if(!this.getClientState(t))throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call getCurrentContext, is not connected to this Private Channel`);if(void 0!==n){return this.contextByContextType.get(n)||null}return this.lastContext?this.lastContext:null}contextHandlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call addContextListener, is not connected to this Private Channel`);if(i){const e=r.handlerIdsByContextTypes.get(i)||[];r.handlerIdsByContextTypes.set(i,[...e,n])}else r.globalHandler=n;Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&e.onAddContextListenerHandlerId&&this.provider.dispatch(e.clientIdentity,e.onAddContextListenerHandlerId,i)}))}async contextHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);if(i){let e;if(i.globalHandler===n)i.globalHandler=void 0;else for(const[t,r]of i.handlerIdsByContextTypes){const i=r.indexOf(n);i>-1&&(r.splice(i,1),e=t)}const r=(await this.getConnectedClients()).map((async n=>{const{clientIdentity:i,clientIdentity:{endpointId:r},onUnsubscribeHandlerId:o}=n;r!==t.endpointId&&o&&await this.provider.dispatch(i,o,e)}));try{await Promise.all(r)}catch(e){throw console.error(`Problem when attempting to dispatch to onUnsubscribeHandlers. Error: ${e} Removing Client: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}`),new Error(e)}}else console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}.`)}nonStandardHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);i?i.onDisconnectHandlerId===n?i.onDisconnectHandlerId=void 0:i.onAddContextListenerHandlerId===n?i.onAddContextListenerHandlerId=void 0:i.onUnsubscribeHandlerId===n&&(i.onUnsubscribeHandlerId=void 0):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}onAddContextHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onAddContextListener, is not connected to this Private Channel`);n.onAddContextListenerHandlerId=i,Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&Array.from(e.handlerIdsByContextTypes.keys()).forEach((e=>{this.provider.dispatch(t,i,e)}))}))}onDisconnectHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onDisconnect, is not connected to this Private Channel`);n.onDisconnectHandlerId=i}onUnsubscribeHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onUnsubscribe, is not connected to this Private Channel`);n.onUnsubscribeHandlerId=i}removeClient(e){const t=this.getClientState(e);if(!t)throw new Error(`Client with Identity: ${e.uuid} ${e.name}, tried to call disconnect, is not connected to this Private Channel`);t.handlerIdsByContextTypes.clear(),this.clients.delete(e.endpointId)}async fireOnDisconnectForOtherClients(e){const{endpointId:t}=e,n=(await this.getConnectedClients()).map((async e=>{const{clientIdentity:{endpointId:n},onDisconnectHandlerId:i}=e;n!==t&&i&&await this.provider.dispatch(e.clientIdentity,i)}));try{await Promise.all(n)}catch(t){throw console.error(`Problem when attempting to dispatch to onDisconnectHandlers. Error: ${t} Disconnecting Client: uuid: ${e.uuid}. name: ${e.name}. endpointId: ${e.endpointId}`),new Error(t)}}async unsubscribeAll(e){const{endpointId:t}=e,n=this.clients.get(t);if(n){const t=Array.from(n.handlerIdsByContextTypes.values()).flat(),i=n.globalHandler;if(t.length>0){const n=t.map((async t=>this.contextHandlerRemoved({handlerId:t},e)));try{await Promise.all(n)}catch(e){console.error(e.message)}}if(i)try{await this.contextHandlerRemoved({handlerId:i},e)}catch(e){console.error(e.message)}}}async handleClientDisconnecting(e){await this.unsubscribeAll(e),this.removeClient(e),await this.fireOnDisconnectForOtherClients(e)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={clientIdentity:e,handlerIdsByContextTypes:new Map,globalHandler:void 0,onAddContextListenerHandlerId:void 0,onUnsubscribeHandlerId:void 0,onDisconnectHandlerId:void 0};this.clients.set(e.endpointId,t)}}async getConnectedClients(){const e=await this.provider.getAllClientInfo();return Array.from(this.clients.values()).filter((t=>{const{uuid:n,name:i}=t.clientIdentity;return e.some((e=>i===e.name&&n===e.uuid))}))}static init(e,n){return new t(e,n)}},Ui}(),w=G,y=[{id:"green",displayMetadata:{color:"#00CC88",name:"green"}},{id:"purple",displayMetadata:{color:"#8C61FF",name:"purple"}},{id:"orange",displayMetadata:{color:"#FF8C4C",name:"orange"}},{id:"red",displayMetadata:{color:"#FF5E60",name:"red"}},{id:"pink",displayMetadata:{color:"#FF8FB8",name:"pink"}},{id:"yellow",displayMetadata:{color:"#E9FF8F",name:"yellow"}}];let f=class i extends c.Base{constructor(i,s,a){super(i),e.set(this,void 0),t.set(this,void 0),n.set(this,void 0),this.getProvider=()=>o(this,n,"f").getValue(),this.interopClients=new Map,this.contextGroupsById=new Map,r(this,t,a.contextGroups??[...y],"f"),r(this,e,a.fdc3Info,"f"),a?.logging&&(this.logging=a.logging),this.intentClientMap=new Map,this.lastContextMap=new Map,this.sessionContextGroupMap=new Map,r(this,n,new w.Lazy(s),"f"),this.setContextGroupMap(),this.setupChannelProvider()}static createClosedConstructor(...e){return class extends i{constructor(...t){if(t.length){const[n,i,r]=t;if(r&&"object"==typeof r&&!(0,u.default)(r,e[2]))return console.warn("You have modified the parameters of the InteropOverride constructor. This behavior is deprecated and will be removed in a future version. You can modify these options in your manifest. Please consult our Interop docs for guidance on migrating to the new override scheme."),void super(e[0],e[1],r);console.warn("You are attempting to pass arguments to the InteropOverride constructor. This is not necessary, and these passed arguments will be ignored. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.")}super(...e)}}}setContext({context:e},t){this.wire.sendAction("interop-broker-set-context").catch((e=>{}));const n=this.getClientState(t);if(!n||!n.contextGroupId)throw n?new Error("You must join a context group before you can set context."):new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);{const{contextGroupId:t}=n;this.setContextForGroup({context:e},t)}}setContextForGroup({context:e},t){this.wire.sendAction("interop-broker-set-context-for-group").catch((e=>{}));const n=this.contextGroupsById.get(t);if(!n)throw new Error(`Unable to set context for context group that isn't in the context group mapping: ${t}.`);const r=i.checkContextIntegrity(e);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(e)}`);const o=e.type;n.set(o,e),this.lastContextMap.set(t,o);Array.from(this.interopClients.values()).filter((e=>e.contextGroupId===t)).forEach((t=>{for(const[,n]of t.contextHandlers)i.isContextTypeCompatible(o,n.contextType)&&this.invokeContextHandler(t.clientIdentity,n.handlerId,e)}))}getCurrentContext(e,t){this.wire.sendAction("interop-broker-get-current-context").catch((e=>{}));const n=this.getClientState(t);if(!n?.contextGroupId)throw new Error("You must be a member of a context group to call getCurrentContext");const{contextGroupId:i}=n,r=this.contextGroupsById.get(i),o=this.lastContextMap.get(i),s=e?.contextType??o;return r&&s?r.get(s):void 0}async joinContextGroup({contextGroupId:e,target:t},n){if(this.wire.sendAction("interop-broker-join-context-group").catch((e=>{})),this.sessionContextGroupMap.has(e))throw new Error(l.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup);if(t){i.hasEndpointId(t)&&await this.addClientToContextGroup({contextGroupId:e},t);try{const n=this.channel.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name));if(!n.length)throw new Error(`Given Identity ${t.uuid} ${t.name} is not connected to the Interop Broker.`);n.length>1&&console.warn(`More than one connection found for identity ${t.uuid} ${t.name}`);const i=[];for(const t of n)i.push(this.addClientToContextGroup({contextGroupId:e},t));await Promise.all(i)}catch(e){throw new Error(e)}}else await this.addClientToContextGroup({contextGroupId:e},n)}async addClientToContextGroup({contextGroupId:e},t){this.wire.sendAction("interop-broker-add-client-to-context-group").catch((e=>{}));const n=this.getClientState(t);if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(!this.getContextGroups().find((t=>t.id===e)))throw new Error(`Attempting to join a context group that does not exist: ${e}. You may only join existing context groups.`);if(n.contextGroupId!==e){n.contextGroupId=e,await this.setCurrentContextGroupInClientOptions(t,e);const i=this.contextGroupsById.get(e);for(const[,e]of n.contextHandlers){const{contextType:n,handlerId:r}=e;if(void 0===n)i.forEach(((e,n)=>{this.invokeContextHandler(t,r,e)}));else if(i.has(n)){const e=i.get(n);e&&this.invokeContextHandler(t,r,e)}}}}async removeFromContextGroup({target:e},t){if(this.wire.sendAction("interop-broker-remove-from-context-group").catch((e=>{})),e){i.hasEndpointId(e)&&await this.removeClientFromContextGroup(e);try{const t=this.channel.connections.filter((t=>t.uuid===e.uuid&&t.name===e.name));if(!t.length)throw new Error(`No connection found for given Identity ${e.uuid} ${e.name}`);t.length>1&&console.warn(`More than one connection found for identity ${e.uuid} ${e.name}`);const n=[];for(const e of t)n.push(this.removeClientFromContextGroup(e));await Promise.all(n)}catch(e){throw new Error(e)}}else await this.removeClientFromContextGroup(t)}async removeClientFromContextGroup(e){this.wire.sendAction("interop-broker-remove-client-from-context-group").catch((e=>{}));const t=this.getClientState(e);t&&(t.contextGroupId=void 0),await this.setCurrentContextGroupInClientOptions(e,null)}getContextGroups(){return this.wire.sendAction("interop-broker-get-context-groups").catch((e=>{})),o(this,t,"f").map((e=>({...e})))}getInfoForContextGroup({contextGroupId:e}){return this.wire.sendAction("interop-broker-get-info-for-context-group").catch((e=>{})),this.getContextGroups().find((t=>t.id===e))}getAllClientsInContextGroup({contextGroupId:e}){this.wire.sendAction("interop-broker-get-all-clients-in-context-group").catch((e=>{}));return Array.from(this.interopClients.values()).filter((t=>t.contextGroupId===e)).map((e=>e.clientIdentity))}async handleFiredIntent(e,t){const n=(0,l.generateOverrideWarning)("fdc3.raiseIntent","InteropBroker.handleFiredIntent",t,"interopClient.fireIntent");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntent)}async setIntentTarget(e,t){this.wire.sendAction("interop-broker-set-intent-target").catch((e=>{}));const n=this.intentClientMap.get(t.name),i=`intent-handler-${e.name}`;if(n){const t=n.get(i);if(t){if(t.pendingIntents.push(e),t.clientIdentity&&t.isReady){const{clientIdentity:e,pendingIntents:n}=t;try{const r=n[n.length-1];await this.invokeIntentHandler(e,i,r),t.pendingIntents=[]}catch(n){console.error(`Error invoking intent handler for client ${e.uuid}/${e.name}/${e.endpointId}`),t.isReady=!1}}}else n.set(i,{isReady:!1,pendingIntents:[e]})}else{this.intentClientMap.set(t.name,new Map);const n=this.intentClientMap.get(t.name);n&&n.set(i,{isReady:!1,pendingIntents:[e]})}}async handleInfoForIntent(e,t){const n=(0,l.generateOverrideWarning)("fdc3.findIntent","InteropBroker.handleInfoForIntent",t,"interopClient.getInfoForIntent");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntent)}async handleInfoForIntentsByContext(e,t){const n=(0,l.generateOverrideWarning)("fdc3.findIntentsByContext","InteropBroker.handleInfoForIntentsByContext",t,"interopClient.getInfoForIntentsByContext");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntentsByContext)}async handleFiredIntentForContext(e,t){const n=(0,l.generateOverrideWarning)("fdc3.raiseIntentForContext","InteropBroker.handleFiredIntentForContext",t,"interopClient.fireIntentForContext");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntentForContext)}async clientDisconnected(e){}async fdc3HandleOpen({app:e,context:t},n){const i=(0,l.generateOverrideWarning)("fdc3.open","InteropBroker.fdc3HandleOpen",n);throw console.warn(i),new Error(l.BROKER_ERRORS.fdc3Open)}async fdc3HandleFindInstances(e,t){const n=(0,l.generateOverrideWarning)("fdc3.open","InteropBroker.fdc3HandleFindInstances",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3FindInstances)}async fdc3HandleGetAppMetadata(e,t){const n=(0,l.generateOverrideWarning)("fdc3.getAppMetadata","InteropBroker.fdc3HandleGetAppMetadata",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3GetAppMetadata)}async invokeContextHandler(e,t,n){const i=await this.getProvider();try{await i.dispatch(e,t,n)}catch(i){console.error(`Error invoking context handler ${t} for context type ${n.type} in client ${e.uuid}/${e.name}/${e.endpointId}`,i)}}async invokeIntentHandler(e,t,n){const i=await this.getProvider();await i.dispatch(e,t,n)}async fdc3HandleGetInfo(t,n){const{fdc3Version:i}=t;return{fdc3Version:i,...o(this,e,"f"),optionalFeatures:{OriginatingAppMetadata:!1,UserChannelMembershipAPIs:!0},appMetadata:{appId:"",instanceId:""}}}async getAllClientInfo(){return(await this.getProvider()).getAllClientInfo()}decorateSnapshot(e){return{...e,interopSnapshotDetails:{contextGroupStates:this.getContextGroupStates()}}}applySnapshot(e,t){const n=e?.interopSnapshotDetails?.contextGroupStates;n&&(t?.closeExistingWindows||this.updateExistingClients(n),this.rehydrateContextGroupStates(n))}updateExistingClients(e){this.interopClients.forEach((t=>{const{clientIdentity:n,contextGroupId:r,contextHandlers:o}=t;if(r){const t=e[r];for(const[,e]of Object.entries(t))o.forEach((t=>{const{handlerId:r,contextType:o}=t;i.isContextTypeCompatible(e.type,o)&&this.invokeContextHandler(n,r,e)}))}}))}getContextGroupStates(){return i.toObject(this.contextGroupsById)}rehydrateContextGroupStates(e){const t=Object.entries(e);for(const[e,n]of t){const t=Object.entries(n);for(const[n,i]of t)if(this.contextGroupsById.has(e)){this.contextGroupsById.get(e).set(n,i)}else console.warn(`Attempting to set a context group that isn't in the context group mapping. Skipping context group rehydration for: ${e}`)}}contextHandlerRegistered({contextType:e,handlerId:t},n){const i={contextType:e,handlerId:t},r=this.getClientState(n);if(r?.contextHandlers.set(t,i),r&&r.contextGroupId){const{contextGroupId:i}=r,o=this.contextGroupsById.get(i);if(void 0===e)o.forEach(((e,i)=>{this.invokeContextHandler(n,t,e)}));else if(o.has(e)){const i=o.get(e);i&&this.invokeContextHandler(n,t,i)}}}async intentHandlerRegistered(e,t){const{handlerId:n}=e,i=this.intentClientMap.get(t.name),r=i?.get(n);if(i)if(r){const{pendingIntents:e}=r;r.clientIdentity=t,r.isReady=!0;try{if(e.length>0){const i=e[e.length-1];await this.invokeIntentHandler(t,n,i),r.pendingIntents=[]}}catch(e){console.error(`Error invoking intent handler: ${n} for client ${t.uuid}/${t.name}/${t.endpointId}`)}}else i.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t});else{this.intentClientMap.set(t.name,new Map);const e=this.intentClientMap.get(t.name);e&&e.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t})}}removeContextHandler({handlerId:e},t){const n=this.getClientState(t);n&&n.contextHandlers.delete(e)}handleJoinSessionContextGroup({sessionContextGroupId:e},t){try{if(!e)throw new Error("Failed to join session context group: must specify group id.");const n=this.sessionContextGroupMap.get(e);if(n)n.registerNewClient(t);else{const n=new h.default(this.channel,e);n.registerNewClient(t),this.sessionContextGroupMap.set(e,n)}return{hasConflict:this.contextGroupsById.has(e)}}catch(e){throw new Error(e)}}getClientState(e){return this.interopClients.get(e.endpointId)}static toObject(e){const t=Object.fromEntries(e),n={};return Object.entries(t).forEach((([e,t])=>{const i=Object.fromEntries(t);n[e]=i})),n}static checkContextIntegrity(e){if(!e)return{isValid:!1,reason:"No context supplied"};if("object"!=typeof e)return{isValid:!1,reason:"Context must be an Object"};if(!e.type)return{isValid:!1,reason:"Context must have a type property"};if(e.id&&"object"!=typeof e.id)return{isValid:!1,reason:"Context id must be an Object populated with key-value identifiers (if set)"};if(e.id){const{id:t}=e,n=Object.keys(t);let i=!1;if(!n.length)return{isValid:!1,reason:"Context id must have at least one key-value identifier"};if(n.forEach((e=>{"string"==typeof e&&"string"==typeof t[e]||(i=!0)})),i)return{isValid:!1,reason:"Context id key-value identifiers must be of type string"}}return e.name&&"string"!=typeof e.name?{isValid:!1,reason:"Context name must be of string type (if set)"}:{isValid:!0}}static hasEndpointId(e){return void 0!==e.endpointId}static isContextTypeCompatible(e,t){return void 0===t||e===t}setContextGroupMap(){for(const e of this.getContextGroups())this.contextGroupsById.set(e.id,new Map)}async setCurrentContextGroupInClientOptions(e,t){try{const n=await this.fin.System.getEntityInfo(e.uuid,e.name);let i;"view"===n.entityType?i=await this.fin.View.wrap(e):"window"===n.entityType&&(i=await this.fin.Window.wrap(e)),i&&await i.updateOptions({interop:{currentContextGroup:t}})}catch(e){}}async setupChannelProvider(){try{const e=await this.getProvider();this.channel=e,this.wireChannel(e)}catch(e){throw new Error(`Error setting up Interop Broker Channel Provider: ${e}`)}}wireChannel(e){e.onConnection((async(e,t)=>{if(!await this.isConnectionAuthorized(e,t))throw new Error(`Connection not authorized for ${e.uuid}, ${e.name}`);if(!e.endpointId)throw new Error("Version too old to be compatible with Interop. Please upgrade your runtime to a more recent version.");const n={contextGroupId:void 0,contextHandlers:new Map,clientIdentity:e};t?.currentContextGroup&&this.contextGroupsById.has(t.currentContextGroup)&&(n.contextGroupId=t?.currentContextGroup),this.interopClients.set(e.endpointId,n)})),e.onDisconnection((e=>{this.interopClients.delete(e.endpointId);const t=this.intentClientMap.get(e.name);t&&e.uuid===this.fin.me.uuid&&t.forEach((e=>{e.isReady=!1})),this.sessionContextGroupMap.forEach((t=>{t.onDisconnection(e)})),this.clientDisconnected(e)})),e.beforeAction((async(e,t,n)=>{if(!await this.isActionAuthorized(e,t,n))throw new Error(`Action (${e}) not authorized for ${n.uuid}, ${n.name}`);this.logging?.beforeAction?.enabled&&console.log(e,t,n)})),e.afterAction(((e,t,n)=>{this.logging?.afterAction?.enabled&&console.log(e,t,n)})),e.register("setContext",this.setContext.bind(this)),e.register("fireIntent",this.handleFiredIntent.bind(this)),e.register("getCurrentContext",this.getCurrentContext.bind(this)),e.register("getInfoForIntent",this.handleInfoForIntent.bind(this)),e.register("getInfoForIntentsByContext",this.handleInfoForIntentsByContext.bind(this)),e.register("fireIntentForContext",this.handleFiredIntentForContext.bind(this)),e.register("getContextGroups",this.getContextGroups.bind(this)),e.register("joinContextGroup",this.joinContextGroup.bind(this)),e.register("removeFromContextGroup",this.removeFromContextGroup.bind(this)),e.register("getAllClientsInContextGroup",this.getAllClientsInContextGroup.bind(this)),e.register("getInfoForContextGroup",this.getInfoForContextGroup.bind(this)),e.register("contextHandlerRegistered",this.contextHandlerRegistered.bind(this)),e.register("intentHandlerRegistered",this.intentHandlerRegistered.bind(this)),e.register("removeContextHandler",this.removeContextHandler.bind(this)),e.register("sessionContextGroup:createIfNeeded",this.handleJoinSessionContextGroup.bind(this)),e.register("fdc3Open",this.fdc3HandleOpen.bind(this)),e.register("fdc3v2FindIntentsByContext",this.handleInfoForIntentsByContext.bind(this)),e.register("fdc3FindInstances",this.fdc3HandleFindInstances.bind(this)),e.register("fdc3GetAppMetadata",this.fdc3HandleGetAppMetadata.bind(this)),e.register("fdc3v2GetInfo",(async(e,t)=>this.fdc3HandleGetInfo.bind(this)(e,t))),e.register("createPrivateChannelProvider",(async e=>{const{channelId:t}=e,n=await this.fin.InterApplicationBus.Channel.create(t);p.PrivateChannelProvider.init(n,t)}))}isConnectionAuthorized(e,t){return this.wire.sendAction("interop-broker-is-connection-authorized").catch((e=>{})),Promise.resolve(!0)}isActionAuthorized(e,t,n){return this.wire.sendAction("interop-broker-is-action-authorized").catch((e=>{})),Promise.resolve(!0)}};return Gi.InteropBroker=f,e=new WeakMap,t=new WeakMap,n=new WeakMap,Gi}var zi,Ki={},qi={},Ji=s&&s.__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},Yi=s&&s.__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)};Object.defineProperty(qi,"__esModule",{value:!0});const Zi=d,Qi=Hi;class Xi extends Zi.Base{constructor(e,t,n){super(e),zi.set(this,void 0),this.id=n,Ji(this,zi,t,"f")}async setContext(e){this.wire.sendAction("interop-session-context-group-set-context").catch((e=>{}));return(await Yi(this,zi,"f")).dispatch(`sessionContextGroup:setContext-${this.id}`,{sessionContextGroupId:this.id,context:e})}async getCurrentContext(e){this.wire.sendAction("interop-session-context-group-get-context").catch((e=>{}));return(await Yi(this,zi,"f")).dispatch(`sessionContextGroup:getContext-${this.id}`,{sessionContextGroupId:this.id,type:e})}async addContextHandler(e,t){if(this.wire.sendAction("interop-session-context-group-add-handler").catch((e=>{})),"function"!=typeof e)throw new Error("Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");const n=await Yi(this,zi,"f");let i;return i=t?`sessionContextHandler:invoke-${this.id}-${t}-${(0,Qi.generateId)()}`:`sessionContextHandler:invoke-${this.id}`,n.register(i,(0,Qi.wrapContextHandler)(e,i)),await n.dispatch(`sessionContextGroup:handlerAdded-${this.id}`,{handlerId:i,contextType:t}),{unsubscribe:await this.createUnsubscribeCb(i)}}async createUnsubscribeCb(e){const t=await Yi(this,zi,"f");return async()=>{t.remove(e),await t.dispatch(`sessionContextGroup:handlerRemoved-${this.id}`,{handlerId:e})}}getUserInstance(){return{id:this.id,setContext:(0,Qi.wrapInTryCatch)(this.setContext.bind(this),"Failed to set context: "),getCurrentContext:(0,Qi.wrapInTryCatch)(this.getCurrentContext.bind(this),"Failed to get context: "),addContextHandler:(0,Qi.wrapInTryCatch)(this.addContextHandler.bind(this),"Failed to add context handler: ")}}}qi.default=Xi,zi=new WeakMap;var er={},tr={},nr={},ir={},rr=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),or=s&&s.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),sr=s&&s.__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)&&rr(t,e,n);return or(t,e),t};Object.defineProperty(ir,"__esModule",{value:!0}),ir.PrivateChannelClient=void 0;const ar=sr(Hi);var cr,dr;function hr(){if(cr)return tr;cr=1;var e,t=s&&s.__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)},n=s&&s.__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},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(tr,"__esModule",{value:!0}),tr.FDC3ModuleBase=void 0;const o=nr,a=Hi,c=wr(),d=r(i);return tr.FDC3ModuleBase=class{get client(){return t(this,e,"f").call(this)}get fin(){return this.wire.getFin()}constructor(t,i){this.wire=i,e.set(this,void 0),n(this,e,t,"f")}async broadcast(e){return this.wire.sendAction("fdc3-broadcast").catch((e=>{})),this.client.setContext(e)}async _open(e,t){this.wire.sendAction("fdc3-open").catch((e=>{}));try{return await c.InteropClient.ferryFdc3Call(this.client,"fdc3Open",{app:e,context:t})}catch(e){const t=e.message===a.BROKER_ERRORS.fdc3Open?"ResolverUnavailable":e.message;throw new Error(t)}}async _getChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:"system",...(0,o.getUnsupportedChannelApis)()})))}async getOrCreateChannel(e){this.wire.sendAction("fdc3-get-or-create-channel").catch((e=>{}));const t=(await this._getChannels()).find((t=>t.id===e));if(t)return{...t,type:"system",...(0,o.getUnsupportedChannelApis)()};try{const t=await this.client.joinSessionContextGroup(e);return(0,o.buildAppChannelObject)(t)}catch(e){throw console.error(e.message),new Error(o.ChannelError.CreationFailed)}}async getSystemChannels(){return this.wire.sendAction("fdc3-get-system-channels").catch((e=>{})),this._getChannels()}async joinChannel(e){this.wire.sendAction("fdc3-join-channel").catch((e=>{}));try{return await this.client.joinContextGroup(e)}catch(e){if(e.message===a.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup?console.error("The Channel you have tried to join is an App Channel. Custom Channels can only be defined by the Interop Broker through code or manifest configuration. Please use getOrCreateChannel."):console.error(e.message),e.message.startsWith("Attempting to join a context group that does not exist"))throw new Error(o.ChannelError.NoChannelFound);throw new Error(o.ChannelError.AccessDenied)}}async getCurrentChannel(){this.wire.sendAction("fdc3-get-current-channel").catch((e=>{}));const e=await this.getCurrentContextGroupInfo();return e?this.buildChannelObject(e):null}async leaveCurrentChannel(){return this.wire.sendAction("fdc3-leave-current-channel").catch((e=>{})),this.client.removeFromContextGroup()}async getCurrentContextGroupInfo(){const e=await this.client.getContextGroups(),t=e.map((async e=>this.client.getAllClientsInContextGroup(e.id))),n=(await Promise.all(t)).findIndex((e=>e.some((e=>{const{uuid:t,name:n}=e;return this.wire.me.uuid===t&&this.wire.me.name===n}))));return e[n]}async buildChannelObject(e){return{...e,type:"system",addContextListener:(...[e,t])=>{let n,i;"function"==typeof e?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),n=e):(n=t,"string"==typeof e&&(i=e));const r=(async()=>{let e=!0;const t=await this.client.getCurrentContext(i);return this.client.addContextHandler(((i,r)=>{if(!e||(e=!1,!(0,d.default)(t,i)))return n(i,r)}),i)})();return{...r,unsubscribe:()=>r.then((e=>e.unsubscribe()))}},broadcast:this.broadcast.bind(this),getCurrentContext:async e=>{const t=await this.client.getCurrentContext(e);return void 0===t?null:t}}}},e=new WeakMap,tr}ir.PrivateChannelClient=class{constructor(e,t){this.id=t,this.client=e,this.listeners=new Map}async broadcast(e){return this.client.dispatch("broadcast",{context:e})}async getCurrentContext(e){return this.client.dispatch("getCurrentContext",{contextType:e})}async addContextListener(e,t){if("function"!=typeof t)throw new Error("Non-function argument passed to the second parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");let n;n=e?`contextHandler:invoke-${this.id}-${e}-${ar.generateId()}`:`contextHandler:invoke-${this.id}-${ar.generateId()}`,this.client.register(n,ar.wrapContextHandler(t,n));const i={unsubscribe:await this.createContextUnsubscribeCb(n)};return this.listeners.set(n,i),await this.client.dispatch("contextHandlerAdded",{handlerId:n,contextType:e}),i}createNonStandardUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch("nonStandardHandlerRemoved",{handlerId:e})}}createContextUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch("contextHandlerRemoved",{handlerId:e})}}onAddContextListener(e){const t=`onContextHandlerAdded:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch("onAddContextHandlerAdded",{handlerId:t}),n}onDisconnect(e){const t=`onDisconnect:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch("onDisconnectHandlerAdded",{handlerId:t}),n}onUnsubscribe(e){const t=`onUnsubscribe:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch("onUnsubscribeHandlerAdded",{handlerId:t}),n}async cleanUpAllSubs(){Array.from(this.listeners.keys()).forEach((e=>{this.client.remove(e),this.listeners.delete(e)}))}async disconnect(){try{await this.client.dispatch("clientDisconnecting"),await this.cleanUpAllSubs(),await this.client.disconnect()}catch(e){throw new Error(e.message)}}},function(e){var t=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.getIntentResolution=e.isChannel=e.isContext=e.connectPrivateChannel=e.buildAppChannelObject=e.buildPrivateChannelObject=e.ChannelError=e.ResultError=e.UnsupportedChannelApiError=e.getUnsupportedChannelApis=void 0;const n=Hi,r=ir,o=t(i);e.getUnsupportedChannelApis=e=>({addContextListener:()=>{throw new a("Channel.addContextListener",e)},broadcast:()=>{throw new a("Channel.broadcast",e)},getCurrentContext:()=>{throw new a("Channel.getCurrentContext",e)}});class a extends Error{constructor(e,t="System"){super(e),this.message=`Calling ${e} on an instance of a ${t} Channel returned by fdc3.get${t}Channels is not supported. If you would like to use a ${t} Channel, please use fdc3.joinChannel, fdc3.addContextListener, and fdc3.broadcast instead.`}}var c,d;e.UnsupportedChannelApiError=a,function(e){e.NoResultReturned="NoResultReturned",e.IntentHandlerRejected="IntentHandlerRejected"}(c=e.ResultError||(e.ResultError={})),(d=e.ChannelError||(e.ChannelError={})).NoChannelFound="NoChannelFound",d.AccessDenied="AccessDenied",d.CreationFailed="CreationFailed";e.buildPrivateChannelObject=e=>{let t=!1;const n=()=>{if(t)throw new Error("Private Channel Client has been disconnected from the Private Channel")};return{id:e.id,type:"private",broadcast:async t=>(n(),e.broadcast(t)),getCurrentContext:async t=>(n(),e.getCurrentContext(t)),addContextListener:async(t,i)=>{n();let r=i,o=t;"function"==typeof t&&(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),r=t,o=null);return e.addContextListener(o,r)},onAddContextListener:t=>(n(),e.onAddContextListener(t)),disconnect:async()=>(n(),t=!0,e.disconnect()),onDisconnect:t=>(n(),e.onDisconnect(t)),onUnsubscribe:t=>(n(),e.onUnsubscribe(t))}};e.buildAppChannelObject=e=>({id:e.id,type:"app",broadcast:e.setContext,getCurrentContext:async t=>{const n=await e.getCurrentContext(t);return void 0===n?null:n},addContextListener:(t,n)=>{let i,r;"function"==typeof t?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),i=t):(i=n,"string"==typeof t&&(r=t));const s=(async()=>{let t=!0;const n=await e.getCurrentContext(r);return e.addContextHandler(((e,r)=>{if(!t||(t=!1,!(0,o.default)(n,e)))return i(e,r)}),r)})();return{...s,unsubscribe:()=>s.then((e=>e.unsubscribe()))}}});e.connectPrivateChannel=async t=>{try{const n=await fin.InterApplicationBus.Channel.connect(t),i=new r.PrivateChannelClient(n,t);return(0,e.buildPrivateChannelObject)(i)}catch(e){throw new Error(`Private Channel with id: ${t} doesn't exist`)}};e.isContext=e=>{if(e&&"object"==typeof e&&"type"in e){const{type:t}=e;return"string"==typeof t}return!1};e.isChannel=e=>{if(e&&"object"==typeof e&&"type"in e&&"id"in e){const{type:t,id:n}=e;return"string"==typeof t&&"string"==typeof n&&("app"===t||"private"===t)}return!1};e.getIntentResolution=async(t,i,r,o)=>{const s=(0,n.generateId)(),a=new Promise(((e,t)=>{fin.InterApplicationBus.subscribe({uuid:"*"},s,(t=>{e(t)})).catch((()=>t(new Error("getResult is not supported in this environment"))))})),d=r?{target:r,intentResolutionResultId:s}:{intentResolutionResultId:s},h=o?{name:o,context:i,metadata:d}:{...i,metadata:d},l=async()=>{let n=await a;if(!n||"object"!=typeof n)throw new Error(c.NoResultReturned);const{error:i}=n;if(i)throw new Error(c.IntentHandlerRejected);if((0,e.isChannel)(n)){const{id:i,type:r}=n;switch(r){case"private":n=await(0,e.connectPrivateChannel)(i);break;case"app":{const r=await t.joinSessionContextGroup(i);n=(0,e.buildAppChannelObject)(r);break}}}else if(!(0,e.isContext)(n))throw new Error(c.NoResultReturned);return n},u=o?await t.fireIntent(h):await t.fireIntentForContext(h);return"object"!=typeof u?{source:{appId:"",instanceId:""},intent:"",version:"2.0",getResult:l}:{...u,getResult:l}}}(nr);var lr,ur,pr={};function wr(){if(ur)return Ki;ur=1;var e,t,n=s&&s.__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},i=s&&s.__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)},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ki,"__esModule",{value:!0}),Ki.InteropClient=void 0;const o=d,a=r(qi),c=function(){if(dr)return er;dr=1,Object.defineProperty(er,"__esModule",{value:!0}),er.Fdc3Module=void 0;const e=Hi,t=hr();class n extends t.FDC3ModuleBase{async open(e,t){await super._open(e,t)}addContextListener(e,t){let n;return this.wire.sendAction("fdc3-add-context-listener").catch((e=>{})),"function"==typeof e?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),n=this.client.addContextHandler(e)):n=this.client.addContextHandler(t,null===e?void 0:e),{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}addIntentListener(e,t){this.wire.sendAction("fdc3-add-intent-listener").catch((e=>{}));const n=this.client.registerIntentHandler((e=>{const{context:n,metadata:i}=e,{metadata:r}=n,o=i?.intentResolutionResultId||r?.intentResolutionResultId;o&&this.fin.InterApplicationBus.publish(o,null).catch((()=>null)),t(e.context)}),e,{fdc3Version:"1.2"});return{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}async raiseIntent(t,n,i){this.wire.sendAction("fdc3-raise-intent").catch((e=>{}));const r=i?{name:t,context:n,metadata:{target:i}}:{name:t,context:n};try{return await this.client.fireIntent(r)}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntent?"ResolverUnavailable":t.message;throw new Error(n)}}async findIntent(t,n){this.wire.sendAction("fdc3-find-intent").catch((e=>{}));try{return await this.client.getInfoForIntent({name:t,context:n})}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntent?"ResolverUnavailable":t.message;throw new Error(n)}}async findIntentsByContext(t){this.wire.sendAction("fdc3-find-intents-by-context").catch((e=>{}));try{return await this.client.getInfoForIntentsByContext(t)}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntentsByContext?"ResolverUnavailable":t.message;throw new Error(n)}}async raiseIntentForContext(t,n){this.wire.sendAction("fdc3-raise-intent-for-context").catch((e=>{}));try{return await this.client.fireIntentForContext({...t,metadata:{target:n}})}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntentForContext?"ResolverUnavailable":t.message;throw new Error(n)}}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}getInfo(){return this.wire.sendAction("fdc3-get-info").catch((e=>{})),{providerVersion:this.wire.environment.getAdapterVersionSync(),provider:`openfin-${this.wire.me.uuid}`,fdc3Version:"1.2"}}}return er.Fdc3Module=n,er}(),h=function(){if(lr)return pr;lr=1,Object.defineProperty(pr,"__esModule",{value:!0}),pr.Fdc3Module2=void 0;const e=hr(),t=Hi,n=wr(),i=nr,r=ir;class o extends e.FDC3ModuleBase{async open(e,t){return"string"==typeof e&&console.warn("Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string })."),super._open(e,t)}async findInstances(e){this.wire.sendAction("fdc3-find-instances").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,"fdc3FindInstances",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3FindInstances?"ResolverUnavailable":e.message;throw new Error(n)}}async getAppMetadata(e){this.wire.sendAction("fdc3-get-app-metadata").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,"fdc3GetAppMetadata",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3GetAppMetadata?"ResolverUnavailable":e.message;throw new Error(n)}}async addContextListener(e,t){this.wire.sendAction("fdc3-add-context-listener").catch((e=>{}));const n=e=>t=>{const{contextMetadata:n,...i}=t,r=n?[{...i},n]:[t,null];e(...r)};let i=t,r=n(i);return"function"==typeof e?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),i=e,r=n(i),this.client.addContextHandler(r)):this.client.addContextHandler(r,null===e?void 0:e)}async findIntent(e,n,i){this.wire.sendAction("fdc3-find-intent").catch((e=>{}));try{return await this.client.getInfoForIntent({name:e,context:n,metadata:{resultType:i}})}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntent?"ResolverUnavailable":e.message;throw new Error(n)}}async findIntentsByContext(e,i){this.wire.sendAction("fdc3-find-intents-by-context").catch((e=>{}));const r=i?{context:e,metadata:{resultType:i}}:e;try{return await n.InteropClient.ferryFdc3Call(this.client,"fdc3v2FindIntentsByContext",r)}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntentsByContext?"ResolverUnavailable":e.message;throw new Error(n)}}async raiseIntent(e,n,r){this.wire.sendAction("fdc3-raise-intent").catch((e=>{}));try{return"string"==typeof r&&console.warn("Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string })."),(0,i.getIntentResolution)(this.client,n,r,e)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?"ResolverUnavailable":e.message;throw new Error(n)}}async raiseIntentForContext(e,n){this.wire.sendAction("fdc3-raise-intent-for-context").catch((e=>{}));try{return"string"==typeof n&&console.warn("Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string })."),(0,i.getIntentResolution)(this.client,e,n)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?"ResolverUnavailable":e.message;throw new Error(n)}}async addIntentListener(e,t){if(this.wire.sendAction("fdc3-add-intent-listener").catch((e=>{})),"string"!=typeof e)throw new Error("First argument must be an Intent name");return this.client.registerIntentHandler((async e=>{let n,i;const{context:r,metadata:o}=e,{contextMetadata:s,metadata:a,...c}=r,d=o?.intentResolutionResultId||a?.intentResolutionResultId;try{const e=a?{metadata:a,...c}:{...c};n=await t(e,s),i=n}catch(e){n=e,i={error:!0}}if(d&&this.fin.InterApplicationBus.publish(d,i).catch((()=>null)),n instanceof Error)throw new Error(n.message);return n}),e,{fdc3Version:"2.0"})}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}async createPrivateChannel(){const e=(0,t.generateId)();await n.InteropClient.ferryFdc3Call(this.client,"createPrivateChannelProvider",{channelId:e});const o=await this.fin.InterApplicationBus.Channel.connect(e),s=new r.PrivateChannelClient(o,e);return(0,i.buildPrivateChannelObject)(s)}async getUserChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:"user",...(0,i.getUnsupportedChannelApis)("User")})))}async getSystemChannels(){return console.warn("This API has been deprecated. Please use fdc3.getUserChannels instead."),super.getSystemChannels()}async joinUserChannel(e){return super.joinChannel(e)}async joinChannel(e){return console.warn("This API has been deprecated. Please use fdc3.joinUserChannel instead."),super.joinChannel(e)}async getCurrentChannel(){const e=await super.getCurrentChannel();return e?{...e,type:"user",broadcast:this.broadcast.bind(this)}:null}async getInfo(){return n.InteropClient.ferryFdc3Call(this.client,"fdc3v2GetInfo",{fdc3Version:"2.0"})}}return pr.Fdc3Module2=o,pr}(),l=Hi;let u=class extends o.Base{constructor(i,r){super(i),e.set(this,void 0),t.set(this,void 0),n(this,t,new Map,"f"),n(this,e,r,"f")}async setContext(t){this.wire.sendAction("interop-client-set-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("setContext",{context:t})}async addContextHandler(t,n){if(this.wire.sendAction("interop-client-add-context-handler").catch((e=>{})),"function"!=typeof t)throw new Error("Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");const r=await i(this,e,"f");let o;o=n?`invokeContextHandler-${n}-${(0,l.generateId)()}`:"invokeContextHandler";const s=(0,l.wrapContextHandler)(t,o);return r.register(o,s),await r.dispatch("contextHandlerRegistered",{handlerId:o,contextType:n}),{unsubscribe:async()=>{r.remove(o),await r.dispatch("removeContextHandler",{handlerId:o})}}}async getContextGroups(){this.wire.sendAction("interop-client-get-context-groups").catch((e=>{}));return(await i(this,e,"f")).dispatch("getContextGroups")}async joinContextGroup(t,n){this.wire.sendAction("interop-client-join-context-group").catch((e=>{}));const r=await i(this,e,"f");if(!t)throw new Error("No contextGroupId specified for joinContextGroup.");return r.dispatch("joinContextGroup",{contextGroupId:t,target:n})}async removeFromContextGroup(t){this.wire.sendAction("interop-client-remove-from-context-group").catch((e=>{}));return(await i(this,e,"f")).dispatch("removeFromContextGroup",{target:t})}async getAllClientsInContextGroup(t){this.wire.sendAction("interop-client-get-all-clients-in-context-group").catch((e=>{}));const n=await i(this,e,"f");if(!t)throw new Error("No contextGroupId specified for getAllClientsInContextGroup.");return n.dispatch("getAllClientsInContextGroup",{contextGroupId:t})}async getInfoForContextGroup(t){this.wire.sendAction("interop-client-get-info-for-context-group").catch((e=>{}));const n=await i(this,e,"f");if(!t)throw new Error("No contextGroupId specified for getInfoForContextGroup.");return n.dispatch("getInfoForContextGroup",{contextGroupId:t})}async fireIntent(t){this.wire.sendAction("interop-client-fire-intent").catch((e=>{}));return(await i(this,e,"f")).dispatch("fireIntent",t)}async registerIntentHandler(t,n,r){this.wire.sendAction("interop-client-register-intent-handler").catch((e=>{}));const o=await i(this,e,"f"),s=`intent-handler-${n}`,a=(0,l.wrapIntentHandler)(t,s);try{await o.register(s,a),await o.dispatch("intentHandlerRegistered",{handlerId:s,...r})}catch(e){throw new Error("Unable to register intent handler")}return{unsubscribe:async()=>{o.remove(s)}}}async getCurrentContext(t){this.wire.sendAction("interop-client-get-current-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("getCurrentContext",{contextType:t})}async getInfoForIntent(t){this.wire.sendAction("interop-client-get-info-for-intent").catch((e=>{}));return(await i(this,e,"f")).dispatch("getInfoForIntent",t)}async getInfoForIntentsByContext(t){this.wire.sendAction("interop-client-get-info-for-intents-by-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("getInfoForIntentsByContext",t)}async fireIntentForContext(t){this.wire.sendAction("interop-client-fire-intent-for-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("fireIntentForContext",t)}async joinSessionContextGroup(n){try{const r=i(this,t,"f").get(n);if(r)return r.getUserInstance();const o=await i(this,e,"f"),{hasConflict:s}=await o.dispatch("sessionContextGroup:createIfNeeded",{sessionContextGroupId:n});s&&console.warn(`A (non-session) context group with the name "${n}" already exists. If you are trying to join a Context Group, call joinContextGroup instead.`);const c=new a.default(this.wire,i(this,e,"f"),n);return i(this,t,"f").set(n,c),c.getUserInstance()}catch(e){throw console.error(`Error thrown trying to create Session Context Group with id "${n}": ${e}`),e}}async onDisconnection(t){this.wire.sendAction("interop-client-add-ondisconnection-listener").catch((e=>{}));return(await i(this,e,"f")).onDisconnection((e=>{const{uuid:n}=e;t({type:"interop-broker",topic:"disconnected",brokerName:n})}))}getFDC3Sync(e){switch(e){case"1.2":return new c.Fdc3Module((()=>this),this.wire);case"2.0":return new h.Fdc3Module2((()=>this),this.wire);default:throw new Error(`Invalid FDC3 version provided: ${e}. Must be '1.2' or '2.0'`)}}async getFDC3(e){return this.getFDC3Sync(e)}static async ferryFdc3Call(t,n,r){return(await i(t,e,"f")).dispatch(n,r||null)}};return Ki.InteropClient=u,e=new WeakMap,t=new WeakMap,Ki}var yr,fr,gr,mr={};function vr(){if(yr)return mr;yr=1,Object.defineProperty(mr,"__esModule",{value:!0}),mr.overrideCheck=mr.checkFDC32Overrides=mr.getDefaultViewFdc3VersionFromAppInfo=void 0;const e=Vi();function t(t){return["fdc3HandleFindInstances","handleInfoForIntent","handleInfoForIntentsByContext","fdc3HandleGetAppMetadata","fdc3HandleGetInfo","fdc3HandleOpen","handleFiredIntent","handleFiredIntentForContext"].filter((n=>t[n]===e.InteropBroker.prototype[n]))}return mr.getDefaultViewFdc3VersionFromAppInfo=function({manifest:e,initialOptions:t}){const n=e?.platform?.defaultViewOptions?.fdc3InteropApi??t.defaultViewOptions?.fdc3InteropApi;return["1.2","2.0"].includes(n??"")?n:void 0},mr.checkFDC32Overrides=t,mr.overrideCheck=function(e,n){if(n&&"2.0"===n){const n=t(e);n.length>0&&console.warn(`WARNING: FDC3 2.0 has been set as a default option for Views in this Platform, but the required InteropBroker APIs for FDC3 2.0 compliance have not all been overridden.\nThe following APIs need to be overridden:\n${n.join("\n")}`)}},mr}function Cr(){return gr||(gr=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),i=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),i(function(){if(fr)return Ti;fr=1;var e=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ti,"__esModule",{value:!0}),Ti.InteropModule=void 0;const t=e(n),i=$i,r=d,o=Vi(),a=wr(),c=vr(),h=Tn,l=e=>new e,u="You have attempted to use or modify InteropBroker parameters, which is not allowed. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.";class p extends r.Base{async init(e,n=l){this.wire.sendAction("interop-init").catch((()=>{}));const r=await this.wire.environment.getInteropInfo(this.wire.getFin()),s=(0,i.createUnusableObject)(u),a=(0,i.createWarningObject)(u,(0,t.default)(r)),d=async()=>{throw new Error(u)},p=o.InteropBroker.createClosedConstructor(this.wire,(()=>this.fin.InterApplicationBus.Channel.create(`interop-broker-${e}`)),r);let w;return w=Array.isArray(n)?new((0,h.overrideFromComposables)(...n)(p))(s,d,a):await n(p,s,d,a),(0,c.overrideCheck)(w,r.fdc3Version),w}connectSync(e,t){return this.wire.sendAction("interop-connect-sync").catch((()=>{})),new a.InteropClient(this.wire,this.wire.environment.whenReady().then((()=>this.fin.InterApplicationBus.Channel.connect(`interop-broker-${e}`,{payload:t}))))}}return Ti.InteropModule=p,Ti}(),e),i(wr(),e),i(Vi(),e)}(Li)),Li}var br={},Ir={},Er={},xr={};Object.defineProperty(xr,"__esModule",{value:!0}),xr.getSnapshotSourceChannelName=void 0;xr.getSnapshotSourceChannelName=e=>`snapshot-source-provider-${e.uuid}`;var Ar,Pr,Mr,_r,Or,Sr=s&&s.__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},Rr=s&&s.__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)};Object.defineProperty(Er,"__esModule",{value:!0}),Er.SnapshotSource=void 0;const Fr=d,jr=xr,kr=new Map;class Lr extends Fr.Base{constructor(e,t){super(e),Ar.set(this,void 0),Pr.set(this,(()=>(kr.has(this.identity.uuid)||kr.set(this.identity.uuid,{eventFired:null,clientPromise:null}),kr.get(this.identity.uuid)))),Mr.set(this,(()=>(Rr(this,Pr,"f").call(this).clientPromise||(Rr(this,Pr,"f").call(this).clientPromise=Rr(this,_r,"f").call(this)),Rr(this,Pr,"f").call(this).clientPromise))),_r.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);try{Rr(this,Pr,"f").call(this).eventFired||await Rr(this,Or,"f").call(this);const t=await this.fin.InterApplicationBus.Channel.connect(e,{wait:!1});return t.onDisconnection((()=>{Rr(this,Pr,"f").call(this).clientPromise=null,Rr(this,Pr,"f").call(this).eventFired=null})),t}catch(e){throw Rr(this,Pr,"f").call(this).clientPromise=null,new Error("The targeted SnapshotSource is not currently initialized. Await this object's ready() method.")}})),Or.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);let t,n;const i=new Promise(((e,i)=>{t=e,n=i}));Rr(this,Pr,"f").call(this).eventFired=i;const r=async i=>{try{i.channelName===e&&(t(),await this.fin.InterApplicationBus.Channel.removeListener("connected",r))}catch(e){n(e)}};await this.fin.InterApplicationBus.Channel.on("connected",r)})),Sr(this,Ar,t,"f")}get identity(){return Rr(this,Ar,"f")}async ready(){this.wire.sendAction("snapshot-source-ready").catch((e=>{}));try{await Rr(this,Mr,"f").call(this)}catch(e){await Rr(this,Pr,"f").call(this).eventFired}}async getSnapshot(){this.wire.sendAction("snapshot-source-get-snapshot").catch((e=>{}));const e=await Rr(this,Mr,"f").call(this),t=await e.dispatch("get-snapshot");return(await t).snapshot}async applySnapshot(e){this.wire.sendAction("snapshot-source-apply-snapshot").catch((e=>{}));return(await Rr(this,Mr,"f").call(this)).dispatch("apply-snapshot",{snapshot:e})}}Er.SnapshotSource=Lr,Ar=new WeakMap,Pr=new WeakMap,Mr=new WeakMap,_r=new WeakMap,Or=new WeakMap,Object.defineProperty(Ir,"__esModule",{value:!0}),Ir.SnapshotSourceModule=void 0;const Tr=d,$r=Er,Br=xr;class Gr extends Tr.Base{async init(e){if(this.wire.sendAction("snapshot-source-init").catch((e=>{})),"object"!=typeof e||"function"!=typeof e.getSnapshot||"function"!=typeof e.applySnapshot)throw new Error("you must pass in a valid SnapshotProvider");const t=await this.fin.InterApplicationBus.Channel.create((0,Br.getSnapshotSourceChannelName)(this.fin.me));t.register("get-snapshot",(async()=>({snapshot:await e.getSnapshot()}))),t.register("apply-snapshot",(({snapshot:t})=>e.applySnapshot(t)))}wrapSync(e){return this.wire.sendAction("snapshot-source-wrap-sync").catch((e=>{})),new $r.SnapshotSource(this.wire,e)}async wrap(e){return this.wire.sendAction("snapshot-source-wrap").catch((e=>{})),this.wrapSync(e)}}Ir.SnapshotSourceModule=Gr,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Ir,e),n(Er,e)}(br),Object.defineProperty(a,"__esModule",{value:!0});var Wr=a.Fin=void 0;const Hr=t,Nr=c,Dr=ie(),Ur=Z(),Vr=de,zr=en,Kr=rn,qr=un,Jr=bn,Yr=J(),Zr=An,Qr=ki,Xr=Cr(),eo=br;class to extends Hr.EventEmitter{constructor(e){super(),this.wire=e,this.System=new Nr.System(e),this.Window=new Dr._WindowModule(e),this.Application=new Ur.ApplicationModule(e),this.InterApplicationBus=new Vr.InterApplicationBus(e),this.Clipboard=new zr.Clipboard(e),this.ExternalApplication=new Kr.ExternalApplicationModule(e),this.Frame=new qr._FrameModule(e),this.GlobalHotkey=new Jr.GlobalHotkey(e),this.Platform=new Zr.PlatformModule(e,this.InterApplicationBus.Channel),this.View=new Yr.ViewModule(e),this.Interop=new Xr.InteropModule(e),this.SnapshotSource=new eo.SnapshotSourceModule(e),e.registerFin(this),this.me=(0,Qr.getMe)(e),e.on("disconnected",(()=>{this.emit("disconnected")}))}}Wr=a.Fin=to;var no={},io={};function ro(e){return"string"==typeof e.manifestUrl}function oo(e){return ao(e)&&"string"==typeof e.address}function so(e){return oo(e)&&"string"==typeof e.token}function ao(e){return"string"==typeof e.uuid}function co(e){return e.runtime&&"string"==typeof e.runtime.version}function ho(e){return ao(e)&&co(e)}Object.defineProperty(io,"__esModule",{value:!0}),io.isInternalConnectConfig=io.isPortDiscoveryConfig=io.isNewConnectConfig=io.isConfigWithReceiver=io.isRemoteConfig=io.isExistingConnectConfig=io.isExternalConfig=void 0,io.isExternalConfig=ro,io.isExistingConnectConfig=oo,io.isRemoteConfig=so,io.isConfigWithReceiver=function(e){return"object"==typeof e.receiver&&so({...e,address:""})},io.isNewConnectConfig=ho,io.isPortDiscoveryConfig=function(e){return ro(e)&&co(e)||ho(e)},io.isInternalConnectConfig=function(e){return oo(e)||ho(e)};var lo={},uo={};Object.defineProperty(uo,"__esModule",{value:!0}),uo.EmitterMap=void 0;const po=t;function wo(e){return Buffer.from(e).toString("base64")}uo.EmitterMap=class{constructor(){this.storage=new Map}hashKeys(e){return e.map(wo).join("/")}getOrCreate(e){const t=this.hashKeys(e);return this.storage.has(t)||this.storage.set(t,new po.EventEmitter),this.storage.get(t)}has(e){return this.storage.has(this.hashKeys(e))}delete(e){const t=this.hashKeys(e);return this.storage.delete(t)}},Object.defineProperty(lo,"__esModule",{value:!0});const yo=uo;class fo extends yo.EmitterMap{constructor(){super(...arguments),this.dispatchEvent=e=>{if(function(e){return"process-desktop-event"===e.action}(e)){const{payload:t}=e,n=function(e){const{topic:t}=e;if("frame"===t||"window"===t||"view"===t){const{uuid:n,name:i}=e;return[t,n,i]}if("application"===t){const{uuid:n}=e;return[t,n]}return[t]}(t);if(this.has(n))return this.getOrCreate(n).emit(t.type,t),!0}return!1}}}lo.default=fo;var go,mo,vo=s&&s.__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},Co=s&&s.__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)},bo=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(no,"__esModule",{value:!0});var Io=no.Transport=void 0;const Eo=t,xo=io,Ao=g,Po=bo(lo),Mo=ki,_o=ke;class Oo extends Eo.EventEmitter{constructor(e,t,n){super(),this.wireListeners=new Map,this.topicRefMap=new Map,this.eventAggregator=new Po.default,this.messageHandlers=[this.eventAggregator.dispatchEvent],go.set(this,void 0),mo.set(this,void 0),this.connectSync=()=>{Co(this,go,"f").connectSync()},this.getPort=()=>Co(this,go,"f").getPort(),vo(this,go,new e(this.onmessage.bind(this)),"f"),this.environment=t,this.sendRaw=Co(this,go,"f").send.bind(Co(this,go,"f")),this.registerMessageHandler(this.handleMessage.bind(this)),Co(this,go,"f").on("disconnected",(()=>{for(const[,{handleNack:e}]of this.wireListeners)e({reason:"Remote connection has closed"});this.wireListeners.clear(),this.emit("disconnected")}));const{uuid:i,name:r}=n,o=this.environment.getCurrentEntityType();this.me=(0,Mo.getBaseMe)(o,i,r)}getFin(){if(!Co(this,mo,"f"))throw new Error("No Fin object registered for this transport");return Co(this,mo,"f")}registerFin(e){if(Co(this,mo,"f"))throw new Error("Fin object has already been registered for this transport");vo(this,mo,e,"f")}shutdown(){return Co(this,go,"f").shutdown()}async connect(e){if((0,xo.isConfigWithReceiver)(e))return await Co(this,go,"f").connect(e.receiver),this.authorize(e);if((0,xo.isRemoteConfig)(e))return this.connectRemote(e);if((0,xo.isExistingConnectConfig)(e))return this.connectByPort(e);if((0,xo.isNewConnectConfig)(e)){const t=await this.environment.retrievePort(e);return this.connectByPort({...e,address:`ws://localhost:${t}`})}}async connectRemote(e){return await Co(this,go,"f").connect(new(this.environment.getWsConstructor())(e.address)),this.authorize(e)}async connectByPort(e){const{address:t,uuid:n}=e,i={...e,type:"file-token"},r=Co(this,go,"f");await r.connect(new(this.environment.getWsConstructor())(e.address));const o=await this.sendAction("request-external-authorization",{uuid:n,type:"file-token"},!0);if("external-authorization-response"!==o.action)throw new Ao.UnexpectedActionError(o.action);return await this.environment.writeToken(o.payload.file,o.payload.token),this.authorize(i)}async authorize(e){const t=await this.sendAction("request-authorization",e,!0);if("authorization-response"!==t.action)throw new Ao.UnexpectedActionError(t.action);if(!0!==t.payload.success)throw new Ao.RuntimeError(t.payload)}sendAction(e,t={},n=!1){let i=()=>{};const r=Ao.RuntimeError.getCallSite(1),o=this.environment.getNextMessageId(),s=new Promise(((s,a)=>{i=a;const c={action:e,payload:t,messageId:o},d=Co(this,go,"f");return this.addWireListener(o,s,(e=>this.nackHandler(e,a,r)),n),d.send(c).catch(a)}));return Object.assign(s,{cancel:i,messageId:o})}nackHandler(e,t,n){t("string"==typeof e?e:new Ao.RuntimeError(e,n))}ferryAction(e){return new Promise(((t,n)=>{const i=this.environment.getNextMessageId();e.messageId=i;const r=e=>{t(e.payload)};return Co(this,go,"f").send(e).then((()=>this.addWireListener(i,r,(e=>this.nackHandler(e,n)),!1))).catch(n)}))}registerMessageHandler(e){this.messageHandlers.push(e)}addWireListener(e,t,n,i){i?this.uncorrelatedListener=t:this.wireListeners.has(e)?n({reason:"Duplicate handler id",error:(0,_o.errorToPOJO)(new Ao.DuplicateCorrelationError(String(e)))}):this.wireListeners.set(e,{resolve:t,handleNack:n})}onmessage(e){for(const t of this.messageHandlers)t.call(null,e)}handleMessage(e){const t=e.correlationId||NaN;if("correlationId"in e){if(!this.wireListeners.has(t))return!1;{const{resolve:n,handleNack:i}=this.wireListeners.get(t);"ack"!==e.action?i({reason:"Did not receive ack action",error:(0,_o.errorToPOJO)(new Ao.NoAckError(e.action))}):"payload"in e?e.payload.success?n.call(null,e):i(e.payload):"string"==typeof e.reason?i(e):(console.warn("Received invalid response from core",e),i({reason:"invalid response shape"})),this.wireListeners.delete(t)}}else this.uncorrelatedListener&&this.uncorrelatedListener.call(null,e),this.uncorrelatedListener=()=>{};return!0}}Io=no.Transport=Oo,go=new WeakMap,mo=new WeakMap;const So=(...e)=>({log:(...t)=>console.debug(`[${(new Date).toISOString()}]`,...(e=>e.map((e=>`[${e}]`)))(e),...t),getLogger:(...t)=>So(...e,...t)}),Ro=So("@openfin/core-web/client");function Fo(e,t){if(!function(e){return"string"==typeof e}(e))throw new Error(`Property ${t} has invalid type. Expected string, got ${typeof e}.`)}const jo="web-broker-ports-ready",ko=Ro.getLogger("get-web-interop-ports");function Lo(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)}function To(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}"function"==typeof SuppressedError&&SuppressedError;const $o=e=>{var n,i,r;return r=class extends t.EventEmitter{constructor(t){super(),n.set(this,void 0),i.set(this,!1),this.connectSync=()=>{Lo(this,i,"f")||(e.addEventListener("message",(e=>{e.data?.topic?.startsWith("wire-message")&&e.data.message&&Lo(this,n,"f").call(this,{...JSON.parse(e.data.message),ports:e.ports})})),e.start())},this.connect=async()=>{this.connectSync()},this.send=t=>(e.postMessage({topic:"wire-message",message:JSON.stringify(t)}),Promise.resolve()),this.shutdown=async()=>{e.close()},To(this,n,t,"f")}getPort(){return e}},n=new WeakMap,i=new WeakMap,r};var Bo={},Go={};Object.defineProperty(Go,"__esModule",{value:!0}),Go.BaseEnvironment=void 0;const Wo=vr();Go.BaseEnvironment=class{async getViewWindowIdentity(e,t){const{identity:n}=await e.View.wrapSync(t).getCurrentWindow();return n}async getInteropInfo(e){const t=await e.Application.getCurrentSync().getInfo().catch((()=>null)),n=t?.initialOptions?.interopBrokerConfiguration??{};return{fdc3Version:t?(0,Wo.getDefaultViewFdc3VersionFromAppInfo)(t):void 0,...n,fdc3Info:{providerVersion:await e.System.getVersion(),provider:"OpenFin"}}}},Object.defineProperty(Bo,"__esModule",{value:!0});var Ho=Bo.BrowserEnvironment=void 0;const No=Go;class Do extends No.BaseEnvironment{constructor(){super(...arguments),this.type="other",this.getRandomId=()=>{const e=new Uint32Array(1);return window.crypto.getRandomValues(e)[0].toString(32)}}getAdapterVersionSync(){return""}observeBounds(e,t){throw new Error("Method not implemented.")}layoutAllowedInContext(e){return!1}initLayoutManager(e,t,n){throw new Error("Method not implemented.")}applyLayoutSnapshot(e,t,n){throw new Error("Method not implemented.")}createLayout(e,t){throw new Error("Method not implemented.")}destroyLayout(e,t){throw new Error("Method not implemented.")}resolveLayout(e,t){throw new Error("Method not implemented.")}initPlatform(...e){throw new Error("Method not implemented.")}writeToken(e,t){return Promise.resolve("")}retrievePort(e){throw new Error("Method not implemented.")}getNextMessageId(){return this.getRandomId()}createChildContent(e){throw new Error("Method not implemented.")}getWebWindow(e){throw new Error("Method not implemented.")}getCurrentEntityIdentity(){throw new Error("Method not implemented.")}getCurrentEntityType(){return"external connection"}raiseEvent(e,t){throw new Error("Method not implemented.")}getUrl(){return location.href}getDefaultChannelOptions(){return{create:{},connect:{}}}getRtcPeer(){return new RTCPeerConnection}getWsConstructor(){return WebSocket}whenReady(){return Promise.resolve()}}Ho=Bo.BrowserEnvironment=Do;const Uo=e=>"platform"in e&&void 0!==e.platform;var Vo,zo;class Ko extends Ho{constructor(e){super(),this.connectConfig=e,Vo.set(this,void 0),zo.set(this,new W((async()=>Promise.resolve().then((function(){return __webpack_require__(/*! ./main-b14f67c9.js */ "../../node_modules/@openfin/core-web/out/main-b14f67c9.js")}))))),Uo(e)&&this.validatePlatformOptions(e)}getAdapterVersionSync(){return"0.39.21"}validatePlatformOptions({platform:e}){if(!("layoutSnapshot"in e))throw new Error("Platform options are missing layoutSnapshot. Please provide a layoutSnapshot in the platform options.");if("windows"in e||"windows"in e.layoutSnapshot)throw new Error("It appears you tried to call connect() with a snapshot object from an OpenFin desktop environment. Note that connect() expects to be called with a platform property with this structure: { platform: { layoutSnapshot } }. To get a layoutSnapshot of the expected structure, use fin.Platform.Layout.getCurrentLayoutManagerSync().getLayoutSnapshot() in v34+ in your desktop environment.");const{layouts:t}=e.layoutSnapshot;Object.entries(t).map((([e,t])=>{if("object"!=typeof t||null===t)throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must be an object.`);if(!("content"in t))throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must contain a 'content' property.`)}))}async getInteropInfo(e){return{...{contextGroups:void 0,logging:{beforeAction:{enabled:!1},afterAction:{enabled:!1}}},fdc3Version:void 0,fdc3Info:{providerVersion:"0.39.21",provider:"OpenFin Web"}}}layoutAllowedInContext(e){return!0}async initLayoutManager(e,t,n){if(Lo(this,Vo,"f"))throw new Error("Layout already initialized.");if(!Uo(this.connectConfig))throw new Error("Platform options are missing from connection config.");const{WebLayoutEntryPoint:i}=await Lo(this,zo,"f").getValue();return To(this,Vo,new i(this.connectConfig),"f"),await Lo(this,Vo,"f").initLayoutManager(e,t,n)}async applyLayoutSnapshot(e,t,n){Lo(this,Vo,"f")?.applyLayoutSnapshot(e,t,n)}async createLayout(e,t){return Lo(this,Vo,"f")?.createLayout(e,t)}async destroyLayout(e,t){return Lo(this,Vo,"f")?.destroyLayout(e,t)}async getViewWindowIdentity(e,t){return Promise.resolve({uuid:t.uuid,name:t.uuid})}}Vo=new WeakMap,zo=new WeakMap;const qo=()=>{const e=((e,t)=>{const n=new RegExp(`^${t}<(?.*)>$`).exec(e)?.groups?.meta;if(n)try{return JSON.parse(atob(n))}catch(e){throw new Error(`Failed to decode JSON from ${n}.`)}})(window.name,"of-frame");if(e)try{const{name:t,uuid:n,brokerUrl:i,providerId:r,contextGroup:o}=e;return Fo(i,"brokerUrl"),Fo(n,"uuid"),Fo(t,"name"),{identity:{name:t,uuid:n},brokerUrl:i,interopConfig:{providerId:r,currentContextGroup:o}}}catch(e){throw new Error(`Unexpected error occurred when inferring platform information: ${e.stack}`)}},Jo=()=>{const e=r.v4();return{uuid:e,name:e}},Yo=async e=>{if("enabled"===e.connectionInheritance){const t=await(async e=>{const t=qo();if(t){const{validateOptions:n=(()=>!0)}=e,{identity:i,...r}=t;if(!await n(r))throw new Error("Parent options were rejected by validateOptions.");return t}})(e);if(t)return t}if(!e.options){const t="enabled"===e.connectionInheritance?"Broker URL was not specified nor provided by a platform container.":"Connection inheritance is disabled but no options were provided.";throw new Error(t)}return{...e.options,identity:Jo()}};exports.__classPrivateFieldGet=Lo,exports.__classPrivateFieldSet=To,exports.apiExposer=Gn,exports.commonjsGlobal=s,exports.connect=async t=>{try{Ro.log("Establishing connection",t);const{brokerUrl:n,identity:i,timeout:r,interopConfig:s}=await Yo(t),{workerPort:a,iframeBrokerPort:c}=await(async(e,t,n)=>{const{origin:i}=new URL(e),r=document.createElement("IFRAME");let s;r.style.display="none";try{return await new Promise(((a,c)=>{const d=e=>{if(e.source===r.contentWindow&&e.data?.topic===`ack-${jo}`){if(e.origin!==i)c(new Error(`Broker redirected to unexpected origin ${e.origin}, expected ${i}.`));else if(e.data.success){const[t,n]=e.ports;a({iframeBrokerPort:t,workerPort:n})}else c(new m(e.data));window.removeEventListener("message",d),clearTimeout(s)}};window.addEventListener("message",d),ko.log(`Connecting to broker ${e}`),r.setAttribute("src",e),r.setAttribute("name",o(t,"of-broker")),document.body.appendChild(r),ko.log("Iframe loaded, awaiting init message from iframe"),n&&(s=setTimeout((()=>{window.removeEventListener("message",d),document.body.removeChild(r),c(new Error("Worker did not initialize in time"))}),n))}))}catch(e){throw new Error(`Failed to initialise Fin Web Client. ${e.message}`,{cause:e})}})(n,i,r);Ro.log("Successfully established connection to shared worker");const d={entityType:"external connection",...i};a.start(),c.start();const h=((t,n,i)=>{const r=$o(n),o=new Ko(t),s=new Io(r,o,i);return s.connectSync(),window.Buffer=e.Buffer,new Wr(s)})(t,a,d);return s?.providerId&&(h.me.interop=h.Interop.connectSync(s.providerId),s?.currentContextGroup&&h.me.interop.joinContextGroup(s.currentContextGroup).catch((e=>{console.warn(`Error joining specified context group: ${s?.currentContextGroup}, continuing`,e)}))),{...h,me:{...h.me,identity:{uuid:h.me.uuid,name:h.me.name}}}}catch(e){throw new Error(`An error occured during web-interop connection: ${e.message}`)}},exports.decorators=Nn,exports.encodeOptions=o,exports.layout_constants=ai,exports.lazy=G; /***/ }), -/***/ "./node_modules/@openfin/core-web/out/main-b14f67c9.js": -/*!*************************************************************!*\ - !*** ./node_modules/@openfin/core-web/out/main-b14f67c9.js ***! - \*************************************************************/ +/***/ "../../node_modules/@openfin/core-web/out/main-b14f67c9.js": +/*!*****************************************************************!*\ + !*** ../../node_modules/@openfin/core-web/out/main-b14f67c9.js ***! + \*****************************************************************/ /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; -var t=__webpack_require__(/*! ./main-8cad4070.js */ "./node_modules/@openfin/core-web/out/main-8cad4070.js"),e=__webpack_require__(/*! uuid */ "../../node_modules/uuid/dist/esm-browser/index.js");__webpack_require__(/*! buffer/ */ "../../node_modules/buffer/index.js"),__webpack_require__(/*! events */ "../../node_modules/events/events.js"),__webpack_require__(/*! lodash/cloneDeep */ "../../node_modules/lodash/cloneDeep.js"),__webpack_require__(/*! lodash/isEqual */ "../../node_modules/lodash/isEqual.js");var i={},n={};Object.defineProperty(n,"__esModule",{value:!0}),n.mapValuesAsync=n.mapEntriesAsync=void 0;const o=(t,[e,i])=>({...t,[e]:i});async function s(t,e){return(await Promise.all(e.map((async([e,i])=>[e,await t(i,e)])))).reduce(o,{})}n.mapEntriesAsync=s,n.mapValuesAsync=async function(t,e){let i;return i=e instanceof Map?[...e.entries()]:Object.entries(e),s(t,i)};var r,a,l,h,d=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldSet||function(t,e,i,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(t,i):o?o.value=i:e.set(t,i),i},c=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldGet||function(t,e,i,n){if("a"===i&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?n:"a"===i?n.call(t):n?n.value:e.get(t)};Object.defineProperty(i,"__esModule",{value:!0});var m=i.DefaultLayoutManager=void 0;const u=n;class p{constructor(t){a.set(this,void 0),l.set(this,new Map),d(this,a,t,"f")}size(){return c(this,l,"f").size}async applyLayoutSnapshot({layouts:t}){if(Object.keys(t).length>1)throw new Error("[LayoutManager] Tried to call applyLayoutSnapshot with more than 1 layout. When implementing multiple layouts via overridden LayoutManager class, you must override and fully implement the applyLayoutSnapshot method without calling super.applyLayoutSnapshot().");const[[e,i]]=Object.entries(t);await p.createLayout(this,{layoutName:e,layout:i})}async showLayout({layoutName:t}){}async getLayoutSnapshot(){return{layouts:await(0,u.mapValuesAsync)((t=>t.getFrameSnapshot()),c(this,l,"f"))}}async removeLayout({layoutName:t}){}getLayoutIdentityForView(t){const e=[...c(this,l,"f").values()].find((e=>e.getCurrentViews().some((e=>e.name===t.name&&e.uuid===t.uuid))));return e?.identity??void 0}isLayoutVisible({layoutName:t}){return c(p,r,"m",h).call(p,this,t).isVisible()}resolveLayoutIdentity(t){if(t&&"layoutName"in t)return t;const e=[...c(this,l,"f").values()];if(1===e.length)return e[0].identity;const i=e.find((t=>t.isVisible()));return i?.identity??void 0}static async resolveLayout(t,e){const i=t.resolveLayoutIdentity(e);if(void 0===i||!("layoutName"in i))throw new Error("[layout-manager] resolveLayout: Could not resolve the layout identity. Make sure you include 'layoutName' in the identity object.");return c(p,r,"m",h).call(p,t,i.layoutName)}static async handleSharedView(t,e,i){await(0,u.mapValuesAsync)((async t=>{if(t.identity.layoutName!==e.layoutName){const e=t.getCurrentViews().find((t=>t.name===i.name));e&&await t.onViewDetached({viewIdentity:e,target:null}).catch(console.error)}}),c(t,l,"f"))}static async handleLastViewRemoved(t,e){await t.removeLayout(e),await c(t,a,"f").handleLastViewRemoved(t)}static async destroyLayout(t,{layoutName:e}){await c(p,r,"m",h).call(p,t,e).destroy(),c(t,l,"f").delete(e)}static async createLayout(t,e){const{layoutName:i}=e;if(c(t,l,"f").has(i))throw new Error(`Layout name ${i} already exists`);await c(t,a,"f").createLayout(e,t)}static registerLayout(t,e,i){c(t,l,"f").set(e,i)}static getAllLayouts(t){return[...c(t,l,"f").values()]}static setInitialSnapshot(t,e){c(t,a,"f").setInitialSnapshot(e)}static createClosedConstructor(...t){return class extends p{constructor(){super(...t)}}}}m=i.DefaultLayoutManager=p,r=p,a=new WeakMap,l=new WeakMap,h=function(t,e){const i=c(t,l,"f").get(e);if(!i)throw new Error(`[layout-manager] getLayoutByName: Could not locate layout with name '${e}'`);return i};var g={},f={},v={};Object.defineProperty(v,"__esModule",{value:!0}),v.ReversibleMap=void 0;v.ReversibleMap=class{constructor(){this.valueToKey=new Map,this.keyToValue=new Map,this.setUnique=(t,e)=>{if(this.hasKey(t)||this.hasValue(e))throw new Error("Key or value already in the map.");this.keyToValue.set(t,e),this.valueToKey.set(e,t)},this.getKey=t=>{const e=this.valueToKey.get(t);if(!e)throw new Error("Value not found in the map.");return e},this.deleteKey=t=>{const e=this.getValue(t);return this.keyToValue.delete(t),this.valueToKey.delete(e),e},this.deleteValue=t=>{const e=this.getKey(t);return this.keyToValue.delete(e),this.valueToKey.delete(t),e},this.hasKey=t=>this.keyToValue.has(t),this.hasValue=t=>this.valueToKey.has(t)}getValue(t){const e=this.keyToValue.get(t);if(!e)throw new Error("Key not found in the map.");return e}},Object.defineProperty(f,"__esModule",{value:!0});var _=f.LayoutContentCache=void 0;const y=t.lazy,C=v;class w{constructor(){this.contentItemCache=new C.ReversibleMap,this.contentItemCacheId=0,this.createCacheKey=()=>{const t=`entity-${this.contentItemCacheId.toString()}`;return this.contentItemCacheId+=1,t},this.hasKey=t=>this.contentItemCache.hasKey(t),this.getItemOrUndefined=t=>{try{return this.getContentItemOrThrow(t)}catch(t){return}},this.getContentItemOrThrow=(t,e)=>{if(!this.contentItemCache.hasKey(t))throw new Error("Layout component has been destroyed or detached from the current layout.");const i=this.contentItemCache.getValue(t);if(e&&!e.includes(i.type))throw new Error(`Layout item is not the expected type. Expected ${e.join(", ")}, got ${i.type}.`);return i},this.getOrCreateEntityId=t=>{if(this.contentItemCache.hasValue(t))return this.contentItemCache.getKey(t);t.onDestroyed((()=>{this.contentItemCache.deleteValue(t)}));const e=this.createCacheKey();return this.contentItemCache.setUnique(e,t),e}}static getSingleInstance(){return w.singleton.getValue()}}_=f.LayoutContentCache=w,w.singleton=new y.Lazy((()=>new w));var I={},b={};!function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.getAdjacentStacks=t.doShareEdge=t.getAdjacentItem=void 0;t.getAdjacentItem=(e,i)=>{const{parent:n}=e;if(e.isRoot()||!n)return;const o=["top","bottom"].includes(i)?"column":"row",s=["top","left"].includes(i)?-1:1;if(n.type===o){const t=n.contentItems.indexOf(e)+s;if(t>=0&&t{const n=t.getBounds(),o=e.getBounds();if(!n||!o)return!1;if(["top","bottom"].includes(i)){return!(n.righto.right)}return!(n.bottomo.bottom)};t.getAdjacentStacks=(e,i)=>{const n=["top","bottom"].includes(i)?"row":"column",o=s=>"stack"===s.type?(0,t.doShareEdge)(e,s,i)?[s]:[]:"root"===s.type||"ground"===s.type?[]:s.type===n?s.contentItems.map((t=>o(t))).flat():s.type!==n?["top","right"].includes(i)?o(s.contentItems[s.contentItems.length-1]):o(s.contentItems[0]):[],s=(0,t.getAdjacentItem)(e,i);return s?o(s):[]}}(b);var S=t.commonjsGlobal&&t.commonjsGlobal.__decorate||function(t,e,i,n){var o,s=arguments.length,r=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(s<3?o(r):s>3?o(e,i,r):o(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};Object.defineProperty(I,"__esModule",{value:!0}),I.LayoutEntitiesController=void 0;const E=t.decorators,x=b,L=i;class z{constructor(t,e,i){this.wire=t,this.layoutManager=e,this.layoutContentCache=i,this.analytics=t=>{this.wire.sendAction(`layout-controller-${t}`).catch((()=>{}))},this.getLayoutIdentityForViewOrThrow=async t=>{const e=this.layoutManager.getLayoutIdentityForView(t);if(!e)throw new Error(`View identity ${t.name} is not attached to any layouts.`);return e},this.getRoot=async t=>{this.analytics("get-root");const e=(await this.getLayout(t)).getRoot();return{type:e.type,entityId:this.layoutContentCache.getOrCreateEntityId(e)}},this.getStackByView=async t=>{this.analytics("get-stack-by-view");const e=await this.getLayoutIdentityForViewOrThrow(t),i=(await this.getLayout(e)).getStackByView(t);if("stack"===i?.type)return{entityId:this.layoutContentCache.getOrCreateEntityId(i),type:"stack"}},this.getStackViews=t=>{this.analytics("get-stack-views");return this.layoutContentCache.getContentItemOrThrow(t,["stack"]).contentItems.map((t=>({name:t.viewName,uuid:this.wire.me.uuid})))},this.isRoot=t=>{this.analytics("is-root");return this.layoutContentCache.getContentItemOrThrow(t).isRoot()},this.exists=t=>(this.analytics("exists"),this.layoutContentCache.hasKey(t)),this.addViewToStack=async(t,e,{index:i}={index:0})=>{this.analytics("add-view-to-stack");const n=this.layoutContentCache.getContentItemOrThrow(t);if(i&&i>n.contentItems.length+1)throw new Error(`Index '${i}' out of range, please exclude the index or specify a number between 0 and ${n.contentItems.length}`);const o={id:t,index:i},{identity:s}=await n.layout.platformCreateView(e,{location:o});return s},this.findViewInStack=(t,e)=>t.contentItems.find((t=>t.viewName===e.name)),this.removeViewFromStack=async(t,e)=>{this.analytics("remove-view-from-stack");const i=this.layoutContentCache.getContentItemOrThrow(t,["stack"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to remove a view ('${e.name}') which does not belong to the stack.`);await n.layout.platformCloseView(e)},this.createAdjacentStack=async(t,e,{position:i="right"}={})=>{if(this.analytics("create-adjacent-stack"),!Array.isArray(e)||0===e.length)throw new Error('The parameter "views" must be an array with at least 1 element.');if(!["top","bottom","left","right"].includes(i))throw new Error(`Invalid position '${i}' specified.`);const n=this.layoutContentCache.getContentItemOrThrow(t).createAdjacentStack({position:i}),o=this.layoutContentCache.getOrCreateEntityId(n);return await Promise.all(e.reverse().map((t=>this.addViewToStack(o,t)))),o},this.getAdjacentStacks=async({targetId:t,edge:e})=>{this.analytics("get-adjacent-stacks");const i=this.layoutContentCache.getContentItemOrThrow(t);return(0,x.getAdjacentStacks)(i,e).map((t=>({entityId:this.layoutContentCache.getOrCreateEntityId(t)})))},this.setStackActiveView=async(t,e)=>{this.analytics("set-stack-active-view");const i=this.layoutContentCache.getContentItemOrThrow(t,["stack"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to set a view ('${e.name}') as active when it does not belong to the stack.`);i.setActiveContentItem(n,!0)}}async getLayout(t){const e=await L.DefaultLayoutManager.resolveLayout(this.layoutManager,t);if(!e)throw new Error(`Could not resolve target layout identity ${JSON.stringify(t)}`);return e}getContent(t){this.analytics("get-content");return this.layoutContentCache.getContentItemOrThrow(t,["column","row"]).contentItems.map((t=>({type:t.type,entityId:this.layoutContentCache.getOrCreateEntityId(t)})))}getParent(t){this.analytics("get-parent");const e=this.layoutContentCache.getContentItemOrThrow(t);if(!e.isRoot())return e.parent?.contentItems.includes(e)?{type:e.parent.type,entityId:this.layoutContentCache.getOrCreateEntityId(e.parent)}:void 0}}S([(0,E.expose)()],z.prototype,"getLayoutIdentityForViewOrThrow",void 0),S([(0,E.expose)()],z.prototype,"getRoot",void 0),S([(0,E.expose)()],z.prototype,"getStackByView",void 0),S([(0,E.expose)()],z.prototype,"getStackViews",void 0),S([(0,E.expose)()],z.prototype,"getContent",null),S([(0,E.expose)()],z.prototype,"getParent",null),S([(0,E.expose)()],z.prototype,"isRoot",void 0),S([(0,E.expose)()],z.prototype,"exists",void 0),S([(0,E.expose)()],z.prototype,"addViewToStack",void 0),S([(0,E.expose)()],z.prototype,"removeViewFromStack",void 0),S([(0,E.expose)()],z.prototype,"createAdjacentStack",void 0),S([(0,E.expose)()],z.prototype,"getAdjacentStacks",void 0),S([(0,E.expose)()],z.prototype,"setStackActiveView",void 0),I.LayoutEntitiesController=z,Object.defineProperty(g,"__esModule",{value:!0});var M=g.initLayoutEndpoints=void 0;const P=t.apiExposer,T=t.layout_constants,A=f,k=I,D=i;M=g.initLayoutEndpoints=async function(t,e){const i=t.getFin(),n=await i.Platform.getCurrentSync().getClient(),o=new P.ChannelsExposer(n);await new P.ApiExposer(o).exposeInstance(new k.LayoutEntitiesController(t,e,A.LayoutContentCache.getSingleInstance()),{id:T.LAYOUT_CONTROLLER_ID}),await async function(t,e){const i=t=>async i=>{const n=await D.DefaultLayoutManager.resolveLayout(e,i.target);if(!n)throw new Error(`Could not resolve the layout target from payload ${JSON.stringify(i)}`);return t(n,i)},n=(e,n)=>{t.register(e,i(n))},o=(t,e)=>{n(t,e)};n("replace-view",((t,e)=>t.replaceView(e))),n("replace-layout",((t,{layout:e})=>t.replaceLayout(e))),n("add-view",((t,e)=>t.insertView(e))),o("layout-add-view",((t,{viewOptions:e,location:i,targetView:n})=>t.platformCreateView(e,{location:i,targetView:n}))),n("close-view",((t,e)=>t.cleanupView(e.viewIdentity))),o("layout-close-view",((t,e)=>t.platformCloseView(e.viewIdentity))),n("apply-preset-layout",((t,e)=>t.applyPreset(e))),n("get-layout-views",(t=>t.getCurrentViews())),n("get-frame-snapshot",(t=>t.getFrameSnapshot())),n("is-visible",(t=>t.isVisible())),n("destroy",(t=>t.destroy())),t.register("get-layout-snapshot",(()=>e.getLayoutSnapshot()))}(n,e)};var R={};Object.defineProperty(R,"__esModule",{value:!0});var U=R.BaseLayout=void 0;U=R.BaseLayout=class{};var O={};Object.defineProperty(O,"__esModule",{value:!0});var V=O.DOMEmitter=void 0;V=O.DOMEmitter=class{constructor(t){this.container=t}dispatchLocalEvent(t,e){const i={...e,type:t,tabSelector:`tab-${e.name}`,containerSelector:`container-${e.name}`,topic:"openfin-DOM-event"};this.container.dispatchEvent(new CustomEvent(t,{detail:i}))}};var B={};Object.defineProperty(B,"__esModule",{value:!0});var H=B.mapLayoutContentItemsImmutableSync=B.mapLayoutContentItemsImmutable=W=B.isVisible=void 0;var W=B.isVisible=t=>(0!==t.offsetWidth||0!==t.offsetHeight)&&"hidden"!==window.getComputedStyle(t).visibility&&t.offsetTop>=0&&t.offsetLeft>=0&&t.offsetTop<=window.innerHeight&&t.offsetLeft<=window.innerWidth;const F=t=>"type"in t&&"component"===t.type;B.mapLayoutContentItemsImmutable=async function t(e,i){return F(i)?e(i):{...i,content:await Promise.all(i.content?.map((i=>t(e,i))))}},H=B.mapLayoutContentItemsImmutableSync=function t(e,i){return F(i)?e(i):{...i,content:i.content?.map((i=>t(e,i)))}};class N extends Error{constructor(t,e){super(e),this.type=t}}class G extends N{constructor(t,e){super("Configuration",t),this.node=e}}class j extends N{constructor(t){super("PopoutBlocked",t)}}class $ extends N{constructor(t){super("API",t)}}class Z extends N{constructor(t){super("Bind",t)}}class q extends Error{constructor(t,e,i){super(`${t}: ${e}${void 0===i?"":": "+i}`)}}class X extends q{constructor(t,e){super("Assert",t,e)}}class Y extends q{constructor(t,e,i){super("UnreachableCase",t,`${e}${void 0===i?"":": "+i}`)}}class K extends q{constructor(t,e){super("UnexpectedNull",t,e)}}class J extends q{constructor(t,e){super("UnexpectedUndefined",t,e)}}var Q;!function(t){let e=!1;const i={PopoutCannotBeCreatedWithGroundItemConfig:{id:0,default:"Popout cannot be created with ground ItemConfig"},PleaseRegisterAConstructorFunction:{id:1,default:"Please register a constructor function"},ComponentTypeNotRegisteredAndBindComponentEventHandlerNotAssigned:{id:2,default:"Component type not registered and BindComponentEvent handler not assigned"},ComponentIsAlreadyRegistered:{id:3,default:"Component is already registered"},ComponentIsNotVirtuable:{id:4,default:"Component is not virtuable. Requires rootHtmlElement field/getter"},VirtualComponentDoesNotHaveRootHtmlElement:{id:5,default:'Virtual component does not have getter "rootHtmlElement"'},ItemConfigIsNotTypeComponent:{id:6,default:"ItemConfig is not of type component"},InvalidNumberPartInSizeString:{id:7,default:"Invalid number part in size string"},UnknownUnitInSizeString:{id:8,default:"Unknown unit in size string"},UnsupportedUnitInSizeString:{id:9,default:"Unsupported unit in size string"}};t.idCount=Object.keys(i).length;const n=Object.values(i);t.checkInitialise=function(){if(!e)for(let e=0;e="0"&&t<="9"}function Tt(t,e){const i=zt(e);t.style.width=i}function At(t,e){const i=zt(e);t.style.height=i}function kt(t){return{width:t.offsetWidth,height:t.offsetHeight}}function Dt(t,e){t.style.display=e?"":"none"}function Rt(t,e){if(void 0!==e)for(const i in e)if(e.hasOwnProperty(i)){const n=e[i],o=t[i];t[i]=Ut(o,n)}return t}function Ut(t,e){if("object"!=typeof e)return e;if(Array.isArray(e)){const t=e.length,i=new Array(t);for(let n=0;n36)throw new Error("Too many keys in config minifier map")},t.translateObject=n}(dt||(dt={})),function(t){t.defaults={type:at.ground,content:[],size:1,sizeUnit:ht.Fractional,minSize:void 0,minSizeUnit:ht.Pixel,id:"",isClosable:!0},t.createCopy=function(t,e){switch(t.type){case at.ground:case at.row:case at.column:return gt.createCopy(t,e);case at.stack:return ut.createCopy(t,e);case at.component:return pt.createCopy(t);default:throw new Y("CICC91354",t.type,"Invalid Config Item type specified")}},t.createDefault=function(t){switch(t){case at.ground:throw new X("CICCDR91562");case at.row:case at.column:return gt.createDefault(t);case at.stack:return ut.createDefault();case at.component:return pt.createDefault();default:throw new Y("CICCDD91563",t,"Invalid Config Item type specified")}},t.isComponentItem=function(t){return t.type===at.component},t.isStackItem=function(t){return t.type===at.stack},t.isGroundItem=function(t){return t.type===at.ground}}(ct||(ct={})),function(t){t.defaultMaximised=!1,function(t){t.createCopy=function(t,e){return void 0===t?void 0:{show:null!=e?e:t.show,popout:t.popout,close:t.close,maximise:t.maximise,minimise:t.minimise,tabDropdown:t.tabDropdown}}}(t.Header||(t.Header={}))}(mt||(mt={})),function(t){function e(t){const e=t.length,i=new Array(e);for(let n=0;n"__glMaximised"===t));t>0&&(o=!0,n=n.splice(t,1)),e=n.length>0?n[0]:ct.defaults.id}else e=n;return i=void 0!==t.maximised?t.maximised:o,{id:e,maximised:i}}}(wt||(wt={})),function(t){function e(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0;return{resolved:!0,root:Et.resolve(i),openPopouts:t.resolveOpenPopouts(e.openPopouts),dimensions:t.Dimensions.resolve(e.dimensions),settings:t.Settings.resolve(e.settings),header:t.Header.resolve(e.header,e.settings,e.labels)}}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:Lt.fromResolvedArray(e.openPopouts),settings:_t.Settings.createCopy(e.settings),dimensions:t.Dimensions.fromResolved(e.dimensions),header:_t.Header.createCopy(e.header)}},t.isResolved=function(t){const e=t;return void 0!==e.resolved&&!0===e.resolved},t.resolveOpenPopouts=function(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0,{root:Et.resolve(o),openPopouts:xt.resolveOpenPopouts(e.openPopouts),dimensions:xt.Dimensions.resolve(e.dimensions),settings:xt.Settings.resolve(e.settings),header:xt.Header.resolve(e.header,e.settings,e.labels),parentId:null!==(i=e.parentId)&&void 0!==i?i:null,indexInParent:null!==(n=e.indexInParent)&&void 0!==n?n:null,window:t.Window.resolve(e.window,e.dimensions),resolved:!0}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:i(e.openPopouts),dimensions:xt.Dimensions.fromResolved(e.dimensions),settings:_t.Settings.createCopy(e.settings),header:_t.Header.createCopy(e.header),parentId:e.parentId,indexInParent:e.indexInParent,window:t.Window.fromResolved(e.window)}},t.fromResolvedArray=i}(Lt||(Lt={}));class Wt{constructor(){this._allEventSubscriptions=[],this._subscriptionsMap=new Map,this.unbind=this.removeEventListener,this.trigger=this.emit}tryBubbleEvent(t,e){}emit(t,...e){let i=this._subscriptionsMap.get(t);if(void 0!==i){i=i.slice();for(let t=0;t0){const n=e.slice();n.unshift(t);const o=this._allEventSubscriptions.slice();for(let t=0;t0?n.contentItems[0]:n,e=0);const o=this._layoutManager.createAndInitContentItem(i,t);t.addChild(o,e),this._layoutManager.layoutConfig.settings.popInOnClose?this._onClose():this.close()}createWindow(){const t=this.createUrl(),e=Math.floor(1e6*Math.random()).toString(36),i=this.serializeWindowFeatures({width:this._initialWindowSize.width,height:this._initialWindowSize.height,innerWidth:this._initialWindowSize.width,innerHeight:this._initialWindowSize.height,menubar:"no",toolbar:"no",location:"no",personalbar:"no",resizable:"yes",scrollbars:"no",status:"no"});if(this._popoutWindow=globalThis.open(t,e,i),this._popoutWindow)this._popoutWindow.addEventListener("load",(()=>this.positionWindow()),{passive:!0}),this._popoutWindow.addEventListener("beforeunload",(()=>{this._layoutManager.layoutConfig.settings.popInOnClose?this.popIn():this._onClose()}),{passive:!0}),this._checkReadyInterval=setInterval((()=>this.checkReady()),10);else if(!0===this._layoutManager.layoutConfig.settings.blockedPopoutsThrowError){throw new j("Popout blocked")}}checkReady(){if(null===this._popoutWindow)throw new K("BPCR01844");this._popoutWindow.__glInstance&&this._popoutWindow.__glInstance.isInitialised&&(this.onInitialised(),void 0!==this._checkReadyInterval&&(clearInterval(this._checkReadyInterval),this._checkReadyInterval=void 0))}serializeWindowFeatures(t){const e=[];for(const i in t)e.push(i+"="+t[i].toString());return e.join(",")}createUrl(){const t="gl-window-config-"+Ot(),e=_t.minifyConfig(this._config);try{localStorage.setItem(t,JSON.stringify(e))}catch(t){throw new Error("Error while writing to localStorage "+function(t){return t instanceof Error?t.message:"string"==typeof t?t:"Unknown Error"}(t))}const i=new URL(location.href);return i.searchParams.set("gl-window",t),i.toString()}positionWindow(){if(null===this._popoutWindow)throw new Error("BrowserPopout.positionWindow: null popoutWindow");this._popoutWindow.moveTo(this._initialWindowSize.left,this._initialWindowSize.top),this._popoutWindow.focus()}onInitialised(){this._isInitialised=!0,this.getGlInstance().on("popIn",(()=>this.popIn())),this.emit("initialised")}_onClose(){setTimeout((()=>this.emit("closed")),50)}}class Gt extends Wt{constructor(t,e,i,n){super(),this.layoutManager=t,this._parent=i,this._element=n,this._popInParentIds=[],this._type=e.type,this._id=e.id,this._isInitialised=!1,this.isGround=!1,this.isRow=!1,this.isColumn=!1,this.isStack=!1,this.isComponent=!1,this.size=e.size,this.sizeUnit=e.sizeUnit,this.minSize=e.minSize,this.minSizeUnit=e.minSizeUnit,this._isClosable=e.isClosable,this._pendingEventPropagations={},this._throttledEvents=["stateChanged"],this._contentItems=this.createContentItems(e.content)}get type(){return this._type}get id(){return this._id}set id(t){this._id=t}get popInParentIds(){return this._popInParentIds}get parent(){return this._parent}get contentItems(){return this._contentItems}get isClosable(){return this._isClosable}get element(){return this._element}get isInitialised(){return this._isInitialised}static isStack(t){return t.isStack}static isComponentItem(t){return t.isComponent}static isComponentParentableItem(t){return t.isStack||t.isGround}removeChild(t,e=!1){const i=this._contentItems.indexOf(t);if(-1===i)throw new Error("Can't remove child item. Unknown content item");if(e||this._contentItems[i].destroy(),this._contentItems.splice(i,1),this._contentItems.length>0)this.updateSize(!1);else if(!this.isGround&&!0===this._isClosable){if(null===this._parent)throw new K("CIUC00874");this._parent.removeChild(this)}}addChild(t,e,i){return null!=e||(e=this._contentItems.length),this._contentItems.splice(e,0,t),t.setParent(this),!0===this._isInitialised&&!1===t._isInitialised&&t.init(),e}replaceChild(t,e,i=!1){const n=this._contentItems.indexOf(t),o=t._element.parentNode;if(-1===n)throw new X("CIRCI23232","Can't replace child. oldChild is not child of this");if(null===o)throw new K("CIRCP23232");if(o.replaceChild(e._element,t._element),!0===i&&(t._parent=null,t.destroy()),this._contentItems[n]=e,e.setParent(this),e.size=t.size,e.sizeUnit=t.sizeUnit,e.minSize=t.minSize,e.minSizeUnit=t.minSizeUnit,null===e._parent)throw new K("CIRCNC45699");!0===e._parent._isInitialised&&!1===e._isInitialised&&e.init(),this.updateSize(!1)}remove(){if(null===this._parent)throw new K("CIR11110");this._parent.removeChild(this)}popout(){const t=Ot(),e=this.layoutManager.createPopoutFromContentItem(this,void 0,t,void 0);return this.emitBaseBubblingEvent("stateChanged"),e}calculateConfigContent(){const t=this._contentItems,e=t.length,i=new Array(e);for(let n=0;nthis.propagateEventToLayoutManager(t,e))))}propagateEventToLayoutManager(t,e){this._pendingEventPropagations[t]=!1,this.layoutManager.emitUnknown(t,e)}}class jt extends Gt{constructor(t,e,i){super(t,e,i,document.createElement("div")),this._parentItem=i,this._focused=!1,this.isComponent=!0,this._reorderEnabled=e.reorderEnabled,this.applyUpdatableConfig(e),this._initialWantMaximise=e.maximised;const n=document.createElement("div");n.classList.add("lm_content"),this.element.appendChild(n),this._container=new Ft(e,this,t,n,(t=>this.handleUpdateItemConfigEvent(t)),(()=>this.show()),(()=>this.hide()),(t=>this.focus(t)),(t=>this.blur(t)))}get componentName(){return this._container.componentType}get componentType(){return this._container.componentType}get reorderEnabled(){return this._reorderEnabled}get initialWantMaximise(){return this._initialWantMaximise}get component(){return this._container.component}get container(){return this._container}get parentItem(){return this._parentItem}get headerConfig(){return this._headerConfig}get title(){return this._title}get tab(){return this._tab}get focused(){return this._focused}destroy(){this._container.destroy(),super.destroy()}applyUpdatableConfig(t){this.setTitle(t.title),this._headerConfig=t.header}toConfig(){const t=this._container.stateRequestEvent,e=void 0===t?this._container.state:t();return{type:at.component,content:[],size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,maximised:!1,isClosable:this.isClosable,reorderEnabled:this._reorderEnabled,title:this._title,header:mt.Header.createCopy(this._headerConfig),componentType:pt.copyComponentType(this.componentType),componentState:e}}close(){if(null===this.parent)throw new K("CIC68883");this.parent.removeChild(this,!1)}enterDragMode(t,e){Tt(this.element,t),At(this.element,e),this._container.enterDragMode(t,e)}exitDragMode(){this._container.exitDragMode()}enterStackMaximised(){this._container.enterStackMaximised()}exitStackMaximised(){this._container.exitStackMaximised()}drag(){this._container.drag()}updateSize(t){this.updateNodeSize(t)}init(){this.updateNodeSize(!1),super.init(),this._container.emit("open"),this.initContentItems()}setTitle(t){this._title=t,this.emit("titleChanged",t),this.emit("stateChanged")}setTab(t){this._tab=t,this.emit("tab",t),this._container.setTab(t)}hide(){super.hide(),this._container.setVisibility(!1)}show(){super.show(),this._container.setVisibility(!0)}focus(t=!1){this.parentItem.setActiveComponentItem(this,!0,t)}setFocused(t){this._focused=!0,this.tab.setFocused(),t||this.emitBaseBubblingEvent("focus")}blur(t=!1){this._focused&&this.layoutManager.setFocusedComponentItem(void 0,t)}setBlurred(t){this._focused=!1,this.tab.setBlurred(),t||this.emitBaseBubblingEvent("blur")}setParent(t){this._parentItem=t,super.setParent(t)}handleUpdateItemConfigEvent(t){this.applyUpdatableConfig(t)}updateNodeSize(t){if("none"!==this.element.style.display){const{width:e,height:i}=kt(this.element);this._container.setSizeToNodeSize(e,i,t)}}}class $t extends Gt{constructor(){super(...arguments),this._focused=!1}get focused(){return this._focused}setFocusedValue(t){this._focused=t}}class Zt extends Wt{constructor(t,e){super(),this._eElement=t,this._pointerTracking=!1,this._pointerDownEventListener=t=>this.onPointerDown(t),this._pointerMoveEventListener=t=>this.onPointerMove(t),this._pointerUpEventListener=t=>this.onPointerUp(t),this._timeout=void 0,this._allowableTargets=[t,...e],this._oDocument=document,this._eBody=document.body,this._nDelay=1800,this._nDistance=10,this._nX=0,this._nY=0,this._nOriginalX=0,this._nOriginalY=0,this._dragging=!1,this._eElement.addEventListener("pointerdown",this._pointerDownEventListener,{passive:!0})}destroy(){this.checkRemovePointerTrackingEventListeners(),this._eElement.removeEventListener("pointerdown",this._pointerDownEventListener)}cancelDrag(){this.processDragStop(void 0)}onPointerDown(t){if(this._allowableTargets.includes(t.target)&&t.isPrimary){const e=this.getPointerCoordinates(t);this.processPointerDown(e)}}processPointerDown(t){this._nOriginalX=t.x,this._nOriginalY=t.y,this._oDocument.addEventListener("pointermove",this._pointerMoveEventListener),this._oDocument.addEventListener("pointerup",this._pointerUpEventListener,{passive:!0}),this._pointerTracking=!0,this._timeout=setTimeout((()=>{try{this.startDrag()}catch(t){throw console.error(t),t}}),this._nDelay)}onPointerMove(t){this._pointerTracking&&(this.processDragMove(t),t.preventDefault())}processDragMove(t){this._nX=t.pageX-this._nOriginalX,this._nY=t.pageY-this._nOriginalY,!1===this._dragging&&(Math.abs(this._nX)>this._nDistance||Math.abs(this._nY)>this._nDistance)&&this.startDrag(),this._dragging&&this.emit("drag",this._nX,this._nY,t)}onPointerUp(t){this.processDragStop(t)}processDragStop(t){var e;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this.checkRemovePointerTrackingEventListeners(),!0===this._dragging&&(this._eBody.classList.remove("lm_dragging"),this._eElement.classList.remove("lm_dragging"),null===(e=this._oDocument.querySelector("iframe"))||void 0===e||e.style.setProperty("pointer-events",""),this._dragging=!1,this.emit("dragStop",t))}checkRemovePointerTrackingEventListeners(){this._pointerTracking&&(this._oDocument.removeEventListener("pointermove",this._pointerMoveEventListener),this._oDocument.removeEventListener("pointerup",this._pointerUpEventListener),this._pointerTracking=!1)}startDrag(){var t;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this._dragging=!0,this._eBody.classList.add("lm_dragging"),this._eElement.classList.add("lm_dragging"),null===(t=this._oDocument.querySelector("iframe"))||void 0===t||t.style.setProperty("pointer-events","none"),this.emit("dragStart",this._nOriginalX,this._nOriginalY)}getPointerCoordinates(t){return{x:t.pageX,y:t.pageY}}}class qt{constructor(t,e,i){this._isVertical=t,this._size=e,this._grabSize=i0){const i=this.createSplitter(Math.max(0,e-1)).element;e>0?(this.contentItems[e-1].element.insertAdjacentElement("afterend",i),i.insertAdjacentElement("afterend",t.element)):(this.contentItems[0].element.insertAdjacentElement("beforebegin",i),i.insertAdjacentElement("beforebegin",t.element))}else this._childElementContainer.appendChild(t.element);super.addChild(t,e);const n=1/this.contentItems.length*100;if(!0===i)return this.emitBaseBubblingEvent("stateChanged"),e;for(let e=0;e0&&(this.calculateRelativeSizes(),this.setAbsoluteSizes()),this.emitBaseBubblingEvent("stateChanged"),this.emit("resize")}setAbsoluteSizes(){const t=this.calculateAbsoluteSizes();for(let e=0;e0&&t.itemSizes[e]++,this._isColumn?(Tt(this.contentItems[e].element,t.crossAxisSize),At(this.contentItems[e].element,t.itemSizes[e])):(Tt(this.contentItems[e].element,t.itemSizes[e]),At(this.contentItems[e].element,t.crossAxisSize))}calculateAbsoluteSizes(){const t=(this.contentItems.length-1)*this._splitterSize,{width:e,height:i}=kt(this.element);let n,o;this._isColumn?(n=i-t,o=e):(n=e-t,o=i);let s=0;const r=[];for(let t=0;t0){const n=100-t;for(let t=0;t100&&e.length>0){for(let t=0;te)return;{const r=i/e;let a=i;for(let e=0;ethis.onSplitterDrag(e,t,i))),e.on("dragStop",(()=>this.onSplitterDragStop(e))),e.on("dragStart",(()=>this.onSplitterDragStart(e))),this._splitter.splice(t,0,e),e}getSplitItems(t){const e=this._splitter.indexOf(t);return{before:this.contentItems[e],after:this.contentItems[e+1]}}calculateContentItemMinSize(t){const e=t.minSize;if(void 0!==e){if(t.minSizeUnit===ht.Pixel)return e;throw new X("ROCGMD98831",JSON.stringify(t))}{const t=this.layoutManager.layoutConfig.dimensions;return this._isColumn?t.defaultMinItemHeight:t.defaultMinItemWidth}}calculateContentItemsTotalMinSize(t){let e=0;for(const i of t)e+=this.calculateContentItemMinSize(i);return e}onSplitterDragStart(t){const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=this.calculateContentItemsTotalMinSize(e.before.contentItems),s=this.calculateContentItemsTotalMinSize(e.after.contentItems);this._splitterPosition=0,this._splitterMinPosition=-1*(i-o),this._splitterMaxPosition=n-s}onSplitterDrag(t,e,i){let n=this._isColumn?i:e;if(null===this._splitterMinPosition||null===this._splitterMaxPosition)throw new K("ROCOSD59226");n=Math.max(n,this._splitterMinPosition),n=Math.min(n,this._splitterMaxPosition),this._splitterPosition=n;const o=zt(n);this._isColumn?t.element.style.top=o:t.element.style.left=o}onSplitterDragStop(t){if(null===this._splitterPosition)throw new K("ROCOSDS66932");{const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=(this._splitterPosition+i)/(i+n),s=e.before.size+e.after.size;e.before.size=o*s,e.after.size=(1-o)*s,t.element.style.top=zt(0),t.element.style.left=zt(0),globalThis.requestAnimationFrame((()=>this.updateSize(!1)))}}}!function(t){t.getElementDimensionSize=function(t,e){return"width"===e?function(t){return t.offsetWidth}(t):function(t){return t.offsetHeight}(t)},t.setElementDimensionSize=function(t,e,i){return"width"===e?Tt(t,i):At(t,i)},t.createElement=function(t,e){const i=t.createElement("div");return i.classList.add("lm_item"),e?i.classList.add("lm_column"):i.classList.add("lm_row"),i}}(Xt||(Xt={}));class Yt extends $t{constructor(t,e,i){super(t,vt.create(e),null,Yt.createElement(document)),this.isGround=!0,this._childElementContainer=this.element,this._containerElement=i;let n=null;for(;;){const t=n?n.previousSibling:this._containerElement.lastChild;if(!(t instanceof Element&&t.classList.contains("lm_content")))break;n=t}this._containerElement.insertBefore(this.element,n)}init(){if(!0!==this.isInitialised){this.updateNodeSize();for(let t=0;t0?this.contentItems[0]:this,n.isComponent)throw new Error("Cannot add item as child to ComponentItem");{const t=this.layoutManager.createAndInitContentItem(i,n);return e=n.addChild(t,e),n===this?-1:e}}loadComponentAsRoot(t){this.clearRoot();const e=Ct.resolve(t,!1);if(e.maximised)throw new Error("Root Component cannot be maximised");{const t=new jt(this.layoutManager,e,this);t.init(),this.addChild(t,0)}}addChild(t,e){if(this.contentItems.length>0)throw new Error("Ground node can only have a single child");return this._childElementContainer.appendChild(t.element),e=super.addChild(t,e),this.updateSize(!1),this.emitBaseBubblingEvent("stateChanged"),e}calculateConfigContent(){const t=this.contentItems,e=t.length,i=new Array(e);for(let n=0;n0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e)),this.updateContentItemsSize(!1))}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}createSideAreas(){const t=Yt.Area.oppositeSides,e=new Array(Object.keys(t).length);let i=0;for(const n in t){const o=n,s=this.getElementArea();if(null===s)throw new K("RCSA77553");s.side=o,"2"===t[o][1]?s[o]=s[t[o]]-50:s[o]=s[t[o]]+50,s.surface=(s.x2-s.x1)*(s.y2-s.y1),e[i++]=s}return e}highlightDropZone(t,e,i){this.layoutManager.tabDropPlaceholder.remove(),super.highlightDropZone(t,e,i)}onDrop(t,e){if(t.isComponent){const e=ut.createDefault(),i=t;e.header=mt.Header.createCopy(i.headerConfig);const n=this.layoutManager.createAndInitContentItem(e,this);n.addChild(t),t=n}if(0===this.contentItems.length)this.addChild(t);else{if(t.type===at.row||t.type===at.column){const e=ut.createDefault(),i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}const i="x"==e.side[0]?at.row:at.column,n="2"==e.side[1],o=this.contentItems[0];if(o instanceof Xt&&o.type===i){const e=o.contentItems[n?0:o.contentItems.length-1];o.addChild(t,n?0:void 0,!0),e.size*=.5,t.size=e.size,t.sizeUnit=ht.Percent,o.updateSize(!1)}else{const e=ct.createDefault(i),s=this.layoutManager.createContentItem(e,this);this.replaceChild(o,s),s.addChild(t,n?0:void 0,!0),s.addChild(o,n?void 0:0,!0),o.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}}dock(){throw new X("GID87731")}validateDocking(){throw new X("GIVD87732")}getAllContentItems(){const t=[this];return this.deepGetAllContentItems(this.contentItems,t),t}getConfigMaximisedItems(){const t=[];return this.deepFilterContentItems(this.contentItems,t,(t=>!(!Gt.isStack(t)||!t.initialWantMaximise)||!(!Gt.isComponentItem(t)||!t.initialWantMaximise))),t}getItemsByPopInParentId(t){const e=[];return this.deepFilterContentItems(this.contentItems,e,(e=>e.popInParentIds.includes(t))),e}toConfig(){throw new Error("Cannot generate GroundItem config")}setActiveComponentItem(t,e,i){}updateNodeSize(){const{width:t,height:e}=kt(this._containerElement);Tt(this.element,t),At(this.element,e),this.contentItems.length>0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e))}deepGetAllContentItems(t,e){for(let i=0;ithis.onClick(t),this._touchStartEventListener=t=>this.onTouchStart(t),this._element=document.createElement("div"),this._element.classList.add(i),this._element.title=e,this._header.on("destroy",(()=>this.destroy())),this._element.addEventListener("click",this._clickEventListener,{passive:!0}),this._element.addEventListener("touchstart",this._touchStartEventListener,{passive:!0}),this._header.controlsContainerElement.appendChild(this._element)}get element(){return this._element}destroy(){var t;this._element.removeEventListener("click",this._clickEventListener),this._element.removeEventListener("touchstart",this._touchStartEventListener),null===(t=this._element.parentNode)||void 0===t||t.removeChild(this._element)}onClick(t){this._pushEvent(t)}onTouchStart(t){this._pushEvent(t)}}class Jt{constructor(t,e,i,n,o){var s;this._layoutManager=t,this._componentItem=e,this._closeEvent=i,this._focusEvent=n,this._dragStartEvent=o,this._isActive=!1,this._tabClickListener=t=>this.onTabClickDown(t),this._tabTouchStartListener=t=>this.onTabTouchStart(t),this._closeClickListener=()=>this.onCloseClick(),this._closeTouchStartListener=()=>this.onCloseTouchStart(),this._dragStartListener=(t,e)=>this.onDragStart(t,e),this._contentItemDestroyListener=()=>this.onContentItemDestroy(),this._tabTitleChangedListener=t=>this.setTitle(t),this._element=document.createElement("div"),this._element.classList.add("lm_tab"),this._titleElement=document.createElement("span"),this._titleElement.classList.add("lm_title"),this._closeElement=document.createElement("div"),this._closeElement.classList.add("lm_close_tab"),this._element.appendChild(this._titleElement),this._element.appendChild(this._closeElement),e.isClosable?this._closeElement.style.display="":this._closeElement.style.display="none",this.setTitle(e.title),this._componentItem.on("titleChanged",this._tabTitleChangedListener);(null!==(s=e.reorderEnabled)&&void 0!==s?s:this._layoutManager.layoutConfig.settings.reorderEnabled)&&this.enableReorder(),this._element.addEventListener("click",this._tabClickListener,{passive:!0}),this._element.addEventListener("touchstart",this._tabTouchStartListener,{passive:!0}),this._componentItem.isClosable?(this._closeElement.addEventListener("click",this._closeClickListener,{passive:!0}),this._closeElement.addEventListener("touchstart",this._closeTouchStartListener,{passive:!0})):(this._closeElement.remove(),this._closeElement=void 0),this._componentItem.setTab(this),this._layoutManager.emit("tabCreated",this)}get isActive(){return this._isActive}get componentItem(){return this._componentItem}get contentItem(){return this._componentItem}get element(){return this._element}get titleElement(){return this._titleElement}get closeElement(){return this._closeElement}get reorderEnabled(){return void 0!==this._dragListener}set reorderEnabled(t){t!==this.reorderEnabled&&(t?this.enableReorder():this.disableReorder())}setTitle(t){this._titleElement.innerText=t,this._element.title=t}setActive(t){t!==this._isActive&&(this._isActive=t,t?this._element.classList.add("lm_active"):this._element.classList.remove("lm_active"))}destroy(){var t,e;this._closeEvent=void 0,this._focusEvent=void 0,this._dragStartEvent=void 0,this._element.removeEventListener("click",this._tabClickListener),this._element.removeEventListener("touchstart",this._tabTouchStartListener),null===(t=this._closeElement)||void 0===t||t.removeEventListener("click",this._closeClickListener),null===(e=this._closeElement)||void 0===e||e.removeEventListener("touchstart",this._closeTouchStartListener),this._componentItem.off("titleChanged",this._tabTitleChangedListener),this.reorderEnabled&&this.disableReorder(),this._element.remove()}setBlurred(){this._element.classList.remove("lm_focused"),this._titleElement.classList.remove("lm_focused")}setFocused(){this._element.classList.add("lm_focused"),this._titleElement.classList.add("lm_focused")}onDragStart(t,e){if(void 0===this._dragListener)throw new J("TODSDLU10093");if(void 0===this._dragStartEvent)throw new J("TODS23309");this._dragStartEvent(t,e,this._dragListener,this.componentItem)}onContentItemDestroy(){void 0!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=void 0)}onTabClickDown(t){const e=t.target;e!==this._element&&e!==this._titleElement||(0===t.button?this.notifyFocus():1===t.button&&this._componentItem.isClosable&&this.notifyClose())}onTabTouchStart(t){t.target===this._element&&this.notifyFocus()}onCloseClick(){this.notifyClose()}onCloseTouchStart(){this.notifyClose()}notifyClose(){if(void 0===this._closeEvent)throw new J("TNC15007");this._closeEvent(this._componentItem)}notifyFocus(){if(void 0===this._focusEvent)throw new J("TNA15007");this._focusEvent(this._componentItem)}enableReorder(){this._dragListener=new Zt(this._element,[this._titleElement]),this._dragListener.on("dragStart",this._dragStartListener),this._componentItem.on("destroy",this._contentItemDestroyListener)}disableReorder(){if(void 0===this._dragListener)throw new J("TDR87745");this._componentItem.off("destroy",this._contentItemDestroyListener),this._dragListener.off("dragStart",this._dragStartListener),this._dragListener=void 0}}class Qt{constructor(t,e,i,n,o){this._layoutManager=t,this._componentRemoveEvent=e,this._componentFocusEvent=i,this._componentDragStartEvent=n,this._dropdownActiveChangedEvent=o,this._tabs=[],this._lastVisibleTabIndex=-1,this._dropdownActive=!1,this._element=document.createElement("section"),this._element.classList.add("lm_tabs"),this._dropdownElement=document.createElement("section"),this._dropdownElement.classList.add("lm_tabdropdown_list"),this._dropdownElement.style.display="none"}get tabs(){return this._tabs}get tabCount(){return this._tabs.length}get lastVisibleTabIndex(){return this._lastVisibleTabIndex}get element(){return this._element}get dropdownElement(){return this._dropdownElement}get dropdownActive(){return this._dropdownActive}destroy(){for(let t=0;tthis.handleTabCloseEvent(t)),(t=>this.handleTabFocusEvent(t)),((t,e,i,n)=>this.handleTabDragStartEvent(t,e,i,n)));void 0===e&&(e=this._tabs.length),this._tabs.splice(e,0,i),ethis._lastVisibleTabIndex){const t=this._tabs[e];for(let t=e;t>0;t--)this._tabs[t]=this._tabs[t-1];this._tabs[0]=t}}updateTabSizes(t,e){let i=!1;this.tryUpdateTabSizes(i,t,e)||(i=!0,this.tryUpdateTabSizes(i,t,e)),i!==this._dropdownActive&&(this._dropdownActive=i,this._dropdownActiveChangedEvent())}tryUpdateTabSizes(t,e,i){if(this._tabs.length>0){if(void 0===i)throw new Error("non-empty tabs must have active component item");let n=0,o=!1;const s=this._layoutManager.layoutConfig.settings.tabOverlapAllowance,r=this._tabs.indexOf(i.tab),a=this._tabs[r];this._lastVisibleTabIndex=-1;for(let i=0;ie){if(o)i===r&&(l.style.zIndex="auto",l.style.marginLeft="",l.parentElement!==this._element&&this._element.appendChild(l));else{let t;if(t=r>0&&r<=i?(d-e)/(i-1):(d-e)/i,tthis.onClick(t),this._touchStartListener=t=>this.onTouchStart(t),this._rowColumnClosable=!0,this._closeButton=null,this._popoutButton=null,this._tabsContainer=new Qt(this._layoutManager,(t=>this.handleTabInitiatedComponentRemoveEvent(t)),(t=>this.handleTabInitiatedComponentFocusEvent(t)),((t,e,i,n)=>this.handleTabInitiatedDragStartEvent(t,e,i,n)),(()=>this.processTabDropdownActiveChanged())),this._show=i.show,this._popoutEnabled=i.popoutEnabled,this._popoutLabel=i.popoutLabel,this._maximiseEnabled=i.maximiseEnabled,this._maximiseLabel=i.maximiseLabel,this._minimiseEnabled=i.minimiseEnabled,this._minimiseLabel=i.minimiseLabel,this._closeEnabled=i.closeEnabled,this._closeLabel=i.closeLabel,this._tabDropdownEnabled=i.tabDropdownEnabled,this._tabDropdownLabel=i.tabDropdownLabel,this.setSide(i.side),this._canRemoveComponent=this._configClosable,this._element=document.createElement("section"),this._element.classList.add("lm_header"),this._controlsContainerElement=document.createElement("section"),this._controlsContainerElement.classList.add("lm_controls"),this._element.appendChild(this._tabsContainer.element),this._element.appendChild(this._controlsContainerElement),this._element.appendChild(this._tabsContainer.dropdownElement),this._element.addEventListener("click",this._clickListener,{passive:!0}),this._element.addEventListener("touchstart",this._touchStartListener,{passive:!0}),this._documentMouseUpListener=()=>this._tabsContainer.hideAdditionalTabsDropdown(),globalThis.document.addEventListener("mouseup",this._documentMouseUpListener,{passive:!0}),this._tabControlOffset=this._layoutManager.layoutConfig.settings.tabControlOffset,this._tabDropdownEnabled&&(this._tabDropdownButton=new Kt(this,this._tabDropdownLabel,"lm_tabdropdown",(()=>this._tabsContainer.showAdditionalTabsDropdown()))),this._popoutEnabled&&(this._popoutButton=new Kt(this,this._popoutLabel,"lm_popout",(()=>this.handleButtonPopoutEvent()))),this._maximiseEnabled&&(this._maximiseButton=new Kt(this,this._maximiseLabel,"lm_maximise",(t=>this.handleButtonMaximiseToggleEvent(t)))),this._configClosable&&(this._closeButton=new Kt(this,this._closeLabel,"lm_close",(()=>s()))),this.processTabDropdownActiveChanged()}get show(){return this._show}get side(){return this._side}get leftRightSided(){return this._leftRightSided}get layoutManager(){return this._layoutManager}get parent(){return this._parent}get tabs(){return this._tabsContainer.tabs}get lastVisibleTabIndex(){return this._tabsContainer.lastVisibleTabIndex}get element(){return this._element}get tabsContainerElement(){return this._tabsContainer.element}get controlsContainerElement(){return this._controlsContainerElement}destroy(){this.emit("destroy"),this._popoutEvent=void 0,this._maximiseToggleEvent=void 0,this._clickEvent=void 0,this._touchStartEvent=void 0,this._componentRemoveEvent=void 0,this._componentFocusEvent=void 0,this._componentDragStartEvent=void 0,this._tabsContainer.destroy(),globalThis.document.removeEventListener("mouseup",this._documentMouseUpListener),this._element.remove()}createTab(t,e){this._tabsContainer.createTab(t,e)}removeTab(t){this._tabsContainer.removeTab(t)}processActiveComponentChanged(t){this._tabsContainer.processActiveComponentChanged(t),this.updateTabSizes()}setSide(t){this._side=t,this._leftRightSided=[nt.right,nt.left].includes(this._side)}setRowColumnClosable(t){this._rowColumnClosable=t,this.updateClosability()}updateClosability(){let t;if(this._configClosable)if(this._rowColumnClosable){t=!0;const e=this.tabs.length;for(let i=0;i1}applyFocusedValue(t){t?this._element.classList.add("lm_focused"):this._element.classList.remove("lm_focused")}processMaximised(){if(void 0===this._maximiseButton)throw new J("HPMAX16997");this._maximiseButton.element.setAttribute("title",this._minimiseLabel)}processMinimised(){if(void 0===this._maximiseButton)throw new J("HPMIN16997");this._maximiseButton.element.setAttribute("title",this._maximiseLabel)}updateTabSizes(){if(this._tabsContainer.tabCount>0){const t=this._show?this._layoutManager.layoutConfig.dimensions.headerHeight:0;let e;this._leftRightSided?(this._element.style.height="",this._element.style.width=zt(t)):(this._element.style.width="",this._element.style.height=zt(t)),e=this._leftRightSided?this._element.offsetHeight-this._controlsContainerElement.offsetHeight-this._tabControlOffset:this._element.offsetWidth-this._controlsContainerElement.offsetWidth-this._tabControlOffset,this._tabsContainer.updateTabSizes(e,this._getActiveComponentItemEvent())}}handleTabInitiatedComponentRemoveEvent(t){if(this._canRemoveComponent){if(void 0===this._componentRemoveEvent)throw new J("HHTCE22294");this._componentRemoveEvent(t)}}handleTabInitiatedComponentFocusEvent(t){if(void 0===this._componentFocusEvent)throw new J("HHTAE22294");this._componentFocusEvent(t)}handleTabInitiatedDragStartEvent(t,e,i,n){if(this._canRemoveComponent){if(void 0===this._componentDragStartEvent)throw new J("HHTDSE22294");this._componentDragStartEvent(t,e,i,n)}else i.cancelDrag()}processTabDropdownActiveChanged(){void 0!==this._tabDropdownButton&&Dt(this._tabDropdownButton.element,this._tabsContainer.dropdownActive)}handleButtonPopoutEvent(){if(this._layoutManager.layoutConfig.settings.popoutWholeStack){if(void 0===this._popoutEvent)throw new J("HHBPOE17834");this._popoutEvent()}else{const t=this._getActiveComponentItemEvent();t&&t.popout()}}handleButtonMaximiseToggleEvent(t){if(void 0===this._maximiseToggleEvent)throw new J("HHBMTE16834");this._maximiseToggleEvent()}onClick(t){t.target===this._element&&this.notifyClick(t)}onTouchStart(t){t.target===this._element&&this.notifyTouchStart(t)}notifyClick(t){if(void 0===this._clickEvent)throw new J("HNHC46834");this._clickEvent(t)}notifyTouchStart(t){if(void 0===this._touchStartEvent)throw new J("HNHTS46834");this._touchStartEvent(t)}}class ee extends $t{constructor(t,e,i){var n,o,s,r,a,l,h,d,c,m,u,p,g,f,v,_,y,C,w;super(t,e,i,ee.createElement(document)),this._headerSideChanged=!1,this._resizeListener=()=>this.handleResize(),this._maximisedListener=()=>this.handleMaximised(),this._minimisedListener=()=>this.handleMinimised(),this._headerConfig=e.header;const I=t.layoutConfig.header,b=e.content;let S;if(1!==b.length)S=void 0;else{S=b[0].header}this._initialWantMaximise=e.maximised,this._initialActiveItemIndex=null!==(n=e.activeItemIndex)&&void 0!==n?n:0;const E=null!==(r=null!==(s=null===(o=this._headerConfig)||void 0===o?void 0:o.show)&&void 0!==s?s:null==S?void 0:S.show)&&void 0!==r?r:I.show,x=null!==(h=null!==(l=null===(a=this._headerConfig)||void 0===a?void 0:a.popout)&&void 0!==l?l:null==S?void 0:S.popout)&&void 0!==h?h:I.popout,L=null!==(m=null!==(c=null===(d=this._headerConfig)||void 0===d?void 0:d.maximise)&&void 0!==c?c:null==S?void 0:S.maximise)&&void 0!==m?m:I.maximise,z=null!==(g=null!==(p=null===(u=this._headerConfig)||void 0===u?void 0:u.close)&&void 0!==p?p:null==S?void 0:S.close)&&void 0!==g?g:I.close,M=null!==(_=null!==(v=null===(f=this._headerConfig)||void 0===f?void 0:f.minimise)&&void 0!==v?v:null==S?void 0:S.minimise)&&void 0!==_?_:I.minimise,P=null!==(w=null!==(C=null===(y=this._headerConfig)||void 0===y?void 0:y.tabDropdown)&&void 0!==C?C:null==S?void 0:S.tabDropdown)&&void 0!==w?w:I.tabDropdown;this._maximisedEnabled=!1!==L;const T={show:!1!==E,side:!1===E?nt.top:E,popoutEnabled:!1!==x,popoutLabel:!1===x?"":x,maximiseEnabled:this._maximisedEnabled,maximiseLabel:!1===L?"":L,closeEnabled:!1!==z,closeLabel:!1===z?"":z,minimiseEnabled:!0,minimiseLabel:M,tabDropdownEnabled:!1!==P,tabDropdownLabel:!1===P?"":P};this._header=new te(t,this,T,e.isClosable&&!1!==z,(()=>this.getActiveComponentItem()),(()=>this.remove()),(()=>this.handlePopoutEvent()),(()=>this.toggleMaximise()),(t=>this.handleHeaderClickEvent(t)),(t=>this.handleHeaderTouchStartEvent(t)),(t=>this.handleHeaderComponentRemoveEvent(t)),(t=>this.handleHeaderComponentFocusEvent(t)),((t,e,i,n)=>this.handleHeaderComponentStartDragEvent(t,e,i,n))),this.isStack=!0,this._childElementContainer=document.createElement("section"),this._childElementContainer.classList.add("lm_items"),this.on("resize",this._resizeListener),this._maximisedEnabled&&(this.on("maximised",this._maximisedListener),this.on("minimised",this._minimisedListener)),this.element.appendChild(this._header.element),this.element.appendChild(this._childElementContainer),this.setupHeaderPosition(),this._header.updateClosability()}get childElementContainer(){return this._childElementContainer}get header(){return this._header}get headerShow(){return this._header.show}get headerSide(){return this._header.side}get headerLeftRightSided(){return this._header.leftRightSided}get contentAreaDimensions(){return this._contentAreaDimensions}get initialWantMaximise(){return this._initialWantMaximise}get isMaximised(){return this===this.layoutManager.maximisedStack}get stackParent(){if(!this.parent)throw new Error("Stack should always have a parent");return this.parent}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}init(){if(!0===this.isInitialised)return;this.updateNodeSize();for(let t=0;t0){if(this._initialActiveItemIndex<0||this._initialActiveItemIndex>=e)throw new Error(`ActiveItemIndex out of range: ${this._initialActiveItemIndex} id: ${this.id}`);for(let i=0;ithis.contentItems.length)throw e-=1,new X("SAC99728");if(t instanceof jt)return e=super.addChild(t,e),this._childElementContainer.appendChild(t.element),this._header.createTab(t,e),this.setActiveComponentItem(t,i),this._header.updateTabSizes(),this.updateSize(!1),t.container.setBaseLogicalZIndex(),this._header.updateClosability(),this.emitStateChangedEvent(),e;throw new X("SACC88532")}removeChild(t,e){const i=t,n=this.contentItems.indexOf(i),o=1===this.contentItems.length;if(this._activeComponentItem===i&&(i.focused&&i.blur(),!o)){const t=0===n?1:n-1;this.setActiveComponentItem(this.contentItems[t],!1)}this._header.removeTab(i),super.removeChild(i,e),o||this._header.updateClosability(),this.emitStateChangedEvent()}toggleMaximise(){this.isMaximised?this.minimise():this.maximise()}maximise(){if(!this.isMaximised){this.layoutManager.setMaximisedStack(this);const t=this.contentItems,e=t.length;for(let i=0;i0&&void 0===t)throw new Error("expected non-empty stack to have an active component item");return{type:"stack",content:this.calculateConfigContent(),size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,isClosable:this.isClosable,maximised:this.isMaximised,header:this.createHeaderConfig(),activeItemIndex:t}}onDrop(t,e){if("header"===this._dropSegment){if(this.resetHeaderDropZone(),void 0===this._dropIndex)throw new J("SODDI68990");return void this.addChild(t,this._dropIndex)}if("body"===this._dropSegment)return void this.addChild(t,0,!0);const i="top"===this._dropSegment||"bottom"===this._dropSegment,n="left"===this._dropSegment||"right"===this._dropSegment,o="top"===this._dropSegment||"left"===this._dropSegment,s=i&&this.stackParent.isColumn||n&&this.stackParent.isRow;if(t.isComponent){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createAndInitContentItem(e,this);i.addChild(t),t=i}if(t.type===at.row||t.type===at.column){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}if(s){const e=this.stackParent.contentItems.indexOf(this);this.stackParent.addChild(t,o?e:e+1,!0),this.size*=.5,t.size=this.size,t.sizeUnit=this.sizeUnit,this.stackParent.updateSize(!1)}else{const e=i?at.column:at.row,n=ct.createDefault(e),s=this.layoutManager.createContentItem(n,this);this.stackParent.replaceChild(this,s),s.addChild(t,o?0:void 0,!0),s.addChild(this,o?void 0:0,!0),this.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}highlightDropZone(t,e){for(const i in this._contentAreaDimensions){const n=i,o=this._contentAreaDimensions[n].hoverArea;if(o.x1t&&o.y1e)return void("header"===n?(this._dropSegment="header",this.highlightHeaderDropZone(this._header.leftRightSided?e:t)):(this.resetHeaderDropZone(),this.highlightBodyDropZone(n)))}}getArea(){if("none"===this.element.style.display)return null;const t=super.getElementArea(this._header.element),e=super.getElementArea(this._childElementContainer);if(null===t||null===e)throw new K("SGAHC13086");const i=e.x2-e.x1,n=e.y2-e.y1;return this._contentAreaDimensions={header:{hoverArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2},highlightArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2}}},0===this.contentItems.length?(this._contentAreaDimensions.body={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2}},super.getElementArea(this.element)):(this._contentAreaDimensions.left={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x1+.25*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x1+.5*i,y2:e.y2}},this._contentAreaDimensions.top={hoverArea:{x1:e.x1+.25*i,y1:e.y1,x2:e.x1+.75*i,y2:e.y1+.5*n},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y1+.5*n}},this._contentAreaDimensions.right={hoverArea:{x1:e.x1+.75*i,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1+.5*i,y1:e.y1,x2:e.x2,y2:e.y2}},this._contentAreaDimensions.bottom={hoverArea:{x1:e.x1+.25*i,y1:e.y1+.5*n,x2:e.x1+.75*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1+.5*n,x2:e.x2,y2:e.y2}},super.getElementArea(this.element))}positionHeader(t){this._header.side!==t&&(this._header.setSide(t),this._headerSideChanged=!0,this.setupHeaderPosition())}updateNodeSize(){if("none"!==this.element.style.display){const t=kt(this.element);if(this._header.show){t[this._header.leftRightSided?it.width:it.height]-=this.layoutManager.layoutConfig.dimensions.headerHeight}this._childElementContainer.style.width=zt(t.width),this._childElementContainer.style.height=zt(t.height);for(let e=0;e=o&&t({...t,[e]:i});async function s(t,e){return(await Promise.all(e.map((async([e,i])=>[e,await t(i,e)])))).reduce(o,{})}n.mapEntriesAsync=s,n.mapValuesAsync=async function(t,e){let i;return i=e instanceof Map?[...e.entries()]:Object.entries(e),s(t,i)};var r,a,l,h,d=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldSet||function(t,e,i,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(t,i):o?o.value=i:e.set(t,i),i},c=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldGet||function(t,e,i,n){if("a"===i&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?n:"a"===i?n.call(t):n?n.value:e.get(t)};Object.defineProperty(i,"__esModule",{value:!0});var m=i.DefaultLayoutManager=void 0;const u=n;class p{constructor(t){a.set(this,void 0),l.set(this,new Map),d(this,a,t,"f")}size(){return c(this,l,"f").size}async applyLayoutSnapshot({layouts:t}){if(Object.keys(t).length>1)throw new Error("[LayoutManager] Tried to call applyLayoutSnapshot with more than 1 layout. When implementing multiple layouts via overridden LayoutManager class, you must override and fully implement the applyLayoutSnapshot method without calling super.applyLayoutSnapshot().");const[[e,i]]=Object.entries(t);await p.createLayout(this,{layoutName:e,layout:i})}async showLayout({layoutName:t}){}async getLayoutSnapshot(){return{layouts:await(0,u.mapValuesAsync)((t=>t.getFrameSnapshot()),c(this,l,"f"))}}async removeLayout({layoutName:t}){}getLayoutIdentityForView(t){const e=[...c(this,l,"f").values()].find((e=>e.getCurrentViews().some((e=>e.name===t.name&&e.uuid===t.uuid))));return e?.identity??void 0}isLayoutVisible({layoutName:t}){return c(p,r,"m",h).call(p,this,t).isVisible()}resolveLayoutIdentity(t){if(t&&"layoutName"in t)return t;const e=[...c(this,l,"f").values()];if(1===e.length)return e[0].identity;const i=e.find((t=>t.isVisible()));return i?.identity??void 0}static async resolveLayout(t,e){const i=t.resolveLayoutIdentity(e);if(void 0===i||!("layoutName"in i))throw new Error("[layout-manager] resolveLayout: Could not resolve the layout identity. Make sure you include 'layoutName' in the identity object.");return c(p,r,"m",h).call(p,t,i.layoutName)}static async handleSharedView(t,e,i){await(0,u.mapValuesAsync)((async t=>{if(t.identity.layoutName!==e.layoutName){const e=t.getCurrentViews().find((t=>t.name===i.name));e&&await t.onViewDetached({viewIdentity:e,target:null}).catch(console.error)}}),c(t,l,"f"))}static async handleLastViewRemoved(t,e){await t.removeLayout(e),await c(t,a,"f").handleLastViewRemoved(t)}static async destroyLayout(t,{layoutName:e}){await c(p,r,"m",h).call(p,t,e).destroy(),c(t,l,"f").delete(e)}static async createLayout(t,e){const{layoutName:i}=e;if(c(t,l,"f").has(i))throw new Error(`Layout name ${i} already exists`);await c(t,a,"f").createLayout(e,t)}static registerLayout(t,e,i){c(t,l,"f").set(e,i)}static getAllLayouts(t){return[...c(t,l,"f").values()]}static setInitialSnapshot(t,e){c(t,a,"f").setInitialSnapshot(e)}static createClosedConstructor(...t){return class extends p{constructor(){super(...t)}}}}m=i.DefaultLayoutManager=p,r=p,a=new WeakMap,l=new WeakMap,h=function(t,e){const i=c(t,l,"f").get(e);if(!i)throw new Error(`[layout-manager] getLayoutByName: Could not locate layout with name '${e}'`);return i};var g={},f={},v={};Object.defineProperty(v,"__esModule",{value:!0}),v.ReversibleMap=void 0;v.ReversibleMap=class{constructor(){this.valueToKey=new Map,this.keyToValue=new Map,this.setUnique=(t,e)=>{if(this.hasKey(t)||this.hasValue(e))throw new Error("Key or value already in the map.");this.keyToValue.set(t,e),this.valueToKey.set(e,t)},this.getKey=t=>{const e=this.valueToKey.get(t);if(!e)throw new Error("Value not found in the map.");return e},this.deleteKey=t=>{const e=this.getValue(t);return this.keyToValue.delete(t),this.valueToKey.delete(e),e},this.deleteValue=t=>{const e=this.getKey(t);return this.keyToValue.delete(e),this.valueToKey.delete(t),e},this.hasKey=t=>this.keyToValue.has(t),this.hasValue=t=>this.valueToKey.has(t)}getValue(t){const e=this.keyToValue.get(t);if(!e)throw new Error("Key not found in the map.");return e}},Object.defineProperty(f,"__esModule",{value:!0});var _=f.LayoutContentCache=void 0;const y=t.lazy,C=v;class w{constructor(){this.contentItemCache=new C.ReversibleMap,this.contentItemCacheId=0,this.createCacheKey=()=>{const t=`entity-${this.contentItemCacheId.toString()}`;return this.contentItemCacheId+=1,t},this.hasKey=t=>this.contentItemCache.hasKey(t),this.getItemOrUndefined=t=>{try{return this.getContentItemOrThrow(t)}catch(t){return}},this.getContentItemOrThrow=(t,e)=>{if(!this.contentItemCache.hasKey(t))throw new Error("Layout component has been destroyed or detached from the current layout.");const i=this.contentItemCache.getValue(t);if(e&&!e.includes(i.type))throw new Error(`Layout item is not the expected type. Expected ${e.join(", ")}, got ${i.type}.`);return i},this.getOrCreateEntityId=t=>{if(this.contentItemCache.hasValue(t))return this.contentItemCache.getKey(t);t.onDestroyed((()=>{this.contentItemCache.deleteValue(t)}));const e=this.createCacheKey();return this.contentItemCache.setUnique(e,t),e}}static getSingleInstance(){return w.singleton.getValue()}}_=f.LayoutContentCache=w,w.singleton=new y.Lazy((()=>new w));var I={},b={};!function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.getAdjacentStacks=t.doShareEdge=t.getAdjacentItem=void 0;t.getAdjacentItem=(e,i)=>{const{parent:n}=e;if(e.isRoot()||!n)return;const o=["top","bottom"].includes(i)?"column":"row",s=["top","left"].includes(i)?-1:1;if(n.type===o){const t=n.contentItems.indexOf(e)+s;if(t>=0&&t{const n=t.getBounds(),o=e.getBounds();if(!n||!o)return!1;if(["top","bottom"].includes(i)){return!(n.righto.right)}return!(n.bottomo.bottom)};t.getAdjacentStacks=(e,i)=>{const n=["top","bottom"].includes(i)?"row":"column",o=s=>"stack"===s.type?(0,t.doShareEdge)(e,s,i)?[s]:[]:"root"===s.type||"ground"===s.type?[]:s.type===n?s.contentItems.map((t=>o(t))).flat():s.type!==n?["top","right"].includes(i)?o(s.contentItems[s.contentItems.length-1]):o(s.contentItems[0]):[],s=(0,t.getAdjacentItem)(e,i);return s?o(s):[]}}(b);var S=t.commonjsGlobal&&t.commonjsGlobal.__decorate||function(t,e,i,n){var o,s=arguments.length,r=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(s<3?o(r):s>3?o(e,i,r):o(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};Object.defineProperty(I,"__esModule",{value:!0}),I.LayoutEntitiesController=void 0;const E=t.decorators,x=b,L=i;class z{constructor(t,e,i){this.wire=t,this.layoutManager=e,this.layoutContentCache=i,this.analytics=t=>{this.wire.sendAction(`layout-controller-${t}`).catch((()=>{}))},this.getLayoutIdentityForViewOrThrow=async t=>{const e=this.layoutManager.getLayoutIdentityForView(t);if(!e)throw new Error(`View identity ${t.name} is not attached to any layouts.`);return e},this.getRoot=async t=>{this.analytics("get-root");const e=(await this.getLayout(t)).getRoot();return{type:e.type,entityId:this.layoutContentCache.getOrCreateEntityId(e)}},this.getStackByView=async t=>{this.analytics("get-stack-by-view");const e=await this.getLayoutIdentityForViewOrThrow(t),i=(await this.getLayout(e)).getStackByView(t);if("stack"===i?.type)return{entityId:this.layoutContentCache.getOrCreateEntityId(i),type:"stack"}},this.getStackViews=t=>{this.analytics("get-stack-views");return this.layoutContentCache.getContentItemOrThrow(t,["stack"]).contentItems.map((t=>({name:t.viewName,uuid:this.wire.me.uuid})))},this.isRoot=t=>{this.analytics("is-root");return this.layoutContentCache.getContentItemOrThrow(t).isRoot()},this.exists=t=>(this.analytics("exists"),this.layoutContentCache.hasKey(t)),this.addViewToStack=async(t,e,{index:i}={index:0})=>{this.analytics("add-view-to-stack");const n=this.layoutContentCache.getContentItemOrThrow(t);if(i&&i>n.contentItems.length+1)throw new Error(`Index '${i}' out of range, please exclude the index or specify a number between 0 and ${n.contentItems.length}`);const o={id:t,index:i},{identity:s}=await n.layout.platformCreateView(e,{location:o});return s},this.findViewInStack=(t,e)=>t.contentItems.find((t=>t.viewName===e.name)),this.removeViewFromStack=async(t,e)=>{this.analytics("remove-view-from-stack");const i=this.layoutContentCache.getContentItemOrThrow(t,["stack"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to remove a view ('${e.name}') which does not belong to the stack.`);await n.layout.platformCloseView(e)},this.createAdjacentStack=async(t,e,{position:i="right"}={})=>{if(this.analytics("create-adjacent-stack"),!Array.isArray(e)||0===e.length)throw new Error('The parameter "views" must be an array with at least 1 element.');if(!["top","bottom","left","right"].includes(i))throw new Error(`Invalid position '${i}' specified.`);const n=this.layoutContentCache.getContentItemOrThrow(t).createAdjacentStack({position:i}),o=this.layoutContentCache.getOrCreateEntityId(n);return await Promise.all(e.reverse().map((t=>this.addViewToStack(o,t)))),o},this.getAdjacentStacks=async({targetId:t,edge:e})=>{this.analytics("get-adjacent-stacks");const i=this.layoutContentCache.getContentItemOrThrow(t);return(0,x.getAdjacentStacks)(i,e).map((t=>({entityId:this.layoutContentCache.getOrCreateEntityId(t)})))},this.setStackActiveView=async(t,e)=>{this.analytics("set-stack-active-view");const i=this.layoutContentCache.getContentItemOrThrow(t,["stack"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to set a view ('${e.name}') as active when it does not belong to the stack.`);i.setActiveContentItem(n,!0)}}async getLayout(t){const e=await L.DefaultLayoutManager.resolveLayout(this.layoutManager,t);if(!e)throw new Error(`Could not resolve target layout identity ${JSON.stringify(t)}`);return e}getContent(t){this.analytics("get-content");return this.layoutContentCache.getContentItemOrThrow(t,["column","row"]).contentItems.map((t=>({type:t.type,entityId:this.layoutContentCache.getOrCreateEntityId(t)})))}getParent(t){this.analytics("get-parent");const e=this.layoutContentCache.getContentItemOrThrow(t);if(!e.isRoot())return e.parent?.contentItems.includes(e)?{type:e.parent.type,entityId:this.layoutContentCache.getOrCreateEntityId(e.parent)}:void 0}}S([(0,E.expose)()],z.prototype,"getLayoutIdentityForViewOrThrow",void 0),S([(0,E.expose)()],z.prototype,"getRoot",void 0),S([(0,E.expose)()],z.prototype,"getStackByView",void 0),S([(0,E.expose)()],z.prototype,"getStackViews",void 0),S([(0,E.expose)()],z.prototype,"getContent",null),S([(0,E.expose)()],z.prototype,"getParent",null),S([(0,E.expose)()],z.prototype,"isRoot",void 0),S([(0,E.expose)()],z.prototype,"exists",void 0),S([(0,E.expose)()],z.prototype,"addViewToStack",void 0),S([(0,E.expose)()],z.prototype,"removeViewFromStack",void 0),S([(0,E.expose)()],z.prototype,"createAdjacentStack",void 0),S([(0,E.expose)()],z.prototype,"getAdjacentStacks",void 0),S([(0,E.expose)()],z.prototype,"setStackActiveView",void 0),I.LayoutEntitiesController=z,Object.defineProperty(g,"__esModule",{value:!0});var M=g.initLayoutEndpoints=void 0;const P=t.apiExposer,T=t.layout_constants,A=f,k=I,D=i;M=g.initLayoutEndpoints=async function(t,e){const i=t.getFin(),n=await i.Platform.getCurrentSync().getClient(),o=new P.ChannelsExposer(n);await new P.ApiExposer(o).exposeInstance(new k.LayoutEntitiesController(t,e,A.LayoutContentCache.getSingleInstance()),{id:T.LAYOUT_CONTROLLER_ID}),await async function(t,e){const i=t=>async i=>{const n=await D.DefaultLayoutManager.resolveLayout(e,i.target);if(!n)throw new Error(`Could not resolve the layout target from payload ${JSON.stringify(i)}`);return t(n,i)},n=(e,n)=>{t.register(e,i(n))},o=(t,e)=>{n(t,e)};n("replace-view",((t,e)=>t.replaceView(e))),n("replace-layout",((t,{layout:e})=>t.replaceLayout(e))),n("add-view",((t,e)=>t.insertView(e))),o("layout-add-view",((t,{viewOptions:e,location:i,targetView:n})=>t.platformCreateView(e,{location:i,targetView:n}))),n("close-view",((t,e)=>t.cleanupView(e.viewIdentity))),o("layout-close-view",((t,e)=>t.platformCloseView(e.viewIdentity))),n("apply-preset-layout",((t,e)=>t.applyPreset(e))),n("get-layout-views",(t=>t.getCurrentViews())),n("get-frame-snapshot",(t=>t.getFrameSnapshot())),n("is-visible",(t=>t.isVisible())),n("destroy",(t=>t.destroy())),t.register("get-layout-snapshot",(()=>e.getLayoutSnapshot()))}(n,e)};var R={};Object.defineProperty(R,"__esModule",{value:!0});var U=R.BaseLayout=void 0;U=R.BaseLayout=class{};var O={};Object.defineProperty(O,"__esModule",{value:!0});var V=O.DOMEmitter=void 0;V=O.DOMEmitter=class{constructor(t){this.container=t}dispatchLocalEvent(t,e){const i={...e,type:t,tabSelector:`tab-${e.name}`,containerSelector:`container-${e.name}`,topic:"openfin-DOM-event"};this.container.dispatchEvent(new CustomEvent(t,{detail:i}))}};var B={};Object.defineProperty(B,"__esModule",{value:!0});var H=B.mapLayoutContentItemsImmutableSync=B.mapLayoutContentItemsImmutable=W=B.isVisible=void 0;var W=B.isVisible=t=>(0!==t.offsetWidth||0!==t.offsetHeight)&&"hidden"!==window.getComputedStyle(t).visibility&&t.offsetTop>=0&&t.offsetLeft>=0&&t.offsetTop<=window.innerHeight&&t.offsetLeft<=window.innerWidth;const F=t=>"type"in t&&"component"===t.type;B.mapLayoutContentItemsImmutable=async function t(e,i){return F(i)?e(i):{...i,content:await Promise.all(i.content?.map((i=>t(e,i))))}},H=B.mapLayoutContentItemsImmutableSync=function t(e,i){return F(i)?e(i):{...i,content:i.content?.map((i=>t(e,i)))}};class N extends Error{constructor(t,e){super(e),this.type=t}}class G extends N{constructor(t,e){super("Configuration",t),this.node=e}}class j extends N{constructor(t){super("PopoutBlocked",t)}}class $ extends N{constructor(t){super("API",t)}}class Z extends N{constructor(t){super("Bind",t)}}class q extends Error{constructor(t,e,i){super(`${t}: ${e}${void 0===i?"":": "+i}`)}}class X extends q{constructor(t,e){super("Assert",t,e)}}class Y extends q{constructor(t,e,i){super("UnreachableCase",t,`${e}${void 0===i?"":": "+i}`)}}class K extends q{constructor(t,e){super("UnexpectedNull",t,e)}}class J extends q{constructor(t,e){super("UnexpectedUndefined",t,e)}}var Q;!function(t){let e=!1;const i={PopoutCannotBeCreatedWithGroundItemConfig:{id:0,default:"Popout cannot be created with ground ItemConfig"},PleaseRegisterAConstructorFunction:{id:1,default:"Please register a constructor function"},ComponentTypeNotRegisteredAndBindComponentEventHandlerNotAssigned:{id:2,default:"Component type not registered and BindComponentEvent handler not assigned"},ComponentIsAlreadyRegistered:{id:3,default:"Component is already registered"},ComponentIsNotVirtuable:{id:4,default:"Component is not virtuable. Requires rootHtmlElement field/getter"},VirtualComponentDoesNotHaveRootHtmlElement:{id:5,default:'Virtual component does not have getter "rootHtmlElement"'},ItemConfigIsNotTypeComponent:{id:6,default:"ItemConfig is not of type component"},InvalidNumberPartInSizeString:{id:7,default:"Invalid number part in size string"},UnknownUnitInSizeString:{id:8,default:"Unknown unit in size string"},UnsupportedUnitInSizeString:{id:9,default:"Unsupported unit in size string"}};t.idCount=Object.keys(i).length;const n=Object.values(i);t.checkInitialise=function(){if(!e)for(let e=0;e="0"&&t<="9"}function Tt(t,e){const i=zt(e);t.style.width=i}function At(t,e){const i=zt(e);t.style.height=i}function kt(t){return{width:t.offsetWidth,height:t.offsetHeight}}function Dt(t,e){t.style.display=e?"":"none"}function Rt(t,e){if(void 0!==e)for(const i in e)if(e.hasOwnProperty(i)){const n=e[i],o=t[i];t[i]=Ut(o,n)}return t}function Ut(t,e){if("object"!=typeof e)return e;if(Array.isArray(e)){const t=e.length,i=new Array(t);for(let n=0;n36)throw new Error("Too many keys in config minifier map")},t.translateObject=n}(dt||(dt={})),function(t){t.defaults={type:at.ground,content:[],size:1,sizeUnit:ht.Fractional,minSize:void 0,minSizeUnit:ht.Pixel,id:"",isClosable:!0},t.createCopy=function(t,e){switch(t.type){case at.ground:case at.row:case at.column:return gt.createCopy(t,e);case at.stack:return ut.createCopy(t,e);case at.component:return pt.createCopy(t);default:throw new Y("CICC91354",t.type,"Invalid Config Item type specified")}},t.createDefault=function(t){switch(t){case at.ground:throw new X("CICCDR91562");case at.row:case at.column:return gt.createDefault(t);case at.stack:return ut.createDefault();case at.component:return pt.createDefault();default:throw new Y("CICCDD91563",t,"Invalid Config Item type specified")}},t.isComponentItem=function(t){return t.type===at.component},t.isStackItem=function(t){return t.type===at.stack},t.isGroundItem=function(t){return t.type===at.ground}}(ct||(ct={})),function(t){t.defaultMaximised=!1,function(t){t.createCopy=function(t,e){return void 0===t?void 0:{show:null!=e?e:t.show,popout:t.popout,close:t.close,maximise:t.maximise,minimise:t.minimise,tabDropdown:t.tabDropdown}}}(t.Header||(t.Header={}))}(mt||(mt={})),function(t){function e(t){const e=t.length,i=new Array(e);for(let n=0;n"__glMaximised"===t));t>0&&(o=!0,n=n.splice(t,1)),e=n.length>0?n[0]:ct.defaults.id}else e=n;return i=void 0!==t.maximised?t.maximised:o,{id:e,maximised:i}}}(wt||(wt={})),function(t){function e(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0;return{resolved:!0,root:Et.resolve(i),openPopouts:t.resolveOpenPopouts(e.openPopouts),dimensions:t.Dimensions.resolve(e.dimensions),settings:t.Settings.resolve(e.settings),header:t.Header.resolve(e.header,e.settings,e.labels)}}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:Lt.fromResolvedArray(e.openPopouts),settings:_t.Settings.createCopy(e.settings),dimensions:t.Dimensions.fromResolved(e.dimensions),header:_t.Header.createCopy(e.header)}},t.isResolved=function(t){const e=t;return void 0!==e.resolved&&!0===e.resolved},t.resolveOpenPopouts=function(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0,{root:Et.resolve(o),openPopouts:xt.resolveOpenPopouts(e.openPopouts),dimensions:xt.Dimensions.resolve(e.dimensions),settings:xt.Settings.resolve(e.settings),header:xt.Header.resolve(e.header,e.settings,e.labels),parentId:null!==(i=e.parentId)&&void 0!==i?i:null,indexInParent:null!==(n=e.indexInParent)&&void 0!==n?n:null,window:t.Window.resolve(e.window,e.dimensions),resolved:!0}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:i(e.openPopouts),dimensions:xt.Dimensions.fromResolved(e.dimensions),settings:_t.Settings.createCopy(e.settings),header:_t.Header.createCopy(e.header),parentId:e.parentId,indexInParent:e.indexInParent,window:t.Window.fromResolved(e.window)}},t.fromResolvedArray=i}(Lt||(Lt={}));class Wt{constructor(){this._allEventSubscriptions=[],this._subscriptionsMap=new Map,this.unbind=this.removeEventListener,this.trigger=this.emit}tryBubbleEvent(t,e){}emit(t,...e){let i=this._subscriptionsMap.get(t);if(void 0!==i){i=i.slice();for(let t=0;t0){const n=e.slice();n.unshift(t);const o=this._allEventSubscriptions.slice();for(let t=0;t0?n.contentItems[0]:n,e=0);const o=this._layoutManager.createAndInitContentItem(i,t);t.addChild(o,e),this._layoutManager.layoutConfig.settings.popInOnClose?this._onClose():this.close()}createWindow(){const t=this.createUrl(),e=Math.floor(1e6*Math.random()).toString(36),i=this.serializeWindowFeatures({width:this._initialWindowSize.width,height:this._initialWindowSize.height,innerWidth:this._initialWindowSize.width,innerHeight:this._initialWindowSize.height,menubar:"no",toolbar:"no",location:"no",personalbar:"no",resizable:"yes",scrollbars:"no",status:"no"});if(this._popoutWindow=globalThis.open(t,e,i),this._popoutWindow)this._popoutWindow.addEventListener("load",(()=>this.positionWindow()),{passive:!0}),this._popoutWindow.addEventListener("beforeunload",(()=>{this._layoutManager.layoutConfig.settings.popInOnClose?this.popIn():this._onClose()}),{passive:!0}),this._checkReadyInterval=setInterval((()=>this.checkReady()),10);else if(!0===this._layoutManager.layoutConfig.settings.blockedPopoutsThrowError){throw new j("Popout blocked")}}checkReady(){if(null===this._popoutWindow)throw new K("BPCR01844");this._popoutWindow.__glInstance&&this._popoutWindow.__glInstance.isInitialised&&(this.onInitialised(),void 0!==this._checkReadyInterval&&(clearInterval(this._checkReadyInterval),this._checkReadyInterval=void 0))}serializeWindowFeatures(t){const e=[];for(const i in t)e.push(i+"="+t[i].toString());return e.join(",")}createUrl(){const t="gl-window-config-"+Ot(),e=_t.minifyConfig(this._config);try{localStorage.setItem(t,JSON.stringify(e))}catch(t){throw new Error("Error while writing to localStorage "+function(t){return t instanceof Error?t.message:"string"==typeof t?t:"Unknown Error"}(t))}const i=new URL(location.href);return i.searchParams.set("gl-window",t),i.toString()}positionWindow(){if(null===this._popoutWindow)throw new Error("BrowserPopout.positionWindow: null popoutWindow");this._popoutWindow.moveTo(this._initialWindowSize.left,this._initialWindowSize.top),this._popoutWindow.focus()}onInitialised(){this._isInitialised=!0,this.getGlInstance().on("popIn",(()=>this.popIn())),this.emit("initialised")}_onClose(){setTimeout((()=>this.emit("closed")),50)}}class Gt extends Wt{constructor(t,e,i,n){super(),this.layoutManager=t,this._parent=i,this._element=n,this._popInParentIds=[],this._type=e.type,this._id=e.id,this._isInitialised=!1,this.isGround=!1,this.isRow=!1,this.isColumn=!1,this.isStack=!1,this.isComponent=!1,this.size=e.size,this.sizeUnit=e.sizeUnit,this.minSize=e.minSize,this.minSizeUnit=e.minSizeUnit,this._isClosable=e.isClosable,this._pendingEventPropagations={},this._throttledEvents=["stateChanged"],this._contentItems=this.createContentItems(e.content)}get type(){return this._type}get id(){return this._id}set id(t){this._id=t}get popInParentIds(){return this._popInParentIds}get parent(){return this._parent}get contentItems(){return this._contentItems}get isClosable(){return this._isClosable}get element(){return this._element}get isInitialised(){return this._isInitialised}static isStack(t){return t.isStack}static isComponentItem(t){return t.isComponent}static isComponentParentableItem(t){return t.isStack||t.isGround}removeChild(t,e=!1){const i=this._contentItems.indexOf(t);if(-1===i)throw new Error("Can't remove child item. Unknown content item");if(e||this._contentItems[i].destroy(),this._contentItems.splice(i,1),this._contentItems.length>0)this.updateSize(!1);else if(!this.isGround&&!0===this._isClosable){if(null===this._parent)throw new K("CIUC00874");this._parent.removeChild(this)}}addChild(t,e,i){return null!=e||(e=this._contentItems.length),this._contentItems.splice(e,0,t),t.setParent(this),!0===this._isInitialised&&!1===t._isInitialised&&t.init(),e}replaceChild(t,e,i=!1){const n=this._contentItems.indexOf(t),o=t._element.parentNode;if(-1===n)throw new X("CIRCI23232","Can't replace child. oldChild is not child of this");if(null===o)throw new K("CIRCP23232");if(o.replaceChild(e._element,t._element),!0===i&&(t._parent=null,t.destroy()),this._contentItems[n]=e,e.setParent(this),e.size=t.size,e.sizeUnit=t.sizeUnit,e.minSize=t.minSize,e.minSizeUnit=t.minSizeUnit,null===e._parent)throw new K("CIRCNC45699");!0===e._parent._isInitialised&&!1===e._isInitialised&&e.init(),this.updateSize(!1)}remove(){if(null===this._parent)throw new K("CIR11110");this._parent.removeChild(this)}popout(){const t=Ot(),e=this.layoutManager.createPopoutFromContentItem(this,void 0,t,void 0);return this.emitBaseBubblingEvent("stateChanged"),e}calculateConfigContent(){const t=this._contentItems,e=t.length,i=new Array(e);for(let n=0;nthis.propagateEventToLayoutManager(t,e))))}propagateEventToLayoutManager(t,e){this._pendingEventPropagations[t]=!1,this.layoutManager.emitUnknown(t,e)}}class jt extends Gt{constructor(t,e,i){super(t,e,i,document.createElement("div")),this._parentItem=i,this._focused=!1,this.isComponent=!0,this._reorderEnabled=e.reorderEnabled,this.applyUpdatableConfig(e),this._initialWantMaximise=e.maximised;const n=document.createElement("div");n.classList.add("lm_content"),this.element.appendChild(n),this._container=new Ft(e,this,t,n,(t=>this.handleUpdateItemConfigEvent(t)),(()=>this.show()),(()=>this.hide()),(t=>this.focus(t)),(t=>this.blur(t)))}get componentName(){return this._container.componentType}get componentType(){return this._container.componentType}get reorderEnabled(){return this._reorderEnabled}get initialWantMaximise(){return this._initialWantMaximise}get component(){return this._container.component}get container(){return this._container}get parentItem(){return this._parentItem}get headerConfig(){return this._headerConfig}get title(){return this._title}get tab(){return this._tab}get focused(){return this._focused}destroy(){this._container.destroy(),super.destroy()}applyUpdatableConfig(t){this.setTitle(t.title),this._headerConfig=t.header}toConfig(){const t=this._container.stateRequestEvent,e=void 0===t?this._container.state:t();return{type:at.component,content:[],size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,maximised:!1,isClosable:this.isClosable,reorderEnabled:this._reorderEnabled,title:this._title,header:mt.Header.createCopy(this._headerConfig),componentType:pt.copyComponentType(this.componentType),componentState:e}}close(){if(null===this.parent)throw new K("CIC68883");this.parent.removeChild(this,!1)}enterDragMode(t,e){Tt(this.element,t),At(this.element,e),this._container.enterDragMode(t,e)}exitDragMode(){this._container.exitDragMode()}enterStackMaximised(){this._container.enterStackMaximised()}exitStackMaximised(){this._container.exitStackMaximised()}drag(){this._container.drag()}updateSize(t){this.updateNodeSize(t)}init(){this.updateNodeSize(!1),super.init(),this._container.emit("open"),this.initContentItems()}setTitle(t){this._title=t,this.emit("titleChanged",t),this.emit("stateChanged")}setTab(t){this._tab=t,this.emit("tab",t),this._container.setTab(t)}hide(){super.hide(),this._container.setVisibility(!1)}show(){super.show(),this._container.setVisibility(!0)}focus(t=!1){this.parentItem.setActiveComponentItem(this,!0,t)}setFocused(t){this._focused=!0,this.tab.setFocused(),t||this.emitBaseBubblingEvent("focus")}blur(t=!1){this._focused&&this.layoutManager.setFocusedComponentItem(void 0,t)}setBlurred(t){this._focused=!1,this.tab.setBlurred(),t||this.emitBaseBubblingEvent("blur")}setParent(t){this._parentItem=t,super.setParent(t)}handleUpdateItemConfigEvent(t){this.applyUpdatableConfig(t)}updateNodeSize(t){if("none"!==this.element.style.display){const{width:e,height:i}=kt(this.element);this._container.setSizeToNodeSize(e,i,t)}}}class $t extends Gt{constructor(){super(...arguments),this._focused=!1}get focused(){return this._focused}setFocusedValue(t){this._focused=t}}class Zt extends Wt{constructor(t,e){super(),this._eElement=t,this._pointerTracking=!1,this._pointerDownEventListener=t=>this.onPointerDown(t),this._pointerMoveEventListener=t=>this.onPointerMove(t),this._pointerUpEventListener=t=>this.onPointerUp(t),this._timeout=void 0,this._allowableTargets=[t,...e],this._oDocument=document,this._eBody=document.body,this._nDelay=1800,this._nDistance=10,this._nX=0,this._nY=0,this._nOriginalX=0,this._nOriginalY=0,this._dragging=!1,this._eElement.addEventListener("pointerdown",this._pointerDownEventListener,{passive:!0})}destroy(){this.checkRemovePointerTrackingEventListeners(),this._eElement.removeEventListener("pointerdown",this._pointerDownEventListener)}cancelDrag(){this.processDragStop(void 0)}onPointerDown(t){if(this._allowableTargets.includes(t.target)&&t.isPrimary){const e=this.getPointerCoordinates(t);this.processPointerDown(e)}}processPointerDown(t){this._nOriginalX=t.x,this._nOriginalY=t.y,this._oDocument.addEventListener("pointermove",this._pointerMoveEventListener),this._oDocument.addEventListener("pointerup",this._pointerUpEventListener,{passive:!0}),this._pointerTracking=!0,this._timeout=setTimeout((()=>{try{this.startDrag()}catch(t){throw console.error(t),t}}),this._nDelay)}onPointerMove(t){this._pointerTracking&&(this.processDragMove(t),t.preventDefault())}processDragMove(t){this._nX=t.pageX-this._nOriginalX,this._nY=t.pageY-this._nOriginalY,!1===this._dragging&&(Math.abs(this._nX)>this._nDistance||Math.abs(this._nY)>this._nDistance)&&this.startDrag(),this._dragging&&this.emit("drag",this._nX,this._nY,t)}onPointerUp(t){this.processDragStop(t)}processDragStop(t){var e;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this.checkRemovePointerTrackingEventListeners(),!0===this._dragging&&(this._eBody.classList.remove("lm_dragging"),this._eElement.classList.remove("lm_dragging"),null===(e=this._oDocument.querySelector("iframe"))||void 0===e||e.style.setProperty("pointer-events",""),this._dragging=!1,this.emit("dragStop",t))}checkRemovePointerTrackingEventListeners(){this._pointerTracking&&(this._oDocument.removeEventListener("pointermove",this._pointerMoveEventListener),this._oDocument.removeEventListener("pointerup",this._pointerUpEventListener),this._pointerTracking=!1)}startDrag(){var t;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this._dragging=!0,this._eBody.classList.add("lm_dragging"),this._eElement.classList.add("lm_dragging"),null===(t=this._oDocument.querySelector("iframe"))||void 0===t||t.style.setProperty("pointer-events","none"),this.emit("dragStart",this._nOriginalX,this._nOriginalY)}getPointerCoordinates(t){return{x:t.pageX,y:t.pageY}}}class qt{constructor(t,e,i){this._isVertical=t,this._size=e,this._grabSize=i0){const i=this.createSplitter(Math.max(0,e-1)).element;e>0?(this.contentItems[e-1].element.insertAdjacentElement("afterend",i),i.insertAdjacentElement("afterend",t.element)):(this.contentItems[0].element.insertAdjacentElement("beforebegin",i),i.insertAdjacentElement("beforebegin",t.element))}else this._childElementContainer.appendChild(t.element);super.addChild(t,e);const n=1/this.contentItems.length*100;if(!0===i)return this.emitBaseBubblingEvent("stateChanged"),e;for(let e=0;e0&&(this.calculateRelativeSizes(),this.setAbsoluteSizes()),this.emitBaseBubblingEvent("stateChanged"),this.emit("resize")}setAbsoluteSizes(){const t=this.calculateAbsoluteSizes();for(let e=0;e0&&t.itemSizes[e]++,this._isColumn?(Tt(this.contentItems[e].element,t.crossAxisSize),At(this.contentItems[e].element,t.itemSizes[e])):(Tt(this.contentItems[e].element,t.itemSizes[e]),At(this.contentItems[e].element,t.crossAxisSize))}calculateAbsoluteSizes(){const t=(this.contentItems.length-1)*this._splitterSize,{width:e,height:i}=kt(this.element);let n,o;this._isColumn?(n=i-t,o=e):(n=e-t,o=i);let s=0;const r=[];for(let t=0;t0){const n=100-t;for(let t=0;t100&&e.length>0){for(let t=0;te)return;{const r=i/e;let a=i;for(let e=0;ethis.onSplitterDrag(e,t,i))),e.on("dragStop",(()=>this.onSplitterDragStop(e))),e.on("dragStart",(()=>this.onSplitterDragStart(e))),this._splitter.splice(t,0,e),e}getSplitItems(t){const e=this._splitter.indexOf(t);return{before:this.contentItems[e],after:this.contentItems[e+1]}}calculateContentItemMinSize(t){const e=t.minSize;if(void 0!==e){if(t.minSizeUnit===ht.Pixel)return e;throw new X("ROCGMD98831",JSON.stringify(t))}{const t=this.layoutManager.layoutConfig.dimensions;return this._isColumn?t.defaultMinItemHeight:t.defaultMinItemWidth}}calculateContentItemsTotalMinSize(t){let e=0;for(const i of t)e+=this.calculateContentItemMinSize(i);return e}onSplitterDragStart(t){const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=this.calculateContentItemsTotalMinSize(e.before.contentItems),s=this.calculateContentItemsTotalMinSize(e.after.contentItems);this._splitterPosition=0,this._splitterMinPosition=-1*(i-o),this._splitterMaxPosition=n-s}onSplitterDrag(t,e,i){let n=this._isColumn?i:e;if(null===this._splitterMinPosition||null===this._splitterMaxPosition)throw new K("ROCOSD59226");n=Math.max(n,this._splitterMinPosition),n=Math.min(n,this._splitterMaxPosition),this._splitterPosition=n;const o=zt(n);this._isColumn?t.element.style.top=o:t.element.style.left=o}onSplitterDragStop(t){if(null===this._splitterPosition)throw new K("ROCOSDS66932");{const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=(this._splitterPosition+i)/(i+n),s=e.before.size+e.after.size;e.before.size=o*s,e.after.size=(1-o)*s,t.element.style.top=zt(0),t.element.style.left=zt(0),globalThis.requestAnimationFrame((()=>this.updateSize(!1)))}}}!function(t){t.getElementDimensionSize=function(t,e){return"width"===e?function(t){return t.offsetWidth}(t):function(t){return t.offsetHeight}(t)},t.setElementDimensionSize=function(t,e,i){return"width"===e?Tt(t,i):At(t,i)},t.createElement=function(t,e){const i=t.createElement("div");return i.classList.add("lm_item"),e?i.classList.add("lm_column"):i.classList.add("lm_row"),i}}(Xt||(Xt={}));class Yt extends $t{constructor(t,e,i){super(t,vt.create(e),null,Yt.createElement(document)),this.isGround=!0,this._childElementContainer=this.element,this._containerElement=i;let n=null;for(;;){const t=n?n.previousSibling:this._containerElement.lastChild;if(!(t instanceof Element&&t.classList.contains("lm_content")))break;n=t}this._containerElement.insertBefore(this.element,n)}init(){if(!0!==this.isInitialised){this.updateNodeSize();for(let t=0;t0?this.contentItems[0]:this,n.isComponent)throw new Error("Cannot add item as child to ComponentItem");{const t=this.layoutManager.createAndInitContentItem(i,n);return e=n.addChild(t,e),n===this?-1:e}}loadComponentAsRoot(t){this.clearRoot();const e=Ct.resolve(t,!1);if(e.maximised)throw new Error("Root Component cannot be maximised");{const t=new jt(this.layoutManager,e,this);t.init(),this.addChild(t,0)}}addChild(t,e){if(this.contentItems.length>0)throw new Error("Ground node can only have a single child");return this._childElementContainer.appendChild(t.element),e=super.addChild(t,e),this.updateSize(!1),this.emitBaseBubblingEvent("stateChanged"),e}calculateConfigContent(){const t=this.contentItems,e=t.length,i=new Array(e);for(let n=0;n0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e)),this.updateContentItemsSize(!1))}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}createSideAreas(){const t=Yt.Area.oppositeSides,e=new Array(Object.keys(t).length);let i=0;for(const n in t){const o=n,s=this.getElementArea();if(null===s)throw new K("RCSA77553");s.side=o,"2"===t[o][1]?s[o]=s[t[o]]-50:s[o]=s[t[o]]+50,s.surface=(s.x2-s.x1)*(s.y2-s.y1),e[i++]=s}return e}highlightDropZone(t,e,i){this.layoutManager.tabDropPlaceholder.remove(),super.highlightDropZone(t,e,i)}onDrop(t,e){if(t.isComponent){const e=ut.createDefault(),i=t;e.header=mt.Header.createCopy(i.headerConfig);const n=this.layoutManager.createAndInitContentItem(e,this);n.addChild(t),t=n}if(0===this.contentItems.length)this.addChild(t);else{if(t.type===at.row||t.type===at.column){const e=ut.createDefault(),i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}const i="x"==e.side[0]?at.row:at.column,n="2"==e.side[1],o=this.contentItems[0];if(o instanceof Xt&&o.type===i){const e=o.contentItems[n?0:o.contentItems.length-1];o.addChild(t,n?0:void 0,!0),e.size*=.5,t.size=e.size,t.sizeUnit=ht.Percent,o.updateSize(!1)}else{const e=ct.createDefault(i),s=this.layoutManager.createContentItem(e,this);this.replaceChild(o,s),s.addChild(t,n?0:void 0,!0),s.addChild(o,n?void 0:0,!0),o.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}}dock(){throw new X("GID87731")}validateDocking(){throw new X("GIVD87732")}getAllContentItems(){const t=[this];return this.deepGetAllContentItems(this.contentItems,t),t}getConfigMaximisedItems(){const t=[];return this.deepFilterContentItems(this.contentItems,t,(t=>!(!Gt.isStack(t)||!t.initialWantMaximise)||!(!Gt.isComponentItem(t)||!t.initialWantMaximise))),t}getItemsByPopInParentId(t){const e=[];return this.deepFilterContentItems(this.contentItems,e,(e=>e.popInParentIds.includes(t))),e}toConfig(){throw new Error("Cannot generate GroundItem config")}setActiveComponentItem(t,e,i){}updateNodeSize(){const{width:t,height:e}=kt(this._containerElement);Tt(this.element,t),At(this.element,e),this.contentItems.length>0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e))}deepGetAllContentItems(t,e){for(let i=0;ithis.onClick(t),this._touchStartEventListener=t=>this.onTouchStart(t),this._element=document.createElement("div"),this._element.classList.add(i),this._element.title=e,this._header.on("destroy",(()=>this.destroy())),this._element.addEventListener("click",this._clickEventListener,{passive:!0}),this._element.addEventListener("touchstart",this._touchStartEventListener,{passive:!0}),this._header.controlsContainerElement.appendChild(this._element)}get element(){return this._element}destroy(){var t;this._element.removeEventListener("click",this._clickEventListener),this._element.removeEventListener("touchstart",this._touchStartEventListener),null===(t=this._element.parentNode)||void 0===t||t.removeChild(this._element)}onClick(t){this._pushEvent(t)}onTouchStart(t){this._pushEvent(t)}}class Jt{constructor(t,e,i,n,o){var s;this._layoutManager=t,this._componentItem=e,this._closeEvent=i,this._focusEvent=n,this._dragStartEvent=o,this._isActive=!1,this._tabClickListener=t=>this.onTabClickDown(t),this._tabTouchStartListener=t=>this.onTabTouchStart(t),this._closeClickListener=()=>this.onCloseClick(),this._closeTouchStartListener=()=>this.onCloseTouchStart(),this._dragStartListener=(t,e)=>this.onDragStart(t,e),this._contentItemDestroyListener=()=>this.onContentItemDestroy(),this._tabTitleChangedListener=t=>this.setTitle(t),this._element=document.createElement("div"),this._element.classList.add("lm_tab"),this._titleElement=document.createElement("span"),this._titleElement.classList.add("lm_title"),this._closeElement=document.createElement("div"),this._closeElement.classList.add("lm_close_tab"),this._element.appendChild(this._titleElement),this._element.appendChild(this._closeElement),e.isClosable?this._closeElement.style.display="":this._closeElement.style.display="none",this.setTitle(e.title),this._componentItem.on("titleChanged",this._tabTitleChangedListener);(null!==(s=e.reorderEnabled)&&void 0!==s?s:this._layoutManager.layoutConfig.settings.reorderEnabled)&&this.enableReorder(),this._element.addEventListener("click",this._tabClickListener,{passive:!0}),this._element.addEventListener("touchstart",this._tabTouchStartListener,{passive:!0}),this._componentItem.isClosable?(this._closeElement.addEventListener("click",this._closeClickListener,{passive:!0}),this._closeElement.addEventListener("touchstart",this._closeTouchStartListener,{passive:!0})):(this._closeElement.remove(),this._closeElement=void 0),this._componentItem.setTab(this),this._layoutManager.emit("tabCreated",this)}get isActive(){return this._isActive}get componentItem(){return this._componentItem}get contentItem(){return this._componentItem}get element(){return this._element}get titleElement(){return this._titleElement}get closeElement(){return this._closeElement}get reorderEnabled(){return void 0!==this._dragListener}set reorderEnabled(t){t!==this.reorderEnabled&&(t?this.enableReorder():this.disableReorder())}setTitle(t){this._titleElement.innerText=t,this._element.title=t}setActive(t){t!==this._isActive&&(this._isActive=t,t?this._element.classList.add("lm_active"):this._element.classList.remove("lm_active"))}destroy(){var t,e;this._closeEvent=void 0,this._focusEvent=void 0,this._dragStartEvent=void 0,this._element.removeEventListener("click",this._tabClickListener),this._element.removeEventListener("touchstart",this._tabTouchStartListener),null===(t=this._closeElement)||void 0===t||t.removeEventListener("click",this._closeClickListener),null===(e=this._closeElement)||void 0===e||e.removeEventListener("touchstart",this._closeTouchStartListener),this._componentItem.off("titleChanged",this._tabTitleChangedListener),this.reorderEnabled&&this.disableReorder(),this._element.remove()}setBlurred(){this._element.classList.remove("lm_focused"),this._titleElement.classList.remove("lm_focused")}setFocused(){this._element.classList.add("lm_focused"),this._titleElement.classList.add("lm_focused")}onDragStart(t,e){if(void 0===this._dragListener)throw new J("TODSDLU10093");if(void 0===this._dragStartEvent)throw new J("TODS23309");this._dragStartEvent(t,e,this._dragListener,this.componentItem)}onContentItemDestroy(){void 0!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=void 0)}onTabClickDown(t){const e=t.target;e!==this._element&&e!==this._titleElement||(0===t.button?this.notifyFocus():1===t.button&&this._componentItem.isClosable&&this.notifyClose())}onTabTouchStart(t){t.target===this._element&&this.notifyFocus()}onCloseClick(){this.notifyClose()}onCloseTouchStart(){this.notifyClose()}notifyClose(){if(void 0===this._closeEvent)throw new J("TNC15007");this._closeEvent(this._componentItem)}notifyFocus(){if(void 0===this._focusEvent)throw new J("TNA15007");this._focusEvent(this._componentItem)}enableReorder(){this._dragListener=new Zt(this._element,[this._titleElement]),this._dragListener.on("dragStart",this._dragStartListener),this._componentItem.on("destroy",this._contentItemDestroyListener)}disableReorder(){if(void 0===this._dragListener)throw new J("TDR87745");this._componentItem.off("destroy",this._contentItemDestroyListener),this._dragListener.off("dragStart",this._dragStartListener),this._dragListener=void 0}}class Qt{constructor(t,e,i,n,o){this._layoutManager=t,this._componentRemoveEvent=e,this._componentFocusEvent=i,this._componentDragStartEvent=n,this._dropdownActiveChangedEvent=o,this._tabs=[],this._lastVisibleTabIndex=-1,this._dropdownActive=!1,this._element=document.createElement("section"),this._element.classList.add("lm_tabs"),this._dropdownElement=document.createElement("section"),this._dropdownElement.classList.add("lm_tabdropdown_list"),this._dropdownElement.style.display="none"}get tabs(){return this._tabs}get tabCount(){return this._tabs.length}get lastVisibleTabIndex(){return this._lastVisibleTabIndex}get element(){return this._element}get dropdownElement(){return this._dropdownElement}get dropdownActive(){return this._dropdownActive}destroy(){for(let t=0;tthis.handleTabCloseEvent(t)),(t=>this.handleTabFocusEvent(t)),((t,e,i,n)=>this.handleTabDragStartEvent(t,e,i,n)));void 0===e&&(e=this._tabs.length),this._tabs.splice(e,0,i),ethis._lastVisibleTabIndex){const t=this._tabs[e];for(let t=e;t>0;t--)this._tabs[t]=this._tabs[t-1];this._tabs[0]=t}}updateTabSizes(t,e){let i=!1;this.tryUpdateTabSizes(i,t,e)||(i=!0,this.tryUpdateTabSizes(i,t,e)),i!==this._dropdownActive&&(this._dropdownActive=i,this._dropdownActiveChangedEvent())}tryUpdateTabSizes(t,e,i){if(this._tabs.length>0){if(void 0===i)throw new Error("non-empty tabs must have active component item");let n=0,o=!1;const s=this._layoutManager.layoutConfig.settings.tabOverlapAllowance,r=this._tabs.indexOf(i.tab),a=this._tabs[r];this._lastVisibleTabIndex=-1;for(let i=0;ie){if(o)i===r&&(l.style.zIndex="auto",l.style.marginLeft="",l.parentElement!==this._element&&this._element.appendChild(l));else{let t;if(t=r>0&&r<=i?(d-e)/(i-1):(d-e)/i,tthis.onClick(t),this._touchStartListener=t=>this.onTouchStart(t),this._rowColumnClosable=!0,this._closeButton=null,this._popoutButton=null,this._tabsContainer=new Qt(this._layoutManager,(t=>this.handleTabInitiatedComponentRemoveEvent(t)),(t=>this.handleTabInitiatedComponentFocusEvent(t)),((t,e,i,n)=>this.handleTabInitiatedDragStartEvent(t,e,i,n)),(()=>this.processTabDropdownActiveChanged())),this._show=i.show,this._popoutEnabled=i.popoutEnabled,this._popoutLabel=i.popoutLabel,this._maximiseEnabled=i.maximiseEnabled,this._maximiseLabel=i.maximiseLabel,this._minimiseEnabled=i.minimiseEnabled,this._minimiseLabel=i.minimiseLabel,this._closeEnabled=i.closeEnabled,this._closeLabel=i.closeLabel,this._tabDropdownEnabled=i.tabDropdownEnabled,this._tabDropdownLabel=i.tabDropdownLabel,this.setSide(i.side),this._canRemoveComponent=this._configClosable,this._element=document.createElement("section"),this._element.classList.add("lm_header"),this._controlsContainerElement=document.createElement("section"),this._controlsContainerElement.classList.add("lm_controls"),this._element.appendChild(this._tabsContainer.element),this._element.appendChild(this._controlsContainerElement),this._element.appendChild(this._tabsContainer.dropdownElement),this._element.addEventListener("click",this._clickListener,{passive:!0}),this._element.addEventListener("touchstart",this._touchStartListener,{passive:!0}),this._documentMouseUpListener=()=>this._tabsContainer.hideAdditionalTabsDropdown(),globalThis.document.addEventListener("mouseup",this._documentMouseUpListener,{passive:!0}),this._tabControlOffset=this._layoutManager.layoutConfig.settings.tabControlOffset,this._tabDropdownEnabled&&(this._tabDropdownButton=new Kt(this,this._tabDropdownLabel,"lm_tabdropdown",(()=>this._tabsContainer.showAdditionalTabsDropdown()))),this._popoutEnabled&&(this._popoutButton=new Kt(this,this._popoutLabel,"lm_popout",(()=>this.handleButtonPopoutEvent()))),this._maximiseEnabled&&(this._maximiseButton=new Kt(this,this._maximiseLabel,"lm_maximise",(t=>this.handleButtonMaximiseToggleEvent(t)))),this._configClosable&&(this._closeButton=new Kt(this,this._closeLabel,"lm_close",(()=>s()))),this.processTabDropdownActiveChanged()}get show(){return this._show}get side(){return this._side}get leftRightSided(){return this._leftRightSided}get layoutManager(){return this._layoutManager}get parent(){return this._parent}get tabs(){return this._tabsContainer.tabs}get lastVisibleTabIndex(){return this._tabsContainer.lastVisibleTabIndex}get element(){return this._element}get tabsContainerElement(){return this._tabsContainer.element}get controlsContainerElement(){return this._controlsContainerElement}destroy(){this.emit("destroy"),this._popoutEvent=void 0,this._maximiseToggleEvent=void 0,this._clickEvent=void 0,this._touchStartEvent=void 0,this._componentRemoveEvent=void 0,this._componentFocusEvent=void 0,this._componentDragStartEvent=void 0,this._tabsContainer.destroy(),globalThis.document.removeEventListener("mouseup",this._documentMouseUpListener),this._element.remove()}createTab(t,e){this._tabsContainer.createTab(t,e)}removeTab(t){this._tabsContainer.removeTab(t)}processActiveComponentChanged(t){this._tabsContainer.processActiveComponentChanged(t),this.updateTabSizes()}setSide(t){this._side=t,this._leftRightSided=[nt.right,nt.left].includes(this._side)}setRowColumnClosable(t){this._rowColumnClosable=t,this.updateClosability()}updateClosability(){let t;if(this._configClosable)if(this._rowColumnClosable){t=!0;const e=this.tabs.length;for(let i=0;i1}applyFocusedValue(t){t?this._element.classList.add("lm_focused"):this._element.classList.remove("lm_focused")}processMaximised(){if(void 0===this._maximiseButton)throw new J("HPMAX16997");this._maximiseButton.element.setAttribute("title",this._minimiseLabel)}processMinimised(){if(void 0===this._maximiseButton)throw new J("HPMIN16997");this._maximiseButton.element.setAttribute("title",this._maximiseLabel)}updateTabSizes(){if(this._tabsContainer.tabCount>0){const t=this._show?this._layoutManager.layoutConfig.dimensions.headerHeight:0;let e;this._leftRightSided?(this._element.style.height="",this._element.style.width=zt(t)):(this._element.style.width="",this._element.style.height=zt(t)),e=this._leftRightSided?this._element.offsetHeight-this._controlsContainerElement.offsetHeight-this._tabControlOffset:this._element.offsetWidth-this._controlsContainerElement.offsetWidth-this._tabControlOffset,this._tabsContainer.updateTabSizes(e,this._getActiveComponentItemEvent())}}handleTabInitiatedComponentRemoveEvent(t){if(this._canRemoveComponent){if(void 0===this._componentRemoveEvent)throw new J("HHTCE22294");this._componentRemoveEvent(t)}}handleTabInitiatedComponentFocusEvent(t){if(void 0===this._componentFocusEvent)throw new J("HHTAE22294");this._componentFocusEvent(t)}handleTabInitiatedDragStartEvent(t,e,i,n){if(this._canRemoveComponent){if(void 0===this._componentDragStartEvent)throw new J("HHTDSE22294");this._componentDragStartEvent(t,e,i,n)}else i.cancelDrag()}processTabDropdownActiveChanged(){void 0!==this._tabDropdownButton&&Dt(this._tabDropdownButton.element,this._tabsContainer.dropdownActive)}handleButtonPopoutEvent(){if(this._layoutManager.layoutConfig.settings.popoutWholeStack){if(void 0===this._popoutEvent)throw new J("HHBPOE17834");this._popoutEvent()}else{const t=this._getActiveComponentItemEvent();t&&t.popout()}}handleButtonMaximiseToggleEvent(t){if(void 0===this._maximiseToggleEvent)throw new J("HHBMTE16834");this._maximiseToggleEvent()}onClick(t){t.target===this._element&&this.notifyClick(t)}onTouchStart(t){t.target===this._element&&this.notifyTouchStart(t)}notifyClick(t){if(void 0===this._clickEvent)throw new J("HNHC46834");this._clickEvent(t)}notifyTouchStart(t){if(void 0===this._touchStartEvent)throw new J("HNHTS46834");this._touchStartEvent(t)}}class ee extends $t{constructor(t,e,i){var n,o,s,r,a,l,h,d,c,m,u,p,g,f,v,_,y,C,w;super(t,e,i,ee.createElement(document)),this._headerSideChanged=!1,this._resizeListener=()=>this.handleResize(),this._maximisedListener=()=>this.handleMaximised(),this._minimisedListener=()=>this.handleMinimised(),this._headerConfig=e.header;const I=t.layoutConfig.header,b=e.content;let S;if(1!==b.length)S=void 0;else{S=b[0].header}this._initialWantMaximise=e.maximised,this._initialActiveItemIndex=null!==(n=e.activeItemIndex)&&void 0!==n?n:0;const E=null!==(r=null!==(s=null===(o=this._headerConfig)||void 0===o?void 0:o.show)&&void 0!==s?s:null==S?void 0:S.show)&&void 0!==r?r:I.show,x=null!==(h=null!==(l=null===(a=this._headerConfig)||void 0===a?void 0:a.popout)&&void 0!==l?l:null==S?void 0:S.popout)&&void 0!==h?h:I.popout,L=null!==(m=null!==(c=null===(d=this._headerConfig)||void 0===d?void 0:d.maximise)&&void 0!==c?c:null==S?void 0:S.maximise)&&void 0!==m?m:I.maximise,z=null!==(g=null!==(p=null===(u=this._headerConfig)||void 0===u?void 0:u.close)&&void 0!==p?p:null==S?void 0:S.close)&&void 0!==g?g:I.close,M=null!==(_=null!==(v=null===(f=this._headerConfig)||void 0===f?void 0:f.minimise)&&void 0!==v?v:null==S?void 0:S.minimise)&&void 0!==_?_:I.minimise,P=null!==(w=null!==(C=null===(y=this._headerConfig)||void 0===y?void 0:y.tabDropdown)&&void 0!==C?C:null==S?void 0:S.tabDropdown)&&void 0!==w?w:I.tabDropdown;this._maximisedEnabled=!1!==L;const T={show:!1!==E,side:!1===E?nt.top:E,popoutEnabled:!1!==x,popoutLabel:!1===x?"":x,maximiseEnabled:this._maximisedEnabled,maximiseLabel:!1===L?"":L,closeEnabled:!1!==z,closeLabel:!1===z?"":z,minimiseEnabled:!0,minimiseLabel:M,tabDropdownEnabled:!1!==P,tabDropdownLabel:!1===P?"":P};this._header=new te(t,this,T,e.isClosable&&!1!==z,(()=>this.getActiveComponentItem()),(()=>this.remove()),(()=>this.handlePopoutEvent()),(()=>this.toggleMaximise()),(t=>this.handleHeaderClickEvent(t)),(t=>this.handleHeaderTouchStartEvent(t)),(t=>this.handleHeaderComponentRemoveEvent(t)),(t=>this.handleHeaderComponentFocusEvent(t)),((t,e,i,n)=>this.handleHeaderComponentStartDragEvent(t,e,i,n))),this.isStack=!0,this._childElementContainer=document.createElement("section"),this._childElementContainer.classList.add("lm_items"),this.on("resize",this._resizeListener),this._maximisedEnabled&&(this.on("maximised",this._maximisedListener),this.on("minimised",this._minimisedListener)),this.element.appendChild(this._header.element),this.element.appendChild(this._childElementContainer),this.setupHeaderPosition(),this._header.updateClosability()}get childElementContainer(){return this._childElementContainer}get header(){return this._header}get headerShow(){return this._header.show}get headerSide(){return this._header.side}get headerLeftRightSided(){return this._header.leftRightSided}get contentAreaDimensions(){return this._contentAreaDimensions}get initialWantMaximise(){return this._initialWantMaximise}get isMaximised(){return this===this.layoutManager.maximisedStack}get stackParent(){if(!this.parent)throw new Error("Stack should always have a parent");return this.parent}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}init(){if(!0===this.isInitialised)return;this.updateNodeSize();for(let t=0;t0){if(this._initialActiveItemIndex<0||this._initialActiveItemIndex>=e)throw new Error(`ActiveItemIndex out of range: ${this._initialActiveItemIndex} id: ${this.id}`);for(let i=0;ithis.contentItems.length)throw e-=1,new X("SAC99728");if(t instanceof jt)return e=super.addChild(t,e),this._childElementContainer.appendChild(t.element),this._header.createTab(t,e),this.setActiveComponentItem(t,i),this._header.updateTabSizes(),this.updateSize(!1),t.container.setBaseLogicalZIndex(),this._header.updateClosability(),this.emitStateChangedEvent(),e;throw new X("SACC88532")}removeChild(t,e){const i=t,n=this.contentItems.indexOf(i),o=1===this.contentItems.length;if(this._activeComponentItem===i&&(i.focused&&i.blur(),!o)){const t=0===n?1:n-1;this.setActiveComponentItem(this.contentItems[t],!1)}this._header.removeTab(i),super.removeChild(i,e),o||this._header.updateClosability(),this.emitStateChangedEvent()}toggleMaximise(){this.isMaximised?this.minimise():this.maximise()}maximise(){if(!this.isMaximised){this.layoutManager.setMaximisedStack(this);const t=this.contentItems,e=t.length;for(let i=0;i0&&void 0===t)throw new Error("expected non-empty stack to have an active component item");return{type:"stack",content:this.calculateConfigContent(),size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,isClosable:this.isClosable,maximised:this.isMaximised,header:this.createHeaderConfig(),activeItemIndex:t}}onDrop(t,e){if("header"===this._dropSegment){if(this.resetHeaderDropZone(),void 0===this._dropIndex)throw new J("SODDI68990");return void this.addChild(t,this._dropIndex)}if("body"===this._dropSegment)return void this.addChild(t,0,!0);const i="top"===this._dropSegment||"bottom"===this._dropSegment,n="left"===this._dropSegment||"right"===this._dropSegment,o="top"===this._dropSegment||"left"===this._dropSegment,s=i&&this.stackParent.isColumn||n&&this.stackParent.isRow;if(t.isComponent){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createAndInitContentItem(e,this);i.addChild(t),t=i}if(t.type===at.row||t.type===at.column){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}if(s){const e=this.stackParent.contentItems.indexOf(this);this.stackParent.addChild(t,o?e:e+1,!0),this.size*=.5,t.size=this.size,t.sizeUnit=this.sizeUnit,this.stackParent.updateSize(!1)}else{const e=i?at.column:at.row,n=ct.createDefault(e),s=this.layoutManager.createContentItem(n,this);this.stackParent.replaceChild(this,s),s.addChild(t,o?0:void 0,!0),s.addChild(this,o?void 0:0,!0),this.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}highlightDropZone(t,e){for(const i in this._contentAreaDimensions){const n=i,o=this._contentAreaDimensions[n].hoverArea;if(o.x1t&&o.y1e)return void("header"===n?(this._dropSegment="header",this.highlightHeaderDropZone(this._header.leftRightSided?e:t)):(this.resetHeaderDropZone(),this.highlightBodyDropZone(n)))}}getArea(){if("none"===this.element.style.display)return null;const t=super.getElementArea(this._header.element),e=super.getElementArea(this._childElementContainer);if(null===t||null===e)throw new K("SGAHC13086");const i=e.x2-e.x1,n=e.y2-e.y1;return this._contentAreaDimensions={header:{hoverArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2},highlightArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2}}},0===this.contentItems.length?(this._contentAreaDimensions.body={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2}},super.getElementArea(this.element)):(this._contentAreaDimensions.left={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x1+.25*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x1+.5*i,y2:e.y2}},this._contentAreaDimensions.top={hoverArea:{x1:e.x1+.25*i,y1:e.y1,x2:e.x1+.75*i,y2:e.y1+.5*n},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y1+.5*n}},this._contentAreaDimensions.right={hoverArea:{x1:e.x1+.75*i,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1+.5*i,y1:e.y1,x2:e.x2,y2:e.y2}},this._contentAreaDimensions.bottom={hoverArea:{x1:e.x1+.25*i,y1:e.y1+.5*n,x2:e.x1+.75*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1+.5*n,x2:e.x2,y2:e.y2}},super.getElementArea(this.element))}positionHeader(t){this._header.side!==t&&(this._header.setSide(t),this._headerSideChanged=!0,this.setupHeaderPosition())}updateNodeSize(){if("none"!==this.element.style.display){const t=kt(this.element);if(this._header.show){t[this._header.leftRightSided?it.width:it.height]-=this.layoutManager.layoutConfig.dimensions.headerHeight}this._childElementContainer.style.width=zt(t.width),this._childElementContainer.style.height=zt(t.height);for(let e=0;e=o&&tthis.onDrag(t,e,i))),this._dragListener.on("dragStop",(()=>this.onDrop())),this.createDragProxyElements(t,e),null===this._componentItem.parent)throw new K("DPC10097");this._componentItemFocused=this._componentItem.focused,this._componentItemFocused&&this._componentItem.blur(),this._componentItem.parent.removeChild(this._componentItem,!0),this.setDimensions(),document.body.appendChild(this._element),this.determineMinMaxXY(),this._layoutManager.calculateItemAreas(),this.setDropPosition(t,e)}get element(){return this._element}createDragProxyElements(t,e){this._element=document.createElement("div"),this._element.classList.add("lm_dragProxy");const i=document.createElement("div");i.classList.add("lm_header");const n=document.createElement("div");n.classList.add("lm_tabs");const o=document.createElement("div");o.classList.add("lm_tab");const s=document.createElement("span");s.classList.add("lm_title"),o.appendChild(s),n.appendChild(o),i.appendChild(n),this._proxyContainerElement=document.createElement("div"),this._proxyContainerElement.classList.add("lm_content"),this._element.appendChild(i),this._element.appendChild(this._proxyContainerElement),this._originalParent instanceof ee&&this._originalParent.headerShow&&(this._sided=this._originalParent.headerLeftRightSided,this._element.classList.add("lm_"+this._originalParent.headerSide),[nt.right,nt.bottom].indexOf(this._originalParent.headerSide)>=0&&this._proxyContainerElement.insertAdjacentElement("afterend",i)),this._element.style.left=zt(t),this._element.style.top=zt(e),o.setAttribute("title",this._componentItem.title),s.insertAdjacentText("afterbegin",this._componentItem.title),this._proxyContainerElement.appendChild(this._componentItem.element)}determineMinMaxXY(){const t=this._layoutManager.groundItem;if(void 0===t)throw new J("DPDMMXY73109");{const e=t.element.getBoundingClientRect();this._minX=e.left+document.body.scrollLeft,this._minY=e.top+document.body.scrollTop,this._maxX=this._minX+e.width,this._maxY=this._minY+e.height}}onDrag(t,e,i){const n=i.pageX,o=i.pageY;this.setDropPosition(n,o),this._componentItem.drag()}setDropPosition(t,e){this._layoutManager.layoutConfig.settings.constrainDragToContainer&&(t<=this._minX?t=Math.ceil(this._minX):t>=this._maxX&&(t=Math.floor(this._maxX)),e<=this._minY?e=Math.ceil(this._minY):e>=this._maxY&&(e=Math.floor(this._maxY))),this._element.style.left=zt(t),this._element.style.top=zt(e),this._area=this._layoutManager.getArea(t,e),null!==this._area&&(this._lastValidArea=this._area,this._area.contentItem.highlightDropZone(t,e,this._area))}onDrop(){const t=this._layoutManager.dropTargetIndicator;if(null===t)throw new K("DPOD30011");let e;if(t.hide(),this._componentItem.exitDragMode(),null!==this._area)e=this._componentItem,this._area.contentItem.onDrop(e,this._area);else if(null!==this._lastValidArea){e=this._componentItem;this._lastValidArea.contentItem.onDrop(e,this._lastValidArea)}else this._originalParent?(e=this._componentItem,this._originalParent.addChild(e)):this._componentItem.destroy();this._element.remove(),this._layoutManager.emit("itemDropped",this._componentItem),this._componentItemFocused&&void 0!==e&&e.focus()}setDimensions(){const t=this._layoutManager.layoutConfig.dimensions;if(void 0===t)throw new Error("DragProxy.setDimensions: dimensions undefined");let e=t.dragProxyWidth,i=t.dragProxyHeight;if(void 0===e||void 0===i)throw new Error("DragProxy.setDimensions: width and/or height undefined");const n=!1===this._layoutManager.layoutConfig.header.show?0:t.headerHeight;this._element.style.width=zt(e),this._element.style.height=zt(i),e-=this._sided?n:0,i-=this._sided?0:n,this._proxyContainerElement.style.width=zt(e),this._proxyContainerElement.style.height=zt(i),this._componentItem.enterDragMode(e,i),this._componentItem.show()}}class ne{constructor(t,e,i,n,o,s,r){this._layoutManager=t,this._element=e,this._extraAllowableChildTargets=i,this._componentTypeOrFtn=n,this._componentState=o,this._title=s,this._id=r,this._dragListener=null,this._dummyGroundContainer=document.createElement("div");const a=gt.createDefault("row");this._dummyGroundContentItem=new Yt(this._layoutManager,a,this._dummyGroundContainer),this.createDragListener()}destroy(){this.removeDragListener()}createDragListener(){this.removeDragListener(),this._dragListener=new Zt(this._element,this._extraAllowableChildTargets),this._dragListener.on("dragStart",((t,e)=>this.onDragStart(t,e))),this._dragListener.on("dragStop",(()=>this.onDragStop()))}onDragStart(t,e){var i;const n="component";let o;if("function"==typeof this._componentTypeOrFtn){const t=this._componentTypeOrFtn();o=ne.isDragSourceComponentItemConfig(t)?{type:n,componentState:t.state,componentType:t.type,title:null!==(i=t.title)&&void 0!==i?i:this._title}:t}else o={type:n,componentState:this._componentState,componentType:this._componentTypeOrFtn,title:this._title,id:this._id};const s=bt.resolve(o,!1),r=new jt(this._layoutManager,s,this._dummyGroundContentItem);if(this._dummyGroundContentItem.contentItems.push(r),null===this._dragListener)throw new K("DSODSD66746");{const i=new ie(t,e,this._dragListener,this._layoutManager,r,this._dummyGroundContentItem),n=this._layoutManager.transitionIndicator;if(null===n)throw new K("DSODST66746");n.transitionElements(this._element,i.element)}}onDragStop(){this.createDragListener()}removeDragListener(){null!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=null)}}!function(t){t.isDragSourceComponentItemConfig=function(t){return!("componentType"in t)}}(ne||(ne={}));class oe{constructor(){this._element=document.createElement("div"),this._element.classList.add("lm_dropTargetIndicator");const t=document.createElement("div");t.classList.add("lm_inner"),this._element.appendChild(t),document.body.appendChild(this._element)}destroy(){this._element.remove()}highlightArea(t,e){this._element.style.left=zt(t.x1+e),this._element.style.top=zt(t.y1+e),this._element.style.width=zt(t.x2-t.x1-e),this._element.style.height=zt(t.y2-t.y1-e),this._element.style.display="block"}hide(){Dt(this._element,!1)}}class se{constructor(){this._element=document.createElement("div"),this._element.classList.add("lm_transition_indicator"),document.body.appendChild(this._element),this._toElement=null,this._fromDimensions=null,this._totalAnimationDuration=200,this._animationStartTime=null}destroy(){this._element.remove()}transitionElements(t,e){}nextAnimationFrame(){}measure(t){const e=t.getBoundingClientRect();return{left:e.left,top:e.top,width:t.offsetWidth,height:t.offsetHeight}}}class re extends Wt{constructor(t){super(),this._layoutManager=t,this._childEventListener=t=>this.onEventFromChild(t),globalThis.addEventListener(re.ChildEventName,this._childEventListener,{passive:!0})}emit(t,...e){"userBroadcast"===t?this.emitUserBroadcast(...e):super.emit(t,...e)}emitUserBroadcast(...t){this.handleUserBroadcastEvent("userBroadcast",t)}destroy(){globalThis.removeEventListener(re.ChildEventName,this._childEventListener)}handleUserBroadcastEvent(t,e){this._layoutManager.isSubWindow?this.propagateToParent(t,e):this.propagateToThisAndSubtree(t,e)}onEventFromChild(t){const e=t.detail;this.handleUserBroadcastEvent(e.eventName,e.args)}propagateToParent(t,e){const i={bubbles:!0,cancelable:!0,detail:{layoutManager:this._layoutManager,eventName:t,args:e}},n=new CustomEvent(re.ChildEventName,i),o=globalThis.opener;if(null===o)throw new K("EHPTP15778");o.dispatchEvent(n)}propagateToThisAndSubtree(t,e){this.emitUnknown(t,...e);for(let i=0;ithis.handleContainerResize())),this._windowBeforeUnloadListener=()=>this.onBeforeUnload(),this._windowBeforeUnloadListening=!1,this._maximisedStackBeforeDestroyedListener=t=>this.cleanupBeforeMaximisedStackDestroyed(t),this.isSubWindow=t.isSubWindow,this._constructorOrSubWindowLayoutConfig=t.constructorOrSubWindowLayoutConfig,Q.checkInitialise(),dt.checkInitialise(),void 0!==t.containerElement&&(this._containerElement=t.containerElement)}get container(){return this._containerElement}get isInitialised(){return this._isInitialised}get groundItem(){return this._groundItem}get root(){return this._groundItem}get openPopouts(){return this._openPopouts}get dropTargetIndicator(){return this._dropTargetIndicator}get transitionIndicator(){return this._transitionIndicator}get width(){return this._width}get height(){return this._height}get eventHub(){return this._eventHub}get rootItem(){if(void 0===this._groundItem)throw new Error("Cannot access rootItem before init");return 0===this._groundItem.contentItems.length?void 0:this._groundItem.contentItems[0]}get focusedComponentItem(){return this._focusedComponentItem}get tabDropPlaceholder(){return this._tabDropPlaceholder}get maximisedStack(){return this._maximisedStack}get deprecatedConstructor(){return!this.isSubWindow&&void 0!==this._constructorOrSubWindowLayoutConfig}destroy(){if(this._isInitialised){this._windowBeforeUnloadListening&&(globalThis.removeEventListener("beforeunload",this._windowBeforeUnloadListener),this._windowBeforeUnloadListening=!1),!0===this.layoutConfig.settings.closePopoutsOnUnload&&this.closeAllOpenPopouts(),this._resizeObserver.disconnect(),this.checkClearResizeTimeout(),void 0!==this._groundItem&&this._groundItem.destroy(),this._tabDropPlaceholder.remove(),null!==this._dropTargetIndicator&&this._dropTargetIndicator.destroy(),null!==this._transitionIndicator&&this._transitionIndicator.destroy(),this._eventHub.destroy();for(const t of this._dragSources)t.destroy();this._dragSources=[],this._isInitialised=!1}}minifyConfig(t){return _t.minifyConfig(t)}unminifyConfig(t){return _t.unminifyConfig(t)}init(){let t;if(this.setContainer(),this._dropTargetIndicator=new oe,this._transitionIndicator=new se,this.updateSizeFromContainer(),this.isSubWindow){if(void 0===this._constructorOrSubWindowLayoutConfig)throw new J("LMIU07155");{const e=this._constructorOrSubWindowLayoutConfig.root;if(void 0===e)throw new X("LMIC07156");if(!Ct.isComponent(e))throw new X("LMIC07157");t=e;const i=xt.resolve(this._constructorOrSubWindowLayoutConfig);this.layoutConfig=Object.assign(Object.assign({},i),{root:void 0})}}else void 0===this._constructorOrSubWindowLayoutConfig?this.layoutConfig=_t.createDefault():this.layoutConfig=xt.resolve(this._constructorOrSubWindowLayoutConfig);const e=this.layoutConfig;this._groundItem=new Yt(this,e.root,this._containerElement),this._groundItem.init(),this.checkLoadedLayoutMaximiseItem(),this._resizeObserver.observe(this._containerElement),this._isInitialised=!0,this.adjustColumnsResponsive(),this.emit("initialised"),void 0!==t&&this.loadComponentAsRoot(t)}loadLayout(t){if(!this.isInitialised)throw new Error("GoldenLayout: Need to call init() if LayoutConfig with defined root passed to constructor");if(void 0===this._groundItem)throw new J("LMLL11119");this.createSubWindows(),this.layoutConfig=xt.resolve(t),this._groundItem.loadRoot(this.layoutConfig.root),this.checkLoadedLayoutMaximiseItem(),this.adjustColumnsResponsive()}saveLayout(){if(!1===this._isInitialised)throw new Error("Can't create config, layout not yet initialised");if(void 0===this._groundItem)throw new J("LMTC18244");{const t=this._groundItem.calculateConfigContent();let e;e=1!==t.length?void 0:t[0],this.reconcilePopoutWindows();const i=[];for(let t=0;t=0?n=this._groundItem.contentItems[0]:e=0;break;case at.row:case at.column:e=n.addItem(t,i.index);break;case at.stack:if(Ct.isComponent(t)){e=n.addItem(t,i.index);break}throw Error(tt[6]);case at.component:throw new X("LMAIALC87444602");default:throw new Y("LMAIALU98881733",n.type)}if(Ct.isComponent(t)){const t=n.contentItems[e];Gt.isStack(t)&&(n=t,e=0)}return i.parentItem=n,i.index=e,i}}}loadComponentAsRoot(t){if(void 0===this._groundItem)throw new Error("Cannot add item before init");this._groundItem.loadComponentAsRoot(t)}updateSize(t,e){this.setSize(t,e)}setSize(t,e){if(this._width=t,this._height=e,!0===this._isInitialised){if(void 0===this._groundItem)throw new J("LMUS18881");if(this._groundItem.setSize(this._width,this._height),this._maximisedStack){const{width:t,height:e}=kt(this._containerElement);Tt(this._maximisedStack.element,t),At(this._maximisedStack.element,e),this._maximisedStack.updateSize(!1)}this.adjustColumnsResponsive()}}beginSizeInvalidation(){this._sizeInvalidationBeginCount++}endSizeInvalidation(){0==--this._sizeInvalidationBeginCount&&this.updateSizeFromContainer()}updateSizeFromContainer(){const{width:t,height:e}=kt(this._containerElement);this.setSize(t,e)}updateRootSize(t=!1){if(void 0===this._groundItem)throw new J("LMURS28881");this._groundItem.updateSize(t)}createAndInitContentItem(t,e){const i=this.createContentItem(t,e);return i.init(),i}createContentItem(t,e){if("string"!=typeof t.type)throw new G("Missing parameter 'type'",JSON.stringify(t));if(ct.isComponentItem(t)&&!(e instanceof ee)&&e&&!(!0===this.isSubWindow&&e instanceof Yt)){t={type:at.stack,content:[t],size:t.size,sizeUnit:t.sizeUnit,minSize:t.minSize,minSizeUnit:t.minSizeUnit,id:t.id,maximised:t.maximised,isClosable:t.isClosable,activeItemIndex:0,header:void 0}}return this.createContentItemFromConfig(t,e)}findFirstComponentItemById(t){if(void 0===this._groundItem)throw new J("LMFFCIBI82446");return this.findFirstContentItemTypeByIdRecursive(at.component,t,this._groundItem)}createPopout(t,e,i,n){return t instanceof Gt?this.createPopoutFromContentItem(t,e,i,n):this.createPopoutFromItemConfig(t,e,i,n)}createPopoutFromContentItem(t,e,i,n){let o=t.parent,s=t;for(;null!==o&&1===o.contentItems.length&&!o.isGround;)s=o,o=o.parent;if(null===o)throw new K("LMCPFCI00834");{if(void 0===n&&(n=o.contentItems.indexOf(s)),null!==i&&o.addPopInParentId(i),void 0===e){const i=globalThis.screenX||globalThis.screenLeft,n=globalThis.screenY||globalThis.screenTop,o=t.element.offsetLeft,s=t.element.offsetTop,{width:r,height:a}=kt(t.element);e={left:i+o,top:n+s,width:r,height:a}}const r=t.toConfig();if(t.remove(),ft.isRootItemConfig(r))return this.createPopoutFromItemConfig(r,e,i,n);throw new Error(`${tt[0]}`)}}beginVirtualSizedContainerAdding(){0==++this._virtualSizedContainerAddingBeginCount&&(this._virtualSizedContainers.length=0)}addVirtualSizedContainer(t){this._virtualSizedContainers.push(t)}endVirtualSizedContainerAdding(){if(0==--this._virtualSizedContainerAddingBeginCount){const t=this._virtualSizedContainers.length;if(t>0){this.fireBeforeVirtualRectingEvent(t);for(let e=0;ethis.emit("windowOpened",a))),a.on("closed",(()=>this.reconcilePopoutWindows())),this._openPopouts.push(a),this.layoutConfig.settings.closePopoutsOnUnload&&!this._windowBeforeUnloadListening&&(globalThis.addEventListener("beforeunload",this._windowBeforeUnloadListener,{passive:!0}),this._windowBeforeUnloadListening=!0),a}closeAllOpenPopouts(){for(let t=0;tglobalThis.close()),1)}getArea(t,e){let i=null,n=1/0;for(let o=0;o=s.x1&&t=s.y1&&es.surface&&(n=s.surface,i=s)}return i}calculateItemAreas(){const t=this.getAllContentItems(),e=this._groundItem;if(void 0===e)throw new J("LMCIAR44365");if(1!==t.length){e.contentItems[0].isStack?this._itemAreas=[]:this._itemAreas=e.createSideAreas();for(let e=0;e0){let e=t[0];if(Gt.isComponentItem(e)){const t=e.parent;if(null===t)throw new K("LMXLLMI69999");e=t}if(!Gt.isStack(e))throw new X("LMCLLMI19993");e.maximise()}}}processMaximiseStack(t){if(this._maximisedStack=t,t.on("beforeItemDestroyed",this._maximisedStackBeforeDestroyedListener),t.element.classList.add("lm_maximised"),t.element.insertAdjacentElement("afterend",this._maximisePlaceholder),void 0===this._groundItem)throw new J("LMMXI19993");{this._groundItem.element.prepend(t.element);const{width:e,height:i}=kt(this._containerElement);Tt(t.element,e),At(t.element,i),t.updateSize(!0),t.focusActiveContentItem(),this._maximisedStack.emit("maximised"),this.emit("stateChanged")}}processMinimiseMaximisedStack(){if(void 0===this._maximisedStack)throw new X("LMMMS74422");{const t=this._maximisedStack;if(null===t.parent)throw new K("LMMI13668");t.element.classList.remove("lm_maximised"),this._maximisePlaceholder.insertAdjacentElement("afterend",t.element),this._maximisePlaceholder.remove(),this.updateRootSize(!0),this._maximisedStack=void 0,t.off("beforeItemDestroyed",this._maximisedStackBeforeDestroyedListener),t.emit("minimised"),this.emit("stateChanged")}}reconcilePopoutWindows(){const t=[];for(let e=0;e{this._resizeTimeoutId=void 0,this.beginSizeInvalidation(),this.endSizeInvalidation()}),this.resizeDebounceInterval))}checkClearResizeTimeout(){void 0!==this._resizeTimeoutId&&(clearTimeout(this._resizeTimeoutId),this._resizeTimeoutId=void 0)}setContainer(){var t;const e=document.body,i=null!==(t=this._containerElement)&&void 0!==t?t:e;if(i===e){this.resizeWithContainerAutomatically=!0;const t=document.documentElement;t.style.height="100%",t.style.margin="0",t.style.padding="0",t.style.overflow="clip",e.style.height="100%",e.style.margin="0",e.style.padding="0",e.style.overflow="clip"}this._containerElement=i}onBeforeUnload(){this.destroy()}adjustColumnsResponsive(){if(void 0===this._groundItem)throw new J("LMACR20883");if(this._firstLoad=!1,this.useResponsiveLayout()&&!this._updatingColumnsResponsive&&this._groundItem.contentItems.length>0&&this._groundItem.contentItems[0].isRow){if(void 0===this._groundItem||null===this._width)throw new J("LMACR77412");{const t=this._groundItem.contentItems[0].contentItems.length;if(t<=1)return;{const e=this.layoutConfig.dimensions.defaultMinItemWidth;if(t*e<=this._width)return;{this._updatingColumnsResponsive=!0;const i=t-Math.max(Math.floor(this._width/e),1),n=this._groundItem.contentItems[0],o=this.getAllStacks();if(0===o.length)throw new X("LMACRS77413");{const t=o[0];for(let e=0;en?void 0:{parentItem:t,index:o}}}case 1:if(void 0===this._focusedComponentItem)return;{const t=this._focusedComponentItem.parentItem;return this.tryCreateLocationFromParentItem(t,e)}case 2:{const t=this.findFirstContentItemType(at.stack);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 3:{let t=this.findFirstContentItemType(at.row);return void 0!==t?this.tryCreateLocationFromParentItem(t,e):(t=this.findFirstContentItemType(at.column),void 0!==t?this.tryCreateLocationFromParentItem(t,e):void 0)}case 4:{const t=this.findFirstContentItemType(at.row);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 5:{const t=this.findFirstContentItemType(at.column);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 6:if(void 0===this._groundItem)throw new J("LMFLRIF18244");return void 0!==this.rootItem?void 0:void 0===e||0===e?{parentItem:this._groundItem,index:0}:void 0;case 7:if(void 0===this._groundItem)throw new J("LMFLF18244");{const t=this._groundItem.contentItems;if(0===t.length)return void 0===e||0===e?{parentItem:this._groundItem,index:0}:void 0;{const i=t[0];return this.tryCreateLocationFromParentItem(i,e)}}}}tryCreateLocationFromParentItem(t,e){const i=t.contentItems.length;return void 0===e?{parentItem:t,index:i}:e<0||e>i?void 0:{parentItem:t,index:e}}}!function(t){t.createMaximisePlaceElement=function(t){const e=t.createElement("div");return e.classList.add("lm_maximise_place"),e},t.createTabDropPlaceholderElement=function(t){const e=t.createElement("div");return e.classList.add("lm_drop_tab_placeholder"),e},t.defaultLocationSelectors=[{typeId:1,index:void 0},{typeId:2,index:void 0},{typeId:3,index:void 0},{typeId:7,index:void 0}],t.afterFocusedItemIfPossibleLocationSelectors=[{typeId:0,index:1},{typeId:2,index:void 0},{typeId:3,index:void 0},{typeId:7,index:void 0}]}(ae||(ae={}));class le extends ae{constructor(t,e,i,n){if(super(le.createLayoutManagerConstructorParameters(t,e)),this._bindComponentEventHanlderPassedInConstructor=!1,this._creationTimeoutPassed=!1,void 0!==e&&"function"==typeof e&&(this.bindComponentEvent=e,this._bindComponentEventHanlderPassedInConstructor=!0,void 0!==i&&(this.unbindComponentEvent=i)),!this._bindComponentEventHanlderPassedInConstructor&&this.isSubWindow){if(void 0===this._constructorOrSubWindowLayoutConfig)throw new J("VLC98823");{const t=xt.resolve(this._constructorOrSubWindowLayoutConfig);this.layoutConfig=Object.assign(Object.assign({},t),{root:void 0})}}!0!==n&&(this.deprecatedConstructor||this.init())}destroy(){this.bindComponentEvent=void 0,this.unbindComponentEvent=void 0,super.destroy()}init(){if(this._bindComponentEventHanlderPassedInConstructor||"loading"!==document.readyState&&null!==document.body){if(!this._bindComponentEventHanlderPassedInConstructor&&!0===this.isSubWindow&&!this._creationTimeoutPassed)return setTimeout((()=>this.init()),7),void(this._creationTimeoutPassed=!0);!0===this.isSubWindow&&(this._bindComponentEventHanlderPassedInConstructor||this.clearHtmlAndAdjustStylesForSubWindow(),window.__glInstance=this),super.init()}else document.addEventListener("DOMContentLoaded",(()=>this.init()),{passive:!0})}clearHtmlAndAdjustStylesForSubWindow(){const t=document.head,e=new Array(4);e[0]=document.querySelectorAll("body link"),e[1]=document.querySelectorAll("body style"),e[2]=document.querySelectorAll("template"),e[3]=document.querySelectorAll(".gl_keep");for(let i=0;ithis.emit("popIn"))),document.body.appendChild(t),!0}}bindComponent(t,e){if(void 0!==this.bindComponentEvent){return this.bindComponentEvent(t,e)}if(void 0!==this.getComponentEvent)return{virtual:!1,component:this.getComponentEvent(t,e)};{const t=`${tt[2]}: ${JSON.stringify(e)}`;throw new Z(t)}}unbindComponent(t,e,i){if(void 0!==this.unbindComponentEvent)this.unbindComponentEvent(t);else if(!e&&void 0!==this.releaseComponentEvent){if(void 0===i)throw new J("VCUCRCU333998");this.releaseComponentEvent(t,i)}}}!function(t){let e=!1;t.createLayoutManagerConstructorParameters=function(t,i){const n=e?null:new URL(document.location.href).searchParams.get("gl-window");e=!0;const o=null!==n;let s,r;if(null!==n){const e=localStorage.getItem(n);if(null===e)throw new Error("Null gl-window Config");localStorage.removeItem(n);const i=JSON.parse(e),o=_t.unminifyConfig(i);r=xt.fromResolved(o),t instanceof HTMLElement&&(s=t)}else void 0===t?r=void 0:t instanceof HTMLElement?(r=void 0,s=t):r=t,void 0===s&&i instanceof HTMLElement&&(s=i);return{constructorOrSubWindowLayoutConfig:r,isSubWindow:o,containerElement:s}}}(le||(le={}));class he extends le{constructor(t,e,i){super(t,e,i,!0),this._componentTypesMap=new Map,this._registeredComponentMap=new Map,this._virtuableComponentMap=new Map,this._containerVirtualRectingRequiredEventListener=(t,e,i)=>this.handleContainerVirtualRectingRequiredEvent(t,e,i),this._containerVirtualVisibilityChangeRequiredEventListener=(t,e)=>this.handleContainerVirtualVisibilityChangeRequiredEvent(t,e),this._containerVirtualZIndexChangeRequiredEventListener=(t,e,i)=>this.handleContainerVirtualZIndexChangeRequiredEvent(t,e,i),this.deprecatedConstructor||this.init()}registerComponent(t,e,i=!1){if("function"!=typeof e)throw new $("registerComponent() componentConstructorOrFactoryFtn parameter is not a function");if(e.hasOwnProperty("prototype")){const n=e;this.registerComponentConstructor(t,n,i)}else{const n=e;this.registerComponentFactoryFunction(t,n,i)}}registerComponentConstructor(t,e,i=!1){if("function"!=typeof e)throw new Error(tt[1]);if(void 0!==this._componentTypesMap.get(t))throw new Z(`${tt[3]}: ${t}`);this._componentTypesMap.set(t,{constructor:e,factoryFunction:void 0,virtual:i})}registerComponentFactoryFunction(t,e,i=!1){if("function"!=typeof e)throw new Z("Please register a constructor function");if(void 0!==this._componentTypesMap.get(t))throw new Z(`${tt[3]}: ${t}`);this._componentTypesMap.set(t,{constructor:void 0,factoryFunction:e,virtual:i})}registerComponentFunction(t){this.registerGetComponentConstructorCallback(t)}registerGetComponentConstructorCallback(t){if("function"!=typeof t)throw new Error("Please register a callback function");void 0!==this._getComponentConstructorFtn&&console.warn("Multiple component functions are being registered. Only the final registered function will be used."),this._getComponentConstructorFtn=t}getRegisteredComponentTypeNames(){const t=this._componentTypesMap.keys();return Array.from(t)}getComponentInstantiator(t){let e;const i=pt.resolveComponentTypeName(t);return void 0!==i&&(e=this._componentTypesMap.get(i)),void 0===e&&void 0!==this._getComponentConstructorFtn&&(e={constructor:this._getComponentConstructorFtn(t),factoryFunction:void 0,virtual:!1}),e}bindComponent(t,e){let i;const n=pt.resolveComponentTypeName(e);let o;if(void 0!==n&&(i=this._componentTypesMap.get(n)),void 0===i&&void 0!==this._getComponentConstructorFtn&&(i={constructor:this._getComponentConstructorFtn(e),factoryFunction:void 0,virtual:!1}),void 0!==i){const s=i.virtual;let r,a;r=void 0===e.componentState?void 0:Ut({},e.componentState);const l=i.constructor;if(void 0!==l)a=new l(t,r,s);else{const e=i.factoryFunction;if(void 0===e)throw new X("LMBCFFU10008");a=e(t,r,s)}if(s){if(void 0===a)throw new J("GLBCVCU988774");{const e=a,i=e.rootHtmlElement;if(void 0===i)throw new Z(`${tt[5]}: ${n}`);!function(t){const e="absolute";t.style.position!==e&&(t.style.position=e)}(i),this.container.appendChild(i),this._virtuableComponentMap.set(t,e),t.virtualRectingRequiredEvent=this._containerVirtualRectingRequiredEventListener,t.virtualVisibilityChangeRequiredEvent=this._containerVirtualVisibilityChangeRequiredEventListener,t.virtualZIndexChangeRequiredEvent=this._containerVirtualZIndexChangeRequiredEventListener}}this._registeredComponentMap.set(t,a),o={virtual:i.virtual,component:a}}else o=super.bindComponent(t,e);return o}unbindComponent(t,e,i){if(void 0===this._registeredComponentMap.get(t))super.unbindComponent(t,e,i);else{const e=this._virtuableComponentMap.get(t);if(void 0!==e){const i=e.rootHtmlElement;if(void 0===i)throw new X("GLUC77743",t.title);this.container.removeChild(i),this._virtuableComponentMap.delete(t)}}}fireBeforeVirtualRectingEvent(t){this._goldenLayoutBoundingClientRect=this.container.getBoundingClientRect(),super.fireBeforeVirtualRectingEvent(t)}handleContainerVirtualRectingRequiredEvent(t,e,i){const n=this._virtuableComponentMap.get(t);if(void 0===n)throw new J("GLHCSCE55933");{const o=n.rootHtmlElement;if(void 0===o)throw new Z(tt[4]+" "+t.title);{const n=t.element.getBoundingClientRect(),s=n.left-this._goldenLayoutBoundingClientRect.left;o.style.left=zt(s);const r=n.top-this._goldenLayoutBoundingClientRect.top;o.style.top=zt(r),Tt(o,e),At(o,i)}}}handleContainerVirtualVisibilityChangeRequiredEvent(t,e){const i=this._virtuableComponentMap.get(t);if(void 0===i)throw new J("GLHCVVCRE55934");{const n=i.rootHtmlElement;if(void 0===n)throw new Z(tt[4]+" "+t.title);Dt(n,e)}}handleContainerVirtualZIndexChangeRequiredEvent(t,e,i){const n=this._virtuableComponentMap.get(t);if(void 0===n)throw new J("GLHCVZICRE55935");{const e=n.rootHtmlElement;if(void 0===e)throw new Z(tt[4]+" "+t.title);e.style.zIndex=i}}}const de="initial_",ce={show:"top",popout:!1,maximise:!1,close:"close-tab-unused"},me={headerHeight:31},ue={hasHeaders:!0,reorderEnabled:!0},pe={popoutWholeStack:!1,constrainDragToContainer:!1,constrainDragToHeaders:!1,preventDragout:!1,showMaximiseIcon:!1,showPopoutIcon:!1,showCloseIcon:!1,blockedPopoutsThrowError:!0,closePopoutsOnUnload:!0,selectionEnabled:!1};var ge,fe;class ve{constructor(e){this.layout=e,ge.set(this,void 0),fe.set(this,void 0),this.handleResize=t=>{t.forEach((t=>this.resizeElement(t.target)))},this.handleMutation=()=>{this.layout.viewComponentsByContainerElement.forEach((t=>{this.resizeElement(t.container.element)}))},t.__classPrivateFieldSet(this,ge,new ResizeObserver(this.handleResize),"f"),t.__classPrivateFieldSet(this,fe,new MutationObserver(this.handleMutation),"f")}observeMutations(e){t.__classPrivateFieldGet(this,fe,"f")?.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["class"]})}destroy(){t.__classPrivateFieldGet(this,ge,"f").disconnect(),t.__classPrivateFieldGet(this,fe,"f").disconnect()}observeContainer(e){t.__classPrivateFieldGet(this,ge,"f").observe(e)}unobserveContainer(e){t.__classPrivateFieldGet(this,ge,"f").unobserve(e)}resizeElement(t){const e=this.layout.viewComponentsByContainerElement.get(t);e&&e.resize()}}ge=new WeakMap,fe=new WeakMap;var _e={};Object.defineProperty(_e,"__esModule",{value:!0});var ye=_e.BaseItem=void 0;class Ce{constructor(t,e,i){this._item=t,this._layout=e,this._wrap=i}get raw(){return this._item}get layout(){return this._layout}get type(){return this._item.type}get contentItems(){return(this._item.contentItems??[]).map((t=>this._wrap(t)))}get parent(){const t=this._item.parent;return t?this._wrap(t):null}setActiveContentItem(t,e){if("stack"!==this.type)throw new Error(`Cannot call setActiveContentItem from a non-stack item: ${this.type}`);this._item.setActiveContentItem(t.raw,e)}static wrapInternal(t,e,i){const n=Ce.wrapCache.get(e);if(n)return n;const o=new t(e,i,(e=>Ce.wrapInternal(t,e,i)));return Ce.wrapCache.set(e,o),o}}ye=_e.BaseItem=Ce,Ce.wrapCache=new WeakMap;const we=t=>!!t&&"contentItems"in t&&(t.isRow||t.isColumn);class Ie extends ye{isRoot(){return!!this._item.parent?.isGround}getBounds(){return this._item.element.getBoundingClientRect()}get viewName(){if(this._item.isComponent){const{component:t}=this._item;return t.identity.name}throw new Error("View name not found")}onDestroyed(t){const e=({target:i})=>{i===this._item&&(t(),this._item.off("itemDestroyed",e))};this._item.on("itemDestroyed",e)}createAdjacentStack({position:t="right"}={}){const e=this.raw;if(ee.isStack(e)&&e.parent){const i=["top","bottom"].includes(t)?"column":"row",n=["left","top"].includes(t)?1:0,o=we(e.parent)?e.parent:e.layoutManager,s=o,r=e.parent.contentItems.indexOf(e);e.parent.isGround&&e.parent.removeChild(e,!0);const a=o.newItem({type:i,content:[{type:"stack",content:[]}]},r);if(!a)throw new Error("createAdjacentStack: Failed to create new container");const l=a.contentItems[0];return a.addChild(this.raw,n),we(s)&&s.removeChild(e,!0),this._wrap(l)}throw new Error(`Cannot creat adjacent stacks for type: ${e.type}, must be type 'stack'`)}setActiveContentItem(t,e=!0){if(!ee.isStack(this._item))throw new Error(`Cannot call setActiveContentItem from a non-stack item: ${this.type}`);this._item.setActiveComponentItem(t.raw,!e)}static wrap(t,e){return ye.wrapInternal(Ie,t,e)}}function be(t=[],e){for(const i of t)"component"===i.type?Object.keys(e).forEach((t=>{t in i&&(i.componentState={[`${de}${t}`]:i[t],...i.componentState}),i[t]=e[t]})):be(i.content,e)}function Se(t=[],e,i){for(const n of t)if("component"===n.type)Object.keys(e).forEach((t=>{if(`${de}${t}`in n.componentState)return n[t]=n.componentState[`${de}${t}`],void delete n.componentState[`${de}${t}`];n[t]=e[t]}));else{if(n.size&&("row"===i||"column"===i)){n["row"===i?"width":"height"]=n.size?.includes(".")?parseFloat(n.size):parseInt(n.size)}Se(n.content,e,n.type)}}function Ee(t){if(t.root){t.root.content&&Se([t.root],{componentName:"view",isClosable:!0});const e=t.root;t.content=[e],delete t.root}return t}const xe=e=>class extends e{connectedCallback(){if(!this.name||!this.uuid)throw new Error(" Name or uuid attribute missing");if(!this.src)throw new Error(" missing 'src' attribute.");this.#t||(this.#t=document.createElement("iframe"),this.#t.src=this.src,this.#t.style.height="100%",this.#t.style.width="100%",this.#t.style.border="none",this.forceFrameName?this.#t.setAttribute("name",this.forceFrameName):this.#t.setAttribute("name",t.encodeOptions({brokerUrl:this.brokerUrl,name:this.name,uuid:this.uuid,providerId:this.providerId,contextGroup:this.contextGroup},"of-frame")),this.#t.setAttribute("id",this.name),this.appendChild(this.#t))}#t;get brokerUrl(){return this.getAttribute("of-broker")}set brokerUrl(t){t&&this.setAttribute("of-broker",t)}get name(){return this.getAttribute("of-name")}set name(t){t&&this.setAttribute("of-name",t)}get forceFrameName(){return this.getAttribute("forceFrameName")}set forceFrameName(t){t&&this.setAttribute("forceFrameName",t)}get uuid(){return this.getAttribute("of-uuid")}set uuid(t){t&&this.setAttribute("of-uuid",t)}get src(){return this.getAttribute("src")}set src(t){t&&this.setAttribute("src",t)}get providerId(){return this.getAttribute("of-provider-id")}set providerId(t){t&&this.setAttribute("of-provider-id",t)}get contextGroup(){return this.getAttribute("of-context-group")}set contextGroup(t){t&&this.setAttribute("of-context-group",t)}static get observedAttributes(){return["name"]}};class Le{static create(t){const e=document.createElement("of-view");return Object.entries(t).forEach((([t,i])=>{e.setAttribute(t,i)})),e}}customElements.define("of-view",xe(HTMLElement));class ze{constructor(t,i,n,{brokerUrl:o,interopConfig:s},r){this.container=t,this.config=i,this.ofView=null,this.isDragging=()=>this.container.tab.element?.className.includes("lm_dragging")??!1;const{url:a,web:l,interop:h,name:d}=i||{},c=d??`internal-generated-view-${e.v4()}`;if(this.identity={uuid:n,name:c},this.container.element.setAttribute("of-name",c),this.container.element.id=`container-${c}`,this.container.parent.id=c,void 0===a)return void this.handleUrlMissing();const m=this.updateTitleIfNotSet(a),u={"of-broker":o,"of-uuid":n,"of-name":c,src:a};l?.frameName&&(u.forceFrameName=l.frameName);const p=h?.currentContextGroup??s?.currentContextGroup;p&&(u["of-context-group"]=p),s?.providerId&&(u["of-provider-id"]=s?.providerId),this.ofView=Le.create(u),this.ofView.title=m??`Iframe: ${a}`,r.appendChild(this.ofView),this.ofView.style.position="absolute"}updateTitleIfNotSet(t){return"view"===this.container.parent.title&&this.container.parent.setTitle(t),this.container.parent.title}handleUrlMissing(){const t=document.createElement("div");t.setAttribute("style","padding: 20px");t.innerText="No URL provided",this.container.element.appendChild(t)}destroy(){this.ofView?.remove(),this.ofView=null}closeView(){this.container.close()}resize(){if(this.ofView){if(this.isDragging())return void(this.ofView.style.display="none");const t=this.container.element.getBoundingClientRect();this.ofView.style.position="absolute",this.ofView.style.height=`${t.height}px`,this.ofView.style.width=`${t.width}px`,this.ofView.style.inset=`${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`,this.ofView.style.display="block"}}}class Me extends U{static overrideConfig(t){const e={...ue,...t.settings,...pe};return e.reorderEnabled?be(t.content,{isClosable:!0}):be(t.content,{reorderEnabled:!1}),{dimensions:me,...t,settings:e,header:{...ce,show:!1!==t.settings?.hasHeaders&&ce.show}}}constructor(t,e,i,{options:n},o,s){super(),this.identity=t,this.container=e,this.initialConfig=i,this.layoutManager=o,this.platformProvider=s,this.viewComponentsByContainerElement=new Map,this.layoutContentCache=_.getSingleInstance(),this.reparentingViews=new Set,this.goldenLayoutDestroyed=!1,this.createViewComponent=(t,e)=>{m.handleSharedView(this.layoutManager,this.identity,e);const i=new ze(t,e,this.identity.uuid,this.options,this.iframeContainer);return e&&!1===e[`${de}isClosable`]&&this.stylesheet.insertRule(`#tab-${i.identity.name} .lm_close_tab { display: none; }`),this.viewComponentsByContainerElement.set(t.element,i),this.resizeController.observeContainer(t.element),i},this.iframeContainer=document.createElement("div"),this.iframeContainer.id=`openfin-layout-iframe-container-${this.identity.layoutName}`,this.domEmitter=new V(e),this.setupStylesheets(),this.layout=new he(this.container),this.layout.resizeWithContainerAutomatically=!0,this.options=n,this.layout.registerComponent("view",this.createViewComponent),this.setupListeners(),this.resizeController=new ve(this),this.layout.loadLayout(Me.overrideConfig(i));const r=document.createElement("div");r.id=`openfin-layout-shadow-container-${this.identity.layoutName}`,r.attachShadow({mode:"open",delegatesFocus:!1}).appendChild(this.iframeContainer),this.container.appendChild(r),this.resizeController.observeMutations(this.container)}getStackByView({name:t}){const e=this.layout.findFirstComponentItemById(t);if(e?.parent&&e?.parent?.isStack)return Ie.wrap(e.parent,this)}getRoot(){return Ie.wrap(this.layout.rootItem,this)}async platformCloseView(t){const e=[...this.viewComponentsByContainerElement.values()].find((e=>e.identity.name===t.name));if(!e)throw new Error(`View with name: ${t.name} not found in layout.`);e.closeView()}async platformCreateView(t,{location:e,targetView:i}={}){if(i)throw new Error("TargetView not supported in web");const n={options:this.platformProvider.normalizeOptions(t),target:this.identity,location:e};return this.insertView(n)}setupStylesheets(){if(this.container.setAttribute("data-openfin-layout-name",this.identity.layoutName),this.stylesheet=new CSSStyleSheet,this.stylesheet.insertRule(".lm_close { display: none; }"),document.adoptedStyleSheets.push(this.stylesheet),this.initialConfig.settings?.preventSplitterResize){const t=`\n [data-openfin-layout-name='${this.identity.layoutName}'] .lm_splitter {\n pointer-events: none;\n }`;this.stylesheet.insertRule(t)}}insertView({options:t,location:e,targetView:i}){const n=e?this.layoutContentCache.getItemOrUndefined(e.id):void 0,o=i?this.layoutContentCache.getItemOrUndefined(i.name):void 0,s=n??o??Ie.wrap(this.layout.rootItem,this);let r;if(ee.isStack(s.raw))r=s.raw;else{if(!we(s.raw))throw new Error("Cannot add a view at the requested location");r=s.raw.newItem({type:"stack",content:[]})}const a=Math.min(r.contentItems.length,e?.index??r.contentItems.length);let l=this.layout.findFirstComponentItemById(t.name);l?(l.parent&&l.parent.removeChild(l,!0),r.addChild(l,a)):l=r.newComponent("view",t,t.title??t.url??"Default Title",a);const h=l.component.identity;return Promise.resolve({identity:h})}replaceView({viewToReplace:t,newView:e}){throw new Error("Method not implemented.")}replaceLayout(t){throw new Error("Method not implemented.")}async cleanupView(t){}applyPreset(t){throw new Error("Method not implemented.")}getCurrentViews(){return[...this.viewComponentsByContainerElement.values()].map((t=>t.identity))}async getFrameSnapshot(){return Ee(xt.fromResolved(this.layout.toConfig()))}isVisible(){return W(this.container)}async onViewDetached({viewIdentity:t}){this.reparentingViews.add(t.name),this.platformCloseView(t)}async destroy(){this.goldenLayoutDestroyed||(this.goldenLayoutDestroyed=!0,this.layout.destroy()),this.iframeContainer.remove(),this.resizeController.destroy(),document.adoptedStyleSheets=document.adoptedStyleSheets.filter((t=>t!==this.stylesheet)),this.viewComponentsByContainerElement.clear()}setupListeners(){this.container.addEventListener("pointerdown",(t=>{if(t.target instanceof HTMLElement){const e=t.target.classList;["lm_tab","lm_title","lm_splitter","lm_drag_handle"].some((t=>e.contains(t)))&&(this.handleDragStart(),2===t.button&&t.stopPropagation())}}),!0),document.addEventListener("pointerup",(()=>this.handleDragEnd()),!0),this.layout.on("tabCreated",(t=>{const e=t.componentItem.component;t.element.id=`tab-${e.identity.name}`,this.domEmitter.dispatchLocalEvent("tab-created",e.identity)})),this.layout.on("itemCreated",(({target:t})=>{const e=t;if(Gt.isComponentItem(e)){const t=e.component;this.domEmitter.dispatchLocalEvent("container-created",t.identity)}})),this.layout.on("itemDestroyed",(t=>{const e=t.target;if(Gt.isComponentItem(e)){const t=e.component;this.removeViewComponent(t)}})),this.layout.on("itemDropped",(()=>{this.handleDragEnd()}))}handleDragStart(){this.iframeContainer.style.pointerEvents="none"}handleDragEnd(){this.iframeContainer.style.pointerEvents=""}removeViewComponent(t){if(t.config&&!1===t.config[`${de}isClosable`]){const e=[...this.stylesheet.cssRules].findIndex((e=>e.cssText.includes(`#tab-${t.identity.name}`)));this.stylesheet.deleteRule(e)}t.destroy(),this.viewComponentsByContainerElement.delete(t.container.element),this.resizeController.unobserveContainer(t.container.element),this.reparentingViews.has(t.identity.name)?this.reparentingViews.delete(t.identity.name):this.platformProvider.closeView(t.identity.name);0===this.getCurrentViews().length&&(this.goldenLayoutDestroyed||(this.goldenLayoutDestroyed=!0,m.handleLastViewRemoved(this.layoutManager,this.identity)))}}class Pe{constructor(t,e,i,n){this.windowIdentity=t,this.connectConfig=e,this.provider=i,this.fallbackContainer=n}async createLayout(t,e){if(!("container"in t)&&!this.fallbackContainer)throw new Error("Container property is not optional in web");const{layoutName:i}=t,n=t,o=this.provider.initLayoutViews(n),s=n.container??this.fallbackContainer,r={...this.windowIdentity,layoutName:i},a=new Me(r,s,o,this.connectConfig,e,this.provider);m.registerLayout(e,i,a),this.fallbackContainer=null}async getLayoutSnapshot(t){return t.getLayoutSnapshot()}async handleLastViewRemoved(t){}}class Te{static async init(e){const i=e.getFin().InterApplicationBus.Channel,n=await i.create(`custom-frame-${e.me.uuid}`);return n.setDefaultAction((async(t,{target:e,opts:i},o)=>{const s=n.connections.find((t=>t.name===e.name));if(s)return n.dispatch(s,t,{...i,target:e});throw new Error(`Client with name ${e.name} not found`)})),await t.relayChannelClientApi_1(n,"layout-relay"),new Te(e)}constructor(t){this.wire=t,this.viewNames=new Set}normalizeOptions(t,i="default"){const n=this.wire.me.uuid;let{name:o=`internal-generated-view-${e.v4()}`}=t;return o.match(/^internal-generated-view-/)&&this.viewNames.has(o)&&"duplicate"===i&&(o=`internal-generated-view-${e.v4()}`),this.viewNames.add(o),{...t,name:o,uuid:n}}closeView(t){this.viewNames.delete(t)}initLayoutViews({layout:t,multiInstanceViewBehavior:e}){return H((t=>{if("component"===t.type&&t.componentState){const i=this.normalizeOptions(t.componentState,e);return{...t,componentState:i}}return t}),t)}}var Ae;const ke=t=>t;Ae=new WeakMap,exports.WebLayoutEntryPoint=class{constructor(e){Ae.set(this,void 0),this.initLayoutManager=async(e,i,{container:n,layoutManagerOverride:o})=>{const s=await Te.init(i),r=o??ke,a=new Pe(i.me,t.__classPrivateFieldGet(this,Ae,"f"),s,n),l=new(r(m.createClosedConstructor(a)));return await M(i,l),l},this.applyLayoutSnapshot=async(e,i,n)=>{await i.applyLayoutSnapshot(t.__classPrivateFieldGet(this,Ae,"f").platform.layoutSnapshot)},this.createLayout=async(t,e)=>m.createLayout(t,e),this.destroyLayout=async(t,e)=>m.destroyLayout(t,e),t.__classPrivateFieldSet(this,Ae,e,"f")}}; @@ -7340,7 +7340,7 @@ module.exports = stubFalse; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.init = init; -const core_web_1 = __webpack_require__(/*! @openfin/core-web */ "./node_modules/@openfin/core-web/out/api-client.js"); +const core_web_1 = __webpack_require__(/*! @openfin/core-web */ "../../node_modules/@openfin/core-web/out/api-client.js"); const settings_1 = __webpack_require__(/*! ./settings */ "./client/src/platform/settings.ts"); /** * Initializes the OpenFin Web Broker connection. @@ -8405,7 +8405,7 @@ function version(uuid) { /******/ /************************************************************************/ var __webpack_exports__ = {}; -// This entry need to be wrapped in an IIFE because it need to be in strict mode. +// This entry needs to be wrapped in an IIFE because it needs to be in strict mode. (() => { "use strict"; var exports = __webpack_exports__; diff --git a/web/v19.2.0/web-layout/js/interop-view.bundle.js.map b/web/v19.2.0/web-layout/js/interop-view.bundle.js.map index e97c9eb..c60ea34 100644 --- a/web/v19.2.0/web-layout/js/interop-view.bundle.js.map +++ b/web/v19.2.0/web-layout/js/interop-view.bundle.js.map @@ -1 +1 @@ -{"version":3,"file":"interop-view.bundle.js","mappings":";;;;;;;;;;AAAa,MAAM,mBAAO,CAAC,iFAAoB,EAAE,mBAAO,CAAC,mDAAS,EAAE,mBAAO,CAAC,+DAAM,EAAE,mBAAO,CAAC,mDAAQ,EAAE,mBAAO,CAAC,gEAAkB,EAAE,mBAAO,CAAC,4DAAgB,EAAE,eAAe;;;;;;;;;;;;ACA9J,MAAM,mBAAO,CAAC,mDAAS,IAAI,mBAAO,CAAC,mDAAQ,IAAI,mBAAO,CAAC,gEAAkB,IAAI,mBAAO,CAAC,4DAAgB,IAAI,mBAAO,CAAC,+DAAM,EAAE,kBAAkB,EAAE,GAAG,wBAAwB,GAAG,sGAAsG,qBAAM,CAAC,qBAAM,iCAAiC,KAAK,KAAK,KAAK,MAAM,oBAAoB,WAAW,kBAAkB,kBAAkB,UAAU,SAAS,sCAAsC,SAAS,sFAAsF,mCAAmC,6BAA6B,GAAG,kCAAkC,6BAA6B,mDAAmD,0CAA0C,yDAAyD,iEAAiE,oFAAoF,2IAA2I,mD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mCAAmC,SAAS;AAC5C;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,cAAc,SAAS;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,2CAA2C,UAAU;AACrD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;ACrJA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEY;;AAEZ,eAAe,mBAAO,CAAC,wDAAW;AAClC,gBAAgB,mBAAO,CAAC,oDAAS;AACjC;AACA;AACA;AACA;;AAEA,cAAc;AACd,kBAAkB;AAClB,yBAAyB;;AAEzB;AACA,kBAAkB;;AAElB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,kBAAkB,YAAY;AAC9B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA,wCAAwC,SAAS;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;;AAEA;AACA;AACA,cAAc,iBAAiB;AAC/B;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,iDAAiD,EAAE;AACnD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C;AAC1C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA,yBAAyB,eAAe;AACxC;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,yBAAyB,QAAQ;AACjC;AACA,sBAAsB,eAAe;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc,YAAY;AAC1B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB,sBAAsB;AACxC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,mBAAmB;AACnB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA,oBAAoB,SAAS;AAC7B;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA,qBAAqB,WAAW,GAAG,IAAI;AACvC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA,gBAAgB,WAAW,GAAG,IAAI,KAAK,aAAa;AACpD;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;;AAEA;AACA,GAAG;AACH;AACA;AACA,mBAAmB,KAAK,mDAAmD,cAAc;AACzF,GAAG;AACH;AACA;AACA,+BAA+B,IAAI;AACnC;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,MAAM,aAAa,SAAS;AACtD;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,SAAS,gBAAgB;AACzB,cAAc,oBAAoB,EAAE,IAAI;AACxC;AACA,YAAY,gBAAgB,EAAE,IAAI;AAClC;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,GAAG,SAAS,GAAG,KAAK,qBAAqB,EAAE,EAAE;AACpE,QAAQ;AACR,yBAAyB,GAAG,KAAK,yBAAyB,EAAE,EAAE;AAC9D,mBAAmB,yBAAyB,EAAE,EAAE;AAChD;AACA,MAAM;AACN,oBAAoB,IAAI,EAAE,GAAG,SAAS,IAAI,EAAE,EAAE;AAC9C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,0CAA0C,cAAc,SAAS,OAAO;AACxE;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,kBAAkB,YAAY;AAC9B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,kBAAkB,gBAAgB;AAClC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,kBAAkB,gBAAgB;AAClC;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,cAAc,YAAY;AAC1B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,QAAQ;AAC1B;AACA,oBAAoB,QAAQ;AAC5B;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;;;;;ACzjEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEa;;AAEb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB;;AAEnB;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,sBAAsB;AACxC;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA,eAAe;AACf;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA,oBAAoB,SAAS;AAC7B;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;;AAEA,kCAAkC,QAAQ;AAC1C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oBAAoB,iBAAiB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,QAAQ;AACR;AACA,uCAAuC,QAAQ;AAC/C;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,OAAO;AACzB;AACA;AACA;;AAEA;AACA,SAAS,yBAAyB;AAClC;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,gBAAgB;AAClC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,8DAA8D,YAAY;AAC1E;AACA,8DAA8D,YAAY;AAC1E;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,qCAAqC,YAAY;AACjD;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;AACA;;;;;;;;;;;AChfA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,SAAS,WAAW;;AAEpB;AACA;AACA;AACA,SAAS,WAAW;;AAEpB;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA,SAAS,WAAW;;AAEpB;AACA;AACA,SAAS,UAAU;;AAEnB;AACA;;;;;;;;;;;ACpFA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,WAAW,mBAAO,CAAC,mDAAS;;AAE5B;AACA;;AAEA;;;;;;;;;;;ACNA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,cAAc,mBAAO,CAAC,yDAAY;AAClC,cAAc,mBAAO,CAAC,yDAAY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B;;AAE3C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,SAAS;AACpB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AChDA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACnBA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,UAAU;AACrB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACtBA,sBAAsB,mBAAO,CAAC,yEAAoB;AAClD,SAAS,mBAAO,CAAC,6CAAM;;AAEvB;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC3BA,SAAS,mBAAO,CAAC,6CAAM;;AAEvB;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpBA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,WAAW,mBAAO,CAAC,iDAAQ;;AAE3B;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AChBA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,aAAa,mBAAO,CAAC,qDAAU;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,SAAS;AACpB;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa,GAAG;AAChB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;AACA,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;;;;;;;;;;ACrKA,eAAe,mBAAO,CAAC,yDAAY;;AAEnC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;;;;;;;;;;AC7BA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,cAAc,mBAAO,CAAC,uDAAW;;AAEjC;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACnBA,aAAa,mBAAO,CAAC,uDAAW;AAChC,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,qBAAqB,mBAAO,CAAC,uEAA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AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClFA,aAAa,mBAAO,CAAC,uDAAW;AAChC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA,iBAAiB,mBAAO,CAAC,6DAAc;AACvC,eAAe,mBAAO,CAAC,2DAAa;AACpC,eAAe,mBAAO,CAAC,yDAAY;AACnC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;AACA;AACA;AACA,oCAAoC;;AAEpC;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC9CA,aAAa,mBAAO,CAAC,uDAAW;AAChC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,eAAe,mBAAO,CAAC,yDAAY;AACnC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;;;;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iBAAiB,mBAAO,CAAC,+DAAe;AACxC,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC/GA,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACzFA;AACA,wBAAw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QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC5EA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,mBAAmB,mBAAO,CAAC,mEAAiB;AAC5C,kBAAkB,mBAAO,CAAC,iEAAgB;;AAE1C;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACxBA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACdA,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACnBA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACZA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA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AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACbA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;;;;;;;;;;ACjBA,gBAAgB,mBAAO,CAAC,6DAAc;;AAEtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACdA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,GAAG;AAChB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACbA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACbA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,UAAU,mBAAO,CAAC,iDAAQ;AAC1B,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjCA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;;;;;;;;;;;ACzBA,gBAAgB,mBAAO,CAAC,6DAAc;;AAEtC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,GAAG;AAChB;AACA;AACA;AACA,oBAAoB,QAAQ,IAAI,QAAQ;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,kBAAkB;AAClB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpCA,sBAAsB,mBAAO,CAAC,yEAAoB;AAClD,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA,8BAA8B,mBAAmB;AACjD;AACA;AACA;AACA;AACA;AACA,+CAA+C,mBAAmB;AAClE;AACA;AACA;;AAEA;;;;;;;;;;;ACnCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACzBA,iBAAiB,mBAAO,CAAC,6DAAc;AACvC,eAAe,mBAAO,CAAC,yDAAY;;AAEnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AChCA,WAAW,mBAAO,CAAC,mDAAS;AAC5B,gBAAgB,mBAAO,CAAC,2DAAa;;AAErC;AACA,kBAAkB,KAA0B;;AAE5C;AACA,gCAAgC,QAAa;;AAE7C;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACrCA,kBAAkB,mBAAO,CAAC,iEAAgB;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,kBAAkB;AAClB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClCA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,eAAe,mBAAO,CAAC,yDAAY;;AAEnC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpCA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClCA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC1BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC9BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC5BA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC1BA,uBAAuB,mBAAO,CAAC,2EAAqB;AACpD,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC1BA,oBAAoB,mBAAO,CAAC,qEAAkB;AAC9C,eAAe,mBAAO,CAAC,2DAAa;AACpC,kBAAkB,mBAAO,CAAC,+DAAe;;AAEzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpCA,oBAAoB,mBAAO,CAAC,qEAAkB;AAC9C,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,kBAAkB,mBAAO,CAAC,+DAAe;;AAEzC;AACA;AACA;AACA;AAC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AY,GAAG,CAAC,MAAM,gBAAgB,CAAC,IAAI,EAAE,CAAkC,CAAC;QACtF,OAAO,YAAY,CAAC,eAAe,CAAC;IACrC,CAAC;AACF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACpEuC;AACA;AACA;AACA;AACE;AACQ;AACE;AACE;;;;;;;;;;;;;;;;ACPtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD;;AAEnD;;AAEA,oBAAoB,gBAAgB;AACpC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA,kBAAkB,cAAc;AAChC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,kBAAkB,cAAc;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,kBAAkB,aAAa;AAC/B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;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AC,OAAgB;IAC1C,MAAM,eAAe,GAAG,QAAQ,CAAC,aAAa,CAAkB,cAAc,CAAC,CAAC;IAChF,MAAM,eAAe,GAAG,QAAQ,CAAC,aAAa,CAAkB,cAAc,CAAC,CAAC;IAChF,MAAM,cAAc,GAAG,QAAQ,CAAC,aAAa,CAAiB,cAAc,CAAC,CAAC;IAE9E,IAAI,eAAe,KAAK,IAAI,IAAI,eAAe,KAAK,IAAI,IAAI,cAAc,KAAK,IAAI,EAAE,CAAC;QACrF,eAAe,CAAC,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;QAC3C,eAAe,CAAC,WAAW,GAAG,OAAO,CAAC,IAAI,IAAI,mBAAmB,CAAC;QAClE,cAAc,CAAC,WAAW,GAAG,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;IAC/D,CAAC;AACF,CAAC;AAED;;GAEG;AACH,KAAK,UAAU,aAAa;IAC3B,MAAM,gBAAgB,GAAG,QAAQ,CAAC,aAAa,CAAoB,aAAa,CAAC,CAAC;IAElF,IAAI,gBAAgB,KAAK,IAAI,EAAE,CAAC;QAC/B,gBAAgB,CAAC,gBAAgB,CAAC,OAAO,EAAE,KAAK,IAAI,EAAE;YACrD,MAAM,UAAU,EAAE,CAAC;QACpB,CAAC,CAAC,CAAC;IACJ,CAAC;IAED,MAAM,kBAAkB,EAAE,CAAC;AAC5B,CAAC","sources":["webpack://openfin-web--web-layout/./node_modules/@openfin/core-web/out/api-client.js","webpack://openfin-web--web-layout/./node_modules/@openfin/core-web/out/main-8cad4070.js","webpack://openfin-web--web-layout/./node_modules/@openfin/core-web/out/main-b14f67c9.js","webpack://openfin-web--web-layout/../../node_modules/base64-js/index.js","webpack://openfin-web--web-layout/../../node_modules/buffer/index.js","webpack://openfin-web--web-layout/../../node_modules/events/events.js","webpack://openfin-web--web-layout/../../node_modules/ieee754/index.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_DataView.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_Hash.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_ListCache.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_Map.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_MapCache.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_Promise.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_Set.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_SetCache.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_Stack.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_Symbol.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_Uint8Array.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_WeakMap.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_arrayEach.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_arrayFilter.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_arrayLikeKeys.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_arrayPush.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_arraySome.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_assignValue.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_assocIndexOf.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseAssign.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseAssignIn.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseAssignValue.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseClone.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseCreate.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseGetAllKeys.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseGetTag.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseIsArguments.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseIsEqual.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseIsEqualDeep.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseIsMap.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseIsNative.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseIsSet.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseIsTypedArray.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseKeys.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseKeysIn.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseTimes.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseUnary.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_cacheHas.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_cloneArrayBuffer.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_cloneBuffer.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_cloneDataView.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_cloneRegExp.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_cloneSymbol.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_cloneTypedArray.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_copyArray.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_copyObject.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_copySymbols.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_copySymbolsIn.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_coreJsData.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_defineProperty.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_equalArrays.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_equalByTag.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_equalObjects.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_freeGlobal.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_getAllKeys.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_getAllKeysIn.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_getMapData.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_getNative.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_getPrototype.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_getRawTag.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_getSymbols.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_getSymbolsIn.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_getTag.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_getValue.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_hashClear.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_hashDelete.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_hashGet.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_hashHas.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_hashSet.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_initCloneArray.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_initCloneByTag.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_initCloneObject.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_isIndex.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_isKeyable.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_isMasked.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_isPrototype.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_listCacheClear.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_listCacheDelete.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_listCacheGet.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_listCacheHas.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_listCacheSet.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_mapCacheClear.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_mapCacheDelete.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_mapCacheGet.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_mapCacheHas.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_mapCacheSet.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_mapToArray.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_nativeCreate.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_nativeKeys.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_nativeKeysIn.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_nodeUtil.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_objectToString.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_overArg.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_root.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_setCacheAdd.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_setCacheHas.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_setToArray.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_stackClear.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_stackDelete.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_stackGet.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_stackHas.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_stackSet.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_toSource.js","webpack://openfin-web--web-layout/../../node_modules/lodash/cloneDeep.js","webpack://openfin-web--web-layout/../../node_modules/lodash/eq.js","webpack://openfin-web--web-layout/../../node_modules/lodash/isArguments.js","webpack://openfin-web--web-layout/../../node_modules/lodash/isArray.js","webpack://openfin-web--web-layout/../../node_modules/lodash/isArrayLike.js","webpack://openfin-web--web-layout/../../node_modules/lodash/isBuffer.js","webpack://openfin-web--web-layout/../../node_modules/lodash/isEqual.js","webpack://openfin-web--web-layout/../../node_modules/lodash/isFunction.js","webpack://openfin-web--web-layout/../../node_modules/lodash/isLength.js","webpack://openfin-web--web-layout/../../node_modules/lodash/isMap.js","webpack://openfin-web--web-layout/../../node_modules/lodash/isObject.js","webpack://openfin-web--web-layout/../../node_modules/lodash/isObjectLike.js","webpack://openfin-web--web-layout/../../node_modules/lodash/isSet.js","webpack://openfin-web--web-layout/../../node_modules/lodash/isTypedArray.js","webpack://openfin-web--web-layout/../../node_modules/lodash/keys.js","webpack://openfin-web--web-layout/../../node_modules/lodash/keysIn.js","webpack://openfin-web--web-layout/../../node_modules/lodash/stubArray.js","webpack://openfin-web--web-layout/../../node_modules/lodash/stubFalse.js","webpack://openfin-web--web-layout/./client/src/platform/api.ts","webpack://openfin-web--web-layout/./client/src/platform/settings.ts","webpack://openfin-web--web-layout/../../node_modules/uuid/dist/esm-browser/index.js","webpack://openfin-web--web-layout/../../node_modules/uuid/dist/esm-browser/md5.js","webpack://openfin-web--web-layout/../../node_modules/uuid/dist/esm-browser/nil.js","webpack://openfin-web--web-layout/../../node_modules/uuid/dist/esm-browser/parse.js","webpack://openfin-web--web-layout/../../node_modules/uuid/dist/esm-browser/regex.js","webpack://openfin-web--web-layout/../../node_modules/uuid/dist/esm-browser/rng.js","webpack://openfin-web--web-layout/../../node_modules/uuid/dist/esm-browser/sha1.js","webpack://openfin-web--web-layout/../../node_modules/uuid/dist/esm-browser/stringify.js","webpack://openfin-web--web-layout/../../node_modules/uuid/dist/esm-browser/v1.js","webpack://openfin-web--web-layout/../../node_modules/uuid/dist/esm-browser/v3.js","webpack://openfin-web--web-layout/../../node_modules/uuid/dist/esm-browser/v35.js","webpack://openfin-web--web-layout/../../node_modules/uuid/dist/esm-browser/v4.js","webpack://openfin-web--web-layout/../../node_modules/uuid/dist/esm-browser/v5.js","webpack://openfin-web--web-layout/../../node_modules/uuid/dist/esm-browser/validate.js","webpack://openfin-web--web-layout/../../node_modules/uuid/dist/esm-browser/version.js","webpack://openfin-web--web-layout/webpack/bootstrap","webpack://openfin-web--web-layout/webpack/runtime/define property getters","webpack://openfin-web--web-layout/webpack/runtime/global","webpack://openfin-web--web-layout/webpack/runtime/hasOwnProperty shorthand","webpack://openfin-web--web-layout/webpack/runtime/make namespace object","webpack://openfin-web--web-layout/webpack/runtime/node module decorator","webpack://openfin-web--web-layout/./client/src/content/interop-view.ts"],"sourcesContent":["\"use strict\";var e=require(\"./main-8cad4070.js\");require(\"buffer/\"),require(\"uuid\"),require(\"events\"),require(\"lodash/cloneDeep\"),require(\"lodash/isEqual\"),exports.connect=e.connect;\n","\"use strict\";var e=require(\"buffer/\"),t=require(\"events\"),n=require(\"lodash/cloneDeep\"),i=require(\"lodash/isEqual\"),r=require(\"uuid\");const o=(e,t)=>`${t}<${btoa(JSON.stringify(e))}>`;var s=\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof window?window:\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:{},a={},c={},d={},h={};async function l(e){const t=[];for(const n of e){const e=await n();t.push(e)}return t}Object.defineProperty(h,\"__esModule\",{value:!0}),h.promiseMapSerial=h.serial=h.promiseMap=h.promisify=void 0,h.promisify=function(e){return(...t)=>new Promise(((n,i)=>{e(...t,((e,t)=>e?i(e):n(t)))}))},h.promiseMap=async function(e,t){return Promise.all(e.map(t))},h.serial=l,h.promiseMapSerial=async function(e,t){return l(e.map(((e,n,i)=>()=>t(e,n,i))))};var u,p=s&&s.__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},w=s&&s.__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)};Object.defineProperty(d,\"__esModule\",{value:!0}),d.Reply=d.EmitterBase=d.Base=void 0;const y=h;class f{constructor(e){this.isNodeEnvironment=()=>\"node\"===this.wire.environment.type,this.isOpenFinEnvironment=()=>\"openfin\"===this.wire.environment.type,this.isBrowserEnvironment=()=>\"other\"===this.wire.environment.type,this.wire=e}get fin(){return this.wire.getFin()}get me(){return this.wire.me}}d.Base=f;d.EmitterBase=class extends f{constructor(e,t,...n){super(e),this.topic=t,u.set(this,void 0),this.eventNames=()=>this.hasEmitter()?this.getOrCreateEmitter().eventNames():[],this.emit=(e,t,...n)=>!!this.hasEmitter()&&this.getOrCreateEmitter().emit(e,t,...n),this.hasEmitter=()=>this.wire.eventAggregator.has(w(this,u,\"f\")),this.getOrCreateEmitter=()=>this.wire.eventAggregator.getOrCreate(w(this,u,\"f\")),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[],this.listenerCount=e=>this.hasEmitter()?this.getOrCreateEmitter().listenerCount(e):0,this.registerEventListener=async(e,t={},n,i)=>{const r={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e},o=this.getOrCreateEmitter();n(o);try{await this.wire.sendAction(\"subscribe-to-desktop-event\",r)}catch(e){throw i(o),this.deleteEmitterIfNothingRegistered(o),e}},this.deregisterEventListener=async(e,t={})=>{if(this.hasEmitter()){const n={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e};await this.wire.sendAction(\"unsubscribe-to-desktop-event\",n).catch((()=>null));return this.getOrCreateEmitter()}return Promise.resolve()},p(this,u,[t,...n],\"f\"),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[]}async on(e,t,n){return await this.registerEventListener(e,n,(n=>{n.on(e,t)}),(n=>{n.removeListener(e,t)})),this}async addListener(e,t,n){return this.on(e,t,n)}async once(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.once(e,i),n.once(e,t)}),(n=>{n.removeListener(e,i),n.removeListener(e,t)})),this}async prependListener(e,t,n){return await this.registerEventListener(e,n,(n=>{n.prependListener(e,t)}),(n=>{n.removeListener(e,t)})),this}async prependOnceListener(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.prependOnceListener(e,t),n.once(e,i)}),(n=>{n.removeListener(e,t),n.removeListener(e,i)})),this}async removeListener(e,t,n){const i=await this.deregisterEventListener(e,n);return i&&(i.removeListener(e,t),this.deleteEmitterIfNothingRegistered(i)),this}async deregisterAllListeners(e){const t={...this.identity,type:e,topic:this.topic};if(this.hasEmitter()){const e=this.getOrCreateEmitter(),n=e.listenerCount(t.type),i=[];for(let e=0;enull)));return await Promise.all(i),e}}async removeAllListeners(e){const t=async e=>{const t=await this.deregisterAllListeners(e);t&&(t.removeAllListeners(e),this.deleteEmitterIfNothingRegistered(t))};if(e)await t(e);else if(this.hasEmitter()){const e=this.getOrCreateEmitter().eventNames();await(0,y.promiseMap)(e,t)}return this}deleteEmitterIfNothingRegistered(e){0===e.eventNames().length&&this.wire.eventAggregator.delete(w(this,u,\"f\"))}},u=new WeakMap;d.Reply=class{};var g={};Object.defineProperty(g,\"__esModule\",{value:!0});var m=g.RuntimeError=g.NotSupportedError=g.NotImplementedError=g.NoAckError=g.DuplicateCorrelationError=g.UnexpectedActionError=g.DisconnectedError=void 0;class v extends Error{constructor(e){super(`Expected websocket state OPEN but found ${e}`),this.readyState=e}}g.DisconnectedError=v;class C extends Error{}g.UnexpectedActionError=C;class b extends Error{}g.DuplicateCorrelationError=b;class I extends Error{}g.NoAckError=I;class E extends Error{}g.NotImplementedError=E;class x extends Error{}g.NotSupportedError=x;class A extends Error{constructor(e){const{message:t,name:n,stack:i,...r}=e;super(t),this.name=n||\"Error\",this.stack=i??this.toString(),Object.keys(r).forEach((e=>{this[e]=r[e]}))}}class P extends Error{static getCallSite(e=0){const t=Error.stackTraceLimit,n=e+1;Error.stackTraceLimit=t+n;const i=Error.prepareStackTrace;Error.prepareStackTrace=(e,t)=>t;const r=(new Error).stack?.slice(n)??[];return Error.prepareStackTrace=i,Error.stackTraceLimit=t,r}static prepareStackTrace(e,t){if(\"function\"==typeof Error.prepareStackTrace)return Error.prepareStackTrace(e,t);let n=\"\";n+=e.name||\"Error\",n+=`: ${e.message||\"\"}`;for(const e of t)n+=`\\n at ${e.toString()}`;return n}constructor(e,t){const{reason:n,error:i}=e;super(n),this.name=\"RuntimeError\",i?.stack&&(this.cause=new A(i)),t&&(this.stack=P.prepareStackTrace(this,t))}}m=g.RuntimeError=P;var M={},_={},O={};Object.defineProperty(O,\"__esModule\",{value:!0}),O.validateIdentity=void 0,O.validateIdentity=function(e){let t;return\"object\"==typeof e&&\"string\"==typeof e.uuid||(t=\"Not a valid identity object\"),t};var S={},R={},F={},j={},k={},L={},T={};Object.defineProperty(T,\"__esModule\",{value:!0}),T.handleDeprecatedWarnings=void 0;var $;T.handleDeprecatedWarnings=e=>{(e.contentNavigation?.whitelist||e.contentNavigation?.blacklist||e.contentRedirect?.whitelist||e.contentRedirect?.blacklist)&&console.warn(\"The properties 'whitelist' and 'blacklist' have been marked as deprecated and will be removed in a future version. Please use 'allowlist' and 'denylist'.\")};var B={},G={};Object.defineProperty(G,\"__esModule\",{value:!0}),G.AsyncRetryableLazy=W=G.Lazy=void 0;var W=G.Lazy=class{constructor(e){this.producerFn=e}getValue(){return this.value||(this.value=this.producerFn()),this.value}};G.AsyncRetryableLazy=class{constructor(e){this.producerFn=e}async getValue(){return this.promise||(this.promise=this.producerFn().catch((e=>{throw delete this.promise,e}))),this.promise}};var H={};Object.defineProperty(H,\"__esModule\",{value:!0}),H.WebContents=void 0;const N=d;class D extends N.EmitterBase{constructor(e,t,n){super(e,n,t.uuid,t.name),this.identity=t,this.entityType=n}capturePage(e){return this.wire.sendAction(\"capture-page\",{options:e,...this.identity}).then((({payload:e})=>e.data))}executeJavaScript(e){return this.wire.sendAction(\"execute-javascript-in-window\",{...this.identity,code:e}).then((({payload:e})=>e.data))}getZoomLevel(){return this.wire.sendAction(\"get-zoom-level\",this.identity).then((({payload:e})=>e.data))}setZoomLevel(e){return this.wire.sendAction(\"set-zoom-level\",{...this.identity,level:e}).then((()=>{}))}navigate(e){return this.wire.sendAction(\"navigate-window\",{...this.identity,url:e}).then((()=>{}))}navigateBack(){return this.wire.sendAction(\"navigate-window-back\",{...this.identity}).then((()=>{}))}async navigateForward(){await this.wire.sendAction(\"navigate-window-forward\",{...this.identity})}stopNavigation(){return this.wire.sendAction(\"stop-window-navigation\",{...this.identity}).then((()=>{}))}reload(e=!1){return this.wire.sendAction(\"reload-window\",{ignoreCache:e,...this.identity}).then((()=>{}))}print(e={}){return this.wire.sendAction(\"print\",{...this.identity,options:e}).then((()=>{}))}findInPage(e,t){return this.wire.sendAction(\"find-in-page\",{...this.identity,searchTerm:e,options:t}).then((({payload:e})=>e.data))}stopFindInPage(e){return this.wire.sendAction(\"stop-find-in-page\",{...this.identity,action:e}).then((()=>{}))}getPrinters(){return this.wire.sendAction(\"get-printers\",{...this.identity}).then((({payload:e})=>e.data))}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){await this.wire.sendAction(\"focus-window\",{emitSynthFocused:e,...this.identity})}async showDeveloperTools(){await this.wire.sendAction(\"show-developer-tools\",this.identity)}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction(\"get-process-info\",this.identity);return e}async getSharedWorkers(){return this.wire.sendAction(\"get-shared-workers\",this.identity).then((({payload:e})=>e.data))}async inspectSharedWorker(){await this.wire.sendAction(\"inspect-shared-worker\",{...this.identity})}async inspectSharedWorkerById(e){await this.wire.sendAction(\"inspect-shared-worker-by-id\",{...this.identity,workerId:e})}async inspectServiceWorker(){await this.wire.sendAction(\"inspect-service-worker\",{...this.identity})}async showPopupWindow(e){if(this.wire.sendAction(`${this.entityType}-show-popup-window`,this.identity).catch((()=>{})),e?.onPopupReady){const t=async({popupName:t})=>{try{const n=this.fin.Window.wrapSync({uuid:this.fin.me.uuid,name:t});await e.onPopupReady(n)}catch(e){throw new Error(`Something went wrong during onPopupReady execution: ${e}`)}};await this.once(\"popup-ready\",t)}const{payload:t}=await this.wire.sendAction(\"try-create-popup-window\",{options:{...e,hasResultCallback:!!e?.onPopupResult,hasReadyCallback:!!e?.onPopupReady},...this.identity}),{data:{willOpen:n,options:i}}=t;n&&await this.fin.Window.create(i.initialOptions);if(e?.onPopupResult){const t=async t=>{await e.onPopupResult((e=>{const{name:t,uuid:n,result:i,data:r}=e,o={identity:{name:t,uuid:n},result:i};return r&&(o.data=r),o})(t))},n=async()=>{await this.removeListener(\"popup-result\",t)};await this.on(\"popup-result\",t),await this.once(\"popup-teardown\",n)}const{payload:r}=await this.wire.sendAction(\"show-popup-window\",{options:i,...this.identity});return r.data}}var U,V,z,K,q;function J(){return V||(V=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(function(){if($)return L;$=1,Object.defineProperty(L,\"__esModule\",{value:!0}),L.ViewModule=void 0;const e=d,t=O,n=J(),i=T;class r extends e.Base{async create(e){const{uuid:t}=this.wire.me;if(!e.name||\"string\"!=typeof e.name)throw new Error(\"Please provide a name property as a string in order to create a View.\");return(0,i.handleDeprecatedWarnings)(e),this.wire.environment.childViews?await this.wire.environment.createChildContent({entityType:\"view\",options:{...e,uuid:t}}):await this.wire.sendAction(\"create-view\",{...e,uuid:t}),this.wrapSync({uuid:t,name:e.name})}async wrap(e){this.wire.sendAction(\"view-wrap\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}wrapSync(e){this.wire.sendAction(\"view-wrap-sync\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}getCurrent(){if(this.wire.sendAction(\"view-get-current\").catch((e=>{})),!this.wire.me.isView)throw new Error(\"You are not in a View context\");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction(\"view-get-current-sync\").catch((e=>{})),!this.wire.me.isView)throw new Error(\"You are not in a View context\");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return L.ViewModule=r,L}(),e),n(function(){if(U)return B;var e;U=1,Object.defineProperty(B,\"__esModule\",{value:!0}),B.View=void 0;const t=g,n=G,i=H,r=ie();class o extends i.WebContents{constructor(i,o){super(i,o,\"view\"),this.identity=o,e.set(this,new n.Lazy((()=>this.fin.Platform.wrapSync(this.identity).getClient()))),this.attach=async e=>{await this.wire.sendAction(\"attach-view\",{target:e,...this.identity})},this.destroy=async()=>{await this.wire.sendAction(\"destroy-view\",{...this.identity})},this.show=async()=>{await this.wire.sendAction(\"show-view\",{...this.identity})},this.showAt=async(e,t={})=>{await this.wire.sendAction(\"show-view-at\",{bounds:e,...this.identity,options:t})},this.bringToFront=async()=>{await this.wire.sendAction(\"bring-view-to-front\",{...this.identity})},this.hide=async()=>{await this.wire.sendAction(\"hide-view\",{...this.identity})},this.setBounds=async e=>{await this.wire.sendAction(\"set-view-bounds\",{bounds:e,...this.identity})},this.getBounds=async()=>(await this.wire.sendAction(\"get-view-bounds\",{...this.identity})).payload.data,this.getInfo=async()=>(await this.wire.sendAction(\"get-view-info\",{...this.identity})).payload.data,this.getParentLayout=async()=>(this.wire.sendAction(\"view-get-parent-layout\",{...this.identity}).catch((()=>{})),this.fin.Platform.Layout.getLayoutByViewIdentity(this.identity)),this.getOptions=async()=>this.wire.sendAction(\"get-view-options\",{...this.identity}).then((({payload:e})=>e.data)),this.updateOptions=async e=>this.wire.sendAction(\"update-view-options\",{options:e,...this.identity}).then((()=>{})),this.getCurrentWindow=async()=>{const{payload:{data:e}}=await this.wire.sendAction(\"get-view-window\",{...this.identity});return new r._Window(this.wire,e)},this.getCurrentStack=async()=>{this.wire.sendAction(\"view-get-current-stack\").catch((()=>{}));try{return(await this.getParentLayout()).getStackByViewIdentity(this.identity)}catch(e){throw new t.RuntimeError({reason:\"This view does not belong to a stack.\",error:e})}},this.triggerBeforeUnload=async()=>(await this.wire.sendAction(\"trigger-before-unload\",{...this.identity})).payload.data,this.bindToElement=async e=>{if(!e)throw new Error(\"Element not found.\");return this.wire.environment.observeBounds(e,(async e=>this.setBounds(e)))}}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){const t=await this.getCurrentWindow();await t.focusedWebViewWasChanged(),await super.focus({emitSynthFocused:e})}}return B.View=o,e=new WeakMap,B}(),e)}(k)),k}function Y(){if(z)return j;z=1,Object.defineProperty(j,\"__esModule\",{value:!0}),j.Application=void 0;const e=d,t=ie(),n=J();class i extends e.EmitterBase{constructor(e,n){super(e,\"application\",n.uuid),this.identity=n,this.window=new t._Window(this.wire,{uuid:this.identity.uuid,name:this.identity.uuid})}windowListFromIdentityList(e){const n=[];return e.forEach((e=>{n.push(new t._Window(this.wire,{uuid:e.uuid,name:e.name}))})),n}isRunning(){return this.wire.sendAction(\"is-application-running\",this.identity).then((({payload:e})=>e.data))}async quit(e=!1){try{await this._close(e),await this.wire.sendAction(\"destroy-application\",{force:e,...this.identity})}catch(e){if(![\"Remote connection has closed\",\"Could not locate the requested application\"].some((t=>e.message.includes(t))))throw e}}async _close(e=!1){try{await this.wire.sendAction(\"close-application\",{force:e,...this.identity})}catch(e){if(!e.message.includes(\"Remote connection has closed\"))throw e}}close(e=!1){return console.warn(\"Deprecation Warning: Application.close is deprecated Please use Application.quit\"),this.wire.sendAction(\"application-close\",this.identity).catch((e=>{})),this._close(e)}getChildWindows(){return this.wire.sendAction(\"get-child-windows\",this.identity).then((({payload:e})=>{const t=[];return e.data.forEach((e=>{t.push({uuid:this.identity.uuid,name:e})})),this.windowListFromIdentityList(t)}))}getManifest(){return this.wire.sendAction(\"get-application-manifest\",this.identity).then((({payload:e})=>e.data))}getParentUuid(){return this.wire.sendAction(\"get-parent-application\",this.identity).then((({payload:e})=>e.data))}getShortcuts(){return this.wire.sendAction(\"get-shortcuts\",this.identity).then((({payload:e})=>e.data))}async getViews(){const{payload:e}=await this.wire.sendAction(\"application-get-views\",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}getZoomLevel(){return this.wire.sendAction(\"get-application-zoom-level\",this.identity).then((({payload:e})=>e.data))}getWindow(){return this.wire.sendAction(\"application-get-window\",this.identity).catch((e=>{})),Promise.resolve(this.window)}registerUser(e,t){return this.wire.sendAction(\"register-user\",{userName:e,appName:t,...this.identity}).then((()=>{}))}removeTrayIcon(){return this.wire.sendAction(\"remove-tray-icon\",this.identity).then((()=>{}))}restart(){return this.wire.sendAction(\"restart-application\",this.identity).then((()=>{}))}run(){return console.warn(\"Deprecation Warning: Application.run is deprecated Please use fin.Application.start\"),this.wire.sendAction(\"application-run\",this.identity).catch((e=>{})),this._run()}_run(e={}){return this.wire.sendAction(\"run-application\",{manifestUrl:this._manifestUrl,opts:e,...this.identity}).then((()=>{}))}scheduleRestart(){return this.wire.sendAction(\"relaunch-on-close\",this.identity).then((()=>{}))}async sendApplicationLog(){const{payload:e}=await this.wire.sendAction(\"send-application-log\",this.identity);return e.data}async setJumpList(e){await this.wire.sendAction(\"set-jump-list\",{config:e,...this.identity})}setTrayIcon(e){return this.wire.sendAction(\"set-tray-icon\",{enabledIcon:e,...this.identity}).then((()=>{}))}setShortcuts(e){return this.wire.sendAction(\"set-shortcuts\",{data:e,...this.identity}).then((()=>{}))}async setShortcutQueryParams(e){await this.wire.sendAction(\"set-shortcut-query-args\",{data:e,...this.identity})}setZoomLevel(e){return this.wire.sendAction(\"set-application-zoom-level\",{level:e,...this.identity}).then((()=>{}))}async setAppLogUsername(e){await this.wire.sendAction(\"set-app-log-username\",{data:e,...this.identity})}getTrayIconInfo(){return this.wire.sendAction(\"get-tray-icon-info\",this.identity).then((({payload:e})=>e.data))}hasTrayIcon(){return this.wire.sendAction(\"has-tray-icon\",this.identity).then((({payload:e})=>e.data))}terminate(){return this.wire.sendAction(\"terminate-application\",this.identity).then((()=>{}))}wait(){return this.wire.sendAction(\"wait-for-hung-application\",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction(\"get-info\",this.identity).then((({payload:e})=>e.data))}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction(\"application-get-process-info\",this.identity);return e}async setFileDownloadLocation(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t};await this.wire.sendAction(\"set-file-download-location\",{...n,downloadLocation:e})}async getFileDownloadLocation(){const{payload:{data:e}}=await this.wire.sendAction(\"get-file-download-location\",this.identity);return e}async showTrayIconPopupMenu(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t},{payload:i}=await this.wire.sendAction(\"show-tray-icon-popup-menu\",{...n,options:e});return i.data}async closeTrayIconPopupMenu(){const{name:e}=this.wire.me,t={uuid:this.identity.uuid,name:e};await this.wire.sendAction(\"close-tray-icon-popup-menu\",{...t})}}return j.Application=i,j}function Z(){return q||(q=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(function(){if(K)return F;K=1,Object.defineProperty(F,\"__esModule\",{value:!0}),F.ApplicationModule=void 0;const e=d,t=O,n=Y();class i extends e.Base{async wrap(e){this.wire.sendAction(\"wrap-application\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}wrapSync(e){this.wire.sendAction(\"wrap-application-sync\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}async _create(e){return void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&void 0===e.isPlatformController&&(e.autoShow=!0),await this.wire.sendAction(\"create-application\",e),this.wrap({uuid:e.uuid})}create(e){return console.warn(\"Deprecation Warning: fin.Application.create is deprecated. Please use fin.Application.start\"),this.wire.sendAction(\"application-create\").catch((e=>{})),this._create(e)}async start(e){this.wire.sendAction(\"start-application\").catch((e=>{}));const t=await this._create(e);return await this.wire.sendAction(\"run-application\",{uuid:e.uuid}),t}async startManyManifests(e,t){return this.wire.sendAction(\"run-applications\",{applications:e,opts:t}).then((()=>{}))}getCurrent(){return this.wire.sendAction(\"get-current-application\").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction(\"get-current-application-sync\").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}async startFromManifest(e,t){this.wire.sendAction(\"application-start-from-manifest\").catch((e=>{}));const n=await this._createFromManifest(e);return await n._run(t),n}createFromManifest(e){return console.warn(\"Deprecation Warning: fin.Application.createFromManifest is deprecated. Please use fin.Application.startFromManifest\"),this.wire.sendAction(\"application-create-from-manifest\").catch((e=>{})),this._createFromManifest(e)}_createFromManifest(e){return this.wire.sendAction(\"get-application-manifest\",{manifestUrl:e}).then((({payload:e})=>{const t=e.data.platform?e.data.platform.uuid:e.data.startup_app.uuid;return this.wrap({uuid:t})})).then((t=>(t._manifestUrl=e,t)))}}return F.ApplicationModule=i,F}(),e),n(Y(),e)}(R)),R}H.WebContents=D;var Q={};Object.defineProperty(Q,\"__esModule\",{value:!0}),Q.promisifySubscription=void 0;var X,ee,te;function ne(){if(X)return S;X=1,Object.defineProperty(S,\"__esModule\",{value:!0}),S._Window=void 0;const e=Z(),t=H,n=J(),i=T,r=Q;class o extends t.WebContents{constructor(e,t){super(e,t,\"window\")}async createWindow(e){this.wire.sendAction(\"window-create-window\",this.identity).catch((e=>{}));const t=await(0,r.promisifySubscription)(this,\"fire-constructor-callback\");void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&(e.autoShow=!0),(0,i.handleDeprecatedWarnings)(e);const n=this.wire.environment.createChildContent({entityType:\"window\",options:e}),[o]=await Promise.all([t.getValue(),n]);let s;const{success:a}=o,c=o.data,{message:d}=c;s=a?{httpResponseCode:c.httpResponseCode,apiInjected:c.apiInjected}:{message:c.message,networkErrorCode:c.networkErrorCode,stack:c.stack};const h={message:d,cbPayload:s,success:a};try{this.getWebWindow().fin.__internal_.openerSuccessCBCalled()}catch(e){}return h.success?this:Promise.reject(h)}getAllFrames(){return this.wire.sendAction(\"get-all-frames\",this.identity).then((({payload:e})=>e.data))}getBounds(){return this.wire.sendAction(\"get-window-bounds\",this.identity).then((({payload:e})=>e.data))}center(){return this.wire.sendAction(\"center-window\",this.identity).then((()=>{}))}blur(){return this.wire.sendAction(\"blur-window\",this.identity).then((()=>{}))}bringToFront(){return this.wire.sendAction(\"bring-window-to-front\",this.identity).then((()=>{}))}animate(e,t){return this.wire.sendAction(\"animate-window\",{transitions:e,options:t,...this.identity}).then((()=>{}))}hide(){return this.wire.sendAction(\"hide-window\",this.identity).then((()=>{}))}close(e=!1){return this.wire.sendAction(\"close-window\",{force:e,...this.identity}).then((()=>{Object.setPrototypeOf(this,null)}))}focusedWebViewWasChanged(){return this.wire.sendAction(\"focused-webview-changed\",this.identity).then((()=>{}))}getNativeId(){return this.wire.sendAction(\"get-window-native-id\",this.identity).then((({payload:e})=>e.data))}async getCurrentViews(){const{payload:e}=await this.wire.sendAction(\"window-get-views\",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}disableFrame(){return console.warn(\"Function is deprecated; use disableUserMovement instead.\"),this.wire.sendAction(\"disable-window-frame\",this.identity).then((()=>{}))}disableUserMovement(){return this.wire.sendAction(\"disable-window-frame\",this.identity).then((()=>{}))}enableFrame(){return console.warn(\"Function is deprecated; use enableUserMovement instead.\"),this.wire.sendAction(\"enable-window-frame\",this.identity).then((()=>{}))}enableUserMovement(){return this.wire.sendAction(\"enable-window-frame\",this.identity).then((()=>{}))}flash(){return this.wire.sendAction(\"flash-window\",this.identity).then((()=>{}))}stopFlashing(){return this.wire.sendAction(\"stop-flash-window\",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction(\"get-window-info\",this.identity).then((({payload:e})=>e.data))}async getLayout(e){this.wire.sendAction(\"window-get-layout\",this.identity).catch((e=>{}));const t=await this.getOptions();if(!t.layout&&!t.layoutSnapshot)throw new Error(\"Window does not have a Layout\");return this.fin.Platform.Layout.wrap(e??this.identity)}getOptions(){return this.wire.sendAction(\"get-window-options\",this.identity).then((({payload:e})=>e.data))}getParentApplication(){return this.wire.sendAction(\"window-get-parent-application\",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity))}getParentWindow(){return this.wire.sendAction(\"window-get-parent-window\",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity)).then((e=>e.getWindow()))}async getSnapshot(e){const t={area:e,...this.identity};console.warn(\"Window.getSnapshot has been deprecated, please use Window.capturePage\");return(await this.wire.sendAction(\"get-window-snapshot\",t)).payload.data}getState(){return this.wire.sendAction(\"get-window-state\",this.identity).then((({payload:e})=>e.data))}getWebWindow(){return this.wire.sendAction(\"window-get-web-window\",this.identity).catch((e=>{})),this.wire.environment.getWebWindow(this.identity)}isMainWindow(){return this.wire.sendAction(\"window-is-main-window\",this.identity).catch((e=>{})),this.me.uuid===this.me.name}isShowing(){return this.wire.sendAction(\"is-window-showing\",this.identity).then((({payload:e})=>e.data))}maximize(){return this.wire.sendAction(\"maximize-window\",this.identity).then((()=>{}))}minimize(){return this.wire.sendAction(\"minimize-window\",this.identity).then((()=>{}))}moveBy(e,t,n){return this.wire.sendAction(\"move-window-by\",{deltaLeft:e,deltaTop:t,positioningOptions:n,...this.identity}).then((()=>{}))}moveTo(e,t,n){return this.wire.sendAction(\"move-window\",{left:e,top:t,positioningOptions:n,...this.identity}).then((()=>{}))}resizeBy(e,t,n,i){return this.wire.sendAction(\"resize-window-by\",{deltaWidth:Math.floor(e),deltaHeight:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}resizeTo(e,t,n,i){return this.wire.sendAction(\"resize-window\",{width:Math.floor(e),height:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}restore(){return this.wire.sendAction(\"restore-window\",this.identity).then((()=>{}))}setAsForeground(){return this.wire.sendAction(\"set-foreground-window\",this.identity).then((()=>{}))}setBounds(e,t){return this.wire.sendAction(\"set-window-bounds\",{...e,...this.identity,positioningOptions:t}).then((()=>{}))}show(e=!1){return this.wire.sendAction(\"show-window\",{force:e,...this.identity}).then((()=>{}))}showAt(e,t,n=!1){return this.wire.sendAction(\"show-at-window\",{force:n,left:Math.floor(e),top:Math.floor(t),...this.identity}).then((()=>{}))}updateOptions(e){return this.wire.sendAction(\"update-window-options\",{options:e,...this.identity}).then((()=>{}))}authenticate(e,t){return this.wire.sendAction(\"window-authenticate\",{userName:e,password:t,...this.identity}).then((()=>{}))}async showPopupMenu(e){const{payload:t}=await this.wire.sendAction(\"show-popup-menu\",{options:e,...this.identity});return t.data}async closePopupMenu(){return this.wire.sendAction(\"close-popup-menu\",{...this.identity}).then((()=>{}))}async dispatchPopupResult(e){this.wire.sendAction(\"window-dispatch-popup-result\",this.identity).catch((e=>{})),await this.wire.sendAction(\"dispatch-popup-result\",{data:e,...this.identity})}async print(e={content:\"self\"}){switch(e.content){case void 0:case\"self\":return super.print(e);case\"screenshot\":return this.wire.sendAction(\"print-screenshot\",this.identity).then((()=>{}));case\"views\":return this.wire.sendAction(\"print-views\",{...this.identity,options:e}).then((()=>{}));default:return}}}return S._Window=o,S}function ie(){return te||(te=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(function(){if(ee)return _;ee=1,Object.defineProperty(_,\"__esModule\",{value:!0}),_._WindowModule=void 0;const e=d,t=O,n=ne();class i extends e.Base{async wrap(e){this.wire.sendAction(\"window-wrap\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}wrapSync(e){this.wire.sendAction(\"window-wrap-sync\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}create(e){return this.wire.sendAction(\"create-window\").catch((e=>{})),new n._Window(this.wire,{uuid:this.me.uuid,name:e.name}).createWindow(e)}getCurrent(){if(this.wire.sendAction(\"get-current-window\").catch((e=>{})),!this.wire.me.isWindow)throw new Error(\"You are not in a Window context\");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction(\"get-current-window-sync\").catch((e=>{})),!this.wire.me.isWindow)throw new Error(\"You are not in a Window context\");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return _._WindowModule=i,_}(),e),n(ne(),e)}(M)),M}Q.promisifySubscription=async(e,t,n=(()=>!0),i)=>{let r,o,s;const a=new Promise(((e,t)=>{r=e,o=t})),c=e=>{n(e)&&(clearTimeout(s),r(e))};return await e.on(t,c),i&&(s=setTimeout((()=>o(new Error(\"event timed out\"))),i)),a.finally((()=>{e.removeListener(t,c).catch((()=>null))})),{getValue:()=>a}},Object.defineProperty(c,\"__esModule\",{value:!0}),c.System=void 0;const re=d,oe=g,se=ie(),ae=t;class ce extends re.EmitterBase{constructor(e){super(e,\"system\")}sendExternalProcessRequest(e,t){return new Promise(((n,i)=>{const r=\"external-process-exited\";let o,s,a,c;\"function\"==typeof t.listener&&(a=e=>{const n=e||{};s={topic:\"exited\",uuid:n.processUuid||\"\",exitCode:n.exitCode||0},o===e.processUuid&&(t.listener(s),c.removeListener(r,a))},this.wire.me.name||(this.wire.me.name=this.wire.me.uuid),c=new se._Window(this.wire,this.wire.me),c.on(r,a)),this.wire.sendAction(e,t).then((({payload:e})=>{o=e.data.uuid,n(e.data),s&&o===s.uuid&&(t.listener(s),c.removeListener(r,a))})).catch((e=>{c&&c.removeListener(r,a),i(e)}))}))}getVersion(){return this.wire.sendAction(\"get-version\").then((({payload:e})=>e.data))}clearCache(e){return this.wire.sendAction(\"clear-cache\",e).then((()=>{}))}deleteCacheOnExit(){return this.wire.sendAction(\"delete-cache-request\").then((()=>{}))}exit(){return this.wire.sendAction(\"exit-desktop\").then((()=>{}))}async fetchManifest(e){const{payload:{data:t}}=await this.wire.sendAction(\"fetch-manifest\",{manifestUrl:e});return t}flushCookieStore(){return this.wire.sendAction(\"flush-cookie-store\").then((()=>{}))}getAllWindows(){return this.wire.sendAction(\"get-all-windows\").then((({payload:e})=>e.data))}getAllApplications(){return this.wire.sendAction(\"get-all-applications\").then((({payload:e})=>e.data))}getCommandLineArguments(){return this.wire.sendAction(\"get-command-line-arguments\").then((({payload:e})=>e.data))}async getCrashReporterState(){const{payload:{data:{diagnosticMode:e,isRunning:t}}}=await this.wire.sendAction(\"get-crash-reporter-state\");return console.warn(\"diagnosticMode property is deprecated. It will be removed in a future version\"),{diagnosticMode:e,diagnosticsMode:e,isRunning:t}}async startCrashReporter(e){const t=e,n={...t,diagnosticMode:t.diagnosticsMode||t.diagnosticMode},{payload:{data:{diagnosticMode:i,isRunning:r}}}=await this.wire.sendAction(\"start-crash-reporter\",n);return{diagnosticMode:i,diagnosticsMode:i,isRunning:r}}getUniqueUserId(){return this.wire.sendAction(\"get-unique-user-id\").then((({payload:e})=>e.data))}getEntityInfo(e,t){return this.wire.sendAction(\"get-entity-info\",{uuid:e,name:t}).then((({payload:e})=>e.data))}getEnvironmentVariable(e){return this.wire.sendAction(\"get-environment-variable\",{environmentVariables:e}).then((({payload:e})=>e.data))}getFocusedWindow(){return this.wire.sendAction(\"get-focused-window\").then((({payload:e})=>e.data))}async isAppCertified(e){const{payload:{data:{certifiedInfo:t}}}=await this.wire.sendAction(\"is-app-certified\",{manifestUrl:e});return t}getInstalledRuntimes(){return this.wire.sendAction(\"get-installed-runtimes\").then((({payload:e})=>e.data.runtimes))}async getInstalledApps(){const{payload:{data:{installedApps:e}}}=await this.wire.sendAction(\"get-installed-apps\");return e}getLog(e){return this.wire.sendAction(\"view-log\",e).then((({payload:e})=>e.data))}getMachineId(){return this.wire.sendAction(\"get-machine-id\").then((({payload:e})=>e.data))}getMinLogLevel(){return this.wire.sendAction(\"get-min-log-level\").then((({payload:e})=>e.data))}getLogList(){return this.wire.sendAction(\"list-logs\").then((({payload:e})=>e.data))}getMonitorInfo(){return this.wire.sendAction(\"get-monitor-info\").then((({payload:e})=>e.data))}getMousePosition(){return this.wire.sendAction(\"get-mouse-position\").then((({payload:e})=>e.data))}getProcessList(){return console.warn(\"System.getProcessList has been deprecated. Please consider using our new process APIs: Window.getProcessInfo, View.getProcessInfo, Application.getProcessInfo, System.getAllProcessInfo\"),this.wire.sendAction(\"process-snapshot\").then((({payload:e})=>e.data))}async getAllProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction(\"get-all-process-info\",this.identity);return e}getProxySettings(){return this.wire.sendAction(\"get-proxy-settings\").then((({payload:e})=>e.data))}getRuntimeInfo(){return this.wire.sendAction(\"get-runtime-info\").then((({payload:e})=>e.data))}getRvmInfo(){return this.wire.sendAction(\"get-rvm-info\").then((({payload:e})=>e.data))}getHostSpecs(){return this.wire.sendAction(\"get-host-specs\").then((({payload:e})=>e.data))}getOSInfo(){return this.wire.sendAction(\"get-os-info\").then((({payload:e})=>e.data))}launchExternalProcess(e){return this.sendExternalProcessRequest(\"launch-external-process\",e)}monitorExternalProcess(e){return this.sendExternalProcessRequest(\"monitor-external-process\",e)}log(e,t){return this.wire.sendAction(\"write-to-log\",{level:e,message:t}).then((()=>{}))}openUrlWithBrowser(e){return this.wire.sendAction(\"open-url-with-browser\",{url:e}).then((()=>{}))}async registerCustomProtocol(e){if(\"object\"!=typeof e)throw new Error(\"Must provide an object with a `protocolName` property having a string value.\");await this.wire.sendAction(\"register-custom-protocol\",e)}async unregisterCustomProtocol(e){await this.wire.sendAction(\"unregister-custom-protocol\",{protocolName:e})}async getCustomProtocolState(e){return this.wire.sendAction(\"get-custom-protocol-state\",{protocolName:e}).then((({payload:e})=>e.data))}releaseExternalProcess(e){return this.wire.sendAction(\"release-external-process\",{uuid:e}).then((()=>{}))}showDeveloperTools(e){return this.wire.sendAction(\"show-developer-tools\",e).then((()=>{}))}terminateExternalProcess(e){return this.wire.sendAction(\"terminate-external-process\",e).then((()=>{}))}updateProxySettings(e){return this.wire.sendAction(\"update-proxy\",e).then((()=>{}))}async downloadAsset(e,t){const n=()=>{};let i=n,r=n;const o=new Promise(((e,t)=>{i=e,r=t}));if(\"openfin\"!==this.wire.environment.type)throw new oe.NotSupportedError(\"downloadAsset only supported in an OpenFin Render process\");const s=oe.RuntimeError.getCallSite(),a=this.wire.environment.getNextMessageId().toString(),c=`asset-download-progress-${a}`,d=`asset-download-error-${a}`,h=`asset-download-complete-${a}`,l=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},u=()=>{this.removeListener(c,l)};await Promise.all([this.on(c,l),this.once(d,(e=>{u();const{reason:t,err:n}=e;r(new oe.RuntimeError({reason:t,error:n},s))})),this.once(h,(()=>{u(),i()}))]);const p=Object.assign(e,{downloadId:a});return await this.wire.sendAction(\"download-asset\",p).catch((e=>{throw u(),e})),o}downloadRuntime(e,t){const n=oe.RuntimeError.getCallSite();return new Promise(((i,r)=>{if(\"openfin\"!==this.wire.environment.type)return void r(new oe.NotSupportedError(\"downloadRuntime only supported in an OpenFin Render process\"));const o=this.wire.environment.getNextMessageId().toString(),s=`runtime-download-progress-${o}`,a=`runtime-download-error-${o}`,c=`runtime-download-complete-${o}`,d=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},h=()=>{this.removeListener(s,d)};this.on(s,d),this.once(a,(e=>{h();const{reason:t,err:i}=e;r(new oe.RuntimeError({reason:t,error:i},n))})),this.once(c,(()=>{h(),i()}));const l=Object.assign(e,{downloadId:o});this.wire.sendAction(\"download-runtime\",l).catch((e=>{h(),r(e)}))}))}downloadPreloadScripts(e){return this.wire.sendAction(\"download-preload-scripts\",{scripts:e}).then((({payload:e})=>e.data))}getAllExternalApplications(){return this.wire.sendAction(\"get-all-external-applications\").then((({payload:e})=>e.data))}getAppAssetInfo(e){return this.wire.sendAction(\"get-app-asset-info\",e).then((({payload:e})=>e.data))}getCookies(e){const t=this.wire.environment.getUrl(),n=Object.assign(e,{url:t});return this.wire.sendAction(\"get-cookies\",n).then((({payload:e})=>e.data))}setMinLogLevel(e){return this.wire.sendAction(\"set-min-log-level\",{level:e}).then((()=>{}))}resolveUuid(e){return this.wire.sendAction(\"resolve-uuid\",{entityKey:e}).then((({payload:e})=>e.data))}executeOnRemote(e,t){return t.requestingIdentity=e,this.wire.ferryAction(t)}readRegistryValue(e,t,n){return this.wire.sendAction(\"read-registry-value\",{rootKey:e,subkey:t,value:n}).then((({payload:e})=>e.data))}registerExternalConnection(e){return this.wire.sendAction(\"register-external-connection\",{uuid:e}).then((({payload:e})=>e.data))}async getServiceConfiguration(e){if(\"string\"!=typeof e.name)throw new Error(\"Must provide an object with a `name` property having a string value\");const{name:t}=e;return this.wire.sendAction(\"get-service-configuration\",{name:t}).then((({payload:e})=>e.data))}async getSystemAppConfig(e){if(\"string\"!=typeof e)throw new Error(\"Must provide a string value for name of system app\");return this.wire.sendAction(\"get-system-app-configuration\",{name:e}).then((({payload:e})=>e.data))}async registerShutdownHandler(e){this.wire.sendAction(\"system-register-shutdown-handler\").catch((e=>{}));const{uuid:t,name:n}=this.wire.me;this.on(\"system-shutdown\",(i=>{e({proceed:()=>{this.wire.environment.raiseEvent(\"application/system-shutdown-handled\",{uuid:t,name:n,topic:\"application\"})}})}))}runRvmHealthCheck(){return this.wire.sendAction(\"run-rvm-health-check\").then((({payload:e})=>e.data))}async launchManifest(e,t={}){const{subscribe:n,...i}=t,r=i;if(n){const e=new ae.EventEmitter;n(e);const t=\"app-version-progress\",i=\"runtime-status\",o=\"app-version-complete\",s=\"app-version-error\",a=this.wire.environment.getNextMessageId().toString();r.appVersionId=a;const c=[o,t,i,s],d=e=>{const{appVersionId:t,topic:n,type:i,...r}=e;return{...r,type:c.find((e=>i.includes(e)))}},h=t=>{const n=d(t);e.emit(n.type,n)},l=()=>{this.removeListener(`${t}.${a}`,h),this.removeListener(`${i}.${a}`,h),this.removeListener(`${o}.${a}`,h),this.removeListener(`${s}.${a}`,h),this.removeListener(`${o}.${a}`,l),this.removeListener(`${s}.${a}`,l)};await Promise.all([this.on(`${t}.${a}`,h),this.on(`${i}.${a}`,h),this.once(`${o}.${a}`,h),this.once(`${s}.${a}`,h),this.once(`${o}.${a}`,l),this.once(`${s}.${a}`,l)])}return(await this.wire.sendAction(\"launch-manifest\",{manifestUrl:e,opts:r})).payload.data.manifest}async queryPermissionForCurrentContext(e){const t={uuid:this.wire.me.uuid,name:this.wire.me.name};return(await this.wire.sendAction(\"query-permission-for-current-context\",{apiName:e,identity:t})).payload.data}async enableNativeWindowIntegrationProvider(e){const{payload:t}=await this.wire.sendAction(\"enable-native-window-integration-provider\",{permissions:e});return t.data}async registerUsage({data:e,type:t}){await this.wire.sendAction(\"register-usage\",{data:e,type:t})}async getPrinters(){const{payload:e}=await this.wire.sendAction(\"system-get-printers\");return e.data}async updateProcessLoggingOptions(e){await this.wire.sendAction(\"system-update-process-logging-options\",{options:e})}async getDomainSettings(){const{payload:{data:e}}=await this.wire.sendAction(\"get-domain-settings\",this.identity);return e}async setDomainSettings(e){await this.wire.sendAction(\"set-domain-settings\",{domainSettings:e,...this.identity})}async refreshExtensions(){const{payload:e}=await this.wire.sendAction(\"refresh-extensions\");return e.data}async getInstalledExtensions(){const{payload:e}=await this.wire.sendAction(\"get-installed-extensions\");return e.data}}c.System=ce;var de={},he={};Object.defineProperty(he,\"__esModule\",{value:!0}),he.RefCounter=void 0;he.RefCounter=class{constructor(){this.topicRefMap=new Map}incRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t+1;n=i,this.topicRefMap.set(e,i)}else this.topicRefMap.set(e,1),n=1;return n}decRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t-1;this.topicRefMap.set(e,i),n=i}else n=-1;return n}actOnFirst(e,t,n){return 1===this.incRefCount(e)?t():n()}actOnLast(e,t,n){return 0===this.decRefCount(e)?t():n()}};var le={},ue={},pe={};Object.defineProperty(pe,\"__esModule\",{value:!0}),pe.ChannelBase=pe.ProtectedItems=void 0;const we=e=>async(t,n,i)=>{const r=await e(t,n,i);return void 0===r?n:r};pe.ProtectedItems=class{constructor(e,t){this.providerIdentity=e,this.close=t}};class ye{static defaultAction(e){throw new Error(`No action registered at target for ${e}`)}constructor(){this.subscriptions=new Map}async processAction(e,t,n){try{const i=this.subscriptions.has(e)?this.subscriptions.get(e):(t,n)=>(this.defaultAction??ye.defaultAction)(e,t,n),r=this.preAction?await this.preAction(e,t,n):t,o=await i(r,n);return this.postAction?await this.postAction(e,o,n):o}catch(t){if(this.errorMiddleware)return this.errorMiddleware(e,t,n);throw t}}beforeAction(e){if(this.preAction)throw new Error(\"Already registered beforeAction middleware\");this.preAction=we(e)}onError(e){if(this.errorMiddleware)throw new Error(\"Already registered error middleware\");this.errorMiddleware=e}afterAction(e){if(this.postAction)throw new Error(\"Already registered afterAction middleware\");this.postAction=we(e)}remove(e){this.subscriptions.delete(e)}setDefaultAction(e){if(this.defaultAction)throw new Error(\"default action can only be set once\");this.defaultAction=e}register(e,t){if(this.subscriptions.has(e))throw new Error(`Subscription already registered for action: ${e}. Unsubscribe before adding new subscription`);return this.subscriptions.set(e,t),!0}}pe.ChannelBase=ye;var fe,ge,me,ve=s&&s.__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)},Ce=s&&s.__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};Object.defineProperty(ue,\"__esModule\",{value:!0}),ue.ChannelClient=void 0;const be=pe,Ie=new Map;class Ee extends be.ChannelBase{static closeChannelByEndpointId(e){const t=Ie.get(e);t&&ve(t,me,\"f\").call(t)}static handleProviderDisconnect(e){for(const t of Ie.values())t.providerIdentity.channelId===e.channelId&&(t.disconnectListener(e),ve(t,me,\"f\").call(t))}constructor(e,t,n){super(),fe.set(this,void 0),ge.set(this,void 0),this.processAction=(e,t,n)=>super.processAction(e,t,n),me.set(this,(()=>{Ie.delete(this.endpointId),ve(this,ge,\"f\").close()})),Ce(this,fe,new be.ProtectedItems(e,t),\"f\"),this.disconnectListener=()=>{},this.endpointId=e.endpointId,Ce(this,ge,n,\"f\"),Ie.set(this.endpointId,this),n.receive(this.processAction)}get providerIdentity(){return ve(this,fe,\"f\").providerIdentity}async dispatch(e,t){if(ve(this,ge,\"f\").isEndpointConnected(this.providerIdentity.channelId))return ve(this,ge,\"f\").send(this.providerIdentity.channelId,e,t);throw new Error(\"The client you are trying to dispatch from is disconnected from the target provider.\")}onDisconnection(e){this.disconnectListener=t=>{try{e(t)}catch(e){throw new Error(`Error while calling the onDisconnection callback: ${e.message}`)}finally{this.disconnectListener=()=>{}}}}async disconnect(){await this.sendDisconnectAction(),ve(this,me,\"f\").call(this)}async sendDisconnectAction(){const e=ve(this,fe,\"f\");await e.close()}static async wireClose(e,t,n){const{channelName:i,uuid:r,name:o}=t;await e.sendAction(\"disconnect-from-channel\",{channelName:i,uuid:r,name:o,endpointId:n})}}ue.ChannelClient=Ee,fe=new WeakMap,ge=new WeakMap,me=new WeakMap;var xe={},Ae={};Object.defineProperty(Ae,\"__esModule\",{value:!0}),Ae.exhaustiveCheck=void 0,Ae.exhaustiveCheck=function(e,t){throw new Error(`Unsupported value: ${e}${t?`\\n Supported values are: ${t.join(\"\")}`:\"\"}`)};var Pe,Me,_e,Oe={},Se=s&&s.__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},Re=s&&s.__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)};Object.defineProperty(Oe,\"__esModule\",{value:!0}),Oe.ClassicInfo=Oe.ClassicStrategy=void 0;Oe.ClassicStrategy=class{constructor(e,t,n,i){this.messageReceiver=t,this.endpointId=n,this.providerIdentity=i,Pe.set(this,void 0),Me.set(this,new Map),_e.set(this,new Map),this.send=async(e,t,n)=>{const i=Re(this,Me,\"f\").get(e);if(!i)throw new Error(`Could not locate routing info for endpoint ${e}`);const r={...i};r.isLocalEndpointId&&delete r.endpointId,delete r.isLocalEndpointId;const o=Re(this,Pe,\"f\").sendAction(\"send-channel-message\",{...r,providerIdentity:this.providerIdentity,action:t,payload:n});Re(this,_e,\"f\").get(e)?.add(o);return(await o.catch((e=>{throw new Error(e.message)})).finally((()=>{Re(this,_e,\"f\").get(e)?.delete(o)}))).payload.data.result},this.close=async()=>{this.messageReceiver.removeEndpoint(this.providerIdentity.channelId,this.endpointId),[...Re(this,Me,\"f\").keys()].forEach((e=>this.closeEndpoint(e))),Se(this,Me,new Map,\"f\")},Se(this,Pe,e,\"f\")}onEndpointDisconnect(e,t){}receive(e){this.messageReceiver.addEndpoint(e,this.providerIdentity.channelId,this.endpointId)}async closeEndpoint(e){const t=Re(this,Me,\"f\").get(e);Re(this,Me,\"f\").delete(e);const n=Re(this,_e,\"f\").get(e);n?.forEach((n=>{const i=`Channel connection with identity uuid: ${t?.uuid} / name: ${t?.name} / endpointId: ${e} no longer connected.`;n.cancel(new Error(i))}))}isEndpointConnected(e){return Re(this,Me,\"f\").has(e)}addEndpoint(e,t){Re(this,Me,\"f\").set(e,t.endpointIdentity),Re(this,_e,\"f\").set(e,new Set)}isValidEndpointPayload(e){return\"string\"==typeof e?.endpointIdentity?.endpointId||\"string\"==typeof e?.endpointIdentity?.channelId}},Pe=new WeakMap,Me=new WeakMap,_e=new WeakMap,Oe.ClassicInfo={version:5,minimumVersion:0,type:\"classic\"};var Fe={},je={},ke={};Object.defineProperty(ke,\"__esModule\",{value:!0}),ke.errorToPOJO=void 0,ke.errorToPOJO=function(e){return{stack:e.stack,name:e.name,message:e.message,toString:()=>e.stack||e.toString()}};var Le,Te,$e=s&&s.__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)},Be=s&&s.__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};Object.defineProperty(je,\"__esModule\",{value:!0}),je.RTCEndpoint=void 0;const Ge=ke;je.RTCEndpoint=class{static isValidEndpointPayload(e){const t=e=>\"object\"==typeof e&&null!==e;return t(e)&&t(e.endpointIdentity)&&t(e.rtc)&&\"string\"==typeof e.endpointIdentity.endpointId}constructor({rtc:e,endpointIdentity:t}){this.responseMap=new Map,Le.set(this,null),Te.set(this,void 0),this.connectionStateChangeHandler=e=>{\"connected\"!==this.rtc.rtcClient.connectionState&&(this.rtc.rtcClient.removeEventListener(\"connectionstatechange\",this.connectionStateChangeHandler),this.close(),$e(this,Te,\"f\")&&$e(this,Te,\"f\").call(this))},this.send=async(e,t)=>{const n=`message-${Math.random()}`,i=new Promise(((e,t)=>{this.responseMap.set(n,{resolve:e,reject:t})}));return this.rtc.channels.request.send(JSON.stringify({action:e,payload:t,messageId:n})),i},this.close=()=>{this.responseMap.forEach((e=>e.reject(\"Connection has closed.\"))),this.responseMap=new Map,this.rtc.channels.request.close(),this.rtc.channels.response.close(),this.rtc.rtcClient.close()},this.rtc=e,this.endpointIdentity=t,this.rtc.channels.response.addEventListener(\"message\",(e=>{let{data:t}=e;e.data instanceof ArrayBuffer&&(t=(new TextDecoder).decode(e.data));const{messageId:n,payload:i,success:r,error:o}=JSON.parse(t),{resolve:s,reject:a}=this.responseMap.get(n)??{};s&&a?(this.responseMap.delete(n),r?s(i):a(o)):(console.log(\"Could not find id in responseMap.\"),console.log(e))})),this.rtc.channels.request.addEventListener(\"message\",(async e=>{let{data:n}=e;e.data instanceof ArrayBuffer&&(n=(new TextDecoder).decode(e.data));const{messageId:i,action:r,payload:o}=JSON.parse(n);if($e(this,Le,\"f\"))try{const e=await $e(this,Le,\"f\").call(this,r,o,t);this.rtc.channels.response.send(JSON.stringify({messageId:i,payload:e,success:!0}))}catch(e){\"open\"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,error:(0,Ge.errorToPOJO)(e),success:!1}))}else\"open\"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,success:!1,error:\"Connection not ready.\"}))})),this.rtc.rtcClient.addEventListener(\"connectionstatechange\",this.connectionStateChangeHandler),Object.values(this.rtc.channels).forEach((e=>{e.onclose=e=>{[...this.responseMap.values()].forEach((e=>e.reject(new Error(\"RTCDataChannel closed unexpectedly, this is most commonly caused by message size. Note: RTC Channels have a message size limit of ~255kB.\")))),this.close(),$e(this,Te,\"f\")&&$e(this,Te,\"f\").call(this)}}))}onDisconnect(e){if($e(this,Te,\"f\"))throw new Error(\"RTCEndpoint disconnectListener cannot be set twice.\");Be(this,Te,e,\"f\")}receive(e){if($e(this,Le,\"f\"))throw new Error(\"You have already set a listener for this RTC Endpoint.\");Be(this,Le,e,\"f\")}get connected(){return\"connected\"===this.rtc.rtcClient.connectionState}},Le=new WeakMap,Te=new WeakMap;var We,He,Ne,De={},Ue=s&&s.__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)},Ve=s&&s.__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};Object.defineProperty(De,\"__esModule\",{value:!0}),De.EndpointStrategy=void 0;De.EndpointStrategy=class{constructor(e,t,n){this.EndpointType=e,this.StrategyName=n,We.set(this,null),He.set(this,new Map),Ne.set(this,!0),this.send=async(e,t,n)=>this.getEndpointById(e).send(t,n),this.close=async()=>{Ue(this,Ne,\"f\")&&(Ue(this,He,\"f\").forEach((e=>e.close())),Ve(this,He,new Map,\"f\")),Ve(this,Ne,!1,\"f\")},this.isValidEndpointPayload=t}onEndpointDisconnect(e,t){this.getEndpointById(e).onDisconnect(t)}receive(e){if(Ue(this,We,\"f\"))throw new Error(`You have already set a listener for this ${this.StrategyName} Strategy`);Ve(this,We,e,\"f\"),Ue(this,He,\"f\").forEach((e=>e.receive(Ue(this,We,\"f\"))))}getEndpointById(e){const t=Ue(this,He,\"f\").get(e);if(!t)throw new Error(`Client with endpoint id ${e} is not connected`);return t}get connected(){return Ue(this,Ne,\"f\")}isEndpointConnected(e){return Ue(this,He,\"f\").has(e)}addEndpoint(e,t){if(!Ue(this,Ne,\"f\"))return void console.warn(`Adding endpoint to disconnected ${this.StrategyName} Strategy`);const n=new this.EndpointType(t);Ue(this,We,\"f\")&&n.receive(Ue(this,We,\"f\")),Ue(this,He,\"f\").set(e,n)}async closeEndpoint(e){Ue(this,He,\"f\").delete(e)}},We=new WeakMap,He=new WeakMap,Ne=new WeakMap,Object.defineProperty(Fe,\"__esModule\",{value:!0}),Fe.RTCInfo=Fe.RTCStrategy=void 0;const ze=je,Ke=De;class qe extends Ke.EndpointStrategy{constructor(){super(ze.RTCEndpoint,ze.RTCEndpoint.isValidEndpointPayload,\"RTC\")}}Fe.RTCStrategy=qe,Fe.RTCInfo={version:2,minimumVersion:0,type:\"rtc\"};var Je={};Object.defineProperty(Je,\"__esModule\",{value:!0}),Je.RTCICEManager=void 0;const Ye=d;class Ze extends Ye.EmitterBase{constructor(e){super(e,\"channel\"),this.ensureChannelOpened=e=>new Promise(((t,n)=>{if(\"open\"===e.readyState)t();else if(\"connecting\"===e.readyState){const n=()=>{e.removeEventListener(\"open\",n),t()};e.addEventListener(\"open\",n)}else n(new Error(\"This Channel has already closed\"))}))}static createDataChannelPromise(e,t){let n;const i=new Promise((e=>{n=e})),r=i=>{const o=()=>{i.channel.removeEventListener(\"open\",o),n(i.channel)};i.channel.label===e&&(i.channel.addEventListener(\"open\",o),t.removeEventListener(\"datachannel\",r))};return t.addEventListener(\"datachannel\",r),i}async listenForProviderIce(e,t){await this.on(this.createProviderEventName(e),t,{timestamp:Date.now()})}async raiseProviderIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createProviderEventName(e)),t)}async listenForClientIce(e,t){await this.on(this.createClientEventName(e),t,{timestamp:Date.now()})}async raiseClientIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createClientEventName(e)),t)}cleanupIceListeners(e){this.removeAllListeners(this.createClientEventName(e)),this.removeAllListeners(this.createProviderEventName(e))}createClientEventName(e){return`ice-client-${e}`}createProviderEventName(e){return`ice-provider-${e}`}createRouteString(e){return`channel/${e}`}createRtcPeer(){return this.wire.environment.getRtcPeer()}async startClientOffer(){const e=Math.random().toString(),t=this.createRtcPeer();t.addEventListener(\"icecandidate\",(async t=>{t.candidate&&await this.raiseClientIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForProviderIce(e,(async e=>{await t.addIceCandidate(e.candidate)}));const n={request:t.createDataChannel(\"request\"),response:t.createDataChannel(\"response\")},i=await t.createOffer();await t.setLocalDescription(i);const r=Promise.all([n.request,n.response].map(this.ensureChannelOpened)).then((()=>{}));return{rtcClient:t,channels:n,offer:i,rtcConnectionId:e,channelsOpened:r}}async finishClientOffer(e,t,n){return await e.setRemoteDescription(t),await n,!0}async createProviderAnswer(e,t){const n=this.createRtcPeer(),i=Ze.createDataChannelPromise(\"request\",n),r=Ze.createDataChannelPromise(\"response\",n);n.addEventListener(\"icecandidate\",(async t=>{t.candidate&&await this.raiseProviderIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForClientIce(e,(async e=>{await n.addIceCandidate(e.candidate)})),await n.setRemoteDescription(t);const o=await n.createAnswer();await n.setLocalDescription(o);const s=Promise.all([i,r]).then((([t,n])=>(this.cleanupIceListeners(e),{request:t,response:n})));return{rtcClient:n,answer:o,channels:s}}}Je.RTCICEManager=Ze;var Qe={},Xe={};function et(e){return[...e.split(\".\").reverse().entries()].reduce(((e,[t,n])=>e+ +n*1e4**t),0)}function tt(e,t){return et(e)>=et(t)}function nt(e){return e.split(\"/\")[0]}Object.defineProperty(Xe,\"__esModule\",{value:!0}),Xe.runtimeUuidMeetsMinimumRuntimeVersion=Xe.parseRuntimeUuid=Xe.meetsMinimumRuntimeVersion=void 0,Xe.meetsMinimumRuntimeVersion=tt,Xe.parseRuntimeUuid=nt,Xe.runtimeUuidMeetsMinimumRuntimeVersion=function(e,t){return tt(nt(e),t)};var it,rt,ot,st,at,ct=s&&s.__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)},dt=s&&s.__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};Object.defineProperty(Qe,\"__esModule\",{value:!0}),Qe.ChannelProvider=void 0;const ht=pe,lt=Xe;class ut extends ht.ChannelBase{get connections(){return[...ct(this,it,\"f\")]}static handleClientDisconnection(e,t){const n=e.connections.find((e=>e.endpointId===t.endpointId));if(n)ct(e,st,\"f\").call(e,n);else{e.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name)).forEach(ct(e,st,\"f\"))}e.disconnectListener(t)}static setProviderRemoval(e,t){ut.removalMap.set(e,t)}constructor(e,t,n){super(),it.set(this,void 0),rt.set(this,void 0),ot.set(this,void 0),st.set(this,(e=>{const t=this.connections.filter((t=>t.endpointId!==e.endpointId));ct(this,ot,\"f\").closeEndpoint(e.endpointId),dt(this,it,t,\"f\")})),this.processAction=async(e,t,n)=>(ut.clientIsMultiRuntime(n)&&!(0,lt.runtimeUuidMeetsMinimumRuntimeVersion)(n.runtimeUuid,\"18.87.56.0\")?this.handleMultiRuntimeLegacyClient(n):this.checkForClientConnection(n),super.processAction(e,t,n)),at.set(this,(()=>{ct(this,ot,\"f\").close();const e=ut.removalMap.get(this);e&&e()})),dt(this,rt,new ht.ProtectedItems(e,t),\"f\"),this.connectListener=()=>{},this.disconnectListener=()=>{},dt(this,it,[],\"f\"),dt(this,ot,n,\"f\"),n.receive(this.processAction)}dispatch(e,t,n){const i=e.endpointId??this.getEndpointIdForOpenFinId(e,t);return i&&ct(this,ot,\"f\").isEndpointConnected(i)?ct(this,ot,\"f\").send(i,t,n):Promise.reject(new Error(`Client connection with identity uuid: ${e.uuid} / name: ${e.name} / endpointId: ${i} no longer connected.`))}async processConnection(e,t){return ct(this,it,\"f\").push(e),this.connectListener(e,t)}publish(e,t){return this.connections.map((n=>ct(this,ot,\"f\").send(n.endpointId,e,t)))}onConnection(e){this.connectListener=e}onDisconnection(e){this.disconnectListener=e}async destroy(){const e=ct(this,rt,\"f\");e.providerIdentity,dt(this,it,[],\"f\"),await e.close(),ct(this,at,\"f\").call(this)}async getAllClientInfo(){return this.connections.map((e=>{const{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}=e;return{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}}))}checkForClientConnection(e){if(!this.isClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider.\\n Client Identity: {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}isClientConnected(e){return ut.clientIdentityIncludesEndpointId(e)?this.connections.some((t=>t.endpointId===e.endpointId&&t.uuid===e.uuid&&t.name===e.name)):this.isLegacyClientConnected(e)}isLegacyClientConnected(e){return this.connections.some((t=>t.uuid===e.uuid&&t.name===e.name))}handleMultiRuntimeLegacyClient(e){if(!this.isLegacyClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider. Client Identity:\\n {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}getEndpointIdForOpenFinId(e,t){const n=this.connections.filter((t=>t.name===e.name&&t.uuid===e.uuid));if(n.length>=2){const n=ct(this,rt,\"f\"),{uuid:i,name:r}=e,o=n?.providerIdentity.uuid,s=n?.providerIdentity.name;console.warn(`WARNING: Dispatch call may have unintended results. The \"to\" argument of your dispatch call is missing the\\n \"endpointId\" parameter. The identity you are dispatching to ({uuid: ${i}, name: ${r}})\\n has multiple channelClients for this channel. Your dispatched action: (${t}) from the provider:\\n ({uuid: ${o}, name: ${s}}) will only be processed by the most recently-created client.`)}return n.pop()?.endpointId}static clientIdentityIncludesEndpointId(e){return void 0!==e.endpointId}static clientIsMultiRuntime(e){return void 0!==e.runtimeUuid}static async wireClose(e,t){await e.sendAction(\"destroy-channel\",{channelName:t})}}Qe.ChannelProvider=ut,it=new WeakMap,rt=new WeakMap,ot=new WeakMap,st=new WeakMap,at=new WeakMap,ut.removalMap=new WeakMap;var pt={};Object.defineProperty(pt,\"__esModule\",{value:!0}),pt.MessageReceiver=void 0;const wt=ue,yt=d;class ft extends yt.Base{constructor(e){super(e),this.onmessage=e=>\"process-channel-message\"===e.action&&(this.processChannelMessage(e),!0),this.endpointMap=new Map,this.latestEndpointIdByChannelId=new Map,e.registerMessageHandler(this.onmessage.bind(this))}async processChannelMessage(e){const{senderIdentity:t,providerIdentity:n,action:i,ackToSender:r,payload:o,intendedTargetIdentity:s}=e.payload,a=s.channelId??s.endpointId??this.latestEndpointIdByChannelId.get(n.channelId),c=this.endpointMap.get(a);if(!c)return r.payload.success=!1,r.payload.reason=`Client connection with identity uuid: ${this.wire.me.uuid} / name: ${this.wire.me.name} / endpointId: ${a} no longer connected.`,this.wire.sendRaw(r);try{const e=await c(i,o,t);return r.payload.payload=r.payload.payload||{},r.payload.payload.result=e,this.wire.sendRaw(r)}catch(e){return r.payload.success=!1,r.payload.reason=e.message,this.wire.sendRaw(r)}}addEndpoint(e,t,n){this.endpointMap.set(n,e),t!==n&&this.latestEndpointIdByChannelId.set(t,n)}removeEndpoint(e,t){this.endpointMap.delete(t),this.latestEndpointIdByChannelId.get(e)===t&&this.latestEndpointIdByChannelId.delete(e)}checkForPreviousClientConnection(e){const t=this.latestEndpointIdByChannelId.get(e);t&&(wt.ChannelClient.closeChannelByEndpointId(t),console.warn(\"You have created a second connection to an older provider. First connection has been removed from the clientMap\"),console.warn(\"If the provider calls publish(), you may receive multiple messages.\"))}}pt.MessageReceiver=ft;var gt={};Object.defineProperty(gt,\"__esModule\",{value:!0}),gt.ProtocolManager=void 0;gt.ProtocolManager=class{constructor(e){this.ProtocolsInPreferenceOrder=e,this.DefaultClientProtocols=[\"classic\"],this.DefaultProviderProtocols=[\"classic\"],this.getClientProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultClientProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(\", \")}.`);return t},this.getProviderProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultProviderProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(\", \")}.`);return t},this.getCompatibleProtocols=(e,t)=>t.supportedProtocols.filter((t=>e.some((e=>e.type===t.type&&t.version>=e.minimumVersion&&e.version>=(t.minimumVersion??0))))).slice(0,t.maxProtocols)}};var mt={};Object.defineProperty(mt,\"__esModule\",{value:!0});class vt{static combine(e,t){return new vt(e,t)}constructor(e,t){this.primary=e,this.secondary=t}onEndpointDisconnect(e,t){this.primary.onEndpointDisconnect(e,(()=>{this.secondary.isEndpointConnected(e)||t()})),this.secondary.onEndpointDisconnect(e,(()=>{this.primary.isEndpointConnected(e)||t()}))}isValidEndpointPayload(e){return this.primary.isValidEndpointPayload(e)||this.secondary.isValidEndpointPayload(e)}async closeEndpoint(e){await this.primary.closeEndpoint(e),await this.secondary.closeEndpoint(e)}isEndpointConnected(e){return this.primary.isEndpointConnected(e)||this.secondary.isEndpointConnected(e)}async addEndpoint(e,t){this.primary.isValidEndpointPayload(t)&&await this.primary.addEndpoint(e,t),this.secondary.isValidEndpointPayload(t)&&await this.secondary.addEndpoint(e,t)}receive(e){this.primary.receive(e),this.secondary.receive(e)}send(e,t,n){return this.primary.isEndpointConnected(e)?this.primary.send(e,t,n):this.secondary.send(e,t,n)}async close(){await Promise.all([this.primary.close(),this.secondary.close()])}}mt.default=vt;var Ct,bt,It=s&&s.__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},Et=s&&s.__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)},xt=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(xe,\"__esModule\",{value:!0}),xe.ConnectionManager=void 0;const At=Ae,Pt=d,Mt=Oe,_t=Fe,Ot=Je,St=Qe,Rt=pt,Ft=gt,jt=xt(mt);class kt extends Pt.Base{static getProtocolOptionsFromStrings(e){return e.map((e=>{switch(e){case\"rtc\":return _t.RTCInfo;case\"classic\":return Mt.ClassicInfo;default:return(0,At.exhaustiveCheck)(e,[\"rtc\",\"classic\"])}}))}constructor(e){super(e),Ct.set(this,void 0),bt.set(this,void 0),this.removeChannelFromProviderMap=e=>{this.providerMap.delete(e)},this.onmessage=e=>\"process-channel-connection\"===e.action&&(this.processChannelConnection(e),!0),this.providerMap=new Map,this.protocolManager=new Ft.ProtocolManager(\"node\"===this.wire.environment.type?[\"classic\"]:[\"rtc\",\"classic\"]),It(this,Ct,new Rt.MessageReceiver(e),\"f\"),It(this,bt,new Ot.RTCICEManager(e),\"f\"),e.registerMessageHandler(this.onmessage.bind(this))}createProvider(e,t){const n=Object.assign(this.wire.environment.getDefaultChannelOptions().create,e||{}),i=this.protocolManager.getProviderProtocols(n?.protocols),r=i.map((e=>{switch(e){case\"rtc\":return new _t.RTCStrategy;case\"classic\":return new Mt.ClassicStrategy(this.wire,Et(this,Ct,\"f\"),t.channelId,t);default:return(0,At.exhaustiveCheck)(e,[\"rtc\",\"classic\"])}}));let o;if(2===r.length){const[e,t]=r;o=jt.default.combine(e,t)}else{if(1!==r.length)throw new Error(\"failed to combine strategies\");[o]=r}const s=new St.ChannelProvider(t,(()=>St.ChannelProvider.wireClose(this.wire,t.channelName)),o),a=t.channelId;return this.providerMap.set(a,{provider:s,strategy:o,supportedProtocols:kt.getProtocolOptionsFromStrings(i)}),St.ChannelProvider.setProviderRemoval(s,this.removeChannelFromProviderMap.bind(this)),s}async createClientOffer(e){const t=this.protocolManager.getClientProtocols(e?.protocols);let n;return{offer:{supportedProtocols:await Promise.all(t.map((async e=>{switch(e){case\"rtc\":{const{rtcClient:e,channels:t,offer:i,rtcConnectionId:r,channelsOpened:o}=await Et(this,bt,\"f\").startClientOffer();return n={rtcClient:e,channels:t,channelsOpened:o},{type:\"rtc\",version:_t.RTCInfo.version,payload:{offer:i,rtcConnectionId:r}}}case\"classic\":return{type:\"classic\",version:Mt.ClassicInfo.version};default:return(0,At.exhaustiveCheck)(e,[\"rtc\",\"classic\"])}}))),maxProtocols:2},rtc:n}}async createClientStrategy(e,t){t.endpointId||(t.endpointId=this.wire.environment.getNextMessageId(),Et(this,Ct,\"f\").checkForPreviousClientConnection(t.channelId));const n=t.answer??{supportedProtocols:[{type:\"classic\",version:1}]},i=(await Promise.all(n.supportedProtocols.map((async n=>\"rtc\"===n.type&&e?(await Et(this,bt,\"f\").finishClientOffer(e.rtcClient,n.payload.answer,e.channelsOpened),new _t.RTCStrategy):\"classic\"===n.type?new Mt.ClassicStrategy(this.wire,Et(this,Ct,\"f\"),t.endpointId,t):null)))).filter((e=>null!==e));let r;if(e&&!i.some((e=>e instanceof _t.RTCStrategy))&&e&&e.rtcClient.close(),i.length>=2)r=jt.default.combine(i[0],i[1]);else{if(!i.length)throw new Error(\"No compatible protocols\");[r]=i}const o={endpointIdentity:t,rtc:e};return r.addEndpoint(t.channelId,o),r}async processChannelConnection(e){const{clientIdentity:t,providerIdentity:n,ackToSender:i,payload:r,offer:o}=e.payload;t.endpointId?t.isLocalEndpointId=!1:(t.endpointId=this.wire.environment.getNextMessageId(),t.isLocalEndpointId=!0);const s=n.channelId,a=this.providerMap.get(s);if(!a)return i.payload.success=!1,i.payload.reason=`Channel \"${n.channelName}\" has been destroyed.`,this.wire.sendRaw(i);const{provider:c,strategy:d,supportedProtocols:h}=a;try{if(!(c instanceof St.ChannelProvider))throw Error(\"Cannot connect to a channel client\");const e=o??{supportedProtocols:[{type:\"classic\",version:1}],maxProtocols:1},n=this.protocolManager.getCompatibleProtocols(h,e);if(!n.length)throw new Error(\"This provider does not support any of the offered protocols.\");const s=await c.processConnection(t,r);i.payload.payload=i.payload.payload||{};let a={supportedProtocols:[],endpointPayloadPromise:Promise.resolve({endpointIdentity:t})};return a=await n.reduce((async(e,t)=>{const n=await e;if(\"rtc\"===t.type){const{answer:e,rtcClient:i,channels:r}=await Et(this,bt,\"f\").createProviderAnswer(t.payload.rtcConnectionId,t.payload.offer);n.supportedProtocols.push({type:\"rtc\",version:_t.RTCInfo.version,payload:{answer:e}}),n.endpointPayloadPromise=n.endpointPayloadPromise.then((e=>r.then((t=>({...e,rtc:{rtcClient:i,channels:t}})))))}else n.supportedProtocols.push({type:\"classic\",version:Mt.ClassicInfo.version});return n}),Promise.resolve(a)),a.endpointPayloadPromise.then((e=>d.addEndpoint(t.endpointId,e))),i.payload.payload.result=s,i.payload.payload.answer=a,this.wire.sendRaw(i)}catch(e){return i.payload.success=!1,i.payload.reason=e.message,this.wire.sendRaw(i)}}}xe.ConnectionManager=kt,Ct=new WeakMap,bt=new WeakMap;var Lt,Tt,$t,Bt=s&&s.__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},Gt=s&&s.__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)};Object.defineProperty(le,\"__esModule\",{value:!0}),le.Channel=void 0;const Wt=t,Ht=G,Nt=d,Dt=ue,Ut=xe,Vt=Qe;function zt(e){const t=Math.floor(e/10),n=Math.min(3e4,500*2**t);return new Promise((e=>{setTimeout((()=>{e(!1)}),n)}))}class Kt extends Nt.EmitterBase{constructor(e){super(e,\"channel\"),Lt.set(this,void 0),Tt.set(this,new Wt.EventEmitter),$t.set(this,new Ht.AsyncRetryableLazy((async()=>{await Promise.all([this.on(\"disconnected\",(e=>{Dt.ChannelClient.handleProviderDisconnect(e)})),this.on(\"connected\",((...e)=>{Gt(this,Tt,\"f\").emit(\"connected\",...e)}))]).catch((()=>new Error(\"error setting up channel connection listeners\")))}))),Bt(this,Lt,new Ut.ConnectionManager(e),\"f\")}async getAllChannels(){return this.wire.sendAction(\"get-all-channels\").then((({payload:e})=>e.data))}async onChannelConnect(e){await this.on(\"connected\",e)}async onChannelDisconnect(e){await this.on(\"disconnected\",e)}async safeConnect(e,t,n){const i={count:0};do{let r=()=>{};const o=new Promise((t=>{r=n=>{e===n.channelName&&t(!0)},Gt(this,Tt,\"f\").on(\"connected\",r)}));try{if(i.count>0){i.gotConnectedEvent=await Promise.race([zt(i.count),o]);const t=await this.wire.sendAction(\"connect-to-channel\",{...n,retryInfo:i});return console.log(`Successfully connected to channelName: ${e}`),t.payload.data}const t=this.wire.sendAction(\"connect-to-channel\",n);i.originalMessageId=t.messageId;return(await t).payload.data}catch(n){if(!n.message.includes(\"internal-nack\"))throw n;t&&0===i.count&&console.warn(`No channel found for channelName: ${e}. Waiting for connection...`)}finally{i.count+=1,Gt(this,Tt,\"f\").removeListener(\"connected\",r)}}while(t);throw new Error(`No channel found for channelName: ${e}.`)}async connect(e,t={}){if(await Gt(this,$t,\"f\").getValue(),!e||\"string\"!=typeof e)throw new Error(\"Please provide a channelName string to connect to a channel.\");const n={wait:!0,...this.wire.environment.getDefaultChannelOptions().connect,...t},{offer:i,rtc:r}=await Gt(this,Lt,\"f\").createClientOffer(n);let o;(this.fin.me.isFrame||this.fin.me.isView||this.fin.me.isWindow)&&(o=(await this.fin.me.getInfo()).url);const s={channelName:e,...n,offer:i,connectionUrl:o},a=await this.safeConnect(e,n.wait,s),c=await Gt(this,Lt,\"f\").createClientStrategy(r,a),d=new Dt.ChannelClient(a,(()=>Dt.ChannelClient.wireClose(this.wire,a,a.endpointId)),c);return c.onEndpointDisconnect(a.channelId,(async()=>{try{await d.sendDisconnectAction()}catch(e){console.warn(`Something went wrong during disconnect for client with uuid: ${a.uuid} / name: ${a.name} / endpointId: ${a.endpointId}.`)}finally{Dt.ChannelClient.handleProviderDisconnect(a)}})),d}async create(e,t){if(!e)throw new Error(\"Please provide a channelName to create a channel\");const{payload:{data:n}}=await this.wire.sendAction(\"create-channel\",{channelName:e}),i=Gt(this,Lt,\"f\").createProvider(t,n);return this.on(\"client-disconnected\",(t=>{t.channelName===e&&Vt.ChannelProvider.handleClientDisconnection(i,t)})),i}}le.Channel=Kt,Lt=new WeakMap,Tt=new WeakMap,$t=new WeakMap,Object.defineProperty(de,\"__esModule\",{value:!0}),de.InterAppPayload=de.InterApplicationBus=void 0;const qt=t,Jt=d,Yt=he,Zt=le,Qt=O;class Xt extends Jt.Base{constructor(e){super(e),this.events={subscriberAdded:\"subscriber-added\",subscriberRemoved:\"subscriber-removed\"},this.refCounter=new Yt.RefCounter,this.Channel=new Zt.Channel(e),this.emitter=new qt.EventEmitter,e.registerMessageHandler(this.onmessage.bind(this)),this.on=this.emitter.on.bind(this.emitter),this.removeAllListeners=this.emitter.removeAllListeners.bind(this.emitter)}async publish(e,t){await this.wire.sendAction(\"publish-message\",{topic:e,message:t,sourceWindowName:this.me.name})}async send(e,t,n){const i=(0,Qt.validateIdentity)(e);if(i)throw new Error(i);await this.wire.sendAction(\"send-message\",{destinationUuid:e.uuid,destinationWindowName:e.name,topic:t,message:n,sourceWindowName:this.me.name})}subscribe(e,t,n){const i=this.createSubscriptionKey(e.uuid,e.name||\"*\",t);return this.emitter.on(i,n),this.refCounter.actOnFirst(i,(async()=>{await this.wire.sendAction(\"subscribe\",{sourceUuid:e.uuid,sourceWindowName:e.name||\"*\",topic:t,destinationWindowName:this.me.name})}),(()=>Promise.resolve()))}unsubscribe(e,t,n){const i=e.name||\"*\",r=this.createSubscriptionKey(e.uuid,i,t);return this.emitter.removeListener(r,n),this.refCounter.actOnLast(r,(async()=>{await this.wire.sendAction(\"unsubscribe\",{sourceUuid:e.uuid,sourceWindowName:i,topic:t,destinationWindowName:this.me.name})}),(()=>new Promise((e=>e)).then((()=>{}))))}processMessage(e){const{payload:{message:t,sourceWindowName:n,sourceUuid:i,topic:r}}=e,o=[this.createSubscriptionKey(i,n,r),this.createSubscriptionKey(i,\"*\",r),this.createSubscriptionKey(\"*\",\"*\",r)],s={uuid:i,name:n};o.forEach((e=>{this.emitter.emit(e,t,s)}))}emitSubscriverEvent(e,t){const{payload:{targetName:n,uuid:i,topic:r}}=t,o={name:n,uuid:i,topic:r};this.emitter.emit(e,o)}createSubscriptionKey(e,t,n){const i=t||\"*\";if(!(e&&i&&n))throw new Error(\"Missing uuid, name, or topic string\");return function(...e){return e.map((e=>Buffer.from(`${e}`).toString(\"base64\"))).join(\"/\")}(e,i,n)}onmessage(e){const{action:t}=e;switch(t){case\"process-message\":this.processMessage(e);break;case this.events.subscriberAdded:this.emitSubscriverEvent(this.events.subscriberAdded,e);break;case this.events.subscriberRemoved:this.emitSubscriverEvent(this.events.subscriberRemoved,e)}return!0}}de.InterApplicationBus=Xt;de.InterAppPayload=class{};var en={};Object.defineProperty(en,\"__esModule\",{value:!0}),en.Clipboard=void 0;const tn=d;class nn extends tn.Base{async writeText(e){await this.wire.sendAction(\"clipboard-write-text\",e)}async readText(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-text\",{type:e});return t.data}async writeImage(e){await this.wire.sendAction(\"clipboard-write-image\",e)}async readImage(e={format:\"dataURL\"}){const{payload:t}=await this.wire.sendAction(\"clipboard-read-image\",e);return t.data}async writeHtml(e){await this.wire.sendAction(\"clipboard-write-html\",e)}async readHtml(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-html\",{type:e});return t.data}async writeRtf(e){await this.wire.sendAction(\"clipboard-write-rtf\",e)}async readRtf(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-rtf\",{type:e});return t.data}async write(e){await this.wire.sendAction(\"clipboard-write\",e)}async getAvailableFormats(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-formats\",{type:e});return t.data}}en.Clipboard=nn;var rn={},on={},sn={};Object.defineProperty(sn,\"__esModule\",{value:!0}),sn.ExternalApplication=void 0;const an=d;class cn extends an.EmitterBase{constructor(e,t){super(e,\"external-application\",t.uuid),this.identity=t}getInfo(){return this.wire.sendAction(\"get-external-application-info\",this.identity).then((({payload:e})=>e.data))}}sn.ExternalApplication=cn,Object.defineProperty(on,\"__esModule\",{value:!0}),on.ExternalApplicationModule=void 0;const dn=d,hn=sn;class ln extends dn.Base{wrap(e){return this.wire.sendAction(\"external-application-wrap\").catch((e=>{})),Promise.resolve(new hn.ExternalApplication(this.wire,{uuid:e}))}wrapSync(e){return this.wire.sendAction(\"external-application-wrap-sync\").catch((e=>{})),new hn.ExternalApplication(this.wire,{uuid:e})}}on.ExternalApplicationModule=ln,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(on,e),n(sn,e)}(rn);var un={},pn={},wn={};Object.defineProperty(wn,\"__esModule\",{value:!0}),wn._Frame=void 0;const yn=d;class fn extends yn.EmitterBase{constructor(e,t){super(e,\"frame\",t.uuid,t.name),this.identity=t}getInfo(){return this.wire.sendAction(\"get-frame-info\",this.identity).then((({payload:e})=>e.data))}getParentWindow(){return this.wire.sendAction(\"get-parent-window\",this.identity).then((({payload:e})=>e.data))}}wn._Frame=fn,Object.defineProperty(pn,\"__esModule\",{value:!0}),pn._FrameModule=void 0;const gn=d,mn=O,vn=wn;class Cn extends gn.Base{async wrap(e){this.wire.sendAction(\"frame-wrap\").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}wrapSync(e){this.wire.sendAction(\"frame-wrap-sync\").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}getCurrent(){return this.wire.sendAction(\"frame-get-current\").catch((e=>{})),Promise.resolve(new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity()))}getCurrentSync(){return this.wire.sendAction(\"frame-get-current-sync\").catch((e=>{})),new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity())}}pn._FrameModule=Cn,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(pn,e),n(wn,e)}(un);var bn={};Object.defineProperty(bn,\"__esModule\",{value:!0}),bn.GlobalHotkey=void 0;const In=d;class En extends In.EmitterBase{constructor(e){super(e,\"global-hotkey\")}async register(e,t){await this.on(e,t),await this.wire.sendAction(\"global-hotkey-register\",{hotkey:e})}async unregister(e){await this.removeAllListeners(e),await this.wire.sendAction(\"global-hotkey-unregister\",{hotkey:e})}async unregisterAll(){await Promise.all(this.eventNames().filter((e=>!(\"registered\"===e||\"unregistered\"===e))).map((e=>this.removeAllListeners(e)))),await this.wire.sendAction(\"global-hotkey-unregister-all\",{})}async isRegistered(e){const{payload:{data:t}}=await this.wire.sendAction(\"global-hotkey-is-registered\",{hotkey:e});return t}}bn.GlobalHotkey=En;var xn,An={},Pn={},Mn={},_n=s&&s.__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)};Object.defineProperty(Mn,\"__esModule\",{value:!0}),Mn.Platform=void 0;const On=d,Sn=O,Rn=new Map;class Fn extends On.EmitterBase{constructor(e,t){super(t.wire,\"application\",e.uuid),this.getClient=e=>{this.wire.sendAction(\"platform-get-client\",this.identity).catch((e=>{}));const t=e||this.identity,{uuid:n}=t;if(!Rn.has(n)){const e=_n(this,xn,\"f\").call(this,n);Rn.set(n,e)}return Rn.get(n)},xn.set(this,(async e=>{try{const t=`custom-frame-${e}`,n=await this._channel.connect(t,{wait:!1});return n.onDisconnection((()=>{Rn.delete(e)})),n}catch(t){throw Rn.delete(e),new Error(\"The targeted Platform is not currently running. Listen for application-started event for the given Uuid.\")}})),this.launchLegacyManifest=this.launchContentManifest;const n=(0,Sn.validateIdentity)(e);if(n)throw new Error(n);this._channel=t,this.identity={uuid:e.uuid},this.Layout=this.fin.Platform.Layout,this.Application=this.fin.Application.wrapSync(this.identity)}async createView(e,t,n){this.wire.sendAction(\"platform-create-view\",this.identity).catch((e=>{}));const i=await this.getClient(),r=await i.dispatch(\"create-view\",{target:t,opts:e,targetView:n});if(!r||(0,Sn.validateIdentity)(r.identity))throw new Error(`When overwriting the createView call, please return an object that has a valid 'identity' property: ${JSON.stringify(r)}`);return this.fin.View.wrapSync(r.identity)}async createWindow(e){this.wire.sendAction(\"platform-create-window\",this.identity).catch((e=>{}));const t=await this.getClient();e.reason||(e.reason=\"api-call\");const n=await t.dispatch(\"create-view-container\",e);if(!n||(0,Sn.validateIdentity)(n.identity))throw new Error(`When overwriting the createWindow call, please return an object that has a valid 'identity' property: ${JSON.stringify(n)}`);const{identity:i}=n,r=this.fin.Window.wrapSync(i);return r.name=i.name,r.uuid=i.uuid,r}async quit(){this.wire.sendAction(\"platform-quit\",this.identity).catch((e=>{}));return(await this.getClient()).dispatch(\"quit\")}async closeView(e){this.wire.sendAction(\"platform-close-view\",this.identity).catch((e=>{}));const t=await this.getClient();await t.dispatch(\"close-view\",{view:e})}async reparentView(e,t){console.warn(\"Platform.reparentView has been deprecated, please use Platform.createView\"),this.wire.sendAction(\"platform-reparent-view\",this.identity).catch((e=>{}));const n={...e,uuid:e.uuid??this.identity.uuid},i=await this.fin.View.wrap(n),r=await i.getOptions();return this.createView(r,t)}async getSnapshot(){this.wire.sendAction(\"platform-get-snapshot\",this.identity).catch((e=>{}));return(await this.getClient()).dispatch(\"get-snapshot\")}async getViewSnapshot(e){return(await this.getClient()).dispatch(\"get-view-snapshot\",{viewIdentity:e})}async applySnapshot(e,t){this.wire.sendAction(\"platform-apply-snapshot\",this.identity).catch((e=>{}));const n=\"Requested snapshot must be a valid Snapshot object, or a url or filepath to such an object.\";let i;if(\"string\"==typeof e)try{i=(await this._channel.wire.sendAction(\"get-application-manifest\",{manifestUrl:e})).payload.data}catch(e){throw new Error(`${n}: ${e}`)}else i=e;if(!i.windows)throw new Error(n);const r=await this.getClient();return await r.dispatch(\"apply-snapshot\",{snapshot:i,options:t}),this}async fetchManifest(e){return(await this.getClient()).dispatch(\"platform-fetch-manifest\",{manifestUrl:e})}async launchContentManifest(e){this.wire.sendAction(\"platform-launch-content-manifest\",this.identity).catch((()=>{}));const t=await this.getClient(),n=await this.fetchManifest(e);return t.dispatch(\"launch-into-platform\",{manifest:n,manifestUrl:e}),this}async setWindowContext(e={},t){if(this.wire.sendAction(\"platform-set-window-context\",this.identity).catch((e=>{})),!e)throw new Error(\"Please provide a serializable object or string to set the context.\");const n=await this.getClient(),{entityType:i}=t?await this.fin.System.getEntityInfo(t.uuid,t.name):this.fin.me;await n.dispatch(\"set-window-context\",{context:e,entityType:i,target:t||{uuid:this.fin.me.uuid,name:this.fin.me.name}})}async getWindowContext(e){this.wire.sendAction(\"platform-get-window-context\",this.identity).catch((e=>{}));const t=await this.getClient(),{entityType:n}=e?await this.fin.System.getEntityInfo(e.uuid,e.name):this.fin.me;return t.dispatch(\"get-window-context\",{target:e||{uuid:this.fin.me.uuid,name:this.fin.me.name},entityType:n})}async closeWindow(e,t={skipBeforeUnload:!1}){this.wire.sendAction(\"platform-close-window\",this.identity).catch((e=>{}));return(await this.getClient()).dispatch(\"close-window\",{windowId:e,options:t})}}Mn.Platform=Fn,xn=new WeakMap;var jn={},kn={},Ln={},Tn={};function $n(e){switch(e){case\"columns\":case\"grid\":case\"rows\":case\"tabs\":return!0;default:return!1}}Object.defineProperty(Tn,\"__esModule\",{value:!0}),Tn.overrideFromComposables=Tn.isValidPresetType=void 0,Tn.isValidPresetType=$n,Tn.overrideFromComposables=function(...e){return t=>e.reduceRight(((e,t)=>n=>t(e(n))),(e=>e))(t)},Tn.default={isValidPresetType:$n};var Bn={},Gn={},Wn={};Object.defineProperty(Wn,\"__esModule\",{value:!0}),Wn.ApiConsumer=void 0;Wn.ApiConsumer=class{constructor(e){this.strategy=e,this.consume=async e=>(await this.strategy.getExposedFunctions(e)).reduce(((t,n)=>({...t,[n.key]:this.strategy.createFunction(n,e)})),{})}};var Hn={},Nn={};Object.defineProperty(Nn,\"__esModule\",{value:!0}),Nn.expose=Nn.getExposedProperties=void 0;const Dn=Symbol(\"exposedProperties\");Nn.getExposedProperties=e=>e[Dn]||e.prototype[Dn]||[];Nn.expose=e=>(t,n,i)=>{t[Dn]=t[Dn]||[],t[Dn].push({key:n,descriptor:i,options:e})},Object.defineProperty(Hn,\"__esModule\",{value:!0}),Hn.ApiExposer=void 0;const Un=Nn;Hn.ApiExposer=class{constructor(e){this.strategy=e,this.exposeInstance=async(e,t)=>{const n=(0,Un.getExposedProperties)(e),i=await Promise.all(n.map((async({key:n,options:i})=>({key:n,options:await this.strategy.exposeFunction(e[n].bind(e),{key:n,options:i,meta:t})}))));await this.strategy.exposeMeta(t,i)}}};var Vn={},zn={},Kn={};Object.defineProperty(Kn,\"__esModule\",{value:!0}),Kn.ChannelsConsumer=void 0;Kn.ChannelsConsumer=class{constructor(e){this.channel=e,this.getExposedFunctions=async e=>{const{id:t}=e,{props:n}=await this.channel.dispatch(`api-meta:${t}`);return n},this.createFunction=e=>(...t)=>{const{action:n}=e.options;return this.channel.dispatch(n,{args:t})}}};var qn={};Object.defineProperty(qn,\"__esModule\",{value:!0}),qn.ChannelsExposer=void 0;qn.ChannelsExposer=class{constructor(e){this.channelProviderOrClient=e,this.exposeFunction=async(e,t)=>{const{key:n,options:i,meta:r}=t,{id:o}=r,s=`${o}.${i?.action||n}`;return await this.channelProviderOrClient.register(s,(async({args:t})=>e(...t))),{action:s}},this.exposeMeta=async({id:e},t)=>{const n=`api-meta:${e}`;await this.channelProviderOrClient.register(n,(()=>({props:t})))}}},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Kn,e),n(qn,e)}(zn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(zn,e)}(Vn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Wn,e),n(Hn,e),n(Vn,e),n(Nn,e)}(Gn);var Jn={};Object.defineProperty(Jn,\"__esModule\",{value:!0}),Jn.createRelayedDispatch=exports.relayChannelClientApi_1=Jn.relayChannelClientApi=void 0;const Yn=[\"no longer connected\",\"RTCDataChannel closed unexpectedly\",\"The client you are trying to dispatch from is disconnected from the target provider\"];exports.relayChannelClientApi_1=Jn.relayChannelClientApi=async(e,t)=>{e.register(`relay:${t}`,(({action:t,target:n,payload:i})=>e.dispatch(n,t,i))),await Promise.resolve()};Jn.createRelayedDispatch=(e,t,n,i)=>async(r,o)=>{try{return await e.dispatch(`relay:${n}`,{action:r,payload:o,target:t})}catch(e){if(s=e.message,Yn.some((e=>s.includes(e)))&&i)throw new Error(i);throw e}var s};var Zn,Qn,Xn,ei=s&&s.__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},ti=s&&s.__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)};Object.defineProperty(Bn,\"__esModule\",{value:!0}),Bn.ColumnOrRow=Bn.TabStack=Bn.LayoutNode=void 0;const ni=Gn,ii=Jn;class ri{constructor(e,t){Zn.set(this,void 0),this.isRoot=()=>ti(this,Zn,\"f\").isRoot(this.entityId),this.exists=()=>ti(this,Zn,\"f\").exists(this.entityId),this.getParent=async()=>{const e=await ti(this,Zn,\"f\").getParent(this.entityId);if(e)return ri.getEntity(e,ti(this,Zn,\"f\"))},this.createAdjacentStack=async(e,t)=>{const n=await ti(this,Zn,\"f\").createAdjacentStack(this.entityId,e,t);return ri.getEntity({entityId:n,type:\"stack\"},ti(this,Zn,\"f\"))},this.getAdjacentStacks=async e=>(await ti(this,Zn,\"f\").getAdjacentStacks({targetId:this.entityId,edge:e})).map((e=>ri.getEntity({type:\"stack\",entityId:e.entityId},ti(this,Zn,\"f\")))),ei(this,Zn,e,\"f\"),this.entityId=t}}Bn.LayoutNode=ri,Zn=new WeakMap,ri.newLayoutEntitiesClient=async(e,t,n)=>{const i=(0,ii.createRelayedDispatch)(e,n,\"layout-relay\",\"You are trying to interact with a layout component on a window that does not exist or has been destroyed.\");return new ni.ApiConsumer(new ni.ChannelsConsumer({dispatch:i})).consume({id:t})},ri.getEntity=(e,t)=>{const{entityId:n,type:i}=e;switch(i){case\"column\":case\"row\":return new si(t,n,i);case\"stack\":return new oi(t,n);default:throw new Error(`Unrecognised Layout Entity encountered ('${JSON.stringify(e)})`)}};class oi extends ri{constructor(e,t){super(e,t),Qn.set(this,void 0),this.type=\"stack\",this.getViews=()=>ti(this,Qn,\"f\").getStackViews(this.entityId),this.addView=async(e,t={index:0})=>ti(this,Qn,\"f\").addViewToStack(this.entityId,e,t),this.removeView=async e=>{await ti(this,Qn,\"f\").removeViewFromStack(this.entityId,e)},this.setActiveView=async e=>{await ti(this,Qn,\"f\").setStackActiveView(this.entityId,e)},ei(this,Qn,e,\"f\")}}Bn.TabStack=oi,Qn=new WeakMap;class si extends ri{constructor(e,t,n){super(e,t),Xn.set(this,void 0),this.getContent=async()=>(await ti(this,Xn,\"f\").getContent(this.entityId)).map((e=>ri.getEntity(e,ti(this,Xn,\"f\")))),ei(this,Xn,e,\"f\"),this.type=n}}Bn.ColumnOrRow=si,Xn=new WeakMap;var ai={};Object.defineProperty(ai,\"__esModule\",{value:!0}),ai.DEFAULT_LAYOUT_KEY=ai.LAYOUT_CONTROLLER_ID=void 0,ai.LAYOUT_CONTROLLER_ID=\"layout-entities\",ai.DEFAULT_LAYOUT_KEY=\"__default__\";var ci,di,hi,li=s&&s.__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)};Object.defineProperty(Ln,\"__esModule\",{value:!0}),Ln.Layout=void 0;const ui=G,pi=O,wi=d,yi=Tn,fi=Bn,gi=ai;class mi extends wi.Base{static getClient(e){return li(e,di,\"f\").getValue()}constructor(e,t){super(t),ci.add(this),di.set(this,new ui.Lazy((async()=>fi.LayoutNode.newLayoutEntitiesClient(await this.platform.getClient(),gi.LAYOUT_CONTROLLER_ID,this.identity)))),this.replace=async e=>{this.wire.sendAction(\"layout-replace\").catch((e=>{}));const t=await this.platform.getClient();await t.dispatch(\"replace-layout\",{target:this.identity,opts:{layout:e}})},this.replaceView=async(e,t)=>{this.wire.sendAction(\"layout-replace-view\").catch((e=>{}));const n=await this.platform.getClient();await n.dispatch(\"replace-view\",{target:this.identity,opts:{viewToReplace:e,newView:t}})},this.applyPreset=async e=>{this.wire.sendAction(\"layout-apply-preset\").catch((e=>{}));const t=await this.platform.getClient(),{presetType:n}=e;if(!n||!(0,yi.isValidPresetType)(n))throw new Error(\"Cannot apply preset layout, please include an applicable presetType property in the PresetLayoutOptions.\");await t.dispatch(\"apply-preset-layout\",{target:this.identity,opts:{presetType:n}})};const n=(0,pi.validateIdentity)(e);if(n)throw new Error(n);this.identity=e,this.platform=this.fin.Platform.wrapSync({uuid:e.uuid}),e.uuid===this.fin.me.uuid&&e.name===this.fin.me.name&&(this.init=this.fin.Platform.Layout.init)}async getConfig(){this.wire.sendAction(\"layout-get-config\").catch((e=>{}));return(await this.platform.getClient()).dispatch(\"get-frame-snapshot\",{target:this.identity})}async getCurrentViews(){this.wire.sendAction(\"layout-get-views\").catch((e=>{}));const e=await this.platform.getClient();return(await e.dispatch(\"get-layout-views\",{target:this.identity})).map((e=>this.fin.View.wrapSync(e)))}async getRootItem(){this.wire.sendAction(\"layout-get-root-item\").catch((()=>{}));const e=await li(this,di,\"f\").getValue(),t=await e.getRoot(\"layoutName\"in this.identity?this.identity:void 0);return fi.LayoutNode.getEntity(t,e)}async getStackByViewIdentity(e){this.wire.sendAction(\"layout-get-stack-by-view\").catch((()=>{}));const t=await li(this,di,\"f\").getValue(),n=await t.getStackByView(e);if(!n)throw new Error(`No stack found for view: ${e.uuid}/${e.name}`);return fi.LayoutNode.getEntity(n,t)}async addView(e,{location:t,targetView:n}={}){this.wire.sendAction(\"layout-add-view\").catch((e=>{}));const{identity:i}=await li(this,ci,\"m\",hi).call(this,\"layout-add-view\",{viewOptions:e,location:t,targetView:n});return{identity:i}}async closeView(e){this.wire.sendAction(\"layout-close-view\").catch((e=>{})),await li(this,ci,\"m\",hi).call(this,\"layout-close-view\",{viewIdentity:e})}}Ln.Layout=mi,di=new WeakMap,ci=new WeakSet,hi=async function(e,t){return(await this.platform.getClient()).dispatch(e,{target:this.identity,opts:t})};var vi,Ci,bi,Ii,Ei,xi=s&&s.__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)},Ai=s&&s.__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};Object.defineProperty(kn,\"__esModule\",{value:!0}),kn.LayoutModule=void 0;const Pi=d,Mi=Ln,_i=ai;class Oi extends Pi.Base{constructor(){super(...arguments),vi.add(this),Ci.set(this,!1),bi.set(this,null),this.init=async(e={})=>{if(this.wire.sendAction(\"layout-init\").catch((e=>{})),!this.wire.environment.layoutAllowedInContext(this.fin))throw new Error(\"Layout.init can only be called from a Window context.\");if(xi(this,Ci,\"f\"))throw new Error(\"Layout.init was already called, please use Layout.create to add additional layouts.\");\"openfin\"===this.wire.environment.type&&await this.fin.Platform.getCurrentSync().getClient(),Ai(this,Ci,!0,\"f\"),Ai(this,bi,await this.wire.environment.initLayoutManager(this.fin,this.wire,e),\"f\"),await this.wire.environment.applyLayoutSnapshot(this.fin,xi(this,bi,\"f\"),e);const t={name:this.fin.me.name,uuid:this.fin.me.uuid};if(!e.layoutManagerOverride){const e={layoutName:_i.DEFAULT_LAYOUT_KEY,...t};return xi(this,Ii,\"f\").call(this,e)}return this.wrapSync(t)},Ii.set(this,(e=>{const t=\"[Layout] You are using a deprecated property `layoutManager` - it will throw if you access it starting in v37.\",n=new Proxy({},{get(e,n){throw console.warn(`[Layout-mgr-proxy] accessing ${n.toString()}`),new Error(t)}}),i=Object.assign(this.wrapSync(e),{layoutManager:n});return new Proxy(i,{get(e,n){if(\"layoutManager\"===n)throw console.warn(`[Layout-proxy] accessing ${n.toString()}`),new Error(t);return e[n]}})})),this.getCurrentLayoutManagerSync=()=>xi(this,vi,\"m\",Ei).call(this,\"fin.Platform.Layout.getCurrentLayoutManagerSync()\"),this.create=async e=>this.wire.environment.createLayout(xi(this,vi,\"m\",Ei).call(this,\"fin.Platform.Layout.create()\"),e),this.destroy=async e=>this.wire.environment.destroyLayout(xi(this,vi,\"m\",Ei).call(this,\"fin.Platform.Layout.destroy()\"),e)}async wrap(e){return this.wire.sendAction(\"layout-wrap\").catch((e=>{})),new Mi.Layout(e,this.wire)}wrapSync(e){return this.wire.sendAction(\"layout-wrap-sync\").catch((e=>{})),new Mi.Layout(e,this.wire)}async getCurrent(){if(this.wire.sendAction(\"layout-get-current\").catch((e=>{})),\"openfin\"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error(\"You are not in a Window context. Only Windows can have a Layout.\");const{uuid:e,name:t}=this.fin.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction(\"layout-get-current-sync\").catch((e=>{})),\"openfin\"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error(\"You are not in a Window context. Only Windows can have a Layout.\");const{uuid:e,name:t}=this.fin.me;return this.wrapSync({uuid:e,name:t})}async getLayoutByViewIdentity(e){this.wire.sendAction(\"layout-get-by-view-identity\").catch((()=>{}));let t=await this.wire.environment.getViewWindowIdentity(this.fin,e);t.identity&&(t=t.identity);try{const n=this.wrapSync(t),i=await Mi.Layout.getClient(n),r=await i.getLayoutIdentityForViewOrThrow(e);return this.wrapSync(r)}catch(n){if(![\"No action registered at target for\",\"getLayoutIdentityForViewOrThrow is not a function\"].some((e=>n.message.includes(e))))throw n;if(t.uuid===t.name)throw new Error(`View identity ${JSON.stringify(e)} is not attached to any layout in provider window ${JSON.stringify(t)}.`);return this.wrapSync(t)}}}kn.LayoutModule=Oi,Ci=new WeakMap,bi=new WeakMap,Ii=new WeakMap,vi=new WeakSet,Ei=function(e){if(!xi(this,bi,\"f\"))throw new Error(`You must call init before using the API ${e}`);return xi(this,bi,\"f\")},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(kn,e),n(Ln,e)}(jn),Object.defineProperty(Pn,\"__esModule\",{value:!0}),Pn.PlatformModule=void 0;const Si=d,Ri=Mn,Fi=jn;class ji extends Si.Base{constructor(e,t){super(e),this._channel=t,this.Layout=new Fi.LayoutModule(this.wire)}async init(e){if(!fin.__internal_.isPlatform||fin.me.name!==fin.me.uuid)throw new Error(\"fin.Platform.init should only be called from a custom platform provider running in the main window of the application.\");return this.wire.environment.initPlatform(this.fin,e)}async wrap(e){return this.wire.sendAction(\"platform-wrap\").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}wrapSync(e){return this.wire.sendAction(\"platform-wrap-sync\").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}async getCurrent(){return this.wire.sendAction(\"platform-get-current\").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction(\"platform-get-current-sync\").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}start(e){return this.wire.sendAction(\"platform-start\").catch((e=>{})),new Promise((async(t,n)=>{try{const{uuid:n}=e,i=await this.fin.Application._create({...e,isPlatformController:!0});i.once(\"platform-api-ready\",(()=>t(this.wrapSync({uuid:n})))),i._run({uuid:n})}catch(e){n(e)}}))}startFromManifest(e,t){return this.wire.sendAction(\"platform-start-from-manifest\").catch((e=>{})),new Promise((async(n,i)=>{try{const i=await this.fin.Application._createFromManifest(e);i.once(\"platform-api-ready\",(()=>n(this.wrapSync({uuid:i.identity.uuid})))),i._run(t)}catch(e){i(e)}}))}}Pn.PlatformModule=ji,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Pn,e),n(Mn,e)}(An);var ki={};!function(e){Object.defineProperty(e,\"__esModule\",{value:!0}),e.getMe=e.getBaseMe=e.environmentUnsupportedMessage=void 0;const t=J(),n=un,i=ie(),r=rn;function o(e,t,n){return{...{isView:\"view\"===e,isWindow:\"window\"===e,isFrame:\"iframe\"===e,isExternal:\"external connection\"===e},uuid:t,name:n,entityType:e}}e.environmentUnsupportedMessage=\"You are not running in OpenFin.\",e.getBaseMe=o,e.getMe=function(s){const{uuid:a,name:c,entityType:d}=s.me,h={setContext(){throw new Error(e.environmentUnsupportedMessage)},addContextHandler(){throw new Error(e.environmentUnsupportedMessage)},getContextGroups(){throw new Error(e.environmentUnsupportedMessage)},joinContextGroup(){throw new Error(e.environmentUnsupportedMessage)},removeFromContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getAllClientsInContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getInfoForContextGroup(){throw new Error(e.environmentUnsupportedMessage)}},l=\"Interop API has not been instantiated. Either connection has failed or you have not declared interop in your config.\",u={setContext(){throw new Error(l)},addContextHandler(){throw new Error(l)},getContextGroups(){throw new Error(l)},joinContextGroup(){throw new Error(l)},removeFromContextGroup(){throw new Error(l)},getAllClientsInContextGroup(){throw new Error(l)},getInfoForContextGroup(){throw new Error(l)}},p={eventNames:()=>{throw new Error(e.environmentUnsupportedMessage)},emit:()=>{throw new Error(e.environmentUnsupportedMessage)},listeners:()=>{throw new Error(e.environmentUnsupportedMessage)},listenerCount:()=>{throw new Error(e.environmentUnsupportedMessage)},on:()=>{throw new Error(e.environmentUnsupportedMessage)},addListener:()=>{throw new Error(e.environmentUnsupportedMessage)},once:()=>{throw new Error(e.environmentUnsupportedMessage)},prependListener:()=>{throw new Error(e.environmentUnsupportedMessage)},prependOnceListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeAllListeners:()=>{throw new Error(e.environmentUnsupportedMessage)}};switch(d){case\"view\":return Object.assign(new t.View(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case\"window\":return Object.assign(new i._Window(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case\"iframe\":return Object.assign(new n._Frame(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case\"external connection\":return Object.assign(new r.ExternalApplication(s,{uuid:a}),o(d,a,c),{interop:u,isOpenFin:!1});default:return{...o(d,a,c),...p,interop:h,isOpenFin:!1}}}}(ki);var Li={},Ti={},$i={};Object.defineProperty($i,\"__esModule\",{value:!0}),$i.createWarningObject=$i.createUnusableObject=void 0,$i.createUnusableObject=function(e){const t=()=>{throw new Error(e)};return new Proxy({},{apply:t,construct:t,defineProperty:t,deleteProperty:t,get:t,getOwnPropertyDescriptor:t,getPrototypeOf:t,has:t,isExtensible:t,ownKeys:t,preventExtensions:t,set:t,setPrototypeOf:t})},$i.createWarningObject=function(e,t){return new Proxy(t,{get:(...t)=>(console.warn(e),Reflect.get(...t)),set:(...t)=>(console.warn(e),Reflect.set(...t)),getOwnPropertyDescriptor:(...t)=>(console.warn(e),Reflect.getOwnPropertyDescriptor(...t)),ownKeys:(...t)=>(console.warn(e),Reflect.ownKeys(...t))})};var Bi,Gi={},Wi={};var Hi={};!function(e){Object.defineProperty(e,\"__esModule\",{value:!0}),e.wrapIntentHandler=e.BROKER_ERRORS=e.generateOverrideWarning=e.generateOverrideError=e.wrapContextHandler=e.wrapInTryCatch=e.generateId=void 0;e.generateId=()=>`${Math.random()}${Date.now()}`;e.wrapInTryCatch=(e,t)=>(...n)=>{try{return e(...n)}catch(e){throw new Error((t||\"\")+e)}};e.wrapContextHandler=(e,t)=>async n=>{try{await e(n)}catch(e){throw console.error(`Error thrown by handler ${t} for context type ${n.type}: ${e}`),e}};e.generateOverrideError=(e,t)=>`You have tried to to use ${e} but ${t} has not been overridden in the Interop Broker. Please override this function. Refer to our documentation for more info.`;e.generateOverrideWarning=(e,t,n,i)=>{const{uuid:r,name:o}=n;return i?`Entity with identity: ${r}/${o} has called ${i} or ${e} but ${t} has not been overridden.`:`Entity with identity: ${r}/${o} has called ${e} but ${t} has not been overridden.`},e.BROKER_ERRORS={fireIntent:(0,e.generateOverrideError)(\"fireIntent\",\"handleFiredIntent\"),fireIntentForContext:(0,e.generateOverrideError)(\"fireIntentForContext\",\"handleFiredIntentForContext\"),getInfoForIntent:(0,e.generateOverrideError)(\"getInfoForIntent\",\"handleInfoForIntent\"),getInfoForIntentsByContext:(0,e.generateOverrideError)(\"getInfoForIntentsByContext\",\"handleInfoForIntentsByContext\"),joinSessionContextGroupWithJoinContextGroup:\"The Context Group you have tried to join is a Session Context Group. Custom Context Groups can only be defined by the Interop Broker through code or manifest configuration. Please use joinSessionContextGroup.\",fdc3Open:(0,e.generateOverrideError)(\"fdc3.open\",\"fdc3HandleOpen\"),fdc3FindInstances:(0,e.generateOverrideError)(\"fdc3.findInstances\",\"fdc3HandleFindInstances\"),fdc3GetAppMetadata:(0,e.generateOverrideError)(\"fdc3.getAppMetadata\",\"fdc3HandleGetAppMetadata\"),fdc3GetInfo:(0,e.generateOverrideError)(\"fdc3.getInfo\",\"fdc3HandleGetInfo\")};e.wrapIntentHandler=(e,t)=>async n=>{try{return e(n)}catch(e){throw console.error(`Error thrown by handler ${t}: ${e}`),e}}}(Hi);var Ni,Di,Ui={};function Vi(){if(Di)return Gi;Di=1;var e,t,n,r=s&&s.__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},o=s&&s.__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)},a=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Gi,\"__esModule\",{value:!0}),Gi.InteropBroker=void 0;const c=d,h=a(function(){if(Bi)return Wi;Bi=1,Object.defineProperty(Wi,\"__esModule\",{value:!0});const e=Cr();return Wi.default=class{constructor(e,t){this.provider=e,this.id=t,this.lastContext=void 0,this.contextGroupMap=new Map,this.clients=new Map,this.registerListeners()}registerListeners(){this.provider.register(`sessionContextGroup:getContext-${this.id}`,this.getCurrentContext.bind(this)),this.provider.register(`sessionContextGroup:setContext-${this.id}`,this.setContext.bind(this)),this.provider.register(`sessionContextGroup:handlerAdded-${this.id}`,this.handlerAdded.bind(this)),this.provider.register(`sessionContextGroup:handlerRemoved-${this.id}`,this.handlerRemoved.bind(this))}getCurrentContext(e){return e.type?this.contextGroupMap.get(e.type):this.lastContext}setContext(t,n){const{context:i}=t,r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name} not in Session Client State Map`);this.contextGroupMap.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{e.contextHandlers.get(i.type)?.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getClientState(e){return this.clients.get(e.endpointId)}async handlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(i){const e=r.contextHandlers.get(i)||[];r.contextHandlers.set(i,[...e,n]);const o=this.contextGroupMap.get(i);o&&await this.provider.dispatch(t,n,o)}else{r.globalHandler=n;const e=[...this.contextGroupMap.keys()].map((async e=>{const i=this.contextGroupMap.get(e);i&&await this.provider.dispatch(t,n,i)}));await Promise.all(e)}}handlerRemoved(e,t){const{handlerId:n}=e,i=this.clients.get(t.endpointId);i?(Array.from(i.contextHandlers).forEach((([,e])=>{const t=e.indexOf(n);t>-1&&e.splice(t,1)})),i.globalHandler===n&&(i.globalHandler=void 0)):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={contextHandlers:new Map,clientIdentity:e,globalHandler:void 0};this.clients.set(e.endpointId,t)}}onDisconnection(e){this.clients.delete(e.endpointId)}},Wi}()),l=Hi,u=a(i),p=function(){if(Ni)return Ui;Ni=1,Object.defineProperty(Ui,\"__esModule\",{value:!0}),Ui.PrivateChannelProvider=void 0;const e=Vi();return Ui.PrivateChannelProvider=class t{constructor(e,t){this.provider=e,this.id=t,this.clients=new Map,this.registerListeners(),this.contextByContextType=new Map,this.lastContext=void 0,this.provider.onConnection((e=>this.registerNewClient(e))),this.provider.onDisconnection((async e=>{const{endpointId:t}=e;this.clients.has(t)&&await this.handleClientDisconnecting(e),0===(await this.provider.getAllClientInfo()).length&&this.provider.destroy()}))}getClientState(e){return this.clients.get(e.endpointId)}registerListeners(){this.provider.register(\"broadcast\",this.broadcast.bind(this)),this.provider.register(\"getCurrentContext\",this.getCurrentContext.bind(this)),this.provider.register(\"contextHandlerAdded\",this.contextHandlerAdded.bind(this)),this.provider.register(\"contextHandlerRemoved\",this.contextHandlerRemoved.bind(this)),this.provider.register(\"nonStandardHandlerRemoved\",this.nonStandardHandlerRemoved.bind(this)),this.provider.register(\"onAddContextHandlerAdded\",this.onAddContextHandlerAdded.bind(this)),this.provider.register(\"onDisconnectHandlerAdded\",this.onDisconnectHandlerAdded.bind(this)),this.provider.register(\"onUnsubscribeHandlerAdded\",this.onUnsubscribeHandlerAdded.bind(this)),this.provider.register(\"clientDisconnecting\",((e,t)=>{this.handleClientDisconnecting(t)}))}broadcast(t,n){const{context:i}=t;if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name}, tried to call broadcast, is not connected to this Private Channel`);const r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to broadcast - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);this.contextByContextType.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{const t=e.handlerIdsByContextTypes.get(i.type);t&&t.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getCurrentContext(e,t){const{contextType:n}=e;if(!this.getClientState(t))throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call getCurrentContext, is not connected to this Private Channel`);if(void 0!==n){return this.contextByContextType.get(n)||null}return this.lastContext?this.lastContext:null}contextHandlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call addContextListener, is not connected to this Private Channel`);if(i){const e=r.handlerIdsByContextTypes.get(i)||[];r.handlerIdsByContextTypes.set(i,[...e,n])}else r.globalHandler=n;Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&e.onAddContextListenerHandlerId&&this.provider.dispatch(e.clientIdentity,e.onAddContextListenerHandlerId,i)}))}async contextHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);if(i){let e;if(i.globalHandler===n)i.globalHandler=void 0;else for(const[t,r]of i.handlerIdsByContextTypes){const i=r.indexOf(n);i>-1&&(r.splice(i,1),e=t)}const r=(await this.getConnectedClients()).map((async n=>{const{clientIdentity:i,clientIdentity:{endpointId:r},onUnsubscribeHandlerId:o}=n;r!==t.endpointId&&o&&await this.provider.dispatch(i,o,e)}));try{await Promise.all(r)}catch(e){throw console.error(`Problem when attempting to dispatch to onUnsubscribeHandlers. Error: ${e} Removing Client: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}`),new Error(e)}}else console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}.`)}nonStandardHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);i?i.onDisconnectHandlerId===n?i.onDisconnectHandlerId=void 0:i.onAddContextListenerHandlerId===n?i.onAddContextListenerHandlerId=void 0:i.onUnsubscribeHandlerId===n&&(i.onUnsubscribeHandlerId=void 0):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}onAddContextHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onAddContextListener, is not connected to this Private Channel`);n.onAddContextListenerHandlerId=i,Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&Array.from(e.handlerIdsByContextTypes.keys()).forEach((e=>{this.provider.dispatch(t,i,e)}))}))}onDisconnectHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onDisconnect, is not connected to this Private Channel`);n.onDisconnectHandlerId=i}onUnsubscribeHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onUnsubscribe, is not connected to this Private Channel`);n.onUnsubscribeHandlerId=i}removeClient(e){const t=this.getClientState(e);if(!t)throw new Error(`Client with Identity: ${e.uuid} ${e.name}, tried to call disconnect, is not connected to this Private Channel`);t.handlerIdsByContextTypes.clear(),this.clients.delete(e.endpointId)}async fireOnDisconnectForOtherClients(e){const{endpointId:t}=e,n=(await this.getConnectedClients()).map((async e=>{const{clientIdentity:{endpointId:n},onDisconnectHandlerId:i}=e;n!==t&&i&&await this.provider.dispatch(e.clientIdentity,i)}));try{await Promise.all(n)}catch(t){throw console.error(`Problem when attempting to dispatch to onDisconnectHandlers. Error: ${t} Disconnecting Client: uuid: ${e.uuid}. name: ${e.name}. endpointId: ${e.endpointId}`),new Error(t)}}async unsubscribeAll(e){const{endpointId:t}=e,n=this.clients.get(t);if(n){const t=Array.from(n.handlerIdsByContextTypes.values()).flat(),i=n.globalHandler;if(t.length>0){const n=t.map((async t=>this.contextHandlerRemoved({handlerId:t},e)));try{await Promise.all(n)}catch(e){console.error(e.message)}}if(i)try{await this.contextHandlerRemoved({handlerId:i},e)}catch(e){console.error(e.message)}}}async handleClientDisconnecting(e){await this.unsubscribeAll(e),this.removeClient(e),await this.fireOnDisconnectForOtherClients(e)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={clientIdentity:e,handlerIdsByContextTypes:new Map,globalHandler:void 0,onAddContextListenerHandlerId:void 0,onUnsubscribeHandlerId:void 0,onDisconnectHandlerId:void 0};this.clients.set(e.endpointId,t)}}async getConnectedClients(){const e=await this.provider.getAllClientInfo();return Array.from(this.clients.values()).filter((t=>{const{uuid:n,name:i}=t.clientIdentity;return e.some((e=>i===e.name&&n===e.uuid))}))}static init(e,n){return new t(e,n)}},Ui}(),w=G,y=[{id:\"green\",displayMetadata:{color:\"#00CC88\",name:\"green\"}},{id:\"purple\",displayMetadata:{color:\"#8C61FF\",name:\"purple\"}},{id:\"orange\",displayMetadata:{color:\"#FF8C4C\",name:\"orange\"}},{id:\"red\",displayMetadata:{color:\"#FF5E60\",name:\"red\"}},{id:\"pink\",displayMetadata:{color:\"#FF8FB8\",name:\"pink\"}},{id:\"yellow\",displayMetadata:{color:\"#E9FF8F\",name:\"yellow\"}}];let f=class i extends c.Base{constructor(i,s,a){super(i),e.set(this,void 0),t.set(this,void 0),n.set(this,void 0),this.getProvider=()=>o(this,n,\"f\").getValue(),this.interopClients=new Map,this.contextGroupsById=new Map,r(this,t,a.contextGroups??[...y],\"f\"),r(this,e,a.fdc3Info,\"f\"),a?.logging&&(this.logging=a.logging),this.intentClientMap=new Map,this.lastContextMap=new Map,this.sessionContextGroupMap=new Map,r(this,n,new w.Lazy(s),\"f\"),this.setContextGroupMap(),this.setupChannelProvider()}static createClosedConstructor(...e){return class extends i{constructor(...t){if(t.length){const[n,i,r]=t;if(r&&\"object\"==typeof r&&!(0,u.default)(r,e[2]))return console.warn(\"You have modified the parameters of the InteropOverride constructor. This behavior is deprecated and will be removed in a future version. You can modify these options in your manifest. Please consult our Interop docs for guidance on migrating to the new override scheme.\"),void super(e[0],e[1],r);console.warn(\"You are attempting to pass arguments to the InteropOverride constructor. This is not necessary, and these passed arguments will be ignored. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.\")}super(...e)}}}setContext({context:e},t){this.wire.sendAction(\"interop-broker-set-context\").catch((e=>{}));const n=this.getClientState(t);if(!n||!n.contextGroupId)throw n?new Error(\"You must join a context group before you can set context.\"):new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);{const{contextGroupId:t}=n;this.setContextForGroup({context:e},t)}}setContextForGroup({context:e},t){this.wire.sendAction(\"interop-broker-set-context-for-group\").catch((e=>{}));const n=this.contextGroupsById.get(t);if(!n)throw new Error(`Unable to set context for context group that isn't in the context group mapping: ${t}.`);const r=i.checkContextIntegrity(e);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(e)}`);const o=e.type;n.set(o,e),this.lastContextMap.set(t,o);Array.from(this.interopClients.values()).filter((e=>e.contextGroupId===t)).forEach((t=>{for(const[,n]of t.contextHandlers)i.isContextTypeCompatible(o,n.contextType)&&this.invokeContextHandler(t.clientIdentity,n.handlerId,e)}))}getCurrentContext(e,t){this.wire.sendAction(\"interop-broker-get-current-context\").catch((e=>{}));const n=this.getClientState(t);if(!n?.contextGroupId)throw new Error(\"You must be a member of a context group to call getCurrentContext\");const{contextGroupId:i}=n,r=this.contextGroupsById.get(i),o=this.lastContextMap.get(i),s=e?.contextType??o;return r&&s?r.get(s):void 0}async joinContextGroup({contextGroupId:e,target:t},n){if(this.wire.sendAction(\"interop-broker-join-context-group\").catch((e=>{})),this.sessionContextGroupMap.has(e))throw new Error(l.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup);if(t){i.hasEndpointId(t)&&await this.addClientToContextGroup({contextGroupId:e},t);try{const n=this.channel.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name));if(!n.length)throw new Error(`Given Identity ${t.uuid} ${t.name} is not connected to the Interop Broker.`);n.length>1&&console.warn(`More than one connection found for identity ${t.uuid} ${t.name}`);const i=[];for(const t of n)i.push(this.addClientToContextGroup({contextGroupId:e},t));await Promise.all(i)}catch(e){throw new Error(e)}}else await this.addClientToContextGroup({contextGroupId:e},n)}async addClientToContextGroup({contextGroupId:e},t){this.wire.sendAction(\"interop-broker-add-client-to-context-group\").catch((e=>{}));const n=this.getClientState(t);if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(!this.getContextGroups().find((t=>t.id===e)))throw new Error(`Attempting to join a context group that does not exist: ${e}. You may only join existing context groups.`);if(n.contextGroupId!==e){n.contextGroupId=e,await this.setCurrentContextGroupInClientOptions(t,e);const i=this.contextGroupsById.get(e);for(const[,e]of n.contextHandlers){const{contextType:n,handlerId:r}=e;if(void 0===n)i.forEach(((e,n)=>{this.invokeContextHandler(t,r,e)}));else if(i.has(n)){const e=i.get(n);e&&this.invokeContextHandler(t,r,e)}}}}async removeFromContextGroup({target:e},t){if(this.wire.sendAction(\"interop-broker-remove-from-context-group\").catch((e=>{})),e){i.hasEndpointId(e)&&await this.removeClientFromContextGroup(e);try{const t=this.channel.connections.filter((t=>t.uuid===e.uuid&&t.name===e.name));if(!t.length)throw new Error(`No connection found for given Identity ${e.uuid} ${e.name}`);t.length>1&&console.warn(`More than one connection found for identity ${e.uuid} ${e.name}`);const n=[];for(const e of t)n.push(this.removeClientFromContextGroup(e));await Promise.all(n)}catch(e){throw new Error(e)}}else await this.removeClientFromContextGroup(t)}async removeClientFromContextGroup(e){this.wire.sendAction(\"interop-broker-remove-client-from-context-group\").catch((e=>{}));const t=this.getClientState(e);t&&(t.contextGroupId=void 0),await this.setCurrentContextGroupInClientOptions(e,null)}getContextGroups(){return this.wire.sendAction(\"interop-broker-get-context-groups\").catch((e=>{})),o(this,t,\"f\").map((e=>({...e})))}getInfoForContextGroup({contextGroupId:e}){return this.wire.sendAction(\"interop-broker-get-info-for-context-group\").catch((e=>{})),this.getContextGroups().find((t=>t.id===e))}getAllClientsInContextGroup({contextGroupId:e}){this.wire.sendAction(\"interop-broker-get-all-clients-in-context-group\").catch((e=>{}));return Array.from(this.interopClients.values()).filter((t=>t.contextGroupId===e)).map((e=>e.clientIdentity))}async handleFiredIntent(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.raiseIntent\",\"InteropBroker.handleFiredIntent\",t,\"interopClient.fireIntent\");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntent)}async setIntentTarget(e,t){this.wire.sendAction(\"interop-broker-set-intent-target\").catch((e=>{}));const n=this.intentClientMap.get(t.name),i=`intent-handler-${e.name}`;if(n){const t=n.get(i);if(t){if(t.pendingIntents.push(e),t.clientIdentity&&t.isReady){const{clientIdentity:e,pendingIntents:n}=t;try{const r=n[n.length-1];await this.invokeIntentHandler(e,i,r),t.pendingIntents=[]}catch(n){console.error(`Error invoking intent handler for client ${e.uuid}/${e.name}/${e.endpointId}`),t.isReady=!1}}}else n.set(i,{isReady:!1,pendingIntents:[e]})}else{this.intentClientMap.set(t.name,new Map);const n=this.intentClientMap.get(t.name);n&&n.set(i,{isReady:!1,pendingIntents:[e]})}}async handleInfoForIntent(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.findIntent\",\"InteropBroker.handleInfoForIntent\",t,\"interopClient.getInfoForIntent\");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntent)}async handleInfoForIntentsByContext(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.findIntentsByContext\",\"InteropBroker.handleInfoForIntentsByContext\",t,\"interopClient.getInfoForIntentsByContext\");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntentsByContext)}async handleFiredIntentForContext(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.raiseIntentForContext\",\"InteropBroker.handleFiredIntentForContext\",t,\"interopClient.fireIntentForContext\");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntentForContext)}async clientDisconnected(e){}async fdc3HandleOpen({app:e,context:t},n){const i=(0,l.generateOverrideWarning)(\"fdc3.open\",\"InteropBroker.fdc3HandleOpen\",n);throw console.warn(i),new Error(l.BROKER_ERRORS.fdc3Open)}async fdc3HandleFindInstances(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.open\",\"InteropBroker.fdc3HandleFindInstances\",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3FindInstances)}async fdc3HandleGetAppMetadata(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.getAppMetadata\",\"InteropBroker.fdc3HandleGetAppMetadata\",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3GetAppMetadata)}async invokeContextHandler(e,t,n){const i=await this.getProvider();try{await i.dispatch(e,t,n)}catch(i){console.error(`Error invoking context handler ${t} for context type ${n.type} in client ${e.uuid}/${e.name}/${e.endpointId}`,i)}}async invokeIntentHandler(e,t,n){const i=await this.getProvider();await i.dispatch(e,t,n)}async fdc3HandleGetInfo(t,n){const{fdc3Version:i}=t;return{fdc3Version:i,...o(this,e,\"f\"),optionalFeatures:{OriginatingAppMetadata:!1,UserChannelMembershipAPIs:!0},appMetadata:{appId:\"\",instanceId:\"\"}}}async getAllClientInfo(){return(await this.getProvider()).getAllClientInfo()}decorateSnapshot(e){return{...e,interopSnapshotDetails:{contextGroupStates:this.getContextGroupStates()}}}applySnapshot(e,t){const n=e?.interopSnapshotDetails?.contextGroupStates;n&&(t?.closeExistingWindows||this.updateExistingClients(n),this.rehydrateContextGroupStates(n))}updateExistingClients(e){this.interopClients.forEach((t=>{const{clientIdentity:n,contextGroupId:r,contextHandlers:o}=t;if(r){const t=e[r];for(const[,e]of Object.entries(t))o.forEach((t=>{const{handlerId:r,contextType:o}=t;i.isContextTypeCompatible(e.type,o)&&this.invokeContextHandler(n,r,e)}))}}))}getContextGroupStates(){return i.toObject(this.contextGroupsById)}rehydrateContextGroupStates(e){const t=Object.entries(e);for(const[e,n]of t){const t=Object.entries(n);for(const[n,i]of t)if(this.contextGroupsById.has(e)){this.contextGroupsById.get(e).set(n,i)}else console.warn(`Attempting to set a context group that isn't in the context group mapping. Skipping context group rehydration for: ${e}`)}}contextHandlerRegistered({contextType:e,handlerId:t},n){const i={contextType:e,handlerId:t},r=this.getClientState(n);if(r?.contextHandlers.set(t,i),r&&r.contextGroupId){const{contextGroupId:i}=r,o=this.contextGroupsById.get(i);if(void 0===e)o.forEach(((e,i)=>{this.invokeContextHandler(n,t,e)}));else if(o.has(e)){const i=o.get(e);i&&this.invokeContextHandler(n,t,i)}}}async intentHandlerRegistered(e,t){const{handlerId:n}=e,i=this.intentClientMap.get(t.name),r=i?.get(n);if(i)if(r){const{pendingIntents:e}=r;r.clientIdentity=t,r.isReady=!0;try{if(e.length>0){const i=e[e.length-1];await this.invokeIntentHandler(t,n,i),r.pendingIntents=[]}}catch(e){console.error(`Error invoking intent handler: ${n} for client ${t.uuid}/${t.name}/${t.endpointId}`)}}else i.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t});else{this.intentClientMap.set(t.name,new Map);const e=this.intentClientMap.get(t.name);e&&e.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t})}}removeContextHandler({handlerId:e},t){const n=this.getClientState(t);n&&n.contextHandlers.delete(e)}handleJoinSessionContextGroup({sessionContextGroupId:e},t){try{if(!e)throw new Error(\"Failed to join session context group: must specify group id.\");const n=this.sessionContextGroupMap.get(e);if(n)n.registerNewClient(t);else{const n=new h.default(this.channel,e);n.registerNewClient(t),this.sessionContextGroupMap.set(e,n)}return{hasConflict:this.contextGroupsById.has(e)}}catch(e){throw new Error(e)}}getClientState(e){return this.interopClients.get(e.endpointId)}static toObject(e){const t=Object.fromEntries(e),n={};return Object.entries(t).forEach((([e,t])=>{const i=Object.fromEntries(t);n[e]=i})),n}static checkContextIntegrity(e){if(!e)return{isValid:!1,reason:\"No context supplied\"};if(\"object\"!=typeof e)return{isValid:!1,reason:\"Context must be an Object\"};if(!e.type)return{isValid:!1,reason:\"Context must have a type property\"};if(e.id&&\"object\"!=typeof e.id)return{isValid:!1,reason:\"Context id must be an Object populated with key-value identifiers (if set)\"};if(e.id){const{id:t}=e,n=Object.keys(t);let i=!1;if(!n.length)return{isValid:!1,reason:\"Context id must have at least one key-value identifier\"};if(n.forEach((e=>{\"string\"==typeof e&&\"string\"==typeof t[e]||(i=!0)})),i)return{isValid:!1,reason:\"Context id key-value identifiers must be of type string\"}}return e.name&&\"string\"!=typeof e.name?{isValid:!1,reason:\"Context name must be of string type (if set)\"}:{isValid:!0}}static hasEndpointId(e){return void 0!==e.endpointId}static isContextTypeCompatible(e,t){return void 0===t||e===t}setContextGroupMap(){for(const e of this.getContextGroups())this.contextGroupsById.set(e.id,new Map)}async setCurrentContextGroupInClientOptions(e,t){try{const n=await this.fin.System.getEntityInfo(e.uuid,e.name);let i;\"view\"===n.entityType?i=await this.fin.View.wrap(e):\"window\"===n.entityType&&(i=await this.fin.Window.wrap(e)),i&&await i.updateOptions({interop:{currentContextGroup:t}})}catch(e){}}async setupChannelProvider(){try{const e=await this.getProvider();this.channel=e,this.wireChannel(e)}catch(e){throw new Error(`Error setting up Interop Broker Channel Provider: ${e}`)}}wireChannel(e){e.onConnection((async(e,t)=>{if(!await this.isConnectionAuthorized(e,t))throw new Error(`Connection not authorized for ${e.uuid}, ${e.name}`);if(!e.endpointId)throw new Error(\"Version too old to be compatible with Interop. Please upgrade your runtime to a more recent version.\");const n={contextGroupId:void 0,contextHandlers:new Map,clientIdentity:e};t?.currentContextGroup&&this.contextGroupsById.has(t.currentContextGroup)&&(n.contextGroupId=t?.currentContextGroup),this.interopClients.set(e.endpointId,n)})),e.onDisconnection((e=>{this.interopClients.delete(e.endpointId);const t=this.intentClientMap.get(e.name);t&&e.uuid===this.fin.me.uuid&&t.forEach((e=>{e.isReady=!1})),this.sessionContextGroupMap.forEach((t=>{t.onDisconnection(e)})),this.clientDisconnected(e)})),e.beforeAction((async(e,t,n)=>{if(!await this.isActionAuthorized(e,t,n))throw new Error(`Action (${e}) not authorized for ${n.uuid}, ${n.name}`);this.logging?.beforeAction?.enabled&&console.log(e,t,n)})),e.afterAction(((e,t,n)=>{this.logging?.afterAction?.enabled&&console.log(e,t,n)})),e.register(\"setContext\",this.setContext.bind(this)),e.register(\"fireIntent\",this.handleFiredIntent.bind(this)),e.register(\"getCurrentContext\",this.getCurrentContext.bind(this)),e.register(\"getInfoForIntent\",this.handleInfoForIntent.bind(this)),e.register(\"getInfoForIntentsByContext\",this.handleInfoForIntentsByContext.bind(this)),e.register(\"fireIntentForContext\",this.handleFiredIntentForContext.bind(this)),e.register(\"getContextGroups\",this.getContextGroups.bind(this)),e.register(\"joinContextGroup\",this.joinContextGroup.bind(this)),e.register(\"removeFromContextGroup\",this.removeFromContextGroup.bind(this)),e.register(\"getAllClientsInContextGroup\",this.getAllClientsInContextGroup.bind(this)),e.register(\"getInfoForContextGroup\",this.getInfoForContextGroup.bind(this)),e.register(\"contextHandlerRegistered\",this.contextHandlerRegistered.bind(this)),e.register(\"intentHandlerRegistered\",this.intentHandlerRegistered.bind(this)),e.register(\"removeContextHandler\",this.removeContextHandler.bind(this)),e.register(\"sessionContextGroup:createIfNeeded\",this.handleJoinSessionContextGroup.bind(this)),e.register(\"fdc3Open\",this.fdc3HandleOpen.bind(this)),e.register(\"fdc3v2FindIntentsByContext\",this.handleInfoForIntentsByContext.bind(this)),e.register(\"fdc3FindInstances\",this.fdc3HandleFindInstances.bind(this)),e.register(\"fdc3GetAppMetadata\",this.fdc3HandleGetAppMetadata.bind(this)),e.register(\"fdc3v2GetInfo\",(async(e,t)=>this.fdc3HandleGetInfo.bind(this)(e,t))),e.register(\"createPrivateChannelProvider\",(async e=>{const{channelId:t}=e,n=await this.fin.InterApplicationBus.Channel.create(t);p.PrivateChannelProvider.init(n,t)}))}isConnectionAuthorized(e,t){return this.wire.sendAction(\"interop-broker-is-connection-authorized\").catch((e=>{})),Promise.resolve(!0)}isActionAuthorized(e,t,n){return this.wire.sendAction(\"interop-broker-is-action-authorized\").catch((e=>{})),Promise.resolve(!0)}};return Gi.InteropBroker=f,e=new WeakMap,t=new WeakMap,n=new WeakMap,Gi}var zi,Ki={},qi={},Ji=s&&s.__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},Yi=s&&s.__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)};Object.defineProperty(qi,\"__esModule\",{value:!0});const Zi=d,Qi=Hi;class Xi extends Zi.Base{constructor(e,t,n){super(e),zi.set(this,void 0),this.id=n,Ji(this,zi,t,\"f\")}async setContext(e){this.wire.sendAction(\"interop-session-context-group-set-context\").catch((e=>{}));return(await Yi(this,zi,\"f\")).dispatch(`sessionContextGroup:setContext-${this.id}`,{sessionContextGroupId:this.id,context:e})}async getCurrentContext(e){this.wire.sendAction(\"interop-session-context-group-get-context\").catch((e=>{}));return(await Yi(this,zi,\"f\")).dispatch(`sessionContextGroup:getContext-${this.id}`,{sessionContextGroupId:this.id,type:e})}async addContextHandler(e,t){if(this.wire.sendAction(\"interop-session-context-group-add-handler\").catch((e=>{})),\"function\"!=typeof e)throw new Error(\"Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.\");const n=await Yi(this,zi,\"f\");let i;return i=t?`sessionContextHandler:invoke-${this.id}-${t}-${(0,Qi.generateId)()}`:`sessionContextHandler:invoke-${this.id}`,n.register(i,(0,Qi.wrapContextHandler)(e,i)),await n.dispatch(`sessionContextGroup:handlerAdded-${this.id}`,{handlerId:i,contextType:t}),{unsubscribe:await this.createUnsubscribeCb(i)}}async createUnsubscribeCb(e){const t=await Yi(this,zi,\"f\");return async()=>{t.remove(e),await t.dispatch(`sessionContextGroup:handlerRemoved-${this.id}`,{handlerId:e})}}getUserInstance(){return{id:this.id,setContext:(0,Qi.wrapInTryCatch)(this.setContext.bind(this),\"Failed to set context: \"),getCurrentContext:(0,Qi.wrapInTryCatch)(this.getCurrentContext.bind(this),\"Failed to get context: \"),addContextHandler:(0,Qi.wrapInTryCatch)(this.addContextHandler.bind(this),\"Failed to add context handler: \")}}}qi.default=Xi,zi=new WeakMap;var er={},tr={},nr={},ir={},rr=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),or=s&&s.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,\"default\",{enumerable:!0,value:t})}:function(e,t){e.default=t}),sr=s&&s.__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)&&rr(t,e,n);return or(t,e),t};Object.defineProperty(ir,\"__esModule\",{value:!0}),ir.PrivateChannelClient=void 0;const ar=sr(Hi);var cr,dr;function hr(){if(cr)return tr;cr=1;var e,t=s&&s.__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)},n=s&&s.__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},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(tr,\"__esModule\",{value:!0}),tr.FDC3ModuleBase=void 0;const o=nr,a=Hi,c=wr(),d=r(i);return tr.FDC3ModuleBase=class{get client(){return t(this,e,\"f\").call(this)}get fin(){return this.wire.getFin()}constructor(t,i){this.wire=i,e.set(this,void 0),n(this,e,t,\"f\")}async broadcast(e){return this.wire.sendAction(\"fdc3-broadcast\").catch((e=>{})),this.client.setContext(e)}async _open(e,t){this.wire.sendAction(\"fdc3-open\").catch((e=>{}));try{return await c.InteropClient.ferryFdc3Call(this.client,\"fdc3Open\",{app:e,context:t})}catch(e){const t=e.message===a.BROKER_ERRORS.fdc3Open?\"ResolverUnavailable\":e.message;throw new Error(t)}}async _getChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:\"system\",...(0,o.getUnsupportedChannelApis)()})))}async getOrCreateChannel(e){this.wire.sendAction(\"fdc3-get-or-create-channel\").catch((e=>{}));const t=(await this._getChannels()).find((t=>t.id===e));if(t)return{...t,type:\"system\",...(0,o.getUnsupportedChannelApis)()};try{const t=await this.client.joinSessionContextGroup(e);return(0,o.buildAppChannelObject)(t)}catch(e){throw console.error(e.message),new Error(o.ChannelError.CreationFailed)}}async getSystemChannels(){return this.wire.sendAction(\"fdc3-get-system-channels\").catch((e=>{})),this._getChannels()}async joinChannel(e){this.wire.sendAction(\"fdc3-join-channel\").catch((e=>{}));try{return await this.client.joinContextGroup(e)}catch(e){if(e.message===a.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup?console.error(\"The Channel you have tried to join is an App Channel. Custom Channels can only be defined by the Interop Broker through code or manifest configuration. Please use getOrCreateChannel.\"):console.error(e.message),e.message.startsWith(\"Attempting to join a context group that does not exist\"))throw new Error(o.ChannelError.NoChannelFound);throw new Error(o.ChannelError.AccessDenied)}}async getCurrentChannel(){this.wire.sendAction(\"fdc3-get-current-channel\").catch((e=>{}));const e=await this.getCurrentContextGroupInfo();return e?this.buildChannelObject(e):null}async leaveCurrentChannel(){return this.wire.sendAction(\"fdc3-leave-current-channel\").catch((e=>{})),this.client.removeFromContextGroup()}async getCurrentContextGroupInfo(){const e=await this.client.getContextGroups(),t=e.map((async e=>this.client.getAllClientsInContextGroup(e.id))),n=(await Promise.all(t)).findIndex((e=>e.some((e=>{const{uuid:t,name:n}=e;return this.wire.me.uuid===t&&this.wire.me.name===n}))));return e[n]}async buildChannelObject(e){return{...e,type:\"system\",addContextListener:(...[e,t])=>{let n,i;\"function\"==typeof e?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),n=e):(n=t,\"string\"==typeof e&&(i=e));const r=(async()=>{let e=!0;const t=await this.client.getCurrentContext(i);return this.client.addContextHandler(((i,r)=>{if(!e||(e=!1,!(0,d.default)(t,i)))return n(i,r)}),i)})();return{...r,unsubscribe:()=>r.then((e=>e.unsubscribe()))}},broadcast:this.broadcast.bind(this),getCurrentContext:async e=>{const t=await this.client.getCurrentContext(e);return void 0===t?null:t}}}},e=new WeakMap,tr}ir.PrivateChannelClient=class{constructor(e,t){this.id=t,this.client=e,this.listeners=new Map}async broadcast(e){return this.client.dispatch(\"broadcast\",{context:e})}async getCurrentContext(e){return this.client.dispatch(\"getCurrentContext\",{contextType:e})}async addContextListener(e,t){if(\"function\"!=typeof t)throw new Error(\"Non-function argument passed to the second parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.\");let n;n=e?`contextHandler:invoke-${this.id}-${e}-${ar.generateId()}`:`contextHandler:invoke-${this.id}-${ar.generateId()}`,this.client.register(n,ar.wrapContextHandler(t,n));const i={unsubscribe:await this.createContextUnsubscribeCb(n)};return this.listeners.set(n,i),await this.client.dispatch(\"contextHandlerAdded\",{handlerId:n,contextType:e}),i}createNonStandardUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch(\"nonStandardHandlerRemoved\",{handlerId:e})}}createContextUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch(\"contextHandlerRemoved\",{handlerId:e})}}onAddContextListener(e){const t=`onContextHandlerAdded:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch(\"onAddContextHandlerAdded\",{handlerId:t}),n}onDisconnect(e){const t=`onDisconnect:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch(\"onDisconnectHandlerAdded\",{handlerId:t}),n}onUnsubscribe(e){const t=`onUnsubscribe:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch(\"onUnsubscribeHandlerAdded\",{handlerId:t}),n}async cleanUpAllSubs(){Array.from(this.listeners.keys()).forEach((e=>{this.client.remove(e),this.listeners.delete(e)}))}async disconnect(){try{await this.client.dispatch(\"clientDisconnecting\"),await this.cleanUpAllSubs(),await this.client.disconnect()}catch(e){throw new Error(e.message)}}},function(e){var t=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,\"__esModule\",{value:!0}),e.getIntentResolution=e.isChannel=e.isContext=e.connectPrivateChannel=e.buildAppChannelObject=e.buildPrivateChannelObject=e.ChannelError=e.ResultError=e.UnsupportedChannelApiError=e.getUnsupportedChannelApis=void 0;const n=Hi,r=ir,o=t(i);e.getUnsupportedChannelApis=e=>({addContextListener:()=>{throw new a(\"Channel.addContextListener\",e)},broadcast:()=>{throw new a(\"Channel.broadcast\",e)},getCurrentContext:()=>{throw new a(\"Channel.getCurrentContext\",e)}});class a extends Error{constructor(e,t=\"System\"){super(e),this.message=`Calling ${e} on an instance of a ${t} Channel returned by fdc3.get${t}Channels is not supported. If you would like to use a ${t} Channel, please use fdc3.joinChannel, fdc3.addContextListener, and fdc3.broadcast instead.`}}var c,d;e.UnsupportedChannelApiError=a,function(e){e.NoResultReturned=\"NoResultReturned\",e.IntentHandlerRejected=\"IntentHandlerRejected\"}(c=e.ResultError||(e.ResultError={})),(d=e.ChannelError||(e.ChannelError={})).NoChannelFound=\"NoChannelFound\",d.AccessDenied=\"AccessDenied\",d.CreationFailed=\"CreationFailed\";e.buildPrivateChannelObject=e=>{let t=!1;const n=()=>{if(t)throw new Error(\"Private Channel Client has been disconnected from the Private Channel\")};return{id:e.id,type:\"private\",broadcast:async t=>(n(),e.broadcast(t)),getCurrentContext:async t=>(n(),e.getCurrentContext(t)),addContextListener:async(t,i)=>{n();let r=i,o=t;\"function\"==typeof t&&(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),r=t,o=null);return e.addContextListener(o,r)},onAddContextListener:t=>(n(),e.onAddContextListener(t)),disconnect:async()=>(n(),t=!0,e.disconnect()),onDisconnect:t=>(n(),e.onDisconnect(t)),onUnsubscribe:t=>(n(),e.onUnsubscribe(t))}};e.buildAppChannelObject=e=>({id:e.id,type:\"app\",broadcast:e.setContext,getCurrentContext:async t=>{const n=await e.getCurrentContext(t);return void 0===n?null:n},addContextListener:(t,n)=>{let i,r;\"function\"==typeof t?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),i=t):(i=n,\"string\"==typeof t&&(r=t));const s=(async()=>{let t=!0;const n=await e.getCurrentContext(r);return e.addContextHandler(((e,r)=>{if(!t||(t=!1,!(0,o.default)(n,e)))return i(e,r)}),r)})();return{...s,unsubscribe:()=>s.then((e=>e.unsubscribe()))}}});e.connectPrivateChannel=async t=>{try{const n=await fin.InterApplicationBus.Channel.connect(t),i=new r.PrivateChannelClient(n,t);return(0,e.buildPrivateChannelObject)(i)}catch(e){throw new Error(`Private Channel with id: ${t} doesn't exist`)}};e.isContext=e=>{if(e&&\"object\"==typeof e&&\"type\"in e){const{type:t}=e;return\"string\"==typeof t}return!1};e.isChannel=e=>{if(e&&\"object\"==typeof e&&\"type\"in e&&\"id\"in e){const{type:t,id:n}=e;return\"string\"==typeof t&&\"string\"==typeof n&&(\"app\"===t||\"private\"===t)}return!1};e.getIntentResolution=async(t,i,r,o)=>{const s=(0,n.generateId)(),a=new Promise(((e,t)=>{fin.InterApplicationBus.subscribe({uuid:\"*\"},s,(t=>{e(t)})).catch((()=>t(new Error(\"getResult is not supported in this environment\"))))})),d=r?{target:r,intentResolutionResultId:s}:{intentResolutionResultId:s},h=o?{name:o,context:i,metadata:d}:{...i,metadata:d},l=async()=>{let n=await a;if(!n||\"object\"!=typeof n)throw new Error(c.NoResultReturned);const{error:i}=n;if(i)throw new Error(c.IntentHandlerRejected);if((0,e.isChannel)(n)){const{id:i,type:r}=n;switch(r){case\"private\":n=await(0,e.connectPrivateChannel)(i);break;case\"app\":{const r=await t.joinSessionContextGroup(i);n=(0,e.buildAppChannelObject)(r);break}}}else if(!(0,e.isContext)(n))throw new Error(c.NoResultReturned);return n},u=o?await t.fireIntent(h):await t.fireIntentForContext(h);return\"object\"!=typeof u?{source:{appId:\"\",instanceId:\"\"},intent:\"\",version:\"2.0\",getResult:l}:{...u,getResult:l}}}(nr);var lr,ur,pr={};function wr(){if(ur)return Ki;ur=1;var e,t,n=s&&s.__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},i=s&&s.__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)},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ki,\"__esModule\",{value:!0}),Ki.InteropClient=void 0;const o=d,a=r(qi),c=function(){if(dr)return er;dr=1,Object.defineProperty(er,\"__esModule\",{value:!0}),er.Fdc3Module=void 0;const e=Hi,t=hr();class n extends t.FDC3ModuleBase{async open(e,t){await super._open(e,t)}addContextListener(e,t){let n;return this.wire.sendAction(\"fdc3-add-context-listener\").catch((e=>{})),\"function\"==typeof e?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),n=this.client.addContextHandler(e)):n=this.client.addContextHandler(t,null===e?void 0:e),{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}addIntentListener(e,t){this.wire.sendAction(\"fdc3-add-intent-listener\").catch((e=>{}));const n=this.client.registerIntentHandler((e=>{const{context:n,metadata:i}=e,{metadata:r}=n,o=i?.intentResolutionResultId||r?.intentResolutionResultId;o&&this.fin.InterApplicationBus.publish(o,null).catch((()=>null)),t(e.context)}),e,{fdc3Version:\"1.2\"});return{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}async raiseIntent(t,n,i){this.wire.sendAction(\"fdc3-raise-intent\").catch((e=>{}));const r=i?{name:t,context:n,metadata:{target:i}}:{name:t,context:n};try{return await this.client.fireIntent(r)}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntent?\"ResolverUnavailable\":t.message;throw new Error(n)}}async findIntent(t,n){this.wire.sendAction(\"fdc3-find-intent\").catch((e=>{}));try{return await this.client.getInfoForIntent({name:t,context:n})}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntent?\"ResolverUnavailable\":t.message;throw new Error(n)}}async findIntentsByContext(t){this.wire.sendAction(\"fdc3-find-intents-by-context\").catch((e=>{}));try{return await this.client.getInfoForIntentsByContext(t)}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntentsByContext?\"ResolverUnavailable\":t.message;throw new Error(n)}}async raiseIntentForContext(t,n){this.wire.sendAction(\"fdc3-raise-intent-for-context\").catch((e=>{}));try{return await this.client.fireIntentForContext({...t,metadata:{target:n}})}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntentForContext?\"ResolverUnavailable\":t.message;throw new Error(n)}}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}getInfo(){return this.wire.sendAction(\"fdc3-get-info\").catch((e=>{})),{providerVersion:this.wire.environment.getAdapterVersionSync(),provider:`openfin-${this.wire.me.uuid}`,fdc3Version:\"1.2\"}}}return er.Fdc3Module=n,er}(),h=function(){if(lr)return pr;lr=1,Object.defineProperty(pr,\"__esModule\",{value:!0}),pr.Fdc3Module2=void 0;const e=hr(),t=Hi,n=wr(),i=nr,r=ir;class o extends e.FDC3ModuleBase{async open(e,t){return\"string\"==typeof e&&console.warn(\"Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).\"),super._open(e,t)}async findInstances(e){this.wire.sendAction(\"fdc3-find-instances\").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,\"fdc3FindInstances\",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3FindInstances?\"ResolverUnavailable\":e.message;throw new Error(n)}}async getAppMetadata(e){this.wire.sendAction(\"fdc3-get-app-metadata\").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,\"fdc3GetAppMetadata\",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3GetAppMetadata?\"ResolverUnavailable\":e.message;throw new Error(n)}}async addContextListener(e,t){this.wire.sendAction(\"fdc3-add-context-listener\").catch((e=>{}));const n=e=>t=>{const{contextMetadata:n,...i}=t,r=n?[{...i},n]:[t,null];e(...r)};let i=t,r=n(i);return\"function\"==typeof e?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),i=e,r=n(i),this.client.addContextHandler(r)):this.client.addContextHandler(r,null===e?void 0:e)}async findIntent(e,n,i){this.wire.sendAction(\"fdc3-find-intent\").catch((e=>{}));try{return await this.client.getInfoForIntent({name:e,context:n,metadata:{resultType:i}})}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntent?\"ResolverUnavailable\":e.message;throw new Error(n)}}async findIntentsByContext(e,i){this.wire.sendAction(\"fdc3-find-intents-by-context\").catch((e=>{}));const r=i?{context:e,metadata:{resultType:i}}:e;try{return await n.InteropClient.ferryFdc3Call(this.client,\"fdc3v2FindIntentsByContext\",r)}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntentsByContext?\"ResolverUnavailable\":e.message;throw new Error(n)}}async raiseIntent(e,n,r){this.wire.sendAction(\"fdc3-raise-intent\").catch((e=>{}));try{return\"string\"==typeof r&&console.warn(\"Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).\"),(0,i.getIntentResolution)(this.client,n,r,e)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?\"ResolverUnavailable\":e.message;throw new Error(n)}}async raiseIntentForContext(e,n){this.wire.sendAction(\"fdc3-raise-intent-for-context\").catch((e=>{}));try{return\"string\"==typeof n&&console.warn(\"Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).\"),(0,i.getIntentResolution)(this.client,e,n)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?\"ResolverUnavailable\":e.message;throw new Error(n)}}async addIntentListener(e,t){if(this.wire.sendAction(\"fdc3-add-intent-listener\").catch((e=>{})),\"string\"!=typeof e)throw new Error(\"First argument must be an Intent name\");return this.client.registerIntentHandler((async e=>{let n,i;const{context:r,metadata:o}=e,{contextMetadata:s,metadata:a,...c}=r,d=o?.intentResolutionResultId||a?.intentResolutionResultId;try{const e=a?{metadata:a,...c}:{...c};n=await t(e,s),i=n}catch(e){n=e,i={error:!0}}if(d&&this.fin.InterApplicationBus.publish(d,i).catch((()=>null)),n instanceof Error)throw new Error(n.message);return n}),e,{fdc3Version:\"2.0\"})}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}async createPrivateChannel(){const e=(0,t.generateId)();await n.InteropClient.ferryFdc3Call(this.client,\"createPrivateChannelProvider\",{channelId:e});const o=await this.fin.InterApplicationBus.Channel.connect(e),s=new r.PrivateChannelClient(o,e);return(0,i.buildPrivateChannelObject)(s)}async getUserChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:\"user\",...(0,i.getUnsupportedChannelApis)(\"User\")})))}async getSystemChannels(){return console.warn(\"This API has been deprecated. Please use fdc3.getUserChannels instead.\"),super.getSystemChannels()}async joinUserChannel(e){return super.joinChannel(e)}async joinChannel(e){return console.warn(\"This API has been deprecated. Please use fdc3.joinUserChannel instead.\"),super.joinChannel(e)}async getCurrentChannel(){const e=await super.getCurrentChannel();return e?{...e,type:\"user\",broadcast:this.broadcast.bind(this)}:null}async getInfo(){return n.InteropClient.ferryFdc3Call(this.client,\"fdc3v2GetInfo\",{fdc3Version:\"2.0\"})}}return pr.Fdc3Module2=o,pr}(),l=Hi;let u=class extends o.Base{constructor(i,r){super(i),e.set(this,void 0),t.set(this,void 0),n(this,t,new Map,\"f\"),n(this,e,r,\"f\")}async setContext(t){this.wire.sendAction(\"interop-client-set-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"setContext\",{context:t})}async addContextHandler(t,n){if(this.wire.sendAction(\"interop-client-add-context-handler\").catch((e=>{})),\"function\"!=typeof t)throw new Error(\"Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.\");const r=await i(this,e,\"f\");let o;o=n?`invokeContextHandler-${n}-${(0,l.generateId)()}`:\"invokeContextHandler\";const s=(0,l.wrapContextHandler)(t,o);return r.register(o,s),await r.dispatch(\"contextHandlerRegistered\",{handlerId:o,contextType:n}),{unsubscribe:async()=>{r.remove(o),await r.dispatch(\"removeContextHandler\",{handlerId:o})}}}async getContextGroups(){this.wire.sendAction(\"interop-client-get-context-groups\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getContextGroups\")}async joinContextGroup(t,n){this.wire.sendAction(\"interop-client-join-context-group\").catch((e=>{}));const r=await i(this,e,\"f\");if(!t)throw new Error(\"No contextGroupId specified for joinContextGroup.\");return r.dispatch(\"joinContextGroup\",{contextGroupId:t,target:n})}async removeFromContextGroup(t){this.wire.sendAction(\"interop-client-remove-from-context-group\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"removeFromContextGroup\",{target:t})}async getAllClientsInContextGroup(t){this.wire.sendAction(\"interop-client-get-all-clients-in-context-group\").catch((e=>{}));const n=await i(this,e,\"f\");if(!t)throw new Error(\"No contextGroupId specified for getAllClientsInContextGroup.\");return n.dispatch(\"getAllClientsInContextGroup\",{contextGroupId:t})}async getInfoForContextGroup(t){this.wire.sendAction(\"interop-client-get-info-for-context-group\").catch((e=>{}));const n=await i(this,e,\"f\");if(!t)throw new Error(\"No contextGroupId specified for getInfoForContextGroup.\");return n.dispatch(\"getInfoForContextGroup\",{contextGroupId:t})}async fireIntent(t){this.wire.sendAction(\"interop-client-fire-intent\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"fireIntent\",t)}async registerIntentHandler(t,n,r){this.wire.sendAction(\"interop-client-register-intent-handler\").catch((e=>{}));const o=await i(this,e,\"f\"),s=`intent-handler-${n}`,a=(0,l.wrapIntentHandler)(t,s);try{await o.register(s,a),await o.dispatch(\"intentHandlerRegistered\",{handlerId:s,...r})}catch(e){throw new Error(\"Unable to register intent handler\")}return{unsubscribe:async()=>{o.remove(s)}}}async getCurrentContext(t){this.wire.sendAction(\"interop-client-get-current-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getCurrentContext\",{contextType:t})}async getInfoForIntent(t){this.wire.sendAction(\"interop-client-get-info-for-intent\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getInfoForIntent\",t)}async getInfoForIntentsByContext(t){this.wire.sendAction(\"interop-client-get-info-for-intents-by-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getInfoForIntentsByContext\",t)}async fireIntentForContext(t){this.wire.sendAction(\"interop-client-fire-intent-for-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"fireIntentForContext\",t)}async joinSessionContextGroup(n){try{const r=i(this,t,\"f\").get(n);if(r)return r.getUserInstance();const o=await i(this,e,\"f\"),{hasConflict:s}=await o.dispatch(\"sessionContextGroup:createIfNeeded\",{sessionContextGroupId:n});s&&console.warn(`A (non-session) context group with the name \"${n}\" already exists. If you are trying to join a Context Group, call joinContextGroup instead.`);const c=new a.default(this.wire,i(this,e,\"f\"),n);return i(this,t,\"f\").set(n,c),c.getUserInstance()}catch(e){throw console.error(`Error thrown trying to create Session Context Group with id \"${n}\": ${e}`),e}}async onDisconnection(t){this.wire.sendAction(\"interop-client-add-ondisconnection-listener\").catch((e=>{}));return(await i(this,e,\"f\")).onDisconnection((e=>{const{uuid:n}=e;t({type:\"interop-broker\",topic:\"disconnected\",brokerName:n})}))}getFDC3Sync(e){switch(e){case\"1.2\":return new c.Fdc3Module((()=>this),this.wire);case\"2.0\":return new h.Fdc3Module2((()=>this),this.wire);default:throw new Error(`Invalid FDC3 version provided: ${e}. Must be '1.2' or '2.0'`)}}async getFDC3(e){return this.getFDC3Sync(e)}static async ferryFdc3Call(t,n,r){return(await i(t,e,\"f\")).dispatch(n,r||null)}};return Ki.InteropClient=u,e=new WeakMap,t=new WeakMap,Ki}var yr,fr,gr,mr={};function vr(){if(yr)return mr;yr=1,Object.defineProperty(mr,\"__esModule\",{value:!0}),mr.overrideCheck=mr.checkFDC32Overrides=mr.getDefaultViewFdc3VersionFromAppInfo=void 0;const e=Vi();function t(t){return[\"fdc3HandleFindInstances\",\"handleInfoForIntent\",\"handleInfoForIntentsByContext\",\"fdc3HandleGetAppMetadata\",\"fdc3HandleGetInfo\",\"fdc3HandleOpen\",\"handleFiredIntent\",\"handleFiredIntentForContext\"].filter((n=>t[n]===e.InteropBroker.prototype[n]))}return mr.getDefaultViewFdc3VersionFromAppInfo=function({manifest:e,initialOptions:t}){const n=e?.platform?.defaultViewOptions?.fdc3InteropApi??t.defaultViewOptions?.fdc3InteropApi;return[\"1.2\",\"2.0\"].includes(n??\"\")?n:void 0},mr.checkFDC32Overrides=t,mr.overrideCheck=function(e,n){if(n&&\"2.0\"===n){const n=t(e);n.length>0&&console.warn(`WARNING: FDC3 2.0 has been set as a default option for Views in this Platform, but the required InteropBroker APIs for FDC3 2.0 compliance have not all been overridden.\\nThe following APIs need to be overridden:\\n${n.join(\"\\n\")}`)}},mr}function Cr(){return gr||(gr=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),i=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),i(function(){if(fr)return Ti;fr=1;var e=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ti,\"__esModule\",{value:!0}),Ti.InteropModule=void 0;const t=e(n),i=$i,r=d,o=Vi(),a=wr(),c=vr(),h=Tn,l=e=>new e,u=\"You have attempted to use or modify InteropBroker parameters, which is not allowed. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.\";class p extends r.Base{async init(e,n=l){this.wire.sendAction(\"interop-init\").catch((()=>{}));const r=await this.wire.environment.getInteropInfo(this.wire.getFin()),s=(0,i.createUnusableObject)(u),a=(0,i.createWarningObject)(u,(0,t.default)(r)),d=async()=>{throw new Error(u)},p=o.InteropBroker.createClosedConstructor(this.wire,(()=>this.fin.InterApplicationBus.Channel.create(`interop-broker-${e}`)),r);let w;return w=Array.isArray(n)?new((0,h.overrideFromComposables)(...n)(p))(s,d,a):await n(p,s,d,a),(0,c.overrideCheck)(w,r.fdc3Version),w}connectSync(e,t){return this.wire.sendAction(\"interop-connect-sync\").catch((()=>{})),new a.InteropClient(this.wire,this.wire.environment.whenReady().then((()=>this.fin.InterApplicationBus.Channel.connect(`interop-broker-${e}`,{payload:t}))))}}return Ti.InteropModule=p,Ti}(),e),i(wr(),e),i(Vi(),e)}(Li)),Li}var br={},Ir={},Er={},xr={};Object.defineProperty(xr,\"__esModule\",{value:!0}),xr.getSnapshotSourceChannelName=void 0;xr.getSnapshotSourceChannelName=e=>`snapshot-source-provider-${e.uuid}`;var Ar,Pr,Mr,_r,Or,Sr=s&&s.__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},Rr=s&&s.__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)};Object.defineProperty(Er,\"__esModule\",{value:!0}),Er.SnapshotSource=void 0;const Fr=d,jr=xr,kr=new Map;class Lr extends Fr.Base{constructor(e,t){super(e),Ar.set(this,void 0),Pr.set(this,(()=>(kr.has(this.identity.uuid)||kr.set(this.identity.uuid,{eventFired:null,clientPromise:null}),kr.get(this.identity.uuid)))),Mr.set(this,(()=>(Rr(this,Pr,\"f\").call(this).clientPromise||(Rr(this,Pr,\"f\").call(this).clientPromise=Rr(this,_r,\"f\").call(this)),Rr(this,Pr,\"f\").call(this).clientPromise))),_r.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);try{Rr(this,Pr,\"f\").call(this).eventFired||await Rr(this,Or,\"f\").call(this);const t=await this.fin.InterApplicationBus.Channel.connect(e,{wait:!1});return t.onDisconnection((()=>{Rr(this,Pr,\"f\").call(this).clientPromise=null,Rr(this,Pr,\"f\").call(this).eventFired=null})),t}catch(e){throw Rr(this,Pr,\"f\").call(this).clientPromise=null,new Error(\"The targeted SnapshotSource is not currently initialized. Await this object's ready() method.\")}})),Or.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);let t,n;const i=new Promise(((e,i)=>{t=e,n=i}));Rr(this,Pr,\"f\").call(this).eventFired=i;const r=async i=>{try{i.channelName===e&&(t(),await this.fin.InterApplicationBus.Channel.removeListener(\"connected\",r))}catch(e){n(e)}};await this.fin.InterApplicationBus.Channel.on(\"connected\",r)})),Sr(this,Ar,t,\"f\")}get identity(){return Rr(this,Ar,\"f\")}async ready(){this.wire.sendAction(\"snapshot-source-ready\").catch((e=>{}));try{await Rr(this,Mr,\"f\").call(this)}catch(e){await Rr(this,Pr,\"f\").call(this).eventFired}}async getSnapshot(){this.wire.sendAction(\"snapshot-source-get-snapshot\").catch((e=>{}));const e=await Rr(this,Mr,\"f\").call(this),t=await e.dispatch(\"get-snapshot\");return(await t).snapshot}async applySnapshot(e){this.wire.sendAction(\"snapshot-source-apply-snapshot\").catch((e=>{}));return(await Rr(this,Mr,\"f\").call(this)).dispatch(\"apply-snapshot\",{snapshot:e})}}Er.SnapshotSource=Lr,Ar=new WeakMap,Pr=new WeakMap,Mr=new WeakMap,_r=new WeakMap,Or=new WeakMap,Object.defineProperty(Ir,\"__esModule\",{value:!0}),Ir.SnapshotSourceModule=void 0;const Tr=d,$r=Er,Br=xr;class Gr extends Tr.Base{async init(e){if(this.wire.sendAction(\"snapshot-source-init\").catch((e=>{})),\"object\"!=typeof e||\"function\"!=typeof e.getSnapshot||\"function\"!=typeof e.applySnapshot)throw new Error(\"you must pass in a valid SnapshotProvider\");const t=await this.fin.InterApplicationBus.Channel.create((0,Br.getSnapshotSourceChannelName)(this.fin.me));t.register(\"get-snapshot\",(async()=>({snapshot:await e.getSnapshot()}))),t.register(\"apply-snapshot\",(({snapshot:t})=>e.applySnapshot(t)))}wrapSync(e){return this.wire.sendAction(\"snapshot-source-wrap-sync\").catch((e=>{})),new $r.SnapshotSource(this.wire,e)}async wrap(e){return this.wire.sendAction(\"snapshot-source-wrap\").catch((e=>{})),this.wrapSync(e)}}Ir.SnapshotSourceModule=Gr,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Ir,e),n(Er,e)}(br),Object.defineProperty(a,\"__esModule\",{value:!0});var Wr=a.Fin=void 0;const Hr=t,Nr=c,Dr=ie(),Ur=Z(),Vr=de,zr=en,Kr=rn,qr=un,Jr=bn,Yr=J(),Zr=An,Qr=ki,Xr=Cr(),eo=br;class to extends Hr.EventEmitter{constructor(e){super(),this.wire=e,this.System=new Nr.System(e),this.Window=new Dr._WindowModule(e),this.Application=new Ur.ApplicationModule(e),this.InterApplicationBus=new Vr.InterApplicationBus(e),this.Clipboard=new zr.Clipboard(e),this.ExternalApplication=new Kr.ExternalApplicationModule(e),this.Frame=new qr._FrameModule(e),this.GlobalHotkey=new Jr.GlobalHotkey(e),this.Platform=new Zr.PlatformModule(e,this.InterApplicationBus.Channel),this.View=new Yr.ViewModule(e),this.Interop=new Xr.InteropModule(e),this.SnapshotSource=new eo.SnapshotSourceModule(e),e.registerFin(this),this.me=(0,Qr.getMe)(e),e.on(\"disconnected\",(()=>{this.emit(\"disconnected\")}))}}Wr=a.Fin=to;var no={},io={};function ro(e){return\"string\"==typeof e.manifestUrl}function oo(e){return ao(e)&&\"string\"==typeof e.address}function so(e){return oo(e)&&\"string\"==typeof e.token}function ao(e){return\"string\"==typeof e.uuid}function co(e){return e.runtime&&\"string\"==typeof e.runtime.version}function ho(e){return ao(e)&&co(e)}Object.defineProperty(io,\"__esModule\",{value:!0}),io.isInternalConnectConfig=io.isPortDiscoveryConfig=io.isNewConnectConfig=io.isConfigWithReceiver=io.isRemoteConfig=io.isExistingConnectConfig=io.isExternalConfig=void 0,io.isExternalConfig=ro,io.isExistingConnectConfig=oo,io.isRemoteConfig=so,io.isConfigWithReceiver=function(e){return\"object\"==typeof e.receiver&&so({...e,address:\"\"})},io.isNewConnectConfig=ho,io.isPortDiscoveryConfig=function(e){return ro(e)&&co(e)||ho(e)},io.isInternalConnectConfig=function(e){return oo(e)||ho(e)};var lo={},uo={};Object.defineProperty(uo,\"__esModule\",{value:!0}),uo.EmitterMap=void 0;const po=t;function wo(e){return Buffer.from(e).toString(\"base64\")}uo.EmitterMap=class{constructor(){this.storage=new Map}hashKeys(e){return e.map(wo).join(\"/\")}getOrCreate(e){const t=this.hashKeys(e);return this.storage.has(t)||this.storage.set(t,new po.EventEmitter),this.storage.get(t)}has(e){return this.storage.has(this.hashKeys(e))}delete(e){const t=this.hashKeys(e);return this.storage.delete(t)}},Object.defineProperty(lo,\"__esModule\",{value:!0});const yo=uo;class fo extends yo.EmitterMap{constructor(){super(...arguments),this.dispatchEvent=e=>{if(function(e){return\"process-desktop-event\"===e.action}(e)){const{payload:t}=e,n=function(e){const{topic:t}=e;if(\"frame\"===t||\"window\"===t||\"view\"===t){const{uuid:n,name:i}=e;return[t,n,i]}if(\"application\"===t){const{uuid:n}=e;return[t,n]}return[t]}(t);if(this.has(n))return this.getOrCreate(n).emit(t.type,t),!0}return!1}}}lo.default=fo;var go,mo,vo=s&&s.__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},Co=s&&s.__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)},bo=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(no,\"__esModule\",{value:!0});var Io=no.Transport=void 0;const Eo=t,xo=io,Ao=g,Po=bo(lo),Mo=ki,_o=ke;class Oo extends Eo.EventEmitter{constructor(e,t,n){super(),this.wireListeners=new Map,this.topicRefMap=new Map,this.eventAggregator=new Po.default,this.messageHandlers=[this.eventAggregator.dispatchEvent],go.set(this,void 0),mo.set(this,void 0),this.connectSync=()=>{Co(this,go,\"f\").connectSync()},this.getPort=()=>Co(this,go,\"f\").getPort(),vo(this,go,new e(this.onmessage.bind(this)),\"f\"),this.environment=t,this.sendRaw=Co(this,go,\"f\").send.bind(Co(this,go,\"f\")),this.registerMessageHandler(this.handleMessage.bind(this)),Co(this,go,\"f\").on(\"disconnected\",(()=>{for(const[,{handleNack:e}]of this.wireListeners)e({reason:\"Remote connection has closed\"});this.wireListeners.clear(),this.emit(\"disconnected\")}));const{uuid:i,name:r}=n,o=this.environment.getCurrentEntityType();this.me=(0,Mo.getBaseMe)(o,i,r)}getFin(){if(!Co(this,mo,\"f\"))throw new Error(\"No Fin object registered for this transport\");return Co(this,mo,\"f\")}registerFin(e){if(Co(this,mo,\"f\"))throw new Error(\"Fin object has already been registered for this transport\");vo(this,mo,e,\"f\")}shutdown(){return Co(this,go,\"f\").shutdown()}async connect(e){if((0,xo.isConfigWithReceiver)(e))return await Co(this,go,\"f\").connect(e.receiver),this.authorize(e);if((0,xo.isRemoteConfig)(e))return this.connectRemote(e);if((0,xo.isExistingConnectConfig)(e))return this.connectByPort(e);if((0,xo.isNewConnectConfig)(e)){const t=await this.environment.retrievePort(e);return this.connectByPort({...e,address:`ws://localhost:${t}`})}}async connectRemote(e){return await Co(this,go,\"f\").connect(new(this.environment.getWsConstructor())(e.address)),this.authorize(e)}async connectByPort(e){const{address:t,uuid:n}=e,i={...e,type:\"file-token\"},r=Co(this,go,\"f\");await r.connect(new(this.environment.getWsConstructor())(e.address));const o=await this.sendAction(\"request-external-authorization\",{uuid:n,type:\"file-token\"},!0);if(\"external-authorization-response\"!==o.action)throw new Ao.UnexpectedActionError(o.action);return await this.environment.writeToken(o.payload.file,o.payload.token),this.authorize(i)}async authorize(e){const t=await this.sendAction(\"request-authorization\",e,!0);if(\"authorization-response\"!==t.action)throw new Ao.UnexpectedActionError(t.action);if(!0!==t.payload.success)throw new Ao.RuntimeError(t.payload)}sendAction(e,t={},n=!1){let i=()=>{};const r=Ao.RuntimeError.getCallSite(1),o=this.environment.getNextMessageId(),s=new Promise(((s,a)=>{i=a;const c={action:e,payload:t,messageId:o},d=Co(this,go,\"f\");return this.addWireListener(o,s,(e=>this.nackHandler(e,a,r)),n),d.send(c).catch(a)}));return Object.assign(s,{cancel:i,messageId:o})}nackHandler(e,t,n){t(\"string\"==typeof e?e:new Ao.RuntimeError(e,n))}ferryAction(e){return new Promise(((t,n)=>{const i=this.environment.getNextMessageId();e.messageId=i;const r=e=>{t(e.payload)};return Co(this,go,\"f\").send(e).then((()=>this.addWireListener(i,r,(e=>this.nackHandler(e,n)),!1))).catch(n)}))}registerMessageHandler(e){this.messageHandlers.push(e)}addWireListener(e,t,n,i){i?this.uncorrelatedListener=t:this.wireListeners.has(e)?n({reason:\"Duplicate handler id\",error:(0,_o.errorToPOJO)(new Ao.DuplicateCorrelationError(String(e)))}):this.wireListeners.set(e,{resolve:t,handleNack:n})}onmessage(e){for(const t of this.messageHandlers)t.call(null,e)}handleMessage(e){const t=e.correlationId||NaN;if(\"correlationId\"in e){if(!this.wireListeners.has(t))return!1;{const{resolve:n,handleNack:i}=this.wireListeners.get(t);\"ack\"!==e.action?i({reason:\"Did not receive ack action\",error:(0,_o.errorToPOJO)(new Ao.NoAckError(e.action))}):\"payload\"in e?e.payload.success?n.call(null,e):i(e.payload):\"string\"==typeof e.reason?i(e):(console.warn(\"Received invalid response from core\",e),i({reason:\"invalid response shape\"})),this.wireListeners.delete(t)}}else this.uncorrelatedListener&&this.uncorrelatedListener.call(null,e),this.uncorrelatedListener=()=>{};return!0}}Io=no.Transport=Oo,go=new WeakMap,mo=new WeakMap;const So=(...e)=>({log:(...t)=>console.debug(`[${(new Date).toISOString()}]`,...(e=>e.map((e=>`[${e}]`)))(e),...t),getLogger:(...t)=>So(...e,...t)}),Ro=So(\"@openfin/core-web/client\");function Fo(e,t){if(!function(e){return\"string\"==typeof e}(e))throw new Error(`Property ${t} has invalid type. Expected string, got ${typeof e}.`)}const jo=\"web-broker-ports-ready\",ko=Ro.getLogger(\"get-web-interop-ports\");function Lo(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)}function To(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}\"function\"==typeof SuppressedError&&SuppressedError;const $o=e=>{var n,i,r;return r=class extends t.EventEmitter{constructor(t){super(),n.set(this,void 0),i.set(this,!1),this.connectSync=()=>{Lo(this,i,\"f\")||(e.addEventListener(\"message\",(e=>{e.data?.topic?.startsWith(\"wire-message\")&&e.data.message&&Lo(this,n,\"f\").call(this,{...JSON.parse(e.data.message),ports:e.ports})})),e.start())},this.connect=async()=>{this.connectSync()},this.send=t=>(e.postMessage({topic:\"wire-message\",message:JSON.stringify(t)}),Promise.resolve()),this.shutdown=async()=>{e.close()},To(this,n,t,\"f\")}getPort(){return e}},n=new WeakMap,i=new WeakMap,r};var Bo={},Go={};Object.defineProperty(Go,\"__esModule\",{value:!0}),Go.BaseEnvironment=void 0;const Wo=vr();Go.BaseEnvironment=class{async getViewWindowIdentity(e,t){const{identity:n}=await e.View.wrapSync(t).getCurrentWindow();return n}async getInteropInfo(e){const t=await e.Application.getCurrentSync().getInfo().catch((()=>null)),n=t?.initialOptions?.interopBrokerConfiguration??{};return{fdc3Version:t?(0,Wo.getDefaultViewFdc3VersionFromAppInfo)(t):void 0,...n,fdc3Info:{providerVersion:await e.System.getVersion(),provider:\"OpenFin\"}}}},Object.defineProperty(Bo,\"__esModule\",{value:!0});var Ho=Bo.BrowserEnvironment=void 0;const No=Go;class Do extends No.BaseEnvironment{constructor(){super(...arguments),this.type=\"other\",this.getRandomId=()=>{const e=new Uint32Array(1);return window.crypto.getRandomValues(e)[0].toString(32)}}getAdapterVersionSync(){return\"\"}observeBounds(e,t){throw new Error(\"Method not implemented.\")}layoutAllowedInContext(e){return!1}initLayoutManager(e,t,n){throw new Error(\"Method not implemented.\")}applyLayoutSnapshot(e,t,n){throw new Error(\"Method not implemented.\")}createLayout(e,t){throw new Error(\"Method not implemented.\")}destroyLayout(e,t){throw new Error(\"Method not implemented.\")}resolveLayout(e,t){throw new Error(\"Method not implemented.\")}initPlatform(...e){throw new Error(\"Method not implemented.\")}writeToken(e,t){return Promise.resolve(\"\")}retrievePort(e){throw new Error(\"Method not implemented.\")}getNextMessageId(){return this.getRandomId()}createChildContent(e){throw new Error(\"Method not implemented.\")}getWebWindow(e){throw new Error(\"Method not implemented.\")}getCurrentEntityIdentity(){throw new Error(\"Method not implemented.\")}getCurrentEntityType(){return\"external connection\"}raiseEvent(e,t){throw new Error(\"Method not implemented.\")}getUrl(){return location.href}getDefaultChannelOptions(){return{create:{},connect:{}}}getRtcPeer(){return new RTCPeerConnection}getWsConstructor(){return WebSocket}whenReady(){return Promise.resolve()}}Ho=Bo.BrowserEnvironment=Do;const Uo=e=>\"platform\"in e&&void 0!==e.platform;var Vo,zo;class Ko extends Ho{constructor(e){super(),this.connectConfig=e,Vo.set(this,void 0),zo.set(this,new W((async()=>Promise.resolve().then((function(){return require(\"./main-b14f67c9.js\")}))))),Uo(e)&&this.validatePlatformOptions(e)}getAdapterVersionSync(){return\"0.39.21\"}validatePlatformOptions({platform:e}){if(!(\"layoutSnapshot\"in e))throw new Error(\"Platform options are missing layoutSnapshot. Please provide a layoutSnapshot in the platform options.\");if(\"windows\"in e||\"windows\"in e.layoutSnapshot)throw new Error(\"It appears you tried to call connect() with a snapshot object from an OpenFin desktop environment. Note that connect() expects to be called with a platform property with this structure: { platform: { layoutSnapshot } }. To get a layoutSnapshot of the expected structure, use fin.Platform.Layout.getCurrentLayoutManagerSync().getLayoutSnapshot() in v34+ in your desktop environment.\");const{layouts:t}=e.layoutSnapshot;Object.entries(t).map((([e,t])=>{if(\"object\"!=typeof t||null===t)throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must be an object.`);if(!(\"content\"in t))throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must contain a 'content' property.`)}))}async getInteropInfo(e){return{...{contextGroups:void 0,logging:{beforeAction:{enabled:!1},afterAction:{enabled:!1}}},fdc3Version:void 0,fdc3Info:{providerVersion:\"0.39.21\",provider:\"OpenFin Web\"}}}layoutAllowedInContext(e){return!0}async initLayoutManager(e,t,n){if(Lo(this,Vo,\"f\"))throw new Error(\"Layout already initialized.\");if(!Uo(this.connectConfig))throw new Error(\"Platform options are missing from connection config.\");const{WebLayoutEntryPoint:i}=await Lo(this,zo,\"f\").getValue();return To(this,Vo,new i(this.connectConfig),\"f\"),await Lo(this,Vo,\"f\").initLayoutManager(e,t,n)}async applyLayoutSnapshot(e,t,n){Lo(this,Vo,\"f\")?.applyLayoutSnapshot(e,t,n)}async createLayout(e,t){return Lo(this,Vo,\"f\")?.createLayout(e,t)}async destroyLayout(e,t){return Lo(this,Vo,\"f\")?.destroyLayout(e,t)}async getViewWindowIdentity(e,t){return Promise.resolve({uuid:t.uuid,name:t.uuid})}}Vo=new WeakMap,zo=new WeakMap;const qo=()=>{const e=((e,t)=>{const n=new RegExp(`^${t}<(?.*)>$`).exec(e)?.groups?.meta;if(n)try{return JSON.parse(atob(n))}catch(e){throw new Error(`Failed to decode JSON from ${n}.`)}})(window.name,\"of-frame\");if(e)try{const{name:t,uuid:n,brokerUrl:i,providerId:r,contextGroup:o}=e;return Fo(i,\"brokerUrl\"),Fo(n,\"uuid\"),Fo(t,\"name\"),{identity:{name:t,uuid:n},brokerUrl:i,interopConfig:{providerId:r,currentContextGroup:o}}}catch(e){throw new Error(`Unexpected error occurred when inferring platform information: ${e.stack}`)}},Jo=()=>{const e=r.v4();return{uuid:e,name:e}},Yo=async e=>{if(\"enabled\"===e.connectionInheritance){const t=await(async e=>{const t=qo();if(t){const{validateOptions:n=(()=>!0)}=e,{identity:i,...r}=t;if(!await n(r))throw new Error(\"Parent options were rejected by validateOptions.\");return t}})(e);if(t)return t}if(!e.options){const t=\"enabled\"===e.connectionInheritance?\"Broker URL was not specified nor provided by a platform container.\":\"Connection inheritance is disabled but no options were provided.\";throw new Error(t)}return{...e.options,identity:Jo()}};exports.__classPrivateFieldGet=Lo,exports.__classPrivateFieldSet=To,exports.apiExposer=Gn,exports.commonjsGlobal=s,exports.connect=async t=>{try{Ro.log(\"Establishing connection\",t);const{brokerUrl:n,identity:i,timeout:r,interopConfig:s}=await Yo(t),{workerPort:a,iframeBrokerPort:c}=await(async(e,t,n)=>{const{origin:i}=new URL(e),r=document.createElement(\"IFRAME\");let s;r.style.display=\"none\";try{return await new Promise(((a,c)=>{const d=e=>{if(e.source===r.contentWindow&&e.data?.topic===`ack-${jo}`){if(e.origin!==i)c(new Error(`Broker redirected to unexpected origin ${e.origin}, expected ${i}.`));else if(e.data.success){const[t,n]=e.ports;a({iframeBrokerPort:t,workerPort:n})}else c(new m(e.data));window.removeEventListener(\"message\",d),clearTimeout(s)}};window.addEventListener(\"message\",d),ko.log(`Connecting to broker ${e}`),r.setAttribute(\"src\",e),r.setAttribute(\"name\",o(t,\"of-broker\")),document.body.appendChild(r),ko.log(\"Iframe loaded, awaiting init message from iframe\"),n&&(s=setTimeout((()=>{window.removeEventListener(\"message\",d),document.body.removeChild(r),c(new Error(\"Worker did not initialize in time\"))}),n))}))}catch(e){throw new Error(`Failed to initialise Fin Web Client. ${e.message}`,{cause:e})}})(n,i,r);Ro.log(\"Successfully established connection to shared worker\");const d={entityType:\"external connection\",...i};a.start(),c.start();const h=((t,n,i)=>{const r=$o(n),o=new Ko(t),s=new Io(r,o,i);return s.connectSync(),window.Buffer=e.Buffer,new Wr(s)})(t,a,d);return s?.providerId&&(h.me.interop=h.Interop.connectSync(s.providerId),s?.currentContextGroup&&h.me.interop.joinContextGroup(s.currentContextGroup).catch((e=>{console.warn(`Error joining specified context group: ${s?.currentContextGroup}, continuing`,e)}))),{...h,me:{...h.me,identity:{uuid:h.me.uuid,name:h.me.name}}}}catch(e){throw new Error(`An error occured during web-interop connection: ${e.message}`)}},exports.decorators=Nn,exports.encodeOptions=o,exports.layout_constants=ai,exports.lazy=G;\n","\"use strict\";var t=require(\"./main-8cad4070.js\"),e=require(\"uuid\");require(\"buffer/\"),require(\"events\"),require(\"lodash/cloneDeep\"),require(\"lodash/isEqual\");var i={},n={};Object.defineProperty(n,\"__esModule\",{value:!0}),n.mapValuesAsync=n.mapEntriesAsync=void 0;const o=(t,[e,i])=>({...t,[e]:i});async function s(t,e){return(await Promise.all(e.map((async([e,i])=>[e,await t(i,e)])))).reduce(o,{})}n.mapEntriesAsync=s,n.mapValuesAsync=async function(t,e){let i;return i=e instanceof Map?[...e.entries()]:Object.entries(e),s(t,i)};var r,a,l,h,d=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldSet||function(t,e,i,n,o){if(\"m\"===n)throw new TypeError(\"Private method is not writable\");if(\"a\"===n&&!o)throw new TypeError(\"Private accessor was defined without a setter\");if(\"function\"==typeof e?t!==e||!o:!e.has(t))throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");return\"a\"===n?o.call(t,i):o?o.value=i:e.set(t,i),i},c=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldGet||function(t,e,i,n){if(\"a\"===i&&!n)throw new TypeError(\"Private accessor was defined without a getter\");if(\"function\"==typeof e?t!==e||!n:!e.has(t))throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");return\"m\"===i?n:\"a\"===i?n.call(t):n?n.value:e.get(t)};Object.defineProperty(i,\"__esModule\",{value:!0});var m=i.DefaultLayoutManager=void 0;const u=n;class p{constructor(t){a.set(this,void 0),l.set(this,new Map),d(this,a,t,\"f\")}size(){return c(this,l,\"f\").size}async applyLayoutSnapshot({layouts:t}){if(Object.keys(t).length>1)throw new Error(\"[LayoutManager] Tried to call applyLayoutSnapshot with more than 1 layout. When implementing multiple layouts via overridden LayoutManager class, you must override and fully implement the applyLayoutSnapshot method without calling super.applyLayoutSnapshot().\");const[[e,i]]=Object.entries(t);await p.createLayout(this,{layoutName:e,layout:i})}async showLayout({layoutName:t}){}async getLayoutSnapshot(){return{layouts:await(0,u.mapValuesAsync)((t=>t.getFrameSnapshot()),c(this,l,\"f\"))}}async removeLayout({layoutName:t}){}getLayoutIdentityForView(t){const e=[...c(this,l,\"f\").values()].find((e=>e.getCurrentViews().some((e=>e.name===t.name&&e.uuid===t.uuid))));return e?.identity??void 0}isLayoutVisible({layoutName:t}){return c(p,r,\"m\",h).call(p,this,t).isVisible()}resolveLayoutIdentity(t){if(t&&\"layoutName\"in t)return t;const e=[...c(this,l,\"f\").values()];if(1===e.length)return e[0].identity;const i=e.find((t=>t.isVisible()));return i?.identity??void 0}static async resolveLayout(t,e){const i=t.resolveLayoutIdentity(e);if(void 0===i||!(\"layoutName\"in i))throw new Error(\"[layout-manager] resolveLayout: Could not resolve the layout identity. Make sure you include 'layoutName' in the identity object.\");return c(p,r,\"m\",h).call(p,t,i.layoutName)}static async handleSharedView(t,e,i){await(0,u.mapValuesAsync)((async t=>{if(t.identity.layoutName!==e.layoutName){const e=t.getCurrentViews().find((t=>t.name===i.name));e&&await t.onViewDetached({viewIdentity:e,target:null}).catch(console.error)}}),c(t,l,\"f\"))}static async handleLastViewRemoved(t,e){await t.removeLayout(e),await c(t,a,\"f\").handleLastViewRemoved(t)}static async destroyLayout(t,{layoutName:e}){await c(p,r,\"m\",h).call(p,t,e).destroy(),c(t,l,\"f\").delete(e)}static async createLayout(t,e){const{layoutName:i}=e;if(c(t,l,\"f\").has(i))throw new Error(`Layout name ${i} already exists`);await c(t,a,\"f\").createLayout(e,t)}static registerLayout(t,e,i){c(t,l,\"f\").set(e,i)}static getAllLayouts(t){return[...c(t,l,\"f\").values()]}static setInitialSnapshot(t,e){c(t,a,\"f\").setInitialSnapshot(e)}static createClosedConstructor(...t){return class extends p{constructor(){super(...t)}}}}m=i.DefaultLayoutManager=p,r=p,a=new WeakMap,l=new WeakMap,h=function(t,e){const i=c(t,l,\"f\").get(e);if(!i)throw new Error(`[layout-manager] getLayoutByName: Could not locate layout with name '${e}'`);return i};var g={},f={},v={};Object.defineProperty(v,\"__esModule\",{value:!0}),v.ReversibleMap=void 0;v.ReversibleMap=class{constructor(){this.valueToKey=new Map,this.keyToValue=new Map,this.setUnique=(t,e)=>{if(this.hasKey(t)||this.hasValue(e))throw new Error(\"Key or value already in the map.\");this.keyToValue.set(t,e),this.valueToKey.set(e,t)},this.getKey=t=>{const e=this.valueToKey.get(t);if(!e)throw new Error(\"Value not found in the map.\");return e},this.deleteKey=t=>{const e=this.getValue(t);return this.keyToValue.delete(t),this.valueToKey.delete(e),e},this.deleteValue=t=>{const e=this.getKey(t);return this.keyToValue.delete(e),this.valueToKey.delete(t),e},this.hasKey=t=>this.keyToValue.has(t),this.hasValue=t=>this.valueToKey.has(t)}getValue(t){const e=this.keyToValue.get(t);if(!e)throw new Error(\"Key not found in the map.\");return e}},Object.defineProperty(f,\"__esModule\",{value:!0});var _=f.LayoutContentCache=void 0;const y=t.lazy,C=v;class w{constructor(){this.contentItemCache=new C.ReversibleMap,this.contentItemCacheId=0,this.createCacheKey=()=>{const t=`entity-${this.contentItemCacheId.toString()}`;return this.contentItemCacheId+=1,t},this.hasKey=t=>this.contentItemCache.hasKey(t),this.getItemOrUndefined=t=>{try{return this.getContentItemOrThrow(t)}catch(t){return}},this.getContentItemOrThrow=(t,e)=>{if(!this.contentItemCache.hasKey(t))throw new Error(\"Layout component has been destroyed or detached from the current layout.\");const i=this.contentItemCache.getValue(t);if(e&&!e.includes(i.type))throw new Error(`Layout item is not the expected type. Expected ${e.join(\", \")}, got ${i.type}.`);return i},this.getOrCreateEntityId=t=>{if(this.contentItemCache.hasValue(t))return this.contentItemCache.getKey(t);t.onDestroyed((()=>{this.contentItemCache.deleteValue(t)}));const e=this.createCacheKey();return this.contentItemCache.setUnique(e,t),e}}static getSingleInstance(){return w.singleton.getValue()}}_=f.LayoutContentCache=w,w.singleton=new y.Lazy((()=>new w));var I={},b={};!function(t){Object.defineProperty(t,\"__esModule\",{value:!0}),t.getAdjacentStacks=t.doShareEdge=t.getAdjacentItem=void 0;t.getAdjacentItem=(e,i)=>{const{parent:n}=e;if(e.isRoot()||!n)return;const o=[\"top\",\"bottom\"].includes(i)?\"column\":\"row\",s=[\"top\",\"left\"].includes(i)?-1:1;if(n.type===o){const t=n.contentItems.indexOf(e)+s;if(t>=0&&t{const n=t.getBounds(),o=e.getBounds();if(!n||!o)return!1;if([\"top\",\"bottom\"].includes(i)){return!(n.righto.right)}return!(n.bottomo.bottom)};t.getAdjacentStacks=(e,i)=>{const n=[\"top\",\"bottom\"].includes(i)?\"row\":\"column\",o=s=>\"stack\"===s.type?(0,t.doShareEdge)(e,s,i)?[s]:[]:\"root\"===s.type||\"ground\"===s.type?[]:s.type===n?s.contentItems.map((t=>o(t))).flat():s.type!==n?[\"top\",\"right\"].includes(i)?o(s.contentItems[s.contentItems.length-1]):o(s.contentItems[0]):[],s=(0,t.getAdjacentItem)(e,i);return s?o(s):[]}}(b);var S=t.commonjsGlobal&&t.commonjsGlobal.__decorate||function(t,e,i,n){var o,s=arguments.length,r=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if(\"object\"==typeof Reflect&&\"function\"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(s<3?o(r):s>3?o(e,i,r):o(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};Object.defineProperty(I,\"__esModule\",{value:!0}),I.LayoutEntitiesController=void 0;const E=t.decorators,x=b,L=i;class z{constructor(t,e,i){this.wire=t,this.layoutManager=e,this.layoutContentCache=i,this.analytics=t=>{this.wire.sendAction(`layout-controller-${t}`).catch((()=>{}))},this.getLayoutIdentityForViewOrThrow=async t=>{const e=this.layoutManager.getLayoutIdentityForView(t);if(!e)throw new Error(`View identity ${t.name} is not attached to any layouts.`);return e},this.getRoot=async t=>{this.analytics(\"get-root\");const e=(await this.getLayout(t)).getRoot();return{type:e.type,entityId:this.layoutContentCache.getOrCreateEntityId(e)}},this.getStackByView=async t=>{this.analytics(\"get-stack-by-view\");const e=await this.getLayoutIdentityForViewOrThrow(t),i=(await this.getLayout(e)).getStackByView(t);if(\"stack\"===i?.type)return{entityId:this.layoutContentCache.getOrCreateEntityId(i),type:\"stack\"}},this.getStackViews=t=>{this.analytics(\"get-stack-views\");return this.layoutContentCache.getContentItemOrThrow(t,[\"stack\"]).contentItems.map((t=>({name:t.viewName,uuid:this.wire.me.uuid})))},this.isRoot=t=>{this.analytics(\"is-root\");return this.layoutContentCache.getContentItemOrThrow(t).isRoot()},this.exists=t=>(this.analytics(\"exists\"),this.layoutContentCache.hasKey(t)),this.addViewToStack=async(t,e,{index:i}={index:0})=>{this.analytics(\"add-view-to-stack\");const n=this.layoutContentCache.getContentItemOrThrow(t);if(i&&i>n.contentItems.length+1)throw new Error(`Index '${i}' out of range, please exclude the index or specify a number between 0 and ${n.contentItems.length}`);const o={id:t,index:i},{identity:s}=await n.layout.platformCreateView(e,{location:o});return s},this.findViewInStack=(t,e)=>t.contentItems.find((t=>t.viewName===e.name)),this.removeViewFromStack=async(t,e)=>{this.analytics(\"remove-view-from-stack\");const i=this.layoutContentCache.getContentItemOrThrow(t,[\"stack\"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to remove a view ('${e.name}') which does not belong to the stack.`);await n.layout.platformCloseView(e)},this.createAdjacentStack=async(t,e,{position:i=\"right\"}={})=>{if(this.analytics(\"create-adjacent-stack\"),!Array.isArray(e)||0===e.length)throw new Error('The parameter \"views\" must be an array with at least 1 element.');if(![\"top\",\"bottom\",\"left\",\"right\"].includes(i))throw new Error(`Invalid position '${i}' specified.`);const n=this.layoutContentCache.getContentItemOrThrow(t).createAdjacentStack({position:i}),o=this.layoutContentCache.getOrCreateEntityId(n);return await Promise.all(e.reverse().map((t=>this.addViewToStack(o,t)))),o},this.getAdjacentStacks=async({targetId:t,edge:e})=>{this.analytics(\"get-adjacent-stacks\");const i=this.layoutContentCache.getContentItemOrThrow(t);return(0,x.getAdjacentStacks)(i,e).map((t=>({entityId:this.layoutContentCache.getOrCreateEntityId(t)})))},this.setStackActiveView=async(t,e)=>{this.analytics(\"set-stack-active-view\");const i=this.layoutContentCache.getContentItemOrThrow(t,[\"stack\"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to set a view ('${e.name}') as active when it does not belong to the stack.`);i.setActiveContentItem(n,!0)}}async getLayout(t){const e=await L.DefaultLayoutManager.resolveLayout(this.layoutManager,t);if(!e)throw new Error(`Could not resolve target layout identity ${JSON.stringify(t)}`);return e}getContent(t){this.analytics(\"get-content\");return this.layoutContentCache.getContentItemOrThrow(t,[\"column\",\"row\"]).contentItems.map((t=>({type:t.type,entityId:this.layoutContentCache.getOrCreateEntityId(t)})))}getParent(t){this.analytics(\"get-parent\");const e=this.layoutContentCache.getContentItemOrThrow(t);if(!e.isRoot())return e.parent?.contentItems.includes(e)?{type:e.parent.type,entityId:this.layoutContentCache.getOrCreateEntityId(e.parent)}:void 0}}S([(0,E.expose)()],z.prototype,\"getLayoutIdentityForViewOrThrow\",void 0),S([(0,E.expose)()],z.prototype,\"getRoot\",void 0),S([(0,E.expose)()],z.prototype,\"getStackByView\",void 0),S([(0,E.expose)()],z.prototype,\"getStackViews\",void 0),S([(0,E.expose)()],z.prototype,\"getContent\",null),S([(0,E.expose)()],z.prototype,\"getParent\",null),S([(0,E.expose)()],z.prototype,\"isRoot\",void 0),S([(0,E.expose)()],z.prototype,\"exists\",void 0),S([(0,E.expose)()],z.prototype,\"addViewToStack\",void 0),S([(0,E.expose)()],z.prototype,\"removeViewFromStack\",void 0),S([(0,E.expose)()],z.prototype,\"createAdjacentStack\",void 0),S([(0,E.expose)()],z.prototype,\"getAdjacentStacks\",void 0),S([(0,E.expose)()],z.prototype,\"setStackActiveView\",void 0),I.LayoutEntitiesController=z,Object.defineProperty(g,\"__esModule\",{value:!0});var M=g.initLayoutEndpoints=void 0;const P=t.apiExposer,T=t.layout_constants,A=f,k=I,D=i;M=g.initLayoutEndpoints=async function(t,e){const i=t.getFin(),n=await i.Platform.getCurrentSync().getClient(),o=new P.ChannelsExposer(n);await new P.ApiExposer(o).exposeInstance(new k.LayoutEntitiesController(t,e,A.LayoutContentCache.getSingleInstance()),{id:T.LAYOUT_CONTROLLER_ID}),await async function(t,e){const i=t=>async i=>{const n=await D.DefaultLayoutManager.resolveLayout(e,i.target);if(!n)throw new Error(`Could not resolve the layout target from payload ${JSON.stringify(i)}`);return t(n,i)},n=(e,n)=>{t.register(e,i(n))},o=(t,e)=>{n(t,e)};n(\"replace-view\",((t,e)=>t.replaceView(e))),n(\"replace-layout\",((t,{layout:e})=>t.replaceLayout(e))),n(\"add-view\",((t,e)=>t.insertView(e))),o(\"layout-add-view\",((t,{viewOptions:e,location:i,targetView:n})=>t.platformCreateView(e,{location:i,targetView:n}))),n(\"close-view\",((t,e)=>t.cleanupView(e.viewIdentity))),o(\"layout-close-view\",((t,e)=>t.platformCloseView(e.viewIdentity))),n(\"apply-preset-layout\",((t,e)=>t.applyPreset(e))),n(\"get-layout-views\",(t=>t.getCurrentViews())),n(\"get-frame-snapshot\",(t=>t.getFrameSnapshot())),n(\"is-visible\",(t=>t.isVisible())),n(\"destroy\",(t=>t.destroy())),t.register(\"get-layout-snapshot\",(()=>e.getLayoutSnapshot()))}(n,e)};var R={};Object.defineProperty(R,\"__esModule\",{value:!0});var U=R.BaseLayout=void 0;U=R.BaseLayout=class{};var O={};Object.defineProperty(O,\"__esModule\",{value:!0});var V=O.DOMEmitter=void 0;V=O.DOMEmitter=class{constructor(t){this.container=t}dispatchLocalEvent(t,e){const i={...e,type:t,tabSelector:`tab-${e.name}`,containerSelector:`container-${e.name}`,topic:\"openfin-DOM-event\"};this.container.dispatchEvent(new CustomEvent(t,{detail:i}))}};var B={};Object.defineProperty(B,\"__esModule\",{value:!0});var H=B.mapLayoutContentItemsImmutableSync=B.mapLayoutContentItemsImmutable=W=B.isVisible=void 0;var W=B.isVisible=t=>(0!==t.offsetWidth||0!==t.offsetHeight)&&\"hidden\"!==window.getComputedStyle(t).visibility&&t.offsetTop>=0&&t.offsetLeft>=0&&t.offsetTop<=window.innerHeight&&t.offsetLeft<=window.innerWidth;const F=t=>\"type\"in t&&\"component\"===t.type;B.mapLayoutContentItemsImmutable=async function t(e,i){return F(i)?e(i):{...i,content:await Promise.all(i.content?.map((i=>t(e,i))))}},H=B.mapLayoutContentItemsImmutableSync=function t(e,i){return F(i)?e(i):{...i,content:i.content?.map((i=>t(e,i)))}};class N extends Error{constructor(t,e){super(e),this.type=t}}class G extends N{constructor(t,e){super(\"Configuration\",t),this.node=e}}class j extends N{constructor(t){super(\"PopoutBlocked\",t)}}class $ extends N{constructor(t){super(\"API\",t)}}class Z extends N{constructor(t){super(\"Bind\",t)}}class q extends Error{constructor(t,e,i){super(`${t}: ${e}${void 0===i?\"\":\": \"+i}`)}}class X extends q{constructor(t,e){super(\"Assert\",t,e)}}class Y extends q{constructor(t,e,i){super(\"UnreachableCase\",t,`${e}${void 0===i?\"\":\": \"+i}`)}}class K extends q{constructor(t,e){super(\"UnexpectedNull\",t,e)}}class J extends q{constructor(t,e){super(\"UnexpectedUndefined\",t,e)}}var Q;!function(t){let e=!1;const i={PopoutCannotBeCreatedWithGroundItemConfig:{id:0,default:\"Popout cannot be created with ground ItemConfig\"},PleaseRegisterAConstructorFunction:{id:1,default:\"Please register a constructor function\"},ComponentTypeNotRegisteredAndBindComponentEventHandlerNotAssigned:{id:2,default:\"Component type not registered and BindComponentEvent handler not assigned\"},ComponentIsAlreadyRegistered:{id:3,default:\"Component is already registered\"},ComponentIsNotVirtuable:{id:4,default:\"Component is not virtuable. Requires rootHtmlElement field/getter\"},VirtualComponentDoesNotHaveRootHtmlElement:{id:5,default:'Virtual component does not have getter \"rootHtmlElement\"'},ItemConfigIsNotTypeComponent:{id:6,default:\"ItemConfig is not of type component\"},InvalidNumberPartInSizeString:{id:7,default:\"Invalid number part in size string\"},UnknownUnitInSizeString:{id:8,default:\"Unknown unit in size string\"},UnsupportedUnitInSizeString:{id:9,default:\"Unsupported unit in size string\"}};t.idCount=Object.keys(i).length;const n=Object.values(i);t.checkInitialise=function(){if(!e)for(let e=0;e=\"0\"&&t<=\"9\"}function Tt(t,e){const i=zt(e);t.style.width=i}function At(t,e){const i=zt(e);t.style.height=i}function kt(t){return{width:t.offsetWidth,height:t.offsetHeight}}function Dt(t,e){t.style.display=e?\"\":\"none\"}function Rt(t,e){if(void 0!==e)for(const i in e)if(e.hasOwnProperty(i)){const n=e[i],o=t[i];t[i]=Ut(o,n)}return t}function Ut(t,e){if(\"object\"!=typeof e)return e;if(Array.isArray(e)){const t=e.length,i=new Array(t);for(let n=0;n36)throw new Error(\"Too many keys in config minifier map\")},t.translateObject=n}(dt||(dt={})),function(t){t.defaults={type:at.ground,content:[],size:1,sizeUnit:ht.Fractional,minSize:void 0,minSizeUnit:ht.Pixel,id:\"\",isClosable:!0},t.createCopy=function(t,e){switch(t.type){case at.ground:case at.row:case at.column:return gt.createCopy(t,e);case at.stack:return ut.createCopy(t,e);case at.component:return pt.createCopy(t);default:throw new Y(\"CICC91354\",t.type,\"Invalid Config Item type specified\")}},t.createDefault=function(t){switch(t){case at.ground:throw new X(\"CICCDR91562\");case at.row:case at.column:return gt.createDefault(t);case at.stack:return ut.createDefault();case at.component:return pt.createDefault();default:throw new Y(\"CICCDD91563\",t,\"Invalid Config Item type specified\")}},t.isComponentItem=function(t){return t.type===at.component},t.isStackItem=function(t){return t.type===at.stack},t.isGroundItem=function(t){return t.type===at.ground}}(ct||(ct={})),function(t){t.defaultMaximised=!1,function(t){t.createCopy=function(t,e){return void 0===t?void 0:{show:null!=e?e:t.show,popout:t.popout,close:t.close,maximise:t.maximise,minimise:t.minimise,tabDropdown:t.tabDropdown}}}(t.Header||(t.Header={}))}(mt||(mt={})),function(t){function e(t){const e=t.length,i=new Array(e);for(let n=0;n\"__glMaximised\"===t));t>0&&(o=!0,n=n.splice(t,1)),e=n.length>0?n[0]:ct.defaults.id}else e=n;return i=void 0!==t.maximised?t.maximised:o,{id:e,maximised:i}}}(wt||(wt={})),function(t){function e(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0;return{resolved:!0,root:Et.resolve(i),openPopouts:t.resolveOpenPopouts(e.openPopouts),dimensions:t.Dimensions.resolve(e.dimensions),settings:t.Settings.resolve(e.settings),header:t.Header.resolve(e.header,e.settings,e.labels)}}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:Lt.fromResolvedArray(e.openPopouts),settings:_t.Settings.createCopy(e.settings),dimensions:t.Dimensions.fromResolved(e.dimensions),header:_t.Header.createCopy(e.header)}},t.isResolved=function(t){const e=t;return void 0!==e.resolved&&!0===e.resolved},t.resolveOpenPopouts=function(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0,{root:Et.resolve(o),openPopouts:xt.resolveOpenPopouts(e.openPopouts),dimensions:xt.Dimensions.resolve(e.dimensions),settings:xt.Settings.resolve(e.settings),header:xt.Header.resolve(e.header,e.settings,e.labels),parentId:null!==(i=e.parentId)&&void 0!==i?i:null,indexInParent:null!==(n=e.indexInParent)&&void 0!==n?n:null,window:t.Window.resolve(e.window,e.dimensions),resolved:!0}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:i(e.openPopouts),dimensions:xt.Dimensions.fromResolved(e.dimensions),settings:_t.Settings.createCopy(e.settings),header:_t.Header.createCopy(e.header),parentId:e.parentId,indexInParent:e.indexInParent,window:t.Window.fromResolved(e.window)}},t.fromResolvedArray=i}(Lt||(Lt={}));class Wt{constructor(){this._allEventSubscriptions=[],this._subscriptionsMap=new Map,this.unbind=this.removeEventListener,this.trigger=this.emit}tryBubbleEvent(t,e){}emit(t,...e){let i=this._subscriptionsMap.get(t);if(void 0!==i){i=i.slice();for(let t=0;t0){const n=e.slice();n.unshift(t);const o=this._allEventSubscriptions.slice();for(let t=0;t0?n.contentItems[0]:n,e=0);const o=this._layoutManager.createAndInitContentItem(i,t);t.addChild(o,e),this._layoutManager.layoutConfig.settings.popInOnClose?this._onClose():this.close()}createWindow(){const t=this.createUrl(),e=Math.floor(1e6*Math.random()).toString(36),i=this.serializeWindowFeatures({width:this._initialWindowSize.width,height:this._initialWindowSize.height,innerWidth:this._initialWindowSize.width,innerHeight:this._initialWindowSize.height,menubar:\"no\",toolbar:\"no\",location:\"no\",personalbar:\"no\",resizable:\"yes\",scrollbars:\"no\",status:\"no\"});if(this._popoutWindow=globalThis.open(t,e,i),this._popoutWindow)this._popoutWindow.addEventListener(\"load\",(()=>this.positionWindow()),{passive:!0}),this._popoutWindow.addEventListener(\"beforeunload\",(()=>{this._layoutManager.layoutConfig.settings.popInOnClose?this.popIn():this._onClose()}),{passive:!0}),this._checkReadyInterval=setInterval((()=>this.checkReady()),10);else if(!0===this._layoutManager.layoutConfig.settings.blockedPopoutsThrowError){throw new j(\"Popout blocked\")}}checkReady(){if(null===this._popoutWindow)throw new K(\"BPCR01844\");this._popoutWindow.__glInstance&&this._popoutWindow.__glInstance.isInitialised&&(this.onInitialised(),void 0!==this._checkReadyInterval&&(clearInterval(this._checkReadyInterval),this._checkReadyInterval=void 0))}serializeWindowFeatures(t){const e=[];for(const i in t)e.push(i+\"=\"+t[i].toString());return e.join(\",\")}createUrl(){const t=\"gl-window-config-\"+Ot(),e=_t.minifyConfig(this._config);try{localStorage.setItem(t,JSON.stringify(e))}catch(t){throw new Error(\"Error while writing to localStorage \"+function(t){return t instanceof Error?t.message:\"string\"==typeof t?t:\"Unknown Error\"}(t))}const i=new URL(location.href);return i.searchParams.set(\"gl-window\",t),i.toString()}positionWindow(){if(null===this._popoutWindow)throw new Error(\"BrowserPopout.positionWindow: null popoutWindow\");this._popoutWindow.moveTo(this._initialWindowSize.left,this._initialWindowSize.top),this._popoutWindow.focus()}onInitialised(){this._isInitialised=!0,this.getGlInstance().on(\"popIn\",(()=>this.popIn())),this.emit(\"initialised\")}_onClose(){setTimeout((()=>this.emit(\"closed\")),50)}}class Gt extends Wt{constructor(t,e,i,n){super(),this.layoutManager=t,this._parent=i,this._element=n,this._popInParentIds=[],this._type=e.type,this._id=e.id,this._isInitialised=!1,this.isGround=!1,this.isRow=!1,this.isColumn=!1,this.isStack=!1,this.isComponent=!1,this.size=e.size,this.sizeUnit=e.sizeUnit,this.minSize=e.minSize,this.minSizeUnit=e.minSizeUnit,this._isClosable=e.isClosable,this._pendingEventPropagations={},this._throttledEvents=[\"stateChanged\"],this._contentItems=this.createContentItems(e.content)}get type(){return this._type}get id(){return this._id}set id(t){this._id=t}get popInParentIds(){return this._popInParentIds}get parent(){return this._parent}get contentItems(){return this._contentItems}get isClosable(){return this._isClosable}get element(){return this._element}get isInitialised(){return this._isInitialised}static isStack(t){return t.isStack}static isComponentItem(t){return t.isComponent}static isComponentParentableItem(t){return t.isStack||t.isGround}removeChild(t,e=!1){const i=this._contentItems.indexOf(t);if(-1===i)throw new Error(\"Can't remove child item. Unknown content item\");if(e||this._contentItems[i].destroy(),this._contentItems.splice(i,1),this._contentItems.length>0)this.updateSize(!1);else if(!this.isGround&&!0===this._isClosable){if(null===this._parent)throw new K(\"CIUC00874\");this._parent.removeChild(this)}}addChild(t,e,i){return null!=e||(e=this._contentItems.length),this._contentItems.splice(e,0,t),t.setParent(this),!0===this._isInitialised&&!1===t._isInitialised&&t.init(),e}replaceChild(t,e,i=!1){const n=this._contentItems.indexOf(t),o=t._element.parentNode;if(-1===n)throw new X(\"CIRCI23232\",\"Can't replace child. oldChild is not child of this\");if(null===o)throw new K(\"CIRCP23232\");if(o.replaceChild(e._element,t._element),!0===i&&(t._parent=null,t.destroy()),this._contentItems[n]=e,e.setParent(this),e.size=t.size,e.sizeUnit=t.sizeUnit,e.minSize=t.minSize,e.minSizeUnit=t.minSizeUnit,null===e._parent)throw new K(\"CIRCNC45699\");!0===e._parent._isInitialised&&!1===e._isInitialised&&e.init(),this.updateSize(!1)}remove(){if(null===this._parent)throw new K(\"CIR11110\");this._parent.removeChild(this)}popout(){const t=Ot(),e=this.layoutManager.createPopoutFromContentItem(this,void 0,t,void 0);return this.emitBaseBubblingEvent(\"stateChanged\"),e}calculateConfigContent(){const t=this._contentItems,e=t.length,i=new Array(e);for(let n=0;nthis.propagateEventToLayoutManager(t,e))))}propagateEventToLayoutManager(t,e){this._pendingEventPropagations[t]=!1,this.layoutManager.emitUnknown(t,e)}}class jt extends Gt{constructor(t,e,i){super(t,e,i,document.createElement(\"div\")),this._parentItem=i,this._focused=!1,this.isComponent=!0,this._reorderEnabled=e.reorderEnabled,this.applyUpdatableConfig(e),this._initialWantMaximise=e.maximised;const n=document.createElement(\"div\");n.classList.add(\"lm_content\"),this.element.appendChild(n),this._container=new Ft(e,this,t,n,(t=>this.handleUpdateItemConfigEvent(t)),(()=>this.show()),(()=>this.hide()),(t=>this.focus(t)),(t=>this.blur(t)))}get componentName(){return this._container.componentType}get componentType(){return this._container.componentType}get reorderEnabled(){return this._reorderEnabled}get initialWantMaximise(){return this._initialWantMaximise}get component(){return this._container.component}get container(){return this._container}get parentItem(){return this._parentItem}get headerConfig(){return this._headerConfig}get title(){return this._title}get tab(){return this._tab}get focused(){return this._focused}destroy(){this._container.destroy(),super.destroy()}applyUpdatableConfig(t){this.setTitle(t.title),this._headerConfig=t.header}toConfig(){const t=this._container.stateRequestEvent,e=void 0===t?this._container.state:t();return{type:at.component,content:[],size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,maximised:!1,isClosable:this.isClosable,reorderEnabled:this._reorderEnabled,title:this._title,header:mt.Header.createCopy(this._headerConfig),componentType:pt.copyComponentType(this.componentType),componentState:e}}close(){if(null===this.parent)throw new K(\"CIC68883\");this.parent.removeChild(this,!1)}enterDragMode(t,e){Tt(this.element,t),At(this.element,e),this._container.enterDragMode(t,e)}exitDragMode(){this._container.exitDragMode()}enterStackMaximised(){this._container.enterStackMaximised()}exitStackMaximised(){this._container.exitStackMaximised()}drag(){this._container.drag()}updateSize(t){this.updateNodeSize(t)}init(){this.updateNodeSize(!1),super.init(),this._container.emit(\"open\"),this.initContentItems()}setTitle(t){this._title=t,this.emit(\"titleChanged\",t),this.emit(\"stateChanged\")}setTab(t){this._tab=t,this.emit(\"tab\",t),this._container.setTab(t)}hide(){super.hide(),this._container.setVisibility(!1)}show(){super.show(),this._container.setVisibility(!0)}focus(t=!1){this.parentItem.setActiveComponentItem(this,!0,t)}setFocused(t){this._focused=!0,this.tab.setFocused(),t||this.emitBaseBubblingEvent(\"focus\")}blur(t=!1){this._focused&&this.layoutManager.setFocusedComponentItem(void 0,t)}setBlurred(t){this._focused=!1,this.tab.setBlurred(),t||this.emitBaseBubblingEvent(\"blur\")}setParent(t){this._parentItem=t,super.setParent(t)}handleUpdateItemConfigEvent(t){this.applyUpdatableConfig(t)}updateNodeSize(t){if(\"none\"!==this.element.style.display){const{width:e,height:i}=kt(this.element);this._container.setSizeToNodeSize(e,i,t)}}}class $t extends Gt{constructor(){super(...arguments),this._focused=!1}get focused(){return this._focused}setFocusedValue(t){this._focused=t}}class Zt extends Wt{constructor(t,e){super(),this._eElement=t,this._pointerTracking=!1,this._pointerDownEventListener=t=>this.onPointerDown(t),this._pointerMoveEventListener=t=>this.onPointerMove(t),this._pointerUpEventListener=t=>this.onPointerUp(t),this._timeout=void 0,this._allowableTargets=[t,...e],this._oDocument=document,this._eBody=document.body,this._nDelay=1800,this._nDistance=10,this._nX=0,this._nY=0,this._nOriginalX=0,this._nOriginalY=0,this._dragging=!1,this._eElement.addEventListener(\"pointerdown\",this._pointerDownEventListener,{passive:!0})}destroy(){this.checkRemovePointerTrackingEventListeners(),this._eElement.removeEventListener(\"pointerdown\",this._pointerDownEventListener)}cancelDrag(){this.processDragStop(void 0)}onPointerDown(t){if(this._allowableTargets.includes(t.target)&&t.isPrimary){const e=this.getPointerCoordinates(t);this.processPointerDown(e)}}processPointerDown(t){this._nOriginalX=t.x,this._nOriginalY=t.y,this._oDocument.addEventListener(\"pointermove\",this._pointerMoveEventListener),this._oDocument.addEventListener(\"pointerup\",this._pointerUpEventListener,{passive:!0}),this._pointerTracking=!0,this._timeout=setTimeout((()=>{try{this.startDrag()}catch(t){throw console.error(t),t}}),this._nDelay)}onPointerMove(t){this._pointerTracking&&(this.processDragMove(t),t.preventDefault())}processDragMove(t){this._nX=t.pageX-this._nOriginalX,this._nY=t.pageY-this._nOriginalY,!1===this._dragging&&(Math.abs(this._nX)>this._nDistance||Math.abs(this._nY)>this._nDistance)&&this.startDrag(),this._dragging&&this.emit(\"drag\",this._nX,this._nY,t)}onPointerUp(t){this.processDragStop(t)}processDragStop(t){var e;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this.checkRemovePointerTrackingEventListeners(),!0===this._dragging&&(this._eBody.classList.remove(\"lm_dragging\"),this._eElement.classList.remove(\"lm_dragging\"),null===(e=this._oDocument.querySelector(\"iframe\"))||void 0===e||e.style.setProperty(\"pointer-events\",\"\"),this._dragging=!1,this.emit(\"dragStop\",t))}checkRemovePointerTrackingEventListeners(){this._pointerTracking&&(this._oDocument.removeEventListener(\"pointermove\",this._pointerMoveEventListener),this._oDocument.removeEventListener(\"pointerup\",this._pointerUpEventListener),this._pointerTracking=!1)}startDrag(){var t;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this._dragging=!0,this._eBody.classList.add(\"lm_dragging\"),this._eElement.classList.add(\"lm_dragging\"),null===(t=this._oDocument.querySelector(\"iframe\"))||void 0===t||t.style.setProperty(\"pointer-events\",\"none\"),this.emit(\"dragStart\",this._nOriginalX,this._nOriginalY)}getPointerCoordinates(t){return{x:t.pageX,y:t.pageY}}}class qt{constructor(t,e,i){this._isVertical=t,this._size=e,this._grabSize=i0){const i=this.createSplitter(Math.max(0,e-1)).element;e>0?(this.contentItems[e-1].element.insertAdjacentElement(\"afterend\",i),i.insertAdjacentElement(\"afterend\",t.element)):(this.contentItems[0].element.insertAdjacentElement(\"beforebegin\",i),i.insertAdjacentElement(\"beforebegin\",t.element))}else this._childElementContainer.appendChild(t.element);super.addChild(t,e);const n=1/this.contentItems.length*100;if(!0===i)return this.emitBaseBubblingEvent(\"stateChanged\"),e;for(let e=0;e0&&(this.calculateRelativeSizes(),this.setAbsoluteSizes()),this.emitBaseBubblingEvent(\"stateChanged\"),this.emit(\"resize\")}setAbsoluteSizes(){const t=this.calculateAbsoluteSizes();for(let e=0;e0&&t.itemSizes[e]++,this._isColumn?(Tt(this.contentItems[e].element,t.crossAxisSize),At(this.contentItems[e].element,t.itemSizes[e])):(Tt(this.contentItems[e].element,t.itemSizes[e]),At(this.contentItems[e].element,t.crossAxisSize))}calculateAbsoluteSizes(){const t=(this.contentItems.length-1)*this._splitterSize,{width:e,height:i}=kt(this.element);let n,o;this._isColumn?(n=i-t,o=e):(n=e-t,o=i);let s=0;const r=[];for(let t=0;t0){const n=100-t;for(let t=0;t100&&e.length>0){for(let t=0;te)return;{const r=i/e;let a=i;for(let e=0;ethis.onSplitterDrag(e,t,i))),e.on(\"dragStop\",(()=>this.onSplitterDragStop(e))),e.on(\"dragStart\",(()=>this.onSplitterDragStart(e))),this._splitter.splice(t,0,e),e}getSplitItems(t){const e=this._splitter.indexOf(t);return{before:this.contentItems[e],after:this.contentItems[e+1]}}calculateContentItemMinSize(t){const e=t.minSize;if(void 0!==e){if(t.minSizeUnit===ht.Pixel)return e;throw new X(\"ROCGMD98831\",JSON.stringify(t))}{const t=this.layoutManager.layoutConfig.dimensions;return this._isColumn?t.defaultMinItemHeight:t.defaultMinItemWidth}}calculateContentItemsTotalMinSize(t){let e=0;for(const i of t)e+=this.calculateContentItemMinSize(i);return e}onSplitterDragStart(t){const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=this.calculateContentItemsTotalMinSize(e.before.contentItems),s=this.calculateContentItemsTotalMinSize(e.after.contentItems);this._splitterPosition=0,this._splitterMinPosition=-1*(i-o),this._splitterMaxPosition=n-s}onSplitterDrag(t,e,i){let n=this._isColumn?i:e;if(null===this._splitterMinPosition||null===this._splitterMaxPosition)throw new K(\"ROCOSD59226\");n=Math.max(n,this._splitterMinPosition),n=Math.min(n,this._splitterMaxPosition),this._splitterPosition=n;const o=zt(n);this._isColumn?t.element.style.top=o:t.element.style.left=o}onSplitterDragStop(t){if(null===this._splitterPosition)throw new K(\"ROCOSDS66932\");{const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=(this._splitterPosition+i)/(i+n),s=e.before.size+e.after.size;e.before.size=o*s,e.after.size=(1-o)*s,t.element.style.top=zt(0),t.element.style.left=zt(0),globalThis.requestAnimationFrame((()=>this.updateSize(!1)))}}}!function(t){t.getElementDimensionSize=function(t,e){return\"width\"===e?function(t){return t.offsetWidth}(t):function(t){return t.offsetHeight}(t)},t.setElementDimensionSize=function(t,e,i){return\"width\"===e?Tt(t,i):At(t,i)},t.createElement=function(t,e){const i=t.createElement(\"div\");return i.classList.add(\"lm_item\"),e?i.classList.add(\"lm_column\"):i.classList.add(\"lm_row\"),i}}(Xt||(Xt={}));class Yt extends $t{constructor(t,e,i){super(t,vt.create(e),null,Yt.createElement(document)),this.isGround=!0,this._childElementContainer=this.element,this._containerElement=i;let n=null;for(;;){const t=n?n.previousSibling:this._containerElement.lastChild;if(!(t instanceof Element&&t.classList.contains(\"lm_content\")))break;n=t}this._containerElement.insertBefore(this.element,n)}init(){if(!0!==this.isInitialised){this.updateNodeSize();for(let t=0;t0?this.contentItems[0]:this,n.isComponent)throw new Error(\"Cannot add item as child to ComponentItem\");{const t=this.layoutManager.createAndInitContentItem(i,n);return e=n.addChild(t,e),n===this?-1:e}}loadComponentAsRoot(t){this.clearRoot();const e=Ct.resolve(t,!1);if(e.maximised)throw new Error(\"Root Component cannot be maximised\");{const t=new jt(this.layoutManager,e,this);t.init(),this.addChild(t,0)}}addChild(t,e){if(this.contentItems.length>0)throw new Error(\"Ground node can only have a single child\");return this._childElementContainer.appendChild(t.element),e=super.addChild(t,e),this.updateSize(!1),this.emitBaseBubblingEvent(\"stateChanged\"),e}calculateConfigContent(){const t=this.contentItems,e=t.length,i=new Array(e);for(let n=0;n0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e)),this.updateContentItemsSize(!1))}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}createSideAreas(){const t=Yt.Area.oppositeSides,e=new Array(Object.keys(t).length);let i=0;for(const n in t){const o=n,s=this.getElementArea();if(null===s)throw new K(\"RCSA77553\");s.side=o,\"2\"===t[o][1]?s[o]=s[t[o]]-50:s[o]=s[t[o]]+50,s.surface=(s.x2-s.x1)*(s.y2-s.y1),e[i++]=s}return e}highlightDropZone(t,e,i){this.layoutManager.tabDropPlaceholder.remove(),super.highlightDropZone(t,e,i)}onDrop(t,e){if(t.isComponent){const e=ut.createDefault(),i=t;e.header=mt.Header.createCopy(i.headerConfig);const n=this.layoutManager.createAndInitContentItem(e,this);n.addChild(t),t=n}if(0===this.contentItems.length)this.addChild(t);else{if(t.type===at.row||t.type===at.column){const e=ut.createDefault(),i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}const i=\"x\"==e.side[0]?at.row:at.column,n=\"2\"==e.side[1],o=this.contentItems[0];if(o instanceof Xt&&o.type===i){const e=o.contentItems[n?0:o.contentItems.length-1];o.addChild(t,n?0:void 0,!0),e.size*=.5,t.size=e.size,t.sizeUnit=ht.Percent,o.updateSize(!1)}else{const e=ct.createDefault(i),s=this.layoutManager.createContentItem(e,this);this.replaceChild(o,s),s.addChild(t,n?0:void 0,!0),s.addChild(o,n?void 0:0,!0),o.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}}dock(){throw new X(\"GID87731\")}validateDocking(){throw new X(\"GIVD87732\")}getAllContentItems(){const t=[this];return this.deepGetAllContentItems(this.contentItems,t),t}getConfigMaximisedItems(){const t=[];return this.deepFilterContentItems(this.contentItems,t,(t=>!(!Gt.isStack(t)||!t.initialWantMaximise)||!(!Gt.isComponentItem(t)||!t.initialWantMaximise))),t}getItemsByPopInParentId(t){const e=[];return this.deepFilterContentItems(this.contentItems,e,(e=>e.popInParentIds.includes(t))),e}toConfig(){throw new Error(\"Cannot generate GroundItem config\")}setActiveComponentItem(t,e,i){}updateNodeSize(){const{width:t,height:e}=kt(this._containerElement);Tt(this.element,t),At(this.element,e),this.contentItems.length>0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e))}deepGetAllContentItems(t,e){for(let i=0;ithis.onClick(t),this._touchStartEventListener=t=>this.onTouchStart(t),this._element=document.createElement(\"div\"),this._element.classList.add(i),this._element.title=e,this._header.on(\"destroy\",(()=>this.destroy())),this._element.addEventListener(\"click\",this._clickEventListener,{passive:!0}),this._element.addEventListener(\"touchstart\",this._touchStartEventListener,{passive:!0}),this._header.controlsContainerElement.appendChild(this._element)}get element(){return this._element}destroy(){var t;this._element.removeEventListener(\"click\",this._clickEventListener),this._element.removeEventListener(\"touchstart\",this._touchStartEventListener),null===(t=this._element.parentNode)||void 0===t||t.removeChild(this._element)}onClick(t){this._pushEvent(t)}onTouchStart(t){this._pushEvent(t)}}class Jt{constructor(t,e,i,n,o){var s;this._layoutManager=t,this._componentItem=e,this._closeEvent=i,this._focusEvent=n,this._dragStartEvent=o,this._isActive=!1,this._tabClickListener=t=>this.onTabClickDown(t),this._tabTouchStartListener=t=>this.onTabTouchStart(t),this._closeClickListener=()=>this.onCloseClick(),this._closeTouchStartListener=()=>this.onCloseTouchStart(),this._dragStartListener=(t,e)=>this.onDragStart(t,e),this._contentItemDestroyListener=()=>this.onContentItemDestroy(),this._tabTitleChangedListener=t=>this.setTitle(t),this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_tab\"),this._titleElement=document.createElement(\"span\"),this._titleElement.classList.add(\"lm_title\"),this._closeElement=document.createElement(\"div\"),this._closeElement.classList.add(\"lm_close_tab\"),this._element.appendChild(this._titleElement),this._element.appendChild(this._closeElement),e.isClosable?this._closeElement.style.display=\"\":this._closeElement.style.display=\"none\",this.setTitle(e.title),this._componentItem.on(\"titleChanged\",this._tabTitleChangedListener);(null!==(s=e.reorderEnabled)&&void 0!==s?s:this._layoutManager.layoutConfig.settings.reorderEnabled)&&this.enableReorder(),this._element.addEventListener(\"click\",this._tabClickListener,{passive:!0}),this._element.addEventListener(\"touchstart\",this._tabTouchStartListener,{passive:!0}),this._componentItem.isClosable?(this._closeElement.addEventListener(\"click\",this._closeClickListener,{passive:!0}),this._closeElement.addEventListener(\"touchstart\",this._closeTouchStartListener,{passive:!0})):(this._closeElement.remove(),this._closeElement=void 0),this._componentItem.setTab(this),this._layoutManager.emit(\"tabCreated\",this)}get isActive(){return this._isActive}get componentItem(){return this._componentItem}get contentItem(){return this._componentItem}get element(){return this._element}get titleElement(){return this._titleElement}get closeElement(){return this._closeElement}get reorderEnabled(){return void 0!==this._dragListener}set reorderEnabled(t){t!==this.reorderEnabled&&(t?this.enableReorder():this.disableReorder())}setTitle(t){this._titleElement.innerText=t,this._element.title=t}setActive(t){t!==this._isActive&&(this._isActive=t,t?this._element.classList.add(\"lm_active\"):this._element.classList.remove(\"lm_active\"))}destroy(){var t,e;this._closeEvent=void 0,this._focusEvent=void 0,this._dragStartEvent=void 0,this._element.removeEventListener(\"click\",this._tabClickListener),this._element.removeEventListener(\"touchstart\",this._tabTouchStartListener),null===(t=this._closeElement)||void 0===t||t.removeEventListener(\"click\",this._closeClickListener),null===(e=this._closeElement)||void 0===e||e.removeEventListener(\"touchstart\",this._closeTouchStartListener),this._componentItem.off(\"titleChanged\",this._tabTitleChangedListener),this.reorderEnabled&&this.disableReorder(),this._element.remove()}setBlurred(){this._element.classList.remove(\"lm_focused\"),this._titleElement.classList.remove(\"lm_focused\")}setFocused(){this._element.classList.add(\"lm_focused\"),this._titleElement.classList.add(\"lm_focused\")}onDragStart(t,e){if(void 0===this._dragListener)throw new J(\"TODSDLU10093\");if(void 0===this._dragStartEvent)throw new J(\"TODS23309\");this._dragStartEvent(t,e,this._dragListener,this.componentItem)}onContentItemDestroy(){void 0!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=void 0)}onTabClickDown(t){const e=t.target;e!==this._element&&e!==this._titleElement||(0===t.button?this.notifyFocus():1===t.button&&this._componentItem.isClosable&&this.notifyClose())}onTabTouchStart(t){t.target===this._element&&this.notifyFocus()}onCloseClick(){this.notifyClose()}onCloseTouchStart(){this.notifyClose()}notifyClose(){if(void 0===this._closeEvent)throw new J(\"TNC15007\");this._closeEvent(this._componentItem)}notifyFocus(){if(void 0===this._focusEvent)throw new J(\"TNA15007\");this._focusEvent(this._componentItem)}enableReorder(){this._dragListener=new Zt(this._element,[this._titleElement]),this._dragListener.on(\"dragStart\",this._dragStartListener),this._componentItem.on(\"destroy\",this._contentItemDestroyListener)}disableReorder(){if(void 0===this._dragListener)throw new J(\"TDR87745\");this._componentItem.off(\"destroy\",this._contentItemDestroyListener),this._dragListener.off(\"dragStart\",this._dragStartListener),this._dragListener=void 0}}class Qt{constructor(t,e,i,n,o){this._layoutManager=t,this._componentRemoveEvent=e,this._componentFocusEvent=i,this._componentDragStartEvent=n,this._dropdownActiveChangedEvent=o,this._tabs=[],this._lastVisibleTabIndex=-1,this._dropdownActive=!1,this._element=document.createElement(\"section\"),this._element.classList.add(\"lm_tabs\"),this._dropdownElement=document.createElement(\"section\"),this._dropdownElement.classList.add(\"lm_tabdropdown_list\"),this._dropdownElement.style.display=\"none\"}get tabs(){return this._tabs}get tabCount(){return this._tabs.length}get lastVisibleTabIndex(){return this._lastVisibleTabIndex}get element(){return this._element}get dropdownElement(){return this._dropdownElement}get dropdownActive(){return this._dropdownActive}destroy(){for(let t=0;tthis.handleTabCloseEvent(t)),(t=>this.handleTabFocusEvent(t)),((t,e,i,n)=>this.handleTabDragStartEvent(t,e,i,n)));void 0===e&&(e=this._tabs.length),this._tabs.splice(e,0,i),ethis._lastVisibleTabIndex){const t=this._tabs[e];for(let t=e;t>0;t--)this._tabs[t]=this._tabs[t-1];this._tabs[0]=t}}updateTabSizes(t,e){let i=!1;this.tryUpdateTabSizes(i,t,e)||(i=!0,this.tryUpdateTabSizes(i,t,e)),i!==this._dropdownActive&&(this._dropdownActive=i,this._dropdownActiveChangedEvent())}tryUpdateTabSizes(t,e,i){if(this._tabs.length>0){if(void 0===i)throw new Error(\"non-empty tabs must have active component item\");let n=0,o=!1;const s=this._layoutManager.layoutConfig.settings.tabOverlapAllowance,r=this._tabs.indexOf(i.tab),a=this._tabs[r];this._lastVisibleTabIndex=-1;for(let i=0;ie){if(o)i===r&&(l.style.zIndex=\"auto\",l.style.marginLeft=\"\",l.parentElement!==this._element&&this._element.appendChild(l));else{let t;if(t=r>0&&r<=i?(d-e)/(i-1):(d-e)/i,tthis.onClick(t),this._touchStartListener=t=>this.onTouchStart(t),this._rowColumnClosable=!0,this._closeButton=null,this._popoutButton=null,this._tabsContainer=new Qt(this._layoutManager,(t=>this.handleTabInitiatedComponentRemoveEvent(t)),(t=>this.handleTabInitiatedComponentFocusEvent(t)),((t,e,i,n)=>this.handleTabInitiatedDragStartEvent(t,e,i,n)),(()=>this.processTabDropdownActiveChanged())),this._show=i.show,this._popoutEnabled=i.popoutEnabled,this._popoutLabel=i.popoutLabel,this._maximiseEnabled=i.maximiseEnabled,this._maximiseLabel=i.maximiseLabel,this._minimiseEnabled=i.minimiseEnabled,this._minimiseLabel=i.minimiseLabel,this._closeEnabled=i.closeEnabled,this._closeLabel=i.closeLabel,this._tabDropdownEnabled=i.tabDropdownEnabled,this._tabDropdownLabel=i.tabDropdownLabel,this.setSide(i.side),this._canRemoveComponent=this._configClosable,this._element=document.createElement(\"section\"),this._element.classList.add(\"lm_header\"),this._controlsContainerElement=document.createElement(\"section\"),this._controlsContainerElement.classList.add(\"lm_controls\"),this._element.appendChild(this._tabsContainer.element),this._element.appendChild(this._controlsContainerElement),this._element.appendChild(this._tabsContainer.dropdownElement),this._element.addEventListener(\"click\",this._clickListener,{passive:!0}),this._element.addEventListener(\"touchstart\",this._touchStartListener,{passive:!0}),this._documentMouseUpListener=()=>this._tabsContainer.hideAdditionalTabsDropdown(),globalThis.document.addEventListener(\"mouseup\",this._documentMouseUpListener,{passive:!0}),this._tabControlOffset=this._layoutManager.layoutConfig.settings.tabControlOffset,this._tabDropdownEnabled&&(this._tabDropdownButton=new Kt(this,this._tabDropdownLabel,\"lm_tabdropdown\",(()=>this._tabsContainer.showAdditionalTabsDropdown()))),this._popoutEnabled&&(this._popoutButton=new Kt(this,this._popoutLabel,\"lm_popout\",(()=>this.handleButtonPopoutEvent()))),this._maximiseEnabled&&(this._maximiseButton=new Kt(this,this._maximiseLabel,\"lm_maximise\",(t=>this.handleButtonMaximiseToggleEvent(t)))),this._configClosable&&(this._closeButton=new Kt(this,this._closeLabel,\"lm_close\",(()=>s()))),this.processTabDropdownActiveChanged()}get show(){return this._show}get side(){return this._side}get leftRightSided(){return this._leftRightSided}get layoutManager(){return this._layoutManager}get parent(){return this._parent}get tabs(){return this._tabsContainer.tabs}get lastVisibleTabIndex(){return this._tabsContainer.lastVisibleTabIndex}get element(){return this._element}get tabsContainerElement(){return this._tabsContainer.element}get controlsContainerElement(){return this._controlsContainerElement}destroy(){this.emit(\"destroy\"),this._popoutEvent=void 0,this._maximiseToggleEvent=void 0,this._clickEvent=void 0,this._touchStartEvent=void 0,this._componentRemoveEvent=void 0,this._componentFocusEvent=void 0,this._componentDragStartEvent=void 0,this._tabsContainer.destroy(),globalThis.document.removeEventListener(\"mouseup\",this._documentMouseUpListener),this._element.remove()}createTab(t,e){this._tabsContainer.createTab(t,e)}removeTab(t){this._tabsContainer.removeTab(t)}processActiveComponentChanged(t){this._tabsContainer.processActiveComponentChanged(t),this.updateTabSizes()}setSide(t){this._side=t,this._leftRightSided=[nt.right,nt.left].includes(this._side)}setRowColumnClosable(t){this._rowColumnClosable=t,this.updateClosability()}updateClosability(){let t;if(this._configClosable)if(this._rowColumnClosable){t=!0;const e=this.tabs.length;for(let i=0;i1}applyFocusedValue(t){t?this._element.classList.add(\"lm_focused\"):this._element.classList.remove(\"lm_focused\")}processMaximised(){if(void 0===this._maximiseButton)throw new J(\"HPMAX16997\");this._maximiseButton.element.setAttribute(\"title\",this._minimiseLabel)}processMinimised(){if(void 0===this._maximiseButton)throw new J(\"HPMIN16997\");this._maximiseButton.element.setAttribute(\"title\",this._maximiseLabel)}updateTabSizes(){if(this._tabsContainer.tabCount>0){const t=this._show?this._layoutManager.layoutConfig.dimensions.headerHeight:0;let e;this._leftRightSided?(this._element.style.height=\"\",this._element.style.width=zt(t)):(this._element.style.width=\"\",this._element.style.height=zt(t)),e=this._leftRightSided?this._element.offsetHeight-this._controlsContainerElement.offsetHeight-this._tabControlOffset:this._element.offsetWidth-this._controlsContainerElement.offsetWidth-this._tabControlOffset,this._tabsContainer.updateTabSizes(e,this._getActiveComponentItemEvent())}}handleTabInitiatedComponentRemoveEvent(t){if(this._canRemoveComponent){if(void 0===this._componentRemoveEvent)throw new J(\"HHTCE22294\");this._componentRemoveEvent(t)}}handleTabInitiatedComponentFocusEvent(t){if(void 0===this._componentFocusEvent)throw new J(\"HHTAE22294\");this._componentFocusEvent(t)}handleTabInitiatedDragStartEvent(t,e,i,n){if(this._canRemoveComponent){if(void 0===this._componentDragStartEvent)throw new J(\"HHTDSE22294\");this._componentDragStartEvent(t,e,i,n)}else i.cancelDrag()}processTabDropdownActiveChanged(){void 0!==this._tabDropdownButton&&Dt(this._tabDropdownButton.element,this._tabsContainer.dropdownActive)}handleButtonPopoutEvent(){if(this._layoutManager.layoutConfig.settings.popoutWholeStack){if(void 0===this._popoutEvent)throw new J(\"HHBPOE17834\");this._popoutEvent()}else{const t=this._getActiveComponentItemEvent();t&&t.popout()}}handleButtonMaximiseToggleEvent(t){if(void 0===this._maximiseToggleEvent)throw new J(\"HHBMTE16834\");this._maximiseToggleEvent()}onClick(t){t.target===this._element&&this.notifyClick(t)}onTouchStart(t){t.target===this._element&&this.notifyTouchStart(t)}notifyClick(t){if(void 0===this._clickEvent)throw new J(\"HNHC46834\");this._clickEvent(t)}notifyTouchStart(t){if(void 0===this._touchStartEvent)throw new J(\"HNHTS46834\");this._touchStartEvent(t)}}class ee extends $t{constructor(t,e,i){var n,o,s,r,a,l,h,d,c,m,u,p,g,f,v,_,y,C,w;super(t,e,i,ee.createElement(document)),this._headerSideChanged=!1,this._resizeListener=()=>this.handleResize(),this._maximisedListener=()=>this.handleMaximised(),this._minimisedListener=()=>this.handleMinimised(),this._headerConfig=e.header;const I=t.layoutConfig.header,b=e.content;let S;if(1!==b.length)S=void 0;else{S=b[0].header}this._initialWantMaximise=e.maximised,this._initialActiveItemIndex=null!==(n=e.activeItemIndex)&&void 0!==n?n:0;const E=null!==(r=null!==(s=null===(o=this._headerConfig)||void 0===o?void 0:o.show)&&void 0!==s?s:null==S?void 0:S.show)&&void 0!==r?r:I.show,x=null!==(h=null!==(l=null===(a=this._headerConfig)||void 0===a?void 0:a.popout)&&void 0!==l?l:null==S?void 0:S.popout)&&void 0!==h?h:I.popout,L=null!==(m=null!==(c=null===(d=this._headerConfig)||void 0===d?void 0:d.maximise)&&void 0!==c?c:null==S?void 0:S.maximise)&&void 0!==m?m:I.maximise,z=null!==(g=null!==(p=null===(u=this._headerConfig)||void 0===u?void 0:u.close)&&void 0!==p?p:null==S?void 0:S.close)&&void 0!==g?g:I.close,M=null!==(_=null!==(v=null===(f=this._headerConfig)||void 0===f?void 0:f.minimise)&&void 0!==v?v:null==S?void 0:S.minimise)&&void 0!==_?_:I.minimise,P=null!==(w=null!==(C=null===(y=this._headerConfig)||void 0===y?void 0:y.tabDropdown)&&void 0!==C?C:null==S?void 0:S.tabDropdown)&&void 0!==w?w:I.tabDropdown;this._maximisedEnabled=!1!==L;const T={show:!1!==E,side:!1===E?nt.top:E,popoutEnabled:!1!==x,popoutLabel:!1===x?\"\":x,maximiseEnabled:this._maximisedEnabled,maximiseLabel:!1===L?\"\":L,closeEnabled:!1!==z,closeLabel:!1===z?\"\":z,minimiseEnabled:!0,minimiseLabel:M,tabDropdownEnabled:!1!==P,tabDropdownLabel:!1===P?\"\":P};this._header=new te(t,this,T,e.isClosable&&!1!==z,(()=>this.getActiveComponentItem()),(()=>this.remove()),(()=>this.handlePopoutEvent()),(()=>this.toggleMaximise()),(t=>this.handleHeaderClickEvent(t)),(t=>this.handleHeaderTouchStartEvent(t)),(t=>this.handleHeaderComponentRemoveEvent(t)),(t=>this.handleHeaderComponentFocusEvent(t)),((t,e,i,n)=>this.handleHeaderComponentStartDragEvent(t,e,i,n))),this.isStack=!0,this._childElementContainer=document.createElement(\"section\"),this._childElementContainer.classList.add(\"lm_items\"),this.on(\"resize\",this._resizeListener),this._maximisedEnabled&&(this.on(\"maximised\",this._maximisedListener),this.on(\"minimised\",this._minimisedListener)),this.element.appendChild(this._header.element),this.element.appendChild(this._childElementContainer),this.setupHeaderPosition(),this._header.updateClosability()}get childElementContainer(){return this._childElementContainer}get header(){return this._header}get headerShow(){return this._header.show}get headerSide(){return this._header.side}get headerLeftRightSided(){return this._header.leftRightSided}get contentAreaDimensions(){return this._contentAreaDimensions}get initialWantMaximise(){return this._initialWantMaximise}get isMaximised(){return this===this.layoutManager.maximisedStack}get stackParent(){if(!this.parent)throw new Error(\"Stack should always have a parent\");return this.parent}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}init(){if(!0===this.isInitialised)return;this.updateNodeSize();for(let t=0;t0){if(this._initialActiveItemIndex<0||this._initialActiveItemIndex>=e)throw new Error(`ActiveItemIndex out of range: ${this._initialActiveItemIndex} id: ${this.id}`);for(let i=0;ithis.contentItems.length)throw e-=1,new X(\"SAC99728\");if(t instanceof jt)return e=super.addChild(t,e),this._childElementContainer.appendChild(t.element),this._header.createTab(t,e),this.setActiveComponentItem(t,i),this._header.updateTabSizes(),this.updateSize(!1),t.container.setBaseLogicalZIndex(),this._header.updateClosability(),this.emitStateChangedEvent(),e;throw new X(\"SACC88532\")}removeChild(t,e){const i=t,n=this.contentItems.indexOf(i),o=1===this.contentItems.length;if(this._activeComponentItem===i&&(i.focused&&i.blur(),!o)){const t=0===n?1:n-1;this.setActiveComponentItem(this.contentItems[t],!1)}this._header.removeTab(i),super.removeChild(i,e),o||this._header.updateClosability(),this.emitStateChangedEvent()}toggleMaximise(){this.isMaximised?this.minimise():this.maximise()}maximise(){if(!this.isMaximised){this.layoutManager.setMaximisedStack(this);const t=this.contentItems,e=t.length;for(let i=0;i0&&void 0===t)throw new Error(\"expected non-empty stack to have an active component item\");return{type:\"stack\",content:this.calculateConfigContent(),size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,isClosable:this.isClosable,maximised:this.isMaximised,header:this.createHeaderConfig(),activeItemIndex:t}}onDrop(t,e){if(\"header\"===this._dropSegment){if(this.resetHeaderDropZone(),void 0===this._dropIndex)throw new J(\"SODDI68990\");return void this.addChild(t,this._dropIndex)}if(\"body\"===this._dropSegment)return void this.addChild(t,0,!0);const i=\"top\"===this._dropSegment||\"bottom\"===this._dropSegment,n=\"left\"===this._dropSegment||\"right\"===this._dropSegment,o=\"top\"===this._dropSegment||\"left\"===this._dropSegment,s=i&&this.stackParent.isColumn||n&&this.stackParent.isRow;if(t.isComponent){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createAndInitContentItem(e,this);i.addChild(t),t=i}if(t.type===at.row||t.type===at.column){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}if(s){const e=this.stackParent.contentItems.indexOf(this);this.stackParent.addChild(t,o?e:e+1,!0),this.size*=.5,t.size=this.size,t.sizeUnit=this.sizeUnit,this.stackParent.updateSize(!1)}else{const e=i?at.column:at.row,n=ct.createDefault(e),s=this.layoutManager.createContentItem(n,this);this.stackParent.replaceChild(this,s),s.addChild(t,o?0:void 0,!0),s.addChild(this,o?void 0:0,!0),this.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}highlightDropZone(t,e){for(const i in this._contentAreaDimensions){const n=i,o=this._contentAreaDimensions[n].hoverArea;if(o.x1t&&o.y1e)return void(\"header\"===n?(this._dropSegment=\"header\",this.highlightHeaderDropZone(this._header.leftRightSided?e:t)):(this.resetHeaderDropZone(),this.highlightBodyDropZone(n)))}}getArea(){if(\"none\"===this.element.style.display)return null;const t=super.getElementArea(this._header.element),e=super.getElementArea(this._childElementContainer);if(null===t||null===e)throw new K(\"SGAHC13086\");const i=e.x2-e.x1,n=e.y2-e.y1;return this._contentAreaDimensions={header:{hoverArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2},highlightArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2}}},0===this.contentItems.length?(this._contentAreaDimensions.body={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2}},super.getElementArea(this.element)):(this._contentAreaDimensions.left={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x1+.25*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x1+.5*i,y2:e.y2}},this._contentAreaDimensions.top={hoverArea:{x1:e.x1+.25*i,y1:e.y1,x2:e.x1+.75*i,y2:e.y1+.5*n},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y1+.5*n}},this._contentAreaDimensions.right={hoverArea:{x1:e.x1+.75*i,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1+.5*i,y1:e.y1,x2:e.x2,y2:e.y2}},this._contentAreaDimensions.bottom={hoverArea:{x1:e.x1+.25*i,y1:e.y1+.5*n,x2:e.x1+.75*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1+.5*n,x2:e.x2,y2:e.y2}},super.getElementArea(this.element))}positionHeader(t){this._header.side!==t&&(this._header.setSide(t),this._headerSideChanged=!0,this.setupHeaderPosition())}updateNodeSize(){if(\"none\"!==this.element.style.display){const t=kt(this.element);if(this._header.show){t[this._header.leftRightSided?it.width:it.height]-=this.layoutManager.layoutConfig.dimensions.headerHeight}this._childElementContainer.style.width=zt(t.width),this._childElementContainer.style.height=zt(t.height);for(let e=0;e=o&&tthis.onDrag(t,e,i))),this._dragListener.on(\"dragStop\",(()=>this.onDrop())),this.createDragProxyElements(t,e),null===this._componentItem.parent)throw new K(\"DPC10097\");this._componentItemFocused=this._componentItem.focused,this._componentItemFocused&&this._componentItem.blur(),this._componentItem.parent.removeChild(this._componentItem,!0),this.setDimensions(),document.body.appendChild(this._element),this.determineMinMaxXY(),this._layoutManager.calculateItemAreas(),this.setDropPosition(t,e)}get element(){return this._element}createDragProxyElements(t,e){this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_dragProxy\");const i=document.createElement(\"div\");i.classList.add(\"lm_header\");const n=document.createElement(\"div\");n.classList.add(\"lm_tabs\");const o=document.createElement(\"div\");o.classList.add(\"lm_tab\");const s=document.createElement(\"span\");s.classList.add(\"lm_title\"),o.appendChild(s),n.appendChild(o),i.appendChild(n),this._proxyContainerElement=document.createElement(\"div\"),this._proxyContainerElement.classList.add(\"lm_content\"),this._element.appendChild(i),this._element.appendChild(this._proxyContainerElement),this._originalParent instanceof ee&&this._originalParent.headerShow&&(this._sided=this._originalParent.headerLeftRightSided,this._element.classList.add(\"lm_\"+this._originalParent.headerSide),[nt.right,nt.bottom].indexOf(this._originalParent.headerSide)>=0&&this._proxyContainerElement.insertAdjacentElement(\"afterend\",i)),this._element.style.left=zt(t),this._element.style.top=zt(e),o.setAttribute(\"title\",this._componentItem.title),s.insertAdjacentText(\"afterbegin\",this._componentItem.title),this._proxyContainerElement.appendChild(this._componentItem.element)}determineMinMaxXY(){const t=this._layoutManager.groundItem;if(void 0===t)throw new J(\"DPDMMXY73109\");{const e=t.element.getBoundingClientRect();this._minX=e.left+document.body.scrollLeft,this._minY=e.top+document.body.scrollTop,this._maxX=this._minX+e.width,this._maxY=this._minY+e.height}}onDrag(t,e,i){const n=i.pageX,o=i.pageY;this.setDropPosition(n,o),this._componentItem.drag()}setDropPosition(t,e){this._layoutManager.layoutConfig.settings.constrainDragToContainer&&(t<=this._minX?t=Math.ceil(this._minX):t>=this._maxX&&(t=Math.floor(this._maxX)),e<=this._minY?e=Math.ceil(this._minY):e>=this._maxY&&(e=Math.floor(this._maxY))),this._element.style.left=zt(t),this._element.style.top=zt(e),this._area=this._layoutManager.getArea(t,e),null!==this._area&&(this._lastValidArea=this._area,this._area.contentItem.highlightDropZone(t,e,this._area))}onDrop(){const t=this._layoutManager.dropTargetIndicator;if(null===t)throw new K(\"DPOD30011\");let e;if(t.hide(),this._componentItem.exitDragMode(),null!==this._area)e=this._componentItem,this._area.contentItem.onDrop(e,this._area);else if(null!==this._lastValidArea){e=this._componentItem;this._lastValidArea.contentItem.onDrop(e,this._lastValidArea)}else this._originalParent?(e=this._componentItem,this._originalParent.addChild(e)):this._componentItem.destroy();this._element.remove(),this._layoutManager.emit(\"itemDropped\",this._componentItem),this._componentItemFocused&&void 0!==e&&e.focus()}setDimensions(){const t=this._layoutManager.layoutConfig.dimensions;if(void 0===t)throw new Error(\"DragProxy.setDimensions: dimensions undefined\");let e=t.dragProxyWidth,i=t.dragProxyHeight;if(void 0===e||void 0===i)throw new Error(\"DragProxy.setDimensions: width and/or height undefined\");const n=!1===this._layoutManager.layoutConfig.header.show?0:t.headerHeight;this._element.style.width=zt(e),this._element.style.height=zt(i),e-=this._sided?n:0,i-=this._sided?0:n,this._proxyContainerElement.style.width=zt(e),this._proxyContainerElement.style.height=zt(i),this._componentItem.enterDragMode(e,i),this._componentItem.show()}}class ne{constructor(t,e,i,n,o,s,r){this._layoutManager=t,this._element=e,this._extraAllowableChildTargets=i,this._componentTypeOrFtn=n,this._componentState=o,this._title=s,this._id=r,this._dragListener=null,this._dummyGroundContainer=document.createElement(\"div\");const a=gt.createDefault(\"row\");this._dummyGroundContentItem=new Yt(this._layoutManager,a,this._dummyGroundContainer),this.createDragListener()}destroy(){this.removeDragListener()}createDragListener(){this.removeDragListener(),this._dragListener=new Zt(this._element,this._extraAllowableChildTargets),this._dragListener.on(\"dragStart\",((t,e)=>this.onDragStart(t,e))),this._dragListener.on(\"dragStop\",(()=>this.onDragStop()))}onDragStart(t,e){var i;const n=\"component\";let o;if(\"function\"==typeof this._componentTypeOrFtn){const t=this._componentTypeOrFtn();o=ne.isDragSourceComponentItemConfig(t)?{type:n,componentState:t.state,componentType:t.type,title:null!==(i=t.title)&&void 0!==i?i:this._title}:t}else o={type:n,componentState:this._componentState,componentType:this._componentTypeOrFtn,title:this._title,id:this._id};const s=bt.resolve(o,!1),r=new jt(this._layoutManager,s,this._dummyGroundContentItem);if(this._dummyGroundContentItem.contentItems.push(r),null===this._dragListener)throw new K(\"DSODSD66746\");{const i=new ie(t,e,this._dragListener,this._layoutManager,r,this._dummyGroundContentItem),n=this._layoutManager.transitionIndicator;if(null===n)throw new K(\"DSODST66746\");n.transitionElements(this._element,i.element)}}onDragStop(){this.createDragListener()}removeDragListener(){null!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=null)}}!function(t){t.isDragSourceComponentItemConfig=function(t){return!(\"componentType\"in t)}}(ne||(ne={}));class oe{constructor(){this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_dropTargetIndicator\");const t=document.createElement(\"div\");t.classList.add(\"lm_inner\"),this._element.appendChild(t),document.body.appendChild(this._element)}destroy(){this._element.remove()}highlightArea(t,e){this._element.style.left=zt(t.x1+e),this._element.style.top=zt(t.y1+e),this._element.style.width=zt(t.x2-t.x1-e),this._element.style.height=zt(t.y2-t.y1-e),this._element.style.display=\"block\"}hide(){Dt(this._element,!1)}}class se{constructor(){this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_transition_indicator\"),document.body.appendChild(this._element),this._toElement=null,this._fromDimensions=null,this._totalAnimationDuration=200,this._animationStartTime=null}destroy(){this._element.remove()}transitionElements(t,e){}nextAnimationFrame(){}measure(t){const e=t.getBoundingClientRect();return{left:e.left,top:e.top,width:t.offsetWidth,height:t.offsetHeight}}}class re extends Wt{constructor(t){super(),this._layoutManager=t,this._childEventListener=t=>this.onEventFromChild(t),globalThis.addEventListener(re.ChildEventName,this._childEventListener,{passive:!0})}emit(t,...e){\"userBroadcast\"===t?this.emitUserBroadcast(...e):super.emit(t,...e)}emitUserBroadcast(...t){this.handleUserBroadcastEvent(\"userBroadcast\",t)}destroy(){globalThis.removeEventListener(re.ChildEventName,this._childEventListener)}handleUserBroadcastEvent(t,e){this._layoutManager.isSubWindow?this.propagateToParent(t,e):this.propagateToThisAndSubtree(t,e)}onEventFromChild(t){const e=t.detail;this.handleUserBroadcastEvent(e.eventName,e.args)}propagateToParent(t,e){const i={bubbles:!0,cancelable:!0,detail:{layoutManager:this._layoutManager,eventName:t,args:e}},n=new CustomEvent(re.ChildEventName,i),o=globalThis.opener;if(null===o)throw new K(\"EHPTP15778\");o.dispatchEvent(n)}propagateToThisAndSubtree(t,e){this.emitUnknown(t,...e);for(let i=0;ithis.handleContainerResize())),this._windowBeforeUnloadListener=()=>this.onBeforeUnload(),this._windowBeforeUnloadListening=!1,this._maximisedStackBeforeDestroyedListener=t=>this.cleanupBeforeMaximisedStackDestroyed(t),this.isSubWindow=t.isSubWindow,this._constructorOrSubWindowLayoutConfig=t.constructorOrSubWindowLayoutConfig,Q.checkInitialise(),dt.checkInitialise(),void 0!==t.containerElement&&(this._containerElement=t.containerElement)}get container(){return this._containerElement}get isInitialised(){return this._isInitialised}get groundItem(){return this._groundItem}get root(){return this._groundItem}get openPopouts(){return this._openPopouts}get dropTargetIndicator(){return this._dropTargetIndicator}get transitionIndicator(){return this._transitionIndicator}get width(){return this._width}get height(){return this._height}get eventHub(){return this._eventHub}get rootItem(){if(void 0===this._groundItem)throw new Error(\"Cannot access rootItem before init\");return 0===this._groundItem.contentItems.length?void 0:this._groundItem.contentItems[0]}get focusedComponentItem(){return this._focusedComponentItem}get tabDropPlaceholder(){return this._tabDropPlaceholder}get maximisedStack(){return this._maximisedStack}get deprecatedConstructor(){return!this.isSubWindow&&void 0!==this._constructorOrSubWindowLayoutConfig}destroy(){if(this._isInitialised){this._windowBeforeUnloadListening&&(globalThis.removeEventListener(\"beforeunload\",this._windowBeforeUnloadListener),this._windowBeforeUnloadListening=!1),!0===this.layoutConfig.settings.closePopoutsOnUnload&&this.closeAllOpenPopouts(),this._resizeObserver.disconnect(),this.checkClearResizeTimeout(),void 0!==this._groundItem&&this._groundItem.destroy(),this._tabDropPlaceholder.remove(),null!==this._dropTargetIndicator&&this._dropTargetIndicator.destroy(),null!==this._transitionIndicator&&this._transitionIndicator.destroy(),this._eventHub.destroy();for(const t of this._dragSources)t.destroy();this._dragSources=[],this._isInitialised=!1}}minifyConfig(t){return _t.minifyConfig(t)}unminifyConfig(t){return _t.unminifyConfig(t)}init(){let t;if(this.setContainer(),this._dropTargetIndicator=new oe,this._transitionIndicator=new se,this.updateSizeFromContainer(),this.isSubWindow){if(void 0===this._constructorOrSubWindowLayoutConfig)throw new J(\"LMIU07155\");{const e=this._constructorOrSubWindowLayoutConfig.root;if(void 0===e)throw new X(\"LMIC07156\");if(!Ct.isComponent(e))throw new X(\"LMIC07157\");t=e;const i=xt.resolve(this._constructorOrSubWindowLayoutConfig);this.layoutConfig=Object.assign(Object.assign({},i),{root:void 0})}}else void 0===this._constructorOrSubWindowLayoutConfig?this.layoutConfig=_t.createDefault():this.layoutConfig=xt.resolve(this._constructorOrSubWindowLayoutConfig);const e=this.layoutConfig;this._groundItem=new Yt(this,e.root,this._containerElement),this._groundItem.init(),this.checkLoadedLayoutMaximiseItem(),this._resizeObserver.observe(this._containerElement),this._isInitialised=!0,this.adjustColumnsResponsive(),this.emit(\"initialised\"),void 0!==t&&this.loadComponentAsRoot(t)}loadLayout(t){if(!this.isInitialised)throw new Error(\"GoldenLayout: Need to call init() if LayoutConfig with defined root passed to constructor\");if(void 0===this._groundItem)throw new J(\"LMLL11119\");this.createSubWindows(),this.layoutConfig=xt.resolve(t),this._groundItem.loadRoot(this.layoutConfig.root),this.checkLoadedLayoutMaximiseItem(),this.adjustColumnsResponsive()}saveLayout(){if(!1===this._isInitialised)throw new Error(\"Can't create config, layout not yet initialised\");if(void 0===this._groundItem)throw new J(\"LMTC18244\");{const t=this._groundItem.calculateConfigContent();let e;e=1!==t.length?void 0:t[0],this.reconcilePopoutWindows();const i=[];for(let t=0;t=0?n=this._groundItem.contentItems[0]:e=0;break;case at.row:case at.column:e=n.addItem(t,i.index);break;case at.stack:if(Ct.isComponent(t)){e=n.addItem(t,i.index);break}throw Error(tt[6]);case at.component:throw new X(\"LMAIALC87444602\");default:throw new Y(\"LMAIALU98881733\",n.type)}if(Ct.isComponent(t)){const t=n.contentItems[e];Gt.isStack(t)&&(n=t,e=0)}return i.parentItem=n,i.index=e,i}}}loadComponentAsRoot(t){if(void 0===this._groundItem)throw new Error(\"Cannot add item before init\");this._groundItem.loadComponentAsRoot(t)}updateSize(t,e){this.setSize(t,e)}setSize(t,e){if(this._width=t,this._height=e,!0===this._isInitialised){if(void 0===this._groundItem)throw new J(\"LMUS18881\");if(this._groundItem.setSize(this._width,this._height),this._maximisedStack){const{width:t,height:e}=kt(this._containerElement);Tt(this._maximisedStack.element,t),At(this._maximisedStack.element,e),this._maximisedStack.updateSize(!1)}this.adjustColumnsResponsive()}}beginSizeInvalidation(){this._sizeInvalidationBeginCount++}endSizeInvalidation(){0==--this._sizeInvalidationBeginCount&&this.updateSizeFromContainer()}updateSizeFromContainer(){const{width:t,height:e}=kt(this._containerElement);this.setSize(t,e)}updateRootSize(t=!1){if(void 0===this._groundItem)throw new J(\"LMURS28881\");this._groundItem.updateSize(t)}createAndInitContentItem(t,e){const i=this.createContentItem(t,e);return i.init(),i}createContentItem(t,e){if(\"string\"!=typeof t.type)throw new G(\"Missing parameter 'type'\",JSON.stringify(t));if(ct.isComponentItem(t)&&!(e instanceof ee)&&e&&!(!0===this.isSubWindow&&e instanceof Yt)){t={type:at.stack,content:[t],size:t.size,sizeUnit:t.sizeUnit,minSize:t.minSize,minSizeUnit:t.minSizeUnit,id:t.id,maximised:t.maximised,isClosable:t.isClosable,activeItemIndex:0,header:void 0}}return this.createContentItemFromConfig(t,e)}findFirstComponentItemById(t){if(void 0===this._groundItem)throw new J(\"LMFFCIBI82446\");return this.findFirstContentItemTypeByIdRecursive(at.component,t,this._groundItem)}createPopout(t,e,i,n){return t instanceof Gt?this.createPopoutFromContentItem(t,e,i,n):this.createPopoutFromItemConfig(t,e,i,n)}createPopoutFromContentItem(t,e,i,n){let o=t.parent,s=t;for(;null!==o&&1===o.contentItems.length&&!o.isGround;)s=o,o=o.parent;if(null===o)throw new K(\"LMCPFCI00834\");{if(void 0===n&&(n=o.contentItems.indexOf(s)),null!==i&&o.addPopInParentId(i),void 0===e){const i=globalThis.screenX||globalThis.screenLeft,n=globalThis.screenY||globalThis.screenTop,o=t.element.offsetLeft,s=t.element.offsetTop,{width:r,height:a}=kt(t.element);e={left:i+o,top:n+s,width:r,height:a}}const r=t.toConfig();if(t.remove(),ft.isRootItemConfig(r))return this.createPopoutFromItemConfig(r,e,i,n);throw new Error(`${tt[0]}`)}}beginVirtualSizedContainerAdding(){0==++this._virtualSizedContainerAddingBeginCount&&(this._virtualSizedContainers.length=0)}addVirtualSizedContainer(t){this._virtualSizedContainers.push(t)}endVirtualSizedContainerAdding(){if(0==--this._virtualSizedContainerAddingBeginCount){const t=this._virtualSizedContainers.length;if(t>0){this.fireBeforeVirtualRectingEvent(t);for(let e=0;ethis.emit(\"windowOpened\",a))),a.on(\"closed\",(()=>this.reconcilePopoutWindows())),this._openPopouts.push(a),this.layoutConfig.settings.closePopoutsOnUnload&&!this._windowBeforeUnloadListening&&(globalThis.addEventListener(\"beforeunload\",this._windowBeforeUnloadListener,{passive:!0}),this._windowBeforeUnloadListening=!0),a}closeAllOpenPopouts(){for(let t=0;tglobalThis.close()),1)}getArea(t,e){let i=null,n=1/0;for(let o=0;o=s.x1&&t=s.y1&&es.surface&&(n=s.surface,i=s)}return i}calculateItemAreas(){const t=this.getAllContentItems(),e=this._groundItem;if(void 0===e)throw new J(\"LMCIAR44365\");if(1!==t.length){e.contentItems[0].isStack?this._itemAreas=[]:this._itemAreas=e.createSideAreas();for(let e=0;e0){let e=t[0];if(Gt.isComponentItem(e)){const t=e.parent;if(null===t)throw new K(\"LMXLLMI69999\");e=t}if(!Gt.isStack(e))throw new X(\"LMCLLMI19993\");e.maximise()}}}processMaximiseStack(t){if(this._maximisedStack=t,t.on(\"beforeItemDestroyed\",this._maximisedStackBeforeDestroyedListener),t.element.classList.add(\"lm_maximised\"),t.element.insertAdjacentElement(\"afterend\",this._maximisePlaceholder),void 0===this._groundItem)throw new J(\"LMMXI19993\");{this._groundItem.element.prepend(t.element);const{width:e,height:i}=kt(this._containerElement);Tt(t.element,e),At(t.element,i),t.updateSize(!0),t.focusActiveContentItem(),this._maximisedStack.emit(\"maximised\"),this.emit(\"stateChanged\")}}processMinimiseMaximisedStack(){if(void 0===this._maximisedStack)throw new X(\"LMMMS74422\");{const t=this._maximisedStack;if(null===t.parent)throw new K(\"LMMI13668\");t.element.classList.remove(\"lm_maximised\"),this._maximisePlaceholder.insertAdjacentElement(\"afterend\",t.element),this._maximisePlaceholder.remove(),this.updateRootSize(!0),this._maximisedStack=void 0,t.off(\"beforeItemDestroyed\",this._maximisedStackBeforeDestroyedListener),t.emit(\"minimised\"),this.emit(\"stateChanged\")}}reconcilePopoutWindows(){const t=[];for(let e=0;e{this._resizeTimeoutId=void 0,this.beginSizeInvalidation(),this.endSizeInvalidation()}),this.resizeDebounceInterval))}checkClearResizeTimeout(){void 0!==this._resizeTimeoutId&&(clearTimeout(this._resizeTimeoutId),this._resizeTimeoutId=void 0)}setContainer(){var t;const e=document.body,i=null!==(t=this._containerElement)&&void 0!==t?t:e;if(i===e){this.resizeWithContainerAutomatically=!0;const t=document.documentElement;t.style.height=\"100%\",t.style.margin=\"0\",t.style.padding=\"0\",t.style.overflow=\"clip\",e.style.height=\"100%\",e.style.margin=\"0\",e.style.padding=\"0\",e.style.overflow=\"clip\"}this._containerElement=i}onBeforeUnload(){this.destroy()}adjustColumnsResponsive(){if(void 0===this._groundItem)throw new J(\"LMACR20883\");if(this._firstLoad=!1,this.useResponsiveLayout()&&!this._updatingColumnsResponsive&&this._groundItem.contentItems.length>0&&this._groundItem.contentItems[0].isRow){if(void 0===this._groundItem||null===this._width)throw new J(\"LMACR77412\");{const t=this._groundItem.contentItems[0].contentItems.length;if(t<=1)return;{const e=this.layoutConfig.dimensions.defaultMinItemWidth;if(t*e<=this._width)return;{this._updatingColumnsResponsive=!0;const i=t-Math.max(Math.floor(this._width/e),1),n=this._groundItem.contentItems[0],o=this.getAllStacks();if(0===o.length)throw new X(\"LMACRS77413\");{const t=o[0];for(let e=0;en?void 0:{parentItem:t,index:o}}}case 1:if(void 0===this._focusedComponentItem)return;{const t=this._focusedComponentItem.parentItem;return this.tryCreateLocationFromParentItem(t,e)}case 2:{const t=this.findFirstContentItemType(at.stack);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 3:{let t=this.findFirstContentItemType(at.row);return void 0!==t?this.tryCreateLocationFromParentItem(t,e):(t=this.findFirstContentItemType(at.column),void 0!==t?this.tryCreateLocationFromParentItem(t,e):void 0)}case 4:{const t=this.findFirstContentItemType(at.row);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 5:{const t=this.findFirstContentItemType(at.column);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 6:if(void 0===this._groundItem)throw new J(\"LMFLRIF18244\");return void 0!==this.rootItem?void 0:void 0===e||0===e?{parentItem:this._groundItem,index:0}:void 0;case 7:if(void 0===this._groundItem)throw new J(\"LMFLF18244\");{const t=this._groundItem.contentItems;if(0===t.length)return void 0===e||0===e?{parentItem:this._groundItem,index:0}:void 0;{const i=t[0];return this.tryCreateLocationFromParentItem(i,e)}}}}tryCreateLocationFromParentItem(t,e){const i=t.contentItems.length;return void 0===e?{parentItem:t,index:i}:e<0||e>i?void 0:{parentItem:t,index:e}}}!function(t){t.createMaximisePlaceElement=function(t){const e=t.createElement(\"div\");return e.classList.add(\"lm_maximise_place\"),e},t.createTabDropPlaceholderElement=function(t){const e=t.createElement(\"div\");return e.classList.add(\"lm_drop_tab_placeholder\"),e},t.defaultLocationSelectors=[{typeId:1,index:void 0},{typeId:2,index:void 0},{typeId:3,index:void 0},{typeId:7,index:void 0}],t.afterFocusedItemIfPossibleLocationSelectors=[{typeId:0,index:1},{typeId:2,index:void 0},{typeId:3,index:void 0},{typeId:7,index:void 0}]}(ae||(ae={}));class le extends ae{constructor(t,e,i,n){if(super(le.createLayoutManagerConstructorParameters(t,e)),this._bindComponentEventHanlderPassedInConstructor=!1,this._creationTimeoutPassed=!1,void 0!==e&&\"function\"==typeof e&&(this.bindComponentEvent=e,this._bindComponentEventHanlderPassedInConstructor=!0,void 0!==i&&(this.unbindComponentEvent=i)),!this._bindComponentEventHanlderPassedInConstructor&&this.isSubWindow){if(void 0===this._constructorOrSubWindowLayoutConfig)throw new J(\"VLC98823\");{const t=xt.resolve(this._constructorOrSubWindowLayoutConfig);this.layoutConfig=Object.assign(Object.assign({},t),{root:void 0})}}!0!==n&&(this.deprecatedConstructor||this.init())}destroy(){this.bindComponentEvent=void 0,this.unbindComponentEvent=void 0,super.destroy()}init(){if(this._bindComponentEventHanlderPassedInConstructor||\"loading\"!==document.readyState&&null!==document.body){if(!this._bindComponentEventHanlderPassedInConstructor&&!0===this.isSubWindow&&!this._creationTimeoutPassed)return setTimeout((()=>this.init()),7),void(this._creationTimeoutPassed=!0);!0===this.isSubWindow&&(this._bindComponentEventHanlderPassedInConstructor||this.clearHtmlAndAdjustStylesForSubWindow(),window.__glInstance=this),super.init()}else document.addEventListener(\"DOMContentLoaded\",(()=>this.init()),{passive:!0})}clearHtmlAndAdjustStylesForSubWindow(){const t=document.head,e=new Array(4);e[0]=document.querySelectorAll(\"body link\"),e[1]=document.querySelectorAll(\"body style\"),e[2]=document.querySelectorAll(\"template\"),e[3]=document.querySelectorAll(\".gl_keep\");for(let i=0;ithis.emit(\"popIn\"))),document.body.appendChild(t),!0}}bindComponent(t,e){if(void 0!==this.bindComponentEvent){return this.bindComponentEvent(t,e)}if(void 0!==this.getComponentEvent)return{virtual:!1,component:this.getComponentEvent(t,e)};{const t=`${tt[2]}: ${JSON.stringify(e)}`;throw new Z(t)}}unbindComponent(t,e,i){if(void 0!==this.unbindComponentEvent)this.unbindComponentEvent(t);else if(!e&&void 0!==this.releaseComponentEvent){if(void 0===i)throw new J(\"VCUCRCU333998\");this.releaseComponentEvent(t,i)}}}!function(t){let e=!1;t.createLayoutManagerConstructorParameters=function(t,i){const n=e?null:new URL(document.location.href).searchParams.get(\"gl-window\");e=!0;const o=null!==n;let s,r;if(null!==n){const e=localStorage.getItem(n);if(null===e)throw new Error(\"Null gl-window Config\");localStorage.removeItem(n);const i=JSON.parse(e),o=_t.unminifyConfig(i);r=xt.fromResolved(o),t instanceof HTMLElement&&(s=t)}else void 0===t?r=void 0:t instanceof HTMLElement?(r=void 0,s=t):r=t,void 0===s&&i instanceof HTMLElement&&(s=i);return{constructorOrSubWindowLayoutConfig:r,isSubWindow:o,containerElement:s}}}(le||(le={}));class he extends le{constructor(t,e,i){super(t,e,i,!0),this._componentTypesMap=new Map,this._registeredComponentMap=new Map,this._virtuableComponentMap=new Map,this._containerVirtualRectingRequiredEventListener=(t,e,i)=>this.handleContainerVirtualRectingRequiredEvent(t,e,i),this._containerVirtualVisibilityChangeRequiredEventListener=(t,e)=>this.handleContainerVirtualVisibilityChangeRequiredEvent(t,e),this._containerVirtualZIndexChangeRequiredEventListener=(t,e,i)=>this.handleContainerVirtualZIndexChangeRequiredEvent(t,e,i),this.deprecatedConstructor||this.init()}registerComponent(t,e,i=!1){if(\"function\"!=typeof e)throw new $(\"registerComponent() componentConstructorOrFactoryFtn parameter is not a function\");if(e.hasOwnProperty(\"prototype\")){const n=e;this.registerComponentConstructor(t,n,i)}else{const n=e;this.registerComponentFactoryFunction(t,n,i)}}registerComponentConstructor(t,e,i=!1){if(\"function\"!=typeof e)throw new Error(tt[1]);if(void 0!==this._componentTypesMap.get(t))throw new Z(`${tt[3]}: ${t}`);this._componentTypesMap.set(t,{constructor:e,factoryFunction:void 0,virtual:i})}registerComponentFactoryFunction(t,e,i=!1){if(\"function\"!=typeof e)throw new Z(\"Please register a constructor function\");if(void 0!==this._componentTypesMap.get(t))throw new Z(`${tt[3]}: ${t}`);this._componentTypesMap.set(t,{constructor:void 0,factoryFunction:e,virtual:i})}registerComponentFunction(t){this.registerGetComponentConstructorCallback(t)}registerGetComponentConstructorCallback(t){if(\"function\"!=typeof t)throw new Error(\"Please register a callback function\");void 0!==this._getComponentConstructorFtn&&console.warn(\"Multiple component functions are being registered. Only the final registered function will be used.\"),this._getComponentConstructorFtn=t}getRegisteredComponentTypeNames(){const t=this._componentTypesMap.keys();return Array.from(t)}getComponentInstantiator(t){let e;const i=pt.resolveComponentTypeName(t);return void 0!==i&&(e=this._componentTypesMap.get(i)),void 0===e&&void 0!==this._getComponentConstructorFtn&&(e={constructor:this._getComponentConstructorFtn(t),factoryFunction:void 0,virtual:!1}),e}bindComponent(t,e){let i;const n=pt.resolveComponentTypeName(e);let o;if(void 0!==n&&(i=this._componentTypesMap.get(n)),void 0===i&&void 0!==this._getComponentConstructorFtn&&(i={constructor:this._getComponentConstructorFtn(e),factoryFunction:void 0,virtual:!1}),void 0!==i){const s=i.virtual;let r,a;r=void 0===e.componentState?void 0:Ut({},e.componentState);const l=i.constructor;if(void 0!==l)a=new l(t,r,s);else{const e=i.factoryFunction;if(void 0===e)throw new X(\"LMBCFFU10008\");a=e(t,r,s)}if(s){if(void 0===a)throw new J(\"GLBCVCU988774\");{const e=a,i=e.rootHtmlElement;if(void 0===i)throw new Z(`${tt[5]}: ${n}`);!function(t){const e=\"absolute\";t.style.position!==e&&(t.style.position=e)}(i),this.container.appendChild(i),this._virtuableComponentMap.set(t,e),t.virtualRectingRequiredEvent=this._containerVirtualRectingRequiredEventListener,t.virtualVisibilityChangeRequiredEvent=this._containerVirtualVisibilityChangeRequiredEventListener,t.virtualZIndexChangeRequiredEvent=this._containerVirtualZIndexChangeRequiredEventListener}}this._registeredComponentMap.set(t,a),o={virtual:i.virtual,component:a}}else o=super.bindComponent(t,e);return o}unbindComponent(t,e,i){if(void 0===this._registeredComponentMap.get(t))super.unbindComponent(t,e,i);else{const e=this._virtuableComponentMap.get(t);if(void 0!==e){const i=e.rootHtmlElement;if(void 0===i)throw new X(\"GLUC77743\",t.title);this.container.removeChild(i),this._virtuableComponentMap.delete(t)}}}fireBeforeVirtualRectingEvent(t){this._goldenLayoutBoundingClientRect=this.container.getBoundingClientRect(),super.fireBeforeVirtualRectingEvent(t)}handleContainerVirtualRectingRequiredEvent(t,e,i){const n=this._virtuableComponentMap.get(t);if(void 0===n)throw new J(\"GLHCSCE55933\");{const o=n.rootHtmlElement;if(void 0===o)throw new Z(tt[4]+\" \"+t.title);{const n=t.element.getBoundingClientRect(),s=n.left-this._goldenLayoutBoundingClientRect.left;o.style.left=zt(s);const r=n.top-this._goldenLayoutBoundingClientRect.top;o.style.top=zt(r),Tt(o,e),At(o,i)}}}handleContainerVirtualVisibilityChangeRequiredEvent(t,e){const i=this._virtuableComponentMap.get(t);if(void 0===i)throw new J(\"GLHCVVCRE55934\");{const n=i.rootHtmlElement;if(void 0===n)throw new Z(tt[4]+\" \"+t.title);Dt(n,e)}}handleContainerVirtualZIndexChangeRequiredEvent(t,e,i){const n=this._virtuableComponentMap.get(t);if(void 0===n)throw new J(\"GLHCVZICRE55935\");{const e=n.rootHtmlElement;if(void 0===e)throw new Z(tt[4]+\" \"+t.title);e.style.zIndex=i}}}const de=\"initial_\",ce={show:\"top\",popout:!1,maximise:!1,close:\"close-tab-unused\"},me={headerHeight:31},ue={hasHeaders:!0,reorderEnabled:!0},pe={popoutWholeStack:!1,constrainDragToContainer:!1,constrainDragToHeaders:!1,preventDragout:!1,showMaximiseIcon:!1,showPopoutIcon:!1,showCloseIcon:!1,blockedPopoutsThrowError:!0,closePopoutsOnUnload:!0,selectionEnabled:!1};var ge,fe;class ve{constructor(e){this.layout=e,ge.set(this,void 0),fe.set(this,void 0),this.handleResize=t=>{t.forEach((t=>this.resizeElement(t.target)))},this.handleMutation=()=>{this.layout.viewComponentsByContainerElement.forEach((t=>{this.resizeElement(t.container.element)}))},t.__classPrivateFieldSet(this,ge,new ResizeObserver(this.handleResize),\"f\"),t.__classPrivateFieldSet(this,fe,new MutationObserver(this.handleMutation),\"f\")}observeMutations(e){t.__classPrivateFieldGet(this,fe,\"f\")?.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[\"class\"]})}destroy(){t.__classPrivateFieldGet(this,ge,\"f\").disconnect(),t.__classPrivateFieldGet(this,fe,\"f\").disconnect()}observeContainer(e){t.__classPrivateFieldGet(this,ge,\"f\").observe(e)}unobserveContainer(e){t.__classPrivateFieldGet(this,ge,\"f\").unobserve(e)}resizeElement(t){const e=this.layout.viewComponentsByContainerElement.get(t);e&&e.resize()}}ge=new WeakMap,fe=new WeakMap;var _e={};Object.defineProperty(_e,\"__esModule\",{value:!0});var ye=_e.BaseItem=void 0;class Ce{constructor(t,e,i){this._item=t,this._layout=e,this._wrap=i}get raw(){return this._item}get layout(){return this._layout}get type(){return this._item.type}get contentItems(){return(this._item.contentItems??[]).map((t=>this._wrap(t)))}get parent(){const t=this._item.parent;return t?this._wrap(t):null}setActiveContentItem(t,e){if(\"stack\"!==this.type)throw new Error(`Cannot call setActiveContentItem from a non-stack item: ${this.type}`);this._item.setActiveContentItem(t.raw,e)}static wrapInternal(t,e,i){const n=Ce.wrapCache.get(e);if(n)return n;const o=new t(e,i,(e=>Ce.wrapInternal(t,e,i)));return Ce.wrapCache.set(e,o),o}}ye=_e.BaseItem=Ce,Ce.wrapCache=new WeakMap;const we=t=>!!t&&\"contentItems\"in t&&(t.isRow||t.isColumn);class Ie extends ye{isRoot(){return!!this._item.parent?.isGround}getBounds(){return this._item.element.getBoundingClientRect()}get viewName(){if(this._item.isComponent){const{component:t}=this._item;return t.identity.name}throw new Error(\"View name not found\")}onDestroyed(t){const e=({target:i})=>{i===this._item&&(t(),this._item.off(\"itemDestroyed\",e))};this._item.on(\"itemDestroyed\",e)}createAdjacentStack({position:t=\"right\"}={}){const e=this.raw;if(ee.isStack(e)&&e.parent){const i=[\"top\",\"bottom\"].includes(t)?\"column\":\"row\",n=[\"left\",\"top\"].includes(t)?1:0,o=we(e.parent)?e.parent:e.layoutManager,s=o,r=e.parent.contentItems.indexOf(e);e.parent.isGround&&e.parent.removeChild(e,!0);const a=o.newItem({type:i,content:[{type:\"stack\",content:[]}]},r);if(!a)throw new Error(\"createAdjacentStack: Failed to create new container\");const l=a.contentItems[0];return a.addChild(this.raw,n),we(s)&&s.removeChild(e,!0),this._wrap(l)}throw new Error(`Cannot creat adjacent stacks for type: ${e.type}, must be type 'stack'`)}setActiveContentItem(t,e=!0){if(!ee.isStack(this._item))throw new Error(`Cannot call setActiveContentItem from a non-stack item: ${this.type}`);this._item.setActiveComponentItem(t.raw,!e)}static wrap(t,e){return ye.wrapInternal(Ie,t,e)}}function be(t=[],e){for(const i of t)\"component\"===i.type?Object.keys(e).forEach((t=>{t in i&&(i.componentState={[`${de}${t}`]:i[t],...i.componentState}),i[t]=e[t]})):be(i.content,e)}function Se(t=[],e,i){for(const n of t)if(\"component\"===n.type)Object.keys(e).forEach((t=>{if(`${de}${t}`in n.componentState)return n[t]=n.componentState[`${de}${t}`],void delete n.componentState[`${de}${t}`];n[t]=e[t]}));else{if(n.size&&(\"row\"===i||\"column\"===i)){n[\"row\"===i?\"width\":\"height\"]=n.size?.includes(\".\")?parseFloat(n.size):parseInt(n.size)}Se(n.content,e,n.type)}}function Ee(t){if(t.root){t.root.content&&Se([t.root],{componentName:\"view\",isClosable:!0});const e=t.root;t.content=[e],delete t.root}return t}const xe=e=>class extends e{connectedCallback(){if(!this.name||!this.uuid)throw new Error(\" Name or uuid attribute missing\");if(!this.src)throw new Error(\" missing 'src' attribute.\");this.#t||(this.#t=document.createElement(\"iframe\"),this.#t.src=this.src,this.#t.style.height=\"100%\",this.#t.style.width=\"100%\",this.#t.style.border=\"none\",this.forceFrameName?this.#t.setAttribute(\"name\",this.forceFrameName):this.#t.setAttribute(\"name\",t.encodeOptions({brokerUrl:this.brokerUrl,name:this.name,uuid:this.uuid,providerId:this.providerId,contextGroup:this.contextGroup},\"of-frame\")),this.#t.setAttribute(\"id\",this.name),this.appendChild(this.#t))}#t;get brokerUrl(){return this.getAttribute(\"of-broker\")}set brokerUrl(t){t&&this.setAttribute(\"of-broker\",t)}get name(){return this.getAttribute(\"of-name\")}set name(t){t&&this.setAttribute(\"of-name\",t)}get forceFrameName(){return this.getAttribute(\"forceFrameName\")}set forceFrameName(t){t&&this.setAttribute(\"forceFrameName\",t)}get uuid(){return this.getAttribute(\"of-uuid\")}set uuid(t){t&&this.setAttribute(\"of-uuid\",t)}get src(){return this.getAttribute(\"src\")}set src(t){t&&this.setAttribute(\"src\",t)}get providerId(){return this.getAttribute(\"of-provider-id\")}set providerId(t){t&&this.setAttribute(\"of-provider-id\",t)}get contextGroup(){return this.getAttribute(\"of-context-group\")}set contextGroup(t){t&&this.setAttribute(\"of-context-group\",t)}static get observedAttributes(){return[\"name\"]}};class Le{static create(t){const e=document.createElement(\"of-view\");return Object.entries(t).forEach((([t,i])=>{e.setAttribute(t,i)})),e}}customElements.define(\"of-view\",xe(HTMLElement));class ze{constructor(t,i,n,{brokerUrl:o,interopConfig:s},r){this.container=t,this.config=i,this.ofView=null,this.isDragging=()=>this.container.tab.element?.className.includes(\"lm_dragging\")??!1;const{url:a,web:l,interop:h,name:d}=i||{},c=d??`internal-generated-view-${e.v4()}`;if(this.identity={uuid:n,name:c},this.container.element.setAttribute(\"of-name\",c),this.container.element.id=`container-${c}`,this.container.parent.id=c,void 0===a)return void this.handleUrlMissing();const m=this.updateTitleIfNotSet(a),u={\"of-broker\":o,\"of-uuid\":n,\"of-name\":c,src:a};l?.frameName&&(u.forceFrameName=l.frameName);const p=h?.currentContextGroup??s?.currentContextGroup;p&&(u[\"of-context-group\"]=p),s?.providerId&&(u[\"of-provider-id\"]=s?.providerId),this.ofView=Le.create(u),this.ofView.title=m??`Iframe: ${a}`,r.appendChild(this.ofView),this.ofView.style.position=\"absolute\"}updateTitleIfNotSet(t){return\"view\"===this.container.parent.title&&this.container.parent.setTitle(t),this.container.parent.title}handleUrlMissing(){const t=document.createElement(\"div\");t.setAttribute(\"style\",\"padding: 20px\");t.innerText=\"No URL provided\",this.container.element.appendChild(t)}destroy(){this.ofView?.remove(),this.ofView=null}closeView(){this.container.close()}resize(){if(this.ofView){if(this.isDragging())return void(this.ofView.style.display=\"none\");const t=this.container.element.getBoundingClientRect();this.ofView.style.position=\"absolute\",this.ofView.style.height=`${t.height}px`,this.ofView.style.width=`${t.width}px`,this.ofView.style.inset=`${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`,this.ofView.style.display=\"block\"}}}class Me extends U{static overrideConfig(t){const e={...ue,...t.settings,...pe};return e.reorderEnabled?be(t.content,{isClosable:!0}):be(t.content,{reorderEnabled:!1}),{dimensions:me,...t,settings:e,header:{...ce,show:!1!==t.settings?.hasHeaders&&ce.show}}}constructor(t,e,i,{options:n},o,s){super(),this.identity=t,this.container=e,this.initialConfig=i,this.layoutManager=o,this.platformProvider=s,this.viewComponentsByContainerElement=new Map,this.layoutContentCache=_.getSingleInstance(),this.reparentingViews=new Set,this.goldenLayoutDestroyed=!1,this.createViewComponent=(t,e)=>{m.handleSharedView(this.layoutManager,this.identity,e);const i=new ze(t,e,this.identity.uuid,this.options,this.iframeContainer);return e&&!1===e[`${de}isClosable`]&&this.stylesheet.insertRule(`#tab-${i.identity.name} .lm_close_tab { display: none; }`),this.viewComponentsByContainerElement.set(t.element,i),this.resizeController.observeContainer(t.element),i},this.iframeContainer=document.createElement(\"div\"),this.iframeContainer.id=`openfin-layout-iframe-container-${this.identity.layoutName}`,this.domEmitter=new V(e),this.setupStylesheets(),this.layout=new he(this.container),this.layout.resizeWithContainerAutomatically=!0,this.options=n,this.layout.registerComponent(\"view\",this.createViewComponent),this.setupListeners(),this.resizeController=new ve(this),this.layout.loadLayout(Me.overrideConfig(i));const r=document.createElement(\"div\");r.id=`openfin-layout-shadow-container-${this.identity.layoutName}`,r.attachShadow({mode:\"open\",delegatesFocus:!1}).appendChild(this.iframeContainer),this.container.appendChild(r),this.resizeController.observeMutations(this.container)}getStackByView({name:t}){const e=this.layout.findFirstComponentItemById(t);if(e?.parent&&e?.parent?.isStack)return Ie.wrap(e.parent,this)}getRoot(){return Ie.wrap(this.layout.rootItem,this)}async platformCloseView(t){const e=[...this.viewComponentsByContainerElement.values()].find((e=>e.identity.name===t.name));if(!e)throw new Error(`View with name: ${t.name} not found in layout.`);e.closeView()}async platformCreateView(t,{location:e,targetView:i}={}){if(i)throw new Error(\"TargetView not supported in web\");const n={options:this.platformProvider.normalizeOptions(t),target:this.identity,location:e};return this.insertView(n)}setupStylesheets(){if(this.container.setAttribute(\"data-openfin-layout-name\",this.identity.layoutName),this.stylesheet=new CSSStyleSheet,this.stylesheet.insertRule(\".lm_close { display: none; }\"),document.adoptedStyleSheets.push(this.stylesheet),this.initialConfig.settings?.preventSplitterResize){const t=`\\n [data-openfin-layout-name='${this.identity.layoutName}'] .lm_splitter {\\n pointer-events: none;\\n }`;this.stylesheet.insertRule(t)}}insertView({options:t,location:e,targetView:i}){const n=e?this.layoutContentCache.getItemOrUndefined(e.id):void 0,o=i?this.layoutContentCache.getItemOrUndefined(i.name):void 0,s=n??o??Ie.wrap(this.layout.rootItem,this);let r;if(ee.isStack(s.raw))r=s.raw;else{if(!we(s.raw))throw new Error(\"Cannot add a view at the requested location\");r=s.raw.newItem({type:\"stack\",content:[]})}const a=Math.min(r.contentItems.length,e?.index??r.contentItems.length);let l=this.layout.findFirstComponentItemById(t.name);l?(l.parent&&l.parent.removeChild(l,!0),r.addChild(l,a)):l=r.newComponent(\"view\",t,t.title??t.url??\"Default Title\",a);const h=l.component.identity;return Promise.resolve({identity:h})}replaceView({viewToReplace:t,newView:e}){throw new Error(\"Method not implemented.\")}replaceLayout(t){throw new Error(\"Method not implemented.\")}async cleanupView(t){}applyPreset(t){throw new Error(\"Method not implemented.\")}getCurrentViews(){return[...this.viewComponentsByContainerElement.values()].map((t=>t.identity))}async getFrameSnapshot(){return Ee(xt.fromResolved(this.layout.toConfig()))}isVisible(){return W(this.container)}async onViewDetached({viewIdentity:t}){this.reparentingViews.add(t.name),this.platformCloseView(t)}async destroy(){this.goldenLayoutDestroyed||(this.goldenLayoutDestroyed=!0,this.layout.destroy()),this.iframeContainer.remove(),this.resizeController.destroy(),document.adoptedStyleSheets=document.adoptedStyleSheets.filter((t=>t!==this.stylesheet)),this.viewComponentsByContainerElement.clear()}setupListeners(){this.container.addEventListener(\"pointerdown\",(t=>{if(t.target instanceof HTMLElement){const e=t.target.classList;[\"lm_tab\",\"lm_title\",\"lm_splitter\",\"lm_drag_handle\"].some((t=>e.contains(t)))&&(this.handleDragStart(),2===t.button&&t.stopPropagation())}}),!0),document.addEventListener(\"pointerup\",(()=>this.handleDragEnd()),!0),this.layout.on(\"tabCreated\",(t=>{const e=t.componentItem.component;t.element.id=`tab-${e.identity.name}`,this.domEmitter.dispatchLocalEvent(\"tab-created\",e.identity)})),this.layout.on(\"itemCreated\",(({target:t})=>{const e=t;if(Gt.isComponentItem(e)){const t=e.component;this.domEmitter.dispatchLocalEvent(\"container-created\",t.identity)}})),this.layout.on(\"itemDestroyed\",(t=>{const e=t.target;if(Gt.isComponentItem(e)){const t=e.component;this.removeViewComponent(t)}})),this.layout.on(\"itemDropped\",(()=>{this.handleDragEnd()}))}handleDragStart(){this.iframeContainer.style.pointerEvents=\"none\"}handleDragEnd(){this.iframeContainer.style.pointerEvents=\"\"}removeViewComponent(t){if(t.config&&!1===t.config[`${de}isClosable`]){const e=[...this.stylesheet.cssRules].findIndex((e=>e.cssText.includes(`#tab-${t.identity.name}`)));this.stylesheet.deleteRule(e)}t.destroy(),this.viewComponentsByContainerElement.delete(t.container.element),this.resizeController.unobserveContainer(t.container.element),this.reparentingViews.has(t.identity.name)?this.reparentingViews.delete(t.identity.name):this.platformProvider.closeView(t.identity.name);0===this.getCurrentViews().length&&(this.goldenLayoutDestroyed||(this.goldenLayoutDestroyed=!0,m.handleLastViewRemoved(this.layoutManager,this.identity)))}}class Pe{constructor(t,e,i,n){this.windowIdentity=t,this.connectConfig=e,this.provider=i,this.fallbackContainer=n}async createLayout(t,e){if(!(\"container\"in t)&&!this.fallbackContainer)throw new Error(\"Container property is not optional in web\");const{layoutName:i}=t,n=t,o=this.provider.initLayoutViews(n),s=n.container??this.fallbackContainer,r={...this.windowIdentity,layoutName:i},a=new Me(r,s,o,this.connectConfig,e,this.provider);m.registerLayout(e,i,a),this.fallbackContainer=null}async getLayoutSnapshot(t){return t.getLayoutSnapshot()}async handleLastViewRemoved(t){}}class Te{static async init(e){const i=e.getFin().InterApplicationBus.Channel,n=await i.create(`custom-frame-${e.me.uuid}`);return n.setDefaultAction((async(t,{target:e,opts:i},o)=>{const s=n.connections.find((t=>t.name===e.name));if(s)return n.dispatch(s,t,{...i,target:e});throw new Error(`Client with name ${e.name} not found`)})),await t.relayChannelClientApi_1(n,\"layout-relay\"),new Te(e)}constructor(t){this.wire=t,this.viewNames=new Set}normalizeOptions(t,i=\"default\"){const n=this.wire.me.uuid;let{name:o=`internal-generated-view-${e.v4()}`}=t;return o.match(/^internal-generated-view-/)&&this.viewNames.has(o)&&\"duplicate\"===i&&(o=`internal-generated-view-${e.v4()}`),this.viewNames.add(o),{...t,name:o,uuid:n}}closeView(t){this.viewNames.delete(t)}initLayoutViews({layout:t,multiInstanceViewBehavior:e}){return H((t=>{if(\"component\"===t.type&&t.componentState){const i=this.normalizeOptions(t.componentState,e);return{...t,componentState:i}}return t}),t)}}var Ae;const ke=t=>t;Ae=new WeakMap,exports.WebLayoutEntryPoint=class{constructor(e){Ae.set(this,void 0),this.initLayoutManager=async(e,i,{container:n,layoutManagerOverride:o})=>{const s=await Te.init(i),r=o??ke,a=new Pe(i.me,t.__classPrivateFieldGet(this,Ae,\"f\"),s,n),l=new(r(m.createClosedConstructor(a)));return await M(i,l),l},this.applyLayoutSnapshot=async(e,i,n)=>{await i.applyLayoutSnapshot(t.__classPrivateFieldGet(this,Ae,\"f\").platform.layoutSnapshot)},this.createLayout=async(t,e)=>m.createLayout(t,e),this.destroyLayout=async(t,e)=>m.destroyLayout(t,e),t.__classPrivateFieldSet(this,Ae,e,\"f\")}};\n","'use strict'\n\nexports.byteLength = byteLength\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\nfor (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i]\n revLookup[code.charCodeAt(i)] = i\n}\n\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction getLens (b64) {\n var len = b64.length\n\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // Trim off extra bytes after placeholder bytes are found\n // See: https://github.com/beatgammit/base64-js/issues/42\n var validLen = b64.indexOf('=')\n if (validLen === -1) validLen = len\n\n var placeHoldersLen = validLen === len\n ? 0\n : 4 - (validLen % 4)\n\n return [validLen, placeHoldersLen]\n}\n\n// base64 is 4/3 + up to two characters of the original data\nfunction byteLength (b64) {\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction _byteLength (b64, validLen, placeHoldersLen) {\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction toByteArray (b64) {\n var tmp\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n\n var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))\n\n var curByte = 0\n\n // if there are placeholders, only get up to the last complete 4 chars\n var len = placeHoldersLen > 0\n ? validLen - 4\n : validLen\n\n var i\n for (i = 0; i < len; i += 4) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 18) |\n (revLookup[b64.charCodeAt(i + 1)] << 12) |\n (revLookup[b64.charCodeAt(i + 2)] << 6) |\n revLookup[b64.charCodeAt(i + 3)]\n arr[curByte++] = (tmp >> 16) & 0xFF\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 2) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 2) |\n (revLookup[b64.charCodeAt(i + 1)] >> 4)\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 1) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 10) |\n (revLookup[b64.charCodeAt(i + 1)] << 4) |\n (revLookup[b64.charCodeAt(i + 2)] >> 2)\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] +\n lookup[num >> 12 & 0x3F] +\n lookup[num >> 6 & 0x3F] +\n lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n var tmp\n var output = []\n for (var i = start; i < end; i += 3) {\n tmp =\n ((uint8[i] << 16) & 0xFF0000) +\n ((uint8[i + 1] << 8) & 0xFF00) +\n (uint8[i + 2] & 0xFF)\n output.push(tripletToBase64(tmp))\n }\n return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n var tmp\n var len = uint8.length\n var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n var parts = []\n var maxChunkLength = 16383 // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1]\n parts.push(\n lookup[tmp >> 2] +\n lookup[(tmp << 4) & 0x3F] +\n '=='\n )\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + uint8[len - 1]\n parts.push(\n lookup[tmp >> 10] +\n lookup[(tmp >> 4) & 0x3F] +\n lookup[(tmp << 2) & 0x3F] +\n '='\n )\n }\n\n return parts.join('')\n}\n","/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n/* eslint-disable no-proto */\n\n'use strict'\n\nconst base64 = require('base64-js')\nconst ieee754 = require('ieee754')\nconst customInspectSymbol =\n (typeof Symbol === 'function' && typeof Symbol['for'] === 'function') // eslint-disable-line dot-notation\n ? Symbol['for']('nodejs.util.inspect.custom') // eslint-disable-line dot-notation\n : null\n\nexports.Buffer = Buffer\nexports.SlowBuffer = SlowBuffer\nexports.INSPECT_MAX_BYTES = 50\n\nconst K_MAX_LENGTH = 0x7fffffff\nexports.kMaxLength = K_MAX_LENGTH\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Print warning and recommend using `buffer` v4.x which has an Object\n * implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * We report that the browser does not support typed arrays if the are not subclassable\n * using __proto__. Firefox 4-29 lacks support for adding new properties to `Uint8Array`\n * (See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438). IE 10 lacks support\n * for __proto__ and has a buggy typed array implementation.\n */\nBuffer.TYPED_ARRAY_SUPPORT = typedArraySupport()\n\nif (!Buffer.TYPED_ARRAY_SUPPORT && typeof console !== 'undefined' &&\n typeof console.error === 'function') {\n console.error(\n 'This browser lacks typed array (Uint8Array) support which is required by ' +\n '`buffer` v5.x. Use `buffer` v4.x if you require old browser support.'\n )\n}\n\nfunction typedArraySupport () {\n // Can typed array instances can be augmented?\n try {\n const arr = new Uint8Array(1)\n const proto = { foo: function () { return 42 } }\n Object.setPrototypeOf(proto, Uint8Array.prototype)\n Object.setPrototypeOf(arr, proto)\n return arr.foo() === 42\n } catch (e) {\n return false\n }\n}\n\nObject.defineProperty(Buffer.prototype, 'parent', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.buffer\n }\n})\n\nObject.defineProperty(Buffer.prototype, 'offset', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.byteOffset\n }\n})\n\nfunction createBuffer (length) {\n if (length > K_MAX_LENGTH) {\n throw new RangeError('The value \"' + length + '\" is invalid for option \"size\"')\n }\n // Return an augmented `Uint8Array` instance\n const buf = new Uint8Array(length)\n Object.setPrototypeOf(buf, Buffer.prototype)\n return buf\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new TypeError(\n 'The \"string\" argument must be of type string. Received type number'\n )\n }\n return allocUnsafe(arg)\n }\n return from(arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\nfunction from (value, encodingOrOffset, length) {\n if (typeof value === 'string') {\n return fromString(value, encodingOrOffset)\n }\n\n if (ArrayBuffer.isView(value)) {\n return fromArrayView(value)\n }\n\n if (value == null) {\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n }\n\n if (isInstance(value, ArrayBuffer) ||\n (value && isInstance(value.buffer, ArrayBuffer))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof SharedArrayBuffer !== 'undefined' &&\n (isInstance(value, SharedArrayBuffer) ||\n (value && isInstance(value.buffer, SharedArrayBuffer)))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof value === 'number') {\n throw new TypeError(\n 'The \"value\" argument must not be of type number. Received type number'\n )\n }\n\n const valueOf = value.valueOf && value.valueOf()\n if (valueOf != null && valueOf !== value) {\n return Buffer.from(valueOf, encodingOrOffset, length)\n }\n\n const b = fromObject(value)\n if (b) return b\n\n if (typeof Symbol !== 'undefined' && Symbol.toPrimitive != null &&\n typeof value[Symbol.toPrimitive] === 'function') {\n return Buffer.from(value[Symbol.toPrimitive]('string'), encodingOrOffset, length)\n }\n\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n return from(value, encodingOrOffset, length)\n}\n\n// Note: Change prototype *after* Buffer.from is defined to workaround Chrome bug:\n// https://github.com/feross/buffer/pull/148\nObject.setPrototypeOf(Buffer.prototype, Uint8Array.prototype)\nObject.setPrototypeOf(Buffer, Uint8Array)\n\nfunction assertSize (size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be of type number')\n } else if (size < 0) {\n throw new RangeError('The value \"' + size + '\" is invalid for option \"size\"')\n }\n}\n\nfunction alloc (size, fill, encoding) {\n assertSize(size)\n if (size <= 0) {\n return createBuffer(size)\n }\n if (fill !== undefined) {\n // Only pay attention to encoding if it's a string. This\n // prevents accidentally sending in a number that would\n // be interpreted as a start offset.\n return typeof encoding === 'string'\n ? createBuffer(size).fill(fill, encoding)\n : createBuffer(size).fill(fill)\n }\n return createBuffer(size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n return alloc(size, fill, encoding)\n}\n\nfunction allocUnsafe (size) {\n assertSize(size)\n return createBuffer(size < 0 ? 0 : checked(size) | 0)\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n return allocUnsafe(size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n return allocUnsafe(size)\n}\n\nfunction fromString (string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8'\n }\n\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n\n const length = byteLength(string, encoding) | 0\n let buf = createBuffer(length)\n\n const actual = buf.write(string, encoding)\n\n if (actual !== length) {\n // Writing a hex string, for example, that contains invalid characters will\n // cause everything after the first invalid character to be ignored. (e.g.\n // 'abxxcd' will be treated as 'ab')\n buf = buf.slice(0, actual)\n }\n\n return buf\n}\n\nfunction fromArrayLike (array) {\n const length = array.length < 0 ? 0 : checked(array.length) | 0\n const buf = createBuffer(length)\n for (let i = 0; i < length; i += 1) {\n buf[i] = array[i] & 255\n }\n return buf\n}\n\nfunction fromArrayView (arrayView) {\n if (isInstance(arrayView, Uint8Array)) {\n const copy = new Uint8Array(arrayView)\n return fromArrayBuffer(copy.buffer, copy.byteOffset, copy.byteLength)\n }\n return fromArrayLike(arrayView)\n}\n\nfunction fromArrayBuffer (array, byteOffset, length) {\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\"offset\" is outside of buffer bounds')\n }\n\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\"length\" is outside of buffer bounds')\n }\n\n let buf\n if (byteOffset === undefined && length === undefined) {\n buf = new Uint8Array(array)\n } else if (length === undefined) {\n buf = new Uint8Array(array, byteOffset)\n } else {\n buf = new Uint8Array(array, byteOffset, length)\n }\n\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(buf, Buffer.prototype)\n\n return buf\n}\n\nfunction fromObject (obj) {\n if (Buffer.isBuffer(obj)) {\n const len = checked(obj.length) | 0\n const buf = createBuffer(len)\n\n if (buf.length === 0) {\n return buf\n }\n\n obj.copy(buf, 0, 0, len)\n return buf\n }\n\n if (obj.length !== undefined) {\n if (typeof obj.length !== 'number' || numberIsNaN(obj.length)) {\n return createBuffer(0)\n }\n return fromArrayLike(obj)\n }\n\n if (obj.type === 'Buffer' && Array.isArray(obj.data)) {\n return fromArrayLike(obj.data)\n }\n}\n\nfunction checked (length) {\n // Note: cannot use `length < K_MAX_LENGTH` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= K_MAX_LENGTH) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + K_MAX_LENGTH.toString(16) + ' bytes')\n }\n return length | 0\n}\n\nfunction SlowBuffer (length) {\n if (+length != length) { // eslint-disable-line eqeqeq\n length = 0\n }\n return Buffer.alloc(+length)\n}\n\nBuffer.isBuffer = function isBuffer (b) {\n return b != null && b._isBuffer === true &&\n b !== Buffer.prototype // so Buffer.isBuffer(Buffer.prototype) will be false\n}\n\nBuffer.compare = function compare (a, b) {\n if (isInstance(a, Uint8Array)) a = Buffer.from(a, a.offset, a.byteLength)\n if (isInstance(b, Uint8Array)) b = Buffer.from(b, b.offset, b.byteLength)\n if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n throw new TypeError(\n 'The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array'\n )\n }\n\n if (a === b) return 0\n\n let x = a.length\n let y = b.length\n\n for (let i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i]\n y = b[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n switch (String(encoding).toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'latin1':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return true\n default:\n return false\n }\n}\n\nBuffer.concat = function concat (list, length) {\n if (!Array.isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n\n if (list.length === 0) {\n return Buffer.alloc(0)\n }\n\n let i\n if (length === undefined) {\n length = 0\n for (i = 0; i < list.length; ++i) {\n length += list[i].length\n }\n }\n\n const buffer = Buffer.allocUnsafe(length)\n let pos = 0\n for (i = 0; i < list.length; ++i) {\n let buf = list[i]\n if (isInstance(buf, Uint8Array)) {\n if (pos + buf.length > buffer.length) {\n if (!Buffer.isBuffer(buf)) buf = Buffer.from(buf)\n buf.copy(buffer, pos)\n } else {\n Uint8Array.prototype.set.call(\n buffer,\n buf,\n pos\n )\n }\n } else if (!Buffer.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n } else {\n buf.copy(buffer, pos)\n }\n pos += buf.length\n }\n return buffer\n}\n\nfunction byteLength (string, encoding) {\n if (Buffer.isBuffer(string)) {\n return string.length\n }\n if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) {\n return string.byteLength\n }\n if (typeof string !== 'string') {\n throw new TypeError(\n 'The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. ' +\n 'Received type ' + typeof string\n )\n }\n\n const len = string.length\n const mustMatch = (arguments.length > 2 && arguments[2] === true)\n if (!mustMatch && len === 0) return 0\n\n // Use a for loop to avoid recursion\n let loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'ascii':\n case 'latin1':\n case 'binary':\n return len\n case 'utf8':\n case 'utf-8':\n return utf8ToBytes(string).length\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return len * 2\n case 'hex':\n return len >>> 1\n case 'base64':\n return base64ToBytes(string).length\n default:\n if (loweredCase) {\n return mustMatch ? -1 : utf8ToBytes(string).length // assume utf8\n }\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n let loweredCase = false\n\n // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n // property of a typed array.\n\n // This behaves neither like String nor Uint8Array in that we set start/end\n // to their upper/lower bounds if the value passed is out of range.\n // undefined is handled specially as per ECMA-262 6th Edition,\n // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n if (start === undefined || start < 0) {\n start = 0\n }\n // Return early if start > this.length. Done here to prevent potential uint32\n // coercion fail below.\n if (start > this.length) {\n return ''\n }\n\n if (end === undefined || end > this.length) {\n end = this.length\n }\n\n if (end <= 0) {\n return ''\n }\n\n // Force coercion to uint32. This will also coerce falsey/NaN values to 0.\n end >>>= 0\n start >>>= 0\n\n if (end <= start) {\n return ''\n }\n\n if (!encoding) encoding = 'utf8'\n\n while (true) {\n switch (encoding) {\n case 'hex':\n return hexSlice(this, start, end)\n\n case 'utf8':\n case 'utf-8':\n return utf8Slice(this, start, end)\n\n case 'ascii':\n return asciiSlice(this, start, end)\n\n case 'latin1':\n case 'binary':\n return latin1Slice(this, start, end)\n\n case 'base64':\n return base64Slice(this, start, end)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return utf16leSlice(this, start, end)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = (encoding + '').toLowerCase()\n loweredCase = true\n }\n }\n}\n\n// This property is used by `Buffer.isBuffer` (and the `is-buffer` npm package)\n// to detect a Buffer instance. It's not possible to use `instanceof Buffer`\n// reliably in a browserify context because there could be multiple different\n// copies of the 'buffer' package in use. This method works even for Buffer\n// instances that were created from another copy of the `buffer` package.\n// See: https://github.com/feross/buffer/issues/154\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n const i = b[n]\n b[n] = b[m]\n b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n const len = this.length\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits')\n }\n for (let i = 0; i < len; i += 2) {\n swap(this, i, i + 1)\n }\n return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n const len = this.length\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits')\n }\n for (let i = 0; i < len; i += 4) {\n swap(this, i, i + 3)\n swap(this, i + 1, i + 2)\n }\n return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n const len = this.length\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits')\n }\n for (let i = 0; i < len; i += 8) {\n swap(this, i, i + 7)\n swap(this, i + 1, i + 6)\n swap(this, i + 2, i + 5)\n swap(this, i + 3, i + 4)\n }\n return this\n}\n\nBuffer.prototype.toString = function toString () {\n const length = this.length\n if (length === 0) return ''\n if (arguments.length === 0) return utf8Slice(this, 0, length)\n return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.toLocaleString = Buffer.prototype.toString\n\nBuffer.prototype.equals = function equals (b) {\n if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n if (this === b) return true\n return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n let str = ''\n const max = exports.INSPECT_MAX_BYTES\n str = this.toString('hex', 0, max).replace(/(.{2})/g, '$1 ').trim()\n if (this.length > max) str += ' ... '\n return ''\n}\nif (customInspectSymbol) {\n Buffer.prototype[customInspectSymbol] = Buffer.prototype.inspect\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n if (isInstance(target, Uint8Array)) {\n target = Buffer.from(target, target.offset, target.byteLength)\n }\n if (!Buffer.isBuffer(target)) {\n throw new TypeError(\n 'The \"target\" argument must be one of type Buffer or Uint8Array. ' +\n 'Received type ' + (typeof target)\n )\n }\n\n if (start === undefined) {\n start = 0\n }\n if (end === undefined) {\n end = target ? target.length : 0\n }\n if (thisStart === undefined) {\n thisStart = 0\n }\n if (thisEnd === undefined) {\n thisEnd = this.length\n }\n\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError('out of range index')\n }\n\n if (thisStart >= thisEnd && start >= end) {\n return 0\n }\n if (thisStart >= thisEnd) {\n return -1\n }\n if (start >= end) {\n return 1\n }\n\n start >>>= 0\n end >>>= 0\n thisStart >>>= 0\n thisEnd >>>= 0\n\n if (this === target) return 0\n\n let x = thisEnd - thisStart\n let y = end - start\n const len = Math.min(x, y)\n\n const thisCopy = this.slice(thisStart, thisEnd)\n const targetCopy = target.slice(start, end)\n\n for (let i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i]\n y = targetCopy[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (numberIsNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [val], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n let indexSize = 1\n let arrLength = arr.length\n let valLength = val.length\n\n if (encoding !== undefined) {\n encoding = String(encoding).toLowerCase()\n if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n encoding === 'utf16le' || encoding === 'utf-16le') {\n if (arr.length < 2 || val.length < 2) {\n return -1\n }\n indexSize = 2\n arrLength /= 2\n valLength /= 2\n byteOffset /= 2\n }\n }\n\n function read (buf, i) {\n if (indexSize === 1) {\n return buf[i]\n } else {\n return buf.readUInt16BE(i * indexSize)\n }\n }\n\n let i\n if (dir) {\n let foundIndex = -1\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1) foundIndex = i\n if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n } else {\n if (foundIndex !== -1) i -= i - foundIndex\n foundIndex = -1\n }\n }\n } else {\n if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n for (i = byteOffset; i >= 0; i--) {\n let found = true\n for (let j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false\n break\n }\n }\n if (found) return i\n }\n }\n\n return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n offset = Number(offset) || 0\n const remaining = buf.length - offset\n if (!length) {\n length = remaining\n } else {\n length = Number(length)\n if (length > remaining) {\n length = remaining\n }\n }\n\n const strLen = string.length\n\n if (length > strLen / 2) {\n length = strLen / 2\n }\n let i\n for (i = 0; i < length; ++i) {\n const parsed = parseInt(string.substr(i * 2, 2), 16)\n if (numberIsNaN(parsed)) return i\n buf[offset + i] = parsed\n }\n return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n // Buffer#write(string)\n if (offset === undefined) {\n encoding = 'utf8'\n length = this.length\n offset = 0\n // Buffer#write(string, encoding)\n } else if (length === undefined && typeof offset === 'string') {\n encoding = offset\n length = this.length\n offset = 0\n // Buffer#write(string, offset[, length][, encoding])\n } else if (isFinite(offset)) {\n offset = offset >>> 0\n if (isFinite(length)) {\n length = length >>> 0\n if (encoding === undefined) encoding = 'utf8'\n } else {\n encoding = length\n length = undefined\n }\n } else {\n throw new Error(\n 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n )\n }\n\n const remaining = this.length - offset\n if (length === undefined || length > remaining) length = remaining\n\n if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n throw new RangeError('Attempt to write outside buffer bounds')\n }\n\n if (!encoding) encoding = 'utf8'\n\n let loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'hex':\n return hexWrite(this, string, offset, length)\n\n case 'utf8':\n case 'utf-8':\n return utf8Write(this, string, offset, length)\n\n case 'ascii':\n case 'latin1':\n case 'binary':\n return asciiWrite(this, string, offset, length)\n\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return base64Write(this, string, offset, length)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return ucs2Write(this, string, offset, length)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0)\n }\n}\n\nfunction base64Slice (buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf)\n } else {\n return base64.fromByteArray(buf.slice(start, end))\n }\n}\n\nfunction utf8Slice (buf, start, end) {\n end = Math.min(buf.length, end)\n const res = []\n\n let i = start\n while (i < end) {\n const firstByte = buf[i]\n let codePoint = null\n let bytesPerSequence = (firstByte > 0xEF)\n ? 4\n : (firstByte > 0xDF)\n ? 3\n : (firstByte > 0xBF)\n ? 2\n : 1\n\n if (i + bytesPerSequence <= end) {\n let secondByte, thirdByte, fourthByte, tempCodePoint\n\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 0x80) {\n codePoint = firstByte\n }\n break\n case 2:\n secondByte = buf[i + 1]\n if ((secondByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n if (tempCodePoint > 0x7F) {\n codePoint = tempCodePoint\n }\n }\n break\n case 3:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n codePoint = tempCodePoint\n }\n }\n break\n case 4:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n fourthByte = buf[i + 3]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n codePoint = tempCodePoint\n }\n }\n }\n }\n\n if (codePoint === null) {\n // we did not generate a valid codePoint so insert a\n // replacement char (U+FFFD) and advance only 1 byte\n codePoint = 0xFFFD\n bytesPerSequence = 1\n } else if (codePoint > 0xFFFF) {\n // encode to utf16 (surrogate pair dance)\n codePoint -= 0x10000\n res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n codePoint = 0xDC00 | codePoint & 0x3FF\n }\n\n res.push(codePoint)\n i += bytesPerSequence\n }\n\n return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nconst MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n const len = codePoints.length\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n }\n\n // Decode in chunks to avoid \"call stack size exceeded\".\n let res = ''\n let i = 0\n while (i < len) {\n res += String.fromCharCode.apply(\n String,\n codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n )\n }\n return res\n}\n\nfunction asciiSlice (buf, start, end) {\n let ret = ''\n end = Math.min(buf.length, end)\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F)\n }\n return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n let ret = ''\n end = Math.min(buf.length, end)\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i])\n }\n return ret\n}\n\nfunction hexSlice (buf, start, end) {\n const len = buf.length\n\n if (!start || start < 0) start = 0\n if (!end || end < 0 || end > len) end = len\n\n let out = ''\n for (let i = start; i < end; ++i) {\n out += hexSliceLookupTable[buf[i]]\n }\n return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n const bytes = buf.slice(start, end)\n let res = ''\n // If bytes.length is odd, the last 8 bits must be ignored (same as node.js)\n for (let i = 0; i < bytes.length - 1; i += 2) {\n res += String.fromCharCode(bytes[i] + (bytes[i + 1] * 256))\n }\n return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n const len = this.length\n start = ~~start\n end = end === undefined ? len : ~~end\n\n if (start < 0) {\n start += len\n if (start < 0) start = 0\n } else if (start > len) {\n start = len\n }\n\n if (end < 0) {\n end += len\n if (end < 0) end = 0\n } else if (end > len) {\n end = len\n }\n\n if (end < start) end = start\n\n const newBuf = this.subarray(start, end)\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(newBuf, Buffer.prototype)\n\n return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUintLE =\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let val = this[offset]\n let mul = 1\n let i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUintBE =\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n checkOffset(offset, byteLength, this.length)\n }\n\n let val = this[offset + --byteLength]\n let mul = 1\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUint8 =\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n return this[offset]\n}\n\nBuffer.prototype.readUint16LE =\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUint16BE =\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUint32LE =\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return ((this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16)) +\n (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUint32BE =\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] * 0x1000000) +\n ((this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n this[offset + 3])\n}\n\nBuffer.prototype.readBigUInt64LE = defineBigIntMethod(function readBigUInt64LE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const lo = first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24\n\n const hi = this[++offset] +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n last * 2 ** 24\n\n return BigInt(lo) + (BigInt(hi) << BigInt(32))\n})\n\nBuffer.prototype.readBigUInt64BE = defineBigIntMethod(function readBigUInt64BE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const hi = first * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset]\n\n const lo = this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last\n\n return (BigInt(hi) << BigInt(32)) + BigInt(lo)\n})\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let val = this[offset]\n let mul = 1\n let i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let i = byteLength\n let mul = 1\n let val = this[offset + --i]\n while (i > 0 && (mul *= 0x100)) {\n val += this[offset + --i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n if (!(this[offset] & 0x80)) return (this[offset])\n return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n const val = this[offset] | (this[offset + 1] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n const val = this[offset + 1] | (this[offset] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16) |\n (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] << 24) |\n (this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n (this[offset + 3])\n}\n\nBuffer.prototype.readBigInt64LE = defineBigIntMethod(function readBigInt64LE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const val = this[offset + 4] +\n this[offset + 5] * 2 ** 8 +\n this[offset + 6] * 2 ** 16 +\n (last << 24) // Overflow\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24)\n})\n\nBuffer.prototype.readBigInt64BE = defineBigIntMethod(function readBigInt64BE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const val = (first << 24) + // Overflow\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset]\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last)\n})\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUintLE =\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n let mul = 1\n let i = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUintBE =\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n let i = byteLength - 1\n let mul = 1\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUint8 =\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeUint16LE =\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeUint16BE =\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeUint32LE =\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset + 3] = (value >>> 24)\n this[offset + 2] = (value >>> 16)\n this[offset + 1] = (value >>> 8)\n this[offset] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeUint32BE =\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nfunction wrtBigUInt64LE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7)\n\n let lo = Number(value & BigInt(0xffffffff))\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n return offset\n}\n\nfunction wrtBigUInt64BE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7)\n\n let lo = Number(value & BigInt(0xffffffff))\n buf[offset + 7] = lo\n lo = lo >> 8\n buf[offset + 6] = lo\n lo = lo >> 8\n buf[offset + 5] = lo\n lo = lo >> 8\n buf[offset + 4] = lo\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n buf[offset + 3] = hi\n hi = hi >> 8\n buf[offset + 2] = hi\n hi = hi >> 8\n buf[offset + 1] = hi\n hi = hi >> 8\n buf[offset] = hi\n return offset + 8\n}\n\nBuffer.prototype.writeBigUInt64LE = defineBigIntMethod(function writeBigUInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeBigUInt64BE = defineBigIntMethod(function writeBigUInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n let i = 0\n let mul = 1\n let sub = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n let i = byteLength - 1\n let mul = 1\n let sub = 0\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n if (value < 0) value = 0xff + value + 1\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n this[offset + 2] = (value >>> 16)\n this[offset + 3] = (value >>> 24)\n return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (value < 0) value = 0xffffffff + value + 1\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeBigInt64LE = defineBigIntMethod(function writeBigInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nBuffer.prototype.writeBigInt64BE = defineBigIntMethod(function writeBigInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n }\n ieee754.write(buf, value, offset, littleEndian, 23, 4)\n return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n }\n ieee754.write(buf, value, offset, littleEndian, 52, 8)\n return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n if (!Buffer.isBuffer(target)) throw new TypeError('argument should be a Buffer')\n if (!start) start = 0\n if (!end && end !== 0) end = this.length\n if (targetStart >= target.length) targetStart = target.length\n if (!targetStart) targetStart = 0\n if (end > 0 && end < start) end = start\n\n // Copy 0 bytes; we're done\n if (end === start) return 0\n if (target.length === 0 || this.length === 0) return 0\n\n // Fatal error conditions\n if (targetStart < 0) {\n throw new RangeError('targetStart out of bounds')\n }\n if (start < 0 || start >= this.length) throw new RangeError('Index out of range')\n if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n // Are we oob?\n if (end > this.length) end = this.length\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start\n }\n\n const len = end - start\n\n if (this === target && typeof Uint8Array.prototype.copyWithin === 'function') {\n // Use built-in when available, missing from IE11\n this.copyWithin(targetStart, start, end)\n } else {\n Uint8Array.prototype.set.call(\n target,\n this.subarray(start, end),\n targetStart\n )\n }\n\n return len\n}\n\n// Usage:\n// buffer.fill(number[, offset[, end]])\n// buffer.fill(buffer[, offset[, end]])\n// buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n // Handle string cases:\n if (typeof val === 'string') {\n if (typeof start === 'string') {\n encoding = start\n start = 0\n end = this.length\n } else if (typeof end === 'string') {\n encoding = end\n end = this.length\n }\n if (encoding !== undefined && typeof encoding !== 'string') {\n throw new TypeError('encoding must be a string')\n }\n if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n if (val.length === 1) {\n const code = val.charCodeAt(0)\n if ((encoding === 'utf8' && code < 128) ||\n encoding === 'latin1') {\n // Fast path: If `val` fits into a single byte, use that numeric value.\n val = code\n }\n }\n } else if (typeof val === 'number') {\n val = val & 255\n } else if (typeof val === 'boolean') {\n val = Number(val)\n }\n\n // Invalid ranges are not set to a default, so can range check early.\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError('Out of range index')\n }\n\n if (end <= start) {\n return this\n }\n\n start = start >>> 0\n end = end === undefined ? this.length : end >>> 0\n\n if (!val) val = 0\n\n let i\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val\n }\n } else {\n const bytes = Buffer.isBuffer(val)\n ? val\n : Buffer.from(val, encoding)\n const len = bytes.length\n if (len === 0) {\n throw new TypeError('The value \"' + val +\n '\" is invalid for argument \"value\"')\n }\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len]\n }\n }\n\n return this\n}\n\n// CUSTOM ERRORS\n// =============\n\n// Simplified versions from Node, changed for Buffer-only usage\nconst errors = {}\nfunction E (sym, getMessage, Base) {\n errors[sym] = class NodeError extends Base {\n constructor () {\n super()\n\n Object.defineProperty(this, 'message', {\n value: getMessage.apply(this, arguments),\n writable: true,\n configurable: true\n })\n\n // Add the error code to the name to include it in the stack trace.\n this.name = `${this.name} [${sym}]`\n // Access the stack to generate the error message including the error code\n // from the name.\n this.stack // eslint-disable-line no-unused-expressions\n // Reset the name to the actual name.\n delete this.name\n }\n\n get code () {\n return sym\n }\n\n set code (value) {\n Object.defineProperty(this, 'code', {\n configurable: true,\n enumerable: true,\n value,\n writable: true\n })\n }\n\n toString () {\n return `${this.name} [${sym}]: ${this.message}`\n }\n }\n}\n\nE('ERR_BUFFER_OUT_OF_BOUNDS',\n function (name) {\n if (name) {\n return `${name} is outside of buffer bounds`\n }\n\n return 'Attempt to access memory outside buffer bounds'\n }, RangeError)\nE('ERR_INVALID_ARG_TYPE',\n function (name, actual) {\n return `The \"${name}\" argument must be of type number. Received type ${typeof actual}`\n }, TypeError)\nE('ERR_OUT_OF_RANGE',\n function (str, range, input) {\n let msg = `The value of \"${str}\" is out of range.`\n let received = input\n if (Number.isInteger(input) && Math.abs(input) > 2 ** 32) {\n received = addNumericalSeparator(String(input))\n } else if (typeof input === 'bigint') {\n received = String(input)\n if (input > BigInt(2) ** BigInt(32) || input < -(BigInt(2) ** BigInt(32))) {\n received = addNumericalSeparator(received)\n }\n received += 'n'\n }\n msg += ` It must be ${range}. Received ${received}`\n return msg\n }, RangeError)\n\nfunction addNumericalSeparator (val) {\n let res = ''\n let i = val.length\n const start = val[0] === '-' ? 1 : 0\n for (; i >= start + 4; i -= 3) {\n res = `_${val.slice(i - 3, i)}${res}`\n }\n return `${val.slice(0, i)}${res}`\n}\n\n// CHECK FUNCTIONS\n// ===============\n\nfunction checkBounds (buf, offset, byteLength) {\n validateNumber(offset, 'offset')\n if (buf[offset] === undefined || buf[offset + byteLength] === undefined) {\n boundsError(offset, buf.length - (byteLength + 1))\n }\n}\n\nfunction checkIntBI (value, min, max, buf, offset, byteLength) {\n if (value > max || value < min) {\n const n = typeof min === 'bigint' ? 'n' : ''\n let range\n if (byteLength > 3) {\n if (min === 0 || min === BigInt(0)) {\n range = `>= 0${n} and < 2${n} ** ${(byteLength + 1) * 8}${n}`\n } else {\n range = `>= -(2${n} ** ${(byteLength + 1) * 8 - 1}${n}) and < 2 ** ` +\n `${(byteLength + 1) * 8 - 1}${n}`\n }\n } else {\n range = `>= ${min}${n} and <= ${max}${n}`\n }\n throw new errors.ERR_OUT_OF_RANGE('value', range, value)\n }\n checkBounds(buf, offset, byteLength)\n}\n\nfunction validateNumber (value, name) {\n if (typeof value !== 'number') {\n throw new errors.ERR_INVALID_ARG_TYPE(name, 'number', value)\n }\n}\n\nfunction boundsError (value, length, type) {\n if (Math.floor(value) !== value) {\n validateNumber(value, type)\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset', 'an integer', value)\n }\n\n if (length < 0) {\n throw new errors.ERR_BUFFER_OUT_OF_BOUNDS()\n }\n\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset',\n `>= ${type ? 1 : 0} and <= ${length}`,\n value)\n}\n\n// HELPER FUNCTIONS\n// ================\n\nconst INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n // Node takes equal signs as end of the Base64 encoding\n str = str.split('=')[0]\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = str.trim().replace(INVALID_BASE64_RE, '')\n // Node converts strings with length < 2 to ''\n if (str.length < 2) return ''\n // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n while (str.length % 4 !== 0) {\n str = str + '='\n }\n return str\n}\n\nfunction utf8ToBytes (string, units) {\n units = units || Infinity\n let codePoint\n const length = string.length\n let leadSurrogate = null\n const bytes = []\n\n for (let i = 0; i < length; ++i) {\n codePoint = string.charCodeAt(i)\n\n // is surrogate component\n if (codePoint > 0xD7FF && codePoint < 0xE000) {\n // last char was a lead\n if (!leadSurrogate) {\n // no lead yet\n if (codePoint > 0xDBFF) {\n // unexpected trail\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n } else if (i + 1 === length) {\n // unpaired lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n }\n\n // valid lead\n leadSurrogate = codePoint\n\n continue\n }\n\n // 2 leads in a row\n if (codePoint < 0xDC00) {\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n leadSurrogate = codePoint\n continue\n }\n\n // valid surrogate pair\n codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n } else if (leadSurrogate) {\n // valid bmp char, but last char was a lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n }\n\n leadSurrogate = null\n\n // encode utf8\n if (codePoint < 0x80) {\n if ((units -= 1) < 0) break\n bytes.push(codePoint)\n } else if (codePoint < 0x800) {\n if ((units -= 2) < 0) break\n bytes.push(\n codePoint >> 0x6 | 0xC0,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x10000) {\n if ((units -= 3) < 0) break\n bytes.push(\n codePoint >> 0xC | 0xE0,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x110000) {\n if ((units -= 4) < 0) break\n bytes.push(\n codePoint >> 0x12 | 0xF0,\n codePoint >> 0xC & 0x3F | 0x80,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else {\n throw new Error('Invalid code point')\n }\n }\n\n return bytes\n}\n\nfunction asciiToBytes (str) {\n const byteArray = []\n for (let i = 0; i < str.length; ++i) {\n // Node's code seems to be doing this and not & 0x7F..\n byteArray.push(str.charCodeAt(i) & 0xFF)\n }\n return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n let c, hi, lo\n const byteArray = []\n for (let i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0) break\n\n c = str.charCodeAt(i)\n hi = c >> 8\n lo = c % 256\n byteArray.push(lo)\n byteArray.push(hi)\n }\n\n return byteArray\n}\n\nfunction base64ToBytes (str) {\n return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n let i\n for (i = 0; i < length; ++i) {\n if ((i + offset >= dst.length) || (i >= src.length)) break\n dst[i + offset] = src[i]\n }\n return i\n}\n\n// ArrayBuffer or Uint8Array objects from other contexts (i.e. iframes) do not pass\n// the `instanceof` check but they should be treated as of that type.\n// See: https://github.com/feross/buffer/issues/166\nfunction isInstance (obj, type) {\n return obj instanceof type ||\n (obj != null && obj.constructor != null && obj.constructor.name != null &&\n obj.constructor.name === type.name)\n}\nfunction numberIsNaN (obj) {\n // For IE11 support\n return obj !== obj // eslint-disable-line no-self-compare\n}\n\n// Create lookup table for `toString('hex')`\n// See: https://github.com/feross/buffer/issues/219\nconst hexSliceLookupTable = (function () {\n const alphabet = '0123456789abcdef'\n const table = new Array(256)\n for (let i = 0; i < 16; ++i) {\n const i16 = i * 16\n for (let j = 0; j < 16; ++j) {\n table[i16 + j] = alphabet[i] + alphabet[j]\n }\n }\n return table\n})()\n\n// Return not function with Error if BigInt not supported\nfunction defineBigIntMethod (fn) {\n return typeof BigInt === 'undefined' ? BufferBigIntNotDefined : fn\n}\n\nfunction BufferBigIntNotDefined () {\n throw new Error('BigInt not supported')\n}\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\nvar R = typeof Reflect === 'object' ? Reflect : null\nvar ReflectApply = R && typeof R.apply === 'function'\n ? R.apply\n : function ReflectApply(target, receiver, args) {\n return Function.prototype.apply.call(target, receiver, args);\n }\n\nvar ReflectOwnKeys\nif (R && typeof R.ownKeys === 'function') {\n ReflectOwnKeys = R.ownKeys\n} else if (Object.getOwnPropertySymbols) {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target)\n .concat(Object.getOwnPropertySymbols(target));\n };\n} else {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target);\n };\n}\n\nfunction ProcessEmitWarning(warning) {\n if (console && console.warn) console.warn(warning);\n}\n\nvar NumberIsNaN = Number.isNaN || function NumberIsNaN(value) {\n return value !== value;\n}\n\nfunction EventEmitter() {\n EventEmitter.init.call(this);\n}\nmodule.exports = EventEmitter;\nmodule.exports.once = once;\n\n// Backwards-compat with node 0.10.x\nEventEmitter.EventEmitter = EventEmitter;\n\nEventEmitter.prototype._events = undefined;\nEventEmitter.prototype._eventsCount = 0;\nEventEmitter.prototype._maxListeners = undefined;\n\n// By default EventEmitters will print a warning if more than 10 listeners are\n// added to it. This is a useful default which helps finding memory leaks.\nvar defaultMaxListeners = 10;\n\nfunction checkListener(listener) {\n if (typeof listener !== 'function') {\n throw new TypeError('The \"listener\" argument must be of type Function. Received type ' + typeof listener);\n }\n}\n\nObject.defineProperty(EventEmitter, 'defaultMaxListeners', {\n enumerable: true,\n get: function() {\n return defaultMaxListeners;\n },\n set: function(arg) {\n if (typeof arg !== 'number' || arg < 0 || NumberIsNaN(arg)) {\n throw new RangeError('The value of \"defaultMaxListeners\" is out of range. It must be a non-negative number. Received ' + arg + '.');\n }\n defaultMaxListeners = arg;\n }\n});\n\nEventEmitter.init = function() {\n\n if (this._events === undefined ||\n this._events === Object.getPrototypeOf(this)._events) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n }\n\n this._maxListeners = this._maxListeners || undefined;\n};\n\n// Obviously not all Emitters should be limited to 10. This function allows\n// that to be increased. Set to zero for unlimited.\nEventEmitter.prototype.setMaxListeners = function setMaxListeners(n) {\n if (typeof n !== 'number' || n < 0 || NumberIsNaN(n)) {\n throw new RangeError('The value of \"n\" is out of range. It must be a non-negative number. Received ' + n + '.');\n }\n this._maxListeners = n;\n return this;\n};\n\nfunction _getMaxListeners(that) {\n if (that._maxListeners === undefined)\n return EventEmitter.defaultMaxListeners;\n return that._maxListeners;\n}\n\nEventEmitter.prototype.getMaxListeners = function getMaxListeners() {\n return _getMaxListeners(this);\n};\n\nEventEmitter.prototype.emit = function emit(type) {\n var args = [];\n for (var i = 1; i < arguments.length; i++) args.push(arguments[i]);\n var doError = (type === 'error');\n\n var events = this._events;\n if (events !== undefined)\n doError = (doError && events.error === undefined);\n else if (!doError)\n return false;\n\n // If there is no 'error' event listener then throw.\n if (doError) {\n var er;\n if (args.length > 0)\n er = args[0];\n if (er instanceof Error) {\n // Note: The comments on the `throw` lines are intentional, they show\n // up in Node's output if this results in an unhandled exception.\n throw er; // Unhandled 'error' event\n }\n // At least give some kind of context to the user\n var err = new Error('Unhandled error.' + (er ? ' (' + er.message + ')' : ''));\n err.context = er;\n throw err; // Unhandled 'error' event\n }\n\n var handler = events[type];\n\n if (handler === undefined)\n return false;\n\n if (typeof handler === 'function') {\n ReflectApply(handler, this, args);\n } else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n ReflectApply(listeners[i], this, args);\n }\n\n return true;\n};\n\nfunction _addListener(target, type, listener, prepend) {\n var m;\n var events;\n var existing;\n\n checkListener(listener);\n\n events = target._events;\n if (events === undefined) {\n events = target._events = Object.create(null);\n target._eventsCount = 0;\n } else {\n // To avoid recursion in the case that type === \"newListener\"! Before\n // adding it to the listeners, first emit \"newListener\".\n if (events.newListener !== undefined) {\n target.emit('newListener', type,\n listener.listener ? listener.listener : listener);\n\n // Re-assign `events` because a newListener handler could have caused the\n // this._events to be assigned to a new object\n events = target._events;\n }\n existing = events[type];\n }\n\n if (existing === undefined) {\n // Optimize the case of one listener. Don't need the extra array object.\n existing = events[type] = listener;\n ++target._eventsCount;\n } else {\n if (typeof existing === 'function') {\n // Adding the second element, need to change to array.\n existing = events[type] =\n prepend ? [listener, existing] : [existing, listener];\n // If we've already got an array, just append.\n } else if (prepend) {\n existing.unshift(listener);\n } else {\n existing.push(listener);\n }\n\n // Check for listener leak\n m = _getMaxListeners(target);\n if (m > 0 && existing.length > m && !existing.warned) {\n existing.warned = true;\n // No error code for this since it is a Warning\n // eslint-disable-next-line no-restricted-syntax\n var w = new Error('Possible EventEmitter memory leak detected. ' +\n existing.length + ' ' + String(type) + ' listeners ' +\n 'added. Use emitter.setMaxListeners() to ' +\n 'increase limit');\n w.name = 'MaxListenersExceededWarning';\n w.emitter = target;\n w.type = type;\n w.count = existing.length;\n ProcessEmitWarning(w);\n }\n }\n\n return target;\n}\n\nEventEmitter.prototype.addListener = function addListener(type, listener) {\n return _addListener(this, type, listener, false);\n};\n\nEventEmitter.prototype.on = EventEmitter.prototype.addListener;\n\nEventEmitter.prototype.prependListener =\n function prependListener(type, listener) {\n return _addListener(this, type, listener, true);\n };\n\nfunction onceWrapper() {\n if (!this.fired) {\n this.target.removeListener(this.type, this.wrapFn);\n this.fired = true;\n if (arguments.length === 0)\n return this.listener.call(this.target);\n return this.listener.apply(this.target, arguments);\n }\n}\n\nfunction _onceWrap(target, type, listener) {\n var state = { fired: false, wrapFn: undefined, target: target, type: type, listener: listener };\n var wrapped = onceWrapper.bind(state);\n wrapped.listener = listener;\n state.wrapFn = wrapped;\n return wrapped;\n}\n\nEventEmitter.prototype.once = function once(type, listener) {\n checkListener(listener);\n this.on(type, _onceWrap(this, type, listener));\n return this;\n};\n\nEventEmitter.prototype.prependOnceListener =\n function prependOnceListener(type, listener) {\n checkListener(listener);\n this.prependListener(type, _onceWrap(this, type, listener));\n return this;\n };\n\n// Emits a 'removeListener' event if and only if the listener was removed.\nEventEmitter.prototype.removeListener =\n function removeListener(type, listener) {\n var list, events, position, i, originalListener;\n\n checkListener(listener);\n\n events = this._events;\n if (events === undefined)\n return this;\n\n list = events[type];\n if (list === undefined)\n return this;\n\n if (list === listener || list.listener === listener) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else {\n delete events[type];\n if (events.removeListener)\n this.emit('removeListener', type, list.listener || listener);\n }\n } else if (typeof list !== 'function') {\n position = -1;\n\n for (i = list.length - 1; i >= 0; i--) {\n if (list[i] === listener || list[i].listener === listener) {\n originalListener = list[i].listener;\n position = i;\n break;\n }\n }\n\n if (position < 0)\n return this;\n\n if (position === 0)\n list.shift();\n else {\n spliceOne(list, position);\n }\n\n if (list.length === 1)\n events[type] = list[0];\n\n if (events.removeListener !== undefined)\n this.emit('removeListener', type, originalListener || listener);\n }\n\n return this;\n };\n\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\n\nEventEmitter.prototype.removeAllListeners =\n function removeAllListeners(type) {\n var listeners, events, i;\n\n events = this._events;\n if (events === undefined)\n return this;\n\n // not listening for removeListener, no need to emit\n if (events.removeListener === undefined) {\n if (arguments.length === 0) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n } else if (events[type] !== undefined) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else\n delete events[type];\n }\n return this;\n }\n\n // emit removeListener for all listeners on all events\n if (arguments.length === 0) {\n var keys = Object.keys(events);\n var key;\n for (i = 0; i < keys.length; ++i) {\n key = keys[i];\n if (key === 'removeListener') continue;\n this.removeAllListeners(key);\n }\n this.removeAllListeners('removeListener');\n this._events = Object.create(null);\n this._eventsCount = 0;\n return this;\n }\n\n listeners = events[type];\n\n if (typeof listeners === 'function') {\n this.removeListener(type, listeners);\n } else if (listeners !== undefined) {\n // LIFO order\n for (i = listeners.length - 1; i >= 0; i--) {\n this.removeListener(type, listeners[i]);\n }\n }\n\n return this;\n };\n\nfunction _listeners(target, type, unwrap) {\n var events = target._events;\n\n if (events === undefined)\n return [];\n\n var evlistener = events[type];\n if (evlistener === undefined)\n return [];\n\n if (typeof evlistener === 'function')\n return unwrap ? [evlistener.listener || evlistener] : [evlistener];\n\n return unwrap ?\n unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length);\n}\n\nEventEmitter.prototype.listeners = function listeners(type) {\n return _listeners(this, type, true);\n};\n\nEventEmitter.prototype.rawListeners = function rawListeners(type) {\n return _listeners(this, type, false);\n};\n\nEventEmitter.listenerCount = function(emitter, type) {\n if (typeof emitter.listenerCount === 'function') {\n return emitter.listenerCount(type);\n } else {\n return listenerCount.call(emitter, type);\n }\n};\n\nEventEmitter.prototype.listenerCount = listenerCount;\nfunction listenerCount(type) {\n var events = this._events;\n\n if (events !== undefined) {\n var evlistener = events[type];\n\n if (typeof evlistener === 'function') {\n return 1;\n } else if (evlistener !== undefined) {\n return evlistener.length;\n }\n }\n\n return 0;\n}\n\nEventEmitter.prototype.eventNames = function eventNames() {\n return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : [];\n};\n\nfunction arrayClone(arr, n) {\n var copy = new Array(n);\n for (var i = 0; i < n; ++i)\n copy[i] = arr[i];\n return copy;\n}\n\nfunction spliceOne(list, index) {\n for (; index + 1 < list.length; index++)\n list[index] = list[index + 1];\n list.pop();\n}\n\nfunction unwrapListeners(arr) {\n var ret = new Array(arr.length);\n for (var i = 0; i < ret.length; ++i) {\n ret[i] = arr[i].listener || arr[i];\n }\n return ret;\n}\n\nfunction once(emitter, name) {\n return new Promise(function (resolve, reject) {\n function errorListener(err) {\n emitter.removeListener(name, resolver);\n reject(err);\n }\n\n function resolver() {\n if (typeof emitter.removeListener === 'function') {\n emitter.removeListener('error', errorListener);\n }\n resolve([].slice.call(arguments));\n };\n\n eventTargetAgnosticAddListener(emitter, name, resolver, { once: true });\n if (name !== 'error') {\n addErrorHandlerIfEventEmitter(emitter, errorListener, { once: true });\n }\n });\n}\n\nfunction addErrorHandlerIfEventEmitter(emitter, handler, flags) {\n if (typeof emitter.on === 'function') {\n eventTargetAgnosticAddListener(emitter, 'error', handler, flags);\n }\n}\n\nfunction eventTargetAgnosticAddListener(emitter, name, listener, flags) {\n if (typeof emitter.on === 'function') {\n if (flags.once) {\n emitter.once(name, listener);\n } else {\n emitter.on(name, listener);\n }\n } else if (typeof emitter.addEventListener === 'function') {\n // EventTarget does not have `error` event semantics like Node\n // EventEmitters, we do not listen for `error` events here.\n emitter.addEventListener(name, function wrapListener(arg) {\n // IE does not have builtin `{ once: true }` support so we\n // have to do it manually.\n if (flags.once) {\n emitter.removeEventListener(name, wrapListener);\n }\n listener(arg);\n });\n } else {\n throw new TypeError('The \"emitter\" argument must be of type EventEmitter. Received type ' + typeof emitter);\n }\n}\n","/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */\nexports.read = function (buffer, offset, isLE, mLen, nBytes) {\n var e, m\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var nBits = -7\n var i = isLE ? (nBytes - 1) : 0\n var d = isLE ? -1 : 1\n var s = buffer[offset + i]\n\n i += d\n\n e = s & ((1 << (-nBits)) - 1)\n s >>= (-nBits)\n nBits += eLen\n for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & ((1 << (-nBits)) - 1)\n e >>= (-nBits)\n nBits += mLen\n for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias\n } else if (e === eMax) {\n return m ? NaN : ((s ? -1 : 1) * Infinity)\n } else {\n m = m + Math.pow(2, mLen)\n e = e - eBias\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n var i = isLE ? 0 : (nBytes - 1)\n var d = isLE ? 1 : -1\n var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n value = Math.abs(value)\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0\n e = eMax\n } else {\n e = Math.floor(Math.log(value) / Math.LN2)\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--\n c *= 2\n }\n if (e + eBias >= 1) {\n value += rt / c\n } else {\n value += rt * Math.pow(2, 1 - eBias)\n }\n if (value * c >= 2) {\n e++\n c /= 2\n }\n\n if (e + eBias >= eMax) {\n m = 0\n e = eMax\n } else if (e + eBias >= 1) {\n m = ((value * c) - 1) * Math.pow(2, mLen)\n e = e + eBias\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n e = 0\n }\n }\n\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n e = (e << mLen) | m\n eLen += mLen\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128\n}\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView');\n\nmodule.exports = DataView;\n","var hashClear = require('./_hashClear'),\n hashDelete = require('./_hashDelete'),\n hashGet = require('./_hashGet'),\n hashHas = require('./_hashHas'),\n hashSet = require('./_hashSet');\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\nmodule.exports = Hash;\n","var listCacheClear = require('./_listCacheClear'),\n listCacheDelete = require('./_listCacheDelete'),\n listCacheGet = require('./_listCacheGet'),\n listCacheHas = require('./_listCacheHas'),\n listCacheSet = require('./_listCacheSet');\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\nmodule.exports = ListCache;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map');\n\nmodule.exports = Map;\n","var mapCacheClear = require('./_mapCacheClear'),\n mapCacheDelete = require('./_mapCacheDelete'),\n mapCacheGet = require('./_mapCacheGet'),\n mapCacheHas = require('./_mapCacheHas'),\n mapCacheSet = require('./_mapCacheSet');\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\nmodule.exports = MapCache;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Promise = getNative(root, 'Promise');\n\nmodule.exports = Promise;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Set = getNative(root, 'Set');\n\nmodule.exports = Set;\n","var MapCache = require('./_MapCache'),\n setCacheAdd = require('./_setCacheAdd'),\n setCacheHas = require('./_setCacheHas');\n\n/**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\nfunction SetCache(values) {\n var index = -1,\n length = values == null ? 0 : values.length;\n\n this.__data__ = new MapCache;\n while (++index < length) {\n this.add(values[index]);\n }\n}\n\n// Add methods to `SetCache`.\nSetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\nSetCache.prototype.has = setCacheHas;\n\nmodule.exports = SetCache;\n","var ListCache = require('./_ListCache'),\n stackClear = require('./_stackClear'),\n stackDelete = require('./_stackDelete'),\n stackGet = require('./_stackGet'),\n stackHas = require('./_stackHas'),\n stackSet = require('./_stackSet');\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\nmodule.exports = Stack;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Uint8Array = root.Uint8Array;\n\nmodule.exports = Uint8Array;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar WeakMap = getNative(root, 'WeakMap');\n\nmodule.exports = WeakMap;\n","/**\n * A specialized version of `_.forEach` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\nfunction arrayEach(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (iteratee(array[index], index, array) === false) {\n break;\n }\n }\n return array;\n}\n\nmodule.exports = arrayEach;\n","/**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\nfunction arrayFilter(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result[resIndex++] = value;\n }\n }\n return result;\n}\n\nmodule.exports = arrayFilter;\n","var baseTimes = require('./_baseTimes'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isIndex = require('./_isIndex'),\n isTypedArray = require('./isTypedArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = arrayLikeKeys;\n","/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n}\n\nmodule.exports = arrayPush;\n","/**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\nfunction arraySome(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (predicate(array[index], index, array)) {\n return true;\n }\n }\n return false;\n}\n\nmodule.exports = arraySome;\n","var baseAssignValue = require('./_baseAssignValue'),\n eq = require('./eq');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\nmodule.exports = assignValue;\n","var eq = require('./eq');\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\nmodule.exports = assocIndexOf;\n","var copyObject = require('./_copyObject'),\n keys = require('./keys');\n\n/**\n * The base implementation of `_.assign` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssign(object, source) {\n return object && copyObject(source, keys(source), object);\n}\n\nmodule.exports = baseAssign;\n","var copyObject = require('./_copyObject'),\n keysIn = require('./keysIn');\n\n/**\n * The base implementation of `_.assignIn` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssignIn(object, source) {\n return object && copyObject(source, keysIn(source), object);\n}\n\nmodule.exports = baseAssignIn;\n","var defineProperty = require('./_defineProperty');\n\n/**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction baseAssignValue(object, key, value) {\n if (key == '__proto__' && defineProperty) {\n defineProperty(object, key, {\n 'configurable': true,\n 'enumerable': true,\n 'value': value,\n 'writable': true\n });\n } else {\n object[key] = value;\n }\n}\n\nmodule.exports = baseAssignValue;\n","var Stack = require('./_Stack'),\n arrayEach = require('./_arrayEach'),\n assignValue = require('./_assignValue'),\n baseAssign = require('./_baseAssign'),\n baseAssignIn = require('./_baseAssignIn'),\n cloneBuffer = require('./_cloneBuffer'),\n copyArray = require('./_copyArray'),\n copySymbols = require('./_copySymbols'),\n copySymbolsIn = require('./_copySymbolsIn'),\n getAllKeys = require('./_getAllKeys'),\n getAllKeysIn = require('./_getAllKeysIn'),\n getTag = require('./_getTag'),\n initCloneArray = require('./_initCloneArray'),\n initCloneByTag = require('./_initCloneByTag'),\n initCloneObject = require('./_initCloneObject'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isMap = require('./isMap'),\n isObject = require('./isObject'),\n isSet = require('./isSet'),\n keys = require('./keys'),\n keysIn = require('./keysIn');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_FLAT_FLAG = 2,\n CLONE_SYMBOLS_FLAG = 4;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values supported by `_.clone`. */\nvar cloneableTags = {};\ncloneableTags[argsTag] = cloneableTags[arrayTag] =\ncloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =\ncloneableTags[boolTag] = cloneableTags[dateTag] =\ncloneableTags[float32Tag] = cloneableTags[float64Tag] =\ncloneableTags[int8Tag] = cloneableTags[int16Tag] =\ncloneableTags[int32Tag] = cloneableTags[mapTag] =\ncloneableTags[numberTag] = cloneableTags[objectTag] =\ncloneableTags[regexpTag] = cloneableTags[setTag] =\ncloneableTags[stringTag] = cloneableTags[symbolTag] =\ncloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =\ncloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;\ncloneableTags[errorTag] = cloneableTags[funcTag] =\ncloneableTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.clone` and `_.cloneDeep` which tracks\n * traversed objects.\n *\n * @private\n * @param {*} value The value to clone.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Deep clone\n * 2 - Flatten inherited properties\n * 4 - Clone symbols\n * @param {Function} [customizer] The function to customize cloning.\n * @param {string} [key] The key of `value`.\n * @param {Object} [object] The parent object of `value`.\n * @param {Object} [stack] Tracks traversed objects and their clone counterparts.\n * @returns {*} Returns the cloned value.\n */\nfunction baseClone(value, bitmask, customizer, key, object, stack) {\n var result,\n isDeep = bitmask & CLONE_DEEP_FLAG,\n isFlat = bitmask & CLONE_FLAT_FLAG,\n isFull = bitmask & CLONE_SYMBOLS_FLAG;\n\n if (customizer) {\n result = object ? customizer(value, key, object, stack) : customizer(value);\n }\n if (result !== undefined) {\n return result;\n }\n if (!isObject(value)) {\n return value;\n }\n var isArr = isArray(value);\n if (isArr) {\n result = initCloneArray(value);\n if (!isDeep) {\n return copyArray(value, result);\n }\n } else {\n var tag = getTag(value),\n isFunc = tag == funcTag || tag == genTag;\n\n if (isBuffer(value)) {\n return cloneBuffer(value, isDeep);\n }\n if (tag == objectTag || tag == argsTag || (isFunc && !object)) {\n result = (isFlat || isFunc) ? {} : initCloneObject(value);\n if (!isDeep) {\n return isFlat\n ? copySymbolsIn(value, baseAssignIn(result, value))\n : copySymbols(value, baseAssign(result, value));\n }\n } else {\n if (!cloneableTags[tag]) {\n return object ? value : {};\n }\n result = initCloneByTag(value, tag, isDeep);\n }\n }\n // Check for circular references and return its corresponding clone.\n stack || (stack = new Stack);\n var stacked = stack.get(value);\n if (stacked) {\n return stacked;\n }\n stack.set(value, result);\n\n if (isSet(value)) {\n value.forEach(function(subValue) {\n result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));\n });\n } else if (isMap(value)) {\n value.forEach(function(subValue, key) {\n result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n }\n\n var keysFunc = isFull\n ? (isFlat ? getAllKeysIn : getAllKeys)\n : (isFlat ? keysIn : keys);\n\n var props = isArr ? undefined : keysFunc(value);\n arrayEach(props || value, function(subValue, key) {\n if (props) {\n key = subValue;\n subValue = value[key];\n }\n // Recursively populate clone (susceptible to call stack limits).\n assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n return result;\n}\n\nmodule.exports = baseClone;\n","var isObject = require('./isObject');\n\n/** Built-in value references. */\nvar objectCreate = Object.create;\n\n/**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} proto The object to inherit from.\n * @returns {Object} Returns the new object.\n */\nvar baseCreate = (function() {\n function object() {}\n return function(proto) {\n if (!isObject(proto)) {\n return {};\n }\n if (objectCreate) {\n return objectCreate(proto);\n }\n object.prototype = proto;\n var result = new object;\n object.prototype = undefined;\n return result;\n };\n}());\n\nmodule.exports = baseCreate;\n","var arrayPush = require('./_arrayPush'),\n isArray = require('./isArray');\n\n/**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction baseGetAllKeys(object, keysFunc, symbolsFunc) {\n var result = keysFunc(object);\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n}\n\nmodule.exports = baseGetAllKeys;\n","var Symbol = require('./_Symbol'),\n getRawTag = require('./_getRawTag'),\n objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]';\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\nmodule.exports = baseIsArguments;\n","var baseIsEqualDeep = require('./_baseIsEqualDeep'),\n isObjectLike = require('./isObjectLike');\n\n/**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Unordered comparison\n * 2 - Partial comparison\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\nfunction baseIsEqual(value, other, bitmask, customizer, stack) {\n if (value === other) {\n return true;\n }\n if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\n return value !== value && other !== other;\n }\n return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n}\n\nmodule.exports = baseIsEqual;\n","var Stack = require('./_Stack'),\n equalArrays = require('./_equalArrays'),\n equalByTag = require('./_equalByTag'),\n equalObjects = require('./_equalObjects'),\n getTag = require('./_getTag'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isTypedArray = require('./isTypedArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n var objIsArr = isArray(object),\n othIsArr = isArray(other),\n objTag = objIsArr ? arrayTag : getTag(object),\n othTag = othIsArr ? arrayTag : getTag(other);\n\n objTag = objTag == argsTag ? objectTag : objTag;\n othTag = othTag == argsTag ? objectTag : othTag;\n\n var objIsObj = objTag == objectTag,\n othIsObj = othTag == objectTag,\n isSameTag = objTag == othTag;\n\n if (isSameTag && isBuffer(object)) {\n if (!isBuffer(other)) {\n return false;\n }\n objIsArr = true;\n objIsObj = false;\n }\n if (isSameTag && !objIsObj) {\n stack || (stack = new Stack);\n return (objIsArr || isTypedArray(object))\n ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n }\n if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n if (objIsWrapped || othIsWrapped) {\n var objUnwrapped = objIsWrapped ? object.value() : object,\n othUnwrapped = othIsWrapped ? other.value() : other;\n\n stack || (stack = new Stack);\n return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n }\n }\n if (!isSameTag) {\n return false;\n }\n stack || (stack = new Stack);\n return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n}\n\nmodule.exports = baseIsEqualDeep;\n","var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]';\n\n/**\n * The base implementation of `_.isMap` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n */\nfunction baseIsMap(value) {\n return isObjectLike(value) && getTag(value) == mapTag;\n}\n\nmodule.exports = baseIsMap;\n","var isFunction = require('./isFunction'),\n isMasked = require('./_isMasked'),\n isObject = require('./isObject'),\n toSource = require('./_toSource');\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\nmodule.exports = baseIsNative;\n","var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar setTag = '[object Set]';\n\n/**\n * The base implementation of `_.isSet` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n */\nfunction baseIsSet(value) {\n return isObjectLike(value) && getTag(value) == setTag;\n}\n\nmodule.exports = baseIsSet;\n","var baseGetTag = require('./_baseGetTag'),\n isLength = require('./isLength'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n\nmodule.exports = baseIsTypedArray;\n","var isPrototype = require('./_isPrototype'),\n nativeKeys = require('./_nativeKeys');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeys;\n","var isObject = require('./isObject'),\n isPrototype = require('./_isPrototype'),\n nativeKeysIn = require('./_nativeKeysIn');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeysIn(object) {\n if (!isObject(object)) {\n return nativeKeysIn(object);\n }\n var isProto = isPrototype(object),\n result = [];\n\n for (var key in object) {\n if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeysIn;\n","/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\nmodule.exports = baseTimes;\n","/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n return function(value) {\n return func(value);\n };\n}\n\nmodule.exports = baseUnary;\n","/**\n * Checks if a `cache` value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction cacheHas(cache, key) {\n return cache.has(key);\n}\n\nmodule.exports = cacheHas;\n","var Uint8Array = require('./_Uint8Array');\n\n/**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\nfunction cloneArrayBuffer(arrayBuffer) {\n var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n return result;\n}\n\nmodule.exports = cloneArrayBuffer;\n","var root = require('./_root');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined,\n allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;\n\n/**\n * Creates a clone of `buffer`.\n *\n * @private\n * @param {Buffer} buffer The buffer to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Buffer} Returns the cloned buffer.\n */\nfunction cloneBuffer(buffer, isDeep) {\n if (isDeep) {\n return buffer.slice();\n }\n var length = buffer.length,\n result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\n\n buffer.copy(result);\n return result;\n}\n\nmodule.exports = cloneBuffer;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer');\n\n/**\n * Creates a clone of `dataView`.\n *\n * @private\n * @param {Object} dataView The data view to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned data view.\n */\nfunction cloneDataView(dataView, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;\n return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);\n}\n\nmodule.exports = cloneDataView;\n","/** Used to match `RegExp` flags from their coerced string values. */\nvar reFlags = /\\w*$/;\n\n/**\n * Creates a clone of `regexp`.\n *\n * @private\n * @param {Object} regexp The regexp to clone.\n * @returns {Object} Returns the cloned regexp.\n */\nfunction cloneRegExp(regexp) {\n var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));\n result.lastIndex = regexp.lastIndex;\n return result;\n}\n\nmodule.exports = cloneRegExp;\n","var Symbol = require('./_Symbol');\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * Creates a clone of the `symbol` object.\n *\n * @private\n * @param {Object} symbol The symbol object to clone.\n * @returns {Object} Returns the cloned symbol object.\n */\nfunction cloneSymbol(symbol) {\n return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};\n}\n\nmodule.exports = cloneSymbol;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer');\n\n/**\n * Creates a clone of `typedArray`.\n *\n * @private\n * @param {Object} typedArray The typed array to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned typed array.\n */\nfunction cloneTypedArray(typedArray, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n}\n\nmodule.exports = cloneTypedArray;\n","/**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\nfunction copyArray(source, array) {\n var index = -1,\n length = source.length;\n\n array || (array = Array(length));\n while (++index < length) {\n array[index] = source[index];\n }\n return array;\n}\n\nmodule.exports = copyArray;\n","var assignValue = require('./_assignValue'),\n baseAssignValue = require('./_baseAssignValue');\n\n/**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\nfunction copyObject(source, props, object, customizer) {\n var isNew = !object;\n object || (object = {});\n\n var index = -1,\n length = props.length;\n\n while (++index < length) {\n var key = props[index];\n\n var newValue = customizer\n ? customizer(object[key], source[key], key, object, source)\n : undefined;\n\n if (newValue === undefined) {\n newValue = source[key];\n }\n if (isNew) {\n baseAssignValue(object, key, newValue);\n } else {\n assignValue(object, key, newValue);\n }\n }\n return object;\n}\n\nmodule.exports = copyObject;\n","var copyObject = require('./_copyObject'),\n getSymbols = require('./_getSymbols');\n\n/**\n * Copies own symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbols(source, object) {\n return copyObject(source, getSymbols(source), object);\n}\n\nmodule.exports = copySymbols;\n","var copyObject = require('./_copyObject'),\n getSymbolsIn = require('./_getSymbolsIn');\n\n/**\n * Copies own and inherited symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbolsIn(source, object) {\n return copyObject(source, getSymbolsIn(source), object);\n}\n\nmodule.exports = copySymbolsIn;\n","var root = require('./_root');\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\nmodule.exports = coreJsData;\n","var getNative = require('./_getNative');\n\nvar defineProperty = (function() {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n}());\n\nmodule.exports = defineProperty;\n","var SetCache = require('./_SetCache'),\n arraySome = require('./_arraySome'),\n cacheHas = require('./_cacheHas');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\nfunction equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n arrLength = array.length,\n othLength = other.length;\n\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n return false;\n }\n // Check that cyclic values are equal.\n var arrStacked = stack.get(array);\n var othStacked = stack.get(other);\n if (arrStacked && othStacked) {\n return arrStacked == other && othStacked == array;\n }\n var index = -1,\n result = true,\n seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n stack.set(array, other);\n stack.set(other, array);\n\n // Ignore non-index properties.\n while (++index < arrLength) {\n var arrValue = array[index],\n othValue = other[index];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, arrValue, index, other, array, stack)\n : customizer(arrValue, othValue, index, array, other, stack);\n }\n if (compared !== undefined) {\n if (compared) {\n continue;\n }\n result = false;\n break;\n }\n // Recursively compare arrays (susceptible to call stack limits).\n if (seen) {\n if (!arraySome(other, function(othValue, othIndex) {\n if (!cacheHas(seen, othIndex) &&\n (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n return seen.push(othIndex);\n }\n })) {\n result = false;\n break;\n }\n } else if (!(\n arrValue === othValue ||\n equalFunc(arrValue, othValue, bitmask, customizer, stack)\n )) {\n result = false;\n break;\n }\n }\n stack['delete'](array);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalArrays;\n","var Symbol = require('./_Symbol'),\n Uint8Array = require('./_Uint8Array'),\n eq = require('./eq'),\n equalArrays = require('./_equalArrays'),\n mapToArray = require('./_mapToArray'),\n setToArray = require('./_setToArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]';\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n switch (tag) {\n case dataViewTag:\n if ((object.byteLength != other.byteLength) ||\n (object.byteOffset != other.byteOffset)) {\n return false;\n }\n object = object.buffer;\n other = other.buffer;\n\n case arrayBufferTag:\n if ((object.byteLength != other.byteLength) ||\n !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n return false;\n }\n return true;\n\n case boolTag:\n case dateTag:\n case numberTag:\n // Coerce booleans to `1` or `0` and dates to milliseconds.\n // Invalid dates are coerced to `NaN`.\n return eq(+object, +other);\n\n case errorTag:\n return object.name == other.name && object.message == other.message;\n\n case regexpTag:\n case stringTag:\n // Coerce regexes to strings and treat strings, primitives and objects,\n // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n // for more details.\n return object == (other + '');\n\n case mapTag:\n var convert = mapToArray;\n\n case setTag:\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n convert || (convert = setToArray);\n\n if (object.size != other.size && !isPartial) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked) {\n return stacked == other;\n }\n bitmask |= COMPARE_UNORDERED_FLAG;\n\n // Recursively compare objects (susceptible to call stack limits).\n stack.set(object, other);\n var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n stack['delete'](object);\n return result;\n\n case symbolTag:\n if (symbolValueOf) {\n return symbolValueOf.call(object) == symbolValueOf.call(other);\n }\n }\n return false;\n}\n\nmodule.exports = equalByTag;\n","var getAllKeys = require('./_getAllKeys');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n objProps = getAllKeys(object),\n objLength = objProps.length,\n othProps = getAllKeys(other),\n othLength = othProps.length;\n\n if (objLength != othLength && !isPartial) {\n return false;\n }\n var index = objLength;\n while (index--) {\n var key = objProps[index];\n if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n return false;\n }\n }\n // Check that cyclic values are equal.\n var objStacked = stack.get(object);\n var othStacked = stack.get(other);\n if (objStacked && othStacked) {\n return objStacked == other && othStacked == object;\n }\n var result = true;\n stack.set(object, other);\n stack.set(other, object);\n\n var skipCtor = isPartial;\n while (++index < objLength) {\n key = objProps[index];\n var objValue = object[key],\n othValue = other[key];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, objValue, key, other, object, stack)\n : customizer(objValue, othValue, key, object, other, stack);\n }\n // Recursively compare objects (susceptible to call stack limits).\n if (!(compared === undefined\n ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n : compared\n )) {\n result = false;\n break;\n }\n skipCtor || (skipCtor = key == 'constructor');\n }\n if (result && !skipCtor) {\n var objCtor = object.constructor,\n othCtor = other.constructor;\n\n // Non `Object` object instances with different constructors are not equal.\n if (objCtor != othCtor &&\n ('constructor' in object && 'constructor' in other) &&\n !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n result = false;\n }\n }\n stack['delete'](object);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalObjects;\n","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n","var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbols = require('./_getSymbols'),\n keys = require('./keys');\n\n/**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeys(object) {\n return baseGetAllKeys(object, keys, getSymbols);\n}\n\nmodule.exports = getAllKeys;\n","var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbolsIn = require('./_getSymbolsIn'),\n keysIn = require('./keysIn');\n\n/**\n * Creates an array of own and inherited enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeysIn(object) {\n return baseGetAllKeys(object, keysIn, getSymbolsIn);\n}\n\nmodule.exports = getAllKeysIn;\n","var isKeyable = require('./_isKeyable');\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\nmodule.exports = getMapData;\n","var baseIsNative = require('./_baseIsNative'),\n getValue = require('./_getValue');\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\nmodule.exports = getNative;\n","var overArg = require('./_overArg');\n\n/** Built-in value references. */\nvar getPrototype = overArg(Object.getPrototypeOf, Object);\n\nmodule.exports = getPrototype;\n","var Symbol = require('./_Symbol');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nmodule.exports = getRawTag;\n","var arrayFilter = require('./_arrayFilter'),\n stubArray = require('./stubArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n if (object == null) {\n return [];\n }\n object = Object(object);\n return arrayFilter(nativeGetSymbols(object), function(symbol) {\n return propertyIsEnumerable.call(object, symbol);\n });\n};\n\nmodule.exports = getSymbols;\n","var arrayPush = require('./_arrayPush'),\n getPrototype = require('./_getPrototype'),\n getSymbols = require('./_getSymbols'),\n stubArray = require('./stubArray');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own and inherited enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {\n var result = [];\n while (object) {\n arrayPush(result, getSymbols(object));\n object = getPrototype(object);\n }\n return result;\n};\n\nmodule.exports = getSymbolsIn;\n","var DataView = require('./_DataView'),\n Map = require('./_Map'),\n Promise = require('./_Promise'),\n Set = require('./_Set'),\n WeakMap = require('./_WeakMap'),\n baseGetTag = require('./_baseGetTag'),\n toSource = require('./_toSource');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n setTag = '[object Set]',\n weakMapTag = '[object WeakMap]';\n\nvar dataViewTag = '[object DataView]';\n\n/** Used to detect maps, sets, and weakmaps. */\nvar dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nvar getTag = baseGetTag;\n\n// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\nif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = baseGetTag(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : '';\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n}\n\nmodule.exports = getTag;\n","/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\nmodule.exports = getValue;\n","var nativeCreate = require('./_nativeCreate');\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n}\n\nmodule.exports = hashClear;\n","/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = hashDelete;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\nmodule.exports = hashGet;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\nmodule.exports = hashHas;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\nmodule.exports = hashSet;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Initializes an array clone.\n *\n * @private\n * @param {Array} array The array to clone.\n * @returns {Array} Returns the initialized clone.\n */\nfunction initCloneArray(array) {\n var length = array.length,\n result = new array.constructor(length);\n\n // Add properties assigned by `RegExp#exec`.\n if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {\n result.index = array.index;\n result.input = array.input;\n }\n return result;\n}\n\nmodule.exports = initCloneArray;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer'),\n cloneDataView = require('./_cloneDataView'),\n cloneRegExp = require('./_cloneRegExp'),\n cloneSymbol = require('./_cloneSymbol'),\n cloneTypedArray = require('./_cloneTypedArray');\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/**\n * Initializes an object clone based on its `toStringTag`.\n *\n * **Note:** This function only supports cloning values with tags of\n * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.\n *\n * @private\n * @param {Object} object The object to clone.\n * @param {string} tag The `toStringTag` of the object to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneByTag(object, tag, isDeep) {\n var Ctor = object.constructor;\n switch (tag) {\n case arrayBufferTag:\n return cloneArrayBuffer(object);\n\n case boolTag:\n case dateTag:\n return new Ctor(+object);\n\n case dataViewTag:\n return cloneDataView(object, isDeep);\n\n case float32Tag: case float64Tag:\n case int8Tag: case int16Tag: case int32Tag:\n case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:\n return cloneTypedArray(object, isDeep);\n\n case mapTag:\n return new Ctor;\n\n case numberTag:\n case stringTag:\n return new Ctor(object);\n\n case regexpTag:\n return cloneRegExp(object);\n\n case setTag:\n return new Ctor;\n\n case symbolTag:\n return cloneSymbol(object);\n }\n}\n\nmodule.exports = initCloneByTag;\n","var baseCreate = require('./_baseCreate'),\n getPrototype = require('./_getPrototype'),\n isPrototype = require('./_isPrototype');\n\n/**\n * Initializes an object clone.\n *\n * @private\n * @param {Object} object The object to clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneObject(object) {\n return (typeof object.constructor == 'function' && !isPrototype(object))\n ? baseCreate(getPrototype(object))\n : {};\n}\n\nmodule.exports = initCloneObject;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n var type = typeof value;\n length = length == null ? MAX_SAFE_INTEGER : length;\n\n return !!length &&\n (type == 'number' ||\n (type != 'symbol' && reIsUint.test(value))) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\nmodule.exports = isIndex;\n","/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\nmodule.exports = isKeyable;\n","var coreJsData = require('./_coreJsData');\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\nmodule.exports = isMasked;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\nmodule.exports = isPrototype;\n","/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n}\n\nmodule.exports = listCacheClear;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype;\n\n/** Built-in value references. */\nvar splice = arrayProto.splice;\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n}\n\nmodule.exports = listCacheDelete;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\nmodule.exports = listCacheGet;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\nmodule.exports = listCacheHas;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\nmodule.exports = listCacheSet;\n","var Hash = require('./_Hash'),\n ListCache = require('./_ListCache'),\n Map = require('./_Map');\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\nmodule.exports = mapCacheClear;\n","var getMapData = require('./_getMapData');\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = mapCacheDelete;\n","var getMapData = require('./_getMapData');\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\nmodule.exports = mapCacheGet;\n","var getMapData = require('./_getMapData');\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\nmodule.exports = mapCacheHas;\n","var getMapData = require('./_getMapData');\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n}\n\nmodule.exports = mapCacheSet;\n","/**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\nfunction mapToArray(map) {\n var index = -1,\n result = Array(map.size);\n\n map.forEach(function(value, key) {\n result[++index] = [key, value];\n });\n return result;\n}\n\nmodule.exports = mapToArray;\n","var getNative = require('./_getNative');\n\n/* Built-in method references that are verified to be native. */\nvar nativeCreate = getNative(Object, 'create');\n\nmodule.exports = nativeCreate;\n","var overArg = require('./_overArg');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeKeys = overArg(Object.keys, Object);\n\nmodule.exports = nativeKeys;\n","/**\n * This function is like\n * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * except that it includes inherited enumerable properties.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction nativeKeysIn(object) {\n var result = [];\n if (object != null) {\n for (var key in Object(object)) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = nativeKeysIn;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n try {\n // Use `util.types` for Node.js 10+.\n var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n if (types) {\n return types;\n }\n\n // Legacy `process.binding('util')` for Node.js < 10.\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n}());\n\nmodule.exports = nodeUtil;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n","/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\nmodule.exports = overArg;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n","/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\nfunction setCacheAdd(value) {\n this.__data__.set(value, HASH_UNDEFINED);\n return this;\n}\n\nmodule.exports = setCacheAdd;\n","/**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\nfunction setCacheHas(value) {\n return this.__data__.has(value);\n}\n\nmodule.exports = setCacheHas;\n","/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\nfunction setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n}\n\nmodule.exports = setToArray;\n","var ListCache = require('./_ListCache');\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}\n\nmodule.exports = stackClear;\n","/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n var data = this.__data__,\n result = data['delete'](key);\n\n this.size = data.size;\n return result;\n}\n\nmodule.exports = stackDelete;\n","/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n return this.__data__.get(key);\n}\n\nmodule.exports = stackGet;\n","/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n return this.__data__.has(key);\n}\n\nmodule.exports = stackHas;\n","var ListCache = require('./_ListCache'),\n Map = require('./_Map'),\n MapCache = require('./_MapCache');\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n var data = this.__data__;\n if (data instanceof ListCache) {\n var pairs = data.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n this.size = ++data.size;\n return this;\n }\n data = this.__data__ = new MapCache(pairs);\n }\n data.set(key, value);\n this.size = data.size;\n return this;\n}\n\nmodule.exports = stackSet;\n","/** Used for built-in method references. */\nvar funcProto = Function.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\nmodule.exports = toSource;\n","var baseClone = require('./_baseClone');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_SYMBOLS_FLAG = 4;\n\n/**\n * This method is like `_.clone` except that it recursively clones `value`.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Lang\n * @param {*} value The value to recursively clone.\n * @returns {*} Returns the deep cloned value.\n * @see _.clone\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var deep = _.cloneDeep(objects);\n * console.log(deep[0] === objects[0]);\n * // => false\n */\nfunction cloneDeep(value) {\n return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);\n}\n\nmodule.exports = cloneDeep;\n","/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\nmodule.exports = eq;\n","var baseIsArguments = require('./_baseIsArguments'),\n isObjectLike = require('./isObjectLike');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n};\n\nmodule.exports = isArguments;\n","/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\nmodule.exports = isArray;\n","var isFunction = require('./isFunction'),\n isLength = require('./isLength');\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\nmodule.exports = isArrayLike;\n","var root = require('./_root'),\n stubFalse = require('./stubFalse');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\nmodule.exports = isBuffer;\n","var baseIsEqual = require('./_baseIsEqual');\n\n/**\n * Performs a deep comparison between two values to determine if they are\n * equivalent.\n *\n * **Note:** This method supports comparing arrays, array buffers, booleans,\n * date objects, error objects, maps, numbers, `Object` objects, regexes,\n * sets, strings, symbols, and typed arrays. `Object` objects are compared\n * by their own, not inherited, enumerable properties. Functions and DOM\n * nodes are compared by strict equality, i.e. `===`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.isEqual(object, other);\n * // => true\n *\n * object === other;\n * // => false\n */\nfunction isEqual(value, other) {\n return baseIsEqual(value, other);\n}\n\nmodule.exports = isEqual;\n","var baseGetTag = require('./_baseGetTag'),\n isObject = require('./isObject');\n\n/** `Object#toString` result references. */\nvar asyncTag = '[object AsyncFunction]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n proxyTag = '[object Proxy]';\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\nmodule.exports = isFunction;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\nmodule.exports = isLength;\n","var baseIsMap = require('./_baseIsMap'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsMap = nodeUtil && nodeUtil.isMap;\n\n/**\n * Checks if `value` is classified as a `Map` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n * @example\n *\n * _.isMap(new Map);\n * // => true\n *\n * _.isMap(new WeakMap);\n * // => false\n */\nvar isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;\n\nmodule.exports = isMap;\n","/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n","var baseIsSet = require('./_baseIsSet'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsSet = nodeUtil && nodeUtil.isSet;\n\n/**\n * Checks if `value` is classified as a `Set` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n * @example\n *\n * _.isSet(new Set);\n * // => true\n *\n * _.isSet(new WeakSet);\n * // => false\n */\nvar isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;\n\nmodule.exports = isSet;\n","var baseIsTypedArray = require('./_baseIsTypedArray'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\nmodule.exports = isTypedArray;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeys = require('./_baseKeys'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\nmodule.exports = keys;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeysIn = require('./_baseKeysIn'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\nfunction keysIn(object) {\n return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n}\n\nmodule.exports = keysIn;\n","/**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\nfunction stubArray() {\n return [];\n}\n\nmodule.exports = stubArray;\n","/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n return false;\n}\n\nmodule.exports = stubFalse;\n","import { connect, type BaseConnectionOptions } from \"@openfin/core-web\";\nimport { getSettings } from \"./settings\";\n\n/**\n * Initializes the OpenFin Web Broker connection.\n * @param inherit Should we inherit settings from the host (available in the OpenFin layout system) or use settings? Default is true.\n */\nexport async function init(inherit: boolean = true): Promise {\n\t// Set window.fin to the `fin` object.\n\tlet options: BaseConnectionOptions | undefined;\n\tif (window.fin === undefined) {\n\t\tif (!inherit) {\n\t\t\tconst settings = await getSettings();\n\t\t\tif (settings === undefined) {\n\t\t\t\tconsole.error(\n\t\t\t\t\t\"Unable to run the sample as we have been unable to load the web manifest and it's settings from the currently running html page. Please ensure that the web manifest is being served and that it contains the custom_settings section.\"\n\t\t\t\t);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\toptions = {\n\t\t\t\tbrokerUrl: settings.platform.interop.brokerUrl,\n\t\t\t\tinteropConfig: {\n\t\t\t\t\tproviderId: settings.platform.interop.providerId,\n\t\t\t\t\tcurrentContextGroup: settings.platform.interop.defaultContextGroup\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t\t// Specify an interopConfig with a specific provider ID and a context group to initialize the `fin.me.interop` client on connection.\n\t\tif (options) {\n\t\t\twindow.fin = await connect({\n\t\t\t\toptions\n\t\t\t});\n\t\t} else {\n\t\t\twindow.fin = await connect({\n\t\t\t\tconnectionInheritance: \"enabled\"\n\t\t\t});\n\t\t}\n\t\tconsole.log(\"Finished initializing the fin API.\");\n\t\t// Create and dispatch the finReady event\n\t\tconst event = new CustomEvent(\"finReady\");\n\t\twindow.dispatchEvent(event);\n\t}\n\n\tif (window.fdc3 === undefined && window?.fin?.me.interop?.getFDC3Sync !== undefined) {\n\t\twindow.fdc3 = fin.me.interop.getFDC3Sync(\"2.0\");\n\t\tconsole.log(\"Finished initializing the fdc3 API.\");\n\t\t// Create and dispatch the FDC3Ready event\n\t\tconst event = new CustomEvent(\"fdc3Ready\");\n\t\twindow.dispatchEvent(event);\n\t}\n}\n","import type { WebLayoutSnapshot } from \"@openfin/core-web\";\nimport type { Settings } from \"../shapes/setting-shapes\";\n\n/**\n * Fetches the settings for the application.\n * @returns The settings for the application.\n */\nexport async function getSettings(): Promise {\n\tconst settings = await getManifestSettings();\n\tif (settings === undefined) {\n\t\tconsole.error(\n\t\t\t\"Unable to run the example as settings are required and we fetch them from the link web manifest from the html page that is being served. It should exist in the customSettings section of the web manifest.\"\n\t\t);\n\t}\n\treturn settings;\n}\n\n/**\n * Returns a default layout from the settings if provided.\n * @returns The default layout from the settings.\n */\nexport async function getDefaultLayout(): Promise {\n\tconst settings = await getSettings();\n\tif (settings?.platform?.layout?.defaultLayout === undefined) {\n\t\tconsole.error(\n\t\t\t\"Unable to run the example as without a layout being defined. Please ensure that settings have been provided in the web manifest.\"\n\t\t);\n\t\treturn;\n\t}\n\tif (typeof settings.platform.layout.defaultLayout === \"string\") {\n\t\tconst layoutResponse = await fetch(settings.platform.layout.defaultLayout);\n\t\tconst layoutJson = (await layoutResponse.json()) as WebLayoutSnapshot;\n\t\treturn layoutJson;\n\t}\n\treturn settings.platform.layout.defaultLayout;\n}\n\n/**\n * Returns a default layout from the settings if provided.\n * @returns The default layout from the settings.\n */\nexport async function getSecondLayout(): Promise {\n\tconst settings = await getSettings();\n\tif (settings?.platform?.layout?.secondLayout === undefined) {\n\t\tconsole.error(\n\t\t\t\"Unable to run the example as without a layout being defined. Please ensure that settings have been provided in the web manifest.\"\n\t\t);\n\t\treturn;\n\t}\n\tif (typeof settings.platform.layout.secondLayout === \"string\") {\n\t\tconst layoutResponse = await fetch(settings.platform.layout.secondLayout);\n\t\tconst layoutJson = (await layoutResponse.json()) as WebLayoutSnapshot;\n\t\treturn layoutJson;\n\t}\n\treturn settings.platform.layout.secondLayout;\n}\n/**\n * Returns the settings from the manifest file.\n * @returns customSettings for this example\n */\nasync function getManifestSettings(): Promise {\n\t// Get the manifest link\n\tconst link = document.querySelector('link[rel=\"manifest\"]');\n\tif (link !== null) {\n\t\tconst manifestResponse = await fetch(link.href);\n\t\tconst manifestJson = (await manifestResponse.json()) as { custom_settings: Settings };\n\t\treturn manifestJson.custom_settings;\n\t}\n}\n","export { default as v1 } from './v1.js';\nexport { default as v3 } from './v3.js';\nexport { default as v4 } from './v4.js';\nexport { default as v5 } from './v5.js';\nexport { default as NIL } from './nil.js';\nexport { default as version } from './version.js';\nexport { default as validate } from './validate.js';\nexport { default as stringify } from './stringify.js';\nexport { default as parse } from './parse.js';","/*\n * Browser-compatible JavaScript MD5\n *\n * Modification of JavaScript MD5\n * https://github.com/blueimp/JavaScript-MD5\n *\n * Copyright 2011, Sebastian Tschan\n * https://blueimp.net\n *\n * Licensed under the MIT license:\n * https://opensource.org/licenses/MIT\n *\n * Based on\n * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message\n * Digest Algorithm, as defined in RFC 1321.\n * Version 2.2 Copyright (C) Paul Johnston 1999 - 2009\n * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet\n * Distributed under the BSD License\n * See http://pajhome.org.uk/crypt/md5 for more info.\n */\nfunction md5(bytes) {\n if (typeof bytes === 'string') {\n var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape\n\n bytes = new Uint8Array(msg.length);\n\n for (var i = 0; i < msg.length; ++i) {\n bytes[i] = msg.charCodeAt(i);\n }\n }\n\n return md5ToHexEncodedArray(wordsToMd5(bytesToWords(bytes), bytes.length * 8));\n}\n/*\n * Convert an array of little-endian words to an array of bytes\n */\n\n\nfunction md5ToHexEncodedArray(input) {\n var output = [];\n var length32 = input.length * 32;\n var hexTab = '0123456789abcdef';\n\n for (var i = 0; i < length32; i += 8) {\n var x = input[i >> 5] >>> i % 32 & 0xff;\n var hex = parseInt(hexTab.charAt(x >>> 4 & 0x0f) + hexTab.charAt(x & 0x0f), 16);\n output.push(hex);\n }\n\n return output;\n}\n/**\n * Calculate output length with padding and bit length\n */\n\n\nfunction getOutputLength(inputLength8) {\n return (inputLength8 + 64 >>> 9 << 4) + 14 + 1;\n}\n/*\n * Calculate the MD5 of an array of little-endian words, and a bit length.\n */\n\n\nfunction wordsToMd5(x, len) {\n /* append padding */\n x[len >> 5] |= 0x80 << len % 32;\n x[getOutputLength(len) - 1] = len;\n var a = 1732584193;\n var b = -271733879;\n var c = -1732584194;\n var d = 271733878;\n\n for (var i = 0; i < x.length; i += 16) {\n var olda = a;\n var oldb = b;\n var oldc = c;\n var oldd = d;\n a = md5ff(a, b, c, d, x[i], 7, -680876936);\n d = md5ff(d, a, b, c, x[i + 1], 12, -389564586);\n c = md5ff(c, d, a, b, x[i + 2], 17, 606105819);\n b = md5ff(b, c, d, a, x[i + 3], 22, -1044525330);\n a = md5ff(a, b, c, d, x[i + 4], 7, -176418897);\n d = md5ff(d, a, b, c, x[i + 5], 12, 1200080426);\n c = md5ff(c, d, a, b, x[i + 6], 17, -1473231341);\n b = md5ff(b, c, d, a, x[i + 7], 22, -45705983);\n a = md5ff(a, b, c, d, x[i + 8], 7, 1770035416);\n d = md5ff(d, a, b, c, x[i + 9], 12, -1958414417);\n c = md5ff(c, d, a, b, x[i + 10], 17, -42063);\n b = md5ff(b, c, d, a, x[i + 11], 22, -1990404162);\n a = md5ff(a, b, c, d, x[i + 12], 7, 1804603682);\n d = md5ff(d, a, b, c, x[i + 13], 12, -40341101);\n c = md5ff(c, d, a, b, x[i + 14], 17, -1502002290);\n b = md5ff(b, c, d, a, x[i + 15], 22, 1236535329);\n a = md5gg(a, b, c, d, x[i + 1], 5, -165796510);\n d = md5gg(d, a, b, c, x[i + 6], 9, -1069501632);\n c = md5gg(c, d, a, b, x[i + 11], 14, 643717713);\n b = md5gg(b, c, d, a, x[i], 20, -373897302);\n a = md5gg(a, b, c, d, x[i + 5], 5, -701558691);\n d = md5gg(d, a, b, c, x[i + 10], 9, 38016083);\n c = md5gg(c, d, a, b, x[i + 15], 14, -660478335);\n b = md5gg(b, c, d, a, x[i + 4], 20, -405537848);\n a = md5gg(a, b, c, d, x[i + 9], 5, 568446438);\n d = md5gg(d, a, b, c, x[i + 14], 9, -1019803690);\n c = md5gg(c, d, a, b, x[i + 3], 14, -187363961);\n b = md5gg(b, c, d, a, x[i + 8], 20, 1163531501);\n a = md5gg(a, b, c, d, x[i + 13], 5, -1444681467);\n d = md5gg(d, a, b, c, x[i + 2], 9, -51403784);\n c = md5gg(c, d, a, b, x[i + 7], 14, 1735328473);\n b = md5gg(b, c, d, a, x[i + 12], 20, -1926607734);\n a = md5hh(a, b, c, d, x[i + 5], 4, -378558);\n d = md5hh(d, a, b, c, x[i + 8], 11, -2022574463);\n c = md5hh(c, d, a, b, x[i + 11], 16, 1839030562);\n b = md5hh(b, c, d, a, x[i + 14], 23, -35309556);\n a = md5hh(a, b, c, d, x[i + 1], 4, -1530992060);\n d = md5hh(d, a, b, c, x[i + 4], 11, 1272893353);\n c = md5hh(c, d, a, b, x[i + 7], 16, -155497632);\n b = md5hh(b, c, d, a, x[i + 10], 23, -1094730640);\n a = md5hh(a, b, c, d, x[i + 13], 4, 681279174);\n d = md5hh(d, a, b, c, x[i], 11, -358537222);\n c = md5hh(c, d, a, b, x[i + 3], 16, -722521979);\n b = md5hh(b, c, d, a, x[i + 6], 23, 76029189);\n a = md5hh(a, b, c, d, x[i + 9], 4, -640364487);\n d = md5hh(d, a, b, c, x[i + 12], 11, -421815835);\n c = md5hh(c, d, a, b, x[i + 15], 16, 530742520);\n b = md5hh(b, c, d, a, x[i + 2], 23, -995338651);\n a = md5ii(a, b, c, d, x[i], 6, -198630844);\n d = md5ii(d, a, b, c, x[i + 7], 10, 1126891415);\n c = md5ii(c, d, a, b, x[i + 14], 15, -1416354905);\n b = md5ii(b, c, d, a, x[i + 5], 21, -57434055);\n a = md5ii(a, b, c, d, x[i + 12], 6, 1700485571);\n d = md5ii(d, a, b, c, x[i + 3], 10, -1894986606);\n c = md5ii(c, d, a, b, x[i + 10], 15, -1051523);\n b = md5ii(b, c, d, a, x[i + 1], 21, -2054922799);\n a = md5ii(a, b, c, d, x[i + 8], 6, 1873313359);\n d = md5ii(d, a, b, c, x[i + 15], 10, -30611744);\n c = md5ii(c, d, a, b, x[i + 6], 15, -1560198380);\n b = md5ii(b, c, d, a, x[i + 13], 21, 1309151649);\n a = md5ii(a, b, c, d, x[i + 4], 6, -145523070);\n d = md5ii(d, a, b, c, x[i + 11], 10, -1120210379);\n c = md5ii(c, d, a, b, x[i + 2], 15, 718787259);\n b = md5ii(b, c, d, a, x[i + 9], 21, -343485551);\n a = safeAdd(a, olda);\n b = safeAdd(b, oldb);\n c = safeAdd(c, oldc);\n d = safeAdd(d, oldd);\n }\n\n return [a, b, c, d];\n}\n/*\n * Convert an array bytes to an array of little-endian words\n * Characters >255 have their high-byte silently ignored.\n */\n\n\nfunction bytesToWords(input) {\n if (input.length === 0) {\n return [];\n }\n\n var length8 = input.length * 8;\n var output = new Uint32Array(getOutputLength(length8));\n\n for (var i = 0; i < length8; i += 8) {\n output[i >> 5] |= (input[i / 8] & 0xff) << i % 32;\n }\n\n return output;\n}\n/*\n * Add integers, wrapping at 2^32. This uses 16-bit operations internally\n * to work around bugs in some JS interpreters.\n */\n\n\nfunction safeAdd(x, y) {\n var lsw = (x & 0xffff) + (y & 0xffff);\n var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n return msw << 16 | lsw & 0xffff;\n}\n/*\n * Bitwise rotate a 32-bit number to the left.\n */\n\n\nfunction bitRotateLeft(num, cnt) {\n return num << cnt | num >>> 32 - cnt;\n}\n/*\n * These functions implement the four basic operations the algorithm uses.\n */\n\n\nfunction md5cmn(q, a, b, x, s, t) {\n return safeAdd(bitRotateLeft(safeAdd(safeAdd(a, q), safeAdd(x, t)), s), b);\n}\n\nfunction md5ff(a, b, c, d, x, s, t) {\n return md5cmn(b & c | ~b & d, a, b, x, s, t);\n}\n\nfunction md5gg(a, b, c, d, x, s, t) {\n return md5cmn(b & d | c & ~d, a, b, x, s, t);\n}\n\nfunction md5hh(a, b, c, d, x, s, t) {\n return md5cmn(b ^ c ^ d, a, b, x, s, t);\n}\n\nfunction md5ii(a, b, c, d, x, s, t) {\n return md5cmn(c ^ (b | ~d), a, b, x, s, t);\n}\n\nexport default md5;","export default '00000000-0000-0000-0000-000000000000';","import validate from './validate.js';\n\nfunction parse(uuid) {\n if (!validate(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n var v;\n var arr = new Uint8Array(16); // Parse ########-....-....-....-............\n\n arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24;\n arr[1] = v >>> 16 & 0xff;\n arr[2] = v >>> 8 & 0xff;\n arr[3] = v & 0xff; // Parse ........-####-....-....-............\n\n arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8;\n arr[5] = v & 0xff; // Parse ........-....-####-....-............\n\n arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8;\n arr[7] = v & 0xff; // Parse ........-....-....-####-............\n\n arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8;\n arr[9] = v & 0xff; // Parse ........-....-....-....-############\n // (Use \"/\" to avoid 32-bit truncation when bit-shifting high-order bytes)\n\n arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff;\n arr[11] = v / 0x100000000 & 0xff;\n arr[12] = v >>> 24 & 0xff;\n arr[13] = v >>> 16 & 0xff;\n arr[14] = v >>> 8 & 0xff;\n arr[15] = v & 0xff;\n return arr;\n}\n\nexport default parse;","export default /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;","// Unique ID creation requires a high quality random # generator. In the browser we therefore\n// require the crypto API and do not support built-in fallback to lower quality random number\n// generators (like Math.random()).\nvar getRandomValues;\nvar rnds8 = new Uint8Array(16);\nexport default function rng() {\n // lazy load so that environments that need to polyfill have a chance to do so\n if (!getRandomValues) {\n // getRandomValues needs to be invoked in a context where \"this\" is a Crypto implementation. Also,\n // find the complete implementation of crypto (msCrypto) on IE11.\n getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto !== 'undefined' && typeof msCrypto.getRandomValues === 'function' && msCrypto.getRandomValues.bind(msCrypto);\n\n if (!getRandomValues) {\n throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');\n }\n }\n\n return getRandomValues(rnds8);\n}","// Adapted from Chris Veness' SHA1 code at\n// http://www.movable-type.co.uk/scripts/sha1.html\nfunction f(s, x, y, z) {\n switch (s) {\n case 0:\n return x & y ^ ~x & z;\n\n case 1:\n return x ^ y ^ z;\n\n case 2:\n return x & y ^ x & z ^ y & z;\n\n case 3:\n return x ^ y ^ z;\n }\n}\n\nfunction ROTL(x, n) {\n return x << n | x >>> 32 - n;\n}\n\nfunction sha1(bytes) {\n var K = [0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xca62c1d6];\n var H = [0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0];\n\n if (typeof bytes === 'string') {\n var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape\n\n bytes = [];\n\n for (var i = 0; i < msg.length; ++i) {\n bytes.push(msg.charCodeAt(i));\n }\n } else if (!Array.isArray(bytes)) {\n // Convert Array-like to Array\n bytes = Array.prototype.slice.call(bytes);\n }\n\n bytes.push(0x80);\n var l = bytes.length / 4 + 2;\n var N = Math.ceil(l / 16);\n var M = new Array(N);\n\n for (var _i = 0; _i < N; ++_i) {\n var arr = new Uint32Array(16);\n\n for (var j = 0; j < 16; ++j) {\n arr[j] = bytes[_i * 64 + j * 4] << 24 | bytes[_i * 64 + j * 4 + 1] << 16 | bytes[_i * 64 + j * 4 + 2] << 8 | bytes[_i * 64 + j * 4 + 3];\n }\n\n M[_i] = arr;\n }\n\n M[N - 1][14] = (bytes.length - 1) * 8 / Math.pow(2, 32);\n M[N - 1][14] = Math.floor(M[N - 1][14]);\n M[N - 1][15] = (bytes.length - 1) * 8 & 0xffffffff;\n\n for (var _i2 = 0; _i2 < N; ++_i2) {\n var W = new Uint32Array(80);\n\n for (var t = 0; t < 16; ++t) {\n W[t] = M[_i2][t];\n }\n\n for (var _t = 16; _t < 80; ++_t) {\n W[_t] = ROTL(W[_t - 3] ^ W[_t - 8] ^ W[_t - 14] ^ W[_t - 16], 1);\n }\n\n var a = H[0];\n var b = H[1];\n var c = H[2];\n var d = H[3];\n var e = H[4];\n\n for (var _t2 = 0; _t2 < 80; ++_t2) {\n var s = Math.floor(_t2 / 20);\n var T = ROTL(a, 5) + f(s, b, c, d) + e + K[s] + W[_t2] >>> 0;\n e = d;\n d = c;\n c = ROTL(b, 30) >>> 0;\n b = a;\n a = T;\n }\n\n H[0] = H[0] + a >>> 0;\n H[1] = H[1] + b >>> 0;\n H[2] = H[2] + c >>> 0;\n H[3] = H[3] + d >>> 0;\n H[4] = H[4] + e >>> 0;\n }\n\n return [H[0] >> 24 & 0xff, H[0] >> 16 & 0xff, H[0] >> 8 & 0xff, H[0] & 0xff, H[1] >> 24 & 0xff, H[1] >> 16 & 0xff, H[1] >> 8 & 0xff, H[1] & 0xff, H[2] >> 24 & 0xff, H[2] >> 16 & 0xff, H[2] >> 8 & 0xff, H[2] & 0xff, H[3] >> 24 & 0xff, H[3] >> 16 & 0xff, H[3] >> 8 & 0xff, H[3] & 0xff, H[4] >> 24 & 0xff, H[4] >> 16 & 0xff, H[4] >> 8 & 0xff, H[4] & 0xff];\n}\n\nexport default sha1;","import validate from './validate.js';\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\n\nvar byteToHex = [];\n\nfor (var i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).substr(1));\n}\n\nfunction stringify(arr) {\n var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n var uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!validate(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n\n return uuid;\n}\n\nexport default stringify;","import rng from './rng.js';\nimport stringify from './stringify.js'; // **`v1()` - Generate time-based UUID**\n//\n// Inspired by https://github.com/LiosK/UUID.js\n// and http://docs.python.org/library/uuid.html\n\nvar _nodeId;\n\nvar _clockseq; // Previous uuid creation time\n\n\nvar _lastMSecs = 0;\nvar _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details\n\nfunction v1(options, buf, offset) {\n var i = buf && offset || 0;\n var b = buf || new Array(16);\n options = options || {};\n var node = options.node || _nodeId;\n var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not\n // specified. We do this lazily to minimize issues related to insufficient\n // system entropy. See #189\n\n if (node == null || clockseq == null) {\n var seedBytes = options.random || (options.rng || rng)();\n\n if (node == null) {\n // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)\n node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]];\n }\n\n if (clockseq == null) {\n // Per 4.2.2, randomize (14 bit) clockseq\n clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;\n }\n } // UUID timestamps are 100 nano-second units since the Gregorian epoch,\n // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so\n // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'\n // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.\n\n\n var msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock\n // cycle to simulate higher resolution clock\n\n var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs)\n\n var dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression\n\n if (dt < 0 && options.clockseq === undefined) {\n clockseq = clockseq + 1 & 0x3fff;\n } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new\n // time interval\n\n\n if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {\n nsecs = 0;\n } // Per 4.2.1.2 Throw error if too many uuids are requested\n\n\n if (nsecs >= 10000) {\n throw new Error(\"uuid.v1(): Can't create more than 10M uuids/sec\");\n }\n\n _lastMSecs = msecs;\n _lastNSecs = nsecs;\n _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch\n\n msecs += 12219292800000; // `time_low`\n\n var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;\n b[i++] = tl >>> 24 & 0xff;\n b[i++] = tl >>> 16 & 0xff;\n b[i++] = tl >>> 8 & 0xff;\n b[i++] = tl & 0xff; // `time_mid`\n\n var tmh = msecs / 0x100000000 * 10000 & 0xfffffff;\n b[i++] = tmh >>> 8 & 0xff;\n b[i++] = tmh & 0xff; // `time_high_and_version`\n\n b[i++] = tmh >>> 24 & 0xf | 0x10; // include version\n\n b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)\n\n b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low`\n\n b[i++] = clockseq & 0xff; // `node`\n\n for (var n = 0; n < 6; ++n) {\n b[i + n] = node[n];\n }\n\n return buf || stringify(b);\n}\n\nexport default v1;","import v35 from './v35.js';\nimport md5 from './md5.js';\nvar v3 = v35('v3', 0x30, md5);\nexport default v3;","import stringify from './stringify.js';\nimport parse from './parse.js';\n\nfunction stringToBytes(str) {\n str = unescape(encodeURIComponent(str)); // UTF8 escape\n\n var bytes = [];\n\n for (var i = 0; i < str.length; ++i) {\n bytes.push(str.charCodeAt(i));\n }\n\n return bytes;\n}\n\nexport var DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8';\nexport var URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8';\nexport default function (name, version, hashfunc) {\n function generateUUID(value, namespace, buf, offset) {\n if (typeof value === 'string') {\n value = stringToBytes(value);\n }\n\n if (typeof namespace === 'string') {\n namespace = parse(namespace);\n }\n\n if (namespace.length !== 16) {\n throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)');\n } // Compute hash of namespace and value, Per 4.3\n // Future: Use spread syntax when supported on all platforms, e.g. `bytes =\n // hashfunc([...namespace, ... value])`\n\n\n var bytes = new Uint8Array(16 + value.length);\n bytes.set(namespace);\n bytes.set(value, namespace.length);\n bytes = hashfunc(bytes);\n bytes[6] = bytes[6] & 0x0f | version;\n bytes[8] = bytes[8] & 0x3f | 0x80;\n\n if (buf) {\n offset = offset || 0;\n\n for (var i = 0; i < 16; ++i) {\n buf[offset + i] = bytes[i];\n }\n\n return buf;\n }\n\n return stringify(bytes);\n } // Function#name is not settable on some platforms (#270)\n\n\n try {\n generateUUID.name = name; // eslint-disable-next-line no-empty\n } catch (err) {} // For CommonJS default export support\n\n\n generateUUID.DNS = DNS;\n generateUUID.URL = URL;\n return generateUUID;\n}","import rng from './rng.js';\nimport stringify from './stringify.js';\n\nfunction v4(options, buf, offset) {\n options = options || {};\n var rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n offset = offset || 0;\n\n for (var i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n\n return buf;\n }\n\n return stringify(rnds);\n}\n\nexport default v4;","import v35 from './v35.js';\nimport sha1 from './sha1.js';\nvar v5 = v35('v5', 0x50, sha1);\nexport default v5;","import REGEX from './regex.js';\n\nfunction validate(uuid) {\n return typeof uuid === 'string' && REGEX.test(uuid);\n}\n\nexport default validate;","import validate from './validate.js';\n\nfunction version(uuid) {\n if (!validate(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n return parseInt(uuid.substr(14, 1), 16);\n}\n\nexport default version;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = (module) => {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","import type { Context } from \"@finos/fdc3\";\nimport { init } from \"../platform/api\";\n\nwindow.addEventListener(\"DOMContentLoaded\", async () => {\n\tawait init(true);\n\tawait initializeDOM();\n});\n\n/**\n * Broadcasts a context using FDC3.\n */\nasync function setContext(): Promise {\n\tconst contextType = \"fdc3.instrument\";\n\tconst contextName = \"Tesla Inc.\";\n\tconst idData = {\n\t\tticker: \"TSLA\"\n\t};\n\tconst context = {\n\t\ttype: contextType,\n\t\tname: contextName,\n\t\tid: idData\n\t};\n\tif (window.fin) {\n\t\tawait window.fin.me.interop.setContext(context);\n\t\tconsole.log(`Set context: ${contextType} - ${contextName}`);\n\t} else {\n\t\twindow.addEventListener(\"finReady\", async () => {\n\t\t\tif (window.fin) {\n\t\t\t\tawait window.fin.me.interop.setContext(context);\n\t\t\t\tconsole.log(`Set context: ${contextType} - ${contextName}`);\n\t\t\t}\n\t\t});\n\t}\n}\n\n/**\n * Adds an interop context listener to the window.\n */\nasync function addContextListener(): Promise {\n\tif (window.fin) {\n\t\tawait window.fin.me.interop.addContextHandler((context: Context) => {\n\t\t\tupdateDOMElements(context);\n\t\t});\n\t} else {\n\t\twindow.addEventListener(\"finReady\", async () => {\n\t\t\tif (window.fin) {\n\t\t\t\tawait window.fin.me.interop.addContextHandler((context: Context) => {\n\t\t\t\t\tupdateDOMElements(context);\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t}\n}\n\n/**\n * Updates the DOM elements with the provided context.\n * @param context The context to update the DOM elements with.\n */\nfunction updateDOMElements(context: Context): void {\n\tconst contextTypeSpan = document.querySelector(\"#contextType\");\n\tconst contextNameSpan = document.querySelector(\"#contextName\");\n\tconst contextBodyPre = document.querySelector(\"#contextBody\");\n\n\tif (contextTypeSpan !== null && contextNameSpan !== null && contextBodyPre !== null) {\n\t\tcontextTypeSpan.textContent = context.type;\n\t\tcontextNameSpan.textContent = context.name ?? \"No name provided.\";\n\t\tcontextBodyPre.textContent = JSON.stringify(context, null, 2);\n\t}\n}\n\n/**\n * Initialize the DOM elements.\n */\nasync function initializeDOM(): Promise {\n\tconst setContextButton = document.querySelector(\"#setContext\");\n\n\tif (setContextButton !== null) {\n\t\tsetContextButton.addEventListener(\"click\", async () => {\n\t\t\tawait setContext();\n\t\t});\n\t}\n\n\tawait addContextListener();\n}\n"],"names":[],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"interop-view.bundle.js","mappings":";;;;;;;;;;AAAa,MAAM,mBAAO,CAAC,qFAAoB,EAAE,mBAAO,CAAC,mDAAS,EAAE,mBAAO,CAAC,+DAAM,EAAE,mBAAO,CAAC,mDAAQ,EAAE,mBAAO,CAAC,gEAAkB,EAAE,mBAAO,CAAC,4DAAgB,EAAE,eAAe;;;;;;;;;;;;ACA9J,MAAM,mBAAO,CAAC,mDAAS,IAAI,mBAAO,CAAC,mDAAQ,IAAI,mBAAO,CAAC,gEAAkB,IAAI,mBAAO,CAAC,4DAAgB,IAAI,mBAAO,CAAC,+DAAM,EAAE,kBAAkB,EAAE,GAAG,wBAAwB,GAAG,sGAAsG,qBAAM,CAAC,qBAAM,iCAAiC,KAAK,KAAK,KAAK,MAAM,oBAAoB,WAAW,kBAAkB,kBAAkB,UAAU,SAAS,sCAAsC,SAAS,sFAAsF,mCAAmC,6BAA6B,GAAG,k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,kBAAkB;AAClB,mBAAmB;AACnB,qBAAqB;;AAErB;AACA;AACA;;AAEA;AACA,mCAAmC,SAAS;AAC5C;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,cAAc,SAAS;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,2CAA2C,UAAU;AACrD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;ACrJA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEY;;AAEZ,eAAe,mBAAO,CAAC,wDAAW;AAClC,gBAAgB,mBAAO,CAAC,oDAAS;AACjC;AACA;AACA;AACA;;AAEA,cAAc;AACd,kBAAkB;AAClB,yBAAyB;;AAEzB;AACA,kBAAkB;;AAElB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,kBAAkB,YAAY;AAC9B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA,wCAAwC,SAAS;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;;AAEA;AACA;AACA,cAAc,iBAAiB;AAC/B;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,iDAAiD,EAAE;AACnD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C;AAC1C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA,yBAAyB,eAAe;AACxC;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,yBAAyB,QAAQ;AACjC;AACA,sBAAsB,eAAe;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc,YAAY;AAC1B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB,sBAAsB;AACxC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,mBAAmB;AACnB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA,oBAAoB,SAAS;AAC7B;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA,qBAAqB,WAAW,GAAG,IAAI;AACvC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA,gBAAgB,WAAW,GAAG,IAAI,KAAK,aAAa;AACpD;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;;AAEA;AACA,GAAG;AACH;AACA;AACA,mBAAmB,KAAK,mDAAmD,cAAc;AACzF,GAAG;AACH;AACA;AACA,+BAA+B,IAAI;AACnC;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,MAAM,aAAa,SAAS;AACtD;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,SAAS,gBAAgB;AACzB,cAAc,oBAAoB,EAAE,IAAI;AACxC;AACA,YAAY,gBAAgB,EAAE,IAAI;AAClC;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,GAAG,SAAS,GAAG,KAAK,qBAAqB,EAAE,EAAE;AACpE,QAAQ;AACR,yBAAyB,GAAG,KAAK,yBAAyB,EAAE,EAAE;AAC9D,mBAAmB,yBAAyB,EAAE,EAAE;AAChD;AACA,MAAM;AACN,oBAAoB,IAAI,EAAE,GAAG,SAAS,IAAI,EAAE,EAAE;AAC9C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,0CAA0C,cAAc,SAAS,OAAO;AACxE;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,kBAAkB,YAAY;AAC9B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,kBAAkB,gBAAgB;AAClC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,kBAAkB,gBAAgB;AAClC;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,cAAc,YAAY;AAC1B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,QAAQ;AAC1B;AACA,oBAAoB,QAAQ;AAC5B;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;;;;;ACzjEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEa;;AAEb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB;;AAEnB;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,sBAAsB;AACxC;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA,eAAe;AACf;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA,oBAAoB,SAAS;AAC7B;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;;AAEA,kCAAkC,QAAQ;AAC1C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oBAAoB,iBAAiB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,QAAQ;AACR;AACA,uCAAuC,QAAQ;AAC/C;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,OAAO;AACzB;AACA;AACA;;AAEA;AACA,SAAS,yBAAyB;AAClC;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,gBAAgB;AAClC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,8DAA8D,YAAY;AAC1E;AACA,8DAA8D,YAAY;AAC1E;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,qCAAqC,YAAY;AACjD;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;AACA;;;;;;;;;;;AChfA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,SAAS,WAAW;;AAEpB;AACA;AACA;AACA,SAAS,WAAW;;AAEpB;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA,SAAS,WAAW;;AAEpB;AACA;AACA,SAAS,UAAU;;AAEnB;AACA;;;;;;;;;;;ACpFA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,WAAW,mBAAO,CAAC,mDAAS;;AAE5B;AACA;;AAEA;;;;;;;;;;;ACNA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,iBAAiB,mBAAO,CAAC,+D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Y;AACnC,cAAc,mBAAO,CAAC,yDAAY;AAClC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,SAAS;AACpB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AChDA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACnBA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,UAAU;AACrB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACtBA,sBAAsB,mBAAO,CAAC,yEAAoB;AAClD,SAAS,mBAAO,CAAC,6CAAM;;AAEvB;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC3BA,SAAS,mBAAO,CAAC,6CAAM;;AAEvB;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpBA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,WAAW,mBAAO,CAAC,iDAAQ;;AAE3B;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;;;;;;;;;;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AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,SAAS;AACpB;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa,GAAG;AAChB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;AACA,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;;;;;;;;;;ACrKA,eAAe,mBAAO,CAAC,yDAAY;;AAEnC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;;;;;;;;;;AC7BA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,cAAc,mBAAO,CAAC,uDAAW;;AAEjC;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACnBA,aAAa,mBAAO,CAAC,uDAAW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EA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClFA,aAAa,mBAAO,CAAC,uDAAW;AAChC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA,iBAAiB,mBAAO,CAAC,6DAAc;AACvC,eAAe,mBAAO,CAAC,2DAAa;AACpC,eAAe,mBAAO,CAAC,yDAAY;AACnC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;AACA;AACA;AACA,oCAAoC;;AAEpC;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC9CA,aAAa,mBAAO,CAAC,uDAAW;AAChC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,eAAe,mBAAO,CAAC,yDAAY;AACnC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;A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AAS,mBAAO,CAAC,6CAAM;AACvB,kBAAkB,mBAAO,CAAC,iEAAgB;AAC1C,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC/GA,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AAC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A;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACdA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AChBA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,GAAG;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC7BA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACtBA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACtBA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACzBA,uBAAuB,mBAAO,CAAC,2EAAqB;AACpD,oBAAoB,mBAAO,CAAC,qEAAkB;AAC9C,kBAAkB,mBAAO,CAAC,iEAAgB;AAC1C,kBAAkB,mBAAO,CAAC,iEAAgB;AAC1C,sBAAsB,mBAAO,CAAC,yEAAoB;;AAElD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC5EA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,mBAAmB,mBAAO,CAAC,mEAAiB;AAC5C,kBAAkB,mBAAO,CAAC,iEAAgB;;AAE1C;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACxBA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACdA,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACnBA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACZA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACt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Q;AACrB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACbA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;;;;;;;;;;ACjBA,gBAAgB,mBAAO,CAAC,6DAAc;;AAEtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACdA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,GAAG;AAChB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACbA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACbA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,UAAU,mBAAO,CAAC,iDAAQ;AAC1B,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjCA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;;;;;;;;;;;ACzBA,gBAAgB,mBAAO,CAAC,6DAAc;;AAEtC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,GAAG;AAChB;AACA;AACA;AACA,oBAAoB,QAAQ,IAAI,QAAQ;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,kBAAkB;AAClB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpCA,sBAAsB,mBAAO,CAAC,yEAAoB;AAClD,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA,8BAA8B,mBAAmB;AACjD;AACA;AACA;AACA;AACA;AACA,+CAA+C,mBAAmB;AAClE;AACA;AACA;;AAEA;;;;;;;;;;;ACnCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACzBA,iBAAiB,mBAAO,CAAC,6DAAc;AACvC,eAAe,mBAAO,CAAC,yDAAY;;AAEnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AChCA,WAAW,mBAAO,CAAC,mDAAS;AAC5B,gBAAgB,mBAAO,CAAC,2DAAa;;AAErC;AACA,kBAAkB,KAA0B;;AAE5C;AACA,gCAAgC,QAAa;;AAE7C;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACrCA,kBAAkB,mBAAO,CAAC,iEAAgB;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,kBAAkB;AAClB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClCA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,eAAe,mBAAO,CAAC,yDAAY;;AAEnC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpCA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClCA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC1BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC9BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC5BA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC1BA,uBAAuB,mBAAO,CAAC,2EAAqB;AACpD,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC1BA,oBAAoB,mBAAO,CAAC,qEAAkB;AAC9C,eAAe,mBAAO,CAAC,2DAAa;AACpC,kBAAkB,mBAAO,CAAC,+DAAe;;AAEzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpCA,oBAAoB,mBAAO,CAAC,qEAAkB;AAC9C,iBAAiB,mBAAO,CAAC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GAAG,MAAM,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAChD,MAAM,YAAY,GAAG,CAAC,MAAM,gBAAgB,CAAC,IAAI,EAAE,CAAkC,CAAC;QACtF,OAAO,YAAY,CAAC,eAAe,CAAC;IACrC,CAAC;AACF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACpEuC;AACA;AACA;AACA;AACE;AACQ;AACE;AACE;;;;;;;;;;;;;;;;ACPtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD;;AAEnD;;AAEA,oBAAoB,gBAAgB;AACpC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA,kBAAkB,cAAc;AAChC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,kBAAkB,cAAc;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,kBAAkB,aAAa;AAC/B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;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AAC,CAAC;IACJ,CAAC;AACF,CAAC;AAED;;;GAGG;AACH,SAAS,iBAAiB,CAAC,OAAgB;IAC1C,MAAM,eAAe,GAAG,QAAQ,CAAC,aAAa,CAAkB,cAAc,CAAC,CAAC;IAChF,MAAM,eAAe,GAAG,QAAQ,CAAC,aAAa,CAAkB,cAAc,CAAC,CAAC;IAChF,MAAM,cAAc,GAAG,QAAQ,CAAC,aAAa,CAAiB,cAAc,CAAC,CAAC;IAE9E,IAAI,eAAe,KAAK,IAAI,IAAI,eAAe,KAAK,IAAI,IAAI,cAAc,KAAK,IAAI,EAAE,CAAC;QACrF,eAAe,CAAC,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;QAC3C,eAAe,CAAC,WAAW,GAAG,OAAO,CAAC,IAAI,IAAI,mBAAmB,CAAC;QAClE,cAAc,CAAC,WAAW,GAAG,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;IAC/D,CAAC;AACF,CAAC;AAED;;GAEG;AACH,KAAK,UAAU,aAAa;IAC3B,MAAM,gBAAgB,GAAG,QAAQ,CAAC,aAAa,CAAoB,aAAa,CAAC,CAAC;IAElF,IAAI,gBAAgB,KAAK,IAAI,EAAE,CAAC;QAC/B,gBAAgB,CAAC,gBAAgB,CAAC,OAAO,EAAE,KAAK,IAAI,EAAE;YACrD,MAAM,UAAU,EAAE,CAAC;QACpB,CAAC,CAAC,CAAC;IACJ,CAAC;IAED,MAAM,kBAAkB,EAAE,CAAC;AAC5B,CAAC","sources":["webpack://openfin-web--web-layout/../../node_modules/@openfin/core-web/out/api-client.js","webpack://openfin-web--web-layout/../../node_modules/@openfin/core-web/out/main-8cad4070.js","webpack://openfin-web--web-layout/../../node_modules/@openfin/core-web/out/main-b14f67c9.js","webpack://openfin-web--web-layout/../../node_modules/base64-js/index.js","webpack://openfin-web--web-layout/../../node_modules/buffer/index.js","webpack://openfin-web--web-layout/../../node_modules/events/events.js","webpack://openfin-web--web-layout/../../node_modules/ieee754/index.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_DataView.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_Hash.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_ListCache.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_Map.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_MapCache.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_Promise.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_Set.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_SetCache.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_Stack.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_Symbol.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_Uint8Array.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_WeakMap.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_arrayEach.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_arrayFilter.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_arrayLikeKeys.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_arrayPush.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_arraySome.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_assignValue.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_assocIndexOf.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseAssign.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseAssignIn.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseAssignValue.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseClone.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseCreate.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseGetAllKeys.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseGetTag.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseIsArguments.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseIsEqual.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseIsEqualDeep.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseIsMap.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseIsNative.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseIsSet.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseIsTypedArray.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseKeys.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseKeysIn.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseTimes.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseUnary.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_cacheHas.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_cloneArrayBuffer.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_cloneBuffer.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_cloneDataView.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_cloneRegExp.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_cloneSymbol.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_cloneTypedArray.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_copyArray.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_copyObject.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_copySymbols.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_copySymbolsIn.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_coreJsData.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_defineProperty.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_equalArrays.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_equalByTag.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_equalObjects.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_freeGlobal.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_getAllKeys.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_getAllKeysIn.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_getMapData.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_getNative.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_getPrototype.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_getRawTag.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_getSymbols.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_getSymbolsIn.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_getTag.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_getValue.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_hashClear.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_hashDelete.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_hashGet.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_hashHas.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_hashSet.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_initCloneArray.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_initCloneByTag.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_initCloneObject.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_isIndex.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_isKeyable.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_isMasked.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_isPrototype.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_listCacheClear.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_listCacheDelete.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_listCacheGet.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_listCacheHas.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_listCacheSet.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_mapCacheClear.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_mapCacheDelete.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_mapCacheGet.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_mapCacheHas.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_mapCacheSet.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_mapToArray.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_nativeCreate.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_nativeKeys.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_nativeKeysIn.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_nodeUtil.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_objectToString.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_overArg.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_root.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_setCacheAdd.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_setCacheHas.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_setToArray.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_stackClear.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_stackDelete.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_stackGet.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_stackHas.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_stackSet.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_toSource.js","webpack://openfin-web--web-layout/../../node_modules/lodash/cloneDeep.js","webpack://openfin-web--web-layout/../../node_modules/lodash/eq.js","webpack://openfin-web--web-layout/../../node_modules/lodash/isArguments.js","webpack://openfin-web--web-layout/../../node_modules/lodash/isArray.js","webpack://openfin-web--web-layout/../../node_modules/lodash/isArrayLike.js","webpack://openfin-web--web-layout/../../node_modules/lodash/isBuffer.js","webpack://openfin-web--web-layout/../../node_modules/lodash/isEqual.js","webpack://openfin-web--web-layout/../../node_modules/lodash/isFunction.js","webpack://openfin-web--web-layout/../../node_modules/lodash/isLength.js","webpack://openfin-web--web-layout/../../node_modules/lodash/isMap.js","webpack://openfin-web--web-layout/../../node_modules/lodash/isObject.js","webpack://openfin-web--web-layout/../../node_modules/lodash/isObjectLike.js","webpack://openfin-web--web-layout/../../node_modules/lodash/isSet.js","webpack://openfin-web--web-layout/../../node_modules/lodash/isTypedArray.js","webpack://openfin-web--web-layout/../../node_modules/lodash/keys.js","webpack://openfin-web--web-layout/../../node_modules/lodash/keysIn.js","webpack://openfin-web--web-layout/../../node_modules/lodash/stubArray.js","webpack://openfin-web--web-layout/../../node_modules/lodash/stubFalse.js","webpack://openfin-web--web-layout/./client/src/platform/api.ts","webpack://openfin-web--web-layout/./client/src/platform/settings.ts","webpack://openfin-web--web-layout/../../node_modules/uuid/dist/esm-browser/index.js","webpack://openfin-web--web-layout/../../node_modules/uuid/dist/esm-browser/md5.js","webpack://openfin-web--web-layout/../../node_modules/uuid/dist/esm-browser/nil.js","webpack://openfin-web--web-layout/../../node_modules/uuid/dist/esm-browser/parse.js","webpack://openfin-web--web-layout/../../node_modules/uuid/dist/esm-browser/regex.js","webpack://openfin-web--web-layout/../../node_modules/uuid/dist/esm-browser/rng.js","webpack://openfin-web--web-layout/../../node_modules/uuid/dist/esm-browser/sha1.js","webpack://openfin-web--web-layout/../../node_modules/uuid/dist/esm-browser/stringify.js","webpack://openfin-web--web-layout/../../node_modules/uuid/dist/esm-browser/v1.js","webpack://openfin-web--web-layout/../../node_modules/uuid/dist/esm-browser/v3.js","webpack://openfin-web--web-layout/../../node_modules/uuid/dist/esm-browser/v35.js","webpack://openfin-web--web-layout/../../node_modules/uuid/dist/esm-browser/v4.js","webpack://openfin-web--web-layout/../../node_modules/uuid/dist/esm-browser/v5.js","webpack://openfin-web--web-layout/../../node_modules/uuid/dist/esm-browser/validate.js","webpack://openfin-web--web-layout/../../node_modules/uuid/dist/esm-browser/version.js","webpack://openfin-web--web-layout/webpack/bootstrap","webpack://openfin-web--web-layout/webpack/runtime/define property getters","webpack://openfin-web--web-layout/webpack/runtime/global","webpack://openfin-web--web-layout/webpack/runtime/hasOwnProperty shorthand","webpack://openfin-web--web-layout/webpack/runtime/make namespace object","webpack://openfin-web--web-layout/webpack/runtime/node module decorator","webpack://openfin-web--web-layout/./client/src/content/interop-view.ts"],"sourcesContent":["\"use strict\";var e=require(\"./main-8cad4070.js\");require(\"buffer/\"),require(\"uuid\"),require(\"events\"),require(\"lodash/cloneDeep\"),require(\"lodash/isEqual\"),exports.connect=e.connect;\n","\"use strict\";var e=require(\"buffer/\"),t=require(\"events\"),n=require(\"lodash/cloneDeep\"),i=require(\"lodash/isEqual\"),r=require(\"uuid\");const o=(e,t)=>`${t}<${btoa(JSON.stringify(e))}>`;var s=\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof window?window:\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:{},a={},c={},d={},h={};async function l(e){const t=[];for(const n of e){const e=await n();t.push(e)}return t}Object.defineProperty(h,\"__esModule\",{value:!0}),h.promiseMapSerial=h.serial=h.promiseMap=h.promisify=void 0,h.promisify=function(e){return(...t)=>new Promise(((n,i)=>{e(...t,((e,t)=>e?i(e):n(t)))}))},h.promiseMap=async function(e,t){return Promise.all(e.map(t))},h.serial=l,h.promiseMapSerial=async function(e,t){return l(e.map(((e,n,i)=>()=>t(e,n,i))))};var u,p=s&&s.__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},w=s&&s.__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)};Object.defineProperty(d,\"__esModule\",{value:!0}),d.Reply=d.EmitterBase=d.Base=void 0;const y=h;class f{constructor(e){this.isNodeEnvironment=()=>\"node\"===this.wire.environment.type,this.isOpenFinEnvironment=()=>\"openfin\"===this.wire.environment.type,this.isBrowserEnvironment=()=>\"other\"===this.wire.environment.type,this.wire=e}get fin(){return this.wire.getFin()}get me(){return this.wire.me}}d.Base=f;d.EmitterBase=class extends f{constructor(e,t,...n){super(e),this.topic=t,u.set(this,void 0),this.eventNames=()=>this.hasEmitter()?this.getOrCreateEmitter().eventNames():[],this.emit=(e,t,...n)=>!!this.hasEmitter()&&this.getOrCreateEmitter().emit(e,t,...n),this.hasEmitter=()=>this.wire.eventAggregator.has(w(this,u,\"f\")),this.getOrCreateEmitter=()=>this.wire.eventAggregator.getOrCreate(w(this,u,\"f\")),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[],this.listenerCount=e=>this.hasEmitter()?this.getOrCreateEmitter().listenerCount(e):0,this.registerEventListener=async(e,t={},n,i)=>{const r={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e},o=this.getOrCreateEmitter();n(o);try{await this.wire.sendAction(\"subscribe-to-desktop-event\",r)}catch(e){throw i(o),this.deleteEmitterIfNothingRegistered(o),e}},this.deregisterEventListener=async(e,t={})=>{if(this.hasEmitter()){const n={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e};await this.wire.sendAction(\"unsubscribe-to-desktop-event\",n).catch((()=>null));return this.getOrCreateEmitter()}return Promise.resolve()},p(this,u,[t,...n],\"f\"),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[]}async on(e,t,n){return await this.registerEventListener(e,n,(n=>{n.on(e,t)}),(n=>{n.removeListener(e,t)})),this}async addListener(e,t,n){return this.on(e,t,n)}async once(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.once(e,i),n.once(e,t)}),(n=>{n.removeListener(e,i),n.removeListener(e,t)})),this}async prependListener(e,t,n){return await this.registerEventListener(e,n,(n=>{n.prependListener(e,t)}),(n=>{n.removeListener(e,t)})),this}async prependOnceListener(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.prependOnceListener(e,t),n.once(e,i)}),(n=>{n.removeListener(e,t),n.removeListener(e,i)})),this}async removeListener(e,t,n){const i=await this.deregisterEventListener(e,n);return i&&(i.removeListener(e,t),this.deleteEmitterIfNothingRegistered(i)),this}async deregisterAllListeners(e){const t={...this.identity,type:e,topic:this.topic};if(this.hasEmitter()){const e=this.getOrCreateEmitter(),n=e.listenerCount(t.type),i=[];for(let e=0;enull)));return await Promise.all(i),e}}async removeAllListeners(e){const t=async e=>{const t=await this.deregisterAllListeners(e);t&&(t.removeAllListeners(e),this.deleteEmitterIfNothingRegistered(t))};if(e)await t(e);else if(this.hasEmitter()){const e=this.getOrCreateEmitter().eventNames();await(0,y.promiseMap)(e,t)}return this}deleteEmitterIfNothingRegistered(e){0===e.eventNames().length&&this.wire.eventAggregator.delete(w(this,u,\"f\"))}},u=new WeakMap;d.Reply=class{};var g={};Object.defineProperty(g,\"__esModule\",{value:!0});var m=g.RuntimeError=g.NotSupportedError=g.NotImplementedError=g.NoAckError=g.DuplicateCorrelationError=g.UnexpectedActionError=g.DisconnectedError=void 0;class v extends Error{constructor(e){super(`Expected websocket state OPEN but found ${e}`),this.readyState=e}}g.DisconnectedError=v;class C extends Error{}g.UnexpectedActionError=C;class b extends Error{}g.DuplicateCorrelationError=b;class I extends Error{}g.NoAckError=I;class E extends Error{}g.NotImplementedError=E;class x extends Error{}g.NotSupportedError=x;class A extends Error{constructor(e){const{message:t,name:n,stack:i,...r}=e;super(t),this.name=n||\"Error\",this.stack=i??this.toString(),Object.keys(r).forEach((e=>{this[e]=r[e]}))}}class P extends Error{static getCallSite(e=0){const t=Error.stackTraceLimit,n=e+1;Error.stackTraceLimit=t+n;const i=Error.prepareStackTrace;Error.prepareStackTrace=(e,t)=>t;const r=(new Error).stack?.slice(n)??[];return Error.prepareStackTrace=i,Error.stackTraceLimit=t,r}static prepareStackTrace(e,t){if(\"function\"==typeof Error.prepareStackTrace)return Error.prepareStackTrace(e,t);let n=\"\";n+=e.name||\"Error\",n+=`: ${e.message||\"\"}`;for(const e of t)n+=`\\n at ${e.toString()}`;return n}constructor(e,t){const{reason:n,error:i}=e;super(n),this.name=\"RuntimeError\",i?.stack&&(this.cause=new A(i)),t&&(this.stack=P.prepareStackTrace(this,t))}}m=g.RuntimeError=P;var M={},_={},O={};Object.defineProperty(O,\"__esModule\",{value:!0}),O.validateIdentity=void 0,O.validateIdentity=function(e){let t;return\"object\"==typeof e&&\"string\"==typeof e.uuid||(t=\"Not a valid identity object\"),t};var S={},R={},F={},j={},k={},L={},T={};Object.defineProperty(T,\"__esModule\",{value:!0}),T.handleDeprecatedWarnings=void 0;var $;T.handleDeprecatedWarnings=e=>{(e.contentNavigation?.whitelist||e.contentNavigation?.blacklist||e.contentRedirect?.whitelist||e.contentRedirect?.blacklist)&&console.warn(\"The properties 'whitelist' and 'blacklist' have been marked as deprecated and will be removed in a future version. Please use 'allowlist' and 'denylist'.\")};var B={},G={};Object.defineProperty(G,\"__esModule\",{value:!0}),G.AsyncRetryableLazy=W=G.Lazy=void 0;var W=G.Lazy=class{constructor(e){this.producerFn=e}getValue(){return this.value||(this.value=this.producerFn()),this.value}};G.AsyncRetryableLazy=class{constructor(e){this.producerFn=e}async getValue(){return this.promise||(this.promise=this.producerFn().catch((e=>{throw delete this.promise,e}))),this.promise}};var H={};Object.defineProperty(H,\"__esModule\",{value:!0}),H.WebContents=void 0;const N=d;class D extends N.EmitterBase{constructor(e,t,n){super(e,n,t.uuid,t.name),this.identity=t,this.entityType=n}capturePage(e){return this.wire.sendAction(\"capture-page\",{options:e,...this.identity}).then((({payload:e})=>e.data))}executeJavaScript(e){return this.wire.sendAction(\"execute-javascript-in-window\",{...this.identity,code:e}).then((({payload:e})=>e.data))}getZoomLevel(){return this.wire.sendAction(\"get-zoom-level\",this.identity).then((({payload:e})=>e.data))}setZoomLevel(e){return this.wire.sendAction(\"set-zoom-level\",{...this.identity,level:e}).then((()=>{}))}navigate(e){return this.wire.sendAction(\"navigate-window\",{...this.identity,url:e}).then((()=>{}))}navigateBack(){return this.wire.sendAction(\"navigate-window-back\",{...this.identity}).then((()=>{}))}async navigateForward(){await this.wire.sendAction(\"navigate-window-forward\",{...this.identity})}stopNavigation(){return this.wire.sendAction(\"stop-window-navigation\",{...this.identity}).then((()=>{}))}reload(e=!1){return this.wire.sendAction(\"reload-window\",{ignoreCache:e,...this.identity}).then((()=>{}))}print(e={}){return this.wire.sendAction(\"print\",{...this.identity,options:e}).then((()=>{}))}findInPage(e,t){return this.wire.sendAction(\"find-in-page\",{...this.identity,searchTerm:e,options:t}).then((({payload:e})=>e.data))}stopFindInPage(e){return this.wire.sendAction(\"stop-find-in-page\",{...this.identity,action:e}).then((()=>{}))}getPrinters(){return this.wire.sendAction(\"get-printers\",{...this.identity}).then((({payload:e})=>e.data))}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){await this.wire.sendAction(\"focus-window\",{emitSynthFocused:e,...this.identity})}async showDeveloperTools(){await this.wire.sendAction(\"show-developer-tools\",this.identity)}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction(\"get-process-info\",this.identity);return e}async getSharedWorkers(){return this.wire.sendAction(\"get-shared-workers\",this.identity).then((({payload:e})=>e.data))}async inspectSharedWorker(){await this.wire.sendAction(\"inspect-shared-worker\",{...this.identity})}async inspectSharedWorkerById(e){await this.wire.sendAction(\"inspect-shared-worker-by-id\",{...this.identity,workerId:e})}async inspectServiceWorker(){await this.wire.sendAction(\"inspect-service-worker\",{...this.identity})}async showPopupWindow(e){if(this.wire.sendAction(`${this.entityType}-show-popup-window`,this.identity).catch((()=>{})),e?.onPopupReady){const t=async({popupName:t})=>{try{const n=this.fin.Window.wrapSync({uuid:this.fin.me.uuid,name:t});await e.onPopupReady(n)}catch(e){throw new Error(`Something went wrong during onPopupReady execution: ${e}`)}};await this.once(\"popup-ready\",t)}const{payload:t}=await this.wire.sendAction(\"try-create-popup-window\",{options:{...e,hasResultCallback:!!e?.onPopupResult,hasReadyCallback:!!e?.onPopupReady},...this.identity}),{data:{willOpen:n,options:i}}=t;n&&await this.fin.Window.create(i.initialOptions);if(e?.onPopupResult){const t=async t=>{await e.onPopupResult((e=>{const{name:t,uuid:n,result:i,data:r}=e,o={identity:{name:t,uuid:n},result:i};return r&&(o.data=r),o})(t))},n=async()=>{await this.removeListener(\"popup-result\",t)};await this.on(\"popup-result\",t),await this.once(\"popup-teardown\",n)}const{payload:r}=await this.wire.sendAction(\"show-popup-window\",{options:i,...this.identity});return r.data}}var U,V,z,K,q;function J(){return V||(V=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(function(){if($)return L;$=1,Object.defineProperty(L,\"__esModule\",{value:!0}),L.ViewModule=void 0;const e=d,t=O,n=J(),i=T;class r extends e.Base{async create(e){const{uuid:t}=this.wire.me;if(!e.name||\"string\"!=typeof e.name)throw new Error(\"Please provide a name property as a string in order to create a View.\");return(0,i.handleDeprecatedWarnings)(e),this.wire.environment.childViews?await this.wire.environment.createChildContent({entityType:\"view\",options:{...e,uuid:t}}):await this.wire.sendAction(\"create-view\",{...e,uuid:t}),this.wrapSync({uuid:t,name:e.name})}async wrap(e){this.wire.sendAction(\"view-wrap\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}wrapSync(e){this.wire.sendAction(\"view-wrap-sync\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}getCurrent(){if(this.wire.sendAction(\"view-get-current\").catch((e=>{})),!this.wire.me.isView)throw new Error(\"You are not in a View context\");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction(\"view-get-current-sync\").catch((e=>{})),!this.wire.me.isView)throw new Error(\"You are not in a View context\");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return L.ViewModule=r,L}(),e),n(function(){if(U)return B;var e;U=1,Object.defineProperty(B,\"__esModule\",{value:!0}),B.View=void 0;const t=g,n=G,i=H,r=ie();class o extends i.WebContents{constructor(i,o){super(i,o,\"view\"),this.identity=o,e.set(this,new n.Lazy((()=>this.fin.Platform.wrapSync(this.identity).getClient()))),this.attach=async e=>{await this.wire.sendAction(\"attach-view\",{target:e,...this.identity})},this.destroy=async()=>{await this.wire.sendAction(\"destroy-view\",{...this.identity})},this.show=async()=>{await this.wire.sendAction(\"show-view\",{...this.identity})},this.showAt=async(e,t={})=>{await this.wire.sendAction(\"show-view-at\",{bounds:e,...this.identity,options:t})},this.bringToFront=async()=>{await this.wire.sendAction(\"bring-view-to-front\",{...this.identity})},this.hide=async()=>{await this.wire.sendAction(\"hide-view\",{...this.identity})},this.setBounds=async e=>{await this.wire.sendAction(\"set-view-bounds\",{bounds:e,...this.identity})},this.getBounds=async()=>(await this.wire.sendAction(\"get-view-bounds\",{...this.identity})).payload.data,this.getInfo=async()=>(await this.wire.sendAction(\"get-view-info\",{...this.identity})).payload.data,this.getParentLayout=async()=>(this.wire.sendAction(\"view-get-parent-layout\",{...this.identity}).catch((()=>{})),this.fin.Platform.Layout.getLayoutByViewIdentity(this.identity)),this.getOptions=async()=>this.wire.sendAction(\"get-view-options\",{...this.identity}).then((({payload:e})=>e.data)),this.updateOptions=async e=>this.wire.sendAction(\"update-view-options\",{options:e,...this.identity}).then((()=>{})),this.getCurrentWindow=async()=>{const{payload:{data:e}}=await this.wire.sendAction(\"get-view-window\",{...this.identity});return new r._Window(this.wire,e)},this.getCurrentStack=async()=>{this.wire.sendAction(\"view-get-current-stack\").catch((()=>{}));try{return(await this.getParentLayout()).getStackByViewIdentity(this.identity)}catch(e){throw new t.RuntimeError({reason:\"This view does not belong to a stack.\",error:e})}},this.triggerBeforeUnload=async()=>(await this.wire.sendAction(\"trigger-before-unload\",{...this.identity})).payload.data,this.bindToElement=async e=>{if(!e)throw new Error(\"Element not found.\");return this.wire.environment.observeBounds(e,(async e=>this.setBounds(e)))}}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){const t=await this.getCurrentWindow();await t.focusedWebViewWasChanged(),await super.focus({emitSynthFocused:e})}}return B.View=o,e=new WeakMap,B}(),e)}(k)),k}function Y(){if(z)return j;z=1,Object.defineProperty(j,\"__esModule\",{value:!0}),j.Application=void 0;const e=d,t=ie(),n=J();class i extends e.EmitterBase{constructor(e,n){super(e,\"application\",n.uuid),this.identity=n,this.window=new t._Window(this.wire,{uuid:this.identity.uuid,name:this.identity.uuid})}windowListFromIdentityList(e){const n=[];return e.forEach((e=>{n.push(new t._Window(this.wire,{uuid:e.uuid,name:e.name}))})),n}isRunning(){return this.wire.sendAction(\"is-application-running\",this.identity).then((({payload:e})=>e.data))}async quit(e=!1){try{await this._close(e),await this.wire.sendAction(\"destroy-application\",{force:e,...this.identity})}catch(e){if(![\"Remote connection has closed\",\"Could not locate the requested application\"].some((t=>e.message.includes(t))))throw e}}async _close(e=!1){try{await this.wire.sendAction(\"close-application\",{force:e,...this.identity})}catch(e){if(!e.message.includes(\"Remote connection has closed\"))throw e}}close(e=!1){return console.warn(\"Deprecation Warning: Application.close is deprecated Please use Application.quit\"),this.wire.sendAction(\"application-close\",this.identity).catch((e=>{})),this._close(e)}getChildWindows(){return this.wire.sendAction(\"get-child-windows\",this.identity).then((({payload:e})=>{const t=[];return e.data.forEach((e=>{t.push({uuid:this.identity.uuid,name:e})})),this.windowListFromIdentityList(t)}))}getManifest(){return this.wire.sendAction(\"get-application-manifest\",this.identity).then((({payload:e})=>e.data))}getParentUuid(){return this.wire.sendAction(\"get-parent-application\",this.identity).then((({payload:e})=>e.data))}getShortcuts(){return this.wire.sendAction(\"get-shortcuts\",this.identity).then((({payload:e})=>e.data))}async getViews(){const{payload:e}=await this.wire.sendAction(\"application-get-views\",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}getZoomLevel(){return this.wire.sendAction(\"get-application-zoom-level\",this.identity).then((({payload:e})=>e.data))}getWindow(){return this.wire.sendAction(\"application-get-window\",this.identity).catch((e=>{})),Promise.resolve(this.window)}registerUser(e,t){return this.wire.sendAction(\"register-user\",{userName:e,appName:t,...this.identity}).then((()=>{}))}removeTrayIcon(){return this.wire.sendAction(\"remove-tray-icon\",this.identity).then((()=>{}))}restart(){return this.wire.sendAction(\"restart-application\",this.identity).then((()=>{}))}run(){return console.warn(\"Deprecation Warning: Application.run is deprecated Please use fin.Application.start\"),this.wire.sendAction(\"application-run\",this.identity).catch((e=>{})),this._run()}_run(e={}){return this.wire.sendAction(\"run-application\",{manifestUrl:this._manifestUrl,opts:e,...this.identity}).then((()=>{}))}scheduleRestart(){return this.wire.sendAction(\"relaunch-on-close\",this.identity).then((()=>{}))}async sendApplicationLog(){const{payload:e}=await this.wire.sendAction(\"send-application-log\",this.identity);return e.data}async setJumpList(e){await this.wire.sendAction(\"set-jump-list\",{config:e,...this.identity})}setTrayIcon(e){return this.wire.sendAction(\"set-tray-icon\",{enabledIcon:e,...this.identity}).then((()=>{}))}setShortcuts(e){return this.wire.sendAction(\"set-shortcuts\",{data:e,...this.identity}).then((()=>{}))}async setShortcutQueryParams(e){await this.wire.sendAction(\"set-shortcut-query-args\",{data:e,...this.identity})}setZoomLevel(e){return this.wire.sendAction(\"set-application-zoom-level\",{level:e,...this.identity}).then((()=>{}))}async setAppLogUsername(e){await this.wire.sendAction(\"set-app-log-username\",{data:e,...this.identity})}getTrayIconInfo(){return this.wire.sendAction(\"get-tray-icon-info\",this.identity).then((({payload:e})=>e.data))}hasTrayIcon(){return this.wire.sendAction(\"has-tray-icon\",this.identity).then((({payload:e})=>e.data))}terminate(){return this.wire.sendAction(\"terminate-application\",this.identity).then((()=>{}))}wait(){return this.wire.sendAction(\"wait-for-hung-application\",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction(\"get-info\",this.identity).then((({payload:e})=>e.data))}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction(\"application-get-process-info\",this.identity);return e}async setFileDownloadLocation(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t};await this.wire.sendAction(\"set-file-download-location\",{...n,downloadLocation:e})}async getFileDownloadLocation(){const{payload:{data:e}}=await this.wire.sendAction(\"get-file-download-location\",this.identity);return e}async showTrayIconPopupMenu(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t},{payload:i}=await this.wire.sendAction(\"show-tray-icon-popup-menu\",{...n,options:e});return i.data}async closeTrayIconPopupMenu(){const{name:e}=this.wire.me,t={uuid:this.identity.uuid,name:e};await this.wire.sendAction(\"close-tray-icon-popup-menu\",{...t})}}return j.Application=i,j}function Z(){return q||(q=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(function(){if(K)return F;K=1,Object.defineProperty(F,\"__esModule\",{value:!0}),F.ApplicationModule=void 0;const e=d,t=O,n=Y();class i extends e.Base{async wrap(e){this.wire.sendAction(\"wrap-application\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}wrapSync(e){this.wire.sendAction(\"wrap-application-sync\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}async _create(e){return void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&void 0===e.isPlatformController&&(e.autoShow=!0),await this.wire.sendAction(\"create-application\",e),this.wrap({uuid:e.uuid})}create(e){return console.warn(\"Deprecation Warning: fin.Application.create is deprecated. Please use fin.Application.start\"),this.wire.sendAction(\"application-create\").catch((e=>{})),this._create(e)}async start(e){this.wire.sendAction(\"start-application\").catch((e=>{}));const t=await this._create(e);return await this.wire.sendAction(\"run-application\",{uuid:e.uuid}),t}async startManyManifests(e,t){return this.wire.sendAction(\"run-applications\",{applications:e,opts:t}).then((()=>{}))}getCurrent(){return this.wire.sendAction(\"get-current-application\").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction(\"get-current-application-sync\").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}async startFromManifest(e,t){this.wire.sendAction(\"application-start-from-manifest\").catch((e=>{}));const n=await this._createFromManifest(e);return await n._run(t),n}createFromManifest(e){return console.warn(\"Deprecation Warning: fin.Application.createFromManifest is deprecated. Please use fin.Application.startFromManifest\"),this.wire.sendAction(\"application-create-from-manifest\").catch((e=>{})),this._createFromManifest(e)}_createFromManifest(e){return this.wire.sendAction(\"get-application-manifest\",{manifestUrl:e}).then((({payload:e})=>{const t=e.data.platform?e.data.platform.uuid:e.data.startup_app.uuid;return this.wrap({uuid:t})})).then((t=>(t._manifestUrl=e,t)))}}return F.ApplicationModule=i,F}(),e),n(Y(),e)}(R)),R}H.WebContents=D;var Q={};Object.defineProperty(Q,\"__esModule\",{value:!0}),Q.promisifySubscription=void 0;var X,ee,te;function ne(){if(X)return S;X=1,Object.defineProperty(S,\"__esModule\",{value:!0}),S._Window=void 0;const e=Z(),t=H,n=J(),i=T,r=Q;class o extends t.WebContents{constructor(e,t){super(e,t,\"window\")}async createWindow(e){this.wire.sendAction(\"window-create-window\",this.identity).catch((e=>{}));const t=await(0,r.promisifySubscription)(this,\"fire-constructor-callback\");void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&(e.autoShow=!0),(0,i.handleDeprecatedWarnings)(e);const n=this.wire.environment.createChildContent({entityType:\"window\",options:e}),[o]=await Promise.all([t.getValue(),n]);let s;const{success:a}=o,c=o.data,{message:d}=c;s=a?{httpResponseCode:c.httpResponseCode,apiInjected:c.apiInjected}:{message:c.message,networkErrorCode:c.networkErrorCode,stack:c.stack};const h={message:d,cbPayload:s,success:a};try{this.getWebWindow().fin.__internal_.openerSuccessCBCalled()}catch(e){}return h.success?this:Promise.reject(h)}getAllFrames(){return this.wire.sendAction(\"get-all-frames\",this.identity).then((({payload:e})=>e.data))}getBounds(){return this.wire.sendAction(\"get-window-bounds\",this.identity).then((({payload:e})=>e.data))}center(){return this.wire.sendAction(\"center-window\",this.identity).then((()=>{}))}blur(){return this.wire.sendAction(\"blur-window\",this.identity).then((()=>{}))}bringToFront(){return this.wire.sendAction(\"bring-window-to-front\",this.identity).then((()=>{}))}animate(e,t){return this.wire.sendAction(\"animate-window\",{transitions:e,options:t,...this.identity}).then((()=>{}))}hide(){return this.wire.sendAction(\"hide-window\",this.identity).then((()=>{}))}close(e=!1){return this.wire.sendAction(\"close-window\",{force:e,...this.identity}).then((()=>{Object.setPrototypeOf(this,null)}))}focusedWebViewWasChanged(){return this.wire.sendAction(\"focused-webview-changed\",this.identity).then((()=>{}))}getNativeId(){return this.wire.sendAction(\"get-window-native-id\",this.identity).then((({payload:e})=>e.data))}async getCurrentViews(){const{payload:e}=await this.wire.sendAction(\"window-get-views\",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}disableFrame(){return console.warn(\"Function is deprecated; use disableUserMovement instead.\"),this.wire.sendAction(\"disable-window-frame\",this.identity).then((()=>{}))}disableUserMovement(){return this.wire.sendAction(\"disable-window-frame\",this.identity).then((()=>{}))}enableFrame(){return console.warn(\"Function is deprecated; use enableUserMovement instead.\"),this.wire.sendAction(\"enable-window-frame\",this.identity).then((()=>{}))}enableUserMovement(){return this.wire.sendAction(\"enable-window-frame\",this.identity).then((()=>{}))}flash(){return this.wire.sendAction(\"flash-window\",this.identity).then((()=>{}))}stopFlashing(){return this.wire.sendAction(\"stop-flash-window\",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction(\"get-window-info\",this.identity).then((({payload:e})=>e.data))}async getLayout(e){this.wire.sendAction(\"window-get-layout\",this.identity).catch((e=>{}));const t=await this.getOptions();if(!t.layout&&!t.layoutSnapshot)throw new Error(\"Window does not have a Layout\");return this.fin.Platform.Layout.wrap(e??this.identity)}getOptions(){return this.wire.sendAction(\"get-window-options\",this.identity).then((({payload:e})=>e.data))}getParentApplication(){return this.wire.sendAction(\"window-get-parent-application\",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity))}getParentWindow(){return this.wire.sendAction(\"window-get-parent-window\",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity)).then((e=>e.getWindow()))}async getSnapshot(e){const t={area:e,...this.identity};console.warn(\"Window.getSnapshot has been deprecated, please use Window.capturePage\");return(await this.wire.sendAction(\"get-window-snapshot\",t)).payload.data}getState(){return this.wire.sendAction(\"get-window-state\",this.identity).then((({payload:e})=>e.data))}getWebWindow(){return this.wire.sendAction(\"window-get-web-window\",this.identity).catch((e=>{})),this.wire.environment.getWebWindow(this.identity)}isMainWindow(){return this.wire.sendAction(\"window-is-main-window\",this.identity).catch((e=>{})),this.me.uuid===this.me.name}isShowing(){return this.wire.sendAction(\"is-window-showing\",this.identity).then((({payload:e})=>e.data))}maximize(){return this.wire.sendAction(\"maximize-window\",this.identity).then((()=>{}))}minimize(){return this.wire.sendAction(\"minimize-window\",this.identity).then((()=>{}))}moveBy(e,t,n){return this.wire.sendAction(\"move-window-by\",{deltaLeft:e,deltaTop:t,positioningOptions:n,...this.identity}).then((()=>{}))}moveTo(e,t,n){return this.wire.sendAction(\"move-window\",{left:e,top:t,positioningOptions:n,...this.identity}).then((()=>{}))}resizeBy(e,t,n,i){return this.wire.sendAction(\"resize-window-by\",{deltaWidth:Math.floor(e),deltaHeight:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}resizeTo(e,t,n,i){return this.wire.sendAction(\"resize-window\",{width:Math.floor(e),height:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}restore(){return this.wire.sendAction(\"restore-window\",this.identity).then((()=>{}))}setAsForeground(){return this.wire.sendAction(\"set-foreground-window\",this.identity).then((()=>{}))}setBounds(e,t){return this.wire.sendAction(\"set-window-bounds\",{...e,...this.identity,positioningOptions:t}).then((()=>{}))}show(e=!1){return this.wire.sendAction(\"show-window\",{force:e,...this.identity}).then((()=>{}))}showAt(e,t,n=!1){return this.wire.sendAction(\"show-at-window\",{force:n,left:Math.floor(e),top:Math.floor(t),...this.identity}).then((()=>{}))}updateOptions(e){return this.wire.sendAction(\"update-window-options\",{options:e,...this.identity}).then((()=>{}))}authenticate(e,t){return this.wire.sendAction(\"window-authenticate\",{userName:e,password:t,...this.identity}).then((()=>{}))}async showPopupMenu(e){const{payload:t}=await this.wire.sendAction(\"show-popup-menu\",{options:e,...this.identity});return t.data}async closePopupMenu(){return this.wire.sendAction(\"close-popup-menu\",{...this.identity}).then((()=>{}))}async dispatchPopupResult(e){this.wire.sendAction(\"window-dispatch-popup-result\",this.identity).catch((e=>{})),await this.wire.sendAction(\"dispatch-popup-result\",{data:e,...this.identity})}async print(e={content:\"self\"}){switch(e.content){case void 0:case\"self\":return super.print(e);case\"screenshot\":return this.wire.sendAction(\"print-screenshot\",this.identity).then((()=>{}));case\"views\":return this.wire.sendAction(\"print-views\",{...this.identity,options:e}).then((()=>{}));default:return}}}return S._Window=o,S}function ie(){return te||(te=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(function(){if(ee)return _;ee=1,Object.defineProperty(_,\"__esModule\",{value:!0}),_._WindowModule=void 0;const e=d,t=O,n=ne();class i extends e.Base{async wrap(e){this.wire.sendAction(\"window-wrap\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}wrapSync(e){this.wire.sendAction(\"window-wrap-sync\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}create(e){return this.wire.sendAction(\"create-window\").catch((e=>{})),new n._Window(this.wire,{uuid:this.me.uuid,name:e.name}).createWindow(e)}getCurrent(){if(this.wire.sendAction(\"get-current-window\").catch((e=>{})),!this.wire.me.isWindow)throw new Error(\"You are not in a Window context\");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction(\"get-current-window-sync\").catch((e=>{})),!this.wire.me.isWindow)throw new Error(\"You are not in a Window context\");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return _._WindowModule=i,_}(),e),n(ne(),e)}(M)),M}Q.promisifySubscription=async(e,t,n=(()=>!0),i)=>{let r,o,s;const a=new Promise(((e,t)=>{r=e,o=t})),c=e=>{n(e)&&(clearTimeout(s),r(e))};return await e.on(t,c),i&&(s=setTimeout((()=>o(new Error(\"event timed out\"))),i)),a.finally((()=>{e.removeListener(t,c).catch((()=>null))})),{getValue:()=>a}},Object.defineProperty(c,\"__esModule\",{value:!0}),c.System=void 0;const re=d,oe=g,se=ie(),ae=t;class ce extends re.EmitterBase{constructor(e){super(e,\"system\")}sendExternalProcessRequest(e,t){return new Promise(((n,i)=>{const r=\"external-process-exited\";let o,s,a,c;\"function\"==typeof t.listener&&(a=e=>{const n=e||{};s={topic:\"exited\",uuid:n.processUuid||\"\",exitCode:n.exitCode||0},o===e.processUuid&&(t.listener(s),c.removeListener(r,a))},this.wire.me.name||(this.wire.me.name=this.wire.me.uuid),c=new se._Window(this.wire,this.wire.me),c.on(r,a)),this.wire.sendAction(e,t).then((({payload:e})=>{o=e.data.uuid,n(e.data),s&&o===s.uuid&&(t.listener(s),c.removeListener(r,a))})).catch((e=>{c&&c.removeListener(r,a),i(e)}))}))}getVersion(){return this.wire.sendAction(\"get-version\").then((({payload:e})=>e.data))}clearCache(e){return this.wire.sendAction(\"clear-cache\",e).then((()=>{}))}deleteCacheOnExit(){return this.wire.sendAction(\"delete-cache-request\").then((()=>{}))}exit(){return this.wire.sendAction(\"exit-desktop\").then((()=>{}))}async fetchManifest(e){const{payload:{data:t}}=await this.wire.sendAction(\"fetch-manifest\",{manifestUrl:e});return t}flushCookieStore(){return this.wire.sendAction(\"flush-cookie-store\").then((()=>{}))}getAllWindows(){return this.wire.sendAction(\"get-all-windows\").then((({payload:e})=>e.data))}getAllApplications(){return this.wire.sendAction(\"get-all-applications\").then((({payload:e})=>e.data))}getCommandLineArguments(){return this.wire.sendAction(\"get-command-line-arguments\").then((({payload:e})=>e.data))}async getCrashReporterState(){const{payload:{data:{diagnosticMode:e,isRunning:t}}}=await this.wire.sendAction(\"get-crash-reporter-state\");return console.warn(\"diagnosticMode property is deprecated. It will be removed in a future version\"),{diagnosticMode:e,diagnosticsMode:e,isRunning:t}}async startCrashReporter(e){const t=e,n={...t,diagnosticMode:t.diagnosticsMode||t.diagnosticMode},{payload:{data:{diagnosticMode:i,isRunning:r}}}=await this.wire.sendAction(\"start-crash-reporter\",n);return{diagnosticMode:i,diagnosticsMode:i,isRunning:r}}getUniqueUserId(){return this.wire.sendAction(\"get-unique-user-id\").then((({payload:e})=>e.data))}getEntityInfo(e,t){return this.wire.sendAction(\"get-entity-info\",{uuid:e,name:t}).then((({payload:e})=>e.data))}getEnvironmentVariable(e){return this.wire.sendAction(\"get-environment-variable\",{environmentVariables:e}).then((({payload:e})=>e.data))}getFocusedWindow(){return this.wire.sendAction(\"get-focused-window\").then((({payload:e})=>e.data))}async isAppCertified(e){const{payload:{data:{certifiedInfo:t}}}=await this.wire.sendAction(\"is-app-certified\",{manifestUrl:e});return t}getInstalledRuntimes(){return this.wire.sendAction(\"get-installed-runtimes\").then((({payload:e})=>e.data.runtimes))}async getInstalledApps(){const{payload:{data:{installedApps:e}}}=await this.wire.sendAction(\"get-installed-apps\");return e}getLog(e){return this.wire.sendAction(\"view-log\",e).then((({payload:e})=>e.data))}getMachineId(){return this.wire.sendAction(\"get-machine-id\").then((({payload:e})=>e.data))}getMinLogLevel(){return this.wire.sendAction(\"get-min-log-level\").then((({payload:e})=>e.data))}getLogList(){return this.wire.sendAction(\"list-logs\").then((({payload:e})=>e.data))}getMonitorInfo(){return this.wire.sendAction(\"get-monitor-info\").then((({payload:e})=>e.data))}getMousePosition(){return this.wire.sendAction(\"get-mouse-position\").then((({payload:e})=>e.data))}getProcessList(){return console.warn(\"System.getProcessList has been deprecated. Please consider using our new process APIs: Window.getProcessInfo, View.getProcessInfo, Application.getProcessInfo, System.getAllProcessInfo\"),this.wire.sendAction(\"process-snapshot\").then((({payload:e})=>e.data))}async getAllProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction(\"get-all-process-info\",this.identity);return e}getProxySettings(){return this.wire.sendAction(\"get-proxy-settings\").then((({payload:e})=>e.data))}getRuntimeInfo(){return this.wire.sendAction(\"get-runtime-info\").then((({payload:e})=>e.data))}getRvmInfo(){return this.wire.sendAction(\"get-rvm-info\").then((({payload:e})=>e.data))}getHostSpecs(){return this.wire.sendAction(\"get-host-specs\").then((({payload:e})=>e.data))}getOSInfo(){return this.wire.sendAction(\"get-os-info\").then((({payload:e})=>e.data))}launchExternalProcess(e){return this.sendExternalProcessRequest(\"launch-external-process\",e)}monitorExternalProcess(e){return this.sendExternalProcessRequest(\"monitor-external-process\",e)}log(e,t){return this.wire.sendAction(\"write-to-log\",{level:e,message:t}).then((()=>{}))}openUrlWithBrowser(e){return this.wire.sendAction(\"open-url-with-browser\",{url:e}).then((()=>{}))}async registerCustomProtocol(e){if(\"object\"!=typeof e)throw new Error(\"Must provide an object with a `protocolName` property having a string value.\");await this.wire.sendAction(\"register-custom-protocol\",e)}async unregisterCustomProtocol(e){await this.wire.sendAction(\"unregister-custom-protocol\",{protocolName:e})}async getCustomProtocolState(e){return this.wire.sendAction(\"get-custom-protocol-state\",{protocolName:e}).then((({payload:e})=>e.data))}releaseExternalProcess(e){return this.wire.sendAction(\"release-external-process\",{uuid:e}).then((()=>{}))}showDeveloperTools(e){return this.wire.sendAction(\"show-developer-tools\",e).then((()=>{}))}terminateExternalProcess(e){return this.wire.sendAction(\"terminate-external-process\",e).then((()=>{}))}updateProxySettings(e){return this.wire.sendAction(\"update-proxy\",e).then((()=>{}))}async downloadAsset(e,t){const n=()=>{};let i=n,r=n;const o=new Promise(((e,t)=>{i=e,r=t}));if(\"openfin\"!==this.wire.environment.type)throw new oe.NotSupportedError(\"downloadAsset only supported in an OpenFin Render process\");const s=oe.RuntimeError.getCallSite(),a=this.wire.environment.getNextMessageId().toString(),c=`asset-download-progress-${a}`,d=`asset-download-error-${a}`,h=`asset-download-complete-${a}`,l=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},u=()=>{this.removeListener(c,l)};await Promise.all([this.on(c,l),this.once(d,(e=>{u();const{reason:t,err:n}=e;r(new oe.RuntimeError({reason:t,error:n},s))})),this.once(h,(()=>{u(),i()}))]);const p=Object.assign(e,{downloadId:a});return await this.wire.sendAction(\"download-asset\",p).catch((e=>{throw u(),e})),o}downloadRuntime(e,t){const n=oe.RuntimeError.getCallSite();return new Promise(((i,r)=>{if(\"openfin\"!==this.wire.environment.type)return void r(new oe.NotSupportedError(\"downloadRuntime only supported in an OpenFin Render process\"));const o=this.wire.environment.getNextMessageId().toString(),s=`runtime-download-progress-${o}`,a=`runtime-download-error-${o}`,c=`runtime-download-complete-${o}`,d=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},h=()=>{this.removeListener(s,d)};this.on(s,d),this.once(a,(e=>{h();const{reason:t,err:i}=e;r(new oe.RuntimeError({reason:t,error:i},n))})),this.once(c,(()=>{h(),i()}));const l=Object.assign(e,{downloadId:o});this.wire.sendAction(\"download-runtime\",l).catch((e=>{h(),r(e)}))}))}downloadPreloadScripts(e){return this.wire.sendAction(\"download-preload-scripts\",{scripts:e}).then((({payload:e})=>e.data))}getAllExternalApplications(){return this.wire.sendAction(\"get-all-external-applications\").then((({payload:e})=>e.data))}getAppAssetInfo(e){return this.wire.sendAction(\"get-app-asset-info\",e).then((({payload:e})=>e.data))}getCookies(e){const t=this.wire.environment.getUrl(),n=Object.assign(e,{url:t});return this.wire.sendAction(\"get-cookies\",n).then((({payload:e})=>e.data))}setMinLogLevel(e){return this.wire.sendAction(\"set-min-log-level\",{level:e}).then((()=>{}))}resolveUuid(e){return this.wire.sendAction(\"resolve-uuid\",{entityKey:e}).then((({payload:e})=>e.data))}executeOnRemote(e,t){return t.requestingIdentity=e,this.wire.ferryAction(t)}readRegistryValue(e,t,n){return this.wire.sendAction(\"read-registry-value\",{rootKey:e,subkey:t,value:n}).then((({payload:e})=>e.data))}registerExternalConnection(e){return this.wire.sendAction(\"register-external-connection\",{uuid:e}).then((({payload:e})=>e.data))}async getServiceConfiguration(e){if(\"string\"!=typeof e.name)throw new Error(\"Must provide an object with a `name` property having a string value\");const{name:t}=e;return this.wire.sendAction(\"get-service-configuration\",{name:t}).then((({payload:e})=>e.data))}async getSystemAppConfig(e){if(\"string\"!=typeof e)throw new Error(\"Must provide a string value for name of system app\");return this.wire.sendAction(\"get-system-app-configuration\",{name:e}).then((({payload:e})=>e.data))}async registerShutdownHandler(e){this.wire.sendAction(\"system-register-shutdown-handler\").catch((e=>{}));const{uuid:t,name:n}=this.wire.me;this.on(\"system-shutdown\",(i=>{e({proceed:()=>{this.wire.environment.raiseEvent(\"application/system-shutdown-handled\",{uuid:t,name:n,topic:\"application\"})}})}))}runRvmHealthCheck(){return this.wire.sendAction(\"run-rvm-health-check\").then((({payload:e})=>e.data))}async launchManifest(e,t={}){const{subscribe:n,...i}=t,r=i;if(n){const e=new ae.EventEmitter;n(e);const t=\"app-version-progress\",i=\"runtime-status\",o=\"app-version-complete\",s=\"app-version-error\",a=this.wire.environment.getNextMessageId().toString();r.appVersionId=a;const c=[o,t,i,s],d=e=>{const{appVersionId:t,topic:n,type:i,...r}=e;return{...r,type:c.find((e=>i.includes(e)))}},h=t=>{const n=d(t);e.emit(n.type,n)},l=()=>{this.removeListener(`${t}.${a}`,h),this.removeListener(`${i}.${a}`,h),this.removeListener(`${o}.${a}`,h),this.removeListener(`${s}.${a}`,h),this.removeListener(`${o}.${a}`,l),this.removeListener(`${s}.${a}`,l)};await Promise.all([this.on(`${t}.${a}`,h),this.on(`${i}.${a}`,h),this.once(`${o}.${a}`,h),this.once(`${s}.${a}`,h),this.once(`${o}.${a}`,l),this.once(`${s}.${a}`,l)])}return(await this.wire.sendAction(\"launch-manifest\",{manifestUrl:e,opts:r})).payload.data.manifest}async queryPermissionForCurrentContext(e){const t={uuid:this.wire.me.uuid,name:this.wire.me.name};return(await this.wire.sendAction(\"query-permission-for-current-context\",{apiName:e,identity:t})).payload.data}async enableNativeWindowIntegrationProvider(e){const{payload:t}=await this.wire.sendAction(\"enable-native-window-integration-provider\",{permissions:e});return t.data}async registerUsage({data:e,type:t}){await this.wire.sendAction(\"register-usage\",{data:e,type:t})}async getPrinters(){const{payload:e}=await this.wire.sendAction(\"system-get-printers\");return e.data}async updateProcessLoggingOptions(e){await this.wire.sendAction(\"system-update-process-logging-options\",{options:e})}async getDomainSettings(){const{payload:{data:e}}=await this.wire.sendAction(\"get-domain-settings\",this.identity);return e}async setDomainSettings(e){await this.wire.sendAction(\"set-domain-settings\",{domainSettings:e,...this.identity})}async refreshExtensions(){const{payload:e}=await this.wire.sendAction(\"refresh-extensions\");return e.data}async getInstalledExtensions(){const{payload:e}=await this.wire.sendAction(\"get-installed-extensions\");return e.data}}c.System=ce;var de={},he={};Object.defineProperty(he,\"__esModule\",{value:!0}),he.RefCounter=void 0;he.RefCounter=class{constructor(){this.topicRefMap=new Map}incRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t+1;n=i,this.topicRefMap.set(e,i)}else this.topicRefMap.set(e,1),n=1;return n}decRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t-1;this.topicRefMap.set(e,i),n=i}else n=-1;return n}actOnFirst(e,t,n){return 1===this.incRefCount(e)?t():n()}actOnLast(e,t,n){return 0===this.decRefCount(e)?t():n()}};var le={},ue={},pe={};Object.defineProperty(pe,\"__esModule\",{value:!0}),pe.ChannelBase=pe.ProtectedItems=void 0;const we=e=>async(t,n,i)=>{const r=await e(t,n,i);return void 0===r?n:r};pe.ProtectedItems=class{constructor(e,t){this.providerIdentity=e,this.close=t}};class ye{static defaultAction(e){throw new Error(`No action registered at target for ${e}`)}constructor(){this.subscriptions=new Map}async processAction(e,t,n){try{const i=this.subscriptions.has(e)?this.subscriptions.get(e):(t,n)=>(this.defaultAction??ye.defaultAction)(e,t,n),r=this.preAction?await this.preAction(e,t,n):t,o=await i(r,n);return this.postAction?await this.postAction(e,o,n):o}catch(t){if(this.errorMiddleware)return this.errorMiddleware(e,t,n);throw t}}beforeAction(e){if(this.preAction)throw new Error(\"Already registered beforeAction middleware\");this.preAction=we(e)}onError(e){if(this.errorMiddleware)throw new Error(\"Already registered error middleware\");this.errorMiddleware=e}afterAction(e){if(this.postAction)throw new Error(\"Already registered afterAction middleware\");this.postAction=we(e)}remove(e){this.subscriptions.delete(e)}setDefaultAction(e){if(this.defaultAction)throw new Error(\"default action can only be set once\");this.defaultAction=e}register(e,t){if(this.subscriptions.has(e))throw new Error(`Subscription already registered for action: ${e}. Unsubscribe before adding new subscription`);return this.subscriptions.set(e,t),!0}}pe.ChannelBase=ye;var fe,ge,me,ve=s&&s.__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)},Ce=s&&s.__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};Object.defineProperty(ue,\"__esModule\",{value:!0}),ue.ChannelClient=void 0;const be=pe,Ie=new Map;class Ee extends be.ChannelBase{static closeChannelByEndpointId(e){const t=Ie.get(e);t&&ve(t,me,\"f\").call(t)}static handleProviderDisconnect(e){for(const t of Ie.values())t.providerIdentity.channelId===e.channelId&&(t.disconnectListener(e),ve(t,me,\"f\").call(t))}constructor(e,t,n){super(),fe.set(this,void 0),ge.set(this,void 0),this.processAction=(e,t,n)=>super.processAction(e,t,n),me.set(this,(()=>{Ie.delete(this.endpointId),ve(this,ge,\"f\").close()})),Ce(this,fe,new be.ProtectedItems(e,t),\"f\"),this.disconnectListener=()=>{},this.endpointId=e.endpointId,Ce(this,ge,n,\"f\"),Ie.set(this.endpointId,this),n.receive(this.processAction)}get providerIdentity(){return ve(this,fe,\"f\").providerIdentity}async dispatch(e,t){if(ve(this,ge,\"f\").isEndpointConnected(this.providerIdentity.channelId))return ve(this,ge,\"f\").send(this.providerIdentity.channelId,e,t);throw new Error(\"The client you are trying to dispatch from is disconnected from the target provider.\")}onDisconnection(e){this.disconnectListener=t=>{try{e(t)}catch(e){throw new Error(`Error while calling the onDisconnection callback: ${e.message}`)}finally{this.disconnectListener=()=>{}}}}async disconnect(){await this.sendDisconnectAction(),ve(this,me,\"f\").call(this)}async sendDisconnectAction(){const e=ve(this,fe,\"f\");await e.close()}static async wireClose(e,t,n){const{channelName:i,uuid:r,name:o}=t;await e.sendAction(\"disconnect-from-channel\",{channelName:i,uuid:r,name:o,endpointId:n})}}ue.ChannelClient=Ee,fe=new WeakMap,ge=new WeakMap,me=new WeakMap;var xe={},Ae={};Object.defineProperty(Ae,\"__esModule\",{value:!0}),Ae.exhaustiveCheck=void 0,Ae.exhaustiveCheck=function(e,t){throw new Error(`Unsupported value: ${e}${t?`\\n Supported values are: ${t.join(\"\")}`:\"\"}`)};var Pe,Me,_e,Oe={},Se=s&&s.__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},Re=s&&s.__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)};Object.defineProperty(Oe,\"__esModule\",{value:!0}),Oe.ClassicInfo=Oe.ClassicStrategy=void 0;Oe.ClassicStrategy=class{constructor(e,t,n,i){this.messageReceiver=t,this.endpointId=n,this.providerIdentity=i,Pe.set(this,void 0),Me.set(this,new Map),_e.set(this,new Map),this.send=async(e,t,n)=>{const i=Re(this,Me,\"f\").get(e);if(!i)throw new Error(`Could not locate routing info for endpoint ${e}`);const r={...i};r.isLocalEndpointId&&delete r.endpointId,delete r.isLocalEndpointId;const o=Re(this,Pe,\"f\").sendAction(\"send-channel-message\",{...r,providerIdentity:this.providerIdentity,action:t,payload:n});Re(this,_e,\"f\").get(e)?.add(o);return(await o.catch((e=>{throw new Error(e.message)})).finally((()=>{Re(this,_e,\"f\").get(e)?.delete(o)}))).payload.data.result},this.close=async()=>{this.messageReceiver.removeEndpoint(this.providerIdentity.channelId,this.endpointId),[...Re(this,Me,\"f\").keys()].forEach((e=>this.closeEndpoint(e))),Se(this,Me,new Map,\"f\")},Se(this,Pe,e,\"f\")}onEndpointDisconnect(e,t){}receive(e){this.messageReceiver.addEndpoint(e,this.providerIdentity.channelId,this.endpointId)}async closeEndpoint(e){const t=Re(this,Me,\"f\").get(e);Re(this,Me,\"f\").delete(e);const n=Re(this,_e,\"f\").get(e);n?.forEach((n=>{const i=`Channel connection with identity uuid: ${t?.uuid} / name: ${t?.name} / endpointId: ${e} no longer connected.`;n.cancel(new Error(i))}))}isEndpointConnected(e){return Re(this,Me,\"f\").has(e)}addEndpoint(e,t){Re(this,Me,\"f\").set(e,t.endpointIdentity),Re(this,_e,\"f\").set(e,new Set)}isValidEndpointPayload(e){return\"string\"==typeof e?.endpointIdentity?.endpointId||\"string\"==typeof e?.endpointIdentity?.channelId}},Pe=new WeakMap,Me=new WeakMap,_e=new WeakMap,Oe.ClassicInfo={version:5,minimumVersion:0,type:\"classic\"};var Fe={},je={},ke={};Object.defineProperty(ke,\"__esModule\",{value:!0}),ke.errorToPOJO=void 0,ke.errorToPOJO=function(e){return{stack:e.stack,name:e.name,message:e.message,toString:()=>e.stack||e.toString()}};var Le,Te,$e=s&&s.__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)},Be=s&&s.__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};Object.defineProperty(je,\"__esModule\",{value:!0}),je.RTCEndpoint=void 0;const Ge=ke;je.RTCEndpoint=class{static isValidEndpointPayload(e){const t=e=>\"object\"==typeof e&&null!==e;return t(e)&&t(e.endpointIdentity)&&t(e.rtc)&&\"string\"==typeof e.endpointIdentity.endpointId}constructor({rtc:e,endpointIdentity:t}){this.responseMap=new Map,Le.set(this,null),Te.set(this,void 0),this.connectionStateChangeHandler=e=>{\"connected\"!==this.rtc.rtcClient.connectionState&&(this.rtc.rtcClient.removeEventListener(\"connectionstatechange\",this.connectionStateChangeHandler),this.close(),$e(this,Te,\"f\")&&$e(this,Te,\"f\").call(this))},this.send=async(e,t)=>{const n=`message-${Math.random()}`,i=new Promise(((e,t)=>{this.responseMap.set(n,{resolve:e,reject:t})}));return this.rtc.channels.request.send(JSON.stringify({action:e,payload:t,messageId:n})),i},this.close=()=>{this.responseMap.forEach((e=>e.reject(\"Connection has closed.\"))),this.responseMap=new Map,this.rtc.channels.request.close(),this.rtc.channels.response.close(),this.rtc.rtcClient.close()},this.rtc=e,this.endpointIdentity=t,this.rtc.channels.response.addEventListener(\"message\",(e=>{let{data:t}=e;e.data instanceof ArrayBuffer&&(t=(new TextDecoder).decode(e.data));const{messageId:n,payload:i,success:r,error:o}=JSON.parse(t),{resolve:s,reject:a}=this.responseMap.get(n)??{};s&&a?(this.responseMap.delete(n),r?s(i):a(o)):(console.log(\"Could not find id in responseMap.\"),console.log(e))})),this.rtc.channels.request.addEventListener(\"message\",(async e=>{let{data:n}=e;e.data instanceof ArrayBuffer&&(n=(new TextDecoder).decode(e.data));const{messageId:i,action:r,payload:o}=JSON.parse(n);if($e(this,Le,\"f\"))try{const e=await $e(this,Le,\"f\").call(this,r,o,t);this.rtc.channels.response.send(JSON.stringify({messageId:i,payload:e,success:!0}))}catch(e){\"open\"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,error:(0,Ge.errorToPOJO)(e),success:!1}))}else\"open\"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,success:!1,error:\"Connection not ready.\"}))})),this.rtc.rtcClient.addEventListener(\"connectionstatechange\",this.connectionStateChangeHandler),Object.values(this.rtc.channels).forEach((e=>{e.onclose=e=>{[...this.responseMap.values()].forEach((e=>e.reject(new Error(\"RTCDataChannel closed unexpectedly, this is most commonly caused by message size. Note: RTC Channels have a message size limit of ~255kB.\")))),this.close(),$e(this,Te,\"f\")&&$e(this,Te,\"f\").call(this)}}))}onDisconnect(e){if($e(this,Te,\"f\"))throw new Error(\"RTCEndpoint disconnectListener cannot be set twice.\");Be(this,Te,e,\"f\")}receive(e){if($e(this,Le,\"f\"))throw new Error(\"You have already set a listener for this RTC Endpoint.\");Be(this,Le,e,\"f\")}get connected(){return\"connected\"===this.rtc.rtcClient.connectionState}},Le=new WeakMap,Te=new WeakMap;var We,He,Ne,De={},Ue=s&&s.__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)},Ve=s&&s.__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};Object.defineProperty(De,\"__esModule\",{value:!0}),De.EndpointStrategy=void 0;De.EndpointStrategy=class{constructor(e,t,n){this.EndpointType=e,this.StrategyName=n,We.set(this,null),He.set(this,new Map),Ne.set(this,!0),this.send=async(e,t,n)=>this.getEndpointById(e).send(t,n),this.close=async()=>{Ue(this,Ne,\"f\")&&(Ue(this,He,\"f\").forEach((e=>e.close())),Ve(this,He,new Map,\"f\")),Ve(this,Ne,!1,\"f\")},this.isValidEndpointPayload=t}onEndpointDisconnect(e,t){this.getEndpointById(e).onDisconnect(t)}receive(e){if(Ue(this,We,\"f\"))throw new Error(`You have already set a listener for this ${this.StrategyName} Strategy`);Ve(this,We,e,\"f\"),Ue(this,He,\"f\").forEach((e=>e.receive(Ue(this,We,\"f\"))))}getEndpointById(e){const t=Ue(this,He,\"f\").get(e);if(!t)throw new Error(`Client with endpoint id ${e} is not connected`);return t}get connected(){return Ue(this,Ne,\"f\")}isEndpointConnected(e){return Ue(this,He,\"f\").has(e)}addEndpoint(e,t){if(!Ue(this,Ne,\"f\"))return void console.warn(`Adding endpoint to disconnected ${this.StrategyName} Strategy`);const n=new this.EndpointType(t);Ue(this,We,\"f\")&&n.receive(Ue(this,We,\"f\")),Ue(this,He,\"f\").set(e,n)}async closeEndpoint(e){Ue(this,He,\"f\").delete(e)}},We=new WeakMap,He=new WeakMap,Ne=new WeakMap,Object.defineProperty(Fe,\"__esModule\",{value:!0}),Fe.RTCInfo=Fe.RTCStrategy=void 0;const ze=je,Ke=De;class qe extends Ke.EndpointStrategy{constructor(){super(ze.RTCEndpoint,ze.RTCEndpoint.isValidEndpointPayload,\"RTC\")}}Fe.RTCStrategy=qe,Fe.RTCInfo={version:2,minimumVersion:0,type:\"rtc\"};var Je={};Object.defineProperty(Je,\"__esModule\",{value:!0}),Je.RTCICEManager=void 0;const Ye=d;class Ze extends Ye.EmitterBase{constructor(e){super(e,\"channel\"),this.ensureChannelOpened=e=>new Promise(((t,n)=>{if(\"open\"===e.readyState)t();else if(\"connecting\"===e.readyState){const n=()=>{e.removeEventListener(\"open\",n),t()};e.addEventListener(\"open\",n)}else n(new Error(\"This Channel has already closed\"))}))}static createDataChannelPromise(e,t){let n;const i=new Promise((e=>{n=e})),r=i=>{const o=()=>{i.channel.removeEventListener(\"open\",o),n(i.channel)};i.channel.label===e&&(i.channel.addEventListener(\"open\",o),t.removeEventListener(\"datachannel\",r))};return t.addEventListener(\"datachannel\",r),i}async listenForProviderIce(e,t){await this.on(this.createProviderEventName(e),t,{timestamp:Date.now()})}async raiseProviderIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createProviderEventName(e)),t)}async listenForClientIce(e,t){await this.on(this.createClientEventName(e),t,{timestamp:Date.now()})}async raiseClientIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createClientEventName(e)),t)}cleanupIceListeners(e){this.removeAllListeners(this.createClientEventName(e)),this.removeAllListeners(this.createProviderEventName(e))}createClientEventName(e){return`ice-client-${e}`}createProviderEventName(e){return`ice-provider-${e}`}createRouteString(e){return`channel/${e}`}createRtcPeer(){return this.wire.environment.getRtcPeer()}async startClientOffer(){const e=Math.random().toString(),t=this.createRtcPeer();t.addEventListener(\"icecandidate\",(async t=>{t.candidate&&await this.raiseClientIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForProviderIce(e,(async e=>{await t.addIceCandidate(e.candidate)}));const n={request:t.createDataChannel(\"request\"),response:t.createDataChannel(\"response\")},i=await t.createOffer();await t.setLocalDescription(i);const r=Promise.all([n.request,n.response].map(this.ensureChannelOpened)).then((()=>{}));return{rtcClient:t,channels:n,offer:i,rtcConnectionId:e,channelsOpened:r}}async finishClientOffer(e,t,n){return await e.setRemoteDescription(t),await n,!0}async createProviderAnswer(e,t){const n=this.createRtcPeer(),i=Ze.createDataChannelPromise(\"request\",n),r=Ze.createDataChannelPromise(\"response\",n);n.addEventListener(\"icecandidate\",(async t=>{t.candidate&&await this.raiseProviderIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForClientIce(e,(async e=>{await n.addIceCandidate(e.candidate)})),await n.setRemoteDescription(t);const o=await n.createAnswer();await n.setLocalDescription(o);const s=Promise.all([i,r]).then((([t,n])=>(this.cleanupIceListeners(e),{request:t,response:n})));return{rtcClient:n,answer:o,channels:s}}}Je.RTCICEManager=Ze;var Qe={},Xe={};function et(e){return[...e.split(\".\").reverse().entries()].reduce(((e,[t,n])=>e+ +n*1e4**t),0)}function tt(e,t){return et(e)>=et(t)}function nt(e){return e.split(\"/\")[0]}Object.defineProperty(Xe,\"__esModule\",{value:!0}),Xe.runtimeUuidMeetsMinimumRuntimeVersion=Xe.parseRuntimeUuid=Xe.meetsMinimumRuntimeVersion=void 0,Xe.meetsMinimumRuntimeVersion=tt,Xe.parseRuntimeUuid=nt,Xe.runtimeUuidMeetsMinimumRuntimeVersion=function(e,t){return tt(nt(e),t)};var it,rt,ot,st,at,ct=s&&s.__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)},dt=s&&s.__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};Object.defineProperty(Qe,\"__esModule\",{value:!0}),Qe.ChannelProvider=void 0;const ht=pe,lt=Xe;class ut extends ht.ChannelBase{get connections(){return[...ct(this,it,\"f\")]}static handleClientDisconnection(e,t){const n=e.connections.find((e=>e.endpointId===t.endpointId));if(n)ct(e,st,\"f\").call(e,n);else{e.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name)).forEach(ct(e,st,\"f\"))}e.disconnectListener(t)}static setProviderRemoval(e,t){ut.removalMap.set(e,t)}constructor(e,t,n){super(),it.set(this,void 0),rt.set(this,void 0),ot.set(this,void 0),st.set(this,(e=>{const t=this.connections.filter((t=>t.endpointId!==e.endpointId));ct(this,ot,\"f\").closeEndpoint(e.endpointId),dt(this,it,t,\"f\")})),this.processAction=async(e,t,n)=>(ut.clientIsMultiRuntime(n)&&!(0,lt.runtimeUuidMeetsMinimumRuntimeVersion)(n.runtimeUuid,\"18.87.56.0\")?this.handleMultiRuntimeLegacyClient(n):this.checkForClientConnection(n),super.processAction(e,t,n)),at.set(this,(()=>{ct(this,ot,\"f\").close();const e=ut.removalMap.get(this);e&&e()})),dt(this,rt,new ht.ProtectedItems(e,t),\"f\"),this.connectListener=()=>{},this.disconnectListener=()=>{},dt(this,it,[],\"f\"),dt(this,ot,n,\"f\"),n.receive(this.processAction)}dispatch(e,t,n){const i=e.endpointId??this.getEndpointIdForOpenFinId(e,t);return i&&ct(this,ot,\"f\").isEndpointConnected(i)?ct(this,ot,\"f\").send(i,t,n):Promise.reject(new Error(`Client connection with identity uuid: ${e.uuid} / name: ${e.name} / endpointId: ${i} no longer connected.`))}async processConnection(e,t){return ct(this,it,\"f\").push(e),this.connectListener(e,t)}publish(e,t){return this.connections.map((n=>ct(this,ot,\"f\").send(n.endpointId,e,t)))}onConnection(e){this.connectListener=e}onDisconnection(e){this.disconnectListener=e}async destroy(){const e=ct(this,rt,\"f\");e.providerIdentity,dt(this,it,[],\"f\"),await e.close(),ct(this,at,\"f\").call(this)}async getAllClientInfo(){return this.connections.map((e=>{const{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}=e;return{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}}))}checkForClientConnection(e){if(!this.isClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider.\\n Client Identity: {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}isClientConnected(e){return ut.clientIdentityIncludesEndpointId(e)?this.connections.some((t=>t.endpointId===e.endpointId&&t.uuid===e.uuid&&t.name===e.name)):this.isLegacyClientConnected(e)}isLegacyClientConnected(e){return this.connections.some((t=>t.uuid===e.uuid&&t.name===e.name))}handleMultiRuntimeLegacyClient(e){if(!this.isLegacyClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider. Client Identity:\\n {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}getEndpointIdForOpenFinId(e,t){const n=this.connections.filter((t=>t.name===e.name&&t.uuid===e.uuid));if(n.length>=2){const n=ct(this,rt,\"f\"),{uuid:i,name:r}=e,o=n?.providerIdentity.uuid,s=n?.providerIdentity.name;console.warn(`WARNING: Dispatch call may have unintended results. The \"to\" argument of your dispatch call is missing the\\n \"endpointId\" parameter. The identity you are dispatching to ({uuid: ${i}, name: ${r}})\\n has multiple channelClients for this channel. Your dispatched action: (${t}) from the provider:\\n ({uuid: ${o}, name: ${s}}) will only be processed by the most recently-created client.`)}return n.pop()?.endpointId}static clientIdentityIncludesEndpointId(e){return void 0!==e.endpointId}static clientIsMultiRuntime(e){return void 0!==e.runtimeUuid}static async wireClose(e,t){await e.sendAction(\"destroy-channel\",{channelName:t})}}Qe.ChannelProvider=ut,it=new WeakMap,rt=new WeakMap,ot=new WeakMap,st=new WeakMap,at=new WeakMap,ut.removalMap=new WeakMap;var pt={};Object.defineProperty(pt,\"__esModule\",{value:!0}),pt.MessageReceiver=void 0;const wt=ue,yt=d;class ft extends yt.Base{constructor(e){super(e),this.onmessage=e=>\"process-channel-message\"===e.action&&(this.processChannelMessage(e),!0),this.endpointMap=new Map,this.latestEndpointIdByChannelId=new Map,e.registerMessageHandler(this.onmessage.bind(this))}async processChannelMessage(e){const{senderIdentity:t,providerIdentity:n,action:i,ackToSender:r,payload:o,intendedTargetIdentity:s}=e.payload,a=s.channelId??s.endpointId??this.latestEndpointIdByChannelId.get(n.channelId),c=this.endpointMap.get(a);if(!c)return r.payload.success=!1,r.payload.reason=`Client connection with identity uuid: ${this.wire.me.uuid} / name: ${this.wire.me.name} / endpointId: ${a} no longer connected.`,this.wire.sendRaw(r);try{const e=await c(i,o,t);return r.payload.payload=r.payload.payload||{},r.payload.payload.result=e,this.wire.sendRaw(r)}catch(e){return r.payload.success=!1,r.payload.reason=e.message,this.wire.sendRaw(r)}}addEndpoint(e,t,n){this.endpointMap.set(n,e),t!==n&&this.latestEndpointIdByChannelId.set(t,n)}removeEndpoint(e,t){this.endpointMap.delete(t),this.latestEndpointIdByChannelId.get(e)===t&&this.latestEndpointIdByChannelId.delete(e)}checkForPreviousClientConnection(e){const t=this.latestEndpointIdByChannelId.get(e);t&&(wt.ChannelClient.closeChannelByEndpointId(t),console.warn(\"You have created a second connection to an older provider. First connection has been removed from the clientMap\"),console.warn(\"If the provider calls publish(), you may receive multiple messages.\"))}}pt.MessageReceiver=ft;var gt={};Object.defineProperty(gt,\"__esModule\",{value:!0}),gt.ProtocolManager=void 0;gt.ProtocolManager=class{constructor(e){this.ProtocolsInPreferenceOrder=e,this.DefaultClientProtocols=[\"classic\"],this.DefaultProviderProtocols=[\"classic\"],this.getClientProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultClientProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(\", \")}.`);return t},this.getProviderProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultProviderProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(\", \")}.`);return t},this.getCompatibleProtocols=(e,t)=>t.supportedProtocols.filter((t=>e.some((e=>e.type===t.type&&t.version>=e.minimumVersion&&e.version>=(t.minimumVersion??0))))).slice(0,t.maxProtocols)}};var mt={};Object.defineProperty(mt,\"__esModule\",{value:!0});class vt{static combine(e,t){return new vt(e,t)}constructor(e,t){this.primary=e,this.secondary=t}onEndpointDisconnect(e,t){this.primary.onEndpointDisconnect(e,(()=>{this.secondary.isEndpointConnected(e)||t()})),this.secondary.onEndpointDisconnect(e,(()=>{this.primary.isEndpointConnected(e)||t()}))}isValidEndpointPayload(e){return this.primary.isValidEndpointPayload(e)||this.secondary.isValidEndpointPayload(e)}async closeEndpoint(e){await this.primary.closeEndpoint(e),await this.secondary.closeEndpoint(e)}isEndpointConnected(e){return this.primary.isEndpointConnected(e)||this.secondary.isEndpointConnected(e)}async addEndpoint(e,t){this.primary.isValidEndpointPayload(t)&&await this.primary.addEndpoint(e,t),this.secondary.isValidEndpointPayload(t)&&await this.secondary.addEndpoint(e,t)}receive(e){this.primary.receive(e),this.secondary.receive(e)}send(e,t,n){return this.primary.isEndpointConnected(e)?this.primary.send(e,t,n):this.secondary.send(e,t,n)}async close(){await Promise.all([this.primary.close(),this.secondary.close()])}}mt.default=vt;var Ct,bt,It=s&&s.__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},Et=s&&s.__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)},xt=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(xe,\"__esModule\",{value:!0}),xe.ConnectionManager=void 0;const At=Ae,Pt=d,Mt=Oe,_t=Fe,Ot=Je,St=Qe,Rt=pt,Ft=gt,jt=xt(mt);class kt extends Pt.Base{static getProtocolOptionsFromStrings(e){return e.map((e=>{switch(e){case\"rtc\":return _t.RTCInfo;case\"classic\":return Mt.ClassicInfo;default:return(0,At.exhaustiveCheck)(e,[\"rtc\",\"classic\"])}}))}constructor(e){super(e),Ct.set(this,void 0),bt.set(this,void 0),this.removeChannelFromProviderMap=e=>{this.providerMap.delete(e)},this.onmessage=e=>\"process-channel-connection\"===e.action&&(this.processChannelConnection(e),!0),this.providerMap=new Map,this.protocolManager=new Ft.ProtocolManager(\"node\"===this.wire.environment.type?[\"classic\"]:[\"rtc\",\"classic\"]),It(this,Ct,new Rt.MessageReceiver(e),\"f\"),It(this,bt,new Ot.RTCICEManager(e),\"f\"),e.registerMessageHandler(this.onmessage.bind(this))}createProvider(e,t){const n=Object.assign(this.wire.environment.getDefaultChannelOptions().create,e||{}),i=this.protocolManager.getProviderProtocols(n?.protocols),r=i.map((e=>{switch(e){case\"rtc\":return new _t.RTCStrategy;case\"classic\":return new Mt.ClassicStrategy(this.wire,Et(this,Ct,\"f\"),t.channelId,t);default:return(0,At.exhaustiveCheck)(e,[\"rtc\",\"classic\"])}}));let o;if(2===r.length){const[e,t]=r;o=jt.default.combine(e,t)}else{if(1!==r.length)throw new Error(\"failed to combine strategies\");[o]=r}const s=new St.ChannelProvider(t,(()=>St.ChannelProvider.wireClose(this.wire,t.channelName)),o),a=t.channelId;return this.providerMap.set(a,{provider:s,strategy:o,supportedProtocols:kt.getProtocolOptionsFromStrings(i)}),St.ChannelProvider.setProviderRemoval(s,this.removeChannelFromProviderMap.bind(this)),s}async createClientOffer(e){const t=this.protocolManager.getClientProtocols(e?.protocols);let n;return{offer:{supportedProtocols:await Promise.all(t.map((async e=>{switch(e){case\"rtc\":{const{rtcClient:e,channels:t,offer:i,rtcConnectionId:r,channelsOpened:o}=await Et(this,bt,\"f\").startClientOffer();return n={rtcClient:e,channels:t,channelsOpened:o},{type:\"rtc\",version:_t.RTCInfo.version,payload:{offer:i,rtcConnectionId:r}}}case\"classic\":return{type:\"classic\",version:Mt.ClassicInfo.version};default:return(0,At.exhaustiveCheck)(e,[\"rtc\",\"classic\"])}}))),maxProtocols:2},rtc:n}}async createClientStrategy(e,t){t.endpointId||(t.endpointId=this.wire.environment.getNextMessageId(),Et(this,Ct,\"f\").checkForPreviousClientConnection(t.channelId));const n=t.answer??{supportedProtocols:[{type:\"classic\",version:1}]},i=(await Promise.all(n.supportedProtocols.map((async n=>\"rtc\"===n.type&&e?(await Et(this,bt,\"f\").finishClientOffer(e.rtcClient,n.payload.answer,e.channelsOpened),new _t.RTCStrategy):\"classic\"===n.type?new Mt.ClassicStrategy(this.wire,Et(this,Ct,\"f\"),t.endpointId,t):null)))).filter((e=>null!==e));let r;if(e&&!i.some((e=>e instanceof _t.RTCStrategy))&&e&&e.rtcClient.close(),i.length>=2)r=jt.default.combine(i[0],i[1]);else{if(!i.length)throw new Error(\"No compatible protocols\");[r]=i}const o={endpointIdentity:t,rtc:e};return r.addEndpoint(t.channelId,o),r}async processChannelConnection(e){const{clientIdentity:t,providerIdentity:n,ackToSender:i,payload:r,offer:o}=e.payload;t.endpointId?t.isLocalEndpointId=!1:(t.endpointId=this.wire.environment.getNextMessageId(),t.isLocalEndpointId=!0);const s=n.channelId,a=this.providerMap.get(s);if(!a)return i.payload.success=!1,i.payload.reason=`Channel \"${n.channelName}\" has been destroyed.`,this.wire.sendRaw(i);const{provider:c,strategy:d,supportedProtocols:h}=a;try{if(!(c instanceof St.ChannelProvider))throw Error(\"Cannot connect to a channel client\");const e=o??{supportedProtocols:[{type:\"classic\",version:1}],maxProtocols:1},n=this.protocolManager.getCompatibleProtocols(h,e);if(!n.length)throw new Error(\"This provider does not support any of the offered protocols.\");const s=await c.processConnection(t,r);i.payload.payload=i.payload.payload||{};let a={supportedProtocols:[],endpointPayloadPromise:Promise.resolve({endpointIdentity:t})};return a=await n.reduce((async(e,t)=>{const n=await e;if(\"rtc\"===t.type){const{answer:e,rtcClient:i,channels:r}=await Et(this,bt,\"f\").createProviderAnswer(t.payload.rtcConnectionId,t.payload.offer);n.supportedProtocols.push({type:\"rtc\",version:_t.RTCInfo.version,payload:{answer:e}}),n.endpointPayloadPromise=n.endpointPayloadPromise.then((e=>r.then((t=>({...e,rtc:{rtcClient:i,channels:t}})))))}else n.supportedProtocols.push({type:\"classic\",version:Mt.ClassicInfo.version});return n}),Promise.resolve(a)),a.endpointPayloadPromise.then((e=>d.addEndpoint(t.endpointId,e))),i.payload.payload.result=s,i.payload.payload.answer=a,this.wire.sendRaw(i)}catch(e){return i.payload.success=!1,i.payload.reason=e.message,this.wire.sendRaw(i)}}}xe.ConnectionManager=kt,Ct=new WeakMap,bt=new WeakMap;var Lt,Tt,$t,Bt=s&&s.__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},Gt=s&&s.__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)};Object.defineProperty(le,\"__esModule\",{value:!0}),le.Channel=void 0;const Wt=t,Ht=G,Nt=d,Dt=ue,Ut=xe,Vt=Qe;function zt(e){const t=Math.floor(e/10),n=Math.min(3e4,500*2**t);return new Promise((e=>{setTimeout((()=>{e(!1)}),n)}))}class Kt extends Nt.EmitterBase{constructor(e){super(e,\"channel\"),Lt.set(this,void 0),Tt.set(this,new Wt.EventEmitter),$t.set(this,new Ht.AsyncRetryableLazy((async()=>{await Promise.all([this.on(\"disconnected\",(e=>{Dt.ChannelClient.handleProviderDisconnect(e)})),this.on(\"connected\",((...e)=>{Gt(this,Tt,\"f\").emit(\"connected\",...e)}))]).catch((()=>new Error(\"error setting up channel connection listeners\")))}))),Bt(this,Lt,new Ut.ConnectionManager(e),\"f\")}async getAllChannels(){return this.wire.sendAction(\"get-all-channels\").then((({payload:e})=>e.data))}async onChannelConnect(e){await this.on(\"connected\",e)}async onChannelDisconnect(e){await this.on(\"disconnected\",e)}async safeConnect(e,t,n){const i={count:0};do{let r=()=>{};const o=new Promise((t=>{r=n=>{e===n.channelName&&t(!0)},Gt(this,Tt,\"f\").on(\"connected\",r)}));try{if(i.count>0){i.gotConnectedEvent=await Promise.race([zt(i.count),o]);const t=await this.wire.sendAction(\"connect-to-channel\",{...n,retryInfo:i});return console.log(`Successfully connected to channelName: ${e}`),t.payload.data}const t=this.wire.sendAction(\"connect-to-channel\",n);i.originalMessageId=t.messageId;return(await t).payload.data}catch(n){if(!n.message.includes(\"internal-nack\"))throw n;t&&0===i.count&&console.warn(`No channel found for channelName: ${e}. Waiting for connection...`)}finally{i.count+=1,Gt(this,Tt,\"f\").removeListener(\"connected\",r)}}while(t);throw new Error(`No channel found for channelName: ${e}.`)}async connect(e,t={}){if(await Gt(this,$t,\"f\").getValue(),!e||\"string\"!=typeof e)throw new Error(\"Please provide a channelName string to connect to a channel.\");const n={wait:!0,...this.wire.environment.getDefaultChannelOptions().connect,...t},{offer:i,rtc:r}=await Gt(this,Lt,\"f\").createClientOffer(n);let o;(this.fin.me.isFrame||this.fin.me.isView||this.fin.me.isWindow)&&(o=(await this.fin.me.getInfo()).url);const s={channelName:e,...n,offer:i,connectionUrl:o},a=await this.safeConnect(e,n.wait,s),c=await Gt(this,Lt,\"f\").createClientStrategy(r,a),d=new Dt.ChannelClient(a,(()=>Dt.ChannelClient.wireClose(this.wire,a,a.endpointId)),c);return c.onEndpointDisconnect(a.channelId,(async()=>{try{await d.sendDisconnectAction()}catch(e){console.warn(`Something went wrong during disconnect for client with uuid: ${a.uuid} / name: ${a.name} / endpointId: ${a.endpointId}.`)}finally{Dt.ChannelClient.handleProviderDisconnect(a)}})),d}async create(e,t){if(!e)throw new Error(\"Please provide a channelName to create a channel\");const{payload:{data:n}}=await this.wire.sendAction(\"create-channel\",{channelName:e}),i=Gt(this,Lt,\"f\").createProvider(t,n);return this.on(\"client-disconnected\",(t=>{t.channelName===e&&Vt.ChannelProvider.handleClientDisconnection(i,t)})),i}}le.Channel=Kt,Lt=new WeakMap,Tt=new WeakMap,$t=new WeakMap,Object.defineProperty(de,\"__esModule\",{value:!0}),de.InterAppPayload=de.InterApplicationBus=void 0;const qt=t,Jt=d,Yt=he,Zt=le,Qt=O;class Xt extends Jt.Base{constructor(e){super(e),this.events={subscriberAdded:\"subscriber-added\",subscriberRemoved:\"subscriber-removed\"},this.refCounter=new Yt.RefCounter,this.Channel=new Zt.Channel(e),this.emitter=new qt.EventEmitter,e.registerMessageHandler(this.onmessage.bind(this)),this.on=this.emitter.on.bind(this.emitter),this.removeAllListeners=this.emitter.removeAllListeners.bind(this.emitter)}async publish(e,t){await this.wire.sendAction(\"publish-message\",{topic:e,message:t,sourceWindowName:this.me.name})}async send(e,t,n){const i=(0,Qt.validateIdentity)(e);if(i)throw new Error(i);await this.wire.sendAction(\"send-message\",{destinationUuid:e.uuid,destinationWindowName:e.name,topic:t,message:n,sourceWindowName:this.me.name})}subscribe(e,t,n){const i=this.createSubscriptionKey(e.uuid,e.name||\"*\",t);return this.emitter.on(i,n),this.refCounter.actOnFirst(i,(async()=>{await this.wire.sendAction(\"subscribe\",{sourceUuid:e.uuid,sourceWindowName:e.name||\"*\",topic:t,destinationWindowName:this.me.name})}),(()=>Promise.resolve()))}unsubscribe(e,t,n){const i=e.name||\"*\",r=this.createSubscriptionKey(e.uuid,i,t);return this.emitter.removeListener(r,n),this.refCounter.actOnLast(r,(async()=>{await this.wire.sendAction(\"unsubscribe\",{sourceUuid:e.uuid,sourceWindowName:i,topic:t,destinationWindowName:this.me.name})}),(()=>new Promise((e=>e)).then((()=>{}))))}processMessage(e){const{payload:{message:t,sourceWindowName:n,sourceUuid:i,topic:r}}=e,o=[this.createSubscriptionKey(i,n,r),this.createSubscriptionKey(i,\"*\",r),this.createSubscriptionKey(\"*\",\"*\",r)],s={uuid:i,name:n};o.forEach((e=>{this.emitter.emit(e,t,s)}))}emitSubscriverEvent(e,t){const{payload:{targetName:n,uuid:i,topic:r}}=t,o={name:n,uuid:i,topic:r};this.emitter.emit(e,o)}createSubscriptionKey(e,t,n){const i=t||\"*\";if(!(e&&i&&n))throw new Error(\"Missing uuid, name, or topic string\");return function(...e){return e.map((e=>Buffer.from(`${e}`).toString(\"base64\"))).join(\"/\")}(e,i,n)}onmessage(e){const{action:t}=e;switch(t){case\"process-message\":this.processMessage(e);break;case this.events.subscriberAdded:this.emitSubscriverEvent(this.events.subscriberAdded,e);break;case this.events.subscriberRemoved:this.emitSubscriverEvent(this.events.subscriberRemoved,e)}return!0}}de.InterApplicationBus=Xt;de.InterAppPayload=class{};var en={};Object.defineProperty(en,\"__esModule\",{value:!0}),en.Clipboard=void 0;const tn=d;class nn extends tn.Base{async writeText(e){await this.wire.sendAction(\"clipboard-write-text\",e)}async readText(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-text\",{type:e});return t.data}async writeImage(e){await this.wire.sendAction(\"clipboard-write-image\",e)}async readImage(e={format:\"dataURL\"}){const{payload:t}=await this.wire.sendAction(\"clipboard-read-image\",e);return t.data}async writeHtml(e){await this.wire.sendAction(\"clipboard-write-html\",e)}async readHtml(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-html\",{type:e});return t.data}async writeRtf(e){await this.wire.sendAction(\"clipboard-write-rtf\",e)}async readRtf(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-rtf\",{type:e});return t.data}async write(e){await this.wire.sendAction(\"clipboard-write\",e)}async getAvailableFormats(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-formats\",{type:e});return t.data}}en.Clipboard=nn;var rn={},on={},sn={};Object.defineProperty(sn,\"__esModule\",{value:!0}),sn.ExternalApplication=void 0;const an=d;class cn extends an.EmitterBase{constructor(e,t){super(e,\"external-application\",t.uuid),this.identity=t}getInfo(){return this.wire.sendAction(\"get-external-application-info\",this.identity).then((({payload:e})=>e.data))}}sn.ExternalApplication=cn,Object.defineProperty(on,\"__esModule\",{value:!0}),on.ExternalApplicationModule=void 0;const dn=d,hn=sn;class ln extends dn.Base{wrap(e){return this.wire.sendAction(\"external-application-wrap\").catch((e=>{})),Promise.resolve(new hn.ExternalApplication(this.wire,{uuid:e}))}wrapSync(e){return this.wire.sendAction(\"external-application-wrap-sync\").catch((e=>{})),new hn.ExternalApplication(this.wire,{uuid:e})}}on.ExternalApplicationModule=ln,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(on,e),n(sn,e)}(rn);var un={},pn={},wn={};Object.defineProperty(wn,\"__esModule\",{value:!0}),wn._Frame=void 0;const yn=d;class fn extends yn.EmitterBase{constructor(e,t){super(e,\"frame\",t.uuid,t.name),this.identity=t}getInfo(){return this.wire.sendAction(\"get-frame-info\",this.identity).then((({payload:e})=>e.data))}getParentWindow(){return this.wire.sendAction(\"get-parent-window\",this.identity).then((({payload:e})=>e.data))}}wn._Frame=fn,Object.defineProperty(pn,\"__esModule\",{value:!0}),pn._FrameModule=void 0;const gn=d,mn=O,vn=wn;class Cn extends gn.Base{async wrap(e){this.wire.sendAction(\"frame-wrap\").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}wrapSync(e){this.wire.sendAction(\"frame-wrap-sync\").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}getCurrent(){return this.wire.sendAction(\"frame-get-current\").catch((e=>{})),Promise.resolve(new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity()))}getCurrentSync(){return this.wire.sendAction(\"frame-get-current-sync\").catch((e=>{})),new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity())}}pn._FrameModule=Cn,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(pn,e),n(wn,e)}(un);var bn={};Object.defineProperty(bn,\"__esModule\",{value:!0}),bn.GlobalHotkey=void 0;const In=d;class En extends In.EmitterBase{constructor(e){super(e,\"global-hotkey\")}async register(e,t){await this.on(e,t),await this.wire.sendAction(\"global-hotkey-register\",{hotkey:e})}async unregister(e){await this.removeAllListeners(e),await this.wire.sendAction(\"global-hotkey-unregister\",{hotkey:e})}async unregisterAll(){await Promise.all(this.eventNames().filter((e=>!(\"registered\"===e||\"unregistered\"===e))).map((e=>this.removeAllListeners(e)))),await this.wire.sendAction(\"global-hotkey-unregister-all\",{})}async isRegistered(e){const{payload:{data:t}}=await this.wire.sendAction(\"global-hotkey-is-registered\",{hotkey:e});return t}}bn.GlobalHotkey=En;var xn,An={},Pn={},Mn={},_n=s&&s.__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)};Object.defineProperty(Mn,\"__esModule\",{value:!0}),Mn.Platform=void 0;const On=d,Sn=O,Rn=new Map;class Fn extends On.EmitterBase{constructor(e,t){super(t.wire,\"application\",e.uuid),this.getClient=e=>{this.wire.sendAction(\"platform-get-client\",this.identity).catch((e=>{}));const t=e||this.identity,{uuid:n}=t;if(!Rn.has(n)){const e=_n(this,xn,\"f\").call(this,n);Rn.set(n,e)}return Rn.get(n)},xn.set(this,(async e=>{try{const t=`custom-frame-${e}`,n=await this._channel.connect(t,{wait:!1});return n.onDisconnection((()=>{Rn.delete(e)})),n}catch(t){throw Rn.delete(e),new Error(\"The targeted Platform is not currently running. Listen for application-started event for the given Uuid.\")}})),this.launchLegacyManifest=this.launchContentManifest;const n=(0,Sn.validateIdentity)(e);if(n)throw new Error(n);this._channel=t,this.identity={uuid:e.uuid},this.Layout=this.fin.Platform.Layout,this.Application=this.fin.Application.wrapSync(this.identity)}async createView(e,t,n){this.wire.sendAction(\"platform-create-view\",this.identity).catch((e=>{}));const i=await this.getClient(),r=await i.dispatch(\"create-view\",{target:t,opts:e,targetView:n});if(!r||(0,Sn.validateIdentity)(r.identity))throw new Error(`When overwriting the createView call, please return an object that has a valid 'identity' property: ${JSON.stringify(r)}`);return this.fin.View.wrapSync(r.identity)}async createWindow(e){this.wire.sendAction(\"platform-create-window\",this.identity).catch((e=>{}));const t=await this.getClient();e.reason||(e.reason=\"api-call\");const n=await t.dispatch(\"create-view-container\",e);if(!n||(0,Sn.validateIdentity)(n.identity))throw new Error(`When overwriting the createWindow call, please return an object that has a valid 'identity' property: ${JSON.stringify(n)}`);const{identity:i}=n,r=this.fin.Window.wrapSync(i);return r.name=i.name,r.uuid=i.uuid,r}async quit(){this.wire.sendAction(\"platform-quit\",this.identity).catch((e=>{}));return(await this.getClient()).dispatch(\"quit\")}async closeView(e){this.wire.sendAction(\"platform-close-view\",this.identity).catch((e=>{}));const t=await this.getClient();await t.dispatch(\"close-view\",{view:e})}async reparentView(e,t){console.warn(\"Platform.reparentView has been deprecated, please use Platform.createView\"),this.wire.sendAction(\"platform-reparent-view\",this.identity).catch((e=>{}));const n={...e,uuid:e.uuid??this.identity.uuid},i=await this.fin.View.wrap(n),r=await i.getOptions();return this.createView(r,t)}async getSnapshot(){this.wire.sendAction(\"platform-get-snapshot\",this.identity).catch((e=>{}));return(await this.getClient()).dispatch(\"get-snapshot\")}async getViewSnapshot(e){return(await this.getClient()).dispatch(\"get-view-snapshot\",{viewIdentity:e})}async applySnapshot(e,t){this.wire.sendAction(\"platform-apply-snapshot\",this.identity).catch((e=>{}));const n=\"Requested snapshot must be a valid Snapshot object, or a url or filepath to such an object.\";let i;if(\"string\"==typeof e)try{i=(await this._channel.wire.sendAction(\"get-application-manifest\",{manifestUrl:e})).payload.data}catch(e){throw new Error(`${n}: ${e}`)}else i=e;if(!i.windows)throw new Error(n);const r=await this.getClient();return await r.dispatch(\"apply-snapshot\",{snapshot:i,options:t}),this}async fetchManifest(e){return(await this.getClient()).dispatch(\"platform-fetch-manifest\",{manifestUrl:e})}async launchContentManifest(e){this.wire.sendAction(\"platform-launch-content-manifest\",this.identity).catch((()=>{}));const t=await this.getClient(),n=await this.fetchManifest(e);return t.dispatch(\"launch-into-platform\",{manifest:n,manifestUrl:e}),this}async setWindowContext(e={},t){if(this.wire.sendAction(\"platform-set-window-context\",this.identity).catch((e=>{})),!e)throw new Error(\"Please provide a serializable object or string to set the context.\");const n=await this.getClient(),{entityType:i}=t?await this.fin.System.getEntityInfo(t.uuid,t.name):this.fin.me;await n.dispatch(\"set-window-context\",{context:e,entityType:i,target:t||{uuid:this.fin.me.uuid,name:this.fin.me.name}})}async getWindowContext(e){this.wire.sendAction(\"platform-get-window-context\",this.identity).catch((e=>{}));const t=await this.getClient(),{entityType:n}=e?await this.fin.System.getEntityInfo(e.uuid,e.name):this.fin.me;return t.dispatch(\"get-window-context\",{target:e||{uuid:this.fin.me.uuid,name:this.fin.me.name},entityType:n})}async closeWindow(e,t={skipBeforeUnload:!1}){this.wire.sendAction(\"platform-close-window\",this.identity).catch((e=>{}));return(await this.getClient()).dispatch(\"close-window\",{windowId:e,options:t})}}Mn.Platform=Fn,xn=new WeakMap;var jn={},kn={},Ln={},Tn={};function $n(e){switch(e){case\"columns\":case\"grid\":case\"rows\":case\"tabs\":return!0;default:return!1}}Object.defineProperty(Tn,\"__esModule\",{value:!0}),Tn.overrideFromComposables=Tn.isValidPresetType=void 0,Tn.isValidPresetType=$n,Tn.overrideFromComposables=function(...e){return t=>e.reduceRight(((e,t)=>n=>t(e(n))),(e=>e))(t)},Tn.default={isValidPresetType:$n};var Bn={},Gn={},Wn={};Object.defineProperty(Wn,\"__esModule\",{value:!0}),Wn.ApiConsumer=void 0;Wn.ApiConsumer=class{constructor(e){this.strategy=e,this.consume=async e=>(await this.strategy.getExposedFunctions(e)).reduce(((t,n)=>({...t,[n.key]:this.strategy.createFunction(n,e)})),{})}};var Hn={},Nn={};Object.defineProperty(Nn,\"__esModule\",{value:!0}),Nn.expose=Nn.getExposedProperties=void 0;const Dn=Symbol(\"exposedProperties\");Nn.getExposedProperties=e=>e[Dn]||e.prototype[Dn]||[];Nn.expose=e=>(t,n,i)=>{t[Dn]=t[Dn]||[],t[Dn].push({key:n,descriptor:i,options:e})},Object.defineProperty(Hn,\"__esModule\",{value:!0}),Hn.ApiExposer=void 0;const Un=Nn;Hn.ApiExposer=class{constructor(e){this.strategy=e,this.exposeInstance=async(e,t)=>{const n=(0,Un.getExposedProperties)(e),i=await Promise.all(n.map((async({key:n,options:i})=>({key:n,options:await this.strategy.exposeFunction(e[n].bind(e),{key:n,options:i,meta:t})}))));await this.strategy.exposeMeta(t,i)}}};var Vn={},zn={},Kn={};Object.defineProperty(Kn,\"__esModule\",{value:!0}),Kn.ChannelsConsumer=void 0;Kn.ChannelsConsumer=class{constructor(e){this.channel=e,this.getExposedFunctions=async e=>{const{id:t}=e,{props:n}=await this.channel.dispatch(`api-meta:${t}`);return n},this.createFunction=e=>(...t)=>{const{action:n}=e.options;return this.channel.dispatch(n,{args:t})}}};var qn={};Object.defineProperty(qn,\"__esModule\",{value:!0}),qn.ChannelsExposer=void 0;qn.ChannelsExposer=class{constructor(e){this.channelProviderOrClient=e,this.exposeFunction=async(e,t)=>{const{key:n,options:i,meta:r}=t,{id:o}=r,s=`${o}.${i?.action||n}`;return await this.channelProviderOrClient.register(s,(async({args:t})=>e(...t))),{action:s}},this.exposeMeta=async({id:e},t)=>{const n=`api-meta:${e}`;await this.channelProviderOrClient.register(n,(()=>({props:t})))}}},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Kn,e),n(qn,e)}(zn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(zn,e)}(Vn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Wn,e),n(Hn,e),n(Vn,e),n(Nn,e)}(Gn);var Jn={};Object.defineProperty(Jn,\"__esModule\",{value:!0}),Jn.createRelayedDispatch=exports.relayChannelClientApi_1=Jn.relayChannelClientApi=void 0;const Yn=[\"no longer connected\",\"RTCDataChannel closed unexpectedly\",\"The client you are trying to dispatch from is disconnected from the target provider\"];exports.relayChannelClientApi_1=Jn.relayChannelClientApi=async(e,t)=>{e.register(`relay:${t}`,(({action:t,target:n,payload:i})=>e.dispatch(n,t,i))),await Promise.resolve()};Jn.createRelayedDispatch=(e,t,n,i)=>async(r,o)=>{try{return await e.dispatch(`relay:${n}`,{action:r,payload:o,target:t})}catch(e){if(s=e.message,Yn.some((e=>s.includes(e)))&&i)throw new Error(i);throw e}var s};var Zn,Qn,Xn,ei=s&&s.__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},ti=s&&s.__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)};Object.defineProperty(Bn,\"__esModule\",{value:!0}),Bn.ColumnOrRow=Bn.TabStack=Bn.LayoutNode=void 0;const ni=Gn,ii=Jn;class ri{constructor(e,t){Zn.set(this,void 0),this.isRoot=()=>ti(this,Zn,\"f\").isRoot(this.entityId),this.exists=()=>ti(this,Zn,\"f\").exists(this.entityId),this.getParent=async()=>{const e=await ti(this,Zn,\"f\").getParent(this.entityId);if(e)return ri.getEntity(e,ti(this,Zn,\"f\"))},this.createAdjacentStack=async(e,t)=>{const n=await ti(this,Zn,\"f\").createAdjacentStack(this.entityId,e,t);return ri.getEntity({entityId:n,type:\"stack\"},ti(this,Zn,\"f\"))},this.getAdjacentStacks=async e=>(await ti(this,Zn,\"f\").getAdjacentStacks({targetId:this.entityId,edge:e})).map((e=>ri.getEntity({type:\"stack\",entityId:e.entityId},ti(this,Zn,\"f\")))),ei(this,Zn,e,\"f\"),this.entityId=t}}Bn.LayoutNode=ri,Zn=new WeakMap,ri.newLayoutEntitiesClient=async(e,t,n)=>{const i=(0,ii.createRelayedDispatch)(e,n,\"layout-relay\",\"You are trying to interact with a layout component on a window that does not exist or has been destroyed.\");return new ni.ApiConsumer(new ni.ChannelsConsumer({dispatch:i})).consume({id:t})},ri.getEntity=(e,t)=>{const{entityId:n,type:i}=e;switch(i){case\"column\":case\"row\":return new si(t,n,i);case\"stack\":return new oi(t,n);default:throw new Error(`Unrecognised Layout Entity encountered ('${JSON.stringify(e)})`)}};class oi extends ri{constructor(e,t){super(e,t),Qn.set(this,void 0),this.type=\"stack\",this.getViews=()=>ti(this,Qn,\"f\").getStackViews(this.entityId),this.addView=async(e,t={index:0})=>ti(this,Qn,\"f\").addViewToStack(this.entityId,e,t),this.removeView=async e=>{await ti(this,Qn,\"f\").removeViewFromStack(this.entityId,e)},this.setActiveView=async e=>{await ti(this,Qn,\"f\").setStackActiveView(this.entityId,e)},ei(this,Qn,e,\"f\")}}Bn.TabStack=oi,Qn=new WeakMap;class si extends ri{constructor(e,t,n){super(e,t),Xn.set(this,void 0),this.getContent=async()=>(await ti(this,Xn,\"f\").getContent(this.entityId)).map((e=>ri.getEntity(e,ti(this,Xn,\"f\")))),ei(this,Xn,e,\"f\"),this.type=n}}Bn.ColumnOrRow=si,Xn=new WeakMap;var ai={};Object.defineProperty(ai,\"__esModule\",{value:!0}),ai.DEFAULT_LAYOUT_KEY=ai.LAYOUT_CONTROLLER_ID=void 0,ai.LAYOUT_CONTROLLER_ID=\"layout-entities\",ai.DEFAULT_LAYOUT_KEY=\"__default__\";var ci,di,hi,li=s&&s.__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)};Object.defineProperty(Ln,\"__esModule\",{value:!0}),Ln.Layout=void 0;const ui=G,pi=O,wi=d,yi=Tn,fi=Bn,gi=ai;class mi extends wi.Base{static getClient(e){return li(e,di,\"f\").getValue()}constructor(e,t){super(t),ci.add(this),di.set(this,new ui.Lazy((async()=>fi.LayoutNode.newLayoutEntitiesClient(await this.platform.getClient(),gi.LAYOUT_CONTROLLER_ID,this.identity)))),this.replace=async e=>{this.wire.sendAction(\"layout-replace\").catch((e=>{}));const t=await this.platform.getClient();await t.dispatch(\"replace-layout\",{target:this.identity,opts:{layout:e}})},this.replaceView=async(e,t)=>{this.wire.sendAction(\"layout-replace-view\").catch((e=>{}));const n=await this.platform.getClient();await n.dispatch(\"replace-view\",{target:this.identity,opts:{viewToReplace:e,newView:t}})},this.applyPreset=async e=>{this.wire.sendAction(\"layout-apply-preset\").catch((e=>{}));const t=await this.platform.getClient(),{presetType:n}=e;if(!n||!(0,yi.isValidPresetType)(n))throw new Error(\"Cannot apply preset layout, please include an applicable presetType property in the PresetLayoutOptions.\");await t.dispatch(\"apply-preset-layout\",{target:this.identity,opts:{presetType:n}})};const n=(0,pi.validateIdentity)(e);if(n)throw new Error(n);this.identity=e,this.platform=this.fin.Platform.wrapSync({uuid:e.uuid}),e.uuid===this.fin.me.uuid&&e.name===this.fin.me.name&&(this.init=this.fin.Platform.Layout.init)}async getConfig(){this.wire.sendAction(\"layout-get-config\").catch((e=>{}));return(await this.platform.getClient()).dispatch(\"get-frame-snapshot\",{target:this.identity})}async getCurrentViews(){this.wire.sendAction(\"layout-get-views\").catch((e=>{}));const e=await this.platform.getClient();return(await e.dispatch(\"get-layout-views\",{target:this.identity})).map((e=>this.fin.View.wrapSync(e)))}async getRootItem(){this.wire.sendAction(\"layout-get-root-item\").catch((()=>{}));const e=await li(this,di,\"f\").getValue(),t=await e.getRoot(\"layoutName\"in this.identity?this.identity:void 0);return fi.LayoutNode.getEntity(t,e)}async getStackByViewIdentity(e){this.wire.sendAction(\"layout-get-stack-by-view\").catch((()=>{}));const t=await li(this,di,\"f\").getValue(),n=await t.getStackByView(e);if(!n)throw new Error(`No stack found for view: ${e.uuid}/${e.name}`);return fi.LayoutNode.getEntity(n,t)}async addView(e,{location:t,targetView:n}={}){this.wire.sendAction(\"layout-add-view\").catch((e=>{}));const{identity:i}=await li(this,ci,\"m\",hi).call(this,\"layout-add-view\",{viewOptions:e,location:t,targetView:n});return{identity:i}}async closeView(e){this.wire.sendAction(\"layout-close-view\").catch((e=>{})),await li(this,ci,\"m\",hi).call(this,\"layout-close-view\",{viewIdentity:e})}}Ln.Layout=mi,di=new WeakMap,ci=new WeakSet,hi=async function(e,t){return(await this.platform.getClient()).dispatch(e,{target:this.identity,opts:t})};var vi,Ci,bi,Ii,Ei,xi=s&&s.__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)},Ai=s&&s.__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};Object.defineProperty(kn,\"__esModule\",{value:!0}),kn.LayoutModule=void 0;const Pi=d,Mi=Ln,_i=ai;class Oi extends Pi.Base{constructor(){super(...arguments),vi.add(this),Ci.set(this,!1),bi.set(this,null),this.init=async(e={})=>{if(this.wire.sendAction(\"layout-init\").catch((e=>{})),!this.wire.environment.layoutAllowedInContext(this.fin))throw new Error(\"Layout.init can only be called from a Window context.\");if(xi(this,Ci,\"f\"))throw new Error(\"Layout.init was already called, please use Layout.create to add additional layouts.\");\"openfin\"===this.wire.environment.type&&await this.fin.Platform.getCurrentSync().getClient(),Ai(this,Ci,!0,\"f\"),Ai(this,bi,await this.wire.environment.initLayoutManager(this.fin,this.wire,e),\"f\"),await this.wire.environment.applyLayoutSnapshot(this.fin,xi(this,bi,\"f\"),e);const t={name:this.fin.me.name,uuid:this.fin.me.uuid};if(!e.layoutManagerOverride){const e={layoutName:_i.DEFAULT_LAYOUT_KEY,...t};return xi(this,Ii,\"f\").call(this,e)}return this.wrapSync(t)},Ii.set(this,(e=>{const t=\"[Layout] You are using a deprecated property `layoutManager` - it will throw if you access it starting in v37.\",n=new Proxy({},{get(e,n){throw console.warn(`[Layout-mgr-proxy] accessing ${n.toString()}`),new Error(t)}}),i=Object.assign(this.wrapSync(e),{layoutManager:n});return new Proxy(i,{get(e,n){if(\"layoutManager\"===n)throw console.warn(`[Layout-proxy] accessing ${n.toString()}`),new Error(t);return e[n]}})})),this.getCurrentLayoutManagerSync=()=>xi(this,vi,\"m\",Ei).call(this,\"fin.Platform.Layout.getCurrentLayoutManagerSync()\"),this.create=async e=>this.wire.environment.createLayout(xi(this,vi,\"m\",Ei).call(this,\"fin.Platform.Layout.create()\"),e),this.destroy=async e=>this.wire.environment.destroyLayout(xi(this,vi,\"m\",Ei).call(this,\"fin.Platform.Layout.destroy()\"),e)}async wrap(e){return this.wire.sendAction(\"layout-wrap\").catch((e=>{})),new Mi.Layout(e,this.wire)}wrapSync(e){return this.wire.sendAction(\"layout-wrap-sync\").catch((e=>{})),new Mi.Layout(e,this.wire)}async getCurrent(){if(this.wire.sendAction(\"layout-get-current\").catch((e=>{})),\"openfin\"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error(\"You are not in a Window context. Only Windows can have a Layout.\");const{uuid:e,name:t}=this.fin.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction(\"layout-get-current-sync\").catch((e=>{})),\"openfin\"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error(\"You are not in a Window context. Only Windows can have a Layout.\");const{uuid:e,name:t}=this.fin.me;return this.wrapSync({uuid:e,name:t})}async getLayoutByViewIdentity(e){this.wire.sendAction(\"layout-get-by-view-identity\").catch((()=>{}));let t=await this.wire.environment.getViewWindowIdentity(this.fin,e);t.identity&&(t=t.identity);try{const n=this.wrapSync(t),i=await Mi.Layout.getClient(n),r=await i.getLayoutIdentityForViewOrThrow(e);return this.wrapSync(r)}catch(n){if(![\"No action registered at target for\",\"getLayoutIdentityForViewOrThrow is not a function\"].some((e=>n.message.includes(e))))throw n;if(t.uuid===t.name)throw new Error(`View identity ${JSON.stringify(e)} is not attached to any layout in provider window ${JSON.stringify(t)}.`);return this.wrapSync(t)}}}kn.LayoutModule=Oi,Ci=new WeakMap,bi=new WeakMap,Ii=new WeakMap,vi=new WeakSet,Ei=function(e){if(!xi(this,bi,\"f\"))throw new Error(`You must call init before using the API ${e}`);return xi(this,bi,\"f\")},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(kn,e),n(Ln,e)}(jn),Object.defineProperty(Pn,\"__esModule\",{value:!0}),Pn.PlatformModule=void 0;const Si=d,Ri=Mn,Fi=jn;class ji extends Si.Base{constructor(e,t){super(e),this._channel=t,this.Layout=new Fi.LayoutModule(this.wire)}async init(e){if(!fin.__internal_.isPlatform||fin.me.name!==fin.me.uuid)throw new Error(\"fin.Platform.init should only be called from a custom platform provider running in the main window of the application.\");return this.wire.environment.initPlatform(this.fin,e)}async wrap(e){return this.wire.sendAction(\"platform-wrap\").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}wrapSync(e){return this.wire.sendAction(\"platform-wrap-sync\").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}async getCurrent(){return this.wire.sendAction(\"platform-get-current\").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction(\"platform-get-current-sync\").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}start(e){return this.wire.sendAction(\"platform-start\").catch((e=>{})),new Promise((async(t,n)=>{try{const{uuid:n}=e,i=await this.fin.Application._create({...e,isPlatformController:!0});i.once(\"platform-api-ready\",(()=>t(this.wrapSync({uuid:n})))),i._run({uuid:n})}catch(e){n(e)}}))}startFromManifest(e,t){return this.wire.sendAction(\"platform-start-from-manifest\").catch((e=>{})),new Promise((async(n,i)=>{try{const i=await this.fin.Application._createFromManifest(e);i.once(\"platform-api-ready\",(()=>n(this.wrapSync({uuid:i.identity.uuid})))),i._run(t)}catch(e){i(e)}}))}}Pn.PlatformModule=ji,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Pn,e),n(Mn,e)}(An);var ki={};!function(e){Object.defineProperty(e,\"__esModule\",{value:!0}),e.getMe=e.getBaseMe=e.environmentUnsupportedMessage=void 0;const t=J(),n=un,i=ie(),r=rn;function o(e,t,n){return{...{isView:\"view\"===e,isWindow:\"window\"===e,isFrame:\"iframe\"===e,isExternal:\"external connection\"===e},uuid:t,name:n,entityType:e}}e.environmentUnsupportedMessage=\"You are not running in OpenFin.\",e.getBaseMe=o,e.getMe=function(s){const{uuid:a,name:c,entityType:d}=s.me,h={setContext(){throw new Error(e.environmentUnsupportedMessage)},addContextHandler(){throw new Error(e.environmentUnsupportedMessage)},getContextGroups(){throw new Error(e.environmentUnsupportedMessage)},joinContextGroup(){throw new Error(e.environmentUnsupportedMessage)},removeFromContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getAllClientsInContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getInfoForContextGroup(){throw new Error(e.environmentUnsupportedMessage)}},l=\"Interop API has not been instantiated. Either connection has failed or you have not declared interop in your config.\",u={setContext(){throw new Error(l)},addContextHandler(){throw new Error(l)},getContextGroups(){throw new Error(l)},joinContextGroup(){throw new Error(l)},removeFromContextGroup(){throw new Error(l)},getAllClientsInContextGroup(){throw new Error(l)},getInfoForContextGroup(){throw new Error(l)}},p={eventNames:()=>{throw new Error(e.environmentUnsupportedMessage)},emit:()=>{throw new Error(e.environmentUnsupportedMessage)},listeners:()=>{throw new Error(e.environmentUnsupportedMessage)},listenerCount:()=>{throw new Error(e.environmentUnsupportedMessage)},on:()=>{throw new Error(e.environmentUnsupportedMessage)},addListener:()=>{throw new Error(e.environmentUnsupportedMessage)},once:()=>{throw new Error(e.environmentUnsupportedMessage)},prependListener:()=>{throw new Error(e.environmentUnsupportedMessage)},prependOnceListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeAllListeners:()=>{throw new Error(e.environmentUnsupportedMessage)}};switch(d){case\"view\":return Object.assign(new t.View(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case\"window\":return Object.assign(new i._Window(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case\"iframe\":return Object.assign(new n._Frame(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case\"external connection\":return Object.assign(new r.ExternalApplication(s,{uuid:a}),o(d,a,c),{interop:u,isOpenFin:!1});default:return{...o(d,a,c),...p,interop:h,isOpenFin:!1}}}}(ki);var Li={},Ti={},$i={};Object.defineProperty($i,\"__esModule\",{value:!0}),$i.createWarningObject=$i.createUnusableObject=void 0,$i.createUnusableObject=function(e){const t=()=>{throw new Error(e)};return new Proxy({},{apply:t,construct:t,defineProperty:t,deleteProperty:t,get:t,getOwnPropertyDescriptor:t,getPrototypeOf:t,has:t,isExtensible:t,ownKeys:t,preventExtensions:t,set:t,setPrototypeOf:t})},$i.createWarningObject=function(e,t){return new Proxy(t,{get:(...t)=>(console.warn(e),Reflect.get(...t)),set:(...t)=>(console.warn(e),Reflect.set(...t)),getOwnPropertyDescriptor:(...t)=>(console.warn(e),Reflect.getOwnPropertyDescriptor(...t)),ownKeys:(...t)=>(console.warn(e),Reflect.ownKeys(...t))})};var Bi,Gi={},Wi={};var Hi={};!function(e){Object.defineProperty(e,\"__esModule\",{value:!0}),e.wrapIntentHandler=e.BROKER_ERRORS=e.generateOverrideWarning=e.generateOverrideError=e.wrapContextHandler=e.wrapInTryCatch=e.generateId=void 0;e.generateId=()=>`${Math.random()}${Date.now()}`;e.wrapInTryCatch=(e,t)=>(...n)=>{try{return e(...n)}catch(e){throw new Error((t||\"\")+e)}};e.wrapContextHandler=(e,t)=>async n=>{try{await e(n)}catch(e){throw console.error(`Error thrown by handler ${t} for context type ${n.type}: ${e}`),e}};e.generateOverrideError=(e,t)=>`You have tried to to use ${e} but ${t} has not been overridden in the Interop Broker. Please override this function. Refer to our documentation for more info.`;e.generateOverrideWarning=(e,t,n,i)=>{const{uuid:r,name:o}=n;return i?`Entity with identity: ${r}/${o} has called ${i} or ${e} but ${t} has not been overridden.`:`Entity with identity: ${r}/${o} has called ${e} but ${t} has not been overridden.`},e.BROKER_ERRORS={fireIntent:(0,e.generateOverrideError)(\"fireIntent\",\"handleFiredIntent\"),fireIntentForContext:(0,e.generateOverrideError)(\"fireIntentForContext\",\"handleFiredIntentForContext\"),getInfoForIntent:(0,e.generateOverrideError)(\"getInfoForIntent\",\"handleInfoForIntent\"),getInfoForIntentsByContext:(0,e.generateOverrideError)(\"getInfoForIntentsByContext\",\"handleInfoForIntentsByContext\"),joinSessionContextGroupWithJoinContextGroup:\"The Context Group you have tried to join is a Session Context Group. Custom Context Groups can only be defined by the Interop Broker through code or manifest configuration. Please use joinSessionContextGroup.\",fdc3Open:(0,e.generateOverrideError)(\"fdc3.open\",\"fdc3HandleOpen\"),fdc3FindInstances:(0,e.generateOverrideError)(\"fdc3.findInstances\",\"fdc3HandleFindInstances\"),fdc3GetAppMetadata:(0,e.generateOverrideError)(\"fdc3.getAppMetadata\",\"fdc3HandleGetAppMetadata\"),fdc3GetInfo:(0,e.generateOverrideError)(\"fdc3.getInfo\",\"fdc3HandleGetInfo\")};e.wrapIntentHandler=(e,t)=>async n=>{try{return e(n)}catch(e){throw console.error(`Error thrown by handler ${t}: ${e}`),e}}}(Hi);var Ni,Di,Ui={};function Vi(){if(Di)return Gi;Di=1;var e,t,n,r=s&&s.__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},o=s&&s.__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)},a=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Gi,\"__esModule\",{value:!0}),Gi.InteropBroker=void 0;const c=d,h=a(function(){if(Bi)return Wi;Bi=1,Object.defineProperty(Wi,\"__esModule\",{value:!0});const e=Cr();return Wi.default=class{constructor(e,t){this.provider=e,this.id=t,this.lastContext=void 0,this.contextGroupMap=new Map,this.clients=new Map,this.registerListeners()}registerListeners(){this.provider.register(`sessionContextGroup:getContext-${this.id}`,this.getCurrentContext.bind(this)),this.provider.register(`sessionContextGroup:setContext-${this.id}`,this.setContext.bind(this)),this.provider.register(`sessionContextGroup:handlerAdded-${this.id}`,this.handlerAdded.bind(this)),this.provider.register(`sessionContextGroup:handlerRemoved-${this.id}`,this.handlerRemoved.bind(this))}getCurrentContext(e){return e.type?this.contextGroupMap.get(e.type):this.lastContext}setContext(t,n){const{context:i}=t,r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name} not in Session Client State Map`);this.contextGroupMap.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{e.contextHandlers.get(i.type)?.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getClientState(e){return this.clients.get(e.endpointId)}async handlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(i){const e=r.contextHandlers.get(i)||[];r.contextHandlers.set(i,[...e,n]);const o=this.contextGroupMap.get(i);o&&await this.provider.dispatch(t,n,o)}else{r.globalHandler=n;const e=[...this.contextGroupMap.keys()].map((async e=>{const i=this.contextGroupMap.get(e);i&&await this.provider.dispatch(t,n,i)}));await Promise.all(e)}}handlerRemoved(e,t){const{handlerId:n}=e,i=this.clients.get(t.endpointId);i?(Array.from(i.contextHandlers).forEach((([,e])=>{const t=e.indexOf(n);t>-1&&e.splice(t,1)})),i.globalHandler===n&&(i.globalHandler=void 0)):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={contextHandlers:new Map,clientIdentity:e,globalHandler:void 0};this.clients.set(e.endpointId,t)}}onDisconnection(e){this.clients.delete(e.endpointId)}},Wi}()),l=Hi,u=a(i),p=function(){if(Ni)return Ui;Ni=1,Object.defineProperty(Ui,\"__esModule\",{value:!0}),Ui.PrivateChannelProvider=void 0;const e=Vi();return Ui.PrivateChannelProvider=class t{constructor(e,t){this.provider=e,this.id=t,this.clients=new Map,this.registerListeners(),this.contextByContextType=new Map,this.lastContext=void 0,this.provider.onConnection((e=>this.registerNewClient(e))),this.provider.onDisconnection((async e=>{const{endpointId:t}=e;this.clients.has(t)&&await this.handleClientDisconnecting(e),0===(await this.provider.getAllClientInfo()).length&&this.provider.destroy()}))}getClientState(e){return this.clients.get(e.endpointId)}registerListeners(){this.provider.register(\"broadcast\",this.broadcast.bind(this)),this.provider.register(\"getCurrentContext\",this.getCurrentContext.bind(this)),this.provider.register(\"contextHandlerAdded\",this.contextHandlerAdded.bind(this)),this.provider.register(\"contextHandlerRemoved\",this.contextHandlerRemoved.bind(this)),this.provider.register(\"nonStandardHandlerRemoved\",this.nonStandardHandlerRemoved.bind(this)),this.provider.register(\"onAddContextHandlerAdded\",this.onAddContextHandlerAdded.bind(this)),this.provider.register(\"onDisconnectHandlerAdded\",this.onDisconnectHandlerAdded.bind(this)),this.provider.register(\"onUnsubscribeHandlerAdded\",this.onUnsubscribeHandlerAdded.bind(this)),this.provider.register(\"clientDisconnecting\",((e,t)=>{this.handleClientDisconnecting(t)}))}broadcast(t,n){const{context:i}=t;if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name}, tried to call broadcast, is not connected to this Private Channel`);const r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to broadcast - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);this.contextByContextType.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{const t=e.handlerIdsByContextTypes.get(i.type);t&&t.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getCurrentContext(e,t){const{contextType:n}=e;if(!this.getClientState(t))throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call getCurrentContext, is not connected to this Private Channel`);if(void 0!==n){return this.contextByContextType.get(n)||null}return this.lastContext?this.lastContext:null}contextHandlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call addContextListener, is not connected to this Private Channel`);if(i){const e=r.handlerIdsByContextTypes.get(i)||[];r.handlerIdsByContextTypes.set(i,[...e,n])}else r.globalHandler=n;Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&e.onAddContextListenerHandlerId&&this.provider.dispatch(e.clientIdentity,e.onAddContextListenerHandlerId,i)}))}async contextHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);if(i){let e;if(i.globalHandler===n)i.globalHandler=void 0;else for(const[t,r]of i.handlerIdsByContextTypes){const i=r.indexOf(n);i>-1&&(r.splice(i,1),e=t)}const r=(await this.getConnectedClients()).map((async n=>{const{clientIdentity:i,clientIdentity:{endpointId:r},onUnsubscribeHandlerId:o}=n;r!==t.endpointId&&o&&await this.provider.dispatch(i,o,e)}));try{await Promise.all(r)}catch(e){throw console.error(`Problem when attempting to dispatch to onUnsubscribeHandlers. Error: ${e} Removing Client: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}`),new Error(e)}}else console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}.`)}nonStandardHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);i?i.onDisconnectHandlerId===n?i.onDisconnectHandlerId=void 0:i.onAddContextListenerHandlerId===n?i.onAddContextListenerHandlerId=void 0:i.onUnsubscribeHandlerId===n&&(i.onUnsubscribeHandlerId=void 0):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}onAddContextHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onAddContextListener, is not connected to this Private Channel`);n.onAddContextListenerHandlerId=i,Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&Array.from(e.handlerIdsByContextTypes.keys()).forEach((e=>{this.provider.dispatch(t,i,e)}))}))}onDisconnectHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onDisconnect, is not connected to this Private Channel`);n.onDisconnectHandlerId=i}onUnsubscribeHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onUnsubscribe, is not connected to this Private Channel`);n.onUnsubscribeHandlerId=i}removeClient(e){const t=this.getClientState(e);if(!t)throw new Error(`Client with Identity: ${e.uuid} ${e.name}, tried to call disconnect, is not connected to this Private Channel`);t.handlerIdsByContextTypes.clear(),this.clients.delete(e.endpointId)}async fireOnDisconnectForOtherClients(e){const{endpointId:t}=e,n=(await this.getConnectedClients()).map((async e=>{const{clientIdentity:{endpointId:n},onDisconnectHandlerId:i}=e;n!==t&&i&&await this.provider.dispatch(e.clientIdentity,i)}));try{await Promise.all(n)}catch(t){throw console.error(`Problem when attempting to dispatch to onDisconnectHandlers. Error: ${t} Disconnecting Client: uuid: ${e.uuid}. name: ${e.name}. endpointId: ${e.endpointId}`),new Error(t)}}async unsubscribeAll(e){const{endpointId:t}=e,n=this.clients.get(t);if(n){const t=Array.from(n.handlerIdsByContextTypes.values()).flat(),i=n.globalHandler;if(t.length>0){const n=t.map((async t=>this.contextHandlerRemoved({handlerId:t},e)));try{await Promise.all(n)}catch(e){console.error(e.message)}}if(i)try{await this.contextHandlerRemoved({handlerId:i},e)}catch(e){console.error(e.message)}}}async handleClientDisconnecting(e){await this.unsubscribeAll(e),this.removeClient(e),await this.fireOnDisconnectForOtherClients(e)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={clientIdentity:e,handlerIdsByContextTypes:new Map,globalHandler:void 0,onAddContextListenerHandlerId:void 0,onUnsubscribeHandlerId:void 0,onDisconnectHandlerId:void 0};this.clients.set(e.endpointId,t)}}async getConnectedClients(){const e=await this.provider.getAllClientInfo();return Array.from(this.clients.values()).filter((t=>{const{uuid:n,name:i}=t.clientIdentity;return e.some((e=>i===e.name&&n===e.uuid))}))}static init(e,n){return new t(e,n)}},Ui}(),w=G,y=[{id:\"green\",displayMetadata:{color:\"#00CC88\",name:\"green\"}},{id:\"purple\",displayMetadata:{color:\"#8C61FF\",name:\"purple\"}},{id:\"orange\",displayMetadata:{color:\"#FF8C4C\",name:\"orange\"}},{id:\"red\",displayMetadata:{color:\"#FF5E60\",name:\"red\"}},{id:\"pink\",displayMetadata:{color:\"#FF8FB8\",name:\"pink\"}},{id:\"yellow\",displayMetadata:{color:\"#E9FF8F\",name:\"yellow\"}}];let f=class i extends c.Base{constructor(i,s,a){super(i),e.set(this,void 0),t.set(this,void 0),n.set(this,void 0),this.getProvider=()=>o(this,n,\"f\").getValue(),this.interopClients=new Map,this.contextGroupsById=new Map,r(this,t,a.contextGroups??[...y],\"f\"),r(this,e,a.fdc3Info,\"f\"),a?.logging&&(this.logging=a.logging),this.intentClientMap=new Map,this.lastContextMap=new Map,this.sessionContextGroupMap=new Map,r(this,n,new w.Lazy(s),\"f\"),this.setContextGroupMap(),this.setupChannelProvider()}static createClosedConstructor(...e){return class extends i{constructor(...t){if(t.length){const[n,i,r]=t;if(r&&\"object\"==typeof r&&!(0,u.default)(r,e[2]))return console.warn(\"You have modified the parameters of the InteropOverride constructor. This behavior is deprecated and will be removed in a future version. You can modify these options in your manifest. Please consult our Interop docs for guidance on migrating to the new override scheme.\"),void super(e[0],e[1],r);console.warn(\"You are attempting to pass arguments to the InteropOverride constructor. This is not necessary, and these passed arguments will be ignored. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.\")}super(...e)}}}setContext({context:e},t){this.wire.sendAction(\"interop-broker-set-context\").catch((e=>{}));const n=this.getClientState(t);if(!n||!n.contextGroupId)throw n?new Error(\"You must join a context group before you can set context.\"):new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);{const{contextGroupId:t}=n;this.setContextForGroup({context:e},t)}}setContextForGroup({context:e},t){this.wire.sendAction(\"interop-broker-set-context-for-group\").catch((e=>{}));const n=this.contextGroupsById.get(t);if(!n)throw new Error(`Unable to set context for context group that isn't in the context group mapping: ${t}.`);const r=i.checkContextIntegrity(e);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(e)}`);const o=e.type;n.set(o,e),this.lastContextMap.set(t,o);Array.from(this.interopClients.values()).filter((e=>e.contextGroupId===t)).forEach((t=>{for(const[,n]of t.contextHandlers)i.isContextTypeCompatible(o,n.contextType)&&this.invokeContextHandler(t.clientIdentity,n.handlerId,e)}))}getCurrentContext(e,t){this.wire.sendAction(\"interop-broker-get-current-context\").catch((e=>{}));const n=this.getClientState(t);if(!n?.contextGroupId)throw new Error(\"You must be a member of a context group to call getCurrentContext\");const{contextGroupId:i}=n,r=this.contextGroupsById.get(i),o=this.lastContextMap.get(i),s=e?.contextType??o;return r&&s?r.get(s):void 0}async joinContextGroup({contextGroupId:e,target:t},n){if(this.wire.sendAction(\"interop-broker-join-context-group\").catch((e=>{})),this.sessionContextGroupMap.has(e))throw new Error(l.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup);if(t){i.hasEndpointId(t)&&await this.addClientToContextGroup({contextGroupId:e},t);try{const n=this.channel.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name));if(!n.length)throw new Error(`Given Identity ${t.uuid} ${t.name} is not connected to the Interop Broker.`);n.length>1&&console.warn(`More than one connection found for identity ${t.uuid} ${t.name}`);const i=[];for(const t of n)i.push(this.addClientToContextGroup({contextGroupId:e},t));await Promise.all(i)}catch(e){throw new Error(e)}}else await this.addClientToContextGroup({contextGroupId:e},n)}async addClientToContextGroup({contextGroupId:e},t){this.wire.sendAction(\"interop-broker-add-client-to-context-group\").catch((e=>{}));const n=this.getClientState(t);if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(!this.getContextGroups().find((t=>t.id===e)))throw new Error(`Attempting to join a context group that does not exist: ${e}. You may only join existing context groups.`);if(n.contextGroupId!==e){n.contextGroupId=e,await this.setCurrentContextGroupInClientOptions(t,e);const i=this.contextGroupsById.get(e);for(const[,e]of n.contextHandlers){const{contextType:n,handlerId:r}=e;if(void 0===n)i.forEach(((e,n)=>{this.invokeContextHandler(t,r,e)}));else if(i.has(n)){const e=i.get(n);e&&this.invokeContextHandler(t,r,e)}}}}async removeFromContextGroup({target:e},t){if(this.wire.sendAction(\"interop-broker-remove-from-context-group\").catch((e=>{})),e){i.hasEndpointId(e)&&await this.removeClientFromContextGroup(e);try{const t=this.channel.connections.filter((t=>t.uuid===e.uuid&&t.name===e.name));if(!t.length)throw new Error(`No connection found for given Identity ${e.uuid} ${e.name}`);t.length>1&&console.warn(`More than one connection found for identity ${e.uuid} ${e.name}`);const n=[];for(const e of t)n.push(this.removeClientFromContextGroup(e));await Promise.all(n)}catch(e){throw new Error(e)}}else await this.removeClientFromContextGroup(t)}async removeClientFromContextGroup(e){this.wire.sendAction(\"interop-broker-remove-client-from-context-group\").catch((e=>{}));const t=this.getClientState(e);t&&(t.contextGroupId=void 0),await this.setCurrentContextGroupInClientOptions(e,null)}getContextGroups(){return this.wire.sendAction(\"interop-broker-get-context-groups\").catch((e=>{})),o(this,t,\"f\").map((e=>({...e})))}getInfoForContextGroup({contextGroupId:e}){return this.wire.sendAction(\"interop-broker-get-info-for-context-group\").catch((e=>{})),this.getContextGroups().find((t=>t.id===e))}getAllClientsInContextGroup({contextGroupId:e}){this.wire.sendAction(\"interop-broker-get-all-clients-in-context-group\").catch((e=>{}));return Array.from(this.interopClients.values()).filter((t=>t.contextGroupId===e)).map((e=>e.clientIdentity))}async handleFiredIntent(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.raiseIntent\",\"InteropBroker.handleFiredIntent\",t,\"interopClient.fireIntent\");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntent)}async setIntentTarget(e,t){this.wire.sendAction(\"interop-broker-set-intent-target\").catch((e=>{}));const n=this.intentClientMap.get(t.name),i=`intent-handler-${e.name}`;if(n){const t=n.get(i);if(t){if(t.pendingIntents.push(e),t.clientIdentity&&t.isReady){const{clientIdentity:e,pendingIntents:n}=t;try{const r=n[n.length-1];await this.invokeIntentHandler(e,i,r),t.pendingIntents=[]}catch(n){console.error(`Error invoking intent handler for client ${e.uuid}/${e.name}/${e.endpointId}`),t.isReady=!1}}}else n.set(i,{isReady:!1,pendingIntents:[e]})}else{this.intentClientMap.set(t.name,new Map);const n=this.intentClientMap.get(t.name);n&&n.set(i,{isReady:!1,pendingIntents:[e]})}}async handleInfoForIntent(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.findIntent\",\"InteropBroker.handleInfoForIntent\",t,\"interopClient.getInfoForIntent\");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntent)}async handleInfoForIntentsByContext(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.findIntentsByContext\",\"InteropBroker.handleInfoForIntentsByContext\",t,\"interopClient.getInfoForIntentsByContext\");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntentsByContext)}async handleFiredIntentForContext(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.raiseIntentForContext\",\"InteropBroker.handleFiredIntentForContext\",t,\"interopClient.fireIntentForContext\");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntentForContext)}async clientDisconnected(e){}async fdc3HandleOpen({app:e,context:t},n){const i=(0,l.generateOverrideWarning)(\"fdc3.open\",\"InteropBroker.fdc3HandleOpen\",n);throw console.warn(i),new Error(l.BROKER_ERRORS.fdc3Open)}async fdc3HandleFindInstances(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.open\",\"InteropBroker.fdc3HandleFindInstances\",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3FindInstances)}async fdc3HandleGetAppMetadata(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.getAppMetadata\",\"InteropBroker.fdc3HandleGetAppMetadata\",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3GetAppMetadata)}async invokeContextHandler(e,t,n){const i=await this.getProvider();try{await i.dispatch(e,t,n)}catch(i){console.error(`Error invoking context handler ${t} for context type ${n.type} in client ${e.uuid}/${e.name}/${e.endpointId}`,i)}}async invokeIntentHandler(e,t,n){const i=await this.getProvider();await i.dispatch(e,t,n)}async fdc3HandleGetInfo(t,n){const{fdc3Version:i}=t;return{fdc3Version:i,...o(this,e,\"f\"),optionalFeatures:{OriginatingAppMetadata:!1,UserChannelMembershipAPIs:!0},appMetadata:{appId:\"\",instanceId:\"\"}}}async getAllClientInfo(){return(await this.getProvider()).getAllClientInfo()}decorateSnapshot(e){return{...e,interopSnapshotDetails:{contextGroupStates:this.getContextGroupStates()}}}applySnapshot(e,t){const n=e?.interopSnapshotDetails?.contextGroupStates;n&&(t?.closeExistingWindows||this.updateExistingClients(n),this.rehydrateContextGroupStates(n))}updateExistingClients(e){this.interopClients.forEach((t=>{const{clientIdentity:n,contextGroupId:r,contextHandlers:o}=t;if(r){const t=e[r];for(const[,e]of Object.entries(t))o.forEach((t=>{const{handlerId:r,contextType:o}=t;i.isContextTypeCompatible(e.type,o)&&this.invokeContextHandler(n,r,e)}))}}))}getContextGroupStates(){return i.toObject(this.contextGroupsById)}rehydrateContextGroupStates(e){const t=Object.entries(e);for(const[e,n]of t){const t=Object.entries(n);for(const[n,i]of t)if(this.contextGroupsById.has(e)){this.contextGroupsById.get(e).set(n,i)}else console.warn(`Attempting to set a context group that isn't in the context group mapping. Skipping context group rehydration for: ${e}`)}}contextHandlerRegistered({contextType:e,handlerId:t},n){const i={contextType:e,handlerId:t},r=this.getClientState(n);if(r?.contextHandlers.set(t,i),r&&r.contextGroupId){const{contextGroupId:i}=r,o=this.contextGroupsById.get(i);if(void 0===e)o.forEach(((e,i)=>{this.invokeContextHandler(n,t,e)}));else if(o.has(e)){const i=o.get(e);i&&this.invokeContextHandler(n,t,i)}}}async intentHandlerRegistered(e,t){const{handlerId:n}=e,i=this.intentClientMap.get(t.name),r=i?.get(n);if(i)if(r){const{pendingIntents:e}=r;r.clientIdentity=t,r.isReady=!0;try{if(e.length>0){const i=e[e.length-1];await this.invokeIntentHandler(t,n,i),r.pendingIntents=[]}}catch(e){console.error(`Error invoking intent handler: ${n} for client ${t.uuid}/${t.name}/${t.endpointId}`)}}else i.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t});else{this.intentClientMap.set(t.name,new Map);const e=this.intentClientMap.get(t.name);e&&e.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t})}}removeContextHandler({handlerId:e},t){const n=this.getClientState(t);n&&n.contextHandlers.delete(e)}handleJoinSessionContextGroup({sessionContextGroupId:e},t){try{if(!e)throw new Error(\"Failed to join session context group: must specify group id.\");const n=this.sessionContextGroupMap.get(e);if(n)n.registerNewClient(t);else{const n=new h.default(this.channel,e);n.registerNewClient(t),this.sessionContextGroupMap.set(e,n)}return{hasConflict:this.contextGroupsById.has(e)}}catch(e){throw new Error(e)}}getClientState(e){return this.interopClients.get(e.endpointId)}static toObject(e){const t=Object.fromEntries(e),n={};return Object.entries(t).forEach((([e,t])=>{const i=Object.fromEntries(t);n[e]=i})),n}static checkContextIntegrity(e){if(!e)return{isValid:!1,reason:\"No context supplied\"};if(\"object\"!=typeof e)return{isValid:!1,reason:\"Context must be an Object\"};if(!e.type)return{isValid:!1,reason:\"Context must have a type property\"};if(e.id&&\"object\"!=typeof e.id)return{isValid:!1,reason:\"Context id must be an Object populated with key-value identifiers (if set)\"};if(e.id){const{id:t}=e,n=Object.keys(t);let i=!1;if(!n.length)return{isValid:!1,reason:\"Context id must have at least one key-value identifier\"};if(n.forEach((e=>{\"string\"==typeof e&&\"string\"==typeof t[e]||(i=!0)})),i)return{isValid:!1,reason:\"Context id key-value identifiers must be of type string\"}}return e.name&&\"string\"!=typeof e.name?{isValid:!1,reason:\"Context name must be of string type (if set)\"}:{isValid:!0}}static hasEndpointId(e){return void 0!==e.endpointId}static isContextTypeCompatible(e,t){return void 0===t||e===t}setContextGroupMap(){for(const e of this.getContextGroups())this.contextGroupsById.set(e.id,new Map)}async setCurrentContextGroupInClientOptions(e,t){try{const n=await this.fin.System.getEntityInfo(e.uuid,e.name);let i;\"view\"===n.entityType?i=await this.fin.View.wrap(e):\"window\"===n.entityType&&(i=await this.fin.Window.wrap(e)),i&&await i.updateOptions({interop:{currentContextGroup:t}})}catch(e){}}async setupChannelProvider(){try{const e=await this.getProvider();this.channel=e,this.wireChannel(e)}catch(e){throw new Error(`Error setting up Interop Broker Channel Provider: ${e}`)}}wireChannel(e){e.onConnection((async(e,t)=>{if(!await this.isConnectionAuthorized(e,t))throw new Error(`Connection not authorized for ${e.uuid}, ${e.name}`);if(!e.endpointId)throw new Error(\"Version too old to be compatible with Interop. Please upgrade your runtime to a more recent version.\");const n={contextGroupId:void 0,contextHandlers:new Map,clientIdentity:e};t?.currentContextGroup&&this.contextGroupsById.has(t.currentContextGroup)&&(n.contextGroupId=t?.currentContextGroup),this.interopClients.set(e.endpointId,n)})),e.onDisconnection((e=>{this.interopClients.delete(e.endpointId);const t=this.intentClientMap.get(e.name);t&&e.uuid===this.fin.me.uuid&&t.forEach((e=>{e.isReady=!1})),this.sessionContextGroupMap.forEach((t=>{t.onDisconnection(e)})),this.clientDisconnected(e)})),e.beforeAction((async(e,t,n)=>{if(!await this.isActionAuthorized(e,t,n))throw new Error(`Action (${e}) not authorized for ${n.uuid}, ${n.name}`);this.logging?.beforeAction?.enabled&&console.log(e,t,n)})),e.afterAction(((e,t,n)=>{this.logging?.afterAction?.enabled&&console.log(e,t,n)})),e.register(\"setContext\",this.setContext.bind(this)),e.register(\"fireIntent\",this.handleFiredIntent.bind(this)),e.register(\"getCurrentContext\",this.getCurrentContext.bind(this)),e.register(\"getInfoForIntent\",this.handleInfoForIntent.bind(this)),e.register(\"getInfoForIntentsByContext\",this.handleInfoForIntentsByContext.bind(this)),e.register(\"fireIntentForContext\",this.handleFiredIntentForContext.bind(this)),e.register(\"getContextGroups\",this.getContextGroups.bind(this)),e.register(\"joinContextGroup\",this.joinContextGroup.bind(this)),e.register(\"removeFromContextGroup\",this.removeFromContextGroup.bind(this)),e.register(\"getAllClientsInContextGroup\",this.getAllClientsInContextGroup.bind(this)),e.register(\"getInfoForContextGroup\",this.getInfoForContextGroup.bind(this)),e.register(\"contextHandlerRegistered\",this.contextHandlerRegistered.bind(this)),e.register(\"intentHandlerRegistered\",this.intentHandlerRegistered.bind(this)),e.register(\"removeContextHandler\",this.removeContextHandler.bind(this)),e.register(\"sessionContextGroup:createIfNeeded\",this.handleJoinSessionContextGroup.bind(this)),e.register(\"fdc3Open\",this.fdc3HandleOpen.bind(this)),e.register(\"fdc3v2FindIntentsByContext\",this.handleInfoForIntentsByContext.bind(this)),e.register(\"fdc3FindInstances\",this.fdc3HandleFindInstances.bind(this)),e.register(\"fdc3GetAppMetadata\",this.fdc3HandleGetAppMetadata.bind(this)),e.register(\"fdc3v2GetInfo\",(async(e,t)=>this.fdc3HandleGetInfo.bind(this)(e,t))),e.register(\"createPrivateChannelProvider\",(async e=>{const{channelId:t}=e,n=await this.fin.InterApplicationBus.Channel.create(t);p.PrivateChannelProvider.init(n,t)}))}isConnectionAuthorized(e,t){return this.wire.sendAction(\"interop-broker-is-connection-authorized\").catch((e=>{})),Promise.resolve(!0)}isActionAuthorized(e,t,n){return this.wire.sendAction(\"interop-broker-is-action-authorized\").catch((e=>{})),Promise.resolve(!0)}};return Gi.InteropBroker=f,e=new WeakMap,t=new WeakMap,n=new WeakMap,Gi}var zi,Ki={},qi={},Ji=s&&s.__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},Yi=s&&s.__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)};Object.defineProperty(qi,\"__esModule\",{value:!0});const Zi=d,Qi=Hi;class Xi extends Zi.Base{constructor(e,t,n){super(e),zi.set(this,void 0),this.id=n,Ji(this,zi,t,\"f\")}async setContext(e){this.wire.sendAction(\"interop-session-context-group-set-context\").catch((e=>{}));return(await Yi(this,zi,\"f\")).dispatch(`sessionContextGroup:setContext-${this.id}`,{sessionContextGroupId:this.id,context:e})}async getCurrentContext(e){this.wire.sendAction(\"interop-session-context-group-get-context\").catch((e=>{}));return(await Yi(this,zi,\"f\")).dispatch(`sessionContextGroup:getContext-${this.id}`,{sessionContextGroupId:this.id,type:e})}async addContextHandler(e,t){if(this.wire.sendAction(\"interop-session-context-group-add-handler\").catch((e=>{})),\"function\"!=typeof e)throw new Error(\"Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.\");const n=await Yi(this,zi,\"f\");let i;return i=t?`sessionContextHandler:invoke-${this.id}-${t}-${(0,Qi.generateId)()}`:`sessionContextHandler:invoke-${this.id}`,n.register(i,(0,Qi.wrapContextHandler)(e,i)),await n.dispatch(`sessionContextGroup:handlerAdded-${this.id}`,{handlerId:i,contextType:t}),{unsubscribe:await this.createUnsubscribeCb(i)}}async createUnsubscribeCb(e){const t=await Yi(this,zi,\"f\");return async()=>{t.remove(e),await t.dispatch(`sessionContextGroup:handlerRemoved-${this.id}`,{handlerId:e})}}getUserInstance(){return{id:this.id,setContext:(0,Qi.wrapInTryCatch)(this.setContext.bind(this),\"Failed to set context: \"),getCurrentContext:(0,Qi.wrapInTryCatch)(this.getCurrentContext.bind(this),\"Failed to get context: \"),addContextHandler:(0,Qi.wrapInTryCatch)(this.addContextHandler.bind(this),\"Failed to add context handler: \")}}}qi.default=Xi,zi=new WeakMap;var er={},tr={},nr={},ir={},rr=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),or=s&&s.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,\"default\",{enumerable:!0,value:t})}:function(e,t){e.default=t}),sr=s&&s.__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)&&rr(t,e,n);return or(t,e),t};Object.defineProperty(ir,\"__esModule\",{value:!0}),ir.PrivateChannelClient=void 0;const ar=sr(Hi);var cr,dr;function hr(){if(cr)return tr;cr=1;var e,t=s&&s.__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)},n=s&&s.__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},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(tr,\"__esModule\",{value:!0}),tr.FDC3ModuleBase=void 0;const o=nr,a=Hi,c=wr(),d=r(i);return tr.FDC3ModuleBase=class{get client(){return t(this,e,\"f\").call(this)}get fin(){return this.wire.getFin()}constructor(t,i){this.wire=i,e.set(this,void 0),n(this,e,t,\"f\")}async broadcast(e){return this.wire.sendAction(\"fdc3-broadcast\").catch((e=>{})),this.client.setContext(e)}async _open(e,t){this.wire.sendAction(\"fdc3-open\").catch((e=>{}));try{return await c.InteropClient.ferryFdc3Call(this.client,\"fdc3Open\",{app:e,context:t})}catch(e){const t=e.message===a.BROKER_ERRORS.fdc3Open?\"ResolverUnavailable\":e.message;throw new Error(t)}}async _getChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:\"system\",...(0,o.getUnsupportedChannelApis)()})))}async getOrCreateChannel(e){this.wire.sendAction(\"fdc3-get-or-create-channel\").catch((e=>{}));const t=(await this._getChannels()).find((t=>t.id===e));if(t)return{...t,type:\"system\",...(0,o.getUnsupportedChannelApis)()};try{const t=await this.client.joinSessionContextGroup(e);return(0,o.buildAppChannelObject)(t)}catch(e){throw console.error(e.message),new Error(o.ChannelError.CreationFailed)}}async getSystemChannels(){return this.wire.sendAction(\"fdc3-get-system-channels\").catch((e=>{})),this._getChannels()}async joinChannel(e){this.wire.sendAction(\"fdc3-join-channel\").catch((e=>{}));try{return await this.client.joinContextGroup(e)}catch(e){if(e.message===a.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup?console.error(\"The Channel you have tried to join is an App Channel. Custom Channels can only be defined by the Interop Broker through code or manifest configuration. Please use getOrCreateChannel.\"):console.error(e.message),e.message.startsWith(\"Attempting to join a context group that does not exist\"))throw new Error(o.ChannelError.NoChannelFound);throw new Error(o.ChannelError.AccessDenied)}}async getCurrentChannel(){this.wire.sendAction(\"fdc3-get-current-channel\").catch((e=>{}));const e=await this.getCurrentContextGroupInfo();return e?this.buildChannelObject(e):null}async leaveCurrentChannel(){return this.wire.sendAction(\"fdc3-leave-current-channel\").catch((e=>{})),this.client.removeFromContextGroup()}async getCurrentContextGroupInfo(){const e=await this.client.getContextGroups(),t=e.map((async e=>this.client.getAllClientsInContextGroup(e.id))),n=(await Promise.all(t)).findIndex((e=>e.some((e=>{const{uuid:t,name:n}=e;return this.wire.me.uuid===t&&this.wire.me.name===n}))));return e[n]}async buildChannelObject(e){return{...e,type:\"system\",addContextListener:(...[e,t])=>{let n,i;\"function\"==typeof e?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),n=e):(n=t,\"string\"==typeof e&&(i=e));const r=(async()=>{let e=!0;const t=await this.client.getCurrentContext(i);return this.client.addContextHandler(((i,r)=>{if(!e||(e=!1,!(0,d.default)(t,i)))return n(i,r)}),i)})();return{...r,unsubscribe:()=>r.then((e=>e.unsubscribe()))}},broadcast:this.broadcast.bind(this),getCurrentContext:async e=>{const t=await this.client.getCurrentContext(e);return void 0===t?null:t}}}},e=new WeakMap,tr}ir.PrivateChannelClient=class{constructor(e,t){this.id=t,this.client=e,this.listeners=new Map}async broadcast(e){return this.client.dispatch(\"broadcast\",{context:e})}async getCurrentContext(e){return this.client.dispatch(\"getCurrentContext\",{contextType:e})}async addContextListener(e,t){if(\"function\"!=typeof t)throw new Error(\"Non-function argument passed to the second parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.\");let n;n=e?`contextHandler:invoke-${this.id}-${e}-${ar.generateId()}`:`contextHandler:invoke-${this.id}-${ar.generateId()}`,this.client.register(n,ar.wrapContextHandler(t,n));const i={unsubscribe:await this.createContextUnsubscribeCb(n)};return this.listeners.set(n,i),await this.client.dispatch(\"contextHandlerAdded\",{handlerId:n,contextType:e}),i}createNonStandardUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch(\"nonStandardHandlerRemoved\",{handlerId:e})}}createContextUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch(\"contextHandlerRemoved\",{handlerId:e})}}onAddContextListener(e){const t=`onContextHandlerAdded:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch(\"onAddContextHandlerAdded\",{handlerId:t}),n}onDisconnect(e){const t=`onDisconnect:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch(\"onDisconnectHandlerAdded\",{handlerId:t}),n}onUnsubscribe(e){const t=`onUnsubscribe:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch(\"onUnsubscribeHandlerAdded\",{handlerId:t}),n}async cleanUpAllSubs(){Array.from(this.listeners.keys()).forEach((e=>{this.client.remove(e),this.listeners.delete(e)}))}async disconnect(){try{await this.client.dispatch(\"clientDisconnecting\"),await this.cleanUpAllSubs(),await this.client.disconnect()}catch(e){throw new Error(e.message)}}},function(e){var t=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,\"__esModule\",{value:!0}),e.getIntentResolution=e.isChannel=e.isContext=e.connectPrivateChannel=e.buildAppChannelObject=e.buildPrivateChannelObject=e.ChannelError=e.ResultError=e.UnsupportedChannelApiError=e.getUnsupportedChannelApis=void 0;const n=Hi,r=ir,o=t(i);e.getUnsupportedChannelApis=e=>({addContextListener:()=>{throw new a(\"Channel.addContextListener\",e)},broadcast:()=>{throw new a(\"Channel.broadcast\",e)},getCurrentContext:()=>{throw new a(\"Channel.getCurrentContext\",e)}});class a extends Error{constructor(e,t=\"System\"){super(e),this.message=`Calling ${e} on an instance of a ${t} Channel returned by fdc3.get${t}Channels is not supported. If you would like to use a ${t} Channel, please use fdc3.joinChannel, fdc3.addContextListener, and fdc3.broadcast instead.`}}var c,d;e.UnsupportedChannelApiError=a,function(e){e.NoResultReturned=\"NoResultReturned\",e.IntentHandlerRejected=\"IntentHandlerRejected\"}(c=e.ResultError||(e.ResultError={})),(d=e.ChannelError||(e.ChannelError={})).NoChannelFound=\"NoChannelFound\",d.AccessDenied=\"AccessDenied\",d.CreationFailed=\"CreationFailed\";e.buildPrivateChannelObject=e=>{let t=!1;const n=()=>{if(t)throw new Error(\"Private Channel Client has been disconnected from the Private Channel\")};return{id:e.id,type:\"private\",broadcast:async t=>(n(),e.broadcast(t)),getCurrentContext:async t=>(n(),e.getCurrentContext(t)),addContextListener:async(t,i)=>{n();let r=i,o=t;\"function\"==typeof t&&(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),r=t,o=null);return e.addContextListener(o,r)},onAddContextListener:t=>(n(),e.onAddContextListener(t)),disconnect:async()=>(n(),t=!0,e.disconnect()),onDisconnect:t=>(n(),e.onDisconnect(t)),onUnsubscribe:t=>(n(),e.onUnsubscribe(t))}};e.buildAppChannelObject=e=>({id:e.id,type:\"app\",broadcast:e.setContext,getCurrentContext:async t=>{const n=await e.getCurrentContext(t);return void 0===n?null:n},addContextListener:(t,n)=>{let i,r;\"function\"==typeof t?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),i=t):(i=n,\"string\"==typeof t&&(r=t));const s=(async()=>{let t=!0;const n=await e.getCurrentContext(r);return e.addContextHandler(((e,r)=>{if(!t||(t=!1,!(0,o.default)(n,e)))return i(e,r)}),r)})();return{...s,unsubscribe:()=>s.then((e=>e.unsubscribe()))}}});e.connectPrivateChannel=async t=>{try{const n=await fin.InterApplicationBus.Channel.connect(t),i=new r.PrivateChannelClient(n,t);return(0,e.buildPrivateChannelObject)(i)}catch(e){throw new Error(`Private Channel with id: ${t} doesn't exist`)}};e.isContext=e=>{if(e&&\"object\"==typeof e&&\"type\"in e){const{type:t}=e;return\"string\"==typeof t}return!1};e.isChannel=e=>{if(e&&\"object\"==typeof e&&\"type\"in e&&\"id\"in e){const{type:t,id:n}=e;return\"string\"==typeof t&&\"string\"==typeof n&&(\"app\"===t||\"private\"===t)}return!1};e.getIntentResolution=async(t,i,r,o)=>{const s=(0,n.generateId)(),a=new Promise(((e,t)=>{fin.InterApplicationBus.subscribe({uuid:\"*\"},s,(t=>{e(t)})).catch((()=>t(new Error(\"getResult is not supported in this environment\"))))})),d=r?{target:r,intentResolutionResultId:s}:{intentResolutionResultId:s},h=o?{name:o,context:i,metadata:d}:{...i,metadata:d},l=async()=>{let n=await a;if(!n||\"object\"!=typeof n)throw new Error(c.NoResultReturned);const{error:i}=n;if(i)throw new Error(c.IntentHandlerRejected);if((0,e.isChannel)(n)){const{id:i,type:r}=n;switch(r){case\"private\":n=await(0,e.connectPrivateChannel)(i);break;case\"app\":{const r=await t.joinSessionContextGroup(i);n=(0,e.buildAppChannelObject)(r);break}}}else if(!(0,e.isContext)(n))throw new Error(c.NoResultReturned);return n},u=o?await t.fireIntent(h):await t.fireIntentForContext(h);return\"object\"!=typeof u?{source:{appId:\"\",instanceId:\"\"},intent:\"\",version:\"2.0\",getResult:l}:{...u,getResult:l}}}(nr);var lr,ur,pr={};function wr(){if(ur)return Ki;ur=1;var e,t,n=s&&s.__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},i=s&&s.__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)},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ki,\"__esModule\",{value:!0}),Ki.InteropClient=void 0;const o=d,a=r(qi),c=function(){if(dr)return er;dr=1,Object.defineProperty(er,\"__esModule\",{value:!0}),er.Fdc3Module=void 0;const e=Hi,t=hr();class n extends t.FDC3ModuleBase{async open(e,t){await super._open(e,t)}addContextListener(e,t){let n;return this.wire.sendAction(\"fdc3-add-context-listener\").catch((e=>{})),\"function\"==typeof e?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),n=this.client.addContextHandler(e)):n=this.client.addContextHandler(t,null===e?void 0:e),{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}addIntentListener(e,t){this.wire.sendAction(\"fdc3-add-intent-listener\").catch((e=>{}));const n=this.client.registerIntentHandler((e=>{const{context:n,metadata:i}=e,{metadata:r}=n,o=i?.intentResolutionResultId||r?.intentResolutionResultId;o&&this.fin.InterApplicationBus.publish(o,null).catch((()=>null)),t(e.context)}),e,{fdc3Version:\"1.2\"});return{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}async raiseIntent(t,n,i){this.wire.sendAction(\"fdc3-raise-intent\").catch((e=>{}));const r=i?{name:t,context:n,metadata:{target:i}}:{name:t,context:n};try{return await this.client.fireIntent(r)}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntent?\"ResolverUnavailable\":t.message;throw new Error(n)}}async findIntent(t,n){this.wire.sendAction(\"fdc3-find-intent\").catch((e=>{}));try{return await this.client.getInfoForIntent({name:t,context:n})}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntent?\"ResolverUnavailable\":t.message;throw new Error(n)}}async findIntentsByContext(t){this.wire.sendAction(\"fdc3-find-intents-by-context\").catch((e=>{}));try{return await this.client.getInfoForIntentsByContext(t)}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntentsByContext?\"ResolverUnavailable\":t.message;throw new Error(n)}}async raiseIntentForContext(t,n){this.wire.sendAction(\"fdc3-raise-intent-for-context\").catch((e=>{}));try{return await this.client.fireIntentForContext({...t,metadata:{target:n}})}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntentForContext?\"ResolverUnavailable\":t.message;throw new Error(n)}}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}getInfo(){return this.wire.sendAction(\"fdc3-get-info\").catch((e=>{})),{providerVersion:this.wire.environment.getAdapterVersionSync(),provider:`openfin-${this.wire.me.uuid}`,fdc3Version:\"1.2\"}}}return er.Fdc3Module=n,er}(),h=function(){if(lr)return pr;lr=1,Object.defineProperty(pr,\"__esModule\",{value:!0}),pr.Fdc3Module2=void 0;const e=hr(),t=Hi,n=wr(),i=nr,r=ir;class o extends e.FDC3ModuleBase{async open(e,t){return\"string\"==typeof e&&console.warn(\"Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).\"),super._open(e,t)}async findInstances(e){this.wire.sendAction(\"fdc3-find-instances\").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,\"fdc3FindInstances\",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3FindInstances?\"ResolverUnavailable\":e.message;throw new Error(n)}}async getAppMetadata(e){this.wire.sendAction(\"fdc3-get-app-metadata\").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,\"fdc3GetAppMetadata\",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3GetAppMetadata?\"ResolverUnavailable\":e.message;throw new Error(n)}}async addContextListener(e,t){this.wire.sendAction(\"fdc3-add-context-listener\").catch((e=>{}));const n=e=>t=>{const{contextMetadata:n,...i}=t,r=n?[{...i},n]:[t,null];e(...r)};let i=t,r=n(i);return\"function\"==typeof e?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),i=e,r=n(i),this.client.addContextHandler(r)):this.client.addContextHandler(r,null===e?void 0:e)}async findIntent(e,n,i){this.wire.sendAction(\"fdc3-find-intent\").catch((e=>{}));try{return await this.client.getInfoForIntent({name:e,context:n,metadata:{resultType:i}})}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntent?\"ResolverUnavailable\":e.message;throw new Error(n)}}async findIntentsByContext(e,i){this.wire.sendAction(\"fdc3-find-intents-by-context\").catch((e=>{}));const r=i?{context:e,metadata:{resultType:i}}:e;try{return await n.InteropClient.ferryFdc3Call(this.client,\"fdc3v2FindIntentsByContext\",r)}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntentsByContext?\"ResolverUnavailable\":e.message;throw new Error(n)}}async raiseIntent(e,n,r){this.wire.sendAction(\"fdc3-raise-intent\").catch((e=>{}));try{return\"string\"==typeof r&&console.warn(\"Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).\"),(0,i.getIntentResolution)(this.client,n,r,e)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?\"ResolverUnavailable\":e.message;throw new Error(n)}}async raiseIntentForContext(e,n){this.wire.sendAction(\"fdc3-raise-intent-for-context\").catch((e=>{}));try{return\"string\"==typeof n&&console.warn(\"Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).\"),(0,i.getIntentResolution)(this.client,e,n)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?\"ResolverUnavailable\":e.message;throw new Error(n)}}async addIntentListener(e,t){if(this.wire.sendAction(\"fdc3-add-intent-listener\").catch((e=>{})),\"string\"!=typeof e)throw new Error(\"First argument must be an Intent name\");return this.client.registerIntentHandler((async e=>{let n,i;const{context:r,metadata:o}=e,{contextMetadata:s,metadata:a,...c}=r,d=o?.intentResolutionResultId||a?.intentResolutionResultId;try{const e=a?{metadata:a,...c}:{...c};n=await t(e,s),i=n}catch(e){n=e,i={error:!0}}if(d&&this.fin.InterApplicationBus.publish(d,i).catch((()=>null)),n instanceof Error)throw new Error(n.message);return n}),e,{fdc3Version:\"2.0\"})}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}async createPrivateChannel(){const e=(0,t.generateId)();await n.InteropClient.ferryFdc3Call(this.client,\"createPrivateChannelProvider\",{channelId:e});const o=await this.fin.InterApplicationBus.Channel.connect(e),s=new r.PrivateChannelClient(o,e);return(0,i.buildPrivateChannelObject)(s)}async getUserChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:\"user\",...(0,i.getUnsupportedChannelApis)(\"User\")})))}async getSystemChannels(){return console.warn(\"This API has been deprecated. Please use fdc3.getUserChannels instead.\"),super.getSystemChannels()}async joinUserChannel(e){return super.joinChannel(e)}async joinChannel(e){return console.warn(\"This API has been deprecated. Please use fdc3.joinUserChannel instead.\"),super.joinChannel(e)}async getCurrentChannel(){const e=await super.getCurrentChannel();return e?{...e,type:\"user\",broadcast:this.broadcast.bind(this)}:null}async getInfo(){return n.InteropClient.ferryFdc3Call(this.client,\"fdc3v2GetInfo\",{fdc3Version:\"2.0\"})}}return pr.Fdc3Module2=o,pr}(),l=Hi;let u=class extends o.Base{constructor(i,r){super(i),e.set(this,void 0),t.set(this,void 0),n(this,t,new Map,\"f\"),n(this,e,r,\"f\")}async setContext(t){this.wire.sendAction(\"interop-client-set-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"setContext\",{context:t})}async addContextHandler(t,n){if(this.wire.sendAction(\"interop-client-add-context-handler\").catch((e=>{})),\"function\"!=typeof t)throw new Error(\"Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.\");const r=await i(this,e,\"f\");let o;o=n?`invokeContextHandler-${n}-${(0,l.generateId)()}`:\"invokeContextHandler\";const s=(0,l.wrapContextHandler)(t,o);return r.register(o,s),await r.dispatch(\"contextHandlerRegistered\",{handlerId:o,contextType:n}),{unsubscribe:async()=>{r.remove(o),await r.dispatch(\"removeContextHandler\",{handlerId:o})}}}async getContextGroups(){this.wire.sendAction(\"interop-client-get-context-groups\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getContextGroups\")}async joinContextGroup(t,n){this.wire.sendAction(\"interop-client-join-context-group\").catch((e=>{}));const r=await i(this,e,\"f\");if(!t)throw new Error(\"No contextGroupId specified for joinContextGroup.\");return r.dispatch(\"joinContextGroup\",{contextGroupId:t,target:n})}async removeFromContextGroup(t){this.wire.sendAction(\"interop-client-remove-from-context-group\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"removeFromContextGroup\",{target:t})}async getAllClientsInContextGroup(t){this.wire.sendAction(\"interop-client-get-all-clients-in-context-group\").catch((e=>{}));const n=await i(this,e,\"f\");if(!t)throw new Error(\"No contextGroupId specified for getAllClientsInContextGroup.\");return n.dispatch(\"getAllClientsInContextGroup\",{contextGroupId:t})}async getInfoForContextGroup(t){this.wire.sendAction(\"interop-client-get-info-for-context-group\").catch((e=>{}));const n=await i(this,e,\"f\");if(!t)throw new Error(\"No contextGroupId specified for getInfoForContextGroup.\");return n.dispatch(\"getInfoForContextGroup\",{contextGroupId:t})}async fireIntent(t){this.wire.sendAction(\"interop-client-fire-intent\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"fireIntent\",t)}async registerIntentHandler(t,n,r){this.wire.sendAction(\"interop-client-register-intent-handler\").catch((e=>{}));const o=await i(this,e,\"f\"),s=`intent-handler-${n}`,a=(0,l.wrapIntentHandler)(t,s);try{await o.register(s,a),await o.dispatch(\"intentHandlerRegistered\",{handlerId:s,...r})}catch(e){throw new Error(\"Unable to register intent handler\")}return{unsubscribe:async()=>{o.remove(s)}}}async getCurrentContext(t){this.wire.sendAction(\"interop-client-get-current-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getCurrentContext\",{contextType:t})}async getInfoForIntent(t){this.wire.sendAction(\"interop-client-get-info-for-intent\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getInfoForIntent\",t)}async getInfoForIntentsByContext(t){this.wire.sendAction(\"interop-client-get-info-for-intents-by-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getInfoForIntentsByContext\",t)}async fireIntentForContext(t){this.wire.sendAction(\"interop-client-fire-intent-for-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"fireIntentForContext\",t)}async joinSessionContextGroup(n){try{const r=i(this,t,\"f\").get(n);if(r)return r.getUserInstance();const o=await i(this,e,\"f\"),{hasConflict:s}=await o.dispatch(\"sessionContextGroup:createIfNeeded\",{sessionContextGroupId:n});s&&console.warn(`A (non-session) context group with the name \"${n}\" already exists. If you are trying to join a Context Group, call joinContextGroup instead.`);const c=new a.default(this.wire,i(this,e,\"f\"),n);return i(this,t,\"f\").set(n,c),c.getUserInstance()}catch(e){throw console.error(`Error thrown trying to create Session Context Group with id \"${n}\": ${e}`),e}}async onDisconnection(t){this.wire.sendAction(\"interop-client-add-ondisconnection-listener\").catch((e=>{}));return(await i(this,e,\"f\")).onDisconnection((e=>{const{uuid:n}=e;t({type:\"interop-broker\",topic:\"disconnected\",brokerName:n})}))}getFDC3Sync(e){switch(e){case\"1.2\":return new c.Fdc3Module((()=>this),this.wire);case\"2.0\":return new h.Fdc3Module2((()=>this),this.wire);default:throw new Error(`Invalid FDC3 version provided: ${e}. Must be '1.2' or '2.0'`)}}async getFDC3(e){return this.getFDC3Sync(e)}static async ferryFdc3Call(t,n,r){return(await i(t,e,\"f\")).dispatch(n,r||null)}};return Ki.InteropClient=u,e=new WeakMap,t=new WeakMap,Ki}var yr,fr,gr,mr={};function vr(){if(yr)return mr;yr=1,Object.defineProperty(mr,\"__esModule\",{value:!0}),mr.overrideCheck=mr.checkFDC32Overrides=mr.getDefaultViewFdc3VersionFromAppInfo=void 0;const e=Vi();function t(t){return[\"fdc3HandleFindInstances\",\"handleInfoForIntent\",\"handleInfoForIntentsByContext\",\"fdc3HandleGetAppMetadata\",\"fdc3HandleGetInfo\",\"fdc3HandleOpen\",\"handleFiredIntent\",\"handleFiredIntentForContext\"].filter((n=>t[n]===e.InteropBroker.prototype[n]))}return mr.getDefaultViewFdc3VersionFromAppInfo=function({manifest:e,initialOptions:t}){const n=e?.platform?.defaultViewOptions?.fdc3InteropApi??t.defaultViewOptions?.fdc3InteropApi;return[\"1.2\",\"2.0\"].includes(n??\"\")?n:void 0},mr.checkFDC32Overrides=t,mr.overrideCheck=function(e,n){if(n&&\"2.0\"===n){const n=t(e);n.length>0&&console.warn(`WARNING: FDC3 2.0 has been set as a default option for Views in this Platform, but the required InteropBroker APIs for FDC3 2.0 compliance have not all been overridden.\\nThe following APIs need to be overridden:\\n${n.join(\"\\n\")}`)}},mr}function Cr(){return gr||(gr=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),i=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),i(function(){if(fr)return Ti;fr=1;var e=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ti,\"__esModule\",{value:!0}),Ti.InteropModule=void 0;const t=e(n),i=$i,r=d,o=Vi(),a=wr(),c=vr(),h=Tn,l=e=>new e,u=\"You have attempted to use or modify InteropBroker parameters, which is not allowed. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.\";class p extends r.Base{async init(e,n=l){this.wire.sendAction(\"interop-init\").catch((()=>{}));const r=await this.wire.environment.getInteropInfo(this.wire.getFin()),s=(0,i.createUnusableObject)(u),a=(0,i.createWarningObject)(u,(0,t.default)(r)),d=async()=>{throw new Error(u)},p=o.InteropBroker.createClosedConstructor(this.wire,(()=>this.fin.InterApplicationBus.Channel.create(`interop-broker-${e}`)),r);let w;return w=Array.isArray(n)?new((0,h.overrideFromComposables)(...n)(p))(s,d,a):await n(p,s,d,a),(0,c.overrideCheck)(w,r.fdc3Version),w}connectSync(e,t){return this.wire.sendAction(\"interop-connect-sync\").catch((()=>{})),new a.InteropClient(this.wire,this.wire.environment.whenReady().then((()=>this.fin.InterApplicationBus.Channel.connect(`interop-broker-${e}`,{payload:t}))))}}return Ti.InteropModule=p,Ti}(),e),i(wr(),e),i(Vi(),e)}(Li)),Li}var br={},Ir={},Er={},xr={};Object.defineProperty(xr,\"__esModule\",{value:!0}),xr.getSnapshotSourceChannelName=void 0;xr.getSnapshotSourceChannelName=e=>`snapshot-source-provider-${e.uuid}`;var Ar,Pr,Mr,_r,Or,Sr=s&&s.__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},Rr=s&&s.__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)};Object.defineProperty(Er,\"__esModule\",{value:!0}),Er.SnapshotSource=void 0;const Fr=d,jr=xr,kr=new Map;class Lr extends Fr.Base{constructor(e,t){super(e),Ar.set(this,void 0),Pr.set(this,(()=>(kr.has(this.identity.uuid)||kr.set(this.identity.uuid,{eventFired:null,clientPromise:null}),kr.get(this.identity.uuid)))),Mr.set(this,(()=>(Rr(this,Pr,\"f\").call(this).clientPromise||(Rr(this,Pr,\"f\").call(this).clientPromise=Rr(this,_r,\"f\").call(this)),Rr(this,Pr,\"f\").call(this).clientPromise))),_r.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);try{Rr(this,Pr,\"f\").call(this).eventFired||await Rr(this,Or,\"f\").call(this);const t=await this.fin.InterApplicationBus.Channel.connect(e,{wait:!1});return t.onDisconnection((()=>{Rr(this,Pr,\"f\").call(this).clientPromise=null,Rr(this,Pr,\"f\").call(this).eventFired=null})),t}catch(e){throw Rr(this,Pr,\"f\").call(this).clientPromise=null,new Error(\"The targeted SnapshotSource is not currently initialized. Await this object's ready() method.\")}})),Or.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);let t,n;const i=new Promise(((e,i)=>{t=e,n=i}));Rr(this,Pr,\"f\").call(this).eventFired=i;const r=async i=>{try{i.channelName===e&&(t(),await this.fin.InterApplicationBus.Channel.removeListener(\"connected\",r))}catch(e){n(e)}};await this.fin.InterApplicationBus.Channel.on(\"connected\",r)})),Sr(this,Ar,t,\"f\")}get identity(){return Rr(this,Ar,\"f\")}async ready(){this.wire.sendAction(\"snapshot-source-ready\").catch((e=>{}));try{await Rr(this,Mr,\"f\").call(this)}catch(e){await Rr(this,Pr,\"f\").call(this).eventFired}}async getSnapshot(){this.wire.sendAction(\"snapshot-source-get-snapshot\").catch((e=>{}));const e=await Rr(this,Mr,\"f\").call(this),t=await e.dispatch(\"get-snapshot\");return(await t).snapshot}async applySnapshot(e){this.wire.sendAction(\"snapshot-source-apply-snapshot\").catch((e=>{}));return(await Rr(this,Mr,\"f\").call(this)).dispatch(\"apply-snapshot\",{snapshot:e})}}Er.SnapshotSource=Lr,Ar=new WeakMap,Pr=new WeakMap,Mr=new WeakMap,_r=new WeakMap,Or=new WeakMap,Object.defineProperty(Ir,\"__esModule\",{value:!0}),Ir.SnapshotSourceModule=void 0;const Tr=d,$r=Er,Br=xr;class Gr extends Tr.Base{async init(e){if(this.wire.sendAction(\"snapshot-source-init\").catch((e=>{})),\"object\"!=typeof e||\"function\"!=typeof e.getSnapshot||\"function\"!=typeof e.applySnapshot)throw new Error(\"you must pass in a valid SnapshotProvider\");const t=await this.fin.InterApplicationBus.Channel.create((0,Br.getSnapshotSourceChannelName)(this.fin.me));t.register(\"get-snapshot\",(async()=>({snapshot:await e.getSnapshot()}))),t.register(\"apply-snapshot\",(({snapshot:t})=>e.applySnapshot(t)))}wrapSync(e){return this.wire.sendAction(\"snapshot-source-wrap-sync\").catch((e=>{})),new $r.SnapshotSource(this.wire,e)}async wrap(e){return this.wire.sendAction(\"snapshot-source-wrap\").catch((e=>{})),this.wrapSync(e)}}Ir.SnapshotSourceModule=Gr,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Ir,e),n(Er,e)}(br),Object.defineProperty(a,\"__esModule\",{value:!0});var Wr=a.Fin=void 0;const Hr=t,Nr=c,Dr=ie(),Ur=Z(),Vr=de,zr=en,Kr=rn,qr=un,Jr=bn,Yr=J(),Zr=An,Qr=ki,Xr=Cr(),eo=br;class to extends Hr.EventEmitter{constructor(e){super(),this.wire=e,this.System=new Nr.System(e),this.Window=new Dr._WindowModule(e),this.Application=new Ur.ApplicationModule(e),this.InterApplicationBus=new Vr.InterApplicationBus(e),this.Clipboard=new zr.Clipboard(e),this.ExternalApplication=new Kr.ExternalApplicationModule(e),this.Frame=new qr._FrameModule(e),this.GlobalHotkey=new Jr.GlobalHotkey(e),this.Platform=new Zr.PlatformModule(e,this.InterApplicationBus.Channel),this.View=new Yr.ViewModule(e),this.Interop=new Xr.InteropModule(e),this.SnapshotSource=new eo.SnapshotSourceModule(e),e.registerFin(this),this.me=(0,Qr.getMe)(e),e.on(\"disconnected\",(()=>{this.emit(\"disconnected\")}))}}Wr=a.Fin=to;var no={},io={};function ro(e){return\"string\"==typeof e.manifestUrl}function oo(e){return ao(e)&&\"string\"==typeof e.address}function so(e){return oo(e)&&\"string\"==typeof e.token}function ao(e){return\"string\"==typeof e.uuid}function co(e){return e.runtime&&\"string\"==typeof e.runtime.version}function ho(e){return ao(e)&&co(e)}Object.defineProperty(io,\"__esModule\",{value:!0}),io.isInternalConnectConfig=io.isPortDiscoveryConfig=io.isNewConnectConfig=io.isConfigWithReceiver=io.isRemoteConfig=io.isExistingConnectConfig=io.isExternalConfig=void 0,io.isExternalConfig=ro,io.isExistingConnectConfig=oo,io.isRemoteConfig=so,io.isConfigWithReceiver=function(e){return\"object\"==typeof e.receiver&&so({...e,address:\"\"})},io.isNewConnectConfig=ho,io.isPortDiscoveryConfig=function(e){return ro(e)&&co(e)||ho(e)},io.isInternalConnectConfig=function(e){return oo(e)||ho(e)};var lo={},uo={};Object.defineProperty(uo,\"__esModule\",{value:!0}),uo.EmitterMap=void 0;const po=t;function wo(e){return Buffer.from(e).toString(\"base64\")}uo.EmitterMap=class{constructor(){this.storage=new Map}hashKeys(e){return e.map(wo).join(\"/\")}getOrCreate(e){const t=this.hashKeys(e);return this.storage.has(t)||this.storage.set(t,new po.EventEmitter),this.storage.get(t)}has(e){return this.storage.has(this.hashKeys(e))}delete(e){const t=this.hashKeys(e);return this.storage.delete(t)}},Object.defineProperty(lo,\"__esModule\",{value:!0});const yo=uo;class fo extends yo.EmitterMap{constructor(){super(...arguments),this.dispatchEvent=e=>{if(function(e){return\"process-desktop-event\"===e.action}(e)){const{payload:t}=e,n=function(e){const{topic:t}=e;if(\"frame\"===t||\"window\"===t||\"view\"===t){const{uuid:n,name:i}=e;return[t,n,i]}if(\"application\"===t){const{uuid:n}=e;return[t,n]}return[t]}(t);if(this.has(n))return this.getOrCreate(n).emit(t.type,t),!0}return!1}}}lo.default=fo;var go,mo,vo=s&&s.__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},Co=s&&s.__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)},bo=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(no,\"__esModule\",{value:!0});var Io=no.Transport=void 0;const Eo=t,xo=io,Ao=g,Po=bo(lo),Mo=ki,_o=ke;class Oo extends Eo.EventEmitter{constructor(e,t,n){super(),this.wireListeners=new Map,this.topicRefMap=new Map,this.eventAggregator=new Po.default,this.messageHandlers=[this.eventAggregator.dispatchEvent],go.set(this,void 0),mo.set(this,void 0),this.connectSync=()=>{Co(this,go,\"f\").connectSync()},this.getPort=()=>Co(this,go,\"f\").getPort(),vo(this,go,new e(this.onmessage.bind(this)),\"f\"),this.environment=t,this.sendRaw=Co(this,go,\"f\").send.bind(Co(this,go,\"f\")),this.registerMessageHandler(this.handleMessage.bind(this)),Co(this,go,\"f\").on(\"disconnected\",(()=>{for(const[,{handleNack:e}]of this.wireListeners)e({reason:\"Remote connection has closed\"});this.wireListeners.clear(),this.emit(\"disconnected\")}));const{uuid:i,name:r}=n,o=this.environment.getCurrentEntityType();this.me=(0,Mo.getBaseMe)(o,i,r)}getFin(){if(!Co(this,mo,\"f\"))throw new Error(\"No Fin object registered for this transport\");return Co(this,mo,\"f\")}registerFin(e){if(Co(this,mo,\"f\"))throw new Error(\"Fin object has already been registered for this transport\");vo(this,mo,e,\"f\")}shutdown(){return Co(this,go,\"f\").shutdown()}async connect(e){if((0,xo.isConfigWithReceiver)(e))return await Co(this,go,\"f\").connect(e.receiver),this.authorize(e);if((0,xo.isRemoteConfig)(e))return this.connectRemote(e);if((0,xo.isExistingConnectConfig)(e))return this.connectByPort(e);if((0,xo.isNewConnectConfig)(e)){const t=await this.environment.retrievePort(e);return this.connectByPort({...e,address:`ws://localhost:${t}`})}}async connectRemote(e){return await Co(this,go,\"f\").connect(new(this.environment.getWsConstructor())(e.address)),this.authorize(e)}async connectByPort(e){const{address:t,uuid:n}=e,i={...e,type:\"file-token\"},r=Co(this,go,\"f\");await r.connect(new(this.environment.getWsConstructor())(e.address));const o=await this.sendAction(\"request-external-authorization\",{uuid:n,type:\"file-token\"},!0);if(\"external-authorization-response\"!==o.action)throw new Ao.UnexpectedActionError(o.action);return await this.environment.writeToken(o.payload.file,o.payload.token),this.authorize(i)}async authorize(e){const t=await this.sendAction(\"request-authorization\",e,!0);if(\"authorization-response\"!==t.action)throw new Ao.UnexpectedActionError(t.action);if(!0!==t.payload.success)throw new Ao.RuntimeError(t.payload)}sendAction(e,t={},n=!1){let i=()=>{};const r=Ao.RuntimeError.getCallSite(1),o=this.environment.getNextMessageId(),s=new Promise(((s,a)=>{i=a;const c={action:e,payload:t,messageId:o},d=Co(this,go,\"f\");return this.addWireListener(o,s,(e=>this.nackHandler(e,a,r)),n),d.send(c).catch(a)}));return Object.assign(s,{cancel:i,messageId:o})}nackHandler(e,t,n){t(\"string\"==typeof e?e:new Ao.RuntimeError(e,n))}ferryAction(e){return new Promise(((t,n)=>{const i=this.environment.getNextMessageId();e.messageId=i;const r=e=>{t(e.payload)};return Co(this,go,\"f\").send(e).then((()=>this.addWireListener(i,r,(e=>this.nackHandler(e,n)),!1))).catch(n)}))}registerMessageHandler(e){this.messageHandlers.push(e)}addWireListener(e,t,n,i){i?this.uncorrelatedListener=t:this.wireListeners.has(e)?n({reason:\"Duplicate handler id\",error:(0,_o.errorToPOJO)(new Ao.DuplicateCorrelationError(String(e)))}):this.wireListeners.set(e,{resolve:t,handleNack:n})}onmessage(e){for(const t of this.messageHandlers)t.call(null,e)}handleMessage(e){const t=e.correlationId||NaN;if(\"correlationId\"in e){if(!this.wireListeners.has(t))return!1;{const{resolve:n,handleNack:i}=this.wireListeners.get(t);\"ack\"!==e.action?i({reason:\"Did not receive ack action\",error:(0,_o.errorToPOJO)(new Ao.NoAckError(e.action))}):\"payload\"in e?e.payload.success?n.call(null,e):i(e.payload):\"string\"==typeof e.reason?i(e):(console.warn(\"Received invalid response from core\",e),i({reason:\"invalid response shape\"})),this.wireListeners.delete(t)}}else this.uncorrelatedListener&&this.uncorrelatedListener.call(null,e),this.uncorrelatedListener=()=>{};return!0}}Io=no.Transport=Oo,go=new WeakMap,mo=new WeakMap;const So=(...e)=>({log:(...t)=>console.debug(`[${(new Date).toISOString()}]`,...(e=>e.map((e=>`[${e}]`)))(e),...t),getLogger:(...t)=>So(...e,...t)}),Ro=So(\"@openfin/core-web/client\");function Fo(e,t){if(!function(e){return\"string\"==typeof e}(e))throw new Error(`Property ${t} has invalid type. Expected string, got ${typeof e}.`)}const jo=\"web-broker-ports-ready\",ko=Ro.getLogger(\"get-web-interop-ports\");function Lo(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)}function To(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}\"function\"==typeof SuppressedError&&SuppressedError;const $o=e=>{var n,i,r;return r=class extends t.EventEmitter{constructor(t){super(),n.set(this,void 0),i.set(this,!1),this.connectSync=()=>{Lo(this,i,\"f\")||(e.addEventListener(\"message\",(e=>{e.data?.topic?.startsWith(\"wire-message\")&&e.data.message&&Lo(this,n,\"f\").call(this,{...JSON.parse(e.data.message),ports:e.ports})})),e.start())},this.connect=async()=>{this.connectSync()},this.send=t=>(e.postMessage({topic:\"wire-message\",message:JSON.stringify(t)}),Promise.resolve()),this.shutdown=async()=>{e.close()},To(this,n,t,\"f\")}getPort(){return e}},n=new WeakMap,i=new WeakMap,r};var Bo={},Go={};Object.defineProperty(Go,\"__esModule\",{value:!0}),Go.BaseEnvironment=void 0;const Wo=vr();Go.BaseEnvironment=class{async getViewWindowIdentity(e,t){const{identity:n}=await e.View.wrapSync(t).getCurrentWindow();return n}async getInteropInfo(e){const t=await e.Application.getCurrentSync().getInfo().catch((()=>null)),n=t?.initialOptions?.interopBrokerConfiguration??{};return{fdc3Version:t?(0,Wo.getDefaultViewFdc3VersionFromAppInfo)(t):void 0,...n,fdc3Info:{providerVersion:await e.System.getVersion(),provider:\"OpenFin\"}}}},Object.defineProperty(Bo,\"__esModule\",{value:!0});var Ho=Bo.BrowserEnvironment=void 0;const No=Go;class Do extends No.BaseEnvironment{constructor(){super(...arguments),this.type=\"other\",this.getRandomId=()=>{const e=new Uint32Array(1);return window.crypto.getRandomValues(e)[0].toString(32)}}getAdapterVersionSync(){return\"\"}observeBounds(e,t){throw new Error(\"Method not implemented.\")}layoutAllowedInContext(e){return!1}initLayoutManager(e,t,n){throw new Error(\"Method not implemented.\")}applyLayoutSnapshot(e,t,n){throw new Error(\"Method not implemented.\")}createLayout(e,t){throw new Error(\"Method not implemented.\")}destroyLayout(e,t){throw new Error(\"Method not implemented.\")}resolveLayout(e,t){throw new Error(\"Method not implemented.\")}initPlatform(...e){throw new Error(\"Method not implemented.\")}writeToken(e,t){return Promise.resolve(\"\")}retrievePort(e){throw new Error(\"Method not implemented.\")}getNextMessageId(){return this.getRandomId()}createChildContent(e){throw new Error(\"Method not implemented.\")}getWebWindow(e){throw new Error(\"Method not implemented.\")}getCurrentEntityIdentity(){throw new Error(\"Method not implemented.\")}getCurrentEntityType(){return\"external connection\"}raiseEvent(e,t){throw new Error(\"Method not implemented.\")}getUrl(){return location.href}getDefaultChannelOptions(){return{create:{},connect:{}}}getRtcPeer(){return new RTCPeerConnection}getWsConstructor(){return WebSocket}whenReady(){return Promise.resolve()}}Ho=Bo.BrowserEnvironment=Do;const Uo=e=>\"platform\"in e&&void 0!==e.platform;var Vo,zo;class Ko extends Ho{constructor(e){super(),this.connectConfig=e,Vo.set(this,void 0),zo.set(this,new W((async()=>Promise.resolve().then((function(){return require(\"./main-b14f67c9.js\")}))))),Uo(e)&&this.validatePlatformOptions(e)}getAdapterVersionSync(){return\"0.39.21\"}validatePlatformOptions({platform:e}){if(!(\"layoutSnapshot\"in e))throw new Error(\"Platform options are missing layoutSnapshot. Please provide a layoutSnapshot in the platform options.\");if(\"windows\"in e||\"windows\"in e.layoutSnapshot)throw new Error(\"It appears you tried to call connect() with a snapshot object from an OpenFin desktop environment. Note that connect() expects to be called with a platform property with this structure: { platform: { layoutSnapshot } }. To get a layoutSnapshot of the expected structure, use fin.Platform.Layout.getCurrentLayoutManagerSync().getLayoutSnapshot() in v34+ in your desktop environment.\");const{layouts:t}=e.layoutSnapshot;Object.entries(t).map((([e,t])=>{if(\"object\"!=typeof t||null===t)throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must be an object.`);if(!(\"content\"in t))throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must contain a 'content' property.`)}))}async getInteropInfo(e){return{...{contextGroups:void 0,logging:{beforeAction:{enabled:!1},afterAction:{enabled:!1}}},fdc3Version:void 0,fdc3Info:{providerVersion:\"0.39.21\",provider:\"OpenFin Web\"}}}layoutAllowedInContext(e){return!0}async initLayoutManager(e,t,n){if(Lo(this,Vo,\"f\"))throw new Error(\"Layout already initialized.\");if(!Uo(this.connectConfig))throw new Error(\"Platform options are missing from connection config.\");const{WebLayoutEntryPoint:i}=await Lo(this,zo,\"f\").getValue();return To(this,Vo,new i(this.connectConfig),\"f\"),await Lo(this,Vo,\"f\").initLayoutManager(e,t,n)}async applyLayoutSnapshot(e,t,n){Lo(this,Vo,\"f\")?.applyLayoutSnapshot(e,t,n)}async createLayout(e,t){return Lo(this,Vo,\"f\")?.createLayout(e,t)}async destroyLayout(e,t){return Lo(this,Vo,\"f\")?.destroyLayout(e,t)}async getViewWindowIdentity(e,t){return Promise.resolve({uuid:t.uuid,name:t.uuid})}}Vo=new WeakMap,zo=new WeakMap;const qo=()=>{const e=((e,t)=>{const n=new RegExp(`^${t}<(?.*)>$`).exec(e)?.groups?.meta;if(n)try{return JSON.parse(atob(n))}catch(e){throw new Error(`Failed to decode JSON from ${n}.`)}})(window.name,\"of-frame\");if(e)try{const{name:t,uuid:n,brokerUrl:i,providerId:r,contextGroup:o}=e;return Fo(i,\"brokerUrl\"),Fo(n,\"uuid\"),Fo(t,\"name\"),{identity:{name:t,uuid:n},brokerUrl:i,interopConfig:{providerId:r,currentContextGroup:o}}}catch(e){throw new Error(`Unexpected error occurred when inferring platform information: ${e.stack}`)}},Jo=()=>{const e=r.v4();return{uuid:e,name:e}},Yo=async e=>{if(\"enabled\"===e.connectionInheritance){const t=await(async e=>{const t=qo();if(t){const{validateOptions:n=(()=>!0)}=e,{identity:i,...r}=t;if(!await n(r))throw new Error(\"Parent options were rejected by validateOptions.\");return t}})(e);if(t)return t}if(!e.options){const t=\"enabled\"===e.connectionInheritance?\"Broker URL was not specified nor provided by a platform container.\":\"Connection inheritance is disabled but no options were provided.\";throw new Error(t)}return{...e.options,identity:Jo()}};exports.__classPrivateFieldGet=Lo,exports.__classPrivateFieldSet=To,exports.apiExposer=Gn,exports.commonjsGlobal=s,exports.connect=async t=>{try{Ro.log(\"Establishing connection\",t);const{brokerUrl:n,identity:i,timeout:r,interopConfig:s}=await Yo(t),{workerPort:a,iframeBrokerPort:c}=await(async(e,t,n)=>{const{origin:i}=new URL(e),r=document.createElement(\"IFRAME\");let s;r.style.display=\"none\";try{return await new Promise(((a,c)=>{const d=e=>{if(e.source===r.contentWindow&&e.data?.topic===`ack-${jo}`){if(e.origin!==i)c(new Error(`Broker redirected to unexpected origin ${e.origin}, expected ${i}.`));else if(e.data.success){const[t,n]=e.ports;a({iframeBrokerPort:t,workerPort:n})}else c(new m(e.data));window.removeEventListener(\"message\",d),clearTimeout(s)}};window.addEventListener(\"message\",d),ko.log(`Connecting to broker ${e}`),r.setAttribute(\"src\",e),r.setAttribute(\"name\",o(t,\"of-broker\")),document.body.appendChild(r),ko.log(\"Iframe loaded, awaiting init message from iframe\"),n&&(s=setTimeout((()=>{window.removeEventListener(\"message\",d),document.body.removeChild(r),c(new Error(\"Worker did not initialize in time\"))}),n))}))}catch(e){throw new Error(`Failed to initialise Fin Web Client. ${e.message}`,{cause:e})}})(n,i,r);Ro.log(\"Successfully established connection to shared worker\");const d={entityType:\"external connection\",...i};a.start(),c.start();const h=((t,n,i)=>{const r=$o(n),o=new Ko(t),s=new Io(r,o,i);return s.connectSync(),window.Buffer=e.Buffer,new Wr(s)})(t,a,d);return s?.providerId&&(h.me.interop=h.Interop.connectSync(s.providerId),s?.currentContextGroup&&h.me.interop.joinContextGroup(s.currentContextGroup).catch((e=>{console.warn(`Error joining specified context group: ${s?.currentContextGroup}, continuing`,e)}))),{...h,me:{...h.me,identity:{uuid:h.me.uuid,name:h.me.name}}}}catch(e){throw new Error(`An error occured during web-interop connection: ${e.message}`)}},exports.decorators=Nn,exports.encodeOptions=o,exports.layout_constants=ai,exports.lazy=G;\n","\"use strict\";var t=require(\"./main-8cad4070.js\"),e=require(\"uuid\");require(\"buffer/\"),require(\"events\"),require(\"lodash/cloneDeep\"),require(\"lodash/isEqual\");var i={},n={};Object.defineProperty(n,\"__esModule\",{value:!0}),n.mapValuesAsync=n.mapEntriesAsync=void 0;const o=(t,[e,i])=>({...t,[e]:i});async function s(t,e){return(await Promise.all(e.map((async([e,i])=>[e,await t(i,e)])))).reduce(o,{})}n.mapEntriesAsync=s,n.mapValuesAsync=async function(t,e){let i;return i=e instanceof Map?[...e.entries()]:Object.entries(e),s(t,i)};var r,a,l,h,d=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldSet||function(t,e,i,n,o){if(\"m\"===n)throw new TypeError(\"Private method is not writable\");if(\"a\"===n&&!o)throw new TypeError(\"Private accessor was defined without a setter\");if(\"function\"==typeof e?t!==e||!o:!e.has(t))throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");return\"a\"===n?o.call(t,i):o?o.value=i:e.set(t,i),i},c=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldGet||function(t,e,i,n){if(\"a\"===i&&!n)throw new TypeError(\"Private accessor was defined without a getter\");if(\"function\"==typeof e?t!==e||!n:!e.has(t))throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");return\"m\"===i?n:\"a\"===i?n.call(t):n?n.value:e.get(t)};Object.defineProperty(i,\"__esModule\",{value:!0});var m=i.DefaultLayoutManager=void 0;const u=n;class p{constructor(t){a.set(this,void 0),l.set(this,new Map),d(this,a,t,\"f\")}size(){return c(this,l,\"f\").size}async applyLayoutSnapshot({layouts:t}){if(Object.keys(t).length>1)throw new Error(\"[LayoutManager] Tried to call applyLayoutSnapshot with more than 1 layout. When implementing multiple layouts via overridden LayoutManager class, you must override and fully implement the applyLayoutSnapshot method without calling super.applyLayoutSnapshot().\");const[[e,i]]=Object.entries(t);await p.createLayout(this,{layoutName:e,layout:i})}async showLayout({layoutName:t}){}async getLayoutSnapshot(){return{layouts:await(0,u.mapValuesAsync)((t=>t.getFrameSnapshot()),c(this,l,\"f\"))}}async removeLayout({layoutName:t}){}getLayoutIdentityForView(t){const e=[...c(this,l,\"f\").values()].find((e=>e.getCurrentViews().some((e=>e.name===t.name&&e.uuid===t.uuid))));return e?.identity??void 0}isLayoutVisible({layoutName:t}){return c(p,r,\"m\",h).call(p,this,t).isVisible()}resolveLayoutIdentity(t){if(t&&\"layoutName\"in t)return t;const e=[...c(this,l,\"f\").values()];if(1===e.length)return e[0].identity;const i=e.find((t=>t.isVisible()));return i?.identity??void 0}static async resolveLayout(t,e){const i=t.resolveLayoutIdentity(e);if(void 0===i||!(\"layoutName\"in i))throw new Error(\"[layout-manager] resolveLayout: Could not resolve the layout identity. Make sure you include 'layoutName' in the identity object.\");return c(p,r,\"m\",h).call(p,t,i.layoutName)}static async handleSharedView(t,e,i){await(0,u.mapValuesAsync)((async t=>{if(t.identity.layoutName!==e.layoutName){const e=t.getCurrentViews().find((t=>t.name===i.name));e&&await t.onViewDetached({viewIdentity:e,target:null}).catch(console.error)}}),c(t,l,\"f\"))}static async handleLastViewRemoved(t,e){await t.removeLayout(e),await c(t,a,\"f\").handleLastViewRemoved(t)}static async destroyLayout(t,{layoutName:e}){await c(p,r,\"m\",h).call(p,t,e).destroy(),c(t,l,\"f\").delete(e)}static async createLayout(t,e){const{layoutName:i}=e;if(c(t,l,\"f\").has(i))throw new Error(`Layout name ${i} already exists`);await c(t,a,\"f\").createLayout(e,t)}static registerLayout(t,e,i){c(t,l,\"f\").set(e,i)}static getAllLayouts(t){return[...c(t,l,\"f\").values()]}static setInitialSnapshot(t,e){c(t,a,\"f\").setInitialSnapshot(e)}static createClosedConstructor(...t){return class extends p{constructor(){super(...t)}}}}m=i.DefaultLayoutManager=p,r=p,a=new WeakMap,l=new WeakMap,h=function(t,e){const i=c(t,l,\"f\").get(e);if(!i)throw new Error(`[layout-manager] getLayoutByName: Could not locate layout with name '${e}'`);return i};var g={},f={},v={};Object.defineProperty(v,\"__esModule\",{value:!0}),v.ReversibleMap=void 0;v.ReversibleMap=class{constructor(){this.valueToKey=new Map,this.keyToValue=new Map,this.setUnique=(t,e)=>{if(this.hasKey(t)||this.hasValue(e))throw new Error(\"Key or value already in the map.\");this.keyToValue.set(t,e),this.valueToKey.set(e,t)},this.getKey=t=>{const e=this.valueToKey.get(t);if(!e)throw new Error(\"Value not found in the map.\");return e},this.deleteKey=t=>{const e=this.getValue(t);return this.keyToValue.delete(t),this.valueToKey.delete(e),e},this.deleteValue=t=>{const e=this.getKey(t);return this.keyToValue.delete(e),this.valueToKey.delete(t),e},this.hasKey=t=>this.keyToValue.has(t),this.hasValue=t=>this.valueToKey.has(t)}getValue(t){const e=this.keyToValue.get(t);if(!e)throw new Error(\"Key not found in the map.\");return e}},Object.defineProperty(f,\"__esModule\",{value:!0});var _=f.LayoutContentCache=void 0;const y=t.lazy,C=v;class w{constructor(){this.contentItemCache=new C.ReversibleMap,this.contentItemCacheId=0,this.createCacheKey=()=>{const t=`entity-${this.contentItemCacheId.toString()}`;return this.contentItemCacheId+=1,t},this.hasKey=t=>this.contentItemCache.hasKey(t),this.getItemOrUndefined=t=>{try{return this.getContentItemOrThrow(t)}catch(t){return}},this.getContentItemOrThrow=(t,e)=>{if(!this.contentItemCache.hasKey(t))throw new Error(\"Layout component has been destroyed or detached from the current layout.\");const i=this.contentItemCache.getValue(t);if(e&&!e.includes(i.type))throw new Error(`Layout item is not the expected type. Expected ${e.join(\", \")}, got ${i.type}.`);return i},this.getOrCreateEntityId=t=>{if(this.contentItemCache.hasValue(t))return this.contentItemCache.getKey(t);t.onDestroyed((()=>{this.contentItemCache.deleteValue(t)}));const e=this.createCacheKey();return this.contentItemCache.setUnique(e,t),e}}static getSingleInstance(){return w.singleton.getValue()}}_=f.LayoutContentCache=w,w.singleton=new y.Lazy((()=>new w));var I={},b={};!function(t){Object.defineProperty(t,\"__esModule\",{value:!0}),t.getAdjacentStacks=t.doShareEdge=t.getAdjacentItem=void 0;t.getAdjacentItem=(e,i)=>{const{parent:n}=e;if(e.isRoot()||!n)return;const o=[\"top\",\"bottom\"].includes(i)?\"column\":\"row\",s=[\"top\",\"left\"].includes(i)?-1:1;if(n.type===o){const t=n.contentItems.indexOf(e)+s;if(t>=0&&t{const n=t.getBounds(),o=e.getBounds();if(!n||!o)return!1;if([\"top\",\"bottom\"].includes(i)){return!(n.righto.right)}return!(n.bottomo.bottom)};t.getAdjacentStacks=(e,i)=>{const n=[\"top\",\"bottom\"].includes(i)?\"row\":\"column\",o=s=>\"stack\"===s.type?(0,t.doShareEdge)(e,s,i)?[s]:[]:\"root\"===s.type||\"ground\"===s.type?[]:s.type===n?s.contentItems.map((t=>o(t))).flat():s.type!==n?[\"top\",\"right\"].includes(i)?o(s.contentItems[s.contentItems.length-1]):o(s.contentItems[0]):[],s=(0,t.getAdjacentItem)(e,i);return s?o(s):[]}}(b);var S=t.commonjsGlobal&&t.commonjsGlobal.__decorate||function(t,e,i,n){var o,s=arguments.length,r=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if(\"object\"==typeof Reflect&&\"function\"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(s<3?o(r):s>3?o(e,i,r):o(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};Object.defineProperty(I,\"__esModule\",{value:!0}),I.LayoutEntitiesController=void 0;const E=t.decorators,x=b,L=i;class z{constructor(t,e,i){this.wire=t,this.layoutManager=e,this.layoutContentCache=i,this.analytics=t=>{this.wire.sendAction(`layout-controller-${t}`).catch((()=>{}))},this.getLayoutIdentityForViewOrThrow=async t=>{const e=this.layoutManager.getLayoutIdentityForView(t);if(!e)throw new Error(`View identity ${t.name} is not attached to any layouts.`);return e},this.getRoot=async t=>{this.analytics(\"get-root\");const e=(await this.getLayout(t)).getRoot();return{type:e.type,entityId:this.layoutContentCache.getOrCreateEntityId(e)}},this.getStackByView=async t=>{this.analytics(\"get-stack-by-view\");const e=await this.getLayoutIdentityForViewOrThrow(t),i=(await this.getLayout(e)).getStackByView(t);if(\"stack\"===i?.type)return{entityId:this.layoutContentCache.getOrCreateEntityId(i),type:\"stack\"}},this.getStackViews=t=>{this.analytics(\"get-stack-views\");return this.layoutContentCache.getContentItemOrThrow(t,[\"stack\"]).contentItems.map((t=>({name:t.viewName,uuid:this.wire.me.uuid})))},this.isRoot=t=>{this.analytics(\"is-root\");return this.layoutContentCache.getContentItemOrThrow(t).isRoot()},this.exists=t=>(this.analytics(\"exists\"),this.layoutContentCache.hasKey(t)),this.addViewToStack=async(t,e,{index:i}={index:0})=>{this.analytics(\"add-view-to-stack\");const n=this.layoutContentCache.getContentItemOrThrow(t);if(i&&i>n.contentItems.length+1)throw new Error(`Index '${i}' out of range, please exclude the index or specify a number between 0 and ${n.contentItems.length}`);const o={id:t,index:i},{identity:s}=await n.layout.platformCreateView(e,{location:o});return s},this.findViewInStack=(t,e)=>t.contentItems.find((t=>t.viewName===e.name)),this.removeViewFromStack=async(t,e)=>{this.analytics(\"remove-view-from-stack\");const i=this.layoutContentCache.getContentItemOrThrow(t,[\"stack\"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to remove a view ('${e.name}') which does not belong to the stack.`);await n.layout.platformCloseView(e)},this.createAdjacentStack=async(t,e,{position:i=\"right\"}={})=>{if(this.analytics(\"create-adjacent-stack\"),!Array.isArray(e)||0===e.length)throw new Error('The parameter \"views\" must be an array with at least 1 element.');if(![\"top\",\"bottom\",\"left\",\"right\"].includes(i))throw new Error(`Invalid position '${i}' specified.`);const n=this.layoutContentCache.getContentItemOrThrow(t).createAdjacentStack({position:i}),o=this.layoutContentCache.getOrCreateEntityId(n);return await Promise.all(e.reverse().map((t=>this.addViewToStack(o,t)))),o},this.getAdjacentStacks=async({targetId:t,edge:e})=>{this.analytics(\"get-adjacent-stacks\");const i=this.layoutContentCache.getContentItemOrThrow(t);return(0,x.getAdjacentStacks)(i,e).map((t=>({entityId:this.layoutContentCache.getOrCreateEntityId(t)})))},this.setStackActiveView=async(t,e)=>{this.analytics(\"set-stack-active-view\");const i=this.layoutContentCache.getContentItemOrThrow(t,[\"stack\"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to set a view ('${e.name}') as active when it does not belong to the stack.`);i.setActiveContentItem(n,!0)}}async getLayout(t){const e=await L.DefaultLayoutManager.resolveLayout(this.layoutManager,t);if(!e)throw new Error(`Could not resolve target layout identity ${JSON.stringify(t)}`);return e}getContent(t){this.analytics(\"get-content\");return this.layoutContentCache.getContentItemOrThrow(t,[\"column\",\"row\"]).contentItems.map((t=>({type:t.type,entityId:this.layoutContentCache.getOrCreateEntityId(t)})))}getParent(t){this.analytics(\"get-parent\");const e=this.layoutContentCache.getContentItemOrThrow(t);if(!e.isRoot())return e.parent?.contentItems.includes(e)?{type:e.parent.type,entityId:this.layoutContentCache.getOrCreateEntityId(e.parent)}:void 0}}S([(0,E.expose)()],z.prototype,\"getLayoutIdentityForViewOrThrow\",void 0),S([(0,E.expose)()],z.prototype,\"getRoot\",void 0),S([(0,E.expose)()],z.prototype,\"getStackByView\",void 0),S([(0,E.expose)()],z.prototype,\"getStackViews\",void 0),S([(0,E.expose)()],z.prototype,\"getContent\",null),S([(0,E.expose)()],z.prototype,\"getParent\",null),S([(0,E.expose)()],z.prototype,\"isRoot\",void 0),S([(0,E.expose)()],z.prototype,\"exists\",void 0),S([(0,E.expose)()],z.prototype,\"addViewToStack\",void 0),S([(0,E.expose)()],z.prototype,\"removeViewFromStack\",void 0),S([(0,E.expose)()],z.prototype,\"createAdjacentStack\",void 0),S([(0,E.expose)()],z.prototype,\"getAdjacentStacks\",void 0),S([(0,E.expose)()],z.prototype,\"setStackActiveView\",void 0),I.LayoutEntitiesController=z,Object.defineProperty(g,\"__esModule\",{value:!0});var M=g.initLayoutEndpoints=void 0;const P=t.apiExposer,T=t.layout_constants,A=f,k=I,D=i;M=g.initLayoutEndpoints=async function(t,e){const i=t.getFin(),n=await i.Platform.getCurrentSync().getClient(),o=new P.ChannelsExposer(n);await new P.ApiExposer(o).exposeInstance(new k.LayoutEntitiesController(t,e,A.LayoutContentCache.getSingleInstance()),{id:T.LAYOUT_CONTROLLER_ID}),await async function(t,e){const i=t=>async i=>{const n=await D.DefaultLayoutManager.resolveLayout(e,i.target);if(!n)throw new Error(`Could not resolve the layout target from payload ${JSON.stringify(i)}`);return t(n,i)},n=(e,n)=>{t.register(e,i(n))},o=(t,e)=>{n(t,e)};n(\"replace-view\",((t,e)=>t.replaceView(e))),n(\"replace-layout\",((t,{layout:e})=>t.replaceLayout(e))),n(\"add-view\",((t,e)=>t.insertView(e))),o(\"layout-add-view\",((t,{viewOptions:e,location:i,targetView:n})=>t.platformCreateView(e,{location:i,targetView:n}))),n(\"close-view\",((t,e)=>t.cleanupView(e.viewIdentity))),o(\"layout-close-view\",((t,e)=>t.platformCloseView(e.viewIdentity))),n(\"apply-preset-layout\",((t,e)=>t.applyPreset(e))),n(\"get-layout-views\",(t=>t.getCurrentViews())),n(\"get-frame-snapshot\",(t=>t.getFrameSnapshot())),n(\"is-visible\",(t=>t.isVisible())),n(\"destroy\",(t=>t.destroy())),t.register(\"get-layout-snapshot\",(()=>e.getLayoutSnapshot()))}(n,e)};var R={};Object.defineProperty(R,\"__esModule\",{value:!0});var U=R.BaseLayout=void 0;U=R.BaseLayout=class{};var O={};Object.defineProperty(O,\"__esModule\",{value:!0});var V=O.DOMEmitter=void 0;V=O.DOMEmitter=class{constructor(t){this.container=t}dispatchLocalEvent(t,e){const i={...e,type:t,tabSelector:`tab-${e.name}`,containerSelector:`container-${e.name}`,topic:\"openfin-DOM-event\"};this.container.dispatchEvent(new CustomEvent(t,{detail:i}))}};var B={};Object.defineProperty(B,\"__esModule\",{value:!0});var H=B.mapLayoutContentItemsImmutableSync=B.mapLayoutContentItemsImmutable=W=B.isVisible=void 0;var W=B.isVisible=t=>(0!==t.offsetWidth||0!==t.offsetHeight)&&\"hidden\"!==window.getComputedStyle(t).visibility&&t.offsetTop>=0&&t.offsetLeft>=0&&t.offsetTop<=window.innerHeight&&t.offsetLeft<=window.innerWidth;const F=t=>\"type\"in t&&\"component\"===t.type;B.mapLayoutContentItemsImmutable=async function t(e,i){return F(i)?e(i):{...i,content:await Promise.all(i.content?.map((i=>t(e,i))))}},H=B.mapLayoutContentItemsImmutableSync=function t(e,i){return F(i)?e(i):{...i,content:i.content?.map((i=>t(e,i)))}};class N extends Error{constructor(t,e){super(e),this.type=t}}class G extends N{constructor(t,e){super(\"Configuration\",t),this.node=e}}class j extends N{constructor(t){super(\"PopoutBlocked\",t)}}class $ extends N{constructor(t){super(\"API\",t)}}class Z extends N{constructor(t){super(\"Bind\",t)}}class q extends Error{constructor(t,e,i){super(`${t}: ${e}${void 0===i?\"\":\": \"+i}`)}}class X extends q{constructor(t,e){super(\"Assert\",t,e)}}class Y extends q{constructor(t,e,i){super(\"UnreachableCase\",t,`${e}${void 0===i?\"\":\": \"+i}`)}}class K extends q{constructor(t,e){super(\"UnexpectedNull\",t,e)}}class J extends q{constructor(t,e){super(\"UnexpectedUndefined\",t,e)}}var Q;!function(t){let e=!1;const i={PopoutCannotBeCreatedWithGroundItemConfig:{id:0,default:\"Popout cannot be created with ground ItemConfig\"},PleaseRegisterAConstructorFunction:{id:1,default:\"Please register a constructor function\"},ComponentTypeNotRegisteredAndBindComponentEventHandlerNotAssigned:{id:2,default:\"Component type not registered and BindComponentEvent handler not assigned\"},ComponentIsAlreadyRegistered:{id:3,default:\"Component is already registered\"},ComponentIsNotVirtuable:{id:4,default:\"Component is not virtuable. Requires rootHtmlElement field/getter\"},VirtualComponentDoesNotHaveRootHtmlElement:{id:5,default:'Virtual component does not have getter \"rootHtmlElement\"'},ItemConfigIsNotTypeComponent:{id:6,default:\"ItemConfig is not of type component\"},InvalidNumberPartInSizeString:{id:7,default:\"Invalid number part in size string\"},UnknownUnitInSizeString:{id:8,default:\"Unknown unit in size string\"},UnsupportedUnitInSizeString:{id:9,default:\"Unsupported unit in size string\"}};t.idCount=Object.keys(i).length;const n=Object.values(i);t.checkInitialise=function(){if(!e)for(let e=0;e=\"0\"&&t<=\"9\"}function Tt(t,e){const i=zt(e);t.style.width=i}function At(t,e){const i=zt(e);t.style.height=i}function kt(t){return{width:t.offsetWidth,height:t.offsetHeight}}function Dt(t,e){t.style.display=e?\"\":\"none\"}function Rt(t,e){if(void 0!==e)for(const i in e)if(e.hasOwnProperty(i)){const n=e[i],o=t[i];t[i]=Ut(o,n)}return t}function Ut(t,e){if(\"object\"!=typeof e)return e;if(Array.isArray(e)){const t=e.length,i=new Array(t);for(let n=0;n36)throw new Error(\"Too many keys in config minifier map\")},t.translateObject=n}(dt||(dt={})),function(t){t.defaults={type:at.ground,content:[],size:1,sizeUnit:ht.Fractional,minSize:void 0,minSizeUnit:ht.Pixel,id:\"\",isClosable:!0},t.createCopy=function(t,e){switch(t.type){case at.ground:case at.row:case at.column:return gt.createCopy(t,e);case at.stack:return ut.createCopy(t,e);case at.component:return pt.createCopy(t);default:throw new Y(\"CICC91354\",t.type,\"Invalid Config Item type specified\")}},t.createDefault=function(t){switch(t){case at.ground:throw new X(\"CICCDR91562\");case at.row:case at.column:return gt.createDefault(t);case at.stack:return ut.createDefault();case at.component:return pt.createDefault();default:throw new Y(\"CICCDD91563\",t,\"Invalid Config Item type specified\")}},t.isComponentItem=function(t){return t.type===at.component},t.isStackItem=function(t){return t.type===at.stack},t.isGroundItem=function(t){return t.type===at.ground}}(ct||(ct={})),function(t){t.defaultMaximised=!1,function(t){t.createCopy=function(t,e){return void 0===t?void 0:{show:null!=e?e:t.show,popout:t.popout,close:t.close,maximise:t.maximise,minimise:t.minimise,tabDropdown:t.tabDropdown}}}(t.Header||(t.Header={}))}(mt||(mt={})),function(t){function e(t){const e=t.length,i=new Array(e);for(let n=0;n\"__glMaximised\"===t));t>0&&(o=!0,n=n.splice(t,1)),e=n.length>0?n[0]:ct.defaults.id}else e=n;return i=void 0!==t.maximised?t.maximised:o,{id:e,maximised:i}}}(wt||(wt={})),function(t){function e(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0;return{resolved:!0,root:Et.resolve(i),openPopouts:t.resolveOpenPopouts(e.openPopouts),dimensions:t.Dimensions.resolve(e.dimensions),settings:t.Settings.resolve(e.settings),header:t.Header.resolve(e.header,e.settings,e.labels)}}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:Lt.fromResolvedArray(e.openPopouts),settings:_t.Settings.createCopy(e.settings),dimensions:t.Dimensions.fromResolved(e.dimensions),header:_t.Header.createCopy(e.header)}},t.isResolved=function(t){const e=t;return void 0!==e.resolved&&!0===e.resolved},t.resolveOpenPopouts=function(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0,{root:Et.resolve(o),openPopouts:xt.resolveOpenPopouts(e.openPopouts),dimensions:xt.Dimensions.resolve(e.dimensions),settings:xt.Settings.resolve(e.settings),header:xt.Header.resolve(e.header,e.settings,e.labels),parentId:null!==(i=e.parentId)&&void 0!==i?i:null,indexInParent:null!==(n=e.indexInParent)&&void 0!==n?n:null,window:t.Window.resolve(e.window,e.dimensions),resolved:!0}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:i(e.openPopouts),dimensions:xt.Dimensions.fromResolved(e.dimensions),settings:_t.Settings.createCopy(e.settings),header:_t.Header.createCopy(e.header),parentId:e.parentId,indexInParent:e.indexInParent,window:t.Window.fromResolved(e.window)}},t.fromResolvedArray=i}(Lt||(Lt={}));class Wt{constructor(){this._allEventSubscriptions=[],this._subscriptionsMap=new Map,this.unbind=this.removeEventListener,this.trigger=this.emit}tryBubbleEvent(t,e){}emit(t,...e){let i=this._subscriptionsMap.get(t);if(void 0!==i){i=i.slice();for(let t=0;t0){const n=e.slice();n.unshift(t);const o=this._allEventSubscriptions.slice();for(let t=0;t0?n.contentItems[0]:n,e=0);const o=this._layoutManager.createAndInitContentItem(i,t);t.addChild(o,e),this._layoutManager.layoutConfig.settings.popInOnClose?this._onClose():this.close()}createWindow(){const t=this.createUrl(),e=Math.floor(1e6*Math.random()).toString(36),i=this.serializeWindowFeatures({width:this._initialWindowSize.width,height:this._initialWindowSize.height,innerWidth:this._initialWindowSize.width,innerHeight:this._initialWindowSize.height,menubar:\"no\",toolbar:\"no\",location:\"no\",personalbar:\"no\",resizable:\"yes\",scrollbars:\"no\",status:\"no\"});if(this._popoutWindow=globalThis.open(t,e,i),this._popoutWindow)this._popoutWindow.addEventListener(\"load\",(()=>this.positionWindow()),{passive:!0}),this._popoutWindow.addEventListener(\"beforeunload\",(()=>{this._layoutManager.layoutConfig.settings.popInOnClose?this.popIn():this._onClose()}),{passive:!0}),this._checkReadyInterval=setInterval((()=>this.checkReady()),10);else if(!0===this._layoutManager.layoutConfig.settings.blockedPopoutsThrowError){throw new j(\"Popout blocked\")}}checkReady(){if(null===this._popoutWindow)throw new K(\"BPCR01844\");this._popoutWindow.__glInstance&&this._popoutWindow.__glInstance.isInitialised&&(this.onInitialised(),void 0!==this._checkReadyInterval&&(clearInterval(this._checkReadyInterval),this._checkReadyInterval=void 0))}serializeWindowFeatures(t){const e=[];for(const i in t)e.push(i+\"=\"+t[i].toString());return e.join(\",\")}createUrl(){const t=\"gl-window-config-\"+Ot(),e=_t.minifyConfig(this._config);try{localStorage.setItem(t,JSON.stringify(e))}catch(t){throw new Error(\"Error while writing to localStorage \"+function(t){return t instanceof Error?t.message:\"string\"==typeof t?t:\"Unknown Error\"}(t))}const i=new URL(location.href);return i.searchParams.set(\"gl-window\",t),i.toString()}positionWindow(){if(null===this._popoutWindow)throw new Error(\"BrowserPopout.positionWindow: null popoutWindow\");this._popoutWindow.moveTo(this._initialWindowSize.left,this._initialWindowSize.top),this._popoutWindow.focus()}onInitialised(){this._isInitialised=!0,this.getGlInstance().on(\"popIn\",(()=>this.popIn())),this.emit(\"initialised\")}_onClose(){setTimeout((()=>this.emit(\"closed\")),50)}}class Gt extends Wt{constructor(t,e,i,n){super(),this.layoutManager=t,this._parent=i,this._element=n,this._popInParentIds=[],this._type=e.type,this._id=e.id,this._isInitialised=!1,this.isGround=!1,this.isRow=!1,this.isColumn=!1,this.isStack=!1,this.isComponent=!1,this.size=e.size,this.sizeUnit=e.sizeUnit,this.minSize=e.minSize,this.minSizeUnit=e.minSizeUnit,this._isClosable=e.isClosable,this._pendingEventPropagations={},this._throttledEvents=[\"stateChanged\"],this._contentItems=this.createContentItems(e.content)}get type(){return this._type}get id(){return this._id}set id(t){this._id=t}get popInParentIds(){return this._popInParentIds}get parent(){return this._parent}get contentItems(){return this._contentItems}get isClosable(){return this._isClosable}get element(){return this._element}get isInitialised(){return this._isInitialised}static isStack(t){return t.isStack}static isComponentItem(t){return t.isComponent}static isComponentParentableItem(t){return t.isStack||t.isGround}removeChild(t,e=!1){const i=this._contentItems.indexOf(t);if(-1===i)throw new Error(\"Can't remove child item. Unknown content item\");if(e||this._contentItems[i].destroy(),this._contentItems.splice(i,1),this._contentItems.length>0)this.updateSize(!1);else if(!this.isGround&&!0===this._isClosable){if(null===this._parent)throw new K(\"CIUC00874\");this._parent.removeChild(this)}}addChild(t,e,i){return null!=e||(e=this._contentItems.length),this._contentItems.splice(e,0,t),t.setParent(this),!0===this._isInitialised&&!1===t._isInitialised&&t.init(),e}replaceChild(t,e,i=!1){const n=this._contentItems.indexOf(t),o=t._element.parentNode;if(-1===n)throw new X(\"CIRCI23232\",\"Can't replace child. oldChild is not child of this\");if(null===o)throw new K(\"CIRCP23232\");if(o.replaceChild(e._element,t._element),!0===i&&(t._parent=null,t.destroy()),this._contentItems[n]=e,e.setParent(this),e.size=t.size,e.sizeUnit=t.sizeUnit,e.minSize=t.minSize,e.minSizeUnit=t.minSizeUnit,null===e._parent)throw new K(\"CIRCNC45699\");!0===e._parent._isInitialised&&!1===e._isInitialised&&e.init(),this.updateSize(!1)}remove(){if(null===this._parent)throw new K(\"CIR11110\");this._parent.removeChild(this)}popout(){const t=Ot(),e=this.layoutManager.createPopoutFromContentItem(this,void 0,t,void 0);return this.emitBaseBubblingEvent(\"stateChanged\"),e}calculateConfigContent(){const t=this._contentItems,e=t.length,i=new Array(e);for(let n=0;nthis.propagateEventToLayoutManager(t,e))))}propagateEventToLayoutManager(t,e){this._pendingEventPropagations[t]=!1,this.layoutManager.emitUnknown(t,e)}}class jt extends Gt{constructor(t,e,i){super(t,e,i,document.createElement(\"div\")),this._parentItem=i,this._focused=!1,this.isComponent=!0,this._reorderEnabled=e.reorderEnabled,this.applyUpdatableConfig(e),this._initialWantMaximise=e.maximised;const n=document.createElement(\"div\");n.classList.add(\"lm_content\"),this.element.appendChild(n),this._container=new Ft(e,this,t,n,(t=>this.handleUpdateItemConfigEvent(t)),(()=>this.show()),(()=>this.hide()),(t=>this.focus(t)),(t=>this.blur(t)))}get componentName(){return this._container.componentType}get componentType(){return this._container.componentType}get reorderEnabled(){return this._reorderEnabled}get initialWantMaximise(){return this._initialWantMaximise}get component(){return this._container.component}get container(){return this._container}get parentItem(){return this._parentItem}get headerConfig(){return this._headerConfig}get title(){return this._title}get tab(){return this._tab}get focused(){return this._focused}destroy(){this._container.destroy(),super.destroy()}applyUpdatableConfig(t){this.setTitle(t.title),this._headerConfig=t.header}toConfig(){const t=this._container.stateRequestEvent,e=void 0===t?this._container.state:t();return{type:at.component,content:[],size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,maximised:!1,isClosable:this.isClosable,reorderEnabled:this._reorderEnabled,title:this._title,header:mt.Header.createCopy(this._headerConfig),componentType:pt.copyComponentType(this.componentType),componentState:e}}close(){if(null===this.parent)throw new K(\"CIC68883\");this.parent.removeChild(this,!1)}enterDragMode(t,e){Tt(this.element,t),At(this.element,e),this._container.enterDragMode(t,e)}exitDragMode(){this._container.exitDragMode()}enterStackMaximised(){this._container.enterStackMaximised()}exitStackMaximised(){this._container.exitStackMaximised()}drag(){this._container.drag()}updateSize(t){this.updateNodeSize(t)}init(){this.updateNodeSize(!1),super.init(),this._container.emit(\"open\"),this.initContentItems()}setTitle(t){this._title=t,this.emit(\"titleChanged\",t),this.emit(\"stateChanged\")}setTab(t){this._tab=t,this.emit(\"tab\",t),this._container.setTab(t)}hide(){super.hide(),this._container.setVisibility(!1)}show(){super.show(),this._container.setVisibility(!0)}focus(t=!1){this.parentItem.setActiveComponentItem(this,!0,t)}setFocused(t){this._focused=!0,this.tab.setFocused(),t||this.emitBaseBubblingEvent(\"focus\")}blur(t=!1){this._focused&&this.layoutManager.setFocusedComponentItem(void 0,t)}setBlurred(t){this._focused=!1,this.tab.setBlurred(),t||this.emitBaseBubblingEvent(\"blur\")}setParent(t){this._parentItem=t,super.setParent(t)}handleUpdateItemConfigEvent(t){this.applyUpdatableConfig(t)}updateNodeSize(t){if(\"none\"!==this.element.style.display){const{width:e,height:i}=kt(this.element);this._container.setSizeToNodeSize(e,i,t)}}}class $t extends Gt{constructor(){super(...arguments),this._focused=!1}get focused(){return this._focused}setFocusedValue(t){this._focused=t}}class Zt extends Wt{constructor(t,e){super(),this._eElement=t,this._pointerTracking=!1,this._pointerDownEventListener=t=>this.onPointerDown(t),this._pointerMoveEventListener=t=>this.onPointerMove(t),this._pointerUpEventListener=t=>this.onPointerUp(t),this._timeout=void 0,this._allowableTargets=[t,...e],this._oDocument=document,this._eBody=document.body,this._nDelay=1800,this._nDistance=10,this._nX=0,this._nY=0,this._nOriginalX=0,this._nOriginalY=0,this._dragging=!1,this._eElement.addEventListener(\"pointerdown\",this._pointerDownEventListener,{passive:!0})}destroy(){this.checkRemovePointerTrackingEventListeners(),this._eElement.removeEventListener(\"pointerdown\",this._pointerDownEventListener)}cancelDrag(){this.processDragStop(void 0)}onPointerDown(t){if(this._allowableTargets.includes(t.target)&&t.isPrimary){const e=this.getPointerCoordinates(t);this.processPointerDown(e)}}processPointerDown(t){this._nOriginalX=t.x,this._nOriginalY=t.y,this._oDocument.addEventListener(\"pointermove\",this._pointerMoveEventListener),this._oDocument.addEventListener(\"pointerup\",this._pointerUpEventListener,{passive:!0}),this._pointerTracking=!0,this._timeout=setTimeout((()=>{try{this.startDrag()}catch(t){throw console.error(t),t}}),this._nDelay)}onPointerMove(t){this._pointerTracking&&(this.processDragMove(t),t.preventDefault())}processDragMove(t){this._nX=t.pageX-this._nOriginalX,this._nY=t.pageY-this._nOriginalY,!1===this._dragging&&(Math.abs(this._nX)>this._nDistance||Math.abs(this._nY)>this._nDistance)&&this.startDrag(),this._dragging&&this.emit(\"drag\",this._nX,this._nY,t)}onPointerUp(t){this.processDragStop(t)}processDragStop(t){var e;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this.checkRemovePointerTrackingEventListeners(),!0===this._dragging&&(this._eBody.classList.remove(\"lm_dragging\"),this._eElement.classList.remove(\"lm_dragging\"),null===(e=this._oDocument.querySelector(\"iframe\"))||void 0===e||e.style.setProperty(\"pointer-events\",\"\"),this._dragging=!1,this.emit(\"dragStop\",t))}checkRemovePointerTrackingEventListeners(){this._pointerTracking&&(this._oDocument.removeEventListener(\"pointermove\",this._pointerMoveEventListener),this._oDocument.removeEventListener(\"pointerup\",this._pointerUpEventListener),this._pointerTracking=!1)}startDrag(){var t;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this._dragging=!0,this._eBody.classList.add(\"lm_dragging\"),this._eElement.classList.add(\"lm_dragging\"),null===(t=this._oDocument.querySelector(\"iframe\"))||void 0===t||t.style.setProperty(\"pointer-events\",\"none\"),this.emit(\"dragStart\",this._nOriginalX,this._nOriginalY)}getPointerCoordinates(t){return{x:t.pageX,y:t.pageY}}}class qt{constructor(t,e,i){this._isVertical=t,this._size=e,this._grabSize=i0){const i=this.createSplitter(Math.max(0,e-1)).element;e>0?(this.contentItems[e-1].element.insertAdjacentElement(\"afterend\",i),i.insertAdjacentElement(\"afterend\",t.element)):(this.contentItems[0].element.insertAdjacentElement(\"beforebegin\",i),i.insertAdjacentElement(\"beforebegin\",t.element))}else this._childElementContainer.appendChild(t.element);super.addChild(t,e);const n=1/this.contentItems.length*100;if(!0===i)return this.emitBaseBubblingEvent(\"stateChanged\"),e;for(let e=0;e0&&(this.calculateRelativeSizes(),this.setAbsoluteSizes()),this.emitBaseBubblingEvent(\"stateChanged\"),this.emit(\"resize\")}setAbsoluteSizes(){const t=this.calculateAbsoluteSizes();for(let e=0;e0&&t.itemSizes[e]++,this._isColumn?(Tt(this.contentItems[e].element,t.crossAxisSize),At(this.contentItems[e].element,t.itemSizes[e])):(Tt(this.contentItems[e].element,t.itemSizes[e]),At(this.contentItems[e].element,t.crossAxisSize))}calculateAbsoluteSizes(){const t=(this.contentItems.length-1)*this._splitterSize,{width:e,height:i}=kt(this.element);let n,o;this._isColumn?(n=i-t,o=e):(n=e-t,o=i);let s=0;const r=[];for(let t=0;t0){const n=100-t;for(let t=0;t100&&e.length>0){for(let t=0;te)return;{const r=i/e;let a=i;for(let e=0;ethis.onSplitterDrag(e,t,i))),e.on(\"dragStop\",(()=>this.onSplitterDragStop(e))),e.on(\"dragStart\",(()=>this.onSplitterDragStart(e))),this._splitter.splice(t,0,e),e}getSplitItems(t){const e=this._splitter.indexOf(t);return{before:this.contentItems[e],after:this.contentItems[e+1]}}calculateContentItemMinSize(t){const e=t.minSize;if(void 0!==e){if(t.minSizeUnit===ht.Pixel)return e;throw new X(\"ROCGMD98831\",JSON.stringify(t))}{const t=this.layoutManager.layoutConfig.dimensions;return this._isColumn?t.defaultMinItemHeight:t.defaultMinItemWidth}}calculateContentItemsTotalMinSize(t){let e=0;for(const i of t)e+=this.calculateContentItemMinSize(i);return e}onSplitterDragStart(t){const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=this.calculateContentItemsTotalMinSize(e.before.contentItems),s=this.calculateContentItemsTotalMinSize(e.after.contentItems);this._splitterPosition=0,this._splitterMinPosition=-1*(i-o),this._splitterMaxPosition=n-s}onSplitterDrag(t,e,i){let n=this._isColumn?i:e;if(null===this._splitterMinPosition||null===this._splitterMaxPosition)throw new K(\"ROCOSD59226\");n=Math.max(n,this._splitterMinPosition),n=Math.min(n,this._splitterMaxPosition),this._splitterPosition=n;const o=zt(n);this._isColumn?t.element.style.top=o:t.element.style.left=o}onSplitterDragStop(t){if(null===this._splitterPosition)throw new K(\"ROCOSDS66932\");{const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=(this._splitterPosition+i)/(i+n),s=e.before.size+e.after.size;e.before.size=o*s,e.after.size=(1-o)*s,t.element.style.top=zt(0),t.element.style.left=zt(0),globalThis.requestAnimationFrame((()=>this.updateSize(!1)))}}}!function(t){t.getElementDimensionSize=function(t,e){return\"width\"===e?function(t){return t.offsetWidth}(t):function(t){return t.offsetHeight}(t)},t.setElementDimensionSize=function(t,e,i){return\"width\"===e?Tt(t,i):At(t,i)},t.createElement=function(t,e){const i=t.createElement(\"div\");return i.classList.add(\"lm_item\"),e?i.classList.add(\"lm_column\"):i.classList.add(\"lm_row\"),i}}(Xt||(Xt={}));class Yt extends $t{constructor(t,e,i){super(t,vt.create(e),null,Yt.createElement(document)),this.isGround=!0,this._childElementContainer=this.element,this._containerElement=i;let n=null;for(;;){const t=n?n.previousSibling:this._containerElement.lastChild;if(!(t instanceof Element&&t.classList.contains(\"lm_content\")))break;n=t}this._containerElement.insertBefore(this.element,n)}init(){if(!0!==this.isInitialised){this.updateNodeSize();for(let t=0;t0?this.contentItems[0]:this,n.isComponent)throw new Error(\"Cannot add item as child to ComponentItem\");{const t=this.layoutManager.createAndInitContentItem(i,n);return e=n.addChild(t,e),n===this?-1:e}}loadComponentAsRoot(t){this.clearRoot();const e=Ct.resolve(t,!1);if(e.maximised)throw new Error(\"Root Component cannot be maximised\");{const t=new jt(this.layoutManager,e,this);t.init(),this.addChild(t,0)}}addChild(t,e){if(this.contentItems.length>0)throw new Error(\"Ground node can only have a single child\");return this._childElementContainer.appendChild(t.element),e=super.addChild(t,e),this.updateSize(!1),this.emitBaseBubblingEvent(\"stateChanged\"),e}calculateConfigContent(){const t=this.contentItems,e=t.length,i=new Array(e);for(let n=0;n0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e)),this.updateContentItemsSize(!1))}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}createSideAreas(){const t=Yt.Area.oppositeSides,e=new Array(Object.keys(t).length);let i=0;for(const n in t){const o=n,s=this.getElementArea();if(null===s)throw new K(\"RCSA77553\");s.side=o,\"2\"===t[o][1]?s[o]=s[t[o]]-50:s[o]=s[t[o]]+50,s.surface=(s.x2-s.x1)*(s.y2-s.y1),e[i++]=s}return e}highlightDropZone(t,e,i){this.layoutManager.tabDropPlaceholder.remove(),super.highlightDropZone(t,e,i)}onDrop(t,e){if(t.isComponent){const e=ut.createDefault(),i=t;e.header=mt.Header.createCopy(i.headerConfig);const n=this.layoutManager.createAndInitContentItem(e,this);n.addChild(t),t=n}if(0===this.contentItems.length)this.addChild(t);else{if(t.type===at.row||t.type===at.column){const e=ut.createDefault(),i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}const i=\"x\"==e.side[0]?at.row:at.column,n=\"2\"==e.side[1],o=this.contentItems[0];if(o instanceof Xt&&o.type===i){const e=o.contentItems[n?0:o.contentItems.length-1];o.addChild(t,n?0:void 0,!0),e.size*=.5,t.size=e.size,t.sizeUnit=ht.Percent,o.updateSize(!1)}else{const e=ct.createDefault(i),s=this.layoutManager.createContentItem(e,this);this.replaceChild(o,s),s.addChild(t,n?0:void 0,!0),s.addChild(o,n?void 0:0,!0),o.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}}dock(){throw new X(\"GID87731\")}validateDocking(){throw new X(\"GIVD87732\")}getAllContentItems(){const t=[this];return this.deepGetAllContentItems(this.contentItems,t),t}getConfigMaximisedItems(){const t=[];return this.deepFilterContentItems(this.contentItems,t,(t=>!(!Gt.isStack(t)||!t.initialWantMaximise)||!(!Gt.isComponentItem(t)||!t.initialWantMaximise))),t}getItemsByPopInParentId(t){const e=[];return this.deepFilterContentItems(this.contentItems,e,(e=>e.popInParentIds.includes(t))),e}toConfig(){throw new Error(\"Cannot generate GroundItem config\")}setActiveComponentItem(t,e,i){}updateNodeSize(){const{width:t,height:e}=kt(this._containerElement);Tt(this.element,t),At(this.element,e),this.contentItems.length>0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e))}deepGetAllContentItems(t,e){for(let i=0;ithis.onClick(t),this._touchStartEventListener=t=>this.onTouchStart(t),this._element=document.createElement(\"div\"),this._element.classList.add(i),this._element.title=e,this._header.on(\"destroy\",(()=>this.destroy())),this._element.addEventListener(\"click\",this._clickEventListener,{passive:!0}),this._element.addEventListener(\"touchstart\",this._touchStartEventListener,{passive:!0}),this._header.controlsContainerElement.appendChild(this._element)}get element(){return this._element}destroy(){var t;this._element.removeEventListener(\"click\",this._clickEventListener),this._element.removeEventListener(\"touchstart\",this._touchStartEventListener),null===(t=this._element.parentNode)||void 0===t||t.removeChild(this._element)}onClick(t){this._pushEvent(t)}onTouchStart(t){this._pushEvent(t)}}class Jt{constructor(t,e,i,n,o){var s;this._layoutManager=t,this._componentItem=e,this._closeEvent=i,this._focusEvent=n,this._dragStartEvent=o,this._isActive=!1,this._tabClickListener=t=>this.onTabClickDown(t),this._tabTouchStartListener=t=>this.onTabTouchStart(t),this._closeClickListener=()=>this.onCloseClick(),this._closeTouchStartListener=()=>this.onCloseTouchStart(),this._dragStartListener=(t,e)=>this.onDragStart(t,e),this._contentItemDestroyListener=()=>this.onContentItemDestroy(),this._tabTitleChangedListener=t=>this.setTitle(t),this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_tab\"),this._titleElement=document.createElement(\"span\"),this._titleElement.classList.add(\"lm_title\"),this._closeElement=document.createElement(\"div\"),this._closeElement.classList.add(\"lm_close_tab\"),this._element.appendChild(this._titleElement),this._element.appendChild(this._closeElement),e.isClosable?this._closeElement.style.display=\"\":this._closeElement.style.display=\"none\",this.setTitle(e.title),this._componentItem.on(\"titleChanged\",this._tabTitleChangedListener);(null!==(s=e.reorderEnabled)&&void 0!==s?s:this._layoutManager.layoutConfig.settings.reorderEnabled)&&this.enableReorder(),this._element.addEventListener(\"click\",this._tabClickListener,{passive:!0}),this._element.addEventListener(\"touchstart\",this._tabTouchStartListener,{passive:!0}),this._componentItem.isClosable?(this._closeElement.addEventListener(\"click\",this._closeClickListener,{passive:!0}),this._closeElement.addEventListener(\"touchstart\",this._closeTouchStartListener,{passive:!0})):(this._closeElement.remove(),this._closeElement=void 0),this._componentItem.setTab(this),this._layoutManager.emit(\"tabCreated\",this)}get isActive(){return this._isActive}get componentItem(){return this._componentItem}get contentItem(){return this._componentItem}get element(){return this._element}get titleElement(){return this._titleElement}get closeElement(){return this._closeElement}get reorderEnabled(){return void 0!==this._dragListener}set reorderEnabled(t){t!==this.reorderEnabled&&(t?this.enableReorder():this.disableReorder())}setTitle(t){this._titleElement.innerText=t,this._element.title=t}setActive(t){t!==this._isActive&&(this._isActive=t,t?this._element.classList.add(\"lm_active\"):this._element.classList.remove(\"lm_active\"))}destroy(){var t,e;this._closeEvent=void 0,this._focusEvent=void 0,this._dragStartEvent=void 0,this._element.removeEventListener(\"click\",this._tabClickListener),this._element.removeEventListener(\"touchstart\",this._tabTouchStartListener),null===(t=this._closeElement)||void 0===t||t.removeEventListener(\"click\",this._closeClickListener),null===(e=this._closeElement)||void 0===e||e.removeEventListener(\"touchstart\",this._closeTouchStartListener),this._componentItem.off(\"titleChanged\",this._tabTitleChangedListener),this.reorderEnabled&&this.disableReorder(),this._element.remove()}setBlurred(){this._element.classList.remove(\"lm_focused\"),this._titleElement.classList.remove(\"lm_focused\")}setFocused(){this._element.classList.add(\"lm_focused\"),this._titleElement.classList.add(\"lm_focused\")}onDragStart(t,e){if(void 0===this._dragListener)throw new J(\"TODSDLU10093\");if(void 0===this._dragStartEvent)throw new J(\"TODS23309\");this._dragStartEvent(t,e,this._dragListener,this.componentItem)}onContentItemDestroy(){void 0!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=void 0)}onTabClickDown(t){const e=t.target;e!==this._element&&e!==this._titleElement||(0===t.button?this.notifyFocus():1===t.button&&this._componentItem.isClosable&&this.notifyClose())}onTabTouchStart(t){t.target===this._element&&this.notifyFocus()}onCloseClick(){this.notifyClose()}onCloseTouchStart(){this.notifyClose()}notifyClose(){if(void 0===this._closeEvent)throw new J(\"TNC15007\");this._closeEvent(this._componentItem)}notifyFocus(){if(void 0===this._focusEvent)throw new J(\"TNA15007\");this._focusEvent(this._componentItem)}enableReorder(){this._dragListener=new Zt(this._element,[this._titleElement]),this._dragListener.on(\"dragStart\",this._dragStartListener),this._componentItem.on(\"destroy\",this._contentItemDestroyListener)}disableReorder(){if(void 0===this._dragListener)throw new J(\"TDR87745\");this._componentItem.off(\"destroy\",this._contentItemDestroyListener),this._dragListener.off(\"dragStart\",this._dragStartListener),this._dragListener=void 0}}class Qt{constructor(t,e,i,n,o){this._layoutManager=t,this._componentRemoveEvent=e,this._componentFocusEvent=i,this._componentDragStartEvent=n,this._dropdownActiveChangedEvent=o,this._tabs=[],this._lastVisibleTabIndex=-1,this._dropdownActive=!1,this._element=document.createElement(\"section\"),this._element.classList.add(\"lm_tabs\"),this._dropdownElement=document.createElement(\"section\"),this._dropdownElement.classList.add(\"lm_tabdropdown_list\"),this._dropdownElement.style.display=\"none\"}get tabs(){return this._tabs}get tabCount(){return this._tabs.length}get lastVisibleTabIndex(){return this._lastVisibleTabIndex}get element(){return this._element}get dropdownElement(){return this._dropdownElement}get dropdownActive(){return this._dropdownActive}destroy(){for(let t=0;tthis.handleTabCloseEvent(t)),(t=>this.handleTabFocusEvent(t)),((t,e,i,n)=>this.handleTabDragStartEvent(t,e,i,n)));void 0===e&&(e=this._tabs.length),this._tabs.splice(e,0,i),ethis._lastVisibleTabIndex){const t=this._tabs[e];for(let t=e;t>0;t--)this._tabs[t]=this._tabs[t-1];this._tabs[0]=t}}updateTabSizes(t,e){let i=!1;this.tryUpdateTabSizes(i,t,e)||(i=!0,this.tryUpdateTabSizes(i,t,e)),i!==this._dropdownActive&&(this._dropdownActive=i,this._dropdownActiveChangedEvent())}tryUpdateTabSizes(t,e,i){if(this._tabs.length>0){if(void 0===i)throw new Error(\"non-empty tabs must have active component item\");let n=0,o=!1;const s=this._layoutManager.layoutConfig.settings.tabOverlapAllowance,r=this._tabs.indexOf(i.tab),a=this._tabs[r];this._lastVisibleTabIndex=-1;for(let i=0;ie){if(o)i===r&&(l.style.zIndex=\"auto\",l.style.marginLeft=\"\",l.parentElement!==this._element&&this._element.appendChild(l));else{let t;if(t=r>0&&r<=i?(d-e)/(i-1):(d-e)/i,tthis.onClick(t),this._touchStartListener=t=>this.onTouchStart(t),this._rowColumnClosable=!0,this._closeButton=null,this._popoutButton=null,this._tabsContainer=new Qt(this._layoutManager,(t=>this.handleTabInitiatedComponentRemoveEvent(t)),(t=>this.handleTabInitiatedComponentFocusEvent(t)),((t,e,i,n)=>this.handleTabInitiatedDragStartEvent(t,e,i,n)),(()=>this.processTabDropdownActiveChanged())),this._show=i.show,this._popoutEnabled=i.popoutEnabled,this._popoutLabel=i.popoutLabel,this._maximiseEnabled=i.maximiseEnabled,this._maximiseLabel=i.maximiseLabel,this._minimiseEnabled=i.minimiseEnabled,this._minimiseLabel=i.minimiseLabel,this._closeEnabled=i.closeEnabled,this._closeLabel=i.closeLabel,this._tabDropdownEnabled=i.tabDropdownEnabled,this._tabDropdownLabel=i.tabDropdownLabel,this.setSide(i.side),this._canRemoveComponent=this._configClosable,this._element=document.createElement(\"section\"),this._element.classList.add(\"lm_header\"),this._controlsContainerElement=document.createElement(\"section\"),this._controlsContainerElement.classList.add(\"lm_controls\"),this._element.appendChild(this._tabsContainer.element),this._element.appendChild(this._controlsContainerElement),this._element.appendChild(this._tabsContainer.dropdownElement),this._element.addEventListener(\"click\",this._clickListener,{passive:!0}),this._element.addEventListener(\"touchstart\",this._touchStartListener,{passive:!0}),this._documentMouseUpListener=()=>this._tabsContainer.hideAdditionalTabsDropdown(),globalThis.document.addEventListener(\"mouseup\",this._documentMouseUpListener,{passive:!0}),this._tabControlOffset=this._layoutManager.layoutConfig.settings.tabControlOffset,this._tabDropdownEnabled&&(this._tabDropdownButton=new Kt(this,this._tabDropdownLabel,\"lm_tabdropdown\",(()=>this._tabsContainer.showAdditionalTabsDropdown()))),this._popoutEnabled&&(this._popoutButton=new Kt(this,this._popoutLabel,\"lm_popout\",(()=>this.handleButtonPopoutEvent()))),this._maximiseEnabled&&(this._maximiseButton=new Kt(this,this._maximiseLabel,\"lm_maximise\",(t=>this.handleButtonMaximiseToggleEvent(t)))),this._configClosable&&(this._closeButton=new Kt(this,this._closeLabel,\"lm_close\",(()=>s()))),this.processTabDropdownActiveChanged()}get show(){return this._show}get side(){return this._side}get leftRightSided(){return this._leftRightSided}get layoutManager(){return this._layoutManager}get parent(){return this._parent}get tabs(){return this._tabsContainer.tabs}get lastVisibleTabIndex(){return this._tabsContainer.lastVisibleTabIndex}get element(){return this._element}get tabsContainerElement(){return this._tabsContainer.element}get controlsContainerElement(){return this._controlsContainerElement}destroy(){this.emit(\"destroy\"),this._popoutEvent=void 0,this._maximiseToggleEvent=void 0,this._clickEvent=void 0,this._touchStartEvent=void 0,this._componentRemoveEvent=void 0,this._componentFocusEvent=void 0,this._componentDragStartEvent=void 0,this._tabsContainer.destroy(),globalThis.document.removeEventListener(\"mouseup\",this._documentMouseUpListener),this._element.remove()}createTab(t,e){this._tabsContainer.createTab(t,e)}removeTab(t){this._tabsContainer.removeTab(t)}processActiveComponentChanged(t){this._tabsContainer.processActiveComponentChanged(t),this.updateTabSizes()}setSide(t){this._side=t,this._leftRightSided=[nt.right,nt.left].includes(this._side)}setRowColumnClosable(t){this._rowColumnClosable=t,this.updateClosability()}updateClosability(){let t;if(this._configClosable)if(this._rowColumnClosable){t=!0;const e=this.tabs.length;for(let i=0;i1}applyFocusedValue(t){t?this._element.classList.add(\"lm_focused\"):this._element.classList.remove(\"lm_focused\")}processMaximised(){if(void 0===this._maximiseButton)throw new J(\"HPMAX16997\");this._maximiseButton.element.setAttribute(\"title\",this._minimiseLabel)}processMinimised(){if(void 0===this._maximiseButton)throw new J(\"HPMIN16997\");this._maximiseButton.element.setAttribute(\"title\",this._maximiseLabel)}updateTabSizes(){if(this._tabsContainer.tabCount>0){const t=this._show?this._layoutManager.layoutConfig.dimensions.headerHeight:0;let e;this._leftRightSided?(this._element.style.height=\"\",this._element.style.width=zt(t)):(this._element.style.width=\"\",this._element.style.height=zt(t)),e=this._leftRightSided?this._element.offsetHeight-this._controlsContainerElement.offsetHeight-this._tabControlOffset:this._element.offsetWidth-this._controlsContainerElement.offsetWidth-this._tabControlOffset,this._tabsContainer.updateTabSizes(e,this._getActiveComponentItemEvent())}}handleTabInitiatedComponentRemoveEvent(t){if(this._canRemoveComponent){if(void 0===this._componentRemoveEvent)throw new J(\"HHTCE22294\");this._componentRemoveEvent(t)}}handleTabInitiatedComponentFocusEvent(t){if(void 0===this._componentFocusEvent)throw new J(\"HHTAE22294\");this._componentFocusEvent(t)}handleTabInitiatedDragStartEvent(t,e,i,n){if(this._canRemoveComponent){if(void 0===this._componentDragStartEvent)throw new J(\"HHTDSE22294\");this._componentDragStartEvent(t,e,i,n)}else i.cancelDrag()}processTabDropdownActiveChanged(){void 0!==this._tabDropdownButton&&Dt(this._tabDropdownButton.element,this._tabsContainer.dropdownActive)}handleButtonPopoutEvent(){if(this._layoutManager.layoutConfig.settings.popoutWholeStack){if(void 0===this._popoutEvent)throw new J(\"HHBPOE17834\");this._popoutEvent()}else{const t=this._getActiveComponentItemEvent();t&&t.popout()}}handleButtonMaximiseToggleEvent(t){if(void 0===this._maximiseToggleEvent)throw new J(\"HHBMTE16834\");this._maximiseToggleEvent()}onClick(t){t.target===this._element&&this.notifyClick(t)}onTouchStart(t){t.target===this._element&&this.notifyTouchStart(t)}notifyClick(t){if(void 0===this._clickEvent)throw new J(\"HNHC46834\");this._clickEvent(t)}notifyTouchStart(t){if(void 0===this._touchStartEvent)throw new J(\"HNHTS46834\");this._touchStartEvent(t)}}class ee extends $t{constructor(t,e,i){var n,o,s,r,a,l,h,d,c,m,u,p,g,f,v,_,y,C,w;super(t,e,i,ee.createElement(document)),this._headerSideChanged=!1,this._resizeListener=()=>this.handleResize(),this._maximisedListener=()=>this.handleMaximised(),this._minimisedListener=()=>this.handleMinimised(),this._headerConfig=e.header;const I=t.layoutConfig.header,b=e.content;let S;if(1!==b.length)S=void 0;else{S=b[0].header}this._initialWantMaximise=e.maximised,this._initialActiveItemIndex=null!==(n=e.activeItemIndex)&&void 0!==n?n:0;const E=null!==(r=null!==(s=null===(o=this._headerConfig)||void 0===o?void 0:o.show)&&void 0!==s?s:null==S?void 0:S.show)&&void 0!==r?r:I.show,x=null!==(h=null!==(l=null===(a=this._headerConfig)||void 0===a?void 0:a.popout)&&void 0!==l?l:null==S?void 0:S.popout)&&void 0!==h?h:I.popout,L=null!==(m=null!==(c=null===(d=this._headerConfig)||void 0===d?void 0:d.maximise)&&void 0!==c?c:null==S?void 0:S.maximise)&&void 0!==m?m:I.maximise,z=null!==(g=null!==(p=null===(u=this._headerConfig)||void 0===u?void 0:u.close)&&void 0!==p?p:null==S?void 0:S.close)&&void 0!==g?g:I.close,M=null!==(_=null!==(v=null===(f=this._headerConfig)||void 0===f?void 0:f.minimise)&&void 0!==v?v:null==S?void 0:S.minimise)&&void 0!==_?_:I.minimise,P=null!==(w=null!==(C=null===(y=this._headerConfig)||void 0===y?void 0:y.tabDropdown)&&void 0!==C?C:null==S?void 0:S.tabDropdown)&&void 0!==w?w:I.tabDropdown;this._maximisedEnabled=!1!==L;const T={show:!1!==E,side:!1===E?nt.top:E,popoutEnabled:!1!==x,popoutLabel:!1===x?\"\":x,maximiseEnabled:this._maximisedEnabled,maximiseLabel:!1===L?\"\":L,closeEnabled:!1!==z,closeLabel:!1===z?\"\":z,minimiseEnabled:!0,minimiseLabel:M,tabDropdownEnabled:!1!==P,tabDropdownLabel:!1===P?\"\":P};this._header=new te(t,this,T,e.isClosable&&!1!==z,(()=>this.getActiveComponentItem()),(()=>this.remove()),(()=>this.handlePopoutEvent()),(()=>this.toggleMaximise()),(t=>this.handleHeaderClickEvent(t)),(t=>this.handleHeaderTouchStartEvent(t)),(t=>this.handleHeaderComponentRemoveEvent(t)),(t=>this.handleHeaderComponentFocusEvent(t)),((t,e,i,n)=>this.handleHeaderComponentStartDragEvent(t,e,i,n))),this.isStack=!0,this._childElementContainer=document.createElement(\"section\"),this._childElementContainer.classList.add(\"lm_items\"),this.on(\"resize\",this._resizeListener),this._maximisedEnabled&&(this.on(\"maximised\",this._maximisedListener),this.on(\"minimised\",this._minimisedListener)),this.element.appendChild(this._header.element),this.element.appendChild(this._childElementContainer),this.setupHeaderPosition(),this._header.updateClosability()}get childElementContainer(){return this._childElementContainer}get header(){return this._header}get headerShow(){return this._header.show}get headerSide(){return this._header.side}get headerLeftRightSided(){return this._header.leftRightSided}get contentAreaDimensions(){return this._contentAreaDimensions}get initialWantMaximise(){return this._initialWantMaximise}get isMaximised(){return this===this.layoutManager.maximisedStack}get stackParent(){if(!this.parent)throw new Error(\"Stack should always have a parent\");return this.parent}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}init(){if(!0===this.isInitialised)return;this.updateNodeSize();for(let t=0;t0){if(this._initialActiveItemIndex<0||this._initialActiveItemIndex>=e)throw new Error(`ActiveItemIndex out of range: ${this._initialActiveItemIndex} id: ${this.id}`);for(let i=0;ithis.contentItems.length)throw e-=1,new X(\"SAC99728\");if(t instanceof jt)return e=super.addChild(t,e),this._childElementContainer.appendChild(t.element),this._header.createTab(t,e),this.setActiveComponentItem(t,i),this._header.updateTabSizes(),this.updateSize(!1),t.container.setBaseLogicalZIndex(),this._header.updateClosability(),this.emitStateChangedEvent(),e;throw new X(\"SACC88532\")}removeChild(t,e){const i=t,n=this.contentItems.indexOf(i),o=1===this.contentItems.length;if(this._activeComponentItem===i&&(i.focused&&i.blur(),!o)){const t=0===n?1:n-1;this.setActiveComponentItem(this.contentItems[t],!1)}this._header.removeTab(i),super.removeChild(i,e),o||this._header.updateClosability(),this.emitStateChangedEvent()}toggleMaximise(){this.isMaximised?this.minimise():this.maximise()}maximise(){if(!this.isMaximised){this.layoutManager.setMaximisedStack(this);const t=this.contentItems,e=t.length;for(let i=0;i0&&void 0===t)throw new Error(\"expected non-empty stack to have an active component item\");return{type:\"stack\",content:this.calculateConfigContent(),size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,isClosable:this.isClosable,maximised:this.isMaximised,header:this.createHeaderConfig(),activeItemIndex:t}}onDrop(t,e){if(\"header\"===this._dropSegment){if(this.resetHeaderDropZone(),void 0===this._dropIndex)throw new J(\"SODDI68990\");return void this.addChild(t,this._dropIndex)}if(\"body\"===this._dropSegment)return void this.addChild(t,0,!0);const i=\"top\"===this._dropSegment||\"bottom\"===this._dropSegment,n=\"left\"===this._dropSegment||\"right\"===this._dropSegment,o=\"top\"===this._dropSegment||\"left\"===this._dropSegment,s=i&&this.stackParent.isColumn||n&&this.stackParent.isRow;if(t.isComponent){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createAndInitContentItem(e,this);i.addChild(t),t=i}if(t.type===at.row||t.type===at.column){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}if(s){const e=this.stackParent.contentItems.indexOf(this);this.stackParent.addChild(t,o?e:e+1,!0),this.size*=.5,t.size=this.size,t.sizeUnit=this.sizeUnit,this.stackParent.updateSize(!1)}else{const e=i?at.column:at.row,n=ct.createDefault(e),s=this.layoutManager.createContentItem(n,this);this.stackParent.replaceChild(this,s),s.addChild(t,o?0:void 0,!0),s.addChild(this,o?void 0:0,!0),this.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}highlightDropZone(t,e){for(const i in this._contentAreaDimensions){const n=i,o=this._contentAreaDimensions[n].hoverArea;if(o.x1t&&o.y1e)return void(\"header\"===n?(this._dropSegment=\"header\",this.highlightHeaderDropZone(this._header.leftRightSided?e:t)):(this.resetHeaderDropZone(),this.highlightBodyDropZone(n)))}}getArea(){if(\"none\"===this.element.style.display)return null;const t=super.getElementArea(this._header.element),e=super.getElementArea(this._childElementContainer);if(null===t||null===e)throw new K(\"SGAHC13086\");const i=e.x2-e.x1,n=e.y2-e.y1;return this._contentAreaDimensions={header:{hoverArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2},highlightArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2}}},0===this.contentItems.length?(this._contentAreaDimensions.body={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2}},super.getElementArea(this.element)):(this._contentAreaDimensions.left={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x1+.25*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x1+.5*i,y2:e.y2}},this._contentAreaDimensions.top={hoverArea:{x1:e.x1+.25*i,y1:e.y1,x2:e.x1+.75*i,y2:e.y1+.5*n},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y1+.5*n}},this._contentAreaDimensions.right={hoverArea:{x1:e.x1+.75*i,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1+.5*i,y1:e.y1,x2:e.x2,y2:e.y2}},this._contentAreaDimensions.bottom={hoverArea:{x1:e.x1+.25*i,y1:e.y1+.5*n,x2:e.x1+.75*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1+.5*n,x2:e.x2,y2:e.y2}},super.getElementArea(this.element))}positionHeader(t){this._header.side!==t&&(this._header.setSide(t),this._headerSideChanged=!0,this.setupHeaderPosition())}updateNodeSize(){if(\"none\"!==this.element.style.display){const t=kt(this.element);if(this._header.show){t[this._header.leftRightSided?it.width:it.height]-=this.layoutManager.layoutConfig.dimensions.headerHeight}this._childElementContainer.style.width=zt(t.width),this._childElementContainer.style.height=zt(t.height);for(let e=0;e=o&&tthis.onDrag(t,e,i))),this._dragListener.on(\"dragStop\",(()=>this.onDrop())),this.createDragProxyElements(t,e),null===this._componentItem.parent)throw new K(\"DPC10097\");this._componentItemFocused=this._componentItem.focused,this._componentItemFocused&&this._componentItem.blur(),this._componentItem.parent.removeChild(this._componentItem,!0),this.setDimensions(),document.body.appendChild(this._element),this.determineMinMaxXY(),this._layoutManager.calculateItemAreas(),this.setDropPosition(t,e)}get element(){return this._element}createDragProxyElements(t,e){this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_dragProxy\");const i=document.createElement(\"div\");i.classList.add(\"lm_header\");const n=document.createElement(\"div\");n.classList.add(\"lm_tabs\");const o=document.createElement(\"div\");o.classList.add(\"lm_tab\");const s=document.createElement(\"span\");s.classList.add(\"lm_title\"),o.appendChild(s),n.appendChild(o),i.appendChild(n),this._proxyContainerElement=document.createElement(\"div\"),this._proxyContainerElement.classList.add(\"lm_content\"),this._element.appendChild(i),this._element.appendChild(this._proxyContainerElement),this._originalParent instanceof ee&&this._originalParent.headerShow&&(this._sided=this._originalParent.headerLeftRightSided,this._element.classList.add(\"lm_\"+this._originalParent.headerSide),[nt.right,nt.bottom].indexOf(this._originalParent.headerSide)>=0&&this._proxyContainerElement.insertAdjacentElement(\"afterend\",i)),this._element.style.left=zt(t),this._element.style.top=zt(e),o.setAttribute(\"title\",this._componentItem.title),s.insertAdjacentText(\"afterbegin\",this._componentItem.title),this._proxyContainerElement.appendChild(this._componentItem.element)}determineMinMaxXY(){const t=this._layoutManager.groundItem;if(void 0===t)throw new J(\"DPDMMXY73109\");{const e=t.element.getBoundingClientRect();this._minX=e.left+document.body.scrollLeft,this._minY=e.top+document.body.scrollTop,this._maxX=this._minX+e.width,this._maxY=this._minY+e.height}}onDrag(t,e,i){const n=i.pageX,o=i.pageY;this.setDropPosition(n,o),this._componentItem.drag()}setDropPosition(t,e){this._layoutManager.layoutConfig.settings.constrainDragToContainer&&(t<=this._minX?t=Math.ceil(this._minX):t>=this._maxX&&(t=Math.floor(this._maxX)),e<=this._minY?e=Math.ceil(this._minY):e>=this._maxY&&(e=Math.floor(this._maxY))),this._element.style.left=zt(t),this._element.style.top=zt(e),this._area=this._layoutManager.getArea(t,e),null!==this._area&&(this._lastValidArea=this._area,this._area.contentItem.highlightDropZone(t,e,this._area))}onDrop(){const t=this._layoutManager.dropTargetIndicator;if(null===t)throw new K(\"DPOD30011\");let e;if(t.hide(),this._componentItem.exitDragMode(),null!==this._area)e=this._componentItem,this._area.contentItem.onDrop(e,this._area);else if(null!==this._lastValidArea){e=this._componentItem;this._lastValidArea.contentItem.onDrop(e,this._lastValidArea)}else this._originalParent?(e=this._componentItem,this._originalParent.addChild(e)):this._componentItem.destroy();this._element.remove(),this._layoutManager.emit(\"itemDropped\",this._componentItem),this._componentItemFocused&&void 0!==e&&e.focus()}setDimensions(){const t=this._layoutManager.layoutConfig.dimensions;if(void 0===t)throw new Error(\"DragProxy.setDimensions: dimensions undefined\");let e=t.dragProxyWidth,i=t.dragProxyHeight;if(void 0===e||void 0===i)throw new Error(\"DragProxy.setDimensions: width and/or height undefined\");const n=!1===this._layoutManager.layoutConfig.header.show?0:t.headerHeight;this._element.style.width=zt(e),this._element.style.height=zt(i),e-=this._sided?n:0,i-=this._sided?0:n,this._proxyContainerElement.style.width=zt(e),this._proxyContainerElement.style.height=zt(i),this._componentItem.enterDragMode(e,i),this._componentItem.show()}}class ne{constructor(t,e,i,n,o,s,r){this._layoutManager=t,this._element=e,this._extraAllowableChildTargets=i,this._componentTypeOrFtn=n,this._componentState=o,this._title=s,this._id=r,this._dragListener=null,this._dummyGroundContainer=document.createElement(\"div\");const a=gt.createDefault(\"row\");this._dummyGroundContentItem=new Yt(this._layoutManager,a,this._dummyGroundContainer),this.createDragListener()}destroy(){this.removeDragListener()}createDragListener(){this.removeDragListener(),this._dragListener=new Zt(this._element,this._extraAllowableChildTargets),this._dragListener.on(\"dragStart\",((t,e)=>this.onDragStart(t,e))),this._dragListener.on(\"dragStop\",(()=>this.onDragStop()))}onDragStart(t,e){var i;const n=\"component\";let o;if(\"function\"==typeof this._componentTypeOrFtn){const t=this._componentTypeOrFtn();o=ne.isDragSourceComponentItemConfig(t)?{type:n,componentState:t.state,componentType:t.type,title:null!==(i=t.title)&&void 0!==i?i:this._title}:t}else o={type:n,componentState:this._componentState,componentType:this._componentTypeOrFtn,title:this._title,id:this._id};const s=bt.resolve(o,!1),r=new jt(this._layoutManager,s,this._dummyGroundContentItem);if(this._dummyGroundContentItem.contentItems.push(r),null===this._dragListener)throw new K(\"DSODSD66746\");{const i=new ie(t,e,this._dragListener,this._layoutManager,r,this._dummyGroundContentItem),n=this._layoutManager.transitionIndicator;if(null===n)throw new K(\"DSODST66746\");n.transitionElements(this._element,i.element)}}onDragStop(){this.createDragListener()}removeDragListener(){null!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=null)}}!function(t){t.isDragSourceComponentItemConfig=function(t){return!(\"componentType\"in t)}}(ne||(ne={}));class oe{constructor(){this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_dropTargetIndicator\");const t=document.createElement(\"div\");t.classList.add(\"lm_inner\"),this._element.appendChild(t),document.body.appendChild(this._element)}destroy(){this._element.remove()}highlightArea(t,e){this._element.style.left=zt(t.x1+e),this._element.style.top=zt(t.y1+e),this._element.style.width=zt(t.x2-t.x1-e),this._element.style.height=zt(t.y2-t.y1-e),this._element.style.display=\"block\"}hide(){Dt(this._element,!1)}}class se{constructor(){this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_transition_indicator\"),document.body.appendChild(this._element),this._toElement=null,this._fromDimensions=null,this._totalAnimationDuration=200,this._animationStartTime=null}destroy(){this._element.remove()}transitionElements(t,e){}nextAnimationFrame(){}measure(t){const e=t.getBoundingClientRect();return{left:e.left,top:e.top,width:t.offsetWidth,height:t.offsetHeight}}}class re extends Wt{constructor(t){super(),this._layoutManager=t,this._childEventListener=t=>this.onEventFromChild(t),globalThis.addEventListener(re.ChildEventName,this._childEventListener,{passive:!0})}emit(t,...e){\"userBroadcast\"===t?this.emitUserBroadcast(...e):super.emit(t,...e)}emitUserBroadcast(...t){this.handleUserBroadcastEvent(\"userBroadcast\",t)}destroy(){globalThis.removeEventListener(re.ChildEventName,this._childEventListener)}handleUserBroadcastEvent(t,e){this._layoutManager.isSubWindow?this.propagateToParent(t,e):this.propagateToThisAndSubtree(t,e)}onEventFromChild(t){const e=t.detail;this.handleUserBroadcastEvent(e.eventName,e.args)}propagateToParent(t,e){const i={bubbles:!0,cancelable:!0,detail:{layoutManager:this._layoutManager,eventName:t,args:e}},n=new CustomEvent(re.ChildEventName,i),o=globalThis.opener;if(null===o)throw new K(\"EHPTP15778\");o.dispatchEvent(n)}propagateToThisAndSubtree(t,e){this.emitUnknown(t,...e);for(let i=0;ithis.handleContainerResize())),this._windowBeforeUnloadListener=()=>this.onBeforeUnload(),this._windowBeforeUnloadListening=!1,this._maximisedStackBeforeDestroyedListener=t=>this.cleanupBeforeMaximisedStackDestroyed(t),this.isSubWindow=t.isSubWindow,this._constructorOrSubWindowLayoutConfig=t.constructorOrSubWindowLayoutConfig,Q.checkInitialise(),dt.checkInitialise(),void 0!==t.containerElement&&(this._containerElement=t.containerElement)}get container(){return this._containerElement}get isInitialised(){return this._isInitialised}get groundItem(){return this._groundItem}get root(){return this._groundItem}get openPopouts(){return this._openPopouts}get dropTargetIndicator(){return this._dropTargetIndicator}get transitionIndicator(){return this._transitionIndicator}get width(){return this._width}get height(){return this._height}get eventHub(){return this._eventHub}get rootItem(){if(void 0===this._groundItem)throw new Error(\"Cannot access rootItem before init\");return 0===this._groundItem.contentItems.length?void 0:this._groundItem.contentItems[0]}get focusedComponentItem(){return this._focusedComponentItem}get tabDropPlaceholder(){return this._tabDropPlaceholder}get maximisedStack(){return this._maximisedStack}get deprecatedConstructor(){return!this.isSubWindow&&void 0!==this._constructorOrSubWindowLayoutConfig}destroy(){if(this._isInitialised){this._windowBeforeUnloadListening&&(globalThis.removeEventListener(\"beforeunload\",this._windowBeforeUnloadListener),this._windowBeforeUnloadListening=!1),!0===this.layoutConfig.settings.closePopoutsOnUnload&&this.closeAllOpenPopouts(),this._resizeObserver.disconnect(),this.checkClearResizeTimeout(),void 0!==this._groundItem&&this._groundItem.destroy(),this._tabDropPlaceholder.remove(),null!==this._dropTargetIndicator&&this._dropTargetIndicator.destroy(),null!==this._transitionIndicator&&this._transitionIndicator.destroy(),this._eventHub.destroy();for(const t of this._dragSources)t.destroy();this._dragSources=[],this._isInitialised=!1}}minifyConfig(t){return _t.minifyConfig(t)}unminifyConfig(t){return _t.unminifyConfig(t)}init(){let t;if(this.setContainer(),this._dropTargetIndicator=new oe,this._transitionIndicator=new se,this.updateSizeFromContainer(),this.isSubWindow){if(void 0===this._constructorOrSubWindowLayoutConfig)throw new J(\"LMIU07155\");{const e=this._constructorOrSubWindowLayoutConfig.root;if(void 0===e)throw new X(\"LMIC07156\");if(!Ct.isComponent(e))throw new X(\"LMIC07157\");t=e;const i=xt.resolve(this._constructorOrSubWindowLayoutConfig);this.layoutConfig=Object.assign(Object.assign({},i),{root:void 0})}}else void 0===this._constructorOrSubWindowLayoutConfig?this.layoutConfig=_t.createDefault():this.layoutConfig=xt.resolve(this._constructorOrSubWindowLayoutConfig);const e=this.layoutConfig;this._groundItem=new Yt(this,e.root,this._containerElement),this._groundItem.init(),this.checkLoadedLayoutMaximiseItem(),this._resizeObserver.observe(this._containerElement),this._isInitialised=!0,this.adjustColumnsResponsive(),this.emit(\"initialised\"),void 0!==t&&this.loadComponentAsRoot(t)}loadLayout(t){if(!this.isInitialised)throw new Error(\"GoldenLayout: Need to call init() if LayoutConfig with defined root passed to constructor\");if(void 0===this._groundItem)throw new J(\"LMLL11119\");this.createSubWindows(),this.layoutConfig=xt.resolve(t),this._groundItem.loadRoot(this.layoutConfig.root),this.checkLoadedLayoutMaximiseItem(),this.adjustColumnsResponsive()}saveLayout(){if(!1===this._isInitialised)throw new Error(\"Can't create config, layout not yet initialised\");if(void 0===this._groundItem)throw new J(\"LMTC18244\");{const t=this._groundItem.calculateConfigContent();let e;e=1!==t.length?void 0:t[0],this.reconcilePopoutWindows();const i=[];for(let t=0;t=0?n=this._groundItem.contentItems[0]:e=0;break;case at.row:case at.column:e=n.addItem(t,i.index);break;case at.stack:if(Ct.isComponent(t)){e=n.addItem(t,i.index);break}throw Error(tt[6]);case at.component:throw new X(\"LMAIALC87444602\");default:throw new Y(\"LMAIALU98881733\",n.type)}if(Ct.isComponent(t)){const t=n.contentItems[e];Gt.isStack(t)&&(n=t,e=0)}return i.parentItem=n,i.index=e,i}}}loadComponentAsRoot(t){if(void 0===this._groundItem)throw new Error(\"Cannot add item before init\");this._groundItem.loadComponentAsRoot(t)}updateSize(t,e){this.setSize(t,e)}setSize(t,e){if(this._width=t,this._height=e,!0===this._isInitialised){if(void 0===this._groundItem)throw new J(\"LMUS18881\");if(this._groundItem.setSize(this._width,this._height),this._maximisedStack){const{width:t,height:e}=kt(this._containerElement);Tt(this._maximisedStack.element,t),At(this._maximisedStack.element,e),this._maximisedStack.updateSize(!1)}this.adjustColumnsResponsive()}}beginSizeInvalidation(){this._sizeInvalidationBeginCount++}endSizeInvalidation(){0==--this._sizeInvalidationBeginCount&&this.updateSizeFromContainer()}updateSizeFromContainer(){const{width:t,height:e}=kt(this._containerElement);this.setSize(t,e)}updateRootSize(t=!1){if(void 0===this._groundItem)throw new J(\"LMURS28881\");this._groundItem.updateSize(t)}createAndInitContentItem(t,e){const i=this.createContentItem(t,e);return i.init(),i}createContentItem(t,e){if(\"string\"!=typeof t.type)throw new G(\"Missing parameter 'type'\",JSON.stringify(t));if(ct.isComponentItem(t)&&!(e instanceof ee)&&e&&!(!0===this.isSubWindow&&e instanceof Yt)){t={type:at.stack,content:[t],size:t.size,sizeUnit:t.sizeUnit,minSize:t.minSize,minSizeUnit:t.minSizeUnit,id:t.id,maximised:t.maximised,isClosable:t.isClosable,activeItemIndex:0,header:void 0}}return this.createContentItemFromConfig(t,e)}findFirstComponentItemById(t){if(void 0===this._groundItem)throw new J(\"LMFFCIBI82446\");return this.findFirstContentItemTypeByIdRecursive(at.component,t,this._groundItem)}createPopout(t,e,i,n){return t instanceof Gt?this.createPopoutFromContentItem(t,e,i,n):this.createPopoutFromItemConfig(t,e,i,n)}createPopoutFromContentItem(t,e,i,n){let o=t.parent,s=t;for(;null!==o&&1===o.contentItems.length&&!o.isGround;)s=o,o=o.parent;if(null===o)throw new K(\"LMCPFCI00834\");{if(void 0===n&&(n=o.contentItems.indexOf(s)),null!==i&&o.addPopInParentId(i),void 0===e){const i=globalThis.screenX||globalThis.screenLeft,n=globalThis.screenY||globalThis.screenTop,o=t.element.offsetLeft,s=t.element.offsetTop,{width:r,height:a}=kt(t.element);e={left:i+o,top:n+s,width:r,height:a}}const r=t.toConfig();if(t.remove(),ft.isRootItemConfig(r))return this.createPopoutFromItemConfig(r,e,i,n);throw new Error(`${tt[0]}`)}}beginVirtualSizedContainerAdding(){0==++this._virtualSizedContainerAddingBeginCount&&(this._virtualSizedContainers.length=0)}addVirtualSizedContainer(t){this._virtualSizedContainers.push(t)}endVirtualSizedContainerAdding(){if(0==--this._virtualSizedContainerAddingBeginCount){const t=this._virtualSizedContainers.length;if(t>0){this.fireBeforeVirtualRectingEvent(t);for(let e=0;ethis.emit(\"windowOpened\",a))),a.on(\"closed\",(()=>this.reconcilePopoutWindows())),this._openPopouts.push(a),this.layoutConfig.settings.closePopoutsOnUnload&&!this._windowBeforeUnloadListening&&(globalThis.addEventListener(\"beforeunload\",this._windowBeforeUnloadListener,{passive:!0}),this._windowBeforeUnloadListening=!0),a}closeAllOpenPopouts(){for(let t=0;tglobalThis.close()),1)}getArea(t,e){let i=null,n=1/0;for(let o=0;o=s.x1&&t=s.y1&&es.surface&&(n=s.surface,i=s)}return i}calculateItemAreas(){const t=this.getAllContentItems(),e=this._groundItem;if(void 0===e)throw new J(\"LMCIAR44365\");if(1!==t.length){e.contentItems[0].isStack?this._itemAreas=[]:this._itemAreas=e.createSideAreas();for(let e=0;e0){let e=t[0];if(Gt.isComponentItem(e)){const t=e.parent;if(null===t)throw new K(\"LMXLLMI69999\");e=t}if(!Gt.isStack(e))throw new X(\"LMCLLMI19993\");e.maximise()}}}processMaximiseStack(t){if(this._maximisedStack=t,t.on(\"beforeItemDestroyed\",this._maximisedStackBeforeDestroyedListener),t.element.classList.add(\"lm_maximised\"),t.element.insertAdjacentElement(\"afterend\",this._maximisePlaceholder),void 0===this._groundItem)throw new J(\"LMMXI19993\");{this._groundItem.element.prepend(t.element);const{width:e,height:i}=kt(this._containerElement);Tt(t.element,e),At(t.element,i),t.updateSize(!0),t.focusActiveContentItem(),this._maximisedStack.emit(\"maximised\"),this.emit(\"stateChanged\")}}processMinimiseMaximisedStack(){if(void 0===this._maximisedStack)throw new X(\"LMMMS74422\");{const t=this._maximisedStack;if(null===t.parent)throw new K(\"LMMI13668\");t.element.classList.remove(\"lm_maximised\"),this._maximisePlaceholder.insertAdjacentElement(\"afterend\",t.element),this._maximisePlaceholder.remove(),this.updateRootSize(!0),this._maximisedStack=void 0,t.off(\"beforeItemDestroyed\",this._maximisedStackBeforeDestroyedListener),t.emit(\"minimised\"),this.emit(\"stateChanged\")}}reconcilePopoutWindows(){const t=[];for(let e=0;e{this._resizeTimeoutId=void 0,this.beginSizeInvalidation(),this.endSizeInvalidation()}),this.resizeDebounceInterval))}checkClearResizeTimeout(){void 0!==this._resizeTimeoutId&&(clearTimeout(this._resizeTimeoutId),this._resizeTimeoutId=void 0)}setContainer(){var t;const e=document.body,i=null!==(t=this._containerElement)&&void 0!==t?t:e;if(i===e){this.resizeWithContainerAutomatically=!0;const t=document.documentElement;t.style.height=\"100%\",t.style.margin=\"0\",t.style.padding=\"0\",t.style.overflow=\"clip\",e.style.height=\"100%\",e.style.margin=\"0\",e.style.padding=\"0\",e.style.overflow=\"clip\"}this._containerElement=i}onBeforeUnload(){this.destroy()}adjustColumnsResponsive(){if(void 0===this._groundItem)throw new J(\"LMACR20883\");if(this._firstLoad=!1,this.useResponsiveLayout()&&!this._updatingColumnsResponsive&&this._groundItem.contentItems.length>0&&this._groundItem.contentItems[0].isRow){if(void 0===this._groundItem||null===this._width)throw new J(\"LMACR77412\");{const t=this._groundItem.contentItems[0].contentItems.length;if(t<=1)return;{const e=this.layoutConfig.dimensions.defaultMinItemWidth;if(t*e<=this._width)return;{this._updatingColumnsResponsive=!0;const i=t-Math.max(Math.floor(this._width/e),1),n=this._groundItem.contentItems[0],o=this.getAllStacks();if(0===o.length)throw new X(\"LMACRS77413\");{const t=o[0];for(let e=0;en?void 0:{parentItem:t,index:o}}}case 1:if(void 0===this._focusedComponentItem)return;{const t=this._focusedComponentItem.parentItem;return this.tryCreateLocationFromParentItem(t,e)}case 2:{const t=this.findFirstContentItemType(at.stack);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 3:{let t=this.findFirstContentItemType(at.row);return void 0!==t?this.tryCreateLocationFromParentItem(t,e):(t=this.findFirstContentItemType(at.column),void 0!==t?this.tryCreateLocationFromParentItem(t,e):void 0)}case 4:{const t=this.findFirstContentItemType(at.row);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 5:{const t=this.findFirstContentItemType(at.column);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 6:if(void 0===this._groundItem)throw new J(\"LMFLRIF18244\");return void 0!==this.rootItem?void 0:void 0===e||0===e?{parentItem:this._groundItem,index:0}:void 0;case 7:if(void 0===this._groundItem)throw new J(\"LMFLF18244\");{const t=this._groundItem.contentItems;if(0===t.length)return void 0===e||0===e?{parentItem:this._groundItem,index:0}:void 0;{const i=t[0];return this.tryCreateLocationFromParentItem(i,e)}}}}tryCreateLocationFromParentItem(t,e){const i=t.contentItems.length;return void 0===e?{parentItem:t,index:i}:e<0||e>i?void 0:{parentItem:t,index:e}}}!function(t){t.createMaximisePlaceElement=function(t){const e=t.createElement(\"div\");return e.classList.add(\"lm_maximise_place\"),e},t.createTabDropPlaceholderElement=function(t){const e=t.createElement(\"div\");return e.classList.add(\"lm_drop_tab_placeholder\"),e},t.defaultLocationSelectors=[{typeId:1,index:void 0},{typeId:2,index:void 0},{typeId:3,index:void 0},{typeId:7,index:void 0}],t.afterFocusedItemIfPossibleLocationSelectors=[{typeId:0,index:1},{typeId:2,index:void 0},{typeId:3,index:void 0},{typeId:7,index:void 0}]}(ae||(ae={}));class le extends ae{constructor(t,e,i,n){if(super(le.createLayoutManagerConstructorParameters(t,e)),this._bindComponentEventHanlderPassedInConstructor=!1,this._creationTimeoutPassed=!1,void 0!==e&&\"function\"==typeof e&&(this.bindComponentEvent=e,this._bindComponentEventHanlderPassedInConstructor=!0,void 0!==i&&(this.unbindComponentEvent=i)),!this._bindComponentEventHanlderPassedInConstructor&&this.isSubWindow){if(void 0===this._constructorOrSubWindowLayoutConfig)throw new J(\"VLC98823\");{const t=xt.resolve(this._constructorOrSubWindowLayoutConfig);this.layoutConfig=Object.assign(Object.assign({},t),{root:void 0})}}!0!==n&&(this.deprecatedConstructor||this.init())}destroy(){this.bindComponentEvent=void 0,this.unbindComponentEvent=void 0,super.destroy()}init(){if(this._bindComponentEventHanlderPassedInConstructor||\"loading\"!==document.readyState&&null!==document.body){if(!this._bindComponentEventHanlderPassedInConstructor&&!0===this.isSubWindow&&!this._creationTimeoutPassed)return setTimeout((()=>this.init()),7),void(this._creationTimeoutPassed=!0);!0===this.isSubWindow&&(this._bindComponentEventHanlderPassedInConstructor||this.clearHtmlAndAdjustStylesForSubWindow(),window.__glInstance=this),super.init()}else document.addEventListener(\"DOMContentLoaded\",(()=>this.init()),{passive:!0})}clearHtmlAndAdjustStylesForSubWindow(){const t=document.head,e=new Array(4);e[0]=document.querySelectorAll(\"body link\"),e[1]=document.querySelectorAll(\"body style\"),e[2]=document.querySelectorAll(\"template\"),e[3]=document.querySelectorAll(\".gl_keep\");for(let i=0;ithis.emit(\"popIn\"))),document.body.appendChild(t),!0}}bindComponent(t,e){if(void 0!==this.bindComponentEvent){return this.bindComponentEvent(t,e)}if(void 0!==this.getComponentEvent)return{virtual:!1,component:this.getComponentEvent(t,e)};{const t=`${tt[2]}: ${JSON.stringify(e)}`;throw new Z(t)}}unbindComponent(t,e,i){if(void 0!==this.unbindComponentEvent)this.unbindComponentEvent(t);else if(!e&&void 0!==this.releaseComponentEvent){if(void 0===i)throw new J(\"VCUCRCU333998\");this.releaseComponentEvent(t,i)}}}!function(t){let e=!1;t.createLayoutManagerConstructorParameters=function(t,i){const n=e?null:new URL(document.location.href).searchParams.get(\"gl-window\");e=!0;const o=null!==n;let s,r;if(null!==n){const e=localStorage.getItem(n);if(null===e)throw new Error(\"Null gl-window Config\");localStorage.removeItem(n);const i=JSON.parse(e),o=_t.unminifyConfig(i);r=xt.fromResolved(o),t instanceof HTMLElement&&(s=t)}else void 0===t?r=void 0:t instanceof HTMLElement?(r=void 0,s=t):r=t,void 0===s&&i instanceof HTMLElement&&(s=i);return{constructorOrSubWindowLayoutConfig:r,isSubWindow:o,containerElement:s}}}(le||(le={}));class he extends le{constructor(t,e,i){super(t,e,i,!0),this._componentTypesMap=new Map,this._registeredComponentMap=new Map,this._virtuableComponentMap=new Map,this._containerVirtualRectingRequiredEventListener=(t,e,i)=>this.handleContainerVirtualRectingRequiredEvent(t,e,i),this._containerVirtualVisibilityChangeRequiredEventListener=(t,e)=>this.handleContainerVirtualVisibilityChangeRequiredEvent(t,e),this._containerVirtualZIndexChangeRequiredEventListener=(t,e,i)=>this.handleContainerVirtualZIndexChangeRequiredEvent(t,e,i),this.deprecatedConstructor||this.init()}registerComponent(t,e,i=!1){if(\"function\"!=typeof e)throw new $(\"registerComponent() componentConstructorOrFactoryFtn parameter is not a function\");if(e.hasOwnProperty(\"prototype\")){const n=e;this.registerComponentConstructor(t,n,i)}else{const n=e;this.registerComponentFactoryFunction(t,n,i)}}registerComponentConstructor(t,e,i=!1){if(\"function\"!=typeof e)throw new Error(tt[1]);if(void 0!==this._componentTypesMap.get(t))throw new Z(`${tt[3]}: ${t}`);this._componentTypesMap.set(t,{constructor:e,factoryFunction:void 0,virtual:i})}registerComponentFactoryFunction(t,e,i=!1){if(\"function\"!=typeof e)throw new Z(\"Please register a constructor function\");if(void 0!==this._componentTypesMap.get(t))throw new Z(`${tt[3]}: ${t}`);this._componentTypesMap.set(t,{constructor:void 0,factoryFunction:e,virtual:i})}registerComponentFunction(t){this.registerGetComponentConstructorCallback(t)}registerGetComponentConstructorCallback(t){if(\"function\"!=typeof t)throw new Error(\"Please register a callback function\");void 0!==this._getComponentConstructorFtn&&console.warn(\"Multiple component functions are being registered. Only the final registered function will be used.\"),this._getComponentConstructorFtn=t}getRegisteredComponentTypeNames(){const t=this._componentTypesMap.keys();return Array.from(t)}getComponentInstantiator(t){let e;const i=pt.resolveComponentTypeName(t);return void 0!==i&&(e=this._componentTypesMap.get(i)),void 0===e&&void 0!==this._getComponentConstructorFtn&&(e={constructor:this._getComponentConstructorFtn(t),factoryFunction:void 0,virtual:!1}),e}bindComponent(t,e){let i;const n=pt.resolveComponentTypeName(e);let o;if(void 0!==n&&(i=this._componentTypesMap.get(n)),void 0===i&&void 0!==this._getComponentConstructorFtn&&(i={constructor:this._getComponentConstructorFtn(e),factoryFunction:void 0,virtual:!1}),void 0!==i){const s=i.virtual;let r,a;r=void 0===e.componentState?void 0:Ut({},e.componentState);const l=i.constructor;if(void 0!==l)a=new l(t,r,s);else{const e=i.factoryFunction;if(void 0===e)throw new X(\"LMBCFFU10008\");a=e(t,r,s)}if(s){if(void 0===a)throw new J(\"GLBCVCU988774\");{const e=a,i=e.rootHtmlElement;if(void 0===i)throw new Z(`${tt[5]}: ${n}`);!function(t){const e=\"absolute\";t.style.position!==e&&(t.style.position=e)}(i),this.container.appendChild(i),this._virtuableComponentMap.set(t,e),t.virtualRectingRequiredEvent=this._containerVirtualRectingRequiredEventListener,t.virtualVisibilityChangeRequiredEvent=this._containerVirtualVisibilityChangeRequiredEventListener,t.virtualZIndexChangeRequiredEvent=this._containerVirtualZIndexChangeRequiredEventListener}}this._registeredComponentMap.set(t,a),o={virtual:i.virtual,component:a}}else o=super.bindComponent(t,e);return o}unbindComponent(t,e,i){if(void 0===this._registeredComponentMap.get(t))super.unbindComponent(t,e,i);else{const e=this._virtuableComponentMap.get(t);if(void 0!==e){const i=e.rootHtmlElement;if(void 0===i)throw new X(\"GLUC77743\",t.title);this.container.removeChild(i),this._virtuableComponentMap.delete(t)}}}fireBeforeVirtualRectingEvent(t){this._goldenLayoutBoundingClientRect=this.container.getBoundingClientRect(),super.fireBeforeVirtualRectingEvent(t)}handleContainerVirtualRectingRequiredEvent(t,e,i){const n=this._virtuableComponentMap.get(t);if(void 0===n)throw new J(\"GLHCSCE55933\");{const o=n.rootHtmlElement;if(void 0===o)throw new Z(tt[4]+\" \"+t.title);{const n=t.element.getBoundingClientRect(),s=n.left-this._goldenLayoutBoundingClientRect.left;o.style.left=zt(s);const r=n.top-this._goldenLayoutBoundingClientRect.top;o.style.top=zt(r),Tt(o,e),At(o,i)}}}handleContainerVirtualVisibilityChangeRequiredEvent(t,e){const i=this._virtuableComponentMap.get(t);if(void 0===i)throw new J(\"GLHCVVCRE55934\");{const n=i.rootHtmlElement;if(void 0===n)throw new Z(tt[4]+\" \"+t.title);Dt(n,e)}}handleContainerVirtualZIndexChangeRequiredEvent(t,e,i){const n=this._virtuableComponentMap.get(t);if(void 0===n)throw new J(\"GLHCVZICRE55935\");{const e=n.rootHtmlElement;if(void 0===e)throw new Z(tt[4]+\" \"+t.title);e.style.zIndex=i}}}const de=\"initial_\",ce={show:\"top\",popout:!1,maximise:!1,close:\"close-tab-unused\"},me={headerHeight:31},ue={hasHeaders:!0,reorderEnabled:!0},pe={popoutWholeStack:!1,constrainDragToContainer:!1,constrainDragToHeaders:!1,preventDragout:!1,showMaximiseIcon:!1,showPopoutIcon:!1,showCloseIcon:!1,blockedPopoutsThrowError:!0,closePopoutsOnUnload:!0,selectionEnabled:!1};var ge,fe;class ve{constructor(e){this.layout=e,ge.set(this,void 0),fe.set(this,void 0),this.handleResize=t=>{t.forEach((t=>this.resizeElement(t.target)))},this.handleMutation=()=>{this.layout.viewComponentsByContainerElement.forEach((t=>{this.resizeElement(t.container.element)}))},t.__classPrivateFieldSet(this,ge,new ResizeObserver(this.handleResize),\"f\"),t.__classPrivateFieldSet(this,fe,new MutationObserver(this.handleMutation),\"f\")}observeMutations(e){t.__classPrivateFieldGet(this,fe,\"f\")?.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[\"class\"]})}destroy(){t.__classPrivateFieldGet(this,ge,\"f\").disconnect(),t.__classPrivateFieldGet(this,fe,\"f\").disconnect()}observeContainer(e){t.__classPrivateFieldGet(this,ge,\"f\").observe(e)}unobserveContainer(e){t.__classPrivateFieldGet(this,ge,\"f\").unobserve(e)}resizeElement(t){const e=this.layout.viewComponentsByContainerElement.get(t);e&&e.resize()}}ge=new WeakMap,fe=new WeakMap;var _e={};Object.defineProperty(_e,\"__esModule\",{value:!0});var ye=_e.BaseItem=void 0;class Ce{constructor(t,e,i){this._item=t,this._layout=e,this._wrap=i}get raw(){return this._item}get layout(){return this._layout}get type(){return this._item.type}get contentItems(){return(this._item.contentItems??[]).map((t=>this._wrap(t)))}get parent(){const t=this._item.parent;return t?this._wrap(t):null}setActiveContentItem(t,e){if(\"stack\"!==this.type)throw new Error(`Cannot call setActiveContentItem from a non-stack item: ${this.type}`);this._item.setActiveContentItem(t.raw,e)}static wrapInternal(t,e,i){const n=Ce.wrapCache.get(e);if(n)return n;const o=new t(e,i,(e=>Ce.wrapInternal(t,e,i)));return Ce.wrapCache.set(e,o),o}}ye=_e.BaseItem=Ce,Ce.wrapCache=new WeakMap;const we=t=>!!t&&\"contentItems\"in t&&(t.isRow||t.isColumn);class Ie extends ye{isRoot(){return!!this._item.parent?.isGround}getBounds(){return this._item.element.getBoundingClientRect()}get viewName(){if(this._item.isComponent){const{component:t}=this._item;return t.identity.name}throw new Error(\"View name not found\")}onDestroyed(t){const e=({target:i})=>{i===this._item&&(t(),this._item.off(\"itemDestroyed\",e))};this._item.on(\"itemDestroyed\",e)}createAdjacentStack({position:t=\"right\"}={}){const e=this.raw;if(ee.isStack(e)&&e.parent){const i=[\"top\",\"bottom\"].includes(t)?\"column\":\"row\",n=[\"left\",\"top\"].includes(t)?1:0,o=we(e.parent)?e.parent:e.layoutManager,s=o,r=e.parent.contentItems.indexOf(e);e.parent.isGround&&e.parent.removeChild(e,!0);const a=o.newItem({type:i,content:[{type:\"stack\",content:[]}]},r);if(!a)throw new Error(\"createAdjacentStack: Failed to create new container\");const l=a.contentItems[0];return a.addChild(this.raw,n),we(s)&&s.removeChild(e,!0),this._wrap(l)}throw new Error(`Cannot creat adjacent stacks for type: ${e.type}, must be type 'stack'`)}setActiveContentItem(t,e=!0){if(!ee.isStack(this._item))throw new Error(`Cannot call setActiveContentItem from a non-stack item: ${this.type}`);this._item.setActiveComponentItem(t.raw,!e)}static wrap(t,e){return ye.wrapInternal(Ie,t,e)}}function be(t=[],e){for(const i of t)\"component\"===i.type?Object.keys(e).forEach((t=>{t in i&&(i.componentState={[`${de}${t}`]:i[t],...i.componentState}),i[t]=e[t]})):be(i.content,e)}function Se(t=[],e,i){for(const n of t)if(\"component\"===n.type)Object.keys(e).forEach((t=>{if(`${de}${t}`in n.componentState)return n[t]=n.componentState[`${de}${t}`],void delete n.componentState[`${de}${t}`];n[t]=e[t]}));else{if(n.size&&(\"row\"===i||\"column\"===i)){n[\"row\"===i?\"width\":\"height\"]=n.size?.includes(\".\")?parseFloat(n.size):parseInt(n.size)}Se(n.content,e,n.type)}}function Ee(t){if(t.root){t.root.content&&Se([t.root],{componentName:\"view\",isClosable:!0});const e=t.root;t.content=[e],delete t.root}return t}const xe=e=>class extends e{connectedCallback(){if(!this.name||!this.uuid)throw new Error(\" Name or uuid attribute missing\");if(!this.src)throw new Error(\" missing 'src' attribute.\");this.#t||(this.#t=document.createElement(\"iframe\"),this.#t.src=this.src,this.#t.style.height=\"100%\",this.#t.style.width=\"100%\",this.#t.style.border=\"none\",this.forceFrameName?this.#t.setAttribute(\"name\",this.forceFrameName):this.#t.setAttribute(\"name\",t.encodeOptions({brokerUrl:this.brokerUrl,name:this.name,uuid:this.uuid,providerId:this.providerId,contextGroup:this.contextGroup},\"of-frame\")),this.#t.setAttribute(\"id\",this.name),this.appendChild(this.#t))}#t;get brokerUrl(){return this.getAttribute(\"of-broker\")}set brokerUrl(t){t&&this.setAttribute(\"of-broker\",t)}get name(){return this.getAttribute(\"of-name\")}set name(t){t&&this.setAttribute(\"of-name\",t)}get forceFrameName(){return this.getAttribute(\"forceFrameName\")}set forceFrameName(t){t&&this.setAttribute(\"forceFrameName\",t)}get uuid(){return this.getAttribute(\"of-uuid\")}set uuid(t){t&&this.setAttribute(\"of-uuid\",t)}get src(){return this.getAttribute(\"src\")}set src(t){t&&this.setAttribute(\"src\",t)}get providerId(){return this.getAttribute(\"of-provider-id\")}set providerId(t){t&&this.setAttribute(\"of-provider-id\",t)}get contextGroup(){return this.getAttribute(\"of-context-group\")}set contextGroup(t){t&&this.setAttribute(\"of-context-group\",t)}static get observedAttributes(){return[\"name\"]}};class Le{static create(t){const e=document.createElement(\"of-view\");return Object.entries(t).forEach((([t,i])=>{e.setAttribute(t,i)})),e}}customElements.define(\"of-view\",xe(HTMLElement));class ze{constructor(t,i,n,{brokerUrl:o,interopConfig:s},r){this.container=t,this.config=i,this.ofView=null,this.isDragging=()=>this.container.tab.element?.className.includes(\"lm_dragging\")??!1;const{url:a,web:l,interop:h,name:d}=i||{},c=d??`internal-generated-view-${e.v4()}`;if(this.identity={uuid:n,name:c},this.container.element.setAttribute(\"of-name\",c),this.container.element.id=`container-${c}`,this.container.parent.id=c,void 0===a)return void this.handleUrlMissing();const m=this.updateTitleIfNotSet(a),u={\"of-broker\":o,\"of-uuid\":n,\"of-name\":c,src:a};l?.frameName&&(u.forceFrameName=l.frameName);const p=h?.currentContextGroup??s?.currentContextGroup;p&&(u[\"of-context-group\"]=p),s?.providerId&&(u[\"of-provider-id\"]=s?.providerId),this.ofView=Le.create(u),this.ofView.title=m??`Iframe: ${a}`,r.appendChild(this.ofView),this.ofView.style.position=\"absolute\"}updateTitleIfNotSet(t){return\"view\"===this.container.parent.title&&this.container.parent.setTitle(t),this.container.parent.title}handleUrlMissing(){const t=document.createElement(\"div\");t.setAttribute(\"style\",\"padding: 20px\");t.innerText=\"No URL provided\",this.container.element.appendChild(t)}destroy(){this.ofView?.remove(),this.ofView=null}closeView(){this.container.close()}resize(){if(this.ofView){if(this.isDragging())return void(this.ofView.style.display=\"none\");const t=this.container.element.getBoundingClientRect();this.ofView.style.position=\"absolute\",this.ofView.style.height=`${t.height}px`,this.ofView.style.width=`${t.width}px`,this.ofView.style.inset=`${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`,this.ofView.style.display=\"block\"}}}class Me extends U{static overrideConfig(t){const e={...ue,...t.settings,...pe};return e.reorderEnabled?be(t.content,{isClosable:!0}):be(t.content,{reorderEnabled:!1}),{dimensions:me,...t,settings:e,header:{...ce,show:!1!==t.settings?.hasHeaders&&ce.show}}}constructor(t,e,i,{options:n},o,s){super(),this.identity=t,this.container=e,this.initialConfig=i,this.layoutManager=o,this.platformProvider=s,this.viewComponentsByContainerElement=new Map,this.layoutContentCache=_.getSingleInstance(),this.reparentingViews=new Set,this.goldenLayoutDestroyed=!1,this.createViewComponent=(t,e)=>{m.handleSharedView(this.layoutManager,this.identity,e);const i=new ze(t,e,this.identity.uuid,this.options,this.iframeContainer);return e&&!1===e[`${de}isClosable`]&&this.stylesheet.insertRule(`#tab-${i.identity.name} .lm_close_tab { display: none; }`),this.viewComponentsByContainerElement.set(t.element,i),this.resizeController.observeContainer(t.element),i},this.iframeContainer=document.createElement(\"div\"),this.iframeContainer.id=`openfin-layout-iframe-container-${this.identity.layoutName}`,this.domEmitter=new V(e),this.setupStylesheets(),this.layout=new he(this.container),this.layout.resizeWithContainerAutomatically=!0,this.options=n,this.layout.registerComponent(\"view\",this.createViewComponent),this.setupListeners(),this.resizeController=new ve(this),this.layout.loadLayout(Me.overrideConfig(i));const r=document.createElement(\"div\");r.id=`openfin-layout-shadow-container-${this.identity.layoutName}`,r.attachShadow({mode:\"open\",delegatesFocus:!1}).appendChild(this.iframeContainer),this.container.appendChild(r),this.resizeController.observeMutations(this.container)}getStackByView({name:t}){const e=this.layout.findFirstComponentItemById(t);if(e?.parent&&e?.parent?.isStack)return Ie.wrap(e.parent,this)}getRoot(){return Ie.wrap(this.layout.rootItem,this)}async platformCloseView(t){const e=[...this.viewComponentsByContainerElement.values()].find((e=>e.identity.name===t.name));if(!e)throw new Error(`View with name: ${t.name} not found in layout.`);e.closeView()}async platformCreateView(t,{location:e,targetView:i}={}){if(i)throw new Error(\"TargetView not supported in web\");const n={options:this.platformProvider.normalizeOptions(t),target:this.identity,location:e};return this.insertView(n)}setupStylesheets(){if(this.container.setAttribute(\"data-openfin-layout-name\",this.identity.layoutName),this.stylesheet=new CSSStyleSheet,this.stylesheet.insertRule(\".lm_close { display: none; }\"),document.adoptedStyleSheets.push(this.stylesheet),this.initialConfig.settings?.preventSplitterResize){const t=`\\n [data-openfin-layout-name='${this.identity.layoutName}'] .lm_splitter {\\n pointer-events: none;\\n }`;this.stylesheet.insertRule(t)}}insertView({options:t,location:e,targetView:i}){const n=e?this.layoutContentCache.getItemOrUndefined(e.id):void 0,o=i?this.layoutContentCache.getItemOrUndefined(i.name):void 0,s=n??o??Ie.wrap(this.layout.rootItem,this);let r;if(ee.isStack(s.raw))r=s.raw;else{if(!we(s.raw))throw new Error(\"Cannot add a view at the requested location\");r=s.raw.newItem({type:\"stack\",content:[]})}const a=Math.min(r.contentItems.length,e?.index??r.contentItems.length);let l=this.layout.findFirstComponentItemById(t.name);l?(l.parent&&l.parent.removeChild(l,!0),r.addChild(l,a)):l=r.newComponent(\"view\",t,t.title??t.url??\"Default Title\",a);const h=l.component.identity;return Promise.resolve({identity:h})}replaceView({viewToReplace:t,newView:e}){throw new Error(\"Method not implemented.\")}replaceLayout(t){throw new Error(\"Method not implemented.\")}async cleanupView(t){}applyPreset(t){throw new Error(\"Method not implemented.\")}getCurrentViews(){return[...this.viewComponentsByContainerElement.values()].map((t=>t.identity))}async getFrameSnapshot(){return Ee(xt.fromResolved(this.layout.toConfig()))}isVisible(){return W(this.container)}async onViewDetached({viewIdentity:t}){this.reparentingViews.add(t.name),this.platformCloseView(t)}async destroy(){this.goldenLayoutDestroyed||(this.goldenLayoutDestroyed=!0,this.layout.destroy()),this.iframeContainer.remove(),this.resizeController.destroy(),document.adoptedStyleSheets=document.adoptedStyleSheets.filter((t=>t!==this.stylesheet)),this.viewComponentsByContainerElement.clear()}setupListeners(){this.container.addEventListener(\"pointerdown\",(t=>{if(t.target instanceof HTMLElement){const e=t.target.classList;[\"lm_tab\",\"lm_title\",\"lm_splitter\",\"lm_drag_handle\"].some((t=>e.contains(t)))&&(this.handleDragStart(),2===t.button&&t.stopPropagation())}}),!0),document.addEventListener(\"pointerup\",(()=>this.handleDragEnd()),!0),this.layout.on(\"tabCreated\",(t=>{const e=t.componentItem.component;t.element.id=`tab-${e.identity.name}`,this.domEmitter.dispatchLocalEvent(\"tab-created\",e.identity)})),this.layout.on(\"itemCreated\",(({target:t})=>{const e=t;if(Gt.isComponentItem(e)){const t=e.component;this.domEmitter.dispatchLocalEvent(\"container-created\",t.identity)}})),this.layout.on(\"itemDestroyed\",(t=>{const e=t.target;if(Gt.isComponentItem(e)){const t=e.component;this.removeViewComponent(t)}})),this.layout.on(\"itemDropped\",(()=>{this.handleDragEnd()}))}handleDragStart(){this.iframeContainer.style.pointerEvents=\"none\"}handleDragEnd(){this.iframeContainer.style.pointerEvents=\"\"}removeViewComponent(t){if(t.config&&!1===t.config[`${de}isClosable`]){const e=[...this.stylesheet.cssRules].findIndex((e=>e.cssText.includes(`#tab-${t.identity.name}`)));this.stylesheet.deleteRule(e)}t.destroy(),this.viewComponentsByContainerElement.delete(t.container.element),this.resizeController.unobserveContainer(t.container.element),this.reparentingViews.has(t.identity.name)?this.reparentingViews.delete(t.identity.name):this.platformProvider.closeView(t.identity.name);0===this.getCurrentViews().length&&(this.goldenLayoutDestroyed||(this.goldenLayoutDestroyed=!0,m.handleLastViewRemoved(this.layoutManager,this.identity)))}}class Pe{constructor(t,e,i,n){this.windowIdentity=t,this.connectConfig=e,this.provider=i,this.fallbackContainer=n}async createLayout(t,e){if(!(\"container\"in t)&&!this.fallbackContainer)throw new Error(\"Container property is not optional in web\");const{layoutName:i}=t,n=t,o=this.provider.initLayoutViews(n),s=n.container??this.fallbackContainer,r={...this.windowIdentity,layoutName:i},a=new Me(r,s,o,this.connectConfig,e,this.provider);m.registerLayout(e,i,a),this.fallbackContainer=null}async getLayoutSnapshot(t){return t.getLayoutSnapshot()}async handleLastViewRemoved(t){}}class Te{static async init(e){const i=e.getFin().InterApplicationBus.Channel,n=await i.create(`custom-frame-${e.me.uuid}`);return n.setDefaultAction((async(t,{target:e,opts:i},o)=>{const s=n.connections.find((t=>t.name===e.name));if(s)return n.dispatch(s,t,{...i,target:e});throw new Error(`Client with name ${e.name} not found`)})),await t.relayChannelClientApi_1(n,\"layout-relay\"),new Te(e)}constructor(t){this.wire=t,this.viewNames=new Set}normalizeOptions(t,i=\"default\"){const n=this.wire.me.uuid;let{name:o=`internal-generated-view-${e.v4()}`}=t;return o.match(/^internal-generated-view-/)&&this.viewNames.has(o)&&\"duplicate\"===i&&(o=`internal-generated-view-${e.v4()}`),this.viewNames.add(o),{...t,name:o,uuid:n}}closeView(t){this.viewNames.delete(t)}initLayoutViews({layout:t,multiInstanceViewBehavior:e}){return H((t=>{if(\"component\"===t.type&&t.componentState){const i=this.normalizeOptions(t.componentState,e);return{...t,componentState:i}}return t}),t)}}var Ae;const ke=t=>t;Ae=new WeakMap,exports.WebLayoutEntryPoint=class{constructor(e){Ae.set(this,void 0),this.initLayoutManager=async(e,i,{container:n,layoutManagerOverride:o})=>{const s=await Te.init(i),r=o??ke,a=new Pe(i.me,t.__classPrivateFieldGet(this,Ae,\"f\"),s,n),l=new(r(m.createClosedConstructor(a)));return await M(i,l),l},this.applyLayoutSnapshot=async(e,i,n)=>{await i.applyLayoutSnapshot(t.__classPrivateFieldGet(this,Ae,\"f\").platform.layoutSnapshot)},this.createLayout=async(t,e)=>m.createLayout(t,e),this.destroyLayout=async(t,e)=>m.destroyLayout(t,e),t.__classPrivateFieldSet(this,Ae,e,\"f\")}};\n","'use strict'\n\nexports.byteLength = byteLength\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\nfor (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i]\n revLookup[code.charCodeAt(i)] = i\n}\n\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction getLens (b64) {\n var len = b64.length\n\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // Trim off extra bytes after placeholder bytes are found\n // See: https://github.com/beatgammit/base64-js/issues/42\n var validLen = b64.indexOf('=')\n if (validLen === -1) validLen = len\n\n var placeHoldersLen = validLen === len\n ? 0\n : 4 - (validLen % 4)\n\n return [validLen, placeHoldersLen]\n}\n\n// base64 is 4/3 + up to two characters of the original data\nfunction byteLength (b64) {\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction _byteLength (b64, validLen, placeHoldersLen) {\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction toByteArray (b64) {\n var tmp\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n\n var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))\n\n var curByte = 0\n\n // if there are placeholders, only get up to the last complete 4 chars\n var len = placeHoldersLen > 0\n ? validLen - 4\n : validLen\n\n var i\n for (i = 0; i < len; i += 4) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 18) |\n (revLookup[b64.charCodeAt(i + 1)] << 12) |\n (revLookup[b64.charCodeAt(i + 2)] << 6) |\n revLookup[b64.charCodeAt(i + 3)]\n arr[curByte++] = (tmp >> 16) & 0xFF\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 2) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 2) |\n (revLookup[b64.charCodeAt(i + 1)] >> 4)\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 1) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 10) |\n (revLookup[b64.charCodeAt(i + 1)] << 4) |\n (revLookup[b64.charCodeAt(i + 2)] >> 2)\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] +\n lookup[num >> 12 & 0x3F] +\n lookup[num >> 6 & 0x3F] +\n lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n var tmp\n var output = []\n for (var i = start; i < end; i += 3) {\n tmp =\n ((uint8[i] << 16) & 0xFF0000) +\n ((uint8[i + 1] << 8) & 0xFF00) +\n (uint8[i + 2] & 0xFF)\n output.push(tripletToBase64(tmp))\n }\n return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n var tmp\n var len = uint8.length\n var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n var parts = []\n var maxChunkLength = 16383 // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1]\n parts.push(\n lookup[tmp >> 2] +\n lookup[(tmp << 4) & 0x3F] +\n '=='\n )\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + uint8[len - 1]\n parts.push(\n lookup[tmp >> 10] +\n lookup[(tmp >> 4) & 0x3F] +\n lookup[(tmp << 2) & 0x3F] +\n '='\n )\n }\n\n return parts.join('')\n}\n","/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n/* eslint-disable no-proto */\n\n'use strict'\n\nconst base64 = require('base64-js')\nconst ieee754 = require('ieee754')\nconst customInspectSymbol =\n (typeof Symbol === 'function' && typeof Symbol['for'] === 'function') // eslint-disable-line dot-notation\n ? Symbol['for']('nodejs.util.inspect.custom') // eslint-disable-line dot-notation\n : null\n\nexports.Buffer = Buffer\nexports.SlowBuffer = SlowBuffer\nexports.INSPECT_MAX_BYTES = 50\n\nconst K_MAX_LENGTH = 0x7fffffff\nexports.kMaxLength = K_MAX_LENGTH\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Print warning and recommend using `buffer` v4.x which has an Object\n * implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * We report that the browser does not support typed arrays if the are not subclassable\n * using __proto__. Firefox 4-29 lacks support for adding new properties to `Uint8Array`\n * (See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438). IE 10 lacks support\n * for __proto__ and has a buggy typed array implementation.\n */\nBuffer.TYPED_ARRAY_SUPPORT = typedArraySupport()\n\nif (!Buffer.TYPED_ARRAY_SUPPORT && typeof console !== 'undefined' &&\n typeof console.error === 'function') {\n console.error(\n 'This browser lacks typed array (Uint8Array) support which is required by ' +\n '`buffer` v5.x. Use `buffer` v4.x if you require old browser support.'\n )\n}\n\nfunction typedArraySupport () {\n // Can typed array instances can be augmented?\n try {\n const arr = new Uint8Array(1)\n const proto = { foo: function () { return 42 } }\n Object.setPrototypeOf(proto, Uint8Array.prototype)\n Object.setPrototypeOf(arr, proto)\n return arr.foo() === 42\n } catch (e) {\n return false\n }\n}\n\nObject.defineProperty(Buffer.prototype, 'parent', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.buffer\n }\n})\n\nObject.defineProperty(Buffer.prototype, 'offset', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.byteOffset\n }\n})\n\nfunction createBuffer (length) {\n if (length > K_MAX_LENGTH) {\n throw new RangeError('The value \"' + length + '\" is invalid for option \"size\"')\n }\n // Return an augmented `Uint8Array` instance\n const buf = new Uint8Array(length)\n Object.setPrototypeOf(buf, Buffer.prototype)\n return buf\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new TypeError(\n 'The \"string\" argument must be of type string. Received type number'\n )\n }\n return allocUnsafe(arg)\n }\n return from(arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\nfunction from (value, encodingOrOffset, length) {\n if (typeof value === 'string') {\n return fromString(value, encodingOrOffset)\n }\n\n if (ArrayBuffer.isView(value)) {\n return fromArrayView(value)\n }\n\n if (value == null) {\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n }\n\n if (isInstance(value, ArrayBuffer) ||\n (value && isInstance(value.buffer, ArrayBuffer))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof SharedArrayBuffer !== 'undefined' &&\n (isInstance(value, SharedArrayBuffer) ||\n (value && isInstance(value.buffer, SharedArrayBuffer)))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof value === 'number') {\n throw new TypeError(\n 'The \"value\" argument must not be of type number. Received type number'\n )\n }\n\n const valueOf = value.valueOf && value.valueOf()\n if (valueOf != null && valueOf !== value) {\n return Buffer.from(valueOf, encodingOrOffset, length)\n }\n\n const b = fromObject(value)\n if (b) return b\n\n if (typeof Symbol !== 'undefined' && Symbol.toPrimitive != null &&\n typeof value[Symbol.toPrimitive] === 'function') {\n return Buffer.from(value[Symbol.toPrimitive]('string'), encodingOrOffset, length)\n }\n\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n return from(value, encodingOrOffset, length)\n}\n\n// Note: Change prototype *after* Buffer.from is defined to workaround Chrome bug:\n// https://github.com/feross/buffer/pull/148\nObject.setPrototypeOf(Buffer.prototype, Uint8Array.prototype)\nObject.setPrototypeOf(Buffer, Uint8Array)\n\nfunction assertSize (size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be of type number')\n } else if (size < 0) {\n throw new RangeError('The value \"' + size + '\" is invalid for option \"size\"')\n }\n}\n\nfunction alloc (size, fill, encoding) {\n assertSize(size)\n if (size <= 0) {\n return createBuffer(size)\n }\n if (fill !== undefined) {\n // Only pay attention to encoding if it's a string. This\n // prevents accidentally sending in a number that would\n // be interpreted as a start offset.\n return typeof encoding === 'string'\n ? createBuffer(size).fill(fill, encoding)\n : createBuffer(size).fill(fill)\n }\n return createBuffer(size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n return alloc(size, fill, encoding)\n}\n\nfunction allocUnsafe (size) {\n assertSize(size)\n return createBuffer(size < 0 ? 0 : checked(size) | 0)\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n return allocUnsafe(size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n return allocUnsafe(size)\n}\n\nfunction fromString (string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8'\n }\n\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n\n const length = byteLength(string, encoding) | 0\n let buf = createBuffer(length)\n\n const actual = buf.write(string, encoding)\n\n if (actual !== length) {\n // Writing a hex string, for example, that contains invalid characters will\n // cause everything after the first invalid character to be ignored. (e.g.\n // 'abxxcd' will be treated as 'ab')\n buf = buf.slice(0, actual)\n }\n\n return buf\n}\n\nfunction fromArrayLike (array) {\n const length = array.length < 0 ? 0 : checked(array.length) | 0\n const buf = createBuffer(length)\n for (let i = 0; i < length; i += 1) {\n buf[i] = array[i] & 255\n }\n return buf\n}\n\nfunction fromArrayView (arrayView) {\n if (isInstance(arrayView, Uint8Array)) {\n const copy = new Uint8Array(arrayView)\n return fromArrayBuffer(copy.buffer, copy.byteOffset, copy.byteLength)\n }\n return fromArrayLike(arrayView)\n}\n\nfunction fromArrayBuffer (array, byteOffset, length) {\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\"offset\" is outside of buffer bounds')\n }\n\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\"length\" is outside of buffer bounds')\n }\n\n let buf\n if (byteOffset === undefined && length === undefined) {\n buf = new Uint8Array(array)\n } else if (length === undefined) {\n buf = new Uint8Array(array, byteOffset)\n } else {\n buf = new Uint8Array(array, byteOffset, length)\n }\n\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(buf, Buffer.prototype)\n\n return buf\n}\n\nfunction fromObject (obj) {\n if (Buffer.isBuffer(obj)) {\n const len = checked(obj.length) | 0\n const buf = createBuffer(len)\n\n if (buf.length === 0) {\n return buf\n }\n\n obj.copy(buf, 0, 0, len)\n return buf\n }\n\n if (obj.length !== undefined) {\n if (typeof obj.length !== 'number' || numberIsNaN(obj.length)) {\n return createBuffer(0)\n }\n return fromArrayLike(obj)\n }\n\n if (obj.type === 'Buffer' && Array.isArray(obj.data)) {\n return fromArrayLike(obj.data)\n }\n}\n\nfunction checked (length) {\n // Note: cannot use `length < K_MAX_LENGTH` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= K_MAX_LENGTH) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + K_MAX_LENGTH.toString(16) + ' bytes')\n }\n return length | 0\n}\n\nfunction SlowBuffer (length) {\n if (+length != length) { // eslint-disable-line eqeqeq\n length = 0\n }\n return Buffer.alloc(+length)\n}\n\nBuffer.isBuffer = function isBuffer (b) {\n return b != null && b._isBuffer === true &&\n b !== Buffer.prototype // so Buffer.isBuffer(Buffer.prototype) will be false\n}\n\nBuffer.compare = function compare (a, b) {\n if (isInstance(a, Uint8Array)) a = Buffer.from(a, a.offset, a.byteLength)\n if (isInstance(b, Uint8Array)) b = Buffer.from(b, b.offset, b.byteLength)\n if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n throw new TypeError(\n 'The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array'\n )\n }\n\n if (a === b) return 0\n\n let x = a.length\n let y = b.length\n\n for (let i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i]\n y = b[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n switch (String(encoding).toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'latin1':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return true\n default:\n return false\n }\n}\n\nBuffer.concat = function concat (list, length) {\n if (!Array.isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n\n if (list.length === 0) {\n return Buffer.alloc(0)\n }\n\n let i\n if (length === undefined) {\n length = 0\n for (i = 0; i < list.length; ++i) {\n length += list[i].length\n }\n }\n\n const buffer = Buffer.allocUnsafe(length)\n let pos = 0\n for (i = 0; i < list.length; ++i) {\n let buf = list[i]\n if (isInstance(buf, Uint8Array)) {\n if (pos + buf.length > buffer.length) {\n if (!Buffer.isBuffer(buf)) buf = Buffer.from(buf)\n buf.copy(buffer, pos)\n } else {\n Uint8Array.prototype.set.call(\n buffer,\n buf,\n pos\n )\n }\n } else if (!Buffer.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n } else {\n buf.copy(buffer, pos)\n }\n pos += buf.length\n }\n return buffer\n}\n\nfunction byteLength (string, encoding) {\n if (Buffer.isBuffer(string)) {\n return string.length\n }\n if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) {\n return string.byteLength\n }\n if (typeof string !== 'string') {\n throw new TypeError(\n 'The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. ' +\n 'Received type ' + typeof string\n )\n }\n\n const len = string.length\n const mustMatch = (arguments.length > 2 && arguments[2] === true)\n if (!mustMatch && len === 0) return 0\n\n // Use a for loop to avoid recursion\n let loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'ascii':\n case 'latin1':\n case 'binary':\n return len\n case 'utf8':\n case 'utf-8':\n return utf8ToBytes(string).length\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return len * 2\n case 'hex':\n return len >>> 1\n case 'base64':\n return base64ToBytes(string).length\n default:\n if (loweredCase) {\n return mustMatch ? -1 : utf8ToBytes(string).length // assume utf8\n }\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n let loweredCase = false\n\n // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n // property of a typed array.\n\n // This behaves neither like String nor Uint8Array in that we set start/end\n // to their upper/lower bounds if the value passed is out of range.\n // undefined is handled specially as per ECMA-262 6th Edition,\n // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n if (start === undefined || start < 0) {\n start = 0\n }\n // Return early if start > this.length. Done here to prevent potential uint32\n // coercion fail below.\n if (start > this.length) {\n return ''\n }\n\n if (end === undefined || end > this.length) {\n end = this.length\n }\n\n if (end <= 0) {\n return ''\n }\n\n // Force coercion to uint32. This will also coerce falsey/NaN values to 0.\n end >>>= 0\n start >>>= 0\n\n if (end <= start) {\n return ''\n }\n\n if (!encoding) encoding = 'utf8'\n\n while (true) {\n switch (encoding) {\n case 'hex':\n return hexSlice(this, start, end)\n\n case 'utf8':\n case 'utf-8':\n return utf8Slice(this, start, end)\n\n case 'ascii':\n return asciiSlice(this, start, end)\n\n case 'latin1':\n case 'binary':\n return latin1Slice(this, start, end)\n\n case 'base64':\n return base64Slice(this, start, end)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return utf16leSlice(this, start, end)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = (encoding + '').toLowerCase()\n loweredCase = true\n }\n }\n}\n\n// This property is used by `Buffer.isBuffer` (and the `is-buffer` npm package)\n// to detect a Buffer instance. It's not possible to use `instanceof Buffer`\n// reliably in a browserify context because there could be multiple different\n// copies of the 'buffer' package in use. This method works even for Buffer\n// instances that were created from another copy of the `buffer` package.\n// See: https://github.com/feross/buffer/issues/154\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n const i = b[n]\n b[n] = b[m]\n b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n const len = this.length\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits')\n }\n for (let i = 0; i < len; i += 2) {\n swap(this, i, i + 1)\n }\n return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n const len = this.length\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits')\n }\n for (let i = 0; i < len; i += 4) {\n swap(this, i, i + 3)\n swap(this, i + 1, i + 2)\n }\n return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n const len = this.length\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits')\n }\n for (let i = 0; i < len; i += 8) {\n swap(this, i, i + 7)\n swap(this, i + 1, i + 6)\n swap(this, i + 2, i + 5)\n swap(this, i + 3, i + 4)\n }\n return this\n}\n\nBuffer.prototype.toString = function toString () {\n const length = this.length\n if (length === 0) return ''\n if (arguments.length === 0) return utf8Slice(this, 0, length)\n return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.toLocaleString = Buffer.prototype.toString\n\nBuffer.prototype.equals = function equals (b) {\n if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n if (this === b) return true\n return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n let str = ''\n const max = exports.INSPECT_MAX_BYTES\n str = this.toString('hex', 0, max).replace(/(.{2})/g, '$1 ').trim()\n if (this.length > max) str += ' ... '\n return ''\n}\nif (customInspectSymbol) {\n Buffer.prototype[customInspectSymbol] = Buffer.prototype.inspect\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n if (isInstance(target, Uint8Array)) {\n target = Buffer.from(target, target.offset, target.byteLength)\n }\n if (!Buffer.isBuffer(target)) {\n throw new TypeError(\n 'The \"target\" argument must be one of type Buffer or Uint8Array. ' +\n 'Received type ' + (typeof target)\n )\n }\n\n if (start === undefined) {\n start = 0\n }\n if (end === undefined) {\n end = target ? target.length : 0\n }\n if (thisStart === undefined) {\n thisStart = 0\n }\n if (thisEnd === undefined) {\n thisEnd = this.length\n }\n\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError('out of range index')\n }\n\n if (thisStart >= thisEnd && start >= end) {\n return 0\n }\n if (thisStart >= thisEnd) {\n return -1\n }\n if (start >= end) {\n return 1\n }\n\n start >>>= 0\n end >>>= 0\n thisStart >>>= 0\n thisEnd >>>= 0\n\n if (this === target) return 0\n\n let x = thisEnd - thisStart\n let y = end - start\n const len = Math.min(x, y)\n\n const thisCopy = this.slice(thisStart, thisEnd)\n const targetCopy = target.slice(start, end)\n\n for (let i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i]\n y = targetCopy[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (numberIsNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [val], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n let indexSize = 1\n let arrLength = arr.length\n let valLength = val.length\n\n if (encoding !== undefined) {\n encoding = String(encoding).toLowerCase()\n if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n encoding === 'utf16le' || encoding === 'utf-16le') {\n if (arr.length < 2 || val.length < 2) {\n return -1\n }\n indexSize = 2\n arrLength /= 2\n valLength /= 2\n byteOffset /= 2\n }\n }\n\n function read (buf, i) {\n if (indexSize === 1) {\n return buf[i]\n } else {\n return buf.readUInt16BE(i * indexSize)\n }\n }\n\n let i\n if (dir) {\n let foundIndex = -1\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1) foundIndex = i\n if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n } else {\n if (foundIndex !== -1) i -= i - foundIndex\n foundIndex = -1\n }\n }\n } else {\n if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n for (i = byteOffset; i >= 0; i--) {\n let found = true\n for (let j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false\n break\n }\n }\n if (found) return i\n }\n }\n\n return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n offset = Number(offset) || 0\n const remaining = buf.length - offset\n if (!length) {\n length = remaining\n } else {\n length = Number(length)\n if (length > remaining) {\n length = remaining\n }\n }\n\n const strLen = string.length\n\n if (length > strLen / 2) {\n length = strLen / 2\n }\n let i\n for (i = 0; i < length; ++i) {\n const parsed = parseInt(string.substr(i * 2, 2), 16)\n if (numberIsNaN(parsed)) return i\n buf[offset + i] = parsed\n }\n return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n // Buffer#write(string)\n if (offset === undefined) {\n encoding = 'utf8'\n length = this.length\n offset = 0\n // Buffer#write(string, encoding)\n } else if (length === undefined && typeof offset === 'string') {\n encoding = offset\n length = this.length\n offset = 0\n // Buffer#write(string, offset[, length][, encoding])\n } else if (isFinite(offset)) {\n offset = offset >>> 0\n if (isFinite(length)) {\n length = length >>> 0\n if (encoding === undefined) encoding = 'utf8'\n } else {\n encoding = length\n length = undefined\n }\n } else {\n throw new Error(\n 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n )\n }\n\n const remaining = this.length - offset\n if (length === undefined || length > remaining) length = remaining\n\n if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n throw new RangeError('Attempt to write outside buffer bounds')\n }\n\n if (!encoding) encoding = 'utf8'\n\n let loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'hex':\n return hexWrite(this, string, offset, length)\n\n case 'utf8':\n case 'utf-8':\n return utf8Write(this, string, offset, length)\n\n case 'ascii':\n case 'latin1':\n case 'binary':\n return asciiWrite(this, string, offset, length)\n\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return base64Write(this, string, offset, length)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return ucs2Write(this, string, offset, length)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0)\n }\n}\n\nfunction base64Slice (buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf)\n } else {\n return base64.fromByteArray(buf.slice(start, end))\n }\n}\n\nfunction utf8Slice (buf, start, end) {\n end = Math.min(buf.length, end)\n const res = []\n\n let i = start\n while (i < end) {\n const firstByte = buf[i]\n let codePoint = null\n let bytesPerSequence = (firstByte > 0xEF)\n ? 4\n : (firstByte > 0xDF)\n ? 3\n : (firstByte > 0xBF)\n ? 2\n : 1\n\n if (i + bytesPerSequence <= end) {\n let secondByte, thirdByte, fourthByte, tempCodePoint\n\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 0x80) {\n codePoint = firstByte\n }\n break\n case 2:\n secondByte = buf[i + 1]\n if ((secondByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n if (tempCodePoint > 0x7F) {\n codePoint = tempCodePoint\n }\n }\n break\n case 3:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n codePoint = tempCodePoint\n }\n }\n break\n case 4:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n fourthByte = buf[i + 3]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n codePoint = tempCodePoint\n }\n }\n }\n }\n\n if (codePoint === null) {\n // we did not generate a valid codePoint so insert a\n // replacement char (U+FFFD) and advance only 1 byte\n codePoint = 0xFFFD\n bytesPerSequence = 1\n } else if (codePoint > 0xFFFF) {\n // encode to utf16 (surrogate pair dance)\n codePoint -= 0x10000\n res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n codePoint = 0xDC00 | codePoint & 0x3FF\n }\n\n res.push(codePoint)\n i += bytesPerSequence\n }\n\n return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nconst MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n const len = codePoints.length\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n }\n\n // Decode in chunks to avoid \"call stack size exceeded\".\n let res = ''\n let i = 0\n while (i < len) {\n res += String.fromCharCode.apply(\n String,\n codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n )\n }\n return res\n}\n\nfunction asciiSlice (buf, start, end) {\n let ret = ''\n end = Math.min(buf.length, end)\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F)\n }\n return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n let ret = ''\n end = Math.min(buf.length, end)\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i])\n }\n return ret\n}\n\nfunction hexSlice (buf, start, end) {\n const len = buf.length\n\n if (!start || start < 0) start = 0\n if (!end || end < 0 || end > len) end = len\n\n let out = ''\n for (let i = start; i < end; ++i) {\n out += hexSliceLookupTable[buf[i]]\n }\n return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n const bytes = buf.slice(start, end)\n let res = ''\n // If bytes.length is odd, the last 8 bits must be ignored (same as node.js)\n for (let i = 0; i < bytes.length - 1; i += 2) {\n res += String.fromCharCode(bytes[i] + (bytes[i + 1] * 256))\n }\n return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n const len = this.length\n start = ~~start\n end = end === undefined ? len : ~~end\n\n if (start < 0) {\n start += len\n if (start < 0) start = 0\n } else if (start > len) {\n start = len\n }\n\n if (end < 0) {\n end += len\n if (end < 0) end = 0\n } else if (end > len) {\n end = len\n }\n\n if (end < start) end = start\n\n const newBuf = this.subarray(start, end)\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(newBuf, Buffer.prototype)\n\n return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUintLE =\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let val = this[offset]\n let mul = 1\n let i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUintBE =\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n checkOffset(offset, byteLength, this.length)\n }\n\n let val = this[offset + --byteLength]\n let mul = 1\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUint8 =\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n return this[offset]\n}\n\nBuffer.prototype.readUint16LE =\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUint16BE =\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUint32LE =\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return ((this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16)) +\n (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUint32BE =\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] * 0x1000000) +\n ((this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n this[offset + 3])\n}\n\nBuffer.prototype.readBigUInt64LE = defineBigIntMethod(function readBigUInt64LE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const lo = first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24\n\n const hi = this[++offset] +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n last * 2 ** 24\n\n return BigInt(lo) + (BigInt(hi) << BigInt(32))\n})\n\nBuffer.prototype.readBigUInt64BE = defineBigIntMethod(function readBigUInt64BE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const hi = first * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset]\n\n const lo = this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last\n\n return (BigInt(hi) << BigInt(32)) + BigInt(lo)\n})\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let val = this[offset]\n let mul = 1\n let i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let i = byteLength\n let mul = 1\n let val = this[offset + --i]\n while (i > 0 && (mul *= 0x100)) {\n val += this[offset + --i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n if (!(this[offset] & 0x80)) return (this[offset])\n return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n const val = this[offset] | (this[offset + 1] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n const val = this[offset + 1] | (this[offset] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16) |\n (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] << 24) |\n (this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n (this[offset + 3])\n}\n\nBuffer.prototype.readBigInt64LE = defineBigIntMethod(function readBigInt64LE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const val = this[offset + 4] +\n this[offset + 5] * 2 ** 8 +\n this[offset + 6] * 2 ** 16 +\n (last << 24) // Overflow\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24)\n})\n\nBuffer.prototype.readBigInt64BE = defineBigIntMethod(function readBigInt64BE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const val = (first << 24) + // Overflow\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset]\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last)\n})\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUintLE =\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n let mul = 1\n let i = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUintBE =\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n let i = byteLength - 1\n let mul = 1\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUint8 =\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeUint16LE =\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeUint16BE =\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeUint32LE =\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset + 3] = (value >>> 24)\n this[offset + 2] = (value >>> 16)\n this[offset + 1] = (value >>> 8)\n this[offset] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeUint32BE =\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nfunction wrtBigUInt64LE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7)\n\n let lo = Number(value & BigInt(0xffffffff))\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n return offset\n}\n\nfunction wrtBigUInt64BE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7)\n\n let lo = Number(value & BigInt(0xffffffff))\n buf[offset + 7] = lo\n lo = lo >> 8\n buf[offset + 6] = lo\n lo = lo >> 8\n buf[offset + 5] = lo\n lo = lo >> 8\n buf[offset + 4] = lo\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n buf[offset + 3] = hi\n hi = hi >> 8\n buf[offset + 2] = hi\n hi = hi >> 8\n buf[offset + 1] = hi\n hi = hi >> 8\n buf[offset] = hi\n return offset + 8\n}\n\nBuffer.prototype.writeBigUInt64LE = defineBigIntMethod(function writeBigUInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeBigUInt64BE = defineBigIntMethod(function writeBigUInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n let i = 0\n let mul = 1\n let sub = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n let i = byteLength - 1\n let mul = 1\n let sub = 0\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n if (value < 0) value = 0xff + value + 1\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n this[offset + 2] = (value >>> 16)\n this[offset + 3] = (value >>> 24)\n return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (value < 0) value = 0xffffffff + value + 1\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeBigInt64LE = defineBigIntMethod(function writeBigInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nBuffer.prototype.writeBigInt64BE = defineBigIntMethod(function writeBigInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n }\n ieee754.write(buf, value, offset, littleEndian, 23, 4)\n return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n }\n ieee754.write(buf, value, offset, littleEndian, 52, 8)\n return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n if (!Buffer.isBuffer(target)) throw new TypeError('argument should be a Buffer')\n if (!start) start = 0\n if (!end && end !== 0) end = this.length\n if (targetStart >= target.length) targetStart = target.length\n if (!targetStart) targetStart = 0\n if (end > 0 && end < start) end = start\n\n // Copy 0 bytes; we're done\n if (end === start) return 0\n if (target.length === 0 || this.length === 0) return 0\n\n // Fatal error conditions\n if (targetStart < 0) {\n throw new RangeError('targetStart out of bounds')\n }\n if (start < 0 || start >= this.length) throw new RangeError('Index out of range')\n if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n // Are we oob?\n if (end > this.length) end = this.length\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start\n }\n\n const len = end - start\n\n if (this === target && typeof Uint8Array.prototype.copyWithin === 'function') {\n // Use built-in when available, missing from IE11\n this.copyWithin(targetStart, start, end)\n } else {\n Uint8Array.prototype.set.call(\n target,\n this.subarray(start, end),\n targetStart\n )\n }\n\n return len\n}\n\n// Usage:\n// buffer.fill(number[, offset[, end]])\n// buffer.fill(buffer[, offset[, end]])\n// buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n // Handle string cases:\n if (typeof val === 'string') {\n if (typeof start === 'string') {\n encoding = start\n start = 0\n end = this.length\n } else if (typeof end === 'string') {\n encoding = end\n end = this.length\n }\n if (encoding !== undefined && typeof encoding !== 'string') {\n throw new TypeError('encoding must be a string')\n }\n if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n if (val.length === 1) {\n const code = val.charCodeAt(0)\n if ((encoding === 'utf8' && code < 128) ||\n encoding === 'latin1') {\n // Fast path: If `val` fits into a single byte, use that numeric value.\n val = code\n }\n }\n } else if (typeof val === 'number') {\n val = val & 255\n } else if (typeof val === 'boolean') {\n val = Number(val)\n }\n\n // Invalid ranges are not set to a default, so can range check early.\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError('Out of range index')\n }\n\n if (end <= start) {\n return this\n }\n\n start = start >>> 0\n end = end === undefined ? this.length : end >>> 0\n\n if (!val) val = 0\n\n let i\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val\n }\n } else {\n const bytes = Buffer.isBuffer(val)\n ? val\n : Buffer.from(val, encoding)\n const len = bytes.length\n if (len === 0) {\n throw new TypeError('The value \"' + val +\n '\" is invalid for argument \"value\"')\n }\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len]\n }\n }\n\n return this\n}\n\n// CUSTOM ERRORS\n// =============\n\n// Simplified versions from Node, changed for Buffer-only usage\nconst errors = {}\nfunction E (sym, getMessage, Base) {\n errors[sym] = class NodeError extends Base {\n constructor () {\n super()\n\n Object.defineProperty(this, 'message', {\n value: getMessage.apply(this, arguments),\n writable: true,\n configurable: true\n })\n\n // Add the error code to the name to include it in the stack trace.\n this.name = `${this.name} [${sym}]`\n // Access the stack to generate the error message including the error code\n // from the name.\n this.stack // eslint-disable-line no-unused-expressions\n // Reset the name to the actual name.\n delete this.name\n }\n\n get code () {\n return sym\n }\n\n set code (value) {\n Object.defineProperty(this, 'code', {\n configurable: true,\n enumerable: true,\n value,\n writable: true\n })\n }\n\n toString () {\n return `${this.name} [${sym}]: ${this.message}`\n }\n }\n}\n\nE('ERR_BUFFER_OUT_OF_BOUNDS',\n function (name) {\n if (name) {\n return `${name} is outside of buffer bounds`\n }\n\n return 'Attempt to access memory outside buffer bounds'\n }, RangeError)\nE('ERR_INVALID_ARG_TYPE',\n function (name, actual) {\n return `The \"${name}\" argument must be of type number. Received type ${typeof actual}`\n }, TypeError)\nE('ERR_OUT_OF_RANGE',\n function (str, range, input) {\n let msg = `The value of \"${str}\" is out of range.`\n let received = input\n if (Number.isInteger(input) && Math.abs(input) > 2 ** 32) {\n received = addNumericalSeparator(String(input))\n } else if (typeof input === 'bigint') {\n received = String(input)\n if (input > BigInt(2) ** BigInt(32) || input < -(BigInt(2) ** BigInt(32))) {\n received = addNumericalSeparator(received)\n }\n received += 'n'\n }\n msg += ` It must be ${range}. Received ${received}`\n return msg\n }, RangeError)\n\nfunction addNumericalSeparator (val) {\n let res = ''\n let i = val.length\n const start = val[0] === '-' ? 1 : 0\n for (; i >= start + 4; i -= 3) {\n res = `_${val.slice(i - 3, i)}${res}`\n }\n return `${val.slice(0, i)}${res}`\n}\n\n// CHECK FUNCTIONS\n// ===============\n\nfunction checkBounds (buf, offset, byteLength) {\n validateNumber(offset, 'offset')\n if (buf[offset] === undefined || buf[offset + byteLength] === undefined) {\n boundsError(offset, buf.length - (byteLength + 1))\n }\n}\n\nfunction checkIntBI (value, min, max, buf, offset, byteLength) {\n if (value > max || value < min) {\n const n = typeof min === 'bigint' ? 'n' : ''\n let range\n if (byteLength > 3) {\n if (min === 0 || min === BigInt(0)) {\n range = `>= 0${n} and < 2${n} ** ${(byteLength + 1) * 8}${n}`\n } else {\n range = `>= -(2${n} ** ${(byteLength + 1) * 8 - 1}${n}) and < 2 ** ` +\n `${(byteLength + 1) * 8 - 1}${n}`\n }\n } else {\n range = `>= ${min}${n} and <= ${max}${n}`\n }\n throw new errors.ERR_OUT_OF_RANGE('value', range, value)\n }\n checkBounds(buf, offset, byteLength)\n}\n\nfunction validateNumber (value, name) {\n if (typeof value !== 'number') {\n throw new errors.ERR_INVALID_ARG_TYPE(name, 'number', value)\n }\n}\n\nfunction boundsError (value, length, type) {\n if (Math.floor(value) !== value) {\n validateNumber(value, type)\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset', 'an integer', value)\n }\n\n if (length < 0) {\n throw new errors.ERR_BUFFER_OUT_OF_BOUNDS()\n }\n\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset',\n `>= ${type ? 1 : 0} and <= ${length}`,\n value)\n}\n\n// HELPER FUNCTIONS\n// ================\n\nconst INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n // Node takes equal signs as end of the Base64 encoding\n str = str.split('=')[0]\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = str.trim().replace(INVALID_BASE64_RE, '')\n // Node converts strings with length < 2 to ''\n if (str.length < 2) return ''\n // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n while (str.length % 4 !== 0) {\n str = str + '='\n }\n return str\n}\n\nfunction utf8ToBytes (string, units) {\n units = units || Infinity\n let codePoint\n const length = string.length\n let leadSurrogate = null\n const bytes = []\n\n for (let i = 0; i < length; ++i) {\n codePoint = string.charCodeAt(i)\n\n // is surrogate component\n if (codePoint > 0xD7FF && codePoint < 0xE000) {\n // last char was a lead\n if (!leadSurrogate) {\n // no lead yet\n if (codePoint > 0xDBFF) {\n // unexpected trail\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n } else if (i + 1 === length) {\n // unpaired lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n }\n\n // valid lead\n leadSurrogate = codePoint\n\n continue\n }\n\n // 2 leads in a row\n if (codePoint < 0xDC00) {\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n leadSurrogate = codePoint\n continue\n }\n\n // valid surrogate pair\n codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n } else if (leadSurrogate) {\n // valid bmp char, but last char was a lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n }\n\n leadSurrogate = null\n\n // encode utf8\n if (codePoint < 0x80) {\n if ((units -= 1) < 0) break\n bytes.push(codePoint)\n } else if (codePoint < 0x800) {\n if ((units -= 2) < 0) break\n bytes.push(\n codePoint >> 0x6 | 0xC0,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x10000) {\n if ((units -= 3) < 0) break\n bytes.push(\n codePoint >> 0xC | 0xE0,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x110000) {\n if ((units -= 4) < 0) break\n bytes.push(\n codePoint >> 0x12 | 0xF0,\n codePoint >> 0xC & 0x3F | 0x80,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else {\n throw new Error('Invalid code point')\n }\n }\n\n return bytes\n}\n\nfunction asciiToBytes (str) {\n const byteArray = []\n for (let i = 0; i < str.length; ++i) {\n // Node's code seems to be doing this and not & 0x7F..\n byteArray.push(str.charCodeAt(i) & 0xFF)\n }\n return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n let c, hi, lo\n const byteArray = []\n for (let i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0) break\n\n c = str.charCodeAt(i)\n hi = c >> 8\n lo = c % 256\n byteArray.push(lo)\n byteArray.push(hi)\n }\n\n return byteArray\n}\n\nfunction base64ToBytes (str) {\n return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n let i\n for (i = 0; i < length; ++i) {\n if ((i + offset >= dst.length) || (i >= src.length)) break\n dst[i + offset] = src[i]\n }\n return i\n}\n\n// ArrayBuffer or Uint8Array objects from other contexts (i.e. iframes) do not pass\n// the `instanceof` check but they should be treated as of that type.\n// See: https://github.com/feross/buffer/issues/166\nfunction isInstance (obj, type) {\n return obj instanceof type ||\n (obj != null && obj.constructor != null && obj.constructor.name != null &&\n obj.constructor.name === type.name)\n}\nfunction numberIsNaN (obj) {\n // For IE11 support\n return obj !== obj // eslint-disable-line no-self-compare\n}\n\n// Create lookup table for `toString('hex')`\n// See: https://github.com/feross/buffer/issues/219\nconst hexSliceLookupTable = (function () {\n const alphabet = '0123456789abcdef'\n const table = new Array(256)\n for (let i = 0; i < 16; ++i) {\n const i16 = i * 16\n for (let j = 0; j < 16; ++j) {\n table[i16 + j] = alphabet[i] + alphabet[j]\n }\n }\n return table\n})()\n\n// Return not function with Error if BigInt not supported\nfunction defineBigIntMethod (fn) {\n return typeof BigInt === 'undefined' ? BufferBigIntNotDefined : fn\n}\n\nfunction BufferBigIntNotDefined () {\n throw new Error('BigInt not supported')\n}\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\nvar R = typeof Reflect === 'object' ? Reflect : null\nvar ReflectApply = R && typeof R.apply === 'function'\n ? R.apply\n : function ReflectApply(target, receiver, args) {\n return Function.prototype.apply.call(target, receiver, args);\n }\n\nvar ReflectOwnKeys\nif (R && typeof R.ownKeys === 'function') {\n ReflectOwnKeys = R.ownKeys\n} else if (Object.getOwnPropertySymbols) {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target)\n .concat(Object.getOwnPropertySymbols(target));\n };\n} else {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target);\n };\n}\n\nfunction ProcessEmitWarning(warning) {\n if (console && console.warn) console.warn(warning);\n}\n\nvar NumberIsNaN = Number.isNaN || function NumberIsNaN(value) {\n return value !== value;\n}\n\nfunction EventEmitter() {\n EventEmitter.init.call(this);\n}\nmodule.exports = EventEmitter;\nmodule.exports.once = once;\n\n// Backwards-compat with node 0.10.x\nEventEmitter.EventEmitter = EventEmitter;\n\nEventEmitter.prototype._events = undefined;\nEventEmitter.prototype._eventsCount = 0;\nEventEmitter.prototype._maxListeners = undefined;\n\n// By default EventEmitters will print a warning if more than 10 listeners are\n// added to it. This is a useful default which helps finding memory leaks.\nvar defaultMaxListeners = 10;\n\nfunction checkListener(listener) {\n if (typeof listener !== 'function') {\n throw new TypeError('The \"listener\" argument must be of type Function. Received type ' + typeof listener);\n }\n}\n\nObject.defineProperty(EventEmitter, 'defaultMaxListeners', {\n enumerable: true,\n get: function() {\n return defaultMaxListeners;\n },\n set: function(arg) {\n if (typeof arg !== 'number' || arg < 0 || NumberIsNaN(arg)) {\n throw new RangeError('The value of \"defaultMaxListeners\" is out of range. It must be a non-negative number. Received ' + arg + '.');\n }\n defaultMaxListeners = arg;\n }\n});\n\nEventEmitter.init = function() {\n\n if (this._events === undefined ||\n this._events === Object.getPrototypeOf(this)._events) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n }\n\n this._maxListeners = this._maxListeners || undefined;\n};\n\n// Obviously not all Emitters should be limited to 10. This function allows\n// that to be increased. Set to zero for unlimited.\nEventEmitter.prototype.setMaxListeners = function setMaxListeners(n) {\n if (typeof n !== 'number' || n < 0 || NumberIsNaN(n)) {\n throw new RangeError('The value of \"n\" is out of range. It must be a non-negative number. Received ' + n + '.');\n }\n this._maxListeners = n;\n return this;\n};\n\nfunction _getMaxListeners(that) {\n if (that._maxListeners === undefined)\n return EventEmitter.defaultMaxListeners;\n return that._maxListeners;\n}\n\nEventEmitter.prototype.getMaxListeners = function getMaxListeners() {\n return _getMaxListeners(this);\n};\n\nEventEmitter.prototype.emit = function emit(type) {\n var args = [];\n for (var i = 1; i < arguments.length; i++) args.push(arguments[i]);\n var doError = (type === 'error');\n\n var events = this._events;\n if (events !== undefined)\n doError = (doError && events.error === undefined);\n else if (!doError)\n return false;\n\n // If there is no 'error' event listener then throw.\n if (doError) {\n var er;\n if (args.length > 0)\n er = args[0];\n if (er instanceof Error) {\n // Note: The comments on the `throw` lines are intentional, they show\n // up in Node's output if this results in an unhandled exception.\n throw er; // Unhandled 'error' event\n }\n // At least give some kind of context to the user\n var err = new Error('Unhandled error.' + (er ? ' (' + er.message + ')' : ''));\n err.context = er;\n throw err; // Unhandled 'error' event\n }\n\n var handler = events[type];\n\n if (handler === undefined)\n return false;\n\n if (typeof handler === 'function') {\n ReflectApply(handler, this, args);\n } else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n ReflectApply(listeners[i], this, args);\n }\n\n return true;\n};\n\nfunction _addListener(target, type, listener, prepend) {\n var m;\n var events;\n var existing;\n\n checkListener(listener);\n\n events = target._events;\n if (events === undefined) {\n events = target._events = Object.create(null);\n target._eventsCount = 0;\n } else {\n // To avoid recursion in the case that type === \"newListener\"! Before\n // adding it to the listeners, first emit \"newListener\".\n if (events.newListener !== undefined) {\n target.emit('newListener', type,\n listener.listener ? listener.listener : listener);\n\n // Re-assign `events` because a newListener handler could have caused the\n // this._events to be assigned to a new object\n events = target._events;\n }\n existing = events[type];\n }\n\n if (existing === undefined) {\n // Optimize the case of one listener. Don't need the extra array object.\n existing = events[type] = listener;\n ++target._eventsCount;\n } else {\n if (typeof existing === 'function') {\n // Adding the second element, need to change to array.\n existing = events[type] =\n prepend ? [listener, existing] : [existing, listener];\n // If we've already got an array, just append.\n } else if (prepend) {\n existing.unshift(listener);\n } else {\n existing.push(listener);\n }\n\n // Check for listener leak\n m = _getMaxListeners(target);\n if (m > 0 && existing.length > m && !existing.warned) {\n existing.warned = true;\n // No error code for this since it is a Warning\n // eslint-disable-next-line no-restricted-syntax\n var w = new Error('Possible EventEmitter memory leak detected. ' +\n existing.length + ' ' + String(type) + ' listeners ' +\n 'added. Use emitter.setMaxListeners() to ' +\n 'increase limit');\n w.name = 'MaxListenersExceededWarning';\n w.emitter = target;\n w.type = type;\n w.count = existing.length;\n ProcessEmitWarning(w);\n }\n }\n\n return target;\n}\n\nEventEmitter.prototype.addListener = function addListener(type, listener) {\n return _addListener(this, type, listener, false);\n};\n\nEventEmitter.prototype.on = EventEmitter.prototype.addListener;\n\nEventEmitter.prototype.prependListener =\n function prependListener(type, listener) {\n return _addListener(this, type, listener, true);\n };\n\nfunction onceWrapper() {\n if (!this.fired) {\n this.target.removeListener(this.type, this.wrapFn);\n this.fired = true;\n if (arguments.length === 0)\n return this.listener.call(this.target);\n return this.listener.apply(this.target, arguments);\n }\n}\n\nfunction _onceWrap(target, type, listener) {\n var state = { fired: false, wrapFn: undefined, target: target, type: type, listener: listener };\n var wrapped = onceWrapper.bind(state);\n wrapped.listener = listener;\n state.wrapFn = wrapped;\n return wrapped;\n}\n\nEventEmitter.prototype.once = function once(type, listener) {\n checkListener(listener);\n this.on(type, _onceWrap(this, type, listener));\n return this;\n};\n\nEventEmitter.prototype.prependOnceListener =\n function prependOnceListener(type, listener) {\n checkListener(listener);\n this.prependListener(type, _onceWrap(this, type, listener));\n return this;\n };\n\n// Emits a 'removeListener' event if and only if the listener was removed.\nEventEmitter.prototype.removeListener =\n function removeListener(type, listener) {\n var list, events, position, i, originalListener;\n\n checkListener(listener);\n\n events = this._events;\n if (events === undefined)\n return this;\n\n list = events[type];\n if (list === undefined)\n return this;\n\n if (list === listener || list.listener === listener) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else {\n delete events[type];\n if (events.removeListener)\n this.emit('removeListener', type, list.listener || listener);\n }\n } else if (typeof list !== 'function') {\n position = -1;\n\n for (i = list.length - 1; i >= 0; i--) {\n if (list[i] === listener || list[i].listener === listener) {\n originalListener = list[i].listener;\n position = i;\n break;\n }\n }\n\n if (position < 0)\n return this;\n\n if (position === 0)\n list.shift();\n else {\n spliceOne(list, position);\n }\n\n if (list.length === 1)\n events[type] = list[0];\n\n if (events.removeListener !== undefined)\n this.emit('removeListener', type, originalListener || listener);\n }\n\n return this;\n };\n\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\n\nEventEmitter.prototype.removeAllListeners =\n function removeAllListeners(type) {\n var listeners, events, i;\n\n events = this._events;\n if (events === undefined)\n return this;\n\n // not listening for removeListener, no need to emit\n if (events.removeListener === undefined) {\n if (arguments.length === 0) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n } else if (events[type] !== undefined) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else\n delete events[type];\n }\n return this;\n }\n\n // emit removeListener for all listeners on all events\n if (arguments.length === 0) {\n var keys = Object.keys(events);\n var key;\n for (i = 0; i < keys.length; ++i) {\n key = keys[i];\n if (key === 'removeListener') continue;\n this.removeAllListeners(key);\n }\n this.removeAllListeners('removeListener');\n this._events = Object.create(null);\n this._eventsCount = 0;\n return this;\n }\n\n listeners = events[type];\n\n if (typeof listeners === 'function') {\n this.removeListener(type, listeners);\n } else if (listeners !== undefined) {\n // LIFO order\n for (i = listeners.length - 1; i >= 0; i--) {\n this.removeListener(type, listeners[i]);\n }\n }\n\n return this;\n };\n\nfunction _listeners(target, type, unwrap) {\n var events = target._events;\n\n if (events === undefined)\n return [];\n\n var evlistener = events[type];\n if (evlistener === undefined)\n return [];\n\n if (typeof evlistener === 'function')\n return unwrap ? [evlistener.listener || evlistener] : [evlistener];\n\n return unwrap ?\n unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length);\n}\n\nEventEmitter.prototype.listeners = function listeners(type) {\n return _listeners(this, type, true);\n};\n\nEventEmitter.prototype.rawListeners = function rawListeners(type) {\n return _listeners(this, type, false);\n};\n\nEventEmitter.listenerCount = function(emitter, type) {\n if (typeof emitter.listenerCount === 'function') {\n return emitter.listenerCount(type);\n } else {\n return listenerCount.call(emitter, type);\n }\n};\n\nEventEmitter.prototype.listenerCount = listenerCount;\nfunction listenerCount(type) {\n var events = this._events;\n\n if (events !== undefined) {\n var evlistener = events[type];\n\n if (typeof evlistener === 'function') {\n return 1;\n } else if (evlistener !== undefined) {\n return evlistener.length;\n }\n }\n\n return 0;\n}\n\nEventEmitter.prototype.eventNames = function eventNames() {\n return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : [];\n};\n\nfunction arrayClone(arr, n) {\n var copy = new Array(n);\n for (var i = 0; i < n; ++i)\n copy[i] = arr[i];\n return copy;\n}\n\nfunction spliceOne(list, index) {\n for (; index + 1 < list.length; index++)\n list[index] = list[index + 1];\n list.pop();\n}\n\nfunction unwrapListeners(arr) {\n var ret = new Array(arr.length);\n for (var i = 0; i < ret.length; ++i) {\n ret[i] = arr[i].listener || arr[i];\n }\n return ret;\n}\n\nfunction once(emitter, name) {\n return new Promise(function (resolve, reject) {\n function errorListener(err) {\n emitter.removeListener(name, resolver);\n reject(err);\n }\n\n function resolver() {\n if (typeof emitter.removeListener === 'function') {\n emitter.removeListener('error', errorListener);\n }\n resolve([].slice.call(arguments));\n };\n\n eventTargetAgnosticAddListener(emitter, name, resolver, { once: true });\n if (name !== 'error') {\n addErrorHandlerIfEventEmitter(emitter, errorListener, { once: true });\n }\n });\n}\n\nfunction addErrorHandlerIfEventEmitter(emitter, handler, flags) {\n if (typeof emitter.on === 'function') {\n eventTargetAgnosticAddListener(emitter, 'error', handler, flags);\n }\n}\n\nfunction eventTargetAgnosticAddListener(emitter, name, listener, flags) {\n if (typeof emitter.on === 'function') {\n if (flags.once) {\n emitter.once(name, listener);\n } else {\n emitter.on(name, listener);\n }\n } else if (typeof emitter.addEventListener === 'function') {\n // EventTarget does not have `error` event semantics like Node\n // EventEmitters, we do not listen for `error` events here.\n emitter.addEventListener(name, function wrapListener(arg) {\n // IE does not have builtin `{ once: true }` support so we\n // have to do it manually.\n if (flags.once) {\n emitter.removeEventListener(name, wrapListener);\n }\n listener(arg);\n });\n } else {\n throw new TypeError('The \"emitter\" argument must be of type EventEmitter. Received type ' + typeof emitter);\n }\n}\n","/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */\nexports.read = function (buffer, offset, isLE, mLen, nBytes) {\n var e, m\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var nBits = -7\n var i = isLE ? (nBytes - 1) : 0\n var d = isLE ? -1 : 1\n var s = buffer[offset + i]\n\n i += d\n\n e = s & ((1 << (-nBits)) - 1)\n s >>= (-nBits)\n nBits += eLen\n for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & ((1 << (-nBits)) - 1)\n e >>= (-nBits)\n nBits += mLen\n for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias\n } else if (e === eMax) {\n return m ? NaN : ((s ? -1 : 1) * Infinity)\n } else {\n m = m + Math.pow(2, mLen)\n e = e - eBias\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n var i = isLE ? 0 : (nBytes - 1)\n var d = isLE ? 1 : -1\n var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n value = Math.abs(value)\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0\n e = eMax\n } else {\n e = Math.floor(Math.log(value) / Math.LN2)\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--\n c *= 2\n }\n if (e + eBias >= 1) {\n value += rt / c\n } else {\n value += rt * Math.pow(2, 1 - eBias)\n }\n if (value * c >= 2) {\n e++\n c /= 2\n }\n\n if (e + eBias >= eMax) {\n m = 0\n e = eMax\n } else if (e + eBias >= 1) {\n m = ((value * c) - 1) * Math.pow(2, mLen)\n e = e + eBias\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n e = 0\n }\n }\n\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n e = (e << mLen) | m\n eLen += mLen\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128\n}\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView');\n\nmodule.exports = DataView;\n","var hashClear = require('./_hashClear'),\n hashDelete = require('./_hashDelete'),\n hashGet = require('./_hashGet'),\n hashHas = require('./_hashHas'),\n hashSet = require('./_hashSet');\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\nmodule.exports = Hash;\n","var listCacheClear = require('./_listCacheClear'),\n listCacheDelete = require('./_listCacheDelete'),\n listCacheGet = require('./_listCacheGet'),\n listCacheHas = require('./_listCacheHas'),\n listCacheSet = require('./_listCacheSet');\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\nmodule.exports = ListCache;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map');\n\nmodule.exports = Map;\n","var mapCacheClear = require('./_mapCacheClear'),\n mapCacheDelete = require('./_mapCacheDelete'),\n mapCacheGet = require('./_mapCacheGet'),\n mapCacheHas = require('./_mapCacheHas'),\n mapCacheSet = require('./_mapCacheSet');\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\nmodule.exports = MapCache;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Promise = getNative(root, 'Promise');\n\nmodule.exports = Promise;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Set = getNative(root, 'Set');\n\nmodule.exports = Set;\n","var MapCache = require('./_MapCache'),\n setCacheAdd = require('./_setCacheAdd'),\n setCacheHas = require('./_setCacheHas');\n\n/**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\nfunction SetCache(values) {\n var index = -1,\n length = values == null ? 0 : values.length;\n\n this.__data__ = new MapCache;\n while (++index < length) {\n this.add(values[index]);\n }\n}\n\n// Add methods to `SetCache`.\nSetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\nSetCache.prototype.has = setCacheHas;\n\nmodule.exports = SetCache;\n","var ListCache = require('./_ListCache'),\n stackClear = require('./_stackClear'),\n stackDelete = require('./_stackDelete'),\n stackGet = require('./_stackGet'),\n stackHas = require('./_stackHas'),\n stackSet = require('./_stackSet');\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\nmodule.exports = Stack;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Uint8Array = root.Uint8Array;\n\nmodule.exports = Uint8Array;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar WeakMap = getNative(root, 'WeakMap');\n\nmodule.exports = WeakMap;\n","/**\n * A specialized version of `_.forEach` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\nfunction arrayEach(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (iteratee(array[index], index, array) === false) {\n break;\n }\n }\n return array;\n}\n\nmodule.exports = arrayEach;\n","/**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\nfunction arrayFilter(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result[resIndex++] = value;\n }\n }\n return result;\n}\n\nmodule.exports = arrayFilter;\n","var baseTimes = require('./_baseTimes'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isIndex = require('./_isIndex'),\n isTypedArray = require('./isTypedArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = arrayLikeKeys;\n","/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n}\n\nmodule.exports = arrayPush;\n","/**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\nfunction arraySome(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (predicate(array[index], index, array)) {\n return true;\n }\n }\n return false;\n}\n\nmodule.exports = arraySome;\n","var baseAssignValue = require('./_baseAssignValue'),\n eq = require('./eq');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\nmodule.exports = assignValue;\n","var eq = require('./eq');\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\nmodule.exports = assocIndexOf;\n","var copyObject = require('./_copyObject'),\n keys = require('./keys');\n\n/**\n * The base implementation of `_.assign` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssign(object, source) {\n return object && copyObject(source, keys(source), object);\n}\n\nmodule.exports = baseAssign;\n","var copyObject = require('./_copyObject'),\n keysIn = require('./keysIn');\n\n/**\n * The base implementation of `_.assignIn` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssignIn(object, source) {\n return object && copyObject(source, keysIn(source), object);\n}\n\nmodule.exports = baseAssignIn;\n","var defineProperty = require('./_defineProperty');\n\n/**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction baseAssignValue(object, key, value) {\n if (key == '__proto__' && defineProperty) {\n defineProperty(object, key, {\n 'configurable': true,\n 'enumerable': true,\n 'value': value,\n 'writable': true\n });\n } else {\n object[key] = value;\n }\n}\n\nmodule.exports = baseAssignValue;\n","var Stack = require('./_Stack'),\n arrayEach = require('./_arrayEach'),\n assignValue = require('./_assignValue'),\n baseAssign = require('./_baseAssign'),\n baseAssignIn = require('./_baseAssignIn'),\n cloneBuffer = require('./_cloneBuffer'),\n copyArray = require('./_copyArray'),\n copySymbols = require('./_copySymbols'),\n copySymbolsIn = require('./_copySymbolsIn'),\n getAllKeys = require('./_getAllKeys'),\n getAllKeysIn = require('./_getAllKeysIn'),\n getTag = require('./_getTag'),\n initCloneArray = require('./_initCloneArray'),\n initCloneByTag = require('./_initCloneByTag'),\n initCloneObject = require('./_initCloneObject'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isMap = require('./isMap'),\n isObject = require('./isObject'),\n isSet = require('./isSet'),\n keys = require('./keys'),\n keysIn = require('./keysIn');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_FLAT_FLAG = 2,\n CLONE_SYMBOLS_FLAG = 4;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values supported by `_.clone`. */\nvar cloneableTags = {};\ncloneableTags[argsTag] = cloneableTags[arrayTag] =\ncloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =\ncloneableTags[boolTag] = cloneableTags[dateTag] =\ncloneableTags[float32Tag] = cloneableTags[float64Tag] =\ncloneableTags[int8Tag] = cloneableTags[int16Tag] =\ncloneableTags[int32Tag] = cloneableTags[mapTag] =\ncloneableTags[numberTag] = cloneableTags[objectTag] =\ncloneableTags[regexpTag] = cloneableTags[setTag] =\ncloneableTags[stringTag] = cloneableTags[symbolTag] =\ncloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =\ncloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;\ncloneableTags[errorTag] = cloneableTags[funcTag] =\ncloneableTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.clone` and `_.cloneDeep` which tracks\n * traversed objects.\n *\n * @private\n * @param {*} value The value to clone.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Deep clone\n * 2 - Flatten inherited properties\n * 4 - Clone symbols\n * @param {Function} [customizer] The function to customize cloning.\n * @param {string} [key] The key of `value`.\n * @param {Object} [object] The parent object of `value`.\n * @param {Object} [stack] Tracks traversed objects and their clone counterparts.\n * @returns {*} Returns the cloned value.\n */\nfunction baseClone(value, bitmask, customizer, key, object, stack) {\n var result,\n isDeep = bitmask & CLONE_DEEP_FLAG,\n isFlat = bitmask & CLONE_FLAT_FLAG,\n isFull = bitmask & CLONE_SYMBOLS_FLAG;\n\n if (customizer) {\n result = object ? customizer(value, key, object, stack) : customizer(value);\n }\n if (result !== undefined) {\n return result;\n }\n if (!isObject(value)) {\n return value;\n }\n var isArr = isArray(value);\n if (isArr) {\n result = initCloneArray(value);\n if (!isDeep) {\n return copyArray(value, result);\n }\n } else {\n var tag = getTag(value),\n isFunc = tag == funcTag || tag == genTag;\n\n if (isBuffer(value)) {\n return cloneBuffer(value, isDeep);\n }\n if (tag == objectTag || tag == argsTag || (isFunc && !object)) {\n result = (isFlat || isFunc) ? {} : initCloneObject(value);\n if (!isDeep) {\n return isFlat\n ? copySymbolsIn(value, baseAssignIn(result, value))\n : copySymbols(value, baseAssign(result, value));\n }\n } else {\n if (!cloneableTags[tag]) {\n return object ? value : {};\n }\n result = initCloneByTag(value, tag, isDeep);\n }\n }\n // Check for circular references and return its corresponding clone.\n stack || (stack = new Stack);\n var stacked = stack.get(value);\n if (stacked) {\n return stacked;\n }\n stack.set(value, result);\n\n if (isSet(value)) {\n value.forEach(function(subValue) {\n result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));\n });\n } else if (isMap(value)) {\n value.forEach(function(subValue, key) {\n result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n }\n\n var keysFunc = isFull\n ? (isFlat ? getAllKeysIn : getAllKeys)\n : (isFlat ? keysIn : keys);\n\n var props = isArr ? undefined : keysFunc(value);\n arrayEach(props || value, function(subValue, key) {\n if (props) {\n key = subValue;\n subValue = value[key];\n }\n // Recursively populate clone (susceptible to call stack limits).\n assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n return result;\n}\n\nmodule.exports = baseClone;\n","var isObject = require('./isObject');\n\n/** Built-in value references. */\nvar objectCreate = Object.create;\n\n/**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} proto The object to inherit from.\n * @returns {Object} Returns the new object.\n */\nvar baseCreate = (function() {\n function object() {}\n return function(proto) {\n if (!isObject(proto)) {\n return {};\n }\n if (objectCreate) {\n return objectCreate(proto);\n }\n object.prototype = proto;\n var result = new object;\n object.prototype = undefined;\n return result;\n };\n}());\n\nmodule.exports = baseCreate;\n","var arrayPush = require('./_arrayPush'),\n isArray = require('./isArray');\n\n/**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction baseGetAllKeys(object, keysFunc, symbolsFunc) {\n var result = keysFunc(object);\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n}\n\nmodule.exports = baseGetAllKeys;\n","var Symbol = require('./_Symbol'),\n getRawTag = require('./_getRawTag'),\n objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]';\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\nmodule.exports = baseIsArguments;\n","var baseIsEqualDeep = require('./_baseIsEqualDeep'),\n isObjectLike = require('./isObjectLike');\n\n/**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Unordered comparison\n * 2 - Partial comparison\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\nfunction baseIsEqual(value, other, bitmask, customizer, stack) {\n if (value === other) {\n return true;\n }\n if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\n return value !== value && other !== other;\n }\n return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n}\n\nmodule.exports = baseIsEqual;\n","var Stack = require('./_Stack'),\n equalArrays = require('./_equalArrays'),\n equalByTag = require('./_equalByTag'),\n equalObjects = require('./_equalObjects'),\n getTag = require('./_getTag'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isTypedArray = require('./isTypedArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n var objIsArr = isArray(object),\n othIsArr = isArray(other),\n objTag = objIsArr ? arrayTag : getTag(object),\n othTag = othIsArr ? arrayTag : getTag(other);\n\n objTag = objTag == argsTag ? objectTag : objTag;\n othTag = othTag == argsTag ? objectTag : othTag;\n\n var objIsObj = objTag == objectTag,\n othIsObj = othTag == objectTag,\n isSameTag = objTag == othTag;\n\n if (isSameTag && isBuffer(object)) {\n if (!isBuffer(other)) {\n return false;\n }\n objIsArr = true;\n objIsObj = false;\n }\n if (isSameTag && !objIsObj) {\n stack || (stack = new Stack);\n return (objIsArr || isTypedArray(object))\n ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n }\n if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n if (objIsWrapped || othIsWrapped) {\n var objUnwrapped = objIsWrapped ? object.value() : object,\n othUnwrapped = othIsWrapped ? other.value() : other;\n\n stack || (stack = new Stack);\n return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n }\n }\n if (!isSameTag) {\n return false;\n }\n stack || (stack = new Stack);\n return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n}\n\nmodule.exports = baseIsEqualDeep;\n","var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]';\n\n/**\n * The base implementation of `_.isMap` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n */\nfunction baseIsMap(value) {\n return isObjectLike(value) && getTag(value) == mapTag;\n}\n\nmodule.exports = baseIsMap;\n","var isFunction = require('./isFunction'),\n isMasked = require('./_isMasked'),\n isObject = require('./isObject'),\n toSource = require('./_toSource');\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\nmodule.exports = baseIsNative;\n","var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar setTag = '[object Set]';\n\n/**\n * The base implementation of `_.isSet` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n */\nfunction baseIsSet(value) {\n return isObjectLike(value) && getTag(value) == setTag;\n}\n\nmodule.exports = baseIsSet;\n","var baseGetTag = require('./_baseGetTag'),\n isLength = require('./isLength'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n\nmodule.exports = baseIsTypedArray;\n","var isPrototype = require('./_isPrototype'),\n nativeKeys = require('./_nativeKeys');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeys;\n","var isObject = require('./isObject'),\n isPrototype = require('./_isPrototype'),\n nativeKeysIn = require('./_nativeKeysIn');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeysIn(object) {\n if (!isObject(object)) {\n return nativeKeysIn(object);\n }\n var isProto = isPrototype(object),\n result = [];\n\n for (var key in object) {\n if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeysIn;\n","/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\nmodule.exports = baseTimes;\n","/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n return function(value) {\n return func(value);\n };\n}\n\nmodule.exports = baseUnary;\n","/**\n * Checks if a `cache` value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction cacheHas(cache, key) {\n return cache.has(key);\n}\n\nmodule.exports = cacheHas;\n","var Uint8Array = require('./_Uint8Array');\n\n/**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\nfunction cloneArrayBuffer(arrayBuffer) {\n var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n return result;\n}\n\nmodule.exports = cloneArrayBuffer;\n","var root = require('./_root');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined,\n allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;\n\n/**\n * Creates a clone of `buffer`.\n *\n * @private\n * @param {Buffer} buffer The buffer to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Buffer} Returns the cloned buffer.\n */\nfunction cloneBuffer(buffer, isDeep) {\n if (isDeep) {\n return buffer.slice();\n }\n var length = buffer.length,\n result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\n\n buffer.copy(result);\n return result;\n}\n\nmodule.exports = cloneBuffer;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer');\n\n/**\n * Creates a clone of `dataView`.\n *\n * @private\n * @param {Object} dataView The data view to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned data view.\n */\nfunction cloneDataView(dataView, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;\n return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);\n}\n\nmodule.exports = cloneDataView;\n","/** Used to match `RegExp` flags from their coerced string values. */\nvar reFlags = /\\w*$/;\n\n/**\n * Creates a clone of `regexp`.\n *\n * @private\n * @param {Object} regexp The regexp to clone.\n * @returns {Object} Returns the cloned regexp.\n */\nfunction cloneRegExp(regexp) {\n var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));\n result.lastIndex = regexp.lastIndex;\n return result;\n}\n\nmodule.exports = cloneRegExp;\n","var Symbol = require('./_Symbol');\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * Creates a clone of the `symbol` object.\n *\n * @private\n * @param {Object} symbol The symbol object to clone.\n * @returns {Object} Returns the cloned symbol object.\n */\nfunction cloneSymbol(symbol) {\n return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};\n}\n\nmodule.exports = cloneSymbol;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer');\n\n/**\n * Creates a clone of `typedArray`.\n *\n * @private\n * @param {Object} typedArray The typed array to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned typed array.\n */\nfunction cloneTypedArray(typedArray, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n}\n\nmodule.exports = cloneTypedArray;\n","/**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\nfunction copyArray(source, array) {\n var index = -1,\n length = source.length;\n\n array || (array = Array(length));\n while (++index < length) {\n array[index] = source[index];\n }\n return array;\n}\n\nmodule.exports = copyArray;\n","var assignValue = require('./_assignValue'),\n baseAssignValue = require('./_baseAssignValue');\n\n/**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\nfunction copyObject(source, props, object, customizer) {\n var isNew = !object;\n object || (object = {});\n\n var index = -1,\n length = props.length;\n\n while (++index < length) {\n var key = props[index];\n\n var newValue = customizer\n ? customizer(object[key], source[key], key, object, source)\n : undefined;\n\n if (newValue === undefined) {\n newValue = source[key];\n }\n if (isNew) {\n baseAssignValue(object, key, newValue);\n } else {\n assignValue(object, key, newValue);\n }\n }\n return object;\n}\n\nmodule.exports = copyObject;\n","var copyObject = require('./_copyObject'),\n getSymbols = require('./_getSymbols');\n\n/**\n * Copies own symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbols(source, object) {\n return copyObject(source, getSymbols(source), object);\n}\n\nmodule.exports = copySymbols;\n","var copyObject = require('./_copyObject'),\n getSymbolsIn = require('./_getSymbolsIn');\n\n/**\n * Copies own and inherited symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbolsIn(source, object) {\n return copyObject(source, getSymbolsIn(source), object);\n}\n\nmodule.exports = copySymbolsIn;\n","var root = require('./_root');\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\nmodule.exports = coreJsData;\n","var getNative = require('./_getNative');\n\nvar defineProperty = (function() {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n}());\n\nmodule.exports = defineProperty;\n","var SetCache = require('./_SetCache'),\n arraySome = require('./_arraySome'),\n cacheHas = require('./_cacheHas');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\nfunction equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n arrLength = array.length,\n othLength = other.length;\n\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n return false;\n }\n // Check that cyclic values are equal.\n var arrStacked = stack.get(array);\n var othStacked = stack.get(other);\n if (arrStacked && othStacked) {\n return arrStacked == other && othStacked == array;\n }\n var index = -1,\n result = true,\n seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n stack.set(array, other);\n stack.set(other, array);\n\n // Ignore non-index properties.\n while (++index < arrLength) {\n var arrValue = array[index],\n othValue = other[index];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, arrValue, index, other, array, stack)\n : customizer(arrValue, othValue, index, array, other, stack);\n }\n if (compared !== undefined) {\n if (compared) {\n continue;\n }\n result = false;\n break;\n }\n // Recursively compare arrays (susceptible to call stack limits).\n if (seen) {\n if (!arraySome(other, function(othValue, othIndex) {\n if (!cacheHas(seen, othIndex) &&\n (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n return seen.push(othIndex);\n }\n })) {\n result = false;\n break;\n }\n } else if (!(\n arrValue === othValue ||\n equalFunc(arrValue, othValue, bitmask, customizer, stack)\n )) {\n result = false;\n break;\n }\n }\n stack['delete'](array);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalArrays;\n","var Symbol = require('./_Symbol'),\n Uint8Array = require('./_Uint8Array'),\n eq = require('./eq'),\n equalArrays = require('./_equalArrays'),\n mapToArray = require('./_mapToArray'),\n setToArray = require('./_setToArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]';\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n switch (tag) {\n case dataViewTag:\n if ((object.byteLength != other.byteLength) ||\n (object.byteOffset != other.byteOffset)) {\n return false;\n }\n object = object.buffer;\n other = other.buffer;\n\n case arrayBufferTag:\n if ((object.byteLength != other.byteLength) ||\n !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n return false;\n }\n return true;\n\n case boolTag:\n case dateTag:\n case numberTag:\n // Coerce booleans to `1` or `0` and dates to milliseconds.\n // Invalid dates are coerced to `NaN`.\n return eq(+object, +other);\n\n case errorTag:\n return object.name == other.name && object.message == other.message;\n\n case regexpTag:\n case stringTag:\n // Coerce regexes to strings and treat strings, primitives and objects,\n // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n // for more details.\n return object == (other + '');\n\n case mapTag:\n var convert = mapToArray;\n\n case setTag:\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n convert || (convert = setToArray);\n\n if (object.size != other.size && !isPartial) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked) {\n return stacked == other;\n }\n bitmask |= COMPARE_UNORDERED_FLAG;\n\n // Recursively compare objects (susceptible to call stack limits).\n stack.set(object, other);\n var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n stack['delete'](object);\n return result;\n\n case symbolTag:\n if (symbolValueOf) {\n return symbolValueOf.call(object) == symbolValueOf.call(other);\n }\n }\n return false;\n}\n\nmodule.exports = equalByTag;\n","var getAllKeys = require('./_getAllKeys');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n objProps = getAllKeys(object),\n objLength = objProps.length,\n othProps = getAllKeys(other),\n othLength = othProps.length;\n\n if (objLength != othLength && !isPartial) {\n return false;\n }\n var index = objLength;\n while (index--) {\n var key = objProps[index];\n if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n return false;\n }\n }\n // Check that cyclic values are equal.\n var objStacked = stack.get(object);\n var othStacked = stack.get(other);\n if (objStacked && othStacked) {\n return objStacked == other && othStacked == object;\n }\n var result = true;\n stack.set(object, other);\n stack.set(other, object);\n\n var skipCtor = isPartial;\n while (++index < objLength) {\n key = objProps[index];\n var objValue = object[key],\n othValue = other[key];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, objValue, key, other, object, stack)\n : customizer(objValue, othValue, key, object, other, stack);\n }\n // Recursively compare objects (susceptible to call stack limits).\n if (!(compared === undefined\n ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n : compared\n )) {\n result = false;\n break;\n }\n skipCtor || (skipCtor = key == 'constructor');\n }\n if (result && !skipCtor) {\n var objCtor = object.constructor,\n othCtor = other.constructor;\n\n // Non `Object` object instances with different constructors are not equal.\n if (objCtor != othCtor &&\n ('constructor' in object && 'constructor' in other) &&\n !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n result = false;\n }\n }\n stack['delete'](object);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalObjects;\n","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n","var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbols = require('./_getSymbols'),\n keys = require('./keys');\n\n/**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeys(object) {\n return baseGetAllKeys(object, keys, getSymbols);\n}\n\nmodule.exports = getAllKeys;\n","var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbolsIn = require('./_getSymbolsIn'),\n keysIn = require('./keysIn');\n\n/**\n * Creates an array of own and inherited enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeysIn(object) {\n return baseGetAllKeys(object, keysIn, getSymbolsIn);\n}\n\nmodule.exports = getAllKeysIn;\n","var isKeyable = require('./_isKeyable');\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\nmodule.exports = getMapData;\n","var baseIsNative = require('./_baseIsNative'),\n getValue = require('./_getValue');\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\nmodule.exports = getNative;\n","var overArg = require('./_overArg');\n\n/** Built-in value references. */\nvar getPrototype = overArg(Object.getPrototypeOf, Object);\n\nmodule.exports = getPrototype;\n","var Symbol = require('./_Symbol');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nmodule.exports = getRawTag;\n","var arrayFilter = require('./_arrayFilter'),\n stubArray = require('./stubArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n if (object == null) {\n return [];\n }\n object = Object(object);\n return arrayFilter(nativeGetSymbols(object), function(symbol) {\n return propertyIsEnumerable.call(object, symbol);\n });\n};\n\nmodule.exports = getSymbols;\n","var arrayPush = require('./_arrayPush'),\n getPrototype = require('./_getPrototype'),\n getSymbols = require('./_getSymbols'),\n stubArray = require('./stubArray');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own and inherited enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {\n var result = [];\n while (object) {\n arrayPush(result, getSymbols(object));\n object = getPrototype(object);\n }\n return result;\n};\n\nmodule.exports = getSymbolsIn;\n","var DataView = require('./_DataView'),\n Map = require('./_Map'),\n Promise = require('./_Promise'),\n Set = require('./_Set'),\n WeakMap = require('./_WeakMap'),\n baseGetTag = require('./_baseGetTag'),\n toSource = require('./_toSource');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n setTag = '[object Set]',\n weakMapTag = '[object WeakMap]';\n\nvar dataViewTag = '[object DataView]';\n\n/** Used to detect maps, sets, and weakmaps. */\nvar dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nvar getTag = baseGetTag;\n\n// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\nif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = baseGetTag(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : '';\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n}\n\nmodule.exports = getTag;\n","/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\nmodule.exports = getValue;\n","var nativeCreate = require('./_nativeCreate');\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n}\n\nmodule.exports = hashClear;\n","/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = hashDelete;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\nmodule.exports = hashGet;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\nmodule.exports = hashHas;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\nmodule.exports = hashSet;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Initializes an array clone.\n *\n * @private\n * @param {Array} array The array to clone.\n * @returns {Array} Returns the initialized clone.\n */\nfunction initCloneArray(array) {\n var length = array.length,\n result = new array.constructor(length);\n\n // Add properties assigned by `RegExp#exec`.\n if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {\n result.index = array.index;\n result.input = array.input;\n }\n return result;\n}\n\nmodule.exports = initCloneArray;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer'),\n cloneDataView = require('./_cloneDataView'),\n cloneRegExp = require('./_cloneRegExp'),\n cloneSymbol = require('./_cloneSymbol'),\n cloneTypedArray = require('./_cloneTypedArray');\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/**\n * Initializes an object clone based on its `toStringTag`.\n *\n * **Note:** This function only supports cloning values with tags of\n * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.\n *\n * @private\n * @param {Object} object The object to clone.\n * @param {string} tag The `toStringTag` of the object to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneByTag(object, tag, isDeep) {\n var Ctor = object.constructor;\n switch (tag) {\n case arrayBufferTag:\n return cloneArrayBuffer(object);\n\n case boolTag:\n case dateTag:\n return new Ctor(+object);\n\n case dataViewTag:\n return cloneDataView(object, isDeep);\n\n case float32Tag: case float64Tag:\n case int8Tag: case int16Tag: case int32Tag:\n case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:\n return cloneTypedArray(object, isDeep);\n\n case mapTag:\n return new Ctor;\n\n case numberTag:\n case stringTag:\n return new Ctor(object);\n\n case regexpTag:\n return cloneRegExp(object);\n\n case setTag:\n return new Ctor;\n\n case symbolTag:\n return cloneSymbol(object);\n }\n}\n\nmodule.exports = initCloneByTag;\n","var baseCreate = require('./_baseCreate'),\n getPrototype = require('./_getPrototype'),\n isPrototype = require('./_isPrototype');\n\n/**\n * Initializes an object clone.\n *\n * @private\n * @param {Object} object The object to clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneObject(object) {\n return (typeof object.constructor == 'function' && !isPrototype(object))\n ? baseCreate(getPrototype(object))\n : {};\n}\n\nmodule.exports = initCloneObject;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n var type = typeof value;\n length = length == null ? MAX_SAFE_INTEGER : length;\n\n return !!length &&\n (type == 'number' ||\n (type != 'symbol' && reIsUint.test(value))) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\nmodule.exports = isIndex;\n","/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\nmodule.exports = isKeyable;\n","var coreJsData = require('./_coreJsData');\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\nmodule.exports = isMasked;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\nmodule.exports = isPrototype;\n","/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n}\n\nmodule.exports = listCacheClear;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype;\n\n/** Built-in value references. */\nvar splice = arrayProto.splice;\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n}\n\nmodule.exports = listCacheDelete;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\nmodule.exports = listCacheGet;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\nmodule.exports = listCacheHas;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\nmodule.exports = listCacheSet;\n","var Hash = require('./_Hash'),\n ListCache = require('./_ListCache'),\n Map = require('./_Map');\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\nmodule.exports = mapCacheClear;\n","var getMapData = require('./_getMapData');\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = mapCacheDelete;\n","var getMapData = require('./_getMapData');\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\nmodule.exports = mapCacheGet;\n","var getMapData = require('./_getMapData');\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\nmodule.exports = mapCacheHas;\n","var getMapData = require('./_getMapData');\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n}\n\nmodule.exports = mapCacheSet;\n","/**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\nfunction mapToArray(map) {\n var index = -1,\n result = Array(map.size);\n\n map.forEach(function(value, key) {\n result[++index] = [key, value];\n });\n return result;\n}\n\nmodule.exports = mapToArray;\n","var getNative = require('./_getNative');\n\n/* Built-in method references that are verified to be native. */\nvar nativeCreate = getNative(Object, 'create');\n\nmodule.exports = nativeCreate;\n","var overArg = require('./_overArg');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeKeys = overArg(Object.keys, Object);\n\nmodule.exports = nativeKeys;\n","/**\n * This function is like\n * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * except that it includes inherited enumerable properties.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction nativeKeysIn(object) {\n var result = [];\n if (object != null) {\n for (var key in Object(object)) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = nativeKeysIn;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n try {\n // Use `util.types` for Node.js 10+.\n var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n if (types) {\n return types;\n }\n\n // Legacy `process.binding('util')` for Node.js < 10.\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n}());\n\nmodule.exports = nodeUtil;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n","/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\nmodule.exports = overArg;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n","/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\nfunction setCacheAdd(value) {\n this.__data__.set(value, HASH_UNDEFINED);\n return this;\n}\n\nmodule.exports = setCacheAdd;\n","/**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\nfunction setCacheHas(value) {\n return this.__data__.has(value);\n}\n\nmodule.exports = setCacheHas;\n","/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\nfunction setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n}\n\nmodule.exports = setToArray;\n","var ListCache = require('./_ListCache');\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}\n\nmodule.exports = stackClear;\n","/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n var data = this.__data__,\n result = data['delete'](key);\n\n this.size = data.size;\n return result;\n}\n\nmodule.exports = stackDelete;\n","/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n return this.__data__.get(key);\n}\n\nmodule.exports = stackGet;\n","/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n return this.__data__.has(key);\n}\n\nmodule.exports = stackHas;\n","var ListCache = require('./_ListCache'),\n Map = require('./_Map'),\n MapCache = require('./_MapCache');\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n var data = this.__data__;\n if (data instanceof ListCache) {\n var pairs = data.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n this.size = ++data.size;\n return this;\n }\n data = this.__data__ = new MapCache(pairs);\n }\n data.set(key, value);\n this.size = data.size;\n return this;\n}\n\nmodule.exports = stackSet;\n","/** Used for built-in method references. */\nvar funcProto = Function.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\nmodule.exports = toSource;\n","var baseClone = require('./_baseClone');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_SYMBOLS_FLAG = 4;\n\n/**\n * This method is like `_.clone` except that it recursively clones `value`.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Lang\n * @param {*} value The value to recursively clone.\n * @returns {*} Returns the deep cloned value.\n * @see _.clone\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var deep = _.cloneDeep(objects);\n * console.log(deep[0] === objects[0]);\n * // => false\n */\nfunction cloneDeep(value) {\n return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);\n}\n\nmodule.exports = cloneDeep;\n","/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\nmodule.exports = eq;\n","var baseIsArguments = require('./_baseIsArguments'),\n isObjectLike = require('./isObjectLike');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n};\n\nmodule.exports = isArguments;\n","/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\nmodule.exports = isArray;\n","var isFunction = require('./isFunction'),\n isLength = require('./isLength');\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\nmodule.exports = isArrayLike;\n","var root = require('./_root'),\n stubFalse = require('./stubFalse');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\nmodule.exports = isBuffer;\n","var baseIsEqual = require('./_baseIsEqual');\n\n/**\n * Performs a deep comparison between two values to determine if they are\n * equivalent.\n *\n * **Note:** This method supports comparing arrays, array buffers, booleans,\n * date objects, error objects, maps, numbers, `Object` objects, regexes,\n * sets, strings, symbols, and typed arrays. `Object` objects are compared\n * by their own, not inherited, enumerable properties. Functions and DOM\n * nodes are compared by strict equality, i.e. `===`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.isEqual(object, other);\n * // => true\n *\n * object === other;\n * // => false\n */\nfunction isEqual(value, other) {\n return baseIsEqual(value, other);\n}\n\nmodule.exports = isEqual;\n","var baseGetTag = require('./_baseGetTag'),\n isObject = require('./isObject');\n\n/** `Object#toString` result references. */\nvar asyncTag = '[object AsyncFunction]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n proxyTag = '[object Proxy]';\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\nmodule.exports = isFunction;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\nmodule.exports = isLength;\n","var baseIsMap = require('./_baseIsMap'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsMap = nodeUtil && nodeUtil.isMap;\n\n/**\n * Checks if `value` is classified as a `Map` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n * @example\n *\n * _.isMap(new Map);\n * // => true\n *\n * _.isMap(new WeakMap);\n * // => false\n */\nvar isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;\n\nmodule.exports = isMap;\n","/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n","var baseIsSet = require('./_baseIsSet'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsSet = nodeUtil && nodeUtil.isSet;\n\n/**\n * Checks if `value` is classified as a `Set` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n * @example\n *\n * _.isSet(new Set);\n * // => true\n *\n * _.isSet(new WeakSet);\n * // => false\n */\nvar isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;\n\nmodule.exports = isSet;\n","var baseIsTypedArray = require('./_baseIsTypedArray'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\nmodule.exports = isTypedArray;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeys = require('./_baseKeys'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\nmodule.exports = keys;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeysIn = require('./_baseKeysIn'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\nfunction keysIn(object) {\n return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n}\n\nmodule.exports = keysIn;\n","/**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\nfunction stubArray() {\n return [];\n}\n\nmodule.exports = stubArray;\n","/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n return false;\n}\n\nmodule.exports = stubFalse;\n","import { connect, type BaseConnectionOptions } from \"@openfin/core-web\";\nimport { getSettings } from \"./settings\";\n\n/**\n * Initializes the OpenFin Web Broker connection.\n * @param inherit Should we inherit settings from the host (available in the OpenFin layout system) or use settings? Default is true.\n */\nexport async function init(inherit: boolean = true): Promise {\n\t// Set window.fin to the `fin` object.\n\tlet options: BaseConnectionOptions | undefined;\n\tif (window.fin === undefined) {\n\t\tif (!inherit) {\n\t\t\tconst settings = await getSettings();\n\t\t\tif (settings === undefined) {\n\t\t\t\tconsole.error(\n\t\t\t\t\t\"Unable to run the sample as we have been unable to load the web manifest and it's settings from the currently running html page. Please ensure that the web manifest is being served and that it contains the custom_settings section.\"\n\t\t\t\t);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\toptions = {\n\t\t\t\tbrokerUrl: settings.platform.interop.brokerUrl,\n\t\t\t\tinteropConfig: {\n\t\t\t\t\tproviderId: settings.platform.interop.providerId,\n\t\t\t\t\tcurrentContextGroup: settings.platform.interop.defaultContextGroup\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t\t// Specify an interopConfig with a specific provider ID and a context group to initialize the `fin.me.interop` client on connection.\n\t\tif (options) {\n\t\t\twindow.fin = await connect({\n\t\t\t\toptions\n\t\t\t});\n\t\t} else {\n\t\t\twindow.fin = await connect({\n\t\t\t\tconnectionInheritance: \"enabled\"\n\t\t\t});\n\t\t}\n\t\tconsole.log(\"Finished initializing the fin API.\");\n\t\t// Create and dispatch the finReady event\n\t\tconst event = new CustomEvent(\"finReady\");\n\t\twindow.dispatchEvent(event);\n\t}\n\n\tif (window.fdc3 === undefined && window?.fin?.me.interop?.getFDC3Sync !== undefined) {\n\t\twindow.fdc3 = fin.me.interop.getFDC3Sync(\"2.0\");\n\t\tconsole.log(\"Finished initializing the fdc3 API.\");\n\t\t// Create and dispatch the FDC3Ready event\n\t\tconst event = new CustomEvent(\"fdc3Ready\");\n\t\twindow.dispatchEvent(event);\n\t}\n}\n","import type { WebLayoutSnapshot } from \"@openfin/core-web\";\nimport type { Settings } from \"../shapes/setting-shapes\";\n\n/**\n * Fetches the settings for the application.\n * @returns The settings for the application.\n */\nexport async function getSettings(): Promise {\n\tconst settings = await getManifestSettings();\n\tif (settings === undefined) {\n\t\tconsole.error(\n\t\t\t\"Unable to run the example as settings are required and we fetch them from the link web manifest from the html page that is being served. It should exist in the customSettings section of the web manifest.\"\n\t\t);\n\t}\n\treturn settings;\n}\n\n/**\n * Returns a default layout from the settings if provided.\n * @returns The default layout from the settings.\n */\nexport async function getDefaultLayout(): Promise {\n\tconst settings = await getSettings();\n\tif (settings?.platform?.layout?.defaultLayout === undefined) {\n\t\tconsole.error(\n\t\t\t\"Unable to run the example as without a layout being defined. Please ensure that settings have been provided in the web manifest.\"\n\t\t);\n\t\treturn;\n\t}\n\tif (typeof settings.platform.layout.defaultLayout === \"string\") {\n\t\tconst layoutResponse = await fetch(settings.platform.layout.defaultLayout);\n\t\tconst layoutJson = (await layoutResponse.json()) as WebLayoutSnapshot;\n\t\treturn layoutJson;\n\t}\n\treturn settings.platform.layout.defaultLayout;\n}\n\n/**\n * Returns a default layout from the settings if provided.\n * @returns The default layout from the settings.\n */\nexport async function getSecondLayout(): Promise {\n\tconst settings = await getSettings();\n\tif (settings?.platform?.layout?.secondLayout === undefined) {\n\t\tconsole.error(\n\t\t\t\"Unable to run the example as without a layout being defined. Please ensure that settings have been provided in the web manifest.\"\n\t\t);\n\t\treturn;\n\t}\n\tif (typeof settings.platform.layout.secondLayout === \"string\") {\n\t\tconst layoutResponse = await fetch(settings.platform.layout.secondLayout);\n\t\tconst layoutJson = (await layoutResponse.json()) as WebLayoutSnapshot;\n\t\treturn layoutJson;\n\t}\n\treturn settings.platform.layout.secondLayout;\n}\n/**\n * Returns the settings from the manifest file.\n * @returns customSettings for this example\n */\nasync function getManifestSettings(): Promise {\n\t// Get the manifest link\n\tconst link = document.querySelector('link[rel=\"manifest\"]');\n\tif (link !== null) {\n\t\tconst manifestResponse = await fetch(link.href);\n\t\tconst manifestJson = (await manifestResponse.json()) as { custom_settings: Settings };\n\t\treturn manifestJson.custom_settings;\n\t}\n}\n","export { default as v1 } from './v1.js';\nexport { default as v3 } from './v3.js';\nexport { default as v4 } from './v4.js';\nexport { default as v5 } from './v5.js';\nexport { default as NIL } from './nil.js';\nexport { default as version } from './version.js';\nexport { default as validate } from './validate.js';\nexport { default as stringify } from './stringify.js';\nexport { default as parse } from './parse.js';","/*\n * Browser-compatible JavaScript MD5\n *\n * Modification of JavaScript MD5\n * https://github.com/blueimp/JavaScript-MD5\n *\n * Copyright 2011, Sebastian Tschan\n * https://blueimp.net\n *\n * Licensed under the MIT license:\n * https://opensource.org/licenses/MIT\n *\n * Based on\n * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message\n * Digest Algorithm, as defined in RFC 1321.\n * Version 2.2 Copyright (C) Paul Johnston 1999 - 2009\n * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet\n * Distributed under the BSD License\n * See http://pajhome.org.uk/crypt/md5 for more info.\n */\nfunction md5(bytes) {\n if (typeof bytes === 'string') {\n var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape\n\n bytes = new Uint8Array(msg.length);\n\n for (var i = 0; i < msg.length; ++i) {\n bytes[i] = msg.charCodeAt(i);\n }\n }\n\n return md5ToHexEncodedArray(wordsToMd5(bytesToWords(bytes), bytes.length * 8));\n}\n/*\n * Convert an array of little-endian words to an array of bytes\n */\n\n\nfunction md5ToHexEncodedArray(input) {\n var output = [];\n var length32 = input.length * 32;\n var hexTab = '0123456789abcdef';\n\n for (var i = 0; i < length32; i += 8) {\n var x = input[i >> 5] >>> i % 32 & 0xff;\n var hex = parseInt(hexTab.charAt(x >>> 4 & 0x0f) + hexTab.charAt(x & 0x0f), 16);\n output.push(hex);\n }\n\n return output;\n}\n/**\n * Calculate output length with padding and bit length\n */\n\n\nfunction getOutputLength(inputLength8) {\n return (inputLength8 + 64 >>> 9 << 4) + 14 + 1;\n}\n/*\n * Calculate the MD5 of an array of little-endian words, and a bit length.\n */\n\n\nfunction wordsToMd5(x, len) {\n /* append padding */\n x[len >> 5] |= 0x80 << len % 32;\n x[getOutputLength(len) - 1] = len;\n var a = 1732584193;\n var b = -271733879;\n var c = -1732584194;\n var d = 271733878;\n\n for (var i = 0; i < x.length; i += 16) {\n var olda = a;\n var oldb = b;\n var oldc = c;\n var oldd = d;\n a = md5ff(a, b, c, d, x[i], 7, -680876936);\n d = md5ff(d, a, b, c, x[i + 1], 12, -389564586);\n c = md5ff(c, d, a, b, x[i + 2], 17, 606105819);\n b = md5ff(b, c, d, a, x[i + 3], 22, -1044525330);\n a = md5ff(a, b, c, d, x[i + 4], 7, -176418897);\n d = md5ff(d, a, b, c, x[i + 5], 12, 1200080426);\n c = md5ff(c, d, a, b, x[i + 6], 17, -1473231341);\n b = md5ff(b, c, d, a, x[i + 7], 22, -45705983);\n a = md5ff(a, b, c, d, x[i + 8], 7, 1770035416);\n d = md5ff(d, a, b, c, x[i + 9], 12, -1958414417);\n c = md5ff(c, d, a, b, x[i + 10], 17, -42063);\n b = md5ff(b, c, d, a, x[i + 11], 22, -1990404162);\n a = md5ff(a, b, c, d, x[i + 12], 7, 1804603682);\n d = md5ff(d, a, b, c, x[i + 13], 12, -40341101);\n c = md5ff(c, d, a, b, x[i + 14], 17, -1502002290);\n b = md5ff(b, c, d, a, x[i + 15], 22, 1236535329);\n a = md5gg(a, b, c, d, x[i + 1], 5, -165796510);\n d = md5gg(d, a, b, c, x[i + 6], 9, -1069501632);\n c = md5gg(c, d, a, b, x[i + 11], 14, 643717713);\n b = md5gg(b, c, d, a, x[i], 20, -373897302);\n a = md5gg(a, b, c, d, x[i + 5], 5, -701558691);\n d = md5gg(d, a, b, c, x[i + 10], 9, 38016083);\n c = md5gg(c, d, a, b, x[i + 15], 14, -660478335);\n b = md5gg(b, c, d, a, x[i + 4], 20, -405537848);\n a = md5gg(a, b, c, d, x[i + 9], 5, 568446438);\n d = md5gg(d, a, b, c, x[i + 14], 9, -1019803690);\n c = md5gg(c, d, a, b, x[i + 3], 14, -187363961);\n b = md5gg(b, c, d, a, x[i + 8], 20, 1163531501);\n a = md5gg(a, b, c, d, x[i + 13], 5, -1444681467);\n d = md5gg(d, a, b, c, x[i + 2], 9, -51403784);\n c = md5gg(c, d, a, b, x[i + 7], 14, 1735328473);\n b = md5gg(b, c, d, a, x[i + 12], 20, -1926607734);\n a = md5hh(a, b, c, d, x[i + 5], 4, -378558);\n d = md5hh(d, a, b, c, x[i + 8], 11, -2022574463);\n c = md5hh(c, d, a, b, x[i + 11], 16, 1839030562);\n b = md5hh(b, c, d, a, x[i + 14], 23, -35309556);\n a = md5hh(a, b, c, d, x[i + 1], 4, -1530992060);\n d = md5hh(d, a, b, c, x[i + 4], 11, 1272893353);\n c = md5hh(c, d, a, b, x[i + 7], 16, -155497632);\n b = md5hh(b, c, d, a, x[i + 10], 23, -1094730640);\n a = md5hh(a, b, c, d, x[i + 13], 4, 681279174);\n d = md5hh(d, a, b, c, x[i], 11, -358537222);\n c = md5hh(c, d, a, b, x[i + 3], 16, -722521979);\n b = md5hh(b, c, d, a, x[i + 6], 23, 76029189);\n a = md5hh(a, b, c, d, x[i + 9], 4, -640364487);\n d = md5hh(d, a, b, c, x[i + 12], 11, -421815835);\n c = md5hh(c, d, a, b, x[i + 15], 16, 530742520);\n b = md5hh(b, c, d, a, x[i + 2], 23, -995338651);\n a = md5ii(a, b, c, d, x[i], 6, -198630844);\n d = md5ii(d, a, b, c, x[i + 7], 10, 1126891415);\n c = md5ii(c, d, a, b, x[i + 14], 15, -1416354905);\n b = md5ii(b, c, d, a, x[i + 5], 21, -57434055);\n a = md5ii(a, b, c, d, x[i + 12], 6, 1700485571);\n d = md5ii(d, a, b, c, x[i + 3], 10, -1894986606);\n c = md5ii(c, d, a, b, x[i + 10], 15, -1051523);\n b = md5ii(b, c, d, a, x[i + 1], 21, -2054922799);\n a = md5ii(a, b, c, d, x[i + 8], 6, 1873313359);\n d = md5ii(d, a, b, c, x[i + 15], 10, -30611744);\n c = md5ii(c, d, a, b, x[i + 6], 15, -1560198380);\n b = md5ii(b, c, d, a, x[i + 13], 21, 1309151649);\n a = md5ii(a, b, c, d, x[i + 4], 6, -145523070);\n d = md5ii(d, a, b, c, x[i + 11], 10, -1120210379);\n c = md5ii(c, d, a, b, x[i + 2], 15, 718787259);\n b = md5ii(b, c, d, a, x[i + 9], 21, -343485551);\n a = safeAdd(a, olda);\n b = safeAdd(b, oldb);\n c = safeAdd(c, oldc);\n d = safeAdd(d, oldd);\n }\n\n return [a, b, c, d];\n}\n/*\n * Convert an array bytes to an array of little-endian words\n * Characters >255 have their high-byte silently ignored.\n */\n\n\nfunction bytesToWords(input) {\n if (input.length === 0) {\n return [];\n }\n\n var length8 = input.length * 8;\n var output = new Uint32Array(getOutputLength(length8));\n\n for (var i = 0; i < length8; i += 8) {\n output[i >> 5] |= (input[i / 8] & 0xff) << i % 32;\n }\n\n return output;\n}\n/*\n * Add integers, wrapping at 2^32. This uses 16-bit operations internally\n * to work around bugs in some JS interpreters.\n */\n\n\nfunction safeAdd(x, y) {\n var lsw = (x & 0xffff) + (y & 0xffff);\n var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n return msw << 16 | lsw & 0xffff;\n}\n/*\n * Bitwise rotate a 32-bit number to the left.\n */\n\n\nfunction bitRotateLeft(num, cnt) {\n return num << cnt | num >>> 32 - cnt;\n}\n/*\n * These functions implement the four basic operations the algorithm uses.\n */\n\n\nfunction md5cmn(q, a, b, x, s, t) {\n return safeAdd(bitRotateLeft(safeAdd(safeAdd(a, q), safeAdd(x, t)), s), b);\n}\n\nfunction md5ff(a, b, c, d, x, s, t) {\n return md5cmn(b & c | ~b & d, a, b, x, s, t);\n}\n\nfunction md5gg(a, b, c, d, x, s, t) {\n return md5cmn(b & d | c & ~d, a, b, x, s, t);\n}\n\nfunction md5hh(a, b, c, d, x, s, t) {\n return md5cmn(b ^ c ^ d, a, b, x, s, t);\n}\n\nfunction md5ii(a, b, c, d, x, s, t) {\n return md5cmn(c ^ (b | ~d), a, b, x, s, t);\n}\n\nexport default md5;","export default '00000000-0000-0000-0000-000000000000';","import validate from './validate.js';\n\nfunction parse(uuid) {\n if (!validate(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n var v;\n var arr = new Uint8Array(16); // Parse ########-....-....-....-............\n\n arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24;\n arr[1] = v >>> 16 & 0xff;\n arr[2] = v >>> 8 & 0xff;\n arr[3] = v & 0xff; // Parse ........-####-....-....-............\n\n arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8;\n arr[5] = v & 0xff; // Parse ........-....-####-....-............\n\n arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8;\n arr[7] = v & 0xff; // Parse ........-....-....-####-............\n\n arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8;\n arr[9] = v & 0xff; // Parse ........-....-....-....-############\n // (Use \"/\" to avoid 32-bit truncation when bit-shifting high-order bytes)\n\n arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff;\n arr[11] = v / 0x100000000 & 0xff;\n arr[12] = v >>> 24 & 0xff;\n arr[13] = v >>> 16 & 0xff;\n arr[14] = v >>> 8 & 0xff;\n arr[15] = v & 0xff;\n return arr;\n}\n\nexport default parse;","export default /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;","// Unique ID creation requires a high quality random # generator. In the browser we therefore\n// require the crypto API and do not support built-in fallback to lower quality random number\n// generators (like Math.random()).\nvar getRandomValues;\nvar rnds8 = new Uint8Array(16);\nexport default function rng() {\n // lazy load so that environments that need to polyfill have a chance to do so\n if (!getRandomValues) {\n // getRandomValues needs to be invoked in a context where \"this\" is a Crypto implementation. Also,\n // find the complete implementation of crypto (msCrypto) on IE11.\n getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto !== 'undefined' && typeof msCrypto.getRandomValues === 'function' && msCrypto.getRandomValues.bind(msCrypto);\n\n if (!getRandomValues) {\n throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');\n }\n }\n\n return getRandomValues(rnds8);\n}","// Adapted from Chris Veness' SHA1 code at\n// http://www.movable-type.co.uk/scripts/sha1.html\nfunction f(s, x, y, z) {\n switch (s) {\n case 0:\n return x & y ^ ~x & z;\n\n case 1:\n return x ^ y ^ z;\n\n case 2:\n return x & y ^ x & z ^ y & z;\n\n case 3:\n return x ^ y ^ z;\n }\n}\n\nfunction ROTL(x, n) {\n return x << n | x >>> 32 - n;\n}\n\nfunction sha1(bytes) {\n var K = [0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xca62c1d6];\n var H = [0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0];\n\n if (typeof bytes === 'string') {\n var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape\n\n bytes = [];\n\n for (var i = 0; i < msg.length; ++i) {\n bytes.push(msg.charCodeAt(i));\n }\n } else if (!Array.isArray(bytes)) {\n // Convert Array-like to Array\n bytes = Array.prototype.slice.call(bytes);\n }\n\n bytes.push(0x80);\n var l = bytes.length / 4 + 2;\n var N = Math.ceil(l / 16);\n var M = new Array(N);\n\n for (var _i = 0; _i < N; ++_i) {\n var arr = new Uint32Array(16);\n\n for (var j = 0; j < 16; ++j) {\n arr[j] = bytes[_i * 64 + j * 4] << 24 | bytes[_i * 64 + j * 4 + 1] << 16 | bytes[_i * 64 + j * 4 + 2] << 8 | bytes[_i * 64 + j * 4 + 3];\n }\n\n M[_i] = arr;\n }\n\n M[N - 1][14] = (bytes.length - 1) * 8 / Math.pow(2, 32);\n M[N - 1][14] = Math.floor(M[N - 1][14]);\n M[N - 1][15] = (bytes.length - 1) * 8 & 0xffffffff;\n\n for (var _i2 = 0; _i2 < N; ++_i2) {\n var W = new Uint32Array(80);\n\n for (var t = 0; t < 16; ++t) {\n W[t] = M[_i2][t];\n }\n\n for (var _t = 16; _t < 80; ++_t) {\n W[_t] = ROTL(W[_t - 3] ^ W[_t - 8] ^ W[_t - 14] ^ W[_t - 16], 1);\n }\n\n var a = H[0];\n var b = H[1];\n var c = H[2];\n var d = H[3];\n var e = H[4];\n\n for (var _t2 = 0; _t2 < 80; ++_t2) {\n var s = Math.floor(_t2 / 20);\n var T = ROTL(a, 5) + f(s, b, c, d) + e + K[s] + W[_t2] >>> 0;\n e = d;\n d = c;\n c = ROTL(b, 30) >>> 0;\n b = a;\n a = T;\n }\n\n H[0] = H[0] + a >>> 0;\n H[1] = H[1] + b >>> 0;\n H[2] = H[2] + c >>> 0;\n H[3] = H[3] + d >>> 0;\n H[4] = H[4] + e >>> 0;\n }\n\n return [H[0] >> 24 & 0xff, H[0] >> 16 & 0xff, H[0] >> 8 & 0xff, H[0] & 0xff, H[1] >> 24 & 0xff, H[1] >> 16 & 0xff, H[1] >> 8 & 0xff, H[1] & 0xff, H[2] >> 24 & 0xff, H[2] >> 16 & 0xff, H[2] >> 8 & 0xff, H[2] & 0xff, H[3] >> 24 & 0xff, H[3] >> 16 & 0xff, H[3] >> 8 & 0xff, H[3] & 0xff, H[4] >> 24 & 0xff, H[4] >> 16 & 0xff, H[4] >> 8 & 0xff, H[4] & 0xff];\n}\n\nexport default sha1;","import validate from './validate.js';\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\n\nvar byteToHex = [];\n\nfor (var i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).substr(1));\n}\n\nfunction stringify(arr) {\n var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n var uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!validate(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n\n return uuid;\n}\n\nexport default stringify;","import rng from './rng.js';\nimport stringify from './stringify.js'; // **`v1()` - Generate time-based UUID**\n//\n// Inspired by https://github.com/LiosK/UUID.js\n// and http://docs.python.org/library/uuid.html\n\nvar _nodeId;\n\nvar _clockseq; // Previous uuid creation time\n\n\nvar _lastMSecs = 0;\nvar _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details\n\nfunction v1(options, buf, offset) {\n var i = buf && offset || 0;\n var b = buf || new Array(16);\n options = options || {};\n var node = options.node || _nodeId;\n var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not\n // specified. We do this lazily to minimize issues related to insufficient\n // system entropy. See #189\n\n if (node == null || clockseq == null) {\n var seedBytes = options.random || (options.rng || rng)();\n\n if (node == null) {\n // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)\n node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]];\n }\n\n if (clockseq == null) {\n // Per 4.2.2, randomize (14 bit) clockseq\n clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;\n }\n } // UUID timestamps are 100 nano-second units since the Gregorian epoch,\n // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so\n // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'\n // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.\n\n\n var msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock\n // cycle to simulate higher resolution clock\n\n var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs)\n\n var dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression\n\n if (dt < 0 && options.clockseq === undefined) {\n clockseq = clockseq + 1 & 0x3fff;\n } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new\n // time interval\n\n\n if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {\n nsecs = 0;\n } // Per 4.2.1.2 Throw error if too many uuids are requested\n\n\n if (nsecs >= 10000) {\n throw new Error(\"uuid.v1(): Can't create more than 10M uuids/sec\");\n }\n\n _lastMSecs = msecs;\n _lastNSecs = nsecs;\n _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch\n\n msecs += 12219292800000; // `time_low`\n\n var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;\n b[i++] = tl >>> 24 & 0xff;\n b[i++] = tl >>> 16 & 0xff;\n b[i++] = tl >>> 8 & 0xff;\n b[i++] = tl & 0xff; // `time_mid`\n\n var tmh = msecs / 0x100000000 * 10000 & 0xfffffff;\n b[i++] = tmh >>> 8 & 0xff;\n b[i++] = tmh & 0xff; // `time_high_and_version`\n\n b[i++] = tmh >>> 24 & 0xf | 0x10; // include version\n\n b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)\n\n b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low`\n\n b[i++] = clockseq & 0xff; // `node`\n\n for (var n = 0; n < 6; ++n) {\n b[i + n] = node[n];\n }\n\n return buf || stringify(b);\n}\n\nexport default v1;","import v35 from './v35.js';\nimport md5 from './md5.js';\nvar v3 = v35('v3', 0x30, md5);\nexport default v3;","import stringify from './stringify.js';\nimport parse from './parse.js';\n\nfunction stringToBytes(str) {\n str = unescape(encodeURIComponent(str)); // UTF8 escape\n\n var bytes = [];\n\n for (var i = 0; i < str.length; ++i) {\n bytes.push(str.charCodeAt(i));\n }\n\n return bytes;\n}\n\nexport var DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8';\nexport var URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8';\nexport default function (name, version, hashfunc) {\n function generateUUID(value, namespace, buf, offset) {\n if (typeof value === 'string') {\n value = stringToBytes(value);\n }\n\n if (typeof namespace === 'string') {\n namespace = parse(namespace);\n }\n\n if (namespace.length !== 16) {\n throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)');\n } // Compute hash of namespace and value, Per 4.3\n // Future: Use spread syntax when supported on all platforms, e.g. `bytes =\n // hashfunc([...namespace, ... value])`\n\n\n var bytes = new Uint8Array(16 + value.length);\n bytes.set(namespace);\n bytes.set(value, namespace.length);\n bytes = hashfunc(bytes);\n bytes[6] = bytes[6] & 0x0f | version;\n bytes[8] = bytes[8] & 0x3f | 0x80;\n\n if (buf) {\n offset = offset || 0;\n\n for (var i = 0; i < 16; ++i) {\n buf[offset + i] = bytes[i];\n }\n\n return buf;\n }\n\n return stringify(bytes);\n } // Function#name is not settable on some platforms (#270)\n\n\n try {\n generateUUID.name = name; // eslint-disable-next-line no-empty\n } catch (err) {} // For CommonJS default export support\n\n\n generateUUID.DNS = DNS;\n generateUUID.URL = URL;\n return generateUUID;\n}","import rng from './rng.js';\nimport stringify from './stringify.js';\n\nfunction v4(options, buf, offset) {\n options = options || {};\n var rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n offset = offset || 0;\n\n for (var i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n\n return buf;\n }\n\n return stringify(rnds);\n}\n\nexport default v4;","import v35 from './v35.js';\nimport sha1 from './sha1.js';\nvar v5 = v35('v5', 0x50, sha1);\nexport default v5;","import REGEX from './regex.js';\n\nfunction validate(uuid) {\n return typeof uuid === 'string' && REGEX.test(uuid);\n}\n\nexport default validate;","import validate from './validate.js';\n\nfunction version(uuid) {\n if (!validate(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n return parseInt(uuid.substr(14, 1), 16);\n}\n\nexport default version;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = (module) => {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","import type { Context } from \"@finos/fdc3\";\nimport { init } from \"../platform/api\";\n\nwindow.addEventListener(\"DOMContentLoaded\", async () => {\n\tawait init(true);\n\tawait initializeDOM();\n});\n\n/**\n * Broadcasts a context using FDC3.\n */\nasync function setContext(): Promise {\n\tconst contextType = \"fdc3.instrument\";\n\tconst contextName = \"Tesla Inc.\";\n\tconst idData = {\n\t\tticker: \"TSLA\"\n\t};\n\tconst context = {\n\t\ttype: contextType,\n\t\tname: contextName,\n\t\tid: idData\n\t};\n\tif (window.fin) {\n\t\tawait window.fin.me.interop.setContext(context);\n\t\tconsole.log(`Set context: ${contextType} - ${contextName}`);\n\t} else {\n\t\twindow.addEventListener(\"finReady\", async () => {\n\t\t\tif (window.fin) {\n\t\t\t\tawait window.fin.me.interop.setContext(context);\n\t\t\t\tconsole.log(`Set context: ${contextType} - ${contextName}`);\n\t\t\t}\n\t\t});\n\t}\n}\n\n/**\n * Adds an interop context listener to the window.\n */\nasync function addContextListener(): Promise {\n\tif (window.fin) {\n\t\tawait window.fin.me.interop.addContextHandler((context: Context) => {\n\t\t\tupdateDOMElements(context);\n\t\t});\n\t} else {\n\t\twindow.addEventListener(\"finReady\", async () => {\n\t\t\tif (window.fin) {\n\t\t\t\tawait window.fin.me.interop.addContextHandler((context: Context) => {\n\t\t\t\t\tupdateDOMElements(context);\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t}\n}\n\n/**\n * Updates the DOM elements with the provided context.\n * @param context The context to update the DOM elements with.\n */\nfunction updateDOMElements(context: Context): void {\n\tconst contextTypeSpan = document.querySelector(\"#contextType\");\n\tconst contextNameSpan = document.querySelector(\"#contextName\");\n\tconst contextBodyPre = document.querySelector(\"#contextBody\");\n\n\tif (contextTypeSpan !== null && contextNameSpan !== null && contextBodyPre !== null) {\n\t\tcontextTypeSpan.textContent = context.type;\n\t\tcontextNameSpan.textContent = context.name ?? \"No name provided.\";\n\t\tcontextBodyPre.textContent = JSON.stringify(context, null, 2);\n\t}\n}\n\n/**\n * Initialize the DOM elements.\n */\nasync function initializeDOM(): Promise {\n\tconst setContextButton = document.querySelector(\"#setContext\");\n\n\tif (setContextButton !== null) {\n\t\tsetContextButton.addEventListener(\"click\", async () => {\n\t\t\tawait setContext();\n\t\t});\n\t}\n\n\tawait addContextListener();\n}\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/web/v19.2.0/web-layout/js/provider.bundle.js b/web/v19.2.0/web-layout/js/provider.bundle.js index b44a610..96b1992 100644 --- a/web/v19.2.0/web-layout/js/provider.bundle.js +++ b/web/v19.2.0/web-layout/js/provider.bundle.js @@ -1,38 +1,38 @@ /******/ (() => { // webpackBootstrap /******/ var __webpack_modules__ = ({ -/***/ "./node_modules/@openfin/core-web/out/api-client.js": -/*!**********************************************************!*\ - !*** ./node_modules/@openfin/core-web/out/api-client.js ***! - \**********************************************************/ +/***/ "../../node_modules/@openfin/core-web/out/api-client.js": +/*!**************************************************************!*\ + !*** ../../node_modules/@openfin/core-web/out/api-client.js ***! + \**************************************************************/ /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; -var e=__webpack_require__(/*! ./main-8cad4070.js */ "./node_modules/@openfin/core-web/out/main-8cad4070.js");__webpack_require__(/*! buffer/ */ "../../node_modules/buffer/index.js"),__webpack_require__(/*! uuid */ "../../node_modules/uuid/dist/esm-browser/index.js"),__webpack_require__(/*! events */ "../../node_modules/events/events.js"),__webpack_require__(/*! lodash/cloneDeep */ "../../node_modules/lodash/cloneDeep.js"),__webpack_require__(/*! lodash/isEqual */ "../../node_modules/lodash/isEqual.js"),exports.connect=e.connect; +var e=__webpack_require__(/*! ./main-8cad4070.js */ "../../node_modules/@openfin/core-web/out/main-8cad4070.js");__webpack_require__(/*! buffer/ */ "../../node_modules/buffer/index.js"),__webpack_require__(/*! uuid */ "../../node_modules/uuid/dist/esm-browser/index.js"),__webpack_require__(/*! events */ "../../node_modules/events/events.js"),__webpack_require__(/*! lodash/cloneDeep */ "../../node_modules/lodash/cloneDeep.js"),__webpack_require__(/*! lodash/isEqual */ "../../node_modules/lodash/isEqual.js"),exports.connect=e.connect; /***/ }), -/***/ "./node_modules/@openfin/core-web/out/main-8cad4070.js": -/*!*************************************************************!*\ - !*** ./node_modules/@openfin/core-web/out/main-8cad4070.js ***! - \*************************************************************/ +/***/ "../../node_modules/@openfin/core-web/out/main-8cad4070.js": +/*!*****************************************************************!*\ + !*** ../../node_modules/@openfin/core-web/out/main-8cad4070.js ***! + \*****************************************************************/ /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; -var e=__webpack_require__(/*! buffer/ */ "../../node_modules/buffer/index.js"),t=__webpack_require__(/*! events */ "../../node_modules/events/events.js"),n=__webpack_require__(/*! lodash/cloneDeep */ "../../node_modules/lodash/cloneDeep.js"),i=__webpack_require__(/*! lodash/isEqual */ "../../node_modules/lodash/isEqual.js"),r=__webpack_require__(/*! uuid */ "../../node_modules/uuid/dist/esm-browser/index.js");const o=(e,t)=>`${t}<${btoa(JSON.stringify(e))}>`;var s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof __webpack_require__.g?__webpack_require__.g:"undefined"!=typeof self?self:{},a={},c={},d={},h={};async function l(e){const t=[];for(const n of e){const e=await n();t.push(e)}return t}Object.defineProperty(h,"__esModule",{value:!0}),h.promiseMapSerial=h.serial=h.promiseMap=h.promisify=void 0,h.promisify=function(e){return(...t)=>new Promise(((n,i)=>{e(...t,((e,t)=>e?i(e):n(t)))}))},h.promiseMap=async function(e,t){return Promise.all(e.map(t))},h.serial=l,h.promiseMapSerial=async function(e,t){return l(e.map(((e,n,i)=>()=>t(e,n,i))))};var u,p=s&&s.__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},w=s&&s.__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)};Object.defineProperty(d,"__esModule",{value:!0}),d.Reply=d.EmitterBase=d.Base=void 0;const y=h;class f{constructor(e){this.isNodeEnvironment=()=>"node"===this.wire.environment.type,this.isOpenFinEnvironment=()=>"openfin"===this.wire.environment.type,this.isBrowserEnvironment=()=>"other"===this.wire.environment.type,this.wire=e}get fin(){return this.wire.getFin()}get me(){return this.wire.me}}d.Base=f;d.EmitterBase=class extends f{constructor(e,t,...n){super(e),this.topic=t,u.set(this,void 0),this.eventNames=()=>this.hasEmitter()?this.getOrCreateEmitter().eventNames():[],this.emit=(e,t,...n)=>!!this.hasEmitter()&&this.getOrCreateEmitter().emit(e,t,...n),this.hasEmitter=()=>this.wire.eventAggregator.has(w(this,u,"f")),this.getOrCreateEmitter=()=>this.wire.eventAggregator.getOrCreate(w(this,u,"f")),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[],this.listenerCount=e=>this.hasEmitter()?this.getOrCreateEmitter().listenerCount(e):0,this.registerEventListener=async(e,t={},n,i)=>{const r={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e},o=this.getOrCreateEmitter();n(o);try{await this.wire.sendAction("subscribe-to-desktop-event",r)}catch(e){throw i(o),this.deleteEmitterIfNothingRegistered(o),e}},this.deregisterEventListener=async(e,t={})=>{if(this.hasEmitter()){const n={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e};await this.wire.sendAction("unsubscribe-to-desktop-event",n).catch((()=>null));return this.getOrCreateEmitter()}return Promise.resolve()},p(this,u,[t,...n],"f"),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[]}async on(e,t,n){return await this.registerEventListener(e,n,(n=>{n.on(e,t)}),(n=>{n.removeListener(e,t)})),this}async addListener(e,t,n){return this.on(e,t,n)}async once(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.once(e,i),n.once(e,t)}),(n=>{n.removeListener(e,i),n.removeListener(e,t)})),this}async prependListener(e,t,n){return await this.registerEventListener(e,n,(n=>{n.prependListener(e,t)}),(n=>{n.removeListener(e,t)})),this}async prependOnceListener(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.prependOnceListener(e,t),n.once(e,i)}),(n=>{n.removeListener(e,t),n.removeListener(e,i)})),this}async removeListener(e,t,n){const i=await this.deregisterEventListener(e,n);return i&&(i.removeListener(e,t),this.deleteEmitterIfNothingRegistered(i)),this}async deregisterAllListeners(e){const t={...this.identity,type:e,topic:this.topic};if(this.hasEmitter()){const e=this.getOrCreateEmitter(),n=e.listenerCount(t.type),i=[];for(let e=0;enull)));return await Promise.all(i),e}}async removeAllListeners(e){const t=async e=>{const t=await this.deregisterAllListeners(e);t&&(t.removeAllListeners(e),this.deleteEmitterIfNothingRegistered(t))};if(e)await t(e);else if(this.hasEmitter()){const e=this.getOrCreateEmitter().eventNames();await(0,y.promiseMap)(e,t)}return this}deleteEmitterIfNothingRegistered(e){0===e.eventNames().length&&this.wire.eventAggregator.delete(w(this,u,"f"))}},u=new WeakMap;d.Reply=class{};var g={};Object.defineProperty(g,"__esModule",{value:!0});var m=g.RuntimeError=g.NotSupportedError=g.NotImplementedError=g.NoAckError=g.DuplicateCorrelationError=g.UnexpectedActionError=g.DisconnectedError=void 0;class v extends Error{constructor(e){super(`Expected websocket state OPEN but found ${e}`),this.readyState=e}}g.DisconnectedError=v;class C extends Error{}g.UnexpectedActionError=C;class b extends Error{}g.DuplicateCorrelationError=b;class I extends Error{}g.NoAckError=I;class E extends Error{}g.NotImplementedError=E;class x extends Error{}g.NotSupportedError=x;class A extends Error{constructor(e){const{message:t,name:n,stack:i,...r}=e;super(t),this.name=n||"Error",this.stack=i??this.toString(),Object.keys(r).forEach((e=>{this[e]=r[e]}))}}class P extends Error{static getCallSite(e=0){const t=Error.stackTraceLimit,n=e+1;Error.stackTraceLimit=t+n;const i=Error.prepareStackTrace;Error.prepareStackTrace=(e,t)=>t;const r=(new Error).stack?.slice(n)??[];return Error.prepareStackTrace=i,Error.stackTraceLimit=t,r}static prepareStackTrace(e,t){if("function"==typeof Error.prepareStackTrace)return Error.prepareStackTrace(e,t);let n="";n+=e.name||"Error",n+=`: ${e.message||""}`;for(const e of t)n+=`\n at ${e.toString()}`;return n}constructor(e,t){const{reason:n,error:i}=e;super(n),this.name="RuntimeError",i?.stack&&(this.cause=new A(i)),t&&(this.stack=P.prepareStackTrace(this,t))}}m=g.RuntimeError=P;var M={},_={},O={};Object.defineProperty(O,"__esModule",{value:!0}),O.validateIdentity=void 0,O.validateIdentity=function(e){let t;return"object"==typeof e&&"string"==typeof e.uuid||(t="Not a valid identity object"),t};var S={},R={},F={},j={},k={},L={},T={};Object.defineProperty(T,"__esModule",{value:!0}),T.handleDeprecatedWarnings=void 0;var $;T.handleDeprecatedWarnings=e=>{(e.contentNavigation?.whitelist||e.contentNavigation?.blacklist||e.contentRedirect?.whitelist||e.contentRedirect?.blacklist)&&console.warn("The properties 'whitelist' and 'blacklist' have been marked as deprecated and will be removed in a future version. Please use 'allowlist' and 'denylist'.")};var B={},G={};Object.defineProperty(G,"__esModule",{value:!0}),G.AsyncRetryableLazy=W=G.Lazy=void 0;var W=G.Lazy=class{constructor(e){this.producerFn=e}getValue(){return this.value||(this.value=this.producerFn()),this.value}};G.AsyncRetryableLazy=class{constructor(e){this.producerFn=e}async getValue(){return this.promise||(this.promise=this.producerFn().catch((e=>{throw delete this.promise,e}))),this.promise}};var H={};Object.defineProperty(H,"__esModule",{value:!0}),H.WebContents=void 0;const N=d;class D extends N.EmitterBase{constructor(e,t,n){super(e,n,t.uuid,t.name),this.identity=t,this.entityType=n}capturePage(e){return this.wire.sendAction("capture-page",{options:e,...this.identity}).then((({payload:e})=>e.data))}executeJavaScript(e){return this.wire.sendAction("execute-javascript-in-window",{...this.identity,code:e}).then((({payload:e})=>e.data))}getZoomLevel(){return this.wire.sendAction("get-zoom-level",this.identity).then((({payload:e})=>e.data))}setZoomLevel(e){return this.wire.sendAction("set-zoom-level",{...this.identity,level:e}).then((()=>{}))}navigate(e){return this.wire.sendAction("navigate-window",{...this.identity,url:e}).then((()=>{}))}navigateBack(){return this.wire.sendAction("navigate-window-back",{...this.identity}).then((()=>{}))}async navigateForward(){await this.wire.sendAction("navigate-window-forward",{...this.identity})}stopNavigation(){return this.wire.sendAction("stop-window-navigation",{...this.identity}).then((()=>{}))}reload(e=!1){return this.wire.sendAction("reload-window",{ignoreCache:e,...this.identity}).then((()=>{}))}print(e={}){return this.wire.sendAction("print",{...this.identity,options:e}).then((()=>{}))}findInPage(e,t){return this.wire.sendAction("find-in-page",{...this.identity,searchTerm:e,options:t}).then((({payload:e})=>e.data))}stopFindInPage(e){return this.wire.sendAction("stop-find-in-page",{...this.identity,action:e}).then((()=>{}))}getPrinters(){return this.wire.sendAction("get-printers",{...this.identity}).then((({payload:e})=>e.data))}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){await this.wire.sendAction("focus-window",{emitSynthFocused:e,...this.identity})}async showDeveloperTools(){await this.wire.sendAction("show-developer-tools",this.identity)}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction("get-process-info",this.identity);return e}async getSharedWorkers(){return this.wire.sendAction("get-shared-workers",this.identity).then((({payload:e})=>e.data))}async inspectSharedWorker(){await this.wire.sendAction("inspect-shared-worker",{...this.identity})}async inspectSharedWorkerById(e){await this.wire.sendAction("inspect-shared-worker-by-id",{...this.identity,workerId:e})}async inspectServiceWorker(){await this.wire.sendAction("inspect-service-worker",{...this.identity})}async showPopupWindow(e){if(this.wire.sendAction(`${this.entityType}-show-popup-window`,this.identity).catch((()=>{})),e?.onPopupReady){const t=async({popupName:t})=>{try{const n=this.fin.Window.wrapSync({uuid:this.fin.me.uuid,name:t});await e.onPopupReady(n)}catch(e){throw new Error(`Something went wrong during onPopupReady execution: ${e}`)}};await this.once("popup-ready",t)}const{payload:t}=await this.wire.sendAction("try-create-popup-window",{options:{...e,hasResultCallback:!!e?.onPopupResult,hasReadyCallback:!!e?.onPopupReady},...this.identity}),{data:{willOpen:n,options:i}}=t;n&&await this.fin.Window.create(i.initialOptions);if(e?.onPopupResult){const t=async t=>{await e.onPopupResult((e=>{const{name:t,uuid:n,result:i,data:r}=e,o={identity:{name:t,uuid:n},result:i};return r&&(o.data=r),o})(t))},n=async()=>{await this.removeListener("popup-result",t)};await this.on("popup-result",t),await this.once("popup-teardown",n)}const{payload:r}=await this.wire.sendAction("show-popup-window",{options:i,...this.identity});return r.data}}var U,V,z,K,q;function J(){return V||(V=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(function(){if($)return L;$=1,Object.defineProperty(L,"__esModule",{value:!0}),L.ViewModule=void 0;const e=d,t=O,n=J(),i=T;class r extends e.Base{async create(e){const{uuid:t}=this.wire.me;if(!e.name||"string"!=typeof e.name)throw new Error("Please provide a name property as a string in order to create a View.");return(0,i.handleDeprecatedWarnings)(e),this.wire.environment.childViews?await this.wire.environment.createChildContent({entityType:"view",options:{...e,uuid:t}}):await this.wire.sendAction("create-view",{...e,uuid:t}),this.wrapSync({uuid:t,name:e.name})}async wrap(e){this.wire.sendAction("view-wrap").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}wrapSync(e){this.wire.sendAction("view-wrap-sync").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}getCurrent(){if(this.wire.sendAction("view-get-current").catch((e=>{})),!this.wire.me.isView)throw new Error("You are not in a View context");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction("view-get-current-sync").catch((e=>{})),!this.wire.me.isView)throw new Error("You are not in a View context");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return L.ViewModule=r,L}(),e),n(function(){if(U)return B;var e;U=1,Object.defineProperty(B,"__esModule",{value:!0}),B.View=void 0;const t=g,n=G,i=H,r=ie();class o extends i.WebContents{constructor(i,o){super(i,o,"view"),this.identity=o,e.set(this,new n.Lazy((()=>this.fin.Platform.wrapSync(this.identity).getClient()))),this.attach=async e=>{await this.wire.sendAction("attach-view",{target:e,...this.identity})},this.destroy=async()=>{await this.wire.sendAction("destroy-view",{...this.identity})},this.show=async()=>{await this.wire.sendAction("show-view",{...this.identity})},this.showAt=async(e,t={})=>{await this.wire.sendAction("show-view-at",{bounds:e,...this.identity,options:t})},this.bringToFront=async()=>{await this.wire.sendAction("bring-view-to-front",{...this.identity})},this.hide=async()=>{await this.wire.sendAction("hide-view",{...this.identity})},this.setBounds=async e=>{await this.wire.sendAction("set-view-bounds",{bounds:e,...this.identity})},this.getBounds=async()=>(await this.wire.sendAction("get-view-bounds",{...this.identity})).payload.data,this.getInfo=async()=>(await this.wire.sendAction("get-view-info",{...this.identity})).payload.data,this.getParentLayout=async()=>(this.wire.sendAction("view-get-parent-layout",{...this.identity}).catch((()=>{})),this.fin.Platform.Layout.getLayoutByViewIdentity(this.identity)),this.getOptions=async()=>this.wire.sendAction("get-view-options",{...this.identity}).then((({payload:e})=>e.data)),this.updateOptions=async e=>this.wire.sendAction("update-view-options",{options:e,...this.identity}).then((()=>{})),this.getCurrentWindow=async()=>{const{payload:{data:e}}=await this.wire.sendAction("get-view-window",{...this.identity});return new r._Window(this.wire,e)},this.getCurrentStack=async()=>{this.wire.sendAction("view-get-current-stack").catch((()=>{}));try{return(await this.getParentLayout()).getStackByViewIdentity(this.identity)}catch(e){throw new t.RuntimeError({reason:"This view does not belong to a stack.",error:e})}},this.triggerBeforeUnload=async()=>(await this.wire.sendAction("trigger-before-unload",{...this.identity})).payload.data,this.bindToElement=async e=>{if(!e)throw new Error("Element not found.");return this.wire.environment.observeBounds(e,(async e=>this.setBounds(e)))}}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){const t=await this.getCurrentWindow();await t.focusedWebViewWasChanged(),await super.focus({emitSynthFocused:e})}}return B.View=o,e=new WeakMap,B}(),e)}(k)),k}function Y(){if(z)return j;z=1,Object.defineProperty(j,"__esModule",{value:!0}),j.Application=void 0;const e=d,t=ie(),n=J();class i extends e.EmitterBase{constructor(e,n){super(e,"application",n.uuid),this.identity=n,this.window=new t._Window(this.wire,{uuid:this.identity.uuid,name:this.identity.uuid})}windowListFromIdentityList(e){const n=[];return e.forEach((e=>{n.push(new t._Window(this.wire,{uuid:e.uuid,name:e.name}))})),n}isRunning(){return this.wire.sendAction("is-application-running",this.identity).then((({payload:e})=>e.data))}async quit(e=!1){try{await this._close(e),await this.wire.sendAction("destroy-application",{force:e,...this.identity})}catch(e){if(!["Remote connection has closed","Could not locate the requested application"].some((t=>e.message.includes(t))))throw e}}async _close(e=!1){try{await this.wire.sendAction("close-application",{force:e,...this.identity})}catch(e){if(!e.message.includes("Remote connection has closed"))throw e}}close(e=!1){return console.warn("Deprecation Warning: Application.close is deprecated Please use Application.quit"),this.wire.sendAction("application-close",this.identity).catch((e=>{})),this._close(e)}getChildWindows(){return this.wire.sendAction("get-child-windows",this.identity).then((({payload:e})=>{const t=[];return e.data.forEach((e=>{t.push({uuid:this.identity.uuid,name:e})})),this.windowListFromIdentityList(t)}))}getManifest(){return this.wire.sendAction("get-application-manifest",this.identity).then((({payload:e})=>e.data))}getParentUuid(){return this.wire.sendAction("get-parent-application",this.identity).then((({payload:e})=>e.data))}getShortcuts(){return this.wire.sendAction("get-shortcuts",this.identity).then((({payload:e})=>e.data))}async getViews(){const{payload:e}=await this.wire.sendAction("application-get-views",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}getZoomLevel(){return this.wire.sendAction("get-application-zoom-level",this.identity).then((({payload:e})=>e.data))}getWindow(){return this.wire.sendAction("application-get-window",this.identity).catch((e=>{})),Promise.resolve(this.window)}registerUser(e,t){return this.wire.sendAction("register-user",{userName:e,appName:t,...this.identity}).then((()=>{}))}removeTrayIcon(){return this.wire.sendAction("remove-tray-icon",this.identity).then((()=>{}))}restart(){return this.wire.sendAction("restart-application",this.identity).then((()=>{}))}run(){return console.warn("Deprecation Warning: Application.run is deprecated Please use fin.Application.start"),this.wire.sendAction("application-run",this.identity).catch((e=>{})),this._run()}_run(e={}){return this.wire.sendAction("run-application",{manifestUrl:this._manifestUrl,opts:e,...this.identity}).then((()=>{}))}scheduleRestart(){return this.wire.sendAction("relaunch-on-close",this.identity).then((()=>{}))}async sendApplicationLog(){const{payload:e}=await this.wire.sendAction("send-application-log",this.identity);return e.data}async setJumpList(e){await this.wire.sendAction("set-jump-list",{config:e,...this.identity})}setTrayIcon(e){return this.wire.sendAction("set-tray-icon",{enabledIcon:e,...this.identity}).then((()=>{}))}setShortcuts(e){return this.wire.sendAction("set-shortcuts",{data:e,...this.identity}).then((()=>{}))}async setShortcutQueryParams(e){await this.wire.sendAction("set-shortcut-query-args",{data:e,...this.identity})}setZoomLevel(e){return this.wire.sendAction("set-application-zoom-level",{level:e,...this.identity}).then((()=>{}))}async setAppLogUsername(e){await this.wire.sendAction("set-app-log-username",{data:e,...this.identity})}getTrayIconInfo(){return this.wire.sendAction("get-tray-icon-info",this.identity).then((({payload:e})=>e.data))}hasTrayIcon(){return this.wire.sendAction("has-tray-icon",this.identity).then((({payload:e})=>e.data))}terminate(){return this.wire.sendAction("terminate-application",this.identity).then((()=>{}))}wait(){return this.wire.sendAction("wait-for-hung-application",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction("get-info",this.identity).then((({payload:e})=>e.data))}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction("application-get-process-info",this.identity);return e}async setFileDownloadLocation(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t};await this.wire.sendAction("set-file-download-location",{...n,downloadLocation:e})}async getFileDownloadLocation(){const{payload:{data:e}}=await this.wire.sendAction("get-file-download-location",this.identity);return e}async showTrayIconPopupMenu(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t},{payload:i}=await this.wire.sendAction("show-tray-icon-popup-menu",{...n,options:e});return i.data}async closeTrayIconPopupMenu(){const{name:e}=this.wire.me,t={uuid:this.identity.uuid,name:e};await this.wire.sendAction("close-tray-icon-popup-menu",{...t})}}return j.Application=i,j}function Z(){return q||(q=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(function(){if(K)return F;K=1,Object.defineProperty(F,"__esModule",{value:!0}),F.ApplicationModule=void 0;const e=d,t=O,n=Y();class i extends e.Base{async wrap(e){this.wire.sendAction("wrap-application").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}wrapSync(e){this.wire.sendAction("wrap-application-sync").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}async _create(e){return void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&void 0===e.isPlatformController&&(e.autoShow=!0),await this.wire.sendAction("create-application",e),this.wrap({uuid:e.uuid})}create(e){return console.warn("Deprecation Warning: fin.Application.create is deprecated. Please use fin.Application.start"),this.wire.sendAction("application-create").catch((e=>{})),this._create(e)}async start(e){this.wire.sendAction("start-application").catch((e=>{}));const t=await this._create(e);return await this.wire.sendAction("run-application",{uuid:e.uuid}),t}async startManyManifests(e,t){return this.wire.sendAction("run-applications",{applications:e,opts:t}).then((()=>{}))}getCurrent(){return this.wire.sendAction("get-current-application").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction("get-current-application-sync").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}async startFromManifest(e,t){this.wire.sendAction("application-start-from-manifest").catch((e=>{}));const n=await this._createFromManifest(e);return await n._run(t),n}createFromManifest(e){return console.warn("Deprecation Warning: fin.Application.createFromManifest is deprecated. Please use fin.Application.startFromManifest"),this.wire.sendAction("application-create-from-manifest").catch((e=>{})),this._createFromManifest(e)}_createFromManifest(e){return this.wire.sendAction("get-application-manifest",{manifestUrl:e}).then((({payload:e})=>{const t=e.data.platform?e.data.platform.uuid:e.data.startup_app.uuid;return this.wrap({uuid:t})})).then((t=>(t._manifestUrl=e,t)))}}return F.ApplicationModule=i,F}(),e),n(Y(),e)}(R)),R}H.WebContents=D;var Q={};Object.defineProperty(Q,"__esModule",{value:!0}),Q.promisifySubscription=void 0;var X,ee,te;function ne(){if(X)return S;X=1,Object.defineProperty(S,"__esModule",{value:!0}),S._Window=void 0;const e=Z(),t=H,n=J(),i=T,r=Q;class o extends t.WebContents{constructor(e,t){super(e,t,"window")}async createWindow(e){this.wire.sendAction("window-create-window",this.identity).catch((e=>{}));const t=await(0,r.promisifySubscription)(this,"fire-constructor-callback");void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&(e.autoShow=!0),(0,i.handleDeprecatedWarnings)(e);const n=this.wire.environment.createChildContent({entityType:"window",options:e}),[o]=await Promise.all([t.getValue(),n]);let s;const{success:a}=o,c=o.data,{message:d}=c;s=a?{httpResponseCode:c.httpResponseCode,apiInjected:c.apiInjected}:{message:c.message,networkErrorCode:c.networkErrorCode,stack:c.stack};const h={message:d,cbPayload:s,success:a};try{this.getWebWindow().fin.__internal_.openerSuccessCBCalled()}catch(e){}return h.success?this:Promise.reject(h)}getAllFrames(){return this.wire.sendAction("get-all-frames",this.identity).then((({payload:e})=>e.data))}getBounds(){return this.wire.sendAction("get-window-bounds",this.identity).then((({payload:e})=>e.data))}center(){return this.wire.sendAction("center-window",this.identity).then((()=>{}))}blur(){return this.wire.sendAction("blur-window",this.identity).then((()=>{}))}bringToFront(){return this.wire.sendAction("bring-window-to-front",this.identity).then((()=>{}))}animate(e,t){return this.wire.sendAction("animate-window",{transitions:e,options:t,...this.identity}).then((()=>{}))}hide(){return this.wire.sendAction("hide-window",this.identity).then((()=>{}))}close(e=!1){return this.wire.sendAction("close-window",{force:e,...this.identity}).then((()=>{Object.setPrototypeOf(this,null)}))}focusedWebViewWasChanged(){return this.wire.sendAction("focused-webview-changed",this.identity).then((()=>{}))}getNativeId(){return this.wire.sendAction("get-window-native-id",this.identity).then((({payload:e})=>e.data))}async getCurrentViews(){const{payload:e}=await this.wire.sendAction("window-get-views",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}disableFrame(){return console.warn("Function is deprecated; use disableUserMovement instead."),this.wire.sendAction("disable-window-frame",this.identity).then((()=>{}))}disableUserMovement(){return this.wire.sendAction("disable-window-frame",this.identity).then((()=>{}))}enableFrame(){return console.warn("Function is deprecated; use enableUserMovement instead."),this.wire.sendAction("enable-window-frame",this.identity).then((()=>{}))}enableUserMovement(){return this.wire.sendAction("enable-window-frame",this.identity).then((()=>{}))}flash(){return this.wire.sendAction("flash-window",this.identity).then((()=>{}))}stopFlashing(){return this.wire.sendAction("stop-flash-window",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction("get-window-info",this.identity).then((({payload:e})=>e.data))}async getLayout(e){this.wire.sendAction("window-get-layout",this.identity).catch((e=>{}));const t=await this.getOptions();if(!t.layout&&!t.layoutSnapshot)throw new Error("Window does not have a Layout");return this.fin.Platform.Layout.wrap(e??this.identity)}getOptions(){return this.wire.sendAction("get-window-options",this.identity).then((({payload:e})=>e.data))}getParentApplication(){return this.wire.sendAction("window-get-parent-application",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity))}getParentWindow(){return this.wire.sendAction("window-get-parent-window",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity)).then((e=>e.getWindow()))}async getSnapshot(e){const t={area:e,...this.identity};console.warn("Window.getSnapshot has been deprecated, please use Window.capturePage");return(await this.wire.sendAction("get-window-snapshot",t)).payload.data}getState(){return this.wire.sendAction("get-window-state",this.identity).then((({payload:e})=>e.data))}getWebWindow(){return this.wire.sendAction("window-get-web-window",this.identity).catch((e=>{})),this.wire.environment.getWebWindow(this.identity)}isMainWindow(){return this.wire.sendAction("window-is-main-window",this.identity).catch((e=>{})),this.me.uuid===this.me.name}isShowing(){return this.wire.sendAction("is-window-showing",this.identity).then((({payload:e})=>e.data))}maximize(){return this.wire.sendAction("maximize-window",this.identity).then((()=>{}))}minimize(){return this.wire.sendAction("minimize-window",this.identity).then((()=>{}))}moveBy(e,t,n){return this.wire.sendAction("move-window-by",{deltaLeft:e,deltaTop:t,positioningOptions:n,...this.identity}).then((()=>{}))}moveTo(e,t,n){return this.wire.sendAction("move-window",{left:e,top:t,positioningOptions:n,...this.identity}).then((()=>{}))}resizeBy(e,t,n,i){return this.wire.sendAction("resize-window-by",{deltaWidth:Math.floor(e),deltaHeight:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}resizeTo(e,t,n,i){return this.wire.sendAction("resize-window",{width:Math.floor(e),height:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}restore(){return this.wire.sendAction("restore-window",this.identity).then((()=>{}))}setAsForeground(){return this.wire.sendAction("set-foreground-window",this.identity).then((()=>{}))}setBounds(e,t){return this.wire.sendAction("set-window-bounds",{...e,...this.identity,positioningOptions:t}).then((()=>{}))}show(e=!1){return this.wire.sendAction("show-window",{force:e,...this.identity}).then((()=>{}))}showAt(e,t,n=!1){return this.wire.sendAction("show-at-window",{force:n,left:Math.floor(e),top:Math.floor(t),...this.identity}).then((()=>{}))}updateOptions(e){return this.wire.sendAction("update-window-options",{options:e,...this.identity}).then((()=>{}))}authenticate(e,t){return this.wire.sendAction("window-authenticate",{userName:e,password:t,...this.identity}).then((()=>{}))}async showPopupMenu(e){const{payload:t}=await this.wire.sendAction("show-popup-menu",{options:e,...this.identity});return t.data}async closePopupMenu(){return this.wire.sendAction("close-popup-menu",{...this.identity}).then((()=>{}))}async dispatchPopupResult(e){this.wire.sendAction("window-dispatch-popup-result",this.identity).catch((e=>{})),await this.wire.sendAction("dispatch-popup-result",{data:e,...this.identity})}async print(e={content:"self"}){switch(e.content){case void 0:case"self":return super.print(e);case"screenshot":return this.wire.sendAction("print-screenshot",this.identity).then((()=>{}));case"views":return this.wire.sendAction("print-views",{...this.identity,options:e}).then((()=>{}));default:return}}}return S._Window=o,S}function ie(){return te||(te=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(function(){if(ee)return _;ee=1,Object.defineProperty(_,"__esModule",{value:!0}),_._WindowModule=void 0;const e=d,t=O,n=ne();class i extends e.Base{async wrap(e){this.wire.sendAction("window-wrap").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}wrapSync(e){this.wire.sendAction("window-wrap-sync").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}create(e){return this.wire.sendAction("create-window").catch((e=>{})),new n._Window(this.wire,{uuid:this.me.uuid,name:e.name}).createWindow(e)}getCurrent(){if(this.wire.sendAction("get-current-window").catch((e=>{})),!this.wire.me.isWindow)throw new Error("You are not in a Window context");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction("get-current-window-sync").catch((e=>{})),!this.wire.me.isWindow)throw new Error("You are not in a Window context");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return _._WindowModule=i,_}(),e),n(ne(),e)}(M)),M}Q.promisifySubscription=async(e,t,n=(()=>!0),i)=>{let r,o,s;const a=new Promise(((e,t)=>{r=e,o=t})),c=e=>{n(e)&&(clearTimeout(s),r(e))};return await e.on(t,c),i&&(s=setTimeout((()=>o(new Error("event timed out"))),i)),a.finally((()=>{e.removeListener(t,c).catch((()=>null))})),{getValue:()=>a}},Object.defineProperty(c,"__esModule",{value:!0}),c.System=void 0;const re=d,oe=g,se=ie(),ae=t;class ce extends re.EmitterBase{constructor(e){super(e,"system")}sendExternalProcessRequest(e,t){return new Promise(((n,i)=>{const r="external-process-exited";let o,s,a,c;"function"==typeof t.listener&&(a=e=>{const n=e||{};s={topic:"exited",uuid:n.processUuid||"",exitCode:n.exitCode||0},o===e.processUuid&&(t.listener(s),c.removeListener(r,a))},this.wire.me.name||(this.wire.me.name=this.wire.me.uuid),c=new se._Window(this.wire,this.wire.me),c.on(r,a)),this.wire.sendAction(e,t).then((({payload:e})=>{o=e.data.uuid,n(e.data),s&&o===s.uuid&&(t.listener(s),c.removeListener(r,a))})).catch((e=>{c&&c.removeListener(r,a),i(e)}))}))}getVersion(){return this.wire.sendAction("get-version").then((({payload:e})=>e.data))}clearCache(e){return this.wire.sendAction("clear-cache",e).then((()=>{}))}deleteCacheOnExit(){return this.wire.sendAction("delete-cache-request").then((()=>{}))}exit(){return this.wire.sendAction("exit-desktop").then((()=>{}))}async fetchManifest(e){const{payload:{data:t}}=await this.wire.sendAction("fetch-manifest",{manifestUrl:e});return t}flushCookieStore(){return this.wire.sendAction("flush-cookie-store").then((()=>{}))}getAllWindows(){return this.wire.sendAction("get-all-windows").then((({payload:e})=>e.data))}getAllApplications(){return this.wire.sendAction("get-all-applications").then((({payload:e})=>e.data))}getCommandLineArguments(){return this.wire.sendAction("get-command-line-arguments").then((({payload:e})=>e.data))}async getCrashReporterState(){const{payload:{data:{diagnosticMode:e,isRunning:t}}}=await this.wire.sendAction("get-crash-reporter-state");return console.warn("diagnosticMode property is deprecated. It will be removed in a future version"),{diagnosticMode:e,diagnosticsMode:e,isRunning:t}}async startCrashReporter(e){const t=e,n={...t,diagnosticMode:t.diagnosticsMode||t.diagnosticMode},{payload:{data:{diagnosticMode:i,isRunning:r}}}=await this.wire.sendAction("start-crash-reporter",n);return{diagnosticMode:i,diagnosticsMode:i,isRunning:r}}getUniqueUserId(){return this.wire.sendAction("get-unique-user-id").then((({payload:e})=>e.data))}getEntityInfo(e,t){return this.wire.sendAction("get-entity-info",{uuid:e,name:t}).then((({payload:e})=>e.data))}getEnvironmentVariable(e){return this.wire.sendAction("get-environment-variable",{environmentVariables:e}).then((({payload:e})=>e.data))}getFocusedWindow(){return this.wire.sendAction("get-focused-window").then((({payload:e})=>e.data))}async isAppCertified(e){const{payload:{data:{certifiedInfo:t}}}=await this.wire.sendAction("is-app-certified",{manifestUrl:e});return t}getInstalledRuntimes(){return this.wire.sendAction("get-installed-runtimes").then((({payload:e})=>e.data.runtimes))}async getInstalledApps(){const{payload:{data:{installedApps:e}}}=await this.wire.sendAction("get-installed-apps");return e}getLog(e){return this.wire.sendAction("view-log",e).then((({payload:e})=>e.data))}getMachineId(){return this.wire.sendAction("get-machine-id").then((({payload:e})=>e.data))}getMinLogLevel(){return this.wire.sendAction("get-min-log-level").then((({payload:e})=>e.data))}getLogList(){return this.wire.sendAction("list-logs").then((({payload:e})=>e.data))}getMonitorInfo(){return this.wire.sendAction("get-monitor-info").then((({payload:e})=>e.data))}getMousePosition(){return this.wire.sendAction("get-mouse-position").then((({payload:e})=>e.data))}getProcessList(){return console.warn("System.getProcessList has been deprecated. Please consider using our new process APIs: Window.getProcessInfo, View.getProcessInfo, Application.getProcessInfo, System.getAllProcessInfo"),this.wire.sendAction("process-snapshot").then((({payload:e})=>e.data))}async getAllProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction("get-all-process-info",this.identity);return e}getProxySettings(){return this.wire.sendAction("get-proxy-settings").then((({payload:e})=>e.data))}getRuntimeInfo(){return this.wire.sendAction("get-runtime-info").then((({payload:e})=>e.data))}getRvmInfo(){return this.wire.sendAction("get-rvm-info").then((({payload:e})=>e.data))}getHostSpecs(){return this.wire.sendAction("get-host-specs").then((({payload:e})=>e.data))}getOSInfo(){return this.wire.sendAction("get-os-info").then((({payload:e})=>e.data))}launchExternalProcess(e){return this.sendExternalProcessRequest("launch-external-process",e)}monitorExternalProcess(e){return this.sendExternalProcessRequest("monitor-external-process",e)}log(e,t){return this.wire.sendAction("write-to-log",{level:e,message:t}).then((()=>{}))}openUrlWithBrowser(e){return this.wire.sendAction("open-url-with-browser",{url:e}).then((()=>{}))}async registerCustomProtocol(e){if("object"!=typeof e)throw new Error("Must provide an object with a `protocolName` property having a string value.");await this.wire.sendAction("register-custom-protocol",e)}async unregisterCustomProtocol(e){await this.wire.sendAction("unregister-custom-protocol",{protocolName:e})}async getCustomProtocolState(e){return this.wire.sendAction("get-custom-protocol-state",{protocolName:e}).then((({payload:e})=>e.data))}releaseExternalProcess(e){return this.wire.sendAction("release-external-process",{uuid:e}).then((()=>{}))}showDeveloperTools(e){return this.wire.sendAction("show-developer-tools",e).then((()=>{}))}terminateExternalProcess(e){return this.wire.sendAction("terminate-external-process",e).then((()=>{}))}updateProxySettings(e){return this.wire.sendAction("update-proxy",e).then((()=>{}))}async downloadAsset(e,t){const n=()=>{};let i=n,r=n;const o=new Promise(((e,t)=>{i=e,r=t}));if("openfin"!==this.wire.environment.type)throw new oe.NotSupportedError("downloadAsset only supported in an OpenFin Render process");const s=oe.RuntimeError.getCallSite(),a=this.wire.environment.getNextMessageId().toString(),c=`asset-download-progress-${a}`,d=`asset-download-error-${a}`,h=`asset-download-complete-${a}`,l=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},u=()=>{this.removeListener(c,l)};await Promise.all([this.on(c,l),this.once(d,(e=>{u();const{reason:t,err:n}=e;r(new oe.RuntimeError({reason:t,error:n},s))})),this.once(h,(()=>{u(),i()}))]);const p=Object.assign(e,{downloadId:a});return await this.wire.sendAction("download-asset",p).catch((e=>{throw u(),e})),o}downloadRuntime(e,t){const n=oe.RuntimeError.getCallSite();return new Promise(((i,r)=>{if("openfin"!==this.wire.environment.type)return void r(new oe.NotSupportedError("downloadRuntime only supported in an OpenFin Render process"));const o=this.wire.environment.getNextMessageId().toString(),s=`runtime-download-progress-${o}`,a=`runtime-download-error-${o}`,c=`runtime-download-complete-${o}`,d=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},h=()=>{this.removeListener(s,d)};this.on(s,d),this.once(a,(e=>{h();const{reason:t,err:i}=e;r(new oe.RuntimeError({reason:t,error:i},n))})),this.once(c,(()=>{h(),i()}));const l=Object.assign(e,{downloadId:o});this.wire.sendAction("download-runtime",l).catch((e=>{h(),r(e)}))}))}downloadPreloadScripts(e){return this.wire.sendAction("download-preload-scripts",{scripts:e}).then((({payload:e})=>e.data))}getAllExternalApplications(){return this.wire.sendAction("get-all-external-applications").then((({payload:e})=>e.data))}getAppAssetInfo(e){return this.wire.sendAction("get-app-asset-info",e).then((({payload:e})=>e.data))}getCookies(e){const t=this.wire.environment.getUrl(),n=Object.assign(e,{url:t});return this.wire.sendAction("get-cookies",n).then((({payload:e})=>e.data))}setMinLogLevel(e){return this.wire.sendAction("set-min-log-level",{level:e}).then((()=>{}))}resolveUuid(e){return this.wire.sendAction("resolve-uuid",{entityKey:e}).then((({payload:e})=>e.data))}executeOnRemote(e,t){return t.requestingIdentity=e,this.wire.ferryAction(t)}readRegistryValue(e,t,n){return this.wire.sendAction("read-registry-value",{rootKey:e,subkey:t,value:n}).then((({payload:e})=>e.data))}registerExternalConnection(e){return this.wire.sendAction("register-external-connection",{uuid:e}).then((({payload:e})=>e.data))}async getServiceConfiguration(e){if("string"!=typeof e.name)throw new Error("Must provide an object with a `name` property having a string value");const{name:t}=e;return this.wire.sendAction("get-service-configuration",{name:t}).then((({payload:e})=>e.data))}async getSystemAppConfig(e){if("string"!=typeof e)throw new Error("Must provide a string value for name of system app");return this.wire.sendAction("get-system-app-configuration",{name:e}).then((({payload:e})=>e.data))}async registerShutdownHandler(e){this.wire.sendAction("system-register-shutdown-handler").catch((e=>{}));const{uuid:t,name:n}=this.wire.me;this.on("system-shutdown",(i=>{e({proceed:()=>{this.wire.environment.raiseEvent("application/system-shutdown-handled",{uuid:t,name:n,topic:"application"})}})}))}runRvmHealthCheck(){return this.wire.sendAction("run-rvm-health-check").then((({payload:e})=>e.data))}async launchManifest(e,t={}){const{subscribe:n,...i}=t,r=i;if(n){const e=new ae.EventEmitter;n(e);const t="app-version-progress",i="runtime-status",o="app-version-complete",s="app-version-error",a=this.wire.environment.getNextMessageId().toString();r.appVersionId=a;const c=[o,t,i,s],d=e=>{const{appVersionId:t,topic:n,type:i,...r}=e;return{...r,type:c.find((e=>i.includes(e)))}},h=t=>{const n=d(t);e.emit(n.type,n)},l=()=>{this.removeListener(`${t}.${a}`,h),this.removeListener(`${i}.${a}`,h),this.removeListener(`${o}.${a}`,h),this.removeListener(`${s}.${a}`,h),this.removeListener(`${o}.${a}`,l),this.removeListener(`${s}.${a}`,l)};await Promise.all([this.on(`${t}.${a}`,h),this.on(`${i}.${a}`,h),this.once(`${o}.${a}`,h),this.once(`${s}.${a}`,h),this.once(`${o}.${a}`,l),this.once(`${s}.${a}`,l)])}return(await this.wire.sendAction("launch-manifest",{manifestUrl:e,opts:r})).payload.data.manifest}async queryPermissionForCurrentContext(e){const t={uuid:this.wire.me.uuid,name:this.wire.me.name};return(await this.wire.sendAction("query-permission-for-current-context",{apiName:e,identity:t})).payload.data}async enableNativeWindowIntegrationProvider(e){const{payload:t}=await this.wire.sendAction("enable-native-window-integration-provider",{permissions:e});return t.data}async registerUsage({data:e,type:t}){await this.wire.sendAction("register-usage",{data:e,type:t})}async getPrinters(){const{payload:e}=await this.wire.sendAction("system-get-printers");return e.data}async updateProcessLoggingOptions(e){await this.wire.sendAction("system-update-process-logging-options",{options:e})}async getDomainSettings(){const{payload:{data:e}}=await this.wire.sendAction("get-domain-settings",this.identity);return e}async setDomainSettings(e){await this.wire.sendAction("set-domain-settings",{domainSettings:e,...this.identity})}async refreshExtensions(){const{payload:e}=await this.wire.sendAction("refresh-extensions");return e.data}async getInstalledExtensions(){const{payload:e}=await this.wire.sendAction("get-installed-extensions");return e.data}}c.System=ce;var de={},he={};Object.defineProperty(he,"__esModule",{value:!0}),he.RefCounter=void 0;he.RefCounter=class{constructor(){this.topicRefMap=new Map}incRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t+1;n=i,this.topicRefMap.set(e,i)}else this.topicRefMap.set(e,1),n=1;return n}decRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t-1;this.topicRefMap.set(e,i),n=i}else n=-1;return n}actOnFirst(e,t,n){return 1===this.incRefCount(e)?t():n()}actOnLast(e,t,n){return 0===this.decRefCount(e)?t():n()}};var le={},ue={},pe={};Object.defineProperty(pe,"__esModule",{value:!0}),pe.ChannelBase=pe.ProtectedItems=void 0;const we=e=>async(t,n,i)=>{const r=await e(t,n,i);return void 0===r?n:r};pe.ProtectedItems=class{constructor(e,t){this.providerIdentity=e,this.close=t}};class ye{static defaultAction(e){throw new Error(`No action registered at target for ${e}`)}constructor(){this.subscriptions=new Map}async processAction(e,t,n){try{const i=this.subscriptions.has(e)?this.subscriptions.get(e):(t,n)=>(this.defaultAction??ye.defaultAction)(e,t,n),r=this.preAction?await this.preAction(e,t,n):t,o=await i(r,n);return this.postAction?await this.postAction(e,o,n):o}catch(t){if(this.errorMiddleware)return this.errorMiddleware(e,t,n);throw t}}beforeAction(e){if(this.preAction)throw new Error("Already registered beforeAction middleware");this.preAction=we(e)}onError(e){if(this.errorMiddleware)throw new Error("Already registered error middleware");this.errorMiddleware=e}afterAction(e){if(this.postAction)throw new Error("Already registered afterAction middleware");this.postAction=we(e)}remove(e){this.subscriptions.delete(e)}setDefaultAction(e){if(this.defaultAction)throw new Error("default action can only be set once");this.defaultAction=e}register(e,t){if(this.subscriptions.has(e))throw new Error(`Subscription already registered for action: ${e}. Unsubscribe before adding new subscription`);return this.subscriptions.set(e,t),!0}}pe.ChannelBase=ye;var fe,ge,me,ve=s&&s.__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)},Ce=s&&s.__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};Object.defineProperty(ue,"__esModule",{value:!0}),ue.ChannelClient=void 0;const be=pe,Ie=new Map;class Ee extends be.ChannelBase{static closeChannelByEndpointId(e){const t=Ie.get(e);t&&ve(t,me,"f").call(t)}static handleProviderDisconnect(e){for(const t of Ie.values())t.providerIdentity.channelId===e.channelId&&(t.disconnectListener(e),ve(t,me,"f").call(t))}constructor(e,t,n){super(),fe.set(this,void 0),ge.set(this,void 0),this.processAction=(e,t,n)=>super.processAction(e,t,n),me.set(this,(()=>{Ie.delete(this.endpointId),ve(this,ge,"f").close()})),Ce(this,fe,new be.ProtectedItems(e,t),"f"),this.disconnectListener=()=>{},this.endpointId=e.endpointId,Ce(this,ge,n,"f"),Ie.set(this.endpointId,this),n.receive(this.processAction)}get providerIdentity(){return ve(this,fe,"f").providerIdentity}async dispatch(e,t){if(ve(this,ge,"f").isEndpointConnected(this.providerIdentity.channelId))return ve(this,ge,"f").send(this.providerIdentity.channelId,e,t);throw new Error("The client you are trying to dispatch from is disconnected from the target provider.")}onDisconnection(e){this.disconnectListener=t=>{try{e(t)}catch(e){throw new Error(`Error while calling the onDisconnection callback: ${e.message}`)}finally{this.disconnectListener=()=>{}}}}async disconnect(){await this.sendDisconnectAction(),ve(this,me,"f").call(this)}async sendDisconnectAction(){const e=ve(this,fe,"f");await e.close()}static async wireClose(e,t,n){const{channelName:i,uuid:r,name:o}=t;await e.sendAction("disconnect-from-channel",{channelName:i,uuid:r,name:o,endpointId:n})}}ue.ChannelClient=Ee,fe=new WeakMap,ge=new WeakMap,me=new WeakMap;var xe={},Ae={};Object.defineProperty(Ae,"__esModule",{value:!0}),Ae.exhaustiveCheck=void 0,Ae.exhaustiveCheck=function(e,t){throw new Error(`Unsupported value: ${e}${t?`\n Supported values are: ${t.join("")}`:""}`)};var Pe,Me,_e,Oe={},Se=s&&s.__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},Re=s&&s.__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)};Object.defineProperty(Oe,"__esModule",{value:!0}),Oe.ClassicInfo=Oe.ClassicStrategy=void 0;Oe.ClassicStrategy=class{constructor(e,t,n,i){this.messageReceiver=t,this.endpointId=n,this.providerIdentity=i,Pe.set(this,void 0),Me.set(this,new Map),_e.set(this,new Map),this.send=async(e,t,n)=>{const i=Re(this,Me,"f").get(e);if(!i)throw new Error(`Could not locate routing info for endpoint ${e}`);const r={...i};r.isLocalEndpointId&&delete r.endpointId,delete r.isLocalEndpointId;const o=Re(this,Pe,"f").sendAction("send-channel-message",{...r,providerIdentity:this.providerIdentity,action:t,payload:n});Re(this,_e,"f").get(e)?.add(o);return(await o.catch((e=>{throw new Error(e.message)})).finally((()=>{Re(this,_e,"f").get(e)?.delete(o)}))).payload.data.result},this.close=async()=>{this.messageReceiver.removeEndpoint(this.providerIdentity.channelId,this.endpointId),[...Re(this,Me,"f").keys()].forEach((e=>this.closeEndpoint(e))),Se(this,Me,new Map,"f")},Se(this,Pe,e,"f")}onEndpointDisconnect(e,t){}receive(e){this.messageReceiver.addEndpoint(e,this.providerIdentity.channelId,this.endpointId)}async closeEndpoint(e){const t=Re(this,Me,"f").get(e);Re(this,Me,"f").delete(e);const n=Re(this,_e,"f").get(e);n?.forEach((n=>{const i=`Channel connection with identity uuid: ${t?.uuid} / name: ${t?.name} / endpointId: ${e} no longer connected.`;n.cancel(new Error(i))}))}isEndpointConnected(e){return Re(this,Me,"f").has(e)}addEndpoint(e,t){Re(this,Me,"f").set(e,t.endpointIdentity),Re(this,_e,"f").set(e,new Set)}isValidEndpointPayload(e){return"string"==typeof e?.endpointIdentity?.endpointId||"string"==typeof e?.endpointIdentity?.channelId}},Pe=new WeakMap,Me=new WeakMap,_e=new WeakMap,Oe.ClassicInfo={version:5,minimumVersion:0,type:"classic"};var Fe={},je={},ke={};Object.defineProperty(ke,"__esModule",{value:!0}),ke.errorToPOJO=void 0,ke.errorToPOJO=function(e){return{stack:e.stack,name:e.name,message:e.message,toString:()=>e.stack||e.toString()}};var Le,Te,$e=s&&s.__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)},Be=s&&s.__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};Object.defineProperty(je,"__esModule",{value:!0}),je.RTCEndpoint=void 0;const Ge=ke;je.RTCEndpoint=class{static isValidEndpointPayload(e){const t=e=>"object"==typeof e&&null!==e;return t(e)&&t(e.endpointIdentity)&&t(e.rtc)&&"string"==typeof e.endpointIdentity.endpointId}constructor({rtc:e,endpointIdentity:t}){this.responseMap=new Map,Le.set(this,null),Te.set(this,void 0),this.connectionStateChangeHandler=e=>{"connected"!==this.rtc.rtcClient.connectionState&&(this.rtc.rtcClient.removeEventListener("connectionstatechange",this.connectionStateChangeHandler),this.close(),$e(this,Te,"f")&&$e(this,Te,"f").call(this))},this.send=async(e,t)=>{const n=`message-${Math.random()}`,i=new Promise(((e,t)=>{this.responseMap.set(n,{resolve:e,reject:t})}));return this.rtc.channels.request.send(JSON.stringify({action:e,payload:t,messageId:n})),i},this.close=()=>{this.responseMap.forEach((e=>e.reject("Connection has closed."))),this.responseMap=new Map,this.rtc.channels.request.close(),this.rtc.channels.response.close(),this.rtc.rtcClient.close()},this.rtc=e,this.endpointIdentity=t,this.rtc.channels.response.addEventListener("message",(e=>{let{data:t}=e;e.data instanceof ArrayBuffer&&(t=(new TextDecoder).decode(e.data));const{messageId:n,payload:i,success:r,error:o}=JSON.parse(t),{resolve:s,reject:a}=this.responseMap.get(n)??{};s&&a?(this.responseMap.delete(n),r?s(i):a(o)):(console.log("Could not find id in responseMap."),console.log(e))})),this.rtc.channels.request.addEventListener("message",(async e=>{let{data:n}=e;e.data instanceof ArrayBuffer&&(n=(new TextDecoder).decode(e.data));const{messageId:i,action:r,payload:o}=JSON.parse(n);if($e(this,Le,"f"))try{const e=await $e(this,Le,"f").call(this,r,o,t);this.rtc.channels.response.send(JSON.stringify({messageId:i,payload:e,success:!0}))}catch(e){"open"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,error:(0,Ge.errorToPOJO)(e),success:!1}))}else"open"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,success:!1,error:"Connection not ready."}))})),this.rtc.rtcClient.addEventListener("connectionstatechange",this.connectionStateChangeHandler),Object.values(this.rtc.channels).forEach((e=>{e.onclose=e=>{[...this.responseMap.values()].forEach((e=>e.reject(new Error("RTCDataChannel closed unexpectedly, this is most commonly caused by message size. Note: RTC Channels have a message size limit of ~255kB.")))),this.close(),$e(this,Te,"f")&&$e(this,Te,"f").call(this)}}))}onDisconnect(e){if($e(this,Te,"f"))throw new Error("RTCEndpoint disconnectListener cannot be set twice.");Be(this,Te,e,"f")}receive(e){if($e(this,Le,"f"))throw new Error("You have already set a listener for this RTC Endpoint.");Be(this,Le,e,"f")}get connected(){return"connected"===this.rtc.rtcClient.connectionState}},Le=new WeakMap,Te=new WeakMap;var We,He,Ne,De={},Ue=s&&s.__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)},Ve=s&&s.__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};Object.defineProperty(De,"__esModule",{value:!0}),De.EndpointStrategy=void 0;De.EndpointStrategy=class{constructor(e,t,n){this.EndpointType=e,this.StrategyName=n,We.set(this,null),He.set(this,new Map),Ne.set(this,!0),this.send=async(e,t,n)=>this.getEndpointById(e).send(t,n),this.close=async()=>{Ue(this,Ne,"f")&&(Ue(this,He,"f").forEach((e=>e.close())),Ve(this,He,new Map,"f")),Ve(this,Ne,!1,"f")},this.isValidEndpointPayload=t}onEndpointDisconnect(e,t){this.getEndpointById(e).onDisconnect(t)}receive(e){if(Ue(this,We,"f"))throw new Error(`You have already set a listener for this ${this.StrategyName} Strategy`);Ve(this,We,e,"f"),Ue(this,He,"f").forEach((e=>e.receive(Ue(this,We,"f"))))}getEndpointById(e){const t=Ue(this,He,"f").get(e);if(!t)throw new Error(`Client with endpoint id ${e} is not connected`);return t}get connected(){return Ue(this,Ne,"f")}isEndpointConnected(e){return Ue(this,He,"f").has(e)}addEndpoint(e,t){if(!Ue(this,Ne,"f"))return void console.warn(`Adding endpoint to disconnected ${this.StrategyName} Strategy`);const n=new this.EndpointType(t);Ue(this,We,"f")&&n.receive(Ue(this,We,"f")),Ue(this,He,"f").set(e,n)}async closeEndpoint(e){Ue(this,He,"f").delete(e)}},We=new WeakMap,He=new WeakMap,Ne=new WeakMap,Object.defineProperty(Fe,"__esModule",{value:!0}),Fe.RTCInfo=Fe.RTCStrategy=void 0;const ze=je,Ke=De;class qe extends Ke.EndpointStrategy{constructor(){super(ze.RTCEndpoint,ze.RTCEndpoint.isValidEndpointPayload,"RTC")}}Fe.RTCStrategy=qe,Fe.RTCInfo={version:2,minimumVersion:0,type:"rtc"};var Je={};Object.defineProperty(Je,"__esModule",{value:!0}),Je.RTCICEManager=void 0;const Ye=d;class Ze extends Ye.EmitterBase{constructor(e){super(e,"channel"),this.ensureChannelOpened=e=>new Promise(((t,n)=>{if("open"===e.readyState)t();else if("connecting"===e.readyState){const n=()=>{e.removeEventListener("open",n),t()};e.addEventListener("open",n)}else n(new Error("This Channel has already closed"))}))}static createDataChannelPromise(e,t){let n;const i=new Promise((e=>{n=e})),r=i=>{const o=()=>{i.channel.removeEventListener("open",o),n(i.channel)};i.channel.label===e&&(i.channel.addEventListener("open",o),t.removeEventListener("datachannel",r))};return t.addEventListener("datachannel",r),i}async listenForProviderIce(e,t){await this.on(this.createProviderEventName(e),t,{timestamp:Date.now()})}async raiseProviderIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createProviderEventName(e)),t)}async listenForClientIce(e,t){await this.on(this.createClientEventName(e),t,{timestamp:Date.now()})}async raiseClientIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createClientEventName(e)),t)}cleanupIceListeners(e){this.removeAllListeners(this.createClientEventName(e)),this.removeAllListeners(this.createProviderEventName(e))}createClientEventName(e){return`ice-client-${e}`}createProviderEventName(e){return`ice-provider-${e}`}createRouteString(e){return`channel/${e}`}createRtcPeer(){return this.wire.environment.getRtcPeer()}async startClientOffer(){const e=Math.random().toString(),t=this.createRtcPeer();t.addEventListener("icecandidate",(async t=>{t.candidate&&await this.raiseClientIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForProviderIce(e,(async e=>{await t.addIceCandidate(e.candidate)}));const n={request:t.createDataChannel("request"),response:t.createDataChannel("response")},i=await t.createOffer();await t.setLocalDescription(i);const r=Promise.all([n.request,n.response].map(this.ensureChannelOpened)).then((()=>{}));return{rtcClient:t,channels:n,offer:i,rtcConnectionId:e,channelsOpened:r}}async finishClientOffer(e,t,n){return await e.setRemoteDescription(t),await n,!0}async createProviderAnswer(e,t){const n=this.createRtcPeer(),i=Ze.createDataChannelPromise("request",n),r=Ze.createDataChannelPromise("response",n);n.addEventListener("icecandidate",(async t=>{t.candidate&&await this.raiseProviderIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForClientIce(e,(async e=>{await n.addIceCandidate(e.candidate)})),await n.setRemoteDescription(t);const o=await n.createAnswer();await n.setLocalDescription(o);const s=Promise.all([i,r]).then((([t,n])=>(this.cleanupIceListeners(e),{request:t,response:n})));return{rtcClient:n,answer:o,channels:s}}}Je.RTCICEManager=Ze;var Qe={},Xe={};function et(e){return[...e.split(".").reverse().entries()].reduce(((e,[t,n])=>e+ +n*1e4**t),0)}function tt(e,t){return et(e)>=et(t)}function nt(e){return e.split("/")[0]}Object.defineProperty(Xe,"__esModule",{value:!0}),Xe.runtimeUuidMeetsMinimumRuntimeVersion=Xe.parseRuntimeUuid=Xe.meetsMinimumRuntimeVersion=void 0,Xe.meetsMinimumRuntimeVersion=tt,Xe.parseRuntimeUuid=nt,Xe.runtimeUuidMeetsMinimumRuntimeVersion=function(e,t){return tt(nt(e),t)};var it,rt,ot,st,at,ct=s&&s.__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)},dt=s&&s.__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};Object.defineProperty(Qe,"__esModule",{value:!0}),Qe.ChannelProvider=void 0;const ht=pe,lt=Xe;class ut extends ht.ChannelBase{get connections(){return[...ct(this,it,"f")]}static handleClientDisconnection(e,t){const n=e.connections.find((e=>e.endpointId===t.endpointId));if(n)ct(e,st,"f").call(e,n);else{e.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name)).forEach(ct(e,st,"f"))}e.disconnectListener(t)}static setProviderRemoval(e,t){ut.removalMap.set(e,t)}constructor(e,t,n){super(),it.set(this,void 0),rt.set(this,void 0),ot.set(this,void 0),st.set(this,(e=>{const t=this.connections.filter((t=>t.endpointId!==e.endpointId));ct(this,ot,"f").closeEndpoint(e.endpointId),dt(this,it,t,"f")})),this.processAction=async(e,t,n)=>(ut.clientIsMultiRuntime(n)&&!(0,lt.runtimeUuidMeetsMinimumRuntimeVersion)(n.runtimeUuid,"18.87.56.0")?this.handleMultiRuntimeLegacyClient(n):this.checkForClientConnection(n),super.processAction(e,t,n)),at.set(this,(()=>{ct(this,ot,"f").close();const e=ut.removalMap.get(this);e&&e()})),dt(this,rt,new ht.ProtectedItems(e,t),"f"),this.connectListener=()=>{},this.disconnectListener=()=>{},dt(this,it,[],"f"),dt(this,ot,n,"f"),n.receive(this.processAction)}dispatch(e,t,n){const i=e.endpointId??this.getEndpointIdForOpenFinId(e,t);return i&&ct(this,ot,"f").isEndpointConnected(i)?ct(this,ot,"f").send(i,t,n):Promise.reject(new Error(`Client connection with identity uuid: ${e.uuid} / name: ${e.name} / endpointId: ${i} no longer connected.`))}async processConnection(e,t){return ct(this,it,"f").push(e),this.connectListener(e,t)}publish(e,t){return this.connections.map((n=>ct(this,ot,"f").send(n.endpointId,e,t)))}onConnection(e){this.connectListener=e}onDisconnection(e){this.disconnectListener=e}async destroy(){const e=ct(this,rt,"f");e.providerIdentity,dt(this,it,[],"f"),await e.close(),ct(this,at,"f").call(this)}async getAllClientInfo(){return this.connections.map((e=>{const{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}=e;return{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}}))}checkForClientConnection(e){if(!this.isClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider.\n Client Identity: {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}isClientConnected(e){return ut.clientIdentityIncludesEndpointId(e)?this.connections.some((t=>t.endpointId===e.endpointId&&t.uuid===e.uuid&&t.name===e.name)):this.isLegacyClientConnected(e)}isLegacyClientConnected(e){return this.connections.some((t=>t.uuid===e.uuid&&t.name===e.name))}handleMultiRuntimeLegacyClient(e){if(!this.isLegacyClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider. Client Identity:\n {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}getEndpointIdForOpenFinId(e,t){const n=this.connections.filter((t=>t.name===e.name&&t.uuid===e.uuid));if(n.length>=2){const n=ct(this,rt,"f"),{uuid:i,name:r}=e,o=n?.providerIdentity.uuid,s=n?.providerIdentity.name;console.warn(`WARNING: Dispatch call may have unintended results. The "to" argument of your dispatch call is missing the\n "endpointId" parameter. The identity you are dispatching to ({uuid: ${i}, name: ${r}})\n has multiple channelClients for this channel. Your dispatched action: (${t}) from the provider:\n ({uuid: ${o}, name: ${s}}) will only be processed by the most recently-created client.`)}return n.pop()?.endpointId}static clientIdentityIncludesEndpointId(e){return void 0!==e.endpointId}static clientIsMultiRuntime(e){return void 0!==e.runtimeUuid}static async wireClose(e,t){await e.sendAction("destroy-channel",{channelName:t})}}Qe.ChannelProvider=ut,it=new WeakMap,rt=new WeakMap,ot=new WeakMap,st=new WeakMap,at=new WeakMap,ut.removalMap=new WeakMap;var pt={};Object.defineProperty(pt,"__esModule",{value:!0}),pt.MessageReceiver=void 0;const wt=ue,yt=d;class ft extends yt.Base{constructor(e){super(e),this.onmessage=e=>"process-channel-message"===e.action&&(this.processChannelMessage(e),!0),this.endpointMap=new Map,this.latestEndpointIdByChannelId=new Map,e.registerMessageHandler(this.onmessage.bind(this))}async processChannelMessage(e){const{senderIdentity:t,providerIdentity:n,action:i,ackToSender:r,payload:o,intendedTargetIdentity:s}=e.payload,a=s.channelId??s.endpointId??this.latestEndpointIdByChannelId.get(n.channelId),c=this.endpointMap.get(a);if(!c)return r.payload.success=!1,r.payload.reason=`Client connection with identity uuid: ${this.wire.me.uuid} / name: ${this.wire.me.name} / endpointId: ${a} no longer connected.`,this.wire.sendRaw(r);try{const e=await c(i,o,t);return r.payload.payload=r.payload.payload||{},r.payload.payload.result=e,this.wire.sendRaw(r)}catch(e){return r.payload.success=!1,r.payload.reason=e.message,this.wire.sendRaw(r)}}addEndpoint(e,t,n){this.endpointMap.set(n,e),t!==n&&this.latestEndpointIdByChannelId.set(t,n)}removeEndpoint(e,t){this.endpointMap.delete(t),this.latestEndpointIdByChannelId.get(e)===t&&this.latestEndpointIdByChannelId.delete(e)}checkForPreviousClientConnection(e){const t=this.latestEndpointIdByChannelId.get(e);t&&(wt.ChannelClient.closeChannelByEndpointId(t),console.warn("You have created a second connection to an older provider. First connection has been removed from the clientMap"),console.warn("If the provider calls publish(), you may receive multiple messages."))}}pt.MessageReceiver=ft;var gt={};Object.defineProperty(gt,"__esModule",{value:!0}),gt.ProtocolManager=void 0;gt.ProtocolManager=class{constructor(e){this.ProtocolsInPreferenceOrder=e,this.DefaultClientProtocols=["classic"],this.DefaultProviderProtocols=["classic"],this.getClientProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultClientProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(", ")}.`);return t},this.getProviderProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultProviderProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(", ")}.`);return t},this.getCompatibleProtocols=(e,t)=>t.supportedProtocols.filter((t=>e.some((e=>e.type===t.type&&t.version>=e.minimumVersion&&e.version>=(t.minimumVersion??0))))).slice(0,t.maxProtocols)}};var mt={};Object.defineProperty(mt,"__esModule",{value:!0});class vt{static combine(e,t){return new vt(e,t)}constructor(e,t){this.primary=e,this.secondary=t}onEndpointDisconnect(e,t){this.primary.onEndpointDisconnect(e,(()=>{this.secondary.isEndpointConnected(e)||t()})),this.secondary.onEndpointDisconnect(e,(()=>{this.primary.isEndpointConnected(e)||t()}))}isValidEndpointPayload(e){return this.primary.isValidEndpointPayload(e)||this.secondary.isValidEndpointPayload(e)}async closeEndpoint(e){await this.primary.closeEndpoint(e),await this.secondary.closeEndpoint(e)}isEndpointConnected(e){return this.primary.isEndpointConnected(e)||this.secondary.isEndpointConnected(e)}async addEndpoint(e,t){this.primary.isValidEndpointPayload(t)&&await this.primary.addEndpoint(e,t),this.secondary.isValidEndpointPayload(t)&&await this.secondary.addEndpoint(e,t)}receive(e){this.primary.receive(e),this.secondary.receive(e)}send(e,t,n){return this.primary.isEndpointConnected(e)?this.primary.send(e,t,n):this.secondary.send(e,t,n)}async close(){await Promise.all([this.primary.close(),this.secondary.close()])}}mt.default=vt;var Ct,bt,It=s&&s.__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},Et=s&&s.__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)},xt=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(xe,"__esModule",{value:!0}),xe.ConnectionManager=void 0;const At=Ae,Pt=d,Mt=Oe,_t=Fe,Ot=Je,St=Qe,Rt=pt,Ft=gt,jt=xt(mt);class kt extends Pt.Base{static getProtocolOptionsFromStrings(e){return e.map((e=>{switch(e){case"rtc":return _t.RTCInfo;case"classic":return Mt.ClassicInfo;default:return(0,At.exhaustiveCheck)(e,["rtc","classic"])}}))}constructor(e){super(e),Ct.set(this,void 0),bt.set(this,void 0),this.removeChannelFromProviderMap=e=>{this.providerMap.delete(e)},this.onmessage=e=>"process-channel-connection"===e.action&&(this.processChannelConnection(e),!0),this.providerMap=new Map,this.protocolManager=new Ft.ProtocolManager("node"===this.wire.environment.type?["classic"]:["rtc","classic"]),It(this,Ct,new Rt.MessageReceiver(e),"f"),It(this,bt,new Ot.RTCICEManager(e),"f"),e.registerMessageHandler(this.onmessage.bind(this))}createProvider(e,t){const n=Object.assign(this.wire.environment.getDefaultChannelOptions().create,e||{}),i=this.protocolManager.getProviderProtocols(n?.protocols),r=i.map((e=>{switch(e){case"rtc":return new _t.RTCStrategy;case"classic":return new Mt.ClassicStrategy(this.wire,Et(this,Ct,"f"),t.channelId,t);default:return(0,At.exhaustiveCheck)(e,["rtc","classic"])}}));let o;if(2===r.length){const[e,t]=r;o=jt.default.combine(e,t)}else{if(1!==r.length)throw new Error("failed to combine strategies");[o]=r}const s=new St.ChannelProvider(t,(()=>St.ChannelProvider.wireClose(this.wire,t.channelName)),o),a=t.channelId;return this.providerMap.set(a,{provider:s,strategy:o,supportedProtocols:kt.getProtocolOptionsFromStrings(i)}),St.ChannelProvider.setProviderRemoval(s,this.removeChannelFromProviderMap.bind(this)),s}async createClientOffer(e){const t=this.protocolManager.getClientProtocols(e?.protocols);let n;return{offer:{supportedProtocols:await Promise.all(t.map((async e=>{switch(e){case"rtc":{const{rtcClient:e,channels:t,offer:i,rtcConnectionId:r,channelsOpened:o}=await Et(this,bt,"f").startClientOffer();return n={rtcClient:e,channels:t,channelsOpened:o},{type:"rtc",version:_t.RTCInfo.version,payload:{offer:i,rtcConnectionId:r}}}case"classic":return{type:"classic",version:Mt.ClassicInfo.version};default:return(0,At.exhaustiveCheck)(e,["rtc","classic"])}}))),maxProtocols:2},rtc:n}}async createClientStrategy(e,t){t.endpointId||(t.endpointId=this.wire.environment.getNextMessageId(),Et(this,Ct,"f").checkForPreviousClientConnection(t.channelId));const n=t.answer??{supportedProtocols:[{type:"classic",version:1}]},i=(await Promise.all(n.supportedProtocols.map((async n=>"rtc"===n.type&&e?(await Et(this,bt,"f").finishClientOffer(e.rtcClient,n.payload.answer,e.channelsOpened),new _t.RTCStrategy):"classic"===n.type?new Mt.ClassicStrategy(this.wire,Et(this,Ct,"f"),t.endpointId,t):null)))).filter((e=>null!==e));let r;if(e&&!i.some((e=>e instanceof _t.RTCStrategy))&&e&&e.rtcClient.close(),i.length>=2)r=jt.default.combine(i[0],i[1]);else{if(!i.length)throw new Error("No compatible protocols");[r]=i}const o={endpointIdentity:t,rtc:e};return r.addEndpoint(t.channelId,o),r}async processChannelConnection(e){const{clientIdentity:t,providerIdentity:n,ackToSender:i,payload:r,offer:o}=e.payload;t.endpointId?t.isLocalEndpointId=!1:(t.endpointId=this.wire.environment.getNextMessageId(),t.isLocalEndpointId=!0);const s=n.channelId,a=this.providerMap.get(s);if(!a)return i.payload.success=!1,i.payload.reason=`Channel "${n.channelName}" has been destroyed.`,this.wire.sendRaw(i);const{provider:c,strategy:d,supportedProtocols:h}=a;try{if(!(c instanceof St.ChannelProvider))throw Error("Cannot connect to a channel client");const e=o??{supportedProtocols:[{type:"classic",version:1}],maxProtocols:1},n=this.protocolManager.getCompatibleProtocols(h,e);if(!n.length)throw new Error("This provider does not support any of the offered protocols.");const s=await c.processConnection(t,r);i.payload.payload=i.payload.payload||{};let a={supportedProtocols:[],endpointPayloadPromise:Promise.resolve({endpointIdentity:t})};return a=await n.reduce((async(e,t)=>{const n=await e;if("rtc"===t.type){const{answer:e,rtcClient:i,channels:r}=await Et(this,bt,"f").createProviderAnswer(t.payload.rtcConnectionId,t.payload.offer);n.supportedProtocols.push({type:"rtc",version:_t.RTCInfo.version,payload:{answer:e}}),n.endpointPayloadPromise=n.endpointPayloadPromise.then((e=>r.then((t=>({...e,rtc:{rtcClient:i,channels:t}})))))}else n.supportedProtocols.push({type:"classic",version:Mt.ClassicInfo.version});return n}),Promise.resolve(a)),a.endpointPayloadPromise.then((e=>d.addEndpoint(t.endpointId,e))),i.payload.payload.result=s,i.payload.payload.answer=a,this.wire.sendRaw(i)}catch(e){return i.payload.success=!1,i.payload.reason=e.message,this.wire.sendRaw(i)}}}xe.ConnectionManager=kt,Ct=new WeakMap,bt=new WeakMap;var Lt,Tt,$t,Bt=s&&s.__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},Gt=s&&s.__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)};Object.defineProperty(le,"__esModule",{value:!0}),le.Channel=void 0;const Wt=t,Ht=G,Nt=d,Dt=ue,Ut=xe,Vt=Qe;function zt(e){const t=Math.floor(e/10),n=Math.min(3e4,500*2**t);return new Promise((e=>{setTimeout((()=>{e(!1)}),n)}))}class Kt extends Nt.EmitterBase{constructor(e){super(e,"channel"),Lt.set(this,void 0),Tt.set(this,new Wt.EventEmitter),$t.set(this,new Ht.AsyncRetryableLazy((async()=>{await Promise.all([this.on("disconnected",(e=>{Dt.ChannelClient.handleProviderDisconnect(e)})),this.on("connected",((...e)=>{Gt(this,Tt,"f").emit("connected",...e)}))]).catch((()=>new Error("error setting up channel connection listeners")))}))),Bt(this,Lt,new Ut.ConnectionManager(e),"f")}async getAllChannels(){return this.wire.sendAction("get-all-channels").then((({payload:e})=>e.data))}async onChannelConnect(e){await this.on("connected",e)}async onChannelDisconnect(e){await this.on("disconnected",e)}async safeConnect(e,t,n){const i={count:0};do{let r=()=>{};const o=new Promise((t=>{r=n=>{e===n.channelName&&t(!0)},Gt(this,Tt,"f").on("connected",r)}));try{if(i.count>0){i.gotConnectedEvent=await Promise.race([zt(i.count),o]);const t=await this.wire.sendAction("connect-to-channel",{...n,retryInfo:i});return console.log(`Successfully connected to channelName: ${e}`),t.payload.data}const t=this.wire.sendAction("connect-to-channel",n);i.originalMessageId=t.messageId;return(await t).payload.data}catch(n){if(!n.message.includes("internal-nack"))throw n;t&&0===i.count&&console.warn(`No channel found for channelName: ${e}. Waiting for connection...`)}finally{i.count+=1,Gt(this,Tt,"f").removeListener("connected",r)}}while(t);throw new Error(`No channel found for channelName: ${e}.`)}async connect(e,t={}){if(await Gt(this,$t,"f").getValue(),!e||"string"!=typeof e)throw new Error("Please provide a channelName string to connect to a channel.");const n={wait:!0,...this.wire.environment.getDefaultChannelOptions().connect,...t},{offer:i,rtc:r}=await Gt(this,Lt,"f").createClientOffer(n);let o;(this.fin.me.isFrame||this.fin.me.isView||this.fin.me.isWindow)&&(o=(await this.fin.me.getInfo()).url);const s={channelName:e,...n,offer:i,connectionUrl:o},a=await this.safeConnect(e,n.wait,s),c=await Gt(this,Lt,"f").createClientStrategy(r,a),d=new Dt.ChannelClient(a,(()=>Dt.ChannelClient.wireClose(this.wire,a,a.endpointId)),c);return c.onEndpointDisconnect(a.channelId,(async()=>{try{await d.sendDisconnectAction()}catch(e){console.warn(`Something went wrong during disconnect for client with uuid: ${a.uuid} / name: ${a.name} / endpointId: ${a.endpointId}.`)}finally{Dt.ChannelClient.handleProviderDisconnect(a)}})),d}async create(e,t){if(!e)throw new Error("Please provide a channelName to create a channel");const{payload:{data:n}}=await this.wire.sendAction("create-channel",{channelName:e}),i=Gt(this,Lt,"f").createProvider(t,n);return this.on("client-disconnected",(t=>{t.channelName===e&&Vt.ChannelProvider.handleClientDisconnection(i,t)})),i}}le.Channel=Kt,Lt=new WeakMap,Tt=new WeakMap,$t=new WeakMap,Object.defineProperty(de,"__esModule",{value:!0}),de.InterAppPayload=de.InterApplicationBus=void 0;const qt=t,Jt=d,Yt=he,Zt=le,Qt=O;class Xt extends Jt.Base{constructor(e){super(e),this.events={subscriberAdded:"subscriber-added",subscriberRemoved:"subscriber-removed"},this.refCounter=new Yt.RefCounter,this.Channel=new Zt.Channel(e),this.emitter=new qt.EventEmitter,e.registerMessageHandler(this.onmessage.bind(this)),this.on=this.emitter.on.bind(this.emitter),this.removeAllListeners=this.emitter.removeAllListeners.bind(this.emitter)}async publish(e,t){await this.wire.sendAction("publish-message",{topic:e,message:t,sourceWindowName:this.me.name})}async send(e,t,n){const i=(0,Qt.validateIdentity)(e);if(i)throw new Error(i);await this.wire.sendAction("send-message",{destinationUuid:e.uuid,destinationWindowName:e.name,topic:t,message:n,sourceWindowName:this.me.name})}subscribe(e,t,n){const i=this.createSubscriptionKey(e.uuid,e.name||"*",t);return this.emitter.on(i,n),this.refCounter.actOnFirst(i,(async()=>{await this.wire.sendAction("subscribe",{sourceUuid:e.uuid,sourceWindowName:e.name||"*",topic:t,destinationWindowName:this.me.name})}),(()=>Promise.resolve()))}unsubscribe(e,t,n){const i=e.name||"*",r=this.createSubscriptionKey(e.uuid,i,t);return this.emitter.removeListener(r,n),this.refCounter.actOnLast(r,(async()=>{await this.wire.sendAction("unsubscribe",{sourceUuid:e.uuid,sourceWindowName:i,topic:t,destinationWindowName:this.me.name})}),(()=>new Promise((e=>e)).then((()=>{}))))}processMessage(e){const{payload:{message:t,sourceWindowName:n,sourceUuid:i,topic:r}}=e,o=[this.createSubscriptionKey(i,n,r),this.createSubscriptionKey(i,"*",r),this.createSubscriptionKey("*","*",r)],s={uuid:i,name:n};o.forEach((e=>{this.emitter.emit(e,t,s)}))}emitSubscriverEvent(e,t){const{payload:{targetName:n,uuid:i,topic:r}}=t,o={name:n,uuid:i,topic:r};this.emitter.emit(e,o)}createSubscriptionKey(e,t,n){const i=t||"*";if(!(e&&i&&n))throw new Error("Missing uuid, name, or topic string");return function(...e){return e.map((e=>Buffer.from(`${e}`).toString("base64"))).join("/")}(e,i,n)}onmessage(e){const{action:t}=e;switch(t){case"process-message":this.processMessage(e);break;case this.events.subscriberAdded:this.emitSubscriverEvent(this.events.subscriberAdded,e);break;case this.events.subscriberRemoved:this.emitSubscriverEvent(this.events.subscriberRemoved,e)}return!0}}de.InterApplicationBus=Xt;de.InterAppPayload=class{};var en={};Object.defineProperty(en,"__esModule",{value:!0}),en.Clipboard=void 0;const tn=d;class nn extends tn.Base{async writeText(e){await this.wire.sendAction("clipboard-write-text",e)}async readText(e){const{payload:t}=await this.wire.sendAction("clipboard-read-text",{type:e});return t.data}async writeImage(e){await this.wire.sendAction("clipboard-write-image",e)}async readImage(e={format:"dataURL"}){const{payload:t}=await this.wire.sendAction("clipboard-read-image",e);return t.data}async writeHtml(e){await this.wire.sendAction("clipboard-write-html",e)}async readHtml(e){const{payload:t}=await this.wire.sendAction("clipboard-read-html",{type:e});return t.data}async writeRtf(e){await this.wire.sendAction("clipboard-write-rtf",e)}async readRtf(e){const{payload:t}=await this.wire.sendAction("clipboard-read-rtf",{type:e});return t.data}async write(e){await this.wire.sendAction("clipboard-write",e)}async getAvailableFormats(e){const{payload:t}=await this.wire.sendAction("clipboard-read-formats",{type:e});return t.data}}en.Clipboard=nn;var rn={},on={},sn={};Object.defineProperty(sn,"__esModule",{value:!0}),sn.ExternalApplication=void 0;const an=d;class cn extends an.EmitterBase{constructor(e,t){super(e,"external-application",t.uuid),this.identity=t}getInfo(){return this.wire.sendAction("get-external-application-info",this.identity).then((({payload:e})=>e.data))}}sn.ExternalApplication=cn,Object.defineProperty(on,"__esModule",{value:!0}),on.ExternalApplicationModule=void 0;const dn=d,hn=sn;class ln extends dn.Base{wrap(e){return this.wire.sendAction("external-application-wrap").catch((e=>{})),Promise.resolve(new hn.ExternalApplication(this.wire,{uuid:e}))}wrapSync(e){return this.wire.sendAction("external-application-wrap-sync").catch((e=>{})),new hn.ExternalApplication(this.wire,{uuid:e})}}on.ExternalApplicationModule=ln,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(on,e),n(sn,e)}(rn);var un={},pn={},wn={};Object.defineProperty(wn,"__esModule",{value:!0}),wn._Frame=void 0;const yn=d;class fn extends yn.EmitterBase{constructor(e,t){super(e,"frame",t.uuid,t.name),this.identity=t}getInfo(){return this.wire.sendAction("get-frame-info",this.identity).then((({payload:e})=>e.data))}getParentWindow(){return this.wire.sendAction("get-parent-window",this.identity).then((({payload:e})=>e.data))}}wn._Frame=fn,Object.defineProperty(pn,"__esModule",{value:!0}),pn._FrameModule=void 0;const gn=d,mn=O,vn=wn;class Cn extends gn.Base{async wrap(e){this.wire.sendAction("frame-wrap").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}wrapSync(e){this.wire.sendAction("frame-wrap-sync").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}getCurrent(){return this.wire.sendAction("frame-get-current").catch((e=>{})),Promise.resolve(new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity()))}getCurrentSync(){return this.wire.sendAction("frame-get-current-sync").catch((e=>{})),new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity())}}pn._FrameModule=Cn,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(pn,e),n(wn,e)}(un);var bn={};Object.defineProperty(bn,"__esModule",{value:!0}),bn.GlobalHotkey=void 0;const In=d;class En extends In.EmitterBase{constructor(e){super(e,"global-hotkey")}async register(e,t){await this.on(e,t),await this.wire.sendAction("global-hotkey-register",{hotkey:e})}async unregister(e){await this.removeAllListeners(e),await this.wire.sendAction("global-hotkey-unregister",{hotkey:e})}async unregisterAll(){await Promise.all(this.eventNames().filter((e=>!("registered"===e||"unregistered"===e))).map((e=>this.removeAllListeners(e)))),await this.wire.sendAction("global-hotkey-unregister-all",{})}async isRegistered(e){const{payload:{data:t}}=await this.wire.sendAction("global-hotkey-is-registered",{hotkey:e});return t}}bn.GlobalHotkey=En;var xn,An={},Pn={},Mn={},_n=s&&s.__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)};Object.defineProperty(Mn,"__esModule",{value:!0}),Mn.Platform=void 0;const On=d,Sn=O,Rn=new Map;class Fn extends On.EmitterBase{constructor(e,t){super(t.wire,"application",e.uuid),this.getClient=e=>{this.wire.sendAction("platform-get-client",this.identity).catch((e=>{}));const t=e||this.identity,{uuid:n}=t;if(!Rn.has(n)){const e=_n(this,xn,"f").call(this,n);Rn.set(n,e)}return Rn.get(n)},xn.set(this,(async e=>{try{const t=`custom-frame-${e}`,n=await this._channel.connect(t,{wait:!1});return n.onDisconnection((()=>{Rn.delete(e)})),n}catch(t){throw Rn.delete(e),new Error("The targeted Platform is not currently running. Listen for application-started event for the given Uuid.")}})),this.launchLegacyManifest=this.launchContentManifest;const n=(0,Sn.validateIdentity)(e);if(n)throw new Error(n);this._channel=t,this.identity={uuid:e.uuid},this.Layout=this.fin.Platform.Layout,this.Application=this.fin.Application.wrapSync(this.identity)}async createView(e,t,n){this.wire.sendAction("platform-create-view",this.identity).catch((e=>{}));const i=await this.getClient(),r=await i.dispatch("create-view",{target:t,opts:e,targetView:n});if(!r||(0,Sn.validateIdentity)(r.identity))throw new Error(`When overwriting the createView call, please return an object that has a valid 'identity' property: ${JSON.stringify(r)}`);return this.fin.View.wrapSync(r.identity)}async createWindow(e){this.wire.sendAction("platform-create-window",this.identity).catch((e=>{}));const t=await this.getClient();e.reason||(e.reason="api-call");const n=await t.dispatch("create-view-container",e);if(!n||(0,Sn.validateIdentity)(n.identity))throw new Error(`When overwriting the createWindow call, please return an object that has a valid 'identity' property: ${JSON.stringify(n)}`);const{identity:i}=n,r=this.fin.Window.wrapSync(i);return r.name=i.name,r.uuid=i.uuid,r}async quit(){this.wire.sendAction("platform-quit",this.identity).catch((e=>{}));return(await this.getClient()).dispatch("quit")}async closeView(e){this.wire.sendAction("platform-close-view",this.identity).catch((e=>{}));const t=await this.getClient();await t.dispatch("close-view",{view:e})}async reparentView(e,t){console.warn("Platform.reparentView has been deprecated, please use Platform.createView"),this.wire.sendAction("platform-reparent-view",this.identity).catch((e=>{}));const n={...e,uuid:e.uuid??this.identity.uuid},i=await this.fin.View.wrap(n),r=await i.getOptions();return this.createView(r,t)}async getSnapshot(){this.wire.sendAction("platform-get-snapshot",this.identity).catch((e=>{}));return(await this.getClient()).dispatch("get-snapshot")}async getViewSnapshot(e){return(await this.getClient()).dispatch("get-view-snapshot",{viewIdentity:e})}async applySnapshot(e,t){this.wire.sendAction("platform-apply-snapshot",this.identity).catch((e=>{}));const n="Requested snapshot must be a valid Snapshot object, or a url or filepath to such an object.";let i;if("string"==typeof e)try{i=(await this._channel.wire.sendAction("get-application-manifest",{manifestUrl:e})).payload.data}catch(e){throw new Error(`${n}: ${e}`)}else i=e;if(!i.windows)throw new Error(n);const r=await this.getClient();return await r.dispatch("apply-snapshot",{snapshot:i,options:t}),this}async fetchManifest(e){return(await this.getClient()).dispatch("platform-fetch-manifest",{manifestUrl:e})}async launchContentManifest(e){this.wire.sendAction("platform-launch-content-manifest",this.identity).catch((()=>{}));const t=await this.getClient(),n=await this.fetchManifest(e);return t.dispatch("launch-into-platform",{manifest:n,manifestUrl:e}),this}async setWindowContext(e={},t){if(this.wire.sendAction("platform-set-window-context",this.identity).catch((e=>{})),!e)throw new Error("Please provide a serializable object or string to set the context.");const n=await this.getClient(),{entityType:i}=t?await this.fin.System.getEntityInfo(t.uuid,t.name):this.fin.me;await n.dispatch("set-window-context",{context:e,entityType:i,target:t||{uuid:this.fin.me.uuid,name:this.fin.me.name}})}async getWindowContext(e){this.wire.sendAction("platform-get-window-context",this.identity).catch((e=>{}));const t=await this.getClient(),{entityType:n}=e?await this.fin.System.getEntityInfo(e.uuid,e.name):this.fin.me;return t.dispatch("get-window-context",{target:e||{uuid:this.fin.me.uuid,name:this.fin.me.name},entityType:n})}async closeWindow(e,t={skipBeforeUnload:!1}){this.wire.sendAction("platform-close-window",this.identity).catch((e=>{}));return(await this.getClient()).dispatch("close-window",{windowId:e,options:t})}}Mn.Platform=Fn,xn=new WeakMap;var jn={},kn={},Ln={},Tn={};function $n(e){switch(e){case"columns":case"grid":case"rows":case"tabs":return!0;default:return!1}}Object.defineProperty(Tn,"__esModule",{value:!0}),Tn.overrideFromComposables=Tn.isValidPresetType=void 0,Tn.isValidPresetType=$n,Tn.overrideFromComposables=function(...e){return t=>e.reduceRight(((e,t)=>n=>t(e(n))),(e=>e))(t)},Tn.default={isValidPresetType:$n};var Bn={},Gn={},Wn={};Object.defineProperty(Wn,"__esModule",{value:!0}),Wn.ApiConsumer=void 0;Wn.ApiConsumer=class{constructor(e){this.strategy=e,this.consume=async e=>(await this.strategy.getExposedFunctions(e)).reduce(((t,n)=>({...t,[n.key]:this.strategy.createFunction(n,e)})),{})}};var Hn={},Nn={};Object.defineProperty(Nn,"__esModule",{value:!0}),Nn.expose=Nn.getExposedProperties=void 0;const Dn=Symbol("exposedProperties");Nn.getExposedProperties=e=>e[Dn]||e.prototype[Dn]||[];Nn.expose=e=>(t,n,i)=>{t[Dn]=t[Dn]||[],t[Dn].push({key:n,descriptor:i,options:e})},Object.defineProperty(Hn,"__esModule",{value:!0}),Hn.ApiExposer=void 0;const Un=Nn;Hn.ApiExposer=class{constructor(e){this.strategy=e,this.exposeInstance=async(e,t)=>{const n=(0,Un.getExposedProperties)(e),i=await Promise.all(n.map((async({key:n,options:i})=>({key:n,options:await this.strategy.exposeFunction(e[n].bind(e),{key:n,options:i,meta:t})}))));await this.strategy.exposeMeta(t,i)}}};var Vn={},zn={},Kn={};Object.defineProperty(Kn,"__esModule",{value:!0}),Kn.ChannelsConsumer=void 0;Kn.ChannelsConsumer=class{constructor(e){this.channel=e,this.getExposedFunctions=async e=>{const{id:t}=e,{props:n}=await this.channel.dispatch(`api-meta:${t}`);return n},this.createFunction=e=>(...t)=>{const{action:n}=e.options;return this.channel.dispatch(n,{args:t})}}};var qn={};Object.defineProperty(qn,"__esModule",{value:!0}),qn.ChannelsExposer=void 0;qn.ChannelsExposer=class{constructor(e){this.channelProviderOrClient=e,this.exposeFunction=async(e,t)=>{const{key:n,options:i,meta:r}=t,{id:o}=r,s=`${o}.${i?.action||n}`;return await this.channelProviderOrClient.register(s,(async({args:t})=>e(...t))),{action:s}},this.exposeMeta=async({id:e},t)=>{const n=`api-meta:${e}`;await this.channelProviderOrClient.register(n,(()=>({props:t})))}}},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Kn,e),n(qn,e)}(zn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(zn,e)}(Vn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Wn,e),n(Hn,e),n(Vn,e),n(Nn,e)}(Gn);var Jn={};Object.defineProperty(Jn,"__esModule",{value:!0}),Jn.createRelayedDispatch=exports.relayChannelClientApi_1=Jn.relayChannelClientApi=void 0;const Yn=["no longer connected","RTCDataChannel closed unexpectedly","The client you are trying to dispatch from is disconnected from the target provider"];exports.relayChannelClientApi_1=Jn.relayChannelClientApi=async(e,t)=>{e.register(`relay:${t}`,(({action:t,target:n,payload:i})=>e.dispatch(n,t,i))),await Promise.resolve()};Jn.createRelayedDispatch=(e,t,n,i)=>async(r,o)=>{try{return await e.dispatch(`relay:${n}`,{action:r,payload:o,target:t})}catch(e){if(s=e.message,Yn.some((e=>s.includes(e)))&&i)throw new Error(i);throw e}var s};var Zn,Qn,Xn,ei=s&&s.__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},ti=s&&s.__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)};Object.defineProperty(Bn,"__esModule",{value:!0}),Bn.ColumnOrRow=Bn.TabStack=Bn.LayoutNode=void 0;const ni=Gn,ii=Jn;class ri{constructor(e,t){Zn.set(this,void 0),this.isRoot=()=>ti(this,Zn,"f").isRoot(this.entityId),this.exists=()=>ti(this,Zn,"f").exists(this.entityId),this.getParent=async()=>{const e=await ti(this,Zn,"f").getParent(this.entityId);if(e)return ri.getEntity(e,ti(this,Zn,"f"))},this.createAdjacentStack=async(e,t)=>{const n=await ti(this,Zn,"f").createAdjacentStack(this.entityId,e,t);return ri.getEntity({entityId:n,type:"stack"},ti(this,Zn,"f"))},this.getAdjacentStacks=async e=>(await ti(this,Zn,"f").getAdjacentStacks({targetId:this.entityId,edge:e})).map((e=>ri.getEntity({type:"stack",entityId:e.entityId},ti(this,Zn,"f")))),ei(this,Zn,e,"f"),this.entityId=t}}Bn.LayoutNode=ri,Zn=new WeakMap,ri.newLayoutEntitiesClient=async(e,t,n)=>{const i=(0,ii.createRelayedDispatch)(e,n,"layout-relay","You are trying to interact with a layout component on a window that does not exist or has been destroyed.");return new ni.ApiConsumer(new ni.ChannelsConsumer({dispatch:i})).consume({id:t})},ri.getEntity=(e,t)=>{const{entityId:n,type:i}=e;switch(i){case"column":case"row":return new si(t,n,i);case"stack":return new oi(t,n);default:throw new Error(`Unrecognised Layout Entity encountered ('${JSON.stringify(e)})`)}};class oi extends ri{constructor(e,t){super(e,t),Qn.set(this,void 0),this.type="stack",this.getViews=()=>ti(this,Qn,"f").getStackViews(this.entityId),this.addView=async(e,t={index:0})=>ti(this,Qn,"f").addViewToStack(this.entityId,e,t),this.removeView=async e=>{await ti(this,Qn,"f").removeViewFromStack(this.entityId,e)},this.setActiveView=async e=>{await ti(this,Qn,"f").setStackActiveView(this.entityId,e)},ei(this,Qn,e,"f")}}Bn.TabStack=oi,Qn=new WeakMap;class si extends ri{constructor(e,t,n){super(e,t),Xn.set(this,void 0),this.getContent=async()=>(await ti(this,Xn,"f").getContent(this.entityId)).map((e=>ri.getEntity(e,ti(this,Xn,"f")))),ei(this,Xn,e,"f"),this.type=n}}Bn.ColumnOrRow=si,Xn=new WeakMap;var ai={};Object.defineProperty(ai,"__esModule",{value:!0}),ai.DEFAULT_LAYOUT_KEY=ai.LAYOUT_CONTROLLER_ID=void 0,ai.LAYOUT_CONTROLLER_ID="layout-entities",ai.DEFAULT_LAYOUT_KEY="__default__";var ci,di,hi,li=s&&s.__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)};Object.defineProperty(Ln,"__esModule",{value:!0}),Ln.Layout=void 0;const ui=G,pi=O,wi=d,yi=Tn,fi=Bn,gi=ai;class mi extends wi.Base{static getClient(e){return li(e,di,"f").getValue()}constructor(e,t){super(t),ci.add(this),di.set(this,new ui.Lazy((async()=>fi.LayoutNode.newLayoutEntitiesClient(await this.platform.getClient(),gi.LAYOUT_CONTROLLER_ID,this.identity)))),this.replace=async e=>{this.wire.sendAction("layout-replace").catch((e=>{}));const t=await this.platform.getClient();await t.dispatch("replace-layout",{target:this.identity,opts:{layout:e}})},this.replaceView=async(e,t)=>{this.wire.sendAction("layout-replace-view").catch((e=>{}));const n=await this.platform.getClient();await n.dispatch("replace-view",{target:this.identity,opts:{viewToReplace:e,newView:t}})},this.applyPreset=async e=>{this.wire.sendAction("layout-apply-preset").catch((e=>{}));const t=await this.platform.getClient(),{presetType:n}=e;if(!n||!(0,yi.isValidPresetType)(n))throw new Error("Cannot apply preset layout, please include an applicable presetType property in the PresetLayoutOptions.");await t.dispatch("apply-preset-layout",{target:this.identity,opts:{presetType:n}})};const n=(0,pi.validateIdentity)(e);if(n)throw new Error(n);this.identity=e,this.platform=this.fin.Platform.wrapSync({uuid:e.uuid}),e.uuid===this.fin.me.uuid&&e.name===this.fin.me.name&&(this.init=this.fin.Platform.Layout.init)}async getConfig(){this.wire.sendAction("layout-get-config").catch((e=>{}));return(await this.platform.getClient()).dispatch("get-frame-snapshot",{target:this.identity})}async getCurrentViews(){this.wire.sendAction("layout-get-views").catch((e=>{}));const e=await this.platform.getClient();return(await e.dispatch("get-layout-views",{target:this.identity})).map((e=>this.fin.View.wrapSync(e)))}async getRootItem(){this.wire.sendAction("layout-get-root-item").catch((()=>{}));const e=await li(this,di,"f").getValue(),t=await e.getRoot("layoutName"in this.identity?this.identity:void 0);return fi.LayoutNode.getEntity(t,e)}async getStackByViewIdentity(e){this.wire.sendAction("layout-get-stack-by-view").catch((()=>{}));const t=await li(this,di,"f").getValue(),n=await t.getStackByView(e);if(!n)throw new Error(`No stack found for view: ${e.uuid}/${e.name}`);return fi.LayoutNode.getEntity(n,t)}async addView(e,{location:t,targetView:n}={}){this.wire.sendAction("layout-add-view").catch((e=>{}));const{identity:i}=await li(this,ci,"m",hi).call(this,"layout-add-view",{viewOptions:e,location:t,targetView:n});return{identity:i}}async closeView(e){this.wire.sendAction("layout-close-view").catch((e=>{})),await li(this,ci,"m",hi).call(this,"layout-close-view",{viewIdentity:e})}}Ln.Layout=mi,di=new WeakMap,ci=new WeakSet,hi=async function(e,t){return(await this.platform.getClient()).dispatch(e,{target:this.identity,opts:t})};var vi,Ci,bi,Ii,Ei,xi=s&&s.__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)},Ai=s&&s.__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};Object.defineProperty(kn,"__esModule",{value:!0}),kn.LayoutModule=void 0;const Pi=d,Mi=Ln,_i=ai;class Oi extends Pi.Base{constructor(){super(...arguments),vi.add(this),Ci.set(this,!1),bi.set(this,null),this.init=async(e={})=>{if(this.wire.sendAction("layout-init").catch((e=>{})),!this.wire.environment.layoutAllowedInContext(this.fin))throw new Error("Layout.init can only be called from a Window context.");if(xi(this,Ci,"f"))throw new Error("Layout.init was already called, please use Layout.create to add additional layouts.");"openfin"===this.wire.environment.type&&await this.fin.Platform.getCurrentSync().getClient(),Ai(this,Ci,!0,"f"),Ai(this,bi,await this.wire.environment.initLayoutManager(this.fin,this.wire,e),"f"),await this.wire.environment.applyLayoutSnapshot(this.fin,xi(this,bi,"f"),e);const t={name:this.fin.me.name,uuid:this.fin.me.uuid};if(!e.layoutManagerOverride){const e={layoutName:_i.DEFAULT_LAYOUT_KEY,...t};return xi(this,Ii,"f").call(this,e)}return this.wrapSync(t)},Ii.set(this,(e=>{const t="[Layout] You are using a deprecated property `layoutManager` - it will throw if you access it starting in v37.",n=new Proxy({},{get(e,n){throw console.warn(`[Layout-mgr-proxy] accessing ${n.toString()}`),new Error(t)}}),i=Object.assign(this.wrapSync(e),{layoutManager:n});return new Proxy(i,{get(e,n){if("layoutManager"===n)throw console.warn(`[Layout-proxy] accessing ${n.toString()}`),new Error(t);return e[n]}})})),this.getCurrentLayoutManagerSync=()=>xi(this,vi,"m",Ei).call(this,"fin.Platform.Layout.getCurrentLayoutManagerSync()"),this.create=async e=>this.wire.environment.createLayout(xi(this,vi,"m",Ei).call(this,"fin.Platform.Layout.create()"),e),this.destroy=async e=>this.wire.environment.destroyLayout(xi(this,vi,"m",Ei).call(this,"fin.Platform.Layout.destroy()"),e)}async wrap(e){return this.wire.sendAction("layout-wrap").catch((e=>{})),new Mi.Layout(e,this.wire)}wrapSync(e){return this.wire.sendAction("layout-wrap-sync").catch((e=>{})),new Mi.Layout(e,this.wire)}async getCurrent(){if(this.wire.sendAction("layout-get-current").catch((e=>{})),"openfin"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error("You are not in a Window context. Only Windows can have a Layout.");const{uuid:e,name:t}=this.fin.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction("layout-get-current-sync").catch((e=>{})),"openfin"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error("You are not in a Window context. Only Windows can have a Layout.");const{uuid:e,name:t}=this.fin.me;return this.wrapSync({uuid:e,name:t})}async getLayoutByViewIdentity(e){this.wire.sendAction("layout-get-by-view-identity").catch((()=>{}));let t=await this.wire.environment.getViewWindowIdentity(this.fin,e);t.identity&&(t=t.identity);try{const n=this.wrapSync(t),i=await Mi.Layout.getClient(n),r=await i.getLayoutIdentityForViewOrThrow(e);return this.wrapSync(r)}catch(n){if(!["No action registered at target for","getLayoutIdentityForViewOrThrow is not a function"].some((e=>n.message.includes(e))))throw n;if(t.uuid===t.name)throw new Error(`View identity ${JSON.stringify(e)} is not attached to any layout in provider window ${JSON.stringify(t)}.`);return this.wrapSync(t)}}}kn.LayoutModule=Oi,Ci=new WeakMap,bi=new WeakMap,Ii=new WeakMap,vi=new WeakSet,Ei=function(e){if(!xi(this,bi,"f"))throw new Error(`You must call init before using the API ${e}`);return xi(this,bi,"f")},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(kn,e),n(Ln,e)}(jn),Object.defineProperty(Pn,"__esModule",{value:!0}),Pn.PlatformModule=void 0;const Si=d,Ri=Mn,Fi=jn;class ji extends Si.Base{constructor(e,t){super(e),this._channel=t,this.Layout=new Fi.LayoutModule(this.wire)}async init(e){if(!fin.__internal_.isPlatform||fin.me.name!==fin.me.uuid)throw new Error("fin.Platform.init should only be called from a custom platform provider running in the main window of the application.");return this.wire.environment.initPlatform(this.fin,e)}async wrap(e){return this.wire.sendAction("platform-wrap").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}wrapSync(e){return this.wire.sendAction("platform-wrap-sync").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}async getCurrent(){return this.wire.sendAction("platform-get-current").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction("platform-get-current-sync").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}start(e){return this.wire.sendAction("platform-start").catch((e=>{})),new Promise((async(t,n)=>{try{const{uuid:n}=e,i=await this.fin.Application._create({...e,isPlatformController:!0});i.once("platform-api-ready",(()=>t(this.wrapSync({uuid:n})))),i._run({uuid:n})}catch(e){n(e)}}))}startFromManifest(e,t){return this.wire.sendAction("platform-start-from-manifest").catch((e=>{})),new Promise((async(n,i)=>{try{const i=await this.fin.Application._createFromManifest(e);i.once("platform-api-ready",(()=>n(this.wrapSync({uuid:i.identity.uuid})))),i._run(t)}catch(e){i(e)}}))}}Pn.PlatformModule=ji,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Pn,e),n(Mn,e)}(An);var ki={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getMe=e.getBaseMe=e.environmentUnsupportedMessage=void 0;const t=J(),n=un,i=ie(),r=rn;function o(e,t,n){return{...{isView:"view"===e,isWindow:"window"===e,isFrame:"iframe"===e,isExternal:"external connection"===e},uuid:t,name:n,entityType:e}}e.environmentUnsupportedMessage="You are not running in OpenFin.",e.getBaseMe=o,e.getMe=function(s){const{uuid:a,name:c,entityType:d}=s.me,h={setContext(){throw new Error(e.environmentUnsupportedMessage)},addContextHandler(){throw new Error(e.environmentUnsupportedMessage)},getContextGroups(){throw new Error(e.environmentUnsupportedMessage)},joinContextGroup(){throw new Error(e.environmentUnsupportedMessage)},removeFromContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getAllClientsInContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getInfoForContextGroup(){throw new Error(e.environmentUnsupportedMessage)}},l="Interop API has not been instantiated. Either connection has failed or you have not declared interop in your config.",u={setContext(){throw new Error(l)},addContextHandler(){throw new Error(l)},getContextGroups(){throw new Error(l)},joinContextGroup(){throw new Error(l)},removeFromContextGroup(){throw new Error(l)},getAllClientsInContextGroup(){throw new Error(l)},getInfoForContextGroup(){throw new Error(l)}},p={eventNames:()=>{throw new Error(e.environmentUnsupportedMessage)},emit:()=>{throw new Error(e.environmentUnsupportedMessage)},listeners:()=>{throw new Error(e.environmentUnsupportedMessage)},listenerCount:()=>{throw new Error(e.environmentUnsupportedMessage)},on:()=>{throw new Error(e.environmentUnsupportedMessage)},addListener:()=>{throw new Error(e.environmentUnsupportedMessage)},once:()=>{throw new Error(e.environmentUnsupportedMessage)},prependListener:()=>{throw new Error(e.environmentUnsupportedMessage)},prependOnceListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeAllListeners:()=>{throw new Error(e.environmentUnsupportedMessage)}};switch(d){case"view":return Object.assign(new t.View(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case"window":return Object.assign(new i._Window(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case"iframe":return Object.assign(new n._Frame(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case"external connection":return Object.assign(new r.ExternalApplication(s,{uuid:a}),o(d,a,c),{interop:u,isOpenFin:!1});default:return{...o(d,a,c),...p,interop:h,isOpenFin:!1}}}}(ki);var Li={},Ti={},$i={};Object.defineProperty($i,"__esModule",{value:!0}),$i.createWarningObject=$i.createUnusableObject=void 0,$i.createUnusableObject=function(e){const t=()=>{throw new Error(e)};return new Proxy({},{apply:t,construct:t,defineProperty:t,deleteProperty:t,get:t,getOwnPropertyDescriptor:t,getPrototypeOf:t,has:t,isExtensible:t,ownKeys:t,preventExtensions:t,set:t,setPrototypeOf:t})},$i.createWarningObject=function(e,t){return new Proxy(t,{get:(...t)=>(console.warn(e),Reflect.get(...t)),set:(...t)=>(console.warn(e),Reflect.set(...t)),getOwnPropertyDescriptor:(...t)=>(console.warn(e),Reflect.getOwnPropertyDescriptor(...t)),ownKeys:(...t)=>(console.warn(e),Reflect.ownKeys(...t))})};var Bi,Gi={},Wi={};var Hi={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.wrapIntentHandler=e.BROKER_ERRORS=e.generateOverrideWarning=e.generateOverrideError=e.wrapContextHandler=e.wrapInTryCatch=e.generateId=void 0;e.generateId=()=>`${Math.random()}${Date.now()}`;e.wrapInTryCatch=(e,t)=>(...n)=>{try{return e(...n)}catch(e){throw new Error((t||"")+e)}};e.wrapContextHandler=(e,t)=>async n=>{try{await e(n)}catch(e){throw console.error(`Error thrown by handler ${t} for context type ${n.type}: ${e}`),e}};e.generateOverrideError=(e,t)=>`You have tried to to use ${e} but ${t} has not been overridden in the Interop Broker. Please override this function. Refer to our documentation for more info.`;e.generateOverrideWarning=(e,t,n,i)=>{const{uuid:r,name:o}=n;return i?`Entity with identity: ${r}/${o} has called ${i} or ${e} but ${t} has not been overridden.`:`Entity with identity: ${r}/${o} has called ${e} but ${t} has not been overridden.`},e.BROKER_ERRORS={fireIntent:(0,e.generateOverrideError)("fireIntent","handleFiredIntent"),fireIntentForContext:(0,e.generateOverrideError)("fireIntentForContext","handleFiredIntentForContext"),getInfoForIntent:(0,e.generateOverrideError)("getInfoForIntent","handleInfoForIntent"),getInfoForIntentsByContext:(0,e.generateOverrideError)("getInfoForIntentsByContext","handleInfoForIntentsByContext"),joinSessionContextGroupWithJoinContextGroup:"The Context Group you have tried to join is a Session Context Group. Custom Context Groups can only be defined by the Interop Broker through code or manifest configuration. Please use joinSessionContextGroup.",fdc3Open:(0,e.generateOverrideError)("fdc3.open","fdc3HandleOpen"),fdc3FindInstances:(0,e.generateOverrideError)("fdc3.findInstances","fdc3HandleFindInstances"),fdc3GetAppMetadata:(0,e.generateOverrideError)("fdc3.getAppMetadata","fdc3HandleGetAppMetadata"),fdc3GetInfo:(0,e.generateOverrideError)("fdc3.getInfo","fdc3HandleGetInfo")};e.wrapIntentHandler=(e,t)=>async n=>{try{return e(n)}catch(e){throw console.error(`Error thrown by handler ${t}: ${e}`),e}}}(Hi);var Ni,Di,Ui={};function Vi(){if(Di)return Gi;Di=1;var e,t,n,r=s&&s.__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},o=s&&s.__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)},a=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Gi,"__esModule",{value:!0}),Gi.InteropBroker=void 0;const c=d,h=a(function(){if(Bi)return Wi;Bi=1,Object.defineProperty(Wi,"__esModule",{value:!0});const e=Cr();return Wi.default=class{constructor(e,t){this.provider=e,this.id=t,this.lastContext=void 0,this.contextGroupMap=new Map,this.clients=new Map,this.registerListeners()}registerListeners(){this.provider.register(`sessionContextGroup:getContext-${this.id}`,this.getCurrentContext.bind(this)),this.provider.register(`sessionContextGroup:setContext-${this.id}`,this.setContext.bind(this)),this.provider.register(`sessionContextGroup:handlerAdded-${this.id}`,this.handlerAdded.bind(this)),this.provider.register(`sessionContextGroup:handlerRemoved-${this.id}`,this.handlerRemoved.bind(this))}getCurrentContext(e){return e.type?this.contextGroupMap.get(e.type):this.lastContext}setContext(t,n){const{context:i}=t,r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name} not in Session Client State Map`);this.contextGroupMap.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{e.contextHandlers.get(i.type)?.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getClientState(e){return this.clients.get(e.endpointId)}async handlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(i){const e=r.contextHandlers.get(i)||[];r.contextHandlers.set(i,[...e,n]);const o=this.contextGroupMap.get(i);o&&await this.provider.dispatch(t,n,o)}else{r.globalHandler=n;const e=[...this.contextGroupMap.keys()].map((async e=>{const i=this.contextGroupMap.get(e);i&&await this.provider.dispatch(t,n,i)}));await Promise.all(e)}}handlerRemoved(e,t){const{handlerId:n}=e,i=this.clients.get(t.endpointId);i?(Array.from(i.contextHandlers).forEach((([,e])=>{const t=e.indexOf(n);t>-1&&e.splice(t,1)})),i.globalHandler===n&&(i.globalHandler=void 0)):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={contextHandlers:new Map,clientIdentity:e,globalHandler:void 0};this.clients.set(e.endpointId,t)}}onDisconnection(e){this.clients.delete(e.endpointId)}},Wi}()),l=Hi,u=a(i),p=function(){if(Ni)return Ui;Ni=1,Object.defineProperty(Ui,"__esModule",{value:!0}),Ui.PrivateChannelProvider=void 0;const e=Vi();return Ui.PrivateChannelProvider=class t{constructor(e,t){this.provider=e,this.id=t,this.clients=new Map,this.registerListeners(),this.contextByContextType=new Map,this.lastContext=void 0,this.provider.onConnection((e=>this.registerNewClient(e))),this.provider.onDisconnection((async e=>{const{endpointId:t}=e;this.clients.has(t)&&await this.handleClientDisconnecting(e),0===(await this.provider.getAllClientInfo()).length&&this.provider.destroy()}))}getClientState(e){return this.clients.get(e.endpointId)}registerListeners(){this.provider.register("broadcast",this.broadcast.bind(this)),this.provider.register("getCurrentContext",this.getCurrentContext.bind(this)),this.provider.register("contextHandlerAdded",this.contextHandlerAdded.bind(this)),this.provider.register("contextHandlerRemoved",this.contextHandlerRemoved.bind(this)),this.provider.register("nonStandardHandlerRemoved",this.nonStandardHandlerRemoved.bind(this)),this.provider.register("onAddContextHandlerAdded",this.onAddContextHandlerAdded.bind(this)),this.provider.register("onDisconnectHandlerAdded",this.onDisconnectHandlerAdded.bind(this)),this.provider.register("onUnsubscribeHandlerAdded",this.onUnsubscribeHandlerAdded.bind(this)),this.provider.register("clientDisconnecting",((e,t)=>{this.handleClientDisconnecting(t)}))}broadcast(t,n){const{context:i}=t;if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name}, tried to call broadcast, is not connected to this Private Channel`);const r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to broadcast - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);this.contextByContextType.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{const t=e.handlerIdsByContextTypes.get(i.type);t&&t.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getCurrentContext(e,t){const{contextType:n}=e;if(!this.getClientState(t))throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call getCurrentContext, is not connected to this Private Channel`);if(void 0!==n){return this.contextByContextType.get(n)||null}return this.lastContext?this.lastContext:null}contextHandlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call addContextListener, is not connected to this Private Channel`);if(i){const e=r.handlerIdsByContextTypes.get(i)||[];r.handlerIdsByContextTypes.set(i,[...e,n])}else r.globalHandler=n;Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&e.onAddContextListenerHandlerId&&this.provider.dispatch(e.clientIdentity,e.onAddContextListenerHandlerId,i)}))}async contextHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);if(i){let e;if(i.globalHandler===n)i.globalHandler=void 0;else for(const[t,r]of i.handlerIdsByContextTypes){const i=r.indexOf(n);i>-1&&(r.splice(i,1),e=t)}const r=(await this.getConnectedClients()).map((async n=>{const{clientIdentity:i,clientIdentity:{endpointId:r},onUnsubscribeHandlerId:o}=n;r!==t.endpointId&&o&&await this.provider.dispatch(i,o,e)}));try{await Promise.all(r)}catch(e){throw console.error(`Problem when attempting to dispatch to onUnsubscribeHandlers. Error: ${e} Removing Client: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}`),new Error(e)}}else console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}.`)}nonStandardHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);i?i.onDisconnectHandlerId===n?i.onDisconnectHandlerId=void 0:i.onAddContextListenerHandlerId===n?i.onAddContextListenerHandlerId=void 0:i.onUnsubscribeHandlerId===n&&(i.onUnsubscribeHandlerId=void 0):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}onAddContextHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onAddContextListener, is not connected to this Private Channel`);n.onAddContextListenerHandlerId=i,Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&Array.from(e.handlerIdsByContextTypes.keys()).forEach((e=>{this.provider.dispatch(t,i,e)}))}))}onDisconnectHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onDisconnect, is not connected to this Private Channel`);n.onDisconnectHandlerId=i}onUnsubscribeHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onUnsubscribe, is not connected to this Private Channel`);n.onUnsubscribeHandlerId=i}removeClient(e){const t=this.getClientState(e);if(!t)throw new Error(`Client with Identity: ${e.uuid} ${e.name}, tried to call disconnect, is not connected to this Private Channel`);t.handlerIdsByContextTypes.clear(),this.clients.delete(e.endpointId)}async fireOnDisconnectForOtherClients(e){const{endpointId:t}=e,n=(await this.getConnectedClients()).map((async e=>{const{clientIdentity:{endpointId:n},onDisconnectHandlerId:i}=e;n!==t&&i&&await this.provider.dispatch(e.clientIdentity,i)}));try{await Promise.all(n)}catch(t){throw console.error(`Problem when attempting to dispatch to onDisconnectHandlers. Error: ${t} Disconnecting Client: uuid: ${e.uuid}. name: ${e.name}. endpointId: ${e.endpointId}`),new Error(t)}}async unsubscribeAll(e){const{endpointId:t}=e,n=this.clients.get(t);if(n){const t=Array.from(n.handlerIdsByContextTypes.values()).flat(),i=n.globalHandler;if(t.length>0){const n=t.map((async t=>this.contextHandlerRemoved({handlerId:t},e)));try{await Promise.all(n)}catch(e){console.error(e.message)}}if(i)try{await this.contextHandlerRemoved({handlerId:i},e)}catch(e){console.error(e.message)}}}async handleClientDisconnecting(e){await this.unsubscribeAll(e),this.removeClient(e),await this.fireOnDisconnectForOtherClients(e)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={clientIdentity:e,handlerIdsByContextTypes:new Map,globalHandler:void 0,onAddContextListenerHandlerId:void 0,onUnsubscribeHandlerId:void 0,onDisconnectHandlerId:void 0};this.clients.set(e.endpointId,t)}}async getConnectedClients(){const e=await this.provider.getAllClientInfo();return Array.from(this.clients.values()).filter((t=>{const{uuid:n,name:i}=t.clientIdentity;return e.some((e=>i===e.name&&n===e.uuid))}))}static init(e,n){return new t(e,n)}},Ui}(),w=G,y=[{id:"green",displayMetadata:{color:"#00CC88",name:"green"}},{id:"purple",displayMetadata:{color:"#8C61FF",name:"purple"}},{id:"orange",displayMetadata:{color:"#FF8C4C",name:"orange"}},{id:"red",displayMetadata:{color:"#FF5E60",name:"red"}},{id:"pink",displayMetadata:{color:"#FF8FB8",name:"pink"}},{id:"yellow",displayMetadata:{color:"#E9FF8F",name:"yellow"}}];let f=class i extends c.Base{constructor(i,s,a){super(i),e.set(this,void 0),t.set(this,void 0),n.set(this,void 0),this.getProvider=()=>o(this,n,"f").getValue(),this.interopClients=new Map,this.contextGroupsById=new Map,r(this,t,a.contextGroups??[...y],"f"),r(this,e,a.fdc3Info,"f"),a?.logging&&(this.logging=a.logging),this.intentClientMap=new Map,this.lastContextMap=new Map,this.sessionContextGroupMap=new Map,r(this,n,new w.Lazy(s),"f"),this.setContextGroupMap(),this.setupChannelProvider()}static createClosedConstructor(...e){return class extends i{constructor(...t){if(t.length){const[n,i,r]=t;if(r&&"object"==typeof r&&!(0,u.default)(r,e[2]))return console.warn("You have modified the parameters of the InteropOverride constructor. This behavior is deprecated and will be removed in a future version. You can modify these options in your manifest. Please consult our Interop docs for guidance on migrating to the new override scheme."),void super(e[0],e[1],r);console.warn("You are attempting to pass arguments to the InteropOverride constructor. This is not necessary, and these passed arguments will be ignored. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.")}super(...e)}}}setContext({context:e},t){this.wire.sendAction("interop-broker-set-context").catch((e=>{}));const n=this.getClientState(t);if(!n||!n.contextGroupId)throw n?new Error("You must join a context group before you can set context."):new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);{const{contextGroupId:t}=n;this.setContextForGroup({context:e},t)}}setContextForGroup({context:e},t){this.wire.sendAction("interop-broker-set-context-for-group").catch((e=>{}));const n=this.contextGroupsById.get(t);if(!n)throw new Error(`Unable to set context for context group that isn't in the context group mapping: ${t}.`);const r=i.checkContextIntegrity(e);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(e)}`);const o=e.type;n.set(o,e),this.lastContextMap.set(t,o);Array.from(this.interopClients.values()).filter((e=>e.contextGroupId===t)).forEach((t=>{for(const[,n]of t.contextHandlers)i.isContextTypeCompatible(o,n.contextType)&&this.invokeContextHandler(t.clientIdentity,n.handlerId,e)}))}getCurrentContext(e,t){this.wire.sendAction("interop-broker-get-current-context").catch((e=>{}));const n=this.getClientState(t);if(!n?.contextGroupId)throw new Error("You must be a member of a context group to call getCurrentContext");const{contextGroupId:i}=n,r=this.contextGroupsById.get(i),o=this.lastContextMap.get(i),s=e?.contextType??o;return r&&s?r.get(s):void 0}async joinContextGroup({contextGroupId:e,target:t},n){if(this.wire.sendAction("interop-broker-join-context-group").catch((e=>{})),this.sessionContextGroupMap.has(e))throw new Error(l.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup);if(t){i.hasEndpointId(t)&&await this.addClientToContextGroup({contextGroupId:e},t);try{const n=this.channel.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name));if(!n.length)throw new Error(`Given Identity ${t.uuid} ${t.name} is not connected to the Interop Broker.`);n.length>1&&console.warn(`More than one connection found for identity ${t.uuid} ${t.name}`);const i=[];for(const t of n)i.push(this.addClientToContextGroup({contextGroupId:e},t));await Promise.all(i)}catch(e){throw new Error(e)}}else await this.addClientToContextGroup({contextGroupId:e},n)}async addClientToContextGroup({contextGroupId:e},t){this.wire.sendAction("interop-broker-add-client-to-context-group").catch((e=>{}));const n=this.getClientState(t);if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(!this.getContextGroups().find((t=>t.id===e)))throw new Error(`Attempting to join a context group that does not exist: ${e}. You may only join existing context groups.`);if(n.contextGroupId!==e){n.contextGroupId=e,await this.setCurrentContextGroupInClientOptions(t,e);const i=this.contextGroupsById.get(e);for(const[,e]of n.contextHandlers){const{contextType:n,handlerId:r}=e;if(void 0===n)i.forEach(((e,n)=>{this.invokeContextHandler(t,r,e)}));else if(i.has(n)){const e=i.get(n);e&&this.invokeContextHandler(t,r,e)}}}}async removeFromContextGroup({target:e},t){if(this.wire.sendAction("interop-broker-remove-from-context-group").catch((e=>{})),e){i.hasEndpointId(e)&&await this.removeClientFromContextGroup(e);try{const t=this.channel.connections.filter((t=>t.uuid===e.uuid&&t.name===e.name));if(!t.length)throw new Error(`No connection found for given Identity ${e.uuid} ${e.name}`);t.length>1&&console.warn(`More than one connection found for identity ${e.uuid} ${e.name}`);const n=[];for(const e of t)n.push(this.removeClientFromContextGroup(e));await Promise.all(n)}catch(e){throw new Error(e)}}else await this.removeClientFromContextGroup(t)}async removeClientFromContextGroup(e){this.wire.sendAction("interop-broker-remove-client-from-context-group").catch((e=>{}));const t=this.getClientState(e);t&&(t.contextGroupId=void 0),await this.setCurrentContextGroupInClientOptions(e,null)}getContextGroups(){return this.wire.sendAction("interop-broker-get-context-groups").catch((e=>{})),o(this,t,"f").map((e=>({...e})))}getInfoForContextGroup({contextGroupId:e}){return this.wire.sendAction("interop-broker-get-info-for-context-group").catch((e=>{})),this.getContextGroups().find((t=>t.id===e))}getAllClientsInContextGroup({contextGroupId:e}){this.wire.sendAction("interop-broker-get-all-clients-in-context-group").catch((e=>{}));return Array.from(this.interopClients.values()).filter((t=>t.contextGroupId===e)).map((e=>e.clientIdentity))}async handleFiredIntent(e,t){const n=(0,l.generateOverrideWarning)("fdc3.raiseIntent","InteropBroker.handleFiredIntent",t,"interopClient.fireIntent");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntent)}async setIntentTarget(e,t){this.wire.sendAction("interop-broker-set-intent-target").catch((e=>{}));const n=this.intentClientMap.get(t.name),i=`intent-handler-${e.name}`;if(n){const t=n.get(i);if(t){if(t.pendingIntents.push(e),t.clientIdentity&&t.isReady){const{clientIdentity:e,pendingIntents:n}=t;try{const r=n[n.length-1];await this.invokeIntentHandler(e,i,r),t.pendingIntents=[]}catch(n){console.error(`Error invoking intent handler for client ${e.uuid}/${e.name}/${e.endpointId}`),t.isReady=!1}}}else n.set(i,{isReady:!1,pendingIntents:[e]})}else{this.intentClientMap.set(t.name,new Map);const n=this.intentClientMap.get(t.name);n&&n.set(i,{isReady:!1,pendingIntents:[e]})}}async handleInfoForIntent(e,t){const n=(0,l.generateOverrideWarning)("fdc3.findIntent","InteropBroker.handleInfoForIntent",t,"interopClient.getInfoForIntent");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntent)}async handleInfoForIntentsByContext(e,t){const n=(0,l.generateOverrideWarning)("fdc3.findIntentsByContext","InteropBroker.handleInfoForIntentsByContext",t,"interopClient.getInfoForIntentsByContext");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntentsByContext)}async handleFiredIntentForContext(e,t){const n=(0,l.generateOverrideWarning)("fdc3.raiseIntentForContext","InteropBroker.handleFiredIntentForContext",t,"interopClient.fireIntentForContext");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntentForContext)}async clientDisconnected(e){}async fdc3HandleOpen({app:e,context:t},n){const i=(0,l.generateOverrideWarning)("fdc3.open","InteropBroker.fdc3HandleOpen",n);throw console.warn(i),new Error(l.BROKER_ERRORS.fdc3Open)}async fdc3HandleFindInstances(e,t){const n=(0,l.generateOverrideWarning)("fdc3.open","InteropBroker.fdc3HandleFindInstances",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3FindInstances)}async fdc3HandleGetAppMetadata(e,t){const n=(0,l.generateOverrideWarning)("fdc3.getAppMetadata","InteropBroker.fdc3HandleGetAppMetadata",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3GetAppMetadata)}async invokeContextHandler(e,t,n){const i=await this.getProvider();try{await i.dispatch(e,t,n)}catch(i){console.error(`Error invoking context handler ${t} for context type ${n.type} in client ${e.uuid}/${e.name}/${e.endpointId}`,i)}}async invokeIntentHandler(e,t,n){const i=await this.getProvider();await i.dispatch(e,t,n)}async fdc3HandleGetInfo(t,n){const{fdc3Version:i}=t;return{fdc3Version:i,...o(this,e,"f"),optionalFeatures:{OriginatingAppMetadata:!1,UserChannelMembershipAPIs:!0},appMetadata:{appId:"",instanceId:""}}}async getAllClientInfo(){return(await this.getProvider()).getAllClientInfo()}decorateSnapshot(e){return{...e,interopSnapshotDetails:{contextGroupStates:this.getContextGroupStates()}}}applySnapshot(e,t){const n=e?.interopSnapshotDetails?.contextGroupStates;n&&(t?.closeExistingWindows||this.updateExistingClients(n),this.rehydrateContextGroupStates(n))}updateExistingClients(e){this.interopClients.forEach((t=>{const{clientIdentity:n,contextGroupId:r,contextHandlers:o}=t;if(r){const t=e[r];for(const[,e]of Object.entries(t))o.forEach((t=>{const{handlerId:r,contextType:o}=t;i.isContextTypeCompatible(e.type,o)&&this.invokeContextHandler(n,r,e)}))}}))}getContextGroupStates(){return i.toObject(this.contextGroupsById)}rehydrateContextGroupStates(e){const t=Object.entries(e);for(const[e,n]of t){const t=Object.entries(n);for(const[n,i]of t)if(this.contextGroupsById.has(e)){this.contextGroupsById.get(e).set(n,i)}else console.warn(`Attempting to set a context group that isn't in the context group mapping. Skipping context group rehydration for: ${e}`)}}contextHandlerRegistered({contextType:e,handlerId:t},n){const i={contextType:e,handlerId:t},r=this.getClientState(n);if(r?.contextHandlers.set(t,i),r&&r.contextGroupId){const{contextGroupId:i}=r,o=this.contextGroupsById.get(i);if(void 0===e)o.forEach(((e,i)=>{this.invokeContextHandler(n,t,e)}));else if(o.has(e)){const i=o.get(e);i&&this.invokeContextHandler(n,t,i)}}}async intentHandlerRegistered(e,t){const{handlerId:n}=e,i=this.intentClientMap.get(t.name),r=i?.get(n);if(i)if(r){const{pendingIntents:e}=r;r.clientIdentity=t,r.isReady=!0;try{if(e.length>0){const i=e[e.length-1];await this.invokeIntentHandler(t,n,i),r.pendingIntents=[]}}catch(e){console.error(`Error invoking intent handler: ${n} for client ${t.uuid}/${t.name}/${t.endpointId}`)}}else i.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t});else{this.intentClientMap.set(t.name,new Map);const e=this.intentClientMap.get(t.name);e&&e.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t})}}removeContextHandler({handlerId:e},t){const n=this.getClientState(t);n&&n.contextHandlers.delete(e)}handleJoinSessionContextGroup({sessionContextGroupId:e},t){try{if(!e)throw new Error("Failed to join session context group: must specify group id.");const n=this.sessionContextGroupMap.get(e);if(n)n.registerNewClient(t);else{const n=new h.default(this.channel,e);n.registerNewClient(t),this.sessionContextGroupMap.set(e,n)}return{hasConflict:this.contextGroupsById.has(e)}}catch(e){throw new Error(e)}}getClientState(e){return this.interopClients.get(e.endpointId)}static toObject(e){const t=Object.fromEntries(e),n={};return Object.entries(t).forEach((([e,t])=>{const i=Object.fromEntries(t);n[e]=i})),n}static checkContextIntegrity(e){if(!e)return{isValid:!1,reason:"No context supplied"};if("object"!=typeof e)return{isValid:!1,reason:"Context must be an Object"};if(!e.type)return{isValid:!1,reason:"Context must have a type property"};if(e.id&&"object"!=typeof e.id)return{isValid:!1,reason:"Context id must be an Object populated with key-value identifiers (if set)"};if(e.id){const{id:t}=e,n=Object.keys(t);let i=!1;if(!n.length)return{isValid:!1,reason:"Context id must have at least one key-value identifier"};if(n.forEach((e=>{"string"==typeof e&&"string"==typeof t[e]||(i=!0)})),i)return{isValid:!1,reason:"Context id key-value identifiers must be of type string"}}return e.name&&"string"!=typeof e.name?{isValid:!1,reason:"Context name must be of string type (if set)"}:{isValid:!0}}static hasEndpointId(e){return void 0!==e.endpointId}static isContextTypeCompatible(e,t){return void 0===t||e===t}setContextGroupMap(){for(const e of this.getContextGroups())this.contextGroupsById.set(e.id,new Map)}async setCurrentContextGroupInClientOptions(e,t){try{const n=await this.fin.System.getEntityInfo(e.uuid,e.name);let i;"view"===n.entityType?i=await this.fin.View.wrap(e):"window"===n.entityType&&(i=await this.fin.Window.wrap(e)),i&&await i.updateOptions({interop:{currentContextGroup:t}})}catch(e){}}async setupChannelProvider(){try{const e=await this.getProvider();this.channel=e,this.wireChannel(e)}catch(e){throw new Error(`Error setting up Interop Broker Channel Provider: ${e}`)}}wireChannel(e){e.onConnection((async(e,t)=>{if(!await this.isConnectionAuthorized(e,t))throw new Error(`Connection not authorized for ${e.uuid}, ${e.name}`);if(!e.endpointId)throw new Error("Version too old to be compatible with Interop. Please upgrade your runtime to a more recent version.");const n={contextGroupId:void 0,contextHandlers:new Map,clientIdentity:e};t?.currentContextGroup&&this.contextGroupsById.has(t.currentContextGroup)&&(n.contextGroupId=t?.currentContextGroup),this.interopClients.set(e.endpointId,n)})),e.onDisconnection((e=>{this.interopClients.delete(e.endpointId);const t=this.intentClientMap.get(e.name);t&&e.uuid===this.fin.me.uuid&&t.forEach((e=>{e.isReady=!1})),this.sessionContextGroupMap.forEach((t=>{t.onDisconnection(e)})),this.clientDisconnected(e)})),e.beforeAction((async(e,t,n)=>{if(!await this.isActionAuthorized(e,t,n))throw new Error(`Action (${e}) not authorized for ${n.uuid}, ${n.name}`);this.logging?.beforeAction?.enabled&&console.log(e,t,n)})),e.afterAction(((e,t,n)=>{this.logging?.afterAction?.enabled&&console.log(e,t,n)})),e.register("setContext",this.setContext.bind(this)),e.register("fireIntent",this.handleFiredIntent.bind(this)),e.register("getCurrentContext",this.getCurrentContext.bind(this)),e.register("getInfoForIntent",this.handleInfoForIntent.bind(this)),e.register("getInfoForIntentsByContext",this.handleInfoForIntentsByContext.bind(this)),e.register("fireIntentForContext",this.handleFiredIntentForContext.bind(this)),e.register("getContextGroups",this.getContextGroups.bind(this)),e.register("joinContextGroup",this.joinContextGroup.bind(this)),e.register("removeFromContextGroup",this.removeFromContextGroup.bind(this)),e.register("getAllClientsInContextGroup",this.getAllClientsInContextGroup.bind(this)),e.register("getInfoForContextGroup",this.getInfoForContextGroup.bind(this)),e.register("contextHandlerRegistered",this.contextHandlerRegistered.bind(this)),e.register("intentHandlerRegistered",this.intentHandlerRegistered.bind(this)),e.register("removeContextHandler",this.removeContextHandler.bind(this)),e.register("sessionContextGroup:createIfNeeded",this.handleJoinSessionContextGroup.bind(this)),e.register("fdc3Open",this.fdc3HandleOpen.bind(this)),e.register("fdc3v2FindIntentsByContext",this.handleInfoForIntentsByContext.bind(this)),e.register("fdc3FindInstances",this.fdc3HandleFindInstances.bind(this)),e.register("fdc3GetAppMetadata",this.fdc3HandleGetAppMetadata.bind(this)),e.register("fdc3v2GetInfo",(async(e,t)=>this.fdc3HandleGetInfo.bind(this)(e,t))),e.register("createPrivateChannelProvider",(async e=>{const{channelId:t}=e,n=await this.fin.InterApplicationBus.Channel.create(t);p.PrivateChannelProvider.init(n,t)}))}isConnectionAuthorized(e,t){return this.wire.sendAction("interop-broker-is-connection-authorized").catch((e=>{})),Promise.resolve(!0)}isActionAuthorized(e,t,n){return this.wire.sendAction("interop-broker-is-action-authorized").catch((e=>{})),Promise.resolve(!0)}};return Gi.InteropBroker=f,e=new WeakMap,t=new WeakMap,n=new WeakMap,Gi}var zi,Ki={},qi={},Ji=s&&s.__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},Yi=s&&s.__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)};Object.defineProperty(qi,"__esModule",{value:!0});const Zi=d,Qi=Hi;class Xi extends Zi.Base{constructor(e,t,n){super(e),zi.set(this,void 0),this.id=n,Ji(this,zi,t,"f")}async setContext(e){this.wire.sendAction("interop-session-context-group-set-context").catch((e=>{}));return(await Yi(this,zi,"f")).dispatch(`sessionContextGroup:setContext-${this.id}`,{sessionContextGroupId:this.id,context:e})}async getCurrentContext(e){this.wire.sendAction("interop-session-context-group-get-context").catch((e=>{}));return(await Yi(this,zi,"f")).dispatch(`sessionContextGroup:getContext-${this.id}`,{sessionContextGroupId:this.id,type:e})}async addContextHandler(e,t){if(this.wire.sendAction("interop-session-context-group-add-handler").catch((e=>{})),"function"!=typeof e)throw new Error("Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");const n=await Yi(this,zi,"f");let i;return i=t?`sessionContextHandler:invoke-${this.id}-${t}-${(0,Qi.generateId)()}`:`sessionContextHandler:invoke-${this.id}`,n.register(i,(0,Qi.wrapContextHandler)(e,i)),await n.dispatch(`sessionContextGroup:handlerAdded-${this.id}`,{handlerId:i,contextType:t}),{unsubscribe:await this.createUnsubscribeCb(i)}}async createUnsubscribeCb(e){const t=await Yi(this,zi,"f");return async()=>{t.remove(e),await t.dispatch(`sessionContextGroup:handlerRemoved-${this.id}`,{handlerId:e})}}getUserInstance(){return{id:this.id,setContext:(0,Qi.wrapInTryCatch)(this.setContext.bind(this),"Failed to set context: "),getCurrentContext:(0,Qi.wrapInTryCatch)(this.getCurrentContext.bind(this),"Failed to get context: "),addContextHandler:(0,Qi.wrapInTryCatch)(this.addContextHandler.bind(this),"Failed to add context handler: ")}}}qi.default=Xi,zi=new WeakMap;var er={},tr={},nr={},ir={},rr=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),or=s&&s.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),sr=s&&s.__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)&&rr(t,e,n);return or(t,e),t};Object.defineProperty(ir,"__esModule",{value:!0}),ir.PrivateChannelClient=void 0;const ar=sr(Hi);var cr,dr;function hr(){if(cr)return tr;cr=1;var e,t=s&&s.__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)},n=s&&s.__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},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(tr,"__esModule",{value:!0}),tr.FDC3ModuleBase=void 0;const o=nr,a=Hi,c=wr(),d=r(i);return tr.FDC3ModuleBase=class{get client(){return t(this,e,"f").call(this)}get fin(){return this.wire.getFin()}constructor(t,i){this.wire=i,e.set(this,void 0),n(this,e,t,"f")}async broadcast(e){return this.wire.sendAction("fdc3-broadcast").catch((e=>{})),this.client.setContext(e)}async _open(e,t){this.wire.sendAction("fdc3-open").catch((e=>{}));try{return await c.InteropClient.ferryFdc3Call(this.client,"fdc3Open",{app:e,context:t})}catch(e){const t=e.message===a.BROKER_ERRORS.fdc3Open?"ResolverUnavailable":e.message;throw new Error(t)}}async _getChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:"system",...(0,o.getUnsupportedChannelApis)()})))}async getOrCreateChannel(e){this.wire.sendAction("fdc3-get-or-create-channel").catch((e=>{}));const t=(await this._getChannels()).find((t=>t.id===e));if(t)return{...t,type:"system",...(0,o.getUnsupportedChannelApis)()};try{const t=await this.client.joinSessionContextGroup(e);return(0,o.buildAppChannelObject)(t)}catch(e){throw console.error(e.message),new Error(o.ChannelError.CreationFailed)}}async getSystemChannels(){return this.wire.sendAction("fdc3-get-system-channels").catch((e=>{})),this._getChannels()}async joinChannel(e){this.wire.sendAction("fdc3-join-channel").catch((e=>{}));try{return await this.client.joinContextGroup(e)}catch(e){if(e.message===a.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup?console.error("The Channel you have tried to join is an App Channel. Custom Channels can only be defined by the Interop Broker through code or manifest configuration. Please use getOrCreateChannel."):console.error(e.message),e.message.startsWith("Attempting to join a context group that does not exist"))throw new Error(o.ChannelError.NoChannelFound);throw new Error(o.ChannelError.AccessDenied)}}async getCurrentChannel(){this.wire.sendAction("fdc3-get-current-channel").catch((e=>{}));const e=await this.getCurrentContextGroupInfo();return e?this.buildChannelObject(e):null}async leaveCurrentChannel(){return this.wire.sendAction("fdc3-leave-current-channel").catch((e=>{})),this.client.removeFromContextGroup()}async getCurrentContextGroupInfo(){const e=await this.client.getContextGroups(),t=e.map((async e=>this.client.getAllClientsInContextGroup(e.id))),n=(await Promise.all(t)).findIndex((e=>e.some((e=>{const{uuid:t,name:n}=e;return this.wire.me.uuid===t&&this.wire.me.name===n}))));return e[n]}async buildChannelObject(e){return{...e,type:"system",addContextListener:(...[e,t])=>{let n,i;"function"==typeof e?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),n=e):(n=t,"string"==typeof e&&(i=e));const r=(async()=>{let e=!0;const t=await this.client.getCurrentContext(i);return this.client.addContextHandler(((i,r)=>{if(!e||(e=!1,!(0,d.default)(t,i)))return n(i,r)}),i)})();return{...r,unsubscribe:()=>r.then((e=>e.unsubscribe()))}},broadcast:this.broadcast.bind(this),getCurrentContext:async e=>{const t=await this.client.getCurrentContext(e);return void 0===t?null:t}}}},e=new WeakMap,tr}ir.PrivateChannelClient=class{constructor(e,t){this.id=t,this.client=e,this.listeners=new Map}async broadcast(e){return this.client.dispatch("broadcast",{context:e})}async getCurrentContext(e){return this.client.dispatch("getCurrentContext",{contextType:e})}async addContextListener(e,t){if("function"!=typeof t)throw new Error("Non-function argument passed to the second parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");let n;n=e?`contextHandler:invoke-${this.id}-${e}-${ar.generateId()}`:`contextHandler:invoke-${this.id}-${ar.generateId()}`,this.client.register(n,ar.wrapContextHandler(t,n));const i={unsubscribe:await this.createContextUnsubscribeCb(n)};return this.listeners.set(n,i),await this.client.dispatch("contextHandlerAdded",{handlerId:n,contextType:e}),i}createNonStandardUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch("nonStandardHandlerRemoved",{handlerId:e})}}createContextUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch("contextHandlerRemoved",{handlerId:e})}}onAddContextListener(e){const t=`onContextHandlerAdded:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch("onAddContextHandlerAdded",{handlerId:t}),n}onDisconnect(e){const t=`onDisconnect:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch("onDisconnectHandlerAdded",{handlerId:t}),n}onUnsubscribe(e){const t=`onUnsubscribe:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch("onUnsubscribeHandlerAdded",{handlerId:t}),n}async cleanUpAllSubs(){Array.from(this.listeners.keys()).forEach((e=>{this.client.remove(e),this.listeners.delete(e)}))}async disconnect(){try{await this.client.dispatch("clientDisconnecting"),await this.cleanUpAllSubs(),await this.client.disconnect()}catch(e){throw new Error(e.message)}}},function(e){var t=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.getIntentResolution=e.isChannel=e.isContext=e.connectPrivateChannel=e.buildAppChannelObject=e.buildPrivateChannelObject=e.ChannelError=e.ResultError=e.UnsupportedChannelApiError=e.getUnsupportedChannelApis=void 0;const n=Hi,r=ir,o=t(i);e.getUnsupportedChannelApis=e=>({addContextListener:()=>{throw new a("Channel.addContextListener",e)},broadcast:()=>{throw new a("Channel.broadcast",e)},getCurrentContext:()=>{throw new a("Channel.getCurrentContext",e)}});class a extends Error{constructor(e,t="System"){super(e),this.message=`Calling ${e} on an instance of a ${t} Channel returned by fdc3.get${t}Channels is not supported. If you would like to use a ${t} Channel, please use fdc3.joinChannel, fdc3.addContextListener, and fdc3.broadcast instead.`}}var c,d;e.UnsupportedChannelApiError=a,function(e){e.NoResultReturned="NoResultReturned",e.IntentHandlerRejected="IntentHandlerRejected"}(c=e.ResultError||(e.ResultError={})),(d=e.ChannelError||(e.ChannelError={})).NoChannelFound="NoChannelFound",d.AccessDenied="AccessDenied",d.CreationFailed="CreationFailed";e.buildPrivateChannelObject=e=>{let t=!1;const n=()=>{if(t)throw new Error("Private Channel Client has been disconnected from the Private Channel")};return{id:e.id,type:"private",broadcast:async t=>(n(),e.broadcast(t)),getCurrentContext:async t=>(n(),e.getCurrentContext(t)),addContextListener:async(t,i)=>{n();let r=i,o=t;"function"==typeof t&&(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),r=t,o=null);return e.addContextListener(o,r)},onAddContextListener:t=>(n(),e.onAddContextListener(t)),disconnect:async()=>(n(),t=!0,e.disconnect()),onDisconnect:t=>(n(),e.onDisconnect(t)),onUnsubscribe:t=>(n(),e.onUnsubscribe(t))}};e.buildAppChannelObject=e=>({id:e.id,type:"app",broadcast:e.setContext,getCurrentContext:async t=>{const n=await e.getCurrentContext(t);return void 0===n?null:n},addContextListener:(t,n)=>{let i,r;"function"==typeof t?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),i=t):(i=n,"string"==typeof t&&(r=t));const s=(async()=>{let t=!0;const n=await e.getCurrentContext(r);return e.addContextHandler(((e,r)=>{if(!t||(t=!1,!(0,o.default)(n,e)))return i(e,r)}),r)})();return{...s,unsubscribe:()=>s.then((e=>e.unsubscribe()))}}});e.connectPrivateChannel=async t=>{try{const n=await fin.InterApplicationBus.Channel.connect(t),i=new r.PrivateChannelClient(n,t);return(0,e.buildPrivateChannelObject)(i)}catch(e){throw new Error(`Private Channel with id: ${t} doesn't exist`)}};e.isContext=e=>{if(e&&"object"==typeof e&&"type"in e){const{type:t}=e;return"string"==typeof t}return!1};e.isChannel=e=>{if(e&&"object"==typeof e&&"type"in e&&"id"in e){const{type:t,id:n}=e;return"string"==typeof t&&"string"==typeof n&&("app"===t||"private"===t)}return!1};e.getIntentResolution=async(t,i,r,o)=>{const s=(0,n.generateId)(),a=new Promise(((e,t)=>{fin.InterApplicationBus.subscribe({uuid:"*"},s,(t=>{e(t)})).catch((()=>t(new Error("getResult is not supported in this environment"))))})),d=r?{target:r,intentResolutionResultId:s}:{intentResolutionResultId:s},h=o?{name:o,context:i,metadata:d}:{...i,metadata:d},l=async()=>{let n=await a;if(!n||"object"!=typeof n)throw new Error(c.NoResultReturned);const{error:i}=n;if(i)throw new Error(c.IntentHandlerRejected);if((0,e.isChannel)(n)){const{id:i,type:r}=n;switch(r){case"private":n=await(0,e.connectPrivateChannel)(i);break;case"app":{const r=await t.joinSessionContextGroup(i);n=(0,e.buildAppChannelObject)(r);break}}}else if(!(0,e.isContext)(n))throw new Error(c.NoResultReturned);return n},u=o?await t.fireIntent(h):await t.fireIntentForContext(h);return"object"!=typeof u?{source:{appId:"",instanceId:""},intent:"",version:"2.0",getResult:l}:{...u,getResult:l}}}(nr);var lr,ur,pr={};function wr(){if(ur)return Ki;ur=1;var e,t,n=s&&s.__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},i=s&&s.__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)},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ki,"__esModule",{value:!0}),Ki.InteropClient=void 0;const o=d,a=r(qi),c=function(){if(dr)return er;dr=1,Object.defineProperty(er,"__esModule",{value:!0}),er.Fdc3Module=void 0;const e=Hi,t=hr();class n extends t.FDC3ModuleBase{async open(e,t){await super._open(e,t)}addContextListener(e,t){let n;return this.wire.sendAction("fdc3-add-context-listener").catch((e=>{})),"function"==typeof e?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),n=this.client.addContextHandler(e)):n=this.client.addContextHandler(t,null===e?void 0:e),{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}addIntentListener(e,t){this.wire.sendAction("fdc3-add-intent-listener").catch((e=>{}));const n=this.client.registerIntentHandler((e=>{const{context:n,metadata:i}=e,{metadata:r}=n,o=i?.intentResolutionResultId||r?.intentResolutionResultId;o&&this.fin.InterApplicationBus.publish(o,null).catch((()=>null)),t(e.context)}),e,{fdc3Version:"1.2"});return{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}async raiseIntent(t,n,i){this.wire.sendAction("fdc3-raise-intent").catch((e=>{}));const r=i?{name:t,context:n,metadata:{target:i}}:{name:t,context:n};try{return await this.client.fireIntent(r)}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntent?"ResolverUnavailable":t.message;throw new Error(n)}}async findIntent(t,n){this.wire.sendAction("fdc3-find-intent").catch((e=>{}));try{return await this.client.getInfoForIntent({name:t,context:n})}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntent?"ResolverUnavailable":t.message;throw new Error(n)}}async findIntentsByContext(t){this.wire.sendAction("fdc3-find-intents-by-context").catch((e=>{}));try{return await this.client.getInfoForIntentsByContext(t)}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntentsByContext?"ResolverUnavailable":t.message;throw new Error(n)}}async raiseIntentForContext(t,n){this.wire.sendAction("fdc3-raise-intent-for-context").catch((e=>{}));try{return await this.client.fireIntentForContext({...t,metadata:{target:n}})}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntentForContext?"ResolverUnavailable":t.message;throw new Error(n)}}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}getInfo(){return this.wire.sendAction("fdc3-get-info").catch((e=>{})),{providerVersion:this.wire.environment.getAdapterVersionSync(),provider:`openfin-${this.wire.me.uuid}`,fdc3Version:"1.2"}}}return er.Fdc3Module=n,er}(),h=function(){if(lr)return pr;lr=1,Object.defineProperty(pr,"__esModule",{value:!0}),pr.Fdc3Module2=void 0;const e=hr(),t=Hi,n=wr(),i=nr,r=ir;class o extends e.FDC3ModuleBase{async open(e,t){return"string"==typeof e&&console.warn("Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string })."),super._open(e,t)}async findInstances(e){this.wire.sendAction("fdc3-find-instances").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,"fdc3FindInstances",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3FindInstances?"ResolverUnavailable":e.message;throw new Error(n)}}async getAppMetadata(e){this.wire.sendAction("fdc3-get-app-metadata").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,"fdc3GetAppMetadata",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3GetAppMetadata?"ResolverUnavailable":e.message;throw new Error(n)}}async addContextListener(e,t){this.wire.sendAction("fdc3-add-context-listener").catch((e=>{}));const n=e=>t=>{const{contextMetadata:n,...i}=t,r=n?[{...i},n]:[t,null];e(...r)};let i=t,r=n(i);return"function"==typeof e?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),i=e,r=n(i),this.client.addContextHandler(r)):this.client.addContextHandler(r,null===e?void 0:e)}async findIntent(e,n,i){this.wire.sendAction("fdc3-find-intent").catch((e=>{}));try{return await this.client.getInfoForIntent({name:e,context:n,metadata:{resultType:i}})}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntent?"ResolverUnavailable":e.message;throw new Error(n)}}async findIntentsByContext(e,i){this.wire.sendAction("fdc3-find-intents-by-context").catch((e=>{}));const r=i?{context:e,metadata:{resultType:i}}:e;try{return await n.InteropClient.ferryFdc3Call(this.client,"fdc3v2FindIntentsByContext",r)}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntentsByContext?"ResolverUnavailable":e.message;throw new Error(n)}}async raiseIntent(e,n,r){this.wire.sendAction("fdc3-raise-intent").catch((e=>{}));try{return"string"==typeof r&&console.warn("Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string })."),(0,i.getIntentResolution)(this.client,n,r,e)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?"ResolverUnavailable":e.message;throw new Error(n)}}async raiseIntentForContext(e,n){this.wire.sendAction("fdc3-raise-intent-for-context").catch((e=>{}));try{return"string"==typeof n&&console.warn("Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string })."),(0,i.getIntentResolution)(this.client,e,n)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?"ResolverUnavailable":e.message;throw new Error(n)}}async addIntentListener(e,t){if(this.wire.sendAction("fdc3-add-intent-listener").catch((e=>{})),"string"!=typeof e)throw new Error("First argument must be an Intent name");return this.client.registerIntentHandler((async e=>{let n,i;const{context:r,metadata:o}=e,{contextMetadata:s,metadata:a,...c}=r,d=o?.intentResolutionResultId||a?.intentResolutionResultId;try{const e=a?{metadata:a,...c}:{...c};n=await t(e,s),i=n}catch(e){n=e,i={error:!0}}if(d&&this.fin.InterApplicationBus.publish(d,i).catch((()=>null)),n instanceof Error)throw new Error(n.message);return n}),e,{fdc3Version:"2.0"})}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}async createPrivateChannel(){const e=(0,t.generateId)();await n.InteropClient.ferryFdc3Call(this.client,"createPrivateChannelProvider",{channelId:e});const o=await this.fin.InterApplicationBus.Channel.connect(e),s=new r.PrivateChannelClient(o,e);return(0,i.buildPrivateChannelObject)(s)}async getUserChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:"user",...(0,i.getUnsupportedChannelApis)("User")})))}async getSystemChannels(){return console.warn("This API has been deprecated. Please use fdc3.getUserChannels instead."),super.getSystemChannels()}async joinUserChannel(e){return super.joinChannel(e)}async joinChannel(e){return console.warn("This API has been deprecated. Please use fdc3.joinUserChannel instead."),super.joinChannel(e)}async getCurrentChannel(){const e=await super.getCurrentChannel();return e?{...e,type:"user",broadcast:this.broadcast.bind(this)}:null}async getInfo(){return n.InteropClient.ferryFdc3Call(this.client,"fdc3v2GetInfo",{fdc3Version:"2.0"})}}return pr.Fdc3Module2=o,pr}(),l=Hi;let u=class extends o.Base{constructor(i,r){super(i),e.set(this,void 0),t.set(this,void 0),n(this,t,new Map,"f"),n(this,e,r,"f")}async setContext(t){this.wire.sendAction("interop-client-set-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("setContext",{context:t})}async addContextHandler(t,n){if(this.wire.sendAction("interop-client-add-context-handler").catch((e=>{})),"function"!=typeof t)throw new Error("Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");const r=await i(this,e,"f");let o;o=n?`invokeContextHandler-${n}-${(0,l.generateId)()}`:"invokeContextHandler";const s=(0,l.wrapContextHandler)(t,o);return r.register(o,s),await r.dispatch("contextHandlerRegistered",{handlerId:o,contextType:n}),{unsubscribe:async()=>{r.remove(o),await r.dispatch("removeContextHandler",{handlerId:o})}}}async getContextGroups(){this.wire.sendAction("interop-client-get-context-groups").catch((e=>{}));return(await i(this,e,"f")).dispatch("getContextGroups")}async joinContextGroup(t,n){this.wire.sendAction("interop-client-join-context-group").catch((e=>{}));const r=await i(this,e,"f");if(!t)throw new Error("No contextGroupId specified for joinContextGroup.");return r.dispatch("joinContextGroup",{contextGroupId:t,target:n})}async removeFromContextGroup(t){this.wire.sendAction("interop-client-remove-from-context-group").catch((e=>{}));return(await i(this,e,"f")).dispatch("removeFromContextGroup",{target:t})}async getAllClientsInContextGroup(t){this.wire.sendAction("interop-client-get-all-clients-in-context-group").catch((e=>{}));const n=await i(this,e,"f");if(!t)throw new Error("No contextGroupId specified for getAllClientsInContextGroup.");return n.dispatch("getAllClientsInContextGroup",{contextGroupId:t})}async getInfoForContextGroup(t){this.wire.sendAction("interop-client-get-info-for-context-group").catch((e=>{}));const n=await i(this,e,"f");if(!t)throw new Error("No contextGroupId specified for getInfoForContextGroup.");return n.dispatch("getInfoForContextGroup",{contextGroupId:t})}async fireIntent(t){this.wire.sendAction("interop-client-fire-intent").catch((e=>{}));return(await i(this,e,"f")).dispatch("fireIntent",t)}async registerIntentHandler(t,n,r){this.wire.sendAction("interop-client-register-intent-handler").catch((e=>{}));const o=await i(this,e,"f"),s=`intent-handler-${n}`,a=(0,l.wrapIntentHandler)(t,s);try{await o.register(s,a),await o.dispatch("intentHandlerRegistered",{handlerId:s,...r})}catch(e){throw new Error("Unable to register intent handler")}return{unsubscribe:async()=>{o.remove(s)}}}async getCurrentContext(t){this.wire.sendAction("interop-client-get-current-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("getCurrentContext",{contextType:t})}async getInfoForIntent(t){this.wire.sendAction("interop-client-get-info-for-intent").catch((e=>{}));return(await i(this,e,"f")).dispatch("getInfoForIntent",t)}async getInfoForIntentsByContext(t){this.wire.sendAction("interop-client-get-info-for-intents-by-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("getInfoForIntentsByContext",t)}async fireIntentForContext(t){this.wire.sendAction("interop-client-fire-intent-for-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("fireIntentForContext",t)}async joinSessionContextGroup(n){try{const r=i(this,t,"f").get(n);if(r)return r.getUserInstance();const o=await i(this,e,"f"),{hasConflict:s}=await o.dispatch("sessionContextGroup:createIfNeeded",{sessionContextGroupId:n});s&&console.warn(`A (non-session) context group with the name "${n}" already exists. If you are trying to join a Context Group, call joinContextGroup instead.`);const c=new a.default(this.wire,i(this,e,"f"),n);return i(this,t,"f").set(n,c),c.getUserInstance()}catch(e){throw console.error(`Error thrown trying to create Session Context Group with id "${n}": ${e}`),e}}async onDisconnection(t){this.wire.sendAction("interop-client-add-ondisconnection-listener").catch((e=>{}));return(await i(this,e,"f")).onDisconnection((e=>{const{uuid:n}=e;t({type:"interop-broker",topic:"disconnected",brokerName:n})}))}getFDC3Sync(e){switch(e){case"1.2":return new c.Fdc3Module((()=>this),this.wire);case"2.0":return new h.Fdc3Module2((()=>this),this.wire);default:throw new Error(`Invalid FDC3 version provided: ${e}. Must be '1.2' or '2.0'`)}}async getFDC3(e){return this.getFDC3Sync(e)}static async ferryFdc3Call(t,n,r){return(await i(t,e,"f")).dispatch(n,r||null)}};return Ki.InteropClient=u,e=new WeakMap,t=new WeakMap,Ki}var yr,fr,gr,mr={};function vr(){if(yr)return mr;yr=1,Object.defineProperty(mr,"__esModule",{value:!0}),mr.overrideCheck=mr.checkFDC32Overrides=mr.getDefaultViewFdc3VersionFromAppInfo=void 0;const e=Vi();function t(t){return["fdc3HandleFindInstances","handleInfoForIntent","handleInfoForIntentsByContext","fdc3HandleGetAppMetadata","fdc3HandleGetInfo","fdc3HandleOpen","handleFiredIntent","handleFiredIntentForContext"].filter((n=>t[n]===e.InteropBroker.prototype[n]))}return mr.getDefaultViewFdc3VersionFromAppInfo=function({manifest:e,initialOptions:t}){const n=e?.platform?.defaultViewOptions?.fdc3InteropApi??t.defaultViewOptions?.fdc3InteropApi;return["1.2","2.0"].includes(n??"")?n:void 0},mr.checkFDC32Overrides=t,mr.overrideCheck=function(e,n){if(n&&"2.0"===n){const n=t(e);n.length>0&&console.warn(`WARNING: FDC3 2.0 has been set as a default option for Views in this Platform, but the required InteropBroker APIs for FDC3 2.0 compliance have not all been overridden.\nThe following APIs need to be overridden:\n${n.join("\n")}`)}},mr}function Cr(){return gr||(gr=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),i=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),i(function(){if(fr)return Ti;fr=1;var e=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ti,"__esModule",{value:!0}),Ti.InteropModule=void 0;const t=e(n),i=$i,r=d,o=Vi(),a=wr(),c=vr(),h=Tn,l=e=>new e,u="You have attempted to use or modify InteropBroker parameters, which is not allowed. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.";class p extends r.Base{async init(e,n=l){this.wire.sendAction("interop-init").catch((()=>{}));const r=await this.wire.environment.getInteropInfo(this.wire.getFin()),s=(0,i.createUnusableObject)(u),a=(0,i.createWarningObject)(u,(0,t.default)(r)),d=async()=>{throw new Error(u)},p=o.InteropBroker.createClosedConstructor(this.wire,(()=>this.fin.InterApplicationBus.Channel.create(`interop-broker-${e}`)),r);let w;return w=Array.isArray(n)?new((0,h.overrideFromComposables)(...n)(p))(s,d,a):await n(p,s,d,a),(0,c.overrideCheck)(w,r.fdc3Version),w}connectSync(e,t){return this.wire.sendAction("interop-connect-sync").catch((()=>{})),new a.InteropClient(this.wire,this.wire.environment.whenReady().then((()=>this.fin.InterApplicationBus.Channel.connect(`interop-broker-${e}`,{payload:t}))))}}return Ti.InteropModule=p,Ti}(),e),i(wr(),e),i(Vi(),e)}(Li)),Li}var br={},Ir={},Er={},xr={};Object.defineProperty(xr,"__esModule",{value:!0}),xr.getSnapshotSourceChannelName=void 0;xr.getSnapshotSourceChannelName=e=>`snapshot-source-provider-${e.uuid}`;var Ar,Pr,Mr,_r,Or,Sr=s&&s.__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},Rr=s&&s.__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)};Object.defineProperty(Er,"__esModule",{value:!0}),Er.SnapshotSource=void 0;const Fr=d,jr=xr,kr=new Map;class Lr extends Fr.Base{constructor(e,t){super(e),Ar.set(this,void 0),Pr.set(this,(()=>(kr.has(this.identity.uuid)||kr.set(this.identity.uuid,{eventFired:null,clientPromise:null}),kr.get(this.identity.uuid)))),Mr.set(this,(()=>(Rr(this,Pr,"f").call(this).clientPromise||(Rr(this,Pr,"f").call(this).clientPromise=Rr(this,_r,"f").call(this)),Rr(this,Pr,"f").call(this).clientPromise))),_r.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);try{Rr(this,Pr,"f").call(this).eventFired||await Rr(this,Or,"f").call(this);const t=await this.fin.InterApplicationBus.Channel.connect(e,{wait:!1});return t.onDisconnection((()=>{Rr(this,Pr,"f").call(this).clientPromise=null,Rr(this,Pr,"f").call(this).eventFired=null})),t}catch(e){throw Rr(this,Pr,"f").call(this).clientPromise=null,new Error("The targeted SnapshotSource is not currently initialized. Await this object's ready() method.")}})),Or.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);let t,n;const i=new Promise(((e,i)=>{t=e,n=i}));Rr(this,Pr,"f").call(this).eventFired=i;const r=async i=>{try{i.channelName===e&&(t(),await this.fin.InterApplicationBus.Channel.removeListener("connected",r))}catch(e){n(e)}};await this.fin.InterApplicationBus.Channel.on("connected",r)})),Sr(this,Ar,t,"f")}get identity(){return Rr(this,Ar,"f")}async ready(){this.wire.sendAction("snapshot-source-ready").catch((e=>{}));try{await Rr(this,Mr,"f").call(this)}catch(e){await Rr(this,Pr,"f").call(this).eventFired}}async getSnapshot(){this.wire.sendAction("snapshot-source-get-snapshot").catch((e=>{}));const e=await Rr(this,Mr,"f").call(this),t=await e.dispatch("get-snapshot");return(await t).snapshot}async applySnapshot(e){this.wire.sendAction("snapshot-source-apply-snapshot").catch((e=>{}));return(await Rr(this,Mr,"f").call(this)).dispatch("apply-snapshot",{snapshot:e})}}Er.SnapshotSource=Lr,Ar=new WeakMap,Pr=new WeakMap,Mr=new WeakMap,_r=new WeakMap,Or=new WeakMap,Object.defineProperty(Ir,"__esModule",{value:!0}),Ir.SnapshotSourceModule=void 0;const Tr=d,$r=Er,Br=xr;class Gr extends Tr.Base{async init(e){if(this.wire.sendAction("snapshot-source-init").catch((e=>{})),"object"!=typeof e||"function"!=typeof e.getSnapshot||"function"!=typeof e.applySnapshot)throw new Error("you must pass in a valid SnapshotProvider");const t=await this.fin.InterApplicationBus.Channel.create((0,Br.getSnapshotSourceChannelName)(this.fin.me));t.register("get-snapshot",(async()=>({snapshot:await e.getSnapshot()}))),t.register("apply-snapshot",(({snapshot:t})=>e.applySnapshot(t)))}wrapSync(e){return this.wire.sendAction("snapshot-source-wrap-sync").catch((e=>{})),new $r.SnapshotSource(this.wire,e)}async wrap(e){return this.wire.sendAction("snapshot-source-wrap").catch((e=>{})),this.wrapSync(e)}}Ir.SnapshotSourceModule=Gr,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Ir,e),n(Er,e)}(br),Object.defineProperty(a,"__esModule",{value:!0});var Wr=a.Fin=void 0;const Hr=t,Nr=c,Dr=ie(),Ur=Z(),Vr=de,zr=en,Kr=rn,qr=un,Jr=bn,Yr=J(),Zr=An,Qr=ki,Xr=Cr(),eo=br;class to extends Hr.EventEmitter{constructor(e){super(),this.wire=e,this.System=new Nr.System(e),this.Window=new Dr._WindowModule(e),this.Application=new Ur.ApplicationModule(e),this.InterApplicationBus=new Vr.InterApplicationBus(e),this.Clipboard=new zr.Clipboard(e),this.ExternalApplication=new Kr.ExternalApplicationModule(e),this.Frame=new qr._FrameModule(e),this.GlobalHotkey=new Jr.GlobalHotkey(e),this.Platform=new Zr.PlatformModule(e,this.InterApplicationBus.Channel),this.View=new Yr.ViewModule(e),this.Interop=new Xr.InteropModule(e),this.SnapshotSource=new eo.SnapshotSourceModule(e),e.registerFin(this),this.me=(0,Qr.getMe)(e),e.on("disconnected",(()=>{this.emit("disconnected")}))}}Wr=a.Fin=to;var no={},io={};function ro(e){return"string"==typeof e.manifestUrl}function oo(e){return ao(e)&&"string"==typeof e.address}function so(e){return oo(e)&&"string"==typeof e.token}function ao(e){return"string"==typeof e.uuid}function co(e){return e.runtime&&"string"==typeof e.runtime.version}function ho(e){return ao(e)&&co(e)}Object.defineProperty(io,"__esModule",{value:!0}),io.isInternalConnectConfig=io.isPortDiscoveryConfig=io.isNewConnectConfig=io.isConfigWithReceiver=io.isRemoteConfig=io.isExistingConnectConfig=io.isExternalConfig=void 0,io.isExternalConfig=ro,io.isExistingConnectConfig=oo,io.isRemoteConfig=so,io.isConfigWithReceiver=function(e){return"object"==typeof e.receiver&&so({...e,address:""})},io.isNewConnectConfig=ho,io.isPortDiscoveryConfig=function(e){return ro(e)&&co(e)||ho(e)},io.isInternalConnectConfig=function(e){return oo(e)||ho(e)};var lo={},uo={};Object.defineProperty(uo,"__esModule",{value:!0}),uo.EmitterMap=void 0;const po=t;function wo(e){return Buffer.from(e).toString("base64")}uo.EmitterMap=class{constructor(){this.storage=new Map}hashKeys(e){return e.map(wo).join("/")}getOrCreate(e){const t=this.hashKeys(e);return this.storage.has(t)||this.storage.set(t,new po.EventEmitter),this.storage.get(t)}has(e){return this.storage.has(this.hashKeys(e))}delete(e){const t=this.hashKeys(e);return this.storage.delete(t)}},Object.defineProperty(lo,"__esModule",{value:!0});const yo=uo;class fo extends yo.EmitterMap{constructor(){super(...arguments),this.dispatchEvent=e=>{if(function(e){return"process-desktop-event"===e.action}(e)){const{payload:t}=e,n=function(e){const{topic:t}=e;if("frame"===t||"window"===t||"view"===t){const{uuid:n,name:i}=e;return[t,n,i]}if("application"===t){const{uuid:n}=e;return[t,n]}return[t]}(t);if(this.has(n))return this.getOrCreate(n).emit(t.type,t),!0}return!1}}}lo.default=fo;var go,mo,vo=s&&s.__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},Co=s&&s.__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)},bo=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(no,"__esModule",{value:!0});var Io=no.Transport=void 0;const Eo=t,xo=io,Ao=g,Po=bo(lo),Mo=ki,_o=ke;class Oo extends Eo.EventEmitter{constructor(e,t,n){super(),this.wireListeners=new Map,this.topicRefMap=new Map,this.eventAggregator=new Po.default,this.messageHandlers=[this.eventAggregator.dispatchEvent],go.set(this,void 0),mo.set(this,void 0),this.connectSync=()=>{Co(this,go,"f").connectSync()},this.getPort=()=>Co(this,go,"f").getPort(),vo(this,go,new e(this.onmessage.bind(this)),"f"),this.environment=t,this.sendRaw=Co(this,go,"f").send.bind(Co(this,go,"f")),this.registerMessageHandler(this.handleMessage.bind(this)),Co(this,go,"f").on("disconnected",(()=>{for(const[,{handleNack:e}]of this.wireListeners)e({reason:"Remote connection has closed"});this.wireListeners.clear(),this.emit("disconnected")}));const{uuid:i,name:r}=n,o=this.environment.getCurrentEntityType();this.me=(0,Mo.getBaseMe)(o,i,r)}getFin(){if(!Co(this,mo,"f"))throw new Error("No Fin object registered for this transport");return Co(this,mo,"f")}registerFin(e){if(Co(this,mo,"f"))throw new Error("Fin object has already been registered for this transport");vo(this,mo,e,"f")}shutdown(){return Co(this,go,"f").shutdown()}async connect(e){if((0,xo.isConfigWithReceiver)(e))return await Co(this,go,"f").connect(e.receiver),this.authorize(e);if((0,xo.isRemoteConfig)(e))return this.connectRemote(e);if((0,xo.isExistingConnectConfig)(e))return this.connectByPort(e);if((0,xo.isNewConnectConfig)(e)){const t=await this.environment.retrievePort(e);return this.connectByPort({...e,address:`ws://localhost:${t}`})}}async connectRemote(e){return await Co(this,go,"f").connect(new(this.environment.getWsConstructor())(e.address)),this.authorize(e)}async connectByPort(e){const{address:t,uuid:n}=e,i={...e,type:"file-token"},r=Co(this,go,"f");await r.connect(new(this.environment.getWsConstructor())(e.address));const o=await this.sendAction("request-external-authorization",{uuid:n,type:"file-token"},!0);if("external-authorization-response"!==o.action)throw new Ao.UnexpectedActionError(o.action);return await this.environment.writeToken(o.payload.file,o.payload.token),this.authorize(i)}async authorize(e){const t=await this.sendAction("request-authorization",e,!0);if("authorization-response"!==t.action)throw new Ao.UnexpectedActionError(t.action);if(!0!==t.payload.success)throw new Ao.RuntimeError(t.payload)}sendAction(e,t={},n=!1){let i=()=>{};const r=Ao.RuntimeError.getCallSite(1),o=this.environment.getNextMessageId(),s=new Promise(((s,a)=>{i=a;const c={action:e,payload:t,messageId:o},d=Co(this,go,"f");return this.addWireListener(o,s,(e=>this.nackHandler(e,a,r)),n),d.send(c).catch(a)}));return Object.assign(s,{cancel:i,messageId:o})}nackHandler(e,t,n){t("string"==typeof e?e:new Ao.RuntimeError(e,n))}ferryAction(e){return new Promise(((t,n)=>{const i=this.environment.getNextMessageId();e.messageId=i;const r=e=>{t(e.payload)};return Co(this,go,"f").send(e).then((()=>this.addWireListener(i,r,(e=>this.nackHandler(e,n)),!1))).catch(n)}))}registerMessageHandler(e){this.messageHandlers.push(e)}addWireListener(e,t,n,i){i?this.uncorrelatedListener=t:this.wireListeners.has(e)?n({reason:"Duplicate handler id",error:(0,_o.errorToPOJO)(new Ao.DuplicateCorrelationError(String(e)))}):this.wireListeners.set(e,{resolve:t,handleNack:n})}onmessage(e){for(const t of this.messageHandlers)t.call(null,e)}handleMessage(e){const t=e.correlationId||NaN;if("correlationId"in e){if(!this.wireListeners.has(t))return!1;{const{resolve:n,handleNack:i}=this.wireListeners.get(t);"ack"!==e.action?i({reason:"Did not receive ack action",error:(0,_o.errorToPOJO)(new Ao.NoAckError(e.action))}):"payload"in e?e.payload.success?n.call(null,e):i(e.payload):"string"==typeof e.reason?i(e):(console.warn("Received invalid response from core",e),i({reason:"invalid response shape"})),this.wireListeners.delete(t)}}else this.uncorrelatedListener&&this.uncorrelatedListener.call(null,e),this.uncorrelatedListener=()=>{};return!0}}Io=no.Transport=Oo,go=new WeakMap,mo=new WeakMap;const So=(...e)=>({log:(...t)=>console.debug(`[${(new Date).toISOString()}]`,...(e=>e.map((e=>`[${e}]`)))(e),...t),getLogger:(...t)=>So(...e,...t)}),Ro=So("@openfin/core-web/client");function Fo(e,t){if(!function(e){return"string"==typeof e}(e))throw new Error(`Property ${t} has invalid type. Expected string, got ${typeof e}.`)}const jo="web-broker-ports-ready",ko=Ro.getLogger("get-web-interop-ports");function Lo(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)}function To(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}"function"==typeof SuppressedError&&SuppressedError;const $o=e=>{var n,i,r;return r=class extends t.EventEmitter{constructor(t){super(),n.set(this,void 0),i.set(this,!1),this.connectSync=()=>{Lo(this,i,"f")||(e.addEventListener("message",(e=>{e.data?.topic?.startsWith("wire-message")&&e.data.message&&Lo(this,n,"f").call(this,{...JSON.parse(e.data.message),ports:e.ports})})),e.start())},this.connect=async()=>{this.connectSync()},this.send=t=>(e.postMessage({topic:"wire-message",message:JSON.stringify(t)}),Promise.resolve()),this.shutdown=async()=>{e.close()},To(this,n,t,"f")}getPort(){return e}},n=new WeakMap,i=new WeakMap,r};var Bo={},Go={};Object.defineProperty(Go,"__esModule",{value:!0}),Go.BaseEnvironment=void 0;const Wo=vr();Go.BaseEnvironment=class{async getViewWindowIdentity(e,t){const{identity:n}=await e.View.wrapSync(t).getCurrentWindow();return n}async getInteropInfo(e){const t=await e.Application.getCurrentSync().getInfo().catch((()=>null)),n=t?.initialOptions?.interopBrokerConfiguration??{};return{fdc3Version:t?(0,Wo.getDefaultViewFdc3VersionFromAppInfo)(t):void 0,...n,fdc3Info:{providerVersion:await e.System.getVersion(),provider:"OpenFin"}}}},Object.defineProperty(Bo,"__esModule",{value:!0});var Ho=Bo.BrowserEnvironment=void 0;const No=Go;class Do extends No.BaseEnvironment{constructor(){super(...arguments),this.type="other",this.getRandomId=()=>{const e=new Uint32Array(1);return window.crypto.getRandomValues(e)[0].toString(32)}}getAdapterVersionSync(){return""}observeBounds(e,t){throw new Error("Method not implemented.")}layoutAllowedInContext(e){return!1}initLayoutManager(e,t,n){throw new Error("Method not implemented.")}applyLayoutSnapshot(e,t,n){throw new Error("Method not implemented.")}createLayout(e,t){throw new Error("Method not implemented.")}destroyLayout(e,t){throw new Error("Method not implemented.")}resolveLayout(e,t){throw new Error("Method not implemented.")}initPlatform(...e){throw new Error("Method not implemented.")}writeToken(e,t){return Promise.resolve("")}retrievePort(e){throw new Error("Method not implemented.")}getNextMessageId(){return this.getRandomId()}createChildContent(e){throw new Error("Method not implemented.")}getWebWindow(e){throw new Error("Method not implemented.")}getCurrentEntityIdentity(){throw new Error("Method not implemented.")}getCurrentEntityType(){return"external connection"}raiseEvent(e,t){throw new Error("Method not implemented.")}getUrl(){return location.href}getDefaultChannelOptions(){return{create:{},connect:{}}}getRtcPeer(){return new RTCPeerConnection}getWsConstructor(){return WebSocket}whenReady(){return Promise.resolve()}}Ho=Bo.BrowserEnvironment=Do;const Uo=e=>"platform"in e&&void 0!==e.platform;var Vo,zo;class Ko extends Ho{constructor(e){super(),this.connectConfig=e,Vo.set(this,void 0),zo.set(this,new W((async()=>Promise.resolve().then((function(){return __webpack_require__(/*! ./main-b14f67c9.js */ "./node_modules/@openfin/core-web/out/main-b14f67c9.js")}))))),Uo(e)&&this.validatePlatformOptions(e)}getAdapterVersionSync(){return"0.39.21"}validatePlatformOptions({platform:e}){if(!("layoutSnapshot"in e))throw new Error("Platform options are missing layoutSnapshot. Please provide a layoutSnapshot in the platform options.");if("windows"in e||"windows"in e.layoutSnapshot)throw new Error("It appears you tried to call connect() with a snapshot object from an OpenFin desktop environment. Note that connect() expects to be called with a platform property with this structure: { platform: { layoutSnapshot } }. To get a layoutSnapshot of the expected structure, use fin.Platform.Layout.getCurrentLayoutManagerSync().getLayoutSnapshot() in v34+ in your desktop environment.");const{layouts:t}=e.layoutSnapshot;Object.entries(t).map((([e,t])=>{if("object"!=typeof t||null===t)throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must be an object.`);if(!("content"in t))throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must contain a 'content' property.`)}))}async getInteropInfo(e){return{...{contextGroups:void 0,logging:{beforeAction:{enabled:!1},afterAction:{enabled:!1}}},fdc3Version:void 0,fdc3Info:{providerVersion:"0.39.21",provider:"OpenFin Web"}}}layoutAllowedInContext(e){return!0}async initLayoutManager(e,t,n){if(Lo(this,Vo,"f"))throw new Error("Layout already initialized.");if(!Uo(this.connectConfig))throw new Error("Platform options are missing from connection config.");const{WebLayoutEntryPoint:i}=await Lo(this,zo,"f").getValue();return To(this,Vo,new i(this.connectConfig),"f"),await Lo(this,Vo,"f").initLayoutManager(e,t,n)}async applyLayoutSnapshot(e,t,n){Lo(this,Vo,"f")?.applyLayoutSnapshot(e,t,n)}async createLayout(e,t){return Lo(this,Vo,"f")?.createLayout(e,t)}async destroyLayout(e,t){return Lo(this,Vo,"f")?.destroyLayout(e,t)}async getViewWindowIdentity(e,t){return Promise.resolve({uuid:t.uuid,name:t.uuid})}}Vo=new WeakMap,zo=new WeakMap;const qo=()=>{const e=((e,t)=>{const n=new RegExp(`^${t}<(?.*)>$`).exec(e)?.groups?.meta;if(n)try{return JSON.parse(atob(n))}catch(e){throw new Error(`Failed to decode JSON from ${n}.`)}})(window.name,"of-frame");if(e)try{const{name:t,uuid:n,brokerUrl:i,providerId:r,contextGroup:o}=e;return Fo(i,"brokerUrl"),Fo(n,"uuid"),Fo(t,"name"),{identity:{name:t,uuid:n},brokerUrl:i,interopConfig:{providerId:r,currentContextGroup:o}}}catch(e){throw new Error(`Unexpected error occurred when inferring platform information: ${e.stack}`)}},Jo=()=>{const e=r.v4();return{uuid:e,name:e}},Yo=async e=>{if("enabled"===e.connectionInheritance){const t=await(async e=>{const t=qo();if(t){const{validateOptions:n=(()=>!0)}=e,{identity:i,...r}=t;if(!await n(r))throw new Error("Parent options were rejected by validateOptions.");return t}})(e);if(t)return t}if(!e.options){const t="enabled"===e.connectionInheritance?"Broker URL was not specified nor provided by a platform container.":"Connection inheritance is disabled but no options were provided.";throw new Error(t)}return{...e.options,identity:Jo()}};exports.__classPrivateFieldGet=Lo,exports.__classPrivateFieldSet=To,exports.apiExposer=Gn,exports.commonjsGlobal=s,exports.connect=async t=>{try{Ro.log("Establishing connection",t);const{brokerUrl:n,identity:i,timeout:r,interopConfig:s}=await Yo(t),{workerPort:a,iframeBrokerPort:c}=await(async(e,t,n)=>{const{origin:i}=new URL(e),r=document.createElement("IFRAME");let s;r.style.display="none";try{return await new Promise(((a,c)=>{const d=e=>{if(e.source===r.contentWindow&&e.data?.topic===`ack-${jo}`){if(e.origin!==i)c(new Error(`Broker redirected to unexpected origin ${e.origin}, expected ${i}.`));else if(e.data.success){const[t,n]=e.ports;a({iframeBrokerPort:t,workerPort:n})}else c(new m(e.data));window.removeEventListener("message",d),clearTimeout(s)}};window.addEventListener("message",d),ko.log(`Connecting to broker ${e}`),r.setAttribute("src",e),r.setAttribute("name",o(t,"of-broker")),document.body.appendChild(r),ko.log("Iframe loaded, awaiting init message from iframe"),n&&(s=setTimeout((()=>{window.removeEventListener("message",d),document.body.removeChild(r),c(new Error("Worker did not initialize in time"))}),n))}))}catch(e){throw new Error(`Failed to initialise Fin Web Client. ${e.message}`,{cause:e})}})(n,i,r);Ro.log("Successfully established connection to shared worker");const d={entityType:"external connection",...i};a.start(),c.start();const h=((t,n,i)=>{const r=$o(n),o=new Ko(t),s=new Io(r,o,i);return s.connectSync(),window.Buffer=e.Buffer,new Wr(s)})(t,a,d);return s?.providerId&&(h.me.interop=h.Interop.connectSync(s.providerId),s?.currentContextGroup&&h.me.interop.joinContextGroup(s.currentContextGroup).catch((e=>{console.warn(`Error joining specified context group: ${s?.currentContextGroup}, continuing`,e)}))),{...h,me:{...h.me,identity:{uuid:h.me.uuid,name:h.me.name}}}}catch(e){throw new Error(`An error occured during web-interop connection: ${e.message}`)}},exports.decorators=Nn,exports.encodeOptions=o,exports.layout_constants=ai,exports.lazy=G; +var e=__webpack_require__(/*! buffer/ */ "../../node_modules/buffer/index.js"),t=__webpack_require__(/*! events */ "../../node_modules/events/events.js"),n=__webpack_require__(/*! lodash/cloneDeep */ "../../node_modules/lodash/cloneDeep.js"),i=__webpack_require__(/*! lodash/isEqual */ "../../node_modules/lodash/isEqual.js"),r=__webpack_require__(/*! uuid */ "../../node_modules/uuid/dist/esm-browser/index.js");const o=(e,t)=>`${t}<${btoa(JSON.stringify(e))}>`;var s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof __webpack_require__.g?__webpack_require__.g:"undefined"!=typeof self?self:{},a={},c={},d={},h={};async function l(e){const t=[];for(const n of e){const e=await n();t.push(e)}return t}Object.defineProperty(h,"__esModule",{value:!0}),h.promiseMapSerial=h.serial=h.promiseMap=h.promisify=void 0,h.promisify=function(e){return(...t)=>new Promise(((n,i)=>{e(...t,((e,t)=>e?i(e):n(t)))}))},h.promiseMap=async function(e,t){return Promise.all(e.map(t))},h.serial=l,h.promiseMapSerial=async function(e,t){return l(e.map(((e,n,i)=>()=>t(e,n,i))))};var u,p=s&&s.__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},w=s&&s.__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)};Object.defineProperty(d,"__esModule",{value:!0}),d.Reply=d.EmitterBase=d.Base=void 0;const y=h;class f{constructor(e){this.isNodeEnvironment=()=>"node"===this.wire.environment.type,this.isOpenFinEnvironment=()=>"openfin"===this.wire.environment.type,this.isBrowserEnvironment=()=>"other"===this.wire.environment.type,this.wire=e}get fin(){return this.wire.getFin()}get me(){return this.wire.me}}d.Base=f;d.EmitterBase=class extends f{constructor(e,t,...n){super(e),this.topic=t,u.set(this,void 0),this.eventNames=()=>this.hasEmitter()?this.getOrCreateEmitter().eventNames():[],this.emit=(e,t,...n)=>!!this.hasEmitter()&&this.getOrCreateEmitter().emit(e,t,...n),this.hasEmitter=()=>this.wire.eventAggregator.has(w(this,u,"f")),this.getOrCreateEmitter=()=>this.wire.eventAggregator.getOrCreate(w(this,u,"f")),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[],this.listenerCount=e=>this.hasEmitter()?this.getOrCreateEmitter().listenerCount(e):0,this.registerEventListener=async(e,t={},n,i)=>{const r={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e},o=this.getOrCreateEmitter();n(o);try{await this.wire.sendAction("subscribe-to-desktop-event",r)}catch(e){throw i(o),this.deleteEmitterIfNothingRegistered(o),e}},this.deregisterEventListener=async(e,t={})=>{if(this.hasEmitter()){const n={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e};await this.wire.sendAction("unsubscribe-to-desktop-event",n).catch((()=>null));return this.getOrCreateEmitter()}return Promise.resolve()},p(this,u,[t,...n],"f"),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[]}async on(e,t,n){return await this.registerEventListener(e,n,(n=>{n.on(e,t)}),(n=>{n.removeListener(e,t)})),this}async addListener(e,t,n){return this.on(e,t,n)}async once(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.once(e,i),n.once(e,t)}),(n=>{n.removeListener(e,i),n.removeListener(e,t)})),this}async prependListener(e,t,n){return await this.registerEventListener(e,n,(n=>{n.prependListener(e,t)}),(n=>{n.removeListener(e,t)})),this}async prependOnceListener(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.prependOnceListener(e,t),n.once(e,i)}),(n=>{n.removeListener(e,t),n.removeListener(e,i)})),this}async removeListener(e,t,n){const i=await this.deregisterEventListener(e,n);return i&&(i.removeListener(e,t),this.deleteEmitterIfNothingRegistered(i)),this}async deregisterAllListeners(e){const t={...this.identity,type:e,topic:this.topic};if(this.hasEmitter()){const e=this.getOrCreateEmitter(),n=e.listenerCount(t.type),i=[];for(let e=0;enull)));return await Promise.all(i),e}}async removeAllListeners(e){const t=async e=>{const t=await this.deregisterAllListeners(e);t&&(t.removeAllListeners(e),this.deleteEmitterIfNothingRegistered(t))};if(e)await t(e);else if(this.hasEmitter()){const e=this.getOrCreateEmitter().eventNames();await(0,y.promiseMap)(e,t)}return this}deleteEmitterIfNothingRegistered(e){0===e.eventNames().length&&this.wire.eventAggregator.delete(w(this,u,"f"))}},u=new WeakMap;d.Reply=class{};var g={};Object.defineProperty(g,"__esModule",{value:!0});var m=g.RuntimeError=g.NotSupportedError=g.NotImplementedError=g.NoAckError=g.DuplicateCorrelationError=g.UnexpectedActionError=g.DisconnectedError=void 0;class v extends Error{constructor(e){super(`Expected websocket state OPEN but found ${e}`),this.readyState=e}}g.DisconnectedError=v;class C extends Error{}g.UnexpectedActionError=C;class b extends Error{}g.DuplicateCorrelationError=b;class I extends Error{}g.NoAckError=I;class E extends Error{}g.NotImplementedError=E;class x extends Error{}g.NotSupportedError=x;class A extends Error{constructor(e){const{message:t,name:n,stack:i,...r}=e;super(t),this.name=n||"Error",this.stack=i??this.toString(),Object.keys(r).forEach((e=>{this[e]=r[e]}))}}class P extends Error{static getCallSite(e=0){const t=Error.stackTraceLimit,n=e+1;Error.stackTraceLimit=t+n;const i=Error.prepareStackTrace;Error.prepareStackTrace=(e,t)=>t;const r=(new Error).stack?.slice(n)??[];return Error.prepareStackTrace=i,Error.stackTraceLimit=t,r}static prepareStackTrace(e,t){if("function"==typeof Error.prepareStackTrace)return Error.prepareStackTrace(e,t);let n="";n+=e.name||"Error",n+=`: ${e.message||""}`;for(const e of t)n+=`\n at ${e.toString()}`;return n}constructor(e,t){const{reason:n,error:i}=e;super(n),this.name="RuntimeError",i?.stack&&(this.cause=new A(i)),t&&(this.stack=P.prepareStackTrace(this,t))}}m=g.RuntimeError=P;var M={},_={},O={};Object.defineProperty(O,"__esModule",{value:!0}),O.validateIdentity=void 0,O.validateIdentity=function(e){let t;return"object"==typeof e&&"string"==typeof e.uuid||(t="Not a valid identity object"),t};var S={},R={},F={},j={},k={},L={},T={};Object.defineProperty(T,"__esModule",{value:!0}),T.handleDeprecatedWarnings=void 0;var $;T.handleDeprecatedWarnings=e=>{(e.contentNavigation?.whitelist||e.contentNavigation?.blacklist||e.contentRedirect?.whitelist||e.contentRedirect?.blacklist)&&console.warn("The properties 'whitelist' and 'blacklist' have been marked as deprecated and will be removed in a future version. Please use 'allowlist' and 'denylist'.")};var B={},G={};Object.defineProperty(G,"__esModule",{value:!0}),G.AsyncRetryableLazy=W=G.Lazy=void 0;var W=G.Lazy=class{constructor(e){this.producerFn=e}getValue(){return this.value||(this.value=this.producerFn()),this.value}};G.AsyncRetryableLazy=class{constructor(e){this.producerFn=e}async getValue(){return this.promise||(this.promise=this.producerFn().catch((e=>{throw delete this.promise,e}))),this.promise}};var H={};Object.defineProperty(H,"__esModule",{value:!0}),H.WebContents=void 0;const N=d;class D extends N.EmitterBase{constructor(e,t,n){super(e,n,t.uuid,t.name),this.identity=t,this.entityType=n}capturePage(e){return this.wire.sendAction("capture-page",{options:e,...this.identity}).then((({payload:e})=>e.data))}executeJavaScript(e){return this.wire.sendAction("execute-javascript-in-window",{...this.identity,code:e}).then((({payload:e})=>e.data))}getZoomLevel(){return this.wire.sendAction("get-zoom-level",this.identity).then((({payload:e})=>e.data))}setZoomLevel(e){return this.wire.sendAction("set-zoom-level",{...this.identity,level:e}).then((()=>{}))}navigate(e){return this.wire.sendAction("navigate-window",{...this.identity,url:e}).then((()=>{}))}navigateBack(){return this.wire.sendAction("navigate-window-back",{...this.identity}).then((()=>{}))}async navigateForward(){await this.wire.sendAction("navigate-window-forward",{...this.identity})}stopNavigation(){return this.wire.sendAction("stop-window-navigation",{...this.identity}).then((()=>{}))}reload(e=!1){return this.wire.sendAction("reload-window",{ignoreCache:e,...this.identity}).then((()=>{}))}print(e={}){return this.wire.sendAction("print",{...this.identity,options:e}).then((()=>{}))}findInPage(e,t){return this.wire.sendAction("find-in-page",{...this.identity,searchTerm:e,options:t}).then((({payload:e})=>e.data))}stopFindInPage(e){return this.wire.sendAction("stop-find-in-page",{...this.identity,action:e}).then((()=>{}))}getPrinters(){return this.wire.sendAction("get-printers",{...this.identity}).then((({payload:e})=>e.data))}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){await this.wire.sendAction("focus-window",{emitSynthFocused:e,...this.identity})}async showDeveloperTools(){await this.wire.sendAction("show-developer-tools",this.identity)}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction("get-process-info",this.identity);return e}async getSharedWorkers(){return this.wire.sendAction("get-shared-workers",this.identity).then((({payload:e})=>e.data))}async inspectSharedWorker(){await this.wire.sendAction("inspect-shared-worker",{...this.identity})}async inspectSharedWorkerById(e){await this.wire.sendAction("inspect-shared-worker-by-id",{...this.identity,workerId:e})}async inspectServiceWorker(){await this.wire.sendAction("inspect-service-worker",{...this.identity})}async showPopupWindow(e){if(this.wire.sendAction(`${this.entityType}-show-popup-window`,this.identity).catch((()=>{})),e?.onPopupReady){const t=async({popupName:t})=>{try{const n=this.fin.Window.wrapSync({uuid:this.fin.me.uuid,name:t});await e.onPopupReady(n)}catch(e){throw new Error(`Something went wrong during onPopupReady execution: ${e}`)}};await this.once("popup-ready",t)}const{payload:t}=await this.wire.sendAction("try-create-popup-window",{options:{...e,hasResultCallback:!!e?.onPopupResult,hasReadyCallback:!!e?.onPopupReady},...this.identity}),{data:{willOpen:n,options:i}}=t;n&&await this.fin.Window.create(i.initialOptions);if(e?.onPopupResult){const t=async t=>{await e.onPopupResult((e=>{const{name:t,uuid:n,result:i,data:r}=e,o={identity:{name:t,uuid:n},result:i};return r&&(o.data=r),o})(t))},n=async()=>{await this.removeListener("popup-result",t)};await this.on("popup-result",t),await this.once("popup-teardown",n)}const{payload:r}=await this.wire.sendAction("show-popup-window",{options:i,...this.identity});return r.data}}var U,V,z,K,q;function J(){return V||(V=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(function(){if($)return L;$=1,Object.defineProperty(L,"__esModule",{value:!0}),L.ViewModule=void 0;const e=d,t=O,n=J(),i=T;class r extends e.Base{async create(e){const{uuid:t}=this.wire.me;if(!e.name||"string"!=typeof e.name)throw new Error("Please provide a name property as a string in order to create a View.");return(0,i.handleDeprecatedWarnings)(e),this.wire.environment.childViews?await this.wire.environment.createChildContent({entityType:"view",options:{...e,uuid:t}}):await this.wire.sendAction("create-view",{...e,uuid:t}),this.wrapSync({uuid:t,name:e.name})}async wrap(e){this.wire.sendAction("view-wrap").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}wrapSync(e){this.wire.sendAction("view-wrap-sync").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}getCurrent(){if(this.wire.sendAction("view-get-current").catch((e=>{})),!this.wire.me.isView)throw new Error("You are not in a View context");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction("view-get-current-sync").catch((e=>{})),!this.wire.me.isView)throw new Error("You are not in a View context");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return L.ViewModule=r,L}(),e),n(function(){if(U)return B;var e;U=1,Object.defineProperty(B,"__esModule",{value:!0}),B.View=void 0;const t=g,n=G,i=H,r=ie();class o extends i.WebContents{constructor(i,o){super(i,o,"view"),this.identity=o,e.set(this,new n.Lazy((()=>this.fin.Platform.wrapSync(this.identity).getClient()))),this.attach=async e=>{await this.wire.sendAction("attach-view",{target:e,...this.identity})},this.destroy=async()=>{await this.wire.sendAction("destroy-view",{...this.identity})},this.show=async()=>{await this.wire.sendAction("show-view",{...this.identity})},this.showAt=async(e,t={})=>{await this.wire.sendAction("show-view-at",{bounds:e,...this.identity,options:t})},this.bringToFront=async()=>{await this.wire.sendAction("bring-view-to-front",{...this.identity})},this.hide=async()=>{await this.wire.sendAction("hide-view",{...this.identity})},this.setBounds=async e=>{await this.wire.sendAction("set-view-bounds",{bounds:e,...this.identity})},this.getBounds=async()=>(await this.wire.sendAction("get-view-bounds",{...this.identity})).payload.data,this.getInfo=async()=>(await this.wire.sendAction("get-view-info",{...this.identity})).payload.data,this.getParentLayout=async()=>(this.wire.sendAction("view-get-parent-layout",{...this.identity}).catch((()=>{})),this.fin.Platform.Layout.getLayoutByViewIdentity(this.identity)),this.getOptions=async()=>this.wire.sendAction("get-view-options",{...this.identity}).then((({payload:e})=>e.data)),this.updateOptions=async e=>this.wire.sendAction("update-view-options",{options:e,...this.identity}).then((()=>{})),this.getCurrentWindow=async()=>{const{payload:{data:e}}=await this.wire.sendAction("get-view-window",{...this.identity});return new r._Window(this.wire,e)},this.getCurrentStack=async()=>{this.wire.sendAction("view-get-current-stack").catch((()=>{}));try{return(await this.getParentLayout()).getStackByViewIdentity(this.identity)}catch(e){throw new t.RuntimeError({reason:"This view does not belong to a stack.",error:e})}},this.triggerBeforeUnload=async()=>(await this.wire.sendAction("trigger-before-unload",{...this.identity})).payload.data,this.bindToElement=async e=>{if(!e)throw new Error("Element not found.");return this.wire.environment.observeBounds(e,(async e=>this.setBounds(e)))}}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){const t=await this.getCurrentWindow();await t.focusedWebViewWasChanged(),await super.focus({emitSynthFocused:e})}}return B.View=o,e=new WeakMap,B}(),e)}(k)),k}function Y(){if(z)return j;z=1,Object.defineProperty(j,"__esModule",{value:!0}),j.Application=void 0;const e=d,t=ie(),n=J();class i extends e.EmitterBase{constructor(e,n){super(e,"application",n.uuid),this.identity=n,this.window=new t._Window(this.wire,{uuid:this.identity.uuid,name:this.identity.uuid})}windowListFromIdentityList(e){const n=[];return e.forEach((e=>{n.push(new t._Window(this.wire,{uuid:e.uuid,name:e.name}))})),n}isRunning(){return this.wire.sendAction("is-application-running",this.identity).then((({payload:e})=>e.data))}async quit(e=!1){try{await this._close(e),await this.wire.sendAction("destroy-application",{force:e,...this.identity})}catch(e){if(!["Remote connection has closed","Could not locate the requested application"].some((t=>e.message.includes(t))))throw e}}async _close(e=!1){try{await this.wire.sendAction("close-application",{force:e,...this.identity})}catch(e){if(!e.message.includes("Remote connection has closed"))throw e}}close(e=!1){return console.warn("Deprecation Warning: Application.close is deprecated Please use Application.quit"),this.wire.sendAction("application-close",this.identity).catch((e=>{})),this._close(e)}getChildWindows(){return this.wire.sendAction("get-child-windows",this.identity).then((({payload:e})=>{const t=[];return e.data.forEach((e=>{t.push({uuid:this.identity.uuid,name:e})})),this.windowListFromIdentityList(t)}))}getManifest(){return this.wire.sendAction("get-application-manifest",this.identity).then((({payload:e})=>e.data))}getParentUuid(){return this.wire.sendAction("get-parent-application",this.identity).then((({payload:e})=>e.data))}getShortcuts(){return this.wire.sendAction("get-shortcuts",this.identity).then((({payload:e})=>e.data))}async getViews(){const{payload:e}=await this.wire.sendAction("application-get-views",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}getZoomLevel(){return this.wire.sendAction("get-application-zoom-level",this.identity).then((({payload:e})=>e.data))}getWindow(){return this.wire.sendAction("application-get-window",this.identity).catch((e=>{})),Promise.resolve(this.window)}registerUser(e,t){return this.wire.sendAction("register-user",{userName:e,appName:t,...this.identity}).then((()=>{}))}removeTrayIcon(){return this.wire.sendAction("remove-tray-icon",this.identity).then((()=>{}))}restart(){return this.wire.sendAction("restart-application",this.identity).then((()=>{}))}run(){return console.warn("Deprecation Warning: Application.run is deprecated Please use fin.Application.start"),this.wire.sendAction("application-run",this.identity).catch((e=>{})),this._run()}_run(e={}){return this.wire.sendAction("run-application",{manifestUrl:this._manifestUrl,opts:e,...this.identity}).then((()=>{}))}scheduleRestart(){return this.wire.sendAction("relaunch-on-close",this.identity).then((()=>{}))}async sendApplicationLog(){const{payload:e}=await this.wire.sendAction("send-application-log",this.identity);return e.data}async setJumpList(e){await this.wire.sendAction("set-jump-list",{config:e,...this.identity})}setTrayIcon(e){return this.wire.sendAction("set-tray-icon",{enabledIcon:e,...this.identity}).then((()=>{}))}setShortcuts(e){return this.wire.sendAction("set-shortcuts",{data:e,...this.identity}).then((()=>{}))}async setShortcutQueryParams(e){await this.wire.sendAction("set-shortcut-query-args",{data:e,...this.identity})}setZoomLevel(e){return this.wire.sendAction("set-application-zoom-level",{level:e,...this.identity}).then((()=>{}))}async setAppLogUsername(e){await this.wire.sendAction("set-app-log-username",{data:e,...this.identity})}getTrayIconInfo(){return this.wire.sendAction("get-tray-icon-info",this.identity).then((({payload:e})=>e.data))}hasTrayIcon(){return this.wire.sendAction("has-tray-icon",this.identity).then((({payload:e})=>e.data))}terminate(){return this.wire.sendAction("terminate-application",this.identity).then((()=>{}))}wait(){return this.wire.sendAction("wait-for-hung-application",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction("get-info",this.identity).then((({payload:e})=>e.data))}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction("application-get-process-info",this.identity);return e}async setFileDownloadLocation(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t};await this.wire.sendAction("set-file-download-location",{...n,downloadLocation:e})}async getFileDownloadLocation(){const{payload:{data:e}}=await this.wire.sendAction("get-file-download-location",this.identity);return e}async showTrayIconPopupMenu(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t},{payload:i}=await this.wire.sendAction("show-tray-icon-popup-menu",{...n,options:e});return i.data}async closeTrayIconPopupMenu(){const{name:e}=this.wire.me,t={uuid:this.identity.uuid,name:e};await this.wire.sendAction("close-tray-icon-popup-menu",{...t})}}return j.Application=i,j}function Z(){return q||(q=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(function(){if(K)return F;K=1,Object.defineProperty(F,"__esModule",{value:!0}),F.ApplicationModule=void 0;const e=d,t=O,n=Y();class i extends e.Base{async wrap(e){this.wire.sendAction("wrap-application").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}wrapSync(e){this.wire.sendAction("wrap-application-sync").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}async _create(e){return void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&void 0===e.isPlatformController&&(e.autoShow=!0),await this.wire.sendAction("create-application",e),this.wrap({uuid:e.uuid})}create(e){return console.warn("Deprecation Warning: fin.Application.create is deprecated. Please use fin.Application.start"),this.wire.sendAction("application-create").catch((e=>{})),this._create(e)}async start(e){this.wire.sendAction("start-application").catch((e=>{}));const t=await this._create(e);return await this.wire.sendAction("run-application",{uuid:e.uuid}),t}async startManyManifests(e,t){return this.wire.sendAction("run-applications",{applications:e,opts:t}).then((()=>{}))}getCurrent(){return this.wire.sendAction("get-current-application").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction("get-current-application-sync").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}async startFromManifest(e,t){this.wire.sendAction("application-start-from-manifest").catch((e=>{}));const n=await this._createFromManifest(e);return await n._run(t),n}createFromManifest(e){return console.warn("Deprecation Warning: fin.Application.createFromManifest is deprecated. Please use fin.Application.startFromManifest"),this.wire.sendAction("application-create-from-manifest").catch((e=>{})),this._createFromManifest(e)}_createFromManifest(e){return this.wire.sendAction("get-application-manifest",{manifestUrl:e}).then((({payload:e})=>{const t=e.data.platform?e.data.platform.uuid:e.data.startup_app.uuid;return this.wrap({uuid:t})})).then((t=>(t._manifestUrl=e,t)))}}return F.ApplicationModule=i,F}(),e),n(Y(),e)}(R)),R}H.WebContents=D;var Q={};Object.defineProperty(Q,"__esModule",{value:!0}),Q.promisifySubscription=void 0;var X,ee,te;function ne(){if(X)return S;X=1,Object.defineProperty(S,"__esModule",{value:!0}),S._Window=void 0;const e=Z(),t=H,n=J(),i=T,r=Q;class o extends t.WebContents{constructor(e,t){super(e,t,"window")}async createWindow(e){this.wire.sendAction("window-create-window",this.identity).catch((e=>{}));const t=await(0,r.promisifySubscription)(this,"fire-constructor-callback");void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&(e.autoShow=!0),(0,i.handleDeprecatedWarnings)(e);const n=this.wire.environment.createChildContent({entityType:"window",options:e}),[o]=await Promise.all([t.getValue(),n]);let s;const{success:a}=o,c=o.data,{message:d}=c;s=a?{httpResponseCode:c.httpResponseCode,apiInjected:c.apiInjected}:{message:c.message,networkErrorCode:c.networkErrorCode,stack:c.stack};const h={message:d,cbPayload:s,success:a};try{this.getWebWindow().fin.__internal_.openerSuccessCBCalled()}catch(e){}return h.success?this:Promise.reject(h)}getAllFrames(){return this.wire.sendAction("get-all-frames",this.identity).then((({payload:e})=>e.data))}getBounds(){return this.wire.sendAction("get-window-bounds",this.identity).then((({payload:e})=>e.data))}center(){return this.wire.sendAction("center-window",this.identity).then((()=>{}))}blur(){return this.wire.sendAction("blur-window",this.identity).then((()=>{}))}bringToFront(){return this.wire.sendAction("bring-window-to-front",this.identity).then((()=>{}))}animate(e,t){return this.wire.sendAction("animate-window",{transitions:e,options:t,...this.identity}).then((()=>{}))}hide(){return this.wire.sendAction("hide-window",this.identity).then((()=>{}))}close(e=!1){return this.wire.sendAction("close-window",{force:e,...this.identity}).then((()=>{Object.setPrototypeOf(this,null)}))}focusedWebViewWasChanged(){return this.wire.sendAction("focused-webview-changed",this.identity).then((()=>{}))}getNativeId(){return this.wire.sendAction("get-window-native-id",this.identity).then((({payload:e})=>e.data))}async getCurrentViews(){const{payload:e}=await this.wire.sendAction("window-get-views",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}disableFrame(){return console.warn("Function is deprecated; use disableUserMovement instead."),this.wire.sendAction("disable-window-frame",this.identity).then((()=>{}))}disableUserMovement(){return this.wire.sendAction("disable-window-frame",this.identity).then((()=>{}))}enableFrame(){return console.warn("Function is deprecated; use enableUserMovement instead."),this.wire.sendAction("enable-window-frame",this.identity).then((()=>{}))}enableUserMovement(){return this.wire.sendAction("enable-window-frame",this.identity).then((()=>{}))}flash(){return this.wire.sendAction("flash-window",this.identity).then((()=>{}))}stopFlashing(){return this.wire.sendAction("stop-flash-window",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction("get-window-info",this.identity).then((({payload:e})=>e.data))}async getLayout(e){this.wire.sendAction("window-get-layout",this.identity).catch((e=>{}));const t=await this.getOptions();if(!t.layout&&!t.layoutSnapshot)throw new Error("Window does not have a Layout");return this.fin.Platform.Layout.wrap(e??this.identity)}getOptions(){return this.wire.sendAction("get-window-options",this.identity).then((({payload:e})=>e.data))}getParentApplication(){return this.wire.sendAction("window-get-parent-application",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity))}getParentWindow(){return this.wire.sendAction("window-get-parent-window",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity)).then((e=>e.getWindow()))}async getSnapshot(e){const t={area:e,...this.identity};console.warn("Window.getSnapshot has been deprecated, please use Window.capturePage");return(await this.wire.sendAction("get-window-snapshot",t)).payload.data}getState(){return this.wire.sendAction("get-window-state",this.identity).then((({payload:e})=>e.data))}getWebWindow(){return this.wire.sendAction("window-get-web-window",this.identity).catch((e=>{})),this.wire.environment.getWebWindow(this.identity)}isMainWindow(){return this.wire.sendAction("window-is-main-window",this.identity).catch((e=>{})),this.me.uuid===this.me.name}isShowing(){return this.wire.sendAction("is-window-showing",this.identity).then((({payload:e})=>e.data))}maximize(){return this.wire.sendAction("maximize-window",this.identity).then((()=>{}))}minimize(){return this.wire.sendAction("minimize-window",this.identity).then((()=>{}))}moveBy(e,t,n){return this.wire.sendAction("move-window-by",{deltaLeft:e,deltaTop:t,positioningOptions:n,...this.identity}).then((()=>{}))}moveTo(e,t,n){return this.wire.sendAction("move-window",{left:e,top:t,positioningOptions:n,...this.identity}).then((()=>{}))}resizeBy(e,t,n,i){return this.wire.sendAction("resize-window-by",{deltaWidth:Math.floor(e),deltaHeight:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}resizeTo(e,t,n,i){return this.wire.sendAction("resize-window",{width:Math.floor(e),height:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}restore(){return this.wire.sendAction("restore-window",this.identity).then((()=>{}))}setAsForeground(){return this.wire.sendAction("set-foreground-window",this.identity).then((()=>{}))}setBounds(e,t){return this.wire.sendAction("set-window-bounds",{...e,...this.identity,positioningOptions:t}).then((()=>{}))}show(e=!1){return this.wire.sendAction("show-window",{force:e,...this.identity}).then((()=>{}))}showAt(e,t,n=!1){return this.wire.sendAction("show-at-window",{force:n,left:Math.floor(e),top:Math.floor(t),...this.identity}).then((()=>{}))}updateOptions(e){return this.wire.sendAction("update-window-options",{options:e,...this.identity}).then((()=>{}))}authenticate(e,t){return this.wire.sendAction("window-authenticate",{userName:e,password:t,...this.identity}).then((()=>{}))}async showPopupMenu(e){const{payload:t}=await this.wire.sendAction("show-popup-menu",{options:e,...this.identity});return t.data}async closePopupMenu(){return this.wire.sendAction("close-popup-menu",{...this.identity}).then((()=>{}))}async dispatchPopupResult(e){this.wire.sendAction("window-dispatch-popup-result",this.identity).catch((e=>{})),await this.wire.sendAction("dispatch-popup-result",{data:e,...this.identity})}async print(e={content:"self"}){switch(e.content){case void 0:case"self":return super.print(e);case"screenshot":return this.wire.sendAction("print-screenshot",this.identity).then((()=>{}));case"views":return this.wire.sendAction("print-views",{...this.identity,options:e}).then((()=>{}));default:return}}}return S._Window=o,S}function ie(){return te||(te=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(function(){if(ee)return _;ee=1,Object.defineProperty(_,"__esModule",{value:!0}),_._WindowModule=void 0;const e=d,t=O,n=ne();class i extends e.Base{async wrap(e){this.wire.sendAction("window-wrap").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}wrapSync(e){this.wire.sendAction("window-wrap-sync").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}create(e){return this.wire.sendAction("create-window").catch((e=>{})),new n._Window(this.wire,{uuid:this.me.uuid,name:e.name}).createWindow(e)}getCurrent(){if(this.wire.sendAction("get-current-window").catch((e=>{})),!this.wire.me.isWindow)throw new Error("You are not in a Window context");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction("get-current-window-sync").catch((e=>{})),!this.wire.me.isWindow)throw new Error("You are not in a Window context");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return _._WindowModule=i,_}(),e),n(ne(),e)}(M)),M}Q.promisifySubscription=async(e,t,n=(()=>!0),i)=>{let r,o,s;const a=new Promise(((e,t)=>{r=e,o=t})),c=e=>{n(e)&&(clearTimeout(s),r(e))};return await e.on(t,c),i&&(s=setTimeout((()=>o(new Error("event timed out"))),i)),a.finally((()=>{e.removeListener(t,c).catch((()=>null))})),{getValue:()=>a}},Object.defineProperty(c,"__esModule",{value:!0}),c.System=void 0;const re=d,oe=g,se=ie(),ae=t;class ce extends re.EmitterBase{constructor(e){super(e,"system")}sendExternalProcessRequest(e,t){return new Promise(((n,i)=>{const r="external-process-exited";let o,s,a,c;"function"==typeof t.listener&&(a=e=>{const n=e||{};s={topic:"exited",uuid:n.processUuid||"",exitCode:n.exitCode||0},o===e.processUuid&&(t.listener(s),c.removeListener(r,a))},this.wire.me.name||(this.wire.me.name=this.wire.me.uuid),c=new se._Window(this.wire,this.wire.me),c.on(r,a)),this.wire.sendAction(e,t).then((({payload:e})=>{o=e.data.uuid,n(e.data),s&&o===s.uuid&&(t.listener(s),c.removeListener(r,a))})).catch((e=>{c&&c.removeListener(r,a),i(e)}))}))}getVersion(){return this.wire.sendAction("get-version").then((({payload:e})=>e.data))}clearCache(e){return this.wire.sendAction("clear-cache",e).then((()=>{}))}deleteCacheOnExit(){return this.wire.sendAction("delete-cache-request").then((()=>{}))}exit(){return this.wire.sendAction("exit-desktop").then((()=>{}))}async fetchManifest(e){const{payload:{data:t}}=await this.wire.sendAction("fetch-manifest",{manifestUrl:e});return t}flushCookieStore(){return this.wire.sendAction("flush-cookie-store").then((()=>{}))}getAllWindows(){return this.wire.sendAction("get-all-windows").then((({payload:e})=>e.data))}getAllApplications(){return this.wire.sendAction("get-all-applications").then((({payload:e})=>e.data))}getCommandLineArguments(){return this.wire.sendAction("get-command-line-arguments").then((({payload:e})=>e.data))}async getCrashReporterState(){const{payload:{data:{diagnosticMode:e,isRunning:t}}}=await this.wire.sendAction("get-crash-reporter-state");return console.warn("diagnosticMode property is deprecated. It will be removed in a future version"),{diagnosticMode:e,diagnosticsMode:e,isRunning:t}}async startCrashReporter(e){const t=e,n={...t,diagnosticMode:t.diagnosticsMode||t.diagnosticMode},{payload:{data:{diagnosticMode:i,isRunning:r}}}=await this.wire.sendAction("start-crash-reporter",n);return{diagnosticMode:i,diagnosticsMode:i,isRunning:r}}getUniqueUserId(){return this.wire.sendAction("get-unique-user-id").then((({payload:e})=>e.data))}getEntityInfo(e,t){return this.wire.sendAction("get-entity-info",{uuid:e,name:t}).then((({payload:e})=>e.data))}getEnvironmentVariable(e){return this.wire.sendAction("get-environment-variable",{environmentVariables:e}).then((({payload:e})=>e.data))}getFocusedWindow(){return this.wire.sendAction("get-focused-window").then((({payload:e})=>e.data))}async isAppCertified(e){const{payload:{data:{certifiedInfo:t}}}=await this.wire.sendAction("is-app-certified",{manifestUrl:e});return t}getInstalledRuntimes(){return this.wire.sendAction("get-installed-runtimes").then((({payload:e})=>e.data.runtimes))}async getInstalledApps(){const{payload:{data:{installedApps:e}}}=await this.wire.sendAction("get-installed-apps");return e}getLog(e){return this.wire.sendAction("view-log",e).then((({payload:e})=>e.data))}getMachineId(){return this.wire.sendAction("get-machine-id").then((({payload:e})=>e.data))}getMinLogLevel(){return this.wire.sendAction("get-min-log-level").then((({payload:e})=>e.data))}getLogList(){return this.wire.sendAction("list-logs").then((({payload:e})=>e.data))}getMonitorInfo(){return this.wire.sendAction("get-monitor-info").then((({payload:e})=>e.data))}getMousePosition(){return this.wire.sendAction("get-mouse-position").then((({payload:e})=>e.data))}getProcessList(){return console.warn("System.getProcessList has been deprecated. Please consider using our new process APIs: Window.getProcessInfo, View.getProcessInfo, Application.getProcessInfo, System.getAllProcessInfo"),this.wire.sendAction("process-snapshot").then((({payload:e})=>e.data))}async getAllProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction("get-all-process-info",this.identity);return e}getProxySettings(){return this.wire.sendAction("get-proxy-settings").then((({payload:e})=>e.data))}getRuntimeInfo(){return this.wire.sendAction("get-runtime-info").then((({payload:e})=>e.data))}getRvmInfo(){return this.wire.sendAction("get-rvm-info").then((({payload:e})=>e.data))}getHostSpecs(){return this.wire.sendAction("get-host-specs").then((({payload:e})=>e.data))}getOSInfo(){return this.wire.sendAction("get-os-info").then((({payload:e})=>e.data))}launchExternalProcess(e){return this.sendExternalProcessRequest("launch-external-process",e)}monitorExternalProcess(e){return this.sendExternalProcessRequest("monitor-external-process",e)}log(e,t){return this.wire.sendAction("write-to-log",{level:e,message:t}).then((()=>{}))}openUrlWithBrowser(e){return this.wire.sendAction("open-url-with-browser",{url:e}).then((()=>{}))}async registerCustomProtocol(e){if("object"!=typeof e)throw new Error("Must provide an object with a `protocolName` property having a string value.");await this.wire.sendAction("register-custom-protocol",e)}async unregisterCustomProtocol(e){await this.wire.sendAction("unregister-custom-protocol",{protocolName:e})}async getCustomProtocolState(e){return this.wire.sendAction("get-custom-protocol-state",{protocolName:e}).then((({payload:e})=>e.data))}releaseExternalProcess(e){return this.wire.sendAction("release-external-process",{uuid:e}).then((()=>{}))}showDeveloperTools(e){return this.wire.sendAction("show-developer-tools",e).then((()=>{}))}terminateExternalProcess(e){return this.wire.sendAction("terminate-external-process",e).then((()=>{}))}updateProxySettings(e){return this.wire.sendAction("update-proxy",e).then((()=>{}))}async downloadAsset(e,t){const n=()=>{};let i=n,r=n;const o=new Promise(((e,t)=>{i=e,r=t}));if("openfin"!==this.wire.environment.type)throw new oe.NotSupportedError("downloadAsset only supported in an OpenFin Render process");const s=oe.RuntimeError.getCallSite(),a=this.wire.environment.getNextMessageId().toString(),c=`asset-download-progress-${a}`,d=`asset-download-error-${a}`,h=`asset-download-complete-${a}`,l=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},u=()=>{this.removeListener(c,l)};await Promise.all([this.on(c,l),this.once(d,(e=>{u();const{reason:t,err:n}=e;r(new oe.RuntimeError({reason:t,error:n},s))})),this.once(h,(()=>{u(),i()}))]);const p=Object.assign(e,{downloadId:a});return await this.wire.sendAction("download-asset",p).catch((e=>{throw u(),e})),o}downloadRuntime(e,t){const n=oe.RuntimeError.getCallSite();return new Promise(((i,r)=>{if("openfin"!==this.wire.environment.type)return void r(new oe.NotSupportedError("downloadRuntime only supported in an OpenFin Render process"));const o=this.wire.environment.getNextMessageId().toString(),s=`runtime-download-progress-${o}`,a=`runtime-download-error-${o}`,c=`runtime-download-complete-${o}`,d=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},h=()=>{this.removeListener(s,d)};this.on(s,d),this.once(a,(e=>{h();const{reason:t,err:i}=e;r(new oe.RuntimeError({reason:t,error:i},n))})),this.once(c,(()=>{h(),i()}));const l=Object.assign(e,{downloadId:o});this.wire.sendAction("download-runtime",l).catch((e=>{h(),r(e)}))}))}downloadPreloadScripts(e){return this.wire.sendAction("download-preload-scripts",{scripts:e}).then((({payload:e})=>e.data))}getAllExternalApplications(){return this.wire.sendAction("get-all-external-applications").then((({payload:e})=>e.data))}getAppAssetInfo(e){return this.wire.sendAction("get-app-asset-info",e).then((({payload:e})=>e.data))}getCookies(e){const t=this.wire.environment.getUrl(),n=Object.assign(e,{url:t});return this.wire.sendAction("get-cookies",n).then((({payload:e})=>e.data))}setMinLogLevel(e){return this.wire.sendAction("set-min-log-level",{level:e}).then((()=>{}))}resolveUuid(e){return this.wire.sendAction("resolve-uuid",{entityKey:e}).then((({payload:e})=>e.data))}executeOnRemote(e,t){return t.requestingIdentity=e,this.wire.ferryAction(t)}readRegistryValue(e,t,n){return this.wire.sendAction("read-registry-value",{rootKey:e,subkey:t,value:n}).then((({payload:e})=>e.data))}registerExternalConnection(e){return this.wire.sendAction("register-external-connection",{uuid:e}).then((({payload:e})=>e.data))}async getServiceConfiguration(e){if("string"!=typeof e.name)throw new Error("Must provide an object with a `name` property having a string value");const{name:t}=e;return this.wire.sendAction("get-service-configuration",{name:t}).then((({payload:e})=>e.data))}async getSystemAppConfig(e){if("string"!=typeof e)throw new Error("Must provide a string value for name of system app");return this.wire.sendAction("get-system-app-configuration",{name:e}).then((({payload:e})=>e.data))}async registerShutdownHandler(e){this.wire.sendAction("system-register-shutdown-handler").catch((e=>{}));const{uuid:t,name:n}=this.wire.me;this.on("system-shutdown",(i=>{e({proceed:()=>{this.wire.environment.raiseEvent("application/system-shutdown-handled",{uuid:t,name:n,topic:"application"})}})}))}runRvmHealthCheck(){return this.wire.sendAction("run-rvm-health-check").then((({payload:e})=>e.data))}async launchManifest(e,t={}){const{subscribe:n,...i}=t,r=i;if(n){const e=new ae.EventEmitter;n(e);const t="app-version-progress",i="runtime-status",o="app-version-complete",s="app-version-error",a=this.wire.environment.getNextMessageId().toString();r.appVersionId=a;const c=[o,t,i,s],d=e=>{const{appVersionId:t,topic:n,type:i,...r}=e;return{...r,type:c.find((e=>i.includes(e)))}},h=t=>{const n=d(t);e.emit(n.type,n)},l=()=>{this.removeListener(`${t}.${a}`,h),this.removeListener(`${i}.${a}`,h),this.removeListener(`${o}.${a}`,h),this.removeListener(`${s}.${a}`,h),this.removeListener(`${o}.${a}`,l),this.removeListener(`${s}.${a}`,l)};await Promise.all([this.on(`${t}.${a}`,h),this.on(`${i}.${a}`,h),this.once(`${o}.${a}`,h),this.once(`${s}.${a}`,h),this.once(`${o}.${a}`,l),this.once(`${s}.${a}`,l)])}return(await this.wire.sendAction("launch-manifest",{manifestUrl:e,opts:r})).payload.data.manifest}async queryPermissionForCurrentContext(e){const t={uuid:this.wire.me.uuid,name:this.wire.me.name};return(await this.wire.sendAction("query-permission-for-current-context",{apiName:e,identity:t})).payload.data}async enableNativeWindowIntegrationProvider(e){const{payload:t}=await this.wire.sendAction("enable-native-window-integration-provider",{permissions:e});return t.data}async registerUsage({data:e,type:t}){await this.wire.sendAction("register-usage",{data:e,type:t})}async getPrinters(){const{payload:e}=await this.wire.sendAction("system-get-printers");return e.data}async updateProcessLoggingOptions(e){await this.wire.sendAction("system-update-process-logging-options",{options:e})}async getDomainSettings(){const{payload:{data:e}}=await this.wire.sendAction("get-domain-settings",this.identity);return e}async setDomainSettings(e){await this.wire.sendAction("set-domain-settings",{domainSettings:e,...this.identity})}async refreshExtensions(){const{payload:e}=await this.wire.sendAction("refresh-extensions");return e.data}async getInstalledExtensions(){const{payload:e}=await this.wire.sendAction("get-installed-extensions");return e.data}}c.System=ce;var de={},he={};Object.defineProperty(he,"__esModule",{value:!0}),he.RefCounter=void 0;he.RefCounter=class{constructor(){this.topicRefMap=new Map}incRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t+1;n=i,this.topicRefMap.set(e,i)}else this.topicRefMap.set(e,1),n=1;return n}decRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t-1;this.topicRefMap.set(e,i),n=i}else n=-1;return n}actOnFirst(e,t,n){return 1===this.incRefCount(e)?t():n()}actOnLast(e,t,n){return 0===this.decRefCount(e)?t():n()}};var le={},ue={},pe={};Object.defineProperty(pe,"__esModule",{value:!0}),pe.ChannelBase=pe.ProtectedItems=void 0;const we=e=>async(t,n,i)=>{const r=await e(t,n,i);return void 0===r?n:r};pe.ProtectedItems=class{constructor(e,t){this.providerIdentity=e,this.close=t}};class ye{static defaultAction(e){throw new Error(`No action registered at target for ${e}`)}constructor(){this.subscriptions=new Map}async processAction(e,t,n){try{const i=this.subscriptions.has(e)?this.subscriptions.get(e):(t,n)=>(this.defaultAction??ye.defaultAction)(e,t,n),r=this.preAction?await this.preAction(e,t,n):t,o=await i(r,n);return this.postAction?await this.postAction(e,o,n):o}catch(t){if(this.errorMiddleware)return this.errorMiddleware(e,t,n);throw t}}beforeAction(e){if(this.preAction)throw new Error("Already registered beforeAction middleware");this.preAction=we(e)}onError(e){if(this.errorMiddleware)throw new Error("Already registered error middleware");this.errorMiddleware=e}afterAction(e){if(this.postAction)throw new Error("Already registered afterAction middleware");this.postAction=we(e)}remove(e){this.subscriptions.delete(e)}setDefaultAction(e){if(this.defaultAction)throw new Error("default action can only be set once");this.defaultAction=e}register(e,t){if(this.subscriptions.has(e))throw new Error(`Subscription already registered for action: ${e}. Unsubscribe before adding new subscription`);return this.subscriptions.set(e,t),!0}}pe.ChannelBase=ye;var fe,ge,me,ve=s&&s.__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)},Ce=s&&s.__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};Object.defineProperty(ue,"__esModule",{value:!0}),ue.ChannelClient=void 0;const be=pe,Ie=new Map;class Ee extends be.ChannelBase{static closeChannelByEndpointId(e){const t=Ie.get(e);t&&ve(t,me,"f").call(t)}static handleProviderDisconnect(e){for(const t of Ie.values())t.providerIdentity.channelId===e.channelId&&(t.disconnectListener(e),ve(t,me,"f").call(t))}constructor(e,t,n){super(),fe.set(this,void 0),ge.set(this,void 0),this.processAction=(e,t,n)=>super.processAction(e,t,n),me.set(this,(()=>{Ie.delete(this.endpointId),ve(this,ge,"f").close()})),Ce(this,fe,new be.ProtectedItems(e,t),"f"),this.disconnectListener=()=>{},this.endpointId=e.endpointId,Ce(this,ge,n,"f"),Ie.set(this.endpointId,this),n.receive(this.processAction)}get providerIdentity(){return ve(this,fe,"f").providerIdentity}async dispatch(e,t){if(ve(this,ge,"f").isEndpointConnected(this.providerIdentity.channelId))return ve(this,ge,"f").send(this.providerIdentity.channelId,e,t);throw new Error("The client you are trying to dispatch from is disconnected from the target provider.")}onDisconnection(e){this.disconnectListener=t=>{try{e(t)}catch(e){throw new Error(`Error while calling the onDisconnection callback: ${e.message}`)}finally{this.disconnectListener=()=>{}}}}async disconnect(){await this.sendDisconnectAction(),ve(this,me,"f").call(this)}async sendDisconnectAction(){const e=ve(this,fe,"f");await e.close()}static async wireClose(e,t,n){const{channelName:i,uuid:r,name:o}=t;await e.sendAction("disconnect-from-channel",{channelName:i,uuid:r,name:o,endpointId:n})}}ue.ChannelClient=Ee,fe=new WeakMap,ge=new WeakMap,me=new WeakMap;var xe={},Ae={};Object.defineProperty(Ae,"__esModule",{value:!0}),Ae.exhaustiveCheck=void 0,Ae.exhaustiveCheck=function(e,t){throw new Error(`Unsupported value: ${e}${t?`\n Supported values are: ${t.join("")}`:""}`)};var Pe,Me,_e,Oe={},Se=s&&s.__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},Re=s&&s.__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)};Object.defineProperty(Oe,"__esModule",{value:!0}),Oe.ClassicInfo=Oe.ClassicStrategy=void 0;Oe.ClassicStrategy=class{constructor(e,t,n,i){this.messageReceiver=t,this.endpointId=n,this.providerIdentity=i,Pe.set(this,void 0),Me.set(this,new Map),_e.set(this,new Map),this.send=async(e,t,n)=>{const i=Re(this,Me,"f").get(e);if(!i)throw new Error(`Could not locate routing info for endpoint ${e}`);const r={...i};r.isLocalEndpointId&&delete r.endpointId,delete r.isLocalEndpointId;const o=Re(this,Pe,"f").sendAction("send-channel-message",{...r,providerIdentity:this.providerIdentity,action:t,payload:n});Re(this,_e,"f").get(e)?.add(o);return(await o.catch((e=>{throw new Error(e.message)})).finally((()=>{Re(this,_e,"f").get(e)?.delete(o)}))).payload.data.result},this.close=async()=>{this.messageReceiver.removeEndpoint(this.providerIdentity.channelId,this.endpointId),[...Re(this,Me,"f").keys()].forEach((e=>this.closeEndpoint(e))),Se(this,Me,new Map,"f")},Se(this,Pe,e,"f")}onEndpointDisconnect(e,t){}receive(e){this.messageReceiver.addEndpoint(e,this.providerIdentity.channelId,this.endpointId)}async closeEndpoint(e){const t=Re(this,Me,"f").get(e);Re(this,Me,"f").delete(e);const n=Re(this,_e,"f").get(e);n?.forEach((n=>{const i=`Channel connection with identity uuid: ${t?.uuid} / name: ${t?.name} / endpointId: ${e} no longer connected.`;n.cancel(new Error(i))}))}isEndpointConnected(e){return Re(this,Me,"f").has(e)}addEndpoint(e,t){Re(this,Me,"f").set(e,t.endpointIdentity),Re(this,_e,"f").set(e,new Set)}isValidEndpointPayload(e){return"string"==typeof e?.endpointIdentity?.endpointId||"string"==typeof e?.endpointIdentity?.channelId}},Pe=new WeakMap,Me=new WeakMap,_e=new WeakMap,Oe.ClassicInfo={version:5,minimumVersion:0,type:"classic"};var Fe={},je={},ke={};Object.defineProperty(ke,"__esModule",{value:!0}),ke.errorToPOJO=void 0,ke.errorToPOJO=function(e){return{stack:e.stack,name:e.name,message:e.message,toString:()=>e.stack||e.toString()}};var Le,Te,$e=s&&s.__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)},Be=s&&s.__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};Object.defineProperty(je,"__esModule",{value:!0}),je.RTCEndpoint=void 0;const Ge=ke;je.RTCEndpoint=class{static isValidEndpointPayload(e){const t=e=>"object"==typeof e&&null!==e;return t(e)&&t(e.endpointIdentity)&&t(e.rtc)&&"string"==typeof e.endpointIdentity.endpointId}constructor({rtc:e,endpointIdentity:t}){this.responseMap=new Map,Le.set(this,null),Te.set(this,void 0),this.connectionStateChangeHandler=e=>{"connected"!==this.rtc.rtcClient.connectionState&&(this.rtc.rtcClient.removeEventListener("connectionstatechange",this.connectionStateChangeHandler),this.close(),$e(this,Te,"f")&&$e(this,Te,"f").call(this))},this.send=async(e,t)=>{const n=`message-${Math.random()}`,i=new Promise(((e,t)=>{this.responseMap.set(n,{resolve:e,reject:t})}));return this.rtc.channels.request.send(JSON.stringify({action:e,payload:t,messageId:n})),i},this.close=()=>{this.responseMap.forEach((e=>e.reject("Connection has closed."))),this.responseMap=new Map,this.rtc.channels.request.close(),this.rtc.channels.response.close(),this.rtc.rtcClient.close()},this.rtc=e,this.endpointIdentity=t,this.rtc.channels.response.addEventListener("message",(e=>{let{data:t}=e;e.data instanceof ArrayBuffer&&(t=(new TextDecoder).decode(e.data));const{messageId:n,payload:i,success:r,error:o}=JSON.parse(t),{resolve:s,reject:a}=this.responseMap.get(n)??{};s&&a?(this.responseMap.delete(n),r?s(i):a(o)):(console.log("Could not find id in responseMap."),console.log(e))})),this.rtc.channels.request.addEventListener("message",(async e=>{let{data:n}=e;e.data instanceof ArrayBuffer&&(n=(new TextDecoder).decode(e.data));const{messageId:i,action:r,payload:o}=JSON.parse(n);if($e(this,Le,"f"))try{const e=await $e(this,Le,"f").call(this,r,o,t);this.rtc.channels.response.send(JSON.stringify({messageId:i,payload:e,success:!0}))}catch(e){"open"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,error:(0,Ge.errorToPOJO)(e),success:!1}))}else"open"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,success:!1,error:"Connection not ready."}))})),this.rtc.rtcClient.addEventListener("connectionstatechange",this.connectionStateChangeHandler),Object.values(this.rtc.channels).forEach((e=>{e.onclose=e=>{[...this.responseMap.values()].forEach((e=>e.reject(new Error("RTCDataChannel closed unexpectedly, this is most commonly caused by message size. Note: RTC Channels have a message size limit of ~255kB.")))),this.close(),$e(this,Te,"f")&&$e(this,Te,"f").call(this)}}))}onDisconnect(e){if($e(this,Te,"f"))throw new Error("RTCEndpoint disconnectListener cannot be set twice.");Be(this,Te,e,"f")}receive(e){if($e(this,Le,"f"))throw new Error("You have already set a listener for this RTC Endpoint.");Be(this,Le,e,"f")}get connected(){return"connected"===this.rtc.rtcClient.connectionState}},Le=new WeakMap,Te=new WeakMap;var We,He,Ne,De={},Ue=s&&s.__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)},Ve=s&&s.__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};Object.defineProperty(De,"__esModule",{value:!0}),De.EndpointStrategy=void 0;De.EndpointStrategy=class{constructor(e,t,n){this.EndpointType=e,this.StrategyName=n,We.set(this,null),He.set(this,new Map),Ne.set(this,!0),this.send=async(e,t,n)=>this.getEndpointById(e).send(t,n),this.close=async()=>{Ue(this,Ne,"f")&&(Ue(this,He,"f").forEach((e=>e.close())),Ve(this,He,new Map,"f")),Ve(this,Ne,!1,"f")},this.isValidEndpointPayload=t}onEndpointDisconnect(e,t){this.getEndpointById(e).onDisconnect(t)}receive(e){if(Ue(this,We,"f"))throw new Error(`You have already set a listener for this ${this.StrategyName} Strategy`);Ve(this,We,e,"f"),Ue(this,He,"f").forEach((e=>e.receive(Ue(this,We,"f"))))}getEndpointById(e){const t=Ue(this,He,"f").get(e);if(!t)throw new Error(`Client with endpoint id ${e} is not connected`);return t}get connected(){return Ue(this,Ne,"f")}isEndpointConnected(e){return Ue(this,He,"f").has(e)}addEndpoint(e,t){if(!Ue(this,Ne,"f"))return void console.warn(`Adding endpoint to disconnected ${this.StrategyName} Strategy`);const n=new this.EndpointType(t);Ue(this,We,"f")&&n.receive(Ue(this,We,"f")),Ue(this,He,"f").set(e,n)}async closeEndpoint(e){Ue(this,He,"f").delete(e)}},We=new WeakMap,He=new WeakMap,Ne=new WeakMap,Object.defineProperty(Fe,"__esModule",{value:!0}),Fe.RTCInfo=Fe.RTCStrategy=void 0;const ze=je,Ke=De;class qe extends Ke.EndpointStrategy{constructor(){super(ze.RTCEndpoint,ze.RTCEndpoint.isValidEndpointPayload,"RTC")}}Fe.RTCStrategy=qe,Fe.RTCInfo={version:2,minimumVersion:0,type:"rtc"};var Je={};Object.defineProperty(Je,"__esModule",{value:!0}),Je.RTCICEManager=void 0;const Ye=d;class Ze extends Ye.EmitterBase{constructor(e){super(e,"channel"),this.ensureChannelOpened=e=>new Promise(((t,n)=>{if("open"===e.readyState)t();else if("connecting"===e.readyState){const n=()=>{e.removeEventListener("open",n),t()};e.addEventListener("open",n)}else n(new Error("This Channel has already closed"))}))}static createDataChannelPromise(e,t){let n;const i=new Promise((e=>{n=e})),r=i=>{const o=()=>{i.channel.removeEventListener("open",o),n(i.channel)};i.channel.label===e&&(i.channel.addEventListener("open",o),t.removeEventListener("datachannel",r))};return t.addEventListener("datachannel",r),i}async listenForProviderIce(e,t){await this.on(this.createProviderEventName(e),t,{timestamp:Date.now()})}async raiseProviderIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createProviderEventName(e)),t)}async listenForClientIce(e,t){await this.on(this.createClientEventName(e),t,{timestamp:Date.now()})}async raiseClientIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createClientEventName(e)),t)}cleanupIceListeners(e){this.removeAllListeners(this.createClientEventName(e)),this.removeAllListeners(this.createProviderEventName(e))}createClientEventName(e){return`ice-client-${e}`}createProviderEventName(e){return`ice-provider-${e}`}createRouteString(e){return`channel/${e}`}createRtcPeer(){return this.wire.environment.getRtcPeer()}async startClientOffer(){const e=Math.random().toString(),t=this.createRtcPeer();t.addEventListener("icecandidate",(async t=>{t.candidate&&await this.raiseClientIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForProviderIce(e,(async e=>{await t.addIceCandidate(e.candidate)}));const n={request:t.createDataChannel("request"),response:t.createDataChannel("response")},i=await t.createOffer();await t.setLocalDescription(i);const r=Promise.all([n.request,n.response].map(this.ensureChannelOpened)).then((()=>{}));return{rtcClient:t,channels:n,offer:i,rtcConnectionId:e,channelsOpened:r}}async finishClientOffer(e,t,n){return await e.setRemoteDescription(t),await n,!0}async createProviderAnswer(e,t){const n=this.createRtcPeer(),i=Ze.createDataChannelPromise("request",n),r=Ze.createDataChannelPromise("response",n);n.addEventListener("icecandidate",(async t=>{t.candidate&&await this.raiseProviderIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForClientIce(e,(async e=>{await n.addIceCandidate(e.candidate)})),await n.setRemoteDescription(t);const o=await n.createAnswer();await n.setLocalDescription(o);const s=Promise.all([i,r]).then((([t,n])=>(this.cleanupIceListeners(e),{request:t,response:n})));return{rtcClient:n,answer:o,channels:s}}}Je.RTCICEManager=Ze;var Qe={},Xe={};function et(e){return[...e.split(".").reverse().entries()].reduce(((e,[t,n])=>e+ +n*1e4**t),0)}function tt(e,t){return et(e)>=et(t)}function nt(e){return e.split("/")[0]}Object.defineProperty(Xe,"__esModule",{value:!0}),Xe.runtimeUuidMeetsMinimumRuntimeVersion=Xe.parseRuntimeUuid=Xe.meetsMinimumRuntimeVersion=void 0,Xe.meetsMinimumRuntimeVersion=tt,Xe.parseRuntimeUuid=nt,Xe.runtimeUuidMeetsMinimumRuntimeVersion=function(e,t){return tt(nt(e),t)};var it,rt,ot,st,at,ct=s&&s.__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)},dt=s&&s.__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};Object.defineProperty(Qe,"__esModule",{value:!0}),Qe.ChannelProvider=void 0;const ht=pe,lt=Xe;class ut extends ht.ChannelBase{get connections(){return[...ct(this,it,"f")]}static handleClientDisconnection(e,t){const n=e.connections.find((e=>e.endpointId===t.endpointId));if(n)ct(e,st,"f").call(e,n);else{e.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name)).forEach(ct(e,st,"f"))}e.disconnectListener(t)}static setProviderRemoval(e,t){ut.removalMap.set(e,t)}constructor(e,t,n){super(),it.set(this,void 0),rt.set(this,void 0),ot.set(this,void 0),st.set(this,(e=>{const t=this.connections.filter((t=>t.endpointId!==e.endpointId));ct(this,ot,"f").closeEndpoint(e.endpointId),dt(this,it,t,"f")})),this.processAction=async(e,t,n)=>(ut.clientIsMultiRuntime(n)&&!(0,lt.runtimeUuidMeetsMinimumRuntimeVersion)(n.runtimeUuid,"18.87.56.0")?this.handleMultiRuntimeLegacyClient(n):this.checkForClientConnection(n),super.processAction(e,t,n)),at.set(this,(()=>{ct(this,ot,"f").close();const e=ut.removalMap.get(this);e&&e()})),dt(this,rt,new ht.ProtectedItems(e,t),"f"),this.connectListener=()=>{},this.disconnectListener=()=>{},dt(this,it,[],"f"),dt(this,ot,n,"f"),n.receive(this.processAction)}dispatch(e,t,n){const i=e.endpointId??this.getEndpointIdForOpenFinId(e,t);return i&&ct(this,ot,"f").isEndpointConnected(i)?ct(this,ot,"f").send(i,t,n):Promise.reject(new Error(`Client connection with identity uuid: ${e.uuid} / name: ${e.name} / endpointId: ${i} no longer connected.`))}async processConnection(e,t){return ct(this,it,"f").push(e),this.connectListener(e,t)}publish(e,t){return this.connections.map((n=>ct(this,ot,"f").send(n.endpointId,e,t)))}onConnection(e){this.connectListener=e}onDisconnection(e){this.disconnectListener=e}async destroy(){const e=ct(this,rt,"f");e.providerIdentity,dt(this,it,[],"f"),await e.close(),ct(this,at,"f").call(this)}async getAllClientInfo(){return this.connections.map((e=>{const{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}=e;return{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}}))}checkForClientConnection(e){if(!this.isClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider.\n Client Identity: {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}isClientConnected(e){return ut.clientIdentityIncludesEndpointId(e)?this.connections.some((t=>t.endpointId===e.endpointId&&t.uuid===e.uuid&&t.name===e.name)):this.isLegacyClientConnected(e)}isLegacyClientConnected(e){return this.connections.some((t=>t.uuid===e.uuid&&t.name===e.name))}handleMultiRuntimeLegacyClient(e){if(!this.isLegacyClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider. Client Identity:\n {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}getEndpointIdForOpenFinId(e,t){const n=this.connections.filter((t=>t.name===e.name&&t.uuid===e.uuid));if(n.length>=2){const n=ct(this,rt,"f"),{uuid:i,name:r}=e,o=n?.providerIdentity.uuid,s=n?.providerIdentity.name;console.warn(`WARNING: Dispatch call may have unintended results. The "to" argument of your dispatch call is missing the\n "endpointId" parameter. The identity you are dispatching to ({uuid: ${i}, name: ${r}})\n has multiple channelClients for this channel. Your dispatched action: (${t}) from the provider:\n ({uuid: ${o}, name: ${s}}) will only be processed by the most recently-created client.`)}return n.pop()?.endpointId}static clientIdentityIncludesEndpointId(e){return void 0!==e.endpointId}static clientIsMultiRuntime(e){return void 0!==e.runtimeUuid}static async wireClose(e,t){await e.sendAction("destroy-channel",{channelName:t})}}Qe.ChannelProvider=ut,it=new WeakMap,rt=new WeakMap,ot=new WeakMap,st=new WeakMap,at=new WeakMap,ut.removalMap=new WeakMap;var pt={};Object.defineProperty(pt,"__esModule",{value:!0}),pt.MessageReceiver=void 0;const wt=ue,yt=d;class ft extends yt.Base{constructor(e){super(e),this.onmessage=e=>"process-channel-message"===e.action&&(this.processChannelMessage(e),!0),this.endpointMap=new Map,this.latestEndpointIdByChannelId=new Map,e.registerMessageHandler(this.onmessage.bind(this))}async processChannelMessage(e){const{senderIdentity:t,providerIdentity:n,action:i,ackToSender:r,payload:o,intendedTargetIdentity:s}=e.payload,a=s.channelId??s.endpointId??this.latestEndpointIdByChannelId.get(n.channelId),c=this.endpointMap.get(a);if(!c)return r.payload.success=!1,r.payload.reason=`Client connection with identity uuid: ${this.wire.me.uuid} / name: ${this.wire.me.name} / endpointId: ${a} no longer connected.`,this.wire.sendRaw(r);try{const e=await c(i,o,t);return r.payload.payload=r.payload.payload||{},r.payload.payload.result=e,this.wire.sendRaw(r)}catch(e){return r.payload.success=!1,r.payload.reason=e.message,this.wire.sendRaw(r)}}addEndpoint(e,t,n){this.endpointMap.set(n,e),t!==n&&this.latestEndpointIdByChannelId.set(t,n)}removeEndpoint(e,t){this.endpointMap.delete(t),this.latestEndpointIdByChannelId.get(e)===t&&this.latestEndpointIdByChannelId.delete(e)}checkForPreviousClientConnection(e){const t=this.latestEndpointIdByChannelId.get(e);t&&(wt.ChannelClient.closeChannelByEndpointId(t),console.warn("You have created a second connection to an older provider. First connection has been removed from the clientMap"),console.warn("If the provider calls publish(), you may receive multiple messages."))}}pt.MessageReceiver=ft;var gt={};Object.defineProperty(gt,"__esModule",{value:!0}),gt.ProtocolManager=void 0;gt.ProtocolManager=class{constructor(e){this.ProtocolsInPreferenceOrder=e,this.DefaultClientProtocols=["classic"],this.DefaultProviderProtocols=["classic"],this.getClientProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultClientProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(", ")}.`);return t},this.getProviderProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultProviderProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(", ")}.`);return t},this.getCompatibleProtocols=(e,t)=>t.supportedProtocols.filter((t=>e.some((e=>e.type===t.type&&t.version>=e.minimumVersion&&e.version>=(t.minimumVersion??0))))).slice(0,t.maxProtocols)}};var mt={};Object.defineProperty(mt,"__esModule",{value:!0});class vt{static combine(e,t){return new vt(e,t)}constructor(e,t){this.primary=e,this.secondary=t}onEndpointDisconnect(e,t){this.primary.onEndpointDisconnect(e,(()=>{this.secondary.isEndpointConnected(e)||t()})),this.secondary.onEndpointDisconnect(e,(()=>{this.primary.isEndpointConnected(e)||t()}))}isValidEndpointPayload(e){return this.primary.isValidEndpointPayload(e)||this.secondary.isValidEndpointPayload(e)}async closeEndpoint(e){await this.primary.closeEndpoint(e),await this.secondary.closeEndpoint(e)}isEndpointConnected(e){return this.primary.isEndpointConnected(e)||this.secondary.isEndpointConnected(e)}async addEndpoint(e,t){this.primary.isValidEndpointPayload(t)&&await this.primary.addEndpoint(e,t),this.secondary.isValidEndpointPayload(t)&&await this.secondary.addEndpoint(e,t)}receive(e){this.primary.receive(e),this.secondary.receive(e)}send(e,t,n){return this.primary.isEndpointConnected(e)?this.primary.send(e,t,n):this.secondary.send(e,t,n)}async close(){await Promise.all([this.primary.close(),this.secondary.close()])}}mt.default=vt;var Ct,bt,It=s&&s.__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},Et=s&&s.__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)},xt=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(xe,"__esModule",{value:!0}),xe.ConnectionManager=void 0;const At=Ae,Pt=d,Mt=Oe,_t=Fe,Ot=Je,St=Qe,Rt=pt,Ft=gt,jt=xt(mt);class kt extends Pt.Base{static getProtocolOptionsFromStrings(e){return e.map((e=>{switch(e){case"rtc":return _t.RTCInfo;case"classic":return Mt.ClassicInfo;default:return(0,At.exhaustiveCheck)(e,["rtc","classic"])}}))}constructor(e){super(e),Ct.set(this,void 0),bt.set(this,void 0),this.removeChannelFromProviderMap=e=>{this.providerMap.delete(e)},this.onmessage=e=>"process-channel-connection"===e.action&&(this.processChannelConnection(e),!0),this.providerMap=new Map,this.protocolManager=new Ft.ProtocolManager("node"===this.wire.environment.type?["classic"]:["rtc","classic"]),It(this,Ct,new Rt.MessageReceiver(e),"f"),It(this,bt,new Ot.RTCICEManager(e),"f"),e.registerMessageHandler(this.onmessage.bind(this))}createProvider(e,t){const n=Object.assign(this.wire.environment.getDefaultChannelOptions().create,e||{}),i=this.protocolManager.getProviderProtocols(n?.protocols),r=i.map((e=>{switch(e){case"rtc":return new _t.RTCStrategy;case"classic":return new Mt.ClassicStrategy(this.wire,Et(this,Ct,"f"),t.channelId,t);default:return(0,At.exhaustiveCheck)(e,["rtc","classic"])}}));let o;if(2===r.length){const[e,t]=r;o=jt.default.combine(e,t)}else{if(1!==r.length)throw new Error("failed to combine strategies");[o]=r}const s=new St.ChannelProvider(t,(()=>St.ChannelProvider.wireClose(this.wire,t.channelName)),o),a=t.channelId;return this.providerMap.set(a,{provider:s,strategy:o,supportedProtocols:kt.getProtocolOptionsFromStrings(i)}),St.ChannelProvider.setProviderRemoval(s,this.removeChannelFromProviderMap.bind(this)),s}async createClientOffer(e){const t=this.protocolManager.getClientProtocols(e?.protocols);let n;return{offer:{supportedProtocols:await Promise.all(t.map((async e=>{switch(e){case"rtc":{const{rtcClient:e,channels:t,offer:i,rtcConnectionId:r,channelsOpened:o}=await Et(this,bt,"f").startClientOffer();return n={rtcClient:e,channels:t,channelsOpened:o},{type:"rtc",version:_t.RTCInfo.version,payload:{offer:i,rtcConnectionId:r}}}case"classic":return{type:"classic",version:Mt.ClassicInfo.version};default:return(0,At.exhaustiveCheck)(e,["rtc","classic"])}}))),maxProtocols:2},rtc:n}}async createClientStrategy(e,t){t.endpointId||(t.endpointId=this.wire.environment.getNextMessageId(),Et(this,Ct,"f").checkForPreviousClientConnection(t.channelId));const n=t.answer??{supportedProtocols:[{type:"classic",version:1}]},i=(await Promise.all(n.supportedProtocols.map((async n=>"rtc"===n.type&&e?(await Et(this,bt,"f").finishClientOffer(e.rtcClient,n.payload.answer,e.channelsOpened),new _t.RTCStrategy):"classic"===n.type?new Mt.ClassicStrategy(this.wire,Et(this,Ct,"f"),t.endpointId,t):null)))).filter((e=>null!==e));let r;if(e&&!i.some((e=>e instanceof _t.RTCStrategy))&&e&&e.rtcClient.close(),i.length>=2)r=jt.default.combine(i[0],i[1]);else{if(!i.length)throw new Error("No compatible protocols");[r]=i}const o={endpointIdentity:t,rtc:e};return r.addEndpoint(t.channelId,o),r}async processChannelConnection(e){const{clientIdentity:t,providerIdentity:n,ackToSender:i,payload:r,offer:o}=e.payload;t.endpointId?t.isLocalEndpointId=!1:(t.endpointId=this.wire.environment.getNextMessageId(),t.isLocalEndpointId=!0);const s=n.channelId,a=this.providerMap.get(s);if(!a)return i.payload.success=!1,i.payload.reason=`Channel "${n.channelName}" has been destroyed.`,this.wire.sendRaw(i);const{provider:c,strategy:d,supportedProtocols:h}=a;try{if(!(c instanceof St.ChannelProvider))throw Error("Cannot connect to a channel client");const e=o??{supportedProtocols:[{type:"classic",version:1}],maxProtocols:1},n=this.protocolManager.getCompatibleProtocols(h,e);if(!n.length)throw new Error("This provider does not support any of the offered protocols.");const s=await c.processConnection(t,r);i.payload.payload=i.payload.payload||{};let a={supportedProtocols:[],endpointPayloadPromise:Promise.resolve({endpointIdentity:t})};return a=await n.reduce((async(e,t)=>{const n=await e;if("rtc"===t.type){const{answer:e,rtcClient:i,channels:r}=await Et(this,bt,"f").createProviderAnswer(t.payload.rtcConnectionId,t.payload.offer);n.supportedProtocols.push({type:"rtc",version:_t.RTCInfo.version,payload:{answer:e}}),n.endpointPayloadPromise=n.endpointPayloadPromise.then((e=>r.then((t=>({...e,rtc:{rtcClient:i,channels:t}})))))}else n.supportedProtocols.push({type:"classic",version:Mt.ClassicInfo.version});return n}),Promise.resolve(a)),a.endpointPayloadPromise.then((e=>d.addEndpoint(t.endpointId,e))),i.payload.payload.result=s,i.payload.payload.answer=a,this.wire.sendRaw(i)}catch(e){return i.payload.success=!1,i.payload.reason=e.message,this.wire.sendRaw(i)}}}xe.ConnectionManager=kt,Ct=new WeakMap,bt=new WeakMap;var Lt,Tt,$t,Bt=s&&s.__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},Gt=s&&s.__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)};Object.defineProperty(le,"__esModule",{value:!0}),le.Channel=void 0;const Wt=t,Ht=G,Nt=d,Dt=ue,Ut=xe,Vt=Qe;function zt(e){const t=Math.floor(e/10),n=Math.min(3e4,500*2**t);return new Promise((e=>{setTimeout((()=>{e(!1)}),n)}))}class Kt extends Nt.EmitterBase{constructor(e){super(e,"channel"),Lt.set(this,void 0),Tt.set(this,new Wt.EventEmitter),$t.set(this,new Ht.AsyncRetryableLazy((async()=>{await Promise.all([this.on("disconnected",(e=>{Dt.ChannelClient.handleProviderDisconnect(e)})),this.on("connected",((...e)=>{Gt(this,Tt,"f").emit("connected",...e)}))]).catch((()=>new Error("error setting up channel connection listeners")))}))),Bt(this,Lt,new Ut.ConnectionManager(e),"f")}async getAllChannels(){return this.wire.sendAction("get-all-channels").then((({payload:e})=>e.data))}async onChannelConnect(e){await this.on("connected",e)}async onChannelDisconnect(e){await this.on("disconnected",e)}async safeConnect(e,t,n){const i={count:0};do{let r=()=>{};const o=new Promise((t=>{r=n=>{e===n.channelName&&t(!0)},Gt(this,Tt,"f").on("connected",r)}));try{if(i.count>0){i.gotConnectedEvent=await Promise.race([zt(i.count),o]);const t=await this.wire.sendAction("connect-to-channel",{...n,retryInfo:i});return console.log(`Successfully connected to channelName: ${e}`),t.payload.data}const t=this.wire.sendAction("connect-to-channel",n);i.originalMessageId=t.messageId;return(await t).payload.data}catch(n){if(!n.message.includes("internal-nack"))throw n;t&&0===i.count&&console.warn(`No channel found for channelName: ${e}. Waiting for connection...`)}finally{i.count+=1,Gt(this,Tt,"f").removeListener("connected",r)}}while(t);throw new Error(`No channel found for channelName: ${e}.`)}async connect(e,t={}){if(await Gt(this,$t,"f").getValue(),!e||"string"!=typeof e)throw new Error("Please provide a channelName string to connect to a channel.");const n={wait:!0,...this.wire.environment.getDefaultChannelOptions().connect,...t},{offer:i,rtc:r}=await Gt(this,Lt,"f").createClientOffer(n);let o;(this.fin.me.isFrame||this.fin.me.isView||this.fin.me.isWindow)&&(o=(await this.fin.me.getInfo()).url);const s={channelName:e,...n,offer:i,connectionUrl:o},a=await this.safeConnect(e,n.wait,s),c=await Gt(this,Lt,"f").createClientStrategy(r,a),d=new Dt.ChannelClient(a,(()=>Dt.ChannelClient.wireClose(this.wire,a,a.endpointId)),c);return c.onEndpointDisconnect(a.channelId,(async()=>{try{await d.sendDisconnectAction()}catch(e){console.warn(`Something went wrong during disconnect for client with uuid: ${a.uuid} / name: ${a.name} / endpointId: ${a.endpointId}.`)}finally{Dt.ChannelClient.handleProviderDisconnect(a)}})),d}async create(e,t){if(!e)throw new Error("Please provide a channelName to create a channel");const{payload:{data:n}}=await this.wire.sendAction("create-channel",{channelName:e}),i=Gt(this,Lt,"f").createProvider(t,n);return this.on("client-disconnected",(t=>{t.channelName===e&&Vt.ChannelProvider.handleClientDisconnection(i,t)})),i}}le.Channel=Kt,Lt=new WeakMap,Tt=new WeakMap,$t=new WeakMap,Object.defineProperty(de,"__esModule",{value:!0}),de.InterAppPayload=de.InterApplicationBus=void 0;const qt=t,Jt=d,Yt=he,Zt=le,Qt=O;class Xt extends Jt.Base{constructor(e){super(e),this.events={subscriberAdded:"subscriber-added",subscriberRemoved:"subscriber-removed"},this.refCounter=new Yt.RefCounter,this.Channel=new Zt.Channel(e),this.emitter=new qt.EventEmitter,e.registerMessageHandler(this.onmessage.bind(this)),this.on=this.emitter.on.bind(this.emitter),this.removeAllListeners=this.emitter.removeAllListeners.bind(this.emitter)}async publish(e,t){await this.wire.sendAction("publish-message",{topic:e,message:t,sourceWindowName:this.me.name})}async send(e,t,n){const i=(0,Qt.validateIdentity)(e);if(i)throw new Error(i);await this.wire.sendAction("send-message",{destinationUuid:e.uuid,destinationWindowName:e.name,topic:t,message:n,sourceWindowName:this.me.name})}subscribe(e,t,n){const i=this.createSubscriptionKey(e.uuid,e.name||"*",t);return this.emitter.on(i,n),this.refCounter.actOnFirst(i,(async()=>{await this.wire.sendAction("subscribe",{sourceUuid:e.uuid,sourceWindowName:e.name||"*",topic:t,destinationWindowName:this.me.name})}),(()=>Promise.resolve()))}unsubscribe(e,t,n){const i=e.name||"*",r=this.createSubscriptionKey(e.uuid,i,t);return this.emitter.removeListener(r,n),this.refCounter.actOnLast(r,(async()=>{await this.wire.sendAction("unsubscribe",{sourceUuid:e.uuid,sourceWindowName:i,topic:t,destinationWindowName:this.me.name})}),(()=>new Promise((e=>e)).then((()=>{}))))}processMessage(e){const{payload:{message:t,sourceWindowName:n,sourceUuid:i,topic:r}}=e,o=[this.createSubscriptionKey(i,n,r),this.createSubscriptionKey(i,"*",r),this.createSubscriptionKey("*","*",r)],s={uuid:i,name:n};o.forEach((e=>{this.emitter.emit(e,t,s)}))}emitSubscriverEvent(e,t){const{payload:{targetName:n,uuid:i,topic:r}}=t,o={name:n,uuid:i,topic:r};this.emitter.emit(e,o)}createSubscriptionKey(e,t,n){const i=t||"*";if(!(e&&i&&n))throw new Error("Missing uuid, name, or topic string");return function(...e){return e.map((e=>Buffer.from(`${e}`).toString("base64"))).join("/")}(e,i,n)}onmessage(e){const{action:t}=e;switch(t){case"process-message":this.processMessage(e);break;case this.events.subscriberAdded:this.emitSubscriverEvent(this.events.subscriberAdded,e);break;case this.events.subscriberRemoved:this.emitSubscriverEvent(this.events.subscriberRemoved,e)}return!0}}de.InterApplicationBus=Xt;de.InterAppPayload=class{};var en={};Object.defineProperty(en,"__esModule",{value:!0}),en.Clipboard=void 0;const tn=d;class nn extends tn.Base{async writeText(e){await this.wire.sendAction("clipboard-write-text",e)}async readText(e){const{payload:t}=await this.wire.sendAction("clipboard-read-text",{type:e});return t.data}async writeImage(e){await this.wire.sendAction("clipboard-write-image",e)}async readImage(e={format:"dataURL"}){const{payload:t}=await this.wire.sendAction("clipboard-read-image",e);return t.data}async writeHtml(e){await this.wire.sendAction("clipboard-write-html",e)}async readHtml(e){const{payload:t}=await this.wire.sendAction("clipboard-read-html",{type:e});return t.data}async writeRtf(e){await this.wire.sendAction("clipboard-write-rtf",e)}async readRtf(e){const{payload:t}=await this.wire.sendAction("clipboard-read-rtf",{type:e});return t.data}async write(e){await this.wire.sendAction("clipboard-write",e)}async getAvailableFormats(e){const{payload:t}=await this.wire.sendAction("clipboard-read-formats",{type:e});return t.data}}en.Clipboard=nn;var rn={},on={},sn={};Object.defineProperty(sn,"__esModule",{value:!0}),sn.ExternalApplication=void 0;const an=d;class cn extends an.EmitterBase{constructor(e,t){super(e,"external-application",t.uuid),this.identity=t}getInfo(){return this.wire.sendAction("get-external-application-info",this.identity).then((({payload:e})=>e.data))}}sn.ExternalApplication=cn,Object.defineProperty(on,"__esModule",{value:!0}),on.ExternalApplicationModule=void 0;const dn=d,hn=sn;class ln extends dn.Base{wrap(e){return this.wire.sendAction("external-application-wrap").catch((e=>{})),Promise.resolve(new hn.ExternalApplication(this.wire,{uuid:e}))}wrapSync(e){return this.wire.sendAction("external-application-wrap-sync").catch((e=>{})),new hn.ExternalApplication(this.wire,{uuid:e})}}on.ExternalApplicationModule=ln,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(on,e),n(sn,e)}(rn);var un={},pn={},wn={};Object.defineProperty(wn,"__esModule",{value:!0}),wn._Frame=void 0;const yn=d;class fn extends yn.EmitterBase{constructor(e,t){super(e,"frame",t.uuid,t.name),this.identity=t}getInfo(){return this.wire.sendAction("get-frame-info",this.identity).then((({payload:e})=>e.data))}getParentWindow(){return this.wire.sendAction("get-parent-window",this.identity).then((({payload:e})=>e.data))}}wn._Frame=fn,Object.defineProperty(pn,"__esModule",{value:!0}),pn._FrameModule=void 0;const gn=d,mn=O,vn=wn;class Cn extends gn.Base{async wrap(e){this.wire.sendAction("frame-wrap").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}wrapSync(e){this.wire.sendAction("frame-wrap-sync").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}getCurrent(){return this.wire.sendAction("frame-get-current").catch((e=>{})),Promise.resolve(new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity()))}getCurrentSync(){return this.wire.sendAction("frame-get-current-sync").catch((e=>{})),new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity())}}pn._FrameModule=Cn,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(pn,e),n(wn,e)}(un);var bn={};Object.defineProperty(bn,"__esModule",{value:!0}),bn.GlobalHotkey=void 0;const In=d;class En extends In.EmitterBase{constructor(e){super(e,"global-hotkey")}async register(e,t){await this.on(e,t),await this.wire.sendAction("global-hotkey-register",{hotkey:e})}async unregister(e){await this.removeAllListeners(e),await this.wire.sendAction("global-hotkey-unregister",{hotkey:e})}async unregisterAll(){await Promise.all(this.eventNames().filter((e=>!("registered"===e||"unregistered"===e))).map((e=>this.removeAllListeners(e)))),await this.wire.sendAction("global-hotkey-unregister-all",{})}async isRegistered(e){const{payload:{data:t}}=await this.wire.sendAction("global-hotkey-is-registered",{hotkey:e});return t}}bn.GlobalHotkey=En;var xn,An={},Pn={},Mn={},_n=s&&s.__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)};Object.defineProperty(Mn,"__esModule",{value:!0}),Mn.Platform=void 0;const On=d,Sn=O,Rn=new Map;class Fn extends On.EmitterBase{constructor(e,t){super(t.wire,"application",e.uuid),this.getClient=e=>{this.wire.sendAction("platform-get-client",this.identity).catch((e=>{}));const t=e||this.identity,{uuid:n}=t;if(!Rn.has(n)){const e=_n(this,xn,"f").call(this,n);Rn.set(n,e)}return Rn.get(n)},xn.set(this,(async e=>{try{const t=`custom-frame-${e}`,n=await this._channel.connect(t,{wait:!1});return n.onDisconnection((()=>{Rn.delete(e)})),n}catch(t){throw Rn.delete(e),new Error("The targeted Platform is not currently running. Listen for application-started event for the given Uuid.")}})),this.launchLegacyManifest=this.launchContentManifest;const n=(0,Sn.validateIdentity)(e);if(n)throw new Error(n);this._channel=t,this.identity={uuid:e.uuid},this.Layout=this.fin.Platform.Layout,this.Application=this.fin.Application.wrapSync(this.identity)}async createView(e,t,n){this.wire.sendAction("platform-create-view",this.identity).catch((e=>{}));const i=await this.getClient(),r=await i.dispatch("create-view",{target:t,opts:e,targetView:n});if(!r||(0,Sn.validateIdentity)(r.identity))throw new Error(`When overwriting the createView call, please return an object that has a valid 'identity' property: ${JSON.stringify(r)}`);return this.fin.View.wrapSync(r.identity)}async createWindow(e){this.wire.sendAction("platform-create-window",this.identity).catch((e=>{}));const t=await this.getClient();e.reason||(e.reason="api-call");const n=await t.dispatch("create-view-container",e);if(!n||(0,Sn.validateIdentity)(n.identity))throw new Error(`When overwriting the createWindow call, please return an object that has a valid 'identity' property: ${JSON.stringify(n)}`);const{identity:i}=n,r=this.fin.Window.wrapSync(i);return r.name=i.name,r.uuid=i.uuid,r}async quit(){this.wire.sendAction("platform-quit",this.identity).catch((e=>{}));return(await this.getClient()).dispatch("quit")}async closeView(e){this.wire.sendAction("platform-close-view",this.identity).catch((e=>{}));const t=await this.getClient();await t.dispatch("close-view",{view:e})}async reparentView(e,t){console.warn("Platform.reparentView has been deprecated, please use Platform.createView"),this.wire.sendAction("platform-reparent-view",this.identity).catch((e=>{}));const n={...e,uuid:e.uuid??this.identity.uuid},i=await this.fin.View.wrap(n),r=await i.getOptions();return this.createView(r,t)}async getSnapshot(){this.wire.sendAction("platform-get-snapshot",this.identity).catch((e=>{}));return(await this.getClient()).dispatch("get-snapshot")}async getViewSnapshot(e){return(await this.getClient()).dispatch("get-view-snapshot",{viewIdentity:e})}async applySnapshot(e,t){this.wire.sendAction("platform-apply-snapshot",this.identity).catch((e=>{}));const n="Requested snapshot must be a valid Snapshot object, or a url or filepath to such an object.";let i;if("string"==typeof e)try{i=(await this._channel.wire.sendAction("get-application-manifest",{manifestUrl:e})).payload.data}catch(e){throw new Error(`${n}: ${e}`)}else i=e;if(!i.windows)throw new Error(n);const r=await this.getClient();return await r.dispatch("apply-snapshot",{snapshot:i,options:t}),this}async fetchManifest(e){return(await this.getClient()).dispatch("platform-fetch-manifest",{manifestUrl:e})}async launchContentManifest(e){this.wire.sendAction("platform-launch-content-manifest",this.identity).catch((()=>{}));const t=await this.getClient(),n=await this.fetchManifest(e);return t.dispatch("launch-into-platform",{manifest:n,manifestUrl:e}),this}async setWindowContext(e={},t){if(this.wire.sendAction("platform-set-window-context",this.identity).catch((e=>{})),!e)throw new Error("Please provide a serializable object or string to set the context.");const n=await this.getClient(),{entityType:i}=t?await this.fin.System.getEntityInfo(t.uuid,t.name):this.fin.me;await n.dispatch("set-window-context",{context:e,entityType:i,target:t||{uuid:this.fin.me.uuid,name:this.fin.me.name}})}async getWindowContext(e){this.wire.sendAction("platform-get-window-context",this.identity).catch((e=>{}));const t=await this.getClient(),{entityType:n}=e?await this.fin.System.getEntityInfo(e.uuid,e.name):this.fin.me;return t.dispatch("get-window-context",{target:e||{uuid:this.fin.me.uuid,name:this.fin.me.name},entityType:n})}async closeWindow(e,t={skipBeforeUnload:!1}){this.wire.sendAction("platform-close-window",this.identity).catch((e=>{}));return(await this.getClient()).dispatch("close-window",{windowId:e,options:t})}}Mn.Platform=Fn,xn=new WeakMap;var jn={},kn={},Ln={},Tn={};function $n(e){switch(e){case"columns":case"grid":case"rows":case"tabs":return!0;default:return!1}}Object.defineProperty(Tn,"__esModule",{value:!0}),Tn.overrideFromComposables=Tn.isValidPresetType=void 0,Tn.isValidPresetType=$n,Tn.overrideFromComposables=function(...e){return t=>e.reduceRight(((e,t)=>n=>t(e(n))),(e=>e))(t)},Tn.default={isValidPresetType:$n};var Bn={},Gn={},Wn={};Object.defineProperty(Wn,"__esModule",{value:!0}),Wn.ApiConsumer=void 0;Wn.ApiConsumer=class{constructor(e){this.strategy=e,this.consume=async e=>(await this.strategy.getExposedFunctions(e)).reduce(((t,n)=>({...t,[n.key]:this.strategy.createFunction(n,e)})),{})}};var Hn={},Nn={};Object.defineProperty(Nn,"__esModule",{value:!0}),Nn.expose=Nn.getExposedProperties=void 0;const Dn=Symbol("exposedProperties");Nn.getExposedProperties=e=>e[Dn]||e.prototype[Dn]||[];Nn.expose=e=>(t,n,i)=>{t[Dn]=t[Dn]||[],t[Dn].push({key:n,descriptor:i,options:e})},Object.defineProperty(Hn,"__esModule",{value:!0}),Hn.ApiExposer=void 0;const Un=Nn;Hn.ApiExposer=class{constructor(e){this.strategy=e,this.exposeInstance=async(e,t)=>{const n=(0,Un.getExposedProperties)(e),i=await Promise.all(n.map((async({key:n,options:i})=>({key:n,options:await this.strategy.exposeFunction(e[n].bind(e),{key:n,options:i,meta:t})}))));await this.strategy.exposeMeta(t,i)}}};var Vn={},zn={},Kn={};Object.defineProperty(Kn,"__esModule",{value:!0}),Kn.ChannelsConsumer=void 0;Kn.ChannelsConsumer=class{constructor(e){this.channel=e,this.getExposedFunctions=async e=>{const{id:t}=e,{props:n}=await this.channel.dispatch(`api-meta:${t}`);return n},this.createFunction=e=>(...t)=>{const{action:n}=e.options;return this.channel.dispatch(n,{args:t})}}};var qn={};Object.defineProperty(qn,"__esModule",{value:!0}),qn.ChannelsExposer=void 0;qn.ChannelsExposer=class{constructor(e){this.channelProviderOrClient=e,this.exposeFunction=async(e,t)=>{const{key:n,options:i,meta:r}=t,{id:o}=r,s=`${o}.${i?.action||n}`;return await this.channelProviderOrClient.register(s,(async({args:t})=>e(...t))),{action:s}},this.exposeMeta=async({id:e},t)=>{const n=`api-meta:${e}`;await this.channelProviderOrClient.register(n,(()=>({props:t})))}}},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Kn,e),n(qn,e)}(zn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(zn,e)}(Vn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Wn,e),n(Hn,e),n(Vn,e),n(Nn,e)}(Gn);var Jn={};Object.defineProperty(Jn,"__esModule",{value:!0}),Jn.createRelayedDispatch=exports.relayChannelClientApi_1=Jn.relayChannelClientApi=void 0;const Yn=["no longer connected","RTCDataChannel closed unexpectedly","The client you are trying to dispatch from is disconnected from the target provider"];exports.relayChannelClientApi_1=Jn.relayChannelClientApi=async(e,t)=>{e.register(`relay:${t}`,(({action:t,target:n,payload:i})=>e.dispatch(n,t,i))),await Promise.resolve()};Jn.createRelayedDispatch=(e,t,n,i)=>async(r,o)=>{try{return await e.dispatch(`relay:${n}`,{action:r,payload:o,target:t})}catch(e){if(s=e.message,Yn.some((e=>s.includes(e)))&&i)throw new Error(i);throw e}var s};var Zn,Qn,Xn,ei=s&&s.__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},ti=s&&s.__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)};Object.defineProperty(Bn,"__esModule",{value:!0}),Bn.ColumnOrRow=Bn.TabStack=Bn.LayoutNode=void 0;const ni=Gn,ii=Jn;class ri{constructor(e,t){Zn.set(this,void 0),this.isRoot=()=>ti(this,Zn,"f").isRoot(this.entityId),this.exists=()=>ti(this,Zn,"f").exists(this.entityId),this.getParent=async()=>{const e=await ti(this,Zn,"f").getParent(this.entityId);if(e)return ri.getEntity(e,ti(this,Zn,"f"))},this.createAdjacentStack=async(e,t)=>{const n=await ti(this,Zn,"f").createAdjacentStack(this.entityId,e,t);return ri.getEntity({entityId:n,type:"stack"},ti(this,Zn,"f"))},this.getAdjacentStacks=async e=>(await ti(this,Zn,"f").getAdjacentStacks({targetId:this.entityId,edge:e})).map((e=>ri.getEntity({type:"stack",entityId:e.entityId},ti(this,Zn,"f")))),ei(this,Zn,e,"f"),this.entityId=t}}Bn.LayoutNode=ri,Zn=new WeakMap,ri.newLayoutEntitiesClient=async(e,t,n)=>{const i=(0,ii.createRelayedDispatch)(e,n,"layout-relay","You are trying to interact with a layout component on a window that does not exist or has been destroyed.");return new ni.ApiConsumer(new ni.ChannelsConsumer({dispatch:i})).consume({id:t})},ri.getEntity=(e,t)=>{const{entityId:n,type:i}=e;switch(i){case"column":case"row":return new si(t,n,i);case"stack":return new oi(t,n);default:throw new Error(`Unrecognised Layout Entity encountered ('${JSON.stringify(e)})`)}};class oi extends ri{constructor(e,t){super(e,t),Qn.set(this,void 0),this.type="stack",this.getViews=()=>ti(this,Qn,"f").getStackViews(this.entityId),this.addView=async(e,t={index:0})=>ti(this,Qn,"f").addViewToStack(this.entityId,e,t),this.removeView=async e=>{await ti(this,Qn,"f").removeViewFromStack(this.entityId,e)},this.setActiveView=async e=>{await ti(this,Qn,"f").setStackActiveView(this.entityId,e)},ei(this,Qn,e,"f")}}Bn.TabStack=oi,Qn=new WeakMap;class si extends ri{constructor(e,t,n){super(e,t),Xn.set(this,void 0),this.getContent=async()=>(await ti(this,Xn,"f").getContent(this.entityId)).map((e=>ri.getEntity(e,ti(this,Xn,"f")))),ei(this,Xn,e,"f"),this.type=n}}Bn.ColumnOrRow=si,Xn=new WeakMap;var ai={};Object.defineProperty(ai,"__esModule",{value:!0}),ai.DEFAULT_LAYOUT_KEY=ai.LAYOUT_CONTROLLER_ID=void 0,ai.LAYOUT_CONTROLLER_ID="layout-entities",ai.DEFAULT_LAYOUT_KEY="__default__";var ci,di,hi,li=s&&s.__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)};Object.defineProperty(Ln,"__esModule",{value:!0}),Ln.Layout=void 0;const ui=G,pi=O,wi=d,yi=Tn,fi=Bn,gi=ai;class mi extends wi.Base{static getClient(e){return li(e,di,"f").getValue()}constructor(e,t){super(t),ci.add(this),di.set(this,new ui.Lazy((async()=>fi.LayoutNode.newLayoutEntitiesClient(await this.platform.getClient(),gi.LAYOUT_CONTROLLER_ID,this.identity)))),this.replace=async e=>{this.wire.sendAction("layout-replace").catch((e=>{}));const t=await this.platform.getClient();await t.dispatch("replace-layout",{target:this.identity,opts:{layout:e}})},this.replaceView=async(e,t)=>{this.wire.sendAction("layout-replace-view").catch((e=>{}));const n=await this.platform.getClient();await n.dispatch("replace-view",{target:this.identity,opts:{viewToReplace:e,newView:t}})},this.applyPreset=async e=>{this.wire.sendAction("layout-apply-preset").catch((e=>{}));const t=await this.platform.getClient(),{presetType:n}=e;if(!n||!(0,yi.isValidPresetType)(n))throw new Error("Cannot apply preset layout, please include an applicable presetType property in the PresetLayoutOptions.");await t.dispatch("apply-preset-layout",{target:this.identity,opts:{presetType:n}})};const n=(0,pi.validateIdentity)(e);if(n)throw new Error(n);this.identity=e,this.platform=this.fin.Platform.wrapSync({uuid:e.uuid}),e.uuid===this.fin.me.uuid&&e.name===this.fin.me.name&&(this.init=this.fin.Platform.Layout.init)}async getConfig(){this.wire.sendAction("layout-get-config").catch((e=>{}));return(await this.platform.getClient()).dispatch("get-frame-snapshot",{target:this.identity})}async getCurrentViews(){this.wire.sendAction("layout-get-views").catch((e=>{}));const e=await this.platform.getClient();return(await e.dispatch("get-layout-views",{target:this.identity})).map((e=>this.fin.View.wrapSync(e)))}async getRootItem(){this.wire.sendAction("layout-get-root-item").catch((()=>{}));const e=await li(this,di,"f").getValue(),t=await e.getRoot("layoutName"in this.identity?this.identity:void 0);return fi.LayoutNode.getEntity(t,e)}async getStackByViewIdentity(e){this.wire.sendAction("layout-get-stack-by-view").catch((()=>{}));const t=await li(this,di,"f").getValue(),n=await t.getStackByView(e);if(!n)throw new Error(`No stack found for view: ${e.uuid}/${e.name}`);return fi.LayoutNode.getEntity(n,t)}async addView(e,{location:t,targetView:n}={}){this.wire.sendAction("layout-add-view").catch((e=>{}));const{identity:i}=await li(this,ci,"m",hi).call(this,"layout-add-view",{viewOptions:e,location:t,targetView:n});return{identity:i}}async closeView(e){this.wire.sendAction("layout-close-view").catch((e=>{})),await li(this,ci,"m",hi).call(this,"layout-close-view",{viewIdentity:e})}}Ln.Layout=mi,di=new WeakMap,ci=new WeakSet,hi=async function(e,t){return(await this.platform.getClient()).dispatch(e,{target:this.identity,opts:t})};var vi,Ci,bi,Ii,Ei,xi=s&&s.__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)},Ai=s&&s.__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};Object.defineProperty(kn,"__esModule",{value:!0}),kn.LayoutModule=void 0;const Pi=d,Mi=Ln,_i=ai;class Oi extends Pi.Base{constructor(){super(...arguments),vi.add(this),Ci.set(this,!1),bi.set(this,null),this.init=async(e={})=>{if(this.wire.sendAction("layout-init").catch((e=>{})),!this.wire.environment.layoutAllowedInContext(this.fin))throw new Error("Layout.init can only be called from a Window context.");if(xi(this,Ci,"f"))throw new Error("Layout.init was already called, please use Layout.create to add additional layouts.");"openfin"===this.wire.environment.type&&await this.fin.Platform.getCurrentSync().getClient(),Ai(this,Ci,!0,"f"),Ai(this,bi,await this.wire.environment.initLayoutManager(this.fin,this.wire,e),"f"),await this.wire.environment.applyLayoutSnapshot(this.fin,xi(this,bi,"f"),e);const t={name:this.fin.me.name,uuid:this.fin.me.uuid};if(!e.layoutManagerOverride){const e={layoutName:_i.DEFAULT_LAYOUT_KEY,...t};return xi(this,Ii,"f").call(this,e)}return this.wrapSync(t)},Ii.set(this,(e=>{const t="[Layout] You are using a deprecated property `layoutManager` - it will throw if you access it starting in v37.",n=new Proxy({},{get(e,n){throw console.warn(`[Layout-mgr-proxy] accessing ${n.toString()}`),new Error(t)}}),i=Object.assign(this.wrapSync(e),{layoutManager:n});return new Proxy(i,{get(e,n){if("layoutManager"===n)throw console.warn(`[Layout-proxy] accessing ${n.toString()}`),new Error(t);return e[n]}})})),this.getCurrentLayoutManagerSync=()=>xi(this,vi,"m",Ei).call(this,"fin.Platform.Layout.getCurrentLayoutManagerSync()"),this.create=async e=>this.wire.environment.createLayout(xi(this,vi,"m",Ei).call(this,"fin.Platform.Layout.create()"),e),this.destroy=async e=>this.wire.environment.destroyLayout(xi(this,vi,"m",Ei).call(this,"fin.Platform.Layout.destroy()"),e)}async wrap(e){return this.wire.sendAction("layout-wrap").catch((e=>{})),new Mi.Layout(e,this.wire)}wrapSync(e){return this.wire.sendAction("layout-wrap-sync").catch((e=>{})),new Mi.Layout(e,this.wire)}async getCurrent(){if(this.wire.sendAction("layout-get-current").catch((e=>{})),"openfin"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error("You are not in a Window context. Only Windows can have a Layout.");const{uuid:e,name:t}=this.fin.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction("layout-get-current-sync").catch((e=>{})),"openfin"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error("You are not in a Window context. Only Windows can have a Layout.");const{uuid:e,name:t}=this.fin.me;return this.wrapSync({uuid:e,name:t})}async getLayoutByViewIdentity(e){this.wire.sendAction("layout-get-by-view-identity").catch((()=>{}));let t=await this.wire.environment.getViewWindowIdentity(this.fin,e);t.identity&&(t=t.identity);try{const n=this.wrapSync(t),i=await Mi.Layout.getClient(n),r=await i.getLayoutIdentityForViewOrThrow(e);return this.wrapSync(r)}catch(n){if(!["No action registered at target for","getLayoutIdentityForViewOrThrow is not a function"].some((e=>n.message.includes(e))))throw n;if(t.uuid===t.name)throw new Error(`View identity ${JSON.stringify(e)} is not attached to any layout in provider window ${JSON.stringify(t)}.`);return this.wrapSync(t)}}}kn.LayoutModule=Oi,Ci=new WeakMap,bi=new WeakMap,Ii=new WeakMap,vi=new WeakSet,Ei=function(e){if(!xi(this,bi,"f"))throw new Error(`You must call init before using the API ${e}`);return xi(this,bi,"f")},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(kn,e),n(Ln,e)}(jn),Object.defineProperty(Pn,"__esModule",{value:!0}),Pn.PlatformModule=void 0;const Si=d,Ri=Mn,Fi=jn;class ji extends Si.Base{constructor(e,t){super(e),this._channel=t,this.Layout=new Fi.LayoutModule(this.wire)}async init(e){if(!fin.__internal_.isPlatform||fin.me.name!==fin.me.uuid)throw new Error("fin.Platform.init should only be called from a custom platform provider running in the main window of the application.");return this.wire.environment.initPlatform(this.fin,e)}async wrap(e){return this.wire.sendAction("platform-wrap").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}wrapSync(e){return this.wire.sendAction("platform-wrap-sync").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}async getCurrent(){return this.wire.sendAction("platform-get-current").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction("platform-get-current-sync").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}start(e){return this.wire.sendAction("platform-start").catch((e=>{})),new Promise((async(t,n)=>{try{const{uuid:n}=e,i=await this.fin.Application._create({...e,isPlatformController:!0});i.once("platform-api-ready",(()=>t(this.wrapSync({uuid:n})))),i._run({uuid:n})}catch(e){n(e)}}))}startFromManifest(e,t){return this.wire.sendAction("platform-start-from-manifest").catch((e=>{})),new Promise((async(n,i)=>{try{const i=await this.fin.Application._createFromManifest(e);i.once("platform-api-ready",(()=>n(this.wrapSync({uuid:i.identity.uuid})))),i._run(t)}catch(e){i(e)}}))}}Pn.PlatformModule=ji,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Pn,e),n(Mn,e)}(An);var ki={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getMe=e.getBaseMe=e.environmentUnsupportedMessage=void 0;const t=J(),n=un,i=ie(),r=rn;function o(e,t,n){return{...{isView:"view"===e,isWindow:"window"===e,isFrame:"iframe"===e,isExternal:"external connection"===e},uuid:t,name:n,entityType:e}}e.environmentUnsupportedMessage="You are not running in OpenFin.",e.getBaseMe=o,e.getMe=function(s){const{uuid:a,name:c,entityType:d}=s.me,h={setContext(){throw new Error(e.environmentUnsupportedMessage)},addContextHandler(){throw new Error(e.environmentUnsupportedMessage)},getContextGroups(){throw new Error(e.environmentUnsupportedMessage)},joinContextGroup(){throw new Error(e.environmentUnsupportedMessage)},removeFromContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getAllClientsInContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getInfoForContextGroup(){throw new Error(e.environmentUnsupportedMessage)}},l="Interop API has not been instantiated. Either connection has failed or you have not declared interop in your config.",u={setContext(){throw new Error(l)},addContextHandler(){throw new Error(l)},getContextGroups(){throw new Error(l)},joinContextGroup(){throw new Error(l)},removeFromContextGroup(){throw new Error(l)},getAllClientsInContextGroup(){throw new Error(l)},getInfoForContextGroup(){throw new Error(l)}},p={eventNames:()=>{throw new Error(e.environmentUnsupportedMessage)},emit:()=>{throw new Error(e.environmentUnsupportedMessage)},listeners:()=>{throw new Error(e.environmentUnsupportedMessage)},listenerCount:()=>{throw new Error(e.environmentUnsupportedMessage)},on:()=>{throw new Error(e.environmentUnsupportedMessage)},addListener:()=>{throw new Error(e.environmentUnsupportedMessage)},once:()=>{throw new Error(e.environmentUnsupportedMessage)},prependListener:()=>{throw new Error(e.environmentUnsupportedMessage)},prependOnceListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeAllListeners:()=>{throw new Error(e.environmentUnsupportedMessage)}};switch(d){case"view":return Object.assign(new t.View(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case"window":return Object.assign(new i._Window(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case"iframe":return Object.assign(new n._Frame(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case"external connection":return Object.assign(new r.ExternalApplication(s,{uuid:a}),o(d,a,c),{interop:u,isOpenFin:!1});default:return{...o(d,a,c),...p,interop:h,isOpenFin:!1}}}}(ki);var Li={},Ti={},$i={};Object.defineProperty($i,"__esModule",{value:!0}),$i.createWarningObject=$i.createUnusableObject=void 0,$i.createUnusableObject=function(e){const t=()=>{throw new Error(e)};return new Proxy({},{apply:t,construct:t,defineProperty:t,deleteProperty:t,get:t,getOwnPropertyDescriptor:t,getPrototypeOf:t,has:t,isExtensible:t,ownKeys:t,preventExtensions:t,set:t,setPrototypeOf:t})},$i.createWarningObject=function(e,t){return new Proxy(t,{get:(...t)=>(console.warn(e),Reflect.get(...t)),set:(...t)=>(console.warn(e),Reflect.set(...t)),getOwnPropertyDescriptor:(...t)=>(console.warn(e),Reflect.getOwnPropertyDescriptor(...t)),ownKeys:(...t)=>(console.warn(e),Reflect.ownKeys(...t))})};var Bi,Gi={},Wi={};var Hi={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.wrapIntentHandler=e.BROKER_ERRORS=e.generateOverrideWarning=e.generateOverrideError=e.wrapContextHandler=e.wrapInTryCatch=e.generateId=void 0;e.generateId=()=>`${Math.random()}${Date.now()}`;e.wrapInTryCatch=(e,t)=>(...n)=>{try{return e(...n)}catch(e){throw new Error((t||"")+e)}};e.wrapContextHandler=(e,t)=>async n=>{try{await e(n)}catch(e){throw console.error(`Error thrown by handler ${t} for context type ${n.type}: ${e}`),e}};e.generateOverrideError=(e,t)=>`You have tried to to use ${e} but ${t} has not been overridden in the Interop Broker. Please override this function. Refer to our documentation for more info.`;e.generateOverrideWarning=(e,t,n,i)=>{const{uuid:r,name:o}=n;return i?`Entity with identity: ${r}/${o} has called ${i} or ${e} but ${t} has not been overridden.`:`Entity with identity: ${r}/${o} has called ${e} but ${t} has not been overridden.`},e.BROKER_ERRORS={fireIntent:(0,e.generateOverrideError)("fireIntent","handleFiredIntent"),fireIntentForContext:(0,e.generateOverrideError)("fireIntentForContext","handleFiredIntentForContext"),getInfoForIntent:(0,e.generateOverrideError)("getInfoForIntent","handleInfoForIntent"),getInfoForIntentsByContext:(0,e.generateOverrideError)("getInfoForIntentsByContext","handleInfoForIntentsByContext"),joinSessionContextGroupWithJoinContextGroup:"The Context Group you have tried to join is a Session Context Group. Custom Context Groups can only be defined by the Interop Broker through code or manifest configuration. Please use joinSessionContextGroup.",fdc3Open:(0,e.generateOverrideError)("fdc3.open","fdc3HandleOpen"),fdc3FindInstances:(0,e.generateOverrideError)("fdc3.findInstances","fdc3HandleFindInstances"),fdc3GetAppMetadata:(0,e.generateOverrideError)("fdc3.getAppMetadata","fdc3HandleGetAppMetadata"),fdc3GetInfo:(0,e.generateOverrideError)("fdc3.getInfo","fdc3HandleGetInfo")};e.wrapIntentHandler=(e,t)=>async n=>{try{return e(n)}catch(e){throw console.error(`Error thrown by handler ${t}: ${e}`),e}}}(Hi);var Ni,Di,Ui={};function Vi(){if(Di)return Gi;Di=1;var e,t,n,r=s&&s.__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},o=s&&s.__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)},a=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Gi,"__esModule",{value:!0}),Gi.InteropBroker=void 0;const c=d,h=a(function(){if(Bi)return Wi;Bi=1,Object.defineProperty(Wi,"__esModule",{value:!0});const e=Cr();return Wi.default=class{constructor(e,t){this.provider=e,this.id=t,this.lastContext=void 0,this.contextGroupMap=new Map,this.clients=new Map,this.registerListeners()}registerListeners(){this.provider.register(`sessionContextGroup:getContext-${this.id}`,this.getCurrentContext.bind(this)),this.provider.register(`sessionContextGroup:setContext-${this.id}`,this.setContext.bind(this)),this.provider.register(`sessionContextGroup:handlerAdded-${this.id}`,this.handlerAdded.bind(this)),this.provider.register(`sessionContextGroup:handlerRemoved-${this.id}`,this.handlerRemoved.bind(this))}getCurrentContext(e){return e.type?this.contextGroupMap.get(e.type):this.lastContext}setContext(t,n){const{context:i}=t,r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name} not in Session Client State Map`);this.contextGroupMap.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{e.contextHandlers.get(i.type)?.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getClientState(e){return this.clients.get(e.endpointId)}async handlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(i){const e=r.contextHandlers.get(i)||[];r.contextHandlers.set(i,[...e,n]);const o=this.contextGroupMap.get(i);o&&await this.provider.dispatch(t,n,o)}else{r.globalHandler=n;const e=[...this.contextGroupMap.keys()].map((async e=>{const i=this.contextGroupMap.get(e);i&&await this.provider.dispatch(t,n,i)}));await Promise.all(e)}}handlerRemoved(e,t){const{handlerId:n}=e,i=this.clients.get(t.endpointId);i?(Array.from(i.contextHandlers).forEach((([,e])=>{const t=e.indexOf(n);t>-1&&e.splice(t,1)})),i.globalHandler===n&&(i.globalHandler=void 0)):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={contextHandlers:new Map,clientIdentity:e,globalHandler:void 0};this.clients.set(e.endpointId,t)}}onDisconnection(e){this.clients.delete(e.endpointId)}},Wi}()),l=Hi,u=a(i),p=function(){if(Ni)return Ui;Ni=1,Object.defineProperty(Ui,"__esModule",{value:!0}),Ui.PrivateChannelProvider=void 0;const e=Vi();return Ui.PrivateChannelProvider=class t{constructor(e,t){this.provider=e,this.id=t,this.clients=new Map,this.registerListeners(),this.contextByContextType=new Map,this.lastContext=void 0,this.provider.onConnection((e=>this.registerNewClient(e))),this.provider.onDisconnection((async e=>{const{endpointId:t}=e;this.clients.has(t)&&await this.handleClientDisconnecting(e),0===(await this.provider.getAllClientInfo()).length&&this.provider.destroy()}))}getClientState(e){return this.clients.get(e.endpointId)}registerListeners(){this.provider.register("broadcast",this.broadcast.bind(this)),this.provider.register("getCurrentContext",this.getCurrentContext.bind(this)),this.provider.register("contextHandlerAdded",this.contextHandlerAdded.bind(this)),this.provider.register("contextHandlerRemoved",this.contextHandlerRemoved.bind(this)),this.provider.register("nonStandardHandlerRemoved",this.nonStandardHandlerRemoved.bind(this)),this.provider.register("onAddContextHandlerAdded",this.onAddContextHandlerAdded.bind(this)),this.provider.register("onDisconnectHandlerAdded",this.onDisconnectHandlerAdded.bind(this)),this.provider.register("onUnsubscribeHandlerAdded",this.onUnsubscribeHandlerAdded.bind(this)),this.provider.register("clientDisconnecting",((e,t)=>{this.handleClientDisconnecting(t)}))}broadcast(t,n){const{context:i}=t;if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name}, tried to call broadcast, is not connected to this Private Channel`);const r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to broadcast - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);this.contextByContextType.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{const t=e.handlerIdsByContextTypes.get(i.type);t&&t.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getCurrentContext(e,t){const{contextType:n}=e;if(!this.getClientState(t))throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call getCurrentContext, is not connected to this Private Channel`);if(void 0!==n){return this.contextByContextType.get(n)||null}return this.lastContext?this.lastContext:null}contextHandlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call addContextListener, is not connected to this Private Channel`);if(i){const e=r.handlerIdsByContextTypes.get(i)||[];r.handlerIdsByContextTypes.set(i,[...e,n])}else r.globalHandler=n;Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&e.onAddContextListenerHandlerId&&this.provider.dispatch(e.clientIdentity,e.onAddContextListenerHandlerId,i)}))}async contextHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);if(i){let e;if(i.globalHandler===n)i.globalHandler=void 0;else for(const[t,r]of i.handlerIdsByContextTypes){const i=r.indexOf(n);i>-1&&(r.splice(i,1),e=t)}const r=(await this.getConnectedClients()).map((async n=>{const{clientIdentity:i,clientIdentity:{endpointId:r},onUnsubscribeHandlerId:o}=n;r!==t.endpointId&&o&&await this.provider.dispatch(i,o,e)}));try{await Promise.all(r)}catch(e){throw console.error(`Problem when attempting to dispatch to onUnsubscribeHandlers. Error: ${e} Removing Client: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}`),new Error(e)}}else console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}.`)}nonStandardHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);i?i.onDisconnectHandlerId===n?i.onDisconnectHandlerId=void 0:i.onAddContextListenerHandlerId===n?i.onAddContextListenerHandlerId=void 0:i.onUnsubscribeHandlerId===n&&(i.onUnsubscribeHandlerId=void 0):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}onAddContextHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onAddContextListener, is not connected to this Private Channel`);n.onAddContextListenerHandlerId=i,Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&Array.from(e.handlerIdsByContextTypes.keys()).forEach((e=>{this.provider.dispatch(t,i,e)}))}))}onDisconnectHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onDisconnect, is not connected to this Private Channel`);n.onDisconnectHandlerId=i}onUnsubscribeHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onUnsubscribe, is not connected to this Private Channel`);n.onUnsubscribeHandlerId=i}removeClient(e){const t=this.getClientState(e);if(!t)throw new Error(`Client with Identity: ${e.uuid} ${e.name}, tried to call disconnect, is not connected to this Private Channel`);t.handlerIdsByContextTypes.clear(),this.clients.delete(e.endpointId)}async fireOnDisconnectForOtherClients(e){const{endpointId:t}=e,n=(await this.getConnectedClients()).map((async e=>{const{clientIdentity:{endpointId:n},onDisconnectHandlerId:i}=e;n!==t&&i&&await this.provider.dispatch(e.clientIdentity,i)}));try{await Promise.all(n)}catch(t){throw console.error(`Problem when attempting to dispatch to onDisconnectHandlers. Error: ${t} Disconnecting Client: uuid: ${e.uuid}. name: ${e.name}. endpointId: ${e.endpointId}`),new Error(t)}}async unsubscribeAll(e){const{endpointId:t}=e,n=this.clients.get(t);if(n){const t=Array.from(n.handlerIdsByContextTypes.values()).flat(),i=n.globalHandler;if(t.length>0){const n=t.map((async t=>this.contextHandlerRemoved({handlerId:t},e)));try{await Promise.all(n)}catch(e){console.error(e.message)}}if(i)try{await this.contextHandlerRemoved({handlerId:i},e)}catch(e){console.error(e.message)}}}async handleClientDisconnecting(e){await this.unsubscribeAll(e),this.removeClient(e),await this.fireOnDisconnectForOtherClients(e)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={clientIdentity:e,handlerIdsByContextTypes:new Map,globalHandler:void 0,onAddContextListenerHandlerId:void 0,onUnsubscribeHandlerId:void 0,onDisconnectHandlerId:void 0};this.clients.set(e.endpointId,t)}}async getConnectedClients(){const e=await this.provider.getAllClientInfo();return Array.from(this.clients.values()).filter((t=>{const{uuid:n,name:i}=t.clientIdentity;return e.some((e=>i===e.name&&n===e.uuid))}))}static init(e,n){return new t(e,n)}},Ui}(),w=G,y=[{id:"green",displayMetadata:{color:"#00CC88",name:"green"}},{id:"purple",displayMetadata:{color:"#8C61FF",name:"purple"}},{id:"orange",displayMetadata:{color:"#FF8C4C",name:"orange"}},{id:"red",displayMetadata:{color:"#FF5E60",name:"red"}},{id:"pink",displayMetadata:{color:"#FF8FB8",name:"pink"}},{id:"yellow",displayMetadata:{color:"#E9FF8F",name:"yellow"}}];let f=class i extends c.Base{constructor(i,s,a){super(i),e.set(this,void 0),t.set(this,void 0),n.set(this,void 0),this.getProvider=()=>o(this,n,"f").getValue(),this.interopClients=new Map,this.contextGroupsById=new Map,r(this,t,a.contextGroups??[...y],"f"),r(this,e,a.fdc3Info,"f"),a?.logging&&(this.logging=a.logging),this.intentClientMap=new Map,this.lastContextMap=new Map,this.sessionContextGroupMap=new Map,r(this,n,new w.Lazy(s),"f"),this.setContextGroupMap(),this.setupChannelProvider()}static createClosedConstructor(...e){return class extends i{constructor(...t){if(t.length){const[n,i,r]=t;if(r&&"object"==typeof r&&!(0,u.default)(r,e[2]))return console.warn("You have modified the parameters of the InteropOverride constructor. This behavior is deprecated and will be removed in a future version. You can modify these options in your manifest. Please consult our Interop docs for guidance on migrating to the new override scheme."),void super(e[0],e[1],r);console.warn("You are attempting to pass arguments to the InteropOverride constructor. This is not necessary, and these passed arguments will be ignored. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.")}super(...e)}}}setContext({context:e},t){this.wire.sendAction("interop-broker-set-context").catch((e=>{}));const n=this.getClientState(t);if(!n||!n.contextGroupId)throw n?new Error("You must join a context group before you can set context."):new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);{const{contextGroupId:t}=n;this.setContextForGroup({context:e},t)}}setContextForGroup({context:e},t){this.wire.sendAction("interop-broker-set-context-for-group").catch((e=>{}));const n=this.contextGroupsById.get(t);if(!n)throw new Error(`Unable to set context for context group that isn't in the context group mapping: ${t}.`);const r=i.checkContextIntegrity(e);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(e)}`);const o=e.type;n.set(o,e),this.lastContextMap.set(t,o);Array.from(this.interopClients.values()).filter((e=>e.contextGroupId===t)).forEach((t=>{for(const[,n]of t.contextHandlers)i.isContextTypeCompatible(o,n.contextType)&&this.invokeContextHandler(t.clientIdentity,n.handlerId,e)}))}getCurrentContext(e,t){this.wire.sendAction("interop-broker-get-current-context").catch((e=>{}));const n=this.getClientState(t);if(!n?.contextGroupId)throw new Error("You must be a member of a context group to call getCurrentContext");const{contextGroupId:i}=n,r=this.contextGroupsById.get(i),o=this.lastContextMap.get(i),s=e?.contextType??o;return r&&s?r.get(s):void 0}async joinContextGroup({contextGroupId:e,target:t},n){if(this.wire.sendAction("interop-broker-join-context-group").catch((e=>{})),this.sessionContextGroupMap.has(e))throw new Error(l.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup);if(t){i.hasEndpointId(t)&&await this.addClientToContextGroup({contextGroupId:e},t);try{const n=this.channel.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name));if(!n.length)throw new Error(`Given Identity ${t.uuid} ${t.name} is not connected to the Interop Broker.`);n.length>1&&console.warn(`More than one connection found for identity ${t.uuid} ${t.name}`);const i=[];for(const t of n)i.push(this.addClientToContextGroup({contextGroupId:e},t));await Promise.all(i)}catch(e){throw new Error(e)}}else await this.addClientToContextGroup({contextGroupId:e},n)}async addClientToContextGroup({contextGroupId:e},t){this.wire.sendAction("interop-broker-add-client-to-context-group").catch((e=>{}));const n=this.getClientState(t);if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(!this.getContextGroups().find((t=>t.id===e)))throw new Error(`Attempting to join a context group that does not exist: ${e}. You may only join existing context groups.`);if(n.contextGroupId!==e){n.contextGroupId=e,await this.setCurrentContextGroupInClientOptions(t,e);const i=this.contextGroupsById.get(e);for(const[,e]of n.contextHandlers){const{contextType:n,handlerId:r}=e;if(void 0===n)i.forEach(((e,n)=>{this.invokeContextHandler(t,r,e)}));else if(i.has(n)){const e=i.get(n);e&&this.invokeContextHandler(t,r,e)}}}}async removeFromContextGroup({target:e},t){if(this.wire.sendAction("interop-broker-remove-from-context-group").catch((e=>{})),e){i.hasEndpointId(e)&&await this.removeClientFromContextGroup(e);try{const t=this.channel.connections.filter((t=>t.uuid===e.uuid&&t.name===e.name));if(!t.length)throw new Error(`No connection found for given Identity ${e.uuid} ${e.name}`);t.length>1&&console.warn(`More than one connection found for identity ${e.uuid} ${e.name}`);const n=[];for(const e of t)n.push(this.removeClientFromContextGroup(e));await Promise.all(n)}catch(e){throw new Error(e)}}else await this.removeClientFromContextGroup(t)}async removeClientFromContextGroup(e){this.wire.sendAction("interop-broker-remove-client-from-context-group").catch((e=>{}));const t=this.getClientState(e);t&&(t.contextGroupId=void 0),await this.setCurrentContextGroupInClientOptions(e,null)}getContextGroups(){return this.wire.sendAction("interop-broker-get-context-groups").catch((e=>{})),o(this,t,"f").map((e=>({...e})))}getInfoForContextGroup({contextGroupId:e}){return this.wire.sendAction("interop-broker-get-info-for-context-group").catch((e=>{})),this.getContextGroups().find((t=>t.id===e))}getAllClientsInContextGroup({contextGroupId:e}){this.wire.sendAction("interop-broker-get-all-clients-in-context-group").catch((e=>{}));return Array.from(this.interopClients.values()).filter((t=>t.contextGroupId===e)).map((e=>e.clientIdentity))}async handleFiredIntent(e,t){const n=(0,l.generateOverrideWarning)("fdc3.raiseIntent","InteropBroker.handleFiredIntent",t,"interopClient.fireIntent");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntent)}async setIntentTarget(e,t){this.wire.sendAction("interop-broker-set-intent-target").catch((e=>{}));const n=this.intentClientMap.get(t.name),i=`intent-handler-${e.name}`;if(n){const t=n.get(i);if(t){if(t.pendingIntents.push(e),t.clientIdentity&&t.isReady){const{clientIdentity:e,pendingIntents:n}=t;try{const r=n[n.length-1];await this.invokeIntentHandler(e,i,r),t.pendingIntents=[]}catch(n){console.error(`Error invoking intent handler for client ${e.uuid}/${e.name}/${e.endpointId}`),t.isReady=!1}}}else n.set(i,{isReady:!1,pendingIntents:[e]})}else{this.intentClientMap.set(t.name,new Map);const n=this.intentClientMap.get(t.name);n&&n.set(i,{isReady:!1,pendingIntents:[e]})}}async handleInfoForIntent(e,t){const n=(0,l.generateOverrideWarning)("fdc3.findIntent","InteropBroker.handleInfoForIntent",t,"interopClient.getInfoForIntent");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntent)}async handleInfoForIntentsByContext(e,t){const n=(0,l.generateOverrideWarning)("fdc3.findIntentsByContext","InteropBroker.handleInfoForIntentsByContext",t,"interopClient.getInfoForIntentsByContext");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntentsByContext)}async handleFiredIntentForContext(e,t){const n=(0,l.generateOverrideWarning)("fdc3.raiseIntentForContext","InteropBroker.handleFiredIntentForContext",t,"interopClient.fireIntentForContext");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntentForContext)}async clientDisconnected(e){}async fdc3HandleOpen({app:e,context:t},n){const i=(0,l.generateOverrideWarning)("fdc3.open","InteropBroker.fdc3HandleOpen",n);throw console.warn(i),new Error(l.BROKER_ERRORS.fdc3Open)}async fdc3HandleFindInstances(e,t){const n=(0,l.generateOverrideWarning)("fdc3.open","InteropBroker.fdc3HandleFindInstances",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3FindInstances)}async fdc3HandleGetAppMetadata(e,t){const n=(0,l.generateOverrideWarning)("fdc3.getAppMetadata","InteropBroker.fdc3HandleGetAppMetadata",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3GetAppMetadata)}async invokeContextHandler(e,t,n){const i=await this.getProvider();try{await i.dispatch(e,t,n)}catch(i){console.error(`Error invoking context handler ${t} for context type ${n.type} in client ${e.uuid}/${e.name}/${e.endpointId}`,i)}}async invokeIntentHandler(e,t,n){const i=await this.getProvider();await i.dispatch(e,t,n)}async fdc3HandleGetInfo(t,n){const{fdc3Version:i}=t;return{fdc3Version:i,...o(this,e,"f"),optionalFeatures:{OriginatingAppMetadata:!1,UserChannelMembershipAPIs:!0},appMetadata:{appId:"",instanceId:""}}}async getAllClientInfo(){return(await this.getProvider()).getAllClientInfo()}decorateSnapshot(e){return{...e,interopSnapshotDetails:{contextGroupStates:this.getContextGroupStates()}}}applySnapshot(e,t){const n=e?.interopSnapshotDetails?.contextGroupStates;n&&(t?.closeExistingWindows||this.updateExistingClients(n),this.rehydrateContextGroupStates(n))}updateExistingClients(e){this.interopClients.forEach((t=>{const{clientIdentity:n,contextGroupId:r,contextHandlers:o}=t;if(r){const t=e[r];for(const[,e]of Object.entries(t))o.forEach((t=>{const{handlerId:r,contextType:o}=t;i.isContextTypeCompatible(e.type,o)&&this.invokeContextHandler(n,r,e)}))}}))}getContextGroupStates(){return i.toObject(this.contextGroupsById)}rehydrateContextGroupStates(e){const t=Object.entries(e);for(const[e,n]of t){const t=Object.entries(n);for(const[n,i]of t)if(this.contextGroupsById.has(e)){this.contextGroupsById.get(e).set(n,i)}else console.warn(`Attempting to set a context group that isn't in the context group mapping. Skipping context group rehydration for: ${e}`)}}contextHandlerRegistered({contextType:e,handlerId:t},n){const i={contextType:e,handlerId:t},r=this.getClientState(n);if(r?.contextHandlers.set(t,i),r&&r.contextGroupId){const{contextGroupId:i}=r,o=this.contextGroupsById.get(i);if(void 0===e)o.forEach(((e,i)=>{this.invokeContextHandler(n,t,e)}));else if(o.has(e)){const i=o.get(e);i&&this.invokeContextHandler(n,t,i)}}}async intentHandlerRegistered(e,t){const{handlerId:n}=e,i=this.intentClientMap.get(t.name),r=i?.get(n);if(i)if(r){const{pendingIntents:e}=r;r.clientIdentity=t,r.isReady=!0;try{if(e.length>0){const i=e[e.length-1];await this.invokeIntentHandler(t,n,i),r.pendingIntents=[]}}catch(e){console.error(`Error invoking intent handler: ${n} for client ${t.uuid}/${t.name}/${t.endpointId}`)}}else i.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t});else{this.intentClientMap.set(t.name,new Map);const e=this.intentClientMap.get(t.name);e&&e.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t})}}removeContextHandler({handlerId:e},t){const n=this.getClientState(t);n&&n.contextHandlers.delete(e)}handleJoinSessionContextGroup({sessionContextGroupId:e},t){try{if(!e)throw new Error("Failed to join session context group: must specify group id.");const n=this.sessionContextGroupMap.get(e);if(n)n.registerNewClient(t);else{const n=new h.default(this.channel,e);n.registerNewClient(t),this.sessionContextGroupMap.set(e,n)}return{hasConflict:this.contextGroupsById.has(e)}}catch(e){throw new Error(e)}}getClientState(e){return this.interopClients.get(e.endpointId)}static toObject(e){const t=Object.fromEntries(e),n={};return Object.entries(t).forEach((([e,t])=>{const i=Object.fromEntries(t);n[e]=i})),n}static checkContextIntegrity(e){if(!e)return{isValid:!1,reason:"No context supplied"};if("object"!=typeof e)return{isValid:!1,reason:"Context must be an Object"};if(!e.type)return{isValid:!1,reason:"Context must have a type property"};if(e.id&&"object"!=typeof e.id)return{isValid:!1,reason:"Context id must be an Object populated with key-value identifiers (if set)"};if(e.id){const{id:t}=e,n=Object.keys(t);let i=!1;if(!n.length)return{isValid:!1,reason:"Context id must have at least one key-value identifier"};if(n.forEach((e=>{"string"==typeof e&&"string"==typeof t[e]||(i=!0)})),i)return{isValid:!1,reason:"Context id key-value identifiers must be of type string"}}return e.name&&"string"!=typeof e.name?{isValid:!1,reason:"Context name must be of string type (if set)"}:{isValid:!0}}static hasEndpointId(e){return void 0!==e.endpointId}static isContextTypeCompatible(e,t){return void 0===t||e===t}setContextGroupMap(){for(const e of this.getContextGroups())this.contextGroupsById.set(e.id,new Map)}async setCurrentContextGroupInClientOptions(e,t){try{const n=await this.fin.System.getEntityInfo(e.uuid,e.name);let i;"view"===n.entityType?i=await this.fin.View.wrap(e):"window"===n.entityType&&(i=await this.fin.Window.wrap(e)),i&&await i.updateOptions({interop:{currentContextGroup:t}})}catch(e){}}async setupChannelProvider(){try{const e=await this.getProvider();this.channel=e,this.wireChannel(e)}catch(e){throw new Error(`Error setting up Interop Broker Channel Provider: ${e}`)}}wireChannel(e){e.onConnection((async(e,t)=>{if(!await this.isConnectionAuthorized(e,t))throw new Error(`Connection not authorized for ${e.uuid}, ${e.name}`);if(!e.endpointId)throw new Error("Version too old to be compatible with Interop. Please upgrade your runtime to a more recent version.");const n={contextGroupId:void 0,contextHandlers:new Map,clientIdentity:e};t?.currentContextGroup&&this.contextGroupsById.has(t.currentContextGroup)&&(n.contextGroupId=t?.currentContextGroup),this.interopClients.set(e.endpointId,n)})),e.onDisconnection((e=>{this.interopClients.delete(e.endpointId);const t=this.intentClientMap.get(e.name);t&&e.uuid===this.fin.me.uuid&&t.forEach((e=>{e.isReady=!1})),this.sessionContextGroupMap.forEach((t=>{t.onDisconnection(e)})),this.clientDisconnected(e)})),e.beforeAction((async(e,t,n)=>{if(!await this.isActionAuthorized(e,t,n))throw new Error(`Action (${e}) not authorized for ${n.uuid}, ${n.name}`);this.logging?.beforeAction?.enabled&&console.log(e,t,n)})),e.afterAction(((e,t,n)=>{this.logging?.afterAction?.enabled&&console.log(e,t,n)})),e.register("setContext",this.setContext.bind(this)),e.register("fireIntent",this.handleFiredIntent.bind(this)),e.register("getCurrentContext",this.getCurrentContext.bind(this)),e.register("getInfoForIntent",this.handleInfoForIntent.bind(this)),e.register("getInfoForIntentsByContext",this.handleInfoForIntentsByContext.bind(this)),e.register("fireIntentForContext",this.handleFiredIntentForContext.bind(this)),e.register("getContextGroups",this.getContextGroups.bind(this)),e.register("joinContextGroup",this.joinContextGroup.bind(this)),e.register("removeFromContextGroup",this.removeFromContextGroup.bind(this)),e.register("getAllClientsInContextGroup",this.getAllClientsInContextGroup.bind(this)),e.register("getInfoForContextGroup",this.getInfoForContextGroup.bind(this)),e.register("contextHandlerRegistered",this.contextHandlerRegistered.bind(this)),e.register("intentHandlerRegistered",this.intentHandlerRegistered.bind(this)),e.register("removeContextHandler",this.removeContextHandler.bind(this)),e.register("sessionContextGroup:createIfNeeded",this.handleJoinSessionContextGroup.bind(this)),e.register("fdc3Open",this.fdc3HandleOpen.bind(this)),e.register("fdc3v2FindIntentsByContext",this.handleInfoForIntentsByContext.bind(this)),e.register("fdc3FindInstances",this.fdc3HandleFindInstances.bind(this)),e.register("fdc3GetAppMetadata",this.fdc3HandleGetAppMetadata.bind(this)),e.register("fdc3v2GetInfo",(async(e,t)=>this.fdc3HandleGetInfo.bind(this)(e,t))),e.register("createPrivateChannelProvider",(async e=>{const{channelId:t}=e,n=await this.fin.InterApplicationBus.Channel.create(t);p.PrivateChannelProvider.init(n,t)}))}isConnectionAuthorized(e,t){return this.wire.sendAction("interop-broker-is-connection-authorized").catch((e=>{})),Promise.resolve(!0)}isActionAuthorized(e,t,n){return this.wire.sendAction("interop-broker-is-action-authorized").catch((e=>{})),Promise.resolve(!0)}};return Gi.InteropBroker=f,e=new WeakMap,t=new WeakMap,n=new WeakMap,Gi}var zi,Ki={},qi={},Ji=s&&s.__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},Yi=s&&s.__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)};Object.defineProperty(qi,"__esModule",{value:!0});const Zi=d,Qi=Hi;class Xi extends Zi.Base{constructor(e,t,n){super(e),zi.set(this,void 0),this.id=n,Ji(this,zi,t,"f")}async setContext(e){this.wire.sendAction("interop-session-context-group-set-context").catch((e=>{}));return(await Yi(this,zi,"f")).dispatch(`sessionContextGroup:setContext-${this.id}`,{sessionContextGroupId:this.id,context:e})}async getCurrentContext(e){this.wire.sendAction("interop-session-context-group-get-context").catch((e=>{}));return(await Yi(this,zi,"f")).dispatch(`sessionContextGroup:getContext-${this.id}`,{sessionContextGroupId:this.id,type:e})}async addContextHandler(e,t){if(this.wire.sendAction("interop-session-context-group-add-handler").catch((e=>{})),"function"!=typeof e)throw new Error("Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");const n=await Yi(this,zi,"f");let i;return i=t?`sessionContextHandler:invoke-${this.id}-${t}-${(0,Qi.generateId)()}`:`sessionContextHandler:invoke-${this.id}`,n.register(i,(0,Qi.wrapContextHandler)(e,i)),await n.dispatch(`sessionContextGroup:handlerAdded-${this.id}`,{handlerId:i,contextType:t}),{unsubscribe:await this.createUnsubscribeCb(i)}}async createUnsubscribeCb(e){const t=await Yi(this,zi,"f");return async()=>{t.remove(e),await t.dispatch(`sessionContextGroup:handlerRemoved-${this.id}`,{handlerId:e})}}getUserInstance(){return{id:this.id,setContext:(0,Qi.wrapInTryCatch)(this.setContext.bind(this),"Failed to set context: "),getCurrentContext:(0,Qi.wrapInTryCatch)(this.getCurrentContext.bind(this),"Failed to get context: "),addContextHandler:(0,Qi.wrapInTryCatch)(this.addContextHandler.bind(this),"Failed to add context handler: ")}}}qi.default=Xi,zi=new WeakMap;var er={},tr={},nr={},ir={},rr=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),or=s&&s.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),sr=s&&s.__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)&&rr(t,e,n);return or(t,e),t};Object.defineProperty(ir,"__esModule",{value:!0}),ir.PrivateChannelClient=void 0;const ar=sr(Hi);var cr,dr;function hr(){if(cr)return tr;cr=1;var e,t=s&&s.__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)},n=s&&s.__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},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(tr,"__esModule",{value:!0}),tr.FDC3ModuleBase=void 0;const o=nr,a=Hi,c=wr(),d=r(i);return tr.FDC3ModuleBase=class{get client(){return t(this,e,"f").call(this)}get fin(){return this.wire.getFin()}constructor(t,i){this.wire=i,e.set(this,void 0),n(this,e,t,"f")}async broadcast(e){return this.wire.sendAction("fdc3-broadcast").catch((e=>{})),this.client.setContext(e)}async _open(e,t){this.wire.sendAction("fdc3-open").catch((e=>{}));try{return await c.InteropClient.ferryFdc3Call(this.client,"fdc3Open",{app:e,context:t})}catch(e){const t=e.message===a.BROKER_ERRORS.fdc3Open?"ResolverUnavailable":e.message;throw new Error(t)}}async _getChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:"system",...(0,o.getUnsupportedChannelApis)()})))}async getOrCreateChannel(e){this.wire.sendAction("fdc3-get-or-create-channel").catch((e=>{}));const t=(await this._getChannels()).find((t=>t.id===e));if(t)return{...t,type:"system",...(0,o.getUnsupportedChannelApis)()};try{const t=await this.client.joinSessionContextGroup(e);return(0,o.buildAppChannelObject)(t)}catch(e){throw console.error(e.message),new Error(o.ChannelError.CreationFailed)}}async getSystemChannels(){return this.wire.sendAction("fdc3-get-system-channels").catch((e=>{})),this._getChannels()}async joinChannel(e){this.wire.sendAction("fdc3-join-channel").catch((e=>{}));try{return await this.client.joinContextGroup(e)}catch(e){if(e.message===a.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup?console.error("The Channel you have tried to join is an App Channel. Custom Channels can only be defined by the Interop Broker through code or manifest configuration. Please use getOrCreateChannel."):console.error(e.message),e.message.startsWith("Attempting to join a context group that does not exist"))throw new Error(o.ChannelError.NoChannelFound);throw new Error(o.ChannelError.AccessDenied)}}async getCurrentChannel(){this.wire.sendAction("fdc3-get-current-channel").catch((e=>{}));const e=await this.getCurrentContextGroupInfo();return e?this.buildChannelObject(e):null}async leaveCurrentChannel(){return this.wire.sendAction("fdc3-leave-current-channel").catch((e=>{})),this.client.removeFromContextGroup()}async getCurrentContextGroupInfo(){const e=await this.client.getContextGroups(),t=e.map((async e=>this.client.getAllClientsInContextGroup(e.id))),n=(await Promise.all(t)).findIndex((e=>e.some((e=>{const{uuid:t,name:n}=e;return this.wire.me.uuid===t&&this.wire.me.name===n}))));return e[n]}async buildChannelObject(e){return{...e,type:"system",addContextListener:(...[e,t])=>{let n,i;"function"==typeof e?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),n=e):(n=t,"string"==typeof e&&(i=e));const r=(async()=>{let e=!0;const t=await this.client.getCurrentContext(i);return this.client.addContextHandler(((i,r)=>{if(!e||(e=!1,!(0,d.default)(t,i)))return n(i,r)}),i)})();return{...r,unsubscribe:()=>r.then((e=>e.unsubscribe()))}},broadcast:this.broadcast.bind(this),getCurrentContext:async e=>{const t=await this.client.getCurrentContext(e);return void 0===t?null:t}}}},e=new WeakMap,tr}ir.PrivateChannelClient=class{constructor(e,t){this.id=t,this.client=e,this.listeners=new Map}async broadcast(e){return this.client.dispatch("broadcast",{context:e})}async getCurrentContext(e){return this.client.dispatch("getCurrentContext",{contextType:e})}async addContextListener(e,t){if("function"!=typeof t)throw new Error("Non-function argument passed to the second parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");let n;n=e?`contextHandler:invoke-${this.id}-${e}-${ar.generateId()}`:`contextHandler:invoke-${this.id}-${ar.generateId()}`,this.client.register(n,ar.wrapContextHandler(t,n));const i={unsubscribe:await this.createContextUnsubscribeCb(n)};return this.listeners.set(n,i),await this.client.dispatch("contextHandlerAdded",{handlerId:n,contextType:e}),i}createNonStandardUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch("nonStandardHandlerRemoved",{handlerId:e})}}createContextUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch("contextHandlerRemoved",{handlerId:e})}}onAddContextListener(e){const t=`onContextHandlerAdded:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch("onAddContextHandlerAdded",{handlerId:t}),n}onDisconnect(e){const t=`onDisconnect:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch("onDisconnectHandlerAdded",{handlerId:t}),n}onUnsubscribe(e){const t=`onUnsubscribe:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch("onUnsubscribeHandlerAdded",{handlerId:t}),n}async cleanUpAllSubs(){Array.from(this.listeners.keys()).forEach((e=>{this.client.remove(e),this.listeners.delete(e)}))}async disconnect(){try{await this.client.dispatch("clientDisconnecting"),await this.cleanUpAllSubs(),await this.client.disconnect()}catch(e){throw new Error(e.message)}}},function(e){var t=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.getIntentResolution=e.isChannel=e.isContext=e.connectPrivateChannel=e.buildAppChannelObject=e.buildPrivateChannelObject=e.ChannelError=e.ResultError=e.UnsupportedChannelApiError=e.getUnsupportedChannelApis=void 0;const n=Hi,r=ir,o=t(i);e.getUnsupportedChannelApis=e=>({addContextListener:()=>{throw new a("Channel.addContextListener",e)},broadcast:()=>{throw new a("Channel.broadcast",e)},getCurrentContext:()=>{throw new a("Channel.getCurrentContext",e)}});class a extends Error{constructor(e,t="System"){super(e),this.message=`Calling ${e} on an instance of a ${t} Channel returned by fdc3.get${t}Channels is not supported. If you would like to use a ${t} Channel, please use fdc3.joinChannel, fdc3.addContextListener, and fdc3.broadcast instead.`}}var c,d;e.UnsupportedChannelApiError=a,function(e){e.NoResultReturned="NoResultReturned",e.IntentHandlerRejected="IntentHandlerRejected"}(c=e.ResultError||(e.ResultError={})),(d=e.ChannelError||(e.ChannelError={})).NoChannelFound="NoChannelFound",d.AccessDenied="AccessDenied",d.CreationFailed="CreationFailed";e.buildPrivateChannelObject=e=>{let t=!1;const n=()=>{if(t)throw new Error("Private Channel Client has been disconnected from the Private Channel")};return{id:e.id,type:"private",broadcast:async t=>(n(),e.broadcast(t)),getCurrentContext:async t=>(n(),e.getCurrentContext(t)),addContextListener:async(t,i)=>{n();let r=i,o=t;"function"==typeof t&&(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),r=t,o=null);return e.addContextListener(o,r)},onAddContextListener:t=>(n(),e.onAddContextListener(t)),disconnect:async()=>(n(),t=!0,e.disconnect()),onDisconnect:t=>(n(),e.onDisconnect(t)),onUnsubscribe:t=>(n(),e.onUnsubscribe(t))}};e.buildAppChannelObject=e=>({id:e.id,type:"app",broadcast:e.setContext,getCurrentContext:async t=>{const n=await e.getCurrentContext(t);return void 0===n?null:n},addContextListener:(t,n)=>{let i,r;"function"==typeof t?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),i=t):(i=n,"string"==typeof t&&(r=t));const s=(async()=>{let t=!0;const n=await e.getCurrentContext(r);return e.addContextHandler(((e,r)=>{if(!t||(t=!1,!(0,o.default)(n,e)))return i(e,r)}),r)})();return{...s,unsubscribe:()=>s.then((e=>e.unsubscribe()))}}});e.connectPrivateChannel=async t=>{try{const n=await fin.InterApplicationBus.Channel.connect(t),i=new r.PrivateChannelClient(n,t);return(0,e.buildPrivateChannelObject)(i)}catch(e){throw new Error(`Private Channel with id: ${t} doesn't exist`)}};e.isContext=e=>{if(e&&"object"==typeof e&&"type"in e){const{type:t}=e;return"string"==typeof t}return!1};e.isChannel=e=>{if(e&&"object"==typeof e&&"type"in e&&"id"in e){const{type:t,id:n}=e;return"string"==typeof t&&"string"==typeof n&&("app"===t||"private"===t)}return!1};e.getIntentResolution=async(t,i,r,o)=>{const s=(0,n.generateId)(),a=new Promise(((e,t)=>{fin.InterApplicationBus.subscribe({uuid:"*"},s,(t=>{e(t)})).catch((()=>t(new Error("getResult is not supported in this environment"))))})),d=r?{target:r,intentResolutionResultId:s}:{intentResolutionResultId:s},h=o?{name:o,context:i,metadata:d}:{...i,metadata:d},l=async()=>{let n=await a;if(!n||"object"!=typeof n)throw new Error(c.NoResultReturned);const{error:i}=n;if(i)throw new Error(c.IntentHandlerRejected);if((0,e.isChannel)(n)){const{id:i,type:r}=n;switch(r){case"private":n=await(0,e.connectPrivateChannel)(i);break;case"app":{const r=await t.joinSessionContextGroup(i);n=(0,e.buildAppChannelObject)(r);break}}}else if(!(0,e.isContext)(n))throw new Error(c.NoResultReturned);return n},u=o?await t.fireIntent(h):await t.fireIntentForContext(h);return"object"!=typeof u?{source:{appId:"",instanceId:""},intent:"",version:"2.0",getResult:l}:{...u,getResult:l}}}(nr);var lr,ur,pr={};function wr(){if(ur)return Ki;ur=1;var e,t,n=s&&s.__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},i=s&&s.__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)},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ki,"__esModule",{value:!0}),Ki.InteropClient=void 0;const o=d,a=r(qi),c=function(){if(dr)return er;dr=1,Object.defineProperty(er,"__esModule",{value:!0}),er.Fdc3Module=void 0;const e=Hi,t=hr();class n extends t.FDC3ModuleBase{async open(e,t){await super._open(e,t)}addContextListener(e,t){let n;return this.wire.sendAction("fdc3-add-context-listener").catch((e=>{})),"function"==typeof e?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),n=this.client.addContextHandler(e)):n=this.client.addContextHandler(t,null===e?void 0:e),{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}addIntentListener(e,t){this.wire.sendAction("fdc3-add-intent-listener").catch((e=>{}));const n=this.client.registerIntentHandler((e=>{const{context:n,metadata:i}=e,{metadata:r}=n,o=i?.intentResolutionResultId||r?.intentResolutionResultId;o&&this.fin.InterApplicationBus.publish(o,null).catch((()=>null)),t(e.context)}),e,{fdc3Version:"1.2"});return{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}async raiseIntent(t,n,i){this.wire.sendAction("fdc3-raise-intent").catch((e=>{}));const r=i?{name:t,context:n,metadata:{target:i}}:{name:t,context:n};try{return await this.client.fireIntent(r)}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntent?"ResolverUnavailable":t.message;throw new Error(n)}}async findIntent(t,n){this.wire.sendAction("fdc3-find-intent").catch((e=>{}));try{return await this.client.getInfoForIntent({name:t,context:n})}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntent?"ResolverUnavailable":t.message;throw new Error(n)}}async findIntentsByContext(t){this.wire.sendAction("fdc3-find-intents-by-context").catch((e=>{}));try{return await this.client.getInfoForIntentsByContext(t)}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntentsByContext?"ResolverUnavailable":t.message;throw new Error(n)}}async raiseIntentForContext(t,n){this.wire.sendAction("fdc3-raise-intent-for-context").catch((e=>{}));try{return await this.client.fireIntentForContext({...t,metadata:{target:n}})}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntentForContext?"ResolverUnavailable":t.message;throw new Error(n)}}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}getInfo(){return this.wire.sendAction("fdc3-get-info").catch((e=>{})),{providerVersion:this.wire.environment.getAdapterVersionSync(),provider:`openfin-${this.wire.me.uuid}`,fdc3Version:"1.2"}}}return er.Fdc3Module=n,er}(),h=function(){if(lr)return pr;lr=1,Object.defineProperty(pr,"__esModule",{value:!0}),pr.Fdc3Module2=void 0;const e=hr(),t=Hi,n=wr(),i=nr,r=ir;class o extends e.FDC3ModuleBase{async open(e,t){return"string"==typeof e&&console.warn("Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string })."),super._open(e,t)}async findInstances(e){this.wire.sendAction("fdc3-find-instances").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,"fdc3FindInstances",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3FindInstances?"ResolverUnavailable":e.message;throw new Error(n)}}async getAppMetadata(e){this.wire.sendAction("fdc3-get-app-metadata").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,"fdc3GetAppMetadata",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3GetAppMetadata?"ResolverUnavailable":e.message;throw new Error(n)}}async addContextListener(e,t){this.wire.sendAction("fdc3-add-context-listener").catch((e=>{}));const n=e=>t=>{const{contextMetadata:n,...i}=t,r=n?[{...i},n]:[t,null];e(...r)};let i=t,r=n(i);return"function"==typeof e?(console.warn("addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)"),i=e,r=n(i),this.client.addContextHandler(r)):this.client.addContextHandler(r,null===e?void 0:e)}async findIntent(e,n,i){this.wire.sendAction("fdc3-find-intent").catch((e=>{}));try{return await this.client.getInfoForIntent({name:e,context:n,metadata:{resultType:i}})}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntent?"ResolverUnavailable":e.message;throw new Error(n)}}async findIntentsByContext(e,i){this.wire.sendAction("fdc3-find-intents-by-context").catch((e=>{}));const r=i?{context:e,metadata:{resultType:i}}:e;try{return await n.InteropClient.ferryFdc3Call(this.client,"fdc3v2FindIntentsByContext",r)}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntentsByContext?"ResolverUnavailable":e.message;throw new Error(n)}}async raiseIntent(e,n,r){this.wire.sendAction("fdc3-raise-intent").catch((e=>{}));try{return"string"==typeof r&&console.warn("Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string })."),(0,i.getIntentResolution)(this.client,n,r,e)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?"ResolverUnavailable":e.message;throw new Error(n)}}async raiseIntentForContext(e,n){this.wire.sendAction("fdc3-raise-intent-for-context").catch((e=>{}));try{return"string"==typeof n&&console.warn("Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string })."),(0,i.getIntentResolution)(this.client,e,n)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?"ResolverUnavailable":e.message;throw new Error(n)}}async addIntentListener(e,t){if(this.wire.sendAction("fdc3-add-intent-listener").catch((e=>{})),"string"!=typeof e)throw new Error("First argument must be an Intent name");return this.client.registerIntentHandler((async e=>{let n,i;const{context:r,metadata:o}=e,{contextMetadata:s,metadata:a,...c}=r,d=o?.intentResolutionResultId||a?.intentResolutionResultId;try{const e=a?{metadata:a,...c}:{...c};n=await t(e,s),i=n}catch(e){n=e,i={error:!0}}if(d&&this.fin.InterApplicationBus.publish(d,i).catch((()=>null)),n instanceof Error)throw new Error(n.message);return n}),e,{fdc3Version:"2.0"})}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}async createPrivateChannel(){const e=(0,t.generateId)();await n.InteropClient.ferryFdc3Call(this.client,"createPrivateChannelProvider",{channelId:e});const o=await this.fin.InterApplicationBus.Channel.connect(e),s=new r.PrivateChannelClient(o,e);return(0,i.buildPrivateChannelObject)(s)}async getUserChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:"user",...(0,i.getUnsupportedChannelApis)("User")})))}async getSystemChannels(){return console.warn("This API has been deprecated. Please use fdc3.getUserChannels instead."),super.getSystemChannels()}async joinUserChannel(e){return super.joinChannel(e)}async joinChannel(e){return console.warn("This API has been deprecated. Please use fdc3.joinUserChannel instead."),super.joinChannel(e)}async getCurrentChannel(){const e=await super.getCurrentChannel();return e?{...e,type:"user",broadcast:this.broadcast.bind(this)}:null}async getInfo(){return n.InteropClient.ferryFdc3Call(this.client,"fdc3v2GetInfo",{fdc3Version:"2.0"})}}return pr.Fdc3Module2=o,pr}(),l=Hi;let u=class extends o.Base{constructor(i,r){super(i),e.set(this,void 0),t.set(this,void 0),n(this,t,new Map,"f"),n(this,e,r,"f")}async setContext(t){this.wire.sendAction("interop-client-set-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("setContext",{context:t})}async addContextHandler(t,n){if(this.wire.sendAction("interop-client-add-context-handler").catch((e=>{})),"function"!=typeof t)throw new Error("Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");const r=await i(this,e,"f");let o;o=n?`invokeContextHandler-${n}-${(0,l.generateId)()}`:"invokeContextHandler";const s=(0,l.wrapContextHandler)(t,o);return r.register(o,s),await r.dispatch("contextHandlerRegistered",{handlerId:o,contextType:n}),{unsubscribe:async()=>{r.remove(o),await r.dispatch("removeContextHandler",{handlerId:o})}}}async getContextGroups(){this.wire.sendAction("interop-client-get-context-groups").catch((e=>{}));return(await i(this,e,"f")).dispatch("getContextGroups")}async joinContextGroup(t,n){this.wire.sendAction("interop-client-join-context-group").catch((e=>{}));const r=await i(this,e,"f");if(!t)throw new Error("No contextGroupId specified for joinContextGroup.");return r.dispatch("joinContextGroup",{contextGroupId:t,target:n})}async removeFromContextGroup(t){this.wire.sendAction("interop-client-remove-from-context-group").catch((e=>{}));return(await i(this,e,"f")).dispatch("removeFromContextGroup",{target:t})}async getAllClientsInContextGroup(t){this.wire.sendAction("interop-client-get-all-clients-in-context-group").catch((e=>{}));const n=await i(this,e,"f");if(!t)throw new Error("No contextGroupId specified for getAllClientsInContextGroup.");return n.dispatch("getAllClientsInContextGroup",{contextGroupId:t})}async getInfoForContextGroup(t){this.wire.sendAction("interop-client-get-info-for-context-group").catch((e=>{}));const n=await i(this,e,"f");if(!t)throw new Error("No contextGroupId specified for getInfoForContextGroup.");return n.dispatch("getInfoForContextGroup",{contextGroupId:t})}async fireIntent(t){this.wire.sendAction("interop-client-fire-intent").catch((e=>{}));return(await i(this,e,"f")).dispatch("fireIntent",t)}async registerIntentHandler(t,n,r){this.wire.sendAction("interop-client-register-intent-handler").catch((e=>{}));const o=await i(this,e,"f"),s=`intent-handler-${n}`,a=(0,l.wrapIntentHandler)(t,s);try{await o.register(s,a),await o.dispatch("intentHandlerRegistered",{handlerId:s,...r})}catch(e){throw new Error("Unable to register intent handler")}return{unsubscribe:async()=>{o.remove(s)}}}async getCurrentContext(t){this.wire.sendAction("interop-client-get-current-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("getCurrentContext",{contextType:t})}async getInfoForIntent(t){this.wire.sendAction("interop-client-get-info-for-intent").catch((e=>{}));return(await i(this,e,"f")).dispatch("getInfoForIntent",t)}async getInfoForIntentsByContext(t){this.wire.sendAction("interop-client-get-info-for-intents-by-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("getInfoForIntentsByContext",t)}async fireIntentForContext(t){this.wire.sendAction("interop-client-fire-intent-for-context").catch((e=>{}));return(await i(this,e,"f")).dispatch("fireIntentForContext",t)}async joinSessionContextGroup(n){try{const r=i(this,t,"f").get(n);if(r)return r.getUserInstance();const o=await i(this,e,"f"),{hasConflict:s}=await o.dispatch("sessionContextGroup:createIfNeeded",{sessionContextGroupId:n});s&&console.warn(`A (non-session) context group with the name "${n}" already exists. If you are trying to join a Context Group, call joinContextGroup instead.`);const c=new a.default(this.wire,i(this,e,"f"),n);return i(this,t,"f").set(n,c),c.getUserInstance()}catch(e){throw console.error(`Error thrown trying to create Session Context Group with id "${n}": ${e}`),e}}async onDisconnection(t){this.wire.sendAction("interop-client-add-ondisconnection-listener").catch((e=>{}));return(await i(this,e,"f")).onDisconnection((e=>{const{uuid:n}=e;t({type:"interop-broker",topic:"disconnected",brokerName:n})}))}getFDC3Sync(e){switch(e){case"1.2":return new c.Fdc3Module((()=>this),this.wire);case"2.0":return new h.Fdc3Module2((()=>this),this.wire);default:throw new Error(`Invalid FDC3 version provided: ${e}. Must be '1.2' or '2.0'`)}}async getFDC3(e){return this.getFDC3Sync(e)}static async ferryFdc3Call(t,n,r){return(await i(t,e,"f")).dispatch(n,r||null)}};return Ki.InteropClient=u,e=new WeakMap,t=new WeakMap,Ki}var yr,fr,gr,mr={};function vr(){if(yr)return mr;yr=1,Object.defineProperty(mr,"__esModule",{value:!0}),mr.overrideCheck=mr.checkFDC32Overrides=mr.getDefaultViewFdc3VersionFromAppInfo=void 0;const e=Vi();function t(t){return["fdc3HandleFindInstances","handleInfoForIntent","handleInfoForIntentsByContext","fdc3HandleGetAppMetadata","fdc3HandleGetInfo","fdc3HandleOpen","handleFiredIntent","handleFiredIntentForContext"].filter((n=>t[n]===e.InteropBroker.prototype[n]))}return mr.getDefaultViewFdc3VersionFromAppInfo=function({manifest:e,initialOptions:t}){const n=e?.platform?.defaultViewOptions?.fdc3InteropApi??t.defaultViewOptions?.fdc3InteropApi;return["1.2","2.0"].includes(n??"")?n:void 0},mr.checkFDC32Overrides=t,mr.overrideCheck=function(e,n){if(n&&"2.0"===n){const n=t(e);n.length>0&&console.warn(`WARNING: FDC3 2.0 has been set as a default option for Views in this Platform, but the required InteropBroker APIs for FDC3 2.0 compliance have not all been overridden.\nThe following APIs need to be overridden:\n${n.join("\n")}`)}},mr}function Cr(){return gr||(gr=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),i=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),i(function(){if(fr)return Ti;fr=1;var e=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ti,"__esModule",{value:!0}),Ti.InteropModule=void 0;const t=e(n),i=$i,r=d,o=Vi(),a=wr(),c=vr(),h=Tn,l=e=>new e,u="You have attempted to use or modify InteropBroker parameters, which is not allowed. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.";class p extends r.Base{async init(e,n=l){this.wire.sendAction("interop-init").catch((()=>{}));const r=await this.wire.environment.getInteropInfo(this.wire.getFin()),s=(0,i.createUnusableObject)(u),a=(0,i.createWarningObject)(u,(0,t.default)(r)),d=async()=>{throw new Error(u)},p=o.InteropBroker.createClosedConstructor(this.wire,(()=>this.fin.InterApplicationBus.Channel.create(`interop-broker-${e}`)),r);let w;return w=Array.isArray(n)?new((0,h.overrideFromComposables)(...n)(p))(s,d,a):await n(p,s,d,a),(0,c.overrideCheck)(w,r.fdc3Version),w}connectSync(e,t){return this.wire.sendAction("interop-connect-sync").catch((()=>{})),new a.InteropClient(this.wire,this.wire.environment.whenReady().then((()=>this.fin.InterApplicationBus.Channel.connect(`interop-broker-${e}`,{payload:t}))))}}return Ti.InteropModule=p,Ti}(),e),i(wr(),e),i(Vi(),e)}(Li)),Li}var br={},Ir={},Er={},xr={};Object.defineProperty(xr,"__esModule",{value:!0}),xr.getSnapshotSourceChannelName=void 0;xr.getSnapshotSourceChannelName=e=>`snapshot-source-provider-${e.uuid}`;var Ar,Pr,Mr,_r,Or,Sr=s&&s.__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},Rr=s&&s.__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)};Object.defineProperty(Er,"__esModule",{value:!0}),Er.SnapshotSource=void 0;const Fr=d,jr=xr,kr=new Map;class Lr extends Fr.Base{constructor(e,t){super(e),Ar.set(this,void 0),Pr.set(this,(()=>(kr.has(this.identity.uuid)||kr.set(this.identity.uuid,{eventFired:null,clientPromise:null}),kr.get(this.identity.uuid)))),Mr.set(this,(()=>(Rr(this,Pr,"f").call(this).clientPromise||(Rr(this,Pr,"f").call(this).clientPromise=Rr(this,_r,"f").call(this)),Rr(this,Pr,"f").call(this).clientPromise))),_r.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);try{Rr(this,Pr,"f").call(this).eventFired||await Rr(this,Or,"f").call(this);const t=await this.fin.InterApplicationBus.Channel.connect(e,{wait:!1});return t.onDisconnection((()=>{Rr(this,Pr,"f").call(this).clientPromise=null,Rr(this,Pr,"f").call(this).eventFired=null})),t}catch(e){throw Rr(this,Pr,"f").call(this).clientPromise=null,new Error("The targeted SnapshotSource is not currently initialized. Await this object's ready() method.")}})),Or.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);let t,n;const i=new Promise(((e,i)=>{t=e,n=i}));Rr(this,Pr,"f").call(this).eventFired=i;const r=async i=>{try{i.channelName===e&&(t(),await this.fin.InterApplicationBus.Channel.removeListener("connected",r))}catch(e){n(e)}};await this.fin.InterApplicationBus.Channel.on("connected",r)})),Sr(this,Ar,t,"f")}get identity(){return Rr(this,Ar,"f")}async ready(){this.wire.sendAction("snapshot-source-ready").catch((e=>{}));try{await Rr(this,Mr,"f").call(this)}catch(e){await Rr(this,Pr,"f").call(this).eventFired}}async getSnapshot(){this.wire.sendAction("snapshot-source-get-snapshot").catch((e=>{}));const e=await Rr(this,Mr,"f").call(this),t=await e.dispatch("get-snapshot");return(await t).snapshot}async applySnapshot(e){this.wire.sendAction("snapshot-source-apply-snapshot").catch((e=>{}));return(await Rr(this,Mr,"f").call(this)).dispatch("apply-snapshot",{snapshot:e})}}Er.SnapshotSource=Lr,Ar=new WeakMap,Pr=new WeakMap,Mr=new WeakMap,_r=new WeakMap,Or=new WeakMap,Object.defineProperty(Ir,"__esModule",{value:!0}),Ir.SnapshotSourceModule=void 0;const Tr=d,$r=Er,Br=xr;class Gr extends Tr.Base{async init(e){if(this.wire.sendAction("snapshot-source-init").catch((e=>{})),"object"!=typeof e||"function"!=typeof e.getSnapshot||"function"!=typeof e.applySnapshot)throw new Error("you must pass in a valid SnapshotProvider");const t=await this.fin.InterApplicationBus.Channel.create((0,Br.getSnapshotSourceChannelName)(this.fin.me));t.register("get-snapshot",(async()=>({snapshot:await e.getSnapshot()}))),t.register("apply-snapshot",(({snapshot:t})=>e.applySnapshot(t)))}wrapSync(e){return this.wire.sendAction("snapshot-source-wrap-sync").catch((e=>{})),new $r.SnapshotSource(this.wire,e)}async wrap(e){return this.wire.sendAction("snapshot-source-wrap").catch((e=>{})),this.wrapSync(e)}}Ir.SnapshotSourceModule=Gr,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Ir,e),n(Er,e)}(br),Object.defineProperty(a,"__esModule",{value:!0});var Wr=a.Fin=void 0;const Hr=t,Nr=c,Dr=ie(),Ur=Z(),Vr=de,zr=en,Kr=rn,qr=un,Jr=bn,Yr=J(),Zr=An,Qr=ki,Xr=Cr(),eo=br;class to extends Hr.EventEmitter{constructor(e){super(),this.wire=e,this.System=new Nr.System(e),this.Window=new Dr._WindowModule(e),this.Application=new Ur.ApplicationModule(e),this.InterApplicationBus=new Vr.InterApplicationBus(e),this.Clipboard=new zr.Clipboard(e),this.ExternalApplication=new Kr.ExternalApplicationModule(e),this.Frame=new qr._FrameModule(e),this.GlobalHotkey=new Jr.GlobalHotkey(e),this.Platform=new Zr.PlatformModule(e,this.InterApplicationBus.Channel),this.View=new Yr.ViewModule(e),this.Interop=new Xr.InteropModule(e),this.SnapshotSource=new eo.SnapshotSourceModule(e),e.registerFin(this),this.me=(0,Qr.getMe)(e),e.on("disconnected",(()=>{this.emit("disconnected")}))}}Wr=a.Fin=to;var no={},io={};function ro(e){return"string"==typeof e.manifestUrl}function oo(e){return ao(e)&&"string"==typeof e.address}function so(e){return oo(e)&&"string"==typeof e.token}function ao(e){return"string"==typeof e.uuid}function co(e){return e.runtime&&"string"==typeof e.runtime.version}function ho(e){return ao(e)&&co(e)}Object.defineProperty(io,"__esModule",{value:!0}),io.isInternalConnectConfig=io.isPortDiscoveryConfig=io.isNewConnectConfig=io.isConfigWithReceiver=io.isRemoteConfig=io.isExistingConnectConfig=io.isExternalConfig=void 0,io.isExternalConfig=ro,io.isExistingConnectConfig=oo,io.isRemoteConfig=so,io.isConfigWithReceiver=function(e){return"object"==typeof e.receiver&&so({...e,address:""})},io.isNewConnectConfig=ho,io.isPortDiscoveryConfig=function(e){return ro(e)&&co(e)||ho(e)},io.isInternalConnectConfig=function(e){return oo(e)||ho(e)};var lo={},uo={};Object.defineProperty(uo,"__esModule",{value:!0}),uo.EmitterMap=void 0;const po=t;function wo(e){return Buffer.from(e).toString("base64")}uo.EmitterMap=class{constructor(){this.storage=new Map}hashKeys(e){return e.map(wo).join("/")}getOrCreate(e){const t=this.hashKeys(e);return this.storage.has(t)||this.storage.set(t,new po.EventEmitter),this.storage.get(t)}has(e){return this.storage.has(this.hashKeys(e))}delete(e){const t=this.hashKeys(e);return this.storage.delete(t)}},Object.defineProperty(lo,"__esModule",{value:!0});const yo=uo;class fo extends yo.EmitterMap{constructor(){super(...arguments),this.dispatchEvent=e=>{if(function(e){return"process-desktop-event"===e.action}(e)){const{payload:t}=e,n=function(e){const{topic:t}=e;if("frame"===t||"window"===t||"view"===t){const{uuid:n,name:i}=e;return[t,n,i]}if("application"===t){const{uuid:n}=e;return[t,n]}return[t]}(t);if(this.has(n))return this.getOrCreate(n).emit(t.type,t),!0}return!1}}}lo.default=fo;var go,mo,vo=s&&s.__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},Co=s&&s.__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)},bo=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(no,"__esModule",{value:!0});var Io=no.Transport=void 0;const Eo=t,xo=io,Ao=g,Po=bo(lo),Mo=ki,_o=ke;class Oo extends Eo.EventEmitter{constructor(e,t,n){super(),this.wireListeners=new Map,this.topicRefMap=new Map,this.eventAggregator=new Po.default,this.messageHandlers=[this.eventAggregator.dispatchEvent],go.set(this,void 0),mo.set(this,void 0),this.connectSync=()=>{Co(this,go,"f").connectSync()},this.getPort=()=>Co(this,go,"f").getPort(),vo(this,go,new e(this.onmessage.bind(this)),"f"),this.environment=t,this.sendRaw=Co(this,go,"f").send.bind(Co(this,go,"f")),this.registerMessageHandler(this.handleMessage.bind(this)),Co(this,go,"f").on("disconnected",(()=>{for(const[,{handleNack:e}]of this.wireListeners)e({reason:"Remote connection has closed"});this.wireListeners.clear(),this.emit("disconnected")}));const{uuid:i,name:r}=n,o=this.environment.getCurrentEntityType();this.me=(0,Mo.getBaseMe)(o,i,r)}getFin(){if(!Co(this,mo,"f"))throw new Error("No Fin object registered for this transport");return Co(this,mo,"f")}registerFin(e){if(Co(this,mo,"f"))throw new Error("Fin object has already been registered for this transport");vo(this,mo,e,"f")}shutdown(){return Co(this,go,"f").shutdown()}async connect(e){if((0,xo.isConfigWithReceiver)(e))return await Co(this,go,"f").connect(e.receiver),this.authorize(e);if((0,xo.isRemoteConfig)(e))return this.connectRemote(e);if((0,xo.isExistingConnectConfig)(e))return this.connectByPort(e);if((0,xo.isNewConnectConfig)(e)){const t=await this.environment.retrievePort(e);return this.connectByPort({...e,address:`ws://localhost:${t}`})}}async connectRemote(e){return await Co(this,go,"f").connect(new(this.environment.getWsConstructor())(e.address)),this.authorize(e)}async connectByPort(e){const{address:t,uuid:n}=e,i={...e,type:"file-token"},r=Co(this,go,"f");await r.connect(new(this.environment.getWsConstructor())(e.address));const o=await this.sendAction("request-external-authorization",{uuid:n,type:"file-token"},!0);if("external-authorization-response"!==o.action)throw new Ao.UnexpectedActionError(o.action);return await this.environment.writeToken(o.payload.file,o.payload.token),this.authorize(i)}async authorize(e){const t=await this.sendAction("request-authorization",e,!0);if("authorization-response"!==t.action)throw new Ao.UnexpectedActionError(t.action);if(!0!==t.payload.success)throw new Ao.RuntimeError(t.payload)}sendAction(e,t={},n=!1){let i=()=>{};const r=Ao.RuntimeError.getCallSite(1),o=this.environment.getNextMessageId(),s=new Promise(((s,a)=>{i=a;const c={action:e,payload:t,messageId:o},d=Co(this,go,"f");return this.addWireListener(o,s,(e=>this.nackHandler(e,a,r)),n),d.send(c).catch(a)}));return Object.assign(s,{cancel:i,messageId:o})}nackHandler(e,t,n){t("string"==typeof e?e:new Ao.RuntimeError(e,n))}ferryAction(e){return new Promise(((t,n)=>{const i=this.environment.getNextMessageId();e.messageId=i;const r=e=>{t(e.payload)};return Co(this,go,"f").send(e).then((()=>this.addWireListener(i,r,(e=>this.nackHandler(e,n)),!1))).catch(n)}))}registerMessageHandler(e){this.messageHandlers.push(e)}addWireListener(e,t,n,i){i?this.uncorrelatedListener=t:this.wireListeners.has(e)?n({reason:"Duplicate handler id",error:(0,_o.errorToPOJO)(new Ao.DuplicateCorrelationError(String(e)))}):this.wireListeners.set(e,{resolve:t,handleNack:n})}onmessage(e){for(const t of this.messageHandlers)t.call(null,e)}handleMessage(e){const t=e.correlationId||NaN;if("correlationId"in e){if(!this.wireListeners.has(t))return!1;{const{resolve:n,handleNack:i}=this.wireListeners.get(t);"ack"!==e.action?i({reason:"Did not receive ack action",error:(0,_o.errorToPOJO)(new Ao.NoAckError(e.action))}):"payload"in e?e.payload.success?n.call(null,e):i(e.payload):"string"==typeof e.reason?i(e):(console.warn("Received invalid response from core",e),i({reason:"invalid response shape"})),this.wireListeners.delete(t)}}else this.uncorrelatedListener&&this.uncorrelatedListener.call(null,e),this.uncorrelatedListener=()=>{};return!0}}Io=no.Transport=Oo,go=new WeakMap,mo=new WeakMap;const So=(...e)=>({log:(...t)=>console.debug(`[${(new Date).toISOString()}]`,...(e=>e.map((e=>`[${e}]`)))(e),...t),getLogger:(...t)=>So(...e,...t)}),Ro=So("@openfin/core-web/client");function Fo(e,t){if(!function(e){return"string"==typeof e}(e))throw new Error(`Property ${t} has invalid type. Expected string, got ${typeof e}.`)}const jo="web-broker-ports-ready",ko=Ro.getLogger("get-web-interop-ports");function Lo(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)}function To(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}"function"==typeof SuppressedError&&SuppressedError;const $o=e=>{var n,i,r;return r=class extends t.EventEmitter{constructor(t){super(),n.set(this,void 0),i.set(this,!1),this.connectSync=()=>{Lo(this,i,"f")||(e.addEventListener("message",(e=>{e.data?.topic?.startsWith("wire-message")&&e.data.message&&Lo(this,n,"f").call(this,{...JSON.parse(e.data.message),ports:e.ports})})),e.start())},this.connect=async()=>{this.connectSync()},this.send=t=>(e.postMessage({topic:"wire-message",message:JSON.stringify(t)}),Promise.resolve()),this.shutdown=async()=>{e.close()},To(this,n,t,"f")}getPort(){return e}},n=new WeakMap,i=new WeakMap,r};var Bo={},Go={};Object.defineProperty(Go,"__esModule",{value:!0}),Go.BaseEnvironment=void 0;const Wo=vr();Go.BaseEnvironment=class{async getViewWindowIdentity(e,t){const{identity:n}=await e.View.wrapSync(t).getCurrentWindow();return n}async getInteropInfo(e){const t=await e.Application.getCurrentSync().getInfo().catch((()=>null)),n=t?.initialOptions?.interopBrokerConfiguration??{};return{fdc3Version:t?(0,Wo.getDefaultViewFdc3VersionFromAppInfo)(t):void 0,...n,fdc3Info:{providerVersion:await e.System.getVersion(),provider:"OpenFin"}}}},Object.defineProperty(Bo,"__esModule",{value:!0});var Ho=Bo.BrowserEnvironment=void 0;const No=Go;class Do extends No.BaseEnvironment{constructor(){super(...arguments),this.type="other",this.getRandomId=()=>{const e=new Uint32Array(1);return window.crypto.getRandomValues(e)[0].toString(32)}}getAdapterVersionSync(){return""}observeBounds(e,t){throw new Error("Method not implemented.")}layoutAllowedInContext(e){return!1}initLayoutManager(e,t,n){throw new Error("Method not implemented.")}applyLayoutSnapshot(e,t,n){throw new Error("Method not implemented.")}createLayout(e,t){throw new Error("Method not implemented.")}destroyLayout(e,t){throw new Error("Method not implemented.")}resolveLayout(e,t){throw new Error("Method not implemented.")}initPlatform(...e){throw new Error("Method not implemented.")}writeToken(e,t){return Promise.resolve("")}retrievePort(e){throw new Error("Method not implemented.")}getNextMessageId(){return this.getRandomId()}createChildContent(e){throw new Error("Method not implemented.")}getWebWindow(e){throw new Error("Method not implemented.")}getCurrentEntityIdentity(){throw new Error("Method not implemented.")}getCurrentEntityType(){return"external connection"}raiseEvent(e,t){throw new Error("Method not implemented.")}getUrl(){return location.href}getDefaultChannelOptions(){return{create:{},connect:{}}}getRtcPeer(){return new RTCPeerConnection}getWsConstructor(){return WebSocket}whenReady(){return Promise.resolve()}}Ho=Bo.BrowserEnvironment=Do;const Uo=e=>"platform"in e&&void 0!==e.platform;var Vo,zo;class Ko extends Ho{constructor(e){super(),this.connectConfig=e,Vo.set(this,void 0),zo.set(this,new W((async()=>Promise.resolve().then((function(){return __webpack_require__(/*! ./main-b14f67c9.js */ "../../node_modules/@openfin/core-web/out/main-b14f67c9.js")}))))),Uo(e)&&this.validatePlatformOptions(e)}getAdapterVersionSync(){return"0.39.21"}validatePlatformOptions({platform:e}){if(!("layoutSnapshot"in e))throw new Error("Platform options are missing layoutSnapshot. Please provide a layoutSnapshot in the platform options.");if("windows"in e||"windows"in e.layoutSnapshot)throw new Error("It appears you tried to call connect() with a snapshot object from an OpenFin desktop environment. Note that connect() expects to be called with a platform property with this structure: { platform: { layoutSnapshot } }. To get a layoutSnapshot of the expected structure, use fin.Platform.Layout.getCurrentLayoutManagerSync().getLayoutSnapshot() in v34+ in your desktop environment.");const{layouts:t}=e.layoutSnapshot;Object.entries(t).map((([e,t])=>{if("object"!=typeof t||null===t)throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must be an object.`);if(!("content"in t))throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must contain a 'content' property.`)}))}async getInteropInfo(e){return{...{contextGroups:void 0,logging:{beforeAction:{enabled:!1},afterAction:{enabled:!1}}},fdc3Version:void 0,fdc3Info:{providerVersion:"0.39.21",provider:"OpenFin Web"}}}layoutAllowedInContext(e){return!0}async initLayoutManager(e,t,n){if(Lo(this,Vo,"f"))throw new Error("Layout already initialized.");if(!Uo(this.connectConfig))throw new Error("Platform options are missing from connection config.");const{WebLayoutEntryPoint:i}=await Lo(this,zo,"f").getValue();return To(this,Vo,new i(this.connectConfig),"f"),await Lo(this,Vo,"f").initLayoutManager(e,t,n)}async applyLayoutSnapshot(e,t,n){Lo(this,Vo,"f")?.applyLayoutSnapshot(e,t,n)}async createLayout(e,t){return Lo(this,Vo,"f")?.createLayout(e,t)}async destroyLayout(e,t){return Lo(this,Vo,"f")?.destroyLayout(e,t)}async getViewWindowIdentity(e,t){return Promise.resolve({uuid:t.uuid,name:t.uuid})}}Vo=new WeakMap,zo=new WeakMap;const qo=()=>{const e=((e,t)=>{const n=new RegExp(`^${t}<(?.*)>$`).exec(e)?.groups?.meta;if(n)try{return JSON.parse(atob(n))}catch(e){throw new Error(`Failed to decode JSON from ${n}.`)}})(window.name,"of-frame");if(e)try{const{name:t,uuid:n,brokerUrl:i,providerId:r,contextGroup:o}=e;return Fo(i,"brokerUrl"),Fo(n,"uuid"),Fo(t,"name"),{identity:{name:t,uuid:n},brokerUrl:i,interopConfig:{providerId:r,currentContextGroup:o}}}catch(e){throw new Error(`Unexpected error occurred when inferring platform information: ${e.stack}`)}},Jo=()=>{const e=r.v4();return{uuid:e,name:e}},Yo=async e=>{if("enabled"===e.connectionInheritance){const t=await(async e=>{const t=qo();if(t){const{validateOptions:n=(()=>!0)}=e,{identity:i,...r}=t;if(!await n(r))throw new Error("Parent options were rejected by validateOptions.");return t}})(e);if(t)return t}if(!e.options){const t="enabled"===e.connectionInheritance?"Broker URL was not specified nor provided by a platform container.":"Connection inheritance is disabled but no options were provided.";throw new Error(t)}return{...e.options,identity:Jo()}};exports.__classPrivateFieldGet=Lo,exports.__classPrivateFieldSet=To,exports.apiExposer=Gn,exports.commonjsGlobal=s,exports.connect=async t=>{try{Ro.log("Establishing connection",t);const{brokerUrl:n,identity:i,timeout:r,interopConfig:s}=await Yo(t),{workerPort:a,iframeBrokerPort:c}=await(async(e,t,n)=>{const{origin:i}=new URL(e),r=document.createElement("IFRAME");let s;r.style.display="none";try{return await new Promise(((a,c)=>{const d=e=>{if(e.source===r.contentWindow&&e.data?.topic===`ack-${jo}`){if(e.origin!==i)c(new Error(`Broker redirected to unexpected origin ${e.origin}, expected ${i}.`));else if(e.data.success){const[t,n]=e.ports;a({iframeBrokerPort:t,workerPort:n})}else c(new m(e.data));window.removeEventListener("message",d),clearTimeout(s)}};window.addEventListener("message",d),ko.log(`Connecting to broker ${e}`),r.setAttribute("src",e),r.setAttribute("name",o(t,"of-broker")),document.body.appendChild(r),ko.log("Iframe loaded, awaiting init message from iframe"),n&&(s=setTimeout((()=>{window.removeEventListener("message",d),document.body.removeChild(r),c(new Error("Worker did not initialize in time"))}),n))}))}catch(e){throw new Error(`Failed to initialise Fin Web Client. ${e.message}`,{cause:e})}})(n,i,r);Ro.log("Successfully established connection to shared worker");const d={entityType:"external connection",...i};a.start(),c.start();const h=((t,n,i)=>{const r=$o(n),o=new Ko(t),s=new Io(r,o,i);return s.connectSync(),window.Buffer=e.Buffer,new Wr(s)})(t,a,d);return s?.providerId&&(h.me.interop=h.Interop.connectSync(s.providerId),s?.currentContextGroup&&h.me.interop.joinContextGroup(s.currentContextGroup).catch((e=>{console.warn(`Error joining specified context group: ${s?.currentContextGroup}, continuing`,e)}))),{...h,me:{...h.me,identity:{uuid:h.me.uuid,name:h.me.name}}}}catch(e){throw new Error(`An error occured during web-interop connection: ${e.message}`)}},exports.decorators=Nn,exports.encodeOptions=o,exports.layout_constants=ai,exports.lazy=G; /***/ }), -/***/ "./node_modules/@openfin/core-web/out/main-b14f67c9.js": -/*!*************************************************************!*\ - !*** ./node_modules/@openfin/core-web/out/main-b14f67c9.js ***! - \*************************************************************/ +/***/ "../../node_modules/@openfin/core-web/out/main-b14f67c9.js": +/*!*****************************************************************!*\ + !*** ../../node_modules/@openfin/core-web/out/main-b14f67c9.js ***! + \*****************************************************************/ /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; -var t=__webpack_require__(/*! ./main-8cad4070.js */ "./node_modules/@openfin/core-web/out/main-8cad4070.js"),e=__webpack_require__(/*! uuid */ "../../node_modules/uuid/dist/esm-browser/index.js");__webpack_require__(/*! buffer/ */ "../../node_modules/buffer/index.js"),__webpack_require__(/*! events */ "../../node_modules/events/events.js"),__webpack_require__(/*! lodash/cloneDeep */ "../../node_modules/lodash/cloneDeep.js"),__webpack_require__(/*! lodash/isEqual */ "../../node_modules/lodash/isEqual.js");var i={},n={};Object.defineProperty(n,"__esModule",{value:!0}),n.mapValuesAsync=n.mapEntriesAsync=void 0;const o=(t,[e,i])=>({...t,[e]:i});async function s(t,e){return(await Promise.all(e.map((async([e,i])=>[e,await t(i,e)])))).reduce(o,{})}n.mapEntriesAsync=s,n.mapValuesAsync=async function(t,e){let i;return i=e instanceof Map?[...e.entries()]:Object.entries(e),s(t,i)};var r,a,l,h,d=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldSet||function(t,e,i,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(t,i):o?o.value=i:e.set(t,i),i},c=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldGet||function(t,e,i,n){if("a"===i&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?n:"a"===i?n.call(t):n?n.value:e.get(t)};Object.defineProperty(i,"__esModule",{value:!0});var m=i.DefaultLayoutManager=void 0;const u=n;class p{constructor(t){a.set(this,void 0),l.set(this,new Map),d(this,a,t,"f")}size(){return c(this,l,"f").size}async applyLayoutSnapshot({layouts:t}){if(Object.keys(t).length>1)throw new Error("[LayoutManager] Tried to call applyLayoutSnapshot with more than 1 layout. When implementing multiple layouts via overridden LayoutManager class, you must override and fully implement the applyLayoutSnapshot method without calling super.applyLayoutSnapshot().");const[[e,i]]=Object.entries(t);await p.createLayout(this,{layoutName:e,layout:i})}async showLayout({layoutName:t}){}async getLayoutSnapshot(){return{layouts:await(0,u.mapValuesAsync)((t=>t.getFrameSnapshot()),c(this,l,"f"))}}async removeLayout({layoutName:t}){}getLayoutIdentityForView(t){const e=[...c(this,l,"f").values()].find((e=>e.getCurrentViews().some((e=>e.name===t.name&&e.uuid===t.uuid))));return e?.identity??void 0}isLayoutVisible({layoutName:t}){return c(p,r,"m",h).call(p,this,t).isVisible()}resolveLayoutIdentity(t){if(t&&"layoutName"in t)return t;const e=[...c(this,l,"f").values()];if(1===e.length)return e[0].identity;const i=e.find((t=>t.isVisible()));return i?.identity??void 0}static async resolveLayout(t,e){const i=t.resolveLayoutIdentity(e);if(void 0===i||!("layoutName"in i))throw new Error("[layout-manager] resolveLayout: Could not resolve the layout identity. Make sure you include 'layoutName' in the identity object.");return c(p,r,"m",h).call(p,t,i.layoutName)}static async handleSharedView(t,e,i){await(0,u.mapValuesAsync)((async t=>{if(t.identity.layoutName!==e.layoutName){const e=t.getCurrentViews().find((t=>t.name===i.name));e&&await t.onViewDetached({viewIdentity:e,target:null}).catch(console.error)}}),c(t,l,"f"))}static async handleLastViewRemoved(t,e){await t.removeLayout(e),await c(t,a,"f").handleLastViewRemoved(t)}static async destroyLayout(t,{layoutName:e}){await c(p,r,"m",h).call(p,t,e).destroy(),c(t,l,"f").delete(e)}static async createLayout(t,e){const{layoutName:i}=e;if(c(t,l,"f").has(i))throw new Error(`Layout name ${i} already exists`);await c(t,a,"f").createLayout(e,t)}static registerLayout(t,e,i){c(t,l,"f").set(e,i)}static getAllLayouts(t){return[...c(t,l,"f").values()]}static setInitialSnapshot(t,e){c(t,a,"f").setInitialSnapshot(e)}static createClosedConstructor(...t){return class extends p{constructor(){super(...t)}}}}m=i.DefaultLayoutManager=p,r=p,a=new WeakMap,l=new WeakMap,h=function(t,e){const i=c(t,l,"f").get(e);if(!i)throw new Error(`[layout-manager] getLayoutByName: Could not locate layout with name '${e}'`);return i};var g={},f={},v={};Object.defineProperty(v,"__esModule",{value:!0}),v.ReversibleMap=void 0;v.ReversibleMap=class{constructor(){this.valueToKey=new Map,this.keyToValue=new Map,this.setUnique=(t,e)=>{if(this.hasKey(t)||this.hasValue(e))throw new Error("Key or value already in the map.");this.keyToValue.set(t,e),this.valueToKey.set(e,t)},this.getKey=t=>{const e=this.valueToKey.get(t);if(!e)throw new Error("Value not found in the map.");return e},this.deleteKey=t=>{const e=this.getValue(t);return this.keyToValue.delete(t),this.valueToKey.delete(e),e},this.deleteValue=t=>{const e=this.getKey(t);return this.keyToValue.delete(e),this.valueToKey.delete(t),e},this.hasKey=t=>this.keyToValue.has(t),this.hasValue=t=>this.valueToKey.has(t)}getValue(t){const e=this.keyToValue.get(t);if(!e)throw new Error("Key not found in the map.");return e}},Object.defineProperty(f,"__esModule",{value:!0});var _=f.LayoutContentCache=void 0;const y=t.lazy,C=v;class w{constructor(){this.contentItemCache=new C.ReversibleMap,this.contentItemCacheId=0,this.createCacheKey=()=>{const t=`entity-${this.contentItemCacheId.toString()}`;return this.contentItemCacheId+=1,t},this.hasKey=t=>this.contentItemCache.hasKey(t),this.getItemOrUndefined=t=>{try{return this.getContentItemOrThrow(t)}catch(t){return}},this.getContentItemOrThrow=(t,e)=>{if(!this.contentItemCache.hasKey(t))throw new Error("Layout component has been destroyed or detached from the current layout.");const i=this.contentItemCache.getValue(t);if(e&&!e.includes(i.type))throw new Error(`Layout item is not the expected type. Expected ${e.join(", ")}, got ${i.type}.`);return i},this.getOrCreateEntityId=t=>{if(this.contentItemCache.hasValue(t))return this.contentItemCache.getKey(t);t.onDestroyed((()=>{this.contentItemCache.deleteValue(t)}));const e=this.createCacheKey();return this.contentItemCache.setUnique(e,t),e}}static getSingleInstance(){return w.singleton.getValue()}}_=f.LayoutContentCache=w,w.singleton=new y.Lazy((()=>new w));var I={},b={};!function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.getAdjacentStacks=t.doShareEdge=t.getAdjacentItem=void 0;t.getAdjacentItem=(e,i)=>{const{parent:n}=e;if(e.isRoot()||!n)return;const o=["top","bottom"].includes(i)?"column":"row",s=["top","left"].includes(i)?-1:1;if(n.type===o){const t=n.contentItems.indexOf(e)+s;if(t>=0&&t{const n=t.getBounds(),o=e.getBounds();if(!n||!o)return!1;if(["top","bottom"].includes(i)){return!(n.righto.right)}return!(n.bottomo.bottom)};t.getAdjacentStacks=(e,i)=>{const n=["top","bottom"].includes(i)?"row":"column",o=s=>"stack"===s.type?(0,t.doShareEdge)(e,s,i)?[s]:[]:"root"===s.type||"ground"===s.type?[]:s.type===n?s.contentItems.map((t=>o(t))).flat():s.type!==n?["top","right"].includes(i)?o(s.contentItems[s.contentItems.length-1]):o(s.contentItems[0]):[],s=(0,t.getAdjacentItem)(e,i);return s?o(s):[]}}(b);var S=t.commonjsGlobal&&t.commonjsGlobal.__decorate||function(t,e,i,n){var o,s=arguments.length,r=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(s<3?o(r):s>3?o(e,i,r):o(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};Object.defineProperty(I,"__esModule",{value:!0}),I.LayoutEntitiesController=void 0;const E=t.decorators,x=b,L=i;class z{constructor(t,e,i){this.wire=t,this.layoutManager=e,this.layoutContentCache=i,this.analytics=t=>{this.wire.sendAction(`layout-controller-${t}`).catch((()=>{}))},this.getLayoutIdentityForViewOrThrow=async t=>{const e=this.layoutManager.getLayoutIdentityForView(t);if(!e)throw new Error(`View identity ${t.name} is not attached to any layouts.`);return e},this.getRoot=async t=>{this.analytics("get-root");const e=(await this.getLayout(t)).getRoot();return{type:e.type,entityId:this.layoutContentCache.getOrCreateEntityId(e)}},this.getStackByView=async t=>{this.analytics("get-stack-by-view");const e=await this.getLayoutIdentityForViewOrThrow(t),i=(await this.getLayout(e)).getStackByView(t);if("stack"===i?.type)return{entityId:this.layoutContentCache.getOrCreateEntityId(i),type:"stack"}},this.getStackViews=t=>{this.analytics("get-stack-views");return this.layoutContentCache.getContentItemOrThrow(t,["stack"]).contentItems.map((t=>({name:t.viewName,uuid:this.wire.me.uuid})))},this.isRoot=t=>{this.analytics("is-root");return this.layoutContentCache.getContentItemOrThrow(t).isRoot()},this.exists=t=>(this.analytics("exists"),this.layoutContentCache.hasKey(t)),this.addViewToStack=async(t,e,{index:i}={index:0})=>{this.analytics("add-view-to-stack");const n=this.layoutContentCache.getContentItemOrThrow(t);if(i&&i>n.contentItems.length+1)throw new Error(`Index '${i}' out of range, please exclude the index or specify a number between 0 and ${n.contentItems.length}`);const o={id:t,index:i},{identity:s}=await n.layout.platformCreateView(e,{location:o});return s},this.findViewInStack=(t,e)=>t.contentItems.find((t=>t.viewName===e.name)),this.removeViewFromStack=async(t,e)=>{this.analytics("remove-view-from-stack");const i=this.layoutContentCache.getContentItemOrThrow(t,["stack"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to remove a view ('${e.name}') which does not belong to the stack.`);await n.layout.platformCloseView(e)},this.createAdjacentStack=async(t,e,{position:i="right"}={})=>{if(this.analytics("create-adjacent-stack"),!Array.isArray(e)||0===e.length)throw new Error('The parameter "views" must be an array with at least 1 element.');if(!["top","bottom","left","right"].includes(i))throw new Error(`Invalid position '${i}' specified.`);const n=this.layoutContentCache.getContentItemOrThrow(t).createAdjacentStack({position:i}),o=this.layoutContentCache.getOrCreateEntityId(n);return await Promise.all(e.reverse().map((t=>this.addViewToStack(o,t)))),o},this.getAdjacentStacks=async({targetId:t,edge:e})=>{this.analytics("get-adjacent-stacks");const i=this.layoutContentCache.getContentItemOrThrow(t);return(0,x.getAdjacentStacks)(i,e).map((t=>({entityId:this.layoutContentCache.getOrCreateEntityId(t)})))},this.setStackActiveView=async(t,e)=>{this.analytics("set-stack-active-view");const i=this.layoutContentCache.getContentItemOrThrow(t,["stack"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to set a view ('${e.name}') as active when it does not belong to the stack.`);i.setActiveContentItem(n,!0)}}async getLayout(t){const e=await L.DefaultLayoutManager.resolveLayout(this.layoutManager,t);if(!e)throw new Error(`Could not resolve target layout identity ${JSON.stringify(t)}`);return e}getContent(t){this.analytics("get-content");return this.layoutContentCache.getContentItemOrThrow(t,["column","row"]).contentItems.map((t=>({type:t.type,entityId:this.layoutContentCache.getOrCreateEntityId(t)})))}getParent(t){this.analytics("get-parent");const e=this.layoutContentCache.getContentItemOrThrow(t);if(!e.isRoot())return e.parent?.contentItems.includes(e)?{type:e.parent.type,entityId:this.layoutContentCache.getOrCreateEntityId(e.parent)}:void 0}}S([(0,E.expose)()],z.prototype,"getLayoutIdentityForViewOrThrow",void 0),S([(0,E.expose)()],z.prototype,"getRoot",void 0),S([(0,E.expose)()],z.prototype,"getStackByView",void 0),S([(0,E.expose)()],z.prototype,"getStackViews",void 0),S([(0,E.expose)()],z.prototype,"getContent",null),S([(0,E.expose)()],z.prototype,"getParent",null),S([(0,E.expose)()],z.prototype,"isRoot",void 0),S([(0,E.expose)()],z.prototype,"exists",void 0),S([(0,E.expose)()],z.prototype,"addViewToStack",void 0),S([(0,E.expose)()],z.prototype,"removeViewFromStack",void 0),S([(0,E.expose)()],z.prototype,"createAdjacentStack",void 0),S([(0,E.expose)()],z.prototype,"getAdjacentStacks",void 0),S([(0,E.expose)()],z.prototype,"setStackActiveView",void 0),I.LayoutEntitiesController=z,Object.defineProperty(g,"__esModule",{value:!0});var M=g.initLayoutEndpoints=void 0;const P=t.apiExposer,T=t.layout_constants,A=f,k=I,D=i;M=g.initLayoutEndpoints=async function(t,e){const i=t.getFin(),n=await i.Platform.getCurrentSync().getClient(),o=new P.ChannelsExposer(n);await new P.ApiExposer(o).exposeInstance(new k.LayoutEntitiesController(t,e,A.LayoutContentCache.getSingleInstance()),{id:T.LAYOUT_CONTROLLER_ID}),await async function(t,e){const i=t=>async i=>{const n=await D.DefaultLayoutManager.resolveLayout(e,i.target);if(!n)throw new Error(`Could not resolve the layout target from payload ${JSON.stringify(i)}`);return t(n,i)},n=(e,n)=>{t.register(e,i(n))},o=(t,e)=>{n(t,e)};n("replace-view",((t,e)=>t.replaceView(e))),n("replace-layout",((t,{layout:e})=>t.replaceLayout(e))),n("add-view",((t,e)=>t.insertView(e))),o("layout-add-view",((t,{viewOptions:e,location:i,targetView:n})=>t.platformCreateView(e,{location:i,targetView:n}))),n("close-view",((t,e)=>t.cleanupView(e.viewIdentity))),o("layout-close-view",((t,e)=>t.platformCloseView(e.viewIdentity))),n("apply-preset-layout",((t,e)=>t.applyPreset(e))),n("get-layout-views",(t=>t.getCurrentViews())),n("get-frame-snapshot",(t=>t.getFrameSnapshot())),n("is-visible",(t=>t.isVisible())),n("destroy",(t=>t.destroy())),t.register("get-layout-snapshot",(()=>e.getLayoutSnapshot()))}(n,e)};var R={};Object.defineProperty(R,"__esModule",{value:!0});var U=R.BaseLayout=void 0;U=R.BaseLayout=class{};var O={};Object.defineProperty(O,"__esModule",{value:!0});var V=O.DOMEmitter=void 0;V=O.DOMEmitter=class{constructor(t){this.container=t}dispatchLocalEvent(t,e){const i={...e,type:t,tabSelector:`tab-${e.name}`,containerSelector:`container-${e.name}`,topic:"openfin-DOM-event"};this.container.dispatchEvent(new CustomEvent(t,{detail:i}))}};var B={};Object.defineProperty(B,"__esModule",{value:!0});var H=B.mapLayoutContentItemsImmutableSync=B.mapLayoutContentItemsImmutable=W=B.isVisible=void 0;var W=B.isVisible=t=>(0!==t.offsetWidth||0!==t.offsetHeight)&&"hidden"!==window.getComputedStyle(t).visibility&&t.offsetTop>=0&&t.offsetLeft>=0&&t.offsetTop<=window.innerHeight&&t.offsetLeft<=window.innerWidth;const F=t=>"type"in t&&"component"===t.type;B.mapLayoutContentItemsImmutable=async function t(e,i){return F(i)?e(i):{...i,content:await Promise.all(i.content?.map((i=>t(e,i))))}},H=B.mapLayoutContentItemsImmutableSync=function t(e,i){return F(i)?e(i):{...i,content:i.content?.map((i=>t(e,i)))}};class N extends Error{constructor(t,e){super(e),this.type=t}}class G extends N{constructor(t,e){super("Configuration",t),this.node=e}}class j extends N{constructor(t){super("PopoutBlocked",t)}}class $ extends N{constructor(t){super("API",t)}}class Z extends N{constructor(t){super("Bind",t)}}class q extends Error{constructor(t,e,i){super(`${t}: ${e}${void 0===i?"":": "+i}`)}}class X extends q{constructor(t,e){super("Assert",t,e)}}class Y extends q{constructor(t,e,i){super("UnreachableCase",t,`${e}${void 0===i?"":": "+i}`)}}class K extends q{constructor(t,e){super("UnexpectedNull",t,e)}}class J extends q{constructor(t,e){super("UnexpectedUndefined",t,e)}}var Q;!function(t){let e=!1;const i={PopoutCannotBeCreatedWithGroundItemConfig:{id:0,default:"Popout cannot be created with ground ItemConfig"},PleaseRegisterAConstructorFunction:{id:1,default:"Please register a constructor function"},ComponentTypeNotRegisteredAndBindComponentEventHandlerNotAssigned:{id:2,default:"Component type not registered and BindComponentEvent handler not assigned"},ComponentIsAlreadyRegistered:{id:3,default:"Component is already registered"},ComponentIsNotVirtuable:{id:4,default:"Component is not virtuable. Requires rootHtmlElement field/getter"},VirtualComponentDoesNotHaveRootHtmlElement:{id:5,default:'Virtual component does not have getter "rootHtmlElement"'},ItemConfigIsNotTypeComponent:{id:6,default:"ItemConfig is not of type component"},InvalidNumberPartInSizeString:{id:7,default:"Invalid number part in size string"},UnknownUnitInSizeString:{id:8,default:"Unknown unit in size string"},UnsupportedUnitInSizeString:{id:9,default:"Unsupported unit in size string"}};t.idCount=Object.keys(i).length;const n=Object.values(i);t.checkInitialise=function(){if(!e)for(let e=0;e="0"&&t<="9"}function Tt(t,e){const i=zt(e);t.style.width=i}function At(t,e){const i=zt(e);t.style.height=i}function kt(t){return{width:t.offsetWidth,height:t.offsetHeight}}function Dt(t,e){t.style.display=e?"":"none"}function Rt(t,e){if(void 0!==e)for(const i in e)if(e.hasOwnProperty(i)){const n=e[i],o=t[i];t[i]=Ut(o,n)}return t}function Ut(t,e){if("object"!=typeof e)return e;if(Array.isArray(e)){const t=e.length,i=new Array(t);for(let n=0;n36)throw new Error("Too many keys in config minifier map")},t.translateObject=n}(dt||(dt={})),function(t){t.defaults={type:at.ground,content:[],size:1,sizeUnit:ht.Fractional,minSize:void 0,minSizeUnit:ht.Pixel,id:"",isClosable:!0},t.createCopy=function(t,e){switch(t.type){case at.ground:case at.row:case at.column:return gt.createCopy(t,e);case at.stack:return ut.createCopy(t,e);case at.component:return pt.createCopy(t);default:throw new Y("CICC91354",t.type,"Invalid Config Item type specified")}},t.createDefault=function(t){switch(t){case at.ground:throw new X("CICCDR91562");case at.row:case at.column:return gt.createDefault(t);case at.stack:return ut.createDefault();case at.component:return pt.createDefault();default:throw new Y("CICCDD91563",t,"Invalid Config Item type specified")}},t.isComponentItem=function(t){return t.type===at.component},t.isStackItem=function(t){return t.type===at.stack},t.isGroundItem=function(t){return t.type===at.ground}}(ct||(ct={})),function(t){t.defaultMaximised=!1,function(t){t.createCopy=function(t,e){return void 0===t?void 0:{show:null!=e?e:t.show,popout:t.popout,close:t.close,maximise:t.maximise,minimise:t.minimise,tabDropdown:t.tabDropdown}}}(t.Header||(t.Header={}))}(mt||(mt={})),function(t){function e(t){const e=t.length,i=new Array(e);for(let n=0;n"__glMaximised"===t));t>0&&(o=!0,n=n.splice(t,1)),e=n.length>0?n[0]:ct.defaults.id}else e=n;return i=void 0!==t.maximised?t.maximised:o,{id:e,maximised:i}}}(wt||(wt={})),function(t){function e(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0;return{resolved:!0,root:Et.resolve(i),openPopouts:t.resolveOpenPopouts(e.openPopouts),dimensions:t.Dimensions.resolve(e.dimensions),settings:t.Settings.resolve(e.settings),header:t.Header.resolve(e.header,e.settings,e.labels)}}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:Lt.fromResolvedArray(e.openPopouts),settings:_t.Settings.createCopy(e.settings),dimensions:t.Dimensions.fromResolved(e.dimensions),header:_t.Header.createCopy(e.header)}},t.isResolved=function(t){const e=t;return void 0!==e.resolved&&!0===e.resolved},t.resolveOpenPopouts=function(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0,{root:Et.resolve(o),openPopouts:xt.resolveOpenPopouts(e.openPopouts),dimensions:xt.Dimensions.resolve(e.dimensions),settings:xt.Settings.resolve(e.settings),header:xt.Header.resolve(e.header,e.settings,e.labels),parentId:null!==(i=e.parentId)&&void 0!==i?i:null,indexInParent:null!==(n=e.indexInParent)&&void 0!==n?n:null,window:t.Window.resolve(e.window,e.dimensions),resolved:!0}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:i(e.openPopouts),dimensions:xt.Dimensions.fromResolved(e.dimensions),settings:_t.Settings.createCopy(e.settings),header:_t.Header.createCopy(e.header),parentId:e.parentId,indexInParent:e.indexInParent,window:t.Window.fromResolved(e.window)}},t.fromResolvedArray=i}(Lt||(Lt={}));class Wt{constructor(){this._allEventSubscriptions=[],this._subscriptionsMap=new Map,this.unbind=this.removeEventListener,this.trigger=this.emit}tryBubbleEvent(t,e){}emit(t,...e){let i=this._subscriptionsMap.get(t);if(void 0!==i){i=i.slice();for(let t=0;t0){const n=e.slice();n.unshift(t);const o=this._allEventSubscriptions.slice();for(let t=0;t0?n.contentItems[0]:n,e=0);const o=this._layoutManager.createAndInitContentItem(i,t);t.addChild(o,e),this._layoutManager.layoutConfig.settings.popInOnClose?this._onClose():this.close()}createWindow(){const t=this.createUrl(),e=Math.floor(1e6*Math.random()).toString(36),i=this.serializeWindowFeatures({width:this._initialWindowSize.width,height:this._initialWindowSize.height,innerWidth:this._initialWindowSize.width,innerHeight:this._initialWindowSize.height,menubar:"no",toolbar:"no",location:"no",personalbar:"no",resizable:"yes",scrollbars:"no",status:"no"});if(this._popoutWindow=globalThis.open(t,e,i),this._popoutWindow)this._popoutWindow.addEventListener("load",(()=>this.positionWindow()),{passive:!0}),this._popoutWindow.addEventListener("beforeunload",(()=>{this._layoutManager.layoutConfig.settings.popInOnClose?this.popIn():this._onClose()}),{passive:!0}),this._checkReadyInterval=setInterval((()=>this.checkReady()),10);else if(!0===this._layoutManager.layoutConfig.settings.blockedPopoutsThrowError){throw new j("Popout blocked")}}checkReady(){if(null===this._popoutWindow)throw new K("BPCR01844");this._popoutWindow.__glInstance&&this._popoutWindow.__glInstance.isInitialised&&(this.onInitialised(),void 0!==this._checkReadyInterval&&(clearInterval(this._checkReadyInterval),this._checkReadyInterval=void 0))}serializeWindowFeatures(t){const e=[];for(const i in t)e.push(i+"="+t[i].toString());return e.join(",")}createUrl(){const t="gl-window-config-"+Ot(),e=_t.minifyConfig(this._config);try{localStorage.setItem(t,JSON.stringify(e))}catch(t){throw new Error("Error while writing to localStorage "+function(t){return t instanceof Error?t.message:"string"==typeof t?t:"Unknown Error"}(t))}const i=new URL(location.href);return i.searchParams.set("gl-window",t),i.toString()}positionWindow(){if(null===this._popoutWindow)throw new Error("BrowserPopout.positionWindow: null popoutWindow");this._popoutWindow.moveTo(this._initialWindowSize.left,this._initialWindowSize.top),this._popoutWindow.focus()}onInitialised(){this._isInitialised=!0,this.getGlInstance().on("popIn",(()=>this.popIn())),this.emit("initialised")}_onClose(){setTimeout((()=>this.emit("closed")),50)}}class Gt extends Wt{constructor(t,e,i,n){super(),this.layoutManager=t,this._parent=i,this._element=n,this._popInParentIds=[],this._type=e.type,this._id=e.id,this._isInitialised=!1,this.isGround=!1,this.isRow=!1,this.isColumn=!1,this.isStack=!1,this.isComponent=!1,this.size=e.size,this.sizeUnit=e.sizeUnit,this.minSize=e.minSize,this.minSizeUnit=e.minSizeUnit,this._isClosable=e.isClosable,this._pendingEventPropagations={},this._throttledEvents=["stateChanged"],this._contentItems=this.createContentItems(e.content)}get type(){return this._type}get id(){return this._id}set id(t){this._id=t}get popInParentIds(){return this._popInParentIds}get parent(){return this._parent}get contentItems(){return this._contentItems}get isClosable(){return this._isClosable}get element(){return this._element}get isInitialised(){return this._isInitialised}static isStack(t){return t.isStack}static isComponentItem(t){return t.isComponent}static isComponentParentableItem(t){return t.isStack||t.isGround}removeChild(t,e=!1){const i=this._contentItems.indexOf(t);if(-1===i)throw new Error("Can't remove child item. Unknown content item");if(e||this._contentItems[i].destroy(),this._contentItems.splice(i,1),this._contentItems.length>0)this.updateSize(!1);else if(!this.isGround&&!0===this._isClosable){if(null===this._parent)throw new K("CIUC00874");this._parent.removeChild(this)}}addChild(t,e,i){return null!=e||(e=this._contentItems.length),this._contentItems.splice(e,0,t),t.setParent(this),!0===this._isInitialised&&!1===t._isInitialised&&t.init(),e}replaceChild(t,e,i=!1){const n=this._contentItems.indexOf(t),o=t._element.parentNode;if(-1===n)throw new X("CIRCI23232","Can't replace child. oldChild is not child of this");if(null===o)throw new K("CIRCP23232");if(o.replaceChild(e._element,t._element),!0===i&&(t._parent=null,t.destroy()),this._contentItems[n]=e,e.setParent(this),e.size=t.size,e.sizeUnit=t.sizeUnit,e.minSize=t.minSize,e.minSizeUnit=t.minSizeUnit,null===e._parent)throw new K("CIRCNC45699");!0===e._parent._isInitialised&&!1===e._isInitialised&&e.init(),this.updateSize(!1)}remove(){if(null===this._parent)throw new K("CIR11110");this._parent.removeChild(this)}popout(){const t=Ot(),e=this.layoutManager.createPopoutFromContentItem(this,void 0,t,void 0);return this.emitBaseBubblingEvent("stateChanged"),e}calculateConfigContent(){const t=this._contentItems,e=t.length,i=new Array(e);for(let n=0;nthis.propagateEventToLayoutManager(t,e))))}propagateEventToLayoutManager(t,e){this._pendingEventPropagations[t]=!1,this.layoutManager.emitUnknown(t,e)}}class jt extends Gt{constructor(t,e,i){super(t,e,i,document.createElement("div")),this._parentItem=i,this._focused=!1,this.isComponent=!0,this._reorderEnabled=e.reorderEnabled,this.applyUpdatableConfig(e),this._initialWantMaximise=e.maximised;const n=document.createElement("div");n.classList.add("lm_content"),this.element.appendChild(n),this._container=new Ft(e,this,t,n,(t=>this.handleUpdateItemConfigEvent(t)),(()=>this.show()),(()=>this.hide()),(t=>this.focus(t)),(t=>this.blur(t)))}get componentName(){return this._container.componentType}get componentType(){return this._container.componentType}get reorderEnabled(){return this._reorderEnabled}get initialWantMaximise(){return this._initialWantMaximise}get component(){return this._container.component}get container(){return this._container}get parentItem(){return this._parentItem}get headerConfig(){return this._headerConfig}get title(){return this._title}get tab(){return this._tab}get focused(){return this._focused}destroy(){this._container.destroy(),super.destroy()}applyUpdatableConfig(t){this.setTitle(t.title),this._headerConfig=t.header}toConfig(){const t=this._container.stateRequestEvent,e=void 0===t?this._container.state:t();return{type:at.component,content:[],size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,maximised:!1,isClosable:this.isClosable,reorderEnabled:this._reorderEnabled,title:this._title,header:mt.Header.createCopy(this._headerConfig),componentType:pt.copyComponentType(this.componentType),componentState:e}}close(){if(null===this.parent)throw new K("CIC68883");this.parent.removeChild(this,!1)}enterDragMode(t,e){Tt(this.element,t),At(this.element,e),this._container.enterDragMode(t,e)}exitDragMode(){this._container.exitDragMode()}enterStackMaximised(){this._container.enterStackMaximised()}exitStackMaximised(){this._container.exitStackMaximised()}drag(){this._container.drag()}updateSize(t){this.updateNodeSize(t)}init(){this.updateNodeSize(!1),super.init(),this._container.emit("open"),this.initContentItems()}setTitle(t){this._title=t,this.emit("titleChanged",t),this.emit("stateChanged")}setTab(t){this._tab=t,this.emit("tab",t),this._container.setTab(t)}hide(){super.hide(),this._container.setVisibility(!1)}show(){super.show(),this._container.setVisibility(!0)}focus(t=!1){this.parentItem.setActiveComponentItem(this,!0,t)}setFocused(t){this._focused=!0,this.tab.setFocused(),t||this.emitBaseBubblingEvent("focus")}blur(t=!1){this._focused&&this.layoutManager.setFocusedComponentItem(void 0,t)}setBlurred(t){this._focused=!1,this.tab.setBlurred(),t||this.emitBaseBubblingEvent("blur")}setParent(t){this._parentItem=t,super.setParent(t)}handleUpdateItemConfigEvent(t){this.applyUpdatableConfig(t)}updateNodeSize(t){if("none"!==this.element.style.display){const{width:e,height:i}=kt(this.element);this._container.setSizeToNodeSize(e,i,t)}}}class $t extends Gt{constructor(){super(...arguments),this._focused=!1}get focused(){return this._focused}setFocusedValue(t){this._focused=t}}class Zt extends Wt{constructor(t,e){super(),this._eElement=t,this._pointerTracking=!1,this._pointerDownEventListener=t=>this.onPointerDown(t),this._pointerMoveEventListener=t=>this.onPointerMove(t),this._pointerUpEventListener=t=>this.onPointerUp(t),this._timeout=void 0,this._allowableTargets=[t,...e],this._oDocument=document,this._eBody=document.body,this._nDelay=1800,this._nDistance=10,this._nX=0,this._nY=0,this._nOriginalX=0,this._nOriginalY=0,this._dragging=!1,this._eElement.addEventListener("pointerdown",this._pointerDownEventListener,{passive:!0})}destroy(){this.checkRemovePointerTrackingEventListeners(),this._eElement.removeEventListener("pointerdown",this._pointerDownEventListener)}cancelDrag(){this.processDragStop(void 0)}onPointerDown(t){if(this._allowableTargets.includes(t.target)&&t.isPrimary){const e=this.getPointerCoordinates(t);this.processPointerDown(e)}}processPointerDown(t){this._nOriginalX=t.x,this._nOriginalY=t.y,this._oDocument.addEventListener("pointermove",this._pointerMoveEventListener),this._oDocument.addEventListener("pointerup",this._pointerUpEventListener,{passive:!0}),this._pointerTracking=!0,this._timeout=setTimeout((()=>{try{this.startDrag()}catch(t){throw console.error(t),t}}),this._nDelay)}onPointerMove(t){this._pointerTracking&&(this.processDragMove(t),t.preventDefault())}processDragMove(t){this._nX=t.pageX-this._nOriginalX,this._nY=t.pageY-this._nOriginalY,!1===this._dragging&&(Math.abs(this._nX)>this._nDistance||Math.abs(this._nY)>this._nDistance)&&this.startDrag(),this._dragging&&this.emit("drag",this._nX,this._nY,t)}onPointerUp(t){this.processDragStop(t)}processDragStop(t){var e;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this.checkRemovePointerTrackingEventListeners(),!0===this._dragging&&(this._eBody.classList.remove("lm_dragging"),this._eElement.classList.remove("lm_dragging"),null===(e=this._oDocument.querySelector("iframe"))||void 0===e||e.style.setProperty("pointer-events",""),this._dragging=!1,this.emit("dragStop",t))}checkRemovePointerTrackingEventListeners(){this._pointerTracking&&(this._oDocument.removeEventListener("pointermove",this._pointerMoveEventListener),this._oDocument.removeEventListener("pointerup",this._pointerUpEventListener),this._pointerTracking=!1)}startDrag(){var t;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this._dragging=!0,this._eBody.classList.add("lm_dragging"),this._eElement.classList.add("lm_dragging"),null===(t=this._oDocument.querySelector("iframe"))||void 0===t||t.style.setProperty("pointer-events","none"),this.emit("dragStart",this._nOriginalX,this._nOriginalY)}getPointerCoordinates(t){return{x:t.pageX,y:t.pageY}}}class qt{constructor(t,e,i){this._isVertical=t,this._size=e,this._grabSize=i0){const i=this.createSplitter(Math.max(0,e-1)).element;e>0?(this.contentItems[e-1].element.insertAdjacentElement("afterend",i),i.insertAdjacentElement("afterend",t.element)):(this.contentItems[0].element.insertAdjacentElement("beforebegin",i),i.insertAdjacentElement("beforebegin",t.element))}else this._childElementContainer.appendChild(t.element);super.addChild(t,e);const n=1/this.contentItems.length*100;if(!0===i)return this.emitBaseBubblingEvent("stateChanged"),e;for(let e=0;e0&&(this.calculateRelativeSizes(),this.setAbsoluteSizes()),this.emitBaseBubblingEvent("stateChanged"),this.emit("resize")}setAbsoluteSizes(){const t=this.calculateAbsoluteSizes();for(let e=0;e0&&t.itemSizes[e]++,this._isColumn?(Tt(this.contentItems[e].element,t.crossAxisSize),At(this.contentItems[e].element,t.itemSizes[e])):(Tt(this.contentItems[e].element,t.itemSizes[e]),At(this.contentItems[e].element,t.crossAxisSize))}calculateAbsoluteSizes(){const t=(this.contentItems.length-1)*this._splitterSize,{width:e,height:i}=kt(this.element);let n,o;this._isColumn?(n=i-t,o=e):(n=e-t,o=i);let s=0;const r=[];for(let t=0;t0){const n=100-t;for(let t=0;t100&&e.length>0){for(let t=0;te)return;{const r=i/e;let a=i;for(let e=0;ethis.onSplitterDrag(e,t,i))),e.on("dragStop",(()=>this.onSplitterDragStop(e))),e.on("dragStart",(()=>this.onSplitterDragStart(e))),this._splitter.splice(t,0,e),e}getSplitItems(t){const e=this._splitter.indexOf(t);return{before:this.contentItems[e],after:this.contentItems[e+1]}}calculateContentItemMinSize(t){const e=t.minSize;if(void 0!==e){if(t.minSizeUnit===ht.Pixel)return e;throw new X("ROCGMD98831",JSON.stringify(t))}{const t=this.layoutManager.layoutConfig.dimensions;return this._isColumn?t.defaultMinItemHeight:t.defaultMinItemWidth}}calculateContentItemsTotalMinSize(t){let e=0;for(const i of t)e+=this.calculateContentItemMinSize(i);return e}onSplitterDragStart(t){const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=this.calculateContentItemsTotalMinSize(e.before.contentItems),s=this.calculateContentItemsTotalMinSize(e.after.contentItems);this._splitterPosition=0,this._splitterMinPosition=-1*(i-o),this._splitterMaxPosition=n-s}onSplitterDrag(t,e,i){let n=this._isColumn?i:e;if(null===this._splitterMinPosition||null===this._splitterMaxPosition)throw new K("ROCOSD59226");n=Math.max(n,this._splitterMinPosition),n=Math.min(n,this._splitterMaxPosition),this._splitterPosition=n;const o=zt(n);this._isColumn?t.element.style.top=o:t.element.style.left=o}onSplitterDragStop(t){if(null===this._splitterPosition)throw new K("ROCOSDS66932");{const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=(this._splitterPosition+i)/(i+n),s=e.before.size+e.after.size;e.before.size=o*s,e.after.size=(1-o)*s,t.element.style.top=zt(0),t.element.style.left=zt(0),globalThis.requestAnimationFrame((()=>this.updateSize(!1)))}}}!function(t){t.getElementDimensionSize=function(t,e){return"width"===e?function(t){return t.offsetWidth}(t):function(t){return t.offsetHeight}(t)},t.setElementDimensionSize=function(t,e,i){return"width"===e?Tt(t,i):At(t,i)},t.createElement=function(t,e){const i=t.createElement("div");return i.classList.add("lm_item"),e?i.classList.add("lm_column"):i.classList.add("lm_row"),i}}(Xt||(Xt={}));class Yt extends $t{constructor(t,e,i){super(t,vt.create(e),null,Yt.createElement(document)),this.isGround=!0,this._childElementContainer=this.element,this._containerElement=i;let n=null;for(;;){const t=n?n.previousSibling:this._containerElement.lastChild;if(!(t instanceof Element&&t.classList.contains("lm_content")))break;n=t}this._containerElement.insertBefore(this.element,n)}init(){if(!0!==this.isInitialised){this.updateNodeSize();for(let t=0;t0?this.contentItems[0]:this,n.isComponent)throw new Error("Cannot add item as child to ComponentItem");{const t=this.layoutManager.createAndInitContentItem(i,n);return e=n.addChild(t,e),n===this?-1:e}}loadComponentAsRoot(t){this.clearRoot();const e=Ct.resolve(t,!1);if(e.maximised)throw new Error("Root Component cannot be maximised");{const t=new jt(this.layoutManager,e,this);t.init(),this.addChild(t,0)}}addChild(t,e){if(this.contentItems.length>0)throw new Error("Ground node can only have a single child");return this._childElementContainer.appendChild(t.element),e=super.addChild(t,e),this.updateSize(!1),this.emitBaseBubblingEvent("stateChanged"),e}calculateConfigContent(){const t=this.contentItems,e=t.length,i=new Array(e);for(let n=0;n0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e)),this.updateContentItemsSize(!1))}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}createSideAreas(){const t=Yt.Area.oppositeSides,e=new Array(Object.keys(t).length);let i=0;for(const n in t){const o=n,s=this.getElementArea();if(null===s)throw new K("RCSA77553");s.side=o,"2"===t[o][1]?s[o]=s[t[o]]-50:s[o]=s[t[o]]+50,s.surface=(s.x2-s.x1)*(s.y2-s.y1),e[i++]=s}return e}highlightDropZone(t,e,i){this.layoutManager.tabDropPlaceholder.remove(),super.highlightDropZone(t,e,i)}onDrop(t,e){if(t.isComponent){const e=ut.createDefault(),i=t;e.header=mt.Header.createCopy(i.headerConfig);const n=this.layoutManager.createAndInitContentItem(e,this);n.addChild(t),t=n}if(0===this.contentItems.length)this.addChild(t);else{if(t.type===at.row||t.type===at.column){const e=ut.createDefault(),i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}const i="x"==e.side[0]?at.row:at.column,n="2"==e.side[1],o=this.contentItems[0];if(o instanceof Xt&&o.type===i){const e=o.contentItems[n?0:o.contentItems.length-1];o.addChild(t,n?0:void 0,!0),e.size*=.5,t.size=e.size,t.sizeUnit=ht.Percent,o.updateSize(!1)}else{const e=ct.createDefault(i),s=this.layoutManager.createContentItem(e,this);this.replaceChild(o,s),s.addChild(t,n?0:void 0,!0),s.addChild(o,n?void 0:0,!0),o.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}}dock(){throw new X("GID87731")}validateDocking(){throw new X("GIVD87732")}getAllContentItems(){const t=[this];return this.deepGetAllContentItems(this.contentItems,t),t}getConfigMaximisedItems(){const t=[];return this.deepFilterContentItems(this.contentItems,t,(t=>!(!Gt.isStack(t)||!t.initialWantMaximise)||!(!Gt.isComponentItem(t)||!t.initialWantMaximise))),t}getItemsByPopInParentId(t){const e=[];return this.deepFilterContentItems(this.contentItems,e,(e=>e.popInParentIds.includes(t))),e}toConfig(){throw new Error("Cannot generate GroundItem config")}setActiveComponentItem(t,e,i){}updateNodeSize(){const{width:t,height:e}=kt(this._containerElement);Tt(this.element,t),At(this.element,e),this.contentItems.length>0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e))}deepGetAllContentItems(t,e){for(let i=0;ithis.onClick(t),this._touchStartEventListener=t=>this.onTouchStart(t),this._element=document.createElement("div"),this._element.classList.add(i),this._element.title=e,this._header.on("destroy",(()=>this.destroy())),this._element.addEventListener("click",this._clickEventListener,{passive:!0}),this._element.addEventListener("touchstart",this._touchStartEventListener,{passive:!0}),this._header.controlsContainerElement.appendChild(this._element)}get element(){return this._element}destroy(){var t;this._element.removeEventListener("click",this._clickEventListener),this._element.removeEventListener("touchstart",this._touchStartEventListener),null===(t=this._element.parentNode)||void 0===t||t.removeChild(this._element)}onClick(t){this._pushEvent(t)}onTouchStart(t){this._pushEvent(t)}}class Jt{constructor(t,e,i,n,o){var s;this._layoutManager=t,this._componentItem=e,this._closeEvent=i,this._focusEvent=n,this._dragStartEvent=o,this._isActive=!1,this._tabClickListener=t=>this.onTabClickDown(t),this._tabTouchStartListener=t=>this.onTabTouchStart(t),this._closeClickListener=()=>this.onCloseClick(),this._closeTouchStartListener=()=>this.onCloseTouchStart(),this._dragStartListener=(t,e)=>this.onDragStart(t,e),this._contentItemDestroyListener=()=>this.onContentItemDestroy(),this._tabTitleChangedListener=t=>this.setTitle(t),this._element=document.createElement("div"),this._element.classList.add("lm_tab"),this._titleElement=document.createElement("span"),this._titleElement.classList.add("lm_title"),this._closeElement=document.createElement("div"),this._closeElement.classList.add("lm_close_tab"),this._element.appendChild(this._titleElement),this._element.appendChild(this._closeElement),e.isClosable?this._closeElement.style.display="":this._closeElement.style.display="none",this.setTitle(e.title),this._componentItem.on("titleChanged",this._tabTitleChangedListener);(null!==(s=e.reorderEnabled)&&void 0!==s?s:this._layoutManager.layoutConfig.settings.reorderEnabled)&&this.enableReorder(),this._element.addEventListener("click",this._tabClickListener,{passive:!0}),this._element.addEventListener("touchstart",this._tabTouchStartListener,{passive:!0}),this._componentItem.isClosable?(this._closeElement.addEventListener("click",this._closeClickListener,{passive:!0}),this._closeElement.addEventListener("touchstart",this._closeTouchStartListener,{passive:!0})):(this._closeElement.remove(),this._closeElement=void 0),this._componentItem.setTab(this),this._layoutManager.emit("tabCreated",this)}get isActive(){return this._isActive}get componentItem(){return this._componentItem}get contentItem(){return this._componentItem}get element(){return this._element}get titleElement(){return this._titleElement}get closeElement(){return this._closeElement}get reorderEnabled(){return void 0!==this._dragListener}set reorderEnabled(t){t!==this.reorderEnabled&&(t?this.enableReorder():this.disableReorder())}setTitle(t){this._titleElement.innerText=t,this._element.title=t}setActive(t){t!==this._isActive&&(this._isActive=t,t?this._element.classList.add("lm_active"):this._element.classList.remove("lm_active"))}destroy(){var t,e;this._closeEvent=void 0,this._focusEvent=void 0,this._dragStartEvent=void 0,this._element.removeEventListener("click",this._tabClickListener),this._element.removeEventListener("touchstart",this._tabTouchStartListener),null===(t=this._closeElement)||void 0===t||t.removeEventListener("click",this._closeClickListener),null===(e=this._closeElement)||void 0===e||e.removeEventListener("touchstart",this._closeTouchStartListener),this._componentItem.off("titleChanged",this._tabTitleChangedListener),this.reorderEnabled&&this.disableReorder(),this._element.remove()}setBlurred(){this._element.classList.remove("lm_focused"),this._titleElement.classList.remove("lm_focused")}setFocused(){this._element.classList.add("lm_focused"),this._titleElement.classList.add("lm_focused")}onDragStart(t,e){if(void 0===this._dragListener)throw new J("TODSDLU10093");if(void 0===this._dragStartEvent)throw new J("TODS23309");this._dragStartEvent(t,e,this._dragListener,this.componentItem)}onContentItemDestroy(){void 0!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=void 0)}onTabClickDown(t){const e=t.target;e!==this._element&&e!==this._titleElement||(0===t.button?this.notifyFocus():1===t.button&&this._componentItem.isClosable&&this.notifyClose())}onTabTouchStart(t){t.target===this._element&&this.notifyFocus()}onCloseClick(){this.notifyClose()}onCloseTouchStart(){this.notifyClose()}notifyClose(){if(void 0===this._closeEvent)throw new J("TNC15007");this._closeEvent(this._componentItem)}notifyFocus(){if(void 0===this._focusEvent)throw new J("TNA15007");this._focusEvent(this._componentItem)}enableReorder(){this._dragListener=new Zt(this._element,[this._titleElement]),this._dragListener.on("dragStart",this._dragStartListener),this._componentItem.on("destroy",this._contentItemDestroyListener)}disableReorder(){if(void 0===this._dragListener)throw new J("TDR87745");this._componentItem.off("destroy",this._contentItemDestroyListener),this._dragListener.off("dragStart",this._dragStartListener),this._dragListener=void 0}}class Qt{constructor(t,e,i,n,o){this._layoutManager=t,this._componentRemoveEvent=e,this._componentFocusEvent=i,this._componentDragStartEvent=n,this._dropdownActiveChangedEvent=o,this._tabs=[],this._lastVisibleTabIndex=-1,this._dropdownActive=!1,this._element=document.createElement("section"),this._element.classList.add("lm_tabs"),this._dropdownElement=document.createElement("section"),this._dropdownElement.classList.add("lm_tabdropdown_list"),this._dropdownElement.style.display="none"}get tabs(){return this._tabs}get tabCount(){return this._tabs.length}get lastVisibleTabIndex(){return this._lastVisibleTabIndex}get element(){return this._element}get dropdownElement(){return this._dropdownElement}get dropdownActive(){return this._dropdownActive}destroy(){for(let t=0;tthis.handleTabCloseEvent(t)),(t=>this.handleTabFocusEvent(t)),((t,e,i,n)=>this.handleTabDragStartEvent(t,e,i,n)));void 0===e&&(e=this._tabs.length),this._tabs.splice(e,0,i),ethis._lastVisibleTabIndex){const t=this._tabs[e];for(let t=e;t>0;t--)this._tabs[t]=this._tabs[t-1];this._tabs[0]=t}}updateTabSizes(t,e){let i=!1;this.tryUpdateTabSizes(i,t,e)||(i=!0,this.tryUpdateTabSizes(i,t,e)),i!==this._dropdownActive&&(this._dropdownActive=i,this._dropdownActiveChangedEvent())}tryUpdateTabSizes(t,e,i){if(this._tabs.length>0){if(void 0===i)throw new Error("non-empty tabs must have active component item");let n=0,o=!1;const s=this._layoutManager.layoutConfig.settings.tabOverlapAllowance,r=this._tabs.indexOf(i.tab),a=this._tabs[r];this._lastVisibleTabIndex=-1;for(let i=0;ie){if(o)i===r&&(l.style.zIndex="auto",l.style.marginLeft="",l.parentElement!==this._element&&this._element.appendChild(l));else{let t;if(t=r>0&&r<=i?(d-e)/(i-1):(d-e)/i,tthis.onClick(t),this._touchStartListener=t=>this.onTouchStart(t),this._rowColumnClosable=!0,this._closeButton=null,this._popoutButton=null,this._tabsContainer=new Qt(this._layoutManager,(t=>this.handleTabInitiatedComponentRemoveEvent(t)),(t=>this.handleTabInitiatedComponentFocusEvent(t)),((t,e,i,n)=>this.handleTabInitiatedDragStartEvent(t,e,i,n)),(()=>this.processTabDropdownActiveChanged())),this._show=i.show,this._popoutEnabled=i.popoutEnabled,this._popoutLabel=i.popoutLabel,this._maximiseEnabled=i.maximiseEnabled,this._maximiseLabel=i.maximiseLabel,this._minimiseEnabled=i.minimiseEnabled,this._minimiseLabel=i.minimiseLabel,this._closeEnabled=i.closeEnabled,this._closeLabel=i.closeLabel,this._tabDropdownEnabled=i.tabDropdownEnabled,this._tabDropdownLabel=i.tabDropdownLabel,this.setSide(i.side),this._canRemoveComponent=this._configClosable,this._element=document.createElement("section"),this._element.classList.add("lm_header"),this._controlsContainerElement=document.createElement("section"),this._controlsContainerElement.classList.add("lm_controls"),this._element.appendChild(this._tabsContainer.element),this._element.appendChild(this._controlsContainerElement),this._element.appendChild(this._tabsContainer.dropdownElement),this._element.addEventListener("click",this._clickListener,{passive:!0}),this._element.addEventListener("touchstart",this._touchStartListener,{passive:!0}),this._documentMouseUpListener=()=>this._tabsContainer.hideAdditionalTabsDropdown(),globalThis.document.addEventListener("mouseup",this._documentMouseUpListener,{passive:!0}),this._tabControlOffset=this._layoutManager.layoutConfig.settings.tabControlOffset,this._tabDropdownEnabled&&(this._tabDropdownButton=new Kt(this,this._tabDropdownLabel,"lm_tabdropdown",(()=>this._tabsContainer.showAdditionalTabsDropdown()))),this._popoutEnabled&&(this._popoutButton=new Kt(this,this._popoutLabel,"lm_popout",(()=>this.handleButtonPopoutEvent()))),this._maximiseEnabled&&(this._maximiseButton=new Kt(this,this._maximiseLabel,"lm_maximise",(t=>this.handleButtonMaximiseToggleEvent(t)))),this._configClosable&&(this._closeButton=new Kt(this,this._closeLabel,"lm_close",(()=>s()))),this.processTabDropdownActiveChanged()}get show(){return this._show}get side(){return this._side}get leftRightSided(){return this._leftRightSided}get layoutManager(){return this._layoutManager}get parent(){return this._parent}get tabs(){return this._tabsContainer.tabs}get lastVisibleTabIndex(){return this._tabsContainer.lastVisibleTabIndex}get element(){return this._element}get tabsContainerElement(){return this._tabsContainer.element}get controlsContainerElement(){return this._controlsContainerElement}destroy(){this.emit("destroy"),this._popoutEvent=void 0,this._maximiseToggleEvent=void 0,this._clickEvent=void 0,this._touchStartEvent=void 0,this._componentRemoveEvent=void 0,this._componentFocusEvent=void 0,this._componentDragStartEvent=void 0,this._tabsContainer.destroy(),globalThis.document.removeEventListener("mouseup",this._documentMouseUpListener),this._element.remove()}createTab(t,e){this._tabsContainer.createTab(t,e)}removeTab(t){this._tabsContainer.removeTab(t)}processActiveComponentChanged(t){this._tabsContainer.processActiveComponentChanged(t),this.updateTabSizes()}setSide(t){this._side=t,this._leftRightSided=[nt.right,nt.left].includes(this._side)}setRowColumnClosable(t){this._rowColumnClosable=t,this.updateClosability()}updateClosability(){let t;if(this._configClosable)if(this._rowColumnClosable){t=!0;const e=this.tabs.length;for(let i=0;i1}applyFocusedValue(t){t?this._element.classList.add("lm_focused"):this._element.classList.remove("lm_focused")}processMaximised(){if(void 0===this._maximiseButton)throw new J("HPMAX16997");this._maximiseButton.element.setAttribute("title",this._minimiseLabel)}processMinimised(){if(void 0===this._maximiseButton)throw new J("HPMIN16997");this._maximiseButton.element.setAttribute("title",this._maximiseLabel)}updateTabSizes(){if(this._tabsContainer.tabCount>0){const t=this._show?this._layoutManager.layoutConfig.dimensions.headerHeight:0;let e;this._leftRightSided?(this._element.style.height="",this._element.style.width=zt(t)):(this._element.style.width="",this._element.style.height=zt(t)),e=this._leftRightSided?this._element.offsetHeight-this._controlsContainerElement.offsetHeight-this._tabControlOffset:this._element.offsetWidth-this._controlsContainerElement.offsetWidth-this._tabControlOffset,this._tabsContainer.updateTabSizes(e,this._getActiveComponentItemEvent())}}handleTabInitiatedComponentRemoveEvent(t){if(this._canRemoveComponent){if(void 0===this._componentRemoveEvent)throw new J("HHTCE22294");this._componentRemoveEvent(t)}}handleTabInitiatedComponentFocusEvent(t){if(void 0===this._componentFocusEvent)throw new J("HHTAE22294");this._componentFocusEvent(t)}handleTabInitiatedDragStartEvent(t,e,i,n){if(this._canRemoveComponent){if(void 0===this._componentDragStartEvent)throw new J("HHTDSE22294");this._componentDragStartEvent(t,e,i,n)}else i.cancelDrag()}processTabDropdownActiveChanged(){void 0!==this._tabDropdownButton&&Dt(this._tabDropdownButton.element,this._tabsContainer.dropdownActive)}handleButtonPopoutEvent(){if(this._layoutManager.layoutConfig.settings.popoutWholeStack){if(void 0===this._popoutEvent)throw new J("HHBPOE17834");this._popoutEvent()}else{const t=this._getActiveComponentItemEvent();t&&t.popout()}}handleButtonMaximiseToggleEvent(t){if(void 0===this._maximiseToggleEvent)throw new J("HHBMTE16834");this._maximiseToggleEvent()}onClick(t){t.target===this._element&&this.notifyClick(t)}onTouchStart(t){t.target===this._element&&this.notifyTouchStart(t)}notifyClick(t){if(void 0===this._clickEvent)throw new J("HNHC46834");this._clickEvent(t)}notifyTouchStart(t){if(void 0===this._touchStartEvent)throw new J("HNHTS46834");this._touchStartEvent(t)}}class ee extends $t{constructor(t,e,i){var n,o,s,r,a,l,h,d,c,m,u,p,g,f,v,_,y,C,w;super(t,e,i,ee.createElement(document)),this._headerSideChanged=!1,this._resizeListener=()=>this.handleResize(),this._maximisedListener=()=>this.handleMaximised(),this._minimisedListener=()=>this.handleMinimised(),this._headerConfig=e.header;const I=t.layoutConfig.header,b=e.content;let S;if(1!==b.length)S=void 0;else{S=b[0].header}this._initialWantMaximise=e.maximised,this._initialActiveItemIndex=null!==(n=e.activeItemIndex)&&void 0!==n?n:0;const E=null!==(r=null!==(s=null===(o=this._headerConfig)||void 0===o?void 0:o.show)&&void 0!==s?s:null==S?void 0:S.show)&&void 0!==r?r:I.show,x=null!==(h=null!==(l=null===(a=this._headerConfig)||void 0===a?void 0:a.popout)&&void 0!==l?l:null==S?void 0:S.popout)&&void 0!==h?h:I.popout,L=null!==(m=null!==(c=null===(d=this._headerConfig)||void 0===d?void 0:d.maximise)&&void 0!==c?c:null==S?void 0:S.maximise)&&void 0!==m?m:I.maximise,z=null!==(g=null!==(p=null===(u=this._headerConfig)||void 0===u?void 0:u.close)&&void 0!==p?p:null==S?void 0:S.close)&&void 0!==g?g:I.close,M=null!==(_=null!==(v=null===(f=this._headerConfig)||void 0===f?void 0:f.minimise)&&void 0!==v?v:null==S?void 0:S.minimise)&&void 0!==_?_:I.minimise,P=null!==(w=null!==(C=null===(y=this._headerConfig)||void 0===y?void 0:y.tabDropdown)&&void 0!==C?C:null==S?void 0:S.tabDropdown)&&void 0!==w?w:I.tabDropdown;this._maximisedEnabled=!1!==L;const T={show:!1!==E,side:!1===E?nt.top:E,popoutEnabled:!1!==x,popoutLabel:!1===x?"":x,maximiseEnabled:this._maximisedEnabled,maximiseLabel:!1===L?"":L,closeEnabled:!1!==z,closeLabel:!1===z?"":z,minimiseEnabled:!0,minimiseLabel:M,tabDropdownEnabled:!1!==P,tabDropdownLabel:!1===P?"":P};this._header=new te(t,this,T,e.isClosable&&!1!==z,(()=>this.getActiveComponentItem()),(()=>this.remove()),(()=>this.handlePopoutEvent()),(()=>this.toggleMaximise()),(t=>this.handleHeaderClickEvent(t)),(t=>this.handleHeaderTouchStartEvent(t)),(t=>this.handleHeaderComponentRemoveEvent(t)),(t=>this.handleHeaderComponentFocusEvent(t)),((t,e,i,n)=>this.handleHeaderComponentStartDragEvent(t,e,i,n))),this.isStack=!0,this._childElementContainer=document.createElement("section"),this._childElementContainer.classList.add("lm_items"),this.on("resize",this._resizeListener),this._maximisedEnabled&&(this.on("maximised",this._maximisedListener),this.on("minimised",this._minimisedListener)),this.element.appendChild(this._header.element),this.element.appendChild(this._childElementContainer),this.setupHeaderPosition(),this._header.updateClosability()}get childElementContainer(){return this._childElementContainer}get header(){return this._header}get headerShow(){return this._header.show}get headerSide(){return this._header.side}get headerLeftRightSided(){return this._header.leftRightSided}get contentAreaDimensions(){return this._contentAreaDimensions}get initialWantMaximise(){return this._initialWantMaximise}get isMaximised(){return this===this.layoutManager.maximisedStack}get stackParent(){if(!this.parent)throw new Error("Stack should always have a parent");return this.parent}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}init(){if(!0===this.isInitialised)return;this.updateNodeSize();for(let t=0;t0){if(this._initialActiveItemIndex<0||this._initialActiveItemIndex>=e)throw new Error(`ActiveItemIndex out of range: ${this._initialActiveItemIndex} id: ${this.id}`);for(let i=0;ithis.contentItems.length)throw e-=1,new X("SAC99728");if(t instanceof jt)return e=super.addChild(t,e),this._childElementContainer.appendChild(t.element),this._header.createTab(t,e),this.setActiveComponentItem(t,i),this._header.updateTabSizes(),this.updateSize(!1),t.container.setBaseLogicalZIndex(),this._header.updateClosability(),this.emitStateChangedEvent(),e;throw new X("SACC88532")}removeChild(t,e){const i=t,n=this.contentItems.indexOf(i),o=1===this.contentItems.length;if(this._activeComponentItem===i&&(i.focused&&i.blur(),!o)){const t=0===n?1:n-1;this.setActiveComponentItem(this.contentItems[t],!1)}this._header.removeTab(i),super.removeChild(i,e),o||this._header.updateClosability(),this.emitStateChangedEvent()}toggleMaximise(){this.isMaximised?this.minimise():this.maximise()}maximise(){if(!this.isMaximised){this.layoutManager.setMaximisedStack(this);const t=this.contentItems,e=t.length;for(let i=0;i0&&void 0===t)throw new Error("expected non-empty stack to have an active component item");return{type:"stack",content:this.calculateConfigContent(),size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,isClosable:this.isClosable,maximised:this.isMaximised,header:this.createHeaderConfig(),activeItemIndex:t}}onDrop(t,e){if("header"===this._dropSegment){if(this.resetHeaderDropZone(),void 0===this._dropIndex)throw new J("SODDI68990");return void this.addChild(t,this._dropIndex)}if("body"===this._dropSegment)return void this.addChild(t,0,!0);const i="top"===this._dropSegment||"bottom"===this._dropSegment,n="left"===this._dropSegment||"right"===this._dropSegment,o="top"===this._dropSegment||"left"===this._dropSegment,s=i&&this.stackParent.isColumn||n&&this.stackParent.isRow;if(t.isComponent){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createAndInitContentItem(e,this);i.addChild(t),t=i}if(t.type===at.row||t.type===at.column){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}if(s){const e=this.stackParent.contentItems.indexOf(this);this.stackParent.addChild(t,o?e:e+1,!0),this.size*=.5,t.size=this.size,t.sizeUnit=this.sizeUnit,this.stackParent.updateSize(!1)}else{const e=i?at.column:at.row,n=ct.createDefault(e),s=this.layoutManager.createContentItem(n,this);this.stackParent.replaceChild(this,s),s.addChild(t,o?0:void 0,!0),s.addChild(this,o?void 0:0,!0),this.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}highlightDropZone(t,e){for(const i in this._contentAreaDimensions){const n=i,o=this._contentAreaDimensions[n].hoverArea;if(o.x1t&&o.y1e)return void("header"===n?(this._dropSegment="header",this.highlightHeaderDropZone(this._header.leftRightSided?e:t)):(this.resetHeaderDropZone(),this.highlightBodyDropZone(n)))}}getArea(){if("none"===this.element.style.display)return null;const t=super.getElementArea(this._header.element),e=super.getElementArea(this._childElementContainer);if(null===t||null===e)throw new K("SGAHC13086");const i=e.x2-e.x1,n=e.y2-e.y1;return this._contentAreaDimensions={header:{hoverArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2},highlightArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2}}},0===this.contentItems.length?(this._contentAreaDimensions.body={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2}},super.getElementArea(this.element)):(this._contentAreaDimensions.left={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x1+.25*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x1+.5*i,y2:e.y2}},this._contentAreaDimensions.top={hoverArea:{x1:e.x1+.25*i,y1:e.y1,x2:e.x1+.75*i,y2:e.y1+.5*n},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y1+.5*n}},this._contentAreaDimensions.right={hoverArea:{x1:e.x1+.75*i,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1+.5*i,y1:e.y1,x2:e.x2,y2:e.y2}},this._contentAreaDimensions.bottom={hoverArea:{x1:e.x1+.25*i,y1:e.y1+.5*n,x2:e.x1+.75*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1+.5*n,x2:e.x2,y2:e.y2}},super.getElementArea(this.element))}positionHeader(t){this._header.side!==t&&(this._header.setSide(t),this._headerSideChanged=!0,this.setupHeaderPosition())}updateNodeSize(){if("none"!==this.element.style.display){const t=kt(this.element);if(this._header.show){t[this._header.leftRightSided?it.width:it.height]-=this.layoutManager.layoutConfig.dimensions.headerHeight}this._childElementContainer.style.width=zt(t.width),this._childElementContainer.style.height=zt(t.height);for(let e=0;e=o&&t({...t,[e]:i});async function s(t,e){return(await Promise.all(e.map((async([e,i])=>[e,await t(i,e)])))).reduce(o,{})}n.mapEntriesAsync=s,n.mapValuesAsync=async function(t,e){let i;return i=e instanceof Map?[...e.entries()]:Object.entries(e),s(t,i)};var r,a,l,h,d=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldSet||function(t,e,i,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(t,i):o?o.value=i:e.set(t,i),i},c=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldGet||function(t,e,i,n){if("a"===i&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?n:"a"===i?n.call(t):n?n.value:e.get(t)};Object.defineProperty(i,"__esModule",{value:!0});var m=i.DefaultLayoutManager=void 0;const u=n;class p{constructor(t){a.set(this,void 0),l.set(this,new Map),d(this,a,t,"f")}size(){return c(this,l,"f").size}async applyLayoutSnapshot({layouts:t}){if(Object.keys(t).length>1)throw new Error("[LayoutManager] Tried to call applyLayoutSnapshot with more than 1 layout. When implementing multiple layouts via overridden LayoutManager class, you must override and fully implement the applyLayoutSnapshot method without calling super.applyLayoutSnapshot().");const[[e,i]]=Object.entries(t);await p.createLayout(this,{layoutName:e,layout:i})}async showLayout({layoutName:t}){}async getLayoutSnapshot(){return{layouts:await(0,u.mapValuesAsync)((t=>t.getFrameSnapshot()),c(this,l,"f"))}}async removeLayout({layoutName:t}){}getLayoutIdentityForView(t){const e=[...c(this,l,"f").values()].find((e=>e.getCurrentViews().some((e=>e.name===t.name&&e.uuid===t.uuid))));return e?.identity??void 0}isLayoutVisible({layoutName:t}){return c(p,r,"m",h).call(p,this,t).isVisible()}resolveLayoutIdentity(t){if(t&&"layoutName"in t)return t;const e=[...c(this,l,"f").values()];if(1===e.length)return e[0].identity;const i=e.find((t=>t.isVisible()));return i?.identity??void 0}static async resolveLayout(t,e){const i=t.resolveLayoutIdentity(e);if(void 0===i||!("layoutName"in i))throw new Error("[layout-manager] resolveLayout: Could not resolve the layout identity. Make sure you include 'layoutName' in the identity object.");return c(p,r,"m",h).call(p,t,i.layoutName)}static async handleSharedView(t,e,i){await(0,u.mapValuesAsync)((async t=>{if(t.identity.layoutName!==e.layoutName){const e=t.getCurrentViews().find((t=>t.name===i.name));e&&await t.onViewDetached({viewIdentity:e,target:null}).catch(console.error)}}),c(t,l,"f"))}static async handleLastViewRemoved(t,e){await t.removeLayout(e),await c(t,a,"f").handleLastViewRemoved(t)}static async destroyLayout(t,{layoutName:e}){await c(p,r,"m",h).call(p,t,e).destroy(),c(t,l,"f").delete(e)}static async createLayout(t,e){const{layoutName:i}=e;if(c(t,l,"f").has(i))throw new Error(`Layout name ${i} already exists`);await c(t,a,"f").createLayout(e,t)}static registerLayout(t,e,i){c(t,l,"f").set(e,i)}static getAllLayouts(t){return[...c(t,l,"f").values()]}static setInitialSnapshot(t,e){c(t,a,"f").setInitialSnapshot(e)}static createClosedConstructor(...t){return class extends p{constructor(){super(...t)}}}}m=i.DefaultLayoutManager=p,r=p,a=new WeakMap,l=new WeakMap,h=function(t,e){const i=c(t,l,"f").get(e);if(!i)throw new Error(`[layout-manager] getLayoutByName: Could not locate layout with name '${e}'`);return i};var g={},f={},v={};Object.defineProperty(v,"__esModule",{value:!0}),v.ReversibleMap=void 0;v.ReversibleMap=class{constructor(){this.valueToKey=new Map,this.keyToValue=new Map,this.setUnique=(t,e)=>{if(this.hasKey(t)||this.hasValue(e))throw new Error("Key or value already in the map.");this.keyToValue.set(t,e),this.valueToKey.set(e,t)},this.getKey=t=>{const e=this.valueToKey.get(t);if(!e)throw new Error("Value not found in the map.");return e},this.deleteKey=t=>{const e=this.getValue(t);return this.keyToValue.delete(t),this.valueToKey.delete(e),e},this.deleteValue=t=>{const e=this.getKey(t);return this.keyToValue.delete(e),this.valueToKey.delete(t),e},this.hasKey=t=>this.keyToValue.has(t),this.hasValue=t=>this.valueToKey.has(t)}getValue(t){const e=this.keyToValue.get(t);if(!e)throw new Error("Key not found in the map.");return e}},Object.defineProperty(f,"__esModule",{value:!0});var _=f.LayoutContentCache=void 0;const y=t.lazy,C=v;class w{constructor(){this.contentItemCache=new C.ReversibleMap,this.contentItemCacheId=0,this.createCacheKey=()=>{const t=`entity-${this.contentItemCacheId.toString()}`;return this.contentItemCacheId+=1,t},this.hasKey=t=>this.contentItemCache.hasKey(t),this.getItemOrUndefined=t=>{try{return this.getContentItemOrThrow(t)}catch(t){return}},this.getContentItemOrThrow=(t,e)=>{if(!this.contentItemCache.hasKey(t))throw new Error("Layout component has been destroyed or detached from the current layout.");const i=this.contentItemCache.getValue(t);if(e&&!e.includes(i.type))throw new Error(`Layout item is not the expected type. Expected ${e.join(", ")}, got ${i.type}.`);return i},this.getOrCreateEntityId=t=>{if(this.contentItemCache.hasValue(t))return this.contentItemCache.getKey(t);t.onDestroyed((()=>{this.contentItemCache.deleteValue(t)}));const e=this.createCacheKey();return this.contentItemCache.setUnique(e,t),e}}static getSingleInstance(){return w.singleton.getValue()}}_=f.LayoutContentCache=w,w.singleton=new y.Lazy((()=>new w));var I={},b={};!function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.getAdjacentStacks=t.doShareEdge=t.getAdjacentItem=void 0;t.getAdjacentItem=(e,i)=>{const{parent:n}=e;if(e.isRoot()||!n)return;const o=["top","bottom"].includes(i)?"column":"row",s=["top","left"].includes(i)?-1:1;if(n.type===o){const t=n.contentItems.indexOf(e)+s;if(t>=0&&t{const n=t.getBounds(),o=e.getBounds();if(!n||!o)return!1;if(["top","bottom"].includes(i)){return!(n.righto.right)}return!(n.bottomo.bottom)};t.getAdjacentStacks=(e,i)=>{const n=["top","bottom"].includes(i)?"row":"column",o=s=>"stack"===s.type?(0,t.doShareEdge)(e,s,i)?[s]:[]:"root"===s.type||"ground"===s.type?[]:s.type===n?s.contentItems.map((t=>o(t))).flat():s.type!==n?["top","right"].includes(i)?o(s.contentItems[s.contentItems.length-1]):o(s.contentItems[0]):[],s=(0,t.getAdjacentItem)(e,i);return s?o(s):[]}}(b);var S=t.commonjsGlobal&&t.commonjsGlobal.__decorate||function(t,e,i,n){var o,s=arguments.length,r=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(s<3?o(r):s>3?o(e,i,r):o(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};Object.defineProperty(I,"__esModule",{value:!0}),I.LayoutEntitiesController=void 0;const E=t.decorators,x=b,L=i;class z{constructor(t,e,i){this.wire=t,this.layoutManager=e,this.layoutContentCache=i,this.analytics=t=>{this.wire.sendAction(`layout-controller-${t}`).catch((()=>{}))},this.getLayoutIdentityForViewOrThrow=async t=>{const e=this.layoutManager.getLayoutIdentityForView(t);if(!e)throw new Error(`View identity ${t.name} is not attached to any layouts.`);return e},this.getRoot=async t=>{this.analytics("get-root");const e=(await this.getLayout(t)).getRoot();return{type:e.type,entityId:this.layoutContentCache.getOrCreateEntityId(e)}},this.getStackByView=async t=>{this.analytics("get-stack-by-view");const e=await this.getLayoutIdentityForViewOrThrow(t),i=(await this.getLayout(e)).getStackByView(t);if("stack"===i?.type)return{entityId:this.layoutContentCache.getOrCreateEntityId(i),type:"stack"}},this.getStackViews=t=>{this.analytics("get-stack-views");return this.layoutContentCache.getContentItemOrThrow(t,["stack"]).contentItems.map((t=>({name:t.viewName,uuid:this.wire.me.uuid})))},this.isRoot=t=>{this.analytics("is-root");return this.layoutContentCache.getContentItemOrThrow(t).isRoot()},this.exists=t=>(this.analytics("exists"),this.layoutContentCache.hasKey(t)),this.addViewToStack=async(t,e,{index:i}={index:0})=>{this.analytics("add-view-to-stack");const n=this.layoutContentCache.getContentItemOrThrow(t);if(i&&i>n.contentItems.length+1)throw new Error(`Index '${i}' out of range, please exclude the index or specify a number between 0 and ${n.contentItems.length}`);const o={id:t,index:i},{identity:s}=await n.layout.platformCreateView(e,{location:o});return s},this.findViewInStack=(t,e)=>t.contentItems.find((t=>t.viewName===e.name)),this.removeViewFromStack=async(t,e)=>{this.analytics("remove-view-from-stack");const i=this.layoutContentCache.getContentItemOrThrow(t,["stack"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to remove a view ('${e.name}') which does not belong to the stack.`);await n.layout.platformCloseView(e)},this.createAdjacentStack=async(t,e,{position:i="right"}={})=>{if(this.analytics("create-adjacent-stack"),!Array.isArray(e)||0===e.length)throw new Error('The parameter "views" must be an array with at least 1 element.');if(!["top","bottom","left","right"].includes(i))throw new Error(`Invalid position '${i}' specified.`);const n=this.layoutContentCache.getContentItemOrThrow(t).createAdjacentStack({position:i}),o=this.layoutContentCache.getOrCreateEntityId(n);return await Promise.all(e.reverse().map((t=>this.addViewToStack(o,t)))),o},this.getAdjacentStacks=async({targetId:t,edge:e})=>{this.analytics("get-adjacent-stacks");const i=this.layoutContentCache.getContentItemOrThrow(t);return(0,x.getAdjacentStacks)(i,e).map((t=>({entityId:this.layoutContentCache.getOrCreateEntityId(t)})))},this.setStackActiveView=async(t,e)=>{this.analytics("set-stack-active-view");const i=this.layoutContentCache.getContentItemOrThrow(t,["stack"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to set a view ('${e.name}') as active when it does not belong to the stack.`);i.setActiveContentItem(n,!0)}}async getLayout(t){const e=await L.DefaultLayoutManager.resolveLayout(this.layoutManager,t);if(!e)throw new Error(`Could not resolve target layout identity ${JSON.stringify(t)}`);return e}getContent(t){this.analytics("get-content");return this.layoutContentCache.getContentItemOrThrow(t,["column","row"]).contentItems.map((t=>({type:t.type,entityId:this.layoutContentCache.getOrCreateEntityId(t)})))}getParent(t){this.analytics("get-parent");const e=this.layoutContentCache.getContentItemOrThrow(t);if(!e.isRoot())return e.parent?.contentItems.includes(e)?{type:e.parent.type,entityId:this.layoutContentCache.getOrCreateEntityId(e.parent)}:void 0}}S([(0,E.expose)()],z.prototype,"getLayoutIdentityForViewOrThrow",void 0),S([(0,E.expose)()],z.prototype,"getRoot",void 0),S([(0,E.expose)()],z.prototype,"getStackByView",void 0),S([(0,E.expose)()],z.prototype,"getStackViews",void 0),S([(0,E.expose)()],z.prototype,"getContent",null),S([(0,E.expose)()],z.prototype,"getParent",null),S([(0,E.expose)()],z.prototype,"isRoot",void 0),S([(0,E.expose)()],z.prototype,"exists",void 0),S([(0,E.expose)()],z.prototype,"addViewToStack",void 0),S([(0,E.expose)()],z.prototype,"removeViewFromStack",void 0),S([(0,E.expose)()],z.prototype,"createAdjacentStack",void 0),S([(0,E.expose)()],z.prototype,"getAdjacentStacks",void 0),S([(0,E.expose)()],z.prototype,"setStackActiveView",void 0),I.LayoutEntitiesController=z,Object.defineProperty(g,"__esModule",{value:!0});var M=g.initLayoutEndpoints=void 0;const P=t.apiExposer,T=t.layout_constants,A=f,k=I,D=i;M=g.initLayoutEndpoints=async function(t,e){const i=t.getFin(),n=await i.Platform.getCurrentSync().getClient(),o=new P.ChannelsExposer(n);await new P.ApiExposer(o).exposeInstance(new k.LayoutEntitiesController(t,e,A.LayoutContentCache.getSingleInstance()),{id:T.LAYOUT_CONTROLLER_ID}),await async function(t,e){const i=t=>async i=>{const n=await D.DefaultLayoutManager.resolveLayout(e,i.target);if(!n)throw new Error(`Could not resolve the layout target from payload ${JSON.stringify(i)}`);return t(n,i)},n=(e,n)=>{t.register(e,i(n))},o=(t,e)=>{n(t,e)};n("replace-view",((t,e)=>t.replaceView(e))),n("replace-layout",((t,{layout:e})=>t.replaceLayout(e))),n("add-view",((t,e)=>t.insertView(e))),o("layout-add-view",((t,{viewOptions:e,location:i,targetView:n})=>t.platformCreateView(e,{location:i,targetView:n}))),n("close-view",((t,e)=>t.cleanupView(e.viewIdentity))),o("layout-close-view",((t,e)=>t.platformCloseView(e.viewIdentity))),n("apply-preset-layout",((t,e)=>t.applyPreset(e))),n("get-layout-views",(t=>t.getCurrentViews())),n("get-frame-snapshot",(t=>t.getFrameSnapshot())),n("is-visible",(t=>t.isVisible())),n("destroy",(t=>t.destroy())),t.register("get-layout-snapshot",(()=>e.getLayoutSnapshot()))}(n,e)};var R={};Object.defineProperty(R,"__esModule",{value:!0});var U=R.BaseLayout=void 0;U=R.BaseLayout=class{};var O={};Object.defineProperty(O,"__esModule",{value:!0});var V=O.DOMEmitter=void 0;V=O.DOMEmitter=class{constructor(t){this.container=t}dispatchLocalEvent(t,e){const i={...e,type:t,tabSelector:`tab-${e.name}`,containerSelector:`container-${e.name}`,topic:"openfin-DOM-event"};this.container.dispatchEvent(new CustomEvent(t,{detail:i}))}};var B={};Object.defineProperty(B,"__esModule",{value:!0});var H=B.mapLayoutContentItemsImmutableSync=B.mapLayoutContentItemsImmutable=W=B.isVisible=void 0;var W=B.isVisible=t=>(0!==t.offsetWidth||0!==t.offsetHeight)&&"hidden"!==window.getComputedStyle(t).visibility&&t.offsetTop>=0&&t.offsetLeft>=0&&t.offsetTop<=window.innerHeight&&t.offsetLeft<=window.innerWidth;const F=t=>"type"in t&&"component"===t.type;B.mapLayoutContentItemsImmutable=async function t(e,i){return F(i)?e(i):{...i,content:await Promise.all(i.content?.map((i=>t(e,i))))}},H=B.mapLayoutContentItemsImmutableSync=function t(e,i){return F(i)?e(i):{...i,content:i.content?.map((i=>t(e,i)))}};class N extends Error{constructor(t,e){super(e),this.type=t}}class G extends N{constructor(t,e){super("Configuration",t),this.node=e}}class j extends N{constructor(t){super("PopoutBlocked",t)}}class $ extends N{constructor(t){super("API",t)}}class Z extends N{constructor(t){super("Bind",t)}}class q extends Error{constructor(t,e,i){super(`${t}: ${e}${void 0===i?"":": "+i}`)}}class X extends q{constructor(t,e){super("Assert",t,e)}}class Y extends q{constructor(t,e,i){super("UnreachableCase",t,`${e}${void 0===i?"":": "+i}`)}}class K extends q{constructor(t,e){super("UnexpectedNull",t,e)}}class J extends q{constructor(t,e){super("UnexpectedUndefined",t,e)}}var Q;!function(t){let e=!1;const i={PopoutCannotBeCreatedWithGroundItemConfig:{id:0,default:"Popout cannot be created with ground ItemConfig"},PleaseRegisterAConstructorFunction:{id:1,default:"Please register a constructor function"},ComponentTypeNotRegisteredAndBindComponentEventHandlerNotAssigned:{id:2,default:"Component type not registered and BindComponentEvent handler not assigned"},ComponentIsAlreadyRegistered:{id:3,default:"Component is already registered"},ComponentIsNotVirtuable:{id:4,default:"Component is not virtuable. Requires rootHtmlElement field/getter"},VirtualComponentDoesNotHaveRootHtmlElement:{id:5,default:'Virtual component does not have getter "rootHtmlElement"'},ItemConfigIsNotTypeComponent:{id:6,default:"ItemConfig is not of type component"},InvalidNumberPartInSizeString:{id:7,default:"Invalid number part in size string"},UnknownUnitInSizeString:{id:8,default:"Unknown unit in size string"},UnsupportedUnitInSizeString:{id:9,default:"Unsupported unit in size string"}};t.idCount=Object.keys(i).length;const n=Object.values(i);t.checkInitialise=function(){if(!e)for(let e=0;e="0"&&t<="9"}function Tt(t,e){const i=zt(e);t.style.width=i}function At(t,e){const i=zt(e);t.style.height=i}function kt(t){return{width:t.offsetWidth,height:t.offsetHeight}}function Dt(t,e){t.style.display=e?"":"none"}function Rt(t,e){if(void 0!==e)for(const i in e)if(e.hasOwnProperty(i)){const n=e[i],o=t[i];t[i]=Ut(o,n)}return t}function Ut(t,e){if("object"!=typeof e)return e;if(Array.isArray(e)){const t=e.length,i=new Array(t);for(let n=0;n36)throw new Error("Too many keys in config minifier map")},t.translateObject=n}(dt||(dt={})),function(t){t.defaults={type:at.ground,content:[],size:1,sizeUnit:ht.Fractional,minSize:void 0,minSizeUnit:ht.Pixel,id:"",isClosable:!0},t.createCopy=function(t,e){switch(t.type){case at.ground:case at.row:case at.column:return gt.createCopy(t,e);case at.stack:return ut.createCopy(t,e);case at.component:return pt.createCopy(t);default:throw new Y("CICC91354",t.type,"Invalid Config Item type specified")}},t.createDefault=function(t){switch(t){case at.ground:throw new X("CICCDR91562");case at.row:case at.column:return gt.createDefault(t);case at.stack:return ut.createDefault();case at.component:return pt.createDefault();default:throw new Y("CICCDD91563",t,"Invalid Config Item type specified")}},t.isComponentItem=function(t){return t.type===at.component},t.isStackItem=function(t){return t.type===at.stack},t.isGroundItem=function(t){return t.type===at.ground}}(ct||(ct={})),function(t){t.defaultMaximised=!1,function(t){t.createCopy=function(t,e){return void 0===t?void 0:{show:null!=e?e:t.show,popout:t.popout,close:t.close,maximise:t.maximise,minimise:t.minimise,tabDropdown:t.tabDropdown}}}(t.Header||(t.Header={}))}(mt||(mt={})),function(t){function e(t){const e=t.length,i=new Array(e);for(let n=0;n"__glMaximised"===t));t>0&&(o=!0,n=n.splice(t,1)),e=n.length>0?n[0]:ct.defaults.id}else e=n;return i=void 0!==t.maximised?t.maximised:o,{id:e,maximised:i}}}(wt||(wt={})),function(t){function e(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0;return{resolved:!0,root:Et.resolve(i),openPopouts:t.resolveOpenPopouts(e.openPopouts),dimensions:t.Dimensions.resolve(e.dimensions),settings:t.Settings.resolve(e.settings),header:t.Header.resolve(e.header,e.settings,e.labels)}}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:Lt.fromResolvedArray(e.openPopouts),settings:_t.Settings.createCopy(e.settings),dimensions:t.Dimensions.fromResolved(e.dimensions),header:_t.Header.createCopy(e.header)}},t.isResolved=function(t){const e=t;return void 0!==e.resolved&&!0===e.resolved},t.resolveOpenPopouts=function(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0,{root:Et.resolve(o),openPopouts:xt.resolveOpenPopouts(e.openPopouts),dimensions:xt.Dimensions.resolve(e.dimensions),settings:xt.Settings.resolve(e.settings),header:xt.Header.resolve(e.header,e.settings,e.labels),parentId:null!==(i=e.parentId)&&void 0!==i?i:null,indexInParent:null!==(n=e.indexInParent)&&void 0!==n?n:null,window:t.Window.resolve(e.window,e.dimensions),resolved:!0}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:i(e.openPopouts),dimensions:xt.Dimensions.fromResolved(e.dimensions),settings:_t.Settings.createCopy(e.settings),header:_t.Header.createCopy(e.header),parentId:e.parentId,indexInParent:e.indexInParent,window:t.Window.fromResolved(e.window)}},t.fromResolvedArray=i}(Lt||(Lt={}));class Wt{constructor(){this._allEventSubscriptions=[],this._subscriptionsMap=new Map,this.unbind=this.removeEventListener,this.trigger=this.emit}tryBubbleEvent(t,e){}emit(t,...e){let i=this._subscriptionsMap.get(t);if(void 0!==i){i=i.slice();for(let t=0;t0){const n=e.slice();n.unshift(t);const o=this._allEventSubscriptions.slice();for(let t=0;t0?n.contentItems[0]:n,e=0);const o=this._layoutManager.createAndInitContentItem(i,t);t.addChild(o,e),this._layoutManager.layoutConfig.settings.popInOnClose?this._onClose():this.close()}createWindow(){const t=this.createUrl(),e=Math.floor(1e6*Math.random()).toString(36),i=this.serializeWindowFeatures({width:this._initialWindowSize.width,height:this._initialWindowSize.height,innerWidth:this._initialWindowSize.width,innerHeight:this._initialWindowSize.height,menubar:"no",toolbar:"no",location:"no",personalbar:"no",resizable:"yes",scrollbars:"no",status:"no"});if(this._popoutWindow=globalThis.open(t,e,i),this._popoutWindow)this._popoutWindow.addEventListener("load",(()=>this.positionWindow()),{passive:!0}),this._popoutWindow.addEventListener("beforeunload",(()=>{this._layoutManager.layoutConfig.settings.popInOnClose?this.popIn():this._onClose()}),{passive:!0}),this._checkReadyInterval=setInterval((()=>this.checkReady()),10);else if(!0===this._layoutManager.layoutConfig.settings.blockedPopoutsThrowError){throw new j("Popout blocked")}}checkReady(){if(null===this._popoutWindow)throw new K("BPCR01844");this._popoutWindow.__glInstance&&this._popoutWindow.__glInstance.isInitialised&&(this.onInitialised(),void 0!==this._checkReadyInterval&&(clearInterval(this._checkReadyInterval),this._checkReadyInterval=void 0))}serializeWindowFeatures(t){const e=[];for(const i in t)e.push(i+"="+t[i].toString());return e.join(",")}createUrl(){const t="gl-window-config-"+Ot(),e=_t.minifyConfig(this._config);try{localStorage.setItem(t,JSON.stringify(e))}catch(t){throw new Error("Error while writing to localStorage "+function(t){return t instanceof Error?t.message:"string"==typeof t?t:"Unknown Error"}(t))}const i=new URL(location.href);return i.searchParams.set("gl-window",t),i.toString()}positionWindow(){if(null===this._popoutWindow)throw new Error("BrowserPopout.positionWindow: null popoutWindow");this._popoutWindow.moveTo(this._initialWindowSize.left,this._initialWindowSize.top),this._popoutWindow.focus()}onInitialised(){this._isInitialised=!0,this.getGlInstance().on("popIn",(()=>this.popIn())),this.emit("initialised")}_onClose(){setTimeout((()=>this.emit("closed")),50)}}class Gt extends Wt{constructor(t,e,i,n){super(),this.layoutManager=t,this._parent=i,this._element=n,this._popInParentIds=[],this._type=e.type,this._id=e.id,this._isInitialised=!1,this.isGround=!1,this.isRow=!1,this.isColumn=!1,this.isStack=!1,this.isComponent=!1,this.size=e.size,this.sizeUnit=e.sizeUnit,this.minSize=e.minSize,this.minSizeUnit=e.minSizeUnit,this._isClosable=e.isClosable,this._pendingEventPropagations={},this._throttledEvents=["stateChanged"],this._contentItems=this.createContentItems(e.content)}get type(){return this._type}get id(){return this._id}set id(t){this._id=t}get popInParentIds(){return this._popInParentIds}get parent(){return this._parent}get contentItems(){return this._contentItems}get isClosable(){return this._isClosable}get element(){return this._element}get isInitialised(){return this._isInitialised}static isStack(t){return t.isStack}static isComponentItem(t){return t.isComponent}static isComponentParentableItem(t){return t.isStack||t.isGround}removeChild(t,e=!1){const i=this._contentItems.indexOf(t);if(-1===i)throw new Error("Can't remove child item. Unknown content item");if(e||this._contentItems[i].destroy(),this._contentItems.splice(i,1),this._contentItems.length>0)this.updateSize(!1);else if(!this.isGround&&!0===this._isClosable){if(null===this._parent)throw new K("CIUC00874");this._parent.removeChild(this)}}addChild(t,e,i){return null!=e||(e=this._contentItems.length),this._contentItems.splice(e,0,t),t.setParent(this),!0===this._isInitialised&&!1===t._isInitialised&&t.init(),e}replaceChild(t,e,i=!1){const n=this._contentItems.indexOf(t),o=t._element.parentNode;if(-1===n)throw new X("CIRCI23232","Can't replace child. oldChild is not child of this");if(null===o)throw new K("CIRCP23232");if(o.replaceChild(e._element,t._element),!0===i&&(t._parent=null,t.destroy()),this._contentItems[n]=e,e.setParent(this),e.size=t.size,e.sizeUnit=t.sizeUnit,e.minSize=t.minSize,e.minSizeUnit=t.minSizeUnit,null===e._parent)throw new K("CIRCNC45699");!0===e._parent._isInitialised&&!1===e._isInitialised&&e.init(),this.updateSize(!1)}remove(){if(null===this._parent)throw new K("CIR11110");this._parent.removeChild(this)}popout(){const t=Ot(),e=this.layoutManager.createPopoutFromContentItem(this,void 0,t,void 0);return this.emitBaseBubblingEvent("stateChanged"),e}calculateConfigContent(){const t=this._contentItems,e=t.length,i=new Array(e);for(let n=0;nthis.propagateEventToLayoutManager(t,e))))}propagateEventToLayoutManager(t,e){this._pendingEventPropagations[t]=!1,this.layoutManager.emitUnknown(t,e)}}class jt extends Gt{constructor(t,e,i){super(t,e,i,document.createElement("div")),this._parentItem=i,this._focused=!1,this.isComponent=!0,this._reorderEnabled=e.reorderEnabled,this.applyUpdatableConfig(e),this._initialWantMaximise=e.maximised;const n=document.createElement("div");n.classList.add("lm_content"),this.element.appendChild(n),this._container=new Ft(e,this,t,n,(t=>this.handleUpdateItemConfigEvent(t)),(()=>this.show()),(()=>this.hide()),(t=>this.focus(t)),(t=>this.blur(t)))}get componentName(){return this._container.componentType}get componentType(){return this._container.componentType}get reorderEnabled(){return this._reorderEnabled}get initialWantMaximise(){return this._initialWantMaximise}get component(){return this._container.component}get container(){return this._container}get parentItem(){return this._parentItem}get headerConfig(){return this._headerConfig}get title(){return this._title}get tab(){return this._tab}get focused(){return this._focused}destroy(){this._container.destroy(),super.destroy()}applyUpdatableConfig(t){this.setTitle(t.title),this._headerConfig=t.header}toConfig(){const t=this._container.stateRequestEvent,e=void 0===t?this._container.state:t();return{type:at.component,content:[],size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,maximised:!1,isClosable:this.isClosable,reorderEnabled:this._reorderEnabled,title:this._title,header:mt.Header.createCopy(this._headerConfig),componentType:pt.copyComponentType(this.componentType),componentState:e}}close(){if(null===this.parent)throw new K("CIC68883");this.parent.removeChild(this,!1)}enterDragMode(t,e){Tt(this.element,t),At(this.element,e),this._container.enterDragMode(t,e)}exitDragMode(){this._container.exitDragMode()}enterStackMaximised(){this._container.enterStackMaximised()}exitStackMaximised(){this._container.exitStackMaximised()}drag(){this._container.drag()}updateSize(t){this.updateNodeSize(t)}init(){this.updateNodeSize(!1),super.init(),this._container.emit("open"),this.initContentItems()}setTitle(t){this._title=t,this.emit("titleChanged",t),this.emit("stateChanged")}setTab(t){this._tab=t,this.emit("tab",t),this._container.setTab(t)}hide(){super.hide(),this._container.setVisibility(!1)}show(){super.show(),this._container.setVisibility(!0)}focus(t=!1){this.parentItem.setActiveComponentItem(this,!0,t)}setFocused(t){this._focused=!0,this.tab.setFocused(),t||this.emitBaseBubblingEvent("focus")}blur(t=!1){this._focused&&this.layoutManager.setFocusedComponentItem(void 0,t)}setBlurred(t){this._focused=!1,this.tab.setBlurred(),t||this.emitBaseBubblingEvent("blur")}setParent(t){this._parentItem=t,super.setParent(t)}handleUpdateItemConfigEvent(t){this.applyUpdatableConfig(t)}updateNodeSize(t){if("none"!==this.element.style.display){const{width:e,height:i}=kt(this.element);this._container.setSizeToNodeSize(e,i,t)}}}class $t extends Gt{constructor(){super(...arguments),this._focused=!1}get focused(){return this._focused}setFocusedValue(t){this._focused=t}}class Zt extends Wt{constructor(t,e){super(),this._eElement=t,this._pointerTracking=!1,this._pointerDownEventListener=t=>this.onPointerDown(t),this._pointerMoveEventListener=t=>this.onPointerMove(t),this._pointerUpEventListener=t=>this.onPointerUp(t),this._timeout=void 0,this._allowableTargets=[t,...e],this._oDocument=document,this._eBody=document.body,this._nDelay=1800,this._nDistance=10,this._nX=0,this._nY=0,this._nOriginalX=0,this._nOriginalY=0,this._dragging=!1,this._eElement.addEventListener("pointerdown",this._pointerDownEventListener,{passive:!0})}destroy(){this.checkRemovePointerTrackingEventListeners(),this._eElement.removeEventListener("pointerdown",this._pointerDownEventListener)}cancelDrag(){this.processDragStop(void 0)}onPointerDown(t){if(this._allowableTargets.includes(t.target)&&t.isPrimary){const e=this.getPointerCoordinates(t);this.processPointerDown(e)}}processPointerDown(t){this._nOriginalX=t.x,this._nOriginalY=t.y,this._oDocument.addEventListener("pointermove",this._pointerMoveEventListener),this._oDocument.addEventListener("pointerup",this._pointerUpEventListener,{passive:!0}),this._pointerTracking=!0,this._timeout=setTimeout((()=>{try{this.startDrag()}catch(t){throw console.error(t),t}}),this._nDelay)}onPointerMove(t){this._pointerTracking&&(this.processDragMove(t),t.preventDefault())}processDragMove(t){this._nX=t.pageX-this._nOriginalX,this._nY=t.pageY-this._nOriginalY,!1===this._dragging&&(Math.abs(this._nX)>this._nDistance||Math.abs(this._nY)>this._nDistance)&&this.startDrag(),this._dragging&&this.emit("drag",this._nX,this._nY,t)}onPointerUp(t){this.processDragStop(t)}processDragStop(t){var e;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this.checkRemovePointerTrackingEventListeners(),!0===this._dragging&&(this._eBody.classList.remove("lm_dragging"),this._eElement.classList.remove("lm_dragging"),null===(e=this._oDocument.querySelector("iframe"))||void 0===e||e.style.setProperty("pointer-events",""),this._dragging=!1,this.emit("dragStop",t))}checkRemovePointerTrackingEventListeners(){this._pointerTracking&&(this._oDocument.removeEventListener("pointermove",this._pointerMoveEventListener),this._oDocument.removeEventListener("pointerup",this._pointerUpEventListener),this._pointerTracking=!1)}startDrag(){var t;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this._dragging=!0,this._eBody.classList.add("lm_dragging"),this._eElement.classList.add("lm_dragging"),null===(t=this._oDocument.querySelector("iframe"))||void 0===t||t.style.setProperty("pointer-events","none"),this.emit("dragStart",this._nOriginalX,this._nOriginalY)}getPointerCoordinates(t){return{x:t.pageX,y:t.pageY}}}class qt{constructor(t,e,i){this._isVertical=t,this._size=e,this._grabSize=i0){const i=this.createSplitter(Math.max(0,e-1)).element;e>0?(this.contentItems[e-1].element.insertAdjacentElement("afterend",i),i.insertAdjacentElement("afterend",t.element)):(this.contentItems[0].element.insertAdjacentElement("beforebegin",i),i.insertAdjacentElement("beforebegin",t.element))}else this._childElementContainer.appendChild(t.element);super.addChild(t,e);const n=1/this.contentItems.length*100;if(!0===i)return this.emitBaseBubblingEvent("stateChanged"),e;for(let e=0;e0&&(this.calculateRelativeSizes(),this.setAbsoluteSizes()),this.emitBaseBubblingEvent("stateChanged"),this.emit("resize")}setAbsoluteSizes(){const t=this.calculateAbsoluteSizes();for(let e=0;e0&&t.itemSizes[e]++,this._isColumn?(Tt(this.contentItems[e].element,t.crossAxisSize),At(this.contentItems[e].element,t.itemSizes[e])):(Tt(this.contentItems[e].element,t.itemSizes[e]),At(this.contentItems[e].element,t.crossAxisSize))}calculateAbsoluteSizes(){const t=(this.contentItems.length-1)*this._splitterSize,{width:e,height:i}=kt(this.element);let n,o;this._isColumn?(n=i-t,o=e):(n=e-t,o=i);let s=0;const r=[];for(let t=0;t0){const n=100-t;for(let t=0;t100&&e.length>0){for(let t=0;te)return;{const r=i/e;let a=i;for(let e=0;ethis.onSplitterDrag(e,t,i))),e.on("dragStop",(()=>this.onSplitterDragStop(e))),e.on("dragStart",(()=>this.onSplitterDragStart(e))),this._splitter.splice(t,0,e),e}getSplitItems(t){const e=this._splitter.indexOf(t);return{before:this.contentItems[e],after:this.contentItems[e+1]}}calculateContentItemMinSize(t){const e=t.minSize;if(void 0!==e){if(t.minSizeUnit===ht.Pixel)return e;throw new X("ROCGMD98831",JSON.stringify(t))}{const t=this.layoutManager.layoutConfig.dimensions;return this._isColumn?t.defaultMinItemHeight:t.defaultMinItemWidth}}calculateContentItemsTotalMinSize(t){let e=0;for(const i of t)e+=this.calculateContentItemMinSize(i);return e}onSplitterDragStart(t){const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=this.calculateContentItemsTotalMinSize(e.before.contentItems),s=this.calculateContentItemsTotalMinSize(e.after.contentItems);this._splitterPosition=0,this._splitterMinPosition=-1*(i-o),this._splitterMaxPosition=n-s}onSplitterDrag(t,e,i){let n=this._isColumn?i:e;if(null===this._splitterMinPosition||null===this._splitterMaxPosition)throw new K("ROCOSD59226");n=Math.max(n,this._splitterMinPosition),n=Math.min(n,this._splitterMaxPosition),this._splitterPosition=n;const o=zt(n);this._isColumn?t.element.style.top=o:t.element.style.left=o}onSplitterDragStop(t){if(null===this._splitterPosition)throw new K("ROCOSDS66932");{const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=(this._splitterPosition+i)/(i+n),s=e.before.size+e.after.size;e.before.size=o*s,e.after.size=(1-o)*s,t.element.style.top=zt(0),t.element.style.left=zt(0),globalThis.requestAnimationFrame((()=>this.updateSize(!1)))}}}!function(t){t.getElementDimensionSize=function(t,e){return"width"===e?function(t){return t.offsetWidth}(t):function(t){return t.offsetHeight}(t)},t.setElementDimensionSize=function(t,e,i){return"width"===e?Tt(t,i):At(t,i)},t.createElement=function(t,e){const i=t.createElement("div");return i.classList.add("lm_item"),e?i.classList.add("lm_column"):i.classList.add("lm_row"),i}}(Xt||(Xt={}));class Yt extends $t{constructor(t,e,i){super(t,vt.create(e),null,Yt.createElement(document)),this.isGround=!0,this._childElementContainer=this.element,this._containerElement=i;let n=null;for(;;){const t=n?n.previousSibling:this._containerElement.lastChild;if(!(t instanceof Element&&t.classList.contains("lm_content")))break;n=t}this._containerElement.insertBefore(this.element,n)}init(){if(!0!==this.isInitialised){this.updateNodeSize();for(let t=0;t0?this.contentItems[0]:this,n.isComponent)throw new Error("Cannot add item as child to ComponentItem");{const t=this.layoutManager.createAndInitContentItem(i,n);return e=n.addChild(t,e),n===this?-1:e}}loadComponentAsRoot(t){this.clearRoot();const e=Ct.resolve(t,!1);if(e.maximised)throw new Error("Root Component cannot be maximised");{const t=new jt(this.layoutManager,e,this);t.init(),this.addChild(t,0)}}addChild(t,e){if(this.contentItems.length>0)throw new Error("Ground node can only have a single child");return this._childElementContainer.appendChild(t.element),e=super.addChild(t,e),this.updateSize(!1),this.emitBaseBubblingEvent("stateChanged"),e}calculateConfigContent(){const t=this.contentItems,e=t.length,i=new Array(e);for(let n=0;n0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e)),this.updateContentItemsSize(!1))}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}createSideAreas(){const t=Yt.Area.oppositeSides,e=new Array(Object.keys(t).length);let i=0;for(const n in t){const o=n,s=this.getElementArea();if(null===s)throw new K("RCSA77553");s.side=o,"2"===t[o][1]?s[o]=s[t[o]]-50:s[o]=s[t[o]]+50,s.surface=(s.x2-s.x1)*(s.y2-s.y1),e[i++]=s}return e}highlightDropZone(t,e,i){this.layoutManager.tabDropPlaceholder.remove(),super.highlightDropZone(t,e,i)}onDrop(t,e){if(t.isComponent){const e=ut.createDefault(),i=t;e.header=mt.Header.createCopy(i.headerConfig);const n=this.layoutManager.createAndInitContentItem(e,this);n.addChild(t),t=n}if(0===this.contentItems.length)this.addChild(t);else{if(t.type===at.row||t.type===at.column){const e=ut.createDefault(),i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}const i="x"==e.side[0]?at.row:at.column,n="2"==e.side[1],o=this.contentItems[0];if(o instanceof Xt&&o.type===i){const e=o.contentItems[n?0:o.contentItems.length-1];o.addChild(t,n?0:void 0,!0),e.size*=.5,t.size=e.size,t.sizeUnit=ht.Percent,o.updateSize(!1)}else{const e=ct.createDefault(i),s=this.layoutManager.createContentItem(e,this);this.replaceChild(o,s),s.addChild(t,n?0:void 0,!0),s.addChild(o,n?void 0:0,!0),o.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}}dock(){throw new X("GID87731")}validateDocking(){throw new X("GIVD87732")}getAllContentItems(){const t=[this];return this.deepGetAllContentItems(this.contentItems,t),t}getConfigMaximisedItems(){const t=[];return this.deepFilterContentItems(this.contentItems,t,(t=>!(!Gt.isStack(t)||!t.initialWantMaximise)||!(!Gt.isComponentItem(t)||!t.initialWantMaximise))),t}getItemsByPopInParentId(t){const e=[];return this.deepFilterContentItems(this.contentItems,e,(e=>e.popInParentIds.includes(t))),e}toConfig(){throw new Error("Cannot generate GroundItem config")}setActiveComponentItem(t,e,i){}updateNodeSize(){const{width:t,height:e}=kt(this._containerElement);Tt(this.element,t),At(this.element,e),this.contentItems.length>0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e))}deepGetAllContentItems(t,e){for(let i=0;ithis.onClick(t),this._touchStartEventListener=t=>this.onTouchStart(t),this._element=document.createElement("div"),this._element.classList.add(i),this._element.title=e,this._header.on("destroy",(()=>this.destroy())),this._element.addEventListener("click",this._clickEventListener,{passive:!0}),this._element.addEventListener("touchstart",this._touchStartEventListener,{passive:!0}),this._header.controlsContainerElement.appendChild(this._element)}get element(){return this._element}destroy(){var t;this._element.removeEventListener("click",this._clickEventListener),this._element.removeEventListener("touchstart",this._touchStartEventListener),null===(t=this._element.parentNode)||void 0===t||t.removeChild(this._element)}onClick(t){this._pushEvent(t)}onTouchStart(t){this._pushEvent(t)}}class Jt{constructor(t,e,i,n,o){var s;this._layoutManager=t,this._componentItem=e,this._closeEvent=i,this._focusEvent=n,this._dragStartEvent=o,this._isActive=!1,this._tabClickListener=t=>this.onTabClickDown(t),this._tabTouchStartListener=t=>this.onTabTouchStart(t),this._closeClickListener=()=>this.onCloseClick(),this._closeTouchStartListener=()=>this.onCloseTouchStart(),this._dragStartListener=(t,e)=>this.onDragStart(t,e),this._contentItemDestroyListener=()=>this.onContentItemDestroy(),this._tabTitleChangedListener=t=>this.setTitle(t),this._element=document.createElement("div"),this._element.classList.add("lm_tab"),this._titleElement=document.createElement("span"),this._titleElement.classList.add("lm_title"),this._closeElement=document.createElement("div"),this._closeElement.classList.add("lm_close_tab"),this._element.appendChild(this._titleElement),this._element.appendChild(this._closeElement),e.isClosable?this._closeElement.style.display="":this._closeElement.style.display="none",this.setTitle(e.title),this._componentItem.on("titleChanged",this._tabTitleChangedListener);(null!==(s=e.reorderEnabled)&&void 0!==s?s:this._layoutManager.layoutConfig.settings.reorderEnabled)&&this.enableReorder(),this._element.addEventListener("click",this._tabClickListener,{passive:!0}),this._element.addEventListener("touchstart",this._tabTouchStartListener,{passive:!0}),this._componentItem.isClosable?(this._closeElement.addEventListener("click",this._closeClickListener,{passive:!0}),this._closeElement.addEventListener("touchstart",this._closeTouchStartListener,{passive:!0})):(this._closeElement.remove(),this._closeElement=void 0),this._componentItem.setTab(this),this._layoutManager.emit("tabCreated",this)}get isActive(){return this._isActive}get componentItem(){return this._componentItem}get contentItem(){return this._componentItem}get element(){return this._element}get titleElement(){return this._titleElement}get closeElement(){return this._closeElement}get reorderEnabled(){return void 0!==this._dragListener}set reorderEnabled(t){t!==this.reorderEnabled&&(t?this.enableReorder():this.disableReorder())}setTitle(t){this._titleElement.innerText=t,this._element.title=t}setActive(t){t!==this._isActive&&(this._isActive=t,t?this._element.classList.add("lm_active"):this._element.classList.remove("lm_active"))}destroy(){var t,e;this._closeEvent=void 0,this._focusEvent=void 0,this._dragStartEvent=void 0,this._element.removeEventListener("click",this._tabClickListener),this._element.removeEventListener("touchstart",this._tabTouchStartListener),null===(t=this._closeElement)||void 0===t||t.removeEventListener("click",this._closeClickListener),null===(e=this._closeElement)||void 0===e||e.removeEventListener("touchstart",this._closeTouchStartListener),this._componentItem.off("titleChanged",this._tabTitleChangedListener),this.reorderEnabled&&this.disableReorder(),this._element.remove()}setBlurred(){this._element.classList.remove("lm_focused"),this._titleElement.classList.remove("lm_focused")}setFocused(){this._element.classList.add("lm_focused"),this._titleElement.classList.add("lm_focused")}onDragStart(t,e){if(void 0===this._dragListener)throw new J("TODSDLU10093");if(void 0===this._dragStartEvent)throw new J("TODS23309");this._dragStartEvent(t,e,this._dragListener,this.componentItem)}onContentItemDestroy(){void 0!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=void 0)}onTabClickDown(t){const e=t.target;e!==this._element&&e!==this._titleElement||(0===t.button?this.notifyFocus():1===t.button&&this._componentItem.isClosable&&this.notifyClose())}onTabTouchStart(t){t.target===this._element&&this.notifyFocus()}onCloseClick(){this.notifyClose()}onCloseTouchStart(){this.notifyClose()}notifyClose(){if(void 0===this._closeEvent)throw new J("TNC15007");this._closeEvent(this._componentItem)}notifyFocus(){if(void 0===this._focusEvent)throw new J("TNA15007");this._focusEvent(this._componentItem)}enableReorder(){this._dragListener=new Zt(this._element,[this._titleElement]),this._dragListener.on("dragStart",this._dragStartListener),this._componentItem.on("destroy",this._contentItemDestroyListener)}disableReorder(){if(void 0===this._dragListener)throw new J("TDR87745");this._componentItem.off("destroy",this._contentItemDestroyListener),this._dragListener.off("dragStart",this._dragStartListener),this._dragListener=void 0}}class Qt{constructor(t,e,i,n,o){this._layoutManager=t,this._componentRemoveEvent=e,this._componentFocusEvent=i,this._componentDragStartEvent=n,this._dropdownActiveChangedEvent=o,this._tabs=[],this._lastVisibleTabIndex=-1,this._dropdownActive=!1,this._element=document.createElement("section"),this._element.classList.add("lm_tabs"),this._dropdownElement=document.createElement("section"),this._dropdownElement.classList.add("lm_tabdropdown_list"),this._dropdownElement.style.display="none"}get tabs(){return this._tabs}get tabCount(){return this._tabs.length}get lastVisibleTabIndex(){return this._lastVisibleTabIndex}get element(){return this._element}get dropdownElement(){return this._dropdownElement}get dropdownActive(){return this._dropdownActive}destroy(){for(let t=0;tthis.handleTabCloseEvent(t)),(t=>this.handleTabFocusEvent(t)),((t,e,i,n)=>this.handleTabDragStartEvent(t,e,i,n)));void 0===e&&(e=this._tabs.length),this._tabs.splice(e,0,i),ethis._lastVisibleTabIndex){const t=this._tabs[e];for(let t=e;t>0;t--)this._tabs[t]=this._tabs[t-1];this._tabs[0]=t}}updateTabSizes(t,e){let i=!1;this.tryUpdateTabSizes(i,t,e)||(i=!0,this.tryUpdateTabSizes(i,t,e)),i!==this._dropdownActive&&(this._dropdownActive=i,this._dropdownActiveChangedEvent())}tryUpdateTabSizes(t,e,i){if(this._tabs.length>0){if(void 0===i)throw new Error("non-empty tabs must have active component item");let n=0,o=!1;const s=this._layoutManager.layoutConfig.settings.tabOverlapAllowance,r=this._tabs.indexOf(i.tab),a=this._tabs[r];this._lastVisibleTabIndex=-1;for(let i=0;ie){if(o)i===r&&(l.style.zIndex="auto",l.style.marginLeft="",l.parentElement!==this._element&&this._element.appendChild(l));else{let t;if(t=r>0&&r<=i?(d-e)/(i-1):(d-e)/i,tthis.onClick(t),this._touchStartListener=t=>this.onTouchStart(t),this._rowColumnClosable=!0,this._closeButton=null,this._popoutButton=null,this._tabsContainer=new Qt(this._layoutManager,(t=>this.handleTabInitiatedComponentRemoveEvent(t)),(t=>this.handleTabInitiatedComponentFocusEvent(t)),((t,e,i,n)=>this.handleTabInitiatedDragStartEvent(t,e,i,n)),(()=>this.processTabDropdownActiveChanged())),this._show=i.show,this._popoutEnabled=i.popoutEnabled,this._popoutLabel=i.popoutLabel,this._maximiseEnabled=i.maximiseEnabled,this._maximiseLabel=i.maximiseLabel,this._minimiseEnabled=i.minimiseEnabled,this._minimiseLabel=i.minimiseLabel,this._closeEnabled=i.closeEnabled,this._closeLabel=i.closeLabel,this._tabDropdownEnabled=i.tabDropdownEnabled,this._tabDropdownLabel=i.tabDropdownLabel,this.setSide(i.side),this._canRemoveComponent=this._configClosable,this._element=document.createElement("section"),this._element.classList.add("lm_header"),this._controlsContainerElement=document.createElement("section"),this._controlsContainerElement.classList.add("lm_controls"),this._element.appendChild(this._tabsContainer.element),this._element.appendChild(this._controlsContainerElement),this._element.appendChild(this._tabsContainer.dropdownElement),this._element.addEventListener("click",this._clickListener,{passive:!0}),this._element.addEventListener("touchstart",this._touchStartListener,{passive:!0}),this._documentMouseUpListener=()=>this._tabsContainer.hideAdditionalTabsDropdown(),globalThis.document.addEventListener("mouseup",this._documentMouseUpListener,{passive:!0}),this._tabControlOffset=this._layoutManager.layoutConfig.settings.tabControlOffset,this._tabDropdownEnabled&&(this._tabDropdownButton=new Kt(this,this._tabDropdownLabel,"lm_tabdropdown",(()=>this._tabsContainer.showAdditionalTabsDropdown()))),this._popoutEnabled&&(this._popoutButton=new Kt(this,this._popoutLabel,"lm_popout",(()=>this.handleButtonPopoutEvent()))),this._maximiseEnabled&&(this._maximiseButton=new Kt(this,this._maximiseLabel,"lm_maximise",(t=>this.handleButtonMaximiseToggleEvent(t)))),this._configClosable&&(this._closeButton=new Kt(this,this._closeLabel,"lm_close",(()=>s()))),this.processTabDropdownActiveChanged()}get show(){return this._show}get side(){return this._side}get leftRightSided(){return this._leftRightSided}get layoutManager(){return this._layoutManager}get parent(){return this._parent}get tabs(){return this._tabsContainer.tabs}get lastVisibleTabIndex(){return this._tabsContainer.lastVisibleTabIndex}get element(){return this._element}get tabsContainerElement(){return this._tabsContainer.element}get controlsContainerElement(){return this._controlsContainerElement}destroy(){this.emit("destroy"),this._popoutEvent=void 0,this._maximiseToggleEvent=void 0,this._clickEvent=void 0,this._touchStartEvent=void 0,this._componentRemoveEvent=void 0,this._componentFocusEvent=void 0,this._componentDragStartEvent=void 0,this._tabsContainer.destroy(),globalThis.document.removeEventListener("mouseup",this._documentMouseUpListener),this._element.remove()}createTab(t,e){this._tabsContainer.createTab(t,e)}removeTab(t){this._tabsContainer.removeTab(t)}processActiveComponentChanged(t){this._tabsContainer.processActiveComponentChanged(t),this.updateTabSizes()}setSide(t){this._side=t,this._leftRightSided=[nt.right,nt.left].includes(this._side)}setRowColumnClosable(t){this._rowColumnClosable=t,this.updateClosability()}updateClosability(){let t;if(this._configClosable)if(this._rowColumnClosable){t=!0;const e=this.tabs.length;for(let i=0;i1}applyFocusedValue(t){t?this._element.classList.add("lm_focused"):this._element.classList.remove("lm_focused")}processMaximised(){if(void 0===this._maximiseButton)throw new J("HPMAX16997");this._maximiseButton.element.setAttribute("title",this._minimiseLabel)}processMinimised(){if(void 0===this._maximiseButton)throw new J("HPMIN16997");this._maximiseButton.element.setAttribute("title",this._maximiseLabel)}updateTabSizes(){if(this._tabsContainer.tabCount>0){const t=this._show?this._layoutManager.layoutConfig.dimensions.headerHeight:0;let e;this._leftRightSided?(this._element.style.height="",this._element.style.width=zt(t)):(this._element.style.width="",this._element.style.height=zt(t)),e=this._leftRightSided?this._element.offsetHeight-this._controlsContainerElement.offsetHeight-this._tabControlOffset:this._element.offsetWidth-this._controlsContainerElement.offsetWidth-this._tabControlOffset,this._tabsContainer.updateTabSizes(e,this._getActiveComponentItemEvent())}}handleTabInitiatedComponentRemoveEvent(t){if(this._canRemoveComponent){if(void 0===this._componentRemoveEvent)throw new J("HHTCE22294");this._componentRemoveEvent(t)}}handleTabInitiatedComponentFocusEvent(t){if(void 0===this._componentFocusEvent)throw new J("HHTAE22294");this._componentFocusEvent(t)}handleTabInitiatedDragStartEvent(t,e,i,n){if(this._canRemoveComponent){if(void 0===this._componentDragStartEvent)throw new J("HHTDSE22294");this._componentDragStartEvent(t,e,i,n)}else i.cancelDrag()}processTabDropdownActiveChanged(){void 0!==this._tabDropdownButton&&Dt(this._tabDropdownButton.element,this._tabsContainer.dropdownActive)}handleButtonPopoutEvent(){if(this._layoutManager.layoutConfig.settings.popoutWholeStack){if(void 0===this._popoutEvent)throw new J("HHBPOE17834");this._popoutEvent()}else{const t=this._getActiveComponentItemEvent();t&&t.popout()}}handleButtonMaximiseToggleEvent(t){if(void 0===this._maximiseToggleEvent)throw new J("HHBMTE16834");this._maximiseToggleEvent()}onClick(t){t.target===this._element&&this.notifyClick(t)}onTouchStart(t){t.target===this._element&&this.notifyTouchStart(t)}notifyClick(t){if(void 0===this._clickEvent)throw new J("HNHC46834");this._clickEvent(t)}notifyTouchStart(t){if(void 0===this._touchStartEvent)throw new J("HNHTS46834");this._touchStartEvent(t)}}class ee extends $t{constructor(t,e,i){var n,o,s,r,a,l,h,d,c,m,u,p,g,f,v,_,y,C,w;super(t,e,i,ee.createElement(document)),this._headerSideChanged=!1,this._resizeListener=()=>this.handleResize(),this._maximisedListener=()=>this.handleMaximised(),this._minimisedListener=()=>this.handleMinimised(),this._headerConfig=e.header;const I=t.layoutConfig.header,b=e.content;let S;if(1!==b.length)S=void 0;else{S=b[0].header}this._initialWantMaximise=e.maximised,this._initialActiveItemIndex=null!==(n=e.activeItemIndex)&&void 0!==n?n:0;const E=null!==(r=null!==(s=null===(o=this._headerConfig)||void 0===o?void 0:o.show)&&void 0!==s?s:null==S?void 0:S.show)&&void 0!==r?r:I.show,x=null!==(h=null!==(l=null===(a=this._headerConfig)||void 0===a?void 0:a.popout)&&void 0!==l?l:null==S?void 0:S.popout)&&void 0!==h?h:I.popout,L=null!==(m=null!==(c=null===(d=this._headerConfig)||void 0===d?void 0:d.maximise)&&void 0!==c?c:null==S?void 0:S.maximise)&&void 0!==m?m:I.maximise,z=null!==(g=null!==(p=null===(u=this._headerConfig)||void 0===u?void 0:u.close)&&void 0!==p?p:null==S?void 0:S.close)&&void 0!==g?g:I.close,M=null!==(_=null!==(v=null===(f=this._headerConfig)||void 0===f?void 0:f.minimise)&&void 0!==v?v:null==S?void 0:S.minimise)&&void 0!==_?_:I.minimise,P=null!==(w=null!==(C=null===(y=this._headerConfig)||void 0===y?void 0:y.tabDropdown)&&void 0!==C?C:null==S?void 0:S.tabDropdown)&&void 0!==w?w:I.tabDropdown;this._maximisedEnabled=!1!==L;const T={show:!1!==E,side:!1===E?nt.top:E,popoutEnabled:!1!==x,popoutLabel:!1===x?"":x,maximiseEnabled:this._maximisedEnabled,maximiseLabel:!1===L?"":L,closeEnabled:!1!==z,closeLabel:!1===z?"":z,minimiseEnabled:!0,minimiseLabel:M,tabDropdownEnabled:!1!==P,tabDropdownLabel:!1===P?"":P};this._header=new te(t,this,T,e.isClosable&&!1!==z,(()=>this.getActiveComponentItem()),(()=>this.remove()),(()=>this.handlePopoutEvent()),(()=>this.toggleMaximise()),(t=>this.handleHeaderClickEvent(t)),(t=>this.handleHeaderTouchStartEvent(t)),(t=>this.handleHeaderComponentRemoveEvent(t)),(t=>this.handleHeaderComponentFocusEvent(t)),((t,e,i,n)=>this.handleHeaderComponentStartDragEvent(t,e,i,n))),this.isStack=!0,this._childElementContainer=document.createElement("section"),this._childElementContainer.classList.add("lm_items"),this.on("resize",this._resizeListener),this._maximisedEnabled&&(this.on("maximised",this._maximisedListener),this.on("minimised",this._minimisedListener)),this.element.appendChild(this._header.element),this.element.appendChild(this._childElementContainer),this.setupHeaderPosition(),this._header.updateClosability()}get childElementContainer(){return this._childElementContainer}get header(){return this._header}get headerShow(){return this._header.show}get headerSide(){return this._header.side}get headerLeftRightSided(){return this._header.leftRightSided}get contentAreaDimensions(){return this._contentAreaDimensions}get initialWantMaximise(){return this._initialWantMaximise}get isMaximised(){return this===this.layoutManager.maximisedStack}get stackParent(){if(!this.parent)throw new Error("Stack should always have a parent");return this.parent}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}init(){if(!0===this.isInitialised)return;this.updateNodeSize();for(let t=0;t0){if(this._initialActiveItemIndex<0||this._initialActiveItemIndex>=e)throw new Error(`ActiveItemIndex out of range: ${this._initialActiveItemIndex} id: ${this.id}`);for(let i=0;ithis.contentItems.length)throw e-=1,new X("SAC99728");if(t instanceof jt)return e=super.addChild(t,e),this._childElementContainer.appendChild(t.element),this._header.createTab(t,e),this.setActiveComponentItem(t,i),this._header.updateTabSizes(),this.updateSize(!1),t.container.setBaseLogicalZIndex(),this._header.updateClosability(),this.emitStateChangedEvent(),e;throw new X("SACC88532")}removeChild(t,e){const i=t,n=this.contentItems.indexOf(i),o=1===this.contentItems.length;if(this._activeComponentItem===i&&(i.focused&&i.blur(),!o)){const t=0===n?1:n-1;this.setActiveComponentItem(this.contentItems[t],!1)}this._header.removeTab(i),super.removeChild(i,e),o||this._header.updateClosability(),this.emitStateChangedEvent()}toggleMaximise(){this.isMaximised?this.minimise():this.maximise()}maximise(){if(!this.isMaximised){this.layoutManager.setMaximisedStack(this);const t=this.contentItems,e=t.length;for(let i=0;i0&&void 0===t)throw new Error("expected non-empty stack to have an active component item");return{type:"stack",content:this.calculateConfigContent(),size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,isClosable:this.isClosable,maximised:this.isMaximised,header:this.createHeaderConfig(),activeItemIndex:t}}onDrop(t,e){if("header"===this._dropSegment){if(this.resetHeaderDropZone(),void 0===this._dropIndex)throw new J("SODDI68990");return void this.addChild(t,this._dropIndex)}if("body"===this._dropSegment)return void this.addChild(t,0,!0);const i="top"===this._dropSegment||"bottom"===this._dropSegment,n="left"===this._dropSegment||"right"===this._dropSegment,o="top"===this._dropSegment||"left"===this._dropSegment,s=i&&this.stackParent.isColumn||n&&this.stackParent.isRow;if(t.isComponent){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createAndInitContentItem(e,this);i.addChild(t),t=i}if(t.type===at.row||t.type===at.column){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}if(s){const e=this.stackParent.contentItems.indexOf(this);this.stackParent.addChild(t,o?e:e+1,!0),this.size*=.5,t.size=this.size,t.sizeUnit=this.sizeUnit,this.stackParent.updateSize(!1)}else{const e=i?at.column:at.row,n=ct.createDefault(e),s=this.layoutManager.createContentItem(n,this);this.stackParent.replaceChild(this,s),s.addChild(t,o?0:void 0,!0),s.addChild(this,o?void 0:0,!0),this.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}highlightDropZone(t,e){for(const i in this._contentAreaDimensions){const n=i,o=this._contentAreaDimensions[n].hoverArea;if(o.x1t&&o.y1e)return void("header"===n?(this._dropSegment="header",this.highlightHeaderDropZone(this._header.leftRightSided?e:t)):(this.resetHeaderDropZone(),this.highlightBodyDropZone(n)))}}getArea(){if("none"===this.element.style.display)return null;const t=super.getElementArea(this._header.element),e=super.getElementArea(this._childElementContainer);if(null===t||null===e)throw new K("SGAHC13086");const i=e.x2-e.x1,n=e.y2-e.y1;return this._contentAreaDimensions={header:{hoverArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2},highlightArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2}}},0===this.contentItems.length?(this._contentAreaDimensions.body={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2}},super.getElementArea(this.element)):(this._contentAreaDimensions.left={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x1+.25*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x1+.5*i,y2:e.y2}},this._contentAreaDimensions.top={hoverArea:{x1:e.x1+.25*i,y1:e.y1,x2:e.x1+.75*i,y2:e.y1+.5*n},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y1+.5*n}},this._contentAreaDimensions.right={hoverArea:{x1:e.x1+.75*i,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1+.5*i,y1:e.y1,x2:e.x2,y2:e.y2}},this._contentAreaDimensions.bottom={hoverArea:{x1:e.x1+.25*i,y1:e.y1+.5*n,x2:e.x1+.75*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1+.5*n,x2:e.x2,y2:e.y2}},super.getElementArea(this.element))}positionHeader(t){this._header.side!==t&&(this._header.setSide(t),this._headerSideChanged=!0,this.setupHeaderPosition())}updateNodeSize(){if("none"!==this.element.style.display){const t=kt(this.element);if(this._header.show){t[this._header.leftRightSided?it.width:it.height]-=this.layoutManager.layoutConfig.dimensions.headerHeight}this._childElementContainer.style.width=zt(t.width),this._childElementContainer.style.height=zt(t.height);for(let e=0;e=o&&tthis.onDrag(t,e,i))),this._dragListener.on("dragStop",(()=>this.onDrop())),this.createDragProxyElements(t,e),null===this._componentItem.parent)throw new K("DPC10097");this._componentItemFocused=this._componentItem.focused,this._componentItemFocused&&this._componentItem.blur(),this._componentItem.parent.removeChild(this._componentItem,!0),this.setDimensions(),document.body.appendChild(this._element),this.determineMinMaxXY(),this._layoutManager.calculateItemAreas(),this.setDropPosition(t,e)}get element(){return this._element}createDragProxyElements(t,e){this._element=document.createElement("div"),this._element.classList.add("lm_dragProxy");const i=document.createElement("div");i.classList.add("lm_header");const n=document.createElement("div");n.classList.add("lm_tabs");const o=document.createElement("div");o.classList.add("lm_tab");const s=document.createElement("span");s.classList.add("lm_title"),o.appendChild(s),n.appendChild(o),i.appendChild(n),this._proxyContainerElement=document.createElement("div"),this._proxyContainerElement.classList.add("lm_content"),this._element.appendChild(i),this._element.appendChild(this._proxyContainerElement),this._originalParent instanceof ee&&this._originalParent.headerShow&&(this._sided=this._originalParent.headerLeftRightSided,this._element.classList.add("lm_"+this._originalParent.headerSide),[nt.right,nt.bottom].indexOf(this._originalParent.headerSide)>=0&&this._proxyContainerElement.insertAdjacentElement("afterend",i)),this._element.style.left=zt(t),this._element.style.top=zt(e),o.setAttribute("title",this._componentItem.title),s.insertAdjacentText("afterbegin",this._componentItem.title),this._proxyContainerElement.appendChild(this._componentItem.element)}determineMinMaxXY(){const t=this._layoutManager.groundItem;if(void 0===t)throw new J("DPDMMXY73109");{const e=t.element.getBoundingClientRect();this._minX=e.left+document.body.scrollLeft,this._minY=e.top+document.body.scrollTop,this._maxX=this._minX+e.width,this._maxY=this._minY+e.height}}onDrag(t,e,i){const n=i.pageX,o=i.pageY;this.setDropPosition(n,o),this._componentItem.drag()}setDropPosition(t,e){this._layoutManager.layoutConfig.settings.constrainDragToContainer&&(t<=this._minX?t=Math.ceil(this._minX):t>=this._maxX&&(t=Math.floor(this._maxX)),e<=this._minY?e=Math.ceil(this._minY):e>=this._maxY&&(e=Math.floor(this._maxY))),this._element.style.left=zt(t),this._element.style.top=zt(e),this._area=this._layoutManager.getArea(t,e),null!==this._area&&(this._lastValidArea=this._area,this._area.contentItem.highlightDropZone(t,e,this._area))}onDrop(){const t=this._layoutManager.dropTargetIndicator;if(null===t)throw new K("DPOD30011");let e;if(t.hide(),this._componentItem.exitDragMode(),null!==this._area)e=this._componentItem,this._area.contentItem.onDrop(e,this._area);else if(null!==this._lastValidArea){e=this._componentItem;this._lastValidArea.contentItem.onDrop(e,this._lastValidArea)}else this._originalParent?(e=this._componentItem,this._originalParent.addChild(e)):this._componentItem.destroy();this._element.remove(),this._layoutManager.emit("itemDropped",this._componentItem),this._componentItemFocused&&void 0!==e&&e.focus()}setDimensions(){const t=this._layoutManager.layoutConfig.dimensions;if(void 0===t)throw new Error("DragProxy.setDimensions: dimensions undefined");let e=t.dragProxyWidth,i=t.dragProxyHeight;if(void 0===e||void 0===i)throw new Error("DragProxy.setDimensions: width and/or height undefined");const n=!1===this._layoutManager.layoutConfig.header.show?0:t.headerHeight;this._element.style.width=zt(e),this._element.style.height=zt(i),e-=this._sided?n:0,i-=this._sided?0:n,this._proxyContainerElement.style.width=zt(e),this._proxyContainerElement.style.height=zt(i),this._componentItem.enterDragMode(e,i),this._componentItem.show()}}class ne{constructor(t,e,i,n,o,s,r){this._layoutManager=t,this._element=e,this._extraAllowableChildTargets=i,this._componentTypeOrFtn=n,this._componentState=o,this._title=s,this._id=r,this._dragListener=null,this._dummyGroundContainer=document.createElement("div");const a=gt.createDefault("row");this._dummyGroundContentItem=new Yt(this._layoutManager,a,this._dummyGroundContainer),this.createDragListener()}destroy(){this.removeDragListener()}createDragListener(){this.removeDragListener(),this._dragListener=new Zt(this._element,this._extraAllowableChildTargets),this._dragListener.on("dragStart",((t,e)=>this.onDragStart(t,e))),this._dragListener.on("dragStop",(()=>this.onDragStop()))}onDragStart(t,e){var i;const n="component";let o;if("function"==typeof this._componentTypeOrFtn){const t=this._componentTypeOrFtn();o=ne.isDragSourceComponentItemConfig(t)?{type:n,componentState:t.state,componentType:t.type,title:null!==(i=t.title)&&void 0!==i?i:this._title}:t}else o={type:n,componentState:this._componentState,componentType:this._componentTypeOrFtn,title:this._title,id:this._id};const s=bt.resolve(o,!1),r=new jt(this._layoutManager,s,this._dummyGroundContentItem);if(this._dummyGroundContentItem.contentItems.push(r),null===this._dragListener)throw new K("DSODSD66746");{const i=new ie(t,e,this._dragListener,this._layoutManager,r,this._dummyGroundContentItem),n=this._layoutManager.transitionIndicator;if(null===n)throw new K("DSODST66746");n.transitionElements(this._element,i.element)}}onDragStop(){this.createDragListener()}removeDragListener(){null!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=null)}}!function(t){t.isDragSourceComponentItemConfig=function(t){return!("componentType"in t)}}(ne||(ne={}));class oe{constructor(){this._element=document.createElement("div"),this._element.classList.add("lm_dropTargetIndicator");const t=document.createElement("div");t.classList.add("lm_inner"),this._element.appendChild(t),document.body.appendChild(this._element)}destroy(){this._element.remove()}highlightArea(t,e){this._element.style.left=zt(t.x1+e),this._element.style.top=zt(t.y1+e),this._element.style.width=zt(t.x2-t.x1-e),this._element.style.height=zt(t.y2-t.y1-e),this._element.style.display="block"}hide(){Dt(this._element,!1)}}class se{constructor(){this._element=document.createElement("div"),this._element.classList.add("lm_transition_indicator"),document.body.appendChild(this._element),this._toElement=null,this._fromDimensions=null,this._totalAnimationDuration=200,this._animationStartTime=null}destroy(){this._element.remove()}transitionElements(t,e){}nextAnimationFrame(){}measure(t){const e=t.getBoundingClientRect();return{left:e.left,top:e.top,width:t.offsetWidth,height:t.offsetHeight}}}class re extends Wt{constructor(t){super(),this._layoutManager=t,this._childEventListener=t=>this.onEventFromChild(t),globalThis.addEventListener(re.ChildEventName,this._childEventListener,{passive:!0})}emit(t,...e){"userBroadcast"===t?this.emitUserBroadcast(...e):super.emit(t,...e)}emitUserBroadcast(...t){this.handleUserBroadcastEvent("userBroadcast",t)}destroy(){globalThis.removeEventListener(re.ChildEventName,this._childEventListener)}handleUserBroadcastEvent(t,e){this._layoutManager.isSubWindow?this.propagateToParent(t,e):this.propagateToThisAndSubtree(t,e)}onEventFromChild(t){const e=t.detail;this.handleUserBroadcastEvent(e.eventName,e.args)}propagateToParent(t,e){const i={bubbles:!0,cancelable:!0,detail:{layoutManager:this._layoutManager,eventName:t,args:e}},n=new CustomEvent(re.ChildEventName,i),o=globalThis.opener;if(null===o)throw new K("EHPTP15778");o.dispatchEvent(n)}propagateToThisAndSubtree(t,e){this.emitUnknown(t,...e);for(let i=0;ithis.handleContainerResize())),this._windowBeforeUnloadListener=()=>this.onBeforeUnload(),this._windowBeforeUnloadListening=!1,this._maximisedStackBeforeDestroyedListener=t=>this.cleanupBeforeMaximisedStackDestroyed(t),this.isSubWindow=t.isSubWindow,this._constructorOrSubWindowLayoutConfig=t.constructorOrSubWindowLayoutConfig,Q.checkInitialise(),dt.checkInitialise(),void 0!==t.containerElement&&(this._containerElement=t.containerElement)}get container(){return this._containerElement}get isInitialised(){return this._isInitialised}get groundItem(){return this._groundItem}get root(){return this._groundItem}get openPopouts(){return this._openPopouts}get dropTargetIndicator(){return this._dropTargetIndicator}get transitionIndicator(){return this._transitionIndicator}get width(){return this._width}get height(){return this._height}get eventHub(){return this._eventHub}get rootItem(){if(void 0===this._groundItem)throw new Error("Cannot access rootItem before init");return 0===this._groundItem.contentItems.length?void 0:this._groundItem.contentItems[0]}get focusedComponentItem(){return this._focusedComponentItem}get tabDropPlaceholder(){return this._tabDropPlaceholder}get maximisedStack(){return this._maximisedStack}get deprecatedConstructor(){return!this.isSubWindow&&void 0!==this._constructorOrSubWindowLayoutConfig}destroy(){if(this._isInitialised){this._windowBeforeUnloadListening&&(globalThis.removeEventListener("beforeunload",this._windowBeforeUnloadListener),this._windowBeforeUnloadListening=!1),!0===this.layoutConfig.settings.closePopoutsOnUnload&&this.closeAllOpenPopouts(),this._resizeObserver.disconnect(),this.checkClearResizeTimeout(),void 0!==this._groundItem&&this._groundItem.destroy(),this._tabDropPlaceholder.remove(),null!==this._dropTargetIndicator&&this._dropTargetIndicator.destroy(),null!==this._transitionIndicator&&this._transitionIndicator.destroy(),this._eventHub.destroy();for(const t of this._dragSources)t.destroy();this._dragSources=[],this._isInitialised=!1}}minifyConfig(t){return _t.minifyConfig(t)}unminifyConfig(t){return _t.unminifyConfig(t)}init(){let t;if(this.setContainer(),this._dropTargetIndicator=new oe,this._transitionIndicator=new se,this.updateSizeFromContainer(),this.isSubWindow){if(void 0===this._constructorOrSubWindowLayoutConfig)throw new J("LMIU07155");{const e=this._constructorOrSubWindowLayoutConfig.root;if(void 0===e)throw new X("LMIC07156");if(!Ct.isComponent(e))throw new X("LMIC07157");t=e;const i=xt.resolve(this._constructorOrSubWindowLayoutConfig);this.layoutConfig=Object.assign(Object.assign({},i),{root:void 0})}}else void 0===this._constructorOrSubWindowLayoutConfig?this.layoutConfig=_t.createDefault():this.layoutConfig=xt.resolve(this._constructorOrSubWindowLayoutConfig);const e=this.layoutConfig;this._groundItem=new Yt(this,e.root,this._containerElement),this._groundItem.init(),this.checkLoadedLayoutMaximiseItem(),this._resizeObserver.observe(this._containerElement),this._isInitialised=!0,this.adjustColumnsResponsive(),this.emit("initialised"),void 0!==t&&this.loadComponentAsRoot(t)}loadLayout(t){if(!this.isInitialised)throw new Error("GoldenLayout: Need to call init() if LayoutConfig with defined root passed to constructor");if(void 0===this._groundItem)throw new J("LMLL11119");this.createSubWindows(),this.layoutConfig=xt.resolve(t),this._groundItem.loadRoot(this.layoutConfig.root),this.checkLoadedLayoutMaximiseItem(),this.adjustColumnsResponsive()}saveLayout(){if(!1===this._isInitialised)throw new Error("Can't create config, layout not yet initialised");if(void 0===this._groundItem)throw new J("LMTC18244");{const t=this._groundItem.calculateConfigContent();let e;e=1!==t.length?void 0:t[0],this.reconcilePopoutWindows();const i=[];for(let t=0;t=0?n=this._groundItem.contentItems[0]:e=0;break;case at.row:case at.column:e=n.addItem(t,i.index);break;case at.stack:if(Ct.isComponent(t)){e=n.addItem(t,i.index);break}throw Error(tt[6]);case at.component:throw new X("LMAIALC87444602");default:throw new Y("LMAIALU98881733",n.type)}if(Ct.isComponent(t)){const t=n.contentItems[e];Gt.isStack(t)&&(n=t,e=0)}return i.parentItem=n,i.index=e,i}}}loadComponentAsRoot(t){if(void 0===this._groundItem)throw new Error("Cannot add item before init");this._groundItem.loadComponentAsRoot(t)}updateSize(t,e){this.setSize(t,e)}setSize(t,e){if(this._width=t,this._height=e,!0===this._isInitialised){if(void 0===this._groundItem)throw new J("LMUS18881");if(this._groundItem.setSize(this._width,this._height),this._maximisedStack){const{width:t,height:e}=kt(this._containerElement);Tt(this._maximisedStack.element,t),At(this._maximisedStack.element,e),this._maximisedStack.updateSize(!1)}this.adjustColumnsResponsive()}}beginSizeInvalidation(){this._sizeInvalidationBeginCount++}endSizeInvalidation(){0==--this._sizeInvalidationBeginCount&&this.updateSizeFromContainer()}updateSizeFromContainer(){const{width:t,height:e}=kt(this._containerElement);this.setSize(t,e)}updateRootSize(t=!1){if(void 0===this._groundItem)throw new J("LMURS28881");this._groundItem.updateSize(t)}createAndInitContentItem(t,e){const i=this.createContentItem(t,e);return i.init(),i}createContentItem(t,e){if("string"!=typeof t.type)throw new G("Missing parameter 'type'",JSON.stringify(t));if(ct.isComponentItem(t)&&!(e instanceof ee)&&e&&!(!0===this.isSubWindow&&e instanceof Yt)){t={type:at.stack,content:[t],size:t.size,sizeUnit:t.sizeUnit,minSize:t.minSize,minSizeUnit:t.minSizeUnit,id:t.id,maximised:t.maximised,isClosable:t.isClosable,activeItemIndex:0,header:void 0}}return this.createContentItemFromConfig(t,e)}findFirstComponentItemById(t){if(void 0===this._groundItem)throw new J("LMFFCIBI82446");return this.findFirstContentItemTypeByIdRecursive(at.component,t,this._groundItem)}createPopout(t,e,i,n){return t instanceof Gt?this.createPopoutFromContentItem(t,e,i,n):this.createPopoutFromItemConfig(t,e,i,n)}createPopoutFromContentItem(t,e,i,n){let o=t.parent,s=t;for(;null!==o&&1===o.contentItems.length&&!o.isGround;)s=o,o=o.parent;if(null===o)throw new K("LMCPFCI00834");{if(void 0===n&&(n=o.contentItems.indexOf(s)),null!==i&&o.addPopInParentId(i),void 0===e){const i=globalThis.screenX||globalThis.screenLeft,n=globalThis.screenY||globalThis.screenTop,o=t.element.offsetLeft,s=t.element.offsetTop,{width:r,height:a}=kt(t.element);e={left:i+o,top:n+s,width:r,height:a}}const r=t.toConfig();if(t.remove(),ft.isRootItemConfig(r))return this.createPopoutFromItemConfig(r,e,i,n);throw new Error(`${tt[0]}`)}}beginVirtualSizedContainerAdding(){0==++this._virtualSizedContainerAddingBeginCount&&(this._virtualSizedContainers.length=0)}addVirtualSizedContainer(t){this._virtualSizedContainers.push(t)}endVirtualSizedContainerAdding(){if(0==--this._virtualSizedContainerAddingBeginCount){const t=this._virtualSizedContainers.length;if(t>0){this.fireBeforeVirtualRectingEvent(t);for(let e=0;ethis.emit("windowOpened",a))),a.on("closed",(()=>this.reconcilePopoutWindows())),this._openPopouts.push(a),this.layoutConfig.settings.closePopoutsOnUnload&&!this._windowBeforeUnloadListening&&(globalThis.addEventListener("beforeunload",this._windowBeforeUnloadListener,{passive:!0}),this._windowBeforeUnloadListening=!0),a}closeAllOpenPopouts(){for(let t=0;tglobalThis.close()),1)}getArea(t,e){let i=null,n=1/0;for(let o=0;o=s.x1&&t=s.y1&&es.surface&&(n=s.surface,i=s)}return i}calculateItemAreas(){const t=this.getAllContentItems(),e=this._groundItem;if(void 0===e)throw new J("LMCIAR44365");if(1!==t.length){e.contentItems[0].isStack?this._itemAreas=[]:this._itemAreas=e.createSideAreas();for(let e=0;e0){let e=t[0];if(Gt.isComponentItem(e)){const t=e.parent;if(null===t)throw new K("LMXLLMI69999");e=t}if(!Gt.isStack(e))throw new X("LMCLLMI19993");e.maximise()}}}processMaximiseStack(t){if(this._maximisedStack=t,t.on("beforeItemDestroyed",this._maximisedStackBeforeDestroyedListener),t.element.classList.add("lm_maximised"),t.element.insertAdjacentElement("afterend",this._maximisePlaceholder),void 0===this._groundItem)throw new J("LMMXI19993");{this._groundItem.element.prepend(t.element);const{width:e,height:i}=kt(this._containerElement);Tt(t.element,e),At(t.element,i),t.updateSize(!0),t.focusActiveContentItem(),this._maximisedStack.emit("maximised"),this.emit("stateChanged")}}processMinimiseMaximisedStack(){if(void 0===this._maximisedStack)throw new X("LMMMS74422");{const t=this._maximisedStack;if(null===t.parent)throw new K("LMMI13668");t.element.classList.remove("lm_maximised"),this._maximisePlaceholder.insertAdjacentElement("afterend",t.element),this._maximisePlaceholder.remove(),this.updateRootSize(!0),this._maximisedStack=void 0,t.off("beforeItemDestroyed",this._maximisedStackBeforeDestroyedListener),t.emit("minimised"),this.emit("stateChanged")}}reconcilePopoutWindows(){const t=[];for(let e=0;e{this._resizeTimeoutId=void 0,this.beginSizeInvalidation(),this.endSizeInvalidation()}),this.resizeDebounceInterval))}checkClearResizeTimeout(){void 0!==this._resizeTimeoutId&&(clearTimeout(this._resizeTimeoutId),this._resizeTimeoutId=void 0)}setContainer(){var t;const e=document.body,i=null!==(t=this._containerElement)&&void 0!==t?t:e;if(i===e){this.resizeWithContainerAutomatically=!0;const t=document.documentElement;t.style.height="100%",t.style.margin="0",t.style.padding="0",t.style.overflow="clip",e.style.height="100%",e.style.margin="0",e.style.padding="0",e.style.overflow="clip"}this._containerElement=i}onBeforeUnload(){this.destroy()}adjustColumnsResponsive(){if(void 0===this._groundItem)throw new J("LMACR20883");if(this._firstLoad=!1,this.useResponsiveLayout()&&!this._updatingColumnsResponsive&&this._groundItem.contentItems.length>0&&this._groundItem.contentItems[0].isRow){if(void 0===this._groundItem||null===this._width)throw new J("LMACR77412");{const t=this._groundItem.contentItems[0].contentItems.length;if(t<=1)return;{const e=this.layoutConfig.dimensions.defaultMinItemWidth;if(t*e<=this._width)return;{this._updatingColumnsResponsive=!0;const i=t-Math.max(Math.floor(this._width/e),1),n=this._groundItem.contentItems[0],o=this.getAllStacks();if(0===o.length)throw new X("LMACRS77413");{const t=o[0];for(let e=0;en?void 0:{parentItem:t,index:o}}}case 1:if(void 0===this._focusedComponentItem)return;{const t=this._focusedComponentItem.parentItem;return this.tryCreateLocationFromParentItem(t,e)}case 2:{const t=this.findFirstContentItemType(at.stack);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 3:{let t=this.findFirstContentItemType(at.row);return void 0!==t?this.tryCreateLocationFromParentItem(t,e):(t=this.findFirstContentItemType(at.column),void 0!==t?this.tryCreateLocationFromParentItem(t,e):void 0)}case 4:{const t=this.findFirstContentItemType(at.row);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 5:{const t=this.findFirstContentItemType(at.column);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 6:if(void 0===this._groundItem)throw new J("LMFLRIF18244");return void 0!==this.rootItem?void 0:void 0===e||0===e?{parentItem:this._groundItem,index:0}:void 0;case 7:if(void 0===this._groundItem)throw new J("LMFLF18244");{const t=this._groundItem.contentItems;if(0===t.length)return void 0===e||0===e?{parentItem:this._groundItem,index:0}:void 0;{const i=t[0];return this.tryCreateLocationFromParentItem(i,e)}}}}tryCreateLocationFromParentItem(t,e){const i=t.contentItems.length;return void 0===e?{parentItem:t,index:i}:e<0||e>i?void 0:{parentItem:t,index:e}}}!function(t){t.createMaximisePlaceElement=function(t){const e=t.createElement("div");return e.classList.add("lm_maximise_place"),e},t.createTabDropPlaceholderElement=function(t){const e=t.createElement("div");return e.classList.add("lm_drop_tab_placeholder"),e},t.defaultLocationSelectors=[{typeId:1,index:void 0},{typeId:2,index:void 0},{typeId:3,index:void 0},{typeId:7,index:void 0}],t.afterFocusedItemIfPossibleLocationSelectors=[{typeId:0,index:1},{typeId:2,index:void 0},{typeId:3,index:void 0},{typeId:7,index:void 0}]}(ae||(ae={}));class le extends ae{constructor(t,e,i,n){if(super(le.createLayoutManagerConstructorParameters(t,e)),this._bindComponentEventHanlderPassedInConstructor=!1,this._creationTimeoutPassed=!1,void 0!==e&&"function"==typeof e&&(this.bindComponentEvent=e,this._bindComponentEventHanlderPassedInConstructor=!0,void 0!==i&&(this.unbindComponentEvent=i)),!this._bindComponentEventHanlderPassedInConstructor&&this.isSubWindow){if(void 0===this._constructorOrSubWindowLayoutConfig)throw new J("VLC98823");{const t=xt.resolve(this._constructorOrSubWindowLayoutConfig);this.layoutConfig=Object.assign(Object.assign({},t),{root:void 0})}}!0!==n&&(this.deprecatedConstructor||this.init())}destroy(){this.bindComponentEvent=void 0,this.unbindComponentEvent=void 0,super.destroy()}init(){if(this._bindComponentEventHanlderPassedInConstructor||"loading"!==document.readyState&&null!==document.body){if(!this._bindComponentEventHanlderPassedInConstructor&&!0===this.isSubWindow&&!this._creationTimeoutPassed)return setTimeout((()=>this.init()),7),void(this._creationTimeoutPassed=!0);!0===this.isSubWindow&&(this._bindComponentEventHanlderPassedInConstructor||this.clearHtmlAndAdjustStylesForSubWindow(),window.__glInstance=this),super.init()}else document.addEventListener("DOMContentLoaded",(()=>this.init()),{passive:!0})}clearHtmlAndAdjustStylesForSubWindow(){const t=document.head,e=new Array(4);e[0]=document.querySelectorAll("body link"),e[1]=document.querySelectorAll("body style"),e[2]=document.querySelectorAll("template"),e[3]=document.querySelectorAll(".gl_keep");for(let i=0;ithis.emit("popIn"))),document.body.appendChild(t),!0}}bindComponent(t,e){if(void 0!==this.bindComponentEvent){return this.bindComponentEvent(t,e)}if(void 0!==this.getComponentEvent)return{virtual:!1,component:this.getComponentEvent(t,e)};{const t=`${tt[2]}: ${JSON.stringify(e)}`;throw new Z(t)}}unbindComponent(t,e,i){if(void 0!==this.unbindComponentEvent)this.unbindComponentEvent(t);else if(!e&&void 0!==this.releaseComponentEvent){if(void 0===i)throw new J("VCUCRCU333998");this.releaseComponentEvent(t,i)}}}!function(t){let e=!1;t.createLayoutManagerConstructorParameters=function(t,i){const n=e?null:new URL(document.location.href).searchParams.get("gl-window");e=!0;const o=null!==n;let s,r;if(null!==n){const e=localStorage.getItem(n);if(null===e)throw new Error("Null gl-window Config");localStorage.removeItem(n);const i=JSON.parse(e),o=_t.unminifyConfig(i);r=xt.fromResolved(o),t instanceof HTMLElement&&(s=t)}else void 0===t?r=void 0:t instanceof HTMLElement?(r=void 0,s=t):r=t,void 0===s&&i instanceof HTMLElement&&(s=i);return{constructorOrSubWindowLayoutConfig:r,isSubWindow:o,containerElement:s}}}(le||(le={}));class he extends le{constructor(t,e,i){super(t,e,i,!0),this._componentTypesMap=new Map,this._registeredComponentMap=new Map,this._virtuableComponentMap=new Map,this._containerVirtualRectingRequiredEventListener=(t,e,i)=>this.handleContainerVirtualRectingRequiredEvent(t,e,i),this._containerVirtualVisibilityChangeRequiredEventListener=(t,e)=>this.handleContainerVirtualVisibilityChangeRequiredEvent(t,e),this._containerVirtualZIndexChangeRequiredEventListener=(t,e,i)=>this.handleContainerVirtualZIndexChangeRequiredEvent(t,e,i),this.deprecatedConstructor||this.init()}registerComponent(t,e,i=!1){if("function"!=typeof e)throw new $("registerComponent() componentConstructorOrFactoryFtn parameter is not a function");if(e.hasOwnProperty("prototype")){const n=e;this.registerComponentConstructor(t,n,i)}else{const n=e;this.registerComponentFactoryFunction(t,n,i)}}registerComponentConstructor(t,e,i=!1){if("function"!=typeof e)throw new Error(tt[1]);if(void 0!==this._componentTypesMap.get(t))throw new Z(`${tt[3]}: ${t}`);this._componentTypesMap.set(t,{constructor:e,factoryFunction:void 0,virtual:i})}registerComponentFactoryFunction(t,e,i=!1){if("function"!=typeof e)throw new Z("Please register a constructor function");if(void 0!==this._componentTypesMap.get(t))throw new Z(`${tt[3]}: ${t}`);this._componentTypesMap.set(t,{constructor:void 0,factoryFunction:e,virtual:i})}registerComponentFunction(t){this.registerGetComponentConstructorCallback(t)}registerGetComponentConstructorCallback(t){if("function"!=typeof t)throw new Error("Please register a callback function");void 0!==this._getComponentConstructorFtn&&console.warn("Multiple component functions are being registered. Only the final registered function will be used."),this._getComponentConstructorFtn=t}getRegisteredComponentTypeNames(){const t=this._componentTypesMap.keys();return Array.from(t)}getComponentInstantiator(t){let e;const i=pt.resolveComponentTypeName(t);return void 0!==i&&(e=this._componentTypesMap.get(i)),void 0===e&&void 0!==this._getComponentConstructorFtn&&(e={constructor:this._getComponentConstructorFtn(t),factoryFunction:void 0,virtual:!1}),e}bindComponent(t,e){let i;const n=pt.resolveComponentTypeName(e);let o;if(void 0!==n&&(i=this._componentTypesMap.get(n)),void 0===i&&void 0!==this._getComponentConstructorFtn&&(i={constructor:this._getComponentConstructorFtn(e),factoryFunction:void 0,virtual:!1}),void 0!==i){const s=i.virtual;let r,a;r=void 0===e.componentState?void 0:Ut({},e.componentState);const l=i.constructor;if(void 0!==l)a=new l(t,r,s);else{const e=i.factoryFunction;if(void 0===e)throw new X("LMBCFFU10008");a=e(t,r,s)}if(s){if(void 0===a)throw new J("GLBCVCU988774");{const e=a,i=e.rootHtmlElement;if(void 0===i)throw new Z(`${tt[5]}: ${n}`);!function(t){const e="absolute";t.style.position!==e&&(t.style.position=e)}(i),this.container.appendChild(i),this._virtuableComponentMap.set(t,e),t.virtualRectingRequiredEvent=this._containerVirtualRectingRequiredEventListener,t.virtualVisibilityChangeRequiredEvent=this._containerVirtualVisibilityChangeRequiredEventListener,t.virtualZIndexChangeRequiredEvent=this._containerVirtualZIndexChangeRequiredEventListener}}this._registeredComponentMap.set(t,a),o={virtual:i.virtual,component:a}}else o=super.bindComponent(t,e);return o}unbindComponent(t,e,i){if(void 0===this._registeredComponentMap.get(t))super.unbindComponent(t,e,i);else{const e=this._virtuableComponentMap.get(t);if(void 0!==e){const i=e.rootHtmlElement;if(void 0===i)throw new X("GLUC77743",t.title);this.container.removeChild(i),this._virtuableComponentMap.delete(t)}}}fireBeforeVirtualRectingEvent(t){this._goldenLayoutBoundingClientRect=this.container.getBoundingClientRect(),super.fireBeforeVirtualRectingEvent(t)}handleContainerVirtualRectingRequiredEvent(t,e,i){const n=this._virtuableComponentMap.get(t);if(void 0===n)throw new J("GLHCSCE55933");{const o=n.rootHtmlElement;if(void 0===o)throw new Z(tt[4]+" "+t.title);{const n=t.element.getBoundingClientRect(),s=n.left-this._goldenLayoutBoundingClientRect.left;o.style.left=zt(s);const r=n.top-this._goldenLayoutBoundingClientRect.top;o.style.top=zt(r),Tt(o,e),At(o,i)}}}handleContainerVirtualVisibilityChangeRequiredEvent(t,e){const i=this._virtuableComponentMap.get(t);if(void 0===i)throw new J("GLHCVVCRE55934");{const n=i.rootHtmlElement;if(void 0===n)throw new Z(tt[4]+" "+t.title);Dt(n,e)}}handleContainerVirtualZIndexChangeRequiredEvent(t,e,i){const n=this._virtuableComponentMap.get(t);if(void 0===n)throw new J("GLHCVZICRE55935");{const e=n.rootHtmlElement;if(void 0===e)throw new Z(tt[4]+" "+t.title);e.style.zIndex=i}}}const de="initial_",ce={show:"top",popout:!1,maximise:!1,close:"close-tab-unused"},me={headerHeight:31},ue={hasHeaders:!0,reorderEnabled:!0},pe={popoutWholeStack:!1,constrainDragToContainer:!1,constrainDragToHeaders:!1,preventDragout:!1,showMaximiseIcon:!1,showPopoutIcon:!1,showCloseIcon:!1,blockedPopoutsThrowError:!0,closePopoutsOnUnload:!0,selectionEnabled:!1};var ge,fe;class ve{constructor(e){this.layout=e,ge.set(this,void 0),fe.set(this,void 0),this.handleResize=t=>{t.forEach((t=>this.resizeElement(t.target)))},this.handleMutation=()=>{this.layout.viewComponentsByContainerElement.forEach((t=>{this.resizeElement(t.container.element)}))},t.__classPrivateFieldSet(this,ge,new ResizeObserver(this.handleResize),"f"),t.__classPrivateFieldSet(this,fe,new MutationObserver(this.handleMutation),"f")}observeMutations(e){t.__classPrivateFieldGet(this,fe,"f")?.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["class"]})}destroy(){t.__classPrivateFieldGet(this,ge,"f").disconnect(),t.__classPrivateFieldGet(this,fe,"f").disconnect()}observeContainer(e){t.__classPrivateFieldGet(this,ge,"f").observe(e)}unobserveContainer(e){t.__classPrivateFieldGet(this,ge,"f").unobserve(e)}resizeElement(t){const e=this.layout.viewComponentsByContainerElement.get(t);e&&e.resize()}}ge=new WeakMap,fe=new WeakMap;var _e={};Object.defineProperty(_e,"__esModule",{value:!0});var ye=_e.BaseItem=void 0;class Ce{constructor(t,e,i){this._item=t,this._layout=e,this._wrap=i}get raw(){return this._item}get layout(){return this._layout}get type(){return this._item.type}get contentItems(){return(this._item.contentItems??[]).map((t=>this._wrap(t)))}get parent(){const t=this._item.parent;return t?this._wrap(t):null}setActiveContentItem(t,e){if("stack"!==this.type)throw new Error(`Cannot call setActiveContentItem from a non-stack item: ${this.type}`);this._item.setActiveContentItem(t.raw,e)}static wrapInternal(t,e,i){const n=Ce.wrapCache.get(e);if(n)return n;const o=new t(e,i,(e=>Ce.wrapInternal(t,e,i)));return Ce.wrapCache.set(e,o),o}}ye=_e.BaseItem=Ce,Ce.wrapCache=new WeakMap;const we=t=>!!t&&"contentItems"in t&&(t.isRow||t.isColumn);class Ie extends ye{isRoot(){return!!this._item.parent?.isGround}getBounds(){return this._item.element.getBoundingClientRect()}get viewName(){if(this._item.isComponent){const{component:t}=this._item;return t.identity.name}throw new Error("View name not found")}onDestroyed(t){const e=({target:i})=>{i===this._item&&(t(),this._item.off("itemDestroyed",e))};this._item.on("itemDestroyed",e)}createAdjacentStack({position:t="right"}={}){const e=this.raw;if(ee.isStack(e)&&e.parent){const i=["top","bottom"].includes(t)?"column":"row",n=["left","top"].includes(t)?1:0,o=we(e.parent)?e.parent:e.layoutManager,s=o,r=e.parent.contentItems.indexOf(e);e.parent.isGround&&e.parent.removeChild(e,!0);const a=o.newItem({type:i,content:[{type:"stack",content:[]}]},r);if(!a)throw new Error("createAdjacentStack: Failed to create new container");const l=a.contentItems[0];return a.addChild(this.raw,n),we(s)&&s.removeChild(e,!0),this._wrap(l)}throw new Error(`Cannot creat adjacent stacks for type: ${e.type}, must be type 'stack'`)}setActiveContentItem(t,e=!0){if(!ee.isStack(this._item))throw new Error(`Cannot call setActiveContentItem from a non-stack item: ${this.type}`);this._item.setActiveComponentItem(t.raw,!e)}static wrap(t,e){return ye.wrapInternal(Ie,t,e)}}function be(t=[],e){for(const i of t)"component"===i.type?Object.keys(e).forEach((t=>{t in i&&(i.componentState={[`${de}${t}`]:i[t],...i.componentState}),i[t]=e[t]})):be(i.content,e)}function Se(t=[],e,i){for(const n of t)if("component"===n.type)Object.keys(e).forEach((t=>{if(`${de}${t}`in n.componentState)return n[t]=n.componentState[`${de}${t}`],void delete n.componentState[`${de}${t}`];n[t]=e[t]}));else{if(n.size&&("row"===i||"column"===i)){n["row"===i?"width":"height"]=n.size?.includes(".")?parseFloat(n.size):parseInt(n.size)}Se(n.content,e,n.type)}}function Ee(t){if(t.root){t.root.content&&Se([t.root],{componentName:"view",isClosable:!0});const e=t.root;t.content=[e],delete t.root}return t}const xe=e=>class extends e{connectedCallback(){if(!this.name||!this.uuid)throw new Error(" Name or uuid attribute missing");if(!this.src)throw new Error(" missing 'src' attribute.");this.#t||(this.#t=document.createElement("iframe"),this.#t.src=this.src,this.#t.style.height="100%",this.#t.style.width="100%",this.#t.style.border="none",this.forceFrameName?this.#t.setAttribute("name",this.forceFrameName):this.#t.setAttribute("name",t.encodeOptions({brokerUrl:this.brokerUrl,name:this.name,uuid:this.uuid,providerId:this.providerId,contextGroup:this.contextGroup},"of-frame")),this.#t.setAttribute("id",this.name),this.appendChild(this.#t))}#t;get brokerUrl(){return this.getAttribute("of-broker")}set brokerUrl(t){t&&this.setAttribute("of-broker",t)}get name(){return this.getAttribute("of-name")}set name(t){t&&this.setAttribute("of-name",t)}get forceFrameName(){return this.getAttribute("forceFrameName")}set forceFrameName(t){t&&this.setAttribute("forceFrameName",t)}get uuid(){return this.getAttribute("of-uuid")}set uuid(t){t&&this.setAttribute("of-uuid",t)}get src(){return this.getAttribute("src")}set src(t){t&&this.setAttribute("src",t)}get providerId(){return this.getAttribute("of-provider-id")}set providerId(t){t&&this.setAttribute("of-provider-id",t)}get contextGroup(){return this.getAttribute("of-context-group")}set contextGroup(t){t&&this.setAttribute("of-context-group",t)}static get observedAttributes(){return["name"]}};class Le{static create(t){const e=document.createElement("of-view");return Object.entries(t).forEach((([t,i])=>{e.setAttribute(t,i)})),e}}customElements.define("of-view",xe(HTMLElement));class ze{constructor(t,i,n,{brokerUrl:o,interopConfig:s},r){this.container=t,this.config=i,this.ofView=null,this.isDragging=()=>this.container.tab.element?.className.includes("lm_dragging")??!1;const{url:a,web:l,interop:h,name:d}=i||{},c=d??`internal-generated-view-${e.v4()}`;if(this.identity={uuid:n,name:c},this.container.element.setAttribute("of-name",c),this.container.element.id=`container-${c}`,this.container.parent.id=c,void 0===a)return void this.handleUrlMissing();const m=this.updateTitleIfNotSet(a),u={"of-broker":o,"of-uuid":n,"of-name":c,src:a};l?.frameName&&(u.forceFrameName=l.frameName);const p=h?.currentContextGroup??s?.currentContextGroup;p&&(u["of-context-group"]=p),s?.providerId&&(u["of-provider-id"]=s?.providerId),this.ofView=Le.create(u),this.ofView.title=m??`Iframe: ${a}`,r.appendChild(this.ofView),this.ofView.style.position="absolute"}updateTitleIfNotSet(t){return"view"===this.container.parent.title&&this.container.parent.setTitle(t),this.container.parent.title}handleUrlMissing(){const t=document.createElement("div");t.setAttribute("style","padding: 20px");t.innerText="No URL provided",this.container.element.appendChild(t)}destroy(){this.ofView?.remove(),this.ofView=null}closeView(){this.container.close()}resize(){if(this.ofView){if(this.isDragging())return void(this.ofView.style.display="none");const t=this.container.element.getBoundingClientRect();this.ofView.style.position="absolute",this.ofView.style.height=`${t.height}px`,this.ofView.style.width=`${t.width}px`,this.ofView.style.inset=`${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`,this.ofView.style.display="block"}}}class Me extends U{static overrideConfig(t){const e={...ue,...t.settings,...pe};return e.reorderEnabled?be(t.content,{isClosable:!0}):be(t.content,{reorderEnabled:!1}),{dimensions:me,...t,settings:e,header:{...ce,show:!1!==t.settings?.hasHeaders&&ce.show}}}constructor(t,e,i,{options:n},o,s){super(),this.identity=t,this.container=e,this.initialConfig=i,this.layoutManager=o,this.platformProvider=s,this.viewComponentsByContainerElement=new Map,this.layoutContentCache=_.getSingleInstance(),this.reparentingViews=new Set,this.goldenLayoutDestroyed=!1,this.createViewComponent=(t,e)=>{m.handleSharedView(this.layoutManager,this.identity,e);const i=new ze(t,e,this.identity.uuid,this.options,this.iframeContainer);return e&&!1===e[`${de}isClosable`]&&this.stylesheet.insertRule(`#tab-${i.identity.name} .lm_close_tab { display: none; }`),this.viewComponentsByContainerElement.set(t.element,i),this.resizeController.observeContainer(t.element),i},this.iframeContainer=document.createElement("div"),this.iframeContainer.id=`openfin-layout-iframe-container-${this.identity.layoutName}`,this.domEmitter=new V(e),this.setupStylesheets(),this.layout=new he(this.container),this.layout.resizeWithContainerAutomatically=!0,this.options=n,this.layout.registerComponent("view",this.createViewComponent),this.setupListeners(),this.resizeController=new ve(this),this.layout.loadLayout(Me.overrideConfig(i));const r=document.createElement("div");r.id=`openfin-layout-shadow-container-${this.identity.layoutName}`,r.attachShadow({mode:"open",delegatesFocus:!1}).appendChild(this.iframeContainer),this.container.appendChild(r),this.resizeController.observeMutations(this.container)}getStackByView({name:t}){const e=this.layout.findFirstComponentItemById(t);if(e?.parent&&e?.parent?.isStack)return Ie.wrap(e.parent,this)}getRoot(){return Ie.wrap(this.layout.rootItem,this)}async platformCloseView(t){const e=[...this.viewComponentsByContainerElement.values()].find((e=>e.identity.name===t.name));if(!e)throw new Error(`View with name: ${t.name} not found in layout.`);e.closeView()}async platformCreateView(t,{location:e,targetView:i}={}){if(i)throw new Error("TargetView not supported in web");const n={options:this.platformProvider.normalizeOptions(t),target:this.identity,location:e};return this.insertView(n)}setupStylesheets(){if(this.container.setAttribute("data-openfin-layout-name",this.identity.layoutName),this.stylesheet=new CSSStyleSheet,this.stylesheet.insertRule(".lm_close { display: none; }"),document.adoptedStyleSheets.push(this.stylesheet),this.initialConfig.settings?.preventSplitterResize){const t=`\n [data-openfin-layout-name='${this.identity.layoutName}'] .lm_splitter {\n pointer-events: none;\n }`;this.stylesheet.insertRule(t)}}insertView({options:t,location:e,targetView:i}){const n=e?this.layoutContentCache.getItemOrUndefined(e.id):void 0,o=i?this.layoutContentCache.getItemOrUndefined(i.name):void 0,s=n??o??Ie.wrap(this.layout.rootItem,this);let r;if(ee.isStack(s.raw))r=s.raw;else{if(!we(s.raw))throw new Error("Cannot add a view at the requested location");r=s.raw.newItem({type:"stack",content:[]})}const a=Math.min(r.contentItems.length,e?.index??r.contentItems.length);let l=this.layout.findFirstComponentItemById(t.name);l?(l.parent&&l.parent.removeChild(l,!0),r.addChild(l,a)):l=r.newComponent("view",t,t.title??t.url??"Default Title",a);const h=l.component.identity;return Promise.resolve({identity:h})}replaceView({viewToReplace:t,newView:e}){throw new Error("Method not implemented.")}replaceLayout(t){throw new Error("Method not implemented.")}async cleanupView(t){}applyPreset(t){throw new Error("Method not implemented.")}getCurrentViews(){return[...this.viewComponentsByContainerElement.values()].map((t=>t.identity))}async getFrameSnapshot(){return Ee(xt.fromResolved(this.layout.toConfig()))}isVisible(){return W(this.container)}async onViewDetached({viewIdentity:t}){this.reparentingViews.add(t.name),this.platformCloseView(t)}async destroy(){this.goldenLayoutDestroyed||(this.goldenLayoutDestroyed=!0,this.layout.destroy()),this.iframeContainer.remove(),this.resizeController.destroy(),document.adoptedStyleSheets=document.adoptedStyleSheets.filter((t=>t!==this.stylesheet)),this.viewComponentsByContainerElement.clear()}setupListeners(){this.container.addEventListener("pointerdown",(t=>{if(t.target instanceof HTMLElement){const e=t.target.classList;["lm_tab","lm_title","lm_splitter","lm_drag_handle"].some((t=>e.contains(t)))&&(this.handleDragStart(),2===t.button&&t.stopPropagation())}}),!0),document.addEventListener("pointerup",(()=>this.handleDragEnd()),!0),this.layout.on("tabCreated",(t=>{const e=t.componentItem.component;t.element.id=`tab-${e.identity.name}`,this.domEmitter.dispatchLocalEvent("tab-created",e.identity)})),this.layout.on("itemCreated",(({target:t})=>{const e=t;if(Gt.isComponentItem(e)){const t=e.component;this.domEmitter.dispatchLocalEvent("container-created",t.identity)}})),this.layout.on("itemDestroyed",(t=>{const e=t.target;if(Gt.isComponentItem(e)){const t=e.component;this.removeViewComponent(t)}})),this.layout.on("itemDropped",(()=>{this.handleDragEnd()}))}handleDragStart(){this.iframeContainer.style.pointerEvents="none"}handleDragEnd(){this.iframeContainer.style.pointerEvents=""}removeViewComponent(t){if(t.config&&!1===t.config[`${de}isClosable`]){const e=[...this.stylesheet.cssRules].findIndex((e=>e.cssText.includes(`#tab-${t.identity.name}`)));this.stylesheet.deleteRule(e)}t.destroy(),this.viewComponentsByContainerElement.delete(t.container.element),this.resizeController.unobserveContainer(t.container.element),this.reparentingViews.has(t.identity.name)?this.reparentingViews.delete(t.identity.name):this.platformProvider.closeView(t.identity.name);0===this.getCurrentViews().length&&(this.goldenLayoutDestroyed||(this.goldenLayoutDestroyed=!0,m.handleLastViewRemoved(this.layoutManager,this.identity)))}}class Pe{constructor(t,e,i,n){this.windowIdentity=t,this.connectConfig=e,this.provider=i,this.fallbackContainer=n}async createLayout(t,e){if(!("container"in t)&&!this.fallbackContainer)throw new Error("Container property is not optional in web");const{layoutName:i}=t,n=t,o=this.provider.initLayoutViews(n),s=n.container??this.fallbackContainer,r={...this.windowIdentity,layoutName:i},a=new Me(r,s,o,this.connectConfig,e,this.provider);m.registerLayout(e,i,a),this.fallbackContainer=null}async getLayoutSnapshot(t){return t.getLayoutSnapshot()}async handleLastViewRemoved(t){}}class Te{static async init(e){const i=e.getFin().InterApplicationBus.Channel,n=await i.create(`custom-frame-${e.me.uuid}`);return n.setDefaultAction((async(t,{target:e,opts:i},o)=>{const s=n.connections.find((t=>t.name===e.name));if(s)return n.dispatch(s,t,{...i,target:e});throw new Error(`Client with name ${e.name} not found`)})),await t.relayChannelClientApi_1(n,"layout-relay"),new Te(e)}constructor(t){this.wire=t,this.viewNames=new Set}normalizeOptions(t,i="default"){const n=this.wire.me.uuid;let{name:o=`internal-generated-view-${e.v4()}`}=t;return o.match(/^internal-generated-view-/)&&this.viewNames.has(o)&&"duplicate"===i&&(o=`internal-generated-view-${e.v4()}`),this.viewNames.add(o),{...t,name:o,uuid:n}}closeView(t){this.viewNames.delete(t)}initLayoutViews({layout:t,multiInstanceViewBehavior:e}){return H((t=>{if("component"===t.type&&t.componentState){const i=this.normalizeOptions(t.componentState,e);return{...t,componentState:i}}return t}),t)}}var Ae;const ke=t=>t;Ae=new WeakMap,exports.WebLayoutEntryPoint=class{constructor(e){Ae.set(this,void 0),this.initLayoutManager=async(e,i,{container:n,layoutManagerOverride:o})=>{const s=await Te.init(i),r=o??ke,a=new Pe(i.me,t.__classPrivateFieldGet(this,Ae,"f"),s,n),l=new(r(m.createClosedConstructor(a)));return await M(i,l),l},this.applyLayoutSnapshot=async(e,i,n)=>{await i.applyLayoutSnapshot(t.__classPrivateFieldGet(this,Ae,"f").platform.layoutSnapshot)},this.createLayout=async(t,e)=>m.createLayout(t,e),this.destroyLayout=async(t,e)=>m.destroyLayout(t,e),t.__classPrivateFieldSet(this,Ae,e,"f")}}; @@ -8343,7 +8343,7 @@ function version(uuid) { /******/ /************************************************************************/ var __webpack_exports__ = {}; -// This entry need to be wrapped in an IIFE because it need to be in strict mode. +// This entry needs to be wrapped in an IIFE because it needs to be in strict mode. (() => { "use strict"; var exports = __webpack_exports__; @@ -8356,7 +8356,7 @@ exports.saveLayout = saveLayout; exports.readLayouts = readLayouts; exports.addLayout = addLayout; exports.removeThisLayout = removeThisLayout; -const core_web_1 = __webpack_require__(/*! @openfin/core-web */ "./node_modules/@openfin/core-web/out/api-client.js"); +const core_web_1 = __webpack_require__(/*! @openfin/core-web */ "../../node_modules/@openfin/core-web/out/api-client.js"); const settings_1 = __webpack_require__(/*! ./platform/settings */ "./client/src/platform/settings.ts"); let PARENT_CONTAINER; /** diff --git a/web/v19.2.0/web-layout/js/provider.bundle.js.map b/web/v19.2.0/web-layout/js/provider.bundle.js.map index 893fc22..bc30b74 100644 --- a/web/v19.2.0/web-layout/js/provider.bundle.js.map +++ b/web/v19.2.0/web-layout/js/provider.bundle.js.map @@ -1 +1 @@ -{"version":3,"file":"provider.bundle.js","mappings":";;;;;;;;;;AAAa,MAAM,mBAAO,CAAC,iFAAoB,EAAE,mBAAO,CAAC,mDAAS,EAAE,mBAAO,CAAC,+DAAM,EAAE,mBAAO,CAAC,mDAAQ,EAAE,mBAAO,CAAC,gEAAkB,EAAE,mBAAO,CAAC,4DAAgB,EAAE,eAAe;;;;;;;;;;;;ACA9J,MAAM,mBAAO,CAAC,mDAAS,IAAI,mBAAO,CAAC,mDAAQ,IAAI,mBAAO,CAAC,gEAAkB,IAAI,mBAAO,CAAC,4DAAgB,IAAI,mBAAO,CAAC,+DAAM,EAAE,kBAAkB,EAAE,GAAG,wBAAwB,GAAG,sGAAsG,qBAAM,CAAC,qBAAM,iCAAiC,KAAK,KAAK,KAAK,MAAM,oBAAoB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AAsD,oCAAoC,IAAI,iIAAiI,sBAAsB,yCAAyC,2FAA2F;;;;;;;;;;;;ACFv6nD;;AAEZ,kBAAkB;AAClB,mBAAmB;AACnB,qBAAqB;;AAErB;AACA;AACA;;AAEA;AACA,mCAAmC,SAAS;AAC5C;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,cAAc,SAAS;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,2CAA2C,UAAU;AACrD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;ACrJA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEY;;AAEZ,eAAe,mBAAO,CAAC,wDAAW;AAClC,gBAAgB,mBAAO,CAAC,oDAAS;AACjC;AACA;AACA;AACA;;AAEA,cAAc;AACd,kBAAkB;AAClB,yBAAyB;;AAEzB;AACA,kBAAkB;;AAElB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,kBAAkB,YAAY;AAC9B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA,wCAAwC,SAAS;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;;AAEA;AACA;AACA,cAAc,iBAAiB;AAC/B;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,iDAAiD,EAAE;AACnD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C;AAC1C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA,yBAAyB,eAAe;AACxC;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,yBAAyB,QAAQ;AACjC;AACA,sBAAsB,eAAe;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc,YAAY;AAC1B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB,sBAAsB;AACxC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,mBAAmB;AACnB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA,oBAAoB,SAAS;AAC7B;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA,qBAAqB,WAAW,GAAG,IAAI;AACvC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA,gBAAgB,WAAW,GAAG,IAAI,KAAK,aAAa;AACpD;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;;AAEA;AACA,GAAG;AACH;AACA;AACA,mBAAmB,KAAK,mDAAmD,cAAc;AACzF,GAAG;AACH;AACA;AACA,+BAA+B,IAAI;AACnC;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,MAAM,aAAa,SAAS;AACtD;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,SAAS,gBAAgB;AACzB,cAAc,oBAAoB,EAAE,IAAI;AACxC;AACA,YAAY,gBAAgB,EAAE,IAAI;AAClC;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,GAAG,SAAS,GAAG,KAAK,qBAAqB,EAAE,EAAE;AACpE,QAAQ;AACR,yBAAyB,GAAG,KAAK,yBAAyB,EAAE,EAAE;AAC9D,mBAAmB,yBAAyB,EAAE,EAAE;AAChD;AACA,MAAM;AACN,oBAAoB,IAAI,EAAE,GAAG,SAAS,IAAI,EAAE,EAAE;AAC9C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,0CAA0C,cAAc,SAAS,OAAO;AACxE;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,kBAAkB,YAAY;AAC9B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,kBAAkB,gBAAgB;AAClC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,kBAAkB,gBAAgB;AAClC;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,cAAc,YAAY;AAC1B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,QAAQ;AAC1B;AACA,oBAAoB,QAAQ;AAC5B;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;;;;;ACzjEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEa;;AAEb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB;;AAEnB;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,sBAAsB;AACxC;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA,eAAe;AACf;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA,oBAAoB,SAAS;AAC7B;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;;AAEA,kCAAkC,QAAQ;AAC1C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oBAAoB,iBAAiB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,QAAQ;AACR;AACA,uCAAuC,QAAQ;AAC/C;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,OAAO;AACzB;AACA;AACA;;AAEA;AACA,SAAS,yBAAyB;AAClC;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,gBAAgB;AAClC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,8DAA8D,YAAY;AAC1E;AACA,8DAA8D,YAAY;AAC1E;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,qCAAqC,YAAY;AACjD;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;AACA;;;;;;;;;;;AChfA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,SAAS,WAAW;;AAEpB;AACA;AACA;AACA,SAAS,WAAW;;AAEpB;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA,SAAS,WAAW;;AAEpB;AACA;AACA,SAAS,UAAU;;AAEnB;AACA;;;;;;;;;;;ACpFA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,WAAW,mBAAO,CAAC,mDAAS;;AAE5B;AACA;;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mBAAO,CAAC,+DAAe;AACzC,cAAc,mBAAO,CAAC,uDAAW;AACjC,eAAe,mBAAO,CAAC,yDAAY;AACnC,cAAc,mBAAO,CAAC,yDAAY;AAClC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,SAAS;AACpB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AChDA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACnBA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,UAAU;AACrB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACtBA,sBAAsB,mBAAO,CAAC,yEAAoB;AAClD,SAAS,mBAAO,CAAC,6CAAM;;AAEvB;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC3BA,SAAS,mBAAO,CAAC,6CAAM;;AAEvB;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpBA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,WAAW,mBAAO,CAAC,iDAAQ;;AAE3B;AACA;AACA;AACA;AACA;AACA,WAAW,Q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B,aAAa,mBAAO,CAAC,qDAAU;;AAE/B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,SAAS;AACpB;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa,GAAG;AAChB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;AACA,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;;;;;;;;;;ACrKA,eAAe,mBAAO,CAAC,yDAAY;;AAEnC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;;;;;;;;;;AC7BA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,cAAc,mBAAO,CAAC,uDAAW;;AAEjC;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,aAAa,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AACrB,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClFA,aAAa,mBAAO,CAAC,uDAAW;AAChC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA,iBAAiB,mBAAO,CAAC,6DAAc;AACvC,eAAe,mBAAO,CAAC,2DAAa;AACpC,eAAe,mBAAO,CAAC,yDAAY;AACnC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;AACA;AACA;AACA,oCAAoC;;AAEpC;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC9CA,aAAa,mBAAO,CAAC,uDAAW;AAChC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,eAAe,mBAAO,CAAC,yDAAY;AACnC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC3DA,kBAAkB,mBAAO,CAAC,iEAAgB;AAC1C,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC7BA,eAAe,mBAAO,CAAC,yDAAY;AACnC,kBAAkB,mBAAO,CAAC,iEAAgB;AAC1C,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AChCA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACnBA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,aAAa,UAAU;AACvB;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACbA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACZA,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,aAAa,aAAa;AAC1B;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACfA,WAAW,mBAAO,CAAC,mDAAS;;AAE5B;AAC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;;;;;;ACnFA,aAAa,mBAAO,CAAC,uDAAW;AAChC,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,SAAS,mBAAO,CAAC,6CAAM;AACvB,kBAAkB,mBAAO,CAAC,iEAAgB;AAC1C,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC/GA,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA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AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC5EA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,mBAAmB,mBAAO,CAAC,mEAAiB;AAC5C,kBAAkB,mBAAO,CAAC,iEAAgB;;AAE1C;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACxBA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACdA,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACnBA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACZA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;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;;;;ACRA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACbA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;;;;;;;;;;ACjBA,gBAAgB,mBAAO,CAAC,6DAAc;;AAEtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACdA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,GAAG;AAChB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACbA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACbA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,UAAU,mBAAO,CAAC,iDAAQ;AAC1B,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjCA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;;;;;;;;;;;ACzBA,gBAAgB,mBAAO,CAAC,6DAAc;;AAEtC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,GAAG;AAChB;AACA;AACA;AACA,oBAAoB,QAAQ,IAAI,QAAQ;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,kBAAkB;AAClB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpCA,sBAAsB,mBAAO,CAAC,yEAAoB;AAClD,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA,8BAA8B,mBAAmB;AACjD;AACA;AACA;AACA;AACA;AACA,+CAA+C,mBAAmB;AAClE;AACA;AACA;;AAEA;;;;;;;;;;;ACnCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACzBA,iBAAiB,mBAAO,CAAC,6DAAc;AACvC,eAAe,mBAAO,CAAC,yDAAY;;AAEnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AChCA,WAAW,mBAAO,CAAC,mDAAS;AAC5B,gBAAgB,mBAAO,CAAC,2DAAa;;AAErC;AACA,kBAAkB,KAA0B;;AAE5C;AACA,gCAAgC,QAAa;;AAE7C;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACrCA,kBAAkB,mBAAO,CAAC,iEAAgB;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,kBAAkB;AAClB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClCA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,eAAe,mBAAO,CAAC,yDAAY;;AAEnC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpCA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClCA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC1BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC9BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC5BA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC1BA,uBAAuB,mBAAO,CAAC,2EAAqB;AACpD,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC1BA,oBAAoB,mBAAO,CAAC,qEAAkB;AAC9C,eAAe,mBAAO,CAAC,2DAAa;AACpC,kBAAkB,mBAAO,CAAC,+DAAe;;AAEzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;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;ACpEuC;AACA;AACA;AACA;AACE;AACQ;AACE;AACE;;;;;;;;;;;;;;;;ACPtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD;;AAEnD;;AAEA,oBAAoB,gBAAgB;AACpC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA,kBAAkB,cAAc;AAChC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,kBAAkB,cAAc;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,kBAAkB,aAAa;AAC/B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,iEAAe,GAAG;;;;;;;;;;;;;;;ACtNlB,iEAAe,sCAAsC;;;;;;;;;;;;;;;;ACAhB;;AAErC;AACA,OAAO,wDAAQ;AACf;AACA;;AAEA;AACA,gCAAgC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AAE,cAAc,EAAE;KAC5B,CAAC,CAAC;IACH,MAAM,CAAC,GAAG,GAAG,GAAG,CAAC;IACjB,IAAI,GAAG,EAAE,CAAC;QACT,MAAM,qBAAqB,GAAG,YAAY,CAAC,GAAG,EAAE,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAC;QAC5F,4EAA4E;QAC5E,MAAM,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;QAC7D,yDAAyD;QACzD,+DAA+D;QAC/D,MAAM,GAAG,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,qBAAqB,EAAE,SAAS,EAAE,gBAAgB,EAAE,CAAC,CAAC;QACvF,wDAAwD;QACxD,MAAM,eAAe,EAAE,CAAC;QACxB,WAAW,CAAC,QAAQ,CAAC,CAAC;IACvB,CAAC;AACF,CAAC;AAED,IAAI,EAAE;KACJ,IAAI,CAAC,GAAG,EAAE;IACV,OAAO,CAAC,GAAG,CAAC,kEAAkE,CAAC,CAAC;IAChF,OAAO,IAAI,CAAC;AACb,CAAC,CAAC;KACD,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC","sources":["webpack://openfin-web--web-layout/./node_modules/@openfin/core-web/out/api-client.js","webpack://openfin-web--web-layout/./node_modules/@openfin/core-web/out/main-8cad4070.js","webpack://openfin-web--web-layout/./node_modules/@openfin/core-web/out/main-b14f67c9.js","webpack://openfin-web--web-layout/../../node_modules/base64-js/index.js","webpack://openfin-web--web-layout/../../node_modules/buffer/index.js","webpack://openfin-web--web-layout/../../node_modules/events/events.js","webpack://openfin-web--web-layout/../../node_modules/ieee754/index.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_DataView.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_Hash.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_ListCache.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_Map.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_MapCache.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_Promise.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_Set.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_SetCache.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_Stack.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_Symbol.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_Uint8Array.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_WeakMap.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_arrayEach.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_arrayFilter.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_arrayLikeKeys.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_arrayPush.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_arraySome.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_assignValue.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_assocIndexOf.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseAssign.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseAssignIn.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseAssignValue.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseClone.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseCreate.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseGetAllKeys.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseGetTag.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseIsArguments.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseIsEqual.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseIsEqualDeep.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseIsMap.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseIsNative.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseIsSet.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseIsTypedArray.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseKeys.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseKeysIn.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseTimes.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseUnary.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_cacheHas.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_cloneArrayBuffer.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_cloneBuffer.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_cloneDataView.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_cloneRegExp.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_cloneSymbol.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_cloneTypedArray.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_copyArray.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_copyObject.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_copySymbols.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_copySymbolsIn.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_coreJsData.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_defineProperty.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_equalArrays.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_equalByTag.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_equalObjects.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_freeGlobal.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_getAllKeys.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_getAllKeysIn.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_getMapData.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_getNative.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_getPrototype.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_getRawTag.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_getSymbols.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_getSymbolsIn.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_getTag.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_getValue.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_hashClear.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_hashDelete.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_hashGet.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_hashHas.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_hashSet.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_initCloneArray.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_initCloneByTag.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_initCloneObject.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_isIndex.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_isKeyable.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_isMasked.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_isPrototype.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_listCacheClear.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_listCacheDelete.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_listCacheGet.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_listCacheHas.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_listCacheSet.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_mapCacheClear.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_mapCacheDelete.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_mapCacheGet.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_mapCacheHas.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_mapCacheSet.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_mapToArray.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_nativeCreate.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_nativeKeys.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_nativeKeysIn.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_nodeUtil.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_objectToString.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_overArg.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_root.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_setCacheAdd.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_setCacheHas.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_setToArray.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_stackClear.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_stackDelete.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_stackGet.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_stackHas.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_stackSet.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_toSource.js","webpack://openfin-web--web-layout/../../node_modules/lodash/cloneDeep.js","webpack://openfin-web--web-layout/../../node_modules/lodash/eq.js","webpack://openfin-web--web-layout/../../node_modules/lodash/isArguments.js","webpack://openfin-web--web-layout/../../node_modules/lodash/isArray.js","webpack://openfin-web--web-layout/../../node_modules/lodash/isArrayLike.js","webpack://openfin-web--web-layout/../../node_modules/lodash/isBuffer.js","webpack://openfin-web--web-layout/../../node_modules/lodash/isEqual.js","webpack://openfin-web--web-layout/../../node_modules/lodash/isFunction.js","webpack://openfin-web--web-layout/../../node_modules/lodash/isLength.js","webpack://openfin-web--web-layout/../../node_modules/lodash/isMap.js","webpack://openfin-web--web-layout/../../node_modules/lodash/isObject.js","webpack://openfin-web--web-layout/../../node_modules/lodash/isObjectLike.js","webpack://openfin-web--web-layout/../../node_modules/lodash/isSet.js","webpack://openfin-web--web-layout/../../node_modules/lodash/isTypedArray.js","webpack://openfin-web--web-layout/../../node_modules/lodash/keys.js","webpack://openfin-web--web-layout/../../node_modules/lodash/keysIn.js","webpack://openfin-web--web-layout/../../node_modules/lodash/stubArray.js","webpack://openfin-web--web-layout/../../node_modules/lodash/stubFalse.js","webpack://openfin-web--web-layout/./client/src/platform/settings.ts","webpack://openfin-web--web-layout/../../node_modules/uuid/dist/esm-browser/index.js","webpack://openfin-web--web-layout/../../node_modules/uuid/dist/esm-browser/md5.js","webpack://openfin-web--web-layout/../../node_modules/uuid/dist/esm-browser/nil.js","webpack://openfin-web--web-layout/../../node_modules/uuid/dist/esm-browser/parse.js","webpack://openfin-web--web-layout/../../node_modules/uuid/dist/esm-browser/regex.js","webpack://openfin-web--web-layout/../../node_modules/uuid/dist/esm-browser/rng.js","webpack://openfin-web--web-layout/../../node_modules/uuid/dist/esm-browser/sha1.js","webpack://openfin-web--web-layout/../../node_modules/uuid/dist/esm-browser/stringify.js","webpack://openfin-web--web-layout/../../node_modules/uuid/dist/esm-browser/v1.js","webpack://openfin-web--web-layout/../../node_modules/uuid/dist/esm-browser/v3.js","webpack://openfin-web--web-layout/../../node_modules/uuid/dist/esm-browser/v35.js","webpack://openfin-web--web-layout/../../node_modules/uuid/dist/esm-browser/v4.js","webpack://openfin-web--web-layout/../../node_modules/uuid/dist/esm-browser/v5.js","webpack://openfin-web--web-layout/../../node_modules/uuid/dist/esm-browser/validate.js","webpack://openfin-web--web-layout/../../node_modules/uuid/dist/esm-browser/version.js","webpack://openfin-web--web-layout/webpack/bootstrap","webpack://openfin-web--web-layout/webpack/runtime/define property getters","webpack://openfin-web--web-layout/webpack/runtime/global","webpack://openfin-web--web-layout/webpack/runtime/hasOwnProperty shorthand","webpack://openfin-web--web-layout/webpack/runtime/make namespace object","webpack://openfin-web--web-layout/webpack/runtime/node module decorator","webpack://openfin-web--web-layout/./client/src/provider.ts"],"sourcesContent":["\"use strict\";var e=require(\"./main-8cad4070.js\");require(\"buffer/\"),require(\"uuid\"),require(\"events\"),require(\"lodash/cloneDeep\"),require(\"lodash/isEqual\"),exports.connect=e.connect;\n","\"use strict\";var e=require(\"buffer/\"),t=require(\"events\"),n=require(\"lodash/cloneDeep\"),i=require(\"lodash/isEqual\"),r=require(\"uuid\");const o=(e,t)=>`${t}<${btoa(JSON.stringify(e))}>`;var s=\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof window?window:\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:{},a={},c={},d={},h={};async function l(e){const t=[];for(const n of e){const e=await n();t.push(e)}return t}Object.defineProperty(h,\"__esModule\",{value:!0}),h.promiseMapSerial=h.serial=h.promiseMap=h.promisify=void 0,h.promisify=function(e){return(...t)=>new Promise(((n,i)=>{e(...t,((e,t)=>e?i(e):n(t)))}))},h.promiseMap=async function(e,t){return Promise.all(e.map(t))},h.serial=l,h.promiseMapSerial=async function(e,t){return l(e.map(((e,n,i)=>()=>t(e,n,i))))};var u,p=s&&s.__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},w=s&&s.__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)};Object.defineProperty(d,\"__esModule\",{value:!0}),d.Reply=d.EmitterBase=d.Base=void 0;const y=h;class f{constructor(e){this.isNodeEnvironment=()=>\"node\"===this.wire.environment.type,this.isOpenFinEnvironment=()=>\"openfin\"===this.wire.environment.type,this.isBrowserEnvironment=()=>\"other\"===this.wire.environment.type,this.wire=e}get fin(){return this.wire.getFin()}get me(){return this.wire.me}}d.Base=f;d.EmitterBase=class extends f{constructor(e,t,...n){super(e),this.topic=t,u.set(this,void 0),this.eventNames=()=>this.hasEmitter()?this.getOrCreateEmitter().eventNames():[],this.emit=(e,t,...n)=>!!this.hasEmitter()&&this.getOrCreateEmitter().emit(e,t,...n),this.hasEmitter=()=>this.wire.eventAggregator.has(w(this,u,\"f\")),this.getOrCreateEmitter=()=>this.wire.eventAggregator.getOrCreate(w(this,u,\"f\")),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[],this.listenerCount=e=>this.hasEmitter()?this.getOrCreateEmitter().listenerCount(e):0,this.registerEventListener=async(e,t={},n,i)=>{const r={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e},o=this.getOrCreateEmitter();n(o);try{await this.wire.sendAction(\"subscribe-to-desktop-event\",r)}catch(e){throw i(o),this.deleteEmitterIfNothingRegistered(o),e}},this.deregisterEventListener=async(e,t={})=>{if(this.hasEmitter()){const n={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e};await this.wire.sendAction(\"unsubscribe-to-desktop-event\",n).catch((()=>null));return this.getOrCreateEmitter()}return Promise.resolve()},p(this,u,[t,...n],\"f\"),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[]}async on(e,t,n){return await this.registerEventListener(e,n,(n=>{n.on(e,t)}),(n=>{n.removeListener(e,t)})),this}async addListener(e,t,n){return this.on(e,t,n)}async once(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.once(e,i),n.once(e,t)}),(n=>{n.removeListener(e,i),n.removeListener(e,t)})),this}async prependListener(e,t,n){return await this.registerEventListener(e,n,(n=>{n.prependListener(e,t)}),(n=>{n.removeListener(e,t)})),this}async prependOnceListener(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.prependOnceListener(e,t),n.once(e,i)}),(n=>{n.removeListener(e,t),n.removeListener(e,i)})),this}async removeListener(e,t,n){const i=await this.deregisterEventListener(e,n);return i&&(i.removeListener(e,t),this.deleteEmitterIfNothingRegistered(i)),this}async deregisterAllListeners(e){const t={...this.identity,type:e,topic:this.topic};if(this.hasEmitter()){const e=this.getOrCreateEmitter(),n=e.listenerCount(t.type),i=[];for(let e=0;enull)));return await Promise.all(i),e}}async removeAllListeners(e){const t=async e=>{const t=await this.deregisterAllListeners(e);t&&(t.removeAllListeners(e),this.deleteEmitterIfNothingRegistered(t))};if(e)await t(e);else if(this.hasEmitter()){const e=this.getOrCreateEmitter().eventNames();await(0,y.promiseMap)(e,t)}return this}deleteEmitterIfNothingRegistered(e){0===e.eventNames().length&&this.wire.eventAggregator.delete(w(this,u,\"f\"))}},u=new WeakMap;d.Reply=class{};var g={};Object.defineProperty(g,\"__esModule\",{value:!0});var m=g.RuntimeError=g.NotSupportedError=g.NotImplementedError=g.NoAckError=g.DuplicateCorrelationError=g.UnexpectedActionError=g.DisconnectedError=void 0;class v extends Error{constructor(e){super(`Expected websocket state OPEN but found ${e}`),this.readyState=e}}g.DisconnectedError=v;class C extends Error{}g.UnexpectedActionError=C;class b extends Error{}g.DuplicateCorrelationError=b;class I extends Error{}g.NoAckError=I;class E extends Error{}g.NotImplementedError=E;class x extends Error{}g.NotSupportedError=x;class A extends Error{constructor(e){const{message:t,name:n,stack:i,...r}=e;super(t),this.name=n||\"Error\",this.stack=i??this.toString(),Object.keys(r).forEach((e=>{this[e]=r[e]}))}}class P extends Error{static getCallSite(e=0){const t=Error.stackTraceLimit,n=e+1;Error.stackTraceLimit=t+n;const i=Error.prepareStackTrace;Error.prepareStackTrace=(e,t)=>t;const r=(new Error).stack?.slice(n)??[];return Error.prepareStackTrace=i,Error.stackTraceLimit=t,r}static prepareStackTrace(e,t){if(\"function\"==typeof Error.prepareStackTrace)return Error.prepareStackTrace(e,t);let n=\"\";n+=e.name||\"Error\",n+=`: ${e.message||\"\"}`;for(const e of t)n+=`\\n at ${e.toString()}`;return n}constructor(e,t){const{reason:n,error:i}=e;super(n),this.name=\"RuntimeError\",i?.stack&&(this.cause=new A(i)),t&&(this.stack=P.prepareStackTrace(this,t))}}m=g.RuntimeError=P;var M={},_={},O={};Object.defineProperty(O,\"__esModule\",{value:!0}),O.validateIdentity=void 0,O.validateIdentity=function(e){let t;return\"object\"==typeof e&&\"string\"==typeof e.uuid||(t=\"Not a valid identity object\"),t};var S={},R={},F={},j={},k={},L={},T={};Object.defineProperty(T,\"__esModule\",{value:!0}),T.handleDeprecatedWarnings=void 0;var $;T.handleDeprecatedWarnings=e=>{(e.contentNavigation?.whitelist||e.contentNavigation?.blacklist||e.contentRedirect?.whitelist||e.contentRedirect?.blacklist)&&console.warn(\"The properties 'whitelist' and 'blacklist' have been marked as deprecated and will be removed in a future version. Please use 'allowlist' and 'denylist'.\")};var B={},G={};Object.defineProperty(G,\"__esModule\",{value:!0}),G.AsyncRetryableLazy=W=G.Lazy=void 0;var W=G.Lazy=class{constructor(e){this.producerFn=e}getValue(){return this.value||(this.value=this.producerFn()),this.value}};G.AsyncRetryableLazy=class{constructor(e){this.producerFn=e}async getValue(){return this.promise||(this.promise=this.producerFn().catch((e=>{throw delete this.promise,e}))),this.promise}};var H={};Object.defineProperty(H,\"__esModule\",{value:!0}),H.WebContents=void 0;const N=d;class D extends N.EmitterBase{constructor(e,t,n){super(e,n,t.uuid,t.name),this.identity=t,this.entityType=n}capturePage(e){return this.wire.sendAction(\"capture-page\",{options:e,...this.identity}).then((({payload:e})=>e.data))}executeJavaScript(e){return this.wire.sendAction(\"execute-javascript-in-window\",{...this.identity,code:e}).then((({payload:e})=>e.data))}getZoomLevel(){return this.wire.sendAction(\"get-zoom-level\",this.identity).then((({payload:e})=>e.data))}setZoomLevel(e){return this.wire.sendAction(\"set-zoom-level\",{...this.identity,level:e}).then((()=>{}))}navigate(e){return this.wire.sendAction(\"navigate-window\",{...this.identity,url:e}).then((()=>{}))}navigateBack(){return this.wire.sendAction(\"navigate-window-back\",{...this.identity}).then((()=>{}))}async navigateForward(){await this.wire.sendAction(\"navigate-window-forward\",{...this.identity})}stopNavigation(){return this.wire.sendAction(\"stop-window-navigation\",{...this.identity}).then((()=>{}))}reload(e=!1){return this.wire.sendAction(\"reload-window\",{ignoreCache:e,...this.identity}).then((()=>{}))}print(e={}){return this.wire.sendAction(\"print\",{...this.identity,options:e}).then((()=>{}))}findInPage(e,t){return this.wire.sendAction(\"find-in-page\",{...this.identity,searchTerm:e,options:t}).then((({payload:e})=>e.data))}stopFindInPage(e){return this.wire.sendAction(\"stop-find-in-page\",{...this.identity,action:e}).then((()=>{}))}getPrinters(){return this.wire.sendAction(\"get-printers\",{...this.identity}).then((({payload:e})=>e.data))}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){await this.wire.sendAction(\"focus-window\",{emitSynthFocused:e,...this.identity})}async showDeveloperTools(){await this.wire.sendAction(\"show-developer-tools\",this.identity)}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction(\"get-process-info\",this.identity);return e}async getSharedWorkers(){return this.wire.sendAction(\"get-shared-workers\",this.identity).then((({payload:e})=>e.data))}async inspectSharedWorker(){await this.wire.sendAction(\"inspect-shared-worker\",{...this.identity})}async inspectSharedWorkerById(e){await this.wire.sendAction(\"inspect-shared-worker-by-id\",{...this.identity,workerId:e})}async inspectServiceWorker(){await this.wire.sendAction(\"inspect-service-worker\",{...this.identity})}async showPopupWindow(e){if(this.wire.sendAction(`${this.entityType}-show-popup-window`,this.identity).catch((()=>{})),e?.onPopupReady){const t=async({popupName:t})=>{try{const n=this.fin.Window.wrapSync({uuid:this.fin.me.uuid,name:t});await e.onPopupReady(n)}catch(e){throw new Error(`Something went wrong during onPopupReady execution: ${e}`)}};await this.once(\"popup-ready\",t)}const{payload:t}=await this.wire.sendAction(\"try-create-popup-window\",{options:{...e,hasResultCallback:!!e?.onPopupResult,hasReadyCallback:!!e?.onPopupReady},...this.identity}),{data:{willOpen:n,options:i}}=t;n&&await this.fin.Window.create(i.initialOptions);if(e?.onPopupResult){const t=async t=>{await e.onPopupResult((e=>{const{name:t,uuid:n,result:i,data:r}=e,o={identity:{name:t,uuid:n},result:i};return r&&(o.data=r),o})(t))},n=async()=>{await this.removeListener(\"popup-result\",t)};await this.on(\"popup-result\",t),await this.once(\"popup-teardown\",n)}const{payload:r}=await this.wire.sendAction(\"show-popup-window\",{options:i,...this.identity});return r.data}}var U,V,z,K,q;function J(){return V||(V=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(function(){if($)return L;$=1,Object.defineProperty(L,\"__esModule\",{value:!0}),L.ViewModule=void 0;const e=d,t=O,n=J(),i=T;class r extends e.Base{async create(e){const{uuid:t}=this.wire.me;if(!e.name||\"string\"!=typeof e.name)throw new Error(\"Please provide a name property as a string in order to create a View.\");return(0,i.handleDeprecatedWarnings)(e),this.wire.environment.childViews?await this.wire.environment.createChildContent({entityType:\"view\",options:{...e,uuid:t}}):await this.wire.sendAction(\"create-view\",{...e,uuid:t}),this.wrapSync({uuid:t,name:e.name})}async wrap(e){this.wire.sendAction(\"view-wrap\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}wrapSync(e){this.wire.sendAction(\"view-wrap-sync\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}getCurrent(){if(this.wire.sendAction(\"view-get-current\").catch((e=>{})),!this.wire.me.isView)throw new Error(\"You are not in a View context\");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction(\"view-get-current-sync\").catch((e=>{})),!this.wire.me.isView)throw new Error(\"You are not in a View context\");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return L.ViewModule=r,L}(),e),n(function(){if(U)return B;var e;U=1,Object.defineProperty(B,\"__esModule\",{value:!0}),B.View=void 0;const t=g,n=G,i=H,r=ie();class o extends i.WebContents{constructor(i,o){super(i,o,\"view\"),this.identity=o,e.set(this,new n.Lazy((()=>this.fin.Platform.wrapSync(this.identity).getClient()))),this.attach=async e=>{await this.wire.sendAction(\"attach-view\",{target:e,...this.identity})},this.destroy=async()=>{await this.wire.sendAction(\"destroy-view\",{...this.identity})},this.show=async()=>{await this.wire.sendAction(\"show-view\",{...this.identity})},this.showAt=async(e,t={})=>{await this.wire.sendAction(\"show-view-at\",{bounds:e,...this.identity,options:t})},this.bringToFront=async()=>{await this.wire.sendAction(\"bring-view-to-front\",{...this.identity})},this.hide=async()=>{await this.wire.sendAction(\"hide-view\",{...this.identity})},this.setBounds=async e=>{await this.wire.sendAction(\"set-view-bounds\",{bounds:e,...this.identity})},this.getBounds=async()=>(await this.wire.sendAction(\"get-view-bounds\",{...this.identity})).payload.data,this.getInfo=async()=>(await this.wire.sendAction(\"get-view-info\",{...this.identity})).payload.data,this.getParentLayout=async()=>(this.wire.sendAction(\"view-get-parent-layout\",{...this.identity}).catch((()=>{})),this.fin.Platform.Layout.getLayoutByViewIdentity(this.identity)),this.getOptions=async()=>this.wire.sendAction(\"get-view-options\",{...this.identity}).then((({payload:e})=>e.data)),this.updateOptions=async e=>this.wire.sendAction(\"update-view-options\",{options:e,...this.identity}).then((()=>{})),this.getCurrentWindow=async()=>{const{payload:{data:e}}=await this.wire.sendAction(\"get-view-window\",{...this.identity});return new r._Window(this.wire,e)},this.getCurrentStack=async()=>{this.wire.sendAction(\"view-get-current-stack\").catch((()=>{}));try{return(await this.getParentLayout()).getStackByViewIdentity(this.identity)}catch(e){throw new t.RuntimeError({reason:\"This view does not belong to a stack.\",error:e})}},this.triggerBeforeUnload=async()=>(await this.wire.sendAction(\"trigger-before-unload\",{...this.identity})).payload.data,this.bindToElement=async e=>{if(!e)throw new Error(\"Element not found.\");return this.wire.environment.observeBounds(e,(async e=>this.setBounds(e)))}}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){const t=await this.getCurrentWindow();await t.focusedWebViewWasChanged(),await super.focus({emitSynthFocused:e})}}return B.View=o,e=new WeakMap,B}(),e)}(k)),k}function Y(){if(z)return j;z=1,Object.defineProperty(j,\"__esModule\",{value:!0}),j.Application=void 0;const e=d,t=ie(),n=J();class i extends e.EmitterBase{constructor(e,n){super(e,\"application\",n.uuid),this.identity=n,this.window=new t._Window(this.wire,{uuid:this.identity.uuid,name:this.identity.uuid})}windowListFromIdentityList(e){const n=[];return e.forEach((e=>{n.push(new t._Window(this.wire,{uuid:e.uuid,name:e.name}))})),n}isRunning(){return this.wire.sendAction(\"is-application-running\",this.identity).then((({payload:e})=>e.data))}async quit(e=!1){try{await this._close(e),await this.wire.sendAction(\"destroy-application\",{force:e,...this.identity})}catch(e){if(![\"Remote connection has closed\",\"Could not locate the requested application\"].some((t=>e.message.includes(t))))throw e}}async _close(e=!1){try{await this.wire.sendAction(\"close-application\",{force:e,...this.identity})}catch(e){if(!e.message.includes(\"Remote connection has closed\"))throw e}}close(e=!1){return console.warn(\"Deprecation Warning: Application.close is deprecated Please use Application.quit\"),this.wire.sendAction(\"application-close\",this.identity).catch((e=>{})),this._close(e)}getChildWindows(){return this.wire.sendAction(\"get-child-windows\",this.identity).then((({payload:e})=>{const t=[];return e.data.forEach((e=>{t.push({uuid:this.identity.uuid,name:e})})),this.windowListFromIdentityList(t)}))}getManifest(){return this.wire.sendAction(\"get-application-manifest\",this.identity).then((({payload:e})=>e.data))}getParentUuid(){return this.wire.sendAction(\"get-parent-application\",this.identity).then((({payload:e})=>e.data))}getShortcuts(){return this.wire.sendAction(\"get-shortcuts\",this.identity).then((({payload:e})=>e.data))}async getViews(){const{payload:e}=await this.wire.sendAction(\"application-get-views\",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}getZoomLevel(){return this.wire.sendAction(\"get-application-zoom-level\",this.identity).then((({payload:e})=>e.data))}getWindow(){return this.wire.sendAction(\"application-get-window\",this.identity).catch((e=>{})),Promise.resolve(this.window)}registerUser(e,t){return this.wire.sendAction(\"register-user\",{userName:e,appName:t,...this.identity}).then((()=>{}))}removeTrayIcon(){return this.wire.sendAction(\"remove-tray-icon\",this.identity).then((()=>{}))}restart(){return this.wire.sendAction(\"restart-application\",this.identity).then((()=>{}))}run(){return console.warn(\"Deprecation Warning: Application.run is deprecated Please use fin.Application.start\"),this.wire.sendAction(\"application-run\",this.identity).catch((e=>{})),this._run()}_run(e={}){return this.wire.sendAction(\"run-application\",{manifestUrl:this._manifestUrl,opts:e,...this.identity}).then((()=>{}))}scheduleRestart(){return this.wire.sendAction(\"relaunch-on-close\",this.identity).then((()=>{}))}async sendApplicationLog(){const{payload:e}=await this.wire.sendAction(\"send-application-log\",this.identity);return e.data}async setJumpList(e){await this.wire.sendAction(\"set-jump-list\",{config:e,...this.identity})}setTrayIcon(e){return this.wire.sendAction(\"set-tray-icon\",{enabledIcon:e,...this.identity}).then((()=>{}))}setShortcuts(e){return this.wire.sendAction(\"set-shortcuts\",{data:e,...this.identity}).then((()=>{}))}async setShortcutQueryParams(e){await this.wire.sendAction(\"set-shortcut-query-args\",{data:e,...this.identity})}setZoomLevel(e){return this.wire.sendAction(\"set-application-zoom-level\",{level:e,...this.identity}).then((()=>{}))}async setAppLogUsername(e){await this.wire.sendAction(\"set-app-log-username\",{data:e,...this.identity})}getTrayIconInfo(){return this.wire.sendAction(\"get-tray-icon-info\",this.identity).then((({payload:e})=>e.data))}hasTrayIcon(){return this.wire.sendAction(\"has-tray-icon\",this.identity).then((({payload:e})=>e.data))}terminate(){return this.wire.sendAction(\"terminate-application\",this.identity).then((()=>{}))}wait(){return this.wire.sendAction(\"wait-for-hung-application\",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction(\"get-info\",this.identity).then((({payload:e})=>e.data))}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction(\"application-get-process-info\",this.identity);return e}async setFileDownloadLocation(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t};await this.wire.sendAction(\"set-file-download-location\",{...n,downloadLocation:e})}async getFileDownloadLocation(){const{payload:{data:e}}=await this.wire.sendAction(\"get-file-download-location\",this.identity);return e}async showTrayIconPopupMenu(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t},{payload:i}=await this.wire.sendAction(\"show-tray-icon-popup-menu\",{...n,options:e});return i.data}async closeTrayIconPopupMenu(){const{name:e}=this.wire.me,t={uuid:this.identity.uuid,name:e};await this.wire.sendAction(\"close-tray-icon-popup-menu\",{...t})}}return j.Application=i,j}function Z(){return q||(q=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(function(){if(K)return F;K=1,Object.defineProperty(F,\"__esModule\",{value:!0}),F.ApplicationModule=void 0;const e=d,t=O,n=Y();class i extends e.Base{async wrap(e){this.wire.sendAction(\"wrap-application\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}wrapSync(e){this.wire.sendAction(\"wrap-application-sync\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}async _create(e){return void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&void 0===e.isPlatformController&&(e.autoShow=!0),await this.wire.sendAction(\"create-application\",e),this.wrap({uuid:e.uuid})}create(e){return console.warn(\"Deprecation Warning: fin.Application.create is deprecated. Please use fin.Application.start\"),this.wire.sendAction(\"application-create\").catch((e=>{})),this._create(e)}async start(e){this.wire.sendAction(\"start-application\").catch((e=>{}));const t=await this._create(e);return await this.wire.sendAction(\"run-application\",{uuid:e.uuid}),t}async startManyManifests(e,t){return this.wire.sendAction(\"run-applications\",{applications:e,opts:t}).then((()=>{}))}getCurrent(){return this.wire.sendAction(\"get-current-application\").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction(\"get-current-application-sync\").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}async startFromManifest(e,t){this.wire.sendAction(\"application-start-from-manifest\").catch((e=>{}));const n=await this._createFromManifest(e);return await n._run(t),n}createFromManifest(e){return console.warn(\"Deprecation Warning: fin.Application.createFromManifest is deprecated. Please use fin.Application.startFromManifest\"),this.wire.sendAction(\"application-create-from-manifest\").catch((e=>{})),this._createFromManifest(e)}_createFromManifest(e){return this.wire.sendAction(\"get-application-manifest\",{manifestUrl:e}).then((({payload:e})=>{const t=e.data.platform?e.data.platform.uuid:e.data.startup_app.uuid;return this.wrap({uuid:t})})).then((t=>(t._manifestUrl=e,t)))}}return F.ApplicationModule=i,F}(),e),n(Y(),e)}(R)),R}H.WebContents=D;var Q={};Object.defineProperty(Q,\"__esModule\",{value:!0}),Q.promisifySubscription=void 0;var X,ee,te;function ne(){if(X)return S;X=1,Object.defineProperty(S,\"__esModule\",{value:!0}),S._Window=void 0;const e=Z(),t=H,n=J(),i=T,r=Q;class o extends t.WebContents{constructor(e,t){super(e,t,\"window\")}async createWindow(e){this.wire.sendAction(\"window-create-window\",this.identity).catch((e=>{}));const t=await(0,r.promisifySubscription)(this,\"fire-constructor-callback\");void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&(e.autoShow=!0),(0,i.handleDeprecatedWarnings)(e);const n=this.wire.environment.createChildContent({entityType:\"window\",options:e}),[o]=await Promise.all([t.getValue(),n]);let s;const{success:a}=o,c=o.data,{message:d}=c;s=a?{httpResponseCode:c.httpResponseCode,apiInjected:c.apiInjected}:{message:c.message,networkErrorCode:c.networkErrorCode,stack:c.stack};const h={message:d,cbPayload:s,success:a};try{this.getWebWindow().fin.__internal_.openerSuccessCBCalled()}catch(e){}return h.success?this:Promise.reject(h)}getAllFrames(){return this.wire.sendAction(\"get-all-frames\",this.identity).then((({payload:e})=>e.data))}getBounds(){return this.wire.sendAction(\"get-window-bounds\",this.identity).then((({payload:e})=>e.data))}center(){return this.wire.sendAction(\"center-window\",this.identity).then((()=>{}))}blur(){return this.wire.sendAction(\"blur-window\",this.identity).then((()=>{}))}bringToFront(){return this.wire.sendAction(\"bring-window-to-front\",this.identity).then((()=>{}))}animate(e,t){return this.wire.sendAction(\"animate-window\",{transitions:e,options:t,...this.identity}).then((()=>{}))}hide(){return this.wire.sendAction(\"hide-window\",this.identity).then((()=>{}))}close(e=!1){return this.wire.sendAction(\"close-window\",{force:e,...this.identity}).then((()=>{Object.setPrototypeOf(this,null)}))}focusedWebViewWasChanged(){return this.wire.sendAction(\"focused-webview-changed\",this.identity).then((()=>{}))}getNativeId(){return this.wire.sendAction(\"get-window-native-id\",this.identity).then((({payload:e})=>e.data))}async getCurrentViews(){const{payload:e}=await this.wire.sendAction(\"window-get-views\",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}disableFrame(){return console.warn(\"Function is deprecated; use disableUserMovement instead.\"),this.wire.sendAction(\"disable-window-frame\",this.identity).then((()=>{}))}disableUserMovement(){return this.wire.sendAction(\"disable-window-frame\",this.identity).then((()=>{}))}enableFrame(){return console.warn(\"Function is deprecated; use enableUserMovement instead.\"),this.wire.sendAction(\"enable-window-frame\",this.identity).then((()=>{}))}enableUserMovement(){return this.wire.sendAction(\"enable-window-frame\",this.identity).then((()=>{}))}flash(){return this.wire.sendAction(\"flash-window\",this.identity).then((()=>{}))}stopFlashing(){return this.wire.sendAction(\"stop-flash-window\",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction(\"get-window-info\",this.identity).then((({payload:e})=>e.data))}async getLayout(e){this.wire.sendAction(\"window-get-layout\",this.identity).catch((e=>{}));const t=await this.getOptions();if(!t.layout&&!t.layoutSnapshot)throw new Error(\"Window does not have a Layout\");return this.fin.Platform.Layout.wrap(e??this.identity)}getOptions(){return this.wire.sendAction(\"get-window-options\",this.identity).then((({payload:e})=>e.data))}getParentApplication(){return this.wire.sendAction(\"window-get-parent-application\",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity))}getParentWindow(){return this.wire.sendAction(\"window-get-parent-window\",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity)).then((e=>e.getWindow()))}async getSnapshot(e){const t={area:e,...this.identity};console.warn(\"Window.getSnapshot has been deprecated, please use Window.capturePage\");return(await this.wire.sendAction(\"get-window-snapshot\",t)).payload.data}getState(){return this.wire.sendAction(\"get-window-state\",this.identity).then((({payload:e})=>e.data))}getWebWindow(){return this.wire.sendAction(\"window-get-web-window\",this.identity).catch((e=>{})),this.wire.environment.getWebWindow(this.identity)}isMainWindow(){return this.wire.sendAction(\"window-is-main-window\",this.identity).catch((e=>{})),this.me.uuid===this.me.name}isShowing(){return this.wire.sendAction(\"is-window-showing\",this.identity).then((({payload:e})=>e.data))}maximize(){return this.wire.sendAction(\"maximize-window\",this.identity).then((()=>{}))}minimize(){return this.wire.sendAction(\"minimize-window\",this.identity).then((()=>{}))}moveBy(e,t,n){return this.wire.sendAction(\"move-window-by\",{deltaLeft:e,deltaTop:t,positioningOptions:n,...this.identity}).then((()=>{}))}moveTo(e,t,n){return this.wire.sendAction(\"move-window\",{left:e,top:t,positioningOptions:n,...this.identity}).then((()=>{}))}resizeBy(e,t,n,i){return this.wire.sendAction(\"resize-window-by\",{deltaWidth:Math.floor(e),deltaHeight:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}resizeTo(e,t,n,i){return this.wire.sendAction(\"resize-window\",{width:Math.floor(e),height:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}restore(){return this.wire.sendAction(\"restore-window\",this.identity).then((()=>{}))}setAsForeground(){return this.wire.sendAction(\"set-foreground-window\",this.identity).then((()=>{}))}setBounds(e,t){return this.wire.sendAction(\"set-window-bounds\",{...e,...this.identity,positioningOptions:t}).then((()=>{}))}show(e=!1){return this.wire.sendAction(\"show-window\",{force:e,...this.identity}).then((()=>{}))}showAt(e,t,n=!1){return this.wire.sendAction(\"show-at-window\",{force:n,left:Math.floor(e),top:Math.floor(t),...this.identity}).then((()=>{}))}updateOptions(e){return this.wire.sendAction(\"update-window-options\",{options:e,...this.identity}).then((()=>{}))}authenticate(e,t){return this.wire.sendAction(\"window-authenticate\",{userName:e,password:t,...this.identity}).then((()=>{}))}async showPopupMenu(e){const{payload:t}=await this.wire.sendAction(\"show-popup-menu\",{options:e,...this.identity});return t.data}async closePopupMenu(){return this.wire.sendAction(\"close-popup-menu\",{...this.identity}).then((()=>{}))}async dispatchPopupResult(e){this.wire.sendAction(\"window-dispatch-popup-result\",this.identity).catch((e=>{})),await this.wire.sendAction(\"dispatch-popup-result\",{data:e,...this.identity})}async print(e={content:\"self\"}){switch(e.content){case void 0:case\"self\":return super.print(e);case\"screenshot\":return this.wire.sendAction(\"print-screenshot\",this.identity).then((()=>{}));case\"views\":return this.wire.sendAction(\"print-views\",{...this.identity,options:e}).then((()=>{}));default:return}}}return S._Window=o,S}function ie(){return te||(te=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(function(){if(ee)return _;ee=1,Object.defineProperty(_,\"__esModule\",{value:!0}),_._WindowModule=void 0;const e=d,t=O,n=ne();class i extends e.Base{async wrap(e){this.wire.sendAction(\"window-wrap\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}wrapSync(e){this.wire.sendAction(\"window-wrap-sync\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}create(e){return this.wire.sendAction(\"create-window\").catch((e=>{})),new n._Window(this.wire,{uuid:this.me.uuid,name:e.name}).createWindow(e)}getCurrent(){if(this.wire.sendAction(\"get-current-window\").catch((e=>{})),!this.wire.me.isWindow)throw new Error(\"You are not in a Window context\");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction(\"get-current-window-sync\").catch((e=>{})),!this.wire.me.isWindow)throw new Error(\"You are not in a Window context\");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return _._WindowModule=i,_}(),e),n(ne(),e)}(M)),M}Q.promisifySubscription=async(e,t,n=(()=>!0),i)=>{let r,o,s;const a=new Promise(((e,t)=>{r=e,o=t})),c=e=>{n(e)&&(clearTimeout(s),r(e))};return await e.on(t,c),i&&(s=setTimeout((()=>o(new Error(\"event timed out\"))),i)),a.finally((()=>{e.removeListener(t,c).catch((()=>null))})),{getValue:()=>a}},Object.defineProperty(c,\"__esModule\",{value:!0}),c.System=void 0;const re=d,oe=g,se=ie(),ae=t;class ce extends re.EmitterBase{constructor(e){super(e,\"system\")}sendExternalProcessRequest(e,t){return new Promise(((n,i)=>{const r=\"external-process-exited\";let o,s,a,c;\"function\"==typeof t.listener&&(a=e=>{const n=e||{};s={topic:\"exited\",uuid:n.processUuid||\"\",exitCode:n.exitCode||0},o===e.processUuid&&(t.listener(s),c.removeListener(r,a))},this.wire.me.name||(this.wire.me.name=this.wire.me.uuid),c=new se._Window(this.wire,this.wire.me),c.on(r,a)),this.wire.sendAction(e,t).then((({payload:e})=>{o=e.data.uuid,n(e.data),s&&o===s.uuid&&(t.listener(s),c.removeListener(r,a))})).catch((e=>{c&&c.removeListener(r,a),i(e)}))}))}getVersion(){return this.wire.sendAction(\"get-version\").then((({payload:e})=>e.data))}clearCache(e){return this.wire.sendAction(\"clear-cache\",e).then((()=>{}))}deleteCacheOnExit(){return this.wire.sendAction(\"delete-cache-request\").then((()=>{}))}exit(){return this.wire.sendAction(\"exit-desktop\").then((()=>{}))}async fetchManifest(e){const{payload:{data:t}}=await this.wire.sendAction(\"fetch-manifest\",{manifestUrl:e});return t}flushCookieStore(){return this.wire.sendAction(\"flush-cookie-store\").then((()=>{}))}getAllWindows(){return this.wire.sendAction(\"get-all-windows\").then((({payload:e})=>e.data))}getAllApplications(){return this.wire.sendAction(\"get-all-applications\").then((({payload:e})=>e.data))}getCommandLineArguments(){return this.wire.sendAction(\"get-command-line-arguments\").then((({payload:e})=>e.data))}async getCrashReporterState(){const{payload:{data:{diagnosticMode:e,isRunning:t}}}=await this.wire.sendAction(\"get-crash-reporter-state\");return console.warn(\"diagnosticMode property is deprecated. It will be removed in a future version\"),{diagnosticMode:e,diagnosticsMode:e,isRunning:t}}async startCrashReporter(e){const t=e,n={...t,diagnosticMode:t.diagnosticsMode||t.diagnosticMode},{payload:{data:{diagnosticMode:i,isRunning:r}}}=await this.wire.sendAction(\"start-crash-reporter\",n);return{diagnosticMode:i,diagnosticsMode:i,isRunning:r}}getUniqueUserId(){return this.wire.sendAction(\"get-unique-user-id\").then((({payload:e})=>e.data))}getEntityInfo(e,t){return this.wire.sendAction(\"get-entity-info\",{uuid:e,name:t}).then((({payload:e})=>e.data))}getEnvironmentVariable(e){return this.wire.sendAction(\"get-environment-variable\",{environmentVariables:e}).then((({payload:e})=>e.data))}getFocusedWindow(){return this.wire.sendAction(\"get-focused-window\").then((({payload:e})=>e.data))}async isAppCertified(e){const{payload:{data:{certifiedInfo:t}}}=await this.wire.sendAction(\"is-app-certified\",{manifestUrl:e});return t}getInstalledRuntimes(){return this.wire.sendAction(\"get-installed-runtimes\").then((({payload:e})=>e.data.runtimes))}async getInstalledApps(){const{payload:{data:{installedApps:e}}}=await this.wire.sendAction(\"get-installed-apps\");return e}getLog(e){return this.wire.sendAction(\"view-log\",e).then((({payload:e})=>e.data))}getMachineId(){return this.wire.sendAction(\"get-machine-id\").then((({payload:e})=>e.data))}getMinLogLevel(){return this.wire.sendAction(\"get-min-log-level\").then((({payload:e})=>e.data))}getLogList(){return this.wire.sendAction(\"list-logs\").then((({payload:e})=>e.data))}getMonitorInfo(){return this.wire.sendAction(\"get-monitor-info\").then((({payload:e})=>e.data))}getMousePosition(){return this.wire.sendAction(\"get-mouse-position\").then((({payload:e})=>e.data))}getProcessList(){return console.warn(\"System.getProcessList has been deprecated. Please consider using our new process APIs: Window.getProcessInfo, View.getProcessInfo, Application.getProcessInfo, System.getAllProcessInfo\"),this.wire.sendAction(\"process-snapshot\").then((({payload:e})=>e.data))}async getAllProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction(\"get-all-process-info\",this.identity);return e}getProxySettings(){return this.wire.sendAction(\"get-proxy-settings\").then((({payload:e})=>e.data))}getRuntimeInfo(){return this.wire.sendAction(\"get-runtime-info\").then((({payload:e})=>e.data))}getRvmInfo(){return this.wire.sendAction(\"get-rvm-info\").then((({payload:e})=>e.data))}getHostSpecs(){return this.wire.sendAction(\"get-host-specs\").then((({payload:e})=>e.data))}getOSInfo(){return this.wire.sendAction(\"get-os-info\").then((({payload:e})=>e.data))}launchExternalProcess(e){return this.sendExternalProcessRequest(\"launch-external-process\",e)}monitorExternalProcess(e){return this.sendExternalProcessRequest(\"monitor-external-process\",e)}log(e,t){return this.wire.sendAction(\"write-to-log\",{level:e,message:t}).then((()=>{}))}openUrlWithBrowser(e){return this.wire.sendAction(\"open-url-with-browser\",{url:e}).then((()=>{}))}async registerCustomProtocol(e){if(\"object\"!=typeof e)throw new Error(\"Must provide an object with a `protocolName` property having a string value.\");await this.wire.sendAction(\"register-custom-protocol\",e)}async unregisterCustomProtocol(e){await this.wire.sendAction(\"unregister-custom-protocol\",{protocolName:e})}async getCustomProtocolState(e){return this.wire.sendAction(\"get-custom-protocol-state\",{protocolName:e}).then((({payload:e})=>e.data))}releaseExternalProcess(e){return this.wire.sendAction(\"release-external-process\",{uuid:e}).then((()=>{}))}showDeveloperTools(e){return this.wire.sendAction(\"show-developer-tools\",e).then((()=>{}))}terminateExternalProcess(e){return this.wire.sendAction(\"terminate-external-process\",e).then((()=>{}))}updateProxySettings(e){return this.wire.sendAction(\"update-proxy\",e).then((()=>{}))}async downloadAsset(e,t){const n=()=>{};let i=n,r=n;const o=new Promise(((e,t)=>{i=e,r=t}));if(\"openfin\"!==this.wire.environment.type)throw new oe.NotSupportedError(\"downloadAsset only supported in an OpenFin Render process\");const s=oe.RuntimeError.getCallSite(),a=this.wire.environment.getNextMessageId().toString(),c=`asset-download-progress-${a}`,d=`asset-download-error-${a}`,h=`asset-download-complete-${a}`,l=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},u=()=>{this.removeListener(c,l)};await Promise.all([this.on(c,l),this.once(d,(e=>{u();const{reason:t,err:n}=e;r(new oe.RuntimeError({reason:t,error:n},s))})),this.once(h,(()=>{u(),i()}))]);const p=Object.assign(e,{downloadId:a});return await this.wire.sendAction(\"download-asset\",p).catch((e=>{throw u(),e})),o}downloadRuntime(e,t){const n=oe.RuntimeError.getCallSite();return new Promise(((i,r)=>{if(\"openfin\"!==this.wire.environment.type)return void r(new oe.NotSupportedError(\"downloadRuntime only supported in an OpenFin Render process\"));const o=this.wire.environment.getNextMessageId().toString(),s=`runtime-download-progress-${o}`,a=`runtime-download-error-${o}`,c=`runtime-download-complete-${o}`,d=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},h=()=>{this.removeListener(s,d)};this.on(s,d),this.once(a,(e=>{h();const{reason:t,err:i}=e;r(new oe.RuntimeError({reason:t,error:i},n))})),this.once(c,(()=>{h(),i()}));const l=Object.assign(e,{downloadId:o});this.wire.sendAction(\"download-runtime\",l).catch((e=>{h(),r(e)}))}))}downloadPreloadScripts(e){return this.wire.sendAction(\"download-preload-scripts\",{scripts:e}).then((({payload:e})=>e.data))}getAllExternalApplications(){return this.wire.sendAction(\"get-all-external-applications\").then((({payload:e})=>e.data))}getAppAssetInfo(e){return this.wire.sendAction(\"get-app-asset-info\",e).then((({payload:e})=>e.data))}getCookies(e){const t=this.wire.environment.getUrl(),n=Object.assign(e,{url:t});return this.wire.sendAction(\"get-cookies\",n).then((({payload:e})=>e.data))}setMinLogLevel(e){return this.wire.sendAction(\"set-min-log-level\",{level:e}).then((()=>{}))}resolveUuid(e){return this.wire.sendAction(\"resolve-uuid\",{entityKey:e}).then((({payload:e})=>e.data))}executeOnRemote(e,t){return t.requestingIdentity=e,this.wire.ferryAction(t)}readRegistryValue(e,t,n){return this.wire.sendAction(\"read-registry-value\",{rootKey:e,subkey:t,value:n}).then((({payload:e})=>e.data))}registerExternalConnection(e){return this.wire.sendAction(\"register-external-connection\",{uuid:e}).then((({payload:e})=>e.data))}async getServiceConfiguration(e){if(\"string\"!=typeof e.name)throw new Error(\"Must provide an object with a `name` property having a string value\");const{name:t}=e;return this.wire.sendAction(\"get-service-configuration\",{name:t}).then((({payload:e})=>e.data))}async getSystemAppConfig(e){if(\"string\"!=typeof e)throw new Error(\"Must provide a string value for name of system app\");return this.wire.sendAction(\"get-system-app-configuration\",{name:e}).then((({payload:e})=>e.data))}async registerShutdownHandler(e){this.wire.sendAction(\"system-register-shutdown-handler\").catch((e=>{}));const{uuid:t,name:n}=this.wire.me;this.on(\"system-shutdown\",(i=>{e({proceed:()=>{this.wire.environment.raiseEvent(\"application/system-shutdown-handled\",{uuid:t,name:n,topic:\"application\"})}})}))}runRvmHealthCheck(){return this.wire.sendAction(\"run-rvm-health-check\").then((({payload:e})=>e.data))}async launchManifest(e,t={}){const{subscribe:n,...i}=t,r=i;if(n){const e=new ae.EventEmitter;n(e);const t=\"app-version-progress\",i=\"runtime-status\",o=\"app-version-complete\",s=\"app-version-error\",a=this.wire.environment.getNextMessageId().toString();r.appVersionId=a;const c=[o,t,i,s],d=e=>{const{appVersionId:t,topic:n,type:i,...r}=e;return{...r,type:c.find((e=>i.includes(e)))}},h=t=>{const n=d(t);e.emit(n.type,n)},l=()=>{this.removeListener(`${t}.${a}`,h),this.removeListener(`${i}.${a}`,h),this.removeListener(`${o}.${a}`,h),this.removeListener(`${s}.${a}`,h),this.removeListener(`${o}.${a}`,l),this.removeListener(`${s}.${a}`,l)};await Promise.all([this.on(`${t}.${a}`,h),this.on(`${i}.${a}`,h),this.once(`${o}.${a}`,h),this.once(`${s}.${a}`,h),this.once(`${o}.${a}`,l),this.once(`${s}.${a}`,l)])}return(await this.wire.sendAction(\"launch-manifest\",{manifestUrl:e,opts:r})).payload.data.manifest}async queryPermissionForCurrentContext(e){const t={uuid:this.wire.me.uuid,name:this.wire.me.name};return(await this.wire.sendAction(\"query-permission-for-current-context\",{apiName:e,identity:t})).payload.data}async enableNativeWindowIntegrationProvider(e){const{payload:t}=await this.wire.sendAction(\"enable-native-window-integration-provider\",{permissions:e});return t.data}async registerUsage({data:e,type:t}){await this.wire.sendAction(\"register-usage\",{data:e,type:t})}async getPrinters(){const{payload:e}=await this.wire.sendAction(\"system-get-printers\");return e.data}async updateProcessLoggingOptions(e){await this.wire.sendAction(\"system-update-process-logging-options\",{options:e})}async getDomainSettings(){const{payload:{data:e}}=await this.wire.sendAction(\"get-domain-settings\",this.identity);return e}async setDomainSettings(e){await this.wire.sendAction(\"set-domain-settings\",{domainSettings:e,...this.identity})}async refreshExtensions(){const{payload:e}=await this.wire.sendAction(\"refresh-extensions\");return e.data}async getInstalledExtensions(){const{payload:e}=await this.wire.sendAction(\"get-installed-extensions\");return e.data}}c.System=ce;var de={},he={};Object.defineProperty(he,\"__esModule\",{value:!0}),he.RefCounter=void 0;he.RefCounter=class{constructor(){this.topicRefMap=new Map}incRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t+1;n=i,this.topicRefMap.set(e,i)}else this.topicRefMap.set(e,1),n=1;return n}decRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t-1;this.topicRefMap.set(e,i),n=i}else n=-1;return n}actOnFirst(e,t,n){return 1===this.incRefCount(e)?t():n()}actOnLast(e,t,n){return 0===this.decRefCount(e)?t():n()}};var le={},ue={},pe={};Object.defineProperty(pe,\"__esModule\",{value:!0}),pe.ChannelBase=pe.ProtectedItems=void 0;const we=e=>async(t,n,i)=>{const r=await e(t,n,i);return void 0===r?n:r};pe.ProtectedItems=class{constructor(e,t){this.providerIdentity=e,this.close=t}};class ye{static defaultAction(e){throw new Error(`No action registered at target for ${e}`)}constructor(){this.subscriptions=new Map}async processAction(e,t,n){try{const i=this.subscriptions.has(e)?this.subscriptions.get(e):(t,n)=>(this.defaultAction??ye.defaultAction)(e,t,n),r=this.preAction?await this.preAction(e,t,n):t,o=await i(r,n);return this.postAction?await this.postAction(e,o,n):o}catch(t){if(this.errorMiddleware)return this.errorMiddleware(e,t,n);throw t}}beforeAction(e){if(this.preAction)throw new Error(\"Already registered beforeAction middleware\");this.preAction=we(e)}onError(e){if(this.errorMiddleware)throw new Error(\"Already registered error middleware\");this.errorMiddleware=e}afterAction(e){if(this.postAction)throw new Error(\"Already registered afterAction middleware\");this.postAction=we(e)}remove(e){this.subscriptions.delete(e)}setDefaultAction(e){if(this.defaultAction)throw new Error(\"default action can only be set once\");this.defaultAction=e}register(e,t){if(this.subscriptions.has(e))throw new Error(`Subscription already registered for action: ${e}. Unsubscribe before adding new subscription`);return this.subscriptions.set(e,t),!0}}pe.ChannelBase=ye;var fe,ge,me,ve=s&&s.__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)},Ce=s&&s.__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};Object.defineProperty(ue,\"__esModule\",{value:!0}),ue.ChannelClient=void 0;const be=pe,Ie=new Map;class Ee extends be.ChannelBase{static closeChannelByEndpointId(e){const t=Ie.get(e);t&&ve(t,me,\"f\").call(t)}static handleProviderDisconnect(e){for(const t of Ie.values())t.providerIdentity.channelId===e.channelId&&(t.disconnectListener(e),ve(t,me,\"f\").call(t))}constructor(e,t,n){super(),fe.set(this,void 0),ge.set(this,void 0),this.processAction=(e,t,n)=>super.processAction(e,t,n),me.set(this,(()=>{Ie.delete(this.endpointId),ve(this,ge,\"f\").close()})),Ce(this,fe,new be.ProtectedItems(e,t),\"f\"),this.disconnectListener=()=>{},this.endpointId=e.endpointId,Ce(this,ge,n,\"f\"),Ie.set(this.endpointId,this),n.receive(this.processAction)}get providerIdentity(){return ve(this,fe,\"f\").providerIdentity}async dispatch(e,t){if(ve(this,ge,\"f\").isEndpointConnected(this.providerIdentity.channelId))return ve(this,ge,\"f\").send(this.providerIdentity.channelId,e,t);throw new Error(\"The client you are trying to dispatch from is disconnected from the target provider.\")}onDisconnection(e){this.disconnectListener=t=>{try{e(t)}catch(e){throw new Error(`Error while calling the onDisconnection callback: ${e.message}`)}finally{this.disconnectListener=()=>{}}}}async disconnect(){await this.sendDisconnectAction(),ve(this,me,\"f\").call(this)}async sendDisconnectAction(){const e=ve(this,fe,\"f\");await e.close()}static async wireClose(e,t,n){const{channelName:i,uuid:r,name:o}=t;await e.sendAction(\"disconnect-from-channel\",{channelName:i,uuid:r,name:o,endpointId:n})}}ue.ChannelClient=Ee,fe=new WeakMap,ge=new WeakMap,me=new WeakMap;var xe={},Ae={};Object.defineProperty(Ae,\"__esModule\",{value:!0}),Ae.exhaustiveCheck=void 0,Ae.exhaustiveCheck=function(e,t){throw new Error(`Unsupported value: ${e}${t?`\\n Supported values are: ${t.join(\"\")}`:\"\"}`)};var Pe,Me,_e,Oe={},Se=s&&s.__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},Re=s&&s.__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)};Object.defineProperty(Oe,\"__esModule\",{value:!0}),Oe.ClassicInfo=Oe.ClassicStrategy=void 0;Oe.ClassicStrategy=class{constructor(e,t,n,i){this.messageReceiver=t,this.endpointId=n,this.providerIdentity=i,Pe.set(this,void 0),Me.set(this,new Map),_e.set(this,new Map),this.send=async(e,t,n)=>{const i=Re(this,Me,\"f\").get(e);if(!i)throw new Error(`Could not locate routing info for endpoint ${e}`);const r={...i};r.isLocalEndpointId&&delete r.endpointId,delete r.isLocalEndpointId;const o=Re(this,Pe,\"f\").sendAction(\"send-channel-message\",{...r,providerIdentity:this.providerIdentity,action:t,payload:n});Re(this,_e,\"f\").get(e)?.add(o);return(await o.catch((e=>{throw new Error(e.message)})).finally((()=>{Re(this,_e,\"f\").get(e)?.delete(o)}))).payload.data.result},this.close=async()=>{this.messageReceiver.removeEndpoint(this.providerIdentity.channelId,this.endpointId),[...Re(this,Me,\"f\").keys()].forEach((e=>this.closeEndpoint(e))),Se(this,Me,new Map,\"f\")},Se(this,Pe,e,\"f\")}onEndpointDisconnect(e,t){}receive(e){this.messageReceiver.addEndpoint(e,this.providerIdentity.channelId,this.endpointId)}async closeEndpoint(e){const t=Re(this,Me,\"f\").get(e);Re(this,Me,\"f\").delete(e);const n=Re(this,_e,\"f\").get(e);n?.forEach((n=>{const i=`Channel connection with identity uuid: ${t?.uuid} / name: ${t?.name} / endpointId: ${e} no longer connected.`;n.cancel(new Error(i))}))}isEndpointConnected(e){return Re(this,Me,\"f\").has(e)}addEndpoint(e,t){Re(this,Me,\"f\").set(e,t.endpointIdentity),Re(this,_e,\"f\").set(e,new Set)}isValidEndpointPayload(e){return\"string\"==typeof e?.endpointIdentity?.endpointId||\"string\"==typeof e?.endpointIdentity?.channelId}},Pe=new WeakMap,Me=new WeakMap,_e=new WeakMap,Oe.ClassicInfo={version:5,minimumVersion:0,type:\"classic\"};var Fe={},je={},ke={};Object.defineProperty(ke,\"__esModule\",{value:!0}),ke.errorToPOJO=void 0,ke.errorToPOJO=function(e){return{stack:e.stack,name:e.name,message:e.message,toString:()=>e.stack||e.toString()}};var Le,Te,$e=s&&s.__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)},Be=s&&s.__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};Object.defineProperty(je,\"__esModule\",{value:!0}),je.RTCEndpoint=void 0;const Ge=ke;je.RTCEndpoint=class{static isValidEndpointPayload(e){const t=e=>\"object\"==typeof e&&null!==e;return t(e)&&t(e.endpointIdentity)&&t(e.rtc)&&\"string\"==typeof e.endpointIdentity.endpointId}constructor({rtc:e,endpointIdentity:t}){this.responseMap=new Map,Le.set(this,null),Te.set(this,void 0),this.connectionStateChangeHandler=e=>{\"connected\"!==this.rtc.rtcClient.connectionState&&(this.rtc.rtcClient.removeEventListener(\"connectionstatechange\",this.connectionStateChangeHandler),this.close(),$e(this,Te,\"f\")&&$e(this,Te,\"f\").call(this))},this.send=async(e,t)=>{const n=`message-${Math.random()}`,i=new Promise(((e,t)=>{this.responseMap.set(n,{resolve:e,reject:t})}));return this.rtc.channels.request.send(JSON.stringify({action:e,payload:t,messageId:n})),i},this.close=()=>{this.responseMap.forEach((e=>e.reject(\"Connection has closed.\"))),this.responseMap=new Map,this.rtc.channels.request.close(),this.rtc.channels.response.close(),this.rtc.rtcClient.close()},this.rtc=e,this.endpointIdentity=t,this.rtc.channels.response.addEventListener(\"message\",(e=>{let{data:t}=e;e.data instanceof ArrayBuffer&&(t=(new TextDecoder).decode(e.data));const{messageId:n,payload:i,success:r,error:o}=JSON.parse(t),{resolve:s,reject:a}=this.responseMap.get(n)??{};s&&a?(this.responseMap.delete(n),r?s(i):a(o)):(console.log(\"Could not find id in responseMap.\"),console.log(e))})),this.rtc.channels.request.addEventListener(\"message\",(async e=>{let{data:n}=e;e.data instanceof ArrayBuffer&&(n=(new TextDecoder).decode(e.data));const{messageId:i,action:r,payload:o}=JSON.parse(n);if($e(this,Le,\"f\"))try{const e=await $e(this,Le,\"f\").call(this,r,o,t);this.rtc.channels.response.send(JSON.stringify({messageId:i,payload:e,success:!0}))}catch(e){\"open\"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,error:(0,Ge.errorToPOJO)(e),success:!1}))}else\"open\"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,success:!1,error:\"Connection not ready.\"}))})),this.rtc.rtcClient.addEventListener(\"connectionstatechange\",this.connectionStateChangeHandler),Object.values(this.rtc.channels).forEach((e=>{e.onclose=e=>{[...this.responseMap.values()].forEach((e=>e.reject(new Error(\"RTCDataChannel closed unexpectedly, this is most commonly caused by message size. Note: RTC Channels have a message size limit of ~255kB.\")))),this.close(),$e(this,Te,\"f\")&&$e(this,Te,\"f\").call(this)}}))}onDisconnect(e){if($e(this,Te,\"f\"))throw new Error(\"RTCEndpoint disconnectListener cannot be set twice.\");Be(this,Te,e,\"f\")}receive(e){if($e(this,Le,\"f\"))throw new Error(\"You have already set a listener for this RTC Endpoint.\");Be(this,Le,e,\"f\")}get connected(){return\"connected\"===this.rtc.rtcClient.connectionState}},Le=new WeakMap,Te=new WeakMap;var We,He,Ne,De={},Ue=s&&s.__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)},Ve=s&&s.__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};Object.defineProperty(De,\"__esModule\",{value:!0}),De.EndpointStrategy=void 0;De.EndpointStrategy=class{constructor(e,t,n){this.EndpointType=e,this.StrategyName=n,We.set(this,null),He.set(this,new Map),Ne.set(this,!0),this.send=async(e,t,n)=>this.getEndpointById(e).send(t,n),this.close=async()=>{Ue(this,Ne,\"f\")&&(Ue(this,He,\"f\").forEach((e=>e.close())),Ve(this,He,new Map,\"f\")),Ve(this,Ne,!1,\"f\")},this.isValidEndpointPayload=t}onEndpointDisconnect(e,t){this.getEndpointById(e).onDisconnect(t)}receive(e){if(Ue(this,We,\"f\"))throw new Error(`You have already set a listener for this ${this.StrategyName} Strategy`);Ve(this,We,e,\"f\"),Ue(this,He,\"f\").forEach((e=>e.receive(Ue(this,We,\"f\"))))}getEndpointById(e){const t=Ue(this,He,\"f\").get(e);if(!t)throw new Error(`Client with endpoint id ${e} is not connected`);return t}get connected(){return Ue(this,Ne,\"f\")}isEndpointConnected(e){return Ue(this,He,\"f\").has(e)}addEndpoint(e,t){if(!Ue(this,Ne,\"f\"))return void console.warn(`Adding endpoint to disconnected ${this.StrategyName} Strategy`);const n=new this.EndpointType(t);Ue(this,We,\"f\")&&n.receive(Ue(this,We,\"f\")),Ue(this,He,\"f\").set(e,n)}async closeEndpoint(e){Ue(this,He,\"f\").delete(e)}},We=new WeakMap,He=new WeakMap,Ne=new WeakMap,Object.defineProperty(Fe,\"__esModule\",{value:!0}),Fe.RTCInfo=Fe.RTCStrategy=void 0;const ze=je,Ke=De;class qe extends Ke.EndpointStrategy{constructor(){super(ze.RTCEndpoint,ze.RTCEndpoint.isValidEndpointPayload,\"RTC\")}}Fe.RTCStrategy=qe,Fe.RTCInfo={version:2,minimumVersion:0,type:\"rtc\"};var Je={};Object.defineProperty(Je,\"__esModule\",{value:!0}),Je.RTCICEManager=void 0;const Ye=d;class Ze extends Ye.EmitterBase{constructor(e){super(e,\"channel\"),this.ensureChannelOpened=e=>new Promise(((t,n)=>{if(\"open\"===e.readyState)t();else if(\"connecting\"===e.readyState){const n=()=>{e.removeEventListener(\"open\",n),t()};e.addEventListener(\"open\",n)}else n(new Error(\"This Channel has already closed\"))}))}static createDataChannelPromise(e,t){let n;const i=new Promise((e=>{n=e})),r=i=>{const o=()=>{i.channel.removeEventListener(\"open\",o),n(i.channel)};i.channel.label===e&&(i.channel.addEventListener(\"open\",o),t.removeEventListener(\"datachannel\",r))};return t.addEventListener(\"datachannel\",r),i}async listenForProviderIce(e,t){await this.on(this.createProviderEventName(e),t,{timestamp:Date.now()})}async raiseProviderIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createProviderEventName(e)),t)}async listenForClientIce(e,t){await this.on(this.createClientEventName(e),t,{timestamp:Date.now()})}async raiseClientIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createClientEventName(e)),t)}cleanupIceListeners(e){this.removeAllListeners(this.createClientEventName(e)),this.removeAllListeners(this.createProviderEventName(e))}createClientEventName(e){return`ice-client-${e}`}createProviderEventName(e){return`ice-provider-${e}`}createRouteString(e){return`channel/${e}`}createRtcPeer(){return this.wire.environment.getRtcPeer()}async startClientOffer(){const e=Math.random().toString(),t=this.createRtcPeer();t.addEventListener(\"icecandidate\",(async t=>{t.candidate&&await this.raiseClientIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForProviderIce(e,(async e=>{await t.addIceCandidate(e.candidate)}));const n={request:t.createDataChannel(\"request\"),response:t.createDataChannel(\"response\")},i=await t.createOffer();await t.setLocalDescription(i);const r=Promise.all([n.request,n.response].map(this.ensureChannelOpened)).then((()=>{}));return{rtcClient:t,channels:n,offer:i,rtcConnectionId:e,channelsOpened:r}}async finishClientOffer(e,t,n){return await e.setRemoteDescription(t),await n,!0}async createProviderAnswer(e,t){const n=this.createRtcPeer(),i=Ze.createDataChannelPromise(\"request\",n),r=Ze.createDataChannelPromise(\"response\",n);n.addEventListener(\"icecandidate\",(async t=>{t.candidate&&await this.raiseProviderIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForClientIce(e,(async e=>{await n.addIceCandidate(e.candidate)})),await n.setRemoteDescription(t);const o=await n.createAnswer();await n.setLocalDescription(o);const s=Promise.all([i,r]).then((([t,n])=>(this.cleanupIceListeners(e),{request:t,response:n})));return{rtcClient:n,answer:o,channels:s}}}Je.RTCICEManager=Ze;var Qe={},Xe={};function et(e){return[...e.split(\".\").reverse().entries()].reduce(((e,[t,n])=>e+ +n*1e4**t),0)}function tt(e,t){return et(e)>=et(t)}function nt(e){return e.split(\"/\")[0]}Object.defineProperty(Xe,\"__esModule\",{value:!0}),Xe.runtimeUuidMeetsMinimumRuntimeVersion=Xe.parseRuntimeUuid=Xe.meetsMinimumRuntimeVersion=void 0,Xe.meetsMinimumRuntimeVersion=tt,Xe.parseRuntimeUuid=nt,Xe.runtimeUuidMeetsMinimumRuntimeVersion=function(e,t){return tt(nt(e),t)};var it,rt,ot,st,at,ct=s&&s.__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)},dt=s&&s.__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};Object.defineProperty(Qe,\"__esModule\",{value:!0}),Qe.ChannelProvider=void 0;const ht=pe,lt=Xe;class ut extends ht.ChannelBase{get connections(){return[...ct(this,it,\"f\")]}static handleClientDisconnection(e,t){const n=e.connections.find((e=>e.endpointId===t.endpointId));if(n)ct(e,st,\"f\").call(e,n);else{e.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name)).forEach(ct(e,st,\"f\"))}e.disconnectListener(t)}static setProviderRemoval(e,t){ut.removalMap.set(e,t)}constructor(e,t,n){super(),it.set(this,void 0),rt.set(this,void 0),ot.set(this,void 0),st.set(this,(e=>{const t=this.connections.filter((t=>t.endpointId!==e.endpointId));ct(this,ot,\"f\").closeEndpoint(e.endpointId),dt(this,it,t,\"f\")})),this.processAction=async(e,t,n)=>(ut.clientIsMultiRuntime(n)&&!(0,lt.runtimeUuidMeetsMinimumRuntimeVersion)(n.runtimeUuid,\"18.87.56.0\")?this.handleMultiRuntimeLegacyClient(n):this.checkForClientConnection(n),super.processAction(e,t,n)),at.set(this,(()=>{ct(this,ot,\"f\").close();const e=ut.removalMap.get(this);e&&e()})),dt(this,rt,new ht.ProtectedItems(e,t),\"f\"),this.connectListener=()=>{},this.disconnectListener=()=>{},dt(this,it,[],\"f\"),dt(this,ot,n,\"f\"),n.receive(this.processAction)}dispatch(e,t,n){const i=e.endpointId??this.getEndpointIdForOpenFinId(e,t);return i&&ct(this,ot,\"f\").isEndpointConnected(i)?ct(this,ot,\"f\").send(i,t,n):Promise.reject(new Error(`Client connection with identity uuid: ${e.uuid} / name: ${e.name} / endpointId: ${i} no longer connected.`))}async processConnection(e,t){return ct(this,it,\"f\").push(e),this.connectListener(e,t)}publish(e,t){return this.connections.map((n=>ct(this,ot,\"f\").send(n.endpointId,e,t)))}onConnection(e){this.connectListener=e}onDisconnection(e){this.disconnectListener=e}async destroy(){const e=ct(this,rt,\"f\");e.providerIdentity,dt(this,it,[],\"f\"),await e.close(),ct(this,at,\"f\").call(this)}async getAllClientInfo(){return this.connections.map((e=>{const{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}=e;return{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}}))}checkForClientConnection(e){if(!this.isClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider.\\n Client Identity: {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}isClientConnected(e){return ut.clientIdentityIncludesEndpointId(e)?this.connections.some((t=>t.endpointId===e.endpointId&&t.uuid===e.uuid&&t.name===e.name)):this.isLegacyClientConnected(e)}isLegacyClientConnected(e){return this.connections.some((t=>t.uuid===e.uuid&&t.name===e.name))}handleMultiRuntimeLegacyClient(e){if(!this.isLegacyClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider. Client Identity:\\n {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}getEndpointIdForOpenFinId(e,t){const n=this.connections.filter((t=>t.name===e.name&&t.uuid===e.uuid));if(n.length>=2){const n=ct(this,rt,\"f\"),{uuid:i,name:r}=e,o=n?.providerIdentity.uuid,s=n?.providerIdentity.name;console.warn(`WARNING: Dispatch call may have unintended results. The \"to\" argument of your dispatch call is missing the\\n \"endpointId\" parameter. The identity you are dispatching to ({uuid: ${i}, name: ${r}})\\n has multiple channelClients for this channel. Your dispatched action: (${t}) from the provider:\\n ({uuid: ${o}, name: ${s}}) will only be processed by the most recently-created client.`)}return n.pop()?.endpointId}static clientIdentityIncludesEndpointId(e){return void 0!==e.endpointId}static clientIsMultiRuntime(e){return void 0!==e.runtimeUuid}static async wireClose(e,t){await e.sendAction(\"destroy-channel\",{channelName:t})}}Qe.ChannelProvider=ut,it=new WeakMap,rt=new WeakMap,ot=new WeakMap,st=new WeakMap,at=new WeakMap,ut.removalMap=new WeakMap;var pt={};Object.defineProperty(pt,\"__esModule\",{value:!0}),pt.MessageReceiver=void 0;const wt=ue,yt=d;class ft extends yt.Base{constructor(e){super(e),this.onmessage=e=>\"process-channel-message\"===e.action&&(this.processChannelMessage(e),!0),this.endpointMap=new Map,this.latestEndpointIdByChannelId=new Map,e.registerMessageHandler(this.onmessage.bind(this))}async processChannelMessage(e){const{senderIdentity:t,providerIdentity:n,action:i,ackToSender:r,payload:o,intendedTargetIdentity:s}=e.payload,a=s.channelId??s.endpointId??this.latestEndpointIdByChannelId.get(n.channelId),c=this.endpointMap.get(a);if(!c)return r.payload.success=!1,r.payload.reason=`Client connection with identity uuid: ${this.wire.me.uuid} / name: ${this.wire.me.name} / endpointId: ${a} no longer connected.`,this.wire.sendRaw(r);try{const e=await c(i,o,t);return r.payload.payload=r.payload.payload||{},r.payload.payload.result=e,this.wire.sendRaw(r)}catch(e){return r.payload.success=!1,r.payload.reason=e.message,this.wire.sendRaw(r)}}addEndpoint(e,t,n){this.endpointMap.set(n,e),t!==n&&this.latestEndpointIdByChannelId.set(t,n)}removeEndpoint(e,t){this.endpointMap.delete(t),this.latestEndpointIdByChannelId.get(e)===t&&this.latestEndpointIdByChannelId.delete(e)}checkForPreviousClientConnection(e){const t=this.latestEndpointIdByChannelId.get(e);t&&(wt.ChannelClient.closeChannelByEndpointId(t),console.warn(\"You have created a second connection to an older provider. First connection has been removed from the clientMap\"),console.warn(\"If the provider calls publish(), you may receive multiple messages.\"))}}pt.MessageReceiver=ft;var gt={};Object.defineProperty(gt,\"__esModule\",{value:!0}),gt.ProtocolManager=void 0;gt.ProtocolManager=class{constructor(e){this.ProtocolsInPreferenceOrder=e,this.DefaultClientProtocols=[\"classic\"],this.DefaultProviderProtocols=[\"classic\"],this.getClientProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultClientProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(\", \")}.`);return t},this.getProviderProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultProviderProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(\", \")}.`);return t},this.getCompatibleProtocols=(e,t)=>t.supportedProtocols.filter((t=>e.some((e=>e.type===t.type&&t.version>=e.minimumVersion&&e.version>=(t.minimumVersion??0))))).slice(0,t.maxProtocols)}};var mt={};Object.defineProperty(mt,\"__esModule\",{value:!0});class vt{static combine(e,t){return new vt(e,t)}constructor(e,t){this.primary=e,this.secondary=t}onEndpointDisconnect(e,t){this.primary.onEndpointDisconnect(e,(()=>{this.secondary.isEndpointConnected(e)||t()})),this.secondary.onEndpointDisconnect(e,(()=>{this.primary.isEndpointConnected(e)||t()}))}isValidEndpointPayload(e){return this.primary.isValidEndpointPayload(e)||this.secondary.isValidEndpointPayload(e)}async closeEndpoint(e){await this.primary.closeEndpoint(e),await this.secondary.closeEndpoint(e)}isEndpointConnected(e){return this.primary.isEndpointConnected(e)||this.secondary.isEndpointConnected(e)}async addEndpoint(e,t){this.primary.isValidEndpointPayload(t)&&await this.primary.addEndpoint(e,t),this.secondary.isValidEndpointPayload(t)&&await this.secondary.addEndpoint(e,t)}receive(e){this.primary.receive(e),this.secondary.receive(e)}send(e,t,n){return this.primary.isEndpointConnected(e)?this.primary.send(e,t,n):this.secondary.send(e,t,n)}async close(){await Promise.all([this.primary.close(),this.secondary.close()])}}mt.default=vt;var Ct,bt,It=s&&s.__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},Et=s&&s.__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)},xt=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(xe,\"__esModule\",{value:!0}),xe.ConnectionManager=void 0;const At=Ae,Pt=d,Mt=Oe,_t=Fe,Ot=Je,St=Qe,Rt=pt,Ft=gt,jt=xt(mt);class kt extends Pt.Base{static getProtocolOptionsFromStrings(e){return e.map((e=>{switch(e){case\"rtc\":return _t.RTCInfo;case\"classic\":return Mt.ClassicInfo;default:return(0,At.exhaustiveCheck)(e,[\"rtc\",\"classic\"])}}))}constructor(e){super(e),Ct.set(this,void 0),bt.set(this,void 0),this.removeChannelFromProviderMap=e=>{this.providerMap.delete(e)},this.onmessage=e=>\"process-channel-connection\"===e.action&&(this.processChannelConnection(e),!0),this.providerMap=new Map,this.protocolManager=new Ft.ProtocolManager(\"node\"===this.wire.environment.type?[\"classic\"]:[\"rtc\",\"classic\"]),It(this,Ct,new Rt.MessageReceiver(e),\"f\"),It(this,bt,new Ot.RTCICEManager(e),\"f\"),e.registerMessageHandler(this.onmessage.bind(this))}createProvider(e,t){const n=Object.assign(this.wire.environment.getDefaultChannelOptions().create,e||{}),i=this.protocolManager.getProviderProtocols(n?.protocols),r=i.map((e=>{switch(e){case\"rtc\":return new _t.RTCStrategy;case\"classic\":return new Mt.ClassicStrategy(this.wire,Et(this,Ct,\"f\"),t.channelId,t);default:return(0,At.exhaustiveCheck)(e,[\"rtc\",\"classic\"])}}));let o;if(2===r.length){const[e,t]=r;o=jt.default.combine(e,t)}else{if(1!==r.length)throw new Error(\"failed to combine strategies\");[o]=r}const s=new St.ChannelProvider(t,(()=>St.ChannelProvider.wireClose(this.wire,t.channelName)),o),a=t.channelId;return this.providerMap.set(a,{provider:s,strategy:o,supportedProtocols:kt.getProtocolOptionsFromStrings(i)}),St.ChannelProvider.setProviderRemoval(s,this.removeChannelFromProviderMap.bind(this)),s}async createClientOffer(e){const t=this.protocolManager.getClientProtocols(e?.protocols);let n;return{offer:{supportedProtocols:await Promise.all(t.map((async e=>{switch(e){case\"rtc\":{const{rtcClient:e,channels:t,offer:i,rtcConnectionId:r,channelsOpened:o}=await Et(this,bt,\"f\").startClientOffer();return n={rtcClient:e,channels:t,channelsOpened:o},{type:\"rtc\",version:_t.RTCInfo.version,payload:{offer:i,rtcConnectionId:r}}}case\"classic\":return{type:\"classic\",version:Mt.ClassicInfo.version};default:return(0,At.exhaustiveCheck)(e,[\"rtc\",\"classic\"])}}))),maxProtocols:2},rtc:n}}async createClientStrategy(e,t){t.endpointId||(t.endpointId=this.wire.environment.getNextMessageId(),Et(this,Ct,\"f\").checkForPreviousClientConnection(t.channelId));const n=t.answer??{supportedProtocols:[{type:\"classic\",version:1}]},i=(await Promise.all(n.supportedProtocols.map((async n=>\"rtc\"===n.type&&e?(await Et(this,bt,\"f\").finishClientOffer(e.rtcClient,n.payload.answer,e.channelsOpened),new _t.RTCStrategy):\"classic\"===n.type?new Mt.ClassicStrategy(this.wire,Et(this,Ct,\"f\"),t.endpointId,t):null)))).filter((e=>null!==e));let r;if(e&&!i.some((e=>e instanceof _t.RTCStrategy))&&e&&e.rtcClient.close(),i.length>=2)r=jt.default.combine(i[0],i[1]);else{if(!i.length)throw new Error(\"No compatible protocols\");[r]=i}const o={endpointIdentity:t,rtc:e};return r.addEndpoint(t.channelId,o),r}async processChannelConnection(e){const{clientIdentity:t,providerIdentity:n,ackToSender:i,payload:r,offer:o}=e.payload;t.endpointId?t.isLocalEndpointId=!1:(t.endpointId=this.wire.environment.getNextMessageId(),t.isLocalEndpointId=!0);const s=n.channelId,a=this.providerMap.get(s);if(!a)return i.payload.success=!1,i.payload.reason=`Channel \"${n.channelName}\" has been destroyed.`,this.wire.sendRaw(i);const{provider:c,strategy:d,supportedProtocols:h}=a;try{if(!(c instanceof St.ChannelProvider))throw Error(\"Cannot connect to a channel client\");const e=o??{supportedProtocols:[{type:\"classic\",version:1}],maxProtocols:1},n=this.protocolManager.getCompatibleProtocols(h,e);if(!n.length)throw new Error(\"This provider does not support any of the offered protocols.\");const s=await c.processConnection(t,r);i.payload.payload=i.payload.payload||{};let a={supportedProtocols:[],endpointPayloadPromise:Promise.resolve({endpointIdentity:t})};return a=await n.reduce((async(e,t)=>{const n=await e;if(\"rtc\"===t.type){const{answer:e,rtcClient:i,channels:r}=await Et(this,bt,\"f\").createProviderAnswer(t.payload.rtcConnectionId,t.payload.offer);n.supportedProtocols.push({type:\"rtc\",version:_t.RTCInfo.version,payload:{answer:e}}),n.endpointPayloadPromise=n.endpointPayloadPromise.then((e=>r.then((t=>({...e,rtc:{rtcClient:i,channels:t}})))))}else n.supportedProtocols.push({type:\"classic\",version:Mt.ClassicInfo.version});return n}),Promise.resolve(a)),a.endpointPayloadPromise.then((e=>d.addEndpoint(t.endpointId,e))),i.payload.payload.result=s,i.payload.payload.answer=a,this.wire.sendRaw(i)}catch(e){return i.payload.success=!1,i.payload.reason=e.message,this.wire.sendRaw(i)}}}xe.ConnectionManager=kt,Ct=new WeakMap,bt=new WeakMap;var Lt,Tt,$t,Bt=s&&s.__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},Gt=s&&s.__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)};Object.defineProperty(le,\"__esModule\",{value:!0}),le.Channel=void 0;const Wt=t,Ht=G,Nt=d,Dt=ue,Ut=xe,Vt=Qe;function zt(e){const t=Math.floor(e/10),n=Math.min(3e4,500*2**t);return new Promise((e=>{setTimeout((()=>{e(!1)}),n)}))}class Kt extends Nt.EmitterBase{constructor(e){super(e,\"channel\"),Lt.set(this,void 0),Tt.set(this,new Wt.EventEmitter),$t.set(this,new Ht.AsyncRetryableLazy((async()=>{await Promise.all([this.on(\"disconnected\",(e=>{Dt.ChannelClient.handleProviderDisconnect(e)})),this.on(\"connected\",((...e)=>{Gt(this,Tt,\"f\").emit(\"connected\",...e)}))]).catch((()=>new Error(\"error setting up channel connection listeners\")))}))),Bt(this,Lt,new Ut.ConnectionManager(e),\"f\")}async getAllChannels(){return this.wire.sendAction(\"get-all-channels\").then((({payload:e})=>e.data))}async onChannelConnect(e){await this.on(\"connected\",e)}async onChannelDisconnect(e){await this.on(\"disconnected\",e)}async safeConnect(e,t,n){const i={count:0};do{let r=()=>{};const o=new Promise((t=>{r=n=>{e===n.channelName&&t(!0)},Gt(this,Tt,\"f\").on(\"connected\",r)}));try{if(i.count>0){i.gotConnectedEvent=await Promise.race([zt(i.count),o]);const t=await this.wire.sendAction(\"connect-to-channel\",{...n,retryInfo:i});return console.log(`Successfully connected to channelName: ${e}`),t.payload.data}const t=this.wire.sendAction(\"connect-to-channel\",n);i.originalMessageId=t.messageId;return(await t).payload.data}catch(n){if(!n.message.includes(\"internal-nack\"))throw n;t&&0===i.count&&console.warn(`No channel found for channelName: ${e}. Waiting for connection...`)}finally{i.count+=1,Gt(this,Tt,\"f\").removeListener(\"connected\",r)}}while(t);throw new Error(`No channel found for channelName: ${e}.`)}async connect(e,t={}){if(await Gt(this,$t,\"f\").getValue(),!e||\"string\"!=typeof e)throw new Error(\"Please provide a channelName string to connect to a channel.\");const n={wait:!0,...this.wire.environment.getDefaultChannelOptions().connect,...t},{offer:i,rtc:r}=await Gt(this,Lt,\"f\").createClientOffer(n);let o;(this.fin.me.isFrame||this.fin.me.isView||this.fin.me.isWindow)&&(o=(await this.fin.me.getInfo()).url);const s={channelName:e,...n,offer:i,connectionUrl:o},a=await this.safeConnect(e,n.wait,s),c=await Gt(this,Lt,\"f\").createClientStrategy(r,a),d=new Dt.ChannelClient(a,(()=>Dt.ChannelClient.wireClose(this.wire,a,a.endpointId)),c);return c.onEndpointDisconnect(a.channelId,(async()=>{try{await d.sendDisconnectAction()}catch(e){console.warn(`Something went wrong during disconnect for client with uuid: ${a.uuid} / name: ${a.name} / endpointId: ${a.endpointId}.`)}finally{Dt.ChannelClient.handleProviderDisconnect(a)}})),d}async create(e,t){if(!e)throw new Error(\"Please provide a channelName to create a channel\");const{payload:{data:n}}=await this.wire.sendAction(\"create-channel\",{channelName:e}),i=Gt(this,Lt,\"f\").createProvider(t,n);return this.on(\"client-disconnected\",(t=>{t.channelName===e&&Vt.ChannelProvider.handleClientDisconnection(i,t)})),i}}le.Channel=Kt,Lt=new WeakMap,Tt=new WeakMap,$t=new WeakMap,Object.defineProperty(de,\"__esModule\",{value:!0}),de.InterAppPayload=de.InterApplicationBus=void 0;const qt=t,Jt=d,Yt=he,Zt=le,Qt=O;class Xt extends Jt.Base{constructor(e){super(e),this.events={subscriberAdded:\"subscriber-added\",subscriberRemoved:\"subscriber-removed\"},this.refCounter=new Yt.RefCounter,this.Channel=new Zt.Channel(e),this.emitter=new qt.EventEmitter,e.registerMessageHandler(this.onmessage.bind(this)),this.on=this.emitter.on.bind(this.emitter),this.removeAllListeners=this.emitter.removeAllListeners.bind(this.emitter)}async publish(e,t){await this.wire.sendAction(\"publish-message\",{topic:e,message:t,sourceWindowName:this.me.name})}async send(e,t,n){const i=(0,Qt.validateIdentity)(e);if(i)throw new Error(i);await this.wire.sendAction(\"send-message\",{destinationUuid:e.uuid,destinationWindowName:e.name,topic:t,message:n,sourceWindowName:this.me.name})}subscribe(e,t,n){const i=this.createSubscriptionKey(e.uuid,e.name||\"*\",t);return this.emitter.on(i,n),this.refCounter.actOnFirst(i,(async()=>{await this.wire.sendAction(\"subscribe\",{sourceUuid:e.uuid,sourceWindowName:e.name||\"*\",topic:t,destinationWindowName:this.me.name})}),(()=>Promise.resolve()))}unsubscribe(e,t,n){const i=e.name||\"*\",r=this.createSubscriptionKey(e.uuid,i,t);return this.emitter.removeListener(r,n),this.refCounter.actOnLast(r,(async()=>{await this.wire.sendAction(\"unsubscribe\",{sourceUuid:e.uuid,sourceWindowName:i,topic:t,destinationWindowName:this.me.name})}),(()=>new Promise((e=>e)).then((()=>{}))))}processMessage(e){const{payload:{message:t,sourceWindowName:n,sourceUuid:i,topic:r}}=e,o=[this.createSubscriptionKey(i,n,r),this.createSubscriptionKey(i,\"*\",r),this.createSubscriptionKey(\"*\",\"*\",r)],s={uuid:i,name:n};o.forEach((e=>{this.emitter.emit(e,t,s)}))}emitSubscriverEvent(e,t){const{payload:{targetName:n,uuid:i,topic:r}}=t,o={name:n,uuid:i,topic:r};this.emitter.emit(e,o)}createSubscriptionKey(e,t,n){const i=t||\"*\";if(!(e&&i&&n))throw new Error(\"Missing uuid, name, or topic string\");return function(...e){return e.map((e=>Buffer.from(`${e}`).toString(\"base64\"))).join(\"/\")}(e,i,n)}onmessage(e){const{action:t}=e;switch(t){case\"process-message\":this.processMessage(e);break;case this.events.subscriberAdded:this.emitSubscriverEvent(this.events.subscriberAdded,e);break;case this.events.subscriberRemoved:this.emitSubscriverEvent(this.events.subscriberRemoved,e)}return!0}}de.InterApplicationBus=Xt;de.InterAppPayload=class{};var en={};Object.defineProperty(en,\"__esModule\",{value:!0}),en.Clipboard=void 0;const tn=d;class nn extends tn.Base{async writeText(e){await this.wire.sendAction(\"clipboard-write-text\",e)}async readText(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-text\",{type:e});return t.data}async writeImage(e){await this.wire.sendAction(\"clipboard-write-image\",e)}async readImage(e={format:\"dataURL\"}){const{payload:t}=await this.wire.sendAction(\"clipboard-read-image\",e);return t.data}async writeHtml(e){await this.wire.sendAction(\"clipboard-write-html\",e)}async readHtml(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-html\",{type:e});return t.data}async writeRtf(e){await this.wire.sendAction(\"clipboard-write-rtf\",e)}async readRtf(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-rtf\",{type:e});return t.data}async write(e){await this.wire.sendAction(\"clipboard-write\",e)}async getAvailableFormats(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-formats\",{type:e});return t.data}}en.Clipboard=nn;var rn={},on={},sn={};Object.defineProperty(sn,\"__esModule\",{value:!0}),sn.ExternalApplication=void 0;const an=d;class cn extends an.EmitterBase{constructor(e,t){super(e,\"external-application\",t.uuid),this.identity=t}getInfo(){return this.wire.sendAction(\"get-external-application-info\",this.identity).then((({payload:e})=>e.data))}}sn.ExternalApplication=cn,Object.defineProperty(on,\"__esModule\",{value:!0}),on.ExternalApplicationModule=void 0;const dn=d,hn=sn;class ln extends dn.Base{wrap(e){return this.wire.sendAction(\"external-application-wrap\").catch((e=>{})),Promise.resolve(new hn.ExternalApplication(this.wire,{uuid:e}))}wrapSync(e){return this.wire.sendAction(\"external-application-wrap-sync\").catch((e=>{})),new hn.ExternalApplication(this.wire,{uuid:e})}}on.ExternalApplicationModule=ln,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(on,e),n(sn,e)}(rn);var un={},pn={},wn={};Object.defineProperty(wn,\"__esModule\",{value:!0}),wn._Frame=void 0;const yn=d;class fn extends yn.EmitterBase{constructor(e,t){super(e,\"frame\",t.uuid,t.name),this.identity=t}getInfo(){return this.wire.sendAction(\"get-frame-info\",this.identity).then((({payload:e})=>e.data))}getParentWindow(){return this.wire.sendAction(\"get-parent-window\",this.identity).then((({payload:e})=>e.data))}}wn._Frame=fn,Object.defineProperty(pn,\"__esModule\",{value:!0}),pn._FrameModule=void 0;const gn=d,mn=O,vn=wn;class Cn extends gn.Base{async wrap(e){this.wire.sendAction(\"frame-wrap\").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}wrapSync(e){this.wire.sendAction(\"frame-wrap-sync\").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}getCurrent(){return this.wire.sendAction(\"frame-get-current\").catch((e=>{})),Promise.resolve(new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity()))}getCurrentSync(){return this.wire.sendAction(\"frame-get-current-sync\").catch((e=>{})),new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity())}}pn._FrameModule=Cn,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(pn,e),n(wn,e)}(un);var bn={};Object.defineProperty(bn,\"__esModule\",{value:!0}),bn.GlobalHotkey=void 0;const In=d;class En extends In.EmitterBase{constructor(e){super(e,\"global-hotkey\")}async register(e,t){await this.on(e,t),await this.wire.sendAction(\"global-hotkey-register\",{hotkey:e})}async unregister(e){await this.removeAllListeners(e),await this.wire.sendAction(\"global-hotkey-unregister\",{hotkey:e})}async unregisterAll(){await Promise.all(this.eventNames().filter((e=>!(\"registered\"===e||\"unregistered\"===e))).map((e=>this.removeAllListeners(e)))),await this.wire.sendAction(\"global-hotkey-unregister-all\",{})}async isRegistered(e){const{payload:{data:t}}=await this.wire.sendAction(\"global-hotkey-is-registered\",{hotkey:e});return t}}bn.GlobalHotkey=En;var xn,An={},Pn={},Mn={},_n=s&&s.__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)};Object.defineProperty(Mn,\"__esModule\",{value:!0}),Mn.Platform=void 0;const On=d,Sn=O,Rn=new Map;class Fn extends On.EmitterBase{constructor(e,t){super(t.wire,\"application\",e.uuid),this.getClient=e=>{this.wire.sendAction(\"platform-get-client\",this.identity).catch((e=>{}));const t=e||this.identity,{uuid:n}=t;if(!Rn.has(n)){const e=_n(this,xn,\"f\").call(this,n);Rn.set(n,e)}return Rn.get(n)},xn.set(this,(async e=>{try{const t=`custom-frame-${e}`,n=await this._channel.connect(t,{wait:!1});return n.onDisconnection((()=>{Rn.delete(e)})),n}catch(t){throw Rn.delete(e),new Error(\"The targeted Platform is not currently running. Listen for application-started event for the given Uuid.\")}})),this.launchLegacyManifest=this.launchContentManifest;const n=(0,Sn.validateIdentity)(e);if(n)throw new Error(n);this._channel=t,this.identity={uuid:e.uuid},this.Layout=this.fin.Platform.Layout,this.Application=this.fin.Application.wrapSync(this.identity)}async createView(e,t,n){this.wire.sendAction(\"platform-create-view\",this.identity).catch((e=>{}));const i=await this.getClient(),r=await i.dispatch(\"create-view\",{target:t,opts:e,targetView:n});if(!r||(0,Sn.validateIdentity)(r.identity))throw new Error(`When overwriting the createView call, please return an object that has a valid 'identity' property: ${JSON.stringify(r)}`);return this.fin.View.wrapSync(r.identity)}async createWindow(e){this.wire.sendAction(\"platform-create-window\",this.identity).catch((e=>{}));const t=await this.getClient();e.reason||(e.reason=\"api-call\");const n=await t.dispatch(\"create-view-container\",e);if(!n||(0,Sn.validateIdentity)(n.identity))throw new Error(`When overwriting the createWindow call, please return an object that has a valid 'identity' property: ${JSON.stringify(n)}`);const{identity:i}=n,r=this.fin.Window.wrapSync(i);return r.name=i.name,r.uuid=i.uuid,r}async quit(){this.wire.sendAction(\"platform-quit\",this.identity).catch((e=>{}));return(await this.getClient()).dispatch(\"quit\")}async closeView(e){this.wire.sendAction(\"platform-close-view\",this.identity).catch((e=>{}));const t=await this.getClient();await t.dispatch(\"close-view\",{view:e})}async reparentView(e,t){console.warn(\"Platform.reparentView has been deprecated, please use Platform.createView\"),this.wire.sendAction(\"platform-reparent-view\",this.identity).catch((e=>{}));const n={...e,uuid:e.uuid??this.identity.uuid},i=await this.fin.View.wrap(n),r=await i.getOptions();return this.createView(r,t)}async getSnapshot(){this.wire.sendAction(\"platform-get-snapshot\",this.identity).catch((e=>{}));return(await this.getClient()).dispatch(\"get-snapshot\")}async getViewSnapshot(e){return(await this.getClient()).dispatch(\"get-view-snapshot\",{viewIdentity:e})}async applySnapshot(e,t){this.wire.sendAction(\"platform-apply-snapshot\",this.identity).catch((e=>{}));const n=\"Requested snapshot must be a valid Snapshot object, or a url or filepath to such an object.\";let i;if(\"string\"==typeof e)try{i=(await this._channel.wire.sendAction(\"get-application-manifest\",{manifestUrl:e})).payload.data}catch(e){throw new Error(`${n}: ${e}`)}else i=e;if(!i.windows)throw new Error(n);const r=await this.getClient();return await r.dispatch(\"apply-snapshot\",{snapshot:i,options:t}),this}async fetchManifest(e){return(await this.getClient()).dispatch(\"platform-fetch-manifest\",{manifestUrl:e})}async launchContentManifest(e){this.wire.sendAction(\"platform-launch-content-manifest\",this.identity).catch((()=>{}));const t=await this.getClient(),n=await this.fetchManifest(e);return t.dispatch(\"launch-into-platform\",{manifest:n,manifestUrl:e}),this}async setWindowContext(e={},t){if(this.wire.sendAction(\"platform-set-window-context\",this.identity).catch((e=>{})),!e)throw new Error(\"Please provide a serializable object or string to set the context.\");const n=await this.getClient(),{entityType:i}=t?await this.fin.System.getEntityInfo(t.uuid,t.name):this.fin.me;await n.dispatch(\"set-window-context\",{context:e,entityType:i,target:t||{uuid:this.fin.me.uuid,name:this.fin.me.name}})}async getWindowContext(e){this.wire.sendAction(\"platform-get-window-context\",this.identity).catch((e=>{}));const t=await this.getClient(),{entityType:n}=e?await this.fin.System.getEntityInfo(e.uuid,e.name):this.fin.me;return t.dispatch(\"get-window-context\",{target:e||{uuid:this.fin.me.uuid,name:this.fin.me.name},entityType:n})}async closeWindow(e,t={skipBeforeUnload:!1}){this.wire.sendAction(\"platform-close-window\",this.identity).catch((e=>{}));return(await this.getClient()).dispatch(\"close-window\",{windowId:e,options:t})}}Mn.Platform=Fn,xn=new WeakMap;var jn={},kn={},Ln={},Tn={};function $n(e){switch(e){case\"columns\":case\"grid\":case\"rows\":case\"tabs\":return!0;default:return!1}}Object.defineProperty(Tn,\"__esModule\",{value:!0}),Tn.overrideFromComposables=Tn.isValidPresetType=void 0,Tn.isValidPresetType=$n,Tn.overrideFromComposables=function(...e){return t=>e.reduceRight(((e,t)=>n=>t(e(n))),(e=>e))(t)},Tn.default={isValidPresetType:$n};var Bn={},Gn={},Wn={};Object.defineProperty(Wn,\"__esModule\",{value:!0}),Wn.ApiConsumer=void 0;Wn.ApiConsumer=class{constructor(e){this.strategy=e,this.consume=async e=>(await this.strategy.getExposedFunctions(e)).reduce(((t,n)=>({...t,[n.key]:this.strategy.createFunction(n,e)})),{})}};var Hn={},Nn={};Object.defineProperty(Nn,\"__esModule\",{value:!0}),Nn.expose=Nn.getExposedProperties=void 0;const Dn=Symbol(\"exposedProperties\");Nn.getExposedProperties=e=>e[Dn]||e.prototype[Dn]||[];Nn.expose=e=>(t,n,i)=>{t[Dn]=t[Dn]||[],t[Dn].push({key:n,descriptor:i,options:e})},Object.defineProperty(Hn,\"__esModule\",{value:!0}),Hn.ApiExposer=void 0;const Un=Nn;Hn.ApiExposer=class{constructor(e){this.strategy=e,this.exposeInstance=async(e,t)=>{const n=(0,Un.getExposedProperties)(e),i=await Promise.all(n.map((async({key:n,options:i})=>({key:n,options:await this.strategy.exposeFunction(e[n].bind(e),{key:n,options:i,meta:t})}))));await this.strategy.exposeMeta(t,i)}}};var Vn={},zn={},Kn={};Object.defineProperty(Kn,\"__esModule\",{value:!0}),Kn.ChannelsConsumer=void 0;Kn.ChannelsConsumer=class{constructor(e){this.channel=e,this.getExposedFunctions=async e=>{const{id:t}=e,{props:n}=await this.channel.dispatch(`api-meta:${t}`);return n},this.createFunction=e=>(...t)=>{const{action:n}=e.options;return this.channel.dispatch(n,{args:t})}}};var qn={};Object.defineProperty(qn,\"__esModule\",{value:!0}),qn.ChannelsExposer=void 0;qn.ChannelsExposer=class{constructor(e){this.channelProviderOrClient=e,this.exposeFunction=async(e,t)=>{const{key:n,options:i,meta:r}=t,{id:o}=r,s=`${o}.${i?.action||n}`;return await this.channelProviderOrClient.register(s,(async({args:t})=>e(...t))),{action:s}},this.exposeMeta=async({id:e},t)=>{const n=`api-meta:${e}`;await this.channelProviderOrClient.register(n,(()=>({props:t})))}}},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Kn,e),n(qn,e)}(zn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(zn,e)}(Vn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Wn,e),n(Hn,e),n(Vn,e),n(Nn,e)}(Gn);var Jn={};Object.defineProperty(Jn,\"__esModule\",{value:!0}),Jn.createRelayedDispatch=exports.relayChannelClientApi_1=Jn.relayChannelClientApi=void 0;const Yn=[\"no longer connected\",\"RTCDataChannel closed unexpectedly\",\"The client you are trying to dispatch from is disconnected from the target provider\"];exports.relayChannelClientApi_1=Jn.relayChannelClientApi=async(e,t)=>{e.register(`relay:${t}`,(({action:t,target:n,payload:i})=>e.dispatch(n,t,i))),await Promise.resolve()};Jn.createRelayedDispatch=(e,t,n,i)=>async(r,o)=>{try{return await e.dispatch(`relay:${n}`,{action:r,payload:o,target:t})}catch(e){if(s=e.message,Yn.some((e=>s.includes(e)))&&i)throw new Error(i);throw e}var s};var Zn,Qn,Xn,ei=s&&s.__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},ti=s&&s.__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)};Object.defineProperty(Bn,\"__esModule\",{value:!0}),Bn.ColumnOrRow=Bn.TabStack=Bn.LayoutNode=void 0;const ni=Gn,ii=Jn;class ri{constructor(e,t){Zn.set(this,void 0),this.isRoot=()=>ti(this,Zn,\"f\").isRoot(this.entityId),this.exists=()=>ti(this,Zn,\"f\").exists(this.entityId),this.getParent=async()=>{const e=await ti(this,Zn,\"f\").getParent(this.entityId);if(e)return ri.getEntity(e,ti(this,Zn,\"f\"))},this.createAdjacentStack=async(e,t)=>{const n=await ti(this,Zn,\"f\").createAdjacentStack(this.entityId,e,t);return ri.getEntity({entityId:n,type:\"stack\"},ti(this,Zn,\"f\"))},this.getAdjacentStacks=async e=>(await ti(this,Zn,\"f\").getAdjacentStacks({targetId:this.entityId,edge:e})).map((e=>ri.getEntity({type:\"stack\",entityId:e.entityId},ti(this,Zn,\"f\")))),ei(this,Zn,e,\"f\"),this.entityId=t}}Bn.LayoutNode=ri,Zn=new WeakMap,ri.newLayoutEntitiesClient=async(e,t,n)=>{const i=(0,ii.createRelayedDispatch)(e,n,\"layout-relay\",\"You are trying to interact with a layout component on a window that does not exist or has been destroyed.\");return new ni.ApiConsumer(new ni.ChannelsConsumer({dispatch:i})).consume({id:t})},ri.getEntity=(e,t)=>{const{entityId:n,type:i}=e;switch(i){case\"column\":case\"row\":return new si(t,n,i);case\"stack\":return new oi(t,n);default:throw new Error(`Unrecognised Layout Entity encountered ('${JSON.stringify(e)})`)}};class oi extends ri{constructor(e,t){super(e,t),Qn.set(this,void 0),this.type=\"stack\",this.getViews=()=>ti(this,Qn,\"f\").getStackViews(this.entityId),this.addView=async(e,t={index:0})=>ti(this,Qn,\"f\").addViewToStack(this.entityId,e,t),this.removeView=async e=>{await ti(this,Qn,\"f\").removeViewFromStack(this.entityId,e)},this.setActiveView=async e=>{await ti(this,Qn,\"f\").setStackActiveView(this.entityId,e)},ei(this,Qn,e,\"f\")}}Bn.TabStack=oi,Qn=new WeakMap;class si extends ri{constructor(e,t,n){super(e,t),Xn.set(this,void 0),this.getContent=async()=>(await ti(this,Xn,\"f\").getContent(this.entityId)).map((e=>ri.getEntity(e,ti(this,Xn,\"f\")))),ei(this,Xn,e,\"f\"),this.type=n}}Bn.ColumnOrRow=si,Xn=new WeakMap;var ai={};Object.defineProperty(ai,\"__esModule\",{value:!0}),ai.DEFAULT_LAYOUT_KEY=ai.LAYOUT_CONTROLLER_ID=void 0,ai.LAYOUT_CONTROLLER_ID=\"layout-entities\",ai.DEFAULT_LAYOUT_KEY=\"__default__\";var ci,di,hi,li=s&&s.__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)};Object.defineProperty(Ln,\"__esModule\",{value:!0}),Ln.Layout=void 0;const ui=G,pi=O,wi=d,yi=Tn,fi=Bn,gi=ai;class mi extends wi.Base{static getClient(e){return li(e,di,\"f\").getValue()}constructor(e,t){super(t),ci.add(this),di.set(this,new ui.Lazy((async()=>fi.LayoutNode.newLayoutEntitiesClient(await this.platform.getClient(),gi.LAYOUT_CONTROLLER_ID,this.identity)))),this.replace=async e=>{this.wire.sendAction(\"layout-replace\").catch((e=>{}));const t=await this.platform.getClient();await t.dispatch(\"replace-layout\",{target:this.identity,opts:{layout:e}})},this.replaceView=async(e,t)=>{this.wire.sendAction(\"layout-replace-view\").catch((e=>{}));const n=await this.platform.getClient();await n.dispatch(\"replace-view\",{target:this.identity,opts:{viewToReplace:e,newView:t}})},this.applyPreset=async e=>{this.wire.sendAction(\"layout-apply-preset\").catch((e=>{}));const t=await this.platform.getClient(),{presetType:n}=e;if(!n||!(0,yi.isValidPresetType)(n))throw new Error(\"Cannot apply preset layout, please include an applicable presetType property in the PresetLayoutOptions.\");await t.dispatch(\"apply-preset-layout\",{target:this.identity,opts:{presetType:n}})};const n=(0,pi.validateIdentity)(e);if(n)throw new Error(n);this.identity=e,this.platform=this.fin.Platform.wrapSync({uuid:e.uuid}),e.uuid===this.fin.me.uuid&&e.name===this.fin.me.name&&(this.init=this.fin.Platform.Layout.init)}async getConfig(){this.wire.sendAction(\"layout-get-config\").catch((e=>{}));return(await this.platform.getClient()).dispatch(\"get-frame-snapshot\",{target:this.identity})}async getCurrentViews(){this.wire.sendAction(\"layout-get-views\").catch((e=>{}));const e=await this.platform.getClient();return(await e.dispatch(\"get-layout-views\",{target:this.identity})).map((e=>this.fin.View.wrapSync(e)))}async getRootItem(){this.wire.sendAction(\"layout-get-root-item\").catch((()=>{}));const e=await li(this,di,\"f\").getValue(),t=await e.getRoot(\"layoutName\"in this.identity?this.identity:void 0);return fi.LayoutNode.getEntity(t,e)}async getStackByViewIdentity(e){this.wire.sendAction(\"layout-get-stack-by-view\").catch((()=>{}));const t=await li(this,di,\"f\").getValue(),n=await t.getStackByView(e);if(!n)throw new Error(`No stack found for view: ${e.uuid}/${e.name}`);return fi.LayoutNode.getEntity(n,t)}async addView(e,{location:t,targetView:n}={}){this.wire.sendAction(\"layout-add-view\").catch((e=>{}));const{identity:i}=await li(this,ci,\"m\",hi).call(this,\"layout-add-view\",{viewOptions:e,location:t,targetView:n});return{identity:i}}async closeView(e){this.wire.sendAction(\"layout-close-view\").catch((e=>{})),await li(this,ci,\"m\",hi).call(this,\"layout-close-view\",{viewIdentity:e})}}Ln.Layout=mi,di=new WeakMap,ci=new WeakSet,hi=async function(e,t){return(await this.platform.getClient()).dispatch(e,{target:this.identity,opts:t})};var vi,Ci,bi,Ii,Ei,xi=s&&s.__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)},Ai=s&&s.__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};Object.defineProperty(kn,\"__esModule\",{value:!0}),kn.LayoutModule=void 0;const Pi=d,Mi=Ln,_i=ai;class Oi extends Pi.Base{constructor(){super(...arguments),vi.add(this),Ci.set(this,!1),bi.set(this,null),this.init=async(e={})=>{if(this.wire.sendAction(\"layout-init\").catch((e=>{})),!this.wire.environment.layoutAllowedInContext(this.fin))throw new Error(\"Layout.init can only be called from a Window context.\");if(xi(this,Ci,\"f\"))throw new Error(\"Layout.init was already called, please use Layout.create to add additional layouts.\");\"openfin\"===this.wire.environment.type&&await this.fin.Platform.getCurrentSync().getClient(),Ai(this,Ci,!0,\"f\"),Ai(this,bi,await this.wire.environment.initLayoutManager(this.fin,this.wire,e),\"f\"),await this.wire.environment.applyLayoutSnapshot(this.fin,xi(this,bi,\"f\"),e);const t={name:this.fin.me.name,uuid:this.fin.me.uuid};if(!e.layoutManagerOverride){const e={layoutName:_i.DEFAULT_LAYOUT_KEY,...t};return xi(this,Ii,\"f\").call(this,e)}return this.wrapSync(t)},Ii.set(this,(e=>{const t=\"[Layout] You are using a deprecated property `layoutManager` - it will throw if you access it starting in v37.\",n=new Proxy({},{get(e,n){throw console.warn(`[Layout-mgr-proxy] accessing ${n.toString()}`),new Error(t)}}),i=Object.assign(this.wrapSync(e),{layoutManager:n});return new Proxy(i,{get(e,n){if(\"layoutManager\"===n)throw console.warn(`[Layout-proxy] accessing ${n.toString()}`),new Error(t);return e[n]}})})),this.getCurrentLayoutManagerSync=()=>xi(this,vi,\"m\",Ei).call(this,\"fin.Platform.Layout.getCurrentLayoutManagerSync()\"),this.create=async e=>this.wire.environment.createLayout(xi(this,vi,\"m\",Ei).call(this,\"fin.Platform.Layout.create()\"),e),this.destroy=async e=>this.wire.environment.destroyLayout(xi(this,vi,\"m\",Ei).call(this,\"fin.Platform.Layout.destroy()\"),e)}async wrap(e){return this.wire.sendAction(\"layout-wrap\").catch((e=>{})),new Mi.Layout(e,this.wire)}wrapSync(e){return this.wire.sendAction(\"layout-wrap-sync\").catch((e=>{})),new Mi.Layout(e,this.wire)}async getCurrent(){if(this.wire.sendAction(\"layout-get-current\").catch((e=>{})),\"openfin\"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error(\"You are not in a Window context. Only Windows can have a Layout.\");const{uuid:e,name:t}=this.fin.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction(\"layout-get-current-sync\").catch((e=>{})),\"openfin\"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error(\"You are not in a Window context. Only Windows can have a Layout.\");const{uuid:e,name:t}=this.fin.me;return this.wrapSync({uuid:e,name:t})}async getLayoutByViewIdentity(e){this.wire.sendAction(\"layout-get-by-view-identity\").catch((()=>{}));let t=await this.wire.environment.getViewWindowIdentity(this.fin,e);t.identity&&(t=t.identity);try{const n=this.wrapSync(t),i=await Mi.Layout.getClient(n),r=await i.getLayoutIdentityForViewOrThrow(e);return this.wrapSync(r)}catch(n){if(![\"No action registered at target for\",\"getLayoutIdentityForViewOrThrow is not a function\"].some((e=>n.message.includes(e))))throw n;if(t.uuid===t.name)throw new Error(`View identity ${JSON.stringify(e)} is not attached to any layout in provider window ${JSON.stringify(t)}.`);return this.wrapSync(t)}}}kn.LayoutModule=Oi,Ci=new WeakMap,bi=new WeakMap,Ii=new WeakMap,vi=new WeakSet,Ei=function(e){if(!xi(this,bi,\"f\"))throw new Error(`You must call init before using the API ${e}`);return xi(this,bi,\"f\")},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(kn,e),n(Ln,e)}(jn),Object.defineProperty(Pn,\"__esModule\",{value:!0}),Pn.PlatformModule=void 0;const Si=d,Ri=Mn,Fi=jn;class ji extends Si.Base{constructor(e,t){super(e),this._channel=t,this.Layout=new Fi.LayoutModule(this.wire)}async init(e){if(!fin.__internal_.isPlatform||fin.me.name!==fin.me.uuid)throw new Error(\"fin.Platform.init should only be called from a custom platform provider running in the main window of the application.\");return this.wire.environment.initPlatform(this.fin,e)}async wrap(e){return this.wire.sendAction(\"platform-wrap\").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}wrapSync(e){return this.wire.sendAction(\"platform-wrap-sync\").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}async getCurrent(){return this.wire.sendAction(\"platform-get-current\").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction(\"platform-get-current-sync\").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}start(e){return this.wire.sendAction(\"platform-start\").catch((e=>{})),new Promise((async(t,n)=>{try{const{uuid:n}=e,i=await this.fin.Application._create({...e,isPlatformController:!0});i.once(\"platform-api-ready\",(()=>t(this.wrapSync({uuid:n})))),i._run({uuid:n})}catch(e){n(e)}}))}startFromManifest(e,t){return this.wire.sendAction(\"platform-start-from-manifest\").catch((e=>{})),new Promise((async(n,i)=>{try{const i=await this.fin.Application._createFromManifest(e);i.once(\"platform-api-ready\",(()=>n(this.wrapSync({uuid:i.identity.uuid})))),i._run(t)}catch(e){i(e)}}))}}Pn.PlatformModule=ji,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Pn,e),n(Mn,e)}(An);var ki={};!function(e){Object.defineProperty(e,\"__esModule\",{value:!0}),e.getMe=e.getBaseMe=e.environmentUnsupportedMessage=void 0;const t=J(),n=un,i=ie(),r=rn;function o(e,t,n){return{...{isView:\"view\"===e,isWindow:\"window\"===e,isFrame:\"iframe\"===e,isExternal:\"external connection\"===e},uuid:t,name:n,entityType:e}}e.environmentUnsupportedMessage=\"You are not running in OpenFin.\",e.getBaseMe=o,e.getMe=function(s){const{uuid:a,name:c,entityType:d}=s.me,h={setContext(){throw new Error(e.environmentUnsupportedMessage)},addContextHandler(){throw new Error(e.environmentUnsupportedMessage)},getContextGroups(){throw new Error(e.environmentUnsupportedMessage)},joinContextGroup(){throw new Error(e.environmentUnsupportedMessage)},removeFromContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getAllClientsInContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getInfoForContextGroup(){throw new Error(e.environmentUnsupportedMessage)}},l=\"Interop API has not been instantiated. Either connection has failed or you have not declared interop in your config.\",u={setContext(){throw new Error(l)},addContextHandler(){throw new Error(l)},getContextGroups(){throw new Error(l)},joinContextGroup(){throw new Error(l)},removeFromContextGroup(){throw new Error(l)},getAllClientsInContextGroup(){throw new Error(l)},getInfoForContextGroup(){throw new Error(l)}},p={eventNames:()=>{throw new Error(e.environmentUnsupportedMessage)},emit:()=>{throw new Error(e.environmentUnsupportedMessage)},listeners:()=>{throw new Error(e.environmentUnsupportedMessage)},listenerCount:()=>{throw new Error(e.environmentUnsupportedMessage)},on:()=>{throw new Error(e.environmentUnsupportedMessage)},addListener:()=>{throw new Error(e.environmentUnsupportedMessage)},once:()=>{throw new Error(e.environmentUnsupportedMessage)},prependListener:()=>{throw new Error(e.environmentUnsupportedMessage)},prependOnceListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeAllListeners:()=>{throw new Error(e.environmentUnsupportedMessage)}};switch(d){case\"view\":return Object.assign(new t.View(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case\"window\":return Object.assign(new i._Window(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case\"iframe\":return Object.assign(new n._Frame(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case\"external connection\":return Object.assign(new r.ExternalApplication(s,{uuid:a}),o(d,a,c),{interop:u,isOpenFin:!1});default:return{...o(d,a,c),...p,interop:h,isOpenFin:!1}}}}(ki);var Li={},Ti={},$i={};Object.defineProperty($i,\"__esModule\",{value:!0}),$i.createWarningObject=$i.createUnusableObject=void 0,$i.createUnusableObject=function(e){const t=()=>{throw new Error(e)};return new Proxy({},{apply:t,construct:t,defineProperty:t,deleteProperty:t,get:t,getOwnPropertyDescriptor:t,getPrototypeOf:t,has:t,isExtensible:t,ownKeys:t,preventExtensions:t,set:t,setPrototypeOf:t})},$i.createWarningObject=function(e,t){return new Proxy(t,{get:(...t)=>(console.warn(e),Reflect.get(...t)),set:(...t)=>(console.warn(e),Reflect.set(...t)),getOwnPropertyDescriptor:(...t)=>(console.warn(e),Reflect.getOwnPropertyDescriptor(...t)),ownKeys:(...t)=>(console.warn(e),Reflect.ownKeys(...t))})};var Bi,Gi={},Wi={};var Hi={};!function(e){Object.defineProperty(e,\"__esModule\",{value:!0}),e.wrapIntentHandler=e.BROKER_ERRORS=e.generateOverrideWarning=e.generateOverrideError=e.wrapContextHandler=e.wrapInTryCatch=e.generateId=void 0;e.generateId=()=>`${Math.random()}${Date.now()}`;e.wrapInTryCatch=(e,t)=>(...n)=>{try{return e(...n)}catch(e){throw new Error((t||\"\")+e)}};e.wrapContextHandler=(e,t)=>async n=>{try{await e(n)}catch(e){throw console.error(`Error thrown by handler ${t} for context type ${n.type}: ${e}`),e}};e.generateOverrideError=(e,t)=>`You have tried to to use ${e} but ${t} has not been overridden in the Interop Broker. Please override this function. Refer to our documentation for more info.`;e.generateOverrideWarning=(e,t,n,i)=>{const{uuid:r,name:o}=n;return i?`Entity with identity: ${r}/${o} has called ${i} or ${e} but ${t} has not been overridden.`:`Entity with identity: ${r}/${o} has called ${e} but ${t} has not been overridden.`},e.BROKER_ERRORS={fireIntent:(0,e.generateOverrideError)(\"fireIntent\",\"handleFiredIntent\"),fireIntentForContext:(0,e.generateOverrideError)(\"fireIntentForContext\",\"handleFiredIntentForContext\"),getInfoForIntent:(0,e.generateOverrideError)(\"getInfoForIntent\",\"handleInfoForIntent\"),getInfoForIntentsByContext:(0,e.generateOverrideError)(\"getInfoForIntentsByContext\",\"handleInfoForIntentsByContext\"),joinSessionContextGroupWithJoinContextGroup:\"The Context Group you have tried to join is a Session Context Group. Custom Context Groups can only be defined by the Interop Broker through code or manifest configuration. Please use joinSessionContextGroup.\",fdc3Open:(0,e.generateOverrideError)(\"fdc3.open\",\"fdc3HandleOpen\"),fdc3FindInstances:(0,e.generateOverrideError)(\"fdc3.findInstances\",\"fdc3HandleFindInstances\"),fdc3GetAppMetadata:(0,e.generateOverrideError)(\"fdc3.getAppMetadata\",\"fdc3HandleGetAppMetadata\"),fdc3GetInfo:(0,e.generateOverrideError)(\"fdc3.getInfo\",\"fdc3HandleGetInfo\")};e.wrapIntentHandler=(e,t)=>async n=>{try{return e(n)}catch(e){throw console.error(`Error thrown by handler ${t}: ${e}`),e}}}(Hi);var Ni,Di,Ui={};function Vi(){if(Di)return Gi;Di=1;var e,t,n,r=s&&s.__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},o=s&&s.__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)},a=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Gi,\"__esModule\",{value:!0}),Gi.InteropBroker=void 0;const c=d,h=a(function(){if(Bi)return Wi;Bi=1,Object.defineProperty(Wi,\"__esModule\",{value:!0});const e=Cr();return Wi.default=class{constructor(e,t){this.provider=e,this.id=t,this.lastContext=void 0,this.contextGroupMap=new Map,this.clients=new Map,this.registerListeners()}registerListeners(){this.provider.register(`sessionContextGroup:getContext-${this.id}`,this.getCurrentContext.bind(this)),this.provider.register(`sessionContextGroup:setContext-${this.id}`,this.setContext.bind(this)),this.provider.register(`sessionContextGroup:handlerAdded-${this.id}`,this.handlerAdded.bind(this)),this.provider.register(`sessionContextGroup:handlerRemoved-${this.id}`,this.handlerRemoved.bind(this))}getCurrentContext(e){return e.type?this.contextGroupMap.get(e.type):this.lastContext}setContext(t,n){const{context:i}=t,r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name} not in Session Client State Map`);this.contextGroupMap.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{e.contextHandlers.get(i.type)?.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getClientState(e){return this.clients.get(e.endpointId)}async handlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(i){const e=r.contextHandlers.get(i)||[];r.contextHandlers.set(i,[...e,n]);const o=this.contextGroupMap.get(i);o&&await this.provider.dispatch(t,n,o)}else{r.globalHandler=n;const e=[...this.contextGroupMap.keys()].map((async e=>{const i=this.contextGroupMap.get(e);i&&await this.provider.dispatch(t,n,i)}));await Promise.all(e)}}handlerRemoved(e,t){const{handlerId:n}=e,i=this.clients.get(t.endpointId);i?(Array.from(i.contextHandlers).forEach((([,e])=>{const t=e.indexOf(n);t>-1&&e.splice(t,1)})),i.globalHandler===n&&(i.globalHandler=void 0)):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={contextHandlers:new Map,clientIdentity:e,globalHandler:void 0};this.clients.set(e.endpointId,t)}}onDisconnection(e){this.clients.delete(e.endpointId)}},Wi}()),l=Hi,u=a(i),p=function(){if(Ni)return Ui;Ni=1,Object.defineProperty(Ui,\"__esModule\",{value:!0}),Ui.PrivateChannelProvider=void 0;const e=Vi();return Ui.PrivateChannelProvider=class t{constructor(e,t){this.provider=e,this.id=t,this.clients=new Map,this.registerListeners(),this.contextByContextType=new Map,this.lastContext=void 0,this.provider.onConnection((e=>this.registerNewClient(e))),this.provider.onDisconnection((async e=>{const{endpointId:t}=e;this.clients.has(t)&&await this.handleClientDisconnecting(e),0===(await this.provider.getAllClientInfo()).length&&this.provider.destroy()}))}getClientState(e){return this.clients.get(e.endpointId)}registerListeners(){this.provider.register(\"broadcast\",this.broadcast.bind(this)),this.provider.register(\"getCurrentContext\",this.getCurrentContext.bind(this)),this.provider.register(\"contextHandlerAdded\",this.contextHandlerAdded.bind(this)),this.provider.register(\"contextHandlerRemoved\",this.contextHandlerRemoved.bind(this)),this.provider.register(\"nonStandardHandlerRemoved\",this.nonStandardHandlerRemoved.bind(this)),this.provider.register(\"onAddContextHandlerAdded\",this.onAddContextHandlerAdded.bind(this)),this.provider.register(\"onDisconnectHandlerAdded\",this.onDisconnectHandlerAdded.bind(this)),this.provider.register(\"onUnsubscribeHandlerAdded\",this.onUnsubscribeHandlerAdded.bind(this)),this.provider.register(\"clientDisconnecting\",((e,t)=>{this.handleClientDisconnecting(t)}))}broadcast(t,n){const{context:i}=t;if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name}, tried to call broadcast, is not connected to this Private Channel`);const r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to broadcast - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);this.contextByContextType.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{const t=e.handlerIdsByContextTypes.get(i.type);t&&t.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getCurrentContext(e,t){const{contextType:n}=e;if(!this.getClientState(t))throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call getCurrentContext, is not connected to this Private Channel`);if(void 0!==n){return this.contextByContextType.get(n)||null}return this.lastContext?this.lastContext:null}contextHandlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call addContextListener, is not connected to this Private Channel`);if(i){const e=r.handlerIdsByContextTypes.get(i)||[];r.handlerIdsByContextTypes.set(i,[...e,n])}else r.globalHandler=n;Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&e.onAddContextListenerHandlerId&&this.provider.dispatch(e.clientIdentity,e.onAddContextListenerHandlerId,i)}))}async contextHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);if(i){let e;if(i.globalHandler===n)i.globalHandler=void 0;else for(const[t,r]of i.handlerIdsByContextTypes){const i=r.indexOf(n);i>-1&&(r.splice(i,1),e=t)}const r=(await this.getConnectedClients()).map((async n=>{const{clientIdentity:i,clientIdentity:{endpointId:r},onUnsubscribeHandlerId:o}=n;r!==t.endpointId&&o&&await this.provider.dispatch(i,o,e)}));try{await Promise.all(r)}catch(e){throw console.error(`Problem when attempting to dispatch to onUnsubscribeHandlers. Error: ${e} Removing Client: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}`),new Error(e)}}else console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}.`)}nonStandardHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);i?i.onDisconnectHandlerId===n?i.onDisconnectHandlerId=void 0:i.onAddContextListenerHandlerId===n?i.onAddContextListenerHandlerId=void 0:i.onUnsubscribeHandlerId===n&&(i.onUnsubscribeHandlerId=void 0):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}onAddContextHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onAddContextListener, is not connected to this Private Channel`);n.onAddContextListenerHandlerId=i,Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&Array.from(e.handlerIdsByContextTypes.keys()).forEach((e=>{this.provider.dispatch(t,i,e)}))}))}onDisconnectHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onDisconnect, is not connected to this Private Channel`);n.onDisconnectHandlerId=i}onUnsubscribeHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onUnsubscribe, is not connected to this Private Channel`);n.onUnsubscribeHandlerId=i}removeClient(e){const t=this.getClientState(e);if(!t)throw new Error(`Client with Identity: ${e.uuid} ${e.name}, tried to call disconnect, is not connected to this Private Channel`);t.handlerIdsByContextTypes.clear(),this.clients.delete(e.endpointId)}async fireOnDisconnectForOtherClients(e){const{endpointId:t}=e,n=(await this.getConnectedClients()).map((async e=>{const{clientIdentity:{endpointId:n},onDisconnectHandlerId:i}=e;n!==t&&i&&await this.provider.dispatch(e.clientIdentity,i)}));try{await Promise.all(n)}catch(t){throw console.error(`Problem when attempting to dispatch to onDisconnectHandlers. Error: ${t} Disconnecting Client: uuid: ${e.uuid}. name: ${e.name}. endpointId: ${e.endpointId}`),new Error(t)}}async unsubscribeAll(e){const{endpointId:t}=e,n=this.clients.get(t);if(n){const t=Array.from(n.handlerIdsByContextTypes.values()).flat(),i=n.globalHandler;if(t.length>0){const n=t.map((async t=>this.contextHandlerRemoved({handlerId:t},e)));try{await Promise.all(n)}catch(e){console.error(e.message)}}if(i)try{await this.contextHandlerRemoved({handlerId:i},e)}catch(e){console.error(e.message)}}}async handleClientDisconnecting(e){await this.unsubscribeAll(e),this.removeClient(e),await this.fireOnDisconnectForOtherClients(e)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={clientIdentity:e,handlerIdsByContextTypes:new Map,globalHandler:void 0,onAddContextListenerHandlerId:void 0,onUnsubscribeHandlerId:void 0,onDisconnectHandlerId:void 0};this.clients.set(e.endpointId,t)}}async getConnectedClients(){const e=await this.provider.getAllClientInfo();return Array.from(this.clients.values()).filter((t=>{const{uuid:n,name:i}=t.clientIdentity;return e.some((e=>i===e.name&&n===e.uuid))}))}static init(e,n){return new t(e,n)}},Ui}(),w=G,y=[{id:\"green\",displayMetadata:{color:\"#00CC88\",name:\"green\"}},{id:\"purple\",displayMetadata:{color:\"#8C61FF\",name:\"purple\"}},{id:\"orange\",displayMetadata:{color:\"#FF8C4C\",name:\"orange\"}},{id:\"red\",displayMetadata:{color:\"#FF5E60\",name:\"red\"}},{id:\"pink\",displayMetadata:{color:\"#FF8FB8\",name:\"pink\"}},{id:\"yellow\",displayMetadata:{color:\"#E9FF8F\",name:\"yellow\"}}];let f=class i extends c.Base{constructor(i,s,a){super(i),e.set(this,void 0),t.set(this,void 0),n.set(this,void 0),this.getProvider=()=>o(this,n,\"f\").getValue(),this.interopClients=new Map,this.contextGroupsById=new Map,r(this,t,a.contextGroups??[...y],\"f\"),r(this,e,a.fdc3Info,\"f\"),a?.logging&&(this.logging=a.logging),this.intentClientMap=new Map,this.lastContextMap=new Map,this.sessionContextGroupMap=new Map,r(this,n,new w.Lazy(s),\"f\"),this.setContextGroupMap(),this.setupChannelProvider()}static createClosedConstructor(...e){return class extends i{constructor(...t){if(t.length){const[n,i,r]=t;if(r&&\"object\"==typeof r&&!(0,u.default)(r,e[2]))return console.warn(\"You have modified the parameters of the InteropOverride constructor. This behavior is deprecated and will be removed in a future version. You can modify these options in your manifest. Please consult our Interop docs for guidance on migrating to the new override scheme.\"),void super(e[0],e[1],r);console.warn(\"You are attempting to pass arguments to the InteropOverride constructor. This is not necessary, and these passed arguments will be ignored. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.\")}super(...e)}}}setContext({context:e},t){this.wire.sendAction(\"interop-broker-set-context\").catch((e=>{}));const n=this.getClientState(t);if(!n||!n.contextGroupId)throw n?new Error(\"You must join a context group before you can set context.\"):new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);{const{contextGroupId:t}=n;this.setContextForGroup({context:e},t)}}setContextForGroup({context:e},t){this.wire.sendAction(\"interop-broker-set-context-for-group\").catch((e=>{}));const n=this.contextGroupsById.get(t);if(!n)throw new Error(`Unable to set context for context group that isn't in the context group mapping: ${t}.`);const r=i.checkContextIntegrity(e);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(e)}`);const o=e.type;n.set(o,e),this.lastContextMap.set(t,o);Array.from(this.interopClients.values()).filter((e=>e.contextGroupId===t)).forEach((t=>{for(const[,n]of t.contextHandlers)i.isContextTypeCompatible(o,n.contextType)&&this.invokeContextHandler(t.clientIdentity,n.handlerId,e)}))}getCurrentContext(e,t){this.wire.sendAction(\"interop-broker-get-current-context\").catch((e=>{}));const n=this.getClientState(t);if(!n?.contextGroupId)throw new Error(\"You must be a member of a context group to call getCurrentContext\");const{contextGroupId:i}=n,r=this.contextGroupsById.get(i),o=this.lastContextMap.get(i),s=e?.contextType??o;return r&&s?r.get(s):void 0}async joinContextGroup({contextGroupId:e,target:t},n){if(this.wire.sendAction(\"interop-broker-join-context-group\").catch((e=>{})),this.sessionContextGroupMap.has(e))throw new Error(l.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup);if(t){i.hasEndpointId(t)&&await this.addClientToContextGroup({contextGroupId:e},t);try{const n=this.channel.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name));if(!n.length)throw new Error(`Given Identity ${t.uuid} ${t.name} is not connected to the Interop Broker.`);n.length>1&&console.warn(`More than one connection found for identity ${t.uuid} ${t.name}`);const i=[];for(const t of n)i.push(this.addClientToContextGroup({contextGroupId:e},t));await Promise.all(i)}catch(e){throw new Error(e)}}else await this.addClientToContextGroup({contextGroupId:e},n)}async addClientToContextGroup({contextGroupId:e},t){this.wire.sendAction(\"interop-broker-add-client-to-context-group\").catch((e=>{}));const n=this.getClientState(t);if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(!this.getContextGroups().find((t=>t.id===e)))throw new Error(`Attempting to join a context group that does not exist: ${e}. You may only join existing context groups.`);if(n.contextGroupId!==e){n.contextGroupId=e,await this.setCurrentContextGroupInClientOptions(t,e);const i=this.contextGroupsById.get(e);for(const[,e]of n.contextHandlers){const{contextType:n,handlerId:r}=e;if(void 0===n)i.forEach(((e,n)=>{this.invokeContextHandler(t,r,e)}));else if(i.has(n)){const e=i.get(n);e&&this.invokeContextHandler(t,r,e)}}}}async removeFromContextGroup({target:e},t){if(this.wire.sendAction(\"interop-broker-remove-from-context-group\").catch((e=>{})),e){i.hasEndpointId(e)&&await this.removeClientFromContextGroup(e);try{const t=this.channel.connections.filter((t=>t.uuid===e.uuid&&t.name===e.name));if(!t.length)throw new Error(`No connection found for given Identity ${e.uuid} ${e.name}`);t.length>1&&console.warn(`More than one connection found for identity ${e.uuid} ${e.name}`);const n=[];for(const e of t)n.push(this.removeClientFromContextGroup(e));await Promise.all(n)}catch(e){throw new Error(e)}}else await this.removeClientFromContextGroup(t)}async removeClientFromContextGroup(e){this.wire.sendAction(\"interop-broker-remove-client-from-context-group\").catch((e=>{}));const t=this.getClientState(e);t&&(t.contextGroupId=void 0),await this.setCurrentContextGroupInClientOptions(e,null)}getContextGroups(){return this.wire.sendAction(\"interop-broker-get-context-groups\").catch((e=>{})),o(this,t,\"f\").map((e=>({...e})))}getInfoForContextGroup({contextGroupId:e}){return this.wire.sendAction(\"interop-broker-get-info-for-context-group\").catch((e=>{})),this.getContextGroups().find((t=>t.id===e))}getAllClientsInContextGroup({contextGroupId:e}){this.wire.sendAction(\"interop-broker-get-all-clients-in-context-group\").catch((e=>{}));return Array.from(this.interopClients.values()).filter((t=>t.contextGroupId===e)).map((e=>e.clientIdentity))}async handleFiredIntent(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.raiseIntent\",\"InteropBroker.handleFiredIntent\",t,\"interopClient.fireIntent\");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntent)}async setIntentTarget(e,t){this.wire.sendAction(\"interop-broker-set-intent-target\").catch((e=>{}));const n=this.intentClientMap.get(t.name),i=`intent-handler-${e.name}`;if(n){const t=n.get(i);if(t){if(t.pendingIntents.push(e),t.clientIdentity&&t.isReady){const{clientIdentity:e,pendingIntents:n}=t;try{const r=n[n.length-1];await this.invokeIntentHandler(e,i,r),t.pendingIntents=[]}catch(n){console.error(`Error invoking intent handler for client ${e.uuid}/${e.name}/${e.endpointId}`),t.isReady=!1}}}else n.set(i,{isReady:!1,pendingIntents:[e]})}else{this.intentClientMap.set(t.name,new Map);const n=this.intentClientMap.get(t.name);n&&n.set(i,{isReady:!1,pendingIntents:[e]})}}async handleInfoForIntent(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.findIntent\",\"InteropBroker.handleInfoForIntent\",t,\"interopClient.getInfoForIntent\");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntent)}async handleInfoForIntentsByContext(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.findIntentsByContext\",\"InteropBroker.handleInfoForIntentsByContext\",t,\"interopClient.getInfoForIntentsByContext\");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntentsByContext)}async handleFiredIntentForContext(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.raiseIntentForContext\",\"InteropBroker.handleFiredIntentForContext\",t,\"interopClient.fireIntentForContext\");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntentForContext)}async clientDisconnected(e){}async fdc3HandleOpen({app:e,context:t},n){const i=(0,l.generateOverrideWarning)(\"fdc3.open\",\"InteropBroker.fdc3HandleOpen\",n);throw console.warn(i),new Error(l.BROKER_ERRORS.fdc3Open)}async fdc3HandleFindInstances(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.open\",\"InteropBroker.fdc3HandleFindInstances\",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3FindInstances)}async fdc3HandleGetAppMetadata(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.getAppMetadata\",\"InteropBroker.fdc3HandleGetAppMetadata\",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3GetAppMetadata)}async invokeContextHandler(e,t,n){const i=await this.getProvider();try{await i.dispatch(e,t,n)}catch(i){console.error(`Error invoking context handler ${t} for context type ${n.type} in client ${e.uuid}/${e.name}/${e.endpointId}`,i)}}async invokeIntentHandler(e,t,n){const i=await this.getProvider();await i.dispatch(e,t,n)}async fdc3HandleGetInfo(t,n){const{fdc3Version:i}=t;return{fdc3Version:i,...o(this,e,\"f\"),optionalFeatures:{OriginatingAppMetadata:!1,UserChannelMembershipAPIs:!0},appMetadata:{appId:\"\",instanceId:\"\"}}}async getAllClientInfo(){return(await this.getProvider()).getAllClientInfo()}decorateSnapshot(e){return{...e,interopSnapshotDetails:{contextGroupStates:this.getContextGroupStates()}}}applySnapshot(e,t){const n=e?.interopSnapshotDetails?.contextGroupStates;n&&(t?.closeExistingWindows||this.updateExistingClients(n),this.rehydrateContextGroupStates(n))}updateExistingClients(e){this.interopClients.forEach((t=>{const{clientIdentity:n,contextGroupId:r,contextHandlers:o}=t;if(r){const t=e[r];for(const[,e]of Object.entries(t))o.forEach((t=>{const{handlerId:r,contextType:o}=t;i.isContextTypeCompatible(e.type,o)&&this.invokeContextHandler(n,r,e)}))}}))}getContextGroupStates(){return i.toObject(this.contextGroupsById)}rehydrateContextGroupStates(e){const t=Object.entries(e);for(const[e,n]of t){const t=Object.entries(n);for(const[n,i]of t)if(this.contextGroupsById.has(e)){this.contextGroupsById.get(e).set(n,i)}else console.warn(`Attempting to set a context group that isn't in the context group mapping. Skipping context group rehydration for: ${e}`)}}contextHandlerRegistered({contextType:e,handlerId:t},n){const i={contextType:e,handlerId:t},r=this.getClientState(n);if(r?.contextHandlers.set(t,i),r&&r.contextGroupId){const{contextGroupId:i}=r,o=this.contextGroupsById.get(i);if(void 0===e)o.forEach(((e,i)=>{this.invokeContextHandler(n,t,e)}));else if(o.has(e)){const i=o.get(e);i&&this.invokeContextHandler(n,t,i)}}}async intentHandlerRegistered(e,t){const{handlerId:n}=e,i=this.intentClientMap.get(t.name),r=i?.get(n);if(i)if(r){const{pendingIntents:e}=r;r.clientIdentity=t,r.isReady=!0;try{if(e.length>0){const i=e[e.length-1];await this.invokeIntentHandler(t,n,i),r.pendingIntents=[]}}catch(e){console.error(`Error invoking intent handler: ${n} for client ${t.uuid}/${t.name}/${t.endpointId}`)}}else i.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t});else{this.intentClientMap.set(t.name,new Map);const e=this.intentClientMap.get(t.name);e&&e.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t})}}removeContextHandler({handlerId:e},t){const n=this.getClientState(t);n&&n.contextHandlers.delete(e)}handleJoinSessionContextGroup({sessionContextGroupId:e},t){try{if(!e)throw new Error(\"Failed to join session context group: must specify group id.\");const n=this.sessionContextGroupMap.get(e);if(n)n.registerNewClient(t);else{const n=new h.default(this.channel,e);n.registerNewClient(t),this.sessionContextGroupMap.set(e,n)}return{hasConflict:this.contextGroupsById.has(e)}}catch(e){throw new Error(e)}}getClientState(e){return this.interopClients.get(e.endpointId)}static toObject(e){const t=Object.fromEntries(e),n={};return Object.entries(t).forEach((([e,t])=>{const i=Object.fromEntries(t);n[e]=i})),n}static checkContextIntegrity(e){if(!e)return{isValid:!1,reason:\"No context supplied\"};if(\"object\"!=typeof e)return{isValid:!1,reason:\"Context must be an Object\"};if(!e.type)return{isValid:!1,reason:\"Context must have a type property\"};if(e.id&&\"object\"!=typeof e.id)return{isValid:!1,reason:\"Context id must be an Object populated with key-value identifiers (if set)\"};if(e.id){const{id:t}=e,n=Object.keys(t);let i=!1;if(!n.length)return{isValid:!1,reason:\"Context id must have at least one key-value identifier\"};if(n.forEach((e=>{\"string\"==typeof e&&\"string\"==typeof t[e]||(i=!0)})),i)return{isValid:!1,reason:\"Context id key-value identifiers must be of type string\"}}return e.name&&\"string\"!=typeof e.name?{isValid:!1,reason:\"Context name must be of string type (if set)\"}:{isValid:!0}}static hasEndpointId(e){return void 0!==e.endpointId}static isContextTypeCompatible(e,t){return void 0===t||e===t}setContextGroupMap(){for(const e of this.getContextGroups())this.contextGroupsById.set(e.id,new Map)}async setCurrentContextGroupInClientOptions(e,t){try{const n=await this.fin.System.getEntityInfo(e.uuid,e.name);let i;\"view\"===n.entityType?i=await this.fin.View.wrap(e):\"window\"===n.entityType&&(i=await this.fin.Window.wrap(e)),i&&await i.updateOptions({interop:{currentContextGroup:t}})}catch(e){}}async setupChannelProvider(){try{const e=await this.getProvider();this.channel=e,this.wireChannel(e)}catch(e){throw new Error(`Error setting up Interop Broker Channel Provider: ${e}`)}}wireChannel(e){e.onConnection((async(e,t)=>{if(!await this.isConnectionAuthorized(e,t))throw new Error(`Connection not authorized for ${e.uuid}, ${e.name}`);if(!e.endpointId)throw new Error(\"Version too old to be compatible with Interop. Please upgrade your runtime to a more recent version.\");const n={contextGroupId:void 0,contextHandlers:new Map,clientIdentity:e};t?.currentContextGroup&&this.contextGroupsById.has(t.currentContextGroup)&&(n.contextGroupId=t?.currentContextGroup),this.interopClients.set(e.endpointId,n)})),e.onDisconnection((e=>{this.interopClients.delete(e.endpointId);const t=this.intentClientMap.get(e.name);t&&e.uuid===this.fin.me.uuid&&t.forEach((e=>{e.isReady=!1})),this.sessionContextGroupMap.forEach((t=>{t.onDisconnection(e)})),this.clientDisconnected(e)})),e.beforeAction((async(e,t,n)=>{if(!await this.isActionAuthorized(e,t,n))throw new Error(`Action (${e}) not authorized for ${n.uuid}, ${n.name}`);this.logging?.beforeAction?.enabled&&console.log(e,t,n)})),e.afterAction(((e,t,n)=>{this.logging?.afterAction?.enabled&&console.log(e,t,n)})),e.register(\"setContext\",this.setContext.bind(this)),e.register(\"fireIntent\",this.handleFiredIntent.bind(this)),e.register(\"getCurrentContext\",this.getCurrentContext.bind(this)),e.register(\"getInfoForIntent\",this.handleInfoForIntent.bind(this)),e.register(\"getInfoForIntentsByContext\",this.handleInfoForIntentsByContext.bind(this)),e.register(\"fireIntentForContext\",this.handleFiredIntentForContext.bind(this)),e.register(\"getContextGroups\",this.getContextGroups.bind(this)),e.register(\"joinContextGroup\",this.joinContextGroup.bind(this)),e.register(\"removeFromContextGroup\",this.removeFromContextGroup.bind(this)),e.register(\"getAllClientsInContextGroup\",this.getAllClientsInContextGroup.bind(this)),e.register(\"getInfoForContextGroup\",this.getInfoForContextGroup.bind(this)),e.register(\"contextHandlerRegistered\",this.contextHandlerRegistered.bind(this)),e.register(\"intentHandlerRegistered\",this.intentHandlerRegistered.bind(this)),e.register(\"removeContextHandler\",this.removeContextHandler.bind(this)),e.register(\"sessionContextGroup:createIfNeeded\",this.handleJoinSessionContextGroup.bind(this)),e.register(\"fdc3Open\",this.fdc3HandleOpen.bind(this)),e.register(\"fdc3v2FindIntentsByContext\",this.handleInfoForIntentsByContext.bind(this)),e.register(\"fdc3FindInstances\",this.fdc3HandleFindInstances.bind(this)),e.register(\"fdc3GetAppMetadata\",this.fdc3HandleGetAppMetadata.bind(this)),e.register(\"fdc3v2GetInfo\",(async(e,t)=>this.fdc3HandleGetInfo.bind(this)(e,t))),e.register(\"createPrivateChannelProvider\",(async e=>{const{channelId:t}=e,n=await this.fin.InterApplicationBus.Channel.create(t);p.PrivateChannelProvider.init(n,t)}))}isConnectionAuthorized(e,t){return this.wire.sendAction(\"interop-broker-is-connection-authorized\").catch((e=>{})),Promise.resolve(!0)}isActionAuthorized(e,t,n){return this.wire.sendAction(\"interop-broker-is-action-authorized\").catch((e=>{})),Promise.resolve(!0)}};return Gi.InteropBroker=f,e=new WeakMap,t=new WeakMap,n=new WeakMap,Gi}var zi,Ki={},qi={},Ji=s&&s.__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},Yi=s&&s.__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)};Object.defineProperty(qi,\"__esModule\",{value:!0});const Zi=d,Qi=Hi;class Xi extends Zi.Base{constructor(e,t,n){super(e),zi.set(this,void 0),this.id=n,Ji(this,zi,t,\"f\")}async setContext(e){this.wire.sendAction(\"interop-session-context-group-set-context\").catch((e=>{}));return(await Yi(this,zi,\"f\")).dispatch(`sessionContextGroup:setContext-${this.id}`,{sessionContextGroupId:this.id,context:e})}async getCurrentContext(e){this.wire.sendAction(\"interop-session-context-group-get-context\").catch((e=>{}));return(await Yi(this,zi,\"f\")).dispatch(`sessionContextGroup:getContext-${this.id}`,{sessionContextGroupId:this.id,type:e})}async addContextHandler(e,t){if(this.wire.sendAction(\"interop-session-context-group-add-handler\").catch((e=>{})),\"function\"!=typeof e)throw new Error(\"Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.\");const n=await Yi(this,zi,\"f\");let i;return i=t?`sessionContextHandler:invoke-${this.id}-${t}-${(0,Qi.generateId)()}`:`sessionContextHandler:invoke-${this.id}`,n.register(i,(0,Qi.wrapContextHandler)(e,i)),await n.dispatch(`sessionContextGroup:handlerAdded-${this.id}`,{handlerId:i,contextType:t}),{unsubscribe:await this.createUnsubscribeCb(i)}}async createUnsubscribeCb(e){const t=await Yi(this,zi,\"f\");return async()=>{t.remove(e),await t.dispatch(`sessionContextGroup:handlerRemoved-${this.id}`,{handlerId:e})}}getUserInstance(){return{id:this.id,setContext:(0,Qi.wrapInTryCatch)(this.setContext.bind(this),\"Failed to set context: \"),getCurrentContext:(0,Qi.wrapInTryCatch)(this.getCurrentContext.bind(this),\"Failed to get context: \"),addContextHandler:(0,Qi.wrapInTryCatch)(this.addContextHandler.bind(this),\"Failed to add context handler: \")}}}qi.default=Xi,zi=new WeakMap;var er={},tr={},nr={},ir={},rr=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),or=s&&s.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,\"default\",{enumerable:!0,value:t})}:function(e,t){e.default=t}),sr=s&&s.__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)&&rr(t,e,n);return or(t,e),t};Object.defineProperty(ir,\"__esModule\",{value:!0}),ir.PrivateChannelClient=void 0;const ar=sr(Hi);var cr,dr;function hr(){if(cr)return tr;cr=1;var e,t=s&&s.__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)},n=s&&s.__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},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(tr,\"__esModule\",{value:!0}),tr.FDC3ModuleBase=void 0;const o=nr,a=Hi,c=wr(),d=r(i);return tr.FDC3ModuleBase=class{get client(){return t(this,e,\"f\").call(this)}get fin(){return this.wire.getFin()}constructor(t,i){this.wire=i,e.set(this,void 0),n(this,e,t,\"f\")}async broadcast(e){return this.wire.sendAction(\"fdc3-broadcast\").catch((e=>{})),this.client.setContext(e)}async _open(e,t){this.wire.sendAction(\"fdc3-open\").catch((e=>{}));try{return await c.InteropClient.ferryFdc3Call(this.client,\"fdc3Open\",{app:e,context:t})}catch(e){const t=e.message===a.BROKER_ERRORS.fdc3Open?\"ResolverUnavailable\":e.message;throw new Error(t)}}async _getChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:\"system\",...(0,o.getUnsupportedChannelApis)()})))}async getOrCreateChannel(e){this.wire.sendAction(\"fdc3-get-or-create-channel\").catch((e=>{}));const t=(await this._getChannels()).find((t=>t.id===e));if(t)return{...t,type:\"system\",...(0,o.getUnsupportedChannelApis)()};try{const t=await this.client.joinSessionContextGroup(e);return(0,o.buildAppChannelObject)(t)}catch(e){throw console.error(e.message),new Error(o.ChannelError.CreationFailed)}}async getSystemChannels(){return this.wire.sendAction(\"fdc3-get-system-channels\").catch((e=>{})),this._getChannels()}async joinChannel(e){this.wire.sendAction(\"fdc3-join-channel\").catch((e=>{}));try{return await this.client.joinContextGroup(e)}catch(e){if(e.message===a.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup?console.error(\"The Channel you have tried to join is an App Channel. Custom Channels can only be defined by the Interop Broker through code or manifest configuration. Please use getOrCreateChannel.\"):console.error(e.message),e.message.startsWith(\"Attempting to join a context group that does not exist\"))throw new Error(o.ChannelError.NoChannelFound);throw new Error(o.ChannelError.AccessDenied)}}async getCurrentChannel(){this.wire.sendAction(\"fdc3-get-current-channel\").catch((e=>{}));const e=await this.getCurrentContextGroupInfo();return e?this.buildChannelObject(e):null}async leaveCurrentChannel(){return this.wire.sendAction(\"fdc3-leave-current-channel\").catch((e=>{})),this.client.removeFromContextGroup()}async getCurrentContextGroupInfo(){const e=await this.client.getContextGroups(),t=e.map((async e=>this.client.getAllClientsInContextGroup(e.id))),n=(await Promise.all(t)).findIndex((e=>e.some((e=>{const{uuid:t,name:n}=e;return this.wire.me.uuid===t&&this.wire.me.name===n}))));return e[n]}async buildChannelObject(e){return{...e,type:\"system\",addContextListener:(...[e,t])=>{let n,i;\"function\"==typeof e?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),n=e):(n=t,\"string\"==typeof e&&(i=e));const r=(async()=>{let e=!0;const t=await this.client.getCurrentContext(i);return this.client.addContextHandler(((i,r)=>{if(!e||(e=!1,!(0,d.default)(t,i)))return n(i,r)}),i)})();return{...r,unsubscribe:()=>r.then((e=>e.unsubscribe()))}},broadcast:this.broadcast.bind(this),getCurrentContext:async e=>{const t=await this.client.getCurrentContext(e);return void 0===t?null:t}}}},e=new WeakMap,tr}ir.PrivateChannelClient=class{constructor(e,t){this.id=t,this.client=e,this.listeners=new Map}async broadcast(e){return this.client.dispatch(\"broadcast\",{context:e})}async getCurrentContext(e){return this.client.dispatch(\"getCurrentContext\",{contextType:e})}async addContextListener(e,t){if(\"function\"!=typeof t)throw new Error(\"Non-function argument passed to the second parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.\");let n;n=e?`contextHandler:invoke-${this.id}-${e}-${ar.generateId()}`:`contextHandler:invoke-${this.id}-${ar.generateId()}`,this.client.register(n,ar.wrapContextHandler(t,n));const i={unsubscribe:await this.createContextUnsubscribeCb(n)};return this.listeners.set(n,i),await this.client.dispatch(\"contextHandlerAdded\",{handlerId:n,contextType:e}),i}createNonStandardUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch(\"nonStandardHandlerRemoved\",{handlerId:e})}}createContextUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch(\"contextHandlerRemoved\",{handlerId:e})}}onAddContextListener(e){const t=`onContextHandlerAdded:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch(\"onAddContextHandlerAdded\",{handlerId:t}),n}onDisconnect(e){const t=`onDisconnect:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch(\"onDisconnectHandlerAdded\",{handlerId:t}),n}onUnsubscribe(e){const t=`onUnsubscribe:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch(\"onUnsubscribeHandlerAdded\",{handlerId:t}),n}async cleanUpAllSubs(){Array.from(this.listeners.keys()).forEach((e=>{this.client.remove(e),this.listeners.delete(e)}))}async disconnect(){try{await this.client.dispatch(\"clientDisconnecting\"),await this.cleanUpAllSubs(),await this.client.disconnect()}catch(e){throw new Error(e.message)}}},function(e){var t=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,\"__esModule\",{value:!0}),e.getIntentResolution=e.isChannel=e.isContext=e.connectPrivateChannel=e.buildAppChannelObject=e.buildPrivateChannelObject=e.ChannelError=e.ResultError=e.UnsupportedChannelApiError=e.getUnsupportedChannelApis=void 0;const n=Hi,r=ir,o=t(i);e.getUnsupportedChannelApis=e=>({addContextListener:()=>{throw new a(\"Channel.addContextListener\",e)},broadcast:()=>{throw new a(\"Channel.broadcast\",e)},getCurrentContext:()=>{throw new a(\"Channel.getCurrentContext\",e)}});class a extends Error{constructor(e,t=\"System\"){super(e),this.message=`Calling ${e} on an instance of a ${t} Channel returned by fdc3.get${t}Channels is not supported. If you would like to use a ${t} Channel, please use fdc3.joinChannel, fdc3.addContextListener, and fdc3.broadcast instead.`}}var c,d;e.UnsupportedChannelApiError=a,function(e){e.NoResultReturned=\"NoResultReturned\",e.IntentHandlerRejected=\"IntentHandlerRejected\"}(c=e.ResultError||(e.ResultError={})),(d=e.ChannelError||(e.ChannelError={})).NoChannelFound=\"NoChannelFound\",d.AccessDenied=\"AccessDenied\",d.CreationFailed=\"CreationFailed\";e.buildPrivateChannelObject=e=>{let t=!1;const n=()=>{if(t)throw new Error(\"Private Channel Client has been disconnected from the Private Channel\")};return{id:e.id,type:\"private\",broadcast:async t=>(n(),e.broadcast(t)),getCurrentContext:async t=>(n(),e.getCurrentContext(t)),addContextListener:async(t,i)=>{n();let r=i,o=t;\"function\"==typeof t&&(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),r=t,o=null);return e.addContextListener(o,r)},onAddContextListener:t=>(n(),e.onAddContextListener(t)),disconnect:async()=>(n(),t=!0,e.disconnect()),onDisconnect:t=>(n(),e.onDisconnect(t)),onUnsubscribe:t=>(n(),e.onUnsubscribe(t))}};e.buildAppChannelObject=e=>({id:e.id,type:\"app\",broadcast:e.setContext,getCurrentContext:async t=>{const n=await e.getCurrentContext(t);return void 0===n?null:n},addContextListener:(t,n)=>{let i,r;\"function\"==typeof t?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),i=t):(i=n,\"string\"==typeof t&&(r=t));const s=(async()=>{let t=!0;const n=await e.getCurrentContext(r);return e.addContextHandler(((e,r)=>{if(!t||(t=!1,!(0,o.default)(n,e)))return i(e,r)}),r)})();return{...s,unsubscribe:()=>s.then((e=>e.unsubscribe()))}}});e.connectPrivateChannel=async t=>{try{const n=await fin.InterApplicationBus.Channel.connect(t),i=new r.PrivateChannelClient(n,t);return(0,e.buildPrivateChannelObject)(i)}catch(e){throw new Error(`Private Channel with id: ${t} doesn't exist`)}};e.isContext=e=>{if(e&&\"object\"==typeof e&&\"type\"in e){const{type:t}=e;return\"string\"==typeof t}return!1};e.isChannel=e=>{if(e&&\"object\"==typeof e&&\"type\"in e&&\"id\"in e){const{type:t,id:n}=e;return\"string\"==typeof t&&\"string\"==typeof n&&(\"app\"===t||\"private\"===t)}return!1};e.getIntentResolution=async(t,i,r,o)=>{const s=(0,n.generateId)(),a=new Promise(((e,t)=>{fin.InterApplicationBus.subscribe({uuid:\"*\"},s,(t=>{e(t)})).catch((()=>t(new Error(\"getResult is not supported in this environment\"))))})),d=r?{target:r,intentResolutionResultId:s}:{intentResolutionResultId:s},h=o?{name:o,context:i,metadata:d}:{...i,metadata:d},l=async()=>{let n=await a;if(!n||\"object\"!=typeof n)throw new Error(c.NoResultReturned);const{error:i}=n;if(i)throw new Error(c.IntentHandlerRejected);if((0,e.isChannel)(n)){const{id:i,type:r}=n;switch(r){case\"private\":n=await(0,e.connectPrivateChannel)(i);break;case\"app\":{const r=await t.joinSessionContextGroup(i);n=(0,e.buildAppChannelObject)(r);break}}}else if(!(0,e.isContext)(n))throw new Error(c.NoResultReturned);return n},u=o?await t.fireIntent(h):await t.fireIntentForContext(h);return\"object\"!=typeof u?{source:{appId:\"\",instanceId:\"\"},intent:\"\",version:\"2.0\",getResult:l}:{...u,getResult:l}}}(nr);var lr,ur,pr={};function wr(){if(ur)return Ki;ur=1;var e,t,n=s&&s.__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},i=s&&s.__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)},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ki,\"__esModule\",{value:!0}),Ki.InteropClient=void 0;const o=d,a=r(qi),c=function(){if(dr)return er;dr=1,Object.defineProperty(er,\"__esModule\",{value:!0}),er.Fdc3Module=void 0;const e=Hi,t=hr();class n extends t.FDC3ModuleBase{async open(e,t){await super._open(e,t)}addContextListener(e,t){let n;return this.wire.sendAction(\"fdc3-add-context-listener\").catch((e=>{})),\"function\"==typeof e?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),n=this.client.addContextHandler(e)):n=this.client.addContextHandler(t,null===e?void 0:e),{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}addIntentListener(e,t){this.wire.sendAction(\"fdc3-add-intent-listener\").catch((e=>{}));const n=this.client.registerIntentHandler((e=>{const{context:n,metadata:i}=e,{metadata:r}=n,o=i?.intentResolutionResultId||r?.intentResolutionResultId;o&&this.fin.InterApplicationBus.publish(o,null).catch((()=>null)),t(e.context)}),e,{fdc3Version:\"1.2\"});return{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}async raiseIntent(t,n,i){this.wire.sendAction(\"fdc3-raise-intent\").catch((e=>{}));const r=i?{name:t,context:n,metadata:{target:i}}:{name:t,context:n};try{return await this.client.fireIntent(r)}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntent?\"ResolverUnavailable\":t.message;throw new Error(n)}}async findIntent(t,n){this.wire.sendAction(\"fdc3-find-intent\").catch((e=>{}));try{return await this.client.getInfoForIntent({name:t,context:n})}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntent?\"ResolverUnavailable\":t.message;throw new Error(n)}}async findIntentsByContext(t){this.wire.sendAction(\"fdc3-find-intents-by-context\").catch((e=>{}));try{return await this.client.getInfoForIntentsByContext(t)}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntentsByContext?\"ResolverUnavailable\":t.message;throw new Error(n)}}async raiseIntentForContext(t,n){this.wire.sendAction(\"fdc3-raise-intent-for-context\").catch((e=>{}));try{return await this.client.fireIntentForContext({...t,metadata:{target:n}})}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntentForContext?\"ResolverUnavailable\":t.message;throw new Error(n)}}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}getInfo(){return this.wire.sendAction(\"fdc3-get-info\").catch((e=>{})),{providerVersion:this.wire.environment.getAdapterVersionSync(),provider:`openfin-${this.wire.me.uuid}`,fdc3Version:\"1.2\"}}}return er.Fdc3Module=n,er}(),h=function(){if(lr)return pr;lr=1,Object.defineProperty(pr,\"__esModule\",{value:!0}),pr.Fdc3Module2=void 0;const e=hr(),t=Hi,n=wr(),i=nr,r=ir;class o extends e.FDC3ModuleBase{async open(e,t){return\"string\"==typeof e&&console.warn(\"Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).\"),super._open(e,t)}async findInstances(e){this.wire.sendAction(\"fdc3-find-instances\").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,\"fdc3FindInstances\",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3FindInstances?\"ResolverUnavailable\":e.message;throw new Error(n)}}async getAppMetadata(e){this.wire.sendAction(\"fdc3-get-app-metadata\").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,\"fdc3GetAppMetadata\",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3GetAppMetadata?\"ResolverUnavailable\":e.message;throw new Error(n)}}async addContextListener(e,t){this.wire.sendAction(\"fdc3-add-context-listener\").catch((e=>{}));const n=e=>t=>{const{contextMetadata:n,...i}=t,r=n?[{...i},n]:[t,null];e(...r)};let i=t,r=n(i);return\"function\"==typeof e?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),i=e,r=n(i),this.client.addContextHandler(r)):this.client.addContextHandler(r,null===e?void 0:e)}async findIntent(e,n,i){this.wire.sendAction(\"fdc3-find-intent\").catch((e=>{}));try{return await this.client.getInfoForIntent({name:e,context:n,metadata:{resultType:i}})}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntent?\"ResolverUnavailable\":e.message;throw new Error(n)}}async findIntentsByContext(e,i){this.wire.sendAction(\"fdc3-find-intents-by-context\").catch((e=>{}));const r=i?{context:e,metadata:{resultType:i}}:e;try{return await n.InteropClient.ferryFdc3Call(this.client,\"fdc3v2FindIntentsByContext\",r)}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntentsByContext?\"ResolverUnavailable\":e.message;throw new Error(n)}}async raiseIntent(e,n,r){this.wire.sendAction(\"fdc3-raise-intent\").catch((e=>{}));try{return\"string\"==typeof r&&console.warn(\"Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).\"),(0,i.getIntentResolution)(this.client,n,r,e)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?\"ResolverUnavailable\":e.message;throw new Error(n)}}async raiseIntentForContext(e,n){this.wire.sendAction(\"fdc3-raise-intent-for-context\").catch((e=>{}));try{return\"string\"==typeof n&&console.warn(\"Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).\"),(0,i.getIntentResolution)(this.client,e,n)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?\"ResolverUnavailable\":e.message;throw new Error(n)}}async addIntentListener(e,t){if(this.wire.sendAction(\"fdc3-add-intent-listener\").catch((e=>{})),\"string\"!=typeof e)throw new Error(\"First argument must be an Intent name\");return this.client.registerIntentHandler((async e=>{let n,i;const{context:r,metadata:o}=e,{contextMetadata:s,metadata:a,...c}=r,d=o?.intentResolutionResultId||a?.intentResolutionResultId;try{const e=a?{metadata:a,...c}:{...c};n=await t(e,s),i=n}catch(e){n=e,i={error:!0}}if(d&&this.fin.InterApplicationBus.publish(d,i).catch((()=>null)),n instanceof Error)throw new Error(n.message);return n}),e,{fdc3Version:\"2.0\"})}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}async createPrivateChannel(){const e=(0,t.generateId)();await n.InteropClient.ferryFdc3Call(this.client,\"createPrivateChannelProvider\",{channelId:e});const o=await this.fin.InterApplicationBus.Channel.connect(e),s=new r.PrivateChannelClient(o,e);return(0,i.buildPrivateChannelObject)(s)}async getUserChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:\"user\",...(0,i.getUnsupportedChannelApis)(\"User\")})))}async getSystemChannels(){return console.warn(\"This API has been deprecated. Please use fdc3.getUserChannels instead.\"),super.getSystemChannels()}async joinUserChannel(e){return super.joinChannel(e)}async joinChannel(e){return console.warn(\"This API has been deprecated. Please use fdc3.joinUserChannel instead.\"),super.joinChannel(e)}async getCurrentChannel(){const e=await super.getCurrentChannel();return e?{...e,type:\"user\",broadcast:this.broadcast.bind(this)}:null}async getInfo(){return n.InteropClient.ferryFdc3Call(this.client,\"fdc3v2GetInfo\",{fdc3Version:\"2.0\"})}}return pr.Fdc3Module2=o,pr}(),l=Hi;let u=class extends o.Base{constructor(i,r){super(i),e.set(this,void 0),t.set(this,void 0),n(this,t,new Map,\"f\"),n(this,e,r,\"f\")}async setContext(t){this.wire.sendAction(\"interop-client-set-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"setContext\",{context:t})}async addContextHandler(t,n){if(this.wire.sendAction(\"interop-client-add-context-handler\").catch((e=>{})),\"function\"!=typeof t)throw new Error(\"Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.\");const r=await i(this,e,\"f\");let o;o=n?`invokeContextHandler-${n}-${(0,l.generateId)()}`:\"invokeContextHandler\";const s=(0,l.wrapContextHandler)(t,o);return r.register(o,s),await r.dispatch(\"contextHandlerRegistered\",{handlerId:o,contextType:n}),{unsubscribe:async()=>{r.remove(o),await r.dispatch(\"removeContextHandler\",{handlerId:o})}}}async getContextGroups(){this.wire.sendAction(\"interop-client-get-context-groups\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getContextGroups\")}async joinContextGroup(t,n){this.wire.sendAction(\"interop-client-join-context-group\").catch((e=>{}));const r=await i(this,e,\"f\");if(!t)throw new Error(\"No contextGroupId specified for joinContextGroup.\");return r.dispatch(\"joinContextGroup\",{contextGroupId:t,target:n})}async removeFromContextGroup(t){this.wire.sendAction(\"interop-client-remove-from-context-group\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"removeFromContextGroup\",{target:t})}async getAllClientsInContextGroup(t){this.wire.sendAction(\"interop-client-get-all-clients-in-context-group\").catch((e=>{}));const n=await i(this,e,\"f\");if(!t)throw new Error(\"No contextGroupId specified for getAllClientsInContextGroup.\");return n.dispatch(\"getAllClientsInContextGroup\",{contextGroupId:t})}async getInfoForContextGroup(t){this.wire.sendAction(\"interop-client-get-info-for-context-group\").catch((e=>{}));const n=await i(this,e,\"f\");if(!t)throw new Error(\"No contextGroupId specified for getInfoForContextGroup.\");return n.dispatch(\"getInfoForContextGroup\",{contextGroupId:t})}async fireIntent(t){this.wire.sendAction(\"interop-client-fire-intent\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"fireIntent\",t)}async registerIntentHandler(t,n,r){this.wire.sendAction(\"interop-client-register-intent-handler\").catch((e=>{}));const o=await i(this,e,\"f\"),s=`intent-handler-${n}`,a=(0,l.wrapIntentHandler)(t,s);try{await o.register(s,a),await o.dispatch(\"intentHandlerRegistered\",{handlerId:s,...r})}catch(e){throw new Error(\"Unable to register intent handler\")}return{unsubscribe:async()=>{o.remove(s)}}}async getCurrentContext(t){this.wire.sendAction(\"interop-client-get-current-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getCurrentContext\",{contextType:t})}async getInfoForIntent(t){this.wire.sendAction(\"interop-client-get-info-for-intent\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getInfoForIntent\",t)}async getInfoForIntentsByContext(t){this.wire.sendAction(\"interop-client-get-info-for-intents-by-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getInfoForIntentsByContext\",t)}async fireIntentForContext(t){this.wire.sendAction(\"interop-client-fire-intent-for-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"fireIntentForContext\",t)}async joinSessionContextGroup(n){try{const r=i(this,t,\"f\").get(n);if(r)return r.getUserInstance();const o=await i(this,e,\"f\"),{hasConflict:s}=await o.dispatch(\"sessionContextGroup:createIfNeeded\",{sessionContextGroupId:n});s&&console.warn(`A (non-session) context group with the name \"${n}\" already exists. If you are trying to join a Context Group, call joinContextGroup instead.`);const c=new a.default(this.wire,i(this,e,\"f\"),n);return i(this,t,\"f\").set(n,c),c.getUserInstance()}catch(e){throw console.error(`Error thrown trying to create Session Context Group with id \"${n}\": ${e}`),e}}async onDisconnection(t){this.wire.sendAction(\"interop-client-add-ondisconnection-listener\").catch((e=>{}));return(await i(this,e,\"f\")).onDisconnection((e=>{const{uuid:n}=e;t({type:\"interop-broker\",topic:\"disconnected\",brokerName:n})}))}getFDC3Sync(e){switch(e){case\"1.2\":return new c.Fdc3Module((()=>this),this.wire);case\"2.0\":return new h.Fdc3Module2((()=>this),this.wire);default:throw new Error(`Invalid FDC3 version provided: ${e}. Must be '1.2' or '2.0'`)}}async getFDC3(e){return this.getFDC3Sync(e)}static async ferryFdc3Call(t,n,r){return(await i(t,e,\"f\")).dispatch(n,r||null)}};return Ki.InteropClient=u,e=new WeakMap,t=new WeakMap,Ki}var yr,fr,gr,mr={};function vr(){if(yr)return mr;yr=1,Object.defineProperty(mr,\"__esModule\",{value:!0}),mr.overrideCheck=mr.checkFDC32Overrides=mr.getDefaultViewFdc3VersionFromAppInfo=void 0;const e=Vi();function t(t){return[\"fdc3HandleFindInstances\",\"handleInfoForIntent\",\"handleInfoForIntentsByContext\",\"fdc3HandleGetAppMetadata\",\"fdc3HandleGetInfo\",\"fdc3HandleOpen\",\"handleFiredIntent\",\"handleFiredIntentForContext\"].filter((n=>t[n]===e.InteropBroker.prototype[n]))}return mr.getDefaultViewFdc3VersionFromAppInfo=function({manifest:e,initialOptions:t}){const n=e?.platform?.defaultViewOptions?.fdc3InteropApi??t.defaultViewOptions?.fdc3InteropApi;return[\"1.2\",\"2.0\"].includes(n??\"\")?n:void 0},mr.checkFDC32Overrides=t,mr.overrideCheck=function(e,n){if(n&&\"2.0\"===n){const n=t(e);n.length>0&&console.warn(`WARNING: FDC3 2.0 has been set as a default option for Views in this Platform, but the required InteropBroker APIs for FDC3 2.0 compliance have not all been overridden.\\nThe following APIs need to be overridden:\\n${n.join(\"\\n\")}`)}},mr}function Cr(){return gr||(gr=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),i=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),i(function(){if(fr)return Ti;fr=1;var e=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ti,\"__esModule\",{value:!0}),Ti.InteropModule=void 0;const t=e(n),i=$i,r=d,o=Vi(),a=wr(),c=vr(),h=Tn,l=e=>new e,u=\"You have attempted to use or modify InteropBroker parameters, which is not allowed. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.\";class p extends r.Base{async init(e,n=l){this.wire.sendAction(\"interop-init\").catch((()=>{}));const r=await this.wire.environment.getInteropInfo(this.wire.getFin()),s=(0,i.createUnusableObject)(u),a=(0,i.createWarningObject)(u,(0,t.default)(r)),d=async()=>{throw new Error(u)},p=o.InteropBroker.createClosedConstructor(this.wire,(()=>this.fin.InterApplicationBus.Channel.create(`interop-broker-${e}`)),r);let w;return w=Array.isArray(n)?new((0,h.overrideFromComposables)(...n)(p))(s,d,a):await n(p,s,d,a),(0,c.overrideCheck)(w,r.fdc3Version),w}connectSync(e,t){return this.wire.sendAction(\"interop-connect-sync\").catch((()=>{})),new a.InteropClient(this.wire,this.wire.environment.whenReady().then((()=>this.fin.InterApplicationBus.Channel.connect(`interop-broker-${e}`,{payload:t}))))}}return Ti.InteropModule=p,Ti}(),e),i(wr(),e),i(Vi(),e)}(Li)),Li}var br={},Ir={},Er={},xr={};Object.defineProperty(xr,\"__esModule\",{value:!0}),xr.getSnapshotSourceChannelName=void 0;xr.getSnapshotSourceChannelName=e=>`snapshot-source-provider-${e.uuid}`;var Ar,Pr,Mr,_r,Or,Sr=s&&s.__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},Rr=s&&s.__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)};Object.defineProperty(Er,\"__esModule\",{value:!0}),Er.SnapshotSource=void 0;const Fr=d,jr=xr,kr=new Map;class Lr extends Fr.Base{constructor(e,t){super(e),Ar.set(this,void 0),Pr.set(this,(()=>(kr.has(this.identity.uuid)||kr.set(this.identity.uuid,{eventFired:null,clientPromise:null}),kr.get(this.identity.uuid)))),Mr.set(this,(()=>(Rr(this,Pr,\"f\").call(this).clientPromise||(Rr(this,Pr,\"f\").call(this).clientPromise=Rr(this,_r,\"f\").call(this)),Rr(this,Pr,\"f\").call(this).clientPromise))),_r.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);try{Rr(this,Pr,\"f\").call(this).eventFired||await Rr(this,Or,\"f\").call(this);const t=await this.fin.InterApplicationBus.Channel.connect(e,{wait:!1});return t.onDisconnection((()=>{Rr(this,Pr,\"f\").call(this).clientPromise=null,Rr(this,Pr,\"f\").call(this).eventFired=null})),t}catch(e){throw Rr(this,Pr,\"f\").call(this).clientPromise=null,new Error(\"The targeted SnapshotSource is not currently initialized. Await this object's ready() method.\")}})),Or.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);let t,n;const i=new Promise(((e,i)=>{t=e,n=i}));Rr(this,Pr,\"f\").call(this).eventFired=i;const r=async i=>{try{i.channelName===e&&(t(),await this.fin.InterApplicationBus.Channel.removeListener(\"connected\",r))}catch(e){n(e)}};await this.fin.InterApplicationBus.Channel.on(\"connected\",r)})),Sr(this,Ar,t,\"f\")}get identity(){return Rr(this,Ar,\"f\")}async ready(){this.wire.sendAction(\"snapshot-source-ready\").catch((e=>{}));try{await Rr(this,Mr,\"f\").call(this)}catch(e){await Rr(this,Pr,\"f\").call(this).eventFired}}async getSnapshot(){this.wire.sendAction(\"snapshot-source-get-snapshot\").catch((e=>{}));const e=await Rr(this,Mr,\"f\").call(this),t=await e.dispatch(\"get-snapshot\");return(await t).snapshot}async applySnapshot(e){this.wire.sendAction(\"snapshot-source-apply-snapshot\").catch((e=>{}));return(await Rr(this,Mr,\"f\").call(this)).dispatch(\"apply-snapshot\",{snapshot:e})}}Er.SnapshotSource=Lr,Ar=new WeakMap,Pr=new WeakMap,Mr=new WeakMap,_r=new WeakMap,Or=new WeakMap,Object.defineProperty(Ir,\"__esModule\",{value:!0}),Ir.SnapshotSourceModule=void 0;const Tr=d,$r=Er,Br=xr;class Gr extends Tr.Base{async init(e){if(this.wire.sendAction(\"snapshot-source-init\").catch((e=>{})),\"object\"!=typeof e||\"function\"!=typeof e.getSnapshot||\"function\"!=typeof e.applySnapshot)throw new Error(\"you must pass in a valid SnapshotProvider\");const t=await this.fin.InterApplicationBus.Channel.create((0,Br.getSnapshotSourceChannelName)(this.fin.me));t.register(\"get-snapshot\",(async()=>({snapshot:await e.getSnapshot()}))),t.register(\"apply-snapshot\",(({snapshot:t})=>e.applySnapshot(t)))}wrapSync(e){return this.wire.sendAction(\"snapshot-source-wrap-sync\").catch((e=>{})),new $r.SnapshotSource(this.wire,e)}async wrap(e){return this.wire.sendAction(\"snapshot-source-wrap\").catch((e=>{})),this.wrapSync(e)}}Ir.SnapshotSourceModule=Gr,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Ir,e),n(Er,e)}(br),Object.defineProperty(a,\"__esModule\",{value:!0});var Wr=a.Fin=void 0;const Hr=t,Nr=c,Dr=ie(),Ur=Z(),Vr=de,zr=en,Kr=rn,qr=un,Jr=bn,Yr=J(),Zr=An,Qr=ki,Xr=Cr(),eo=br;class to extends Hr.EventEmitter{constructor(e){super(),this.wire=e,this.System=new Nr.System(e),this.Window=new Dr._WindowModule(e),this.Application=new Ur.ApplicationModule(e),this.InterApplicationBus=new Vr.InterApplicationBus(e),this.Clipboard=new zr.Clipboard(e),this.ExternalApplication=new Kr.ExternalApplicationModule(e),this.Frame=new qr._FrameModule(e),this.GlobalHotkey=new Jr.GlobalHotkey(e),this.Platform=new Zr.PlatformModule(e,this.InterApplicationBus.Channel),this.View=new Yr.ViewModule(e),this.Interop=new Xr.InteropModule(e),this.SnapshotSource=new eo.SnapshotSourceModule(e),e.registerFin(this),this.me=(0,Qr.getMe)(e),e.on(\"disconnected\",(()=>{this.emit(\"disconnected\")}))}}Wr=a.Fin=to;var no={},io={};function ro(e){return\"string\"==typeof e.manifestUrl}function oo(e){return ao(e)&&\"string\"==typeof e.address}function so(e){return oo(e)&&\"string\"==typeof e.token}function ao(e){return\"string\"==typeof e.uuid}function co(e){return e.runtime&&\"string\"==typeof e.runtime.version}function ho(e){return ao(e)&&co(e)}Object.defineProperty(io,\"__esModule\",{value:!0}),io.isInternalConnectConfig=io.isPortDiscoveryConfig=io.isNewConnectConfig=io.isConfigWithReceiver=io.isRemoteConfig=io.isExistingConnectConfig=io.isExternalConfig=void 0,io.isExternalConfig=ro,io.isExistingConnectConfig=oo,io.isRemoteConfig=so,io.isConfigWithReceiver=function(e){return\"object\"==typeof e.receiver&&so({...e,address:\"\"})},io.isNewConnectConfig=ho,io.isPortDiscoveryConfig=function(e){return ro(e)&&co(e)||ho(e)},io.isInternalConnectConfig=function(e){return oo(e)||ho(e)};var lo={},uo={};Object.defineProperty(uo,\"__esModule\",{value:!0}),uo.EmitterMap=void 0;const po=t;function wo(e){return Buffer.from(e).toString(\"base64\")}uo.EmitterMap=class{constructor(){this.storage=new Map}hashKeys(e){return e.map(wo).join(\"/\")}getOrCreate(e){const t=this.hashKeys(e);return this.storage.has(t)||this.storage.set(t,new po.EventEmitter),this.storage.get(t)}has(e){return this.storage.has(this.hashKeys(e))}delete(e){const t=this.hashKeys(e);return this.storage.delete(t)}},Object.defineProperty(lo,\"__esModule\",{value:!0});const yo=uo;class fo extends yo.EmitterMap{constructor(){super(...arguments),this.dispatchEvent=e=>{if(function(e){return\"process-desktop-event\"===e.action}(e)){const{payload:t}=e,n=function(e){const{topic:t}=e;if(\"frame\"===t||\"window\"===t||\"view\"===t){const{uuid:n,name:i}=e;return[t,n,i]}if(\"application\"===t){const{uuid:n}=e;return[t,n]}return[t]}(t);if(this.has(n))return this.getOrCreate(n).emit(t.type,t),!0}return!1}}}lo.default=fo;var go,mo,vo=s&&s.__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},Co=s&&s.__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)},bo=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(no,\"__esModule\",{value:!0});var Io=no.Transport=void 0;const Eo=t,xo=io,Ao=g,Po=bo(lo),Mo=ki,_o=ke;class Oo extends Eo.EventEmitter{constructor(e,t,n){super(),this.wireListeners=new Map,this.topicRefMap=new Map,this.eventAggregator=new Po.default,this.messageHandlers=[this.eventAggregator.dispatchEvent],go.set(this,void 0),mo.set(this,void 0),this.connectSync=()=>{Co(this,go,\"f\").connectSync()},this.getPort=()=>Co(this,go,\"f\").getPort(),vo(this,go,new e(this.onmessage.bind(this)),\"f\"),this.environment=t,this.sendRaw=Co(this,go,\"f\").send.bind(Co(this,go,\"f\")),this.registerMessageHandler(this.handleMessage.bind(this)),Co(this,go,\"f\").on(\"disconnected\",(()=>{for(const[,{handleNack:e}]of this.wireListeners)e({reason:\"Remote connection has closed\"});this.wireListeners.clear(),this.emit(\"disconnected\")}));const{uuid:i,name:r}=n,o=this.environment.getCurrentEntityType();this.me=(0,Mo.getBaseMe)(o,i,r)}getFin(){if(!Co(this,mo,\"f\"))throw new Error(\"No Fin object registered for this transport\");return Co(this,mo,\"f\")}registerFin(e){if(Co(this,mo,\"f\"))throw new Error(\"Fin object has already been registered for this transport\");vo(this,mo,e,\"f\")}shutdown(){return Co(this,go,\"f\").shutdown()}async connect(e){if((0,xo.isConfigWithReceiver)(e))return await Co(this,go,\"f\").connect(e.receiver),this.authorize(e);if((0,xo.isRemoteConfig)(e))return this.connectRemote(e);if((0,xo.isExistingConnectConfig)(e))return this.connectByPort(e);if((0,xo.isNewConnectConfig)(e)){const t=await this.environment.retrievePort(e);return this.connectByPort({...e,address:`ws://localhost:${t}`})}}async connectRemote(e){return await Co(this,go,\"f\").connect(new(this.environment.getWsConstructor())(e.address)),this.authorize(e)}async connectByPort(e){const{address:t,uuid:n}=e,i={...e,type:\"file-token\"},r=Co(this,go,\"f\");await r.connect(new(this.environment.getWsConstructor())(e.address));const o=await this.sendAction(\"request-external-authorization\",{uuid:n,type:\"file-token\"},!0);if(\"external-authorization-response\"!==o.action)throw new Ao.UnexpectedActionError(o.action);return await this.environment.writeToken(o.payload.file,o.payload.token),this.authorize(i)}async authorize(e){const t=await this.sendAction(\"request-authorization\",e,!0);if(\"authorization-response\"!==t.action)throw new Ao.UnexpectedActionError(t.action);if(!0!==t.payload.success)throw new Ao.RuntimeError(t.payload)}sendAction(e,t={},n=!1){let i=()=>{};const r=Ao.RuntimeError.getCallSite(1),o=this.environment.getNextMessageId(),s=new Promise(((s,a)=>{i=a;const c={action:e,payload:t,messageId:o},d=Co(this,go,\"f\");return this.addWireListener(o,s,(e=>this.nackHandler(e,a,r)),n),d.send(c).catch(a)}));return Object.assign(s,{cancel:i,messageId:o})}nackHandler(e,t,n){t(\"string\"==typeof e?e:new Ao.RuntimeError(e,n))}ferryAction(e){return new Promise(((t,n)=>{const i=this.environment.getNextMessageId();e.messageId=i;const r=e=>{t(e.payload)};return Co(this,go,\"f\").send(e).then((()=>this.addWireListener(i,r,(e=>this.nackHandler(e,n)),!1))).catch(n)}))}registerMessageHandler(e){this.messageHandlers.push(e)}addWireListener(e,t,n,i){i?this.uncorrelatedListener=t:this.wireListeners.has(e)?n({reason:\"Duplicate handler id\",error:(0,_o.errorToPOJO)(new Ao.DuplicateCorrelationError(String(e)))}):this.wireListeners.set(e,{resolve:t,handleNack:n})}onmessage(e){for(const t of this.messageHandlers)t.call(null,e)}handleMessage(e){const t=e.correlationId||NaN;if(\"correlationId\"in e){if(!this.wireListeners.has(t))return!1;{const{resolve:n,handleNack:i}=this.wireListeners.get(t);\"ack\"!==e.action?i({reason:\"Did not receive ack action\",error:(0,_o.errorToPOJO)(new Ao.NoAckError(e.action))}):\"payload\"in e?e.payload.success?n.call(null,e):i(e.payload):\"string\"==typeof e.reason?i(e):(console.warn(\"Received invalid response from core\",e),i({reason:\"invalid response shape\"})),this.wireListeners.delete(t)}}else this.uncorrelatedListener&&this.uncorrelatedListener.call(null,e),this.uncorrelatedListener=()=>{};return!0}}Io=no.Transport=Oo,go=new WeakMap,mo=new WeakMap;const So=(...e)=>({log:(...t)=>console.debug(`[${(new Date).toISOString()}]`,...(e=>e.map((e=>`[${e}]`)))(e),...t),getLogger:(...t)=>So(...e,...t)}),Ro=So(\"@openfin/core-web/client\");function Fo(e,t){if(!function(e){return\"string\"==typeof e}(e))throw new Error(`Property ${t} has invalid type. Expected string, got ${typeof e}.`)}const jo=\"web-broker-ports-ready\",ko=Ro.getLogger(\"get-web-interop-ports\");function Lo(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)}function To(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}\"function\"==typeof SuppressedError&&SuppressedError;const $o=e=>{var n,i,r;return r=class extends t.EventEmitter{constructor(t){super(),n.set(this,void 0),i.set(this,!1),this.connectSync=()=>{Lo(this,i,\"f\")||(e.addEventListener(\"message\",(e=>{e.data?.topic?.startsWith(\"wire-message\")&&e.data.message&&Lo(this,n,\"f\").call(this,{...JSON.parse(e.data.message),ports:e.ports})})),e.start())},this.connect=async()=>{this.connectSync()},this.send=t=>(e.postMessage({topic:\"wire-message\",message:JSON.stringify(t)}),Promise.resolve()),this.shutdown=async()=>{e.close()},To(this,n,t,\"f\")}getPort(){return e}},n=new WeakMap,i=new WeakMap,r};var Bo={},Go={};Object.defineProperty(Go,\"__esModule\",{value:!0}),Go.BaseEnvironment=void 0;const Wo=vr();Go.BaseEnvironment=class{async getViewWindowIdentity(e,t){const{identity:n}=await e.View.wrapSync(t).getCurrentWindow();return n}async getInteropInfo(e){const t=await e.Application.getCurrentSync().getInfo().catch((()=>null)),n=t?.initialOptions?.interopBrokerConfiguration??{};return{fdc3Version:t?(0,Wo.getDefaultViewFdc3VersionFromAppInfo)(t):void 0,...n,fdc3Info:{providerVersion:await e.System.getVersion(),provider:\"OpenFin\"}}}},Object.defineProperty(Bo,\"__esModule\",{value:!0});var Ho=Bo.BrowserEnvironment=void 0;const No=Go;class Do extends No.BaseEnvironment{constructor(){super(...arguments),this.type=\"other\",this.getRandomId=()=>{const e=new Uint32Array(1);return window.crypto.getRandomValues(e)[0].toString(32)}}getAdapterVersionSync(){return\"\"}observeBounds(e,t){throw new Error(\"Method not implemented.\")}layoutAllowedInContext(e){return!1}initLayoutManager(e,t,n){throw new Error(\"Method not implemented.\")}applyLayoutSnapshot(e,t,n){throw new Error(\"Method not implemented.\")}createLayout(e,t){throw new Error(\"Method not implemented.\")}destroyLayout(e,t){throw new Error(\"Method not implemented.\")}resolveLayout(e,t){throw new Error(\"Method not implemented.\")}initPlatform(...e){throw new Error(\"Method not implemented.\")}writeToken(e,t){return Promise.resolve(\"\")}retrievePort(e){throw new Error(\"Method not implemented.\")}getNextMessageId(){return this.getRandomId()}createChildContent(e){throw new Error(\"Method not implemented.\")}getWebWindow(e){throw new Error(\"Method not implemented.\")}getCurrentEntityIdentity(){throw new Error(\"Method not implemented.\")}getCurrentEntityType(){return\"external connection\"}raiseEvent(e,t){throw new Error(\"Method not implemented.\")}getUrl(){return location.href}getDefaultChannelOptions(){return{create:{},connect:{}}}getRtcPeer(){return new RTCPeerConnection}getWsConstructor(){return WebSocket}whenReady(){return Promise.resolve()}}Ho=Bo.BrowserEnvironment=Do;const Uo=e=>\"platform\"in e&&void 0!==e.platform;var Vo,zo;class Ko extends Ho{constructor(e){super(),this.connectConfig=e,Vo.set(this,void 0),zo.set(this,new W((async()=>Promise.resolve().then((function(){return require(\"./main-b14f67c9.js\")}))))),Uo(e)&&this.validatePlatformOptions(e)}getAdapterVersionSync(){return\"0.39.21\"}validatePlatformOptions({platform:e}){if(!(\"layoutSnapshot\"in e))throw new Error(\"Platform options are missing layoutSnapshot. Please provide a layoutSnapshot in the platform options.\");if(\"windows\"in e||\"windows\"in e.layoutSnapshot)throw new Error(\"It appears you tried to call connect() with a snapshot object from an OpenFin desktop environment. Note that connect() expects to be called with a platform property with this structure: { platform: { layoutSnapshot } }. To get a layoutSnapshot of the expected structure, use fin.Platform.Layout.getCurrentLayoutManagerSync().getLayoutSnapshot() in v34+ in your desktop environment.\");const{layouts:t}=e.layoutSnapshot;Object.entries(t).map((([e,t])=>{if(\"object\"!=typeof t||null===t)throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must be an object.`);if(!(\"content\"in t))throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must contain a 'content' property.`)}))}async getInteropInfo(e){return{...{contextGroups:void 0,logging:{beforeAction:{enabled:!1},afterAction:{enabled:!1}}},fdc3Version:void 0,fdc3Info:{providerVersion:\"0.39.21\",provider:\"OpenFin Web\"}}}layoutAllowedInContext(e){return!0}async initLayoutManager(e,t,n){if(Lo(this,Vo,\"f\"))throw new Error(\"Layout already initialized.\");if(!Uo(this.connectConfig))throw new Error(\"Platform options are missing from connection config.\");const{WebLayoutEntryPoint:i}=await Lo(this,zo,\"f\").getValue();return To(this,Vo,new i(this.connectConfig),\"f\"),await Lo(this,Vo,\"f\").initLayoutManager(e,t,n)}async applyLayoutSnapshot(e,t,n){Lo(this,Vo,\"f\")?.applyLayoutSnapshot(e,t,n)}async createLayout(e,t){return Lo(this,Vo,\"f\")?.createLayout(e,t)}async destroyLayout(e,t){return Lo(this,Vo,\"f\")?.destroyLayout(e,t)}async getViewWindowIdentity(e,t){return Promise.resolve({uuid:t.uuid,name:t.uuid})}}Vo=new WeakMap,zo=new WeakMap;const qo=()=>{const e=((e,t)=>{const n=new RegExp(`^${t}<(?.*)>$`).exec(e)?.groups?.meta;if(n)try{return JSON.parse(atob(n))}catch(e){throw new Error(`Failed to decode JSON from ${n}.`)}})(window.name,\"of-frame\");if(e)try{const{name:t,uuid:n,brokerUrl:i,providerId:r,contextGroup:o}=e;return Fo(i,\"brokerUrl\"),Fo(n,\"uuid\"),Fo(t,\"name\"),{identity:{name:t,uuid:n},brokerUrl:i,interopConfig:{providerId:r,currentContextGroup:o}}}catch(e){throw new Error(`Unexpected error occurred when inferring platform information: ${e.stack}`)}},Jo=()=>{const e=r.v4();return{uuid:e,name:e}},Yo=async e=>{if(\"enabled\"===e.connectionInheritance){const t=await(async e=>{const t=qo();if(t){const{validateOptions:n=(()=>!0)}=e,{identity:i,...r}=t;if(!await n(r))throw new Error(\"Parent options were rejected by validateOptions.\");return t}})(e);if(t)return t}if(!e.options){const t=\"enabled\"===e.connectionInheritance?\"Broker URL was not specified nor provided by a platform container.\":\"Connection inheritance is disabled but no options were provided.\";throw new Error(t)}return{...e.options,identity:Jo()}};exports.__classPrivateFieldGet=Lo,exports.__classPrivateFieldSet=To,exports.apiExposer=Gn,exports.commonjsGlobal=s,exports.connect=async t=>{try{Ro.log(\"Establishing connection\",t);const{brokerUrl:n,identity:i,timeout:r,interopConfig:s}=await Yo(t),{workerPort:a,iframeBrokerPort:c}=await(async(e,t,n)=>{const{origin:i}=new URL(e),r=document.createElement(\"IFRAME\");let s;r.style.display=\"none\";try{return await new Promise(((a,c)=>{const d=e=>{if(e.source===r.contentWindow&&e.data?.topic===`ack-${jo}`){if(e.origin!==i)c(new Error(`Broker redirected to unexpected origin ${e.origin}, expected ${i}.`));else if(e.data.success){const[t,n]=e.ports;a({iframeBrokerPort:t,workerPort:n})}else c(new m(e.data));window.removeEventListener(\"message\",d),clearTimeout(s)}};window.addEventListener(\"message\",d),ko.log(`Connecting to broker ${e}`),r.setAttribute(\"src\",e),r.setAttribute(\"name\",o(t,\"of-broker\")),document.body.appendChild(r),ko.log(\"Iframe loaded, awaiting init message from iframe\"),n&&(s=setTimeout((()=>{window.removeEventListener(\"message\",d),document.body.removeChild(r),c(new Error(\"Worker did not initialize in time\"))}),n))}))}catch(e){throw new Error(`Failed to initialise Fin Web Client. ${e.message}`,{cause:e})}})(n,i,r);Ro.log(\"Successfully established connection to shared worker\");const d={entityType:\"external connection\",...i};a.start(),c.start();const h=((t,n,i)=>{const r=$o(n),o=new Ko(t),s=new Io(r,o,i);return s.connectSync(),window.Buffer=e.Buffer,new Wr(s)})(t,a,d);return s?.providerId&&(h.me.interop=h.Interop.connectSync(s.providerId),s?.currentContextGroup&&h.me.interop.joinContextGroup(s.currentContextGroup).catch((e=>{console.warn(`Error joining specified context group: ${s?.currentContextGroup}, continuing`,e)}))),{...h,me:{...h.me,identity:{uuid:h.me.uuid,name:h.me.name}}}}catch(e){throw new Error(`An error occured during web-interop connection: ${e.message}`)}},exports.decorators=Nn,exports.encodeOptions=o,exports.layout_constants=ai,exports.lazy=G;\n","\"use strict\";var t=require(\"./main-8cad4070.js\"),e=require(\"uuid\");require(\"buffer/\"),require(\"events\"),require(\"lodash/cloneDeep\"),require(\"lodash/isEqual\");var i={},n={};Object.defineProperty(n,\"__esModule\",{value:!0}),n.mapValuesAsync=n.mapEntriesAsync=void 0;const o=(t,[e,i])=>({...t,[e]:i});async function s(t,e){return(await Promise.all(e.map((async([e,i])=>[e,await t(i,e)])))).reduce(o,{})}n.mapEntriesAsync=s,n.mapValuesAsync=async function(t,e){let i;return i=e instanceof Map?[...e.entries()]:Object.entries(e),s(t,i)};var r,a,l,h,d=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldSet||function(t,e,i,n,o){if(\"m\"===n)throw new TypeError(\"Private method is not writable\");if(\"a\"===n&&!o)throw new TypeError(\"Private accessor was defined without a setter\");if(\"function\"==typeof e?t!==e||!o:!e.has(t))throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");return\"a\"===n?o.call(t,i):o?o.value=i:e.set(t,i),i},c=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldGet||function(t,e,i,n){if(\"a\"===i&&!n)throw new TypeError(\"Private accessor was defined without a getter\");if(\"function\"==typeof e?t!==e||!n:!e.has(t))throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");return\"m\"===i?n:\"a\"===i?n.call(t):n?n.value:e.get(t)};Object.defineProperty(i,\"__esModule\",{value:!0});var m=i.DefaultLayoutManager=void 0;const u=n;class p{constructor(t){a.set(this,void 0),l.set(this,new Map),d(this,a,t,\"f\")}size(){return c(this,l,\"f\").size}async applyLayoutSnapshot({layouts:t}){if(Object.keys(t).length>1)throw new Error(\"[LayoutManager] Tried to call applyLayoutSnapshot with more than 1 layout. When implementing multiple layouts via overridden LayoutManager class, you must override and fully implement the applyLayoutSnapshot method without calling super.applyLayoutSnapshot().\");const[[e,i]]=Object.entries(t);await p.createLayout(this,{layoutName:e,layout:i})}async showLayout({layoutName:t}){}async getLayoutSnapshot(){return{layouts:await(0,u.mapValuesAsync)((t=>t.getFrameSnapshot()),c(this,l,\"f\"))}}async removeLayout({layoutName:t}){}getLayoutIdentityForView(t){const e=[...c(this,l,\"f\").values()].find((e=>e.getCurrentViews().some((e=>e.name===t.name&&e.uuid===t.uuid))));return e?.identity??void 0}isLayoutVisible({layoutName:t}){return c(p,r,\"m\",h).call(p,this,t).isVisible()}resolveLayoutIdentity(t){if(t&&\"layoutName\"in t)return t;const e=[...c(this,l,\"f\").values()];if(1===e.length)return e[0].identity;const i=e.find((t=>t.isVisible()));return i?.identity??void 0}static async resolveLayout(t,e){const i=t.resolveLayoutIdentity(e);if(void 0===i||!(\"layoutName\"in i))throw new Error(\"[layout-manager] resolveLayout: Could not resolve the layout identity. Make sure you include 'layoutName' in the identity object.\");return c(p,r,\"m\",h).call(p,t,i.layoutName)}static async handleSharedView(t,e,i){await(0,u.mapValuesAsync)((async t=>{if(t.identity.layoutName!==e.layoutName){const e=t.getCurrentViews().find((t=>t.name===i.name));e&&await t.onViewDetached({viewIdentity:e,target:null}).catch(console.error)}}),c(t,l,\"f\"))}static async handleLastViewRemoved(t,e){await t.removeLayout(e),await c(t,a,\"f\").handleLastViewRemoved(t)}static async destroyLayout(t,{layoutName:e}){await c(p,r,\"m\",h).call(p,t,e).destroy(),c(t,l,\"f\").delete(e)}static async createLayout(t,e){const{layoutName:i}=e;if(c(t,l,\"f\").has(i))throw new Error(`Layout name ${i} already exists`);await c(t,a,\"f\").createLayout(e,t)}static registerLayout(t,e,i){c(t,l,\"f\").set(e,i)}static getAllLayouts(t){return[...c(t,l,\"f\").values()]}static setInitialSnapshot(t,e){c(t,a,\"f\").setInitialSnapshot(e)}static createClosedConstructor(...t){return class extends p{constructor(){super(...t)}}}}m=i.DefaultLayoutManager=p,r=p,a=new WeakMap,l=new WeakMap,h=function(t,e){const i=c(t,l,\"f\").get(e);if(!i)throw new Error(`[layout-manager] getLayoutByName: Could not locate layout with name '${e}'`);return i};var g={},f={},v={};Object.defineProperty(v,\"__esModule\",{value:!0}),v.ReversibleMap=void 0;v.ReversibleMap=class{constructor(){this.valueToKey=new Map,this.keyToValue=new Map,this.setUnique=(t,e)=>{if(this.hasKey(t)||this.hasValue(e))throw new Error(\"Key or value already in the map.\");this.keyToValue.set(t,e),this.valueToKey.set(e,t)},this.getKey=t=>{const e=this.valueToKey.get(t);if(!e)throw new Error(\"Value not found in the map.\");return e},this.deleteKey=t=>{const e=this.getValue(t);return this.keyToValue.delete(t),this.valueToKey.delete(e),e},this.deleteValue=t=>{const e=this.getKey(t);return this.keyToValue.delete(e),this.valueToKey.delete(t),e},this.hasKey=t=>this.keyToValue.has(t),this.hasValue=t=>this.valueToKey.has(t)}getValue(t){const e=this.keyToValue.get(t);if(!e)throw new Error(\"Key not found in the map.\");return e}},Object.defineProperty(f,\"__esModule\",{value:!0});var _=f.LayoutContentCache=void 0;const y=t.lazy,C=v;class w{constructor(){this.contentItemCache=new C.ReversibleMap,this.contentItemCacheId=0,this.createCacheKey=()=>{const t=`entity-${this.contentItemCacheId.toString()}`;return this.contentItemCacheId+=1,t},this.hasKey=t=>this.contentItemCache.hasKey(t),this.getItemOrUndefined=t=>{try{return this.getContentItemOrThrow(t)}catch(t){return}},this.getContentItemOrThrow=(t,e)=>{if(!this.contentItemCache.hasKey(t))throw new Error(\"Layout component has been destroyed or detached from the current layout.\");const i=this.contentItemCache.getValue(t);if(e&&!e.includes(i.type))throw new Error(`Layout item is not the expected type. Expected ${e.join(\", \")}, got ${i.type}.`);return i},this.getOrCreateEntityId=t=>{if(this.contentItemCache.hasValue(t))return this.contentItemCache.getKey(t);t.onDestroyed((()=>{this.contentItemCache.deleteValue(t)}));const e=this.createCacheKey();return this.contentItemCache.setUnique(e,t),e}}static getSingleInstance(){return w.singleton.getValue()}}_=f.LayoutContentCache=w,w.singleton=new y.Lazy((()=>new w));var I={},b={};!function(t){Object.defineProperty(t,\"__esModule\",{value:!0}),t.getAdjacentStacks=t.doShareEdge=t.getAdjacentItem=void 0;t.getAdjacentItem=(e,i)=>{const{parent:n}=e;if(e.isRoot()||!n)return;const o=[\"top\",\"bottom\"].includes(i)?\"column\":\"row\",s=[\"top\",\"left\"].includes(i)?-1:1;if(n.type===o){const t=n.contentItems.indexOf(e)+s;if(t>=0&&t{const n=t.getBounds(),o=e.getBounds();if(!n||!o)return!1;if([\"top\",\"bottom\"].includes(i)){return!(n.righto.right)}return!(n.bottomo.bottom)};t.getAdjacentStacks=(e,i)=>{const n=[\"top\",\"bottom\"].includes(i)?\"row\":\"column\",o=s=>\"stack\"===s.type?(0,t.doShareEdge)(e,s,i)?[s]:[]:\"root\"===s.type||\"ground\"===s.type?[]:s.type===n?s.contentItems.map((t=>o(t))).flat():s.type!==n?[\"top\",\"right\"].includes(i)?o(s.contentItems[s.contentItems.length-1]):o(s.contentItems[0]):[],s=(0,t.getAdjacentItem)(e,i);return s?o(s):[]}}(b);var S=t.commonjsGlobal&&t.commonjsGlobal.__decorate||function(t,e,i,n){var o,s=arguments.length,r=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if(\"object\"==typeof Reflect&&\"function\"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(s<3?o(r):s>3?o(e,i,r):o(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};Object.defineProperty(I,\"__esModule\",{value:!0}),I.LayoutEntitiesController=void 0;const E=t.decorators,x=b,L=i;class z{constructor(t,e,i){this.wire=t,this.layoutManager=e,this.layoutContentCache=i,this.analytics=t=>{this.wire.sendAction(`layout-controller-${t}`).catch((()=>{}))},this.getLayoutIdentityForViewOrThrow=async t=>{const e=this.layoutManager.getLayoutIdentityForView(t);if(!e)throw new Error(`View identity ${t.name} is not attached to any layouts.`);return e},this.getRoot=async t=>{this.analytics(\"get-root\");const e=(await this.getLayout(t)).getRoot();return{type:e.type,entityId:this.layoutContentCache.getOrCreateEntityId(e)}},this.getStackByView=async t=>{this.analytics(\"get-stack-by-view\");const e=await this.getLayoutIdentityForViewOrThrow(t),i=(await this.getLayout(e)).getStackByView(t);if(\"stack\"===i?.type)return{entityId:this.layoutContentCache.getOrCreateEntityId(i),type:\"stack\"}},this.getStackViews=t=>{this.analytics(\"get-stack-views\");return this.layoutContentCache.getContentItemOrThrow(t,[\"stack\"]).contentItems.map((t=>({name:t.viewName,uuid:this.wire.me.uuid})))},this.isRoot=t=>{this.analytics(\"is-root\");return this.layoutContentCache.getContentItemOrThrow(t).isRoot()},this.exists=t=>(this.analytics(\"exists\"),this.layoutContentCache.hasKey(t)),this.addViewToStack=async(t,e,{index:i}={index:0})=>{this.analytics(\"add-view-to-stack\");const n=this.layoutContentCache.getContentItemOrThrow(t);if(i&&i>n.contentItems.length+1)throw new Error(`Index '${i}' out of range, please exclude the index or specify a number between 0 and ${n.contentItems.length}`);const o={id:t,index:i},{identity:s}=await n.layout.platformCreateView(e,{location:o});return s},this.findViewInStack=(t,e)=>t.contentItems.find((t=>t.viewName===e.name)),this.removeViewFromStack=async(t,e)=>{this.analytics(\"remove-view-from-stack\");const i=this.layoutContentCache.getContentItemOrThrow(t,[\"stack\"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to remove a view ('${e.name}') which does not belong to the stack.`);await n.layout.platformCloseView(e)},this.createAdjacentStack=async(t,e,{position:i=\"right\"}={})=>{if(this.analytics(\"create-adjacent-stack\"),!Array.isArray(e)||0===e.length)throw new Error('The parameter \"views\" must be an array with at least 1 element.');if(![\"top\",\"bottom\",\"left\",\"right\"].includes(i))throw new Error(`Invalid position '${i}' specified.`);const n=this.layoutContentCache.getContentItemOrThrow(t).createAdjacentStack({position:i}),o=this.layoutContentCache.getOrCreateEntityId(n);return await Promise.all(e.reverse().map((t=>this.addViewToStack(o,t)))),o},this.getAdjacentStacks=async({targetId:t,edge:e})=>{this.analytics(\"get-adjacent-stacks\");const i=this.layoutContentCache.getContentItemOrThrow(t);return(0,x.getAdjacentStacks)(i,e).map((t=>({entityId:this.layoutContentCache.getOrCreateEntityId(t)})))},this.setStackActiveView=async(t,e)=>{this.analytics(\"set-stack-active-view\");const i=this.layoutContentCache.getContentItemOrThrow(t,[\"stack\"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to set a view ('${e.name}') as active when it does not belong to the stack.`);i.setActiveContentItem(n,!0)}}async getLayout(t){const e=await L.DefaultLayoutManager.resolveLayout(this.layoutManager,t);if(!e)throw new Error(`Could not resolve target layout identity ${JSON.stringify(t)}`);return e}getContent(t){this.analytics(\"get-content\");return this.layoutContentCache.getContentItemOrThrow(t,[\"column\",\"row\"]).contentItems.map((t=>({type:t.type,entityId:this.layoutContentCache.getOrCreateEntityId(t)})))}getParent(t){this.analytics(\"get-parent\");const e=this.layoutContentCache.getContentItemOrThrow(t);if(!e.isRoot())return e.parent?.contentItems.includes(e)?{type:e.parent.type,entityId:this.layoutContentCache.getOrCreateEntityId(e.parent)}:void 0}}S([(0,E.expose)()],z.prototype,\"getLayoutIdentityForViewOrThrow\",void 0),S([(0,E.expose)()],z.prototype,\"getRoot\",void 0),S([(0,E.expose)()],z.prototype,\"getStackByView\",void 0),S([(0,E.expose)()],z.prototype,\"getStackViews\",void 0),S([(0,E.expose)()],z.prototype,\"getContent\",null),S([(0,E.expose)()],z.prototype,\"getParent\",null),S([(0,E.expose)()],z.prototype,\"isRoot\",void 0),S([(0,E.expose)()],z.prototype,\"exists\",void 0),S([(0,E.expose)()],z.prototype,\"addViewToStack\",void 0),S([(0,E.expose)()],z.prototype,\"removeViewFromStack\",void 0),S([(0,E.expose)()],z.prototype,\"createAdjacentStack\",void 0),S([(0,E.expose)()],z.prototype,\"getAdjacentStacks\",void 0),S([(0,E.expose)()],z.prototype,\"setStackActiveView\",void 0),I.LayoutEntitiesController=z,Object.defineProperty(g,\"__esModule\",{value:!0});var M=g.initLayoutEndpoints=void 0;const P=t.apiExposer,T=t.layout_constants,A=f,k=I,D=i;M=g.initLayoutEndpoints=async function(t,e){const i=t.getFin(),n=await i.Platform.getCurrentSync().getClient(),o=new P.ChannelsExposer(n);await new P.ApiExposer(o).exposeInstance(new k.LayoutEntitiesController(t,e,A.LayoutContentCache.getSingleInstance()),{id:T.LAYOUT_CONTROLLER_ID}),await async function(t,e){const i=t=>async i=>{const n=await D.DefaultLayoutManager.resolveLayout(e,i.target);if(!n)throw new Error(`Could not resolve the layout target from payload ${JSON.stringify(i)}`);return t(n,i)},n=(e,n)=>{t.register(e,i(n))},o=(t,e)=>{n(t,e)};n(\"replace-view\",((t,e)=>t.replaceView(e))),n(\"replace-layout\",((t,{layout:e})=>t.replaceLayout(e))),n(\"add-view\",((t,e)=>t.insertView(e))),o(\"layout-add-view\",((t,{viewOptions:e,location:i,targetView:n})=>t.platformCreateView(e,{location:i,targetView:n}))),n(\"close-view\",((t,e)=>t.cleanupView(e.viewIdentity))),o(\"layout-close-view\",((t,e)=>t.platformCloseView(e.viewIdentity))),n(\"apply-preset-layout\",((t,e)=>t.applyPreset(e))),n(\"get-layout-views\",(t=>t.getCurrentViews())),n(\"get-frame-snapshot\",(t=>t.getFrameSnapshot())),n(\"is-visible\",(t=>t.isVisible())),n(\"destroy\",(t=>t.destroy())),t.register(\"get-layout-snapshot\",(()=>e.getLayoutSnapshot()))}(n,e)};var R={};Object.defineProperty(R,\"__esModule\",{value:!0});var U=R.BaseLayout=void 0;U=R.BaseLayout=class{};var O={};Object.defineProperty(O,\"__esModule\",{value:!0});var V=O.DOMEmitter=void 0;V=O.DOMEmitter=class{constructor(t){this.container=t}dispatchLocalEvent(t,e){const i={...e,type:t,tabSelector:`tab-${e.name}`,containerSelector:`container-${e.name}`,topic:\"openfin-DOM-event\"};this.container.dispatchEvent(new CustomEvent(t,{detail:i}))}};var B={};Object.defineProperty(B,\"__esModule\",{value:!0});var H=B.mapLayoutContentItemsImmutableSync=B.mapLayoutContentItemsImmutable=W=B.isVisible=void 0;var W=B.isVisible=t=>(0!==t.offsetWidth||0!==t.offsetHeight)&&\"hidden\"!==window.getComputedStyle(t).visibility&&t.offsetTop>=0&&t.offsetLeft>=0&&t.offsetTop<=window.innerHeight&&t.offsetLeft<=window.innerWidth;const F=t=>\"type\"in t&&\"component\"===t.type;B.mapLayoutContentItemsImmutable=async function t(e,i){return F(i)?e(i):{...i,content:await Promise.all(i.content?.map((i=>t(e,i))))}},H=B.mapLayoutContentItemsImmutableSync=function t(e,i){return F(i)?e(i):{...i,content:i.content?.map((i=>t(e,i)))}};class N extends Error{constructor(t,e){super(e),this.type=t}}class G extends N{constructor(t,e){super(\"Configuration\",t),this.node=e}}class j extends N{constructor(t){super(\"PopoutBlocked\",t)}}class $ extends N{constructor(t){super(\"API\",t)}}class Z extends N{constructor(t){super(\"Bind\",t)}}class q extends Error{constructor(t,e,i){super(`${t}: ${e}${void 0===i?\"\":\": \"+i}`)}}class X extends q{constructor(t,e){super(\"Assert\",t,e)}}class Y extends q{constructor(t,e,i){super(\"UnreachableCase\",t,`${e}${void 0===i?\"\":\": \"+i}`)}}class K extends q{constructor(t,e){super(\"UnexpectedNull\",t,e)}}class J extends q{constructor(t,e){super(\"UnexpectedUndefined\",t,e)}}var Q;!function(t){let e=!1;const i={PopoutCannotBeCreatedWithGroundItemConfig:{id:0,default:\"Popout cannot be created with ground ItemConfig\"},PleaseRegisterAConstructorFunction:{id:1,default:\"Please register a constructor function\"},ComponentTypeNotRegisteredAndBindComponentEventHandlerNotAssigned:{id:2,default:\"Component type not registered and BindComponentEvent handler not assigned\"},ComponentIsAlreadyRegistered:{id:3,default:\"Component is already registered\"},ComponentIsNotVirtuable:{id:4,default:\"Component is not virtuable. Requires rootHtmlElement field/getter\"},VirtualComponentDoesNotHaveRootHtmlElement:{id:5,default:'Virtual component does not have getter \"rootHtmlElement\"'},ItemConfigIsNotTypeComponent:{id:6,default:\"ItemConfig is not of type component\"},InvalidNumberPartInSizeString:{id:7,default:\"Invalid number part in size string\"},UnknownUnitInSizeString:{id:8,default:\"Unknown unit in size string\"},UnsupportedUnitInSizeString:{id:9,default:\"Unsupported unit in size string\"}};t.idCount=Object.keys(i).length;const n=Object.values(i);t.checkInitialise=function(){if(!e)for(let e=0;e=\"0\"&&t<=\"9\"}function Tt(t,e){const i=zt(e);t.style.width=i}function At(t,e){const i=zt(e);t.style.height=i}function kt(t){return{width:t.offsetWidth,height:t.offsetHeight}}function Dt(t,e){t.style.display=e?\"\":\"none\"}function Rt(t,e){if(void 0!==e)for(const i in e)if(e.hasOwnProperty(i)){const n=e[i],o=t[i];t[i]=Ut(o,n)}return t}function Ut(t,e){if(\"object\"!=typeof e)return e;if(Array.isArray(e)){const t=e.length,i=new Array(t);for(let n=0;n36)throw new Error(\"Too many keys in config minifier map\")},t.translateObject=n}(dt||(dt={})),function(t){t.defaults={type:at.ground,content:[],size:1,sizeUnit:ht.Fractional,minSize:void 0,minSizeUnit:ht.Pixel,id:\"\",isClosable:!0},t.createCopy=function(t,e){switch(t.type){case at.ground:case at.row:case at.column:return gt.createCopy(t,e);case at.stack:return ut.createCopy(t,e);case at.component:return pt.createCopy(t);default:throw new Y(\"CICC91354\",t.type,\"Invalid Config Item type specified\")}},t.createDefault=function(t){switch(t){case at.ground:throw new X(\"CICCDR91562\");case at.row:case at.column:return gt.createDefault(t);case at.stack:return ut.createDefault();case at.component:return pt.createDefault();default:throw new Y(\"CICCDD91563\",t,\"Invalid Config Item type specified\")}},t.isComponentItem=function(t){return t.type===at.component},t.isStackItem=function(t){return t.type===at.stack},t.isGroundItem=function(t){return t.type===at.ground}}(ct||(ct={})),function(t){t.defaultMaximised=!1,function(t){t.createCopy=function(t,e){return void 0===t?void 0:{show:null!=e?e:t.show,popout:t.popout,close:t.close,maximise:t.maximise,minimise:t.minimise,tabDropdown:t.tabDropdown}}}(t.Header||(t.Header={}))}(mt||(mt={})),function(t){function e(t){const e=t.length,i=new Array(e);for(let n=0;n\"__glMaximised\"===t));t>0&&(o=!0,n=n.splice(t,1)),e=n.length>0?n[0]:ct.defaults.id}else e=n;return i=void 0!==t.maximised?t.maximised:o,{id:e,maximised:i}}}(wt||(wt={})),function(t){function e(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0;return{resolved:!0,root:Et.resolve(i),openPopouts:t.resolveOpenPopouts(e.openPopouts),dimensions:t.Dimensions.resolve(e.dimensions),settings:t.Settings.resolve(e.settings),header:t.Header.resolve(e.header,e.settings,e.labels)}}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:Lt.fromResolvedArray(e.openPopouts),settings:_t.Settings.createCopy(e.settings),dimensions:t.Dimensions.fromResolved(e.dimensions),header:_t.Header.createCopy(e.header)}},t.isResolved=function(t){const e=t;return void 0!==e.resolved&&!0===e.resolved},t.resolveOpenPopouts=function(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0,{root:Et.resolve(o),openPopouts:xt.resolveOpenPopouts(e.openPopouts),dimensions:xt.Dimensions.resolve(e.dimensions),settings:xt.Settings.resolve(e.settings),header:xt.Header.resolve(e.header,e.settings,e.labels),parentId:null!==(i=e.parentId)&&void 0!==i?i:null,indexInParent:null!==(n=e.indexInParent)&&void 0!==n?n:null,window:t.Window.resolve(e.window,e.dimensions),resolved:!0}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:i(e.openPopouts),dimensions:xt.Dimensions.fromResolved(e.dimensions),settings:_t.Settings.createCopy(e.settings),header:_t.Header.createCopy(e.header),parentId:e.parentId,indexInParent:e.indexInParent,window:t.Window.fromResolved(e.window)}},t.fromResolvedArray=i}(Lt||(Lt={}));class Wt{constructor(){this._allEventSubscriptions=[],this._subscriptionsMap=new Map,this.unbind=this.removeEventListener,this.trigger=this.emit}tryBubbleEvent(t,e){}emit(t,...e){let i=this._subscriptionsMap.get(t);if(void 0!==i){i=i.slice();for(let t=0;t0){const n=e.slice();n.unshift(t);const o=this._allEventSubscriptions.slice();for(let t=0;t0?n.contentItems[0]:n,e=0);const o=this._layoutManager.createAndInitContentItem(i,t);t.addChild(o,e),this._layoutManager.layoutConfig.settings.popInOnClose?this._onClose():this.close()}createWindow(){const t=this.createUrl(),e=Math.floor(1e6*Math.random()).toString(36),i=this.serializeWindowFeatures({width:this._initialWindowSize.width,height:this._initialWindowSize.height,innerWidth:this._initialWindowSize.width,innerHeight:this._initialWindowSize.height,menubar:\"no\",toolbar:\"no\",location:\"no\",personalbar:\"no\",resizable:\"yes\",scrollbars:\"no\",status:\"no\"});if(this._popoutWindow=globalThis.open(t,e,i),this._popoutWindow)this._popoutWindow.addEventListener(\"load\",(()=>this.positionWindow()),{passive:!0}),this._popoutWindow.addEventListener(\"beforeunload\",(()=>{this._layoutManager.layoutConfig.settings.popInOnClose?this.popIn():this._onClose()}),{passive:!0}),this._checkReadyInterval=setInterval((()=>this.checkReady()),10);else if(!0===this._layoutManager.layoutConfig.settings.blockedPopoutsThrowError){throw new j(\"Popout blocked\")}}checkReady(){if(null===this._popoutWindow)throw new K(\"BPCR01844\");this._popoutWindow.__glInstance&&this._popoutWindow.__glInstance.isInitialised&&(this.onInitialised(),void 0!==this._checkReadyInterval&&(clearInterval(this._checkReadyInterval),this._checkReadyInterval=void 0))}serializeWindowFeatures(t){const e=[];for(const i in t)e.push(i+\"=\"+t[i].toString());return e.join(\",\")}createUrl(){const t=\"gl-window-config-\"+Ot(),e=_t.minifyConfig(this._config);try{localStorage.setItem(t,JSON.stringify(e))}catch(t){throw new Error(\"Error while writing to localStorage \"+function(t){return t instanceof Error?t.message:\"string\"==typeof t?t:\"Unknown Error\"}(t))}const i=new URL(location.href);return i.searchParams.set(\"gl-window\",t),i.toString()}positionWindow(){if(null===this._popoutWindow)throw new Error(\"BrowserPopout.positionWindow: null popoutWindow\");this._popoutWindow.moveTo(this._initialWindowSize.left,this._initialWindowSize.top),this._popoutWindow.focus()}onInitialised(){this._isInitialised=!0,this.getGlInstance().on(\"popIn\",(()=>this.popIn())),this.emit(\"initialised\")}_onClose(){setTimeout((()=>this.emit(\"closed\")),50)}}class Gt extends Wt{constructor(t,e,i,n){super(),this.layoutManager=t,this._parent=i,this._element=n,this._popInParentIds=[],this._type=e.type,this._id=e.id,this._isInitialised=!1,this.isGround=!1,this.isRow=!1,this.isColumn=!1,this.isStack=!1,this.isComponent=!1,this.size=e.size,this.sizeUnit=e.sizeUnit,this.minSize=e.minSize,this.minSizeUnit=e.minSizeUnit,this._isClosable=e.isClosable,this._pendingEventPropagations={},this._throttledEvents=[\"stateChanged\"],this._contentItems=this.createContentItems(e.content)}get type(){return this._type}get id(){return this._id}set id(t){this._id=t}get popInParentIds(){return this._popInParentIds}get parent(){return this._parent}get contentItems(){return this._contentItems}get isClosable(){return this._isClosable}get element(){return this._element}get isInitialised(){return this._isInitialised}static isStack(t){return t.isStack}static isComponentItem(t){return t.isComponent}static isComponentParentableItem(t){return t.isStack||t.isGround}removeChild(t,e=!1){const i=this._contentItems.indexOf(t);if(-1===i)throw new Error(\"Can't remove child item. Unknown content item\");if(e||this._contentItems[i].destroy(),this._contentItems.splice(i,1),this._contentItems.length>0)this.updateSize(!1);else if(!this.isGround&&!0===this._isClosable){if(null===this._parent)throw new K(\"CIUC00874\");this._parent.removeChild(this)}}addChild(t,e,i){return null!=e||(e=this._contentItems.length),this._contentItems.splice(e,0,t),t.setParent(this),!0===this._isInitialised&&!1===t._isInitialised&&t.init(),e}replaceChild(t,e,i=!1){const n=this._contentItems.indexOf(t),o=t._element.parentNode;if(-1===n)throw new X(\"CIRCI23232\",\"Can't replace child. oldChild is not child of this\");if(null===o)throw new K(\"CIRCP23232\");if(o.replaceChild(e._element,t._element),!0===i&&(t._parent=null,t.destroy()),this._contentItems[n]=e,e.setParent(this),e.size=t.size,e.sizeUnit=t.sizeUnit,e.minSize=t.minSize,e.minSizeUnit=t.minSizeUnit,null===e._parent)throw new K(\"CIRCNC45699\");!0===e._parent._isInitialised&&!1===e._isInitialised&&e.init(),this.updateSize(!1)}remove(){if(null===this._parent)throw new K(\"CIR11110\");this._parent.removeChild(this)}popout(){const t=Ot(),e=this.layoutManager.createPopoutFromContentItem(this,void 0,t,void 0);return this.emitBaseBubblingEvent(\"stateChanged\"),e}calculateConfigContent(){const t=this._contentItems,e=t.length,i=new Array(e);for(let n=0;nthis.propagateEventToLayoutManager(t,e))))}propagateEventToLayoutManager(t,e){this._pendingEventPropagations[t]=!1,this.layoutManager.emitUnknown(t,e)}}class jt extends Gt{constructor(t,e,i){super(t,e,i,document.createElement(\"div\")),this._parentItem=i,this._focused=!1,this.isComponent=!0,this._reorderEnabled=e.reorderEnabled,this.applyUpdatableConfig(e),this._initialWantMaximise=e.maximised;const n=document.createElement(\"div\");n.classList.add(\"lm_content\"),this.element.appendChild(n),this._container=new Ft(e,this,t,n,(t=>this.handleUpdateItemConfigEvent(t)),(()=>this.show()),(()=>this.hide()),(t=>this.focus(t)),(t=>this.blur(t)))}get componentName(){return this._container.componentType}get componentType(){return this._container.componentType}get reorderEnabled(){return this._reorderEnabled}get initialWantMaximise(){return this._initialWantMaximise}get component(){return this._container.component}get container(){return this._container}get parentItem(){return this._parentItem}get headerConfig(){return this._headerConfig}get title(){return this._title}get tab(){return this._tab}get focused(){return this._focused}destroy(){this._container.destroy(),super.destroy()}applyUpdatableConfig(t){this.setTitle(t.title),this._headerConfig=t.header}toConfig(){const t=this._container.stateRequestEvent,e=void 0===t?this._container.state:t();return{type:at.component,content:[],size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,maximised:!1,isClosable:this.isClosable,reorderEnabled:this._reorderEnabled,title:this._title,header:mt.Header.createCopy(this._headerConfig),componentType:pt.copyComponentType(this.componentType),componentState:e}}close(){if(null===this.parent)throw new K(\"CIC68883\");this.parent.removeChild(this,!1)}enterDragMode(t,e){Tt(this.element,t),At(this.element,e),this._container.enterDragMode(t,e)}exitDragMode(){this._container.exitDragMode()}enterStackMaximised(){this._container.enterStackMaximised()}exitStackMaximised(){this._container.exitStackMaximised()}drag(){this._container.drag()}updateSize(t){this.updateNodeSize(t)}init(){this.updateNodeSize(!1),super.init(),this._container.emit(\"open\"),this.initContentItems()}setTitle(t){this._title=t,this.emit(\"titleChanged\",t),this.emit(\"stateChanged\")}setTab(t){this._tab=t,this.emit(\"tab\",t),this._container.setTab(t)}hide(){super.hide(),this._container.setVisibility(!1)}show(){super.show(),this._container.setVisibility(!0)}focus(t=!1){this.parentItem.setActiveComponentItem(this,!0,t)}setFocused(t){this._focused=!0,this.tab.setFocused(),t||this.emitBaseBubblingEvent(\"focus\")}blur(t=!1){this._focused&&this.layoutManager.setFocusedComponentItem(void 0,t)}setBlurred(t){this._focused=!1,this.tab.setBlurred(),t||this.emitBaseBubblingEvent(\"blur\")}setParent(t){this._parentItem=t,super.setParent(t)}handleUpdateItemConfigEvent(t){this.applyUpdatableConfig(t)}updateNodeSize(t){if(\"none\"!==this.element.style.display){const{width:e,height:i}=kt(this.element);this._container.setSizeToNodeSize(e,i,t)}}}class $t extends Gt{constructor(){super(...arguments),this._focused=!1}get focused(){return this._focused}setFocusedValue(t){this._focused=t}}class Zt extends Wt{constructor(t,e){super(),this._eElement=t,this._pointerTracking=!1,this._pointerDownEventListener=t=>this.onPointerDown(t),this._pointerMoveEventListener=t=>this.onPointerMove(t),this._pointerUpEventListener=t=>this.onPointerUp(t),this._timeout=void 0,this._allowableTargets=[t,...e],this._oDocument=document,this._eBody=document.body,this._nDelay=1800,this._nDistance=10,this._nX=0,this._nY=0,this._nOriginalX=0,this._nOriginalY=0,this._dragging=!1,this._eElement.addEventListener(\"pointerdown\",this._pointerDownEventListener,{passive:!0})}destroy(){this.checkRemovePointerTrackingEventListeners(),this._eElement.removeEventListener(\"pointerdown\",this._pointerDownEventListener)}cancelDrag(){this.processDragStop(void 0)}onPointerDown(t){if(this._allowableTargets.includes(t.target)&&t.isPrimary){const e=this.getPointerCoordinates(t);this.processPointerDown(e)}}processPointerDown(t){this._nOriginalX=t.x,this._nOriginalY=t.y,this._oDocument.addEventListener(\"pointermove\",this._pointerMoveEventListener),this._oDocument.addEventListener(\"pointerup\",this._pointerUpEventListener,{passive:!0}),this._pointerTracking=!0,this._timeout=setTimeout((()=>{try{this.startDrag()}catch(t){throw console.error(t),t}}),this._nDelay)}onPointerMove(t){this._pointerTracking&&(this.processDragMove(t),t.preventDefault())}processDragMove(t){this._nX=t.pageX-this._nOriginalX,this._nY=t.pageY-this._nOriginalY,!1===this._dragging&&(Math.abs(this._nX)>this._nDistance||Math.abs(this._nY)>this._nDistance)&&this.startDrag(),this._dragging&&this.emit(\"drag\",this._nX,this._nY,t)}onPointerUp(t){this.processDragStop(t)}processDragStop(t){var e;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this.checkRemovePointerTrackingEventListeners(),!0===this._dragging&&(this._eBody.classList.remove(\"lm_dragging\"),this._eElement.classList.remove(\"lm_dragging\"),null===(e=this._oDocument.querySelector(\"iframe\"))||void 0===e||e.style.setProperty(\"pointer-events\",\"\"),this._dragging=!1,this.emit(\"dragStop\",t))}checkRemovePointerTrackingEventListeners(){this._pointerTracking&&(this._oDocument.removeEventListener(\"pointermove\",this._pointerMoveEventListener),this._oDocument.removeEventListener(\"pointerup\",this._pointerUpEventListener),this._pointerTracking=!1)}startDrag(){var t;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this._dragging=!0,this._eBody.classList.add(\"lm_dragging\"),this._eElement.classList.add(\"lm_dragging\"),null===(t=this._oDocument.querySelector(\"iframe\"))||void 0===t||t.style.setProperty(\"pointer-events\",\"none\"),this.emit(\"dragStart\",this._nOriginalX,this._nOriginalY)}getPointerCoordinates(t){return{x:t.pageX,y:t.pageY}}}class qt{constructor(t,e,i){this._isVertical=t,this._size=e,this._grabSize=i0){const i=this.createSplitter(Math.max(0,e-1)).element;e>0?(this.contentItems[e-1].element.insertAdjacentElement(\"afterend\",i),i.insertAdjacentElement(\"afterend\",t.element)):(this.contentItems[0].element.insertAdjacentElement(\"beforebegin\",i),i.insertAdjacentElement(\"beforebegin\",t.element))}else this._childElementContainer.appendChild(t.element);super.addChild(t,e);const n=1/this.contentItems.length*100;if(!0===i)return this.emitBaseBubblingEvent(\"stateChanged\"),e;for(let e=0;e0&&(this.calculateRelativeSizes(),this.setAbsoluteSizes()),this.emitBaseBubblingEvent(\"stateChanged\"),this.emit(\"resize\")}setAbsoluteSizes(){const t=this.calculateAbsoluteSizes();for(let e=0;e0&&t.itemSizes[e]++,this._isColumn?(Tt(this.contentItems[e].element,t.crossAxisSize),At(this.contentItems[e].element,t.itemSizes[e])):(Tt(this.contentItems[e].element,t.itemSizes[e]),At(this.contentItems[e].element,t.crossAxisSize))}calculateAbsoluteSizes(){const t=(this.contentItems.length-1)*this._splitterSize,{width:e,height:i}=kt(this.element);let n,o;this._isColumn?(n=i-t,o=e):(n=e-t,o=i);let s=0;const r=[];for(let t=0;t0){const n=100-t;for(let t=0;t100&&e.length>0){for(let t=0;te)return;{const r=i/e;let a=i;for(let e=0;ethis.onSplitterDrag(e,t,i))),e.on(\"dragStop\",(()=>this.onSplitterDragStop(e))),e.on(\"dragStart\",(()=>this.onSplitterDragStart(e))),this._splitter.splice(t,0,e),e}getSplitItems(t){const e=this._splitter.indexOf(t);return{before:this.contentItems[e],after:this.contentItems[e+1]}}calculateContentItemMinSize(t){const e=t.minSize;if(void 0!==e){if(t.minSizeUnit===ht.Pixel)return e;throw new X(\"ROCGMD98831\",JSON.stringify(t))}{const t=this.layoutManager.layoutConfig.dimensions;return this._isColumn?t.defaultMinItemHeight:t.defaultMinItemWidth}}calculateContentItemsTotalMinSize(t){let e=0;for(const i of t)e+=this.calculateContentItemMinSize(i);return e}onSplitterDragStart(t){const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=this.calculateContentItemsTotalMinSize(e.before.contentItems),s=this.calculateContentItemsTotalMinSize(e.after.contentItems);this._splitterPosition=0,this._splitterMinPosition=-1*(i-o),this._splitterMaxPosition=n-s}onSplitterDrag(t,e,i){let n=this._isColumn?i:e;if(null===this._splitterMinPosition||null===this._splitterMaxPosition)throw new K(\"ROCOSD59226\");n=Math.max(n,this._splitterMinPosition),n=Math.min(n,this._splitterMaxPosition),this._splitterPosition=n;const o=zt(n);this._isColumn?t.element.style.top=o:t.element.style.left=o}onSplitterDragStop(t){if(null===this._splitterPosition)throw new K(\"ROCOSDS66932\");{const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=(this._splitterPosition+i)/(i+n),s=e.before.size+e.after.size;e.before.size=o*s,e.after.size=(1-o)*s,t.element.style.top=zt(0),t.element.style.left=zt(0),globalThis.requestAnimationFrame((()=>this.updateSize(!1)))}}}!function(t){t.getElementDimensionSize=function(t,e){return\"width\"===e?function(t){return t.offsetWidth}(t):function(t){return t.offsetHeight}(t)},t.setElementDimensionSize=function(t,e,i){return\"width\"===e?Tt(t,i):At(t,i)},t.createElement=function(t,e){const i=t.createElement(\"div\");return i.classList.add(\"lm_item\"),e?i.classList.add(\"lm_column\"):i.classList.add(\"lm_row\"),i}}(Xt||(Xt={}));class Yt extends $t{constructor(t,e,i){super(t,vt.create(e),null,Yt.createElement(document)),this.isGround=!0,this._childElementContainer=this.element,this._containerElement=i;let n=null;for(;;){const t=n?n.previousSibling:this._containerElement.lastChild;if(!(t instanceof Element&&t.classList.contains(\"lm_content\")))break;n=t}this._containerElement.insertBefore(this.element,n)}init(){if(!0!==this.isInitialised){this.updateNodeSize();for(let t=0;t0?this.contentItems[0]:this,n.isComponent)throw new Error(\"Cannot add item as child to ComponentItem\");{const t=this.layoutManager.createAndInitContentItem(i,n);return e=n.addChild(t,e),n===this?-1:e}}loadComponentAsRoot(t){this.clearRoot();const e=Ct.resolve(t,!1);if(e.maximised)throw new Error(\"Root Component cannot be maximised\");{const t=new jt(this.layoutManager,e,this);t.init(),this.addChild(t,0)}}addChild(t,e){if(this.contentItems.length>0)throw new Error(\"Ground node can only have a single child\");return this._childElementContainer.appendChild(t.element),e=super.addChild(t,e),this.updateSize(!1),this.emitBaseBubblingEvent(\"stateChanged\"),e}calculateConfigContent(){const t=this.contentItems,e=t.length,i=new Array(e);for(let n=0;n0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e)),this.updateContentItemsSize(!1))}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}createSideAreas(){const t=Yt.Area.oppositeSides,e=new Array(Object.keys(t).length);let i=0;for(const n in t){const o=n,s=this.getElementArea();if(null===s)throw new K(\"RCSA77553\");s.side=o,\"2\"===t[o][1]?s[o]=s[t[o]]-50:s[o]=s[t[o]]+50,s.surface=(s.x2-s.x1)*(s.y2-s.y1),e[i++]=s}return e}highlightDropZone(t,e,i){this.layoutManager.tabDropPlaceholder.remove(),super.highlightDropZone(t,e,i)}onDrop(t,e){if(t.isComponent){const e=ut.createDefault(),i=t;e.header=mt.Header.createCopy(i.headerConfig);const n=this.layoutManager.createAndInitContentItem(e,this);n.addChild(t),t=n}if(0===this.contentItems.length)this.addChild(t);else{if(t.type===at.row||t.type===at.column){const e=ut.createDefault(),i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}const i=\"x\"==e.side[0]?at.row:at.column,n=\"2\"==e.side[1],o=this.contentItems[0];if(o instanceof Xt&&o.type===i){const e=o.contentItems[n?0:o.contentItems.length-1];o.addChild(t,n?0:void 0,!0),e.size*=.5,t.size=e.size,t.sizeUnit=ht.Percent,o.updateSize(!1)}else{const e=ct.createDefault(i),s=this.layoutManager.createContentItem(e,this);this.replaceChild(o,s),s.addChild(t,n?0:void 0,!0),s.addChild(o,n?void 0:0,!0),o.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}}dock(){throw new X(\"GID87731\")}validateDocking(){throw new X(\"GIVD87732\")}getAllContentItems(){const t=[this];return this.deepGetAllContentItems(this.contentItems,t),t}getConfigMaximisedItems(){const t=[];return this.deepFilterContentItems(this.contentItems,t,(t=>!(!Gt.isStack(t)||!t.initialWantMaximise)||!(!Gt.isComponentItem(t)||!t.initialWantMaximise))),t}getItemsByPopInParentId(t){const e=[];return this.deepFilterContentItems(this.contentItems,e,(e=>e.popInParentIds.includes(t))),e}toConfig(){throw new Error(\"Cannot generate GroundItem config\")}setActiveComponentItem(t,e,i){}updateNodeSize(){const{width:t,height:e}=kt(this._containerElement);Tt(this.element,t),At(this.element,e),this.contentItems.length>0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e))}deepGetAllContentItems(t,e){for(let i=0;ithis.onClick(t),this._touchStartEventListener=t=>this.onTouchStart(t),this._element=document.createElement(\"div\"),this._element.classList.add(i),this._element.title=e,this._header.on(\"destroy\",(()=>this.destroy())),this._element.addEventListener(\"click\",this._clickEventListener,{passive:!0}),this._element.addEventListener(\"touchstart\",this._touchStartEventListener,{passive:!0}),this._header.controlsContainerElement.appendChild(this._element)}get element(){return this._element}destroy(){var t;this._element.removeEventListener(\"click\",this._clickEventListener),this._element.removeEventListener(\"touchstart\",this._touchStartEventListener),null===(t=this._element.parentNode)||void 0===t||t.removeChild(this._element)}onClick(t){this._pushEvent(t)}onTouchStart(t){this._pushEvent(t)}}class Jt{constructor(t,e,i,n,o){var s;this._layoutManager=t,this._componentItem=e,this._closeEvent=i,this._focusEvent=n,this._dragStartEvent=o,this._isActive=!1,this._tabClickListener=t=>this.onTabClickDown(t),this._tabTouchStartListener=t=>this.onTabTouchStart(t),this._closeClickListener=()=>this.onCloseClick(),this._closeTouchStartListener=()=>this.onCloseTouchStart(),this._dragStartListener=(t,e)=>this.onDragStart(t,e),this._contentItemDestroyListener=()=>this.onContentItemDestroy(),this._tabTitleChangedListener=t=>this.setTitle(t),this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_tab\"),this._titleElement=document.createElement(\"span\"),this._titleElement.classList.add(\"lm_title\"),this._closeElement=document.createElement(\"div\"),this._closeElement.classList.add(\"lm_close_tab\"),this._element.appendChild(this._titleElement),this._element.appendChild(this._closeElement),e.isClosable?this._closeElement.style.display=\"\":this._closeElement.style.display=\"none\",this.setTitle(e.title),this._componentItem.on(\"titleChanged\",this._tabTitleChangedListener);(null!==(s=e.reorderEnabled)&&void 0!==s?s:this._layoutManager.layoutConfig.settings.reorderEnabled)&&this.enableReorder(),this._element.addEventListener(\"click\",this._tabClickListener,{passive:!0}),this._element.addEventListener(\"touchstart\",this._tabTouchStartListener,{passive:!0}),this._componentItem.isClosable?(this._closeElement.addEventListener(\"click\",this._closeClickListener,{passive:!0}),this._closeElement.addEventListener(\"touchstart\",this._closeTouchStartListener,{passive:!0})):(this._closeElement.remove(),this._closeElement=void 0),this._componentItem.setTab(this),this._layoutManager.emit(\"tabCreated\",this)}get isActive(){return this._isActive}get componentItem(){return this._componentItem}get contentItem(){return this._componentItem}get element(){return this._element}get titleElement(){return this._titleElement}get closeElement(){return this._closeElement}get reorderEnabled(){return void 0!==this._dragListener}set reorderEnabled(t){t!==this.reorderEnabled&&(t?this.enableReorder():this.disableReorder())}setTitle(t){this._titleElement.innerText=t,this._element.title=t}setActive(t){t!==this._isActive&&(this._isActive=t,t?this._element.classList.add(\"lm_active\"):this._element.classList.remove(\"lm_active\"))}destroy(){var t,e;this._closeEvent=void 0,this._focusEvent=void 0,this._dragStartEvent=void 0,this._element.removeEventListener(\"click\",this._tabClickListener),this._element.removeEventListener(\"touchstart\",this._tabTouchStartListener),null===(t=this._closeElement)||void 0===t||t.removeEventListener(\"click\",this._closeClickListener),null===(e=this._closeElement)||void 0===e||e.removeEventListener(\"touchstart\",this._closeTouchStartListener),this._componentItem.off(\"titleChanged\",this._tabTitleChangedListener),this.reorderEnabled&&this.disableReorder(),this._element.remove()}setBlurred(){this._element.classList.remove(\"lm_focused\"),this._titleElement.classList.remove(\"lm_focused\")}setFocused(){this._element.classList.add(\"lm_focused\"),this._titleElement.classList.add(\"lm_focused\")}onDragStart(t,e){if(void 0===this._dragListener)throw new J(\"TODSDLU10093\");if(void 0===this._dragStartEvent)throw new J(\"TODS23309\");this._dragStartEvent(t,e,this._dragListener,this.componentItem)}onContentItemDestroy(){void 0!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=void 0)}onTabClickDown(t){const e=t.target;e!==this._element&&e!==this._titleElement||(0===t.button?this.notifyFocus():1===t.button&&this._componentItem.isClosable&&this.notifyClose())}onTabTouchStart(t){t.target===this._element&&this.notifyFocus()}onCloseClick(){this.notifyClose()}onCloseTouchStart(){this.notifyClose()}notifyClose(){if(void 0===this._closeEvent)throw new J(\"TNC15007\");this._closeEvent(this._componentItem)}notifyFocus(){if(void 0===this._focusEvent)throw new J(\"TNA15007\");this._focusEvent(this._componentItem)}enableReorder(){this._dragListener=new Zt(this._element,[this._titleElement]),this._dragListener.on(\"dragStart\",this._dragStartListener),this._componentItem.on(\"destroy\",this._contentItemDestroyListener)}disableReorder(){if(void 0===this._dragListener)throw new J(\"TDR87745\");this._componentItem.off(\"destroy\",this._contentItemDestroyListener),this._dragListener.off(\"dragStart\",this._dragStartListener),this._dragListener=void 0}}class Qt{constructor(t,e,i,n,o){this._layoutManager=t,this._componentRemoveEvent=e,this._componentFocusEvent=i,this._componentDragStartEvent=n,this._dropdownActiveChangedEvent=o,this._tabs=[],this._lastVisibleTabIndex=-1,this._dropdownActive=!1,this._element=document.createElement(\"section\"),this._element.classList.add(\"lm_tabs\"),this._dropdownElement=document.createElement(\"section\"),this._dropdownElement.classList.add(\"lm_tabdropdown_list\"),this._dropdownElement.style.display=\"none\"}get tabs(){return this._tabs}get tabCount(){return this._tabs.length}get lastVisibleTabIndex(){return this._lastVisibleTabIndex}get element(){return this._element}get dropdownElement(){return this._dropdownElement}get dropdownActive(){return this._dropdownActive}destroy(){for(let t=0;tthis.handleTabCloseEvent(t)),(t=>this.handleTabFocusEvent(t)),((t,e,i,n)=>this.handleTabDragStartEvent(t,e,i,n)));void 0===e&&(e=this._tabs.length),this._tabs.splice(e,0,i),ethis._lastVisibleTabIndex){const t=this._tabs[e];for(let t=e;t>0;t--)this._tabs[t]=this._tabs[t-1];this._tabs[0]=t}}updateTabSizes(t,e){let i=!1;this.tryUpdateTabSizes(i,t,e)||(i=!0,this.tryUpdateTabSizes(i,t,e)),i!==this._dropdownActive&&(this._dropdownActive=i,this._dropdownActiveChangedEvent())}tryUpdateTabSizes(t,e,i){if(this._tabs.length>0){if(void 0===i)throw new Error(\"non-empty tabs must have active component item\");let n=0,o=!1;const s=this._layoutManager.layoutConfig.settings.tabOverlapAllowance,r=this._tabs.indexOf(i.tab),a=this._tabs[r];this._lastVisibleTabIndex=-1;for(let i=0;ie){if(o)i===r&&(l.style.zIndex=\"auto\",l.style.marginLeft=\"\",l.parentElement!==this._element&&this._element.appendChild(l));else{let t;if(t=r>0&&r<=i?(d-e)/(i-1):(d-e)/i,tthis.onClick(t),this._touchStartListener=t=>this.onTouchStart(t),this._rowColumnClosable=!0,this._closeButton=null,this._popoutButton=null,this._tabsContainer=new Qt(this._layoutManager,(t=>this.handleTabInitiatedComponentRemoveEvent(t)),(t=>this.handleTabInitiatedComponentFocusEvent(t)),((t,e,i,n)=>this.handleTabInitiatedDragStartEvent(t,e,i,n)),(()=>this.processTabDropdownActiveChanged())),this._show=i.show,this._popoutEnabled=i.popoutEnabled,this._popoutLabel=i.popoutLabel,this._maximiseEnabled=i.maximiseEnabled,this._maximiseLabel=i.maximiseLabel,this._minimiseEnabled=i.minimiseEnabled,this._minimiseLabel=i.minimiseLabel,this._closeEnabled=i.closeEnabled,this._closeLabel=i.closeLabel,this._tabDropdownEnabled=i.tabDropdownEnabled,this._tabDropdownLabel=i.tabDropdownLabel,this.setSide(i.side),this._canRemoveComponent=this._configClosable,this._element=document.createElement(\"section\"),this._element.classList.add(\"lm_header\"),this._controlsContainerElement=document.createElement(\"section\"),this._controlsContainerElement.classList.add(\"lm_controls\"),this._element.appendChild(this._tabsContainer.element),this._element.appendChild(this._controlsContainerElement),this._element.appendChild(this._tabsContainer.dropdownElement),this._element.addEventListener(\"click\",this._clickListener,{passive:!0}),this._element.addEventListener(\"touchstart\",this._touchStartListener,{passive:!0}),this._documentMouseUpListener=()=>this._tabsContainer.hideAdditionalTabsDropdown(),globalThis.document.addEventListener(\"mouseup\",this._documentMouseUpListener,{passive:!0}),this._tabControlOffset=this._layoutManager.layoutConfig.settings.tabControlOffset,this._tabDropdownEnabled&&(this._tabDropdownButton=new Kt(this,this._tabDropdownLabel,\"lm_tabdropdown\",(()=>this._tabsContainer.showAdditionalTabsDropdown()))),this._popoutEnabled&&(this._popoutButton=new Kt(this,this._popoutLabel,\"lm_popout\",(()=>this.handleButtonPopoutEvent()))),this._maximiseEnabled&&(this._maximiseButton=new Kt(this,this._maximiseLabel,\"lm_maximise\",(t=>this.handleButtonMaximiseToggleEvent(t)))),this._configClosable&&(this._closeButton=new Kt(this,this._closeLabel,\"lm_close\",(()=>s()))),this.processTabDropdownActiveChanged()}get show(){return this._show}get side(){return this._side}get leftRightSided(){return this._leftRightSided}get layoutManager(){return this._layoutManager}get parent(){return this._parent}get tabs(){return this._tabsContainer.tabs}get lastVisibleTabIndex(){return this._tabsContainer.lastVisibleTabIndex}get element(){return this._element}get tabsContainerElement(){return this._tabsContainer.element}get controlsContainerElement(){return this._controlsContainerElement}destroy(){this.emit(\"destroy\"),this._popoutEvent=void 0,this._maximiseToggleEvent=void 0,this._clickEvent=void 0,this._touchStartEvent=void 0,this._componentRemoveEvent=void 0,this._componentFocusEvent=void 0,this._componentDragStartEvent=void 0,this._tabsContainer.destroy(),globalThis.document.removeEventListener(\"mouseup\",this._documentMouseUpListener),this._element.remove()}createTab(t,e){this._tabsContainer.createTab(t,e)}removeTab(t){this._tabsContainer.removeTab(t)}processActiveComponentChanged(t){this._tabsContainer.processActiveComponentChanged(t),this.updateTabSizes()}setSide(t){this._side=t,this._leftRightSided=[nt.right,nt.left].includes(this._side)}setRowColumnClosable(t){this._rowColumnClosable=t,this.updateClosability()}updateClosability(){let t;if(this._configClosable)if(this._rowColumnClosable){t=!0;const e=this.tabs.length;for(let i=0;i1}applyFocusedValue(t){t?this._element.classList.add(\"lm_focused\"):this._element.classList.remove(\"lm_focused\")}processMaximised(){if(void 0===this._maximiseButton)throw new J(\"HPMAX16997\");this._maximiseButton.element.setAttribute(\"title\",this._minimiseLabel)}processMinimised(){if(void 0===this._maximiseButton)throw new J(\"HPMIN16997\");this._maximiseButton.element.setAttribute(\"title\",this._maximiseLabel)}updateTabSizes(){if(this._tabsContainer.tabCount>0){const t=this._show?this._layoutManager.layoutConfig.dimensions.headerHeight:0;let e;this._leftRightSided?(this._element.style.height=\"\",this._element.style.width=zt(t)):(this._element.style.width=\"\",this._element.style.height=zt(t)),e=this._leftRightSided?this._element.offsetHeight-this._controlsContainerElement.offsetHeight-this._tabControlOffset:this._element.offsetWidth-this._controlsContainerElement.offsetWidth-this._tabControlOffset,this._tabsContainer.updateTabSizes(e,this._getActiveComponentItemEvent())}}handleTabInitiatedComponentRemoveEvent(t){if(this._canRemoveComponent){if(void 0===this._componentRemoveEvent)throw new J(\"HHTCE22294\");this._componentRemoveEvent(t)}}handleTabInitiatedComponentFocusEvent(t){if(void 0===this._componentFocusEvent)throw new J(\"HHTAE22294\");this._componentFocusEvent(t)}handleTabInitiatedDragStartEvent(t,e,i,n){if(this._canRemoveComponent){if(void 0===this._componentDragStartEvent)throw new J(\"HHTDSE22294\");this._componentDragStartEvent(t,e,i,n)}else i.cancelDrag()}processTabDropdownActiveChanged(){void 0!==this._tabDropdownButton&&Dt(this._tabDropdownButton.element,this._tabsContainer.dropdownActive)}handleButtonPopoutEvent(){if(this._layoutManager.layoutConfig.settings.popoutWholeStack){if(void 0===this._popoutEvent)throw new J(\"HHBPOE17834\");this._popoutEvent()}else{const t=this._getActiveComponentItemEvent();t&&t.popout()}}handleButtonMaximiseToggleEvent(t){if(void 0===this._maximiseToggleEvent)throw new J(\"HHBMTE16834\");this._maximiseToggleEvent()}onClick(t){t.target===this._element&&this.notifyClick(t)}onTouchStart(t){t.target===this._element&&this.notifyTouchStart(t)}notifyClick(t){if(void 0===this._clickEvent)throw new J(\"HNHC46834\");this._clickEvent(t)}notifyTouchStart(t){if(void 0===this._touchStartEvent)throw new J(\"HNHTS46834\");this._touchStartEvent(t)}}class ee extends $t{constructor(t,e,i){var n,o,s,r,a,l,h,d,c,m,u,p,g,f,v,_,y,C,w;super(t,e,i,ee.createElement(document)),this._headerSideChanged=!1,this._resizeListener=()=>this.handleResize(),this._maximisedListener=()=>this.handleMaximised(),this._minimisedListener=()=>this.handleMinimised(),this._headerConfig=e.header;const I=t.layoutConfig.header,b=e.content;let S;if(1!==b.length)S=void 0;else{S=b[0].header}this._initialWantMaximise=e.maximised,this._initialActiveItemIndex=null!==(n=e.activeItemIndex)&&void 0!==n?n:0;const E=null!==(r=null!==(s=null===(o=this._headerConfig)||void 0===o?void 0:o.show)&&void 0!==s?s:null==S?void 0:S.show)&&void 0!==r?r:I.show,x=null!==(h=null!==(l=null===(a=this._headerConfig)||void 0===a?void 0:a.popout)&&void 0!==l?l:null==S?void 0:S.popout)&&void 0!==h?h:I.popout,L=null!==(m=null!==(c=null===(d=this._headerConfig)||void 0===d?void 0:d.maximise)&&void 0!==c?c:null==S?void 0:S.maximise)&&void 0!==m?m:I.maximise,z=null!==(g=null!==(p=null===(u=this._headerConfig)||void 0===u?void 0:u.close)&&void 0!==p?p:null==S?void 0:S.close)&&void 0!==g?g:I.close,M=null!==(_=null!==(v=null===(f=this._headerConfig)||void 0===f?void 0:f.minimise)&&void 0!==v?v:null==S?void 0:S.minimise)&&void 0!==_?_:I.minimise,P=null!==(w=null!==(C=null===(y=this._headerConfig)||void 0===y?void 0:y.tabDropdown)&&void 0!==C?C:null==S?void 0:S.tabDropdown)&&void 0!==w?w:I.tabDropdown;this._maximisedEnabled=!1!==L;const T={show:!1!==E,side:!1===E?nt.top:E,popoutEnabled:!1!==x,popoutLabel:!1===x?\"\":x,maximiseEnabled:this._maximisedEnabled,maximiseLabel:!1===L?\"\":L,closeEnabled:!1!==z,closeLabel:!1===z?\"\":z,minimiseEnabled:!0,minimiseLabel:M,tabDropdownEnabled:!1!==P,tabDropdownLabel:!1===P?\"\":P};this._header=new te(t,this,T,e.isClosable&&!1!==z,(()=>this.getActiveComponentItem()),(()=>this.remove()),(()=>this.handlePopoutEvent()),(()=>this.toggleMaximise()),(t=>this.handleHeaderClickEvent(t)),(t=>this.handleHeaderTouchStartEvent(t)),(t=>this.handleHeaderComponentRemoveEvent(t)),(t=>this.handleHeaderComponentFocusEvent(t)),((t,e,i,n)=>this.handleHeaderComponentStartDragEvent(t,e,i,n))),this.isStack=!0,this._childElementContainer=document.createElement(\"section\"),this._childElementContainer.classList.add(\"lm_items\"),this.on(\"resize\",this._resizeListener),this._maximisedEnabled&&(this.on(\"maximised\",this._maximisedListener),this.on(\"minimised\",this._minimisedListener)),this.element.appendChild(this._header.element),this.element.appendChild(this._childElementContainer),this.setupHeaderPosition(),this._header.updateClosability()}get childElementContainer(){return this._childElementContainer}get header(){return this._header}get headerShow(){return this._header.show}get headerSide(){return this._header.side}get headerLeftRightSided(){return this._header.leftRightSided}get contentAreaDimensions(){return this._contentAreaDimensions}get initialWantMaximise(){return this._initialWantMaximise}get isMaximised(){return this===this.layoutManager.maximisedStack}get stackParent(){if(!this.parent)throw new Error(\"Stack should always have a parent\");return this.parent}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}init(){if(!0===this.isInitialised)return;this.updateNodeSize();for(let t=0;t0){if(this._initialActiveItemIndex<0||this._initialActiveItemIndex>=e)throw new Error(`ActiveItemIndex out of range: ${this._initialActiveItemIndex} id: ${this.id}`);for(let i=0;ithis.contentItems.length)throw e-=1,new X(\"SAC99728\");if(t instanceof jt)return e=super.addChild(t,e),this._childElementContainer.appendChild(t.element),this._header.createTab(t,e),this.setActiveComponentItem(t,i),this._header.updateTabSizes(),this.updateSize(!1),t.container.setBaseLogicalZIndex(),this._header.updateClosability(),this.emitStateChangedEvent(),e;throw new X(\"SACC88532\")}removeChild(t,e){const i=t,n=this.contentItems.indexOf(i),o=1===this.contentItems.length;if(this._activeComponentItem===i&&(i.focused&&i.blur(),!o)){const t=0===n?1:n-1;this.setActiveComponentItem(this.contentItems[t],!1)}this._header.removeTab(i),super.removeChild(i,e),o||this._header.updateClosability(),this.emitStateChangedEvent()}toggleMaximise(){this.isMaximised?this.minimise():this.maximise()}maximise(){if(!this.isMaximised){this.layoutManager.setMaximisedStack(this);const t=this.contentItems,e=t.length;for(let i=0;i0&&void 0===t)throw new Error(\"expected non-empty stack to have an active component item\");return{type:\"stack\",content:this.calculateConfigContent(),size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,isClosable:this.isClosable,maximised:this.isMaximised,header:this.createHeaderConfig(),activeItemIndex:t}}onDrop(t,e){if(\"header\"===this._dropSegment){if(this.resetHeaderDropZone(),void 0===this._dropIndex)throw new J(\"SODDI68990\");return void this.addChild(t,this._dropIndex)}if(\"body\"===this._dropSegment)return void this.addChild(t,0,!0);const i=\"top\"===this._dropSegment||\"bottom\"===this._dropSegment,n=\"left\"===this._dropSegment||\"right\"===this._dropSegment,o=\"top\"===this._dropSegment||\"left\"===this._dropSegment,s=i&&this.stackParent.isColumn||n&&this.stackParent.isRow;if(t.isComponent){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createAndInitContentItem(e,this);i.addChild(t),t=i}if(t.type===at.row||t.type===at.column){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}if(s){const e=this.stackParent.contentItems.indexOf(this);this.stackParent.addChild(t,o?e:e+1,!0),this.size*=.5,t.size=this.size,t.sizeUnit=this.sizeUnit,this.stackParent.updateSize(!1)}else{const e=i?at.column:at.row,n=ct.createDefault(e),s=this.layoutManager.createContentItem(n,this);this.stackParent.replaceChild(this,s),s.addChild(t,o?0:void 0,!0),s.addChild(this,o?void 0:0,!0),this.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}highlightDropZone(t,e){for(const i in this._contentAreaDimensions){const n=i,o=this._contentAreaDimensions[n].hoverArea;if(o.x1t&&o.y1e)return void(\"header\"===n?(this._dropSegment=\"header\",this.highlightHeaderDropZone(this._header.leftRightSided?e:t)):(this.resetHeaderDropZone(),this.highlightBodyDropZone(n)))}}getArea(){if(\"none\"===this.element.style.display)return null;const t=super.getElementArea(this._header.element),e=super.getElementArea(this._childElementContainer);if(null===t||null===e)throw new K(\"SGAHC13086\");const i=e.x2-e.x1,n=e.y2-e.y1;return this._contentAreaDimensions={header:{hoverArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2},highlightArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2}}},0===this.contentItems.length?(this._contentAreaDimensions.body={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2}},super.getElementArea(this.element)):(this._contentAreaDimensions.left={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x1+.25*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x1+.5*i,y2:e.y2}},this._contentAreaDimensions.top={hoverArea:{x1:e.x1+.25*i,y1:e.y1,x2:e.x1+.75*i,y2:e.y1+.5*n},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y1+.5*n}},this._contentAreaDimensions.right={hoverArea:{x1:e.x1+.75*i,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1+.5*i,y1:e.y1,x2:e.x2,y2:e.y2}},this._contentAreaDimensions.bottom={hoverArea:{x1:e.x1+.25*i,y1:e.y1+.5*n,x2:e.x1+.75*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1+.5*n,x2:e.x2,y2:e.y2}},super.getElementArea(this.element))}positionHeader(t){this._header.side!==t&&(this._header.setSide(t),this._headerSideChanged=!0,this.setupHeaderPosition())}updateNodeSize(){if(\"none\"!==this.element.style.display){const t=kt(this.element);if(this._header.show){t[this._header.leftRightSided?it.width:it.height]-=this.layoutManager.layoutConfig.dimensions.headerHeight}this._childElementContainer.style.width=zt(t.width),this._childElementContainer.style.height=zt(t.height);for(let e=0;e=o&&tthis.onDrag(t,e,i))),this._dragListener.on(\"dragStop\",(()=>this.onDrop())),this.createDragProxyElements(t,e),null===this._componentItem.parent)throw new K(\"DPC10097\");this._componentItemFocused=this._componentItem.focused,this._componentItemFocused&&this._componentItem.blur(),this._componentItem.parent.removeChild(this._componentItem,!0),this.setDimensions(),document.body.appendChild(this._element),this.determineMinMaxXY(),this._layoutManager.calculateItemAreas(),this.setDropPosition(t,e)}get element(){return this._element}createDragProxyElements(t,e){this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_dragProxy\");const i=document.createElement(\"div\");i.classList.add(\"lm_header\");const n=document.createElement(\"div\");n.classList.add(\"lm_tabs\");const o=document.createElement(\"div\");o.classList.add(\"lm_tab\");const s=document.createElement(\"span\");s.classList.add(\"lm_title\"),o.appendChild(s),n.appendChild(o),i.appendChild(n),this._proxyContainerElement=document.createElement(\"div\"),this._proxyContainerElement.classList.add(\"lm_content\"),this._element.appendChild(i),this._element.appendChild(this._proxyContainerElement),this._originalParent instanceof ee&&this._originalParent.headerShow&&(this._sided=this._originalParent.headerLeftRightSided,this._element.classList.add(\"lm_\"+this._originalParent.headerSide),[nt.right,nt.bottom].indexOf(this._originalParent.headerSide)>=0&&this._proxyContainerElement.insertAdjacentElement(\"afterend\",i)),this._element.style.left=zt(t),this._element.style.top=zt(e),o.setAttribute(\"title\",this._componentItem.title),s.insertAdjacentText(\"afterbegin\",this._componentItem.title),this._proxyContainerElement.appendChild(this._componentItem.element)}determineMinMaxXY(){const t=this._layoutManager.groundItem;if(void 0===t)throw new J(\"DPDMMXY73109\");{const e=t.element.getBoundingClientRect();this._minX=e.left+document.body.scrollLeft,this._minY=e.top+document.body.scrollTop,this._maxX=this._minX+e.width,this._maxY=this._minY+e.height}}onDrag(t,e,i){const n=i.pageX,o=i.pageY;this.setDropPosition(n,o),this._componentItem.drag()}setDropPosition(t,e){this._layoutManager.layoutConfig.settings.constrainDragToContainer&&(t<=this._minX?t=Math.ceil(this._minX):t>=this._maxX&&(t=Math.floor(this._maxX)),e<=this._minY?e=Math.ceil(this._minY):e>=this._maxY&&(e=Math.floor(this._maxY))),this._element.style.left=zt(t),this._element.style.top=zt(e),this._area=this._layoutManager.getArea(t,e),null!==this._area&&(this._lastValidArea=this._area,this._area.contentItem.highlightDropZone(t,e,this._area))}onDrop(){const t=this._layoutManager.dropTargetIndicator;if(null===t)throw new K(\"DPOD30011\");let e;if(t.hide(),this._componentItem.exitDragMode(),null!==this._area)e=this._componentItem,this._area.contentItem.onDrop(e,this._area);else if(null!==this._lastValidArea){e=this._componentItem;this._lastValidArea.contentItem.onDrop(e,this._lastValidArea)}else this._originalParent?(e=this._componentItem,this._originalParent.addChild(e)):this._componentItem.destroy();this._element.remove(),this._layoutManager.emit(\"itemDropped\",this._componentItem),this._componentItemFocused&&void 0!==e&&e.focus()}setDimensions(){const t=this._layoutManager.layoutConfig.dimensions;if(void 0===t)throw new Error(\"DragProxy.setDimensions: dimensions undefined\");let e=t.dragProxyWidth,i=t.dragProxyHeight;if(void 0===e||void 0===i)throw new Error(\"DragProxy.setDimensions: width and/or height undefined\");const n=!1===this._layoutManager.layoutConfig.header.show?0:t.headerHeight;this._element.style.width=zt(e),this._element.style.height=zt(i),e-=this._sided?n:0,i-=this._sided?0:n,this._proxyContainerElement.style.width=zt(e),this._proxyContainerElement.style.height=zt(i),this._componentItem.enterDragMode(e,i),this._componentItem.show()}}class ne{constructor(t,e,i,n,o,s,r){this._layoutManager=t,this._element=e,this._extraAllowableChildTargets=i,this._componentTypeOrFtn=n,this._componentState=o,this._title=s,this._id=r,this._dragListener=null,this._dummyGroundContainer=document.createElement(\"div\");const a=gt.createDefault(\"row\");this._dummyGroundContentItem=new Yt(this._layoutManager,a,this._dummyGroundContainer),this.createDragListener()}destroy(){this.removeDragListener()}createDragListener(){this.removeDragListener(),this._dragListener=new Zt(this._element,this._extraAllowableChildTargets),this._dragListener.on(\"dragStart\",((t,e)=>this.onDragStart(t,e))),this._dragListener.on(\"dragStop\",(()=>this.onDragStop()))}onDragStart(t,e){var i;const n=\"component\";let o;if(\"function\"==typeof this._componentTypeOrFtn){const t=this._componentTypeOrFtn();o=ne.isDragSourceComponentItemConfig(t)?{type:n,componentState:t.state,componentType:t.type,title:null!==(i=t.title)&&void 0!==i?i:this._title}:t}else o={type:n,componentState:this._componentState,componentType:this._componentTypeOrFtn,title:this._title,id:this._id};const s=bt.resolve(o,!1),r=new jt(this._layoutManager,s,this._dummyGroundContentItem);if(this._dummyGroundContentItem.contentItems.push(r),null===this._dragListener)throw new K(\"DSODSD66746\");{const i=new ie(t,e,this._dragListener,this._layoutManager,r,this._dummyGroundContentItem),n=this._layoutManager.transitionIndicator;if(null===n)throw new K(\"DSODST66746\");n.transitionElements(this._element,i.element)}}onDragStop(){this.createDragListener()}removeDragListener(){null!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=null)}}!function(t){t.isDragSourceComponentItemConfig=function(t){return!(\"componentType\"in t)}}(ne||(ne={}));class oe{constructor(){this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_dropTargetIndicator\");const t=document.createElement(\"div\");t.classList.add(\"lm_inner\"),this._element.appendChild(t),document.body.appendChild(this._element)}destroy(){this._element.remove()}highlightArea(t,e){this._element.style.left=zt(t.x1+e),this._element.style.top=zt(t.y1+e),this._element.style.width=zt(t.x2-t.x1-e),this._element.style.height=zt(t.y2-t.y1-e),this._element.style.display=\"block\"}hide(){Dt(this._element,!1)}}class se{constructor(){this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_transition_indicator\"),document.body.appendChild(this._element),this._toElement=null,this._fromDimensions=null,this._totalAnimationDuration=200,this._animationStartTime=null}destroy(){this._element.remove()}transitionElements(t,e){}nextAnimationFrame(){}measure(t){const e=t.getBoundingClientRect();return{left:e.left,top:e.top,width:t.offsetWidth,height:t.offsetHeight}}}class re extends Wt{constructor(t){super(),this._layoutManager=t,this._childEventListener=t=>this.onEventFromChild(t),globalThis.addEventListener(re.ChildEventName,this._childEventListener,{passive:!0})}emit(t,...e){\"userBroadcast\"===t?this.emitUserBroadcast(...e):super.emit(t,...e)}emitUserBroadcast(...t){this.handleUserBroadcastEvent(\"userBroadcast\",t)}destroy(){globalThis.removeEventListener(re.ChildEventName,this._childEventListener)}handleUserBroadcastEvent(t,e){this._layoutManager.isSubWindow?this.propagateToParent(t,e):this.propagateToThisAndSubtree(t,e)}onEventFromChild(t){const e=t.detail;this.handleUserBroadcastEvent(e.eventName,e.args)}propagateToParent(t,e){const i={bubbles:!0,cancelable:!0,detail:{layoutManager:this._layoutManager,eventName:t,args:e}},n=new CustomEvent(re.ChildEventName,i),o=globalThis.opener;if(null===o)throw new K(\"EHPTP15778\");o.dispatchEvent(n)}propagateToThisAndSubtree(t,e){this.emitUnknown(t,...e);for(let i=0;ithis.handleContainerResize())),this._windowBeforeUnloadListener=()=>this.onBeforeUnload(),this._windowBeforeUnloadListening=!1,this._maximisedStackBeforeDestroyedListener=t=>this.cleanupBeforeMaximisedStackDestroyed(t),this.isSubWindow=t.isSubWindow,this._constructorOrSubWindowLayoutConfig=t.constructorOrSubWindowLayoutConfig,Q.checkInitialise(),dt.checkInitialise(),void 0!==t.containerElement&&(this._containerElement=t.containerElement)}get container(){return this._containerElement}get isInitialised(){return this._isInitialised}get groundItem(){return this._groundItem}get root(){return this._groundItem}get openPopouts(){return this._openPopouts}get dropTargetIndicator(){return this._dropTargetIndicator}get transitionIndicator(){return this._transitionIndicator}get width(){return this._width}get height(){return this._height}get eventHub(){return this._eventHub}get rootItem(){if(void 0===this._groundItem)throw new Error(\"Cannot access rootItem before init\");return 0===this._groundItem.contentItems.length?void 0:this._groundItem.contentItems[0]}get focusedComponentItem(){return this._focusedComponentItem}get tabDropPlaceholder(){return this._tabDropPlaceholder}get maximisedStack(){return this._maximisedStack}get deprecatedConstructor(){return!this.isSubWindow&&void 0!==this._constructorOrSubWindowLayoutConfig}destroy(){if(this._isInitialised){this._windowBeforeUnloadListening&&(globalThis.removeEventListener(\"beforeunload\",this._windowBeforeUnloadListener),this._windowBeforeUnloadListening=!1),!0===this.layoutConfig.settings.closePopoutsOnUnload&&this.closeAllOpenPopouts(),this._resizeObserver.disconnect(),this.checkClearResizeTimeout(),void 0!==this._groundItem&&this._groundItem.destroy(),this._tabDropPlaceholder.remove(),null!==this._dropTargetIndicator&&this._dropTargetIndicator.destroy(),null!==this._transitionIndicator&&this._transitionIndicator.destroy(),this._eventHub.destroy();for(const t of this._dragSources)t.destroy();this._dragSources=[],this._isInitialised=!1}}minifyConfig(t){return _t.minifyConfig(t)}unminifyConfig(t){return _t.unminifyConfig(t)}init(){let t;if(this.setContainer(),this._dropTargetIndicator=new oe,this._transitionIndicator=new se,this.updateSizeFromContainer(),this.isSubWindow){if(void 0===this._constructorOrSubWindowLayoutConfig)throw new J(\"LMIU07155\");{const e=this._constructorOrSubWindowLayoutConfig.root;if(void 0===e)throw new X(\"LMIC07156\");if(!Ct.isComponent(e))throw new X(\"LMIC07157\");t=e;const i=xt.resolve(this._constructorOrSubWindowLayoutConfig);this.layoutConfig=Object.assign(Object.assign({},i),{root:void 0})}}else void 0===this._constructorOrSubWindowLayoutConfig?this.layoutConfig=_t.createDefault():this.layoutConfig=xt.resolve(this._constructorOrSubWindowLayoutConfig);const e=this.layoutConfig;this._groundItem=new Yt(this,e.root,this._containerElement),this._groundItem.init(),this.checkLoadedLayoutMaximiseItem(),this._resizeObserver.observe(this._containerElement),this._isInitialised=!0,this.adjustColumnsResponsive(),this.emit(\"initialised\"),void 0!==t&&this.loadComponentAsRoot(t)}loadLayout(t){if(!this.isInitialised)throw new Error(\"GoldenLayout: Need to call init() if LayoutConfig with defined root passed to constructor\");if(void 0===this._groundItem)throw new J(\"LMLL11119\");this.createSubWindows(),this.layoutConfig=xt.resolve(t),this._groundItem.loadRoot(this.layoutConfig.root),this.checkLoadedLayoutMaximiseItem(),this.adjustColumnsResponsive()}saveLayout(){if(!1===this._isInitialised)throw new Error(\"Can't create config, layout not yet initialised\");if(void 0===this._groundItem)throw new J(\"LMTC18244\");{const t=this._groundItem.calculateConfigContent();let e;e=1!==t.length?void 0:t[0],this.reconcilePopoutWindows();const i=[];for(let t=0;t=0?n=this._groundItem.contentItems[0]:e=0;break;case at.row:case at.column:e=n.addItem(t,i.index);break;case at.stack:if(Ct.isComponent(t)){e=n.addItem(t,i.index);break}throw Error(tt[6]);case at.component:throw new X(\"LMAIALC87444602\");default:throw new Y(\"LMAIALU98881733\",n.type)}if(Ct.isComponent(t)){const t=n.contentItems[e];Gt.isStack(t)&&(n=t,e=0)}return i.parentItem=n,i.index=e,i}}}loadComponentAsRoot(t){if(void 0===this._groundItem)throw new Error(\"Cannot add item before init\");this._groundItem.loadComponentAsRoot(t)}updateSize(t,e){this.setSize(t,e)}setSize(t,e){if(this._width=t,this._height=e,!0===this._isInitialised){if(void 0===this._groundItem)throw new J(\"LMUS18881\");if(this._groundItem.setSize(this._width,this._height),this._maximisedStack){const{width:t,height:e}=kt(this._containerElement);Tt(this._maximisedStack.element,t),At(this._maximisedStack.element,e),this._maximisedStack.updateSize(!1)}this.adjustColumnsResponsive()}}beginSizeInvalidation(){this._sizeInvalidationBeginCount++}endSizeInvalidation(){0==--this._sizeInvalidationBeginCount&&this.updateSizeFromContainer()}updateSizeFromContainer(){const{width:t,height:e}=kt(this._containerElement);this.setSize(t,e)}updateRootSize(t=!1){if(void 0===this._groundItem)throw new J(\"LMURS28881\");this._groundItem.updateSize(t)}createAndInitContentItem(t,e){const i=this.createContentItem(t,e);return i.init(),i}createContentItem(t,e){if(\"string\"!=typeof t.type)throw new G(\"Missing parameter 'type'\",JSON.stringify(t));if(ct.isComponentItem(t)&&!(e instanceof ee)&&e&&!(!0===this.isSubWindow&&e instanceof Yt)){t={type:at.stack,content:[t],size:t.size,sizeUnit:t.sizeUnit,minSize:t.minSize,minSizeUnit:t.minSizeUnit,id:t.id,maximised:t.maximised,isClosable:t.isClosable,activeItemIndex:0,header:void 0}}return this.createContentItemFromConfig(t,e)}findFirstComponentItemById(t){if(void 0===this._groundItem)throw new J(\"LMFFCIBI82446\");return this.findFirstContentItemTypeByIdRecursive(at.component,t,this._groundItem)}createPopout(t,e,i,n){return t instanceof Gt?this.createPopoutFromContentItem(t,e,i,n):this.createPopoutFromItemConfig(t,e,i,n)}createPopoutFromContentItem(t,e,i,n){let o=t.parent,s=t;for(;null!==o&&1===o.contentItems.length&&!o.isGround;)s=o,o=o.parent;if(null===o)throw new K(\"LMCPFCI00834\");{if(void 0===n&&(n=o.contentItems.indexOf(s)),null!==i&&o.addPopInParentId(i),void 0===e){const i=globalThis.screenX||globalThis.screenLeft,n=globalThis.screenY||globalThis.screenTop,o=t.element.offsetLeft,s=t.element.offsetTop,{width:r,height:a}=kt(t.element);e={left:i+o,top:n+s,width:r,height:a}}const r=t.toConfig();if(t.remove(),ft.isRootItemConfig(r))return this.createPopoutFromItemConfig(r,e,i,n);throw new Error(`${tt[0]}`)}}beginVirtualSizedContainerAdding(){0==++this._virtualSizedContainerAddingBeginCount&&(this._virtualSizedContainers.length=0)}addVirtualSizedContainer(t){this._virtualSizedContainers.push(t)}endVirtualSizedContainerAdding(){if(0==--this._virtualSizedContainerAddingBeginCount){const t=this._virtualSizedContainers.length;if(t>0){this.fireBeforeVirtualRectingEvent(t);for(let e=0;ethis.emit(\"windowOpened\",a))),a.on(\"closed\",(()=>this.reconcilePopoutWindows())),this._openPopouts.push(a),this.layoutConfig.settings.closePopoutsOnUnload&&!this._windowBeforeUnloadListening&&(globalThis.addEventListener(\"beforeunload\",this._windowBeforeUnloadListener,{passive:!0}),this._windowBeforeUnloadListening=!0),a}closeAllOpenPopouts(){for(let t=0;tglobalThis.close()),1)}getArea(t,e){let i=null,n=1/0;for(let o=0;o=s.x1&&t=s.y1&&es.surface&&(n=s.surface,i=s)}return i}calculateItemAreas(){const t=this.getAllContentItems(),e=this._groundItem;if(void 0===e)throw new J(\"LMCIAR44365\");if(1!==t.length){e.contentItems[0].isStack?this._itemAreas=[]:this._itemAreas=e.createSideAreas();for(let e=0;e0){let e=t[0];if(Gt.isComponentItem(e)){const t=e.parent;if(null===t)throw new K(\"LMXLLMI69999\");e=t}if(!Gt.isStack(e))throw new X(\"LMCLLMI19993\");e.maximise()}}}processMaximiseStack(t){if(this._maximisedStack=t,t.on(\"beforeItemDestroyed\",this._maximisedStackBeforeDestroyedListener),t.element.classList.add(\"lm_maximised\"),t.element.insertAdjacentElement(\"afterend\",this._maximisePlaceholder),void 0===this._groundItem)throw new J(\"LMMXI19993\");{this._groundItem.element.prepend(t.element);const{width:e,height:i}=kt(this._containerElement);Tt(t.element,e),At(t.element,i),t.updateSize(!0),t.focusActiveContentItem(),this._maximisedStack.emit(\"maximised\"),this.emit(\"stateChanged\")}}processMinimiseMaximisedStack(){if(void 0===this._maximisedStack)throw new X(\"LMMMS74422\");{const t=this._maximisedStack;if(null===t.parent)throw new K(\"LMMI13668\");t.element.classList.remove(\"lm_maximised\"),this._maximisePlaceholder.insertAdjacentElement(\"afterend\",t.element),this._maximisePlaceholder.remove(),this.updateRootSize(!0),this._maximisedStack=void 0,t.off(\"beforeItemDestroyed\",this._maximisedStackBeforeDestroyedListener),t.emit(\"minimised\"),this.emit(\"stateChanged\")}}reconcilePopoutWindows(){const t=[];for(let e=0;e{this._resizeTimeoutId=void 0,this.beginSizeInvalidation(),this.endSizeInvalidation()}),this.resizeDebounceInterval))}checkClearResizeTimeout(){void 0!==this._resizeTimeoutId&&(clearTimeout(this._resizeTimeoutId),this._resizeTimeoutId=void 0)}setContainer(){var t;const e=document.body,i=null!==(t=this._containerElement)&&void 0!==t?t:e;if(i===e){this.resizeWithContainerAutomatically=!0;const t=document.documentElement;t.style.height=\"100%\",t.style.margin=\"0\",t.style.padding=\"0\",t.style.overflow=\"clip\",e.style.height=\"100%\",e.style.margin=\"0\",e.style.padding=\"0\",e.style.overflow=\"clip\"}this._containerElement=i}onBeforeUnload(){this.destroy()}adjustColumnsResponsive(){if(void 0===this._groundItem)throw new J(\"LMACR20883\");if(this._firstLoad=!1,this.useResponsiveLayout()&&!this._updatingColumnsResponsive&&this._groundItem.contentItems.length>0&&this._groundItem.contentItems[0].isRow){if(void 0===this._groundItem||null===this._width)throw new J(\"LMACR77412\");{const t=this._groundItem.contentItems[0].contentItems.length;if(t<=1)return;{const e=this.layoutConfig.dimensions.defaultMinItemWidth;if(t*e<=this._width)return;{this._updatingColumnsResponsive=!0;const i=t-Math.max(Math.floor(this._width/e),1),n=this._groundItem.contentItems[0],o=this.getAllStacks();if(0===o.length)throw new X(\"LMACRS77413\");{const t=o[0];for(let e=0;en?void 0:{parentItem:t,index:o}}}case 1:if(void 0===this._focusedComponentItem)return;{const t=this._focusedComponentItem.parentItem;return this.tryCreateLocationFromParentItem(t,e)}case 2:{const t=this.findFirstContentItemType(at.stack);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 3:{let t=this.findFirstContentItemType(at.row);return void 0!==t?this.tryCreateLocationFromParentItem(t,e):(t=this.findFirstContentItemType(at.column),void 0!==t?this.tryCreateLocationFromParentItem(t,e):void 0)}case 4:{const t=this.findFirstContentItemType(at.row);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 5:{const t=this.findFirstContentItemType(at.column);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 6:if(void 0===this._groundItem)throw new J(\"LMFLRIF18244\");return void 0!==this.rootItem?void 0:void 0===e||0===e?{parentItem:this._groundItem,index:0}:void 0;case 7:if(void 0===this._groundItem)throw new J(\"LMFLF18244\");{const t=this._groundItem.contentItems;if(0===t.length)return void 0===e||0===e?{parentItem:this._groundItem,index:0}:void 0;{const i=t[0];return this.tryCreateLocationFromParentItem(i,e)}}}}tryCreateLocationFromParentItem(t,e){const i=t.contentItems.length;return void 0===e?{parentItem:t,index:i}:e<0||e>i?void 0:{parentItem:t,index:e}}}!function(t){t.createMaximisePlaceElement=function(t){const e=t.createElement(\"div\");return e.classList.add(\"lm_maximise_place\"),e},t.createTabDropPlaceholderElement=function(t){const e=t.createElement(\"div\");return e.classList.add(\"lm_drop_tab_placeholder\"),e},t.defaultLocationSelectors=[{typeId:1,index:void 0},{typeId:2,index:void 0},{typeId:3,index:void 0},{typeId:7,index:void 0}],t.afterFocusedItemIfPossibleLocationSelectors=[{typeId:0,index:1},{typeId:2,index:void 0},{typeId:3,index:void 0},{typeId:7,index:void 0}]}(ae||(ae={}));class le extends ae{constructor(t,e,i,n){if(super(le.createLayoutManagerConstructorParameters(t,e)),this._bindComponentEventHanlderPassedInConstructor=!1,this._creationTimeoutPassed=!1,void 0!==e&&\"function\"==typeof e&&(this.bindComponentEvent=e,this._bindComponentEventHanlderPassedInConstructor=!0,void 0!==i&&(this.unbindComponentEvent=i)),!this._bindComponentEventHanlderPassedInConstructor&&this.isSubWindow){if(void 0===this._constructorOrSubWindowLayoutConfig)throw new J(\"VLC98823\");{const t=xt.resolve(this._constructorOrSubWindowLayoutConfig);this.layoutConfig=Object.assign(Object.assign({},t),{root:void 0})}}!0!==n&&(this.deprecatedConstructor||this.init())}destroy(){this.bindComponentEvent=void 0,this.unbindComponentEvent=void 0,super.destroy()}init(){if(this._bindComponentEventHanlderPassedInConstructor||\"loading\"!==document.readyState&&null!==document.body){if(!this._bindComponentEventHanlderPassedInConstructor&&!0===this.isSubWindow&&!this._creationTimeoutPassed)return setTimeout((()=>this.init()),7),void(this._creationTimeoutPassed=!0);!0===this.isSubWindow&&(this._bindComponentEventHanlderPassedInConstructor||this.clearHtmlAndAdjustStylesForSubWindow(),window.__glInstance=this),super.init()}else document.addEventListener(\"DOMContentLoaded\",(()=>this.init()),{passive:!0})}clearHtmlAndAdjustStylesForSubWindow(){const t=document.head,e=new Array(4);e[0]=document.querySelectorAll(\"body link\"),e[1]=document.querySelectorAll(\"body style\"),e[2]=document.querySelectorAll(\"template\"),e[3]=document.querySelectorAll(\".gl_keep\");for(let i=0;ithis.emit(\"popIn\"))),document.body.appendChild(t),!0}}bindComponent(t,e){if(void 0!==this.bindComponentEvent){return this.bindComponentEvent(t,e)}if(void 0!==this.getComponentEvent)return{virtual:!1,component:this.getComponentEvent(t,e)};{const t=`${tt[2]}: ${JSON.stringify(e)}`;throw new Z(t)}}unbindComponent(t,e,i){if(void 0!==this.unbindComponentEvent)this.unbindComponentEvent(t);else if(!e&&void 0!==this.releaseComponentEvent){if(void 0===i)throw new J(\"VCUCRCU333998\");this.releaseComponentEvent(t,i)}}}!function(t){let e=!1;t.createLayoutManagerConstructorParameters=function(t,i){const n=e?null:new URL(document.location.href).searchParams.get(\"gl-window\");e=!0;const o=null!==n;let s,r;if(null!==n){const e=localStorage.getItem(n);if(null===e)throw new Error(\"Null gl-window Config\");localStorage.removeItem(n);const i=JSON.parse(e),o=_t.unminifyConfig(i);r=xt.fromResolved(o),t instanceof HTMLElement&&(s=t)}else void 0===t?r=void 0:t instanceof HTMLElement?(r=void 0,s=t):r=t,void 0===s&&i instanceof HTMLElement&&(s=i);return{constructorOrSubWindowLayoutConfig:r,isSubWindow:o,containerElement:s}}}(le||(le={}));class he extends le{constructor(t,e,i){super(t,e,i,!0),this._componentTypesMap=new Map,this._registeredComponentMap=new Map,this._virtuableComponentMap=new Map,this._containerVirtualRectingRequiredEventListener=(t,e,i)=>this.handleContainerVirtualRectingRequiredEvent(t,e,i),this._containerVirtualVisibilityChangeRequiredEventListener=(t,e)=>this.handleContainerVirtualVisibilityChangeRequiredEvent(t,e),this._containerVirtualZIndexChangeRequiredEventListener=(t,e,i)=>this.handleContainerVirtualZIndexChangeRequiredEvent(t,e,i),this.deprecatedConstructor||this.init()}registerComponent(t,e,i=!1){if(\"function\"!=typeof e)throw new $(\"registerComponent() componentConstructorOrFactoryFtn parameter is not a function\");if(e.hasOwnProperty(\"prototype\")){const n=e;this.registerComponentConstructor(t,n,i)}else{const n=e;this.registerComponentFactoryFunction(t,n,i)}}registerComponentConstructor(t,e,i=!1){if(\"function\"!=typeof e)throw new Error(tt[1]);if(void 0!==this._componentTypesMap.get(t))throw new Z(`${tt[3]}: ${t}`);this._componentTypesMap.set(t,{constructor:e,factoryFunction:void 0,virtual:i})}registerComponentFactoryFunction(t,e,i=!1){if(\"function\"!=typeof e)throw new Z(\"Please register a constructor function\");if(void 0!==this._componentTypesMap.get(t))throw new Z(`${tt[3]}: ${t}`);this._componentTypesMap.set(t,{constructor:void 0,factoryFunction:e,virtual:i})}registerComponentFunction(t){this.registerGetComponentConstructorCallback(t)}registerGetComponentConstructorCallback(t){if(\"function\"!=typeof t)throw new Error(\"Please register a callback function\");void 0!==this._getComponentConstructorFtn&&console.warn(\"Multiple component functions are being registered. Only the final registered function will be used.\"),this._getComponentConstructorFtn=t}getRegisteredComponentTypeNames(){const t=this._componentTypesMap.keys();return Array.from(t)}getComponentInstantiator(t){let e;const i=pt.resolveComponentTypeName(t);return void 0!==i&&(e=this._componentTypesMap.get(i)),void 0===e&&void 0!==this._getComponentConstructorFtn&&(e={constructor:this._getComponentConstructorFtn(t),factoryFunction:void 0,virtual:!1}),e}bindComponent(t,e){let i;const n=pt.resolveComponentTypeName(e);let o;if(void 0!==n&&(i=this._componentTypesMap.get(n)),void 0===i&&void 0!==this._getComponentConstructorFtn&&(i={constructor:this._getComponentConstructorFtn(e),factoryFunction:void 0,virtual:!1}),void 0!==i){const s=i.virtual;let r,a;r=void 0===e.componentState?void 0:Ut({},e.componentState);const l=i.constructor;if(void 0!==l)a=new l(t,r,s);else{const e=i.factoryFunction;if(void 0===e)throw new X(\"LMBCFFU10008\");a=e(t,r,s)}if(s){if(void 0===a)throw new J(\"GLBCVCU988774\");{const e=a,i=e.rootHtmlElement;if(void 0===i)throw new Z(`${tt[5]}: ${n}`);!function(t){const e=\"absolute\";t.style.position!==e&&(t.style.position=e)}(i),this.container.appendChild(i),this._virtuableComponentMap.set(t,e),t.virtualRectingRequiredEvent=this._containerVirtualRectingRequiredEventListener,t.virtualVisibilityChangeRequiredEvent=this._containerVirtualVisibilityChangeRequiredEventListener,t.virtualZIndexChangeRequiredEvent=this._containerVirtualZIndexChangeRequiredEventListener}}this._registeredComponentMap.set(t,a),o={virtual:i.virtual,component:a}}else o=super.bindComponent(t,e);return o}unbindComponent(t,e,i){if(void 0===this._registeredComponentMap.get(t))super.unbindComponent(t,e,i);else{const e=this._virtuableComponentMap.get(t);if(void 0!==e){const i=e.rootHtmlElement;if(void 0===i)throw new X(\"GLUC77743\",t.title);this.container.removeChild(i),this._virtuableComponentMap.delete(t)}}}fireBeforeVirtualRectingEvent(t){this._goldenLayoutBoundingClientRect=this.container.getBoundingClientRect(),super.fireBeforeVirtualRectingEvent(t)}handleContainerVirtualRectingRequiredEvent(t,e,i){const n=this._virtuableComponentMap.get(t);if(void 0===n)throw new J(\"GLHCSCE55933\");{const o=n.rootHtmlElement;if(void 0===o)throw new Z(tt[4]+\" \"+t.title);{const n=t.element.getBoundingClientRect(),s=n.left-this._goldenLayoutBoundingClientRect.left;o.style.left=zt(s);const r=n.top-this._goldenLayoutBoundingClientRect.top;o.style.top=zt(r),Tt(o,e),At(o,i)}}}handleContainerVirtualVisibilityChangeRequiredEvent(t,e){const i=this._virtuableComponentMap.get(t);if(void 0===i)throw new J(\"GLHCVVCRE55934\");{const n=i.rootHtmlElement;if(void 0===n)throw new Z(tt[4]+\" \"+t.title);Dt(n,e)}}handleContainerVirtualZIndexChangeRequiredEvent(t,e,i){const n=this._virtuableComponentMap.get(t);if(void 0===n)throw new J(\"GLHCVZICRE55935\");{const e=n.rootHtmlElement;if(void 0===e)throw new Z(tt[4]+\" \"+t.title);e.style.zIndex=i}}}const de=\"initial_\",ce={show:\"top\",popout:!1,maximise:!1,close:\"close-tab-unused\"},me={headerHeight:31},ue={hasHeaders:!0,reorderEnabled:!0},pe={popoutWholeStack:!1,constrainDragToContainer:!1,constrainDragToHeaders:!1,preventDragout:!1,showMaximiseIcon:!1,showPopoutIcon:!1,showCloseIcon:!1,blockedPopoutsThrowError:!0,closePopoutsOnUnload:!0,selectionEnabled:!1};var ge,fe;class ve{constructor(e){this.layout=e,ge.set(this,void 0),fe.set(this,void 0),this.handleResize=t=>{t.forEach((t=>this.resizeElement(t.target)))},this.handleMutation=()=>{this.layout.viewComponentsByContainerElement.forEach((t=>{this.resizeElement(t.container.element)}))},t.__classPrivateFieldSet(this,ge,new ResizeObserver(this.handleResize),\"f\"),t.__classPrivateFieldSet(this,fe,new MutationObserver(this.handleMutation),\"f\")}observeMutations(e){t.__classPrivateFieldGet(this,fe,\"f\")?.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[\"class\"]})}destroy(){t.__classPrivateFieldGet(this,ge,\"f\").disconnect(),t.__classPrivateFieldGet(this,fe,\"f\").disconnect()}observeContainer(e){t.__classPrivateFieldGet(this,ge,\"f\").observe(e)}unobserveContainer(e){t.__classPrivateFieldGet(this,ge,\"f\").unobserve(e)}resizeElement(t){const e=this.layout.viewComponentsByContainerElement.get(t);e&&e.resize()}}ge=new WeakMap,fe=new WeakMap;var _e={};Object.defineProperty(_e,\"__esModule\",{value:!0});var ye=_e.BaseItem=void 0;class Ce{constructor(t,e,i){this._item=t,this._layout=e,this._wrap=i}get raw(){return this._item}get layout(){return this._layout}get type(){return this._item.type}get contentItems(){return(this._item.contentItems??[]).map((t=>this._wrap(t)))}get parent(){const t=this._item.parent;return t?this._wrap(t):null}setActiveContentItem(t,e){if(\"stack\"!==this.type)throw new Error(`Cannot call setActiveContentItem from a non-stack item: ${this.type}`);this._item.setActiveContentItem(t.raw,e)}static wrapInternal(t,e,i){const n=Ce.wrapCache.get(e);if(n)return n;const o=new t(e,i,(e=>Ce.wrapInternal(t,e,i)));return Ce.wrapCache.set(e,o),o}}ye=_e.BaseItem=Ce,Ce.wrapCache=new WeakMap;const we=t=>!!t&&\"contentItems\"in t&&(t.isRow||t.isColumn);class Ie extends ye{isRoot(){return!!this._item.parent?.isGround}getBounds(){return this._item.element.getBoundingClientRect()}get viewName(){if(this._item.isComponent){const{component:t}=this._item;return t.identity.name}throw new Error(\"View name not found\")}onDestroyed(t){const e=({target:i})=>{i===this._item&&(t(),this._item.off(\"itemDestroyed\",e))};this._item.on(\"itemDestroyed\",e)}createAdjacentStack({position:t=\"right\"}={}){const e=this.raw;if(ee.isStack(e)&&e.parent){const i=[\"top\",\"bottom\"].includes(t)?\"column\":\"row\",n=[\"left\",\"top\"].includes(t)?1:0,o=we(e.parent)?e.parent:e.layoutManager,s=o,r=e.parent.contentItems.indexOf(e);e.parent.isGround&&e.parent.removeChild(e,!0);const a=o.newItem({type:i,content:[{type:\"stack\",content:[]}]},r);if(!a)throw new Error(\"createAdjacentStack: Failed to create new container\");const l=a.contentItems[0];return a.addChild(this.raw,n),we(s)&&s.removeChild(e,!0),this._wrap(l)}throw new Error(`Cannot creat adjacent stacks for type: ${e.type}, must be type 'stack'`)}setActiveContentItem(t,e=!0){if(!ee.isStack(this._item))throw new Error(`Cannot call setActiveContentItem from a non-stack item: ${this.type}`);this._item.setActiveComponentItem(t.raw,!e)}static wrap(t,e){return ye.wrapInternal(Ie,t,e)}}function be(t=[],e){for(const i of t)\"component\"===i.type?Object.keys(e).forEach((t=>{t in i&&(i.componentState={[`${de}${t}`]:i[t],...i.componentState}),i[t]=e[t]})):be(i.content,e)}function Se(t=[],e,i){for(const n of t)if(\"component\"===n.type)Object.keys(e).forEach((t=>{if(`${de}${t}`in n.componentState)return n[t]=n.componentState[`${de}${t}`],void delete n.componentState[`${de}${t}`];n[t]=e[t]}));else{if(n.size&&(\"row\"===i||\"column\"===i)){n[\"row\"===i?\"width\":\"height\"]=n.size?.includes(\".\")?parseFloat(n.size):parseInt(n.size)}Se(n.content,e,n.type)}}function Ee(t){if(t.root){t.root.content&&Se([t.root],{componentName:\"view\",isClosable:!0});const e=t.root;t.content=[e],delete t.root}return t}const xe=e=>class extends e{connectedCallback(){if(!this.name||!this.uuid)throw new Error(\" Name or uuid attribute missing\");if(!this.src)throw new Error(\" missing 'src' attribute.\");this.#t||(this.#t=document.createElement(\"iframe\"),this.#t.src=this.src,this.#t.style.height=\"100%\",this.#t.style.width=\"100%\",this.#t.style.border=\"none\",this.forceFrameName?this.#t.setAttribute(\"name\",this.forceFrameName):this.#t.setAttribute(\"name\",t.encodeOptions({brokerUrl:this.brokerUrl,name:this.name,uuid:this.uuid,providerId:this.providerId,contextGroup:this.contextGroup},\"of-frame\")),this.#t.setAttribute(\"id\",this.name),this.appendChild(this.#t))}#t;get brokerUrl(){return this.getAttribute(\"of-broker\")}set brokerUrl(t){t&&this.setAttribute(\"of-broker\",t)}get name(){return this.getAttribute(\"of-name\")}set name(t){t&&this.setAttribute(\"of-name\",t)}get forceFrameName(){return this.getAttribute(\"forceFrameName\")}set forceFrameName(t){t&&this.setAttribute(\"forceFrameName\",t)}get uuid(){return this.getAttribute(\"of-uuid\")}set uuid(t){t&&this.setAttribute(\"of-uuid\",t)}get src(){return this.getAttribute(\"src\")}set src(t){t&&this.setAttribute(\"src\",t)}get providerId(){return this.getAttribute(\"of-provider-id\")}set providerId(t){t&&this.setAttribute(\"of-provider-id\",t)}get contextGroup(){return this.getAttribute(\"of-context-group\")}set contextGroup(t){t&&this.setAttribute(\"of-context-group\",t)}static get observedAttributes(){return[\"name\"]}};class Le{static create(t){const e=document.createElement(\"of-view\");return Object.entries(t).forEach((([t,i])=>{e.setAttribute(t,i)})),e}}customElements.define(\"of-view\",xe(HTMLElement));class ze{constructor(t,i,n,{brokerUrl:o,interopConfig:s},r){this.container=t,this.config=i,this.ofView=null,this.isDragging=()=>this.container.tab.element?.className.includes(\"lm_dragging\")??!1;const{url:a,web:l,interop:h,name:d}=i||{},c=d??`internal-generated-view-${e.v4()}`;if(this.identity={uuid:n,name:c},this.container.element.setAttribute(\"of-name\",c),this.container.element.id=`container-${c}`,this.container.parent.id=c,void 0===a)return void this.handleUrlMissing();const m=this.updateTitleIfNotSet(a),u={\"of-broker\":o,\"of-uuid\":n,\"of-name\":c,src:a};l?.frameName&&(u.forceFrameName=l.frameName);const p=h?.currentContextGroup??s?.currentContextGroup;p&&(u[\"of-context-group\"]=p),s?.providerId&&(u[\"of-provider-id\"]=s?.providerId),this.ofView=Le.create(u),this.ofView.title=m??`Iframe: ${a}`,r.appendChild(this.ofView),this.ofView.style.position=\"absolute\"}updateTitleIfNotSet(t){return\"view\"===this.container.parent.title&&this.container.parent.setTitle(t),this.container.parent.title}handleUrlMissing(){const t=document.createElement(\"div\");t.setAttribute(\"style\",\"padding: 20px\");t.innerText=\"No URL provided\",this.container.element.appendChild(t)}destroy(){this.ofView?.remove(),this.ofView=null}closeView(){this.container.close()}resize(){if(this.ofView){if(this.isDragging())return void(this.ofView.style.display=\"none\");const t=this.container.element.getBoundingClientRect();this.ofView.style.position=\"absolute\",this.ofView.style.height=`${t.height}px`,this.ofView.style.width=`${t.width}px`,this.ofView.style.inset=`${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`,this.ofView.style.display=\"block\"}}}class Me extends U{static overrideConfig(t){const e={...ue,...t.settings,...pe};return e.reorderEnabled?be(t.content,{isClosable:!0}):be(t.content,{reorderEnabled:!1}),{dimensions:me,...t,settings:e,header:{...ce,show:!1!==t.settings?.hasHeaders&&ce.show}}}constructor(t,e,i,{options:n},o,s){super(),this.identity=t,this.container=e,this.initialConfig=i,this.layoutManager=o,this.platformProvider=s,this.viewComponentsByContainerElement=new Map,this.layoutContentCache=_.getSingleInstance(),this.reparentingViews=new Set,this.goldenLayoutDestroyed=!1,this.createViewComponent=(t,e)=>{m.handleSharedView(this.layoutManager,this.identity,e);const i=new ze(t,e,this.identity.uuid,this.options,this.iframeContainer);return e&&!1===e[`${de}isClosable`]&&this.stylesheet.insertRule(`#tab-${i.identity.name} .lm_close_tab { display: none; }`),this.viewComponentsByContainerElement.set(t.element,i),this.resizeController.observeContainer(t.element),i},this.iframeContainer=document.createElement(\"div\"),this.iframeContainer.id=`openfin-layout-iframe-container-${this.identity.layoutName}`,this.domEmitter=new V(e),this.setupStylesheets(),this.layout=new he(this.container),this.layout.resizeWithContainerAutomatically=!0,this.options=n,this.layout.registerComponent(\"view\",this.createViewComponent),this.setupListeners(),this.resizeController=new ve(this),this.layout.loadLayout(Me.overrideConfig(i));const r=document.createElement(\"div\");r.id=`openfin-layout-shadow-container-${this.identity.layoutName}`,r.attachShadow({mode:\"open\",delegatesFocus:!1}).appendChild(this.iframeContainer),this.container.appendChild(r),this.resizeController.observeMutations(this.container)}getStackByView({name:t}){const e=this.layout.findFirstComponentItemById(t);if(e?.parent&&e?.parent?.isStack)return Ie.wrap(e.parent,this)}getRoot(){return Ie.wrap(this.layout.rootItem,this)}async platformCloseView(t){const e=[...this.viewComponentsByContainerElement.values()].find((e=>e.identity.name===t.name));if(!e)throw new Error(`View with name: ${t.name} not found in layout.`);e.closeView()}async platformCreateView(t,{location:e,targetView:i}={}){if(i)throw new Error(\"TargetView not supported in web\");const n={options:this.platformProvider.normalizeOptions(t),target:this.identity,location:e};return this.insertView(n)}setupStylesheets(){if(this.container.setAttribute(\"data-openfin-layout-name\",this.identity.layoutName),this.stylesheet=new CSSStyleSheet,this.stylesheet.insertRule(\".lm_close { display: none; }\"),document.adoptedStyleSheets.push(this.stylesheet),this.initialConfig.settings?.preventSplitterResize){const t=`\\n [data-openfin-layout-name='${this.identity.layoutName}'] .lm_splitter {\\n pointer-events: none;\\n }`;this.stylesheet.insertRule(t)}}insertView({options:t,location:e,targetView:i}){const n=e?this.layoutContentCache.getItemOrUndefined(e.id):void 0,o=i?this.layoutContentCache.getItemOrUndefined(i.name):void 0,s=n??o??Ie.wrap(this.layout.rootItem,this);let r;if(ee.isStack(s.raw))r=s.raw;else{if(!we(s.raw))throw new Error(\"Cannot add a view at the requested location\");r=s.raw.newItem({type:\"stack\",content:[]})}const a=Math.min(r.contentItems.length,e?.index??r.contentItems.length);let l=this.layout.findFirstComponentItemById(t.name);l?(l.parent&&l.parent.removeChild(l,!0),r.addChild(l,a)):l=r.newComponent(\"view\",t,t.title??t.url??\"Default Title\",a);const h=l.component.identity;return Promise.resolve({identity:h})}replaceView({viewToReplace:t,newView:e}){throw new Error(\"Method not implemented.\")}replaceLayout(t){throw new Error(\"Method not implemented.\")}async cleanupView(t){}applyPreset(t){throw new Error(\"Method not implemented.\")}getCurrentViews(){return[...this.viewComponentsByContainerElement.values()].map((t=>t.identity))}async getFrameSnapshot(){return Ee(xt.fromResolved(this.layout.toConfig()))}isVisible(){return W(this.container)}async onViewDetached({viewIdentity:t}){this.reparentingViews.add(t.name),this.platformCloseView(t)}async destroy(){this.goldenLayoutDestroyed||(this.goldenLayoutDestroyed=!0,this.layout.destroy()),this.iframeContainer.remove(),this.resizeController.destroy(),document.adoptedStyleSheets=document.adoptedStyleSheets.filter((t=>t!==this.stylesheet)),this.viewComponentsByContainerElement.clear()}setupListeners(){this.container.addEventListener(\"pointerdown\",(t=>{if(t.target instanceof HTMLElement){const e=t.target.classList;[\"lm_tab\",\"lm_title\",\"lm_splitter\",\"lm_drag_handle\"].some((t=>e.contains(t)))&&(this.handleDragStart(),2===t.button&&t.stopPropagation())}}),!0),document.addEventListener(\"pointerup\",(()=>this.handleDragEnd()),!0),this.layout.on(\"tabCreated\",(t=>{const e=t.componentItem.component;t.element.id=`tab-${e.identity.name}`,this.domEmitter.dispatchLocalEvent(\"tab-created\",e.identity)})),this.layout.on(\"itemCreated\",(({target:t})=>{const e=t;if(Gt.isComponentItem(e)){const t=e.component;this.domEmitter.dispatchLocalEvent(\"container-created\",t.identity)}})),this.layout.on(\"itemDestroyed\",(t=>{const e=t.target;if(Gt.isComponentItem(e)){const t=e.component;this.removeViewComponent(t)}})),this.layout.on(\"itemDropped\",(()=>{this.handleDragEnd()}))}handleDragStart(){this.iframeContainer.style.pointerEvents=\"none\"}handleDragEnd(){this.iframeContainer.style.pointerEvents=\"\"}removeViewComponent(t){if(t.config&&!1===t.config[`${de}isClosable`]){const e=[...this.stylesheet.cssRules].findIndex((e=>e.cssText.includes(`#tab-${t.identity.name}`)));this.stylesheet.deleteRule(e)}t.destroy(),this.viewComponentsByContainerElement.delete(t.container.element),this.resizeController.unobserveContainer(t.container.element),this.reparentingViews.has(t.identity.name)?this.reparentingViews.delete(t.identity.name):this.platformProvider.closeView(t.identity.name);0===this.getCurrentViews().length&&(this.goldenLayoutDestroyed||(this.goldenLayoutDestroyed=!0,m.handleLastViewRemoved(this.layoutManager,this.identity)))}}class Pe{constructor(t,e,i,n){this.windowIdentity=t,this.connectConfig=e,this.provider=i,this.fallbackContainer=n}async createLayout(t,e){if(!(\"container\"in t)&&!this.fallbackContainer)throw new Error(\"Container property is not optional in web\");const{layoutName:i}=t,n=t,o=this.provider.initLayoutViews(n),s=n.container??this.fallbackContainer,r={...this.windowIdentity,layoutName:i},a=new Me(r,s,o,this.connectConfig,e,this.provider);m.registerLayout(e,i,a),this.fallbackContainer=null}async getLayoutSnapshot(t){return t.getLayoutSnapshot()}async handleLastViewRemoved(t){}}class Te{static async init(e){const i=e.getFin().InterApplicationBus.Channel,n=await i.create(`custom-frame-${e.me.uuid}`);return n.setDefaultAction((async(t,{target:e,opts:i},o)=>{const s=n.connections.find((t=>t.name===e.name));if(s)return n.dispatch(s,t,{...i,target:e});throw new Error(`Client with name ${e.name} not found`)})),await t.relayChannelClientApi_1(n,\"layout-relay\"),new Te(e)}constructor(t){this.wire=t,this.viewNames=new Set}normalizeOptions(t,i=\"default\"){const n=this.wire.me.uuid;let{name:o=`internal-generated-view-${e.v4()}`}=t;return o.match(/^internal-generated-view-/)&&this.viewNames.has(o)&&\"duplicate\"===i&&(o=`internal-generated-view-${e.v4()}`),this.viewNames.add(o),{...t,name:o,uuid:n}}closeView(t){this.viewNames.delete(t)}initLayoutViews({layout:t,multiInstanceViewBehavior:e}){return H((t=>{if(\"component\"===t.type&&t.componentState){const i=this.normalizeOptions(t.componentState,e);return{...t,componentState:i}}return t}),t)}}var Ae;const ke=t=>t;Ae=new WeakMap,exports.WebLayoutEntryPoint=class{constructor(e){Ae.set(this,void 0),this.initLayoutManager=async(e,i,{container:n,layoutManagerOverride:o})=>{const s=await Te.init(i),r=o??ke,a=new Pe(i.me,t.__classPrivateFieldGet(this,Ae,\"f\"),s,n),l=new(r(m.createClosedConstructor(a)));return await M(i,l),l},this.applyLayoutSnapshot=async(e,i,n)=>{await i.applyLayoutSnapshot(t.__classPrivateFieldGet(this,Ae,\"f\").platform.layoutSnapshot)},this.createLayout=async(t,e)=>m.createLayout(t,e),this.destroyLayout=async(t,e)=>m.destroyLayout(t,e),t.__classPrivateFieldSet(this,Ae,e,\"f\")}};\n","'use strict'\n\nexports.byteLength = byteLength\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\nfor (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i]\n revLookup[code.charCodeAt(i)] = i\n}\n\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction getLens (b64) {\n var len = b64.length\n\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // Trim off extra bytes after placeholder bytes are found\n // See: https://github.com/beatgammit/base64-js/issues/42\n var validLen = b64.indexOf('=')\n if (validLen === -1) validLen = len\n\n var placeHoldersLen = validLen === len\n ? 0\n : 4 - (validLen % 4)\n\n return [validLen, placeHoldersLen]\n}\n\n// base64 is 4/3 + up to two characters of the original data\nfunction byteLength (b64) {\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction _byteLength (b64, validLen, placeHoldersLen) {\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction toByteArray (b64) {\n var tmp\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n\n var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))\n\n var curByte = 0\n\n // if there are placeholders, only get up to the last complete 4 chars\n var len = placeHoldersLen > 0\n ? validLen - 4\n : validLen\n\n var i\n for (i = 0; i < len; i += 4) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 18) |\n (revLookup[b64.charCodeAt(i + 1)] << 12) |\n (revLookup[b64.charCodeAt(i + 2)] << 6) |\n revLookup[b64.charCodeAt(i + 3)]\n arr[curByte++] = (tmp >> 16) & 0xFF\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 2) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 2) |\n (revLookup[b64.charCodeAt(i + 1)] >> 4)\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 1) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 10) |\n (revLookup[b64.charCodeAt(i + 1)] << 4) |\n (revLookup[b64.charCodeAt(i + 2)] >> 2)\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] +\n lookup[num >> 12 & 0x3F] +\n lookup[num >> 6 & 0x3F] +\n lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n var tmp\n var output = []\n for (var i = start; i < end; i += 3) {\n tmp =\n ((uint8[i] << 16) & 0xFF0000) +\n ((uint8[i + 1] << 8) & 0xFF00) +\n (uint8[i + 2] & 0xFF)\n output.push(tripletToBase64(tmp))\n }\n return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n var tmp\n var len = uint8.length\n var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n var parts = []\n var maxChunkLength = 16383 // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1]\n parts.push(\n lookup[tmp >> 2] +\n lookup[(tmp << 4) & 0x3F] +\n '=='\n )\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + uint8[len - 1]\n parts.push(\n lookup[tmp >> 10] +\n lookup[(tmp >> 4) & 0x3F] +\n lookup[(tmp << 2) & 0x3F] +\n '='\n )\n }\n\n return parts.join('')\n}\n","/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n/* eslint-disable no-proto */\n\n'use strict'\n\nconst base64 = require('base64-js')\nconst ieee754 = require('ieee754')\nconst customInspectSymbol =\n (typeof Symbol === 'function' && typeof Symbol['for'] === 'function') // eslint-disable-line dot-notation\n ? Symbol['for']('nodejs.util.inspect.custom') // eslint-disable-line dot-notation\n : null\n\nexports.Buffer = Buffer\nexports.SlowBuffer = SlowBuffer\nexports.INSPECT_MAX_BYTES = 50\n\nconst K_MAX_LENGTH = 0x7fffffff\nexports.kMaxLength = K_MAX_LENGTH\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Print warning and recommend using `buffer` v4.x which has an Object\n * implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * We report that the browser does not support typed arrays if the are not subclassable\n * using __proto__. Firefox 4-29 lacks support for adding new properties to `Uint8Array`\n * (See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438). IE 10 lacks support\n * for __proto__ and has a buggy typed array implementation.\n */\nBuffer.TYPED_ARRAY_SUPPORT = typedArraySupport()\n\nif (!Buffer.TYPED_ARRAY_SUPPORT && typeof console !== 'undefined' &&\n typeof console.error === 'function') {\n console.error(\n 'This browser lacks typed array (Uint8Array) support which is required by ' +\n '`buffer` v5.x. Use `buffer` v4.x if you require old browser support.'\n )\n}\n\nfunction typedArraySupport () {\n // Can typed array instances can be augmented?\n try {\n const arr = new Uint8Array(1)\n const proto = { foo: function () { return 42 } }\n Object.setPrototypeOf(proto, Uint8Array.prototype)\n Object.setPrototypeOf(arr, proto)\n return arr.foo() === 42\n } catch (e) {\n return false\n }\n}\n\nObject.defineProperty(Buffer.prototype, 'parent', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.buffer\n }\n})\n\nObject.defineProperty(Buffer.prototype, 'offset', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.byteOffset\n }\n})\n\nfunction createBuffer (length) {\n if (length > K_MAX_LENGTH) {\n throw new RangeError('The value \"' + length + '\" is invalid for option \"size\"')\n }\n // Return an augmented `Uint8Array` instance\n const buf = new Uint8Array(length)\n Object.setPrototypeOf(buf, Buffer.prototype)\n return buf\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new TypeError(\n 'The \"string\" argument must be of type string. Received type number'\n )\n }\n return allocUnsafe(arg)\n }\n return from(arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\nfunction from (value, encodingOrOffset, length) {\n if (typeof value === 'string') {\n return fromString(value, encodingOrOffset)\n }\n\n if (ArrayBuffer.isView(value)) {\n return fromArrayView(value)\n }\n\n if (value == null) {\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n }\n\n if (isInstance(value, ArrayBuffer) ||\n (value && isInstance(value.buffer, ArrayBuffer))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof SharedArrayBuffer !== 'undefined' &&\n (isInstance(value, SharedArrayBuffer) ||\n (value && isInstance(value.buffer, SharedArrayBuffer)))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof value === 'number') {\n throw new TypeError(\n 'The \"value\" argument must not be of type number. Received type number'\n )\n }\n\n const valueOf = value.valueOf && value.valueOf()\n if (valueOf != null && valueOf !== value) {\n return Buffer.from(valueOf, encodingOrOffset, length)\n }\n\n const b = fromObject(value)\n if (b) return b\n\n if (typeof Symbol !== 'undefined' && Symbol.toPrimitive != null &&\n typeof value[Symbol.toPrimitive] === 'function') {\n return Buffer.from(value[Symbol.toPrimitive]('string'), encodingOrOffset, length)\n }\n\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n return from(value, encodingOrOffset, length)\n}\n\n// Note: Change prototype *after* Buffer.from is defined to workaround Chrome bug:\n// https://github.com/feross/buffer/pull/148\nObject.setPrototypeOf(Buffer.prototype, Uint8Array.prototype)\nObject.setPrototypeOf(Buffer, Uint8Array)\n\nfunction assertSize (size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be of type number')\n } else if (size < 0) {\n throw new RangeError('The value \"' + size + '\" is invalid for option \"size\"')\n }\n}\n\nfunction alloc (size, fill, encoding) {\n assertSize(size)\n if (size <= 0) {\n return createBuffer(size)\n }\n if (fill !== undefined) {\n // Only pay attention to encoding if it's a string. This\n // prevents accidentally sending in a number that would\n // be interpreted as a start offset.\n return typeof encoding === 'string'\n ? createBuffer(size).fill(fill, encoding)\n : createBuffer(size).fill(fill)\n }\n return createBuffer(size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n return alloc(size, fill, encoding)\n}\n\nfunction allocUnsafe (size) {\n assertSize(size)\n return createBuffer(size < 0 ? 0 : checked(size) | 0)\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n return allocUnsafe(size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n return allocUnsafe(size)\n}\n\nfunction fromString (string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8'\n }\n\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n\n const length = byteLength(string, encoding) | 0\n let buf = createBuffer(length)\n\n const actual = buf.write(string, encoding)\n\n if (actual !== length) {\n // Writing a hex string, for example, that contains invalid characters will\n // cause everything after the first invalid character to be ignored. (e.g.\n // 'abxxcd' will be treated as 'ab')\n buf = buf.slice(0, actual)\n }\n\n return buf\n}\n\nfunction fromArrayLike (array) {\n const length = array.length < 0 ? 0 : checked(array.length) | 0\n const buf = createBuffer(length)\n for (let i = 0; i < length; i += 1) {\n buf[i] = array[i] & 255\n }\n return buf\n}\n\nfunction fromArrayView (arrayView) {\n if (isInstance(arrayView, Uint8Array)) {\n const copy = new Uint8Array(arrayView)\n return fromArrayBuffer(copy.buffer, copy.byteOffset, copy.byteLength)\n }\n return fromArrayLike(arrayView)\n}\n\nfunction fromArrayBuffer (array, byteOffset, length) {\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\"offset\" is outside of buffer bounds')\n }\n\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\"length\" is outside of buffer bounds')\n }\n\n let buf\n if (byteOffset === undefined && length === undefined) {\n buf = new Uint8Array(array)\n } else if (length === undefined) {\n buf = new Uint8Array(array, byteOffset)\n } else {\n buf = new Uint8Array(array, byteOffset, length)\n }\n\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(buf, Buffer.prototype)\n\n return buf\n}\n\nfunction fromObject (obj) {\n if (Buffer.isBuffer(obj)) {\n const len = checked(obj.length) | 0\n const buf = createBuffer(len)\n\n if (buf.length === 0) {\n return buf\n }\n\n obj.copy(buf, 0, 0, len)\n return buf\n }\n\n if (obj.length !== undefined) {\n if (typeof obj.length !== 'number' || numberIsNaN(obj.length)) {\n return createBuffer(0)\n }\n return fromArrayLike(obj)\n }\n\n if (obj.type === 'Buffer' && Array.isArray(obj.data)) {\n return fromArrayLike(obj.data)\n }\n}\n\nfunction checked (length) {\n // Note: cannot use `length < K_MAX_LENGTH` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= K_MAX_LENGTH) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + K_MAX_LENGTH.toString(16) + ' bytes')\n }\n return length | 0\n}\n\nfunction SlowBuffer (length) {\n if (+length != length) { // eslint-disable-line eqeqeq\n length = 0\n }\n return Buffer.alloc(+length)\n}\n\nBuffer.isBuffer = function isBuffer (b) {\n return b != null && b._isBuffer === true &&\n b !== Buffer.prototype // so Buffer.isBuffer(Buffer.prototype) will be false\n}\n\nBuffer.compare = function compare (a, b) {\n if (isInstance(a, Uint8Array)) a = Buffer.from(a, a.offset, a.byteLength)\n if (isInstance(b, Uint8Array)) b = Buffer.from(b, b.offset, b.byteLength)\n if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n throw new TypeError(\n 'The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array'\n )\n }\n\n if (a === b) return 0\n\n let x = a.length\n let y = b.length\n\n for (let i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i]\n y = b[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n switch (String(encoding).toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'latin1':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return true\n default:\n return false\n }\n}\n\nBuffer.concat = function concat (list, length) {\n if (!Array.isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n\n if (list.length === 0) {\n return Buffer.alloc(0)\n }\n\n let i\n if (length === undefined) {\n length = 0\n for (i = 0; i < list.length; ++i) {\n length += list[i].length\n }\n }\n\n const buffer = Buffer.allocUnsafe(length)\n let pos = 0\n for (i = 0; i < list.length; ++i) {\n let buf = list[i]\n if (isInstance(buf, Uint8Array)) {\n if (pos + buf.length > buffer.length) {\n if (!Buffer.isBuffer(buf)) buf = Buffer.from(buf)\n buf.copy(buffer, pos)\n } else {\n Uint8Array.prototype.set.call(\n buffer,\n buf,\n pos\n )\n }\n } else if (!Buffer.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n } else {\n buf.copy(buffer, pos)\n }\n pos += buf.length\n }\n return buffer\n}\n\nfunction byteLength (string, encoding) {\n if (Buffer.isBuffer(string)) {\n return string.length\n }\n if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) {\n return string.byteLength\n }\n if (typeof string !== 'string') {\n throw new TypeError(\n 'The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. ' +\n 'Received type ' + typeof string\n )\n }\n\n const len = string.length\n const mustMatch = (arguments.length > 2 && arguments[2] === true)\n if (!mustMatch && len === 0) return 0\n\n // Use a for loop to avoid recursion\n let loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'ascii':\n case 'latin1':\n case 'binary':\n return len\n case 'utf8':\n case 'utf-8':\n return utf8ToBytes(string).length\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return len * 2\n case 'hex':\n return len >>> 1\n case 'base64':\n return base64ToBytes(string).length\n default:\n if (loweredCase) {\n return mustMatch ? -1 : utf8ToBytes(string).length // assume utf8\n }\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n let loweredCase = false\n\n // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n // property of a typed array.\n\n // This behaves neither like String nor Uint8Array in that we set start/end\n // to their upper/lower bounds if the value passed is out of range.\n // undefined is handled specially as per ECMA-262 6th Edition,\n // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n if (start === undefined || start < 0) {\n start = 0\n }\n // Return early if start > this.length. Done here to prevent potential uint32\n // coercion fail below.\n if (start > this.length) {\n return ''\n }\n\n if (end === undefined || end > this.length) {\n end = this.length\n }\n\n if (end <= 0) {\n return ''\n }\n\n // Force coercion to uint32. This will also coerce falsey/NaN values to 0.\n end >>>= 0\n start >>>= 0\n\n if (end <= start) {\n return ''\n }\n\n if (!encoding) encoding = 'utf8'\n\n while (true) {\n switch (encoding) {\n case 'hex':\n return hexSlice(this, start, end)\n\n case 'utf8':\n case 'utf-8':\n return utf8Slice(this, start, end)\n\n case 'ascii':\n return asciiSlice(this, start, end)\n\n case 'latin1':\n case 'binary':\n return latin1Slice(this, start, end)\n\n case 'base64':\n return base64Slice(this, start, end)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return utf16leSlice(this, start, end)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = (encoding + '').toLowerCase()\n loweredCase = true\n }\n }\n}\n\n// This property is used by `Buffer.isBuffer` (and the `is-buffer` npm package)\n// to detect a Buffer instance. It's not possible to use `instanceof Buffer`\n// reliably in a browserify context because there could be multiple different\n// copies of the 'buffer' package in use. This method works even for Buffer\n// instances that were created from another copy of the `buffer` package.\n// See: https://github.com/feross/buffer/issues/154\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n const i = b[n]\n b[n] = b[m]\n b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n const len = this.length\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits')\n }\n for (let i = 0; i < len; i += 2) {\n swap(this, i, i + 1)\n }\n return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n const len = this.length\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits')\n }\n for (let i = 0; i < len; i += 4) {\n swap(this, i, i + 3)\n swap(this, i + 1, i + 2)\n }\n return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n const len = this.length\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits')\n }\n for (let i = 0; i < len; i += 8) {\n swap(this, i, i + 7)\n swap(this, i + 1, i + 6)\n swap(this, i + 2, i + 5)\n swap(this, i + 3, i + 4)\n }\n return this\n}\n\nBuffer.prototype.toString = function toString () {\n const length = this.length\n if (length === 0) return ''\n if (arguments.length === 0) return utf8Slice(this, 0, length)\n return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.toLocaleString = Buffer.prototype.toString\n\nBuffer.prototype.equals = function equals (b) {\n if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n if (this === b) return true\n return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n let str = ''\n const max = exports.INSPECT_MAX_BYTES\n str = this.toString('hex', 0, max).replace(/(.{2})/g, '$1 ').trim()\n if (this.length > max) str += ' ... '\n return ''\n}\nif (customInspectSymbol) {\n Buffer.prototype[customInspectSymbol] = Buffer.prototype.inspect\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n if (isInstance(target, Uint8Array)) {\n target = Buffer.from(target, target.offset, target.byteLength)\n }\n if (!Buffer.isBuffer(target)) {\n throw new TypeError(\n 'The \"target\" argument must be one of type Buffer or Uint8Array. ' +\n 'Received type ' + (typeof target)\n )\n }\n\n if (start === undefined) {\n start = 0\n }\n if (end === undefined) {\n end = target ? target.length : 0\n }\n if (thisStart === undefined) {\n thisStart = 0\n }\n if (thisEnd === undefined) {\n thisEnd = this.length\n }\n\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError('out of range index')\n }\n\n if (thisStart >= thisEnd && start >= end) {\n return 0\n }\n if (thisStart >= thisEnd) {\n return -1\n }\n if (start >= end) {\n return 1\n }\n\n start >>>= 0\n end >>>= 0\n thisStart >>>= 0\n thisEnd >>>= 0\n\n if (this === target) return 0\n\n let x = thisEnd - thisStart\n let y = end - start\n const len = Math.min(x, y)\n\n const thisCopy = this.slice(thisStart, thisEnd)\n const targetCopy = target.slice(start, end)\n\n for (let i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i]\n y = targetCopy[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (numberIsNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [val], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n let indexSize = 1\n let arrLength = arr.length\n let valLength = val.length\n\n if (encoding !== undefined) {\n encoding = String(encoding).toLowerCase()\n if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n encoding === 'utf16le' || encoding === 'utf-16le') {\n if (arr.length < 2 || val.length < 2) {\n return -1\n }\n indexSize = 2\n arrLength /= 2\n valLength /= 2\n byteOffset /= 2\n }\n }\n\n function read (buf, i) {\n if (indexSize === 1) {\n return buf[i]\n } else {\n return buf.readUInt16BE(i * indexSize)\n }\n }\n\n let i\n if (dir) {\n let foundIndex = -1\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1) foundIndex = i\n if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n } else {\n if (foundIndex !== -1) i -= i - foundIndex\n foundIndex = -1\n }\n }\n } else {\n if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n for (i = byteOffset; i >= 0; i--) {\n let found = true\n for (let j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false\n break\n }\n }\n if (found) return i\n }\n }\n\n return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n offset = Number(offset) || 0\n const remaining = buf.length - offset\n if (!length) {\n length = remaining\n } else {\n length = Number(length)\n if (length > remaining) {\n length = remaining\n }\n }\n\n const strLen = string.length\n\n if (length > strLen / 2) {\n length = strLen / 2\n }\n let i\n for (i = 0; i < length; ++i) {\n const parsed = parseInt(string.substr(i * 2, 2), 16)\n if (numberIsNaN(parsed)) return i\n buf[offset + i] = parsed\n }\n return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n // Buffer#write(string)\n if (offset === undefined) {\n encoding = 'utf8'\n length = this.length\n offset = 0\n // Buffer#write(string, encoding)\n } else if (length === undefined && typeof offset === 'string') {\n encoding = offset\n length = this.length\n offset = 0\n // Buffer#write(string, offset[, length][, encoding])\n } else if (isFinite(offset)) {\n offset = offset >>> 0\n if (isFinite(length)) {\n length = length >>> 0\n if (encoding === undefined) encoding = 'utf8'\n } else {\n encoding = length\n length = undefined\n }\n } else {\n throw new Error(\n 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n )\n }\n\n const remaining = this.length - offset\n if (length === undefined || length > remaining) length = remaining\n\n if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n throw new RangeError('Attempt to write outside buffer bounds')\n }\n\n if (!encoding) encoding = 'utf8'\n\n let loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'hex':\n return hexWrite(this, string, offset, length)\n\n case 'utf8':\n case 'utf-8':\n return utf8Write(this, string, offset, length)\n\n case 'ascii':\n case 'latin1':\n case 'binary':\n return asciiWrite(this, string, offset, length)\n\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return base64Write(this, string, offset, length)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return ucs2Write(this, string, offset, length)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0)\n }\n}\n\nfunction base64Slice (buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf)\n } else {\n return base64.fromByteArray(buf.slice(start, end))\n }\n}\n\nfunction utf8Slice (buf, start, end) {\n end = Math.min(buf.length, end)\n const res = []\n\n let i = start\n while (i < end) {\n const firstByte = buf[i]\n let codePoint = null\n let bytesPerSequence = (firstByte > 0xEF)\n ? 4\n : (firstByte > 0xDF)\n ? 3\n : (firstByte > 0xBF)\n ? 2\n : 1\n\n if (i + bytesPerSequence <= end) {\n let secondByte, thirdByte, fourthByte, tempCodePoint\n\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 0x80) {\n codePoint = firstByte\n }\n break\n case 2:\n secondByte = buf[i + 1]\n if ((secondByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n if (tempCodePoint > 0x7F) {\n codePoint = tempCodePoint\n }\n }\n break\n case 3:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n codePoint = tempCodePoint\n }\n }\n break\n case 4:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n fourthByte = buf[i + 3]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n codePoint = tempCodePoint\n }\n }\n }\n }\n\n if (codePoint === null) {\n // we did not generate a valid codePoint so insert a\n // replacement char (U+FFFD) and advance only 1 byte\n codePoint = 0xFFFD\n bytesPerSequence = 1\n } else if (codePoint > 0xFFFF) {\n // encode to utf16 (surrogate pair dance)\n codePoint -= 0x10000\n res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n codePoint = 0xDC00 | codePoint & 0x3FF\n }\n\n res.push(codePoint)\n i += bytesPerSequence\n }\n\n return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nconst MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n const len = codePoints.length\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n }\n\n // Decode in chunks to avoid \"call stack size exceeded\".\n let res = ''\n let i = 0\n while (i < len) {\n res += String.fromCharCode.apply(\n String,\n codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n )\n }\n return res\n}\n\nfunction asciiSlice (buf, start, end) {\n let ret = ''\n end = Math.min(buf.length, end)\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F)\n }\n return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n let ret = ''\n end = Math.min(buf.length, end)\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i])\n }\n return ret\n}\n\nfunction hexSlice (buf, start, end) {\n const len = buf.length\n\n if (!start || start < 0) start = 0\n if (!end || end < 0 || end > len) end = len\n\n let out = ''\n for (let i = start; i < end; ++i) {\n out += hexSliceLookupTable[buf[i]]\n }\n return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n const bytes = buf.slice(start, end)\n let res = ''\n // If bytes.length is odd, the last 8 bits must be ignored (same as node.js)\n for (let i = 0; i < bytes.length - 1; i += 2) {\n res += String.fromCharCode(bytes[i] + (bytes[i + 1] * 256))\n }\n return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n const len = this.length\n start = ~~start\n end = end === undefined ? len : ~~end\n\n if (start < 0) {\n start += len\n if (start < 0) start = 0\n } else if (start > len) {\n start = len\n }\n\n if (end < 0) {\n end += len\n if (end < 0) end = 0\n } else if (end > len) {\n end = len\n }\n\n if (end < start) end = start\n\n const newBuf = this.subarray(start, end)\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(newBuf, Buffer.prototype)\n\n return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUintLE =\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let val = this[offset]\n let mul = 1\n let i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUintBE =\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n checkOffset(offset, byteLength, this.length)\n }\n\n let val = this[offset + --byteLength]\n let mul = 1\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUint8 =\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n return this[offset]\n}\n\nBuffer.prototype.readUint16LE =\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUint16BE =\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUint32LE =\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return ((this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16)) +\n (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUint32BE =\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] * 0x1000000) +\n ((this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n this[offset + 3])\n}\n\nBuffer.prototype.readBigUInt64LE = defineBigIntMethod(function readBigUInt64LE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const lo = first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24\n\n const hi = this[++offset] +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n last * 2 ** 24\n\n return BigInt(lo) + (BigInt(hi) << BigInt(32))\n})\n\nBuffer.prototype.readBigUInt64BE = defineBigIntMethod(function readBigUInt64BE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const hi = first * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset]\n\n const lo = this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last\n\n return (BigInt(hi) << BigInt(32)) + BigInt(lo)\n})\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let val = this[offset]\n let mul = 1\n let i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let i = byteLength\n let mul = 1\n let val = this[offset + --i]\n while (i > 0 && (mul *= 0x100)) {\n val += this[offset + --i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n if (!(this[offset] & 0x80)) return (this[offset])\n return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n const val = this[offset] | (this[offset + 1] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n const val = this[offset + 1] | (this[offset] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16) |\n (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] << 24) |\n (this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n (this[offset + 3])\n}\n\nBuffer.prototype.readBigInt64LE = defineBigIntMethod(function readBigInt64LE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const val = this[offset + 4] +\n this[offset + 5] * 2 ** 8 +\n this[offset + 6] * 2 ** 16 +\n (last << 24) // Overflow\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24)\n})\n\nBuffer.prototype.readBigInt64BE = defineBigIntMethod(function readBigInt64BE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const val = (first << 24) + // Overflow\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset]\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last)\n})\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUintLE =\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n let mul = 1\n let i = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUintBE =\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n let i = byteLength - 1\n let mul = 1\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUint8 =\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeUint16LE =\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeUint16BE =\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeUint32LE =\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset + 3] = (value >>> 24)\n this[offset + 2] = (value >>> 16)\n this[offset + 1] = (value >>> 8)\n this[offset] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeUint32BE =\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nfunction wrtBigUInt64LE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7)\n\n let lo = Number(value & BigInt(0xffffffff))\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n return offset\n}\n\nfunction wrtBigUInt64BE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7)\n\n let lo = Number(value & BigInt(0xffffffff))\n buf[offset + 7] = lo\n lo = lo >> 8\n buf[offset + 6] = lo\n lo = lo >> 8\n buf[offset + 5] = lo\n lo = lo >> 8\n buf[offset + 4] = lo\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n buf[offset + 3] = hi\n hi = hi >> 8\n buf[offset + 2] = hi\n hi = hi >> 8\n buf[offset + 1] = hi\n hi = hi >> 8\n buf[offset] = hi\n return offset + 8\n}\n\nBuffer.prototype.writeBigUInt64LE = defineBigIntMethod(function writeBigUInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeBigUInt64BE = defineBigIntMethod(function writeBigUInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n let i = 0\n let mul = 1\n let sub = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n let i = byteLength - 1\n let mul = 1\n let sub = 0\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n if (value < 0) value = 0xff + value + 1\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n this[offset + 2] = (value >>> 16)\n this[offset + 3] = (value >>> 24)\n return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (value < 0) value = 0xffffffff + value + 1\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeBigInt64LE = defineBigIntMethod(function writeBigInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nBuffer.prototype.writeBigInt64BE = defineBigIntMethod(function writeBigInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n }\n ieee754.write(buf, value, offset, littleEndian, 23, 4)\n return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n }\n ieee754.write(buf, value, offset, littleEndian, 52, 8)\n return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n if (!Buffer.isBuffer(target)) throw new TypeError('argument should be a Buffer')\n if (!start) start = 0\n if (!end && end !== 0) end = this.length\n if (targetStart >= target.length) targetStart = target.length\n if (!targetStart) targetStart = 0\n if (end > 0 && end < start) end = start\n\n // Copy 0 bytes; we're done\n if (end === start) return 0\n if (target.length === 0 || this.length === 0) return 0\n\n // Fatal error conditions\n if (targetStart < 0) {\n throw new RangeError('targetStart out of bounds')\n }\n if (start < 0 || start >= this.length) throw new RangeError('Index out of range')\n if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n // Are we oob?\n if (end > this.length) end = this.length\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start\n }\n\n const len = end - start\n\n if (this === target && typeof Uint8Array.prototype.copyWithin === 'function') {\n // Use built-in when available, missing from IE11\n this.copyWithin(targetStart, start, end)\n } else {\n Uint8Array.prototype.set.call(\n target,\n this.subarray(start, end),\n targetStart\n )\n }\n\n return len\n}\n\n// Usage:\n// buffer.fill(number[, offset[, end]])\n// buffer.fill(buffer[, offset[, end]])\n// buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n // Handle string cases:\n if (typeof val === 'string') {\n if (typeof start === 'string') {\n encoding = start\n start = 0\n end = this.length\n } else if (typeof end === 'string') {\n encoding = end\n end = this.length\n }\n if (encoding !== undefined && typeof encoding !== 'string') {\n throw new TypeError('encoding must be a string')\n }\n if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n if (val.length === 1) {\n const code = val.charCodeAt(0)\n if ((encoding === 'utf8' && code < 128) ||\n encoding === 'latin1') {\n // Fast path: If `val` fits into a single byte, use that numeric value.\n val = code\n }\n }\n } else if (typeof val === 'number') {\n val = val & 255\n } else if (typeof val === 'boolean') {\n val = Number(val)\n }\n\n // Invalid ranges are not set to a default, so can range check early.\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError('Out of range index')\n }\n\n if (end <= start) {\n return this\n }\n\n start = start >>> 0\n end = end === undefined ? this.length : end >>> 0\n\n if (!val) val = 0\n\n let i\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val\n }\n } else {\n const bytes = Buffer.isBuffer(val)\n ? val\n : Buffer.from(val, encoding)\n const len = bytes.length\n if (len === 0) {\n throw new TypeError('The value \"' + val +\n '\" is invalid for argument \"value\"')\n }\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len]\n }\n }\n\n return this\n}\n\n// CUSTOM ERRORS\n// =============\n\n// Simplified versions from Node, changed for Buffer-only usage\nconst errors = {}\nfunction E (sym, getMessage, Base) {\n errors[sym] = class NodeError extends Base {\n constructor () {\n super()\n\n Object.defineProperty(this, 'message', {\n value: getMessage.apply(this, arguments),\n writable: true,\n configurable: true\n })\n\n // Add the error code to the name to include it in the stack trace.\n this.name = `${this.name} [${sym}]`\n // Access the stack to generate the error message including the error code\n // from the name.\n this.stack // eslint-disable-line no-unused-expressions\n // Reset the name to the actual name.\n delete this.name\n }\n\n get code () {\n return sym\n }\n\n set code (value) {\n Object.defineProperty(this, 'code', {\n configurable: true,\n enumerable: true,\n value,\n writable: true\n })\n }\n\n toString () {\n return `${this.name} [${sym}]: ${this.message}`\n }\n }\n}\n\nE('ERR_BUFFER_OUT_OF_BOUNDS',\n function (name) {\n if (name) {\n return `${name} is outside of buffer bounds`\n }\n\n return 'Attempt to access memory outside buffer bounds'\n }, RangeError)\nE('ERR_INVALID_ARG_TYPE',\n function (name, actual) {\n return `The \"${name}\" argument must be of type number. Received type ${typeof actual}`\n }, TypeError)\nE('ERR_OUT_OF_RANGE',\n function (str, range, input) {\n let msg = `The value of \"${str}\" is out of range.`\n let received = input\n if (Number.isInteger(input) && Math.abs(input) > 2 ** 32) {\n received = addNumericalSeparator(String(input))\n } else if (typeof input === 'bigint') {\n received = String(input)\n if (input > BigInt(2) ** BigInt(32) || input < -(BigInt(2) ** BigInt(32))) {\n received = addNumericalSeparator(received)\n }\n received += 'n'\n }\n msg += ` It must be ${range}. Received ${received}`\n return msg\n }, RangeError)\n\nfunction addNumericalSeparator (val) {\n let res = ''\n let i = val.length\n const start = val[0] === '-' ? 1 : 0\n for (; i >= start + 4; i -= 3) {\n res = `_${val.slice(i - 3, i)}${res}`\n }\n return `${val.slice(0, i)}${res}`\n}\n\n// CHECK FUNCTIONS\n// ===============\n\nfunction checkBounds (buf, offset, byteLength) {\n validateNumber(offset, 'offset')\n if (buf[offset] === undefined || buf[offset + byteLength] === undefined) {\n boundsError(offset, buf.length - (byteLength + 1))\n }\n}\n\nfunction checkIntBI (value, min, max, buf, offset, byteLength) {\n if (value > max || value < min) {\n const n = typeof min === 'bigint' ? 'n' : ''\n let range\n if (byteLength > 3) {\n if (min === 0 || min === BigInt(0)) {\n range = `>= 0${n} and < 2${n} ** ${(byteLength + 1) * 8}${n}`\n } else {\n range = `>= -(2${n} ** ${(byteLength + 1) * 8 - 1}${n}) and < 2 ** ` +\n `${(byteLength + 1) * 8 - 1}${n}`\n }\n } else {\n range = `>= ${min}${n} and <= ${max}${n}`\n }\n throw new errors.ERR_OUT_OF_RANGE('value', range, value)\n }\n checkBounds(buf, offset, byteLength)\n}\n\nfunction validateNumber (value, name) {\n if (typeof value !== 'number') {\n throw new errors.ERR_INVALID_ARG_TYPE(name, 'number', value)\n }\n}\n\nfunction boundsError (value, length, type) {\n if (Math.floor(value) !== value) {\n validateNumber(value, type)\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset', 'an integer', value)\n }\n\n if (length < 0) {\n throw new errors.ERR_BUFFER_OUT_OF_BOUNDS()\n }\n\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset',\n `>= ${type ? 1 : 0} and <= ${length}`,\n value)\n}\n\n// HELPER FUNCTIONS\n// ================\n\nconst INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n // Node takes equal signs as end of the Base64 encoding\n str = str.split('=')[0]\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = str.trim().replace(INVALID_BASE64_RE, '')\n // Node converts strings with length < 2 to ''\n if (str.length < 2) return ''\n // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n while (str.length % 4 !== 0) {\n str = str + '='\n }\n return str\n}\n\nfunction utf8ToBytes (string, units) {\n units = units || Infinity\n let codePoint\n const length = string.length\n let leadSurrogate = null\n const bytes = []\n\n for (let i = 0; i < length; ++i) {\n codePoint = string.charCodeAt(i)\n\n // is surrogate component\n if (codePoint > 0xD7FF && codePoint < 0xE000) {\n // last char was a lead\n if (!leadSurrogate) {\n // no lead yet\n if (codePoint > 0xDBFF) {\n // unexpected trail\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n } else if (i + 1 === length) {\n // unpaired lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n }\n\n // valid lead\n leadSurrogate = codePoint\n\n continue\n }\n\n // 2 leads in a row\n if (codePoint < 0xDC00) {\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n leadSurrogate = codePoint\n continue\n }\n\n // valid surrogate pair\n codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n } else if (leadSurrogate) {\n // valid bmp char, but last char was a lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n }\n\n leadSurrogate = null\n\n // encode utf8\n if (codePoint < 0x80) {\n if ((units -= 1) < 0) break\n bytes.push(codePoint)\n } else if (codePoint < 0x800) {\n if ((units -= 2) < 0) break\n bytes.push(\n codePoint >> 0x6 | 0xC0,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x10000) {\n if ((units -= 3) < 0) break\n bytes.push(\n codePoint >> 0xC | 0xE0,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x110000) {\n if ((units -= 4) < 0) break\n bytes.push(\n codePoint >> 0x12 | 0xF0,\n codePoint >> 0xC & 0x3F | 0x80,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else {\n throw new Error('Invalid code point')\n }\n }\n\n return bytes\n}\n\nfunction asciiToBytes (str) {\n const byteArray = []\n for (let i = 0; i < str.length; ++i) {\n // Node's code seems to be doing this and not & 0x7F..\n byteArray.push(str.charCodeAt(i) & 0xFF)\n }\n return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n let c, hi, lo\n const byteArray = []\n for (let i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0) break\n\n c = str.charCodeAt(i)\n hi = c >> 8\n lo = c % 256\n byteArray.push(lo)\n byteArray.push(hi)\n }\n\n return byteArray\n}\n\nfunction base64ToBytes (str) {\n return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n let i\n for (i = 0; i < length; ++i) {\n if ((i + offset >= dst.length) || (i >= src.length)) break\n dst[i + offset] = src[i]\n }\n return i\n}\n\n// ArrayBuffer or Uint8Array objects from other contexts (i.e. iframes) do not pass\n// the `instanceof` check but they should be treated as of that type.\n// See: https://github.com/feross/buffer/issues/166\nfunction isInstance (obj, type) {\n return obj instanceof type ||\n (obj != null && obj.constructor != null && obj.constructor.name != null &&\n obj.constructor.name === type.name)\n}\nfunction numberIsNaN (obj) {\n // For IE11 support\n return obj !== obj // eslint-disable-line no-self-compare\n}\n\n// Create lookup table for `toString('hex')`\n// See: https://github.com/feross/buffer/issues/219\nconst hexSliceLookupTable = (function () {\n const alphabet = '0123456789abcdef'\n const table = new Array(256)\n for (let i = 0; i < 16; ++i) {\n const i16 = i * 16\n for (let j = 0; j < 16; ++j) {\n table[i16 + j] = alphabet[i] + alphabet[j]\n }\n }\n return table\n})()\n\n// Return not function with Error if BigInt not supported\nfunction defineBigIntMethod (fn) {\n return typeof BigInt === 'undefined' ? BufferBigIntNotDefined : fn\n}\n\nfunction BufferBigIntNotDefined () {\n throw new Error('BigInt not supported')\n}\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\nvar R = typeof Reflect === 'object' ? Reflect : null\nvar ReflectApply = R && typeof R.apply === 'function'\n ? R.apply\n : function ReflectApply(target, receiver, args) {\n return Function.prototype.apply.call(target, receiver, args);\n }\n\nvar ReflectOwnKeys\nif (R && typeof R.ownKeys === 'function') {\n ReflectOwnKeys = R.ownKeys\n} else if (Object.getOwnPropertySymbols) {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target)\n .concat(Object.getOwnPropertySymbols(target));\n };\n} else {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target);\n };\n}\n\nfunction ProcessEmitWarning(warning) {\n if (console && console.warn) console.warn(warning);\n}\n\nvar NumberIsNaN = Number.isNaN || function NumberIsNaN(value) {\n return value !== value;\n}\n\nfunction EventEmitter() {\n EventEmitter.init.call(this);\n}\nmodule.exports = EventEmitter;\nmodule.exports.once = once;\n\n// Backwards-compat with node 0.10.x\nEventEmitter.EventEmitter = EventEmitter;\n\nEventEmitter.prototype._events = undefined;\nEventEmitter.prototype._eventsCount = 0;\nEventEmitter.prototype._maxListeners = undefined;\n\n// By default EventEmitters will print a warning if more than 10 listeners are\n// added to it. This is a useful default which helps finding memory leaks.\nvar defaultMaxListeners = 10;\n\nfunction checkListener(listener) {\n if (typeof listener !== 'function') {\n throw new TypeError('The \"listener\" argument must be of type Function. Received type ' + typeof listener);\n }\n}\n\nObject.defineProperty(EventEmitter, 'defaultMaxListeners', {\n enumerable: true,\n get: function() {\n return defaultMaxListeners;\n },\n set: function(arg) {\n if (typeof arg !== 'number' || arg < 0 || NumberIsNaN(arg)) {\n throw new RangeError('The value of \"defaultMaxListeners\" is out of range. It must be a non-negative number. Received ' + arg + '.');\n }\n defaultMaxListeners = arg;\n }\n});\n\nEventEmitter.init = function() {\n\n if (this._events === undefined ||\n this._events === Object.getPrototypeOf(this)._events) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n }\n\n this._maxListeners = this._maxListeners || undefined;\n};\n\n// Obviously not all Emitters should be limited to 10. This function allows\n// that to be increased. Set to zero for unlimited.\nEventEmitter.prototype.setMaxListeners = function setMaxListeners(n) {\n if (typeof n !== 'number' || n < 0 || NumberIsNaN(n)) {\n throw new RangeError('The value of \"n\" is out of range. It must be a non-negative number. Received ' + n + '.');\n }\n this._maxListeners = n;\n return this;\n};\n\nfunction _getMaxListeners(that) {\n if (that._maxListeners === undefined)\n return EventEmitter.defaultMaxListeners;\n return that._maxListeners;\n}\n\nEventEmitter.prototype.getMaxListeners = function getMaxListeners() {\n return _getMaxListeners(this);\n};\n\nEventEmitter.prototype.emit = function emit(type) {\n var args = [];\n for (var i = 1; i < arguments.length; i++) args.push(arguments[i]);\n var doError = (type === 'error');\n\n var events = this._events;\n if (events !== undefined)\n doError = (doError && events.error === undefined);\n else if (!doError)\n return false;\n\n // If there is no 'error' event listener then throw.\n if (doError) {\n var er;\n if (args.length > 0)\n er = args[0];\n if (er instanceof Error) {\n // Note: The comments on the `throw` lines are intentional, they show\n // up in Node's output if this results in an unhandled exception.\n throw er; // Unhandled 'error' event\n }\n // At least give some kind of context to the user\n var err = new Error('Unhandled error.' + (er ? ' (' + er.message + ')' : ''));\n err.context = er;\n throw err; // Unhandled 'error' event\n }\n\n var handler = events[type];\n\n if (handler === undefined)\n return false;\n\n if (typeof handler === 'function') {\n ReflectApply(handler, this, args);\n } else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n ReflectApply(listeners[i], this, args);\n }\n\n return true;\n};\n\nfunction _addListener(target, type, listener, prepend) {\n var m;\n var events;\n var existing;\n\n checkListener(listener);\n\n events = target._events;\n if (events === undefined) {\n events = target._events = Object.create(null);\n target._eventsCount = 0;\n } else {\n // To avoid recursion in the case that type === \"newListener\"! Before\n // adding it to the listeners, first emit \"newListener\".\n if (events.newListener !== undefined) {\n target.emit('newListener', type,\n listener.listener ? listener.listener : listener);\n\n // Re-assign `events` because a newListener handler could have caused the\n // this._events to be assigned to a new object\n events = target._events;\n }\n existing = events[type];\n }\n\n if (existing === undefined) {\n // Optimize the case of one listener. Don't need the extra array object.\n existing = events[type] = listener;\n ++target._eventsCount;\n } else {\n if (typeof existing === 'function') {\n // Adding the second element, need to change to array.\n existing = events[type] =\n prepend ? [listener, existing] : [existing, listener];\n // If we've already got an array, just append.\n } else if (prepend) {\n existing.unshift(listener);\n } else {\n existing.push(listener);\n }\n\n // Check for listener leak\n m = _getMaxListeners(target);\n if (m > 0 && existing.length > m && !existing.warned) {\n existing.warned = true;\n // No error code for this since it is a Warning\n // eslint-disable-next-line no-restricted-syntax\n var w = new Error('Possible EventEmitter memory leak detected. ' +\n existing.length + ' ' + String(type) + ' listeners ' +\n 'added. Use emitter.setMaxListeners() to ' +\n 'increase limit');\n w.name = 'MaxListenersExceededWarning';\n w.emitter = target;\n w.type = type;\n w.count = existing.length;\n ProcessEmitWarning(w);\n }\n }\n\n return target;\n}\n\nEventEmitter.prototype.addListener = function addListener(type, listener) {\n return _addListener(this, type, listener, false);\n};\n\nEventEmitter.prototype.on = EventEmitter.prototype.addListener;\n\nEventEmitter.prototype.prependListener =\n function prependListener(type, listener) {\n return _addListener(this, type, listener, true);\n };\n\nfunction onceWrapper() {\n if (!this.fired) {\n this.target.removeListener(this.type, this.wrapFn);\n this.fired = true;\n if (arguments.length === 0)\n return this.listener.call(this.target);\n return this.listener.apply(this.target, arguments);\n }\n}\n\nfunction _onceWrap(target, type, listener) {\n var state = { fired: false, wrapFn: undefined, target: target, type: type, listener: listener };\n var wrapped = onceWrapper.bind(state);\n wrapped.listener = listener;\n state.wrapFn = wrapped;\n return wrapped;\n}\n\nEventEmitter.prototype.once = function once(type, listener) {\n checkListener(listener);\n this.on(type, _onceWrap(this, type, listener));\n return this;\n};\n\nEventEmitter.prototype.prependOnceListener =\n function prependOnceListener(type, listener) {\n checkListener(listener);\n this.prependListener(type, _onceWrap(this, type, listener));\n return this;\n };\n\n// Emits a 'removeListener' event if and only if the listener was removed.\nEventEmitter.prototype.removeListener =\n function removeListener(type, listener) {\n var list, events, position, i, originalListener;\n\n checkListener(listener);\n\n events = this._events;\n if (events === undefined)\n return this;\n\n list = events[type];\n if (list === undefined)\n return this;\n\n if (list === listener || list.listener === listener) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else {\n delete events[type];\n if (events.removeListener)\n this.emit('removeListener', type, list.listener || listener);\n }\n } else if (typeof list !== 'function') {\n position = -1;\n\n for (i = list.length - 1; i >= 0; i--) {\n if (list[i] === listener || list[i].listener === listener) {\n originalListener = list[i].listener;\n position = i;\n break;\n }\n }\n\n if (position < 0)\n return this;\n\n if (position === 0)\n list.shift();\n else {\n spliceOne(list, position);\n }\n\n if (list.length === 1)\n events[type] = list[0];\n\n if (events.removeListener !== undefined)\n this.emit('removeListener', type, originalListener || listener);\n }\n\n return this;\n };\n\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\n\nEventEmitter.prototype.removeAllListeners =\n function removeAllListeners(type) {\n var listeners, events, i;\n\n events = this._events;\n if (events === undefined)\n return this;\n\n // not listening for removeListener, no need to emit\n if (events.removeListener === undefined) {\n if (arguments.length === 0) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n } else if (events[type] !== undefined) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else\n delete events[type];\n }\n return this;\n }\n\n // emit removeListener for all listeners on all events\n if (arguments.length === 0) {\n var keys = Object.keys(events);\n var key;\n for (i = 0; i < keys.length; ++i) {\n key = keys[i];\n if (key === 'removeListener') continue;\n this.removeAllListeners(key);\n }\n this.removeAllListeners('removeListener');\n this._events = Object.create(null);\n this._eventsCount = 0;\n return this;\n }\n\n listeners = events[type];\n\n if (typeof listeners === 'function') {\n this.removeListener(type, listeners);\n } else if (listeners !== undefined) {\n // LIFO order\n for (i = listeners.length - 1; i >= 0; i--) {\n this.removeListener(type, listeners[i]);\n }\n }\n\n return this;\n };\n\nfunction _listeners(target, type, unwrap) {\n var events = target._events;\n\n if (events === undefined)\n return [];\n\n var evlistener = events[type];\n if (evlistener === undefined)\n return [];\n\n if (typeof evlistener === 'function')\n return unwrap ? [evlistener.listener || evlistener] : [evlistener];\n\n return unwrap ?\n unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length);\n}\n\nEventEmitter.prototype.listeners = function listeners(type) {\n return _listeners(this, type, true);\n};\n\nEventEmitter.prototype.rawListeners = function rawListeners(type) {\n return _listeners(this, type, false);\n};\n\nEventEmitter.listenerCount = function(emitter, type) {\n if (typeof emitter.listenerCount === 'function') {\n return emitter.listenerCount(type);\n } else {\n return listenerCount.call(emitter, type);\n }\n};\n\nEventEmitter.prototype.listenerCount = listenerCount;\nfunction listenerCount(type) {\n var events = this._events;\n\n if (events !== undefined) {\n var evlistener = events[type];\n\n if (typeof evlistener === 'function') {\n return 1;\n } else if (evlistener !== undefined) {\n return evlistener.length;\n }\n }\n\n return 0;\n}\n\nEventEmitter.prototype.eventNames = function eventNames() {\n return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : [];\n};\n\nfunction arrayClone(arr, n) {\n var copy = new Array(n);\n for (var i = 0; i < n; ++i)\n copy[i] = arr[i];\n return copy;\n}\n\nfunction spliceOne(list, index) {\n for (; index + 1 < list.length; index++)\n list[index] = list[index + 1];\n list.pop();\n}\n\nfunction unwrapListeners(arr) {\n var ret = new Array(arr.length);\n for (var i = 0; i < ret.length; ++i) {\n ret[i] = arr[i].listener || arr[i];\n }\n return ret;\n}\n\nfunction once(emitter, name) {\n return new Promise(function (resolve, reject) {\n function errorListener(err) {\n emitter.removeListener(name, resolver);\n reject(err);\n }\n\n function resolver() {\n if (typeof emitter.removeListener === 'function') {\n emitter.removeListener('error', errorListener);\n }\n resolve([].slice.call(arguments));\n };\n\n eventTargetAgnosticAddListener(emitter, name, resolver, { once: true });\n if (name !== 'error') {\n addErrorHandlerIfEventEmitter(emitter, errorListener, { once: true });\n }\n });\n}\n\nfunction addErrorHandlerIfEventEmitter(emitter, handler, flags) {\n if (typeof emitter.on === 'function') {\n eventTargetAgnosticAddListener(emitter, 'error', handler, flags);\n }\n}\n\nfunction eventTargetAgnosticAddListener(emitter, name, listener, flags) {\n if (typeof emitter.on === 'function') {\n if (flags.once) {\n emitter.once(name, listener);\n } else {\n emitter.on(name, listener);\n }\n } else if (typeof emitter.addEventListener === 'function') {\n // EventTarget does not have `error` event semantics like Node\n // EventEmitters, we do not listen for `error` events here.\n emitter.addEventListener(name, function wrapListener(arg) {\n // IE does not have builtin `{ once: true }` support so we\n // have to do it manually.\n if (flags.once) {\n emitter.removeEventListener(name, wrapListener);\n }\n listener(arg);\n });\n } else {\n throw new TypeError('The \"emitter\" argument must be of type EventEmitter. Received type ' + typeof emitter);\n }\n}\n","/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */\nexports.read = function (buffer, offset, isLE, mLen, nBytes) {\n var e, m\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var nBits = -7\n var i = isLE ? (nBytes - 1) : 0\n var d = isLE ? -1 : 1\n var s = buffer[offset + i]\n\n i += d\n\n e = s & ((1 << (-nBits)) - 1)\n s >>= (-nBits)\n nBits += eLen\n for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & ((1 << (-nBits)) - 1)\n e >>= (-nBits)\n nBits += mLen\n for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias\n } else if (e === eMax) {\n return m ? NaN : ((s ? -1 : 1) * Infinity)\n } else {\n m = m + Math.pow(2, mLen)\n e = e - eBias\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n var i = isLE ? 0 : (nBytes - 1)\n var d = isLE ? 1 : -1\n var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n value = Math.abs(value)\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0\n e = eMax\n } else {\n e = Math.floor(Math.log(value) / Math.LN2)\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--\n c *= 2\n }\n if (e + eBias >= 1) {\n value += rt / c\n } else {\n value += rt * Math.pow(2, 1 - eBias)\n }\n if (value * c >= 2) {\n e++\n c /= 2\n }\n\n if (e + eBias >= eMax) {\n m = 0\n e = eMax\n } else if (e + eBias >= 1) {\n m = ((value * c) - 1) * Math.pow(2, mLen)\n e = e + eBias\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n e = 0\n }\n }\n\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n e = (e << mLen) | m\n eLen += mLen\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128\n}\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView');\n\nmodule.exports = DataView;\n","var hashClear = require('./_hashClear'),\n hashDelete = require('./_hashDelete'),\n hashGet = require('./_hashGet'),\n hashHas = require('./_hashHas'),\n hashSet = require('./_hashSet');\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\nmodule.exports = Hash;\n","var listCacheClear = require('./_listCacheClear'),\n listCacheDelete = require('./_listCacheDelete'),\n listCacheGet = require('./_listCacheGet'),\n listCacheHas = require('./_listCacheHas'),\n listCacheSet = require('./_listCacheSet');\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\nmodule.exports = ListCache;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map');\n\nmodule.exports = Map;\n","var mapCacheClear = require('./_mapCacheClear'),\n mapCacheDelete = require('./_mapCacheDelete'),\n mapCacheGet = require('./_mapCacheGet'),\n mapCacheHas = require('./_mapCacheHas'),\n mapCacheSet = require('./_mapCacheSet');\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\nmodule.exports = MapCache;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Promise = getNative(root, 'Promise');\n\nmodule.exports = Promise;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Set = getNative(root, 'Set');\n\nmodule.exports = Set;\n","var MapCache = require('./_MapCache'),\n setCacheAdd = require('./_setCacheAdd'),\n setCacheHas = require('./_setCacheHas');\n\n/**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\nfunction SetCache(values) {\n var index = -1,\n length = values == null ? 0 : values.length;\n\n this.__data__ = new MapCache;\n while (++index < length) {\n this.add(values[index]);\n }\n}\n\n// Add methods to `SetCache`.\nSetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\nSetCache.prototype.has = setCacheHas;\n\nmodule.exports = SetCache;\n","var ListCache = require('./_ListCache'),\n stackClear = require('./_stackClear'),\n stackDelete = require('./_stackDelete'),\n stackGet = require('./_stackGet'),\n stackHas = require('./_stackHas'),\n stackSet = require('./_stackSet');\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\nmodule.exports = Stack;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Uint8Array = root.Uint8Array;\n\nmodule.exports = Uint8Array;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar WeakMap = getNative(root, 'WeakMap');\n\nmodule.exports = WeakMap;\n","/**\n * A specialized version of `_.forEach` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\nfunction arrayEach(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (iteratee(array[index], index, array) === false) {\n break;\n }\n }\n return array;\n}\n\nmodule.exports = arrayEach;\n","/**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\nfunction arrayFilter(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result[resIndex++] = value;\n }\n }\n return result;\n}\n\nmodule.exports = arrayFilter;\n","var baseTimes = require('./_baseTimes'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isIndex = require('./_isIndex'),\n isTypedArray = require('./isTypedArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = arrayLikeKeys;\n","/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n}\n\nmodule.exports = arrayPush;\n","/**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\nfunction arraySome(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (predicate(array[index], index, array)) {\n return true;\n }\n }\n return false;\n}\n\nmodule.exports = arraySome;\n","var baseAssignValue = require('./_baseAssignValue'),\n eq = require('./eq');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\nmodule.exports = assignValue;\n","var eq = require('./eq');\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\nmodule.exports = assocIndexOf;\n","var copyObject = require('./_copyObject'),\n keys = require('./keys');\n\n/**\n * The base implementation of `_.assign` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssign(object, source) {\n return object && copyObject(source, keys(source), object);\n}\n\nmodule.exports = baseAssign;\n","var copyObject = require('./_copyObject'),\n keysIn = require('./keysIn');\n\n/**\n * The base implementation of `_.assignIn` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssignIn(object, source) {\n return object && copyObject(source, keysIn(source), object);\n}\n\nmodule.exports = baseAssignIn;\n","var defineProperty = require('./_defineProperty');\n\n/**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction baseAssignValue(object, key, value) {\n if (key == '__proto__' && defineProperty) {\n defineProperty(object, key, {\n 'configurable': true,\n 'enumerable': true,\n 'value': value,\n 'writable': true\n });\n } else {\n object[key] = value;\n }\n}\n\nmodule.exports = baseAssignValue;\n","var Stack = require('./_Stack'),\n arrayEach = require('./_arrayEach'),\n assignValue = require('./_assignValue'),\n baseAssign = require('./_baseAssign'),\n baseAssignIn = require('./_baseAssignIn'),\n cloneBuffer = require('./_cloneBuffer'),\n copyArray = require('./_copyArray'),\n copySymbols = require('./_copySymbols'),\n copySymbolsIn = require('./_copySymbolsIn'),\n getAllKeys = require('./_getAllKeys'),\n getAllKeysIn = require('./_getAllKeysIn'),\n getTag = require('./_getTag'),\n initCloneArray = require('./_initCloneArray'),\n initCloneByTag = require('./_initCloneByTag'),\n initCloneObject = require('./_initCloneObject'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isMap = require('./isMap'),\n isObject = require('./isObject'),\n isSet = require('./isSet'),\n keys = require('./keys'),\n keysIn = require('./keysIn');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_FLAT_FLAG = 2,\n CLONE_SYMBOLS_FLAG = 4;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values supported by `_.clone`. */\nvar cloneableTags = {};\ncloneableTags[argsTag] = cloneableTags[arrayTag] =\ncloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =\ncloneableTags[boolTag] = cloneableTags[dateTag] =\ncloneableTags[float32Tag] = cloneableTags[float64Tag] =\ncloneableTags[int8Tag] = cloneableTags[int16Tag] =\ncloneableTags[int32Tag] = cloneableTags[mapTag] =\ncloneableTags[numberTag] = cloneableTags[objectTag] =\ncloneableTags[regexpTag] = cloneableTags[setTag] =\ncloneableTags[stringTag] = cloneableTags[symbolTag] =\ncloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =\ncloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;\ncloneableTags[errorTag] = cloneableTags[funcTag] =\ncloneableTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.clone` and `_.cloneDeep` which tracks\n * traversed objects.\n *\n * @private\n * @param {*} value The value to clone.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Deep clone\n * 2 - Flatten inherited properties\n * 4 - Clone symbols\n * @param {Function} [customizer] The function to customize cloning.\n * @param {string} [key] The key of `value`.\n * @param {Object} [object] The parent object of `value`.\n * @param {Object} [stack] Tracks traversed objects and their clone counterparts.\n * @returns {*} Returns the cloned value.\n */\nfunction baseClone(value, bitmask, customizer, key, object, stack) {\n var result,\n isDeep = bitmask & CLONE_DEEP_FLAG,\n isFlat = bitmask & CLONE_FLAT_FLAG,\n isFull = bitmask & CLONE_SYMBOLS_FLAG;\n\n if (customizer) {\n result = object ? customizer(value, key, object, stack) : customizer(value);\n }\n if (result !== undefined) {\n return result;\n }\n if (!isObject(value)) {\n return value;\n }\n var isArr = isArray(value);\n if (isArr) {\n result = initCloneArray(value);\n if (!isDeep) {\n return copyArray(value, result);\n }\n } else {\n var tag = getTag(value),\n isFunc = tag == funcTag || tag == genTag;\n\n if (isBuffer(value)) {\n return cloneBuffer(value, isDeep);\n }\n if (tag == objectTag || tag == argsTag || (isFunc && !object)) {\n result = (isFlat || isFunc) ? {} : initCloneObject(value);\n if (!isDeep) {\n return isFlat\n ? copySymbolsIn(value, baseAssignIn(result, value))\n : copySymbols(value, baseAssign(result, value));\n }\n } else {\n if (!cloneableTags[tag]) {\n return object ? value : {};\n }\n result = initCloneByTag(value, tag, isDeep);\n }\n }\n // Check for circular references and return its corresponding clone.\n stack || (stack = new Stack);\n var stacked = stack.get(value);\n if (stacked) {\n return stacked;\n }\n stack.set(value, result);\n\n if (isSet(value)) {\n value.forEach(function(subValue) {\n result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));\n });\n } else if (isMap(value)) {\n value.forEach(function(subValue, key) {\n result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n }\n\n var keysFunc = isFull\n ? (isFlat ? getAllKeysIn : getAllKeys)\n : (isFlat ? keysIn : keys);\n\n var props = isArr ? undefined : keysFunc(value);\n arrayEach(props || value, function(subValue, key) {\n if (props) {\n key = subValue;\n subValue = value[key];\n }\n // Recursively populate clone (susceptible to call stack limits).\n assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n return result;\n}\n\nmodule.exports = baseClone;\n","var isObject = require('./isObject');\n\n/** Built-in value references. */\nvar objectCreate = Object.create;\n\n/**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} proto The object to inherit from.\n * @returns {Object} Returns the new object.\n */\nvar baseCreate = (function() {\n function object() {}\n return function(proto) {\n if (!isObject(proto)) {\n return {};\n }\n if (objectCreate) {\n return objectCreate(proto);\n }\n object.prototype = proto;\n var result = new object;\n object.prototype = undefined;\n return result;\n };\n}());\n\nmodule.exports = baseCreate;\n","var arrayPush = require('./_arrayPush'),\n isArray = require('./isArray');\n\n/**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction baseGetAllKeys(object, keysFunc, symbolsFunc) {\n var result = keysFunc(object);\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n}\n\nmodule.exports = baseGetAllKeys;\n","var Symbol = require('./_Symbol'),\n getRawTag = require('./_getRawTag'),\n objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]';\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\nmodule.exports = baseIsArguments;\n","var baseIsEqualDeep = require('./_baseIsEqualDeep'),\n isObjectLike = require('./isObjectLike');\n\n/**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Unordered comparison\n * 2 - Partial comparison\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\nfunction baseIsEqual(value, other, bitmask, customizer, stack) {\n if (value === other) {\n return true;\n }\n if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\n return value !== value && other !== other;\n }\n return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n}\n\nmodule.exports = baseIsEqual;\n","var Stack = require('./_Stack'),\n equalArrays = require('./_equalArrays'),\n equalByTag = require('./_equalByTag'),\n equalObjects = require('./_equalObjects'),\n getTag = require('./_getTag'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isTypedArray = require('./isTypedArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n var objIsArr = isArray(object),\n othIsArr = isArray(other),\n objTag = objIsArr ? arrayTag : getTag(object),\n othTag = othIsArr ? arrayTag : getTag(other);\n\n objTag = objTag == argsTag ? objectTag : objTag;\n othTag = othTag == argsTag ? objectTag : othTag;\n\n var objIsObj = objTag == objectTag,\n othIsObj = othTag == objectTag,\n isSameTag = objTag == othTag;\n\n if (isSameTag && isBuffer(object)) {\n if (!isBuffer(other)) {\n return false;\n }\n objIsArr = true;\n objIsObj = false;\n }\n if (isSameTag && !objIsObj) {\n stack || (stack = new Stack);\n return (objIsArr || isTypedArray(object))\n ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n }\n if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n if (objIsWrapped || othIsWrapped) {\n var objUnwrapped = objIsWrapped ? object.value() : object,\n othUnwrapped = othIsWrapped ? other.value() : other;\n\n stack || (stack = new Stack);\n return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n }\n }\n if (!isSameTag) {\n return false;\n }\n stack || (stack = new Stack);\n return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n}\n\nmodule.exports = baseIsEqualDeep;\n","var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]';\n\n/**\n * The base implementation of `_.isMap` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n */\nfunction baseIsMap(value) {\n return isObjectLike(value) && getTag(value) == mapTag;\n}\n\nmodule.exports = baseIsMap;\n","var isFunction = require('./isFunction'),\n isMasked = require('./_isMasked'),\n isObject = require('./isObject'),\n toSource = require('./_toSource');\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\nmodule.exports = baseIsNative;\n","var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar setTag = '[object Set]';\n\n/**\n * The base implementation of `_.isSet` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n */\nfunction baseIsSet(value) {\n return isObjectLike(value) && getTag(value) == setTag;\n}\n\nmodule.exports = baseIsSet;\n","var baseGetTag = require('./_baseGetTag'),\n isLength = require('./isLength'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n\nmodule.exports = baseIsTypedArray;\n","var isPrototype = require('./_isPrototype'),\n nativeKeys = require('./_nativeKeys');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeys;\n","var isObject = require('./isObject'),\n isPrototype = require('./_isPrototype'),\n nativeKeysIn = require('./_nativeKeysIn');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeysIn(object) {\n if (!isObject(object)) {\n return nativeKeysIn(object);\n }\n var isProto = isPrototype(object),\n result = [];\n\n for (var key in object) {\n if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeysIn;\n","/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\nmodule.exports = baseTimes;\n","/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n return function(value) {\n return func(value);\n };\n}\n\nmodule.exports = baseUnary;\n","/**\n * Checks if a `cache` value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction cacheHas(cache, key) {\n return cache.has(key);\n}\n\nmodule.exports = cacheHas;\n","var Uint8Array = require('./_Uint8Array');\n\n/**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\nfunction cloneArrayBuffer(arrayBuffer) {\n var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n return result;\n}\n\nmodule.exports = cloneArrayBuffer;\n","var root = require('./_root');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined,\n allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;\n\n/**\n * Creates a clone of `buffer`.\n *\n * @private\n * @param {Buffer} buffer The buffer to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Buffer} Returns the cloned buffer.\n */\nfunction cloneBuffer(buffer, isDeep) {\n if (isDeep) {\n return buffer.slice();\n }\n var length = buffer.length,\n result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\n\n buffer.copy(result);\n return result;\n}\n\nmodule.exports = cloneBuffer;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer');\n\n/**\n * Creates a clone of `dataView`.\n *\n * @private\n * @param {Object} dataView The data view to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned data view.\n */\nfunction cloneDataView(dataView, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;\n return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);\n}\n\nmodule.exports = cloneDataView;\n","/** Used to match `RegExp` flags from their coerced string values. */\nvar reFlags = /\\w*$/;\n\n/**\n * Creates a clone of `regexp`.\n *\n * @private\n * @param {Object} regexp The regexp to clone.\n * @returns {Object} Returns the cloned regexp.\n */\nfunction cloneRegExp(regexp) {\n var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));\n result.lastIndex = regexp.lastIndex;\n return result;\n}\n\nmodule.exports = cloneRegExp;\n","var Symbol = require('./_Symbol');\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * Creates a clone of the `symbol` object.\n *\n * @private\n * @param {Object} symbol The symbol object to clone.\n * @returns {Object} Returns the cloned symbol object.\n */\nfunction cloneSymbol(symbol) {\n return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};\n}\n\nmodule.exports = cloneSymbol;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer');\n\n/**\n * Creates a clone of `typedArray`.\n *\n * @private\n * @param {Object} typedArray The typed array to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned typed array.\n */\nfunction cloneTypedArray(typedArray, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n}\n\nmodule.exports = cloneTypedArray;\n","/**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\nfunction copyArray(source, array) {\n var index = -1,\n length = source.length;\n\n array || (array = Array(length));\n while (++index < length) {\n array[index] = source[index];\n }\n return array;\n}\n\nmodule.exports = copyArray;\n","var assignValue = require('./_assignValue'),\n baseAssignValue = require('./_baseAssignValue');\n\n/**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\nfunction copyObject(source, props, object, customizer) {\n var isNew = !object;\n object || (object = {});\n\n var index = -1,\n length = props.length;\n\n while (++index < length) {\n var key = props[index];\n\n var newValue = customizer\n ? customizer(object[key], source[key], key, object, source)\n : undefined;\n\n if (newValue === undefined) {\n newValue = source[key];\n }\n if (isNew) {\n baseAssignValue(object, key, newValue);\n } else {\n assignValue(object, key, newValue);\n }\n }\n return object;\n}\n\nmodule.exports = copyObject;\n","var copyObject = require('./_copyObject'),\n getSymbols = require('./_getSymbols');\n\n/**\n * Copies own symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbols(source, object) {\n return copyObject(source, getSymbols(source), object);\n}\n\nmodule.exports = copySymbols;\n","var copyObject = require('./_copyObject'),\n getSymbolsIn = require('./_getSymbolsIn');\n\n/**\n * Copies own and inherited symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbolsIn(source, object) {\n return copyObject(source, getSymbolsIn(source), object);\n}\n\nmodule.exports = copySymbolsIn;\n","var root = require('./_root');\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\nmodule.exports = coreJsData;\n","var getNative = require('./_getNative');\n\nvar defineProperty = (function() {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n}());\n\nmodule.exports = defineProperty;\n","var SetCache = require('./_SetCache'),\n arraySome = require('./_arraySome'),\n cacheHas = require('./_cacheHas');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\nfunction equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n arrLength = array.length,\n othLength = other.length;\n\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n return false;\n }\n // Check that cyclic values are equal.\n var arrStacked = stack.get(array);\n var othStacked = stack.get(other);\n if (arrStacked && othStacked) {\n return arrStacked == other && othStacked == array;\n }\n var index = -1,\n result = true,\n seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n stack.set(array, other);\n stack.set(other, array);\n\n // Ignore non-index properties.\n while (++index < arrLength) {\n var arrValue = array[index],\n othValue = other[index];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, arrValue, index, other, array, stack)\n : customizer(arrValue, othValue, index, array, other, stack);\n }\n if (compared !== undefined) {\n if (compared) {\n continue;\n }\n result = false;\n break;\n }\n // Recursively compare arrays (susceptible to call stack limits).\n if (seen) {\n if (!arraySome(other, function(othValue, othIndex) {\n if (!cacheHas(seen, othIndex) &&\n (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n return seen.push(othIndex);\n }\n })) {\n result = false;\n break;\n }\n } else if (!(\n arrValue === othValue ||\n equalFunc(arrValue, othValue, bitmask, customizer, stack)\n )) {\n result = false;\n break;\n }\n }\n stack['delete'](array);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalArrays;\n","var Symbol = require('./_Symbol'),\n Uint8Array = require('./_Uint8Array'),\n eq = require('./eq'),\n equalArrays = require('./_equalArrays'),\n mapToArray = require('./_mapToArray'),\n setToArray = require('./_setToArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]';\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n switch (tag) {\n case dataViewTag:\n if ((object.byteLength != other.byteLength) ||\n (object.byteOffset != other.byteOffset)) {\n return false;\n }\n object = object.buffer;\n other = other.buffer;\n\n case arrayBufferTag:\n if ((object.byteLength != other.byteLength) ||\n !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n return false;\n }\n return true;\n\n case boolTag:\n case dateTag:\n case numberTag:\n // Coerce booleans to `1` or `0` and dates to milliseconds.\n // Invalid dates are coerced to `NaN`.\n return eq(+object, +other);\n\n case errorTag:\n return object.name == other.name && object.message == other.message;\n\n case regexpTag:\n case stringTag:\n // Coerce regexes to strings and treat strings, primitives and objects,\n // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n // for more details.\n return object == (other + '');\n\n case mapTag:\n var convert = mapToArray;\n\n case setTag:\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n convert || (convert = setToArray);\n\n if (object.size != other.size && !isPartial) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked) {\n return stacked == other;\n }\n bitmask |= COMPARE_UNORDERED_FLAG;\n\n // Recursively compare objects (susceptible to call stack limits).\n stack.set(object, other);\n var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n stack['delete'](object);\n return result;\n\n case symbolTag:\n if (symbolValueOf) {\n return symbolValueOf.call(object) == symbolValueOf.call(other);\n }\n }\n return false;\n}\n\nmodule.exports = equalByTag;\n","var getAllKeys = require('./_getAllKeys');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n objProps = getAllKeys(object),\n objLength = objProps.length,\n othProps = getAllKeys(other),\n othLength = othProps.length;\n\n if (objLength != othLength && !isPartial) {\n return false;\n }\n var index = objLength;\n while (index--) {\n var key = objProps[index];\n if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n return false;\n }\n }\n // Check that cyclic values are equal.\n var objStacked = stack.get(object);\n var othStacked = stack.get(other);\n if (objStacked && othStacked) {\n return objStacked == other && othStacked == object;\n }\n var result = true;\n stack.set(object, other);\n stack.set(other, object);\n\n var skipCtor = isPartial;\n while (++index < objLength) {\n key = objProps[index];\n var objValue = object[key],\n othValue = other[key];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, objValue, key, other, object, stack)\n : customizer(objValue, othValue, key, object, other, stack);\n }\n // Recursively compare objects (susceptible to call stack limits).\n if (!(compared === undefined\n ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n : compared\n )) {\n result = false;\n break;\n }\n skipCtor || (skipCtor = key == 'constructor');\n }\n if (result && !skipCtor) {\n var objCtor = object.constructor,\n othCtor = other.constructor;\n\n // Non `Object` object instances with different constructors are not equal.\n if (objCtor != othCtor &&\n ('constructor' in object && 'constructor' in other) &&\n !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n result = false;\n }\n }\n stack['delete'](object);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalObjects;\n","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n","var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbols = require('./_getSymbols'),\n keys = require('./keys');\n\n/**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeys(object) {\n return baseGetAllKeys(object, keys, getSymbols);\n}\n\nmodule.exports = getAllKeys;\n","var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbolsIn = require('./_getSymbolsIn'),\n keysIn = require('./keysIn');\n\n/**\n * Creates an array of own and inherited enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeysIn(object) {\n return baseGetAllKeys(object, keysIn, getSymbolsIn);\n}\n\nmodule.exports = getAllKeysIn;\n","var isKeyable = require('./_isKeyable');\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\nmodule.exports = getMapData;\n","var baseIsNative = require('./_baseIsNative'),\n getValue = require('./_getValue');\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\nmodule.exports = getNative;\n","var overArg = require('./_overArg');\n\n/** Built-in value references. */\nvar getPrototype = overArg(Object.getPrototypeOf, Object);\n\nmodule.exports = getPrototype;\n","var Symbol = require('./_Symbol');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nmodule.exports = getRawTag;\n","var arrayFilter = require('./_arrayFilter'),\n stubArray = require('./stubArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n if (object == null) {\n return [];\n }\n object = Object(object);\n return arrayFilter(nativeGetSymbols(object), function(symbol) {\n return propertyIsEnumerable.call(object, symbol);\n });\n};\n\nmodule.exports = getSymbols;\n","var arrayPush = require('./_arrayPush'),\n getPrototype = require('./_getPrototype'),\n getSymbols = require('./_getSymbols'),\n stubArray = require('./stubArray');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own and inherited enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {\n var result = [];\n while (object) {\n arrayPush(result, getSymbols(object));\n object = getPrototype(object);\n }\n return result;\n};\n\nmodule.exports = getSymbolsIn;\n","var DataView = require('./_DataView'),\n Map = require('./_Map'),\n Promise = require('./_Promise'),\n Set = require('./_Set'),\n WeakMap = require('./_WeakMap'),\n baseGetTag = require('./_baseGetTag'),\n toSource = require('./_toSource');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n setTag = '[object Set]',\n weakMapTag = '[object WeakMap]';\n\nvar dataViewTag = '[object DataView]';\n\n/** Used to detect maps, sets, and weakmaps. */\nvar dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nvar getTag = baseGetTag;\n\n// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\nif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = baseGetTag(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : '';\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n}\n\nmodule.exports = getTag;\n","/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\nmodule.exports = getValue;\n","var nativeCreate = require('./_nativeCreate');\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n}\n\nmodule.exports = hashClear;\n","/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = hashDelete;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\nmodule.exports = hashGet;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\nmodule.exports = hashHas;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\nmodule.exports = hashSet;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Initializes an array clone.\n *\n * @private\n * @param {Array} array The array to clone.\n * @returns {Array} Returns the initialized clone.\n */\nfunction initCloneArray(array) {\n var length = array.length,\n result = new array.constructor(length);\n\n // Add properties assigned by `RegExp#exec`.\n if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {\n result.index = array.index;\n result.input = array.input;\n }\n return result;\n}\n\nmodule.exports = initCloneArray;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer'),\n cloneDataView = require('./_cloneDataView'),\n cloneRegExp = require('./_cloneRegExp'),\n cloneSymbol = require('./_cloneSymbol'),\n cloneTypedArray = require('./_cloneTypedArray');\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/**\n * Initializes an object clone based on its `toStringTag`.\n *\n * **Note:** This function only supports cloning values with tags of\n * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.\n *\n * @private\n * @param {Object} object The object to clone.\n * @param {string} tag The `toStringTag` of the object to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneByTag(object, tag, isDeep) {\n var Ctor = object.constructor;\n switch (tag) {\n case arrayBufferTag:\n return cloneArrayBuffer(object);\n\n case boolTag:\n case dateTag:\n return new Ctor(+object);\n\n case dataViewTag:\n return cloneDataView(object, isDeep);\n\n case float32Tag: case float64Tag:\n case int8Tag: case int16Tag: case int32Tag:\n case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:\n return cloneTypedArray(object, isDeep);\n\n case mapTag:\n return new Ctor;\n\n case numberTag:\n case stringTag:\n return new Ctor(object);\n\n case regexpTag:\n return cloneRegExp(object);\n\n case setTag:\n return new Ctor;\n\n case symbolTag:\n return cloneSymbol(object);\n }\n}\n\nmodule.exports = initCloneByTag;\n","var baseCreate = require('./_baseCreate'),\n getPrototype = require('./_getPrototype'),\n isPrototype = require('./_isPrototype');\n\n/**\n * Initializes an object clone.\n *\n * @private\n * @param {Object} object The object to clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneObject(object) {\n return (typeof object.constructor == 'function' && !isPrototype(object))\n ? baseCreate(getPrototype(object))\n : {};\n}\n\nmodule.exports = initCloneObject;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n var type = typeof value;\n length = length == null ? MAX_SAFE_INTEGER : length;\n\n return !!length &&\n (type == 'number' ||\n (type != 'symbol' && reIsUint.test(value))) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\nmodule.exports = isIndex;\n","/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\nmodule.exports = isKeyable;\n","var coreJsData = require('./_coreJsData');\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\nmodule.exports = isMasked;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\nmodule.exports = isPrototype;\n","/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n}\n\nmodule.exports = listCacheClear;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype;\n\n/** Built-in value references. */\nvar splice = arrayProto.splice;\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n}\n\nmodule.exports = listCacheDelete;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\nmodule.exports = listCacheGet;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\nmodule.exports = listCacheHas;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\nmodule.exports = listCacheSet;\n","var Hash = require('./_Hash'),\n ListCache = require('./_ListCache'),\n Map = require('./_Map');\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\nmodule.exports = mapCacheClear;\n","var getMapData = require('./_getMapData');\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = mapCacheDelete;\n","var getMapData = require('./_getMapData');\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\nmodule.exports = mapCacheGet;\n","var getMapData = require('./_getMapData');\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\nmodule.exports = mapCacheHas;\n","var getMapData = require('./_getMapData');\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n}\n\nmodule.exports = mapCacheSet;\n","/**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\nfunction mapToArray(map) {\n var index = -1,\n result = Array(map.size);\n\n map.forEach(function(value, key) {\n result[++index] = [key, value];\n });\n return result;\n}\n\nmodule.exports = mapToArray;\n","var getNative = require('./_getNative');\n\n/* Built-in method references that are verified to be native. */\nvar nativeCreate = getNative(Object, 'create');\n\nmodule.exports = nativeCreate;\n","var overArg = require('./_overArg');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeKeys = overArg(Object.keys, Object);\n\nmodule.exports = nativeKeys;\n","/**\n * This function is like\n * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * except that it includes inherited enumerable properties.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction nativeKeysIn(object) {\n var result = [];\n if (object != null) {\n for (var key in Object(object)) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = nativeKeysIn;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n try {\n // Use `util.types` for Node.js 10+.\n var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n if (types) {\n return types;\n }\n\n // Legacy `process.binding('util')` for Node.js < 10.\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n}());\n\nmodule.exports = nodeUtil;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n","/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\nmodule.exports = overArg;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n","/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\nfunction setCacheAdd(value) {\n this.__data__.set(value, HASH_UNDEFINED);\n return this;\n}\n\nmodule.exports = setCacheAdd;\n","/**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\nfunction setCacheHas(value) {\n return this.__data__.has(value);\n}\n\nmodule.exports = setCacheHas;\n","/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\nfunction setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n}\n\nmodule.exports = setToArray;\n","var ListCache = require('./_ListCache');\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}\n\nmodule.exports = stackClear;\n","/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n var data = this.__data__,\n result = data['delete'](key);\n\n this.size = data.size;\n return result;\n}\n\nmodule.exports = stackDelete;\n","/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n return this.__data__.get(key);\n}\n\nmodule.exports = stackGet;\n","/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n return this.__data__.has(key);\n}\n\nmodule.exports = stackHas;\n","var ListCache = require('./_ListCache'),\n Map = require('./_Map'),\n MapCache = require('./_MapCache');\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n var data = this.__data__;\n if (data instanceof ListCache) {\n var pairs = data.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n this.size = ++data.size;\n return this;\n }\n data = this.__data__ = new MapCache(pairs);\n }\n data.set(key, value);\n this.size = data.size;\n return this;\n}\n\nmodule.exports = stackSet;\n","/** Used for built-in method references. */\nvar funcProto = Function.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\nmodule.exports = toSource;\n","var baseClone = require('./_baseClone');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_SYMBOLS_FLAG = 4;\n\n/**\n * This method is like `_.clone` except that it recursively clones `value`.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Lang\n * @param {*} value The value to recursively clone.\n * @returns {*} Returns the deep cloned value.\n * @see _.clone\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var deep = _.cloneDeep(objects);\n * console.log(deep[0] === objects[0]);\n * // => false\n */\nfunction cloneDeep(value) {\n return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);\n}\n\nmodule.exports = cloneDeep;\n","/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\nmodule.exports = eq;\n","var baseIsArguments = require('./_baseIsArguments'),\n isObjectLike = require('./isObjectLike');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n};\n\nmodule.exports = isArguments;\n","/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\nmodule.exports = isArray;\n","var isFunction = require('./isFunction'),\n isLength = require('./isLength');\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\nmodule.exports = isArrayLike;\n","var root = require('./_root'),\n stubFalse = require('./stubFalse');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\nmodule.exports = isBuffer;\n","var baseIsEqual = require('./_baseIsEqual');\n\n/**\n * Performs a deep comparison between two values to determine if they are\n * equivalent.\n *\n * **Note:** This method supports comparing arrays, array buffers, booleans,\n * date objects, error objects, maps, numbers, `Object` objects, regexes,\n * sets, strings, symbols, and typed arrays. `Object` objects are compared\n * by their own, not inherited, enumerable properties. Functions and DOM\n * nodes are compared by strict equality, i.e. `===`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.isEqual(object, other);\n * // => true\n *\n * object === other;\n * // => false\n */\nfunction isEqual(value, other) {\n return baseIsEqual(value, other);\n}\n\nmodule.exports = isEqual;\n","var baseGetTag = require('./_baseGetTag'),\n isObject = require('./isObject');\n\n/** `Object#toString` result references. */\nvar asyncTag = '[object AsyncFunction]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n proxyTag = '[object Proxy]';\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\nmodule.exports = isFunction;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\nmodule.exports = isLength;\n","var baseIsMap = require('./_baseIsMap'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsMap = nodeUtil && nodeUtil.isMap;\n\n/**\n * Checks if `value` is classified as a `Map` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n * @example\n *\n * _.isMap(new Map);\n * // => true\n *\n * _.isMap(new WeakMap);\n * // => false\n */\nvar isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;\n\nmodule.exports = isMap;\n","/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n","var baseIsSet = require('./_baseIsSet'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsSet = nodeUtil && nodeUtil.isSet;\n\n/**\n * Checks if `value` is classified as a `Set` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n * @example\n *\n * _.isSet(new Set);\n * // => true\n *\n * _.isSet(new WeakSet);\n * // => false\n */\nvar isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;\n\nmodule.exports = isSet;\n","var baseIsTypedArray = require('./_baseIsTypedArray'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\nmodule.exports = isTypedArray;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeys = require('./_baseKeys'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\nmodule.exports = keys;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeysIn = require('./_baseKeysIn'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\nfunction keysIn(object) {\n return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n}\n\nmodule.exports = keysIn;\n","/**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\nfunction stubArray() {\n return [];\n}\n\nmodule.exports = stubArray;\n","/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n return false;\n}\n\nmodule.exports = stubFalse;\n","import type { WebLayoutSnapshot } from \"@openfin/core-web\";\nimport type { Settings } from \"../shapes/setting-shapes\";\n\n/**\n * Fetches the settings for the application.\n * @returns The settings for the application.\n */\nexport async function getSettings(): Promise {\n\tconst settings = await getManifestSettings();\n\tif (settings === undefined) {\n\t\tconsole.error(\n\t\t\t\"Unable to run the example as settings are required and we fetch them from the link web manifest from the html page that is being served. It should exist in the customSettings section of the web manifest.\"\n\t\t);\n\t}\n\treturn settings;\n}\n\n/**\n * Returns a default layout from the settings if provided.\n * @returns The default layout from the settings.\n */\nexport async function getDefaultLayout(): Promise {\n\tconst settings = await getSettings();\n\tif (settings?.platform?.layout?.defaultLayout === undefined) {\n\t\tconsole.error(\n\t\t\t\"Unable to run the example as without a layout being defined. Please ensure that settings have been provided in the web manifest.\"\n\t\t);\n\t\treturn;\n\t}\n\tif (typeof settings.platform.layout.defaultLayout === \"string\") {\n\t\tconst layoutResponse = await fetch(settings.platform.layout.defaultLayout);\n\t\tconst layoutJson = (await layoutResponse.json()) as WebLayoutSnapshot;\n\t\treturn layoutJson;\n\t}\n\treturn settings.platform.layout.defaultLayout;\n}\n\n/**\n * Returns a default layout from the settings if provided.\n * @returns The default layout from the settings.\n */\nexport async function getSecondLayout(): Promise {\n\tconst settings = await getSettings();\n\tif (settings?.platform?.layout?.secondLayout === undefined) {\n\t\tconsole.error(\n\t\t\t\"Unable to run the example as without a layout being defined. Please ensure that settings have been provided in the web manifest.\"\n\t\t);\n\t\treturn;\n\t}\n\tif (typeof settings.platform.layout.secondLayout === \"string\") {\n\t\tconst layoutResponse = await fetch(settings.platform.layout.secondLayout);\n\t\tconst layoutJson = (await layoutResponse.json()) as WebLayoutSnapshot;\n\t\treturn layoutJson;\n\t}\n\treturn settings.platform.layout.secondLayout;\n}\n/**\n * Returns the settings from the manifest file.\n * @returns customSettings for this example\n */\nasync function getManifestSettings(): Promise {\n\t// Get the manifest link\n\tconst link = document.querySelector('link[rel=\"manifest\"]');\n\tif (link !== null) {\n\t\tconst manifestResponse = await fetch(link.href);\n\t\tconst manifestJson = (await manifestResponse.json()) as { custom_settings: Settings };\n\t\treturn manifestJson.custom_settings;\n\t}\n}\n","export { default as v1 } from './v1.js';\nexport { default as v3 } from './v3.js';\nexport { default as v4 } from './v4.js';\nexport { default as v5 } from './v5.js';\nexport { default as NIL } from './nil.js';\nexport { default as version } from './version.js';\nexport { default as validate } from './validate.js';\nexport { default as stringify } from './stringify.js';\nexport { default as parse } from './parse.js';","/*\n * Browser-compatible JavaScript MD5\n *\n * Modification of JavaScript MD5\n * https://github.com/blueimp/JavaScript-MD5\n *\n * Copyright 2011, Sebastian Tschan\n * https://blueimp.net\n *\n * Licensed under the MIT license:\n * https://opensource.org/licenses/MIT\n *\n * Based on\n * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message\n * Digest Algorithm, as defined in RFC 1321.\n * Version 2.2 Copyright (C) Paul Johnston 1999 - 2009\n * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet\n * Distributed under the BSD License\n * See http://pajhome.org.uk/crypt/md5 for more info.\n */\nfunction md5(bytes) {\n if (typeof bytes === 'string') {\n var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape\n\n bytes = new Uint8Array(msg.length);\n\n for (var i = 0; i < msg.length; ++i) {\n bytes[i] = msg.charCodeAt(i);\n }\n }\n\n return md5ToHexEncodedArray(wordsToMd5(bytesToWords(bytes), bytes.length * 8));\n}\n/*\n * Convert an array of little-endian words to an array of bytes\n */\n\n\nfunction md5ToHexEncodedArray(input) {\n var output = [];\n var length32 = input.length * 32;\n var hexTab = '0123456789abcdef';\n\n for (var i = 0; i < length32; i += 8) {\n var x = input[i >> 5] >>> i % 32 & 0xff;\n var hex = parseInt(hexTab.charAt(x >>> 4 & 0x0f) + hexTab.charAt(x & 0x0f), 16);\n output.push(hex);\n }\n\n return output;\n}\n/**\n * Calculate output length with padding and bit length\n */\n\n\nfunction getOutputLength(inputLength8) {\n return (inputLength8 + 64 >>> 9 << 4) + 14 + 1;\n}\n/*\n * Calculate the MD5 of an array of little-endian words, and a bit length.\n */\n\n\nfunction wordsToMd5(x, len) {\n /* append padding */\n x[len >> 5] |= 0x80 << len % 32;\n x[getOutputLength(len) - 1] = len;\n var a = 1732584193;\n var b = -271733879;\n var c = -1732584194;\n var d = 271733878;\n\n for (var i = 0; i < x.length; i += 16) {\n var olda = a;\n var oldb = b;\n var oldc = c;\n var oldd = d;\n a = md5ff(a, b, c, d, x[i], 7, -680876936);\n d = md5ff(d, a, b, c, x[i + 1], 12, -389564586);\n c = md5ff(c, d, a, b, x[i + 2], 17, 606105819);\n b = md5ff(b, c, d, a, x[i + 3], 22, -1044525330);\n a = md5ff(a, b, c, d, x[i + 4], 7, -176418897);\n d = md5ff(d, a, b, c, x[i + 5], 12, 1200080426);\n c = md5ff(c, d, a, b, x[i + 6], 17, -1473231341);\n b = md5ff(b, c, d, a, x[i + 7], 22, -45705983);\n a = md5ff(a, b, c, d, x[i + 8], 7, 1770035416);\n d = md5ff(d, a, b, c, x[i + 9], 12, -1958414417);\n c = md5ff(c, d, a, b, x[i + 10], 17, -42063);\n b = md5ff(b, c, d, a, x[i + 11], 22, -1990404162);\n a = md5ff(a, b, c, d, x[i + 12], 7, 1804603682);\n d = md5ff(d, a, b, c, x[i + 13], 12, -40341101);\n c = md5ff(c, d, a, b, x[i + 14], 17, -1502002290);\n b = md5ff(b, c, d, a, x[i + 15], 22, 1236535329);\n a = md5gg(a, b, c, d, x[i + 1], 5, -165796510);\n d = md5gg(d, a, b, c, x[i + 6], 9, -1069501632);\n c = md5gg(c, d, a, b, x[i + 11], 14, 643717713);\n b = md5gg(b, c, d, a, x[i], 20, -373897302);\n a = md5gg(a, b, c, d, x[i + 5], 5, -701558691);\n d = md5gg(d, a, b, c, x[i + 10], 9, 38016083);\n c = md5gg(c, d, a, b, x[i + 15], 14, -660478335);\n b = md5gg(b, c, d, a, x[i + 4], 20, -405537848);\n a = md5gg(a, b, c, d, x[i + 9], 5, 568446438);\n d = md5gg(d, a, b, c, x[i + 14], 9, -1019803690);\n c = md5gg(c, d, a, b, x[i + 3], 14, -187363961);\n b = md5gg(b, c, d, a, x[i + 8], 20, 1163531501);\n a = md5gg(a, b, c, d, x[i + 13], 5, -1444681467);\n d = md5gg(d, a, b, c, x[i + 2], 9, -51403784);\n c = md5gg(c, d, a, b, x[i + 7], 14, 1735328473);\n b = md5gg(b, c, d, a, x[i + 12], 20, -1926607734);\n a = md5hh(a, b, c, d, x[i + 5], 4, -378558);\n d = md5hh(d, a, b, c, x[i + 8], 11, -2022574463);\n c = md5hh(c, d, a, b, x[i + 11], 16, 1839030562);\n b = md5hh(b, c, d, a, x[i + 14], 23, -35309556);\n a = md5hh(a, b, c, d, x[i + 1], 4, -1530992060);\n d = md5hh(d, a, b, c, x[i + 4], 11, 1272893353);\n c = md5hh(c, d, a, b, x[i + 7], 16, -155497632);\n b = md5hh(b, c, d, a, x[i + 10], 23, -1094730640);\n a = md5hh(a, b, c, d, x[i + 13], 4, 681279174);\n d = md5hh(d, a, b, c, x[i], 11, -358537222);\n c = md5hh(c, d, a, b, x[i + 3], 16, -722521979);\n b = md5hh(b, c, d, a, x[i + 6], 23, 76029189);\n a = md5hh(a, b, c, d, x[i + 9], 4, -640364487);\n d = md5hh(d, a, b, c, x[i + 12], 11, -421815835);\n c = md5hh(c, d, a, b, x[i + 15], 16, 530742520);\n b = md5hh(b, c, d, a, x[i + 2], 23, -995338651);\n a = md5ii(a, b, c, d, x[i], 6, -198630844);\n d = md5ii(d, a, b, c, x[i + 7], 10, 1126891415);\n c = md5ii(c, d, a, b, x[i + 14], 15, -1416354905);\n b = md5ii(b, c, d, a, x[i + 5], 21, -57434055);\n a = md5ii(a, b, c, d, x[i + 12], 6, 1700485571);\n d = md5ii(d, a, b, c, x[i + 3], 10, -1894986606);\n c = md5ii(c, d, a, b, x[i + 10], 15, -1051523);\n b = md5ii(b, c, d, a, x[i + 1], 21, -2054922799);\n a = md5ii(a, b, c, d, x[i + 8], 6, 1873313359);\n d = md5ii(d, a, b, c, x[i + 15], 10, -30611744);\n c = md5ii(c, d, a, b, x[i + 6], 15, -1560198380);\n b = md5ii(b, c, d, a, x[i + 13], 21, 1309151649);\n a = md5ii(a, b, c, d, x[i + 4], 6, -145523070);\n d = md5ii(d, a, b, c, x[i + 11], 10, -1120210379);\n c = md5ii(c, d, a, b, x[i + 2], 15, 718787259);\n b = md5ii(b, c, d, a, x[i + 9], 21, -343485551);\n a = safeAdd(a, olda);\n b = safeAdd(b, oldb);\n c = safeAdd(c, oldc);\n d = safeAdd(d, oldd);\n }\n\n return [a, b, c, d];\n}\n/*\n * Convert an array bytes to an array of little-endian words\n * Characters >255 have their high-byte silently ignored.\n */\n\n\nfunction bytesToWords(input) {\n if (input.length === 0) {\n return [];\n }\n\n var length8 = input.length * 8;\n var output = new Uint32Array(getOutputLength(length8));\n\n for (var i = 0; i < length8; i += 8) {\n output[i >> 5] |= (input[i / 8] & 0xff) << i % 32;\n }\n\n return output;\n}\n/*\n * Add integers, wrapping at 2^32. This uses 16-bit operations internally\n * to work around bugs in some JS interpreters.\n */\n\n\nfunction safeAdd(x, y) {\n var lsw = (x & 0xffff) + (y & 0xffff);\n var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n return msw << 16 | lsw & 0xffff;\n}\n/*\n * Bitwise rotate a 32-bit number to the left.\n */\n\n\nfunction bitRotateLeft(num, cnt) {\n return num << cnt | num >>> 32 - cnt;\n}\n/*\n * These functions implement the four basic operations the algorithm uses.\n */\n\n\nfunction md5cmn(q, a, b, x, s, t) {\n return safeAdd(bitRotateLeft(safeAdd(safeAdd(a, q), safeAdd(x, t)), s), b);\n}\n\nfunction md5ff(a, b, c, d, x, s, t) {\n return md5cmn(b & c | ~b & d, a, b, x, s, t);\n}\n\nfunction md5gg(a, b, c, d, x, s, t) {\n return md5cmn(b & d | c & ~d, a, b, x, s, t);\n}\n\nfunction md5hh(a, b, c, d, x, s, t) {\n return md5cmn(b ^ c ^ d, a, b, x, s, t);\n}\n\nfunction md5ii(a, b, c, d, x, s, t) {\n return md5cmn(c ^ (b | ~d), a, b, x, s, t);\n}\n\nexport default md5;","export default '00000000-0000-0000-0000-000000000000';","import validate from './validate.js';\n\nfunction parse(uuid) {\n if (!validate(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n var v;\n var arr = new Uint8Array(16); // Parse ########-....-....-....-............\n\n arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24;\n arr[1] = v >>> 16 & 0xff;\n arr[2] = v >>> 8 & 0xff;\n arr[3] = v & 0xff; // Parse ........-####-....-....-............\n\n arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8;\n arr[5] = v & 0xff; // Parse ........-....-####-....-............\n\n arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8;\n arr[7] = v & 0xff; // Parse ........-....-....-####-............\n\n arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8;\n arr[9] = v & 0xff; // Parse ........-....-....-....-############\n // (Use \"/\" to avoid 32-bit truncation when bit-shifting high-order bytes)\n\n arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff;\n arr[11] = v / 0x100000000 & 0xff;\n arr[12] = v >>> 24 & 0xff;\n arr[13] = v >>> 16 & 0xff;\n arr[14] = v >>> 8 & 0xff;\n arr[15] = v & 0xff;\n return arr;\n}\n\nexport default parse;","export default /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;","// Unique ID creation requires a high quality random # generator. In the browser we therefore\n// require the crypto API and do not support built-in fallback to lower quality random number\n// generators (like Math.random()).\nvar getRandomValues;\nvar rnds8 = new Uint8Array(16);\nexport default function rng() {\n // lazy load so that environments that need to polyfill have a chance to do so\n if (!getRandomValues) {\n // getRandomValues needs to be invoked in a context where \"this\" is a Crypto implementation. Also,\n // find the complete implementation of crypto (msCrypto) on IE11.\n getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto !== 'undefined' && typeof msCrypto.getRandomValues === 'function' && msCrypto.getRandomValues.bind(msCrypto);\n\n if (!getRandomValues) {\n throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');\n }\n }\n\n return getRandomValues(rnds8);\n}","// Adapted from Chris Veness' SHA1 code at\n// http://www.movable-type.co.uk/scripts/sha1.html\nfunction f(s, x, y, z) {\n switch (s) {\n case 0:\n return x & y ^ ~x & z;\n\n case 1:\n return x ^ y ^ z;\n\n case 2:\n return x & y ^ x & z ^ y & z;\n\n case 3:\n return x ^ y ^ z;\n }\n}\n\nfunction ROTL(x, n) {\n return x << n | x >>> 32 - n;\n}\n\nfunction sha1(bytes) {\n var K = [0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xca62c1d6];\n var H = [0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0];\n\n if (typeof bytes === 'string') {\n var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape\n\n bytes = [];\n\n for (var i = 0; i < msg.length; ++i) {\n bytes.push(msg.charCodeAt(i));\n }\n } else if (!Array.isArray(bytes)) {\n // Convert Array-like to Array\n bytes = Array.prototype.slice.call(bytes);\n }\n\n bytes.push(0x80);\n var l = bytes.length / 4 + 2;\n var N = Math.ceil(l / 16);\n var M = new Array(N);\n\n for (var _i = 0; _i < N; ++_i) {\n var arr = new Uint32Array(16);\n\n for (var j = 0; j < 16; ++j) {\n arr[j] = bytes[_i * 64 + j * 4] << 24 | bytes[_i * 64 + j * 4 + 1] << 16 | bytes[_i * 64 + j * 4 + 2] << 8 | bytes[_i * 64 + j * 4 + 3];\n }\n\n M[_i] = arr;\n }\n\n M[N - 1][14] = (bytes.length - 1) * 8 / Math.pow(2, 32);\n M[N - 1][14] = Math.floor(M[N - 1][14]);\n M[N - 1][15] = (bytes.length - 1) * 8 & 0xffffffff;\n\n for (var _i2 = 0; _i2 < N; ++_i2) {\n var W = new Uint32Array(80);\n\n for (var t = 0; t < 16; ++t) {\n W[t] = M[_i2][t];\n }\n\n for (var _t = 16; _t < 80; ++_t) {\n W[_t] = ROTL(W[_t - 3] ^ W[_t - 8] ^ W[_t - 14] ^ W[_t - 16], 1);\n }\n\n var a = H[0];\n var b = H[1];\n var c = H[2];\n var d = H[3];\n var e = H[4];\n\n for (var _t2 = 0; _t2 < 80; ++_t2) {\n var s = Math.floor(_t2 / 20);\n var T = ROTL(a, 5) + f(s, b, c, d) + e + K[s] + W[_t2] >>> 0;\n e = d;\n d = c;\n c = ROTL(b, 30) >>> 0;\n b = a;\n a = T;\n }\n\n H[0] = H[0] + a >>> 0;\n H[1] = H[1] + b >>> 0;\n H[2] = H[2] + c >>> 0;\n H[3] = H[3] + d >>> 0;\n H[4] = H[4] + e >>> 0;\n }\n\n return [H[0] >> 24 & 0xff, H[0] >> 16 & 0xff, H[0] >> 8 & 0xff, H[0] & 0xff, H[1] >> 24 & 0xff, H[1] >> 16 & 0xff, H[1] >> 8 & 0xff, H[1] & 0xff, H[2] >> 24 & 0xff, H[2] >> 16 & 0xff, H[2] >> 8 & 0xff, H[2] & 0xff, H[3] >> 24 & 0xff, H[3] >> 16 & 0xff, H[3] >> 8 & 0xff, H[3] & 0xff, H[4] >> 24 & 0xff, H[4] >> 16 & 0xff, H[4] >> 8 & 0xff, H[4] & 0xff];\n}\n\nexport default sha1;","import validate from './validate.js';\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\n\nvar byteToHex = [];\n\nfor (var i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).substr(1));\n}\n\nfunction stringify(arr) {\n var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n var uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!validate(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n\n return uuid;\n}\n\nexport default stringify;","import rng from './rng.js';\nimport stringify from './stringify.js'; // **`v1()` - Generate time-based UUID**\n//\n// Inspired by https://github.com/LiosK/UUID.js\n// and http://docs.python.org/library/uuid.html\n\nvar _nodeId;\n\nvar _clockseq; // Previous uuid creation time\n\n\nvar _lastMSecs = 0;\nvar _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details\n\nfunction v1(options, buf, offset) {\n var i = buf && offset || 0;\n var b = buf || new Array(16);\n options = options || {};\n var node = options.node || _nodeId;\n var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not\n // specified. We do this lazily to minimize issues related to insufficient\n // system entropy. See #189\n\n if (node == null || clockseq == null) {\n var seedBytes = options.random || (options.rng || rng)();\n\n if (node == null) {\n // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)\n node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]];\n }\n\n if (clockseq == null) {\n // Per 4.2.2, randomize (14 bit) clockseq\n clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;\n }\n } // UUID timestamps are 100 nano-second units since the Gregorian epoch,\n // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so\n // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'\n // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.\n\n\n var msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock\n // cycle to simulate higher resolution clock\n\n var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs)\n\n var dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression\n\n if (dt < 0 && options.clockseq === undefined) {\n clockseq = clockseq + 1 & 0x3fff;\n } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new\n // time interval\n\n\n if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {\n nsecs = 0;\n } // Per 4.2.1.2 Throw error if too many uuids are requested\n\n\n if (nsecs >= 10000) {\n throw new Error(\"uuid.v1(): Can't create more than 10M uuids/sec\");\n }\n\n _lastMSecs = msecs;\n _lastNSecs = nsecs;\n _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch\n\n msecs += 12219292800000; // `time_low`\n\n var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;\n b[i++] = tl >>> 24 & 0xff;\n b[i++] = tl >>> 16 & 0xff;\n b[i++] = tl >>> 8 & 0xff;\n b[i++] = tl & 0xff; // `time_mid`\n\n var tmh = msecs / 0x100000000 * 10000 & 0xfffffff;\n b[i++] = tmh >>> 8 & 0xff;\n b[i++] = tmh & 0xff; // `time_high_and_version`\n\n b[i++] = tmh >>> 24 & 0xf | 0x10; // include version\n\n b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)\n\n b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low`\n\n b[i++] = clockseq & 0xff; // `node`\n\n for (var n = 0; n < 6; ++n) {\n b[i + n] = node[n];\n }\n\n return buf || stringify(b);\n}\n\nexport default v1;","import v35 from './v35.js';\nimport md5 from './md5.js';\nvar v3 = v35('v3', 0x30, md5);\nexport default v3;","import stringify from './stringify.js';\nimport parse from './parse.js';\n\nfunction stringToBytes(str) {\n str = unescape(encodeURIComponent(str)); // UTF8 escape\n\n var bytes = [];\n\n for (var i = 0; i < str.length; ++i) {\n bytes.push(str.charCodeAt(i));\n }\n\n return bytes;\n}\n\nexport var DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8';\nexport var URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8';\nexport default function (name, version, hashfunc) {\n function generateUUID(value, namespace, buf, offset) {\n if (typeof value === 'string') {\n value = stringToBytes(value);\n }\n\n if (typeof namespace === 'string') {\n namespace = parse(namespace);\n }\n\n if (namespace.length !== 16) {\n throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)');\n } // Compute hash of namespace and value, Per 4.3\n // Future: Use spread syntax when supported on all platforms, e.g. `bytes =\n // hashfunc([...namespace, ... value])`\n\n\n var bytes = new Uint8Array(16 + value.length);\n bytes.set(namespace);\n bytes.set(value, namespace.length);\n bytes = hashfunc(bytes);\n bytes[6] = bytes[6] & 0x0f | version;\n bytes[8] = bytes[8] & 0x3f | 0x80;\n\n if (buf) {\n offset = offset || 0;\n\n for (var i = 0; i < 16; ++i) {\n buf[offset + i] = bytes[i];\n }\n\n return buf;\n }\n\n return stringify(bytes);\n } // Function#name is not settable on some platforms (#270)\n\n\n try {\n generateUUID.name = name; // eslint-disable-next-line no-empty\n } catch (err) {} // For CommonJS default export support\n\n\n generateUUID.DNS = DNS;\n generateUUID.URL = URL;\n return generateUUID;\n}","import rng from './rng.js';\nimport stringify from './stringify.js';\n\nfunction v4(options, buf, offset) {\n options = options || {};\n var rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n offset = offset || 0;\n\n for (var i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n\n return buf;\n }\n\n return stringify(rnds);\n}\n\nexport default v4;","import v35 from './v35.js';\nimport sha1 from './sha1.js';\nvar v5 = v35('v5', 0x50, sha1);\nexport default v5;","import REGEX from './regex.js';\n\nfunction validate(uuid) {\n return typeof uuid === 'string' && REGEX.test(uuid);\n}\n\nexport default validate;","import validate from './validate.js';\n\nfunction version(uuid) {\n if (!validate(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n return parseInt(uuid.substr(14, 1), 16);\n}\n\nexport default version;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = (module) => {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","/* eslint-disable jsdoc/require-param */\nimport type OpenFin from \"@openfin/core\";\nimport { type WebLayoutSnapshot, connect } from \"@openfin/core-web\";\nimport { getDefaultLayout, getSecondLayout, getSettings } from \"./platform/settings\";\nimport type { LayoutManager, LayoutManagerConstructor, LayoutManagerItem } from \"./shapes/layout-shapes\";\nimport type { Settings } from \"./shapes/setting-shapes\";\n\nlet PARENT_CONTAINER: HTMLElement | null;\n\n/**\n * Sets up panels if supported.\n * @param settings The settings to use.\n */\nfunction setupPanels(settings: Settings): void {\n\tif (settings?.platform?.layout?.panels?.left) {\n\t\tconst leftPanel = settings.platform.layout.panels.left;\n\t\tconst leftPanelFrameContainer = document.querySelector(`#${leftPanel.frameContainerId}`);\n\t\tconst leftPanelFrame = document.querySelector(`#${leftPanel.frameId}`);\n\t\tif (leftPanelFrameContainer === null) {\n\t\t\tconsole.error(\n\t\t\t\t`Please ensure the document has an element with the following id #${leftPanel.frameContainerId} containing an iframe with an id of #${leftPanel.frameId} so that the layout can be applied.`\n\t\t\t);\n\t\t\treturn;\n\t\t}\n\t\tif (leftPanelFrame === null) {\n\t\t\tconsole.error(\n\t\t\t\t`Please ensure the document has an iframe with the following id #${leftPanel.frameId} so that the layout can be applied.`\n\t\t\t);\n\t\t\treturn;\n\t\t}\n\t\tleftPanelFrameContainer.classList.remove(\"hidden\");\n\t\tleftPanelFrame.src = leftPanel.url;\n\t\tconsole.log(`Panel ${leftPanel.frameId} has been setup with the url ${leftPanel.url}`);\n\t} else {\n\t\tconsole.log(\"No panels require setup.\");\n\t}\n}\n\n/**\n * Attach listeners to elements.\n */\nasync function attachListeners(): Promise {\n\tconst addLayoutBtn = document.querySelector(\"#add-layout\");\n\taddLayoutBtn?.addEventListener(\"click\", async () => {\n\t\tawait addLayout();\n\t});\n}\n\n/**\n * Attaches Listeners to Tab Click Events.\n * @param tabName the name of the tab to add the event to.\n */\nasync function attachTabListener(tabName: string): Promise {\n\tconst tabBtn = document.querySelector(`#${tabName}`);\n\ttabBtn?.addEventListener(\"click\", async () => {\n\t\tawait selectTab(tabName);\n\t});\n}\n\n/**\n * Creates a new tab in the tab row given a specific tab/layout name.\n */\nasync function createTabBtn(tabName: string): Promise {\n\tconst tabRow = document.querySelector(\"#tabs\");\n\tconst newTab = document.createElement(\"div\");\n\tnewTab.id = `tab-${tabName}`;\n\tnewTab.className = \"tab\";\n\tnewTab.style.display = \"block\";\n\tnewTab.append(document.createTextNode(`${tabName}`));\n\tconst closeBtn = document.createElement(\"span\");\n\tcloseBtn.className = \"close-btn\";\n\tcloseBtn.innerHTML = \"X\";\n\tcloseBtn.addEventListener(\"click\", async (e) => {\n\t\tawait removeTab(tabName);\n\t\te.stopPropagation();\n\t});\n\tnewTab.append(closeBtn);\n\tif (tabRow) {\n\t\ttabRow.append(newTab);\n\t\tif (document.querySelector(`#tab-${tabName}`)) {\n\t\t\tawait attachTabListener(newTab.id);\n\t\t\tawait selectTab(tabName);\n\t\t}\n\t}\n}\n\n/**\n * Makes a layout and tab active.\n */\nasync function selectTab(tabName: string, removedTabName?: string): Promise {\n\tconsole.log(`Tab ${tabName} selected`);\n\tlet actualName = tabName;\n\tif (tabName.includes(\"tab\")) {\n\t\tconst split = tabName.split(\"-\");\n\t\tactualName = split[1];\n\t}\n\tconst currentOrder = window.localStorage.getItem(\"order\");\n\tif (currentOrder !== \"\") {\n\t\tconst layoutsArr = currentOrder?.split(\",\");\n\t\tif (layoutsArr) {\n\t\t\tfor (const tab of layoutsArr) {\n\t\t\t\tif (actualName !== removedTabName) {\n\t\t\t\t\tif (tab === actualName) {\n\t\t\t\t\t\tawait showTab(tab);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tawait hideTab(tab);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n/**\n * Makes a layout and tab hidden.\n */\nasync function showTab(tabName: string): Promise {\n\tconsole.log(`Tab ${tabName} showing...`);\n\tconst currentTab = document.querySelector(`#${tabName}`);\n\tif (currentTab) {\n\t\tcurrentTab.style.display = \"block\";\n\t}\n}\n\n/**\n * Makes a layout and tab hidden.\n */\nasync function hideTab(tabName: string): Promise {\n\tconsole.log(`Tab ${tabName} hiding...`);\n\tconst currentTab = document.querySelector(`#${tabName}`);\n\tif (currentTab) {\n\t\tcurrentTab.style.display = \"none\";\n\t}\n}\n\n/**\n * Removes a layout & tab from the page.\n */\nasync function removeTab(tabName: string): Promise {\n\tconsole.log(`Removing Tab & Layout ${tabName}`);\n\tconst lm = window.fin?.Platform.Layout.getCurrentLayoutManagerSync();\n\tawait lm?.removeLayout({ layoutName: tabName } as OpenFin.LayoutIdentity);\n\tconst tabToRemove = document.querySelector(`#tab-${tabName}`);\n\ttabToRemove?.remove();\n\n\tconst currentOrder = window.localStorage.getItem(\"order\");\n\tif (currentOrder !== \"\") {\n\t\tconst layouts = currentOrder?.split(\",\");\n\t\tconst newOrder = layouts?.filter((e) => e !== tabName);\n\t\tif (newOrder && newOrder.length > 0) {\n\t\t\twindow.localStorage.setItem(\"order\", newOrder.toString());\n\t\t} else {\n\t\t\twindow.localStorage.setItem(\"order\", \"\");\n\t\t}\n\n\t\tif (newOrder) {\n\t\t\tif (newOrder.length > 0) {\n\t\t\t\tawait selectTab(newOrder[0], tabName);\n\t\t\t} else {\n\t\t\t\tconsole.log(\"There are no layouts loaded.\");\n\t\t\t\t// eslint-disable-next-line no-alert\n\t\t\t\talert(\"There are no layouts loaded. Please add one.\");\n\t\t\t}\n\t\t}\n\t}\n}\n\n/**\n * A Create function for layouts.\n * @param fin the fin object.\n * @param layoutName A string for the layout name.\n * @param layout LayoutOptions\n * @param order which position to display in\n */\nasync function createLayout(\n\tfin: OpenFin.Fin,\n\tlayoutName: string,\n\tlayout: OpenFin.LayoutOptions,\n\torder: number\n): Promise {\n\t// Create a new div container for the layout.\n\tconst container = document.createElement(\"div\");\n\tcontainer.id = layoutName;\n\tcontainer.className = \"col layout-container\";\n\tcontainer.style.display = order === 0 ? \"block\" : \"none\";\n\tPARENT_CONTAINER?.append(container);\n\n\t// Normally you can use state here, but just tracking the order of layouts in localStorage.\n\tconst currentOrder = window.localStorage.getItem(\"order\");\n\tlet newOrder = \"\";\n\tif (!currentOrder || currentOrder === \"\") {\n\t\tnewOrder = layoutName;\n\t} else {\n\t\tnewOrder = currentOrder?.concat(\",\", layoutName);\n\t}\n\twindow.localStorage.setItem(\"order\", newOrder);\n\n\t// Finally, call the Layout.create() function to apply the snapshot layout to the div we just created.\n\tawait fin.Platform.Layout.create({ layoutName, layout, container });\n}\n\n/**\n * MakeOverride assists in loading the Fin object before the applyLayoutSnapshot Manager call.\n * @param fin the fin object.\n * @param layoutContainerId the layout container id.\n * @returns a function call.\n */\nfunction makeOverride(fin: OpenFin.Fin, layoutContainerId: string) {\n\treturn function layoutManagerOverride(Base: LayoutManagerConstructor): LayoutManagerConstructor {\n\t\t/**\n\t\t * @class LayoutManagerBasic\n\t\t * This implementation is the fundamental override for Multiple Layouts in Web.\n\t\t */\n\t\treturn class LayoutManagerBasic extends Base implements LayoutManager {\n\t\t\tpublic layoutMapArray: LayoutManagerItem[] = [];\n\n\t\t\tpublic layoutContainer = document.querySelector(`#${layoutContainerId}`);\n\n\t\t\t/**\n\t\t\t * Override for applying multiple snapshots.\n\t\t\t * @param snapshot The layouts object containing the fixed set of available layouts.\n\t\t\t */\n\t\t\tpublic async applyLayoutSnapshot(snapshot: WebLayoutSnapshot): Promise {\n\t\t\t\tconsole.log(`[Apply Layout] Does this exist? ${Boolean(this.layoutContainer)}`);\n\t\t\t\tif (this.layoutContainer !== null && this.layoutContainer !== undefined) {\n\t\t\t\t\tfor (const [key, value] of Object.entries(snapshot.layouts)) {\n\t\t\t\t\t\tthis.layoutMapArray.push({ layoutName: key, layout: value, container: this.layoutContainer });\n\t\t\t\t\t}\n\t\t\t\t\tsetTimeout(\n\t\t\t\t\t\t() =>\n\t\t\t\t\t\t\tObject.entries(snapshot.layouts).map(async ([layoutName, layout], i) => {\n\t\t\t\t\t\t\t\tawait createLayout(fin, layoutName, layout, i);\n\t\t\t\t\t\t\t\tawait createTabBtn(layoutName);\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t1000\n\t\t\t\t\t);\n\t\t\t\t\tconsole.log(\"[Apply Layout] Layouts loaded\");\n\t\t\t\t\tconsole.log(`[Apply Layout] Layouts are: ${JSON.stringify(this.layoutMapArray)}`);\n\t\t\t\t\twindow.localStorage.setItem(\"currentLayout\", JSON.stringify(this.layoutMapArray));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Remove Layout - You guessed it, it removes a layout from the existing array of layouts.\n\t\t\t * @param id The name of the layout you want removed.\n\t\t\t */\n\t\t\tpublic async removeLayout(id: OpenFin.LayoutIdentity): Promise {\n\t\t\t\tconst index = this.layoutMapArray.findIndex((x) => x.layoutName === id.layoutName);\n\t\t\t\tconsole.log(`[LM Override] Removing Layout ${id.layoutName}`);\n\t\t\t\tconsole.log(`[LM Override] Found layout at index ${index}`);\n\t\t\t\tawait removeThisLayout(id.layoutName);\n\t\t\t}\n\t\t};\n\t};\n}\n\n/**\n * Saves the list of layout items to Local Storage.\n * @param updatedLayoutContents List of Layouts to save.\n */\nexport async function saveLayout(updatedLayoutContents: LayoutManagerItem[]): Promise {\n\twindow.localStorage.setItem(\"currentLayout\", JSON.stringify(updatedLayoutContents));\n}\n\n/**\n *\tReads a list of layouts from Local Storage.\n *\t@returns List of Layouts.\n */\nexport function readLayouts(): LayoutManagerItem[] {\n\tconst currentLayouts = window.localStorage.getItem(\"currentLayout\");\n\tif (currentLayouts) {\n\t\treturn JSON.parse(currentLayouts) as LayoutManagerItem[];\n\t}\n\n\treturn [];\n}\n\n/**\n * Adds another layout.\n */\nexport async function addLayout(): Promise {\n\tconst secondLayoutToAdd = await getSecondLayout();\n\tconsole.log(\"[Add Layout] Grabbing Secondary layout file...\");\n\tif (secondLayoutToAdd !== undefined) {\n\t\tconst lm = window.fin?.Platform.Layout.getCurrentLayoutManagerSync();\n\t\tconsole.log(\"[Add Layout] Adding layout\");\n\t\tawait lm?.applyLayoutSnapshot(secondLayoutToAdd);\n\t} else {\n\t\tconsole.log(\"[Add Layout] Error adding Layout. No Secondary Layout exists.\");\n\t}\n\tconst addBtn = document.querySelector(\"#add-layout\");\n\tif (addBtn) {\n\t\taddBtn.setAttribute(\"disabled\", \"disabled\");\n\t}\n}\n\n/**\n * Click function to remove a layout by name.\n * @param layoutName the name of a layout.\n */\nexport async function removeThisLayout(layoutName: string): Promise {\n\t// remove layout from state.\n\tconst layoutsBefore = readLayouts();\n\tlet layoutsRemoved: LayoutManagerItem[] = [];\n\tconst layoutNameElement = document.querySelector(`#${layoutName}`);\n\tif (layoutsBefore.length > 0 && layoutNameElement !== null) {\n\t\tconst idx = layoutsBefore.findIndex((x) => x.layoutName === layoutName);\n\t\tlayoutsRemoved = layoutsBefore.splice(idx, 1);\n\t\tconsole.log(`[Remove Layout] Removed this layout: ${JSON.stringify(layoutsRemoved)}`);\n\t\tawait saveLayout(layoutsBefore);\n\t\tconsole.log(`[Remove Layout] Layouts After Removal: ${JSON.stringify(layoutsBefore)}`);\n\t\tlayoutNameElement.remove();\n\t\tawait fin.Platform.Layout.destroy({ layoutName, uuid: fin.me.uuid, name: fin.me.name });\n\t\tif (layoutName === \"new\") {\n\t\t\tconst addBtn = document.querySelector(\"#add-layout\");\n\t\t\tif (addBtn) {\n\t\t\t\taddBtn.removeAttribute(\"disabled\");\n\t\t\t}\n\t\t}\n\t}\n}\n/**\n * Initializes the OpenFin Web Broker connection.\n */\nasync function init(): Promise {\n\t// Get the required settings\n\tconst settings = await getSettings();\n\t// Get the default layout\n\tconst layoutSnapshot = await getDefaultLayout();\n\n\tif (settings === undefined || layoutSnapshot === undefined) {\n\t\tconsole.error(\n\t\t\t\"Unable to run the sample as we have been unable to load the web manifest and it's settings from the currently running html page. Please ensure that the web manifest is being served and that it contains the custom_settings section.\"\n\t\t);\n\t\treturn;\n\t}\n\n\t// Get the dom element that should host the layout - This will be the top element holding the children iframes.\n\tPARENT_CONTAINER = document.querySelector(`#${settings.platform.layout.layoutContainerId}`);\n\n\tif (PARENT_CONTAINER === null) {\n\t\tconsole.error(\n\t\t\t`Please ensure the document has an element with the following id #${settings.platform.layout.layoutContainerId} so that the web-layout can be applied.`\n\t\t);\n\t\treturn;\n\t}\n\n\t// Connect to the OpenFin Web Broker and pass the default layout.\n\t// It is good practice to specify providerId even if content is explicitly specifying it for cases where\n\t// this provider uses our layout system and content uses inheritance. currentContextGroup\n\t// is useful for defaulting any client that uses inheritance through our layout system.\n\tconst fin = await connect({\n\t\toptions: {\n\t\t\tbrokerUrl: settings.platform.interop.brokerUrl,\n\t\t\tinteropConfig: {\n\t\t\t\tproviderId: settings.platform.interop.providerId,\n\t\t\t\tcurrentContextGroup: settings.platform.interop.defaultContextGroup\n\t\t\t}\n\t\t},\n\t\tconnectionInheritance: \"enabled\",\n\t\tplatform: { layoutSnapshot }\n\t});\n\twindow.fin = fin;\n\tif (fin) {\n\t\tconst layoutManagerOverride = makeOverride(fin, settings.platform.layout.layoutContainerId);\n\t\t// You may now use the `fin` object to initialize the broker and the layout.\n\t\tawait fin.Interop.init(settings.platform.interop.providerId);\n\t\t// Show the main container and hide the loading container\n\t\t// initialize the layout and pass it the dom element to bind to\n\t\tawait fin.Platform.Layout.init({ layoutManagerOverride, container: PARENT_CONTAINER });\n\t\t// setup panels not that everything has been initialized\n\t\tawait attachListeners();\n\t\tsetupPanels(settings);\n\t}\n}\n\ninit()\n\t.then(() => {\n\t\tconsole.log(\"Connected to the OpenFin Web Broker and layout has been applied.\");\n\t\treturn true;\n\t})\n\t.catch((err) => console.error(err));\n"],"names":[],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"provider.bundle.js","mappings":";;;;;;;;;;AAAa,MAAM,mBAAO,CAAC,qFAAoB,EAAE,mBAAO,CAAC,mDAAS,EAAE,mBAAO,CAAC,+DAAM,EAAE,mBAAO,CAAC,mDAAQ,EAAE,mBAAO,CAAC,gEAAkB,EAAE,mBAAO,CAAC,4DAAgB,EAAE,eAAe;;;;;;;;;;;;ACA9J,MAAM,mBAAO,CAAC,mDAAS,IAAI,mBAAO,CAAC,mDAAQ,IAAI,mBAAO,CAAC,gEAAkB,IAAI,mBAAO,CAAC,4DAAgB,IAAI,mBAAO,CAAC,+DAAM,EAAE,kBAAkB,EAAE,GAAG,wBAAwB,GAAG,sGAAsG,qBAAM,CAAC,qBAAM,iCAAiC,KAAK,KAAK,KAAK,MAAM,oBAAoB,WAAW,kBAAkB,kBAAkB,UAAU,SAAS,sCAAsC,SAAS,sFAAsF,mCAAmC,6BAA6B,GAAG,kCAAkC,6BAA6B,mDAAmD,0CAA0C,yDAAyD,iEAAiE,oFAAoF,2IAA2I,mDAAmD,kDAAkD,oFAAoF,4IAA4I,sDAAsD,sCAAsC,SAAS,sCAAsC,UAAU,QAAQ,eAAe,mNAAmN,UAAU,0BAA0B,SAAS,qBAAqB,SAAS,8BAA8B,sBAAsB,yiBAAyiB,QAAQ,SAAS,2EAA2E,6BAA6B,KAAK,IAAI,2DAA2D,SAAS,uDAAuD,0CAA0C,IAAI,sBAAsB,SAAS,4EAA4E,+EAA+E,iCAAiC,yBAAyB,sGAAsG,gBAAgB,iDAAiD,UAAU,OAAO,sBAAsB,QAAQ,yBAAyB,sBAAsB,kBAAkB,4CAA4C,iDAAiD,wBAAwB,OAAO,4CAA4C,QAAQ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AEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,2CAA2C,UAAU;AACrD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;ACrJA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEY;;AAEZ,eAAe,mBAAO,CAAC,wDAAW;AAClC,gBAAgB,mBAAO,CAAC,oDAAS;AACjC;AACA;AACA;AACA;;AAEA,cAAc;AACd,kBAAkB;AAClB,yBAAyB;;AAEzB;AACA,kBAAkB;;AAElB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,kBAAkB,YAAY;AAC9B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA,wCAAwC,SAAS;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;;AAEA;AACA;AACA,cAAc,iBAAiB;AAC/B;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,iDAAiD,EAAE;AACnD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C;AAC1C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA,yBAAyB,eAAe;AACxC;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,yBAAyB,QAAQ;AACjC;AACA,sBAAsB,eAAe;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc,YAAY;AAC1B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB,sBAAsB;AACxC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,mBAAmB;AACnB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA,oBAAoB,SAAS;AAC7B;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA,qBAAqB,WAAW,GAAG,IAAI;AACvC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA,gBAAgB,WAAW,GAAG,IAAI,KAAK,aAAa;AACpD;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;;AAEA;AACA,GAAG;AACH;AACA;AACA,mBAAmB,KAAK,mDAAmD,cAAc;AACzF,GAAG;AACH;AACA;AACA,+BAA+B,IAAI;AACnC;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,MAAM,aAAa,SAAS;AACtD;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,SAAS,gBAAgB;AACzB,cAAc,oBAAoB,EAAE,IAAI;AACxC;AACA,YAAY,gBAAgB,EAAE,IAAI;AAClC;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,GAAG,SAAS,GAAG,KAAK,qBAAqB,EAAE,EAAE;AACpE,QAAQ;AACR,yBAAyB,GAAG,KAAK,yBAAyB,EAAE,EAAE;AAC9D,mBAAmB,yBAAyB,EAAE,EAAE;AAChD;AACA,MAAM;AACN,oBAAoB,IAAI,EAAE,GAAG,SAAS,IAAI,EAAE,EAAE;AAC9C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,0CAA0C,cAAc,SAAS,OAAO;AACxE;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,kBAAkB,YAAY;AAC9B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,kBAAkB,gBAAgB;AAClC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,kBAAkB,gBAAgB;AAClC;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,cAAc,YAAY;AAC1B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,QAAQ;AAC1B;AACA,oBAAoB,QAAQ;AAC5B;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;;;;;ACzjEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEa;;AAEb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB;;AAEnB;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,sBAAsB;AACxC;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA,eAAe;AACf;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA,oBAAoB,SAAS;AAC7B;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;;AAEA,kCAAkC,QAAQ;AAC1C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oBAAoB,iBAAiB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,QAAQ;AACR;AACA,uCAAuC,QAAQ;AAC/C;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,OAAO;AACzB;AACA;AACA;;AAEA;AACA,SAAS,yBAAyB;AAClC;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,gBAAgB;AAClC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,8DAA8D,YAAY;AAC1E;AACA,8DAA8D,YAAY;AAC1E;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,IAAI;AACJ;AACA;AACA;A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B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC1BA,WAAW,mBAAO,CAAC,mDAAS;;AAE5B;AACA;;AAEA;;;;;;;;;;;ACLA,WAAW,mBAAO,CAAC,mDAAS;;AAE5B;AACA;;AAEA;;;;;;;;;;;ACLA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,WAAW,mBAAO,CAAC,mDAAS;;AAE5B;AACA;;AAEA;;;;;;;;;;;ACNA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,UAAU;AACrB,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACrBA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,UAAU;AACrB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACxBA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,kBAAkB,mBAAO,CAAC,+DAAe;AACzC,cAAc,mBAAO,CAAC,uDAAW;AACjC,eAAe,mBAAO,CAAC,yDAAY;AACnC,cAAc,mBAAO,CAAC,yDAAY;AAClC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,SAAS;AACpB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AChDA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACnBA;AAC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;;AAEA;AACA;AACA;AACA;AACA,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;;;;;;;;;;ACrKA,eAAe,mBAAO,CAAC,yDAAY;;AAEnC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;;;;;;;;;;AC7BA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,cAAc,mBAAO,CAAC,uDAAW;;AAEjC;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACnBA,aAAa,mBAAO,CAAC,uDAAW;AAChC,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,qBAAqB,mBAAO,CAAC,uEAAmB;;AAEhD;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC3BA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA,sBAAsB,mBAAO,CAAC,yEAAoB;AAClD,mBAAmB,mBAAO,CAAC,iEA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AAO,CAAC,2DAAa;;AAEpC;AACA;AACA;AACA;AACA,oCAAoC;;AAEpC;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC9CA,aAAa,mBAAO,CAAC,uDAAW;AAChC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,eAAe,mBAAO,CAAC,yDAAY;AACnC,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC3DA,kBAAkB,mBAAO,CAAC,iEAAgB;AAC1C,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC7BA,eAAe,mBAAO,CAAC,yDAAY;AACnC,kBAAkB,mBAAO,CAAC,iEAAgB;AAC1C,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AAC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,6DAAc;;AAEtC;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,IAAI;AACJ,CAAC;;AAED;;;;;;;;;;;ACVA,eAAe,mBAAO,CAAC,2DAAa;AACpC,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACnFA,aAAa,mBAAO,CAAC,uDAAW;AAChC,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,SAAS,mBAAO,CAAC,6CAAM;AACvB,kBAAkB,mBAAO,CAAC,iEAAgB;AAC1C,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC/GA,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACzFA;AACA,wBAAwB,qBAAM,gBAAgB,qBAAM,IAAI,qBAAM,sBAAsB,qBAAM;;AAE1F;;;;;;;;;;;ACHA,qBAAqB,mBAAO,CAAC,uEAAmB;AAChD,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,WAAW,mBAAO,CAAC,iDAAQ;;AAE3B;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACfA,qBAAqB,mBAAO,CAAC,uEAAmB;AAChD,mBAAmB,mBAAO,CAAC,mEAAiB;AAC5C,aAAa,mBAAO,CAAC,qDAAU;;AAE/B;AACA;AACA;A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jBA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACxBA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACdA,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACnBA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACZA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClCA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,GAAG;AAChB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;AClBA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACfA,mBAAmB,mBAAO,CAAC,mEAAiB;;AAE5C;AACA;AACA;AACA;AACA;AACA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A;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACnBA,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA,kBAAkB,KAA0B;;AAE5C;AACA,gCAAgC,QAAa;;AAE7C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ,CAAC;;AAED;;;;;;;;;;;AC7BA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACrBA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,aAAa,UAAU;AACvB;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACdA,iBAAiB,mBAAO,CAAC,+DAAe;;AAExC;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;ACRA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACbA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;;;;;;;;;;ACjBA,gBAAgB,mBAAO,CAAC,6DAAc;;AAEtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACdA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,GAAG;AAChB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACbA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACbA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,UAAU,mBAAO,CAAC,iDAAQ;AAC1B,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACjCA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;;;;;;;;;;;ACzBA,gBAAgB,mBAAO,CAAC,6DAAc;;AAEtC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,GAAG;AAChB;AACA;AACA;AACA,oBAAoB,QAAQ,IAAI,QAAQ;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,kBAAkB;AAClB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpCA,sBAAsB,mBAAO,CAAC,yEAAoB;AAClD,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA,8BAA8B,mBAAmB;AACjD;AACA;AACA;AACA;AACA;AACA,+CAA+C,mBAAmB;AAClE;AACA;AACA;;AAEA;;;;;;;;;;;ACnCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACzBA,iBAAiB,mBAAO,CAAC,6DAAc;AACvC,eAAe,mBAAO,CAAC,yDAAY;;AAEnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AChCA,WAAW,mBAAO,CAAC,mDAAS;AAC5B,gBAAgB,mBAAO,CAAC,2DAAa;;AAErC;AACA,kBAAkB,KAA0B;;AAE5C;AACA,gCAAgC,QAAa;;AAE7C;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACrCA,kBAAkB,mBAAO,CAAC,iEAAgB;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,kBAAkB;AAClB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClCA,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,eAAe,mBAAO,CAAC,yDAAY;;AAEnC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpCA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AClCA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC1BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC9BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC5BA,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC1BA,uBAAuB,mBAAO,CAAC,2EAAqB;AACpD,gBAAgB,mBAAO,CAAC,6DAAc;AACtC,eAAe,mBAAO,CAAC,2DAAa;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC1BA,oBAAoB,mBAAO,CAAC,qEAAkB;AAC9C,eAAe,mBAAO,CAAC,2DAAa;AACpC,kBAAkB,mBAAO,CAAC,+DAAe;;AAEzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpCA,oBAAoB,mBAAO,CAAC,qEAAkB;AAC9C,iBAAiB,mBAAO,CAAC,+DAAe;AACxC,kBAAkB,mBAAO,CAAC,+DAAe;;AAEzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AC/BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;;;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ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,kBAAkB,aAAa;AAC/B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,iEAAe,GAAG;;;;;;;;;;;;;;;ACtNlB,iEAAe,sCAAsC;;;;;;;;;;;;;;;;ACAhB;;AAErC;AACA,OAAO,wDAAQ;AACf;AACA;;AAEA;AACA,gCAAgC;;AAEhC;AACA;AACA;AACA,qBAAqB;;AAErB;AACA,qBAAqB;;AAErB;AACA,qBAAqB;;AAErB;AACA,qBAAqB;AACrB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,iEAAe,KAAK;;;;;;;;;;;;;;;AClCpB,iEAAe,cAAc,EAAE,UAAU,EAAE,eAAe,EAAE,gBAAgB,EAAE,UAAU,GAAG,yCAAyC;;;;;;;;;;;;;;;ACApI;AACA;AACA;AACA;AACA;AACe;AACf;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;AClBA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,mDAAmD;;AAEnD;;AAEA,oBAAoB,gBAAgB;AACpC;A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Q,CAAC,CAAC;IACvB,CAAC;AACF,CAAC;AAED,IAAI,EAAE;KACJ,IAAI,CAAC,GAAG,EAAE;IACV,OAAO,CAAC,GAAG,CAAC,kEAAkE,CAAC,CAAC;IAChF,OAAO,IAAI,CAAC;AACb,CAAC,CAAC;KACD,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC","sources":["webpack://openfin-web--web-layout/../../node_modules/@openfin/core-web/out/api-client.js","webpack://openfin-web--web-layout/../../node_modules/@openfin/core-web/out/main-8cad4070.js","webpack://openfin-web--web-layout/../../node_modules/@openfin/core-web/out/main-b14f67c9.js","webpack://openfin-web--web-layout/../../node_modules/base64-js/index.js","webpack://openfin-web--web-layout/../../node_modules/buffer/index.js","webpack://openfin-web--web-layout/../../node_modules/events/events.js","webpack://openfin-web--web-layout/../../node_modules/ieee754/index.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_DataView.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_Hash.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_ListCache.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_Map.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_MapCache.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_Promise.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_Set.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_SetCache.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_Stack.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_Symbol.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_Uint8Array.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_WeakMap.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_arrayEach.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_arrayFilter.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_arrayLikeKeys.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_arrayPush.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_arraySome.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_assignValue.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_assocIndexOf.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseAssign.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseAssignIn.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseAssignValue.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseClone.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseCreate.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseGetAllKeys.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseGetTag.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseIsArguments.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseIsEqual.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseIsEqualDeep.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseIsMap.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseIsNative.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseIsSet.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseIsTypedArray.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseKeys.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseKeysIn.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseTimes.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_baseUnary.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_cacheHas.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_cloneArrayBuffer.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_cloneBuffer.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_cloneDataView.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_cloneRegExp.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_cloneSymbol.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_cloneTypedArray.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_copyArray.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_copyObject.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_copySymbols.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_copySymbolsIn.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_coreJsData.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_defineProperty.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_equalArrays.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_equalByTag.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_equalObjects.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_freeGlobal.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_getAllKeys.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_getAllKeysIn.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_getMapData.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_getNative.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_getPrototype.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_getRawTag.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_getSymbols.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_getSymbolsIn.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_getTag.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_getValue.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_hashClear.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_hashDelete.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_hashGet.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_hashHas.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_hashSet.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_initCloneArray.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_initCloneByTag.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_initCloneObject.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_isIndex.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_isKeyable.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_isMasked.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_isPrototype.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_listCacheClear.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_listCacheDelete.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_listCacheGet.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_listCacheHas.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_listCacheSet.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_mapCacheClear.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_mapCacheDelete.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_mapCacheGet.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_mapCacheHas.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_mapCacheSet.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_mapToArray.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_nativeCreate.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_nativeKeys.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_nativeKeysIn.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_nodeUtil.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_objectToString.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_overArg.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_root.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_setCacheAdd.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_setCacheHas.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_setToArray.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_stackClear.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_stackDelete.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_stackGet.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_stackHas.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_stackSet.js","webpack://openfin-web--web-layout/../../node_modules/lodash/_toSource.js","webpack://openfin-web--web-layout/../../node_modules/lodash/cloneDeep.js","webpack://openfin-web--web-layout/../../node_modules/lodash/eq.js","webpack://openfin-web--web-layout/../../node_modules/lodash/isArguments.js","webpack://openfin-web--web-layout/../../node_modules/lodash/isArray.js","webpack://openfin-web--web-layout/../../node_modules/lodash/isArrayLike.js","webpack://openfin-web--web-layout/../../node_modules/lodash/isBuffer.js","webpack://openfin-web--web-layout/../../node_modules/lodash/isEqual.js","webpack://openfin-web--web-layout/../../node_modules/lodash/isFunction.js","webpack://openfin-web--web-layout/../../node_modules/lodash/isLength.js","webpack://openfin-web--web-layout/../../node_modules/lodash/isMap.js","webpack://openfin-web--web-layout/../../node_modules/lodash/isObject.js","webpack://openfin-web--web-layout/../../node_modules/lodash/isObjectLike.js","webpack://openfin-web--web-layout/../../node_modules/lodash/isSet.js","webpack://openfin-web--web-layout/../../node_modules/lodash/isTypedArray.js","webpack://openfin-web--web-layout/../../node_modules/lodash/keys.js","webpack://openfin-web--web-layout/../../node_modules/lodash/keysIn.js","webpack://openfin-web--web-layout/../../node_modules/lodash/stubArray.js","webpack://openfin-web--web-layout/../../node_modules/lodash/stubFalse.js","webpack://openfin-web--web-layout/./client/src/platform/settings.ts","webpack://openfin-web--web-layout/../../node_modules/uuid/dist/esm-browser/index.js","webpack://openfin-web--web-layout/../../node_modules/uuid/dist/esm-browser/md5.js","webpack://openfin-web--web-layout/../../node_modules/uuid/dist/esm-browser/nil.js","webpack://openfin-web--web-layout/../../node_modules/uuid/dist/esm-browser/parse.js","webpack://openfin-web--web-layout/../../node_modules/uuid/dist/esm-browser/regex.js","webpack://openfin-web--web-layout/../../node_modules/uuid/dist/esm-browser/rng.js","webpack://openfin-web--web-layout/../../node_modules/uuid/dist/esm-browser/sha1.js","webpack://openfin-web--web-layout/../../node_modules/uuid/dist/esm-browser/stringify.js","webpack://openfin-web--web-layout/../../node_modules/uuid/dist/esm-browser/v1.js","webpack://openfin-web--web-layout/../../node_modules/uuid/dist/esm-browser/v3.js","webpack://openfin-web--web-layout/../../node_modules/uuid/dist/esm-browser/v35.js","webpack://openfin-web--web-layout/../../node_modules/uuid/dist/esm-browser/v4.js","webpack://openfin-web--web-layout/../../node_modules/uuid/dist/esm-browser/v5.js","webpack://openfin-web--web-layout/../../node_modules/uuid/dist/esm-browser/validate.js","webpack://openfin-web--web-layout/../../node_modules/uuid/dist/esm-browser/version.js","webpack://openfin-web--web-layout/webpack/bootstrap","webpack://openfin-web--web-layout/webpack/runtime/define property getters","webpack://openfin-web--web-layout/webpack/runtime/global","webpack://openfin-web--web-layout/webpack/runtime/hasOwnProperty shorthand","webpack://openfin-web--web-layout/webpack/runtime/make namespace object","webpack://openfin-web--web-layout/webpack/runtime/node module decorator","webpack://openfin-web--web-layout/./client/src/provider.ts"],"sourcesContent":["\"use strict\";var e=require(\"./main-8cad4070.js\");require(\"buffer/\"),require(\"uuid\"),require(\"events\"),require(\"lodash/cloneDeep\"),require(\"lodash/isEqual\"),exports.connect=e.connect;\n","\"use strict\";var e=require(\"buffer/\"),t=require(\"events\"),n=require(\"lodash/cloneDeep\"),i=require(\"lodash/isEqual\"),r=require(\"uuid\");const o=(e,t)=>`${t}<${btoa(JSON.stringify(e))}>`;var s=\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof window?window:\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:{},a={},c={},d={},h={};async function l(e){const t=[];for(const n of e){const e=await n();t.push(e)}return t}Object.defineProperty(h,\"__esModule\",{value:!0}),h.promiseMapSerial=h.serial=h.promiseMap=h.promisify=void 0,h.promisify=function(e){return(...t)=>new Promise(((n,i)=>{e(...t,((e,t)=>e?i(e):n(t)))}))},h.promiseMap=async function(e,t){return Promise.all(e.map(t))},h.serial=l,h.promiseMapSerial=async function(e,t){return l(e.map(((e,n,i)=>()=>t(e,n,i))))};var u,p=s&&s.__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},w=s&&s.__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)};Object.defineProperty(d,\"__esModule\",{value:!0}),d.Reply=d.EmitterBase=d.Base=void 0;const y=h;class f{constructor(e){this.isNodeEnvironment=()=>\"node\"===this.wire.environment.type,this.isOpenFinEnvironment=()=>\"openfin\"===this.wire.environment.type,this.isBrowserEnvironment=()=>\"other\"===this.wire.environment.type,this.wire=e}get fin(){return this.wire.getFin()}get me(){return this.wire.me}}d.Base=f;d.EmitterBase=class extends f{constructor(e,t,...n){super(e),this.topic=t,u.set(this,void 0),this.eventNames=()=>this.hasEmitter()?this.getOrCreateEmitter().eventNames():[],this.emit=(e,t,...n)=>!!this.hasEmitter()&&this.getOrCreateEmitter().emit(e,t,...n),this.hasEmitter=()=>this.wire.eventAggregator.has(w(this,u,\"f\")),this.getOrCreateEmitter=()=>this.wire.eventAggregator.getOrCreate(w(this,u,\"f\")),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[],this.listenerCount=e=>this.hasEmitter()?this.getOrCreateEmitter().listenerCount(e):0,this.registerEventListener=async(e,t={},n,i)=>{const r={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e},o=this.getOrCreateEmitter();n(o);try{await this.wire.sendAction(\"subscribe-to-desktop-event\",r)}catch(e){throw i(o),this.deleteEmitterIfNothingRegistered(o),e}},this.deregisterEventListener=async(e,t={})=>{if(this.hasEmitter()){const n={...this.identity,timestamp:t.timestamp||Date.now(),topic:this.topic,type:e};await this.wire.sendAction(\"unsubscribe-to-desktop-event\",n).catch((()=>null));return this.getOrCreateEmitter()}return Promise.resolve()},p(this,u,[t,...n],\"f\"),this.listeners=e=>this.hasEmitter()?this.getOrCreateEmitter().listeners(e):[]}async on(e,t,n){return await this.registerEventListener(e,n,(n=>{n.on(e,t)}),(n=>{n.removeListener(e,t)})),this}async addListener(e,t,n){return this.on(e,t,n)}async once(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.once(e,i),n.once(e,t)}),(n=>{n.removeListener(e,i),n.removeListener(e,t)})),this}async prependListener(e,t,n){return await this.registerEventListener(e,n,(n=>{n.prependListener(e,t)}),(n=>{n.removeListener(e,t)})),this}async prependOnceListener(e,t,n){const i=()=>this.deregisterEventListener(e);return await this.registerEventListener(e,n,(n=>{n.prependOnceListener(e,t),n.once(e,i)}),(n=>{n.removeListener(e,t),n.removeListener(e,i)})),this}async removeListener(e,t,n){const i=await this.deregisterEventListener(e,n);return i&&(i.removeListener(e,t),this.deleteEmitterIfNothingRegistered(i)),this}async deregisterAllListeners(e){const t={...this.identity,type:e,topic:this.topic};if(this.hasEmitter()){const e=this.getOrCreateEmitter(),n=e.listenerCount(t.type),i=[];for(let e=0;enull)));return await Promise.all(i),e}}async removeAllListeners(e){const t=async e=>{const t=await this.deregisterAllListeners(e);t&&(t.removeAllListeners(e),this.deleteEmitterIfNothingRegistered(t))};if(e)await t(e);else if(this.hasEmitter()){const e=this.getOrCreateEmitter().eventNames();await(0,y.promiseMap)(e,t)}return this}deleteEmitterIfNothingRegistered(e){0===e.eventNames().length&&this.wire.eventAggregator.delete(w(this,u,\"f\"))}},u=new WeakMap;d.Reply=class{};var g={};Object.defineProperty(g,\"__esModule\",{value:!0});var m=g.RuntimeError=g.NotSupportedError=g.NotImplementedError=g.NoAckError=g.DuplicateCorrelationError=g.UnexpectedActionError=g.DisconnectedError=void 0;class v extends Error{constructor(e){super(`Expected websocket state OPEN but found ${e}`),this.readyState=e}}g.DisconnectedError=v;class C extends Error{}g.UnexpectedActionError=C;class b extends Error{}g.DuplicateCorrelationError=b;class I extends Error{}g.NoAckError=I;class E extends Error{}g.NotImplementedError=E;class x extends Error{}g.NotSupportedError=x;class A extends Error{constructor(e){const{message:t,name:n,stack:i,...r}=e;super(t),this.name=n||\"Error\",this.stack=i??this.toString(),Object.keys(r).forEach((e=>{this[e]=r[e]}))}}class P extends Error{static getCallSite(e=0){const t=Error.stackTraceLimit,n=e+1;Error.stackTraceLimit=t+n;const i=Error.prepareStackTrace;Error.prepareStackTrace=(e,t)=>t;const r=(new Error).stack?.slice(n)??[];return Error.prepareStackTrace=i,Error.stackTraceLimit=t,r}static prepareStackTrace(e,t){if(\"function\"==typeof Error.prepareStackTrace)return Error.prepareStackTrace(e,t);let n=\"\";n+=e.name||\"Error\",n+=`: ${e.message||\"\"}`;for(const e of t)n+=`\\n at ${e.toString()}`;return n}constructor(e,t){const{reason:n,error:i}=e;super(n),this.name=\"RuntimeError\",i?.stack&&(this.cause=new A(i)),t&&(this.stack=P.prepareStackTrace(this,t))}}m=g.RuntimeError=P;var M={},_={},O={};Object.defineProperty(O,\"__esModule\",{value:!0}),O.validateIdentity=void 0,O.validateIdentity=function(e){let t;return\"object\"==typeof e&&\"string\"==typeof e.uuid||(t=\"Not a valid identity object\"),t};var S={},R={},F={},j={},k={},L={},T={};Object.defineProperty(T,\"__esModule\",{value:!0}),T.handleDeprecatedWarnings=void 0;var $;T.handleDeprecatedWarnings=e=>{(e.contentNavigation?.whitelist||e.contentNavigation?.blacklist||e.contentRedirect?.whitelist||e.contentRedirect?.blacklist)&&console.warn(\"The properties 'whitelist' and 'blacklist' have been marked as deprecated and will be removed in a future version. Please use 'allowlist' and 'denylist'.\")};var B={},G={};Object.defineProperty(G,\"__esModule\",{value:!0}),G.AsyncRetryableLazy=W=G.Lazy=void 0;var W=G.Lazy=class{constructor(e){this.producerFn=e}getValue(){return this.value||(this.value=this.producerFn()),this.value}};G.AsyncRetryableLazy=class{constructor(e){this.producerFn=e}async getValue(){return this.promise||(this.promise=this.producerFn().catch((e=>{throw delete this.promise,e}))),this.promise}};var H={};Object.defineProperty(H,\"__esModule\",{value:!0}),H.WebContents=void 0;const N=d;class D extends N.EmitterBase{constructor(e,t,n){super(e,n,t.uuid,t.name),this.identity=t,this.entityType=n}capturePage(e){return this.wire.sendAction(\"capture-page\",{options:e,...this.identity}).then((({payload:e})=>e.data))}executeJavaScript(e){return this.wire.sendAction(\"execute-javascript-in-window\",{...this.identity,code:e}).then((({payload:e})=>e.data))}getZoomLevel(){return this.wire.sendAction(\"get-zoom-level\",this.identity).then((({payload:e})=>e.data))}setZoomLevel(e){return this.wire.sendAction(\"set-zoom-level\",{...this.identity,level:e}).then((()=>{}))}navigate(e){return this.wire.sendAction(\"navigate-window\",{...this.identity,url:e}).then((()=>{}))}navigateBack(){return this.wire.sendAction(\"navigate-window-back\",{...this.identity}).then((()=>{}))}async navigateForward(){await this.wire.sendAction(\"navigate-window-forward\",{...this.identity})}stopNavigation(){return this.wire.sendAction(\"stop-window-navigation\",{...this.identity}).then((()=>{}))}reload(e=!1){return this.wire.sendAction(\"reload-window\",{ignoreCache:e,...this.identity}).then((()=>{}))}print(e={}){return this.wire.sendAction(\"print\",{...this.identity,options:e}).then((()=>{}))}findInPage(e,t){return this.wire.sendAction(\"find-in-page\",{...this.identity,searchTerm:e,options:t}).then((({payload:e})=>e.data))}stopFindInPage(e){return this.wire.sendAction(\"stop-find-in-page\",{...this.identity,action:e}).then((()=>{}))}getPrinters(){return this.wire.sendAction(\"get-printers\",{...this.identity}).then((({payload:e})=>e.data))}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){await this.wire.sendAction(\"focus-window\",{emitSynthFocused:e,...this.identity})}async showDeveloperTools(){await this.wire.sendAction(\"show-developer-tools\",this.identity)}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction(\"get-process-info\",this.identity);return e}async getSharedWorkers(){return this.wire.sendAction(\"get-shared-workers\",this.identity).then((({payload:e})=>e.data))}async inspectSharedWorker(){await this.wire.sendAction(\"inspect-shared-worker\",{...this.identity})}async inspectSharedWorkerById(e){await this.wire.sendAction(\"inspect-shared-worker-by-id\",{...this.identity,workerId:e})}async inspectServiceWorker(){await this.wire.sendAction(\"inspect-service-worker\",{...this.identity})}async showPopupWindow(e){if(this.wire.sendAction(`${this.entityType}-show-popup-window`,this.identity).catch((()=>{})),e?.onPopupReady){const t=async({popupName:t})=>{try{const n=this.fin.Window.wrapSync({uuid:this.fin.me.uuid,name:t});await e.onPopupReady(n)}catch(e){throw new Error(`Something went wrong during onPopupReady execution: ${e}`)}};await this.once(\"popup-ready\",t)}const{payload:t}=await this.wire.sendAction(\"try-create-popup-window\",{options:{...e,hasResultCallback:!!e?.onPopupResult,hasReadyCallback:!!e?.onPopupReady},...this.identity}),{data:{willOpen:n,options:i}}=t;n&&await this.fin.Window.create(i.initialOptions);if(e?.onPopupResult){const t=async t=>{await e.onPopupResult((e=>{const{name:t,uuid:n,result:i,data:r}=e,o={identity:{name:t,uuid:n},result:i};return r&&(o.data=r),o})(t))},n=async()=>{await this.removeListener(\"popup-result\",t)};await this.on(\"popup-result\",t),await this.once(\"popup-teardown\",n)}const{payload:r}=await this.wire.sendAction(\"show-popup-window\",{options:i,...this.identity});return r.data}}var U,V,z,K,q;function J(){return V||(V=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(function(){if($)return L;$=1,Object.defineProperty(L,\"__esModule\",{value:!0}),L.ViewModule=void 0;const e=d,t=O,n=J(),i=T;class r extends e.Base{async create(e){const{uuid:t}=this.wire.me;if(!e.name||\"string\"!=typeof e.name)throw new Error(\"Please provide a name property as a string in order to create a View.\");return(0,i.handleDeprecatedWarnings)(e),this.wire.environment.childViews?await this.wire.environment.createChildContent({entityType:\"view\",options:{...e,uuid:t}}):await this.wire.sendAction(\"create-view\",{...e,uuid:t}),this.wrapSync({uuid:t,name:e.name})}async wrap(e){this.wire.sendAction(\"view-wrap\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}wrapSync(e){this.wire.sendAction(\"view-wrap-sync\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.View(this.wire,e)}getCurrent(){if(this.wire.sendAction(\"view-get-current\").catch((e=>{})),!this.wire.me.isView)throw new Error(\"You are not in a View context\");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction(\"view-get-current-sync\").catch((e=>{})),!this.wire.me.isView)throw new Error(\"You are not in a View context\");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return L.ViewModule=r,L}(),e),n(function(){if(U)return B;var e;U=1,Object.defineProperty(B,\"__esModule\",{value:!0}),B.View=void 0;const t=g,n=G,i=H,r=ie();class o extends i.WebContents{constructor(i,o){super(i,o,\"view\"),this.identity=o,e.set(this,new n.Lazy((()=>this.fin.Platform.wrapSync(this.identity).getClient()))),this.attach=async e=>{await this.wire.sendAction(\"attach-view\",{target:e,...this.identity})},this.destroy=async()=>{await this.wire.sendAction(\"destroy-view\",{...this.identity})},this.show=async()=>{await this.wire.sendAction(\"show-view\",{...this.identity})},this.showAt=async(e,t={})=>{await this.wire.sendAction(\"show-view-at\",{bounds:e,...this.identity,options:t})},this.bringToFront=async()=>{await this.wire.sendAction(\"bring-view-to-front\",{...this.identity})},this.hide=async()=>{await this.wire.sendAction(\"hide-view\",{...this.identity})},this.setBounds=async e=>{await this.wire.sendAction(\"set-view-bounds\",{bounds:e,...this.identity})},this.getBounds=async()=>(await this.wire.sendAction(\"get-view-bounds\",{...this.identity})).payload.data,this.getInfo=async()=>(await this.wire.sendAction(\"get-view-info\",{...this.identity})).payload.data,this.getParentLayout=async()=>(this.wire.sendAction(\"view-get-parent-layout\",{...this.identity}).catch((()=>{})),this.fin.Platform.Layout.getLayoutByViewIdentity(this.identity)),this.getOptions=async()=>this.wire.sendAction(\"get-view-options\",{...this.identity}).then((({payload:e})=>e.data)),this.updateOptions=async e=>this.wire.sendAction(\"update-view-options\",{options:e,...this.identity}).then((()=>{})),this.getCurrentWindow=async()=>{const{payload:{data:e}}=await this.wire.sendAction(\"get-view-window\",{...this.identity});return new r._Window(this.wire,e)},this.getCurrentStack=async()=>{this.wire.sendAction(\"view-get-current-stack\").catch((()=>{}));try{return(await this.getParentLayout()).getStackByViewIdentity(this.identity)}catch(e){throw new t.RuntimeError({reason:\"This view does not belong to a stack.\",error:e})}},this.triggerBeforeUnload=async()=>(await this.wire.sendAction(\"trigger-before-unload\",{...this.identity})).payload.data,this.bindToElement=async e=>{if(!e)throw new Error(\"Element not found.\");return this.wire.environment.observeBounds(e,(async e=>this.setBounds(e)))}}async focus({emitSynthFocused:e}={emitSynthFocused:!0}){const t=await this.getCurrentWindow();await t.focusedWebViewWasChanged(),await super.focus({emitSynthFocused:e})}}return B.View=o,e=new WeakMap,B}(),e)}(k)),k}function Y(){if(z)return j;z=1,Object.defineProperty(j,\"__esModule\",{value:!0}),j.Application=void 0;const e=d,t=ie(),n=J();class i extends e.EmitterBase{constructor(e,n){super(e,\"application\",n.uuid),this.identity=n,this.window=new t._Window(this.wire,{uuid:this.identity.uuid,name:this.identity.uuid})}windowListFromIdentityList(e){const n=[];return e.forEach((e=>{n.push(new t._Window(this.wire,{uuid:e.uuid,name:e.name}))})),n}isRunning(){return this.wire.sendAction(\"is-application-running\",this.identity).then((({payload:e})=>e.data))}async quit(e=!1){try{await this._close(e),await this.wire.sendAction(\"destroy-application\",{force:e,...this.identity})}catch(e){if(![\"Remote connection has closed\",\"Could not locate the requested application\"].some((t=>e.message.includes(t))))throw e}}async _close(e=!1){try{await this.wire.sendAction(\"close-application\",{force:e,...this.identity})}catch(e){if(!e.message.includes(\"Remote connection has closed\"))throw e}}close(e=!1){return console.warn(\"Deprecation Warning: Application.close is deprecated Please use Application.quit\"),this.wire.sendAction(\"application-close\",this.identity).catch((e=>{})),this._close(e)}getChildWindows(){return this.wire.sendAction(\"get-child-windows\",this.identity).then((({payload:e})=>{const t=[];return e.data.forEach((e=>{t.push({uuid:this.identity.uuid,name:e})})),this.windowListFromIdentityList(t)}))}getManifest(){return this.wire.sendAction(\"get-application-manifest\",this.identity).then((({payload:e})=>e.data))}getParentUuid(){return this.wire.sendAction(\"get-parent-application\",this.identity).then((({payload:e})=>e.data))}getShortcuts(){return this.wire.sendAction(\"get-shortcuts\",this.identity).then((({payload:e})=>e.data))}async getViews(){const{payload:e}=await this.wire.sendAction(\"application-get-views\",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}getZoomLevel(){return this.wire.sendAction(\"get-application-zoom-level\",this.identity).then((({payload:e})=>e.data))}getWindow(){return this.wire.sendAction(\"application-get-window\",this.identity).catch((e=>{})),Promise.resolve(this.window)}registerUser(e,t){return this.wire.sendAction(\"register-user\",{userName:e,appName:t,...this.identity}).then((()=>{}))}removeTrayIcon(){return this.wire.sendAction(\"remove-tray-icon\",this.identity).then((()=>{}))}restart(){return this.wire.sendAction(\"restart-application\",this.identity).then((()=>{}))}run(){return console.warn(\"Deprecation Warning: Application.run is deprecated Please use fin.Application.start\"),this.wire.sendAction(\"application-run\",this.identity).catch((e=>{})),this._run()}_run(e={}){return this.wire.sendAction(\"run-application\",{manifestUrl:this._manifestUrl,opts:e,...this.identity}).then((()=>{}))}scheduleRestart(){return this.wire.sendAction(\"relaunch-on-close\",this.identity).then((()=>{}))}async sendApplicationLog(){const{payload:e}=await this.wire.sendAction(\"send-application-log\",this.identity);return e.data}async setJumpList(e){await this.wire.sendAction(\"set-jump-list\",{config:e,...this.identity})}setTrayIcon(e){return this.wire.sendAction(\"set-tray-icon\",{enabledIcon:e,...this.identity}).then((()=>{}))}setShortcuts(e){return this.wire.sendAction(\"set-shortcuts\",{data:e,...this.identity}).then((()=>{}))}async setShortcutQueryParams(e){await this.wire.sendAction(\"set-shortcut-query-args\",{data:e,...this.identity})}setZoomLevel(e){return this.wire.sendAction(\"set-application-zoom-level\",{level:e,...this.identity}).then((()=>{}))}async setAppLogUsername(e){await this.wire.sendAction(\"set-app-log-username\",{data:e,...this.identity})}getTrayIconInfo(){return this.wire.sendAction(\"get-tray-icon-info\",this.identity).then((({payload:e})=>e.data))}hasTrayIcon(){return this.wire.sendAction(\"has-tray-icon\",this.identity).then((({payload:e})=>e.data))}terminate(){return this.wire.sendAction(\"terminate-application\",this.identity).then((()=>{}))}wait(){return this.wire.sendAction(\"wait-for-hung-application\",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction(\"get-info\",this.identity).then((({payload:e})=>e.data))}async getProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction(\"application-get-process-info\",this.identity);return e}async setFileDownloadLocation(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t};await this.wire.sendAction(\"set-file-download-location\",{...n,downloadLocation:e})}async getFileDownloadLocation(){const{payload:{data:e}}=await this.wire.sendAction(\"get-file-download-location\",this.identity);return e}async showTrayIconPopupMenu(e){const{name:t}=this.wire.me,n={uuid:this.identity.uuid,name:t},{payload:i}=await this.wire.sendAction(\"show-tray-icon-popup-menu\",{...n,options:e});return i.data}async closeTrayIconPopupMenu(){const{name:e}=this.wire.me,t={uuid:this.identity.uuid,name:e};await this.wire.sendAction(\"close-tray-icon-popup-menu\",{...t})}}return j.Application=i,j}function Z(){return q||(q=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(function(){if(K)return F;K=1,Object.defineProperty(F,\"__esModule\",{value:!0}),F.ApplicationModule=void 0;const e=d,t=O,n=Y();class i extends e.Base{async wrap(e){this.wire.sendAction(\"wrap-application\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}wrapSync(e){this.wire.sendAction(\"wrap-application-sync\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n.Application(this.wire,e)}async _create(e){return void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&void 0===e.isPlatformController&&(e.autoShow=!0),await this.wire.sendAction(\"create-application\",e),this.wrap({uuid:e.uuid})}create(e){return console.warn(\"Deprecation Warning: fin.Application.create is deprecated. Please use fin.Application.start\"),this.wire.sendAction(\"application-create\").catch((e=>{})),this._create(e)}async start(e){this.wire.sendAction(\"start-application\").catch((e=>{}));const t=await this._create(e);return await this.wire.sendAction(\"run-application\",{uuid:e.uuid}),t}async startManyManifests(e,t){return this.wire.sendAction(\"run-applications\",{applications:e,opts:t}).then((()=>{}))}getCurrent(){return this.wire.sendAction(\"get-current-application\").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction(\"get-current-application-sync\").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}async startFromManifest(e,t){this.wire.sendAction(\"application-start-from-manifest\").catch((e=>{}));const n=await this._createFromManifest(e);return await n._run(t),n}createFromManifest(e){return console.warn(\"Deprecation Warning: fin.Application.createFromManifest is deprecated. Please use fin.Application.startFromManifest\"),this.wire.sendAction(\"application-create-from-manifest\").catch((e=>{})),this._createFromManifest(e)}_createFromManifest(e){return this.wire.sendAction(\"get-application-manifest\",{manifestUrl:e}).then((({payload:e})=>{const t=e.data.platform?e.data.platform.uuid:e.data.startup_app.uuid;return this.wrap({uuid:t})})).then((t=>(t._manifestUrl=e,t)))}}return F.ApplicationModule=i,F}(),e),n(Y(),e)}(R)),R}H.WebContents=D;var Q={};Object.defineProperty(Q,\"__esModule\",{value:!0}),Q.promisifySubscription=void 0;var X,ee,te;function ne(){if(X)return S;X=1,Object.defineProperty(S,\"__esModule\",{value:!0}),S._Window=void 0;const e=Z(),t=H,n=J(),i=T,r=Q;class o extends t.WebContents{constructor(e,t){super(e,t,\"window\")}async createWindow(e){this.wire.sendAction(\"window-create-window\",this.identity).catch((e=>{}));const t=await(0,r.promisifySubscription)(this,\"fire-constructor-callback\");void 0===e.waitForPageLoad&&(e.waitForPageLoad=!1),void 0===e.autoShow&&(e.autoShow=!0),(0,i.handleDeprecatedWarnings)(e);const n=this.wire.environment.createChildContent({entityType:\"window\",options:e}),[o]=await Promise.all([t.getValue(),n]);let s;const{success:a}=o,c=o.data,{message:d}=c;s=a?{httpResponseCode:c.httpResponseCode,apiInjected:c.apiInjected}:{message:c.message,networkErrorCode:c.networkErrorCode,stack:c.stack};const h={message:d,cbPayload:s,success:a};try{this.getWebWindow().fin.__internal_.openerSuccessCBCalled()}catch(e){}return h.success?this:Promise.reject(h)}getAllFrames(){return this.wire.sendAction(\"get-all-frames\",this.identity).then((({payload:e})=>e.data))}getBounds(){return this.wire.sendAction(\"get-window-bounds\",this.identity).then((({payload:e})=>e.data))}center(){return this.wire.sendAction(\"center-window\",this.identity).then((()=>{}))}blur(){return this.wire.sendAction(\"blur-window\",this.identity).then((()=>{}))}bringToFront(){return this.wire.sendAction(\"bring-window-to-front\",this.identity).then((()=>{}))}animate(e,t){return this.wire.sendAction(\"animate-window\",{transitions:e,options:t,...this.identity}).then((()=>{}))}hide(){return this.wire.sendAction(\"hide-window\",this.identity).then((()=>{}))}close(e=!1){return this.wire.sendAction(\"close-window\",{force:e,...this.identity}).then((()=>{Object.setPrototypeOf(this,null)}))}focusedWebViewWasChanged(){return this.wire.sendAction(\"focused-webview-changed\",this.identity).then((()=>{}))}getNativeId(){return this.wire.sendAction(\"get-window-native-id\",this.identity).then((({payload:e})=>e.data))}async getCurrentViews(){const{payload:e}=await this.wire.sendAction(\"window-get-views\",this.identity);return e.data.map((e=>new n.View(this.wire,e)))}disableFrame(){return console.warn(\"Function is deprecated; use disableUserMovement instead.\"),this.wire.sendAction(\"disable-window-frame\",this.identity).then((()=>{}))}disableUserMovement(){return this.wire.sendAction(\"disable-window-frame\",this.identity).then((()=>{}))}enableFrame(){return console.warn(\"Function is deprecated; use enableUserMovement instead.\"),this.wire.sendAction(\"enable-window-frame\",this.identity).then((()=>{}))}enableUserMovement(){return this.wire.sendAction(\"enable-window-frame\",this.identity).then((()=>{}))}flash(){return this.wire.sendAction(\"flash-window\",this.identity).then((()=>{}))}stopFlashing(){return this.wire.sendAction(\"stop-flash-window\",this.identity).then((()=>{}))}getInfo(){return this.wire.sendAction(\"get-window-info\",this.identity).then((({payload:e})=>e.data))}async getLayout(e){this.wire.sendAction(\"window-get-layout\",this.identity).catch((e=>{}));const t=await this.getOptions();if(!t.layout&&!t.layoutSnapshot)throw new Error(\"Window does not have a Layout\");return this.fin.Platform.Layout.wrap(e??this.identity)}getOptions(){return this.wire.sendAction(\"get-window-options\",this.identity).then((({payload:e})=>e.data))}getParentApplication(){return this.wire.sendAction(\"window-get-parent-application\",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity))}getParentWindow(){return this.wire.sendAction(\"window-get-parent-window\",this.identity).catch((e=>{})),Promise.resolve(new e.Application(this.wire,this.identity)).then((e=>e.getWindow()))}async getSnapshot(e){const t={area:e,...this.identity};console.warn(\"Window.getSnapshot has been deprecated, please use Window.capturePage\");return(await this.wire.sendAction(\"get-window-snapshot\",t)).payload.data}getState(){return this.wire.sendAction(\"get-window-state\",this.identity).then((({payload:e})=>e.data))}getWebWindow(){return this.wire.sendAction(\"window-get-web-window\",this.identity).catch((e=>{})),this.wire.environment.getWebWindow(this.identity)}isMainWindow(){return this.wire.sendAction(\"window-is-main-window\",this.identity).catch((e=>{})),this.me.uuid===this.me.name}isShowing(){return this.wire.sendAction(\"is-window-showing\",this.identity).then((({payload:e})=>e.data))}maximize(){return this.wire.sendAction(\"maximize-window\",this.identity).then((()=>{}))}minimize(){return this.wire.sendAction(\"minimize-window\",this.identity).then((()=>{}))}moveBy(e,t,n){return this.wire.sendAction(\"move-window-by\",{deltaLeft:e,deltaTop:t,positioningOptions:n,...this.identity}).then((()=>{}))}moveTo(e,t,n){return this.wire.sendAction(\"move-window\",{left:e,top:t,positioningOptions:n,...this.identity}).then((()=>{}))}resizeBy(e,t,n,i){return this.wire.sendAction(\"resize-window-by\",{deltaWidth:Math.floor(e),deltaHeight:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}resizeTo(e,t,n,i){return this.wire.sendAction(\"resize-window\",{width:Math.floor(e),height:Math.floor(t),anchor:n,positioningOptions:i,...this.identity}).then((()=>{}))}restore(){return this.wire.sendAction(\"restore-window\",this.identity).then((()=>{}))}setAsForeground(){return this.wire.sendAction(\"set-foreground-window\",this.identity).then((()=>{}))}setBounds(e,t){return this.wire.sendAction(\"set-window-bounds\",{...e,...this.identity,positioningOptions:t}).then((()=>{}))}show(e=!1){return this.wire.sendAction(\"show-window\",{force:e,...this.identity}).then((()=>{}))}showAt(e,t,n=!1){return this.wire.sendAction(\"show-at-window\",{force:n,left:Math.floor(e),top:Math.floor(t),...this.identity}).then((()=>{}))}updateOptions(e){return this.wire.sendAction(\"update-window-options\",{options:e,...this.identity}).then((()=>{}))}authenticate(e,t){return this.wire.sendAction(\"window-authenticate\",{userName:e,password:t,...this.identity}).then((()=>{}))}async showPopupMenu(e){const{payload:t}=await this.wire.sendAction(\"show-popup-menu\",{options:e,...this.identity});return t.data}async closePopupMenu(){return this.wire.sendAction(\"close-popup-menu\",{...this.identity}).then((()=>{}))}async dispatchPopupResult(e){this.wire.sendAction(\"window-dispatch-popup-result\",this.identity).catch((e=>{})),await this.wire.sendAction(\"dispatch-popup-result\",{data:e,...this.identity})}async print(e={content:\"self\"}){switch(e.content){case void 0:case\"self\":return super.print(e);case\"screenshot\":return this.wire.sendAction(\"print-screenshot\",this.identity).then((()=>{}));case\"views\":return this.wire.sendAction(\"print-views\",{...this.identity,options:e}).then((()=>{}));default:return}}}return S._Window=o,S}function ie(){return te||(te=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(function(){if(ee)return _;ee=1,Object.defineProperty(_,\"__esModule\",{value:!0}),_._WindowModule=void 0;const e=d,t=O,n=ne();class i extends e.Base{async wrap(e){this.wire.sendAction(\"window-wrap\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}wrapSync(e){this.wire.sendAction(\"window-wrap-sync\").catch((e=>{}));const i=(0,t.validateIdentity)(e);if(i)throw new Error(i);return new n._Window(this.wire,e)}create(e){return this.wire.sendAction(\"create-window\").catch((e=>{})),new n._Window(this.wire,{uuid:this.me.uuid,name:e.name}).createWindow(e)}getCurrent(){if(this.wire.sendAction(\"get-current-window\").catch((e=>{})),!this.wire.me.isWindow)throw new Error(\"You are not in a Window context\");const{uuid:e,name:t}=this.wire.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction(\"get-current-window-sync\").catch((e=>{})),!this.wire.me.isWindow)throw new Error(\"You are not in a Window context\");const{uuid:e,name:t}=this.wire.me;return this.wrapSync({uuid:e,name:t})}}return _._WindowModule=i,_}(),e),n(ne(),e)}(M)),M}Q.promisifySubscription=async(e,t,n=(()=>!0),i)=>{let r,o,s;const a=new Promise(((e,t)=>{r=e,o=t})),c=e=>{n(e)&&(clearTimeout(s),r(e))};return await e.on(t,c),i&&(s=setTimeout((()=>o(new Error(\"event timed out\"))),i)),a.finally((()=>{e.removeListener(t,c).catch((()=>null))})),{getValue:()=>a}},Object.defineProperty(c,\"__esModule\",{value:!0}),c.System=void 0;const re=d,oe=g,se=ie(),ae=t;class ce extends re.EmitterBase{constructor(e){super(e,\"system\")}sendExternalProcessRequest(e,t){return new Promise(((n,i)=>{const r=\"external-process-exited\";let o,s,a,c;\"function\"==typeof t.listener&&(a=e=>{const n=e||{};s={topic:\"exited\",uuid:n.processUuid||\"\",exitCode:n.exitCode||0},o===e.processUuid&&(t.listener(s),c.removeListener(r,a))},this.wire.me.name||(this.wire.me.name=this.wire.me.uuid),c=new se._Window(this.wire,this.wire.me),c.on(r,a)),this.wire.sendAction(e,t).then((({payload:e})=>{o=e.data.uuid,n(e.data),s&&o===s.uuid&&(t.listener(s),c.removeListener(r,a))})).catch((e=>{c&&c.removeListener(r,a),i(e)}))}))}getVersion(){return this.wire.sendAction(\"get-version\").then((({payload:e})=>e.data))}clearCache(e){return this.wire.sendAction(\"clear-cache\",e).then((()=>{}))}deleteCacheOnExit(){return this.wire.sendAction(\"delete-cache-request\").then((()=>{}))}exit(){return this.wire.sendAction(\"exit-desktop\").then((()=>{}))}async fetchManifest(e){const{payload:{data:t}}=await this.wire.sendAction(\"fetch-manifest\",{manifestUrl:e});return t}flushCookieStore(){return this.wire.sendAction(\"flush-cookie-store\").then((()=>{}))}getAllWindows(){return this.wire.sendAction(\"get-all-windows\").then((({payload:e})=>e.data))}getAllApplications(){return this.wire.sendAction(\"get-all-applications\").then((({payload:e})=>e.data))}getCommandLineArguments(){return this.wire.sendAction(\"get-command-line-arguments\").then((({payload:e})=>e.data))}async getCrashReporterState(){const{payload:{data:{diagnosticMode:e,isRunning:t}}}=await this.wire.sendAction(\"get-crash-reporter-state\");return console.warn(\"diagnosticMode property is deprecated. It will be removed in a future version\"),{diagnosticMode:e,diagnosticsMode:e,isRunning:t}}async startCrashReporter(e){const t=e,n={...t,diagnosticMode:t.diagnosticsMode||t.diagnosticMode},{payload:{data:{diagnosticMode:i,isRunning:r}}}=await this.wire.sendAction(\"start-crash-reporter\",n);return{diagnosticMode:i,diagnosticsMode:i,isRunning:r}}getUniqueUserId(){return this.wire.sendAction(\"get-unique-user-id\").then((({payload:e})=>e.data))}getEntityInfo(e,t){return this.wire.sendAction(\"get-entity-info\",{uuid:e,name:t}).then((({payload:e})=>e.data))}getEnvironmentVariable(e){return this.wire.sendAction(\"get-environment-variable\",{environmentVariables:e}).then((({payload:e})=>e.data))}getFocusedWindow(){return this.wire.sendAction(\"get-focused-window\").then((({payload:e})=>e.data))}async isAppCertified(e){const{payload:{data:{certifiedInfo:t}}}=await this.wire.sendAction(\"is-app-certified\",{manifestUrl:e});return t}getInstalledRuntimes(){return this.wire.sendAction(\"get-installed-runtimes\").then((({payload:e})=>e.data.runtimes))}async getInstalledApps(){const{payload:{data:{installedApps:e}}}=await this.wire.sendAction(\"get-installed-apps\");return e}getLog(e){return this.wire.sendAction(\"view-log\",e).then((({payload:e})=>e.data))}getMachineId(){return this.wire.sendAction(\"get-machine-id\").then((({payload:e})=>e.data))}getMinLogLevel(){return this.wire.sendAction(\"get-min-log-level\").then((({payload:e})=>e.data))}getLogList(){return this.wire.sendAction(\"list-logs\").then((({payload:e})=>e.data))}getMonitorInfo(){return this.wire.sendAction(\"get-monitor-info\").then((({payload:e})=>e.data))}getMousePosition(){return this.wire.sendAction(\"get-mouse-position\").then((({payload:e})=>e.data))}getProcessList(){return console.warn(\"System.getProcessList has been deprecated. Please consider using our new process APIs: Window.getProcessInfo, View.getProcessInfo, Application.getProcessInfo, System.getAllProcessInfo\"),this.wire.sendAction(\"process-snapshot\").then((({payload:e})=>e.data))}async getAllProcessInfo(){const{payload:{data:e}}=await this.wire.sendAction(\"get-all-process-info\",this.identity);return e}getProxySettings(){return this.wire.sendAction(\"get-proxy-settings\").then((({payload:e})=>e.data))}getRuntimeInfo(){return this.wire.sendAction(\"get-runtime-info\").then((({payload:e})=>e.data))}getRvmInfo(){return this.wire.sendAction(\"get-rvm-info\").then((({payload:e})=>e.data))}getHostSpecs(){return this.wire.sendAction(\"get-host-specs\").then((({payload:e})=>e.data))}getOSInfo(){return this.wire.sendAction(\"get-os-info\").then((({payload:e})=>e.data))}launchExternalProcess(e){return this.sendExternalProcessRequest(\"launch-external-process\",e)}monitorExternalProcess(e){return this.sendExternalProcessRequest(\"monitor-external-process\",e)}log(e,t){return this.wire.sendAction(\"write-to-log\",{level:e,message:t}).then((()=>{}))}openUrlWithBrowser(e){return this.wire.sendAction(\"open-url-with-browser\",{url:e}).then((()=>{}))}async registerCustomProtocol(e){if(\"object\"!=typeof e)throw new Error(\"Must provide an object with a `protocolName` property having a string value.\");await this.wire.sendAction(\"register-custom-protocol\",e)}async unregisterCustomProtocol(e){await this.wire.sendAction(\"unregister-custom-protocol\",{protocolName:e})}async getCustomProtocolState(e){return this.wire.sendAction(\"get-custom-protocol-state\",{protocolName:e}).then((({payload:e})=>e.data))}releaseExternalProcess(e){return this.wire.sendAction(\"release-external-process\",{uuid:e}).then((()=>{}))}showDeveloperTools(e){return this.wire.sendAction(\"show-developer-tools\",e).then((()=>{}))}terminateExternalProcess(e){return this.wire.sendAction(\"terminate-external-process\",e).then((()=>{}))}updateProxySettings(e){return this.wire.sendAction(\"update-proxy\",e).then((()=>{}))}async downloadAsset(e,t){const n=()=>{};let i=n,r=n;const o=new Promise(((e,t)=>{i=e,r=t}));if(\"openfin\"!==this.wire.environment.type)throw new oe.NotSupportedError(\"downloadAsset only supported in an OpenFin Render process\");const s=oe.RuntimeError.getCallSite(),a=this.wire.environment.getNextMessageId().toString(),c=`asset-download-progress-${a}`,d=`asset-download-error-${a}`,h=`asset-download-complete-${a}`,l=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},u=()=>{this.removeListener(c,l)};await Promise.all([this.on(c,l),this.once(d,(e=>{u();const{reason:t,err:n}=e;r(new oe.RuntimeError({reason:t,error:n},s))})),this.once(h,(()=>{u(),i()}))]);const p=Object.assign(e,{downloadId:a});return await this.wire.sendAction(\"download-asset\",p).catch((e=>{throw u(),e})),o}downloadRuntime(e,t){const n=oe.RuntimeError.getCallSite();return new Promise(((i,r)=>{if(\"openfin\"!==this.wire.environment.type)return void r(new oe.NotSupportedError(\"downloadRuntime only supported in an OpenFin Render process\"));const o=this.wire.environment.getNextMessageId().toString(),s=`runtime-download-progress-${o}`,a=`runtime-download-error-${o}`,c=`runtime-download-complete-${o}`,d=e=>{const n={downloadedBytes:e.downloadedBytes,totalBytes:e.totalBytes};t(n)},h=()=>{this.removeListener(s,d)};this.on(s,d),this.once(a,(e=>{h();const{reason:t,err:i}=e;r(new oe.RuntimeError({reason:t,error:i},n))})),this.once(c,(()=>{h(),i()}));const l=Object.assign(e,{downloadId:o});this.wire.sendAction(\"download-runtime\",l).catch((e=>{h(),r(e)}))}))}downloadPreloadScripts(e){return this.wire.sendAction(\"download-preload-scripts\",{scripts:e}).then((({payload:e})=>e.data))}getAllExternalApplications(){return this.wire.sendAction(\"get-all-external-applications\").then((({payload:e})=>e.data))}getAppAssetInfo(e){return this.wire.sendAction(\"get-app-asset-info\",e).then((({payload:e})=>e.data))}getCookies(e){const t=this.wire.environment.getUrl(),n=Object.assign(e,{url:t});return this.wire.sendAction(\"get-cookies\",n).then((({payload:e})=>e.data))}setMinLogLevel(e){return this.wire.sendAction(\"set-min-log-level\",{level:e}).then((()=>{}))}resolveUuid(e){return this.wire.sendAction(\"resolve-uuid\",{entityKey:e}).then((({payload:e})=>e.data))}executeOnRemote(e,t){return t.requestingIdentity=e,this.wire.ferryAction(t)}readRegistryValue(e,t,n){return this.wire.sendAction(\"read-registry-value\",{rootKey:e,subkey:t,value:n}).then((({payload:e})=>e.data))}registerExternalConnection(e){return this.wire.sendAction(\"register-external-connection\",{uuid:e}).then((({payload:e})=>e.data))}async getServiceConfiguration(e){if(\"string\"!=typeof e.name)throw new Error(\"Must provide an object with a `name` property having a string value\");const{name:t}=e;return this.wire.sendAction(\"get-service-configuration\",{name:t}).then((({payload:e})=>e.data))}async getSystemAppConfig(e){if(\"string\"!=typeof e)throw new Error(\"Must provide a string value for name of system app\");return this.wire.sendAction(\"get-system-app-configuration\",{name:e}).then((({payload:e})=>e.data))}async registerShutdownHandler(e){this.wire.sendAction(\"system-register-shutdown-handler\").catch((e=>{}));const{uuid:t,name:n}=this.wire.me;this.on(\"system-shutdown\",(i=>{e({proceed:()=>{this.wire.environment.raiseEvent(\"application/system-shutdown-handled\",{uuid:t,name:n,topic:\"application\"})}})}))}runRvmHealthCheck(){return this.wire.sendAction(\"run-rvm-health-check\").then((({payload:e})=>e.data))}async launchManifest(e,t={}){const{subscribe:n,...i}=t,r=i;if(n){const e=new ae.EventEmitter;n(e);const t=\"app-version-progress\",i=\"runtime-status\",o=\"app-version-complete\",s=\"app-version-error\",a=this.wire.environment.getNextMessageId().toString();r.appVersionId=a;const c=[o,t,i,s],d=e=>{const{appVersionId:t,topic:n,type:i,...r}=e;return{...r,type:c.find((e=>i.includes(e)))}},h=t=>{const n=d(t);e.emit(n.type,n)},l=()=>{this.removeListener(`${t}.${a}`,h),this.removeListener(`${i}.${a}`,h),this.removeListener(`${o}.${a}`,h),this.removeListener(`${s}.${a}`,h),this.removeListener(`${o}.${a}`,l),this.removeListener(`${s}.${a}`,l)};await Promise.all([this.on(`${t}.${a}`,h),this.on(`${i}.${a}`,h),this.once(`${o}.${a}`,h),this.once(`${s}.${a}`,h),this.once(`${o}.${a}`,l),this.once(`${s}.${a}`,l)])}return(await this.wire.sendAction(\"launch-manifest\",{manifestUrl:e,opts:r})).payload.data.manifest}async queryPermissionForCurrentContext(e){const t={uuid:this.wire.me.uuid,name:this.wire.me.name};return(await this.wire.sendAction(\"query-permission-for-current-context\",{apiName:e,identity:t})).payload.data}async enableNativeWindowIntegrationProvider(e){const{payload:t}=await this.wire.sendAction(\"enable-native-window-integration-provider\",{permissions:e});return t.data}async registerUsage({data:e,type:t}){await this.wire.sendAction(\"register-usage\",{data:e,type:t})}async getPrinters(){const{payload:e}=await this.wire.sendAction(\"system-get-printers\");return e.data}async updateProcessLoggingOptions(e){await this.wire.sendAction(\"system-update-process-logging-options\",{options:e})}async getDomainSettings(){const{payload:{data:e}}=await this.wire.sendAction(\"get-domain-settings\",this.identity);return e}async setDomainSettings(e){await this.wire.sendAction(\"set-domain-settings\",{domainSettings:e,...this.identity})}async refreshExtensions(){const{payload:e}=await this.wire.sendAction(\"refresh-extensions\");return e.data}async getInstalledExtensions(){const{payload:e}=await this.wire.sendAction(\"get-installed-extensions\");return e.data}}c.System=ce;var de={},he={};Object.defineProperty(he,\"__esModule\",{value:!0}),he.RefCounter=void 0;he.RefCounter=class{constructor(){this.topicRefMap=new Map}incRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t+1;n=i,this.topicRefMap.set(e,i)}else this.topicRefMap.set(e,1),n=1;return n}decRefCount(e){const t=this.topicRefMap.get(e);let n;if(t){const i=t-1;this.topicRefMap.set(e,i),n=i}else n=-1;return n}actOnFirst(e,t,n){return 1===this.incRefCount(e)?t():n()}actOnLast(e,t,n){return 0===this.decRefCount(e)?t():n()}};var le={},ue={},pe={};Object.defineProperty(pe,\"__esModule\",{value:!0}),pe.ChannelBase=pe.ProtectedItems=void 0;const we=e=>async(t,n,i)=>{const r=await e(t,n,i);return void 0===r?n:r};pe.ProtectedItems=class{constructor(e,t){this.providerIdentity=e,this.close=t}};class ye{static defaultAction(e){throw new Error(`No action registered at target for ${e}`)}constructor(){this.subscriptions=new Map}async processAction(e,t,n){try{const i=this.subscriptions.has(e)?this.subscriptions.get(e):(t,n)=>(this.defaultAction??ye.defaultAction)(e,t,n),r=this.preAction?await this.preAction(e,t,n):t,o=await i(r,n);return this.postAction?await this.postAction(e,o,n):o}catch(t){if(this.errorMiddleware)return this.errorMiddleware(e,t,n);throw t}}beforeAction(e){if(this.preAction)throw new Error(\"Already registered beforeAction middleware\");this.preAction=we(e)}onError(e){if(this.errorMiddleware)throw new Error(\"Already registered error middleware\");this.errorMiddleware=e}afterAction(e){if(this.postAction)throw new Error(\"Already registered afterAction middleware\");this.postAction=we(e)}remove(e){this.subscriptions.delete(e)}setDefaultAction(e){if(this.defaultAction)throw new Error(\"default action can only be set once\");this.defaultAction=e}register(e,t){if(this.subscriptions.has(e))throw new Error(`Subscription already registered for action: ${e}. Unsubscribe before adding new subscription`);return this.subscriptions.set(e,t),!0}}pe.ChannelBase=ye;var fe,ge,me,ve=s&&s.__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)},Ce=s&&s.__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};Object.defineProperty(ue,\"__esModule\",{value:!0}),ue.ChannelClient=void 0;const be=pe,Ie=new Map;class Ee extends be.ChannelBase{static closeChannelByEndpointId(e){const t=Ie.get(e);t&&ve(t,me,\"f\").call(t)}static handleProviderDisconnect(e){for(const t of Ie.values())t.providerIdentity.channelId===e.channelId&&(t.disconnectListener(e),ve(t,me,\"f\").call(t))}constructor(e,t,n){super(),fe.set(this,void 0),ge.set(this,void 0),this.processAction=(e,t,n)=>super.processAction(e,t,n),me.set(this,(()=>{Ie.delete(this.endpointId),ve(this,ge,\"f\").close()})),Ce(this,fe,new be.ProtectedItems(e,t),\"f\"),this.disconnectListener=()=>{},this.endpointId=e.endpointId,Ce(this,ge,n,\"f\"),Ie.set(this.endpointId,this),n.receive(this.processAction)}get providerIdentity(){return ve(this,fe,\"f\").providerIdentity}async dispatch(e,t){if(ve(this,ge,\"f\").isEndpointConnected(this.providerIdentity.channelId))return ve(this,ge,\"f\").send(this.providerIdentity.channelId,e,t);throw new Error(\"The client you are trying to dispatch from is disconnected from the target provider.\")}onDisconnection(e){this.disconnectListener=t=>{try{e(t)}catch(e){throw new Error(`Error while calling the onDisconnection callback: ${e.message}`)}finally{this.disconnectListener=()=>{}}}}async disconnect(){await this.sendDisconnectAction(),ve(this,me,\"f\").call(this)}async sendDisconnectAction(){const e=ve(this,fe,\"f\");await e.close()}static async wireClose(e,t,n){const{channelName:i,uuid:r,name:o}=t;await e.sendAction(\"disconnect-from-channel\",{channelName:i,uuid:r,name:o,endpointId:n})}}ue.ChannelClient=Ee,fe=new WeakMap,ge=new WeakMap,me=new WeakMap;var xe={},Ae={};Object.defineProperty(Ae,\"__esModule\",{value:!0}),Ae.exhaustiveCheck=void 0,Ae.exhaustiveCheck=function(e,t){throw new Error(`Unsupported value: ${e}${t?`\\n Supported values are: ${t.join(\"\")}`:\"\"}`)};var Pe,Me,_e,Oe={},Se=s&&s.__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},Re=s&&s.__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)};Object.defineProperty(Oe,\"__esModule\",{value:!0}),Oe.ClassicInfo=Oe.ClassicStrategy=void 0;Oe.ClassicStrategy=class{constructor(e,t,n,i){this.messageReceiver=t,this.endpointId=n,this.providerIdentity=i,Pe.set(this,void 0),Me.set(this,new Map),_e.set(this,new Map),this.send=async(e,t,n)=>{const i=Re(this,Me,\"f\").get(e);if(!i)throw new Error(`Could not locate routing info for endpoint ${e}`);const r={...i};r.isLocalEndpointId&&delete r.endpointId,delete r.isLocalEndpointId;const o=Re(this,Pe,\"f\").sendAction(\"send-channel-message\",{...r,providerIdentity:this.providerIdentity,action:t,payload:n});Re(this,_e,\"f\").get(e)?.add(o);return(await o.catch((e=>{throw new Error(e.message)})).finally((()=>{Re(this,_e,\"f\").get(e)?.delete(o)}))).payload.data.result},this.close=async()=>{this.messageReceiver.removeEndpoint(this.providerIdentity.channelId,this.endpointId),[...Re(this,Me,\"f\").keys()].forEach((e=>this.closeEndpoint(e))),Se(this,Me,new Map,\"f\")},Se(this,Pe,e,\"f\")}onEndpointDisconnect(e,t){}receive(e){this.messageReceiver.addEndpoint(e,this.providerIdentity.channelId,this.endpointId)}async closeEndpoint(e){const t=Re(this,Me,\"f\").get(e);Re(this,Me,\"f\").delete(e);const n=Re(this,_e,\"f\").get(e);n?.forEach((n=>{const i=`Channel connection with identity uuid: ${t?.uuid} / name: ${t?.name} / endpointId: ${e} no longer connected.`;n.cancel(new Error(i))}))}isEndpointConnected(e){return Re(this,Me,\"f\").has(e)}addEndpoint(e,t){Re(this,Me,\"f\").set(e,t.endpointIdentity),Re(this,_e,\"f\").set(e,new Set)}isValidEndpointPayload(e){return\"string\"==typeof e?.endpointIdentity?.endpointId||\"string\"==typeof e?.endpointIdentity?.channelId}},Pe=new WeakMap,Me=new WeakMap,_e=new WeakMap,Oe.ClassicInfo={version:5,minimumVersion:0,type:\"classic\"};var Fe={},je={},ke={};Object.defineProperty(ke,\"__esModule\",{value:!0}),ke.errorToPOJO=void 0,ke.errorToPOJO=function(e){return{stack:e.stack,name:e.name,message:e.message,toString:()=>e.stack||e.toString()}};var Le,Te,$e=s&&s.__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)},Be=s&&s.__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};Object.defineProperty(je,\"__esModule\",{value:!0}),je.RTCEndpoint=void 0;const Ge=ke;je.RTCEndpoint=class{static isValidEndpointPayload(e){const t=e=>\"object\"==typeof e&&null!==e;return t(e)&&t(e.endpointIdentity)&&t(e.rtc)&&\"string\"==typeof e.endpointIdentity.endpointId}constructor({rtc:e,endpointIdentity:t}){this.responseMap=new Map,Le.set(this,null),Te.set(this,void 0),this.connectionStateChangeHandler=e=>{\"connected\"!==this.rtc.rtcClient.connectionState&&(this.rtc.rtcClient.removeEventListener(\"connectionstatechange\",this.connectionStateChangeHandler),this.close(),$e(this,Te,\"f\")&&$e(this,Te,\"f\").call(this))},this.send=async(e,t)=>{const n=`message-${Math.random()}`,i=new Promise(((e,t)=>{this.responseMap.set(n,{resolve:e,reject:t})}));return this.rtc.channels.request.send(JSON.stringify({action:e,payload:t,messageId:n})),i},this.close=()=>{this.responseMap.forEach((e=>e.reject(\"Connection has closed.\"))),this.responseMap=new Map,this.rtc.channels.request.close(),this.rtc.channels.response.close(),this.rtc.rtcClient.close()},this.rtc=e,this.endpointIdentity=t,this.rtc.channels.response.addEventListener(\"message\",(e=>{let{data:t}=e;e.data instanceof ArrayBuffer&&(t=(new TextDecoder).decode(e.data));const{messageId:n,payload:i,success:r,error:o}=JSON.parse(t),{resolve:s,reject:a}=this.responseMap.get(n)??{};s&&a?(this.responseMap.delete(n),r?s(i):a(o)):(console.log(\"Could not find id in responseMap.\"),console.log(e))})),this.rtc.channels.request.addEventListener(\"message\",(async e=>{let{data:n}=e;e.data instanceof ArrayBuffer&&(n=(new TextDecoder).decode(e.data));const{messageId:i,action:r,payload:o}=JSON.parse(n);if($e(this,Le,\"f\"))try{const e=await $e(this,Le,\"f\").call(this,r,o,t);this.rtc.channels.response.send(JSON.stringify({messageId:i,payload:e,success:!0}))}catch(e){\"open\"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,error:(0,Ge.errorToPOJO)(e),success:!1}))}else\"open\"===this.rtc.channels.response.readyState&&this.rtc.channels.response.send(JSON.stringify({messageId:i,success:!1,error:\"Connection not ready.\"}))})),this.rtc.rtcClient.addEventListener(\"connectionstatechange\",this.connectionStateChangeHandler),Object.values(this.rtc.channels).forEach((e=>{e.onclose=e=>{[...this.responseMap.values()].forEach((e=>e.reject(new Error(\"RTCDataChannel closed unexpectedly, this is most commonly caused by message size. Note: RTC Channels have a message size limit of ~255kB.\")))),this.close(),$e(this,Te,\"f\")&&$e(this,Te,\"f\").call(this)}}))}onDisconnect(e){if($e(this,Te,\"f\"))throw new Error(\"RTCEndpoint disconnectListener cannot be set twice.\");Be(this,Te,e,\"f\")}receive(e){if($e(this,Le,\"f\"))throw new Error(\"You have already set a listener for this RTC Endpoint.\");Be(this,Le,e,\"f\")}get connected(){return\"connected\"===this.rtc.rtcClient.connectionState}},Le=new WeakMap,Te=new WeakMap;var We,He,Ne,De={},Ue=s&&s.__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)},Ve=s&&s.__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};Object.defineProperty(De,\"__esModule\",{value:!0}),De.EndpointStrategy=void 0;De.EndpointStrategy=class{constructor(e,t,n){this.EndpointType=e,this.StrategyName=n,We.set(this,null),He.set(this,new Map),Ne.set(this,!0),this.send=async(e,t,n)=>this.getEndpointById(e).send(t,n),this.close=async()=>{Ue(this,Ne,\"f\")&&(Ue(this,He,\"f\").forEach((e=>e.close())),Ve(this,He,new Map,\"f\")),Ve(this,Ne,!1,\"f\")},this.isValidEndpointPayload=t}onEndpointDisconnect(e,t){this.getEndpointById(e).onDisconnect(t)}receive(e){if(Ue(this,We,\"f\"))throw new Error(`You have already set a listener for this ${this.StrategyName} Strategy`);Ve(this,We,e,\"f\"),Ue(this,He,\"f\").forEach((e=>e.receive(Ue(this,We,\"f\"))))}getEndpointById(e){const t=Ue(this,He,\"f\").get(e);if(!t)throw new Error(`Client with endpoint id ${e} is not connected`);return t}get connected(){return Ue(this,Ne,\"f\")}isEndpointConnected(e){return Ue(this,He,\"f\").has(e)}addEndpoint(e,t){if(!Ue(this,Ne,\"f\"))return void console.warn(`Adding endpoint to disconnected ${this.StrategyName} Strategy`);const n=new this.EndpointType(t);Ue(this,We,\"f\")&&n.receive(Ue(this,We,\"f\")),Ue(this,He,\"f\").set(e,n)}async closeEndpoint(e){Ue(this,He,\"f\").delete(e)}},We=new WeakMap,He=new WeakMap,Ne=new WeakMap,Object.defineProperty(Fe,\"__esModule\",{value:!0}),Fe.RTCInfo=Fe.RTCStrategy=void 0;const ze=je,Ke=De;class qe extends Ke.EndpointStrategy{constructor(){super(ze.RTCEndpoint,ze.RTCEndpoint.isValidEndpointPayload,\"RTC\")}}Fe.RTCStrategy=qe,Fe.RTCInfo={version:2,minimumVersion:0,type:\"rtc\"};var Je={};Object.defineProperty(Je,\"__esModule\",{value:!0}),Je.RTCICEManager=void 0;const Ye=d;class Ze extends Ye.EmitterBase{constructor(e){super(e,\"channel\"),this.ensureChannelOpened=e=>new Promise(((t,n)=>{if(\"open\"===e.readyState)t();else if(\"connecting\"===e.readyState){const n=()=>{e.removeEventListener(\"open\",n),t()};e.addEventListener(\"open\",n)}else n(new Error(\"This Channel has already closed\"))}))}static createDataChannelPromise(e,t){let n;const i=new Promise((e=>{n=e})),r=i=>{const o=()=>{i.channel.removeEventListener(\"open\",o),n(i.channel)};i.channel.label===e&&(i.channel.addEventListener(\"open\",o),t.removeEventListener(\"datachannel\",r))};return t.addEventListener(\"datachannel\",r),i}async listenForProviderIce(e,t){await this.on(this.createProviderEventName(e),t,{timestamp:Date.now()})}async raiseProviderIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createProviderEventName(e)),t)}async listenForClientIce(e,t){await this.on(this.createClientEventName(e),t,{timestamp:Date.now()})}async raiseClientIce(e,t){await this.wire.environment.raiseEvent(this.createRouteString(this.createClientEventName(e)),t)}cleanupIceListeners(e){this.removeAllListeners(this.createClientEventName(e)),this.removeAllListeners(this.createProviderEventName(e))}createClientEventName(e){return`ice-client-${e}`}createProviderEventName(e){return`ice-provider-${e}`}createRouteString(e){return`channel/${e}`}createRtcPeer(){return this.wire.environment.getRtcPeer()}async startClientOffer(){const e=Math.random().toString(),t=this.createRtcPeer();t.addEventListener(\"icecandidate\",(async t=>{t.candidate&&await this.raiseClientIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForProviderIce(e,(async e=>{await t.addIceCandidate(e.candidate)}));const n={request:t.createDataChannel(\"request\"),response:t.createDataChannel(\"response\")},i=await t.createOffer();await t.setLocalDescription(i);const r=Promise.all([n.request,n.response].map(this.ensureChannelOpened)).then((()=>{}));return{rtcClient:t,channels:n,offer:i,rtcConnectionId:e,channelsOpened:r}}async finishClientOffer(e,t,n){return await e.setRemoteDescription(t),await n,!0}async createProviderAnswer(e,t){const n=this.createRtcPeer(),i=Ze.createDataChannelPromise(\"request\",n),r=Ze.createDataChannelPromise(\"response\",n);n.addEventListener(\"icecandidate\",(async t=>{t.candidate&&await this.raiseProviderIce(e,{candidate:t.candidate?.toJSON()})})),await this.listenForClientIce(e,(async e=>{await n.addIceCandidate(e.candidate)})),await n.setRemoteDescription(t);const o=await n.createAnswer();await n.setLocalDescription(o);const s=Promise.all([i,r]).then((([t,n])=>(this.cleanupIceListeners(e),{request:t,response:n})));return{rtcClient:n,answer:o,channels:s}}}Je.RTCICEManager=Ze;var Qe={},Xe={};function et(e){return[...e.split(\".\").reverse().entries()].reduce(((e,[t,n])=>e+ +n*1e4**t),0)}function tt(e,t){return et(e)>=et(t)}function nt(e){return e.split(\"/\")[0]}Object.defineProperty(Xe,\"__esModule\",{value:!0}),Xe.runtimeUuidMeetsMinimumRuntimeVersion=Xe.parseRuntimeUuid=Xe.meetsMinimumRuntimeVersion=void 0,Xe.meetsMinimumRuntimeVersion=tt,Xe.parseRuntimeUuid=nt,Xe.runtimeUuidMeetsMinimumRuntimeVersion=function(e,t){return tt(nt(e),t)};var it,rt,ot,st,at,ct=s&&s.__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)},dt=s&&s.__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};Object.defineProperty(Qe,\"__esModule\",{value:!0}),Qe.ChannelProvider=void 0;const ht=pe,lt=Xe;class ut extends ht.ChannelBase{get connections(){return[...ct(this,it,\"f\")]}static handleClientDisconnection(e,t){const n=e.connections.find((e=>e.endpointId===t.endpointId));if(n)ct(e,st,\"f\").call(e,n);else{e.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name)).forEach(ct(e,st,\"f\"))}e.disconnectListener(t)}static setProviderRemoval(e,t){ut.removalMap.set(e,t)}constructor(e,t,n){super(),it.set(this,void 0),rt.set(this,void 0),ot.set(this,void 0),st.set(this,(e=>{const t=this.connections.filter((t=>t.endpointId!==e.endpointId));ct(this,ot,\"f\").closeEndpoint(e.endpointId),dt(this,it,t,\"f\")})),this.processAction=async(e,t,n)=>(ut.clientIsMultiRuntime(n)&&!(0,lt.runtimeUuidMeetsMinimumRuntimeVersion)(n.runtimeUuid,\"18.87.56.0\")?this.handleMultiRuntimeLegacyClient(n):this.checkForClientConnection(n),super.processAction(e,t,n)),at.set(this,(()=>{ct(this,ot,\"f\").close();const e=ut.removalMap.get(this);e&&e()})),dt(this,rt,new ht.ProtectedItems(e,t),\"f\"),this.connectListener=()=>{},this.disconnectListener=()=>{},dt(this,it,[],\"f\"),dt(this,ot,n,\"f\"),n.receive(this.processAction)}dispatch(e,t,n){const i=e.endpointId??this.getEndpointIdForOpenFinId(e,t);return i&&ct(this,ot,\"f\").isEndpointConnected(i)?ct(this,ot,\"f\").send(i,t,n):Promise.reject(new Error(`Client connection with identity uuid: ${e.uuid} / name: ${e.name} / endpointId: ${i} no longer connected.`))}async processConnection(e,t){return ct(this,it,\"f\").push(e),this.connectListener(e,t)}publish(e,t){return this.connections.map((n=>ct(this,ot,\"f\").send(n.endpointId,e,t)))}onConnection(e){this.connectListener=e}onDisconnection(e){this.disconnectListener=e}async destroy(){const e=ct(this,rt,\"f\");e.providerIdentity,dt(this,it,[],\"f\"),await e.close(),ct(this,at,\"f\").call(this)}async getAllClientInfo(){return this.connections.map((e=>{const{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}=e;return{uuid:t,name:n,endpointId:i,entityType:r,connectionUrl:o}}))}checkForClientConnection(e){if(!this.isClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider.\\n Client Identity: {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}isClientConnected(e){return ut.clientIdentityIncludesEndpointId(e)?this.connections.some((t=>t.endpointId===e.endpointId&&t.uuid===e.uuid&&t.name===e.name)):this.isLegacyClientConnected(e)}isLegacyClientConnected(e){return this.connections.some((t=>t.uuid===e.uuid&&t.name===e.name))}handleMultiRuntimeLegacyClient(e){if(!this.isLegacyClientConnected(e))throw new Error(`This action was sent from a client that is not connected to the provider. Client Identity:\\n {uuid: ${e.uuid}, name: ${e.name}, endpointId: ${e.endpointId}}`)}getEndpointIdForOpenFinId(e,t){const n=this.connections.filter((t=>t.name===e.name&&t.uuid===e.uuid));if(n.length>=2){const n=ct(this,rt,\"f\"),{uuid:i,name:r}=e,o=n?.providerIdentity.uuid,s=n?.providerIdentity.name;console.warn(`WARNING: Dispatch call may have unintended results. The \"to\" argument of your dispatch call is missing the\\n \"endpointId\" parameter. The identity you are dispatching to ({uuid: ${i}, name: ${r}})\\n has multiple channelClients for this channel. Your dispatched action: (${t}) from the provider:\\n ({uuid: ${o}, name: ${s}}) will only be processed by the most recently-created client.`)}return n.pop()?.endpointId}static clientIdentityIncludesEndpointId(e){return void 0!==e.endpointId}static clientIsMultiRuntime(e){return void 0!==e.runtimeUuid}static async wireClose(e,t){await e.sendAction(\"destroy-channel\",{channelName:t})}}Qe.ChannelProvider=ut,it=new WeakMap,rt=new WeakMap,ot=new WeakMap,st=new WeakMap,at=new WeakMap,ut.removalMap=new WeakMap;var pt={};Object.defineProperty(pt,\"__esModule\",{value:!0}),pt.MessageReceiver=void 0;const wt=ue,yt=d;class ft extends yt.Base{constructor(e){super(e),this.onmessage=e=>\"process-channel-message\"===e.action&&(this.processChannelMessage(e),!0),this.endpointMap=new Map,this.latestEndpointIdByChannelId=new Map,e.registerMessageHandler(this.onmessage.bind(this))}async processChannelMessage(e){const{senderIdentity:t,providerIdentity:n,action:i,ackToSender:r,payload:o,intendedTargetIdentity:s}=e.payload,a=s.channelId??s.endpointId??this.latestEndpointIdByChannelId.get(n.channelId),c=this.endpointMap.get(a);if(!c)return r.payload.success=!1,r.payload.reason=`Client connection with identity uuid: ${this.wire.me.uuid} / name: ${this.wire.me.name} / endpointId: ${a} no longer connected.`,this.wire.sendRaw(r);try{const e=await c(i,o,t);return r.payload.payload=r.payload.payload||{},r.payload.payload.result=e,this.wire.sendRaw(r)}catch(e){return r.payload.success=!1,r.payload.reason=e.message,this.wire.sendRaw(r)}}addEndpoint(e,t,n){this.endpointMap.set(n,e),t!==n&&this.latestEndpointIdByChannelId.set(t,n)}removeEndpoint(e,t){this.endpointMap.delete(t),this.latestEndpointIdByChannelId.get(e)===t&&this.latestEndpointIdByChannelId.delete(e)}checkForPreviousClientConnection(e){const t=this.latestEndpointIdByChannelId.get(e);t&&(wt.ChannelClient.closeChannelByEndpointId(t),console.warn(\"You have created a second connection to an older provider. First connection has been removed from the clientMap\"),console.warn(\"If the provider calls publish(), you may receive multiple messages.\"))}}pt.MessageReceiver=ft;var gt={};Object.defineProperty(gt,\"__esModule\",{value:!0}),gt.ProtocolManager=void 0;gt.ProtocolManager=class{constructor(e){this.ProtocolsInPreferenceOrder=e,this.DefaultClientProtocols=[\"classic\"],this.DefaultProviderProtocols=[\"classic\"],this.getClientProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultClientProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(\", \")}.`);return t},this.getProviderProtocols=e=>{const t=e?this.ProtocolsInPreferenceOrder.filter((t=>e.includes(t))):this.DefaultProviderProtocols;if(!t.length)throw new Error(`No valid protocols were passed in. Accepted values are: ${this.ProtocolsInPreferenceOrder.join(\", \")}.`);return t},this.getCompatibleProtocols=(e,t)=>t.supportedProtocols.filter((t=>e.some((e=>e.type===t.type&&t.version>=e.minimumVersion&&e.version>=(t.minimumVersion??0))))).slice(0,t.maxProtocols)}};var mt={};Object.defineProperty(mt,\"__esModule\",{value:!0});class vt{static combine(e,t){return new vt(e,t)}constructor(e,t){this.primary=e,this.secondary=t}onEndpointDisconnect(e,t){this.primary.onEndpointDisconnect(e,(()=>{this.secondary.isEndpointConnected(e)||t()})),this.secondary.onEndpointDisconnect(e,(()=>{this.primary.isEndpointConnected(e)||t()}))}isValidEndpointPayload(e){return this.primary.isValidEndpointPayload(e)||this.secondary.isValidEndpointPayload(e)}async closeEndpoint(e){await this.primary.closeEndpoint(e),await this.secondary.closeEndpoint(e)}isEndpointConnected(e){return this.primary.isEndpointConnected(e)||this.secondary.isEndpointConnected(e)}async addEndpoint(e,t){this.primary.isValidEndpointPayload(t)&&await this.primary.addEndpoint(e,t),this.secondary.isValidEndpointPayload(t)&&await this.secondary.addEndpoint(e,t)}receive(e){this.primary.receive(e),this.secondary.receive(e)}send(e,t,n){return this.primary.isEndpointConnected(e)?this.primary.send(e,t,n):this.secondary.send(e,t,n)}async close(){await Promise.all([this.primary.close(),this.secondary.close()])}}mt.default=vt;var Ct,bt,It=s&&s.__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},Et=s&&s.__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)},xt=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(xe,\"__esModule\",{value:!0}),xe.ConnectionManager=void 0;const At=Ae,Pt=d,Mt=Oe,_t=Fe,Ot=Je,St=Qe,Rt=pt,Ft=gt,jt=xt(mt);class kt extends Pt.Base{static getProtocolOptionsFromStrings(e){return e.map((e=>{switch(e){case\"rtc\":return _t.RTCInfo;case\"classic\":return Mt.ClassicInfo;default:return(0,At.exhaustiveCheck)(e,[\"rtc\",\"classic\"])}}))}constructor(e){super(e),Ct.set(this,void 0),bt.set(this,void 0),this.removeChannelFromProviderMap=e=>{this.providerMap.delete(e)},this.onmessage=e=>\"process-channel-connection\"===e.action&&(this.processChannelConnection(e),!0),this.providerMap=new Map,this.protocolManager=new Ft.ProtocolManager(\"node\"===this.wire.environment.type?[\"classic\"]:[\"rtc\",\"classic\"]),It(this,Ct,new Rt.MessageReceiver(e),\"f\"),It(this,bt,new Ot.RTCICEManager(e),\"f\"),e.registerMessageHandler(this.onmessage.bind(this))}createProvider(e,t){const n=Object.assign(this.wire.environment.getDefaultChannelOptions().create,e||{}),i=this.protocolManager.getProviderProtocols(n?.protocols),r=i.map((e=>{switch(e){case\"rtc\":return new _t.RTCStrategy;case\"classic\":return new Mt.ClassicStrategy(this.wire,Et(this,Ct,\"f\"),t.channelId,t);default:return(0,At.exhaustiveCheck)(e,[\"rtc\",\"classic\"])}}));let o;if(2===r.length){const[e,t]=r;o=jt.default.combine(e,t)}else{if(1!==r.length)throw new Error(\"failed to combine strategies\");[o]=r}const s=new St.ChannelProvider(t,(()=>St.ChannelProvider.wireClose(this.wire,t.channelName)),o),a=t.channelId;return this.providerMap.set(a,{provider:s,strategy:o,supportedProtocols:kt.getProtocolOptionsFromStrings(i)}),St.ChannelProvider.setProviderRemoval(s,this.removeChannelFromProviderMap.bind(this)),s}async createClientOffer(e){const t=this.protocolManager.getClientProtocols(e?.protocols);let n;return{offer:{supportedProtocols:await Promise.all(t.map((async e=>{switch(e){case\"rtc\":{const{rtcClient:e,channels:t,offer:i,rtcConnectionId:r,channelsOpened:o}=await Et(this,bt,\"f\").startClientOffer();return n={rtcClient:e,channels:t,channelsOpened:o},{type:\"rtc\",version:_t.RTCInfo.version,payload:{offer:i,rtcConnectionId:r}}}case\"classic\":return{type:\"classic\",version:Mt.ClassicInfo.version};default:return(0,At.exhaustiveCheck)(e,[\"rtc\",\"classic\"])}}))),maxProtocols:2},rtc:n}}async createClientStrategy(e,t){t.endpointId||(t.endpointId=this.wire.environment.getNextMessageId(),Et(this,Ct,\"f\").checkForPreviousClientConnection(t.channelId));const n=t.answer??{supportedProtocols:[{type:\"classic\",version:1}]},i=(await Promise.all(n.supportedProtocols.map((async n=>\"rtc\"===n.type&&e?(await Et(this,bt,\"f\").finishClientOffer(e.rtcClient,n.payload.answer,e.channelsOpened),new _t.RTCStrategy):\"classic\"===n.type?new Mt.ClassicStrategy(this.wire,Et(this,Ct,\"f\"),t.endpointId,t):null)))).filter((e=>null!==e));let r;if(e&&!i.some((e=>e instanceof _t.RTCStrategy))&&e&&e.rtcClient.close(),i.length>=2)r=jt.default.combine(i[0],i[1]);else{if(!i.length)throw new Error(\"No compatible protocols\");[r]=i}const o={endpointIdentity:t,rtc:e};return r.addEndpoint(t.channelId,o),r}async processChannelConnection(e){const{clientIdentity:t,providerIdentity:n,ackToSender:i,payload:r,offer:o}=e.payload;t.endpointId?t.isLocalEndpointId=!1:(t.endpointId=this.wire.environment.getNextMessageId(),t.isLocalEndpointId=!0);const s=n.channelId,a=this.providerMap.get(s);if(!a)return i.payload.success=!1,i.payload.reason=`Channel \"${n.channelName}\" has been destroyed.`,this.wire.sendRaw(i);const{provider:c,strategy:d,supportedProtocols:h}=a;try{if(!(c instanceof St.ChannelProvider))throw Error(\"Cannot connect to a channel client\");const e=o??{supportedProtocols:[{type:\"classic\",version:1}],maxProtocols:1},n=this.protocolManager.getCompatibleProtocols(h,e);if(!n.length)throw new Error(\"This provider does not support any of the offered protocols.\");const s=await c.processConnection(t,r);i.payload.payload=i.payload.payload||{};let a={supportedProtocols:[],endpointPayloadPromise:Promise.resolve({endpointIdentity:t})};return a=await n.reduce((async(e,t)=>{const n=await e;if(\"rtc\"===t.type){const{answer:e,rtcClient:i,channels:r}=await Et(this,bt,\"f\").createProviderAnswer(t.payload.rtcConnectionId,t.payload.offer);n.supportedProtocols.push({type:\"rtc\",version:_t.RTCInfo.version,payload:{answer:e}}),n.endpointPayloadPromise=n.endpointPayloadPromise.then((e=>r.then((t=>({...e,rtc:{rtcClient:i,channels:t}})))))}else n.supportedProtocols.push({type:\"classic\",version:Mt.ClassicInfo.version});return n}),Promise.resolve(a)),a.endpointPayloadPromise.then((e=>d.addEndpoint(t.endpointId,e))),i.payload.payload.result=s,i.payload.payload.answer=a,this.wire.sendRaw(i)}catch(e){return i.payload.success=!1,i.payload.reason=e.message,this.wire.sendRaw(i)}}}xe.ConnectionManager=kt,Ct=new WeakMap,bt=new WeakMap;var Lt,Tt,$t,Bt=s&&s.__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},Gt=s&&s.__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)};Object.defineProperty(le,\"__esModule\",{value:!0}),le.Channel=void 0;const Wt=t,Ht=G,Nt=d,Dt=ue,Ut=xe,Vt=Qe;function zt(e){const t=Math.floor(e/10),n=Math.min(3e4,500*2**t);return new Promise((e=>{setTimeout((()=>{e(!1)}),n)}))}class Kt extends Nt.EmitterBase{constructor(e){super(e,\"channel\"),Lt.set(this,void 0),Tt.set(this,new Wt.EventEmitter),$t.set(this,new Ht.AsyncRetryableLazy((async()=>{await Promise.all([this.on(\"disconnected\",(e=>{Dt.ChannelClient.handleProviderDisconnect(e)})),this.on(\"connected\",((...e)=>{Gt(this,Tt,\"f\").emit(\"connected\",...e)}))]).catch((()=>new Error(\"error setting up channel connection listeners\")))}))),Bt(this,Lt,new Ut.ConnectionManager(e),\"f\")}async getAllChannels(){return this.wire.sendAction(\"get-all-channels\").then((({payload:e})=>e.data))}async onChannelConnect(e){await this.on(\"connected\",e)}async onChannelDisconnect(e){await this.on(\"disconnected\",e)}async safeConnect(e,t,n){const i={count:0};do{let r=()=>{};const o=new Promise((t=>{r=n=>{e===n.channelName&&t(!0)},Gt(this,Tt,\"f\").on(\"connected\",r)}));try{if(i.count>0){i.gotConnectedEvent=await Promise.race([zt(i.count),o]);const t=await this.wire.sendAction(\"connect-to-channel\",{...n,retryInfo:i});return console.log(`Successfully connected to channelName: ${e}`),t.payload.data}const t=this.wire.sendAction(\"connect-to-channel\",n);i.originalMessageId=t.messageId;return(await t).payload.data}catch(n){if(!n.message.includes(\"internal-nack\"))throw n;t&&0===i.count&&console.warn(`No channel found for channelName: ${e}. Waiting for connection...`)}finally{i.count+=1,Gt(this,Tt,\"f\").removeListener(\"connected\",r)}}while(t);throw new Error(`No channel found for channelName: ${e}.`)}async connect(e,t={}){if(await Gt(this,$t,\"f\").getValue(),!e||\"string\"!=typeof e)throw new Error(\"Please provide a channelName string to connect to a channel.\");const n={wait:!0,...this.wire.environment.getDefaultChannelOptions().connect,...t},{offer:i,rtc:r}=await Gt(this,Lt,\"f\").createClientOffer(n);let o;(this.fin.me.isFrame||this.fin.me.isView||this.fin.me.isWindow)&&(o=(await this.fin.me.getInfo()).url);const s={channelName:e,...n,offer:i,connectionUrl:o},a=await this.safeConnect(e,n.wait,s),c=await Gt(this,Lt,\"f\").createClientStrategy(r,a),d=new Dt.ChannelClient(a,(()=>Dt.ChannelClient.wireClose(this.wire,a,a.endpointId)),c);return c.onEndpointDisconnect(a.channelId,(async()=>{try{await d.sendDisconnectAction()}catch(e){console.warn(`Something went wrong during disconnect for client with uuid: ${a.uuid} / name: ${a.name} / endpointId: ${a.endpointId}.`)}finally{Dt.ChannelClient.handleProviderDisconnect(a)}})),d}async create(e,t){if(!e)throw new Error(\"Please provide a channelName to create a channel\");const{payload:{data:n}}=await this.wire.sendAction(\"create-channel\",{channelName:e}),i=Gt(this,Lt,\"f\").createProvider(t,n);return this.on(\"client-disconnected\",(t=>{t.channelName===e&&Vt.ChannelProvider.handleClientDisconnection(i,t)})),i}}le.Channel=Kt,Lt=new WeakMap,Tt=new WeakMap,$t=new WeakMap,Object.defineProperty(de,\"__esModule\",{value:!0}),de.InterAppPayload=de.InterApplicationBus=void 0;const qt=t,Jt=d,Yt=he,Zt=le,Qt=O;class Xt extends Jt.Base{constructor(e){super(e),this.events={subscriberAdded:\"subscriber-added\",subscriberRemoved:\"subscriber-removed\"},this.refCounter=new Yt.RefCounter,this.Channel=new Zt.Channel(e),this.emitter=new qt.EventEmitter,e.registerMessageHandler(this.onmessage.bind(this)),this.on=this.emitter.on.bind(this.emitter),this.removeAllListeners=this.emitter.removeAllListeners.bind(this.emitter)}async publish(e,t){await this.wire.sendAction(\"publish-message\",{topic:e,message:t,sourceWindowName:this.me.name})}async send(e,t,n){const i=(0,Qt.validateIdentity)(e);if(i)throw new Error(i);await this.wire.sendAction(\"send-message\",{destinationUuid:e.uuid,destinationWindowName:e.name,topic:t,message:n,sourceWindowName:this.me.name})}subscribe(e,t,n){const i=this.createSubscriptionKey(e.uuid,e.name||\"*\",t);return this.emitter.on(i,n),this.refCounter.actOnFirst(i,(async()=>{await this.wire.sendAction(\"subscribe\",{sourceUuid:e.uuid,sourceWindowName:e.name||\"*\",topic:t,destinationWindowName:this.me.name})}),(()=>Promise.resolve()))}unsubscribe(e,t,n){const i=e.name||\"*\",r=this.createSubscriptionKey(e.uuid,i,t);return this.emitter.removeListener(r,n),this.refCounter.actOnLast(r,(async()=>{await this.wire.sendAction(\"unsubscribe\",{sourceUuid:e.uuid,sourceWindowName:i,topic:t,destinationWindowName:this.me.name})}),(()=>new Promise((e=>e)).then((()=>{}))))}processMessage(e){const{payload:{message:t,sourceWindowName:n,sourceUuid:i,topic:r}}=e,o=[this.createSubscriptionKey(i,n,r),this.createSubscriptionKey(i,\"*\",r),this.createSubscriptionKey(\"*\",\"*\",r)],s={uuid:i,name:n};o.forEach((e=>{this.emitter.emit(e,t,s)}))}emitSubscriverEvent(e,t){const{payload:{targetName:n,uuid:i,topic:r}}=t,o={name:n,uuid:i,topic:r};this.emitter.emit(e,o)}createSubscriptionKey(e,t,n){const i=t||\"*\";if(!(e&&i&&n))throw new Error(\"Missing uuid, name, or topic string\");return function(...e){return e.map((e=>Buffer.from(`${e}`).toString(\"base64\"))).join(\"/\")}(e,i,n)}onmessage(e){const{action:t}=e;switch(t){case\"process-message\":this.processMessage(e);break;case this.events.subscriberAdded:this.emitSubscriverEvent(this.events.subscriberAdded,e);break;case this.events.subscriberRemoved:this.emitSubscriverEvent(this.events.subscriberRemoved,e)}return!0}}de.InterApplicationBus=Xt;de.InterAppPayload=class{};var en={};Object.defineProperty(en,\"__esModule\",{value:!0}),en.Clipboard=void 0;const tn=d;class nn extends tn.Base{async writeText(e){await this.wire.sendAction(\"clipboard-write-text\",e)}async readText(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-text\",{type:e});return t.data}async writeImage(e){await this.wire.sendAction(\"clipboard-write-image\",e)}async readImage(e={format:\"dataURL\"}){const{payload:t}=await this.wire.sendAction(\"clipboard-read-image\",e);return t.data}async writeHtml(e){await this.wire.sendAction(\"clipboard-write-html\",e)}async readHtml(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-html\",{type:e});return t.data}async writeRtf(e){await this.wire.sendAction(\"clipboard-write-rtf\",e)}async readRtf(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-rtf\",{type:e});return t.data}async write(e){await this.wire.sendAction(\"clipboard-write\",e)}async getAvailableFormats(e){const{payload:t}=await this.wire.sendAction(\"clipboard-read-formats\",{type:e});return t.data}}en.Clipboard=nn;var rn={},on={},sn={};Object.defineProperty(sn,\"__esModule\",{value:!0}),sn.ExternalApplication=void 0;const an=d;class cn extends an.EmitterBase{constructor(e,t){super(e,\"external-application\",t.uuid),this.identity=t}getInfo(){return this.wire.sendAction(\"get-external-application-info\",this.identity).then((({payload:e})=>e.data))}}sn.ExternalApplication=cn,Object.defineProperty(on,\"__esModule\",{value:!0}),on.ExternalApplicationModule=void 0;const dn=d,hn=sn;class ln extends dn.Base{wrap(e){return this.wire.sendAction(\"external-application-wrap\").catch((e=>{})),Promise.resolve(new hn.ExternalApplication(this.wire,{uuid:e}))}wrapSync(e){return this.wire.sendAction(\"external-application-wrap-sync\").catch((e=>{})),new hn.ExternalApplication(this.wire,{uuid:e})}}on.ExternalApplicationModule=ln,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(on,e),n(sn,e)}(rn);var un={},pn={},wn={};Object.defineProperty(wn,\"__esModule\",{value:!0}),wn._Frame=void 0;const yn=d;class fn extends yn.EmitterBase{constructor(e,t){super(e,\"frame\",t.uuid,t.name),this.identity=t}getInfo(){return this.wire.sendAction(\"get-frame-info\",this.identity).then((({payload:e})=>e.data))}getParentWindow(){return this.wire.sendAction(\"get-parent-window\",this.identity).then((({payload:e})=>e.data))}}wn._Frame=fn,Object.defineProperty(pn,\"__esModule\",{value:!0}),pn._FrameModule=void 0;const gn=d,mn=O,vn=wn;class Cn extends gn.Base{async wrap(e){this.wire.sendAction(\"frame-wrap\").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}wrapSync(e){this.wire.sendAction(\"frame-wrap-sync\").catch((e=>{}));const t=(0,mn.validateIdentity)(e);if(t)throw new Error(t);return new vn._Frame(this.wire,e)}getCurrent(){return this.wire.sendAction(\"frame-get-current\").catch((e=>{})),Promise.resolve(new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity()))}getCurrentSync(){return this.wire.sendAction(\"frame-get-current-sync\").catch((e=>{})),new vn._Frame(this.wire,this.wire.environment.getCurrentEntityIdentity())}}pn._FrameModule=Cn,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(pn,e),n(wn,e)}(un);var bn={};Object.defineProperty(bn,\"__esModule\",{value:!0}),bn.GlobalHotkey=void 0;const In=d;class En extends In.EmitterBase{constructor(e){super(e,\"global-hotkey\")}async register(e,t){await this.on(e,t),await this.wire.sendAction(\"global-hotkey-register\",{hotkey:e})}async unregister(e){await this.removeAllListeners(e),await this.wire.sendAction(\"global-hotkey-unregister\",{hotkey:e})}async unregisterAll(){await Promise.all(this.eventNames().filter((e=>!(\"registered\"===e||\"unregistered\"===e))).map((e=>this.removeAllListeners(e)))),await this.wire.sendAction(\"global-hotkey-unregister-all\",{})}async isRegistered(e){const{payload:{data:t}}=await this.wire.sendAction(\"global-hotkey-is-registered\",{hotkey:e});return t}}bn.GlobalHotkey=En;var xn,An={},Pn={},Mn={},_n=s&&s.__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)};Object.defineProperty(Mn,\"__esModule\",{value:!0}),Mn.Platform=void 0;const On=d,Sn=O,Rn=new Map;class Fn extends On.EmitterBase{constructor(e,t){super(t.wire,\"application\",e.uuid),this.getClient=e=>{this.wire.sendAction(\"platform-get-client\",this.identity).catch((e=>{}));const t=e||this.identity,{uuid:n}=t;if(!Rn.has(n)){const e=_n(this,xn,\"f\").call(this,n);Rn.set(n,e)}return Rn.get(n)},xn.set(this,(async e=>{try{const t=`custom-frame-${e}`,n=await this._channel.connect(t,{wait:!1});return n.onDisconnection((()=>{Rn.delete(e)})),n}catch(t){throw Rn.delete(e),new Error(\"The targeted Platform is not currently running. Listen for application-started event for the given Uuid.\")}})),this.launchLegacyManifest=this.launchContentManifest;const n=(0,Sn.validateIdentity)(e);if(n)throw new Error(n);this._channel=t,this.identity={uuid:e.uuid},this.Layout=this.fin.Platform.Layout,this.Application=this.fin.Application.wrapSync(this.identity)}async createView(e,t,n){this.wire.sendAction(\"platform-create-view\",this.identity).catch((e=>{}));const i=await this.getClient(),r=await i.dispatch(\"create-view\",{target:t,opts:e,targetView:n});if(!r||(0,Sn.validateIdentity)(r.identity))throw new Error(`When overwriting the createView call, please return an object that has a valid 'identity' property: ${JSON.stringify(r)}`);return this.fin.View.wrapSync(r.identity)}async createWindow(e){this.wire.sendAction(\"platform-create-window\",this.identity).catch((e=>{}));const t=await this.getClient();e.reason||(e.reason=\"api-call\");const n=await t.dispatch(\"create-view-container\",e);if(!n||(0,Sn.validateIdentity)(n.identity))throw new Error(`When overwriting the createWindow call, please return an object that has a valid 'identity' property: ${JSON.stringify(n)}`);const{identity:i}=n,r=this.fin.Window.wrapSync(i);return r.name=i.name,r.uuid=i.uuid,r}async quit(){this.wire.sendAction(\"platform-quit\",this.identity).catch((e=>{}));return(await this.getClient()).dispatch(\"quit\")}async closeView(e){this.wire.sendAction(\"platform-close-view\",this.identity).catch((e=>{}));const t=await this.getClient();await t.dispatch(\"close-view\",{view:e})}async reparentView(e,t){console.warn(\"Platform.reparentView has been deprecated, please use Platform.createView\"),this.wire.sendAction(\"platform-reparent-view\",this.identity).catch((e=>{}));const n={...e,uuid:e.uuid??this.identity.uuid},i=await this.fin.View.wrap(n),r=await i.getOptions();return this.createView(r,t)}async getSnapshot(){this.wire.sendAction(\"platform-get-snapshot\",this.identity).catch((e=>{}));return(await this.getClient()).dispatch(\"get-snapshot\")}async getViewSnapshot(e){return(await this.getClient()).dispatch(\"get-view-snapshot\",{viewIdentity:e})}async applySnapshot(e,t){this.wire.sendAction(\"platform-apply-snapshot\",this.identity).catch((e=>{}));const n=\"Requested snapshot must be a valid Snapshot object, or a url or filepath to such an object.\";let i;if(\"string\"==typeof e)try{i=(await this._channel.wire.sendAction(\"get-application-manifest\",{manifestUrl:e})).payload.data}catch(e){throw new Error(`${n}: ${e}`)}else i=e;if(!i.windows)throw new Error(n);const r=await this.getClient();return await r.dispatch(\"apply-snapshot\",{snapshot:i,options:t}),this}async fetchManifest(e){return(await this.getClient()).dispatch(\"platform-fetch-manifest\",{manifestUrl:e})}async launchContentManifest(e){this.wire.sendAction(\"platform-launch-content-manifest\",this.identity).catch((()=>{}));const t=await this.getClient(),n=await this.fetchManifest(e);return t.dispatch(\"launch-into-platform\",{manifest:n,manifestUrl:e}),this}async setWindowContext(e={},t){if(this.wire.sendAction(\"platform-set-window-context\",this.identity).catch((e=>{})),!e)throw new Error(\"Please provide a serializable object or string to set the context.\");const n=await this.getClient(),{entityType:i}=t?await this.fin.System.getEntityInfo(t.uuid,t.name):this.fin.me;await n.dispatch(\"set-window-context\",{context:e,entityType:i,target:t||{uuid:this.fin.me.uuid,name:this.fin.me.name}})}async getWindowContext(e){this.wire.sendAction(\"platform-get-window-context\",this.identity).catch((e=>{}));const t=await this.getClient(),{entityType:n}=e?await this.fin.System.getEntityInfo(e.uuid,e.name):this.fin.me;return t.dispatch(\"get-window-context\",{target:e||{uuid:this.fin.me.uuid,name:this.fin.me.name},entityType:n})}async closeWindow(e,t={skipBeforeUnload:!1}){this.wire.sendAction(\"platform-close-window\",this.identity).catch((e=>{}));return(await this.getClient()).dispatch(\"close-window\",{windowId:e,options:t})}}Mn.Platform=Fn,xn=new WeakMap;var jn={},kn={},Ln={},Tn={};function $n(e){switch(e){case\"columns\":case\"grid\":case\"rows\":case\"tabs\":return!0;default:return!1}}Object.defineProperty(Tn,\"__esModule\",{value:!0}),Tn.overrideFromComposables=Tn.isValidPresetType=void 0,Tn.isValidPresetType=$n,Tn.overrideFromComposables=function(...e){return t=>e.reduceRight(((e,t)=>n=>t(e(n))),(e=>e))(t)},Tn.default={isValidPresetType:$n};var Bn={},Gn={},Wn={};Object.defineProperty(Wn,\"__esModule\",{value:!0}),Wn.ApiConsumer=void 0;Wn.ApiConsumer=class{constructor(e){this.strategy=e,this.consume=async e=>(await this.strategy.getExposedFunctions(e)).reduce(((t,n)=>({...t,[n.key]:this.strategy.createFunction(n,e)})),{})}};var Hn={},Nn={};Object.defineProperty(Nn,\"__esModule\",{value:!0}),Nn.expose=Nn.getExposedProperties=void 0;const Dn=Symbol(\"exposedProperties\");Nn.getExposedProperties=e=>e[Dn]||e.prototype[Dn]||[];Nn.expose=e=>(t,n,i)=>{t[Dn]=t[Dn]||[],t[Dn].push({key:n,descriptor:i,options:e})},Object.defineProperty(Hn,\"__esModule\",{value:!0}),Hn.ApiExposer=void 0;const Un=Nn;Hn.ApiExposer=class{constructor(e){this.strategy=e,this.exposeInstance=async(e,t)=>{const n=(0,Un.getExposedProperties)(e),i=await Promise.all(n.map((async({key:n,options:i})=>({key:n,options:await this.strategy.exposeFunction(e[n].bind(e),{key:n,options:i,meta:t})}))));await this.strategy.exposeMeta(t,i)}}};var Vn={},zn={},Kn={};Object.defineProperty(Kn,\"__esModule\",{value:!0}),Kn.ChannelsConsumer=void 0;Kn.ChannelsConsumer=class{constructor(e){this.channel=e,this.getExposedFunctions=async e=>{const{id:t}=e,{props:n}=await this.channel.dispatch(`api-meta:${t}`);return n},this.createFunction=e=>(...t)=>{const{action:n}=e.options;return this.channel.dispatch(n,{args:t})}}};var qn={};Object.defineProperty(qn,\"__esModule\",{value:!0}),qn.ChannelsExposer=void 0;qn.ChannelsExposer=class{constructor(e){this.channelProviderOrClient=e,this.exposeFunction=async(e,t)=>{const{key:n,options:i,meta:r}=t,{id:o}=r,s=`${o}.${i?.action||n}`;return await this.channelProviderOrClient.register(s,(async({args:t})=>e(...t))),{action:s}},this.exposeMeta=async({id:e},t)=>{const n=`api-meta:${e}`;await this.channelProviderOrClient.register(n,(()=>({props:t})))}}},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Kn,e),n(qn,e)}(zn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(zn,e)}(Vn),function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Wn,e),n(Hn,e),n(Vn,e),n(Nn,e)}(Gn);var Jn={};Object.defineProperty(Jn,\"__esModule\",{value:!0}),Jn.createRelayedDispatch=exports.relayChannelClientApi_1=Jn.relayChannelClientApi=void 0;const Yn=[\"no longer connected\",\"RTCDataChannel closed unexpectedly\",\"The client you are trying to dispatch from is disconnected from the target provider\"];exports.relayChannelClientApi_1=Jn.relayChannelClientApi=async(e,t)=>{e.register(`relay:${t}`,(({action:t,target:n,payload:i})=>e.dispatch(n,t,i))),await Promise.resolve()};Jn.createRelayedDispatch=(e,t,n,i)=>async(r,o)=>{try{return await e.dispatch(`relay:${n}`,{action:r,payload:o,target:t})}catch(e){if(s=e.message,Yn.some((e=>s.includes(e)))&&i)throw new Error(i);throw e}var s};var Zn,Qn,Xn,ei=s&&s.__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},ti=s&&s.__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)};Object.defineProperty(Bn,\"__esModule\",{value:!0}),Bn.ColumnOrRow=Bn.TabStack=Bn.LayoutNode=void 0;const ni=Gn,ii=Jn;class ri{constructor(e,t){Zn.set(this,void 0),this.isRoot=()=>ti(this,Zn,\"f\").isRoot(this.entityId),this.exists=()=>ti(this,Zn,\"f\").exists(this.entityId),this.getParent=async()=>{const e=await ti(this,Zn,\"f\").getParent(this.entityId);if(e)return ri.getEntity(e,ti(this,Zn,\"f\"))},this.createAdjacentStack=async(e,t)=>{const n=await ti(this,Zn,\"f\").createAdjacentStack(this.entityId,e,t);return ri.getEntity({entityId:n,type:\"stack\"},ti(this,Zn,\"f\"))},this.getAdjacentStacks=async e=>(await ti(this,Zn,\"f\").getAdjacentStacks({targetId:this.entityId,edge:e})).map((e=>ri.getEntity({type:\"stack\",entityId:e.entityId},ti(this,Zn,\"f\")))),ei(this,Zn,e,\"f\"),this.entityId=t}}Bn.LayoutNode=ri,Zn=new WeakMap,ri.newLayoutEntitiesClient=async(e,t,n)=>{const i=(0,ii.createRelayedDispatch)(e,n,\"layout-relay\",\"You are trying to interact with a layout component on a window that does not exist or has been destroyed.\");return new ni.ApiConsumer(new ni.ChannelsConsumer({dispatch:i})).consume({id:t})},ri.getEntity=(e,t)=>{const{entityId:n,type:i}=e;switch(i){case\"column\":case\"row\":return new si(t,n,i);case\"stack\":return new oi(t,n);default:throw new Error(`Unrecognised Layout Entity encountered ('${JSON.stringify(e)})`)}};class oi extends ri{constructor(e,t){super(e,t),Qn.set(this,void 0),this.type=\"stack\",this.getViews=()=>ti(this,Qn,\"f\").getStackViews(this.entityId),this.addView=async(e,t={index:0})=>ti(this,Qn,\"f\").addViewToStack(this.entityId,e,t),this.removeView=async e=>{await ti(this,Qn,\"f\").removeViewFromStack(this.entityId,e)},this.setActiveView=async e=>{await ti(this,Qn,\"f\").setStackActiveView(this.entityId,e)},ei(this,Qn,e,\"f\")}}Bn.TabStack=oi,Qn=new WeakMap;class si extends ri{constructor(e,t,n){super(e,t),Xn.set(this,void 0),this.getContent=async()=>(await ti(this,Xn,\"f\").getContent(this.entityId)).map((e=>ri.getEntity(e,ti(this,Xn,\"f\")))),ei(this,Xn,e,\"f\"),this.type=n}}Bn.ColumnOrRow=si,Xn=new WeakMap;var ai={};Object.defineProperty(ai,\"__esModule\",{value:!0}),ai.DEFAULT_LAYOUT_KEY=ai.LAYOUT_CONTROLLER_ID=void 0,ai.LAYOUT_CONTROLLER_ID=\"layout-entities\",ai.DEFAULT_LAYOUT_KEY=\"__default__\";var ci,di,hi,li=s&&s.__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)};Object.defineProperty(Ln,\"__esModule\",{value:!0}),Ln.Layout=void 0;const ui=G,pi=O,wi=d,yi=Tn,fi=Bn,gi=ai;class mi extends wi.Base{static getClient(e){return li(e,di,\"f\").getValue()}constructor(e,t){super(t),ci.add(this),di.set(this,new ui.Lazy((async()=>fi.LayoutNode.newLayoutEntitiesClient(await this.platform.getClient(),gi.LAYOUT_CONTROLLER_ID,this.identity)))),this.replace=async e=>{this.wire.sendAction(\"layout-replace\").catch((e=>{}));const t=await this.platform.getClient();await t.dispatch(\"replace-layout\",{target:this.identity,opts:{layout:e}})},this.replaceView=async(e,t)=>{this.wire.sendAction(\"layout-replace-view\").catch((e=>{}));const n=await this.platform.getClient();await n.dispatch(\"replace-view\",{target:this.identity,opts:{viewToReplace:e,newView:t}})},this.applyPreset=async e=>{this.wire.sendAction(\"layout-apply-preset\").catch((e=>{}));const t=await this.platform.getClient(),{presetType:n}=e;if(!n||!(0,yi.isValidPresetType)(n))throw new Error(\"Cannot apply preset layout, please include an applicable presetType property in the PresetLayoutOptions.\");await t.dispatch(\"apply-preset-layout\",{target:this.identity,opts:{presetType:n}})};const n=(0,pi.validateIdentity)(e);if(n)throw new Error(n);this.identity=e,this.platform=this.fin.Platform.wrapSync({uuid:e.uuid}),e.uuid===this.fin.me.uuid&&e.name===this.fin.me.name&&(this.init=this.fin.Platform.Layout.init)}async getConfig(){this.wire.sendAction(\"layout-get-config\").catch((e=>{}));return(await this.platform.getClient()).dispatch(\"get-frame-snapshot\",{target:this.identity})}async getCurrentViews(){this.wire.sendAction(\"layout-get-views\").catch((e=>{}));const e=await this.platform.getClient();return(await e.dispatch(\"get-layout-views\",{target:this.identity})).map((e=>this.fin.View.wrapSync(e)))}async getRootItem(){this.wire.sendAction(\"layout-get-root-item\").catch((()=>{}));const e=await li(this,di,\"f\").getValue(),t=await e.getRoot(\"layoutName\"in this.identity?this.identity:void 0);return fi.LayoutNode.getEntity(t,e)}async getStackByViewIdentity(e){this.wire.sendAction(\"layout-get-stack-by-view\").catch((()=>{}));const t=await li(this,di,\"f\").getValue(),n=await t.getStackByView(e);if(!n)throw new Error(`No stack found for view: ${e.uuid}/${e.name}`);return fi.LayoutNode.getEntity(n,t)}async addView(e,{location:t,targetView:n}={}){this.wire.sendAction(\"layout-add-view\").catch((e=>{}));const{identity:i}=await li(this,ci,\"m\",hi).call(this,\"layout-add-view\",{viewOptions:e,location:t,targetView:n});return{identity:i}}async closeView(e){this.wire.sendAction(\"layout-close-view\").catch((e=>{})),await li(this,ci,\"m\",hi).call(this,\"layout-close-view\",{viewIdentity:e})}}Ln.Layout=mi,di=new WeakMap,ci=new WeakSet,hi=async function(e,t){return(await this.platform.getClient()).dispatch(e,{target:this.identity,opts:t})};var vi,Ci,bi,Ii,Ei,xi=s&&s.__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)},Ai=s&&s.__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};Object.defineProperty(kn,\"__esModule\",{value:!0}),kn.LayoutModule=void 0;const Pi=d,Mi=Ln,_i=ai;class Oi extends Pi.Base{constructor(){super(...arguments),vi.add(this),Ci.set(this,!1),bi.set(this,null),this.init=async(e={})=>{if(this.wire.sendAction(\"layout-init\").catch((e=>{})),!this.wire.environment.layoutAllowedInContext(this.fin))throw new Error(\"Layout.init can only be called from a Window context.\");if(xi(this,Ci,\"f\"))throw new Error(\"Layout.init was already called, please use Layout.create to add additional layouts.\");\"openfin\"===this.wire.environment.type&&await this.fin.Platform.getCurrentSync().getClient(),Ai(this,Ci,!0,\"f\"),Ai(this,bi,await this.wire.environment.initLayoutManager(this.fin,this.wire,e),\"f\"),await this.wire.environment.applyLayoutSnapshot(this.fin,xi(this,bi,\"f\"),e);const t={name:this.fin.me.name,uuid:this.fin.me.uuid};if(!e.layoutManagerOverride){const e={layoutName:_i.DEFAULT_LAYOUT_KEY,...t};return xi(this,Ii,\"f\").call(this,e)}return this.wrapSync(t)},Ii.set(this,(e=>{const t=\"[Layout] You are using a deprecated property `layoutManager` - it will throw if you access it starting in v37.\",n=new Proxy({},{get(e,n){throw console.warn(`[Layout-mgr-proxy] accessing ${n.toString()}`),new Error(t)}}),i=Object.assign(this.wrapSync(e),{layoutManager:n});return new Proxy(i,{get(e,n){if(\"layoutManager\"===n)throw console.warn(`[Layout-proxy] accessing ${n.toString()}`),new Error(t);return e[n]}})})),this.getCurrentLayoutManagerSync=()=>xi(this,vi,\"m\",Ei).call(this,\"fin.Platform.Layout.getCurrentLayoutManagerSync()\"),this.create=async e=>this.wire.environment.createLayout(xi(this,vi,\"m\",Ei).call(this,\"fin.Platform.Layout.create()\"),e),this.destroy=async e=>this.wire.environment.destroyLayout(xi(this,vi,\"m\",Ei).call(this,\"fin.Platform.Layout.destroy()\"),e)}async wrap(e){return this.wire.sendAction(\"layout-wrap\").catch((e=>{})),new Mi.Layout(e,this.wire)}wrapSync(e){return this.wire.sendAction(\"layout-wrap-sync\").catch((e=>{})),new Mi.Layout(e,this.wire)}async getCurrent(){if(this.wire.sendAction(\"layout-get-current\").catch((e=>{})),\"openfin\"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error(\"You are not in a Window context. Only Windows can have a Layout.\");const{uuid:e,name:t}=this.fin.me;return this.wrap({uuid:e,name:t})}getCurrentSync(){if(this.wire.sendAction(\"layout-get-current-sync\").catch((e=>{})),\"openfin\"===this.wire.environment.type&&!this.fin.me.isWindow)throw new Error(\"You are not in a Window context. Only Windows can have a Layout.\");const{uuid:e,name:t}=this.fin.me;return this.wrapSync({uuid:e,name:t})}async getLayoutByViewIdentity(e){this.wire.sendAction(\"layout-get-by-view-identity\").catch((()=>{}));let t=await this.wire.environment.getViewWindowIdentity(this.fin,e);t.identity&&(t=t.identity);try{const n=this.wrapSync(t),i=await Mi.Layout.getClient(n),r=await i.getLayoutIdentityForViewOrThrow(e);return this.wrapSync(r)}catch(n){if(![\"No action registered at target for\",\"getLayoutIdentityForViewOrThrow is not a function\"].some((e=>n.message.includes(e))))throw n;if(t.uuid===t.name)throw new Error(`View identity ${JSON.stringify(e)} is not attached to any layout in provider window ${JSON.stringify(t)}.`);return this.wrapSync(t)}}}kn.LayoutModule=Oi,Ci=new WeakMap,bi=new WeakMap,Ii=new WeakMap,vi=new WeakSet,Ei=function(e){if(!xi(this,bi,\"f\"))throw new Error(`You must call init before using the API ${e}`);return xi(this,bi,\"f\")},function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(kn,e),n(Ln,e)}(jn),Object.defineProperty(Pn,\"__esModule\",{value:!0}),Pn.PlatformModule=void 0;const Si=d,Ri=Mn,Fi=jn;class ji extends Si.Base{constructor(e,t){super(e),this._channel=t,this.Layout=new Fi.LayoutModule(this.wire)}async init(e){if(!fin.__internal_.isPlatform||fin.me.name!==fin.me.uuid)throw new Error(\"fin.Platform.init should only be called from a custom platform provider running in the main window of the application.\");return this.wire.environment.initPlatform(this.fin,e)}async wrap(e){return this.wire.sendAction(\"platform-wrap\").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}wrapSync(e){return this.wire.sendAction(\"platform-wrap-sync\").catch((e=>{})),new Ri.Platform({uuid:e.uuid},this._channel)}async getCurrent(){return this.wire.sendAction(\"platform-get-current\").catch((e=>{})),this.wrap({uuid:this.wire.me.uuid})}getCurrentSync(){return this.wire.sendAction(\"platform-get-current-sync\").catch((e=>{})),this.wrapSync({uuid:this.wire.me.uuid})}start(e){return this.wire.sendAction(\"platform-start\").catch((e=>{})),new Promise((async(t,n)=>{try{const{uuid:n}=e,i=await this.fin.Application._create({...e,isPlatformController:!0});i.once(\"platform-api-ready\",(()=>t(this.wrapSync({uuid:n})))),i._run({uuid:n})}catch(e){n(e)}}))}startFromManifest(e,t){return this.wire.sendAction(\"platform-start-from-manifest\").catch((e=>{})),new Promise((async(n,i)=>{try{const i=await this.fin.Application._createFromManifest(e);i.once(\"platform-api-ready\",(()=>n(this.wrapSync({uuid:i.identity.uuid})))),i._run(t)}catch(e){i(e)}}))}}Pn.PlatformModule=ji,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Pn,e),n(Mn,e)}(An);var ki={};!function(e){Object.defineProperty(e,\"__esModule\",{value:!0}),e.getMe=e.getBaseMe=e.environmentUnsupportedMessage=void 0;const t=J(),n=un,i=ie(),r=rn;function o(e,t,n){return{...{isView:\"view\"===e,isWindow:\"window\"===e,isFrame:\"iframe\"===e,isExternal:\"external connection\"===e},uuid:t,name:n,entityType:e}}e.environmentUnsupportedMessage=\"You are not running in OpenFin.\",e.getBaseMe=o,e.getMe=function(s){const{uuid:a,name:c,entityType:d}=s.me,h={setContext(){throw new Error(e.environmentUnsupportedMessage)},addContextHandler(){throw new Error(e.environmentUnsupportedMessage)},getContextGroups(){throw new Error(e.environmentUnsupportedMessage)},joinContextGroup(){throw new Error(e.environmentUnsupportedMessage)},removeFromContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getAllClientsInContextGroup(){throw new Error(e.environmentUnsupportedMessage)},getInfoForContextGroup(){throw new Error(e.environmentUnsupportedMessage)}},l=\"Interop API has not been instantiated. Either connection has failed or you have not declared interop in your config.\",u={setContext(){throw new Error(l)},addContextHandler(){throw new Error(l)},getContextGroups(){throw new Error(l)},joinContextGroup(){throw new Error(l)},removeFromContextGroup(){throw new Error(l)},getAllClientsInContextGroup(){throw new Error(l)},getInfoForContextGroup(){throw new Error(l)}},p={eventNames:()=>{throw new Error(e.environmentUnsupportedMessage)},emit:()=>{throw new Error(e.environmentUnsupportedMessage)},listeners:()=>{throw new Error(e.environmentUnsupportedMessage)},listenerCount:()=>{throw new Error(e.environmentUnsupportedMessage)},on:()=>{throw new Error(e.environmentUnsupportedMessage)},addListener:()=>{throw new Error(e.environmentUnsupportedMessage)},once:()=>{throw new Error(e.environmentUnsupportedMessage)},prependListener:()=>{throw new Error(e.environmentUnsupportedMessage)},prependOnceListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeListener:()=>{throw new Error(e.environmentUnsupportedMessage)},removeAllListeners:()=>{throw new Error(e.environmentUnsupportedMessage)}};switch(d){case\"view\":return Object.assign(new t.View(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case\"window\":return Object.assign(new i._Window(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case\"iframe\":return Object.assign(new n._Frame(s,{uuid:a,name:c}),o(d,a,c),{interop:u,isOpenFin:!0});case\"external connection\":return Object.assign(new r.ExternalApplication(s,{uuid:a}),o(d,a,c),{interop:u,isOpenFin:!1});default:return{...o(d,a,c),...p,interop:h,isOpenFin:!1}}}}(ki);var Li={},Ti={},$i={};Object.defineProperty($i,\"__esModule\",{value:!0}),$i.createWarningObject=$i.createUnusableObject=void 0,$i.createUnusableObject=function(e){const t=()=>{throw new Error(e)};return new Proxy({},{apply:t,construct:t,defineProperty:t,deleteProperty:t,get:t,getOwnPropertyDescriptor:t,getPrototypeOf:t,has:t,isExtensible:t,ownKeys:t,preventExtensions:t,set:t,setPrototypeOf:t})},$i.createWarningObject=function(e,t){return new Proxy(t,{get:(...t)=>(console.warn(e),Reflect.get(...t)),set:(...t)=>(console.warn(e),Reflect.set(...t)),getOwnPropertyDescriptor:(...t)=>(console.warn(e),Reflect.getOwnPropertyDescriptor(...t)),ownKeys:(...t)=>(console.warn(e),Reflect.ownKeys(...t))})};var Bi,Gi={},Wi={};var Hi={};!function(e){Object.defineProperty(e,\"__esModule\",{value:!0}),e.wrapIntentHandler=e.BROKER_ERRORS=e.generateOverrideWarning=e.generateOverrideError=e.wrapContextHandler=e.wrapInTryCatch=e.generateId=void 0;e.generateId=()=>`${Math.random()}${Date.now()}`;e.wrapInTryCatch=(e,t)=>(...n)=>{try{return e(...n)}catch(e){throw new Error((t||\"\")+e)}};e.wrapContextHandler=(e,t)=>async n=>{try{await e(n)}catch(e){throw console.error(`Error thrown by handler ${t} for context type ${n.type}: ${e}`),e}};e.generateOverrideError=(e,t)=>`You have tried to to use ${e} but ${t} has not been overridden in the Interop Broker. Please override this function. Refer to our documentation for more info.`;e.generateOverrideWarning=(e,t,n,i)=>{const{uuid:r,name:o}=n;return i?`Entity with identity: ${r}/${o} has called ${i} or ${e} but ${t} has not been overridden.`:`Entity with identity: ${r}/${o} has called ${e} but ${t} has not been overridden.`},e.BROKER_ERRORS={fireIntent:(0,e.generateOverrideError)(\"fireIntent\",\"handleFiredIntent\"),fireIntentForContext:(0,e.generateOverrideError)(\"fireIntentForContext\",\"handleFiredIntentForContext\"),getInfoForIntent:(0,e.generateOverrideError)(\"getInfoForIntent\",\"handleInfoForIntent\"),getInfoForIntentsByContext:(0,e.generateOverrideError)(\"getInfoForIntentsByContext\",\"handleInfoForIntentsByContext\"),joinSessionContextGroupWithJoinContextGroup:\"The Context Group you have tried to join is a Session Context Group. Custom Context Groups can only be defined by the Interop Broker through code or manifest configuration. Please use joinSessionContextGroup.\",fdc3Open:(0,e.generateOverrideError)(\"fdc3.open\",\"fdc3HandleOpen\"),fdc3FindInstances:(0,e.generateOverrideError)(\"fdc3.findInstances\",\"fdc3HandleFindInstances\"),fdc3GetAppMetadata:(0,e.generateOverrideError)(\"fdc3.getAppMetadata\",\"fdc3HandleGetAppMetadata\"),fdc3GetInfo:(0,e.generateOverrideError)(\"fdc3.getInfo\",\"fdc3HandleGetInfo\")};e.wrapIntentHandler=(e,t)=>async n=>{try{return e(n)}catch(e){throw console.error(`Error thrown by handler ${t}: ${e}`),e}}}(Hi);var Ni,Di,Ui={};function Vi(){if(Di)return Gi;Di=1;var e,t,n,r=s&&s.__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},o=s&&s.__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)},a=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Gi,\"__esModule\",{value:!0}),Gi.InteropBroker=void 0;const c=d,h=a(function(){if(Bi)return Wi;Bi=1,Object.defineProperty(Wi,\"__esModule\",{value:!0});const e=Cr();return Wi.default=class{constructor(e,t){this.provider=e,this.id=t,this.lastContext=void 0,this.contextGroupMap=new Map,this.clients=new Map,this.registerListeners()}registerListeners(){this.provider.register(`sessionContextGroup:getContext-${this.id}`,this.getCurrentContext.bind(this)),this.provider.register(`sessionContextGroup:setContext-${this.id}`,this.setContext.bind(this)),this.provider.register(`sessionContextGroup:handlerAdded-${this.id}`,this.handlerAdded.bind(this)),this.provider.register(`sessionContextGroup:handlerRemoved-${this.id}`,this.handlerRemoved.bind(this))}getCurrentContext(e){return e.type?this.contextGroupMap.get(e.type):this.lastContext}setContext(t,n){const{context:i}=t,r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name} not in Session Client State Map`);this.contextGroupMap.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{e.contextHandlers.get(i.type)?.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getClientState(e){return this.clients.get(e.endpointId)}async handlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(i){const e=r.contextHandlers.get(i)||[];r.contextHandlers.set(i,[...e,n]);const o=this.contextGroupMap.get(i);o&&await this.provider.dispatch(t,n,o)}else{r.globalHandler=n;const e=[...this.contextGroupMap.keys()].map((async e=>{const i=this.contextGroupMap.get(e);i&&await this.provider.dispatch(t,n,i)}));await Promise.all(e)}}handlerRemoved(e,t){const{handlerId:n}=e,i=this.clients.get(t.endpointId);i?(Array.from(i.contextHandlers).forEach((([,e])=>{const t=e.indexOf(n);t>-1&&e.splice(t,1)})),i.globalHandler===n&&(i.globalHandler=void 0)):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={contextHandlers:new Map,clientIdentity:e,globalHandler:void 0};this.clients.set(e.endpointId,t)}}onDisconnection(e){this.clients.delete(e.endpointId)}},Wi}()),l=Hi,u=a(i),p=function(){if(Ni)return Ui;Ni=1,Object.defineProperty(Ui,\"__esModule\",{value:!0}),Ui.PrivateChannelProvider=void 0;const e=Vi();return Ui.PrivateChannelProvider=class t{constructor(e,t){this.provider=e,this.id=t,this.clients=new Map,this.registerListeners(),this.contextByContextType=new Map,this.lastContext=void 0,this.provider.onConnection((e=>this.registerNewClient(e))),this.provider.onDisconnection((async e=>{const{endpointId:t}=e;this.clients.has(t)&&await this.handleClientDisconnecting(e),0===(await this.provider.getAllClientInfo()).length&&this.provider.destroy()}))}getClientState(e){return this.clients.get(e.endpointId)}registerListeners(){this.provider.register(\"broadcast\",this.broadcast.bind(this)),this.provider.register(\"getCurrentContext\",this.getCurrentContext.bind(this)),this.provider.register(\"contextHandlerAdded\",this.contextHandlerAdded.bind(this)),this.provider.register(\"contextHandlerRemoved\",this.contextHandlerRemoved.bind(this)),this.provider.register(\"nonStandardHandlerRemoved\",this.nonStandardHandlerRemoved.bind(this)),this.provider.register(\"onAddContextHandlerAdded\",this.onAddContextHandlerAdded.bind(this)),this.provider.register(\"onDisconnectHandlerAdded\",this.onDisconnectHandlerAdded.bind(this)),this.provider.register(\"onUnsubscribeHandlerAdded\",this.onUnsubscribeHandlerAdded.bind(this)),this.provider.register(\"clientDisconnecting\",((e,t)=>{this.handleClientDisconnecting(t)}))}broadcast(t,n){const{context:i}=t;if(!this.getClientState(n))throw new Error(`Client with Identity: ${n.uuid} ${n.name}, tried to call broadcast, is not connected to this Private Channel`);const r=e.InteropBroker.checkContextIntegrity(i);if(!1===r.isValid)throw new Error(`Failed to broadcast - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(i)}`);this.contextByContextType.set(i.type,i),this.lastContext=i,Array.from(this.clients.values()).forEach((e=>{const t=e.handlerIdsByContextTypes.get(i.type);t&&t.forEach((t=>{this.provider.dispatch(e.clientIdentity,t,i)})),e.globalHandler&&this.provider.dispatch(e.clientIdentity,e.globalHandler,i)}))}getCurrentContext(e,t){const{contextType:n}=e;if(!this.getClientState(t))throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call getCurrentContext, is not connected to this Private Channel`);if(void 0!==n){return this.contextByContextType.get(n)||null}return this.lastContext?this.lastContext:null}contextHandlerAdded(e,t){const{handlerId:n,contextType:i}=e,r=this.getClientState(t);if(!r)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call addContextListener, is not connected to this Private Channel`);if(i){const e=r.handlerIdsByContextTypes.get(i)||[];r.handlerIdsByContextTypes.set(i,[...e,n])}else r.globalHandler=n;Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&e.onAddContextListenerHandlerId&&this.provider.dispatch(e.clientIdentity,e.onAddContextListenerHandlerId,i)}))}async contextHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);if(i){let e;if(i.globalHandler===n)i.globalHandler=void 0;else for(const[t,r]of i.handlerIdsByContextTypes){const i=r.indexOf(n);i>-1&&(r.splice(i,1),e=t)}const r=(await this.getConnectedClients()).map((async n=>{const{clientIdentity:i,clientIdentity:{endpointId:r},onUnsubscribeHandlerId:o}=n;r!==t.endpointId&&o&&await this.provider.dispatch(i,o,e)}));try{await Promise.all(r)}catch(e){throw console.error(`Problem when attempting to dispatch to onUnsubscribeHandlers. Error: ${e} Removing Client: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}`),new Error(e)}}else console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. uuid: ${t.uuid}. name: ${t.name}. endpointId: ${t.endpointId}.`)}nonStandardHandlerRemoved(e,t){const{handlerId:n}=e,i=this.getClientState(t);i?i.onDisconnectHandlerId===n?i.onDisconnectHandlerId=void 0:i.onAddContextListenerHandlerId===n?i.onAddContextListenerHandlerId=void 0:i.onUnsubscribeHandlerId===n&&(i.onUnsubscribeHandlerId=void 0):console.warn(`Trying to remove a handler from a client that isn't mapped. handlerId: ${n}. clientIdentity: ${t}`)}onAddContextHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onAddContextListener, is not connected to this Private Channel`);n.onAddContextListenerHandlerId=i,Array.from(this.clients.values()).forEach((e=>{e.clientIdentity.endpointId!==t.endpointId&&Array.from(e.handlerIdsByContextTypes.keys()).forEach((e=>{this.provider.dispatch(t,i,e)}))}))}onDisconnectHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onDisconnect, is not connected to this Private Channel`);n.onDisconnectHandlerId=i}onUnsubscribeHandlerAdded(e,t){const n=this.getClientState(t),{handlerId:i}=e;if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name}, tried to call onUnsubscribe, is not connected to this Private Channel`);n.onUnsubscribeHandlerId=i}removeClient(e){const t=this.getClientState(e);if(!t)throw new Error(`Client with Identity: ${e.uuid} ${e.name}, tried to call disconnect, is not connected to this Private Channel`);t.handlerIdsByContextTypes.clear(),this.clients.delete(e.endpointId)}async fireOnDisconnectForOtherClients(e){const{endpointId:t}=e,n=(await this.getConnectedClients()).map((async e=>{const{clientIdentity:{endpointId:n},onDisconnectHandlerId:i}=e;n!==t&&i&&await this.provider.dispatch(e.clientIdentity,i)}));try{await Promise.all(n)}catch(t){throw console.error(`Problem when attempting to dispatch to onDisconnectHandlers. Error: ${t} Disconnecting Client: uuid: ${e.uuid}. name: ${e.name}. endpointId: ${e.endpointId}`),new Error(t)}}async unsubscribeAll(e){const{endpointId:t}=e,n=this.clients.get(t);if(n){const t=Array.from(n.handlerIdsByContextTypes.values()).flat(),i=n.globalHandler;if(t.length>0){const n=t.map((async t=>this.contextHandlerRemoved({handlerId:t},e)));try{await Promise.all(n)}catch(e){console.error(e.message)}}if(i)try{await this.contextHandlerRemoved({handlerId:i},e)}catch(e){console.error(e.message)}}}async handleClientDisconnecting(e){await this.unsubscribeAll(e),this.removeClient(e),await this.fireOnDisconnectForOtherClients(e)}registerNewClient(e){if(!this.clients.has(e.endpointId)){const t={clientIdentity:e,handlerIdsByContextTypes:new Map,globalHandler:void 0,onAddContextListenerHandlerId:void 0,onUnsubscribeHandlerId:void 0,onDisconnectHandlerId:void 0};this.clients.set(e.endpointId,t)}}async getConnectedClients(){const e=await this.provider.getAllClientInfo();return Array.from(this.clients.values()).filter((t=>{const{uuid:n,name:i}=t.clientIdentity;return e.some((e=>i===e.name&&n===e.uuid))}))}static init(e,n){return new t(e,n)}},Ui}(),w=G,y=[{id:\"green\",displayMetadata:{color:\"#00CC88\",name:\"green\"}},{id:\"purple\",displayMetadata:{color:\"#8C61FF\",name:\"purple\"}},{id:\"orange\",displayMetadata:{color:\"#FF8C4C\",name:\"orange\"}},{id:\"red\",displayMetadata:{color:\"#FF5E60\",name:\"red\"}},{id:\"pink\",displayMetadata:{color:\"#FF8FB8\",name:\"pink\"}},{id:\"yellow\",displayMetadata:{color:\"#E9FF8F\",name:\"yellow\"}}];let f=class i extends c.Base{constructor(i,s,a){super(i),e.set(this,void 0),t.set(this,void 0),n.set(this,void 0),this.getProvider=()=>o(this,n,\"f\").getValue(),this.interopClients=new Map,this.contextGroupsById=new Map,r(this,t,a.contextGroups??[...y],\"f\"),r(this,e,a.fdc3Info,\"f\"),a?.logging&&(this.logging=a.logging),this.intentClientMap=new Map,this.lastContextMap=new Map,this.sessionContextGroupMap=new Map,r(this,n,new w.Lazy(s),\"f\"),this.setContextGroupMap(),this.setupChannelProvider()}static createClosedConstructor(...e){return class extends i{constructor(...t){if(t.length){const[n,i,r]=t;if(r&&\"object\"==typeof r&&!(0,u.default)(r,e[2]))return console.warn(\"You have modified the parameters of the InteropOverride constructor. This behavior is deprecated and will be removed in a future version. You can modify these options in your manifest. Please consult our Interop docs for guidance on migrating to the new override scheme.\"),void super(e[0],e[1],r);console.warn(\"You are attempting to pass arguments to the InteropOverride constructor. This is not necessary, and these passed arguments will be ignored. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.\")}super(...e)}}}setContext({context:e},t){this.wire.sendAction(\"interop-broker-set-context\").catch((e=>{}));const n=this.getClientState(t);if(!n||!n.contextGroupId)throw n?new Error(\"You must join a context group before you can set context.\"):new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);{const{contextGroupId:t}=n;this.setContextForGroup({context:e},t)}}setContextForGroup({context:e},t){this.wire.sendAction(\"interop-broker-set-context-for-group\").catch((e=>{}));const n=this.contextGroupsById.get(t);if(!n)throw new Error(`Unable to set context for context group that isn't in the context group mapping: ${t}.`);const r=i.checkContextIntegrity(e);if(!1===r.isValid)throw new Error(`Failed to set Context - bad Context. Reason: ${r.reason}. Context: ${JSON.stringify(e)}`);const o=e.type;n.set(o,e),this.lastContextMap.set(t,o);Array.from(this.interopClients.values()).filter((e=>e.contextGroupId===t)).forEach((t=>{for(const[,n]of t.contextHandlers)i.isContextTypeCompatible(o,n.contextType)&&this.invokeContextHandler(t.clientIdentity,n.handlerId,e)}))}getCurrentContext(e,t){this.wire.sendAction(\"interop-broker-get-current-context\").catch((e=>{}));const n=this.getClientState(t);if(!n?.contextGroupId)throw new Error(\"You must be a member of a context group to call getCurrentContext\");const{contextGroupId:i}=n,r=this.contextGroupsById.get(i),o=this.lastContextMap.get(i),s=e?.contextType??o;return r&&s?r.get(s):void 0}async joinContextGroup({contextGroupId:e,target:t},n){if(this.wire.sendAction(\"interop-broker-join-context-group\").catch((e=>{})),this.sessionContextGroupMap.has(e))throw new Error(l.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup);if(t){i.hasEndpointId(t)&&await this.addClientToContextGroup({contextGroupId:e},t);try{const n=this.channel.connections.filter((e=>e.uuid===t.uuid&&e.name===t.name));if(!n.length)throw new Error(`Given Identity ${t.uuid} ${t.name} is not connected to the Interop Broker.`);n.length>1&&console.warn(`More than one connection found for identity ${t.uuid} ${t.name}`);const i=[];for(const t of n)i.push(this.addClientToContextGroup({contextGroupId:e},t));await Promise.all(i)}catch(e){throw new Error(e)}}else await this.addClientToContextGroup({contextGroupId:e},n)}async addClientToContextGroup({contextGroupId:e},t){this.wire.sendAction(\"interop-broker-add-client-to-context-group\").catch((e=>{}));const n=this.getClientState(t);if(!n)throw new Error(`Client with Identity: ${t.uuid} ${t.name} not in Client State Map`);if(!this.getContextGroups().find((t=>t.id===e)))throw new Error(`Attempting to join a context group that does not exist: ${e}. You may only join existing context groups.`);if(n.contextGroupId!==e){n.contextGroupId=e,await this.setCurrentContextGroupInClientOptions(t,e);const i=this.contextGroupsById.get(e);for(const[,e]of n.contextHandlers){const{contextType:n,handlerId:r}=e;if(void 0===n)i.forEach(((e,n)=>{this.invokeContextHandler(t,r,e)}));else if(i.has(n)){const e=i.get(n);e&&this.invokeContextHandler(t,r,e)}}}}async removeFromContextGroup({target:e},t){if(this.wire.sendAction(\"interop-broker-remove-from-context-group\").catch((e=>{})),e){i.hasEndpointId(e)&&await this.removeClientFromContextGroup(e);try{const t=this.channel.connections.filter((t=>t.uuid===e.uuid&&t.name===e.name));if(!t.length)throw new Error(`No connection found for given Identity ${e.uuid} ${e.name}`);t.length>1&&console.warn(`More than one connection found for identity ${e.uuid} ${e.name}`);const n=[];for(const e of t)n.push(this.removeClientFromContextGroup(e));await Promise.all(n)}catch(e){throw new Error(e)}}else await this.removeClientFromContextGroup(t)}async removeClientFromContextGroup(e){this.wire.sendAction(\"interop-broker-remove-client-from-context-group\").catch((e=>{}));const t=this.getClientState(e);t&&(t.contextGroupId=void 0),await this.setCurrentContextGroupInClientOptions(e,null)}getContextGroups(){return this.wire.sendAction(\"interop-broker-get-context-groups\").catch((e=>{})),o(this,t,\"f\").map((e=>({...e})))}getInfoForContextGroup({contextGroupId:e}){return this.wire.sendAction(\"interop-broker-get-info-for-context-group\").catch((e=>{})),this.getContextGroups().find((t=>t.id===e))}getAllClientsInContextGroup({contextGroupId:e}){this.wire.sendAction(\"interop-broker-get-all-clients-in-context-group\").catch((e=>{}));return Array.from(this.interopClients.values()).filter((t=>t.contextGroupId===e)).map((e=>e.clientIdentity))}async handleFiredIntent(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.raiseIntent\",\"InteropBroker.handleFiredIntent\",t,\"interopClient.fireIntent\");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntent)}async setIntentTarget(e,t){this.wire.sendAction(\"interop-broker-set-intent-target\").catch((e=>{}));const n=this.intentClientMap.get(t.name),i=`intent-handler-${e.name}`;if(n){const t=n.get(i);if(t){if(t.pendingIntents.push(e),t.clientIdentity&&t.isReady){const{clientIdentity:e,pendingIntents:n}=t;try{const r=n[n.length-1];await this.invokeIntentHandler(e,i,r),t.pendingIntents=[]}catch(n){console.error(`Error invoking intent handler for client ${e.uuid}/${e.name}/${e.endpointId}`),t.isReady=!1}}}else n.set(i,{isReady:!1,pendingIntents:[e]})}else{this.intentClientMap.set(t.name,new Map);const n=this.intentClientMap.get(t.name);n&&n.set(i,{isReady:!1,pendingIntents:[e]})}}async handleInfoForIntent(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.findIntent\",\"InteropBroker.handleInfoForIntent\",t,\"interopClient.getInfoForIntent\");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntent)}async handleInfoForIntentsByContext(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.findIntentsByContext\",\"InteropBroker.handleInfoForIntentsByContext\",t,\"interopClient.getInfoForIntentsByContext\");throw console.warn(n),new Error(l.BROKER_ERRORS.getInfoForIntentsByContext)}async handleFiredIntentForContext(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.raiseIntentForContext\",\"InteropBroker.handleFiredIntentForContext\",t,\"interopClient.fireIntentForContext\");throw console.warn(n),new Error(l.BROKER_ERRORS.fireIntentForContext)}async clientDisconnected(e){}async fdc3HandleOpen({app:e,context:t},n){const i=(0,l.generateOverrideWarning)(\"fdc3.open\",\"InteropBroker.fdc3HandleOpen\",n);throw console.warn(i),new Error(l.BROKER_ERRORS.fdc3Open)}async fdc3HandleFindInstances(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.open\",\"InteropBroker.fdc3HandleFindInstances\",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3FindInstances)}async fdc3HandleGetAppMetadata(e,t){const n=(0,l.generateOverrideWarning)(\"fdc3.getAppMetadata\",\"InteropBroker.fdc3HandleGetAppMetadata\",t);throw console.warn(n),new Error(l.BROKER_ERRORS.fdc3GetAppMetadata)}async invokeContextHandler(e,t,n){const i=await this.getProvider();try{await i.dispatch(e,t,n)}catch(i){console.error(`Error invoking context handler ${t} for context type ${n.type} in client ${e.uuid}/${e.name}/${e.endpointId}`,i)}}async invokeIntentHandler(e,t,n){const i=await this.getProvider();await i.dispatch(e,t,n)}async fdc3HandleGetInfo(t,n){const{fdc3Version:i}=t;return{fdc3Version:i,...o(this,e,\"f\"),optionalFeatures:{OriginatingAppMetadata:!1,UserChannelMembershipAPIs:!0},appMetadata:{appId:\"\",instanceId:\"\"}}}async getAllClientInfo(){return(await this.getProvider()).getAllClientInfo()}decorateSnapshot(e){return{...e,interopSnapshotDetails:{contextGroupStates:this.getContextGroupStates()}}}applySnapshot(e,t){const n=e?.interopSnapshotDetails?.contextGroupStates;n&&(t?.closeExistingWindows||this.updateExistingClients(n),this.rehydrateContextGroupStates(n))}updateExistingClients(e){this.interopClients.forEach((t=>{const{clientIdentity:n,contextGroupId:r,contextHandlers:o}=t;if(r){const t=e[r];for(const[,e]of Object.entries(t))o.forEach((t=>{const{handlerId:r,contextType:o}=t;i.isContextTypeCompatible(e.type,o)&&this.invokeContextHandler(n,r,e)}))}}))}getContextGroupStates(){return i.toObject(this.contextGroupsById)}rehydrateContextGroupStates(e){const t=Object.entries(e);for(const[e,n]of t){const t=Object.entries(n);for(const[n,i]of t)if(this.contextGroupsById.has(e)){this.contextGroupsById.get(e).set(n,i)}else console.warn(`Attempting to set a context group that isn't in the context group mapping. Skipping context group rehydration for: ${e}`)}}contextHandlerRegistered({contextType:e,handlerId:t},n){const i={contextType:e,handlerId:t},r=this.getClientState(n);if(r?.contextHandlers.set(t,i),r&&r.contextGroupId){const{contextGroupId:i}=r,o=this.contextGroupsById.get(i);if(void 0===e)o.forEach(((e,i)=>{this.invokeContextHandler(n,t,e)}));else if(o.has(e)){const i=o.get(e);i&&this.invokeContextHandler(n,t,i)}}}async intentHandlerRegistered(e,t){const{handlerId:n}=e,i=this.intentClientMap.get(t.name),r=i?.get(n);if(i)if(r){const{pendingIntents:e}=r;r.clientIdentity=t,r.isReady=!0;try{if(e.length>0){const i=e[e.length-1];await this.invokeIntentHandler(t,n,i),r.pendingIntents=[]}}catch(e){console.error(`Error invoking intent handler: ${n} for client ${t.uuid}/${t.name}/${t.endpointId}`)}}else i.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t});else{this.intentClientMap.set(t.name,new Map);const e=this.intentClientMap.get(t.name);e&&e.set(n,{isReady:!0,pendingIntents:[],clientIdentity:t})}}removeContextHandler({handlerId:e},t){const n=this.getClientState(t);n&&n.contextHandlers.delete(e)}handleJoinSessionContextGroup({sessionContextGroupId:e},t){try{if(!e)throw new Error(\"Failed to join session context group: must specify group id.\");const n=this.sessionContextGroupMap.get(e);if(n)n.registerNewClient(t);else{const n=new h.default(this.channel,e);n.registerNewClient(t),this.sessionContextGroupMap.set(e,n)}return{hasConflict:this.contextGroupsById.has(e)}}catch(e){throw new Error(e)}}getClientState(e){return this.interopClients.get(e.endpointId)}static toObject(e){const t=Object.fromEntries(e),n={};return Object.entries(t).forEach((([e,t])=>{const i=Object.fromEntries(t);n[e]=i})),n}static checkContextIntegrity(e){if(!e)return{isValid:!1,reason:\"No context supplied\"};if(\"object\"!=typeof e)return{isValid:!1,reason:\"Context must be an Object\"};if(!e.type)return{isValid:!1,reason:\"Context must have a type property\"};if(e.id&&\"object\"!=typeof e.id)return{isValid:!1,reason:\"Context id must be an Object populated with key-value identifiers (if set)\"};if(e.id){const{id:t}=e,n=Object.keys(t);let i=!1;if(!n.length)return{isValid:!1,reason:\"Context id must have at least one key-value identifier\"};if(n.forEach((e=>{\"string\"==typeof e&&\"string\"==typeof t[e]||(i=!0)})),i)return{isValid:!1,reason:\"Context id key-value identifiers must be of type string\"}}return e.name&&\"string\"!=typeof e.name?{isValid:!1,reason:\"Context name must be of string type (if set)\"}:{isValid:!0}}static hasEndpointId(e){return void 0!==e.endpointId}static isContextTypeCompatible(e,t){return void 0===t||e===t}setContextGroupMap(){for(const e of this.getContextGroups())this.contextGroupsById.set(e.id,new Map)}async setCurrentContextGroupInClientOptions(e,t){try{const n=await this.fin.System.getEntityInfo(e.uuid,e.name);let i;\"view\"===n.entityType?i=await this.fin.View.wrap(e):\"window\"===n.entityType&&(i=await this.fin.Window.wrap(e)),i&&await i.updateOptions({interop:{currentContextGroup:t}})}catch(e){}}async setupChannelProvider(){try{const e=await this.getProvider();this.channel=e,this.wireChannel(e)}catch(e){throw new Error(`Error setting up Interop Broker Channel Provider: ${e}`)}}wireChannel(e){e.onConnection((async(e,t)=>{if(!await this.isConnectionAuthorized(e,t))throw new Error(`Connection not authorized for ${e.uuid}, ${e.name}`);if(!e.endpointId)throw new Error(\"Version too old to be compatible with Interop. Please upgrade your runtime to a more recent version.\");const n={contextGroupId:void 0,contextHandlers:new Map,clientIdentity:e};t?.currentContextGroup&&this.contextGroupsById.has(t.currentContextGroup)&&(n.contextGroupId=t?.currentContextGroup),this.interopClients.set(e.endpointId,n)})),e.onDisconnection((e=>{this.interopClients.delete(e.endpointId);const t=this.intentClientMap.get(e.name);t&&e.uuid===this.fin.me.uuid&&t.forEach((e=>{e.isReady=!1})),this.sessionContextGroupMap.forEach((t=>{t.onDisconnection(e)})),this.clientDisconnected(e)})),e.beforeAction((async(e,t,n)=>{if(!await this.isActionAuthorized(e,t,n))throw new Error(`Action (${e}) not authorized for ${n.uuid}, ${n.name}`);this.logging?.beforeAction?.enabled&&console.log(e,t,n)})),e.afterAction(((e,t,n)=>{this.logging?.afterAction?.enabled&&console.log(e,t,n)})),e.register(\"setContext\",this.setContext.bind(this)),e.register(\"fireIntent\",this.handleFiredIntent.bind(this)),e.register(\"getCurrentContext\",this.getCurrentContext.bind(this)),e.register(\"getInfoForIntent\",this.handleInfoForIntent.bind(this)),e.register(\"getInfoForIntentsByContext\",this.handleInfoForIntentsByContext.bind(this)),e.register(\"fireIntentForContext\",this.handleFiredIntentForContext.bind(this)),e.register(\"getContextGroups\",this.getContextGroups.bind(this)),e.register(\"joinContextGroup\",this.joinContextGroup.bind(this)),e.register(\"removeFromContextGroup\",this.removeFromContextGroup.bind(this)),e.register(\"getAllClientsInContextGroup\",this.getAllClientsInContextGroup.bind(this)),e.register(\"getInfoForContextGroup\",this.getInfoForContextGroup.bind(this)),e.register(\"contextHandlerRegistered\",this.contextHandlerRegistered.bind(this)),e.register(\"intentHandlerRegistered\",this.intentHandlerRegistered.bind(this)),e.register(\"removeContextHandler\",this.removeContextHandler.bind(this)),e.register(\"sessionContextGroup:createIfNeeded\",this.handleJoinSessionContextGroup.bind(this)),e.register(\"fdc3Open\",this.fdc3HandleOpen.bind(this)),e.register(\"fdc3v2FindIntentsByContext\",this.handleInfoForIntentsByContext.bind(this)),e.register(\"fdc3FindInstances\",this.fdc3HandleFindInstances.bind(this)),e.register(\"fdc3GetAppMetadata\",this.fdc3HandleGetAppMetadata.bind(this)),e.register(\"fdc3v2GetInfo\",(async(e,t)=>this.fdc3HandleGetInfo.bind(this)(e,t))),e.register(\"createPrivateChannelProvider\",(async e=>{const{channelId:t}=e,n=await this.fin.InterApplicationBus.Channel.create(t);p.PrivateChannelProvider.init(n,t)}))}isConnectionAuthorized(e,t){return this.wire.sendAction(\"interop-broker-is-connection-authorized\").catch((e=>{})),Promise.resolve(!0)}isActionAuthorized(e,t,n){return this.wire.sendAction(\"interop-broker-is-action-authorized\").catch((e=>{})),Promise.resolve(!0)}};return Gi.InteropBroker=f,e=new WeakMap,t=new WeakMap,n=new WeakMap,Gi}var zi,Ki={},qi={},Ji=s&&s.__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},Yi=s&&s.__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)};Object.defineProperty(qi,\"__esModule\",{value:!0});const Zi=d,Qi=Hi;class Xi extends Zi.Base{constructor(e,t,n){super(e),zi.set(this,void 0),this.id=n,Ji(this,zi,t,\"f\")}async setContext(e){this.wire.sendAction(\"interop-session-context-group-set-context\").catch((e=>{}));return(await Yi(this,zi,\"f\")).dispatch(`sessionContextGroup:setContext-${this.id}`,{sessionContextGroupId:this.id,context:e})}async getCurrentContext(e){this.wire.sendAction(\"interop-session-context-group-get-context\").catch((e=>{}));return(await Yi(this,zi,\"f\")).dispatch(`sessionContextGroup:getContext-${this.id}`,{sessionContextGroupId:this.id,type:e})}async addContextHandler(e,t){if(this.wire.sendAction(\"interop-session-context-group-add-handler\").catch((e=>{})),\"function\"!=typeof e)throw new Error(\"Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.\");const n=await Yi(this,zi,\"f\");let i;return i=t?`sessionContextHandler:invoke-${this.id}-${t}-${(0,Qi.generateId)()}`:`sessionContextHandler:invoke-${this.id}`,n.register(i,(0,Qi.wrapContextHandler)(e,i)),await n.dispatch(`sessionContextGroup:handlerAdded-${this.id}`,{handlerId:i,contextType:t}),{unsubscribe:await this.createUnsubscribeCb(i)}}async createUnsubscribeCb(e){const t=await Yi(this,zi,\"f\");return async()=>{t.remove(e),await t.dispatch(`sessionContextGroup:handlerRemoved-${this.id}`,{handlerId:e})}}getUserInstance(){return{id:this.id,setContext:(0,Qi.wrapInTryCatch)(this.setContext.bind(this),\"Failed to set context: \"),getCurrentContext:(0,Qi.wrapInTryCatch)(this.getCurrentContext.bind(this),\"Failed to get context: \"),addContextHandler:(0,Qi.wrapInTryCatch)(this.addContextHandler.bind(this),\"Failed to add context handler: \")}}}qi.default=Xi,zi=new WeakMap;var er={},tr={},nr={},ir={},rr=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),or=s&&s.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,\"default\",{enumerable:!0,value:t})}:function(e,t){e.default=t}),sr=s&&s.__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)&&rr(t,e,n);return or(t,e),t};Object.defineProperty(ir,\"__esModule\",{value:!0}),ir.PrivateChannelClient=void 0;const ar=sr(Hi);var cr,dr;function hr(){if(cr)return tr;cr=1;var e,t=s&&s.__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)},n=s&&s.__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},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(tr,\"__esModule\",{value:!0}),tr.FDC3ModuleBase=void 0;const o=nr,a=Hi,c=wr(),d=r(i);return tr.FDC3ModuleBase=class{get client(){return t(this,e,\"f\").call(this)}get fin(){return this.wire.getFin()}constructor(t,i){this.wire=i,e.set(this,void 0),n(this,e,t,\"f\")}async broadcast(e){return this.wire.sendAction(\"fdc3-broadcast\").catch((e=>{})),this.client.setContext(e)}async _open(e,t){this.wire.sendAction(\"fdc3-open\").catch((e=>{}));try{return await c.InteropClient.ferryFdc3Call(this.client,\"fdc3Open\",{app:e,context:t})}catch(e){const t=e.message===a.BROKER_ERRORS.fdc3Open?\"ResolverUnavailable\":e.message;throw new Error(t)}}async _getChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:\"system\",...(0,o.getUnsupportedChannelApis)()})))}async getOrCreateChannel(e){this.wire.sendAction(\"fdc3-get-or-create-channel\").catch((e=>{}));const t=(await this._getChannels()).find((t=>t.id===e));if(t)return{...t,type:\"system\",...(0,o.getUnsupportedChannelApis)()};try{const t=await this.client.joinSessionContextGroup(e);return(0,o.buildAppChannelObject)(t)}catch(e){throw console.error(e.message),new Error(o.ChannelError.CreationFailed)}}async getSystemChannels(){return this.wire.sendAction(\"fdc3-get-system-channels\").catch((e=>{})),this._getChannels()}async joinChannel(e){this.wire.sendAction(\"fdc3-join-channel\").catch((e=>{}));try{return await this.client.joinContextGroup(e)}catch(e){if(e.message===a.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup?console.error(\"The Channel you have tried to join is an App Channel. Custom Channels can only be defined by the Interop Broker through code or manifest configuration. Please use getOrCreateChannel.\"):console.error(e.message),e.message.startsWith(\"Attempting to join a context group that does not exist\"))throw new Error(o.ChannelError.NoChannelFound);throw new Error(o.ChannelError.AccessDenied)}}async getCurrentChannel(){this.wire.sendAction(\"fdc3-get-current-channel\").catch((e=>{}));const e=await this.getCurrentContextGroupInfo();return e?this.buildChannelObject(e):null}async leaveCurrentChannel(){return this.wire.sendAction(\"fdc3-leave-current-channel\").catch((e=>{})),this.client.removeFromContextGroup()}async getCurrentContextGroupInfo(){const e=await this.client.getContextGroups(),t=e.map((async e=>this.client.getAllClientsInContextGroup(e.id))),n=(await Promise.all(t)).findIndex((e=>e.some((e=>{const{uuid:t,name:n}=e;return this.wire.me.uuid===t&&this.wire.me.name===n}))));return e[n]}async buildChannelObject(e){return{...e,type:\"system\",addContextListener:(...[e,t])=>{let n,i;\"function\"==typeof e?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),n=e):(n=t,\"string\"==typeof e&&(i=e));const r=(async()=>{let e=!0;const t=await this.client.getCurrentContext(i);return this.client.addContextHandler(((i,r)=>{if(!e||(e=!1,!(0,d.default)(t,i)))return n(i,r)}),i)})();return{...r,unsubscribe:()=>r.then((e=>e.unsubscribe()))}},broadcast:this.broadcast.bind(this),getCurrentContext:async e=>{const t=await this.client.getCurrentContext(e);return void 0===t?null:t}}}},e=new WeakMap,tr}ir.PrivateChannelClient=class{constructor(e,t){this.id=t,this.client=e,this.listeners=new Map}async broadcast(e){return this.client.dispatch(\"broadcast\",{context:e})}async getCurrentContext(e){return this.client.dispatch(\"getCurrentContext\",{contextType:e})}async addContextListener(e,t){if(\"function\"!=typeof t)throw new Error(\"Non-function argument passed to the second parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.\");let n;n=e?`contextHandler:invoke-${this.id}-${e}-${ar.generateId()}`:`contextHandler:invoke-${this.id}-${ar.generateId()}`,this.client.register(n,ar.wrapContextHandler(t,n));const i={unsubscribe:await this.createContextUnsubscribeCb(n)};return this.listeners.set(n,i),await this.client.dispatch(\"contextHandlerAdded\",{handlerId:n,contextType:e}),i}createNonStandardUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch(\"nonStandardHandlerRemoved\",{handlerId:e})}}createContextUnsubscribeCb(e){return async()=>{this.client.remove(e),this.listeners.delete(e),await this.client.dispatch(\"contextHandlerRemoved\",{handlerId:e})}}onAddContextListener(e){const t=`onContextHandlerAdded:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch(\"onAddContextHandlerAdded\",{handlerId:t}),n}onDisconnect(e){const t=`onDisconnect:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch(\"onDisconnectHandlerAdded\",{handlerId:t}),n}onUnsubscribe(e){const t=`onUnsubscribe:invoke-${this.id}-${ar.generateId()}`;this.client.register(t,e);const n={unsubscribe:this.createNonStandardUnsubscribeCb(t)};return this.listeners.set(t,n),this.client.dispatch(\"onUnsubscribeHandlerAdded\",{handlerId:t}),n}async cleanUpAllSubs(){Array.from(this.listeners.keys()).forEach((e=>{this.client.remove(e),this.listeners.delete(e)}))}async disconnect(){try{await this.client.dispatch(\"clientDisconnecting\"),await this.cleanUpAllSubs(),await this.client.disconnect()}catch(e){throw new Error(e.message)}}},function(e){var t=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,\"__esModule\",{value:!0}),e.getIntentResolution=e.isChannel=e.isContext=e.connectPrivateChannel=e.buildAppChannelObject=e.buildPrivateChannelObject=e.ChannelError=e.ResultError=e.UnsupportedChannelApiError=e.getUnsupportedChannelApis=void 0;const n=Hi,r=ir,o=t(i);e.getUnsupportedChannelApis=e=>({addContextListener:()=>{throw new a(\"Channel.addContextListener\",e)},broadcast:()=>{throw new a(\"Channel.broadcast\",e)},getCurrentContext:()=>{throw new a(\"Channel.getCurrentContext\",e)}});class a extends Error{constructor(e,t=\"System\"){super(e),this.message=`Calling ${e} on an instance of a ${t} Channel returned by fdc3.get${t}Channels is not supported. If you would like to use a ${t} Channel, please use fdc3.joinChannel, fdc3.addContextListener, and fdc3.broadcast instead.`}}var c,d;e.UnsupportedChannelApiError=a,function(e){e.NoResultReturned=\"NoResultReturned\",e.IntentHandlerRejected=\"IntentHandlerRejected\"}(c=e.ResultError||(e.ResultError={})),(d=e.ChannelError||(e.ChannelError={})).NoChannelFound=\"NoChannelFound\",d.AccessDenied=\"AccessDenied\",d.CreationFailed=\"CreationFailed\";e.buildPrivateChannelObject=e=>{let t=!1;const n=()=>{if(t)throw new Error(\"Private Channel Client has been disconnected from the Private Channel\")};return{id:e.id,type:\"private\",broadcast:async t=>(n(),e.broadcast(t)),getCurrentContext:async t=>(n(),e.getCurrentContext(t)),addContextListener:async(t,i)=>{n();let r=i,o=t;\"function\"==typeof t&&(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),r=t,o=null);return e.addContextListener(o,r)},onAddContextListener:t=>(n(),e.onAddContextListener(t)),disconnect:async()=>(n(),t=!0,e.disconnect()),onDisconnect:t=>(n(),e.onDisconnect(t)),onUnsubscribe:t=>(n(),e.onUnsubscribe(t))}};e.buildAppChannelObject=e=>({id:e.id,type:\"app\",broadcast:e.setContext,getCurrentContext:async t=>{const n=await e.getCurrentContext(t);return void 0===n?null:n},addContextListener:(t,n)=>{let i,r;\"function\"==typeof t?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),i=t):(i=n,\"string\"==typeof t&&(r=t));const s=(async()=>{let t=!0;const n=await e.getCurrentContext(r);return e.addContextHandler(((e,r)=>{if(!t||(t=!1,!(0,o.default)(n,e)))return i(e,r)}),r)})();return{...s,unsubscribe:()=>s.then((e=>e.unsubscribe()))}}});e.connectPrivateChannel=async t=>{try{const n=await fin.InterApplicationBus.Channel.connect(t),i=new r.PrivateChannelClient(n,t);return(0,e.buildPrivateChannelObject)(i)}catch(e){throw new Error(`Private Channel with id: ${t} doesn't exist`)}};e.isContext=e=>{if(e&&\"object\"==typeof e&&\"type\"in e){const{type:t}=e;return\"string\"==typeof t}return!1};e.isChannel=e=>{if(e&&\"object\"==typeof e&&\"type\"in e&&\"id\"in e){const{type:t,id:n}=e;return\"string\"==typeof t&&\"string\"==typeof n&&(\"app\"===t||\"private\"===t)}return!1};e.getIntentResolution=async(t,i,r,o)=>{const s=(0,n.generateId)(),a=new Promise(((e,t)=>{fin.InterApplicationBus.subscribe({uuid:\"*\"},s,(t=>{e(t)})).catch((()=>t(new Error(\"getResult is not supported in this environment\"))))})),d=r?{target:r,intentResolutionResultId:s}:{intentResolutionResultId:s},h=o?{name:o,context:i,metadata:d}:{...i,metadata:d},l=async()=>{let n=await a;if(!n||\"object\"!=typeof n)throw new Error(c.NoResultReturned);const{error:i}=n;if(i)throw new Error(c.IntentHandlerRejected);if((0,e.isChannel)(n)){const{id:i,type:r}=n;switch(r){case\"private\":n=await(0,e.connectPrivateChannel)(i);break;case\"app\":{const r=await t.joinSessionContextGroup(i);n=(0,e.buildAppChannelObject)(r);break}}}else if(!(0,e.isContext)(n))throw new Error(c.NoResultReturned);return n},u=o?await t.fireIntent(h):await t.fireIntentForContext(h);return\"object\"!=typeof u?{source:{appId:\"\",instanceId:\"\"},intent:\"\",version:\"2.0\",getResult:l}:{...u,getResult:l}}}(nr);var lr,ur,pr={};function wr(){if(ur)return Ki;ur=1;var e,t,n=s&&s.__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},i=s&&s.__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)},r=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ki,\"__esModule\",{value:!0}),Ki.InteropClient=void 0;const o=d,a=r(qi),c=function(){if(dr)return er;dr=1,Object.defineProperty(er,\"__esModule\",{value:!0}),er.Fdc3Module=void 0;const e=Hi,t=hr();class n extends t.FDC3ModuleBase{async open(e,t){await super._open(e,t)}addContextListener(e,t){let n;return this.wire.sendAction(\"fdc3-add-context-listener\").catch((e=>{})),\"function\"==typeof e?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),n=this.client.addContextHandler(e)):n=this.client.addContextHandler(t,null===e?void 0:e),{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}addIntentListener(e,t){this.wire.sendAction(\"fdc3-add-intent-listener\").catch((e=>{}));const n=this.client.registerIntentHandler((e=>{const{context:n,metadata:i}=e,{metadata:r}=n,o=i?.intentResolutionResultId||r?.intentResolutionResultId;o&&this.fin.InterApplicationBus.publish(o,null).catch((()=>null)),t(e.context)}),e,{fdc3Version:\"1.2\"});return{...n,unsubscribe:()=>n.then((e=>e.unsubscribe()))}}async raiseIntent(t,n,i){this.wire.sendAction(\"fdc3-raise-intent\").catch((e=>{}));const r=i?{name:t,context:n,metadata:{target:i}}:{name:t,context:n};try{return await this.client.fireIntent(r)}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntent?\"ResolverUnavailable\":t.message;throw new Error(n)}}async findIntent(t,n){this.wire.sendAction(\"fdc3-find-intent\").catch((e=>{}));try{return await this.client.getInfoForIntent({name:t,context:n})}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntent?\"ResolverUnavailable\":t.message;throw new Error(n)}}async findIntentsByContext(t){this.wire.sendAction(\"fdc3-find-intents-by-context\").catch((e=>{}));try{return await this.client.getInfoForIntentsByContext(t)}catch(t){const n=t.message===e.BROKER_ERRORS.getInfoForIntentsByContext?\"ResolverUnavailable\":t.message;throw new Error(n)}}async raiseIntentForContext(t,n){this.wire.sendAction(\"fdc3-raise-intent-for-context\").catch((e=>{}));try{return await this.client.fireIntentForContext({...t,metadata:{target:n}})}catch(t){const n=t.message===e.BROKER_ERRORS.fireIntentForContext?\"ResolverUnavailable\":t.message;throw new Error(n)}}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}getInfo(){return this.wire.sendAction(\"fdc3-get-info\").catch((e=>{})),{providerVersion:this.wire.environment.getAdapterVersionSync(),provider:`openfin-${this.wire.me.uuid}`,fdc3Version:\"1.2\"}}}return er.Fdc3Module=n,er}(),h=function(){if(lr)return pr;lr=1,Object.defineProperty(pr,\"__esModule\",{value:!0}),pr.Fdc3Module2=void 0;const e=hr(),t=Hi,n=wr(),i=nr,r=ir;class o extends e.FDC3ModuleBase{async open(e,t){return\"string\"==typeof e&&console.warn(\"Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).\"),super._open(e,t)}async findInstances(e){this.wire.sendAction(\"fdc3-find-instances\").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,\"fdc3FindInstances\",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3FindInstances?\"ResolverUnavailable\":e.message;throw new Error(n)}}async getAppMetadata(e){this.wire.sendAction(\"fdc3-get-app-metadata\").catch((e=>{}));try{return await n.InteropClient.ferryFdc3Call(this.client,\"fdc3GetAppMetadata\",e)}catch(e){const n=e.message===t.BROKER_ERRORS.fdc3GetAppMetadata?\"ResolverUnavailable\":e.message;throw new Error(n)}}async addContextListener(e,t){this.wire.sendAction(\"fdc3-add-context-listener\").catch((e=>{}));const n=e=>t=>{const{contextMetadata:n,...i}=t,r=n?[{...i},n]:[t,null];e(...r)};let i=t,r=n(i);return\"function\"==typeof e?(console.warn(\"addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)\"),i=e,r=n(i),this.client.addContextHandler(r)):this.client.addContextHandler(r,null===e?void 0:e)}async findIntent(e,n,i){this.wire.sendAction(\"fdc3-find-intent\").catch((e=>{}));try{return await this.client.getInfoForIntent({name:e,context:n,metadata:{resultType:i}})}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntent?\"ResolverUnavailable\":e.message;throw new Error(n)}}async findIntentsByContext(e,i){this.wire.sendAction(\"fdc3-find-intents-by-context\").catch((e=>{}));const r=i?{context:e,metadata:{resultType:i}}:e;try{return await n.InteropClient.ferryFdc3Call(this.client,\"fdc3v2FindIntentsByContext\",r)}catch(e){const n=e.message===t.BROKER_ERRORS.getInfoForIntentsByContext?\"ResolverUnavailable\":e.message;throw new Error(n)}}async raiseIntent(e,n,r){this.wire.sendAction(\"fdc3-raise-intent\").catch((e=>{}));try{return\"string\"==typeof r&&console.warn(\"Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).\"),(0,i.getIntentResolution)(this.client,n,r,e)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?\"ResolverUnavailable\":e.message;throw new Error(n)}}async raiseIntentForContext(e,n){this.wire.sendAction(\"fdc3-raise-intent-for-context\").catch((e=>{}));try{return\"string\"==typeof n&&console.warn(\"Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).\"),(0,i.getIntentResolution)(this.client,e,n)}catch(e){const n=e.message===t.BROKER_ERRORS.fireIntent?\"ResolverUnavailable\":e.message;throw new Error(n)}}async addIntentListener(e,t){if(this.wire.sendAction(\"fdc3-add-intent-listener\").catch((e=>{})),\"string\"!=typeof e)throw new Error(\"First argument must be an Intent name\");return this.client.registerIntentHandler((async e=>{let n,i;const{context:r,metadata:o}=e,{contextMetadata:s,metadata:a,...c}=r,d=o?.intentResolutionResultId||a?.intentResolutionResultId;try{const e=a?{metadata:a,...c}:{...c};n=await t(e,s),i=n}catch(e){n=e,i={error:!0}}if(d&&this.fin.InterApplicationBus.publish(d,i).catch((()=>null)),n instanceof Error)throw new Error(n.message);return n}),e,{fdc3Version:\"2.0\"})}async getOrCreateChannel(e){return super.getOrCreateChannel(e)}async createPrivateChannel(){const e=(0,t.generateId)();await n.InteropClient.ferryFdc3Call(this.client,\"createPrivateChannelProvider\",{channelId:e});const o=await this.fin.InterApplicationBus.Channel.connect(e),s=new r.PrivateChannelClient(o,e);return(0,i.buildPrivateChannelObject)(s)}async getUserChannels(){return(await this.client.getContextGroups()).map((e=>({...e,type:\"user\",...(0,i.getUnsupportedChannelApis)(\"User\")})))}async getSystemChannels(){return console.warn(\"This API has been deprecated. Please use fdc3.getUserChannels instead.\"),super.getSystemChannels()}async joinUserChannel(e){return super.joinChannel(e)}async joinChannel(e){return console.warn(\"This API has been deprecated. Please use fdc3.joinUserChannel instead.\"),super.joinChannel(e)}async getCurrentChannel(){const e=await super.getCurrentChannel();return e?{...e,type:\"user\",broadcast:this.broadcast.bind(this)}:null}async getInfo(){return n.InteropClient.ferryFdc3Call(this.client,\"fdc3v2GetInfo\",{fdc3Version:\"2.0\"})}}return pr.Fdc3Module2=o,pr}(),l=Hi;let u=class extends o.Base{constructor(i,r){super(i),e.set(this,void 0),t.set(this,void 0),n(this,t,new Map,\"f\"),n(this,e,r,\"f\")}async setContext(t){this.wire.sendAction(\"interop-client-set-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"setContext\",{context:t})}async addContextHandler(t,n){if(this.wire.sendAction(\"interop-client-add-context-handler\").catch((e=>{})),\"function\"!=typeof t)throw new Error(\"Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.\");const r=await i(this,e,\"f\");let o;o=n?`invokeContextHandler-${n}-${(0,l.generateId)()}`:\"invokeContextHandler\";const s=(0,l.wrapContextHandler)(t,o);return r.register(o,s),await r.dispatch(\"contextHandlerRegistered\",{handlerId:o,contextType:n}),{unsubscribe:async()=>{r.remove(o),await r.dispatch(\"removeContextHandler\",{handlerId:o})}}}async getContextGroups(){this.wire.sendAction(\"interop-client-get-context-groups\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getContextGroups\")}async joinContextGroup(t,n){this.wire.sendAction(\"interop-client-join-context-group\").catch((e=>{}));const r=await i(this,e,\"f\");if(!t)throw new Error(\"No contextGroupId specified for joinContextGroup.\");return r.dispatch(\"joinContextGroup\",{contextGroupId:t,target:n})}async removeFromContextGroup(t){this.wire.sendAction(\"interop-client-remove-from-context-group\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"removeFromContextGroup\",{target:t})}async getAllClientsInContextGroup(t){this.wire.sendAction(\"interop-client-get-all-clients-in-context-group\").catch((e=>{}));const n=await i(this,e,\"f\");if(!t)throw new Error(\"No contextGroupId specified for getAllClientsInContextGroup.\");return n.dispatch(\"getAllClientsInContextGroup\",{contextGroupId:t})}async getInfoForContextGroup(t){this.wire.sendAction(\"interop-client-get-info-for-context-group\").catch((e=>{}));const n=await i(this,e,\"f\");if(!t)throw new Error(\"No contextGroupId specified for getInfoForContextGroup.\");return n.dispatch(\"getInfoForContextGroup\",{contextGroupId:t})}async fireIntent(t){this.wire.sendAction(\"interop-client-fire-intent\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"fireIntent\",t)}async registerIntentHandler(t,n,r){this.wire.sendAction(\"interop-client-register-intent-handler\").catch((e=>{}));const o=await i(this,e,\"f\"),s=`intent-handler-${n}`,a=(0,l.wrapIntentHandler)(t,s);try{await o.register(s,a),await o.dispatch(\"intentHandlerRegistered\",{handlerId:s,...r})}catch(e){throw new Error(\"Unable to register intent handler\")}return{unsubscribe:async()=>{o.remove(s)}}}async getCurrentContext(t){this.wire.sendAction(\"interop-client-get-current-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getCurrentContext\",{contextType:t})}async getInfoForIntent(t){this.wire.sendAction(\"interop-client-get-info-for-intent\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getInfoForIntent\",t)}async getInfoForIntentsByContext(t){this.wire.sendAction(\"interop-client-get-info-for-intents-by-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"getInfoForIntentsByContext\",t)}async fireIntentForContext(t){this.wire.sendAction(\"interop-client-fire-intent-for-context\").catch((e=>{}));return(await i(this,e,\"f\")).dispatch(\"fireIntentForContext\",t)}async joinSessionContextGroup(n){try{const r=i(this,t,\"f\").get(n);if(r)return r.getUserInstance();const o=await i(this,e,\"f\"),{hasConflict:s}=await o.dispatch(\"sessionContextGroup:createIfNeeded\",{sessionContextGroupId:n});s&&console.warn(`A (non-session) context group with the name \"${n}\" already exists. If you are trying to join a Context Group, call joinContextGroup instead.`);const c=new a.default(this.wire,i(this,e,\"f\"),n);return i(this,t,\"f\").set(n,c),c.getUserInstance()}catch(e){throw console.error(`Error thrown trying to create Session Context Group with id \"${n}\": ${e}`),e}}async onDisconnection(t){this.wire.sendAction(\"interop-client-add-ondisconnection-listener\").catch((e=>{}));return(await i(this,e,\"f\")).onDisconnection((e=>{const{uuid:n}=e;t({type:\"interop-broker\",topic:\"disconnected\",brokerName:n})}))}getFDC3Sync(e){switch(e){case\"1.2\":return new c.Fdc3Module((()=>this),this.wire);case\"2.0\":return new h.Fdc3Module2((()=>this),this.wire);default:throw new Error(`Invalid FDC3 version provided: ${e}. Must be '1.2' or '2.0'`)}}async getFDC3(e){return this.getFDC3Sync(e)}static async ferryFdc3Call(t,n,r){return(await i(t,e,\"f\")).dispatch(n,r||null)}};return Ki.InteropClient=u,e=new WeakMap,t=new WeakMap,Ki}var yr,fr,gr,mr={};function vr(){if(yr)return mr;yr=1,Object.defineProperty(mr,\"__esModule\",{value:!0}),mr.overrideCheck=mr.checkFDC32Overrides=mr.getDefaultViewFdc3VersionFromAppInfo=void 0;const e=Vi();function t(t){return[\"fdc3HandleFindInstances\",\"handleInfoForIntent\",\"handleInfoForIntentsByContext\",\"fdc3HandleGetAppMetadata\",\"fdc3HandleGetInfo\",\"fdc3HandleOpen\",\"handleFiredIntent\",\"handleFiredIntentForContext\"].filter((n=>t[n]===e.InteropBroker.prototype[n]))}return mr.getDefaultViewFdc3VersionFromAppInfo=function({manifest:e,initialOptions:t}){const n=e?.platform?.defaultViewOptions?.fdc3InteropApi??t.defaultViewOptions?.fdc3InteropApi;return[\"1.2\",\"2.0\"].includes(n??\"\")?n:void 0},mr.checkFDC32Overrides=t,mr.overrideCheck=function(e,n){if(n&&\"2.0\"===n){const n=t(e);n.length>0&&console.warn(`WARNING: FDC3 2.0 has been set as a default option for Views in this Platform, but the required InteropBroker APIs for FDC3 2.0 compliance have not all been overridden.\\nThe following APIs need to be overridden:\\n${n.join(\"\\n\")}`)}},mr}function Cr(){return gr||(gr=1,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),i=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),i(function(){if(fr)return Ti;fr=1;var e=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ti,\"__esModule\",{value:!0}),Ti.InteropModule=void 0;const t=e(n),i=$i,r=d,o=Vi(),a=wr(),c=vr(),h=Tn,l=e=>new e,u=\"You have attempted to use or modify InteropBroker parameters, which is not allowed. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.\";class p extends r.Base{async init(e,n=l){this.wire.sendAction(\"interop-init\").catch((()=>{}));const r=await this.wire.environment.getInteropInfo(this.wire.getFin()),s=(0,i.createUnusableObject)(u),a=(0,i.createWarningObject)(u,(0,t.default)(r)),d=async()=>{throw new Error(u)},p=o.InteropBroker.createClosedConstructor(this.wire,(()=>this.fin.InterApplicationBus.Channel.create(`interop-broker-${e}`)),r);let w;return w=Array.isArray(n)?new((0,h.overrideFromComposables)(...n)(p))(s,d,a):await n(p,s,d,a),(0,c.overrideCheck)(w,r.fdc3Version),w}connectSync(e,t){return this.wire.sendAction(\"interop-connect-sync\").catch((()=>{})),new a.InteropClient(this.wire,this.wire.environment.whenReady().then((()=>this.fin.InterApplicationBus.Channel.connect(`interop-broker-${e}`,{payload:t}))))}}return Ti.InteropModule=p,Ti}(),e),i(wr(),e),i(Vi(),e)}(Li)),Li}var br={},Ir={},Er={},xr={};Object.defineProperty(xr,\"__esModule\",{value:!0}),xr.getSnapshotSourceChannelName=void 0;xr.getSnapshotSourceChannelName=e=>`snapshot-source-provider-${e.uuid}`;var Ar,Pr,Mr,_r,Or,Sr=s&&s.__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},Rr=s&&s.__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)};Object.defineProperty(Er,\"__esModule\",{value:!0}),Er.SnapshotSource=void 0;const Fr=d,jr=xr,kr=new Map;class Lr extends Fr.Base{constructor(e,t){super(e),Ar.set(this,void 0),Pr.set(this,(()=>(kr.has(this.identity.uuid)||kr.set(this.identity.uuid,{eventFired:null,clientPromise:null}),kr.get(this.identity.uuid)))),Mr.set(this,(()=>(Rr(this,Pr,\"f\").call(this).clientPromise||(Rr(this,Pr,\"f\").call(this).clientPromise=Rr(this,_r,\"f\").call(this)),Rr(this,Pr,\"f\").call(this).clientPromise))),_r.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);try{Rr(this,Pr,\"f\").call(this).eventFired||await Rr(this,Or,\"f\").call(this);const t=await this.fin.InterApplicationBus.Channel.connect(e,{wait:!1});return t.onDisconnection((()=>{Rr(this,Pr,\"f\").call(this).clientPromise=null,Rr(this,Pr,\"f\").call(this).eventFired=null})),t}catch(e){throw Rr(this,Pr,\"f\").call(this).clientPromise=null,new Error(\"The targeted SnapshotSource is not currently initialized. Await this object's ready() method.\")}})),Or.set(this,(async()=>{const e=(0,jr.getSnapshotSourceChannelName)(this.identity);let t,n;const i=new Promise(((e,i)=>{t=e,n=i}));Rr(this,Pr,\"f\").call(this).eventFired=i;const r=async i=>{try{i.channelName===e&&(t(),await this.fin.InterApplicationBus.Channel.removeListener(\"connected\",r))}catch(e){n(e)}};await this.fin.InterApplicationBus.Channel.on(\"connected\",r)})),Sr(this,Ar,t,\"f\")}get identity(){return Rr(this,Ar,\"f\")}async ready(){this.wire.sendAction(\"snapshot-source-ready\").catch((e=>{}));try{await Rr(this,Mr,\"f\").call(this)}catch(e){await Rr(this,Pr,\"f\").call(this).eventFired}}async getSnapshot(){this.wire.sendAction(\"snapshot-source-get-snapshot\").catch((e=>{}));const e=await Rr(this,Mr,\"f\").call(this),t=await e.dispatch(\"get-snapshot\");return(await t).snapshot}async applySnapshot(e){this.wire.sendAction(\"snapshot-source-apply-snapshot\").catch((e=>{}));return(await Rr(this,Mr,\"f\").call(this)).dispatch(\"apply-snapshot\",{snapshot:e})}}Er.SnapshotSource=Lr,Ar=new WeakMap,Pr=new WeakMap,Mr=new WeakMap,_r=new WeakMap,Or=new WeakMap,Object.defineProperty(Ir,\"__esModule\",{value:!0}),Ir.SnapshotSourceModule=void 0;const Tr=d,$r=Er,Br=xr;class Gr extends Tr.Base{async init(e){if(this.wire.sendAction(\"snapshot-source-init\").catch((e=>{})),\"object\"!=typeof e||\"function\"!=typeof e.getSnapshot||\"function\"!=typeof e.applySnapshot)throw new Error(\"you must pass in a valid SnapshotProvider\");const t=await this.fin.InterApplicationBus.Channel.create((0,Br.getSnapshotSourceChannelName)(this.fin.me));t.register(\"get-snapshot\",(async()=>({snapshot:await e.getSnapshot()}))),t.register(\"apply-snapshot\",(({snapshot:t})=>e.applySnapshot(t)))}wrapSync(e){return this.wire.sendAction(\"snapshot-source-wrap-sync\").catch((e=>{})),new $r.SnapshotSource(this.wire,e)}async wrap(e){return this.wire.sendAction(\"snapshot-source-wrap\").catch((e=>{})),this.wrapSync(e)}}Ir.SnapshotSourceModule=Gr,function(e){var t=s&&s.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!(\"get\"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),n=s&&s.__exportStar||function(e,n){for(var i in e)\"default\"===i||Object.prototype.hasOwnProperty.call(n,i)||t(n,e,i)};Object.defineProperty(e,\"__esModule\",{value:!0}),n(Ir,e),n(Er,e)}(br),Object.defineProperty(a,\"__esModule\",{value:!0});var Wr=a.Fin=void 0;const Hr=t,Nr=c,Dr=ie(),Ur=Z(),Vr=de,zr=en,Kr=rn,qr=un,Jr=bn,Yr=J(),Zr=An,Qr=ki,Xr=Cr(),eo=br;class to extends Hr.EventEmitter{constructor(e){super(),this.wire=e,this.System=new Nr.System(e),this.Window=new Dr._WindowModule(e),this.Application=new Ur.ApplicationModule(e),this.InterApplicationBus=new Vr.InterApplicationBus(e),this.Clipboard=new zr.Clipboard(e),this.ExternalApplication=new Kr.ExternalApplicationModule(e),this.Frame=new qr._FrameModule(e),this.GlobalHotkey=new Jr.GlobalHotkey(e),this.Platform=new Zr.PlatformModule(e,this.InterApplicationBus.Channel),this.View=new Yr.ViewModule(e),this.Interop=new Xr.InteropModule(e),this.SnapshotSource=new eo.SnapshotSourceModule(e),e.registerFin(this),this.me=(0,Qr.getMe)(e),e.on(\"disconnected\",(()=>{this.emit(\"disconnected\")}))}}Wr=a.Fin=to;var no={},io={};function ro(e){return\"string\"==typeof e.manifestUrl}function oo(e){return ao(e)&&\"string\"==typeof e.address}function so(e){return oo(e)&&\"string\"==typeof e.token}function ao(e){return\"string\"==typeof e.uuid}function co(e){return e.runtime&&\"string\"==typeof e.runtime.version}function ho(e){return ao(e)&&co(e)}Object.defineProperty(io,\"__esModule\",{value:!0}),io.isInternalConnectConfig=io.isPortDiscoveryConfig=io.isNewConnectConfig=io.isConfigWithReceiver=io.isRemoteConfig=io.isExistingConnectConfig=io.isExternalConfig=void 0,io.isExternalConfig=ro,io.isExistingConnectConfig=oo,io.isRemoteConfig=so,io.isConfigWithReceiver=function(e){return\"object\"==typeof e.receiver&&so({...e,address:\"\"})},io.isNewConnectConfig=ho,io.isPortDiscoveryConfig=function(e){return ro(e)&&co(e)||ho(e)},io.isInternalConnectConfig=function(e){return oo(e)||ho(e)};var lo={},uo={};Object.defineProperty(uo,\"__esModule\",{value:!0}),uo.EmitterMap=void 0;const po=t;function wo(e){return Buffer.from(e).toString(\"base64\")}uo.EmitterMap=class{constructor(){this.storage=new Map}hashKeys(e){return e.map(wo).join(\"/\")}getOrCreate(e){const t=this.hashKeys(e);return this.storage.has(t)||this.storage.set(t,new po.EventEmitter),this.storage.get(t)}has(e){return this.storage.has(this.hashKeys(e))}delete(e){const t=this.hashKeys(e);return this.storage.delete(t)}},Object.defineProperty(lo,\"__esModule\",{value:!0});const yo=uo;class fo extends yo.EmitterMap{constructor(){super(...arguments),this.dispatchEvent=e=>{if(function(e){return\"process-desktop-event\"===e.action}(e)){const{payload:t}=e,n=function(e){const{topic:t}=e;if(\"frame\"===t||\"window\"===t||\"view\"===t){const{uuid:n,name:i}=e;return[t,n,i]}if(\"application\"===t){const{uuid:n}=e;return[t,n]}return[t]}(t);if(this.has(n))return this.getOrCreate(n).emit(t.type,t),!0}return!1}}}lo.default=fo;var go,mo,vo=s&&s.__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},Co=s&&s.__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)},bo=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(no,\"__esModule\",{value:!0});var Io=no.Transport=void 0;const Eo=t,xo=io,Ao=g,Po=bo(lo),Mo=ki,_o=ke;class Oo extends Eo.EventEmitter{constructor(e,t,n){super(),this.wireListeners=new Map,this.topicRefMap=new Map,this.eventAggregator=new Po.default,this.messageHandlers=[this.eventAggregator.dispatchEvent],go.set(this,void 0),mo.set(this,void 0),this.connectSync=()=>{Co(this,go,\"f\").connectSync()},this.getPort=()=>Co(this,go,\"f\").getPort(),vo(this,go,new e(this.onmessage.bind(this)),\"f\"),this.environment=t,this.sendRaw=Co(this,go,\"f\").send.bind(Co(this,go,\"f\")),this.registerMessageHandler(this.handleMessage.bind(this)),Co(this,go,\"f\").on(\"disconnected\",(()=>{for(const[,{handleNack:e}]of this.wireListeners)e({reason:\"Remote connection has closed\"});this.wireListeners.clear(),this.emit(\"disconnected\")}));const{uuid:i,name:r}=n,o=this.environment.getCurrentEntityType();this.me=(0,Mo.getBaseMe)(o,i,r)}getFin(){if(!Co(this,mo,\"f\"))throw new Error(\"No Fin object registered for this transport\");return Co(this,mo,\"f\")}registerFin(e){if(Co(this,mo,\"f\"))throw new Error(\"Fin object has already been registered for this transport\");vo(this,mo,e,\"f\")}shutdown(){return Co(this,go,\"f\").shutdown()}async connect(e){if((0,xo.isConfigWithReceiver)(e))return await Co(this,go,\"f\").connect(e.receiver),this.authorize(e);if((0,xo.isRemoteConfig)(e))return this.connectRemote(e);if((0,xo.isExistingConnectConfig)(e))return this.connectByPort(e);if((0,xo.isNewConnectConfig)(e)){const t=await this.environment.retrievePort(e);return this.connectByPort({...e,address:`ws://localhost:${t}`})}}async connectRemote(e){return await Co(this,go,\"f\").connect(new(this.environment.getWsConstructor())(e.address)),this.authorize(e)}async connectByPort(e){const{address:t,uuid:n}=e,i={...e,type:\"file-token\"},r=Co(this,go,\"f\");await r.connect(new(this.environment.getWsConstructor())(e.address));const o=await this.sendAction(\"request-external-authorization\",{uuid:n,type:\"file-token\"},!0);if(\"external-authorization-response\"!==o.action)throw new Ao.UnexpectedActionError(o.action);return await this.environment.writeToken(o.payload.file,o.payload.token),this.authorize(i)}async authorize(e){const t=await this.sendAction(\"request-authorization\",e,!0);if(\"authorization-response\"!==t.action)throw new Ao.UnexpectedActionError(t.action);if(!0!==t.payload.success)throw new Ao.RuntimeError(t.payload)}sendAction(e,t={},n=!1){let i=()=>{};const r=Ao.RuntimeError.getCallSite(1),o=this.environment.getNextMessageId(),s=new Promise(((s,a)=>{i=a;const c={action:e,payload:t,messageId:o},d=Co(this,go,\"f\");return this.addWireListener(o,s,(e=>this.nackHandler(e,a,r)),n),d.send(c).catch(a)}));return Object.assign(s,{cancel:i,messageId:o})}nackHandler(e,t,n){t(\"string\"==typeof e?e:new Ao.RuntimeError(e,n))}ferryAction(e){return new Promise(((t,n)=>{const i=this.environment.getNextMessageId();e.messageId=i;const r=e=>{t(e.payload)};return Co(this,go,\"f\").send(e).then((()=>this.addWireListener(i,r,(e=>this.nackHandler(e,n)),!1))).catch(n)}))}registerMessageHandler(e){this.messageHandlers.push(e)}addWireListener(e,t,n,i){i?this.uncorrelatedListener=t:this.wireListeners.has(e)?n({reason:\"Duplicate handler id\",error:(0,_o.errorToPOJO)(new Ao.DuplicateCorrelationError(String(e)))}):this.wireListeners.set(e,{resolve:t,handleNack:n})}onmessage(e){for(const t of this.messageHandlers)t.call(null,e)}handleMessage(e){const t=e.correlationId||NaN;if(\"correlationId\"in e){if(!this.wireListeners.has(t))return!1;{const{resolve:n,handleNack:i}=this.wireListeners.get(t);\"ack\"!==e.action?i({reason:\"Did not receive ack action\",error:(0,_o.errorToPOJO)(new Ao.NoAckError(e.action))}):\"payload\"in e?e.payload.success?n.call(null,e):i(e.payload):\"string\"==typeof e.reason?i(e):(console.warn(\"Received invalid response from core\",e),i({reason:\"invalid response shape\"})),this.wireListeners.delete(t)}}else this.uncorrelatedListener&&this.uncorrelatedListener.call(null,e),this.uncorrelatedListener=()=>{};return!0}}Io=no.Transport=Oo,go=new WeakMap,mo=new WeakMap;const So=(...e)=>({log:(...t)=>console.debug(`[${(new Date).toISOString()}]`,...(e=>e.map((e=>`[${e}]`)))(e),...t),getLogger:(...t)=>So(...e,...t)}),Ro=So(\"@openfin/core-web/client\");function Fo(e,t){if(!function(e){return\"string\"==typeof e}(e))throw new Error(`Property ${t} has invalid type. Expected string, got ${typeof e}.`)}const jo=\"web-broker-ports-ready\",ko=Ro.getLogger(\"get-web-interop-ports\");function Lo(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)}function To(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}\"function\"==typeof SuppressedError&&SuppressedError;const $o=e=>{var n,i,r;return r=class extends t.EventEmitter{constructor(t){super(),n.set(this,void 0),i.set(this,!1),this.connectSync=()=>{Lo(this,i,\"f\")||(e.addEventListener(\"message\",(e=>{e.data?.topic?.startsWith(\"wire-message\")&&e.data.message&&Lo(this,n,\"f\").call(this,{...JSON.parse(e.data.message),ports:e.ports})})),e.start())},this.connect=async()=>{this.connectSync()},this.send=t=>(e.postMessage({topic:\"wire-message\",message:JSON.stringify(t)}),Promise.resolve()),this.shutdown=async()=>{e.close()},To(this,n,t,\"f\")}getPort(){return e}},n=new WeakMap,i=new WeakMap,r};var Bo={},Go={};Object.defineProperty(Go,\"__esModule\",{value:!0}),Go.BaseEnvironment=void 0;const Wo=vr();Go.BaseEnvironment=class{async getViewWindowIdentity(e,t){const{identity:n}=await e.View.wrapSync(t).getCurrentWindow();return n}async getInteropInfo(e){const t=await e.Application.getCurrentSync().getInfo().catch((()=>null)),n=t?.initialOptions?.interopBrokerConfiguration??{};return{fdc3Version:t?(0,Wo.getDefaultViewFdc3VersionFromAppInfo)(t):void 0,...n,fdc3Info:{providerVersion:await e.System.getVersion(),provider:\"OpenFin\"}}}},Object.defineProperty(Bo,\"__esModule\",{value:!0});var Ho=Bo.BrowserEnvironment=void 0;const No=Go;class Do extends No.BaseEnvironment{constructor(){super(...arguments),this.type=\"other\",this.getRandomId=()=>{const e=new Uint32Array(1);return window.crypto.getRandomValues(e)[0].toString(32)}}getAdapterVersionSync(){return\"\"}observeBounds(e,t){throw new Error(\"Method not implemented.\")}layoutAllowedInContext(e){return!1}initLayoutManager(e,t,n){throw new Error(\"Method not implemented.\")}applyLayoutSnapshot(e,t,n){throw new Error(\"Method not implemented.\")}createLayout(e,t){throw new Error(\"Method not implemented.\")}destroyLayout(e,t){throw new Error(\"Method not implemented.\")}resolveLayout(e,t){throw new Error(\"Method not implemented.\")}initPlatform(...e){throw new Error(\"Method not implemented.\")}writeToken(e,t){return Promise.resolve(\"\")}retrievePort(e){throw new Error(\"Method not implemented.\")}getNextMessageId(){return this.getRandomId()}createChildContent(e){throw new Error(\"Method not implemented.\")}getWebWindow(e){throw new Error(\"Method not implemented.\")}getCurrentEntityIdentity(){throw new Error(\"Method not implemented.\")}getCurrentEntityType(){return\"external connection\"}raiseEvent(e,t){throw new Error(\"Method not implemented.\")}getUrl(){return location.href}getDefaultChannelOptions(){return{create:{},connect:{}}}getRtcPeer(){return new RTCPeerConnection}getWsConstructor(){return WebSocket}whenReady(){return Promise.resolve()}}Ho=Bo.BrowserEnvironment=Do;const Uo=e=>\"platform\"in e&&void 0!==e.platform;var Vo,zo;class Ko extends Ho{constructor(e){super(),this.connectConfig=e,Vo.set(this,void 0),zo.set(this,new W((async()=>Promise.resolve().then((function(){return require(\"./main-b14f67c9.js\")}))))),Uo(e)&&this.validatePlatformOptions(e)}getAdapterVersionSync(){return\"0.39.21\"}validatePlatformOptions({platform:e}){if(!(\"layoutSnapshot\"in e))throw new Error(\"Platform options are missing layoutSnapshot. Please provide a layoutSnapshot in the platform options.\");if(\"windows\"in e||\"windows\"in e.layoutSnapshot)throw new Error(\"It appears you tried to call connect() with a snapshot object from an OpenFin desktop environment. Note that connect() expects to be called with a platform property with this structure: { platform: { layoutSnapshot } }. To get a layoutSnapshot of the expected structure, use fin.Platform.Layout.getCurrentLayoutManagerSync().getLayoutSnapshot() in v34+ in your desktop environment.\");const{layouts:t}=e.layoutSnapshot;Object.entries(t).map((([e,t])=>{if(\"object\"!=typeof t||null===t)throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must be an object.`);if(!(\"content\"in t))throw new Error(`Invalid layout detected: layoutSnapshot.layouts.${e} must contain a 'content' property.`)}))}async getInteropInfo(e){return{...{contextGroups:void 0,logging:{beforeAction:{enabled:!1},afterAction:{enabled:!1}}},fdc3Version:void 0,fdc3Info:{providerVersion:\"0.39.21\",provider:\"OpenFin Web\"}}}layoutAllowedInContext(e){return!0}async initLayoutManager(e,t,n){if(Lo(this,Vo,\"f\"))throw new Error(\"Layout already initialized.\");if(!Uo(this.connectConfig))throw new Error(\"Platform options are missing from connection config.\");const{WebLayoutEntryPoint:i}=await Lo(this,zo,\"f\").getValue();return To(this,Vo,new i(this.connectConfig),\"f\"),await Lo(this,Vo,\"f\").initLayoutManager(e,t,n)}async applyLayoutSnapshot(e,t,n){Lo(this,Vo,\"f\")?.applyLayoutSnapshot(e,t,n)}async createLayout(e,t){return Lo(this,Vo,\"f\")?.createLayout(e,t)}async destroyLayout(e,t){return Lo(this,Vo,\"f\")?.destroyLayout(e,t)}async getViewWindowIdentity(e,t){return Promise.resolve({uuid:t.uuid,name:t.uuid})}}Vo=new WeakMap,zo=new WeakMap;const qo=()=>{const e=((e,t)=>{const n=new RegExp(`^${t}<(?.*)>$`).exec(e)?.groups?.meta;if(n)try{return JSON.parse(atob(n))}catch(e){throw new Error(`Failed to decode JSON from ${n}.`)}})(window.name,\"of-frame\");if(e)try{const{name:t,uuid:n,brokerUrl:i,providerId:r,contextGroup:o}=e;return Fo(i,\"brokerUrl\"),Fo(n,\"uuid\"),Fo(t,\"name\"),{identity:{name:t,uuid:n},brokerUrl:i,interopConfig:{providerId:r,currentContextGroup:o}}}catch(e){throw new Error(`Unexpected error occurred when inferring platform information: ${e.stack}`)}},Jo=()=>{const e=r.v4();return{uuid:e,name:e}},Yo=async e=>{if(\"enabled\"===e.connectionInheritance){const t=await(async e=>{const t=qo();if(t){const{validateOptions:n=(()=>!0)}=e,{identity:i,...r}=t;if(!await n(r))throw new Error(\"Parent options were rejected by validateOptions.\");return t}})(e);if(t)return t}if(!e.options){const t=\"enabled\"===e.connectionInheritance?\"Broker URL was not specified nor provided by a platform container.\":\"Connection inheritance is disabled but no options were provided.\";throw new Error(t)}return{...e.options,identity:Jo()}};exports.__classPrivateFieldGet=Lo,exports.__classPrivateFieldSet=To,exports.apiExposer=Gn,exports.commonjsGlobal=s,exports.connect=async t=>{try{Ro.log(\"Establishing connection\",t);const{brokerUrl:n,identity:i,timeout:r,interopConfig:s}=await Yo(t),{workerPort:a,iframeBrokerPort:c}=await(async(e,t,n)=>{const{origin:i}=new URL(e),r=document.createElement(\"IFRAME\");let s;r.style.display=\"none\";try{return await new Promise(((a,c)=>{const d=e=>{if(e.source===r.contentWindow&&e.data?.topic===`ack-${jo}`){if(e.origin!==i)c(new Error(`Broker redirected to unexpected origin ${e.origin}, expected ${i}.`));else if(e.data.success){const[t,n]=e.ports;a({iframeBrokerPort:t,workerPort:n})}else c(new m(e.data));window.removeEventListener(\"message\",d),clearTimeout(s)}};window.addEventListener(\"message\",d),ko.log(`Connecting to broker ${e}`),r.setAttribute(\"src\",e),r.setAttribute(\"name\",o(t,\"of-broker\")),document.body.appendChild(r),ko.log(\"Iframe loaded, awaiting init message from iframe\"),n&&(s=setTimeout((()=>{window.removeEventListener(\"message\",d),document.body.removeChild(r),c(new Error(\"Worker did not initialize in time\"))}),n))}))}catch(e){throw new Error(`Failed to initialise Fin Web Client. ${e.message}`,{cause:e})}})(n,i,r);Ro.log(\"Successfully established connection to shared worker\");const d={entityType:\"external connection\",...i};a.start(),c.start();const h=((t,n,i)=>{const r=$o(n),o=new Ko(t),s=new Io(r,o,i);return s.connectSync(),window.Buffer=e.Buffer,new Wr(s)})(t,a,d);return s?.providerId&&(h.me.interop=h.Interop.connectSync(s.providerId),s?.currentContextGroup&&h.me.interop.joinContextGroup(s.currentContextGroup).catch((e=>{console.warn(`Error joining specified context group: ${s?.currentContextGroup}, continuing`,e)}))),{...h,me:{...h.me,identity:{uuid:h.me.uuid,name:h.me.name}}}}catch(e){throw new Error(`An error occured during web-interop connection: ${e.message}`)}},exports.decorators=Nn,exports.encodeOptions=o,exports.layout_constants=ai,exports.lazy=G;\n","\"use strict\";var t=require(\"./main-8cad4070.js\"),e=require(\"uuid\");require(\"buffer/\"),require(\"events\"),require(\"lodash/cloneDeep\"),require(\"lodash/isEqual\");var i={},n={};Object.defineProperty(n,\"__esModule\",{value:!0}),n.mapValuesAsync=n.mapEntriesAsync=void 0;const o=(t,[e,i])=>({...t,[e]:i});async function s(t,e){return(await Promise.all(e.map((async([e,i])=>[e,await t(i,e)])))).reduce(o,{})}n.mapEntriesAsync=s,n.mapValuesAsync=async function(t,e){let i;return i=e instanceof Map?[...e.entries()]:Object.entries(e),s(t,i)};var r,a,l,h,d=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldSet||function(t,e,i,n,o){if(\"m\"===n)throw new TypeError(\"Private method is not writable\");if(\"a\"===n&&!o)throw new TypeError(\"Private accessor was defined without a setter\");if(\"function\"==typeof e?t!==e||!o:!e.has(t))throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");return\"a\"===n?o.call(t,i):o?o.value=i:e.set(t,i),i},c=t.commonjsGlobal&&t.commonjsGlobal.__classPrivateFieldGet||function(t,e,i,n){if(\"a\"===i&&!n)throw new TypeError(\"Private accessor was defined without a getter\");if(\"function\"==typeof e?t!==e||!n:!e.has(t))throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");return\"m\"===i?n:\"a\"===i?n.call(t):n?n.value:e.get(t)};Object.defineProperty(i,\"__esModule\",{value:!0});var m=i.DefaultLayoutManager=void 0;const u=n;class p{constructor(t){a.set(this,void 0),l.set(this,new Map),d(this,a,t,\"f\")}size(){return c(this,l,\"f\").size}async applyLayoutSnapshot({layouts:t}){if(Object.keys(t).length>1)throw new Error(\"[LayoutManager] Tried to call applyLayoutSnapshot with more than 1 layout. When implementing multiple layouts via overridden LayoutManager class, you must override and fully implement the applyLayoutSnapshot method without calling super.applyLayoutSnapshot().\");const[[e,i]]=Object.entries(t);await p.createLayout(this,{layoutName:e,layout:i})}async showLayout({layoutName:t}){}async getLayoutSnapshot(){return{layouts:await(0,u.mapValuesAsync)((t=>t.getFrameSnapshot()),c(this,l,\"f\"))}}async removeLayout({layoutName:t}){}getLayoutIdentityForView(t){const e=[...c(this,l,\"f\").values()].find((e=>e.getCurrentViews().some((e=>e.name===t.name&&e.uuid===t.uuid))));return e?.identity??void 0}isLayoutVisible({layoutName:t}){return c(p,r,\"m\",h).call(p,this,t).isVisible()}resolveLayoutIdentity(t){if(t&&\"layoutName\"in t)return t;const e=[...c(this,l,\"f\").values()];if(1===e.length)return e[0].identity;const i=e.find((t=>t.isVisible()));return i?.identity??void 0}static async resolveLayout(t,e){const i=t.resolveLayoutIdentity(e);if(void 0===i||!(\"layoutName\"in i))throw new Error(\"[layout-manager] resolveLayout: Could not resolve the layout identity. Make sure you include 'layoutName' in the identity object.\");return c(p,r,\"m\",h).call(p,t,i.layoutName)}static async handleSharedView(t,e,i){await(0,u.mapValuesAsync)((async t=>{if(t.identity.layoutName!==e.layoutName){const e=t.getCurrentViews().find((t=>t.name===i.name));e&&await t.onViewDetached({viewIdentity:e,target:null}).catch(console.error)}}),c(t,l,\"f\"))}static async handleLastViewRemoved(t,e){await t.removeLayout(e),await c(t,a,\"f\").handleLastViewRemoved(t)}static async destroyLayout(t,{layoutName:e}){await c(p,r,\"m\",h).call(p,t,e).destroy(),c(t,l,\"f\").delete(e)}static async createLayout(t,e){const{layoutName:i}=e;if(c(t,l,\"f\").has(i))throw new Error(`Layout name ${i} already exists`);await c(t,a,\"f\").createLayout(e,t)}static registerLayout(t,e,i){c(t,l,\"f\").set(e,i)}static getAllLayouts(t){return[...c(t,l,\"f\").values()]}static setInitialSnapshot(t,e){c(t,a,\"f\").setInitialSnapshot(e)}static createClosedConstructor(...t){return class extends p{constructor(){super(...t)}}}}m=i.DefaultLayoutManager=p,r=p,a=new WeakMap,l=new WeakMap,h=function(t,e){const i=c(t,l,\"f\").get(e);if(!i)throw new Error(`[layout-manager] getLayoutByName: Could not locate layout with name '${e}'`);return i};var g={},f={},v={};Object.defineProperty(v,\"__esModule\",{value:!0}),v.ReversibleMap=void 0;v.ReversibleMap=class{constructor(){this.valueToKey=new Map,this.keyToValue=new Map,this.setUnique=(t,e)=>{if(this.hasKey(t)||this.hasValue(e))throw new Error(\"Key or value already in the map.\");this.keyToValue.set(t,e),this.valueToKey.set(e,t)},this.getKey=t=>{const e=this.valueToKey.get(t);if(!e)throw new Error(\"Value not found in the map.\");return e},this.deleteKey=t=>{const e=this.getValue(t);return this.keyToValue.delete(t),this.valueToKey.delete(e),e},this.deleteValue=t=>{const e=this.getKey(t);return this.keyToValue.delete(e),this.valueToKey.delete(t),e},this.hasKey=t=>this.keyToValue.has(t),this.hasValue=t=>this.valueToKey.has(t)}getValue(t){const e=this.keyToValue.get(t);if(!e)throw new Error(\"Key not found in the map.\");return e}},Object.defineProperty(f,\"__esModule\",{value:!0});var _=f.LayoutContentCache=void 0;const y=t.lazy,C=v;class w{constructor(){this.contentItemCache=new C.ReversibleMap,this.contentItemCacheId=0,this.createCacheKey=()=>{const t=`entity-${this.contentItemCacheId.toString()}`;return this.contentItemCacheId+=1,t},this.hasKey=t=>this.contentItemCache.hasKey(t),this.getItemOrUndefined=t=>{try{return this.getContentItemOrThrow(t)}catch(t){return}},this.getContentItemOrThrow=(t,e)=>{if(!this.contentItemCache.hasKey(t))throw new Error(\"Layout component has been destroyed or detached from the current layout.\");const i=this.contentItemCache.getValue(t);if(e&&!e.includes(i.type))throw new Error(`Layout item is not the expected type. Expected ${e.join(\", \")}, got ${i.type}.`);return i},this.getOrCreateEntityId=t=>{if(this.contentItemCache.hasValue(t))return this.contentItemCache.getKey(t);t.onDestroyed((()=>{this.contentItemCache.deleteValue(t)}));const e=this.createCacheKey();return this.contentItemCache.setUnique(e,t),e}}static getSingleInstance(){return w.singleton.getValue()}}_=f.LayoutContentCache=w,w.singleton=new y.Lazy((()=>new w));var I={},b={};!function(t){Object.defineProperty(t,\"__esModule\",{value:!0}),t.getAdjacentStacks=t.doShareEdge=t.getAdjacentItem=void 0;t.getAdjacentItem=(e,i)=>{const{parent:n}=e;if(e.isRoot()||!n)return;const o=[\"top\",\"bottom\"].includes(i)?\"column\":\"row\",s=[\"top\",\"left\"].includes(i)?-1:1;if(n.type===o){const t=n.contentItems.indexOf(e)+s;if(t>=0&&t{const n=t.getBounds(),o=e.getBounds();if(!n||!o)return!1;if([\"top\",\"bottom\"].includes(i)){return!(n.righto.right)}return!(n.bottomo.bottom)};t.getAdjacentStacks=(e,i)=>{const n=[\"top\",\"bottom\"].includes(i)?\"row\":\"column\",o=s=>\"stack\"===s.type?(0,t.doShareEdge)(e,s,i)?[s]:[]:\"root\"===s.type||\"ground\"===s.type?[]:s.type===n?s.contentItems.map((t=>o(t))).flat():s.type!==n?[\"top\",\"right\"].includes(i)?o(s.contentItems[s.contentItems.length-1]):o(s.contentItems[0]):[],s=(0,t.getAdjacentItem)(e,i);return s?o(s):[]}}(b);var S=t.commonjsGlobal&&t.commonjsGlobal.__decorate||function(t,e,i,n){var o,s=arguments.length,r=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if(\"object\"==typeof Reflect&&\"function\"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(s<3?o(r):s>3?o(e,i,r):o(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};Object.defineProperty(I,\"__esModule\",{value:!0}),I.LayoutEntitiesController=void 0;const E=t.decorators,x=b,L=i;class z{constructor(t,e,i){this.wire=t,this.layoutManager=e,this.layoutContentCache=i,this.analytics=t=>{this.wire.sendAction(`layout-controller-${t}`).catch((()=>{}))},this.getLayoutIdentityForViewOrThrow=async t=>{const e=this.layoutManager.getLayoutIdentityForView(t);if(!e)throw new Error(`View identity ${t.name} is not attached to any layouts.`);return e},this.getRoot=async t=>{this.analytics(\"get-root\");const e=(await this.getLayout(t)).getRoot();return{type:e.type,entityId:this.layoutContentCache.getOrCreateEntityId(e)}},this.getStackByView=async t=>{this.analytics(\"get-stack-by-view\");const e=await this.getLayoutIdentityForViewOrThrow(t),i=(await this.getLayout(e)).getStackByView(t);if(\"stack\"===i?.type)return{entityId:this.layoutContentCache.getOrCreateEntityId(i),type:\"stack\"}},this.getStackViews=t=>{this.analytics(\"get-stack-views\");return this.layoutContentCache.getContentItemOrThrow(t,[\"stack\"]).contentItems.map((t=>({name:t.viewName,uuid:this.wire.me.uuid})))},this.isRoot=t=>{this.analytics(\"is-root\");return this.layoutContentCache.getContentItemOrThrow(t).isRoot()},this.exists=t=>(this.analytics(\"exists\"),this.layoutContentCache.hasKey(t)),this.addViewToStack=async(t,e,{index:i}={index:0})=>{this.analytics(\"add-view-to-stack\");const n=this.layoutContentCache.getContentItemOrThrow(t);if(i&&i>n.contentItems.length+1)throw new Error(`Index '${i}' out of range, please exclude the index or specify a number between 0 and ${n.contentItems.length}`);const o={id:t,index:i},{identity:s}=await n.layout.platformCreateView(e,{location:o});return s},this.findViewInStack=(t,e)=>t.contentItems.find((t=>t.viewName===e.name)),this.removeViewFromStack=async(t,e)=>{this.analytics(\"remove-view-from-stack\");const i=this.layoutContentCache.getContentItemOrThrow(t,[\"stack\"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to remove a view ('${e.name}') which does not belong to the stack.`);await n.layout.platformCloseView(e)},this.createAdjacentStack=async(t,e,{position:i=\"right\"}={})=>{if(this.analytics(\"create-adjacent-stack\"),!Array.isArray(e)||0===e.length)throw new Error('The parameter \"views\" must be an array with at least 1 element.');if(![\"top\",\"bottom\",\"left\",\"right\"].includes(i))throw new Error(`Invalid position '${i}' specified.`);const n=this.layoutContentCache.getContentItemOrThrow(t).createAdjacentStack({position:i}),o=this.layoutContentCache.getOrCreateEntityId(n);return await Promise.all(e.reverse().map((t=>this.addViewToStack(o,t)))),o},this.getAdjacentStacks=async({targetId:t,edge:e})=>{this.analytics(\"get-adjacent-stacks\");const i=this.layoutContentCache.getContentItemOrThrow(t);return(0,x.getAdjacentStacks)(i,e).map((t=>({entityId:this.layoutContentCache.getOrCreateEntityId(t)})))},this.setStackActiveView=async(t,e)=>{this.analytics(\"set-stack-active-view\");const i=this.layoutContentCache.getContentItemOrThrow(t,[\"stack\"]),n=this.findViewInStack(i,e);if(!n)throw new Error(`Tried to set a view ('${e.name}') as active when it does not belong to the stack.`);i.setActiveContentItem(n,!0)}}async getLayout(t){const e=await L.DefaultLayoutManager.resolveLayout(this.layoutManager,t);if(!e)throw new Error(`Could not resolve target layout identity ${JSON.stringify(t)}`);return e}getContent(t){this.analytics(\"get-content\");return this.layoutContentCache.getContentItemOrThrow(t,[\"column\",\"row\"]).contentItems.map((t=>({type:t.type,entityId:this.layoutContentCache.getOrCreateEntityId(t)})))}getParent(t){this.analytics(\"get-parent\");const e=this.layoutContentCache.getContentItemOrThrow(t);if(!e.isRoot())return e.parent?.contentItems.includes(e)?{type:e.parent.type,entityId:this.layoutContentCache.getOrCreateEntityId(e.parent)}:void 0}}S([(0,E.expose)()],z.prototype,\"getLayoutIdentityForViewOrThrow\",void 0),S([(0,E.expose)()],z.prototype,\"getRoot\",void 0),S([(0,E.expose)()],z.prototype,\"getStackByView\",void 0),S([(0,E.expose)()],z.prototype,\"getStackViews\",void 0),S([(0,E.expose)()],z.prototype,\"getContent\",null),S([(0,E.expose)()],z.prototype,\"getParent\",null),S([(0,E.expose)()],z.prototype,\"isRoot\",void 0),S([(0,E.expose)()],z.prototype,\"exists\",void 0),S([(0,E.expose)()],z.prototype,\"addViewToStack\",void 0),S([(0,E.expose)()],z.prototype,\"removeViewFromStack\",void 0),S([(0,E.expose)()],z.prototype,\"createAdjacentStack\",void 0),S([(0,E.expose)()],z.prototype,\"getAdjacentStacks\",void 0),S([(0,E.expose)()],z.prototype,\"setStackActiveView\",void 0),I.LayoutEntitiesController=z,Object.defineProperty(g,\"__esModule\",{value:!0});var M=g.initLayoutEndpoints=void 0;const P=t.apiExposer,T=t.layout_constants,A=f,k=I,D=i;M=g.initLayoutEndpoints=async function(t,e){const i=t.getFin(),n=await i.Platform.getCurrentSync().getClient(),o=new P.ChannelsExposer(n);await new P.ApiExposer(o).exposeInstance(new k.LayoutEntitiesController(t,e,A.LayoutContentCache.getSingleInstance()),{id:T.LAYOUT_CONTROLLER_ID}),await async function(t,e){const i=t=>async i=>{const n=await D.DefaultLayoutManager.resolveLayout(e,i.target);if(!n)throw new Error(`Could not resolve the layout target from payload ${JSON.stringify(i)}`);return t(n,i)},n=(e,n)=>{t.register(e,i(n))},o=(t,e)=>{n(t,e)};n(\"replace-view\",((t,e)=>t.replaceView(e))),n(\"replace-layout\",((t,{layout:e})=>t.replaceLayout(e))),n(\"add-view\",((t,e)=>t.insertView(e))),o(\"layout-add-view\",((t,{viewOptions:e,location:i,targetView:n})=>t.platformCreateView(e,{location:i,targetView:n}))),n(\"close-view\",((t,e)=>t.cleanupView(e.viewIdentity))),o(\"layout-close-view\",((t,e)=>t.platformCloseView(e.viewIdentity))),n(\"apply-preset-layout\",((t,e)=>t.applyPreset(e))),n(\"get-layout-views\",(t=>t.getCurrentViews())),n(\"get-frame-snapshot\",(t=>t.getFrameSnapshot())),n(\"is-visible\",(t=>t.isVisible())),n(\"destroy\",(t=>t.destroy())),t.register(\"get-layout-snapshot\",(()=>e.getLayoutSnapshot()))}(n,e)};var R={};Object.defineProperty(R,\"__esModule\",{value:!0});var U=R.BaseLayout=void 0;U=R.BaseLayout=class{};var O={};Object.defineProperty(O,\"__esModule\",{value:!0});var V=O.DOMEmitter=void 0;V=O.DOMEmitter=class{constructor(t){this.container=t}dispatchLocalEvent(t,e){const i={...e,type:t,tabSelector:`tab-${e.name}`,containerSelector:`container-${e.name}`,topic:\"openfin-DOM-event\"};this.container.dispatchEvent(new CustomEvent(t,{detail:i}))}};var B={};Object.defineProperty(B,\"__esModule\",{value:!0});var H=B.mapLayoutContentItemsImmutableSync=B.mapLayoutContentItemsImmutable=W=B.isVisible=void 0;var W=B.isVisible=t=>(0!==t.offsetWidth||0!==t.offsetHeight)&&\"hidden\"!==window.getComputedStyle(t).visibility&&t.offsetTop>=0&&t.offsetLeft>=0&&t.offsetTop<=window.innerHeight&&t.offsetLeft<=window.innerWidth;const F=t=>\"type\"in t&&\"component\"===t.type;B.mapLayoutContentItemsImmutable=async function t(e,i){return F(i)?e(i):{...i,content:await Promise.all(i.content?.map((i=>t(e,i))))}},H=B.mapLayoutContentItemsImmutableSync=function t(e,i){return F(i)?e(i):{...i,content:i.content?.map((i=>t(e,i)))}};class N extends Error{constructor(t,e){super(e),this.type=t}}class G extends N{constructor(t,e){super(\"Configuration\",t),this.node=e}}class j extends N{constructor(t){super(\"PopoutBlocked\",t)}}class $ extends N{constructor(t){super(\"API\",t)}}class Z extends N{constructor(t){super(\"Bind\",t)}}class q extends Error{constructor(t,e,i){super(`${t}: ${e}${void 0===i?\"\":\": \"+i}`)}}class X extends q{constructor(t,e){super(\"Assert\",t,e)}}class Y extends q{constructor(t,e,i){super(\"UnreachableCase\",t,`${e}${void 0===i?\"\":\": \"+i}`)}}class K extends q{constructor(t,e){super(\"UnexpectedNull\",t,e)}}class J extends q{constructor(t,e){super(\"UnexpectedUndefined\",t,e)}}var Q;!function(t){let e=!1;const i={PopoutCannotBeCreatedWithGroundItemConfig:{id:0,default:\"Popout cannot be created with ground ItemConfig\"},PleaseRegisterAConstructorFunction:{id:1,default:\"Please register a constructor function\"},ComponentTypeNotRegisteredAndBindComponentEventHandlerNotAssigned:{id:2,default:\"Component type not registered and BindComponentEvent handler not assigned\"},ComponentIsAlreadyRegistered:{id:3,default:\"Component is already registered\"},ComponentIsNotVirtuable:{id:4,default:\"Component is not virtuable. Requires rootHtmlElement field/getter\"},VirtualComponentDoesNotHaveRootHtmlElement:{id:5,default:'Virtual component does not have getter \"rootHtmlElement\"'},ItemConfigIsNotTypeComponent:{id:6,default:\"ItemConfig is not of type component\"},InvalidNumberPartInSizeString:{id:7,default:\"Invalid number part in size string\"},UnknownUnitInSizeString:{id:8,default:\"Unknown unit in size string\"},UnsupportedUnitInSizeString:{id:9,default:\"Unsupported unit in size string\"}};t.idCount=Object.keys(i).length;const n=Object.values(i);t.checkInitialise=function(){if(!e)for(let e=0;e=\"0\"&&t<=\"9\"}function Tt(t,e){const i=zt(e);t.style.width=i}function At(t,e){const i=zt(e);t.style.height=i}function kt(t){return{width:t.offsetWidth,height:t.offsetHeight}}function Dt(t,e){t.style.display=e?\"\":\"none\"}function Rt(t,e){if(void 0!==e)for(const i in e)if(e.hasOwnProperty(i)){const n=e[i],o=t[i];t[i]=Ut(o,n)}return t}function Ut(t,e){if(\"object\"!=typeof e)return e;if(Array.isArray(e)){const t=e.length,i=new Array(t);for(let n=0;n36)throw new Error(\"Too many keys in config minifier map\")},t.translateObject=n}(dt||(dt={})),function(t){t.defaults={type:at.ground,content:[],size:1,sizeUnit:ht.Fractional,minSize:void 0,minSizeUnit:ht.Pixel,id:\"\",isClosable:!0},t.createCopy=function(t,e){switch(t.type){case at.ground:case at.row:case at.column:return gt.createCopy(t,e);case at.stack:return ut.createCopy(t,e);case at.component:return pt.createCopy(t);default:throw new Y(\"CICC91354\",t.type,\"Invalid Config Item type specified\")}},t.createDefault=function(t){switch(t){case at.ground:throw new X(\"CICCDR91562\");case at.row:case at.column:return gt.createDefault(t);case at.stack:return ut.createDefault();case at.component:return pt.createDefault();default:throw new Y(\"CICCDD91563\",t,\"Invalid Config Item type specified\")}},t.isComponentItem=function(t){return t.type===at.component},t.isStackItem=function(t){return t.type===at.stack},t.isGroundItem=function(t){return t.type===at.ground}}(ct||(ct={})),function(t){t.defaultMaximised=!1,function(t){t.createCopy=function(t,e){return void 0===t?void 0:{show:null!=e?e:t.show,popout:t.popout,close:t.close,maximise:t.maximise,minimise:t.minimise,tabDropdown:t.tabDropdown}}}(t.Header||(t.Header={}))}(mt||(mt={})),function(t){function e(t){const e=t.length,i=new Array(e);for(let n=0;n\"__glMaximised\"===t));t>0&&(o=!0,n=n.splice(t,1)),e=n.length>0?n[0]:ct.defaults.id}else e=n;return i=void 0!==t.maximised?t.maximised:o,{id:e,maximised:i}}}(wt||(wt={})),function(t){function e(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0;return{resolved:!0,root:Et.resolve(i),openPopouts:t.resolveOpenPopouts(e.openPopouts),dimensions:t.Dimensions.resolve(e.dimensions),settings:t.Settings.resolve(e.settings),header:t.Header.resolve(e.header,e.settings,e.labels)}}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:Lt.fromResolvedArray(e.openPopouts),settings:_t.Settings.createCopy(e.settings),dimensions:t.Dimensions.fromResolved(e.dimensions),header:_t.Header.createCopy(e.header)}},t.isResolved=function(t){const e=t;return void 0!==e.resolved&&!0===e.resolved},t.resolveOpenPopouts=function(t){if(void 0===t)return[];{const e=t.length,i=new Array(e);for(let n=0;n0?e.content[0]:void 0,{root:Et.resolve(o),openPopouts:xt.resolveOpenPopouts(e.openPopouts),dimensions:xt.Dimensions.resolve(e.dimensions),settings:xt.Settings.resolve(e.settings),header:xt.Header.resolve(e.header,e.settings,e.labels),parentId:null!==(i=e.parentId)&&void 0!==i?i:null,indexInParent:null!==(n=e.indexInParent)&&void 0!==n?n:null,window:t.Window.resolve(e.window,e.dimensions),resolved:!0}},t.fromResolved=function(e){return{root:Et.fromResolvedOrUndefined(e.root),openPopouts:i(e.openPopouts),dimensions:xt.Dimensions.fromResolved(e.dimensions),settings:_t.Settings.createCopy(e.settings),header:_t.Header.createCopy(e.header),parentId:e.parentId,indexInParent:e.indexInParent,window:t.Window.fromResolved(e.window)}},t.fromResolvedArray=i}(Lt||(Lt={}));class Wt{constructor(){this._allEventSubscriptions=[],this._subscriptionsMap=new Map,this.unbind=this.removeEventListener,this.trigger=this.emit}tryBubbleEvent(t,e){}emit(t,...e){let i=this._subscriptionsMap.get(t);if(void 0!==i){i=i.slice();for(let t=0;t0){const n=e.slice();n.unshift(t);const o=this._allEventSubscriptions.slice();for(let t=0;t0?n.contentItems[0]:n,e=0);const o=this._layoutManager.createAndInitContentItem(i,t);t.addChild(o,e),this._layoutManager.layoutConfig.settings.popInOnClose?this._onClose():this.close()}createWindow(){const t=this.createUrl(),e=Math.floor(1e6*Math.random()).toString(36),i=this.serializeWindowFeatures({width:this._initialWindowSize.width,height:this._initialWindowSize.height,innerWidth:this._initialWindowSize.width,innerHeight:this._initialWindowSize.height,menubar:\"no\",toolbar:\"no\",location:\"no\",personalbar:\"no\",resizable:\"yes\",scrollbars:\"no\",status:\"no\"});if(this._popoutWindow=globalThis.open(t,e,i),this._popoutWindow)this._popoutWindow.addEventListener(\"load\",(()=>this.positionWindow()),{passive:!0}),this._popoutWindow.addEventListener(\"beforeunload\",(()=>{this._layoutManager.layoutConfig.settings.popInOnClose?this.popIn():this._onClose()}),{passive:!0}),this._checkReadyInterval=setInterval((()=>this.checkReady()),10);else if(!0===this._layoutManager.layoutConfig.settings.blockedPopoutsThrowError){throw new j(\"Popout blocked\")}}checkReady(){if(null===this._popoutWindow)throw new K(\"BPCR01844\");this._popoutWindow.__glInstance&&this._popoutWindow.__glInstance.isInitialised&&(this.onInitialised(),void 0!==this._checkReadyInterval&&(clearInterval(this._checkReadyInterval),this._checkReadyInterval=void 0))}serializeWindowFeatures(t){const e=[];for(const i in t)e.push(i+\"=\"+t[i].toString());return e.join(\",\")}createUrl(){const t=\"gl-window-config-\"+Ot(),e=_t.minifyConfig(this._config);try{localStorage.setItem(t,JSON.stringify(e))}catch(t){throw new Error(\"Error while writing to localStorage \"+function(t){return t instanceof Error?t.message:\"string\"==typeof t?t:\"Unknown Error\"}(t))}const i=new URL(location.href);return i.searchParams.set(\"gl-window\",t),i.toString()}positionWindow(){if(null===this._popoutWindow)throw new Error(\"BrowserPopout.positionWindow: null popoutWindow\");this._popoutWindow.moveTo(this._initialWindowSize.left,this._initialWindowSize.top),this._popoutWindow.focus()}onInitialised(){this._isInitialised=!0,this.getGlInstance().on(\"popIn\",(()=>this.popIn())),this.emit(\"initialised\")}_onClose(){setTimeout((()=>this.emit(\"closed\")),50)}}class Gt extends Wt{constructor(t,e,i,n){super(),this.layoutManager=t,this._parent=i,this._element=n,this._popInParentIds=[],this._type=e.type,this._id=e.id,this._isInitialised=!1,this.isGround=!1,this.isRow=!1,this.isColumn=!1,this.isStack=!1,this.isComponent=!1,this.size=e.size,this.sizeUnit=e.sizeUnit,this.minSize=e.minSize,this.minSizeUnit=e.minSizeUnit,this._isClosable=e.isClosable,this._pendingEventPropagations={},this._throttledEvents=[\"stateChanged\"],this._contentItems=this.createContentItems(e.content)}get type(){return this._type}get id(){return this._id}set id(t){this._id=t}get popInParentIds(){return this._popInParentIds}get parent(){return this._parent}get contentItems(){return this._contentItems}get isClosable(){return this._isClosable}get element(){return this._element}get isInitialised(){return this._isInitialised}static isStack(t){return t.isStack}static isComponentItem(t){return t.isComponent}static isComponentParentableItem(t){return t.isStack||t.isGround}removeChild(t,e=!1){const i=this._contentItems.indexOf(t);if(-1===i)throw new Error(\"Can't remove child item. Unknown content item\");if(e||this._contentItems[i].destroy(),this._contentItems.splice(i,1),this._contentItems.length>0)this.updateSize(!1);else if(!this.isGround&&!0===this._isClosable){if(null===this._parent)throw new K(\"CIUC00874\");this._parent.removeChild(this)}}addChild(t,e,i){return null!=e||(e=this._contentItems.length),this._contentItems.splice(e,0,t),t.setParent(this),!0===this._isInitialised&&!1===t._isInitialised&&t.init(),e}replaceChild(t,e,i=!1){const n=this._contentItems.indexOf(t),o=t._element.parentNode;if(-1===n)throw new X(\"CIRCI23232\",\"Can't replace child. oldChild is not child of this\");if(null===o)throw new K(\"CIRCP23232\");if(o.replaceChild(e._element,t._element),!0===i&&(t._parent=null,t.destroy()),this._contentItems[n]=e,e.setParent(this),e.size=t.size,e.sizeUnit=t.sizeUnit,e.minSize=t.minSize,e.minSizeUnit=t.minSizeUnit,null===e._parent)throw new K(\"CIRCNC45699\");!0===e._parent._isInitialised&&!1===e._isInitialised&&e.init(),this.updateSize(!1)}remove(){if(null===this._parent)throw new K(\"CIR11110\");this._parent.removeChild(this)}popout(){const t=Ot(),e=this.layoutManager.createPopoutFromContentItem(this,void 0,t,void 0);return this.emitBaseBubblingEvent(\"stateChanged\"),e}calculateConfigContent(){const t=this._contentItems,e=t.length,i=new Array(e);for(let n=0;nthis.propagateEventToLayoutManager(t,e))))}propagateEventToLayoutManager(t,e){this._pendingEventPropagations[t]=!1,this.layoutManager.emitUnknown(t,e)}}class jt extends Gt{constructor(t,e,i){super(t,e,i,document.createElement(\"div\")),this._parentItem=i,this._focused=!1,this.isComponent=!0,this._reorderEnabled=e.reorderEnabled,this.applyUpdatableConfig(e),this._initialWantMaximise=e.maximised;const n=document.createElement(\"div\");n.classList.add(\"lm_content\"),this.element.appendChild(n),this._container=new Ft(e,this,t,n,(t=>this.handleUpdateItemConfigEvent(t)),(()=>this.show()),(()=>this.hide()),(t=>this.focus(t)),(t=>this.blur(t)))}get componentName(){return this._container.componentType}get componentType(){return this._container.componentType}get reorderEnabled(){return this._reorderEnabled}get initialWantMaximise(){return this._initialWantMaximise}get component(){return this._container.component}get container(){return this._container}get parentItem(){return this._parentItem}get headerConfig(){return this._headerConfig}get title(){return this._title}get tab(){return this._tab}get focused(){return this._focused}destroy(){this._container.destroy(),super.destroy()}applyUpdatableConfig(t){this.setTitle(t.title),this._headerConfig=t.header}toConfig(){const t=this._container.stateRequestEvent,e=void 0===t?this._container.state:t();return{type:at.component,content:[],size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,maximised:!1,isClosable:this.isClosable,reorderEnabled:this._reorderEnabled,title:this._title,header:mt.Header.createCopy(this._headerConfig),componentType:pt.copyComponentType(this.componentType),componentState:e}}close(){if(null===this.parent)throw new K(\"CIC68883\");this.parent.removeChild(this,!1)}enterDragMode(t,e){Tt(this.element,t),At(this.element,e),this._container.enterDragMode(t,e)}exitDragMode(){this._container.exitDragMode()}enterStackMaximised(){this._container.enterStackMaximised()}exitStackMaximised(){this._container.exitStackMaximised()}drag(){this._container.drag()}updateSize(t){this.updateNodeSize(t)}init(){this.updateNodeSize(!1),super.init(),this._container.emit(\"open\"),this.initContentItems()}setTitle(t){this._title=t,this.emit(\"titleChanged\",t),this.emit(\"stateChanged\")}setTab(t){this._tab=t,this.emit(\"tab\",t),this._container.setTab(t)}hide(){super.hide(),this._container.setVisibility(!1)}show(){super.show(),this._container.setVisibility(!0)}focus(t=!1){this.parentItem.setActiveComponentItem(this,!0,t)}setFocused(t){this._focused=!0,this.tab.setFocused(),t||this.emitBaseBubblingEvent(\"focus\")}blur(t=!1){this._focused&&this.layoutManager.setFocusedComponentItem(void 0,t)}setBlurred(t){this._focused=!1,this.tab.setBlurred(),t||this.emitBaseBubblingEvent(\"blur\")}setParent(t){this._parentItem=t,super.setParent(t)}handleUpdateItemConfigEvent(t){this.applyUpdatableConfig(t)}updateNodeSize(t){if(\"none\"!==this.element.style.display){const{width:e,height:i}=kt(this.element);this._container.setSizeToNodeSize(e,i,t)}}}class $t extends Gt{constructor(){super(...arguments),this._focused=!1}get focused(){return this._focused}setFocusedValue(t){this._focused=t}}class Zt extends Wt{constructor(t,e){super(),this._eElement=t,this._pointerTracking=!1,this._pointerDownEventListener=t=>this.onPointerDown(t),this._pointerMoveEventListener=t=>this.onPointerMove(t),this._pointerUpEventListener=t=>this.onPointerUp(t),this._timeout=void 0,this._allowableTargets=[t,...e],this._oDocument=document,this._eBody=document.body,this._nDelay=1800,this._nDistance=10,this._nX=0,this._nY=0,this._nOriginalX=0,this._nOriginalY=0,this._dragging=!1,this._eElement.addEventListener(\"pointerdown\",this._pointerDownEventListener,{passive:!0})}destroy(){this.checkRemovePointerTrackingEventListeners(),this._eElement.removeEventListener(\"pointerdown\",this._pointerDownEventListener)}cancelDrag(){this.processDragStop(void 0)}onPointerDown(t){if(this._allowableTargets.includes(t.target)&&t.isPrimary){const e=this.getPointerCoordinates(t);this.processPointerDown(e)}}processPointerDown(t){this._nOriginalX=t.x,this._nOriginalY=t.y,this._oDocument.addEventListener(\"pointermove\",this._pointerMoveEventListener),this._oDocument.addEventListener(\"pointerup\",this._pointerUpEventListener,{passive:!0}),this._pointerTracking=!0,this._timeout=setTimeout((()=>{try{this.startDrag()}catch(t){throw console.error(t),t}}),this._nDelay)}onPointerMove(t){this._pointerTracking&&(this.processDragMove(t),t.preventDefault())}processDragMove(t){this._nX=t.pageX-this._nOriginalX,this._nY=t.pageY-this._nOriginalY,!1===this._dragging&&(Math.abs(this._nX)>this._nDistance||Math.abs(this._nY)>this._nDistance)&&this.startDrag(),this._dragging&&this.emit(\"drag\",this._nX,this._nY,t)}onPointerUp(t){this.processDragStop(t)}processDragStop(t){var e;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this.checkRemovePointerTrackingEventListeners(),!0===this._dragging&&(this._eBody.classList.remove(\"lm_dragging\"),this._eElement.classList.remove(\"lm_dragging\"),null===(e=this._oDocument.querySelector(\"iframe\"))||void 0===e||e.style.setProperty(\"pointer-events\",\"\"),this._dragging=!1,this.emit(\"dragStop\",t))}checkRemovePointerTrackingEventListeners(){this._pointerTracking&&(this._oDocument.removeEventListener(\"pointermove\",this._pointerMoveEventListener),this._oDocument.removeEventListener(\"pointerup\",this._pointerUpEventListener),this._pointerTracking=!1)}startDrag(){var t;void 0!==this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this._dragging=!0,this._eBody.classList.add(\"lm_dragging\"),this._eElement.classList.add(\"lm_dragging\"),null===(t=this._oDocument.querySelector(\"iframe\"))||void 0===t||t.style.setProperty(\"pointer-events\",\"none\"),this.emit(\"dragStart\",this._nOriginalX,this._nOriginalY)}getPointerCoordinates(t){return{x:t.pageX,y:t.pageY}}}class qt{constructor(t,e,i){this._isVertical=t,this._size=e,this._grabSize=i0){const i=this.createSplitter(Math.max(0,e-1)).element;e>0?(this.contentItems[e-1].element.insertAdjacentElement(\"afterend\",i),i.insertAdjacentElement(\"afterend\",t.element)):(this.contentItems[0].element.insertAdjacentElement(\"beforebegin\",i),i.insertAdjacentElement(\"beforebegin\",t.element))}else this._childElementContainer.appendChild(t.element);super.addChild(t,e);const n=1/this.contentItems.length*100;if(!0===i)return this.emitBaseBubblingEvent(\"stateChanged\"),e;for(let e=0;e0&&(this.calculateRelativeSizes(),this.setAbsoluteSizes()),this.emitBaseBubblingEvent(\"stateChanged\"),this.emit(\"resize\")}setAbsoluteSizes(){const t=this.calculateAbsoluteSizes();for(let e=0;e0&&t.itemSizes[e]++,this._isColumn?(Tt(this.contentItems[e].element,t.crossAxisSize),At(this.contentItems[e].element,t.itemSizes[e])):(Tt(this.contentItems[e].element,t.itemSizes[e]),At(this.contentItems[e].element,t.crossAxisSize))}calculateAbsoluteSizes(){const t=(this.contentItems.length-1)*this._splitterSize,{width:e,height:i}=kt(this.element);let n,o;this._isColumn?(n=i-t,o=e):(n=e-t,o=i);let s=0;const r=[];for(let t=0;t0){const n=100-t;for(let t=0;t100&&e.length>0){for(let t=0;te)return;{const r=i/e;let a=i;for(let e=0;ethis.onSplitterDrag(e,t,i))),e.on(\"dragStop\",(()=>this.onSplitterDragStop(e))),e.on(\"dragStart\",(()=>this.onSplitterDragStart(e))),this._splitter.splice(t,0,e),e}getSplitItems(t){const e=this._splitter.indexOf(t);return{before:this.contentItems[e],after:this.contentItems[e+1]}}calculateContentItemMinSize(t){const e=t.minSize;if(void 0!==e){if(t.minSizeUnit===ht.Pixel)return e;throw new X(\"ROCGMD98831\",JSON.stringify(t))}{const t=this.layoutManager.layoutConfig.dimensions;return this._isColumn?t.defaultMinItemHeight:t.defaultMinItemWidth}}calculateContentItemsTotalMinSize(t){let e=0;for(const i of t)e+=this.calculateContentItemMinSize(i);return e}onSplitterDragStart(t){const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=this.calculateContentItemsTotalMinSize(e.before.contentItems),s=this.calculateContentItemsTotalMinSize(e.after.contentItems);this._splitterPosition=0,this._splitterMinPosition=-1*(i-o),this._splitterMaxPosition=n-s}onSplitterDrag(t,e,i){let n=this._isColumn?i:e;if(null===this._splitterMinPosition||null===this._splitterMaxPosition)throw new K(\"ROCOSD59226\");n=Math.max(n,this._splitterMinPosition),n=Math.min(n,this._splitterMaxPosition),this._splitterPosition=n;const o=zt(n);this._isColumn?t.element.style.top=o:t.element.style.left=o}onSplitterDragStop(t){if(null===this._splitterPosition)throw new K(\"ROCOSDS66932\");{const e=this.getSplitItems(t),i=Mt(e.before.element.style[this._dimension]),n=Mt(e.after.element.style[this._dimension]),o=(this._splitterPosition+i)/(i+n),s=e.before.size+e.after.size;e.before.size=o*s,e.after.size=(1-o)*s,t.element.style.top=zt(0),t.element.style.left=zt(0),globalThis.requestAnimationFrame((()=>this.updateSize(!1)))}}}!function(t){t.getElementDimensionSize=function(t,e){return\"width\"===e?function(t){return t.offsetWidth}(t):function(t){return t.offsetHeight}(t)},t.setElementDimensionSize=function(t,e,i){return\"width\"===e?Tt(t,i):At(t,i)},t.createElement=function(t,e){const i=t.createElement(\"div\");return i.classList.add(\"lm_item\"),e?i.classList.add(\"lm_column\"):i.classList.add(\"lm_row\"),i}}(Xt||(Xt={}));class Yt extends $t{constructor(t,e,i){super(t,vt.create(e),null,Yt.createElement(document)),this.isGround=!0,this._childElementContainer=this.element,this._containerElement=i;let n=null;for(;;){const t=n?n.previousSibling:this._containerElement.lastChild;if(!(t instanceof Element&&t.classList.contains(\"lm_content\")))break;n=t}this._containerElement.insertBefore(this.element,n)}init(){if(!0!==this.isInitialised){this.updateNodeSize();for(let t=0;t0?this.contentItems[0]:this,n.isComponent)throw new Error(\"Cannot add item as child to ComponentItem\");{const t=this.layoutManager.createAndInitContentItem(i,n);return e=n.addChild(t,e),n===this?-1:e}}loadComponentAsRoot(t){this.clearRoot();const e=Ct.resolve(t,!1);if(e.maximised)throw new Error(\"Root Component cannot be maximised\");{const t=new jt(this.layoutManager,e,this);t.init(),this.addChild(t,0)}}addChild(t,e){if(this.contentItems.length>0)throw new Error(\"Ground node can only have a single child\");return this._childElementContainer.appendChild(t.element),e=super.addChild(t,e),this.updateSize(!1),this.emitBaseBubblingEvent(\"stateChanged\"),e}calculateConfigContent(){const t=this.contentItems,e=t.length,i=new Array(e);for(let n=0;n0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e)),this.updateContentItemsSize(!1))}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}createSideAreas(){const t=Yt.Area.oppositeSides,e=new Array(Object.keys(t).length);let i=0;for(const n in t){const o=n,s=this.getElementArea();if(null===s)throw new K(\"RCSA77553\");s.side=o,\"2\"===t[o][1]?s[o]=s[t[o]]-50:s[o]=s[t[o]]+50,s.surface=(s.x2-s.x1)*(s.y2-s.y1),e[i++]=s}return e}highlightDropZone(t,e,i){this.layoutManager.tabDropPlaceholder.remove(),super.highlightDropZone(t,e,i)}onDrop(t,e){if(t.isComponent){const e=ut.createDefault(),i=t;e.header=mt.Header.createCopy(i.headerConfig);const n=this.layoutManager.createAndInitContentItem(e,this);n.addChild(t),t=n}if(0===this.contentItems.length)this.addChild(t);else{if(t.type===at.row||t.type===at.column){const e=ut.createDefault(),i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}const i=\"x\"==e.side[0]?at.row:at.column,n=\"2\"==e.side[1],o=this.contentItems[0];if(o instanceof Xt&&o.type===i){const e=o.contentItems[n?0:o.contentItems.length-1];o.addChild(t,n?0:void 0,!0),e.size*=.5,t.size=e.size,t.sizeUnit=ht.Percent,o.updateSize(!1)}else{const e=ct.createDefault(i),s=this.layoutManager.createContentItem(e,this);this.replaceChild(o,s),s.addChild(t,n?0:void 0,!0),s.addChild(o,n?void 0:0,!0),o.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}}dock(){throw new X(\"GID87731\")}validateDocking(){throw new X(\"GIVD87732\")}getAllContentItems(){const t=[this];return this.deepGetAllContentItems(this.contentItems,t),t}getConfigMaximisedItems(){const t=[];return this.deepFilterContentItems(this.contentItems,t,(t=>!(!Gt.isStack(t)||!t.initialWantMaximise)||!(!Gt.isComponentItem(t)||!t.initialWantMaximise))),t}getItemsByPopInParentId(t){const e=[];return this.deepFilterContentItems(this.contentItems,e,(e=>e.popInParentIds.includes(t))),e}toConfig(){throw new Error(\"Cannot generate GroundItem config\")}setActiveComponentItem(t,e,i){}updateNodeSize(){const{width:t,height:e}=kt(this._containerElement);Tt(this.element,t),At(this.element,e),this.contentItems.length>0&&(Tt(this.contentItems[0].element,t),At(this.contentItems[0].element,e))}deepGetAllContentItems(t,e){for(let i=0;ithis.onClick(t),this._touchStartEventListener=t=>this.onTouchStart(t),this._element=document.createElement(\"div\"),this._element.classList.add(i),this._element.title=e,this._header.on(\"destroy\",(()=>this.destroy())),this._element.addEventListener(\"click\",this._clickEventListener,{passive:!0}),this._element.addEventListener(\"touchstart\",this._touchStartEventListener,{passive:!0}),this._header.controlsContainerElement.appendChild(this._element)}get element(){return this._element}destroy(){var t;this._element.removeEventListener(\"click\",this._clickEventListener),this._element.removeEventListener(\"touchstart\",this._touchStartEventListener),null===(t=this._element.parentNode)||void 0===t||t.removeChild(this._element)}onClick(t){this._pushEvent(t)}onTouchStart(t){this._pushEvent(t)}}class Jt{constructor(t,e,i,n,o){var s;this._layoutManager=t,this._componentItem=e,this._closeEvent=i,this._focusEvent=n,this._dragStartEvent=o,this._isActive=!1,this._tabClickListener=t=>this.onTabClickDown(t),this._tabTouchStartListener=t=>this.onTabTouchStart(t),this._closeClickListener=()=>this.onCloseClick(),this._closeTouchStartListener=()=>this.onCloseTouchStart(),this._dragStartListener=(t,e)=>this.onDragStart(t,e),this._contentItemDestroyListener=()=>this.onContentItemDestroy(),this._tabTitleChangedListener=t=>this.setTitle(t),this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_tab\"),this._titleElement=document.createElement(\"span\"),this._titleElement.classList.add(\"lm_title\"),this._closeElement=document.createElement(\"div\"),this._closeElement.classList.add(\"lm_close_tab\"),this._element.appendChild(this._titleElement),this._element.appendChild(this._closeElement),e.isClosable?this._closeElement.style.display=\"\":this._closeElement.style.display=\"none\",this.setTitle(e.title),this._componentItem.on(\"titleChanged\",this._tabTitleChangedListener);(null!==(s=e.reorderEnabled)&&void 0!==s?s:this._layoutManager.layoutConfig.settings.reorderEnabled)&&this.enableReorder(),this._element.addEventListener(\"click\",this._tabClickListener,{passive:!0}),this._element.addEventListener(\"touchstart\",this._tabTouchStartListener,{passive:!0}),this._componentItem.isClosable?(this._closeElement.addEventListener(\"click\",this._closeClickListener,{passive:!0}),this._closeElement.addEventListener(\"touchstart\",this._closeTouchStartListener,{passive:!0})):(this._closeElement.remove(),this._closeElement=void 0),this._componentItem.setTab(this),this._layoutManager.emit(\"tabCreated\",this)}get isActive(){return this._isActive}get componentItem(){return this._componentItem}get contentItem(){return this._componentItem}get element(){return this._element}get titleElement(){return this._titleElement}get closeElement(){return this._closeElement}get reorderEnabled(){return void 0!==this._dragListener}set reorderEnabled(t){t!==this.reorderEnabled&&(t?this.enableReorder():this.disableReorder())}setTitle(t){this._titleElement.innerText=t,this._element.title=t}setActive(t){t!==this._isActive&&(this._isActive=t,t?this._element.classList.add(\"lm_active\"):this._element.classList.remove(\"lm_active\"))}destroy(){var t,e;this._closeEvent=void 0,this._focusEvent=void 0,this._dragStartEvent=void 0,this._element.removeEventListener(\"click\",this._tabClickListener),this._element.removeEventListener(\"touchstart\",this._tabTouchStartListener),null===(t=this._closeElement)||void 0===t||t.removeEventListener(\"click\",this._closeClickListener),null===(e=this._closeElement)||void 0===e||e.removeEventListener(\"touchstart\",this._closeTouchStartListener),this._componentItem.off(\"titleChanged\",this._tabTitleChangedListener),this.reorderEnabled&&this.disableReorder(),this._element.remove()}setBlurred(){this._element.classList.remove(\"lm_focused\"),this._titleElement.classList.remove(\"lm_focused\")}setFocused(){this._element.classList.add(\"lm_focused\"),this._titleElement.classList.add(\"lm_focused\")}onDragStart(t,e){if(void 0===this._dragListener)throw new J(\"TODSDLU10093\");if(void 0===this._dragStartEvent)throw new J(\"TODS23309\");this._dragStartEvent(t,e,this._dragListener,this.componentItem)}onContentItemDestroy(){void 0!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=void 0)}onTabClickDown(t){const e=t.target;e!==this._element&&e!==this._titleElement||(0===t.button?this.notifyFocus():1===t.button&&this._componentItem.isClosable&&this.notifyClose())}onTabTouchStart(t){t.target===this._element&&this.notifyFocus()}onCloseClick(){this.notifyClose()}onCloseTouchStart(){this.notifyClose()}notifyClose(){if(void 0===this._closeEvent)throw new J(\"TNC15007\");this._closeEvent(this._componentItem)}notifyFocus(){if(void 0===this._focusEvent)throw new J(\"TNA15007\");this._focusEvent(this._componentItem)}enableReorder(){this._dragListener=new Zt(this._element,[this._titleElement]),this._dragListener.on(\"dragStart\",this._dragStartListener),this._componentItem.on(\"destroy\",this._contentItemDestroyListener)}disableReorder(){if(void 0===this._dragListener)throw new J(\"TDR87745\");this._componentItem.off(\"destroy\",this._contentItemDestroyListener),this._dragListener.off(\"dragStart\",this._dragStartListener),this._dragListener=void 0}}class Qt{constructor(t,e,i,n,o){this._layoutManager=t,this._componentRemoveEvent=e,this._componentFocusEvent=i,this._componentDragStartEvent=n,this._dropdownActiveChangedEvent=o,this._tabs=[],this._lastVisibleTabIndex=-1,this._dropdownActive=!1,this._element=document.createElement(\"section\"),this._element.classList.add(\"lm_tabs\"),this._dropdownElement=document.createElement(\"section\"),this._dropdownElement.classList.add(\"lm_tabdropdown_list\"),this._dropdownElement.style.display=\"none\"}get tabs(){return this._tabs}get tabCount(){return this._tabs.length}get lastVisibleTabIndex(){return this._lastVisibleTabIndex}get element(){return this._element}get dropdownElement(){return this._dropdownElement}get dropdownActive(){return this._dropdownActive}destroy(){for(let t=0;tthis.handleTabCloseEvent(t)),(t=>this.handleTabFocusEvent(t)),((t,e,i,n)=>this.handleTabDragStartEvent(t,e,i,n)));void 0===e&&(e=this._tabs.length),this._tabs.splice(e,0,i),ethis._lastVisibleTabIndex){const t=this._tabs[e];for(let t=e;t>0;t--)this._tabs[t]=this._tabs[t-1];this._tabs[0]=t}}updateTabSizes(t,e){let i=!1;this.tryUpdateTabSizes(i,t,e)||(i=!0,this.tryUpdateTabSizes(i,t,e)),i!==this._dropdownActive&&(this._dropdownActive=i,this._dropdownActiveChangedEvent())}tryUpdateTabSizes(t,e,i){if(this._tabs.length>0){if(void 0===i)throw new Error(\"non-empty tabs must have active component item\");let n=0,o=!1;const s=this._layoutManager.layoutConfig.settings.tabOverlapAllowance,r=this._tabs.indexOf(i.tab),a=this._tabs[r];this._lastVisibleTabIndex=-1;for(let i=0;ie){if(o)i===r&&(l.style.zIndex=\"auto\",l.style.marginLeft=\"\",l.parentElement!==this._element&&this._element.appendChild(l));else{let t;if(t=r>0&&r<=i?(d-e)/(i-1):(d-e)/i,tthis.onClick(t),this._touchStartListener=t=>this.onTouchStart(t),this._rowColumnClosable=!0,this._closeButton=null,this._popoutButton=null,this._tabsContainer=new Qt(this._layoutManager,(t=>this.handleTabInitiatedComponentRemoveEvent(t)),(t=>this.handleTabInitiatedComponentFocusEvent(t)),((t,e,i,n)=>this.handleTabInitiatedDragStartEvent(t,e,i,n)),(()=>this.processTabDropdownActiveChanged())),this._show=i.show,this._popoutEnabled=i.popoutEnabled,this._popoutLabel=i.popoutLabel,this._maximiseEnabled=i.maximiseEnabled,this._maximiseLabel=i.maximiseLabel,this._minimiseEnabled=i.minimiseEnabled,this._minimiseLabel=i.minimiseLabel,this._closeEnabled=i.closeEnabled,this._closeLabel=i.closeLabel,this._tabDropdownEnabled=i.tabDropdownEnabled,this._tabDropdownLabel=i.tabDropdownLabel,this.setSide(i.side),this._canRemoveComponent=this._configClosable,this._element=document.createElement(\"section\"),this._element.classList.add(\"lm_header\"),this._controlsContainerElement=document.createElement(\"section\"),this._controlsContainerElement.classList.add(\"lm_controls\"),this._element.appendChild(this._tabsContainer.element),this._element.appendChild(this._controlsContainerElement),this._element.appendChild(this._tabsContainer.dropdownElement),this._element.addEventListener(\"click\",this._clickListener,{passive:!0}),this._element.addEventListener(\"touchstart\",this._touchStartListener,{passive:!0}),this._documentMouseUpListener=()=>this._tabsContainer.hideAdditionalTabsDropdown(),globalThis.document.addEventListener(\"mouseup\",this._documentMouseUpListener,{passive:!0}),this._tabControlOffset=this._layoutManager.layoutConfig.settings.tabControlOffset,this._tabDropdownEnabled&&(this._tabDropdownButton=new Kt(this,this._tabDropdownLabel,\"lm_tabdropdown\",(()=>this._tabsContainer.showAdditionalTabsDropdown()))),this._popoutEnabled&&(this._popoutButton=new Kt(this,this._popoutLabel,\"lm_popout\",(()=>this.handleButtonPopoutEvent()))),this._maximiseEnabled&&(this._maximiseButton=new Kt(this,this._maximiseLabel,\"lm_maximise\",(t=>this.handleButtonMaximiseToggleEvent(t)))),this._configClosable&&(this._closeButton=new Kt(this,this._closeLabel,\"lm_close\",(()=>s()))),this.processTabDropdownActiveChanged()}get show(){return this._show}get side(){return this._side}get leftRightSided(){return this._leftRightSided}get layoutManager(){return this._layoutManager}get parent(){return this._parent}get tabs(){return this._tabsContainer.tabs}get lastVisibleTabIndex(){return this._tabsContainer.lastVisibleTabIndex}get element(){return this._element}get tabsContainerElement(){return this._tabsContainer.element}get controlsContainerElement(){return this._controlsContainerElement}destroy(){this.emit(\"destroy\"),this._popoutEvent=void 0,this._maximiseToggleEvent=void 0,this._clickEvent=void 0,this._touchStartEvent=void 0,this._componentRemoveEvent=void 0,this._componentFocusEvent=void 0,this._componentDragStartEvent=void 0,this._tabsContainer.destroy(),globalThis.document.removeEventListener(\"mouseup\",this._documentMouseUpListener),this._element.remove()}createTab(t,e){this._tabsContainer.createTab(t,e)}removeTab(t){this._tabsContainer.removeTab(t)}processActiveComponentChanged(t){this._tabsContainer.processActiveComponentChanged(t),this.updateTabSizes()}setSide(t){this._side=t,this._leftRightSided=[nt.right,nt.left].includes(this._side)}setRowColumnClosable(t){this._rowColumnClosable=t,this.updateClosability()}updateClosability(){let t;if(this._configClosable)if(this._rowColumnClosable){t=!0;const e=this.tabs.length;for(let i=0;i1}applyFocusedValue(t){t?this._element.classList.add(\"lm_focused\"):this._element.classList.remove(\"lm_focused\")}processMaximised(){if(void 0===this._maximiseButton)throw new J(\"HPMAX16997\");this._maximiseButton.element.setAttribute(\"title\",this._minimiseLabel)}processMinimised(){if(void 0===this._maximiseButton)throw new J(\"HPMIN16997\");this._maximiseButton.element.setAttribute(\"title\",this._maximiseLabel)}updateTabSizes(){if(this._tabsContainer.tabCount>0){const t=this._show?this._layoutManager.layoutConfig.dimensions.headerHeight:0;let e;this._leftRightSided?(this._element.style.height=\"\",this._element.style.width=zt(t)):(this._element.style.width=\"\",this._element.style.height=zt(t)),e=this._leftRightSided?this._element.offsetHeight-this._controlsContainerElement.offsetHeight-this._tabControlOffset:this._element.offsetWidth-this._controlsContainerElement.offsetWidth-this._tabControlOffset,this._tabsContainer.updateTabSizes(e,this._getActiveComponentItemEvent())}}handleTabInitiatedComponentRemoveEvent(t){if(this._canRemoveComponent){if(void 0===this._componentRemoveEvent)throw new J(\"HHTCE22294\");this._componentRemoveEvent(t)}}handleTabInitiatedComponentFocusEvent(t){if(void 0===this._componentFocusEvent)throw new J(\"HHTAE22294\");this._componentFocusEvent(t)}handleTabInitiatedDragStartEvent(t,e,i,n){if(this._canRemoveComponent){if(void 0===this._componentDragStartEvent)throw new J(\"HHTDSE22294\");this._componentDragStartEvent(t,e,i,n)}else i.cancelDrag()}processTabDropdownActiveChanged(){void 0!==this._tabDropdownButton&&Dt(this._tabDropdownButton.element,this._tabsContainer.dropdownActive)}handleButtonPopoutEvent(){if(this._layoutManager.layoutConfig.settings.popoutWholeStack){if(void 0===this._popoutEvent)throw new J(\"HHBPOE17834\");this._popoutEvent()}else{const t=this._getActiveComponentItemEvent();t&&t.popout()}}handleButtonMaximiseToggleEvent(t){if(void 0===this._maximiseToggleEvent)throw new J(\"HHBMTE16834\");this._maximiseToggleEvent()}onClick(t){t.target===this._element&&this.notifyClick(t)}onTouchStart(t){t.target===this._element&&this.notifyTouchStart(t)}notifyClick(t){if(void 0===this._clickEvent)throw new J(\"HNHC46834\");this._clickEvent(t)}notifyTouchStart(t){if(void 0===this._touchStartEvent)throw new J(\"HNHTS46834\");this._touchStartEvent(t)}}class ee extends $t{constructor(t,e,i){var n,o,s,r,a,l,h,d,c,m,u,p,g,f,v,_,y,C,w;super(t,e,i,ee.createElement(document)),this._headerSideChanged=!1,this._resizeListener=()=>this.handleResize(),this._maximisedListener=()=>this.handleMaximised(),this._minimisedListener=()=>this.handleMinimised(),this._headerConfig=e.header;const I=t.layoutConfig.header,b=e.content;let S;if(1!==b.length)S=void 0;else{S=b[0].header}this._initialWantMaximise=e.maximised,this._initialActiveItemIndex=null!==(n=e.activeItemIndex)&&void 0!==n?n:0;const E=null!==(r=null!==(s=null===(o=this._headerConfig)||void 0===o?void 0:o.show)&&void 0!==s?s:null==S?void 0:S.show)&&void 0!==r?r:I.show,x=null!==(h=null!==(l=null===(a=this._headerConfig)||void 0===a?void 0:a.popout)&&void 0!==l?l:null==S?void 0:S.popout)&&void 0!==h?h:I.popout,L=null!==(m=null!==(c=null===(d=this._headerConfig)||void 0===d?void 0:d.maximise)&&void 0!==c?c:null==S?void 0:S.maximise)&&void 0!==m?m:I.maximise,z=null!==(g=null!==(p=null===(u=this._headerConfig)||void 0===u?void 0:u.close)&&void 0!==p?p:null==S?void 0:S.close)&&void 0!==g?g:I.close,M=null!==(_=null!==(v=null===(f=this._headerConfig)||void 0===f?void 0:f.minimise)&&void 0!==v?v:null==S?void 0:S.minimise)&&void 0!==_?_:I.minimise,P=null!==(w=null!==(C=null===(y=this._headerConfig)||void 0===y?void 0:y.tabDropdown)&&void 0!==C?C:null==S?void 0:S.tabDropdown)&&void 0!==w?w:I.tabDropdown;this._maximisedEnabled=!1!==L;const T={show:!1!==E,side:!1===E?nt.top:E,popoutEnabled:!1!==x,popoutLabel:!1===x?\"\":x,maximiseEnabled:this._maximisedEnabled,maximiseLabel:!1===L?\"\":L,closeEnabled:!1!==z,closeLabel:!1===z?\"\":z,minimiseEnabled:!0,minimiseLabel:M,tabDropdownEnabled:!1!==P,tabDropdownLabel:!1===P?\"\":P};this._header=new te(t,this,T,e.isClosable&&!1!==z,(()=>this.getActiveComponentItem()),(()=>this.remove()),(()=>this.handlePopoutEvent()),(()=>this.toggleMaximise()),(t=>this.handleHeaderClickEvent(t)),(t=>this.handleHeaderTouchStartEvent(t)),(t=>this.handleHeaderComponentRemoveEvent(t)),(t=>this.handleHeaderComponentFocusEvent(t)),((t,e,i,n)=>this.handleHeaderComponentStartDragEvent(t,e,i,n))),this.isStack=!0,this._childElementContainer=document.createElement(\"section\"),this._childElementContainer.classList.add(\"lm_items\"),this.on(\"resize\",this._resizeListener),this._maximisedEnabled&&(this.on(\"maximised\",this._maximisedListener),this.on(\"minimised\",this._minimisedListener)),this.element.appendChild(this._header.element),this.element.appendChild(this._childElementContainer),this.setupHeaderPosition(),this._header.updateClosability()}get childElementContainer(){return this._childElementContainer}get header(){return this._header}get headerShow(){return this._header.show}get headerSide(){return this._header.side}get headerLeftRightSided(){return this._header.leftRightSided}get contentAreaDimensions(){return this._contentAreaDimensions}get initialWantMaximise(){return this._initialWantMaximise}get isMaximised(){return this===this.layoutManager.maximisedStack}get stackParent(){if(!this.parent)throw new Error(\"Stack should always have a parent\");return this.parent}updateSize(t){this.layoutManager.beginVirtualSizedContainerAdding();try{this.updateNodeSize(),this.updateContentItemsSize(t)}finally{this.layoutManager.endVirtualSizedContainerAdding()}}init(){if(!0===this.isInitialised)return;this.updateNodeSize();for(let t=0;t0){if(this._initialActiveItemIndex<0||this._initialActiveItemIndex>=e)throw new Error(`ActiveItemIndex out of range: ${this._initialActiveItemIndex} id: ${this.id}`);for(let i=0;ithis.contentItems.length)throw e-=1,new X(\"SAC99728\");if(t instanceof jt)return e=super.addChild(t,e),this._childElementContainer.appendChild(t.element),this._header.createTab(t,e),this.setActiveComponentItem(t,i),this._header.updateTabSizes(),this.updateSize(!1),t.container.setBaseLogicalZIndex(),this._header.updateClosability(),this.emitStateChangedEvent(),e;throw new X(\"SACC88532\")}removeChild(t,e){const i=t,n=this.contentItems.indexOf(i),o=1===this.contentItems.length;if(this._activeComponentItem===i&&(i.focused&&i.blur(),!o)){const t=0===n?1:n-1;this.setActiveComponentItem(this.contentItems[t],!1)}this._header.removeTab(i),super.removeChild(i,e),o||this._header.updateClosability(),this.emitStateChangedEvent()}toggleMaximise(){this.isMaximised?this.minimise():this.maximise()}maximise(){if(!this.isMaximised){this.layoutManager.setMaximisedStack(this);const t=this.contentItems,e=t.length;for(let i=0;i0&&void 0===t)throw new Error(\"expected non-empty stack to have an active component item\");return{type:\"stack\",content:this.calculateConfigContent(),size:this.size,sizeUnit:this.sizeUnit,minSize:this.minSize,minSizeUnit:this.minSizeUnit,id:this.id,isClosable:this.isClosable,maximised:this.isMaximised,header:this.createHeaderConfig(),activeItemIndex:t}}onDrop(t,e){if(\"header\"===this._dropSegment){if(this.resetHeaderDropZone(),void 0===this._dropIndex)throw new J(\"SODDI68990\");return void this.addChild(t,this._dropIndex)}if(\"body\"===this._dropSegment)return void this.addChild(t,0,!0);const i=\"top\"===this._dropSegment||\"bottom\"===this._dropSegment,n=\"left\"===this._dropSegment||\"right\"===this._dropSegment,o=\"top\"===this._dropSegment||\"left\"===this._dropSegment,s=i&&this.stackParent.isColumn||n&&this.stackParent.isRow;if(t.isComponent){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createAndInitContentItem(e,this);i.addChild(t),t=i}if(t.type===at.row||t.type===at.column){const e=ut.createDefault();e.header=this.createHeaderConfig();const i=this.layoutManager.createContentItem(e,this);i.addChild(t),t=i}if(s){const e=this.stackParent.contentItems.indexOf(this);this.stackParent.addChild(t,o?e:e+1,!0),this.size*=.5,t.size=this.size,t.sizeUnit=this.sizeUnit,this.stackParent.updateSize(!1)}else{const e=i?at.column:at.row,n=ct.createDefault(e),s=this.layoutManager.createContentItem(n,this);this.stackParent.replaceChild(this,s),s.addChild(t,o?0:void 0,!0),s.addChild(this,o?void 0:0,!0),this.size=50,t.size=50,t.sizeUnit=ht.Percent,s.updateSize(!1)}}highlightDropZone(t,e){for(const i in this._contentAreaDimensions){const n=i,o=this._contentAreaDimensions[n].hoverArea;if(o.x1t&&o.y1e)return void(\"header\"===n?(this._dropSegment=\"header\",this.highlightHeaderDropZone(this._header.leftRightSided?e:t)):(this.resetHeaderDropZone(),this.highlightBodyDropZone(n)))}}getArea(){if(\"none\"===this.element.style.display)return null;const t=super.getElementArea(this._header.element),e=super.getElementArea(this._childElementContainer);if(null===t||null===e)throw new K(\"SGAHC13086\");const i=e.x2-e.x1,n=e.y2-e.y1;return this._contentAreaDimensions={header:{hoverArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2},highlightArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2}}},0===this.contentItems.length?(this._contentAreaDimensions.body={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2}},super.getElementArea(this.element)):(this._contentAreaDimensions.left={hoverArea:{x1:e.x1,y1:e.y1,x2:e.x1+.25*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x1+.5*i,y2:e.y2}},this._contentAreaDimensions.top={hoverArea:{x1:e.x1+.25*i,y1:e.y1,x2:e.x1+.75*i,y2:e.y1+.5*n},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y1+.5*n}},this._contentAreaDimensions.right={hoverArea:{x1:e.x1+.75*i,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1+.5*i,y1:e.y1,x2:e.x2,y2:e.y2}},this._contentAreaDimensions.bottom={hoverArea:{x1:e.x1+.25*i,y1:e.y1+.5*n,x2:e.x1+.75*i,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1+.5*n,x2:e.x2,y2:e.y2}},super.getElementArea(this.element))}positionHeader(t){this._header.side!==t&&(this._header.setSide(t),this._headerSideChanged=!0,this.setupHeaderPosition())}updateNodeSize(){if(\"none\"!==this.element.style.display){const t=kt(this.element);if(this._header.show){t[this._header.leftRightSided?it.width:it.height]-=this.layoutManager.layoutConfig.dimensions.headerHeight}this._childElementContainer.style.width=zt(t.width),this._childElementContainer.style.height=zt(t.height);for(let e=0;e=o&&tthis.onDrag(t,e,i))),this._dragListener.on(\"dragStop\",(()=>this.onDrop())),this.createDragProxyElements(t,e),null===this._componentItem.parent)throw new K(\"DPC10097\");this._componentItemFocused=this._componentItem.focused,this._componentItemFocused&&this._componentItem.blur(),this._componentItem.parent.removeChild(this._componentItem,!0),this.setDimensions(),document.body.appendChild(this._element),this.determineMinMaxXY(),this._layoutManager.calculateItemAreas(),this.setDropPosition(t,e)}get element(){return this._element}createDragProxyElements(t,e){this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_dragProxy\");const i=document.createElement(\"div\");i.classList.add(\"lm_header\");const n=document.createElement(\"div\");n.classList.add(\"lm_tabs\");const o=document.createElement(\"div\");o.classList.add(\"lm_tab\");const s=document.createElement(\"span\");s.classList.add(\"lm_title\"),o.appendChild(s),n.appendChild(o),i.appendChild(n),this._proxyContainerElement=document.createElement(\"div\"),this._proxyContainerElement.classList.add(\"lm_content\"),this._element.appendChild(i),this._element.appendChild(this._proxyContainerElement),this._originalParent instanceof ee&&this._originalParent.headerShow&&(this._sided=this._originalParent.headerLeftRightSided,this._element.classList.add(\"lm_\"+this._originalParent.headerSide),[nt.right,nt.bottom].indexOf(this._originalParent.headerSide)>=0&&this._proxyContainerElement.insertAdjacentElement(\"afterend\",i)),this._element.style.left=zt(t),this._element.style.top=zt(e),o.setAttribute(\"title\",this._componentItem.title),s.insertAdjacentText(\"afterbegin\",this._componentItem.title),this._proxyContainerElement.appendChild(this._componentItem.element)}determineMinMaxXY(){const t=this._layoutManager.groundItem;if(void 0===t)throw new J(\"DPDMMXY73109\");{const e=t.element.getBoundingClientRect();this._minX=e.left+document.body.scrollLeft,this._minY=e.top+document.body.scrollTop,this._maxX=this._minX+e.width,this._maxY=this._minY+e.height}}onDrag(t,e,i){const n=i.pageX,o=i.pageY;this.setDropPosition(n,o),this._componentItem.drag()}setDropPosition(t,e){this._layoutManager.layoutConfig.settings.constrainDragToContainer&&(t<=this._minX?t=Math.ceil(this._minX):t>=this._maxX&&(t=Math.floor(this._maxX)),e<=this._minY?e=Math.ceil(this._minY):e>=this._maxY&&(e=Math.floor(this._maxY))),this._element.style.left=zt(t),this._element.style.top=zt(e),this._area=this._layoutManager.getArea(t,e),null!==this._area&&(this._lastValidArea=this._area,this._area.contentItem.highlightDropZone(t,e,this._area))}onDrop(){const t=this._layoutManager.dropTargetIndicator;if(null===t)throw new K(\"DPOD30011\");let e;if(t.hide(),this._componentItem.exitDragMode(),null!==this._area)e=this._componentItem,this._area.contentItem.onDrop(e,this._area);else if(null!==this._lastValidArea){e=this._componentItem;this._lastValidArea.contentItem.onDrop(e,this._lastValidArea)}else this._originalParent?(e=this._componentItem,this._originalParent.addChild(e)):this._componentItem.destroy();this._element.remove(),this._layoutManager.emit(\"itemDropped\",this._componentItem),this._componentItemFocused&&void 0!==e&&e.focus()}setDimensions(){const t=this._layoutManager.layoutConfig.dimensions;if(void 0===t)throw new Error(\"DragProxy.setDimensions: dimensions undefined\");let e=t.dragProxyWidth,i=t.dragProxyHeight;if(void 0===e||void 0===i)throw new Error(\"DragProxy.setDimensions: width and/or height undefined\");const n=!1===this._layoutManager.layoutConfig.header.show?0:t.headerHeight;this._element.style.width=zt(e),this._element.style.height=zt(i),e-=this._sided?n:0,i-=this._sided?0:n,this._proxyContainerElement.style.width=zt(e),this._proxyContainerElement.style.height=zt(i),this._componentItem.enterDragMode(e,i),this._componentItem.show()}}class ne{constructor(t,e,i,n,o,s,r){this._layoutManager=t,this._element=e,this._extraAllowableChildTargets=i,this._componentTypeOrFtn=n,this._componentState=o,this._title=s,this._id=r,this._dragListener=null,this._dummyGroundContainer=document.createElement(\"div\");const a=gt.createDefault(\"row\");this._dummyGroundContentItem=new Yt(this._layoutManager,a,this._dummyGroundContainer),this.createDragListener()}destroy(){this.removeDragListener()}createDragListener(){this.removeDragListener(),this._dragListener=new Zt(this._element,this._extraAllowableChildTargets),this._dragListener.on(\"dragStart\",((t,e)=>this.onDragStart(t,e))),this._dragListener.on(\"dragStop\",(()=>this.onDragStop()))}onDragStart(t,e){var i;const n=\"component\";let o;if(\"function\"==typeof this._componentTypeOrFtn){const t=this._componentTypeOrFtn();o=ne.isDragSourceComponentItemConfig(t)?{type:n,componentState:t.state,componentType:t.type,title:null!==(i=t.title)&&void 0!==i?i:this._title}:t}else o={type:n,componentState:this._componentState,componentType:this._componentTypeOrFtn,title:this._title,id:this._id};const s=bt.resolve(o,!1),r=new jt(this._layoutManager,s,this._dummyGroundContentItem);if(this._dummyGroundContentItem.contentItems.push(r),null===this._dragListener)throw new K(\"DSODSD66746\");{const i=new ie(t,e,this._dragListener,this._layoutManager,r,this._dummyGroundContentItem),n=this._layoutManager.transitionIndicator;if(null===n)throw new K(\"DSODST66746\");n.transitionElements(this._element,i.element)}}onDragStop(){this.createDragListener()}removeDragListener(){null!==this._dragListener&&(this._dragListener.destroy(),this._dragListener=null)}}!function(t){t.isDragSourceComponentItemConfig=function(t){return!(\"componentType\"in t)}}(ne||(ne={}));class oe{constructor(){this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_dropTargetIndicator\");const t=document.createElement(\"div\");t.classList.add(\"lm_inner\"),this._element.appendChild(t),document.body.appendChild(this._element)}destroy(){this._element.remove()}highlightArea(t,e){this._element.style.left=zt(t.x1+e),this._element.style.top=zt(t.y1+e),this._element.style.width=zt(t.x2-t.x1-e),this._element.style.height=zt(t.y2-t.y1-e),this._element.style.display=\"block\"}hide(){Dt(this._element,!1)}}class se{constructor(){this._element=document.createElement(\"div\"),this._element.classList.add(\"lm_transition_indicator\"),document.body.appendChild(this._element),this._toElement=null,this._fromDimensions=null,this._totalAnimationDuration=200,this._animationStartTime=null}destroy(){this._element.remove()}transitionElements(t,e){}nextAnimationFrame(){}measure(t){const e=t.getBoundingClientRect();return{left:e.left,top:e.top,width:t.offsetWidth,height:t.offsetHeight}}}class re extends Wt{constructor(t){super(),this._layoutManager=t,this._childEventListener=t=>this.onEventFromChild(t),globalThis.addEventListener(re.ChildEventName,this._childEventListener,{passive:!0})}emit(t,...e){\"userBroadcast\"===t?this.emitUserBroadcast(...e):super.emit(t,...e)}emitUserBroadcast(...t){this.handleUserBroadcastEvent(\"userBroadcast\",t)}destroy(){globalThis.removeEventListener(re.ChildEventName,this._childEventListener)}handleUserBroadcastEvent(t,e){this._layoutManager.isSubWindow?this.propagateToParent(t,e):this.propagateToThisAndSubtree(t,e)}onEventFromChild(t){const e=t.detail;this.handleUserBroadcastEvent(e.eventName,e.args)}propagateToParent(t,e){const i={bubbles:!0,cancelable:!0,detail:{layoutManager:this._layoutManager,eventName:t,args:e}},n=new CustomEvent(re.ChildEventName,i),o=globalThis.opener;if(null===o)throw new K(\"EHPTP15778\");o.dispatchEvent(n)}propagateToThisAndSubtree(t,e){this.emitUnknown(t,...e);for(let i=0;ithis.handleContainerResize())),this._windowBeforeUnloadListener=()=>this.onBeforeUnload(),this._windowBeforeUnloadListening=!1,this._maximisedStackBeforeDestroyedListener=t=>this.cleanupBeforeMaximisedStackDestroyed(t),this.isSubWindow=t.isSubWindow,this._constructorOrSubWindowLayoutConfig=t.constructorOrSubWindowLayoutConfig,Q.checkInitialise(),dt.checkInitialise(),void 0!==t.containerElement&&(this._containerElement=t.containerElement)}get container(){return this._containerElement}get isInitialised(){return this._isInitialised}get groundItem(){return this._groundItem}get root(){return this._groundItem}get openPopouts(){return this._openPopouts}get dropTargetIndicator(){return this._dropTargetIndicator}get transitionIndicator(){return this._transitionIndicator}get width(){return this._width}get height(){return this._height}get eventHub(){return this._eventHub}get rootItem(){if(void 0===this._groundItem)throw new Error(\"Cannot access rootItem before init\");return 0===this._groundItem.contentItems.length?void 0:this._groundItem.contentItems[0]}get focusedComponentItem(){return this._focusedComponentItem}get tabDropPlaceholder(){return this._tabDropPlaceholder}get maximisedStack(){return this._maximisedStack}get deprecatedConstructor(){return!this.isSubWindow&&void 0!==this._constructorOrSubWindowLayoutConfig}destroy(){if(this._isInitialised){this._windowBeforeUnloadListening&&(globalThis.removeEventListener(\"beforeunload\",this._windowBeforeUnloadListener),this._windowBeforeUnloadListening=!1),!0===this.layoutConfig.settings.closePopoutsOnUnload&&this.closeAllOpenPopouts(),this._resizeObserver.disconnect(),this.checkClearResizeTimeout(),void 0!==this._groundItem&&this._groundItem.destroy(),this._tabDropPlaceholder.remove(),null!==this._dropTargetIndicator&&this._dropTargetIndicator.destroy(),null!==this._transitionIndicator&&this._transitionIndicator.destroy(),this._eventHub.destroy();for(const t of this._dragSources)t.destroy();this._dragSources=[],this._isInitialised=!1}}minifyConfig(t){return _t.minifyConfig(t)}unminifyConfig(t){return _t.unminifyConfig(t)}init(){let t;if(this.setContainer(),this._dropTargetIndicator=new oe,this._transitionIndicator=new se,this.updateSizeFromContainer(),this.isSubWindow){if(void 0===this._constructorOrSubWindowLayoutConfig)throw new J(\"LMIU07155\");{const e=this._constructorOrSubWindowLayoutConfig.root;if(void 0===e)throw new X(\"LMIC07156\");if(!Ct.isComponent(e))throw new X(\"LMIC07157\");t=e;const i=xt.resolve(this._constructorOrSubWindowLayoutConfig);this.layoutConfig=Object.assign(Object.assign({},i),{root:void 0})}}else void 0===this._constructorOrSubWindowLayoutConfig?this.layoutConfig=_t.createDefault():this.layoutConfig=xt.resolve(this._constructorOrSubWindowLayoutConfig);const e=this.layoutConfig;this._groundItem=new Yt(this,e.root,this._containerElement),this._groundItem.init(),this.checkLoadedLayoutMaximiseItem(),this._resizeObserver.observe(this._containerElement),this._isInitialised=!0,this.adjustColumnsResponsive(),this.emit(\"initialised\"),void 0!==t&&this.loadComponentAsRoot(t)}loadLayout(t){if(!this.isInitialised)throw new Error(\"GoldenLayout: Need to call init() if LayoutConfig with defined root passed to constructor\");if(void 0===this._groundItem)throw new J(\"LMLL11119\");this.createSubWindows(),this.layoutConfig=xt.resolve(t),this._groundItem.loadRoot(this.layoutConfig.root),this.checkLoadedLayoutMaximiseItem(),this.adjustColumnsResponsive()}saveLayout(){if(!1===this._isInitialised)throw new Error(\"Can't create config, layout not yet initialised\");if(void 0===this._groundItem)throw new J(\"LMTC18244\");{const t=this._groundItem.calculateConfigContent();let e;e=1!==t.length?void 0:t[0],this.reconcilePopoutWindows();const i=[];for(let t=0;t=0?n=this._groundItem.contentItems[0]:e=0;break;case at.row:case at.column:e=n.addItem(t,i.index);break;case at.stack:if(Ct.isComponent(t)){e=n.addItem(t,i.index);break}throw Error(tt[6]);case at.component:throw new X(\"LMAIALC87444602\");default:throw new Y(\"LMAIALU98881733\",n.type)}if(Ct.isComponent(t)){const t=n.contentItems[e];Gt.isStack(t)&&(n=t,e=0)}return i.parentItem=n,i.index=e,i}}}loadComponentAsRoot(t){if(void 0===this._groundItem)throw new Error(\"Cannot add item before init\");this._groundItem.loadComponentAsRoot(t)}updateSize(t,e){this.setSize(t,e)}setSize(t,e){if(this._width=t,this._height=e,!0===this._isInitialised){if(void 0===this._groundItem)throw new J(\"LMUS18881\");if(this._groundItem.setSize(this._width,this._height),this._maximisedStack){const{width:t,height:e}=kt(this._containerElement);Tt(this._maximisedStack.element,t),At(this._maximisedStack.element,e),this._maximisedStack.updateSize(!1)}this.adjustColumnsResponsive()}}beginSizeInvalidation(){this._sizeInvalidationBeginCount++}endSizeInvalidation(){0==--this._sizeInvalidationBeginCount&&this.updateSizeFromContainer()}updateSizeFromContainer(){const{width:t,height:e}=kt(this._containerElement);this.setSize(t,e)}updateRootSize(t=!1){if(void 0===this._groundItem)throw new J(\"LMURS28881\");this._groundItem.updateSize(t)}createAndInitContentItem(t,e){const i=this.createContentItem(t,e);return i.init(),i}createContentItem(t,e){if(\"string\"!=typeof t.type)throw new G(\"Missing parameter 'type'\",JSON.stringify(t));if(ct.isComponentItem(t)&&!(e instanceof ee)&&e&&!(!0===this.isSubWindow&&e instanceof Yt)){t={type:at.stack,content:[t],size:t.size,sizeUnit:t.sizeUnit,minSize:t.minSize,minSizeUnit:t.minSizeUnit,id:t.id,maximised:t.maximised,isClosable:t.isClosable,activeItemIndex:0,header:void 0}}return this.createContentItemFromConfig(t,e)}findFirstComponentItemById(t){if(void 0===this._groundItem)throw new J(\"LMFFCIBI82446\");return this.findFirstContentItemTypeByIdRecursive(at.component,t,this._groundItem)}createPopout(t,e,i,n){return t instanceof Gt?this.createPopoutFromContentItem(t,e,i,n):this.createPopoutFromItemConfig(t,e,i,n)}createPopoutFromContentItem(t,e,i,n){let o=t.parent,s=t;for(;null!==o&&1===o.contentItems.length&&!o.isGround;)s=o,o=o.parent;if(null===o)throw new K(\"LMCPFCI00834\");{if(void 0===n&&(n=o.contentItems.indexOf(s)),null!==i&&o.addPopInParentId(i),void 0===e){const i=globalThis.screenX||globalThis.screenLeft,n=globalThis.screenY||globalThis.screenTop,o=t.element.offsetLeft,s=t.element.offsetTop,{width:r,height:a}=kt(t.element);e={left:i+o,top:n+s,width:r,height:a}}const r=t.toConfig();if(t.remove(),ft.isRootItemConfig(r))return this.createPopoutFromItemConfig(r,e,i,n);throw new Error(`${tt[0]}`)}}beginVirtualSizedContainerAdding(){0==++this._virtualSizedContainerAddingBeginCount&&(this._virtualSizedContainers.length=0)}addVirtualSizedContainer(t){this._virtualSizedContainers.push(t)}endVirtualSizedContainerAdding(){if(0==--this._virtualSizedContainerAddingBeginCount){const t=this._virtualSizedContainers.length;if(t>0){this.fireBeforeVirtualRectingEvent(t);for(let e=0;ethis.emit(\"windowOpened\",a))),a.on(\"closed\",(()=>this.reconcilePopoutWindows())),this._openPopouts.push(a),this.layoutConfig.settings.closePopoutsOnUnload&&!this._windowBeforeUnloadListening&&(globalThis.addEventListener(\"beforeunload\",this._windowBeforeUnloadListener,{passive:!0}),this._windowBeforeUnloadListening=!0),a}closeAllOpenPopouts(){for(let t=0;tglobalThis.close()),1)}getArea(t,e){let i=null,n=1/0;for(let o=0;o=s.x1&&t=s.y1&&es.surface&&(n=s.surface,i=s)}return i}calculateItemAreas(){const t=this.getAllContentItems(),e=this._groundItem;if(void 0===e)throw new J(\"LMCIAR44365\");if(1!==t.length){e.contentItems[0].isStack?this._itemAreas=[]:this._itemAreas=e.createSideAreas();for(let e=0;e0){let e=t[0];if(Gt.isComponentItem(e)){const t=e.parent;if(null===t)throw new K(\"LMXLLMI69999\");e=t}if(!Gt.isStack(e))throw new X(\"LMCLLMI19993\");e.maximise()}}}processMaximiseStack(t){if(this._maximisedStack=t,t.on(\"beforeItemDestroyed\",this._maximisedStackBeforeDestroyedListener),t.element.classList.add(\"lm_maximised\"),t.element.insertAdjacentElement(\"afterend\",this._maximisePlaceholder),void 0===this._groundItem)throw new J(\"LMMXI19993\");{this._groundItem.element.prepend(t.element);const{width:e,height:i}=kt(this._containerElement);Tt(t.element,e),At(t.element,i),t.updateSize(!0),t.focusActiveContentItem(),this._maximisedStack.emit(\"maximised\"),this.emit(\"stateChanged\")}}processMinimiseMaximisedStack(){if(void 0===this._maximisedStack)throw new X(\"LMMMS74422\");{const t=this._maximisedStack;if(null===t.parent)throw new K(\"LMMI13668\");t.element.classList.remove(\"lm_maximised\"),this._maximisePlaceholder.insertAdjacentElement(\"afterend\",t.element),this._maximisePlaceholder.remove(),this.updateRootSize(!0),this._maximisedStack=void 0,t.off(\"beforeItemDestroyed\",this._maximisedStackBeforeDestroyedListener),t.emit(\"minimised\"),this.emit(\"stateChanged\")}}reconcilePopoutWindows(){const t=[];for(let e=0;e{this._resizeTimeoutId=void 0,this.beginSizeInvalidation(),this.endSizeInvalidation()}),this.resizeDebounceInterval))}checkClearResizeTimeout(){void 0!==this._resizeTimeoutId&&(clearTimeout(this._resizeTimeoutId),this._resizeTimeoutId=void 0)}setContainer(){var t;const e=document.body,i=null!==(t=this._containerElement)&&void 0!==t?t:e;if(i===e){this.resizeWithContainerAutomatically=!0;const t=document.documentElement;t.style.height=\"100%\",t.style.margin=\"0\",t.style.padding=\"0\",t.style.overflow=\"clip\",e.style.height=\"100%\",e.style.margin=\"0\",e.style.padding=\"0\",e.style.overflow=\"clip\"}this._containerElement=i}onBeforeUnload(){this.destroy()}adjustColumnsResponsive(){if(void 0===this._groundItem)throw new J(\"LMACR20883\");if(this._firstLoad=!1,this.useResponsiveLayout()&&!this._updatingColumnsResponsive&&this._groundItem.contentItems.length>0&&this._groundItem.contentItems[0].isRow){if(void 0===this._groundItem||null===this._width)throw new J(\"LMACR77412\");{const t=this._groundItem.contentItems[0].contentItems.length;if(t<=1)return;{const e=this.layoutConfig.dimensions.defaultMinItemWidth;if(t*e<=this._width)return;{this._updatingColumnsResponsive=!0;const i=t-Math.max(Math.floor(this._width/e),1),n=this._groundItem.contentItems[0],o=this.getAllStacks();if(0===o.length)throw new X(\"LMACRS77413\");{const t=o[0];for(let e=0;en?void 0:{parentItem:t,index:o}}}case 1:if(void 0===this._focusedComponentItem)return;{const t=this._focusedComponentItem.parentItem;return this.tryCreateLocationFromParentItem(t,e)}case 2:{const t=this.findFirstContentItemType(at.stack);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 3:{let t=this.findFirstContentItemType(at.row);return void 0!==t?this.tryCreateLocationFromParentItem(t,e):(t=this.findFirstContentItemType(at.column),void 0!==t?this.tryCreateLocationFromParentItem(t,e):void 0)}case 4:{const t=this.findFirstContentItemType(at.row);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 5:{const t=this.findFirstContentItemType(at.column);return void 0===t?void 0:this.tryCreateLocationFromParentItem(t,e)}case 6:if(void 0===this._groundItem)throw new J(\"LMFLRIF18244\");return void 0!==this.rootItem?void 0:void 0===e||0===e?{parentItem:this._groundItem,index:0}:void 0;case 7:if(void 0===this._groundItem)throw new J(\"LMFLF18244\");{const t=this._groundItem.contentItems;if(0===t.length)return void 0===e||0===e?{parentItem:this._groundItem,index:0}:void 0;{const i=t[0];return this.tryCreateLocationFromParentItem(i,e)}}}}tryCreateLocationFromParentItem(t,e){const i=t.contentItems.length;return void 0===e?{parentItem:t,index:i}:e<0||e>i?void 0:{parentItem:t,index:e}}}!function(t){t.createMaximisePlaceElement=function(t){const e=t.createElement(\"div\");return e.classList.add(\"lm_maximise_place\"),e},t.createTabDropPlaceholderElement=function(t){const e=t.createElement(\"div\");return e.classList.add(\"lm_drop_tab_placeholder\"),e},t.defaultLocationSelectors=[{typeId:1,index:void 0},{typeId:2,index:void 0},{typeId:3,index:void 0},{typeId:7,index:void 0}],t.afterFocusedItemIfPossibleLocationSelectors=[{typeId:0,index:1},{typeId:2,index:void 0},{typeId:3,index:void 0},{typeId:7,index:void 0}]}(ae||(ae={}));class le extends ae{constructor(t,e,i,n){if(super(le.createLayoutManagerConstructorParameters(t,e)),this._bindComponentEventHanlderPassedInConstructor=!1,this._creationTimeoutPassed=!1,void 0!==e&&\"function\"==typeof e&&(this.bindComponentEvent=e,this._bindComponentEventHanlderPassedInConstructor=!0,void 0!==i&&(this.unbindComponentEvent=i)),!this._bindComponentEventHanlderPassedInConstructor&&this.isSubWindow){if(void 0===this._constructorOrSubWindowLayoutConfig)throw new J(\"VLC98823\");{const t=xt.resolve(this._constructorOrSubWindowLayoutConfig);this.layoutConfig=Object.assign(Object.assign({},t),{root:void 0})}}!0!==n&&(this.deprecatedConstructor||this.init())}destroy(){this.bindComponentEvent=void 0,this.unbindComponentEvent=void 0,super.destroy()}init(){if(this._bindComponentEventHanlderPassedInConstructor||\"loading\"!==document.readyState&&null!==document.body){if(!this._bindComponentEventHanlderPassedInConstructor&&!0===this.isSubWindow&&!this._creationTimeoutPassed)return setTimeout((()=>this.init()),7),void(this._creationTimeoutPassed=!0);!0===this.isSubWindow&&(this._bindComponentEventHanlderPassedInConstructor||this.clearHtmlAndAdjustStylesForSubWindow(),window.__glInstance=this),super.init()}else document.addEventListener(\"DOMContentLoaded\",(()=>this.init()),{passive:!0})}clearHtmlAndAdjustStylesForSubWindow(){const t=document.head,e=new Array(4);e[0]=document.querySelectorAll(\"body link\"),e[1]=document.querySelectorAll(\"body style\"),e[2]=document.querySelectorAll(\"template\"),e[3]=document.querySelectorAll(\".gl_keep\");for(let i=0;ithis.emit(\"popIn\"))),document.body.appendChild(t),!0}}bindComponent(t,e){if(void 0!==this.bindComponentEvent){return this.bindComponentEvent(t,e)}if(void 0!==this.getComponentEvent)return{virtual:!1,component:this.getComponentEvent(t,e)};{const t=`${tt[2]}: ${JSON.stringify(e)}`;throw new Z(t)}}unbindComponent(t,e,i){if(void 0!==this.unbindComponentEvent)this.unbindComponentEvent(t);else if(!e&&void 0!==this.releaseComponentEvent){if(void 0===i)throw new J(\"VCUCRCU333998\");this.releaseComponentEvent(t,i)}}}!function(t){let e=!1;t.createLayoutManagerConstructorParameters=function(t,i){const n=e?null:new URL(document.location.href).searchParams.get(\"gl-window\");e=!0;const o=null!==n;let s,r;if(null!==n){const e=localStorage.getItem(n);if(null===e)throw new Error(\"Null gl-window Config\");localStorage.removeItem(n);const i=JSON.parse(e),o=_t.unminifyConfig(i);r=xt.fromResolved(o),t instanceof HTMLElement&&(s=t)}else void 0===t?r=void 0:t instanceof HTMLElement?(r=void 0,s=t):r=t,void 0===s&&i instanceof HTMLElement&&(s=i);return{constructorOrSubWindowLayoutConfig:r,isSubWindow:o,containerElement:s}}}(le||(le={}));class he extends le{constructor(t,e,i){super(t,e,i,!0),this._componentTypesMap=new Map,this._registeredComponentMap=new Map,this._virtuableComponentMap=new Map,this._containerVirtualRectingRequiredEventListener=(t,e,i)=>this.handleContainerVirtualRectingRequiredEvent(t,e,i),this._containerVirtualVisibilityChangeRequiredEventListener=(t,e)=>this.handleContainerVirtualVisibilityChangeRequiredEvent(t,e),this._containerVirtualZIndexChangeRequiredEventListener=(t,e,i)=>this.handleContainerVirtualZIndexChangeRequiredEvent(t,e,i),this.deprecatedConstructor||this.init()}registerComponent(t,e,i=!1){if(\"function\"!=typeof e)throw new $(\"registerComponent() componentConstructorOrFactoryFtn parameter is not a function\");if(e.hasOwnProperty(\"prototype\")){const n=e;this.registerComponentConstructor(t,n,i)}else{const n=e;this.registerComponentFactoryFunction(t,n,i)}}registerComponentConstructor(t,e,i=!1){if(\"function\"!=typeof e)throw new Error(tt[1]);if(void 0!==this._componentTypesMap.get(t))throw new Z(`${tt[3]}: ${t}`);this._componentTypesMap.set(t,{constructor:e,factoryFunction:void 0,virtual:i})}registerComponentFactoryFunction(t,e,i=!1){if(\"function\"!=typeof e)throw new Z(\"Please register a constructor function\");if(void 0!==this._componentTypesMap.get(t))throw new Z(`${tt[3]}: ${t}`);this._componentTypesMap.set(t,{constructor:void 0,factoryFunction:e,virtual:i})}registerComponentFunction(t){this.registerGetComponentConstructorCallback(t)}registerGetComponentConstructorCallback(t){if(\"function\"!=typeof t)throw new Error(\"Please register a callback function\");void 0!==this._getComponentConstructorFtn&&console.warn(\"Multiple component functions are being registered. Only the final registered function will be used.\"),this._getComponentConstructorFtn=t}getRegisteredComponentTypeNames(){const t=this._componentTypesMap.keys();return Array.from(t)}getComponentInstantiator(t){let e;const i=pt.resolveComponentTypeName(t);return void 0!==i&&(e=this._componentTypesMap.get(i)),void 0===e&&void 0!==this._getComponentConstructorFtn&&(e={constructor:this._getComponentConstructorFtn(t),factoryFunction:void 0,virtual:!1}),e}bindComponent(t,e){let i;const n=pt.resolveComponentTypeName(e);let o;if(void 0!==n&&(i=this._componentTypesMap.get(n)),void 0===i&&void 0!==this._getComponentConstructorFtn&&(i={constructor:this._getComponentConstructorFtn(e),factoryFunction:void 0,virtual:!1}),void 0!==i){const s=i.virtual;let r,a;r=void 0===e.componentState?void 0:Ut({},e.componentState);const l=i.constructor;if(void 0!==l)a=new l(t,r,s);else{const e=i.factoryFunction;if(void 0===e)throw new X(\"LMBCFFU10008\");a=e(t,r,s)}if(s){if(void 0===a)throw new J(\"GLBCVCU988774\");{const e=a,i=e.rootHtmlElement;if(void 0===i)throw new Z(`${tt[5]}: ${n}`);!function(t){const e=\"absolute\";t.style.position!==e&&(t.style.position=e)}(i),this.container.appendChild(i),this._virtuableComponentMap.set(t,e),t.virtualRectingRequiredEvent=this._containerVirtualRectingRequiredEventListener,t.virtualVisibilityChangeRequiredEvent=this._containerVirtualVisibilityChangeRequiredEventListener,t.virtualZIndexChangeRequiredEvent=this._containerVirtualZIndexChangeRequiredEventListener}}this._registeredComponentMap.set(t,a),o={virtual:i.virtual,component:a}}else o=super.bindComponent(t,e);return o}unbindComponent(t,e,i){if(void 0===this._registeredComponentMap.get(t))super.unbindComponent(t,e,i);else{const e=this._virtuableComponentMap.get(t);if(void 0!==e){const i=e.rootHtmlElement;if(void 0===i)throw new X(\"GLUC77743\",t.title);this.container.removeChild(i),this._virtuableComponentMap.delete(t)}}}fireBeforeVirtualRectingEvent(t){this._goldenLayoutBoundingClientRect=this.container.getBoundingClientRect(),super.fireBeforeVirtualRectingEvent(t)}handleContainerVirtualRectingRequiredEvent(t,e,i){const n=this._virtuableComponentMap.get(t);if(void 0===n)throw new J(\"GLHCSCE55933\");{const o=n.rootHtmlElement;if(void 0===o)throw new Z(tt[4]+\" \"+t.title);{const n=t.element.getBoundingClientRect(),s=n.left-this._goldenLayoutBoundingClientRect.left;o.style.left=zt(s);const r=n.top-this._goldenLayoutBoundingClientRect.top;o.style.top=zt(r),Tt(o,e),At(o,i)}}}handleContainerVirtualVisibilityChangeRequiredEvent(t,e){const i=this._virtuableComponentMap.get(t);if(void 0===i)throw new J(\"GLHCVVCRE55934\");{const n=i.rootHtmlElement;if(void 0===n)throw new Z(tt[4]+\" \"+t.title);Dt(n,e)}}handleContainerVirtualZIndexChangeRequiredEvent(t,e,i){const n=this._virtuableComponentMap.get(t);if(void 0===n)throw new J(\"GLHCVZICRE55935\");{const e=n.rootHtmlElement;if(void 0===e)throw new Z(tt[4]+\" \"+t.title);e.style.zIndex=i}}}const de=\"initial_\",ce={show:\"top\",popout:!1,maximise:!1,close:\"close-tab-unused\"},me={headerHeight:31},ue={hasHeaders:!0,reorderEnabled:!0},pe={popoutWholeStack:!1,constrainDragToContainer:!1,constrainDragToHeaders:!1,preventDragout:!1,showMaximiseIcon:!1,showPopoutIcon:!1,showCloseIcon:!1,blockedPopoutsThrowError:!0,closePopoutsOnUnload:!0,selectionEnabled:!1};var ge,fe;class ve{constructor(e){this.layout=e,ge.set(this,void 0),fe.set(this,void 0),this.handleResize=t=>{t.forEach((t=>this.resizeElement(t.target)))},this.handleMutation=()=>{this.layout.viewComponentsByContainerElement.forEach((t=>{this.resizeElement(t.container.element)}))},t.__classPrivateFieldSet(this,ge,new ResizeObserver(this.handleResize),\"f\"),t.__classPrivateFieldSet(this,fe,new MutationObserver(this.handleMutation),\"f\")}observeMutations(e){t.__classPrivateFieldGet(this,fe,\"f\")?.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[\"class\"]})}destroy(){t.__classPrivateFieldGet(this,ge,\"f\").disconnect(),t.__classPrivateFieldGet(this,fe,\"f\").disconnect()}observeContainer(e){t.__classPrivateFieldGet(this,ge,\"f\").observe(e)}unobserveContainer(e){t.__classPrivateFieldGet(this,ge,\"f\").unobserve(e)}resizeElement(t){const e=this.layout.viewComponentsByContainerElement.get(t);e&&e.resize()}}ge=new WeakMap,fe=new WeakMap;var _e={};Object.defineProperty(_e,\"__esModule\",{value:!0});var ye=_e.BaseItem=void 0;class Ce{constructor(t,e,i){this._item=t,this._layout=e,this._wrap=i}get raw(){return this._item}get layout(){return this._layout}get type(){return this._item.type}get contentItems(){return(this._item.contentItems??[]).map((t=>this._wrap(t)))}get parent(){const t=this._item.parent;return t?this._wrap(t):null}setActiveContentItem(t,e){if(\"stack\"!==this.type)throw new Error(`Cannot call setActiveContentItem from a non-stack item: ${this.type}`);this._item.setActiveContentItem(t.raw,e)}static wrapInternal(t,e,i){const n=Ce.wrapCache.get(e);if(n)return n;const o=new t(e,i,(e=>Ce.wrapInternal(t,e,i)));return Ce.wrapCache.set(e,o),o}}ye=_e.BaseItem=Ce,Ce.wrapCache=new WeakMap;const we=t=>!!t&&\"contentItems\"in t&&(t.isRow||t.isColumn);class Ie extends ye{isRoot(){return!!this._item.parent?.isGround}getBounds(){return this._item.element.getBoundingClientRect()}get viewName(){if(this._item.isComponent){const{component:t}=this._item;return t.identity.name}throw new Error(\"View name not found\")}onDestroyed(t){const e=({target:i})=>{i===this._item&&(t(),this._item.off(\"itemDestroyed\",e))};this._item.on(\"itemDestroyed\",e)}createAdjacentStack({position:t=\"right\"}={}){const e=this.raw;if(ee.isStack(e)&&e.parent){const i=[\"top\",\"bottom\"].includes(t)?\"column\":\"row\",n=[\"left\",\"top\"].includes(t)?1:0,o=we(e.parent)?e.parent:e.layoutManager,s=o,r=e.parent.contentItems.indexOf(e);e.parent.isGround&&e.parent.removeChild(e,!0);const a=o.newItem({type:i,content:[{type:\"stack\",content:[]}]},r);if(!a)throw new Error(\"createAdjacentStack: Failed to create new container\");const l=a.contentItems[0];return a.addChild(this.raw,n),we(s)&&s.removeChild(e,!0),this._wrap(l)}throw new Error(`Cannot creat adjacent stacks for type: ${e.type}, must be type 'stack'`)}setActiveContentItem(t,e=!0){if(!ee.isStack(this._item))throw new Error(`Cannot call setActiveContentItem from a non-stack item: ${this.type}`);this._item.setActiveComponentItem(t.raw,!e)}static wrap(t,e){return ye.wrapInternal(Ie,t,e)}}function be(t=[],e){for(const i of t)\"component\"===i.type?Object.keys(e).forEach((t=>{t in i&&(i.componentState={[`${de}${t}`]:i[t],...i.componentState}),i[t]=e[t]})):be(i.content,e)}function Se(t=[],e,i){for(const n of t)if(\"component\"===n.type)Object.keys(e).forEach((t=>{if(`${de}${t}`in n.componentState)return n[t]=n.componentState[`${de}${t}`],void delete n.componentState[`${de}${t}`];n[t]=e[t]}));else{if(n.size&&(\"row\"===i||\"column\"===i)){n[\"row\"===i?\"width\":\"height\"]=n.size?.includes(\".\")?parseFloat(n.size):parseInt(n.size)}Se(n.content,e,n.type)}}function Ee(t){if(t.root){t.root.content&&Se([t.root],{componentName:\"view\",isClosable:!0});const e=t.root;t.content=[e],delete t.root}return t}const xe=e=>class extends e{connectedCallback(){if(!this.name||!this.uuid)throw new Error(\" Name or uuid attribute missing\");if(!this.src)throw new Error(\" missing 'src' attribute.\");this.#t||(this.#t=document.createElement(\"iframe\"),this.#t.src=this.src,this.#t.style.height=\"100%\",this.#t.style.width=\"100%\",this.#t.style.border=\"none\",this.forceFrameName?this.#t.setAttribute(\"name\",this.forceFrameName):this.#t.setAttribute(\"name\",t.encodeOptions({brokerUrl:this.brokerUrl,name:this.name,uuid:this.uuid,providerId:this.providerId,contextGroup:this.contextGroup},\"of-frame\")),this.#t.setAttribute(\"id\",this.name),this.appendChild(this.#t))}#t;get brokerUrl(){return this.getAttribute(\"of-broker\")}set brokerUrl(t){t&&this.setAttribute(\"of-broker\",t)}get name(){return this.getAttribute(\"of-name\")}set name(t){t&&this.setAttribute(\"of-name\",t)}get forceFrameName(){return this.getAttribute(\"forceFrameName\")}set forceFrameName(t){t&&this.setAttribute(\"forceFrameName\",t)}get uuid(){return this.getAttribute(\"of-uuid\")}set uuid(t){t&&this.setAttribute(\"of-uuid\",t)}get src(){return this.getAttribute(\"src\")}set src(t){t&&this.setAttribute(\"src\",t)}get providerId(){return this.getAttribute(\"of-provider-id\")}set providerId(t){t&&this.setAttribute(\"of-provider-id\",t)}get contextGroup(){return this.getAttribute(\"of-context-group\")}set contextGroup(t){t&&this.setAttribute(\"of-context-group\",t)}static get observedAttributes(){return[\"name\"]}};class Le{static create(t){const e=document.createElement(\"of-view\");return Object.entries(t).forEach((([t,i])=>{e.setAttribute(t,i)})),e}}customElements.define(\"of-view\",xe(HTMLElement));class ze{constructor(t,i,n,{brokerUrl:o,interopConfig:s},r){this.container=t,this.config=i,this.ofView=null,this.isDragging=()=>this.container.tab.element?.className.includes(\"lm_dragging\")??!1;const{url:a,web:l,interop:h,name:d}=i||{},c=d??`internal-generated-view-${e.v4()}`;if(this.identity={uuid:n,name:c},this.container.element.setAttribute(\"of-name\",c),this.container.element.id=`container-${c}`,this.container.parent.id=c,void 0===a)return void this.handleUrlMissing();const m=this.updateTitleIfNotSet(a),u={\"of-broker\":o,\"of-uuid\":n,\"of-name\":c,src:a};l?.frameName&&(u.forceFrameName=l.frameName);const p=h?.currentContextGroup??s?.currentContextGroup;p&&(u[\"of-context-group\"]=p),s?.providerId&&(u[\"of-provider-id\"]=s?.providerId),this.ofView=Le.create(u),this.ofView.title=m??`Iframe: ${a}`,r.appendChild(this.ofView),this.ofView.style.position=\"absolute\"}updateTitleIfNotSet(t){return\"view\"===this.container.parent.title&&this.container.parent.setTitle(t),this.container.parent.title}handleUrlMissing(){const t=document.createElement(\"div\");t.setAttribute(\"style\",\"padding: 20px\");t.innerText=\"No URL provided\",this.container.element.appendChild(t)}destroy(){this.ofView?.remove(),this.ofView=null}closeView(){this.container.close()}resize(){if(this.ofView){if(this.isDragging())return void(this.ofView.style.display=\"none\");const t=this.container.element.getBoundingClientRect();this.ofView.style.position=\"absolute\",this.ofView.style.height=`${t.height}px`,this.ofView.style.width=`${t.width}px`,this.ofView.style.inset=`${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`,this.ofView.style.display=\"block\"}}}class Me extends U{static overrideConfig(t){const e={...ue,...t.settings,...pe};return e.reorderEnabled?be(t.content,{isClosable:!0}):be(t.content,{reorderEnabled:!1}),{dimensions:me,...t,settings:e,header:{...ce,show:!1!==t.settings?.hasHeaders&&ce.show}}}constructor(t,e,i,{options:n},o,s){super(),this.identity=t,this.container=e,this.initialConfig=i,this.layoutManager=o,this.platformProvider=s,this.viewComponentsByContainerElement=new Map,this.layoutContentCache=_.getSingleInstance(),this.reparentingViews=new Set,this.goldenLayoutDestroyed=!1,this.createViewComponent=(t,e)=>{m.handleSharedView(this.layoutManager,this.identity,e);const i=new ze(t,e,this.identity.uuid,this.options,this.iframeContainer);return e&&!1===e[`${de}isClosable`]&&this.stylesheet.insertRule(`#tab-${i.identity.name} .lm_close_tab { display: none; }`),this.viewComponentsByContainerElement.set(t.element,i),this.resizeController.observeContainer(t.element),i},this.iframeContainer=document.createElement(\"div\"),this.iframeContainer.id=`openfin-layout-iframe-container-${this.identity.layoutName}`,this.domEmitter=new V(e),this.setupStylesheets(),this.layout=new he(this.container),this.layout.resizeWithContainerAutomatically=!0,this.options=n,this.layout.registerComponent(\"view\",this.createViewComponent),this.setupListeners(),this.resizeController=new ve(this),this.layout.loadLayout(Me.overrideConfig(i));const r=document.createElement(\"div\");r.id=`openfin-layout-shadow-container-${this.identity.layoutName}`,r.attachShadow({mode:\"open\",delegatesFocus:!1}).appendChild(this.iframeContainer),this.container.appendChild(r),this.resizeController.observeMutations(this.container)}getStackByView({name:t}){const e=this.layout.findFirstComponentItemById(t);if(e?.parent&&e?.parent?.isStack)return Ie.wrap(e.parent,this)}getRoot(){return Ie.wrap(this.layout.rootItem,this)}async platformCloseView(t){const e=[...this.viewComponentsByContainerElement.values()].find((e=>e.identity.name===t.name));if(!e)throw new Error(`View with name: ${t.name} not found in layout.`);e.closeView()}async platformCreateView(t,{location:e,targetView:i}={}){if(i)throw new Error(\"TargetView not supported in web\");const n={options:this.platformProvider.normalizeOptions(t),target:this.identity,location:e};return this.insertView(n)}setupStylesheets(){if(this.container.setAttribute(\"data-openfin-layout-name\",this.identity.layoutName),this.stylesheet=new CSSStyleSheet,this.stylesheet.insertRule(\".lm_close { display: none; }\"),document.adoptedStyleSheets.push(this.stylesheet),this.initialConfig.settings?.preventSplitterResize){const t=`\\n [data-openfin-layout-name='${this.identity.layoutName}'] .lm_splitter {\\n pointer-events: none;\\n }`;this.stylesheet.insertRule(t)}}insertView({options:t,location:e,targetView:i}){const n=e?this.layoutContentCache.getItemOrUndefined(e.id):void 0,o=i?this.layoutContentCache.getItemOrUndefined(i.name):void 0,s=n??o??Ie.wrap(this.layout.rootItem,this);let r;if(ee.isStack(s.raw))r=s.raw;else{if(!we(s.raw))throw new Error(\"Cannot add a view at the requested location\");r=s.raw.newItem({type:\"stack\",content:[]})}const a=Math.min(r.contentItems.length,e?.index??r.contentItems.length);let l=this.layout.findFirstComponentItemById(t.name);l?(l.parent&&l.parent.removeChild(l,!0),r.addChild(l,a)):l=r.newComponent(\"view\",t,t.title??t.url??\"Default Title\",a);const h=l.component.identity;return Promise.resolve({identity:h})}replaceView({viewToReplace:t,newView:e}){throw new Error(\"Method not implemented.\")}replaceLayout(t){throw new Error(\"Method not implemented.\")}async cleanupView(t){}applyPreset(t){throw new Error(\"Method not implemented.\")}getCurrentViews(){return[...this.viewComponentsByContainerElement.values()].map((t=>t.identity))}async getFrameSnapshot(){return Ee(xt.fromResolved(this.layout.toConfig()))}isVisible(){return W(this.container)}async onViewDetached({viewIdentity:t}){this.reparentingViews.add(t.name),this.platformCloseView(t)}async destroy(){this.goldenLayoutDestroyed||(this.goldenLayoutDestroyed=!0,this.layout.destroy()),this.iframeContainer.remove(),this.resizeController.destroy(),document.adoptedStyleSheets=document.adoptedStyleSheets.filter((t=>t!==this.stylesheet)),this.viewComponentsByContainerElement.clear()}setupListeners(){this.container.addEventListener(\"pointerdown\",(t=>{if(t.target instanceof HTMLElement){const e=t.target.classList;[\"lm_tab\",\"lm_title\",\"lm_splitter\",\"lm_drag_handle\"].some((t=>e.contains(t)))&&(this.handleDragStart(),2===t.button&&t.stopPropagation())}}),!0),document.addEventListener(\"pointerup\",(()=>this.handleDragEnd()),!0),this.layout.on(\"tabCreated\",(t=>{const e=t.componentItem.component;t.element.id=`tab-${e.identity.name}`,this.domEmitter.dispatchLocalEvent(\"tab-created\",e.identity)})),this.layout.on(\"itemCreated\",(({target:t})=>{const e=t;if(Gt.isComponentItem(e)){const t=e.component;this.domEmitter.dispatchLocalEvent(\"container-created\",t.identity)}})),this.layout.on(\"itemDestroyed\",(t=>{const e=t.target;if(Gt.isComponentItem(e)){const t=e.component;this.removeViewComponent(t)}})),this.layout.on(\"itemDropped\",(()=>{this.handleDragEnd()}))}handleDragStart(){this.iframeContainer.style.pointerEvents=\"none\"}handleDragEnd(){this.iframeContainer.style.pointerEvents=\"\"}removeViewComponent(t){if(t.config&&!1===t.config[`${de}isClosable`]){const e=[...this.stylesheet.cssRules].findIndex((e=>e.cssText.includes(`#tab-${t.identity.name}`)));this.stylesheet.deleteRule(e)}t.destroy(),this.viewComponentsByContainerElement.delete(t.container.element),this.resizeController.unobserveContainer(t.container.element),this.reparentingViews.has(t.identity.name)?this.reparentingViews.delete(t.identity.name):this.platformProvider.closeView(t.identity.name);0===this.getCurrentViews().length&&(this.goldenLayoutDestroyed||(this.goldenLayoutDestroyed=!0,m.handleLastViewRemoved(this.layoutManager,this.identity)))}}class Pe{constructor(t,e,i,n){this.windowIdentity=t,this.connectConfig=e,this.provider=i,this.fallbackContainer=n}async createLayout(t,e){if(!(\"container\"in t)&&!this.fallbackContainer)throw new Error(\"Container property is not optional in web\");const{layoutName:i}=t,n=t,o=this.provider.initLayoutViews(n),s=n.container??this.fallbackContainer,r={...this.windowIdentity,layoutName:i},a=new Me(r,s,o,this.connectConfig,e,this.provider);m.registerLayout(e,i,a),this.fallbackContainer=null}async getLayoutSnapshot(t){return t.getLayoutSnapshot()}async handleLastViewRemoved(t){}}class Te{static async init(e){const i=e.getFin().InterApplicationBus.Channel,n=await i.create(`custom-frame-${e.me.uuid}`);return n.setDefaultAction((async(t,{target:e,opts:i},o)=>{const s=n.connections.find((t=>t.name===e.name));if(s)return n.dispatch(s,t,{...i,target:e});throw new Error(`Client with name ${e.name} not found`)})),await t.relayChannelClientApi_1(n,\"layout-relay\"),new Te(e)}constructor(t){this.wire=t,this.viewNames=new Set}normalizeOptions(t,i=\"default\"){const n=this.wire.me.uuid;let{name:o=`internal-generated-view-${e.v4()}`}=t;return o.match(/^internal-generated-view-/)&&this.viewNames.has(o)&&\"duplicate\"===i&&(o=`internal-generated-view-${e.v4()}`),this.viewNames.add(o),{...t,name:o,uuid:n}}closeView(t){this.viewNames.delete(t)}initLayoutViews({layout:t,multiInstanceViewBehavior:e}){return H((t=>{if(\"component\"===t.type&&t.componentState){const i=this.normalizeOptions(t.componentState,e);return{...t,componentState:i}}return t}),t)}}var Ae;const ke=t=>t;Ae=new WeakMap,exports.WebLayoutEntryPoint=class{constructor(e){Ae.set(this,void 0),this.initLayoutManager=async(e,i,{container:n,layoutManagerOverride:o})=>{const s=await Te.init(i),r=o??ke,a=new Pe(i.me,t.__classPrivateFieldGet(this,Ae,\"f\"),s,n),l=new(r(m.createClosedConstructor(a)));return await M(i,l),l},this.applyLayoutSnapshot=async(e,i,n)=>{await i.applyLayoutSnapshot(t.__classPrivateFieldGet(this,Ae,\"f\").platform.layoutSnapshot)},this.createLayout=async(t,e)=>m.createLayout(t,e),this.destroyLayout=async(t,e)=>m.destroyLayout(t,e),t.__classPrivateFieldSet(this,Ae,e,\"f\")}};\n","'use strict'\n\nexports.byteLength = byteLength\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\nfor (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i]\n revLookup[code.charCodeAt(i)] = i\n}\n\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction getLens (b64) {\n var len = b64.length\n\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // Trim off extra bytes after placeholder bytes are found\n // See: https://github.com/beatgammit/base64-js/issues/42\n var validLen = b64.indexOf('=')\n if (validLen === -1) validLen = len\n\n var placeHoldersLen = validLen === len\n ? 0\n : 4 - (validLen % 4)\n\n return [validLen, placeHoldersLen]\n}\n\n// base64 is 4/3 + up to two characters of the original data\nfunction byteLength (b64) {\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction _byteLength (b64, validLen, placeHoldersLen) {\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction toByteArray (b64) {\n var tmp\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n\n var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))\n\n var curByte = 0\n\n // if there are placeholders, only get up to the last complete 4 chars\n var len = placeHoldersLen > 0\n ? validLen - 4\n : validLen\n\n var i\n for (i = 0; i < len; i += 4) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 18) |\n (revLookup[b64.charCodeAt(i + 1)] << 12) |\n (revLookup[b64.charCodeAt(i + 2)] << 6) |\n revLookup[b64.charCodeAt(i + 3)]\n arr[curByte++] = (tmp >> 16) & 0xFF\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 2) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 2) |\n (revLookup[b64.charCodeAt(i + 1)] >> 4)\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 1) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 10) |\n (revLookup[b64.charCodeAt(i + 1)] << 4) |\n (revLookup[b64.charCodeAt(i + 2)] >> 2)\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] +\n lookup[num >> 12 & 0x3F] +\n lookup[num >> 6 & 0x3F] +\n lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n var tmp\n var output = []\n for (var i = start; i < end; i += 3) {\n tmp =\n ((uint8[i] << 16) & 0xFF0000) +\n ((uint8[i + 1] << 8) & 0xFF00) +\n (uint8[i + 2] & 0xFF)\n output.push(tripletToBase64(tmp))\n }\n return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n var tmp\n var len = uint8.length\n var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n var parts = []\n var maxChunkLength = 16383 // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1]\n parts.push(\n lookup[tmp >> 2] +\n lookup[(tmp << 4) & 0x3F] +\n '=='\n )\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + uint8[len - 1]\n parts.push(\n lookup[tmp >> 10] +\n lookup[(tmp >> 4) & 0x3F] +\n lookup[(tmp << 2) & 0x3F] +\n '='\n )\n }\n\n return parts.join('')\n}\n","/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n/* eslint-disable no-proto */\n\n'use strict'\n\nconst base64 = require('base64-js')\nconst ieee754 = require('ieee754')\nconst customInspectSymbol =\n (typeof Symbol === 'function' && typeof Symbol['for'] === 'function') // eslint-disable-line dot-notation\n ? Symbol['for']('nodejs.util.inspect.custom') // eslint-disable-line dot-notation\n : null\n\nexports.Buffer = Buffer\nexports.SlowBuffer = SlowBuffer\nexports.INSPECT_MAX_BYTES = 50\n\nconst K_MAX_LENGTH = 0x7fffffff\nexports.kMaxLength = K_MAX_LENGTH\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Print warning and recommend using `buffer` v4.x which has an Object\n * implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * We report that the browser does not support typed arrays if the are not subclassable\n * using __proto__. Firefox 4-29 lacks support for adding new properties to `Uint8Array`\n * (See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438). IE 10 lacks support\n * for __proto__ and has a buggy typed array implementation.\n */\nBuffer.TYPED_ARRAY_SUPPORT = typedArraySupport()\n\nif (!Buffer.TYPED_ARRAY_SUPPORT && typeof console !== 'undefined' &&\n typeof console.error === 'function') {\n console.error(\n 'This browser lacks typed array (Uint8Array) support which is required by ' +\n '`buffer` v5.x. Use `buffer` v4.x if you require old browser support.'\n )\n}\n\nfunction typedArraySupport () {\n // Can typed array instances can be augmented?\n try {\n const arr = new Uint8Array(1)\n const proto = { foo: function () { return 42 } }\n Object.setPrototypeOf(proto, Uint8Array.prototype)\n Object.setPrototypeOf(arr, proto)\n return arr.foo() === 42\n } catch (e) {\n return false\n }\n}\n\nObject.defineProperty(Buffer.prototype, 'parent', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.buffer\n }\n})\n\nObject.defineProperty(Buffer.prototype, 'offset', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.byteOffset\n }\n})\n\nfunction createBuffer (length) {\n if (length > K_MAX_LENGTH) {\n throw new RangeError('The value \"' + length + '\" is invalid for option \"size\"')\n }\n // Return an augmented `Uint8Array` instance\n const buf = new Uint8Array(length)\n Object.setPrototypeOf(buf, Buffer.prototype)\n return buf\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new TypeError(\n 'The \"string\" argument must be of type string. Received type number'\n )\n }\n return allocUnsafe(arg)\n }\n return from(arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\nfunction from (value, encodingOrOffset, length) {\n if (typeof value === 'string') {\n return fromString(value, encodingOrOffset)\n }\n\n if (ArrayBuffer.isView(value)) {\n return fromArrayView(value)\n }\n\n if (value == null) {\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n }\n\n if (isInstance(value, ArrayBuffer) ||\n (value && isInstance(value.buffer, ArrayBuffer))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof SharedArrayBuffer !== 'undefined' &&\n (isInstance(value, SharedArrayBuffer) ||\n (value && isInstance(value.buffer, SharedArrayBuffer)))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof value === 'number') {\n throw new TypeError(\n 'The \"value\" argument must not be of type number. Received type number'\n )\n }\n\n const valueOf = value.valueOf && value.valueOf()\n if (valueOf != null && valueOf !== value) {\n return Buffer.from(valueOf, encodingOrOffset, length)\n }\n\n const b = fromObject(value)\n if (b) return b\n\n if (typeof Symbol !== 'undefined' && Symbol.toPrimitive != null &&\n typeof value[Symbol.toPrimitive] === 'function') {\n return Buffer.from(value[Symbol.toPrimitive]('string'), encodingOrOffset, length)\n }\n\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n return from(value, encodingOrOffset, length)\n}\n\n// Note: Change prototype *after* Buffer.from is defined to workaround Chrome bug:\n// https://github.com/feross/buffer/pull/148\nObject.setPrototypeOf(Buffer.prototype, Uint8Array.prototype)\nObject.setPrototypeOf(Buffer, Uint8Array)\n\nfunction assertSize (size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be of type number')\n } else if (size < 0) {\n throw new RangeError('The value \"' + size + '\" is invalid for option \"size\"')\n }\n}\n\nfunction alloc (size, fill, encoding) {\n assertSize(size)\n if (size <= 0) {\n return createBuffer(size)\n }\n if (fill !== undefined) {\n // Only pay attention to encoding if it's a string. This\n // prevents accidentally sending in a number that would\n // be interpreted as a start offset.\n return typeof encoding === 'string'\n ? createBuffer(size).fill(fill, encoding)\n : createBuffer(size).fill(fill)\n }\n return createBuffer(size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n return alloc(size, fill, encoding)\n}\n\nfunction allocUnsafe (size) {\n assertSize(size)\n return createBuffer(size < 0 ? 0 : checked(size) | 0)\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n return allocUnsafe(size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n return allocUnsafe(size)\n}\n\nfunction fromString (string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8'\n }\n\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n\n const length = byteLength(string, encoding) | 0\n let buf = createBuffer(length)\n\n const actual = buf.write(string, encoding)\n\n if (actual !== length) {\n // Writing a hex string, for example, that contains invalid characters will\n // cause everything after the first invalid character to be ignored. (e.g.\n // 'abxxcd' will be treated as 'ab')\n buf = buf.slice(0, actual)\n }\n\n return buf\n}\n\nfunction fromArrayLike (array) {\n const length = array.length < 0 ? 0 : checked(array.length) | 0\n const buf = createBuffer(length)\n for (let i = 0; i < length; i += 1) {\n buf[i] = array[i] & 255\n }\n return buf\n}\n\nfunction fromArrayView (arrayView) {\n if (isInstance(arrayView, Uint8Array)) {\n const copy = new Uint8Array(arrayView)\n return fromArrayBuffer(copy.buffer, copy.byteOffset, copy.byteLength)\n }\n return fromArrayLike(arrayView)\n}\n\nfunction fromArrayBuffer (array, byteOffset, length) {\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\"offset\" is outside of buffer bounds')\n }\n\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\"length\" is outside of buffer bounds')\n }\n\n let buf\n if (byteOffset === undefined && length === undefined) {\n buf = new Uint8Array(array)\n } else if (length === undefined) {\n buf = new Uint8Array(array, byteOffset)\n } else {\n buf = new Uint8Array(array, byteOffset, length)\n }\n\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(buf, Buffer.prototype)\n\n return buf\n}\n\nfunction fromObject (obj) {\n if (Buffer.isBuffer(obj)) {\n const len = checked(obj.length) | 0\n const buf = createBuffer(len)\n\n if (buf.length === 0) {\n return buf\n }\n\n obj.copy(buf, 0, 0, len)\n return buf\n }\n\n if (obj.length !== undefined) {\n if (typeof obj.length !== 'number' || numberIsNaN(obj.length)) {\n return createBuffer(0)\n }\n return fromArrayLike(obj)\n }\n\n if (obj.type === 'Buffer' && Array.isArray(obj.data)) {\n return fromArrayLike(obj.data)\n }\n}\n\nfunction checked (length) {\n // Note: cannot use `length < K_MAX_LENGTH` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= K_MAX_LENGTH) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + K_MAX_LENGTH.toString(16) + ' bytes')\n }\n return length | 0\n}\n\nfunction SlowBuffer (length) {\n if (+length != length) { // eslint-disable-line eqeqeq\n length = 0\n }\n return Buffer.alloc(+length)\n}\n\nBuffer.isBuffer = function isBuffer (b) {\n return b != null && b._isBuffer === true &&\n b !== Buffer.prototype // so Buffer.isBuffer(Buffer.prototype) will be false\n}\n\nBuffer.compare = function compare (a, b) {\n if (isInstance(a, Uint8Array)) a = Buffer.from(a, a.offset, a.byteLength)\n if (isInstance(b, Uint8Array)) b = Buffer.from(b, b.offset, b.byteLength)\n if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n throw new TypeError(\n 'The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array'\n )\n }\n\n if (a === b) return 0\n\n let x = a.length\n let y = b.length\n\n for (let i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i]\n y = b[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n switch (String(encoding).toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'latin1':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return true\n default:\n return false\n }\n}\n\nBuffer.concat = function concat (list, length) {\n if (!Array.isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n\n if (list.length === 0) {\n return Buffer.alloc(0)\n }\n\n let i\n if (length === undefined) {\n length = 0\n for (i = 0; i < list.length; ++i) {\n length += list[i].length\n }\n }\n\n const buffer = Buffer.allocUnsafe(length)\n let pos = 0\n for (i = 0; i < list.length; ++i) {\n let buf = list[i]\n if (isInstance(buf, Uint8Array)) {\n if (pos + buf.length > buffer.length) {\n if (!Buffer.isBuffer(buf)) buf = Buffer.from(buf)\n buf.copy(buffer, pos)\n } else {\n Uint8Array.prototype.set.call(\n buffer,\n buf,\n pos\n )\n }\n } else if (!Buffer.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n } else {\n buf.copy(buffer, pos)\n }\n pos += buf.length\n }\n return buffer\n}\n\nfunction byteLength (string, encoding) {\n if (Buffer.isBuffer(string)) {\n return string.length\n }\n if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) {\n return string.byteLength\n }\n if (typeof string !== 'string') {\n throw new TypeError(\n 'The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. ' +\n 'Received type ' + typeof string\n )\n }\n\n const len = string.length\n const mustMatch = (arguments.length > 2 && arguments[2] === true)\n if (!mustMatch && len === 0) return 0\n\n // Use a for loop to avoid recursion\n let loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'ascii':\n case 'latin1':\n case 'binary':\n return len\n case 'utf8':\n case 'utf-8':\n return utf8ToBytes(string).length\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return len * 2\n case 'hex':\n return len >>> 1\n case 'base64':\n return base64ToBytes(string).length\n default:\n if (loweredCase) {\n return mustMatch ? -1 : utf8ToBytes(string).length // assume utf8\n }\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n let loweredCase = false\n\n // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n // property of a typed array.\n\n // This behaves neither like String nor Uint8Array in that we set start/end\n // to their upper/lower bounds if the value passed is out of range.\n // undefined is handled specially as per ECMA-262 6th Edition,\n // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n if (start === undefined || start < 0) {\n start = 0\n }\n // Return early if start > this.length. Done here to prevent potential uint32\n // coercion fail below.\n if (start > this.length) {\n return ''\n }\n\n if (end === undefined || end > this.length) {\n end = this.length\n }\n\n if (end <= 0) {\n return ''\n }\n\n // Force coercion to uint32. This will also coerce falsey/NaN values to 0.\n end >>>= 0\n start >>>= 0\n\n if (end <= start) {\n return ''\n }\n\n if (!encoding) encoding = 'utf8'\n\n while (true) {\n switch (encoding) {\n case 'hex':\n return hexSlice(this, start, end)\n\n case 'utf8':\n case 'utf-8':\n return utf8Slice(this, start, end)\n\n case 'ascii':\n return asciiSlice(this, start, end)\n\n case 'latin1':\n case 'binary':\n return latin1Slice(this, start, end)\n\n case 'base64':\n return base64Slice(this, start, end)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return utf16leSlice(this, start, end)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = (encoding + '').toLowerCase()\n loweredCase = true\n }\n }\n}\n\n// This property is used by `Buffer.isBuffer` (and the `is-buffer` npm package)\n// to detect a Buffer instance. It's not possible to use `instanceof Buffer`\n// reliably in a browserify context because there could be multiple different\n// copies of the 'buffer' package in use. This method works even for Buffer\n// instances that were created from another copy of the `buffer` package.\n// See: https://github.com/feross/buffer/issues/154\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n const i = b[n]\n b[n] = b[m]\n b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n const len = this.length\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits')\n }\n for (let i = 0; i < len; i += 2) {\n swap(this, i, i + 1)\n }\n return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n const len = this.length\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits')\n }\n for (let i = 0; i < len; i += 4) {\n swap(this, i, i + 3)\n swap(this, i + 1, i + 2)\n }\n return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n const len = this.length\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits')\n }\n for (let i = 0; i < len; i += 8) {\n swap(this, i, i + 7)\n swap(this, i + 1, i + 6)\n swap(this, i + 2, i + 5)\n swap(this, i + 3, i + 4)\n }\n return this\n}\n\nBuffer.prototype.toString = function toString () {\n const length = this.length\n if (length === 0) return ''\n if (arguments.length === 0) return utf8Slice(this, 0, length)\n return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.toLocaleString = Buffer.prototype.toString\n\nBuffer.prototype.equals = function equals (b) {\n if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n if (this === b) return true\n return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n let str = ''\n const max = exports.INSPECT_MAX_BYTES\n str = this.toString('hex', 0, max).replace(/(.{2})/g, '$1 ').trim()\n if (this.length > max) str += ' ... '\n return ''\n}\nif (customInspectSymbol) {\n Buffer.prototype[customInspectSymbol] = Buffer.prototype.inspect\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n if (isInstance(target, Uint8Array)) {\n target = Buffer.from(target, target.offset, target.byteLength)\n }\n if (!Buffer.isBuffer(target)) {\n throw new TypeError(\n 'The \"target\" argument must be one of type Buffer or Uint8Array. ' +\n 'Received type ' + (typeof target)\n )\n }\n\n if (start === undefined) {\n start = 0\n }\n if (end === undefined) {\n end = target ? target.length : 0\n }\n if (thisStart === undefined) {\n thisStart = 0\n }\n if (thisEnd === undefined) {\n thisEnd = this.length\n }\n\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError('out of range index')\n }\n\n if (thisStart >= thisEnd && start >= end) {\n return 0\n }\n if (thisStart >= thisEnd) {\n return -1\n }\n if (start >= end) {\n return 1\n }\n\n start >>>= 0\n end >>>= 0\n thisStart >>>= 0\n thisEnd >>>= 0\n\n if (this === target) return 0\n\n let x = thisEnd - thisStart\n let y = end - start\n const len = Math.min(x, y)\n\n const thisCopy = this.slice(thisStart, thisEnd)\n const targetCopy = target.slice(start, end)\n\n for (let i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i]\n y = targetCopy[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (numberIsNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [val], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n let indexSize = 1\n let arrLength = arr.length\n let valLength = val.length\n\n if (encoding !== undefined) {\n encoding = String(encoding).toLowerCase()\n if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n encoding === 'utf16le' || encoding === 'utf-16le') {\n if (arr.length < 2 || val.length < 2) {\n return -1\n }\n indexSize = 2\n arrLength /= 2\n valLength /= 2\n byteOffset /= 2\n }\n }\n\n function read (buf, i) {\n if (indexSize === 1) {\n return buf[i]\n } else {\n return buf.readUInt16BE(i * indexSize)\n }\n }\n\n let i\n if (dir) {\n let foundIndex = -1\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1) foundIndex = i\n if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n } else {\n if (foundIndex !== -1) i -= i - foundIndex\n foundIndex = -1\n }\n }\n } else {\n if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n for (i = byteOffset; i >= 0; i--) {\n let found = true\n for (let j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false\n break\n }\n }\n if (found) return i\n }\n }\n\n return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n offset = Number(offset) || 0\n const remaining = buf.length - offset\n if (!length) {\n length = remaining\n } else {\n length = Number(length)\n if (length > remaining) {\n length = remaining\n }\n }\n\n const strLen = string.length\n\n if (length > strLen / 2) {\n length = strLen / 2\n }\n let i\n for (i = 0; i < length; ++i) {\n const parsed = parseInt(string.substr(i * 2, 2), 16)\n if (numberIsNaN(parsed)) return i\n buf[offset + i] = parsed\n }\n return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n // Buffer#write(string)\n if (offset === undefined) {\n encoding = 'utf8'\n length = this.length\n offset = 0\n // Buffer#write(string, encoding)\n } else if (length === undefined && typeof offset === 'string') {\n encoding = offset\n length = this.length\n offset = 0\n // Buffer#write(string, offset[, length][, encoding])\n } else if (isFinite(offset)) {\n offset = offset >>> 0\n if (isFinite(length)) {\n length = length >>> 0\n if (encoding === undefined) encoding = 'utf8'\n } else {\n encoding = length\n length = undefined\n }\n } else {\n throw new Error(\n 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n )\n }\n\n const remaining = this.length - offset\n if (length === undefined || length > remaining) length = remaining\n\n if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n throw new RangeError('Attempt to write outside buffer bounds')\n }\n\n if (!encoding) encoding = 'utf8'\n\n let loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'hex':\n return hexWrite(this, string, offset, length)\n\n case 'utf8':\n case 'utf-8':\n return utf8Write(this, string, offset, length)\n\n case 'ascii':\n case 'latin1':\n case 'binary':\n return asciiWrite(this, string, offset, length)\n\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return base64Write(this, string, offset, length)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return ucs2Write(this, string, offset, length)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0)\n }\n}\n\nfunction base64Slice (buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf)\n } else {\n return base64.fromByteArray(buf.slice(start, end))\n }\n}\n\nfunction utf8Slice (buf, start, end) {\n end = Math.min(buf.length, end)\n const res = []\n\n let i = start\n while (i < end) {\n const firstByte = buf[i]\n let codePoint = null\n let bytesPerSequence = (firstByte > 0xEF)\n ? 4\n : (firstByte > 0xDF)\n ? 3\n : (firstByte > 0xBF)\n ? 2\n : 1\n\n if (i + bytesPerSequence <= end) {\n let secondByte, thirdByte, fourthByte, tempCodePoint\n\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 0x80) {\n codePoint = firstByte\n }\n break\n case 2:\n secondByte = buf[i + 1]\n if ((secondByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n if (tempCodePoint > 0x7F) {\n codePoint = tempCodePoint\n }\n }\n break\n case 3:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n codePoint = tempCodePoint\n }\n }\n break\n case 4:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n fourthByte = buf[i + 3]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n codePoint = tempCodePoint\n }\n }\n }\n }\n\n if (codePoint === null) {\n // we did not generate a valid codePoint so insert a\n // replacement char (U+FFFD) and advance only 1 byte\n codePoint = 0xFFFD\n bytesPerSequence = 1\n } else if (codePoint > 0xFFFF) {\n // encode to utf16 (surrogate pair dance)\n codePoint -= 0x10000\n res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n codePoint = 0xDC00 | codePoint & 0x3FF\n }\n\n res.push(codePoint)\n i += bytesPerSequence\n }\n\n return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nconst MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n const len = codePoints.length\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n }\n\n // Decode in chunks to avoid \"call stack size exceeded\".\n let res = ''\n let i = 0\n while (i < len) {\n res += String.fromCharCode.apply(\n String,\n codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n )\n }\n return res\n}\n\nfunction asciiSlice (buf, start, end) {\n let ret = ''\n end = Math.min(buf.length, end)\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F)\n }\n return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n let ret = ''\n end = Math.min(buf.length, end)\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i])\n }\n return ret\n}\n\nfunction hexSlice (buf, start, end) {\n const len = buf.length\n\n if (!start || start < 0) start = 0\n if (!end || end < 0 || end > len) end = len\n\n let out = ''\n for (let i = start; i < end; ++i) {\n out += hexSliceLookupTable[buf[i]]\n }\n return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n const bytes = buf.slice(start, end)\n let res = ''\n // If bytes.length is odd, the last 8 bits must be ignored (same as node.js)\n for (let i = 0; i < bytes.length - 1; i += 2) {\n res += String.fromCharCode(bytes[i] + (bytes[i + 1] * 256))\n }\n return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n const len = this.length\n start = ~~start\n end = end === undefined ? len : ~~end\n\n if (start < 0) {\n start += len\n if (start < 0) start = 0\n } else if (start > len) {\n start = len\n }\n\n if (end < 0) {\n end += len\n if (end < 0) end = 0\n } else if (end > len) {\n end = len\n }\n\n if (end < start) end = start\n\n const newBuf = this.subarray(start, end)\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(newBuf, Buffer.prototype)\n\n return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUintLE =\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let val = this[offset]\n let mul = 1\n let i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUintBE =\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n checkOffset(offset, byteLength, this.length)\n }\n\n let val = this[offset + --byteLength]\n let mul = 1\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUint8 =\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n return this[offset]\n}\n\nBuffer.prototype.readUint16LE =\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUint16BE =\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUint32LE =\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return ((this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16)) +\n (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUint32BE =\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] * 0x1000000) +\n ((this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n this[offset + 3])\n}\n\nBuffer.prototype.readBigUInt64LE = defineBigIntMethod(function readBigUInt64LE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const lo = first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24\n\n const hi = this[++offset] +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n last * 2 ** 24\n\n return BigInt(lo) + (BigInt(hi) << BigInt(32))\n})\n\nBuffer.prototype.readBigUInt64BE = defineBigIntMethod(function readBigUInt64BE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const hi = first * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset]\n\n const lo = this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last\n\n return (BigInt(hi) << BigInt(32)) + BigInt(lo)\n})\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let val = this[offset]\n let mul = 1\n let i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let i = byteLength\n let mul = 1\n let val = this[offset + --i]\n while (i > 0 && (mul *= 0x100)) {\n val += this[offset + --i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n if (!(this[offset] & 0x80)) return (this[offset])\n return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n const val = this[offset] | (this[offset + 1] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n const val = this[offset + 1] | (this[offset] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16) |\n (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] << 24) |\n (this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n (this[offset + 3])\n}\n\nBuffer.prototype.readBigInt64LE = defineBigIntMethod(function readBigInt64LE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const val = this[offset + 4] +\n this[offset + 5] * 2 ** 8 +\n this[offset + 6] * 2 ** 16 +\n (last << 24) // Overflow\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24)\n})\n\nBuffer.prototype.readBigInt64BE = defineBigIntMethod(function readBigInt64BE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const val = (first << 24) + // Overflow\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset]\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last)\n})\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUintLE =\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n let mul = 1\n let i = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUintBE =\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n let i = byteLength - 1\n let mul = 1\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUint8 =\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeUint16LE =\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeUint16BE =\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeUint32LE =\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset + 3] = (value >>> 24)\n this[offset + 2] = (value >>> 16)\n this[offset + 1] = (value >>> 8)\n this[offset] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeUint32BE =\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nfunction wrtBigUInt64LE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7)\n\n let lo = Number(value & BigInt(0xffffffff))\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n return offset\n}\n\nfunction wrtBigUInt64BE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7)\n\n let lo = Number(value & BigInt(0xffffffff))\n buf[offset + 7] = lo\n lo = lo >> 8\n buf[offset + 6] = lo\n lo = lo >> 8\n buf[offset + 5] = lo\n lo = lo >> 8\n buf[offset + 4] = lo\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n buf[offset + 3] = hi\n hi = hi >> 8\n buf[offset + 2] = hi\n hi = hi >> 8\n buf[offset + 1] = hi\n hi = hi >> 8\n buf[offset] = hi\n return offset + 8\n}\n\nBuffer.prototype.writeBigUInt64LE = defineBigIntMethod(function writeBigUInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeBigUInt64BE = defineBigIntMethod(function writeBigUInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n let i = 0\n let mul = 1\n let sub = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n let i = byteLength - 1\n let mul = 1\n let sub = 0\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n if (value < 0) value = 0xff + value + 1\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n this[offset + 2] = (value >>> 16)\n this[offset + 3] = (value >>> 24)\n return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (value < 0) value = 0xffffffff + value + 1\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeBigInt64LE = defineBigIntMethod(function writeBigInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nBuffer.prototype.writeBigInt64BE = defineBigIntMethod(function writeBigInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n }\n ieee754.write(buf, value, offset, littleEndian, 23, 4)\n return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n }\n ieee754.write(buf, value, offset, littleEndian, 52, 8)\n return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n if (!Buffer.isBuffer(target)) throw new TypeError('argument should be a Buffer')\n if (!start) start = 0\n if (!end && end !== 0) end = this.length\n if (targetStart >= target.length) targetStart = target.length\n if (!targetStart) targetStart = 0\n if (end > 0 && end < start) end = start\n\n // Copy 0 bytes; we're done\n if (end === start) return 0\n if (target.length === 0 || this.length === 0) return 0\n\n // Fatal error conditions\n if (targetStart < 0) {\n throw new RangeError('targetStart out of bounds')\n }\n if (start < 0 || start >= this.length) throw new RangeError('Index out of range')\n if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n // Are we oob?\n if (end > this.length) end = this.length\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start\n }\n\n const len = end - start\n\n if (this === target && typeof Uint8Array.prototype.copyWithin === 'function') {\n // Use built-in when available, missing from IE11\n this.copyWithin(targetStart, start, end)\n } else {\n Uint8Array.prototype.set.call(\n target,\n this.subarray(start, end),\n targetStart\n )\n }\n\n return len\n}\n\n// Usage:\n// buffer.fill(number[, offset[, end]])\n// buffer.fill(buffer[, offset[, end]])\n// buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n // Handle string cases:\n if (typeof val === 'string') {\n if (typeof start === 'string') {\n encoding = start\n start = 0\n end = this.length\n } else if (typeof end === 'string') {\n encoding = end\n end = this.length\n }\n if (encoding !== undefined && typeof encoding !== 'string') {\n throw new TypeError('encoding must be a string')\n }\n if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n if (val.length === 1) {\n const code = val.charCodeAt(0)\n if ((encoding === 'utf8' && code < 128) ||\n encoding === 'latin1') {\n // Fast path: If `val` fits into a single byte, use that numeric value.\n val = code\n }\n }\n } else if (typeof val === 'number') {\n val = val & 255\n } else if (typeof val === 'boolean') {\n val = Number(val)\n }\n\n // Invalid ranges are not set to a default, so can range check early.\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError('Out of range index')\n }\n\n if (end <= start) {\n return this\n }\n\n start = start >>> 0\n end = end === undefined ? this.length : end >>> 0\n\n if (!val) val = 0\n\n let i\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val\n }\n } else {\n const bytes = Buffer.isBuffer(val)\n ? val\n : Buffer.from(val, encoding)\n const len = bytes.length\n if (len === 0) {\n throw new TypeError('The value \"' + val +\n '\" is invalid for argument \"value\"')\n }\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len]\n }\n }\n\n return this\n}\n\n// CUSTOM ERRORS\n// =============\n\n// Simplified versions from Node, changed for Buffer-only usage\nconst errors = {}\nfunction E (sym, getMessage, Base) {\n errors[sym] = class NodeError extends Base {\n constructor () {\n super()\n\n Object.defineProperty(this, 'message', {\n value: getMessage.apply(this, arguments),\n writable: true,\n configurable: true\n })\n\n // Add the error code to the name to include it in the stack trace.\n this.name = `${this.name} [${sym}]`\n // Access the stack to generate the error message including the error code\n // from the name.\n this.stack // eslint-disable-line no-unused-expressions\n // Reset the name to the actual name.\n delete this.name\n }\n\n get code () {\n return sym\n }\n\n set code (value) {\n Object.defineProperty(this, 'code', {\n configurable: true,\n enumerable: true,\n value,\n writable: true\n })\n }\n\n toString () {\n return `${this.name} [${sym}]: ${this.message}`\n }\n }\n}\n\nE('ERR_BUFFER_OUT_OF_BOUNDS',\n function (name) {\n if (name) {\n return `${name} is outside of buffer bounds`\n }\n\n return 'Attempt to access memory outside buffer bounds'\n }, RangeError)\nE('ERR_INVALID_ARG_TYPE',\n function (name, actual) {\n return `The \"${name}\" argument must be of type number. Received type ${typeof actual}`\n }, TypeError)\nE('ERR_OUT_OF_RANGE',\n function (str, range, input) {\n let msg = `The value of \"${str}\" is out of range.`\n let received = input\n if (Number.isInteger(input) && Math.abs(input) > 2 ** 32) {\n received = addNumericalSeparator(String(input))\n } else if (typeof input === 'bigint') {\n received = String(input)\n if (input > BigInt(2) ** BigInt(32) || input < -(BigInt(2) ** BigInt(32))) {\n received = addNumericalSeparator(received)\n }\n received += 'n'\n }\n msg += ` It must be ${range}. Received ${received}`\n return msg\n }, RangeError)\n\nfunction addNumericalSeparator (val) {\n let res = ''\n let i = val.length\n const start = val[0] === '-' ? 1 : 0\n for (; i >= start + 4; i -= 3) {\n res = `_${val.slice(i - 3, i)}${res}`\n }\n return `${val.slice(0, i)}${res}`\n}\n\n// CHECK FUNCTIONS\n// ===============\n\nfunction checkBounds (buf, offset, byteLength) {\n validateNumber(offset, 'offset')\n if (buf[offset] === undefined || buf[offset + byteLength] === undefined) {\n boundsError(offset, buf.length - (byteLength + 1))\n }\n}\n\nfunction checkIntBI (value, min, max, buf, offset, byteLength) {\n if (value > max || value < min) {\n const n = typeof min === 'bigint' ? 'n' : ''\n let range\n if (byteLength > 3) {\n if (min === 0 || min === BigInt(0)) {\n range = `>= 0${n} and < 2${n} ** ${(byteLength + 1) * 8}${n}`\n } else {\n range = `>= -(2${n} ** ${(byteLength + 1) * 8 - 1}${n}) and < 2 ** ` +\n `${(byteLength + 1) * 8 - 1}${n}`\n }\n } else {\n range = `>= ${min}${n} and <= ${max}${n}`\n }\n throw new errors.ERR_OUT_OF_RANGE('value', range, value)\n }\n checkBounds(buf, offset, byteLength)\n}\n\nfunction validateNumber (value, name) {\n if (typeof value !== 'number') {\n throw new errors.ERR_INVALID_ARG_TYPE(name, 'number', value)\n }\n}\n\nfunction boundsError (value, length, type) {\n if (Math.floor(value) !== value) {\n validateNumber(value, type)\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset', 'an integer', value)\n }\n\n if (length < 0) {\n throw new errors.ERR_BUFFER_OUT_OF_BOUNDS()\n }\n\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset',\n `>= ${type ? 1 : 0} and <= ${length}`,\n value)\n}\n\n// HELPER FUNCTIONS\n// ================\n\nconst INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n // Node takes equal signs as end of the Base64 encoding\n str = str.split('=')[0]\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = str.trim().replace(INVALID_BASE64_RE, '')\n // Node converts strings with length < 2 to ''\n if (str.length < 2) return ''\n // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n while (str.length % 4 !== 0) {\n str = str + '='\n }\n return str\n}\n\nfunction utf8ToBytes (string, units) {\n units = units || Infinity\n let codePoint\n const length = string.length\n let leadSurrogate = null\n const bytes = []\n\n for (let i = 0; i < length; ++i) {\n codePoint = string.charCodeAt(i)\n\n // is surrogate component\n if (codePoint > 0xD7FF && codePoint < 0xE000) {\n // last char was a lead\n if (!leadSurrogate) {\n // no lead yet\n if (codePoint > 0xDBFF) {\n // unexpected trail\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n } else if (i + 1 === length) {\n // unpaired lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n }\n\n // valid lead\n leadSurrogate = codePoint\n\n continue\n }\n\n // 2 leads in a row\n if (codePoint < 0xDC00) {\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n leadSurrogate = codePoint\n continue\n }\n\n // valid surrogate pair\n codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n } else if (leadSurrogate) {\n // valid bmp char, but last char was a lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n }\n\n leadSurrogate = null\n\n // encode utf8\n if (codePoint < 0x80) {\n if ((units -= 1) < 0) break\n bytes.push(codePoint)\n } else if (codePoint < 0x800) {\n if ((units -= 2) < 0) break\n bytes.push(\n codePoint >> 0x6 | 0xC0,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x10000) {\n if ((units -= 3) < 0) break\n bytes.push(\n codePoint >> 0xC | 0xE0,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x110000) {\n if ((units -= 4) < 0) break\n bytes.push(\n codePoint >> 0x12 | 0xF0,\n codePoint >> 0xC & 0x3F | 0x80,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else {\n throw new Error('Invalid code point')\n }\n }\n\n return bytes\n}\n\nfunction asciiToBytes (str) {\n const byteArray = []\n for (let i = 0; i < str.length; ++i) {\n // Node's code seems to be doing this and not & 0x7F..\n byteArray.push(str.charCodeAt(i) & 0xFF)\n }\n return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n let c, hi, lo\n const byteArray = []\n for (let i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0) break\n\n c = str.charCodeAt(i)\n hi = c >> 8\n lo = c % 256\n byteArray.push(lo)\n byteArray.push(hi)\n }\n\n return byteArray\n}\n\nfunction base64ToBytes (str) {\n return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n let i\n for (i = 0; i < length; ++i) {\n if ((i + offset >= dst.length) || (i >= src.length)) break\n dst[i + offset] = src[i]\n }\n return i\n}\n\n// ArrayBuffer or Uint8Array objects from other contexts (i.e. iframes) do not pass\n// the `instanceof` check but they should be treated as of that type.\n// See: https://github.com/feross/buffer/issues/166\nfunction isInstance (obj, type) {\n return obj instanceof type ||\n (obj != null && obj.constructor != null && obj.constructor.name != null &&\n obj.constructor.name === type.name)\n}\nfunction numberIsNaN (obj) {\n // For IE11 support\n return obj !== obj // eslint-disable-line no-self-compare\n}\n\n// Create lookup table for `toString('hex')`\n// See: https://github.com/feross/buffer/issues/219\nconst hexSliceLookupTable = (function () {\n const alphabet = '0123456789abcdef'\n const table = new Array(256)\n for (let i = 0; i < 16; ++i) {\n const i16 = i * 16\n for (let j = 0; j < 16; ++j) {\n table[i16 + j] = alphabet[i] + alphabet[j]\n }\n }\n return table\n})()\n\n// Return not function with Error if BigInt not supported\nfunction defineBigIntMethod (fn) {\n return typeof BigInt === 'undefined' ? BufferBigIntNotDefined : fn\n}\n\nfunction BufferBigIntNotDefined () {\n throw new Error('BigInt not supported')\n}\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\nvar R = typeof Reflect === 'object' ? Reflect : null\nvar ReflectApply = R && typeof R.apply === 'function'\n ? R.apply\n : function ReflectApply(target, receiver, args) {\n return Function.prototype.apply.call(target, receiver, args);\n }\n\nvar ReflectOwnKeys\nif (R && typeof R.ownKeys === 'function') {\n ReflectOwnKeys = R.ownKeys\n} else if (Object.getOwnPropertySymbols) {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target)\n .concat(Object.getOwnPropertySymbols(target));\n };\n} else {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target);\n };\n}\n\nfunction ProcessEmitWarning(warning) {\n if (console && console.warn) console.warn(warning);\n}\n\nvar NumberIsNaN = Number.isNaN || function NumberIsNaN(value) {\n return value !== value;\n}\n\nfunction EventEmitter() {\n EventEmitter.init.call(this);\n}\nmodule.exports = EventEmitter;\nmodule.exports.once = once;\n\n// Backwards-compat with node 0.10.x\nEventEmitter.EventEmitter = EventEmitter;\n\nEventEmitter.prototype._events = undefined;\nEventEmitter.prototype._eventsCount = 0;\nEventEmitter.prototype._maxListeners = undefined;\n\n// By default EventEmitters will print a warning if more than 10 listeners are\n// added to it. This is a useful default which helps finding memory leaks.\nvar defaultMaxListeners = 10;\n\nfunction checkListener(listener) {\n if (typeof listener !== 'function') {\n throw new TypeError('The \"listener\" argument must be of type Function. Received type ' + typeof listener);\n }\n}\n\nObject.defineProperty(EventEmitter, 'defaultMaxListeners', {\n enumerable: true,\n get: function() {\n return defaultMaxListeners;\n },\n set: function(arg) {\n if (typeof arg !== 'number' || arg < 0 || NumberIsNaN(arg)) {\n throw new RangeError('The value of \"defaultMaxListeners\" is out of range. It must be a non-negative number. Received ' + arg + '.');\n }\n defaultMaxListeners = arg;\n }\n});\n\nEventEmitter.init = function() {\n\n if (this._events === undefined ||\n this._events === Object.getPrototypeOf(this)._events) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n }\n\n this._maxListeners = this._maxListeners || undefined;\n};\n\n// Obviously not all Emitters should be limited to 10. This function allows\n// that to be increased. Set to zero for unlimited.\nEventEmitter.prototype.setMaxListeners = function setMaxListeners(n) {\n if (typeof n !== 'number' || n < 0 || NumberIsNaN(n)) {\n throw new RangeError('The value of \"n\" is out of range. It must be a non-negative number. Received ' + n + '.');\n }\n this._maxListeners = n;\n return this;\n};\n\nfunction _getMaxListeners(that) {\n if (that._maxListeners === undefined)\n return EventEmitter.defaultMaxListeners;\n return that._maxListeners;\n}\n\nEventEmitter.prototype.getMaxListeners = function getMaxListeners() {\n return _getMaxListeners(this);\n};\n\nEventEmitter.prototype.emit = function emit(type) {\n var args = [];\n for (var i = 1; i < arguments.length; i++) args.push(arguments[i]);\n var doError = (type === 'error');\n\n var events = this._events;\n if (events !== undefined)\n doError = (doError && events.error === undefined);\n else if (!doError)\n return false;\n\n // If there is no 'error' event listener then throw.\n if (doError) {\n var er;\n if (args.length > 0)\n er = args[0];\n if (er instanceof Error) {\n // Note: The comments on the `throw` lines are intentional, they show\n // up in Node's output if this results in an unhandled exception.\n throw er; // Unhandled 'error' event\n }\n // At least give some kind of context to the user\n var err = new Error('Unhandled error.' + (er ? ' (' + er.message + ')' : ''));\n err.context = er;\n throw err; // Unhandled 'error' event\n }\n\n var handler = events[type];\n\n if (handler === undefined)\n return false;\n\n if (typeof handler === 'function') {\n ReflectApply(handler, this, args);\n } else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n ReflectApply(listeners[i], this, args);\n }\n\n return true;\n};\n\nfunction _addListener(target, type, listener, prepend) {\n var m;\n var events;\n var existing;\n\n checkListener(listener);\n\n events = target._events;\n if (events === undefined) {\n events = target._events = Object.create(null);\n target._eventsCount = 0;\n } else {\n // To avoid recursion in the case that type === \"newListener\"! Before\n // adding it to the listeners, first emit \"newListener\".\n if (events.newListener !== undefined) {\n target.emit('newListener', type,\n listener.listener ? listener.listener : listener);\n\n // Re-assign `events` because a newListener handler could have caused the\n // this._events to be assigned to a new object\n events = target._events;\n }\n existing = events[type];\n }\n\n if (existing === undefined) {\n // Optimize the case of one listener. Don't need the extra array object.\n existing = events[type] = listener;\n ++target._eventsCount;\n } else {\n if (typeof existing === 'function') {\n // Adding the second element, need to change to array.\n existing = events[type] =\n prepend ? [listener, existing] : [existing, listener];\n // If we've already got an array, just append.\n } else if (prepend) {\n existing.unshift(listener);\n } else {\n existing.push(listener);\n }\n\n // Check for listener leak\n m = _getMaxListeners(target);\n if (m > 0 && existing.length > m && !existing.warned) {\n existing.warned = true;\n // No error code for this since it is a Warning\n // eslint-disable-next-line no-restricted-syntax\n var w = new Error('Possible EventEmitter memory leak detected. ' +\n existing.length + ' ' + String(type) + ' listeners ' +\n 'added. Use emitter.setMaxListeners() to ' +\n 'increase limit');\n w.name = 'MaxListenersExceededWarning';\n w.emitter = target;\n w.type = type;\n w.count = existing.length;\n ProcessEmitWarning(w);\n }\n }\n\n return target;\n}\n\nEventEmitter.prototype.addListener = function addListener(type, listener) {\n return _addListener(this, type, listener, false);\n};\n\nEventEmitter.prototype.on = EventEmitter.prototype.addListener;\n\nEventEmitter.prototype.prependListener =\n function prependListener(type, listener) {\n return _addListener(this, type, listener, true);\n };\n\nfunction onceWrapper() {\n if (!this.fired) {\n this.target.removeListener(this.type, this.wrapFn);\n this.fired = true;\n if (arguments.length === 0)\n return this.listener.call(this.target);\n return this.listener.apply(this.target, arguments);\n }\n}\n\nfunction _onceWrap(target, type, listener) {\n var state = { fired: false, wrapFn: undefined, target: target, type: type, listener: listener };\n var wrapped = onceWrapper.bind(state);\n wrapped.listener = listener;\n state.wrapFn = wrapped;\n return wrapped;\n}\n\nEventEmitter.prototype.once = function once(type, listener) {\n checkListener(listener);\n this.on(type, _onceWrap(this, type, listener));\n return this;\n};\n\nEventEmitter.prototype.prependOnceListener =\n function prependOnceListener(type, listener) {\n checkListener(listener);\n this.prependListener(type, _onceWrap(this, type, listener));\n return this;\n };\n\n// Emits a 'removeListener' event if and only if the listener was removed.\nEventEmitter.prototype.removeListener =\n function removeListener(type, listener) {\n var list, events, position, i, originalListener;\n\n checkListener(listener);\n\n events = this._events;\n if (events === undefined)\n return this;\n\n list = events[type];\n if (list === undefined)\n return this;\n\n if (list === listener || list.listener === listener) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else {\n delete events[type];\n if (events.removeListener)\n this.emit('removeListener', type, list.listener || listener);\n }\n } else if (typeof list !== 'function') {\n position = -1;\n\n for (i = list.length - 1; i >= 0; i--) {\n if (list[i] === listener || list[i].listener === listener) {\n originalListener = list[i].listener;\n position = i;\n break;\n }\n }\n\n if (position < 0)\n return this;\n\n if (position === 0)\n list.shift();\n else {\n spliceOne(list, position);\n }\n\n if (list.length === 1)\n events[type] = list[0];\n\n if (events.removeListener !== undefined)\n this.emit('removeListener', type, originalListener || listener);\n }\n\n return this;\n };\n\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\n\nEventEmitter.prototype.removeAllListeners =\n function removeAllListeners(type) {\n var listeners, events, i;\n\n events = this._events;\n if (events === undefined)\n return this;\n\n // not listening for removeListener, no need to emit\n if (events.removeListener === undefined) {\n if (arguments.length === 0) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n } else if (events[type] !== undefined) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else\n delete events[type];\n }\n return this;\n }\n\n // emit removeListener for all listeners on all events\n if (arguments.length === 0) {\n var keys = Object.keys(events);\n var key;\n for (i = 0; i < keys.length; ++i) {\n key = keys[i];\n if (key === 'removeListener') continue;\n this.removeAllListeners(key);\n }\n this.removeAllListeners('removeListener');\n this._events = Object.create(null);\n this._eventsCount = 0;\n return this;\n }\n\n listeners = events[type];\n\n if (typeof listeners === 'function') {\n this.removeListener(type, listeners);\n } else if (listeners !== undefined) {\n // LIFO order\n for (i = listeners.length - 1; i >= 0; i--) {\n this.removeListener(type, listeners[i]);\n }\n }\n\n return this;\n };\n\nfunction _listeners(target, type, unwrap) {\n var events = target._events;\n\n if (events === undefined)\n return [];\n\n var evlistener = events[type];\n if (evlistener === undefined)\n return [];\n\n if (typeof evlistener === 'function')\n return unwrap ? [evlistener.listener || evlistener] : [evlistener];\n\n return unwrap ?\n unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length);\n}\n\nEventEmitter.prototype.listeners = function listeners(type) {\n return _listeners(this, type, true);\n};\n\nEventEmitter.prototype.rawListeners = function rawListeners(type) {\n return _listeners(this, type, false);\n};\n\nEventEmitter.listenerCount = function(emitter, type) {\n if (typeof emitter.listenerCount === 'function') {\n return emitter.listenerCount(type);\n } else {\n return listenerCount.call(emitter, type);\n }\n};\n\nEventEmitter.prototype.listenerCount = listenerCount;\nfunction listenerCount(type) {\n var events = this._events;\n\n if (events !== undefined) {\n var evlistener = events[type];\n\n if (typeof evlistener === 'function') {\n return 1;\n } else if (evlistener !== undefined) {\n return evlistener.length;\n }\n }\n\n return 0;\n}\n\nEventEmitter.prototype.eventNames = function eventNames() {\n return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : [];\n};\n\nfunction arrayClone(arr, n) {\n var copy = new Array(n);\n for (var i = 0; i < n; ++i)\n copy[i] = arr[i];\n return copy;\n}\n\nfunction spliceOne(list, index) {\n for (; index + 1 < list.length; index++)\n list[index] = list[index + 1];\n list.pop();\n}\n\nfunction unwrapListeners(arr) {\n var ret = new Array(arr.length);\n for (var i = 0; i < ret.length; ++i) {\n ret[i] = arr[i].listener || arr[i];\n }\n return ret;\n}\n\nfunction once(emitter, name) {\n return new Promise(function (resolve, reject) {\n function errorListener(err) {\n emitter.removeListener(name, resolver);\n reject(err);\n }\n\n function resolver() {\n if (typeof emitter.removeListener === 'function') {\n emitter.removeListener('error', errorListener);\n }\n resolve([].slice.call(arguments));\n };\n\n eventTargetAgnosticAddListener(emitter, name, resolver, { once: true });\n if (name !== 'error') {\n addErrorHandlerIfEventEmitter(emitter, errorListener, { once: true });\n }\n });\n}\n\nfunction addErrorHandlerIfEventEmitter(emitter, handler, flags) {\n if (typeof emitter.on === 'function') {\n eventTargetAgnosticAddListener(emitter, 'error', handler, flags);\n }\n}\n\nfunction eventTargetAgnosticAddListener(emitter, name, listener, flags) {\n if (typeof emitter.on === 'function') {\n if (flags.once) {\n emitter.once(name, listener);\n } else {\n emitter.on(name, listener);\n }\n } else if (typeof emitter.addEventListener === 'function') {\n // EventTarget does not have `error` event semantics like Node\n // EventEmitters, we do not listen for `error` events here.\n emitter.addEventListener(name, function wrapListener(arg) {\n // IE does not have builtin `{ once: true }` support so we\n // have to do it manually.\n if (flags.once) {\n emitter.removeEventListener(name, wrapListener);\n }\n listener(arg);\n });\n } else {\n throw new TypeError('The \"emitter\" argument must be of type EventEmitter. Received type ' + typeof emitter);\n }\n}\n","/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */\nexports.read = function (buffer, offset, isLE, mLen, nBytes) {\n var e, m\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var nBits = -7\n var i = isLE ? (nBytes - 1) : 0\n var d = isLE ? -1 : 1\n var s = buffer[offset + i]\n\n i += d\n\n e = s & ((1 << (-nBits)) - 1)\n s >>= (-nBits)\n nBits += eLen\n for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & ((1 << (-nBits)) - 1)\n e >>= (-nBits)\n nBits += mLen\n for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias\n } else if (e === eMax) {\n return m ? NaN : ((s ? -1 : 1) * Infinity)\n } else {\n m = m + Math.pow(2, mLen)\n e = e - eBias\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n var i = isLE ? 0 : (nBytes - 1)\n var d = isLE ? 1 : -1\n var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n value = Math.abs(value)\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0\n e = eMax\n } else {\n e = Math.floor(Math.log(value) / Math.LN2)\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--\n c *= 2\n }\n if (e + eBias >= 1) {\n value += rt / c\n } else {\n value += rt * Math.pow(2, 1 - eBias)\n }\n if (value * c >= 2) {\n e++\n c /= 2\n }\n\n if (e + eBias >= eMax) {\n m = 0\n e = eMax\n } else if (e + eBias >= 1) {\n m = ((value * c) - 1) * Math.pow(2, mLen)\n e = e + eBias\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n e = 0\n }\n }\n\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n e = (e << mLen) | m\n eLen += mLen\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128\n}\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView');\n\nmodule.exports = DataView;\n","var hashClear = require('./_hashClear'),\n hashDelete = require('./_hashDelete'),\n hashGet = require('./_hashGet'),\n hashHas = require('./_hashHas'),\n hashSet = require('./_hashSet');\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\nmodule.exports = Hash;\n","var listCacheClear = require('./_listCacheClear'),\n listCacheDelete = require('./_listCacheDelete'),\n listCacheGet = require('./_listCacheGet'),\n listCacheHas = require('./_listCacheHas'),\n listCacheSet = require('./_listCacheSet');\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\nmodule.exports = ListCache;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map');\n\nmodule.exports = Map;\n","var mapCacheClear = require('./_mapCacheClear'),\n mapCacheDelete = require('./_mapCacheDelete'),\n mapCacheGet = require('./_mapCacheGet'),\n mapCacheHas = require('./_mapCacheHas'),\n mapCacheSet = require('./_mapCacheSet');\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\nmodule.exports = MapCache;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Promise = getNative(root, 'Promise');\n\nmodule.exports = Promise;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Set = getNative(root, 'Set');\n\nmodule.exports = Set;\n","var MapCache = require('./_MapCache'),\n setCacheAdd = require('./_setCacheAdd'),\n setCacheHas = require('./_setCacheHas');\n\n/**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\nfunction SetCache(values) {\n var index = -1,\n length = values == null ? 0 : values.length;\n\n this.__data__ = new MapCache;\n while (++index < length) {\n this.add(values[index]);\n }\n}\n\n// Add methods to `SetCache`.\nSetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\nSetCache.prototype.has = setCacheHas;\n\nmodule.exports = SetCache;\n","var ListCache = require('./_ListCache'),\n stackClear = require('./_stackClear'),\n stackDelete = require('./_stackDelete'),\n stackGet = require('./_stackGet'),\n stackHas = require('./_stackHas'),\n stackSet = require('./_stackSet');\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\nmodule.exports = Stack;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Uint8Array = root.Uint8Array;\n\nmodule.exports = Uint8Array;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar WeakMap = getNative(root, 'WeakMap');\n\nmodule.exports = WeakMap;\n","/**\n * A specialized version of `_.forEach` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\nfunction arrayEach(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (iteratee(array[index], index, array) === false) {\n break;\n }\n }\n return array;\n}\n\nmodule.exports = arrayEach;\n","/**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\nfunction arrayFilter(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result[resIndex++] = value;\n }\n }\n return result;\n}\n\nmodule.exports = arrayFilter;\n","var baseTimes = require('./_baseTimes'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isIndex = require('./_isIndex'),\n isTypedArray = require('./isTypedArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = arrayLikeKeys;\n","/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n}\n\nmodule.exports = arrayPush;\n","/**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\nfunction arraySome(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (predicate(array[index], index, array)) {\n return true;\n }\n }\n return false;\n}\n\nmodule.exports = arraySome;\n","var baseAssignValue = require('./_baseAssignValue'),\n eq = require('./eq');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\nmodule.exports = assignValue;\n","var eq = require('./eq');\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\nmodule.exports = assocIndexOf;\n","var copyObject = require('./_copyObject'),\n keys = require('./keys');\n\n/**\n * The base implementation of `_.assign` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssign(object, source) {\n return object && copyObject(source, keys(source), object);\n}\n\nmodule.exports = baseAssign;\n","var copyObject = require('./_copyObject'),\n keysIn = require('./keysIn');\n\n/**\n * The base implementation of `_.assignIn` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssignIn(object, source) {\n return object && copyObject(source, keysIn(source), object);\n}\n\nmodule.exports = baseAssignIn;\n","var defineProperty = require('./_defineProperty');\n\n/**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction baseAssignValue(object, key, value) {\n if (key == '__proto__' && defineProperty) {\n defineProperty(object, key, {\n 'configurable': true,\n 'enumerable': true,\n 'value': value,\n 'writable': true\n });\n } else {\n object[key] = value;\n }\n}\n\nmodule.exports = baseAssignValue;\n","var Stack = require('./_Stack'),\n arrayEach = require('./_arrayEach'),\n assignValue = require('./_assignValue'),\n baseAssign = require('./_baseAssign'),\n baseAssignIn = require('./_baseAssignIn'),\n cloneBuffer = require('./_cloneBuffer'),\n copyArray = require('./_copyArray'),\n copySymbols = require('./_copySymbols'),\n copySymbolsIn = require('./_copySymbolsIn'),\n getAllKeys = require('./_getAllKeys'),\n getAllKeysIn = require('./_getAllKeysIn'),\n getTag = require('./_getTag'),\n initCloneArray = require('./_initCloneArray'),\n initCloneByTag = require('./_initCloneByTag'),\n initCloneObject = require('./_initCloneObject'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isMap = require('./isMap'),\n isObject = require('./isObject'),\n isSet = require('./isSet'),\n keys = require('./keys'),\n keysIn = require('./keysIn');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_FLAT_FLAG = 2,\n CLONE_SYMBOLS_FLAG = 4;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values supported by `_.clone`. */\nvar cloneableTags = {};\ncloneableTags[argsTag] = cloneableTags[arrayTag] =\ncloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =\ncloneableTags[boolTag] = cloneableTags[dateTag] =\ncloneableTags[float32Tag] = cloneableTags[float64Tag] =\ncloneableTags[int8Tag] = cloneableTags[int16Tag] =\ncloneableTags[int32Tag] = cloneableTags[mapTag] =\ncloneableTags[numberTag] = cloneableTags[objectTag] =\ncloneableTags[regexpTag] = cloneableTags[setTag] =\ncloneableTags[stringTag] = cloneableTags[symbolTag] =\ncloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =\ncloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;\ncloneableTags[errorTag] = cloneableTags[funcTag] =\ncloneableTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.clone` and `_.cloneDeep` which tracks\n * traversed objects.\n *\n * @private\n * @param {*} value The value to clone.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Deep clone\n * 2 - Flatten inherited properties\n * 4 - Clone symbols\n * @param {Function} [customizer] The function to customize cloning.\n * @param {string} [key] The key of `value`.\n * @param {Object} [object] The parent object of `value`.\n * @param {Object} [stack] Tracks traversed objects and their clone counterparts.\n * @returns {*} Returns the cloned value.\n */\nfunction baseClone(value, bitmask, customizer, key, object, stack) {\n var result,\n isDeep = bitmask & CLONE_DEEP_FLAG,\n isFlat = bitmask & CLONE_FLAT_FLAG,\n isFull = bitmask & CLONE_SYMBOLS_FLAG;\n\n if (customizer) {\n result = object ? customizer(value, key, object, stack) : customizer(value);\n }\n if (result !== undefined) {\n return result;\n }\n if (!isObject(value)) {\n return value;\n }\n var isArr = isArray(value);\n if (isArr) {\n result = initCloneArray(value);\n if (!isDeep) {\n return copyArray(value, result);\n }\n } else {\n var tag = getTag(value),\n isFunc = tag == funcTag || tag == genTag;\n\n if (isBuffer(value)) {\n return cloneBuffer(value, isDeep);\n }\n if (tag == objectTag || tag == argsTag || (isFunc && !object)) {\n result = (isFlat || isFunc) ? {} : initCloneObject(value);\n if (!isDeep) {\n return isFlat\n ? copySymbolsIn(value, baseAssignIn(result, value))\n : copySymbols(value, baseAssign(result, value));\n }\n } else {\n if (!cloneableTags[tag]) {\n return object ? value : {};\n }\n result = initCloneByTag(value, tag, isDeep);\n }\n }\n // Check for circular references and return its corresponding clone.\n stack || (stack = new Stack);\n var stacked = stack.get(value);\n if (stacked) {\n return stacked;\n }\n stack.set(value, result);\n\n if (isSet(value)) {\n value.forEach(function(subValue) {\n result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));\n });\n } else if (isMap(value)) {\n value.forEach(function(subValue, key) {\n result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n }\n\n var keysFunc = isFull\n ? (isFlat ? getAllKeysIn : getAllKeys)\n : (isFlat ? keysIn : keys);\n\n var props = isArr ? undefined : keysFunc(value);\n arrayEach(props || value, function(subValue, key) {\n if (props) {\n key = subValue;\n subValue = value[key];\n }\n // Recursively populate clone (susceptible to call stack limits).\n assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n return result;\n}\n\nmodule.exports = baseClone;\n","var isObject = require('./isObject');\n\n/** Built-in value references. */\nvar objectCreate = Object.create;\n\n/**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} proto The object to inherit from.\n * @returns {Object} Returns the new object.\n */\nvar baseCreate = (function() {\n function object() {}\n return function(proto) {\n if (!isObject(proto)) {\n return {};\n }\n if (objectCreate) {\n return objectCreate(proto);\n }\n object.prototype = proto;\n var result = new object;\n object.prototype = undefined;\n return result;\n };\n}());\n\nmodule.exports = baseCreate;\n","var arrayPush = require('./_arrayPush'),\n isArray = require('./isArray');\n\n/**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction baseGetAllKeys(object, keysFunc, symbolsFunc) {\n var result = keysFunc(object);\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n}\n\nmodule.exports = baseGetAllKeys;\n","var Symbol = require('./_Symbol'),\n getRawTag = require('./_getRawTag'),\n objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]';\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\nmodule.exports = baseIsArguments;\n","var baseIsEqualDeep = require('./_baseIsEqualDeep'),\n isObjectLike = require('./isObjectLike');\n\n/**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Unordered comparison\n * 2 - Partial comparison\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\nfunction baseIsEqual(value, other, bitmask, customizer, stack) {\n if (value === other) {\n return true;\n }\n if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\n return value !== value && other !== other;\n }\n return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n}\n\nmodule.exports = baseIsEqual;\n","var Stack = require('./_Stack'),\n equalArrays = require('./_equalArrays'),\n equalByTag = require('./_equalByTag'),\n equalObjects = require('./_equalObjects'),\n getTag = require('./_getTag'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isTypedArray = require('./isTypedArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n var objIsArr = isArray(object),\n othIsArr = isArray(other),\n objTag = objIsArr ? arrayTag : getTag(object),\n othTag = othIsArr ? arrayTag : getTag(other);\n\n objTag = objTag == argsTag ? objectTag : objTag;\n othTag = othTag == argsTag ? objectTag : othTag;\n\n var objIsObj = objTag == objectTag,\n othIsObj = othTag == objectTag,\n isSameTag = objTag == othTag;\n\n if (isSameTag && isBuffer(object)) {\n if (!isBuffer(other)) {\n return false;\n }\n objIsArr = true;\n objIsObj = false;\n }\n if (isSameTag && !objIsObj) {\n stack || (stack = new Stack);\n return (objIsArr || isTypedArray(object))\n ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n }\n if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n if (objIsWrapped || othIsWrapped) {\n var objUnwrapped = objIsWrapped ? object.value() : object,\n othUnwrapped = othIsWrapped ? other.value() : other;\n\n stack || (stack = new Stack);\n return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n }\n }\n if (!isSameTag) {\n return false;\n }\n stack || (stack = new Stack);\n return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n}\n\nmodule.exports = baseIsEqualDeep;\n","var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]';\n\n/**\n * The base implementation of `_.isMap` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n */\nfunction baseIsMap(value) {\n return isObjectLike(value) && getTag(value) == mapTag;\n}\n\nmodule.exports = baseIsMap;\n","var isFunction = require('./isFunction'),\n isMasked = require('./_isMasked'),\n isObject = require('./isObject'),\n toSource = require('./_toSource');\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\nmodule.exports = baseIsNative;\n","var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar setTag = '[object Set]';\n\n/**\n * The base implementation of `_.isSet` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n */\nfunction baseIsSet(value) {\n return isObjectLike(value) && getTag(value) == setTag;\n}\n\nmodule.exports = baseIsSet;\n","var baseGetTag = require('./_baseGetTag'),\n isLength = require('./isLength'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n\nmodule.exports = baseIsTypedArray;\n","var isPrototype = require('./_isPrototype'),\n nativeKeys = require('./_nativeKeys');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeys;\n","var isObject = require('./isObject'),\n isPrototype = require('./_isPrototype'),\n nativeKeysIn = require('./_nativeKeysIn');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeysIn(object) {\n if (!isObject(object)) {\n return nativeKeysIn(object);\n }\n var isProto = isPrototype(object),\n result = [];\n\n for (var key in object) {\n if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeysIn;\n","/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\nmodule.exports = baseTimes;\n","/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n return function(value) {\n return func(value);\n };\n}\n\nmodule.exports = baseUnary;\n","/**\n * Checks if a `cache` value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction cacheHas(cache, key) {\n return cache.has(key);\n}\n\nmodule.exports = cacheHas;\n","var Uint8Array = require('./_Uint8Array');\n\n/**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\nfunction cloneArrayBuffer(arrayBuffer) {\n var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n return result;\n}\n\nmodule.exports = cloneArrayBuffer;\n","var root = require('./_root');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined,\n allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;\n\n/**\n * Creates a clone of `buffer`.\n *\n * @private\n * @param {Buffer} buffer The buffer to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Buffer} Returns the cloned buffer.\n */\nfunction cloneBuffer(buffer, isDeep) {\n if (isDeep) {\n return buffer.slice();\n }\n var length = buffer.length,\n result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\n\n buffer.copy(result);\n return result;\n}\n\nmodule.exports = cloneBuffer;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer');\n\n/**\n * Creates a clone of `dataView`.\n *\n * @private\n * @param {Object} dataView The data view to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned data view.\n */\nfunction cloneDataView(dataView, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;\n return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);\n}\n\nmodule.exports = cloneDataView;\n","/** Used to match `RegExp` flags from their coerced string values. */\nvar reFlags = /\\w*$/;\n\n/**\n * Creates a clone of `regexp`.\n *\n * @private\n * @param {Object} regexp The regexp to clone.\n * @returns {Object} Returns the cloned regexp.\n */\nfunction cloneRegExp(regexp) {\n var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));\n result.lastIndex = regexp.lastIndex;\n return result;\n}\n\nmodule.exports = cloneRegExp;\n","var Symbol = require('./_Symbol');\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * Creates a clone of the `symbol` object.\n *\n * @private\n * @param {Object} symbol The symbol object to clone.\n * @returns {Object} Returns the cloned symbol object.\n */\nfunction cloneSymbol(symbol) {\n return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};\n}\n\nmodule.exports = cloneSymbol;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer');\n\n/**\n * Creates a clone of `typedArray`.\n *\n * @private\n * @param {Object} typedArray The typed array to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned typed array.\n */\nfunction cloneTypedArray(typedArray, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n}\n\nmodule.exports = cloneTypedArray;\n","/**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\nfunction copyArray(source, array) {\n var index = -1,\n length = source.length;\n\n array || (array = Array(length));\n while (++index < length) {\n array[index] = source[index];\n }\n return array;\n}\n\nmodule.exports = copyArray;\n","var assignValue = require('./_assignValue'),\n baseAssignValue = require('./_baseAssignValue');\n\n/**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\nfunction copyObject(source, props, object, customizer) {\n var isNew = !object;\n object || (object = {});\n\n var index = -1,\n length = props.length;\n\n while (++index < length) {\n var key = props[index];\n\n var newValue = customizer\n ? customizer(object[key], source[key], key, object, source)\n : undefined;\n\n if (newValue === undefined) {\n newValue = source[key];\n }\n if (isNew) {\n baseAssignValue(object, key, newValue);\n } else {\n assignValue(object, key, newValue);\n }\n }\n return object;\n}\n\nmodule.exports = copyObject;\n","var copyObject = require('./_copyObject'),\n getSymbols = require('./_getSymbols');\n\n/**\n * Copies own symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbols(source, object) {\n return copyObject(source, getSymbols(source), object);\n}\n\nmodule.exports = copySymbols;\n","var copyObject = require('./_copyObject'),\n getSymbolsIn = require('./_getSymbolsIn');\n\n/**\n * Copies own and inherited symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbolsIn(source, object) {\n return copyObject(source, getSymbolsIn(source), object);\n}\n\nmodule.exports = copySymbolsIn;\n","var root = require('./_root');\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\nmodule.exports = coreJsData;\n","var getNative = require('./_getNative');\n\nvar defineProperty = (function() {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n}());\n\nmodule.exports = defineProperty;\n","var SetCache = require('./_SetCache'),\n arraySome = require('./_arraySome'),\n cacheHas = require('./_cacheHas');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\nfunction equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n arrLength = array.length,\n othLength = other.length;\n\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n return false;\n }\n // Check that cyclic values are equal.\n var arrStacked = stack.get(array);\n var othStacked = stack.get(other);\n if (arrStacked && othStacked) {\n return arrStacked == other && othStacked == array;\n }\n var index = -1,\n result = true,\n seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n stack.set(array, other);\n stack.set(other, array);\n\n // Ignore non-index properties.\n while (++index < arrLength) {\n var arrValue = array[index],\n othValue = other[index];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, arrValue, index, other, array, stack)\n : customizer(arrValue, othValue, index, array, other, stack);\n }\n if (compared !== undefined) {\n if (compared) {\n continue;\n }\n result = false;\n break;\n }\n // Recursively compare arrays (susceptible to call stack limits).\n if (seen) {\n if (!arraySome(other, function(othValue, othIndex) {\n if (!cacheHas(seen, othIndex) &&\n (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n return seen.push(othIndex);\n }\n })) {\n result = false;\n break;\n }\n } else if (!(\n arrValue === othValue ||\n equalFunc(arrValue, othValue, bitmask, customizer, stack)\n )) {\n result = false;\n break;\n }\n }\n stack['delete'](array);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalArrays;\n","var Symbol = require('./_Symbol'),\n Uint8Array = require('./_Uint8Array'),\n eq = require('./eq'),\n equalArrays = require('./_equalArrays'),\n mapToArray = require('./_mapToArray'),\n setToArray = require('./_setToArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]';\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n switch (tag) {\n case dataViewTag:\n if ((object.byteLength != other.byteLength) ||\n (object.byteOffset != other.byteOffset)) {\n return false;\n }\n object = object.buffer;\n other = other.buffer;\n\n case arrayBufferTag:\n if ((object.byteLength != other.byteLength) ||\n !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n return false;\n }\n return true;\n\n case boolTag:\n case dateTag:\n case numberTag:\n // Coerce booleans to `1` or `0` and dates to milliseconds.\n // Invalid dates are coerced to `NaN`.\n return eq(+object, +other);\n\n case errorTag:\n return object.name == other.name && object.message == other.message;\n\n case regexpTag:\n case stringTag:\n // Coerce regexes to strings and treat strings, primitives and objects,\n // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n // for more details.\n return object == (other + '');\n\n case mapTag:\n var convert = mapToArray;\n\n case setTag:\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n convert || (convert = setToArray);\n\n if (object.size != other.size && !isPartial) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked) {\n return stacked == other;\n }\n bitmask |= COMPARE_UNORDERED_FLAG;\n\n // Recursively compare objects (susceptible to call stack limits).\n stack.set(object, other);\n var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n stack['delete'](object);\n return result;\n\n case symbolTag:\n if (symbolValueOf) {\n return symbolValueOf.call(object) == symbolValueOf.call(other);\n }\n }\n return false;\n}\n\nmodule.exports = equalByTag;\n","var getAllKeys = require('./_getAllKeys');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n objProps = getAllKeys(object),\n objLength = objProps.length,\n othProps = getAllKeys(other),\n othLength = othProps.length;\n\n if (objLength != othLength && !isPartial) {\n return false;\n }\n var index = objLength;\n while (index--) {\n var key = objProps[index];\n if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n return false;\n }\n }\n // Check that cyclic values are equal.\n var objStacked = stack.get(object);\n var othStacked = stack.get(other);\n if (objStacked && othStacked) {\n return objStacked == other && othStacked == object;\n }\n var result = true;\n stack.set(object, other);\n stack.set(other, object);\n\n var skipCtor = isPartial;\n while (++index < objLength) {\n key = objProps[index];\n var objValue = object[key],\n othValue = other[key];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, objValue, key, other, object, stack)\n : customizer(objValue, othValue, key, object, other, stack);\n }\n // Recursively compare objects (susceptible to call stack limits).\n if (!(compared === undefined\n ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n : compared\n )) {\n result = false;\n break;\n }\n skipCtor || (skipCtor = key == 'constructor');\n }\n if (result && !skipCtor) {\n var objCtor = object.constructor,\n othCtor = other.constructor;\n\n // Non `Object` object instances with different constructors are not equal.\n if (objCtor != othCtor &&\n ('constructor' in object && 'constructor' in other) &&\n !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n result = false;\n }\n }\n stack['delete'](object);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalObjects;\n","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n","var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbols = require('./_getSymbols'),\n keys = require('./keys');\n\n/**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeys(object) {\n return baseGetAllKeys(object, keys, getSymbols);\n}\n\nmodule.exports = getAllKeys;\n","var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbolsIn = require('./_getSymbolsIn'),\n keysIn = require('./keysIn');\n\n/**\n * Creates an array of own and inherited enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeysIn(object) {\n return baseGetAllKeys(object, keysIn, getSymbolsIn);\n}\n\nmodule.exports = getAllKeysIn;\n","var isKeyable = require('./_isKeyable');\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\nmodule.exports = getMapData;\n","var baseIsNative = require('./_baseIsNative'),\n getValue = require('./_getValue');\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\nmodule.exports = getNative;\n","var overArg = require('./_overArg');\n\n/** Built-in value references. */\nvar getPrototype = overArg(Object.getPrototypeOf, Object);\n\nmodule.exports = getPrototype;\n","var Symbol = require('./_Symbol');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nmodule.exports = getRawTag;\n","var arrayFilter = require('./_arrayFilter'),\n stubArray = require('./stubArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n if (object == null) {\n return [];\n }\n object = Object(object);\n return arrayFilter(nativeGetSymbols(object), function(symbol) {\n return propertyIsEnumerable.call(object, symbol);\n });\n};\n\nmodule.exports = getSymbols;\n","var arrayPush = require('./_arrayPush'),\n getPrototype = require('./_getPrototype'),\n getSymbols = require('./_getSymbols'),\n stubArray = require('./stubArray');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own and inherited enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {\n var result = [];\n while (object) {\n arrayPush(result, getSymbols(object));\n object = getPrototype(object);\n }\n return result;\n};\n\nmodule.exports = getSymbolsIn;\n","var DataView = require('./_DataView'),\n Map = require('./_Map'),\n Promise = require('./_Promise'),\n Set = require('./_Set'),\n WeakMap = require('./_WeakMap'),\n baseGetTag = require('./_baseGetTag'),\n toSource = require('./_toSource');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n setTag = '[object Set]',\n weakMapTag = '[object WeakMap]';\n\nvar dataViewTag = '[object DataView]';\n\n/** Used to detect maps, sets, and weakmaps. */\nvar dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nvar getTag = baseGetTag;\n\n// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\nif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = baseGetTag(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : '';\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n}\n\nmodule.exports = getTag;\n","/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\nmodule.exports = getValue;\n","var nativeCreate = require('./_nativeCreate');\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n}\n\nmodule.exports = hashClear;\n","/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = hashDelete;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\nmodule.exports = hashGet;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\nmodule.exports = hashHas;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\nmodule.exports = hashSet;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Initializes an array clone.\n *\n * @private\n * @param {Array} array The array to clone.\n * @returns {Array} Returns the initialized clone.\n */\nfunction initCloneArray(array) {\n var length = array.length,\n result = new array.constructor(length);\n\n // Add properties assigned by `RegExp#exec`.\n if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {\n result.index = array.index;\n result.input = array.input;\n }\n return result;\n}\n\nmodule.exports = initCloneArray;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer'),\n cloneDataView = require('./_cloneDataView'),\n cloneRegExp = require('./_cloneRegExp'),\n cloneSymbol = require('./_cloneSymbol'),\n cloneTypedArray = require('./_cloneTypedArray');\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/**\n * Initializes an object clone based on its `toStringTag`.\n *\n * **Note:** This function only supports cloning values with tags of\n * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.\n *\n * @private\n * @param {Object} object The object to clone.\n * @param {string} tag The `toStringTag` of the object to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneByTag(object, tag, isDeep) {\n var Ctor = object.constructor;\n switch (tag) {\n case arrayBufferTag:\n return cloneArrayBuffer(object);\n\n case boolTag:\n case dateTag:\n return new Ctor(+object);\n\n case dataViewTag:\n return cloneDataView(object, isDeep);\n\n case float32Tag: case float64Tag:\n case int8Tag: case int16Tag: case int32Tag:\n case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:\n return cloneTypedArray(object, isDeep);\n\n case mapTag:\n return new Ctor;\n\n case numberTag:\n case stringTag:\n return new Ctor(object);\n\n case regexpTag:\n return cloneRegExp(object);\n\n case setTag:\n return new Ctor;\n\n case symbolTag:\n return cloneSymbol(object);\n }\n}\n\nmodule.exports = initCloneByTag;\n","var baseCreate = require('./_baseCreate'),\n getPrototype = require('./_getPrototype'),\n isPrototype = require('./_isPrototype');\n\n/**\n * Initializes an object clone.\n *\n * @private\n * @param {Object} object The object to clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneObject(object) {\n return (typeof object.constructor == 'function' && !isPrototype(object))\n ? baseCreate(getPrototype(object))\n : {};\n}\n\nmodule.exports = initCloneObject;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n var type = typeof value;\n length = length == null ? MAX_SAFE_INTEGER : length;\n\n return !!length &&\n (type == 'number' ||\n (type != 'symbol' && reIsUint.test(value))) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\nmodule.exports = isIndex;\n","/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\nmodule.exports = isKeyable;\n","var coreJsData = require('./_coreJsData');\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\nmodule.exports = isMasked;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\nmodule.exports = isPrototype;\n","/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n}\n\nmodule.exports = listCacheClear;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype;\n\n/** Built-in value references. */\nvar splice = arrayProto.splice;\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n}\n\nmodule.exports = listCacheDelete;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\nmodule.exports = listCacheGet;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\nmodule.exports = listCacheHas;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\nmodule.exports = listCacheSet;\n","var Hash = require('./_Hash'),\n ListCache = require('./_ListCache'),\n Map = require('./_Map');\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\nmodule.exports = mapCacheClear;\n","var getMapData = require('./_getMapData');\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = mapCacheDelete;\n","var getMapData = require('./_getMapData');\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\nmodule.exports = mapCacheGet;\n","var getMapData = require('./_getMapData');\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\nmodule.exports = mapCacheHas;\n","var getMapData = require('./_getMapData');\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n}\n\nmodule.exports = mapCacheSet;\n","/**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\nfunction mapToArray(map) {\n var index = -1,\n result = Array(map.size);\n\n map.forEach(function(value, key) {\n result[++index] = [key, value];\n });\n return result;\n}\n\nmodule.exports = mapToArray;\n","var getNative = require('./_getNative');\n\n/* Built-in method references that are verified to be native. */\nvar nativeCreate = getNative(Object, 'create');\n\nmodule.exports = nativeCreate;\n","var overArg = require('./_overArg');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeKeys = overArg(Object.keys, Object);\n\nmodule.exports = nativeKeys;\n","/**\n * This function is like\n * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * except that it includes inherited enumerable properties.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction nativeKeysIn(object) {\n var result = [];\n if (object != null) {\n for (var key in Object(object)) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = nativeKeysIn;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n try {\n // Use `util.types` for Node.js 10+.\n var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n if (types) {\n return types;\n }\n\n // Legacy `process.binding('util')` for Node.js < 10.\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n}());\n\nmodule.exports = nodeUtil;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n","/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\nmodule.exports = overArg;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n","/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\nfunction setCacheAdd(value) {\n this.__data__.set(value, HASH_UNDEFINED);\n return this;\n}\n\nmodule.exports = setCacheAdd;\n","/**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\nfunction setCacheHas(value) {\n return this.__data__.has(value);\n}\n\nmodule.exports = setCacheHas;\n","/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\nfunction setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n}\n\nmodule.exports = setToArray;\n","var ListCache = require('./_ListCache');\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}\n\nmodule.exports = stackClear;\n","/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n var data = this.__data__,\n result = data['delete'](key);\n\n this.size = data.size;\n return result;\n}\n\nmodule.exports = stackDelete;\n","/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n return this.__data__.get(key);\n}\n\nmodule.exports = stackGet;\n","/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n return this.__data__.has(key);\n}\n\nmodule.exports = stackHas;\n","var ListCache = require('./_ListCache'),\n Map = require('./_Map'),\n MapCache = require('./_MapCache');\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n var data = this.__data__;\n if (data instanceof ListCache) {\n var pairs = data.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n this.size = ++data.size;\n return this;\n }\n data = this.__data__ = new MapCache(pairs);\n }\n data.set(key, value);\n this.size = data.size;\n return this;\n}\n\nmodule.exports = stackSet;\n","/** Used for built-in method references. */\nvar funcProto = Function.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\nmodule.exports = toSource;\n","var baseClone = require('./_baseClone');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_SYMBOLS_FLAG = 4;\n\n/**\n * This method is like `_.clone` except that it recursively clones `value`.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Lang\n * @param {*} value The value to recursively clone.\n * @returns {*} Returns the deep cloned value.\n * @see _.clone\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var deep = _.cloneDeep(objects);\n * console.log(deep[0] === objects[0]);\n * // => false\n */\nfunction cloneDeep(value) {\n return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);\n}\n\nmodule.exports = cloneDeep;\n","/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\nmodule.exports = eq;\n","var baseIsArguments = require('./_baseIsArguments'),\n isObjectLike = require('./isObjectLike');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n};\n\nmodule.exports = isArguments;\n","/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\nmodule.exports = isArray;\n","var isFunction = require('./isFunction'),\n isLength = require('./isLength');\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\nmodule.exports = isArrayLike;\n","var root = require('./_root'),\n stubFalse = require('./stubFalse');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\nmodule.exports = isBuffer;\n","var baseIsEqual = require('./_baseIsEqual');\n\n/**\n * Performs a deep comparison between two values to determine if they are\n * equivalent.\n *\n * **Note:** This method supports comparing arrays, array buffers, booleans,\n * date objects, error objects, maps, numbers, `Object` objects, regexes,\n * sets, strings, symbols, and typed arrays. `Object` objects are compared\n * by their own, not inherited, enumerable properties. Functions and DOM\n * nodes are compared by strict equality, i.e. `===`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.isEqual(object, other);\n * // => true\n *\n * object === other;\n * // => false\n */\nfunction isEqual(value, other) {\n return baseIsEqual(value, other);\n}\n\nmodule.exports = isEqual;\n","var baseGetTag = require('./_baseGetTag'),\n isObject = require('./isObject');\n\n/** `Object#toString` result references. */\nvar asyncTag = '[object AsyncFunction]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n proxyTag = '[object Proxy]';\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\nmodule.exports = isFunction;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\nmodule.exports = isLength;\n","var baseIsMap = require('./_baseIsMap'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsMap = nodeUtil && nodeUtil.isMap;\n\n/**\n * Checks if `value` is classified as a `Map` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n * @example\n *\n * _.isMap(new Map);\n * // => true\n *\n * _.isMap(new WeakMap);\n * // => false\n */\nvar isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;\n\nmodule.exports = isMap;\n","/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n","var baseIsSet = require('./_baseIsSet'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsSet = nodeUtil && nodeUtil.isSet;\n\n/**\n * Checks if `value` is classified as a `Set` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n * @example\n *\n * _.isSet(new Set);\n * // => true\n *\n * _.isSet(new WeakSet);\n * // => false\n */\nvar isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;\n\nmodule.exports = isSet;\n","var baseIsTypedArray = require('./_baseIsTypedArray'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\nmodule.exports = isTypedArray;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeys = require('./_baseKeys'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\nmodule.exports = keys;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeysIn = require('./_baseKeysIn'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\nfunction keysIn(object) {\n return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n}\n\nmodule.exports = keysIn;\n","/**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\nfunction stubArray() {\n return [];\n}\n\nmodule.exports = stubArray;\n","/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n return false;\n}\n\nmodule.exports = stubFalse;\n","import type { WebLayoutSnapshot } from \"@openfin/core-web\";\nimport type { Settings } from \"../shapes/setting-shapes\";\n\n/**\n * Fetches the settings for the application.\n * @returns The settings for the application.\n */\nexport async function getSettings(): Promise {\n\tconst settings = await getManifestSettings();\n\tif (settings === undefined) {\n\t\tconsole.error(\n\t\t\t\"Unable to run the example as settings are required and we fetch them from the link web manifest from the html page that is being served. It should exist in the customSettings section of the web manifest.\"\n\t\t);\n\t}\n\treturn settings;\n}\n\n/**\n * Returns a default layout from the settings if provided.\n * @returns The default layout from the settings.\n */\nexport async function getDefaultLayout(): Promise {\n\tconst settings = await getSettings();\n\tif (settings?.platform?.layout?.defaultLayout === undefined) {\n\t\tconsole.error(\n\t\t\t\"Unable to run the example as without a layout being defined. Please ensure that settings have been provided in the web manifest.\"\n\t\t);\n\t\treturn;\n\t}\n\tif (typeof settings.platform.layout.defaultLayout === \"string\") {\n\t\tconst layoutResponse = await fetch(settings.platform.layout.defaultLayout);\n\t\tconst layoutJson = (await layoutResponse.json()) as WebLayoutSnapshot;\n\t\treturn layoutJson;\n\t}\n\treturn settings.platform.layout.defaultLayout;\n}\n\n/**\n * Returns a default layout from the settings if provided.\n * @returns The default layout from the settings.\n */\nexport async function getSecondLayout(): Promise {\n\tconst settings = await getSettings();\n\tif (settings?.platform?.layout?.secondLayout === undefined) {\n\t\tconsole.error(\n\t\t\t\"Unable to run the example as without a layout being defined. Please ensure that settings have been provided in the web manifest.\"\n\t\t);\n\t\treturn;\n\t}\n\tif (typeof settings.platform.layout.secondLayout === \"string\") {\n\t\tconst layoutResponse = await fetch(settings.platform.layout.secondLayout);\n\t\tconst layoutJson = (await layoutResponse.json()) as WebLayoutSnapshot;\n\t\treturn layoutJson;\n\t}\n\treturn settings.platform.layout.secondLayout;\n}\n/**\n * Returns the settings from the manifest file.\n * @returns customSettings for this example\n */\nasync function getManifestSettings(): Promise {\n\t// Get the manifest link\n\tconst link = document.querySelector('link[rel=\"manifest\"]');\n\tif (link !== null) {\n\t\tconst manifestResponse = await fetch(link.href);\n\t\tconst manifestJson = (await manifestResponse.json()) as { custom_settings: Settings };\n\t\treturn manifestJson.custom_settings;\n\t}\n}\n","export { default as v1 } from './v1.js';\nexport { default as v3 } from './v3.js';\nexport { default as v4 } from './v4.js';\nexport { default as v5 } from './v5.js';\nexport { default as NIL } from './nil.js';\nexport { default as version } from './version.js';\nexport { default as validate } from './validate.js';\nexport { default as stringify } from './stringify.js';\nexport { default as parse } from './parse.js';","/*\n * Browser-compatible JavaScript MD5\n *\n * Modification of JavaScript MD5\n * https://github.com/blueimp/JavaScript-MD5\n *\n * Copyright 2011, Sebastian Tschan\n * https://blueimp.net\n *\n * Licensed under the MIT license:\n * https://opensource.org/licenses/MIT\n *\n * Based on\n * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message\n * Digest Algorithm, as defined in RFC 1321.\n * Version 2.2 Copyright (C) Paul Johnston 1999 - 2009\n * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet\n * Distributed under the BSD License\n * See http://pajhome.org.uk/crypt/md5 for more info.\n */\nfunction md5(bytes) {\n if (typeof bytes === 'string') {\n var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape\n\n bytes = new Uint8Array(msg.length);\n\n for (var i = 0; i < msg.length; ++i) {\n bytes[i] = msg.charCodeAt(i);\n }\n }\n\n return md5ToHexEncodedArray(wordsToMd5(bytesToWords(bytes), bytes.length * 8));\n}\n/*\n * Convert an array of little-endian words to an array of bytes\n */\n\n\nfunction md5ToHexEncodedArray(input) {\n var output = [];\n var length32 = input.length * 32;\n var hexTab = '0123456789abcdef';\n\n for (var i = 0; i < length32; i += 8) {\n var x = input[i >> 5] >>> i % 32 & 0xff;\n var hex = parseInt(hexTab.charAt(x >>> 4 & 0x0f) + hexTab.charAt(x & 0x0f), 16);\n output.push(hex);\n }\n\n return output;\n}\n/**\n * Calculate output length with padding and bit length\n */\n\n\nfunction getOutputLength(inputLength8) {\n return (inputLength8 + 64 >>> 9 << 4) + 14 + 1;\n}\n/*\n * Calculate the MD5 of an array of little-endian words, and a bit length.\n */\n\n\nfunction wordsToMd5(x, len) {\n /* append padding */\n x[len >> 5] |= 0x80 << len % 32;\n x[getOutputLength(len) - 1] = len;\n var a = 1732584193;\n var b = -271733879;\n var c = -1732584194;\n var d = 271733878;\n\n for (var i = 0; i < x.length; i += 16) {\n var olda = a;\n var oldb = b;\n var oldc = c;\n var oldd = d;\n a = md5ff(a, b, c, d, x[i], 7, -680876936);\n d = md5ff(d, a, b, c, x[i + 1], 12, -389564586);\n c = md5ff(c, d, a, b, x[i + 2], 17, 606105819);\n b = md5ff(b, c, d, a, x[i + 3], 22, -1044525330);\n a = md5ff(a, b, c, d, x[i + 4], 7, -176418897);\n d = md5ff(d, a, b, c, x[i + 5], 12, 1200080426);\n c = md5ff(c, d, a, b, x[i + 6], 17, -1473231341);\n b = md5ff(b, c, d, a, x[i + 7], 22, -45705983);\n a = md5ff(a, b, c, d, x[i + 8], 7, 1770035416);\n d = md5ff(d, a, b, c, x[i + 9], 12, -1958414417);\n c = md5ff(c, d, a, b, x[i + 10], 17, -42063);\n b = md5ff(b, c, d, a, x[i + 11], 22, -1990404162);\n a = md5ff(a, b, c, d, x[i + 12], 7, 1804603682);\n d = md5ff(d, a, b, c, x[i + 13], 12, -40341101);\n c = md5ff(c, d, a, b, x[i + 14], 17, -1502002290);\n b = md5ff(b, c, d, a, x[i + 15], 22, 1236535329);\n a = md5gg(a, b, c, d, x[i + 1], 5, -165796510);\n d = md5gg(d, a, b, c, x[i + 6], 9, -1069501632);\n c = md5gg(c, d, a, b, x[i + 11], 14, 643717713);\n b = md5gg(b, c, d, a, x[i], 20, -373897302);\n a = md5gg(a, b, c, d, x[i + 5], 5, -701558691);\n d = md5gg(d, a, b, c, x[i + 10], 9, 38016083);\n c = md5gg(c, d, a, b, x[i + 15], 14, -660478335);\n b = md5gg(b, c, d, a, x[i + 4], 20, -405537848);\n a = md5gg(a, b, c, d, x[i + 9], 5, 568446438);\n d = md5gg(d, a, b, c, x[i + 14], 9, -1019803690);\n c = md5gg(c, d, a, b, x[i + 3], 14, -187363961);\n b = md5gg(b, c, d, a, x[i + 8], 20, 1163531501);\n a = md5gg(a, b, c, d, x[i + 13], 5, -1444681467);\n d = md5gg(d, a, b, c, x[i + 2], 9, -51403784);\n c = md5gg(c, d, a, b, x[i + 7], 14, 1735328473);\n b = md5gg(b, c, d, a, x[i + 12], 20, -1926607734);\n a = md5hh(a, b, c, d, x[i + 5], 4, -378558);\n d = md5hh(d, a, b, c, x[i + 8], 11, -2022574463);\n c = md5hh(c, d, a, b, x[i + 11], 16, 1839030562);\n b = md5hh(b, c, d, a, x[i + 14], 23, -35309556);\n a = md5hh(a, b, c, d, x[i + 1], 4, -1530992060);\n d = md5hh(d, a, b, c, x[i + 4], 11, 1272893353);\n c = md5hh(c, d, a, b, x[i + 7], 16, -155497632);\n b = md5hh(b, c, d, a, x[i + 10], 23, -1094730640);\n a = md5hh(a, b, c, d, x[i + 13], 4, 681279174);\n d = md5hh(d, a, b, c, x[i], 11, -358537222);\n c = md5hh(c, d, a, b, x[i + 3], 16, -722521979);\n b = md5hh(b, c, d, a, x[i + 6], 23, 76029189);\n a = md5hh(a, b, c, d, x[i + 9], 4, -640364487);\n d = md5hh(d, a, b, c, x[i + 12], 11, -421815835);\n c = md5hh(c, d, a, b, x[i + 15], 16, 530742520);\n b = md5hh(b, c, d, a, x[i + 2], 23, -995338651);\n a = md5ii(a, b, c, d, x[i], 6, -198630844);\n d = md5ii(d, a, b, c, x[i + 7], 10, 1126891415);\n c = md5ii(c, d, a, b, x[i + 14], 15, -1416354905);\n b = md5ii(b, c, d, a, x[i + 5], 21, -57434055);\n a = md5ii(a, b, c, d, x[i + 12], 6, 1700485571);\n d = md5ii(d, a, b, c, x[i + 3], 10, -1894986606);\n c = md5ii(c, d, a, b, x[i + 10], 15, -1051523);\n b = md5ii(b, c, d, a, x[i + 1], 21, -2054922799);\n a = md5ii(a, b, c, d, x[i + 8], 6, 1873313359);\n d = md5ii(d, a, b, c, x[i + 15], 10, -30611744);\n c = md5ii(c, d, a, b, x[i + 6], 15, -1560198380);\n b = md5ii(b, c, d, a, x[i + 13], 21, 1309151649);\n a = md5ii(a, b, c, d, x[i + 4], 6, -145523070);\n d = md5ii(d, a, b, c, x[i + 11], 10, -1120210379);\n c = md5ii(c, d, a, b, x[i + 2], 15, 718787259);\n b = md5ii(b, c, d, a, x[i + 9], 21, -343485551);\n a = safeAdd(a, olda);\n b = safeAdd(b, oldb);\n c = safeAdd(c, oldc);\n d = safeAdd(d, oldd);\n }\n\n return [a, b, c, d];\n}\n/*\n * Convert an array bytes to an array of little-endian words\n * Characters >255 have their high-byte silently ignored.\n */\n\n\nfunction bytesToWords(input) {\n if (input.length === 0) {\n return [];\n }\n\n var length8 = input.length * 8;\n var output = new Uint32Array(getOutputLength(length8));\n\n for (var i = 0; i < length8; i += 8) {\n output[i >> 5] |= (input[i / 8] & 0xff) << i % 32;\n }\n\n return output;\n}\n/*\n * Add integers, wrapping at 2^32. This uses 16-bit operations internally\n * to work around bugs in some JS interpreters.\n */\n\n\nfunction safeAdd(x, y) {\n var lsw = (x & 0xffff) + (y & 0xffff);\n var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n return msw << 16 | lsw & 0xffff;\n}\n/*\n * Bitwise rotate a 32-bit number to the left.\n */\n\n\nfunction bitRotateLeft(num, cnt) {\n return num << cnt | num >>> 32 - cnt;\n}\n/*\n * These functions implement the four basic operations the algorithm uses.\n */\n\n\nfunction md5cmn(q, a, b, x, s, t) {\n return safeAdd(bitRotateLeft(safeAdd(safeAdd(a, q), safeAdd(x, t)), s), b);\n}\n\nfunction md5ff(a, b, c, d, x, s, t) {\n return md5cmn(b & c | ~b & d, a, b, x, s, t);\n}\n\nfunction md5gg(a, b, c, d, x, s, t) {\n return md5cmn(b & d | c & ~d, a, b, x, s, t);\n}\n\nfunction md5hh(a, b, c, d, x, s, t) {\n return md5cmn(b ^ c ^ d, a, b, x, s, t);\n}\n\nfunction md5ii(a, b, c, d, x, s, t) {\n return md5cmn(c ^ (b | ~d), a, b, x, s, t);\n}\n\nexport default md5;","export default '00000000-0000-0000-0000-000000000000';","import validate from './validate.js';\n\nfunction parse(uuid) {\n if (!validate(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n var v;\n var arr = new Uint8Array(16); // Parse ########-....-....-....-............\n\n arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24;\n arr[1] = v >>> 16 & 0xff;\n arr[2] = v >>> 8 & 0xff;\n arr[3] = v & 0xff; // Parse ........-####-....-....-............\n\n arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8;\n arr[5] = v & 0xff; // Parse ........-....-####-....-............\n\n arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8;\n arr[7] = v & 0xff; // Parse ........-....-....-####-............\n\n arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8;\n arr[9] = v & 0xff; // Parse ........-....-....-....-############\n // (Use \"/\" to avoid 32-bit truncation when bit-shifting high-order bytes)\n\n arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff;\n arr[11] = v / 0x100000000 & 0xff;\n arr[12] = v >>> 24 & 0xff;\n arr[13] = v >>> 16 & 0xff;\n arr[14] = v >>> 8 & 0xff;\n arr[15] = v & 0xff;\n return arr;\n}\n\nexport default parse;","export default /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;","// Unique ID creation requires a high quality random # generator. In the browser we therefore\n// require the crypto API and do not support built-in fallback to lower quality random number\n// generators (like Math.random()).\nvar getRandomValues;\nvar rnds8 = new Uint8Array(16);\nexport default function rng() {\n // lazy load so that environments that need to polyfill have a chance to do so\n if (!getRandomValues) {\n // getRandomValues needs to be invoked in a context where \"this\" is a Crypto implementation. Also,\n // find the complete implementation of crypto (msCrypto) on IE11.\n getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto !== 'undefined' && typeof msCrypto.getRandomValues === 'function' && msCrypto.getRandomValues.bind(msCrypto);\n\n if (!getRandomValues) {\n throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');\n }\n }\n\n return getRandomValues(rnds8);\n}","// Adapted from Chris Veness' SHA1 code at\n// http://www.movable-type.co.uk/scripts/sha1.html\nfunction f(s, x, y, z) {\n switch (s) {\n case 0:\n return x & y ^ ~x & z;\n\n case 1:\n return x ^ y ^ z;\n\n case 2:\n return x & y ^ x & z ^ y & z;\n\n case 3:\n return x ^ y ^ z;\n }\n}\n\nfunction ROTL(x, n) {\n return x << n | x >>> 32 - n;\n}\n\nfunction sha1(bytes) {\n var K = [0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xca62c1d6];\n var H = [0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0];\n\n if (typeof bytes === 'string') {\n var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape\n\n bytes = [];\n\n for (var i = 0; i < msg.length; ++i) {\n bytes.push(msg.charCodeAt(i));\n }\n } else if (!Array.isArray(bytes)) {\n // Convert Array-like to Array\n bytes = Array.prototype.slice.call(bytes);\n }\n\n bytes.push(0x80);\n var l = bytes.length / 4 + 2;\n var N = Math.ceil(l / 16);\n var M = new Array(N);\n\n for (var _i = 0; _i < N; ++_i) {\n var arr = new Uint32Array(16);\n\n for (var j = 0; j < 16; ++j) {\n arr[j] = bytes[_i * 64 + j * 4] << 24 | bytes[_i * 64 + j * 4 + 1] << 16 | bytes[_i * 64 + j * 4 + 2] << 8 | bytes[_i * 64 + j * 4 + 3];\n }\n\n M[_i] = arr;\n }\n\n M[N - 1][14] = (bytes.length - 1) * 8 / Math.pow(2, 32);\n M[N - 1][14] = Math.floor(M[N - 1][14]);\n M[N - 1][15] = (bytes.length - 1) * 8 & 0xffffffff;\n\n for (var _i2 = 0; _i2 < N; ++_i2) {\n var W = new Uint32Array(80);\n\n for (var t = 0; t < 16; ++t) {\n W[t] = M[_i2][t];\n }\n\n for (var _t = 16; _t < 80; ++_t) {\n W[_t] = ROTL(W[_t - 3] ^ W[_t - 8] ^ W[_t - 14] ^ W[_t - 16], 1);\n }\n\n var a = H[0];\n var b = H[1];\n var c = H[2];\n var d = H[3];\n var e = H[4];\n\n for (var _t2 = 0; _t2 < 80; ++_t2) {\n var s = Math.floor(_t2 / 20);\n var T = ROTL(a, 5) + f(s, b, c, d) + e + K[s] + W[_t2] >>> 0;\n e = d;\n d = c;\n c = ROTL(b, 30) >>> 0;\n b = a;\n a = T;\n }\n\n H[0] = H[0] + a >>> 0;\n H[1] = H[1] + b >>> 0;\n H[2] = H[2] + c >>> 0;\n H[3] = H[3] + d >>> 0;\n H[4] = H[4] + e >>> 0;\n }\n\n return [H[0] >> 24 & 0xff, H[0] >> 16 & 0xff, H[0] >> 8 & 0xff, H[0] & 0xff, H[1] >> 24 & 0xff, H[1] >> 16 & 0xff, H[1] >> 8 & 0xff, H[1] & 0xff, H[2] >> 24 & 0xff, H[2] >> 16 & 0xff, H[2] >> 8 & 0xff, H[2] & 0xff, H[3] >> 24 & 0xff, H[3] >> 16 & 0xff, H[3] >> 8 & 0xff, H[3] & 0xff, H[4] >> 24 & 0xff, H[4] >> 16 & 0xff, H[4] >> 8 & 0xff, H[4] & 0xff];\n}\n\nexport default sha1;","import validate from './validate.js';\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\n\nvar byteToHex = [];\n\nfor (var i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).substr(1));\n}\n\nfunction stringify(arr) {\n var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n var uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!validate(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n\n return uuid;\n}\n\nexport default stringify;","import rng from './rng.js';\nimport stringify from './stringify.js'; // **`v1()` - Generate time-based UUID**\n//\n// Inspired by https://github.com/LiosK/UUID.js\n// and http://docs.python.org/library/uuid.html\n\nvar _nodeId;\n\nvar _clockseq; // Previous uuid creation time\n\n\nvar _lastMSecs = 0;\nvar _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details\n\nfunction v1(options, buf, offset) {\n var i = buf && offset || 0;\n var b = buf || new Array(16);\n options = options || {};\n var node = options.node || _nodeId;\n var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not\n // specified. We do this lazily to minimize issues related to insufficient\n // system entropy. See #189\n\n if (node == null || clockseq == null) {\n var seedBytes = options.random || (options.rng || rng)();\n\n if (node == null) {\n // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)\n node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]];\n }\n\n if (clockseq == null) {\n // Per 4.2.2, randomize (14 bit) clockseq\n clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;\n }\n } // UUID timestamps are 100 nano-second units since the Gregorian epoch,\n // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so\n // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'\n // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.\n\n\n var msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock\n // cycle to simulate higher resolution clock\n\n var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs)\n\n var dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression\n\n if (dt < 0 && options.clockseq === undefined) {\n clockseq = clockseq + 1 & 0x3fff;\n } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new\n // time interval\n\n\n if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {\n nsecs = 0;\n } // Per 4.2.1.2 Throw error if too many uuids are requested\n\n\n if (nsecs >= 10000) {\n throw new Error(\"uuid.v1(): Can't create more than 10M uuids/sec\");\n }\n\n _lastMSecs = msecs;\n _lastNSecs = nsecs;\n _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch\n\n msecs += 12219292800000; // `time_low`\n\n var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;\n b[i++] = tl >>> 24 & 0xff;\n b[i++] = tl >>> 16 & 0xff;\n b[i++] = tl >>> 8 & 0xff;\n b[i++] = tl & 0xff; // `time_mid`\n\n var tmh = msecs / 0x100000000 * 10000 & 0xfffffff;\n b[i++] = tmh >>> 8 & 0xff;\n b[i++] = tmh & 0xff; // `time_high_and_version`\n\n b[i++] = tmh >>> 24 & 0xf | 0x10; // include version\n\n b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)\n\n b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low`\n\n b[i++] = clockseq & 0xff; // `node`\n\n for (var n = 0; n < 6; ++n) {\n b[i + n] = node[n];\n }\n\n return buf || stringify(b);\n}\n\nexport default v1;","import v35 from './v35.js';\nimport md5 from './md5.js';\nvar v3 = v35('v3', 0x30, md5);\nexport default v3;","import stringify from './stringify.js';\nimport parse from './parse.js';\n\nfunction stringToBytes(str) {\n str = unescape(encodeURIComponent(str)); // UTF8 escape\n\n var bytes = [];\n\n for (var i = 0; i < str.length; ++i) {\n bytes.push(str.charCodeAt(i));\n }\n\n return bytes;\n}\n\nexport var DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8';\nexport var URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8';\nexport default function (name, version, hashfunc) {\n function generateUUID(value, namespace, buf, offset) {\n if (typeof value === 'string') {\n value = stringToBytes(value);\n }\n\n if (typeof namespace === 'string') {\n namespace = parse(namespace);\n }\n\n if (namespace.length !== 16) {\n throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)');\n } // Compute hash of namespace and value, Per 4.3\n // Future: Use spread syntax when supported on all platforms, e.g. `bytes =\n // hashfunc([...namespace, ... value])`\n\n\n var bytes = new Uint8Array(16 + value.length);\n bytes.set(namespace);\n bytes.set(value, namespace.length);\n bytes = hashfunc(bytes);\n bytes[6] = bytes[6] & 0x0f | version;\n bytes[8] = bytes[8] & 0x3f | 0x80;\n\n if (buf) {\n offset = offset || 0;\n\n for (var i = 0; i < 16; ++i) {\n buf[offset + i] = bytes[i];\n }\n\n return buf;\n }\n\n return stringify(bytes);\n } // Function#name is not settable on some platforms (#270)\n\n\n try {\n generateUUID.name = name; // eslint-disable-next-line no-empty\n } catch (err) {} // For CommonJS default export support\n\n\n generateUUID.DNS = DNS;\n generateUUID.URL = URL;\n return generateUUID;\n}","import rng from './rng.js';\nimport stringify from './stringify.js';\n\nfunction v4(options, buf, offset) {\n options = options || {};\n var rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n offset = offset || 0;\n\n for (var i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n\n return buf;\n }\n\n return stringify(rnds);\n}\n\nexport default v4;","import v35 from './v35.js';\nimport sha1 from './sha1.js';\nvar v5 = v35('v5', 0x50, sha1);\nexport default v5;","import REGEX from './regex.js';\n\nfunction validate(uuid) {\n return typeof uuid === 'string' && REGEX.test(uuid);\n}\n\nexport default validate;","import validate from './validate.js';\n\nfunction version(uuid) {\n if (!validate(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n return parseInt(uuid.substr(14, 1), 16);\n}\n\nexport default version;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = (module) => {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","/* eslint-disable jsdoc/require-param */\nimport type OpenFin from \"@openfin/core\";\nimport { type WebLayoutSnapshot, connect } from \"@openfin/core-web\";\nimport { getDefaultLayout, getSecondLayout, getSettings } from \"./platform/settings\";\nimport type { LayoutManager, LayoutManagerConstructor, LayoutManagerItem } from \"./shapes/layout-shapes\";\nimport type { Settings } from \"./shapes/setting-shapes\";\n\nlet PARENT_CONTAINER: HTMLElement | null;\n\n/**\n * Sets up panels if supported.\n * @param settings The settings to use.\n */\nfunction setupPanels(settings: Settings): void {\n\tif (settings?.platform?.layout?.panels?.left) {\n\t\tconst leftPanel = settings.platform.layout.panels.left;\n\t\tconst leftPanelFrameContainer = document.querySelector(`#${leftPanel.frameContainerId}`);\n\t\tconst leftPanelFrame = document.querySelector(`#${leftPanel.frameId}`);\n\t\tif (leftPanelFrameContainer === null) {\n\t\t\tconsole.error(\n\t\t\t\t`Please ensure the document has an element with the following id #${leftPanel.frameContainerId} containing an iframe with an id of #${leftPanel.frameId} so that the layout can be applied.`\n\t\t\t);\n\t\t\treturn;\n\t\t}\n\t\tif (leftPanelFrame === null) {\n\t\t\tconsole.error(\n\t\t\t\t`Please ensure the document has an iframe with the following id #${leftPanel.frameId} so that the layout can be applied.`\n\t\t\t);\n\t\t\treturn;\n\t\t}\n\t\tleftPanelFrameContainer.classList.remove(\"hidden\");\n\t\tleftPanelFrame.src = leftPanel.url;\n\t\tconsole.log(`Panel ${leftPanel.frameId} has been setup with the url ${leftPanel.url}`);\n\t} else {\n\t\tconsole.log(\"No panels require setup.\");\n\t}\n}\n\n/**\n * Attach listeners to elements.\n */\nasync function attachListeners(): Promise {\n\tconst addLayoutBtn = document.querySelector(\"#add-layout\");\n\taddLayoutBtn?.addEventListener(\"click\", async () => {\n\t\tawait addLayout();\n\t});\n}\n\n/**\n * Attaches Listeners to Tab Click Events.\n * @param tabName the name of the tab to add the event to.\n */\nasync function attachTabListener(tabName: string): Promise {\n\tconst tabBtn = document.querySelector(`#${tabName}`);\n\ttabBtn?.addEventListener(\"click\", async () => {\n\t\tawait selectTab(tabName);\n\t});\n}\n\n/**\n * Creates a new tab in the tab row given a specific tab/layout name.\n */\nasync function createTabBtn(tabName: string): Promise {\n\tconst tabRow = document.querySelector(\"#tabs\");\n\tconst newTab = document.createElement(\"div\");\n\tnewTab.id = `tab-${tabName}`;\n\tnewTab.className = \"tab\";\n\tnewTab.style.display = \"block\";\n\tnewTab.append(document.createTextNode(`${tabName}`));\n\tconst closeBtn = document.createElement(\"span\");\n\tcloseBtn.className = \"close-btn\";\n\tcloseBtn.innerHTML = \"X\";\n\tcloseBtn.addEventListener(\"click\", async (e) => {\n\t\tawait removeTab(tabName);\n\t\te.stopPropagation();\n\t});\n\tnewTab.append(closeBtn);\n\tif (tabRow) {\n\t\ttabRow.append(newTab);\n\t\tif (document.querySelector(`#tab-${tabName}`)) {\n\t\t\tawait attachTabListener(newTab.id);\n\t\t\tawait selectTab(tabName);\n\t\t}\n\t}\n}\n\n/**\n * Makes a layout and tab active.\n */\nasync function selectTab(tabName: string, removedTabName?: string): Promise {\n\tconsole.log(`Tab ${tabName} selected`);\n\tlet actualName = tabName;\n\tif (tabName.includes(\"tab\")) {\n\t\tconst split = tabName.split(\"-\");\n\t\tactualName = split[1];\n\t}\n\tconst currentOrder = window.localStorage.getItem(\"order\");\n\tif (currentOrder !== \"\") {\n\t\tconst layoutsArr = currentOrder?.split(\",\");\n\t\tif (layoutsArr) {\n\t\t\tfor (const tab of layoutsArr) {\n\t\t\t\tif (actualName !== removedTabName) {\n\t\t\t\t\tif (tab === actualName) {\n\t\t\t\t\t\tawait showTab(tab);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tawait hideTab(tab);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n/**\n * Makes a layout and tab hidden.\n */\nasync function showTab(tabName: string): Promise {\n\tconsole.log(`Tab ${tabName} showing...`);\n\tconst currentTab = document.querySelector(`#${tabName}`);\n\tif (currentTab) {\n\t\tcurrentTab.style.display = \"block\";\n\t}\n}\n\n/**\n * Makes a layout and tab hidden.\n */\nasync function hideTab(tabName: string): Promise {\n\tconsole.log(`Tab ${tabName} hiding...`);\n\tconst currentTab = document.querySelector(`#${tabName}`);\n\tif (currentTab) {\n\t\tcurrentTab.style.display = \"none\";\n\t}\n}\n\n/**\n * Removes a layout & tab from the page.\n */\nasync function removeTab(tabName: string): Promise {\n\tconsole.log(`Removing Tab & Layout ${tabName}`);\n\tconst lm = window.fin?.Platform.Layout.getCurrentLayoutManagerSync();\n\tawait lm?.removeLayout({ layoutName: tabName } as OpenFin.LayoutIdentity);\n\tconst tabToRemove = document.querySelector(`#tab-${tabName}`);\n\ttabToRemove?.remove();\n\n\tconst currentOrder = window.localStorage.getItem(\"order\");\n\tif (currentOrder !== \"\") {\n\t\tconst layouts = currentOrder?.split(\",\");\n\t\tconst newOrder = layouts?.filter((e) => e !== tabName);\n\t\tif (newOrder && newOrder.length > 0) {\n\t\t\twindow.localStorage.setItem(\"order\", newOrder.toString());\n\t\t} else {\n\t\t\twindow.localStorage.setItem(\"order\", \"\");\n\t\t}\n\n\t\tif (newOrder) {\n\t\t\tif (newOrder.length > 0) {\n\t\t\t\tawait selectTab(newOrder[0], tabName);\n\t\t\t} else {\n\t\t\t\tconsole.log(\"There are no layouts loaded.\");\n\t\t\t\t// eslint-disable-next-line no-alert\n\t\t\t\talert(\"There are no layouts loaded. Please add one.\");\n\t\t\t}\n\t\t}\n\t}\n}\n\n/**\n * A Create function for layouts.\n * @param fin the fin object.\n * @param layoutName A string for the layout name.\n * @param layout LayoutOptions\n * @param order which position to display in\n */\nasync function createLayout(\n\tfin: OpenFin.Fin,\n\tlayoutName: string,\n\tlayout: OpenFin.LayoutOptions,\n\torder: number\n): Promise {\n\t// Create a new div container for the layout.\n\tconst container = document.createElement(\"div\");\n\tcontainer.id = layoutName;\n\tcontainer.className = \"col layout-container\";\n\tcontainer.style.display = order === 0 ? \"block\" : \"none\";\n\tPARENT_CONTAINER?.append(container);\n\n\t// Normally you can use state here, but just tracking the order of layouts in localStorage.\n\tconst currentOrder = window.localStorage.getItem(\"order\");\n\tlet newOrder = \"\";\n\tif (!currentOrder || currentOrder === \"\") {\n\t\tnewOrder = layoutName;\n\t} else {\n\t\tnewOrder = currentOrder?.concat(\",\", layoutName);\n\t}\n\twindow.localStorage.setItem(\"order\", newOrder);\n\n\t// Finally, call the Layout.create() function to apply the snapshot layout to the div we just created.\n\tawait fin.Platform.Layout.create({ layoutName, layout, container });\n}\n\n/**\n * MakeOverride assists in loading the Fin object before the applyLayoutSnapshot Manager call.\n * @param fin the fin object.\n * @param layoutContainerId the layout container id.\n * @returns a function call.\n */\nfunction makeOverride(fin: OpenFin.Fin, layoutContainerId: string) {\n\treturn function layoutManagerOverride(Base: LayoutManagerConstructor): LayoutManagerConstructor {\n\t\t/**\n\t\t * @class LayoutManagerBasic\n\t\t * This implementation is the fundamental override for Multiple Layouts in Web.\n\t\t */\n\t\treturn class LayoutManagerBasic extends Base implements LayoutManager {\n\t\t\tpublic layoutMapArray: LayoutManagerItem[] = [];\n\n\t\t\tpublic layoutContainer = document.querySelector(`#${layoutContainerId}`);\n\n\t\t\t/**\n\t\t\t * Override for applying multiple snapshots.\n\t\t\t * @param snapshot The layouts object containing the fixed set of available layouts.\n\t\t\t */\n\t\t\tpublic async applyLayoutSnapshot(snapshot: WebLayoutSnapshot): Promise {\n\t\t\t\tconsole.log(`[Apply Layout] Does this exist? ${Boolean(this.layoutContainer)}`);\n\t\t\t\tif (this.layoutContainer !== null && this.layoutContainer !== undefined) {\n\t\t\t\t\tfor (const [key, value] of Object.entries(snapshot.layouts)) {\n\t\t\t\t\t\tthis.layoutMapArray.push({ layoutName: key, layout: value, container: this.layoutContainer });\n\t\t\t\t\t}\n\t\t\t\t\tsetTimeout(\n\t\t\t\t\t\t() =>\n\t\t\t\t\t\t\tObject.entries(snapshot.layouts).map(async ([layoutName, layout], i) => {\n\t\t\t\t\t\t\t\tawait createLayout(fin, layoutName, layout, i);\n\t\t\t\t\t\t\t\tawait createTabBtn(layoutName);\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t1000\n\t\t\t\t\t);\n\t\t\t\t\tconsole.log(\"[Apply Layout] Layouts loaded\");\n\t\t\t\t\tconsole.log(`[Apply Layout] Layouts are: ${JSON.stringify(this.layoutMapArray)}`);\n\t\t\t\t\twindow.localStorage.setItem(\"currentLayout\", JSON.stringify(this.layoutMapArray));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Remove Layout - You guessed it, it removes a layout from the existing array of layouts.\n\t\t\t * @param id The name of the layout you want removed.\n\t\t\t */\n\t\t\tpublic async removeLayout(id: OpenFin.LayoutIdentity): Promise {\n\t\t\t\tconst index = this.layoutMapArray.findIndex((x) => x.layoutName === id.layoutName);\n\t\t\t\tconsole.log(`[LM Override] Removing Layout ${id.layoutName}`);\n\t\t\t\tconsole.log(`[LM Override] Found layout at index ${index}`);\n\t\t\t\tawait removeThisLayout(id.layoutName);\n\t\t\t}\n\t\t};\n\t};\n}\n\n/**\n * Saves the list of layout items to Local Storage.\n * @param updatedLayoutContents List of Layouts to save.\n */\nexport async function saveLayout(updatedLayoutContents: LayoutManagerItem[]): Promise {\n\twindow.localStorage.setItem(\"currentLayout\", JSON.stringify(updatedLayoutContents));\n}\n\n/**\n *\tReads a list of layouts from Local Storage.\n *\t@returns List of Layouts.\n */\nexport function readLayouts(): LayoutManagerItem[] {\n\tconst currentLayouts = window.localStorage.getItem(\"currentLayout\");\n\tif (currentLayouts) {\n\t\treturn JSON.parse(currentLayouts) as LayoutManagerItem[];\n\t}\n\n\treturn [];\n}\n\n/**\n * Adds another layout.\n */\nexport async function addLayout(): Promise {\n\tconst secondLayoutToAdd = await getSecondLayout();\n\tconsole.log(\"[Add Layout] Grabbing Secondary layout file...\");\n\tif (secondLayoutToAdd !== undefined) {\n\t\tconst lm = window.fin?.Platform.Layout.getCurrentLayoutManagerSync();\n\t\tconsole.log(\"[Add Layout] Adding layout\");\n\t\tawait lm?.applyLayoutSnapshot(secondLayoutToAdd);\n\t} else {\n\t\tconsole.log(\"[Add Layout] Error adding Layout. No Secondary Layout exists.\");\n\t}\n\tconst addBtn = document.querySelector(\"#add-layout\");\n\tif (addBtn) {\n\t\taddBtn.setAttribute(\"disabled\", \"disabled\");\n\t}\n}\n\n/**\n * Click function to remove a layout by name.\n * @param layoutName the name of a layout.\n */\nexport async function removeThisLayout(layoutName: string): Promise {\n\t// remove layout from state.\n\tconst layoutsBefore = readLayouts();\n\tlet layoutsRemoved: LayoutManagerItem[] = [];\n\tconst layoutNameElement = document.querySelector(`#${layoutName}`);\n\tif (layoutsBefore.length > 0 && layoutNameElement !== null) {\n\t\tconst idx = layoutsBefore.findIndex((x) => x.layoutName === layoutName);\n\t\tlayoutsRemoved = layoutsBefore.splice(idx, 1);\n\t\tconsole.log(`[Remove Layout] Removed this layout: ${JSON.stringify(layoutsRemoved)}`);\n\t\tawait saveLayout(layoutsBefore);\n\t\tconsole.log(`[Remove Layout] Layouts After Removal: ${JSON.stringify(layoutsBefore)}`);\n\t\tlayoutNameElement.remove();\n\t\tawait fin.Platform.Layout.destroy({ layoutName, uuid: fin.me.uuid, name: fin.me.name });\n\t\tif (layoutName === \"new\") {\n\t\t\tconst addBtn = document.querySelector(\"#add-layout\");\n\t\t\tif (addBtn) {\n\t\t\t\taddBtn.removeAttribute(\"disabled\");\n\t\t\t}\n\t\t}\n\t}\n}\n/**\n * Initializes the OpenFin Web Broker connection.\n */\nasync function init(): Promise {\n\t// Get the required settings\n\tconst settings = await getSettings();\n\t// Get the default layout\n\tconst layoutSnapshot = await getDefaultLayout();\n\n\tif (settings === undefined || layoutSnapshot === undefined) {\n\t\tconsole.error(\n\t\t\t\"Unable to run the sample as we have been unable to load the web manifest and it's settings from the currently running html page. Please ensure that the web manifest is being served and that it contains the custom_settings section.\"\n\t\t);\n\t\treturn;\n\t}\n\n\t// Get the dom element that should host the layout - This will be the top element holding the children iframes.\n\tPARENT_CONTAINER = document.querySelector(`#${settings.platform.layout.layoutContainerId}`);\n\n\tif (PARENT_CONTAINER === null) {\n\t\tconsole.error(\n\t\t\t`Please ensure the document has an element with the following id #${settings.platform.layout.layoutContainerId} so that the web-layout can be applied.`\n\t\t);\n\t\treturn;\n\t}\n\n\t// Connect to the OpenFin Web Broker and pass the default layout.\n\t// It is good practice to specify providerId even if content is explicitly specifying it for cases where\n\t// this provider uses our layout system and content uses inheritance. currentContextGroup\n\t// is useful for defaulting any client that uses inheritance through our layout system.\n\tconst fin = await connect({\n\t\toptions: {\n\t\t\tbrokerUrl: settings.platform.interop.brokerUrl,\n\t\t\tinteropConfig: {\n\t\t\t\tproviderId: settings.platform.interop.providerId,\n\t\t\t\tcurrentContextGroup: settings.platform.interop.defaultContextGroup\n\t\t\t}\n\t\t},\n\t\tconnectionInheritance: \"enabled\",\n\t\tplatform: { layoutSnapshot }\n\t});\n\twindow.fin = fin;\n\tif (fin) {\n\t\tconst layoutManagerOverride = makeOverride(fin, settings.platform.layout.layoutContainerId);\n\t\t// You may now use the `fin` object to initialize the broker and the layout.\n\t\tawait fin.Interop.init(settings.platform.interop.providerId);\n\t\t// Show the main container and hide the loading container\n\t\t// initialize the layout and pass it the dom element to bind to\n\t\tawait fin.Platform.Layout.init({ layoutManagerOverride, container: PARENT_CONTAINER });\n\t\t// setup panels not that everything has been initialized\n\t\tawait attachListeners();\n\t\tsetupPanels(settings);\n\t}\n}\n\ninit()\n\t.then(() => {\n\t\tconsole.log(\"Connected to the OpenFin Web Broker and layout has been applied.\");\n\t\treturn true;\n\t})\n\t.catch((err) => console.error(err));\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/web/v19.2.0/web-layout/layouts/default.layout.fin.json b/web/v19.2.0/web-layout/layouts/default.layout.fin.json index d60a879..2aacc0c 100644 --- a/web/v19.2.0/web-layout/layouts/default.layout.fin.json +++ b/web/v19.2.0/web-layout/layouts/default.layout.fin.json @@ -33,7 +33,7 @@ "type": "component", "componentName": "view", "componentState": { - "url": "https://built-on-openfin.github.io/dev-extensions/extensions/v19.1.0/interop/fdc3/context/2-0/fdc3-broadcast-view.html", + "url": "https://built-on-openfin.github.io/dev-extensions/extensions/v19.2.0/interop/fdc3/context/2-0/fdc3-broadcast-view.html", "name": "internal-generated-view-primary-2" }, "title": "FDC3 Different Domain" @@ -70,7 +70,7 @@ "type": "component", "componentName": "view", "componentState": { - "url": "https://built-on-openfin.github.io/dev-extensions/extensions/v19.1.0/interop/interop-api/context/interop-broadcast-view.html", + "url": "https://built-on-openfin.github.io/dev-extensions/extensions/v19.2.0/interop/interop-api/context/interop-broadcast-view.html", "name": "internal-generated-view-primary-4" }, "title": "Interop External Domain" @@ -116,7 +116,7 @@ "type": "component", "componentName": "view", "componentState": { - "url": "https://built-on-openfin.github.io/dev-extensions/extensions/v19.1.0/interop/interop-api/context/interop-broadcast-view.html", + "url": "https://built-on-openfin.github.io/dev-extensions/extensions/v19.2.0/interop/interop-api/context/interop-broadcast-view.html", "name": "internal-generated-view-primary-7" }, "title": "Interop External Domain" diff --git a/web/v19.2.0/web-layout/layouts/secondary.layout.fin.json b/web/v19.2.0/web-layout/layouts/secondary.layout.fin.json index b22eb1d..34993f8 100644 --- a/web/v19.2.0/web-layout/layouts/secondary.layout.fin.json +++ b/web/v19.2.0/web-layout/layouts/secondary.layout.fin.json @@ -33,7 +33,7 @@ "type": "component", "componentName": "view", "componentState": { - "url": "https://built-on-openfin.github.io/dev-extensions/extensions/v19.1.0/interop/fdc3/context/2-0/fdc3-broadcast-view.html" + "url": "https://built-on-openfin.github.io/dev-extensions/extensions/v19.2.0/interop/fdc3/context/2-0/fdc3-broadcast-view.html" }, "title": "FDC3 Different Domain", "isClosable": true